@fluentui/react-tabs 9.3.35 → 9.3.37

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 (53) hide show
  1. package/CHANGELOG.json +91 -1
  2. package/CHANGELOG.md +30 -2
  3. package/lib/components/Tab/Tab.js.map +1 -1
  4. package/lib/components/Tab/renderTab.js +8 -2
  5. package/lib/components/Tab/renderTab.js.map +1 -1
  6. package/lib/components/Tab/useTab.js +3 -2
  7. package/lib/components/Tab/useTab.js.map +1 -1
  8. package/lib/components/Tab/useTabAnimatedIndicator.styles.js.map +1 -1
  9. package/lib/components/Tab/useTabStyles.styles.js.map +1 -1
  10. package/lib/components/TabList/TabList.js.map +1 -1
  11. package/lib/components/TabList/TabListContext.js.map +1 -1
  12. package/lib/components/TabList/renderTabList.js +7 -4
  13. package/lib/components/TabList/renderTabList.js.map +1 -1
  14. package/lib/components/TabList/useTabList.js +3 -2
  15. package/lib/components/TabList/useTabList.js.map +1 -1
  16. package/lib/components/TabList/useTabListContextValues.js +1 -1
  17. package/lib/components/TabList/useTabListContextValues.js.map +1 -1
  18. package/lib/components/TabList/useTabListStyles.styles.js.map +1 -1
  19. package/lib-commonjs/Tab.js +2 -2
  20. package/lib-commonjs/Tab.js.map +1 -1
  21. package/lib-commonjs/TabList.js +2 -2
  22. package/lib-commonjs/TabList.js.map +1 -1
  23. package/lib-commonjs/components/Tab/Tab.js +9 -7
  24. package/lib-commonjs/components/Tab/Tab.js.map +1 -1
  25. package/lib-commonjs/components/Tab/index.js +7 -7
  26. package/lib-commonjs/components/Tab/index.js.map +1 -1
  27. package/lib-commonjs/components/Tab/renderTab.js +14 -6
  28. package/lib-commonjs/components/Tab/renderTab.js.map +1 -1
  29. package/lib-commonjs/components/Tab/useTab.js +25 -22
  30. package/lib-commonjs/components/Tab/useTab.js.map +1 -1
  31. package/lib-commonjs/components/Tab/useTabAnimatedIndicator.styles.js +10 -8
  32. package/lib-commonjs/components/Tab/useTabAnimatedIndicator.styles.js.map +1 -1
  33. package/lib-commonjs/components/Tab/useTabStyles.styles.js +15 -11
  34. package/lib-commonjs/components/Tab/useTabStyles.styles.js.map +1 -1
  35. package/lib-commonjs/components/TabList/TabList.js +9 -7
  36. package/lib-commonjs/components/TabList/TabList.js.map +1 -1
  37. package/lib-commonjs/components/TabList/TabList.types.js +2 -2
  38. package/lib-commonjs/components/TabList/TabList.types.js.map +1 -1
  39. package/lib-commonjs/components/TabList/TabListContext.js +12 -6
  40. package/lib-commonjs/components/TabList/TabListContext.js.map +1 -1
  41. package/lib-commonjs/components/TabList/index.js +8 -8
  42. package/lib-commonjs/components/TabList/index.js.map +1 -1
  43. package/lib-commonjs/components/TabList/renderTabList.js +14 -9
  44. package/lib-commonjs/components/TabList/renderTabList.js.map +1 -1
  45. package/lib-commonjs/components/TabList/useTabList.js +17 -14
  46. package/lib-commonjs/components/TabList/useTabList.js.map +1 -1
  47. package/lib-commonjs/components/TabList/useTabListContextValues.js +4 -2
  48. package/lib-commonjs/components/TabList/useTabListContextValues.js.map +1 -1
  49. package/lib-commonjs/components/TabList/useTabListStyles.styles.js +8 -4
  50. package/lib-commonjs/components/TabList/useTabListStyles.styles.js.map +1 -1
  51. package/lib-commonjs/index.js +41 -15
  52. package/lib-commonjs/index.js.map +1 -1
  53. package/package.json +12 -12
@@ -1 +1 @@
1
- {"version":3,"sources":["TabList.js"],"sourcesContent":["export * from './components/TabList/index';\n"],"names":[],"mappings":";;;;;oBAAc"}
1
+ {"version":3,"sources":["TabList.js"],"sourcesContent":["export * from './components/TabList/index';\n"],"names":[],"mappings":";;;;;uBAAc"}
@@ -4,18 +4,20 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "Tab", {
6
6
  enumerable: true,
7
- get: ()=>Tab
7
+ get: function() {
8
+ return Tab;
9
+ }
8
10
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
11
13
  const _useTab = require("./useTab");
12
14
  const _renderTab = require("./renderTab");
13
- const _useTabStylesStyles = require("./useTabStyles.styles");
14
- const _reactSharedContexts = require("@fluentui/react-shared-contexts");
15
+ const _useTabStylesstyles = require("./useTabStyles.styles");
16
+ const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
15
17
  const Tab = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
16
18
  const state = (0, _useTab.useTab_unstable)(props, ref);
17
- (0, _useTabStylesStyles.useTabStyles_unstable)(state);
18
- (0, _reactSharedContexts.useCustomStyleHook_unstable)('useTabStyles_unstable')(state);
19
+ (0, _useTabStylesstyles.useTabStyles_unstable)(state);
20
+ (0, _reactsharedcontexts.useCustomStyleHook_unstable)('useTabStyles_unstable')(state);
19
21
  return (0, _renderTab.renderTab_unstable)(state);
20
22
  });
21
23
  Tab.displayName = 'Tab';
@@ -1 +1 @@
1
- {"version":3,"sources":["Tab.js"],"sourcesContent":["import * as React from 'react';\nimport { useTab_unstable } from './useTab';\nimport { renderTab_unstable } from './renderTab';\nimport { useTabStyles_unstable } from './useTabStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * A tab provides a selectable item in a tab list.\n */ export const Tab = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useTab_unstable(props, ref);\n useTabStyles_unstable(state);\n useCustomStyleHook_unstable('useTabStyles_unstable')(state);\n return renderTab_unstable(state);\n});\nTab.displayName = 'Tab';\n"],"names":["Tab","React","forwardRef","props","ref","state","useTab_unstable","useTabStyles_unstable","useCustomStyleHook_unstable","renderTab_unstable","displayName"],"mappings":";;;;+BAOiBA;;aAAAA;;;6DAPM;wBACS;2BACG;oCACG;qCACM;AAGjC,MAAMA,MAAM,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAM;IAChE,MAAMC,QAAQC,IAAAA,uBAAe,EAACH,OAAOC;IACrCG,IAAAA,yCAAqB,EAACF;IACtBG,IAAAA,gDAA2B,EAAC,yBAAyBH;IACrD,OAAOI,IAAAA,6BAAkB,EAACJ;AAC9B;AACAL,IAAIU,WAAW,GAAG"}
1
+ {"version":3,"sources":["Tab.js"],"sourcesContent":["import * as React from 'react';\nimport { useTab_unstable } from './useTab';\nimport { renderTab_unstable } from './renderTab';\nimport { useTabStyles_unstable } from './useTabStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * A tab provides a selectable item in a tab list.\n */ export const Tab = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useTab_unstable(props, ref);\n useTabStyles_unstable(state);\n useCustomStyleHook_unstable('useTabStyles_unstable')(state);\n return renderTab_unstable(state);\n});\nTab.displayName = 'Tab';\n"],"names":["Tab","React","forwardRef","props","ref","state","useTab_unstable","useTabStyles_unstable","useCustomStyleHook_unstable","renderTab_unstable","displayName"],"mappings":";;;;+BAOiBA;;;eAAAA;;;;iEAPM;wBACS;2BACG;oCACG;qCACM;AAGjC,MAAMA,MAAM,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC1D,MAAMC,QAAQC,IAAAA,uBAAe,EAACH,OAAOC;IACrCG,IAAAA,yCAAqB,EAACF;IACtBG,IAAAA,gDAA2B,EAAC,yBAAyBH;IACrD,OAAOI,IAAAA,6BAAkB,EAACJ;AAC9B;AACAL,IAAIU,WAAW,GAAG"}
@@ -2,10 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
- _exportStar(require("./Tab"), exports);
7
- _exportStar(require("./Tab.types"), exports);
8
- _exportStar(require("./renderTab"), exports);
9
- _exportStar(require("./useTab"), exports);
10
- _exportStar(require("./useTabStyles.styles"), exports);
11
- _exportStar(require("./useTabAnimatedIndicator.styles"), exports);
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./Tab"), exports);
7
+ _export_star._(require("./Tab.types"), exports);
8
+ _export_star._(require("./renderTab"), exports);
9
+ _export_star._(require("./useTab"), exports);
10
+ _export_star._(require("./useTabStyles.styles"), exports);
11
+ _export_star._(require("./useTabAnimatedIndicator.styles"), exports);
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './Tab';\nexport * from './Tab.types';\nexport * from './renderTab';\nexport * from './useTab';\nexport * from './useTabStyles.styles';\nexport * from './useTabAnimatedIndicator.styles';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;oBACA"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export * from './Tab';\nexport * from './Tab.types';\nexport * from './renderTab';\nexport * from './useTab';\nexport * from './useTabStyles.styles';\nexport * from './useTabAnimatedIndicator.styles';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA;uBACA"}
@@ -1,14 +1,22 @@
1
- /** @jsxRuntime classic */ /** @jsx createElement */ "use strict";
1
+ /** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ "use strict";
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
5
  Object.defineProperty(exports, "renderTab_unstable", {
6
6
  enumerable: true,
7
- get: ()=>renderTab_unstable
7
+ get: function() {
8
+ return renderTab_unstable;
9
+ }
8
10
  });
9
- const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
10
- const _reactUtilities = require("@fluentui/react-utilities");
11
+ const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
12
+ const _reactutilities = require("@fluentui/react-utilities");
11
13
  const renderTab_unstable = (state)=>{
12
- (0, _reactUtilities.assertSlots)(state);
13
- return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.root, null, state.icon && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.icon, null), !state.iconOnly && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.content, null), state.contentReservedSpace && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.contentReservedSpace, null));
14
+ (0, _reactutilities.assertSlots)(state);
15
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
16
+ children: [
17
+ state.icon && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.icon, {}),
18
+ !state.iconOnly && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.content, {}),
19
+ state.contentReservedSpace && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.contentReservedSpace, {})
20
+ ]
21
+ });
14
22
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderTab.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of Tab\n */ export const renderTab_unstable = (state)=>{\n assertSlots(state);\n return /*#__PURE__*/ createElement(state.root, null, state.icon && /*#__PURE__*/ createElement(state.icon, null), !state.iconOnly && /*#__PURE__*/ createElement(state.content, null), state.contentReservedSpace && /*#__PURE__*/ createElement(state.contentReservedSpace, null));\n};\n"],"names":["renderTab_unstable","state","assertSlots","createElement","root","icon","iconOnly","content","contentReservedSpace"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAIjCA;;aAAAA;;iCAJkE;gCACvD;AAGjB,MAAMA,qBAAqB,CAACC,QAAQ;IAC3CC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,8BAAa,EAACF,MAAMG,IAAI,EAAE,IAAI,EAAEH,MAAMI,IAAI,IAAI,WAAW,GAAGF,IAAAA,8BAAa,EAACF,MAAMI,IAAI,EAAE,IAAI,GAAG,CAACJ,MAAMK,QAAQ,IAAI,WAAW,GAAGH,IAAAA,8BAAa,EAACF,MAAMM,OAAO,EAAE,IAAI,GAAGN,MAAMO,oBAAoB,IAAI,WAAW,GAAGL,IAAAA,8BAAa,EAACF,MAAMO,oBAAoB,EAAE,IAAI;AACrR"}
1
+ {"version":3,"sources":["renderTab.js"],"sourcesContent":["/** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ import { jsx as _jsx, jsxs as _jsxs } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of Tab\n */ export const renderTab_unstable = (state)=>{\n assertSlots(state);\n return /*#__PURE__*/ _jsxs(state.root, {\n children: [\n state.icon && /*#__PURE__*/ _jsx(state.icon, {}),\n !state.iconOnly && /*#__PURE__*/ _jsx(state.content, {}),\n state.contentReservedSpace && /*#__PURE__*/ _jsx(state.contentReservedSpace, {})\n ]\n });\n};\n"],"names":["renderTab_unstable","state","assertSlots","_jsxs","root","children","icon","_jsx","iconOnly","content","contentReservedSpace"],"mappings":"AAAA,0BAA0B,GAAG,iDAAiD;;;;+BAI7DA;;;eAAAA;;;4BAJ2G;gCAChG;AAGjB,MAAMA,qBAAqB,CAACC;IACnCC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,gBAAK,EAACF,MAAMG,IAAI,EAAE;QACnCC,UAAU;YACNJ,MAAMK,IAAI,IAAI,WAAW,GAAGC,IAAAA,eAAI,EAACN,MAAMK,IAAI,EAAE,CAAC;YAC9C,CAACL,MAAMO,QAAQ,IAAI,WAAW,GAAGD,IAAAA,eAAI,EAACN,MAAMQ,OAAO,EAAE,CAAC;YACtDR,MAAMS,oBAAoB,IAAI,WAAW,GAAGH,IAAAA,eAAI,EAACN,MAAMS,oBAAoB,EAAE,CAAC;SACjF;IACL;AACJ"}
@@ -4,26 +4,29 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "useTab_unstable", {
6
6
  enumerable: true,
7
- get: ()=>useTab_unstable
7
+ get: function() {
8
+ return useTab_unstable;
9
+ }
8
10
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
- const _reactUtilities = require("@fluentui/react-utilities");
12
- const _tabListContext = require("../TabList/TabListContext");
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _reactutilities = require("@fluentui/react-utilities");
14
+ const _TabListContext = require("../TabList/TabListContext");
13
15
  const useTab_unstable = (props, ref)=>{
14
- const { content , disabled: tabDisabled = false , icon , onClick , value } = props;
15
- const appearance = (0, _tabListContext.useTabListContext_unstable)((ctx)=>ctx.appearance);
16
- const reserveSelectedTabSpace = (0, _tabListContext.useTabListContext_unstable)((ctx)=>ctx.reserveSelectedTabSpace);
17
- const listDisabled = (0, _tabListContext.useTabListContext_unstable)((ctx)=>ctx.disabled);
18
- const selected = (0, _tabListContext.useTabListContext_unstable)((ctx)=>ctx.selectedValue === value);
19
- const onRegister = (0, _tabListContext.useTabListContext_unstable)((ctx)=>ctx.onRegister);
20
- const onUnregister = (0, _tabListContext.useTabListContext_unstable)((ctx)=>ctx.onUnregister);
21
- const onSelect = (0, _tabListContext.useTabListContext_unstable)((ctx)=>ctx.onSelect);
22
- const size = (0, _tabListContext.useTabListContext_unstable)((ctx)=>ctx.size);
23
- const vertical = (0, _tabListContext.useTabListContext_unstable)((ctx)=>!!ctx.vertical);
16
+ var _iconSlot;
17
+ const { content, disabled: tabDisabled = false, icon, onClick, value } = props;
18
+ const appearance = (0, _TabListContext.useTabListContext_unstable)((ctx)=>ctx.appearance);
19
+ const reserveSelectedTabSpace = (0, _TabListContext.useTabListContext_unstable)((ctx)=>ctx.reserveSelectedTabSpace);
20
+ const listDisabled = (0, _TabListContext.useTabListContext_unstable)((ctx)=>ctx.disabled);
21
+ const selected = (0, _TabListContext.useTabListContext_unstable)((ctx)=>ctx.selectedValue === value);
22
+ const onRegister = (0, _TabListContext.useTabListContext_unstable)((ctx)=>ctx.onRegister);
23
+ const onUnregister = (0, _TabListContext.useTabListContext_unstable)((ctx)=>ctx.onUnregister);
24
+ const onSelect = (0, _TabListContext.useTabListContext_unstable)((ctx)=>ctx.onSelect);
25
+ const size = (0, _TabListContext.useTabListContext_unstable)((ctx)=>ctx.size);
26
+ const vertical = (0, _TabListContext.useTabListContext_unstable)((ctx)=>!!ctx.vertical);
24
27
  const disabled = listDisabled || tabDisabled;
25
28
  const innerRef = _react.useRef(null);
26
- const onTabClick = (0, _reactUtilities.useEventCallback)((0, _reactUtilities.mergeCallbacks)(onClick, (event)=>onSelect(event, {
29
+ const onTabClick = (0, _reactutilities.useEventCallback)((0, _reactutilities.mergeCallbacks)(onClick, (event)=>onSelect(event, {
27
30
  value
28
31
  })));
29
32
  _react.useEffect(()=>{
@@ -43,16 +46,16 @@ const useTab_unstable = (props, ref)=>{
43
46
  innerRef,
44
47
  value
45
48
  ]);
46
- const iconSlot = _reactUtilities.slot.optional(icon, {
49
+ const iconSlot = _reactutilities.slot.optional(icon, {
47
50
  elementType: 'span'
48
51
  });
49
- const contentSlot = _reactUtilities.slot.always(content, {
52
+ const contentSlot = _reactutilities.slot.always(content, {
50
53
  defaultProps: {
51
54
  children: props.children
52
55
  },
53
56
  elementType: 'span'
54
57
  });
55
- const iconOnly = Boolean((iconSlot === null || iconSlot === void 0 ? void 0 : iconSlot.children) && !contentSlot.children);
58
+ const iconOnly = Boolean(((_iconSlot = iconSlot) === null || _iconSlot === void 0 ? void 0 : _iconSlot.children) && !contentSlot.children);
56
59
  return {
57
60
  components: {
58
61
  root: 'button',
@@ -60,8 +63,8 @@ const useTab_unstable = (props, ref)=>{
60
63
  content: 'span',
61
64
  contentReservedSpace: 'span'
62
65
  },
63
- root: _reactUtilities.slot.always((0, _reactUtilities.getNativeElementProps)('button', {
64
- ref: (0, _reactUtilities.useMergedRefs)(ref, innerRef),
66
+ root: _reactutilities.slot.always((0, _reactutilities.getNativeElementProps)('button', {
67
+ ref: (0, _reactutilities.useMergedRefs)(ref, innerRef),
65
68
  role: 'tab',
66
69
  type: 'button',
67
70
  // aria-selected undefined indicates it is not selectable
@@ -76,7 +79,7 @@ const useTab_unstable = (props, ref)=>{
76
79
  icon: iconSlot,
77
80
  iconOnly,
78
81
  content: contentSlot,
79
- contentReservedSpace: _reactUtilities.slot.optional(content, {
82
+ contentReservedSpace: _reactutilities.slot.optional(content, {
80
83
  renderByDefault: !selected && !iconOnly && reserveSelectedTabSpace,
81
84
  defaultProps: {
82
85
  children: props.children
@@ -1 +1 @@
1
- {"version":3,"sources":["useTab.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, mergeCallbacks, useEventCallback, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useTabListContext_unstable } from '../TabList/TabListContext';\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 */ export const useTab_unstable = (props, ref)=>{\n const { content , disabled: tabDisabled = false , icon , onClick , value } = props;\n const appearance = useTabListContext_unstable((ctx)=>ctx.appearance);\n const reserveSelectedTabSpace = useTabListContext_unstable((ctx)=>ctx.reserveSelectedTabSpace);\n const listDisabled = useTabListContext_unstable((ctx)=>ctx.disabled);\n const selected = useTabListContext_unstable((ctx)=>ctx.selectedValue === value);\n const onRegister = useTabListContext_unstable((ctx)=>ctx.onRegister);\n const onUnregister = useTabListContext_unstable((ctx)=>ctx.onUnregister);\n const onSelect = useTabListContext_unstable((ctx)=>ctx.onSelect);\n const size = useTabListContext_unstable((ctx)=>ctx.size);\n const vertical = useTabListContext_unstable((ctx)=>!!ctx.vertical);\n const disabled = listDisabled || tabDisabled;\n const innerRef = React.useRef(null);\n const onTabClick = useEventCallback(mergeCallbacks(onClick, (event)=>onSelect(event, {\n value\n })));\n React.useEffect(()=>{\n onRegister({\n value,\n ref: innerRef\n });\n return ()=>{\n onUnregister({\n value,\n ref: innerRef\n });\n };\n }, [\n onRegister,\n onUnregister,\n innerRef,\n value\n ]);\n const iconSlot = slot.optional(icon, {\n elementType: 'span'\n });\n const contentSlot = slot.always(content, {\n defaultProps: {\n children: props.children\n },\n elementType: 'span'\n });\n const iconOnly = Boolean((iconSlot === null || iconSlot === void 0 ? void 0 : iconSlot.children) && !contentSlot.children);\n return {\n components: {\n root: 'button',\n icon: 'span',\n content: 'span',\n contentReservedSpace: 'span'\n },\n root: slot.always(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: onTabClick\n }), {\n elementType: 'button'\n }),\n icon: iconSlot,\n iconOnly,\n content: contentSlot,\n contentReservedSpace: slot.optional(content, {\n renderByDefault: !selected && !iconOnly && reserveSelectedTabSpace,\n defaultProps: {\n children: props.children\n },\n elementType: 'span'\n }),\n appearance,\n disabled,\n selected,\n size,\n value,\n vertical\n };\n};\n"],"names":["useTab_unstable","props","ref","content","disabled","tabDisabled","icon","onClick","value","appearance","useTabListContext_unstable","ctx","reserveSelectedTabSpace","listDisabled","selected","selectedValue","onRegister","onUnregister","onSelect","size","vertical","innerRef","React","useRef","onTabClick","useEventCallback","mergeCallbacks","event","useEffect","iconSlot","slot","optional","elementType","contentSlot","always","defaultProps","children","iconOnly","Boolean","components","root","contentReservedSpace","getNativeElementProps","useMergedRefs","role","type","undefined","renderByDefault"],"mappings":";;;;+BAWiBA;;aAAAA;;;6DAXM;gCACsE;gCAClD;AAShC,MAAMA,kBAAkB,CAACC,OAAOC,MAAM;IAC7C,MAAM,EAAEC,QAAO,EAAGC,UAAUC,cAAc,KAAK,CAAA,EAAGC,KAAI,EAAGC,QAAO,EAAGC,MAAK,EAAG,GAAGP;IAC9E,MAAMQ,aAA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AA,aAAa,IAAI,IAAIA,aAAa,KAAK,IAAI,KAAK,IAAIA,SAASO,QAAQ,AAAD,KAAM,CAACH,YAAYG,QAAQ;IACzH,OAAO;QACHG,YAAY;YACRC,MAAM;YACNlC,MAAM;YACNH,SAAS;YACTsC,sBAAsB;QAC1B;QACAD,MAAMV,oBAAI,CAACI,MAAM,CAACQ,IAAAA,qCAAqB,EAAC,UAAU;YAC9CxC,KAAKyC,IAAAA,6BAAa,EAACzC,KAAKmB;YACxBuB,MAAM;YACNC,MAAM;YACN,yDAAyD;YACzD,iEAAiE;YACjE,iBAAiBzC,WAAW0C,YAAY,CAAC,EAAEhC,SAAS,CAAC;YACrD,GAAGb,KAAK;YACRG;YACAG,SAASiB;QACb,IAAI;YACAQ,aAAa;QACjB;QACA1B,MAAMuB;QACNQ;QACAlC,SAAS8B;QACTQ,sBAAsBX,oBAAI,CAACC,QAAQ,CAAC5B,SAAS;YACzC4C,iBAAiB,CAACjC,YAAY,CAACuB,YAAYzB;YAC3CuB,cAAc;gBACVC,UAAUnC,MAAMmC,QAAQ;YAC5B;YACAJ,aAAa;QACjB;QACAvB;QACAL;QACAU;QACAK;QACAX;QACAY;IACJ;AACJ"}
1
+ {"version":3,"sources":["useTab.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, mergeCallbacks, useEventCallback, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useTabListContext_unstable } from '../TabList/TabListContext';\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 */ export const useTab_unstable = (props, ref)=>{\n var _iconSlot;\n const { content, disabled: tabDisabled = false, icon, onClick, value } = props;\n const appearance = useTabListContext_unstable((ctx)=>ctx.appearance);\n const reserveSelectedTabSpace = useTabListContext_unstable((ctx)=>ctx.reserveSelectedTabSpace);\n const listDisabled = useTabListContext_unstable((ctx)=>ctx.disabled);\n const selected = useTabListContext_unstable((ctx)=>ctx.selectedValue === value);\n const onRegister = useTabListContext_unstable((ctx)=>ctx.onRegister);\n const onUnregister = useTabListContext_unstable((ctx)=>ctx.onUnregister);\n const onSelect = useTabListContext_unstable((ctx)=>ctx.onSelect);\n const size = useTabListContext_unstable((ctx)=>ctx.size);\n const vertical = useTabListContext_unstable((ctx)=>!!ctx.vertical);\n const disabled = listDisabled || tabDisabled;\n const innerRef = React.useRef(null);\n const onTabClick = useEventCallback(mergeCallbacks(onClick, (event)=>onSelect(event, {\n value\n })));\n React.useEffect(()=>{\n onRegister({\n value,\n ref: innerRef\n });\n return ()=>{\n onUnregister({\n value,\n ref: innerRef\n });\n };\n }, [\n onRegister,\n onUnregister,\n innerRef,\n value\n ]);\n const iconSlot = slot.optional(icon, {\n elementType: 'span'\n });\n const contentSlot = slot.always(content, {\n defaultProps: {\n children: props.children\n },\n elementType: 'span'\n });\n const iconOnly = Boolean(((_iconSlot = iconSlot) === null || _iconSlot === void 0 ? void 0 : _iconSlot.children) && !contentSlot.children);\n return {\n components: {\n root: 'button',\n icon: 'span',\n content: 'span',\n contentReservedSpace: 'span'\n },\n root: slot.always(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: onTabClick\n }), {\n elementType: 'button'\n }),\n icon: iconSlot,\n iconOnly,\n content: contentSlot,\n contentReservedSpace: slot.optional(content, {\n renderByDefault: !selected && !iconOnly && reserveSelectedTabSpace,\n defaultProps: {\n children: props.children\n },\n elementType: 'span'\n }),\n appearance,\n disabled,\n selected,\n size,\n value,\n vertical\n };\n};\n"],"names":["useTab_unstable","props","ref","_iconSlot","content","disabled","tabDisabled","icon","onClick","value","appearance","useTabListContext_unstable","ctx","reserveSelectedTabSpace","listDisabled","selected","selectedValue","onRegister","onUnregister","onSelect","size","vertical","innerRef","React","useRef","onTabClick","useEventCallback","mergeCallbacks","event","useEffect","iconSlot","slot","optional","elementType","contentSlot","always","defaultProps","children","iconOnly","Boolean","components","root","contentReservedSpace","getNativeElementProps","useMergedRefs","role","type","undefined","renderByDefault"],"mappings":";;;;+BAWiBA;;;eAAAA;;;;iEAXM;gCACsE;gCAClD;AAShC,MAAMA,kBAAkB,CAACC,OAAOC;IACvC,IAAIC;IACJ,MAAM,EAAEC,OAAO,EAAEC,UAAUC,cAAc,KAAK,EAAEC,IAAI,EAAEC,OAAO,EAAEC,KAAK,EAAE,GAAGR;IACzE,MAAMS,aAAaC,IAAAA,0CAA0B,EAAC,CAACC,MAAMA,IAAIF,UAAU;IACnE,MAAMG,0BAA0BF,IAAAA,0CAA0B,EAAC,CAACC,MAAMA,IAAIC,uBAAuB;IAC7F,MAAMC,eAAeH,IAAAA,0CAA0B,EAAC,CAACC,MAAMA,IAAIP,QAAQ;IACnE,MAAMU,WAAWJ,IAAAA,0CAA0B,EAAC,CAACC,MAAMA,IAAII,aAAa,KAAKP;IACzE,MAAMQ,aAAaN,IAAAA,0CAA0B,EAAC,CAACC,MAAMA,IAAIK,UAAU;IACnE,MAAMC,eAAeP,IAAAA,0CAA0B,EAAC,CAACC,MAAMA,IAAIM,YAAY;IACvE,MAAMC,WAAWR,IAAAA,0CAA0B,EAAC,CAACC,MAAMA,IAAIO,QAAQ;IAC/D,MAAMC,OAAOT,IAAAA,0CAA0B,EAAC,CAACC,MAAMA,IAAIQ,IAAI;IACvD,MAAMC,WAAWV,IAAAA,0CAA0B,EAAC,CAACC,MAAM,CAAC,CAACA,IAAIS,QAAQ;IACjE,MAAMhB,WAAWS,gBAAgBR;IACjC,MAAMgB,WAAWC,OAAMC,MAAM,CAAC;IAC9B,MAAMC,aAAaC,IAAAA,gCAAgB,EAACC,IAAAA,8BAAc,EAACnB,SAAS,CAACoB,QAAQT,SAASS,OAAO;YAC7EnB;QACJ;IACJc,OAAMM,SAAS,CAAC;QACZZ,WAAW;YACPR;YACAP,KAAKoB;QACT;QACA,OAAO;YACHJ,aAAa;gBACTT;gBACAP,KAAKoB;YACT;QACJ;IACJ,GAAG;QACCL;QACAC;QACAI;QACAb;KACH;IACD,MAAMqB,WAAWC,oBAAI,CAACC,QAAQ,CAACzB,MAAM;QACjC0B,aAAa;IACjB;IACA,MAAMC,cAAcH,oBAAI,CAACI,MAAM,CAAC/B,SAAS;QACrCgC,cAAc;YACVC,UAAUpC,MAAMoC,QAAQ;QAC5B;QACAJ,aAAa;IACjB;IACA,MAAMK,WAAWC,QAAQ,AAAC,CAAA,AAACpC,CAAAA,YAAY2B,QAAO,MAAO,QAAQ3B,cAAc,KAAK,IAAI,KAAK,IAAIA,UAAUkC,QAAQ,AAAD,KAAM,CAACH,YAAYG,QAAQ;IACzI,OAAO;QACHG,YAAY;YACRC,MAAM;YACNlC,MAAM;YACNH,SAAS;YACTsC,sBAAsB;QAC1B;QACAD,MAAMV,oBAAI,CAACI,MAAM,CAACQ,IAAAA,qCAAqB,EAAC,UAAU;YAC9CzC,KAAK0C,IAAAA,6BAAa,EAAC1C,KAAKoB;YACxBuB,MAAM;YACNC,MAAM;YACN,yDAAyD;YACzD,iEAAiE;YACjE,iBAAiBzC,WAAW0C,YAAY,CAAC,EAAEhC,SAAS,CAAC;YACrD,GAAGd,KAAK;YACRI;YACAG,SAASiB;QACb,IAAI;YACAQ,aAAa;QACjB;QACA1B,MAAMuB;QACNQ;QACAlC,SAAS8B;QACTQ,sBAAsBX,oBAAI,CAACC,QAAQ,CAAC5B,SAAS;YACzC4C,iBAAiB,CAACjC,YAAY,CAACuB,YAAYzB;YAC3CuB,cAAc;gBACVC,UAAUpC,MAAMoC,QAAQ;YAC5B;YACAJ,aAAa;QACjB;QACAvB;QACAL;QACAU;QACAK;QACAX;QACAY;IACJ;AACJ"}
@@ -4,18 +4,20 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "useTabAnimatedIndicatorStyles_unstable", {
6
6
  enumerable: true,
7
- get: ()=>useTabAnimatedIndicatorStyles_unstable
7
+ get: function() {
8
+ return useTabAnimatedIndicatorStyles_unstable;
9
+ }
8
10
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
11
13
  const _react1 = require("@griffel/react");
12
- const _tabListContext = require("../TabList/TabListContext");
14
+ const _TabListContext = require("../TabList/TabListContext");
13
15
  // eslint-disable-next-line @typescript-eslint/naming-convention
14
16
  const tabIndicatorCssVars_unstable = {
15
17
  offsetVar: '--fui-Tab__indicator--offset',
16
18
  scaleVar: '--fui-Tab__indicator--scale'
17
19
  };
18
- const useActiveIndicatorStyles = /*#__PURE__*/ (0, _react1["__styles"])({
20
+ const useActiveIndicatorStyles = /*#__PURE__*/ (0, _react1.__styles)({
19
21
  base: {
20
22
  B68tc82: "f1mtd64y",
21
23
  Bmxbyg5: "f1y7q3j9"
@@ -91,14 +93,14 @@ const getRegisteredTabRect = (registeredTabs, value)=>{
91
93
  return element ? calculateTabRect(element) : undefined;
92
94
  };
93
95
  const useTabAnimatedIndicatorStyles_unstable = (state)=>{
94
- const { disabled , selected , vertical } = state;
96
+ const { disabled, selected, vertical } = state;
95
97
  const activeIndicatorStyles = useActiveIndicatorStyles();
96
98
  const [lastAnimatedFrom, setLastAnimatedFrom] = _react.useState();
97
99
  const [animationValues, setAnimationValues] = _react.useState({
98
100
  offset: 0,
99
101
  scale: 1
100
102
  });
101
- const getRegisteredTabs = (0, _tabListContext.useTabListContext_unstable)((ctx)=>ctx.getRegisteredTabs);
103
+ const getRegisteredTabs = (0, _TabListContext.useTabListContext_unstable)((ctx)=>ctx.getRegisteredTabs);
102
104
  _react.useEffect(()=>{
103
105
  if (lastAnimatedFrom) {
104
106
  setAnimationValues({
@@ -110,7 +112,7 @@ const useTabAnimatedIndicatorStyles_unstable = (state)=>{
110
112
  lastAnimatedFrom
111
113
  ]);
112
114
  if (selected) {
113
- const { previousSelectedValue , selectedValue , registeredTabs } = getRegisteredTabs();
115
+ const { previousSelectedValue, selectedValue, registeredTabs } = getRegisteredTabs();
114
116
  if (previousSelectedValue && lastAnimatedFrom !== previousSelectedValue) {
115
117
  const previousSelectedTabRect = getRegisteredTabRect(registeredTabs, previousSelectedValue);
116
118
  const selectedTabRect = getRegisteredTabRect(registeredTabs, selectedValue);
@@ -1 +1 @@
1
- {"version":3,"sources":["useTabAnimatedIndicator.styles.js"],"sourcesContent":["import * as React from 'react';\nimport { __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { useTabListContext_unstable } from '../TabList/TabListContext';\nimport { tokens } from '@fluentui/react-theme';\n// eslint-disable-next-line @typescript-eslint/naming-convention\nconst tabIndicatorCssVars_unstable = {\n offsetVar: '--fui-Tab__indicator--offset',\n scaleVar: '--fui-Tab__indicator--scale'\n};\nconst useActiveIndicatorStyles = /*#__PURE__*/__styles({\n base: {\n B68tc82: \"f1mtd64y\",\n Bmxbyg5: \"f1y7q3j9\"\n },\n animated: {\n Ba2ppi3: \"fhwpy7i\",\n F2fol1: \"f6zz20j\",\n B1dyfl9: \"f1ai4sc1\",\n B0vmy72: \"f9qxlq5\",\n u9bimw: \"f1aql376\"\n },\n horizontal: {\n sjv3b2: [\"fug4aj8\", \"f1i5xzg7\"],\n b1kco5: \"f1q7ujh\"\n },\n vertical: {\n sjv3b2: \"f1hqboyk\",\n b1kco5: \"f1dxupa6\"\n }\n}, {\n d: [\".f1mtd64y{overflow-x:visible;}\", \".f1y7q3j9{overflow-y:visible;}\", \".fhwpy7i::after{transition-property:transform;}\", \".f6zz20j::after{transition-duration:var(--durationSlow);}\", \".f1ai4sc1::after{transition-timing-function:var(--curveDecelerateMax);}\", \".fug4aj8::after{transform-origin:left;}\", \".f1i5xzg7::after{transform-origin:right;}\", \".f1q7ujh::after{transform:translateX(var(--fui-Tab__indicator--offset)) scaleX(var(--fui-Tab__indicator--scale));}\", \".f1hqboyk::after{transform-origin:top;}\", \".f1dxupa6::after{transform:translateY(var(--fui-Tab__indicator--offset)) scaleY(var(--fui-Tab__indicator--scale));}\"],\n m: [[\"@media (prefers-reduced-motion: reduce){.f9qxlq5::after{transition-property:none;}}\", {\n m: \"(prefers-reduced-motion: reduce)\"\n }], [\"@media (prefers-reduced-motion: reduce){.f1aql376::after{transition-duration:0.01ms;}}\", {\n m: \"(prefers-reduced-motion: reduce)\"\n }]]\n});\nconst calculateTabRect = element => {\n if (element) {\n var _element_parentElement;\n const parentRect = ((_element_parentElement = element.parentElement) === null || _element_parentElement === void 0 ? void 0 : _element_parentElement.getBoundingClientRect()) || {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n };\n const tabRect = element.getBoundingClientRect();\n return {\n x: tabRect.x - parentRect.x,\n y: tabRect.y - parentRect.y,\n width: tabRect.width,\n height: tabRect.height\n };\n }\n return undefined;\n};\nconst getRegisteredTabRect = (registeredTabs, value) => {\n var _registeredTabs_JSON_stringify;\n const element = value !== undefined && value !== null ? (_registeredTabs_JSON_stringify = registeredTabs[JSON.stringify(value)]) === null || _registeredTabs_JSON_stringify === void 0 ? void 0 : _registeredTabs_JSON_stringify.ref.current : undefined;\n return element ? calculateTabRect(element) : undefined;\n};\n/**\n * Adds additional styling to the active tab selection indicator to create a sliding animation.\n */\nexport const useTabAnimatedIndicatorStyles_unstable = state => {\n const {\n disabled,\n selected,\n vertical\n } = state;\n const activeIndicatorStyles = useActiveIndicatorStyles();\n const [lastAnimatedFrom, setLastAnimatedFrom] = React.useState();\n const [animationValues, setAnimationValues] = React.useState({\n offset: 0,\n scale: 1\n });\n const getRegisteredTabs = useTabListContext_unstable(ctx => ctx.getRegisteredTabs);\n React.useEffect(() => {\n if (lastAnimatedFrom) {\n setAnimationValues({\n offset: 0,\n scale: 1\n });\n }\n }, [lastAnimatedFrom]);\n if (selected) {\n const {\n previousSelectedValue,\n selectedValue,\n registeredTabs\n } = getRegisteredTabs();\n if (previousSelectedValue && lastAnimatedFrom !== previousSelectedValue) {\n const previousSelectedTabRect = getRegisteredTabRect(registeredTabs, previousSelectedValue);\n const selectedTabRect = getRegisteredTabRect(registeredTabs, selectedValue);\n if (selectedTabRect && previousSelectedTabRect) {\n const offset = vertical ? previousSelectedTabRect.y - selectedTabRect.y : previousSelectedTabRect.x - selectedTabRect.x;\n const scale = vertical ? previousSelectedTabRect.height / selectedTabRect.height : previousSelectedTabRect.width / selectedTabRect.width;\n setAnimationValues({\n offset,\n scale\n });\n setLastAnimatedFrom(previousSelectedValue);\n }\n }\n } else if (lastAnimatedFrom) {\n // need to clear the last animated from so that if this tab is selected again\n // from the same previous tab as last time, that animation still happens.\n setLastAnimatedFrom(undefined);\n }\n // do not apply any animation if the tab is disabled\n if (disabled) {\n return state;\n }\n // the animation should only happen as the selection indicator returns to its\n // original position and not when set at the previous tabs position.\n const animating = animationValues.offset === 0 && animationValues.scale === 1;\n state.root.className = mergeClasses(state.root.className, selected && activeIndicatorStyles.base, selected && animating && activeIndicatorStyles.animated, selected && (vertical ? activeIndicatorStyles.vertical : activeIndicatorStyles.horizontal));\n const rootCssVars = {\n [tabIndicatorCssVars_unstable.offsetVar]: `${animationValues.offset}px`,\n [tabIndicatorCssVars_unstable.scaleVar]: `${animationValues.scale}`\n };\n state.root.style = {\n ...rootCssVars,\n ...state.root.style\n };\n return state;\n};\n//# sourceMappingURL=useTabAnimatedIndicator.styles.js.map"],"names":["useTabAnimatedIndicatorStyles_unstable","tabIndicatorCssVars_unstable","offsetVar","scaleVar","useActiveIndicatorStyles","__styles","base","B68tc82","Bmxbyg5","animated","Ba2ppi3","F2fol1","B1dyfl9","B0vmy72","u9bimw","horizontal","sjv3b2","b1kco5","vertical","d","m","calculateTabRect","element","_element_parentElement","parentRect","parentElement","getBoundingClientRect","x","y","width","height","tabRect","undefined","getRegisteredTabRect","registeredTabs","value","_registeredTabs_JSON_stringify","JSON","stringify","ref","current","state","disabled","selected","activeIndicatorStyles","lastAnimatedFrom","setLastAnimatedFrom","React","useState","animationValues","setAnimationValues","offset","scale","getRegisteredTabs","useTabListContext_unstable","ctx","useEffect","previousSelectedValue","selectedValue","previousSelectedTabRect","selectedTabRect","animating","root","className","mergeClasses","rootCssVars","style"],"mappings":";;;;+BAgEaA;;aAAAA;;;6DAhEU;wBAC4B;gCACR;AAE3C,gEAAgE;AAChE,MAAMC,+BAA+B;IACnCC,WAAW;IACXC,UAAU;AACZ;AACA,MAAMC,2BAA2B,WAAW,GAAEC,IAAAA,mBAAQ,EAAC;IACrDC,MAAM;QACJC,SAAS;QACTC,SAAS;IACX;IACAC,UAAU;QACRC,SAAS;QACTC,QAAQ;QACRC,SAAS;QACTC,SAAS;QACTC,QAAQ;IACV;IACAC,YAAY;QACVC,QAAQ;YAAC;YAAW;SAAW;QAC/BC,QAAQ;IACV;IACAC,UAAU;QACRF,QAAQ;QACRC,QAAQ;IACV;AACF,GAAG;IACDE,GAAG;QAAC;QAAkC;QAAkC;QAAmD;QAA6D;QAA2E;QAA2C;QAA6C;QAAsH;QAA2C;KAAsH;IAClnBC,GAAG;QAAC;YAAC;YAAuF;gBAC1FA,GAAG;YACL;SAAE;QAAE;YAAC;YAA0F;gBAC7FA,GAAG;YACL;SAAE;KAAC;AACL;AACA,MAAMC,mBAAmBC,CAAAA,UAAW;IAClC,IAAIA,SAAS;QACX,IAAIC;QACJ,MAAMC,aAAa,AAAC,CAAA,AAACD,CAAAA,yBAAyBD,QAAQG,aAAa,AAAD,MAAO,IAAI,IAAIF,2BAA2B,KAAK,IAAI,KAAK,IAAIA,uBAAuBG,qBAAqB,EAAE,AAAD,KAAM;YAC/KC,GAAG;YACHC,GAAG;YACHC,OAAO;YACPC,QAAQ;QACV;QACA,MAAMC,UAAUT,QAAQI,qBAAqB;QAC7C,OAAO;YACLC,GAAGI,QAAQJ,CAAC,GAAGH,WAA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ASjC,WAAWyC,wBAAwB/B,CAAC,GAAGgC,gBAAgBhC,CAAC,GAAG+B,wBAAwBhC,CAAC,GAAGiC,gBAAgBjC,CAAC;gBACvH,MAAMyB,QAAQlC,WAAWyC,wBAAwB7B,MAAM,GAAG8B,gBAAgB9B,MAAM,GAAG6B,wBAAwB9B,KAAK,GAAG+B,gBAAgB/B,KAAK;gBACxIqB,mBAAmB;oBACjBC;oBACAC;gBACF;gBACAN,oBAAoBW;YACtB,CAAC;QACH,CAAC;IACH,OAAO,IAAIZ,kBAAkB;QAC3B,6EAA6E;QAC7E,yEAAyE;QACzEC,oBAAoBd;IACtB,CAAC;IACD,oDAAoD;IACpD,IAAIU,UAAU;QACZ,OAAOD;IACT,CAAC;IACD,6EAA6E;IAC7E,oEAAoE;IACpE,MAAMoB,YAAYZ,gBAAgBE,MAAM,KAAK,KAAKF,gBAAgBG,KAAK,KAAK;IAC5EX,MAAMqB,IAAI,CAACC,SAAS,GAAGC,IAAAA,oBAAY,EAACvB,MAAMqB,IAAI,CAACC,SAAS,EAAEpB,YAAYC,sBAAsBtC,IAAI,EAAEqC,YAAYkB,aAAajB,sBAAsBnC,QAAQ,EAAEkC,YAAazB,CAAAA,WAAW0B,sBAAsB1B,QAAQ,GAAG0B,sBAAsB7B,UAAU,AAAD;IACnP,MAAMkD,cAAc;QAClB,CAAChE,6BAA6BC,SAAS,CAAC,EAAE,CAAC,EAAE+C,gBAAgBE,MAAM,CAAC,EAAE,CAAC;QACvE,CAAClD,6BAA6BE,QAAQ,CAAC,EAAE,CAAC,EAAE8C,gBAAgBG,KAAK,CAAC,CAAC;IACrE;IACAX,MAAMqB,IAAI,CAACI,KAAK,GAAG;QACjB,GAAGD,WAAW;QACd,GAAGxB,MAAMqB,IAAI,CAACI,KAAK;IACrB;IACA,OAAOzB;AACT,GACA,0DAA0D"}
1
+ {"version":3,"sources":["useTabAnimatedIndicator.styles.js"],"sourcesContent":["import * as React from 'react';\nimport { __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { useTabListContext_unstable } from '../TabList/TabListContext';\nimport { tokens } from '@fluentui/react-theme';\n// eslint-disable-next-line @typescript-eslint/naming-convention\nconst tabIndicatorCssVars_unstable = {\n offsetVar: '--fui-Tab__indicator--offset',\n scaleVar: '--fui-Tab__indicator--scale'\n};\nconst useActiveIndicatorStyles = /*#__PURE__*/__styles({\n base: {\n B68tc82: \"f1mtd64y\",\n Bmxbyg5: \"f1y7q3j9\"\n },\n animated: {\n Ba2ppi3: \"fhwpy7i\",\n F2fol1: \"f6zz20j\",\n B1dyfl9: \"f1ai4sc1\",\n B0vmy72: \"f9qxlq5\",\n u9bimw: \"f1aql376\"\n },\n horizontal: {\n sjv3b2: [\"fug4aj8\", \"f1i5xzg7\"],\n b1kco5: \"f1q7ujh\"\n },\n vertical: {\n sjv3b2: \"f1hqboyk\",\n b1kco5: \"f1dxupa6\"\n }\n}, {\n d: [\".f1mtd64y{overflow-x:visible;}\", \".f1y7q3j9{overflow-y:visible;}\", \".fhwpy7i::after{transition-property:transform;}\", \".f6zz20j::after{transition-duration:var(--durationSlow);}\", \".f1ai4sc1::after{transition-timing-function:var(--curveDecelerateMax);}\", \".fug4aj8::after{transform-origin:left;}\", \".f1i5xzg7::after{transform-origin:right;}\", \".f1q7ujh::after{transform:translateX(var(--fui-Tab__indicator--offset)) scaleX(var(--fui-Tab__indicator--scale));}\", \".f1hqboyk::after{transform-origin:top;}\", \".f1dxupa6::after{transform:translateY(var(--fui-Tab__indicator--offset)) scaleY(var(--fui-Tab__indicator--scale));}\"],\n m: [[\"@media (prefers-reduced-motion: reduce){.f9qxlq5::after{transition-property:none;}}\", {\n m: \"(prefers-reduced-motion: reduce)\"\n }], [\"@media (prefers-reduced-motion: reduce){.f1aql376::after{transition-duration:0.01ms;}}\", {\n m: \"(prefers-reduced-motion: reduce)\"\n }]]\n});\nconst calculateTabRect = element => {\n if (element) {\n var _element_parentElement;\n const parentRect = ((_element_parentElement = element.parentElement) === null || _element_parentElement === void 0 ? void 0 : _element_parentElement.getBoundingClientRect()) || {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n };\n const tabRect = element.getBoundingClientRect();\n return {\n x: tabRect.x - parentRect.x,\n y: tabRect.y - parentRect.y,\n width: tabRect.width,\n height: tabRect.height\n };\n }\n return undefined;\n};\nconst getRegisteredTabRect = (registeredTabs, value) => {\n var _registeredTabs_JSON_stringify;\n const element = value !== undefined && value !== null ? (_registeredTabs_JSON_stringify = registeredTabs[JSON.stringify(value)]) === null || _registeredTabs_JSON_stringify === void 0 ? void 0 : _registeredTabs_JSON_stringify.ref.current : undefined;\n return element ? calculateTabRect(element) : undefined;\n};\n/**\n * Adds additional styling to the active tab selection indicator to create a sliding animation.\n */\nexport const useTabAnimatedIndicatorStyles_unstable = state => {\n const {\n disabled,\n selected,\n vertical\n } = state;\n const activeIndicatorStyles = useActiveIndicatorStyles();\n const [lastAnimatedFrom, setLastAnimatedFrom] = React.useState();\n const [animationValues, setAnimationValues] = React.useState({\n offset: 0,\n scale: 1\n });\n const getRegisteredTabs = useTabListContext_unstable(ctx => ctx.getRegisteredTabs);\n React.useEffect(() => {\n if (lastAnimatedFrom) {\n setAnimationValues({\n offset: 0,\n scale: 1\n });\n }\n }, [lastAnimatedFrom]);\n if (selected) {\n const {\n previousSelectedValue,\n selectedValue,\n registeredTabs\n } = getRegisteredTabs();\n if (previousSelectedValue && lastAnimatedFrom !== previousSelectedValue) {\n const previousSelectedTabRect = getRegisteredTabRect(registeredTabs, previousSelectedValue);\n const selectedTabRect = getRegisteredTabRect(registeredTabs, selectedValue);\n if (selectedTabRect && previousSelectedTabRect) {\n const offset = vertical ? previousSelectedTabRect.y - selectedTabRect.y : previousSelectedTabRect.x - selectedTabRect.x;\n const scale = vertical ? previousSelectedTabRect.height / selectedTabRect.height : previousSelectedTabRect.width / selectedTabRect.width;\n setAnimationValues({\n offset,\n scale\n });\n setLastAnimatedFrom(previousSelectedValue);\n }\n }\n } else if (lastAnimatedFrom) {\n // need to clear the last animated from so that if this tab is selected again\n // from the same previous tab as last time, that animation still happens.\n setLastAnimatedFrom(undefined);\n }\n // do not apply any animation if the tab is disabled\n if (disabled) {\n return state;\n }\n // the animation should only happen as the selection indicator returns to its\n // original position and not when set at the previous tabs position.\n const animating = animationValues.offset === 0 && animationValues.scale === 1;\n state.root.className = mergeClasses(state.root.className, selected && activeIndicatorStyles.base, selected && animating && activeIndicatorStyles.animated, selected && (vertical ? activeIndicatorStyles.vertical : activeIndicatorStyles.horizontal));\n const rootCssVars = {\n [tabIndicatorCssVars_unstable.offsetVar]: `${animationValues.offset}px`,\n [tabIndicatorCssVars_unstable.scaleVar]: `${animationValues.scale}`\n };\n state.root.style = {\n ...rootCssVars,\n ...state.root.style\n };\n return state;\n};\n//# sourceMappingURL=useTabAnimatedIndicator.styles.js.map"],"names":["useTabAnimatedIndicatorStyles_unstable","tabIndicatorCssVars_unstable","offsetVar","scaleVar","useActiveIndicatorStyles","__styles","base","B68tc82","Bmxbyg5","animated","Ba2ppi3","F2fol1","B1dyfl9","B0vmy72","u9bimw","horizontal","sjv3b2","b1kco5","vertical","d","m","calculateTabRect","element","_element_parentElement","parentRect","parentElement","getBoundingClientRect","x","y","width","height","tabRect","undefined","getRegisteredTabRect","registeredTabs","value","_registeredTabs_JSON_stringify","JSON","stringify","ref","current","state","disabled","selected","activeIndicatorStyles","lastAnimatedFrom","setLastAnimatedFrom","React","useState","animationValues","setAnimationValues","offset","scale","getRegisteredTabs","useTabListContext_unstable","ctx","useEffect","previousSelectedValue","selectedValue","previousSelectedTabRect","selectedTabRect","animating","root","className","mergeClasses","rootCssVars","style"],"mappings":";;;;+BAgEaA;;;eAAAA;;;;iEAhEU;wBAC4B;gCACR;AAE3C,gEAAgE;AAChE,MAAMC,+BAA+B;IACnCC,WAAW;IACXC,UAAU;AACZ;AACA,MAAMC,2BAA2B,WAAW,GAAEC,IAAAA,gBAAQ,EAAC;IACrDC,MAAM;QACJC,SAAS;QACTC,SAAS;IACX;IACAC,UAAU;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X,MAAMqB,IAAI,CAACC,SAAS,GAAGC,IAAAA,oBAAY,EAACvB,MAAMqB,IAAI,CAACC,SAAS,EAAEpB,YAAYC,sBAAsBtC,IAAI,EAAEqC,YAAYkB,aAAajB,sBAAsBnC,QAAQ,EAAEkC,YAAazB,CAAAA,WAAW0B,sBAAsB1B,QAAQ,GAAG0B,sBAAsB7B,UAAU,AAAD;IACnP,MAAMkD,cAAc;QAClB,CAAChE,6BAA6BC,SAAS,CAAC,EAAE,CAAC,EAAE+C,gBAAgBE,MAAM,CAAC,EAAE,CAAC;QACvE,CAAClD,6BAA6BE,QAAQ,CAAC,EAAE,CAAC,EAAE8C,gBAAgBG,KAAK,CAAC,CAAC;IACrE;IACAX,MAAMqB,IAAI,CAACI,KAAK,GAAG;QACjB,GAAGD,WAAW;QACd,GAAGxB,MAAMqB,IAAI,CAACI,KAAK;IACrB;IACA,OAAOzB;AACT,GACA,0DAA0D"}
@@ -9,11 +9,15 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- tabClassNames: ()=>tabClassNames,
13
- useTabStyles_unstable: ()=>useTabStyles_unstable
12
+ tabClassNames: function() {
13
+ return tabClassNames;
14
+ },
15
+ useTabStyles_unstable: function() {
16
+ return useTabStyles_unstable;
17
+ }
14
18
  });
15
19
  const _react = require("@griffel/react");
16
- const _useTabAnimatedIndicatorStyles = require("./useTabAnimatedIndicator.styles");
20
+ const _useTabAnimatedIndicatorstyles = require("./useTabAnimatedIndicator.styles");
17
21
  const tabClassNames = {
18
22
  root: 'fui-Tab',
19
23
  icon: 'fui-Tab__icon',
@@ -30,7 +34,7 @@ const iconClassNames = {
30
34
  };
31
35
  /**
32
36
  * Styles for the root slot
33
- */ /* eslint-disable @typescript-eslint/naming-convention */ const useRootStyles = /*#__PURE__*/ (0, _react["__styles"])({
37
+ */ /* eslint-disable @typescript-eslint/naming-convention */ const useRootStyles = /*#__PURE__*/ (0, _react.__styles)({
34
38
  base: {
35
39
  Bt984gj: "f122n59",
36
40
  g2u3we: "fwhevhj",
@@ -278,7 +282,7 @@ const iconClassNames = {
278
282
  });
279
283
  /* eslint-enable @typescript-eslint/naming-convention */ /**
280
284
  * Focus styles for the root slot
281
- */ const useFocusStyles = /*#__PURE__*/ (0, _react["__styles"])({
285
+ */ const useFocusStyles = /*#__PURE__*/ (0, _react.__styles)({
282
286
  base: {
283
287
  B8q5s1w: "f8hki3x",
284
288
  Bci5o5g: [
@@ -312,7 +316,7 @@ const iconClassNames = {
312
316
  ".f1vjpng2[data-fui-focus-visible]{z-index:1;}"
313
317
  ]
314
318
  });
315
- /** Indicator styles for when pending selection */ const usePendingIndicatorStyles = /*#__PURE__*/ (0, _react["__styles"])({
319
+ /** Indicator styles for when pending selection */ const usePendingIndicatorStyles = /*#__PURE__*/ (0, _react.__styles)({
316
320
  base: {
317
321
  az7l2e: "fhw179n",
318
322
  Bv4n3vi: [
@@ -476,7 +480,7 @@ const iconClassNames = {
476
480
  ".f6vqlre::before{top:var(--spacingVerticalMNudge);}"
477
481
  ]
478
482
  });
479
- const useActiveIndicatorStyles = /*#__PURE__*/ (0, _react["__styles"])({
483
+ const useActiveIndicatorStyles = /*#__PURE__*/ (0, _react.__styles)({
480
484
  base: {
481
485
  Bjyk6c5: "f1rp0jgh",
482
486
  B3778ie: [
@@ -631,7 +635,7 @@ const useActiveIndicatorStyles = /*#__PURE__*/ (0, _react["__styles"])({
631
635
  });
632
636
  /**
633
637
  * Styles for the icon slot.
634
- */ const useIconStyles = /*#__PURE__*/ (0, _react["__styles"])({
638
+ */ const useIconStyles = /*#__PURE__*/ (0, _react.__styles)({
635
639
  base: {
636
640
  Br312pm: "fwpfdsa",
637
641
  Ijaq50: "f16hsg94",
@@ -685,7 +689,7 @@ const useActiveIndicatorStyles = /*#__PURE__*/ (0, _react["__styles"])({
685
689
  });
686
690
  /**
687
691
  * Styles for the content slot (children)
688
- */ const useContentStyles = /*#__PURE__*/ (0, _react["__styles"])({
692
+ */ const useContentStyles = /*#__PURE__*/ (0, _react.__styles)({
689
693
  base: {
690
694
  Bahqtrf: "fk6fouc",
691
695
  Be2twd7: "fkhj508",
@@ -761,7 +765,7 @@ const useTabStyles_unstable = (state)=>{
761
765
  const activeIndicatorStyles = useActiveIndicatorStyles();
762
766
  const iconStyles = useIconStyles();
763
767
  const contentStyles = useContentStyles();
764
- const { appearance , disabled , selected , size , vertical } = state;
768
+ const { appearance, disabled, selected, size, vertical } = state;
765
769
  state.root.className = (0, _react.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)
766
770
  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)
767
771
  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);
@@ -777,6 +781,6 @@ const useTabStyles_unstable = (state)=>{
777
781
  state.contentReservedSpaceClassName = state.contentReservedSpace.className;
778
782
  }
779
783
  state.content.className = (0, _react.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);
780
- (0, _useTabAnimatedIndicatorStyles.useTabAnimatedIndicatorStyles_unstable)(state);
784
+ (0, _useTabAnimatedIndicatorstyles.useTabAnimatedIndicatorStyles_unstable)(state);
781
785
  return state;
782
786
  }; //# sourceMappingURL=useTabStyles.styles.js.map