@fluentui/react-tabs 9.0.0-beta.8 → 9.0.0-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/CHANGELOG.json +108 -1
  2. package/CHANGELOG.md +24 -2
  3. package/dist/react-tabs.d.ts +48 -36
  4. package/lib/components/Tab/Tab.types.d.ts +14 -5
  5. package/lib/components/Tab/Tab.types.js.map +1 -1
  6. package/lib/components/Tab/index.d.ts +1 -0
  7. package/lib/components/Tab/index.js +1 -0
  8. package/lib/components/Tab/index.js.map +1 -1
  9. package/lib/components/Tab/renderTab.js +1 -2
  10. package/lib/components/Tab/renderTab.js.map +1 -1
  11. package/lib/components/Tab/useTab.js +25 -29
  12. package/lib/components/Tab/useTab.js.map +1 -1
  13. package/lib/components/Tab/useTabAnimatedIndicator.d.ts +5 -0
  14. package/lib/components/Tab/useTabAnimatedIndicator.js +134 -0
  15. package/lib/components/Tab/useTabAnimatedIndicator.js.map +1 -0
  16. package/lib/components/Tab/useTabStyles.d.ts +4 -2
  17. package/lib/components/Tab/useTabStyles.js +280 -84
  18. package/lib/components/Tab/useTabStyles.js.map +1 -1
  19. package/lib/components/TabList/TabList.types.d.ts +21 -16
  20. package/lib/components/TabList/TabList.types.js.map +1 -1
  21. package/lib/components/TabList/TabListContext.js +6 -0
  22. package/lib/components/TabList/TabListContext.js.map +1 -1
  23. package/lib/components/TabList/renderTabList.js +0 -1
  24. package/lib/components/TabList/renderTabList.js.map +1 -1
  25. package/lib/components/TabList/useTabList.js +26 -51
  26. package/lib/components/TabList/useTabList.js.map +1 -1
  27. package/lib/components/TabList/useTabListContextValues.js +4 -0
  28. package/lib/components/TabList/useTabListContextValues.js.map +1 -1
  29. package/lib/components/TabList/useTabListStyles.d.ts +4 -5
  30. package/lib/components/TabList/useTabListStyles.js +8 -90
  31. package/lib/components/TabList/useTabListStyles.js.map +1 -1
  32. package/lib/index.d.ts +4 -2
  33. package/lib/index.js +2 -2
  34. package/lib/index.js.map +1 -1
  35. package/lib/tab.constants.d.ts +59 -12
  36. package/lib/tab.constants.js +64 -13
  37. package/lib/tab.constants.js.map +1 -1
  38. package/lib-commonjs/components/Tab/Tab.types.d.ts +14 -5
  39. package/lib-commonjs/components/Tab/index.d.ts +1 -0
  40. package/lib-commonjs/components/Tab/index.js +2 -0
  41. package/lib-commonjs/components/Tab/index.js.map +1 -1
  42. package/lib-commonjs/components/Tab/renderTab.js +1 -2
  43. package/lib-commonjs/components/Tab/renderTab.js.map +1 -1
  44. package/lib-commonjs/components/Tab/useTab.js +25 -29
  45. package/lib-commonjs/components/Tab/useTab.js.map +1 -1
  46. package/lib-commonjs/components/Tab/useTabAnimatedIndicator.d.ts +5 -0
  47. package/lib-commonjs/components/Tab/useTabAnimatedIndicator.js +148 -0
  48. package/lib-commonjs/components/Tab/useTabAnimatedIndicator.js.map +1 -0
  49. package/lib-commonjs/components/Tab/useTabStyles.d.ts +4 -2
  50. package/lib-commonjs/components/Tab/useTabStyles.js +281 -84
  51. package/lib-commonjs/components/Tab/useTabStyles.js.map +1 -1
  52. package/lib-commonjs/components/TabList/TabList.types.d.ts +21 -16
  53. package/lib-commonjs/components/TabList/TabListContext.js +6 -0
  54. package/lib-commonjs/components/TabList/TabListContext.js.map +1 -1
  55. package/lib-commonjs/components/TabList/renderTabList.js +0 -1
  56. package/lib-commonjs/components/TabList/renderTabList.js.map +1 -1
  57. package/lib-commonjs/components/TabList/useTabList.js +25 -50
  58. package/lib-commonjs/components/TabList/useTabList.js.map +1 -1
  59. package/lib-commonjs/components/TabList/useTabListContextValues.js +4 -0
  60. package/lib-commonjs/components/TabList/useTabListContextValues.js.map +1 -1
  61. package/lib-commonjs/components/TabList/useTabListStyles.d.ts +4 -5
  62. package/lib-commonjs/components/TabList/useTabListStyles.js +7 -92
  63. package/lib-commonjs/components/TabList/useTabListStyles.js.map +1 -1
  64. package/lib-commonjs/index.d.ts +4 -2
  65. package/lib-commonjs/index.js +76 -3
  66. package/lib-commonjs/index.js.map +1 -1
  67. package/lib-commonjs/tab.constants.d.ts +59 -12
  68. package/lib-commonjs/tab.constants.js +66 -14
  69. package/lib-commonjs/tab.constants.js.map +1 -1
  70. package/package.json +9 -18
@@ -1,23 +1,75 @@
1
- "use strict";
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
2
3
 
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
- exports.tabPendingDesignTokens = void 0; // TODO: These constants should be replaced with design tokens
7
+ exports.tabIndicatorStrokeWidths = exports.tabIndicatorPadding = exports.pendingAnimationEasingTokens = exports.pendingAnimationDurationTokens = exports.pendingSpacingTokens = exports.pendingContentSizeTokens = void 0;
7
8
 
8
- exports.tabPendingDesignTokens = {
9
- tabPadding: {
10
- medium: '10px',
11
- small: '6px'
12
- },
13
- indicatorThickness: '2px',
14
- gap: {
15
- medium: '6px',
16
- small: '2px'
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
17
  },
18
- contentPadding: {
19
- medium: '2px',
20
- small: '2px'
18
+ body1Strong: {
19
+ fontSize: react_theme_1.tokens.fontSizeBase300,
20
+ fontWeight: react_theme_1.tokens.fontWeightSemibold,
21
+ lineHeight: react_theme_1.tokens.lineHeightBase300
21
22
  }
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
+ };
23
75
  //# sourceMappingURL=tab.constants.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["tab.constants.ts"],"names":[],"mappings":";;;;;yCAAA;;AACa,OAAA,CAAA,sBAAA,GAAyB;AACpC,EAAA,UAAU,EAAE;AACV,IAAA,MAAM,EAAE,MADE;AAEV,IAAA,KAAK,EAAE;AAFG,GADwB;AAKpC,EAAA,kBAAkB,EAAE,KALgB;AAMpC,EAAA,GAAG,EAAE;AAAE,IAAA,MAAM,EAAE,KAAV;AAAiB,IAAA,KAAK,EAAE;AAAxB,GAN+B;AAOpC,EAAA,cAAc,EAAE;AACd,IAAA,MAAM,EAAE,KADM;AAEd,IAAA,KAAK,EAAE;AAFO;AAPoB,CAAzB","sourcesContent":["// TODO: These constants should be replaced with design tokens\nexport const tabPendingDesignTokens = {\n tabPadding: {\n medium: '10px',\n small: '6px',\n },\n indicatorThickness: '2px',\n gap: { medium: '6px', small: '2px' },\n contentPadding: {\n medium: '2px',\n small: '2px',\n },\n};\n"],"sourceRoot":"../src/"}
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,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AA3B","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/"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-tabs",
3
- "version": "9.0.0-beta.8",
3
+ "version": "9.0.0-beta.9",
4
4
  "description": "Fluent UI React tabs components",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -27,25 +27,16 @@
27
27
  "devDependencies": {
28
28
  "@fluentui/eslint-plugin": "*",
29
29
  "@fluentui/react-conformance": "*",
30
- "@fluentui/react-conformance-griffel": "9.0.0-beta.3",
31
- "@fluentui/react-context-selector": "9.0.0-rc.5",
32
- "@fluentui/scripts": "^1.0.0",
33
- "@types/enzyme": "3.10.3",
34
- "@types/enzyme-adapter-react-16": "1.0.3",
35
- "@types/react": "16.9.42",
36
- "@types/react-dom": "16.9.10",
37
- "@types/react-test-renderer": "^16.0.0",
38
- "enzyme": "~3.10.0",
39
- "enzyme-adapter-react-16": "^1.15.0",
40
- "react": "16.8.6",
41
- "react-dom": "16.8.6",
42
- "react-test-renderer": "^16.3.0"
30
+ "@fluentui/react-conformance-griffel": "9.0.0-beta.4",
31
+ "@fluentui/react-context-selector": "9.0.0-rc.6",
32
+ "@fluentui/scripts": "^1.0.0"
43
33
  },
44
34
  "dependencies": {
45
- "@griffel/react": "1.0.0",
46
- "@fluentui/react-tabster": "9.0.0-rc.5",
47
- "@fluentui/react-theme": "9.0.0-rc.4",
48
- "@fluentui/react-utilities": "9.0.0-rc.5",
35
+ "@griffel/react": "1.0.3",
36
+ "@fluentui/react-context-selector": "9.0.0-rc.6",
37
+ "@fluentui/react-tabster": "9.0.0-rc.6",
38
+ "@fluentui/react-theme": "9.0.0-rc.5",
39
+ "@fluentui/react-utilities": "9.0.0-rc.6",
49
40
  "tslib": "^2.1.0"
50
41
  },
51
42
  "peerDependencies": {