@spark-ui/components 17.0.1-beta.0 → 17.0.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.
Files changed (76) hide show
  1. package/dist/{Button-CcIRizse.mjs → Button-1M9DcZl0.mjs} +2 -2
  2. package/dist/{Button-CcIRizse.mjs.map → Button-1M9DcZl0.mjs.map} +1 -1
  3. package/dist/{Button-CXL2NOrq.js → Button-FZceRWG2.js} +2 -2
  4. package/dist/{Button-CXL2NOrq.js.map → Button-FZceRWG2.js.map} +1 -1
  5. package/dist/IconButton-BR1bJSQA.js +2 -0
  6. package/dist/IconButton-BR1bJSQA.js.map +1 -0
  7. package/dist/{IconButton-CP4JbWsI.mjs → IconButton-DdB3Pq13.mjs} +14 -14
  8. package/dist/IconButton-DdB3Pq13.mjs.map +1 -0
  9. package/dist/avatar/index.js +1 -1
  10. package/dist/avatar/index.mjs +1 -1
  11. package/dist/button/index.js +1 -1
  12. package/dist/button/index.mjs +1 -1
  13. package/dist/carousel/index.js +1 -1
  14. package/dist/carousel/index.mjs +1 -1
  15. package/dist/chip/index.js +1 -1
  16. package/dist/chip/index.js.map +1 -1
  17. package/dist/chip/index.mjs +1 -1
  18. package/dist/chip/index.mjs.map +1 -1
  19. package/dist/combobox/index.js +1 -1
  20. package/dist/combobox/index.js.map +1 -1
  21. package/dist/combobox/index.mjs +39 -39
  22. package/dist/combobox/index.mjs.map +1 -1
  23. package/dist/dialog/index.js +1 -1
  24. package/dist/dialog/index.mjs +1 -1
  25. package/dist/drawer/index.js +1 -1
  26. package/dist/drawer/index.mjs +1 -1
  27. package/dist/dropdown/index.js +1 -1
  28. package/dist/dropdown/index.js.map +1 -1
  29. package/dist/dropdown/index.mjs +1 -1
  30. package/dist/dropdown/index.mjs.map +1 -1
  31. package/dist/file-upload/index.js +1 -1
  32. package/dist/file-upload/index.mjs +2 -2
  33. package/dist/icon-button/index.js +1 -1
  34. package/dist/icon-button/index.mjs +1 -1
  35. package/dist/input/index.js +1 -1
  36. package/dist/input/index.js.map +1 -1
  37. package/dist/input/index.mjs +6 -6
  38. package/dist/input/index.mjs.map +1 -1
  39. package/dist/pagination/index.js +1 -1
  40. package/dist/pagination/index.mjs +2 -2
  41. package/dist/popover/index.js +1 -1
  42. package/dist/popover/index.mjs +1 -1
  43. package/dist/scrolling-list/index.js +1 -1
  44. package/dist/scrolling-list/index.mjs +2 -2
  45. package/dist/select/index.js +1 -1
  46. package/dist/select/index.js.map +1 -1
  47. package/dist/select/index.mjs +1 -1
  48. package/dist/select/index.mjs.map +1 -1
  49. package/dist/snackbar/index.js +1 -1
  50. package/dist/snackbar/index.mjs +2 -2
  51. package/dist/stepper/index.js +1 -1
  52. package/dist/stepper/index.mjs +1 -1
  53. package/dist/tabs/Tabs.d.ts +3 -3
  54. package/dist/tabs/TabsContent.d.ts +4 -4
  55. package/dist/tabs/TabsContext.d.ts +2 -2
  56. package/dist/tabs/TabsList.d.ts +3 -3
  57. package/dist/tabs/TabsTrigger.d.ts +3 -3
  58. package/dist/tabs/index.js +1 -1
  59. package/dist/tabs/index.js.map +1 -1
  60. package/dist/tabs/index.mjs +183 -174
  61. package/dist/tabs/index.mjs.map +1 -1
  62. package/dist/tabs/useRenderSlot.d.ts +1 -0
  63. package/dist/tag/index.js +1 -1
  64. package/dist/tag/index.js.map +1 -1
  65. package/dist/tag/index.mjs +6 -6
  66. package/dist/tag/index.mjs.map +1 -1
  67. package/dist/textarea/index.js +1 -1
  68. package/dist/textarea/index.js.map +1 -1
  69. package/dist/textarea/index.mjs +14 -10
  70. package/dist/textarea/index.mjs.map +1 -1
  71. package/dist/toast/index.js +1 -1
  72. package/dist/toast/index.mjs +2 -2
  73. package/package.json +4 -4
  74. package/dist/IconButton-CP4JbWsI.mjs.map +0 -1
  75. package/dist/IconButton-JFDGiOOn.js +0 -2
  76. package/dist/IconButton-JFDGiOOn.js.map +0 -1
@@ -1,99 +1,107 @@
1
- import { jsx as n, jsxs as I } from "react/jsx-runtime";
2
- import { Tabs as T } from "radix-ui";
3
- import { createContext as E, useContext as A, useState as B, useRef as b, useEffect as g, forwardRef as O, useMemo as G } from "react";
4
- import { cva as x, cx as J } from "class-variance-authority";
5
- import { ArrowVerticalLeft as Q } from "@spark-ui/icons/ArrowVerticalLeft";
6
- import { ArrowVerticalRight as U } from "@spark-ui/icons/ArrowVerticalRight";
7
- import { B as M } from "../Button-CcIRizse.mjs";
8
- import { I as N } from "../Icon-BO327oHU.mjs";
9
- import { useMergeRefs as j } from "@spark-ui/hooks/use-merge-refs";
10
- import { MoreMenuHorizontal as X } from "@spark-ui/icons/MoreMenuHorizontal";
11
- import { I as Y } from "../IconButton-CP4JbWsI.mjs";
12
- import { Popover as w } from "../popover/index.mjs";
13
- import { makeVariants as Z } from "@spark-ui/internal-utils";
14
- const D = E({}), L = () => {
15
- const t = A(D);
1
+ import { jsx as o, jsxs as F } from "react/jsx-runtime";
2
+ import { Tabs as z } from "@base-ui/react/tabs";
3
+ import { createContext as O, useContext as A, useState as B, useRef as v, useEffect as w, forwardRef as j, useMemo as Q } from "react";
4
+ import { cva as b, cx as U } from "class-variance-authority";
5
+ import { S as X } from "../Slot-DLY1rJrG.mjs";
6
+ import { ArrowVerticalLeft as Y } from "@spark-ui/icons/ArrowVerticalLeft";
7
+ import { ArrowVerticalRight as Z } from "@spark-ui/icons/ArrowVerticalRight";
8
+ import { B as I } from "../Button-1M9DcZl0.mjs";
9
+ import { I as S } from "../Icon-BO327oHU.mjs";
10
+ import { useMergeRefs as D } from "@spark-ui/hooks/use-merge-refs";
11
+ import { MoreMenuHorizontal as _ } from "@spark-ui/icons/MoreMenuHorizontal";
12
+ import { I as ee } from "../IconButton-DdB3Pq13.mjs";
13
+ import { Popover as T } from "../popover/index.mjs";
14
+ import { makeVariants as te } from "@spark-ui/internal-utils";
15
+ const K = O({}), k = () => {
16
+ const t = A(K);
16
17
  if (!t)
17
18
  throw Error("useTabsContext must be used within a TabsContext Provider");
18
19
  return t;
19
- }, _ = x([
20
+ }, re = b([
20
21
  "flex",
21
22
  "data-[orientation=horizontal]:flex-col",
22
23
  "data-[orientation=vertical]:flex-row",
23
24
  "max-w-full"
24
- ]), F = ({
25
+ ]);
26
+ function y(t) {
27
+ return t ? ({ ...r }) => /* @__PURE__ */ o(X, { ...r }) : void 0;
28
+ }
29
+ const $ = ({
25
30
  intent: t = "support",
26
31
  size: r = "md",
27
32
  /**
28
- * Default Radix Primitive values
29
- * see https://www.radix-ui.com/docs/primitives/components/tabs#root
33
+ * Default Base UI Primitive values
34
+ * see https://base-ui.com/react/components/tabs
30
35
  */
31
- asChild: s = !1,
36
+ asChild: l = !1,
32
37
  forceMount: a = !1,
33
- orientation: o = "horizontal",
38
+ orientation: n = "horizontal",
34
39
  children: i,
35
- className: l,
40
+ className: s,
36
41
  ref: c,
37
42
  ...e
38
- }) => /* @__PURE__ */ n(
39
- D.Provider,
40
- {
41
- value: {
42
- intent: t,
43
- size: r,
44
- orientation: o,
45
- forceMount: a
46
- },
47
- children: /* @__PURE__ */ n(
48
- T.Root,
49
- {
50
- ref: c,
51
- asChild: s,
52
- orientation: o,
53
- className: _({ className: l }),
54
- "data-spark-component": "tabs",
55
- activationMode: "automatic",
56
- ...e,
57
- children: i
58
- }
59
- )
60
- }
61
- );
62
- F.displayName = "Tabs";
63
- const ee = x(["w-full p-lg", "focus-visible:u-outline-inset"], {
43
+ }) => {
44
+ const h = y(l);
45
+ return /* @__PURE__ */ o(
46
+ K.Provider,
47
+ {
48
+ value: {
49
+ intent: t,
50
+ size: r,
51
+ orientation: n,
52
+ forceMount: a
53
+ },
54
+ children: /* @__PURE__ */ o(
55
+ z.Root,
56
+ {
57
+ ref: c,
58
+ orientation: n,
59
+ className: re({ className: s }),
60
+ "data-spark-component": "tabs",
61
+ render: h,
62
+ ...e,
63
+ children: i
64
+ }
65
+ )
66
+ }
67
+ );
68
+ };
69
+ $.displayName = "Tabs";
70
+ const oe = b(["w-full p-lg", "focus-visible:u-outline-inset"], {
64
71
  variants: {
65
72
  forceMount: {
66
- true: "data-[state=inactive]:hidden",
73
+ true: "data-[hidden]:hidden",
67
74
  false: ""
68
75
  }
69
76
  }
70
- }), k = ({
77
+ }), R = ({
71
78
  /**
72
- * Default Radix Primitive values
73
- * see https://www.radix-ui.com/docs/primitives/components/tabs#content
79
+ * Default Base UI Primitive values
80
+ * see https://base-ui.com/react/components/tabs
74
81
  */
75
82
  children: t,
76
83
  asChild: r = !1,
77
- className: s,
84
+ className: l,
78
85
  ref: a,
79
- ...o
86
+ forceMount: n,
87
+ ...i
80
88
  }) => {
81
- const { forceMount: i } = L();
82
- return /* @__PURE__ */ n(
83
- T.Content,
89
+ const { forceMount: s } = k(), c = y(r), e = s || n;
90
+ return /* @__PURE__ */ o(
91
+ z.Panel,
84
92
  {
85
93
  "data-spark-component": "tabs-content",
86
94
  ref: a,
87
- forceMount: i || o.forceMount,
88
- className: ee({ className: s, forceMount: i }),
89
- asChild: r,
90
- ...o,
95
+ keepMounted: e,
96
+ className: oe({ className: l, forceMount: e }),
97
+ render: c,
98
+ ...i,
91
99
  children: t
92
100
  }
93
101
  );
94
102
  };
95
- k.displayName = "Tabs.Content";
96
- const te = x(["relative flex"]), re = x([
103
+ R.displayName = "Tabs.Content";
104
+ const ne = b(["relative flex"]), ie = b([
97
105
  "flex w-full",
98
106
  "data-[orientation=horizontal]:flex-row",
99
107
  "data-[orientation=vertical]:flex-col",
@@ -101,64 +109,64 @@ const te = x(["relative flex"]), re = x([
101
109
  "after:flex after:shrink after:grow after:border-outline",
102
110
  "data-[orientation=horizontal]:after:border-b-sm",
103
111
  "data-[orientation=vertical]:after:border-r-sm"
104
- ]), V = x([
112
+ ]), E = b([
105
113
  "h-auto! flex-none",
106
114
  "border-b-sm border-outline",
107
115
  "outline-hidden",
108
116
  "focus-visible:border-none focus-visible:bg-surface-hovered focus-visible:u-outline-inset!"
109
- ]), oe = (t, r) => {
110
- const [s, a] = B({ width: void 0, height: void 0 }), o = b(null), i = b(r);
111
- return g(() => {
117
+ ]), se = (t, r) => {
118
+ const [l, a] = B({ width: void 0, height: void 0 }), n = v(null), i = v(r);
119
+ return w(() => {
112
120
  i.current = r;
113
- }, [r]), g(() => {
114
- const l = t && "current" in t ? t.current : t;
115
- if (!(!l || o.current))
116
- return o.current = new ResizeObserver(([c]) => {
117
- const { inlineSize: e, blockSize: p } = c?.borderBoxSize?.[0] ?? {};
118
- i.current?.(c), a({ width: e, height: p });
119
- }), o.current.observe(l), () => {
120
- o.current && o.current.unobserve(l);
121
+ }, [r]), w(() => {
122
+ const s = t && "current" in t ? t.current : t;
123
+ if (!(!s || n.current))
124
+ return n.current = new ResizeObserver(([c]) => {
125
+ const { inlineSize: e, blockSize: h } = c?.borderBoxSize?.[0] ?? {};
126
+ i.current?.(c), a({ width: e, height: h });
127
+ }), n.current.observe(s), () => {
128
+ n.current && n.current.unobserve(s);
121
129
  };
122
- }, [t, o, i]), s;
123
- }, R = ({
130
+ }, [t, n, i]), l;
131
+ }, W = ({
124
132
  /**
125
- * Default Radix Primitive values
126
- * see https://www.radix-ui.com/docs/primitives/components/tabs#list
133
+ * Default Base UI Primitive values
134
+ * see https://base-ui.com/react/components/tabs
127
135
  */
128
136
  asChild: t = !1,
129
137
  loop: r = !1,
130
- children: s,
138
+ children: l,
131
139
  className: a,
132
- ref: o,
140
+ ref: n,
133
141
  ...i
134
142
  }) => {
135
- const l = b(null), c = b(null), e = o || c, { orientation: p } = L(), { width: z } = oe(l), [d, m] = B({
143
+ const s = v(null), c = v(null), e = n || c, { orientation: h } = k(), C = y(t), { width: x } = se(s), [d, g] = B({
136
144
  prev: "hidden",
137
145
  next: "hidden"
138
146
  });
139
- g(() => {
140
- typeof e == "function" || !e.current || m(p !== "horizontal" ? { prev: "hidden", next: "hidden" } : {
147
+ w(() => {
148
+ typeof e == "function" || !e.current || g(h !== "horizontal" ? { prev: "hidden", next: "hidden" } : {
141
149
  prev: e.current.scrollWidth > e.current.clientWidth ? "visible" : "hidden",
142
150
  next: e.current.scrollWidth > e.current.clientWidth ? "visible" : "hidden"
143
151
  });
144
- }, [p, e, z]), g(() => {
152
+ }, [h, e, x]), w(() => {
145
153
  if (typeof e == "function" || !e.current || d.prev === "hidden" || r)
146
154
  return;
147
155
  const f = (u) => {
148
- m({
156
+ g({
149
157
  prev: u.scrollLeft > 0 ? "visible" : "disabled",
150
158
  next: u.scrollLeft + u.clientWidth < u.scrollWidth ? "visible" : "disabled"
151
159
  });
152
- }, v = e.current;
153
- return f(v), v.addEventListener(
160
+ }, p = e.current;
161
+ return f(p), p.addEventListener(
154
162
  "scroll",
155
163
  ({ target: u }) => f(u)
156
- ), () => v.removeEventListener(
164
+ ), () => p.removeEventListener(
157
165
  "scroll",
158
166
  ({ target: u }) => f(u)
159
167
  );
160
168
  }, [e, d.prev, r]);
161
- const y = () => {
169
+ const N = () => {
162
170
  if (typeof e == "function" || !e.current)
163
171
  return;
164
172
  const f = r && e.current.scrollLeft <= 0;
@@ -166,7 +174,7 @@ const te = x(["relative flex"]), re = x([
166
174
  left: f ? e.current.scrollLeft + e.current.scrollWidth - e.current.clientWidth : e.current.scrollLeft - e.current.clientWidth,
167
175
  behavior: "smooth"
168
176
  });
169
- }, C = () => {
177
+ }, P = () => {
170
178
  if (typeof e == "function" || !e.current)
171
179
  return;
172
180
  const f = r && e.current.scrollLeft + e.current.clientWidth >= e.current.scrollWidth;
@@ -175,58 +183,59 @@ const te = x(["relative flex"]), re = x([
175
183
  behavior: "smooth"
176
184
  });
177
185
  };
178
- return /* @__PURE__ */ I("div", { className: te({ className: a }), ref: l, children: [
179
- d.prev !== "hidden" && /* @__PURE__ */ n(
180
- M,
186
+ return /* @__PURE__ */ F("div", { className: ne({ className: a }), ref: s, children: [
187
+ d.prev !== "hidden" && /* @__PURE__ */ o(
188
+ I,
181
189
  {
182
190
  shape: "square",
183
191
  intent: "surface",
184
192
  size: "sm",
185
- className: V(),
186
- onClick: y,
193
+ className: E(),
194
+ onClick: N,
187
195
  disabled: d.prev === "disabled",
188
196
  "aria-label": "Scroll left",
189
- children: /* @__PURE__ */ n(N, { children: /* @__PURE__ */ n(Q, {}) })
197
+ children: /* @__PURE__ */ o(S, { children: /* @__PURE__ */ o(Y, {}) })
190
198
  }
191
199
  ),
192
- /* @__PURE__ */ n(
193
- T.List,
200
+ /* @__PURE__ */ o(
201
+ z.List,
194
202
  {
195
203
  "data-spark-component": "tabs-list",
196
204
  ref: e,
197
- className: re(),
198
- asChild: t,
199
- loop: r,
205
+ className: ie(),
206
+ render: C,
207
+ loopFocus: r,
208
+ activateOnFocus: !0,
200
209
  ...i,
201
- children: s
210
+ children: l
202
211
  }
203
212
  ),
204
- d.next !== "hidden" && /* @__PURE__ */ n(
205
- M,
213
+ d.next !== "hidden" && /* @__PURE__ */ o(
214
+ I,
206
215
  {
207
216
  shape: "square",
208
217
  intent: "surface",
209
218
  size: "sm",
210
- className: V(),
211
- onClick: C,
219
+ className: E(),
220
+ onClick: P,
212
221
  disabled: d.next === "disabled",
213
222
  "aria-label": "Scroll right",
214
- children: /* @__PURE__ */ n(N, { children: /* @__PURE__ */ n(U, {}) })
223
+ children: /* @__PURE__ */ o(S, { children: /* @__PURE__ */ o(Z, {}) })
215
224
  }
216
225
  )
217
226
  ] });
218
227
  };
219
- R.displayName = "Tabs.List";
220
- const P = E(void 0), K = () => {
221
- const t = A(P);
228
+ W.displayName = "Tabs.List";
229
+ const L = O(void 0), q = () => {
230
+ const t = A(L);
222
231
  if (!t)
223
232
  throw new Error("TabsPopover components must be used within TabsPopover");
224
233
  return t;
225
- }, $ = O(
226
- ({ "aria-label": t, children: r, ...s }, a) => {
227
- const { popoverTriggerRef: o } = K(), i = j(a, o);
228
- return /* @__PURE__ */ n(w.Trigger, { asChild: !0, ...s, children: /* @__PURE__ */ n(
229
- Y,
234
+ }, H = j(
235
+ ({ "aria-label": t, children: r, ...l }, a) => {
236
+ const { popoverTriggerRef: n } = q(), i = D(a, n);
237
+ return /* @__PURE__ */ o(T.Trigger, { asChild: !0, ...l, children: /* @__PURE__ */ o(
238
+ ee,
230
239
  {
231
240
  ref: i,
232
241
  size: "sm",
@@ -234,48 +243,48 @@ const P = E(void 0), K = () => {
234
243
  design: "ghost",
235
244
  "aria-label": t,
236
245
  tabIndex: -1,
237
- children: /* @__PURE__ */ n(N, { children: r || /* @__PURE__ */ n(X, {}) })
246
+ children: /* @__PURE__ */ o(S, { children: r || /* @__PURE__ */ o(_, {}) })
238
247
  }
239
248
  ) });
240
249
  }
241
250
  );
242
- $.displayName = "Popover.Trigger";
243
- const q = O(
244
- ({ side: t, align: r = "start", className: s, ...a }, o) => {
245
- const { popoverSide: i } = K(), l = J("gap-sm flex flex-col", s);
246
- return /* @__PURE__ */ n(
247
- w.Content,
251
+ H.displayName = "Popover.Trigger";
252
+ const G = j(
253
+ ({ side: t, align: r = "start", className: l, ...a }, n) => {
254
+ const { popoverSide: i } = q(), s = U("gap-sm flex flex-col", l);
255
+ return /* @__PURE__ */ o(
256
+ T.Content,
248
257
  {
249
- ref: o,
258
+ ref: n,
250
259
  ...a,
251
260
  side: t ?? i,
252
261
  align: r,
253
- className: l
262
+ className: s
254
263
  }
255
264
  );
256
265
  }
257
266
  );
258
- q.displayName = "Popover.Content";
259
- const H = ({ popoverSide: t, popoverTriggerRef: r, children: s }) => {
260
- const a = G(
267
+ G.displayName = "Popover.Content";
268
+ const J = ({ popoverSide: t, popoverTriggerRef: r, children: l }) => {
269
+ const a = Q(
261
270
  () => ({ popoverSide: t, popoverTriggerRef: r }),
262
271
  [t, r]
263
- ), i = Object.assign(((l) => /* @__PURE__ */ n(P.Provider, { value: a, children: /* @__PURE__ */ n(w, { ...l, children: l.children }) })), w, {
264
- Content: q,
265
- Trigger: $
272
+ ), i = Object.assign(((s) => /* @__PURE__ */ o(L.Provider, { value: a, children: /* @__PURE__ */ o(T, { ...s, children: s.children }) })), T, {
273
+ Content: G,
274
+ Trigger: H
266
275
  });
267
- return /* @__PURE__ */ n(P.Provider, { value: a, children: s(i) });
276
+ return /* @__PURE__ */ o(L.Provider, { value: a, children: l(i) });
268
277
  };
269
- H.displayName = "Popover";
270
- const ne = x(
278
+ J.displayName = "Popover";
279
+ const ae = b(
271
280
  [
272
281
  "px-md",
273
282
  "relative flex flex-none items-center",
274
283
  "border-outline",
275
284
  "hover:not-disabled:bg-surface-hovered",
276
285
  "after:absolute",
277
- "data-[state=active]:font-bold",
278
- "data-[state=inactive]:not-disabled:cursor-pointer",
286
+ "data-[active]:font-bold",
287
+ "not-data-[active]:not-disabled:cursor-pointer",
279
288
  "data-[orientation=horizontal]:border-b-sm data-[orientation=horizontal]:after:inset-x-0 data-[orientation=horizontal]:after:bottom-[-1px] data-[orientation=horizontal]:after:h-sz-2",
280
289
  "data-[orientation=vertical]:border-r-sm data-[orientation=vertical]:after:inset-y-0 data-[orientation=vertical]:after:right-[-1px] data-[orientation=vertical]:after:w-sz-2",
281
290
  "focus-visible:border-none focus-visible:bg-surface-hovered focus-visible:u-outline-inset",
@@ -289,9 +298,9 @@ const ne = x(
289
298
  * Change the color scheme of the tabs
290
299
  * @default support
291
300
  */
292
- intent: Z({
293
- main: ["data-[state=active]:text-main data-[state=active]:after:bg-main"],
294
- support: ["data-[state=active]:text-support data-[state=active]:after:bg-support"]
301
+ intent: te({
302
+ main: ["data-[active]:text-main data-[active]:after:bg-main"],
303
+ support: ["data-[active]:text-support data-[active]:after:bg-support"]
295
304
  }),
296
305
  /**
297
306
  * Change the size of the tabs
@@ -324,65 +333,65 @@ const ne = x(
324
333
  orientation: "horizontal"
325
334
  }
326
335
  }
327
- ), W = ({
336
+ ), M = ({
328
337
  /**
329
- * Default Radix Primitive values
330
- * see https://www.radix-ui.com/docs/primitives/components/tabs#trigger
338
+ * Default Base UI Primitive values
339
+ * see https://base-ui.com/react/components/tabs
331
340
  */
332
341
  asChild: t = !1,
333
342
  value: r,
334
- disabled: s = !1,
343
+ disabled: l = !1,
335
344
  children: a,
336
- className: o,
345
+ className: n,
337
346
  ref: i,
338
- onKeyDown: l,
347
+ onKeyDown: s,
339
348
  renderMenu: c,
340
349
  ...e
341
350
  }) => {
342
- const { intent: p, size: z, orientation: d } = L(), m = b(null), y = b(null), C = j(i, y), f = (h) => {
343
- h.key === "F10" && h.shiftKey && c && m.current && (h.preventDefault(), m.current.click()), l?.(h);
344
- }, v = !!c, u = d === "vertical" ? "right" : "bottom", S = /* @__PURE__ */ n(
345
- T.Trigger,
351
+ const { intent: h, size: C, orientation: x } = k(), d = v(null), g = v(null), N = y(t), P = D(i, g), f = (m) => {
352
+ m.key === "F10" && m.shiftKey && c && d.current && (m.preventDefault(), d.current.click()), s?.(m);
353
+ }, p = !!c, u = x === "vertical" ? "right" : "bottom", V = /* @__PURE__ */ o(
354
+ z.Tab,
346
355
  {
347
356
  "data-spark-component": "tabs-trigger",
348
- ref: C,
349
- className: ne({
350
- intent: p,
351
- size: z,
352
- hasMenu: v,
353
- orientation: d ?? "horizontal",
354
- className: o
357
+ ref: P,
358
+ className: ae({
359
+ intent: h,
360
+ size: C,
361
+ hasMenu: p,
362
+ orientation: x ?? "horizontal",
363
+ className: n
355
364
  }),
356
- asChild: t,
357
- disabled: s,
365
+ render: N,
366
+ disabled: l,
358
367
  value: r,
359
- onFocus: ({ target: h }) => h.scrollIntoView({
368
+ onFocus: ({ target: m }) => m.scrollIntoView({
360
369
  behavior: "smooth",
361
370
  block: "nearest",
362
371
  inline: "nearest"
363
372
  }),
364
373
  onKeyDown: f,
365
- "aria-haspopup": v ? "true" : void 0,
374
+ "aria-haspopup": p ? "true" : void 0,
366
375
  ...e,
367
376
  children: a
368
377
  }
369
378
  );
370
- return v ? /* @__PURE__ */ I("div", { className: d === "vertical" ? "relative w-full" : "relative", children: [
371
- S,
372
- /* @__PURE__ */ n("div", { className: "right-md mr-md pointer-events-auto absolute top-1/2 -translate-y-1/2", children: /* @__PURE__ */ n(H, { popoverSide: u, popoverTriggerRef: m, children: (h) => c?.({ Popover: h }) }) })
373
- ] }) : S;
379
+ return p ? /* @__PURE__ */ F("div", { className: x === "vertical" ? "relative w-full" : "relative", children: [
380
+ V,
381
+ /* @__PURE__ */ o("div", { className: "right-md mr-md pointer-events-auto absolute top-1/2 -translate-y-1/2", children: /* @__PURE__ */ o(J, { popoverSide: u, popoverTriggerRef: d, children: (m) => c?.({ Popover: m }) }) })
382
+ ] }) : V;
374
383
  };
375
- W.displayName = "Tabs.Trigger";
376
- const ie = Object.assign(F, {
377
- List: R,
378
- Trigger: W,
379
- Content: k
384
+ M.displayName = "Tabs.Trigger";
385
+ const le = Object.assign($, {
386
+ List: W,
387
+ Trigger: M,
388
+ Content: R
380
389
  });
381
- ie.displayName = "Tabs";
382
- R.displayName = "Tabs.List";
383
- W.displayName = "Tabs.Trigger";
384
- k.displayName = "Tabs.Content";
390
+ le.displayName = "Tabs";
391
+ W.displayName = "Tabs.List";
392
+ M.displayName = "Tabs.Trigger";
393
+ R.displayName = "Tabs.Content";
385
394
  export {
386
- ie as Tabs
395
+ le as Tabs
387
396
  };
388
397
  //# sourceMappingURL=index.mjs.map