@spear-ai/spectral 1.8.9 → 1.9.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.
- package/dist/.js +214 -210
- package/dist/Accordion.js +4 -4
- package/dist/Combobox/ComboboxBase.d.ts +8 -0
- package/dist/Combobox/ComboboxBase.js +80 -0
- package/dist/Combobox.d.ts +20 -0
- package/dist/Combobox.js +175 -0
- package/dist/ComboboxBase-CxNxYtdT.js +408 -0
- package/dist/ControlGroup/ControlGroupSelect.d.ts +33 -0
- package/dist/ControlGroup/ControlGroupSelect.js +104 -0
- package/dist/ControlGroup.d.ts +24 -0
- package/dist/ControlGroup.js +51 -0
- package/dist/Dialog.js +2 -2
- package/dist/Drawer.js +1 -1
- package/dist/HoverCard.js +4 -4
- package/dist/MultiSelect/MultiSelectBase.js +128 -126
- package/dist/Popover.js +1 -1
- package/dist/RadioGroup.js +5 -5
- package/dist/Select.js +1 -1
- package/dist/Slider.js +3 -3
- package/dist/Tooltip.js +6 -6
- package/dist/Tray.d.ts +3 -1
- package/dist/Tray.js +36 -32
- package/dist/{Combination-CQ5bXZqE.js → index-6oYKCvIn.js} +179 -178
- package/dist/{index-CtqlhLRO.js → index-BFOf48AQ.js} +1 -1
- package/dist/{index-BJ6qs9i5.js → index-BlHU_t18.js} +7 -7
- package/dist/{index-D2Qxe4uK.js → index-Bm1RbF6w.js} +1 -1
- package/dist/{index-CXltlPV-.js → index-Bv2OIg5P.js} +6 -6
- package/dist/{index-Cgdmxb3F.js → index-CKEI0pDv.js} +1 -1
- package/dist/{index-CDkQCeZY.js → index-CM_hWgfC.js} +1 -1
- package/dist/{index-CJKg3MVV.js → index-C_YVr64u.js} +2 -2
- package/dist/{index-obMGvcdD.js → index-CwSyIPrv.js} +1 -1
- package/dist/{index-9OmOYyjJ.js → index-Dc0No4pV.js} +2 -1
- package/dist/{index-DqvTB1Bv.js → index-T6XEa11q.js} +7 -7
- package/dist/{index-CmWCa9Ae.js → index-pBCLb6Gr.js} +5 -5
- package/dist/{index-WBfSMXvE.js → index-psiVrsnE.js} +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/primitives/button.d.ts +1 -1
- package/dist/primitives/button.d.ts.map +1 -1
- package/dist/primitives/button.js +4 -4
- package/dist/{InputGroup.d.ts → primitives/input-group.d.ts} +10 -7
- package/dist/primitives/input-group.d.ts.map +1 -0
- package/dist/primitives/input-group.js +74 -0
- package/dist/primitives/input.d.ts +6 -1
- package/dist/primitives/input.d.ts.map +1 -1
- package/dist/primitives/input.js +1 -1
- package/dist/primitives/popover.d.ts +10 -0
- package/dist/primitives/popover.d.ts.map +1 -0
- package/dist/primitives/popover.js +26 -0
- package/dist/primitives/select.js +2 -2
- package/dist/styles/spectral.css +2 -2
- package/package.json +1 -1
- package/dist/InputGroup.js +0 -84
package/dist/InputGroup.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import "./styles/main.css";
|
|
2
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
-
import { Button as u } from "./primitives/button.js";
|
|
4
|
-
import { Input as p } from "./primitives/input.js";
|
|
5
|
-
import { Textarea as l } from "./primitives/textarea.js";
|
|
6
|
-
import { cn as e } from "./utils/twUtils.js";
|
|
7
|
-
import { c as s } from "./index-D29mdTf5.js";
|
|
8
|
-
import "react";
|
|
9
|
-
const k = ({ className: r, ...t }) => /* @__PURE__ */ n(
|
|
10
|
-
"div",
|
|
11
|
-
{
|
|
12
|
-
"data-slot": "input-group",
|
|
13
|
-
role: "group",
|
|
14
|
-
className: e(
|
|
15
|
-
"group/input-group border-input-border relative flex w-full items-center rounded-[var(--radius,0.375rem)] border shadow-xs transition-[color,box-shadow] outline-none",
|
|
16
|
-
"h-9 min-w-0 has-[>textarea]:h-auto",
|
|
17
|
-
"has-[>[data-align=inline-start]]:[&>input]:pl-2",
|
|
18
|
-
"has-[>[data-align=inline-end]]:[&>input]:pr-2",
|
|
19
|
-
"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
|
|
20
|
-
"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
|
|
21
|
-
"has-[[data-slot=input-group-control]:focus-visible]:border-input-border has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]",
|
|
22
|
-
"has-[[data-slot][aria-invalid=true]]:ring-danger/20 has-[[data-slot][aria-invalid=true]]:border-danger",
|
|
23
|
-
r
|
|
24
|
-
),
|
|
25
|
-
...t
|
|
26
|
-
}
|
|
27
|
-
), d = s(
|
|
28
|
-
`text-text-secondary flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4
|
|
29
|
-
[&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50`,
|
|
30
|
-
{
|
|
31
|
-
variants: {
|
|
32
|
-
align: {
|
|
33
|
-
"inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
|
|
34
|
-
"inline-end": "order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]",
|
|
35
|
-
"block-start": "order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5",
|
|
36
|
-
"block-end": "order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
defaultVariants: {
|
|
40
|
-
align: "inline-start"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
), y = ({ className: r, align: t = "inline-start", ...o }) => /* @__PURE__ */ n(
|
|
44
|
-
"div",
|
|
45
|
-
{
|
|
46
|
-
role: "group",
|
|
47
|
-
"data-slot": "input-group-addon",
|
|
48
|
-
"data-align": t,
|
|
49
|
-
className: e(d({ align: t }), r),
|
|
50
|
-
onClick: (a) => {
|
|
51
|
-
a.target.closest("button") || a.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
52
|
-
},
|
|
53
|
-
onKeyDown: (a) => {
|
|
54
|
-
if (a.key === "Enter" || a.key === " ") {
|
|
55
|
-
if (a.target.closest("button"))
|
|
56
|
-
return;
|
|
57
|
-
a.preventDefault(), a.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
...o
|
|
61
|
-
}
|
|
62
|
-
), c = s("text-sm shadow-none flex gap-2 items-center", {
|
|
63
|
-
variants: {
|
|
64
|
-
size: {
|
|
65
|
-
xs: "h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",
|
|
66
|
-
sm: "h-8 px-2.5 gap-1.5 rounded-[var(--radius,0.375rem)] has-[>svg]:px-2.5",
|
|
67
|
-
"icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
|
|
68
|
-
"icon-sm": "size-8 p-0 has-[>svg]:p-0 rounded-[var(--radius,0.375rem)]"
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
defaultVariants: {
|
|
72
|
-
size: "xs"
|
|
73
|
-
}
|
|
74
|
-
}), z = ({ className: r, type: t = "button", variant: o = "ghost", size: a = "xs", ...i }) => /* @__PURE__ */ n(u, { type: t, "data-size": a, variant: o, className: e(c({ size: a }), r), ...i }), w = ({ className: r, ...t }) => /* @__PURE__ */ n("span", { className: e("text-input-text flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", r), ...t }), G = ({ className: r, ...t }) => /* @__PURE__ */ n(p, { "data-slot": "input-group-control", className: e("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0", r), ...t }), I = ({ className: r, ...t }) => /* @__PURE__ */ n(l, { "data-slot": "input-group-control", className: e("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0", r), ...t });
|
|
75
|
-
export {
|
|
76
|
-
k as InputGroup,
|
|
77
|
-
y as InputGroupAddon,
|
|
78
|
-
z as InputGroupButton,
|
|
79
|
-
G as InputGroupInput,
|
|
80
|
-
w as InputGroupText,
|
|
81
|
-
I as InputGroupTextarea,
|
|
82
|
-
d as inputGroupAddonVariants,
|
|
83
|
-
c as inputGroupButtonVariants
|
|
84
|
-
};
|