@lglab/compose-ui 0.26.0 → 0.28.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/autocomplete.d.ts +96 -0
- package/dist/autocomplete.js +117 -0
- package/dist/badge.d.ts +42 -0
- package/dist/badge.js +203 -0
- package/dist/combobox.d.ts +182 -0
- package/dist/combobox.js +252 -0
- package/dist/dialog.js +22 -22
- package/dist/field.js +7 -7
- package/dist/fieldset.js +1 -1
- package/dist/{form-variants-D4ge0qav.js → form-variants-LJ8gIbk0.js} +2 -2
- package/dist/index.d.ts +303 -0
- package/dist/index.js +309 -265
- package/dist/input.js +1 -1
- package/dist/number-field.js +7 -7
- package/dist/select.js +38 -41
- package/dist/styles/default.css +12 -0
- package/dist/textarea.js +1 -1
- package/dist/toolbar.d.ts +56 -0
- package/dist/toolbar.js +69 -0
- package/package.json +21 -5
package/dist/combobox.js
ADDED
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { Combobox as r } from "@base-ui/react/combobox";
|
|
4
|
+
import { Combobox as q } from "@base-ui/react/combobox";
|
|
5
|
+
import * as m from "react";
|
|
6
|
+
import { i as s } from "./form-variants-LJ8gIbk0.js";
|
|
7
|
+
import { c as a } from "./utils-B6yFEsav.js";
|
|
8
|
+
function i(o) {
|
|
9
|
+
return /* @__PURE__ */ e(r.Root, { ...o });
|
|
10
|
+
}
|
|
11
|
+
i.displayName = "ComboboxRoot";
|
|
12
|
+
const b = (o) => /* @__PURE__ */ e(r.Value, { ...o });
|
|
13
|
+
b.displayName = "ComboboxValue";
|
|
14
|
+
const p = ({ className: o, ...t }) => /* @__PURE__ */ e(r.Icon, { className: a("flex", o), ...t });
|
|
15
|
+
p.displayName = "ComboboxIcon";
|
|
16
|
+
const d = ({ className: o, ...t }) => /* @__PURE__ */ e(
|
|
17
|
+
r.Input,
|
|
18
|
+
{
|
|
19
|
+
className: a(
|
|
20
|
+
s,
|
|
21
|
+
"shrink-0",
|
|
22
|
+
"group-[&]/control:w-auto group-[&]/control:flex-1 group-[&]/control:border-0 group-[&]/control:bg-transparent",
|
|
23
|
+
"group-[&]/chips:w-auto group-[&]/chips:min-w-12 group-[&]/chips:flex-1 group-[&]/chips:border-0 group-[&]/chips:bg-transparent group-[&]/chips:h-7",
|
|
24
|
+
o
|
|
25
|
+
),
|
|
26
|
+
...t
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
d.displayName = "ComboboxInput";
|
|
30
|
+
const l = ({ className: o, ...t }) => /* @__PURE__ */ e(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
className: a(
|
|
34
|
+
s,
|
|
35
|
+
"group/control flex items-center p-0 pr-1",
|
|
36
|
+
o
|
|
37
|
+
),
|
|
38
|
+
...t
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
l.displayName = "ComboboxControl";
|
|
42
|
+
const c = ({ className: o, ...t }) => /* @__PURE__ */ e(
|
|
43
|
+
r.Clear,
|
|
44
|
+
{
|
|
45
|
+
className: a(
|
|
46
|
+
"flex h-9 w-6 items-center justify-center rounded bg-transparent p-0 text-muted-foreground hover:text-foreground",
|
|
47
|
+
o
|
|
48
|
+
),
|
|
49
|
+
...t
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
c.displayName = "ComboboxClear";
|
|
53
|
+
const x = ({ className: o, ...t }) => /* @__PURE__ */ e(
|
|
54
|
+
r.Trigger,
|
|
55
|
+
{
|
|
56
|
+
className: a(
|
|
57
|
+
"flex h-9 w-fit min-w-6 items-center justify-center rounded bg-transparent p-0 text-muted-foreground hover:text-foreground",
|
|
58
|
+
o
|
|
59
|
+
),
|
|
60
|
+
...t
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
x.displayName = "ComboboxTrigger";
|
|
64
|
+
const u = ({ className: o, ...t }) => /* @__PURE__ */ e(
|
|
65
|
+
r.Backdrop,
|
|
66
|
+
{
|
|
67
|
+
className: a(
|
|
68
|
+
"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",
|
|
69
|
+
"transition-opacity duration-200",
|
|
70
|
+
"data-starting-style:opacity-0 data-ending-style:opacity-0",
|
|
71
|
+
o
|
|
72
|
+
),
|
|
73
|
+
...t
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
u.displayName = "ComboboxBackdrop";
|
|
77
|
+
const g = (o) => /* @__PURE__ */ e(r.Portal, { ...o });
|
|
78
|
+
g.displayName = "ComboboxPortal";
|
|
79
|
+
const C = ({ className: o, ...t }) => /* @__PURE__ */ e(
|
|
80
|
+
r.Positioner,
|
|
81
|
+
{
|
|
82
|
+
className: a("z-50 outline-none", o),
|
|
83
|
+
sideOffset: 4,
|
|
84
|
+
...t
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
C.displayName = "ComboboxPositioner";
|
|
88
|
+
const y = ({ className: o, ...t }) => /* @__PURE__ */ e(
|
|
89
|
+
r.Popup,
|
|
90
|
+
{
|
|
91
|
+
className: a(
|
|
92
|
+
"group flex flex-col min-w-(--anchor-width) max-h-[min(23rem,var(--available-height))] max-w-(--available-width) origin-(--transform-origin) rounded-md bg-background text-foreground shadow-lg shadow-gray-200 border border-border transition-[transform,scale,opacity] duration-100",
|
|
93
|
+
"data-ending-style:scale-95 data-ending-style:opacity-0",
|
|
94
|
+
"data-starting-style:scale-95 data-starting-style:opacity-0",
|
|
95
|
+
"dark:shadow-none",
|
|
96
|
+
o
|
|
97
|
+
),
|
|
98
|
+
...t
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
y.displayName = "ComboboxPopup";
|
|
102
|
+
const f = ({ className: o, ...t }) => /* @__PURE__ */ e(
|
|
103
|
+
r.List,
|
|
104
|
+
{
|
|
105
|
+
className: a(
|
|
106
|
+
"outline-0 overflow-y-auto scroll-py-2 overscroll-contain flex-1 min-h-0 data-empty:p-0",
|
|
107
|
+
o
|
|
108
|
+
),
|
|
109
|
+
...t
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
f.displayName = "ComboboxList";
|
|
113
|
+
const h = ({ className: o, ...t }) => /* @__PURE__ */ e(
|
|
114
|
+
r.Empty,
|
|
115
|
+
{
|
|
116
|
+
className: a(
|
|
117
|
+
"shrink-0 p-4 text-sm leading-4 text-muted-foreground empty:m-0 empty:p-0",
|
|
118
|
+
o
|
|
119
|
+
),
|
|
120
|
+
...t
|
|
121
|
+
}
|
|
122
|
+
);
|
|
123
|
+
h.displayName = "ComboboxEmpty";
|
|
124
|
+
const N = ({ className: o, ...t }) => /* @__PURE__ */ e(
|
|
125
|
+
r.Item,
|
|
126
|
+
{
|
|
127
|
+
className: a(
|
|
128
|
+
"flex items-center justify-between gap-2 py-2 px-4 text-sm leading-4 outline-none select-none",
|
|
129
|
+
"data-selected:bg-accent data-selected:text-accent-foreground",
|
|
130
|
+
"data-highlighted:bg-accent data-highlighted:text-accent-foreground",
|
|
131
|
+
o
|
|
132
|
+
),
|
|
133
|
+
...t
|
|
134
|
+
}
|
|
135
|
+
);
|
|
136
|
+
N.displayName = "ComboboxItem";
|
|
137
|
+
const w = ({ className: o, ...t }) => /* @__PURE__ */ e("span", { className: o, ...t });
|
|
138
|
+
w.displayName = "ComboboxItemText";
|
|
139
|
+
const I = ({ className: o, ...t }) => /* @__PURE__ */ e(r.ItemIndicator, { className: o, ...t });
|
|
140
|
+
I.displayName = "ComboboxItemIndicator";
|
|
141
|
+
const v = ({ className: o, ...t }) => /* @__PURE__ */ e(r.Group, { className: o, ...t });
|
|
142
|
+
v.displayName = "ComboboxGroup";
|
|
143
|
+
const k = ({ className: o, ...t }) => /* @__PURE__ */ e(
|
|
144
|
+
r.GroupLabel,
|
|
145
|
+
{
|
|
146
|
+
className: a(
|
|
147
|
+
"px-4 py-1.5 text-sm font-semibold sticky top-0 z-1 bg-background",
|
|
148
|
+
o
|
|
149
|
+
),
|
|
150
|
+
...t
|
|
151
|
+
}
|
|
152
|
+
);
|
|
153
|
+
k.displayName = "ComboboxGroupLabel";
|
|
154
|
+
const P = (o) => /* @__PURE__ */ e(r.Collection, { ...o });
|
|
155
|
+
P.displayName = "ComboboxCollection";
|
|
156
|
+
const R = ({ className: o, ...t }) => /* @__PURE__ */ e(
|
|
157
|
+
r.Separator,
|
|
158
|
+
{
|
|
159
|
+
className: a("my-1 border-t border-border", o),
|
|
160
|
+
...t
|
|
161
|
+
}
|
|
162
|
+
);
|
|
163
|
+
R.displayName = "ComboboxSeparator";
|
|
164
|
+
const S = ({ className: o, ...t }) => /* @__PURE__ */ e(
|
|
165
|
+
r.Status,
|
|
166
|
+
{
|
|
167
|
+
className: a(
|
|
168
|
+
"flex items-center gap-2 py-1 px-4 text-sm text-muted-foreground empty:hidden",
|
|
169
|
+
o
|
|
170
|
+
),
|
|
171
|
+
...t
|
|
172
|
+
}
|
|
173
|
+
);
|
|
174
|
+
S.displayName = "ComboboxStatus";
|
|
175
|
+
const G = m.forwardRef(
|
|
176
|
+
({ className: o, ...t }, n) => /* @__PURE__ */ e(
|
|
177
|
+
r.Chips,
|
|
178
|
+
{
|
|
179
|
+
ref: n,
|
|
180
|
+
className: a(
|
|
181
|
+
s,
|
|
182
|
+
"group/chips flex flex-wrap items-center gap-1 px-1 py-1 h-auto",
|
|
183
|
+
o
|
|
184
|
+
),
|
|
185
|
+
...t
|
|
186
|
+
}
|
|
187
|
+
)
|
|
188
|
+
);
|
|
189
|
+
G.displayName = "ComboboxChips";
|
|
190
|
+
const L = ({ className: o, ...t }) => /* @__PURE__ */ e(
|
|
191
|
+
r.Chip,
|
|
192
|
+
{
|
|
193
|
+
className: a(
|
|
194
|
+
"flex items-center gap-1 rounded-md bg-muted px-1.5 py-0.5 text-xs text-foreground font-medium",
|
|
195
|
+
"data-highlighted:bg-primary data-highlighted:text-primary-foreground",
|
|
196
|
+
"focus-within:bg-primary focus-within:text-primary-foreground",
|
|
197
|
+
o
|
|
198
|
+
),
|
|
199
|
+
...t
|
|
200
|
+
}
|
|
201
|
+
);
|
|
202
|
+
L.displayName = "ComboboxChip";
|
|
203
|
+
const T = ({ className: o, ...t }) => /* @__PURE__ */ e(
|
|
204
|
+
r.ChipRemove,
|
|
205
|
+
{
|
|
206
|
+
className: a(
|
|
207
|
+
"rounded-md p-0.5 text-inherit hover:bg-muted-foreground/20",
|
|
208
|
+
o
|
|
209
|
+
),
|
|
210
|
+
...t
|
|
211
|
+
}
|
|
212
|
+
);
|
|
213
|
+
T.displayName = "ComboboxChipRemove";
|
|
214
|
+
const j = ({ className: o, ...t }) => /* @__PURE__ */ e(
|
|
215
|
+
r.Arrow,
|
|
216
|
+
{
|
|
217
|
+
className: a(
|
|
218
|
+
"flex data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180",
|
|
219
|
+
o
|
|
220
|
+
),
|
|
221
|
+
...t
|
|
222
|
+
}
|
|
223
|
+
);
|
|
224
|
+
j.displayName = "ComboboxArrow";
|
|
225
|
+
export {
|
|
226
|
+
q as Combobox,
|
|
227
|
+
j as ComboboxArrow,
|
|
228
|
+
u as ComboboxBackdrop,
|
|
229
|
+
L as ComboboxChip,
|
|
230
|
+
T as ComboboxChipRemove,
|
|
231
|
+
G as ComboboxChips,
|
|
232
|
+
c as ComboboxClear,
|
|
233
|
+
P as ComboboxCollection,
|
|
234
|
+
l as ComboboxControl,
|
|
235
|
+
h as ComboboxEmpty,
|
|
236
|
+
v as ComboboxGroup,
|
|
237
|
+
k as ComboboxGroupLabel,
|
|
238
|
+
p as ComboboxIcon,
|
|
239
|
+
d as ComboboxInput,
|
|
240
|
+
N as ComboboxItem,
|
|
241
|
+
I as ComboboxItemIndicator,
|
|
242
|
+
w as ComboboxItemText,
|
|
243
|
+
f as ComboboxList,
|
|
244
|
+
y as ComboboxPopup,
|
|
245
|
+
g as ComboboxPortal,
|
|
246
|
+
C as ComboboxPositioner,
|
|
247
|
+
i as ComboboxRoot,
|
|
248
|
+
R as ComboboxSeparator,
|
|
249
|
+
S as ComboboxStatus,
|
|
250
|
+
x as ComboboxTrigger,
|
|
251
|
+
b as ComboboxValue
|
|
252
|
+
};
|
package/dist/dialog.js
CHANGED
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
3
|
import { Dialog as o } from "@base-ui/react/dialog";
|
|
4
4
|
import { cva as n } from "class-variance-authority";
|
|
5
|
-
import { b as
|
|
5
|
+
import { b as s } from "./button-variants-CbFMPwc8.js";
|
|
6
6
|
import { c as l } from "./utils-B6yFEsav.js";
|
|
7
7
|
const d = (a) => /* @__PURE__ */ t(o.Root, { ...a });
|
|
8
8
|
d.displayName = "DialogRoot";
|
|
9
|
-
const
|
|
9
|
+
const g = ({ className: a, variant: e, size: i, ...r }) => /* @__PURE__ */ t(
|
|
10
10
|
o.Trigger,
|
|
11
11
|
{
|
|
12
|
-
className: l(
|
|
13
|
-
...
|
|
12
|
+
className: l(s({ variant: e, size: i }), a),
|
|
13
|
+
...r
|
|
14
14
|
}
|
|
15
15
|
);
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
|
|
16
|
+
g.displayName = "DialogTrigger";
|
|
17
|
+
const c = (a) => /* @__PURE__ */ t(o.Portal, { ...a });
|
|
18
|
+
c.displayName = "DialogPortal";
|
|
19
19
|
const p = ({ className: a, ...e }) => /* @__PURE__ */ t(
|
|
20
20
|
o.Backdrop,
|
|
21
21
|
{
|
|
@@ -64,24 +64,24 @@ u.displayName = "DialogPopup";
|
|
|
64
64
|
const f = ({ className: a, ...e }) => /* @__PURE__ */ t(
|
|
65
65
|
o.Title,
|
|
66
66
|
{
|
|
67
|
-
className: l("text-lg font-
|
|
67
|
+
className: l("text-lg font-medium leading-none tracking-tight", a),
|
|
68
68
|
...e
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
71
|
f.displayName = "DialogTitle";
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
const
|
|
72
|
+
const D = ({ className: a, ...e }) => /* @__PURE__ */ t(o.Description, { className: l("text-sm", a), ...e });
|
|
73
|
+
D.displayName = "DialogDescription";
|
|
74
|
+
const y = ({ className: a, variant: e, size: i, ...r }) => /* @__PURE__ */ t(
|
|
75
75
|
o.Close,
|
|
76
76
|
{
|
|
77
|
-
className: l(
|
|
78
|
-
...
|
|
77
|
+
className: l(s({ variant: e ?? "outline", size: i }), a),
|
|
78
|
+
...r
|
|
79
79
|
}
|
|
80
80
|
);
|
|
81
|
-
|
|
82
|
-
const N = ({ className: a, ...e }) => /* @__PURE__ */ t("div", { className: l("flex flex-col
|
|
81
|
+
y.displayName = "DialogClose";
|
|
82
|
+
const N = ({ className: a, ...e }) => /* @__PURE__ */ t("div", { className: l("flex flex-col gap-1 mb-5", a), ...e });
|
|
83
83
|
N.displayName = "DialogHeader";
|
|
84
|
-
const
|
|
84
|
+
const x = ({ className: a, ...e }) => /* @__PURE__ */ t(
|
|
85
85
|
"div",
|
|
86
86
|
{
|
|
87
87
|
className: l(
|
|
@@ -91,16 +91,16 @@ const b = ({ className: a, ...e }) => /* @__PURE__ */ t(
|
|
|
91
91
|
...e
|
|
92
92
|
}
|
|
93
93
|
);
|
|
94
|
-
|
|
94
|
+
x.displayName = "DialogFooter";
|
|
95
95
|
export {
|
|
96
96
|
p as DialogBackdrop,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
y as DialogClose,
|
|
98
|
+
D as DialogDescription,
|
|
99
|
+
x as DialogFooter,
|
|
100
100
|
N as DialogHeader,
|
|
101
101
|
u as DialogPopup,
|
|
102
|
-
|
|
102
|
+
c as DialogPortal,
|
|
103
103
|
d as DialogRoot,
|
|
104
104
|
f as DialogTitle,
|
|
105
|
-
|
|
105
|
+
g as DialogTrigger
|
|
106
106
|
};
|
package/dist/field.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as s } from "react/jsx-runtime";
|
|
3
3
|
import { Field as i } from "@base-ui/react/field";
|
|
4
|
-
import {
|
|
4
|
+
import { i as a, d as r, e as o, f as d, l as m, a as n } from "./form-variants-LJ8gIbk0.js";
|
|
5
5
|
import { c as t } from "./utils-B6yFEsav.js";
|
|
6
|
-
const c = ({ className: e, ...l }) => /* @__PURE__ */ s(i.Root, { className: t(
|
|
6
|
+
const c = ({ className: e, ...l }) => /* @__PURE__ */ s(i.Root, { className: t(n, e), ...l });
|
|
7
7
|
c.displayName = "FieldRoot";
|
|
8
|
-
const p = ({ className: e, ...l }) => /* @__PURE__ */ s(i.Label, { className: t(
|
|
8
|
+
const p = ({ className: e, ...l }) => /* @__PURE__ */ s(i.Label, { className: t(m, e), ...l });
|
|
9
9
|
p.displayName = "FieldLabel";
|
|
10
|
-
const y = ({ className: e, ...l }) => /* @__PURE__ */ s(i.Control, { className: t(
|
|
10
|
+
const y = ({ className: e, ...l }) => /* @__PURE__ */ s(i.Control, { className: t(a, e), ...l });
|
|
11
11
|
y.displayName = "FieldControl";
|
|
12
|
-
const F = ({ className: e, ...l }) => /* @__PURE__ */ s(i.Description, { className: t(
|
|
12
|
+
const F = ({ className: e, ...l }) => /* @__PURE__ */ s(i.Description, { className: t(r, e), ...l });
|
|
13
13
|
F.displayName = "FieldDescription";
|
|
14
|
-
const N = ({ className: e, ...l }) => /* @__PURE__ */ s(i.Error, { className: t(
|
|
14
|
+
const N = ({ className: e, ...l }) => /* @__PURE__ */ s(i.Error, { className: t(o, e), ...l });
|
|
15
15
|
N.displayName = "FieldError";
|
|
16
|
-
const u = ({ className: e, ...l }) => /* @__PURE__ */ s(i.Item, { className: t(
|
|
16
|
+
const u = ({ className: e, ...l }) => /* @__PURE__ */ s(i.Item, { className: t(d, e), ...l });
|
|
17
17
|
u.displayName = "FieldItem";
|
|
18
18
|
const f = (e) => /* @__PURE__ */ s(i.Validity, { ...e });
|
|
19
19
|
f.displayName = "FieldValidity";
|
package/dist/fieldset.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as s } from "react/jsx-runtime";
|
|
3
3
|
import { Fieldset as o } from "@base-ui/react/fieldset";
|
|
4
|
-
import { l as r } from "./form-variants-
|
|
4
|
+
import { l as r } from "./form-variants-LJ8gIbk0.js";
|
|
5
5
|
import { c as l } from "./utils-B6yFEsav.js";
|
|
6
6
|
const a = ({ className: e, ...t }) => /* @__PURE__ */ s(
|
|
7
7
|
o.Root,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const e = "flex w-full rounded-md text-sm h-9 px-3 bg-transparent text-foreground border border-input transition-colors duration-200 placeholder:text-muted-foreground aria-invalid:border-destructive aria-invalid:ring-destructive/20", t = "flex items-center gap-2 text-sm font-medium text-foreground data-disabled:opacity-50", r = "text-sm text-muted-foreground", s = "text-sm text-destructive", o = "flex flex-col gap-1.5", a = "flex items-center gap-2";
|
|
2
2
|
export {
|
|
3
|
-
a,
|
|
3
|
+
o as a,
|
|
4
4
|
r as d,
|
|
5
5
|
s as e,
|
|
6
|
-
|
|
6
|
+
a as f,
|
|
7
7
|
e as i,
|
|
8
8
|
t as l
|
|
9
9
|
};
|