@motech-development/breeze-ui 4.6.1 → 4.7.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 +4 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +974 -624
- package/lib/index.js.map +1 -1
- package/lib/primitives/Calendar/Calendar.d.ts +47 -0
- package/lib/primitives/Calendar/Calendar.d.ts.map +1 -0
- package/lib/primitives/Collection/CollectionPopover.d.ts +3 -1
- package/lib/primitives/Collection/CollectionPopover.d.ts.map +1 -1
- package/lib/primitives/DatePicker/DatePicker.d.ts +51 -0
- package/lib/primitives/DatePicker/DatePicker.d.ts.map +1 -0
- package/lib/provider/BreezeProvider.d.ts.map +1 -1
- package/lib/provider/en-GB.d.ts +2 -0
- package/lib/provider/en-GB.d.ts.map +1 -1
- package/lib/styles.css +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -5,36 +5,37 @@ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
|
5
5
|
import { Button as g } from "react-aria-components/Button";
|
|
6
6
|
import { ProgressBarContext as _ } from "react-aria-components/ProgressBar";
|
|
7
7
|
import { useSlottedContext as v } from "react-aria-components/slots";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
8
|
+
import { parseDate as y } from "@internationalized/date";
|
|
9
|
+
import { Calendar as b, CalendarCell as x, CalendarGrid as S, CalendarGridBody as C, CalendarGridHeader as w, CalendarHeaderCell as T, CalendarHeading as E } from "react-aria-components/Calendar";
|
|
10
|
+
import { ArrowDownLeft as D, ArrowUpRight as O, Bell as k, Building2 as A, CalendarDays as j, Camera as M, Check as N, ChevronDown as ee, ChevronLeft as te, ChevronRight as P, Clock3 as F, Download as I, Ellipsis as L, FileText as R, House as ne, List as re, LockKeyhole as z, LogOut as B, Plus as ie, Settings as ae, Trash2 as V, TriangleAlert as oe, Upload as H, Users as U, X as se } from "lucide-react";
|
|
11
|
+
import { useObjectRef as ce } from "react-aria/useObjectRef";
|
|
12
|
+
import { CheckboxButton as W, CheckboxField as le } from "react-aria-components/Checkbox";
|
|
13
|
+
import { FieldError as ue } from "react-aria-components/FieldError";
|
|
14
|
+
import { Label as de } from "react-aria-components/Label";
|
|
15
|
+
import { Text as fe } from "react-aria-components/Text";
|
|
16
|
+
import { ComboBox as pe, ComboBoxStateContext as me, useFilter as he } from "react-aria-components/ComboBox";
|
|
17
|
+
import { Group as ge } from "react-aria-components/Group";
|
|
18
|
+
import { Input as _e } from "react-aria-components/Input";
|
|
19
|
+
import { ListBox as ve, ListBoxItem as ye } from "react-aria-components/ListBox";
|
|
20
|
+
import { Popover as be } from "react-aria-components/Popover";
|
|
21
|
+
import { UNSAFE_PortalProvider as xe } from "react-aria/PortalProvider";
|
|
22
|
+
import { I18nProvider as Se, useLocale as Ce } from "react-aria-components/I18nProvider";
|
|
23
|
+
import { Dialog as we } from "react-aria-components/Dialog";
|
|
24
|
+
import { Modal as Te, ModalOverlay as Ee } from "react-aria-components/Modal";
|
|
25
|
+
import { NumberField as De } from "react-aria-components/NumberField";
|
|
26
|
+
import { Select as Oe, SelectStateContext as ke, SelectValue as Ae } from "react-aria-components/Select";
|
|
27
|
+
import { TextField as je } from "react-aria-components/TextField";
|
|
28
|
+
import { createPortal as Me } from "react-dom";
|
|
28
29
|
//#region src/provider/BreezeContext.ts
|
|
29
|
-
var
|
|
30
|
+
var Ne = n(null);
|
|
30
31
|
function G() {
|
|
31
|
-
let e = a(
|
|
32
|
+
let e = a(Ne);
|
|
32
33
|
if (e === null) throw Error("Breeze components must be rendered within BreezeProvider.");
|
|
33
34
|
return e;
|
|
34
35
|
}
|
|
35
36
|
//#endregion
|
|
36
37
|
//#region src/patterns/AppearanceControl/AppearanceControl.tsx
|
|
37
|
-
var
|
|
38
|
+
var Pe = {
|
|
38
39
|
base: {
|
|
39
40
|
control: "breeze:flex breeze:items-center breeze:gap-breeze-2 breeze:font-breeze-sans",
|
|
40
41
|
group: "breeze:flex breeze:items-center breeze:gap-breeze-2",
|
|
@@ -45,7 +46,7 @@ var De = {
|
|
|
45
46
|
size: {},
|
|
46
47
|
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" },
|
|
47
48
|
variant: {}
|
|
48
|
-
},
|
|
49
|
+
}, Fe = [
|
|
49
50
|
{
|
|
50
51
|
message: "appearanceLight",
|
|
51
52
|
value: "light"
|
|
@@ -59,30 +60,30 @@ var De = {
|
|
|
59
60
|
value: "dark"
|
|
60
61
|
}
|
|
61
62
|
];
|
|
62
|
-
function
|
|
63
|
-
return
|
|
63
|
+
function Ie(e) {
|
|
64
|
+
return Fe.some((t) => t.value === e);
|
|
64
65
|
}
|
|
65
|
-
function
|
|
66
|
+
function Le() {
|
|
66
67
|
let { appearance: n, getMessageLocale: r, messages: i, setAppearance: a } = G();
|
|
67
68
|
return /* @__PURE__ */ h("div", {
|
|
68
|
-
className:
|
|
69
|
+
className: Pe.base.control,
|
|
69
70
|
children: [/* @__PURE__ */ m("span", {
|
|
70
|
-
className:
|
|
71
|
+
className: Pe.base.label,
|
|
71
72
|
lang: r("appearance"),
|
|
72
73
|
children: i.appearance
|
|
73
74
|
}), /* @__PURE__ */ m(t, {
|
|
74
75
|
"aria-label": i.appearance,
|
|
75
|
-
className:
|
|
76
|
+
className: Pe.base.group,
|
|
76
77
|
disallowEmptySelection: !0,
|
|
77
78
|
lang: r("appearance"),
|
|
78
79
|
onSelectionChange: (e) => {
|
|
79
80
|
let [t] = e;
|
|
80
|
-
|
|
81
|
+
Ie(t) && a(t);
|
|
81
82
|
},
|
|
82
83
|
selectedKeys: [n],
|
|
83
84
|
selectionMode: "single",
|
|
84
|
-
children:
|
|
85
|
-
className: [
|
|
85
|
+
children: Fe.map((t) => /* @__PURE__ */ m(e, {
|
|
86
|
+
className: [Pe.base.option, Pe.state.selected].join(" "),
|
|
86
87
|
id: t.value,
|
|
87
88
|
lang: r(t.message),
|
|
88
89
|
children: i[t.message]
|
|
@@ -92,7 +93,7 @@ function Ae() {
|
|
|
92
93
|
}
|
|
93
94
|
//#endregion
|
|
94
95
|
//#region src/primitives/Skeleton/Skeleton.tsx
|
|
95
|
-
var
|
|
96
|
+
var Re = {
|
|
96
97
|
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]" },
|
|
97
98
|
compound: {},
|
|
98
99
|
size: {},
|
|
@@ -111,29 +112,29 @@ function K({ blockSize: e, inlineSize: t, label: n, shape: r = "text" }) {
|
|
|
111
112
|
return /* @__PURE__ */ m("progress", {
|
|
112
113
|
"aria-hidden": o === void 0 || void 0,
|
|
113
114
|
"aria-label": o,
|
|
114
|
-
className: [
|
|
115
|
+
className: [Re.base.skeleton, Re.variant[r]].join(" "),
|
|
115
116
|
lang: o === a.loading.trim() ? i("loading") : void 0,
|
|
116
117
|
style: c
|
|
117
118
|
});
|
|
118
119
|
}
|
|
119
120
|
//#endregion
|
|
120
121
|
//#region src/primitives/VisuallyHidden/VisuallyHidden.tsx
|
|
121
|
-
var
|
|
122
|
+
var ze = {
|
|
122
123
|
base: { hidden: "breeze:sr-only" },
|
|
123
124
|
compound: {},
|
|
124
125
|
size: {},
|
|
125
126
|
state: {},
|
|
126
127
|
variant: {}
|
|
127
128
|
};
|
|
128
|
-
function
|
|
129
|
+
function Be({ children: e }) {
|
|
129
130
|
return /* @__PURE__ */ m("span", {
|
|
130
|
-
className:
|
|
131
|
+
className: ze.base.hidden,
|
|
131
132
|
children: e
|
|
132
133
|
});
|
|
133
134
|
}
|
|
134
135
|
//#endregion
|
|
135
136
|
//#region src/primitives/Badge/Badge.tsx
|
|
136
|
-
var
|
|
137
|
+
var Ve = {
|
|
137
138
|
base: {
|
|
138
139
|
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",
|
|
139
140
|
content: "breeze:[grid-area:1/1]",
|
|
@@ -150,22 +151,22 @@ var Pe = {
|
|
|
150
151
|
warning: "breeze:bg-breeze-warn-soft breeze:text-breeze-warn"
|
|
151
152
|
}
|
|
152
153
|
};
|
|
153
|
-
function
|
|
154
|
+
function He({ "aria-label": e, children: t, loading: n = !1, variant: r = "neutral" }) {
|
|
154
155
|
let { messages: i } = G(), a = e?.trim() || void 0, o;
|
|
155
156
|
return n ? o = /* @__PURE__ */ m("span", {
|
|
156
|
-
className:
|
|
157
|
+
className: Ve.base.skeleton,
|
|
157
158
|
children: /* @__PURE__ */ m(K, {
|
|
158
159
|
blockSize: 8,
|
|
159
160
|
inlineSize: "100%",
|
|
160
161
|
label: i.loading,
|
|
161
162
|
shape: "rectangle"
|
|
162
163
|
})
|
|
163
|
-
}) : a !== void 0 && (o = /* @__PURE__ */ m(
|
|
164
|
+
}) : a !== void 0 && (o = /* @__PURE__ */ m(Be, { children: a })), /* @__PURE__ */ h("span", {
|
|
164
165
|
"aria-busy": n || void 0,
|
|
165
|
-
className: [
|
|
166
|
+
className: [Ve.base.badge, Ve.variant[r]].join(" "),
|
|
166
167
|
children: [/* @__PURE__ */ m("span", {
|
|
167
168
|
"aria-hidden": n || a !== void 0 ? !0 : void 0,
|
|
168
|
-
className: [
|
|
169
|
+
className: [Ve.base.content, n && Ve.state.contentLoading].filter(Boolean).join(" "),
|
|
169
170
|
children: t
|
|
170
171
|
}), o]
|
|
171
172
|
});
|
|
@@ -202,7 +203,7 @@ var q = {
|
|
|
202
203
|
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"
|
|
203
204
|
}
|
|
204
205
|
};
|
|
205
|
-
function
|
|
206
|
+
function Ue() {
|
|
206
207
|
let e = v(_), { getMessageLocale: t, messages: n } = G();
|
|
207
208
|
return /* @__PURE__ */ m("progress", {
|
|
208
209
|
"aria-label": n.loading,
|
|
@@ -211,7 +212,7 @@ function Ie() {
|
|
|
211
212
|
lang: t("loading")
|
|
212
213
|
});
|
|
213
214
|
}
|
|
214
|
-
function
|
|
215
|
+
function We({ "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" }) {
|
|
215
216
|
G();
|
|
216
217
|
let C = [
|
|
217
218
|
q.base.button,
|
|
@@ -246,7 +247,7 @@ function Le({ "aria-controls": e, "aria-describedby": t, "aria-expanded": n, "ar
|
|
|
246
247
|
children: [/* @__PURE__ */ m("span", {
|
|
247
248
|
className: [q.base.label, d && q.state.loadingLabel].filter(Boolean).join(" "),
|
|
248
249
|
children: s
|
|
249
|
-
}), d && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(
|
|
250
|
+
}), d && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(Ue, {}), /* @__PURE__ */ m("span", {
|
|
250
251
|
"aria-hidden": "true",
|
|
251
252
|
className: [q.base.skeleton, q.compound.loading[S]].join(" "),
|
|
252
253
|
"data-breeze-skeleton": ""
|
|
@@ -254,8 +255,198 @@ function Le({ "aria-controls": e, "aria-describedby": t, "aria-expanded": n, "ar
|
|
|
254
255
|
});
|
|
255
256
|
}
|
|
256
257
|
//#endregion
|
|
258
|
+
//#region src/primitives/Field/field.styles.ts
|
|
259
|
+
var J = {
|
|
260
|
+
base: {
|
|
261
|
+
control: "breeze:relative breeze:inline-grid breeze:min-inline-size-0 breeze:inline-size-full",
|
|
262
|
+
description: "breeze:m-0 breeze:text-breeze-xs breeze:font-normal breeze:leading-breeze-snug breeze:text-breeze-ink-3",
|
|
263
|
+
error: "breeze:m-0 breeze:text-breeze-xs breeze:font-medium breeze:leading-breeze-snug breeze:text-breeze-danger",
|
|
264
|
+
input: "breeze:min-block-breeze-md breeze:any-pointer-coarse:min-block-breeze-tap breeze:min-inline-size-0 breeze:inline-size-full 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:leading-breeze-snug breeze:text-breeze-ink breeze:outline-offset-2 breeze:placeholder:text-breeze-ink-3 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 breeze:read-only:cursor-default breeze:read-only:bg-breeze-sunken",
|
|
265
|
+
label: "breeze:m-0 breeze:text-breeze-xs breeze:font-medium breeze:leading-breeze-snug breeze:text-breeze-ink",
|
|
266
|
+
root: "breeze:flex breeze:min-inline-size-0 breeze:flex-col breeze:gap-breeze-2",
|
|
267
|
+
skeleton: "breeze:pointer-events-none breeze:absolute breeze:[inset-block:0] breeze:[inset-inline:0]"
|
|
268
|
+
},
|
|
269
|
+
compound: {},
|
|
270
|
+
size: {},
|
|
271
|
+
state: { loadingInput: "breeze:!opacity-0" },
|
|
272
|
+
variant: {}
|
|
273
|
+
};
|
|
274
|
+
function Y(...e) {
|
|
275
|
+
return e.filter(Boolean).join(" ");
|
|
276
|
+
}
|
|
277
|
+
//#endregion
|
|
278
|
+
//#region src/primitives/Icon/Icon.tsx
|
|
279
|
+
var Ge = {
|
|
280
|
+
add: ie,
|
|
281
|
+
back: te,
|
|
282
|
+
building: A,
|
|
283
|
+
calendar: j,
|
|
284
|
+
camera: M,
|
|
285
|
+
check: N,
|
|
286
|
+
clock: F,
|
|
287
|
+
close: se,
|
|
288
|
+
delete: V,
|
|
289
|
+
document: R,
|
|
290
|
+
download: I,
|
|
291
|
+
expand: ee,
|
|
292
|
+
forward: P,
|
|
293
|
+
lock: z,
|
|
294
|
+
money: re,
|
|
295
|
+
moneyIn: D,
|
|
296
|
+
moneyOut: O,
|
|
297
|
+
more: L,
|
|
298
|
+
next: P,
|
|
299
|
+
notifications: k,
|
|
300
|
+
overview: ne,
|
|
301
|
+
people: U,
|
|
302
|
+
settings: ae,
|
|
303
|
+
signOut: B,
|
|
304
|
+
upload: H,
|
|
305
|
+
warning: oe
|
|
306
|
+
}, Ke = {
|
|
307
|
+
base: { icon: "breeze:block breeze:shrink-0" },
|
|
308
|
+
compound: {},
|
|
309
|
+
size: {
|
|
310
|
+
lg: "breeze:block-size-breeze-6 breeze:inline-size-breeze-6",
|
|
311
|
+
md: "breeze:block-size-breeze-5 breeze:inline-size-breeze-5",
|
|
312
|
+
sm: "breeze:block-size-breeze-4 breeze:inline-size-breeze-4"
|
|
313
|
+
},
|
|
314
|
+
state: { logicalDirection: "breeze:rtl:rotate-180" },
|
|
315
|
+
variant: {}
|
|
316
|
+
}, qe = /* @__PURE__ */ new Set([
|
|
317
|
+
"back",
|
|
318
|
+
"forward",
|
|
319
|
+
"next"
|
|
320
|
+
]);
|
|
321
|
+
function X({ label: e, name: t, size: n = "md" }) {
|
|
322
|
+
let r = Ge[t], i = e?.trim() || void 0;
|
|
323
|
+
return /* @__PURE__ */ m(r, {
|
|
324
|
+
"aria-hidden": i === void 0 || void 0,
|
|
325
|
+
"aria-label": i,
|
|
326
|
+
className: [
|
|
327
|
+
Ke.base.icon,
|
|
328
|
+
Ke.size[n],
|
|
329
|
+
qe.has(t) && Ke.state.logicalDirection
|
|
330
|
+
].filter(Boolean).join(" "),
|
|
331
|
+
focusable: "false",
|
|
332
|
+
role: i === void 0 ? void 0 : "img",
|
|
333
|
+
strokeWidth: 1.75
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
//#endregion
|
|
337
|
+
//#region src/primitives/Calendar/Calendar.tsx
|
|
338
|
+
var Z = {
|
|
339
|
+
base: {
|
|
340
|
+
cell: "breeze:grid breeze:min-block-breeze-8 breeze:min-inline-breeze-8 breeze:any-pointer-coarse:min-block-breeze-tap breeze:any-pointer-coarse:min-inline-breeze-tap breeze:place-items-center breeze:rounded-breeze-full breeze:font-breeze-sans breeze:text-breeze-sm breeze:text-breeze-ink breeze:outline-offset-2 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-[disabled]:cursor-not-allowed breeze:data-[disabled]:opacity-50 breeze:data-[outside-month]:text-breeze-ink-3",
|
|
341
|
+
disabledRoot: "breeze:pointer-events-none breeze:[&>div:last-child]:hidden",
|
|
342
|
+
grid: "breeze:w-full breeze:table-fixed breeze:border-separate breeze:border-spacing-1 breeze:any-pointer-coarse:border-spacing-0",
|
|
343
|
+
header: "breeze:mb-breeze-2 breeze:flex breeze:min-block-breeze-tap breeze:items-center breeze:justify-between",
|
|
344
|
+
heading: "breeze:m-0 breeze:font-breeze-sans breeze:text-breeze-sm breeze:font-semibold breeze:text-breeze-ink",
|
|
345
|
+
navButton: "breeze:grid breeze:block-size-breeze-8 breeze:inline-size-breeze-8 breeze:place-items-center breeze:rounded-breeze-full breeze:border-0 breeze:bg-transparent breeze:text-breeze-ink-2 breeze:outline-offset-2 breeze:hover:bg-breeze-sunken breeze:focus-visible:outline-2 breeze:focus-visible:outline-solid breeze:focus-visible:outline-breeze-brand breeze:data-[disabled]:cursor-not-allowed breeze:data-[disabled]:opacity-50 breeze:any-pointer-coarse:min-block-breeze-tap breeze:any-pointer-coarse:min-inline-breeze-tap",
|
|
346
|
+
root: "breeze:flex breeze:flex-col breeze:gap-breeze-2 breeze:outline-none",
|
|
347
|
+
selectedCell: "breeze:bg-breeze-brand breeze:text-breeze-on-brand breeze:data-[focused]:data-[selected]:bg-breeze-brand breeze:data-[selected]:data-[hovered]:bg-breeze-brand breeze:data-[outside-month]:data-[selected]:text-breeze-on-brand breeze:forced-colors:data-[selected]:outline-2 breeze:forced-colors:data-[selected]:outline-solid breeze:forced-colors:data-[selected]:outline-offset-2",
|
|
348
|
+
todayCell: "breeze:outline-2 breeze:outline-solid breeze:outline-breeze-brand",
|
|
349
|
+
weekday: "breeze:pb-breeze-1 breeze:text-center breeze:font-breeze-sans breeze:text-breeze-xs breeze:font-medium breeze:text-breeze-ink-3"
|
|
350
|
+
},
|
|
351
|
+
compound: {},
|
|
352
|
+
size: {},
|
|
353
|
+
state: {},
|
|
354
|
+
variant: {}
|
|
355
|
+
};
|
|
356
|
+
function Je(e) {
|
|
357
|
+
try {
|
|
358
|
+
return y(e);
|
|
359
|
+
} catch {
|
|
360
|
+
return null;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
function Ye({ disabled: e }) {
|
|
364
|
+
return /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h("div", {
|
|
365
|
+
className: Z.base.header,
|
|
366
|
+
children: [
|
|
367
|
+
/* @__PURE__ */ m(g, {
|
|
368
|
+
className: Z.base.navButton,
|
|
369
|
+
isDisabled: e,
|
|
370
|
+
slot: "previous",
|
|
371
|
+
children: /* @__PURE__ */ m(X, {
|
|
372
|
+
name: "back",
|
|
373
|
+
size: "sm"
|
|
374
|
+
})
|
|
375
|
+
}),
|
|
376
|
+
/* @__PURE__ */ m(E, { className: Z.base.heading }),
|
|
377
|
+
/* @__PURE__ */ m(g, {
|
|
378
|
+
className: Z.base.navButton,
|
|
379
|
+
isDisabled: e,
|
|
380
|
+
slot: "next",
|
|
381
|
+
children: /* @__PURE__ */ m(X, {
|
|
382
|
+
name: "next",
|
|
383
|
+
size: "sm"
|
|
384
|
+
})
|
|
385
|
+
})
|
|
386
|
+
]
|
|
387
|
+
}), /* @__PURE__ */ h(S, {
|
|
388
|
+
className: Z.base.grid,
|
|
389
|
+
weekdayStyle: "short",
|
|
390
|
+
children: [/* @__PURE__ */ m(w, { children: (e) => /* @__PURE__ */ m(T, {
|
|
391
|
+
className: Z.base.weekday,
|
|
392
|
+
children: e
|
|
393
|
+
}) }), /* @__PURE__ */ m(C, { children: (t) => /* @__PURE__ */ m(x, {
|
|
394
|
+
className: ({ isSelected: e, isToday: t }) => Y(Z.base.cell, e && Z.base.selectedCell, t && !e && Z.base.todayCell),
|
|
395
|
+
date: t,
|
|
396
|
+
render: (t) => r("div", {
|
|
397
|
+
...t,
|
|
398
|
+
"aria-disabled": e || t["aria-disabled"],
|
|
399
|
+
...e ? { "data-disabled": !0 } : {},
|
|
400
|
+
tabIndex: e ? -1 : t.tabIndex
|
|
401
|
+
})
|
|
402
|
+
}) })]
|
|
403
|
+
})] });
|
|
404
|
+
}
|
|
405
|
+
function Xe({ autoFocus: e, defaultValue: t, disabled: n, label: i, onChange: a, value: s }) {
|
|
406
|
+
let c = s?.toString(), l = u(c), [f, p] = d(s ?? void 0);
|
|
407
|
+
o(() => {
|
|
408
|
+
c !== l.current && (l.current = c, s != null && p(s));
|
|
409
|
+
}, [c, s]);
|
|
410
|
+
let h = s != null && c !== l.current ? s : f, g = s == null ? {} : {
|
|
411
|
+
focusedValue: h,
|
|
412
|
+
onFocusChange: p
|
|
413
|
+
}, _ = s === void 0 ? {} : { value: s }, v = t === void 0 ? {} : { defaultValue: t }, y = a === void 0 ? {} : { onChange: a };
|
|
414
|
+
return r(b, {
|
|
415
|
+
"aria-label": i,
|
|
416
|
+
autoFocus: e && !n,
|
|
417
|
+
className: Y(Z.base.root, n && Z.base.disabledRoot),
|
|
418
|
+
firstDayOfWeek: "mon",
|
|
419
|
+
isReadOnly: n,
|
|
420
|
+
render: n ? (e) => r("div", {
|
|
421
|
+
...e,
|
|
422
|
+
"aria-disabled": !0,
|
|
423
|
+
onKeyDownCapture: (e) => {
|
|
424
|
+
e.key === "Tab" || e.key === "Escape" || (e.preventDefault(), e.stopPropagation());
|
|
425
|
+
}
|
|
426
|
+
}) : void 0,
|
|
427
|
+
weeksInMonth: 6,
|
|
428
|
+
...g,
|
|
429
|
+
...v,
|
|
430
|
+
...y,
|
|
431
|
+
..._
|
|
432
|
+
}, /* @__PURE__ */ m(Ye, { disabled: n }));
|
|
433
|
+
}
|
|
434
|
+
function Ze({ autoFocus: e = !1, defaultValue: t, disabled: n = !1, label: r, onChange: i, value: a }) {
|
|
435
|
+
let o = a === void 0 ? void 0 : Je(a);
|
|
436
|
+
return /* @__PURE__ */ m(Xe, {
|
|
437
|
+
autoFocus: e,
|
|
438
|
+
defaultValue: t === void 0 ? void 0 : Je(t),
|
|
439
|
+
disabled: n,
|
|
440
|
+
label: r,
|
|
441
|
+
onChange: (e) => {
|
|
442
|
+
e && i?.(e.toString());
|
|
443
|
+
},
|
|
444
|
+
value: o
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
//#endregion
|
|
257
448
|
//#region src/primitives/layout.accessibility.ts
|
|
258
|
-
function
|
|
449
|
+
function Qe(e, t) {
|
|
259
450
|
let n = e?.trim() || void 0;
|
|
260
451
|
return {
|
|
261
452
|
accessibleLabel: n,
|
|
@@ -264,7 +455,7 @@ function Re(e, t) {
|
|
|
264
455
|
}
|
|
265
456
|
//#endregion
|
|
266
457
|
//#region src/primitives/Card/Card.tsx
|
|
267
|
-
var
|
|
458
|
+
var $e = {
|
|
268
459
|
base: { card: "breeze:min-inline-size-0 breeze:rounded-breeze-panel breeze:border breeze:border-solid breeze:border-breeze-line breeze:shadow-breeze-panel" },
|
|
269
460
|
compound: {},
|
|
270
461
|
size: {
|
|
@@ -284,43 +475,23 @@ var ze = {
|
|
|
284
475
|
surface: "breeze:bg-breeze-surface"
|
|
285
476
|
}
|
|
286
477
|
};
|
|
287
|
-
function
|
|
288
|
-
let { accessibleLabel: s, role: c } =
|
|
478
|
+
function et({ "aria-label": e, children: t, clipped: n = !0, element: i = "div", padding: a = 4, variant: o = "surface" }) {
|
|
479
|
+
let { accessibleLabel: s, role: c } = Qe(e, i);
|
|
289
480
|
return r(i, {
|
|
290
481
|
"aria-label": s,
|
|
291
482
|
className: [
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
n &&
|
|
483
|
+
$e.base.card,
|
|
484
|
+
$e.variant[o],
|
|
485
|
+
$e.size[a],
|
|
486
|
+
n && $e.state.clipped
|
|
296
487
|
].filter(Boolean).join(" "),
|
|
297
488
|
role: c
|
|
298
489
|
}, t);
|
|
299
490
|
}
|
|
300
491
|
//#endregion
|
|
301
|
-
//#region src/primitives/Field/field.styles.ts
|
|
302
|
-
var J = {
|
|
303
|
-
base: {
|
|
304
|
-
control: "breeze:relative breeze:inline-grid breeze:min-inline-size-0 breeze:inline-size-full",
|
|
305
|
-
description: "breeze:m-0 breeze:text-breeze-xs breeze:font-normal breeze:leading-breeze-snug breeze:text-breeze-ink-3",
|
|
306
|
-
error: "breeze:m-0 breeze:text-breeze-xs breeze:font-medium breeze:leading-breeze-snug breeze:text-breeze-danger",
|
|
307
|
-
input: "breeze:min-block-breeze-md breeze:any-pointer-coarse:min-block-breeze-tap breeze:min-inline-size-0 breeze:inline-size-full 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:leading-breeze-snug breeze:text-breeze-ink breeze:outline-offset-2 breeze:placeholder:text-breeze-ink-3 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 breeze:read-only:cursor-default breeze:read-only:bg-breeze-sunken",
|
|
308
|
-
label: "breeze:m-0 breeze:text-breeze-xs breeze:font-medium breeze:leading-breeze-snug breeze:text-breeze-ink",
|
|
309
|
-
root: "breeze:flex breeze:min-inline-size-0 breeze:flex-col breeze:gap-breeze-2",
|
|
310
|
-
skeleton: "breeze:pointer-events-none breeze:absolute breeze:[inset-block:0] breeze:[inset-inline:0]"
|
|
311
|
-
},
|
|
312
|
-
compound: {},
|
|
313
|
-
size: {},
|
|
314
|
-
state: { loadingInput: "breeze:!opacity-0" },
|
|
315
|
-
variant: {}
|
|
316
|
-
};
|
|
317
|
-
function Y(...e) {
|
|
318
|
-
return e.filter(Boolean).join(" ");
|
|
319
|
-
}
|
|
320
|
-
//#endregion
|
|
321
492
|
//#region src/primitives/Field/field.presentation.tsx
|
|
322
|
-
function
|
|
323
|
-
return /* @__PURE__ */ m(
|
|
493
|
+
function tt({ htmlFor: e, id: t, label: n, loading: r, onClick: i }) {
|
|
494
|
+
return /* @__PURE__ */ m(de, {
|
|
324
495
|
className: J.base.label,
|
|
325
496
|
htmlFor: e,
|
|
326
497
|
id: t,
|
|
@@ -332,8 +503,8 @@ function Ve({ htmlFor: e, id: t, label: n, loading: r, onClick: i }) {
|
|
|
332
503
|
}) : n
|
|
333
504
|
});
|
|
334
505
|
}
|
|
335
|
-
function
|
|
336
|
-
return /* @__PURE__ */ h(p, { children: [e && /* @__PURE__ */ m(
|
|
506
|
+
function nt({ description: e, descriptionId: t, error: n, errorId: r, loading: i }) {
|
|
507
|
+
return /* @__PURE__ */ h(p, { children: [e && /* @__PURE__ */ m(fe, {
|
|
337
508
|
className: J.base.description,
|
|
338
509
|
id: t,
|
|
339
510
|
slot: "description",
|
|
@@ -351,7 +522,7 @@ function He({ description: e, descriptionId: t, error: n, errorId: r, loading: i
|
|
|
351
522
|
inlineSize: "12em",
|
|
352
523
|
shape: "rectangle"
|
|
353
524
|
})
|
|
354
|
-
}) : /* @__PURE__ */ m(
|
|
525
|
+
}) : /* @__PURE__ */ m(ue, {
|
|
355
526
|
className: J.base.error,
|
|
356
527
|
id: r,
|
|
357
528
|
children: n
|
|
@@ -359,7 +530,7 @@ function He({ description: e, descriptionId: t, error: n, errorId: r, loading: i
|
|
|
359
530
|
}
|
|
360
531
|
//#endregion
|
|
361
532
|
//#region src/primitives/Checkbox/Checkbox.tsx
|
|
362
|
-
var
|
|
533
|
+
var rt = {
|
|
363
534
|
base: {
|
|
364
535
|
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",
|
|
365
536
|
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",
|
|
@@ -372,17 +543,17 @@ var Ue = {
|
|
|
372
543
|
state: {},
|
|
373
544
|
variant: {}
|
|
374
545
|
};
|
|
375
|
-
function
|
|
376
|
-
let { messages: v } = G(),
|
|
377
|
-
return /* @__PURE__ */ h(
|
|
546
|
+
function it({ 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: _ }) {
|
|
547
|
+
let { messages: v } = G(), y = ce(d), b = t?.trim() || void 0, x = r?.trim() || void 0, S = n || s;
|
|
548
|
+
return /* @__PURE__ */ h(le, {
|
|
378
549
|
className: J.base.root,
|
|
379
550
|
defaultSelected: e,
|
|
380
551
|
form: i,
|
|
381
552
|
id: a,
|
|
382
|
-
inputRef:
|
|
553
|
+
inputRef: y,
|
|
383
554
|
"aria-label": s ? o : void 0,
|
|
384
|
-
isDisabled:
|
|
385
|
-
isInvalid: !s &&
|
|
555
|
+
isDisabled: S,
|
|
556
|
+
isInvalid: !s && x !== void 0,
|
|
386
557
|
isReadOnly: u,
|
|
387
558
|
isRequired: f,
|
|
388
559
|
isSelected: g,
|
|
@@ -390,18 +561,18 @@ function We({ defaultSelected: e, description: t, disabled: n = !1, error: r, fo
|
|
|
390
561
|
onChange: l,
|
|
391
562
|
value: _,
|
|
392
563
|
validationBehavior: "aria",
|
|
393
|
-
children: [/* @__PURE__ */ m(
|
|
394
|
-
className:
|
|
564
|
+
children: [/* @__PURE__ */ m(W, {
|
|
565
|
+
className: rt.base.control,
|
|
395
566
|
children: ({ isFocusVisible: e, isSelected: t }) => /* @__PURE__ */ h(p, { children: [s && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("span", {
|
|
396
567
|
"aria-hidden": "true",
|
|
397
|
-
className:
|
|
568
|
+
className: rt.base.skeletonIndicator,
|
|
398
569
|
children: /* @__PURE__ */ m(K, {
|
|
399
570
|
blockSize: "100%",
|
|
400
571
|
inlineSize: "100%",
|
|
401
572
|
shape: "rectangle"
|
|
402
573
|
})
|
|
403
574
|
}), /* @__PURE__ */ m("span", {
|
|
404
|
-
className:
|
|
575
|
+
className: rt.base.skeleton,
|
|
405
576
|
children: /* @__PURE__ */ m(K, {
|
|
406
577
|
blockSize: "1lh",
|
|
407
578
|
inlineSize: "12em",
|
|
@@ -410,24 +581,24 @@ function We({ defaultSelected: e, description: t, disabled: n = !1, error: r, fo
|
|
|
410
581
|
})
|
|
411
582
|
})] }), !s && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("span", {
|
|
412
583
|
"aria-hidden": "true",
|
|
413
|
-
className:
|
|
584
|
+
className: rt.base.indicator,
|
|
414
585
|
"data-focus-visible": e || void 0,
|
|
415
586
|
"data-selected": t || void 0,
|
|
416
587
|
children: t ? "✓" : ""
|
|
417
588
|
}), /* @__PURE__ */ m("span", {
|
|
418
|
-
className:
|
|
589
|
+
className: rt.base.label,
|
|
419
590
|
children: o
|
|
420
591
|
})] })] })
|
|
421
|
-
}), /* @__PURE__ */ m(
|
|
422
|
-
description:
|
|
423
|
-
error:
|
|
592
|
+
}), /* @__PURE__ */ m(nt, {
|
|
593
|
+
description: b,
|
|
594
|
+
error: x,
|
|
424
595
|
loading: s
|
|
425
596
|
})]
|
|
426
597
|
});
|
|
427
598
|
}
|
|
428
599
|
//#endregion
|
|
429
600
|
//#region src/primitives/Collection/collection.styles.ts
|
|
430
|
-
var
|
|
601
|
+
var Q = {
|
|
431
602
|
base: {
|
|
432
603
|
badge: "breeze:ms-auto",
|
|
433
604
|
content: "breeze:flex breeze:min-inline-size-0 breeze:flex-1 breeze:flex-col breeze:gap-breeze-1",
|
|
@@ -445,7 +616,7 @@ var X = {
|
|
|
445
616
|
};
|
|
446
617
|
//#endregion
|
|
447
618
|
//#region src/overlays/OverlayStack.ts
|
|
448
|
-
function
|
|
619
|
+
function at() {
|
|
449
620
|
let e = [], t = /* @__PURE__ */ new Set(), n = () => t.forEach((e) => e());
|
|
450
621
|
return {
|
|
451
622
|
getSnapshot: () => e,
|
|
@@ -461,15 +632,15 @@ function Ge() {
|
|
|
461
632
|
})
|
|
462
633
|
};
|
|
463
634
|
}
|
|
464
|
-
var
|
|
465
|
-
function
|
|
466
|
-
let e = a(
|
|
635
|
+
var ot = n(null);
|
|
636
|
+
function st() {
|
|
637
|
+
let e = a(ot);
|
|
467
638
|
if (!e) throw Error("Breeze components must be rendered within BreezeProvider.");
|
|
468
639
|
return 100 + f(e.subscribe, e.getSnapshot, e.getSnapshot).length * 2;
|
|
469
640
|
}
|
|
470
|
-
var
|
|
471
|
-
function
|
|
472
|
-
let r = a(
|
|
641
|
+
var ct = n(null);
|
|
642
|
+
function lt(e, t, n) {
|
|
643
|
+
let r = a(ot), i = a(ct), o = s();
|
|
473
644
|
if (!r) throw Error("Breeze components must be rendered within BreezeProvider.");
|
|
474
645
|
let l = f(r.subscribe, r.getSnapshot, r.getSnapshot), u = i?.id;
|
|
475
646
|
c(() => () => r.remove(o), [o, r]), c(() => {
|
|
@@ -508,12 +679,12 @@ function Ye(e, t, n) {
|
|
|
508
679
|
}
|
|
509
680
|
//#endregion
|
|
510
681
|
//#region src/overlays/OverlayProvider.tsx
|
|
511
|
-
var
|
|
512
|
-
function
|
|
513
|
-
let { direction: r } =
|
|
682
|
+
var ut = n(null), dt = "BreezeProvider portalContainer must belong to the current document and light DOM.";
|
|
683
|
+
function ft({ children: e, portalContainer: t, locale: n }) {
|
|
684
|
+
let { direction: r } = Ce(), [i] = d(at), [a, o] = d(null);
|
|
514
685
|
return c(() => {
|
|
515
686
|
let e = t ?? document.body;
|
|
516
|
-
if (e.ownerDocument !== document || e.getRootNode() !== document) throw Error(
|
|
687
|
+
if (e.ownerDocument !== document || e.getRootNode() !== document) throw Error(dt);
|
|
517
688
|
let n = e.ownerDocument.createElement("div");
|
|
518
689
|
return n.dataset.breezeRoot = "", n.dataset.breezePortal = "", e.append(n), o(n), () => n.remove();
|
|
519
690
|
}, [t]), c(() => {
|
|
@@ -522,173 +693,115 @@ function Qe({ children: e, portalContainer: t, locale: n }) {
|
|
|
522
693
|
r,
|
|
523
694
|
a,
|
|
524
695
|
n
|
|
525
|
-
]), /* @__PURE__ */ m(
|
|
696
|
+
]), /* @__PURE__ */ m(xe, {
|
|
526
697
|
getContainer: () => a,
|
|
527
|
-
children: /* @__PURE__ */ m(
|
|
698
|
+
children: /* @__PURE__ */ m(ot, {
|
|
528
699
|
value: i,
|
|
529
|
-
children: /* @__PURE__ */ m(
|
|
700
|
+
children: /* @__PURE__ */ m(ut, {
|
|
530
701
|
value: a,
|
|
531
702
|
children: e
|
|
532
703
|
})
|
|
533
704
|
})
|
|
534
705
|
});
|
|
535
706
|
}
|
|
536
|
-
function
|
|
537
|
-
return a(
|
|
707
|
+
function pt() {
|
|
708
|
+
return a(ut);
|
|
538
709
|
}
|
|
539
710
|
//#endregion
|
|
540
711
|
//#region src/primitives/Collection/CollectionPopover.tsx
|
|
541
|
-
var
|
|
542
|
-
function
|
|
712
|
+
var mt = "Breeze overlay triggers and portal containers must belong to the current document and light DOM.";
|
|
713
|
+
function ht(e) {
|
|
543
714
|
return typeof e == "object" && !!e && "nodeType" in e && typeof e.contains == "function";
|
|
544
715
|
}
|
|
545
|
-
function
|
|
546
|
-
let
|
|
547
|
-
|
|
716
|
+
function gt({ children: e, className: t, containerPadding: n, isOpen: r, onOpenChange: s, triggerRef: l }) {
|
|
717
|
+
let f = pt(), p = a(ct), h = p?.open ?? !0, [g, _] = d(p === null), [v, y] = d(!1), b = u(!1), x = u(null), S = u(null), C = u(null), w = r && h, T = lt("popover", w && g && f !== null, w || v), E = i((e) => {
|
|
718
|
+
x.current = e, y(e !== null);
|
|
548
719
|
}, []);
|
|
549
720
|
return c(() => {
|
|
550
|
-
if (
|
|
551
|
-
}), o(() =>
|
|
552
|
-
if (!
|
|
553
|
-
let e = (e) =>
|
|
554
|
-
|
|
555
|
-
},
|
|
556
|
-
|
|
557
|
-
|
|
721
|
+
if (f && l.current && (l.current.ownerDocument !== document || l.current.getRootNode() !== document || f.ownerDocument !== document || f.getRootNode() !== document)) throw Error(mt);
|
|
722
|
+
}), o(() => _(!0), []), c(() => {
|
|
723
|
+
if (!w || !T.topmost || !f) return;
|
|
724
|
+
let e = (e) => ht(e) && !x.current?.contains(e) && !l.current?.contains(e), t = (e, t) => !!e && !!t && (e === t || e.contains(t) || t.contains(e)), n = (e) => e.button === 0, r = null, i = () => {
|
|
725
|
+
r !== null && (clearTimeout(r), r = null);
|
|
726
|
+
}, a = () => {
|
|
727
|
+
i(), r = setTimeout(() => {
|
|
728
|
+
r = null, C.current = null;
|
|
558
729
|
}, 0);
|
|
559
|
-
},
|
|
560
|
-
n(e) && (
|
|
561
|
-
},
|
|
730
|
+
}, o = (e) => {
|
|
731
|
+
n(e) && (i(), S.current = ht(e.target) ? e.target : null, C.current = null);
|
|
732
|
+
}, c = (t) => {
|
|
562
733
|
if (!n(t)) return;
|
|
563
|
-
let
|
|
564
|
-
if (!e(
|
|
565
|
-
|
|
734
|
+
let r = S.current, i = ht(t.target) ? t.target : null;
|
|
735
|
+
if (!e(i)) {
|
|
736
|
+
S.current = null;
|
|
566
737
|
return;
|
|
567
738
|
}
|
|
568
|
-
if (!e(
|
|
569
|
-
|
|
739
|
+
if (!e(r)) {
|
|
740
|
+
C.current = i, S.current = null, a();
|
|
570
741
|
return;
|
|
571
742
|
}
|
|
572
|
-
|
|
573
|
-
},
|
|
574
|
-
|
|
575
|
-
},
|
|
576
|
-
let
|
|
577
|
-
e(
|
|
743
|
+
C.current = i, s(!1);
|
|
744
|
+
}, u = () => {
|
|
745
|
+
i(), S.current = null, C.current = null;
|
|
746
|
+
}, d = (n) => {
|
|
747
|
+
let r = ht(n.target) ? n.target : null;
|
|
748
|
+
e(r) && !t(C.current, r) && s(!1), i(), S.current = null, C.current = null;
|
|
578
749
|
};
|
|
579
|
-
return
|
|
580
|
-
|
|
750
|
+
return f.ownerDocument.addEventListener("pointerdown", o, !0), f.ownerDocument.addEventListener("pointerup", c, !0), f.ownerDocument.addEventListener("pointercancel", u, !0), f.ownerDocument.addEventListener("click", d, !0), () => {
|
|
751
|
+
f.ownerDocument.removeEventListener("pointerdown", o, !0), f.ownerDocument.removeEventListener("pointerup", c, !0), f.ownerDocument.removeEventListener("pointercancel", u, !0), f.ownerDocument.removeEventListener("click", d, !0), i(), S.current = null, C.current = null;
|
|
581
752
|
};
|
|
582
753
|
}, [
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
754
|
+
f,
|
|
755
|
+
T.topmost,
|
|
756
|
+
s,
|
|
757
|
+
w,
|
|
758
|
+
l
|
|
588
759
|
]), o(() => {
|
|
589
|
-
|
|
760
|
+
h ? b.current = !1 : r && !b.current && (b.current = !0, s(!1));
|
|
590
761
|
}, [
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
]), /* @__PURE__ */ m(
|
|
762
|
+
s,
|
|
763
|
+
h,
|
|
764
|
+
r
|
|
765
|
+
]), /* @__PURE__ */ m(be, {
|
|
595
766
|
className: `${t} breeze-popover`,
|
|
596
|
-
|
|
767
|
+
containerPadding: n,
|
|
768
|
+
"data-breeze-interactive": T.interactive,
|
|
597
769
|
"data-breeze-overlay": "popover",
|
|
598
|
-
"data-breeze-topmost":
|
|
599
|
-
inert: !
|
|
600
|
-
isKeyboardDismissDisabled: !
|
|
770
|
+
"data-breeze-topmost": T.topmost,
|
|
771
|
+
inert: !T.interactive,
|
|
772
|
+
isKeyboardDismissDisabled: !T.topmost,
|
|
601
773
|
isNonModal: !0,
|
|
602
|
-
isOpen:
|
|
603
|
-
onOpenChange:
|
|
774
|
+
isOpen: w,
|
|
775
|
+
onOpenChange: s,
|
|
604
776
|
placement: "bottom start",
|
|
605
|
-
shouldCloseOnInteractOutside: (e) =>
|
|
606
|
-
style: { zIndex:
|
|
607
|
-
triggerRef:
|
|
608
|
-
ref:
|
|
777
|
+
shouldCloseOnInteractOutside: (e) => S.current === null && T.topmost && !l.current?.contains(e),
|
|
778
|
+
style: { zIndex: T.zIndex },
|
|
779
|
+
triggerRef: l,
|
|
780
|
+
ref: E,
|
|
609
781
|
children: e
|
|
610
782
|
});
|
|
611
783
|
}
|
|
612
784
|
//#endregion
|
|
613
|
-
//#region src/primitives/Icon/Icon.tsx
|
|
614
|
-
var rt = {
|
|
615
|
-
add: le,
|
|
616
|
-
back: B,
|
|
617
|
-
building: I,
|
|
618
|
-
calendar: L,
|
|
619
|
-
camera: R,
|
|
620
|
-
check: re,
|
|
621
|
-
clock: ie,
|
|
622
|
-
close: he,
|
|
623
|
-
delete: de,
|
|
624
|
-
document: U,
|
|
625
|
-
download: ae,
|
|
626
|
-
expand: z,
|
|
627
|
-
forward: V,
|
|
628
|
-
lock: se,
|
|
629
|
-
money: oe,
|
|
630
|
-
moneyIn: te,
|
|
631
|
-
moneyOut: ne,
|
|
632
|
-
more: H,
|
|
633
|
-
next: V,
|
|
634
|
-
notifications: F,
|
|
635
|
-
overview: W,
|
|
636
|
-
people: me,
|
|
637
|
-
settings: ue,
|
|
638
|
-
signOut: ce,
|
|
639
|
-
upload: pe,
|
|
640
|
-
warning: fe
|
|
641
|
-
}, it = {
|
|
642
|
-
base: { icon: "breeze:block breeze:shrink-0" },
|
|
643
|
-
compound: {},
|
|
644
|
-
size: {
|
|
645
|
-
lg: "breeze:block-size-breeze-6 breeze:inline-size-breeze-6",
|
|
646
|
-
md: "breeze:block-size-breeze-5 breeze:inline-size-breeze-5",
|
|
647
|
-
sm: "breeze:block-size-breeze-4 breeze:inline-size-breeze-4"
|
|
648
|
-
},
|
|
649
|
-
state: { logicalDirection: "breeze:rtl:rotate-180" },
|
|
650
|
-
variant: {}
|
|
651
|
-
}, at = /* @__PURE__ */ new Set([
|
|
652
|
-
"back",
|
|
653
|
-
"forward",
|
|
654
|
-
"next"
|
|
655
|
-
]);
|
|
656
|
-
function ot({ label: e, name: t, size: n = "md" }) {
|
|
657
|
-
let r = rt[t], i = e?.trim() || void 0;
|
|
658
|
-
return /* @__PURE__ */ m(r, {
|
|
659
|
-
"aria-hidden": i === void 0 || void 0,
|
|
660
|
-
"aria-label": i,
|
|
661
|
-
className: [
|
|
662
|
-
it.base.icon,
|
|
663
|
-
it.size[n],
|
|
664
|
-
at.has(t) && it.state.logicalDirection
|
|
665
|
-
].filter(Boolean).join(" "),
|
|
666
|
-
focusable: "false",
|
|
667
|
-
role: i === void 0 ? void 0 : "img",
|
|
668
|
-
strokeWidth: 1.75
|
|
669
|
-
});
|
|
670
|
-
}
|
|
671
|
-
//#endregion
|
|
672
785
|
//#region src/primitives/Collection/DescriptorContent.tsx
|
|
673
|
-
function
|
|
786
|
+
function _t({ descriptor: e, isSelected: t }) {
|
|
674
787
|
return /* @__PURE__ */ h(p, { children: [
|
|
675
|
-
e.icon && /* @__PURE__ */ m(
|
|
788
|
+
e.icon && /* @__PURE__ */ m(X, {
|
|
676
789
|
name: e.icon,
|
|
677
790
|
size: "sm"
|
|
678
791
|
}),
|
|
679
792
|
/* @__PURE__ */ h("span", {
|
|
680
|
-
className:
|
|
793
|
+
className: Q.base.content,
|
|
681
794
|
children: [/* @__PURE__ */ m("span", {
|
|
682
|
-
className:
|
|
795
|
+
className: Q.base.label,
|
|
683
796
|
children: e.label
|
|
684
797
|
}), e.description && /* @__PURE__ */ m("span", {
|
|
685
|
-
className:
|
|
798
|
+
className: Q.base.description,
|
|
686
799
|
children: e.description
|
|
687
800
|
})]
|
|
688
801
|
}),
|
|
689
802
|
e.badge && /* @__PURE__ */ m("span", {
|
|
690
|
-
className:
|
|
691
|
-
children: /* @__PURE__ */ m(
|
|
803
|
+
className: Q.base.badge,
|
|
804
|
+
children: /* @__PURE__ */ m(He, {
|
|
692
805
|
"aria-label": e.badge["aria-label"],
|
|
693
806
|
variant: e.badge.variant,
|
|
694
807
|
children: e.badge.children
|
|
@@ -696,8 +809,8 @@ function st({ descriptor: e, isSelected: t }) {
|
|
|
696
809
|
}),
|
|
697
810
|
/* @__PURE__ */ m("span", {
|
|
698
811
|
"aria-hidden": "true",
|
|
699
|
-
className:
|
|
700
|
-
children: t && /* @__PURE__ */ m(
|
|
812
|
+
className: Q.base.selectedIndicator,
|
|
813
|
+
children: t && /* @__PURE__ */ m(X, {
|
|
701
814
|
name: "check",
|
|
702
815
|
size: "sm"
|
|
703
816
|
})
|
|
@@ -706,13 +819,13 @@ function st({ descriptor: e, isSelected: t }) {
|
|
|
706
819
|
}
|
|
707
820
|
//#endregion
|
|
708
821
|
//#region src/primitives/Collection/DescriptorOption.tsx
|
|
709
|
-
function
|
|
710
|
-
return /* @__PURE__ */ m(
|
|
711
|
-
className:
|
|
822
|
+
function vt({ descriptor: e }) {
|
|
823
|
+
return /* @__PURE__ */ m(ye, {
|
|
824
|
+
className: Q.base.item,
|
|
712
825
|
id: e.id,
|
|
713
826
|
isDisabled: e.disabled,
|
|
714
827
|
textValue: e.label,
|
|
715
|
-
children: ({ isSelected: t }) => /* @__PURE__ */ m(
|
|
828
|
+
children: ({ isSelected: t }) => /* @__PURE__ */ m(_t, {
|
|
716
829
|
descriptor: e,
|
|
717
830
|
isSelected: t
|
|
718
831
|
})
|
|
@@ -720,7 +833,7 @@ function ct({ descriptor: e }) {
|
|
|
720
833
|
}
|
|
721
834
|
//#endregion
|
|
722
835
|
//#region src/primitives/ComboBox/ComboBox.tsx
|
|
723
|
-
var
|
|
836
|
+
var yt = {
|
|
724
837
|
base: {
|
|
725
838
|
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",
|
|
726
839
|
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",
|
|
@@ -738,31 +851,31 @@ var Z = {
|
|
|
738
851
|
},
|
|
739
852
|
variant: {}
|
|
740
853
|
};
|
|
741
|
-
function
|
|
854
|
+
function bt(e, t, n, r) {
|
|
742
855
|
let i = t.find(({ item: t }) => t === e);
|
|
743
856
|
if (i) return i;
|
|
744
857
|
if (r && typeof e == "string") return;
|
|
745
858
|
let { id: a } = n(e);
|
|
746
859
|
return t.find((e) => e.descriptor.id === a);
|
|
747
860
|
}
|
|
748
|
-
function
|
|
861
|
+
function xt(e, t, n, r) {
|
|
749
862
|
if (e !== void 0) return e === null || r && typeof e == "string" && !t ? null : t?.id ?? n(e).id;
|
|
750
863
|
}
|
|
751
|
-
function
|
|
864
|
+
function St(e, t, n) {
|
|
752
865
|
if (!(e === void 0 || !n)) return t ? t.descriptor.label : typeof e == "string" ? e : "";
|
|
753
866
|
}
|
|
754
|
-
function
|
|
867
|
+
function Ct(e, t, n) {
|
|
755
868
|
if (!(!n || typeof e != "string" || t)) return e;
|
|
756
869
|
}
|
|
757
|
-
function
|
|
758
|
-
return /* @__PURE__ */ m(
|
|
759
|
-
className:
|
|
870
|
+
function wt({ items: e }) {
|
|
871
|
+
return /* @__PURE__ */ m(ve, {
|
|
872
|
+
className: Q.base.listBox,
|
|
760
873
|
items: e,
|
|
761
|
-
children: (e) => /* @__PURE__ */ m(
|
|
874
|
+
children: (e) => /* @__PURE__ */ m(vt, { descriptor: e.descriptor })
|
|
762
875
|
});
|
|
763
876
|
}
|
|
764
|
-
function
|
|
765
|
-
let c = a(
|
|
877
|
+
function Tt({ allowsCustomValue: e, hasSuggestions: t, isDisabled: n, isReadOnly: r, items: i, triggerRef: s }) {
|
|
878
|
+
let c = a(me), l = n || r, u = !l && (t || e) && (c?.isOpen ?? !1);
|
|
766
879
|
return o(() => {
|
|
767
880
|
(l || !t && !e) && c?.isOpen && c.setOpen(!1);
|
|
768
881
|
}, [
|
|
@@ -770,128 +883,128 @@ function mt({ allowsCustomValue: e, hasSuggestions: t, isDisabled: n, isReadOnly
|
|
|
770
883
|
t,
|
|
771
884
|
l,
|
|
772
885
|
c
|
|
773
|
-
]), /* @__PURE__ */ m(
|
|
774
|
-
className:
|
|
886
|
+
]), /* @__PURE__ */ m(gt, {
|
|
887
|
+
className: yt.base.popover,
|
|
775
888
|
isOpen: u,
|
|
776
889
|
onOpenChange: (e) => c?.setOpen(e),
|
|
777
890
|
triggerRef: s,
|
|
778
|
-
children: /* @__PURE__ */ m(
|
|
891
|
+
children: /* @__PURE__ */ m(wt, { items: i })
|
|
779
892
|
});
|
|
780
893
|
}
|
|
781
|
-
function
|
|
782
|
-
let { allowsCustomValue: t = !1, autoComplete: n, autoFocus: r, defaultValue: i, description: a, disabled: c = !1, error: d, form: f, getItem: p, id: _, items: v, label: y, loading: b = !1, name: x, onChange: S, placeholder: C, readOnly: w = !1, required:
|
|
894
|
+
function Et({ props: e }) {
|
|
895
|
+
let { allowsCustomValue: t = !1, autoComplete: n, autoFocus: r, defaultValue: i, description: a, disabled: c = !1, error: d, form: f, getItem: p, id: _, items: v, label: y, loading: b = !1, name: x, onChange: S, placeholder: C, readOnly: w = !1, required: T = !1, value: E } = e, { messages: D } = G(), { contains: O } = he({ sensitivity: "base" }), k = a?.trim() || void 0, A = d?.trim() || void 0, j = c || b, M = s(), N = `${M}-description`, ee = `${M}-error`, te = [k && N, A && ee].filter(Boolean).join(" ") || void 0, P = u(null), F = l(() => v.map((e) => {
|
|
783
896
|
let t = p(e);
|
|
784
897
|
return {
|
|
785
898
|
descriptor: t,
|
|
786
899
|
id: t.id,
|
|
787
900
|
item: e
|
|
788
901
|
};
|
|
789
|
-
}), [p, v]),
|
|
902
|
+
}), [p, v]), I = E == null ? void 0 : bt(E, F, p, t), L = xt(E, I, p, t), R = i == null ? void 0 : bt(i, F, p, t), ne = xt(i, R, p, t), re = St(E, I, t), z = Ct(i, R, t), B = u(L == null ? null : String(L)), ie = u(re ?? z ?? ""), ae = u(!1), V = S;
|
|
790
903
|
o(() => {
|
|
791
|
-
|
|
792
|
-
}, [
|
|
793
|
-
let
|
|
904
|
+
B.current = L == null ? null : String(L);
|
|
905
|
+
}, [L]);
|
|
906
|
+
let oe = (e) => {
|
|
794
907
|
if (e === null) {
|
|
795
|
-
if (
|
|
796
|
-
let e =
|
|
797
|
-
if (
|
|
908
|
+
if (B.current = null, t) {
|
|
909
|
+
let e = ae.current;
|
|
910
|
+
if (ae.current = !1, ie.current || e) return;
|
|
798
911
|
}
|
|
799
|
-
|
|
912
|
+
V?.(null);
|
|
800
913
|
return;
|
|
801
914
|
}
|
|
802
|
-
|
|
803
|
-
let n =
|
|
804
|
-
|
|
805
|
-
},
|
|
806
|
-
|
|
807
|
-
},
|
|
808
|
-
return /* @__PURE__ */ h(
|
|
915
|
+
ae.current = !1, B.current = String(e);
|
|
916
|
+
let n = F.find((t) => t.descriptor.id === String(e));
|
|
917
|
+
ie.current = n?.descriptor.label ?? "", V?.(n?.item ?? null);
|
|
918
|
+
}, H = (e) => {
|
|
919
|
+
ie.current = e, ae.current = !0, t && F.find((e) => e.descriptor.id === B.current)?.descriptor.label !== e && V?.(e || null);
|
|
920
|
+
}, U = !b && A !== void 0, se = j ? void 0 : x;
|
|
921
|
+
return /* @__PURE__ */ h(pe, {
|
|
809
922
|
allowsCustomValue: t,
|
|
810
923
|
allowsEmptyCollection: t,
|
|
811
924
|
"aria-label": b ? y : void 0,
|
|
812
925
|
className: J.base.root,
|
|
813
|
-
defaultFilter:
|
|
814
|
-
defaultInputValue:
|
|
815
|
-
defaultItems:
|
|
816
|
-
defaultValue:
|
|
926
|
+
defaultFilter: O,
|
|
927
|
+
defaultInputValue: z,
|
|
928
|
+
defaultItems: F,
|
|
929
|
+
defaultValue: ne,
|
|
817
930
|
form: f,
|
|
818
931
|
id: _,
|
|
819
|
-
inputValue:
|
|
820
|
-
isDisabled:
|
|
821
|
-
isInvalid:
|
|
932
|
+
inputValue: re,
|
|
933
|
+
isDisabled: j,
|
|
934
|
+
isInvalid: U,
|
|
822
935
|
isReadOnly: w,
|
|
823
|
-
isRequired:
|
|
936
|
+
isRequired: T,
|
|
824
937
|
menuTrigger: "input",
|
|
825
|
-
name:
|
|
826
|
-
onInputChange:
|
|
827
|
-
onChange:
|
|
828
|
-
value:
|
|
938
|
+
name: se,
|
|
939
|
+
onInputChange: H,
|
|
940
|
+
onChange: oe,
|
|
941
|
+
value: L,
|
|
829
942
|
validationBehavior: "aria",
|
|
830
943
|
children: [
|
|
831
|
-
/* @__PURE__ */ m(
|
|
944
|
+
/* @__PURE__ */ m(tt, {
|
|
832
945
|
label: y,
|
|
833
946
|
loading: b
|
|
834
947
|
}),
|
|
835
|
-
/* @__PURE__ */ h(
|
|
836
|
-
className: Y(
|
|
837
|
-
isDisabled:
|
|
838
|
-
isInvalid:
|
|
948
|
+
/* @__PURE__ */ h(ge, {
|
|
949
|
+
className: Y(yt.base.group, b && yt.state.loadingGroup, w && yt.state.readOnlyGroup),
|
|
950
|
+
isDisabled: j,
|
|
951
|
+
isInvalid: U,
|
|
839
952
|
isReadOnly: w,
|
|
840
|
-
ref:
|
|
953
|
+
ref: P,
|
|
841
954
|
children: [
|
|
842
|
-
/* @__PURE__ */ m(
|
|
955
|
+
/* @__PURE__ */ m(_e, {
|
|
843
956
|
"aria-busy": b || void 0,
|
|
844
|
-
"aria-describedby":
|
|
957
|
+
"aria-describedby": te,
|
|
845
958
|
autoComplete: n,
|
|
846
959
|
autoFocus: r,
|
|
847
|
-
className: Y(
|
|
960
|
+
className: Y(yt.base.input, b && yt.state.loadingInput),
|
|
848
961
|
form: f,
|
|
849
962
|
placeholder: C,
|
|
850
963
|
readOnly: w || void 0
|
|
851
964
|
}),
|
|
852
965
|
/* @__PURE__ */ m(g, {
|
|
853
|
-
"aria-describedby":
|
|
854
|
-
className: Y(
|
|
855
|
-
children: /* @__PURE__ */ m(
|
|
966
|
+
"aria-describedby": te,
|
|
967
|
+
className: Y(yt.base.trigger, b && yt.state.loadingTrigger),
|
|
968
|
+
children: /* @__PURE__ */ m(X, {
|
|
856
969
|
name: "expand",
|
|
857
970
|
size: "sm"
|
|
858
971
|
})
|
|
859
972
|
}),
|
|
860
973
|
b && /* @__PURE__ */ m("span", {
|
|
861
|
-
className:
|
|
974
|
+
className: yt.base.skeleton,
|
|
862
975
|
children: /* @__PURE__ */ m(K, {
|
|
863
976
|
blockSize: "100%",
|
|
864
977
|
inlineSize: "100%",
|
|
865
|
-
label:
|
|
978
|
+
label: D.loading,
|
|
866
979
|
shape: "rectangle"
|
|
867
980
|
})
|
|
868
981
|
})
|
|
869
982
|
]
|
|
870
983
|
}),
|
|
871
|
-
/* @__PURE__ */ m(
|
|
984
|
+
/* @__PURE__ */ m(Tt, {
|
|
872
985
|
allowsCustomValue: t,
|
|
873
|
-
hasSuggestions:
|
|
874
|
-
isDisabled:
|
|
986
|
+
hasSuggestions: F.length > 0,
|
|
987
|
+
isDisabled: j,
|
|
875
988
|
isReadOnly: w,
|
|
876
|
-
items:
|
|
877
|
-
triggerRef:
|
|
989
|
+
items: F,
|
|
990
|
+
triggerRef: P
|
|
878
991
|
}),
|
|
879
|
-
/* @__PURE__ */ m(
|
|
880
|
-
description:
|
|
881
|
-
descriptionId:
|
|
882
|
-
error:
|
|
883
|
-
errorId:
|
|
992
|
+
/* @__PURE__ */ m(nt, {
|
|
993
|
+
description: k,
|
|
994
|
+
descriptionId: N,
|
|
995
|
+
error: A,
|
|
996
|
+
errorId: ee,
|
|
884
997
|
loading: b
|
|
885
998
|
})
|
|
886
999
|
]
|
|
887
1000
|
});
|
|
888
1001
|
}
|
|
889
|
-
function
|
|
890
|
-
return /* @__PURE__ */ m(
|
|
1002
|
+
function Dt(e) {
|
|
1003
|
+
return /* @__PURE__ */ m(Et, { props: e });
|
|
891
1004
|
}
|
|
892
1005
|
//#endregion
|
|
893
1006
|
//#region src/primitives/Container/Container.tsx
|
|
894
|
-
var
|
|
1007
|
+
var Ot = {
|
|
895
1008
|
base: { container: "breeze:mx-auto breeze:inline-size-full breeze:min-inline-size-0" },
|
|
896
1009
|
compound: {},
|
|
897
1010
|
size: {
|
|
@@ -902,21 +1015,356 @@ var _t = {
|
|
|
902
1015
|
state: { padded: "breeze:ps-breeze-4 breeze:pe-breeze-4 breeze:breeze-md:ps-breeze-7 breeze:breeze-md:pe-breeze-7" },
|
|
903
1016
|
variant: {}
|
|
904
1017
|
};
|
|
905
|
-
function
|
|
906
|
-
let { accessibleLabel: o, role: s } =
|
|
1018
|
+
function kt({ "aria-label": e, children: t, element: n = "div", padded: i = !0, width: a = "page" }) {
|
|
1019
|
+
let { accessibleLabel: o, role: s } = Qe(e, n);
|
|
907
1020
|
return r(n, {
|
|
908
1021
|
"aria-label": o,
|
|
909
1022
|
className: [
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
i &&
|
|
1023
|
+
Ot.base.container,
|
|
1024
|
+
Ot.size[a],
|
|
1025
|
+
i && Ot.state.padded
|
|
913
1026
|
].filter(Boolean).join(" "),
|
|
914
1027
|
role: s
|
|
915
1028
|
}, t);
|
|
916
1029
|
}
|
|
917
1030
|
//#endregion
|
|
1031
|
+
//#region src/primitives/Typography/Typography.tsx
|
|
1032
|
+
var At = {
|
|
1033
|
+
base: { text: "breeze:m-0 breeze:font-breeze-sans" },
|
|
1034
|
+
compound: {},
|
|
1035
|
+
size: {},
|
|
1036
|
+
state: {
|
|
1037
|
+
aligned: "breeze:block breeze:inline-size-full",
|
|
1038
|
+
inlineLoading: "breeze:inline-block",
|
|
1039
|
+
numeric: "breeze:tabular-nums breeze:tracking-breeze-tighter",
|
|
1040
|
+
truncate: "breeze:block breeze:min-inline-size-0 breeze:inline-size-full breeze:overflow-hidden breeze:text-ellipsis breeze:whitespace-nowrap"
|
|
1041
|
+
},
|
|
1042
|
+
variant: {
|
|
1043
|
+
align: {
|
|
1044
|
+
center: "breeze:text-center",
|
|
1045
|
+
end: "breeze:text-end",
|
|
1046
|
+
start: "breeze:text-start"
|
|
1047
|
+
},
|
|
1048
|
+
role: {
|
|
1049
|
+
body: "breeze:text-breeze-sm breeze:font-normal breeze:leading-breeze-snug",
|
|
1050
|
+
caption: "breeze:text-breeze-xs breeze:font-medium breeze:leading-breeze-snug",
|
|
1051
|
+
heading: "breeze:text-breeze-2xl breeze:font-semibold breeze:leading-breeze-tight",
|
|
1052
|
+
label: "breeze:text-breeze-xs breeze:font-medium breeze:leading-breeze-snug",
|
|
1053
|
+
micro: "breeze:text-breeze-2xs breeze:font-bold breeze:uppercase breeze:leading-breeze-snug breeze:tracking-breeze-caps",
|
|
1054
|
+
money: "breeze:text-breeze-4xl breeze:font-semibold breeze:leading-breeze-tight breeze:tracking-breeze-tightest breeze:tabular-nums",
|
|
1055
|
+
title: "breeze:text-breeze-md breeze:font-semibold breeze:leading-breeze-snug"
|
|
1056
|
+
},
|
|
1057
|
+
tone: {
|
|
1058
|
+
brand: "breeze:text-breeze-brand-text",
|
|
1059
|
+
danger: "breeze:text-breeze-danger",
|
|
1060
|
+
default: "breeze:text-breeze-ink",
|
|
1061
|
+
muted: "breeze:text-breeze-ink-3",
|
|
1062
|
+
positive: "breeze:text-breeze-pos",
|
|
1063
|
+
secondary: "breeze:text-breeze-ink-2",
|
|
1064
|
+
warning: "breeze:text-breeze-warn"
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
};
|
|
1068
|
+
function jt(e) {
|
|
1069
|
+
return e === "heading" ? "h2" : e === "title" ? "h3" : e === "body" ? "p" : "span";
|
|
1070
|
+
}
|
|
1071
|
+
function Mt(e, t, n, r) {
|
|
1072
|
+
let i;
|
|
1073
|
+
try {
|
|
1074
|
+
i = new Intl.NumberFormat(n, {
|
|
1075
|
+
currency: t,
|
|
1076
|
+
signDisplay: r ?? "auto",
|
|
1077
|
+
style: "currency"
|
|
1078
|
+
}).formatToParts(e);
|
|
1079
|
+
} catch (t) {
|
|
1080
|
+
if (!(t instanceof RangeError)) throw t;
|
|
1081
|
+
i = new Intl.NumberFormat(n, { signDisplay: r ?? "auto" }).formatToParts(e);
|
|
1082
|
+
}
|
|
1083
|
+
return i.map((e) => e.type === "minusSign" ? "−" : e.value).join("");
|
|
1084
|
+
}
|
|
1085
|
+
function Nt(e, t, n) {
|
|
1086
|
+
let r;
|
|
1087
|
+
try {
|
|
1088
|
+
r = y(e).toDate("UTC");
|
|
1089
|
+
} catch {
|
|
1090
|
+
return e;
|
|
1091
|
+
}
|
|
1092
|
+
return new Intl.DateTimeFormat(t, {
|
|
1093
|
+
dateStyle: n ?? "long",
|
|
1094
|
+
timeZone: "UTC"
|
|
1095
|
+
}).format(r);
|
|
1096
|
+
}
|
|
1097
|
+
function Pt(e, t, n) {
|
|
1098
|
+
return e.loading ? /* @__PURE__ */ m(K, {
|
|
1099
|
+
blockSize: "1lh",
|
|
1100
|
+
inlineSize: "8em",
|
|
1101
|
+
label: n
|
|
1102
|
+
}) : e.format === "currency" ? Mt(e.value, e.currency, t, e.sign ?? "auto") : e.format === "date" ? Nt(e.value, t, e.dateStyle) : e.children;
|
|
1103
|
+
}
|
|
1104
|
+
function Ft(e) {
|
|
1105
|
+
let { locale: t, messages: n } = G(), { "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 ?? jt(_), y = i?.trim() || void 0, b = a ?? (_ === "money" || d ? "end" : "start"), x = a !== void 0 || _ === "money" || d, S = Pt(e, t, n.loading), C = c !== void 0 || typeof o == "string" || typeof o == "number", w = !u && y !== void 0 && !C && [
|
|
1106
|
+
"h1",
|
|
1107
|
+
"h2",
|
|
1108
|
+
"h3",
|
|
1109
|
+
"h4"
|
|
1110
|
+
].includes(v), T = !u && y !== void 0 && !C && !w;
|
|
1111
|
+
return !u && y !== void 0 && C && (S = /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("span", {
|
|
1112
|
+
"aria-hidden": "true",
|
|
1113
|
+
children: S
|
|
1114
|
+
}), /* @__PURE__ */ m(Be, { children: y })] })), r(v, {
|
|
1115
|
+
"aria-busy": u || void 0,
|
|
1116
|
+
"aria-label": T || w ? y : void 0,
|
|
1117
|
+
className: [
|
|
1118
|
+
At.base.text,
|
|
1119
|
+
At.variant.role[_],
|
|
1120
|
+
At.variant.tone[f],
|
|
1121
|
+
At.variant.align[b],
|
|
1122
|
+
x && At.state.aligned,
|
|
1123
|
+
u && v === "span" && !x && At.state.inlineLoading,
|
|
1124
|
+
d && _ !== "money" && At.state.numeric,
|
|
1125
|
+
g && At.state.truncate
|
|
1126
|
+
].filter(Boolean).join(" "),
|
|
1127
|
+
id: l,
|
|
1128
|
+
lang: t,
|
|
1129
|
+
role: T ? "group" : void 0
|
|
1130
|
+
}, S);
|
|
1131
|
+
}
|
|
1132
|
+
//#endregion
|
|
1133
|
+
//#region src/primitives/DatePicker/DatePicker.tsx
|
|
1134
|
+
var It = {
|
|
1135
|
+
base: {
|
|
1136
|
+
popover: "breeze:!inline-size-[360px] breeze:max-inline-size-[calc(100vw_-_24px)] breeze:p-breeze-3 breeze:any-pointer-coarse:!p-0 breeze-date-picker-popover",
|
|
1137
|
+
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:gap-breeze-3 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",
|
|
1138
|
+
value: "breeze:min-inline-size-0 breeze:flex-1 breeze:text-start"
|
|
1139
|
+
},
|
|
1140
|
+
compound: {},
|
|
1141
|
+
size: {},
|
|
1142
|
+
state: {},
|
|
1143
|
+
variant: {}
|
|
1144
|
+
};
|
|
1145
|
+
function Lt({ placeholder: e, placeholderLocale: t, value: n, valueId: r }) {
|
|
1146
|
+
return /* @__PURE__ */ m("span", {
|
|
1147
|
+
className: It.base.value,
|
|
1148
|
+
id: r,
|
|
1149
|
+
children: n ? /* @__PURE__ */ m(Ft, {
|
|
1150
|
+
element: "span",
|
|
1151
|
+
format: "date",
|
|
1152
|
+
value: n
|
|
1153
|
+
}) : /* @__PURE__ */ m("span", {
|
|
1154
|
+
lang: t,
|
|
1155
|
+
children: e
|
|
1156
|
+
})
|
|
1157
|
+
});
|
|
1158
|
+
}
|
|
1159
|
+
function Rt(e, t, n, r) {
|
|
1160
|
+
let i = e.getBoundingClientRect().top, { top: a } = t.getBoundingClientRect(), o = a + t.clientTop, s = Math.max(o, 0), c = Math.min(o + t.clientHeight, r);
|
|
1161
|
+
if (c <= s) return;
|
|
1162
|
+
let l = Math.max(s + 8, c - n), u = 0;
|
|
1163
|
+
i < s + 8 ? u = i - (s + 8) : i > l && (u = i - l);
|
|
1164
|
+
let d = t.scrollHeight - t.clientHeight, f = Math.round(Math.max(0, Math.min(d, t.scrollTop + u)));
|
|
1165
|
+
return f === t.scrollTop ? void 0 : f;
|
|
1166
|
+
}
|
|
1167
|
+
function zt(e) {
|
|
1168
|
+
let t = e.ownerDocument.documentElement.clientHeight, n = !1;
|
|
1169
|
+
for (let r = e.parentElement; r !== null; r = r.parentElement) {
|
|
1170
|
+
let { overflowY: i } = getComputedStyle(r);
|
|
1171
|
+
if (["auto", "scroll"].includes(i) && r.scrollHeight > r.clientHeight) {
|
|
1172
|
+
let i = Rt(e, r, 400, t);
|
|
1173
|
+
i !== void 0 && (r.scrollTop = i, n = !0);
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
return n;
|
|
1177
|
+
}
|
|
1178
|
+
function Bt({ calendarKey: e, dialogId: t, disabled: n, isOpen: r, label: i, onChange: a, onOpenChange: s, triggerRef: c, value: l }) {
|
|
1179
|
+
let d = u(null);
|
|
1180
|
+
return o(() => {
|
|
1181
|
+
if (!r) return;
|
|
1182
|
+
let e = d.current, t = e?.closest("[data-breeze-overlay=\"popover\"]");
|
|
1183
|
+
if (!e || !t) return;
|
|
1184
|
+
let n = () => {
|
|
1185
|
+
if (t.hasAttribute("inert") || t.dataset.breezeInteractive !== "true") return !1;
|
|
1186
|
+
let n = e.ownerDocument, { activeElement: r } = n;
|
|
1187
|
+
return (r === c.current || r === n.body || r === n.documentElement) && e.querySelector("[role=\"button\"][tabindex=\"0\"]")?.focus(), !0;
|
|
1188
|
+
}, i = new MutationObserver(() => {
|
|
1189
|
+
n() && i.disconnect();
|
|
1190
|
+
});
|
|
1191
|
+
return i.observe(t, {
|
|
1192
|
+
attributeFilter: ["data-breeze-interactive", "inert"],
|
|
1193
|
+
attributes: !0
|
|
1194
|
+
}), n() && i.disconnect(), () => i.disconnect();
|
|
1195
|
+
}, [r, c]), /* @__PURE__ */ m(gt, {
|
|
1196
|
+
className: It.base.popover,
|
|
1197
|
+
containerPadding: 4,
|
|
1198
|
+
isOpen: r,
|
|
1199
|
+
onOpenChange: s,
|
|
1200
|
+
triggerRef: c,
|
|
1201
|
+
children: /* @__PURE__ */ m(we, {
|
|
1202
|
+
"aria-label": i,
|
|
1203
|
+
id: t,
|
|
1204
|
+
ref: d,
|
|
1205
|
+
children: /* @__PURE__ */ m(Xe, {
|
|
1206
|
+
autoFocus: r,
|
|
1207
|
+
disabled: n,
|
|
1208
|
+
label: i,
|
|
1209
|
+
onChange: a,
|
|
1210
|
+
value: l == null ? null : Je(l)
|
|
1211
|
+
}, e)
|
|
1212
|
+
})
|
|
1213
|
+
});
|
|
1214
|
+
}
|
|
1215
|
+
function Vt({ autoFocus: e = !1, defaultValue: t, description: n, disabled: i = !1, error: a, form: l, id: f, label: p, loading: _ = !1, name: v, onChange: y, placeholder: b, required: x = !0, value: S }) {
|
|
1216
|
+
let { getMessageLocale: C, messages: w } = G(), T = b ?? w.selectDate, E = b === void 0 ? C("selectDate") : void 0, D = n?.trim() || void 0, O = a?.trim() || void 0, k = i || _, A = !_ && O !== void 0, j = s(), M = `${j}-label`, N = `${j}-value`, ee = `${j}-dialog`, te = D ? `${j}-description` : void 0, P = O ? `${j}-error` : void 0, F = x ? `${j}-required` : void 0, I = f ?? `${j}-trigger`, L = u(null), R = u(!1), [ne, re] = d(t), [z, B] = d(!1), [ie, ae] = d(0), [V, oe] = d(!1), H = S === void 0 ? ne : S, U = k || V, se = [
|
|
1217
|
+
te,
|
|
1218
|
+
_ ? void 0 : P,
|
|
1219
|
+
F
|
|
1220
|
+
].filter(Boolean).join(" ") || void 0;
|
|
1221
|
+
c(() => {
|
|
1222
|
+
let e = L.current;
|
|
1223
|
+
if (!e) return;
|
|
1224
|
+
let t = () => {
|
|
1225
|
+
oe(!k && e.matches(":disabled"));
|
|
1226
|
+
};
|
|
1227
|
+
t();
|
|
1228
|
+
let n = new MutationObserver(t);
|
|
1229
|
+
for (let t = e.parentElement; t !== null; t = t.parentElement) t.tagName === "FIELDSET" && n.observe(t, {
|
|
1230
|
+
attributeFilter: ["disabled"],
|
|
1231
|
+
attributes: !0
|
|
1232
|
+
});
|
|
1233
|
+
return () => n.disconnect();
|
|
1234
|
+
}, [k]), o(() => {
|
|
1235
|
+
if (S !== void 0) return;
|
|
1236
|
+
let e = (e) => {
|
|
1237
|
+
let n = L.current?.form;
|
|
1238
|
+
!n || e.target !== n || queueMicrotask(() => {
|
|
1239
|
+
e.defaultPrevented || re(t);
|
|
1240
|
+
});
|
|
1241
|
+
};
|
|
1242
|
+
return document.addEventListener("reset", e, !0), () => document.removeEventListener("reset", e, !0);
|
|
1243
|
+
}, [t, S]), o(() => {
|
|
1244
|
+
U && z && B(!1);
|
|
1245
|
+
}, [U, z]), o(() => {
|
|
1246
|
+
if (!e || U || R.current) return;
|
|
1247
|
+
let t = L.current;
|
|
1248
|
+
!t || t.matches(":disabled") || (t.focus(), R.current = t.ownerDocument.activeElement === t);
|
|
1249
|
+
}, [e, U]);
|
|
1250
|
+
let ce = z && !U, W = (e) => {
|
|
1251
|
+
e && (U || L.current?.matches(":disabled")) || (e && !z && ae((e) => e + 1), B(e));
|
|
1252
|
+
};
|
|
1253
|
+
return /* @__PURE__ */ h("div", {
|
|
1254
|
+
className: J.base.root,
|
|
1255
|
+
"data-required": x || void 0,
|
|
1256
|
+
children: [
|
|
1257
|
+
/* @__PURE__ */ m(tt, {
|
|
1258
|
+
htmlFor: I,
|
|
1259
|
+
id: M,
|
|
1260
|
+
label: p,
|
|
1261
|
+
loading: _,
|
|
1262
|
+
onClick: () => L.current?.focus()
|
|
1263
|
+
}),
|
|
1264
|
+
/* @__PURE__ */ h("span", {
|
|
1265
|
+
className: J.base.control,
|
|
1266
|
+
children: [/* @__PURE__ */ h(g, {
|
|
1267
|
+
className: Y(It.base.trigger, A && "breeze:border-breeze-danger", _ && "breeze:!opacity-0"),
|
|
1268
|
+
isDisabled: k,
|
|
1269
|
+
onPress: () => {
|
|
1270
|
+
if (ce) {
|
|
1271
|
+
W(!1);
|
|
1272
|
+
return;
|
|
1273
|
+
}
|
|
1274
|
+
let e = L.current;
|
|
1275
|
+
if (!(!e || U || e.matches(":disabled"))) {
|
|
1276
|
+
if (zt(e)) {
|
|
1277
|
+
typeof requestAnimationFrame > "u" ? setTimeout(() => W(!0), 0) : requestAnimationFrame(() => W(!0));
|
|
1278
|
+
return;
|
|
1279
|
+
}
|
|
1280
|
+
W(!0);
|
|
1281
|
+
}
|
|
1282
|
+
},
|
|
1283
|
+
ref: L,
|
|
1284
|
+
render: (e) => r("button", {
|
|
1285
|
+
...e,
|
|
1286
|
+
"aria-busy": _ || void 0,
|
|
1287
|
+
"aria-controls": ce ? ee : void 0,
|
|
1288
|
+
"aria-describedby": se,
|
|
1289
|
+
"aria-errormessage": _ ? void 0 : P,
|
|
1290
|
+
"aria-expanded": ce,
|
|
1291
|
+
"aria-haspopup": "dialog",
|
|
1292
|
+
"aria-invalid": A || void 0,
|
|
1293
|
+
"aria-label": _ ? p : void 0,
|
|
1294
|
+
"aria-labelledby": _ ? void 0 : `${M} ${N}`,
|
|
1295
|
+
"data-invalid": A || void 0,
|
|
1296
|
+
form: l,
|
|
1297
|
+
id: I,
|
|
1298
|
+
type: "button"
|
|
1299
|
+
}),
|
|
1300
|
+
children: [/* @__PURE__ */ m(Lt, {
|
|
1301
|
+
placeholder: T,
|
|
1302
|
+
placeholderLocale: E,
|
|
1303
|
+
value: H,
|
|
1304
|
+
valueId: N
|
|
1305
|
+
}), /* @__PURE__ */ m(X, {
|
|
1306
|
+
name: "calendar",
|
|
1307
|
+
size: "sm"
|
|
1308
|
+
})]
|
|
1309
|
+
}), _ && /* @__PURE__ */ m("span", {
|
|
1310
|
+
className: J.base.skeleton,
|
|
1311
|
+
children: /* @__PURE__ */ m(K, {
|
|
1312
|
+
blockSize: "100%",
|
|
1313
|
+
inlineSize: "100%",
|
|
1314
|
+
label: w.loading,
|
|
1315
|
+
shape: "rectangle"
|
|
1316
|
+
})
|
|
1317
|
+
})]
|
|
1318
|
+
}),
|
|
1319
|
+
v && /* @__PURE__ */ m("input", {
|
|
1320
|
+
disabled: k,
|
|
1321
|
+
form: l,
|
|
1322
|
+
name: v,
|
|
1323
|
+
type: "hidden",
|
|
1324
|
+
value: H ?? ""
|
|
1325
|
+
}),
|
|
1326
|
+
x && /* @__PURE__ */ m("span", {
|
|
1327
|
+
className: "breeze:sr-only",
|
|
1328
|
+
id: F,
|
|
1329
|
+
lang: C("required"),
|
|
1330
|
+
children: w.required
|
|
1331
|
+
}),
|
|
1332
|
+
/* @__PURE__ */ m(Bt, {
|
|
1333
|
+
calendarKey: ie,
|
|
1334
|
+
dialogId: ee,
|
|
1335
|
+
disabled: U,
|
|
1336
|
+
isOpen: ce,
|
|
1337
|
+
label: p,
|
|
1338
|
+
onChange: (e) => {
|
|
1339
|
+
if (!e || U || L.current?.matches(":disabled")) return;
|
|
1340
|
+
let t = e.toString();
|
|
1341
|
+
S === void 0 && re(t), y?.(t), W(!1);
|
|
1342
|
+
},
|
|
1343
|
+
onOpenChange: W,
|
|
1344
|
+
triggerRef: L,
|
|
1345
|
+
value: H
|
|
1346
|
+
}),
|
|
1347
|
+
/* @__PURE__ */ m(nt, {
|
|
1348
|
+
description: D,
|
|
1349
|
+
descriptionId: te,
|
|
1350
|
+
loading: _
|
|
1351
|
+
}),
|
|
1352
|
+
O && /* @__PURE__ */ m("p", {
|
|
1353
|
+
"aria-hidden": _ || void 0,
|
|
1354
|
+
className: J.base.error,
|
|
1355
|
+
id: P,
|
|
1356
|
+
children: _ ? /* @__PURE__ */ m(K, {
|
|
1357
|
+
blockSize: "1lh",
|
|
1358
|
+
inlineSize: "12em",
|
|
1359
|
+
shape: "rectangle"
|
|
1360
|
+
}) : O
|
|
1361
|
+
})
|
|
1362
|
+
]
|
|
1363
|
+
});
|
|
1364
|
+
}
|
|
1365
|
+
//#endregion
|
|
918
1366
|
//#region src/overlays/OverlaySurface.tsx
|
|
919
|
-
var
|
|
1367
|
+
var Ht = {
|
|
920
1368
|
base: {
|
|
921
1369
|
content: "breeze-overlay-content",
|
|
922
1370
|
header: "breeze-overlay-header",
|
|
@@ -931,24 +1379,24 @@ var yt = {
|
|
|
931
1379
|
fullscreen: "breeze-fullscreen",
|
|
932
1380
|
popover: "breeze-popover"
|
|
933
1381
|
}
|
|
934
|
-
},
|
|
935
|
-
function
|
|
1382
|
+
}, Ut = "Breeze overlay triggers and portal containers must belong to the current document and light DOM.";
|
|
1383
|
+
function Wt(e) {
|
|
936
1384
|
return typeof e == "object" && !!e && "nodeType" in e && typeof e.contains == "function";
|
|
937
1385
|
}
|
|
938
|
-
function
|
|
1386
|
+
function Gt(e) {
|
|
939
1387
|
return e.dataset?.breezeOverlay !== void 0;
|
|
940
1388
|
}
|
|
941
|
-
function
|
|
942
|
-
let { getMessageLocale: y, messages: b } = G(), x = r === "popover" || r === "fullscreen", S =
|
|
1389
|
+
function Kt({ children: e, defaultOpen: t = !1, dismissible: n = !0, kind: r, onOpenChange: s, open: f, placement: g = "bottom", title: _, trigger: v }) {
|
|
1390
|
+
let { getMessageLocale: y, messages: b } = G(), x = r === "popover" || r === "fullscreen", S = pt(), C = a(ct), [w, T] = d(C === null);
|
|
943
1391
|
o(() => T(!0), []);
|
|
944
|
-
let [E, D] = d(t), O = f ?? E, k = C?.open ?? !0, A = O && k, j = u(null), M = u(null), N = u(null), [
|
|
1392
|
+
let [E, D] = d(t), O = f ?? E, k = C?.open ?? !0, A = O && k, j = u(null), M = u(null), N = u(null), [ee, te] = d(!1), P = u(!1), F = u(null), I = u(null), L = u(null), R = u(null), ne = u(!1);
|
|
945
1393
|
c(() => {
|
|
946
|
-
if (S && j.current && (j.current.ownerDocument !== document || j.current.getRootNode() !== document || S.ownerDocument !== document || S.getRootNode() !== document)) throw Error(
|
|
1394
|
+
if (S && j.current && (j.current.ownerDocument !== document || j.current.getRootNode() !== document || S.ownerDocument !== document || S.getRootNode() !== document)) throw Error(Ut);
|
|
947
1395
|
}, [S]);
|
|
948
|
-
let
|
|
1396
|
+
let re = l(() => r === "fullscreen" ? { current: S } : j, [S, r]), z = lt(r, A && w && S !== null, A || ee), B = i((e) => {
|
|
949
1397
|
if (!e && !k) {
|
|
950
|
-
if (
|
|
951
|
-
O && (
|
|
1398
|
+
if (ne.current) return;
|
|
1399
|
+
O && (ne.current = !0);
|
|
952
1400
|
}
|
|
953
1401
|
f === void 0 && D(e), s?.(e);
|
|
954
1402
|
}, [
|
|
@@ -958,47 +1406,47 @@ function Ct({ children: e, defaultOpen: t = !1, dismissible: n = !0, kind: r, on
|
|
|
958
1406
|
O
|
|
959
1407
|
]);
|
|
960
1408
|
o(() => {
|
|
961
|
-
k ?
|
|
1409
|
+
k ? ne.current = !1 : O && B(!1);
|
|
962
1410
|
}, [
|
|
963
|
-
|
|
1411
|
+
B,
|
|
964
1412
|
k,
|
|
965
1413
|
O
|
|
966
1414
|
]), o(() => {
|
|
967
|
-
if (r !== "popover" || !A || !n || !
|
|
1415
|
+
if (r !== "popover" || !A || !n || !z.topmost || !S) return;
|
|
968
1416
|
let e = () => {
|
|
969
1417
|
I.current !== null && (clearTimeout(I.current), I.current = null);
|
|
970
|
-
}, t = (e, t) => !!e && !!t && (e === t || e.contains(t) || t.contains(e)), i = (e) => e.button === 0, a = (e) =>
|
|
971
|
-
i(t) && (e(), R.current = null, L.current =
|
|
1418
|
+
}, t = (e, t) => !!e && !!t && (e === t || e.contains(t) || t.contains(e)), i = (e) => e.button === 0, a = (e) => Wt(e) && !M.current?.contains(e) && !j.current?.contains(e), o = (t) => {
|
|
1419
|
+
i(t) && (e(), R.current = null, L.current = Wt(t.target) ? t.target : null);
|
|
972
1420
|
}, s = (n) => {
|
|
973
1421
|
if (!i(n)) return;
|
|
974
|
-
let r = L.current, o =
|
|
1422
|
+
let r = L.current, o = Wt(n.target) ? n.target : null;
|
|
975
1423
|
!a(r) || !a(o) || (e(), I.current = setTimeout(() => {
|
|
976
1424
|
I.current = null;
|
|
977
1425
|
let e = R.current, n = L.current;
|
|
978
|
-
R.current = null, L.current = null, !(t(e, o) && t(e, n)) &&
|
|
1426
|
+
R.current = null, L.current = null, !(t(e, o) && t(e, n)) && B(!1);
|
|
979
1427
|
}, 0));
|
|
980
1428
|
}, c = () => {
|
|
981
1429
|
e(), R.current = null, L.current = null;
|
|
982
1430
|
}, l = (n) => {
|
|
983
|
-
let r =
|
|
1431
|
+
let r = Wt(n.target) ? n.target : null;
|
|
984
1432
|
if (e(), a(r)) {
|
|
985
1433
|
let e = R.current, n = L.current;
|
|
986
1434
|
if (R.current = null, L.current = null, t(e, r) && t(e, n)) return;
|
|
987
|
-
|
|
1435
|
+
B(!1);
|
|
988
1436
|
}
|
|
989
1437
|
};
|
|
990
1438
|
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), () => {
|
|
991
1439
|
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;
|
|
992
1440
|
};
|
|
993
1441
|
}, [
|
|
994
|
-
|
|
1442
|
+
B,
|
|
995
1443
|
n,
|
|
996
1444
|
S,
|
|
997
1445
|
r,
|
|
998
|
-
|
|
1446
|
+
z.topmost,
|
|
999
1447
|
A
|
|
1000
1448
|
]);
|
|
1001
|
-
let ie = C?.restoreFocus, ae = C?.id,
|
|
1449
|
+
let ie = C?.restoreFocus, ae = C?.id, V = i(() => {
|
|
1002
1450
|
let e = j.current, t = S?.ownerDocument, n = t?.activeElement;
|
|
1003
1451
|
if (!t || !S) return;
|
|
1004
1452
|
let r = ae ? t.getElementById(ae) : null;
|
|
@@ -1013,132 +1461,132 @@ function Ct({ children: e, defaultOpen: t = !1, dismissible: n = !0, kind: r, on
|
|
|
1013
1461
|
S,
|
|
1014
1462
|
ae,
|
|
1015
1463
|
ie
|
|
1016
|
-
]),
|
|
1464
|
+
]), oe = i(() => {
|
|
1017
1465
|
F.current !== null && (clearTimeout(F.current), F.current = null);
|
|
1018
|
-
}, []),
|
|
1466
|
+
}, []), H = i((e) => {
|
|
1019
1467
|
queueMicrotask(() => {
|
|
1020
|
-
!e.isConnected || e.closest("[inert], [data-exiting]") || (
|
|
1468
|
+
!e.isConnected || e.closest("[inert], [data-exiting]") || (oe(), e.focus({ preventScroll: !0 }), F.current = setTimeout(() => {
|
|
1021
1469
|
let { ownerDocument: t } = e, { activeElement: n } = t;
|
|
1022
|
-
e.isConnected && !e.closest("[inert], [data-exiting]") && (n === e || n === t.body) && (
|
|
1470
|
+
e.isConnected && !e.closest("[inert], [data-exiting]") && (n === e || n === t.body) && (P.current = !0, e.blur(), e.focus({ preventScroll: !0 }), P.current = !1), F.current = null;
|
|
1023
1471
|
}, 500));
|
|
1024
1472
|
});
|
|
1025
|
-
}, [
|
|
1473
|
+
}, [oe]), U = u(A);
|
|
1026
1474
|
o(() => {
|
|
1027
|
-
let e =
|
|
1028
|
-
|
|
1475
|
+
let e = U.current;
|
|
1476
|
+
U.current = A, !(!x || !A || e || !N.current) && H(N.current);
|
|
1029
1477
|
}, [
|
|
1030
|
-
|
|
1478
|
+
H,
|
|
1031
1479
|
x,
|
|
1032
1480
|
A
|
|
1033
1481
|
]);
|
|
1034
1482
|
let se = i((e) => {
|
|
1035
1483
|
N.current = e;
|
|
1036
1484
|
let t = () => {
|
|
1037
|
-
|
|
1485
|
+
oe(), N.current = null, te(!1), requestAnimationFrame(V);
|
|
1038
1486
|
};
|
|
1039
1487
|
if (!e) {
|
|
1040
1488
|
t();
|
|
1041
1489
|
return;
|
|
1042
1490
|
}
|
|
1043
|
-
return te(!0), x &&
|
|
1491
|
+
return te(!0), x && H(e), t;
|
|
1044
1492
|
}, [
|
|
1045
|
-
|
|
1046
|
-
|
|
1493
|
+
oe,
|
|
1494
|
+
H,
|
|
1047
1495
|
x,
|
|
1048
|
-
|
|
1496
|
+
V
|
|
1049
1497
|
]), ce = l(() => ({
|
|
1050
|
-
id:
|
|
1498
|
+
id: z.id,
|
|
1051
1499
|
open: A,
|
|
1052
|
-
restoreFocus:
|
|
1500
|
+
restoreFocus: V
|
|
1053
1501
|
}), [
|
|
1054
|
-
|
|
1502
|
+
z.id,
|
|
1055
1503
|
A,
|
|
1056
|
-
|
|
1057
|
-
]),
|
|
1058
|
-
className:
|
|
1504
|
+
V
|
|
1505
|
+
]), W = /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h("div", {
|
|
1506
|
+
className: Ht.base.header,
|
|
1059
1507
|
children: [/* @__PURE__ */ m("h2", {
|
|
1060
|
-
className:
|
|
1508
|
+
className: Ht.base.title,
|
|
1061
1509
|
children: _
|
|
1062
1510
|
}), /* @__PURE__ */ m("span", {
|
|
1063
1511
|
lang: y("close"),
|
|
1064
|
-
children: /* @__PURE__ */ m(
|
|
1065
|
-
onAction: () =>
|
|
1512
|
+
children: /* @__PURE__ */ m(We, {
|
|
1513
|
+
onAction: () => B(!1),
|
|
1066
1514
|
variant: "quiet",
|
|
1067
1515
|
children: b.close
|
|
1068
1516
|
})
|
|
1069
1517
|
})]
|
|
1070
|
-
}), e] }),
|
|
1518
|
+
}), e] }), le = /* @__PURE__ */ m(ct, {
|
|
1071
1519
|
value: ce,
|
|
1072
1520
|
children: x ? /* @__PURE__ */ m("section", {
|
|
1073
1521
|
"aria-label": _,
|
|
1074
|
-
className:
|
|
1075
|
-
id:
|
|
1522
|
+
className: Ht.base.content,
|
|
1523
|
+
id: z.id,
|
|
1076
1524
|
onBlur: (e) => {
|
|
1077
|
-
if (
|
|
1525
|
+
if (P.current) {
|
|
1078
1526
|
e.stopPropagation();
|
|
1079
1527
|
return;
|
|
1080
1528
|
}
|
|
1081
1529
|
let { relatedTarget: t } = e;
|
|
1082
|
-
r === "popover" && n &&
|
|
1530
|
+
r === "popover" && n && z.topmost && Wt(t) && !e.currentTarget.contains(t) && !j.current?.contains(t) && (R.current = t);
|
|
1083
1531
|
},
|
|
1084
1532
|
ref: se,
|
|
1085
1533
|
role: "dialog",
|
|
1086
1534
|
tabIndex: -1,
|
|
1087
|
-
children:
|
|
1088
|
-
}) : /* @__PURE__ */ m(
|
|
1535
|
+
children: W
|
|
1536
|
+
}) : /* @__PURE__ */ m(we, {
|
|
1089
1537
|
"aria-label": _,
|
|
1090
|
-
className:
|
|
1091
|
-
id:
|
|
1538
|
+
className: Ht.base.content,
|
|
1539
|
+
id: z.id,
|
|
1092
1540
|
ref: se,
|
|
1093
|
-
children:
|
|
1541
|
+
children: W
|
|
1094
1542
|
})
|
|
1095
1543
|
});
|
|
1096
|
-
return /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(
|
|
1097
|
-
"aria-controls": A ?
|
|
1544
|
+
return /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(We, {
|
|
1545
|
+
"aria-controls": A ? z.id : void 0,
|
|
1098
1546
|
"aria-expanded": A,
|
|
1099
1547
|
"aria-haspopup": "dialog",
|
|
1100
|
-
onAction: () =>
|
|
1548
|
+
onAction: () => B(!x || !A),
|
|
1101
1549
|
ref: j,
|
|
1102
1550
|
children: v
|
|
1103
|
-
}), S && w && (x ? /* @__PURE__ */ m(
|
|
1104
|
-
className:
|
|
1551
|
+
}), S && w && (x ? /* @__PURE__ */ m(be, {
|
|
1552
|
+
className: Ht.variant[r],
|
|
1105
1553
|
"data-breeze-overlay": r,
|
|
1106
|
-
"data-breeze-topmost":
|
|
1107
|
-
"data-breeze-interactive":
|
|
1108
|
-
inert: !
|
|
1554
|
+
"data-breeze-topmost": z.topmost,
|
|
1555
|
+
"data-breeze-interactive": z.interactive,
|
|
1556
|
+
inert: !z.interactive,
|
|
1109
1557
|
isNonModal: !0,
|
|
1110
1558
|
isOpen: A,
|
|
1111
|
-
isKeyboardDismissDisabled: !n || !
|
|
1112
|
-
onOpenChange:
|
|
1559
|
+
isKeyboardDismissDisabled: !n || !z.topmost,
|
|
1560
|
+
onOpenChange: B,
|
|
1113
1561
|
placement: g,
|
|
1114
1562
|
ref: M,
|
|
1115
|
-
shouldCloseOnInteractOutside: (e) => r === "popover" && n &&
|
|
1116
|
-
style: { zIndex:
|
|
1117
|
-
triggerRef:
|
|
1118
|
-
children:
|
|
1119
|
-
}) : /* @__PURE__ */ m(
|
|
1563
|
+
shouldCloseOnInteractOutside: (e) => r === "popover" && n && z.topmost && !j.current?.contains(e),
|
|
1564
|
+
style: { zIndex: z.zIndex },
|
|
1565
|
+
triggerRef: re,
|
|
1566
|
+
children: le
|
|
1567
|
+
}) : /* @__PURE__ */ m(Ee, {
|
|
1120
1568
|
className: "breeze-overlay-backdrop",
|
|
1121
1569
|
"data-breeze-overlay": r,
|
|
1122
|
-
"data-breeze-scrim":
|
|
1123
|
-
"data-breeze-topmost":
|
|
1124
|
-
"data-breeze-interactive":
|
|
1125
|
-
inert: !
|
|
1126
|
-
isDismissable: n &&
|
|
1127
|
-
isKeyboardDismissDisabled: !n || !
|
|
1570
|
+
"data-breeze-scrim": z.scrim,
|
|
1571
|
+
"data-breeze-topmost": z.topmost,
|
|
1572
|
+
"data-breeze-interactive": z.interactive,
|
|
1573
|
+
inert: !z.interactive,
|
|
1574
|
+
isDismissable: n && z.topmost,
|
|
1575
|
+
isKeyboardDismissDisabled: !n || !z.topmost,
|
|
1128
1576
|
isOpen: A,
|
|
1129
|
-
onOpenChange:
|
|
1130
|
-
shouldCloseOnInteractOutside: (e) =>
|
|
1131
|
-
style: { zIndex:
|
|
1132
|
-
children: /* @__PURE__ */ m(
|
|
1133
|
-
className:
|
|
1134
|
-
children:
|
|
1577
|
+
onOpenChange: B,
|
|
1578
|
+
shouldCloseOnInteractOutside: (e) => z.topmost && Gt(e),
|
|
1579
|
+
style: { zIndex: z.zIndex },
|
|
1580
|
+
children: /* @__PURE__ */ m(Te, {
|
|
1581
|
+
className: Ht.variant[r],
|
|
1582
|
+
children: le
|
|
1135
1583
|
})
|
|
1136
1584
|
}))] });
|
|
1137
1585
|
}
|
|
1138
1586
|
//#endregion
|
|
1139
1587
|
//#region src/primitives/Dialog/Dialog.tsx
|
|
1140
|
-
function
|
|
1141
|
-
return /* @__PURE__ */ m(
|
|
1588
|
+
function qt({ children: e, defaultOpen: t, dismissible: n, onOpenChange: r, open: i, title: a, trigger: o }) {
|
|
1589
|
+
return /* @__PURE__ */ m(Kt, {
|
|
1142
1590
|
defaultOpen: t,
|
|
1143
1591
|
dismissible: n,
|
|
1144
1592
|
onOpenChange: r,
|
|
@@ -1151,8 +1599,8 @@ function wt({ children: e, defaultOpen: t, dismissible: n, onOpenChange: r, open
|
|
|
1151
1599
|
}
|
|
1152
1600
|
//#endregion
|
|
1153
1601
|
//#region src/primitives/Drawer/Drawer.tsx
|
|
1154
|
-
function
|
|
1155
|
-
return /* @__PURE__ */ m(
|
|
1602
|
+
function Jt({ children: e, defaultOpen: t, dismissible: n, onOpenChange: r, open: i, title: a, trigger: o }) {
|
|
1603
|
+
return /* @__PURE__ */ m(Kt, {
|
|
1156
1604
|
defaultOpen: t,
|
|
1157
1605
|
dismissible: n,
|
|
1158
1606
|
onOpenChange: r,
|
|
@@ -1165,7 +1613,7 @@ function Tt({ children: e, defaultOpen: t, dismissible: n, onOpenChange: r, open
|
|
|
1165
1613
|
}
|
|
1166
1614
|
//#endregion
|
|
1167
1615
|
//#region src/primitives/Grid/Grid.tsx
|
|
1168
|
-
var
|
|
1616
|
+
var Yt = {
|
|
1169
1617
|
base: { grid: "breeze:grid breeze:min-inline-size-0" },
|
|
1170
1618
|
compound: { columns: {
|
|
1171
1619
|
1: {
|
|
@@ -1201,21 +1649,21 @@ var Et = {
|
|
|
1201
1649
|
state: {},
|
|
1202
1650
|
variant: {}
|
|
1203
1651
|
};
|
|
1204
|
-
function
|
|
1205
|
-
let { accessibleLabel: s, role: c } =
|
|
1652
|
+
function Xt({ "aria-label": e, children: t, collapseBelow: n = "md", columns: i = 2, element: a = "div", gap: o = 4 }) {
|
|
1653
|
+
let { accessibleLabel: s, role: c } = Qe(e, a);
|
|
1206
1654
|
return r(a, {
|
|
1207
1655
|
"aria-label": s,
|
|
1208
1656
|
className: [
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1657
|
+
Yt.base.grid,
|
|
1658
|
+
Yt.compound.columns[i][n],
|
|
1659
|
+
Yt.size[o]
|
|
1212
1660
|
].join(" "),
|
|
1213
1661
|
role: c
|
|
1214
1662
|
}, t);
|
|
1215
1663
|
}
|
|
1216
1664
|
//#endregion
|
|
1217
1665
|
//#region src/primitives/IconTile/IconTile.tsx
|
|
1218
|
-
var
|
|
1666
|
+
var Zt = {
|
|
1219
1667
|
base: { tile: "breeze:inline-flex breeze:shrink-0 breeze:items-center breeze:justify-center" },
|
|
1220
1668
|
compound: {},
|
|
1221
1669
|
size: {
|
|
@@ -1237,15 +1685,15 @@ var Ot = {
|
|
|
1237
1685
|
}
|
|
1238
1686
|
}
|
|
1239
1687
|
};
|
|
1240
|
-
function
|
|
1688
|
+
function Qt({ label: e, name: t, shape: n = "square", size: r = "lg", tone: i = "brand" }) {
|
|
1241
1689
|
return /* @__PURE__ */ m("span", {
|
|
1242
1690
|
className: [
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1691
|
+
Zt.base.tile,
|
|
1692
|
+
Zt.variant.tone[i],
|
|
1693
|
+
Zt.variant.shape[n],
|
|
1694
|
+
Zt.size[r]
|
|
1247
1695
|
].join(" "),
|
|
1248
|
-
children: /* @__PURE__ */ m(
|
|
1696
|
+
children: /* @__PURE__ */ m(X, {
|
|
1249
1697
|
label: e,
|
|
1250
1698
|
name: t,
|
|
1251
1699
|
size: r === "lg" ? "md" : "sm"
|
|
@@ -1254,7 +1702,7 @@ function kt({ label: e, name: t, shape: n = "square", size: r = "lg", tone: i =
|
|
|
1254
1702
|
}
|
|
1255
1703
|
//#endregion
|
|
1256
1704
|
//#region src/primitives/Inline/Inline.tsx
|
|
1257
|
-
var
|
|
1705
|
+
var $t = {
|
|
1258
1706
|
base: { inline: "breeze:flex breeze:min-inline-size-0" },
|
|
1259
1707
|
compound: {},
|
|
1260
1708
|
size: {
|
|
@@ -1284,23 +1732,23 @@ var At = {
|
|
|
1284
1732
|
}
|
|
1285
1733
|
}
|
|
1286
1734
|
};
|
|
1287
|
-
function
|
|
1288
|
-
let { accessibleLabel: c, role: l } =
|
|
1735
|
+
function en({ "aria-label": e, children: t, element: n = "div", gap: i = 3, justify: a = "start", verticalAlign: o = "center", wrap: s = !1 }) {
|
|
1736
|
+
let { accessibleLabel: c, role: l } = Qe(e, n);
|
|
1289
1737
|
return r(n, {
|
|
1290
1738
|
"aria-label": c,
|
|
1291
1739
|
className: [
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
s &&
|
|
1740
|
+
$t.base.inline,
|
|
1741
|
+
$t.variant.align[o],
|
|
1742
|
+
$t.variant.justify[a],
|
|
1743
|
+
$t.size[i],
|
|
1744
|
+
s && $t.state.wrap
|
|
1297
1745
|
].filter(Boolean).join(" "),
|
|
1298
1746
|
role: l
|
|
1299
1747
|
}, t);
|
|
1300
1748
|
}
|
|
1301
1749
|
//#endregion
|
|
1302
1750
|
//#region src/primitives/NumberField/NumberField.tsx
|
|
1303
|
-
var
|
|
1751
|
+
var $ = {
|
|
1304
1752
|
base: {
|
|
1305
1753
|
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",
|
|
1306
1754
|
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",
|
|
@@ -1317,9 +1765,9 @@ var Q = {
|
|
|
1317
1765
|
},
|
|
1318
1766
|
variant: {}
|
|
1319
1767
|
};
|
|
1320
|
-
function
|
|
1321
|
-
let { messages: T } = G(), E = i?.trim() || void 0, D = o?.trim() || void 0,
|
|
1322
|
-
return /* @__PURE__ */ h(
|
|
1768
|
+
function tn({ 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 }) {
|
|
1769
|
+
let { messages: T } = G(), E = i?.trim() || void 0, D = o?.trim() || void 0, O = a || d;
|
|
1770
|
+
return /* @__PURE__ */ h(De, {
|
|
1323
1771
|
autoFocus: t,
|
|
1324
1772
|
"aria-label": d ? u : void 0,
|
|
1325
1773
|
className: J.base.root,
|
|
@@ -1327,7 +1775,7 @@ function Mt({ autoComplete: e, autoFocus: t, defaultValue: n, description: i, di
|
|
|
1327
1775
|
form: s,
|
|
1328
1776
|
formatOptions: c,
|
|
1329
1777
|
id: l,
|
|
1330
|
-
isDisabled:
|
|
1778
|
+
isDisabled: O,
|
|
1331
1779
|
isInvalid: !d && D !== void 0,
|
|
1332
1780
|
isReadOnly: b,
|
|
1333
1781
|
isRequired: S,
|
|
@@ -1339,23 +1787,23 @@ function Mt({ autoComplete: e, autoFocus: t, defaultValue: n, description: i, di
|
|
|
1339
1787
|
validationBehavior: "aria",
|
|
1340
1788
|
value: w,
|
|
1341
1789
|
children: [
|
|
1342
|
-
/* @__PURE__ */ m(
|
|
1790
|
+
/* @__PURE__ */ m(tt, {
|
|
1343
1791
|
label: u,
|
|
1344
1792
|
loading: d
|
|
1345
1793
|
}),
|
|
1346
|
-
/* @__PURE__ */ h(
|
|
1347
|
-
className: Y(
|
|
1794
|
+
/* @__PURE__ */ h(ge, {
|
|
1795
|
+
className: Y($.base.group, b && !d && $.state.readOnlyGroup, d && $.state.loadingGroup),
|
|
1348
1796
|
children: [
|
|
1349
|
-
/* @__PURE__ */ m(
|
|
1797
|
+
/* @__PURE__ */ m(_e, {
|
|
1350
1798
|
"aria-busy": d || void 0,
|
|
1351
|
-
className: Y(J.base.input,
|
|
1799
|
+
className: Y(J.base.input, $.base.input, d && $.state.loadingInput),
|
|
1352
1800
|
autoComplete: e,
|
|
1353
1801
|
placeholder: y,
|
|
1354
1802
|
form: s,
|
|
1355
1803
|
ref: x
|
|
1356
1804
|
}),
|
|
1357
1805
|
/* @__PURE__ */ m(g, {
|
|
1358
|
-
className: Y(
|
|
1806
|
+
className: Y($.base.stepButton, d && $.state.loadingStepButton),
|
|
1359
1807
|
render: (e) => r("button", {
|
|
1360
1808
|
...e,
|
|
1361
1809
|
"aria-hidden": d || void 0,
|
|
@@ -1366,7 +1814,7 @@ function Mt({ autoComplete: e, autoFocus: t, defaultValue: n, description: i, di
|
|
|
1366
1814
|
children: "−"
|
|
1367
1815
|
}),
|
|
1368
1816
|
/* @__PURE__ */ m(g, {
|
|
1369
|
-
className: Y(
|
|
1817
|
+
className: Y($.base.stepButton, d && $.state.loadingStepButton),
|
|
1370
1818
|
render: (e) => r("button", {
|
|
1371
1819
|
...e,
|
|
1372
1820
|
"aria-hidden": d || void 0,
|
|
@@ -1377,7 +1825,7 @@ function Mt({ autoComplete: e, autoFocus: t, defaultValue: n, description: i, di
|
|
|
1377
1825
|
children: "+"
|
|
1378
1826
|
}),
|
|
1379
1827
|
d && /* @__PURE__ */ m("span", {
|
|
1380
|
-
className:
|
|
1828
|
+
className: $.base.skeleton,
|
|
1381
1829
|
children: /* @__PURE__ */ m(K, {
|
|
1382
1830
|
blockSize: "100%",
|
|
1383
1831
|
inlineSize: "100%",
|
|
@@ -1387,7 +1835,7 @@ function Mt({ autoComplete: e, autoFocus: t, defaultValue: n, description: i, di
|
|
|
1387
1835
|
})
|
|
1388
1836
|
]
|
|
1389
1837
|
}),
|
|
1390
|
-
/* @__PURE__ */ m(
|
|
1838
|
+
/* @__PURE__ */ m(nt, {
|
|
1391
1839
|
description: E,
|
|
1392
1840
|
error: D,
|
|
1393
1841
|
loading: d
|
|
@@ -1397,8 +1845,8 @@ function Mt({ autoComplete: e, autoFocus: t, defaultValue: n, description: i, di
|
|
|
1397
1845
|
}
|
|
1398
1846
|
//#endregion
|
|
1399
1847
|
//#region src/primitives/Popover/Popover.tsx
|
|
1400
|
-
function
|
|
1401
|
-
return /* @__PURE__ */ m(
|
|
1848
|
+
function nn({ children: e, defaultOpen: t, dismissible: n, onOpenChange: r, open: i, title: a, trigger: o, placement: s }) {
|
|
1849
|
+
return /* @__PURE__ */ m(Kt, {
|
|
1402
1850
|
defaultOpen: t,
|
|
1403
1851
|
dismissible: n,
|
|
1404
1852
|
onOpenChange: r,
|
|
@@ -1412,32 +1860,32 @@ function Nt({ children: e, defaultOpen: t, dismissible: n, onOpenChange: r, open
|
|
|
1412
1860
|
}
|
|
1413
1861
|
//#endregion
|
|
1414
1862
|
//#region src/primitives/Select/Select.tsx
|
|
1415
|
-
var
|
|
1863
|
+
var rn = {
|
|
1416
1864
|
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" },
|
|
1417
1865
|
compound: {},
|
|
1418
1866
|
size: {},
|
|
1419
1867
|
state: { readOnlyTrigger: "breeze:cursor-default breeze:bg-breeze-sunken" },
|
|
1420
1868
|
variant: {}
|
|
1421
1869
|
};
|
|
1422
|
-
function
|
|
1423
|
-
return /* @__PURE__ */ m(
|
|
1424
|
-
className:
|
|
1870
|
+
function an({ items: e }) {
|
|
1871
|
+
return /* @__PURE__ */ m(ve, {
|
|
1872
|
+
className: Q.base.listBox,
|
|
1425
1873
|
items: e,
|
|
1426
|
-
children: (e) => /* @__PURE__ */ m(
|
|
1427
|
-
className:
|
|
1874
|
+
children: (e) => /* @__PURE__ */ m(ye, {
|
|
1875
|
+
className: Q.base.item,
|
|
1428
1876
|
id: e.descriptor.id,
|
|
1429
1877
|
isDisabled: e.descriptor.disabled,
|
|
1430
1878
|
textValue: e.descriptor.label,
|
|
1431
1879
|
value: e,
|
|
1432
|
-
children: ({ isSelected: t }) => /* @__PURE__ */ m(
|
|
1880
|
+
children: ({ isSelected: t }) => /* @__PURE__ */ m(_t, {
|
|
1433
1881
|
descriptor: e.descriptor,
|
|
1434
1882
|
isSelected: t
|
|
1435
1883
|
})
|
|
1436
1884
|
})
|
|
1437
1885
|
});
|
|
1438
1886
|
}
|
|
1439
|
-
function
|
|
1440
|
-
let i = a(
|
|
1887
|
+
function on({ form: e, interactionDisabled: t, name: n, readOnly: r }) {
|
|
1888
|
+
let i = a(ke);
|
|
1441
1889
|
return !r || t || !n || i === null ? null : /* @__PURE__ */ m("input", {
|
|
1442
1890
|
form: e,
|
|
1443
1891
|
name: n,
|
|
@@ -1445,31 +1893,31 @@ function It({ form: e, interactionDisabled: t, name: n, readOnly: r }) {
|
|
|
1445
1893
|
value: i.value === null ? "" : String(i.value)
|
|
1446
1894
|
});
|
|
1447
1895
|
}
|
|
1448
|
-
function
|
|
1449
|
-
let i = a(
|
|
1896
|
+
function sn({ disabled: e, items: t, readOnly: n, triggerRef: r }) {
|
|
1897
|
+
let i = a(ke), s = e || n || t.length === 0, c = !s && (i?.isOpen ?? !1);
|
|
1450
1898
|
return o(() => {
|
|
1451
1899
|
s && i?.isOpen && i.setOpen(!1);
|
|
1452
|
-
}, [s, i]), /* @__PURE__ */ m(
|
|
1453
|
-
className:
|
|
1900
|
+
}, [s, i]), /* @__PURE__ */ m(gt, {
|
|
1901
|
+
className: Q.base.popover,
|
|
1454
1902
|
isOpen: c,
|
|
1455
1903
|
onOpenChange: (e) => i?.setOpen(e),
|
|
1456
1904
|
triggerRef: r,
|
|
1457
|
-
children: /* @__PURE__ */ m(
|
|
1905
|
+
children: /* @__PURE__ */ m(an, { items: t })
|
|
1458
1906
|
});
|
|
1459
1907
|
}
|
|
1460
|
-
function
|
|
1461
|
-
let { messages: T } = G(), E = i?.trim() || void 0, D = o?.trim() || void 0, O = a || v, k = !v && D !== void 0, A = s(), j = f ?? `${A}-control`,
|
|
1908
|
+
function cn({ autoComplete: e, autoFocus: t, defaultValue: n, description: i, disabled: a = !1, error: o, form: c, getItem: d, id: f, items: p, label: _, loading: v = !1, name: y, onChange: b, placeholder: x, readOnly: S = !1, required: C = !1, value: w }) {
|
|
1909
|
+
let { messages: T } = G(), E = i?.trim() || void 0, D = o?.trim() || void 0, O = a || v, k = !v && D !== void 0, A = s(), j = f ?? `${A}-control`, M = u(null), N = l(() => p.map((e) => ({
|
|
1462
1910
|
descriptor: d(e),
|
|
1463
1911
|
item: e
|
|
1464
|
-
})), [d, p]),
|
|
1465
|
-
|
|
1466
|
-
let
|
|
1467
|
-
return /* @__PURE__ */ h(
|
|
1912
|
+
})), [d, p]), ee;
|
|
1913
|
+
ee = w === void 0 ? void 0 : w === null ? null : d(w).id;
|
|
1914
|
+
let te = n == null ? null : d(n).id;
|
|
1915
|
+
return /* @__PURE__ */ h(Oe, {
|
|
1468
1916
|
"aria-label": v ? _ : void 0,
|
|
1469
1917
|
autoComplete: e,
|
|
1470
1918
|
autoFocus: t,
|
|
1471
1919
|
className: J.base.root,
|
|
1472
|
-
defaultValue:
|
|
1920
|
+
defaultValue: te,
|
|
1473
1921
|
form: c,
|
|
1474
1922
|
id: j,
|
|
1475
1923
|
isDisabled: O || S,
|
|
@@ -1478,25 +1926,25 @@ function Rt({ autoComplete: e, autoFocus: t, defaultValue: n, description: i, di
|
|
|
1478
1926
|
name: y,
|
|
1479
1927
|
onChange: (e) => {
|
|
1480
1928
|
if (S) return;
|
|
1481
|
-
let t = e === null ? void 0 :
|
|
1929
|
+
let t = e === null ? void 0 : N.find(({ descriptor: t }) => t.id === String(e));
|
|
1482
1930
|
b?.(t?.item ?? null);
|
|
1483
1931
|
},
|
|
1484
1932
|
placeholder: x,
|
|
1485
1933
|
validationBehavior: "aria",
|
|
1486
|
-
value:
|
|
1934
|
+
value: ee,
|
|
1487
1935
|
children: [
|
|
1488
|
-
/* @__PURE__ */ m(
|
|
1936
|
+
/* @__PURE__ */ m(tt, {
|
|
1489
1937
|
htmlFor: j,
|
|
1490
1938
|
label: _,
|
|
1491
1939
|
loading: v,
|
|
1492
|
-
onClick: () =>
|
|
1940
|
+
onClick: () => M.current?.focus()
|
|
1493
1941
|
}),
|
|
1494
1942
|
/* @__PURE__ */ h("div", {
|
|
1495
1943
|
className: J.base.control,
|
|
1496
1944
|
children: [/* @__PURE__ */ h(g, {
|
|
1497
|
-
className: Y(
|
|
1945
|
+
className: Y(rn.base.trigger, S && rn.state.readOnlyTrigger, v && "breeze:!opacity-0"),
|
|
1498
1946
|
isDisabled: O,
|
|
1499
|
-
ref:
|
|
1947
|
+
ref: M,
|
|
1500
1948
|
render: (e) => r("button", {
|
|
1501
1949
|
...e,
|
|
1502
1950
|
"aria-busy": v || void 0,
|
|
@@ -1505,10 +1953,10 @@ function Rt({ autoComplete: e, autoFocus: t, defaultValue: n, description: i, di
|
|
|
1505
1953
|
"data-invalid": k || void 0,
|
|
1506
1954
|
type: "button"
|
|
1507
1955
|
}),
|
|
1508
|
-
children: [/* @__PURE__ */ m(
|
|
1509
|
-
className: Y(
|
|
1956
|
+
children: [/* @__PURE__ */ m(Ae, {
|
|
1957
|
+
className: Y(Q.base.content, "breeze:text-start"),
|
|
1510
1958
|
children: ({ isPlaceholder: e, selectedText: t }) => e ? x ?? "" : t
|
|
1511
|
-
}), /* @__PURE__ */ m(
|
|
1959
|
+
}), /* @__PURE__ */ m(X, {
|
|
1512
1960
|
name: "expand",
|
|
1513
1961
|
size: "sm"
|
|
1514
1962
|
})]
|
|
@@ -1522,19 +1970,19 @@ function Rt({ autoComplete: e, autoFocus: t, defaultValue: n, description: i, di
|
|
|
1522
1970
|
})
|
|
1523
1971
|
})]
|
|
1524
1972
|
}),
|
|
1525
|
-
/* @__PURE__ */ m(
|
|
1973
|
+
/* @__PURE__ */ m(sn, {
|
|
1526
1974
|
disabled: O,
|
|
1527
|
-
items:
|
|
1975
|
+
items: N,
|
|
1528
1976
|
readOnly: S,
|
|
1529
|
-
triggerRef:
|
|
1977
|
+
triggerRef: M
|
|
1530
1978
|
}),
|
|
1531
|
-
/* @__PURE__ */ m(
|
|
1979
|
+
/* @__PURE__ */ m(on, {
|
|
1532
1980
|
form: c,
|
|
1533
1981
|
interactionDisabled: O,
|
|
1534
1982
|
name: y,
|
|
1535
1983
|
readOnly: S
|
|
1536
1984
|
}),
|
|
1537
|
-
/* @__PURE__ */ m(
|
|
1985
|
+
/* @__PURE__ */ m(nt, {
|
|
1538
1986
|
description: E,
|
|
1539
1987
|
error: D,
|
|
1540
1988
|
loading: v
|
|
@@ -1544,7 +1992,7 @@ function Rt({ autoComplete: e, autoFocus: t, defaultValue: n, description: i, di
|
|
|
1544
1992
|
}
|
|
1545
1993
|
//#endregion
|
|
1546
1994
|
//#region src/primitives/Separator/Separator.tsx
|
|
1547
|
-
var
|
|
1995
|
+
var ln = {
|
|
1548
1996
|
base: { separator: "breeze:m-0 breeze:shrink-0 breeze:border-0 breeze:bg-breeze-line breeze:forced-colors:bg-[CanvasText]" },
|
|
1549
1997
|
compound: {},
|
|
1550
1998
|
size: {},
|
|
@@ -1554,15 +2002,15 @@ var zt = {
|
|
|
1554
2002
|
vertical: "breeze:block-size-full breeze:inline-size-breeze-px"
|
|
1555
2003
|
}
|
|
1556
2004
|
};
|
|
1557
|
-
function
|
|
2005
|
+
function un({ orientation: e = "horizontal" }) {
|
|
1558
2006
|
return /* @__PURE__ */ m("hr", {
|
|
1559
2007
|
"aria-orientation": e,
|
|
1560
|
-
className: [
|
|
2008
|
+
className: [ln.base.separator, ln.variant[e]].join(" ")
|
|
1561
2009
|
});
|
|
1562
2010
|
}
|
|
1563
2011
|
//#endregion
|
|
1564
2012
|
//#region src/primitives/Stack/Stack.tsx
|
|
1565
|
-
var
|
|
2013
|
+
var dn = {
|
|
1566
2014
|
base: { stack: "breeze:flex breeze:min-inline-size-0 breeze:flex-col" },
|
|
1567
2015
|
compound: {},
|
|
1568
2016
|
size: {
|
|
@@ -1584,23 +2032,23 @@ var Vt = {
|
|
|
1584
2032
|
stretch: "breeze:items-stretch"
|
|
1585
2033
|
}
|
|
1586
2034
|
};
|
|
1587
|
-
function
|
|
1588
|
-
let { accessibleLabel: o, role: s } =
|
|
2035
|
+
function fn({ "aria-label": e, children: t, element: n = "div", gap: i = 3, horizontalAlign: a = "stretch" }) {
|
|
2036
|
+
let { accessibleLabel: o, role: s } = Qe(e, n);
|
|
1589
2037
|
return r(n, {
|
|
1590
2038
|
"aria-label": o,
|
|
1591
2039
|
className: [
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
2040
|
+
dn.base.stack,
|
|
2041
|
+
dn.variant[a],
|
|
2042
|
+
dn.size[i]
|
|
1595
2043
|
].join(" "),
|
|
1596
2044
|
role: s
|
|
1597
2045
|
}, t);
|
|
1598
2046
|
}
|
|
1599
2047
|
//#endregion
|
|
1600
2048
|
//#region src/primitives/TextField/TextField.tsx
|
|
1601
|
-
function
|
|
2049
|
+
function pn({ 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 }) {
|
|
1602
2050
|
let { messages: b } = G(), x = r?.trim() || void 0, S = a?.trim() || void 0, C = i || l;
|
|
1603
|
-
return /* @__PURE__ */ h(
|
|
2051
|
+
return /* @__PURE__ */ h(je, {
|
|
1604
2052
|
className: J.base.root,
|
|
1605
2053
|
defaultValue: n,
|
|
1606
2054
|
"aria-label": l ? c : void 0,
|
|
@@ -1615,13 +2063,13 @@ function Ut({ autoComplete: e, autoFocus: t, defaultValue: n, description: r, di
|
|
|
1615
2063
|
validationBehavior: "aria",
|
|
1616
2064
|
value: y,
|
|
1617
2065
|
children: [
|
|
1618
|
-
/* @__PURE__ */ m(
|
|
2066
|
+
/* @__PURE__ */ m(tt, {
|
|
1619
2067
|
label: c,
|
|
1620
2068
|
loading: l
|
|
1621
2069
|
}),
|
|
1622
2070
|
/* @__PURE__ */ h("span", {
|
|
1623
2071
|
className: J.base.control,
|
|
1624
|
-
children: [/* @__PURE__ */ m(
|
|
2072
|
+
children: [/* @__PURE__ */ m(_e, {
|
|
1625
2073
|
"aria-busy": l || void 0,
|
|
1626
2074
|
className: Y(J.base.input, l && J.state.loadingInput),
|
|
1627
2075
|
autoComplete: e,
|
|
@@ -1639,7 +2087,7 @@ function Ut({ autoComplete: e, autoFocus: t, defaultValue: n, description: r, di
|
|
|
1639
2087
|
})
|
|
1640
2088
|
})]
|
|
1641
2089
|
}),
|
|
1642
|
-
/* @__PURE__ */ m(
|
|
2090
|
+
/* @__PURE__ */ m(nt, {
|
|
1643
2091
|
description: x,
|
|
1644
2092
|
error: S,
|
|
1645
2093
|
loading: l
|
|
@@ -1649,18 +2097,18 @@ function Ut({ autoComplete: e, autoFocus: t, defaultValue: n, description: r, di
|
|
|
1649
2097
|
}
|
|
1650
2098
|
//#endregion
|
|
1651
2099
|
//#region src/primitives/Toast/Toast.tsx
|
|
1652
|
-
var
|
|
1653
|
-
function
|
|
2100
|
+
var mn = 2600, hn = "BreezeProvider toastLimit must be a positive integer.", gn = "Toast components must be rendered within BreezeProvider.";
|
|
2101
|
+
function _n(e) {
|
|
1654
2102
|
return e.isIntersecting && e.intersectionRatio >= 1;
|
|
1655
2103
|
}
|
|
1656
|
-
function
|
|
2104
|
+
function vn(e, t, n, r) {
|
|
1657
2105
|
let i = Number(e.target.dataset.breezeToastId);
|
|
1658
|
-
t.has(i) && (
|
|
2106
|
+
t.has(i) && (_n(e) ? n(i) : r(i));
|
|
1659
2107
|
}
|
|
1660
|
-
var
|
|
1661
|
-
function
|
|
2108
|
+
var yn = n(null), bn = n(!0), xn = n(null);
|
|
2109
|
+
function Sn({ children: e }) {
|
|
1662
2110
|
G();
|
|
1663
|
-
let t = a(
|
|
2111
|
+
let t = a(bn), n = a(xn), [r, i] = d(() => n?.message ?? null);
|
|
1664
2112
|
return o(() => {
|
|
1665
2113
|
if (!t || typeof document < "u" && document.hidden || r === e) return;
|
|
1666
2114
|
let a = setTimeout(() => {
|
|
@@ -1678,15 +2126,15 @@ function Qt({ children: e }) {
|
|
|
1678
2126
|
"aria-live": "polite",
|
|
1679
2127
|
className: "breeze-toast",
|
|
1680
2128
|
role: "status",
|
|
1681
|
-
children: [/* @__PURE__ */ m(
|
|
2129
|
+
children: [/* @__PURE__ */ m(X, {
|
|
1682
2130
|
name: "check",
|
|
1683
2131
|
size: "sm"
|
|
1684
2132
|
}), /* @__PURE__ */ m("span", { children: r })]
|
|
1685
2133
|
});
|
|
1686
2134
|
}
|
|
1687
|
-
function
|
|
1688
|
-
let n =
|
|
1689
|
-
if (!Number.isInteger(t) || t < 1) throw RangeError(
|
|
2135
|
+
function Cn({ children: e, limit: t }) {
|
|
2136
|
+
let n = pt(), r = st(), 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());
|
|
2137
|
+
if (!Number.isInteger(t) || t < 1) throw RangeError(hn);
|
|
1690
2138
|
let b = i((e, t) => {
|
|
1691
2139
|
let n = y.current.get(e);
|
|
1692
2140
|
n !== void 0 && (n.message = t);
|
|
@@ -1721,7 +2169,7 @@ function $t({ children: e, limit: t }) {
|
|
|
1721
2169
|
if (!s || typeof document < "u" && document.hidden || t !== void 0 && t.handle !== null) return;
|
|
1722
2170
|
let n = t ?? {
|
|
1723
2171
|
handle: null,
|
|
1724
|
-
remaining:
|
|
2172
|
+
remaining: mn,
|
|
1725
2173
|
startedAt: null
|
|
1726
2174
|
};
|
|
1727
2175
|
if (n.remaining <= 0) {
|
|
@@ -1755,7 +2203,7 @@ function $t({ children: e, limit: t }) {
|
|
|
1755
2203
|
}
|
|
1756
2204
|
let o, c = setTimeout(() => {
|
|
1757
2205
|
o = new IntersectionObserver((e) => {
|
|
1758
|
-
e.forEach((e) =>
|
|
2206
|
+
e.forEach((e) => vn(e, r, D, w));
|
|
1759
2207
|
}, { threshold: 1 }), Array.from(i.children).forEach((e) => {
|
|
1760
2208
|
e instanceof HTMLElement && e.dataset.breezeToastId !== void 0 && !e.hidden && o?.observe(e);
|
|
1761
2209
|
});
|
|
@@ -1773,11 +2221,11 @@ function $t({ children: e, limit: t }) {
|
|
|
1773
2221
|
D
|
|
1774
2222
|
]), o(() => C, [C]);
|
|
1775
2223
|
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));
|
|
1776
|
-
return /* @__PURE__ */ m(
|
|
2224
|
+
return /* @__PURE__ */ m(bn, {
|
|
1777
2225
|
value: s,
|
|
1778
|
-
children: /* @__PURE__ */ h(
|
|
2226
|
+
children: /* @__PURE__ */ h(yn, {
|
|
1779
2227
|
value: x,
|
|
1780
|
-
children: [e, n &&
|
|
2228
|
+
children: [e, n && Me(/* @__PURE__ */ m("div", {
|
|
1781
2229
|
ref: a,
|
|
1782
2230
|
className: "breeze-toast-region",
|
|
1783
2231
|
"data-breeze-toast-region": "",
|
|
@@ -1790,11 +2238,11 @@ function $t({ children: e, limit: t }) {
|
|
|
1790
2238
|
"aria-hidden": n ? "true" : void 0,
|
|
1791
2239
|
"data-breeze-toast-id": e,
|
|
1792
2240
|
hidden: n,
|
|
1793
|
-
children: /* @__PURE__ */ m(
|
|
2241
|
+
children: /* @__PURE__ */ m(xn, {
|
|
1794
2242
|
value: y.current.get(e) ?? null,
|
|
1795
|
-
children: /* @__PURE__ */ m(
|
|
2243
|
+
children: /* @__PURE__ */ m(bn, {
|
|
1796
2244
|
value: s && !n,
|
|
1797
|
-
children: /* @__PURE__ */ m(
|
|
2245
|
+
children: /* @__PURE__ */ m(Sn, { children: t })
|
|
1798
2246
|
})
|
|
1799
2247
|
})
|
|
1800
2248
|
}, e);
|
|
@@ -1803,130 +2251,30 @@ function $t({ children: e, limit: t }) {
|
|
|
1803
2251
|
})
|
|
1804
2252
|
});
|
|
1805
2253
|
}
|
|
1806
|
-
function
|
|
1807
|
-
let e = a(
|
|
1808
|
-
if (e === null) throw Error(
|
|
2254
|
+
function wn() {
|
|
2255
|
+
let e = a(yn);
|
|
2256
|
+
if (e === null) throw Error(gn);
|
|
1809
2257
|
return e;
|
|
1810
2258
|
}
|
|
1811
2259
|
//#endregion
|
|
1812
|
-
//#region src/primitives/Typography/Typography.tsx
|
|
1813
|
-
var $ = {
|
|
1814
|
-
base: { text: "breeze:m-0 breeze:font-breeze-sans" },
|
|
1815
|
-
compound: {},
|
|
1816
|
-
size: {},
|
|
1817
|
-
state: {
|
|
1818
|
-
aligned: "breeze:block breeze:inline-size-full",
|
|
1819
|
-
inlineLoading: "breeze:inline-block",
|
|
1820
|
-
numeric: "breeze:tabular-nums breeze:tracking-breeze-tighter",
|
|
1821
|
-
truncate: "breeze:block breeze:min-inline-size-0 breeze:inline-size-full breeze:overflow-hidden breeze:text-ellipsis breeze:whitespace-nowrap"
|
|
1822
|
-
},
|
|
1823
|
-
variant: {
|
|
1824
|
-
align: {
|
|
1825
|
-
center: "breeze:text-center",
|
|
1826
|
-
end: "breeze:text-end",
|
|
1827
|
-
start: "breeze:text-start"
|
|
1828
|
-
},
|
|
1829
|
-
role: {
|
|
1830
|
-
body: "breeze:text-breeze-sm breeze:font-normal breeze:leading-breeze-snug",
|
|
1831
|
-
caption: "breeze:text-breeze-xs breeze:font-medium breeze:leading-breeze-snug",
|
|
1832
|
-
heading: "breeze:text-breeze-2xl breeze:font-semibold breeze:leading-breeze-tight",
|
|
1833
|
-
label: "breeze:text-breeze-xs breeze:font-medium breeze:leading-breeze-snug",
|
|
1834
|
-
micro: "breeze:text-breeze-2xs breeze:font-bold breeze:uppercase breeze:leading-breeze-snug breeze:tracking-breeze-caps",
|
|
1835
|
-
money: "breeze:text-breeze-4xl breeze:font-semibold breeze:leading-breeze-tight breeze:tracking-breeze-tightest breeze:tabular-nums",
|
|
1836
|
-
title: "breeze:text-breeze-md breeze:font-semibold breeze:leading-breeze-snug"
|
|
1837
|
-
},
|
|
1838
|
-
tone: {
|
|
1839
|
-
brand: "breeze:text-breeze-brand-text",
|
|
1840
|
-
danger: "breeze:text-breeze-danger",
|
|
1841
|
-
default: "breeze:text-breeze-ink",
|
|
1842
|
-
muted: "breeze:text-breeze-ink-3",
|
|
1843
|
-
positive: "breeze:text-breeze-pos",
|
|
1844
|
-
secondary: "breeze:text-breeze-ink-2",
|
|
1845
|
-
warning: "breeze:text-breeze-warn"
|
|
1846
|
-
}
|
|
1847
|
-
}
|
|
1848
|
-
};
|
|
1849
|
-
function tn(e) {
|
|
1850
|
-
return e === "heading" ? "h2" : e === "title" ? "h3" : e === "body" ? "p" : "span";
|
|
1851
|
-
}
|
|
1852
|
-
function nn(e, t, n, r) {
|
|
1853
|
-
let i;
|
|
1854
|
-
try {
|
|
1855
|
-
i = new Intl.NumberFormat(n, {
|
|
1856
|
-
currency: t,
|
|
1857
|
-
signDisplay: r ?? "auto",
|
|
1858
|
-
style: "currency"
|
|
1859
|
-
}).formatToParts(e);
|
|
1860
|
-
} catch (t) {
|
|
1861
|
-
if (!(t instanceof RangeError)) throw t;
|
|
1862
|
-
i = new Intl.NumberFormat(n, { signDisplay: r ?? "auto" }).formatToParts(e);
|
|
1863
|
-
}
|
|
1864
|
-
return i.map((e) => e.type === "minusSign" ? "−" : e.value).join("");
|
|
1865
|
-
}
|
|
1866
|
-
function rn(e, t, n) {
|
|
1867
|
-
let r;
|
|
1868
|
-
try {
|
|
1869
|
-
r = Te(e).toDate("UTC");
|
|
1870
|
-
} catch {
|
|
1871
|
-
return e;
|
|
1872
|
-
}
|
|
1873
|
-
return new Intl.DateTimeFormat(t, {
|
|
1874
|
-
dateStyle: n ?? "long",
|
|
1875
|
-
timeZone: "UTC"
|
|
1876
|
-
}).format(r);
|
|
1877
|
-
}
|
|
1878
|
-
function an(e, t, n) {
|
|
1879
|
-
return e.loading ? /* @__PURE__ */ m(K, {
|
|
1880
|
-
blockSize: "1lh",
|
|
1881
|
-
inlineSize: "8em",
|
|
1882
|
-
label: n
|
|
1883
|
-
}) : e.format === "currency" ? nn(e.value, e.currency, t, e.sign ?? "auto") : e.format === "date" ? rn(e.value, t, e.dateStyle) : e.children;
|
|
1884
|
-
}
|
|
1885
|
-
function on(e) {
|
|
1886
|
-
let { locale: t, messages: n } = G(), { "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 ?? tn(_), y = i?.trim() || void 0, b = a ?? (_ === "money" || d ? "end" : "start"), x = a !== void 0 || _ === "money" || d, S = an(e, t, n.loading), C = c !== void 0 || typeof o == "string" || typeof o == "number", w = !u && y !== void 0 && !C && [
|
|
1887
|
-
"h1",
|
|
1888
|
-
"h2",
|
|
1889
|
-
"h3",
|
|
1890
|
-
"h4"
|
|
1891
|
-
].includes(v), T = !u && y !== void 0 && !C && !w;
|
|
1892
|
-
return !u && y !== void 0 && C && (S = /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("span", {
|
|
1893
|
-
"aria-hidden": "true",
|
|
1894
|
-
children: S
|
|
1895
|
-
}), /* @__PURE__ */ m(Ne, { children: y })] })), r(v, {
|
|
1896
|
-
"aria-busy": u || void 0,
|
|
1897
|
-
"aria-label": T || w ? y : void 0,
|
|
1898
|
-
className: [
|
|
1899
|
-
$.base.text,
|
|
1900
|
-
$.variant.role[_],
|
|
1901
|
-
$.variant.tone[f],
|
|
1902
|
-
$.variant.align[b],
|
|
1903
|
-
x && $.state.aligned,
|
|
1904
|
-
u && v === "span" && !x && $.state.inlineLoading,
|
|
1905
|
-
d && _ !== "money" && $.state.numeric,
|
|
1906
|
-
g && $.state.truncate
|
|
1907
|
-
].filter(Boolean).join(" "),
|
|
1908
|
-
id: l,
|
|
1909
|
-
lang: t,
|
|
1910
|
-
role: T ? "group" : void 0
|
|
1911
|
-
}, S);
|
|
1912
|
-
}
|
|
1913
|
-
//#endregion
|
|
1914
2260
|
//#region src/provider/en-GB.ts
|
|
1915
|
-
var
|
|
2261
|
+
var Tn = {
|
|
1916
2262
|
appearance: "Appearance",
|
|
1917
2263
|
appearanceAutomatic: "Auto",
|
|
1918
2264
|
appearanceDark: "Dark",
|
|
1919
2265
|
appearanceLight: "Light",
|
|
1920
2266
|
close: "Close",
|
|
1921
|
-
loading: "Loading"
|
|
2267
|
+
loading: "Loading",
|
|
2268
|
+
required: "Required",
|
|
2269
|
+
selectDate: "Select a date"
|
|
1922
2270
|
};
|
|
1923
2271
|
//#endregion
|
|
1924
2272
|
//#region src/provider/BreezeProvider.tsx
|
|
1925
|
-
function
|
|
2273
|
+
function En(e, t) {
|
|
1926
2274
|
return e === "automatic" ? t ? "dark" : "light" : e;
|
|
1927
2275
|
}
|
|
1928
|
-
function
|
|
1929
|
-
let { direction: t, locale: n } =
|
|
2276
|
+
function Dn({ children: e }) {
|
|
2277
|
+
let { direction: t, locale: n } = Ce();
|
|
1930
2278
|
return /* @__PURE__ */ m("div", {
|
|
1931
2279
|
"data-breeze-root": "",
|
|
1932
2280
|
dir: t,
|
|
@@ -1934,8 +2282,8 @@ function ln({ children: e }) {
|
|
|
1934
2282
|
children: e
|
|
1935
2283
|
});
|
|
1936
2284
|
}
|
|
1937
|
-
function
|
|
1938
|
-
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 =
|
|
2285
|
+
function On({ appearance: e, children: t, defaultAppearance: n = "automatic", locale: r, messages: a, onAppearanceChange: s, portalContainer: u, toastLimit: f = 3 }) {
|
|
2286
|
+
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 = En(y, h);
|
|
1939
2287
|
o(() => {
|
|
1940
2288
|
if (!p) return;
|
|
1941
2289
|
g(p.matches);
|
|
@@ -1952,20 +2300,22 @@ function un({ appearance: e, children: t, defaultAppearance: n = "automatic", lo
|
|
|
1952
2300
|
let x = i((t) => {
|
|
1953
2301
|
e === void 0 && v(t), s?.(t);
|
|
1954
2302
|
}, [e, s]), S = i((e) => a?.[e] === void 0 ? "en-GB" : r, [r, a]);
|
|
1955
|
-
return /* @__PURE__ */ m(
|
|
2303
|
+
return /* @__PURE__ */ m(Se, {
|
|
1956
2304
|
locale: r,
|
|
1957
|
-
children: /* @__PURE__ */ m(
|
|
2305
|
+
children: /* @__PURE__ */ m(Ne, {
|
|
1958
2306
|
value: l(() => ({
|
|
1959
2307
|
appearance: y,
|
|
1960
2308
|
getMessageLocale: S,
|
|
1961
2309
|
locale: r,
|
|
1962
2310
|
messages: {
|
|
1963
|
-
appearance: a?.appearance ??
|
|
1964
|
-
appearanceAutomatic: a?.appearanceAutomatic ??
|
|
1965
|
-
appearanceDark: a?.appearanceDark ??
|
|
1966
|
-
appearanceLight: a?.appearanceLight ??
|
|
1967
|
-
close: a?.close ??
|
|
1968
|
-
loading: a?.loading ??
|
|
2311
|
+
appearance: a?.appearance ?? Tn.appearance,
|
|
2312
|
+
appearanceAutomatic: a?.appearanceAutomatic ?? Tn.appearanceAutomatic,
|
|
2313
|
+
appearanceDark: a?.appearanceDark ?? Tn.appearanceDark,
|
|
2314
|
+
appearanceLight: a?.appearanceLight ?? Tn.appearanceLight,
|
|
2315
|
+
close: a?.close ?? Tn.close,
|
|
2316
|
+
loading: a?.loading ?? Tn.loading,
|
|
2317
|
+
required: a?.required ?? Tn.required,
|
|
2318
|
+
selectDate: a?.selectDate ?? Tn.selectDate
|
|
1969
2319
|
},
|
|
1970
2320
|
resolvedAppearance: b,
|
|
1971
2321
|
setAppearance: x
|
|
@@ -1977,18 +2327,18 @@ function un({ appearance: e, children: t, defaultAppearance: n = "automatic", lo
|
|
|
1977
2327
|
b,
|
|
1978
2328
|
x
|
|
1979
2329
|
]),
|
|
1980
|
-
children: /* @__PURE__ */ m(
|
|
2330
|
+
children: /* @__PURE__ */ m(ft, {
|
|
1981
2331
|
locale: r,
|
|
1982
2332
|
portalContainer: u,
|
|
1983
|
-
children: /* @__PURE__ */ m(
|
|
2333
|
+
children: /* @__PURE__ */ m(Cn, {
|
|
1984
2334
|
limit: f,
|
|
1985
|
-
children: /* @__PURE__ */ m(
|
|
2335
|
+
children: /* @__PURE__ */ m(Dn, { children: t })
|
|
1986
2336
|
})
|
|
1987
2337
|
})
|
|
1988
2338
|
})
|
|
1989
2339
|
});
|
|
1990
2340
|
}
|
|
1991
2341
|
//#endregion
|
|
1992
|
-
export {
|
|
2342
|
+
export { Le as AppearanceControl, He as Badge, On as BreezeProvider, We as Button, Ze as Calendar, et as Card, it as Checkbox, Dt as ComboBox, kt as Container, Vt as DatePicker, qt as Dialog, Jt as Drawer, Xt as Grid, X as Icon, Qt as IconTile, en as Inline, tn as NumberField, nn as Popover, cn as Select, un as Separator, K as Skeleton, fn as Stack, pn as TextField, Sn as Toast, Ft as Typography, Be as VisuallyHidden, wn as useToast };
|
|
1993
2343
|
|
|
1994
2344
|
//# sourceMappingURL=index.js.map
|