@fluentui/react-tabs 9.0.0-beta.8 → 9.0.0-rc.3

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 (91) hide show
  1. package/CHANGELOG.json +371 -1
  2. package/CHANGELOG.md +101 -4
  3. package/dist/{react-tabs.d.ts → index.d.ts} +73 -70
  4. package/{lib → dist}/tsdoc-metadata.json +0 -0
  5. package/lib/components/Tab/Tab.types.js.map +1 -1
  6. package/lib/components/Tab/index.js +1 -0
  7. package/lib/components/Tab/index.js.map +1 -1
  8. package/lib/components/Tab/renderTab.js +1 -2
  9. package/lib/components/Tab/renderTab.js.map +1 -1
  10. package/lib/components/Tab/useTab.js +28 -29
  11. package/lib/components/Tab/useTab.js.map +1 -1
  12. package/lib/components/Tab/useTabAnimatedIndicator.js +134 -0
  13. package/lib/components/Tab/useTabAnimatedIndicator.js.map +1 -0
  14. package/lib/components/Tab/useTabStyles.js +220 -88
  15. package/lib/components/Tab/useTabStyles.js.map +1 -1
  16. package/lib/components/TabList/TabList.types.js.map +1 -1
  17. package/lib/components/TabList/TabListContext.js +6 -0
  18. package/lib/components/TabList/TabListContext.js.map +1 -1
  19. package/lib/components/TabList/renderTabList.js +0 -1
  20. package/lib/components/TabList/renderTabList.js.map +1 -1
  21. package/lib/components/TabList/useTabList.js +28 -52
  22. package/lib/components/TabList/useTabList.js.map +1 -1
  23. package/lib/components/TabList/useTabListContextValues.js +4 -0
  24. package/lib/components/TabList/useTabListContextValues.js.map +1 -1
  25. package/lib/components/TabList/useTabListStyles.js +14 -91
  26. package/lib/components/TabList/useTabListStyles.js.map +1 -1
  27. package/lib/index.js +2 -2
  28. package/lib/index.js.map +1 -1
  29. package/lib-commonjs/components/Tab/index.js +2 -0
  30. package/lib-commonjs/components/Tab/index.js.map +1 -1
  31. package/lib-commonjs/components/Tab/renderTab.js +1 -2
  32. package/lib-commonjs/components/Tab/renderTab.js.map +1 -1
  33. package/lib-commonjs/components/Tab/useTab.js +28 -29
  34. package/lib-commonjs/components/Tab/useTab.js.map +1 -1
  35. package/lib-commonjs/components/Tab/useTabAnimatedIndicator.js +148 -0
  36. package/lib-commonjs/components/Tab/useTabAnimatedIndicator.js.map +1 -0
  37. package/lib-commonjs/components/Tab/useTabStyles.js +220 -88
  38. package/lib-commonjs/components/Tab/useTabStyles.js.map +1 -1
  39. package/lib-commonjs/components/TabList/TabListContext.js +6 -0
  40. package/lib-commonjs/components/TabList/TabListContext.js.map +1 -1
  41. package/lib-commonjs/components/TabList/renderTabList.js +0 -1
  42. package/lib-commonjs/components/TabList/renderTabList.js.map +1 -1
  43. package/lib-commonjs/components/TabList/useTabList.js +27 -51
  44. package/lib-commonjs/components/TabList/useTabList.js.map +1 -1
  45. package/lib-commonjs/components/TabList/useTabListContextValues.js +4 -0
  46. package/lib-commonjs/components/TabList/useTabListContextValues.js.map +1 -1
  47. package/lib-commonjs/components/TabList/useTabListStyles.js +14 -94
  48. package/lib-commonjs/components/TabList/useTabListStyles.js.map +1 -1
  49. package/lib-commonjs/index.js +64 -3
  50. package/lib-commonjs/index.js.map +1 -1
  51. package/package.json +12 -21
  52. package/lib/Tab.d.ts +0 -1
  53. package/lib/TabList.d.ts +0 -1
  54. package/lib/components/Tab/Tab.d.ts +0 -6
  55. package/lib/components/Tab/Tab.types.d.ts +0 -52
  56. package/lib/components/Tab/index.d.ts +0 -5
  57. package/lib/components/Tab/renderTab.d.ts +0 -5
  58. package/lib/components/Tab/useTab.d.ts +0 -12
  59. package/lib/components/Tab/useTabStyles.d.ts +0 -6
  60. package/lib/components/TabList/TabList.d.ts +0 -6
  61. package/lib/components/TabList/TabList.types.d.ts +0 -99
  62. package/lib/components/TabList/TabListContext.d.ts +0 -3
  63. package/lib/components/TabList/index.d.ts +0 -5
  64. package/lib/components/TabList/renderTabList.d.ts +0 -5
  65. package/lib/components/TabList/useTabList.d.ts +0 -12
  66. package/lib/components/TabList/useTabListContextValues.d.ts +0 -2
  67. package/lib/components/TabList/useTabListStyles.d.ts +0 -9
  68. package/lib/index.d.ts +0 -2
  69. package/lib/tab.constants.d.ts +0 -15
  70. package/lib/tab.constants.js +0 -17
  71. package/lib/tab.constants.js.map +0 -1
  72. package/lib-commonjs/Tab.d.ts +0 -1
  73. package/lib-commonjs/TabList.d.ts +0 -1
  74. package/lib-commonjs/components/Tab/Tab.d.ts +0 -6
  75. package/lib-commonjs/components/Tab/Tab.types.d.ts +0 -52
  76. package/lib-commonjs/components/Tab/index.d.ts +0 -5
  77. package/lib-commonjs/components/Tab/renderTab.d.ts +0 -5
  78. package/lib-commonjs/components/Tab/useTab.d.ts +0 -12
  79. package/lib-commonjs/components/Tab/useTabStyles.d.ts +0 -6
  80. package/lib-commonjs/components/TabList/TabList.d.ts +0 -6
  81. package/lib-commonjs/components/TabList/TabList.types.d.ts +0 -99
  82. package/lib-commonjs/components/TabList/TabListContext.d.ts +0 -3
  83. package/lib-commonjs/components/TabList/index.d.ts +0 -5
  84. package/lib-commonjs/components/TabList/renderTabList.d.ts +0 -5
  85. package/lib-commonjs/components/TabList/useTabList.d.ts +0 -12
  86. package/lib-commonjs/components/TabList/useTabListContextValues.d.ts +0 -2
  87. package/lib-commonjs/components/TabList/useTabListStyles.d.ts +0 -9
  88. package/lib-commonjs/index.d.ts +0 -2
  89. package/lib-commonjs/tab.constants.d.ts +0 -15
  90. package/lib-commonjs/tab.constants.js +0 -23
  91. package/lib-commonjs/tab.constants.js.map +0 -1
package/lib/TabList.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './components/TabList/index';
@@ -1,6 +0,0 @@
1
- import type { TabProps } from './Tab.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * A tab provides a selectable item in a tab list.
5
- */
6
- export declare const Tab: ForwardRefComponent<TabProps>;
@@ -1,52 +0,0 @@
1
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
- /**
3
- * Any value that identifies a specific tab.
4
- */
5
- export declare type TabValue = unknown;
6
- export declare type TabSlots = {
7
- /**
8
- * Root of the component.
9
- */
10
- root: Slot<'div'>;
11
- /**
12
- * Icon that renders before the content.
13
- */
14
- icon?: Slot<'span'>;
15
- /**
16
- * Component children are placed in this slot
17
- * Avoid using the `children` property in this slot in favour of Component children whenever possible.
18
- */
19
- content: NonNullable<Slot<'span'>>;
20
- };
21
- declare type TabCommons = {
22
- /**
23
- * The value that identifies this tab when selected.
24
- */
25
- value: TabValue;
26
- };
27
- /**
28
- * Tab Props
29
- */
30
- export declare type TabProps = ComponentProps<Partial<TabSlots>> & TabCommons;
31
- /**
32
- * State used in rendering Tab
33
- */
34
- export declare type TabState = ComponentState<TabSlots> & TabCommons & {
35
- /**
36
- * A tab supports 'transparent' and 'subtle' appearance.
37
- */
38
- appearance?: string;
39
- /**
40
- * If this tab is selected.
41
- */
42
- selected?: boolean;
43
- /**
44
- * A tab can be either 'small' or 'medium' size.
45
- */
46
- size: 'small' | 'medium';
47
- /**
48
- * A tab can arrange its content based on if the tabs in the list are arranged vertically.
49
- */
50
- vertical: boolean;
51
- };
52
- export {};
@@ -1,5 +0,0 @@
1
- export * from './Tab';
2
- export * from './Tab.types';
3
- export * from './renderTab';
4
- export * from './useTab';
5
- export * from './useTabStyles';
@@ -1,5 +0,0 @@
1
- import type { TabState } from './Tab.types';
2
- /**
3
- * Render the final JSX of Tab
4
- */
5
- export declare const renderTab_unstable: (state: TabState) => JSX.Element;
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import type { TabProps, TabState } from './Tab.types';
3
- /**
4
- * Create the state required to render Tab.
5
- *
6
- * The returned state can be modified with hooks such as useTabStyles_unstable,
7
- * before being passed to renderTab_unstable.
8
- *
9
- * @param props - props from this instance of Tab
10
- * @param ref - reference to root HTMLElement of Tab
11
- */
12
- export declare const useTab_unstable: (props: TabProps, ref: React.Ref<HTMLElement>) => TabState;
@@ -1,6 +0,0 @@
1
- import type { TabState } from './Tab.types';
2
- export declare const tabClassName = "fui-Tab";
3
- /**
4
- * Apply styling to the Tab slots based on the state
5
- */
6
- export declare const useTabStyles_unstable: (state: TabState) => TabState;
@@ -1,6 +0,0 @@
1
- import type { TabListProps } from './TabList.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * A tab list provides single selection from a set of tabs.
5
- */
6
- export declare const TabList: ForwardRefComponent<TabListProps>;
@@ -1,99 +0,0 @@
1
- import * as React from 'react';
2
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
3
- import { TabValue } from '../Tab/Tab.types';
4
- export declare type RegisterTabData = {
5
- /**
6
- * The value of the selected tab.
7
- */
8
- value: TabValue;
9
- ref: React.RefObject<HTMLElement>;
10
- };
11
- export declare type RegisterTabEventHandler = (data: RegisterTabData) => void;
12
- export declare type SelectTabData = {
13
- /**
14
- * The value of the selected tab.
15
- */
16
- value: TabValue;
17
- };
18
- export declare type SelectTabEvent<E = HTMLElement> = React.MouseEvent<E> | React.KeyboardEvent<E>;
19
- export declare type SelectTabEventHandler = (event: SelectTabEvent, data: SelectTabData) => void;
20
- export declare type TabListSlots = {
21
- /**
22
- * The slot associated with the root element of this tab list.
23
- */
24
- root: Slot<'div'>;
25
- };
26
- declare type TabListCommons = {
27
- /**
28
- * A tab list can supports 'transparent' and 'subtle' appearance.
29
- *- 'subtle': Minimizes emphasis to blend into the background until hovered or focused.
30
- *- 'transparent': No background and border styling
31
- * The appearance affects each of the contained tabs.
32
- * @default 'transparent'
33
- */
34
- appearance?: 'transparent' | 'subtle';
35
- /**
36
- * Raised when a tab is selected.
37
- */
38
- onTabSelect?: SelectTabEventHandler;
39
- /**
40
- * The value of the currently selected tab.
41
- */
42
- selectedValue?: TabValue;
43
- /**
44
- * A tab list can be either 'small' or 'medium' size.
45
- * The size affects each of the contained tabs.
46
- * @default 'medium'
47
- */
48
- size?: 'small' | 'medium';
49
- /**
50
- * A tab list can arrange its tabs vertically.
51
- * @default false
52
- */
53
- vertical?: boolean;
54
- };
55
- /**
56
- * TabList Props
57
- */
58
- export declare type TabListProps = ComponentProps<TabListSlots> & TabListCommons & {
59
- /**
60
- * The value of the tab to be selected by default.
61
- * Typically useful when the selectedValue is uncontrolled.
62
- */
63
- defaultSelectedValue?: TabValue;
64
- };
65
- export declare type TabListContextValue = Pick<TabListCommons, 'onTabSelect' | 'selectedValue'> & Required<Pick<TabListCommons, 'appearance' | 'size' | 'vertical'>> & {
66
- /** A callback to allow a tab to register itself with the tab list. */
67
- onRegister: RegisterTabEventHandler;
68
- /** A callback to allow a tab to unregister itself with the tab list. */
69
- onUnregister: RegisterTabEventHandler;
70
- /**
71
- * A callback to allow a tab to select itself when pressed.
72
- */
73
- onSelect: SelectTabEventHandler;
74
- };
75
- /**
76
- * Context values used in rendering TabList.
77
- */
78
- export declare type TabListContextValues = {
79
- /**
80
- * The context of the tab list available to each tab.
81
- */
82
- tabList: TabListContextValue;
83
- };
84
- /**
85
- * A bounding rectangle of a tab
86
- */
87
- export declare type TabContentRect = {
88
- x: number;
89
- y: number;
90
- width: number;
91
- height: number;
92
- };
93
- /**
94
- * State used in rendering TabList.
95
- */
96
- export declare type TabListState = ComponentState<Required<TabListSlots>> & TabListContextValue & {
97
- selectedTabRect?: TabContentRect;
98
- };
99
- export {};
@@ -1,3 +0,0 @@
1
- import type { Context } from '@fluentui/react-context-selector';
2
- import { TabListContextValue } from './TabList.types';
3
- export declare const TabListContext: Context<TabListContextValue>;
@@ -1,5 +0,0 @@
1
- export * from './TabList';
2
- export * from './TabList.types';
3
- export * from './renderTabList';
4
- export * from './useTabList';
5
- export * from './useTabListStyles';
@@ -1,5 +0,0 @@
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;
@@ -1,12 +0,0 @@
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;
@@ -1,2 +0,0 @@
1
- import { TabListContextValues, TabListState } from './TabList.types';
2
- export declare function useTabListContextValues(state: TabListState): TabListContextValues;
@@ -1,9 +0,0 @@
1
- import type { TabListState } from './TabList.types';
2
- export declare const tabListClassName = "fui-TabList";
3
- export declare const tabListSelectionIndicatorName = "fui-TabList_SelectionIndicator";
4
- export declare const indicatorOffsetVar = "--selection-indicator-offset";
5
- export declare const indicatorLengthVar = "--selection-indicator-length";
6
- /**
7
- * Apply styling to the TabList slots based on the state
8
- */
9
- export declare const useTabListStyles_unstable: (state: TabListState) => TabListState;
package/lib/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './Tab';
2
- export * from './TabList';
@@ -1,15 +0,0 @@
1
- export declare const tabPendingDesignTokens: {
2
- tabPadding: {
3
- medium: string;
4
- small: string;
5
- };
6
- indicatorThickness: string;
7
- gap: {
8
- medium: string;
9
- small: string;
10
- };
11
- contentPadding: {
12
- medium: string;
13
- small: string;
14
- };
15
- };
@@ -1,17 +0,0 @@
1
- // TODO: These constants should be replaced with design tokens
2
- export const tabPendingDesignTokens = {
3
- tabPadding: {
4
- medium: '10px',
5
- small: '6px'
6
- },
7
- indicatorThickness: '2px',
8
- gap: {
9
- medium: '6px',
10
- small: '2px'
11
- },
12
- contentPadding: {
13
- medium: '2px',
14
- small: '2px'
15
- }
16
- };
17
- //# sourceMappingURL=tab.constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["tab.constants.ts"],"names":[],"mappings":"AAAA;AACA,OAAO,MAAM,sBAAsB,GAAG;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,CAA/B","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 +0,0 @@
1
- export * from './components/Tab/index';
@@ -1 +0,0 @@
1
- export * from './components/TabList/index';
@@ -1,6 +0,0 @@
1
- import type { TabProps } from './Tab.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * A tab provides a selectable item in a tab list.
5
- */
6
- export declare const Tab: ForwardRefComponent<TabProps>;
@@ -1,52 +0,0 @@
1
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
- /**
3
- * Any value that identifies a specific tab.
4
- */
5
- export declare type TabValue = unknown;
6
- export declare type TabSlots = {
7
- /**
8
- * Root of the component.
9
- */
10
- root: Slot<'div'>;
11
- /**
12
- * Icon that renders before the content.
13
- */
14
- icon?: Slot<'span'>;
15
- /**
16
- * Component children are placed in this slot
17
- * Avoid using the `children` property in this slot in favour of Component children whenever possible.
18
- */
19
- content: NonNullable<Slot<'span'>>;
20
- };
21
- declare type TabCommons = {
22
- /**
23
- * The value that identifies this tab when selected.
24
- */
25
- value: TabValue;
26
- };
27
- /**
28
- * Tab Props
29
- */
30
- export declare type TabProps = ComponentProps<Partial<TabSlots>> & TabCommons;
31
- /**
32
- * State used in rendering Tab
33
- */
34
- export declare type TabState = ComponentState<TabSlots> & TabCommons & {
35
- /**
36
- * A tab supports 'transparent' and 'subtle' appearance.
37
- */
38
- appearance?: string;
39
- /**
40
- * If this tab is selected.
41
- */
42
- selected?: boolean;
43
- /**
44
- * A tab can be either 'small' or 'medium' size.
45
- */
46
- size: 'small' | 'medium';
47
- /**
48
- * A tab can arrange its content based on if the tabs in the list are arranged vertically.
49
- */
50
- vertical: boolean;
51
- };
52
- export {};
@@ -1,5 +0,0 @@
1
- export * from './Tab';
2
- export * from './Tab.types';
3
- export * from './renderTab';
4
- export * from './useTab';
5
- export * from './useTabStyles';
@@ -1,5 +0,0 @@
1
- import type { TabState } from './Tab.types';
2
- /**
3
- * Render the final JSX of Tab
4
- */
5
- export declare const renderTab_unstable: (state: TabState) => JSX.Element;
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import type { TabProps, TabState } from './Tab.types';
3
- /**
4
- * Create the state required to render Tab.
5
- *
6
- * The returned state can be modified with hooks such as useTabStyles_unstable,
7
- * before being passed to renderTab_unstable.
8
- *
9
- * @param props - props from this instance of Tab
10
- * @param ref - reference to root HTMLElement of Tab
11
- */
12
- export declare const useTab_unstable: (props: TabProps, ref: React.Ref<HTMLElement>) => TabState;
@@ -1,6 +0,0 @@
1
- import type { TabState } from './Tab.types';
2
- export declare const tabClassName = "fui-Tab";
3
- /**
4
- * Apply styling to the Tab slots based on the state
5
- */
6
- export declare const useTabStyles_unstable: (state: TabState) => TabState;
@@ -1,6 +0,0 @@
1
- import type { TabListProps } from './TabList.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * A tab list provides single selection from a set of tabs.
5
- */
6
- export declare const TabList: ForwardRefComponent<TabListProps>;
@@ -1,99 +0,0 @@
1
- import * as React from 'react';
2
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
3
- import { TabValue } from '../Tab/Tab.types';
4
- export declare type RegisterTabData = {
5
- /**
6
- * The value of the selected tab.
7
- */
8
- value: TabValue;
9
- ref: React.RefObject<HTMLElement>;
10
- };
11
- export declare type RegisterTabEventHandler = (data: RegisterTabData) => void;
12
- export declare type SelectTabData = {
13
- /**
14
- * The value of the selected tab.
15
- */
16
- value: TabValue;
17
- };
18
- export declare type SelectTabEvent<E = HTMLElement> = React.MouseEvent<E> | React.KeyboardEvent<E>;
19
- export declare type SelectTabEventHandler = (event: SelectTabEvent, data: SelectTabData) => void;
20
- export declare type TabListSlots = {
21
- /**
22
- * The slot associated with the root element of this tab list.
23
- */
24
- root: Slot<'div'>;
25
- };
26
- declare type TabListCommons = {
27
- /**
28
- * A tab list can supports 'transparent' and 'subtle' appearance.
29
- *- 'subtle': Minimizes emphasis to blend into the background until hovered or focused.
30
- *- 'transparent': No background and border styling
31
- * The appearance affects each of the contained tabs.
32
- * @default 'transparent'
33
- */
34
- appearance?: 'transparent' | 'subtle';
35
- /**
36
- * Raised when a tab is selected.
37
- */
38
- onTabSelect?: SelectTabEventHandler;
39
- /**
40
- * The value of the currently selected tab.
41
- */
42
- selectedValue?: TabValue;
43
- /**
44
- * A tab list can be either 'small' or 'medium' size.
45
- * The size affects each of the contained tabs.
46
- * @default 'medium'
47
- */
48
- size?: 'small' | 'medium';
49
- /**
50
- * A tab list can arrange its tabs vertically.
51
- * @default false
52
- */
53
- vertical?: boolean;
54
- };
55
- /**
56
- * TabList Props
57
- */
58
- export declare type TabListProps = ComponentProps<TabListSlots> & TabListCommons & {
59
- /**
60
- * The value of the tab to be selected by default.
61
- * Typically useful when the selectedValue is uncontrolled.
62
- */
63
- defaultSelectedValue?: TabValue;
64
- };
65
- export declare type TabListContextValue = Pick<TabListCommons, 'onTabSelect' | 'selectedValue'> & Required<Pick<TabListCommons, 'appearance' | 'size' | 'vertical'>> & {
66
- /** A callback to allow a tab to register itself with the tab list. */
67
- onRegister: RegisterTabEventHandler;
68
- /** A callback to allow a tab to unregister itself with the tab list. */
69
- onUnregister: RegisterTabEventHandler;
70
- /**
71
- * A callback to allow a tab to select itself when pressed.
72
- */
73
- onSelect: SelectTabEventHandler;
74
- };
75
- /**
76
- * Context values used in rendering TabList.
77
- */
78
- export declare type TabListContextValues = {
79
- /**
80
- * The context of the tab list available to each tab.
81
- */
82
- tabList: TabListContextValue;
83
- };
84
- /**
85
- * A bounding rectangle of a tab
86
- */
87
- export declare type TabContentRect = {
88
- x: number;
89
- y: number;
90
- width: number;
91
- height: number;
92
- };
93
- /**
94
- * State used in rendering TabList.
95
- */
96
- export declare type TabListState = ComponentState<Required<TabListSlots>> & TabListContextValue & {
97
- selectedTabRect?: TabContentRect;
98
- };
99
- export {};
@@ -1,3 +0,0 @@
1
- import type { Context } from '@fluentui/react-context-selector';
2
- import { TabListContextValue } from './TabList.types';
3
- export declare const TabListContext: Context<TabListContextValue>;
@@ -1,5 +0,0 @@
1
- export * from './TabList';
2
- export * from './TabList.types';
3
- export * from './renderTabList';
4
- export * from './useTabList';
5
- export * from './useTabListStyles';
@@ -1,5 +0,0 @@
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;
@@ -1,12 +0,0 @@
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;
@@ -1,2 +0,0 @@
1
- import { TabListContextValues, TabListState } from './TabList.types';
2
- export declare function useTabListContextValues(state: TabListState): TabListContextValues;
@@ -1,9 +0,0 @@
1
- import type { TabListState } from './TabList.types';
2
- export declare const tabListClassName = "fui-TabList";
3
- export declare const tabListSelectionIndicatorName = "fui-TabList_SelectionIndicator";
4
- export declare const indicatorOffsetVar = "--selection-indicator-offset";
5
- export declare const indicatorLengthVar = "--selection-indicator-length";
6
- /**
7
- * Apply styling to the TabList slots based on the state
8
- */
9
- export declare const useTabListStyles_unstable: (state: TabListState) => TabListState;
@@ -1,2 +0,0 @@
1
- export * from './Tab';
2
- export * from './TabList';
@@ -1,15 +0,0 @@
1
- export declare const tabPendingDesignTokens: {
2
- tabPadding: {
3
- medium: string;
4
- small: string;
5
- };
6
- indicatorThickness: string;
7
- gap: {
8
- medium: string;
9
- small: string;
10
- };
11
- contentPadding: {
12
- medium: string;
13
- small: string;
14
- };
15
- };
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.tabPendingDesignTokens = void 0; // TODO: These constants should be replaced with design tokens
7
-
8
- exports.tabPendingDesignTokens = {
9
- tabPadding: {
10
- medium: '10px',
11
- small: '6px'
12
- },
13
- indicatorThickness: '2px',
14
- gap: {
15
- medium: '6px',
16
- small: '2px'
17
- },
18
- contentPadding: {
19
- medium: '2px',
20
- small: '2px'
21
- }
22
- };
23
- //# sourceMappingURL=tab.constants.js.map
@@ -1 +0,0 @@
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/"}