@jfrader/ui 0.1.2 → 0.2.0

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 (144) hide show
  1. package/README.md +1 -1
  2. package/dist/accordion-CkOZ-tvs.js +178 -0
  3. package/dist/accordion.js +1 -1
  4. package/dist/alert-Dsjx14UW.js +131 -0
  5. package/dist/alert.js +1 -1
  6. package/dist/avatar-BRGKkoSr.js +127 -0
  7. package/dist/avatar.js +1 -1
  8. package/dist/badge-DLxUMsCx.js +104 -0
  9. package/dist/badge.js +1 -1
  10. package/dist/breadcrumbs-694hF_hm.js +131 -0
  11. package/dist/breadcrumbs.js +1 -1
  12. package/dist/button-CoaIcykB.js +190 -0
  13. package/dist/button.js +1 -1
  14. package/dist/calendar-Doj7PTdG.js +379 -0
  15. package/dist/calendar.js +1 -1
  16. package/dist/card-2IM71XZj.js +134 -0
  17. package/dist/card.js +1 -1
  18. package/dist/checkbox-B7xGNFzp.js +136 -0
  19. package/dist/checkbox.js +1 -1
  20. package/dist/combobox-Bjhxv5U3.js +311 -0
  21. package/dist/combobox.js +1 -1
  22. package/dist/{command-palette-6c158eH1.js → command-palette-BhJwm6cS.js} +144 -129
  23. package/dist/command-palette.js +1 -1
  24. package/dist/container-BhnrGPu-.js +36 -0
  25. package/dist/container.js +1 -1
  26. package/dist/date-picker-Jk8SpoiO.js +245 -0
  27. package/dist/date-picker.js +1 -1
  28. package/dist/dialog-fhS07G41.js +187 -0
  29. package/dist/dialog.js +1 -1
  30. package/dist/divider-v_78HYF5.js +79 -0
  31. package/dist/divider.js +1 -1
  32. package/dist/flex-COZzFqI8.js +22 -0
  33. package/dist/flex.js +1 -1
  34. package/dist/index.js +36 -36
  35. package/dist/kbd-CeP8Kfvp.js +61 -0
  36. package/dist/kbd.js +1 -1
  37. package/dist/menu-B6KCbLCr.js +196 -0
  38. package/dist/menu.js +1 -1
  39. package/dist/navigation-BDht6S2-.js +182 -0
  40. package/dist/navigation.js +1 -1
  41. package/dist/{pagination-BIKYsxK1.js → pagination-B50PCaDU.js} +58 -56
  42. package/dist/pagination.js +1 -1
  43. package/dist/pill-2_XzBdkD.js +51 -0
  44. package/dist/pill.js +1 -1
  45. package/dist/popover-DRHbeIVq.js +103 -0
  46. package/dist/popover.js +1 -1
  47. package/dist/{progress-C8bgujFI.js → progress-CpsskKTD.js} +37 -36
  48. package/dist/progress.js +1 -1
  49. package/dist/radio-group-DPI5KUCj.js +136 -0
  50. package/dist/radio-group.js +1 -1
  51. package/dist/select-C1xGrOhT.js +266 -0
  52. package/dist/select.js +1 -1
  53. package/dist/skeleton-DitdP-yz.js +49 -0
  54. package/dist/skeleton.js +1 -1
  55. package/dist/{spinner-CSFiP0Oi.js → spinner-CFq5HPoo.js} +24 -23
  56. package/dist/spinner.js +1 -1
  57. package/dist/stack-D_g6NJzo.js +21 -0
  58. package/dist/stack.js +1 -1
  59. package/dist/switch-B5TTU-oJ.js +138 -0
  60. package/dist/switch.js +1 -1
  61. package/dist/tabs-C26PWl2c.js +183 -0
  62. package/dist/tabs.js +1 -1
  63. package/dist/text-field-8PQAqRpM.js +75 -0
  64. package/dist/text-field.js +1 -1
  65. package/dist/textarea-CcGWuntL.js +85 -0
  66. package/dist/textarea.js +1 -1
  67. package/dist/theme-root-BRLIA4eb.js +22 -0
  68. package/dist/theme-root.js +1 -1
  69. package/dist/toast-B1PXuwZ4.js +277 -0
  70. package/dist/toast.js +1 -1
  71. package/dist/toggle-group-N_owicT0.js +156 -0
  72. package/dist/toggle-group.js +1 -1
  73. package/dist/tooltip-BJPisf60.js +98 -0
  74. package/dist/tooltip.js +1 -1
  75. package/dist/types/components/accordion/accordion.d.ts +13 -9
  76. package/dist/types/components/alert/alert.d.ts +6 -3
  77. package/dist/types/components/avatar/avatar.d.ts +6 -3
  78. package/dist/types/components/badge/badge.d.ts +6 -3
  79. package/dist/types/components/breadcrumbs/breadcrumbs.d.ts +8 -5
  80. package/dist/types/components/button/button.d.ts +6 -3
  81. package/dist/types/components/calendar/calendar.d.ts +11 -7
  82. package/dist/types/components/card/card.d.ts +20 -13
  83. package/dist/types/components/checkbox/checkbox.d.ts +6 -3
  84. package/dist/types/components/combobox/combobox.d.ts +12 -8
  85. package/dist/types/components/command-palette/command-palette.d.ts +22 -15
  86. package/dist/types/components/container/container.d.ts +6 -3
  87. package/dist/types/components/date-picker/date-picker.d.ts +6 -4
  88. package/dist/types/components/dialog/dialog.d.ts +16 -11
  89. package/dist/types/components/divider/divider.d.ts +6 -3
  90. package/dist/types/components/flex/flex.d.ts +6 -3
  91. package/dist/types/components/kbd/kbd.d.ts +8 -5
  92. package/dist/types/components/menu/menu.d.ts +13 -9
  93. package/dist/types/components/navigation/navigation.d.ts +11 -7
  94. package/dist/types/components/pagination/pagination.d.ts +6 -3
  95. package/dist/types/components/pill/pill.d.ts +6 -3
  96. package/dist/types/components/popover/popover.d.ts +7 -5
  97. package/dist/types/components/progress/progress.d.ts +6 -3
  98. package/dist/types/components/radio-group/radio-group.d.ts +8 -5
  99. package/dist/types/components/select/select.d.ts +13 -9
  100. package/dist/types/components/skeleton/skeleton.d.ts +6 -3
  101. package/dist/types/components/spinner/spinner.d.ts +6 -3
  102. package/dist/types/components/stack/stack.d.ts +4 -1
  103. package/dist/types/components/switch/switch.d.ts +6 -3
  104. package/dist/types/components/tabs/tabs.d.ts +14 -9
  105. package/dist/types/components/text-field/text-field.d.ts +6 -3
  106. package/dist/types/components/textarea/textarea.d.ts +6 -3
  107. package/dist/types/components/theme-root/theme-root.d.ts +6 -3
  108. package/dist/types/components/toast/toast.d.ts +6 -4
  109. package/dist/types/components/toggle-group/toggle-group.d.ts +7 -5
  110. package/dist/types/components/tooltip/tooltip.d.ts +7 -5
  111. package/dist/types/overlay/use-native-dialog.d.ts +2 -2
  112. package/package.json +4 -4
  113. package/dist/accordion-C3YbYFBi.js +0 -169
  114. package/dist/alert-CA9ZlIZp.js +0 -130
  115. package/dist/avatar-IUW4yJl0.js +0 -125
  116. package/dist/badge-Bru30HEn.js +0 -103
  117. package/dist/breadcrumbs-CQaviWRc.js +0 -126
  118. package/dist/button-Cmixur4Q.js +0 -188
  119. package/dist/calendar-DUgS0xmp.js +0 -373
  120. package/dist/card-D9CHtouU.js +0 -121
  121. package/dist/checkbox-DKa5BCdy.js +0 -135
  122. package/dist/combobox-Dq3V88Zt.js +0 -302
  123. package/dist/container-xUEIoZzj.js +0 -35
  124. package/dist/date-picker-DrHJMt2p.js +0 -240
  125. package/dist/dialog-C2NSOOP-.js +0 -176
  126. package/dist/divider-yF5EmhhT.js +0 -77
  127. package/dist/flex-5-NI5SSy.js +0 -22
  128. package/dist/kbd-B03_qIwQ.js +0 -56
  129. package/dist/menu-bvKRJOhJ.js +0 -187
  130. package/dist/navigation-xPoqh_Iz.js +0 -175
  131. package/dist/pill-CrVqffKM.js +0 -50
  132. package/dist/popover-CVAZ_C1a.js +0 -98
  133. package/dist/radio-group-CvQ4x8ii.js +0 -131
  134. package/dist/select-CNNiUhKB.js +0 -257
  135. package/dist/skeleton-gJ4ImO5u.js +0 -48
  136. package/dist/stack-mEAryjKz.js +0 -21
  137. package/dist/switch-2hm2WnWt.js +0 -136
  138. package/dist/tabs-GBppQabg.js +0 -174
  139. package/dist/text-field-DDPqQu29.js +0 -74
  140. package/dist/textarea-OP8_3IUR.js +0 -84
  141. package/dist/theme-root-eLka0ZP1.js +0 -21
  142. package/dist/toast-D3Y6OAsg.js +0 -271
  143. package/dist/toggle-group-BxzJ-6Cp.js +0 -151
  144. package/dist/tooltip-CVl8HS4S.js +0 -93
@@ -1,136 +0,0 @@
1
- 'use client';
2
- import { t as e } from "./css-Cgj6sCHn.js";
3
- import { n as t } from "./media-D_eA_I-e.js";
4
- import { t as n } from "./renderable-DzcIj1Lo.js";
5
- import { i as r, n as i, r as a, t as o } from "./choice-control-ByFogYcT.js";
6
- import { forwardRef as s, useId as c } from "react";
7
- import { vars as l } from "@jfrader/tokens/vars";
8
- import { jsx as u, jsxs as d } from "@emotion/react/jsx-runtime";
9
- //#region src/components/switch/switch.tsx
10
- var f = {
11
- sm: "36px",
12
- md: "44px"
13
- }, p = e({
14
- position: "relative",
15
- display: "inline-block",
16
- flexShrink: 0,
17
- boxSizing: "border-box",
18
- border: `1px solid ${l.color.borderControl}`,
19
- borderRadius: l.radius.full,
20
- backgroundColor: l.color.surfaceHover,
21
- transitionProperty: "background-color, border-color",
22
- transitionDuration: l.motion.duration.fast,
23
- transitionTimingFunction: l.motion.easeStandard,
24
- "&::after": {
25
- content: "\"\"",
26
- position: "absolute",
27
- insetBlockStart: "2px",
28
- insetInlineStart: "2px",
29
- borderRadius: l.radius.full,
30
- backgroundColor: l.color.text,
31
- transitionProperty: "transform, background-color",
32
- transitionDuration: l.motion.duration.fast,
33
- transitionTimingFunction: l.motion.easeStandard
34
- },
35
- [t]: {
36
- transitionDuration: "0s",
37
- "&::after": { transitionDuration: "0s" }
38
- }
39
- }), m = {
40
- sm: e({
41
- inlineSize: f.sm,
42
- blockSize: "20px",
43
- "&::after": {
44
- inlineSize: "14px",
45
- blockSize: "14px"
46
- }
47
- }),
48
- md: e({
49
- inlineSize: f.md,
50
- blockSize: "24px",
51
- "&::after": {
52
- inlineSize: "18px",
53
- blockSize: "18px"
54
- }
55
- })
56
- }, h = {
57
- sm: e({
58
- "input:checked + span::after": {
59
- transform: "translateX(16px)",
60
- backgroundColor: l.color.accentContrast
61
- },
62
- "&:dir(rtl) input:checked + span::after": { transform: "translateX(-16px)" }
63
- }),
64
- md: e({
65
- "input:checked + span::after": {
66
- transform: "translateX(20px)",
67
- backgroundColor: l.color.accentContrast
68
- },
69
- "&:dir(rtl) input:checked + span::after": { transform: "translateX(-20px)" }
70
- })
71
- }, g = {
72
- sm: e({ fontSize: l.textSize.sm }),
73
- md: e({ fontSize: l.textSize.md })
74
- }, _ = e({
75
- fontSize: l.textSize.sm,
76
- color: l.color.textMuted
77
- }), v = {
78
- sm: e({ marginInlineStart: `calc(${f.sm} + ${l.space[2]})` }),
79
- md: e({ marginInlineStart: `calc(${f.md} + ${l.space[2]})` })
80
- }, y = s(function({ label: e, description: t, size: s = "md", onChange: l, onCheckedChange: f, slotProps: y, className: b, dir: x, "aria-labelledby": S, "aria-describedby": C, ...w }, T) {
81
- let E = c(), D = `${E}-label`, O = `${E}-description`, k = n(e), A = n(t), j = [S, k && D].filter(Boolean).join(" ") || void 0, M = [C, A && O].filter(Boolean).join(" ") || void 0, N = [b, y?.root?.className].filter(Boolean).join(" ") || void 0, P = (e) => {
82
- l?.(e), f?.(e.currentTarget.checked);
83
- };
84
- return /* @__PURE__ */ d("label", {
85
- "data-ui": "switch",
86
- dir: x,
87
- className: N,
88
- css: [
89
- a,
90
- i,
91
- h[s],
92
- y?.root?.css
93
- ],
94
- children: [/* @__PURE__ */ d("span", {
95
- css: r,
96
- children: [
97
- /* @__PURE__ */ u("input", {
98
- ...w,
99
- ref: T,
100
- type: "checkbox",
101
- role: "switch",
102
- "aria-labelledby": j,
103
- "aria-describedby": M,
104
- onChange: P,
105
- css: o
106
- }),
107
- /* @__PURE__ */ u("span", {
108
- "aria-hidden": "true",
109
- className: y?.control?.className,
110
- css: [
111
- p,
112
- m[s],
113
- y?.control?.css
114
- ]
115
- }),
116
- k && /* @__PURE__ */ u("span", {
117
- id: D,
118
- className: y?.label?.className,
119
- css: [g[s], y?.label?.css],
120
- children: e
121
- })
122
- ]
123
- }), A && /* @__PURE__ */ u("span", {
124
- id: O,
125
- className: y?.description?.className,
126
- css: [
127
- _,
128
- v[s],
129
- y?.description?.css
130
- ],
131
- children: t
132
- })]
133
- });
134
- });
135
- //#endregion
136
- export { y as t };
@@ -1,174 +0,0 @@
1
- 'use client';
2
- import { t as e } from "./css-Cgj6sCHn.js";
3
- import { n as t, t as n } from "./focus-ring-BK5W5_NY.js";
4
- import { n as r } from "./media-D_eA_I-e.js";
5
- import { n as i, r as a, t as o } from "./roving-focus-CYlo_Kf8.js";
6
- import { t as s } from "./use-controlled-state-CVXDa-qM.js";
7
- import { t as c } from "./part-id-D0zksy32.js";
8
- import { createContext as l, forwardRef as u, useContext as d, useEffect as f, useId as p, useImperativeHandle as m, useMemo as h, useRef as g, useState as _ } from "react";
9
- import { vars as v } from "@jfrader/tokens/vars";
10
- import { jsx as y } from "@emotion/react/jsx-runtime";
11
- //#region src/components/tabs/tabs.tsx
12
- var b = l(null);
13
- function x(e) {
14
- let t = d(b);
15
- if (!t) throw Error(`Tabs.${e} must be rendered inside <Tabs>.`);
16
- return t;
17
- }
18
- var S = {
19
- itemSelector: "[role=\"tab\"]:not([disabled])",
20
- ownerSelector: "[role=\"tablist\"]"
21
- }, C = e({ "&[data-orientation=\"vertical\"]": {
22
- display: "flex",
23
- alignItems: "flex-start",
24
- gap: v.space[4]
25
- } }), w = {
26
- horizontal: e({
27
- display: "inline-flex",
28
- gap: v.space[1],
29
- borderBlockEnd: `1px solid ${v.color.border}`
30
- }),
31
- vertical: e({
32
- display: "inline-flex",
33
- flexDirection: "column",
34
- alignItems: "stretch",
35
- borderInlineEnd: `1px solid ${v.color.border}`
36
- })
37
- }, T = e({
38
- appearance: "none",
39
- border: 0,
40
- background: "transparent",
41
- cursor: "pointer",
42
- paddingBlock: v.space[2],
43
- paddingInline: v.space[3],
44
- font: "inherit",
45
- fontSize: v.textSize.sm,
46
- fontWeight: v.fontWeight.medium,
47
- color: v.color.textMuted,
48
- transitionProperty: "color, border-color",
49
- transitionDuration: v.motion.duration.fast,
50
- transitionTimingFunction: v.motion.easeStandard,
51
- "&:hover:not(:disabled):not([aria-selected=\"true\"])": { color: v.color.text },
52
- "&[aria-selected=\"true\"]": {
53
- color: v.color.text,
54
- borderColor: v.color.accent
55
- },
56
- "&:disabled": {
57
- opacity: .55,
58
- cursor: "not-allowed"
59
- },
60
- "&:focus-visible": { ...n },
61
- [r]: { transitionDuration: "0s" }
62
- }), E = {
63
- horizontal: e({
64
- borderBlockEnd: "2px solid transparent",
65
- marginBlockEnd: "-1px"
66
- }),
67
- vertical: e({
68
- borderInlineEnd: "2px solid transparent",
69
- marginInlineEnd: "-1px",
70
- textAlign: "start"
71
- })
72
- }, D = e({
73
- color: v.color.text,
74
- outline: "none",
75
- "&:focus-visible": { ...t },
76
- "&[hidden]": { display: "none" }
77
- }), O = e({ paddingBlockStart: v.space[3] }), k = u(function({ value: e, defaultValue: t, onValueChange: n, orientation: r = "horizontal", activation: i = "auto", ...a }, o) {
78
- let c = p(), [l, u] = s(e, t, n), [d, f] = _(null), m = h(() => ({
79
- value: l,
80
- setValue: u,
81
- focused: d,
82
- setFocused: f,
83
- orientation: r,
84
- activation: i,
85
- baseId: c
86
- }), [
87
- l,
88
- u,
89
- d,
90
- r,
91
- i,
92
- c
93
- ]);
94
- return /* @__PURE__ */ y(b.Provider, {
95
- value: m,
96
- children: /* @__PURE__ */ y("div", {
97
- ...a,
98
- ref: o,
99
- "data-ui": "tabs-root",
100
- "data-orientation": r,
101
- css: C
102
- })
103
- });
104
- }), A = u(function({ onKeyDown: e, ...t }, n) {
105
- let { orientation: r, value: s, focused: c, setFocused: l } = x("List"), u = g(null);
106
- m(n, () => u.current, []), f(() => {
107
- let e = u.current;
108
- if (!e) return;
109
- let t = a(e, S);
110
- t.length !== 0 && (t.some((e) => e.tabIndex === 0) || l((o(t, s) ?? o(t, c) ?? t[0])?.dataset.value ?? null));
111
- });
112
- let d = (t) => {
113
- e?.(t);
114
- let n = u.current;
115
- !t.defaultPrevented && n && i(t, n, r, S);
116
- };
117
- return /* @__PURE__ */ y("div", {
118
- ...t,
119
- ref: u,
120
- role: "tablist",
121
- "aria-orientation": r,
122
- "data-ui": "tabs-list",
123
- "data-orientation": r,
124
- "data-roving": c ?? "",
125
- "data-selected": s ?? "",
126
- onKeyDown: d,
127
- css: w[r]
128
- });
129
- }), j = u(function({ value: e, disabled: t, onClick: n, onFocus: r, ...i }, a) {
130
- let { value: o, setValue: s, focused: l, setFocused: u, activation: d, baseId: f, orientation: p } = x("Tab"), m = o === e, h = !t && (l === null ? m : l === e), _ = g(!1), v = (t) => {
131
- if (n?.(t), t.defaultPrevented) return;
132
- let r = _.current;
133
- _.current = !1, !(d === "auto" && r) && s(e);
134
- }, b = (t) => {
135
- r?.(t), !t.defaultPrevented && (_.current = !0, u(e), d === "auto" && s(e));
136
- };
137
- return /* @__PURE__ */ y("button", {
138
- ...i,
139
- ref: a,
140
- type: "button",
141
- role: "tab",
142
- id: c(f, "tab", e),
143
- "data-ui": "tabs-tab",
144
- "data-value": e,
145
- "data-state": m ? "active" : "inactive",
146
- "aria-selected": m,
147
- "aria-controls": c(f, "panel", e),
148
- tabIndex: h ? 0 : -1,
149
- disabled: t,
150
- onClick: v,
151
- onFocus: b,
152
- css: [T, E[p]]
153
- });
154
- }), M = u(function({ value: e, tabIndex: t = 0, "aria-labelledby": n, ...r }, i) {
155
- let { value: a, baseId: o, orientation: s } = x("Panel"), l = a === e, u = [n, c(o, "tab", e)].filter(Boolean).join(" ") || void 0;
156
- return /* @__PURE__ */ y("div", {
157
- ...r,
158
- ref: i,
159
- role: "tabpanel",
160
- id: c(o, "panel", e),
161
- "aria-labelledby": u,
162
- tabIndex: t,
163
- hidden: !l,
164
- "data-ui": "tabs-panel",
165
- "data-state": l ? "active" : "inactive",
166
- css: [D, s === "horizontal" && O]
167
- });
168
- }), N = Object.assign(k, {
169
- List: A,
170
- Tab: j,
171
- Panel: M
172
- });
173
- //#endregion
174
- export { N as t };
@@ -1,74 +0,0 @@
1
- 'use client';
2
- import { t as e } from "./css-Cgj6sCHn.js";
3
- import { a as t, i as n, n as r, o as i, r as a, t as o } from "./field-anatomy-BzGw1Ch9.js";
4
- import { forwardRef as s } from "react";
5
- import { vars as c } from "@jfrader/tokens/vars";
6
- import { jsx as l, jsxs as u } from "@emotion/react/jsx-runtime";
7
- //#region src/components/text-field/text-field.tsx
8
- var d = {
9
- sm: e({
10
- blockSize: "32px",
11
- paddingInline: c.space[3],
12
- fontSize: c.textSize.sm
13
- }),
14
- md: e({
15
- blockSize: "40px",
16
- paddingInline: c.space[4],
17
- fontSize: c.textSize.sm
18
- }),
19
- lg: e({
20
- blockSize: "48px",
21
- paddingInline: c.space[4],
22
- fontSize: c.textSize.md
23
- })
24
- }, f = s(function({ label: e, description: s, error: c, size: f = "md", onChange: p, onValueChange: m, slotProps: h, className: g, required: _, id: v, "aria-describedby": y, "aria-invalid": b, ...x }, S) {
25
- let C = t({
26
- id: v,
27
- description: s,
28
- error: c,
29
- "aria-describedby": y,
30
- "aria-invalid": b
31
- }), w = (e) => {
32
- p?.(e), m?.(e.currentTarget.value);
33
- };
34
- return /* @__PURE__ */ u(n, {
35
- "data-ui": "text-field",
36
- className: g,
37
- part: h?.root,
38
- children: [
39
- /* @__PURE__ */ l(a, {
40
- htmlFor: C.id,
41
- required: _,
42
- part: h?.label,
43
- children: e
44
- }),
45
- /* @__PURE__ */ l("input", {
46
- ...x,
47
- ref: S,
48
- id: C.id,
49
- required: _,
50
- "aria-describedby": C.describedBy,
51
- "aria-invalid": C.ariaInvalid,
52
- onChange: w,
53
- className: h?.control?.className,
54
- css: [
55
- i,
56
- d[f],
57
- h?.control?.css
58
- ]
59
- }),
60
- /* @__PURE__ */ l(o, {
61
- id: C.descriptionId,
62
- part: h?.description,
63
- children: s
64
- }),
65
- /* @__PURE__ */ l(r, {
66
- id: C.errorId,
67
- part: h?.error,
68
- children: c
69
- })
70
- ]
71
- });
72
- });
73
- //#endregion
74
- export { f as t };
@@ -1,84 +0,0 @@
1
- 'use client';
2
- import { t as e } from "./css-Cgj6sCHn.js";
3
- import { a as t, i as n, n as r, o as i, r as a, t as o } from "./field-anatomy-BzGw1Ch9.js";
4
- import { forwardRef as s } from "react";
5
- import { vars as c } from "@jfrader/tokens/vars";
6
- import { jsx as l, jsxs as u } from "@emotion/react/jsx-runtime";
7
- //#region src/components/textarea/textarea.tsx
8
- var d = e({
9
- paddingBlock: c.space[2],
10
- lineHeight: c.lineHeight.base
11
- }), f = {
12
- sm: e({
13
- minBlockSize: "64px",
14
- paddingInline: c.space[3],
15
- fontSize: c.textSize.sm
16
- }),
17
- md: e({
18
- minBlockSize: "80px",
19
- paddingInline: c.space[4],
20
- fontSize: c.textSize.sm
21
- }),
22
- lg: e({
23
- minBlockSize: "96px",
24
- paddingInline: c.space[4],
25
- fontSize: c.textSize.md
26
- })
27
- }, p = {
28
- none: e({ resize: "none" }),
29
- vertical: e({ resize: "vertical" })
30
- }, m = e({ fieldSizing: "content" }), h = s(function({ label: e, description: s, error: c, size: h = "md", resize: g = "vertical", autoResize: _ = !1, rows: v = 3, onChange: y, onValueChange: b, slotProps: x, className: S, required: C, id: w, "aria-describedby": T, "aria-invalid": E, ...D }, O) {
31
- let k = t({
32
- id: w,
33
- description: s,
34
- error: c,
35
- "aria-describedby": T,
36
- "aria-invalid": E
37
- }), A = (e) => {
38
- y?.(e), b?.(e.currentTarget.value);
39
- };
40
- return /* @__PURE__ */ u(n, {
41
- "data-ui": "textarea",
42
- className: S,
43
- part: x?.root,
44
- children: [
45
- /* @__PURE__ */ l(a, {
46
- htmlFor: k.id,
47
- required: C,
48
- part: x?.label,
49
- children: e
50
- }),
51
- /* @__PURE__ */ l("textarea", {
52
- ...D,
53
- ref: O,
54
- id: k.id,
55
- rows: v,
56
- required: C,
57
- "aria-describedby": k.describedBy,
58
- "aria-invalid": k.ariaInvalid,
59
- onChange: A,
60
- className: x?.control?.className,
61
- css: [
62
- i,
63
- d,
64
- f[h],
65
- p[g],
66
- _ && m,
67
- x?.control?.css
68
- ]
69
- }),
70
- /* @__PURE__ */ l(o, {
71
- id: k.descriptionId,
72
- part: x?.description,
73
- children: s
74
- }),
75
- /* @__PURE__ */ l(r, {
76
- id: k.errorId,
77
- part: x?.error,
78
- children: c
79
- })
80
- ]
81
- });
82
- });
83
- //#endregion
84
- export { h as t };
@@ -1,21 +0,0 @@
1
- 'use client';
2
- import { t as e } from "./css-Cgj6sCHn.js";
3
- import { forwardRef as t } from "react";
4
- import { vars as n } from "@jfrader/tokens/vars";
5
- import { jsx as r } from "@emotion/react/jsx-runtime";
6
- //#region src/components/theme-root/theme-root.tsx
7
- var i = e({
8
- color: n.color.text,
9
- colorScheme: "dark",
10
- "&[data-theme=\"light\"]": { colorScheme: "light" }
11
- }), a = t(function({ theme: e, ...t }, n) {
12
- return /* @__PURE__ */ r("div", {
13
- "data-ui": "theme-root",
14
- "data-theme": e ?? "dark",
15
- ...t,
16
- ref: n,
17
- css: i
18
- });
19
- });
20
- //#endregion
21
- export { a as t };