@fluentui/react-tabs 9.3.4 → 9.3.6

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.
Files changed (100) hide show
  1. package/.swcrc +30 -0
  2. package/CHANGELOG.json +79 -1
  3. package/CHANGELOG.md +28 -2
  4. package/lib/Tab.js.map +1 -1
  5. package/lib/TabList.js.map +1 -1
  6. package/lib/components/Tab/Tab.js.map +1 -1
  7. package/lib/components/Tab/Tab.types.js.map +1 -1
  8. package/lib/components/Tab/index.js.map +1 -1
  9. package/lib/components/Tab/renderTab.js +1 -7
  10. package/lib/components/Tab/renderTab.js.map +1 -1
  11. package/lib/components/Tab/useTab.js.map +1 -1
  12. package/lib/components/Tab/useTabAnimatedIndicator.js +4 -4
  13. package/lib/components/Tab/useTabAnimatedIndicator.js.map +1 -1
  14. package/lib/components/Tab/useTabStyles.js +4 -6
  15. package/lib/components/Tab/useTabStyles.js.map +1 -1
  16. package/lib/components/TabList/TabList.js.map +1 -1
  17. package/lib/components/TabList/TabList.types.js +1 -1
  18. package/lib/components/TabList/TabList.types.js.map +1 -1
  19. package/lib/components/TabList/TabListContext.js +3 -6
  20. package/lib/components/TabList/TabListContext.js.map +1 -1
  21. package/lib/components/TabList/index.js.map +1 -1
  22. package/lib/components/TabList/renderTabList.js +1 -3
  23. package/lib/components/TabList/renderTabList.js.map +1 -1
  24. package/lib/components/TabList/useTabList.js.map +1 -1
  25. package/lib/components/TabList/useTabListContextValues.js.map +1 -1
  26. package/lib/components/TabList/useTabListStyles.js.map +1 -1
  27. package/lib/index.js.map +1 -1
  28. package/lib-commonjs/Tab.js +5 -4
  29. package/lib-commonjs/Tab.js.map +1 -1
  30. package/lib-commonjs/TabList.js +5 -4
  31. package/lib-commonjs/TabList.js.map +1 -1
  32. package/lib-commonjs/components/Tab/Tab.js +19 -20
  33. package/lib-commonjs/components/Tab/Tab.js.map +1 -1
  34. package/lib-commonjs/components/Tab/Tab.types.js +3 -2
  35. package/lib-commonjs/components/Tab/Tab.types.js.map +1 -1
  36. package/lib-commonjs/components/Tab/index.js +10 -9
  37. package/lib-commonjs/components/Tab/index.js.map +1 -1
  38. package/lib-commonjs/components/Tab/renderTab.js +16 -25
  39. package/lib-commonjs/components/Tab/renderTab.js.map +1 -1
  40. package/lib-commonjs/components/Tab/useTab.js +76 -82
  41. package/lib-commonjs/components/Tab/useTab.js.map +1 -1
  42. package/lib-commonjs/components/Tab/useTabAnimatedIndicator.js +133 -117
  43. package/lib-commonjs/components/Tab/useTabAnimatedIndicator.js.map +1 -1
  44. package/lib-commonjs/components/Tab/useTabStyles.js +751 -396
  45. package/lib-commonjs/components/Tab/useTabStyles.js.map +1 -1
  46. package/lib-commonjs/components/TabList/TabList.js +21 -22
  47. package/lib-commonjs/components/TabList/TabList.js.map +1 -1
  48. package/lib-commonjs/components/TabList/TabList.types.js +5 -2
  49. package/lib-commonjs/components/TabList/TabList.types.js.map +1 -1
  50. package/lib-commonjs/components/TabList/TabListContext.js +34 -28
  51. package/lib-commonjs/components/TabList/TabListContext.js.map +1 -1
  52. package/lib-commonjs/components/TabList/index.js +11 -10
  53. package/lib-commonjs/components/TabList/index.js.map +1 -1
  54. package/lib-commonjs/components/TabList/renderTabList.js +16 -21
  55. package/lib-commonjs/components/TabList/renderTabList.js.map +1 -1
  56. package/lib-commonjs/components/TabList/useTabList.js +73 -84
  57. package/lib-commonjs/components/TabList/useTabList.js.map +1 -1
  58. package/lib-commonjs/components/TabList/useTabListContextValues.js +23 -32
  59. package/lib-commonjs/components/TabList/useTabListContextValues.js.map +1 -1
  60. package/lib-commonjs/components/TabList/useTabListStyles.js +46 -36
  61. package/lib-commonjs/components/TabList/useTabListStyles.js.map +1 -1
  62. package/lib-commonjs/index.js +27 -84
  63. package/lib-commonjs/index.js.map +1 -1
  64. package/package.json +10 -9
  65. package/lib-amd/Tab.js +0 -6
  66. package/lib-amd/Tab.js.map +0 -1
  67. package/lib-amd/TabList.js +0 -6
  68. package/lib-amd/TabList.js.map +0 -1
  69. package/lib-amd/components/Tab/Tab.js +0 -17
  70. package/lib-amd/components/Tab/Tab.js.map +0 -1
  71. package/lib-amd/components/Tab/Tab.types.js +0 -5
  72. package/lib-amd/components/Tab/Tab.types.js.map +0 -1
  73. package/lib-amd/components/Tab/index.js +0 -11
  74. package/lib-amd/components/Tab/index.js.map +0 -1
  75. package/lib-amd/components/Tab/renderTab.js +0 -17
  76. package/lib-amd/components/Tab/renderTab.js.map +0 -1
  77. package/lib-amd/components/Tab/useTab.js +0 -63
  78. package/lib-amd/components/Tab/useTab.js.map +0 -1
  79. package/lib-amd/components/Tab/useTabAnimatedIndicator.js +0 -112
  80. package/lib-amd/components/Tab/useTabAnimatedIndicator.js.map +0 -1
  81. package/lib-amd/components/Tab/useTabStyles.js +0 -380
  82. package/lib-amd/components/Tab/useTabStyles.js.map +0 -1
  83. package/lib-amd/components/TabList/TabList.js +0 -18
  84. package/lib-amd/components/TabList/TabList.js.map +0 -1
  85. package/lib-amd/components/TabList/TabList.types.js +0 -5
  86. package/lib-amd/components/TabList/TabList.types.js.map +0 -1
  87. package/lib-amd/components/TabList/TabListContext.js +0 -37
  88. package/lib-amd/components/TabList/TabListContext.js.map +0 -1
  89. package/lib-amd/components/TabList/index.js +0 -12
  90. package/lib-amd/components/TabList/index.js.map +0 -1
  91. package/lib-amd/components/TabList/renderTabList.js +0 -15
  92. package/lib-amd/components/TabList/renderTabList.js.map +0 -1
  93. package/lib-amd/components/TabList/useTabList.js +0 -74
  94. package/lib-amd/components/TabList/useTabList.js.map +0 -1
  95. package/lib-amd/components/TabList/useTabListContextValues.js +0 -23
  96. package/lib-amd/components/TabList/useTabListContextValues.js.map +0 -1
  97. package/lib-amd/components/TabList/useTabListStyles.js +0 -39
  98. package/lib-amd/components/TabList/useTabListStyles.js.map +0 -1
  99. package/lib-amd/index.js +0 -19
  100. package/lib-amd/index.js.map +0 -1
@@ -1,112 +0,0 @@
1
- define(["require", "exports", "tslib", "react", "@griffel/react", "../TabList/TabListContext", "@fluentui/react-theme"], function (require, exports, tslib_1, React, react_1, TabListContext_1, react_theme_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.useTabAnimatedIndicatorStyles_unstable = void 0;
5
- // eslint-disable-next-line @typescript-eslint/naming-convention
6
- var tabIndicatorCssVars_unstable = {
7
- offsetVar: '--fui-Tab__indicator--offset',
8
- scaleVar: '--fui-Tab__indicator--scale',
9
- };
10
- var useActiveIndicatorStyles = react_1.makeStyles({
11
- base: tslib_1.__assign({}, react_1.shorthands.overflow('visible')),
12
- animated: {
13
- '::after': {
14
- transitionProperty: 'transform',
15
- transitionDuration: "" + react_theme_1.tokens.durationSlow,
16
- transitionTimingFunction: "" + react_theme_1.tokens.curveDecelerateMax,
17
- },
18
- '@media (prefers-reduced-motion: reduce)': {
19
- '::after': {
20
- transitionProperty: 'none',
21
- transitionDuration: '0.01ms',
22
- },
23
- },
24
- },
25
- horizontal: {
26
- '::after': {
27
- transformOrigin: 'left',
28
- transform: "translateX(var(" + tabIndicatorCssVars_unstable.offsetVar + "))\n scaleX(var(" + tabIndicatorCssVars_unstable.scaleVar + "))",
29
- },
30
- },
31
- vertical: {
32
- '::after': {
33
- transformOrigin: 'top',
34
- transform: "translateY(var(" + tabIndicatorCssVars_unstable.offsetVar + "))\n scaleY(var(" + tabIndicatorCssVars_unstable.scaleVar + "))",
35
- },
36
- },
37
- });
38
- var calculateTabRect = function (element) {
39
- var _a;
40
- if (element) {
41
- var parentRect = ((_a = element.parentElement) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) || { x: 0, y: 0, width: 0, height: 0 };
42
- var tabRect = element.getBoundingClientRect();
43
- return {
44
- x: tabRect.x - parentRect.x,
45
- y: tabRect.y - parentRect.y,
46
- width: tabRect.width,
47
- height: tabRect.height,
48
- };
49
- }
50
- return undefined;
51
- };
52
- var getRegisteredTabRect = function (registeredTabs, value) {
53
- var _a;
54
- var element = value !== undefined && value !== null ? (_a = registeredTabs[JSON.stringify(value)]) === null || _a === void 0 ? void 0 : _a.ref.current : undefined;
55
- return element ? calculateTabRect(element) : undefined;
56
- };
57
- /**
58
- * Adds additional styling to the active tab selection indicator to create a sliding animation.
59
- */
60
- var useTabAnimatedIndicatorStyles_unstable = function (state) {
61
- var _a;
62
- var disabled = state.disabled, selected = state.selected, vertical = state.vertical;
63
- var activeIndicatorStyles = useActiveIndicatorStyles();
64
- var _b = React.useState(), lastAnimatedFrom = _b[0], setLastAnimatedFrom = _b[1];
65
- var _c = React.useState({ offset: 0, scale: 1 }), animationValues = _c[0], setAnimationValues = _c[1];
66
- var getRegisteredTabs = TabListContext_1.useTabListContext_unstable(function (ctx) { return ctx.getRegisteredTabs; });
67
- React.useEffect(function () {
68
- if (lastAnimatedFrom) {
69
- setAnimationValues({ offset: 0, scale: 1 });
70
- }
71
- }, [lastAnimatedFrom]);
72
- if (selected) {
73
- var _d = getRegisteredTabs(), previousSelectedValue = _d.previousSelectedValue, selectedValue = _d.selectedValue, registeredTabs = _d.registeredTabs;
74
- var previousSelectedTabRect = getRegisteredTabRect(registeredTabs, previousSelectedValue);
75
- var selectedTabRect = getRegisteredTabRect(registeredTabs, selectedValue);
76
- if (selectedTabRect &&
77
- previousSelectedTabRect &&
78
- previousSelectedValue &&
79
- lastAnimatedFrom !== previousSelectedValue) {
80
- var offset = vertical
81
- ? previousSelectedTabRect.y - selectedTabRect.y
82
- : previousSelectedTabRect.x - selectedTabRect.x;
83
- var scale = vertical
84
- ? previousSelectedTabRect.height / selectedTabRect.height
85
- : previousSelectedTabRect.width / selectedTabRect.width;
86
- setAnimationValues({ offset: offset, scale: scale });
87
- setLastAnimatedFrom(previousSelectedValue);
88
- }
89
- }
90
- else if (lastAnimatedFrom) {
91
- // need to clear the last animated from so that if this tab is selected again
92
- // from the same previous tab as last time, that animation still happens.
93
- setLastAnimatedFrom(undefined);
94
- }
95
- // do not apply any animation if the tab is disabled
96
- if (disabled) {
97
- return state;
98
- }
99
- // the animation should only happen as the selection indicator returns to its
100
- // original position and not when set at the previous tabs position.
101
- var animating = animationValues.offset === 0 && animationValues.scale === 1;
102
- state.root.className = react_1.mergeClasses(state.root.className, selected && activeIndicatorStyles.base, selected && animating && activeIndicatorStyles.animated, selected && (vertical ? activeIndicatorStyles.vertical : activeIndicatorStyles.horizontal));
103
- var rootCssVars = (_a = {},
104
- _a[tabIndicatorCssVars_unstable.offsetVar] = animationValues.offset + "px",
105
- _a[tabIndicatorCssVars_unstable.scaleVar] = "" + animationValues.scale,
106
- _a);
107
- state.root.style = tslib_1.__assign(tslib_1.__assign({}, rootCssVars), state.root.style);
108
- return state;
109
- };
110
- exports.useTabAnimatedIndicatorStyles_unstable = useTabAnimatedIndicatorStyles_unstable;
111
- });
112
- //# sourceMappingURL=useTabAnimatedIndicator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useTabAnimatedIndicator.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-tabs/src/components/Tab/useTabAnimatedIndicator.ts"],"names":[],"mappings":";;;;IAQA,gEAAgE;IAChE,IAAM,4BAA4B,GAAG;QACnC,SAAS,EAAE,8BAA8B;QACzC,QAAQ,EAAE,6BAA6B;KACxC,CAAC;IAEF,IAAM,wBAAwB,GAAG,kBAAU,CAAC;QAC1C,IAAI,uBAEC,kBAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,CAClC;QACD,QAAQ,EAAE;YACR,SAAS,EAAE;gBACT,kBAAkB,EAAE,WAAW;gBAC/B,kBAAkB,EAAE,KAAG,oBAAM,CAAC,YAAc;gBAC5C,wBAAwB,EAAE,KAAG,oBAAM,CAAC,kBAAoB;aACzD;YACD,yCAAyC,EAAE;gBACzC,SAAS,EAAE;oBACT,kBAAkB,EAAE,MAAM;oBAC1B,kBAAkB,EAAE,QAAQ;iBAC7B;aACF;SACF;QACD,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,eAAe,EAAE,MAAM;gBACvB,SAAS,EAAE,oBAAkB,4BAA4B,CAAC,SA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\nimport type { TabState, TabValue } from './Tab.types';\n\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { useTabListContext_unstable } from '../TabList/TabListContext';\nimport { TabRegisterData } from '../TabList/TabList.types';\nimport { tokens } from '@fluentui/react-theme';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nconst tabIndicatorCssVars_unstable = {\n offsetVar: '--fui-Tab__indicator--offset',\n scaleVar: '--fui-Tab__indicator--scale',\n};\n\nconst useActiveIndicatorStyles = makeStyles({\n base: {\n // overflow is required to allow the selection indicator to animate outside the tab area.\n ...shorthands.overflow('visible'),\n },\n animated: {\n '::after': {\n transitionProperty: 'transform',\n transitionDuration: `${tokens.durationSlow}`,\n transitionTimingFunction: `${tokens.curveDecelerateMax}`,\n },\n '@media (prefers-reduced-motion: reduce)': {\n '::after': {\n transitionProperty: 'none',\n transitionDuration: '0.01ms',\n },\n },\n },\n horizontal: {\n '::after': {\n transformOrigin: 'left',\n transform: `translateX(var(${tabIndicatorCssVars_unstable.offsetVar}))\n scaleX(var(${tabIndicatorCssVars_unstable.scaleVar}))`,\n },\n },\n vertical: {\n '::after': {\n transformOrigin: 'top',\n transform: `translateY(var(${tabIndicatorCssVars_unstable.offsetVar}))\n scaleY(var(${tabIndicatorCssVars_unstable.scaleVar}))`,\n },\n },\n});\n\nconst calculateTabRect = (element: HTMLElement) => {\n if (element) {\n const parentRect = element.parentElement?.getBoundingClientRect() || { x: 0, y: 0, width: 0, height: 0 };\n const tabRect = element.getBoundingClientRect();\n\n return {\n x: tabRect.x - parentRect.x,\n y: tabRect.y - parentRect.y,\n width: tabRect.width,\n height: tabRect.height,\n };\n }\n return undefined;\n};\n\nconst getRegisteredTabRect = (registeredTabs: Record<string, TabRegisterData>, value?: TabValue) => {\n const element =\n value !== undefined && value !== null ? registeredTabs[JSON.stringify(value)]?.ref.current : undefined;\n return element ? calculateTabRect(element) : undefined;\n};\n\n/**\n * Adds additional styling to the active tab selection indicator to create a sliding animation.\n */\nexport const useTabAnimatedIndicatorStyles_unstable = (state: TabState): TabState => {\n const { disabled, selected, vertical } = state;\n\n const activeIndicatorStyles = useActiveIndicatorStyles();\n const [lastAnimatedFrom, setLastAnimatedFrom] = React.useState<TabValue>();\n const [animationValues, setAnimationValues] = React.useState({ offset: 0, scale: 1 });\n const getRegisteredTabs = useTabListContext_unstable(ctx => ctx.getRegisteredTabs);\n\n React.useEffect(() => {\n if (lastAnimatedFrom) {\n setAnimationValues({ offset: 0, scale: 1 });\n }\n }, [lastAnimatedFrom]);\n\n if (selected) {\n const { previousSelectedValue, selectedValue, registeredTabs } = getRegisteredTabs();\n const previousSelectedTabRect = getRegisteredTabRect(registeredTabs, previousSelectedValue);\n const selectedTabRect = getRegisteredTabRect(registeredTabs, selectedValue);\n\n if (\n selectedTabRect &&\n previousSelectedTabRect &&\n previousSelectedValue &&\n lastAnimatedFrom !== previousSelectedValue\n ) {\n const offset = vertical\n ? previousSelectedTabRect.y - selectedTabRect.y\n : previousSelectedTabRect.x - selectedTabRect.x;\n\n const scale = vertical\n ? previousSelectedTabRect.height / selectedTabRect.height\n : previousSelectedTabRect.width / selectedTabRect.width;\n\n setAnimationValues({ offset, scale });\n setLastAnimatedFrom(previousSelectedValue);\n }\n } else if (lastAnimatedFrom) {\n // need to clear the last animated from so that if this tab is selected again\n // from the same previous tab as last time, that animation still happens.\n setLastAnimatedFrom(undefined);\n }\n\n // do not apply any animation if the tab is disabled\n if (disabled) {\n return state;\n }\n\n // the animation should only happen as the selection indicator returns to its\n // original position and not when set at the previous tabs position.\n const animating = animationValues.offset === 0 && animationValues.scale === 1;\n\n state.root.className = mergeClasses(\n state.root.className,\n selected && activeIndicatorStyles.base,\n selected && animating && activeIndicatorStyles.animated,\n selected && (vertical ? activeIndicatorStyles.vertical : activeIndicatorStyles.horizontal),\n );\n\n const rootCssVars = {\n [tabIndicatorCssVars_unstable.offsetVar]: `${animationValues.offset}px`,\n [tabIndicatorCssVars_unstable.scaleVar]: `${animationValues.scale}`,\n };\n\n state.root.style = {\n ...rootCssVars,\n ...state.root.style,\n };\n\n return state;\n};\n"]}
@@ -1,380 +0,0 @@
1
- define(["require", "exports", "tslib", "@griffel/react", "@fluentui/react-tabster", "@fluentui/react-theme", "./useTabAnimatedIndicator"], function (require, exports, tslib_1, react_1, react_tabster_1, react_theme_1, useTabAnimatedIndicator_1) {
2
- "use strict";
3
- var _a, _b;
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.useTabStyles_unstable = exports.tabClassNames = void 0;
6
- exports.tabClassNames = {
7
- root: 'fui-Tab',
8
- icon: 'fui-Tab__icon',
9
- content: 'fui-Tab__content',
10
- };
11
- var reservedSpaceClassNames = {
12
- content: 'fui-Tab__content--reserved-space',
13
- };
14
- // These should match the constants defined in @fluentui/react-icons
15
- // This package avoids taking a dependency on the icons package for only the constants.
16
- var iconClassNames = {
17
- filled: 'fui-Icon-filled',
18
- regular: 'fui-Icon-regular',
19
- };
20
- /**
21
- * Styles for the root slot
22
- */
23
- /* eslint-disable @typescript-eslint/naming-convention */
24
- var useRootStyles = react_1.makeStyles({
25
- base: tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ alignItems: 'center' }, react_1.shorthands.borderColor('none')), react_1.shorthands.borderRadius(react_theme_1.tokens.borderRadiusMedium)), react_1.shorthands.borderWidth(0)), { cursor: 'pointer', display: 'grid', flexShrink: 0, gridAutoFlow: 'column', gridTemplateColumns: 'auto', gridTemplateRows: 'auto', fontFamily: react_theme_1.tokens.fontFamilyBase, lineHeight: react_theme_1.tokens.lineHeightBase300, outlineStyle: 'none', position: 'relative' }), react_1.shorthands.overflow('hidden')), { textTransform: 'none' }),
26
- horizontal: {
27
- justifyContent: 'center',
28
- },
29
- vertical: {
30
- justifyContent: 'start',
31
- },
32
- smallHorizontal: tslib_1.__assign({ columnGap: react_theme_1.tokens.spacingHorizontalXXS }, react_1.shorthands.padding(react_theme_1.tokens.spacingVerticalSNudge, react_theme_1.tokens.spacingHorizontalSNudge)),
33
- smallVertical: tslib_1.__assign({
34
- // horizontal spacing is deliberate. This is the gap between icon and content.
35
- columnGap: react_theme_1.tokens.spacingHorizontalXXS }, react_1.shorthands.padding(react_theme_1.tokens.spacingVerticalXXS, react_theme_1.tokens.spacingHorizontalSNudge)),
36
- mediumHorizontal: tslib_1.__assign({ columnGap: react_theme_1.tokens.spacingHorizontalSNudge }, react_1.shorthands.padding(react_theme_1.tokens.spacingVerticalM, react_theme_1.tokens.spacingHorizontalMNudge)),
37
- mediumVertical: tslib_1.__assign({
38
- // horizontal spacing is deliberate. This is the gap between icon and content.
39
- columnGap: react_theme_1.tokens.spacingHorizontalSNudge }, react_1.shorthands.padding(react_theme_1.tokens.spacingVerticalSNudge, react_theme_1.tokens.spacingHorizontalMNudge)),
40
- largeHorizontal: tslib_1.__assign({ columnGap: react_theme_1.tokens.spacingHorizontalSNudge }, react_1.shorthands.padding(react_theme_1.tokens.spacingVerticalL, react_theme_1.tokens.spacingHorizontalMNudge)),
41
- largeVertical: tslib_1.__assign({
42
- // horizontal spacing is deliberate. This is the gap between icon and content.
43
- columnGap: react_theme_1.tokens.spacingHorizontalSNudge }, react_1.shorthands.padding(react_theme_1.tokens.spacingVerticalS, react_theme_1.tokens.spacingHorizontalMNudge)),
44
- transparent: {
45
- backgroundColor: react_theme_1.tokens.colorTransparentBackground,
46
- ':hover': {
47
- backgroundColor: react_theme_1.tokens.colorTransparentBackgroundHover,
48
- },
49
- ':active': {
50
- backgroundColor: react_theme_1.tokens.colorTransparentBackgroundPressed,
51
- },
52
- '& .fui-Tab__icon': {
53
- color: react_theme_1.tokens.colorNeutralForeground2,
54
- },
55
- ':hover .fui-Tab__icon': {
56
- color: react_theme_1.tokens.colorNeutralForeground2Hover,
57
- },
58
- ':active .fui-Tab__icon': {
59
- color: react_theme_1.tokens.colorNeutralForeground2Pressed,
60
- },
61
- '& .fui-Tab__content': {
62
- color: react_theme_1.tokens.colorNeutralForeground2,
63
- },
64
- ':hover .fui-Tab__content': {
65
- color: react_theme_1.tokens.colorNeutralForeground2Hover,
66
- },
67
- ':active .fui-Tab__content': {
68
- color: react_theme_1.tokens.colorNeutralForeground2Pressed,
69
- },
70
- },
71
- subtle: {
72
- backgroundColor: react_theme_1.tokens.colorSubtleBackground,
73
- ':hover': {
74
- backgroundColor: react_theme_1.tokens.colorSubtleBackgroundHover,
75
- },
76
- ':active': {
77
- backgroundColor: react_theme_1.tokens.colorSubtleBackgroundPressed,
78
- },
79
- '& .fui-Tab__icon': {
80
- color: react_theme_1.tokens.colorNeutralForeground2,
81
- },
82
- ':hover .fui-Tab__icon': {
83
- color: react_theme_1.tokens.colorNeutralForeground2Hover,
84
- },
85
- ':active .fui-Tab__icon': {
86
- color: react_theme_1.tokens.colorNeutralForeground2Pressed,
87
- },
88
- '& .fui-Tab__content': {
89
- color: react_theme_1.tokens.colorNeutralForeground2,
90
- },
91
- ':hover .fui-Tab__content': {
92
- color: react_theme_1.tokens.colorNeutralForeground2Hover,
93
- },
94
- ':active .fui-Tab__content': {
95
- color: react_theme_1.tokens.colorNeutralForeground2Pressed,
96
- },
97
- },
98
- disabled: {
99
- backgroundColor: react_theme_1.tokens.colorTransparentBackground,
100
- '& .fui-Tab__icon': {
101
- color: react_theme_1.tokens.colorNeutralForegroundDisabled,
102
- },
103
- '& .fui-Tab__content': {
104
- color: react_theme_1.tokens.colorNeutralForegroundDisabled,
105
- },
106
- cursor: 'not-allowed',
107
- },
108
- selected: {
109
- '& .fui-Tab__icon': {
110
- color: react_theme_1.tokens.colorCompoundBrandForeground1,
111
- },
112
- ':hover .fui-Tab__icon': {
113
- color: react_theme_1.tokens.colorCompoundBrandForeground1Hover,
114
- },
115
- ':active .fui-Tab__icon': {
116
- color: react_theme_1.tokens.colorCompoundBrandForeground1Pressed,
117
- },
118
- '& .fui-Tab__content': {
119
- color: react_theme_1.tokens.colorNeutralForeground1,
120
- },
121
- ':hover .fui-Tab__content': {
122
- color: react_theme_1.tokens.colorNeutralForeground1Hover,
123
- },
124
- ':active .fui-Tab__content': {
125
- color: react_theme_1.tokens.colorNeutralForeground1Pressed,
126
- },
127
- },
128
- });
129
- /* eslint-enable @typescript-eslint/naming-convention */
130
- /**
131
- * Focus styles for the root slot
132
- */
133
- var useFocusStyles = react_1.makeStyles({
134
- // Tab creates a custom focus indicator because the default focus indicator
135
- // is applied using an ::after pseudo-element on the root. Since the selection
136
- // indicator uses an ::after pseudo-element on the root, there is a conflict.
137
- base: react_tabster_1.createCustomFocusIndicatorStyle(tslib_1.__assign(tslib_1.__assign({}, react_1.shorthands.borderColor('transparent')), { outlineWidth: react_theme_1.tokens.strokeWidthThick, outlineColor: 'transparent', outlineStyle: 'solid', boxShadow: "\n " + react_theme_1.tokens.shadow4 + ",\n 0 0 0 " + react_theme_1.tokens.strokeWidthThick + " " + react_theme_1.tokens.colorStrokeFocus2 + "\n ", zIndex: 1 }), { enableOutline: true }),
138
- });
139
- /** Indicator styles for when pending selection */
140
- var usePendingIndicatorStyles = react_1.makeStyles({
141
- base: {
142
- ':hover::before': tslib_1.__assign(tslib_1.__assign({ backgroundColor: react_theme_1.tokens.colorNeutralStroke1Hover }, react_1.shorthands.borderRadius(react_theme_1.tokens.borderRadiusCircular)), { content: '""', position: 'absolute' }),
143
- ':active::before': tslib_1.__assign(tslib_1.__assign({ backgroundColor: react_theme_1.tokens.colorNeutralStroke1Pressed }, react_1.shorthands.borderRadius(react_theme_1.tokens.borderRadiusCircular)), { content: '""', position: 'absolute' }),
144
- '@media (forced-colors: active)': {
145
- ':hover::before': {
146
- backgroundColor: 'Highlight',
147
- },
148
- ':active::before': {
149
- backgroundColor: 'Highlight',
150
- },
151
- },
152
- },
153
- disabled: {
154
- ':hover::before': {
155
- backgroundColor: react_theme_1.tokens.colorTransparentStroke,
156
- },
157
- ':active::before': {
158
- backgroundColor: react_theme_1.tokens.colorTransparentStroke,
159
- },
160
- },
161
- smallHorizontal: {
162
- '::before': {
163
- bottom: 0,
164
- height: react_theme_1.tokens.strokeWidthThick,
165
- left: react_theme_1.tokens.spacingHorizontalSNudge,
166
- right: react_theme_1.tokens.spacingHorizontalSNudge,
167
- },
168
- },
169
- smallVertical: {
170
- '::before': {
171
- bottom: react_theme_1.tokens.spacingVerticalXS,
172
- left: 0,
173
- top: react_theme_1.tokens.spacingVerticalXS,
174
- width: react_theme_1.tokens.strokeWidthThicker,
175
- },
176
- },
177
- mediumHorizontal: {
178
- '::before': {
179
- bottom: 0,
180
- height: react_theme_1.tokens.strokeWidthThicker,
181
- left: react_theme_1.tokens.spacingHorizontalM,
182
- right: react_theme_1.tokens.spacingHorizontalM,
183
- },
184
- },
185
- mediumVertical: {
186
- '::before': {
187
- bottom: react_theme_1.tokens.spacingVerticalS,
188
- left: 0,
189
- top: react_theme_1.tokens.spacingVerticalS,
190
- width: react_theme_1.tokens.strokeWidthThicker,
191
- },
192
- },
193
- largeHorizontal: {
194
- '::before': {
195
- bottom: 0,
196
- height: react_theme_1.tokens.strokeWidthThicker,
197
- left: react_theme_1.tokens.spacingHorizontalM,
198
- right: react_theme_1.tokens.spacingHorizontalM,
199
- },
200
- },
201
- largeVertical: {
202
- '::before': {
203
- bottom: react_theme_1.tokens.spacingVerticalMNudge,
204
- left: 0,
205
- top: react_theme_1.tokens.spacingVerticalMNudge,
206
- width: react_theme_1.tokens.strokeWidthThicker,
207
- },
208
- },
209
- });
210
- var useActiveIndicatorStyles = react_1.makeStyles({
211
- base: {
212
- '::after': tslib_1.__assign(tslib_1.__assign({ backgroundColor: react_theme_1.tokens.colorTransparentStroke }, react_1.shorthands.borderRadius(react_theme_1.tokens.borderRadiusCircular)), { content: '""', position: 'absolute', zIndex: 1 }),
213
- },
214
- selected: {
215
- '::after': {
216
- backgroundColor: react_theme_1.tokens.colorCompoundBrandStroke,
217
- },
218
- ':hover::after': {
219
- backgroundColor: react_theme_1.tokens.colorCompoundBrandStrokeHover,
220
- },
221
- ':active::after': {
222
- backgroundColor: react_theme_1.tokens.colorCompoundBrandStrokePressed,
223
- },
224
- '@media (forced-colors: active)': {
225
- '::after': {
226
- backgroundColor: 'ButtonText',
227
- },
228
- ':hover::after': {
229
- backgroundColor: 'ButtonText',
230
- },
231
- ':active::after': {
232
- backgroundColor: 'ButtonText',
233
- },
234
- },
235
- },
236
- disabled: {
237
- '::after': {
238
- backgroundColor: react_theme_1.tokens.colorNeutralForegroundDisabled,
239
- },
240
- },
241
- smallHorizontal: {
242
- '::after': {
243
- bottom: 0,
244
- height: react_theme_1.tokens.strokeWidthThick,
245
- left: react_theme_1.tokens.spacingHorizontalSNudge,
246
- right: react_theme_1.tokens.spacingHorizontalSNudge,
247
- },
248
- },
249
- smallVertical: {
250
- '::after': {
251
- bottom: react_theme_1.tokens.spacingVerticalXS,
252
- left: '0',
253
- top: react_theme_1.tokens.spacingVerticalXS,
254
- width: react_theme_1.tokens.strokeWidthThicker,
255
- },
256
- },
257
- mediumHorizontal: {
258
- '::after': {
259
- bottom: '0',
260
- height: react_theme_1.tokens.strokeWidthThicker,
261
- left: react_theme_1.tokens.spacingHorizontalM,
262
- right: react_theme_1.tokens.spacingHorizontalM,
263
- },
264
- },
265
- mediumVertical: {
266
- '::after': {
267
- bottom: react_theme_1.tokens.spacingVerticalS,
268
- left: 0,
269
- top: react_theme_1.tokens.spacingVerticalS,
270
- width: react_theme_1.tokens.strokeWidthThicker,
271
- },
272
- },
273
- largeHorizontal: {
274
- '::after': {
275
- bottom: 0,
276
- height: react_theme_1.tokens.strokeWidthThicker,
277
- left: react_theme_1.tokens.spacingHorizontalM,
278
- right: react_theme_1.tokens.spacingHorizontalM,
279
- },
280
- },
281
- largeVertical: {
282
- '::after': {
283
- bottom: react_theme_1.tokens.spacingVerticalMNudge,
284
- left: 0,
285
- top: react_theme_1.tokens.spacingVerticalMNudge,
286
- width: react_theme_1.tokens.strokeWidthThicker,
287
- },
288
- },
289
- });
290
- /**
291
- * Styles for the icon slot.
292
- */
293
- var useIconStyles = react_1.makeStyles({
294
- base: tslib_1.__assign(tslib_1.__assign({ gridColumnStart: 1, gridRowStart: 1, alignItems: 'center', display: 'inline-flex', justifyContent: 'center' }, react_1.shorthands.overflow('hidden')), (_a = {}, _a["& ." + iconClassNames.filled] = {
295
- display: 'none',
296
- }, _a["& ." + iconClassNames.regular] = {
297
- display: 'inline',
298
- }, _a)),
299
- // per design, the small and medium font sizes are the same.
300
- // the size prop only affects spacing.
301
- small: {
302
- fontSize: '20px',
303
- height: '20px',
304
- width: '20px',
305
- },
306
- medium: {
307
- fontSize: '20px',
308
- height: '20px',
309
- width: '20px',
310
- },
311
- large: {
312
- fontSize: '24px',
313
- height: '24px',
314
- width: '24px',
315
- },
316
- selected: (_b = {},
317
- _b["& ." + iconClassNames.filled] = {
318
- display: 'inline',
319
- },
320
- _b["& ." + iconClassNames.regular] = {
321
- display: 'none',
322
- },
323
- _b),
324
- });
325
- /**
326
- * Styles for the content slot (children)
327
- */
328
- var useContentStyles = react_1.makeStyles({
329
- base: tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, react_theme_1.typographyStyles.body1), react_1.shorthands.overflow('hidden')), react_1.shorthands.padding(react_theme_1.tokens.spacingVerticalNone, react_theme_1.tokens.spacingHorizontalXXS)),
330
- selected: tslib_1.__assign({}, react_theme_1.typographyStyles.body1Strong),
331
- large: tslib_1.__assign({}, react_theme_1.typographyStyles.body2),
332
- largeSelected: tslib_1.__assign({}, react_theme_1.typographyStyles.subtitle2),
333
- noIconBefore: {
334
- gridColumnStart: 1,
335
- gridRowStart: 1,
336
- },
337
- iconBefore: {
338
- gridColumnStart: 2,
339
- gridRowStart: 1,
340
- },
341
- placeholder: {
342
- visibility: 'hidden',
343
- },
344
- });
345
- /**
346
- * Apply styling to the Tab slots based on the state
347
- */
348
- var useTabStyles_unstable = function (state) {
349
- var rootStyles = useRootStyles();
350
- var focusStyles = useFocusStyles();
351
- var pendingIndicatorStyles = usePendingIndicatorStyles();
352
- var activeIndicatorStyles = useActiveIndicatorStyles();
353
- var iconStyles = useIconStyles();
354
- var contentStyles = useContentStyles();
355
- var appearance = state.appearance, disabled = state.disabled, selected = state.selected, size = state.size, vertical = state.vertical;
356
- state.root.className = react_1.mergeClasses(exports.tabClassNames.root, rootStyles.base, vertical ? rootStyles.vertical : rootStyles.horizontal, size === 'small' && (vertical ? rootStyles.smallVertical : rootStyles.smallHorizontal), size === 'medium' && (vertical ? rootStyles.mediumVertical : rootStyles.mediumHorizontal), size === 'large' && (vertical ? rootStyles.largeVertical : rootStyles.largeHorizontal), focusStyles.base, !disabled && appearance === 'subtle' && rootStyles.subtle, !disabled && appearance === 'transparent' && rootStyles.transparent, !disabled && selected && rootStyles.selected, disabled && rootStyles.disabled,
357
- // pending indicator (before pseudo element)
358
- pendingIndicatorStyles.base, size === 'small' && (vertical ? pendingIndicatorStyles.smallVertical : pendingIndicatorStyles.smallHorizontal), size === 'medium' && (vertical ? pendingIndicatorStyles.mediumVertical : pendingIndicatorStyles.mediumHorizontal), size === 'large' && (vertical ? pendingIndicatorStyles.largeVertical : pendingIndicatorStyles.largeHorizontal), disabled && pendingIndicatorStyles.disabled,
359
- // active indicator (after pseudo element)
360
- selected && activeIndicatorStyles.base, selected && !disabled && activeIndicatorStyles.selected, selected &&
361
- size === 'small' &&
362
- (vertical ? activeIndicatorStyles.smallVertical : activeIndicatorStyles.smallHorizontal), selected &&
363
- size === 'medium' &&
364
- (vertical ? activeIndicatorStyles.mediumVertical : activeIndicatorStyles.mediumHorizontal), selected &&
365
- size === 'large' &&
366
- (vertical ? activeIndicatorStyles.largeVertical : activeIndicatorStyles.largeHorizontal), selected && disabled && activeIndicatorStyles.disabled, state.root.className);
367
- if (state.icon) {
368
- state.icon.className = react_1.mergeClasses(exports.tabClassNames.icon, iconStyles.base, iconStyles[size], selected && iconStyles.selected, state.icon.className);
369
- }
370
- // This needs to be before state.content.className is updated
371
- if (state.contentReservedSpaceClassName !== undefined) {
372
- state.contentReservedSpaceClassName = react_1.mergeClasses(reservedSpaceClassNames.content, contentStyles.base, size === 'large' ? contentStyles.largeSelected : contentStyles.selected, state.icon ? contentStyles.iconBefore : contentStyles.noIconBefore, contentStyles.placeholder, state.content.className);
373
- }
374
- state.content.className = react_1.mergeClasses(exports.tabClassNames.content, contentStyles.base, size === 'large' && contentStyles.large, selected && (size === 'large' ? contentStyles.largeSelected : contentStyles.selected), state.icon ? contentStyles.iconBefore : contentStyles.noIconBefore, state.content.className);
375
- useTabAnimatedIndicator_1.useTabAnimatedIndicatorStyles_unstable(state);
376
- return state;
377
- };
378
- exports.useTabStyles_unstable = useTabStyles_unstable;
379
- });
380
- //# sourceMappingURL=useTabStyles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useTabStyles.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-tabs/src/components/Tab/useTabStyles.ts"],"names":[],"mappings":";;;;;IAQa,QAAA,aAAa,GAA6B;QACrD,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,kBAAkB;KAC5B,CAAC;IAEF,IAAM,uBAAuB,GAAG;QAC9B,OAAO,EAAE,kCAAkC;KAC5C,CAAC;IAEF,oEAAoE;IACpE,uFAAuF;IACvF,IAAM,cAAc,GAAG;QACrB,MAAM,EAAE,iBAAiB;QACzB,OAAO,EAAE,kBAAkB;KAC5B,CAAC;IAEF;;OAEG;IACH,yDAAyD;IACzD,IAAM,aAAa,GAAG,kBAAU,CAAC;QAC/B,IAAI,0GACF,UAAU,EAAE,QAAQ,IACjB,kBAAU,CAAC,WAAW,CAAC,MAAM,CAAC,GAC9B,kBAAU,CAAC,YAAY,CAAC,oBAAM,CAAC,kBAAkB,CAAC,GAClD,kBAAU,CAAC,WAAW,CAAC,CAAC,CAAC,KAC5B,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,CAAC,EACb,YAAY,EAAE,QAAQ,EACtB,mBAAmB,EAAE,MAAM,EAC3B,gBAAgB,EAAE,MAAM,EACxB,UAAU,EAAE,oBAAM,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":["import type { TabSlots, TabState } from './Tab.types';\n\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { SlotClassNames } from '@fluentui/react-utilities';\nimport { useTabAnimatedIndicatorStyles_unstable } from './useTabAnimatedIndicator';\n\nexport const tabClassNames: SlotClassNames<TabSlots> = {\n root: 'fui-Tab',\n icon: 'fui-Tab__icon',\n content: 'fui-Tab__content',\n};\n\nconst reservedSpaceClassNames = {\n content: 'fui-Tab__content--reserved-space',\n};\n\n// These should match the constants defined in @fluentui/react-icons\n// This package avoids taking a dependency on the icons package for only the constants.\nconst iconClassNames = {\n filled: 'fui-Icon-filled',\n regular: 'fui-Icon-regular',\n};\n\n/**\n * Styles for the root slot\n */\n/* eslint-disable @typescript-eslint/naming-convention */\nconst useRootStyles = makeStyles({\n base: {\n alignItems: 'center',\n ...shorthands.borderColor('none'),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n ...shorthands.borderWidth(0),\n cursor: 'pointer',\n display: 'grid',\n flexShrink: 0,\n gridAutoFlow: 'column',\n gridTemplateColumns: 'auto',\n gridTemplateRows: 'auto',\n fontFamily: tokens.fontFamilyBase,\n lineHeight: tokens.lineHeightBase300,\n outlineStyle: 'none',\n position: 'relative',\n ...shorthands.overflow('hidden'),\n textTransform: 'none',\n },\n horizontal: {\n justifyContent: 'center',\n },\n vertical: {\n justifyContent: 'start',\n },\n smallHorizontal: {\n columnGap: tokens.spacingHorizontalXXS,\n ...shorthands.padding(tokens.spacingVerticalSNudge, tokens.spacingHorizontalSNudge),\n },\n smallVertical: {\n // horizontal spacing is deliberate. This is the gap between icon and content.\n columnGap: tokens.spacingHorizontalXXS,\n ...shorthands.padding(tokens.spacingVerticalXXS, tokens.spacingHorizontalSNudge),\n },\n mediumHorizontal: {\n columnGap: tokens.spacingHorizontalSNudge,\n ...shorthands.padding(tokens.spacingVerticalM, tokens.spacingHorizontalMNudge),\n },\n mediumVertical: {\n // horizontal spacing is deliberate. This is the gap between icon and content.\n columnGap: tokens.spacingHorizontalSNudge,\n ...shorthands.padding(tokens.spacingVerticalSNudge, tokens.spacingHorizontalMNudge),\n },\n largeHorizontal: {\n columnGap: tokens.spacingHorizontalSNudge,\n ...shorthands.padding(tokens.spacingVerticalL, tokens.spacingHorizontalMNudge),\n },\n largeVertical: {\n // horizontal spacing is deliberate. This is the gap between icon and content.\n columnGap: tokens.spacingHorizontalSNudge,\n ...shorthands.padding(tokens.spacingVerticalS, tokens.spacingHorizontalMNudge),\n },\n transparent: {\n backgroundColor: tokens.colorTransparentBackground,\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover,\n },\n ':active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n },\n '& .fui-Tab__icon': {\n color: tokens.colorNeutralForeground2,\n },\n ':hover .fui-Tab__icon': {\n color: tokens.colorNeutralForeground2Hover,\n },\n ':active .fui-Tab__icon': {\n color: tokens.colorNeutralForeground2Pressed,\n },\n '& .fui-Tab__content': {\n color: tokens.colorNeutralForeground2,\n },\n ':hover .fui-Tab__content': {\n color: tokens.colorNeutralForeground2Hover,\n },\n ':active .fui-Tab__content': {\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n subtle: {\n backgroundColor: tokens.colorSubtleBackground,\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n },\n '& .fui-Tab__icon': {\n color: tokens.colorNeutralForeground2,\n },\n ':hover .fui-Tab__icon': {\n color: tokens.colorNeutralForeground2Hover,\n },\n ':active .fui-Tab__icon': {\n color: tokens.colorNeutralForeground2Pressed,\n },\n '& .fui-Tab__content': {\n color: tokens.colorNeutralForeground2,\n },\n ':hover .fui-Tab__content': {\n color: tokens.colorNeutralForeground2Hover,\n },\n ':active .fui-Tab__content': {\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n disabled: {\n backgroundColor: tokens.colorTransparentBackground,\n\n '& .fui-Tab__icon': {\n color: tokens.colorNeutralForegroundDisabled,\n },\n '& .fui-Tab__content': {\n color: tokens.colorNeutralForegroundDisabled,\n },\n cursor: 'not-allowed',\n },\n selected: {\n '& .fui-Tab__icon': {\n color: tokens.colorCompoundBrandForeground1,\n },\n ':hover .fui-Tab__icon': {\n color: tokens.colorCompoundBrandForeground1Hover,\n },\n ':active .fui-Tab__icon': {\n color: tokens.colorCompoundBrandForeground1Pressed,\n },\n '& .fui-Tab__content': {\n color: tokens.colorNeutralForeground1,\n },\n ':hover .fui-Tab__content': {\n color: tokens.colorNeutralForeground1Hover,\n },\n ':active .fui-Tab__content': {\n color: tokens.colorNeutralForeground1Pressed,\n },\n },\n});\n/* eslint-enable @typescript-eslint/naming-convention */\n\n/**\n * Focus styles for the root slot\n */\nconst useFocusStyles = makeStyles({\n // Tab creates a custom focus indicator because the default focus indicator\n // is applied using an ::after pseudo-element on the root. Since the selection\n // indicator uses an ::after pseudo-element on the root, there is a conflict.\n base: createCustomFocusIndicatorStyle(\n {\n ...shorthands.borderColor('transparent'),\n outlineWidth: tokens.strokeWidthThick,\n outlineColor: 'transparent',\n outlineStyle: 'solid',\n boxShadow: `\n ${tokens.shadow4},\n 0 0 0 ${tokens.strokeWidthThick} ${tokens.colorStrokeFocus2}\n `,\n zIndex: 1,\n },\n { enableOutline: true },\n ),\n});\n\n/** Indicator styles for when pending selection */\nconst usePendingIndicatorStyles = makeStyles({\n base: {\n ':hover::before': {\n backgroundColor: tokens.colorNeutralStroke1Hover,\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n content: '\"\"',\n position: 'absolute',\n },\n ':active::before': {\n backgroundColor: tokens.colorNeutralStroke1Pressed,\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n content: '\"\"',\n position: 'absolute',\n },\n '@media (forced-colors: active)': {\n ':hover::before': {\n backgroundColor: 'Highlight',\n },\n ':active::before': {\n backgroundColor: 'Highlight',\n },\n },\n },\n disabled: {\n ':hover::before': {\n backgroundColor: tokens.colorTransparentStroke,\n },\n ':active::before': {\n backgroundColor: tokens.colorTransparentStroke,\n },\n },\n smallHorizontal: {\n '::before': {\n bottom: 0,\n height: tokens.strokeWidthThick,\n left: tokens.spacingHorizontalSNudge,\n right: tokens.spacingHorizontalSNudge,\n },\n },\n smallVertical: {\n '::before': {\n bottom: tokens.spacingVerticalXS,\n left: 0,\n top: tokens.spacingVerticalXS,\n width: tokens.strokeWidthThicker,\n },\n },\n mediumHorizontal: {\n '::before': {\n bottom: 0,\n height: tokens.strokeWidthThicker,\n left: tokens.spacingHorizontalM,\n right: tokens.spacingHorizontalM,\n },\n },\n mediumVertical: {\n '::before': {\n bottom: tokens.spacingVerticalS,\n left: 0,\n top: tokens.spacingVerticalS,\n width: tokens.strokeWidthThicker,\n },\n },\n largeHorizontal: {\n '::before': {\n bottom: 0,\n height: tokens.strokeWidthThicker,\n left: tokens.spacingHorizontalM,\n right: tokens.spacingHorizontalM,\n },\n },\n largeVertical: {\n '::before': {\n bottom: tokens.spacingVerticalMNudge,\n left: 0,\n top: tokens.spacingVerticalMNudge,\n width: tokens.strokeWidthThicker,\n },\n },\n});\n\nconst useActiveIndicatorStyles = makeStyles({\n base: {\n '::after': {\n backgroundColor: tokens.colorTransparentStroke,\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n content: '\"\"',\n position: 'absolute',\n zIndex: 1,\n },\n },\n selected: {\n '::after': {\n backgroundColor: tokens.colorCompoundBrandStroke,\n },\n ':hover::after': {\n backgroundColor: tokens.colorCompoundBrandStrokeHover,\n },\n ':active::after': {\n backgroundColor: tokens.colorCompoundBrandStrokePressed,\n },\n '@media (forced-colors: active)': {\n '::after': {\n backgroundColor: 'ButtonText',\n },\n ':hover::after': {\n backgroundColor: 'ButtonText',\n },\n ':active::after': {\n backgroundColor: 'ButtonText',\n },\n },\n },\n disabled: {\n '::after': {\n backgroundColor: tokens.colorNeutralForegroundDisabled,\n },\n },\n smallHorizontal: {\n '::after': {\n bottom: 0,\n height: tokens.strokeWidthThick,\n left: tokens.spacingHorizontalSNudge,\n right: tokens.spacingHorizontalSNudge,\n },\n },\n smallVertical: {\n '::after': {\n bottom: tokens.spacingVerticalXS,\n left: '0',\n top: tokens.spacingVerticalXS,\n width: tokens.strokeWidthThicker,\n },\n },\n mediumHorizontal: {\n '::after': {\n bottom: '0',\n height: tokens.strokeWidthThicker,\n left: tokens.spacingHorizontalM,\n right: tokens.spacingHorizontalM,\n },\n },\n mediumVertical: {\n '::after': {\n bottom: tokens.spacingVerticalS,\n left: 0,\n top: tokens.spacingVerticalS,\n width: tokens.strokeWidthThicker,\n },\n },\n largeHorizontal: {\n '::after': {\n bottom: 0,\n height: tokens.strokeWidthThicker,\n left: tokens.spacingHorizontalM,\n right: tokens.spacingHorizontalM,\n },\n },\n largeVertical: {\n '::after': {\n bottom: tokens.spacingVerticalMNudge,\n left: 0,\n top: tokens.spacingVerticalMNudge,\n width: tokens.strokeWidthThicker,\n },\n },\n});\n\n/**\n * Styles for the icon slot.\n */\nconst useIconStyles = makeStyles({\n base: {\n gridColumnStart: 1,\n gridRowStart: 1,\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n ...shorthands.overflow('hidden'),\n [`& .${iconClassNames.filled}`]: {\n display: 'none',\n },\n [`& .${iconClassNames.regular}`]: {\n display: 'inline',\n },\n },\n // per design, the small and medium font sizes are the same.\n // the size prop only affects spacing.\n small: {\n fontSize: '20px',\n height: '20px',\n width: '20px',\n },\n medium: {\n fontSize: '20px',\n height: '20px',\n width: '20px',\n },\n large: {\n fontSize: '24px',\n height: '24px',\n width: '24px',\n },\n selected: {\n [`& .${iconClassNames.filled}`]: {\n display: 'inline',\n },\n [`& .${iconClassNames.regular}`]: {\n display: 'none',\n },\n },\n});\n\n/**\n * Styles for the content slot (children)\n */\nconst useContentStyles = makeStyles({\n base: {\n ...typographyStyles.body1,\n ...shorthands.overflow('hidden'),\n // content padding is the same for medium & small, horiztonal & vertical\n ...shorthands.padding(tokens.spacingVerticalNone, tokens.spacingHorizontalXXS),\n },\n selected: {\n ...typographyStyles.body1Strong,\n },\n large: {\n ...typographyStyles.body2,\n },\n largeSelected: {\n ...typographyStyles.subtitle2,\n },\n noIconBefore: {\n gridColumnStart: 1,\n gridRowStart: 1,\n },\n iconBefore: {\n gridColumnStart: 2,\n gridRowStart: 1,\n },\n placeholder: {\n visibility: 'hidden',\n },\n});\n\n/**\n * Apply styling to the Tab slots based on the state\n */\nexport const useTabStyles_unstable = (state: TabState): TabState => {\n const rootStyles = useRootStyles();\n const focusStyles = useFocusStyles();\n const pendingIndicatorStyles = usePendingIndicatorStyles();\n const activeIndicatorStyles = useActiveIndicatorStyles();\n const iconStyles = useIconStyles();\n const contentStyles = useContentStyles();\n\n const { appearance, disabled, selected, size, vertical } = state;\n\n state.root.className = mergeClasses(\n tabClassNames.root,\n rootStyles.base,\n vertical ? rootStyles.vertical : rootStyles.horizontal,\n size === 'small' && (vertical ? rootStyles.smallVertical : rootStyles.smallHorizontal),\n size === 'medium' && (vertical ? rootStyles.mediumVertical : rootStyles.mediumHorizontal),\n size === 'large' && (vertical ? rootStyles.largeVertical : rootStyles.largeHorizontal),\n focusStyles.base,\n !disabled && appearance === 'subtle' && rootStyles.subtle,\n !disabled && appearance === 'transparent' && rootStyles.transparent,\n !disabled && selected && rootStyles.selected,\n disabled && rootStyles.disabled,\n\n // pending indicator (before pseudo element)\n pendingIndicatorStyles.base,\n size === 'small' && (vertical ? pendingIndicatorStyles.smallVertical : pendingIndicatorStyles.smallHorizontal),\n size === 'medium' && (vertical ? pendingIndicatorStyles.mediumVertical : pendingIndicatorStyles.mediumHorizontal),\n size === 'large' && (vertical ? pendingIndicatorStyles.largeVertical : pendingIndicatorStyles.largeHorizontal),\n disabled && pendingIndicatorStyles.disabled,\n\n // active indicator (after pseudo element)\n selected && activeIndicatorStyles.base,\n selected && !disabled && activeIndicatorStyles.selected,\n selected &&\n size === 'small' &&\n (vertical ? activeIndicatorStyles.smallVertical : activeIndicatorStyles.smallHorizontal),\n selected &&\n size === 'medium' &&\n (vertical ? activeIndicatorStyles.mediumVertical : activeIndicatorStyles.mediumHorizontal),\n selected &&\n size === 'large' &&\n (vertical ? activeIndicatorStyles.largeVertical : activeIndicatorStyles.largeHorizontal),\n selected && disabled && activeIndicatorStyles.disabled,\n\n state.root.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(\n tabClassNames.icon,\n iconStyles.base,\n iconStyles[size],\n selected && iconStyles.selected,\n state.icon.className,\n );\n }\n\n // This needs to be before state.content.className is updated\n if (state.contentReservedSpaceClassName !== undefined) {\n state.contentReservedSpaceClassName = mergeClasses(\n reservedSpaceClassNames.content,\n contentStyles.base,\n size === 'large' ? contentStyles.largeSelected : contentStyles.selected,\n state.icon ? contentStyles.iconBefore : contentStyles.noIconBefore,\n contentStyles.placeholder,\n state.content.className,\n );\n }\n\n state.content.className = mergeClasses(\n tabClassNames.content,\n contentStyles.base,\n size === 'large' && contentStyles.large,\n selected && (size === 'large' ? contentStyles.largeSelected : contentStyles.selected),\n state.icon ? contentStyles.iconBefore : contentStyles.noIconBefore,\n state.content.className,\n );\n\n useTabAnimatedIndicatorStyles_unstable(state);\n\n return state;\n};\n"]}
@@ -1,18 +0,0 @@
1
- define(["require", "exports", "react", "./useTabList", "./renderTabList", "./useTabListStyles", "./useTabListContextValues", "@fluentui/react-shared-contexts"], function (require, exports, React, useTabList_1, renderTabList_1, useTabListStyles_1, useTabListContextValues_1, react_shared_contexts_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.TabList = void 0;
5
- /**
6
- * A tab list provides single selection from a set of tabs.
7
- */
8
- exports.TabList = React.forwardRef(function (props, ref) {
9
- var state = useTabList_1.useTabList_unstable(props, ref);
10
- var contextValues = useTabListContextValues_1.useTabListContextValues_unstable(state);
11
- useTabListStyles_1.useTabListStyles_unstable(state);
12
- var useCustomStyles = react_shared_contexts_1.useCustomStyleHooks_unstable().useTabListStyles_unstable;
13
- useCustomStyles(state);
14
- return renderTabList_1.renderTabList_unstable(state, contextValues);
15
- });
16
- exports.TabList.displayName = 'TabList';
17
- });
18
- //# sourceMappingURL=TabList.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TabList.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-tabs/src/components/TabList/TabList.tsx"],"names":[],"mappings":";;;;IASA;;OAEG;IACU,QAAA,OAAO,GAAsC,KAAK,CAAC,UAAU,CAAC,UAAC,KAAK,EAAE,GAAG;QACpF,IAAM,KAAK,GAAG,gCAAmB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAC9C,IAAM,aAAa,GAAG,0DAAgC,CAAC,KAAK,CAAC,CAAC;QAE9D,4CAAyB,CAAC,KAAK,CAAC,CAAC;QAEzB,IAA2B,eAAe,GAAK,oDAA4B,EAAE,0BAAnC,CAAoC;QACtF,eAAe,CAAC,KAAK,CAAC,CAAC;QAEvB,OAAO,sCAAsB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IAEH,eAAO,CAAC,WAAW,GAAG,SAAS,CAAC","sourcesContent":["import * as React from 'react';\nimport { useTabList_unstable } from './useTabList';\nimport { renderTabList_unstable } from './renderTabList';\nimport { useTabListStyles_unstable } from './useTabListStyles';\nimport type { TabListProps } from './TabList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTabListContextValues_unstable } from './useTabListContextValues';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * A tab list provides single selection from a set of tabs.\n */\nexport const TabList: ForwardRefComponent<TabListProps> = React.forwardRef((props, ref) => {\n const state = useTabList_unstable(props, ref);\n const contextValues = useTabListContextValues_unstable(state);\n\n useTabListStyles_unstable(state);\n\n const { useTabListStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderTabList_unstable(state, contextValues);\n});\n\nTabList.displayName = 'TabList';\n"]}
@@ -1,5 +0,0 @@
1
- define(["require", "exports"], function (require, exports) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- });
5
- //# sourceMappingURL=TabList.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TabList.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-tabs/src/components/TabList/TabList.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { TabValue } from '../Tab/Tab.types';\n\nexport type TabRegisterData = {\n /**\n * The value of the tab.\n */\n value: TabValue;\n\n /**\n * The reference to the tab HTML element.\n */\n ref: React.RefObject<HTMLElement>;\n};\n\nexport type RegisterTabEventHandler = (data: TabRegisterData) => void;\n\nexport type SelectTabData = {\n /**\n * The value of the selected tab.\n */\n value: TabValue;\n};\n\nexport type SelectTabEvent<E = HTMLElement> = React.MouseEvent<E> | React.KeyboardEvent<E>;\n\nexport type SelectTabEventHandler = (event: SelectTabEvent, data: SelectTabData) => void;\n\nexport type TabListSlots = {\n /**\n * The slot associated with the root element of this tab list.\n */\n root: Slot<'div'>;\n};\n\n/**\n * TabList Props\n */\nexport type TabListProps = ComponentProps<TabListSlots> & {\n /**\n * A tab list can supports 'transparent' and 'subtle' appearance.\n *- 'subtle': Minimizes emphasis to blend into the background until hovered or focused.\n *- 'transparent': No background and border styling\n * The appearance affects each of the contained tabs.\n * @default 'transparent'\n */\n appearance?: 'transparent' | 'subtle';\n\n /**\n * Tab size may change between unselected and selected states.\n * The default scenario is a selected tab has bold text.\n *\n * When true, this property requests tabs be the same size whether unselected or selected.\n * @default true\n */\n reserveSelectedTabSpace?: boolean;\n\n /**\n * The value of the tab to be selected by default.\n * Typically useful when the selectedValue is uncontrolled.\n */\n defaultSelectedValue?: TabValue;\n /**\n * A tab list can be set to disable interaction.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * Raised when a tab is selected.\n */\n onTabSelect?: SelectTabEventHandler;\n\n /**\n * The value of the currently selected tab.\n */\n selectedValue?: TabValue;\n\n /**\n * A tab list can be either 'small', 'medium', or 'large' size.\n * The size affects each of the contained tabs.\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n\n /**\n * A tab list can arrange its tabs vertically.\n * @default false\n */\n vertical?: boolean;\n};\n\nexport type TabListContextValue = Pick<TabListProps, 'onTabSelect' | 'selectedValue' | 'reserveSelectedTabSpace'> &\n Required<Pick<TabListProps, 'appearance' | 'disabled' | 'size' | 'vertical'>> & {\n /** A callback to allow a tab to register itself with the tab list. */\n onRegister: RegisterTabEventHandler;\n\n /** A callback to allow a tab to unregister itself with the tab list. */\n onUnregister: RegisterTabEventHandler;\n /**\n * A callback to allow a tab to select itself when pressed.\n */\n onSelect: SelectTabEventHandler;\n /**\n * Gets the registered tab data along with current and previous selected values.\n */\n getRegisteredTabs: () => {\n selectedValue?: TabValue;\n previousSelectedValue?: TabValue;\n registeredTabs: Record<string, TabRegisterData>;\n };\n };\n\n/**\n * Context values used in rendering TabList.\n */\nexport type TabListContextValues = {\n /**\n * The context of the tab list available to each tab.\n */\n tabList: TabListContextValue;\n};\n\n/**\n * State used in rendering TabList.\n */\nexport type TabListState = ComponentState<Required<TabListSlots>> & TabListContextValue;\n"]}