@ttoss/fsl-ui 0.2.4
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/LICENSE +21 -0
- package/README.md +76 -0
- package/dist/_virtual/_rolldown/runtime.cjs +30 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.cjs +129 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.cts +61 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.mts +61 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.mjs +126 -0
- package/dist/components/Button/Button.cjs +80 -0
- package/dist/components/Button/Button.d.cts +68 -0
- package/dist/components/Button/Button.d.mts +68 -0
- package/dist/components/Button/Button.mjs +79 -0
- package/dist/components/Checkbox/Checkbox.cjs +183 -0
- package/dist/components/Checkbox/Checkbox.d.cts +45 -0
- package/dist/components/Checkbox/Checkbox.d.mts +45 -0
- package/dist/components/Checkbox/Checkbox.mjs +182 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.cjs +97 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.d.cts +56 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.d.mts +56 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.mjs +96 -0
- package/dist/components/FileTrigger/FileTrigger.cjs +51 -0
- package/dist/components/FileTrigger/FileTrigger.d.cts +52 -0
- package/dist/components/FileTrigger/FileTrigger.d.mts +52 -0
- package/dist/components/FileTrigger/FileTrigger.mjs +50 -0
- package/dist/components/GridList/GridList.cjs +220 -0
- package/dist/components/GridList/GridList.d.cts +72 -0
- package/dist/components/GridList/GridList.d.mts +72 -0
- package/dist/components/GridList/GridList.mjs +217 -0
- package/dist/components/Group/Group.cjs +77 -0
- package/dist/components/Group/Group.d.cts +61 -0
- package/dist/components/Group/Group.d.mts +61 -0
- package/dist/components/Group/Group.mjs +74 -0
- package/dist/components/Icon/Icon.cjs +52 -0
- package/dist/components/Icon/Icon.mjs +52 -0
- package/dist/components/Icon/glyphs.cjs +72 -0
- package/dist/components/Icon/glyphs.mjs +63 -0
- package/dist/components/Link/Link.cjs +62 -0
- package/dist/components/Link/Link.d.cts +38 -0
- package/dist/components/Link/Link.d.mts +38 -0
- package/dist/components/Link/Link.mjs +61 -0
- package/dist/components/ListBox/ListBox.cjs +126 -0
- package/dist/components/ListBox/ListBox.d.cts +63 -0
- package/dist/components/ListBox/ListBox.d.mts +63 -0
- package/dist/components/ListBox/ListBox.mjs +123 -0
- package/dist/components/Meter/Meter.cjs +126 -0
- package/dist/components/Meter/Meter.d.cts +63 -0
- package/dist/components/Meter/Meter.d.mts +63 -0
- package/dist/components/Meter/Meter.mjs +125 -0
- package/dist/components/NumberField/NumberField.cjs +221 -0
- package/dist/components/NumberField/NumberField.d.cts +68 -0
- package/dist/components/NumberField/NumberField.d.mts +68 -0
- package/dist/components/NumberField/NumberField.mjs +220 -0
- package/dist/components/ProgressBar/ProgressBar.cjs +132 -0
- package/dist/components/ProgressBar/ProgressBar.d.cts +56 -0
- package/dist/components/ProgressBar/ProgressBar.d.mts +56 -0
- package/dist/components/ProgressBar/ProgressBar.mjs +129 -0
- package/dist/components/RadioGroup/RadioGroup.cjs +218 -0
- package/dist/components/RadioGroup/RadioGroup.d.cts +82 -0
- package/dist/components/RadioGroup/RadioGroup.d.mts +82 -0
- package/dist/components/RadioGroup/RadioGroup.mjs +215 -0
- package/dist/components/Select/Select.cjs +253 -0
- package/dist/components/Select/Select.d.cts +86 -0
- package/dist/components/Select/Select.d.mts +86 -0
- package/dist/components/Select/Select.mjs +250 -0
- package/dist/components/Separator/Separator.cjs +64 -0
- package/dist/components/Separator/Separator.d.cts +44 -0
- package/dist/components/Separator/Separator.d.mts +44 -0
- package/dist/components/Separator/Separator.mjs +63 -0
- package/dist/components/Slider/Slider.cjs +160 -0
- package/dist/components/Slider/Slider.d.cts +45 -0
- package/dist/components/Slider/Slider.d.mts +45 -0
- package/dist/components/Slider/Slider.mjs +159 -0
- package/dist/components/Switch/Switch.cjs +176 -0
- package/dist/components/Switch/Switch.d.cts +43 -0
- package/dist/components/Switch/Switch.d.mts +43 -0
- package/dist/components/Switch/Switch.mjs +175 -0
- package/dist/components/Tabs/Tabs.cjs +180 -0
- package/dist/components/Tabs/Tabs.d.cts +85 -0
- package/dist/components/Tabs/Tabs.d.mts +85 -0
- package/dist/components/Tabs/Tabs.mjs +173 -0
- package/dist/components/Toast/Toast.cjs +218 -0
- package/dist/components/Toast/Toast.d.cts +96 -0
- package/dist/components/Toast/Toast.d.mts +96 -0
- package/dist/components/Toast/Toast.mjs +214 -0
- package/dist/components/ToggleButton/ToggleButton.cjs +125 -0
- package/dist/components/ToggleButton/ToggleButton.d.cts +43 -0
- package/dist/components/ToggleButton/ToggleButton.d.mts +43 -0
- package/dist/components/ToggleButton/ToggleButton.mjs +124 -0
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.cjs +48 -0
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.d.cts +41 -0
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.d.mts +41 -0
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.mjs +47 -0
- package/dist/components/Toolbar/Toolbar.cjs +67 -0
- package/dist/components/Toolbar/Toolbar.d.cts +60 -0
- package/dist/components/Toolbar/Toolbar.d.mts +60 -0
- package/dist/components/Toolbar/Toolbar.mjs +66 -0
- package/dist/composites/Accordion/Accordion.cjs +279 -0
- package/dist/composites/Accordion/Accordion.d.cts +176 -0
- package/dist/composites/Accordion/Accordion.d.mts +176 -0
- package/dist/composites/Accordion/Accordion.mjs +270 -0
- package/dist/composites/ConfirmationDialog/ConfirmationDialog.cjs +206 -0
- package/dist/composites/ConfirmationDialog/ConfirmationDialog.d.cts +166 -0
- package/dist/composites/ConfirmationDialog/ConfirmationDialog.d.mts +166 -0
- package/dist/composites/ConfirmationDialog/ConfirmationDialog.mjs +203 -0
- package/dist/composites/Dialog/Dialog.cjs +372 -0
- package/dist/composites/Dialog/Dialog.d.cts +234 -0
- package/dist/composites/Dialog/Dialog.d.mts +234 -0
- package/dist/composites/Dialog/Dialog.mjs +360 -0
- package/dist/composites/Disclosure/Disclosure.cjs +214 -0
- package/dist/composites/Disclosure/Disclosure.d.cts +118 -0
- package/dist/composites/Disclosure/Disclosure.d.mts +118 -0
- package/dist/composites/Disclosure/Disclosure.mjs +207 -0
- package/dist/composites/Form/Form.cjs +161 -0
- package/dist/composites/Form/Form.d.cts +176 -0
- package/dist/composites/Form/Form.d.mts +176 -0
- package/dist/composites/Form/Form.mjs +156 -0
- package/dist/composites/Menu/Menu.cjs +190 -0
- package/dist/composites/Menu/Menu.d.cts +158 -0
- package/dist/composites/Menu/Menu.d.mts +158 -0
- package/dist/composites/Menu/Menu.mjs +186 -0
- package/dist/composites/Popover/Popover.cjs +80 -0
- package/dist/composites/Popover/Popover.d.cts +56 -0
- package/dist/composites/Popover/Popover.d.mts +56 -0
- package/dist/composites/Popover/Popover.mjs +78 -0
- package/dist/composites/SearchField/SearchField.cjs +194 -0
- package/dist/composites/SearchField/SearchField.d.cts +81 -0
- package/dist/composites/SearchField/SearchField.d.mts +81 -0
- package/dist/composites/SearchField/SearchField.mjs +189 -0
- package/dist/composites/TagGroup/TagGroup.cjs +212 -0
- package/dist/composites/TagGroup/TagGroup.d.cts +84 -0
- package/dist/composites/TagGroup/TagGroup.d.mts +84 -0
- package/dist/composites/TagGroup/TagGroup.mjs +209 -0
- package/dist/composites/TextArea/TextArea.cjs +190 -0
- package/dist/composites/TextArea/TextArea.d.cts +95 -0
- package/dist/composites/TextArea/TextArea.d.mts +95 -0
- package/dist/composites/TextArea/TextArea.mjs +181 -0
- package/dist/composites/TextField/TextField.cjs +200 -0
- package/dist/composites/TextField/TextField.d.cts +111 -0
- package/dist/composites/TextField/TextField.d.mts +111 -0
- package/dist/composites/TextField/TextField.mjs +191 -0
- package/dist/composites/Tooltip/Tooltip.cjs +79 -0
- package/dist/composites/Tooltip/Tooltip.d.cts +53 -0
- package/dist/composites/Tooltip/Tooltip.d.mts +53 -0
- package/dist/composites/Tooltip/Tooltip.mjs +77 -0
- package/dist/composites/Wizard/Wizard.cjs +333 -0
- package/dist/composites/Wizard/Wizard.d.cts +206 -0
- package/dist/composites/Wizard/Wizard.d.mts +206 -0
- package/dist/composites/Wizard/Wizard.mjs +324 -0
- package/dist/composites/scope.cjs +124 -0
- package/dist/composites/scope.mjs +121 -0
- package/dist/index.cjs +186 -0
- package/dist/index.d.cts +37 -0
- package/dist/index.d.mts +37 -0
- package/dist/index.mjs +39 -0
- package/dist/semantics/componentMeta.d.cts +37 -0
- package/dist/semantics/componentMeta.d.mts +37 -0
- package/dist/semantics/index.cjs +16 -0
- package/dist/semantics/index.d.cts +4 -0
- package/dist/semantics/index.d.mts +4 -0
- package/dist/semantics/index.mjs +3 -0
- package/dist/semantics/taxonomy.cjs +150 -0
- package/dist/semantics/taxonomy.d.cts +153 -0
- package/dist/semantics/taxonomy.d.mts +153 -0
- package/dist/semantics/taxonomy.mjs +140 -0
- package/dist/tokens/escapeHatch.cjs +13 -0
- package/dist/tokens/escapeHatch.mjs +13 -0
- package/dist/tokens/focusRing.cjs +28 -0
- package/dist/tokens/focusRing.mjs +28 -0
- package/dist/tokens/keyframes.cjs +76 -0
- package/dist/tokens/keyframes.mjs +75 -0
- package/dist/tokens/resolveInteractiveStyle.cjs +41 -0
- package/dist/tokens/resolveInteractiveStyle.mjs +41 -0
- package/llms.txt +142 -0
- package/package.json +70 -0
- package/src/tokens/CONTRACT.md +505 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
+
import { focusRingOutline } from "../../tokens/focusRing.mjs";
|
|
3
|
+
import { resolveInteractiveStyle } from "../../tokens/resolveInteractiveStyle.mjs";
|
|
4
|
+
import { vars } from "@ttoss/fsl-theme/vars";
|
|
5
|
+
import { Switch } from "react-aria-components";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/components/Switch/Switch.tsx
|
|
9
|
+
/** Formal semantic identity — Switch root (Selection entity, toggle.binary). */
|
|
10
|
+
var switchMeta = {
|
|
11
|
+
displayName: "Switch",
|
|
12
|
+
entity: "Selection",
|
|
13
|
+
structure: "root"
|
|
14
|
+
};
|
|
15
|
+
var TRACK_W = "2.5rem";
|
|
16
|
+
var TRACK_H = "1.5rem";
|
|
17
|
+
var THUMB_SIZE = "1.125rem";
|
|
18
|
+
var THUMB_OFFSET = "0.1875rem";
|
|
19
|
+
var TRACK_STYLE_STATIC = {
|
|
20
|
+
boxSizing: "border-box",
|
|
21
|
+
position: "relative",
|
|
22
|
+
flexShrink: 0,
|
|
23
|
+
display: "inline-block",
|
|
24
|
+
width: TRACK_W,
|
|
25
|
+
height: TRACK_H,
|
|
26
|
+
borderRadius: vars.radii.round,
|
|
27
|
+
borderWidth: vars.border.outline.control.width,
|
|
28
|
+
borderStyle: vars.border.outline.control.style,
|
|
29
|
+
transitionProperty: "background-color, border-color",
|
|
30
|
+
transitionDuration: vars.motion.feedback.duration,
|
|
31
|
+
transitionTimingFunction: vars.motion.feedback.easing,
|
|
32
|
+
outlineOffset: "2px"
|
|
33
|
+
};
|
|
34
|
+
/** Sliding-track style (state-dependent background/border + focus ring). */
|
|
35
|
+
var buildTrackStyle = ({
|
|
36
|
+
c,
|
|
37
|
+
isDisabled,
|
|
38
|
+
isSelected,
|
|
39
|
+
isHovered,
|
|
40
|
+
isPressed,
|
|
41
|
+
isFocusVisible
|
|
42
|
+
}) => {
|
|
43
|
+
return {
|
|
44
|
+
...TRACK_STYLE_STATIC,
|
|
45
|
+
backgroundColor: resolveInteractiveStyle(c?.background, {
|
|
46
|
+
isDisabled,
|
|
47
|
+
isSelected,
|
|
48
|
+
isHovered,
|
|
49
|
+
isPressed
|
|
50
|
+
}),
|
|
51
|
+
borderColor: resolveInteractiveStyle(c?.border, {
|
|
52
|
+
isDisabled,
|
|
53
|
+
isSelected,
|
|
54
|
+
isFocusVisible
|
|
55
|
+
}),
|
|
56
|
+
outline: focusRingOutline(isFocusVisible)
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Thumb color:
|
|
61
|
+
* ON → text.checked (typically neutral.0 = white on brand track)
|
|
62
|
+
* OFF → border.default (typically neutral.300 = visible on light track)
|
|
63
|
+
*/
|
|
64
|
+
var resolveThumbColor = ({
|
|
65
|
+
c,
|
|
66
|
+
isSelected
|
|
67
|
+
}) => {
|
|
68
|
+
const text = c?.text;
|
|
69
|
+
return isSelected ? text?.checked ?? text?.default : c?.border?.default;
|
|
70
|
+
};
|
|
71
|
+
/** Label color — disabled dominates default (Selection has no evaluation). */
|
|
72
|
+
var resolveLabelColor = ({
|
|
73
|
+
c,
|
|
74
|
+
isDisabled
|
|
75
|
+
}) => {
|
|
76
|
+
const text = c?.text;
|
|
77
|
+
return isDisabled ? text?.disabled : text?.default;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* A semantic on/off toggle built on React Aria's Switch.
|
|
81
|
+
*
|
|
82
|
+
* Entity = Selection → reads `vars.colors.input.primary.*`, radii: `round`
|
|
83
|
+
* (pill track + circular thumb), border: `outline.control`,
|
|
84
|
+
* sizing: `hit.base`, motion: `feedback`.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```tsx
|
|
88
|
+
* <Switch>Enable notifications</Switch>
|
|
89
|
+
* <Switch defaultSelected>Dark mode</Switch>
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
var Switch$1 = ({
|
|
93
|
+
children,
|
|
94
|
+
...props
|
|
95
|
+
}) => {
|
|
96
|
+
const c = vars.colors.input.primary;
|
|
97
|
+
return /* @__PURE__ */jsx(Switch, {
|
|
98
|
+
...props,
|
|
99
|
+
"data-scope": "switch",
|
|
100
|
+
"data-part": "root",
|
|
101
|
+
style: ({
|
|
102
|
+
isDisabled
|
|
103
|
+
}) => {
|
|
104
|
+
return {
|
|
105
|
+
boxSizing: "border-box",
|
|
106
|
+
display: "inline-flex",
|
|
107
|
+
alignItems: "center",
|
|
108
|
+
gap: vars.spacing.gap.inline.sm,
|
|
109
|
+
minHeight: vars.sizing.hit.base,
|
|
110
|
+
cursor: isDisabled ? "not-allowed" : "pointer",
|
|
111
|
+
opacity: isDisabled ? vars.opacity.disabled : void 0,
|
|
112
|
+
...vars.text.label.md,
|
|
113
|
+
color: isDisabled ? c?.text?.disabled : c?.text?.default
|
|
114
|
+
};
|
|
115
|
+
},
|
|
116
|
+
children: ({
|
|
117
|
+
isHovered,
|
|
118
|
+
isPressed,
|
|
119
|
+
isDisabled,
|
|
120
|
+
isFocusVisible,
|
|
121
|
+
isSelected
|
|
122
|
+
}) => {
|
|
123
|
+
const thumbInsetInlineStart = isSelected ? `calc(${TRACK_W} - ${THUMB_SIZE} - ${THUMB_OFFSET})` : THUMB_OFFSET;
|
|
124
|
+
return /* @__PURE__ */jsxs(Fragment, {
|
|
125
|
+
children: [/* @__PURE__ */jsx("span", {
|
|
126
|
+
"data-scope": "switch",
|
|
127
|
+
"data-part": "control",
|
|
128
|
+
"aria-hidden": true,
|
|
129
|
+
style: buildTrackStyle({
|
|
130
|
+
c,
|
|
131
|
+
isDisabled,
|
|
132
|
+
isSelected,
|
|
133
|
+
isHovered,
|
|
134
|
+
isPressed,
|
|
135
|
+
isFocusVisible
|
|
136
|
+
}),
|
|
137
|
+
children: /* @__PURE__ */jsx("span", {
|
|
138
|
+
"data-scope": "switch",
|
|
139
|
+
"data-part": "indicator",
|
|
140
|
+
"aria-hidden": true,
|
|
141
|
+
style: {
|
|
142
|
+
position: "absolute",
|
|
143
|
+
insetBlockStart: THUMB_OFFSET,
|
|
144
|
+
insetInlineStart: thumbInsetInlineStart,
|
|
145
|
+
width: THUMB_SIZE,
|
|
146
|
+
height: THUMB_SIZE,
|
|
147
|
+
borderRadius: vars.radii.round,
|
|
148
|
+
backgroundColor: resolveThumbColor({
|
|
149
|
+
c,
|
|
150
|
+
isSelected
|
|
151
|
+
}),
|
|
152
|
+
transitionProperty: "inset-inline-start, background-color",
|
|
153
|
+
transitionDuration: vars.motion.feedback.duration,
|
|
154
|
+
transitionTimingFunction: vars.motion.feedback.easing
|
|
155
|
+
}
|
|
156
|
+
})
|
|
157
|
+
}), children != null && /* @__PURE__ */jsx("span", {
|
|
158
|
+
"data-scope": "switch",
|
|
159
|
+
"data-part": "label",
|
|
160
|
+
style: {
|
|
161
|
+
color: resolveLabelColor({
|
|
162
|
+
c,
|
|
163
|
+
isDisabled
|
|
164
|
+
})
|
|
165
|
+
},
|
|
166
|
+
children
|
|
167
|
+
})]
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
};
|
|
172
|
+
Switch$1.displayName = switchMeta.displayName;
|
|
173
|
+
|
|
174
|
+
//#endregion
|
|
175
|
+
export { Switch$1 as Switch, switchMeta };
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
+
const require_focusRing = require('../../tokens/focusRing.cjs');
|
|
3
|
+
const require_resolveInteractiveStyle = require('../../tokens/resolveInteractiveStyle.cjs');
|
|
4
|
+
let _ttoss_fsl_theme_vars = require("@ttoss/fsl-theme/vars");
|
|
5
|
+
let react_aria_components = require("react-aria-components");
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
|
|
8
|
+
//#region src/components/Tabs/Tabs.tsx
|
|
9
|
+
/** Formal semantic identity — Tabs root (Navigation entity). */
|
|
10
|
+
var tabsMeta = {
|
|
11
|
+
displayName: "Tabs",
|
|
12
|
+
entity: "Navigation",
|
|
13
|
+
structure: "root"
|
|
14
|
+
};
|
|
15
|
+
/** Formal semantic identity — TabList (Navigation entity, control strip). */
|
|
16
|
+
var tabListMeta = {
|
|
17
|
+
displayName: "TabList",
|
|
18
|
+
entity: "Navigation",
|
|
19
|
+
structure: "control"
|
|
20
|
+
};
|
|
21
|
+
/** Formal semantic identity — Tab (Navigation entity, item). */
|
|
22
|
+
var tabMeta = {
|
|
23
|
+
displayName: "Tab",
|
|
24
|
+
entity: "Navigation",
|
|
25
|
+
structure: "item"
|
|
26
|
+
};
|
|
27
|
+
/** Formal semantic identity — TabPanel (Structure entity, content surface). */
|
|
28
|
+
var tabPanelMeta = {
|
|
29
|
+
displayName: "TabPanel",
|
|
30
|
+
entity: "Structure",
|
|
31
|
+
structure: "content"
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* A tabbed navigation widget (Navigation entity). Compose with `TabList` +
|
|
35
|
+
* `Tab` for the switcher and `TabPanel` for each view. React Aria manages
|
|
36
|
+
* selection, arrow-key navigation, and panel association.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```tsx
|
|
40
|
+
* <Tabs>
|
|
41
|
+
* <TabList aria-label="Sections">
|
|
42
|
+
* <Tab id="a">Overview</Tab>
|
|
43
|
+
* <Tab id="b">Details</Tab>
|
|
44
|
+
* </TabList>
|
|
45
|
+
* <TabPanel id="a">Overview content</TabPanel>
|
|
46
|
+
* <TabPanel id="b">Details content</TabPanel>
|
|
47
|
+
* </Tabs>
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
var Tabs = ({
|
|
51
|
+
orientation = "horizontal",
|
|
52
|
+
...props
|
|
53
|
+
}) => {
|
|
54
|
+
return /* @__PURE__ */(0, react_jsx_runtime.jsx)(react_aria_components.Tabs, {
|
|
55
|
+
...props,
|
|
56
|
+
orientation,
|
|
57
|
+
"data-scope": "tabs",
|
|
58
|
+
"data-part": "root",
|
|
59
|
+
style: {
|
|
60
|
+
boxSizing: "border-box",
|
|
61
|
+
display: "flex",
|
|
62
|
+
flexDirection: orientation === "vertical" ? "row" : "column",
|
|
63
|
+
gap: _ttoss_fsl_theme_vars.vars.spacing.gap.stack.sm
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
Tabs.displayName = tabsMeta.displayName;
|
|
68
|
+
/**
|
|
69
|
+
* The strip of tabs. Renders the `tablist` and lays the `Tab`s out in a row
|
|
70
|
+
* (or column when the parent `Tabs` is vertical).
|
|
71
|
+
*/
|
|
72
|
+
var TabList = props => {
|
|
73
|
+
return /* @__PURE__ */(0, react_jsx_runtime.jsx)(react_aria_components.TabList, {
|
|
74
|
+
...props,
|
|
75
|
+
"data-scope": "tabs",
|
|
76
|
+
"data-part": "control",
|
|
77
|
+
style: {
|
|
78
|
+
boxSizing: "border-box",
|
|
79
|
+
display: "flex",
|
|
80
|
+
gap: _ttoss_fsl_theme_vars.vars.spacing.gap.inline.sm,
|
|
81
|
+
borderBlockEndWidth: _ttoss_fsl_theme_vars.vars.border.divider.width,
|
|
82
|
+
borderBlockEndStyle: _ttoss_fsl_theme_vars.vars.border.divider.style,
|
|
83
|
+
borderBlockEndColor: _ttoss_fsl_theme_vars.vars.colors.navigation.muted?.border?.default ?? "transparent"
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
TabList.displayName = tabListMeta.displayName;
|
|
88
|
+
/**
|
|
89
|
+
* A single selectable tab. The selected tab reads the navigation `current`
|
|
90
|
+
* color and shows an underline indicator; others use hover/default.
|
|
91
|
+
*/
|
|
92
|
+
var Tab = props => {
|
|
93
|
+
const colors = _ttoss_fsl_theme_vars.vars.colors.navigation.primary;
|
|
94
|
+
return /* @__PURE__ */(0, react_jsx_runtime.jsx)(react_aria_components.Tab, {
|
|
95
|
+
...props,
|
|
96
|
+
"data-scope": "tabs",
|
|
97
|
+
"data-part": "item",
|
|
98
|
+
style: ({
|
|
99
|
+
isHovered,
|
|
100
|
+
isPressed,
|
|
101
|
+
isDisabled,
|
|
102
|
+
isFocusVisible,
|
|
103
|
+
isSelected
|
|
104
|
+
}) => {
|
|
105
|
+
const selectedColor = colors?.text?.current ?? colors?.text?.default;
|
|
106
|
+
return {
|
|
107
|
+
boxSizing: "border-box",
|
|
108
|
+
position: "relative",
|
|
109
|
+
display: "inline-flex",
|
|
110
|
+
alignItems: "center",
|
|
111
|
+
cursor: isDisabled ? "not-allowed" : "pointer",
|
|
112
|
+
paddingBlock: _ttoss_fsl_theme_vars.vars.spacing.inset.control.sm,
|
|
113
|
+
paddingInline: _ttoss_fsl_theme_vars.vars.spacing.inset.control.md,
|
|
114
|
+
..._ttoss_fsl_theme_vars.vars.text.label.md,
|
|
115
|
+
transitionDuration: _ttoss_fsl_theme_vars.vars.motion.feedback.duration,
|
|
116
|
+
transitionTimingFunction: _ttoss_fsl_theme_vars.vars.motion.feedback.easing,
|
|
117
|
+
transitionProperty: "color",
|
|
118
|
+
color: isSelected ? selectedColor : require_resolveInteractiveStyle.resolveInteractiveStyle(colors?.text, {
|
|
119
|
+
isHovered,
|
|
120
|
+
isPressed,
|
|
121
|
+
isDisabled
|
|
122
|
+
}),
|
|
123
|
+
outline: require_focusRing.focusRingOutline(isFocusVisible)
|
|
124
|
+
};
|
|
125
|
+
},
|
|
126
|
+
children: ({
|
|
127
|
+
isSelected
|
|
128
|
+
}) => {
|
|
129
|
+
return /* @__PURE__ */(0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, {
|
|
130
|
+
children: [props.children, isSelected && /* @__PURE__ */(0, react_jsx_runtime.jsx)("span", {
|
|
131
|
+
"data-scope": "tabs",
|
|
132
|
+
"data-part": "indicator",
|
|
133
|
+
"aria-hidden": true,
|
|
134
|
+
style: {
|
|
135
|
+
position: "absolute",
|
|
136
|
+
insetInlineStart: 0,
|
|
137
|
+
insetInlineEnd: 0,
|
|
138
|
+
insetBlockEnd: 0,
|
|
139
|
+
borderBlockEndWidth: _ttoss_fsl_theme_vars.vars.border.outline.selected.width,
|
|
140
|
+
borderBlockEndStyle: _ttoss_fsl_theme_vars.vars.border.outline.control.style,
|
|
141
|
+
borderBlockEndColor: _ttoss_fsl_theme_vars.vars.colors.navigation.primary?.border?.current ?? _ttoss_fsl_theme_vars.vars.colors.navigation.primary?.border?.default
|
|
142
|
+
}
|
|
143
|
+
})]
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
};
|
|
148
|
+
Tab.displayName = tabMeta.displayName;
|
|
149
|
+
/**
|
|
150
|
+
* The content region for one tab. Associated with its `Tab` by matching `id`.
|
|
151
|
+
*/
|
|
152
|
+
var TabPanel = props => {
|
|
153
|
+
return /* @__PURE__ */(0, react_jsx_runtime.jsx)(react_aria_components.TabPanel, {
|
|
154
|
+
...props,
|
|
155
|
+
"data-scope": "tabs",
|
|
156
|
+
"data-part": "content",
|
|
157
|
+
style: ({
|
|
158
|
+
isFocusVisible
|
|
159
|
+
}) => {
|
|
160
|
+
return {
|
|
161
|
+
boxSizing: "border-box",
|
|
162
|
+
paddingBlock: _ttoss_fsl_theme_vars.vars.spacing.inset.surface.sm,
|
|
163
|
+
..._ttoss_fsl_theme_vars.vars.text.body.md,
|
|
164
|
+
color: _ttoss_fsl_theme_vars.vars.colors.informational.primary?.text?.default,
|
|
165
|
+
outline: require_focusRing.focusRingOutline(isFocusVisible)
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
};
|
|
170
|
+
TabPanel.displayName = tabPanelMeta.displayName;
|
|
171
|
+
|
|
172
|
+
//#endregion
|
|
173
|
+
exports.Tab = Tab;
|
|
174
|
+
exports.TabList = TabList;
|
|
175
|
+
exports.TabPanel = TabPanel;
|
|
176
|
+
exports.Tabs = Tabs;
|
|
177
|
+
exports.tabListMeta = tabListMeta;
|
|
178
|
+
exports.tabMeta = tabMeta;
|
|
179
|
+
exports.tabPanelMeta = tabPanelMeta;
|
|
180
|
+
exports.tabsMeta = tabsMeta;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
|
|
2
|
+
import { TabListProps, TabPanelProps, TabProps, TabsProps } from "react-aria-components";
|
|
3
|
+
|
|
4
|
+
//#region src/components/Tabs/Tabs.d.ts
|
|
5
|
+
/** Formal semantic identity — Tabs root (Navigation entity). */
|
|
6
|
+
declare const tabsMeta: {
|
|
7
|
+
readonly displayName: "Tabs";
|
|
8
|
+
readonly entity: "Navigation";
|
|
9
|
+
readonly structure: "root";
|
|
10
|
+
};
|
|
11
|
+
/** Formal semantic identity — TabList (Navigation entity, control strip). */
|
|
12
|
+
declare const tabListMeta: {
|
|
13
|
+
readonly displayName: "TabList";
|
|
14
|
+
readonly entity: "Navigation";
|
|
15
|
+
readonly structure: "control";
|
|
16
|
+
};
|
|
17
|
+
/** Formal semantic identity — Tab (Navigation entity, item). */
|
|
18
|
+
declare const tabMeta: {
|
|
19
|
+
readonly displayName: "Tab";
|
|
20
|
+
readonly entity: "Navigation";
|
|
21
|
+
readonly structure: "item";
|
|
22
|
+
};
|
|
23
|
+
/** Formal semantic identity — TabPanel (Structure entity, content surface). */
|
|
24
|
+
declare const tabPanelMeta: {
|
|
25
|
+
readonly displayName: "TabPanel";
|
|
26
|
+
readonly entity: "Structure";
|
|
27
|
+
readonly structure: "content";
|
|
28
|
+
};
|
|
29
|
+
/** Props for the Tabs root. */
|
|
30
|
+
type TabsProps$1 = Omit<TabsProps, 'style'>;
|
|
31
|
+
/**
|
|
32
|
+
* A tabbed navigation widget (Navigation entity). Compose with `TabList` +
|
|
33
|
+
* `Tab` for the switcher and `TabPanel` for each view. React Aria manages
|
|
34
|
+
* selection, arrow-key navigation, and panel association.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```tsx
|
|
38
|
+
* <Tabs>
|
|
39
|
+
* <TabList aria-label="Sections">
|
|
40
|
+
* <Tab id="a">Overview</Tab>
|
|
41
|
+
* <Tab id="b">Details</Tab>
|
|
42
|
+
* </TabList>
|
|
43
|
+
* <TabPanel id="a">Overview content</TabPanel>
|
|
44
|
+
* <TabPanel id="b">Details content</TabPanel>
|
|
45
|
+
* </Tabs>
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
declare const Tabs: {
|
|
49
|
+
({
|
|
50
|
+
orientation,
|
|
51
|
+
...props
|
|
52
|
+
}: TabsProps$1): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
displayName: "Tabs";
|
|
54
|
+
};
|
|
55
|
+
/** Props for the TabList control strip. */
|
|
56
|
+
type TabListProps$1<T extends object = object> = Omit<TabListProps<T>, 'style'>;
|
|
57
|
+
/**
|
|
58
|
+
* The strip of tabs. Renders the `tablist` and lays the `Tab`s out in a row
|
|
59
|
+
* (or column when the parent `Tabs` is vertical).
|
|
60
|
+
*/
|
|
61
|
+
declare const TabList: {
|
|
62
|
+
<T extends object = object>(props: TabListProps$1<T>): import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
displayName: "TabList";
|
|
64
|
+
};
|
|
65
|
+
/** Props for a single Tab. */
|
|
66
|
+
type TabProps$1 = Omit<TabProps, 'style'>;
|
|
67
|
+
/**
|
|
68
|
+
* A single selectable tab. The selected tab reads the navigation `current`
|
|
69
|
+
* color and shows an underline indicator; others use hover/default.
|
|
70
|
+
*/
|
|
71
|
+
declare const Tab: {
|
|
72
|
+
(props: TabProps$1): import("react/jsx-runtime").JSX.Element;
|
|
73
|
+
displayName: "Tab";
|
|
74
|
+
};
|
|
75
|
+
/** Props for a TabPanel. */
|
|
76
|
+
type TabPanelProps$1 = Omit<TabPanelProps, 'style'>;
|
|
77
|
+
/**
|
|
78
|
+
* The content region for one tab. Associated with its `Tab` by matching `id`.
|
|
79
|
+
*/
|
|
80
|
+
declare const TabPanel: {
|
|
81
|
+
(props: TabPanelProps$1): import("react/jsx-runtime").JSX.Element;
|
|
82
|
+
displayName: "TabPanel";
|
|
83
|
+
};
|
|
84
|
+
//#endregion
|
|
85
|
+
export { Tab, TabList, TabListProps$1 as TabListProps, TabPanel, TabPanelProps$1 as TabPanelProps, TabProps$1 as TabProps, Tabs, TabsProps$1 as TabsProps, tabListMeta, tabMeta, tabPanelMeta, tabsMeta };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
|
|
2
|
+
import { TabListProps, TabPanelProps, TabProps, TabsProps } from "react-aria-components";
|
|
3
|
+
|
|
4
|
+
//#region src/components/Tabs/Tabs.d.ts
|
|
5
|
+
/** Formal semantic identity — Tabs root (Navigation entity). */
|
|
6
|
+
declare const tabsMeta: {
|
|
7
|
+
readonly displayName: "Tabs";
|
|
8
|
+
readonly entity: "Navigation";
|
|
9
|
+
readonly structure: "root";
|
|
10
|
+
};
|
|
11
|
+
/** Formal semantic identity — TabList (Navigation entity, control strip). */
|
|
12
|
+
declare const tabListMeta: {
|
|
13
|
+
readonly displayName: "TabList";
|
|
14
|
+
readonly entity: "Navigation";
|
|
15
|
+
readonly structure: "control";
|
|
16
|
+
};
|
|
17
|
+
/** Formal semantic identity — Tab (Navigation entity, item). */
|
|
18
|
+
declare const tabMeta: {
|
|
19
|
+
readonly displayName: "Tab";
|
|
20
|
+
readonly entity: "Navigation";
|
|
21
|
+
readonly structure: "item";
|
|
22
|
+
};
|
|
23
|
+
/** Formal semantic identity — TabPanel (Structure entity, content surface). */
|
|
24
|
+
declare const tabPanelMeta: {
|
|
25
|
+
readonly displayName: "TabPanel";
|
|
26
|
+
readonly entity: "Structure";
|
|
27
|
+
readonly structure: "content";
|
|
28
|
+
};
|
|
29
|
+
/** Props for the Tabs root. */
|
|
30
|
+
type TabsProps$1 = Omit<TabsProps, 'style'>;
|
|
31
|
+
/**
|
|
32
|
+
* A tabbed navigation widget (Navigation entity). Compose with `TabList` +
|
|
33
|
+
* `Tab` for the switcher and `TabPanel` for each view. React Aria manages
|
|
34
|
+
* selection, arrow-key navigation, and panel association.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```tsx
|
|
38
|
+
* <Tabs>
|
|
39
|
+
* <TabList aria-label="Sections">
|
|
40
|
+
* <Tab id="a">Overview</Tab>
|
|
41
|
+
* <Tab id="b">Details</Tab>
|
|
42
|
+
* </TabList>
|
|
43
|
+
* <TabPanel id="a">Overview content</TabPanel>
|
|
44
|
+
* <TabPanel id="b">Details content</TabPanel>
|
|
45
|
+
* </Tabs>
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
declare const Tabs$1: {
|
|
49
|
+
({
|
|
50
|
+
orientation,
|
|
51
|
+
...props
|
|
52
|
+
}: TabsProps$1): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
displayName: "Tabs";
|
|
54
|
+
};
|
|
55
|
+
/** Props for the TabList control strip. */
|
|
56
|
+
type TabListProps$1<T extends object = object> = Omit<TabListProps<T>, 'style'>;
|
|
57
|
+
/**
|
|
58
|
+
* The strip of tabs. Renders the `tablist` and lays the `Tab`s out in a row
|
|
59
|
+
* (or column when the parent `Tabs` is vertical).
|
|
60
|
+
*/
|
|
61
|
+
declare const TabList$1: {
|
|
62
|
+
<T extends object = object>(props: TabListProps$1<T>): import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
displayName: "TabList";
|
|
64
|
+
};
|
|
65
|
+
/** Props for a single Tab. */
|
|
66
|
+
type TabProps$1 = Omit<TabProps, 'style'>;
|
|
67
|
+
/**
|
|
68
|
+
* A single selectable tab. The selected tab reads the navigation `current`
|
|
69
|
+
* color and shows an underline indicator; others use hover/default.
|
|
70
|
+
*/
|
|
71
|
+
declare const Tab$1: {
|
|
72
|
+
(props: TabProps$1): import("react/jsx-runtime").JSX.Element;
|
|
73
|
+
displayName: "Tab";
|
|
74
|
+
};
|
|
75
|
+
/** Props for a TabPanel. */
|
|
76
|
+
type TabPanelProps$1 = Omit<TabPanelProps, 'style'>;
|
|
77
|
+
/**
|
|
78
|
+
* The content region for one tab. Associated with its `Tab` by matching `id`.
|
|
79
|
+
*/
|
|
80
|
+
declare const TabPanel$1: {
|
|
81
|
+
(props: TabPanelProps$1): import("react/jsx-runtime").JSX.Element;
|
|
82
|
+
displayName: "TabPanel";
|
|
83
|
+
};
|
|
84
|
+
//#endregion
|
|
85
|
+
export { Tab$1 as Tab, TabList$1 as TabList, TabListProps$1 as TabListProps, TabPanel$1 as TabPanel, TabPanelProps$1 as TabPanelProps, TabProps$1 as TabProps, Tabs$1 as Tabs, TabsProps$1 as TabsProps, tabListMeta, tabMeta, tabPanelMeta, tabsMeta };
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
+
import { focusRingOutline } from "../../tokens/focusRing.mjs";
|
|
3
|
+
import { resolveInteractiveStyle } from "../../tokens/resolveInteractiveStyle.mjs";
|
|
4
|
+
import { vars } from "@ttoss/fsl-theme/vars";
|
|
5
|
+
import { Tab, TabList, TabPanel, Tabs } from "react-aria-components";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/components/Tabs/Tabs.tsx
|
|
9
|
+
/** Formal semantic identity — Tabs root (Navigation entity). */
|
|
10
|
+
var tabsMeta = {
|
|
11
|
+
displayName: "Tabs",
|
|
12
|
+
entity: "Navigation",
|
|
13
|
+
structure: "root"
|
|
14
|
+
};
|
|
15
|
+
/** Formal semantic identity — TabList (Navigation entity, control strip). */
|
|
16
|
+
var tabListMeta = {
|
|
17
|
+
displayName: "TabList",
|
|
18
|
+
entity: "Navigation",
|
|
19
|
+
structure: "control"
|
|
20
|
+
};
|
|
21
|
+
/** Formal semantic identity — Tab (Navigation entity, item). */
|
|
22
|
+
var tabMeta = {
|
|
23
|
+
displayName: "Tab",
|
|
24
|
+
entity: "Navigation",
|
|
25
|
+
structure: "item"
|
|
26
|
+
};
|
|
27
|
+
/** Formal semantic identity — TabPanel (Structure entity, content surface). */
|
|
28
|
+
var tabPanelMeta = {
|
|
29
|
+
displayName: "TabPanel",
|
|
30
|
+
entity: "Structure",
|
|
31
|
+
structure: "content"
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* A tabbed navigation widget (Navigation entity). Compose with `TabList` +
|
|
35
|
+
* `Tab` for the switcher and `TabPanel` for each view. React Aria manages
|
|
36
|
+
* selection, arrow-key navigation, and panel association.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```tsx
|
|
40
|
+
* <Tabs>
|
|
41
|
+
* <TabList aria-label="Sections">
|
|
42
|
+
* <Tab id="a">Overview</Tab>
|
|
43
|
+
* <Tab id="b">Details</Tab>
|
|
44
|
+
* </TabList>
|
|
45
|
+
* <TabPanel id="a">Overview content</TabPanel>
|
|
46
|
+
* <TabPanel id="b">Details content</TabPanel>
|
|
47
|
+
* </Tabs>
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
var Tabs$1 = ({
|
|
51
|
+
orientation = "horizontal",
|
|
52
|
+
...props
|
|
53
|
+
}) => {
|
|
54
|
+
return /* @__PURE__ */jsx(Tabs, {
|
|
55
|
+
...props,
|
|
56
|
+
orientation,
|
|
57
|
+
"data-scope": "tabs",
|
|
58
|
+
"data-part": "root",
|
|
59
|
+
style: {
|
|
60
|
+
boxSizing: "border-box",
|
|
61
|
+
display: "flex",
|
|
62
|
+
flexDirection: orientation === "vertical" ? "row" : "column",
|
|
63
|
+
gap: vars.spacing.gap.stack.sm
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
Tabs$1.displayName = tabsMeta.displayName;
|
|
68
|
+
/**
|
|
69
|
+
* The strip of tabs. Renders the `tablist` and lays the `Tab`s out in a row
|
|
70
|
+
* (or column when the parent `Tabs` is vertical).
|
|
71
|
+
*/
|
|
72
|
+
var TabList$1 = props => {
|
|
73
|
+
return /* @__PURE__ */jsx(TabList, {
|
|
74
|
+
...props,
|
|
75
|
+
"data-scope": "tabs",
|
|
76
|
+
"data-part": "control",
|
|
77
|
+
style: {
|
|
78
|
+
boxSizing: "border-box",
|
|
79
|
+
display: "flex",
|
|
80
|
+
gap: vars.spacing.gap.inline.sm,
|
|
81
|
+
borderBlockEndWidth: vars.border.divider.width,
|
|
82
|
+
borderBlockEndStyle: vars.border.divider.style,
|
|
83
|
+
borderBlockEndColor: vars.colors.navigation.muted?.border?.default ?? "transparent"
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
TabList$1.displayName = tabListMeta.displayName;
|
|
88
|
+
/**
|
|
89
|
+
* A single selectable tab. The selected tab reads the navigation `current`
|
|
90
|
+
* color and shows an underline indicator; others use hover/default.
|
|
91
|
+
*/
|
|
92
|
+
var Tab$1 = props => {
|
|
93
|
+
const colors = vars.colors.navigation.primary;
|
|
94
|
+
return /* @__PURE__ */jsx(Tab, {
|
|
95
|
+
...props,
|
|
96
|
+
"data-scope": "tabs",
|
|
97
|
+
"data-part": "item",
|
|
98
|
+
style: ({
|
|
99
|
+
isHovered,
|
|
100
|
+
isPressed,
|
|
101
|
+
isDisabled,
|
|
102
|
+
isFocusVisible,
|
|
103
|
+
isSelected
|
|
104
|
+
}) => {
|
|
105
|
+
const selectedColor = colors?.text?.current ?? colors?.text?.default;
|
|
106
|
+
return {
|
|
107
|
+
boxSizing: "border-box",
|
|
108
|
+
position: "relative",
|
|
109
|
+
display: "inline-flex",
|
|
110
|
+
alignItems: "center",
|
|
111
|
+
cursor: isDisabled ? "not-allowed" : "pointer",
|
|
112
|
+
paddingBlock: vars.spacing.inset.control.sm,
|
|
113
|
+
paddingInline: vars.spacing.inset.control.md,
|
|
114
|
+
...vars.text.label.md,
|
|
115
|
+
transitionDuration: vars.motion.feedback.duration,
|
|
116
|
+
transitionTimingFunction: vars.motion.feedback.easing,
|
|
117
|
+
transitionProperty: "color",
|
|
118
|
+
color: isSelected ? selectedColor : resolveInteractiveStyle(colors?.text, {
|
|
119
|
+
isHovered,
|
|
120
|
+
isPressed,
|
|
121
|
+
isDisabled
|
|
122
|
+
}),
|
|
123
|
+
outline: focusRingOutline(isFocusVisible)
|
|
124
|
+
};
|
|
125
|
+
},
|
|
126
|
+
children: ({
|
|
127
|
+
isSelected
|
|
128
|
+
}) => {
|
|
129
|
+
return /* @__PURE__ */jsxs(Fragment, {
|
|
130
|
+
children: [props.children, isSelected && /* @__PURE__ */jsx("span", {
|
|
131
|
+
"data-scope": "tabs",
|
|
132
|
+
"data-part": "indicator",
|
|
133
|
+
"aria-hidden": true,
|
|
134
|
+
style: {
|
|
135
|
+
position: "absolute",
|
|
136
|
+
insetInlineStart: 0,
|
|
137
|
+
insetInlineEnd: 0,
|
|
138
|
+
insetBlockEnd: 0,
|
|
139
|
+
borderBlockEndWidth: vars.border.outline.selected.width,
|
|
140
|
+
borderBlockEndStyle: vars.border.outline.control.style,
|
|
141
|
+
borderBlockEndColor: vars.colors.navigation.primary?.border?.current ?? vars.colors.navigation.primary?.border?.default
|
|
142
|
+
}
|
|
143
|
+
})]
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
};
|
|
148
|
+
Tab$1.displayName = tabMeta.displayName;
|
|
149
|
+
/**
|
|
150
|
+
* The content region for one tab. Associated with its `Tab` by matching `id`.
|
|
151
|
+
*/
|
|
152
|
+
var TabPanel$1 = props => {
|
|
153
|
+
return /* @__PURE__ */jsx(TabPanel, {
|
|
154
|
+
...props,
|
|
155
|
+
"data-scope": "tabs",
|
|
156
|
+
"data-part": "content",
|
|
157
|
+
style: ({
|
|
158
|
+
isFocusVisible
|
|
159
|
+
}) => {
|
|
160
|
+
return {
|
|
161
|
+
boxSizing: "border-box",
|
|
162
|
+
paddingBlock: vars.spacing.inset.surface.sm,
|
|
163
|
+
...vars.text.body.md,
|
|
164
|
+
color: vars.colors.informational.primary?.text?.default,
|
|
165
|
+
outline: focusRingOutline(isFocusVisible)
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
};
|
|
170
|
+
TabPanel$1.displayName = tabPanelMeta.displayName;
|
|
171
|
+
|
|
172
|
+
//#endregion
|
|
173
|
+
export { Tab$1 as Tab, TabList$1 as TabList, TabPanel$1 as TabPanel, Tabs$1 as Tabs, tabListMeta, tabMeta, tabPanelMeta, tabsMeta };
|