@fluentui/react-tabs 9.0.10 → 9.1.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.json +68 -1
- package/CHANGELOG.md +21 -2
- package/dist/index.d.ts +18 -5
- package/lib/components/Tab/Tab.types.js.map +1 -1
- package/lib/components/Tab/renderTab.js +2 -0
- package/lib/components/Tab/renderTab.js.map +1 -1
- package/lib/components/Tab/useTab.js +2 -0
- package/lib/components/Tab/useTab.js.map +1 -1
- package/lib/components/Tab/useTabStyles.js +125 -37
- package/lib/components/Tab/useTabStyles.js.map +1 -1
- package/lib/components/TabList/TabList.types.js.map +1 -1
- package/lib/components/TabList/TabListContext.js +1 -0
- package/lib/components/TabList/TabListContext.js.map +1 -1
- package/lib/components/TabList/useTabList.js +2 -0
- package/lib/components/TabList/useTabList.js.map +1 -1
- package/lib/components/TabList/useTabListContextValues.js +2 -0
- package/lib/components/TabList/useTabListContextValues.js.map +1 -1
- package/lib-commonjs/components/Tab/renderTab.js +2 -0
- package/lib-commonjs/components/Tab/renderTab.js.map +1 -1
- package/lib-commonjs/components/Tab/useTab.js +2 -0
- package/lib-commonjs/components/Tab/useTab.js.map +1 -1
- package/lib-commonjs/components/Tab/useTabStyles.js +125 -37
- package/lib-commonjs/components/Tab/useTabStyles.js.map +1 -1
- package/lib-commonjs/components/TabList/TabListContext.js +1 -0
- package/lib-commonjs/components/TabList/TabListContext.js.map +1 -1
- package/lib-commonjs/components/TabList/useTabList.js +2 -0
- package/lib-commonjs/components/TabList/useTabList.js.map +1 -1
- package/lib-commonjs/components/TabList/useTabListContextValues.js +2 -0
- package/lib-commonjs/components/TabList/useTabListContextValues.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,74 @@
|
|
|
2
2
|
"name": "@fluentui/react-tabs",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Fri, 11 Nov 2022 14:53:30 GMT",
|
|
6
|
+
"tag": "@fluentui/react-tabs_v9.1.0",
|
|
7
|
+
"version": "9.1.0",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "gcox@microsoft.com",
|
|
12
|
+
"package": "@fluentui/react-tabs",
|
|
13
|
+
"commit": "715bd7f0686e1080ec0cbbdb5aa14c0d6ef18498",
|
|
14
|
+
"comment": "Added support for regular/filled icon toggling"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"minor": [
|
|
18
|
+
{
|
|
19
|
+
"author": "gcox@microsoft.com",
|
|
20
|
+
"package": "@fluentui/react-tabs",
|
|
21
|
+
"commit": "b0f2a9accff1456c09a3df81b46a7e84191cb3d6",
|
|
22
|
+
"comment": "Added support for reserving space for selected state"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"author": "gcox@microsoft.com",
|
|
26
|
+
"package": "@fluentui/react-tabs",
|
|
27
|
+
"commit": "d5d03853c4aabcf7cedd715caddd987ba44c1a60",
|
|
28
|
+
"comment": "Added large size tabs"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"author": "beachball",
|
|
32
|
+
"package": "@fluentui/react-tabs",
|
|
33
|
+
"comment": "Bump @fluentui/react-context-selector to v9.1.1",
|
|
34
|
+
"commit": "b4c9a0ae8d7444bf746f1307ab01e2dc16310720"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"author": "beachball",
|
|
38
|
+
"package": "@fluentui/react-tabs",
|
|
39
|
+
"comment": "Bump @fluentui/react-tabster to v9.3.0",
|
|
40
|
+
"commit": "b4c9a0ae8d7444bf746f1307ab01e2dc16310720"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"author": "beachball",
|
|
44
|
+
"package": "@fluentui/react-tabs",
|
|
45
|
+
"comment": "Bump @fluentui/react-theme to v9.1.2",
|
|
46
|
+
"commit": "b4c9a0ae8d7444bf746f1307ab01e2dc16310720"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"author": "beachball",
|
|
50
|
+
"package": "@fluentui/react-tabs",
|
|
51
|
+
"comment": "Bump @fluentui/react-utilities to v9.2.1",
|
|
52
|
+
"commit": "b4c9a0ae8d7444bf746f1307ab01e2dc16310720"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"author": "beachball",
|
|
56
|
+
"package": "@fluentui/react-tabs",
|
|
57
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.18",
|
|
58
|
+
"commit": "b4c9a0ae8d7444bf746f1307ab01e2dc16310720"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"none": [
|
|
62
|
+
{
|
|
63
|
+
"author": "martinhochel@microsoft.com",
|
|
64
|
+
"package": "@fluentui/react-tabs",
|
|
65
|
+
"commit": "87859b052155ca206ef3540a2a9623803f6e2b93",
|
|
66
|
+
"comment": "test: replace deprecated module.parent with require.main within isConformance"
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"date": "Wed, 02 Nov 2022 11:58:03 GMT",
|
|
6
73
|
"tag": "@fluentui/react-tabs_v9.0.10",
|
|
7
74
|
"version": "9.0.10",
|
|
8
75
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,31 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-tabs
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 11 Nov 2022 14:53:30 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.1.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabs_v9.1.0)
|
|
8
|
+
|
|
9
|
+
Fri, 11 Nov 2022 14:53:30 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabs_v9.0.10..@fluentui/react-tabs_v9.1.0)
|
|
11
|
+
|
|
12
|
+
### Minor changes
|
|
13
|
+
|
|
14
|
+
- Added support for reserving space for selected state ([PR #25542](https://github.com/microsoft/fluentui/pull/25542) by gcox@microsoft.com)
|
|
15
|
+
- Added large size tabs ([PR #25577](https://github.com/microsoft/fluentui/pull/25577) by gcox@microsoft.com)
|
|
16
|
+
- Bump @fluentui/react-context-selector to v9.1.1 ([PR #25615](https://github.com/microsoft/fluentui/pull/25615) by beachball)
|
|
17
|
+
- Bump @fluentui/react-tabster to v9.3.0 ([PR #25615](https://github.com/microsoft/fluentui/pull/25615) by beachball)
|
|
18
|
+
- Bump @fluentui/react-theme to v9.1.2 ([PR #25615](https://github.com/microsoft/fluentui/pull/25615) by beachball)
|
|
19
|
+
- Bump @fluentui/react-utilities to v9.2.1 ([PR #25615](https://github.com/microsoft/fluentui/pull/25615) by beachball)
|
|
20
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.18 ([PR #25615](https://github.com/microsoft/fluentui/pull/25615) by beachball)
|
|
21
|
+
|
|
22
|
+
### Patches
|
|
23
|
+
|
|
24
|
+
- Added support for regular/filled icon toggling ([PR #25597](https://github.com/microsoft/fluentui/pull/25597) by gcox@microsoft.com)
|
|
25
|
+
|
|
7
26
|
## [9.0.10](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabs_v9.0.10)
|
|
8
27
|
|
|
9
|
-
Wed, 02 Nov 2022 11:
|
|
28
|
+
Wed, 02 Nov 2022 11:58:03 GMT
|
|
10
29
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabs_v9.0.9..@fluentui/react-tabs_v9.0.10)
|
|
11
30
|
|
|
12
31
|
### Patches
|
package/dist/index.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export declare const TabList: ForwardRefComponent<TabListProps>;
|
|
|
42
42
|
|
|
43
43
|
export declare const tabListClassNames: SlotClassNames<TabListSlots>;
|
|
44
44
|
|
|
45
|
-
export declare type TabListContextValue = Pick<TabListProps, 'onTabSelect' | 'selectedValue'> & Required<Pick<TabListProps, 'appearance' | 'disabled' | 'size' | 'vertical'>> & {
|
|
45
|
+
export declare type TabListContextValue = Pick<TabListProps, 'onTabSelect' | 'selectedValue' | 'reserveSelectedTabSpace'> & Required<Pick<TabListProps, 'appearance' | 'disabled' | 'size' | 'vertical'>> & {
|
|
46
46
|
/** A callback to allow a tab to register itself with the tab list. */
|
|
47
47
|
onRegister: RegisterTabEventHandler;
|
|
48
48
|
/** A callback to allow a tab to unregister itself with the tab list. */
|
|
@@ -83,6 +83,14 @@ export declare type TabListProps = ComponentProps<TabListSlots> & {
|
|
|
83
83
|
* @default 'transparent'
|
|
84
84
|
*/
|
|
85
85
|
appearance?: 'transparent' | 'subtle';
|
|
86
|
+
/**
|
|
87
|
+
* Tab size may change between unselected and selected states.
|
|
88
|
+
* The default scenario is a selected tab has bold text.
|
|
89
|
+
*
|
|
90
|
+
* When true, this property requests tabs be the same size whether unselected or selected.
|
|
91
|
+
* @default true
|
|
92
|
+
*/
|
|
93
|
+
reserveSelectedTabSpace?: boolean;
|
|
86
94
|
/**
|
|
87
95
|
* The value of the tab to be selected by default.
|
|
88
96
|
* Typically useful when the selectedValue is uncontrolled.
|
|
@@ -102,11 +110,11 @@ export declare type TabListProps = ComponentProps<TabListSlots> & {
|
|
|
102
110
|
*/
|
|
103
111
|
selectedValue?: TabValue;
|
|
104
112
|
/**
|
|
105
|
-
* A tab list can be either 'small' or '
|
|
113
|
+
* A tab list can be either 'small', 'medium', or 'large' size.
|
|
106
114
|
* The size affects each of the contained tabs.
|
|
107
115
|
* @default 'medium'
|
|
108
116
|
*/
|
|
109
|
-
size?: 'small' | 'medium';
|
|
117
|
+
size?: 'small' | 'medium' | 'large';
|
|
110
118
|
/**
|
|
111
119
|
* A tab list can arrange its tabs vertically.
|
|
112
120
|
* @default false
|
|
@@ -185,9 +193,14 @@ export declare type TabState = ComponentState<TabSlots> & Pick<TabProps, 'value'
|
|
|
185
193
|
*/
|
|
186
194
|
selected: boolean;
|
|
187
195
|
/**
|
|
188
|
-
*
|
|
196
|
+
* When defined, tab content with selected style is rendered hidden to reserve space.
|
|
197
|
+
* This keeps consistent content size between unselected and selected states.
|
|
198
|
+
*/
|
|
199
|
+
contentReservedSpaceClassName?: string;
|
|
200
|
+
/**
|
|
201
|
+
* A tab can be either 'small', 'medium', or 'large' size.
|
|
189
202
|
*/
|
|
190
|
-
size: 'small' | 'medium';
|
|
203
|
+
size: 'small' | 'medium' | 'large';
|
|
191
204
|
/**
|
|
192
205
|
* A tab can arrange its content based on if the tabs in the list are arranged vertically.
|
|
193
206
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-tabs/src/components/Tab/Tab.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\n/**\n * Any value that identifies a specific tab.\n */\nexport type TabValue = unknown;\n\nexport type TabSlots = {\n /**\n * Root of the component.\n */\n root: Slot<'button'>;\n\n /**\n * Icon that renders before the content.\n */\n icon?: Slot<'span'>;\n\n /**\n * Component children are placed in this slot\n * Avoid using the `children` property in this slot in favour of Component children whenever possible.\n */\n content: NonNullable<Slot<'span'>>;\n};\n\n/**\n * Tab Props\n */\nexport type TabProps = ComponentProps<Partial<TabSlots>> & {\n /**\n * A tab can be set to disable interaction.\n * @default false\n */\n disabled?: boolean;\n /**\n * The value that identifies this tab when selected.\n */\n value: TabValue;\n};\n\n/**\n * State used in rendering Tab\n */\nexport type TabState = ComponentState<TabSlots> &\n Pick<TabProps, 'value'> &\n Required<Pick<TabProps, 'disabled'>> & {\n /**\n * A tab supports 'transparent' and 'subtle' appearance.\n */\n appearance?: 'transparent' | 'subtle';\n /**\n * A tab can have only an icon slot filled and no content.\n */\n iconOnly: boolean;\n /**\n * If this tab is selected\n */\n selected: boolean;\n /**\n * A tab can be either 'small' or '
|
|
1
|
+
{"version":3,"file":"Tab.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-tabs/src/components/Tab/Tab.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\n/**\n * Any value that identifies a specific tab.\n */\nexport type TabValue = unknown;\n\nexport type TabSlots = {\n /**\n * Root of the component.\n */\n root: Slot<'button'>;\n\n /**\n * Icon that renders before the content.\n */\n icon?: Slot<'span'>;\n\n /**\n * Component children are placed in this slot\n * Avoid using the `children` property in this slot in favour of Component children whenever possible.\n */\n content: NonNullable<Slot<'span'>>;\n};\n\n/**\n * Tab Props\n */\nexport type TabProps = ComponentProps<Partial<TabSlots>> & {\n /**\n * A tab can be set to disable interaction.\n * @default false\n */\n disabled?: boolean;\n /**\n * The value that identifies this tab when selected.\n */\n value: TabValue;\n};\n\n/**\n * State used in rendering Tab\n */\nexport type TabState = ComponentState<TabSlots> &\n Pick<TabProps, 'value'> &\n Required<Pick<TabProps, 'disabled'>> & {\n /**\n * A tab supports 'transparent' and 'subtle' appearance.\n */\n appearance?: 'transparent' | 'subtle';\n /**\n * A tab can have only an icon slot filled and no content.\n */\n iconOnly: boolean;\n /**\n * If this tab is selected\n */\n selected: boolean;\n /**\n * When defined, tab content with selected style is rendered hidden to reserve space.\n * This keeps consistent content size between unselected and selected states.\n */\n contentReservedSpaceClassName?: string;\n /**\n * A tab can be either 'small', 'medium', or 'large' size.\n */\n size: 'small' | 'medium' | 'large';\n /**\n * A tab can arrange its content based on if the tabs in the list are arranged vertically.\n */\n vertical: boolean;\n };\n"]}
|
|
@@ -12,6 +12,8 @@ export const renderTab_unstable = state => {
|
|
|
12
12
|
return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
|
|
13
13
|
}, slots.icon && /*#__PURE__*/React.createElement(slots.icon, { ...slotProps.icon
|
|
14
14
|
}), !state.iconOnly && /*#__PURE__*/React.createElement(slots.content, { ...slotProps.content
|
|
15
|
+
}), !state.selected && !state.iconOnly && state.contentReservedSpaceClassName !== undefined && /*#__PURE__*/React.createElement(slots.content, { ...slotProps.content,
|
|
16
|
+
className: state.contentReservedSpaceClassName
|
|
15
17
|
}));
|
|
16
18
|
};
|
|
17
19
|
//# sourceMappingURL=renderTab.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["packages/react-components/react-tabs/src/components/Tab/renderTab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,kBAAkB,GAAI,KAAD,IAAoB;EACpD,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAW,KAAX,CAArC;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EACG,KAAK,CAAC,IAAN,iBAAc,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CADjB,EAEG,CAAC,KAAK,CAAC,QAAP,iBAAmB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,EAAA,GAAK,SAAS,CAAC;EAAf,CAAd,CAFtB,CADF;
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-tabs/src/components/Tab/renderTab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,kBAAkB,GAAI,KAAD,IAAoB;EACpD,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAW,KAAX,CAArC;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EACG,KAAK,CAAC,IAAN,iBAAc,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CADjB,EAEG,CAAC,KAAK,CAAC,QAAP,iBAAmB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,EAAA,GAAK,SAAS,CAAC;EAAf,CAAd,CAFtB,EAGG,CAAC,KAAK,CAAC,QAAP,IAAmB,CAAC,KAAK,CAAC,QAA1B,IAAsC,KAAK,CAAC,6BAAN,KAAwC,SAA9E,iBACC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,EAAA,GAAK,SAAS,CAAC,OAAf;IAAwB,SAAS,EAAE,KAAK,CAAC;EAAzC,CAAd,CAJJ,CADF;AASD,CAZM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TabState, TabSlots } from './Tab.types';\n\n/**\n * Render the final JSX of Tab\n */\nexport const renderTab_unstable = (state: TabState) => {\n const { slots, slotProps } = getSlots<TabSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slots.icon && <slots.icon {...slotProps.icon} />}\n {!state.iconOnly && <slots.content {...slotProps.content} />}\n {!state.selected && !state.iconOnly && state.contentReservedSpaceClassName !== undefined && (\n <slots.content {...slotProps.content} className={state.contentReservedSpaceClassName} />\n )}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -20,6 +20,7 @@ export const useTab_unstable = (props, ref) => {
|
|
|
20
20
|
value
|
|
21
21
|
} = props;
|
|
22
22
|
const appearance = useContextSelector(TabListContext, ctx => ctx.appearance);
|
|
23
|
+
const reserveSelectedTabSpace = useContextSelector(TabListContext, ctx => ctx.reserveSelectedTabSpace);
|
|
23
24
|
const listDisabled = useContextSelector(TabListContext, ctx => ctx.disabled);
|
|
24
25
|
const selected = useContextSelector(TabListContext, ctx => ctx.selectedValue === value);
|
|
25
26
|
const onRegister = useContextSelector(TabListContext, ctx => ctx.onRegister);
|
|
@@ -72,6 +73,7 @@ export const useTab_unstable = (props, ref) => {
|
|
|
72
73
|
iconOnly: Boolean((iconShorthand === null || iconShorthand === void 0 ? void 0 : iconShorthand.children) && !contentShorthand.children),
|
|
73
74
|
content: contentShorthand,
|
|
74
75
|
appearance,
|
|
76
|
+
contentReservedSpaceClassName: reserveSelectedTabSpace ? '' : undefined,
|
|
75
77
|
disabled,
|
|
76
78
|
selected,
|
|
77
79
|
size,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["packages/react-components/react-tabs/src/components/Tab/useTab.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,qBAAT,EAAgC,gBAAhC,EAAkD,gBAAlD,EAAoE,aAApE,QAAyF,2BAAzF;AAEA,SAAS,cAAT,QAA+B,2BAA/B;AACA,SAAS,kBAAT,QAAmC,kCAAnC;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,eAAe,GAAG,CAAC,KAAD,EAAkB,GAAlB,KAA2D;EACxF,MAAM;IAAE,OAAF;IAAW,QAAQ,EAAE,WAAW,GAAG,KAAnC;IAA0C,IAA1C;IAAgD;EAAhD,IAA0D,KAAhE;EAEA,MAAM,UAAU,GAAG,kBAAkB,CAAC,cAAD,EAAiB,GAAG,IAAI,GAAG,CAAC,UAA5B,CAArC;EACA,MAAM,YAAY,GAAG,kBAAkB,CAAC,cAAD,EAAiB,GAAG,IAAI,GAAG,CAAC,QAA5B,CAAvC;EACA,MAAM,QAAQ,GAAG,kBAAkB,CAAC,cAAD,EAAiB,GAAG,IAAI,GAAG,CAAC,aAAJ,KAAsB,KAA9C,CAAnC;EACA,MAAM,UAAU,GAAG,kBAAkB,CAAC,cAAD,EAAiB,GAAG,IAAI,GAAG,CAAC,UAA5B,CAArC;EACA,MAAM,YAAY,GAAG,kBAAkB,CAAC,cAAD,EAAiB,GAAG,IAAI,GAAG,CAAC,YAA5B,CAAvC;EACA,MAAM,QAAQ,GAAG,kBAAkB,CAAC,cAAD,E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Aa,CAAC,GAAD,EAAM,QAAN,CADkB;MAEpC,IAAI,EAAE,KAF8B;MAGpC,IAAI,EAAE,QAH8B;MAIpC;MACA;MACA,iBAAiB,QAAQ,GAAG,SAAH,GAAe,GAAG,QAAQ,EANf;MAOpC,GAAG,KAPiC;MAQpC,QARoC;MASpC;IAToC,CAAX,CANtB;IAiBL,IAAI,EAAE,aAjBD;IAkBL,QAAQ,EAAE,OAAO,CAAC,CAAA,aAAa,KAAA,IAAb,IAAA,aAAa,KAAA,KAAA,CAAb,GAAa,KAAA,CAAb,GAAA,aAAa,CAAE,QAAf,KAA2B,CAAC,gBAAgB,CAAC,QAA9C,CAlBZ;IAmBL,OAAO,EAAE,gBAnBJ;IAoBL,UApBK;IAqBL,6BAA6B,EAAE,uBAAuB,GAAG,EAAH,GAAQ,SArBzD;IAsBL,QAtBK;IAuBL,QAvBK;IAwBL,IAxBK;IAyBL,KAzBK;IA0BL;EA1BK,CAAP;AA4BD,CA1DM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand, useEventCallback, useMergedRefs } from '@fluentui/react-utilities';\nimport type { TabProps, TabState } from './Tab.types';\nimport { TabListContext } from '../TabList/TabListContext';\nimport { useContextSelector } from '@fluentui/react-context-selector';\nimport { SelectTabEvent } from '../TabList/TabList.types';\n\n/**\n * Create the state required to render Tab.\n *\n * The returned state can be modified with hooks such as useTabStyles_unstable,\n * before being passed to renderTab_unstable.\n *\n * @param props - props from this instance of Tab\n * @param ref - reference to root HTMLElement of Tab\n */\nexport const useTab_unstable = (props: TabProps, ref: React.Ref<HTMLElement>): TabState => {\n const { content, disabled: tabDisabled = false, icon, value } = props;\n\n const appearance = useContextSelector(TabListContext, ctx => ctx.appearance);\n const reserveSelectedTabSpace = useContextSelector(TabListContext, ctx => ctx.reserveSelectedTabSpace);\n const listDisabled = useContextSelector(TabListContext, ctx => ctx.disabled);\n const selected = useContextSelector(TabListContext, ctx => ctx.selectedValue === value);\n const onRegister = useContextSelector(TabListContext, ctx => ctx.onRegister);\n const onUnregister = useContextSelector(TabListContext, ctx => ctx.onUnregister);\n const onSelect = useContextSelector(TabListContext, ctx => ctx.onSelect);\n const size = useContextSelector(TabListContext, ctx => ctx.size);\n const vertical = useContextSelector(TabListContext, ctx => !!ctx.vertical);\n const disabled = listDisabled || tabDisabled;\n\n const innerRef = React.useRef<HTMLElement>(null);\n const onClick = useEventCallback((event: SelectTabEvent) => onSelect(event, { value }));\n\n React.useEffect(() => {\n onRegister({\n value,\n ref: innerRef,\n });\n\n return () => {\n onUnregister({ value, ref: innerRef });\n };\n }, [onRegister, onUnregister, innerRef, value]);\n\n const iconShorthand = resolveShorthand(icon);\n const contentShorthand = resolveShorthand(content, { required: true, defaultProps: { children: props.children } });\n return {\n components: {\n root: 'button',\n icon: 'span',\n content: 'span',\n },\n root: getNativeElementProps('button', {\n ref: useMergedRefs(ref, innerRef),\n role: 'tab',\n type: 'button',\n // aria-selected undefined indicates it is not selectable\n // according to https://www.w3.org/TR/wai-aria-1.1/#aria-selected\n 'aria-selected': disabled ? undefined : `${selected}`,\n ...props,\n disabled,\n onClick,\n }),\n icon: iconShorthand,\n iconOnly: Boolean(iconShorthand?.children && !contentShorthand.children),\n content: contentShorthand,\n appearance,\n contentReservedSpaceClassName: reserveSelectedTabSpace ? '' : undefined,\n disabled,\n selected,\n size,\n value,\n vertical,\n };\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -7,6 +7,15 @@ export const tabClassNames = {
|
|
|
7
7
|
icon: 'fui-Tab__icon',
|
|
8
8
|
content: 'fui-Tab__content'
|
|
9
9
|
};
|
|
10
|
+
const reservedSpaceClassNames = {
|
|
11
|
+
content: 'fui-Tab__content--reserved-space'
|
|
12
|
+
}; // These should match the constants defined in @fluentui/react-icons
|
|
13
|
+
// This package avoids taking a dependency on the icons package for only the constants.
|
|
14
|
+
|
|
15
|
+
const iconClassNames = {
|
|
16
|
+
filled: 'fui-Icon-filled',
|
|
17
|
+
regular: 'fui-Icon-regular'
|
|
18
|
+
};
|
|
10
19
|
/**
|
|
11
20
|
* Styles for the root slot
|
|
12
21
|
*/
|
|
@@ -48,6 +57,20 @@ const useRootStyles = /*#__PURE__*/__styles({
|
|
|
48
57
|
"vertical": {
|
|
49
58
|
"Brf1p80": "f1s9ku6b"
|
|
50
59
|
},
|
|
60
|
+
"smallHorizontal": {
|
|
61
|
+
"i8kkvl": "f14mj54c",
|
|
62
|
+
"z8tnut": "fp2oml8",
|
|
63
|
+
"z189sj": ["fdw0yi8", "fk8j09s"],
|
|
64
|
+
"Byoj8tv": "f1tdddsa",
|
|
65
|
+
"uwmqm3": ["fk8j09s", "fdw0yi8"]
|
|
66
|
+
},
|
|
67
|
+
"smallVertical": {
|
|
68
|
+
"i8kkvl": "f14mj54c",
|
|
69
|
+
"z8tnut": "fclwglc",
|
|
70
|
+
"z189sj": ["fdw0yi8", "fk8j09s"],
|
|
71
|
+
"Byoj8tv": "fywfov9",
|
|
72
|
+
"uwmqm3": ["fk8j09s", "fdw0yi8"]
|
|
73
|
+
},
|
|
51
74
|
"mediumHorizontal": {
|
|
52
75
|
"i8kkvl": "f1rjii52",
|
|
53
76
|
"z8tnut": "f5yzyt",
|
|
@@ -62,19 +85,19 @@ const useRootStyles = /*#__PURE__*/__styles({
|
|
|
62
85
|
"Byoj8tv": "f1tdddsa",
|
|
63
86
|
"uwmqm3": ["f1ng84yb", "f11gcy0p"]
|
|
64
87
|
},
|
|
65
|
-
"
|
|
66
|
-
"i8kkvl": "
|
|
67
|
-
"z8tnut": "
|
|
68
|
-
"z189sj": ["
|
|
69
|
-
"Byoj8tv": "
|
|
70
|
-
"uwmqm3": ["
|
|
88
|
+
"largeHorizontal": {
|
|
89
|
+
"i8kkvl": "f1rjii52",
|
|
90
|
+
"z8tnut": "fikn0iw",
|
|
91
|
+
"z189sj": ["f11gcy0p", "f1ng84yb"],
|
|
92
|
+
"Byoj8tv": "fdxej3c",
|
|
93
|
+
"uwmqm3": ["f1ng84yb", "f11gcy0p"]
|
|
71
94
|
},
|
|
72
|
-
"
|
|
73
|
-
"i8kkvl": "
|
|
74
|
-
"z8tnut": "
|
|
75
|
-
"z189sj": ["
|
|
76
|
-
"Byoj8tv": "
|
|
77
|
-
"uwmqm3": ["
|
|
95
|
+
"largeVertical": {
|
|
96
|
+
"i8kkvl": "f1rjii52",
|
|
97
|
+
"z8tnut": "f1kwiid1",
|
|
98
|
+
"z189sj": ["f11gcy0p", "f1ng84yb"],
|
|
99
|
+
"Byoj8tv": "f5b47ha",
|
|
100
|
+
"uwmqm3": ["f1ng84yb", "f11gcy0p"]
|
|
78
101
|
},
|
|
79
102
|
"transparent": {
|
|
80
103
|
"De3pzq": "f1c21dwh",
|
|
@@ -113,7 +136,7 @@ const useRootStyles = /*#__PURE__*/__styles({
|
|
|
113
136
|
"a4hkcw": "fhklyu5"
|
|
114
137
|
}
|
|
115
138
|
}, {
|
|
116
|
-
"d": [".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fwhevhj{border-top-color:none;}", ".f61n433{border-right-color:none;}", ".f1q8l70w{border-left-color:none;}", ".fv1dfc8{border-bottom-color:none;}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".fre7gi1{border-top-width:0;}", ".f1358rze{border-right-width:0;}", ".f1rvrf73{border-left-width:0;}", ".fqdk4by{border-bottom-width:0;}", ".f1k6fduh{cursor:pointer;}", ".f13qh94s{display:grid;}", ".fi64zpg{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}", ".f1u07yai{grid-auto-flow:column;}", ".frn2hmy{grid-template-columns:auto;}", ".f1olsevy{grid-template-rows:auto;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f1s6fcnf{outline-style:none;}", ".f10pi13n{position:relative;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f1cxpek8{text-transform:none;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".f1s9ku6b{-webkit-box-pack:start;-ms-flex-pack:start;-webkit-justify-content:start;justify-content:start;}", ".
|
|
139
|
+
"d": [".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fwhevhj{border-top-color:none;}", ".f61n433{border-right-color:none;}", ".f1q8l70w{border-left-color:none;}", ".fv1dfc8{border-bottom-color:none;}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".fre7gi1{border-top-width:0;}", ".f1358rze{border-right-width:0;}", ".f1rvrf73{border-left-width:0;}", ".fqdk4by{border-bottom-width:0;}", ".f1k6fduh{cursor:pointer;}", ".f13qh94s{display:grid;}", ".fi64zpg{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}", ".f1u07yai{grid-auto-flow:column;}", ".frn2hmy{grid-template-columns:auto;}", ".f1olsevy{grid-template-rows:auto;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f1s6fcnf{outline-style:none;}", ".f10pi13n{position:relative;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f1cxpek8{text-transform:none;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".f1s9ku6b{-webkit-box-pack:start;-ms-flex-pack:start;-webkit-justify-content:start;justify-content:start;}", ".f14mj54c{-webkit-column-gap:var(--spacingHorizontalXXS);column-gap:var(--spacingHorizontalXXS);}", ".fp2oml8{padding-top:var(--spacingVerticalSNudge);}", ".fdw0yi8{padding-right:var(--spacingHorizontalSNudge);}", ".fk8j09s{padding-left:var(--spacingHorizontalSNudge);}", ".f1tdddsa{padding-bottom:var(--spacingVerticalSNudge);}", ".fclwglc{padding-top:var(--spacingVerticalXXS);}", ".fywfov9{padding-bottom:var(--spacingVerticalXXS);}", ".f1rjii52{-webkit-column-gap:var(--spacingHorizontalSNudge);column-gap:var(--spacingHorizontalSNudge);}", ".f5yzyt{padding-top:var(--spacingVerticalM);}", ".f11gcy0p{padding-right:var(--spacingHorizontalMNudge);}", ".f1ng84yb{padding-left:var(--spacingHorizontalMNudge);}", ".fx3omr{padding-bottom:var(--spacingVerticalM);}", ".fikn0iw{padding-top:var(--spacingVerticalL);}", ".fdxej3c{padding-bottom:var(--spacingVerticalL);}", ".f1kwiid1{padding-top:var(--spacingVerticalS);}", ".f5b47ha{padding-bottom:var(--spacingVerticalS);}", ".f1c21dwh{background-color:var(--colorTransparentBackground);}", ".fmmjozx .fui-Tab__icon{color:var(--colorNeutralForeground2);}", ".fpkze5g .fui-Tab__content{color:var(--colorNeutralForeground2);}", ".fhovq9v{background-color:var(--colorSubtleBackground);}", ".fato7r6 .fui-Tab__icon{color:var(--colorNeutralForegroundDisabled);}", ".fao1bnu .fui-Tab__content{color:var(--colorNeutralForegroundDisabled);}", ".fdrzuqr{cursor:not-allowed;}", ".f1cadz5z .fui-Tab__icon{color:var(--colorCompoundBrandForeground1);}", ".ffplhdr .fui-Tab__content{color:var(--colorNeutralForeground1);}"],
|
|
117
140
|
"h": [".fjxutwb:hover{background-color:var(--colorTransparentBackgroundHover);}", ".f1mfqf41:hover .fui-Tab__icon{color:var(--colorNeutralForeground2Hover);}", ".f149wc3x:hover .fui-Tab__content{color:var(--colorNeutralForeground2Hover);}", ".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}", ".f1ck17l:hover .fui-Tab__icon{color:var(--colorCompoundBrandForeground1Hover);}", ".ffth601:hover .fui-Tab__content{color:var(--colorNeutralForeground1Hover);}"],
|
|
118
141
|
"a": [".fophhak:active{background-color:var(--colorTransparentBackgroundPressed);}", ".f10aiid4:active .fui-Tab__icon{color:var(--colorNeutralForeground2Pressed);}", ".fjioou7:active .fui-Tab__content{color:var(--colorNeutralForeground2Pressed);}", ".f1wfn5kd:active{background-color:var(--colorSubtleBackgroundPressed);}", ".f42ak0g:active .fui-Tab__icon{color:var(--colorCompoundBrandForeground1Pressed);}", ".fhklyu5:active .fui-Tab__content{color:var(--colorNeutralForeground1Pressed);}"]
|
|
119
142
|
});
|
|
@@ -169,6 +192,18 @@ const usePendingIndicatorStyles = /*#__PURE__*/__styles({
|
|
|
169
192
|
"az7l2e": "f1ut20fw",
|
|
170
193
|
"Bkydozb": "fhrzcfn"
|
|
171
194
|
},
|
|
195
|
+
"smallHorizontal": {
|
|
196
|
+
"lawp4y": "fchca7p",
|
|
197
|
+
"Baz25je": "f1r53b5e",
|
|
198
|
+
"Fbdkly": ["f1s6rxz5", "fo35v8s"],
|
|
199
|
+
"mdwyqc": ["fo35v8s", "f1s6rxz5"]
|
|
200
|
+
},
|
|
201
|
+
"smallVertical": {
|
|
202
|
+
"lawp4y": "fze4zud",
|
|
203
|
+
"Fbdkly": ["f1fzr1x6", "f1f351id"],
|
|
204
|
+
"Bciustq": "fdp32p8",
|
|
205
|
+
"Ccq8qp": "f1aij3q"
|
|
206
|
+
},
|
|
172
207
|
"mediumHorizontal": {
|
|
173
208
|
"lawp4y": "fchca7p",
|
|
174
209
|
"Baz25je": "f1s2r9ax",
|
|
@@ -181,16 +216,16 @@ const usePendingIndicatorStyles = /*#__PURE__*/__styles({
|
|
|
181
216
|
"Bciustq": "f117lcb2",
|
|
182
217
|
"Ccq8qp": "f1aij3q"
|
|
183
218
|
},
|
|
184
|
-
"
|
|
219
|
+
"largeHorizontal": {
|
|
185
220
|
"lawp4y": "fchca7p",
|
|
186
|
-
"Baz25je": "
|
|
187
|
-
"Fbdkly": ["
|
|
188
|
-
"mdwyqc": ["
|
|
221
|
+
"Baz25je": "f1s2r9ax",
|
|
222
|
+
"Fbdkly": ["f1o0nnkk", "fxb7rol"],
|
|
223
|
+
"mdwyqc": ["fxb7rol", "f1o0nnkk"]
|
|
189
224
|
},
|
|
190
|
-
"
|
|
191
|
-
"lawp4y": "
|
|
225
|
+
"largeVertical": {
|
|
226
|
+
"lawp4y": "fel9d3z",
|
|
192
227
|
"Fbdkly": ["f1fzr1x6", "f1f351id"],
|
|
193
|
-
"Bciustq": "
|
|
228
|
+
"Bciustq": "f6vqlre",
|
|
194
229
|
"Ccq8qp": "f1aij3q"
|
|
195
230
|
}
|
|
196
231
|
}, {
|
|
@@ -201,7 +236,7 @@ const usePendingIndicatorStyles = /*#__PURE__*/__styles({
|
|
|
201
236
|
}], ["@media (forced-colors: active){.fvje46l:active::before{background-color:Highlight;}}", {
|
|
202
237
|
"m": "(forced-colors: active)"
|
|
203
238
|
}]],
|
|
204
|
-
"d": [".fchca7p::before{bottom:0;}", ".
|
|
239
|
+
"d": [".fchca7p::before{bottom:0;}", ".f1r53b5e::before{height:var(--strokeWidthThick);}", ".f1s6rxz5::before{left:var(--spacingHorizontalSNudge);}", ".fo35v8s::before{right:var(--spacingHorizontalSNudge);}", ".fze4zud::before{bottom:var(--spacingVerticalXS);}", ".f1fzr1x6::before{left:0;}", ".f1f351id::before{right:0;}", ".fdp32p8::before{top:var(--spacingVerticalXS);}", ".f1aij3q::before{width:var(--strokeWidthThicker);}", ".f1s2r9ax::before{height:var(--strokeWidthThicker);}", ".f1o0nnkk::before{left:var(--spacingHorizontalM);}", ".fxb7rol::before{right:var(--spacingHorizontalM);}", ".f17jracn::before{bottom:var(--spacingVerticalS);}", ".f117lcb2::before{top:var(--spacingVerticalS);}", ".fel9d3z::before{bottom:var(--spacingVerticalMNudge);}", ".f6vqlre::before{top:var(--spacingVerticalMNudge);}"]
|
|
205
240
|
});
|
|
206
241
|
|
|
207
242
|
const useActiveIndicatorStyles = /*#__PURE__*/__styles({
|
|
@@ -226,6 +261,18 @@ const useActiveIndicatorStyles = /*#__PURE__*/__styles({
|
|
|
226
261
|
"disabled": {
|
|
227
262
|
"Bjyk6c5": "f13lkzet"
|
|
228
263
|
},
|
|
264
|
+
"smallHorizontal": {
|
|
265
|
+
"By385i5": "fo72kxq",
|
|
266
|
+
"Dlnsje": "f9bb2ob",
|
|
267
|
+
"Eqx8gd": ["f1q70ajw", "f18rbzdx"],
|
|
268
|
+
"B1piin3": ["f18rbzdx", "f1q70ajw"]
|
|
269
|
+
},
|
|
270
|
+
"smallVertical": {
|
|
271
|
+
"By385i5": "fqbue9b",
|
|
272
|
+
"Eqx8gd": ["f1n6gb5g", "f15yvnhg"],
|
|
273
|
+
"bn5sak": "fk1klkt",
|
|
274
|
+
"a2br6o": "f1o25lip"
|
|
275
|
+
},
|
|
229
276
|
"mediumHorizontal": {
|
|
230
277
|
"By385i5": "fo72kxq",
|
|
231
278
|
"Dlnsje": "f1vx7lu8",
|
|
@@ -238,20 +285,20 @@ const useActiveIndicatorStyles = /*#__PURE__*/__styles({
|
|
|
238
285
|
"bn5sak": "fqchiol",
|
|
239
286
|
"a2br6o": "f1o25lip"
|
|
240
287
|
},
|
|
241
|
-
"
|
|
288
|
+
"largeHorizontal": {
|
|
242
289
|
"By385i5": "fo72kxq",
|
|
243
|
-
"Dlnsje": "
|
|
244
|
-
"Eqx8gd": ["
|
|
245
|
-
"B1piin3": ["
|
|
290
|
+
"Dlnsje": "f1vx7lu8",
|
|
291
|
+
"Eqx8gd": ["fna7m5n", "f1oxpfwv"],
|
|
292
|
+
"B1piin3": ["f1oxpfwv", "fna7m5n"]
|
|
246
293
|
},
|
|
247
|
-
"
|
|
248
|
-
"By385i5": "
|
|
294
|
+
"largeVertical": {
|
|
295
|
+
"By385i5": "f1w7dm5g",
|
|
249
296
|
"Eqx8gd": ["f1n6gb5g", "f15yvnhg"],
|
|
250
|
-
"bn5sak": "
|
|
297
|
+
"bn5sak": "f1p6em4m",
|
|
251
298
|
"a2br6o": "f1o25lip"
|
|
252
299
|
}
|
|
253
300
|
}, {
|
|
254
|
-
"d": [".f1rp0jgh::after{background-color:var(--colorTransparentStroke);}", ".fprarqb::after{border-bottom-right-radius:var(--borderRadiusCircular);}", ".f14vs0nd::after{border-bottom-left-radius:var(--borderRadiusCircular);}", ".f1gtfqs9::after{border-top-right-radius:var(--borderRadiusCircular);}", ".f18zvfd9::after{border-top-left-radius:var(--borderRadiusCircular);}", ".f13zj6fq::after{content:\"\";}", ".f1mdlcz9::after{position:absolute;}", ".ffmd2fr::after{z-index:1;}", ".f1ksivud::after{background-color:var(--colorCompoundBrandStroke);}", ".f13lkzet::after{background-color:var(--colorNeutralForegroundDisabled);}", ".fo72kxq::after{bottom:0;}", ".
|
|
301
|
+
"d": [".f1rp0jgh::after{background-color:var(--colorTransparentStroke);}", ".fprarqb::after{border-bottom-right-radius:var(--borderRadiusCircular);}", ".f14vs0nd::after{border-bottom-left-radius:var(--borderRadiusCircular);}", ".f1gtfqs9::after{border-top-right-radius:var(--borderRadiusCircular);}", ".f18zvfd9::after{border-top-left-radius:var(--borderRadiusCircular);}", ".f13zj6fq::after{content:\"\";}", ".f1mdlcz9::after{position:absolute;}", ".ffmd2fr::after{z-index:1;}", ".f1ksivud::after{background-color:var(--colorCompoundBrandStroke);}", ".f13lkzet::after{background-color:var(--colorNeutralForegroundDisabled);}", ".fo72kxq::after{bottom:0;}", ".f9bb2ob::after{height:var(--strokeWidthThick);}", ".f1q70ajw::after{left:var(--spacingHorizontalSNudge);}", ".f18rbzdx::after{right:var(--spacingHorizontalSNudge);}", ".fqbue9b::after{bottom:var(--spacingVerticalXS);}", ".f1n6gb5g::after{left:0;}", ".f15yvnhg::after{right:0;}", ".fk1klkt::after{top:var(--spacingVerticalXS);}", ".f1o25lip::after{width:var(--strokeWidthThicker);}", ".f1vx7lu8::after{height:var(--strokeWidthThicker);}", ".fna7m5n::after{left:var(--spacingHorizontalM);}", ".f1oxpfwv::after{right:var(--spacingHorizontalM);}", ".fipylg0::after{bottom:var(--spacingVerticalS);}", ".fqchiol::after{top:var(--spacingVerticalS);}", ".f1w7dm5g::after{bottom:var(--spacingVerticalMNudge);}", ".f1p6em4m::after{top:var(--spacingVerticalMNudge);}"],
|
|
255
302
|
"h": [".f1eytvvh:hover::after{background-color:var(--colorCompoundBrandStrokeHover);}"],
|
|
256
303
|
"a": [".fuaa9s:active::after{background-color:var(--colorCompoundBrandStrokePressed);}"],
|
|
257
304
|
"m": [["@media (forced-colors: active){.fy7ktjt::after{background-color:ButtonText;}}", {
|
|
@@ -269,11 +316,15 @@ const useActiveIndicatorStyles = /*#__PURE__*/__styles({
|
|
|
269
316
|
|
|
270
317
|
const useIconStyles = /*#__PURE__*/__styles({
|
|
271
318
|
"base": {
|
|
319
|
+
"Br312pm": "fwpfdsa",
|
|
320
|
+
"Ijaq50": "f16hsg94",
|
|
272
321
|
"Bt984gj": "f122n59",
|
|
273
322
|
"mc9l5x": "ftuwxu6",
|
|
274
323
|
"Brf1p80": "f4d9j23",
|
|
275
324
|
"B68tc82": "f1p9o1ba",
|
|
276
|
-
"Bmxbyg5": "f1sil6mw"
|
|
325
|
+
"Bmxbyg5": "f1sil6mw",
|
|
326
|
+
"D0sxk3": "f16u1re",
|
|
327
|
+
"t6yez3": "f8bsbmo"
|
|
277
328
|
},
|
|
278
329
|
"small": {
|
|
279
330
|
"Be2twd7": "fe5j1ua",
|
|
@@ -284,9 +335,18 @@ const useIconStyles = /*#__PURE__*/__styles({
|
|
|
284
335
|
"Be2twd7": "fe5j1ua",
|
|
285
336
|
"Bqenvij": "fjamq6b",
|
|
286
337
|
"a9b677": "f64fuq3"
|
|
338
|
+
},
|
|
339
|
+
"large": {
|
|
340
|
+
"Be2twd7": "f1rt2boy",
|
|
341
|
+
"Bqenvij": "frvgh55",
|
|
342
|
+
"a9b677": "fq4mcun"
|
|
343
|
+
},
|
|
344
|
+
"selected": {
|
|
345
|
+
"D0sxk3": "fxoiby5",
|
|
346
|
+
"t6yez3": "f15q0o9g"
|
|
287
347
|
}
|
|
288
348
|
}, {
|
|
289
|
-
"d": [".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".fe5j1ua{font-size:20px;}", ".fjamq6b{height:20px;}", ".f64fuq3{width:20px;}"]
|
|
349
|
+
"d": [".fwpfdsa{grid-column-start:1;}", ".f16hsg94{grid-row-start:1;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f16u1re .fui-Icon-filled{display:none;}", ".f8bsbmo .fui-Icon-regular{display:inline;}", ".fe5j1ua{font-size:20px;}", ".fjamq6b{height:20px;}", ".f64fuq3{width:20px;}", ".f1rt2boy{font-size:24px;}", ".frvgh55{height:24px;}", ".fq4mcun{width:24px;}", ".fxoiby5 .fui-Icon-filled{display:inline;}", ".f15q0o9g .fui-Icon-regular{display:none;}"]
|
|
290
350
|
});
|
|
291
351
|
/**
|
|
292
352
|
* Styles for the content slot (children)
|
|
@@ -311,9 +371,32 @@ const useContentStyles = /*#__PURE__*/__styles({
|
|
|
311
371
|
"Be2twd7": "fkhj508",
|
|
312
372
|
"Bhrd7zp": "fl43uef",
|
|
313
373
|
"Bg96gwp": "f1i3iumi"
|
|
374
|
+
},
|
|
375
|
+
"large": {
|
|
376
|
+
"Bahqtrf": "fk6fouc",
|
|
377
|
+
"Be2twd7": "fod5ikn",
|
|
378
|
+
"Bhrd7zp": "figsok6",
|
|
379
|
+
"Bg96gwp": "faaz57k"
|
|
380
|
+
},
|
|
381
|
+
"largeSelected": {
|
|
382
|
+
"Bahqtrf": "fk6fouc",
|
|
383
|
+
"Be2twd7": "fod5ikn",
|
|
384
|
+
"Bhrd7zp": "fl43uef",
|
|
385
|
+
"Bg96gwp": "faaz57k"
|
|
386
|
+
},
|
|
387
|
+
"noIconBefore": {
|
|
388
|
+
"Br312pm": "fwpfdsa",
|
|
389
|
+
"Ijaq50": "f16hsg94"
|
|
390
|
+
},
|
|
391
|
+
"iconBefore": {
|
|
392
|
+
"Br312pm": "fd46tj4",
|
|
393
|
+
"Ijaq50": "f16hsg94"
|
|
394
|
+
},
|
|
395
|
+
"placeholder": {
|
|
396
|
+
"Bcdw1i0": "fd7fpy0"
|
|
314
397
|
}
|
|
315
398
|
}, {
|
|
316
|
-
"d": [".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".fztplxc{padding-top:var(--spacingVerticalNone);}", ".ffczdla{padding-right:var(--spacingHorizontalXXS);}", ".fgiv446{padding-left:var(--spacingHorizontalXXS);}", ".f9g1xly{padding-bottom:var(--spacingVerticalNone);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}"]
|
|
399
|
+
"d": [".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".fztplxc{padding-top:var(--spacingVerticalNone);}", ".ffczdla{padding-right:var(--spacingHorizontalXXS);}", ".fgiv446{padding-left:var(--spacingHorizontalXXS);}", ".f9g1xly{padding-bottom:var(--spacingVerticalNone);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".fwpfdsa{grid-column-start:1;}", ".f16hsg94{grid-row-start:1;}", ".fd46tj4{grid-column-start:2;}", ".fd7fpy0{visibility:hidden;}"]
|
|
317
400
|
});
|
|
318
401
|
/**
|
|
319
402
|
* Apply styling to the Tab slots based on the state
|
|
@@ -334,15 +417,20 @@ export const useTabStyles_unstable = state => {
|
|
|
334
417
|
size,
|
|
335
418
|
vertical
|
|
336
419
|
} = state;
|
|
337
|
-
state.root.className = mergeClasses(tabClassNames.root, rootStyles.base, vertical ? rootStyles.vertical : rootStyles.horizontal, size
|
|
338
|
-
pendingIndicatorStyles.base, size
|
|
339
|
-
selected && activeIndicatorStyles.base, selected && !disabled && activeIndicatorStyles.selected, selected && size
|
|
420
|
+
state.root.className = mergeClasses(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, // pending indicator (before pseudo element)
|
|
421
|
+
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, // active indicator (after pseudo element)
|
|
422
|
+
selected && activeIndicatorStyles.base, selected && !disabled && activeIndicatorStyles.selected, selected && size === 'small' && (vertical ? activeIndicatorStyles.smallVertical : activeIndicatorStyles.smallHorizontal), selected && size === 'medium' && (vertical ? activeIndicatorStyles.mediumVertical : activeIndicatorStyles.mediumHorizontal), selected && size === 'large' && (vertical ? activeIndicatorStyles.largeVertical : activeIndicatorStyles.largeHorizontal), selected && disabled && activeIndicatorStyles.disabled, state.root.className);
|
|
340
423
|
|
|
341
424
|
if (state.icon) {
|
|
342
|
-
state.icon.className = mergeClasses(tabClassNames.icon, iconStyles.base, iconStyles[size], state.icon.className);
|
|
425
|
+
state.icon.className = mergeClasses(tabClassNames.icon, iconStyles.base, iconStyles[size], selected && iconStyles.selected, state.icon.className);
|
|
426
|
+
} // This needs to be before state.content.className is updated
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
if (state.contentReservedSpaceClassName !== undefined) {
|
|
430
|
+
state.contentReservedSpaceClassName = mergeClasses(reservedSpaceClassNames.content, contentStyles.base, size === 'large' ? contentStyles.largeSelected : contentStyles.selected, state.icon ? contentStyles.iconBefore : contentStyles.noIconBefore, contentStyles.placeholder, state.content.className);
|
|
343
431
|
}
|
|
344
432
|
|
|
345
|
-
state.content.className = mergeClasses(tabClassNames.content, contentStyles.base, selected && contentStyles.selected, state.content.className);
|
|
433
|
+
state.content.className = mergeClasses(tabClassNames.content, contentStyles.base, size === 'large' && contentStyles.large, selected && (size === 'large' ? contentStyles.largeSelected : contentStyles.selected), state.icon ? contentStyles.iconBefore : contentStyles.noIconBefore, state.content.className);
|
|
346
434
|
useTabAnimatedIndicatorStyles_unstable(state);
|
|
347
435
|
return state;
|
|
348
436
|
};
|