beez-ui 2.7.1 → 3.0.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 (110) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/README.md +43 -13
  3. package/THIRD_PARTY_NOTICES.md +1 -1
  4. package/dist/components/account-menu.d.ts +4 -3
  5. package/dist/components/account-menu.js +63 -54
  6. package/dist/components/alert.d.ts +15 -15
  7. package/dist/components/alert.js +289 -270
  8. package/dist/components/animated-theme-toggler.js +1 -1
  9. package/dist/components/avatar.d.ts +56 -31
  10. package/dist/components/avatar.js +394 -277
  11. package/dist/components/badge.d.ts +8 -28
  12. package/dist/components/badge.js +55 -108
  13. package/dist/components/calendar.d.ts +36 -26
  14. package/dist/components/calendar.js +132 -1227
  15. package/dist/components/card.d.ts +36 -25
  16. package/dist/components/card.js +895 -72
  17. package/dist/components/carousel.d.ts +63 -47
  18. package/dist/components/carousel.js +496 -777
  19. package/dist/components/data-table.d.ts +5 -4
  20. package/dist/components/data-table.js +7 -6
  21. package/dist/components/dialog-surface.d.ts +23 -1
  22. package/dist/components/dialog-surface.js +99 -3
  23. package/dist/components/dialog.d.ts +80 -45
  24. package/dist/components/dialog.js +258 -503
  25. package/dist/components/dropdown-menu.d.ts +56 -73
  26. package/dist/components/dropdown-menu.js +79 -714
  27. package/dist/components/field.d.ts +3 -1
  28. package/dist/components/field.js +49 -39
  29. package/dist/components/filter-presets-bar.js +2 -2
  30. package/dist/components/filter-query-bar.js +1 -1
  31. package/dist/components/hover-card.d.ts +42 -41
  32. package/dist/components/hover-card.js +57 -483
  33. package/dist/components/pagination.d.ts +53 -31
  34. package/dist/components/pagination.js +176 -412
  35. package/dist/components/popover.d.ts +11 -23
  36. package/dist/components/popover.js +19 -304
  37. package/dist/components/{alert-dialog.d.ts → primitives/alert-dialog.d.ts} +17 -5
  38. package/dist/components/{alert-dialog.js → primitives/alert-dialog.js} +102 -54
  39. package/dist/components/primitives/avatar.d.ts +46 -0
  40. package/dist/components/primitives/avatar.js +267 -0
  41. package/dist/components/primitives/calendar.d.ts +37 -0
  42. package/dist/components/primitives/calendar.js +1250 -0
  43. package/dist/components/primitives/carousel.d.ts +106 -0
  44. package/dist/components/primitives/carousel.js +928 -0
  45. package/dist/components/primitives/dialog.d.ts +62 -0
  46. package/dist/components/primitives/dialog.js +490 -0
  47. package/dist/components/primitives/dropdown-menu-items.d.ts +59 -0
  48. package/dist/components/primitives/dropdown-menu-items.js +265 -0
  49. package/dist/components/primitives/dropdown-menu.d.ts +64 -0
  50. package/dist/components/primitives/dropdown-menu.js +557 -0
  51. package/dist/components/primitives/hover-card.d.ts +50 -0
  52. package/dist/components/primitives/hover-card.js +507 -0
  53. package/dist/components/primitives/pagination.d.ts +65 -0
  54. package/dist/components/primitives/pagination.js +373 -0
  55. package/dist/components/primitives/popover.d.ts +22 -0
  56. package/dist/components/primitives/popover.js +213 -0
  57. package/dist/components/primitives/select.d.ts +36 -0
  58. package/dist/components/primitives/select.js +407 -0
  59. package/dist/components/primitives/tooltip.d.ts +30 -0
  60. package/dist/components/primitives/tooltip.js +277 -0
  61. package/dist/components/radio-group.d.ts +30 -17
  62. package/dist/components/radio-group.js +266 -315
  63. package/dist/components/rich-link-editor.js +1 -1
  64. package/dist/components/select.d.ts +51 -42
  65. package/dist/components/select.js +163 -495
  66. package/dist/components/skeleton.d.ts +16 -15
  67. package/dist/components/skeleton.js +99 -205
  68. package/dist/components/split-button.js +1 -1
  69. package/dist/components/switch.d.ts +3 -6
  70. package/dist/components/switch.js +163 -170
  71. package/dist/components/tabs.d.ts +3 -11
  72. package/dist/components/tabs.js +61 -75
  73. package/dist/components/themed-toaster.d.ts +1 -1
  74. package/dist/components/themed-toaster.js +1 -1
  75. package/dist/components/toaster.d.ts +1 -1
  76. package/dist/components/toaster.js +1 -1
  77. package/dist/components/tooltip.d.ts +36 -31
  78. package/dist/components/tooltip.js +44 -284
  79. package/dist/constants/alert.d.ts +5 -1
  80. package/dist/constants/alert.js +5 -1
  81. package/dist/constants/avatar.d.ts +24 -1
  82. package/dist/constants/avatar.js +19 -0
  83. package/dist/constants/calendar.d.ts +12 -0
  84. package/dist/constants/calendar.js +12 -0
  85. package/dist/constants/card.d.ts +23 -0
  86. package/dist/constants/card.js +20 -0
  87. package/dist/constants/carousel.d.ts +31 -13
  88. package/dist/constants/carousel.js +32 -11
  89. package/dist/constants/dialog.d.ts +6 -1
  90. package/dist/constants/dialog.js +5 -1
  91. package/dist/constants/dropdown-menu.d.ts +2 -2
  92. package/dist/constants/dropdown-menu.js +2 -2
  93. package/dist/constants/pagination.d.ts +13 -2
  94. package/dist/constants/pagination.js +13 -2
  95. package/dist/constants/select.d.ts +4 -2
  96. package/dist/constants/select.js +4 -2
  97. package/dist/constants/switch.d.ts +5 -16
  98. package/dist/constants/switch.js +6 -14
  99. package/dist/hooks/use-today.d.ts +7 -0
  100. package/dist/hooks/use-today.js +50 -0
  101. package/dist/hooks.d.ts +1 -0
  102. package/dist/hooks.js +1 -0
  103. package/dist/index.d.ts +0 -1
  104. package/dist/index.js +0 -1
  105. package/dist/motion/glide-indicator.d.ts +1 -1
  106. package/dist/motion/glide-indicator.js +1 -1
  107. package/dist/motion/presence.d.ts +0 -1
  108. package/dist/motion/presence.js +0 -1
  109. package/dist/styles.css +1 -1
  110. package/package.json +1 -6
@@ -1,520 +1,188 @@
1
1
  "use client";
2
2
  import { c as _c } from "react/compiler-runtime";
3
- /**
4
- * Arc's Select (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md) as beez-ui's composable Radix select:
5
- * Arc's trigger, whose hover, press and open states answer in color only so the anchored list never shifts, and its
6
- * raised list with option rows and an end check, on Arc's tokens. It keeps every subcomponent, prop and `data-slot`
7
- * of the previous API and beez-ui's option entrance, check pop and chevron rotation.
8
- */
9
- import * as React from "react";
10
- import { Select as SelectPrimitive } from "radix-ui";
11
- import { SELECT_COLLISION_PADDING_PX } from "../constants/select.js";
12
- import { GlideSlot } from "../motion/glide-slot.js";
13
- import { MotionSlot } from "../motion/motion-slot.js";
3
+ import { SELECT_DEFAULT_PLACEHOLDER } from "../constants/select.js";
14
4
  import { cn } from "../lib/utils.js";
15
- import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react";
5
+ import { Field, useFieldAria } from "./field.js";
6
+ import { Select as SelectRoot, SelectContent, SelectItem, SelectTrigger, SelectValue } from "./primitives/select.js";
16
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
- function Select(t0) {
18
- const $ = _c(4);
19
- let props;
20
- if ($[0] !== t0) {
21
- ({...props} = t0);
22
- $[0] = t0;
23
- $[1] = props;
24
- } else {
25
- props = $[1];
26
- }
27
- let t1;
28
- if ($[2] !== props) {
29
- t1 = /* @__PURE__ */ _jsx(SelectPrimitive.Root, {
30
- "data-slot": "select",
31
- ...props
32
- });
33
- $[2] = props;
34
- $[3] = t1;
35
- } else {
36
- t1 = $[3];
37
- }
38
- return t1;
39
- }
40
- function SelectGroup(t0) {
41
- const $ = _c(8);
42
- let className;
43
- let props;
44
- if ($[0] !== t0) {
45
- ({className, ...props} = t0);
46
- $[0] = t0;
47
- $[1] = className;
48
- $[2] = props;
49
- } else {
50
- className = $[1];
51
- props = $[2];
52
- }
53
- let t1;
54
- if ($[3] !== className) {
55
- t1 = cn("scroll-my-1.5", className);
56
- $[3] = className;
57
- $[4] = t1;
58
- } else {
59
- t1 = $[4];
60
- }
61
- let t2;
62
- if ($[5] !== props || $[6] !== t1) {
63
- t2 = /* @__PURE__ */ _jsx(SelectPrimitive.Group, {
64
- "data-slot": "select-group",
65
- className: t1,
66
- ...props
67
- });
68
- $[5] = props;
69
- $[6] = t1;
70
- $[7] = t2;
71
- } else {
72
- t2 = $[7];
73
- }
74
- return t2;
75
- }
76
- function SelectValue(t0) {
77
- const $ = _c(4);
78
- let props;
79
- if ($[0] !== t0) {
80
- ({...props} = t0);
81
- $[0] = t0;
82
- $[1] = props;
83
- } else {
84
- props = $[1];
85
- }
86
- let t1;
87
- if ($[2] !== props) {
88
- t1 = /* @__PURE__ */ _jsx(SelectPrimitive.Value, {
89
- "data-slot": "select-value",
90
- ...props
91
- });
92
- $[2] = props;
93
- $[3] = t1;
94
- } else {
95
- t1 = $[3];
96
- }
97
- return t1;
98
- }
99
- /**
100
- * Renders Arc's selection control: `default` matches the height of `Input` and `Button`, `sm` their small size.
101
- * Hover only answers on fine pointers, keyboard focus draws the shared outline, and `aria-invalid` turns the border
102
- * to the danger color.
103
- * @param props - Primitive properties, the `size` and optional consumer overrides.
104
- * @returns The styled primitive with its original interaction contract.
105
- */
106
- function SelectTrigger(t0) {
107
- const $ = _c(13);
108
- let children;
109
- let className;
110
- let props;
111
- let t1;
112
- if ($[0] !== t0) {
113
- ({className, size: t1, children, ...props} = t0);
114
- $[0] = t0;
115
- $[1] = children;
116
- $[2] = className;
117
- $[3] = props;
118
- $[4] = t1;
119
- } else {
120
- children = $[1];
121
- className = $[2];
122
- props = $[3];
123
- t1 = $[4];
124
- }
125
- const size = t1 === undefined ? "default" : t1;
126
- let t2;
127
- if ($[5] !== className) {
128
- t2 = cn("flex w-fit cursor-pointer items-center justify-between gap-3 rounded-(--radius-control) border border-border bg-surface px-3 text-left text-sm whitespace-nowrap text-foreground outline-none select-none transition-[color,background-color,border-color,box-shadow] duration-(--duration-fast) ease-(--ease-standard) motion-reduce:transition-none hover-fine:not-disabled:not-aria-invalid:border-border-strong hover-fine:not-disabled:bg-surface-muted active:not-disabled:not-aria-invalid:border-border-strong active:not-disabled:bg-surface-muted data-[state=open]:not-aria-invalid:border-border-strong data-[state=open]:bg-surface-muted focus-visible:not-aria-invalid:border-border-strong disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-danger data-placeholder:text-text-muted data-[size=default]:min-h-(--control-height-md) data-[size=sm]:min-h-(--control-height-sm) data-[state=open]:*:data-[slot=select-icon]:rotate-180 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className);
129
- $[5] = className;
130
- $[6] = t2;
131
- } else {
132
- t2 = $[6];
133
- }
134
- let t3;
135
- if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
136
- t3 = /* @__PURE__ */ _jsx(SelectPrimitive.Icon, {
137
- asChild: true,
138
- children: /* @__PURE__ */ _jsx(MotionSlot, {
139
- kind: "rotate",
140
- children: /* @__PURE__ */ _jsx(ChevronDownIcon, {
141
- "data-slot": "select-icon",
142
- strokeWidth: 1.75,
143
- className: "pointer-events-none size-4 text-text-muted"
144
- })
145
- })
146
- });
147
- $[7] = t3;
148
- } else {
149
- t3 = $[7];
150
- }
151
- let t4;
152
- if ($[8] !== children || $[9] !== props || $[10] !== size || $[11] !== t2) {
153
- t4 = /* @__PURE__ */ _jsx(MotionSlot, {
154
- kind: "field",
155
- children: /* @__PURE__ */ _jsxs(SelectPrimitive.Trigger, {
156
- "data-slot": "select-trigger",
157
- "data-size": size,
158
- className: t2,
159
- ...props,
160
- children: [children, t3]
161
- })
162
- });
163
- $[8] = children;
164
- $[9] = props;
165
- $[10] = size;
166
- $[11] = t2;
167
- $[12] = t4;
168
- } else {
169
- t4 = $[12];
170
- }
171
- return t4;
172
- }
173
8
  /**
174
- * Renders Arc's raised option list, at least twelve rem wide so options stay readable. With `position="popper"` it
175
- * grows from the trigger edge, matches the trigger width, keeps 12px from the viewport edges and caps its height at
176
- * 20rem.
177
- * @param props - Primitive properties and optional consumer overrides.
178
- * @returns The styled primitive with its original interaction contract.
9
+ * A compact choice field with a keyboard friendly list, controlled with `value` and `onValueChange` or uncontrolled
10
+ * with `defaultValue`; pass `name` to submit it with a form.
11
+ * @param props - Label, options, optional copy and layout, and Radix select root properties.
12
+ * @returns The labelled field.
179
13
  */
180
- function SelectContent(t0) {
181
- const $ = _c(23);
182
- let children;
14
+ function Select(t0) {
15
+ const $ = _c(49);
16
+ let ariaDescribedBy;
17
+ let ariaInvalid;
183
18
  let className;
184
- let props;
19
+ let description;
20
+ let error;
21
+ let id;
22
+ let label;
23
+ let options;
24
+ let ref;
25
+ let rootProps;
26
+ let size;
185
27
  let t1;
186
28
  let t2;
187
- let t3;
29
+ let triggerClassName;
188
30
  if ($[0] !== t0) {
189
- ({className, children, position: t1, align: t2, collisionPadding: t3, ...props} = t0);
31
+ ({label, options, placeholder: t1, description, error, id, className, hideLabel: t2, size, triggerClassName, "aria-invalid": ariaInvalid, "aria-describedby": ariaDescribedBy, ref, ...rootProps} = t0);
190
32
  $[0] = t0;
191
- $[1] = children;
192
- $[2] = className;
193
- $[3] = props;
194
- $[4] = t1;
195
- $[5] = t2;
196
- $[6] = t3;
197
- } else {
198
- children = $[1];
199
- className = $[2];
200
- props = $[3];
201
- t1 = $[4];
202
- t2 = $[5];
203
- t3 = $[6];
204
- }
205
- const position = t1 === undefined ? "item-aligned" : t1;
206
- const align = t2 === undefined ? "center" : t2;
207
- const collisionPadding = t3 === undefined ? SELECT_COLLISION_PADDING_PX : t3;
208
- const t4 = position === "item-aligned";
209
- const t5 = position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";
210
- let t6;
211
- if ($[7] !== className || $[8] !== t5) {
212
- t6 = cn("relative z-50 max-h-[min(20rem,var(--radix-select-content-available-height))] min-w-48 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-[calc(var(--radius-control)+2px)] border border-border bg-surface-raised p-1.5 text-foreground shadow-(--shadow-floating)", t5, className);
213
- $[7] = className;
214
- $[8] = t5;
215
- $[9] = t6;
216
- } else {
217
- t6 = $[9];
218
- }
219
- let t7;
220
- if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
221
- t7 = /* @__PURE__ */ _jsx(SelectScrollUpButton, {});
222
- $[10] = t7;
223
- } else {
224
- t7 = $[10];
225
- }
33
+ $[1] = ariaDescribedBy;
34
+ $[2] = ariaInvalid;
35
+ $[3] = className;
36
+ $[4] = description;
37
+ $[5] = error;
38
+ $[6] = id;
39
+ $[7] = label;
40
+ $[8] = options;
41
+ $[9] = ref;
42
+ $[10] = rootProps;
43
+ $[11] = size;
44
+ $[12] = t1;
45
+ $[13] = t2;
46
+ $[14] = triggerClassName;
47
+ } else {
48
+ ariaDescribedBy = $[1];
49
+ ariaInvalid = $[2];
50
+ className = $[3];
51
+ description = $[4];
52
+ error = $[5];
53
+ id = $[6];
54
+ label = $[7];
55
+ options = $[8];
56
+ ref = $[9];
57
+ rootProps = $[10];
58
+ size = $[11];
59
+ t1 = $[12];
60
+ t2 = $[13];
61
+ triggerClassName = $[14];
62
+ }
63
+ const placeholder = t1 === undefined ? SELECT_DEFAULT_PLACEHOLDER : t1;
64
+ const hideLabel = t2 === undefined ? false : t2;
65
+ let t3;
66
+ if ($[15] !== ariaDescribedBy || $[16] !== ariaInvalid || $[17] !== description || $[18] !== error || $[19] !== id) {
67
+ t3 = {
68
+ id,
69
+ description,
70
+ error,
71
+ "aria-invalid": ariaInvalid,
72
+ "aria-describedby": ariaDescribedBy
73
+ };
74
+ $[15] = ariaDescribedBy;
75
+ $[16] = ariaInvalid;
76
+ $[17] = description;
77
+ $[18] = error;
78
+ $[19] = id;
79
+ $[20] = t3;
80
+ } else {
81
+ t3 = $[20];
82
+ }
83
+ const aria = useFieldAria(t3);
84
+ const t4 = aria.controlId;
85
+ let t5;
86
+ if ($[21] !== triggerClassName) {
87
+ t5 = cn("w-full min-w-0", triggerClassName);
88
+ $[21] = triggerClassName;
89
+ $[22] = t5;
90
+ } else {
91
+ t5 = $[22];
92
+ }
93
+ const t6 = aria["aria-describedby"];
94
+ const t7 = aria["aria-invalid"];
226
95
  let t8;
227
- if ($[11] !== children || $[12] !== position) {
228
- t8 = /* @__PURE__ */ _jsx(SelectPrimitive.Viewport, {
229
- "data-position": position,
230
- className: "py-0.5 data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",
231
- children
232
- });
233
- $[11] = children;
234
- $[12] = position;
235
- $[13] = t8;
96
+ if ($[23] !== placeholder) {
97
+ t8 = /* @__PURE__ */ _jsx(SelectValue, { placeholder });
98
+ $[23] = placeholder;
99
+ $[24] = t8;
236
100
  } else {
237
- t8 = $[13];
101
+ t8 = $[24];
238
102
  }
239
103
  let t9;
240
- if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
241
- t9 = /* @__PURE__ */ _jsx(SelectScrollDownButton, {});
242
- $[14] = t9;
243
- } else {
244
- t9 = $[14];
245
- }
246
- let t10;
247
- if ($[15] !== align || $[16] !== collisionPadding || $[17] !== position || $[18] !== props || $[19] !== t4 || $[20] !== t6 || $[21] !== t8) {
248
- t10 = /* @__PURE__ */ _jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ _jsx(MotionSlot, {
249
- kind: "surface",
250
- children: /* @__PURE__ */ _jsx(GlideSlot, {
251
- preset: "menu",
252
- children: /* @__PURE__ */ _jsxs(SelectPrimitive.Content, {
253
- "data-slot": "select-content",
254
- "data-align-trigger": t4,
255
- className: t6,
256
- position,
257
- align,
258
- collisionPadding,
259
- ...props,
260
- children: [
261
- t7,
262
- t8,
263
- t9
264
- ]
265
- })
266
- })
267
- }) });
268
- $[15] = align;
269
- $[16] = collisionPadding;
270
- $[17] = position;
271
- $[18] = props;
272
- $[19] = t4;
273
- $[20] = t6;
274
- $[21] = t8;
275
- $[22] = t10;
276
- } else {
277
- t10 = $[22];
278
- }
279
- return t10;
280
- }
281
- /**
282
- * Renders a muted option group label aligned with the option text.
283
- * @param props - Primitive properties and optional consumer overrides.
284
- * @returns The styled primitive with its original interaction contract.
285
- */
286
- function SelectLabel(t0) {
287
- const $ = _c(8);
288
- let className;
289
- let props;
290
- if ($[0] !== t0) {
291
- ({className, ...props} = t0);
292
- $[0] = t0;
293
- $[1] = className;
294
- $[2] = props;
295
- } else {
296
- className = $[1];
297
- props = $[2];
298
- }
299
- let t1;
300
- if ($[3] !== className) {
301
- t1 = cn("px-[11px] py-1.5 text-xs font-medium text-text-muted", className);
302
- $[3] = className;
303
- $[4] = t1;
304
- } else {
305
- t1 = $[4];
306
- }
307
- let t2;
308
- if ($[5] !== props || $[6] !== t1) {
309
- t2 = /* @__PURE__ */ _jsx(SelectPrimitive.Label, {
310
- "data-slot": "select-label",
311
- className: t1,
312
- ...props
104
+ if ($[25] !== aria.controlId || $[26] !== ref || $[27] !== size || $[28] !== t5 || $[29] !== t6 || $[30] !== t7 || $[31] !== t8) {
105
+ t9 = /* @__PURE__ */ _jsx(SelectTrigger, {
106
+ ref,
107
+ id: t4,
108
+ size,
109
+ className: t5,
110
+ "aria-describedby": t6,
111
+ "aria-invalid": t7,
112
+ children: t8
313
113
  });
314
- $[5] = props;
315
- $[6] = t1;
316
- $[7] = t2;
114
+ $[25] = aria.controlId;
115
+ $[26] = ref;
116
+ $[27] = size;
117
+ $[28] = t5;
118
+ $[29] = t6;
119
+ $[30] = t7;
120
+ $[31] = t8;
121
+ $[32] = t9;
317
122
  } else {
318
- t2 = $[7];
123
+ t9 = $[32];
319
124
  }
320
- return t2;
321
- }
322
- /**
323
- * Renders Arc's option row: 36px tall, a muted fill when highlighted and the check of the chosen option at the end,
324
- * while retaining selection and disabled semantics.
325
- * @param props - Primitive properties and optional consumer overrides.
326
- * @returns The styled primitive with its original interaction contract.
327
- */
328
- function SelectItem(t0) {
329
- const $ = _c(13);
330
- let children;
331
- let className;
332
- let props;
333
- if ($[0] !== t0) {
334
- ({className, children, ...props} = t0);
335
- $[0] = t0;
336
- $[1] = children;
337
- $[2] = className;
338
- $[3] = props;
339
- } else {
340
- children = $[1];
341
- className = $[2];
342
- props = $[3];
343
- }
344
- let t1;
345
- if ($[4] !== className) {
346
- t1 = cn("relative flex min-h-9 w-full cursor-default items-center gap-1.5 rounded-[calc(var(--radius-control)-4px)] py-1 pr-[34px] pl-[11px] text-sm text-foreground outline-hidden select-none transition-colors duration-(--duration-instant) ease-(--ease-standard) motion-reduce:transition-none data-highlighted:bg-surface-muted data-disabled:pointer-events-none data-disabled:opacity-45 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className);
347
- $[4] = className;
348
- $[5] = t1;
349
- } else {
350
- t1 = $[5];
351
- }
352
- let t2;
353
- if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
354
- t2 = /* @__PURE__ */ _jsx("span", {
355
- className: "pointer-events-none absolute right-2.5 flex size-4 items-center justify-center text-foreground",
356
- children: /* @__PURE__ */ _jsx(MotionSlot, {
357
- kind: "item-check",
358
- children: /* @__PURE__ */ _jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ _jsx(CheckIcon, {
359
- strokeWidth: 1.75,
360
- className: "pointer-events-none"
361
- }) })
362
- })
125
+ let t10;
126
+ if ($[33] !== options) {
127
+ t10 = options.map(_temp);
128
+ $[33] = options;
129
+ $[34] = t10;
130
+ } else {
131
+ t10 = $[34];
132
+ }
133
+ let t11;
134
+ if ($[35] !== t10) {
135
+ t11 = /* @__PURE__ */ _jsx(SelectContent, {
136
+ position: "popper",
137
+ children: t10
363
138
  });
364
- $[6] = t2;
139
+ $[35] = t10;
140
+ $[36] = t11;
365
141
  } else {
366
- t2 = $[6];
142
+ t11 = $[36];
367
143
  }
368
- let t3;
369
- if ($[7] !== children) {
370
- t3 = /* @__PURE__ */ _jsx(SelectPrimitive.ItemText, { children });
371
- $[7] = children;
372
- $[8] = t3;
373
- } else {
374
- t3 = $[8];
375
- }
376
- let t4;
377
- if ($[9] !== props || $[10] !== t1 || $[11] !== t3) {
378
- t4 = /* @__PURE__ */ _jsx(MotionSlot, {
379
- kind: "list-item",
380
- children: /* @__PURE__ */ _jsxs(SelectPrimitive.Item, {
381
- "data-slot": "select-item",
382
- className: t1,
383
- ...props,
384
- children: [t2, t3]
385
- })
144
+ let t12;
145
+ if ($[37] !== rootProps || $[38] !== t11 || $[39] !== t9) {
146
+ t12 = /* @__PURE__ */ _jsxs(SelectRoot, {
147
+ ...rootProps,
148
+ children: [t9, t11]
386
149
  });
387
- $[9] = props;
388
- $[10] = t1;
389
- $[11] = t3;
390
- $[12] = t4;
391
- } else {
392
- t4 = $[12];
393
- }
394
- return t4;
395
- }
396
- function SelectSeparator(t0) {
397
- const $ = _c(8);
398
- let className;
399
- let props;
400
- if ($[0] !== t0) {
401
- ({className, ...props} = t0);
402
- $[0] = t0;
403
- $[1] = className;
404
- $[2] = props;
405
- } else {
406
- className = $[1];
407
- props = $[2];
408
- }
409
- let t1;
410
- if ($[3] !== className) {
411
- t1 = cn("pointer-events-none -mx-1.5 my-1 h-px bg-border-subtle", className);
412
- $[3] = className;
413
- $[4] = t1;
414
- } else {
415
- t1 = $[4];
416
- }
417
- let t2;
418
- if ($[5] !== props || $[6] !== t1) {
419
- t2 = /* @__PURE__ */ _jsx(SelectPrimitive.Separator, {
420
- "data-slot": "select-separator",
421
- className: t1,
422
- ...props
423
- });
424
- $[5] = props;
425
- $[6] = t1;
426
- $[7] = t2;
427
- } else {
428
- t2 = $[7];
429
- }
430
- return t2;
431
- }
432
- function SelectScrollUpButton(t0) {
433
- const $ = _c(9);
434
- let className;
435
- let props;
436
- if ($[0] !== t0) {
437
- ({className, ...props} = t0);
438
- $[0] = t0;
439
- $[1] = className;
440
- $[2] = props;
441
- } else {
442
- className = $[1];
443
- props = $[2];
444
- }
445
- let t1;
446
- if ($[3] !== className) {
447
- t1 = cn("z-10 flex h-7 cursor-default items-center justify-center bg-surface-raised text-text-muted [&_svg:not([class*='size-'])]:size-4", className);
448
- $[3] = className;
449
- $[4] = t1;
450
- } else {
451
- t1 = $[4];
452
- }
453
- let t2;
454
- if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
455
- t2 = /* @__PURE__ */ _jsx(ChevronUpIcon, { strokeWidth: 1.75 });
456
- $[5] = t2;
457
- } else {
458
- t2 = $[5];
459
- }
460
- let t3;
461
- if ($[6] !== props || $[7] !== t1) {
462
- t3 = /* @__PURE__ */ _jsx(SelectPrimitive.ScrollUpButton, {
463
- "data-slot": "select-scroll-up-button",
464
- className: t1,
465
- ...props,
466
- children: t2
150
+ $[37] = rootProps;
151
+ $[38] = t11;
152
+ $[39] = t9;
153
+ $[40] = t12;
154
+ } else {
155
+ t12 = $[40];
156
+ }
157
+ let t13;
158
+ if ($[41] !== aria || $[42] !== className || $[43] !== description || $[44] !== error || $[45] !== hideLabel || $[46] !== label || $[47] !== t12) {
159
+ t13 = /* @__PURE__ */ _jsx(Field, {
160
+ label,
161
+ hideLabel,
162
+ description,
163
+ error,
164
+ aria,
165
+ className,
166
+ children: t12
467
167
  });
468
- $[6] = props;
469
- $[7] = t1;
470
- $[8] = t3;
471
- } else {
472
- t3 = $[8];
473
- }
474
- return t3;
168
+ $[41] = aria;
169
+ $[42] = className;
170
+ $[43] = description;
171
+ $[44] = error;
172
+ $[45] = hideLabel;
173
+ $[46] = label;
174
+ $[47] = t12;
175
+ $[48] = t13;
176
+ } else {
177
+ t13 = $[48];
178
+ }
179
+ return t13;
475
180
  }
476
- function SelectScrollDownButton(t0) {
477
- const $ = _c(9);
478
- let className;
479
- let props;
480
- if ($[0] !== t0) {
481
- ({className, ...props} = t0);
482
- $[0] = t0;
483
- $[1] = className;
484
- $[2] = props;
485
- } else {
486
- className = $[1];
487
- props = $[2];
488
- }
489
- let t1;
490
- if ($[3] !== className) {
491
- t1 = cn("z-10 flex h-7 cursor-default items-center justify-center bg-surface-raised text-text-muted [&_svg:not([class*='size-'])]:size-4", className);
492
- $[3] = className;
493
- $[4] = t1;
494
- } else {
495
- t1 = $[4];
496
- }
497
- let t2;
498
- if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
499
- t2 = /* @__PURE__ */ _jsx(ChevronDownIcon, { strokeWidth: 1.75 });
500
- $[5] = t2;
501
- } else {
502
- t2 = $[5];
503
- }
504
- let t3;
505
- if ($[6] !== props || $[7] !== t1) {
506
- t3 = /* @__PURE__ */ _jsx(SelectPrimitive.ScrollDownButton, {
507
- "data-slot": "select-scroll-down-button",
508
- className: t1,
509
- ...props,
510
- children: t2
511
- });
512
- $[6] = props;
513
- $[7] = t1;
514
- $[8] = t3;
515
- } else {
516
- t3 = $[8];
517
- }
518
- return t3;
181
+ function _temp(option) {
182
+ return /* @__PURE__ */ _jsx(SelectItem, {
183
+ value: option.value,
184
+ disabled: option.disabled,
185
+ children: option.label
186
+ }, option.value);
519
187
  }
520
- export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
188
+ export { Select };