@fluentui/react-tabs 0.0.0-nightly2170ed575f20220223.1
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.
- package/CHANGELOG.json +128 -0
- package/CHANGELOG.md +44 -0
- package/LICENSE +15 -0
- package/README.md +5 -0
- package/Spec.md +433 -0
- package/dist/react-tabs.d.ts +231 -0
- package/lib/Tab.d.ts +1 -0
- package/lib/Tab.js +2 -0
- package/lib/Tab.js.map +1 -0
- package/lib/TabList.d.ts +1 -0
- package/lib/TabList.js +2 -0
- package/lib/TabList.js.map +1 -0
- package/lib/components/Tab/Tab.d.ts +6 -0
- package/lib/components/Tab/Tab.js +15 -0
- package/lib/components/Tab/Tab.js.map +1 -0
- package/lib/components/Tab/Tab.types.d.ts +52 -0
- package/lib/components/Tab/Tab.types.js +2 -0
- package/lib/components/Tab/Tab.types.js.map +1 -0
- package/lib/components/Tab/index.d.ts +5 -0
- package/lib/components/Tab/index.js +6 -0
- package/lib/components/Tab/index.js.map +1 -0
- package/lib/components/Tab/renderTab.d.ts +5 -0
- package/lib/components/Tab/renderTab.js +18 -0
- package/lib/components/Tab/renderTab.js.map +1 -0
- package/lib/components/Tab/useTab.d.ts +12 -0
- package/lib/components/Tab/useTab.js +82 -0
- package/lib/components/Tab/useTab.js.map +1 -0
- package/lib/components/Tab/useTabStyles.d.ts +6 -0
- package/lib/components/Tab/useTabStyles.js +205 -0
- package/lib/components/Tab/useTabStyles.js.map +1 -0
- package/lib/components/TabList/TabList.d.ts +6 -0
- package/lib/components/TabList/TabList.js +17 -0
- package/lib/components/TabList/TabList.js.map +1 -0
- package/lib/components/TabList/TabList.types.d.ts +99 -0
- package/lib/components/TabList/TabList.types.js +2 -0
- package/lib/components/TabList/TabList.types.js.map +1 -0
- package/lib/components/TabList/TabListContext.d.ts +3 -0
- package/lib/components/TabList/TabListContext.js +17 -0
- package/lib/components/TabList/TabListContext.js.map +1 -0
- package/lib/components/TabList/index.d.ts +5 -0
- package/lib/components/TabList/index.js +6 -0
- package/lib/components/TabList/index.js.map +1 -0
- package/lib/components/TabList/renderTabList.d.ts +5 -0
- package/lib/components/TabList/renderTabList.js +19 -0
- package/lib/components/TabList/renderTabList.js.map +1 -0
- package/lib/components/TabList/useTabList.d.ts +12 -0
- package/lib/components/TabList/useTabList.js +106 -0
- package/lib/components/TabList/useTabList.js.map +1 -0
- package/lib/components/TabList/useTabListContextValues.d.ts +2 -0
- package/lib/components/TabList/useTabListContextValues.js +24 -0
- package/lib/components/TabList/useTabListContextValues.js.map +1 -0
- package/lib/components/TabList/useTabListStyles.d.ts +9 -0
- package/lib/components/TabList/useTabListStyles.js +118 -0
- package/lib/components/TabList/useTabListStyles.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -0
- package/lib/tab.constants.d.ts +15 -0
- package/lib/tab.constants.js +17 -0
- package/lib/tab.constants.js.map +1 -0
- package/lib/tsdoc-metadata.json +11 -0
- package/lib-commonjs/Tab.d.ts +1 -0
- package/lib-commonjs/Tab.js +10 -0
- package/lib-commonjs/Tab.js.map +1 -0
- package/lib-commonjs/TabList.d.ts +1 -0
- package/lib-commonjs/TabList.js +10 -0
- package/lib-commonjs/TabList.js.map +1 -0
- package/lib-commonjs/components/Tab/Tab.d.ts +6 -0
- package/lib-commonjs/components/Tab/Tab.js +26 -0
- package/lib-commonjs/components/Tab/Tab.js.map +1 -0
- package/lib-commonjs/components/Tab/Tab.types.d.ts +52 -0
- package/lib-commonjs/components/Tab/Tab.types.js +6 -0
- package/lib-commonjs/components/Tab/Tab.types.js.map +1 -0
- package/lib-commonjs/components/Tab/index.d.ts +5 -0
- package/lib-commonjs/components/Tab/index.js +18 -0
- package/lib-commonjs/components/Tab/index.js.map +1 -0
- package/lib-commonjs/components/Tab/renderTab.d.ts +5 -0
- package/lib-commonjs/components/Tab/renderTab.js +29 -0
- package/lib-commonjs/components/Tab/renderTab.js.map +1 -0
- package/lib-commonjs/components/Tab/useTab.d.ts +12 -0
- package/lib-commonjs/components/Tab/useTab.js +95 -0
- package/lib-commonjs/components/Tab/useTab.js.map +1 -0
- package/lib-commonjs/components/Tab/useTabStyles.d.ts +6 -0
- package/lib-commonjs/components/Tab/useTabStyles.js +218 -0
- package/lib-commonjs/components/Tab/useTabStyles.js.map +1 -0
- package/lib-commonjs/components/TabList/TabList.d.ts +6 -0
- package/lib-commonjs/components/TabList/TabList.js +29 -0
- package/lib-commonjs/components/TabList/TabList.js.map +1 -0
- package/lib-commonjs/components/TabList/TabList.types.d.ts +99 -0
- package/lib-commonjs/components/TabList/TabList.types.js +6 -0
- package/lib-commonjs/components/TabList/TabList.types.js.map +1 -0
- package/lib-commonjs/components/TabList/TabListContext.d.ts +3 -0
- package/lib-commonjs/components/TabList/TabListContext.js +25 -0
- package/lib-commonjs/components/TabList/TabListContext.js.map +1 -0
- package/lib-commonjs/components/TabList/index.d.ts +5 -0
- package/lib-commonjs/components/TabList/index.js +18 -0
- package/lib-commonjs/components/TabList/index.js.map +1 -0
- package/lib-commonjs/components/TabList/renderTabList.d.ts +5 -0
- package/lib-commonjs/components/TabList/renderTabList.js +31 -0
- package/lib-commonjs/components/TabList/renderTabList.js.map +1 -0
- package/lib-commonjs/components/TabList/useTabList.d.ts +12 -0
- package/lib-commonjs/components/TabList/useTabList.js +118 -0
- package/lib-commonjs/components/TabList/useTabList.js.map +1 -0
- package/lib-commonjs/components/TabList/useTabListContextValues.d.ts +2 -0
- package/lib-commonjs/components/TabList/useTabListContextValues.js +33 -0
- package/lib-commonjs/components/TabList/useTabListContextValues.js.map +1 -0
- package/lib-commonjs/components/TabList/useTabListStyles.d.ts +9 -0
- package/lib-commonjs/components/TabList/useTabListStyles.js +131 -0
- package/lib-commonjs/components/TabList/useTabListStyles.js.map +1 -0
- package/lib-commonjs/index.d.ts +2 -0
- package/lib-commonjs/index.js +12 -0
- package/lib-commonjs/index.js.map +1 -0
- package/lib-commonjs/tab.constants.d.ts +15 -0
- package/lib-commonjs/tab.constants.js +23 -0
- package/lib-commonjs/tab.constants.js.map +1 -0
- package/package.json +64 -0
|
@@ -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;AACH;;;AACO,MAAM,mBAAmB,GAAG,CAAC,KAAD,EAAsB,GAAtB,KAAmE;AACpG,QAAM;AAAE,IAAA,UAAU,GAAG,aAAf;AAA8B,IAAA,WAA9B;AAA2C,IAAA,IAAI,GAAG,QAAlD;AAA4D,IAAA,QAAQ,GAAG;AAAvE,MAAiF,KAAvF;AAEA,QAAM,QAAQ,GAAG,KAAK,CAAC,MAAN,CAA0B,IAA1B,CAAjB;AAEA,QAAM,eAAe,GAAG,eAAA,CAAA,uBAAA,CAAwB;AAAE,IAAA,QAAQ,EAAE,IAAZ;AAAkB,IAAA,IAAI,EAAE,QAAQ,GAAG,UAAH,GAAgB;AAAhD,GAAxB,CAAxB;AAEA,QAAM,CAAC,aAAD,EAAgB,gBAAhB,IAAoC,iBAAA,CAAA,oBAAA,CAAqB;AAC7D,IAAA,KAAK,EAAE,KAAK,CAAC,aADgD;AAE7D,IAAA,YAAY,EAAE,KAAK,CAAC,oBAFyC;AAG7D,IAAA,YAAY,EAAE;AAH+C,GAArB,CAA1C;AAMA,QAAM,QAAQ,GAAG,iBAAA,CAAA,gBAAA,CAAiB,CAAC,KAAD,EAAwB,IAAxB,KAA+C;AAC/E,IAAA,WAAW,KAAA,IAAX,IAAA,WAAW,KAAA,KAAA,CAAX,GAAW,KAAA,CAAX,GAAA,WAAW,CAAG,KAAH,EAAU,IAAV,CAAX;AACA,IAAA,gBAAgB,CAAC,IAAI,CAAC,KAAN,CAAhB;AACD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KAHV;AAIL,QAAA,MAAM,EAAE,OAAO,CAAC;AAJX,OAAP;AAMD,KAZwC,CAazC;AACA;;AACD,GAfuB,EAerB,CAAC,QAAD,EAAW,aAAX,CAfqB,CAAxB;AAiBA,SAAO;AACL,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE;AADI,KADP;AAIL,IAAA,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B;AACjC,MAAA,GAAG,EAAE,iBAAA,CAAA,aAAA,CAAc,GAAd,EAAmB,QAAnB,CAD4B;AAEjC,MAAA,IAAI,EAAE,SAF2B;AAGjC,SAAG,eAH8B;AAIjC,SAAG;AAJ8B,KAA7B,CAJD;AAUL,IAAA,UAVK;AAWL,IAAA,eAXK;AAYL,IAAA,aAZK;AAaL,IAAA,IAbK;AAcL,IAAA,QAdK;AAeL,IAAA,UAfK;AAgBL,IAAA,YAhBK;AAiBL,IAAA;AAjBK,GAAP;AAmBD,CA7FM;;AAAM,OAAA,CAAA,mBAAA,GAAmB,mBAAnB","sourcesContent":["import * as React from 'react';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport {\n getNativeElementProps,\n useConst,\n useControllableState,\n useEventCallback,\n useMergedRefs,\n} from '@fluentui/react-utilities';\nimport type { RegisterTabData, SelectTabData, SelectTabEvent, TabListProps, TabListState } from './TabList.types';\n\n/**\n * Create the state required to render TabList.\n *\n * The returned state can be modified with hooks such as useTabListStyles_unstable,\n * before being passed to renderTabList_unstable.\n *\n * @param props - props from this instance of TabList\n * @param ref - reference to root HTMLElement of TabList\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const useTabList_unstable = (props: TabListProps, ref: React.Ref<HTMLElement>): TabListState => {\n const { appearance = 'transparent', onTabSelect, size = 'medium', vertical = false } = props;\n\n const innerRef = React.useRef<HTMLElement>(null);\n\n const focusAttributes = useArrowNavigationGroup({ circular: true, axis: vertical ? 'vertical' : 'horizontal' });\n\n const [selectedValue, setSelectedValue] = useControllableState({\n state: props.selectedValue,\n defaultState: props.defaultSelectedValue,\n initialState: undefined,\n });\n\n const onSelect = useEventCallback((event: SelectTabEvent, data: SelectTabData) => {\n onTabSelect?.(event, data);\n setSelectedValue(data.value);\n });\n\n // provide force recalculation of the selection indicator rectangle\n const [calcRect, setCalcRect] = React.useState(0);\n const recalcRect = useConst(() => () => setCalcRect(value => ++value));\n\n // when this list or any tab resizes, recalculate the selection indicator rectangle\n const resizeObserver = React.useMemo(\n () =>\n new ResizeObserver(entries => {\n recalcRect();\n }),\n [recalcRect],\n );\n\n // observe this list for resize\n React.useEffect(() => {\n const currentRef = innerRef.current;\n currentRef && resizeObserver.observe(currentRef);\n\n return () => {\n currentRef && resizeObserver.unobserve(currentRef);\n };\n }, [resizeObserver]);\n\n // when tabs register their refs, observe them for resize\n const registeredTabs = React.useRef<Record<string, RegisterTabData>>({});\n\n const onRegister = useEventCallback((data: RegisterTabData) => {\n registeredTabs.current[JSON.stringify(data.value)] = data;\n data.ref?.current && resizeObserver.observe(data.ref.current);\n recalcRect();\n });\n\n const onUnregister = useEventCallback((data: RegisterTabData) => {\n delete registeredTabs.current[JSON.stringify(data.value)];\n data.ref?.current && resizeObserver.unobserve(data.ref.current);\n recalcRect();\n });\n\n // calculate the selection indicator rectangle\n const selectedTabRect = React.useMemo(() => {\n const listRect = innerRef.current?.getBoundingClientRect();\n const tabRef: React.Ref<HTMLElement> = registeredTabs.current[JSON.stringify(selectedValue)]?.ref;\n const tabRect = tabRef?.current?.getBoundingClientRect();\n\n if (listRect && tabRect) {\n return {\n x: tabRect.x - listRect.x,\n y: tabRect.y - listRect.y,\n width: tabRect.width,\n height: tabRect.height,\n };\n }\n // calcRect is used to force updates when registered tabs change or resize occurs\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [calcRect, selectedValue]);\n\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ref: useMergedRefs(ref, innerRef),\n role: 'tablist',\n ...focusAttributes,\n ...props,\n }),\n appearance,\n selectedTabRect,\n selectedValue,\n size,\n vertical,\n onRegister,\n onUnregister,\n onSelect,\n };\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
selectedValue: selectedKey,
|
|
12
|
+
onRegister,
|
|
13
|
+
onUnregister,
|
|
14
|
+
onSelect,
|
|
15
|
+
size,
|
|
16
|
+
vertical
|
|
17
|
+
} = state;
|
|
18
|
+
const tabList = {
|
|
19
|
+
appearance,
|
|
20
|
+
selectedValue: selectedKey,
|
|
21
|
+
onSelect,
|
|
22
|
+
onRegister,
|
|
23
|
+
onUnregister,
|
|
24
|
+
size,
|
|
25
|
+
vertical
|
|
26
|
+
};
|
|
27
|
+
return {
|
|
28
|
+
tabList
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
exports.useTabListContextValues = useTabListContextValues;
|
|
33
|
+
//# 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;AAAE,IAAA,UAAF;AAAc,IAAA,aAAa,EAAE,WAA7B;AAA0C,IAAA,UAA1C;AAAsD,IAAA,YAAtD;AAAoE,IAAA,QAApE;AAA8E,IAAA,IAA9E;AAAoF,IAAA;AAApF,MAAiG,KAAvG;AAEA,QAAM,OAAO,GAAwB;AACnC,IAAA,UADmC;AAEnC,IAAA,aAAa,EAAE,WAFoB;AAGnC,IAAA,QAHmC;AAInC,IAAA,UAJmC;AAKnC,IAAA,YALmC;AAMnC,IAAA,IANmC;AAOnC,IAAA;AAPmC,GAArC;AAUA,SAAO;AAAE,IAAA;AAAF,GAAP;AACD;;AAdD,OAAA,CAAA,uBAAA,GAAA,uBAAA","sourcesContent":["import { TabListContextValue, TabListContextValues, TabListState } from './TabList.types';\n\nexport function useTabListContextValues(state: TabListState): TabListContextValues {\n const { appearance, selectedValue: selectedKey, onRegister, onUnregister, onSelect, size, vertical } = state;\n\n const tabList: TabListContextValue = {\n appearance,\n selectedValue: selectedKey,\n onSelect,\n onRegister,\n onUnregister,\n size,\n vertical,\n };\n\n return { tabList };\n}\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useTabListStyles_unstable = exports.indicatorLengthVar = exports.indicatorOffsetVar = exports.tabListSelectionIndicatorName = exports.tabListClassName = void 0;
|
|
7
|
+
|
|
8
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
|
9
|
+
|
|
10
|
+
const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
|
|
11
|
+
|
|
12
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
13
|
+
|
|
14
|
+
const tab_constants_1 = /*#__PURE__*/require("../../tab.constants");
|
|
15
|
+
|
|
16
|
+
exports.tabListClassName = 'fui-TabList';
|
|
17
|
+
exports.tabListSelectionIndicatorName = 'fui-TabList_SelectionIndicator';
|
|
18
|
+
exports.indicatorOffsetVar = '--selection-indicator-offset';
|
|
19
|
+
exports.indicatorLengthVar = '--selection-indicator-length';
|
|
20
|
+
/**
|
|
21
|
+
* Styles for the root slot
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
const useStyles = /*#__PURE__*/react_1.__styles({
|
|
25
|
+
"root": {
|
|
26
|
+
"mc9l5x": "f22iagw",
|
|
27
|
+
"Beiy3e4": "f1063pyq",
|
|
28
|
+
"qhf8xq": "f10pi13n"
|
|
29
|
+
},
|
|
30
|
+
"vertical": {
|
|
31
|
+
"Beiy3e4": "f1vx9l62"
|
|
32
|
+
}
|
|
33
|
+
}, {
|
|
34
|
+
"d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1063pyq{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}", ".f10pi13n{position:relative;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}"]
|
|
35
|
+
});
|
|
36
|
+
/**
|
|
37
|
+
* Styles for the selection indicator slot when horizontal.
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
const useHorizontalIndicatorStyles = /*#__PURE__*/react_1.__styles({
|
|
42
|
+
"base": {
|
|
43
|
+
"Bkbwdz4": "f30248y",
|
|
44
|
+
"frdscb": ["fvxed1z", "f1j2a01o"],
|
|
45
|
+
"B9nohqn": ["f1j2a01o", "fvxed1z"],
|
|
46
|
+
"B1dhsta": ["fsamouo", "f1aazreq"],
|
|
47
|
+
"Bjdmjzx": ["f1aazreq", "fsamouo"],
|
|
48
|
+
"Bj55yzk": "fw2wsqs",
|
|
49
|
+
"oqd9ik": "ffdc0f3",
|
|
50
|
+
"Bs6t6z0": "fqc6z8f",
|
|
51
|
+
"mpb1vu": "f119hevp",
|
|
52
|
+
"jc51t6": ["f1uyszuw", "f1xp83vy"],
|
|
53
|
+
"Hdbjpj": "f11ef69",
|
|
54
|
+
"Biobvvw": "f1tzy5p2",
|
|
55
|
+
"Bunff0j": "fs357bs"
|
|
56
|
+
},
|
|
57
|
+
"small": {
|
|
58
|
+
"jc51t6": ["f1w3ykbk", "f1xm0lqg"],
|
|
59
|
+
"Biobvvw": "f1akpkq3"
|
|
60
|
+
},
|
|
61
|
+
"animated": {
|
|
62
|
+
"wbfbqe": ["fjzde92", "f1xfxhj5"],
|
|
63
|
+
"mafdb0": "f1fuwhvj"
|
|
64
|
+
}
|
|
65
|
+
}, {
|
|
66
|
+
"d": [".f30248y:after{background-color:var(--colorBrandStroke1);}", ".fvxed1z:after{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f1j2a01o:after{border-bottom-left-radius:var(--borderRadiusMedium);}", ".fsamouo:after{border-top-right-radius:var(--borderRadiusMedium);}", ".f1aazreq:after{border-top-left-radius:var(--borderRadiusMedium);}", ".fw2wsqs:after{bottom:0;}", ".ffdc0f3:after{box-sizing:border-box;}", ".fqc6z8f:after{content:\"\";}", ".f119hevp:after{height:2px;}", ".f1uyszuw:after{left:calc(var(--selection-indicator-offset) + 10px);}", ".f1xp83vy:after{right:calc(var(--selection-indicator-offset) + 10px);}", ".f11ef69:after{position:absolute;}", ".f1tzy5p2:after{width:calc(var(--selection-indicator-length) - (2 * 10px));}", ".fs357bs:after{z-index:1;}", ".f1w3ykbk:after{left:calc(var(--selection-indicator-offset) + 6px);}", ".f1xm0lqg:after{right:calc(var(--selection-indicator-offset) + 6px);}", ".f1akpkq3:after{width:calc(var(--selection-indicator-length) - (2 * 6px));}", ".fjzde92:after{transition-property:left,width;}", ".f1xfxhj5:after{transition-property:right,width;}", ".f1fuwhvj:after{transition-duration:350ms,350ms;}"]
|
|
67
|
+
});
|
|
68
|
+
/**
|
|
69
|
+
* Styles for the selection indicator slot when vertical.
|
|
70
|
+
*/
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
const useVerticalIndicatorStyles = /*#__PURE__*/react_1.__styles({
|
|
74
|
+
"base": {
|
|
75
|
+
"B1dvbpk": "fa05st",
|
|
76
|
+
"px8gyy": ["f16to4m4", "f1ceoihi"],
|
|
77
|
+
"B5c9fhp": ["f1ceoihi", "f16to4m4"],
|
|
78
|
+
"Bhe99jt": ["fkibbow", "fnlo9u7"],
|
|
79
|
+
"B2r1szc": ["fnlo9u7", "fkibbow"],
|
|
80
|
+
"Bmqnesq": "f170vdtw",
|
|
81
|
+
"rurcny": "fuzzvh5",
|
|
82
|
+
"Bbc2r3f": "f13xaayz",
|
|
83
|
+
"Byque4d": ["f1t0u0az", "fmlx6bj"],
|
|
84
|
+
"xx9plb": "fxf9f1y",
|
|
85
|
+
"Bf8kmfk": "fwt37qm",
|
|
86
|
+
"Bdn98qo": "f15bpuwh",
|
|
87
|
+
"Bab4cu6": "f1ijlm3k"
|
|
88
|
+
},
|
|
89
|
+
"small": {
|
|
90
|
+
"Bf8kmfk": "f8k0k00",
|
|
91
|
+
"Bbc2r3f": "fyephjl"
|
|
92
|
+
},
|
|
93
|
+
"animated": {
|
|
94
|
+
"iukgx1": "fcs48rj",
|
|
95
|
+
"B5szp9g": "f1u309tb"
|
|
96
|
+
}
|
|
97
|
+
}, {
|
|
98
|
+
"d": [".fa05st:before{background-color:var(--colorBrandStroke1);}", ".f16to4m4:before{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f1ceoihi:before{border-bottom-left-radius:var(--borderRadiusMedium);}", ".fkibbow:before{border-top-right-radius:var(--borderRadiusMedium);}", ".fnlo9u7:before{border-top-left-radius:var(--borderRadiusMedium);}", ".f170vdtw:before{box-sizing:border-box;}", ".fuzzvh5:before{content:\"\";}", ".f13xaayz:before{height:calc(var(--selection-indicator-length) - (2 * 10px));}", ".f1t0u0az:before{left:0;}", ".fmlx6bj:before{right:0;}", ".fxf9f1y:before{position:absolute;}", ".fwt37qm:before{top:calc(var(--selection-indicator-offset) + 10px);}", ".f15bpuwh:before{width:2px;}", ".f1ijlm3k:before{z-index:1;}", ".f8k0k00:before{top:calc(var(--selection-indicator-offset) + 6px);}", ".fyephjl:before{height:calc(var(--selection-indicator-length) - (2 * 6px));}", ".fcs48rj:before{transition-property:top,height;}", ".f1u309tb:before{transition-duration:350ms,350ms;}"]
|
|
99
|
+
});
|
|
100
|
+
/**
|
|
101
|
+
* Apply styling to the TabList slots based on the state
|
|
102
|
+
*/
|
|
103
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
const useTabListStyles_unstable = state => {
|
|
107
|
+
const {
|
|
108
|
+
selectedTabRect: selectionIndicatorRect,
|
|
109
|
+
selectedValue,
|
|
110
|
+
size,
|
|
111
|
+
vertical
|
|
112
|
+
} = state; // only animate when the selected value has changed
|
|
113
|
+
|
|
114
|
+
const previousSelectedValue = react_utilities_1.usePrevious(selectedValue);
|
|
115
|
+
const shouldAnimate = !!previousSelectedValue && previousSelectedValue !== selectedValue;
|
|
116
|
+
const styles = useStyles();
|
|
117
|
+
const horizontalIndicatorStyles = useHorizontalIndicatorStyles();
|
|
118
|
+
const verticalIndicatorStyles = useVerticalIndicatorStyles();
|
|
119
|
+
state.root.className = react_1.mergeClasses(exports.tabListClassName, styles.root, vertical && styles.vertical, !!selectedValue && (vertical ? verticalIndicatorStyles.base : horizontalIndicatorStyles.base), !!selectedValue && size === 'small' && (vertical ? verticalIndicatorStyles.small : horizontalIndicatorStyles.small), !!selectedValue && shouldAnimate && (vertical ? verticalIndicatorStyles.animated : horizontalIndicatorStyles.animated), state.root.className);
|
|
120
|
+
const rootCssVars = selectionIndicatorRect ? {
|
|
121
|
+
[exports.indicatorOffsetVar]: vertical ? `${selectionIndicatorRect.y}px` : `${selectionIndicatorRect.x}px`,
|
|
122
|
+
[exports.indicatorLengthVar]: vertical ? `${selectionIndicatorRect.height}px` : `${selectionIndicatorRect.width}px`
|
|
123
|
+
} : {};
|
|
124
|
+
state.root.style = { ...rootCssVars,
|
|
125
|
+
...state.root.style
|
|
126
|
+
};
|
|
127
|
+
return state;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
exports.useTabListStyles_unstable = useTabListStyles_unstable;
|
|
131
|
+
//# sourceMappingURL=useTabListStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/TabList/useTabListStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAEA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;;AAEa,OAAA,CAAA,gBAAA,GAAmB,aAAnB;AACA,OAAA,CAAA,6BAAA,GAAgC,gCAAhC;AAEA,OAAA,CAAA,kBAAA,GAAqB,8BAArB;AACA,OAAA,CAAA,kBAAA,GAAqB,8BAArB;AAEb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAWA;;AAEG;;;AACH,MAAM,4BAA4B,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAArC;AA6BA;;AAEG;;;AACH,MAAM,0BAA0B,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAnC;AA6BA;;AAEG;AACH;;;AACO,MA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,CAAC,KAAK;AAFzG,GADsC,GAKtC,EALJ;AAOA,EAAA,KAAK,CAAC,IAAN,CAAW,KAAX,GAAmB,EACjB,GAAG,WADc;AAEjB,OAAG,KAAK,CAAC,IAAN,CAAW;AAFG,GAAnB;AAKA,SAAO,KAAP;AACD,CApCM;;AAAM,OAAA,CAAA,yBAAA,GAAyB,yBAAzB","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { TabListState } from './TabList.types';\nimport { tokens } from '@fluentui/react-theme';\nimport { usePrevious } from '@fluentui/react-utilities';\nimport { tabPendingDesignTokens } from '../../tab.constants';\n\nexport const tabListClassName = 'fui-TabList';\nexport const tabListSelectionIndicatorName = 'fui-TabList_SelectionIndicator';\n\nexport const indicatorOffsetVar = '--selection-indicator-offset';\nexport const indicatorLengthVar = '--selection-indicator-length';\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n position: 'relative',\n },\n vertical: {\n flexDirection: 'column',\n },\n});\n\n/**\n * Styles for the selection indicator slot when horizontal.\n */\nconst useHorizontalIndicatorStyles = makeStyles({\n base: {\n ':after': {\n backgroundColor: tokens.colorBrandStroke1,\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n bottom: 0,\n boxSizing: 'border-box',\n content: '\"\"',\n height: tabPendingDesignTokens.indicatorThickness,\n left: `calc(var(${indicatorOffsetVar}) + ${tabPendingDesignTokens.tabPadding.medium})`,\n position: 'absolute',\n width: `calc(var(${indicatorLengthVar}) - (2 * ${tabPendingDesignTokens.tabPadding.medium}))`,\n zIndex: 1,\n },\n },\n small: {\n ':after': {\n left: `calc(var(${indicatorOffsetVar}) + ${tabPendingDesignTokens.tabPadding.small})`,\n width: `calc(var(${indicatorLengthVar}) - (2 * ${tabPendingDesignTokens.tabPadding.small}))`,\n },\n },\n animated: {\n ':after': {\n transitionProperty: 'left, width',\n transitionDuration: `350ms, 350ms`,\n },\n },\n});\n\n/**\n * Styles for the selection indicator slot when vertical.\n */\nconst useVerticalIndicatorStyles = makeStyles({\n base: {\n ':before': {\n backgroundColor: tokens.colorBrandStroke1,\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n boxSizing: 'border-box',\n content: '\"\"',\n height: `calc(var(${indicatorLengthVar}) - (2 * ${tabPendingDesignTokens.tabPadding.medium}))`,\n left: '0',\n position: 'absolute',\n top: `calc(var(${indicatorOffsetVar}) + ${tabPendingDesignTokens.tabPadding.medium})`,\n width: tabPendingDesignTokens.indicatorThickness,\n zIndex: 1,\n },\n },\n small: {\n ':before': {\n top: `calc(var(${indicatorOffsetVar}) + ${tabPendingDesignTokens.tabPadding.small})`,\n height: `calc(var(${indicatorLengthVar}) - (2 * ${tabPendingDesignTokens.tabPadding.small}))`,\n },\n },\n animated: {\n ':before': {\n transitionProperty: 'top, height',\n transitionDuration: `350ms, 350ms`,\n },\n },\n});\n\n/**\n * Apply styling to the TabList slots based on the state\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const useTabListStyles_unstable = (state: TabListState): TabListState => {\n const { selectedTabRect: selectionIndicatorRect, selectedValue, size, vertical } = state;\n\n // only animate when the selected value has changed\n const previousSelectedValue = usePrevious(selectedValue);\n const shouldAnimate = !!previousSelectedValue && previousSelectedValue !== selectedValue;\n\n const styles = useStyles();\n const horizontalIndicatorStyles = useHorizontalIndicatorStyles();\n const verticalIndicatorStyles = useVerticalIndicatorStyles();\n\n state.root.className = mergeClasses(\n tabListClassName,\n styles.root,\n vertical && styles.vertical,\n !!selectedValue && (vertical ? verticalIndicatorStyles.base : horizontalIndicatorStyles.base),\n !!selectedValue && size === 'small' && (vertical ? verticalIndicatorStyles.small : horizontalIndicatorStyles.small),\n !!selectedValue &&\n shouldAnimate &&\n (vertical ? verticalIndicatorStyles.animated : horizontalIndicatorStyles.animated),\n state.root.className,\n );\n\n const rootCssVars = selectionIndicatorRect\n ? {\n [indicatorOffsetVar]: vertical ? `${selectionIndicatorRect.y}px` : `${selectionIndicatorRect.x}px`,\n [indicatorLengthVar]: vertical ? `${selectionIndicatorRect.height}px` : `${selectionIndicatorRect.width}px`,\n }\n : {};\n\n state.root.style = {\n ...rootCssVars,\n ...state.root.style,\n };\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1,12 @@
|
|
|
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("./Tab"), exports);
|
|
10
|
+
|
|
11
|
+
tslib_1.__exportStar(require("./TabList"), exports);
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,OAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,WAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './Tab';\nexport * from './TabList';\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
|
@@ -0,0 +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/"}
|
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fluentui/react-tabs",
|
|
3
|
+
"version": "0.0.0-nightly2170ed575f20220223.1",
|
|
4
|
+
"description": "Fluent UI React tabs components",
|
|
5
|
+
"main": "lib-commonjs/index.js",
|
|
6
|
+
"module": "lib/index.js",
|
|
7
|
+
"typings": "lib/index.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/microsoft/fluentui"
|
|
12
|
+
},
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "just-scripts build",
|
|
16
|
+
"clean": "just-scripts clean",
|
|
17
|
+
"code-style": "just-scripts code-style",
|
|
18
|
+
"just": "just-scripts",
|
|
19
|
+
"lint": "just-scripts lint",
|
|
20
|
+
"start": "yarn storybook",
|
|
21
|
+
"test": "jest --passWithNoTests",
|
|
22
|
+
"docs": "api-extractor run --config=config/api-extractor.local.json --local",
|
|
23
|
+
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output ./dist/packages/react-tabs/src && yarn docs",
|
|
24
|
+
"storybook": "node ../../scripts/storybook/runner",
|
|
25
|
+
"type-check": "tsc -b tsconfig.json"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@fluentui/eslint-plugin": "*",
|
|
29
|
+
"@fluentui/react-conformance": "*",
|
|
30
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly2170ed575f20220223.1",
|
|
31
|
+
"@fluentui/react-context-selector": "0.0.0-nightly2170ed575f20220223.1",
|
|
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"
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@griffel/react": "1.0.0",
|
|
46
|
+
"@fluentui/react-tabster": "0.0.0-nightly2170ed575f20220223.1",
|
|
47
|
+
"@fluentui/react-utilities": "0.0.0-nightly2170ed575f20220223.1",
|
|
48
|
+
"tslib": "^2.1.0"
|
|
49
|
+
},
|
|
50
|
+
"peerDependencies": {
|
|
51
|
+
"@types/react": ">=16.8.0 <18.0.0",
|
|
52
|
+
"@types/react-dom": ">=16.8.0 <18.0.0",
|
|
53
|
+
"react": ">=16.8.0 <18.0.0",
|
|
54
|
+
"react-dom": ">=16.8.0 <18.0.0"
|
|
55
|
+
},
|
|
56
|
+
"beachball": {
|
|
57
|
+
"tag": "beta",
|
|
58
|
+
"disallowedChangeTypes": [
|
|
59
|
+
"major",
|
|
60
|
+
"minor",
|
|
61
|
+
"patch"
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
}
|