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,192 @@
1
+ import { OptionRow } from './chunk-GTHJWR3Q.js';
2
+ import { useFieldValidity, FieldGroupFrame } from './chunk-J2BCKBHC.js';
3
+ import { MinusIcon, CheckIcon } from './chunk-24TO7E32.js';
4
+ import { devWarn, warnNeedsName } from './chunk-GCVA3OIV.js';
5
+ import { cn } from './chunk-ZSNJ6UA3.js';
6
+ import { CheckboxGroup as CheckboxGroup$1 } from '@base-ui/react/checkbox-group';
7
+ import * as React3 from 'react';
8
+ import { Checkbox as Checkbox$1 } from '@base-ui/react/checkbox';
9
+ import { Field } from '@base-ui/react/field';
10
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
11
+
12
+ var CheckboxGroupStyleContext = React3.createContext({
13
+ inGroup: false,
14
+ disabled: false,
15
+ invalid: false,
16
+ bordered: false
17
+ });
18
+ var BOX_SIZE = {
19
+ md: "size-4 rounded-sm",
20
+ lg: "size-5 rounded-md"
21
+ };
22
+ var CHECK_SIZE = {
23
+ md: "size-3",
24
+ lg: "size-3.5"
25
+ };
26
+ var DASH_SIZE = {
27
+ md: "h-3 w-2.5",
28
+ lg: "size-3.5"
29
+ };
30
+ var BOX_BASE = "group/box relative inline-flex shrink-0 items-center justify-center ring-1 ring-inset text-fg-white transition-colors duration-100 ease-linear select-none outline-focus-ring focus-visible:outline-2 focus-visible:outline-offset-2";
31
+ var GLYPH_BASE = "pointer-events-none absolute opacity-0 transition-opacity duration-100 ease-linear";
32
+ function Checkbox(props) {
33
+ const {
34
+ size: sizeProp,
35
+ label,
36
+ hint,
37
+ checked,
38
+ defaultChecked,
39
+ indeterminate = false,
40
+ onCheckedChange,
41
+ disabled: disabledProp = false,
42
+ required = false,
43
+ invalid = false,
44
+ error,
45
+ bordered: borderedProp,
46
+ name,
47
+ value: valueProp,
48
+ parent = false,
49
+ id,
50
+ inputRef,
51
+ className,
52
+ ...rest
53
+ } = props;
54
+ const groupCtx = React3.useContext(CheckboxGroupStyleContext);
55
+ const size = sizeProp ?? groupCtx.size ?? "md";
56
+ const disabled = disabledProp || groupCtx.disabled;
57
+ const bordered = borderedProp ?? groupCtx.bordered;
58
+ const value = valueProp ?? (groupCtx.inGroup ? void 0 : "on");
59
+ if (groupCtx.inGroup && !parent && value == null && name == null) {
60
+ devWarn("A <Checkbox> inside a <CheckboxGroup> needs a `value` (its identity in the group's value array).");
61
+ }
62
+ const generatedId = React3.useId();
63
+ const labelId = `${generatedId}-label`;
64
+ const hintId = `${generatedId}-hint`;
65
+ const { isInvalid, showError } = useFieldValidity(invalid || groupCtx.invalid, error);
66
+ const hasText = label != null || hint != null;
67
+ const boxState = cn(
68
+ "bg-primary",
69
+ "data-[checked]:bg-brand-solid data-[indeterminate]:bg-brand-solid",
70
+ "data-[checked]:ring-brand-solid data-[indeterminate]:ring-brand-solid",
71
+ disabled ? "cursor-not-allowed opacity-50 ring-primary data-[unchecked]:bg-tertiary" : isInvalid ? "cursor-pointer ring-error_subtle outline-focus-ring-error" : "cursor-pointer ring-primary"
72
+ );
73
+ const control = /* @__PURE__ */ jsxs(
74
+ Checkbox$1.Root,
75
+ {
76
+ id,
77
+ value,
78
+ checked,
79
+ defaultChecked,
80
+ indeterminate,
81
+ required,
82
+ parent,
83
+ inputRef,
84
+ onCheckedChange: onCheckedChange ? (next, details) => onCheckedChange(next, details.event) : void 0,
85
+ "aria-labelledby": label != null ? labelId : void 0,
86
+ "aria-describedby": hint != null ? hintId : void 0,
87
+ ...rest,
88
+ className: cn(BOX_BASE, BOX_SIZE[size], boxState, hasText && "mt-0.5"),
89
+ children: [
90
+ /* @__PURE__ */ jsx(MinusIcon, { className: cn(GLYPH_BASE, "group-data-[indeterminate]/box:opacity-100", DASH_SIZE[size]) }),
91
+ /* @__PURE__ */ jsx(CheckIcon, { className: cn(GLYPH_BASE, "group-data-[checked]/box:opacity-100", CHECK_SIZE[size]) })
92
+ ]
93
+ }
94
+ );
95
+ const body = hasText || bordered ? /* @__PURE__ */ jsx(OptionRow, { size, bordered, disabled, label, hint, labelId, hintId, control }) : control;
96
+ return /* @__PURE__ */ jsxs(Field.Root, { name, disabled, invalid: isInvalid, className: cn("flex flex-col gap-1.5", className), children: [
97
+ body,
98
+ showError ? /* @__PURE__ */ jsx(Field.Error, { match: true, className: "text-sm text-error-primary", children: error }) : null
99
+ ] });
100
+ }
101
+ var ORIENTATION = {
102
+ // Mirrors RadioGroup — UUI's option-group rhythm; horizontal is our house addition.
103
+ vertical: "flex flex-col gap-4",
104
+ horizontal: "flex flex-row flex-wrap gap-x-6 gap-y-3"
105
+ };
106
+ var SELECT_ALL_INDENT = {
107
+ md: "pl-6",
108
+ lg: "pl-8"
109
+ };
110
+ function CheckboxGroup(props) {
111
+ const {
112
+ value,
113
+ defaultValue,
114
+ onValueChange,
115
+ options,
116
+ selectAllLabel,
117
+ allValues,
118
+ size = "md",
119
+ orientation = "vertical",
120
+ disabled = false,
121
+ label,
122
+ required = false,
123
+ hideRequiredIndicator = false,
124
+ tooltip,
125
+ tooltipDescription,
126
+ hint,
127
+ invalid = false,
128
+ error,
129
+ bordered = false,
130
+ fullWidth = true,
131
+ className,
132
+ children,
133
+ "aria-labelledby": ariaLabelledby,
134
+ ...rest
135
+ } = props;
136
+ const { isInvalid, showError } = useFieldValidity(invalid, error);
137
+ const reactId = React3.useId();
138
+ const labelId = `${reactId}-label`;
139
+ const hasLabel = label != null && label !== "";
140
+ warnNeedsName("CheckboxGroup", hasLabel || ariaLabelledby != null || "aria-label" in rest);
141
+ const computedAllValues = React3.useMemo(() => allValues ?? options?.map((o) => o.value), [allValues, options]);
142
+ const contextValue = React3.useMemo(
143
+ () => ({ inGroup: true, size, disabled, invalid: isInvalid, bordered }),
144
+ [size, disabled, isInvalid, bordered]
145
+ );
146
+ const items = /* @__PURE__ */ jsxs(Fragment, { children: [
147
+ options?.map((o) => /* @__PURE__ */ jsx(Checkbox, { value: o.value, label: o.label, hint: o.hint, disabled: o.disabled }, o.value)),
148
+ children
149
+ ] });
150
+ return /* @__PURE__ */ jsx(
151
+ FieldGroupFrame,
152
+ {
153
+ label,
154
+ labelId,
155
+ required,
156
+ announceRequired: true,
157
+ hideRequiredIndicator,
158
+ tooltip,
159
+ tooltipDescription,
160
+ hint,
161
+ error,
162
+ isInvalid,
163
+ showError,
164
+ size,
165
+ disabled,
166
+ fullWidth,
167
+ className,
168
+ children: /* @__PURE__ */ jsx(
169
+ CheckboxGroup$1,
170
+ {
171
+ value,
172
+ defaultValue,
173
+ allValues: computedAllValues,
174
+ disabled,
175
+ onValueChange: onValueChange ? (next, details) => onValueChange(next, details.event) : void 0,
176
+ className: ORIENTATION[orientation],
177
+ "aria-labelledby": hasLabel ? labelId : ariaLabelledby,
178
+ ...rest,
179
+ children: /* @__PURE__ */ jsx(CheckboxGroupStyleContext.Provider, { value: contextValue, children: selectAllLabel != null ? /* @__PURE__ */ jsxs(Fragment, { children: [
180
+ /* @__PURE__ */ jsx(Checkbox, { parent: true, label: selectAllLabel }),
181
+ /* @__PURE__ */ jsx("div", { className: cn(ORIENTATION[orientation], SELECT_ALL_INDENT[size]), children: items })
182
+ ] }) : items })
183
+ }
184
+ )
185
+ }
186
+ );
187
+ }
188
+ CheckboxGroup.displayName = "CheckboxGroup";
189
+
190
+ export { Checkbox, CheckboxGroup };
191
+ //# sourceMappingURL=chunk-ZOOX3TUB.js.map
192
+ //# sourceMappingURL=chunk-ZOOX3TUB.js.map
@@ -0,0 +1,42 @@
1
+ import { clsx } from 'clsx';
2
+ import { extendTailwindMerge } from 'tailwind-merge';
3
+
4
+ // src/lib/cn.ts
5
+ var twMerge = extendTailwindMerge({
6
+ extend: {
7
+ classGroups: {
8
+ shadow: [{ shadow: ["skeuomorphic"] }]
9
+ },
10
+ theme: {
11
+ ease: ["drawer"],
12
+ /* The DISPLAY type steps, and this registration is not optional — without it the size
13
+ * silently becomes a COLOUR.
14
+ *
15
+ * tailwind-merge's `font-size` group validates with `isTshirtSize`, and `display-xs` is not a
16
+ * t-shirt size, so an unregistered `text-display-*` falls through to the permissive
17
+ * `text-color` group. Measured on tailwind-merge 3.6.0 against this repo's own config:
18
+ *
19
+ * bare text-display-xs + text-quaternary => text-quaternary ← SIZE deleted
20
+ * bare text-quaternary + text-display-xs => text-display-xs ← COLOUR deleted
21
+ * bare text-md + text-display-xs => BOTH survive (no conflict seen)
22
+ * registered text-quaternary + text-display-xs => both, correctly
23
+ *
24
+ * All three consumers of `AVATAR_SIZE[…].text` put the colour BEFORE the size in one `cn()`,
25
+ * so every one of them would have dropped its colour and rendered initials in the inherited
26
+ * foreground. No type error, no lint error, no failing gate — the CSS emitted for
27
+ * `.text-display-*` is a perfectly correct font-size utility, so the size still looks right
28
+ * and only the colour is wrong. `.refs/untitledui-react/utils/cx.ts` contains exactly this
29
+ * registration and nothing else, so the reference hit it too.
30
+ *
31
+ * `2xs` needs NO entry: `isTshirtSize("2xs")` passes (measured). */
32
+ text: ["display-xs", "display-sm", "display-md", "display-lg", "display-xl", "display-2xl"]
33
+ }
34
+ }
35
+ });
36
+ function cn(...inputs) {
37
+ return twMerge(clsx(inputs));
38
+ }
39
+
40
+ export { cn };
41
+ //# sourceMappingURL=chunk-ZSNJ6UA3.js.map
42
+ //# sourceMappingURL=chunk-ZSNJ6UA3.js.map
@@ -0,0 +1,130 @@
1
+ import { TOOLTIP_MOTION } from './chunk-O4GRKO3I.js';
2
+ import { devWarn } from './chunk-GCVA3OIV.js';
3
+ import { cn } from './chunk-ZSNJ6UA3.js';
4
+ import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
5
+ import * as React from 'react';
6
+ import { jsx, jsxs } from 'react/jsx-runtime';
7
+
8
+ var InsideProviderContext = React.createContext(false);
9
+ function TooltipProvider(props) {
10
+ const { delay = 300, closeDelay, timeout, children } = props;
11
+ return /* @__PURE__ */ jsx(InsideProviderContext.Provider, { value: true, children: /* @__PURE__ */ jsx(Tooltip$1.Provider, { delay, closeDelay, timeout, children }) });
12
+ }
13
+ TooltipProvider.displayName = "Tooltip.Provider";
14
+ function TooltipRoot(props) {
15
+ const { defaultOpen, open, onOpenChange, disabled = false, children } = props;
16
+ return /* @__PURE__ */ jsx(
17
+ Tooltip$1.Root,
18
+ {
19
+ defaultOpen,
20
+ open,
21
+ disabled,
22
+ onOpenChange: onOpenChange ? (nextOpen, details) => onOpenChange(nextOpen, details.event) : void 0,
23
+ children
24
+ }
25
+ );
26
+ }
27
+ TooltipRoot.displayName = "Tooltip.Root";
28
+ var TooltipTrigger = React.forwardRef(function TooltipTrigger2(props, ref) {
29
+ const { delay, ...rest } = props;
30
+ const insideProvider = React.useContext(InsideProviderContext);
31
+ return /* @__PURE__ */ jsx(Tooltip$1.Trigger, { ref, delay: delay ?? (insideProvider ? void 0 : 300), ...rest });
32
+ });
33
+ TooltipTrigger.displayName = "Tooltip.Trigger";
34
+ function ArrowSvg() {
35
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 100 100", className: "size-2.5", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L35.858,35.858 Q50,50 64.142,35.858 L100,0 Z", fill: "var(--color-bg-primary-solid)" }) });
36
+ }
37
+ var POPUP = cn(
38
+ // Surface (fixed): a DARK tooltip — inverse surface, no border. Column layout so a
39
+ // title + optional supporting line stack left-aligned. Padding is NOT here: it is the
40
+ // one thing `size` owns, so it comes from SIZE below.
41
+ "flex max-w-xs flex-col items-start gap-1 rounded-lg bg-primary-solid shadow-lg",
42
+ "",
43
+ // Enter/exit: fade + zoom-95 + ~2px slide-in from the `data-side` direction.
44
+ TOOLTIP_MOTION
45
+ );
46
+ var SIZE = {
47
+ md: { base: "px-2.5 py-1.5", withDescription: "px-2.5 py-2.5" },
48
+ lg: { base: "px-3 py-2", withDescription: "px-3 py-3" }
49
+ };
50
+ var ARROW = cn(
51
+ "data-[side=top]:bottom-[-9px]",
52
+ "data-[side=bottom]:top-[-9px] data-[side=bottom]:rotate-180",
53
+ "data-[side=left]:right-[-9px] data-[side=left]:-rotate-90",
54
+ "data-[side=right]:left-[-9px] data-[side=right]:rotate-90"
55
+ );
56
+ function TooltipContent(props) {
57
+ const { id, children, description, size = "md", side = "top", align = "center", showArrow = false, collisionBoundary, collisionPadding, className } = props;
58
+ return /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsx(
59
+ Tooltip$1.Positioner,
60
+ {
61
+ side,
62
+ sideOffset: 6,
63
+ align,
64
+ alignOffset: align === "center" ? 0 : -12,
65
+ collisionBoundary,
66
+ collisionPadding,
67
+ className: "z-50 outline-none",
68
+ children: /* @__PURE__ */ jsxs(Tooltip$1.Popup, { id, role: "tooltip", className: cn(POPUP, description ? SIZE[size].withDescription : SIZE[size].base, className), children: [
69
+ showArrow ? /* @__PURE__ */ jsx(Tooltip$1.Arrow, { className: ARROW, children: /* @__PURE__ */ jsx(ArrowSvg, {}) }) : null,
70
+ /* @__PURE__ */ jsx("span", { className: "text-xs font-semibold text-fg-white", children }),
71
+ description ? /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-tooltip-supporting-text", children: description }) : null
72
+ ] })
73
+ }
74
+ ) });
75
+ }
76
+ TooltipContent.displayName = "Tooltip.Content";
77
+ function Tooltip(props) {
78
+ const {
79
+ content,
80
+ description,
81
+ children,
82
+ // MUST be named here even though it is only forwarded: `...rest` below lands on the
83
+ // TRIGGER, so an un-destructured `size` would ship as a stray DOM attribute.
84
+ size = "md",
85
+ side = "top",
86
+ align = "center",
87
+ showArrow = false,
88
+ collisionBoundary,
89
+ collisionPadding,
90
+ delay,
91
+ closeDelay,
92
+ defaultOpen,
93
+ open,
94
+ onOpenChange,
95
+ disabled = false,
96
+ className,
97
+ // Everything else belongs to whoever wrapped this trigger. Without this rest, `<Tooltip>`
98
+ // silently ATE every prop it did not name — so `<DropdownMenu trigger={<Tooltip …><button/>
99
+ // </Tooltip>} />` lost `aria-haspopup`, `id`, `type`, `tabindex`, the ref and every handler,
100
+ // and the menu simply never opened. The composition is documented in sidebar.md; the tooltip
101
+ // was the reason it did not work.
102
+ ...rest
103
+ } = props;
104
+ const describedById = React.useId();
105
+ if (!React.isValidElement(children)) devWarn("<Tooltip> `children` must be a single focusable React element (the trigger).");
106
+ return /* @__PURE__ */ jsxs(TooltipRoot, { defaultOpen, open, onOpenChange, disabled, children: [
107
+ /* @__PURE__ */ jsx(TooltipTrigger, { ...rest, delay, closeDelay, "aria-describedby": describedById, render: children }),
108
+ /* @__PURE__ */ jsx(
109
+ TooltipContent,
110
+ {
111
+ id: describedById,
112
+ size,
113
+ side,
114
+ align,
115
+ showArrow,
116
+ description,
117
+ collisionBoundary,
118
+ collisionPadding,
119
+ className,
120
+ children: content
121
+ }
122
+ )
123
+ ] });
124
+ }
125
+ Tooltip.displayName = "Tooltip";
126
+ var TooltipExport = Object.assign(Tooltip, { Provider: TooltipProvider });
127
+
128
+ export { TooltipExport };
129
+ //# sourceMappingURL=chunk-ZZA2LUTL.js.map
130
+ //# sourceMappingURL=chunk-ZZA2LUTL.js.map
@@ -0,0 +1,24 @@
1
+ import { useScrollFade } from './chunk-O2LG3PNI.js';
2
+ import { cn } from './chunk-ZSNJ6UA3.js';
3
+ import * as React from 'react';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ function PopupScrollViewport({ axis = "vertical", max, className, children }) {
7
+ const ref = React.useRef(null);
8
+ const { maskImage } = useScrollFade(ref, { axis });
9
+ const overflow = axis === "vertical" ? "overflow-y-auto" : "overflow-x-auto";
10
+ const capKey = axis === "vertical" ? "maxHeight" : "maxWidth";
11
+ return /* @__PURE__ */ jsx(
12
+ "div",
13
+ {
14
+ ref,
15
+ className: cn(overflow, "overscroll-contain outline-none", className),
16
+ style: { [capKey]: max, ...maskImage && { maskImage, WebkitMaskImage: maskImage } },
17
+ children
18
+ }
19
+ );
20
+ }
21
+
22
+ export { PopupScrollViewport };
23
+ //# sourceMappingURL=chunk-ZZT2E5VT.js.map
24
+ //# sourceMappingURL=chunk-ZZT2E5VT.js.map
@@ -0,0 +1,6 @@
1
+ type SemanticColor = "neutral" | "brand" | "success" | "warning" | "error" | "info";
2
+ /** Canonical order — playground reference grids + docs iterate this. */
3
+ declare const SEMANTIC_COLORS: readonly ["neutral", "brand", "success", "warning", "error", "info"];
4
+ declare function isSemanticColor(x: unknown): x is SemanticColor;
5
+
6
+ export { type SemanticColor as S, SEMANTIC_COLORS as a, isSemanticColor as i };
@@ -0,0 +1,184 @@
1
+ import * as React from 'react';
2
+ import { M as MultiDisplay } from './multi-value-CJb_tnvi.js';
3
+ import { O as OptionList, L as ListboxOption, a as ListboxAction } from './options-CPEIgjtd.js';
4
+ import { ComboboxRootProps as ComboboxRootProps$1 } from '@base-ui/react/combobox';
5
+
6
+ type ComboboxSize = "sm" | "md" | "lg";
7
+ /** Option display metadata for `Combobox` `options`. The shared `ListboxOption`
8
+ * shape (see `field/options.ts`) — identical to `Select`'s `SelectOption`:
9
+ * `value` + `label?` + `disabled?` + node slots `leading`/`trailing`/`supporting`. */
10
+ type ComboboxOption<V extends string = string> = ListboxOption<V>;
11
+ /** How the field renders the selection when `multiple` — the shared list-family contract
12
+ * (`field/multi-value.tsx`), identical on `Select`. */
13
+ type ComboboxDisplay = MultiDisplay;
14
+ /** Per-row selection marker. Defaults to `checkbox` for multi-select, `checkmark`
15
+ * for single — same contract as Select (Untitled UI `SelectItem`). */
16
+ type ComboboxIndicator = "checkmark" | "checkbox";
17
+ /** Side of the row the `checkbox` marker sits on (Untitled UI `SelectItem`
18
+ * `selectionIndicatorAlign`). The `checkmark` indicator is always trailing. */
19
+ type ComboboxIndicatorAlign = "left" | "right";
20
+ interface ComboboxRootProps<Value extends string = string, Multiple extends boolean | undefined = false> extends Omit<ComboboxRootProps$1<Value, Multiple>, "onInputValueChange" | "items" | "value" | "defaultValue"> {
21
+ /** The current selection. **Checked against `options`:** `Value` is inferred from the values you
22
+ * passed there, so a value that isn't one of them is a compile error instead of a silent
23
+ * no-selection. `NoInfer` is load-bearing — without it TypeScript would infer `Value` from this
24
+ * prop too and widen the union to include the typo. A widened `options` annotation leaves
25
+ * `Value = string`, i.e. unchanged behaviour. See `docs/type-safety-policy.md`. */
26
+ value?: (Multiple extends true ? NoInfer<Value>[] : NoInfer<Value>) | null;
27
+ /** Uncontrolled initial selection — checked against `options` exactly like {@link value}. */
28
+ defaultValue?: (Multiple extends true ? NoInfer<Value>[] : NoInfer<Value>) | null;
29
+ /** Density of the field + items. Shared via context. @default "md" */
30
+ size?: ComboboxSize;
31
+ /** The rows to render — a flat list or nested `{ label, options }` groups (same shape
32
+ * as `Select` `options`). `<Combobox options>` renders AND filters the rows from this,
33
+ * and it is the mirror source for the multi-select chips + the ghost-text
34
+ * autocomplete. NOT the Base UI filter collection. */
35
+ options?: OptionList<ComboboxOption<Value>>;
36
+ /** Per-row selection marker. @default `multiple ? "checkbox" : "checkmark"` */
37
+ selectionIndicator?: ComboboxIndicator;
38
+ /** Which side of the row the `checkbox` marker sits on (Untitled UI
39
+ * `selectionIndicatorAlign`). Ignored by `checkmark` (always trailing, as in
40
+ * UUI). @default "left" */
41
+ selectionIndicatorAlign?: ComboboxIndicatorAlign;
42
+ /** Visible label above the field (`Field.Label`, associated with the input via `aria-labelledby`). */
43
+ label?: string;
44
+ /** Help-circle tooltip after the label (title line). @see tooltipDescription */
45
+ tooltip?: string;
46
+ /** Optional secondary line under {@link tooltip} in the tooltip surface. */
47
+ tooltipDescription?: string;
48
+ /** Helper text under the field (`Field.Description`). Hidden while an `error` shows. */
49
+ hint?: React.ReactNode;
50
+ /** Suppress the visual `*` while keeping `required` semantics — for forms where every
51
+ * field is required and the asterisks become noise (UUI parity). @default false */
52
+ hideRequiredIndicator?: boolean;
53
+ /** Error state: red border + error focus ring and `aria-invalid`. @default false */
54
+ invalid?: boolean;
55
+ /** Optional error message (Base UI `Field`, `aria-describedby`). A truthy `error` also implies `invalid`. */
56
+ error?: string;
57
+ /** Enables the `Clear` button when there is a value. Shared via context. @default false */
58
+ clearable?: boolean;
59
+ /** Whether the field column takes `w-full`. Only OBSERVABLE where the parent would otherwise let
60
+ * the column shrink-to-fit (a flex row / grid cell) — in a plain block container it fills either
61
+ * way. Bound the field with a width in `className` (`w-64`, `max-w-56`). @default true */
62
+ fullWidth?: boolean;
63
+ /** Fires as the user types. Maps to Base UI `onInputValueChange`; use it to drive an async fetch. */
64
+ onInputChange?: ComboboxRootProps$1<Value, Multiple>["onInputValueChange"];
65
+ /** Layout/spacing only on the field column (margin, width, flex/grid placement), merged via
66
+ * `cn()` — the same contract as every other Field control. Never restyles internals. */
67
+ className?: string;
68
+ }
69
+ /** Display data for a selected chip (multiple mode). */
70
+ interface ComboboxChip {
71
+ /** Pill label. Defaults to the value's `options` label, else the raw value. */
72
+ label: React.ReactNode;
73
+ /** Leading node in the pill (defaults to the option's `leading`). Keep it small
74
+ * (e.g. `<Avatar size="xxs" />`) — it renders as-is, not re-sized for the chip. */
75
+ leading?: React.ReactNode;
76
+ }
77
+ /** The value space of a `<Combobox>`: the union drawn from `options`, or **any** string once
78
+ * `creatable` is on — because coining a value that is deliberately not in `options` is exactly what
79
+ * that mode is for. Encoding it here is the difference between a type that tells the truth and one
80
+ * that forces the honest caller to widen their own `options` to shut it up. */
81
+ type CoinedValue<Value extends string, Creatable extends boolean | undefined> = Creatable extends true ? string : NoInfer<Value>;
82
+ interface ComboboxProps<Value extends string = string, Multiple extends boolean | undefined = false, Creatable extends boolean | undefined = undefined> extends Omit<ComboboxRootProps<Value, Multiple>, "children" | "filter" | "value" | "defaultValue" | "creatable"> {
83
+ /** See {@link ComboboxRootProps.value}. **`creatable` widens this back to `string`** — coining a
84
+ * value that is deliberately NOT in `options` is the whole point of that mode, so constraining
85
+ * the value there would make the honest usage a type error. Without `creatable` the value is
86
+ * checked against `options`. */
87
+ value?: (Multiple extends true ? CoinedValue<Value, Creatable>[] : CoinedValue<Value, Creatable>) | null;
88
+ /** Uncontrolled initial selection — same rule as {@link value}. */
89
+ defaultValue?: (Multiple extends true ? CoinedValue<Value, Creatable>[] : CoinedValue<Value, Creatable>) | null;
90
+ /** The rows to render — flat options or nested `{ label, options }` groups. */
91
+ options: OptionList<ComboboxOption<Value>>;
92
+ /** Row filter predicate. Default = case-insensitive substring on the label.
93
+ * Pass `null` to disable built-in filtering (parent pre-filters `options` and
94
+ * drives it via `onInputChange` — the async / server-search pattern). */
95
+ filter?: ((option: ComboboxOption, query: string) => boolean) | null;
96
+ /**
97
+ * Milliseconds to hold a keystroke before {@link onInputChange} fires — the debounce a server
98
+ * search needs, so `filter={null}` does not mean one request per character.
99
+ *
100
+ * **Only the callback lags.** The input, the ghost text and the built-in filter all stay on the
101
+ * keystroke; what waits is the emission, which is the only thing a delay can apply to here (unlike
102
+ * `useTable`, Combobox owns its input value, so there is no controlled value to freeze).
103
+ *
104
+ * Same name and meaning as `useTable({ searchDebounce })` — one spelling for one concept across
105
+ * the library. Open `number` by design (a duration has no closed set); `warnNonNegativeInt`
106
+ * reports a bad one instead of a clamp absorbing it, and `0` is a real answer.
107
+ *
108
+ * @default 0
109
+ */
110
+ searchDebounce?: number;
111
+ /** Show the loading row instead of results (async pending). @default false */
112
+ loading?: boolean;
113
+ /** Copy for the loading row. @default "Loading…" */
114
+ loadingMessage?: React.ReactNode;
115
+ /** Copy for the no-results row. @default "No results found." */
116
+ emptyMessage?: React.ReactNode;
117
+ /** Placeholder shown (`--color-text-quaternary`) when the field is empty. @default "Search…" */
118
+ placeholder?: string;
119
+ /** Start slot: a **node** renders as an icon, a **string** as a muted text affix. Empty by
120
+ * default — Combobox owns no leading glyph, so a magnifier is `leading={<SearchIcon />}`. */
121
+ leading?: React.ReactNode;
122
+ /** End slot; sits OUTSIDE the chevron/clear, which shift inward. */
123
+ trailing?: React.ReactNode;
124
+ /** Bordered/interactive segment flush to the START edge — a unit, a `<NativeSelect seamless>`, or
125
+ * an icon `<Button seamless>`. Wrap static content in `<InputAddon>`. @see InputAddon */
126
+ leadingAddon?: React.ReactNode;
127
+ /** Bordered/interactive segment flush to the END edge. @see InputAddon */
128
+ trailingAddon?: React.ReactNode;
129
+ /** Fade the overflowing edge of a long query instead of a hard clip (single-select). @default false */
130
+ scrollFade?: boolean;
131
+ /** `multiple` mode: override a selected value's pill display (else it's read from `options`). */
132
+ renderChip?: (value: string) => ComboboxChip;
133
+ /** Multi-select field layout — the same contract as `Select`: `"tags"` renders one removable
134
+ * chip per selected value, `"count"` a compact `"N selected"` summary (removal then happens by
135
+ * unchecking popup rows, and the field keeps its bar height at any selection size).
136
+ * @default "tags" */
137
+ display?: ComboboxDisplay;
138
+ /** Trailing muted text next to the count (count display only). */
139
+ supportingText?: React.ReactNode;
140
+ /** Row cap for `display="tags"` — the same contract as `TagInput` and `Select`: unset = chips
141
+ * wrap and the field grows · `1` = one row, scrolling sideways at a fixed bar height ·
142
+ * `n>1` = wrap into n rows, the excess scrolling vertically. Both scroll modes use an edge fade
143
+ * rather than a visible scrollbar. */
144
+ maxRows?: number;
145
+ /** Bounded action row(s) pinned under the results — the opinionated replacement for a
146
+ * free-form footer (create / see-all / manage / bulk / load-more). Rendered in order. */
147
+ actions?: ListboxAction[];
148
+ /** A muted, non-interactive status line pinned in the footer above the actions
149
+ * (e.g. `"Showing 10 of 240"` — pairs with a "Load more" action). */
150
+ meta?: React.ReactNode;
151
+ /** Let the user COIN a value that isn't in `options` — the "suggest, then create"
152
+ * field (a Gmail recipient, a new label). A `Create “query”` row is appended after
153
+ * the matches whenever the trimmed query is non-empty and is not already an option
154
+ * or a selected value; choosing it selects the query itself as the value and fires
155
+ * {@link onCreate}. Also turns on `autoHighlight`, so the first match is highlighted
156
+ * while typing and `Enter` on a query that matches nothing creates it.
157
+ *
158
+ * For a field with NO suggestions at all (keywords, hand-typed recipients — no list
159
+ * to filter) use `TagInput`, which is a plain textbox: separators, paste-splitting
160
+ * and `max`/`allowDuplicates` live there, and it never announces a popup. @default false */
161
+ creatable?: Creatable;
162
+ /** Fires with the freshly coined value the moment a `creatable` row is chosen (before
163
+ * `onValueChange`). Persist it and push it into `options` so it renders with its real
164
+ * metadata; without that it still works, displaying the raw value. */
165
+ onCreate?: (value: string) => void;
166
+ /** Copy for the `creatable` row. @default `Create “{query}”` */
167
+ createLabel?: (query: string) => React.ReactNode;
168
+ /** Gate the `creatable` row: return `false` and no row is offered for that query (so
169
+ * `Enter` cannot coin it either) — e.g. `(q) => /^\S+@\S+\.\S+$/.test(q)` for a
170
+ * recipient field. @default always creatable */
171
+ validateCreate?: (query: string) => boolean;
172
+ }
173
+ declare function ComboboxFlat<Value extends string = string, Multiple extends boolean | undefined = false, Creatable extends boolean | undefined = undefined>(props: ComboboxProps<Value, Multiple, Creatable>): React.JSX.Element;
174
+ declare namespace ComboboxFlat {
175
+ var displayName: string;
176
+ }
177
+ /** Data-first, flat-only Combobox: `<Combobox options=… />` renders + filters the
178
+ * field and popup from data — the entire public API (no compound parts). Async
179
+ * search via `filter={null}` + `onInputChange`; empty/loading via
180
+ * `emptyMessage`/`loading`; a pinned action row via `actions`. See
181
+ * docs/api-policy.md. */
182
+ declare const Combobox: typeof ComboboxFlat;
183
+
184
+ export { Combobox, type ComboboxChip, type ComboboxDisplay, type ComboboxIndicator, type ComboboxIndicatorAlign, type ComboboxOption, type ComboboxProps, type ComboboxRootProps, type ComboboxSize };
@@ -0,0 +1,21 @@
1
+ "use client";export { Combobox } from './chunk-MUFHLP4S.js';
2
+ import './chunk-F6NLE6XJ.js';
3
+ import './chunk-7EUAMHMU.js';
4
+ import './chunk-FHHAPGCR.js';
5
+ import './chunk-7JBNLEJ7.js';
6
+ import './chunk-W5GGOUUI.js';
7
+ import './chunk-4P2NBLBW.js';
8
+ import './chunk-DWKILXHE.js';
9
+ import './chunk-QA74ITR4.js';
10
+ import './chunk-KNYKWUYX.js';
11
+ import './chunk-52IFGFTL.js';
12
+ import './chunk-O2LG3PNI.js';
13
+ import './chunk-EDSK6FEH.js';
14
+ import './chunk-J2BCKBHC.js';
15
+ import './chunk-24TO7E32.js';
16
+ import './chunk-ZZA2LUTL.js';
17
+ import './chunk-O4GRKO3I.js';
18
+ import './chunk-GCVA3OIV.js';
19
+ import './chunk-ZSNJ6UA3.js';
20
+ //# sourceMappingURL=combobox.js.map
21
+ //# sourceMappingURL=combobox.js.map