@motech-development/breeze-ui 4.5.0 → 4.6.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/lib/index.d.ts +5 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1390 -418
- package/lib/index.js.map +1 -1
- package/lib/primitives/Collection/CollectionPopover.d.ts +15 -0
- package/lib/primitives/Collection/CollectionPopover.d.ts.map +1 -0
- package/lib/primitives/Collection/DescriptorContent.d.ts +9 -0
- package/lib/primitives/Collection/DescriptorContent.d.ts.map +1 -0
- package/lib/primitives/Collection/DescriptorOption.d.ts +7 -0
- package/lib/primitives/Collection/DescriptorOption.d.ts.map +1 -0
- package/lib/primitives/Collection/collection.styles.d.ts +19 -0
- package/lib/primitives/Collection/collection.styles.d.ts.map +1 -0
- package/lib/primitives/Collection/item.types.d.ts +18 -0
- package/lib/primitives/Collection/item.types.d.ts.map +1 -0
- package/lib/primitives/ComboBox/ComboBox.d.ts +62 -0
- package/lib/primitives/ComboBox/ComboBox.d.ts.map +1 -0
- package/lib/primitives/Field/field.presentation.d.ts +6 -2
- package/lib/primitives/Field/field.presentation.d.ts.map +1 -1
- package/lib/primitives/Select/Select.d.ts +59 -0
- package/lib/primitives/Select/Select.d.ts.map +1 -0
- package/lib/styles.css +1 -1
- package/package.json +2 -1
package/lib/index.js
CHANGED
|
@@ -10,28 +10,38 @@ import { CheckboxButton as b, CheckboxField as x } from "react-aria-components/C
|
|
|
10
10
|
import { FieldError as S } from "react-aria-components/FieldError";
|
|
11
11
|
import { Label as C } from "react-aria-components/Label";
|
|
12
12
|
import { Text as w } from "react-aria-components/Text";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
13
|
+
import { ComboBox as T, ComboBoxStateContext as E, useFilter as D } from "react-aria-components/ComboBox";
|
|
14
|
+
import { Group as O } from "react-aria-components/Group";
|
|
15
|
+
import { Input as k } from "react-aria-components/Input";
|
|
16
|
+
import { ListBox as A, ListBoxItem as j } from "react-aria-components/ListBox";
|
|
17
|
+
import { createPortal as M, flushSync as N } from "react-dom";
|
|
15
18
|
import { Popover as ee } from "react-aria-components/Popover";
|
|
16
|
-
import { UNSAFE_PortalProvider as
|
|
17
|
-
import { I18nProvider as
|
|
18
|
-
import { ArrowDownLeft as
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { NumberField as
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
19
|
+
import { UNSAFE_PortalProvider as P } from "react-aria/PortalProvider";
|
|
20
|
+
import { I18nProvider as te, useLocale as F } from "react-aria-components/I18nProvider";
|
|
21
|
+
import { ArrowDownLeft as ne, ArrowUpRight as I, Bell as L, Building2 as R, CalendarDays as re, Camera as ie, Check as z, ChevronDown as B, ChevronLeft as V, ChevronRight as H, Clock3 as ae, Download as U, Ellipsis as oe, FileText as se, House as ce, List as W, LockKeyhole as le, LogOut as ue, Plus as G, Settings as K, Trash2 as de, TriangleAlert as fe, Upload as pe, Users as me, X as he } from "lucide-react";
|
|
22
|
+
import { Dialog as ge } from "react-aria-components/Dialog";
|
|
23
|
+
import { Modal as _e, ModalOverlay as ve } from "react-aria-components/Modal";
|
|
24
|
+
import { NumberField as ye } from "react-aria-components/NumberField";
|
|
25
|
+
import { mergeProps as be } from "react-aria/mergeProps";
|
|
26
|
+
import { useButton as xe } from "react-aria/useButton";
|
|
27
|
+
import { useFocusRing as Se } from "react-aria/useFocusRing";
|
|
28
|
+
import { useHover as Ce } from "react-aria/useHover";
|
|
29
|
+
import { useListBox as we, useOption as Te } from "react-aria/useListBox";
|
|
30
|
+
import { useSelect as Ee } from "react-aria/useSelect";
|
|
31
|
+
import { useVisuallyHidden as De } from "react-aria/VisuallyHidden";
|
|
32
|
+
import { useSelectState as Oe } from "react-stately/useSelectState";
|
|
33
|
+
import { TextField as ke } from "react-aria-components/TextField";
|
|
34
|
+
import { parseDate as Ae } from "@internationalized/date";
|
|
25
35
|
//#region src/provider/BreezeContext.ts
|
|
26
|
-
var
|
|
27
|
-
function
|
|
28
|
-
let e = a(
|
|
36
|
+
var je = n(null);
|
|
37
|
+
function q() {
|
|
38
|
+
let e = a(je);
|
|
29
39
|
if (e === null) throw Error("Breeze components must be rendered within BreezeProvider.");
|
|
30
40
|
return e;
|
|
31
41
|
}
|
|
32
42
|
//#endregion
|
|
33
43
|
//#region src/patterns/AppearanceControl/AppearanceControl.tsx
|
|
34
|
-
var
|
|
44
|
+
var Me = {
|
|
35
45
|
base: {
|
|
36
46
|
control: "breeze:flex breeze:items-center breeze:gap-breeze-2 breeze:font-breeze-sans",
|
|
37
47
|
group: "breeze:flex breeze:items-center breeze:gap-breeze-2",
|
|
@@ -42,7 +52,7 @@ var H = {
|
|
|
42
52
|
size: {},
|
|
43
53
|
state: { selected: "breeze:data-[selected]:border-breeze-brand breeze:data-[selected]:bg-breeze-brand-soft breeze:data-[selected]:text-breeze-brand-text breeze:forced-colors:data-[selected]:outline-2 breeze:forced-colors:data-[selected]:outline-offset-2" },
|
|
44
54
|
variant: {}
|
|
45
|
-
},
|
|
55
|
+
}, Ne = [
|
|
46
56
|
{
|
|
47
57
|
message: "appearanceLight",
|
|
48
58
|
value: "light"
|
|
@@ -56,30 +66,30 @@ var H = {
|
|
|
56
66
|
value: "dark"
|
|
57
67
|
}
|
|
58
68
|
];
|
|
59
|
-
function
|
|
60
|
-
return
|
|
69
|
+
function Pe(e) {
|
|
70
|
+
return Ne.some((t) => t.value === e);
|
|
61
71
|
}
|
|
62
|
-
function
|
|
63
|
-
let { appearance: n, getMessageLocale: r, messages: i, setAppearance: a } =
|
|
72
|
+
function Fe() {
|
|
73
|
+
let { appearance: n, getMessageLocale: r, messages: i, setAppearance: a } = q();
|
|
64
74
|
return /* @__PURE__ */ h("div", {
|
|
65
|
-
className:
|
|
75
|
+
className: Me.base.control,
|
|
66
76
|
children: [/* @__PURE__ */ m("span", {
|
|
67
|
-
className:
|
|
77
|
+
className: Me.base.label,
|
|
68
78
|
lang: r("appearance"),
|
|
69
79
|
children: i.appearance
|
|
70
80
|
}), /* @__PURE__ */ m(t, {
|
|
71
81
|
"aria-label": i.appearance,
|
|
72
|
-
className:
|
|
82
|
+
className: Me.base.group,
|
|
73
83
|
disallowEmptySelection: !0,
|
|
74
84
|
lang: r("appearance"),
|
|
75
85
|
onSelectionChange: (e) => {
|
|
76
86
|
let [t] = e;
|
|
77
|
-
|
|
87
|
+
Pe(t) && a(t);
|
|
78
88
|
},
|
|
79
89
|
selectedKeys: [n],
|
|
80
90
|
selectionMode: "single",
|
|
81
|
-
children:
|
|
82
|
-
className: [
|
|
91
|
+
children: Ne.map((t) => /* @__PURE__ */ m(e, {
|
|
92
|
+
className: [Me.base.option, Me.state.selected].join(" "),
|
|
83
93
|
id: t.value,
|
|
84
94
|
lang: r(t.message),
|
|
85
95
|
children: i[t.message]
|
|
@@ -89,7 +99,7 @@ function Te() {
|
|
|
89
99
|
}
|
|
90
100
|
//#endregion
|
|
91
101
|
//#region src/primitives/Skeleton/Skeleton.tsx
|
|
92
|
-
var
|
|
102
|
+
var Ie = {
|
|
93
103
|
base: { skeleton: "breeze:block breeze:animate-pulse breeze:appearance-none breeze:bg-breeze-ink-3 breeze:pointer-events-none breeze:forced-colors:outline breeze:forced-colors:outline-1 breeze:forced-colors:outline-[CanvasText]" },
|
|
94
104
|
compound: {},
|
|
95
105
|
size: {},
|
|
@@ -100,37 +110,37 @@ var Ee = {
|
|
|
100
110
|
text: "breeze:block-size-breeze-3 breeze:inline-size-full breeze:rounded-breeze-xs"
|
|
101
111
|
}
|
|
102
112
|
};
|
|
103
|
-
function
|
|
104
|
-
let { getMessageLocale: i, messages: a } =
|
|
113
|
+
function J({ blockSize: e, inlineSize: t, label: n, shape: r = "text" }) {
|
|
114
|
+
let { getMessageLocale: i, messages: a } = q(), o = n?.trim() || void 0, s = e ?? t ?? "0.75rem", c = {
|
|
105
115
|
blockSize: r === "circle" ? s : e,
|
|
106
116
|
inlineSize: r === "circle" ? s : t
|
|
107
117
|
};
|
|
108
118
|
return /* @__PURE__ */ m("progress", {
|
|
109
119
|
"aria-hidden": o === void 0 || void 0,
|
|
110
120
|
"aria-label": o,
|
|
111
|
-
className: [
|
|
121
|
+
className: [Ie.base.skeleton, Ie.variant[r]].join(" "),
|
|
112
122
|
lang: o === a.loading.trim() ? i("loading") : void 0,
|
|
113
123
|
style: c
|
|
114
124
|
});
|
|
115
125
|
}
|
|
116
126
|
//#endregion
|
|
117
127
|
//#region src/primitives/VisuallyHidden/VisuallyHidden.tsx
|
|
118
|
-
var
|
|
128
|
+
var Le = {
|
|
119
129
|
base: { hidden: "breeze:sr-only" },
|
|
120
130
|
compound: {},
|
|
121
131
|
size: {},
|
|
122
132
|
state: {},
|
|
123
133
|
variant: {}
|
|
124
134
|
};
|
|
125
|
-
function
|
|
135
|
+
function Re({ children: e }) {
|
|
126
136
|
return /* @__PURE__ */ m("span", {
|
|
127
|
-
className:
|
|
137
|
+
className: Le.base.hidden,
|
|
128
138
|
children: e
|
|
129
139
|
});
|
|
130
140
|
}
|
|
131
141
|
//#endregion
|
|
132
142
|
//#region src/primitives/Badge/Badge.tsx
|
|
133
|
-
var
|
|
143
|
+
var ze = {
|
|
134
144
|
base: {
|
|
135
145
|
badge: "breeze:inline-grid breeze:shrink-0 breeze:items-center breeze:whitespace-nowrap breeze:rounded-breeze-chip breeze:ps-breeze-2 breeze:pe-breeze-2 breeze:py-breeze-px breeze:text-breeze-2xs breeze:font-bold breeze:leading-breeze-snug breeze:tracking-breeze-wide",
|
|
136
146
|
content: "breeze:[grid-area:1/1]",
|
|
@@ -147,29 +157,29 @@ var W = {
|
|
|
147
157
|
warning: "breeze:bg-breeze-warn-soft breeze:text-breeze-warn"
|
|
148
158
|
}
|
|
149
159
|
};
|
|
150
|
-
function
|
|
151
|
-
let { messages: i } =
|
|
160
|
+
function Be({ "aria-label": e, children: t, loading: n = !1, variant: r = "neutral" }) {
|
|
161
|
+
let { messages: i } = q(), a = e?.trim() || void 0, o;
|
|
152
162
|
return n ? o = /* @__PURE__ */ m("span", {
|
|
153
|
-
className:
|
|
154
|
-
children: /* @__PURE__ */ m(
|
|
163
|
+
className: ze.base.skeleton,
|
|
164
|
+
children: /* @__PURE__ */ m(J, {
|
|
155
165
|
blockSize: 8,
|
|
156
166
|
inlineSize: "100%",
|
|
157
167
|
label: i.loading,
|
|
158
168
|
shape: "rectangle"
|
|
159
169
|
})
|
|
160
|
-
}) : a !== void 0 && (o = /* @__PURE__ */ m(
|
|
170
|
+
}) : a !== void 0 && (o = /* @__PURE__ */ m(Re, { children: a })), /* @__PURE__ */ h("span", {
|
|
161
171
|
"aria-busy": n || void 0,
|
|
162
|
-
className: [
|
|
172
|
+
className: [ze.base.badge, ze.variant[r]].join(" "),
|
|
163
173
|
children: [/* @__PURE__ */ m("span", {
|
|
164
174
|
"aria-hidden": n || a !== void 0 ? !0 : void 0,
|
|
165
|
-
className: [
|
|
175
|
+
className: [ze.base.content, n && ze.state.contentLoading].filter(Boolean).join(" "),
|
|
166
176
|
children: t
|
|
167
177
|
}), o]
|
|
168
178
|
});
|
|
169
179
|
}
|
|
170
180
|
//#endregion
|
|
171
181
|
//#region src/primitives/Button/Button.tsx
|
|
172
|
-
var
|
|
182
|
+
var Y = {
|
|
173
183
|
base: {
|
|
174
184
|
button: "breeze:relative breeze:inline-grid breeze:items-center breeze:justify-center breeze:gap-breeze-2 breeze:border breeze:border-solid breeze:rounded-breeze-ctl breeze:font-breeze-sans breeze:text-breeze-sm breeze:leading-breeze-snug breeze:cursor-pointer breeze:select-none breeze:[text-align:center] breeze:outline-offset-2 breeze:data-[focus-visible]:outline-2 breeze:data-[focus-visible]:outline-solid breeze:data-[focus-visible]:outline-breeze-brand breeze:any-pointer-coarse:min-block-breeze-tap breeze:any-pointer-coarse:min-inline-breeze-tap",
|
|
175
185
|
label: "breeze:[grid-area:1/1]",
|
|
@@ -199,23 +209,23 @@ var G = {
|
|
|
199
209
|
secondary: "breeze:border-breeze-line-strong breeze:bg-breeze-surface breeze:text-breeze-ink breeze:data-[hovered]:bg-breeze-sunken breeze:data-[pressed]:bg-breeze-sunken"
|
|
200
210
|
}
|
|
201
211
|
};
|
|
202
|
-
function
|
|
203
|
-
let e = v(_), { getMessageLocale: t, messages: n } =
|
|
212
|
+
function Ve() {
|
|
213
|
+
let e = v(_), { getMessageLocale: t, messages: n } = q();
|
|
204
214
|
return /* @__PURE__ */ m("progress", {
|
|
205
215
|
"aria-label": n.loading,
|
|
206
|
-
className:
|
|
216
|
+
className: Y.state.loadingStatus,
|
|
207
217
|
id: e?.id,
|
|
208
218
|
lang: t("loading")
|
|
209
219
|
});
|
|
210
220
|
}
|
|
211
|
-
function
|
|
212
|
-
|
|
221
|
+
function He({ "aria-controls": e, "aria-describedby": t, "aria-expanded": n, "aria-haspopup": i, "aria-label": a, "aria-labelledby": o, children: s, disabled: c = !1, form: l, id: u, loading: d = !1, name: f, onAction: _, ref: v, size: y = "md", type: b = "button", value: x, variant: S = "primary" }) {
|
|
222
|
+
q();
|
|
213
223
|
let C = [
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
c &&
|
|
218
|
-
d &&
|
|
224
|
+
Y.base.button,
|
|
225
|
+
Y.variant[S],
|
|
226
|
+
Y.size[y],
|
|
227
|
+
c && Y.state.disabled,
|
|
228
|
+
d && Y.state.loading
|
|
219
229
|
].filter(Boolean).join(" ");
|
|
220
230
|
return /* @__PURE__ */ h(g, {
|
|
221
231
|
"aria-controls": e,
|
|
@@ -241,18 +251,18 @@ function je({ "aria-controls": e, "aria-describedby": t, "aria-expanded": n, "ar
|
|
|
241
251
|
type: b,
|
|
242
252
|
value: x,
|
|
243
253
|
children: [/* @__PURE__ */ m("span", {
|
|
244
|
-
className: [
|
|
254
|
+
className: [Y.base.label, d && Y.state.loadingLabel].filter(Boolean).join(" "),
|
|
245
255
|
children: s
|
|
246
|
-
}), d && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(
|
|
256
|
+
}), d && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(Ve, {}), /* @__PURE__ */ m("span", {
|
|
247
257
|
"aria-hidden": "true",
|
|
248
|
-
className: [
|
|
258
|
+
className: [Y.base.skeleton, Y.compound.loading[S]].join(" "),
|
|
249
259
|
"data-breeze-skeleton": ""
|
|
250
260
|
})] })]
|
|
251
261
|
});
|
|
252
262
|
}
|
|
253
263
|
//#endregion
|
|
254
264
|
//#region src/primitives/layout.accessibility.ts
|
|
255
|
-
function
|
|
265
|
+
function Ue(e, t) {
|
|
256
266
|
let n = e?.trim() || void 0;
|
|
257
267
|
return {
|
|
258
268
|
accessibleLabel: n,
|
|
@@ -261,7 +271,7 @@ function K(e, t) {
|
|
|
261
271
|
}
|
|
262
272
|
//#endregion
|
|
263
273
|
//#region src/primitives/Card/Card.tsx
|
|
264
|
-
var
|
|
274
|
+
var We = {
|
|
265
275
|
base: { card: "breeze:min-inline-size-0 breeze:rounded-breeze-panel breeze:border breeze:border-solid breeze:border-breeze-line breeze:shadow-breeze-panel" },
|
|
266
276
|
compound: {},
|
|
267
277
|
size: {
|
|
@@ -281,22 +291,22 @@ var Me = {
|
|
|
281
291
|
surface: "breeze:bg-breeze-surface"
|
|
282
292
|
}
|
|
283
293
|
};
|
|
284
|
-
function
|
|
285
|
-
let { accessibleLabel: s, role: c } =
|
|
294
|
+
function Ge({ "aria-label": e, children: t, clipped: n = !0, element: i = "div", padding: a = 4, variant: o = "surface" }) {
|
|
295
|
+
let { accessibleLabel: s, role: c } = Ue(e, i);
|
|
286
296
|
return r(i, {
|
|
287
297
|
"aria-label": s,
|
|
288
298
|
className: [
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
n &&
|
|
299
|
+
We.base.card,
|
|
300
|
+
We.variant[o],
|
|
301
|
+
We.size[a],
|
|
302
|
+
n && We.state.clipped
|
|
293
303
|
].filter(Boolean).join(" "),
|
|
294
304
|
role: c
|
|
295
305
|
}, t);
|
|
296
306
|
}
|
|
297
307
|
//#endregion
|
|
298
308
|
//#region src/primitives/Field/field.styles.ts
|
|
299
|
-
var
|
|
309
|
+
var X = {
|
|
300
310
|
base: {
|
|
301
311
|
control: "breeze:relative breeze:inline-grid breeze:min-inline-size-0 breeze:inline-size-full",
|
|
302
312
|
description: "breeze:m-0 breeze:text-breeze-xs breeze:font-normal breeze:leading-breeze-snug breeze:text-breeze-ink-3",
|
|
@@ -311,46 +321,51 @@ var q = {
|
|
|
311
321
|
state: { loadingInput: "breeze:!opacity-0" },
|
|
312
322
|
variant: {}
|
|
313
323
|
};
|
|
314
|
-
function
|
|
324
|
+
function Z(...e) {
|
|
315
325
|
return e.filter(Boolean).join(" ");
|
|
316
326
|
}
|
|
317
327
|
//#endregion
|
|
318
328
|
//#region src/primitives/Field/field.presentation.tsx
|
|
319
|
-
function
|
|
329
|
+
function Ke({ htmlFor: e, id: t, label: n, loading: r }) {
|
|
320
330
|
return /* @__PURE__ */ m(C, {
|
|
321
|
-
className:
|
|
322
|
-
|
|
331
|
+
className: X.base.label,
|
|
332
|
+
htmlFor: e,
|
|
333
|
+
id: t,
|
|
334
|
+
children: r ? /* @__PURE__ */ m(J, {
|
|
323
335
|
blockSize: "1lh",
|
|
324
336
|
inlineSize: "12em",
|
|
325
337
|
shape: "rectangle"
|
|
326
|
-
}) :
|
|
338
|
+
}) : n
|
|
327
339
|
});
|
|
328
340
|
}
|
|
329
|
-
function
|
|
341
|
+
function qe({ description: e, descriptionId: t, error: n, errorId: r, loading: i }) {
|
|
330
342
|
return /* @__PURE__ */ h(p, { children: [e && /* @__PURE__ */ m(w, {
|
|
331
|
-
className:
|
|
343
|
+
className: X.base.description,
|
|
344
|
+
id: t,
|
|
332
345
|
slot: "description",
|
|
333
|
-
children:
|
|
346
|
+
children: i ? /* @__PURE__ */ m(J, {
|
|
334
347
|
blockSize: "1lh",
|
|
335
348
|
inlineSize: "12em",
|
|
336
349
|
shape: "rectangle"
|
|
337
350
|
}) : e
|
|
338
|
-
}),
|
|
351
|
+
}), n && (i ? /* @__PURE__ */ m("span", {
|
|
339
352
|
"aria-hidden": "true",
|
|
340
|
-
className:
|
|
341
|
-
|
|
353
|
+
className: X.base.error,
|
|
354
|
+
id: r,
|
|
355
|
+
children: /* @__PURE__ */ m(J, {
|
|
342
356
|
blockSize: "1lh",
|
|
343
357
|
inlineSize: "12em",
|
|
344
358
|
shape: "rectangle"
|
|
345
359
|
})
|
|
346
360
|
}) : /* @__PURE__ */ m(S, {
|
|
347
|
-
className:
|
|
348
|
-
|
|
361
|
+
className: X.base.error,
|
|
362
|
+
id: r,
|
|
363
|
+
children: n
|
|
349
364
|
}))] });
|
|
350
365
|
}
|
|
351
366
|
//#endregion
|
|
352
367
|
//#region src/primitives/Checkbox/Checkbox.tsx
|
|
353
|
-
var
|
|
368
|
+
var Je = {
|
|
354
369
|
base: {
|
|
355
370
|
control: "breeze:relative breeze:inline-grid breeze:min-block-breeze-tap breeze:grid-flow-col breeze:items-center breeze:gap-breeze-2 breeze:cursor-pointer breeze:select-none breeze:font-breeze-sans breeze:text-breeze-sm breeze:font-medium breeze:leading-breeze-snug breeze:text-breeze-ink breeze:data-[disabled]:cursor-not-allowed breeze:data-[disabled]:opacity-60",
|
|
356
371
|
indicator: "breeze:inline-grid breeze:block-size-breeze-5 breeze:inline-size-breeze-5 breeze:shrink-0 breeze:place-items-center breeze:rounded-breeze-chip breeze:border breeze:border-solid breeze:border-breeze-ink-3 breeze:bg-breeze-surface breeze:text-breeze-on-brand breeze:transition-colors breeze:data-[selected]:border-breeze-brand breeze:data-[selected]:bg-breeze-brand breeze:data-[focus-visible]:outline-2 breeze:data-[focus-visible]:outline-solid breeze:data-[focus-visible]:outline-breeze-brand",
|
|
@@ -363,10 +378,10 @@ var Y = {
|
|
|
363
378
|
state: {},
|
|
364
379
|
variant: {}
|
|
365
380
|
};
|
|
366
|
-
function
|
|
367
|
-
let { messages: v } =
|
|
381
|
+
function Ye({ defaultSelected: e, description: t, disabled: n = !1, error: r, form: i, id: a, label: o, loading: s = !1, name: c, onChange: l, readOnly: u = !1, ref: d, required: f = !1, selected: g, value: _ }) {
|
|
382
|
+
let { messages: v } = q(), S = y(d), C = t?.trim() || void 0, w = r?.trim() || void 0, T = n || s;
|
|
368
383
|
return /* @__PURE__ */ h(x, {
|
|
369
|
-
className:
|
|
384
|
+
className: X.base.root,
|
|
370
385
|
defaultSelected: e,
|
|
371
386
|
form: i,
|
|
372
387
|
id: a,
|
|
@@ -382,18 +397,18 @@ function Ie({ defaultSelected: e, description: t, disabled: n = !1, error: r, fo
|
|
|
382
397
|
value: _,
|
|
383
398
|
validationBehavior: "aria",
|
|
384
399
|
children: [/* @__PURE__ */ m(b, {
|
|
385
|
-
className:
|
|
400
|
+
className: Je.base.control,
|
|
386
401
|
children: ({ isFocusVisible: e, isSelected: t }) => /* @__PURE__ */ h(p, { children: [s && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("span", {
|
|
387
402
|
"aria-hidden": "true",
|
|
388
|
-
className:
|
|
389
|
-
children: /* @__PURE__ */ m(
|
|
403
|
+
className: Je.base.skeletonIndicator,
|
|
404
|
+
children: /* @__PURE__ */ m(J, {
|
|
390
405
|
blockSize: "100%",
|
|
391
406
|
inlineSize: "100%",
|
|
392
407
|
shape: "rectangle"
|
|
393
408
|
})
|
|
394
409
|
}), /* @__PURE__ */ m("span", {
|
|
395
|
-
className:
|
|
396
|
-
children: /* @__PURE__ */ m(
|
|
410
|
+
className: Je.base.skeleton,
|
|
411
|
+
children: /* @__PURE__ */ m(J, {
|
|
397
412
|
blockSize: "1lh",
|
|
398
413
|
inlineSize: "12em",
|
|
399
414
|
label: v.loading,
|
|
@@ -401,15 +416,15 @@ function Ie({ defaultSelected: e, description: t, disabled: n = !1, error: r, fo
|
|
|
401
416
|
})
|
|
402
417
|
})] }), !s && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("span", {
|
|
403
418
|
"aria-hidden": "true",
|
|
404
|
-
className:
|
|
419
|
+
className: Je.base.indicator,
|
|
405
420
|
"data-focus-visible": e || void 0,
|
|
406
421
|
"data-selected": t || void 0,
|
|
407
422
|
children: t ? "✓" : ""
|
|
408
423
|
}), /* @__PURE__ */ m("span", {
|
|
409
|
-
className:
|
|
424
|
+
className: Je.base.label,
|
|
410
425
|
children: o
|
|
411
426
|
})] })] })
|
|
412
|
-
}), /* @__PURE__ */ m(
|
|
427
|
+
}), /* @__PURE__ */ m(qe, {
|
|
413
428
|
description: C,
|
|
414
429
|
error: w,
|
|
415
430
|
loading: s
|
|
@@ -417,33 +432,8 @@ function Ie({ defaultSelected: e, description: t, disabled: n = !1, error: r, fo
|
|
|
417
432
|
});
|
|
418
433
|
}
|
|
419
434
|
//#endregion
|
|
420
|
-
//#region src/primitives/Container/Container.tsx
|
|
421
|
-
var Le = {
|
|
422
|
-
base: { container: "breeze:mx-auto breeze:inline-size-full breeze:min-inline-size-0" },
|
|
423
|
-
compound: {},
|
|
424
|
-
size: {
|
|
425
|
-
page: "breeze:max-inline-breeze-page",
|
|
426
|
-
prose: "breeze:max-inline-breeze-prose",
|
|
427
|
-
read: "breeze:max-inline-breeze-read"
|
|
428
|
-
},
|
|
429
|
-
state: { padded: "breeze:ps-breeze-4 breeze:pe-breeze-4 breeze:breeze-md:ps-breeze-7 breeze:breeze-md:pe-breeze-7" },
|
|
430
|
-
variant: {}
|
|
431
|
-
};
|
|
432
|
-
function Re({ "aria-label": e, children: t, element: n = "div", padded: i = !0, width: a = "page" }) {
|
|
433
|
-
let { accessibleLabel: o, role: s } = K(e, n);
|
|
434
|
-
return r(n, {
|
|
435
|
-
"aria-label": o,
|
|
436
|
-
className: [
|
|
437
|
-
Le.base.container,
|
|
438
|
-
Le.size[a],
|
|
439
|
-
i && Le.state.padded
|
|
440
|
-
].filter(Boolean).join(" "),
|
|
441
|
-
role: s
|
|
442
|
-
}, t);
|
|
443
|
-
}
|
|
444
|
-
//#endregion
|
|
445
435
|
//#region src/overlays/OverlayStack.ts
|
|
446
|
-
function
|
|
436
|
+
function Xe() {
|
|
447
437
|
let e = [], t = /* @__PURE__ */ new Set(), n = () => t.forEach((e) => e());
|
|
448
438
|
return {
|
|
449
439
|
getSnapshot: () => e,
|
|
@@ -459,15 +449,15 @@ function ze() {
|
|
|
459
449
|
})
|
|
460
450
|
};
|
|
461
451
|
}
|
|
462
|
-
var
|
|
463
|
-
function
|
|
464
|
-
let e = a(
|
|
452
|
+
var Ze = n(null);
|
|
453
|
+
function Qe() {
|
|
454
|
+
let e = a(Ze);
|
|
465
455
|
if (!e) throw Error("Breeze components must be rendered within BreezeProvider.");
|
|
466
456
|
return 100 + f(e.subscribe, e.getSnapshot, e.getSnapshot).length * 2;
|
|
467
457
|
}
|
|
468
|
-
var
|
|
469
|
-
function
|
|
470
|
-
let r = a(
|
|
458
|
+
var $e = n(null);
|
|
459
|
+
function et(e, t, n) {
|
|
460
|
+
let r = a(Ze), i = a($e), o = s();
|
|
471
461
|
if (!r) throw Error("Breeze components must be rendered within BreezeProvider.");
|
|
472
462
|
let l = f(r.subscribe, r.getSnapshot, r.getSnapshot), u = i?.id;
|
|
473
463
|
c(() => () => r.remove(o), [o, r]), c(() => {
|
|
@@ -506,12 +496,12 @@ function Ue(e, t, n) {
|
|
|
506
496
|
}
|
|
507
497
|
//#endregion
|
|
508
498
|
//#region src/overlays/OverlayProvider.tsx
|
|
509
|
-
var
|
|
510
|
-
function
|
|
511
|
-
let { direction: r } =
|
|
499
|
+
var tt = n(null), nt = "BreezeProvider portalContainer must belong to the current document and light DOM.";
|
|
500
|
+
function rt({ children: e, portalContainer: t, locale: n }) {
|
|
501
|
+
let { direction: r } = F(), [i] = d(Xe), [a, o] = d(null);
|
|
512
502
|
return c(() => {
|
|
513
503
|
let e = t ?? document.body;
|
|
514
|
-
if (e.ownerDocument !== document || e.getRootNode() !== document) throw Error(
|
|
504
|
+
if (e.ownerDocument !== document || e.getRootNode() !== document) throw Error(nt);
|
|
515
505
|
let n = e.ownerDocument.createElement("div");
|
|
516
506
|
return n.dataset.breezeRoot = "", n.dataset.breezePortal = "", e.append(n), o(n), () => n.remove();
|
|
517
507
|
}, [t]), c(() => {
|
|
@@ -520,23 +510,725 @@ function Ke({ children: e, portalContainer: t, locale: n }) {
|
|
|
520
510
|
r,
|
|
521
511
|
a,
|
|
522
512
|
n
|
|
523
|
-
]), /* @__PURE__ */ m(
|
|
513
|
+
]), /* @__PURE__ */ m(P, {
|
|
524
514
|
getContainer: () => a,
|
|
525
|
-
children: /* @__PURE__ */ m(
|
|
515
|
+
children: /* @__PURE__ */ m(Ze, {
|
|
526
516
|
value: i,
|
|
527
|
-
children: /* @__PURE__ */ m(
|
|
517
|
+
children: /* @__PURE__ */ m(tt, {
|
|
528
518
|
value: a,
|
|
529
519
|
children: e
|
|
530
520
|
})
|
|
531
521
|
})
|
|
532
522
|
});
|
|
533
523
|
}
|
|
534
|
-
function
|
|
535
|
-
return a(
|
|
524
|
+
function it() {
|
|
525
|
+
return a(tt);
|
|
526
|
+
}
|
|
527
|
+
//#endregion
|
|
528
|
+
//#region src/primitives/Collection/CollectionPopover.tsx
|
|
529
|
+
var at = "Breeze overlay triggers and portal containers must belong to the current document and light DOM.";
|
|
530
|
+
function ot(e) {
|
|
531
|
+
return typeof e == "object" && !!e && "nodeType" in e && typeof e.contains == "function";
|
|
532
|
+
}
|
|
533
|
+
function st({ children: e, className: t, isOpen: n, onOpenChange: r, triggerRef: s }) {
|
|
534
|
+
let l = it(), f = a($e), p = f?.open ?? !0, [h, g] = d(f === null), [_, v] = d(!1), y = u(!1), b = u(null), x = u(null), S = u(null), C = n && p, w = et("popover", C && h && l !== null, C || _), T = i((e) => {
|
|
535
|
+
b.current = e, v(e !== null);
|
|
536
|
+
}, []);
|
|
537
|
+
return c(() => {
|
|
538
|
+
if (l && s.current && (s.current.ownerDocument !== document || s.current.getRootNode() !== document || l.ownerDocument !== document || l.getRootNode() !== document)) throw Error(at);
|
|
539
|
+
}), o(() => g(!0), []), c(() => {
|
|
540
|
+
if (!C || !w.topmost || !l) return;
|
|
541
|
+
let e = (e) => ot(e) && !b.current?.contains(e) && !s.current?.contains(e), t = (e, t) => !!e && !!t && (e === t || e.contains(t) || t.contains(e)), n = (e) => e.button === 0, i = null, a = () => {
|
|
542
|
+
i !== null && (clearTimeout(i), i = null);
|
|
543
|
+
}, o = () => {
|
|
544
|
+
a(), i = setTimeout(() => {
|
|
545
|
+
i = null, S.current = null;
|
|
546
|
+
}, 0);
|
|
547
|
+
}, c = (e) => {
|
|
548
|
+
n(e) && (a(), x.current = ot(e.target) ? e.target : null, S.current = null);
|
|
549
|
+
}, u = (t) => {
|
|
550
|
+
if (!n(t)) return;
|
|
551
|
+
let i = x.current, a = ot(t.target) ? t.target : null;
|
|
552
|
+
if (!e(a)) {
|
|
553
|
+
x.current = null;
|
|
554
|
+
return;
|
|
555
|
+
}
|
|
556
|
+
if (!e(i)) {
|
|
557
|
+
S.current = a, x.current = null, o();
|
|
558
|
+
return;
|
|
559
|
+
}
|
|
560
|
+
S.current = a, r(!1);
|
|
561
|
+
}, d = () => {
|
|
562
|
+
a(), x.current = null, S.current = null;
|
|
563
|
+
}, f = (n) => {
|
|
564
|
+
let i = ot(n.target) ? n.target : null;
|
|
565
|
+
e(i) && !t(S.current, i) && r(!1), a(), x.current = null, S.current = null;
|
|
566
|
+
};
|
|
567
|
+
return l.ownerDocument.addEventListener("pointerdown", c, !0), l.ownerDocument.addEventListener("pointerup", u, !0), l.ownerDocument.addEventListener("pointercancel", d, !0), l.ownerDocument.addEventListener("click", f, !0), () => {
|
|
568
|
+
l.ownerDocument.removeEventListener("pointerdown", c, !0), l.ownerDocument.removeEventListener("pointerup", u, !0), l.ownerDocument.removeEventListener("pointercancel", d, !0), l.ownerDocument.removeEventListener("click", f, !0), a(), x.current = null, S.current = null;
|
|
569
|
+
};
|
|
570
|
+
}, [
|
|
571
|
+
l,
|
|
572
|
+
w.topmost,
|
|
573
|
+
r,
|
|
574
|
+
C,
|
|
575
|
+
s
|
|
576
|
+
]), o(() => {
|
|
577
|
+
p ? y.current = !1 : n && !y.current && (y.current = !0, r(!1));
|
|
578
|
+
}, [
|
|
579
|
+
r,
|
|
580
|
+
p,
|
|
581
|
+
n
|
|
582
|
+
]), /* @__PURE__ */ m(ee, {
|
|
583
|
+
className: `${t} breeze-popover`,
|
|
584
|
+
"data-breeze-interactive": w.interactive,
|
|
585
|
+
"data-breeze-overlay": "popover",
|
|
586
|
+
"data-breeze-topmost": w.topmost,
|
|
587
|
+
inert: !w.interactive,
|
|
588
|
+
isKeyboardDismissDisabled: !w.topmost,
|
|
589
|
+
isNonModal: !0,
|
|
590
|
+
isOpen: C,
|
|
591
|
+
onOpenChange: r,
|
|
592
|
+
placement: "bottom start",
|
|
593
|
+
shouldCloseOnInteractOutside: (e) => x.current === null && w.topmost && !s.current?.contains(e),
|
|
594
|
+
style: { zIndex: w.zIndex },
|
|
595
|
+
triggerRef: s,
|
|
596
|
+
ref: T,
|
|
597
|
+
children: e
|
|
598
|
+
});
|
|
599
|
+
}
|
|
600
|
+
//#endregion
|
|
601
|
+
//#region src/primitives/Collection/collection.styles.ts
|
|
602
|
+
var Q = {
|
|
603
|
+
base: {
|
|
604
|
+
badge: "breeze:ms-auto",
|
|
605
|
+
content: "breeze:flex breeze:min-inline-size-0 breeze:flex-1 breeze:flex-col breeze:gap-breeze-1",
|
|
606
|
+
description: "breeze:text-breeze-xs breeze:font-normal breeze:leading-breeze-snug breeze:text-breeze-ink-3",
|
|
607
|
+
item: "breeze:flex breeze:any-pointer-coarse:min-block-breeze-tap breeze:min-inline-size-0 breeze:items-start breeze:gap-breeze-2 breeze:rounded-breeze-sm breeze:ps-breeze-3 breeze:pe-breeze-3 breeze:py-breeze-2 breeze:font-breeze-sans breeze:text-breeze-sm breeze:leading-breeze-snug breeze:text-breeze-ink breeze:outline-offset-[-2px] breeze:data-[disabled]:cursor-not-allowed breeze:data-[disabled]:opacity-50 breeze:data-[focused]:bg-breeze-sunken breeze:data-[focus-visible]:outline-2 breeze:data-[focus-visible]:outline-solid breeze:data-[focus-visible]:outline-breeze-brand breeze:data-[hovered]:bg-breeze-sunken breeze:data-[selected]:bg-breeze-brand-soft breeze:data-[selected]:text-breeze-brand-text",
|
|
608
|
+
label: "breeze:font-medium",
|
|
609
|
+
listBox: "breeze:min-inline-size-0 breeze:outline-none",
|
|
610
|
+
popover: "breeze:min-inline-size-[var(--trigger-width)] breeze:max-inline-size-[calc(100vw-24px)] breeze:overflow-auto breeze:rounded-breeze-panel breeze:border breeze:border-solid breeze:border-breeze-line breeze:bg-breeze-surface breeze:p-breeze-1 breeze:shadow-breeze-overlay",
|
|
611
|
+
selectedIndicator: "breeze:ms-auto breeze:block-size-breeze-4 breeze:inline-size-breeze-4 breeze:shrink-0 breeze:text-breeze-brand-text"
|
|
612
|
+
},
|
|
613
|
+
compound: {},
|
|
614
|
+
size: {},
|
|
615
|
+
state: {},
|
|
616
|
+
variant: {}
|
|
617
|
+
}, ct = {
|
|
618
|
+
add: G,
|
|
619
|
+
back: V,
|
|
620
|
+
building: R,
|
|
621
|
+
calendar: re,
|
|
622
|
+
camera: ie,
|
|
623
|
+
check: z,
|
|
624
|
+
clock: ae,
|
|
625
|
+
close: he,
|
|
626
|
+
delete: de,
|
|
627
|
+
document: se,
|
|
628
|
+
download: U,
|
|
629
|
+
expand: B,
|
|
630
|
+
forward: H,
|
|
631
|
+
lock: le,
|
|
632
|
+
money: W,
|
|
633
|
+
moneyIn: ne,
|
|
634
|
+
moneyOut: I,
|
|
635
|
+
more: oe,
|
|
636
|
+
next: H,
|
|
637
|
+
notifications: L,
|
|
638
|
+
overview: ce,
|
|
639
|
+
people: me,
|
|
640
|
+
settings: K,
|
|
641
|
+
signOut: ue,
|
|
642
|
+
upload: pe,
|
|
643
|
+
warning: fe
|
|
644
|
+
}, lt = {
|
|
645
|
+
base: { icon: "breeze:block breeze:shrink-0" },
|
|
646
|
+
compound: {},
|
|
647
|
+
size: {
|
|
648
|
+
lg: "breeze:block-size-breeze-6 breeze:inline-size-breeze-6",
|
|
649
|
+
md: "breeze:block-size-breeze-5 breeze:inline-size-breeze-5",
|
|
650
|
+
sm: "breeze:block-size-breeze-4 breeze:inline-size-breeze-4"
|
|
651
|
+
},
|
|
652
|
+
state: { logicalDirection: "breeze:rtl:rotate-180" },
|
|
653
|
+
variant: {}
|
|
654
|
+
}, ut = /* @__PURE__ */ new Set([
|
|
655
|
+
"back",
|
|
656
|
+
"forward",
|
|
657
|
+
"next"
|
|
658
|
+
]);
|
|
659
|
+
function dt({ label: e, name: t, size: n = "md" }) {
|
|
660
|
+
let r = ct[t], i = e?.trim() || void 0;
|
|
661
|
+
return /* @__PURE__ */ m(r, {
|
|
662
|
+
"aria-hidden": i === void 0 || void 0,
|
|
663
|
+
"aria-label": i,
|
|
664
|
+
className: [
|
|
665
|
+
lt.base.icon,
|
|
666
|
+
lt.size[n],
|
|
667
|
+
ut.has(t) && lt.state.logicalDirection
|
|
668
|
+
].filter(Boolean).join(" "),
|
|
669
|
+
focusable: "false",
|
|
670
|
+
role: i === void 0 ? void 0 : "img",
|
|
671
|
+
strokeWidth: 1.75
|
|
672
|
+
});
|
|
673
|
+
}
|
|
674
|
+
//#endregion
|
|
675
|
+
//#region src/primitives/Collection/DescriptorContent.tsx
|
|
676
|
+
function ft({ descriptor: e, isSelected: t }) {
|
|
677
|
+
return /* @__PURE__ */ h(p, { children: [
|
|
678
|
+
e.icon && /* @__PURE__ */ m(dt, {
|
|
679
|
+
name: e.icon,
|
|
680
|
+
size: "sm"
|
|
681
|
+
}),
|
|
682
|
+
/* @__PURE__ */ h("span", {
|
|
683
|
+
className: Q.base.content,
|
|
684
|
+
children: [/* @__PURE__ */ m("span", {
|
|
685
|
+
className: Q.base.label,
|
|
686
|
+
children: e.label
|
|
687
|
+
}), e.description && /* @__PURE__ */ m("span", {
|
|
688
|
+
className: Q.base.description,
|
|
689
|
+
children: e.description
|
|
690
|
+
})]
|
|
691
|
+
}),
|
|
692
|
+
e.badge && /* @__PURE__ */ m("span", {
|
|
693
|
+
className: Q.base.badge,
|
|
694
|
+
children: /* @__PURE__ */ m(Be, {
|
|
695
|
+
"aria-label": e.badge["aria-label"],
|
|
696
|
+
variant: e.badge.variant,
|
|
697
|
+
children: e.badge.children
|
|
698
|
+
})
|
|
699
|
+
}),
|
|
700
|
+
/* @__PURE__ */ m("span", {
|
|
701
|
+
"aria-hidden": "true",
|
|
702
|
+
className: Q.base.selectedIndicator,
|
|
703
|
+
children: t && /* @__PURE__ */ m(dt, {
|
|
704
|
+
name: "check",
|
|
705
|
+
size: "sm"
|
|
706
|
+
})
|
|
707
|
+
})
|
|
708
|
+
] });
|
|
709
|
+
}
|
|
710
|
+
//#endregion
|
|
711
|
+
//#region src/primitives/Collection/DescriptorOption.tsx
|
|
712
|
+
function pt({ descriptor: e }) {
|
|
713
|
+
return /* @__PURE__ */ m(j, {
|
|
714
|
+
className: Q.base.item,
|
|
715
|
+
id: e.id,
|
|
716
|
+
isDisabled: e.disabled,
|
|
717
|
+
textValue: e.label,
|
|
718
|
+
children: ({ isSelected: t }) => /* @__PURE__ */ m(ft, {
|
|
719
|
+
descriptor: e,
|
|
720
|
+
isSelected: t
|
|
721
|
+
})
|
|
722
|
+
});
|
|
723
|
+
}
|
|
724
|
+
//#endregion
|
|
725
|
+
//#region src/primitives/ComboBox/ComboBox.tsx
|
|
726
|
+
var mt = {
|
|
727
|
+
base: {
|
|
728
|
+
group: "breeze:relative breeze:inline-flex breeze:min-block-breeze-md breeze:any-pointer-coarse:min-block-breeze-tap breeze:min-inline-size-0 breeze:inline-size-full breeze:items-stretch breeze:overflow-hidden breeze:rounded-breeze-ctl breeze:border breeze:border-solid breeze:border-breeze-line-strong breeze:bg-breeze-surface breeze:has-[input[data-focus-visible]]:outline-2 breeze:has-[input[data-focus-visible]]:outline-solid breeze:has-[input[data-focus-visible]]:outline-breeze-brand breeze:data-[disabled]:cursor-not-allowed breeze:data-[disabled]:bg-breeze-sunken breeze:data-[invalid]:border-breeze-danger",
|
|
729
|
+
input: "breeze:min-block-breeze-md breeze:min-inline-size-0 breeze:flex-1 breeze:border-0 breeze:bg-transparent breeze:ps-breeze-3 breeze:pe-breeze-2 breeze:py-breeze-2 breeze:font-breeze-sans breeze:text-breeze-sm breeze:leading-breeze-snug breeze:text-breeze-ink breeze:outline-none breeze:placeholder:text-breeze-ink-3 breeze:data-[hovered]:border-transparent breeze:data-[focus-visible]:!outline-none breeze:data-[invalid]:border-transparent breeze:disabled:cursor-not-allowed breeze:read-only:cursor-default",
|
|
730
|
+
popover: "breeze:min-inline-size-[var(--trigger-width)] breeze:max-inline-size-[calc(100vw-24px)] breeze:overflow-auto breeze:rounded-breeze-panel breeze:border breeze:border-solid breeze:border-breeze-line breeze:bg-breeze-surface breeze:p-breeze-1 breeze:shadow-breeze-overlay",
|
|
731
|
+
skeleton: "breeze:pointer-events-none breeze:absolute breeze:[inset-block:0] breeze:[inset-inline:0]",
|
|
732
|
+
trigger: "breeze:inline-grid breeze:shrink-0 breeze:place-items-center breeze:border-0 breeze:bg-transparent breeze:pe-breeze-2 breeze:ps-breeze-2 breeze:text-breeze-ink-2 breeze:outline-none breeze:data-[focus-visible]:outline-2 breeze:data-[focus-visible]:outline-solid breeze:data-[focus-visible]:outline-breeze-brand breeze:disabled:cursor-not-allowed breeze:disabled:opacity-60 breeze:any-pointer-coarse:min-inline-breeze-tap"
|
|
733
|
+
},
|
|
734
|
+
compound: {},
|
|
735
|
+
size: {},
|
|
736
|
+
state: {
|
|
737
|
+
loadingGroup: "breeze:!bg-transparent breeze:!border-transparent breeze:!opacity-100 breeze:!overflow-visible",
|
|
738
|
+
loadingInput: "breeze:!opacity-0",
|
|
739
|
+
loadingTrigger: "breeze:!opacity-0",
|
|
740
|
+
readOnlyGroup: "breeze:bg-breeze-sunken"
|
|
741
|
+
},
|
|
742
|
+
variant: {}
|
|
743
|
+
};
|
|
744
|
+
function ht(e) {
|
|
745
|
+
return Array.isArray(e);
|
|
746
|
+
}
|
|
747
|
+
function gt(e) {
|
|
748
|
+
return ht(e) ? e[0] ?? null : e ?? null;
|
|
749
|
+
}
|
|
750
|
+
function _t(e, t) {
|
|
751
|
+
return e === t || e !== null && t !== null && String(e) === String(t);
|
|
752
|
+
}
|
|
753
|
+
function vt(e) {
|
|
754
|
+
return e.descriptor.id;
|
|
755
|
+
}
|
|
756
|
+
function yt(e, t, n, r) {
|
|
757
|
+
let i = String(e), a = t.find((e) => vt(e) === i);
|
|
758
|
+
if (a) return a;
|
|
759
|
+
if (n?.descriptor.id === i) return n;
|
|
760
|
+
if (r?.descriptor.id === i) return r;
|
|
761
|
+
}
|
|
762
|
+
function bt(e, t, n, r, i, a, o) {
|
|
763
|
+
if (e === null) return null;
|
|
764
|
+
if (t !== void 0 && _t(e, n) && !(typeof t == "string" && o)) return t;
|
|
765
|
+
let s = yt(e, r, i, a);
|
|
766
|
+
return s ? s.item : null;
|
|
767
|
+
}
|
|
768
|
+
function xt(e, t, n, r) {
|
|
769
|
+
return t ? vt(t) : e == null || typeof e == "string" && r ? null : n(e).id;
|
|
770
|
+
}
|
|
771
|
+
function St(e, t, n, r) {
|
|
772
|
+
return e === null ? "" : t ? t.descriptor.label : typeof e == "string" && r ? e : n(e).label;
|
|
773
|
+
}
|
|
774
|
+
function Ct(e, t, n, r = !1) {
|
|
775
|
+
if (t === null) return;
|
|
776
|
+
let i = e.find(({ item: e }) => e === t);
|
|
777
|
+
if (i) return i;
|
|
778
|
+
if (typeof t == "string" && r) return;
|
|
779
|
+
let a = n(t).id;
|
|
780
|
+
return e.find(({ descriptor: e }) => e.id === a);
|
|
781
|
+
}
|
|
782
|
+
function wt(e, t, n) {
|
|
783
|
+
if (!(e == null || n && typeof e == "string")) return {
|
|
784
|
+
descriptor: t(e),
|
|
785
|
+
item: e
|
|
786
|
+
};
|
|
787
|
+
}
|
|
788
|
+
function Tt(e, t, n, r, i) {
|
|
789
|
+
return e ? n ? r.find(({ descriptor: e }) => e.id === n.descriptor.id)?.item ?? t : t : i;
|
|
790
|
+
}
|
|
791
|
+
function Et(e, t, n, r) {
|
|
792
|
+
if (e == null) return {
|
|
793
|
+
key: null,
|
|
794
|
+
text: ""
|
|
795
|
+
};
|
|
796
|
+
if (r && typeof e == "string") return {
|
|
797
|
+
key: null,
|
|
798
|
+
text: e
|
|
799
|
+
};
|
|
800
|
+
let i = Ct(t, e, n, r)?.descriptor ?? n(e);
|
|
801
|
+
return {
|
|
802
|
+
key: i.id,
|
|
803
|
+
text: i.label
|
|
804
|
+
};
|
|
805
|
+
}
|
|
806
|
+
function Dt({ getItem: e, items: t }) {
|
|
807
|
+
return /* @__PURE__ */ m(A, {
|
|
808
|
+
items: t,
|
|
809
|
+
children: (t) => /* @__PURE__ */ m(pt, { descriptor: e(t) })
|
|
810
|
+
});
|
|
811
|
+
}
|
|
812
|
+
function Ot({ allowsCustomValue: e, getItem: t, hasSuggestions: n, isDisabled: r, isReadOnly: i, items: s, triggerRef: c }) {
|
|
813
|
+
let l = a(E), u = r || i, d = !u && (n || e) && (l?.isOpen ?? !1);
|
|
814
|
+
return o(() => {
|
|
815
|
+
(u || !n && !e) && l?.isOpen && l?.setOpen(!1);
|
|
816
|
+
}, [
|
|
817
|
+
e,
|
|
818
|
+
n,
|
|
819
|
+
u,
|
|
820
|
+
l
|
|
821
|
+
]), /* @__PURE__ */ m(st, {
|
|
822
|
+
className: mt.base.popover,
|
|
823
|
+
isOpen: d,
|
|
824
|
+
onOpenChange: (e) => l?.setOpen(e),
|
|
825
|
+
triggerRef: c,
|
|
826
|
+
children: /* @__PURE__ */ m(Dt, {
|
|
827
|
+
getItem: t,
|
|
828
|
+
items: s
|
|
829
|
+
})
|
|
830
|
+
});
|
|
831
|
+
}
|
|
832
|
+
function kt({ allowsCustomValue: e, currentTextValue: t, isControlled: n, isReadOnly: r, resetTextValue: i }) {
|
|
833
|
+
let o = a(E), s = u(r), l = u(i), d = u(o?.isFocused ?? !1), f = u(o?.isOpen ?? !1);
|
|
834
|
+
return c(() => {
|
|
835
|
+
let i = o !== null && d.current && !o.isFocused;
|
|
836
|
+
if (!e && o && !n && o.value !== null && o.inputValue === "" && o.inputValue !== t && o.setInputValue(t), e && o && !r && o.value === null) {
|
|
837
|
+
let e = f.current && !o.isOpen;
|
|
838
|
+
(i || e) && (l.current = o.inputValue);
|
|
839
|
+
}
|
|
840
|
+
!e && o && !o.isFocused && o.value !== null && (i || o.inputValue === "") && o.inputValue !== t && o.setInputValue(t), d.current = o?.isFocused ?? !1, f.current = o?.isOpen ?? !1;
|
|
841
|
+
}, [
|
|
842
|
+
e,
|
|
843
|
+
t,
|
|
844
|
+
n,
|
|
845
|
+
r,
|
|
846
|
+
o
|
|
847
|
+
]), c(() => {
|
|
848
|
+
if (r && !s.current) if (e && o?.value === null) {
|
|
849
|
+
let e = l.current;
|
|
850
|
+
n ? e = t : o.isFocused && !o.isOpen && (e = o.inputValue), o.setInputValue(e);
|
|
851
|
+
} else o?.revert();
|
|
852
|
+
s.current = r;
|
|
853
|
+
}, [
|
|
854
|
+
e,
|
|
855
|
+
t,
|
|
856
|
+
n,
|
|
857
|
+
r,
|
|
858
|
+
i,
|
|
859
|
+
o
|
|
860
|
+
]), null;
|
|
861
|
+
}
|
|
862
|
+
function At({ allowsCustomValue: e, autoComplete: t, autoFocus: n, "aria-describedby": r, className: i, disabled: o, form: s, beginFormReset: l, getItem: d, handleFormReset: f, items: p, loading: h, placeholder: g, readOnly: _ }) {
|
|
863
|
+
let v = a(E), y = u(null), b = u(l), x = u(f), S = u(v), C = u(null);
|
|
864
|
+
c(() => {
|
|
865
|
+
b.current = l, x.current = f, S.current = v;
|
|
866
|
+
}, [
|
|
867
|
+
l,
|
|
868
|
+
f,
|
|
869
|
+
v
|
|
870
|
+
]), c(() => {
|
|
871
|
+
let e = !0, t = (t) => {
|
|
872
|
+
let n = s ? document.getElementById(s) : y.current?.form, r = S.current;
|
|
873
|
+
return !(n instanceof HTMLFormElement) || t.target !== n || !r ? null : {
|
|
874
|
+
defaultInputValue: r.defaultInputValue,
|
|
875
|
+
defaultValue: gt(r.defaultValue),
|
|
876
|
+
inputValue: r.inputValue,
|
|
877
|
+
isActive: () => e,
|
|
878
|
+
isOpen: r.isOpen,
|
|
879
|
+
setInputValue: (e) => r.setInputValue(e),
|
|
880
|
+
setOpen: (e) => r.setOpen(e),
|
|
881
|
+
setValue: (e) => r.setValue(e),
|
|
882
|
+
value: gt(r.value)
|
|
883
|
+
};
|
|
884
|
+
}, n = (e) => {
|
|
885
|
+
let n = t(e);
|
|
886
|
+
n && (N(() => void 0), x.current(e, n));
|
|
887
|
+
}, r = (e) => {
|
|
888
|
+
t(e) && b.current();
|
|
889
|
+
};
|
|
890
|
+
return document.addEventListener("reset", r, !0), document.addEventListener("reset", n), () => {
|
|
891
|
+
e = !1, document.removeEventListener("reset", r, !0), document.removeEventListener("reset", n);
|
|
892
|
+
};
|
|
893
|
+
}, [s]);
|
|
894
|
+
let w = (e) => {
|
|
895
|
+
if (!(!o && !_)) {
|
|
896
|
+
if (v) {
|
|
897
|
+
let { currentTarget: t } = e;
|
|
898
|
+
t.value = v.inputValue;
|
|
899
|
+
}
|
|
900
|
+
e.preventDefault(), e.stopPropagation();
|
|
901
|
+
}
|
|
902
|
+
}, T = (t) => {
|
|
903
|
+
if (e || o || _ || !v) return;
|
|
904
|
+
let { nativeEvent: n } = t;
|
|
905
|
+
if (C.current === n) return;
|
|
906
|
+
let { inputType: r } = n;
|
|
907
|
+
if (r && r !== "insertReplacementText") return;
|
|
908
|
+
C.current = n;
|
|
909
|
+
let i = t.currentTarget, a = p.map((e) => ({
|
|
910
|
+
descriptor: d(e),
|
|
911
|
+
item: e
|
|
912
|
+
})).filter(({ descriptor: e }) => (e.id === i.value || e.label === i.value) && !e.disabled);
|
|
913
|
+
if (a.length !== 1) return;
|
|
914
|
+
let [s] = a;
|
|
915
|
+
if (v.value === s.descriptor.id) {
|
|
916
|
+
i.value = s.descriptor.label, v.setInputValue(s.descriptor.label);
|
|
917
|
+
return;
|
|
918
|
+
}
|
|
919
|
+
v.setInputValue(s.descriptor.label), v.setValue(s.descriptor.id);
|
|
920
|
+
};
|
|
921
|
+
return /* @__PURE__ */ m(k, {
|
|
922
|
+
"aria-busy": h || void 0,
|
|
923
|
+
"aria-describedby": r,
|
|
924
|
+
autoComplete: t,
|
|
925
|
+
autoFocus: n,
|
|
926
|
+
className: i,
|
|
927
|
+
form: s,
|
|
928
|
+
onChange: T,
|
|
929
|
+
onChangeCapture: w,
|
|
930
|
+
onInput: T,
|
|
931
|
+
onInputCapture: w,
|
|
932
|
+
placeholder: g,
|
|
933
|
+
readOnly: _ || void 0,
|
|
934
|
+
ref: y
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
function jt(e, t, n, r) {
|
|
938
|
+
if (e != null) return t ? t.descriptor.label : typeof e == "string" && r ? e : n(e).label;
|
|
939
|
+
}
|
|
940
|
+
function Mt(e, t) {
|
|
941
|
+
return t !== void 0 && e === t;
|
|
942
|
+
}
|
|
943
|
+
function Nt(e, t, n, r, i) {
|
|
944
|
+
return typeof e == "string" && r ? Mt(e, i) ? void 0 : t?.descriptor : t || e === null ? t?.descriptor : n(e);
|
|
945
|
+
}
|
|
946
|
+
function Pt(e, t) {
|
|
947
|
+
return e !== null && t !== null && e.id === t.id && e.label === t.label;
|
|
948
|
+
}
|
|
949
|
+
function Ft(e, t, n) {
|
|
950
|
+
return e !== void 0 && (e === null ? !n : t !== void 0 || !n || typeof e != "string");
|
|
951
|
+
}
|
|
952
|
+
function It(e, t, n, r, i, a) {
|
|
953
|
+
if (e === void 0) return { selection: null };
|
|
954
|
+
let o = Nt(e, t, n, i, a), s = {
|
|
955
|
+
id: o?.id ?? null,
|
|
956
|
+
label: o?.label ?? (typeof e == "string" ? e : "")
|
|
957
|
+
};
|
|
958
|
+
return {
|
|
959
|
+
resetLabel: r !== null && (r.id !== s.id || r.label !== s.label) ? s.label : void 0,
|
|
960
|
+
selection: s
|
|
961
|
+
};
|
|
962
|
+
}
|
|
963
|
+
function Lt(e, t, n, r) {
|
|
964
|
+
let i = n.trim();
|
|
965
|
+
return i ? t.filter(({ descriptor: e }) => r(e.label, i)).map(({ item: e }) => e) : e;
|
|
966
|
+
}
|
|
967
|
+
function Rt(e, t, n, r) {
|
|
968
|
+
return t !== null && e === t || n !== void 0 && r?.descriptor.label === e;
|
|
969
|
+
}
|
|
970
|
+
function zt(e, t, n, r, i, a, o) {
|
|
971
|
+
let s;
|
|
972
|
+
return s = e === void 0 ? n : t ? void 0 : Ct(i, e, a, o), {
|
|
973
|
+
baseControlledTextValue: e === void 0 ? void 0 : St(e, s, a, o),
|
|
974
|
+
selectedItem: s,
|
|
975
|
+
selectedKey: e === void 0 ? r : xt(e, s, a, o)
|
|
976
|
+
};
|
|
977
|
+
}
|
|
978
|
+
function Bt(e) {
|
|
979
|
+
let { allowsCustomValue: t = !1, defaultValue: n, getItem: r, items: i, onChange: a, readOnly: s = !1, value: f } = e, [p, m] = d(""), [h, g] = d(), [_] = d(() => wt(f, r, t)), [v] = d(() => f), [y] = d(() => f !== void 0), [b] = d(() => n), x = u(null), S = u(null), C = u(void 0), w = u(null), T = u(void 0), E = u(!1), O = u(!1), k = u(s), A = () => {
|
|
980
|
+
O.current = !0, setTimeout(() => {
|
|
981
|
+
O.current = !1;
|
|
982
|
+
}, 0);
|
|
983
|
+
};
|
|
984
|
+
c(() => {
|
|
985
|
+
s && !k.current && (m(""), g(void 0), S.current = null, C.current = void 0, w.current = null, T.current = void 0), k.current = s;
|
|
986
|
+
}, [s]);
|
|
987
|
+
let j = l(() => i.map((e) => ({
|
|
988
|
+
descriptor: r(e),
|
|
989
|
+
item: e
|
|
990
|
+
})), [r, i]), M = Ct(j, b ?? null, r, t) ?? (f === void 0 && b != null && !(t && typeof b == "string") ? {
|
|
991
|
+
descriptor: r(b),
|
|
992
|
+
item: b
|
|
993
|
+
} : void 0), ee = xt(b, M, r, t) ?? void 0, P = u(ee ?? null), te = u(M), F = j.find(({ descriptor: e }) => e.id === P.current), ne = f === void 0 && P.current !== null ? F ?? te.current : void 0, I = M;
|
|
994
|
+
c(() => {
|
|
995
|
+
f === void 0 && F && (te.current = F);
|
|
996
|
+
}, [F, f]);
|
|
997
|
+
let { baseControlledTextValue: L, selectedItem: R, selectedKey: re } = zt(f, f !== void 0 && t && typeof f == "string" && Mt(f, C.current), ne, P.current, j, r, t), ie = jt(b, I, r, t), z = L ?? R?.descriptor.label ?? ie ?? "", B = It(f, R, r, x.current, t, C.current), V = B.selection, H = B.resetLabel !== void 0 && t && Mt(f, C.current);
|
|
998
|
+
c(() => {
|
|
999
|
+
x.current = V;
|
|
1000
|
+
}, [V]), c(() => {
|
|
1001
|
+
B.resetLabel !== void 0 && (H || (w.current = B.resetLabel, C.current = void 0));
|
|
1002
|
+
}, [
|
|
1003
|
+
V?.id,
|
|
1004
|
+
V?.label,
|
|
1005
|
+
B.resetLabel,
|
|
1006
|
+
H
|
|
1007
|
+
]);
|
|
1008
|
+
let ae = B.resetLabel !== void 0 && !H, U = f !== void 0 && h !== void 0 && Pt(S.current, V);
|
|
1009
|
+
c(() => {
|
|
1010
|
+
h !== void 0 && !U && (S.current = null);
|
|
1011
|
+
}, [h, U]);
|
|
1012
|
+
let { contains: oe } = D({ sensitivity: "base" }), se = ae ? "" : p, ce = i, W = j, le = Tt(y, v, _, W, b), ue = U ? h : L;
|
|
1013
|
+
o(() => {
|
|
1014
|
+
ae && (m(""), g(void 0), S.current = null);
|
|
1015
|
+
}, [
|
|
1016
|
+
ae,
|
|
1017
|
+
V?.id,
|
|
1018
|
+
V?.label
|
|
1019
|
+
]);
|
|
1020
|
+
let G = (e = !1) => {
|
|
1021
|
+
m(""), g(void 0), S.current = null, e || (C.current = void 0), E.current = !1;
|
|
1022
|
+
}, K = (e) => {
|
|
1023
|
+
if (e) {
|
|
1024
|
+
E.current = !1;
|
|
1025
|
+
return;
|
|
1026
|
+
}
|
|
1027
|
+
if (f !== void 0 && !t && E.current && h !== void 0) {
|
|
1028
|
+
E.current = !1;
|
|
1029
|
+
return;
|
|
1030
|
+
}
|
|
1031
|
+
G(!0);
|
|
1032
|
+
}, de = (t) => {
|
|
1033
|
+
if (e.allowsCustomValue !== !0) {
|
|
1034
|
+
t === "" && f !== void 0 && a?.(null);
|
|
1035
|
+
return;
|
|
1036
|
+
}
|
|
1037
|
+
let n = t || null;
|
|
1038
|
+
f !== void 0 && (C.current = n), T.current = n, e.onChange?.(n);
|
|
1039
|
+
}, fe = (e) => {
|
|
1040
|
+
f === void 0 && (P.current = null, te.current = void 0), !(t && T.current !== void 0) && (e && f !== void 0 && !t && G(), e && a?.(null));
|
|
1041
|
+
}, pe = (e) => {
|
|
1042
|
+
if (!O.current) {
|
|
1043
|
+
if (s) {
|
|
1044
|
+
G();
|
|
1045
|
+
return;
|
|
1046
|
+
}
|
|
1047
|
+
if (Rt(e, w.current, f, R)) {
|
|
1048
|
+
w.current = null, G();
|
|
1049
|
+
return;
|
|
1050
|
+
}
|
|
1051
|
+
w.current = null, m(e), Ft(f, R, t) && (g(e), S.current = V), E.current = f !== void 0 && !t && Lt(i, j, e, oe).length === 0, de(e);
|
|
1052
|
+
}
|
|
1053
|
+
}, me = (e, n = !0) => {
|
|
1054
|
+
if (O.current) return;
|
|
1055
|
+
if (e !== null && f !== void 0 && h !== void 0 && e === re) {
|
|
1056
|
+
w.current = R?.descriptor.label ?? "", G();
|
|
1057
|
+
return;
|
|
1058
|
+
}
|
|
1059
|
+
if (e === null) {
|
|
1060
|
+
fe(n);
|
|
1061
|
+
return;
|
|
1062
|
+
}
|
|
1063
|
+
f === void 0 && (P.current = String(e));
|
|
1064
|
+
let r = yt(e, W, _, I);
|
|
1065
|
+
f === void 0 && (te.current = r);
|
|
1066
|
+
let i = bt(e, f, re, W, _, I, t);
|
|
1067
|
+
w.current = r?.descriptor.label ?? "", T.current = void 0, G(), n && a?.(i);
|
|
1068
|
+
}, he = (e) => {
|
|
1069
|
+
t && e.defaultValue !== null && I !== void 0 && !W.some(({ descriptor: t }) => t.id === e.defaultValue) && e.value === null || e.setValue(e.defaultValue), e.setInputValue(e.defaultInputValue);
|
|
1070
|
+
};
|
|
1071
|
+
return {
|
|
1072
|
+
beginFormReset: A,
|
|
1073
|
+
collectionItems: ce,
|
|
1074
|
+
controlledTextValue: ue,
|
|
1075
|
+
currentTextValue: z,
|
|
1076
|
+
defaultSelectedKey: ee,
|
|
1077
|
+
defaultTextValue: ie,
|
|
1078
|
+
handleFormReset: (e, n) => {
|
|
1079
|
+
if (!n.isActive()) {
|
|
1080
|
+
O.current = !1;
|
|
1081
|
+
return;
|
|
1082
|
+
}
|
|
1083
|
+
if (e.defaultPrevented) {
|
|
1084
|
+
n.setValue(n.value), n.setInputValue(n.inputValue), n.setOpen(n.isOpen), O.current = !1;
|
|
1085
|
+
return;
|
|
1086
|
+
}
|
|
1087
|
+
let i = f === void 0 ? !_t(n.value, n.defaultValue) || t && n.inputValue !== n.defaultInputValue : (() => {
|
|
1088
|
+
let e = Et(f, W, r, t), n = Et(le, W, r, t);
|
|
1089
|
+
return e.key !== n.key || e.text !== n.text;
|
|
1090
|
+
})(), o = f !== void 0 || t ? (t && le === "" ? null : le) ?? null : bt(n.defaultValue, void 0, re, W, _, I, t);
|
|
1091
|
+
try {
|
|
1092
|
+
N(() => {
|
|
1093
|
+
he(n), n.setOpen(!1), T.current = void 0, G(), f === void 0 && (P.current = n.defaultValue === null ? null : String(n.defaultValue), te.current = yt(n.defaultValue, W, _, I)), i && a?.(o);
|
|
1094
|
+
});
|
|
1095
|
+
} finally {
|
|
1096
|
+
O.current = !1;
|
|
1097
|
+
}
|
|
1098
|
+
},
|
|
1099
|
+
handleInputChange: pe,
|
|
1100
|
+
handleOpenChange: K,
|
|
1101
|
+
handleValueChange: me,
|
|
1102
|
+
matchesFilter: (e) => oe(e, se.trim()),
|
|
1103
|
+
selectedKey: re
|
|
1104
|
+
};
|
|
1105
|
+
}
|
|
1106
|
+
function Vt({ props: e }) {
|
|
1107
|
+
let { allowsCustomValue: t = !1, autoComplete: n, autoFocus: r, description: i, disabled: a = !1, error: o, form: c, getItem: l, id: d, items: f, label: p, loading: _ = !1, name: v, placeholder: y, readOnly: b = !1, required: x = !1, value: S } = e, { messages: C } = q(), w = Bt(e), E = i?.trim() || void 0, D = o?.trim() || void 0, k = a || _, A = u(null), j = s(), M = `${j}-description`, N = `${j}-error`, ee = [E && M, D && N].filter(Boolean).join(" ") || void 0, P = k ? void 0 : v;
|
|
1108
|
+
return /* @__PURE__ */ h(T, {
|
|
1109
|
+
allowsCustomValue: t,
|
|
1110
|
+
allowsEmptyCollection: t,
|
|
1111
|
+
"aria-label": _ ? p : void 0,
|
|
1112
|
+
className: X.base.root,
|
|
1113
|
+
defaultInputValue: w.defaultTextValue,
|
|
1114
|
+
defaultFilter: w.matchesFilter,
|
|
1115
|
+
defaultValue: w.defaultSelectedKey,
|
|
1116
|
+
form: c,
|
|
1117
|
+
id: d,
|
|
1118
|
+
inputValue: w.controlledTextValue,
|
|
1119
|
+
isDisabled: k,
|
|
1120
|
+
isInvalid: !_ && D !== void 0,
|
|
1121
|
+
isReadOnly: b,
|
|
1122
|
+
isRequired: x,
|
|
1123
|
+
defaultItems: w.collectionItems,
|
|
1124
|
+
menuTrigger: "input",
|
|
1125
|
+
name: P,
|
|
1126
|
+
onChange: w.handleValueChange,
|
|
1127
|
+
onInputChange: w.handleInputChange,
|
|
1128
|
+
onOpenChange: w.handleOpenChange,
|
|
1129
|
+
value: S === void 0 ? void 0 : w.selectedKey,
|
|
1130
|
+
validationBehavior: "aria",
|
|
1131
|
+
children: [
|
|
1132
|
+
/* @__PURE__ */ m(Ke, {
|
|
1133
|
+
label: p,
|
|
1134
|
+
loading: _
|
|
1135
|
+
}),
|
|
1136
|
+
/* @__PURE__ */ h(O, {
|
|
1137
|
+
className: Z(mt.base.group, _ && mt.state.loadingGroup, b && mt.state.readOnlyGroup),
|
|
1138
|
+
ref: A,
|
|
1139
|
+
children: [
|
|
1140
|
+
/* @__PURE__ */ m(kt, {
|
|
1141
|
+
allowsCustomValue: t,
|
|
1142
|
+
currentTextValue: w.currentTextValue,
|
|
1143
|
+
isControlled: S !== void 0,
|
|
1144
|
+
isReadOnly: b,
|
|
1145
|
+
resetTextValue: w.defaultTextValue ?? ""
|
|
1146
|
+
}),
|
|
1147
|
+
/* @__PURE__ */ m(At, {
|
|
1148
|
+
allowsCustomValue: t,
|
|
1149
|
+
"aria-describedby": ee,
|
|
1150
|
+
autoComplete: n,
|
|
1151
|
+
autoFocus: r,
|
|
1152
|
+
className: Z(mt.base.input, _ && mt.state.loadingInput),
|
|
1153
|
+
disabled: k,
|
|
1154
|
+
form: c,
|
|
1155
|
+
beginFormReset: w.beginFormReset,
|
|
1156
|
+
getItem: l,
|
|
1157
|
+
handleFormReset: w.handleFormReset,
|
|
1158
|
+
items: f,
|
|
1159
|
+
loading: _,
|
|
1160
|
+
placeholder: y,
|
|
1161
|
+
readOnly: b
|
|
1162
|
+
}),
|
|
1163
|
+
/* @__PURE__ */ m(g, {
|
|
1164
|
+
"aria-describedby": ee,
|
|
1165
|
+
className: Z(mt.base.trigger, _ && mt.state.loadingTrigger),
|
|
1166
|
+
children: /* @__PURE__ */ m(dt, {
|
|
1167
|
+
name: "expand",
|
|
1168
|
+
size: "sm"
|
|
1169
|
+
})
|
|
1170
|
+
}),
|
|
1171
|
+
_ && /* @__PURE__ */ m("span", {
|
|
1172
|
+
className: mt.base.skeleton,
|
|
1173
|
+
children: /* @__PURE__ */ m(J, {
|
|
1174
|
+
blockSize: "100%",
|
|
1175
|
+
inlineSize: "100%",
|
|
1176
|
+
label: C.loading,
|
|
1177
|
+
shape: "rectangle"
|
|
1178
|
+
})
|
|
1179
|
+
})
|
|
1180
|
+
]
|
|
1181
|
+
}),
|
|
1182
|
+
/* @__PURE__ */ m(Ot, {
|
|
1183
|
+
allowsCustomValue: t,
|
|
1184
|
+
getItem: l,
|
|
1185
|
+
hasSuggestions: w.collectionItems.length > 0,
|
|
1186
|
+
isDisabled: k,
|
|
1187
|
+
isReadOnly: b,
|
|
1188
|
+
items: w.collectionItems,
|
|
1189
|
+
triggerRef: A
|
|
1190
|
+
}),
|
|
1191
|
+
/* @__PURE__ */ m(qe, {
|
|
1192
|
+
description: E,
|
|
1193
|
+
descriptionId: M,
|
|
1194
|
+
error: D,
|
|
1195
|
+
errorId: N,
|
|
1196
|
+
loading: _
|
|
1197
|
+
})
|
|
1198
|
+
]
|
|
1199
|
+
});
|
|
1200
|
+
}
|
|
1201
|
+
function Ht(e) {
|
|
1202
|
+
return /* @__PURE__ */ m(Vt, { props: e });
|
|
1203
|
+
}
|
|
1204
|
+
//#endregion
|
|
1205
|
+
//#region src/primitives/Container/Container.tsx
|
|
1206
|
+
var Ut = {
|
|
1207
|
+
base: { container: "breeze:mx-auto breeze:inline-size-full breeze:min-inline-size-0" },
|
|
1208
|
+
compound: {},
|
|
1209
|
+
size: {
|
|
1210
|
+
page: "breeze:max-inline-breeze-page",
|
|
1211
|
+
prose: "breeze:max-inline-breeze-prose",
|
|
1212
|
+
read: "breeze:max-inline-breeze-read"
|
|
1213
|
+
},
|
|
1214
|
+
state: { padded: "breeze:ps-breeze-4 breeze:pe-breeze-4 breeze:breeze-md:ps-breeze-7 breeze:breeze-md:pe-breeze-7" },
|
|
1215
|
+
variant: {}
|
|
1216
|
+
};
|
|
1217
|
+
function Wt({ "aria-label": e, children: t, element: n = "div", padded: i = !0, width: a = "page" }) {
|
|
1218
|
+
let { accessibleLabel: o, role: s } = Ue(e, n);
|
|
1219
|
+
return r(n, {
|
|
1220
|
+
"aria-label": o,
|
|
1221
|
+
className: [
|
|
1222
|
+
Ut.base.container,
|
|
1223
|
+
Ut.size[a],
|
|
1224
|
+
i && Ut.state.padded
|
|
1225
|
+
].filter(Boolean).join(" "),
|
|
1226
|
+
role: s
|
|
1227
|
+
}, t);
|
|
536
1228
|
}
|
|
537
1229
|
//#endregion
|
|
538
1230
|
//#region src/overlays/OverlaySurface.tsx
|
|
539
|
-
var
|
|
1231
|
+
var Gt = {
|
|
540
1232
|
base: {
|
|
541
1233
|
content: "breeze-overlay-content",
|
|
542
1234
|
header: "breeze-overlay-header",
|
|
@@ -551,26 +1243,26 @@ var X = {
|
|
|
551
1243
|
fullscreen: "breeze-fullscreen",
|
|
552
1244
|
popover: "breeze-popover"
|
|
553
1245
|
}
|
|
554
|
-
},
|
|
555
|
-
function
|
|
1246
|
+
}, Kt = "Breeze overlay triggers and portal containers must belong to the current document and light DOM.";
|
|
1247
|
+
function qt(e) {
|
|
556
1248
|
return typeof e == "object" && !!e && "nodeType" in e && typeof e.contains == "function";
|
|
557
1249
|
}
|
|
558
|
-
function
|
|
1250
|
+
function Jt(e) {
|
|
559
1251
|
return e.dataset?.breezeOverlay !== void 0;
|
|
560
1252
|
}
|
|
561
|
-
function
|
|
562
|
-
let { getMessageLocale: y, messages: b } =
|
|
563
|
-
o(() =>
|
|
564
|
-
let [
|
|
1253
|
+
function Yt({ children: e, defaultOpen: t = !1, dismissible: n = !0, kind: r, onOpenChange: s, open: f, placement: g = "bottom", title: _, trigger: v }) {
|
|
1254
|
+
let { getMessageLocale: y, messages: b } = q(), x = r === "popover" || r === "fullscreen", S = it(), C = a($e), [w, T] = d(C === null);
|
|
1255
|
+
o(() => T(!0), []);
|
|
1256
|
+
let [E, D] = d(t), O = f ?? E, k = C?.open ?? !0, A = O && k, j = u(null), M = u(null), N = u(null), [P, te] = d(!1), F = u(!1), ne = u(null), I = u(null), L = u(null), R = u(null), re = u(!1);
|
|
565
1257
|
c(() => {
|
|
566
|
-
if (S && j.current && (j.current.ownerDocument !== document || j.current.getRootNode() !== document || S.ownerDocument !== document || S.getRootNode() !== document)) throw Error(
|
|
1258
|
+
if (S && j.current && (j.current.ownerDocument !== document || j.current.getRootNode() !== document || S.ownerDocument !== document || S.getRootNode() !== document)) throw Error(Kt);
|
|
567
1259
|
}, [S]);
|
|
568
|
-
let
|
|
1260
|
+
let ie = l(() => r === "fullscreen" ? { current: S } : j, [S, r]), z = et(r, A && w && S !== null, A || P), B = i((e) => {
|
|
569
1261
|
if (!e && !k) {
|
|
570
|
-
if (
|
|
571
|
-
O && (
|
|
1262
|
+
if (re.current) return;
|
|
1263
|
+
O && (re.current = !0);
|
|
572
1264
|
}
|
|
573
|
-
f === void 0 &&
|
|
1265
|
+
f === void 0 && D(e), s?.(e);
|
|
574
1266
|
}, [
|
|
575
1267
|
f,
|
|
576
1268
|
s,
|
|
@@ -578,187 +1270,187 @@ function Ze({ children: e, defaultOpen: t = !1, dismissible: n = !0, kind: r, on
|
|
|
578
1270
|
O
|
|
579
1271
|
]);
|
|
580
1272
|
o(() => {
|
|
581
|
-
k ?
|
|
1273
|
+
k ? re.current = !1 : O && B(!1);
|
|
582
1274
|
}, [
|
|
583
|
-
|
|
1275
|
+
B,
|
|
584
1276
|
k,
|
|
585
1277
|
O
|
|
586
1278
|
]), o(() => {
|
|
587
|
-
if (r !== "popover" || !A || !n || !
|
|
1279
|
+
if (r !== "popover" || !A || !n || !z.topmost || !S) return;
|
|
588
1280
|
let e = () => {
|
|
589
|
-
|
|
590
|
-
}, t = (e, t) => !!e && !!t && (e === t || e.contains(t) || t.contains(e)), i = (e) => e.button === 0, a = (e) =>
|
|
591
|
-
i(t) && (e(),
|
|
1281
|
+
I.current !== null && (clearTimeout(I.current), I.current = null);
|
|
1282
|
+
}, t = (e, t) => !!e && !!t && (e === t || e.contains(t) || t.contains(e)), i = (e) => e.button === 0, a = (e) => qt(e) && !M.current?.contains(e) && !j.current?.contains(e), o = (t) => {
|
|
1283
|
+
i(t) && (e(), R.current = null, L.current = qt(t.target) ? t.target : null);
|
|
592
1284
|
}, s = (n) => {
|
|
593
1285
|
if (!i(n)) return;
|
|
594
|
-
let r =
|
|
595
|
-
!a(r) || !a(o) || (e(),
|
|
596
|
-
|
|
597
|
-
let e =
|
|
598
|
-
|
|
1286
|
+
let r = L.current, o = qt(n.target) ? n.target : null;
|
|
1287
|
+
!a(r) || !a(o) || (e(), I.current = setTimeout(() => {
|
|
1288
|
+
I.current = null;
|
|
1289
|
+
let e = R.current, n = L.current;
|
|
1290
|
+
R.current = null, L.current = null, !(t(e, o) && t(e, n)) && B(!1);
|
|
599
1291
|
}, 0));
|
|
600
1292
|
}, c = () => {
|
|
601
|
-
e(),
|
|
1293
|
+
e(), R.current = null, L.current = null;
|
|
602
1294
|
}, l = (n) => {
|
|
603
|
-
let r =
|
|
1295
|
+
let r = qt(n.target) ? n.target : null;
|
|
604
1296
|
if (e(), a(r)) {
|
|
605
|
-
let e =
|
|
606
|
-
if (
|
|
607
|
-
|
|
1297
|
+
let e = R.current, n = L.current;
|
|
1298
|
+
if (R.current = null, L.current = null, t(e, r) && t(e, n)) return;
|
|
1299
|
+
B(!1);
|
|
608
1300
|
}
|
|
609
1301
|
};
|
|
610
1302
|
return S.ownerDocument.addEventListener("pointerdown", o, !0), S.ownerDocument.addEventListener("pointerup", s, !0), S.ownerDocument.addEventListener("pointercancel", c, !0), S.ownerDocument.addEventListener("click", l, !0), () => {
|
|
611
|
-
e(), S.ownerDocument.removeEventListener("pointerdown", o, !0), S.ownerDocument.removeEventListener("pointerup", s, !0), S.ownerDocument.removeEventListener("pointercancel", c, !0), S.ownerDocument.removeEventListener("click", l, !0),
|
|
1303
|
+
e(), S.ownerDocument.removeEventListener("pointerdown", o, !0), S.ownerDocument.removeEventListener("pointerup", s, !0), S.ownerDocument.removeEventListener("pointercancel", c, !0), S.ownerDocument.removeEventListener("click", l, !0), R.current = null, L.current = null;
|
|
612
1304
|
};
|
|
613
1305
|
}, [
|
|
614
|
-
|
|
1306
|
+
B,
|
|
615
1307
|
n,
|
|
616
1308
|
S,
|
|
617
1309
|
r,
|
|
618
|
-
|
|
1310
|
+
z.topmost,
|
|
619
1311
|
A
|
|
620
1312
|
]);
|
|
621
|
-
let
|
|
1313
|
+
let V = C?.restoreFocus, H = C?.id, ae = i(() => {
|
|
622
1314
|
let e = j.current, t = S?.ownerDocument, n = t?.activeElement;
|
|
623
1315
|
if (!t || !S) return;
|
|
624
|
-
let r =
|
|
1316
|
+
let r = H ? t.getElementById(H) : null;
|
|
625
1317
|
if (!(n === t.body || n === r || n?.closest("[data-exiting]"))) return;
|
|
626
1318
|
if (!e?.isConnected) {
|
|
627
|
-
|
|
1319
|
+
V?.();
|
|
628
1320
|
return;
|
|
629
1321
|
}
|
|
630
1322
|
let i = S.querySelector("[data-breeze-topmost=\"true\"]");
|
|
631
1323
|
(!i || i.contains(e)) && !e.closest("[inert], [aria-hidden=\"true\"]") && e.focus({ preventScroll: !0 });
|
|
632
1324
|
}, [
|
|
633
1325
|
S,
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
]),
|
|
637
|
-
|
|
638
|
-
}, []),
|
|
1326
|
+
H,
|
|
1327
|
+
V
|
|
1328
|
+
]), U = i(() => {
|
|
1329
|
+
ne.current !== null && (clearTimeout(ne.current), ne.current = null);
|
|
1330
|
+
}, []), oe = i((e) => {
|
|
639
1331
|
queueMicrotask(() => {
|
|
640
|
-
!e.isConnected || e.closest("[inert], [data-exiting]") || (
|
|
1332
|
+
!e.isConnected || e.closest("[inert], [data-exiting]") || (U(), e.focus({ preventScroll: !0 }), ne.current = setTimeout(() => {
|
|
641
1333
|
let { ownerDocument: t } = e, { activeElement: n } = t;
|
|
642
|
-
e.isConnected && !e.closest("[inert], [data-exiting]") && (n === e || n === t.body) && (
|
|
1334
|
+
e.isConnected && !e.closest("[inert], [data-exiting]") && (n === e || n === t.body) && (F.current = !0, e.blur(), e.focus({ preventScroll: !0 }), F.current = !1), ne.current = null;
|
|
643
1335
|
}, 500));
|
|
644
1336
|
});
|
|
645
|
-
}, [
|
|
1337
|
+
}, [U]), se = u(A);
|
|
646
1338
|
o(() => {
|
|
647
|
-
let e =
|
|
648
|
-
|
|
1339
|
+
let e = se.current;
|
|
1340
|
+
se.current = A, !(!x || !A || e || !N.current) && oe(N.current);
|
|
649
1341
|
}, [
|
|
650
|
-
|
|
1342
|
+
oe,
|
|
651
1343
|
x,
|
|
652
1344
|
A
|
|
653
1345
|
]);
|
|
654
|
-
let
|
|
655
|
-
|
|
1346
|
+
let ce = i((e) => {
|
|
1347
|
+
N.current = e;
|
|
656
1348
|
let t = () => {
|
|
657
|
-
|
|
1349
|
+
U(), N.current = null, te(!1), requestAnimationFrame(ae);
|
|
658
1350
|
};
|
|
659
1351
|
if (!e) {
|
|
660
1352
|
t();
|
|
661
1353
|
return;
|
|
662
1354
|
}
|
|
663
|
-
return
|
|
1355
|
+
return te(!0), x && oe(e), t;
|
|
664
1356
|
}, [
|
|
665
|
-
|
|
666
|
-
|
|
1357
|
+
U,
|
|
1358
|
+
oe,
|
|
667
1359
|
x,
|
|
668
|
-
|
|
669
|
-
]),
|
|
670
|
-
id:
|
|
1360
|
+
ae
|
|
1361
|
+
]), W = l(() => ({
|
|
1362
|
+
id: z.id,
|
|
671
1363
|
open: A,
|
|
672
|
-
restoreFocus:
|
|
1364
|
+
restoreFocus: ae
|
|
673
1365
|
}), [
|
|
674
|
-
|
|
1366
|
+
z.id,
|
|
675
1367
|
A,
|
|
676
|
-
|
|
677
|
-
]),
|
|
678
|
-
className:
|
|
1368
|
+
ae
|
|
1369
|
+
]), le = /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h("div", {
|
|
1370
|
+
className: Gt.base.header,
|
|
679
1371
|
children: [/* @__PURE__ */ m("h2", {
|
|
680
|
-
className:
|
|
1372
|
+
className: Gt.base.title,
|
|
681
1373
|
children: _
|
|
682
1374
|
}), /* @__PURE__ */ m("span", {
|
|
683
1375
|
lang: y("close"),
|
|
684
|
-
children: /* @__PURE__ */ m(
|
|
685
|
-
onAction: () =>
|
|
1376
|
+
children: /* @__PURE__ */ m(He, {
|
|
1377
|
+
onAction: () => B(!1),
|
|
686
1378
|
variant: "quiet",
|
|
687
1379
|
children: b.close
|
|
688
1380
|
})
|
|
689
1381
|
})]
|
|
690
|
-
}), e] }),
|
|
691
|
-
value:
|
|
1382
|
+
}), e] }), ue = /* @__PURE__ */ m($e, {
|
|
1383
|
+
value: W,
|
|
692
1384
|
children: x ? /* @__PURE__ */ m("section", {
|
|
693
1385
|
"aria-label": _,
|
|
694
|
-
className:
|
|
695
|
-
id:
|
|
1386
|
+
className: Gt.base.content,
|
|
1387
|
+
id: z.id,
|
|
696
1388
|
onBlur: (e) => {
|
|
697
|
-
if (
|
|
1389
|
+
if (F.current) {
|
|
698
1390
|
e.stopPropagation();
|
|
699
1391
|
return;
|
|
700
1392
|
}
|
|
701
1393
|
let { relatedTarget: t } = e;
|
|
702
|
-
r === "popover" && n &&
|
|
1394
|
+
r === "popover" && n && z.topmost && qt(t) && !e.currentTarget.contains(t) && !j.current?.contains(t) && (R.current = t);
|
|
703
1395
|
},
|
|
704
|
-
ref:
|
|
1396
|
+
ref: ce,
|
|
705
1397
|
role: "dialog",
|
|
706
1398
|
tabIndex: -1,
|
|
707
|
-
children:
|
|
708
|
-
}) : /* @__PURE__ */ m(
|
|
1399
|
+
children: le
|
|
1400
|
+
}) : /* @__PURE__ */ m(ge, {
|
|
709
1401
|
"aria-label": _,
|
|
710
|
-
className:
|
|
711
|
-
id:
|
|
712
|
-
ref:
|
|
713
|
-
children:
|
|
1402
|
+
className: Gt.base.content,
|
|
1403
|
+
id: z.id,
|
|
1404
|
+
ref: ce,
|
|
1405
|
+
children: le
|
|
714
1406
|
})
|
|
715
1407
|
});
|
|
716
|
-
return /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(
|
|
717
|
-
"aria-controls": A ?
|
|
1408
|
+
return /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(He, {
|
|
1409
|
+
"aria-controls": A ? z.id : void 0,
|
|
718
1410
|
"aria-expanded": A,
|
|
719
1411
|
"aria-haspopup": "dialog",
|
|
720
|
-
onAction: () =>
|
|
1412
|
+
onAction: () => B(!x || !A),
|
|
721
1413
|
ref: j,
|
|
722
1414
|
children: v
|
|
723
1415
|
}), S && w && (x ? /* @__PURE__ */ m(ee, {
|
|
724
|
-
className:
|
|
1416
|
+
className: Gt.variant[r],
|
|
725
1417
|
"data-breeze-overlay": r,
|
|
726
|
-
"data-breeze-topmost":
|
|
727
|
-
"data-breeze-interactive":
|
|
728
|
-
inert: !
|
|
1418
|
+
"data-breeze-topmost": z.topmost,
|
|
1419
|
+
"data-breeze-interactive": z.interactive,
|
|
1420
|
+
inert: !z.interactive,
|
|
729
1421
|
isNonModal: !0,
|
|
730
1422
|
isOpen: A,
|
|
731
|
-
isKeyboardDismissDisabled: !n || !
|
|
732
|
-
onOpenChange:
|
|
1423
|
+
isKeyboardDismissDisabled: !n || !z.topmost,
|
|
1424
|
+
onOpenChange: B,
|
|
733
1425
|
placement: g,
|
|
734
|
-
ref:
|
|
735
|
-
shouldCloseOnInteractOutside: (e) => r === "popover" && n &&
|
|
736
|
-
style: { zIndex:
|
|
737
|
-
triggerRef:
|
|
738
|
-
children:
|
|
739
|
-
}) : /* @__PURE__ */ m(
|
|
1426
|
+
ref: M,
|
|
1427
|
+
shouldCloseOnInteractOutside: (e) => r === "popover" && n && z.topmost && !j.current?.contains(e),
|
|
1428
|
+
style: { zIndex: z.zIndex },
|
|
1429
|
+
triggerRef: ie,
|
|
1430
|
+
children: ue
|
|
1431
|
+
}) : /* @__PURE__ */ m(ve, {
|
|
740
1432
|
className: "breeze-overlay-backdrop",
|
|
741
1433
|
"data-breeze-overlay": r,
|
|
742
|
-
"data-breeze-scrim":
|
|
743
|
-
"data-breeze-topmost":
|
|
744
|
-
"data-breeze-interactive":
|
|
745
|
-
inert: !
|
|
746
|
-
isDismissable: n &&
|
|
747
|
-
isKeyboardDismissDisabled: !n || !
|
|
1434
|
+
"data-breeze-scrim": z.scrim,
|
|
1435
|
+
"data-breeze-topmost": z.topmost,
|
|
1436
|
+
"data-breeze-interactive": z.interactive,
|
|
1437
|
+
inert: !z.interactive,
|
|
1438
|
+
isDismissable: n && z.topmost,
|
|
1439
|
+
isKeyboardDismissDisabled: !n || !z.topmost,
|
|
748
1440
|
isOpen: A,
|
|
749
|
-
onOpenChange:
|
|
750
|
-
shouldCloseOnInteractOutside: (e) =>
|
|
751
|
-
style: { zIndex:
|
|
752
|
-
children: /* @__PURE__ */ m(
|
|
753
|
-
className:
|
|
754
|
-
children:
|
|
1441
|
+
onOpenChange: B,
|
|
1442
|
+
shouldCloseOnInteractOutside: (e) => z.topmost && Jt(e),
|
|
1443
|
+
style: { zIndex: z.zIndex },
|
|
1444
|
+
children: /* @__PURE__ */ m(_e, {
|
|
1445
|
+
className: Gt.variant[r],
|
|
1446
|
+
children: ue
|
|
755
1447
|
})
|
|
756
1448
|
}))] });
|
|
757
1449
|
}
|
|
758
1450
|
//#endregion
|
|
759
1451
|
//#region src/primitives/Dialog/Dialog.tsx
|
|
760
|
-
function
|
|
761
|
-
return /* @__PURE__ */ m(
|
|
1452
|
+
function Xt({ children: e, defaultOpen: t, dismissible: n, onOpenChange: r, open: i, title: a, trigger: o }) {
|
|
1453
|
+
return /* @__PURE__ */ m(Yt, {
|
|
762
1454
|
defaultOpen: t,
|
|
763
1455
|
dismissible: n,
|
|
764
1456
|
onOpenChange: r,
|
|
@@ -771,8 +1463,8 @@ function Qe({ children: e, defaultOpen: t, dismissible: n, onOpenChange: r, open
|
|
|
771
1463
|
}
|
|
772
1464
|
//#endregion
|
|
773
1465
|
//#region src/primitives/Drawer/Drawer.tsx
|
|
774
|
-
function
|
|
775
|
-
return /* @__PURE__ */ m(
|
|
1466
|
+
function Zt({ children: e, defaultOpen: t, dismissible: n, onOpenChange: r, open: i, title: a, trigger: o }) {
|
|
1467
|
+
return /* @__PURE__ */ m(Yt, {
|
|
776
1468
|
defaultOpen: t,
|
|
777
1469
|
dismissible: n,
|
|
778
1470
|
onOpenChange: r,
|
|
@@ -785,7 +1477,7 @@ function $e({ children: e, defaultOpen: t, dismissible: n, onOpenChange: r, open
|
|
|
785
1477
|
}
|
|
786
1478
|
//#endregion
|
|
787
1479
|
//#region src/primitives/Grid/Grid.tsx
|
|
788
|
-
var
|
|
1480
|
+
var Qt = {
|
|
789
1481
|
base: { grid: "breeze:grid breeze:min-inline-size-0" },
|
|
790
1482
|
compound: { columns: {
|
|
791
1483
|
1: {
|
|
@@ -821,80 +1513,21 @@ var et = {
|
|
|
821
1513
|
state: {},
|
|
822
1514
|
variant: {}
|
|
823
1515
|
};
|
|
824
|
-
function
|
|
825
|
-
let { accessibleLabel: s, role: c } =
|
|
1516
|
+
function $t({ "aria-label": e, children: t, collapseBelow: n = "md", columns: i = 2, element: a = "div", gap: o = 4 }) {
|
|
1517
|
+
let { accessibleLabel: s, role: c } = Ue(e, a);
|
|
826
1518
|
return r(a, {
|
|
827
1519
|
"aria-label": s,
|
|
828
1520
|
className: [
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
1521
|
+
Qt.base.grid,
|
|
1522
|
+
Qt.compound.columns[i][n],
|
|
1523
|
+
Qt.size[o]
|
|
832
1524
|
].join(" "),
|
|
833
1525
|
role: c
|
|
834
1526
|
}, t);
|
|
835
1527
|
}
|
|
836
1528
|
//#endregion
|
|
837
|
-
//#region src/primitives/Icon/Icon.tsx
|
|
838
|
-
var nt = {
|
|
839
|
-
add: fe,
|
|
840
|
-
back: ce,
|
|
841
|
-
building: j,
|
|
842
|
-
calendar: ie,
|
|
843
|
-
camera: ae,
|
|
844
|
-
check: oe,
|
|
845
|
-
clock: N,
|
|
846
|
-
close: he,
|
|
847
|
-
delete: z,
|
|
848
|
-
document: le,
|
|
849
|
-
download: P,
|
|
850
|
-
expand: se,
|
|
851
|
-
forward: M,
|
|
852
|
-
lock: L,
|
|
853
|
-
money: I,
|
|
854
|
-
moneyIn: O,
|
|
855
|
-
moneyOut: k,
|
|
856
|
-
more: F,
|
|
857
|
-
next: M,
|
|
858
|
-
notifications: A,
|
|
859
|
-
overview: ue,
|
|
860
|
-
people: me,
|
|
861
|
-
settings: R,
|
|
862
|
-
signOut: de,
|
|
863
|
-
upload: pe,
|
|
864
|
-
warning: B
|
|
865
|
-
}, rt = {
|
|
866
|
-
base: { icon: "breeze:block breeze:shrink-0" },
|
|
867
|
-
compound: {},
|
|
868
|
-
size: {
|
|
869
|
-
lg: "breeze:block-size-breeze-6 breeze:inline-size-breeze-6",
|
|
870
|
-
md: "breeze:block-size-breeze-5 breeze:inline-size-breeze-5",
|
|
871
|
-
sm: "breeze:block-size-breeze-4 breeze:inline-size-breeze-4"
|
|
872
|
-
},
|
|
873
|
-
state: { logicalDirection: "breeze:rtl:rotate-180" },
|
|
874
|
-
variant: {}
|
|
875
|
-
}, it = /* @__PURE__ */ new Set([
|
|
876
|
-
"back",
|
|
877
|
-
"forward",
|
|
878
|
-
"next"
|
|
879
|
-
]);
|
|
880
|
-
function at({ label: e, name: t, size: n = "md" }) {
|
|
881
|
-
let r = nt[t], i = e?.trim() || void 0;
|
|
882
|
-
return /* @__PURE__ */ m(r, {
|
|
883
|
-
"aria-hidden": i === void 0 || void 0,
|
|
884
|
-
"aria-label": i,
|
|
885
|
-
className: [
|
|
886
|
-
rt.base.icon,
|
|
887
|
-
rt.size[n],
|
|
888
|
-
it.has(t) && rt.state.logicalDirection
|
|
889
|
-
].filter(Boolean).join(" "),
|
|
890
|
-
focusable: "false",
|
|
891
|
-
role: i === void 0 ? void 0 : "img",
|
|
892
|
-
strokeWidth: 1.75
|
|
893
|
-
});
|
|
894
|
-
}
|
|
895
|
-
//#endregion
|
|
896
1529
|
//#region src/primitives/IconTile/IconTile.tsx
|
|
897
|
-
var
|
|
1530
|
+
var en = {
|
|
898
1531
|
base: { tile: "breeze:inline-flex breeze:shrink-0 breeze:items-center breeze:justify-center" },
|
|
899
1532
|
compound: {},
|
|
900
1533
|
size: {
|
|
@@ -916,15 +1549,15 @@ var ot = {
|
|
|
916
1549
|
}
|
|
917
1550
|
}
|
|
918
1551
|
};
|
|
919
|
-
function
|
|
1552
|
+
function tn({ label: e, name: t, shape: n = "square", size: r = "lg", tone: i = "brand" }) {
|
|
920
1553
|
return /* @__PURE__ */ m("span", {
|
|
921
1554
|
className: [
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
1555
|
+
en.base.tile,
|
|
1556
|
+
en.variant.tone[i],
|
|
1557
|
+
en.variant.shape[n],
|
|
1558
|
+
en.size[r]
|
|
926
1559
|
].join(" "),
|
|
927
|
-
children: /* @__PURE__ */ m(
|
|
1560
|
+
children: /* @__PURE__ */ m(dt, {
|
|
928
1561
|
label: e,
|
|
929
1562
|
name: t,
|
|
930
1563
|
size: r === "lg" ? "md" : "sm"
|
|
@@ -933,7 +1566,7 @@ function st({ label: e, name: t, shape: n = "square", size: r = "lg", tone: i =
|
|
|
933
1566
|
}
|
|
934
1567
|
//#endregion
|
|
935
1568
|
//#region src/primitives/Inline/Inline.tsx
|
|
936
|
-
var
|
|
1569
|
+
var nn = {
|
|
937
1570
|
base: { inline: "breeze:flex breeze:min-inline-size-0" },
|
|
938
1571
|
compound: {},
|
|
939
1572
|
size: {
|
|
@@ -963,23 +1596,23 @@ var ct = {
|
|
|
963
1596
|
}
|
|
964
1597
|
}
|
|
965
1598
|
};
|
|
966
|
-
function
|
|
967
|
-
let { accessibleLabel: c, role: l } =
|
|
1599
|
+
function rn({ "aria-label": e, children: t, element: n = "div", gap: i = 3, justify: a = "start", verticalAlign: o = "center", wrap: s = !1 }) {
|
|
1600
|
+
let { accessibleLabel: c, role: l } = Ue(e, n);
|
|
968
1601
|
return r(n, {
|
|
969
1602
|
"aria-label": c,
|
|
970
1603
|
className: [
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
s &&
|
|
1604
|
+
nn.base.inline,
|
|
1605
|
+
nn.variant.align[o],
|
|
1606
|
+
nn.variant.justify[a],
|
|
1607
|
+
nn.size[i],
|
|
1608
|
+
s && nn.state.wrap
|
|
976
1609
|
].filter(Boolean).join(" "),
|
|
977
1610
|
role: l
|
|
978
1611
|
}, t);
|
|
979
1612
|
}
|
|
980
1613
|
//#endregion
|
|
981
1614
|
//#region src/primitives/NumberField/NumberField.tsx
|
|
982
|
-
var
|
|
1615
|
+
var $ = {
|
|
983
1616
|
base: {
|
|
984
1617
|
group: "breeze:relative breeze:inline-flex breeze:min-block-breeze-md breeze:min-inline-size-0 breeze:inline-size-full breeze:items-stretch breeze:overflow-hidden breeze:rounded-breeze-ctl breeze:border breeze:border-solid breeze:border-breeze-line-strong breeze:bg-breeze-surface breeze:has-[input[data-focus-visible]]:outline-2 breeze:has-[input[data-focus-visible]]:outline-solid breeze:has-[input[data-focus-visible]]:outline-breeze-brand breeze:has-[input[data-invalid]]:border-breeze-danger breeze:data-[disabled]:cursor-not-allowed breeze:data-[disabled]:bg-breeze-sunken",
|
|
985
1618
|
input: "breeze:min-block-breeze-md breeze:min-inline-size-0 breeze:flex-1 breeze:border-0 breeze:rounded-none breeze:bg-transparent breeze:tabular-nums breeze:outline-none breeze:placeholder:text-breeze-ink-3 breeze:data-[hovered]:border-transparent breeze:data-[focus-visible]:!outline-none breeze:data-[invalid]:border-transparent breeze:disabled:cursor-not-allowed breeze:read-only:cursor-default",
|
|
@@ -996,17 +1629,17 @@ var Z = {
|
|
|
996
1629
|
},
|
|
997
1630
|
variant: {}
|
|
998
1631
|
};
|
|
999
|
-
function
|
|
1000
|
-
let { messages: T } =
|
|
1001
|
-
return /* @__PURE__ */ h(
|
|
1632
|
+
function an({ autoComplete: e, autoFocus: t, defaultValue: n, description: i, disabled: a = !1, error: o, form: s, formatOptions: c, id: l, label: u, loading: d = !1, maxValue: f, minValue: p, name: _, onChange: v, placeholder: y, readOnly: b = !1, ref: x, required: S = !1, step: C, value: w }) {
|
|
1633
|
+
let { messages: T } = q(), E = i?.trim() || void 0, D = o?.trim() || void 0, A = a || d;
|
|
1634
|
+
return /* @__PURE__ */ h(ye, {
|
|
1002
1635
|
autoFocus: t,
|
|
1003
1636
|
"aria-label": d ? u : void 0,
|
|
1004
|
-
className:
|
|
1637
|
+
className: X.base.root,
|
|
1005
1638
|
defaultValue: n,
|
|
1006
1639
|
form: s,
|
|
1007
1640
|
formatOptions: c,
|
|
1008
1641
|
id: l,
|
|
1009
|
-
isDisabled:
|
|
1642
|
+
isDisabled: A,
|
|
1010
1643
|
isInvalid: !d && D !== void 0,
|
|
1011
1644
|
isReadOnly: b,
|
|
1012
1645
|
isRequired: S,
|
|
@@ -1018,23 +1651,23 @@ function ut({ autoComplete: e, autoFocus: t, defaultValue: n, description: i, di
|
|
|
1018
1651
|
validationBehavior: "aria",
|
|
1019
1652
|
value: w,
|
|
1020
1653
|
children: [
|
|
1021
|
-
/* @__PURE__ */ m(
|
|
1654
|
+
/* @__PURE__ */ m(Ke, {
|
|
1022
1655
|
label: u,
|
|
1023
1656
|
loading: d
|
|
1024
1657
|
}),
|
|
1025
|
-
/* @__PURE__ */ h(
|
|
1026
|
-
className:
|
|
1658
|
+
/* @__PURE__ */ h(O, {
|
|
1659
|
+
className: Z($.base.group, b && !d && $.state.readOnlyGroup, d && $.state.loadingGroup),
|
|
1027
1660
|
children: [
|
|
1028
|
-
/* @__PURE__ */ m(
|
|
1661
|
+
/* @__PURE__ */ m(k, {
|
|
1029
1662
|
"aria-busy": d || void 0,
|
|
1030
|
-
className:
|
|
1663
|
+
className: Z(X.base.input, $.base.input, d && $.state.loadingInput),
|
|
1031
1664
|
autoComplete: e,
|
|
1032
1665
|
placeholder: y,
|
|
1033
1666
|
form: s,
|
|
1034
1667
|
ref: x
|
|
1035
1668
|
}),
|
|
1036
1669
|
/* @__PURE__ */ m(g, {
|
|
1037
|
-
className:
|
|
1670
|
+
className: Z($.base.stepButton, d && $.state.loadingStepButton),
|
|
1038
1671
|
render: (e) => r("button", {
|
|
1039
1672
|
...e,
|
|
1040
1673
|
"aria-hidden": d || void 0,
|
|
@@ -1045,7 +1678,7 @@ function ut({ autoComplete: e, autoFocus: t, defaultValue: n, description: i, di
|
|
|
1045
1678
|
children: "−"
|
|
1046
1679
|
}),
|
|
1047
1680
|
/* @__PURE__ */ m(g, {
|
|
1048
|
-
className:
|
|
1681
|
+
className: Z($.base.stepButton, d && $.state.loadingStepButton),
|
|
1049
1682
|
render: (e) => r("button", {
|
|
1050
1683
|
...e,
|
|
1051
1684
|
"aria-hidden": d || void 0,
|
|
@@ -1056,8 +1689,8 @@ function ut({ autoComplete: e, autoFocus: t, defaultValue: n, description: i, di
|
|
|
1056
1689
|
children: "+"
|
|
1057
1690
|
}),
|
|
1058
1691
|
d && /* @__PURE__ */ m("span", {
|
|
1059
|
-
className:
|
|
1060
|
-
children: /* @__PURE__ */ m(
|
|
1692
|
+
className: $.base.skeleton,
|
|
1693
|
+
children: /* @__PURE__ */ m(J, {
|
|
1061
1694
|
blockSize: "100%",
|
|
1062
1695
|
inlineSize: "100%",
|
|
1063
1696
|
label: T.loading,
|
|
@@ -1066,7 +1699,7 @@ function ut({ autoComplete: e, autoFocus: t, defaultValue: n, description: i, di
|
|
|
1066
1699
|
})
|
|
1067
1700
|
]
|
|
1068
1701
|
}),
|
|
1069
|
-
/* @__PURE__ */ m(
|
|
1702
|
+
/* @__PURE__ */ m(qe, {
|
|
1070
1703
|
description: E,
|
|
1071
1704
|
error: D,
|
|
1072
1705
|
loading: d
|
|
@@ -1076,8 +1709,8 @@ function ut({ autoComplete: e, autoFocus: t, defaultValue: n, description: i, di
|
|
|
1076
1709
|
}
|
|
1077
1710
|
//#endregion
|
|
1078
1711
|
//#region src/primitives/Popover/Popover.tsx
|
|
1079
|
-
function
|
|
1080
|
-
return /* @__PURE__ */ m(
|
|
1712
|
+
function on({ children: e, defaultOpen: t, dismissible: n, onOpenChange: r, open: i, title: a, trigger: o, placement: s }) {
|
|
1713
|
+
return /* @__PURE__ */ m(Yt, {
|
|
1081
1714
|
defaultOpen: t,
|
|
1082
1715
|
dismissible: n,
|
|
1083
1716
|
onOpenChange: r,
|
|
@@ -1090,8 +1723,347 @@ function dt({ children: e, defaultOpen: t, dismissible: n, onOpenChange: r, open
|
|
|
1090
1723
|
});
|
|
1091
1724
|
}
|
|
1092
1725
|
//#endregion
|
|
1726
|
+
//#region src/primitives/Select/Select.tsx
|
|
1727
|
+
var sn = {
|
|
1728
|
+
base: { trigger: "breeze:flex breeze:min-block-breeze-md breeze:any-pointer-coarse:min-block-breeze-tap breeze:min-inline-size-0 breeze:inline-size-full breeze:items-center breeze:justify-between breeze:rounded-breeze-ctl breeze:border breeze:border-solid breeze:border-breeze-line-strong breeze:bg-breeze-surface breeze:ps-breeze-3 breeze:pe-breeze-3 breeze:py-breeze-2 breeze:font-breeze-sans breeze:text-breeze-sm breeze:text-breeze-ink breeze:outline-offset-2 breeze:data-[hovered]:border-breeze-brand breeze:data-[focus-visible]:outline-2 breeze:data-[focus-visible]:outline-solid breeze:data-[focus-visible]:outline-breeze-brand breeze:data-[invalid]:border-breeze-danger breeze:disabled:cursor-not-allowed breeze:disabled:bg-breeze-sunken breeze:disabled:opacity-60" },
|
|
1729
|
+
compound: {},
|
|
1730
|
+
size: {},
|
|
1731
|
+
state: { readOnlyTrigger: "breeze:cursor-default breeze:bg-breeze-sunken" },
|
|
1732
|
+
variant: {}
|
|
1733
|
+
}, cn = (() => null);
|
|
1734
|
+
cn.getCollectionNode = function* ({ id: e, item: t, ...n }) {
|
|
1735
|
+
yield {
|
|
1736
|
+
key: e,
|
|
1737
|
+
props: {
|
|
1738
|
+
...n,
|
|
1739
|
+
id: e,
|
|
1740
|
+
item: t
|
|
1741
|
+
},
|
|
1742
|
+
rendered: n.children,
|
|
1743
|
+
textValue: n.textValue,
|
|
1744
|
+
type: "item",
|
|
1745
|
+
value: t
|
|
1746
|
+
};
|
|
1747
|
+
};
|
|
1748
|
+
function ln(e, t, n) {
|
|
1749
|
+
if (t === null) return;
|
|
1750
|
+
let r = n(t).id;
|
|
1751
|
+
return e.find(({ descriptor: e, item: n }) => n === t || e.id === r);
|
|
1752
|
+
}
|
|
1753
|
+
function un(e, t) {
|
|
1754
|
+
let n = e.filter(({ descriptor: e }) => !e.disabled && (e.id === t || e.label === t));
|
|
1755
|
+
return n.length === 1 ? n[0] : void 0;
|
|
1756
|
+
}
|
|
1757
|
+
function dn(e, t, n) {
|
|
1758
|
+
return e == null ? e : t.find(({ descriptor: t }) => t.id === e.descriptor.id) ?? (n ? e : null);
|
|
1759
|
+
}
|
|
1760
|
+
function fn(e, t) {
|
|
1761
|
+
if (e !== void 0) return e === null ? null : {
|
|
1762
|
+
descriptor: t(e),
|
|
1763
|
+
item: e
|
|
1764
|
+
};
|
|
1765
|
+
}
|
|
1766
|
+
function pn(e, t) {
|
|
1767
|
+
if (e !== void 0) return e === null ? null : t(e).id;
|
|
1768
|
+
}
|
|
1769
|
+
function mn(e, t, n) {
|
|
1770
|
+
if (!e) return Array.from(new Set([t, n].filter((e) => !!e).flatMap((e) => e.split(" ")))).join(" ") || void 0;
|
|
1771
|
+
}
|
|
1772
|
+
function hn(e, t, n, r, i, a) {
|
|
1773
|
+
let o = a;
|
|
1774
|
+
if (t) {
|
|
1775
|
+
o.current && (o.current.value = String(r ?? ""));
|
|
1776
|
+
return;
|
|
1777
|
+
}
|
|
1778
|
+
let s = un(n, e);
|
|
1779
|
+
if (!s) {
|
|
1780
|
+
o.current && (o.current.value = String(r ?? ""));
|
|
1781
|
+
return;
|
|
1782
|
+
}
|
|
1783
|
+
let c = s.descriptor.id;
|
|
1784
|
+
r !== c && i(c);
|
|
1785
|
+
}
|
|
1786
|
+
function gn({ decoratedItems: e, initialDefaultValueRef: t, isControlled: n, loading: r, pendingDefaultValueRef: i, state: a, suppressOnChangeRef: o }) {
|
|
1787
|
+
let s = i, l = t, u = o;
|
|
1788
|
+
c(() => {
|
|
1789
|
+
let t = s.current, i = e.some(({ descriptor: e }) => e.id === t);
|
|
1790
|
+
if (!r && t !== null && !i) {
|
|
1791
|
+
s.current = null, l.current === t && (l.current = null);
|
|
1792
|
+
return;
|
|
1793
|
+
}
|
|
1794
|
+
if (!(n || a.value !== null || t === null || !i)) {
|
|
1795
|
+
s.current = null, u.current = !0;
|
|
1796
|
+
try {
|
|
1797
|
+
a.setValue(t);
|
|
1798
|
+
} finally {
|
|
1799
|
+
u.current = !1;
|
|
1800
|
+
}
|
|
1801
|
+
}
|
|
1802
|
+
}, [
|
|
1803
|
+
e,
|
|
1804
|
+
l,
|
|
1805
|
+
n,
|
|
1806
|
+
r,
|
|
1807
|
+
s,
|
|
1808
|
+
a,
|
|
1809
|
+
u
|
|
1810
|
+
]), c(() => {
|
|
1811
|
+
!n && !r && a.value !== null && !e.some(({ descriptor: e }) => e.id === a.value) && a.setValue(null);
|
|
1812
|
+
}, [
|
|
1813
|
+
e,
|
|
1814
|
+
n,
|
|
1815
|
+
r,
|
|
1816
|
+
a
|
|
1817
|
+
]);
|
|
1818
|
+
}
|
|
1819
|
+
function _n({ controlledResetItemRef: e, controlledResetValueKeyRef: t, form: n, isControlled: r, onChangeRef: i, resetValueRef: a, setStateValueRef: o, suppressOnChangeRef: s, triggerRef: l }) {
|
|
1820
|
+
let u = s;
|
|
1821
|
+
c(() => {
|
|
1822
|
+
let s = !0, c = (c) => {
|
|
1823
|
+
let d = n ? document.getElementById(n) : l.current?.form;
|
|
1824
|
+
!(d instanceof HTMLFormElement) || c.target !== d || (N(() => void 0), !(!s || c.defaultPrevented) && N(() => {
|
|
1825
|
+
if (r) {
|
|
1826
|
+
let n = e.current, r = t.current, a;
|
|
1827
|
+
a = n === void 0 ? void 0 : n === null ? null : n.descriptor.id, r !== a && i.current?.(n?.item ?? null);
|
|
1828
|
+
return;
|
|
1829
|
+
}
|
|
1830
|
+
u.current = !0;
|
|
1831
|
+
try {
|
|
1832
|
+
o.current(a.current);
|
|
1833
|
+
} finally {
|
|
1834
|
+
u.current = !1;
|
|
1835
|
+
}
|
|
1836
|
+
}));
|
|
1837
|
+
};
|
|
1838
|
+
return document.addEventListener("reset", c), () => {
|
|
1839
|
+
s = !1, document.removeEventListener("reset", c);
|
|
1840
|
+
};
|
|
1841
|
+
}, [
|
|
1842
|
+
e,
|
|
1843
|
+
t,
|
|
1844
|
+
n,
|
|
1845
|
+
r,
|
|
1846
|
+
i,
|
|
1847
|
+
a,
|
|
1848
|
+
o,
|
|
1849
|
+
u,
|
|
1850
|
+
l
|
|
1851
|
+
]);
|
|
1852
|
+
}
|
|
1853
|
+
function vn({ node: e, state: t }) {
|
|
1854
|
+
let n = u(null), { value: r } = e, { optionProps: i, isDisabled: a, isFocused: o, isFocusVisible: s, isSelected: c } = Te({
|
|
1855
|
+
isDisabled: r?.descriptor.disabled,
|
|
1856
|
+
key: e.key
|
|
1857
|
+
}, t, n), { hoverProps: l, isHovered: d } = Ce({ isDisabled: a });
|
|
1858
|
+
return r ? /* @__PURE__ */ m("div", {
|
|
1859
|
+
...be(i, l),
|
|
1860
|
+
ref: n,
|
|
1861
|
+
className: Q.base.item,
|
|
1862
|
+
"data-disabled": a || void 0,
|
|
1863
|
+
"data-focused": o || void 0,
|
|
1864
|
+
"data-focus-visible": s || void 0,
|
|
1865
|
+
"data-hovered": d || void 0,
|
|
1866
|
+
"data-selected": c || void 0,
|
|
1867
|
+
children: /* @__PURE__ */ m(ft, {
|
|
1868
|
+
descriptor: r.descriptor,
|
|
1869
|
+
isSelected: c
|
|
1870
|
+
})
|
|
1871
|
+
}) : null;
|
|
1872
|
+
}
|
|
1873
|
+
function yn({ menuProps: e, state: t }) {
|
|
1874
|
+
let n = u(null), { listBoxProps: r } = we(e, t, n), i = Array.from(t.collection.getKeys());
|
|
1875
|
+
return /* @__PURE__ */ m("div", {
|
|
1876
|
+
...r,
|
|
1877
|
+
className: Q.base.listBox,
|
|
1878
|
+
ref: n,
|
|
1879
|
+
children: i.map((e) => {
|
|
1880
|
+
let n = t.collection.getItem(e);
|
|
1881
|
+
return n ? /* @__PURE__ */ m(vn, {
|
|
1882
|
+
node: n,
|
|
1883
|
+
state: t
|
|
1884
|
+
}, String(e)) : null;
|
|
1885
|
+
})
|
|
1886
|
+
});
|
|
1887
|
+
}
|
|
1888
|
+
function bn({ autoComplete: e, autoFocus: t, defaultValue: n, description: r, disabled: i = !1, error: a, form: o, getItem: f, id: p, items: g, label: _, loading: v = !1, name: y, onChange: b, placeholder: x, readOnly: S = !1, required: C = !1, value: w }) {
|
|
1889
|
+
let { messages: T } = q(), { visuallyHiddenProps: E } = De({ style: {
|
|
1890
|
+
left: 0,
|
|
1891
|
+
position: "fixed",
|
|
1892
|
+
top: 0
|
|
1893
|
+
} }), D = r?.trim() || void 0, O = a?.trim() || void 0, k = i || v, A = k || S, j = s(), M = p ?? `${j}-control`, N = `${j}-label`, ee = `${j}-description`, P = `${j}-error`, te = [D && ee, O && P].filter(Boolean).join(" ") || void 0, F = u(null), ne = u(null), I = l(() => g.map((e) => ({
|
|
1894
|
+
descriptor: f(e),
|
|
1895
|
+
item: e
|
|
1896
|
+
})), [f, g]), L = w !== void 0, [R] = d(() => fn(w, f)), re = ln(I, w ?? null, f), ie = ln(I, n ?? null, f), z = u(v && n != null && ie === void 0 ? f(n).id : null), B = L ? re?.descriptor.id ?? null : void 0, V = ie?.descriptor.id ?? null, H = u(V ?? z.current), ae = I.some(({ descriptor: e }) => e.id === H.current), U = v || ae ? H.current : null, oe = u(U), se = pn(w, f), ce = dn(R, I, v), W = u(se), le = u(ce), ue = u(b), G = u(!1), K = Oe({
|
|
1897
|
+
children: l(() => I.map(({ descriptor: e, item: t }) => /* @__PURE__ */ m(cn, {
|
|
1898
|
+
id: e.id,
|
|
1899
|
+
item: {
|
|
1900
|
+
descriptor: e,
|
|
1901
|
+
item: t
|
|
1902
|
+
},
|
|
1903
|
+
isDisabled: e.disabled,
|
|
1904
|
+
textValue: e.label,
|
|
1905
|
+
children: e.label
|
|
1906
|
+
}, e.id)), [I]),
|
|
1907
|
+
defaultValue: V,
|
|
1908
|
+
isDisabled: A,
|
|
1909
|
+
isInvalid: !v && O !== void 0,
|
|
1910
|
+
isRequired: C,
|
|
1911
|
+
items: I,
|
|
1912
|
+
onChange: (e) => {
|
|
1913
|
+
if (G.current) return;
|
|
1914
|
+
if (z.current = null, e === null) {
|
|
1915
|
+
b?.(null);
|
|
1916
|
+
return;
|
|
1917
|
+
}
|
|
1918
|
+
let t = I.find((t) => t.descriptor.id === e);
|
|
1919
|
+
b?.(t?.item ?? null);
|
|
1920
|
+
},
|
|
1921
|
+
shouldCloseOnSelect: !0,
|
|
1922
|
+
validationBehavior: "aria",
|
|
1923
|
+
value: B
|
|
1924
|
+
}), de = u((e) => K.setValue(e)), { menuProps: fe, triggerProps: pe, valueProps: me } = Ee({
|
|
1925
|
+
"aria-describedby": te,
|
|
1926
|
+
"aria-label": v ? _ : void 0,
|
|
1927
|
+
"aria-labelledby": N,
|
|
1928
|
+
autoComplete: e,
|
|
1929
|
+
form: o,
|
|
1930
|
+
isDisabled: A,
|
|
1931
|
+
isInvalid: !v && O !== void 0,
|
|
1932
|
+
isRequired: C,
|
|
1933
|
+
name: y,
|
|
1934
|
+
validationBehavior: "aria",
|
|
1935
|
+
value: K.value
|
|
1936
|
+
}, K, F), { buttonProps: he } = xe(pe, F), { focusProps: ge, isFocusVisible: _e } = Se(), { hoverProps: ve, isHovered: ye } = Ce({ isDisabled: k }), we = !v && O !== void 0, Te = (e) => hn(e, S, I, K.value, (e) => K.setValue(e), ne), ke = mn(v, he["aria-labelledby"], me.id);
|
|
1937
|
+
return c(() => {
|
|
1938
|
+
oe.current = U, de.current = (e) => K.setValue(e), W.current = se, le.current = ce, ue.current = b;
|
|
1939
|
+
}, [
|
|
1940
|
+
ce,
|
|
1941
|
+
se,
|
|
1942
|
+
b,
|
|
1943
|
+
U,
|
|
1944
|
+
K
|
|
1945
|
+
]), c(() => {
|
|
1946
|
+
(I.length === 0 || A) && K.isOpen && K.setOpen(!1);
|
|
1947
|
+
}, [
|
|
1948
|
+
I.length,
|
|
1949
|
+
K,
|
|
1950
|
+
A
|
|
1951
|
+
]), gn({
|
|
1952
|
+
decoratedItems: I,
|
|
1953
|
+
initialDefaultValueRef: H,
|
|
1954
|
+
isControlled: L,
|
|
1955
|
+
loading: v,
|
|
1956
|
+
pendingDefaultValueRef: z,
|
|
1957
|
+
state: K,
|
|
1958
|
+
suppressOnChangeRef: G
|
|
1959
|
+
}), _n({
|
|
1960
|
+
controlledResetItemRef: le,
|
|
1961
|
+
controlledResetValueKeyRef: W,
|
|
1962
|
+
form: o,
|
|
1963
|
+
isControlled: L,
|
|
1964
|
+
onChangeRef: ue,
|
|
1965
|
+
resetValueRef: oe,
|
|
1966
|
+
setStateValueRef: de,
|
|
1967
|
+
suppressOnChangeRef: G,
|
|
1968
|
+
triggerRef: F
|
|
1969
|
+
}), /* @__PURE__ */ h("div", {
|
|
1970
|
+
className: X.base.root,
|
|
1971
|
+
children: [
|
|
1972
|
+
/* @__PURE__ */ m(Ke, {
|
|
1973
|
+
htmlFor: M,
|
|
1974
|
+
id: N,
|
|
1975
|
+
label: _,
|
|
1976
|
+
loading: v
|
|
1977
|
+
}),
|
|
1978
|
+
/* @__PURE__ */ h("div", {
|
|
1979
|
+
className: X.base.control,
|
|
1980
|
+
children: [/* @__PURE__ */ h("button", {
|
|
1981
|
+
type: "button",
|
|
1982
|
+
...be(he, ge, ve),
|
|
1983
|
+
"aria-controls": he["aria-controls"],
|
|
1984
|
+
"aria-busy": v || void 0,
|
|
1985
|
+
"aria-expanded": he["aria-expanded"],
|
|
1986
|
+
"aria-labelledby": ke,
|
|
1987
|
+
"aria-readonly": S || void 0,
|
|
1988
|
+
"aria-required": C || void 0,
|
|
1989
|
+
autoFocus: t,
|
|
1990
|
+
className: Z(sn.base.trigger, S && sn.state.readOnlyTrigger, v && "breeze:!opacity-0"),
|
|
1991
|
+
"data-focus-visible": _e || void 0,
|
|
1992
|
+
"data-hovered": ye || void 0,
|
|
1993
|
+
"data-invalid": we || void 0,
|
|
1994
|
+
disabled: k,
|
|
1995
|
+
form: o,
|
|
1996
|
+
id: M,
|
|
1997
|
+
role: "combobox",
|
|
1998
|
+
ref: F,
|
|
1999
|
+
children: [/* @__PURE__ */ m("span", {
|
|
2000
|
+
...me,
|
|
2001
|
+
className: Z(Q.base.content, "breeze:text-start"),
|
|
2002
|
+
children: K.selectedItems[0]?.textValue ?? x
|
|
2003
|
+
}), /* @__PURE__ */ m(dt, {
|
|
2004
|
+
name: "expand",
|
|
2005
|
+
size: "sm"
|
|
2006
|
+
})]
|
|
2007
|
+
}), v && /* @__PURE__ */ m("span", {
|
|
2008
|
+
className: X.base.skeleton,
|
|
2009
|
+
children: /* @__PURE__ */ m(J, {
|
|
2010
|
+
blockSize: "100%",
|
|
2011
|
+
inlineSize: "100%",
|
|
2012
|
+
label: T.loading,
|
|
2013
|
+
shape: "rectangle"
|
|
2014
|
+
})
|
|
2015
|
+
})]
|
|
2016
|
+
}),
|
|
2017
|
+
(y !== void 0 || e !== void 0) && !k && /* @__PURE__ */ m("div", {
|
|
2018
|
+
...E,
|
|
2019
|
+
"aria-hidden": "true",
|
|
2020
|
+
"data-a11y-ignore": "aria-hidden-focus",
|
|
2021
|
+
"data-react-aria-prevent-focus": !0,
|
|
2022
|
+
children: /* @__PURE__ */ h("label", {
|
|
2023
|
+
htmlFor: `${M}-autofill`,
|
|
2024
|
+
children: [_, /* @__PURE__ */ m("input", {
|
|
2025
|
+
autoComplete: e,
|
|
2026
|
+
form: o,
|
|
2027
|
+
id: `${M}-autofill`,
|
|
2028
|
+
name: y,
|
|
2029
|
+
onChange: (e) => Te(e.currentTarget.value),
|
|
2030
|
+
onInput: (e) => Te(e.currentTarget.value),
|
|
2031
|
+
readOnly: S || void 0,
|
|
2032
|
+
ref: ne,
|
|
2033
|
+
tabIndex: -1,
|
|
2034
|
+
type: "text",
|
|
2035
|
+
value: K.value ?? ""
|
|
2036
|
+
})]
|
|
2037
|
+
})
|
|
2038
|
+
}),
|
|
2039
|
+
/* @__PURE__ */ m(st, {
|
|
2040
|
+
className: Q.base.popover,
|
|
2041
|
+
isOpen: K.isOpen && !A,
|
|
2042
|
+
onOpenChange: (e) => K.setOpen(e),
|
|
2043
|
+
triggerRef: F,
|
|
2044
|
+
children: /* @__PURE__ */ m(yn, {
|
|
2045
|
+
menuProps: fe,
|
|
2046
|
+
state: K
|
|
2047
|
+
})
|
|
2048
|
+
}),
|
|
2049
|
+
/* @__PURE__ */ m(qe, {
|
|
2050
|
+
description: D,
|
|
2051
|
+
descriptionId: ee,
|
|
2052
|
+
error: v ? O : void 0,
|
|
2053
|
+
errorId: P,
|
|
2054
|
+
loading: v
|
|
2055
|
+
}),
|
|
2056
|
+
O && !v && /* @__PURE__ */ m("span", {
|
|
2057
|
+
className: X.base.error,
|
|
2058
|
+
id: P,
|
|
2059
|
+
children: O
|
|
2060
|
+
})
|
|
2061
|
+
]
|
|
2062
|
+
});
|
|
2063
|
+
}
|
|
2064
|
+
//#endregion
|
|
1093
2065
|
//#region src/primitives/Separator/Separator.tsx
|
|
1094
|
-
var
|
|
2066
|
+
var xn = {
|
|
1095
2067
|
base: { separator: "breeze:m-0 breeze:shrink-0 breeze:border-0 breeze:bg-breeze-line breeze:forced-colors:bg-[CanvasText]" },
|
|
1096
2068
|
compound: {},
|
|
1097
2069
|
size: {},
|
|
@@ -1101,15 +2073,15 @@ var ft = {
|
|
|
1101
2073
|
vertical: "breeze:block-size-full breeze:inline-size-breeze-px"
|
|
1102
2074
|
}
|
|
1103
2075
|
};
|
|
1104
|
-
function
|
|
2076
|
+
function Sn({ orientation: e = "horizontal" }) {
|
|
1105
2077
|
return /* @__PURE__ */ m("hr", {
|
|
1106
2078
|
"aria-orientation": e,
|
|
1107
|
-
className: [
|
|
2079
|
+
className: [xn.base.separator, xn.variant[e]].join(" ")
|
|
1108
2080
|
});
|
|
1109
2081
|
}
|
|
1110
2082
|
//#endregion
|
|
1111
2083
|
//#region src/primitives/Stack/Stack.tsx
|
|
1112
|
-
var
|
|
2084
|
+
var Cn = {
|
|
1113
2085
|
base: { stack: "breeze:flex breeze:min-inline-size-0 breeze:flex-col" },
|
|
1114
2086
|
compound: {},
|
|
1115
2087
|
size: {
|
|
@@ -1131,24 +2103,24 @@ var mt = {
|
|
|
1131
2103
|
stretch: "breeze:items-stretch"
|
|
1132
2104
|
}
|
|
1133
2105
|
};
|
|
1134
|
-
function
|
|
1135
|
-
let { accessibleLabel: o, role: s } =
|
|
2106
|
+
function wn({ "aria-label": e, children: t, element: n = "div", gap: i = 3, horizontalAlign: a = "stretch" }) {
|
|
2107
|
+
let { accessibleLabel: o, role: s } = Ue(e, n);
|
|
1136
2108
|
return r(n, {
|
|
1137
2109
|
"aria-label": o,
|
|
1138
2110
|
className: [
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
2111
|
+
Cn.base.stack,
|
|
2112
|
+
Cn.variant[a],
|
|
2113
|
+
Cn.size[i]
|
|
1142
2114
|
].join(" "),
|
|
1143
2115
|
role: s
|
|
1144
2116
|
}, t);
|
|
1145
2117
|
}
|
|
1146
2118
|
//#endregion
|
|
1147
2119
|
//#region src/primitives/TextField/TextField.tsx
|
|
1148
|
-
function
|
|
1149
|
-
let { messages: b } =
|
|
1150
|
-
return /* @__PURE__ */ h(
|
|
1151
|
-
className:
|
|
2120
|
+
function Tn({ autoComplete: e, autoFocus: t, defaultValue: n, description: r, disabled: i = !1, error: a, form: o, id: s, label: c, loading: l = !1, name: u, onChange: d, placeholder: f, readOnly: p = !1, ref: g, required: _ = !1, type: v = "text", value: y }) {
|
|
2121
|
+
let { messages: b } = q(), x = r?.trim() || void 0, S = a?.trim() || void 0, C = i || l;
|
|
2122
|
+
return /* @__PURE__ */ h(ke, {
|
|
2123
|
+
className: X.base.root,
|
|
1152
2124
|
defaultValue: n,
|
|
1153
2125
|
"aria-label": l ? c : void 0,
|
|
1154
2126
|
id: s,
|
|
@@ -1162,23 +2134,23 @@ function gt({ autoComplete: e, autoFocus: t, defaultValue: n, description: r, di
|
|
|
1162
2134
|
validationBehavior: "aria",
|
|
1163
2135
|
value: y,
|
|
1164
2136
|
children: [
|
|
1165
|
-
/* @__PURE__ */ m(
|
|
2137
|
+
/* @__PURE__ */ m(Ke, {
|
|
1166
2138
|
label: c,
|
|
1167
2139
|
loading: l
|
|
1168
2140
|
}),
|
|
1169
2141
|
/* @__PURE__ */ h("span", {
|
|
1170
|
-
className:
|
|
1171
|
-
children: [/* @__PURE__ */ m(
|
|
2142
|
+
className: X.base.control,
|
|
2143
|
+
children: [/* @__PURE__ */ m(k, {
|
|
1172
2144
|
"aria-busy": l || void 0,
|
|
1173
|
-
className:
|
|
2145
|
+
className: Z(X.base.input, l && X.state.loadingInput),
|
|
1174
2146
|
autoComplete: e,
|
|
1175
2147
|
autoFocus: t,
|
|
1176
2148
|
form: o,
|
|
1177
2149
|
placeholder: f,
|
|
1178
2150
|
ref: g
|
|
1179
2151
|
}), l && /* @__PURE__ */ m("span", {
|
|
1180
|
-
className:
|
|
1181
|
-
children: /* @__PURE__ */ m(
|
|
2152
|
+
className: X.base.skeleton,
|
|
2153
|
+
children: /* @__PURE__ */ m(J, {
|
|
1182
2154
|
blockSize: "100%",
|
|
1183
2155
|
inlineSize: "100%",
|
|
1184
2156
|
label: b.loading,
|
|
@@ -1186,7 +2158,7 @@ function gt({ autoComplete: e, autoFocus: t, defaultValue: n, description: r, di
|
|
|
1186
2158
|
})
|
|
1187
2159
|
})]
|
|
1188
2160
|
}),
|
|
1189
|
-
/* @__PURE__ */ m(
|
|
2161
|
+
/* @__PURE__ */ m(qe, {
|
|
1190
2162
|
description: x,
|
|
1191
2163
|
error: S,
|
|
1192
2164
|
loading: l
|
|
@@ -1196,18 +2168,18 @@ function gt({ autoComplete: e, autoFocus: t, defaultValue: n, description: r, di
|
|
|
1196
2168
|
}
|
|
1197
2169
|
//#endregion
|
|
1198
2170
|
//#region src/primitives/Toast/Toast.tsx
|
|
1199
|
-
var
|
|
1200
|
-
function
|
|
2171
|
+
var En = 2600, Dn = "BreezeProvider toastLimit must be a positive integer.", On = "Toast components must be rendered within BreezeProvider.";
|
|
2172
|
+
function kn(e) {
|
|
1201
2173
|
return e.isIntersecting && e.intersectionRatio >= 1;
|
|
1202
2174
|
}
|
|
1203
|
-
function
|
|
2175
|
+
function An(e, t, n, r) {
|
|
1204
2176
|
let i = Number(e.target.dataset.breezeToastId);
|
|
1205
|
-
t.has(i) && (
|
|
2177
|
+
t.has(i) && (kn(e) ? n(i) : r(i));
|
|
1206
2178
|
}
|
|
1207
|
-
var
|
|
1208
|
-
function
|
|
1209
|
-
|
|
1210
|
-
let t = a(
|
|
2179
|
+
var jn = n(null), Mn = n(!0), Nn = n(null);
|
|
2180
|
+
function Pn({ children: e }) {
|
|
2181
|
+
q();
|
|
2182
|
+
let t = a(Mn), n = a(Nn), [r, i] = d(() => n?.message ?? null);
|
|
1211
2183
|
return o(() => {
|
|
1212
2184
|
if (!t || typeof document < "u" && document.hidden || r === e) return;
|
|
1213
2185
|
let a = setTimeout(() => {
|
|
@@ -1225,15 +2197,15 @@ function Tt({ children: e }) {
|
|
|
1225
2197
|
"aria-live": "polite",
|
|
1226
2198
|
className: "breeze-toast",
|
|
1227
2199
|
role: "status",
|
|
1228
|
-
children: [/* @__PURE__ */ m(
|
|
2200
|
+
children: [/* @__PURE__ */ m(dt, {
|
|
1229
2201
|
name: "check",
|
|
1230
2202
|
size: "sm"
|
|
1231
2203
|
}), /* @__PURE__ */ m("span", { children: r })]
|
|
1232
2204
|
});
|
|
1233
2205
|
}
|
|
1234
|
-
function
|
|
1235
|
-
let n =
|
|
1236
|
-
if (!Number.isInteger(t) || t < 1) throw RangeError(
|
|
2206
|
+
function Fn({ children: e, limit: t }) {
|
|
2207
|
+
let n = it(), r = Qe(), a = u(null), [s, l] = d(() => typeof document > "u" || !document.hidden), [f, p] = d([]), g = u(0), _ = u(/* @__PURE__ */ new Map()), v = u(/* @__PURE__ */ new Set()), y = u(/* @__PURE__ */ new Map());
|
|
2208
|
+
if (!Number.isInteger(t) || t < 1) throw RangeError(Dn);
|
|
1237
2209
|
let b = i((e, t) => {
|
|
1238
2210
|
let n = y.current.get(e);
|
|
1239
2211
|
n !== void 0 && (n.message = t);
|
|
@@ -1268,7 +2240,7 @@ function Et({ children: e, limit: t }) {
|
|
|
1268
2240
|
if (!s || typeof document < "u" && document.hidden || t !== void 0 && t.handle !== null) return;
|
|
1269
2241
|
let n = t ?? {
|
|
1270
2242
|
handle: null,
|
|
1271
|
-
remaining:
|
|
2243
|
+
remaining: En,
|
|
1272
2244
|
startedAt: null
|
|
1273
2245
|
};
|
|
1274
2246
|
if (n.remaining <= 0) {
|
|
@@ -1302,7 +2274,7 @@ function Et({ children: e, limit: t }) {
|
|
|
1302
2274
|
}
|
|
1303
2275
|
let o, c = setTimeout(() => {
|
|
1304
2276
|
o = new IntersectionObserver((e) => {
|
|
1305
|
-
e.forEach((e) =>
|
|
2277
|
+
e.forEach((e) => An(e, r, D, w));
|
|
1306
2278
|
}, { threshold: 1 }), Array.from(i.children).forEach((e) => {
|
|
1307
2279
|
e instanceof HTMLElement && e.dataset.breezeToastId !== void 0 && !e.hidden && o?.observe(e);
|
|
1308
2280
|
});
|
|
@@ -1319,29 +2291,29 @@ function Et({ children: e, limit: t }) {
|
|
|
1319
2291
|
E,
|
|
1320
2292
|
D
|
|
1321
2293
|
]), o(() => C, [C]);
|
|
1322
|
-
let
|
|
1323
|
-
return /* @__PURE__ */ m(
|
|
2294
|
+
let O = f.slice(0, t), k = new Set(O.map(({ id: e }) => e)), A = f.filter(({ id: e }) => k.has(e) || v.current.has(e));
|
|
2295
|
+
return /* @__PURE__ */ m(Mn, {
|
|
1324
2296
|
value: s,
|
|
1325
|
-
children: /* @__PURE__ */ h(
|
|
2297
|
+
children: /* @__PURE__ */ h(jn, {
|
|
1326
2298
|
value: x,
|
|
1327
|
-
children: [e, n &&
|
|
2299
|
+
children: [e, n && M(/* @__PURE__ */ m("div", {
|
|
1328
2300
|
ref: a,
|
|
1329
2301
|
className: "breeze-toast-region",
|
|
1330
2302
|
"data-breeze-toast-region": "",
|
|
1331
2303
|
"data-live-announcer": "",
|
|
1332
2304
|
"data-react-aria-top-layer": "",
|
|
1333
2305
|
style: { zIndex: r },
|
|
1334
|
-
children:
|
|
1335
|
-
let n = !
|
|
2306
|
+
children: A.map(({ id: e, message: t }) => {
|
|
2307
|
+
let n = !k.has(e);
|
|
1336
2308
|
return /* @__PURE__ */ m("div", {
|
|
1337
2309
|
"aria-hidden": n ? "true" : void 0,
|
|
1338
2310
|
"data-breeze-toast-id": e,
|
|
1339
2311
|
hidden: n,
|
|
1340
|
-
children: /* @__PURE__ */ m(
|
|
2312
|
+
children: /* @__PURE__ */ m(Nn, {
|
|
1341
2313
|
value: y.current.get(e) ?? null,
|
|
1342
|
-
children: /* @__PURE__ */ m(
|
|
2314
|
+
children: /* @__PURE__ */ m(Mn, {
|
|
1343
2315
|
value: s && !n,
|
|
1344
|
-
children: /* @__PURE__ */ m(
|
|
2316
|
+
children: /* @__PURE__ */ m(Pn, { children: t })
|
|
1345
2317
|
})
|
|
1346
2318
|
})
|
|
1347
2319
|
}, e);
|
|
@@ -1350,14 +2322,14 @@ function Et({ children: e, limit: t }) {
|
|
|
1350
2322
|
})
|
|
1351
2323
|
});
|
|
1352
2324
|
}
|
|
1353
|
-
function
|
|
1354
|
-
let e = a(
|
|
1355
|
-
if (e === null) throw Error(
|
|
2325
|
+
function In() {
|
|
2326
|
+
let e = a(jn);
|
|
2327
|
+
if (e === null) throw Error(On);
|
|
1356
2328
|
return e;
|
|
1357
2329
|
}
|
|
1358
2330
|
//#endregion
|
|
1359
2331
|
//#region src/primitives/Typography/Typography.tsx
|
|
1360
|
-
var
|
|
2332
|
+
var Ln = {
|
|
1361
2333
|
base: { text: "breeze:m-0 breeze:font-breeze-sans" },
|
|
1362
2334
|
compound: {},
|
|
1363
2335
|
size: {},
|
|
@@ -1393,10 +2365,10 @@ var Q = {
|
|
|
1393
2365
|
}
|
|
1394
2366
|
}
|
|
1395
2367
|
};
|
|
1396
|
-
function
|
|
2368
|
+
function Rn(e) {
|
|
1397
2369
|
return e === "heading" ? "h2" : e === "title" ? "h3" : e === "body" ? "p" : "span";
|
|
1398
2370
|
}
|
|
1399
|
-
function
|
|
2371
|
+
function zn(e, t, n, r) {
|
|
1400
2372
|
let i;
|
|
1401
2373
|
try {
|
|
1402
2374
|
i = new Intl.NumberFormat(n, {
|
|
@@ -1410,10 +2382,10 @@ function kt(e, t, n, r) {
|
|
|
1410
2382
|
}
|
|
1411
2383
|
return i.map((e) => e.type === "minusSign" ? "−" : e.value).join("");
|
|
1412
2384
|
}
|
|
1413
|
-
function
|
|
2385
|
+
function Bn(e, t, n) {
|
|
1414
2386
|
let r;
|
|
1415
2387
|
try {
|
|
1416
|
-
r =
|
|
2388
|
+
r = Ae(e).toDate("UTC");
|
|
1417
2389
|
} catch {
|
|
1418
2390
|
return e;
|
|
1419
2391
|
}
|
|
@@ -1422,15 +2394,15 @@ function At(e, t, n) {
|
|
|
1422
2394
|
timeZone: "UTC"
|
|
1423
2395
|
}).format(r);
|
|
1424
2396
|
}
|
|
1425
|
-
function
|
|
1426
|
-
return e.loading ? /* @__PURE__ */ m(
|
|
2397
|
+
function Vn(e, t, n) {
|
|
2398
|
+
return e.loading ? /* @__PURE__ */ m(J, {
|
|
1427
2399
|
blockSize: "1lh",
|
|
1428
2400
|
inlineSize: "8em",
|
|
1429
2401
|
label: n
|
|
1430
|
-
}) : e.format === "currency" ?
|
|
2402
|
+
}) : e.format === "currency" ? zn(e.value, e.currency, t, e.sign ?? "auto") : e.format === "date" ? Bn(e.value, t, e.dateStyle) : e.children;
|
|
1431
2403
|
}
|
|
1432
|
-
function
|
|
1433
|
-
let { locale: t, messages: n } =
|
|
2404
|
+
function Hn(e) {
|
|
2405
|
+
let { locale: t, messages: n } = q(), { "aria-label": i, align: a, children: o, element: s, format: c, id: l, loading: u = !1, numeric: d = !1, tone: f = "default", truncate: g = !1, variant: _ = "body" } = e, v = s ?? Rn(_), y = i?.trim() || void 0, b = a ?? (_ === "money" || d ? "end" : "start"), x = a !== void 0 || _ === "money" || d, S = Vn(e, t, n.loading), C = c !== void 0 || typeof o == "string" || typeof o == "number", w = !u && y !== void 0 && !C && [
|
|
1434
2406
|
"h1",
|
|
1435
2407
|
"h2",
|
|
1436
2408
|
"h3",
|
|
@@ -1439,18 +2411,18 @@ function Mt(e) {
|
|
|
1439
2411
|
return !u && y !== void 0 && C && (S = /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("span", {
|
|
1440
2412
|
"aria-hidden": "true",
|
|
1441
2413
|
children: S
|
|
1442
|
-
}), /* @__PURE__ */ m(
|
|
2414
|
+
}), /* @__PURE__ */ m(Re, { children: y })] })), r(v, {
|
|
1443
2415
|
"aria-busy": u || void 0,
|
|
1444
2416
|
"aria-label": T || w ? y : void 0,
|
|
1445
2417
|
className: [
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
x &&
|
|
1451
|
-
u && v === "span" && !x &&
|
|
1452
|
-
d && _ !== "money" &&
|
|
1453
|
-
g &&
|
|
2418
|
+
Ln.base.text,
|
|
2419
|
+
Ln.variant.role[_],
|
|
2420
|
+
Ln.variant.tone[f],
|
|
2421
|
+
Ln.variant.align[b],
|
|
2422
|
+
x && Ln.state.aligned,
|
|
2423
|
+
u && v === "span" && !x && Ln.state.inlineLoading,
|
|
2424
|
+
d && _ !== "money" && Ln.state.numeric,
|
|
2425
|
+
g && Ln.state.truncate
|
|
1454
2426
|
].filter(Boolean).join(" "),
|
|
1455
2427
|
id: l,
|
|
1456
2428
|
lang: t,
|
|
@@ -1459,7 +2431,7 @@ function Mt(e) {
|
|
|
1459
2431
|
}
|
|
1460
2432
|
//#endregion
|
|
1461
2433
|
//#region src/provider/en-GB.ts
|
|
1462
|
-
var
|
|
2434
|
+
var Un = {
|
|
1463
2435
|
appearance: "Appearance",
|
|
1464
2436
|
appearanceAutomatic: "Auto",
|
|
1465
2437
|
appearanceDark: "Dark",
|
|
@@ -1469,11 +2441,11 @@ var $ = {
|
|
|
1469
2441
|
};
|
|
1470
2442
|
//#endregion
|
|
1471
2443
|
//#region src/provider/BreezeProvider.tsx
|
|
1472
|
-
function
|
|
2444
|
+
function Wn(e, t) {
|
|
1473
2445
|
return e === "automatic" ? t ? "dark" : "light" : e;
|
|
1474
2446
|
}
|
|
1475
|
-
function
|
|
1476
|
-
let { direction: t, locale: n } =
|
|
2447
|
+
function Gn({ children: e }) {
|
|
2448
|
+
let { direction: t, locale: n } = F();
|
|
1477
2449
|
return /* @__PURE__ */ m("div", {
|
|
1478
2450
|
"data-breeze-root": "",
|
|
1479
2451
|
dir: t,
|
|
@@ -1481,8 +2453,8 @@ function Pt({ children: e }) {
|
|
|
1481
2453
|
children: e
|
|
1482
2454
|
});
|
|
1483
2455
|
}
|
|
1484
|
-
function
|
|
1485
|
-
let [p] = d(() => typeof window > "u" || !window.matchMedia ? null : window.matchMedia("(prefers-color-scheme: dark)")), [h, g] = d(() => p?.matches ?? !1), [_, v] = d(n), y = e ?? _, b =
|
|
2456
|
+
function Kn({ appearance: e, children: t, defaultAppearance: n = "automatic", locale: r, messages: a, onAppearanceChange: s, portalContainer: u, toastLimit: f = 3 }) {
|
|
2457
|
+
let [p] = d(() => typeof window > "u" || !window.matchMedia ? null : window.matchMedia("(prefers-color-scheme: dark)")), [h, g] = d(() => p?.matches ?? !1), [_, v] = d(n), y = e ?? _, b = Wn(y, h);
|
|
1486
2458
|
o(() => {
|
|
1487
2459
|
if (!p) return;
|
|
1488
2460
|
g(p.matches);
|
|
@@ -1499,20 +2471,20 @@ function Ft({ appearance: e, children: t, defaultAppearance: n = "automatic", lo
|
|
|
1499
2471
|
let x = i((t) => {
|
|
1500
2472
|
e === void 0 && v(t), s?.(t);
|
|
1501
2473
|
}, [e, s]), S = i((e) => a?.[e] === void 0 ? "en-GB" : r, [r, a]);
|
|
1502
|
-
return /* @__PURE__ */ m(
|
|
2474
|
+
return /* @__PURE__ */ m(te, {
|
|
1503
2475
|
locale: r,
|
|
1504
|
-
children: /* @__PURE__ */ m(
|
|
2476
|
+
children: /* @__PURE__ */ m(je, {
|
|
1505
2477
|
value: l(() => ({
|
|
1506
2478
|
appearance: y,
|
|
1507
2479
|
getMessageLocale: S,
|
|
1508
2480
|
locale: r,
|
|
1509
2481
|
messages: {
|
|
1510
|
-
appearance: a?.appearance ??
|
|
1511
|
-
appearanceAutomatic: a?.appearanceAutomatic ??
|
|
1512
|
-
appearanceDark: a?.appearanceDark ??
|
|
1513
|
-
appearanceLight: a?.appearanceLight ??
|
|
1514
|
-
close: a?.close ??
|
|
1515
|
-
loading: a?.loading ??
|
|
2482
|
+
appearance: a?.appearance ?? Un.appearance,
|
|
2483
|
+
appearanceAutomatic: a?.appearanceAutomatic ?? Un.appearanceAutomatic,
|
|
2484
|
+
appearanceDark: a?.appearanceDark ?? Un.appearanceDark,
|
|
2485
|
+
appearanceLight: a?.appearanceLight ?? Un.appearanceLight,
|
|
2486
|
+
close: a?.close ?? Un.close,
|
|
2487
|
+
loading: a?.loading ?? Un.loading
|
|
1516
2488
|
},
|
|
1517
2489
|
resolvedAppearance: b,
|
|
1518
2490
|
setAppearance: x
|
|
@@ -1524,18 +2496,18 @@ function Ft({ appearance: e, children: t, defaultAppearance: n = "automatic", lo
|
|
|
1524
2496
|
b,
|
|
1525
2497
|
x
|
|
1526
2498
|
]),
|
|
1527
|
-
children: /* @__PURE__ */ m(
|
|
2499
|
+
children: /* @__PURE__ */ m(rt, {
|
|
1528
2500
|
locale: r,
|
|
1529
2501
|
portalContainer: u,
|
|
1530
|
-
children: /* @__PURE__ */ m(
|
|
2502
|
+
children: /* @__PURE__ */ m(Fn, {
|
|
1531
2503
|
limit: f,
|
|
1532
|
-
children: /* @__PURE__ */ m(
|
|
2504
|
+
children: /* @__PURE__ */ m(Gn, { children: t })
|
|
1533
2505
|
})
|
|
1534
2506
|
})
|
|
1535
2507
|
})
|
|
1536
2508
|
});
|
|
1537
2509
|
}
|
|
1538
2510
|
//#endregion
|
|
1539
|
-
export {
|
|
2511
|
+
export { Fe as AppearanceControl, Be as Badge, Kn as BreezeProvider, He as Button, Ge as Card, Ye as Checkbox, Ht as ComboBox, Wt as Container, Xt as Dialog, Zt as Drawer, $t as Grid, dt as Icon, tn as IconTile, rn as Inline, an as NumberField, on as Popover, bn as Select, Sn as Separator, J as Skeleton, wn as Stack, Tn as TextField, Pn as Toast, Hn as Typography, Re as VisuallyHidden, In as useToast };
|
|
1540
2512
|
|
|
1541
2513
|
//# sourceMappingURL=index.js.map
|