@fluentui/react-tabs 9.0.0-beta.8 → 9.0.0-beta.9
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 +108 -1
- package/CHANGELOG.md +24 -2
- package/dist/react-tabs.d.ts +48 -36
- package/lib/components/Tab/Tab.types.d.ts +14 -5
- package/lib/components/Tab/Tab.types.js.map +1 -1
- package/lib/components/Tab/index.d.ts +1 -0
- package/lib/components/Tab/index.js +1 -0
- package/lib/components/Tab/index.js.map +1 -1
- package/lib/components/Tab/renderTab.js +1 -2
- package/lib/components/Tab/renderTab.js.map +1 -1
- package/lib/components/Tab/useTab.js +25 -29
- package/lib/components/Tab/useTab.js.map +1 -1
- package/lib/components/Tab/useTabAnimatedIndicator.d.ts +5 -0
- package/lib/components/Tab/useTabAnimatedIndicator.js +134 -0
- package/lib/components/Tab/useTabAnimatedIndicator.js.map +1 -0
- package/lib/components/Tab/useTabStyles.d.ts +4 -2
- package/lib/components/Tab/useTabStyles.js +280 -84
- package/lib/components/Tab/useTabStyles.js.map +1 -1
- package/lib/components/TabList/TabList.types.d.ts +21 -16
- package/lib/components/TabList/TabList.types.js.map +1 -1
- package/lib/components/TabList/TabListContext.js +6 -0
- package/lib/components/TabList/TabListContext.js.map +1 -1
- package/lib/components/TabList/renderTabList.js +0 -1
- package/lib/components/TabList/renderTabList.js.map +1 -1
- package/lib/components/TabList/useTabList.js +26 -51
- package/lib/components/TabList/useTabList.js.map +1 -1
- package/lib/components/TabList/useTabListContextValues.js +4 -0
- package/lib/components/TabList/useTabListContextValues.js.map +1 -1
- package/lib/components/TabList/useTabListStyles.d.ts +4 -5
- package/lib/components/TabList/useTabListStyles.js +8 -90
- package/lib/components/TabList/useTabListStyles.js.map +1 -1
- package/lib/index.d.ts +4 -2
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/tab.constants.d.ts +59 -12
- package/lib/tab.constants.js +64 -13
- package/lib/tab.constants.js.map +1 -1
- package/lib-commonjs/components/Tab/Tab.types.d.ts +14 -5
- package/lib-commonjs/components/Tab/index.d.ts +1 -0
- package/lib-commonjs/components/Tab/index.js +2 -0
- package/lib-commonjs/components/Tab/index.js.map +1 -1
- package/lib-commonjs/components/Tab/renderTab.js +1 -2
- package/lib-commonjs/components/Tab/renderTab.js.map +1 -1
- package/lib-commonjs/components/Tab/useTab.js +25 -29
- package/lib-commonjs/components/Tab/useTab.js.map +1 -1
- package/lib-commonjs/components/Tab/useTabAnimatedIndicator.d.ts +5 -0
- package/lib-commonjs/components/Tab/useTabAnimatedIndicator.js +148 -0
- package/lib-commonjs/components/Tab/useTabAnimatedIndicator.js.map +1 -0
- package/lib-commonjs/components/Tab/useTabStyles.d.ts +4 -2
- package/lib-commonjs/components/Tab/useTabStyles.js +281 -84
- package/lib-commonjs/components/Tab/useTabStyles.js.map +1 -1
- package/lib-commonjs/components/TabList/TabList.types.d.ts +21 -16
- package/lib-commonjs/components/TabList/TabListContext.js +6 -0
- package/lib-commonjs/components/TabList/TabListContext.js.map +1 -1
- package/lib-commonjs/components/TabList/renderTabList.js +0 -1
- package/lib-commonjs/components/TabList/renderTabList.js.map +1 -1
- package/lib-commonjs/components/TabList/useTabList.js +25 -50
- package/lib-commonjs/components/TabList/useTabList.js.map +1 -1
- package/lib-commonjs/components/TabList/useTabListContextValues.js +4 -0
- package/lib-commonjs/components/TabList/useTabListContextValues.js.map +1 -1
- package/lib-commonjs/components/TabList/useTabListStyles.d.ts +4 -5
- package/lib-commonjs/components/TabList/useTabListStyles.js +7 -92
- package/lib-commonjs/components/TabList/useTabListStyles.js.map +1 -1
- package/lib-commonjs/index.d.ts +4 -2
- package/lib-commonjs/index.js +76 -3
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/tab.constants.d.ts +59 -12
- package/lib-commonjs/tab.constants.js +66 -14
- package/lib-commonjs/tab.constants.js.map +1 -1
- package/package.json +9 -18
|
@@ -9,6 +9,7 @@ const react_context_selector_1 = /*#__PURE__*/require("@fluentui/react-context-s
|
|
|
9
9
|
|
|
10
10
|
exports.TabListContext = /*#__PURE__*/react_context_selector_1.createContext({
|
|
11
11
|
appearance: 'transparent',
|
|
12
|
+
disabled: false,
|
|
12
13
|
selectedValue: undefined,
|
|
13
14
|
onRegister: () => {
|
|
14
15
|
/* noop */
|
|
@@ -19,6 +20,11 @@ exports.TabListContext = /*#__PURE__*/react_context_selector_1.createContext({
|
|
|
19
20
|
onSelect: () => {
|
|
20
21
|
/* noop */
|
|
21
22
|
},
|
|
23
|
+
getRegisteredTabs: () => {
|
|
24
|
+
return {
|
|
25
|
+
registeredTabs: {}
|
|
26
|
+
};
|
|
27
|
+
},
|
|
22
28
|
size: 'medium',
|
|
23
29
|
vertical: false
|
|
24
30
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/TabList/TabListContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AAIa,OAAA,CAAA,cAAA,gBAA+C,wBAAA,CAAA,aAAA,CAAmC;AAC7F,EAAA,UAAU,EAAE,aADiF;AAE7F,EAAA,
|
|
1
|
+
{"version":3,"sources":["components/TabList/TabListContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AAIa,OAAA,CAAA,cAAA,gBAA+C,wBAAA,CAAA,aAAA,CAAmC;AAC7F,EAAA,UAAU,EAAE,aADiF;AAE7F,EAAA,QAAQ,EAAE,KAFmF;AAG7F,EAAA,aAAa,EAAE,SAH8E;AAI7F,EAAA,UAAU,EAAE,MAAK;AACf;AACD,GAN4F;AAO7F,EAAA,YAAY,EAAE,MAAK;AACjB;AACD,GAT4F;AAU7F,EAAA,QAAQ,EAAE,MAAK;AACb;AACD,GAZ4F;AAa7F,EAAA,iBAAiB,EAAE,MAAK;AACtB,WAAO;AACL,MAAA,cAAc,EAAE;AADX,KAAP;AAGD,GAjB4F;AAkB7F,EAAA,IAAI,EAAE,QAlBuF;AAmB7F,EAAA,QAAQ,EAAE;AAnBmF,CAAnC,CAA/C","sourcesContent":["import { createContext } from '@fluentui/react-context-selector';\nimport type { Context } from '@fluentui/react-context-selector';\nimport { TabListContextValue } from './TabList.types';\n\nexport const TabListContext: Context<TabListContextValue> = createContext<TabListContextValue>({\n appearance: 'transparent',\n disabled: false,\n selectedValue: undefined,\n onRegister: () => {\n /* noop */\n },\n onUnregister: () => {\n /* noop */\n },\n onSelect: () => {\n /* noop */\n },\n getRegisteredTabs: () => {\n return {\n registeredTabs: {},\n };\n },\n size: 'medium',\n vertical: false,\n});\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/TabList/renderTabList.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAEA,MAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;AAEA;;AAEG
|
|
1
|
+
{"version":3,"sources":["components/TabList/renderTabList.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAEA,MAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;AAEA;;AAEG;;;AACI,MAAM,sBAAsB,GAAG,CAAC,KAAD,EAAsB,aAAtB,KAA6D;AACjG,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,iBAAA,CAAA,QAAA,CAAuB,KAAvB,CAA7B;AAEA,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACE,KAAA,CAAA,aAAA,CAAC,gBAAA,CAAA,cAAA,CAAe,QAAhB,EAAwB;AAAC,IAAA,KAAK,EAAE,aAAa,CAAC;AAAtB,GAAxB,EAAwD,KAAK,CAAC,IAAN,CAAW,QAAnE,CADF,CADF;AAKD,CARM;;AAAM,OAAA,CAAA,sBAAA,GAAsB,sBAAtB","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TabListState, TabListSlots, TabListContextValues } from './TabList.types';\nimport { TabListContext } from './TabListContext';\n\n/**\n * Render the final JSX of TabList\n */\nexport const renderTabList_unstable = (state: TabListState, contextValues: TabListContextValues) => {\n const { slots, slotProps } = getSlots<TabListSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n <TabListContext.Provider value={contextValues.tabList}>{state.root.children}</TabListContext.Provider>\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -19,12 +19,12 @@ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
|
19
19
|
* @param props - props from this instance of TabList
|
|
20
20
|
* @param ref - reference to root HTMLElement of TabList
|
|
21
21
|
*/
|
|
22
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
23
22
|
|
|
24
23
|
|
|
25
24
|
const useTabList_unstable = (props, ref) => {
|
|
26
25
|
const {
|
|
27
26
|
appearance = 'transparent',
|
|
27
|
+
disabled = false,
|
|
28
28
|
onTabSelect,
|
|
29
29
|
size = 'medium',
|
|
30
30
|
vertical = false
|
|
@@ -38,61 +38,35 @@ const useTabList_unstable = (props, ref) => {
|
|
|
38
38
|
state: props.selectedValue,
|
|
39
39
|
defaultState: props.defaultSelectedValue,
|
|
40
40
|
initialState: undefined
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}); // provide force recalculation of the selection indicator rectangle
|
|
46
|
-
|
|
47
|
-
const [calcRect, setCalcRect] = React.useState(0);
|
|
48
|
-
const recalcRect = react_utilities_1.useConst(() => () => setCalcRect(value => ++value)); // when this list or any tab resizes, recalculate the selection indicator rectangle
|
|
49
|
-
|
|
50
|
-
const resizeObserver = React.useMemo(() => new ResizeObserver(entries => {
|
|
51
|
-
recalcRect();
|
|
52
|
-
}), [recalcRect]); // observe this list for resize
|
|
41
|
+
}); // considered usePrevious, but it is sensitive to re-renders
|
|
42
|
+
// this could cause the previous to move to current in the case where the tab list re-renders.
|
|
43
|
+
// these refs avoid getRegisteredTabs changing when selectedValue changes and causing
|
|
44
|
+
// renders for tabs that have not changed.
|
|
53
45
|
|
|
46
|
+
const currentSelectedValue = React.useRef(undefined);
|
|
47
|
+
const previousSelectedValue = React.useRef(undefined);
|
|
54
48
|
React.useEffect(() => {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
49
|
+
previousSelectedValue.current = currentSelectedValue.current;
|
|
50
|
+
currentSelectedValue.current = selectedValue;
|
|
51
|
+
}, [selectedValue]);
|
|
52
|
+
const onSelect = react_utilities_1.useEventCallback((event, data) => {
|
|
53
|
+
setSelectedValue(data.value);
|
|
54
|
+
onTabSelect === null || onTabSelect === void 0 ? void 0 : onTabSelect(event, data);
|
|
55
|
+
});
|
|
62
56
|
const registeredTabs = React.useRef({});
|
|
63
57
|
const onRegister = react_utilities_1.useEventCallback(data => {
|
|
64
|
-
var _a;
|
|
65
|
-
|
|
66
58
|
registeredTabs.current[JSON.stringify(data.value)] = data;
|
|
67
|
-
((_a = data.ref) === null || _a === void 0 ? void 0 : _a.current) && resizeObserver.observe(data.ref.current);
|
|
68
|
-
recalcRect();
|
|
69
59
|
});
|
|
70
60
|
const onUnregister = react_utilities_1.useEventCallback(data => {
|
|
71
|
-
var _a;
|
|
72
|
-
|
|
73
61
|
delete registeredTabs.current[JSON.stringify(data.value)];
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
const tabRef = (_b = registeredTabs.current[JSON.stringify(selectedValue)]) === null || _b === void 0 ? void 0 : _b.ref;
|
|
83
|
-
const tabRect = (_c = tabRef === null || tabRef === void 0 ? void 0 : tabRef.current) === null || _c === void 0 ? void 0 : _c.getBoundingClientRect();
|
|
84
|
-
|
|
85
|
-
if (listRect && tabRect) {
|
|
86
|
-
return {
|
|
87
|
-
x: tabRect.x - listRect.x,
|
|
88
|
-
y: tabRect.y - listRect.y,
|
|
89
|
-
width: tabRect.width,
|
|
90
|
-
height: tabRect.height
|
|
91
|
-
};
|
|
92
|
-
} // calcRect is used to force updates when registered tabs change or resize occurs
|
|
93
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
94
|
-
|
|
95
|
-
}, [calcRect, selectedValue]);
|
|
62
|
+
});
|
|
63
|
+
const getRegisteredTabs = React.useCallback(() => {
|
|
64
|
+
return {
|
|
65
|
+
selectedValue: currentSelectedValue.current,
|
|
66
|
+
previousSelectedValue: previousSelectedValue.current,
|
|
67
|
+
registeredTabs: registeredTabs.current
|
|
68
|
+
};
|
|
69
|
+
}, []);
|
|
96
70
|
return {
|
|
97
71
|
components: {
|
|
98
72
|
root: 'div'
|
|
@@ -104,13 +78,14 @@ const useTabList_unstable = (props, ref) => {
|
|
|
104
78
|
...props
|
|
105
79
|
}),
|
|
106
80
|
appearance,
|
|
107
|
-
|
|
81
|
+
disabled,
|
|
108
82
|
selectedValue,
|
|
109
83
|
size,
|
|
110
84
|
vertical,
|
|
111
85
|
onRegister,
|
|
112
86
|
onUnregister,
|
|
113
|
-
onSelect
|
|
87
|
+
onSelect,
|
|
88
|
+
getRegisteredTabs
|
|
114
89
|
};
|
|
115
90
|
};
|
|
116
91
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/TabList/useTabList.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,i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AAEjC,MAAA,IAAI,EAAE,SAF2B;AAGjC,SAAG,eAH8B;AAIjC,SAAG;AAJ8B,KAA7B,CAJD;AAUL,IAAA,UAVK;AAWL,IAAA,QAXK;AAYL,IAAA,aAZK;AAaL,IAAA,IAbK;AAcL,IAAA,QAdK;AAeL,IAAA,UAfK;AAgBL,IAAA,YAhBK;AAiBL,IAAA,QAjBK;AAkBL,IAAA;AAlBK,GAAP;AAoBD,CApEM;;AAAM,OAAA,CAAA,mBAAA,GAAmB,mBAAnB","sourcesContent":["import * as React from 'react';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport {\n getNativeElementProps,\n useControllableState,\n useEventCallback,\n useMergedRefs,\n} from '@fluentui/react-utilities';\nimport type { TabRegisterData, SelectTabData, SelectTabEvent, TabListProps, TabListState } from './TabList.types';\nimport { TabValue } from '../Tab/Tab.types';\n\n/**\n * Create the state required to render TabList.\n *\n * The returned state can be modified with hooks such as useTabListStyles_unstable,\n * before being passed to renderTabList_unstable.\n *\n * @param props - props from this instance of TabList\n * @param ref - reference to root HTMLElement of TabList\n */\nexport const useTabList_unstable = (props: TabListProps, ref: React.Ref<HTMLElement>): TabListState => {\n const { appearance = 'transparent', disabled = false, onTabSelect, size = 'medium', vertical = false } = props;\n\n const innerRef = React.useRef<HTMLElement>(null);\n\n const focusAttributes = useArrowNavigationGroup({ circular: true, axis: vertical ? 'vertical' : 'horizontal' });\n\n const [selectedValue, setSelectedValue] = useControllableState({\n state: props.selectedValue,\n defaultState: props.defaultSelectedValue,\n initialState: undefined,\n });\n\n // considered usePrevious, but it is sensitive to re-renders\n // this could cause the previous to move to current in the case where the tab list re-renders.\n // these refs avoid getRegisteredTabs changing when selectedValue changes and causing\n // renders for tabs that have not changed.\n const currentSelectedValue = React.useRef<TabValue | undefined>(undefined);\n const previousSelectedValue = React.useRef<TabValue | undefined>(undefined);\n\n React.useEffect(() => {\n previousSelectedValue.current = currentSelectedValue.current;\n currentSelectedValue.current = selectedValue;\n }, [selectedValue]);\n\n const onSelect = useEventCallback((event: SelectTabEvent, data: SelectTabData) => {\n setSelectedValue(data.value);\n onTabSelect?.(event, data);\n });\n\n const registeredTabs = React.useRef<Record<string, TabRegisterData>>({});\n\n const onRegister = useEventCallback((data: TabRegisterData) => {\n registeredTabs.current[JSON.stringify(data.value)] = data;\n });\n\n const onUnregister = useEventCallback((data: TabRegisterData) => {\n delete registeredTabs.current[JSON.stringify(data.value)];\n });\n\n const getRegisteredTabs = React.useCallback(() => {\n return {\n selectedValue: currentSelectedValue.current,\n previousSelectedValue: previousSelectedValue.current,\n registeredTabs: registeredTabs.current,\n };\n }, []);\n\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ref: useMergedRefs(ref, innerRef),\n role: 'tablist',\n ...focusAttributes,\n ...props,\n }),\n appearance,\n disabled,\n selectedValue,\n size,\n vertical,\n onRegister,\n onUnregister,\n onSelect,\n getRegisteredTabs,\n };\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -8,19 +8,23 @@ exports.useTabListContextValues = void 0;
|
|
|
8
8
|
function useTabListContextValues(state) {
|
|
9
9
|
const {
|
|
10
10
|
appearance,
|
|
11
|
+
disabled,
|
|
11
12
|
selectedValue: selectedKey,
|
|
12
13
|
onRegister,
|
|
13
14
|
onUnregister,
|
|
14
15
|
onSelect,
|
|
16
|
+
getRegisteredTabs,
|
|
15
17
|
size,
|
|
16
18
|
vertical
|
|
17
19
|
} = state;
|
|
18
20
|
const tabList = {
|
|
19
21
|
appearance,
|
|
22
|
+
disabled,
|
|
20
23
|
selectedValue: selectedKey,
|
|
21
24
|
onSelect,
|
|
22
25
|
onRegister,
|
|
23
26
|
onUnregister,
|
|
27
|
+
getRegisteredTabs,
|
|
24
28
|
size,
|
|
25
29
|
vertical
|
|
26
30
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/TabList/useTabListContextValues.tsx"],"names":[],"mappings":";;;;;;;AAEA,SAAgB,uBAAhB,CAAwC,KAAxC,EAA2D;AACzD,QAAM;
|
|
1
|
+
{"version":3,"sources":["components/TabList/useTabListContextValues.tsx"],"names":[],"mappings":";;;;;;;AAEA,SAAgB,uBAAhB,CAAwC,KAAxC,EAA2D;AACzD,QAAM;AACJ,IAAA,UADI;AAEJ,IAAA,QAFI;AAGJ,IAAA,aAAa,EAAE,WAHX;AAIJ,IAAA,UAJI;AAKJ,IAAA,YALI;AAMJ,IAAA,QANI;AAOJ,IAAA,iBAPI;AAQJ,IAAA,IARI;AASJ,IAAA;AATI,MAUF,KAVJ;AAYA,QAAM,OAAO,GAAwB;AACnC,IAAA,UADmC;AAEnC,IAAA,QAFmC;AAGnC,IAAA,aAAa,EAAE,WAHoB;AAInC,IAAA,QAJmC;AAKnC,IAAA,UALmC;AAMnC,IAAA,YANmC;AAOnC,IAAA,iBAPmC;AAQnC,IAAA,IARmC;AASnC,IAAA;AATmC,GAArC;AAYA,SAAO;AAAE,IAAA;AAAF,GAAP;AACD;;AA1BD,OAAA,CAAA,uBAAA,GAAA,uBAAA","sourcesContent":["import { TabListContextValue, TabListContextValues, TabListState } from './TabList.types';\n\nexport function useTabListContextValues(state: TabListState): TabListContextValues {\n const {\n appearance,\n disabled,\n selectedValue: selectedKey,\n onRegister,\n onUnregister,\n onSelect,\n getRegisteredTabs,\n size,\n vertical,\n } = state;\n\n const tabList: TabListContextValue = {\n appearance,\n disabled,\n selectedValue: selectedKey,\n onSelect,\n onRegister,\n onUnregister,\n getRegisteredTabs,\n size,\n vertical,\n };\n\n return { tabList };\n}\n"],"sourceRoot":"../src/"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const indicatorLengthVar = "--selection-indicator-length";
|
|
1
|
+
import { SlotClassNames } from '@fluentui/react-utilities';
|
|
2
|
+
import type { TabListSlots, TabListState } from './TabList.types';
|
|
3
|
+
export declare const tabListClassNames: SlotClassNames<TabListSlots>;
|
|
4
|
+
export declare const tabListClassName: string;
|
|
6
5
|
/**
|
|
7
6
|
* Apply styling to the TabList slots based on the state
|
|
8
7
|
*/
|
|
@@ -3,20 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.useTabListStyles_unstable = exports.
|
|
6
|
+
exports.useTabListStyles_unstable = exports.tabListClassName = exports.tabListClassNames = void 0;
|
|
7
7
|
|
|
8
8
|
const react_1 = /*#__PURE__*/require("@griffel/react");
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
exports.tabListClassNames = {
|
|
11
|
+
root: 'fui-TabList'
|
|
12
|
+
}; // TODO temporary export to pass conformance test.
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const tab_constants_1 = /*#__PURE__*/require("../../tab.constants");
|
|
15
|
-
|
|
16
|
-
exports.tabListClassName = 'fui-TabList';
|
|
17
|
-
exports.tabListSelectionIndicatorName = 'fui-TabList_SelectionIndicator';
|
|
18
|
-
exports.indicatorOffsetVar = '--selection-indicator-offset';
|
|
19
|
-
exports.indicatorLengthVar = '--selection-indicator-length';
|
|
14
|
+
exports.tabListClassName = exports.tabListClassNames.root;
|
|
20
15
|
/**
|
|
21
16
|
* Styles for the root slot
|
|
22
17
|
*/
|
|
@@ -33,97 +28,17 @@ const useStyles = /*#__PURE__*/react_1.__styles({
|
|
|
33
28
|
}, {
|
|
34
29
|
"d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1063pyq{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}", ".f10pi13n{position:relative;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}"]
|
|
35
30
|
});
|
|
36
|
-
/**
|
|
37
|
-
* Styles for the selection indicator slot when horizontal.
|
|
38
|
-
*/
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const useHorizontalIndicatorStyles = /*#__PURE__*/react_1.__styles({
|
|
42
|
-
"base": {
|
|
43
|
-
"Bkbwdz4": "f30248y",
|
|
44
|
-
"frdscb": ["fvxed1z", "f1j2a01o"],
|
|
45
|
-
"B9nohqn": ["f1j2a01o", "fvxed1z"],
|
|
46
|
-
"B1dhsta": ["fsamouo", "f1aazreq"],
|
|
47
|
-
"Bjdmjzx": ["f1aazreq", "fsamouo"],
|
|
48
|
-
"Bj55yzk": "fw2wsqs",
|
|
49
|
-
"oqd9ik": "ffdc0f3",
|
|
50
|
-
"Bs6t6z0": "fqc6z8f",
|
|
51
|
-
"mpb1vu": "f119hevp",
|
|
52
|
-
"jc51t6": ["f1uyszuw", "f1xp83vy"],
|
|
53
|
-
"Hdbjpj": "f11ef69",
|
|
54
|
-
"Biobvvw": "f1tzy5p2",
|
|
55
|
-
"Bunff0j": "fs357bs"
|
|
56
|
-
},
|
|
57
|
-
"small": {
|
|
58
|
-
"jc51t6": ["f1w3ykbk", "f1xm0lqg"],
|
|
59
|
-
"Biobvvw": "f1akpkq3"
|
|
60
|
-
},
|
|
61
|
-
"animated": {
|
|
62
|
-
"wbfbqe": ["fjzde92", "f1xfxhj5"],
|
|
63
|
-
"mafdb0": "f1fuwhvj"
|
|
64
|
-
}
|
|
65
|
-
}, {
|
|
66
|
-
"d": [".f30248y:after{background-color:var(--colorBrandStroke1);}", ".fvxed1z:after{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f1j2a01o:after{border-bottom-left-radius:var(--borderRadiusMedium);}", ".fsamouo:after{border-top-right-radius:var(--borderRadiusMedium);}", ".f1aazreq:after{border-top-left-radius:var(--borderRadiusMedium);}", ".fw2wsqs:after{bottom:0;}", ".ffdc0f3:after{box-sizing:border-box;}", ".fqc6z8f:after{content:\"\";}", ".f119hevp:after{height:2px;}", ".f1uyszuw:after{left:calc(var(--selection-indicator-offset) + 10px);}", ".f1xp83vy:after{right:calc(var(--selection-indicator-offset) + 10px);}", ".f11ef69:after{position:absolute;}", ".f1tzy5p2:after{width:calc(var(--selection-indicator-length) - (2 * 10px));}", ".fs357bs:after{z-index:1;}", ".f1w3ykbk:after{left:calc(var(--selection-indicator-offset) + 6px);}", ".f1xm0lqg:after{right:calc(var(--selection-indicator-offset) + 6px);}", ".f1akpkq3:after{width:calc(var(--selection-indicator-length) - (2 * 6px));}", ".fjzde92:after{transition-property:left,width;}", ".f1xfxhj5:after{transition-property:right,width;}", ".f1fuwhvj:after{transition-duration:350ms,350ms;}"]
|
|
67
|
-
});
|
|
68
|
-
/**
|
|
69
|
-
* Styles for the selection indicator slot when vertical.
|
|
70
|
-
*/
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
const useVerticalIndicatorStyles = /*#__PURE__*/react_1.__styles({
|
|
74
|
-
"base": {
|
|
75
|
-
"B1dvbpk": "fa05st",
|
|
76
|
-
"px8gyy": ["f16to4m4", "f1ceoihi"],
|
|
77
|
-
"B5c9fhp": ["f1ceoihi", "f16to4m4"],
|
|
78
|
-
"Bhe99jt": ["fkibbow", "fnlo9u7"],
|
|
79
|
-
"B2r1szc": ["fnlo9u7", "fkibbow"],
|
|
80
|
-
"Bmqnesq": "f170vdtw",
|
|
81
|
-
"rurcny": "fuzzvh5",
|
|
82
|
-
"Bbc2r3f": "f13xaayz",
|
|
83
|
-
"Byque4d": ["f1t0u0az", "fmlx6bj"],
|
|
84
|
-
"xx9plb": "fxf9f1y",
|
|
85
|
-
"Bf8kmfk": "fwt37qm",
|
|
86
|
-
"Bdn98qo": "f15bpuwh",
|
|
87
|
-
"Bab4cu6": "f1ijlm3k"
|
|
88
|
-
},
|
|
89
|
-
"small": {
|
|
90
|
-
"Bf8kmfk": "f8k0k00",
|
|
91
|
-
"Bbc2r3f": "fyephjl"
|
|
92
|
-
},
|
|
93
|
-
"animated": {
|
|
94
|
-
"iukgx1": "fcs48rj",
|
|
95
|
-
"B5szp9g": "f1u309tb"
|
|
96
|
-
}
|
|
97
|
-
}, {
|
|
98
|
-
"d": [".fa05st:before{background-color:var(--colorBrandStroke1);}", ".f16to4m4:before{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f1ceoihi:before{border-bottom-left-radius:var(--borderRadiusMedium);}", ".fkibbow:before{border-top-right-radius:var(--borderRadiusMedium);}", ".fnlo9u7:before{border-top-left-radius:var(--borderRadiusMedium);}", ".f170vdtw:before{box-sizing:border-box;}", ".fuzzvh5:before{content:\"\";}", ".f13xaayz:before{height:calc(var(--selection-indicator-length) - (2 * 10px));}", ".f1t0u0az:before{left:0;}", ".fmlx6bj:before{right:0;}", ".fxf9f1y:before{position:absolute;}", ".fwt37qm:before{top:calc(var(--selection-indicator-offset) + 10px);}", ".f15bpuwh:before{width:2px;}", ".f1ijlm3k:before{z-index:1;}", ".f8k0k00:before{top:calc(var(--selection-indicator-offset) + 6px);}", ".fyephjl:before{height:calc(var(--selection-indicator-length) - (2 * 6px));}", ".fcs48rj:before{transition-property:top,height;}", ".f1u309tb:before{transition-duration:350ms,350ms;}"]
|
|
99
|
-
});
|
|
100
31
|
/**
|
|
101
32
|
* Apply styling to the TabList slots based on the state
|
|
102
33
|
*/
|
|
103
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
104
34
|
|
|
105
35
|
|
|
106
36
|
const useTabListStyles_unstable = state => {
|
|
107
37
|
const {
|
|
108
|
-
selectedTabRect: selectionIndicatorRect,
|
|
109
|
-
selectedValue,
|
|
110
|
-
size,
|
|
111
38
|
vertical
|
|
112
|
-
} = state;
|
|
113
|
-
|
|
114
|
-
const previousSelectedValue = react_utilities_1.usePrevious(selectedValue);
|
|
115
|
-
const shouldAnimate = !!previousSelectedValue && previousSelectedValue !== selectedValue;
|
|
39
|
+
} = state;
|
|
116
40
|
const styles = useStyles();
|
|
117
|
-
|
|
118
|
-
const verticalIndicatorStyles = useVerticalIndicatorStyles();
|
|
119
|
-
state.root.className = react_1.mergeClasses(exports.tabListClassName, styles.root, vertical && styles.vertical, !!selectedValue && (vertical ? verticalIndicatorStyles.base : horizontalIndicatorStyles.base), !!selectedValue && size === 'small' && (vertical ? verticalIndicatorStyles.small : horizontalIndicatorStyles.small), !!selectedValue && shouldAnimate && (vertical ? verticalIndicatorStyles.animated : horizontalIndicatorStyles.animated), state.root.className);
|
|
120
|
-
const rootCssVars = selectionIndicatorRect ? {
|
|
121
|
-
[exports.indicatorOffsetVar]: vertical ? `${selectionIndicatorRect.y}px` : `${selectionIndicatorRect.x}px`,
|
|
122
|
-
[exports.indicatorLengthVar]: vertical ? `${selectionIndicatorRect.height}px` : `${selectionIndicatorRect.width}px`
|
|
123
|
-
} : {};
|
|
124
|
-
state.root.style = { ...rootCssVars,
|
|
125
|
-
...state.root.style
|
|
126
|
-
};
|
|
41
|
+
state.root.className = react_1.mergeClasses(exports.tabListClassName, styles.root, vertical && styles.vertical, state.root.className);
|
|
127
42
|
return state;
|
|
128
43
|
};
|
|
129
44
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/TabList/useTabListStyles.ts"],"names":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"sources":["components/TabList/useTabListStyles.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAGa,OAAA,CAAA,iBAAA,GAAkD;AAC7D,EAAA,IAAI,EAAE;AADuD,CAAlD,C,CAIb;;AACa,OAAA,CAAA,gBAAA,GAAmB,OAAA,CAAA,iBAAA,CAAkB,IAArC;AAEb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAWA;;AAEG;;;AACI,MAAM,yBAAyB,GAAI,KAAD,IAAsC;AAC7E,QAAM;AAAE,IAAA;AAAF,MAAe,KAArB;AAEA,QAAM,MAAM,GAAG,SAAS,EAAxB;AAEA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,gBAAb,EAA+B,MAAM,CAAC,IAAtC,EAA4C,QAAQ,IAAI,MAAM,CAAC,QAA/D,EAAyE,KAAK,CAAC,IAAN,CAAW,SAApF,CAAvB;AAEA,SAAO,KAAP;AACD,CARM;;AAAM,OAAA,CAAA,yBAAA,GAAyB,yBAAzB","sourcesContent":["import { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { TabListSlots, TabListState } from './TabList.types';\n\nexport const tabListClassNames: SlotClassNames<TabListSlots> = {\n root: 'fui-TabList',\n};\n\n// TODO temporary export to pass conformance test.\nexport const tabListClassName = tabListClassNames.root;\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n position: 'relative',\n },\n vertical: {\n flexDirection: 'column',\n },\n});\n\n/**\n * Apply styling to the TabList slots based on the state\n */\nexport const useTabListStyles_unstable = (state: TabListState): TabListState => {\n const { vertical } = state;\n\n const styles = useStyles();\n\n state.root.className = mergeClasses(tabListClassName, styles.root, vertical && styles.vertical, state.root.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
package/lib-commonjs/index.d.ts
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type { TabProps, TabSlots, TabState, TabValue } from './Tab';
|
|
2
|
+
export { renderTab_unstable, Tab, tabClassName, tabClassNames, useTabStyles_unstable, useTab_unstable } from './Tab';
|
|
3
|
+
export type { TabRegisterData, RegisterTabEventHandler, SelectTabData, SelectTabEvent, SelectTabEventHandler, TabListContextValue, TabListContextValues, TabListProps, TabListSlots, TabListState, } from './TabList';
|
|
4
|
+
export { renderTabList_unstable, TabList, tabListClassName, tabListClassNames, useTabListStyles_unstable, useTabList_unstable, } from './TabList';
|
package/lib-commonjs/index.js
CHANGED
|
@@ -3,10 +3,83 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.useTabList_unstable = exports.useTabListStyles_unstable = exports.tabListClassNames = exports.tabListClassName = exports.TabList = exports.renderTabList_unstable = exports.useTab_unstable = exports.useTabStyles_unstable = exports.tabClassNames = exports.tabClassName = exports.Tab = exports.renderTab_unstable = void 0;
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
var Tab_1 = /*#__PURE__*/require("./Tab");
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
Object.defineProperty(exports, "renderTab_unstable", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return Tab_1.renderTab_unstable;
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "Tab", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () {
|
|
19
|
+
return Tab_1.Tab;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(exports, "tabClassName", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function () {
|
|
25
|
+
return Tab_1.tabClassName;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports, "tabClassNames", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () {
|
|
31
|
+
return Tab_1.tabClassNames;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
Object.defineProperty(exports, "useTabStyles_unstable", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: function () {
|
|
37
|
+
return Tab_1.useTabStyles_unstable;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(exports, "useTab_unstable", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
get: function () {
|
|
43
|
+
return Tab_1.useTab_unstable;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
var TabList_1 = /*#__PURE__*/require("./TabList");
|
|
10
48
|
|
|
11
|
-
|
|
49
|
+
Object.defineProperty(exports, "renderTabList_unstable", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: function () {
|
|
52
|
+
return TabList_1.renderTabList_unstable;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
Object.defineProperty(exports, "TabList", {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function () {
|
|
58
|
+
return TabList_1.TabList;
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
Object.defineProperty(exports, "tabListClassName", {
|
|
62
|
+
enumerable: true,
|
|
63
|
+
get: function () {
|
|
64
|
+
return TabList_1.tabListClassName;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
Object.defineProperty(exports, "tabListClassNames", {
|
|
68
|
+
enumerable: true,
|
|
69
|
+
get: function () {
|
|
70
|
+
return TabList_1.tabListClassNames;
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
Object.defineProperty(exports, "useTabListStyles_unstable", {
|
|
74
|
+
enumerable: true,
|
|
75
|
+
get: function () {
|
|
76
|
+
return TabList_1.useTabListStyles_unstable;
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
Object.defineProperty(exports, "useTabList_unstable", {
|
|
80
|
+
enumerable: true,
|
|
81
|
+
get: function () {
|
|
82
|
+
return TabList_1.useTabList_unstable;
|
|
83
|
+
}
|
|
84
|
+
});
|
|
12
85
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;AACA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,oBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,KAAA,CAAA,kBAAA;AAAkB;AAAlB,CAAA;AAAoB,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,KAAA,EAAA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AA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,SAAA,CAAA,gBAAA;AAAgB;AAAhB,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,mBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,SAAA,CAAA,iBAAA;AAAiB;AAAjB,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,2BAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,SAAA,CAAA,yBAAA;AAAyB;AAAzB,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,qBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,SAAA,CAAA,mBAAA;AAAmB;AAAnB,CAAA","sourcesContent":["export type { TabProps, TabSlots, TabState, TabValue } from './Tab';\nexport { renderTab_unstable, Tab, tabClassName, tabClassNames, useTabStyles_unstable, useTab_unstable } from './Tab';\nexport type {\n TabRegisterData,\n RegisterTabEventHandler,\n SelectTabData,\n SelectTabEvent,\n SelectTabEventHandler,\n TabListContextValue,\n TabListContextValues,\n TabListProps,\n TabListSlots,\n TabListState,\n} from './TabList';\nexport {\n renderTabList_unstable,\n TabList,\n tabListClassName,\n tabListClassNames,\n useTabListStyles_unstable,\n useTabList_unstable,\n} from './TabList';\n"],"sourceRoot":"../src/"}
|
|
@@ -1,15 +1,62 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export declare const pendingContentSizeTokens: {
|
|
2
|
+
body1: {
|
|
3
|
+
fontSize: string;
|
|
4
|
+
fontWeight: string;
|
|
5
|
+
lineHeight: string;
|
|
5
6
|
};
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
contentPadding: {
|
|
12
|
-
medium: string;
|
|
13
|
-
small: string;
|
|
7
|
+
body1Strong: {
|
|
8
|
+
fontSize: string;
|
|
9
|
+
fontWeight: string;
|
|
10
|
+
lineHeight: string;
|
|
14
11
|
};
|
|
15
12
|
};
|
|
13
|
+
export declare const pendingSpacingTokens: {
|
|
14
|
+
none: string;
|
|
15
|
+
xxs: string;
|
|
16
|
+
xs: string;
|
|
17
|
+
sNudge: string;
|
|
18
|
+
s: string;
|
|
19
|
+
mNudge: string;
|
|
20
|
+
m: string;
|
|
21
|
+
l: string;
|
|
22
|
+
xl: string;
|
|
23
|
+
xxl: string;
|
|
24
|
+
xxxl: string;
|
|
25
|
+
};
|
|
26
|
+
export declare const pendingAnimationDurationTokens: {
|
|
27
|
+
ultraFast: string;
|
|
28
|
+
faster: string;
|
|
29
|
+
fast: string;
|
|
30
|
+
normal: string;
|
|
31
|
+
slow: string;
|
|
32
|
+
slower: string;
|
|
33
|
+
ultraSlow: string;
|
|
34
|
+
};
|
|
35
|
+
export declare const pendingAnimationEasingTokens: {
|
|
36
|
+
accelerateMax: string;
|
|
37
|
+
accelerateMid: string;
|
|
38
|
+
accelerateMin: string;
|
|
39
|
+
declerateMax: string;
|
|
40
|
+
decelerateMid: string;
|
|
41
|
+
decelarateMin: string;
|
|
42
|
+
maxEasyEase: string;
|
|
43
|
+
easyEase: string;
|
|
44
|
+
linear: string;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Provides shared values between tab style hooks
|
|
48
|
+
* useTabStyles
|
|
49
|
+
* useTabAnimatedIndicator
|
|
50
|
+
*/
|
|
51
|
+
export declare const tabIndicatorPadding: {
|
|
52
|
+
mediumHorizontal: string;
|
|
53
|
+
mediumVertical: string;
|
|
54
|
+
smallHorizontal: string;
|
|
55
|
+
smallVertical: string;
|
|
56
|
+
};
|
|
57
|
+
export declare const tabIndicatorStrokeWidths: {
|
|
58
|
+
mediumHorizontal: string;
|
|
59
|
+
mediumVertical: string;
|
|
60
|
+
smallHorizontal: string;
|
|
61
|
+
smallVertical: string;
|
|
62
|
+
};
|