@fluentui/react-teaching-popover 9.5.6 → 9.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -2
- package/lib/components/TeachingPopoverBody/useTeachingPopoverBodyStyles.styles.raw.js +53 -0
- package/lib/components/TeachingPopoverBody/useTeachingPopoverBodyStyles.styles.raw.js.map +1 -0
- package/lib/components/TeachingPopoverCarousel/useTeachingPopoverCarouselStyles.styles.raw.js +14 -0
- package/lib/components/TeachingPopoverCarousel/useTeachingPopoverCarouselStyles.styles.raw.js.map +1 -0
- package/lib/components/TeachingPopoverCarouselCard/useTeachingPopoverCarouselCardStyles.styles.raw.js +13 -0
- package/lib/components/TeachingPopoverCarouselCard/useTeachingPopoverCarouselCardStyles.styles.raw.js.map +1 -0
- package/lib/components/TeachingPopoverCarouselFooter/useTeachingPopoverCarouselFooterStyles.styles.raw.js +34 -0
- package/lib/components/TeachingPopoverCarouselFooter/useTeachingPopoverCarouselFooterStyles.styles.raw.js.map +1 -0
- package/lib/components/TeachingPopoverCarouselFooterButton/useTeachingPopoverCarouselFooterButtonStyles.styles.raw.js +54 -0
- package/lib/components/TeachingPopoverCarouselFooterButton/useTeachingPopoverCarouselFooterButtonStyles.styles.raw.js.map +1 -0
- package/lib/components/TeachingPopoverCarouselNav/useTeachingPopoverCarouselNavStyles.styles.raw.js +26 -0
- package/lib/components/TeachingPopoverCarouselNav/useTeachingPopoverCarouselNavStyles.styles.raw.js.map +1 -0
- package/lib/components/TeachingPopoverCarouselNavButton/useTeachingPopoverCarouselNavButtonStyles.styles.raw.js +71 -0
- package/lib/components/TeachingPopoverCarouselNavButton/useTeachingPopoverCarouselNavButtonStyles.styles.raw.js.map +1 -0
- package/lib/components/TeachingPopoverCarouselPageCount/useTeachingPopoverCarouselPageCountStyles.styles.raw.js +21 -0
- package/lib/components/TeachingPopoverCarouselPageCount/useTeachingPopoverCarouselPageCountStyles.styles.raw.js.map +1 -0
- package/lib/components/TeachingPopoverFooter/useTeachingPopoverFooterStyles.styles.raw.js +55 -0
- package/lib/components/TeachingPopoverFooter/useTeachingPopoverFooterStyles.styles.raw.js.map +1 -0
- package/lib/components/TeachingPopoverHeader/useTeachingPopoverHeaderStyles.styles.raw.js +81 -0
- package/lib/components/TeachingPopoverHeader/useTeachingPopoverHeaderStyles.styles.raw.js.map +1 -0
- package/lib/components/TeachingPopoverSurface/useTeachingPopoverSurfaceStyles.styles.raw.js +24 -0
- package/lib/components/TeachingPopoverSurface/useTeachingPopoverSurfaceStyles.styles.raw.js.map +1 -0
- package/lib/components/TeachingPopoverTitle/useTeachingPopoverTitleStyles.styles.raw.js +56 -0
- package/lib/components/TeachingPopoverTitle/useTeachingPopoverTitleStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/TeachingPopoverBody/useTeachingPopoverBodyStyles.styles.raw.js +74 -0
- package/lib-commonjs/components/TeachingPopoverBody/useTeachingPopoverBodyStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/TeachingPopoverCarousel/useTeachingPopoverCarouselStyles.styles.raw.js +32 -0
- package/lib-commonjs/components/TeachingPopoverCarousel/useTeachingPopoverCarouselStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/TeachingPopoverCarouselCard/useTeachingPopoverCarouselCardStyles.styles.raw.js +31 -0
- package/lib-commonjs/components/TeachingPopoverCarouselCard/useTeachingPopoverCarouselCardStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/TeachingPopoverCarouselFooter/useTeachingPopoverCarouselFooterStyles.styles.raw.js +52 -0
- package/lib-commonjs/components/TeachingPopoverCarouselFooter/useTeachingPopoverCarouselFooterStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/TeachingPopoverCarouselFooterButton/useTeachingPopoverCarouselFooterButtonStyles.styles.raw.js +70 -0
- package/lib-commonjs/components/TeachingPopoverCarouselFooterButton/useTeachingPopoverCarouselFooterButtonStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/TeachingPopoverCarouselNav/useTeachingPopoverCarouselNavStyles.styles.raw.js +44 -0
- package/lib-commonjs/components/TeachingPopoverCarouselNav/useTeachingPopoverCarouselNavStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/TeachingPopoverCarouselNavButton/useTeachingPopoverCarouselNavButtonStyles.styles.raw.js +87 -0
- package/lib-commonjs/components/TeachingPopoverCarouselNavButton/useTeachingPopoverCarouselNavButtonStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/TeachingPopoverCarouselPageCount/useTeachingPopoverCarouselPageCountStyles.styles.raw.js +37 -0
- package/lib-commonjs/components/TeachingPopoverCarouselPageCount/useTeachingPopoverCarouselPageCountStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/TeachingPopoverFooter/useTeachingPopoverFooterStyles.styles.raw.js +73 -0
- package/lib-commonjs/components/TeachingPopoverFooter/useTeachingPopoverFooterStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/TeachingPopoverHeader/useTeachingPopoverHeaderStyles.styles.raw.js +99 -0
- package/lib-commonjs/components/TeachingPopoverHeader/useTeachingPopoverHeaderStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/TeachingPopoverSurface/useTeachingPopoverSurfaceStyles.styles.raw.js +40 -0
- package/lib-commonjs/components/TeachingPopoverSurface/useTeachingPopoverSurfaceStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/TeachingPopoverTitle/useTeachingPopoverTitleStyles.styles.raw.js +74 -0
- package/lib-commonjs/components/TeachingPopoverTitle/useTeachingPopoverTitleStyles.styles.raw.js.map +1 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-teaching-popover
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 17 Jul 2025 13:45:49 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.6.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-teaching-popover_v9.6.0)
|
|
8
|
+
|
|
9
|
+
Thu, 17 Jul 2025 13:45:49 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-teaching-popover_v9.5.7..@fluentui/react-teaching-popover_v9.6.0)
|
|
11
|
+
|
|
12
|
+
### Minor changes
|
|
13
|
+
|
|
14
|
+
- feat: enable griffel raw styles ([PR #34853](https://github.com/microsoft/fluentui/pull/34853) by martinhochel@microsoft.com)
|
|
15
|
+
- Bump @fluentui/react-popover to v9.12.0 ([PR #34862](https://github.com/microsoft/fluentui/pull/34862) by beachball)
|
|
16
|
+
- Bump @fluentui/react-button to v9.6.0 ([PR #34862](https://github.com/microsoft/fluentui/pull/34862) by beachball)
|
|
17
|
+
- Bump @fluentui/react-tabster to v9.26.0 ([PR #34862](https://github.com/microsoft/fluentui/pull/34862) by beachball)
|
|
18
|
+
- Bump @fluentui/react-aria to v9.15.4 ([PR #34862](https://github.com/microsoft/fluentui/pull/34862) by beachball)
|
|
19
|
+
|
|
20
|
+
## [9.5.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-teaching-popover_v9.5.7)
|
|
21
|
+
|
|
22
|
+
Fri, 11 Jul 2025 15:59:24 GMT
|
|
23
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-teaching-popover_v9.5.6..@fluentui/react-teaching-popover_v9.5.7)
|
|
24
|
+
|
|
25
|
+
### Patches
|
|
26
|
+
|
|
27
|
+
- Bump @fluentui/react-popover to v9.11.7 ([PR #34807](https://github.com/microsoft/fluentui/pull/34807) by beachball)
|
|
28
|
+
|
|
7
29
|
## [9.5.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-teaching-popover_v9.5.6)
|
|
8
30
|
|
|
9
|
-
Fri, 04 Jul 2025 10:
|
|
31
|
+
Fri, 04 Jul 2025 10:02:51 GMT
|
|
10
32
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-teaching-popover_v9.5.5..@fluentui/react-teaching-popover_v9.5.6)
|
|
11
33
|
|
|
12
34
|
### Patches
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { makeStyles, mergeClasses } from '@griffel/react';
|
|
2
|
+
export const teachingPopoverBodyClassNames = {
|
|
3
|
+
root: 'fui-TeachingPopoverBody',
|
|
4
|
+
media: 'fui-TeachingPopoverBody__media'
|
|
5
|
+
};
|
|
6
|
+
const popoverBodyDimension = 288;
|
|
7
|
+
export const useMediaStyles = makeStyles({
|
|
8
|
+
base: {
|
|
9
|
+
gridArea: 'media',
|
|
10
|
+
overflow: 'hidden',
|
|
11
|
+
width: 'auto',
|
|
12
|
+
marginBottom: '12px',
|
|
13
|
+
verticalAlign: 'middle',
|
|
14
|
+
justifyContent: 'center',
|
|
15
|
+
display: 'flex'
|
|
16
|
+
},
|
|
17
|
+
short: {
|
|
18
|
+
aspectRatio: popoverBodyDimension / 117,
|
|
19
|
+
'@supports not (aspect-ratio)': {
|
|
20
|
+
height: '117px'
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
medium: {
|
|
24
|
+
aspectRatio: popoverBodyDimension / 176,
|
|
25
|
+
'@supports not (aspect-ratio)': {
|
|
26
|
+
height: '176px'
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
tall: {
|
|
30
|
+
aspectRatio: 1,
|
|
31
|
+
'@supports not (aspect-ratio)': {
|
|
32
|
+
height: `${popoverBodyDimension}px`
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
const useStyles = makeStyles({
|
|
37
|
+
root: {
|
|
38
|
+
display: 'flex',
|
|
39
|
+
flexDirection: 'column',
|
|
40
|
+
paddingBottom: '12px'
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
/** Applies style classnames to slots */ export const useTeachingPopoverBodyStyles_unstable = (state)=>{
|
|
44
|
+
'use no memo';
|
|
45
|
+
const { mediaLength } = state;
|
|
46
|
+
const styles = useStyles();
|
|
47
|
+
const mediaStyles = useMediaStyles();
|
|
48
|
+
state.root.className = mergeClasses(teachingPopoverBodyClassNames.root, styles.root, state.root.className);
|
|
49
|
+
if (state.media) {
|
|
50
|
+
state.media.className = mergeClasses(teachingPopoverBodyClassNames.media, mediaStyles.base, mediaStyles[mediaLength], state.media.className);
|
|
51
|
+
}
|
|
52
|
+
return state;
|
|
53
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/TeachingPopoverBody/useTeachingPopoverBodyStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport type { TeachingPopoverBodySlots, TeachingPopoverBodyState } from './TeachingPopoverBody.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const teachingPopoverBodyClassNames: SlotClassNames<TeachingPopoverBodySlots> = {\n root: 'fui-TeachingPopoverBody',\n media: 'fui-TeachingPopoverBody__media',\n};\n\nconst popoverBodyDimension = 288;\n\nexport const useMediaStyles = makeStyles({\n base: {\n gridArea: 'media',\n overflow: 'hidden',\n width: 'auto',\n marginBottom: '12px',\n verticalAlign: 'middle',\n justifyContent: 'center',\n display: 'flex',\n },\n short: {\n aspectRatio: popoverBodyDimension / 117,\n '@supports not (aspect-ratio)': {\n height: '117px',\n },\n },\n medium: {\n aspectRatio: popoverBodyDimension / 176,\n '@supports not (aspect-ratio)': {\n height: '176px',\n },\n },\n tall: {\n aspectRatio: 1,\n '@supports not (aspect-ratio)': {\n height: `${popoverBodyDimension}px`,\n },\n },\n});\n\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'column',\n paddingBottom: '12px',\n },\n});\n\n/** Applies style classnames to slots */\nexport const useTeachingPopoverBodyStyles_unstable = (state: TeachingPopoverBodyState) => {\n 'use no memo';\n\n const { mediaLength } = state;\n const styles = useStyles();\n const mediaStyles = useMediaStyles();\n\n state.root.className = mergeClasses(teachingPopoverBodyClassNames.root, styles.root, state.root.className);\n\n if (state.media) {\n state.media.className = mergeClasses(\n teachingPopoverBodyClassNames.media,\n mediaStyles.base,\n mediaStyles[mediaLength],\n state.media.className,\n );\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","teachingPopoverBodyClassNames","root","media","popoverBodyDimension","useMediaStyles","base","gridArea","overflow","width","marginBottom","verticalAlign","justifyContent","display","short","aspectRatio","height","medium","tall","useStyles","flexDirection","paddingBottom","useTeachingPopoverBodyStyles_unstable","state","mediaLength","styles","mediaStyles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAI1D,OAAO,MAAMC,gCAA0E;IACrFC,MAAM;IACNC,OAAO;AACT,EAAE;AAEF,MAAMC,uBAAuB;AAE7B,OAAO,MAAMC,iBAAiBN,WAAW;IACvCO,MAAM;QACJC,UAAU;QACVC,UAAU;QACVC,OAAO;QACPC,cAAc;QACdC,eAAe;QACfC,gBAAgB;QAChBC,SAAS;IACX;IACAC,OAAO;QACLC,aAAaX,uBAAuB;QACpC,gCAAgC;YAC9BY,QAAQ;QACV;IACF;IACAC,QAAQ;QACNF,aAAaX,uBAAuB;QACpC,gCAAgC;YAC9BY,QAAQ;QACV;IACF;IACAE,MAAM;QACJH,aAAa;QACb,gCAAgC;YAC9BC,QAAQ,CAAC,EAAEZ,qBAAqB,EAAE,CAAC;QACrC;IACF;AACF,GAAG;AAEH,MAAMe,YAAYpB,WAAW;IAC3BG,MAAM;QACJW,SAAS;QACTO,eAAe;QACfC,eAAe;IACjB;AACF;AAEA,sCAAsC,GACtC,OAAO,MAAMC,wCAAwC,CAACC;IACpD;IAEA,MAAM,EAAEC,WAAW,EAAE,GAAGD;IACxB,MAAME,SAASN;IACf,MAAMO,cAAcrB;IAEpBkB,MAAMrB,IAAI,CAACyB,SAAS,GAAG3B,aAAaC,8BAA8BC,IAAI,EAAEuB,OAAOvB,IAAI,EAAEqB,MAAMrB,IAAI,CAACyB,SAAS;IAEzG,IAAIJ,MAAMpB,KAAK,EAAE;QACfoB,MAAMpB,KAAK,CAACwB,SAAS,GAAG3B,aACtBC,8BAA8BE,KAAK,EACnCuB,YAAYpB,IAAI,EAChBoB,WAAW,CAACF,YAAY,EACxBD,MAAMpB,KAAK,CAACwB,SAAS;IAEzB;IAEA,OAAOJ;AACT,EAAE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { makeStyles, mergeClasses } from '@griffel/react';
|
|
2
|
+
export const teachingPopoverCarouselClassNames = {
|
|
3
|
+
root: 'fui-TeachingPopoverCarousel'
|
|
4
|
+
};
|
|
5
|
+
// Todo: Page change animation & styles
|
|
6
|
+
const useStyles = makeStyles({
|
|
7
|
+
root: {}
|
|
8
|
+
});
|
|
9
|
+
/** Applies style classnames to slots */ export const useTeachingPopoverCarouselStyles_unstable = (state)=>{
|
|
10
|
+
'use no memo';
|
|
11
|
+
const styles = useStyles();
|
|
12
|
+
state.root.className = mergeClasses(teachingPopoverCarouselClassNames.root, styles.root, state.root.className);
|
|
13
|
+
return state;
|
|
14
|
+
};
|
package/lib/components/TeachingPopoverCarousel/useTeachingPopoverCarouselStyles.styles.raw.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/TeachingPopoverCarousel/useTeachingPopoverCarouselStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport type { TeachingPopoverCarouselSlots, TeachingPopoverCarouselState } from './TeachingPopoverCarousel.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const teachingPopoverCarouselClassNames: SlotClassNames<TeachingPopoverCarouselSlots> = {\n root: 'fui-TeachingPopoverCarousel',\n};\n\n// Todo: Page change animation & styles\nconst useStyles = makeStyles({\n root: {},\n});\n\n/** Applies style classnames to slots */\nexport const useTeachingPopoverCarouselStyles_unstable = (state: TeachingPopoverCarouselState) => {\n 'use no memo';\n\n const styles = useStyles();\n\n state.root.className = mergeClasses(teachingPopoverCarouselClassNames.root, styles.root, state.root.className);\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","teachingPopoverCarouselClassNames","root","useStyles","useTeachingPopoverCarouselStyles_unstable","state","styles","className"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAI1D,OAAO,MAAMC,oCAAkF;IAC7FC,MAAM;AACR,EAAE;AAEF,uCAAuC;AACvC,MAAMC,YAAYJ,WAAW;IAC3BG,MAAM,CAAC;AACT;AAEA,sCAAsC,GACtC,OAAO,MAAME,4CAA4C,CAACC;IACxD;IAEA,MAAMC,SAASH;IAEfE,MAAMH,IAAI,CAACK,SAAS,GAAGP,aAAaC,kCAAkCC,IAAI,EAAEI,OAAOJ,IAAI,EAAEG,MAAMH,IAAI,CAACK,SAAS;IAE7G,OAAOF;AACT,EAAE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { makeStyles, mergeClasses } from '@griffel/react';
|
|
2
|
+
export const teachingPopoverCarouselCardClassNames = {
|
|
3
|
+
root: 'fui-TeachingPopoverCarouselCard'
|
|
4
|
+
};
|
|
5
|
+
const useStyles = makeStyles({
|
|
6
|
+
root: {}
|
|
7
|
+
});
|
|
8
|
+
/** Applies style classnames to slots */ export const useTeachingPopoverCarouselCardStyles_unstable = (state)=>{
|
|
9
|
+
'use no memo';
|
|
10
|
+
const styles = useStyles();
|
|
11
|
+
state.root.className = mergeClasses(teachingPopoverCarouselCardClassNames.root, styles.root, state.root.className);
|
|
12
|
+
return state;
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/TeachingPopoverCarouselCard/useTeachingPopoverCarouselCardStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport type {\n TeachingPopoverCarouselCardSlots,\n TeachingPopoverCarouselCardState,\n} from './TeachingPopoverCarouselCard.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const teachingPopoverCarouselCardClassNames: SlotClassNames<TeachingPopoverCarouselCardSlots> = {\n root: 'fui-TeachingPopoverCarouselCard',\n};\n\nconst useStyles = makeStyles({\n root: {},\n});\n\n/** Applies style classnames to slots */\nexport const useTeachingPopoverCarouselCardStyles_unstable = (state: TeachingPopoverCarouselCardState) => {\n 'use no memo';\n\n const styles = useStyles();\n\n state.root.className = mergeClasses(teachingPopoverCarouselCardClassNames.root, styles.root, state.root.className);\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","teachingPopoverCarouselCardClassNames","root","useStyles","useTeachingPopoverCarouselCardStyles_unstable","state","styles","className"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAO1D,OAAO,MAAMC,wCAA0F;IACrGC,MAAM;AACR,EAAE;AAEF,MAAMC,YAAYJ,WAAW;IAC3BG,MAAM,CAAC;AACT;AAEA,sCAAsC,GACtC,OAAO,MAAME,gDAAgD,CAACC;IAC5D;IAEA,MAAMC,SAASH;IAEfE,MAAMH,IAAI,CAACK,SAAS,GAAGP,aAAaC,sCAAsCC,IAAI,EAAEI,OAAOJ,IAAI,EAAEG,MAAMH,IAAI,CAACK,SAAS;IAEjH,OAAOF;AACT,EAAE"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { makeStyles, mergeClasses } from '@griffel/react';
|
|
2
|
+
export const teachingPopoverCarouselFooterClassNames = {
|
|
3
|
+
root: 'fui-TeachingPopoverCarouselFooter',
|
|
4
|
+
previous: 'fui-TeachingPopoverCarouselFooter__previous',
|
|
5
|
+
next: 'fui-TeachingPopoverCarouselFooter__next'
|
|
6
|
+
};
|
|
7
|
+
// Todo: Page change animation & styles
|
|
8
|
+
const useStyles = makeStyles({
|
|
9
|
+
root: {
|
|
10
|
+
display: 'flex',
|
|
11
|
+
flexDirection: 'row'
|
|
12
|
+
},
|
|
13
|
+
rootCentered: {
|
|
14
|
+
justifyContent: 'space-between',
|
|
15
|
+
gap: '8px'
|
|
16
|
+
},
|
|
17
|
+
rootRightAligned: {
|
|
18
|
+
gap: '8px',
|
|
19
|
+
'& :first-child': {
|
|
20
|
+
marginInlineEnd: 'auto'
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
/** Applies style classnames to slots */ export const useTeachingPopoverCarouselFooterStyles_unstable = (state)=>{
|
|
25
|
+
'use no memo';
|
|
26
|
+
const styles = useStyles();
|
|
27
|
+
const { layout } = state;
|
|
28
|
+
state.root.className = mergeClasses(teachingPopoverCarouselFooterClassNames.root, styles.root, layout === 'centered' ? styles.rootCentered : styles.rootRightAligned, state.root.className);
|
|
29
|
+
if (state.previous) {
|
|
30
|
+
state.previous.className = mergeClasses(teachingPopoverCarouselFooterClassNames.previous, state.previous.className);
|
|
31
|
+
}
|
|
32
|
+
state.next.className = mergeClasses(teachingPopoverCarouselFooterClassNames.next, state.next.className);
|
|
33
|
+
return state;
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/TeachingPopoverCarouselFooter/useTeachingPopoverCarouselFooterStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport type {\n TeachingPopoverCarouselFooterSlots,\n TeachingPopoverCarouselFooterState,\n} from './TeachingPopoverCarouselFooter.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const teachingPopoverCarouselFooterClassNames: SlotClassNames<TeachingPopoverCarouselFooterSlots> = {\n root: 'fui-TeachingPopoverCarouselFooter',\n previous: 'fui-TeachingPopoverCarouselFooter__previous',\n next: 'fui-TeachingPopoverCarouselFooter__next',\n};\n\n// Todo: Page change animation & styles\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n },\n rootCentered: {\n justifyContent: 'space-between',\n gap: '8px',\n },\n rootRightAligned: {\n gap: '8px',\n '& :first-child': {\n marginInlineEnd: 'auto',\n },\n },\n});\n\n/** Applies style classnames to slots */\nexport const useTeachingPopoverCarouselFooterStyles_unstable = (state: TeachingPopoverCarouselFooterState) => {\n 'use no memo';\n\n const styles = useStyles();\n const { layout } = state;\n\n state.root.className = mergeClasses(\n teachingPopoverCarouselFooterClassNames.root,\n styles.root,\n layout === 'centered' ? styles.rootCentered : styles.rootRightAligned,\n state.root.className,\n );\n\n if (state.previous) {\n state.previous.className = mergeClasses(teachingPopoverCarouselFooterClassNames.previous, state.previous.className);\n }\n\n state.next.className = mergeClasses(teachingPopoverCarouselFooterClassNames.next, state.next.className);\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","teachingPopoverCarouselFooterClassNames","root","previous","next","useStyles","display","flexDirection","rootCentered","justifyContent","gap","rootRightAligned","marginInlineEnd","useTeachingPopoverCarouselFooterStyles_unstable","state","styles","layout","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAO1D,OAAO,MAAMC,0CAA8F;IACzGC,MAAM;IACNC,UAAU;IACVC,MAAM;AACR,EAAE;AAEF,uCAAuC;AACvC,MAAMC,YAAYN,WAAW;IAC3BG,MAAM;QACJI,SAAS;QACTC,eAAe;IACjB;IACAC,cAAc;QACZC,gBAAgB;QAChBC,KAAK;IACP;IACAC,kBAAkB;QAChBD,KAAK;QACL,kBAAkB;YAChBE,iBAAiB;QACnB;IACF;AACF;AAEA,sCAAsC,GACtC,OAAO,MAAMC,kDAAkD,CAACC;IAC9D;IAEA,MAAMC,SAASV;IACf,MAAM,EAAEW,MAAM,EAAE,GAAGF;IAEnBA,MAAMZ,IAAI,CAACe,SAAS,GAAGjB,aACrBC,wCAAwCC,IAAI,EAC5Ca,OAAOb,IAAI,EACXc,WAAW,aAAaD,OAAOP,YAAY,GAAGO,OAAOJ,gBAAgB,EACrEG,MAAMZ,IAAI,CAACe,SAAS;IAGtB,IAAIH,MAAMX,QAAQ,EAAE;QAClBW,MAAMX,QAAQ,CAACc,SAAS,GAAGjB,aAAaC,wCAAwCE,QAAQ,EAAEW,MAAMX,QAAQ,CAACc,SAAS;IACpH;IAEAH,MAAMV,IAAI,CAACa,SAAS,GAAGjB,aAAaC,wCAAwCG,IAAI,EAAEU,MAAMV,IAAI,CAACa,SAAS;IAEtG,OAAOH;AACT,EAAE"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { makeStyles, mergeClasses, shorthands } from '@griffel/react';
|
|
2
|
+
import { tokens } from '@fluentui/react-theme';
|
|
3
|
+
import { useButtonStyles_unstable } from '@fluentui/react-button';
|
|
4
|
+
export const teachingPopoverCarouselFooterButtonClassNames = {
|
|
5
|
+
root: 'fui-TeachingPopoverCarouselFooterButton'
|
|
6
|
+
};
|
|
7
|
+
const useStyles = makeStyles({
|
|
8
|
+
root: {
|
|
9
|
+
minWidth: '96px'
|
|
10
|
+
},
|
|
11
|
+
brandNext: {
|
|
12
|
+
color: tokens.colorBrandForeground1,
|
|
13
|
+
backgroundColor: tokens.colorNeutralForegroundOnBrand,
|
|
14
|
+
...shorthands.borderColor(tokens.colorTransparentBackground),
|
|
15
|
+
':hover': {
|
|
16
|
+
color: tokens.colorCompoundBrandForeground1Hover,
|
|
17
|
+
backgroundColor: tokens.colorNeutralForegroundOnBrand
|
|
18
|
+
},
|
|
19
|
+
':hover:active': {
|
|
20
|
+
color: tokens.colorCompoundBrandForeground1Pressed,
|
|
21
|
+
backgroundColor: tokens.colorNeutralForegroundOnBrand
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
brandPrevious: {
|
|
25
|
+
// In brand, this is always 'NeutralForegroundOnBrand'
|
|
26
|
+
color: tokens.colorNeutralForegroundOnBrand,
|
|
27
|
+
backgroundColor: tokens.colorBrandBackground,
|
|
28
|
+
...shorthands.borderColor(tokens.colorNeutralForegroundOnBrand),
|
|
29
|
+
':hover': {
|
|
30
|
+
color: tokens.colorNeutralForegroundOnBrand,
|
|
31
|
+
...shorthands.borderColor(tokens.colorNeutralForegroundOnBrand),
|
|
32
|
+
backgroundColor: tokens.colorBrandBackgroundHover
|
|
33
|
+
},
|
|
34
|
+
':hover:active': {
|
|
35
|
+
color: tokens.colorNeutralForegroundOnBrand,
|
|
36
|
+
...shorthands.borderColor(tokens.colorNeutralForegroundOnBrand),
|
|
37
|
+
backgroundColor: tokens.colorBrandBackgroundPressed
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
/**
|
|
42
|
+
* Apply styling to the TeachingPopoverCarouselFooterButton slots based on the state
|
|
43
|
+
*/ export const useTeachingPopoverCarouselFooterButtonStyles_unstable = (state)=>{
|
|
44
|
+
'use no memo';
|
|
45
|
+
const styles = useStyles();
|
|
46
|
+
const { navType, popoverAppearance } = state;
|
|
47
|
+
// Apply underlying fluent Button styles
|
|
48
|
+
state = {
|
|
49
|
+
...state,
|
|
50
|
+
...useButtonStyles_unstable(state)
|
|
51
|
+
};
|
|
52
|
+
state.root.className = mergeClasses(teachingPopoverCarouselFooterButtonClassNames.root, styles.root, navType === 'prev' && popoverAppearance === 'brand' && styles.brandPrevious, navType === 'next' && popoverAppearance === 'brand' && styles.brandNext, state.root.className);
|
|
53
|
+
return state;
|
|
54
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/TeachingPopoverCarouselFooterButton/useTeachingPopoverCarouselFooterButtonStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type {\n TeachingPopoverCarouselFooterButtonSlots,\n TeachingPopoverCarouselFooterButtonState,\n} from './TeachingPopoverCarouselFooterButton.types';\nimport { tokens } from '@fluentui/react-theme';\nimport { useButtonStyles_unstable } from '@fluentui/react-button';\n\nexport const teachingPopoverCarouselFooterButtonClassNames: SlotClassNames<TeachingPopoverCarouselFooterButtonSlots> = {\n root: 'fui-TeachingPopoverCarouselFooterButton',\n};\n\nconst useStyles = makeStyles({\n root: {\n minWidth: '96px',\n },\n brandNext: {\n color: tokens.colorBrandForeground1,\n backgroundColor: tokens.colorNeutralForegroundOnBrand,\n ...shorthands.borderColor(tokens.colorTransparentBackground),\n ':hover': {\n color: tokens.colorCompoundBrandForeground1Hover,\n backgroundColor: tokens.colorNeutralForegroundOnBrand,\n },\n ':hover:active': {\n color: tokens.colorCompoundBrandForeground1Pressed,\n backgroundColor: tokens.colorNeutralForegroundOnBrand,\n },\n },\n brandPrevious: {\n // In brand, this is always 'NeutralForegroundOnBrand'\n color: tokens.colorNeutralForegroundOnBrand,\n backgroundColor: tokens.colorBrandBackground,\n ...shorthands.borderColor(tokens.colorNeutralForegroundOnBrand),\n ':hover': {\n color: tokens.colorNeutralForegroundOnBrand,\n ...shorthands.borderColor(tokens.colorNeutralForegroundOnBrand),\n backgroundColor: tokens.colorBrandBackgroundHover,\n },\n ':hover:active': {\n color: tokens.colorNeutralForegroundOnBrand,\n ...shorthands.borderColor(tokens.colorNeutralForegroundOnBrand),\n backgroundColor: tokens.colorBrandBackgroundPressed,\n },\n },\n});\n\n/**\n * Apply styling to the TeachingPopoverCarouselFooterButton slots based on the state\n */\nexport const useTeachingPopoverCarouselFooterButtonStyles_unstable = (\n state: TeachingPopoverCarouselFooterButtonState,\n): TeachingPopoverCarouselFooterButtonState => {\n 'use no memo';\n\n const styles = useStyles();\n const { navType, popoverAppearance } = state;\n\n // Apply underlying fluent Button styles\n state = {\n ...state,\n ...useButtonStyles_unstable(state),\n };\n\n state.root.className = mergeClasses(\n teachingPopoverCarouselFooterButtonClassNames.root,\n styles.root,\n navType === 'prev' && popoverAppearance === 'brand' && styles.brandPrevious,\n navType === 'next' && popoverAppearance === 'brand' && styles.brandNext,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","useButtonStyles_unstable","teachingPopoverCarouselFooterButtonClassNames","root","useStyles","minWidth","brandNext","color","colorBrandForeground1","backgroundColor","colorNeutralForegroundOnBrand","borderColor","colorTransparentBackground","colorCompoundBrandForeground1Hover","colorCompoundBrandForeground1Pressed","brandPrevious","colorBrandBackground","colorBrandBackgroundHover","colorBrandBackgroundPressed","useTeachingPopoverCarouselFooterButtonStyles_unstable","state","styles","navType","popoverAppearance","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AAMtE,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,wBAAwB,QAAQ,yBAAyB;AAElE,OAAO,MAAMC,gDAA0G;IACrHC,MAAM;AACR,EAAE;AAEF,MAAMC,YAAYP,WAAW;IAC3BM,MAAM;QACJE,UAAU;IACZ;IACAC,WAAW;QACTC,OAAOP,OAAOQ,qBAAqB;QACnCC,iBAAiBT,OAAOU,6BAA6B;QACrD,GAAGX,WAAWY,WAAW,CAACX,OAAOY,0BAA0B,CAAC;QAC5D,UAAU;YACRL,OAAOP,OAAOa,kCAAkC;YAChDJ,iBAAiBT,OAAOU,6BAA6B;QACvD;QACA,iBAAiB;YACfH,OAAOP,OAAOc,oCAAoC;YAClDL,iBAAiBT,OAAOU,6BAA6B;QACvD;IACF;IACAK,eAAe;QACb,sDAAsD;QACtDR,OAAOP,OAAOU,6BAA6B;QAC3CD,iBAAiBT,OAAOgB,oBAAoB;QAC5C,GAAGjB,WAAWY,WAAW,CAACX,OAAOU,6BAA6B,CAAC;QAC/D,UAAU;YACRH,OAAOP,OAAOU,6BAA6B;YAC3C,GAAGX,WAAWY,WAAW,CAACX,OAAOU,6BAA6B,CAAC;YAC/DD,iBAAiBT,OAAOiB,yBAAyB;QACnD;QACA,iBAAiB;YACfV,OAAOP,OAAOU,6BAA6B;YAC3C,GAAGX,WAAWY,WAAW,CAACX,OAAOU,6BAA6B,CAAC;YAC/DD,iBAAiBT,OAAOkB,2BAA2B;QACrD;IACF;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,wDAAwD,CACnEC;IAEA;IAEA,MAAMC,SAASjB;IACf,MAAM,EAAEkB,OAAO,EAAEC,iBAAiB,EAAE,GAAGH;IAEvC,wCAAwC;IACxCA,QAAQ;QACN,GAAGA,KAAK;QACR,GAAGnB,yBAAyBmB,MAAM;IACpC;IAEAA,MAAMjB,IAAI,CAACqB,SAAS,GAAG1B,aACrBI,8CAA8CC,IAAI,EAClDkB,OAAOlB,IAAI,EACXmB,YAAY,UAAUC,sBAAsB,WAAWF,OAAON,aAAa,EAC3EO,YAAY,UAAUC,sBAAsB,WAAWF,OAAOf,SAAS,EACvEc,MAAMjB,IAAI,CAACqB,SAAS;IAGtB,OAAOJ;AACT,EAAE"}
|
package/lib/components/TeachingPopoverCarouselNav/useTeachingPopoverCarouselNavStyles.styles.raw.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { makeStyles, mergeClasses, shorthands } from '@griffel/react';
|
|
2
|
+
import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';
|
|
3
|
+
import { tokens } from '@fluentui/react-theme';
|
|
4
|
+
export const teachingPopoverCarouselNavClassNames = {
|
|
5
|
+
root: 'fui-TeachingPopoverCarouselNav'
|
|
6
|
+
};
|
|
7
|
+
const useStyles = makeStyles({
|
|
8
|
+
root: {
|
|
9
|
+
display: 'flex',
|
|
10
|
+
flexDirection: 'row',
|
|
11
|
+
columnGap: tokens.spacingHorizontalXS,
|
|
12
|
+
alignItems: 'center',
|
|
13
|
+
justifyContent: 'center',
|
|
14
|
+
...createCustomFocusIndicatorStyle({
|
|
15
|
+
outline: `${tokens.strokeWidthThick} solid ${tokens.colorStrokeFocus2}`,
|
|
16
|
+
borderRadius: tokens.borderRadiusMedium,
|
|
17
|
+
...shorthands.borderColor('transparent')
|
|
18
|
+
})
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
/** Applies style classnames to slots */ export const useTeachingPopoverCarouselNavStyles_unstable = (state)=>{
|
|
22
|
+
'use no memo';
|
|
23
|
+
const styles = useStyles();
|
|
24
|
+
state.root.className = mergeClasses(teachingPopoverCarouselNavClassNames.root, styles.root, state.root.className);
|
|
25
|
+
return state;
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/TeachingPopoverCarouselNav/useTeachingPopoverCarouselNavStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type {\n TeachingPopoverCarouselNavSlots,\n TeachingPopoverCarouselNavState,\n} from './TeachingPopoverCarouselNav.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\n\nexport const teachingPopoverCarouselNavClassNames: SlotClassNames<TeachingPopoverCarouselNavSlots> = {\n root: 'fui-TeachingPopoverCarouselNav',\n};\n\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n columnGap: tokens.spacingHorizontalXS,\n alignItems: 'center',\n justifyContent: 'center',\n ...createCustomFocusIndicatorStyle({\n outline: `${tokens.strokeWidthThick} solid ${tokens.colorStrokeFocus2}`,\n borderRadius: tokens.borderRadiusMedium,\n ...shorthands.borderColor('transparent'),\n }),\n },\n});\n\n/** Applies style classnames to slots */\nexport const useTeachingPopoverCarouselNavStyles_unstable = (state: TeachingPopoverCarouselNavState) => {\n 'use no memo';\n\n const styles = useStyles();\n\n state.root.className = mergeClasses(teachingPopoverCarouselNavClassNames.root, styles.root, state.root.className);\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","shorthands","createCustomFocusIndicatorStyle","tokens","teachingPopoverCarouselNavClassNames","root","useStyles","display","flexDirection","columnGap","spacingHorizontalXS","alignItems","justifyContent","outline","strokeWidthThick","colorStrokeFocus2","borderRadius","borderRadiusMedium","borderColor","useTeachingPopoverCarouselNavStyles_unstable","state","styles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AAMtE,SAASC,+BAA+B,QAAQ,0BAA0B;AAC1E,SAASC,MAAM,QAAQ,wBAAwB;AAE/C,OAAO,MAAMC,uCAAwF;IACnGC,MAAM;AACR,EAAE;AAEF,MAAMC,YAAYP,WAAW;IAC3BM,MAAM;QACJE,SAAS;QACTC,eAAe;QACfC,WAAWN,OAAOO,mBAAmB;QACrCC,YAAY;QACZC,gBAAgB;QAChB,GAAGV,gCAAgC;YACjCW,SAAS,CAAC,EAAEV,OAAOW,gBAAgB,CAAC,OAAO,EAAEX,OAAOY,iBAAiB,CAAC,CAAC;YACvEC,cAAcb,OAAOc,kBAAkB;YACvC,GAAGhB,WAAWiB,WAAW,CAAC,cAAc;QAC1C,EAAE;IACJ;AACF;AAEA,sCAAsC,GACtC,OAAO,MAAMC,+CAA+C,CAACC;IAC3D;IAEA,MAAMC,SAASf;IAEfc,MAAMf,IAAI,CAACiB,SAAS,GAAGtB,aAAaI,qCAAqCC,IAAI,EAAEgB,OAAOhB,IAAI,EAAEe,MAAMf,IAAI,CAACiB,SAAS;IAEhH,OAAOF;AACT,EAAE"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { makeStyles, mergeClasses, shorthands } from '@griffel/react';
|
|
2
|
+
import { tokens } from '@fluentui/react-theme';
|
|
3
|
+
import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';
|
|
4
|
+
export const teachingPopoverCarouselNavButtonClassNames = {
|
|
5
|
+
root: 'fui-TeachingPopoverCarouselNavButton'
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Styles for the root slot
|
|
9
|
+
*/ const useStyles = makeStyles({
|
|
10
|
+
root: {
|
|
11
|
+
display: 'flex',
|
|
12
|
+
cursor: 'pointer',
|
|
13
|
+
boxSizing: 'border-box',
|
|
14
|
+
height: '8px',
|
|
15
|
+
width: '8px',
|
|
16
|
+
backgroundColor: tokens.colorBrandBackground
|
|
17
|
+
},
|
|
18
|
+
rootUnselected: {
|
|
19
|
+
border: 'none',
|
|
20
|
+
borderRadius: '50%',
|
|
21
|
+
padding: '0px',
|
|
22
|
+
outline: `${tokens.strokeWidthThin} solid transparent`,
|
|
23
|
+
...createCustomFocusIndicatorStyle({
|
|
24
|
+
outline: `${tokens.strokeWidthThick} solid ${tokens.colorStrokeFocus2}`,
|
|
25
|
+
borderRadius: tokens.borderRadiusMedium,
|
|
26
|
+
...shorthands.borderColor('transparent')
|
|
27
|
+
}),
|
|
28
|
+
backgroundColor: `color-mix(in srgb, ${tokens.colorBrandBackground} 30%, transparent)`,
|
|
29
|
+
'@supports not (color: color-mix(in lch, white, black))': {
|
|
30
|
+
// This will also affect the focus border, but only in older unsupported browsers
|
|
31
|
+
opacity: 0.3,
|
|
32
|
+
backgroundColor: tokens.colorBrandBackground
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
rootSelected: {
|
|
36
|
+
outline: `${tokens.strokeWidthThin} solid transparent`,
|
|
37
|
+
width: '16px',
|
|
38
|
+
border: 'none',
|
|
39
|
+
borderRadius: '4px',
|
|
40
|
+
padding: '0px',
|
|
41
|
+
...createCustomFocusIndicatorStyle({
|
|
42
|
+
outline: `${tokens.strokeWidthThick} solid ${tokens.colorStrokeFocus2}`,
|
|
43
|
+
borderRadius: tokens.borderRadiusMedium,
|
|
44
|
+
...shorthands.borderColor('transparent')
|
|
45
|
+
}),
|
|
46
|
+
'@media (forced-colors: active)': {
|
|
47
|
+
backgroundColor: 'CanvasText'
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
rootBrand: {
|
|
51
|
+
backgroundColor: tokens.colorNeutralForegroundOnBrand
|
|
52
|
+
},
|
|
53
|
+
rootBrandUnselected: {
|
|
54
|
+
backgroundColor: `color-mix(in srgb, ${tokens.colorNeutralForegroundOnBrand} 30%, transparent)`,
|
|
55
|
+
'@supports not (color: color-mix(in lch, white, black))': {
|
|
56
|
+
// This will also affect the focus border, but only in older unsupported browsers
|
|
57
|
+
opacity: 0.3,
|
|
58
|
+
backgroundColor: tokens.colorBrandBackground
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
/**
|
|
63
|
+
* Apply styling to the TeachingPopoverCarouselNavButton slots based on the state
|
|
64
|
+
*/ export const useTeachingPopoverCarouselNavButtonStyles_unstable = (state)=>{
|
|
65
|
+
'use no memo';
|
|
66
|
+
const styles = useStyles();
|
|
67
|
+
const { appearance, isSelected } = state;
|
|
68
|
+
const brandStyles = isSelected ? styles.rootBrand : styles.rootBrandUnselected;
|
|
69
|
+
state.root.className = mergeClasses(teachingPopoverCarouselNavButtonClassNames.root, styles.root, isSelected ? styles.rootSelected : styles.rootUnselected, appearance === 'brand' && brandStyles, state.root.className);
|
|
70
|
+
return state;
|
|
71
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/TeachingPopoverCarouselNavButton/useTeachingPopoverCarouselNavButtonStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type {\n TeachingPopoverCarouselNavButtonSlots,\n TeachingPopoverCarouselNavButtonState,\n} from './TeachingPopoverCarouselNavButton.types';\nimport { tokens } from '@fluentui/react-theme';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\n\nexport const teachingPopoverCarouselNavButtonClassNames: SlotClassNames<TeachingPopoverCarouselNavButtonSlots> = {\n root: 'fui-TeachingPopoverCarouselNavButton',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n cursor: 'pointer',\n boxSizing: 'border-box',\n height: '8px',\n width: '8px',\n backgroundColor: tokens.colorBrandBackground,\n },\n rootUnselected: {\n border: 'none',\n borderRadius: '50%',\n padding: '0px',\n outline: `${tokens.strokeWidthThin} solid transparent`, // For high contrast\n ...createCustomFocusIndicatorStyle({\n outline: `${tokens.strokeWidthThick} solid ${tokens.colorStrokeFocus2}`,\n borderRadius: tokens.borderRadiusMedium,\n ...shorthands.borderColor('transparent'),\n }),\n backgroundColor: `color-mix(in srgb, ${tokens.colorBrandBackground} 30%, transparent)`,\n '@supports not (color: color-mix(in lch, white, black))': {\n // This will also affect the focus border, but only in older unsupported browsers\n opacity: 0.3,\n backgroundColor: tokens.colorBrandBackground,\n },\n },\n rootSelected: {\n outline: `${tokens.strokeWidthThin} solid transparent`, // For high contrast\n width: '16px',\n border: 'none',\n borderRadius: '4px',\n padding: '0px',\n ...createCustomFocusIndicatorStyle({\n outline: `${tokens.strokeWidthThick} solid ${tokens.colorStrokeFocus2}`,\n borderRadius: tokens.borderRadiusMedium,\n ...shorthands.borderColor('transparent'),\n }),\n '@media (forced-colors: active)': {\n backgroundColor: 'CanvasText',\n },\n },\n rootBrand: {\n backgroundColor: tokens.colorNeutralForegroundOnBrand,\n },\n rootBrandUnselected: {\n backgroundColor: `color-mix(in srgb, ${tokens.colorNeutralForegroundOnBrand} 30%, transparent)`,\n '@supports not (color: color-mix(in lch, white, black))': {\n // This will also affect the focus border, but only in older unsupported browsers\n opacity: 0.3,\n backgroundColor: tokens.colorBrandBackground,\n },\n },\n});\n\n/**\n * Apply styling to the TeachingPopoverCarouselNavButton slots based on the state\n */\nexport const useTeachingPopoverCarouselNavButtonStyles_unstable = (\n state: TeachingPopoverCarouselNavButtonState,\n): TeachingPopoverCarouselNavButtonState => {\n 'use no memo';\n\n const styles = useStyles();\n const { appearance, isSelected } = state;\n\n const brandStyles = isSelected ? styles.rootBrand : styles.rootBrandUnselected;\n\n state.root.className = mergeClasses(\n teachingPopoverCarouselNavButtonClassNames.root,\n styles.root,\n isSelected ? styles.rootSelected : styles.rootUnselected,\n appearance === 'brand' && brandStyles,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","createCustomFocusIndicatorStyle","teachingPopoverCarouselNavButtonClassNames","root","useStyles","display","cursor","boxSizing","height","width","backgroundColor","colorBrandBackground","rootUnselected","border","borderRadius","padding","outline","strokeWidthThin","strokeWidthThick","colorStrokeFocus2","borderRadiusMedium","borderColor","opacity","rootSelected","rootBrand","colorNeutralForegroundOnBrand","rootBrandUnselected","useTeachingPopoverCarouselNavButtonStyles_unstable","state","styles","appearance","isSelected","brandStyles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AAMtE,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,+BAA+B,QAAQ,0BAA0B;AAE1E,OAAO,MAAMC,6CAAoG;IAC/GC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYP,WAAW;IAC3BM,MAAM;QACJE,SAAS;QACTC,QAAQ;QACRC,WAAW;QACXC,QAAQ;QACRC,OAAO;QACPC,iBAAiBV,OAAOW,oBAAoB;IAC9C;IACAC,gBAAgB;QACdC,QAAQ;QACRC,cAAc;QACdC,SAAS;QACTC,SAAS,CAAC,EAAEhB,OAAOiB,eAAe,CAAC,kBAAkB,CAAC;QACtD,GAAGhB,gCAAgC;YACjCe,SAAS,CAAC,EAAEhB,OAAOkB,gBAAgB,CAAC,OAAO,EAAElB,OAAOmB,iBAAiB,CAAC,CAAC;YACvEL,cAAcd,OAAOoB,kBAAkB;YACvC,GAAGrB,WAAWsB,WAAW,CAAC,cAAc;QAC1C,EAAE;QACFX,iBAAiB,CAAC,mBAAmB,EAAEV,OAAOW,oBAAoB,CAAC,kBAAkB,CAAC;QACtF,0DAA0D;YACxD,iFAAiF;YACjFW,SAAS;YACTZ,iBAAiBV,OAAOW,oBAAoB;QAC9C;IACF;IACAY,cAAc;QACZP,SAAS,CAAC,EAAEhB,OAAOiB,eAAe,CAAC,kBAAkB,CAAC;QACtDR,OAAO;QACPI,QAAQ;QACRC,cAAc;QACdC,SAAS;QACT,GAAGd,gCAAgC;YACjCe,SAAS,CAAC,EAAEhB,OAAOkB,gBAAgB,CAAC,OAAO,EAAElB,OAAOmB,iBAAiB,CAAC,CAAC;YACvEL,cAAcd,OAAOoB,kBAAkB;YACvC,GAAGrB,WAAWsB,WAAW,CAAC,cAAc;QAC1C,EAAE;QACF,kCAAkC;YAChCX,iBAAiB;QACnB;IACF;IACAc,WAAW;QACTd,iBAAiBV,OAAOyB,6BAA6B;IACvD;IACAC,qBAAqB;QACnBhB,iBAAiB,CAAC,mBAAmB,EAAEV,OAAOyB,6BAA6B,CAAC,kBAAkB,CAAC;QAC/F,0DAA0D;YACxD,iFAAiF;YACjFH,SAAS;YACTZ,iBAAiBV,OAAOW,oBAAoB;QAC9C;IACF;AACF;AAEA;;CAEC,GACD,OAAO,MAAMgB,qDAAqD,CAChEC;IAEA;IAEA,MAAMC,SAASzB;IACf,MAAM,EAAE0B,UAAU,EAAEC,UAAU,EAAE,GAAGH;IAEnC,MAAMI,cAAcD,aAAaF,OAAOL,SAAS,GAAGK,OAAOH,mBAAmB;IAE9EE,MAAMzB,IAAI,CAAC8B,SAAS,GAAGnC,aACrBI,2CAA2CC,IAAI,EAC/C0B,OAAO1B,IAAI,EACX4B,aAAaF,OAAON,YAAY,GAAGM,OAAOjB,cAAc,EACxDkB,eAAe,WAAWE,aAC1BJ,MAAMzB,IAAI,CAAC8B,SAAS;IAGtB,OAAOL;AACT,EAAE"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { makeStyles, mergeClasses } from '@griffel/react';
|
|
2
|
+
export const teachingPopoverCarouselPageCountClassNames = {
|
|
3
|
+
root: 'fui-TeachingPopoverCarouselPageCount'
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Styles for the root slot
|
|
7
|
+
*/ const useStyles = makeStyles({
|
|
8
|
+
root: {
|
|
9
|
+
display: 'flex',
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
justifyContent: 'center'
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
/**
|
|
15
|
+
* Apply styling to the TeachingPopoverCarouselPageCount slots based on the state
|
|
16
|
+
*/ export const useTeachingPopoverCarouselPageCountStyles_unstable = (state)=>{
|
|
17
|
+
'use no memo';
|
|
18
|
+
const styles = useStyles();
|
|
19
|
+
state.root.className = mergeClasses(teachingPopoverCarouselPageCountClassNames.root, styles.root, state.root.className);
|
|
20
|
+
return state;
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/TeachingPopoverCarouselPageCount/useTeachingPopoverCarouselPageCountStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type {\n TeachingPopoverCarouselPageCountSlots,\n TeachingPopoverCarouselPageCountState,\n} from './TeachingPopoverCarouselPageCount.types';\n\nexport const teachingPopoverCarouselPageCountClassNames: SlotClassNames<TeachingPopoverCarouselPageCountSlots> = {\n root: 'fui-TeachingPopoverCarouselPageCount',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n});\n\n/**\n * Apply styling to the TeachingPopoverCarouselPageCount slots based on the state\n */\nexport const useTeachingPopoverCarouselPageCountStyles_unstable = (\n state: TeachingPopoverCarouselPageCountState,\n): TeachingPopoverCarouselPageCountState => {\n 'use no memo';\n\n const styles = useStyles();\n state.root.className = mergeClasses(\n teachingPopoverCarouselPageCountClassNames.root,\n styles.root,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","teachingPopoverCarouselPageCountClassNames","root","useStyles","display","alignItems","justifyContent","useTeachingPopoverCarouselPageCountStyles_unstable","state","styles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAO1D,OAAO,MAAMC,6CAAoG;IAC/GC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYJ,WAAW;IAC3BG,MAAM;QACJE,SAAS;QACTC,YAAY;QACZC,gBAAgB;IAClB;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,qDAAqD,CAChEC;IAEA;IAEA,MAAMC,SAASN;IACfK,MAAMN,IAAI,CAACQ,SAAS,GAAGV,aACrBC,2CAA2CC,IAAI,EAC/CO,OAAOP,IAAI,EACXM,MAAMN,IAAI,CAACQ,SAAS;IAGtB,OAAOF;AACT,EAAE"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { makeStyles, mergeClasses, shorthands } from '@griffel/react';
|
|
2
|
+
import { tokens } from '@fluentui/react-theme';
|
|
3
|
+
export const teachingPopoverFooterClassNames = {
|
|
4
|
+
root: 'fui-TeachingPopoverFooter',
|
|
5
|
+
primary: 'fui-TeachingPopoverFooter__primary',
|
|
6
|
+
secondary: 'fui-TeachingPopoverFooter__secondary'
|
|
7
|
+
};
|
|
8
|
+
const useStyles = makeStyles({
|
|
9
|
+
root: {
|
|
10
|
+
display: 'flex',
|
|
11
|
+
gap: '8px',
|
|
12
|
+
paddingTop: '12px'
|
|
13
|
+
},
|
|
14
|
+
rootVertical: {
|
|
15
|
+
flexDirection: 'column'
|
|
16
|
+
},
|
|
17
|
+
rootHorizontal: {
|
|
18
|
+
flexDirection: 'row',
|
|
19
|
+
justifyContent: 'flex-end'
|
|
20
|
+
},
|
|
21
|
+
buttonRootVertical: {
|
|
22
|
+
width: 'auto',
|
|
23
|
+
borderRadius: '4px'
|
|
24
|
+
},
|
|
25
|
+
buttonRootHorizontal: {
|
|
26
|
+
minWidth: '96px',
|
|
27
|
+
borderRadius: '4px'
|
|
28
|
+
},
|
|
29
|
+
brandSecondary: {
|
|
30
|
+
...shorthands.borderColor(tokens.colorNeutralForegroundOnBrand)
|
|
31
|
+
},
|
|
32
|
+
brandPrimary: {
|
|
33
|
+
color: tokens.colorBrandForeground1,
|
|
34
|
+
backgroundColor: tokens.colorNeutralForegroundOnBrand,
|
|
35
|
+
':hover': {
|
|
36
|
+
color: tokens.colorCompoundBrandForeground1Hover,
|
|
37
|
+
backgroundColor: tokens.colorNeutralForegroundOnBrand
|
|
38
|
+
},
|
|
39
|
+
':hover:active': {
|
|
40
|
+
color: tokens.colorCompoundBrandForeground1Pressed,
|
|
41
|
+
backgroundColor: tokens.colorNeutralForegroundOnBrand
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
/** Applies style classnames to slots */ export const useTeachingPopoverFooterStyles_unstable = (state)=>{
|
|
46
|
+
'use no memo';
|
|
47
|
+
const styles = useStyles();
|
|
48
|
+
const { appearance, footerLayout } = state;
|
|
49
|
+
state.root.className = mergeClasses(teachingPopoverFooterClassNames.root, styles.root, footerLayout === 'horizontal' ? styles.rootHorizontal : styles.rootVertical, state.root.className);
|
|
50
|
+
if (state.secondary) {
|
|
51
|
+
state.secondary.className = mergeClasses(teachingPopoverFooterClassNames.secondary, footerLayout === 'horizontal' ? styles.buttonRootHorizontal : styles.buttonRootVertical, appearance === 'brand' ? styles.brandSecondary : undefined, state.secondary.className);
|
|
52
|
+
}
|
|
53
|
+
state.primary.className = mergeClasses(teachingPopoverFooterClassNames.primary, footerLayout === 'horizontal' ? styles.buttonRootHorizontal : styles.buttonRootVertical, appearance === 'brand' ? styles.brandPrimary : undefined, state.primary.className);
|
|
54
|
+
return state;
|
|
55
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/TeachingPopoverFooter/useTeachingPopoverFooterStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { TeachingPopoverFooterSlots, TeachingPopoverFooterState } from './TeachingPopoverFooter.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\n\nexport const teachingPopoverFooterClassNames: SlotClassNames<TeachingPopoverFooterSlots> = {\n root: 'fui-TeachingPopoverFooter',\n primary: 'fui-TeachingPopoverFooter__primary',\n secondary: 'fui-TeachingPopoverFooter__secondary',\n};\n\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n gap: '8px',\n paddingTop: '12px',\n },\n rootVertical: {\n flexDirection: 'column',\n },\n rootHorizontal: {\n flexDirection: 'row',\n justifyContent: 'flex-end',\n },\n buttonRootVertical: {\n width: 'auto',\n borderRadius: '4px',\n },\n buttonRootHorizontal: {\n minWidth: '96px',\n borderRadius: '4px',\n },\n brandSecondary: {\n ...shorthands.borderColor(tokens.colorNeutralForegroundOnBrand),\n },\n brandPrimary: {\n color: tokens.colorBrandForeground1,\n backgroundColor: tokens.colorNeutralForegroundOnBrand,\n ':hover': {\n color: tokens.colorCompoundBrandForeground1Hover,\n backgroundColor: tokens.colorNeutralForegroundOnBrand,\n },\n ':hover:active': {\n color: tokens.colorCompoundBrandForeground1Pressed,\n backgroundColor: tokens.colorNeutralForegroundOnBrand,\n },\n },\n});\n\n/** Applies style classnames to slots */\nexport const useTeachingPopoverFooterStyles_unstable = (state: TeachingPopoverFooterState) => {\n 'use no memo';\n\n const styles = useStyles();\n const { appearance, footerLayout } = state;\n\n state.root.className = mergeClasses(\n teachingPopoverFooterClassNames.root,\n styles.root,\n footerLayout === 'horizontal' ? styles.rootHorizontal : styles.rootVertical,\n state.root.className,\n );\n if (state.secondary) {\n state.secondary.className = mergeClasses(\n teachingPopoverFooterClassNames.secondary,\n footerLayout === 'horizontal' ? styles.buttonRootHorizontal : styles.buttonRootVertical,\n appearance === 'brand' ? styles.brandSecondary : undefined,\n state.secondary.className,\n );\n }\n state.primary.className = mergeClasses(\n teachingPopoverFooterClassNames.primary,\n footerLayout === 'horizontal' ? styles.buttonRootHorizontal : styles.buttonRootVertical,\n appearance === 'brand' ? styles.brandPrimary : undefined,\n state.primary.className,\n );\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","teachingPopoverFooterClassNames","root","primary","secondary","useStyles","display","gap","paddingTop","rootVertical","flexDirection","rootHorizontal","justifyContent","buttonRootVertical","width","borderRadius","buttonRootHorizontal","minWidth","brandSecondary","borderColor","colorNeutralForegroundOnBrand","brandPrimary","color","colorBrandForeground1","backgroundColor","colorCompoundBrandForeground1Hover","colorCompoundBrandForeground1Pressed","useTeachingPopoverFooterStyles_unstable","state","styles","appearance","footerLayout","className","undefined"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AAGtE,SAASC,MAAM,QAAQ,wBAAwB;AAE/C,OAAO,MAAMC,kCAA8E;IACzFC,MAAM;IACNC,SAAS;IACTC,WAAW;AACb,EAAE;AAEF,MAAMC,YAAYR,WAAW;IAC3BK,MAAM;QACJI,SAAS;QACTC,KAAK;QACLC,YAAY;IACd;IACAC,cAAc;QACZC,eAAe;IACjB;IACAC,gBAAgB;QACdD,eAAe;QACfE,gBAAgB;IAClB;IACAC,oBAAoB;QAClBC,OAAO;QACPC,cAAc;IAChB;IACAC,sBAAsB;QACpBC,UAAU;QACVF,cAAc;IAChB;IACAG,gBAAgB;QACd,GAAGnB,WAAWoB,WAAW,CAACnB,OAAOoB,6BAA6B,CAAC;IACjE;IACAC,cAAc;QACZC,OAAOtB,OAAOuB,qBAAqB;QACnCC,iBAAiBxB,OAAOoB,6BAA6B;QACrD,UAAU;YACRE,OAAOtB,OAAOyB,kCAAkC;YAChDD,iBAAiBxB,OAAOoB,6BAA6B;QACvD;QACA,iBAAiB;YACfE,OAAOtB,OAAO0B,oCAAoC;YAClDF,iBAAiBxB,OAAOoB,6BAA6B;QACvD;IACF;AACF;AAEA,sCAAsC,GACtC,OAAO,MAAMO,0CAA0C,CAACC;IACtD;IAEA,MAAMC,SAASxB;IACf,MAAM,EAAEyB,UAAU,EAAEC,YAAY,EAAE,GAAGH;IAErCA,MAAM1B,IAAI,CAAC8B,SAAS,GAAGlC,aACrBG,gCAAgCC,IAAI,EACpC2B,OAAO3B,IAAI,EACX6B,iBAAiB,eAAeF,OAAOlB,cAAc,GAAGkB,OAAOpB,YAAY,EAC3EmB,MAAM1B,IAAI,CAAC8B,SAAS;IAEtB,IAAIJ,MAAMxB,SAAS,EAAE;QACnBwB,MAAMxB,SAAS,CAAC4B,SAAS,GAAGlC,aAC1BG,gCAAgCG,SAAS,EACzC2B,iBAAiB,eAAeF,OAAOb,oBAAoB,GAAGa,OAAOhB,kBAAkB,EACvFiB,eAAe,UAAUD,OAAOX,cAAc,GAAGe,WACjDL,MAAMxB,SAAS,CAAC4B,SAAS;IAE7B;IACAJ,MAAMzB,OAAO,CAAC6B,SAAS,GAAGlC,aACxBG,gCAAgCE,OAAO,EACvC4B,iBAAiB,eAAeF,OAAOb,oBAAoB,GAAGa,OAAOhB,kBAAkB,EACvFiB,eAAe,UAAUD,OAAOR,YAAY,GAAGY,WAC/CL,MAAMzB,OAAO,CAAC6B,SAAS;IAGzB,OAAOJ;AACT,EAAE"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { shorthands, makeStyles, mergeClasses } from '@griffel/react';
|
|
2
|
+
import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';
|
|
3
|
+
import { tokens, typographyStyles } from '@fluentui/react-theme';
|
|
4
|
+
export const teachingPopoverHeaderClassNames = {
|
|
5
|
+
root: 'fui-TeachingPopoverHeader',
|
|
6
|
+
dismissButton: 'fui-TeachingPopoverHeader__dismissButton',
|
|
7
|
+
icon: 'fui-TeachingPopoverHeader__icon'
|
|
8
|
+
};
|
|
9
|
+
const useStyles = makeStyles({
|
|
10
|
+
root: {
|
|
11
|
+
display: 'flex',
|
|
12
|
+
flexDirection: 'row',
|
|
13
|
+
color: tokens.colorNeutralForeground3,
|
|
14
|
+
fontWeight: tokens.fontWeightSemibold,
|
|
15
|
+
fontSize: tokens.fontSizeBase200,
|
|
16
|
+
lineHeight: tokens.lineHeightBase200,
|
|
17
|
+
paddingBottom: tokens.spacingVerticalXS,
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
marginTop: tokens.spacingHorizontalNone,
|
|
20
|
+
marginBottom: tokens.spacingHorizontalNone
|
|
21
|
+
},
|
|
22
|
+
rootBrand: {
|
|
23
|
+
color: tokens.colorNeutralForegroundOnBrand
|
|
24
|
+
},
|
|
25
|
+
dismissButton: {
|
|
26
|
+
color: tokens.colorNeutralForeground2,
|
|
27
|
+
position: 'relative',
|
|
28
|
+
border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,
|
|
29
|
+
display: 'flex',
|
|
30
|
+
alignItems: 'center',
|
|
31
|
+
cursor: 'pointer',
|
|
32
|
+
...typographyStyles.body1,
|
|
33
|
+
backgroundColor: tokens.colorTransparentBackground,
|
|
34
|
+
boxSizing: 'border-box',
|
|
35
|
+
borderTopRightRadius: tokens.borderRadiusNone,
|
|
36
|
+
borderBottomRightRadius: tokens.borderRadiusNone,
|
|
37
|
+
borderRightStyle: 'none',
|
|
38
|
+
marginInlineStart: 'auto',
|
|
39
|
+
padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS}`,
|
|
40
|
+
...createCustomFocusIndicatorStyle({
|
|
41
|
+
outline: `${tokens.strokeWidthThick} solid ${tokens.colorStrokeFocus2}`,
|
|
42
|
+
borderRadius: tokens.borderRadiusMedium,
|
|
43
|
+
...shorthands.borderColor('transparent')
|
|
44
|
+
})
|
|
45
|
+
},
|
|
46
|
+
dismissBrand: {
|
|
47
|
+
color: tokens.colorNeutralForegroundOnBrand
|
|
48
|
+
},
|
|
49
|
+
icon: {
|
|
50
|
+
height: tokens.fontSizeBase200,
|
|
51
|
+
width: tokens.fontSizeBase200,
|
|
52
|
+
lineHeight: tokens.lineHeightBase200,
|
|
53
|
+
fontSize: tokens.fontSizeBase200,
|
|
54
|
+
alignItems: 'center',
|
|
55
|
+
boxSizing: 'content-box',
|
|
56
|
+
display: 'inline-flex',
|
|
57
|
+
justifyContent: 'center',
|
|
58
|
+
textDecorationLine: 'none',
|
|
59
|
+
verticalAlign: 'middle',
|
|
60
|
+
position: 'relative',
|
|
61
|
+
backgroundColor: tokens.colorTransparentBackground,
|
|
62
|
+
color: tokens.colorNeutralForeground2,
|
|
63
|
+
marginInlineEnd: tokens.spacingHorizontalXS
|
|
64
|
+
},
|
|
65
|
+
iconBrand: {
|
|
66
|
+
color: tokens.colorNeutralForegroundOnBrand
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
/** Applies style classnames to slots */ export const useTeachingPopoverHeaderStyles_unstable = (state)=>{
|
|
70
|
+
'use no memo';
|
|
71
|
+
const styles = useStyles();
|
|
72
|
+
const { appearance } = state;
|
|
73
|
+
state.root.className = mergeClasses(teachingPopoverHeaderClassNames.root, styles.root, appearance === 'brand' && styles.rootBrand, state.root.className);
|
|
74
|
+
if (state.dismissButton) {
|
|
75
|
+
state.dismissButton.className = mergeClasses(teachingPopoverHeaderClassNames.dismissButton, styles.dismissButton, appearance === 'brand' ? styles.dismissBrand : undefined, state.dismissButton.className);
|
|
76
|
+
}
|
|
77
|
+
if (state.icon) {
|
|
78
|
+
state.icon.className = mergeClasses(teachingPopoverHeaderClassNames.icon, styles.icon, appearance === 'brand' ? styles.iconBrand : undefined, state.icon.className);
|
|
79
|
+
}
|
|
80
|
+
return state;
|
|
81
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/TeachingPopoverHeader/useTeachingPopoverHeaderStyles.styles.ts"],"sourcesContent":["import { shorthands, makeStyles, mergeClasses } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport type { TeachingPopoverHeaderSlots, TeachingPopoverHeaderState } from './TeachingPopoverHeader.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const teachingPopoverHeaderClassNames: SlotClassNames<TeachingPopoverHeaderSlots> = {\n root: 'fui-TeachingPopoverHeader',\n dismissButton: 'fui-TeachingPopoverHeader__dismissButton',\n icon: 'fui-TeachingPopoverHeader__icon',\n};\n\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n color: tokens.colorNeutralForeground3,\n fontWeight: tokens.fontWeightSemibold,\n fontSize: tokens.fontSizeBase200,\n lineHeight: tokens.lineHeightBase200,\n paddingBottom: tokens.spacingVerticalXS,\n alignItems: 'center',\n marginTop: tokens.spacingHorizontalNone,\n marginBottom: tokens.spacingHorizontalNone,\n },\n rootBrand: {\n color: tokens.colorNeutralForegroundOnBrand,\n },\n dismissButton: {\n color: tokens.colorNeutralForeground2,\n position: 'relative',\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n display: 'flex',\n alignItems: 'center',\n cursor: 'pointer',\n ...typographyStyles.body1,\n backgroundColor: tokens.colorTransparentBackground,\n boxSizing: 'border-box',\n borderTopRightRadius: tokens.borderRadiusNone,\n borderBottomRightRadius: tokens.borderRadiusNone,\n borderRightStyle: 'none',\n marginInlineStart: 'auto',\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS}`,\n ...createCustomFocusIndicatorStyle({\n outline: `${tokens.strokeWidthThick} solid ${tokens.colorStrokeFocus2}`,\n borderRadius: tokens.borderRadiusMedium,\n ...shorthands.borderColor('transparent'),\n }),\n },\n dismissBrand: {\n color: tokens.colorNeutralForegroundOnBrand,\n },\n icon: {\n height: tokens.fontSizeBase200,\n width: tokens.fontSizeBase200,\n lineHeight: tokens.lineHeightBase200,\n fontSize: tokens.fontSizeBase200,\n alignItems: 'center',\n boxSizing: 'content-box',\n display: 'inline-flex',\n justifyContent: 'center',\n textDecorationLine: 'none',\n verticalAlign: 'middle',\n position: 'relative',\n backgroundColor: tokens.colorTransparentBackground,\n color: tokens.colorNeutralForeground2,\n marginInlineEnd: tokens.spacingHorizontalXS,\n },\n iconBrand: {\n color: tokens.colorNeutralForegroundOnBrand,\n },\n});\n\n/** Applies style classnames to slots */\nexport const useTeachingPopoverHeaderStyles_unstable = (state: TeachingPopoverHeaderState) => {\n 'use no memo';\n\n const styles = useStyles();\n const { appearance } = state;\n\n state.root.className = mergeClasses(\n teachingPopoverHeaderClassNames.root,\n styles.root,\n appearance === 'brand' && styles.rootBrand,\n state.root.className,\n );\n\n if (state.dismissButton) {\n state.dismissButton.className = mergeClasses(\n teachingPopoverHeaderClassNames.dismissButton,\n styles.dismissButton,\n appearance === 'brand' ? styles.dismissBrand : undefined,\n state.dismissButton.className,\n );\n }\n\n if (state.icon) {\n state.icon.className = mergeClasses(\n teachingPopoverHeaderClassNames.icon,\n styles.icon,\n appearance === 'brand' ? styles.iconBrand : undefined,\n state.icon.className,\n );\n }\n return state;\n};\n"],"names":["shorthands","makeStyles","mergeClasses","createCustomFocusIndicatorStyle","tokens","typographyStyles","teachingPopoverHeaderClassNames","root","dismissButton","icon","useStyles","display","flexDirection","color","colorNeutralForeground3","fontWeight","fontWeightSemibold","fontSize","fontSizeBase200","lineHeight","lineHeightBase200","paddingBottom","spacingVerticalXS","alignItems","marginTop","spacingHorizontalNone","marginBottom","rootBrand","colorNeutralForegroundOnBrand","colorNeutralForeground2","position","border","strokeWidthThin","colorTransparentStroke","cursor","body1","backgroundColor","colorTransparentBackground","boxSizing","borderTopRightRadius","borderRadiusNone","borderBottomRightRadius","borderRightStyle","marginInlineStart","padding","spacingHorizontalXS","outline","strokeWidthThick","colorStrokeFocus2","borderRadius","borderRadiusMedium","borderColor","dismissBrand","height","width","justifyContent","textDecorationLine","verticalAlign","marginInlineEnd","iconBrand","useTeachingPopoverHeaderStyles_unstable","state","styles","appearance","className","undefined"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AACtE,SAASC,+BAA+B,QAAQ,0BAA0B;AAC1E,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,wBAAwB;AAIjE,OAAO,MAAMC,kCAA8E;IACzFC,MAAM;IACNC,eAAe;IACfC,MAAM;AACR,EAAE;AAEF,MAAMC,YAAYT,WAAW;IAC3BM,MAAM;QACJI,SAAS;QACTC,eAAe;QACfC,OAAOT,OAAOU,uBAAuB;QACrCC,YAAYX,OAAOY,kBAAkB;QACrCC,UAAUb,OAAOc,eAAe;QAChCC,YAAYf,OAAOgB,iBAAiB;QACpCC,eAAejB,OAAOkB,iBAAiB;QACvCC,YAAY;QACZC,WAAWpB,OAAOqB,qBAAqB;QACvCC,cAActB,OAAOqB,qBAAqB;IAC5C;IACAE,WAAW;QACTd,OAAOT,OAAOwB,6BAA6B;IAC7C;IACApB,eAAe;QACbK,OAAOT,OAAOyB,uBAAuB;QACrCC,UAAU;QACVC,QAAQ,CAAC,EAAE3B,OAAO4B,eAAe,CAAC,OAAO,EAAE5B,OAAO6B,sBAAsB,CAAC,CAAC;QAC1EtB,SAAS;QACTY,YAAY;QACZW,QAAQ;QACR,GAAG7B,iBAAiB8B,KAAK;QACzBC,iBAAiBhC,OAAOiC,0BAA0B;QAClDC,WAAW;QACXC,sBAAsBnC,OAAOoC,gBAAgB;QAC7CC,yBAAyBrC,OAAOoC,gBAAgB;QAChDE,kBAAkB;QAClBC,mBAAmB;QACnBC,SAAS,CAAC,EAAExC,OAAOkB,iBAAiB,CAAC,CAAC,EAAElB,OAAOyC,mBAAmB,CAAC,CAAC;QACpE,GAAG1C,gCAAgC;YACjC2C,SAAS,CAAC,EAAE1C,OAAO2C,gBAAgB,CAAC,OAAO,EAAE3C,OAAO4C,iBAAiB,CAAC,CAAC;YACvEC,cAAc7C,OAAO8C,kBAAkB;YACvC,GAAGlD,WAAWmD,WAAW,CAAC,cAAc;QAC1C,EAAE;IACJ;IACAC,cAAc;QACZvC,OAAOT,OAAOwB,6BAA6B;IAC7C;IACAnB,MAAM;QACJ4C,QAAQjD,OAAOc,eAAe;QAC9BoC,OAAOlD,OAAOc,eAAe;QAC7BC,YAAYf,OAAOgB,iBAAiB;QACpCH,UAAUb,OAAOc,eAAe;QAChCK,YAAY;QACZe,WAAW;QACX3B,SAAS;QACT4C,gBAAgB;QAChBC,oBAAoB;QACpBC,eAAe;QACf3B,UAAU;QACVM,iBAAiBhC,OAAOiC,0BAA0B;QAClDxB,OAAOT,OAAOyB,uBAAuB;QACrC6B,iBAAiBtD,OAAOyC,mBAAmB;IAC7C;IACAc,WAAW;QACT9C,OAAOT,OAAOwB,6BAA6B;IAC7C;AACF;AAEA,sCAAsC,GACtC,OAAO,MAAMgC,0CAA0C,CAACC;IACtD;IAEA,MAAMC,SAASpD;IACf,MAAM,EAAEqD,UAAU,EAAE,GAAGF;IAEvBA,MAAMtD,IAAI,CAACyD,SAAS,GAAG9D,aACrBI,gCAAgCC,IAAI,EACpCuD,OAAOvD,IAAI,EACXwD,eAAe,WAAWD,OAAOnC,SAAS,EAC1CkC,MAAMtD,IAAI,CAACyD,SAAS;IAGtB,IAAIH,MAAMrD,aAAa,EAAE;QACvBqD,MAAMrD,aAAa,CAACwD,SAAS,GAAG9D,aAC9BI,gCAAgCE,aAAa,EAC7CsD,OAAOtD,aAAa,EACpBuD,eAAe,UAAUD,OAAOV,YAAY,GAAGa,WAC/CJ,MAAMrD,aAAa,CAACwD,SAAS;IAEjC;IAEA,IAAIH,MAAMpD,IAAI,EAAE;QACdoD,MAAMpD,IAAI,CAACuD,SAAS,GAAG9D,aACrBI,gCAAgCG,IAAI,EACpCqD,OAAOrD,IAAI,EACXsD,eAAe,UAAUD,OAAOH,SAAS,GAAGM,WAC5CJ,MAAMpD,IAAI,CAACuD,SAAS;IAExB;IACA,OAAOH;AACT,EAAE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { makeStyles, mergeClasses } from '@griffel/react';
|
|
2
|
+
import { usePopoverSurfaceStyles_unstable } from '@fluentui/react-popover';
|
|
3
|
+
import { tokens } from '@fluentui/react-theme';
|
|
4
|
+
export const teachingPopoverSurfaceClassNames = {
|
|
5
|
+
root: 'fui-TeachingPopoverSurface'
|
|
6
|
+
};
|
|
7
|
+
const useStyles = makeStyles({
|
|
8
|
+
root: {
|
|
9
|
+
padding: `${tokens.spacingVerticalL} ${tokens.spacingVerticalL}`,
|
|
10
|
+
borderRadius: tokens.borderRadiusXLarge,
|
|
11
|
+
minWidth: '320px',
|
|
12
|
+
boxSizing: 'border-box'
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
/**
|
|
16
|
+
* Apply styling to the TeachingPopoverSurface slots based on the state
|
|
17
|
+
*/ export const useTeachingPopoverSurfaceStyles_unstable = (state)=>{
|
|
18
|
+
'use no memo';
|
|
19
|
+
const styles = useStyles();
|
|
20
|
+
// Make sure to merge teaching bubble surface prior to popover styles
|
|
21
|
+
state.root.className = mergeClasses(teachingPopoverSurfaceClassNames.root, styles.root, state.root.className);
|
|
22
|
+
const updatedState = usePopoverSurfaceStyles_unstable(state);
|
|
23
|
+
return updatedState;
|
|
24
|
+
};
|
package/lib/components/TeachingPopoverSurface/useTeachingPopoverSurfaceStyles.styles.raw.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/TeachingPopoverSurface/useTeachingPopoverSurfaceStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { TeachingPopoverSurfaceSlots, TeachingPopoverSurfaceState } from './TeachingPopoverSurface.types';\nimport { usePopoverSurfaceStyles_unstable } from '@fluentui/react-popover';\nimport { tokens } from '@fluentui/react-theme';\n\nexport const teachingPopoverSurfaceClassNames: SlotClassNames<TeachingPopoverSurfaceSlots> = {\n root: 'fui-TeachingPopoverSurface',\n};\n\nconst useStyles = makeStyles({\n root: {\n padding: `${tokens.spacingVerticalL} ${tokens.spacingVerticalL}`,\n borderRadius: tokens.borderRadiusXLarge,\n minWidth: '320px',\n boxSizing: 'border-box',\n },\n});\n\n/**\n * Apply styling to the TeachingPopoverSurface slots based on the state\n */\nexport const useTeachingPopoverSurfaceStyles_unstable = (\n state: TeachingPopoverSurfaceState,\n): TeachingPopoverSurfaceState => {\n 'use no memo';\n\n const styles = useStyles();\n\n // Make sure to merge teaching bubble surface prior to popover styles\n state.root.className = mergeClasses(teachingPopoverSurfaceClassNames.root, styles.root, state.root.className);\n\n const updatedState = usePopoverSurfaceStyles_unstable(state);\n\n return updatedState;\n};\n"],"names":["makeStyles","mergeClasses","usePopoverSurfaceStyles_unstable","tokens","teachingPopoverSurfaceClassNames","root","useStyles","padding","spacingVerticalL","borderRadius","borderRadiusXLarge","minWidth","boxSizing","useTeachingPopoverSurfaceStyles_unstable","state","styles","className","updatedState"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAG1D,SAASC,gCAAgC,QAAQ,0BAA0B;AAC3E,SAASC,MAAM,QAAQ,wBAAwB;AAE/C,OAAO,MAAMC,mCAAgF;IAC3FC,MAAM;AACR,EAAE;AAEF,MAAMC,YAAYN,WAAW;IAC3BK,MAAM;QACJE,SAAS,CAAC,EAAEJ,OAAOK,gBAAgB,CAAC,CAAC,EAAEL,OAAOK,gBAAgB,CAAC,CAAC;QAChEC,cAAcN,OAAOO,kBAAkB;QACvCC,UAAU;QACVC,WAAW;IACb;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,2CAA2C,CACtDC;IAEA;IAEA,MAAMC,SAAST;IAEf,qEAAqE;IACrEQ,MAAMT,IAAI,CAACW,SAAS,GAAGf,aAAaG,iCAAiCC,IAAI,EAAEU,OAAOV,IAAI,EAAES,MAAMT,IAAI,CAACW,SAAS;IAE5G,MAAMC,eAAef,iCAAiCY;IAEtD,OAAOG;AACT,EAAE"}
|