@spear-ai/spectral 1.12.0 → 1.12.2
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 +8 -8
- package/dist/{es2015-YHaMV-St.js → Combination-9q50p_Vu.js} +251 -254
- package/dist/Combobox/ComboboxBase.js +492 -3
- package/dist/Combobox-Ch5Rxk5v.js +6360 -0
- package/dist/Combobox.js +3 -137
- package/dist/DateTimePicker/Calendar.js +1 -1
- package/dist/DateTimePicker/DateTimeDisplayInput.js +1 -1
- package/dist/DateTimePicker/DateTimeInput.js +1 -1
- package/dist/DateTimePicker/DateTimeUtils.js +1 -1
- package/dist/DateTimePicker/TimePicker.js +1 -1
- package/dist/DateTimePicker.js +2 -2
- package/dist/Dialog.js +2 -2
- package/dist/Drawer.js +1 -1
- package/dist/DropdownMenu.js +241 -241
- package/dist/{HoverCard-DERasp0v.js → HoverCard-BGpW6LnA.js} +2 -2
- package/dist/HoverCard.js +1 -1
- package/dist/MultiSelect/MultiSelectBase.js +1 -1
- package/dist/Popover.js +1 -1
- package/dist/{RadioGroup-DqKggFnI.js → RadioGroup-CfjhpW5o.js} +3 -3
- package/dist/RadioGroup.js +1 -1
- package/dist/Select.js +55 -55
- package/dist/{Slider-CfUFkWU4.js → Slider-mODhqkCs.js} +3 -3
- package/dist/Slider.js +1 -1
- package/dist/{Tooltip-BR0tdif4.js → Tooltip-DH_BzFye.js} +3 -3
- package/dist/Tooltip.js +1 -1
- package/dist/Tray.js +1 -1
- package/dist/{dist-DcUGLq_y.js → dist-BMu6Dgh_.js} +1 -1
- package/dist/{dist-fW81qjVl.js → dist-C9fJjxxB.js} +41 -41
- package/dist/{dist-C0Hifjgh.js → dist-Cv8I-d2q.js} +2 -2
- package/dist/{dist-B9tup-4O.js → dist-D6QANKSj.js} +5 -5
- package/dist/{dist-3Af8168y.js → dist-Tbzy5UFA.js} +1 -1
- package/dist/{dist-B2k1iWFp.js → dist-jQ7HawWM.js} +1 -1
- package/dist/{dist-BtdmHAzK.js → dist-nYKAWiy4.js} +6 -6
- package/dist/primitives/popover.js +1 -1
- package/dist/primitives/select.js +32 -32
- package/dist/styles/spectral.css +1 -1
- package/package.json +4 -2
- package/dist/ComboboxBase-BzDGK36x.js +0 -491
- /package/dist/{Calendar-Cnh_PTbQ.js → Calendar-2UVWeLYp.js} +0 -0
- /package/dist/{DateTimeUtils-BJUAMuot.js → DateTimeUtils-DrR2JWoU.js} +0 -0
- /package/dist/{dist-Bfjk-jx9.js → dist-ChNh3U3S.js} +0 -0
- /package/dist/{dist-D8Wb_MX9.js → dist-DDjUcieO.js} +0 -0
- /package/dist/{dist-s1uWaZYZ.js → dist-DFT13f_s.js} +0 -0
- /package/dist/{dist-ClmepHp4.js → dist-DIt8FP2G.js} +0 -0
- /package/dist/{dist-BK1K0g9W.js → dist-K0_i37VL.js} +0 -0
|
@@ -4,8 +4,8 @@ import { ChevronDownIcon as t } from "../Icons/ChevronDownIcon.js";
|
|
|
4
4
|
import { ChevronUpIcon as n } from "../Icons/ChevronUpIcon.js";
|
|
5
5
|
import { t as r } from "../twUtils-D_qzdiwM.js";
|
|
6
6
|
import { getDropdownSurfaceClasses as i } from "../utils/formFieldUtils.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { a, c as o, d as s, f as c, h as l, i as u, l as d, m as f, n as p, o as m, p as h, r as g, s as _, t as v, u as y } from "../dist-C9fJjxxB.js";
|
|
8
|
+
import { useAutoDropdownHorizontalShift as b } from "../utils/dropdownPositioning.js";
|
|
9
9
|
import { useRef as x } from "react";
|
|
10
10
|
import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
11
11
|
//#region src/primitives/select.tsx
|
|
@@ -33,91 +33,91 @@ var w = 12, T = (e) => {
|
|
|
33
33
|
top: Math.max(0, r.scrollTop - s),
|
|
34
34
|
behavior: "smooth"
|
|
35
35
|
});
|
|
36
|
-
}, D = ({ ...e }) => /* @__PURE__ */ S(
|
|
36
|
+
}, D = ({ ...e }) => /* @__PURE__ */ S(d, {
|
|
37
37
|
"data-slot": "select",
|
|
38
38
|
...e
|
|
39
|
-
}), O = ({ ...e }) => /* @__PURE__ */ S(
|
|
39
|
+
}), O = ({ ...e }) => /* @__PURE__ */ S(p, {
|
|
40
40
|
"data-slot": "select-group",
|
|
41
41
|
...e
|
|
42
|
-
}), k = ({ className: e, ...t }) => /* @__PURE__ */ S(
|
|
42
|
+
}), k = ({ className: e, ...t }) => /* @__PURE__ */ S(f, {
|
|
43
43
|
className: r("min-w-0 block max-w-full flex-1 truncate text-left whitespace-nowrap text-input-text! data-placeholder:text-input-text-placeholder!", e),
|
|
44
44
|
"data-slot": "select-value",
|
|
45
45
|
...t
|
|
46
|
-
}), A = ({ asChild: e, children: n, className: i, size: a = "default", ...o }) => /* @__PURE__ */ C(
|
|
46
|
+
}), A = ({ asChild: e, children: n, className: i, size: a = "default", ...o }) => /* @__PURE__ */ C(h, {
|
|
47
47
|
asChild: e,
|
|
48
48
|
className: r("[&_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 min-w-0 *:data-[slot=select-value]:min-w-0 flex w-fit cursor-pointer items-center justify-between border border-input-border bg-transparent text-input-text! 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-[state=open]:**:data-[slot=select-chevron]:rotate-180 [&_svg]:pointer-events-none [&_svg]:shrink-0", i),
|
|
49
49
|
"data-size": a,
|
|
50
50
|
"data-slot": "select-trigger",
|
|
51
51
|
...o,
|
|
52
|
-
children: [n, !e && /* @__PURE__ */ S(
|
|
52
|
+
children: [n, !e && /* @__PURE__ */ S(g, {
|
|
53
53
|
asChild: !0,
|
|
54
54
|
children: /* @__PURE__ */ S(t, {
|
|
55
55
|
className: "size-4 opacity-50 transition-transform duration-200",
|
|
56
56
|
"data-slot": "select-chevron"
|
|
57
57
|
})
|
|
58
58
|
})]
|
|
59
|
-
}), j = ({ align: e = "center", children: t, className: n, dropdownWidth:
|
|
60
|
-
let
|
|
61
|
-
return /* @__PURE__ */ S(
|
|
59
|
+
}), j = ({ align: e = "center", children: t, className: n, dropdownWidth: a = "trigger", onCloseAutoFocus: s, onFocusCapture: c, position: u = "popper", style: d, ...f }) => {
|
|
60
|
+
let p = x(!1), { dropdownShiftStyle: m, recalculateDropdownPosition: h, setDropdownElement: g } = b(), _ = a === "trigger" ? "var(--radix-select-trigger-width)" : a === "content" ? "max-content" : a, y = a === "trigger" || a === "content" ? a : "custom";
|
|
61
|
+
return /* @__PURE__ */ S(o, { children: /* @__PURE__ */ C(v, {
|
|
62
62
|
align: e,
|
|
63
|
-
className: r("min-w-32 relative z-50 max-h-[--radix-select-content-available-height] origin-[--radix-select-content-transform-origin] overflow-x-hidden overflow-y-auto text-text-primary motion-safe:data-[side=bottom]:slide-in-from-top-2 motion-safe:data-[side=left]:slide-in-from-right-2 motion-safe:data-[side=right]:slide-in-from-left-2 motion-safe:data-[side=top]:slide-in-from-bottom-2 motion-safe:data-[state=closed]:animate-out motion-safe:data-[state=closed]:fade-out-0 motion-safe:data-[state=closed]:zoom-out-95 motion-safe:data-[state=open]:animate-in motion-safe:data-[state=open]:fade-in-0 motion-safe:data-[state=open]:zoom-in-95", i(),
|
|
64
|
-
"data-dropdown-width-mode":
|
|
65
|
-
"data-dropdown-width-value":
|
|
63
|
+
className: r("min-w-32 relative z-50 max-h-[--radix-select-content-available-height] origin-[--radix-select-content-transform-origin] overflow-x-hidden overflow-y-auto text-text-primary motion-safe:data-[side=bottom]:slide-in-from-top-2 motion-safe:data-[side=left]:slide-in-from-right-2 motion-safe:data-[side=right]:slide-in-from-left-2 motion-safe:data-[side=top]:slide-in-from-bottom-2 motion-safe:data-[state=closed]:animate-out motion-safe:data-[state=closed]:fade-out-0 motion-safe:data-[state=closed]:zoom-out-95 motion-safe:data-[state=open]:animate-in motion-safe:data-[state=open]:fade-in-0 motion-safe:data-[state=open]:zoom-in-95", i(), u === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", n),
|
|
64
|
+
"data-dropdown-width-mode": y,
|
|
65
|
+
"data-dropdown-width-value": y === "custom" ? a : void 0,
|
|
66
66
|
"data-slot": "select-content",
|
|
67
67
|
onCloseAutoFocus: (e) => {
|
|
68
|
-
|
|
68
|
+
p.current = !1, s?.(e);
|
|
69
69
|
},
|
|
70
70
|
onFocusCapture: (e) => {
|
|
71
|
-
if (
|
|
72
|
-
|
|
71
|
+
if (c?.(e), p.current) return;
|
|
72
|
+
p.current = !0;
|
|
73
73
|
let t = e.currentTarget;
|
|
74
74
|
requestAnimationFrame(() => {
|
|
75
|
-
E(t),
|
|
75
|
+
E(t), h();
|
|
76
76
|
});
|
|
77
77
|
},
|
|
78
|
-
position:
|
|
79
|
-
ref:
|
|
78
|
+
position: u,
|
|
79
|
+
ref: g,
|
|
80
80
|
style: {
|
|
81
|
-
...
|
|
82
|
-
width:
|
|
83
|
-
...
|
|
81
|
+
...d,
|
|
82
|
+
width: _,
|
|
83
|
+
...m
|
|
84
84
|
},
|
|
85
|
-
...
|
|
85
|
+
...f,
|
|
86
86
|
children: [
|
|
87
87
|
/* @__PURE__ */ S(F, {}),
|
|
88
|
-
/* @__PURE__ */ S(
|
|
89
|
-
className: r("p-1",
|
|
88
|
+
/* @__PURE__ */ S(l, {
|
|
89
|
+
className: r("p-1", u === "popper" && "scroll-my-1 h-(--radix-select-trigger-height) w-full min-w-full"),
|
|
90
90
|
"data-slot": "select-viewport",
|
|
91
91
|
children: t
|
|
92
92
|
}),
|
|
93
93
|
/* @__PURE__ */ S(I, {})
|
|
94
94
|
]
|
|
95
95
|
}) });
|
|
96
|
-
}, M = ({ className: e, ...t }) => /* @__PURE__ */ S(
|
|
96
|
+
}, M = ({ className: e, ...t }) => /* @__PURE__ */ S(_, {
|
|
97
97
|
className: r("px-2 py-1.5 text-xs text-text-primary", e),
|
|
98
98
|
"data-slot": "select-label",
|
|
99
99
|
...t
|
|
100
|
-
}), N = ({ className: t, children: n, ...i }) => /* @__PURE__ */ C(
|
|
100
|
+
}), N = ({ className: t, children: n, ...i }) => /* @__PURE__ */ C(u, {
|
|
101
101
|
className: r("gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm [&_svg:not([class*='size-'])]:size-4 *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-none select-none hover:border-input-border--hover hover:bg-accent hover:text-text-inverted! focus:border-input-border--focus focus:bg-accent focus:text-text-inverted! data-disabled:pointer-events-none data-disabled:opacity-50 data-highlighted:bg-accent data-highlighted:text-text-inverted! [&_svg]:pointer-events-none [&_svg]:shrink-0 hover:[&_svg]:text-text-inverted! focus:[&_svg]:text-text-inverted! data-highlighted:[&_svg]:text-text-inverted! *:[span]:last:flex *:[span]:last:items-center", t),
|
|
102
102
|
"data-slot": "select-item",
|
|
103
103
|
...i,
|
|
104
104
|
children: [/* @__PURE__ */ S("span", {
|
|
105
105
|
className: "right-2 size-3.5 absolute flex items-center justify-center",
|
|
106
|
-
children: /* @__PURE__ */ S(
|
|
107
|
-
}), /* @__PURE__ */ S(
|
|
106
|
+
children: /* @__PURE__ */ S(a, { children: /* @__PURE__ */ S(e, { className: "size-4" }) })
|
|
107
|
+
}), /* @__PURE__ */ S(m, {
|
|
108
108
|
className: "min-w-0 block max-w-full truncate whitespace-nowrap",
|
|
109
109
|
children: n
|
|
110
110
|
})]
|
|
111
|
-
}), P = ({ className: e, ...t }) => /* @__PURE__ */ S(
|
|
111
|
+
}), P = ({ className: e, ...t }) => /* @__PURE__ */ S(c, {
|
|
112
112
|
className: r("bg-border -mx-1 my-1 pointer-events-none h-px", e),
|
|
113
113
|
"data-slot": "select-separator",
|
|
114
114
|
...t
|
|
115
|
-
}), F = ({ className: e, ...t }) => /* @__PURE__ */ S(
|
|
115
|
+
}), F = ({ className: e, ...t }) => /* @__PURE__ */ S(s, {
|
|
116
116
|
className: r("py-1 flex cursor-default items-center justify-center", e),
|
|
117
117
|
"data-slot": "select-scroll-up-button",
|
|
118
118
|
...t,
|
|
119
119
|
children: /* @__PURE__ */ S(n, { className: "size-4" })
|
|
120
|
-
}), I = ({ className: e, ...n }) => /* @__PURE__ */ S(
|
|
120
|
+
}), I = ({ className: e, ...n }) => /* @__PURE__ */ S(y, {
|
|
121
121
|
className: r("py-1 flex cursor-default items-center justify-center", e),
|
|
122
122
|
"data-slot": "select-scroll-down-button",
|
|
123
123
|
...n,
|