@fluentui/react-tabs 1.0.0-beta.97 → 9.0.0-beta.10

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 (229) hide show
  1. package/CHANGELOG.json +181 -1762
  2. package/CHANGELOG.md +54 -718
  3. package/README.md +0 -17
  4. package/Spec.md +433 -0
  5. package/dist/react-tabs.d.ts +173 -127
  6. package/lib/Tab.d.ts +1 -0
  7. package/lib/Tab.js +2 -0
  8. package/lib/Tab.js.map +1 -0
  9. package/lib/TabList.d.ts +1 -0
  10. package/lib/TabList.js +2 -0
  11. package/lib/TabList.js.map +1 -0
  12. package/lib/components/Tab/Tab.d.ts +6 -0
  13. package/lib/components/Tab/Tab.js +15 -0
  14. package/lib/components/Tab/Tab.js.map +1 -0
  15. package/lib/components/Tab/Tab.types.d.ts +61 -0
  16. package/lib/components/Tab/Tab.types.js +2 -0
  17. package/lib/components/Tab/Tab.types.js.map +1 -0
  18. package/lib/components/Tab/index.d.ts +6 -0
  19. package/lib/components/Tab/index.js +7 -0
  20. package/lib/components/Tab/index.js.map +1 -0
  21. package/lib/components/Tab/renderTab.d.ts +5 -0
  22. package/lib/components/Tab/renderTab.js +17 -0
  23. package/lib/components/Tab/renderTab.js.map +1 -0
  24. package/lib/components/Tab/useTab.d.ts +12 -0
  25. package/lib/components/Tab/useTab.js +78 -0
  26. package/lib/components/Tab/useTab.js.map +1 -0
  27. package/lib/components/Tab/useTabAnimatedIndicator.d.ts +5 -0
  28. package/lib/components/Tab/useTabAnimatedIndicator.js +134 -0
  29. package/lib/components/Tab/useTabAnimatedIndicator.js.map +1 -0
  30. package/lib/components/Tab/useTabStyles.d.ts +8 -0
  31. package/lib/components/Tab/useTabStyles.js +402 -0
  32. package/lib/components/Tab/useTabStyles.js.map +1 -0
  33. package/lib/components/TabList/TabList.d.ts +6 -0
  34. package/lib/components/TabList/TabList.js +17 -0
  35. package/lib/components/TabList/TabList.js.map +1 -0
  36. package/lib/components/TabList/TabList.types.d.ts +104 -0
  37. package/lib/components/TabList/TabList.types.js +2 -0
  38. package/lib/components/TabList/TabList.types.js.map +1 -0
  39. package/lib/components/TabList/TabListContext.d.ts +3 -0
  40. package/lib/components/TabList/TabListContext.js +23 -0
  41. package/lib/components/TabList/TabListContext.js.map +1 -0
  42. package/lib/components/TabList/index.d.ts +5 -0
  43. package/lib/components/TabList/index.js +6 -0
  44. package/lib/components/TabList/index.js.map +1 -0
  45. package/lib/components/TabList/renderTabList.d.ts +5 -0
  46. package/lib/components/TabList/renderTabList.js +18 -0
  47. package/lib/components/TabList/renderTabList.js.map +1 -0
  48. package/lib/components/TabList/useTabList.d.ts +12 -0
  49. package/lib/components/TabList/useTabList.js +81 -0
  50. package/lib/components/TabList/useTabList.js.map +1 -0
  51. package/lib/components/TabList/useTabListContextValues.d.ts +2 -0
  52. package/lib/components/TabList/useTabListContextValues.js +28 -0
  53. package/lib/components/TabList/useTabListContextValues.js.map +1 -0
  54. package/lib/components/TabList/useTabListStyles.d.ts +8 -0
  55. package/lib/components/TabList/useTabListStyles.js +45 -0
  56. package/lib/components/TabList/useTabListStyles.js.map +1 -0
  57. package/lib/index.d.ts +4 -1
  58. package/lib/index.js +2 -1
  59. package/lib/index.js.map +1 -1
  60. package/lib/tab.constants.d.ts +62 -0
  61. package/lib/tab.constants.js +68 -0
  62. package/lib/tab.constants.js.map +1 -0
  63. package/lib/tsdoc-metadata.json +1 -1
  64. package/lib-commonjs/Tab.d.ts +1 -0
  65. package/lib-commonjs/Tab.js +10 -0
  66. package/lib-commonjs/Tab.js.map +1 -0
  67. package/lib-commonjs/TabList.d.ts +1 -0
  68. package/lib-commonjs/TabList.js +10 -0
  69. package/lib-commonjs/TabList.js.map +1 -0
  70. package/lib-commonjs/components/Tab/Tab.d.ts +6 -0
  71. package/lib-commonjs/components/Tab/Tab.js +26 -0
  72. package/lib-commonjs/components/Tab/Tab.js.map +1 -0
  73. package/lib-commonjs/components/Tab/Tab.types.d.ts +61 -0
  74. package/lib-commonjs/components/Tab/Tab.types.js +6 -0
  75. package/lib-commonjs/components/Tab/Tab.types.js.map +1 -0
  76. package/lib-commonjs/components/Tab/index.d.ts +6 -0
  77. package/lib-commonjs/components/Tab/index.js +20 -0
  78. package/lib-commonjs/components/Tab/index.js.map +1 -0
  79. package/lib-commonjs/components/Tab/renderTab.d.ts +5 -0
  80. package/lib-commonjs/components/Tab/renderTab.js +28 -0
  81. package/lib-commonjs/components/Tab/renderTab.js.map +1 -0
  82. package/lib-commonjs/components/Tab/useTab.d.ts +12 -0
  83. package/lib-commonjs/components/Tab/useTab.js +91 -0
  84. package/lib-commonjs/components/Tab/useTab.js.map +1 -0
  85. package/lib-commonjs/components/Tab/useTabAnimatedIndicator.d.ts +5 -0
  86. package/lib-commonjs/components/Tab/useTabAnimatedIndicator.js +148 -0
  87. package/lib-commonjs/components/Tab/useTabAnimatedIndicator.js.map +1 -0
  88. package/lib-commonjs/components/Tab/useTabStyles.d.ts +8 -0
  89. package/lib-commonjs/components/Tab/useTabStyles.js +416 -0
  90. package/lib-commonjs/components/Tab/useTabStyles.js.map +1 -0
  91. package/lib-commonjs/components/TabList/TabList.d.ts +6 -0
  92. package/lib-commonjs/components/TabList/TabList.js +29 -0
  93. package/lib-commonjs/components/TabList/TabList.js.map +1 -0
  94. package/lib-commonjs/components/TabList/TabList.types.d.ts +104 -0
  95. package/lib-commonjs/components/TabList/TabList.types.js +6 -0
  96. package/lib-commonjs/components/TabList/TabList.types.js.map +1 -0
  97. package/lib-commonjs/components/TabList/TabListContext.d.ts +3 -0
  98. package/lib-commonjs/components/TabList/TabListContext.js +31 -0
  99. package/lib-commonjs/components/TabList/TabListContext.js.map +1 -0
  100. package/lib-commonjs/components/TabList/index.d.ts +5 -0
  101. package/lib-commonjs/components/TabList/index.js +18 -0
  102. package/lib-commonjs/components/TabList/index.js.map +1 -0
  103. package/lib-commonjs/components/TabList/renderTabList.d.ts +5 -0
  104. package/lib-commonjs/components/TabList/renderTabList.js +30 -0
  105. package/lib-commonjs/components/TabList/renderTabList.js.map +1 -0
  106. package/lib-commonjs/components/TabList/useTabList.d.ts +12 -0
  107. package/lib-commonjs/components/TabList/useTabList.js +93 -0
  108. package/lib-commonjs/components/TabList/useTabList.js.map +1 -0
  109. package/lib-commonjs/components/TabList/useTabListContextValues.d.ts +2 -0
  110. package/lib-commonjs/components/TabList/useTabListContextValues.js +37 -0
  111. package/lib-commonjs/components/TabList/useTabListContextValues.js.map +1 -0
  112. package/lib-commonjs/components/TabList/useTabListStyles.d.ts +8 -0
  113. package/lib-commonjs/components/TabList/useTabListStyles.js +55 -0
  114. package/lib-commonjs/components/TabList/useTabListStyles.js.map +1 -0
  115. package/lib-commonjs/index.d.ts +4 -1
  116. package/lib-commonjs/index.js +83 -3
  117. package/lib-commonjs/index.js.map +1 -1
  118. package/lib-commonjs/tab.constants.d.ts +62 -0
  119. package/lib-commonjs/tab.constants.js +75 -0
  120. package/lib-commonjs/tab.constants.js.map +1 -0
  121. package/package.json +25 -21
  122. package/config/api-extractor.json +0 -3
  123. package/config/tests.js +0 -14
  124. package/etc/react-tabs.api.md +0 -104
  125. package/just.config.ts +0 -3
  126. package/lib/Tabs.d.ts +0 -1
  127. package/lib/Tabs.js +0 -2
  128. package/lib/Tabs.js.map +0 -1
  129. package/lib/common/isConformant.d.ts +0 -2
  130. package/lib/common/isConformant.js +0 -9
  131. package/lib/common/isConformant.js.map +0 -1
  132. package/lib/components/Tabs/TabItem.d.ts +0 -6
  133. package/lib/components/Tabs/TabItem.js +0 -18
  134. package/lib/components/Tabs/TabItem.js.map +0 -1
  135. package/lib/components/Tabs/TabItem.types.d.ts +0 -61
  136. package/lib/components/Tabs/TabItem.types.js +0 -2
  137. package/lib/components/Tabs/TabItem.types.js.map +0 -1
  138. package/lib/components/Tabs/Tabs.base.d.ts +0 -3
  139. package/lib/components/Tabs/Tabs.base.js +0 -179
  140. package/lib/components/Tabs/Tabs.base.js.map +0 -1
  141. package/lib/components/Tabs/Tabs.d.ts +0 -8
  142. package/lib/components/Tabs/Tabs.js +0 -12
  143. package/lib/components/Tabs/Tabs.js.map +0 -1
  144. package/lib/components/Tabs/Tabs.styles.d.ts +0 -2
  145. package/lib/components/Tabs/Tabs.styles.js +0 -264
  146. package/lib/components/Tabs/Tabs.styles.js.map +0 -1
  147. package/lib/components/Tabs/Tabs.types.d.ts +0 -113
  148. package/lib/components/Tabs/Tabs.types.js +0 -2
  149. package/lib/components/Tabs/Tabs.types.js.map +0 -1
  150. package/lib/components/Tabs/index.d.ts +0 -5
  151. package/lib/components/Tabs/index.js +0 -6
  152. package/lib/components/Tabs/index.js.map +0 -1
  153. package/lib/utilities/observeResize.d.ts +0 -21
  154. package/lib/utilities/observeResize.js +0 -46
  155. package/lib/utilities/observeResize.js.map +0 -1
  156. package/lib/utilities/useOverflow.d.ts +0 -45
  157. package/lib/utilities/useOverflow.js +0 -126
  158. package/lib/utilities/useOverflow.js.map +0 -1
  159. package/lib-amd/Tabs.d.ts +0 -1
  160. package/lib-amd/Tabs.js +0 -6
  161. package/lib-amd/Tabs.js.map +0 -1
  162. package/lib-amd/common/isConformant.d.ts +0 -2
  163. package/lib-amd/common/isConformant.js +0 -14
  164. package/lib-amd/common/isConformant.js.map +0 -1
  165. package/lib-amd/components/Tabs/TabItem.d.ts +0 -6
  166. package/lib-amd/components/Tabs/TabItem.js +0 -20
  167. package/lib-amd/components/Tabs/TabItem.js.map +0 -1
  168. package/lib-amd/components/Tabs/TabItem.types.d.ts +0 -61
  169. package/lib-amd/components/Tabs/TabItem.types.js +0 -5
  170. package/lib-amd/components/Tabs/TabItem.types.js.map +0 -1
  171. package/lib-amd/components/Tabs/Tabs.base.d.ts +0 -3
  172. package/lib-amd/components/Tabs/Tabs.base.js +0 -176
  173. package/lib-amd/components/Tabs/Tabs.base.js.map +0 -1
  174. package/lib-amd/components/Tabs/Tabs.d.ts +0 -8
  175. package/lib-amd/components/Tabs/Tabs.js +0 -14
  176. package/lib-amd/components/Tabs/Tabs.js.map +0 -1
  177. package/lib-amd/components/Tabs/Tabs.styles.d.ts +0 -2
  178. package/lib-amd/components/Tabs/Tabs.styles.js +0 -267
  179. package/lib-amd/components/Tabs/Tabs.styles.js.map +0 -1
  180. package/lib-amd/components/Tabs/Tabs.types.d.ts +0 -113
  181. package/lib-amd/components/Tabs/Tabs.types.js +0 -5
  182. package/lib-amd/components/Tabs/Tabs.types.js.map +0 -1
  183. package/lib-amd/components/Tabs/index.d.ts +0 -5
  184. package/lib-amd/components/Tabs/index.js +0 -11
  185. package/lib-amd/components/Tabs/index.js.map +0 -1
  186. package/lib-amd/index.d.ts +0 -1
  187. package/lib-amd/index.js +0 -6
  188. package/lib-amd/index.js.map +0 -1
  189. package/lib-amd/utilities/observeResize.d.ts +0 -21
  190. package/lib-amd/utilities/observeResize.js +0 -51
  191. package/lib-amd/utilities/observeResize.js.map +0 -1
  192. package/lib-amd/utilities/useOverflow.d.ts +0 -45
  193. package/lib-amd/utilities/useOverflow.js +0 -128
  194. package/lib-amd/utilities/useOverflow.js.map +0 -1
  195. package/lib-commonjs/Tabs.d.ts +0 -1
  196. package/lib-commonjs/Tabs.js +0 -5
  197. package/lib-commonjs/Tabs.js.map +0 -1
  198. package/lib-commonjs/common/isConformant.d.ts +0 -2
  199. package/lib-commonjs/common/isConformant.js +0 -13
  200. package/lib-commonjs/common/isConformant.js.map +0 -1
  201. package/lib-commonjs/components/Tabs/TabItem.d.ts +0 -6
  202. package/lib-commonjs/components/Tabs/TabItem.js +0 -21
  203. package/lib-commonjs/components/Tabs/TabItem.js.map +0 -1
  204. package/lib-commonjs/components/Tabs/TabItem.types.d.ts +0 -61
  205. package/lib-commonjs/components/Tabs/TabItem.types.js +0 -3
  206. package/lib-commonjs/components/Tabs/TabItem.types.js.map +0 -1
  207. package/lib-commonjs/components/Tabs/Tabs.base.d.ts +0 -3
  208. package/lib-commonjs/components/Tabs/Tabs.base.js +0 -182
  209. package/lib-commonjs/components/Tabs/Tabs.base.js.map +0 -1
  210. package/lib-commonjs/components/Tabs/Tabs.d.ts +0 -8
  211. package/lib-commonjs/components/Tabs/Tabs.js +0 -15
  212. package/lib-commonjs/components/Tabs/Tabs.js.map +0 -1
  213. package/lib-commonjs/components/Tabs/Tabs.styles.d.ts +0 -2
  214. package/lib-commonjs/components/Tabs/Tabs.styles.js +0 -268
  215. package/lib-commonjs/components/Tabs/Tabs.styles.js.map +0 -1
  216. package/lib-commonjs/components/Tabs/Tabs.types.d.ts +0 -113
  217. package/lib-commonjs/components/Tabs/Tabs.types.js +0 -3
  218. package/lib-commonjs/components/Tabs/Tabs.types.js.map +0 -1
  219. package/lib-commonjs/components/Tabs/index.d.ts +0 -5
  220. package/lib-commonjs/components/Tabs/index.js +0 -11
  221. package/lib-commonjs/components/Tabs/index.js.map +0 -1
  222. package/lib-commonjs/utilities/observeResize.d.ts +0 -21
  223. package/lib-commonjs/utilities/observeResize.js +0 -50
  224. package/lib-commonjs/utilities/observeResize.js.map +0 -1
  225. package/lib-commonjs/utilities/useOverflow.d.ts +0 -45
  226. package/lib-commonjs/utilities/useOverflow.js +0 -130
  227. package/lib-commonjs/utilities/useOverflow.js.map +0 -1
  228. package/src/components/Tabs/TabItem.types.ts +0 -69
  229. package/src/components/Tabs/Tabs.types.ts +0 -131
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.TabListContext = void 0;
7
+
8
+ const react_context_selector_1 = /*#__PURE__*/require("@fluentui/react-context-selector");
9
+
10
+ exports.TabListContext = /*#__PURE__*/react_context_selector_1.createContext({
11
+ appearance: 'transparent',
12
+ disabled: false,
13
+ selectedValue: undefined,
14
+ onRegister: () => {
15
+ /* noop */
16
+ },
17
+ onUnregister: () => {
18
+ /* noop */
19
+ },
20
+ onSelect: () => {
21
+ /* noop */
22
+ },
23
+ getRegisteredTabs: () => {
24
+ return {
25
+ registeredTabs: {}
26
+ };
27
+ },
28
+ size: 'medium',
29
+ vertical: false
30
+ });
31
+ //# sourceMappingURL=TabListContext.js.map
@@ -0,0 +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,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/"}
@@ -0,0 +1,5 @@
1
+ export * from './TabList';
2
+ export * from './TabList.types';
3
+ export * from './renderTabList';
4
+ export * from './useTabList';
5
+ export * from './useTabListStyles';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
+
9
+ tslib_1.__exportStar(require("./TabList"), exports);
10
+
11
+ tslib_1.__exportStar(require("./TabList.types"), exports);
12
+
13
+ tslib_1.__exportStar(require("./renderTabList"), exports);
14
+
15
+ tslib_1.__exportStar(require("./useTabList"), exports);
16
+
17
+ tslib_1.__exportStar(require("./useTabListStyles"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/TabList/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,WAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,cAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './TabList';\nexport * from './TabList.types';\nexport * from './renderTabList';\nexport * from './useTabList';\nexport * from './useTabListStyles';\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,5 @@
1
+ import type { TabListState, TabListContextValues } from './TabList.types';
2
+ /**
3
+ * Render the final JSX of TabList
4
+ */
5
+ export declare const renderTabList_unstable: (state: TabListState, contextValues: TabListContextValues) => JSX.Element;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.renderTabList_unstable = void 0;
7
+
8
+ const React = /*#__PURE__*/require("react");
9
+
10
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
+
12
+ const TabListContext_1 = /*#__PURE__*/require("./TabListContext");
13
+ /**
14
+ * Render the final JSX of TabList
15
+ */
16
+
17
+
18
+ const renderTabList_unstable = (state, contextValues) => {
19
+ const {
20
+ slots,
21
+ slotProps
22
+ } = react_utilities_1.getSlots(state);
23
+ return React.createElement(slots.root, { ...slotProps.root
24
+ }, React.createElement(TabListContext_1.TabListContext.Provider, {
25
+ value: contextValues.tabList
26
+ }, state.root.children));
27
+ };
28
+
29
+ exports.renderTabList_unstable = renderTabList_unstable;
30
+ //# sourceMappingURL=renderTabList.js.map
@@ -0,0 +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;;;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/"}
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import type { TabListProps, TabListState } from './TabList.types';
3
+ /**
4
+ * Create the state required to render TabList.
5
+ *
6
+ * The returned state can be modified with hooks such as useTabListStyles_unstable,
7
+ * before being passed to renderTabList_unstable.
8
+ *
9
+ * @param props - props from this instance of TabList
10
+ * @param ref - reference to root HTMLElement of TabList
11
+ */
12
+ export declare const useTabList_unstable: (props: TabListProps, ref: React.Ref<HTMLElement>) => TabListState;
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useTabList_unstable = void 0;
7
+
8
+ const React = /*#__PURE__*/require("react");
9
+
10
+ const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
11
+
12
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
13
+ /**
14
+ * Create the state required to render TabList.
15
+ *
16
+ * The returned state can be modified with hooks such as useTabListStyles_unstable,
17
+ * before being passed to renderTabList_unstable.
18
+ *
19
+ * @param props - props from this instance of TabList
20
+ * @param ref - reference to root HTMLElement of TabList
21
+ */
22
+
23
+
24
+ const useTabList_unstable = (props, ref) => {
25
+ const {
26
+ appearance = 'transparent',
27
+ disabled = false,
28
+ onTabSelect,
29
+ size = 'medium',
30
+ vertical = false
31
+ } = props;
32
+ const innerRef = React.useRef(null);
33
+ const focusAttributes = react_tabster_1.useArrowNavigationGroup({
34
+ circular: true,
35
+ axis: vertical ? 'vertical' : 'horizontal'
36
+ });
37
+ const [selectedValue, setSelectedValue] = react_utilities_1.useControllableState({
38
+ state: props.selectedValue,
39
+ defaultState: props.defaultSelectedValue,
40
+ initialState: undefined
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.
45
+
46
+ const currentSelectedValue = React.useRef(undefined);
47
+ const previousSelectedValue = React.useRef(undefined);
48
+ React.useEffect(() => {
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
+ });
56
+ const registeredTabs = React.useRef({});
57
+ const onRegister = react_utilities_1.useEventCallback(data => {
58
+ registeredTabs.current[JSON.stringify(data.value)] = data;
59
+ });
60
+ const onUnregister = react_utilities_1.useEventCallback(data => {
61
+ delete registeredTabs.current[JSON.stringify(data.value)];
62
+ });
63
+ const getRegisteredTabs = React.useCallback(() => {
64
+ return {
65
+ selectedValue: currentSelectedValue.current,
66
+ previousSelectedValue: previousSelectedValue.current,
67
+ registeredTabs: registeredTabs.current
68
+ };
69
+ }, []);
70
+ return {
71
+ components: {
72
+ root: 'div'
73
+ },
74
+ root: react_utilities_1.getNativeElementProps('div', {
75
+ ref: react_utilities_1.useMergedRefs(ref, innerRef),
76
+ role: 'tablist',
77
+ ...focusAttributes,
78
+ ...props
79
+ }),
80
+ appearance,
81
+ disabled,
82
+ selectedValue,
83
+ size,
84
+ vertical,
85
+ onRegister,
86
+ onUnregister,
87
+ onSelect,
88
+ getRegisteredTabs
89
+ };
90
+ };
91
+
92
+ exports.useTabList_unstable = useTabList_unstable;
93
+ //# sourceMappingURL=useTabList.js.map
@@ -0,0 +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;;;AACI,MAAM,mBAAmB,GAAG,CAAC,KAAD,EAAsB,GAAtB,KAAmE;AACpG,QAAM;AAAE,I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abster';\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/"}
@@ -0,0 +1,2 @@
1
+ import { TabListContextValues, TabListState } from './TabList.types';
2
+ export declare function useTabListContextValues(state: TabListState): TabListContextValues;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useTabListContextValues = void 0;
7
+
8
+ function useTabListContextValues(state) {
9
+ const {
10
+ appearance,
11
+ disabled,
12
+ selectedValue: selectedKey,
13
+ onRegister,
14
+ onUnregister,
15
+ onSelect,
16
+ getRegisteredTabs,
17
+ size,
18
+ vertical
19
+ } = state;
20
+ const tabList = {
21
+ appearance,
22
+ disabled,
23
+ selectedValue: selectedKey,
24
+ onSelect,
25
+ onRegister,
26
+ onUnregister,
27
+ getRegisteredTabs,
28
+ size,
29
+ vertical
30
+ };
31
+ return {
32
+ tabList
33
+ };
34
+ }
35
+
36
+ exports.useTabListContextValues = useTabListContextValues;
37
+ //# sourceMappingURL=useTabListContextValues.js.map
@@ -0,0 +1 @@
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/"}
@@ -0,0 +1,8 @@
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;
5
+ /**
6
+ * Apply styling to the TabList slots based on the state
7
+ */
8
+ export declare const useTabListStyles_unstable: (state: TabListState) => TabListState;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useTabListStyles_unstable = exports.tabListClassName = exports.tabListClassNames = void 0;
7
+
8
+ const react_1 = /*#__PURE__*/require("@griffel/react");
9
+
10
+ exports.tabListClassNames = {
11
+ root: 'fui-TabList'
12
+ }; // TODO temporary export to pass conformance test.
13
+
14
+ exports.tabListClassName = exports.tabListClassNames.root;
15
+ /**
16
+ * Styles for the root slot
17
+ */
18
+
19
+ const useStyles = /*#__PURE__*/react_1.__styles({
20
+ "root": {
21
+ "mc9l5x": "f22iagw",
22
+ "Beiy3e4": "f1063pyq",
23
+ "Bnnss6s": "fi64zpg",
24
+ "Eh141a": "flvyvdh",
25
+ "B68tc82": "f1p9o1ba",
26
+ "Bmxbyg5": "f1sil6mw",
27
+ "qhf8xq": "f10pi13n"
28
+ },
29
+ "horizontal": {
30
+ "Bt984gj": "f1q9h2pe",
31
+ "Beiy3e4": "f1063pyq"
32
+ },
33
+ "vertical": {
34
+ "Bt984gj": "f1q9h2pe",
35
+ "Beiy3e4": "f1vx9l62"
36
+ }
37
+ }, {
38
+ "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;}", ".fi64zpg{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}", ".flvyvdh{-webkit-box-flex-wrap:nowrap;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f10pi13n{position:relative;}", ".f1q9h2pe{-webkit-align-items:stretch;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}"]
39
+ });
40
+ /**
41
+ * Apply styling to the TabList slots based on the state
42
+ */
43
+
44
+
45
+ const useTabListStyles_unstable = state => {
46
+ const {
47
+ vertical
48
+ } = state;
49
+ const styles = useStyles();
50
+ state.root.className = react_1.mergeClasses(exports.tabListClassName, styles.root, vertical ? styles.vertical : styles.horizontal, state.root.className);
51
+ return state;
52
+ };
53
+
54
+ exports.useTabListStyles_unstable = useTabListStyles_unstable;
55
+ //# sourceMappingURL=useTabListStyles.js.map
@@ -0,0 +1 @@
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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAmBA;;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,CACrB,OAAA,CAAA,gBADqB,EAErB,MAAM,CAAC,IAFc,EAGrB,QAAQ,GAAG,MAAM,CAAC,QAAV,GAAqB,MAAM,CAAC,UAHf,EAIrB,KAAK,CAAC,IAAN,CAAW,SAJU,CAAvB;AAOA,SAAO,KAAP;AACD,CAbM;;AAAM,OAAA,CAAA,yBAAA,GAAyB,yBAAzB","sourcesContent":["import { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeStyles, mergeClasses, shorthands } 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 flexShrink: 0,\n flexWrap: 'nowrap',\n ...shorthands.overflow('hidden'),\n position: 'relative',\n },\n horizontal: {\n alignItems: 'stretch',\n flexDirection: 'row',\n },\n vertical: {\n alignItems: 'stretch',\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(\n tabListClassName,\n styles.root,\n vertical ? styles.vertical : styles.horizontal,\n state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1 +1,4 @@
1
- export * from './Tabs';
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';
@@ -1,5 +1,85 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./Tabs"), exports);
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
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;
7
+
8
+ var Tab_1 = /*#__PURE__*/require("./Tab");
9
+
10
+ Object.defineProperty(exports, "renderTab_unstable", {
11
+ enumerable: true,
12
+ get: function () {
13
+ return Tab_1.renderTab_unstable;
14
+ }
15
+ });
16
+ Object.defineProperty(exports, "Tab", {
17
+ enumerable: true,
18
+ get: function () {
19
+ return Tab_1.Tab;
20
+ }
21
+ });
22
+ Object.defineProperty(exports, "tabClassName", {
23
+ enumerable: true,
24
+ get: function () {
25
+ return Tab_1.tabClassName;
26
+ }
27
+ });
28
+ Object.defineProperty(exports, "tabClassNames", {
29
+ enumerable: true,
30
+ get: function () {
31
+ return Tab_1.tabClassNames;
32
+ }
33
+ });
34
+ Object.defineProperty(exports, "useTabStyles_unstable", {
35
+ enumerable: true,
36
+ get: function () {
37
+ return Tab_1.useTabStyles_unstable;
38
+ }
39
+ });
40
+ Object.defineProperty(exports, "useTab_unstable", {
41
+ enumerable: true,
42
+ get: function () {
43
+ return Tab_1.useTab_unstable;
44
+ }
45
+ });
46
+
47
+ var TabList_1 = /*#__PURE__*/require("./TabList");
48
+
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
+ });
5
85
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":";;;AAAA,iDAAuB","sourcesContent":["export * from './Tabs';\n"]}
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;AAAo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AA,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/"}
@@ -0,0 +1,62 @@
1
+ export declare const pendingContentSizeTokens: {
2
+ body1: {
3
+ fontSize: string;
4
+ fontWeight: string;
5
+ lineHeight: string;
6
+ };
7
+ body1Strong: {
8
+ fontSize: string;
9
+ fontWeight: string;
10
+ lineHeight: string;
11
+ };
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
+ };
@@ -0,0 +1,75 @@
1
+ "use strict"; // TODO: Constants prefixed with pending should be replaced with design tokens
2
+ // These values were taken from the design token superset figma
3
+
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.tabIndicatorStrokeWidths = exports.tabIndicatorPadding = exports.pendingAnimationEasingTokens = exports.pendingAnimationDurationTokens = exports.pendingSpacingTokens = exports.pendingContentSizeTokens = void 0;
8
+
9
+ const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
10
+
11
+ exports.pendingContentSizeTokens = {
12
+ // Only body sizes are defined here currently
13
+ body1: {
14
+ fontSize: react_theme_1.tokens.fontSizeBase300,
15
+ fontWeight: react_theme_1.tokens.fontWeightRegular,
16
+ lineHeight: react_theme_1.tokens.lineHeightBase300
17
+ },
18
+ body1Strong: {
19
+ fontSize: react_theme_1.tokens.fontSizeBase300,
20
+ fontWeight: react_theme_1.tokens.fontWeightSemibold,
21
+ lineHeight: react_theme_1.tokens.lineHeightBase300
22
+ }
23
+ };
24
+ exports.pendingSpacingTokens = {
25
+ none: '0',
26
+ xxs: '2px',
27
+ xs: '4px',
28
+ sNudge: '6px',
29
+ s: '8px',
30
+ mNudge: '10px',
31
+ m: '12px',
32
+ l: '16px',
33
+ xl: '20px',
34
+ xxl: '24px',
35
+ xxxl: '32px'
36
+ };
37
+ exports.pendingAnimationDurationTokens = {
38
+ ultraFast: '50ms',
39
+ faster: '100ms',
40
+ fast: '150ms',
41
+ normal: '200ms',
42
+ slow: '300ms',
43
+ slower: '400ms',
44
+ ultraSlow: '500ms'
45
+ };
46
+ exports.pendingAnimationEasingTokens = {
47
+ accelerateMax: 'cubic-bezier(1,0,1,1)',
48
+ accelerateMid: 'cubic-bezier(0.7,0,1,0.5)',
49
+ accelerateMin: 'cubic-bezier(0.8,0,1,1)',
50
+ declerateMax: 'cubic-bezier(0,0,0,1)',
51
+ decelerateMid: 'cubic-bezier(0.1,0.9,0.2,1)',
52
+ decelarateMin: 'cubic-bezier(0.33,0,0.1,1)',
53
+ maxEasyEase: 'cubic-bezier(0.8,0,0.1,1)',
54
+ easyEase: 'cubic-bezier(0.33,0,0.67,1)',
55
+ linear: 'cubic-bezier(0,0,1,1)'
56
+ };
57
+ /**
58
+ * Provides shared values between tab style hooks
59
+ * useTabStyles
60
+ * useTabAnimatedIndicator
61
+ */
62
+
63
+ exports.tabIndicatorPadding = {
64
+ mediumHorizontal: exports.pendingSpacingTokens.m,
65
+ mediumVertical: exports.pendingSpacingTokens.s,
66
+ smallHorizontal: exports.pendingSpacingTokens.sNudge,
67
+ smallVertical: exports.pendingSpacingTokens.xs
68
+ };
69
+ exports.tabIndicatorStrokeWidths = {
70
+ mediumHorizontal: react_theme_1.tokens.strokeWidthThicker,
71
+ mediumVertical: react_theme_1.tokens.strokeWidthThicker,
72
+ smallHorizontal: react_theme_1.tokens.strokeWidthThick,
73
+ smallVertical: react_theme_1.tokens.strokeWidthThicker
74
+ };
75
+ //# sourceMappingURL=tab.constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["tab.constants.ts"],"names":[],"mappings":"cAAA;AACA;;;;;;;AAEA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAEa,OAAA,CAAA,wBAAA,GAA2B;AACtC;AACA,EAAA,KAAK,EAAE;AACL,IAAA,QAAQ,EAAE,aAAA,CAAA,MAAA,CAAO,eADZ;AAEL,IAAA,UAAU,EAAE,aAAA,CAAA,MAAA,CAAO,iBAFd;AAGL,IAAA,UAAU,EAAE,aAAA,CAAA,MAAA,CAAO;AAHd,GAF+B;AAOtC,EAAA,WAAW,EAAE;AACX,IAAA,QAAQ,EAAE,aAAA,CAAA,MAAA,CAAO,eADN;AAEX,IAAA,UAAU,EAAE,aAAA,CAAA,MAAA,CAAO,kBAFR;AAGX,IAAA,UAAU,EAAE,aAAA,CAAA,MAAA,CAAO;AAHR;AAPyB,CAA3B;AAcA,OAAA,CAAA,oBAAA,GAAuB;AAClC,EAAA,IAAI,EAAE,GAD4B;AAElC,EAAA,GAAG,EAAE,KAF6B;AAGlC,EAAA,EAAE,EAAE,KAH8B;AAIlC,EAAA,MAAM,EAAE,KAJ0B;AAKlC,EAAA,CAAC,EAAE,KAL+B;AAMlC,EAAA,MAAM,EAAE,MAN0B;AAOlC,EAAA,CAAC,EAAE,MAP+B;AAQlC,EAAA,CAAC,EAAE,MAR+B;AASlC,EAAA,EAAE,EAAE,MAT8B;AAUlC,EAAA,GAAG,EAAE,MAV6B;AAWlC,EAAA,IAAI,EAAE;AAX4B,CAAvB;AAcA,OAAA,CAAA,8BAAA,GAAiC;AAC5C,EAAA,SAAS,EAAE,MADiC;AAE5C,EAAA,MAAM,EAAE,OAFoC;AAG5C,EAAA,IAAI,EAAE,OAHsC;AAI5C,EAAA,MAAM,EAAE,OAJoC;AAK5C,EAAA,IAAI,EAAE,OALsC;AAM5C,EAAA,MAAM,EAAE,OANoC;AAO5C,EAAA,SAAS,EAAE;AAPiC,CAAjC;AAUA,OAAA,CAAA,4BAAA,GAA+B;AAC1C,EAAA,aAAa,EAAE,uBAD2B;AAE1C,EAAA,aAAa,EAAE,2BAF2B;AAG1C,EAAA,aAAa,EAAE,yBAH2B;AAI1C,EAAA,YAAY,EAAE,uBAJ4B;AAK1C,EAAA,aAAa,EAAE,6BAL2B;AAM1C,EAAA,aAAa,EAAE,4BAN2B;AAO1C,EAAA,WAAW,EAAE,2BAP6B;AAQ1C,EAAA,QAAQ,EAAE,6BARgC;AAS1C,EAAA,MAAM,EAAE;AATkC,CAA/B;AAYb;;;;AAIG;;AACU,OAAA,CAAA,mBAAA,GAAsB;AACjC,EAAA,gBAAgB,EAAE,OAAA,CAAA,oBAAA,CAAqB,CADN;AAEjC,EAAA,cAAc,EAAE,OAAA,CAAA,oBAAA,CAAqB,CAFJ;AAGjC,EAAA,eAAe,EAAE,OAAA,CAAA,oBAAA,CAAqB,MAHL;AAIjC,EAAA,aAAa,EAAE,OAAA,CAAA,oBAAA,CAAqB;AAJH,CAAtB;AAOA,OAAA,CAAA,wBAAA,GAA2B;AACtC,EAAA,gBAAgB,EAAE,aAAA,CAAA,MAAA,CAAO,kBADa;AAEtC,EAAA,cAAc,EAAE,aAAA,CAAA,MAAA,CAAO,kBAFe;AAGtC,EAAA,eAAe,EAAE,aAAA,CAAA,MAAA,CAAO,gBAHc;AAItC,EAAA,aAAa,EAAE,aAAA,CAAA,MAAA,CAAO;AAJgB,CAA3B","sourcesContent":["// TODO: Constants prefixed with pending should be replaced with design tokens\n// These values were taken from the design token superset figma\n\nimport { tokens } from '@fluentui/react-theme';\n\nexport const pendingContentSizeTokens = {\n // Only body sizes are defined here currently\n body1: {\n fontSize: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightRegular,\n lineHeight: tokens.lineHeightBase300,\n },\n body1Strong: {\n fontSize: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightSemibold,\n lineHeight: tokens.lineHeightBase300,\n },\n};\n\nexport const pendingSpacingTokens = {\n none: '0',\n xxs: '2px',\n xs: '4px',\n sNudge: '6px',\n s: '8px',\n mNudge: '10px',\n m: '12px',\n l: '16px',\n xl: '20px',\n xxl: '24px',\n xxxl: '32px',\n};\n\nexport const pendingAnimationDurationTokens = {\n ultraFast: '50ms',\n faster: '100ms',\n fast: '150ms',\n normal: '200ms',\n slow: '300ms',\n slower: '400ms',\n ultraSlow: '500ms',\n};\n\nexport const pendingAnimationEasingTokens = {\n accelerateMax: 'cubic-bezier(1,0,1,1)',\n accelerateMid: 'cubic-bezier(0.7,0,1,0.5)',\n accelerateMin: 'cubic-bezier(0.8,0,1,1)',\n declerateMax: 'cubic-bezier(0,0,0,1)',\n decelerateMid: 'cubic-bezier(0.1,0.9,0.2,1)',\n decelarateMin: 'cubic-bezier(0.33,0,0.1,1)',\n maxEasyEase: 'cubic-bezier(0.8,0,0.1,1)',\n easyEase: 'cubic-bezier(0.33,0,0.67,1)',\n linear: 'cubic-bezier(0,0,1,1)',\n};\n\n/**\n * Provides shared values between tab style hooks\n * useTabStyles\n * useTabAnimatedIndicator\n */\nexport const tabIndicatorPadding = {\n mediumHorizontal: pendingSpacingTokens.m,\n mediumVertical: pendingSpacingTokens.s,\n smallHorizontal: pendingSpacingTokens.sNudge,\n smallVertical: pendingSpacingTokens.xs,\n};\n\nexport const tabIndicatorStrokeWidths = {\n mediumHorizontal: tokens.strokeWidthThicker,\n mediumVertical: tokens.strokeWidthThicker,\n smallHorizontal: tokens.strokeWidthThick,\n smallVertical: tokens.strokeWidthThicker,\n};\n"],"sourceRoot":"../src/"}