jenosize-ui 0.1.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 (182) hide show
  1. package/LICENSE +28 -0
  2. package/README.md +100 -0
  3. package/THIRD-PARTY-NOTICES.md +163 -0
  4. package/dist/Button-Bt7pzM4R.d.ts +82 -0
  5. package/dist/PaymentInput-CKPIPNWH.d.ts +141 -0
  6. package/dist/Select-CVbEQ2Ep.d.ts +118 -0
  7. package/dist/TagInput-CTJYOB4J.d.ts +90 -0
  8. package/dist/avatar.d.ts +161 -0
  9. package/dist/avatar.js +11 -0
  10. package/dist/badge.d.ts +109 -0
  11. package/dist/badge.js +10 -0
  12. package/dist/breadcrumb.d.ts +58 -0
  13. package/dist/breadcrumb.js +7 -0
  14. package/dist/button.d.ts +54 -0
  15. package/dist/button.js +14 -0
  16. package/dist/calendar.d.ts +368 -0
  17. package/dist/calendar.js +21 -0
  18. package/dist/callout.d.ts +70 -0
  19. package/dist/callout.js +16 -0
  20. package/dist/card-nWicloNi.d.ts +80 -0
  21. package/dist/card.d.ts +2 -0
  22. package/dist/card.js +7 -0
  23. package/dist/checkbox.d.ts +133 -0
  24. package/dist/checkbox.js +11 -0
  25. package/dist/chunk-24TO7E32.js +42 -0
  26. package/dist/chunk-3Y5X7B5C.js +146 -0
  27. package/dist/chunk-4OLULPQG.js +202 -0
  28. package/dist/chunk-4P2NBLBW.js +103 -0
  29. package/dist/chunk-52IFGFTL.js +11 -0
  30. package/dist/chunk-5FATN5YD.js +115 -0
  31. package/dist/chunk-5NOBSXJN.js +297 -0
  32. package/dist/chunk-5RAPA22E.js +106 -0
  33. package/dist/chunk-7EUAMHMU.js +16 -0
  34. package/dist/chunk-7EWQKTNQ.js +1336 -0
  35. package/dist/chunk-7HOIZ3UO.js +110 -0
  36. package/dist/chunk-7IU5TMFL.js +452 -0
  37. package/dist/chunk-7JBNLEJ7.js +29 -0
  38. package/dist/chunk-7S2TBALK.js +23 -0
  39. package/dist/chunk-BJUZVYQC.js +188 -0
  40. package/dist/chunk-BVJWBYIG.js +66 -0
  41. package/dist/chunk-CME4DIML.js +65 -0
  42. package/dist/chunk-CYPPEUX5.js +73 -0
  43. package/dist/chunk-D5BTFSL7.js +71 -0
  44. package/dist/chunk-D6TPWNRK.js +387 -0
  45. package/dist/chunk-DJSXIAFH.js +66 -0
  46. package/dist/chunk-DRZCJCBO.js +46 -0
  47. package/dist/chunk-DWKILXHE.js +17 -0
  48. package/dist/chunk-E7ZSWBAK.js +70 -0
  49. package/dist/chunk-EDSK6FEH.js +8 -0
  50. package/dist/chunk-F2K7VJUV.js +114 -0
  51. package/dist/chunk-F6NLE6XJ.js +40 -0
  52. package/dist/chunk-FHHAPGCR.js +32 -0
  53. package/dist/chunk-FXIBGTS5.js +14 -0
  54. package/dist/chunk-GCVA3OIV.js +72 -0
  55. package/dist/chunk-GFOAJVW5.js +336 -0
  56. package/dist/chunk-GRLSUQQE.js +136 -0
  57. package/dist/chunk-GTHJWR3Q.js +77 -0
  58. package/dist/chunk-HMUZE6EK.js +67 -0
  59. package/dist/chunk-I7WU4GTY.js +503 -0
  60. package/dist/chunk-J2BCKBHC.js +151 -0
  61. package/dist/chunk-J36M3KRX.js +1315 -0
  62. package/dist/chunk-J7ZQQFPT.js +113 -0
  63. package/dist/chunk-JP26LPCY.js +234 -0
  64. package/dist/chunk-JTNFJLIY.js +1046 -0
  65. package/dist/chunk-JVJRHBTD.js +50 -0
  66. package/dist/chunk-JYGR44ZC.js +133 -0
  67. package/dist/chunk-KDLPXXD2.js +173 -0
  68. package/dist/chunk-KMSYEE23.js +224 -0
  69. package/dist/chunk-KNYKWUYX.js +52 -0
  70. package/dist/chunk-LME57Z6J.js +138 -0
  71. package/dist/chunk-MFJP5FA7.js +20 -0
  72. package/dist/chunk-MKC5HNA7.js +1692 -0
  73. package/dist/chunk-MQGD2OUF.js +39 -0
  74. package/dist/chunk-MUFHLP4S.js +566 -0
  75. package/dist/chunk-O2LG3PNI.js +74 -0
  76. package/dist/chunk-O4GRKO3I.js +66 -0
  77. package/dist/chunk-OHUFNYGN.js +791 -0
  78. package/dist/chunk-PWKWNDBS.js +243 -0
  79. package/dist/chunk-QA74ITR4.js +103 -0
  80. package/dist/chunk-R6RGJF4L.js +170 -0
  81. package/dist/chunk-S7NNXWIN.js +7 -0
  82. package/dist/chunk-SV56BSUQ.js +162 -0
  83. package/dist/chunk-T7FCG7XV.js +435 -0
  84. package/dist/chunk-THC2ISYP.js +57 -0
  85. package/dist/chunk-VWC72TR3.js +115 -0
  86. package/dist/chunk-W46K56XU.js +216 -0
  87. package/dist/chunk-W5GGOUUI.js +75 -0
  88. package/dist/chunk-WEUJYDCV.js +269 -0
  89. package/dist/chunk-WFY7DKQD.js +279 -0
  90. package/dist/chunk-WZQFC7ZN.js +448 -0
  91. package/dist/chunk-Z3ETJN5G.js +136 -0
  92. package/dist/chunk-ZOOX3TUB.js +192 -0
  93. package/dist/chunk-ZSNJ6UA3.js +42 -0
  94. package/dist/chunk-ZZA2LUTL.js +130 -0
  95. package/dist/chunk-ZZT2E5VT.js +24 -0
  96. package/dist/color-CtSxc1Rh.d.ts +6 -0
  97. package/dist/combobox.d.ts +184 -0
  98. package/dist/combobox.js +21 -0
  99. package/dist/date-input.d.ts +83 -0
  100. package/dist/date-input.js +16 -0
  101. package/dist/date-picker.d.ts +249 -0
  102. package/dist/date-picker.js +29 -0
  103. package/dist/date-utils-7hTFTXNK.d.ts +34 -0
  104. package/dist/date-vMJBKAFK.d.ts +22 -0
  105. package/dist/dialog.d.ts +86 -0
  106. package/dist/dialog.js +15 -0
  107. package/dist/drawer.d.ts +77 -0
  108. package/dist/drawer.js +14 -0
  109. package/dist/dropdown-menu.d.ts +218 -0
  110. package/dist/dropdown-menu.js +10 -0
  111. package/dist/file-trigger.d.ts +42 -0
  112. package/dist/file-trigger.js +3 -0
  113. package/dist/form.d.ts +487 -0
  114. package/dist/form.js +1179 -0
  115. package/dist/header-navigation.d.ts +74 -0
  116. package/dist/header-navigation.js +23 -0
  117. package/dist/icons/app.d.ts +48 -0
  118. package/dist/icons/app.js +282 -0
  119. package/dist/icons/flag.d.ts +817 -0
  120. package/dist/icons/flag.js +58336 -0
  121. package/dist/icons/integration.d.ts +36 -0
  122. package/dist/icons/integration.js +531 -0
  123. package/dist/icons/payment.d.ts +116 -0
  124. package/dist/icons/payment.js +2418 -0
  125. package/dist/icons.d.ts +2013 -0
  126. package/dist/icons.js +2012 -0
  127. package/dist/illustration.d.ts +48 -0
  128. package/dist/illustration.js +4 -0
  129. package/dist/index.d.ts +68 -0
  130. package/dist/index.js +73 -0
  131. package/dist/indicator.d.ts +51 -0
  132. package/dist/indicator.js +7 -0
  133. package/dist/input.d.ts +66 -0
  134. package/dist/input.js +15 -0
  135. package/dist/multi-value-CJb_tnvi.d.ts +8 -0
  136. package/dist/nav-Bla0o_-1.d.ts +98 -0
  137. package/dist/number-input.d.ts +80 -0
  138. package/dist/number-input.js +15 -0
  139. package/dist/options-CPEIgjtd.d.ts +68 -0
  140. package/dist/overflow-Df0h42Oi.d.ts +29 -0
  141. package/dist/pagination.d.ts +77 -0
  142. package/dist/pagination.js +17 -0
  143. package/dist/payment-input.d.ts +7 -0
  144. package/dist/payment-input.js +15 -0
  145. package/dist/popover.d.ts +60 -0
  146. package/dist/popover.js +14 -0
  147. package/dist/progress.d.ts +87 -0
  148. package/dist/progress.js +5 -0
  149. package/dist/radio.d.ts +77 -0
  150. package/dist/radio.js +12 -0
  151. package/dist/select.d.ts +68 -0
  152. package/dist/select.js +24 -0
  153. package/dist/shared-BNXAdgh2.d.ts +9 -0
  154. package/dist/shared-BYXJPnsN.d.ts +11 -0
  155. package/dist/shared-Dc-GgA16.d.ts +42 -0
  156. package/dist/sidebar-navigation.d.ts +129 -0
  157. package/dist/sidebar-navigation.js +15 -0
  158. package/dist/styles.css +2 -0
  159. package/dist/switch.d.ts +23 -0
  160. package/dist/switch.js +7 -0
  161. package/dist/table.d.ts +692 -0
  162. package/dist/table.js +44 -0
  163. package/dist/tabs.d.ts +111 -0
  164. package/dist/tabs.js +8 -0
  165. package/dist/tag-input.d.ts +12 -0
  166. package/dist/tag-input.js +19 -0
  167. package/dist/tag.d.ts +98 -0
  168. package/dist/tag.js +9 -0
  169. package/dist/textarea.d.ts +40 -0
  170. package/dist/textarea.js +12 -0
  171. package/dist/theme-script.d.ts +29 -0
  172. package/dist/theme-script.js +15 -0
  173. package/dist/theme.css +929 -0
  174. package/dist/theme.d.ts +71 -0
  175. package/dist/theme.js +15 -0
  176. package/dist/toast.d.ts +242 -0
  177. package/dist/toast.js +15 -0
  178. package/dist/tooltip.d.ts +70 -0
  179. package/dist/tooltip.js +6 -0
  180. package/dist/tree.d.ts +308 -0
  181. package/dist/tree.js +11 -0
  182. package/package.json +352 -0
@@ -0,0 +1,435 @@
1
+ import { INTRINSIC_CELL, INTRINSIC_STACK, IntrinsicWidth } from './chunk-7S2TBALK.js';
2
+ import { NO_RETURN_FOCUS } from './chunk-S7NNXWIN.js';
3
+ import { PopupScrollViewport } from './chunk-ZZT2E5VT.js';
4
+ import { ListboxFooter, MultiValueCount } from './chunk-FHHAPGCR.js';
5
+ import { buildOptionMap, mapOptions } from './chunk-7JBNLEJ7.js';
6
+ import { Tag } from './chunk-R6RGJF4L.js';
7
+ import { useTagRow } from './chunk-W5GGOUUI.js';
8
+ import { FieldShell } from './chunk-QA74ITR4.js';
9
+ import { warnSeamlessFieldChrome, useSeamlessSlot, SEAMLESS_CONTROL } from './chunk-KNYKWUYX.js';
10
+ import { Slot } from './chunk-52IFGFTL.js';
11
+ import { useFieldValidity, FieldFrame, SHELL_SIZE, BAR_SIZE, LISTBOX_PX_SM, CONTROL_ICON, SLOT_ICON } from './chunk-J2BCKBHC.js';
12
+ import { ChevronDownIcon, CheckIcon } from './chunk-24TO7E32.js';
13
+ import { POPUP_MOTION } from './chunk-O4GRKO3I.js';
14
+ import { cn } from './chunk-ZSNJ6UA3.js';
15
+ import { Select as Select$1 } from '@base-ui/react/select';
16
+ import * as React from 'react';
17
+ import { jsxs, jsx } from 'react/jsx-runtime';
18
+
19
+ var SelectContext = React.createContext({
20
+ size: "md",
21
+ invalid: false,
22
+ multiple: false,
23
+ indicator: "checkmark",
24
+ indicatorAlign: "left",
25
+ optionMap: /* @__PURE__ */ new Map(),
26
+ seamless: false,
27
+ fullWidth: true,
28
+ anchorRef: { current: null },
29
+ closeReasonRef: { current: void 0 }
30
+ });
31
+ var useSelectContext = () => React.useContext(SelectContext);
32
+ var CHEVRON = {
33
+ sm: "[&_svg]:size-4 [&_svg]:[stroke-width:2.25px]",
34
+ md: "[&_svg]:size-4 [&_svg]:[stroke-width:2.25px]",
35
+ lg: "[&_svg]:size-5"
36
+ };
37
+ function Slot2({ node, size, className }) {
38
+ return /* @__PURE__ */ jsx(Slot, { className: cn("items-center text-tertiary", SLOT_ICON[size], className), children: node });
39
+ }
40
+ var CB_BOX = { sm: "size-4 rounded-sm", md: "size-4 rounded-sm", lg: "size-5 rounded-md" };
41
+ var CB_ICON = { sm: "size-3", md: "size-3", lg: "size-3.5" };
42
+ function SelectItemCheckbox({ size, className }) {
43
+ return /* @__PURE__ */ jsx(
44
+ "span",
45
+ {
46
+ "aria-hidden": "true",
47
+ className: cn(
48
+ "relative inline-flex shrink-0 items-center justify-center bg-primary ring-1 ring-primary transition-colors duration-100 ease-linear ring-inset",
49
+ CB_BOX[size],
50
+ "group-data-[selected]:bg-brand-solid group-data-[selected]:ring-brand-solid",
51
+ // (the disabled row fades the whole item via opacity-50 — no per-marker fade needed)
52
+ className
53
+ ),
54
+ children: /* @__PURE__ */ jsx(CheckIcon, { className: cn("text-fg-white opacity-0 transition-opacity group-data-[selected]:opacity-100", CB_ICON[size]) })
55
+ }
56
+ );
57
+ }
58
+ function SelectRoot(props) {
59
+ const {
60
+ size = "md",
61
+ label,
62
+ hideRequiredIndicator,
63
+ tooltip,
64
+ tooltipDescription,
65
+ hint,
66
+ invalid = false,
67
+ error,
68
+ disabled = false,
69
+ multiple,
70
+ options,
71
+ selectionIndicator,
72
+ selectionIndicatorAlign = "left",
73
+ seamless = false,
74
+ fullWidth = true,
75
+ onValueChange,
76
+ onOpenChange,
77
+ children,
78
+ // Pulled OUT of `rest`: Base UI's `Select.Root` renders no DOM node, so a `className` left in
79
+ // `rest` would be silently dropped. It belongs on the Field column like every other Field
80
+ // control (AGENTS §4/§6) — one class hook, no second `triggerClassName`.
81
+ className,
82
+ ...rest
83
+ } = props;
84
+ const { isInvalid, showError } = useFieldValidity(invalid, error);
85
+ if (seamless) warnSeamlessFieldChrome("Select", { label, hint, error });
86
+ const reactId = React.useId();
87
+ const labelId = label != null && !seamless ? `${reactId}-label` : void 0;
88
+ const isMulti = multiple === true;
89
+ const indicator = selectionIndicator ?? (isMulti ? "checkbox" : "checkmark");
90
+ const optionMap = React.useMemo(() => buildOptionMap(options), [options]);
91
+ const closeReasonRef = React.useRef(void 0);
92
+ const openRef = React.useRef(rest.open ?? rest.defaultOpen ?? false);
93
+ const anchorRef = React.useRef(null);
94
+ const ctx = React.useMemo(
95
+ () => ({
96
+ size,
97
+ invalid: isInvalid,
98
+ labelId,
99
+ multiple: isMulti,
100
+ indicator,
101
+ indicatorAlign: selectionIndicatorAlign,
102
+ optionMap,
103
+ seamless,
104
+ fullWidth,
105
+ anchorRef,
106
+ closeReasonRef
107
+ }),
108
+ [size, isInvalid, labelId, isMulti, indicator, selectionIndicatorAlign, optionMap, seamless, fullWidth]
109
+ );
110
+ const tree = /* @__PURE__ */ jsx(
111
+ Select$1.Root,
112
+ {
113
+ multiple,
114
+ disabled,
115
+ onValueChange: onValueChange ? (next, details) => onValueChange(next, details.event) : void 0,
116
+ onOpenChange: (nextOpen, details) => {
117
+ if (openRef.current !== nextOpen) {
118
+ if (!nextOpen) closeReasonRef.current = details.reason;
119
+ openRef.current = nextOpen;
120
+ }
121
+ onOpenChange?.(nextOpen, details);
122
+ },
123
+ ...rest,
124
+ children
125
+ }
126
+ );
127
+ return /* @__PURE__ */ jsx(SelectContext.Provider, { value: ctx, children: seamless ? (
128
+ // Seamless bypasses FieldFrame so the trigger is the direct flex child of the Input wrapper.
129
+ tree
130
+ ) : /* @__PURE__ */ jsx(
131
+ FieldFrame,
132
+ {
133
+ label,
134
+ labelId,
135
+ required: props.required,
136
+ hideRequiredIndicator,
137
+ tooltip,
138
+ tooltipDescription,
139
+ hint,
140
+ error,
141
+ isInvalid,
142
+ showError,
143
+ size,
144
+ disabled,
145
+ fullWidth,
146
+ className: cn("", className),
147
+ children: tree
148
+ }
149
+ ) });
150
+ }
151
+ var TRIGGER_TAG_SIZE = { sm: "sm", md: "md", lg: "md" };
152
+ function TriggerOption({ opt, value, size }) {
153
+ const label = opt?.label ?? String(value);
154
+ return /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 items-center gap-2", children: [
155
+ opt?.leading ? /* @__PURE__ */ jsx(Slot2, { node: opt.leading, size }) : null,
156
+ /* @__PURE__ */ jsx("span", { className: cn("truncate font-medium text-primary", opt?.supporting ? "max-w-[60%] shrink-0" : "min-w-0 flex-1"), children: label }),
157
+ opt?.supporting ? /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-tertiary", children: opt.supporting }) : null
158
+ ] });
159
+ }
160
+ function TriggerChips({ values, ctx }) {
161
+ const row = useTagRow({ size: ctx.size, maxRows: ctx.maxRows, count: values.length, hasPills: values.length > 0 });
162
+ return /* @__PURE__ */ jsx("span", { ref: row.ref, className: cn(row.className, "min-w-0"), style: row.style, children: values.map((val) => {
163
+ const opt = ctx.optionMap.get(String(val));
164
+ return (
165
+ // Tag's default one-line pill at its natural width — the ROW absorbs the overflow.
166
+ // The option's `leading` node goes through Tag's OWN slot (not a hand-rolled wrapper),
167
+ // so the pill's leading pad, gap and bare-`<svg>` cap come from one place — identical
168
+ // to a standalone <Tag> and to Combobox's chip.
169
+ /* @__PURE__ */ jsx(Tag, { size: TRIGGER_TAG_SIZE[ctx.size], leading: opt?.leading, className: "shrink-0", children: opt?.label ?? String(val) }, String(val))
170
+ );
171
+ }) });
172
+ }
173
+ function renderTriggerValue(v, c) {
174
+ if (!c.multiple) {
175
+ if (v == null || v === "") return /* @__PURE__ */ jsx("span", { className: "text-quaternary", children: c.placeholder });
176
+ return /* @__PURE__ */ jsx(TriggerOption, { opt: c.optionMap.get(String(v)), value: v, size: c.size });
177
+ }
178
+ const values = Array.isArray(v) ? v : [];
179
+ if (values.length === 0) return /* @__PURE__ */ jsx("span", { className: "text-quaternary", children: c.placeholder });
180
+ if (c.display === "tags") {
181
+ return /* @__PURE__ */ jsx(TriggerChips, { values, ctx: c });
182
+ }
183
+ return /* @__PURE__ */ jsx(MultiValueCount, { count: values.length, supportingText: c.supportingText });
184
+ }
185
+ function SelectTrigger(props) {
186
+ const { placeholder = "Select\u2026", display = "tags", supportingText, maxRows, leading, trailing, leadingAddon, trailingAddon, ...rest } = props;
187
+ const { size, invalid, labelId, multiple, optionMap, seamless, fullWidth, anchorRef } = useSelectContext();
188
+ const slot = useSeamlessSlot();
189
+ const useRenderFn = multiple || optionMap.size > 0;
190
+ const sizingCandidates = React.useMemo(() => {
191
+ if (fullWidth || multiple || optionMap.size === 0) return [];
192
+ const labels = [...optionMap.values()].map((o) => o.label).filter((l) => typeof l === "string");
193
+ return placeholder ? [...labels, placeholder] : labels;
194
+ }, [fullWidth, multiple, optionMap, placeholder]);
195
+ const triggerClass = cn(
196
+ "group inline-flex cursor-pointer items-center justify-between text-primary select-none",
197
+ "data-[placeholder]:text-quaternary",
198
+ seamless ? (
199
+ // Flush inside an Input add-on: drop the box structurally (a focus ring can't be cancelled
200
+ // by an override) and keep the bar geometry, since there is no FieldShell around it here.
201
+ cn(
202
+ multiple && display === "tags" ? SHELL_SIZE[size] : BAR_SIZE[size],
203
+ size === "sm" && LISTBOX_PX_SM,
204
+ "transition-all duration-100 ease-linear",
205
+ "data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
206
+ SEAMLESS_CONTROL,
207
+ slot ? "outline-hidden" : "outline-focus-ring focus-visible:outline-2 focus-visible:-outline-offset-2"
208
+ )
209
+ ) : (
210
+ // Inside a FieldShell: the SHELL owns the box, the padding, the height and the disabled
211
+ // fade, so the trigger is a bare, boxless click target that fills it. It must NOT carry
212
+ // `opacity-50` itself — a child's opacity composites ABOVE the parent's inset outline and
213
+ // would wash the focus edge (see the NumberInput stepper regression).
214
+ //
215
+ // `gap-2` is NOT decoration: the old boxed trigger inherited it from BAR_SIZE, so dropping
216
+ // the box also dropped 8px between the value and the chevron and silently widened the pill
217
+ // row (232 → 240px, re-flowing every multi-select tag layout).
218
+ cn("min-w-0 flex-1 self-stretch bg-transparent outline-none", size === "sm" ? "gap-1.5" : "gap-2")
219
+ )
220
+ );
221
+ const sized = sizingCandidates.length > 0;
222
+ const valueFill = sized ? INTRINSIC_CELL : "min-w-0 flex-1";
223
+ const value = useRenderFn ? /* @__PURE__ */ jsx(Select$1.Value, { className: cn(valueFill, "text-left"), placeholder, children: (v) => renderTriggerValue(v, { multiple, display, optionMap, size, placeholder, supportingText, maxRows }) }) : (
224
+ // UUI select.tsx: the selected label is `font-medium text-primary`; the placeholder
225
+ // stays 400 (`text-placeholder`).
226
+ /* @__PURE__ */ jsx(Select$1.Value, { className: cn(valueFill, "truncate text-left font-medium group-data-[placeholder]:font-normal"), placeholder })
227
+ );
228
+ const trigger = /* @__PURE__ */ jsxs(Select$1.Trigger, { "aria-invalid": invalid || void 0, "aria-labelledby": labelId, className: triggerClass, ...rest, children: [
229
+ sized ? /* @__PURE__ */ jsxs("span", { className: INTRINSIC_STACK, children: [
230
+ value,
231
+ /* @__PURE__ */ jsx(IntrinsicWidth, { candidates: sizingCandidates, className: "font-medium" })
232
+ ] }) : value,
233
+ /* @__PURE__ */ jsx(Select$1.Icon, { className: cn("ml-2 inline-flex shrink-0 text-fg-quaternary", CHEVRON[size]), children: /* @__PURE__ */ jsx(ChevronDownIcon, {}) })
234
+ ] });
235
+ if (seamless) return trigger;
236
+ return /* @__PURE__ */ jsx(
237
+ FieldShell,
238
+ {
239
+ boxRef: anchorRef,
240
+ size,
241
+ fluid: multiple && display === "tags",
242
+ invalid,
243
+ leading,
244
+ trailing,
245
+ leadingAddon,
246
+ trailingAddon,
247
+ className: cn(
248
+ // UUI's sm select trims the chevron side to 10px — select-family only.
249
+ size === "sm" && LISTBOX_PX_SM,
250
+ // The open state and the disabled state both live on the TRIGGER (Base UI puts them there),
251
+ // so the shell reads them with `has-*` instead of owning variants it can never match.
252
+ // `focus-within` already covers plain focus; this keeps the ring lit while the popup is open.
253
+ "has-[[data-popup-open]]:outline-2 has-[[data-popup-open]]:-outline-offset-2",
254
+ invalid ? "has-[[data-popup-open]]:outline-focus-ring-error" : "has-[[data-popup-open]]:outline-focus-ring",
255
+ "has-[[data-disabled]]:cursor-not-allowed has-[[data-disabled]]:opacity-50"
256
+ // No width of its own: the shell's base `flex w-full` fills the field column, exactly like
257
+ // Input / Combobox / NativeSelect. Select used to hug instead (`inline-flex w-auto` here,
258
+ // `items-start` on the column) — the one outlier in the family, and it made every width
259
+ // utility on `className` a CAP with no floor: `min-w-40` reserved 10rem on the column while
260
+ // the box stayed at its content width (the table toolbar's facet filter rendered 103px in a
261
+ // 160px slot beside a flush 160px text filter). Size it from the column now.
262
+ ),
263
+ onMouseDown: (event) => {
264
+ if (event.target !== event.currentTarget) return;
265
+ event.preventDefault();
266
+ event.currentTarget.querySelector("[data-popup-open], button")?.click();
267
+ },
268
+ children: trigger
269
+ }
270
+ );
271
+ }
272
+ var POPUP_MAX_H = { sm: "14rem", md: "16rem", lg: "20rem" };
273
+ function SelectContent(props) {
274
+ const { children, empty, footer, className } = props;
275
+ const { size, closeReasonRef, seamless, anchorRef } = useSelectContext();
276
+ return /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsx(
277
+ Select$1.Positioner,
278
+ {
279
+ anchor: seamless ? void 0 : anchorRef,
280
+ side: "bottom",
281
+ align: "start",
282
+ sideOffset: 4,
283
+ alignItemWithTrigger: false,
284
+ className: "z-50 outline-none",
285
+ children: /* @__PURE__ */ jsxs(
286
+ Select$1.Popup,
287
+ {
288
+ finalFocus: () => !NO_RETURN_FOCUS.has(closeReasonRef.current ?? "none"),
289
+ className: cn(
290
+ // The trigger is the FLOOR, not the width: a long option grows the popup to its
291
+ // content and only ellipsizes at the collision boundary (--available-width), so a
292
+ // narrow trigger ("Role") never truncates every row in the list.
293
+ "w-fit max-w-[var(--available-width)] min-w-[var(--anchor-width)]",
294
+ // UUI popover: 8px corner + a translucent inset hairline (border-secondary_alt),
295
+ // not a solid gray border. `rounded-lg` is the 8px popup corner.
296
+ "rounded-lg bg-primary p-1 shadow-lg ring-1 ring-secondary_alt ring-inset",
297
+ "text-sm text-primary",
298
+ POPUP_MOTION,
299
+ className
300
+ ),
301
+ children: [
302
+ /* @__PURE__ */ jsxs(PopupScrollViewport, { max: `min(var(--available-height), ${POPUP_MAX_H[size]})`, children: [
303
+ /* @__PURE__ */ jsx(Select$1.List, { children }),
304
+ empty
305
+ ] }),
306
+ footer
307
+ ]
308
+ }
309
+ )
310
+ }
311
+ ) });
312
+ }
313
+ var ITEM_SIZE = {
314
+ sm: "min-h-9 px-2 py-1.5 gap-1.5 text-sm",
315
+ md: "min-h-9 px-2.5 py-2 gap-2 text-sm",
316
+ lg: "min-h-10 px-3 py-2 gap-2 text-md"
317
+ };
318
+ var ITEM_TEXT_GAP = { sm: "gap-x-1.5", md: "gap-x-2", lg: "gap-x-2" };
319
+ function SelectItem(props) {
320
+ const { value, leading, supporting, trailing, children, className, ...rest } = props;
321
+ const { size, indicator, indicatorAlign, optionMap } = useSelectContext();
322
+ const opt = optionMap.get(value);
323
+ const rLeading = leading ?? opt?.leading;
324
+ const rSupporting = supporting ?? opt?.supporting;
325
+ const rTrailing = trailing ?? opt?.trailing;
326
+ const isCheckbox = indicator === "checkbox";
327
+ const checkboxLeft = indicatorAlign === "left";
328
+ return /* @__PURE__ */ jsxs(
329
+ Select$1.Item,
330
+ {
331
+ value,
332
+ className: cn(
333
+ "group relative flex w-full cursor-pointer items-center rounded-md text-primary transition-colors outline-none select-none",
334
+ "data-[highlighted]:bg-secondary",
335
+ // UUI select-item.tsx: keyboard-focused rows carry a 2px inset brand ring. Base UI keeps
336
+ // DOM focus on the trigger, so this only fires if a row ever receives real focus-visible —
337
+ // harmless if it never does (documented as a Base UI structural limitation).
338
+ "focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-inset",
339
+ // UUI gates the selected-row fill on the indicator: in checkmark mode the selected row
340
+ // takes the same gray hover surface (the brand affordance is the checkmark itself); in
341
+ // checkbox mode the row stays un-tinted (only the box fills).
342
+ !isCheckbox && "data-[selected]:bg-secondary",
343
+ // Disabled fades the whole row uniformly (LOCKED: opacity-50 everywhere), not a text swap.
344
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
345
+ ITEM_SIZE[size],
346
+ className
347
+ ),
348
+ ...rest,
349
+ children: [
350
+ isCheckbox && checkboxLeft ? /* @__PURE__ */ jsx(SelectItemCheckbox, { size }) : null,
351
+ rLeading ? /* @__PURE__ */ jsx(Slot2, { node: rLeading, size }) : null,
352
+ /* @__PURE__ */ jsxs("span", { className: cn("flex min-w-0 flex-1 flex-wrap items-baseline", ITEM_TEXT_GAP[size]), children: [
353
+ /* @__PURE__ */ jsx(Select$1.ItemText, { className: "truncate font-medium whitespace-nowrap text-primary", children }),
354
+ rSupporting ? /* @__PURE__ */ jsx("span", { className: "truncate whitespace-nowrap text-tertiary", children: rSupporting }) : null
355
+ ] }),
356
+ rTrailing ? /* @__PURE__ */ jsx(Slot2, { node: rTrailing, size, className: "ml-auto" }) : null,
357
+ !isCheckbox ? /* @__PURE__ */ jsx(Select$1.ItemIndicator, { className: cn("inline-flex shrink-0 text-brand-secondary", !rTrailing && "ml-auto", CONTROL_ICON[size]), children: /* @__PURE__ */ jsx(CheckIcon, {}) }) : null,
358
+ isCheckbox && !checkboxLeft ? /* @__PURE__ */ jsx(SelectItemCheckbox, { size, className: cn(!rTrailing && "ml-auto") }) : null
359
+ ]
360
+ }
361
+ );
362
+ }
363
+ function SelectGroup(props) {
364
+ const { className, ...rest } = props;
365
+ return /* @__PURE__ */ jsx(Select$1.Group, { className: cn("py-1", className), ...rest });
366
+ }
367
+ function SelectGroupLabel(props) {
368
+ const { className, ...rest } = props;
369
+ return /* @__PURE__ */ jsx(Select$1.GroupLabel, { className: cn("px-2 py-1.5 text-sm font-medium text-tertiary", className), ...rest });
370
+ }
371
+ function SelectFlat(props) {
372
+ const {
373
+ options,
374
+ placeholder,
375
+ display,
376
+ supportingText,
377
+ maxRows,
378
+ fullWidth,
379
+ actions,
380
+ meta,
381
+ emptyMessage,
382
+ leading,
383
+ trailing,
384
+ leadingAddon,
385
+ trailingAddon,
386
+ ...rootProps
387
+ } = props;
388
+ const size = props.size ?? "md";
389
+ const isEmpty = React.useMemo(() => buildOptionMap(options).size === 0, [options]);
390
+ return (
391
+ // `fullWidth` is a COLUMN concern only (via SelectRoot → FieldFrame, like every other Field
392
+ // control); the trigger box has no width of its own and fills whatever the column is.
393
+ /* @__PURE__ */ jsxs(SelectRoot, { options, fullWidth, ...rootProps, children: [
394
+ /* @__PURE__ */ jsx(
395
+ SelectTrigger,
396
+ {
397
+ placeholder,
398
+ display,
399
+ supportingText,
400
+ maxRows,
401
+ leading,
402
+ trailing,
403
+ leadingAddon,
404
+ trailingAddon
405
+ }
406
+ ),
407
+ /* @__PURE__ */ jsx(
408
+ SelectContent,
409
+ {
410
+ empty: isEmpty && emptyMessage ? /* @__PURE__ */ jsx("div", { className: "px-2.5 py-6 text-center text-sm text-tertiary", children: emptyMessage }) : null,
411
+ footer: /* @__PURE__ */ jsx(ListboxFooter, { meta, actions, size }),
412
+ children: mapOptions(options, {
413
+ item: (opt) => /* @__PURE__ */ jsx(SelectItem, { value: opt.value, disabled: opt.disabled, children: opt.label ?? opt.value }, opt.value),
414
+ group: (label, groupChildren) => /* @__PURE__ */ jsxs(SelectGroup, { children: [
415
+ /* @__PURE__ */ jsx(SelectGroupLabel, { children: label }),
416
+ groupChildren
417
+ ] }, label)
418
+ })
419
+ }
420
+ )
421
+ ] })
422
+ );
423
+ }
424
+ SelectFlat.displayName = "Select";
425
+ SelectRoot.displayName = "SelectRoot";
426
+ SelectTrigger.displayName = "SelectTrigger";
427
+ SelectContent.displayName = "SelectContent";
428
+ SelectItem.displayName = "SelectItem";
429
+ SelectGroup.displayName = "SelectGroup";
430
+ SelectGroupLabel.displayName = "SelectGroupLabel";
431
+ var Select = SelectFlat;
432
+
433
+ export { Select };
434
+ //# sourceMappingURL=chunk-T7FCG7XV.js.map
435
+ //# sourceMappingURL=chunk-T7FCG7XV.js.map
@@ -0,0 +1,57 @@
1
+ import { useControllableOpen, DialogSurface } from './chunk-CYPPEUX5.js';
2
+ import { AlertDialog as AlertDialog$1 } from '@base-ui/react/alert-dialog';
3
+ import * as React from 'react';
4
+ import { jsxs, jsx } from 'react/jsx-runtime';
5
+
6
+ function AlertDialog(props) {
7
+ const {
8
+ trigger,
9
+ open,
10
+ defaultOpen = false,
11
+ onOpenChange,
12
+ size = "md",
13
+ showClose = false,
14
+ dividers = true,
15
+ keepMounted = false,
16
+ title,
17
+ description,
18
+ leading,
19
+ trailing,
20
+ footer,
21
+ className,
22
+ children
23
+ } = props;
24
+ const ariaLabel = props["aria-label"];
25
+ const [value, setOpen] = useControllableOpen(open, defaultOpen, onOpenChange);
26
+ const close = React.useCallback(() => setOpen(false), [setOpen]);
27
+ return (
28
+ // Fixed by the primitive: always modal, role="alertdialog", and backdrop /
29
+ // outside-press dismissal is disabled (no `dismissible` escape hatch here).
30
+ /* @__PURE__ */ jsxs(AlertDialog$1.Root, { open: value, onOpenChange: (nextOpen) => setOpen(nextOpen), children: [
31
+ trigger ? /* @__PURE__ */ jsx(AlertDialog$1.Trigger, { render: trigger }) : null,
32
+ /* @__PURE__ */ jsx(
33
+ DialogSurface,
34
+ {
35
+ size,
36
+ showClose,
37
+ dividers,
38
+ keepMounted,
39
+ title,
40
+ description,
41
+ leading,
42
+ trailing,
43
+ footer,
44
+ className,
45
+ "aria-label": ariaLabel,
46
+ close,
47
+ children
48
+ }
49
+ )
50
+ ] })
51
+ );
52
+ }
53
+ AlertDialog.displayName = "AlertDialog";
54
+
55
+ export { AlertDialog };
56
+ //# sourceMappingURL=chunk-THC2ISYP.js.map
57
+ //# sourceMappingURL=chunk-THC2ISYP.js.map
@@ -0,0 +1,115 @@
1
+ import { useTagInput, TAG_PILL_FOCUS_RING } from './chunk-WEUJYDCV.js';
2
+ import { Tag } from './chunk-R6RGJF4L.js';
3
+ import { useTagRow } from './chunk-W5GGOUUI.js';
4
+ import { FieldShell } from './chunk-QA74ITR4.js';
5
+ import { useFieldValidity, FieldFrame } from './chunk-J2BCKBHC.js';
6
+ import { cn } from './chunk-ZSNJ6UA3.js';
7
+ import { Field } from '@base-ui/react/field';
8
+ import 'react';
9
+ import { jsxs, jsx } from 'react/jsx-runtime';
10
+
11
+ var PILL_SIZE = { sm: "sm", md: "md", lg: "md" };
12
+ function TagInputOuter(props) {
13
+ const {
14
+ size = "md",
15
+ placeholder = "Add tag\u2026",
16
+ label,
17
+ tooltip,
18
+ tooltipDescription,
19
+ hint,
20
+ invalid = false,
21
+ error,
22
+ required = false,
23
+ hideRequiredIndicator = false,
24
+ disabled = false,
25
+ fullWidth = true,
26
+ leading,
27
+ trailing,
28
+ leadingAddon,
29
+ trailingAddon,
30
+ maxRows,
31
+ name,
32
+ id,
33
+ className
34
+ } = props;
35
+ const { tags, draft, setDraft, removeTag, handleKeyDown, handlePaste, inputRef, pillGroupRef, getPillProps } = useTagInput(props);
36
+ const { isInvalid, showError } = useFieldValidity(invalid, error);
37
+ const row = useTagRow({ size, maxRows, count: tags.length, hasPills: tags.length > 0, scrollbar: "thin", padY: false });
38
+ return /* @__PURE__ */ jsxs(
39
+ FieldFrame,
40
+ {
41
+ label,
42
+ tooltip,
43
+ tooltipDescription,
44
+ required,
45
+ hideRequiredIndicator,
46
+ hint: tags.length === 0 ? hint : void 0,
47
+ error,
48
+ isInvalid,
49
+ showError,
50
+ size,
51
+ disabled,
52
+ fullWidth,
53
+ className,
54
+ children: [
55
+ /* @__PURE__ */ jsxs(
56
+ FieldShell,
57
+ {
58
+ size,
59
+ invalid: isInvalid,
60
+ disabled,
61
+ leading,
62
+ trailing,
63
+ leadingAddon,
64
+ trailingAddon,
65
+ children: [
66
+ /* @__PURE__ */ jsx(
67
+ Field.Control,
68
+ {
69
+ ref: inputRef,
70
+ id,
71
+ value: draft,
72
+ disabled,
73
+ placeholder,
74
+ onChange: (e) => setDraft(e.target.value),
75
+ onKeyDown: handleKeyDown,
76
+ onPaste: handlePaste,
77
+ className: "min-w-0 flex-1 bg-transparent text-primary outline-none placeholder:text-quaternary disabled:cursor-not-allowed"
78
+ }
79
+ ),
80
+ name ? tags.map((tag, i) => /* @__PURE__ */ jsx("input", { type: "hidden", name, value: tag }, `hidden-${tag}-${i}`)) : null
81
+ ]
82
+ }
83
+ ),
84
+ tags.length > 0 ? /* @__PURE__ */ jsx(
85
+ "div",
86
+ {
87
+ ref: (el) => {
88
+ row.ref(el);
89
+ pillGroupRef.current = el;
90
+ },
91
+ className: cn(row.className, size !== "sm" && "mt-0.5"),
92
+ style: row.style,
93
+ children: tags.map((tag, i) => /* @__PURE__ */ jsx(
94
+ Tag,
95
+ {
96
+ size: PILL_SIZE[size],
97
+ disabled,
98
+ removeExcludeFromTabOrder: true,
99
+ onRemove: () => removeTag(i),
100
+ className: cn(TAG_PILL_FOCUS_RING, "shrink-0"),
101
+ ...getPillProps(i),
102
+ children: tag
103
+ },
104
+ `${tag}-${i}`
105
+ ))
106
+ }
107
+ ) : null
108
+ ]
109
+ }
110
+ );
111
+ }
112
+
113
+ export { TagInputOuter };
114
+ //# sourceMappingURL=chunk-VWC72TR3.js.map
115
+ //# sourceMappingURL=chunk-VWC72TR3.js.map