@jfrader/ui 0.5.0 → 0.5.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 (179) hide show
  1. package/dist/accordion-DLul6vIl.js +205 -0
  2. package/dist/accordion.js +1 -1
  3. package/dist/{announcement-bar-B58xempt.js → announcement-bar-Dlbq5-9D.js} +1 -1
  4. package/dist/announcement-bar.js +1 -1
  5. package/dist/avatar-CaGJHy1N.js +145 -0
  6. package/dist/{avatar-group-DOQQuV51.js → avatar-group-M1opAQEG.js} +1 -1
  7. package/dist/avatar-group.js +1 -1
  8. package/dist/avatar.js +1 -1
  9. package/dist/badge-CjM5Agqk.js +119 -0
  10. package/dist/badge.js +1 -1
  11. package/dist/{bottom-sheet-DPJBFkie.js → bottom-sheet-DjZOPq4k.js} +10 -9
  12. package/dist/bottom-sheet.js +1 -1
  13. package/dist/{breadcrumbs-Cfw_hgt2.js → breadcrumbs-BDK_LiwH.js} +10 -3
  14. package/dist/breadcrumbs.js +1 -1
  15. package/dist/{button-C92uYFJW.js → button-NLY0h6EJ.js} +7 -7
  16. package/dist/button.js +1 -1
  17. package/dist/{calendar-B3Svu0X2.js → calendar-BzJdv_SZ.js} +3 -1
  18. package/dist/calendar.js +1 -1
  19. package/dist/card-Ca4KQKYQ.js +154 -0
  20. package/dist/card.js +1 -1
  21. package/dist/carousel-B7OrvD6J.js +474 -0
  22. package/dist/carousel.js +1 -1
  23. package/dist/{checkbox-cFquiSdy.js → checkbox-DKSzExj2.js} +16 -15
  24. package/dist/checkbox.js +1 -1
  25. package/dist/{chip-group-DTQd_M-G.js → chip-group-DjQ0_6Y9.js} +2 -1
  26. package/dist/chip-group.js +1 -1
  27. package/dist/{code-block-ahnRi-g8.js → code-block-B5we2lZa.js} +75 -74
  28. package/dist/code-block.js +1 -1
  29. package/dist/{combobox-Bhzvu9ma.js → combobox-DFFqOBCi.js} +114 -109
  30. package/dist/combobox.js +1 -1
  31. package/dist/command-palette-BmQu2w4H.js +391 -0
  32. package/dist/command-palette.js +1 -1
  33. package/dist/comment-thread-ASaXDcGo.js +1410 -0
  34. package/dist/comment-thread.js +2 -0
  35. package/dist/context-menu-__1c2Dk9.js +370 -0
  36. package/dist/context-menu.js +2 -0
  37. package/dist/{copy-button-ByiA6D3R.js → copy-button-DCSLcYS-.js} +1 -1
  38. package/dist/copy-button.js +1 -1
  39. package/dist/{date-picker-5zKSSuFF.js → date-picker-BiPN7yeK.js} +4 -4
  40. package/dist/date-picker.js +1 -1
  41. package/dist/date-range-picker-DQpUeKqV.js +570 -0
  42. package/dist/date-range-picker.js +1 -1
  43. package/dist/{dialog-ciiv9H2b.js → dialog-BX1zYMs-.js} +2 -1
  44. package/dist/dialog.js +1 -1
  45. package/dist/{divider-DYoJf0I_.js → divider-Cp7aNbhM.js} +21 -20
  46. package/dist/divider.js +1 -1
  47. package/dist/elastic-slider-BG6K019r.js +395 -0
  48. package/dist/elastic-slider.js +2 -0
  49. package/dist/{expandable-card-C-qJcZ14.js → expandable-card-rUATve0o.js} +8 -1
  50. package/dist/expandable-card.js +1 -1
  51. package/dist/expanding-search-BxOwtdwt.js +238 -0
  52. package/dist/expanding-search.js +2 -0
  53. package/dist/file-dropzone-BuXm3Tea.js +457 -0
  54. package/dist/file-dropzone.js +1 -1
  55. package/dist/{filter-toolbar-D5KEKTSe.js → filter-toolbar-Cy5Hqur-.js} +4 -2
  56. package/dist/filter-toolbar.js +1 -1
  57. package/dist/{hover-card-B-nrCIy2.js → hover-card-CoMJKg1g.js} +7 -7
  58. package/dist/hover-card.js +1 -1
  59. package/dist/{image-compare-ciuhPtQZ.js → image-compare-BxY8Ykzt.js} +1 -1
  60. package/dist/image-compare.js +1 -1
  61. package/dist/index.js +81 -76
  62. package/dist/{json-viewer-BcySQfjZ.js → json-viewer-DgWqyU75.js} +7 -3
  63. package/dist/json-viewer.js +1 -1
  64. package/dist/mention-input-sq61si9L.js +600 -0
  65. package/dist/mention-input.js +1 -1
  66. package/dist/menu-DDKgmK2F.js +295 -0
  67. package/dist/menu.js +1 -1
  68. package/dist/{metric-card-Bh9K4fZs.js → metric-card--lVTz5Wn.js} +2 -2
  69. package/dist/metric-card.js +1 -1
  70. package/dist/{multi-select-Pce_IYnz.js → multi-select-DG1BCFX7.js} +14 -6
  71. package/dist/multi-select.js +1 -1
  72. package/dist/{navigation-sP5fiuQS.js → navigation-CC26JDr-.js} +20 -14
  73. package/dist/navigation.js +1 -1
  74. package/dist/{overlay-layer-SeUyyEPD.js → overlay-layer-qEbpEtb8.js} +16 -2
  75. package/dist/{pagination-DmXZ8E85.js → pagination-BfkeWbmP.js} +23 -22
  76. package/dist/pagination.js +1 -1
  77. package/dist/pill-BaS-uIbn.js +58 -0
  78. package/dist/pill.js +1 -1
  79. package/dist/popover-CErIw2q3.js +125 -0
  80. package/dist/popover.js +1 -1
  81. package/dist/{progress-CbOWBUdA.js → progress-DAQkfhPd.js} +1 -1
  82. package/dist/progress.js +1 -1
  83. package/dist/{radio-cards-D2QZENI_.js → radio-cards-Cu9cBssN.js} +35 -34
  84. package/dist/radio-cards.js +1 -1
  85. package/dist/{radio-group-E6mMRgo7.js → radio-group-TIK0-iPX.js} +18 -15
  86. package/dist/radio-group.js +1 -1
  87. package/dist/{resizable-panels-BhjUVXZZ.js → resizable-panels-DUpQEpwG.js} +3 -2
  88. package/dist/resizable-panels.js +1 -1
  89. package/dist/{search-field-IxF0IJXm.js → search-field-DMvho0KQ.js} +2 -2
  90. package/dist/search-field.js +1 -1
  91. package/dist/{segmented-control-yO1K1nbi.js → segmented-control-8ZUGnsZm.js} +2 -1
  92. package/dist/segmented-control.js +1 -1
  93. package/dist/{select-n_H52W1Z.js → select-D5rhJ8gi.js} +3 -2
  94. package/dist/select.js +1 -1
  95. package/dist/{signature-pad-q2SAsrdD.js → signature-pad-_bTeguN9.js} +256 -251
  96. package/dist/signature-pad.js +1 -1
  97. package/dist/slider-DVG6-Awh.js +308 -0
  98. package/dist/slider.js +1 -1
  99. package/dist/{sortable-data-table-tirqlLY2.js → sortable-data-table-CYKT_Ng7.js} +2 -2
  100. package/dist/sortable-data-table.js +1 -1
  101. package/dist/{split-button-Cb3EHs64.js → split-button-BCw4zZom.js} +75 -81
  102. package/dist/split-button.js +1 -1
  103. package/dist/{swipe-actions-DiZC57-3.js → swipe-actions-CBuJREU1.js} +4 -2
  104. package/dist/swipe-actions.js +1 -1
  105. package/dist/switch-C1WrKrf-.js +145 -0
  106. package/dist/switch.js +1 -1
  107. package/dist/tabs-XluwRjgg.js +210 -0
  108. package/dist/tabs.js +1 -1
  109. package/dist/{text-field-C8TWG-tY.js → text-field-hU72iSVS.js} +15 -13
  110. package/dist/text-field.js +1 -1
  111. package/dist/{textarea-BrW0XcG_.js → textarea-3k4Y0QQ3.js} +18 -16
  112. package/dist/textarea.js +1 -1
  113. package/dist/theme-root.js +1 -1
  114. package/dist/theme-switch-C505TtU8.js +166 -0
  115. package/dist/theme-switch.js +2 -0
  116. package/dist/{time-picker-Db8D49cP.js → time-picker-CPlhW0tr.js} +26 -20
  117. package/dist/time-picker.js +1 -1
  118. package/dist/{timeline-k3nURuCP.js → timeline-B0uAAVfT.js} +8 -2
  119. package/dist/timeline.js +1 -1
  120. package/dist/{toast-BHxI32ZA.js → toast-B7wo3sX1.js} +98 -79
  121. package/dist/{toast-stack-DqrAzdg5.js → toast-stack-B40VpS4M.js} +18 -4
  122. package/dist/toast-stack.js +1 -1
  123. package/dist/toast.js +1 -1
  124. package/dist/{toggle-group-fcjzpifI.js → toggle-group-B2fpFZwV.js} +1 -1
  125. package/dist/toggle-group.js +1 -1
  126. package/dist/tooltip-BvgVTCTN.js +120 -0
  127. package/dist/tooltip.js +1 -1
  128. package/dist/{tree-view-C2liIxqy.js → tree-view-j8qLqkb_.js} +5 -1
  129. package/dist/tree-view.js +1 -1
  130. package/dist/types/components/checkbox/checkbox.d.ts +1 -1
  131. package/dist/types/components/command-palette/command-palette.d.ts +1 -1
  132. package/dist/types/components/comment-thread/comment-thread.d.ts +118 -0
  133. package/dist/types/components/comment-thread/index.d.ts +1 -0
  134. package/dist/types/components/comment-thread/thread-core.d.ts +96 -0
  135. package/dist/types/components/comment-thread/thread-parts.d.ts +114 -0
  136. package/dist/types/components/context-menu/context-menu.d.ts +55 -0
  137. package/dist/types/components/context-menu/index.d.ts +2 -0
  138. package/dist/types/components/date-range-picker/date-range-picker.d.ts +1 -1
  139. package/dist/types/components/elastic-slider/elastic-slider.d.ts +53 -0
  140. package/dist/types/components/elastic-slider/index.d.ts +1 -0
  141. package/dist/types/components/expanding-search/expanding-search.d.ts +22 -0
  142. package/dist/types/components/expanding-search/index.d.ts +1 -0
  143. package/dist/types/components/menu/menu.d.ts +50 -7
  144. package/dist/types/components/pagination/pagination.d.ts +1 -1
  145. package/dist/types/components/radio-cards/radio-cards.d.ts +1 -1
  146. package/dist/types/components/radio-group/radio-group.d.ts +1 -1
  147. package/dist/types/components/slider/slider-style.d.ts +14 -0
  148. package/dist/types/components/slider/slider.d.ts +2 -10
  149. package/dist/types/components/slider/use-slider-interaction.d.ts +79 -0
  150. package/dist/types/components/split-button/split-button.d.ts +2 -2
  151. package/dist/types/components/tabs/tabs.d.ts +1 -1
  152. package/dist/types/components/text-field/text-field.d.ts +1 -1
  153. package/dist/types/components/textarea/textarea.d.ts +1 -1
  154. package/dist/types/components/theme-switch/index.d.ts +1 -0
  155. package/dist/types/components/theme-switch/theme-switch.d.ts +33 -0
  156. package/dist/types/components/tooltip/tooltip.d.ts +1 -1
  157. package/dist/types/index.d.ts +5 -0
  158. package/dist/types/overlay/overlay-layer.d.ts +20 -0
  159. package/dist/types/overlay/use-overlay-floating.d.ts +9 -2
  160. package/dist/{use-overlay-floating-DvJifLpF.js → use-overlay-floating-Bx2jBKAA.js} +8 -6
  161. package/dist/use-slider-interaction-ChL-208h.js +234 -0
  162. package/package.json +22 -2
  163. package/dist/accordion-xCI_u0BV.js +0 -198
  164. package/dist/avatar-BahDVO9t.js +0 -132
  165. package/dist/badge-B_sLygxU.js +0 -108
  166. package/dist/card-D-aI2QHx.js +0 -158
  167. package/dist/carousel-IvPqN-oM.js +0 -472
  168. package/dist/command-palette-BQ5LleGb.js +0 -384
  169. package/dist/date-range-picker-B5uFWsm-.js +0 -562
  170. package/dist/file-dropzone-pR4v7owg.js +0 -457
  171. package/dist/mention-input-BcQKX2EJ.js +0 -599
  172. package/dist/menu-xwOOUtWP.js +0 -275
  173. package/dist/pill-DO2gHzMb.js +0 -56
  174. package/dist/popover-QHcEvf9c.js +0 -119
  175. package/dist/slider-t0B5cecO.js +0 -477
  176. package/dist/switch-qwv8jQnR.js +0 -142
  177. package/dist/tabs-CAVJndX1.js +0 -203
  178. package/dist/tooltip-CkeiW9C1.js +0 -113
  179. package/dist/{theme-root-BbTBuLMQ.js → theme-root-Bs1U3uPA.js} +2 -2
@@ -4,7 +4,7 @@ import { t as n } from "./focus-ring-BK5W5_NY.js";
4
4
  import { n as r } from "./media-8yrN85VT.js";
5
5
  import { t as i } from "./use-controlled-state-DpeVQZNR.js";
6
6
  import { t as a } from "./renderable-DzcIj1Lo.js";
7
- import { t as o } from "./menu-xwOOUtWP.js";
7
+ import { t as o } from "./menu-DDKgmK2F.js";
8
8
  import { Children as s, createContext as c, isValidElement as l, useContext as u, useEffect as d, useLayoutEffect as f, useMemo as p, useRef as m, useState as h } from "react";
9
9
  import { vars as g } from "@jfrader/tokens/vars";
10
10
  import { Fragment as _, jsx as v, jsxs as y } from "@emotion/react/jsx-runtime";
@@ -297,7 +297,9 @@ function O({ id: e, label: n, actionsLabel: r, leading: i = pe, trailing: s = pe
297
297
  },
298
298
  onPointerDown: (e) => {
299
299
  if (T?.(e), e.defaultPrevented || l || !G || z.current || !e.isPrimary || e.button !== 0 || e.target.closest(me)) return;
300
- let t = e.currentTarget, n = t.ownerDocument, r = (e) => {
300
+ let t = e.currentTarget, n = t.ownerDocument;
301
+ e.pointerType === "mouse" && e.preventDefault();
302
+ let r = (e) => {
301
303
  t.contains(e.target) || Q(e.pointerId, !0);
302
304
  };
303
305
  n.addEventListener("pointerup", r, !0), n.addEventListener("pointercancel", r, !0), z.current = {
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as SwipeActions } from "./swipe-actions-DiZC57-3.js";
2
+ export { t as SwipeActions } from "./swipe-actions-CBuJREU1.js";
@@ -0,0 +1,145 @@
1
+ 'use client';
2
+ import { r as e, t } from "./sx-Dx9JUKp5.js";
3
+ import { n, r } from "./media-8yrN85VT.js";
4
+ import { t as i } from "./renderable-DzcIj1Lo.js";
5
+ import { i as a, n as o, r as s, t as c } from "./choice-control-5kJkLXgv.js";
6
+ import { useId as l } from "react";
7
+ import { vars as u } from "@jfrader/tokens/vars";
8
+ import { jsx as d, jsxs as f } from "@emotion/react/jsx-runtime";
9
+ //#region src/components/switch/switch.tsx
10
+ var p = {
11
+ sm: "36px",
12
+ md: "44px"
13
+ }, m = e({
14
+ position: "relative",
15
+ display: "inline-block",
16
+ flexShrink: 0,
17
+ boxSizing: "border-box",
18
+ border: `1px solid ${u.color.borderControl}`,
19
+ borderRadius: u.radius.full,
20
+ backgroundColor: u.color.surfaceHover,
21
+ transitionProperty: "background-color, border-color",
22
+ transitionDuration: u.motion.duration.fast,
23
+ transitionTimingFunction: u.motion.easeStandard,
24
+ "&::after": {
25
+ content: "\"\"",
26
+ position: "absolute",
27
+ insetBlockStart: "2px",
28
+ insetInlineStart: "2px",
29
+ borderRadius: u.radius.full,
30
+ backgroundColor: u.color.text,
31
+ transitionProperty: "transform, background-color",
32
+ transitionDuration: u.motion.duration.fast,
33
+ transitionTimingFunction: u.motion.easeStandard
34
+ },
35
+ [r]: {
36
+ transitionDuration: "0s",
37
+ "&::after": { transitionDuration: "0s" }
38
+ },
39
+ [n]: { "&::after": { backgroundColor: "CanvasText" } }
40
+ }), h = {
41
+ sm: e({
42
+ inlineSize: p.sm,
43
+ blockSize: "20px",
44
+ "&::after": {
45
+ inlineSize: "14px",
46
+ blockSize: "14px"
47
+ }
48
+ }),
49
+ md: e({
50
+ inlineSize: p.md,
51
+ blockSize: "24px",
52
+ "&::after": {
53
+ inlineSize: "18px",
54
+ blockSize: "18px"
55
+ }
56
+ })
57
+ }, g = {
58
+ sm: e({
59
+ "input:checked + span::after": {
60
+ transform: "translateX(16px)",
61
+ backgroundColor: u.color.accentContrast
62
+ },
63
+ "&:dir(rtl) input:checked + span::after": { transform: "translateX(-16px)" },
64
+ [n]: { "input:checked + span::after": { backgroundColor: "CanvasText" } }
65
+ }),
66
+ md: e({
67
+ "input:checked + span::after": {
68
+ transform: "translateX(20px)",
69
+ backgroundColor: u.color.accentContrast
70
+ },
71
+ "&:dir(rtl) input:checked + span::after": { transform: "translateX(-20px)" },
72
+ [n]: { "input:checked + span::after": { backgroundColor: "CanvasText" } }
73
+ })
74
+ }, _ = {
75
+ sm: e({ fontSize: u.textSize.sm }),
76
+ md: e({ fontSize: u.textSize.md })
77
+ }, v = e({
78
+ fontSize: u.textSize.sm,
79
+ color: u.color.textMuted
80
+ }), y = {
81
+ sm: e({ marginInlineStart: `calc(${p.sm} + ${u.space[2]})` }),
82
+ md: e({ marginInlineStart: `calc(${p.md} + ${u.space[2]})` })
83
+ };
84
+ function b({ ref: e, label: n, description: r, size: u = "md", onChange: p, onCheckedChange: b, slotProps: x, className: S, sx: C, dir: w, "aria-labelledby": T, "aria-describedby": E, ...D }) {
85
+ let O = l(), k = `${O}-label`, A = `${O}-description`, j = i(n), M = i(r), N = [T, j && k].filter(Boolean).join(" ") || void 0, P = [E, M && A].filter(Boolean).join(" ") || void 0, F = [S, x?.root?.className].filter(Boolean).join(" ") || void 0, I = (e) => {
86
+ p?.(e), b?.(e.currentTarget.checked);
87
+ };
88
+ return /* @__PURE__ */ d(t, {
89
+ className: F,
90
+ styles: [
91
+ s,
92
+ o,
93
+ g[u],
94
+ x?.root?.css
95
+ ],
96
+ sx: C,
97
+ children: (t) => /* @__PURE__ */ f("label", {
98
+ "data-ui": "switch",
99
+ dir: w,
100
+ className: t,
101
+ children: [/* @__PURE__ */ f("span", {
102
+ css: a,
103
+ children: [
104
+ /* @__PURE__ */ d("input", {
105
+ ...D,
106
+ ref: e,
107
+ type: "checkbox",
108
+ role: "switch",
109
+ "aria-labelledby": N,
110
+ "aria-describedby": P,
111
+ onChange: I,
112
+ css: c
113
+ }),
114
+ /* @__PURE__ */ d("span", {
115
+ "aria-hidden": "true",
116
+ className: x?.control?.className,
117
+ css: [
118
+ m,
119
+ h[u],
120
+ x?.control?.css
121
+ ]
122
+ }),
123
+ j && /* @__PURE__ */ d("span", {
124
+ id: k,
125
+ className: x?.label?.className,
126
+ css: [_[u], x?.label?.css],
127
+ children: n
128
+ })
129
+ ]
130
+ }), M && /* @__PURE__ */ d("span", {
131
+ id: A,
132
+ className: x?.description?.className,
133
+ css: [
134
+ v,
135
+ y[u],
136
+ x?.description?.css
137
+ ],
138
+ children: r
139
+ })]
140
+ })
141
+ });
142
+ }
143
+ b.displayName = "Switch";
144
+ //#endregion
145
+ export { b as t };
package/dist/switch.js CHANGED
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as Switch } from "./switch-qwv8jQnR.js";
2
+ export { t as Switch } from "./switch-C1WrKrf-.js";
@@ -0,0 +1,210 @@
1
+ 'use client';
2
+ import { r as e, t } from "./sx-Dx9JUKp5.js";
3
+ import { n, t as r } from "./focus-ring-BK5W5_NY.js";
4
+ import { n as i, r as a } from "./media-8yrN85VT.js";
5
+ import { n as o, r as s, t as c } from "./roving-focus-CYlo_Kf8.js";
6
+ import { t as l } from "./use-controlled-state-DpeVQZNR.js";
7
+ import { t as u } from "./part-id-D0zksy32.js";
8
+ import { createContext as d, useContext as f, useEffect as p, useId as m, useImperativeHandle as h, useMemo as g, useRef as _, useState as v } from "react";
9
+ import { vars as y } from "@jfrader/tokens/vars";
10
+ import { jsx as b } from "@emotion/react/jsx-runtime";
11
+ //#region src/components/tabs/tabs.tsx
12
+ var x = d(null);
13
+ function S(e) {
14
+ let t = f(x);
15
+ if (!t) throw Error(`Tabs.${e} must be rendered inside <Tabs>.`);
16
+ return t;
17
+ }
18
+ var C = {
19
+ itemSelector: "[role=\"tab\"]:not([disabled])",
20
+ ownerSelector: "[role=\"tablist\"]"
21
+ }, w = e({ "&[data-orientation=\"vertical\"]": {
22
+ display: "flex",
23
+ alignItems: "flex-start",
24
+ gap: y.space[4]
25
+ } }), T = {
26
+ horizontal: e({
27
+ display: "inline-flex",
28
+ gap: y.space[1],
29
+ borderBlockEnd: `1px solid ${y.color.border}`
30
+ }),
31
+ vertical: e({
32
+ display: "inline-flex",
33
+ flexDirection: "column",
34
+ alignItems: "stretch",
35
+ borderInlineEnd: `1px solid ${y.color.border}`
36
+ })
37
+ }, E = e({
38
+ appearance: "none",
39
+ border: 0,
40
+ background: "transparent",
41
+ cursor: "pointer",
42
+ paddingBlock: y.space[2],
43
+ paddingInline: y.space[3],
44
+ font: "inherit",
45
+ fontSize: y.textSize.sm,
46
+ fontWeight: y.fontWeight.medium,
47
+ color: y.color.textMuted,
48
+ transitionProperty: "color, border-color",
49
+ transitionDuration: y.motion.duration.fast,
50
+ transitionTimingFunction: y.motion.easeStandard,
51
+ "&:hover:not(:disabled):not([aria-selected=\"true\"])": { color: y.color.text },
52
+ "&[aria-selected=\"true\"]": {
53
+ color: y.color.text,
54
+ borderColor: y.color.accent
55
+ },
56
+ "&:disabled": {
57
+ opacity: .55,
58
+ cursor: "not-allowed"
59
+ },
60
+ "&:focus-visible": { ...r },
61
+ [a]: { transitionDuration: "0s" },
62
+ [i]: {
63
+ borderColor: "Canvas",
64
+ "&[aria-selected=\"true\"]": { borderColor: "Highlight" }
65
+ }
66
+ }), D = {
67
+ horizontal: e({
68
+ borderBlockEnd: "2px solid transparent",
69
+ marginBlockEnd: "-1px"
70
+ }),
71
+ vertical: e({
72
+ borderInlineEnd: "2px solid transparent",
73
+ marginInlineEnd: "-1px",
74
+ textAlign: "start"
75
+ })
76
+ }, O = e({
77
+ color: y.color.text,
78
+ outline: "none",
79
+ "&:focus-visible": { ...n },
80
+ "&[hidden]": { display: "none" }
81
+ }), k = e({ paddingBlockStart: y.space[3] });
82
+ function A({ ref: e, value: n, defaultValue: r, onValueChange: i, orientation: a = "horizontal", activation: o = "auto", className: s, sx: c, ...u }) {
83
+ let d = m(), [f, p] = l(n, r, i), [h, _] = v(null), y = g(() => ({
84
+ value: f,
85
+ setValue: p,
86
+ focused: h,
87
+ setFocused: _,
88
+ orientation: a,
89
+ activation: o,
90
+ baseId: d
91
+ }), [
92
+ f,
93
+ p,
94
+ h,
95
+ a,
96
+ o,
97
+ d
98
+ ]);
99
+ return /* @__PURE__ */ b(x.Provider, {
100
+ value: y,
101
+ children: /* @__PURE__ */ b(t, {
102
+ className: s,
103
+ styles: w,
104
+ sx: c,
105
+ children: (t) => /* @__PURE__ */ b("div", {
106
+ ...u,
107
+ ref: e,
108
+ "data-ui": "tabs-root",
109
+ "data-orientation": a,
110
+ className: t
111
+ })
112
+ })
113
+ });
114
+ }
115
+ A.displayName = "Tabs";
116
+ function j({ ref: e, onKeyDown: n, className: r, sx: i, ...a }) {
117
+ let { orientation: l, value: u, focused: d, setFocused: f } = S("List"), m = _(null);
118
+ h(e, () => m.current, []), p(() => {
119
+ let e = m.current;
120
+ if (!e) return;
121
+ let t = s(e, C);
122
+ t.length !== 0 && (t.some((e) => e.tabIndex === 0) || f((c(t, u) ?? c(t, d) ?? t[0])?.dataset.value ?? null));
123
+ });
124
+ let g = (e) => {
125
+ n?.(e);
126
+ let t = m.current;
127
+ !e.defaultPrevented && t && o(e, t, l, C);
128
+ };
129
+ return /* @__PURE__ */ b(t, {
130
+ className: r,
131
+ styles: T[l],
132
+ sx: i,
133
+ children: (e) => /* @__PURE__ */ b("div", {
134
+ ...a,
135
+ ref: m,
136
+ role: "tablist",
137
+ "aria-orientation": l,
138
+ "data-ui": "tabs-list",
139
+ "data-orientation": l,
140
+ "data-roving": d ?? "",
141
+ "data-selected": u ?? "",
142
+ onKeyDown: g,
143
+ className: e
144
+ })
145
+ });
146
+ }
147
+ j.displayName = "Tabs.List";
148
+ function M({ ref: e, value: n, disabled: r, onClick: i, onFocus: a, onPointerDown: o, className: s, sx: c, ...l }) {
149
+ let { value: d, setValue: f, focused: p, setFocused: m, activation: h, baseId: g, orientation: v } = S("Tab"), y = d === n, x = !r && (p === null ? y : p === n), C = _(!1), w = (e) => {
150
+ if (i?.(e), e.defaultPrevented) return;
151
+ let t = C.current;
152
+ C.current = !1, !(h === "auto" && t && e.detail !== 0) && f(n);
153
+ }, T = (e) => {
154
+ a?.(e), !e.defaultPrevented && (C.current = !0, m(n), h === "auto" && f(n));
155
+ };
156
+ return /* @__PURE__ */ b(t, {
157
+ className: s,
158
+ styles: [E, D[v]],
159
+ sx: c,
160
+ children: (t) => /* @__PURE__ */ b("button", {
161
+ ...l,
162
+ ref: e,
163
+ type: "button",
164
+ role: "tab",
165
+ id: u(g, "tab", n),
166
+ "data-ui": "tabs-tab",
167
+ "data-value": n,
168
+ "data-state": y ? "active" : "inactive",
169
+ "aria-selected": y,
170
+ "aria-controls": u(g, "panel", n),
171
+ tabIndex: x ? 0 : -1,
172
+ disabled: r,
173
+ onClick: w,
174
+ onFocus: T,
175
+ onPointerDown: (e) => {
176
+ C.current = !1, o?.(e);
177
+ },
178
+ className: t
179
+ })
180
+ });
181
+ }
182
+ M.displayName = "Tabs.Tab";
183
+ function N({ ref: e, value: n, tabIndex: r = 0, "aria-labelledby": i, className: a, sx: o, ...s }) {
184
+ let { value: c, baseId: l, orientation: d } = S("Panel"), f = c === n, p = [i, u(l, "tab", n)].filter(Boolean).join(" ") || void 0;
185
+ return /* @__PURE__ */ b(t, {
186
+ className: a,
187
+ styles: [O, d === "horizontal" && k],
188
+ sx: o,
189
+ children: (t) => /* @__PURE__ */ b("div", {
190
+ ...s,
191
+ ref: e,
192
+ role: "tabpanel",
193
+ id: u(l, "panel", n),
194
+ "aria-labelledby": p,
195
+ tabIndex: r,
196
+ hidden: !f,
197
+ "data-ui": "tabs-panel",
198
+ "data-state": f ? "active" : "inactive",
199
+ className: t
200
+ })
201
+ });
202
+ }
203
+ N.displayName = "Tabs.Panel";
204
+ var P = Object.assign(A, {
205
+ List: j,
206
+ Tab: M,
207
+ Panel: N
208
+ });
209
+ //#endregion
210
+ export { P as t };
package/dist/tabs.js CHANGED
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as Tabs } from "./tabs-CAVJndX1.js";
2
+ export { t as Tabs } from "./tabs-XluwRjgg.js";
@@ -22,36 +22,38 @@ var u = {
22
22
  fontSize: s.textSize.md
23
23
  })
24
24
  };
25
- function d({ ref: e, label: s, description: d, error: f, size: p = "md", onChange: m, onValueChange: h, slotProps: g, className: _, sx: v, required: y, id: b, "aria-describedby": x, "aria-invalid": S, ...C }) {
26
- let w = n({
25
+ function d({ ref: e, label: s, description: d, error: f, size: p = "md", onChange: m, onValueChange: h, slotProps: g, className: _, sx: v, required: y, id: b, dir: x, "aria-describedby": S, "aria-invalid": C, ...w }) {
26
+ let T = n({
27
27
  id: b,
28
28
  description: d,
29
29
  error: f,
30
- "aria-describedby": x,
31
- "aria-invalid": S
32
- }), T = (e) => {
30
+ "aria-describedby": S,
31
+ "aria-invalid": C
32
+ }), E = (e) => {
33
33
  m?.(e), h?.(e.currentTarget.value);
34
34
  };
35
35
  return /* @__PURE__ */ l(r, {
36
36
  "data-ui": "text-field",
37
+ dir: x,
37
38
  className: _,
38
39
  sx: v,
39
40
  part: g?.root,
40
41
  children: [
41
42
  /* @__PURE__ */ c(a, {
42
- htmlFor: w.id,
43
+ htmlFor: T.id,
43
44
  required: y,
44
45
  part: g?.label,
45
46
  children: s
46
47
  }),
47
48
  /* @__PURE__ */ c("input", {
48
- ...C,
49
+ ...w,
49
50
  ref: e,
50
- id: w.id,
51
+ id: T.id,
52
+ dir: x,
51
53
  required: y,
52
- "aria-describedby": w.describedBy,
53
- "aria-invalid": w.ariaInvalid,
54
- onChange: T,
54
+ "aria-describedby": T.describedBy,
55
+ "aria-invalid": T.ariaInvalid,
56
+ onChange: E,
55
57
  className: g?.control?.className,
56
58
  css: [
57
59
  t,
@@ -60,12 +62,12 @@ function d({ ref: e, label: s, description: d, error: f, size: p = "md", onChang
60
62
  ]
61
63
  }),
62
64
  /* @__PURE__ */ c(o, {
63
- id: w.descriptionId,
65
+ id: T.descriptionId,
64
66
  part: g?.description,
65
67
  children: d
66
68
  }),
67
69
  /* @__PURE__ */ c(i, {
68
- id: w.errorId,
70
+ id: T.errorId,
69
71
  part: g?.error,
70
72
  children: f
71
73
  })
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as TextField } from "./text-field-C8TWG-tY.js";
2
+ export { t as TextField } from "./text-field-hU72iSVS.js";
@@ -28,37 +28,39 @@ var u = e({
28
28
  none: e({ resize: "none" }),
29
29
  vertical: e({ resize: "vertical" })
30
30
  }, p = e({ fieldSizing: "content" });
31
- function m({ ref: e, label: s, description: m, error: h, size: g = "md", resize: _ = "vertical", autoResize: v = !1, rows: y = 3, onChange: b, onValueChange: x, slotProps: S, className: C, sx: w, required: T, id: E, "aria-describedby": D, "aria-invalid": O, ...k }) {
32
- let A = n({
33
- id: E,
31
+ function m({ ref: e, label: s, description: m, error: h, size: g = "md", resize: _ = "vertical", autoResize: v = !1, rows: y = 3, onChange: b, onValueChange: x, slotProps: S, className: C, sx: w, dir: T, required: E, id: D, "aria-describedby": O, "aria-invalid": k, ...A }) {
32
+ let j = n({
33
+ id: D,
34
34
  description: m,
35
35
  error: h,
36
- "aria-describedby": D,
37
- "aria-invalid": O
38
- }), j = (e) => {
36
+ "aria-describedby": O,
37
+ "aria-invalid": k
38
+ }), M = (e) => {
39
39
  b?.(e), x?.(e.currentTarget.value);
40
40
  };
41
41
  return /* @__PURE__ */ l(r, {
42
42
  "data-ui": "textarea",
43
+ dir: T,
43
44
  className: C,
44
45
  sx: w,
45
46
  part: S?.root,
46
47
  children: [
47
48
  /* @__PURE__ */ c(a, {
48
- htmlFor: A.id,
49
- required: T,
49
+ htmlFor: j.id,
50
+ required: E,
50
51
  part: S?.label,
51
52
  children: s
52
53
  }),
53
54
  /* @__PURE__ */ c("textarea", {
54
- ...k,
55
+ ...A,
55
56
  ref: e,
56
- id: A.id,
57
+ id: j.id,
57
58
  rows: y,
58
- required: T,
59
- "aria-describedby": A.describedBy,
60
- "aria-invalid": A.ariaInvalid,
61
- onChange: j,
59
+ dir: T,
60
+ required: E,
61
+ "aria-describedby": j.describedBy,
62
+ "aria-invalid": j.ariaInvalid,
63
+ onChange: M,
62
64
  className: S?.control?.className,
63
65
  css: [
64
66
  t,
@@ -70,12 +72,12 @@ function m({ ref: e, label: s, description: m, error: h, size: g = "md", resize:
70
72
  ]
71
73
  }),
72
74
  /* @__PURE__ */ c(o, {
73
- id: A.descriptionId,
75
+ id: j.descriptionId,
74
76
  part: S?.description,
75
77
  children: m
76
78
  }),
77
79
  /* @__PURE__ */ c(i, {
78
- id: A.errorId,
80
+ id: j.errorId,
79
81
  part: S?.error,
80
82
  children: h
81
83
  })
package/dist/textarea.js CHANGED
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as Textarea } from "./textarea-BrW0XcG_.js";
2
+ export { t as Textarea } from "./textarea-3k4Y0QQ3.js";
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as ThemeRoot } from "./theme-root-BbTBuLMQ.js";
2
+ export { t as ThemeRoot } from "./theme-root-Bs1U3uPA.js";