@spear-ai/spectral 1.12.3 → 1.12.5
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.
- package/dist/.js +4 -4
- package/dist/{Combobox-Ch5Rxk5v.js → Combobox-CWYypzjZ.js} +30 -13
- package/dist/Combobox.js +1 -1
- package/dist/ControlGroup/ControlGroupSelect.js +3 -3
- package/dist/ControlGroup.js +1 -1
- package/dist/DateTimePicker/TimePeriodSelect.js +1 -1
- package/dist/DropdownMenu.js +8 -8
- package/dist/Select.js +2 -2
- package/dist/chunk-C4rFPcKS.js +3 -3
- package/dist/hooks/useConvertToOklch.d.ts.map +1 -1
- package/dist/primitives/select.d.ts.map +1 -1
- package/dist/primitives/select.js +1 -1
- package/dist/{select-D5Jexytu.js → select-D7pPhL6t.js} +3 -3
- package/dist/styles/spectral.css +1 -1
- package/dist/utils/formFieldUtils.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/Combobox/ComboboxBase.d.ts +0 -8
- package/dist/Combobox/ComboboxBase.js +0 -492
package/dist/.js
CHANGED
|
@@ -92,9 +92,9 @@ import { ButtonGroup as Ie, ButtonGroupItem as Le, ButtonGroupSeparator as Re }
|
|
|
92
92
|
import { ButtonIcon as ze } from "./ButtonIcon.js";
|
|
93
93
|
import { useUncontrolledState as Be } from "./hooks/useUncontrolledState.js";
|
|
94
94
|
import { Checkbox as Ve } from "./Checkbox.js";
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
95
|
+
import { Label as He } from "./Label.js";
|
|
96
|
+
import { InputGroup as Ue, InputGroupAddon as We, InputGroupButton as Ge, InputGroupInput as Ke, InputGroupText as qe, InputGroupTextarea as Je } from "./primitives/input-group.js";
|
|
97
|
+
import { t as Ye } from "./Combobox-CWYypzjZ.js";
|
|
98
98
|
import { ControlGroupSelect as Xe } from "./ControlGroup/ControlGroupSelect.js";
|
|
99
99
|
import { DataCard as Ze } from "./DataCard.js";
|
|
100
100
|
import { Popover as Qe, PopoverContent as $e, PopoverTrigger as et } from "./Popover.js";
|
|
@@ -123,4 +123,4 @@ import { ToggleGroup as Ot, ToggleGroupItem as kt } from "./ToggleGroup.js";
|
|
|
123
123
|
import { i as At, n as jt, t as Mt } from "./Tooltip-DH_BzFye.js";
|
|
124
124
|
import { Tray as Nt } from "./Tray.js";
|
|
125
125
|
import { useControllableState as Pt } from "./hooks/useControllableState.js";
|
|
126
|
-
export { ke as Accordion, n as AdjustmentsIcon, je as Alert, r as AnalyzeIcon, i as AnnotationsIcon, a as ApprovedIcon, o as ArrowDownIcon, s as ArrowUpIcon, Me as Avatar, Ne as Badge, c as BoxToolIcon, Pe as Button, Ie as ButtonGroup, Le as ButtonGroupItem, Re as ButtonGroupSeparator, ze as ButtonIcon, l as CalendarIcon, u as CheckCircleIcon, d as CheckSquareIcon, Ve as Checkbox, f as CheckmarkIcon, p as ChevronDownIcon, m as ChevronUpIcon, h as ClockIcon, g as CloseCircleIcon, _ as CloseIcon,
|
|
126
|
+
export { ke as Accordion, n as AdjustmentsIcon, je as Alert, r as AnalyzeIcon, i as AnnotationsIcon, a as ApprovedIcon, o as ArrowDownIcon, s as ArrowUpIcon, Me as Avatar, Ne as Badge, c as BoxToolIcon, Pe as Button, Ie as ButtonGroup, Le as ButtonGroupItem, Re as ButtonGroupSeparator, ze as ButtonIcon, l as CalendarIcon, u as CheckCircleIcon, d as CheckSquareIcon, Ve as Checkbox, f as CheckmarkIcon, p as ChevronDownIcon, m as ChevronUpIcon, h as ClockIcon, g as CloseCircleIcon, _ as CloseIcon, Ye as Combobox, Xe as ControlGroupSelect, v as Crosshairs2Icon, y as CrosshairsIcon, b as DashboardIcon, Ze as DataCard, x as DatabaseIcon, tt as DateTimePicker, S as DeleteIcon, nt as Dialog, it as Drawer, C as DurationIcon, w as EditIcon, T as EmailIcon, E as EraserIcon, D as ErrorIcon, O as EyeClosedIcon, k as EyeClosedIcon2, A as EyeOpenIcon, j as FileDownloadIcon, M as GoToFirstIcon, N as GoToLastIcon, P as HarmonicCursorsIcon, st as HoverCard, at as HoverCardContent, ot as HoverCardTrigger, e as IconBase, F as InfoIcon, ct as Input, Ue as InputGroup, We as InputGroupAddon, Ge as InputGroupButton, Ke as InputGroupInput, qe as InputGroupText, Je as InputGroupTextarea, lt as InputNumeric, ut as InputOTP, dt as Kbd, ft as KbdGroup, I as KeyboardIcon, He as Label, L as LabelIcon, R as LassoIcon, z as LineToolIcon, B as LiveViewIcon, V as LoaderIcon, H as LocationIcon, U as LogoutIcon, W as MaximizeIcon, G as MeasureIcon, K as MenuDotsIcon, q as MenuIcon, J as MessagesIcon, Y as MetadataIcon, X as MinimizeIcon, Z as MinusIcon, pt as MultiSelect, Q as OntologyIcon, $ as PanelIconClose, ee as PanelIconOpen, te as PauseIcon, ne as PlayIcon, re as PlusIcon, ie as PolygonIcon, Qe as Popover, $e as PopoverContent, et as PopoverTrigger, ae as PrinterIcon, oe as ProgressCheckIcon, gt as RadioButton, mt as RadioButtonGroup, ht as RadioButtonGroupItem, vt as RadioGroup, _t as RadioGroupItem, se as ResetIcon, ce as ReviewedIcon, le as ScissorsIcon, ue as SearchIcon, yt as Select, Fe as Separator, de as SettingsIcon, bt as Skeleton, xt as Slider, fe as SortAscendingIcon, pe as SortAtoZIcon, me as SortDescendingIcon, he as SortZtoAIcon, ge as SparklesIcon, rt as SpectralProvider, _e as StackIcon, ve as StarIcon, t as SvgIdContext, St as Switch, Ct as Tabs, wt as Textarea, Et as Toast, Dt as Toggle, Ot as ToggleGroup, kt as ToggleGroupItem, Mt as Tooltip, jt as TooltipContent, At as TooltipTrigger, ye as TrashIcon, Nt as Tray, be as UndoIcon, xe as UploadIcon, Se as User2Icon, Ce as UserIcon, we as WarningIcon, Te as ZoomAllIcon, Ee as ZoomXIcon, De as ZoomYIcon, Ae as cn, Tt as toast, Oe as useAccordionAutoScroll, Pt as useControllableState, Be as useUncontrolledState };
|
|
@@ -6225,16 +6225,18 @@ process.env.NODE_ENV !== "production" && (Fc.displayName = "Inner");
|
|
|
6225
6225
|
//#region src/components/Combobox/Combobox.tsx
|
|
6226
6226
|
var Ic = ({ className: e, disabled: t, defaultValue: S = "", dropdownWidth: C = "trigger", emptyMessage: w = "No options found.", errorMessage: D, id: A, label: j, labelClassName: M, loadingMessage: N = "Loading…", name: P, onChange: F, onValueChange: te, options: ne, placeholder: I = "Search…", ref: re, required: L, state: R = "default", value: ie, warningMessage: ae, "aria-describedby": oe, "aria-label": se }) => {
|
|
6227
6227
|
process.env.NODE_ENV !== "production" && !j && !se && console.warn("Combobox: provide either `label` or `aria-label` for an accessible name.");
|
|
6228
|
-
let ce = _(A, P), le = `${ce}-listbox`, z = p(ce), ue = `${ce}-warning`, de = R === "error" ? z : R === "warning" && ae ? ue : void 0, fe = !!t, pe = R === "loading", B = R === "error", me = u(R, oe, L, de), [he, V] = E(!1), [ge, _e] = E(""), ve = ee(null),
|
|
6228
|
+
let ce = _(A, P), le = `${ce}-listbox`, z = p(ce), ue = `${ce}-warning`, de = R === "error" ? z : R === "warning" && ae ? ue : void 0, fe = !!t, pe = R === "loading", B = R === "error", me = u(R, oe, L, de), [he, V] = E(!1), [ge, _e] = E(""), ve = ee(null), ye = ee(!1), be = () => {
|
|
6229
|
+
ye.current = !1;
|
|
6230
|
+
}, [xe, Se] = v({
|
|
6229
6231
|
value: ie,
|
|
6230
6232
|
defaultValue: S,
|
|
6231
6233
|
onChange: (e) => {
|
|
6232
6234
|
F ? F(e) : te?.(e);
|
|
6233
6235
|
}
|
|
6234
|
-
}),
|
|
6236
|
+
}), H = T(() => ne.find((e) => e.value === xe) ?? null, [ne, xe]), Ce = T(() => {
|
|
6235
6237
|
let e = ge.trim().toLowerCase();
|
|
6236
6238
|
return e ? ne.filter((t) => t.label.toLowerCase().includes(e)) : ne;
|
|
6237
|
-
}, [ge, ne]),
|
|
6239
|
+
}, [ge, ne]), we = !!(H && ge.length === 0), { dropdownWidthMode: Te, dropdownWidthStyle: Ee } = f({
|
|
6238
6240
|
dropdownWidth: C,
|
|
6239
6241
|
triggerWidth: "var(--anchor-width)"
|
|
6240
6242
|
});
|
|
@@ -6269,11 +6271,11 @@ var Ic = ({ className: e, disabled: t, defaultValue: S = "", dropdownWidth: C =
|
|
|
6269
6271
|
},
|
|
6270
6272
|
onValueChange: (e, t) => {
|
|
6271
6273
|
let n = e?.value ?? "";
|
|
6272
|
-
|
|
6274
|
+
Se(t.reason === "item-press" && n === xe ? "" : n), _e(""), V(!1);
|
|
6273
6275
|
},
|
|
6274
6276
|
open: he,
|
|
6275
6277
|
required: L,
|
|
6276
|
-
value:
|
|
6278
|
+
value: H,
|
|
6277
6279
|
children: [/* @__PURE__ */ k(ac, {
|
|
6278
6280
|
render: /* @__PURE__ */ O(b, {
|
|
6279
6281
|
"data-slot": "combobox-content",
|
|
@@ -6292,14 +6294,18 @@ var Ic = ({ className: e, disabled: t, defaultValue: S = "", dropdownWidth: C =
|
|
|
6292
6294
|
"aria-expanded": he,
|
|
6293
6295
|
"aria-label": se ?? j,
|
|
6294
6296
|
autoComplete: "off",
|
|
6295
|
-
className: a("min-w-0 text-base flex-1 truncate overflow-hidden border-0 bg-transparent whitespace-nowrap text-input-text outline-hidden
|
|
6297
|
+
className: a("min-w-0 text-base flex-1 truncate overflow-hidden border-0 bg-transparent whitespace-nowrap text-input-text outline-hidden placeholder:opacity-100 focus-visible:ring-0 focus-visible:outline-none outline-0", we ? "placeholder:text-input-text!" : "placeholder:text-input-text-placeholder!"),
|
|
6296
6298
|
"data-slot": "input-group-control",
|
|
6297
6299
|
id: ce,
|
|
6298
6300
|
onFocus: () => {
|
|
6301
|
+
if (ye.current) {
|
|
6302
|
+
ye.current = !1;
|
|
6303
|
+
return;
|
|
6304
|
+
}
|
|
6299
6305
|
!fe && !pe && V(!0);
|
|
6300
6306
|
},
|
|
6301
6307
|
ref: ve,
|
|
6302
|
-
placeholder:
|
|
6308
|
+
placeholder: H?.label ?? I,
|
|
6303
6309
|
role: "combobox",
|
|
6304
6310
|
...me
|
|
6305
6311
|
}), /* @__PURE__ */ O(x, {
|
|
@@ -6309,6 +6315,17 @@ var Ic = ({ className: e, disabled: t, defaultValue: S = "", dropdownWidth: C =
|
|
|
6309
6315
|
"aria-label": "Toggle options",
|
|
6310
6316
|
className: "cursor-pointer",
|
|
6311
6317
|
"data-slot": "combobox-trigger-button",
|
|
6318
|
+
onPointerDownCapture: () => {
|
|
6319
|
+
let e = ve.current;
|
|
6320
|
+
if (!e) {
|
|
6321
|
+
be();
|
|
6322
|
+
return;
|
|
6323
|
+
}
|
|
6324
|
+
ye.current = e.ownerDocument.activeElement !== e;
|
|
6325
|
+
},
|
|
6326
|
+
onPointerUpCapture: be,
|
|
6327
|
+
onPointerCancelCapture: be,
|
|
6328
|
+
onTouchEndCapture: be,
|
|
6312
6329
|
children: pe ? /* @__PURE__ */ O(i, { className: "size-5 motion-safe:animate-spin" }) : /* @__PURE__ */ O(r, { className: a("size-5 shrink-0 transition-transform duration-200", he && "rotate-180") })
|
|
6313
6330
|
})
|
|
6314
6331
|
})]
|
|
@@ -6318,15 +6335,15 @@ var Ic = ({ className: e, disabled: t, defaultValue: S = "", dropdownWidth: C =
|
|
|
6318
6335
|
sideOffset: 4,
|
|
6319
6336
|
children: /* @__PURE__ */ O(Dc, {
|
|
6320
6337
|
className: a("p-1 z-50 motion-safe:data-closed:animate-out motion-safe:data-open:animate-in", d(), "motion-safe:data-closed:fade-out-0 motion-safe:data-closed:zoom-out-95 motion-safe:data-open:fade-in-0 motion-safe:data-open:zoom-in-95", "max-h-[min(var(--available-height),18rem)] motion-safe:data-[side=bottom]:slide-in-from-top-2 motion-safe:data-[side=top]:slide-in-from-bottom-2", "min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto"),
|
|
6321
|
-
"data-dropdown-width-mode":
|
|
6322
|
-
"data-dropdown-width-value":
|
|
6338
|
+
"data-dropdown-width-mode": Te,
|
|
6339
|
+
"data-dropdown-width-value": Te === "custom" ? C : void 0,
|
|
6323
6340
|
"data-testid": "spectral-combobox-content",
|
|
6324
|
-
style:
|
|
6325
|
-
children: pe ? /* @__PURE__ */ O(c, { message: N }) :
|
|
6341
|
+
style: Ee,
|
|
6342
|
+
children: pe ? /* @__PURE__ */ O(c, { message: N }) : Ce.length === 0 ? /* @__PURE__ */ O(o, { message: w }) : /* @__PURE__ */ O(lc, {
|
|
6326
6343
|
className: "max-h-[min(var(--available-height),18rem)] overflow-y-auto",
|
|
6327
6344
|
id: le,
|
|
6328
|
-
children:
|
|
6329
|
-
className: a(h(!!e.disabled, !1,
|
|
6345
|
+
children: Ce.map((e) => /* @__PURE__ */ k(Mc, {
|
|
6346
|
+
className: a(h(!!e.disabled, !1, xe === e.value), "group/command-item relative flex w-full items-center data-highlighted:bg-input-bg--hover"),
|
|
6330
6347
|
"data-testid": "spectral-combobox-item",
|
|
6331
6348
|
disabled: e.disabled,
|
|
6332
6349
|
value: e,
|
package/dist/Combobox.js
CHANGED
|
@@ -4,7 +4,7 @@ import { t as e } from "../twUtils-D_qzdiwM.js";
|
|
|
4
4
|
import { getStateClasses as t } from "../utils/formFieldUtils.js";
|
|
5
5
|
import { Label as n } from "../Label.js";
|
|
6
6
|
import { Input as r } from "../primitives/input.js";
|
|
7
|
-
import { i, l as a, n as o, t as s, u as c } from "../select-
|
|
7
|
+
import { i, l as a, n as o, t as s, u as c } from "../select-D7pPhL6t.js";
|
|
8
8
|
import { ControlGroup as l, ControlGroupItem as u, useControlGroup as d } from "../ControlGroup.js";
|
|
9
9
|
import { useId as f } from "react";
|
|
10
10
|
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
@@ -77,13 +77,13 @@ var g = "placeholder:text-small! [appearance:textfield] [&::-webkit-inner-spin-b
|
|
|
77
77
|
"aria-describedby": V,
|
|
78
78
|
"aria-label": I,
|
|
79
79
|
"aria-labelledby": B ? M : void 0,
|
|
80
|
-
className: e(b, G, "
|
|
80
|
+
className: e(b, G, "w-full justify-between px-4 focus-visible:ring-0", t(U)),
|
|
81
81
|
"data-testid": `${f}-select-trigger`,
|
|
82
82
|
disabled: D,
|
|
83
83
|
id: B ? L : void 0,
|
|
84
84
|
style: R ? { minWidth: R } : void 0,
|
|
85
85
|
children: /* @__PURE__ */ m(c, {
|
|
86
|
-
className: "min-w-0
|
|
86
|
+
className: "block min-w-0 max-w-full truncate whitespace-nowrap text-left text-input-text! data-placeholder:text-input-text-placeholder!",
|
|
87
87
|
placeholder: j
|
|
88
88
|
})
|
|
89
89
|
});
|
package/dist/ControlGroup.js
CHANGED
|
@@ -48,7 +48,7 @@ var d = s(null), f = () => {
|
|
|
48
48
|
let { orientation: i } = f();
|
|
49
49
|
return /* @__PURE__ */ l(t, {
|
|
50
50
|
"data-slot": "control-group-item",
|
|
51
|
-
className: e("rounded-none
|
|
51
|
+
className: e("rounded-none hover:z-10 focus-within:z-10", i === "horizontal" && "first:rounded-s-md last:me-0 last:rounded-e-md -me-0.5 h-auto", i === "vertical" && "first:rounded-ss-md first:rounded-se-md last:rounded-ee-md last:rounded-es-md last:mbe-0 -mbe-0.5 w-auto", n),
|
|
52
52
|
...r
|
|
53
53
|
});
|
|
54
54
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import '../styles/main.css'
|
|
3
3
|
import { t as e } from "../twUtils-D_qzdiwM.js";
|
|
4
|
-
import { i as t, l as n, n as r, t as i, u as a } from "../select-
|
|
4
|
+
import { i as t, l as n, n as r, t as i, u as a } from "../select-D7pPhL6t.js";
|
|
5
5
|
import { forwardRef as o } from "react";
|
|
6
6
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/DateTimePicker/TimePeriodSelect.tsx
|
package/dist/DropdownMenu.js
CHANGED
|
@@ -782,7 +782,7 @@ var tn = Et, nn = Ot, rn = At, an = Mt, on = It, sn = Rt, cn = Bt, ln = Kt, un =
|
|
|
782
782
|
"data-testid": "spectral-dropdown-menu-label",
|
|
783
783
|
children: t.label
|
|
784
784
|
}, t.id ?? `label-${n}`);
|
|
785
|
-
let r = se(t.value), i = p(v(!!t.disabled, !1, r), "group/spectral-dropdown-menu-item
|
|
785
|
+
let r = se(t.value), i = p(v(!!t.disabled, !1, r), "group/spectral-dropdown-menu-item relative flex w-full justify-between pr-2 gap-4");
|
|
786
786
|
return w === "multiple" || t.type === "checkbox" ? /* @__PURE__ */ M(cn, {
|
|
787
787
|
checked: r,
|
|
788
788
|
className: i,
|
|
@@ -796,16 +796,16 @@ var tn = Et, nn = Ot, rn = At, an = Mt, on = It, sn = Rt, cn = Bt, ln = Kt, un =
|
|
|
796
796
|
children: t.label
|
|
797
797
|
}),
|
|
798
798
|
t.shortcut && /* @__PURE__ */ j("span", {
|
|
799
|
-
className: "text-xs tracking-widest
|
|
799
|
+
className: "ml-auto text-xs tracking-widest text-input-text-placeholder",
|
|
800
800
|
children: t.shortcut
|
|
801
801
|
}),
|
|
802
802
|
/* @__PURE__ */ j("span", {
|
|
803
803
|
"aria-hidden": "true",
|
|
804
|
-
className: "ml-2 size-4
|
|
804
|
+
className: "ml-2 flex size-4 shrink-0 items-center justify-center",
|
|
805
805
|
children: /* @__PURE__ */ j(ln, {
|
|
806
806
|
asChild: !0,
|
|
807
807
|
children: /* @__PURE__ */ j("span", {
|
|
808
|
-
className: "size-4
|
|
808
|
+
className: "flex size-4 items-center justify-center",
|
|
809
809
|
children: /* @__PURE__ */ j(e, { size: 16 })
|
|
810
810
|
})
|
|
811
811
|
})
|
|
@@ -822,12 +822,12 @@ var tn = Et, nn = Ot, rn = At, an = Mt, on = It, sn = Rt, cn = Bt, ln = Kt, un =
|
|
|
822
822
|
children: t.label
|
|
823
823
|
}),
|
|
824
824
|
t.shortcut && /* @__PURE__ */ j("span", {
|
|
825
|
-
className: "text-xs tracking-widest
|
|
825
|
+
className: "ml-auto text-xs tracking-widest text-input-text-placeholder",
|
|
826
826
|
children: t.shortcut
|
|
827
827
|
}),
|
|
828
828
|
/* @__PURE__ */ j("span", {
|
|
829
829
|
"aria-hidden": "true",
|
|
830
|
-
className: "ml-2 size-4
|
|
830
|
+
className: "ml-2 flex size-4 shrink-0 items-center justify-center",
|
|
831
831
|
children: r && /* @__PURE__ */ j(e, { size: 16 })
|
|
832
832
|
})
|
|
833
833
|
]
|
|
@@ -839,7 +839,7 @@ var tn = Et, nn = Ot, rn = At, an = Mt, on = It, sn = Rt, cn = Bt, ln = Kt, un =
|
|
|
839
839
|
open: k,
|
|
840
840
|
children: [/* @__PURE__ */ j(nn, {
|
|
841
841
|
asChild: n,
|
|
842
|
-
className: p(a, "
|
|
842
|
+
className: p(a, "hover:cursor-pointer hover:opacity-80 transition-opacity duration-200"),
|
|
843
843
|
"data-testid": l ?? "spectral-dropdown-menu-trigger",
|
|
844
844
|
disabled: B,
|
|
845
845
|
children: ae
|
|
@@ -847,7 +847,7 @@ var tn = Et, nn = Ot, rn = At, an = Mt, on = It, sn = Rt, cn = Bt, ln = Kt, un =
|
|
|
847
847
|
align: t,
|
|
848
848
|
alignOffset: r,
|
|
849
849
|
avoidCollisions: i,
|
|
850
|
-
className: p("
|
|
850
|
+
className: p("relative z-50 p-1 motion-safe:data-[state=closed]:animate-out motion-safe:data-[state=open]:animate-in", g(), "motion-safe:data-[state=closed]:fade-out-0 motion-safe:data-[state=closed]:zoom-out-95 motion-safe:data-[state=open]:fade-in-0 motion-safe:data-[state=open]:zoom-in-95", "max-h-[min(var(--radix-dropdown-menu-content-available-height),300px)] motion-safe:data-[side=bottom]:slide-in-from-top-2 motion-safe:data-[side=top]:slide-in-from-bottom-2", "min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto", c),
|
|
851
851
|
collisionBoundary: o,
|
|
852
852
|
collisionPadding: s,
|
|
853
853
|
"data-dropdown-width-mode": R,
|
package/dist/Select.js
CHANGED
|
@@ -6,7 +6,7 @@ import { LoaderIcon as n } from "./Icons/LoaderIcon.js";
|
|
|
6
6
|
import { t as r } from "./twUtils-D_qzdiwM.js";
|
|
7
7
|
import { EmptyState as i, ErrorMessage as a, LoadingState as o, WarningMessage as s, getAriaProps as c, getDropdownSurfaceClasses as l, getDropdownWidthStyles as ee, getErrorMessageId as te, getFormFieldCSSProperties as ne, getOptionClasses as re, getTriggerClasses as ie, groupOptions as ae, useFormFieldId as oe } from "./utils/formFieldUtils.js";
|
|
8
8
|
import { Label as u } from "./Label.js";
|
|
9
|
-
import { C as se, S as ce, _ as le, b as ue, d, f, g as de, h as fe, m as pe, p as me, u as he, v as ge, x as p, y as _e } from "./select-
|
|
9
|
+
import { C as se, S as ce, _ as le, b as ue, d, f, g as de, h as fe, m as pe, p as me, u as he, v as ge, x as p, y as _e } from "./select-D7pPhL6t.js";
|
|
10
10
|
import { useAutoDropdownHorizontalShift as ve } from "./utils/dropdownPositioning.js";
|
|
11
11
|
import { useState as ye } from "react";
|
|
12
12
|
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
@@ -106,7 +106,7 @@ var _ = (_) => {
|
|
|
106
106
|
...Fe,
|
|
107
107
|
...De,
|
|
108
108
|
children: /* @__PURE__ */ g("button", {
|
|
109
|
-
className: "
|
|
109
|
+
className: "grid w-full min-w-0 cursor-pointer grid-cols-[minmax(0,1fr)_auto] items-center gap-2 overflow-hidden whitespace-nowrap text-left text-input-text! data-placeholder:text-input-text-placeholder! [&>span]:block [&>span]:min-w-0 [&>span]:overflow-hidden [&>span]:text-ellipsis [&>span]:whitespace-nowrap [&>span[data-placeholder]]:text-input-text-placeholder!",
|
|
110
110
|
type: "button",
|
|
111
111
|
disabled: X,
|
|
112
112
|
children: [/* @__PURE__ */ h(he, {
|
package/dist/chunk-C4rFPcKS.js
CHANGED
|
@@ -12,9 +12,9 @@ var e = Object.defineProperty, t = Object.getOwnPropertyDescriptor, n = Object.g
|
|
|
12
12
|
enumerable: !(s = t(a, d)) || s.enumerable
|
|
13
13
|
});
|
|
14
14
|
return i;
|
|
15
|
-
}, c = (t) => r.call(t, "module.exports") ? t["module.exports"] : s(e({}, "__esModule", { value: !0 }), t), l = /* @__PURE__ */ ((e) => typeof
|
|
16
|
-
if (typeof
|
|
17
|
-
throw Error("Calling `
|
|
15
|
+
}, c = (t) => r.call(t, "module.exports") ? t["module.exports"] : s(e({}, "__esModule", { value: !0 }), t), l = /* @__PURE__ */ ((e) => typeof __spectral_no_require__ < "u" ? __spectral_no_require__ : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof __spectral_no_require__ < "u" ? __spectral_no_require__ : e)[t] }) : e)(function(e) {
|
|
16
|
+
if (typeof __spectral_no_require__ < "u") return __spectral_no_require__.apply(this, arguments);
|
|
17
|
+
throw Error("Calling `__spectral_no_require__` for \"" + e + "\" in an environment that doesn't expose the `__spectral_no_require__` function. See https://rolldown.rs/in-depth/bundling-cjs#__spectral_no_require__-external-modules for more details.");
|
|
18
18
|
});
|
|
19
19
|
//#endregion
|
|
20
20
|
export { c as a, l as i, i as n, o as r, a as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConvertToOklch.d.ts","sourceRoot":"","sources":["../../src/hooks/useConvertToOklch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useConvertToOklch.d.ts","sourceRoot":"","sources":["../../src/hooks/useConvertToOklch.ts"],"names":[],"mappings":"AAmGA,eAAO,MAAM,mBAAmB,GAAI,OAAO,MAAM,KAAG,MAYnD,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,QAAQ,MAAM,uBAIjC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/primitives/select.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AAEzD,OAAO,EAA6B,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAErF,OAAO,EAAU,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AA6CnD,eAAO,MAAM,MAAM,GAAI,cAAc,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,4CAE/E,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,cAAc,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,4CAErF,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,yBAAyB,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/primitives/select.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AAEzD,OAAO,EAA6B,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAErF,OAAO,EAAU,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AA6CnD,eAAO,MAAM,MAAM,GAAI,cAAc,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,4CAE/E,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,cAAc,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,4CAErF,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,yBAAyB,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,4CAYhG,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,kDAM3B,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,GAAG;IAClD,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;CACxB,4CAoBA,CAAA;AAED,KAAK,kBAAkB,GAAG,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,GAAG;IACzE,aAAa,CAAC,EAAE,aAAa,CAAA;CAC9B,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,4GAU3B,kBAAkB,4CA0DpB,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,yBAAyB,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,4CAEhG,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,mCAAmC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,4CAkBxG,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,yBAAyB,cAAc,CAAC,OAAO,eAAe,CAAC,SAAS,CAAC,4CAExG,CAAA;AAED,eAAO,MAAM,oBAAoB,GAAI,yBAAyB,cAAc,CAAC,OAAO,eAAe,CAAC,cAAc,CAAC,4CAMlH,CAAA;AAED,eAAO,MAAM,sBAAsB,GAAI,yBAAyB,cAAc,CAAC,OAAO,eAAe,CAAC,gBAAgB,CAAC,4CAMtH,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "../select-
|
|
2
|
+
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "../select-D7pPhL6t.js";
|
|
3
3
|
export { c as Select, i as SelectContent, o as SelectGroup, n as SelectItem, e as SelectLabel, a as SelectScrollDownButton, s as SelectScrollUpButton, t as SelectSeparator, r as SelectTrigger, l as SelectValue };
|
|
@@ -710,12 +710,12 @@ var Xe = q, Ze = J, Qe = ae, $e = se, et = le, tt = ue, nt = Se, rt = Ee, it = O
|
|
|
710
710
|
"data-slot": "select-group",
|
|
711
711
|
...e
|
|
712
712
|
}), gt = ({ className: e, ...t }) => /* @__PURE__ */ F(Qe, {
|
|
713
|
-
className: p("min-w-0
|
|
713
|
+
className: p("block min-w-0 max-w-full flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-input-text! data-placeholder:text-input-text-placeholder!", "**:max-w-full **:overflow-hidden **:text-ellipsis **:whitespace-nowrap", e),
|
|
714
714
|
"data-slot": "select-value",
|
|
715
715
|
...t
|
|
716
716
|
}), _t = ({ asChild: e, children: n, className: r, size: i = "default", ...a }) => /* @__PURE__ */ I(Ze, {
|
|
717
717
|
asChild: e,
|
|
718
|
-
className: p("[&_svg:not([class*='text-'])]:text-text-placeholder focus-visible:border-ring focus-visible:ring-ring/50 gap-2 rounded-md px-3 py-2 text-sm shadow-xs h-9 *:data-[slot=select-value]:gap-2 [&_svg:not([class*='size-'])]:size-4
|
|
718
|
+
className: p("[&_svg:not([class*='text-'])]:text-text-placeholder focus-visible:border-ring focus-visible:ring-ring/50 gap-2 rounded-md px-3 py-2 text-sm shadow-xs h-9 cursor-pointer text-input-text! *:data-[slot=select-value]:gap-2 [&_svg:not([class*='size-'])]:size-4 flex w-fit min-w-0 items-center justify-between border border-input-border bg-transparent transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-danger-400 data-placeholder:text-input-text-placeholder! *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:min-w-0 data-[state=open]:**:data-[slot=select-chevron]:rotate-180 [&_svg]:pointer-events-none [&_svg]:shrink-0", r),
|
|
719
719
|
"data-size": i,
|
|
720
720
|
"data-slot": "select-trigger",
|
|
721
721
|
...a,
|
|
@@ -775,7 +775,7 @@ var Xe = q, Ze = J, Qe = ae, $e = se, et = le, tt = ue, nt = Se, rt = Ee, it = O
|
|
|
775
775
|
className: "right-2 size-3.5 absolute flex items-center justify-center",
|
|
776
776
|
children: /* @__PURE__ */ F(st, { children: /* @__PURE__ */ F(e, { className: "size-4" }) })
|
|
777
777
|
}), /* @__PURE__ */ F(ot, {
|
|
778
|
-
className: "min-w-0
|
|
778
|
+
className: "block min-w-0 max-w-full truncate whitespace-nowrap",
|
|
779
779
|
children: n
|
|
780
780
|
})]
|
|
781
781
|
}), xt = ({ className: e, ...t }) => /* @__PURE__ */ F(ut, {
|