@jfrader/ui 0.1.1 → 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 (167) hide show
  1. package/README.md +3 -1
  2. package/dist/accordion-CkOZ-tvs.js +178 -0
  3. package/dist/accordion.js +2 -1
  4. package/dist/alert-Dsjx14UW.js +131 -0
  5. package/dist/alert.js +2 -1
  6. package/dist/avatar-BRGKkoSr.js +127 -0
  7. package/dist/avatar.js +2 -1
  8. package/dist/badge-DLxUMsCx.js +104 -0
  9. package/dist/badge.js +2 -1
  10. package/dist/breadcrumbs-694hF_hm.js +131 -0
  11. package/dist/breadcrumbs.js +2 -1
  12. package/dist/button-CoaIcykB.js +190 -0
  13. package/dist/button.js +2 -1
  14. package/dist/calendar-Doj7PTdG.js +379 -0
  15. package/dist/calendar.js +2 -1
  16. package/dist/card-2IM71XZj.js +134 -0
  17. package/dist/card.js +2 -1
  18. package/dist/checkbox-B7xGNFzp.js +136 -0
  19. package/dist/checkbox.js +2 -1
  20. package/dist/{choice-control-DCyQ_hVw.js → choice-control-ByFogYcT.js} +2 -1
  21. package/dist/{collection-registry-C2jnQa7X.js → collection-registry-1l9f3XJZ.js} +3 -2
  22. package/dist/combobox-Bjhxv5U3.js +311 -0
  23. package/dist/combobox.js +2 -1
  24. package/dist/command-palette-BhJwm6cS.js +344 -0
  25. package/dist/command-palette.js +2 -1
  26. package/dist/container-BhnrGPu-.js +36 -0
  27. package/dist/container.js +2 -1
  28. package/dist/{css-CW_HG55W.js → css-Cgj6sCHn.js} +1 -0
  29. package/dist/date-picker-Jk8SpoiO.js +245 -0
  30. package/dist/date-picker.js +2 -1
  31. package/dist/dialog-fhS07G41.js +187 -0
  32. package/dist/dialog.js +2 -1
  33. package/dist/{disclosure-caret-BC6P8AsM.js → disclosure-caret-C5T3fcl6.js} +1 -0
  34. package/dist/divider-v_78HYF5.js +79 -0
  35. package/dist/divider.js +2 -1
  36. package/dist/{field-anatomy-DKkB268x.js → field-anatomy-BzGw1Ch9.js} +4 -3
  37. package/dist/flex-COZzFqI8.js +22 -0
  38. package/dist/flex.js +2 -1
  39. package/dist/{focus-ring-qOS3rPlM.js → focus-ring-BK5W5_NY.js} +1 -0
  40. package/dist/{icon-wrapper-BKo4FI-O.js → icon-wrapper-CFWzew5m.js} +2 -1
  41. package/dist/index.js +37 -36
  42. package/dist/kbd-CeP8Kfvp.js +61 -0
  43. package/dist/kbd.js +2 -1
  44. package/dist/{layout-style-B_6YHQ6Q.js → layout-style-7ZTOiWGR.js} +2 -1
  45. package/dist/{loading-ring-CTpT-IrT.js → loading-ring-BpdB0aFi.js} +2 -1
  46. package/dist/{media-8K3xDAxM.js → media-D_eA_I-e.js} +1 -0
  47. package/dist/menu-B6KCbLCr.js +196 -0
  48. package/dist/menu.js +2 -1
  49. package/dist/navigation-BDht6S2-.js +182 -0
  50. package/dist/navigation.js +2 -1
  51. package/dist/pagination-B50PCaDU.js +151 -0
  52. package/dist/pagination.js +2 -1
  53. package/dist/{part-id-Bg1LSlk7.js → part-id-D0zksy32.js} +1 -0
  54. package/dist/pill-2_XzBdkD.js +51 -0
  55. package/dist/pill.js +2 -1
  56. package/dist/popover-DRHbeIVq.js +103 -0
  57. package/dist/popover.js +2 -1
  58. package/dist/progress-CpsskKTD.js +85 -0
  59. package/dist/progress.js +2 -1
  60. package/dist/radio-group-DPI5KUCj.js +136 -0
  61. package/dist/radio-group.js +2 -1
  62. package/dist/{renderable-DwPvt1I8.js → renderable-DzcIj1Lo.js} +1 -0
  63. package/dist/{roving-focus-DeEZ55-T.js → roving-focus-CYlo_Kf8.js} +1 -0
  64. package/dist/select-C1xGrOhT.js +266 -0
  65. package/dist/select.js +2 -1
  66. package/dist/skeleton-DitdP-yz.js +49 -0
  67. package/dist/skeleton.js +2 -1
  68. package/dist/spinner-CFq5HPoo.js +51 -0
  69. package/dist/spinner.js +2 -1
  70. package/dist/stack-D_g6NJzo.js +21 -0
  71. package/dist/stack.js +2 -1
  72. package/dist/{surface-Bo_aSQOb.js → surface-DZ4d-2aL.js} +1 -0
  73. package/dist/switch-B5TTU-oJ.js +138 -0
  74. package/dist/switch.js +2 -1
  75. package/dist/tabs-C26PWl2c.js +183 -0
  76. package/dist/tabs.js +2 -1
  77. package/dist/text-field-8PQAqRpM.js +75 -0
  78. package/dist/text-field.js +2 -1
  79. package/dist/textarea-CcGWuntL.js +85 -0
  80. package/dist/textarea.js +2 -1
  81. package/dist/theme-root-BRLIA4eb.js +22 -0
  82. package/dist/theme-root.js +2 -1
  83. package/dist/toast-B1PXuwZ4.js +277 -0
  84. package/dist/toast.js +2 -1
  85. package/dist/toggle-group-N_owicT0.js +156 -0
  86. package/dist/toggle-group.js +2 -1
  87. package/dist/tooltip-BJPisf60.js +98 -0
  88. package/dist/tooltip.js +2 -1
  89. package/dist/{trigger-style-f54idgjT.js → trigger-style-B1GFmH7M.js} +2 -1
  90. package/dist/types/components/accordion/accordion.d.ts +13 -9
  91. package/dist/types/components/alert/alert.d.ts +6 -3
  92. package/dist/types/components/avatar/avatar.d.ts +6 -3
  93. package/dist/types/components/badge/badge.d.ts +6 -3
  94. package/dist/types/components/breadcrumbs/breadcrumbs.d.ts +8 -5
  95. package/dist/types/components/button/button.d.ts +6 -3
  96. package/dist/types/components/calendar/calendar.d.ts +11 -7
  97. package/dist/types/components/card/card.d.ts +20 -13
  98. package/dist/types/components/checkbox/checkbox.d.ts +6 -3
  99. package/dist/types/components/combobox/combobox.d.ts +12 -8
  100. package/dist/types/components/command-palette/command-palette.d.ts +22 -15
  101. package/dist/types/components/container/container.d.ts +6 -3
  102. package/dist/types/components/date-picker/date-picker.d.ts +6 -4
  103. package/dist/types/components/dialog/dialog.d.ts +16 -11
  104. package/dist/types/components/divider/divider.d.ts +6 -3
  105. package/dist/types/components/flex/flex.d.ts +6 -3
  106. package/dist/types/components/kbd/kbd.d.ts +8 -5
  107. package/dist/types/components/menu/menu.d.ts +13 -9
  108. package/dist/types/components/navigation/navigation.d.ts +11 -7
  109. package/dist/types/components/pagination/pagination.d.ts +6 -3
  110. package/dist/types/components/pill/pill.d.ts +6 -3
  111. package/dist/types/components/popover/popover.d.ts +7 -5
  112. package/dist/types/components/progress/progress.d.ts +6 -3
  113. package/dist/types/components/radio-group/radio-group.d.ts +8 -5
  114. package/dist/types/components/select/select.d.ts +13 -9
  115. package/dist/types/components/skeleton/skeleton.d.ts +6 -3
  116. package/dist/types/components/spinner/spinner.d.ts +6 -3
  117. package/dist/types/components/stack/stack.d.ts +4 -1
  118. package/dist/types/components/switch/switch.d.ts +6 -3
  119. package/dist/types/components/tabs/tabs.d.ts +14 -9
  120. package/dist/types/components/text-field/text-field.d.ts +6 -3
  121. package/dist/types/components/textarea/textarea.d.ts +6 -3
  122. package/dist/types/components/theme-root/theme-root.d.ts +6 -3
  123. package/dist/types/components/toast/toast.d.ts +6 -4
  124. package/dist/types/components/toggle-group/toggle-group.d.ts +7 -5
  125. package/dist/types/components/tooltip/tooltip.d.ts +7 -5
  126. package/dist/types/overlay/use-native-dialog.d.ts +2 -2
  127. package/dist/{use-controlled-state-DQXkiTQI.js → use-controlled-state-CVXDa-qM.js} +1 -0
  128. package/dist/{use-native-dialog-BCp1chwO.js → use-native-dialog-DWpIUVO1.js} +1 -0
  129. package/dist/{use-overlay-floating-CsZd3qxa.js → use-overlay-floating-efeqppiw.js} +1 -0
  130. package/dist/{visually-hidden-BXVyhj0y.js → visually-hidden-DCWhf0Cb.js} +2 -1
  131. package/package.json +4 -4
  132. package/dist/accordion-Dl-kvgPQ.js +0 -168
  133. package/dist/alert-BzntPa_5.js +0 -129
  134. package/dist/avatar-Dk2ES3ru.js +0 -124
  135. package/dist/badge-DZefC7rm.js +0 -102
  136. package/dist/breadcrumbs-5MCZ_Jr3.js +0 -125
  137. package/dist/button-qy-50NPd.js +0 -187
  138. package/dist/calendar-DcCAiN3b.js +0 -372
  139. package/dist/card-L-Z_1vZN.js +0 -120
  140. package/dist/checkbox-B7em7B-6.js +0 -134
  141. package/dist/combobox-DQcXR94r.js +0 -301
  142. package/dist/command-palette-BRJ8A5De.js +0 -328
  143. package/dist/container-COHiEjI8.js +0 -34
  144. package/dist/date-picker-D1GwiRB9.js +0 -239
  145. package/dist/dialog-CYf9fCZO.js +0 -175
  146. package/dist/divider-bi7OgCI5.js +0 -76
  147. package/dist/flex-CDFDDaiu.js +0 -21
  148. package/dist/kbd-DpiJgDJ2.js +0 -55
  149. package/dist/menu-A9fZUaAG.js +0 -186
  150. package/dist/navigation-Cemnmc_J.js +0 -174
  151. package/dist/pagination-orCjUsn_.js +0 -148
  152. package/dist/pill-Dg2JJHHW.js +0 -49
  153. package/dist/popover-D_YU34WS.js +0 -97
  154. package/dist/progress-XdvBG0Vv.js +0 -83
  155. package/dist/radio-group-CxMJ2Vq7.js +0 -130
  156. package/dist/select-mwFbmzsn.js +0 -256
  157. package/dist/skeleton-qas9ZKK9.js +0 -47
  158. package/dist/spinner-ros2CfIf.js +0 -49
  159. package/dist/stack-Hs8THnIL.js +0 -20
  160. package/dist/switch-E375Bz4X.js +0 -135
  161. package/dist/tabs-CBwRiuul.js +0 -173
  162. package/dist/text-field-BlP8qGn_.js +0 -73
  163. package/dist/textarea-CUG26CH2.js +0 -83
  164. package/dist/theme-root-CrdzwfSo.js +0 -20
  165. package/dist/toast-D_dnqnn-.js +0 -270
  166. package/dist/toggle-group-B7gXCea8.js +0 -150
  167. package/dist/tooltip-BJ2hLV1b.js +0 -92
@@ -1,135 +0,0 @@
1
- import { t as e } from "./css-CW_HG55W.js";
2
- import { n as t } from "./media-8K3xDAxM.js";
3
- import { t as n } from "./renderable-DwPvt1I8.js";
4
- import { i as r, n as i, r as a, t as o } from "./choice-control-DCyQ_hVw.js";
5
- import { forwardRef as s, useId as c } from "react";
6
- import { vars as l } from "@jfrader/tokens/vars";
7
- import { jsx as u, jsxs as d } from "@emotion/react/jsx-runtime";
8
- //#region src/components/switch/switch.tsx
9
- var f = {
10
- sm: "36px",
11
- md: "44px"
12
- }, p = e({
13
- position: "relative",
14
- display: "inline-block",
15
- flexShrink: 0,
16
- boxSizing: "border-box",
17
- border: `1px solid ${l.color.borderControl}`,
18
- borderRadius: l.radius.full,
19
- backgroundColor: l.color.surfaceHover,
20
- transitionProperty: "background-color, border-color",
21
- transitionDuration: l.motion.duration.fast,
22
- transitionTimingFunction: l.motion.easeStandard,
23
- "&::after": {
24
- content: "\"\"",
25
- position: "absolute",
26
- insetBlockStart: "2px",
27
- insetInlineStart: "2px",
28
- borderRadius: l.radius.full,
29
- backgroundColor: l.color.text,
30
- transitionProperty: "transform, background-color",
31
- transitionDuration: l.motion.duration.fast,
32
- transitionTimingFunction: l.motion.easeStandard
33
- },
34
- [t]: {
35
- transitionDuration: "0s",
36
- "&::after": { transitionDuration: "0s" }
37
- }
38
- }), m = {
39
- sm: e({
40
- inlineSize: f.sm,
41
- blockSize: "20px",
42
- "&::after": {
43
- inlineSize: "14px",
44
- blockSize: "14px"
45
- }
46
- }),
47
- md: e({
48
- inlineSize: f.md,
49
- blockSize: "24px",
50
- "&::after": {
51
- inlineSize: "18px",
52
- blockSize: "18px"
53
- }
54
- })
55
- }, h = {
56
- sm: e({
57
- "input:checked + span::after": {
58
- transform: "translateX(16px)",
59
- backgroundColor: l.color.accentContrast
60
- },
61
- "&:dir(rtl) input:checked + span::after": { transform: "translateX(-16px)" }
62
- }),
63
- md: e({
64
- "input:checked + span::after": {
65
- transform: "translateX(20px)",
66
- backgroundColor: l.color.accentContrast
67
- },
68
- "&:dir(rtl) input:checked + span::after": { transform: "translateX(-20px)" }
69
- })
70
- }, g = {
71
- sm: e({ fontSize: l.textSize.sm }),
72
- md: e({ fontSize: l.textSize.md })
73
- }, _ = e({
74
- fontSize: l.textSize.sm,
75
- color: l.color.textMuted
76
- }), v = {
77
- sm: e({ marginInlineStart: `calc(${f.sm} + ${l.space[2]})` }),
78
- md: e({ marginInlineStart: `calc(${f.md} + ${l.space[2]})` })
79
- }, 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) {
80
- 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) => {
81
- l?.(e), f?.(e.currentTarget.checked);
82
- };
83
- return /* @__PURE__ */ d("label", {
84
- "data-ui": "switch",
85
- dir: x,
86
- className: N,
87
- css: [
88
- a,
89
- i,
90
- h[s],
91
- y?.root?.css
92
- ],
93
- children: [/* @__PURE__ */ d("span", {
94
- css: r,
95
- children: [
96
- /* @__PURE__ */ u("input", {
97
- ...w,
98
- ref: T,
99
- type: "checkbox",
100
- role: "switch",
101
- "aria-labelledby": j,
102
- "aria-describedby": M,
103
- onChange: P,
104
- css: o
105
- }),
106
- /* @__PURE__ */ u("span", {
107
- "aria-hidden": "true",
108
- className: y?.control?.className,
109
- css: [
110
- p,
111
- m[s],
112
- y?.control?.css
113
- ]
114
- }),
115
- k && /* @__PURE__ */ u("span", {
116
- id: D,
117
- className: y?.label?.className,
118
- css: [g[s], y?.label?.css],
119
- children: e
120
- })
121
- ]
122
- }), A && /* @__PURE__ */ u("span", {
123
- id: O,
124
- className: y?.description?.className,
125
- css: [
126
- _,
127
- v[s],
128
- y?.description?.css
129
- ],
130
- children: t
131
- })]
132
- });
133
- });
134
- //#endregion
135
- export { y as t };
@@ -1,173 +0,0 @@
1
- import { t as e } from "./css-CW_HG55W.js";
2
- import { n as t, t as n } from "./focus-ring-qOS3rPlM.js";
3
- import { n as r } from "./media-8K3xDAxM.js";
4
- import { n as i, r as a, t as o } from "./roving-focus-DeEZ55-T.js";
5
- import { t as s } from "./use-controlled-state-DQXkiTQI.js";
6
- import { t as c } from "./part-id-Bg1LSlk7.js";
7
- 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";
8
- import { vars as v } from "@jfrader/tokens/vars";
9
- import { jsx as y } from "@emotion/react/jsx-runtime";
10
- //#region src/components/tabs/tabs.tsx
11
- var b = l(null);
12
- function x(e) {
13
- let t = d(b);
14
- if (!t) throw Error(`Tabs.${e} must be rendered inside <Tabs>.`);
15
- return t;
16
- }
17
- var S = {
18
- itemSelector: "[role=\"tab\"]:not([disabled])",
19
- ownerSelector: "[role=\"tablist\"]"
20
- }, C = e({ "&[data-orientation=\"vertical\"]": {
21
- display: "flex",
22
- alignItems: "flex-start",
23
- gap: v.space[4]
24
- } }), w = {
25
- horizontal: e({
26
- display: "inline-flex",
27
- gap: v.space[1],
28
- borderBlockEnd: `1px solid ${v.color.border}`
29
- }),
30
- vertical: e({
31
- display: "inline-flex",
32
- flexDirection: "column",
33
- alignItems: "stretch",
34
- borderInlineEnd: `1px solid ${v.color.border}`
35
- })
36
- }, T = e({
37
- appearance: "none",
38
- border: 0,
39
- background: "transparent",
40
- cursor: "pointer",
41
- paddingBlock: v.space[2],
42
- paddingInline: v.space[3],
43
- font: "inherit",
44
- fontSize: v.textSize.sm,
45
- fontWeight: v.fontWeight.medium,
46
- color: v.color.textMuted,
47
- transitionProperty: "color, border-color",
48
- transitionDuration: v.motion.duration.fast,
49
- transitionTimingFunction: v.motion.easeStandard,
50
- "&:hover:not(:disabled):not([aria-selected=\"true\"])": { color: v.color.text },
51
- "&[aria-selected=\"true\"]": {
52
- color: v.color.text,
53
- borderColor: v.color.accent
54
- },
55
- "&:disabled": {
56
- opacity: .55,
57
- cursor: "not-allowed"
58
- },
59
- "&:focus-visible": { ...n },
60
- [r]: { transitionDuration: "0s" }
61
- }), E = {
62
- horizontal: e({
63
- borderBlockEnd: "2px solid transparent",
64
- marginBlockEnd: "-1px"
65
- }),
66
- vertical: e({
67
- borderInlineEnd: "2px solid transparent",
68
- marginInlineEnd: "-1px",
69
- textAlign: "start"
70
- })
71
- }, D = e({
72
- color: v.color.text,
73
- outline: "none",
74
- "&:focus-visible": { ...t },
75
- "&[hidden]": { display: "none" }
76
- }), O = e({ paddingBlockStart: v.space[3] }), k = u(function({ value: e, defaultValue: t, onValueChange: n, orientation: r = "horizontal", activation: i = "auto", ...a }, o) {
77
- let c = p(), [l, u] = s(e, t, n), [d, f] = _(null), m = h(() => ({
78
- value: l,
79
- setValue: u,
80
- focused: d,
81
- setFocused: f,
82
- orientation: r,
83
- activation: i,
84
- baseId: c
85
- }), [
86
- l,
87
- u,
88
- d,
89
- r,
90
- i,
91
- c
92
- ]);
93
- return /* @__PURE__ */ y(b.Provider, {
94
- value: m,
95
- children: /* @__PURE__ */ y("div", {
96
- ...a,
97
- ref: o,
98
- "data-ui": "tabs-root",
99
- "data-orientation": r,
100
- css: C
101
- })
102
- });
103
- }), A = u(function({ onKeyDown: e, ...t }, n) {
104
- let { orientation: r, value: s, focused: c, setFocused: l } = x("List"), u = g(null);
105
- m(n, () => u.current, []), f(() => {
106
- let e = u.current;
107
- if (!e) return;
108
- let t = a(e, S);
109
- t.length !== 0 && (t.some((e) => e.tabIndex === 0) || l((o(t, s) ?? o(t, c) ?? t[0])?.dataset.value ?? null));
110
- });
111
- let d = (t) => {
112
- e?.(t);
113
- let n = u.current;
114
- !t.defaultPrevented && n && i(t, n, r, S);
115
- };
116
- return /* @__PURE__ */ y("div", {
117
- ...t,
118
- ref: u,
119
- role: "tablist",
120
- "aria-orientation": r,
121
- "data-ui": "tabs-list",
122
- "data-orientation": r,
123
- "data-roving": c ?? "",
124
- "data-selected": s ?? "",
125
- onKeyDown: d,
126
- css: w[r]
127
- });
128
- }), j = u(function({ value: e, disabled: t, onClick: n, onFocus: r, ...i }, a) {
129
- 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) => {
130
- if (n?.(t), t.defaultPrevented) return;
131
- let r = _.current;
132
- _.current = !1, !(d === "auto" && r) && s(e);
133
- }, b = (t) => {
134
- r?.(t), !t.defaultPrevented && (_.current = !0, u(e), d === "auto" && s(e));
135
- };
136
- return /* @__PURE__ */ y("button", {
137
- ...i,
138
- ref: a,
139
- type: "button",
140
- role: "tab",
141
- id: c(f, "tab", e),
142
- "data-ui": "tabs-tab",
143
- "data-value": e,
144
- "data-state": m ? "active" : "inactive",
145
- "aria-selected": m,
146
- "aria-controls": c(f, "panel", e),
147
- tabIndex: h ? 0 : -1,
148
- disabled: t,
149
- onClick: v,
150
- onFocus: b,
151
- css: [T, E[p]]
152
- });
153
- }), M = u(function({ value: e, tabIndex: t = 0, "aria-labelledby": n, ...r }, i) {
154
- let { value: a, baseId: o, orientation: s } = x("Panel"), l = a === e, u = [n, c(o, "tab", e)].filter(Boolean).join(" ") || void 0;
155
- return /* @__PURE__ */ y("div", {
156
- ...r,
157
- ref: i,
158
- role: "tabpanel",
159
- id: c(o, "panel", e),
160
- "aria-labelledby": u,
161
- tabIndex: t,
162
- hidden: !l,
163
- "data-ui": "tabs-panel",
164
- "data-state": l ? "active" : "inactive",
165
- css: [D, s === "horizontal" && O]
166
- });
167
- }), N = Object.assign(k, {
168
- List: A,
169
- Tab: j,
170
- Panel: M
171
- });
172
- //#endregion
173
- export { N as t };
@@ -1,73 +0,0 @@
1
- import { t as e } from "./css-CW_HG55W.js";
2
- import { a as t, i as n, n as r, o as i, r as a, t as o } from "./field-anatomy-DKkB268x.js";
3
- import { forwardRef as s } from "react";
4
- import { vars as c } from "@jfrader/tokens/vars";
5
- import { jsx as l, jsxs as u } from "@emotion/react/jsx-runtime";
6
- //#region src/components/text-field/text-field.tsx
7
- var d = {
8
- sm: e({
9
- blockSize: "32px",
10
- paddingInline: c.space[3],
11
- fontSize: c.textSize.sm
12
- }),
13
- md: e({
14
- blockSize: "40px",
15
- paddingInline: c.space[4],
16
- fontSize: c.textSize.sm
17
- }),
18
- lg: e({
19
- blockSize: "48px",
20
- paddingInline: c.space[4],
21
- fontSize: c.textSize.md
22
- })
23
- }, 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) {
24
- let C = t({
25
- id: v,
26
- description: s,
27
- error: c,
28
- "aria-describedby": y,
29
- "aria-invalid": b
30
- }), w = (e) => {
31
- p?.(e), m?.(e.currentTarget.value);
32
- };
33
- return /* @__PURE__ */ u(n, {
34
- "data-ui": "text-field",
35
- className: g,
36
- part: h?.root,
37
- children: [
38
- /* @__PURE__ */ l(a, {
39
- htmlFor: C.id,
40
- required: _,
41
- part: h?.label,
42
- children: e
43
- }),
44
- /* @__PURE__ */ l("input", {
45
- ...x,
46
- ref: S,
47
- id: C.id,
48
- required: _,
49
- "aria-describedby": C.describedBy,
50
- "aria-invalid": C.ariaInvalid,
51
- onChange: w,
52
- className: h?.control?.className,
53
- css: [
54
- i,
55
- d[f],
56
- h?.control?.css
57
- ]
58
- }),
59
- /* @__PURE__ */ l(o, {
60
- id: C.descriptionId,
61
- part: h?.description,
62
- children: s
63
- }),
64
- /* @__PURE__ */ l(r, {
65
- id: C.errorId,
66
- part: h?.error,
67
- children: c
68
- })
69
- ]
70
- });
71
- });
72
- //#endregion
73
- export { f as t };
@@ -1,83 +0,0 @@
1
- import { t as e } from "./css-CW_HG55W.js";
2
- import { a as t, i as n, n as r, o as i, r as a, t as o } from "./field-anatomy-DKkB268x.js";
3
- import { forwardRef as s } from "react";
4
- import { vars as c } from "@jfrader/tokens/vars";
5
- import { jsx as l, jsxs as u } from "@emotion/react/jsx-runtime";
6
- //#region src/components/textarea/textarea.tsx
7
- var d = e({
8
- paddingBlock: c.space[2],
9
- lineHeight: c.lineHeight.base
10
- }), f = {
11
- sm: e({
12
- minBlockSize: "64px",
13
- paddingInline: c.space[3],
14
- fontSize: c.textSize.sm
15
- }),
16
- md: e({
17
- minBlockSize: "80px",
18
- paddingInline: c.space[4],
19
- fontSize: c.textSize.sm
20
- }),
21
- lg: e({
22
- minBlockSize: "96px",
23
- paddingInline: c.space[4],
24
- fontSize: c.textSize.md
25
- })
26
- }, p = {
27
- none: e({ resize: "none" }),
28
- vertical: e({ resize: "vertical" })
29
- }, 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) {
30
- let k = t({
31
- id: w,
32
- description: s,
33
- error: c,
34
- "aria-describedby": T,
35
- "aria-invalid": E
36
- }), A = (e) => {
37
- y?.(e), b?.(e.currentTarget.value);
38
- };
39
- return /* @__PURE__ */ u(n, {
40
- "data-ui": "textarea",
41
- className: S,
42
- part: x?.root,
43
- children: [
44
- /* @__PURE__ */ l(a, {
45
- htmlFor: k.id,
46
- required: C,
47
- part: x?.label,
48
- children: e
49
- }),
50
- /* @__PURE__ */ l("textarea", {
51
- ...D,
52
- ref: O,
53
- id: k.id,
54
- rows: v,
55
- required: C,
56
- "aria-describedby": k.describedBy,
57
- "aria-invalid": k.ariaInvalid,
58
- onChange: A,
59
- className: x?.control?.className,
60
- css: [
61
- i,
62
- d,
63
- f[h],
64
- p[g],
65
- _ && m,
66
- x?.control?.css
67
- ]
68
- }),
69
- /* @__PURE__ */ l(o, {
70
- id: k.descriptionId,
71
- part: x?.description,
72
- children: s
73
- }),
74
- /* @__PURE__ */ l(r, {
75
- id: k.errorId,
76
- part: x?.error,
77
- children: c
78
- })
79
- ]
80
- });
81
- });
82
- //#endregion
83
- export { h as t };
@@ -1,20 +0,0 @@
1
- import { t as e } from "./css-CW_HG55W.js";
2
- import { forwardRef as t } from "react";
3
- import { vars as n } from "@jfrader/tokens/vars";
4
- import { jsx as r } from "@emotion/react/jsx-runtime";
5
- //#region src/components/theme-root/theme-root.tsx
6
- var i = e({
7
- color: n.color.text,
8
- colorScheme: "dark",
9
- "&[data-theme=\"light\"]": { colorScheme: "light" }
10
- }), a = t(function({ theme: e, ...t }, n) {
11
- return /* @__PURE__ */ r("div", {
12
- "data-ui": "theme-root",
13
- "data-theme": e ?? "dark",
14
- ...t,
15
- ref: n,
16
- css: i
17
- });
18
- });
19
- //#endregion
20
- export { a as t };