@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.
Files changed (70) hide show
  1. package/CHANGELOG.json +108 -1
  2. package/CHANGELOG.md +24 -2
  3. package/dist/react-tabs.d.ts +48 -36
  4. package/lib/components/Tab/Tab.types.d.ts +14 -5
  5. package/lib/components/Tab/Tab.types.js.map +1 -1
  6. package/lib/components/Tab/index.d.ts +1 -0
  7. package/lib/components/Tab/index.js +1 -0
  8. package/lib/components/Tab/index.js.map +1 -1
  9. package/lib/components/Tab/renderTab.js +1 -2
  10. package/lib/components/Tab/renderTab.js.map +1 -1
  11. package/lib/components/Tab/useTab.js +25 -29
  12. package/lib/components/Tab/useTab.js.map +1 -1
  13. package/lib/components/Tab/useTabAnimatedIndicator.d.ts +5 -0
  14. package/lib/components/Tab/useTabAnimatedIndicator.js +134 -0
  15. package/lib/components/Tab/useTabAnimatedIndicator.js.map +1 -0
  16. package/lib/components/Tab/useTabStyles.d.ts +4 -2
  17. package/lib/components/Tab/useTabStyles.js +280 -84
  18. package/lib/components/Tab/useTabStyles.js.map +1 -1
  19. package/lib/components/TabList/TabList.types.d.ts +21 -16
  20. package/lib/components/TabList/TabList.types.js.map +1 -1
  21. package/lib/components/TabList/TabListContext.js +6 -0
  22. package/lib/components/TabList/TabListContext.js.map +1 -1
  23. package/lib/components/TabList/renderTabList.js +0 -1
  24. package/lib/components/TabList/renderTabList.js.map +1 -1
  25. package/lib/components/TabList/useTabList.js +26 -51
  26. package/lib/components/TabList/useTabList.js.map +1 -1
  27. package/lib/components/TabList/useTabListContextValues.js +4 -0
  28. package/lib/components/TabList/useTabListContextValues.js.map +1 -1
  29. package/lib/components/TabList/useTabListStyles.d.ts +4 -5
  30. package/lib/components/TabList/useTabListStyles.js +8 -90
  31. package/lib/components/TabList/useTabListStyles.js.map +1 -1
  32. package/lib/index.d.ts +4 -2
  33. package/lib/index.js +2 -2
  34. package/lib/index.js.map +1 -1
  35. package/lib/tab.constants.d.ts +59 -12
  36. package/lib/tab.constants.js +64 -13
  37. package/lib/tab.constants.js.map +1 -1
  38. package/lib-commonjs/components/Tab/Tab.types.d.ts +14 -5
  39. package/lib-commonjs/components/Tab/index.d.ts +1 -0
  40. package/lib-commonjs/components/Tab/index.js +2 -0
  41. package/lib-commonjs/components/Tab/index.js.map +1 -1
  42. package/lib-commonjs/components/Tab/renderTab.js +1 -2
  43. package/lib-commonjs/components/Tab/renderTab.js.map +1 -1
  44. package/lib-commonjs/components/Tab/useTab.js +25 -29
  45. package/lib-commonjs/components/Tab/useTab.js.map +1 -1
  46. package/lib-commonjs/components/Tab/useTabAnimatedIndicator.d.ts +5 -0
  47. package/lib-commonjs/components/Tab/useTabAnimatedIndicator.js +148 -0
  48. package/lib-commonjs/components/Tab/useTabAnimatedIndicator.js.map +1 -0
  49. package/lib-commonjs/components/Tab/useTabStyles.d.ts +4 -2
  50. package/lib-commonjs/components/Tab/useTabStyles.js +281 -84
  51. package/lib-commonjs/components/Tab/useTabStyles.js.map +1 -1
  52. package/lib-commonjs/components/TabList/TabList.types.d.ts +21 -16
  53. package/lib-commonjs/components/TabList/TabListContext.js +6 -0
  54. package/lib-commonjs/components/TabList/TabListContext.js.map +1 -1
  55. package/lib-commonjs/components/TabList/renderTabList.js +0 -1
  56. package/lib-commonjs/components/TabList/renderTabList.js.map +1 -1
  57. package/lib-commonjs/components/TabList/useTabList.js +25 -50
  58. package/lib-commonjs/components/TabList/useTabList.js.map +1 -1
  59. package/lib-commonjs/components/TabList/useTabListContextValues.js +4 -0
  60. package/lib-commonjs/components/TabList/useTabListContextValues.js.map +1 -1
  61. package/lib-commonjs/components/TabList/useTabListStyles.d.ts +4 -5
  62. package/lib-commonjs/components/TabList/useTabListStyles.js +7 -92
  63. package/lib-commonjs/components/TabList/useTabListStyles.js.map +1 -1
  64. package/lib-commonjs/index.d.ts +4 -2
  65. package/lib-commonjs/index.js +76 -3
  66. package/lib-commonjs/index.js.map +1 -1
  67. package/lib-commonjs/tab.constants.d.ts +59 -12
  68. package/lib-commonjs/tab.constants.js +66 -14
  69. package/lib-commonjs/tab.constants.js.map +1 -1
  70. 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,aAAa,EAAE,SAF8E;AAG7F,EAAA,UAAU,EAAE,MAAK;AACf;AACD,GAL4F;AAM7F,EAAA,YAAY,EAAE,MAAK;AACjB;AACD,GAR4F;AAS7F,EAAA,QAAQ,EAAE,MAAK;AACb;AACD,GAX4F;AAY7F,EAAA,IAAI,EAAE,QAZuF;AAa7F,EAAA,QAAQ,EAAE;AAbmF,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 selectedValue: undefined,\n onRegister: () => {\n /* noop */\n },\n onUnregister: () => {\n /* noop */\n },\n onSelect: () => {\n /* noop */\n },\n size: 'medium',\n vertical: false,\n});\n"],"sourceRoot":"../src/"}
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/"}
@@ -13,7 +13,6 @@ const TabListContext_1 = /*#__PURE__*/require("./TabListContext");
13
13
  /**
14
14
  * Render the final JSX of TabList
15
15
  */
16
- // eslint-disable-next-line @typescript-eslint/naming-convention
17
16
 
18
17
 
19
18
  const renderTabList_unstable = (state, contextValues) => {
@@ -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;AACH;;;AACO,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 */\n// eslint-disable-next-line @typescript-eslint/naming-convention\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/"}
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
- const onSelect = react_utilities_1.useEventCallback((event, data) => {
43
- onTabSelect === null || onTabSelect === void 0 ? void 0 : onTabSelect(event, data);
44
- setSelectedValue(data.value);
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
- const currentRef = innerRef.current;
56
- currentRef && resizeObserver.observe(currentRef);
57
- return () => {
58
- currentRef && resizeObserver.unobserve(currentRef);
59
- };
60
- }, [resizeObserver]); // when tabs register their refs, observe them for resize
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
- ((_a = data.ref) === null || _a === void 0 ? void 0 : _a.current) && resizeObserver.unobserve(data.ref.current);
75
- recalcRect();
76
- }); // calculate the selection indicator rectangle
77
-
78
- const selectedTabRect = React.useMemo(() => {
79
- var _a, _b, _c;
80
-
81
- const listRect = (_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
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
- selectedTabRect,
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,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AASA;;;;;;;;AAQG;AACH;;;AACO,MAAM,mBAAmB,GAAG,CAAC,KAAD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SAF2B;AAGjC,SAAG,eAH8B;AAIjC,SAAG;AAJ8B,KAA7B,CAJD;AAUL,IAAA,UAVK;AAWL,IAAA,eAXK;AAYL,IAAA,aAZK;AAaL,IAAA,IAbK;AAcL,IAAA,QAdK;AAeL,IAAA,UAfK;AAgBL,IAAA,YAhBK;AAiBL,IAAA;AAjBK,GAAP;AAmBD,CA7FM;;AAAM,OAAA,CAAA,mBAAA,GAAmB,mBAAnB","sourcesContent":["import * as React from 'react';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport {\n getNativeElementProps,\n useConst,\n useControllableState,\n useEventCallback,\n useMergedRefs,\n} from '@fluentui/react-utilities';\nimport type { RegisterTabData, SelectTabData, SelectTabEvent, TabListProps, TabListState } from './TabList.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 */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const useTabList_unstable = (props: TabListProps, ref: React.Ref<HTMLElement>): TabListState => {\n const { appearance = 'transparent', 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 const onSelect = useEventCallback((event: SelectTabEvent, data: SelectTabData) => {\n onTabSelect?.(event, data);\n setSelectedValue(data.value);\n });\n\n // provide force recalculation of the selection indicator rectangle\n const [calcRect, setCalcRect] = React.useState(0);\n const recalcRect = useConst(() => () => setCalcRect(value => ++value));\n\n // when this list or any tab resizes, recalculate the selection indicator rectangle\n const resizeObserver = React.useMemo(\n () =>\n new ResizeObserver(entries => {\n recalcRect();\n }),\n [recalcRect],\n );\n\n // observe this list for resize\n React.useEffect(() => {\n const currentRef = innerRef.current;\n currentRef && resizeObserver.observe(currentRef);\n\n return () => {\n currentRef && resizeObserver.unobserve(currentRef);\n };\n }, [resizeObserver]);\n\n // when tabs register their refs, observe them for resize\n const registeredTabs = React.useRef<Record<string, RegisterTabData>>({});\n\n const onRegister = useEventCallback((data: RegisterTabData) => {\n registeredTabs.current[JSON.stringify(data.value)] = data;\n data.ref?.current && resizeObserver.observe(data.ref.current);\n recalcRect();\n });\n\n const onUnregister = useEventCallback((data: RegisterTabData) => {\n delete registeredTabs.current[JSON.stringify(data.value)];\n data.ref?.current && resizeObserver.unobserve(data.ref.current);\n recalcRect();\n });\n\n // calculate the selection indicator rectangle\n const selectedTabRect = React.useMemo(() => {\n const listRect = innerRef.current?.getBoundingClientRect();\n const tabRef: React.Ref<HTMLElement> = registeredTabs.current[JSON.stringify(selectedValue)]?.ref;\n const tabRect = tabRef?.current?.getBoundingClientRect();\n\n if (listRect && tabRect) {\n return {\n x: tabRect.x - listRect.x,\n y: tabRect.y - listRect.y,\n width: tabRect.width,\n height: tabRect.height,\n };\n }\n // calcRect is used to force updates when registered tabs change or resize occurs\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [calcRect, selectedValue]);\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 selectedTabRect,\n selectedValue,\n size,\n vertical,\n onRegister,\n onUnregister,\n onSelect,\n };\n};\n"],"sourceRoot":"../src/"}
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,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AASA;;;;;;;;AAQG;;;AACI,MAAM,mBAAmB,GAAG,CAAC,KAAD,EAAsB,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\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;AAAE,IAAA,UAAF;AAAc,IAAA,aAAa,EAAE,WAA7B;AAA0C,IAAA,UAA1C;AAAsD,IAAA,YAAtD;AAAoE,IAAA,QAApE;AAA8E,IAAA,IAA9E;AAAoF,IAAA;AAApF,MAAiG,KAAvG;AAEA,QAAM,OAAO,GAAwB;AACnC,IAAA,UADmC;AAEnC,IAAA,aAAa,EAAE,WAFoB;AAGnC,IAAA,QAHmC;AAInC,IAAA,UAJmC;AAKnC,IAAA,YALmC;AAMnC,IAAA,IANmC;AAOnC,IAAA;AAPmC,GAArC;AAUA,SAAO;AAAE,IAAA;AAAF,GAAP;AACD;;AAdD,OAAA,CAAA,uBAAA,GAAA,uBAAA","sourcesContent":["import { TabListContextValue, TabListContextValues, TabListState } from './TabList.types';\n\nexport function useTabListContextValues(state: TabListState): TabListContextValues {\n const { appearance, selectedValue: selectedKey, onRegister, onUnregister, onSelect, size, vertical } = state;\n\n const tabList: TabListContextValue = {\n appearance,\n selectedValue: selectedKey,\n onSelect,\n onRegister,\n onUnregister,\n size,\n vertical,\n };\n\n return { tabList };\n}\n"],"sourceRoot":"../src/"}
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 type { TabListState } from './TabList.types';
2
- export declare const tabListClassName = "fui-TabList";
3
- export declare const tabListSelectionIndicatorName = "fui-TabList_SelectionIndicator";
4
- export declare const indicatorOffsetVar = "--selection-indicator-offset";
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.indicatorLengthVar = exports.indicatorOffsetVar = exports.tabListSelectionIndicatorName = exports.tabListClassName = void 0;
6
+ exports.useTabListStyles_unstable = exports.tabListClassName = exports.tabListClassNames = void 0;
7
7
 
8
8
  const react_1 = /*#__PURE__*/require("@griffel/react");
9
9
 
10
- const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
10
+ exports.tabListClassNames = {
11
+ root: 'fui-TabList'
12
+ }; // TODO temporary export to pass conformance test.
11
13
 
12
- const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
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; // only animate when the selected value has changed
113
-
114
- const previousSelectedValue = react_utilities_1.usePrevious(selectedValue);
115
- const shouldAnimate = !!previousSelectedValue && previousSelectedValue !== selectedValue;
39
+ } = state;
116
40
  const styles = useStyles();
117
- const horizontalIndicatorStyles = useHorizontalIndicatorStyles();
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":[],"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el/react';\nimport type { TabListState } from './TabList.types';\nimport { tokens } from '@fluentui/react-theme';\nimport { usePrevious } from '@fluentui/react-utilities';\nimport { tabPendingDesignTokens } from '../../tab.constants';\n\nexport const tabListClassName = 'fui-TabList';\nexport const tabListSelectionIndicatorName = 'fui-TabList_SelectionIndicator';\n\nexport const indicatorOffsetVar = '--selection-indicator-offset';\nexport const indicatorLengthVar = '--selection-indicator-length';\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 * Styles for the selection indicator slot when horizontal.\n */\nconst useHorizontalIndicatorStyles = makeStyles({\n base: {\n ':after': {\n backgroundColor: tokens.colorBrandStroke1,\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n bottom: 0,\n boxSizing: 'border-box',\n content: '\"\"',\n height: tabPendingDesignTokens.indicatorThickness,\n left: `calc(var(${indicatorOffsetVar}) + ${tabPendingDesignTokens.tabPadding.medium})`,\n position: 'absolute',\n width: `calc(var(${indicatorLengthVar}) - (2 * ${tabPendingDesignTokens.tabPadding.medium}))`,\n zIndex: 1,\n },\n },\n small: {\n ':after': {\n left: `calc(var(${indicatorOffsetVar}) + ${tabPendingDesignTokens.tabPadding.small})`,\n width: `calc(var(${indicatorLengthVar}) - (2 * ${tabPendingDesignTokens.tabPadding.small}))`,\n },\n },\n animated: {\n ':after': {\n transitionProperty: 'left, width',\n transitionDuration: `350ms, 350ms`,\n },\n },\n});\n\n/**\n * Styles for the selection indicator slot when vertical.\n */\nconst useVerticalIndicatorStyles = makeStyles({\n base: {\n ':before': {\n backgroundColor: tokens.colorBrandStroke1,\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n boxSizing: 'border-box',\n content: '\"\"',\n height: `calc(var(${indicatorLengthVar}) - (2 * ${tabPendingDesignTokens.tabPadding.medium}))`,\n left: '0',\n position: 'absolute',\n top: `calc(var(${indicatorOffsetVar}) + ${tabPendingDesignTokens.tabPadding.medium})`,\n width: tabPendingDesignTokens.indicatorThickness,\n zIndex: 1,\n },\n },\n small: {\n ':before': {\n top: `calc(var(${indicatorOffsetVar}) + ${tabPendingDesignTokens.tabPadding.small})`,\n height: `calc(var(${indicatorLengthVar}) - (2 * ${tabPendingDesignTokens.tabPadding.small}))`,\n },\n },\n animated: {\n ':before': {\n transitionProperty: 'top, height',\n transitionDuration: `350ms, 350ms`,\n },\n },\n});\n\n/**\n * Apply styling to the TabList slots based on the state\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const useTabListStyles_unstable = (state: TabListState): TabListState => {\n const { selectedTabRect: selectionIndicatorRect, selectedValue, size, vertical } = state;\n\n // only animate when the selected value has changed\n const previousSelectedValue = usePrevious(selectedValue);\n const shouldAnimate = !!previousSelectedValue && previousSelectedValue !== selectedValue;\n\n const styles = useStyles();\n const horizontalIndicatorStyles = useHorizontalIndicatorStyles();\n const verticalIndicatorStyles = useVerticalIndicatorStyles();\n\n state.root.className = mergeClasses(\n tabListClassName,\n styles.root,\n vertical && styles.vertical,\n !!selectedValue && (vertical ? verticalIndicatorStyles.base : horizontalIndicatorStyles.base),\n !!selectedValue && size === 'small' && (vertical ? verticalIndicatorStyles.small : horizontalIndicatorStyles.small),\n !!selectedValue &&\n shouldAnimate &&\n (vertical ? verticalIndicatorStyles.animated : horizontalIndicatorStyles.animated),\n state.root.className,\n );\n\n const rootCssVars = selectionIndicatorRect\n ? {\n [indicatorOffsetVar]: vertical ? `${selectionIndicatorRect.y}px` : `${selectionIndicatorRect.x}px`,\n [indicatorLengthVar]: vertical ? `${selectionIndicatorRect.height}px` : `${selectionIndicatorRect.width}px`,\n }\n : {};\n\n state.root.style = {\n ...rootCssVars,\n ...state.root.style,\n };\n\n return state;\n};\n"],"sourceRoot":"../src/"}
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/"}
@@ -1,2 +1,4 @@
1
- export * from './Tab';
2
- export * from './TabList';
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';
@@ -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
- const tslib_1 = /*#__PURE__*/require("tslib");
8
+ var Tab_1 = /*#__PURE__*/require("./Tab");
8
9
 
9
- tslib_1.__exportStar(require("./Tab"), exports);
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
- tslib_1.__exportStar(require("./TabList"), exports);
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":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,OAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,WAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './Tab';\nexport * from './TabList';\n"],"sourceRoot":"../src/"}
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;A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,EAAA,kBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,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 tabPendingDesignTokens: {
2
- tabPadding: {
3
- medium: string;
4
- small: string;
1
+ export declare const pendingContentSizeTokens: {
2
+ body1: {
3
+ fontSize: string;
4
+ fontWeight: string;
5
+ lineHeight: string;
5
6
  };
6
- indicatorThickness: string;
7
- gap: {
8
- medium: string;
9
- small: string;
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
+ };