@stratakit/structures 0.1.0 → 0.1.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.
@@ -0,0 +1,42 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Role } from "@ariakit/react/role";
3
+ import { IconButton } from "@stratakit/bricks";
4
+ import { forwardRef } from "@stratakit/foundations/secret-internals";
5
+ import cx from "classnames";
6
+ import * as React from "react";
7
+ import { Dismiss } from "./~utils.icons.js";
8
+ const Chip = forwardRef((props, forwardedRef) => {
9
+ const { variant = "solid", onDismiss, label, ...rest } = props;
10
+ const baseId = React.useId();
11
+ const labelId = `${baseId}-label`;
12
+ const dismissIconId = `${baseId}-dismiss`;
13
+ return /* @__PURE__ */ jsxs(
14
+ Role.div,
15
+ {
16
+ "data-kiwi-variant": variant,
17
+ ...rest,
18
+ className: cx("\u{1F95D}-chip", props.className),
19
+ ref: forwardedRef,
20
+ children: [
21
+ /* @__PURE__ */ jsx("span", { id: labelId, children: label }),
22
+ onDismiss && /* @__PURE__ */ jsx(
23
+ IconButton,
24
+ {
25
+ id: dismissIconId,
26
+ className: "\u{1F95D}-chip-dismiss-button",
27
+ variant: "ghost",
28
+ "aria-labelledby": `${dismissIconId} ${labelId}`,
29
+ label: "Dismiss",
30
+ labelVariant: "visually-hidden",
31
+ icon: /* @__PURE__ */ jsx(Dismiss, {}),
32
+ onClick: onDismiss
33
+ }
34
+ )
35
+ ]
36
+ }
37
+ );
38
+ });
39
+ DEV: Chip.displayName = "Chip";
40
+ export {
41
+ Chip
42
+ };
@@ -0,0 +1,235 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Button as ButtonAk } from "@ariakit/react/button";
3
+ import {
4
+ Menu,
5
+ MenuButton,
6
+ MenuItem,
7
+ MenuItemCheckbox,
8
+ MenuProvider,
9
+ useMenuContext
10
+ } from "@ariakit/react/menu";
11
+ import { usePopoverContext } from "@ariakit/react/popover";
12
+ import { useStoreState } from "@ariakit/react/store";
13
+ import { Button, Kbd } from "@stratakit/bricks";
14
+ import {
15
+ DisclosureArrow,
16
+ Dot,
17
+ predefinedSymbols
18
+ } from "@stratakit/bricks/secret-internals";
19
+ import { Icon } from "@stratakit/foundations";
20
+ import {
21
+ forwardRef,
22
+ usePopoverApi
23
+ } from "@stratakit/foundations/secret-internals";
24
+ import cx from "classnames";
25
+ import * as React from "react";
26
+ import * as ListItem from "./~utils.ListItem.js";
27
+ import { Checkmark } from "./~utils.icons.js";
28
+ function DropdownMenuRoot(props) {
29
+ const {
30
+ children,
31
+ placement,
32
+ open: openProp,
33
+ setOpen: setOpenProp,
34
+ defaultOpen: defaultOpenProp
35
+ } = props;
36
+ return /* @__PURE__ */ jsx(
37
+ MenuProvider,
38
+ {
39
+ placement,
40
+ defaultOpen: defaultOpenProp,
41
+ open: openProp,
42
+ setOpen: setOpenProp,
43
+ popover: usePopoverContext(),
44
+ children
45
+ }
46
+ );
47
+ }
48
+ DEV: DropdownMenuRoot.displayName = "DropdownMenu.Root";
49
+ const DropdownMenuContent = forwardRef(
50
+ (props, forwardedRef) => {
51
+ const popover = usePopoverApi(useMenuContext());
52
+ return /* @__PURE__ */ jsx(
53
+ Menu,
54
+ {
55
+ portal: true,
56
+ unmountOnHide: true,
57
+ ...props,
58
+ gutter: 4,
59
+ style: { ...popover.style, ...props.style },
60
+ wrapperProps: popover.wrapperProps,
61
+ className: cx("\u{1F95D}-dropdown-menu", props.className),
62
+ ref: forwardedRef
63
+ }
64
+ );
65
+ }
66
+ );
67
+ DEV: DropdownMenuContent.displayName = "DropdownMenu.Content";
68
+ const DropdownMenuButton = forwardRef(
69
+ (props, forwardedRef) => {
70
+ const { accessibleWhenDisabled = true, children, ...rest } = props;
71
+ const open = useStoreState(useMenuContext(), (state) => state?.open);
72
+ return /* @__PURE__ */ jsx(
73
+ MenuButton,
74
+ {
75
+ accessibleWhenDisabled: true,
76
+ render: /* @__PURE__ */ jsxs(Button, { accessibleWhenDisabled, children: [
77
+ children,
78
+ /* @__PURE__ */ jsx(DisclosureArrow, {})
79
+ ] }),
80
+ ...rest,
81
+ className: cx("\u{1F95D}-dropdown-menu-button", props.className),
82
+ "data-has-popover-open": open || void 0,
83
+ ref: forwardedRef
84
+ }
85
+ );
86
+ }
87
+ );
88
+ DEV: DropdownMenuButton.displayName = "DropdownMenu.Button";
89
+ const DropdownMenuItem = forwardRef(
90
+ (props, forwardedRef) => {
91
+ const { label, shortcuts, icon, unstable_dot, ...rest } = props;
92
+ const dotId = React.useId();
93
+ return /* @__PURE__ */ jsxs(
94
+ MenuItem,
95
+ {
96
+ accessibleWhenDisabled: true,
97
+ render: /* @__PURE__ */ jsx(
98
+ ListItem.Root,
99
+ {
100
+ render: /* @__PURE__ */ jsx(
101
+ ButtonAk,
102
+ {
103
+ accessibleWhenDisabled: true,
104
+ "aria-describedby": dotId,
105
+ ...rest,
106
+ className: cx("\u{1F95D}-dropdown-menu-item", props.className),
107
+ ref: forwardedRef
108
+ }
109
+ )
110
+ }
111
+ ),
112
+ children: [
113
+ icon ? /* @__PURE__ */ jsx(DropdownMenuIcon, { icon }) : null,
114
+ /* @__PURE__ */ jsx(ListItem.Content, { render: /* @__PURE__ */ jsx("span", {}), children: label }),
115
+ shortcuts ? /* @__PURE__ */ jsx(DropdownMenuItemShortcuts, { shortcuts }) : null,
116
+ unstable_dot ? /* @__PURE__ */ jsx(
117
+ ListItem.Decoration,
118
+ {
119
+ render: /* @__PURE__ */ jsx(Dot, { id: dotId, className: "\u{1F95D}-dropdown-menu-item-dot", children: unstable_dot })
120
+ }
121
+ ) : null
122
+ ]
123
+ }
124
+ );
125
+ }
126
+ );
127
+ DEV: DropdownMenuItem.displayName = "DropdownMenu.Item";
128
+ const DropdownMenuItemShortcuts = forwardRef((props, forwardedRef) => {
129
+ const { shortcuts, ...rest } = props;
130
+ const shortcutKeys = React.useMemo(() => {
131
+ return shortcuts.split("+").map((key) => ({
132
+ key: key.trim(),
133
+ isSymbol: key in predefinedSymbols
134
+ }));
135
+ }, [shortcuts]);
136
+ return /* @__PURE__ */ jsx(
137
+ ListItem.Decoration,
138
+ {
139
+ render: /* @__PURE__ */ jsx("span", {}),
140
+ ...rest,
141
+ className: cx("\u{1F95D}-dropdown-menu-item-shortcuts", props.className),
142
+ ref: forwardedRef,
143
+ children: shortcutKeys.map(({ key, isSymbol }, index) => {
144
+ if (isSymbol) {
145
+ return /* @__PURE__ */ jsx(
146
+ Kbd,
147
+ {
148
+ variant: "ghost",
149
+ symbol: key
150
+ },
151
+ `${key + index}`
152
+ );
153
+ }
154
+ return /* @__PURE__ */ jsx(Kbd, { variant: "ghost", children: key }, `${key + index}`);
155
+ })
156
+ }
157
+ );
158
+ });
159
+ DEV: DropdownMenuItemShortcuts.displayName = "DropdownMenuItemShortcuts";
160
+ const DropdownMenuIcon = forwardRef(
161
+ (props, forwardedRef) => {
162
+ const { icon, ...rest } = props;
163
+ return /* @__PURE__ */ jsx(
164
+ ListItem.Decoration,
165
+ {
166
+ render: /* @__PURE__ */ jsx(
167
+ Icon,
168
+ {
169
+ href: typeof icon === "string" ? icon : void 0,
170
+ render: React.isValidElement(icon) ? icon : void 0,
171
+ ...rest,
172
+ ref: forwardedRef
173
+ }
174
+ )
175
+ }
176
+ );
177
+ }
178
+ );
179
+ DEV: DropdownMenuIcon.displayName = "DropdownMenuIcon";
180
+ const DropdownMenuCheckboxItem = forwardRef((props, forwardedRef) => {
181
+ const {
182
+ label,
183
+ icon,
184
+ defaultChecked,
185
+ checked,
186
+ onChange,
187
+ name,
188
+ value = defaultChecked ? "on" : void 0,
189
+ // For defaultChecked to work
190
+ ...rest
191
+ } = props;
192
+ return /* @__PURE__ */ jsxs(
193
+ MenuItemCheckbox,
194
+ {
195
+ accessibleWhenDisabled: true,
196
+ defaultChecked,
197
+ checked,
198
+ name,
199
+ value,
200
+ onChange,
201
+ render: /* @__PURE__ */ jsx(
202
+ ListItem.Root,
203
+ {
204
+ render: /* @__PURE__ */ jsx(
205
+ ButtonAk,
206
+ {
207
+ accessibleWhenDisabled: true,
208
+ ...rest,
209
+ className: cx("\u{1F95D}-dropdown-menu-item", props.className),
210
+ ref: forwardedRef
211
+ }
212
+ )
213
+ }
214
+ ),
215
+ children: [
216
+ icon ? /* @__PURE__ */ jsx(DropdownMenuIcon, { icon }) : null,
217
+ /* @__PURE__ */ jsx(ListItem.Content, { render: /* @__PURE__ */ jsx("span", {}), children: label }),
218
+ /* @__PURE__ */ jsx(
219
+ ListItem.Decoration,
220
+ {
221
+ render: /* @__PURE__ */ jsx(Checkmark, { className: "\u{1F95D}-dropdown-menu-checkmark" })
222
+ }
223
+ )
224
+ ]
225
+ }
226
+ );
227
+ });
228
+ DEV: DropdownMenuCheckboxItem.displayName = "DropdownMenu.CheckboxItem";
229
+ export {
230
+ DropdownMenuButton as Button,
231
+ DropdownMenuCheckboxItem as CheckboxItem,
232
+ DropdownMenuContent as Content,
233
+ DropdownMenuItem as Item,
234
+ DropdownMenuRoot as Root
235
+ };
@@ -0,0 +1,164 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import {
3
+ Collection,
4
+ CollectionItem,
5
+ useCollectionStore
6
+ } from "@ariakit/react/collection";
7
+ import {
8
+ Dialog,
9
+ DialogDisclosure,
10
+ DialogProvider
11
+ } from "@ariakit/react/dialog";
12
+ import { Role } from "@ariakit/react/role";
13
+ import { useStoreState } from "@ariakit/react/store";
14
+ import { Button, Text, VisuallyHidden } from "@stratakit/bricks";
15
+ import { IconButtonPresentation } from "@stratakit/bricks/secret-internals";
16
+ import {
17
+ forwardRef,
18
+ useControlledState
19
+ } from "@stratakit/foundations/secret-internals";
20
+ import cx from "classnames";
21
+ import * as React from "react";
22
+ import { ChevronDown, StatusIcon } from "./~utils.icons.js";
23
+ const ErrorRegionRoot = forwardRef(
24
+ (props, forwardedRef) => {
25
+ const { label, items, expanded, onExpandedChange, ...rest } = props;
26
+ const labelId = React.useId();
27
+ const sectionLabelledBy = props["aria-labelledby"] ?? (props["aria-label"] ? void 0 : labelId);
28
+ const [open, setOpen] = useControlledState(
29
+ false,
30
+ expanded,
31
+ onExpandedChange
32
+ );
33
+ const containerRef = React.useRef(null);
34
+ const pulse = () => {
35
+ const el = containerRef.current;
36
+ if (!el) return;
37
+ const id = "--\u{1F95D}error-region-pulse";
38
+ const animations = el.getAnimations({ subtree: true });
39
+ if (animations.find((animation) => animation.id === id)) return;
40
+ el.animate(
41
+ [
42
+ {
43
+ boxShadow: "0 0 0 0 var(--ids-color-border-attention-base)",
44
+ opacity: 1
45
+ },
46
+ {
47
+ boxShadow: "0 0 15px 2px var(--ids-color-border-attention-base)",
48
+ opacity: 0.7,
49
+ offset: 0.5
50
+ },
51
+ {
52
+ boxShadow: "0 0 0 0 var(--ids-color-border-attention-base)",
53
+ opacity: 1
54
+ }
55
+ ],
56
+ {
57
+ id,
58
+ duration: 600,
59
+ easing: "cubic-bezier(0.4, 0, 0.2, 1)",
60
+ pseudoElement: "::before"
61
+ }
62
+ );
63
+ };
64
+ const store = useCollectionStore({
65
+ setItems: (newItems) => {
66
+ const prevItemsSet = new Set(prevItems.map((item) => item.id));
67
+ const addedItems = newItems.filter(
68
+ (item) => !prevItemsSet.has(item.id)
69
+ );
70
+ if (addedItems.length === 0) return;
71
+ pulse();
72
+ setLiveLabel(label);
73
+ }
74
+ });
75
+ const prevItems = useStoreState(store, "items");
76
+ const [liveLabel, setLiveLabel] = React.useState(label);
77
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
78
+ /* @__PURE__ */ jsx(VisuallyHidden, { "aria-live": "polite", "aria-atomic": true, children: liveLabel === label ? liveLabel : void 0 }),
79
+ /* @__PURE__ */ jsx(DialogProvider, { open, setOpen, children: /* @__PURE__ */ jsx(
80
+ Role.section,
81
+ {
82
+ ...rest,
83
+ "aria-labelledby": sectionLabelledBy,
84
+ className: cx("\u{1F95D}-error-region", props.className),
85
+ "data-kiwi-visible": !!label,
86
+ "data-kiwi-expanded": open,
87
+ ref: forwardedRef,
88
+ children: /* @__PURE__ */ jsxs("div", { className: "\u{1F95D}-error-region-container", ref: containerRef, children: [
89
+ /* @__PURE__ */ jsxs(
90
+ DialogDisclosure,
91
+ {
92
+ className: "\u{1F95D}-error-region-header",
93
+ render: /* @__PURE__ */ jsx(Button, { variant: "ghost" }),
94
+ children: [
95
+ /* @__PURE__ */ jsx(StatusIcon, { tone: "attention", className: "\u{1F95D}-error-region-icon" }),
96
+ /* @__PURE__ */ jsx(
97
+ Text,
98
+ {
99
+ render: /* @__PURE__ */ jsx("span", {}),
100
+ id: labelId,
101
+ className: "\u{1F95D}-error-region-label",
102
+ variant: "body-sm",
103
+ children: label
104
+ }
105
+ ),
106
+ /* @__PURE__ */ jsx(IconButtonPresentation, { inert: true, variant: "ghost", children: /* @__PURE__ */ jsx(ChevronDown, {}) })
107
+ ]
108
+ }
109
+ ),
110
+ /* @__PURE__ */ jsx(
111
+ Dialog,
112
+ {
113
+ className: "\u{1F95D}-error-region-dialog",
114
+ portal: false,
115
+ modal: false,
116
+ autoFocusOnShow: false,
117
+ "aria-labelledby": labelId,
118
+ children: /* @__PURE__ */ jsx(
119
+ Collection,
120
+ {
121
+ store,
122
+ className: "\u{1F95D}-error-region-items",
123
+ role: "list",
124
+ children: items
125
+ }
126
+ )
127
+ }
128
+ )
129
+ ] })
130
+ }
131
+ ) })
132
+ ] });
133
+ }
134
+ );
135
+ DEV: ErrorRegionRoot.displayName = "ErrorRegion.Root";
136
+ const ErrorRegionItem = forwardRef(
137
+ (props, forwardedRef) => {
138
+ const generatedId = React.useId();
139
+ const {
140
+ message,
141
+ messageId = `${generatedId}-message`,
142
+ actions,
143
+ ...rest
144
+ } = props;
145
+ return /* @__PURE__ */ jsxs(
146
+ CollectionItem,
147
+ {
148
+ ...rest,
149
+ role: "listitem",
150
+ className: cx("\u{1F95D}-error-region-item", props.className),
151
+ ref: forwardedRef,
152
+ children: [
153
+ /* @__PURE__ */ jsx(Text, { id: messageId, variant: "body-sm", children: message }),
154
+ /* @__PURE__ */ jsx("div", { className: "\u{1F95D}-error-region-item-actions", children: actions })
155
+ ]
156
+ }
157
+ );
158
+ }
159
+ );
160
+ DEV: ErrorRegionItem.displayName = "ErrorRegion.Item";
161
+ export {
162
+ ErrorRegionItem as Item,
163
+ ErrorRegionRoot as Root
164
+ };
@@ -0,0 +1,151 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Role } from "@ariakit/react/role";
3
+ import { forwardRef } from "@stratakit/foundations/secret-internals";
4
+ import {
5
+ useMergedRefs,
6
+ useSafeContext
7
+ } from "@stratakit/foundations/secret-internals";
8
+ import cx from "classnames";
9
+ import * as React from "react";
10
+ const TableContext = React.createContext(void 0);
11
+ const TableHeaderContext = React.createContext(false);
12
+ const HtmlTable = forwardRef((props, forwardedRef) => {
13
+ const tableContextValue = React.useMemo(
14
+ () => ({ mode: "html" }),
15
+ []
16
+ );
17
+ return /* @__PURE__ */ jsx(TableContext.Provider, { value: tableContextValue, children: /* @__PURE__ */ jsx(
18
+ Role,
19
+ {
20
+ render: /* @__PURE__ */ jsx("table", {}),
21
+ ...props,
22
+ ref: forwardedRef,
23
+ className: cx("\u{1F95D}-table", props.className)
24
+ }
25
+ ) });
26
+ });
27
+ DEV: HtmlTable.displayName = "Table.HtmlTable";
28
+ const CustomTable = forwardRef(
29
+ (props, forwardedRef) => {
30
+ const [captionId, setCaptionId] = React.useState();
31
+ const tableContextValue = React.useMemo(
32
+ () => ({ captionId, setCaptionId, mode: "aria" }),
33
+ [captionId]
34
+ );
35
+ return /* @__PURE__ */ jsx(TableContext.Provider, { value: tableContextValue, children: /* @__PURE__ */ jsx(
36
+ Role.div,
37
+ {
38
+ role: "table",
39
+ "aria-labelledby": captionId,
40
+ ...props,
41
+ ref: forwardedRef,
42
+ className: cx("\u{1F95D}-table", props.className)
43
+ }
44
+ ) });
45
+ }
46
+ );
47
+ DEV: CustomTable.displayName = "Table.CustomTable";
48
+ const TableHeader = forwardRef(
49
+ (props, forwardedRef) => {
50
+ const { mode } = useSafeContext(TableContext);
51
+ const render = mode === "html" ? /* @__PURE__ */ jsx("thead", {}) : void 0;
52
+ const role = mode === "aria" ? "rowgroup" : void 0;
53
+ return /* @__PURE__ */ jsx(TableHeaderContext.Provider, { value: true, children: /* @__PURE__ */ jsx(
54
+ Role.div,
55
+ {
56
+ render,
57
+ role,
58
+ ...props,
59
+ ref: forwardedRef,
60
+ className: cx("\u{1F95D}-table-header", props.className)
61
+ }
62
+ ) });
63
+ }
64
+ );
65
+ DEV: TableHeader.displayName = "Table.Header";
66
+ const TableBody = forwardRef((props, forwardedRef) => {
67
+ const { mode } = useSafeContext(TableContext);
68
+ const render = mode === "html" ? /* @__PURE__ */ jsx("tbody", {}) : void 0;
69
+ return /* @__PURE__ */ jsx(
70
+ Role.div,
71
+ {
72
+ render,
73
+ role: void 0,
74
+ ...props,
75
+ ref: forwardedRef,
76
+ className: cx("\u{1F95D}-table-body", props.className)
77
+ }
78
+ );
79
+ });
80
+ DEV: TableBody.displayName = "Table.Body";
81
+ const TableRow = forwardRef((props, forwardedRef) => {
82
+ const { mode } = useSafeContext(TableContext);
83
+ const render = mode === "html" ? /* @__PURE__ */ jsx("tr", {}) : void 0;
84
+ const role = mode === "aria" ? "row" : void 0;
85
+ return /* @__PURE__ */ jsx(
86
+ Role.div,
87
+ {
88
+ render,
89
+ role,
90
+ ...props,
91
+ ref: forwardedRef,
92
+ className: cx("\u{1F95D}-table-row", props.className)
93
+ }
94
+ );
95
+ });
96
+ DEV: TableRow.displayName = "Table.Row";
97
+ const TableCaption = forwardRef(
98
+ (props, forwardedRef) => {
99
+ const fallbackId = React.useId();
100
+ const { id = fallbackId, ...rest } = props;
101
+ const { mode, setCaptionId } = useSafeContext(TableContext);
102
+ const render = mode === "html" ? /* @__PURE__ */ jsx("caption", {}) : void 0;
103
+ const captionIdRef = React.useCallback(
104
+ (element) => {
105
+ setCaptionId?.(element ? id : void 0);
106
+ },
107
+ [id, setCaptionId]
108
+ );
109
+ return /* @__PURE__ */ jsx(
110
+ Role.div,
111
+ {
112
+ render,
113
+ ...rest,
114
+ id,
115
+ ref: useMergedRefs(forwardedRef, captionIdRef),
116
+ className: cx("\u{1F95D}-table-caption", props.className)
117
+ }
118
+ );
119
+ }
120
+ );
121
+ DEV: TableCaption.displayName = "Table.Caption";
122
+ const TableCell = forwardRef((props, forwardedRef) => {
123
+ const isWithinTableHeader = useSafeContext(TableHeaderContext);
124
+ const { mode } = useSafeContext(TableContext);
125
+ const { render, role } = React.useMemo(() => {
126
+ if (mode === "aria") {
127
+ return { role: isWithinTableHeader ? "columnheader" : "cell" };
128
+ }
129
+ return { render: isWithinTableHeader ? /* @__PURE__ */ jsx("th", {}) : /* @__PURE__ */ jsx("td", {}) };
130
+ }, [isWithinTableHeader, mode]);
131
+ return /* @__PURE__ */ jsx(
132
+ Role.div,
133
+ {
134
+ render,
135
+ role,
136
+ ...props,
137
+ ref: forwardedRef,
138
+ className: cx("\u{1F95D}-table-cell", props.className)
139
+ }
140
+ );
141
+ });
142
+ DEV: TableCell.displayName = "Table.Cell";
143
+ export {
144
+ TableBody as Body,
145
+ TableCaption as Caption,
146
+ TableCell as Cell,
147
+ CustomTable,
148
+ TableHeader as Header,
149
+ HtmlTable,
150
+ TableRow as Row
151
+ };
@@ -0,0 +1,66 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import * as AkTab from "@ariakit/react/tab";
3
+ import { forwardRef } from "@stratakit/foundations/secret-internals";
4
+ import cx from "classnames";
5
+ function Tabs(props) {
6
+ const {
7
+ defaultSelectedId,
8
+ selectedId,
9
+ setSelectedId,
10
+ selectOnMove,
11
+ children
12
+ } = props;
13
+ return /* @__PURE__ */ jsx(
14
+ AkTab.TabProvider,
15
+ {
16
+ defaultSelectedId,
17
+ selectedId,
18
+ setSelectedId,
19
+ selectOnMove,
20
+ children
21
+ }
22
+ );
23
+ }
24
+ DEV: Tabs.displayName = "Tabs.Root";
25
+ const TabList = forwardRef((props, forwardedRef) => {
26
+ const { tone = "neutral", ...rest } = props;
27
+ return /* @__PURE__ */ jsx(
28
+ AkTab.TabList,
29
+ {
30
+ ...rest,
31
+ "data-kiwi-tone": tone,
32
+ className: cx("\u{1F95D}-tab-list", props.className),
33
+ ref: forwardedRef
34
+ }
35
+ );
36
+ });
37
+ DEV: TabList.displayName = "Tabs.TabList";
38
+ const Tab = forwardRef((props, forwardedRef) => {
39
+ return /* @__PURE__ */ jsx(
40
+ AkTab.Tab,
41
+ {
42
+ accessibleWhenDisabled: true,
43
+ ...props,
44
+ className: cx("\u{1F95D}-tab", props.className),
45
+ ref: forwardedRef
46
+ }
47
+ );
48
+ });
49
+ DEV: Tab.displayName = "Tabs.Tab";
50
+ const TabPanel = forwardRef((props, forwardedRef) => {
51
+ return /* @__PURE__ */ jsx(
52
+ AkTab.TabPanel,
53
+ {
54
+ ...props,
55
+ className: cx("\u{1F95D}-tab-panel", props.className),
56
+ ref: forwardedRef
57
+ }
58
+ );
59
+ });
60
+ DEV: TabPanel.displayName = "Tabs.TabPanel";
61
+ export {
62
+ Tabs as Root,
63
+ Tab,
64
+ TabList,
65
+ TabPanel
66
+ };
@@ -0,0 +1,27 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import * as Toolbar from "@ariakit/react/toolbar";
3
+ import { IconButtonContext } from "@stratakit/bricks/secret-internals";
4
+ import { forwardRef } from "@stratakit/foundations/secret-internals";
5
+ import cx from "classnames";
6
+ import * as React from "react";
7
+ const ToolbarGroup = forwardRef((props, forwardedRef) => {
8
+ return /* @__PURE__ */ jsx(IconButtonContext, { value: React.useMemo(() => ({ iconSize: "large" }), []), children: /* @__PURE__ */ jsx(
9
+ Toolbar.Toolbar,
10
+ {
11
+ ...props,
12
+ className: cx("\u{1F95D}-toolbar", props.className),
13
+ ref: forwardedRef
14
+ }
15
+ ) });
16
+ });
17
+ DEV: ToolbarGroup.displayName = "Toolbar.Group";
18
+ const ToolbarItem = forwardRef(
19
+ (props, forwardedRef) => {
20
+ return /* @__PURE__ */ jsx(Toolbar.ToolbarItem, { ...props, ref: forwardedRef });
21
+ }
22
+ );
23
+ DEV: ToolbarItem.displayName = "Toolbar.Item";
24
+ export {
25
+ ToolbarGroup as Group,
26
+ ToolbarItem as Item
27
+ };