Skip to content

Commit 88efc19

Browse files
feat(react-teaching-popover-preview): generate package scaffold + add spec (#29782)
* Teaching popover boilerplate * Add api generator and update spec * update text to popover * Add style hooks to context api * popover style hooks * Change file * Add initial test snapshots * Add package dep to context * Update packages/react-components/react-teaching-popover-preview/package.json Co-authored-by: Martin Hochel <[email protected]> * Update change/@fluentui-react-shared-contexts-9911f8a5-2638-4dcf-a672-9488dfa126c9.json Co-authored-by: Martin Hochel <[email protected]> * Update deps --------- Co-authored-by: Martin Hochel <[email protected]>
1 parent 963d6df commit 88efc19

File tree

133 files changed

+2238
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+2238
-1
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ packages/react-components/react-calendar-compat @microsoft/cxe-red @sopranopillo
252252
packages/react-components/react-infolabel @microsoft/cxe-red @sopranopillow
253253
packages/react-components/react-list-preview @microsoft/teams-prg
254254
packages/react-components/react-motions-preview @microsoft/teams-prg
255+
packages/react-components/react-teaching-popover-preview @microsoft/xc-uxe @Mitch-At-Work
255256
# <%= NX-CODEOWNER-PLACEHOLDER %>
256257

257258
## Components
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "minor",
3+
"comment": "feat: Add TeachingPopover style hooks",
4+
"packageName": "@fluentui/react-provider",
5+
"email": "[email protected]",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "minor",
3+
"comment": "feat: TeachingPopover style hooks added",
4+
"packageName": "@fluentui/react-shared-contexts",
5+
"email": "[email protected]",
6+
"dependentChangeType": "patch"
7+
}

packages/react-components/react-provider/etc/react-provider.api.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,15 @@ export const FluentProvider: React_2.ForwardRefExoticComponent<Omit<ComponentPro
139139
useMessageBarActionsStyles_unstable: (state: unknown) => void;
140140
useMessageBarGroupStyles_unstable: (state: unknown) => void;
141141
useToasterStyles_unstable: (state: unknown) => void;
142+
useTeachingPopoverStyles_unstable: (state: unknown) => void;
143+
useTeachingPopoverActionsStyles_unstable: (state: unknown) => void;
144+
useTeachingPopoverBodyStyles_unstable: (state: unknown) => void;
145+
useTeachingPopoverButtonStyles_unstable: (state: unknown) => void;
146+
useTeachingPopoverCarouselStyles_unstable: (state: unknown) => void;
147+
useTeachingPopoverHeaderStyles_unstable: (state: unknown) => void;
148+
useTeachingPopoverPageCountStyles_unstable: (state: unknown) => void;
149+
useTeachingPopoverSurfaceStyles_unstable: (state: unknown) => void;
150+
useTeachingPopoverTitleStyles_unstable: (state: unknown) => void;
142151
}> | undefined;
143152
dir?: "ltr" | "rtl" | undefined;
144153
targetDocument?: Document | undefined;

packages/react-components/react-shared-contexts/etc/react-shared-contexts.api.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,15 @@ export const CustomStyleHooksContext_unstable: React_2.Context<Partial<{
134134
useMessageBarActionsStyles_unstable: CustomStyleHook;
135135
useMessageBarGroupStyles_unstable: CustomStyleHook;
136136
useToasterStyles_unstable: CustomStyleHook;
137+
useTeachingPopoverStyles_unstable: CustomStyleHook;
138+
useTeachingPopoverActionsStyles_unstable: CustomStyleHook;
139+
useTeachingPopoverBodyStyles_unstable: CustomStyleHook;
140+
useTeachingPopoverButtonStyles_unstable: CustomStyleHook;
141+
useTeachingPopoverCarouselStyles_unstable: CustomStyleHook;
142+
useTeachingPopoverHeaderStyles_unstable: CustomStyleHook;
143+
useTeachingPopoverPageCountStyles_unstable: CustomStyleHook;
144+
useTeachingPopoverSurfaceStyles_unstable: CustomStyleHook;
145+
useTeachingPopoverTitleStyles_unstable: CustomStyleHook;
137146
}> | undefined>;
138147

139148
// @public (undocumented)
@@ -249,6 +258,15 @@ export type CustomStyleHooksContextValue_unstable = Partial<{
249258
useMessageBarActionsStyles_unstable: CustomStyleHook;
250259
useMessageBarGroupStyles_unstable: CustomStyleHook;
251260
useToasterStyles_unstable: CustomStyleHook;
261+
useTeachingPopoverStyles_unstable: CustomStyleHook;
262+
useTeachingPopoverActionsStyles_unstable: CustomStyleHook;
263+
useTeachingPopoverBodyStyles_unstable: CustomStyleHook;
264+
useTeachingPopoverButtonStyles_unstable: CustomStyleHook;
265+
useTeachingPopoverCarouselStyles_unstable: CustomStyleHook;
266+
useTeachingPopoverHeaderStyles_unstable: CustomStyleHook;
267+
useTeachingPopoverPageCountStyles_unstable: CustomStyleHook;
268+
useTeachingPopoverSurfaceStyles_unstable: CustomStyleHook;
269+
useTeachingPopoverTitleStyles_unstable: CustomStyleHook;
252270
}>;
253271

254272
// @internal (undocumented)
@@ -364,6 +382,15 @@ export const CustomStyleHooksProvider_unstable: React_2.Provider<Partial<{
364382
useMessageBarActionsStyles_unstable: CustomStyleHook;
365383
useMessageBarGroupStyles_unstable: CustomStyleHook;
366384
useToasterStyles_unstable: CustomStyleHook;
385+
useTeachingPopoverStyles_unstable: CustomStyleHook;
386+
useTeachingPopoverActionsStyles_unstable: CustomStyleHook;
387+
useTeachingPopoverBodyStyles_unstable: CustomStyleHook;
388+
useTeachingPopoverButtonStyles_unstable: CustomStyleHook;
389+
useTeachingPopoverCarouselStyles_unstable: CustomStyleHook;
390+
useTeachingPopoverHeaderStyles_unstable: CustomStyleHook;
391+
useTeachingPopoverPageCountStyles_unstable: CustomStyleHook;
392+
useTeachingPopoverSurfaceStyles_unstable: CustomStyleHook;
393+
useTeachingPopoverTitleStyles_unstable: CustomStyleHook;
367394
}> | undefined>;
368395

369396
// @internal (undocumented)

packages/react-components/react-shared-contexts/src/CustomStyleHooksContext/CustomStyleHooksContext.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,15 @@ export type CustomStyleHooksContextValue = Partial<{
119119
useMessageBarActionsStyles_unstable: CustomStyleHook;
120120
useMessageBarGroupStyles_unstable: CustomStyleHook;
121121
useToasterStyles_unstable: CustomStyleHook;
122+
useTeachingPopoverStyles_unstable: CustomStyleHook;
123+
useTeachingPopoverActionsStyles_unstable: CustomStyleHook;
124+
useTeachingPopoverBodyStyles_unstable: CustomStyleHook;
125+
useTeachingPopoverButtonStyles_unstable: CustomStyleHook;
126+
useTeachingPopoverCarouselStyles_unstable: CustomStyleHook;
127+
useTeachingPopoverHeaderStyles_unstable: CustomStyleHook;
128+
useTeachingPopoverPageCountStyles_unstable: CustomStyleHook;
129+
useTeachingPopoverSurfaceStyles_unstable: CustomStyleHook;
130+
useTeachingPopoverTitleStyles_unstable: CustomStyleHook;
122131
}>;
123132

124133
/**
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "../../../.babelrc-v9.json",
3+
"plugins": ["annotate-pure-calls", "@babel/transform-react-pure-annotations"]
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": ["plugin:@fluentui/eslint-plugin/react"],
3+
"root": true
4+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const rootMain = require('../../../../.storybook/main');
2+
3+
module.exports = /** @type {Omit<import('../../../../.storybook/main'), 'typescript'|'babel'>} */ ({
4+
...rootMain,
5+
stories: [...rootMain.stories, '../stories/**/*.stories.mdx', '../stories/**/index.stories.@(ts|tsx)'],
6+
addons: [...rootMain.addons],
7+
webpackFinal: (config, options) => {
8+
const localConfig = { ...rootMain.webpackFinal(config, options) };
9+
10+
// add your own webpack tweaks if needed
11+
12+
return localConfig;
13+
},
14+
});
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import * as rootPreview from '../../../../.storybook/preview';
2+
3+
/** @type {typeof rootPreview.decorators} */
4+
export const decorators = [...rootPreview.decorators];
5+
6+
/** @type {typeof rootPreview.parameters} */
7+
export const parameters = { ...rootPreview.parameters };

0 commit comments

Comments
 (0)