@motech-development/breeze-ui 4.7.0 → 4.8.1
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 +8 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +775 -418
- package/lib/index.js.map +1 -1
- package/lib/primitives/Chip/Chip.d.ts +45 -0
- package/lib/primitives/Chip/Chip.d.ts.map +1 -0
- package/lib/primitives/Menu/Menu.d.ts +45 -0
- package/lib/primitives/Menu/Menu.d.ts.map +1 -0
- package/lib/primitives/SelectionControl/SelectionControl.d.ts +21 -0
- package/lib/primitives/SelectionControl/SelectionControl.d.ts.map +1 -0
- package/lib/primitives/Toggle/Toggle.d.ts +48 -0
- package/lib/primitives/Toggle/Toggle.d.ts.map +1 -0
- package/lib/primitives/ToggleGroup/ToggleGroup.d.ts +47 -0
- package/lib/primitives/ToggleGroup/ToggleGroup.d.ts.map +1 -0
- package/lib/styles.css +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -9,33 +9,34 @@ import { parseDate as y } from "@internationalized/date";
|
|
|
9
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
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
11
|
import { useObjectRef as ce } from "react-aria/useObjectRef";
|
|
12
|
-
import { CheckboxButton as
|
|
13
|
-
import { FieldError as
|
|
14
|
-
import { Label as
|
|
15
|
-
import { Text as
|
|
16
|
-
import { ComboBox as
|
|
17
|
-
import { Group as
|
|
18
|
-
import { Input as
|
|
19
|
-
import { ListBox as
|
|
20
|
-
import { Popover as
|
|
21
|
-
import { UNSAFE_PortalProvider as
|
|
22
|
-
import { I18nProvider as
|
|
23
|
-
import { Dialog as
|
|
24
|
-
import { Modal as
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
12
|
+
import { CheckboxButton as le, CheckboxField as ue } from "react-aria-components/Checkbox";
|
|
13
|
+
import { FieldError as de } from "react-aria-components/FieldError";
|
|
14
|
+
import { Label as fe } from "react-aria-components/Label";
|
|
15
|
+
import { Text as pe } from "react-aria-components/Text";
|
|
16
|
+
import { ComboBox as me, ComboBoxStateContext as he, useFilter as ge } from "react-aria-components/ComboBox";
|
|
17
|
+
import { Group as _e } from "react-aria-components/Group";
|
|
18
|
+
import { Input as ve } from "react-aria-components/Input";
|
|
19
|
+
import { ListBox as ye, ListBoxItem as be } from "react-aria-components/ListBox";
|
|
20
|
+
import { Popover as xe } from "react-aria-components/Popover";
|
|
21
|
+
import { UNSAFE_PortalProvider as Se } from "react-aria/PortalProvider";
|
|
22
|
+
import { I18nProvider as Ce, useLocale as we } from "react-aria-components/I18nProvider";
|
|
23
|
+
import { Dialog as Te } from "react-aria-components/Dialog";
|
|
24
|
+
import { Modal as Ee, ModalOverlay as De } from "react-aria-components/Modal";
|
|
25
|
+
import { Menu as Oe, MenuItem as ke, MenuTrigger as Ae } from "react-aria-components/Menu";
|
|
26
|
+
import { NumberField as je } from "react-aria-components/NumberField";
|
|
27
|
+
import { Select as Me, SelectStateContext as Ne, SelectValue as Pe } from "react-aria-components/Select";
|
|
28
|
+
import { TextField as Fe } from "react-aria-components/TextField";
|
|
29
|
+
import { createPortal as Ie } from "react-dom";
|
|
29
30
|
//#region src/provider/BreezeContext.ts
|
|
30
|
-
var
|
|
31
|
-
function
|
|
32
|
-
let e = a(
|
|
31
|
+
var Le = n(null);
|
|
32
|
+
function W() {
|
|
33
|
+
let e = a(Le);
|
|
33
34
|
if (e === null) throw Error("Breeze components must be rendered within BreezeProvider.");
|
|
34
35
|
return e;
|
|
35
36
|
}
|
|
36
37
|
//#endregion
|
|
37
38
|
//#region src/patterns/AppearanceControl/AppearanceControl.tsx
|
|
38
|
-
var
|
|
39
|
+
var Re = {
|
|
39
40
|
base: {
|
|
40
41
|
control: "breeze:flex breeze:items-center breeze:gap-breeze-2 breeze:font-breeze-sans",
|
|
41
42
|
group: "breeze:flex breeze:items-center breeze:gap-breeze-2",
|
|
@@ -46,7 +47,7 @@ var Pe = {
|
|
|
46
47
|
size: {},
|
|
47
48
|
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" },
|
|
48
49
|
variant: {}
|
|
49
|
-
},
|
|
50
|
+
}, ze = [
|
|
50
51
|
{
|
|
51
52
|
message: "appearanceLight",
|
|
52
53
|
value: "light"
|
|
@@ -60,30 +61,30 @@ var Pe = {
|
|
|
60
61
|
value: "dark"
|
|
61
62
|
}
|
|
62
63
|
];
|
|
63
|
-
function
|
|
64
|
-
return
|
|
64
|
+
function Be(e) {
|
|
65
|
+
return ze.some((t) => t.value === e);
|
|
65
66
|
}
|
|
66
|
-
function
|
|
67
|
-
let { appearance: n, getMessageLocale: r, messages: i, setAppearance: a } =
|
|
67
|
+
function Ve() {
|
|
68
|
+
let { appearance: n, getMessageLocale: r, messages: i, setAppearance: a } = W();
|
|
68
69
|
return /* @__PURE__ */ h("div", {
|
|
69
|
-
className:
|
|
70
|
+
className: Re.base.control,
|
|
70
71
|
children: [/* @__PURE__ */ m("span", {
|
|
71
|
-
className:
|
|
72
|
+
className: Re.base.label,
|
|
72
73
|
lang: r("appearance"),
|
|
73
74
|
children: i.appearance
|
|
74
75
|
}), /* @__PURE__ */ m(t, {
|
|
75
76
|
"aria-label": i.appearance,
|
|
76
|
-
className:
|
|
77
|
+
className: Re.base.group,
|
|
77
78
|
disallowEmptySelection: !0,
|
|
78
79
|
lang: r("appearance"),
|
|
79
80
|
onSelectionChange: (e) => {
|
|
80
81
|
let [t] = e;
|
|
81
|
-
|
|
82
|
+
Be(t) && a(t);
|
|
82
83
|
},
|
|
83
84
|
selectedKeys: [n],
|
|
84
85
|
selectionMode: "single",
|
|
85
|
-
children:
|
|
86
|
-
className: [
|
|
86
|
+
children: ze.map((t) => /* @__PURE__ */ m(e, {
|
|
87
|
+
className: [Re.base.option, Re.state.selected].join(" "),
|
|
87
88
|
id: t.value,
|
|
88
89
|
lang: r(t.message),
|
|
89
90
|
children: i[t.message]
|
|
@@ -93,7 +94,7 @@ function Le() {
|
|
|
93
94
|
}
|
|
94
95
|
//#endregion
|
|
95
96
|
//#region src/primitives/Skeleton/Skeleton.tsx
|
|
96
|
-
var
|
|
97
|
+
var He = {
|
|
97
98
|
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]" },
|
|
98
99
|
compound: {},
|
|
99
100
|
size: {},
|
|
@@ -104,37 +105,37 @@ var Re = {
|
|
|
104
105
|
text: "breeze:block-size-breeze-3 breeze:inline-size-full breeze:rounded-breeze-xs"
|
|
105
106
|
}
|
|
106
107
|
};
|
|
107
|
-
function
|
|
108
|
-
let { getMessageLocale: i, messages: a } =
|
|
108
|
+
function G({ blockSize: e, inlineSize: t, label: n, shape: r = "text" }) {
|
|
109
|
+
let { getMessageLocale: i, messages: a } = W(), o = n?.trim() || void 0, s = e ?? t ?? "0.75rem", c = {
|
|
109
110
|
blockSize: r === "circle" ? s : e,
|
|
110
111
|
inlineSize: r === "circle" ? s : t
|
|
111
112
|
};
|
|
112
113
|
return /* @__PURE__ */ m("progress", {
|
|
113
114
|
"aria-hidden": o === void 0 || void 0,
|
|
114
115
|
"aria-label": o,
|
|
115
|
-
className: [
|
|
116
|
+
className: [He.base.skeleton, He.variant[r]].join(" "),
|
|
116
117
|
lang: o === a.loading.trim() ? i("loading") : void 0,
|
|
117
118
|
style: c
|
|
118
119
|
});
|
|
119
120
|
}
|
|
120
121
|
//#endregion
|
|
121
122
|
//#region src/primitives/VisuallyHidden/VisuallyHidden.tsx
|
|
122
|
-
var
|
|
123
|
+
var Ue = {
|
|
123
124
|
base: { hidden: "breeze:sr-only" },
|
|
124
125
|
compound: {},
|
|
125
126
|
size: {},
|
|
126
127
|
state: {},
|
|
127
128
|
variant: {}
|
|
128
129
|
};
|
|
129
|
-
function
|
|
130
|
+
function We({ children: e }) {
|
|
130
131
|
return /* @__PURE__ */ m("span", {
|
|
131
|
-
className:
|
|
132
|
+
className: Ue.base.hidden,
|
|
132
133
|
children: e
|
|
133
134
|
});
|
|
134
135
|
}
|
|
135
136
|
//#endregion
|
|
136
137
|
//#region src/primitives/Badge/Badge.tsx
|
|
137
|
-
var
|
|
138
|
+
var Ge = {
|
|
138
139
|
base: {
|
|
139
140
|
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",
|
|
140
141
|
content: "breeze:[grid-area:1/1]",
|
|
@@ -151,29 +152,29 @@ var Ve = {
|
|
|
151
152
|
warning: "breeze:bg-breeze-warn-soft breeze:text-breeze-warn"
|
|
152
153
|
}
|
|
153
154
|
};
|
|
154
|
-
function
|
|
155
|
-
let { messages: i } =
|
|
155
|
+
function Ke({ "aria-label": e, children: t, loading: n = !1, variant: r = "neutral" }) {
|
|
156
|
+
let { messages: i } = W(), a = e?.trim() || void 0, o;
|
|
156
157
|
return n ? o = /* @__PURE__ */ m("span", {
|
|
157
|
-
className:
|
|
158
|
-
children: /* @__PURE__ */ m(
|
|
158
|
+
className: Ge.base.skeleton,
|
|
159
|
+
children: /* @__PURE__ */ m(G, {
|
|
159
160
|
blockSize: 8,
|
|
160
161
|
inlineSize: "100%",
|
|
161
162
|
label: i.loading,
|
|
162
163
|
shape: "rectangle"
|
|
163
164
|
})
|
|
164
|
-
}) : a !== void 0 && (o = /* @__PURE__ */ m(
|
|
165
|
+
}) : a !== void 0 && (o = /* @__PURE__ */ m(We, { children: a })), /* @__PURE__ */ h("span", {
|
|
165
166
|
"aria-busy": n || void 0,
|
|
166
|
-
className: [
|
|
167
|
+
className: [Ge.base.badge, Ge.variant[r]].join(" "),
|
|
167
168
|
children: [/* @__PURE__ */ m("span", {
|
|
168
169
|
"aria-hidden": n || a !== void 0 ? !0 : void 0,
|
|
169
|
-
className: [
|
|
170
|
+
className: [Ge.base.content, n && Ge.state.contentLoading].filter(Boolean).join(" "),
|
|
170
171
|
children: t
|
|
171
172
|
}), o]
|
|
172
173
|
});
|
|
173
174
|
}
|
|
174
175
|
//#endregion
|
|
175
176
|
//#region src/primitives/Button/Button.tsx
|
|
176
|
-
var
|
|
177
|
+
var K = {
|
|
177
178
|
base: {
|
|
178
179
|
button: "breeze:relative breeze:inline-grid breeze:items-center breeze:justify-center breeze:gap-breeze-2 breeze:border breeze:border-solid breeze:rounded-breeze-ctl breeze:font-breeze-sans breeze:text-breeze-sm breeze:leading-breeze-snug breeze:cursor-pointer breeze:select-none breeze:[text-align:center] breeze:outline-offset-2 breeze:data-[focus-visible]:outline-2 breeze:data-[focus-visible]:outline-solid breeze:data-[focus-visible]:outline-breeze-brand breeze:any-pointer-coarse:min-block-breeze-tap breeze:any-pointer-coarse:min-inline-breeze-tap",
|
|
179
180
|
label: "breeze:[grid-area:1/1]",
|
|
@@ -203,23 +204,23 @@ var q = {
|
|
|
203
204
|
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"
|
|
204
205
|
}
|
|
205
206
|
};
|
|
206
|
-
function
|
|
207
|
-
let e = v(_), { getMessageLocale: t, messages: n } =
|
|
207
|
+
function qe() {
|
|
208
|
+
let e = v(_), { getMessageLocale: t, messages: n } = W();
|
|
208
209
|
return /* @__PURE__ */ m("progress", {
|
|
209
210
|
"aria-label": n.loading,
|
|
210
|
-
className:
|
|
211
|
+
className: K.state.loadingStatus,
|
|
211
212
|
id: e?.id,
|
|
212
213
|
lang: t("loading")
|
|
213
214
|
});
|
|
214
215
|
}
|
|
215
|
-
function
|
|
216
|
-
|
|
216
|
+
function Je({ "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" }) {
|
|
217
|
+
W();
|
|
217
218
|
let C = [
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
c &&
|
|
222
|
-
d &&
|
|
219
|
+
K.base.button,
|
|
220
|
+
K.variant[S],
|
|
221
|
+
K.size[y],
|
|
222
|
+
c && K.state.disabled,
|
|
223
|
+
d && K.state.loading
|
|
223
224
|
].filter(Boolean).join(" ");
|
|
224
225
|
return /* @__PURE__ */ h(g, {
|
|
225
226
|
"aria-controls": e,
|
|
@@ -245,18 +246,18 @@ function We({ "aria-controls": e, "aria-describedby": t, "aria-expanded": n, "ar
|
|
|
245
246
|
type: b,
|
|
246
247
|
value: x,
|
|
247
248
|
children: [/* @__PURE__ */ m("span", {
|
|
248
|
-
className: [
|
|
249
|
+
className: [K.base.label, d && K.state.loadingLabel].filter(Boolean).join(" "),
|
|
249
250
|
children: s
|
|
250
|
-
}), d && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(
|
|
251
|
+
}), d && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(qe, {}), /* @__PURE__ */ m("span", {
|
|
251
252
|
"aria-hidden": "true",
|
|
252
|
-
className: [
|
|
253
|
+
className: [K.base.skeleton, K.compound.loading[S]].join(" "),
|
|
253
254
|
"data-breeze-skeleton": ""
|
|
254
255
|
})] })]
|
|
255
256
|
});
|
|
256
257
|
}
|
|
257
258
|
//#endregion
|
|
258
259
|
//#region src/primitives/Field/field.styles.ts
|
|
259
|
-
var
|
|
260
|
+
var q = {
|
|
260
261
|
base: {
|
|
261
262
|
control: "breeze:relative breeze:inline-grid breeze:min-inline-size-0 breeze:inline-size-full",
|
|
262
263
|
description: "breeze:m-0 breeze:text-breeze-xs breeze:font-normal breeze:leading-breeze-snug breeze:text-breeze-ink-3",
|
|
@@ -271,12 +272,12 @@ var J = {
|
|
|
271
272
|
state: { loadingInput: "breeze:!opacity-0" },
|
|
272
273
|
variant: {}
|
|
273
274
|
};
|
|
274
|
-
function
|
|
275
|
+
function J(...e) {
|
|
275
276
|
return e.filter(Boolean).join(" ");
|
|
276
277
|
}
|
|
277
278
|
//#endregion
|
|
278
279
|
//#region src/primitives/Icon/Icon.tsx
|
|
279
|
-
var
|
|
280
|
+
var Ye = {
|
|
280
281
|
add: ie,
|
|
281
282
|
back: te,
|
|
282
283
|
building: A,
|
|
@@ -303,7 +304,7 @@ var Ge = {
|
|
|
303
304
|
signOut: B,
|
|
304
305
|
upload: H,
|
|
305
306
|
warning: oe
|
|
306
|
-
},
|
|
307
|
+
}, Xe = {
|
|
307
308
|
base: { icon: "breeze:block breeze:shrink-0" },
|
|
308
309
|
compound: {},
|
|
309
310
|
size: {
|
|
@@ -313,20 +314,20 @@ var Ge = {
|
|
|
313
314
|
},
|
|
314
315
|
state: { logicalDirection: "breeze:rtl:rotate-180" },
|
|
315
316
|
variant: {}
|
|
316
|
-
},
|
|
317
|
+
}, Ze = /* @__PURE__ */ new Set([
|
|
317
318
|
"back",
|
|
318
319
|
"forward",
|
|
319
320
|
"next"
|
|
320
321
|
]);
|
|
321
|
-
function
|
|
322
|
-
let r =
|
|
322
|
+
function Y({ label: e, name: t, size: n = "md" }) {
|
|
323
|
+
let r = Ye[t], i = e?.trim() || void 0;
|
|
323
324
|
return /* @__PURE__ */ m(r, {
|
|
324
325
|
"aria-hidden": i === void 0 || void 0,
|
|
325
326
|
"aria-label": i,
|
|
326
327
|
className: [
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
328
|
+
Xe.base.icon,
|
|
329
|
+
Xe.size[n],
|
|
330
|
+
Ze.has(t) && Xe.state.logicalDirection
|
|
330
331
|
].filter(Boolean).join(" "),
|
|
331
332
|
focusable: "false",
|
|
332
333
|
role: i === void 0 ? void 0 : "img",
|
|
@@ -335,7 +336,7 @@ function X({ label: e, name: t, size: n = "md" }) {
|
|
|
335
336
|
}
|
|
336
337
|
//#endregion
|
|
337
338
|
//#region src/primitives/Calendar/Calendar.tsx
|
|
338
|
-
var
|
|
339
|
+
var X = {
|
|
339
340
|
base: {
|
|
340
341
|
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
342
|
disabledRoot: "breeze:pointer-events-none breeze:[&>div:last-child]:hidden",
|
|
@@ -353,45 +354,45 @@ var Z = {
|
|
|
353
354
|
state: {},
|
|
354
355
|
variant: {}
|
|
355
356
|
};
|
|
356
|
-
function
|
|
357
|
+
function Qe(e) {
|
|
357
358
|
try {
|
|
358
359
|
return y(e);
|
|
359
360
|
} catch {
|
|
360
361
|
return null;
|
|
361
362
|
}
|
|
362
363
|
}
|
|
363
|
-
function
|
|
364
|
+
function $e({ disabled: e }) {
|
|
364
365
|
return /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h("div", {
|
|
365
|
-
className:
|
|
366
|
+
className: X.base.header,
|
|
366
367
|
children: [
|
|
367
368
|
/* @__PURE__ */ m(g, {
|
|
368
|
-
className:
|
|
369
|
+
className: X.base.navButton,
|
|
369
370
|
isDisabled: e,
|
|
370
371
|
slot: "previous",
|
|
371
|
-
children: /* @__PURE__ */ m(
|
|
372
|
+
children: /* @__PURE__ */ m(Y, {
|
|
372
373
|
name: "back",
|
|
373
374
|
size: "sm"
|
|
374
375
|
})
|
|
375
376
|
}),
|
|
376
|
-
/* @__PURE__ */ m(E, { className:
|
|
377
|
+
/* @__PURE__ */ m(E, { className: X.base.heading }),
|
|
377
378
|
/* @__PURE__ */ m(g, {
|
|
378
|
-
className:
|
|
379
|
+
className: X.base.navButton,
|
|
379
380
|
isDisabled: e,
|
|
380
381
|
slot: "next",
|
|
381
|
-
children: /* @__PURE__ */ m(
|
|
382
|
+
children: /* @__PURE__ */ m(Y, {
|
|
382
383
|
name: "next",
|
|
383
384
|
size: "sm"
|
|
384
385
|
})
|
|
385
386
|
})
|
|
386
387
|
]
|
|
387
388
|
}), /* @__PURE__ */ h(S, {
|
|
388
|
-
className:
|
|
389
|
+
className: X.base.grid,
|
|
389
390
|
weekdayStyle: "short",
|
|
390
391
|
children: [/* @__PURE__ */ m(w, { children: (e) => /* @__PURE__ */ m(T, {
|
|
391
|
-
className:
|
|
392
|
+
className: X.base.weekday,
|
|
392
393
|
children: e
|
|
393
394
|
}) }), /* @__PURE__ */ m(C, { children: (t) => /* @__PURE__ */ m(x, {
|
|
394
|
-
className: ({ isSelected: e, isToday: t }) =>
|
|
395
|
+
className: ({ isSelected: e, isToday: t }) => J(X.base.cell, e && X.base.selectedCell, t && !e && X.base.todayCell),
|
|
395
396
|
date: t,
|
|
396
397
|
render: (t) => r("div", {
|
|
397
398
|
...t,
|
|
@@ -402,7 +403,7 @@ function Ye({ disabled: e }) {
|
|
|
402
403
|
}) })]
|
|
403
404
|
})] });
|
|
404
405
|
}
|
|
405
|
-
function
|
|
406
|
+
function et({ autoFocus: e, defaultValue: t, disabled: n, label: i, onChange: a, value: s }) {
|
|
406
407
|
let c = s?.toString(), l = u(c), [f, p] = d(s ?? void 0);
|
|
407
408
|
o(() => {
|
|
408
409
|
c !== l.current && (l.current = c, s != null && p(s));
|
|
@@ -414,7 +415,7 @@ function Xe({ autoFocus: e, defaultValue: t, disabled: n, label: i, onChange: a,
|
|
|
414
415
|
return r(b, {
|
|
415
416
|
"aria-label": i,
|
|
416
417
|
autoFocus: e && !n,
|
|
417
|
-
className:
|
|
418
|
+
className: J(X.base.root, n && X.base.disabledRoot),
|
|
418
419
|
firstDayOfWeek: "mon",
|
|
419
420
|
isReadOnly: n,
|
|
420
421
|
render: n ? (e) => r("div", {
|
|
@@ -429,13 +430,13 @@ function Xe({ autoFocus: e, defaultValue: t, disabled: n, label: i, onChange: a,
|
|
|
429
430
|
...v,
|
|
430
431
|
...y,
|
|
431
432
|
..._
|
|
432
|
-
}, /* @__PURE__ */ m(
|
|
433
|
+
}, /* @__PURE__ */ m($e, { disabled: n }));
|
|
433
434
|
}
|
|
434
|
-
function
|
|
435
|
-
let o = a === void 0 ? void 0 :
|
|
436
|
-
return /* @__PURE__ */ m(
|
|
435
|
+
function tt({ autoFocus: e = !1, defaultValue: t, disabled: n = !1, label: r, onChange: i, value: a }) {
|
|
436
|
+
let o = a === void 0 ? void 0 : Qe(a);
|
|
437
|
+
return /* @__PURE__ */ m(et, {
|
|
437
438
|
autoFocus: e,
|
|
438
|
-
defaultValue: t === void 0 ? void 0 :
|
|
439
|
+
defaultValue: t === void 0 ? void 0 : Qe(t),
|
|
439
440
|
disabled: n,
|
|
440
441
|
label: r,
|
|
441
442
|
onChange: (e) => {
|
|
@@ -446,7 +447,7 @@ function Ze({ autoFocus: e = !1, defaultValue: t, disabled: n = !1, label: r, on
|
|
|
446
447
|
}
|
|
447
448
|
//#endregion
|
|
448
449
|
//#region src/primitives/layout.accessibility.ts
|
|
449
|
-
function
|
|
450
|
+
function nt(e, t) {
|
|
450
451
|
let n = e?.trim() || void 0;
|
|
451
452
|
return {
|
|
452
453
|
accessibleLabel: n,
|
|
@@ -455,7 +456,7 @@ function Qe(e, t) {
|
|
|
455
456
|
}
|
|
456
457
|
//#endregion
|
|
457
458
|
//#region src/primitives/Card/Card.tsx
|
|
458
|
-
var
|
|
459
|
+
var rt = {
|
|
459
460
|
base: { card: "breeze:min-inline-size-0 breeze:rounded-breeze-panel breeze:border breeze:border-solid breeze:border-breeze-line breeze:shadow-breeze-panel" },
|
|
460
461
|
compound: {},
|
|
461
462
|
size: {
|
|
@@ -475,62 +476,62 @@ var $e = {
|
|
|
475
476
|
surface: "breeze:bg-breeze-surface"
|
|
476
477
|
}
|
|
477
478
|
};
|
|
478
|
-
function
|
|
479
|
-
let { accessibleLabel: s, role: c } =
|
|
479
|
+
function it({ "aria-label": e, children: t, clipped: n = !0, element: i = "div", padding: a = 4, variant: o = "surface" }) {
|
|
480
|
+
let { accessibleLabel: s, role: c } = nt(e, i);
|
|
480
481
|
return r(i, {
|
|
481
482
|
"aria-label": s,
|
|
482
483
|
className: [
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
n &&
|
|
484
|
+
rt.base.card,
|
|
485
|
+
rt.variant[o],
|
|
486
|
+
rt.size[a],
|
|
487
|
+
n && rt.state.clipped
|
|
487
488
|
].filter(Boolean).join(" "),
|
|
488
489
|
role: c
|
|
489
490
|
}, t);
|
|
490
491
|
}
|
|
491
492
|
//#endregion
|
|
492
493
|
//#region src/primitives/Field/field.presentation.tsx
|
|
493
|
-
function
|
|
494
|
-
return /* @__PURE__ */ m(
|
|
495
|
-
className:
|
|
494
|
+
function at({ htmlFor: e, id: t, label: n, loading: r, onClick: i }) {
|
|
495
|
+
return /* @__PURE__ */ m(fe, {
|
|
496
|
+
className: q.base.label,
|
|
496
497
|
htmlFor: e,
|
|
497
498
|
id: t,
|
|
498
499
|
onClick: i,
|
|
499
|
-
children: r ? /* @__PURE__ */ m(
|
|
500
|
+
children: r ? /* @__PURE__ */ m(G, {
|
|
500
501
|
blockSize: "1lh",
|
|
501
502
|
inlineSize: "12em",
|
|
502
503
|
shape: "rectangle"
|
|
503
504
|
}) : n
|
|
504
505
|
});
|
|
505
506
|
}
|
|
506
|
-
function
|
|
507
|
-
return /* @__PURE__ */ h(p, { children: [e && /* @__PURE__ */ m(
|
|
508
|
-
className:
|
|
507
|
+
function ot({ description: e, descriptionId: t, error: n, errorId: r, loading: i }) {
|
|
508
|
+
return /* @__PURE__ */ h(p, { children: [e && /* @__PURE__ */ m(pe, {
|
|
509
|
+
className: q.base.description,
|
|
509
510
|
id: t,
|
|
510
511
|
slot: "description",
|
|
511
|
-
children: i ? /* @__PURE__ */ m(
|
|
512
|
+
children: i ? /* @__PURE__ */ m(G, {
|
|
512
513
|
blockSize: "1lh",
|
|
513
514
|
inlineSize: "12em",
|
|
514
515
|
shape: "rectangle"
|
|
515
516
|
}) : e
|
|
516
517
|
}), n && (i ? /* @__PURE__ */ m("span", {
|
|
517
518
|
"aria-hidden": "true",
|
|
518
|
-
className:
|
|
519
|
+
className: q.base.error,
|
|
519
520
|
id: r,
|
|
520
|
-
children: /* @__PURE__ */ m(
|
|
521
|
+
children: /* @__PURE__ */ m(G, {
|
|
521
522
|
blockSize: "1lh",
|
|
522
523
|
inlineSize: "12em",
|
|
523
524
|
shape: "rectangle"
|
|
524
525
|
})
|
|
525
|
-
}) : /* @__PURE__ */ m(
|
|
526
|
-
className:
|
|
526
|
+
}) : /* @__PURE__ */ m(de, {
|
|
527
|
+
className: q.base.error,
|
|
527
528
|
id: r,
|
|
528
529
|
children: n
|
|
529
530
|
}))] });
|
|
530
531
|
}
|
|
531
532
|
//#endregion
|
|
532
533
|
//#region src/primitives/Checkbox/Checkbox.tsx
|
|
533
|
-
var
|
|
534
|
+
var st = {
|
|
534
535
|
base: {
|
|
535
536
|
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",
|
|
536
537
|
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",
|
|
@@ -543,10 +544,10 @@ var rt = {
|
|
|
543
544
|
state: {},
|
|
544
545
|
variant: {}
|
|
545
546
|
};
|
|
546
|
-
function
|
|
547
|
-
let { messages: v } =
|
|
548
|
-
return /* @__PURE__ */ h(
|
|
549
|
-
className:
|
|
547
|
+
function ct({ 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: _ }) {
|
|
548
|
+
let { messages: v } = W(), y = ce(d), b = t?.trim() || void 0, x = r?.trim() || void 0, S = n || s;
|
|
549
|
+
return /* @__PURE__ */ h(ue, {
|
|
550
|
+
className: q.base.root,
|
|
550
551
|
defaultSelected: e,
|
|
551
552
|
form: i,
|
|
552
553
|
id: a,
|
|
@@ -561,19 +562,19 @@ function it({ defaultSelected: e, description: t, disabled: n = !1, error: r, fo
|
|
|
561
562
|
onChange: l,
|
|
562
563
|
value: _,
|
|
563
564
|
validationBehavior: "aria",
|
|
564
|
-
children: [/* @__PURE__ */ m(
|
|
565
|
-
className:
|
|
565
|
+
children: [/* @__PURE__ */ m(le, {
|
|
566
|
+
className: st.base.control,
|
|
566
567
|
children: ({ isFocusVisible: e, isSelected: t }) => /* @__PURE__ */ h(p, { children: [s && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("span", {
|
|
567
568
|
"aria-hidden": "true",
|
|
568
|
-
className:
|
|
569
|
-
children: /* @__PURE__ */ m(
|
|
569
|
+
className: st.base.skeletonIndicator,
|
|
570
|
+
children: /* @__PURE__ */ m(G, {
|
|
570
571
|
blockSize: "100%",
|
|
571
572
|
inlineSize: "100%",
|
|
572
573
|
shape: "rectangle"
|
|
573
574
|
})
|
|
574
575
|
}), /* @__PURE__ */ m("span", {
|
|
575
|
-
className:
|
|
576
|
-
children: /* @__PURE__ */ m(
|
|
576
|
+
className: st.base.skeleton,
|
|
577
|
+
children: /* @__PURE__ */ m(G, {
|
|
577
578
|
blockSize: "1lh",
|
|
578
579
|
inlineSize: "12em",
|
|
579
580
|
label: v.loading,
|
|
@@ -581,15 +582,15 @@ function it({ defaultSelected: e, description: t, disabled: n = !1, error: r, fo
|
|
|
581
582
|
})
|
|
582
583
|
})] }), !s && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("span", {
|
|
583
584
|
"aria-hidden": "true",
|
|
584
|
-
className:
|
|
585
|
+
className: st.base.indicator,
|
|
585
586
|
"data-focus-visible": e || void 0,
|
|
586
587
|
"data-selected": t || void 0,
|
|
587
588
|
children: t ? "✓" : ""
|
|
588
589
|
}), /* @__PURE__ */ m("span", {
|
|
589
|
-
className:
|
|
590
|
+
className: st.base.label,
|
|
590
591
|
children: o
|
|
591
592
|
})] })] })
|
|
592
|
-
}), /* @__PURE__ */ m(
|
|
593
|
+
}), /* @__PURE__ */ m(ot, {
|
|
593
594
|
description: b,
|
|
594
595
|
error: x,
|
|
595
596
|
loading: s
|
|
@@ -597,8 +598,89 @@ function it({ defaultSelected: e, description: t, disabled: n = !1, error: r, fo
|
|
|
597
598
|
});
|
|
598
599
|
}
|
|
599
600
|
//#endregion
|
|
601
|
+
//#region src/primitives/SelectionControl/SelectionControl.tsx
|
|
602
|
+
var lt = {
|
|
603
|
+
base: {
|
|
604
|
+
label: "breeze:[grid-area:1/1]",
|
|
605
|
+
skeleton: "breeze:[grid-area:1/1] breeze:inline-size-full breeze:block-size-breeze-3",
|
|
606
|
+
status: "breeze:sr-only"
|
|
607
|
+
},
|
|
608
|
+
state: {
|
|
609
|
+
loading: "breeze:cursor-wait",
|
|
610
|
+
loadingLabel: "breeze:opacity-0"
|
|
611
|
+
}
|
|
612
|
+
};
|
|
613
|
+
function ut({ "aria-describedby": t, "aria-label": n, "aria-labelledby": i, children: a, className: o, defaultPressed: s, disabled: c, id: l, announceLoading: u = !0, loading: f, onChange: g, pressed: _, ref: v }) {
|
|
614
|
+
let { getMessageLocale: y, messages: b } = W(), [x, S] = d(s ?? !1), C = _ !== void 0, w = C ? _ : x;
|
|
615
|
+
return /* @__PURE__ */ h(p, { children: [
|
|
616
|
+
/* @__PURE__ */ h(e, {
|
|
617
|
+
"aria-describedby": t,
|
|
618
|
+
"aria-label": n,
|
|
619
|
+
"aria-labelledby": i,
|
|
620
|
+
className: [o, f && lt.state.loading].filter(Boolean).join(" "),
|
|
621
|
+
id: l,
|
|
622
|
+
isDisabled: c,
|
|
623
|
+
isSelected: w,
|
|
624
|
+
onChange: (e) => {
|
|
625
|
+
f || (C || S(e), g?.(e));
|
|
626
|
+
},
|
|
627
|
+
ref: v,
|
|
628
|
+
render: (e) => r("button", {
|
|
629
|
+
...e,
|
|
630
|
+
"aria-busy": f || void 0,
|
|
631
|
+
"aria-disabled": c || f || void 0,
|
|
632
|
+
type: "button"
|
|
633
|
+
}),
|
|
634
|
+
children: [/* @__PURE__ */ m("span", {
|
|
635
|
+
className: [lt.base.label, f && lt.state.loadingLabel].filter(Boolean).join(" "),
|
|
636
|
+
children: a
|
|
637
|
+
}), f && /* @__PURE__ */ m("span", {
|
|
638
|
+
"aria-hidden": "true",
|
|
639
|
+
className: lt.base.skeleton,
|
|
640
|
+
"data-breeze-skeleton": "",
|
|
641
|
+
children: /* @__PURE__ */ m(G, { inlineSize: "100%" })
|
|
642
|
+
})]
|
|
643
|
+
}),
|
|
644
|
+
f && u && /* @__PURE__ */ m("span", {
|
|
645
|
+
className: lt.base.status,
|
|
646
|
+
children: /* @__PURE__ */ m(G, { label: b.loading })
|
|
647
|
+
}),
|
|
648
|
+
u && /* @__PURE__ */ m("output", {
|
|
649
|
+
"aria-live": "polite",
|
|
650
|
+
className: lt.base.status,
|
|
651
|
+
lang: y("loading"),
|
|
652
|
+
children: f ? b.loading : ""
|
|
653
|
+
})
|
|
654
|
+
] });
|
|
655
|
+
}
|
|
656
|
+
//#endregion
|
|
657
|
+
//#region src/primitives/Chip/Chip.tsx
|
|
658
|
+
var dt = {
|
|
659
|
+
base: { chip: "breeze:inline-grid breeze:items-center breeze:justify-center breeze:whitespace-nowrap breeze:rounded-breeze-full breeze:border breeze:border-solid breeze:border-breeze-line-strong breeze:bg-breeze-surface breeze:ps-breeze-3 breeze:pe-breeze-3 breeze:font-breeze-sans breeze:text-breeze-xs breeze:font-semibold breeze:text-breeze-ink breeze:cursor-pointer breeze:select-none breeze:outline-offset-2 breeze:data-[hovered]:bg-breeze-sunken breeze:data-[focus-visible]:outline-2 breeze:data-[focus-visible]:outline-solid breeze:data-[focus-visible]:outline-breeze-brand breeze:data-[disabled]:cursor-not-allowed breeze:data-[disabled]:opacity-60 breeze:any-pointer-coarse:min-block-breeze-tap breeze:any-pointer-coarse:min-inline-breeze-tap breeze:min-block-breeze-sm" },
|
|
660
|
+
compound: {},
|
|
661
|
+
size: {},
|
|
662
|
+
state: { pressed: "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" },
|
|
663
|
+
variant: {}
|
|
664
|
+
};
|
|
665
|
+
function ft({ "aria-describedby": e, "aria-label": t, "aria-labelledby": n, children: r, defaultPressed: i, disabled: a = !1, id: o, loading: s = !1, onChange: c, pressed: l, ref: u }) {
|
|
666
|
+
return /* @__PURE__ */ m(ut, {
|
|
667
|
+
"aria-describedby": e,
|
|
668
|
+
"aria-label": t,
|
|
669
|
+
"aria-labelledby": n,
|
|
670
|
+
className: [dt.base.chip, dt.state.pressed].join(" "),
|
|
671
|
+
defaultPressed: i,
|
|
672
|
+
disabled: a,
|
|
673
|
+
id: o,
|
|
674
|
+
loading: s,
|
|
675
|
+
onChange: c,
|
|
676
|
+
pressed: l,
|
|
677
|
+
ref: u,
|
|
678
|
+
children: r
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
//#endregion
|
|
600
682
|
//#region src/primitives/Collection/collection.styles.ts
|
|
601
|
-
var
|
|
683
|
+
var Z = {
|
|
602
684
|
base: {
|
|
603
685
|
badge: "breeze:ms-auto",
|
|
604
686
|
content: "breeze:flex breeze:min-inline-size-0 breeze:flex-1 breeze:flex-col breeze:gap-breeze-1",
|
|
@@ -616,7 +698,7 @@ var Q = {
|
|
|
616
698
|
};
|
|
617
699
|
//#endregion
|
|
618
700
|
//#region src/overlays/OverlayStack.ts
|
|
619
|
-
function
|
|
701
|
+
function pt() {
|
|
620
702
|
let e = [], t = /* @__PURE__ */ new Set(), n = () => t.forEach((e) => e());
|
|
621
703
|
return {
|
|
622
704
|
getSnapshot: () => e,
|
|
@@ -632,15 +714,15 @@ function at() {
|
|
|
632
714
|
})
|
|
633
715
|
};
|
|
634
716
|
}
|
|
635
|
-
var
|
|
636
|
-
function
|
|
637
|
-
let e = a(
|
|
717
|
+
var mt = n(null);
|
|
718
|
+
function ht() {
|
|
719
|
+
let e = a(mt);
|
|
638
720
|
if (!e) throw Error("Breeze components must be rendered within BreezeProvider.");
|
|
639
721
|
return 100 + f(e.subscribe, e.getSnapshot, e.getSnapshot).length * 2;
|
|
640
722
|
}
|
|
641
|
-
var
|
|
642
|
-
function
|
|
643
|
-
let r = a(
|
|
723
|
+
var gt = n(null);
|
|
724
|
+
function _t(e, t, n) {
|
|
725
|
+
let r = a(mt), i = a(gt), o = s();
|
|
644
726
|
if (!r) throw Error("Breeze components must be rendered within BreezeProvider.");
|
|
645
727
|
let l = f(r.subscribe, r.getSnapshot, r.getSnapshot), u = i?.id;
|
|
646
728
|
c(() => () => r.remove(o), [o, r]), c(() => {
|
|
@@ -679,12 +761,12 @@ function lt(e, t, n) {
|
|
|
679
761
|
}
|
|
680
762
|
//#endregion
|
|
681
763
|
//#region src/overlays/OverlayProvider.tsx
|
|
682
|
-
var
|
|
683
|
-
function
|
|
684
|
-
let { direction: r } =
|
|
764
|
+
var vt = n(null), yt = "BreezeProvider portalContainer must belong to the current document and light DOM.";
|
|
765
|
+
function bt({ children: e, portalContainer: t, locale: n }) {
|
|
766
|
+
let { direction: r } = we(), [i] = d(pt), [a, o] = d(null);
|
|
685
767
|
return c(() => {
|
|
686
768
|
let e = t ?? document.body;
|
|
687
|
-
if (e.ownerDocument !== document || e.getRootNode() !== document) throw Error(
|
|
769
|
+
if (e.ownerDocument !== document || e.getRootNode() !== document) throw Error(yt);
|
|
688
770
|
let n = e.ownerDocument.createElement("div");
|
|
689
771
|
return n.dataset.breezeRoot = "", n.dataset.breezePortal = "", e.append(n), o(n), () => n.remove();
|
|
690
772
|
}, [t]), c(() => {
|
|
@@ -693,45 +775,45 @@ function ft({ children: e, portalContainer: t, locale: n }) {
|
|
|
693
775
|
r,
|
|
694
776
|
a,
|
|
695
777
|
n
|
|
696
|
-
]), /* @__PURE__ */ m(
|
|
778
|
+
]), /* @__PURE__ */ m(Se, {
|
|
697
779
|
getContainer: () => a,
|
|
698
|
-
children: /* @__PURE__ */ m(
|
|
780
|
+
children: /* @__PURE__ */ m(mt, {
|
|
699
781
|
value: i,
|
|
700
|
-
children: /* @__PURE__ */ m(
|
|
782
|
+
children: /* @__PURE__ */ m(vt, {
|
|
701
783
|
value: a,
|
|
702
784
|
children: e
|
|
703
785
|
})
|
|
704
786
|
})
|
|
705
787
|
});
|
|
706
788
|
}
|
|
707
|
-
function
|
|
708
|
-
return a(
|
|
789
|
+
function xt() {
|
|
790
|
+
return a(vt);
|
|
709
791
|
}
|
|
710
792
|
//#endregion
|
|
711
793
|
//#region src/primitives/Collection/CollectionPopover.tsx
|
|
712
|
-
var
|
|
713
|
-
function
|
|
794
|
+
var St = "Breeze overlay triggers and portal containers must belong to the current document and light DOM.";
|
|
795
|
+
function Ct(e) {
|
|
714
796
|
return typeof e == "object" && !!e && "nodeType" in e && typeof e.contains == "function";
|
|
715
797
|
}
|
|
716
|
-
function
|
|
717
|
-
let f =
|
|
798
|
+
function wt({ children: e, className: t, containerPadding: n, isOpen: r, onOpenChange: s, triggerRef: l }) {
|
|
799
|
+
let f = xt(), p = a(gt), 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 = _t("popover", w && g && f !== null, w || v), E = i((e) => {
|
|
718
800
|
x.current = e, y(e !== null);
|
|
719
801
|
}, []);
|
|
720
802
|
return c(() => {
|
|
721
|
-
if (f && l.current && (l.current.ownerDocument !== document || l.current.getRootNode() !== document || f.ownerDocument !== document || f.getRootNode() !== document)) throw Error(
|
|
803
|
+
if (f && l.current && (l.current.ownerDocument !== document || l.current.getRootNode() !== document || f.ownerDocument !== document || f.getRootNode() !== document)) throw Error(St);
|
|
722
804
|
}), o(() => _(!0), []), c(() => {
|
|
723
805
|
if (!w || !T.topmost || !f) return;
|
|
724
|
-
let e = (e) =>
|
|
806
|
+
let e = (e) => Ct(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
807
|
r !== null && (clearTimeout(r), r = null);
|
|
726
808
|
}, a = () => {
|
|
727
809
|
i(), r = setTimeout(() => {
|
|
728
810
|
r = null, C.current = null;
|
|
729
811
|
}, 0);
|
|
730
812
|
}, o = (e) => {
|
|
731
|
-
n(e) && (i(), S.current =
|
|
813
|
+
n(e) && (i(), S.current = Ct(e.target) ? e.target : null, C.current = null);
|
|
732
814
|
}, c = (t) => {
|
|
733
815
|
if (!n(t)) return;
|
|
734
|
-
let r = S.current, i =
|
|
816
|
+
let r = S.current, i = Ct(t.target) ? t.target : null;
|
|
735
817
|
if (!e(i)) {
|
|
736
818
|
S.current = null;
|
|
737
819
|
return;
|
|
@@ -744,7 +826,7 @@ function gt({ children: e, className: t, containerPadding: n, isOpen: r, onOpenC
|
|
|
744
826
|
}, u = () => {
|
|
745
827
|
i(), S.current = null, C.current = null;
|
|
746
828
|
}, d = (n) => {
|
|
747
|
-
let r =
|
|
829
|
+
let r = Ct(n.target) ? n.target : null;
|
|
748
830
|
e(r) && !t(C.current, r) && s(!1), i(), S.current = null, C.current = null;
|
|
749
831
|
};
|
|
750
832
|
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), () => {
|
|
@@ -762,7 +844,7 @@ function gt({ children: e, className: t, containerPadding: n, isOpen: r, onOpenC
|
|
|
762
844
|
s,
|
|
763
845
|
h,
|
|
764
846
|
r
|
|
765
|
-
]), /* @__PURE__ */ m(
|
|
847
|
+
]), /* @__PURE__ */ m(xe, {
|
|
766
848
|
className: `${t} breeze-popover`,
|
|
767
849
|
containerPadding: n,
|
|
768
850
|
"data-breeze-interactive": T.interactive,
|
|
@@ -783,25 +865,25 @@ function gt({ children: e, className: t, containerPadding: n, isOpen: r, onOpenC
|
|
|
783
865
|
}
|
|
784
866
|
//#endregion
|
|
785
867
|
//#region src/primitives/Collection/DescriptorContent.tsx
|
|
786
|
-
function
|
|
868
|
+
function Tt({ descriptor: e, isSelected: t }) {
|
|
787
869
|
return /* @__PURE__ */ h(p, { children: [
|
|
788
|
-
e.icon && /* @__PURE__ */ m(
|
|
870
|
+
e.icon && /* @__PURE__ */ m(Y, {
|
|
789
871
|
name: e.icon,
|
|
790
872
|
size: "sm"
|
|
791
873
|
}),
|
|
792
874
|
/* @__PURE__ */ h("span", {
|
|
793
|
-
className:
|
|
875
|
+
className: Z.base.content,
|
|
794
876
|
children: [/* @__PURE__ */ m("span", {
|
|
795
|
-
className:
|
|
877
|
+
className: Z.base.label,
|
|
796
878
|
children: e.label
|
|
797
879
|
}), e.description && /* @__PURE__ */ m("span", {
|
|
798
|
-
className:
|
|
880
|
+
className: Z.base.description,
|
|
799
881
|
children: e.description
|
|
800
882
|
})]
|
|
801
883
|
}),
|
|
802
884
|
e.badge && /* @__PURE__ */ m("span", {
|
|
803
|
-
className:
|
|
804
|
-
children: /* @__PURE__ */ m(
|
|
885
|
+
className: Z.base.badge,
|
|
886
|
+
children: /* @__PURE__ */ m(Ke, {
|
|
805
887
|
"aria-label": e.badge["aria-label"],
|
|
806
888
|
variant: e.badge.variant,
|
|
807
889
|
children: e.badge.children
|
|
@@ -809,8 +891,8 @@ function _t({ descriptor: e, isSelected: t }) {
|
|
|
809
891
|
}),
|
|
810
892
|
/* @__PURE__ */ m("span", {
|
|
811
893
|
"aria-hidden": "true",
|
|
812
|
-
className:
|
|
813
|
-
children: t && /* @__PURE__ */ m(
|
|
894
|
+
className: Z.base.selectedIndicator,
|
|
895
|
+
children: t && /* @__PURE__ */ m(Y, {
|
|
814
896
|
name: "check",
|
|
815
897
|
size: "sm"
|
|
816
898
|
})
|
|
@@ -819,13 +901,13 @@ function _t({ descriptor: e, isSelected: t }) {
|
|
|
819
901
|
}
|
|
820
902
|
//#endregion
|
|
821
903
|
//#region src/primitives/Collection/DescriptorOption.tsx
|
|
822
|
-
function
|
|
823
|
-
return /* @__PURE__ */ m(
|
|
824
|
-
className:
|
|
904
|
+
function Et({ descriptor: e }) {
|
|
905
|
+
return /* @__PURE__ */ m(be, {
|
|
906
|
+
className: Z.base.item,
|
|
825
907
|
id: e.id,
|
|
826
908
|
isDisabled: e.disabled,
|
|
827
909
|
textValue: e.label,
|
|
828
|
-
children: ({ isSelected: t }) => /* @__PURE__ */ m(
|
|
910
|
+
children: ({ isSelected: t }) => /* @__PURE__ */ m(Tt, {
|
|
829
911
|
descriptor: e,
|
|
830
912
|
isSelected: t
|
|
831
913
|
})
|
|
@@ -833,7 +915,7 @@ function vt({ descriptor: e }) {
|
|
|
833
915
|
}
|
|
834
916
|
//#endregion
|
|
835
917
|
//#region src/primitives/ComboBox/ComboBox.tsx
|
|
836
|
-
var
|
|
918
|
+
var Dt = {
|
|
837
919
|
base: {
|
|
838
920
|
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",
|
|
839
921
|
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",
|
|
@@ -851,31 +933,31 @@ var yt = {
|
|
|
851
933
|
},
|
|
852
934
|
variant: {}
|
|
853
935
|
};
|
|
854
|
-
function
|
|
936
|
+
function Ot(e, t, n, r) {
|
|
855
937
|
let i = t.find(({ item: t }) => t === e);
|
|
856
938
|
if (i) return i;
|
|
857
939
|
if (r && typeof e == "string") return;
|
|
858
940
|
let { id: a } = n(e);
|
|
859
941
|
return t.find((e) => e.descriptor.id === a);
|
|
860
942
|
}
|
|
861
|
-
function
|
|
943
|
+
function kt(e, t, n, r) {
|
|
862
944
|
if (e !== void 0) return e === null || r && typeof e == "string" && !t ? null : t?.id ?? n(e).id;
|
|
863
945
|
}
|
|
864
|
-
function
|
|
946
|
+
function At(e, t, n) {
|
|
865
947
|
if (!(e === void 0 || !n)) return t ? t.descriptor.label : typeof e == "string" ? e : "";
|
|
866
948
|
}
|
|
867
|
-
function
|
|
949
|
+
function jt(e, t, n) {
|
|
868
950
|
if (!(!n || typeof e != "string" || t)) return e;
|
|
869
951
|
}
|
|
870
|
-
function
|
|
871
|
-
return /* @__PURE__ */ m(
|
|
872
|
-
className:
|
|
952
|
+
function Mt({ items: e }) {
|
|
953
|
+
return /* @__PURE__ */ m(ye, {
|
|
954
|
+
className: Z.base.listBox,
|
|
873
955
|
items: e,
|
|
874
|
-
children: (e) => /* @__PURE__ */ m(
|
|
956
|
+
children: (e) => /* @__PURE__ */ m(Et, { descriptor: e.descriptor })
|
|
875
957
|
});
|
|
876
958
|
}
|
|
877
|
-
function
|
|
878
|
-
let c = a(
|
|
959
|
+
function Nt({ allowsCustomValue: e, hasSuggestions: t, isDisabled: n, isReadOnly: r, items: i, triggerRef: s }) {
|
|
960
|
+
let c = a(he), l = n || r, u = !l && (t || e) && (c?.isOpen ?? !1);
|
|
879
961
|
return o(() => {
|
|
880
962
|
(l || !t && !e) && c?.isOpen && c.setOpen(!1);
|
|
881
963
|
}, [
|
|
@@ -883,23 +965,23 @@ function Tt({ allowsCustomValue: e, hasSuggestions: t, isDisabled: n, isReadOnly
|
|
|
883
965
|
t,
|
|
884
966
|
l,
|
|
885
967
|
c
|
|
886
|
-
]), /* @__PURE__ */ m(
|
|
887
|
-
className:
|
|
968
|
+
]), /* @__PURE__ */ m(wt, {
|
|
969
|
+
className: Dt.base.popover,
|
|
888
970
|
isOpen: u,
|
|
889
971
|
onOpenChange: (e) => c?.setOpen(e),
|
|
890
972
|
triggerRef: s,
|
|
891
|
-
children: /* @__PURE__ */ m(
|
|
973
|
+
children: /* @__PURE__ */ m(Mt, { items: i })
|
|
892
974
|
});
|
|
893
975
|
}
|
|
894
|
-
function
|
|
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 } =
|
|
976
|
+
function Pt({ props: e }) {
|
|
977
|
+
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 } = W(), { contains: O } = ge({ 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) => {
|
|
896
978
|
let t = p(e);
|
|
897
979
|
return {
|
|
898
980
|
descriptor: t,
|
|
899
981
|
id: t.id,
|
|
900
982
|
item: e
|
|
901
983
|
};
|
|
902
|
-
}), [p, v]), I = E == null ? void 0 :
|
|
984
|
+
}), [p, v]), I = E == null ? void 0 : Ot(E, F, p, t), L = kt(E, I, p, t), R = i == null ? void 0 : Ot(i, F, p, t), ne = kt(i, R, p, t), re = At(E, I, t), z = jt(i, R, t), B = u(L == null ? null : String(L)), ie = u(re ?? z ?? ""), ae = u(!1), V = S;
|
|
903
985
|
o(() => {
|
|
904
986
|
B.current = L == null ? null : String(L);
|
|
905
987
|
}, [L]);
|
|
@@ -918,11 +1000,11 @@ function Et({ props: e }) {
|
|
|
918
1000
|
}, H = (e) => {
|
|
919
1001
|
ie.current = e, ae.current = !0, t && F.find((e) => e.descriptor.id === B.current)?.descriptor.label !== e && V?.(e || null);
|
|
920
1002
|
}, U = !b && A !== void 0, se = j ? void 0 : x;
|
|
921
|
-
return /* @__PURE__ */ h(
|
|
1003
|
+
return /* @__PURE__ */ h(me, {
|
|
922
1004
|
allowsCustomValue: t,
|
|
923
1005
|
allowsEmptyCollection: t,
|
|
924
1006
|
"aria-label": b ? y : void 0,
|
|
925
|
-
className:
|
|
1007
|
+
className: q.base.root,
|
|
926
1008
|
defaultFilter: O,
|
|
927
1009
|
defaultInputValue: z,
|
|
928
1010
|
defaultItems: F,
|
|
@@ -941,38 +1023,38 @@ function Et({ props: e }) {
|
|
|
941
1023
|
value: L,
|
|
942
1024
|
validationBehavior: "aria",
|
|
943
1025
|
children: [
|
|
944
|
-
/* @__PURE__ */ m(
|
|
1026
|
+
/* @__PURE__ */ m(at, {
|
|
945
1027
|
label: y,
|
|
946
1028
|
loading: b
|
|
947
1029
|
}),
|
|
948
|
-
/* @__PURE__ */ h(
|
|
949
|
-
className:
|
|
1030
|
+
/* @__PURE__ */ h(_e, {
|
|
1031
|
+
className: J(Dt.base.group, b && Dt.state.loadingGroup, w && Dt.state.readOnlyGroup),
|
|
950
1032
|
isDisabled: j,
|
|
951
1033
|
isInvalid: U,
|
|
952
1034
|
isReadOnly: w,
|
|
953
1035
|
ref: P,
|
|
954
1036
|
children: [
|
|
955
|
-
/* @__PURE__ */ m(
|
|
1037
|
+
/* @__PURE__ */ m(ve, {
|
|
956
1038
|
"aria-busy": b || void 0,
|
|
957
1039
|
"aria-describedby": te,
|
|
958
1040
|
autoComplete: n,
|
|
959
1041
|
autoFocus: r,
|
|
960
|
-
className:
|
|
1042
|
+
className: J(Dt.base.input, b && Dt.state.loadingInput),
|
|
961
1043
|
form: f,
|
|
962
1044
|
placeholder: C,
|
|
963
1045
|
readOnly: w || void 0
|
|
964
1046
|
}),
|
|
965
1047
|
/* @__PURE__ */ m(g, {
|
|
966
1048
|
"aria-describedby": te,
|
|
967
|
-
className:
|
|
968
|
-
children: /* @__PURE__ */ m(
|
|
1049
|
+
className: J(Dt.base.trigger, b && Dt.state.loadingTrigger),
|
|
1050
|
+
children: /* @__PURE__ */ m(Y, {
|
|
969
1051
|
name: "expand",
|
|
970
1052
|
size: "sm"
|
|
971
1053
|
})
|
|
972
1054
|
}),
|
|
973
1055
|
b && /* @__PURE__ */ m("span", {
|
|
974
|
-
className:
|
|
975
|
-
children: /* @__PURE__ */ m(
|
|
1056
|
+
className: Dt.base.skeleton,
|
|
1057
|
+
children: /* @__PURE__ */ m(G, {
|
|
976
1058
|
blockSize: "100%",
|
|
977
1059
|
inlineSize: "100%",
|
|
978
1060
|
label: D.loading,
|
|
@@ -981,7 +1063,7 @@ function Et({ props: e }) {
|
|
|
981
1063
|
})
|
|
982
1064
|
]
|
|
983
1065
|
}),
|
|
984
|
-
/* @__PURE__ */ m(
|
|
1066
|
+
/* @__PURE__ */ m(Nt, {
|
|
985
1067
|
allowsCustomValue: t,
|
|
986
1068
|
hasSuggestions: F.length > 0,
|
|
987
1069
|
isDisabled: j,
|
|
@@ -989,7 +1071,7 @@ function Et({ props: e }) {
|
|
|
989
1071
|
items: F,
|
|
990
1072
|
triggerRef: P
|
|
991
1073
|
}),
|
|
992
|
-
/* @__PURE__ */ m(
|
|
1074
|
+
/* @__PURE__ */ m(ot, {
|
|
993
1075
|
description: k,
|
|
994
1076
|
descriptionId: N,
|
|
995
1077
|
error: A,
|
|
@@ -999,12 +1081,12 @@ function Et({ props: e }) {
|
|
|
999
1081
|
]
|
|
1000
1082
|
});
|
|
1001
1083
|
}
|
|
1002
|
-
function
|
|
1003
|
-
return /* @__PURE__ */ m(
|
|
1084
|
+
function Ft(e) {
|
|
1085
|
+
return /* @__PURE__ */ m(Pt, { props: e });
|
|
1004
1086
|
}
|
|
1005
1087
|
//#endregion
|
|
1006
1088
|
//#region src/primitives/Container/Container.tsx
|
|
1007
|
-
var
|
|
1089
|
+
var It = {
|
|
1008
1090
|
base: { container: "breeze:mx-auto breeze:inline-size-full breeze:min-inline-size-0" },
|
|
1009
1091
|
compound: {},
|
|
1010
1092
|
size: {
|
|
@@ -1015,21 +1097,21 @@ var Ot = {
|
|
|
1015
1097
|
state: { padded: "breeze:ps-breeze-4 breeze:pe-breeze-4 breeze:breeze-md:ps-breeze-7 breeze:breeze-md:pe-breeze-7" },
|
|
1016
1098
|
variant: {}
|
|
1017
1099
|
};
|
|
1018
|
-
function
|
|
1019
|
-
let { accessibleLabel: o, role: s } =
|
|
1100
|
+
function Lt({ "aria-label": e, children: t, element: n = "div", padded: i = !0, width: a = "page" }) {
|
|
1101
|
+
let { accessibleLabel: o, role: s } = nt(e, n);
|
|
1020
1102
|
return r(n, {
|
|
1021
1103
|
"aria-label": o,
|
|
1022
1104
|
className: [
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
i &&
|
|
1105
|
+
It.base.container,
|
|
1106
|
+
It.size[a],
|
|
1107
|
+
i && It.state.padded
|
|
1026
1108
|
].filter(Boolean).join(" "),
|
|
1027
1109
|
role: s
|
|
1028
1110
|
}, t);
|
|
1029
1111
|
}
|
|
1030
1112
|
//#endregion
|
|
1031
1113
|
//#region src/primitives/Typography/Typography.tsx
|
|
1032
|
-
var
|
|
1114
|
+
var Rt = {
|
|
1033
1115
|
base: { text: "breeze:m-0 breeze:font-breeze-sans" },
|
|
1034
1116
|
compound: {},
|
|
1035
1117
|
size: {},
|
|
@@ -1065,10 +1147,10 @@ var At = {
|
|
|
1065
1147
|
}
|
|
1066
1148
|
}
|
|
1067
1149
|
};
|
|
1068
|
-
function
|
|
1150
|
+
function zt(e) {
|
|
1069
1151
|
return e === "heading" ? "h2" : e === "title" ? "h3" : e === "body" ? "p" : "span";
|
|
1070
1152
|
}
|
|
1071
|
-
function
|
|
1153
|
+
function Bt(e, t, n, r) {
|
|
1072
1154
|
let i;
|
|
1073
1155
|
try {
|
|
1074
1156
|
i = new Intl.NumberFormat(n, {
|
|
@@ -1082,7 +1164,7 @@ function Mt(e, t, n, r) {
|
|
|
1082
1164
|
}
|
|
1083
1165
|
return i.map((e) => e.type === "minusSign" ? "−" : e.value).join("");
|
|
1084
1166
|
}
|
|
1085
|
-
function
|
|
1167
|
+
function Vt(e, t, n) {
|
|
1086
1168
|
let r;
|
|
1087
1169
|
try {
|
|
1088
1170
|
r = y(e).toDate("UTC");
|
|
@@ -1094,15 +1176,15 @@ function Nt(e, t, n) {
|
|
|
1094
1176
|
timeZone: "UTC"
|
|
1095
1177
|
}).format(r);
|
|
1096
1178
|
}
|
|
1097
|
-
function
|
|
1098
|
-
return e.loading ? /* @__PURE__ */ m(
|
|
1179
|
+
function Ht(e, t, n) {
|
|
1180
|
+
return e.loading ? /* @__PURE__ */ m(G, {
|
|
1099
1181
|
blockSize: "1lh",
|
|
1100
1182
|
inlineSize: "8em",
|
|
1101
1183
|
label: n
|
|
1102
|
-
}) : e.format === "currency" ?
|
|
1184
|
+
}) : e.format === "currency" ? Bt(e.value, e.currency, t, e.sign ?? "auto") : e.format === "date" ? Vt(e.value, t, e.dateStyle) : e.children;
|
|
1103
1185
|
}
|
|
1104
|
-
function
|
|
1105
|
-
let { locale: t, messages: n } =
|
|
1186
|
+
function Ut(e) {
|
|
1187
|
+
let { locale: t, messages: n } = W(), { "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 ?? zt(_), y = i?.trim() || void 0, b = a ?? (_ === "money" || d ? "end" : "start"), x = a !== void 0 || _ === "money" || d, S = Ht(e, t, n.loading), C = c !== void 0 || typeof o == "string" || typeof o == "number", w = !u && y !== void 0 && !C && [
|
|
1106
1188
|
"h1",
|
|
1107
1189
|
"h2",
|
|
1108
1190
|
"h3",
|
|
@@ -1111,18 +1193,18 @@ function Ft(e) {
|
|
|
1111
1193
|
return !u && y !== void 0 && C && (S = /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("span", {
|
|
1112
1194
|
"aria-hidden": "true",
|
|
1113
1195
|
children: S
|
|
1114
|
-
}), /* @__PURE__ */ m(
|
|
1196
|
+
}), /* @__PURE__ */ m(We, { children: y })] })), r(v, {
|
|
1115
1197
|
"aria-busy": u || void 0,
|
|
1116
1198
|
"aria-label": T || w ? y : void 0,
|
|
1117
1199
|
className: [
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
x &&
|
|
1123
|
-
u && v === "span" && !x &&
|
|
1124
|
-
d && _ !== "money" &&
|
|
1125
|
-
g &&
|
|
1200
|
+
Rt.base.text,
|
|
1201
|
+
Rt.variant.role[_],
|
|
1202
|
+
Rt.variant.tone[f],
|
|
1203
|
+
Rt.variant.align[b],
|
|
1204
|
+
x && Rt.state.aligned,
|
|
1205
|
+
u && v === "span" && !x && Rt.state.inlineLoading,
|
|
1206
|
+
d && _ !== "money" && Rt.state.numeric,
|
|
1207
|
+
g && Rt.state.truncate
|
|
1126
1208
|
].filter(Boolean).join(" "),
|
|
1127
1209
|
id: l,
|
|
1128
1210
|
lang: t,
|
|
@@ -1131,7 +1213,7 @@ function Ft(e) {
|
|
|
1131
1213
|
}
|
|
1132
1214
|
//#endregion
|
|
1133
1215
|
//#region src/primitives/DatePicker/DatePicker.tsx
|
|
1134
|
-
var
|
|
1216
|
+
var Wt = {
|
|
1135
1217
|
base: {
|
|
1136
1218
|
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
1219
|
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",
|
|
@@ -1142,11 +1224,11 @@ var It = {
|
|
|
1142
1224
|
state: {},
|
|
1143
1225
|
variant: {}
|
|
1144
1226
|
};
|
|
1145
|
-
function
|
|
1227
|
+
function Gt({ placeholder: e, placeholderLocale: t, value: n, valueId: r }) {
|
|
1146
1228
|
return /* @__PURE__ */ m("span", {
|
|
1147
|
-
className:
|
|
1229
|
+
className: Wt.base.value,
|
|
1148
1230
|
id: r,
|
|
1149
|
-
children: n ? /* @__PURE__ */ m(
|
|
1231
|
+
children: n ? /* @__PURE__ */ m(Ut, {
|
|
1150
1232
|
element: "span",
|
|
1151
1233
|
format: "date",
|
|
1152
1234
|
value: n
|
|
@@ -1156,7 +1238,7 @@ function Lt({ placeholder: e, placeholderLocale: t, value: n, valueId: r }) {
|
|
|
1156
1238
|
})
|
|
1157
1239
|
});
|
|
1158
1240
|
}
|
|
1159
|
-
function
|
|
1241
|
+
function Kt(e, t, n, r) {
|
|
1160
1242
|
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
1243
|
if (c <= s) return;
|
|
1162
1244
|
let l = Math.max(s + 8, c - n), u = 0;
|
|
@@ -1164,18 +1246,18 @@ function Rt(e, t, n, r) {
|
|
|
1164
1246
|
let d = t.scrollHeight - t.clientHeight, f = Math.round(Math.max(0, Math.min(d, t.scrollTop + u)));
|
|
1165
1247
|
return f === t.scrollTop ? void 0 : f;
|
|
1166
1248
|
}
|
|
1167
|
-
function
|
|
1249
|
+
function qt(e) {
|
|
1168
1250
|
let t = e.ownerDocument.documentElement.clientHeight, n = !1;
|
|
1169
1251
|
for (let r = e.parentElement; r !== null; r = r.parentElement) {
|
|
1170
1252
|
let { overflowY: i } = getComputedStyle(r);
|
|
1171
1253
|
if (["auto", "scroll"].includes(i) && r.scrollHeight > r.clientHeight) {
|
|
1172
|
-
let i =
|
|
1254
|
+
let i = Kt(e, r, 400, t);
|
|
1173
1255
|
i !== void 0 && (r.scrollTop = i, n = !0);
|
|
1174
1256
|
}
|
|
1175
1257
|
}
|
|
1176
1258
|
return n;
|
|
1177
1259
|
}
|
|
1178
|
-
function
|
|
1260
|
+
function Jt({ calendarKey: e, dialogId: t, disabled: n, isOpen: r, label: i, onChange: a, onOpenChange: s, triggerRef: c, value: l }) {
|
|
1179
1261
|
let d = u(null);
|
|
1180
1262
|
return o(() => {
|
|
1181
1263
|
if (!r) return;
|
|
@@ -1192,28 +1274,28 @@ function Bt({ calendarKey: e, dialogId: t, disabled: n, isOpen: r, label: i, onC
|
|
|
1192
1274
|
attributeFilter: ["data-breeze-interactive", "inert"],
|
|
1193
1275
|
attributes: !0
|
|
1194
1276
|
}), n() && i.disconnect(), () => i.disconnect();
|
|
1195
|
-
}, [r, c]), /* @__PURE__ */ m(
|
|
1196
|
-
className:
|
|
1277
|
+
}, [r, c]), /* @__PURE__ */ m(wt, {
|
|
1278
|
+
className: Wt.base.popover,
|
|
1197
1279
|
containerPadding: 4,
|
|
1198
1280
|
isOpen: r,
|
|
1199
1281
|
onOpenChange: s,
|
|
1200
1282
|
triggerRef: c,
|
|
1201
|
-
children: /* @__PURE__ */ m(
|
|
1283
|
+
children: /* @__PURE__ */ m(Te, {
|
|
1202
1284
|
"aria-label": i,
|
|
1203
1285
|
id: t,
|
|
1204
1286
|
ref: d,
|
|
1205
|
-
children: /* @__PURE__ */ m(
|
|
1287
|
+
children: /* @__PURE__ */ m(et, {
|
|
1206
1288
|
autoFocus: r,
|
|
1207
1289
|
disabled: n,
|
|
1208
1290
|
label: i,
|
|
1209
1291
|
onChange: a,
|
|
1210
|
-
value: l == null ? null :
|
|
1292
|
+
value: l == null ? null : Qe(l)
|
|
1211
1293
|
}, e)
|
|
1212
1294
|
})
|
|
1213
1295
|
});
|
|
1214
1296
|
}
|
|
1215
|
-
function
|
|
1216
|
-
let { getMessageLocale: C, messages: w } =
|
|
1297
|
+
function Yt({ 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 }) {
|
|
1298
|
+
let { getMessageLocale: C, messages: w } = W(), 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
1299
|
te,
|
|
1218
1300
|
_ ? void 0 : P,
|
|
1219
1301
|
F
|
|
@@ -1247,14 +1329,14 @@ function Vt({ autoFocus: e = !1, defaultValue: t, description: n, disabled: i =
|
|
|
1247
1329
|
let t = L.current;
|
|
1248
1330
|
!t || t.matches(":disabled") || (t.focus(), R.current = t.ownerDocument.activeElement === t);
|
|
1249
1331
|
}, [e, U]);
|
|
1250
|
-
let ce = z && !U,
|
|
1332
|
+
let ce = z && !U, le = (e) => {
|
|
1251
1333
|
e && (U || L.current?.matches(":disabled")) || (e && !z && ae((e) => e + 1), B(e));
|
|
1252
1334
|
};
|
|
1253
1335
|
return /* @__PURE__ */ h("div", {
|
|
1254
|
-
className:
|
|
1336
|
+
className: q.base.root,
|
|
1255
1337
|
"data-required": x || void 0,
|
|
1256
1338
|
children: [
|
|
1257
|
-
/* @__PURE__ */ m(
|
|
1339
|
+
/* @__PURE__ */ m(at, {
|
|
1258
1340
|
htmlFor: I,
|
|
1259
1341
|
id: M,
|
|
1260
1342
|
label: p,
|
|
@@ -1262,22 +1344,22 @@ function Vt({ autoFocus: e = !1, defaultValue: t, description: n, disabled: i =
|
|
|
1262
1344
|
onClick: () => L.current?.focus()
|
|
1263
1345
|
}),
|
|
1264
1346
|
/* @__PURE__ */ h("span", {
|
|
1265
|
-
className:
|
|
1347
|
+
className: q.base.control,
|
|
1266
1348
|
children: [/* @__PURE__ */ h(g, {
|
|
1267
|
-
className:
|
|
1349
|
+
className: J(Wt.base.trigger, A && "breeze:border-breeze-danger", _ && "breeze:!opacity-0"),
|
|
1268
1350
|
isDisabled: k,
|
|
1269
1351
|
onPress: () => {
|
|
1270
1352
|
if (ce) {
|
|
1271
|
-
|
|
1353
|
+
le(!1);
|
|
1272
1354
|
return;
|
|
1273
1355
|
}
|
|
1274
1356
|
let e = L.current;
|
|
1275
1357
|
if (!(!e || U || e.matches(":disabled"))) {
|
|
1276
|
-
if (
|
|
1277
|
-
typeof requestAnimationFrame > "u" ? setTimeout(() =>
|
|
1358
|
+
if (qt(e)) {
|
|
1359
|
+
typeof requestAnimationFrame > "u" ? setTimeout(() => le(!0), 0) : requestAnimationFrame(() => le(!0));
|
|
1278
1360
|
return;
|
|
1279
1361
|
}
|
|
1280
|
-
|
|
1362
|
+
le(!0);
|
|
1281
1363
|
}
|
|
1282
1364
|
},
|
|
1283
1365
|
ref: L,
|
|
@@ -1297,18 +1379,18 @@ function Vt({ autoFocus: e = !1, defaultValue: t, description: n, disabled: i =
|
|
|
1297
1379
|
id: I,
|
|
1298
1380
|
type: "button"
|
|
1299
1381
|
}),
|
|
1300
|
-
children: [/* @__PURE__ */ m(
|
|
1382
|
+
children: [/* @__PURE__ */ m(Gt, {
|
|
1301
1383
|
placeholder: T,
|
|
1302
1384
|
placeholderLocale: E,
|
|
1303
1385
|
value: H,
|
|
1304
1386
|
valueId: N
|
|
1305
|
-
}), /* @__PURE__ */ m(
|
|
1387
|
+
}), /* @__PURE__ */ m(Y, {
|
|
1306
1388
|
name: "calendar",
|
|
1307
1389
|
size: "sm"
|
|
1308
1390
|
})]
|
|
1309
1391
|
}), _ && /* @__PURE__ */ m("span", {
|
|
1310
|
-
className:
|
|
1311
|
-
children: /* @__PURE__ */ m(
|
|
1392
|
+
className: q.base.skeleton,
|
|
1393
|
+
children: /* @__PURE__ */ m(G, {
|
|
1312
1394
|
blockSize: "100%",
|
|
1313
1395
|
inlineSize: "100%",
|
|
1314
1396
|
label: w.loading,
|
|
@@ -1329,7 +1411,7 @@ function Vt({ autoFocus: e = !1, defaultValue: t, description: n, disabled: i =
|
|
|
1329
1411
|
lang: C("required"),
|
|
1330
1412
|
children: w.required
|
|
1331
1413
|
}),
|
|
1332
|
-
/* @__PURE__ */ m(
|
|
1414
|
+
/* @__PURE__ */ m(Jt, {
|
|
1333
1415
|
calendarKey: ie,
|
|
1334
1416
|
dialogId: ee,
|
|
1335
1417
|
disabled: U,
|
|
@@ -1338,22 +1420,22 @@ function Vt({ autoFocus: e = !1, defaultValue: t, description: n, disabled: i =
|
|
|
1338
1420
|
onChange: (e) => {
|
|
1339
1421
|
if (!e || U || L.current?.matches(":disabled")) return;
|
|
1340
1422
|
let t = e.toString();
|
|
1341
|
-
S === void 0 && re(t), y?.(t),
|
|
1423
|
+
S === void 0 && re(t), y?.(t), le(!1);
|
|
1342
1424
|
},
|
|
1343
|
-
onOpenChange:
|
|
1425
|
+
onOpenChange: le,
|
|
1344
1426
|
triggerRef: L,
|
|
1345
1427
|
value: H
|
|
1346
1428
|
}),
|
|
1347
|
-
/* @__PURE__ */ m(
|
|
1429
|
+
/* @__PURE__ */ m(ot, {
|
|
1348
1430
|
description: D,
|
|
1349
1431
|
descriptionId: te,
|
|
1350
1432
|
loading: _
|
|
1351
1433
|
}),
|
|
1352
1434
|
O && /* @__PURE__ */ m("p", {
|
|
1353
1435
|
"aria-hidden": _ || void 0,
|
|
1354
|
-
className:
|
|
1436
|
+
className: q.base.error,
|
|
1355
1437
|
id: P,
|
|
1356
|
-
children: _ ? /* @__PURE__ */ m(
|
|
1438
|
+
children: _ ? /* @__PURE__ */ m(G, {
|
|
1357
1439
|
blockSize: "1lh",
|
|
1358
1440
|
inlineSize: "12em",
|
|
1359
1441
|
shape: "rectangle"
|
|
@@ -1364,7 +1446,7 @@ function Vt({ autoFocus: e = !1, defaultValue: t, description: n, disabled: i =
|
|
|
1364
1446
|
}
|
|
1365
1447
|
//#endregion
|
|
1366
1448
|
//#region src/overlays/OverlaySurface.tsx
|
|
1367
|
-
var
|
|
1449
|
+
var Xt = {
|
|
1368
1450
|
base: {
|
|
1369
1451
|
content: "breeze-overlay-content",
|
|
1370
1452
|
header: "breeze-overlay-header",
|
|
@@ -1379,21 +1461,21 @@ var Ht = {
|
|
|
1379
1461
|
fullscreen: "breeze-fullscreen",
|
|
1380
1462
|
popover: "breeze-popover"
|
|
1381
1463
|
}
|
|
1382
|
-
},
|
|
1383
|
-
function
|
|
1464
|
+
}, Zt = "Breeze overlay triggers and portal containers must belong to the current document and light DOM.";
|
|
1465
|
+
function Qt(e) {
|
|
1384
1466
|
return typeof e == "object" && !!e && "nodeType" in e && typeof e.contains == "function";
|
|
1385
1467
|
}
|
|
1386
|
-
function
|
|
1468
|
+
function $t(e) {
|
|
1387
1469
|
return e.dataset?.breezeOverlay !== void 0;
|
|
1388
1470
|
}
|
|
1389
|
-
function
|
|
1390
|
-
let { getMessageLocale: y, messages: b } =
|
|
1471
|
+
function en({ children: e, defaultOpen: t = !1, dismissible: n = !0, kind: r, onOpenChange: s, open: f, placement: g = "bottom", title: _, trigger: v }) {
|
|
1472
|
+
let { getMessageLocale: y, messages: b } = W(), x = r === "popover" || r === "fullscreen", S = xt(), C = a(gt), [w, T] = d(C === null);
|
|
1391
1473
|
o(() => T(!0), []);
|
|
1392
1474
|
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);
|
|
1393
1475
|
c(() => {
|
|
1394
|
-
if (S && j.current && (j.current.ownerDocument !== document || j.current.getRootNode() !== document || S.ownerDocument !== document || S.getRootNode() !== document)) throw Error(
|
|
1476
|
+
if (S && j.current && (j.current.ownerDocument !== document || j.current.getRootNode() !== document || S.ownerDocument !== document || S.getRootNode() !== document)) throw Error(Zt);
|
|
1395
1477
|
}, [S]);
|
|
1396
|
-
let re = l(() => r === "fullscreen" ? { current: S } : j, [S, r]), z =
|
|
1478
|
+
let re = l(() => r === "fullscreen" ? { current: S } : j, [S, r]), z = _t(r, A && w && S !== null, A || ee), B = i((e) => {
|
|
1397
1479
|
if (!e && !k) {
|
|
1398
1480
|
if (ne.current) return;
|
|
1399
1481
|
O && (ne.current = !0);
|
|
@@ -1415,11 +1497,11 @@ function Kt({ children: e, defaultOpen: t = !1, dismissible: n = !0, kind: r, on
|
|
|
1415
1497
|
if (r !== "popover" || !A || !n || !z.topmost || !S) return;
|
|
1416
1498
|
let e = () => {
|
|
1417
1499
|
I.current !== null && (clearTimeout(I.current), I.current = null);
|
|
1418
|
-
}, t = (e, t) => !!e && !!t && (e === t || e.contains(t) || t.contains(e)), i = (e) => e.button === 0, a = (e) =>
|
|
1419
|
-
i(t) && (e(), R.current = null, L.current =
|
|
1500
|
+
}, t = (e, t) => !!e && !!t && (e === t || e.contains(t) || t.contains(e)), i = (e) => e.button === 0, a = (e) => Qt(e) && !M.current?.contains(e) && !j.current?.contains(e), o = (t) => {
|
|
1501
|
+
i(t) && (e(), R.current = null, L.current = Qt(t.target) ? t.target : null);
|
|
1420
1502
|
}, s = (n) => {
|
|
1421
1503
|
if (!i(n)) return;
|
|
1422
|
-
let r = L.current, o =
|
|
1504
|
+
let r = L.current, o = Qt(n.target) ? n.target : null;
|
|
1423
1505
|
!a(r) || !a(o) || (e(), I.current = setTimeout(() => {
|
|
1424
1506
|
I.current = null;
|
|
1425
1507
|
let e = R.current, n = L.current;
|
|
@@ -1428,7 +1510,7 @@ function Kt({ children: e, defaultOpen: t = !1, dismissible: n = !0, kind: r, on
|
|
|
1428
1510
|
}, c = () => {
|
|
1429
1511
|
e(), R.current = null, L.current = null;
|
|
1430
1512
|
}, l = (n) => {
|
|
1431
|
-
let r =
|
|
1513
|
+
let r = Qt(n.target) ? n.target : null;
|
|
1432
1514
|
if (e(), a(r)) {
|
|
1433
1515
|
let e = R.current, n = L.current;
|
|
1434
1516
|
if (R.current = null, L.current = null, t(e, r) && t(e, n)) return;
|
|
@@ -1502,24 +1584,24 @@ function Kt({ children: e, defaultOpen: t = !1, dismissible: n = !0, kind: r, on
|
|
|
1502
1584
|
z.id,
|
|
1503
1585
|
A,
|
|
1504
1586
|
V
|
|
1505
|
-
]),
|
|
1506
|
-
className:
|
|
1587
|
+
]), le = /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h("div", {
|
|
1588
|
+
className: Xt.base.header,
|
|
1507
1589
|
children: [/* @__PURE__ */ m("h2", {
|
|
1508
|
-
className:
|
|
1590
|
+
className: Xt.base.title,
|
|
1509
1591
|
children: _
|
|
1510
1592
|
}), /* @__PURE__ */ m("span", {
|
|
1511
1593
|
lang: y("close"),
|
|
1512
|
-
children: /* @__PURE__ */ m(
|
|
1594
|
+
children: /* @__PURE__ */ m(Je, {
|
|
1513
1595
|
onAction: () => B(!1),
|
|
1514
1596
|
variant: "quiet",
|
|
1515
1597
|
children: b.close
|
|
1516
1598
|
})
|
|
1517
1599
|
})]
|
|
1518
|
-
}), e] }),
|
|
1600
|
+
}), e] }), ue = /* @__PURE__ */ m(gt, {
|
|
1519
1601
|
value: ce,
|
|
1520
1602
|
children: x ? /* @__PURE__ */ m("section", {
|
|
1521
1603
|
"aria-label": _,
|
|
1522
|
-
className:
|
|
1604
|
+
className: Xt.base.content,
|
|
1523
1605
|
id: z.id,
|
|
1524
1606
|
onBlur: (e) => {
|
|
1525
1607
|
if (P.current) {
|
|
@@ -1527,29 +1609,29 @@ function Kt({ children: e, defaultOpen: t = !1, dismissible: n = !0, kind: r, on
|
|
|
1527
1609
|
return;
|
|
1528
1610
|
}
|
|
1529
1611
|
let { relatedTarget: t } = e;
|
|
1530
|
-
r === "popover" && n && z.topmost &&
|
|
1612
|
+
r === "popover" && n && z.topmost && Qt(t) && !e.currentTarget.contains(t) && !j.current?.contains(t) && (R.current = t);
|
|
1531
1613
|
},
|
|
1532
1614
|
ref: se,
|
|
1533
1615
|
role: "dialog",
|
|
1534
1616
|
tabIndex: -1,
|
|
1535
|
-
children:
|
|
1536
|
-
}) : /* @__PURE__ */ m(
|
|
1617
|
+
children: le
|
|
1618
|
+
}) : /* @__PURE__ */ m(Te, {
|
|
1537
1619
|
"aria-label": _,
|
|
1538
|
-
className:
|
|
1620
|
+
className: Xt.base.content,
|
|
1539
1621
|
id: z.id,
|
|
1540
1622
|
ref: se,
|
|
1541
|
-
children:
|
|
1623
|
+
children: le
|
|
1542
1624
|
})
|
|
1543
1625
|
});
|
|
1544
|
-
return /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(
|
|
1626
|
+
return /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(Je, {
|
|
1545
1627
|
"aria-controls": A ? z.id : void 0,
|
|
1546
1628
|
"aria-expanded": A,
|
|
1547
1629
|
"aria-haspopup": "dialog",
|
|
1548
1630
|
onAction: () => B(!x || !A),
|
|
1549
1631
|
ref: j,
|
|
1550
1632
|
children: v
|
|
1551
|
-
}), S && w && (x ? /* @__PURE__ */ m(
|
|
1552
|
-
className:
|
|
1633
|
+
}), S && w && (x ? /* @__PURE__ */ m(xe, {
|
|
1634
|
+
className: Xt.variant[r],
|
|
1553
1635
|
"data-breeze-overlay": r,
|
|
1554
1636
|
"data-breeze-topmost": z.topmost,
|
|
1555
1637
|
"data-breeze-interactive": z.interactive,
|
|
@@ -1563,8 +1645,8 @@ function Kt({ children: e, defaultOpen: t = !1, dismissible: n = !0, kind: r, on
|
|
|
1563
1645
|
shouldCloseOnInteractOutside: (e) => r === "popover" && n && z.topmost && !j.current?.contains(e),
|
|
1564
1646
|
style: { zIndex: z.zIndex },
|
|
1565
1647
|
triggerRef: re,
|
|
1566
|
-
children:
|
|
1567
|
-
}) : /* @__PURE__ */ m(
|
|
1648
|
+
children: ue
|
|
1649
|
+
}) : /* @__PURE__ */ m(De, {
|
|
1568
1650
|
className: "breeze-overlay-backdrop",
|
|
1569
1651
|
"data-breeze-overlay": r,
|
|
1570
1652
|
"data-breeze-scrim": z.scrim,
|
|
@@ -1575,18 +1657,18 @@ function Kt({ children: e, defaultOpen: t = !1, dismissible: n = !0, kind: r, on
|
|
|
1575
1657
|
isKeyboardDismissDisabled: !n || !z.topmost,
|
|
1576
1658
|
isOpen: A,
|
|
1577
1659
|
onOpenChange: B,
|
|
1578
|
-
shouldCloseOnInteractOutside: (e) => z.topmost &&
|
|
1660
|
+
shouldCloseOnInteractOutside: (e) => z.topmost && $t(e),
|
|
1579
1661
|
style: { zIndex: z.zIndex },
|
|
1580
|
-
children: /* @__PURE__ */ m(
|
|
1581
|
-
className:
|
|
1582
|
-
children:
|
|
1662
|
+
children: /* @__PURE__ */ m(Ee, {
|
|
1663
|
+
className: Xt.variant[r],
|
|
1664
|
+
children: ue
|
|
1583
1665
|
})
|
|
1584
1666
|
}))] });
|
|
1585
1667
|
}
|
|
1586
1668
|
//#endregion
|
|
1587
1669
|
//#region src/primitives/Dialog/Dialog.tsx
|
|
1588
|
-
function
|
|
1589
|
-
return /* @__PURE__ */ m(
|
|
1670
|
+
function tn({ children: e, defaultOpen: t, dismissible: n, onOpenChange: r, open: i, title: a, trigger: o }) {
|
|
1671
|
+
return /* @__PURE__ */ m(en, {
|
|
1590
1672
|
defaultOpen: t,
|
|
1591
1673
|
dismissible: n,
|
|
1592
1674
|
onOpenChange: r,
|
|
@@ -1599,8 +1681,8 @@ function qt({ children: e, defaultOpen: t, dismissible: n, onOpenChange: r, open
|
|
|
1599
1681
|
}
|
|
1600
1682
|
//#endregion
|
|
1601
1683
|
//#region src/primitives/Drawer/Drawer.tsx
|
|
1602
|
-
function
|
|
1603
|
-
return /* @__PURE__ */ m(
|
|
1684
|
+
function nn({ children: e, defaultOpen: t, dismissible: n, onOpenChange: r, open: i, title: a, trigger: o }) {
|
|
1685
|
+
return /* @__PURE__ */ m(en, {
|
|
1604
1686
|
defaultOpen: t,
|
|
1605
1687
|
dismissible: n,
|
|
1606
1688
|
onOpenChange: r,
|
|
@@ -1613,7 +1695,7 @@ function Jt({ children: e, defaultOpen: t, dismissible: n, onOpenChange: r, open
|
|
|
1613
1695
|
}
|
|
1614
1696
|
//#endregion
|
|
1615
1697
|
//#region src/primitives/Grid/Grid.tsx
|
|
1616
|
-
var
|
|
1698
|
+
var rn = {
|
|
1617
1699
|
base: { grid: "breeze:grid breeze:min-inline-size-0" },
|
|
1618
1700
|
compound: { columns: {
|
|
1619
1701
|
1: {
|
|
@@ -1649,21 +1731,21 @@ var Yt = {
|
|
|
1649
1731
|
state: {},
|
|
1650
1732
|
variant: {}
|
|
1651
1733
|
};
|
|
1652
|
-
function
|
|
1653
|
-
let { accessibleLabel: s, role: c } =
|
|
1734
|
+
function an({ "aria-label": e, children: t, collapseBelow: n = "md", columns: i = 2, element: a = "div", gap: o = 4 }) {
|
|
1735
|
+
let { accessibleLabel: s, role: c } = nt(e, a);
|
|
1654
1736
|
return r(a, {
|
|
1655
1737
|
"aria-label": s,
|
|
1656
1738
|
className: [
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1739
|
+
rn.base.grid,
|
|
1740
|
+
rn.compound.columns[i][n],
|
|
1741
|
+
rn.size[o]
|
|
1660
1742
|
].join(" "),
|
|
1661
1743
|
role: c
|
|
1662
1744
|
}, t);
|
|
1663
1745
|
}
|
|
1664
1746
|
//#endregion
|
|
1665
1747
|
//#region src/primitives/IconTile/IconTile.tsx
|
|
1666
|
-
var
|
|
1748
|
+
var on = {
|
|
1667
1749
|
base: { tile: "breeze:inline-flex breeze:shrink-0 breeze:items-center breeze:justify-center" },
|
|
1668
1750
|
compound: {},
|
|
1669
1751
|
size: {
|
|
@@ -1685,15 +1767,15 @@ var Zt = {
|
|
|
1685
1767
|
}
|
|
1686
1768
|
}
|
|
1687
1769
|
};
|
|
1688
|
-
function
|
|
1770
|
+
function sn({ label: e, name: t, shape: n = "square", size: r = "lg", tone: i = "brand" }) {
|
|
1689
1771
|
return /* @__PURE__ */ m("span", {
|
|
1690
1772
|
className: [
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1773
|
+
on.base.tile,
|
|
1774
|
+
on.variant.tone[i],
|
|
1775
|
+
on.variant.shape[n],
|
|
1776
|
+
on.size[r]
|
|
1695
1777
|
].join(" "),
|
|
1696
|
-
children: /* @__PURE__ */ m(
|
|
1778
|
+
children: /* @__PURE__ */ m(Y, {
|
|
1697
1779
|
label: e,
|
|
1698
1780
|
name: t,
|
|
1699
1781
|
size: r === "lg" ? "md" : "sm"
|
|
@@ -1702,7 +1784,7 @@ function Qt({ label: e, name: t, shape: n = "square", size: r = "lg", tone: i =
|
|
|
1702
1784
|
}
|
|
1703
1785
|
//#endregion
|
|
1704
1786
|
//#region src/primitives/Inline/Inline.tsx
|
|
1705
|
-
var
|
|
1787
|
+
var cn = {
|
|
1706
1788
|
base: { inline: "breeze:flex breeze:min-inline-size-0" },
|
|
1707
1789
|
compound: {},
|
|
1708
1790
|
size: {
|
|
@@ -1732,21 +1814,177 @@ var $t = {
|
|
|
1732
1814
|
}
|
|
1733
1815
|
}
|
|
1734
1816
|
};
|
|
1735
|
-
function
|
|
1736
|
-
let { accessibleLabel: c, role: l } =
|
|
1817
|
+
function ln({ "aria-label": e, children: t, element: n = "div", gap: i = 3, justify: a = "start", verticalAlign: o = "center", wrap: s = !1 }) {
|
|
1818
|
+
let { accessibleLabel: c, role: l } = nt(e, n);
|
|
1737
1819
|
return r(n, {
|
|
1738
1820
|
"aria-label": c,
|
|
1739
1821
|
className: [
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
s &&
|
|
1822
|
+
cn.base.inline,
|
|
1823
|
+
cn.variant.align[o],
|
|
1824
|
+
cn.variant.justify[a],
|
|
1825
|
+
cn.size[i],
|
|
1826
|
+
s && cn.state.wrap
|
|
1745
1827
|
].filter(Boolean).join(" "),
|
|
1746
1828
|
role: l
|
|
1747
1829
|
}, t);
|
|
1748
1830
|
}
|
|
1749
1831
|
//#endregion
|
|
1832
|
+
//#region src/primitives/Menu/Menu.tsx
|
|
1833
|
+
var Q = {
|
|
1834
|
+
base: {
|
|
1835
|
+
badge: "breeze:ms-auto",
|
|
1836
|
+
content: "breeze:flex breeze:min-inline-size-0 breeze:flex-1 breeze:flex-col breeze:gap-breeze-1",
|
|
1837
|
+
description: "breeze:text-breeze-xs breeze:font-normal breeze:leading-breeze-snug breeze:text-breeze-ink-3",
|
|
1838
|
+
icon: "breeze:block-size-breeze-4 breeze:inline-size-breeze-4 breeze:shrink-0",
|
|
1839
|
+
item: "breeze:flex breeze:min-inline-size-0 breeze:min-block-breeze-md breeze:any-pointer-coarse:min-block-breeze-tap breeze:items-center breeze:gap-breeze-2 breeze:rounded-breeze-sm breeze:ps-breeze-3 breeze:pe-breeze-3 breeze:py-breeze-2 breeze:font-breeze-sans breeze:text-breeze-sm breeze:leading-breeze-snug breeze:text-breeze-ink breeze:text-start breeze:outline-offset-[-2px] breeze:data-[disabled]:cursor-not-allowed breeze:data-[disabled]:opacity-50 breeze:data-[focused]:bg-breeze-sunken breeze:data-[focus-visible]:outline-2 breeze:data-[focus-visible]:outline-solid breeze:data-[focus-visible]:outline-breeze-brand breeze:data-[hovered]:bg-breeze-sunken",
|
|
1840
|
+
label: "breeze:font-medium",
|
|
1841
|
+
menu: "breeze:min-inline-size-0 breeze:outline-none",
|
|
1842
|
+
popover: "breeze:[min-inline-size:var(--trigger-width)] breeze:max-inline-size-[calc(100vw-24px)] breeze:overflow-auto breeze:rounded-breeze-panel breeze:border breeze:border-solid breeze:border-breeze-line breeze:bg-breeze-surface breeze:p-breeze-1 breeze:shadow-breeze-overlay",
|
|
1843
|
+
trigger: "breeze:inline-flex breeze:min-block-breeze-md breeze:any-pointer-coarse:min-block-breeze-tap breeze:items-center breeze:gap-breeze-2 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:data-[hovered]:bg-breeze-sunken breeze:data-[focus-visible]:outline-2 breeze:data-[focus-visible]:outline-solid breeze:data-[focus-visible]:outline-breeze-brand",
|
|
1844
|
+
triggerLabel: "breeze:inline-grid breeze:min-inline-size-0 breeze:items-center",
|
|
1845
|
+
triggerLabelContent: "breeze:[grid-area:1/1]",
|
|
1846
|
+
triggerLabelSkeleton: "breeze:[grid-area:1/1] breeze:inline-size-full",
|
|
1847
|
+
triggerLoadingStatus: "breeze:sr-only"
|
|
1848
|
+
},
|
|
1849
|
+
compound: {},
|
|
1850
|
+
size: {},
|
|
1851
|
+
state: {},
|
|
1852
|
+
variant: {}
|
|
1853
|
+
};
|
|
1854
|
+
function un({ descriptionId: e, descriptor: t }) {
|
|
1855
|
+
return /* @__PURE__ */ h(p, { children: [
|
|
1856
|
+
/* @__PURE__ */ m("span", {
|
|
1857
|
+
"aria-hidden": "true",
|
|
1858
|
+
className: Q.base.icon,
|
|
1859
|
+
children: t.icon && /* @__PURE__ */ m(Y, {
|
|
1860
|
+
name: t.icon,
|
|
1861
|
+
size: "sm"
|
|
1862
|
+
})
|
|
1863
|
+
}),
|
|
1864
|
+
/* @__PURE__ */ h("span", {
|
|
1865
|
+
className: Q.base.content,
|
|
1866
|
+
children: [/* @__PURE__ */ m("span", {
|
|
1867
|
+
className: Q.base.label,
|
|
1868
|
+
children: t.label
|
|
1869
|
+
}), t.description && /* @__PURE__ */ m("span", {
|
|
1870
|
+
className: Q.base.description,
|
|
1871
|
+
id: e,
|
|
1872
|
+
children: t.description
|
|
1873
|
+
})]
|
|
1874
|
+
}),
|
|
1875
|
+
t.badge && /* @__PURE__ */ m("span", {
|
|
1876
|
+
className: Q.base.badge,
|
|
1877
|
+
children: /* @__PURE__ */ m(Ke, {
|
|
1878
|
+
"aria-label": t.badge["aria-label"],
|
|
1879
|
+
variant: t.badge.variant,
|
|
1880
|
+
children: t.badge.children
|
|
1881
|
+
})
|
|
1882
|
+
})
|
|
1883
|
+
] });
|
|
1884
|
+
}
|
|
1885
|
+
function dn(e) {
|
|
1886
|
+
if (!e.badge) return e.label;
|
|
1887
|
+
let t = e.badge["aria-label"]?.trim() || e.badge.children;
|
|
1888
|
+
return `${e.label}, ${t}`;
|
|
1889
|
+
}
|
|
1890
|
+
function fn({ loading: e }) {
|
|
1891
|
+
let { getMessageLocale: t, messages: n } = W();
|
|
1892
|
+
return /* @__PURE__ */ h(p, { children: [e && /* @__PURE__ */ m("span", {
|
|
1893
|
+
className: Q.base.triggerLoadingStatus,
|
|
1894
|
+
children: /* @__PURE__ */ m(G, { label: n.loading })
|
|
1895
|
+
}), /* @__PURE__ */ m("output", {
|
|
1896
|
+
"aria-live": "polite",
|
|
1897
|
+
className: Q.base.triggerLoadingStatus,
|
|
1898
|
+
lang: t("loading"),
|
|
1899
|
+
children: e ? n.loading : ""
|
|
1900
|
+
})] });
|
|
1901
|
+
}
|
|
1902
|
+
function pn({ defaultOpen: e, getItem: t, items: n, loading: a = !1, onAction: o, onOpenChange: f, open: _, trigger: v, triggerIcon: y }) {
|
|
1903
|
+
W();
|
|
1904
|
+
let [b, x] = d(e ?? !1), S = _ ?? b, C = u(null), w = u(!1), T = s(), E = l(() => n.map(t), [t, n]), D = i((e) => {
|
|
1905
|
+
a && e || (_ === void 0 && x(e), f?.(e));
|
|
1906
|
+
}, [
|
|
1907
|
+
_,
|
|
1908
|
+
a,
|
|
1909
|
+
f
|
|
1910
|
+
]);
|
|
1911
|
+
return c(() => {
|
|
1912
|
+
!S && w.current && (w.current = !1, requestAnimationFrame(() => {
|
|
1913
|
+
let e = C.current;
|
|
1914
|
+
e && e.ownerDocument.activeElement === e.ownerDocument.body && e.focus();
|
|
1915
|
+
}));
|
|
1916
|
+
}, [S]), /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h(Ae, {
|
|
1917
|
+
isOpen: S,
|
|
1918
|
+
onOpenChange: D,
|
|
1919
|
+
children: [/* @__PURE__ */ h(g, {
|
|
1920
|
+
"aria-haspopup": "menu",
|
|
1921
|
+
className: Q.base.trigger,
|
|
1922
|
+
isPending: a,
|
|
1923
|
+
ref: C,
|
|
1924
|
+
render: (e) => r("button", {
|
|
1925
|
+
...e,
|
|
1926
|
+
"aria-busy": a || void 0,
|
|
1927
|
+
type: "button"
|
|
1928
|
+
}),
|
|
1929
|
+
children: [
|
|
1930
|
+
y && /* @__PURE__ */ m(Y, {
|
|
1931
|
+
name: y,
|
|
1932
|
+
size: "sm"
|
|
1933
|
+
}),
|
|
1934
|
+
/* @__PURE__ */ h("span", {
|
|
1935
|
+
className: Q.base.triggerLabel,
|
|
1936
|
+
children: [/* @__PURE__ */ m("span", {
|
|
1937
|
+
className: [Q.base.triggerLabelContent, a && "breeze:opacity-0"].filter(Boolean).join(" "),
|
|
1938
|
+
children: v
|
|
1939
|
+
}), a && /* @__PURE__ */ m("span", {
|
|
1940
|
+
"aria-hidden": "true",
|
|
1941
|
+
className: Q.base.triggerLabelSkeleton,
|
|
1942
|
+
"data-breeze-skeleton": "",
|
|
1943
|
+
children: /* @__PURE__ */ m(G, {})
|
|
1944
|
+
})]
|
|
1945
|
+
}),
|
|
1946
|
+
/* @__PURE__ */ m(Y, {
|
|
1947
|
+
name: "expand",
|
|
1948
|
+
size: "sm"
|
|
1949
|
+
})
|
|
1950
|
+
]
|
|
1951
|
+
}), /* @__PURE__ */ m(wt, {
|
|
1952
|
+
className: Q.base.popover,
|
|
1953
|
+
isOpen: S,
|
|
1954
|
+
onOpenChange: D,
|
|
1955
|
+
triggerRef: C,
|
|
1956
|
+
children: /* @__PURE__ */ m("div", {
|
|
1957
|
+
onKeyDownCapture: (e) => {
|
|
1958
|
+
e.key === "Escape" && (w.current = !0);
|
|
1959
|
+
},
|
|
1960
|
+
children: /* @__PURE__ */ m(Oe, {
|
|
1961
|
+
className: Q.base.menu,
|
|
1962
|
+
id: T,
|
|
1963
|
+
onAction: (e) => {
|
|
1964
|
+
let t = E.find((t) => t.id === e);
|
|
1965
|
+
t && (w.current = !0, o?.(t));
|
|
1966
|
+
},
|
|
1967
|
+
children: E.map((e, t) => {
|
|
1968
|
+
let n = `${T}-description-${t}`;
|
|
1969
|
+
return /* @__PURE__ */ m(ke, {
|
|
1970
|
+
"aria-describedby": e.description ? n : void 0,
|
|
1971
|
+
"aria-label": dn(e),
|
|
1972
|
+
className: Q.base.item,
|
|
1973
|
+
id: e.id,
|
|
1974
|
+
isDisabled: e.disabled,
|
|
1975
|
+
textValue: e.label,
|
|
1976
|
+
children: /* @__PURE__ */ m(un, {
|
|
1977
|
+
descriptionId: n,
|
|
1978
|
+
descriptor: e
|
|
1979
|
+
})
|
|
1980
|
+
}, e.id);
|
|
1981
|
+
})
|
|
1982
|
+
})
|
|
1983
|
+
})
|
|
1984
|
+
})]
|
|
1985
|
+
}), /* @__PURE__ */ m(fn, { loading: a })] });
|
|
1986
|
+
}
|
|
1987
|
+
//#endregion
|
|
1750
1988
|
//#region src/primitives/NumberField/NumberField.tsx
|
|
1751
1989
|
var $ = {
|
|
1752
1990
|
base: {
|
|
@@ -1765,12 +2003,12 @@ var $ = {
|
|
|
1765
2003
|
},
|
|
1766
2004
|
variant: {}
|
|
1767
2005
|
};
|
|
1768
|
-
function
|
|
1769
|
-
let { messages: T } =
|
|
1770
|
-
return /* @__PURE__ */ h(
|
|
2006
|
+
function mn({ 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 }) {
|
|
2007
|
+
let { messages: T } = W(), E = i?.trim() || void 0, D = o?.trim() || void 0, O = a || d;
|
|
2008
|
+
return /* @__PURE__ */ h(je, {
|
|
1771
2009
|
autoFocus: t,
|
|
1772
2010
|
"aria-label": d ? u : void 0,
|
|
1773
|
-
className:
|
|
2011
|
+
className: q.base.root,
|
|
1774
2012
|
defaultValue: n,
|
|
1775
2013
|
form: s,
|
|
1776
2014
|
formatOptions: c,
|
|
@@ -1787,23 +2025,23 @@ function tn({ autoComplete: e, autoFocus: t, defaultValue: n, description: i, di
|
|
|
1787
2025
|
validationBehavior: "aria",
|
|
1788
2026
|
value: w,
|
|
1789
2027
|
children: [
|
|
1790
|
-
/* @__PURE__ */ m(
|
|
2028
|
+
/* @__PURE__ */ m(at, {
|
|
1791
2029
|
label: u,
|
|
1792
2030
|
loading: d
|
|
1793
2031
|
}),
|
|
1794
|
-
/* @__PURE__ */ h(
|
|
1795
|
-
className:
|
|
2032
|
+
/* @__PURE__ */ h(_e, {
|
|
2033
|
+
className: J($.base.group, b && !d && $.state.readOnlyGroup, d && $.state.loadingGroup),
|
|
1796
2034
|
children: [
|
|
1797
|
-
/* @__PURE__ */ m(
|
|
2035
|
+
/* @__PURE__ */ m(ve, {
|
|
1798
2036
|
"aria-busy": d || void 0,
|
|
1799
|
-
className:
|
|
2037
|
+
className: J(q.base.input, $.base.input, d && $.state.loadingInput),
|
|
1800
2038
|
autoComplete: e,
|
|
1801
2039
|
placeholder: y,
|
|
1802
2040
|
form: s,
|
|
1803
2041
|
ref: x
|
|
1804
2042
|
}),
|
|
1805
2043
|
/* @__PURE__ */ m(g, {
|
|
1806
|
-
className:
|
|
2044
|
+
className: J($.base.stepButton, d && $.state.loadingStepButton),
|
|
1807
2045
|
render: (e) => r("button", {
|
|
1808
2046
|
...e,
|
|
1809
2047
|
"aria-hidden": d || void 0,
|
|
@@ -1814,7 +2052,7 @@ function tn({ autoComplete: e, autoFocus: t, defaultValue: n, description: i, di
|
|
|
1814
2052
|
children: "−"
|
|
1815
2053
|
}),
|
|
1816
2054
|
/* @__PURE__ */ m(g, {
|
|
1817
|
-
className:
|
|
2055
|
+
className: J($.base.stepButton, d && $.state.loadingStepButton),
|
|
1818
2056
|
render: (e) => r("button", {
|
|
1819
2057
|
...e,
|
|
1820
2058
|
"aria-hidden": d || void 0,
|
|
@@ -1826,7 +2064,7 @@ function tn({ autoComplete: e, autoFocus: t, defaultValue: n, description: i, di
|
|
|
1826
2064
|
}),
|
|
1827
2065
|
d && /* @__PURE__ */ m("span", {
|
|
1828
2066
|
className: $.base.skeleton,
|
|
1829
|
-
children: /* @__PURE__ */ m(
|
|
2067
|
+
children: /* @__PURE__ */ m(G, {
|
|
1830
2068
|
blockSize: "100%",
|
|
1831
2069
|
inlineSize: "100%",
|
|
1832
2070
|
label: T.loading,
|
|
@@ -1835,7 +2073,7 @@ function tn({ autoComplete: e, autoFocus: t, defaultValue: n, description: i, di
|
|
|
1835
2073
|
})
|
|
1836
2074
|
]
|
|
1837
2075
|
}),
|
|
1838
|
-
/* @__PURE__ */ m(
|
|
2076
|
+
/* @__PURE__ */ m(ot, {
|
|
1839
2077
|
description: E,
|
|
1840
2078
|
error: D,
|
|
1841
2079
|
loading: d
|
|
@@ -1845,8 +2083,8 @@ function tn({ autoComplete: e, autoFocus: t, defaultValue: n, description: i, di
|
|
|
1845
2083
|
}
|
|
1846
2084
|
//#endregion
|
|
1847
2085
|
//#region src/primitives/Popover/Popover.tsx
|
|
1848
|
-
function
|
|
1849
|
-
return /* @__PURE__ */ m(
|
|
2086
|
+
function hn({ children: e, defaultOpen: t, dismissible: n, onOpenChange: r, open: i, title: a, trigger: o, placement: s }) {
|
|
2087
|
+
return /* @__PURE__ */ m(en, {
|
|
1850
2088
|
defaultOpen: t,
|
|
1851
2089
|
dismissible: n,
|
|
1852
2090
|
onOpenChange: r,
|
|
@@ -1860,32 +2098,32 @@ function nn({ children: e, defaultOpen: t, dismissible: n, onOpenChange: r, open
|
|
|
1860
2098
|
}
|
|
1861
2099
|
//#endregion
|
|
1862
2100
|
//#region src/primitives/Select/Select.tsx
|
|
1863
|
-
var
|
|
2101
|
+
var gn = {
|
|
1864
2102
|
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" },
|
|
1865
2103
|
compound: {},
|
|
1866
2104
|
size: {},
|
|
1867
2105
|
state: { readOnlyTrigger: "breeze:cursor-default breeze:bg-breeze-sunken" },
|
|
1868
2106
|
variant: {}
|
|
1869
2107
|
};
|
|
1870
|
-
function
|
|
1871
|
-
return /* @__PURE__ */ m(
|
|
1872
|
-
className:
|
|
2108
|
+
function _n({ items: e }) {
|
|
2109
|
+
return /* @__PURE__ */ m(ye, {
|
|
2110
|
+
className: Z.base.listBox,
|
|
1873
2111
|
items: e,
|
|
1874
|
-
children: (e) => /* @__PURE__ */ m(
|
|
1875
|
-
className:
|
|
2112
|
+
children: (e) => /* @__PURE__ */ m(be, {
|
|
2113
|
+
className: Z.base.item,
|
|
1876
2114
|
id: e.descriptor.id,
|
|
1877
2115
|
isDisabled: e.descriptor.disabled,
|
|
1878
2116
|
textValue: e.descriptor.label,
|
|
1879
2117
|
value: e,
|
|
1880
|
-
children: ({ isSelected: t }) => /* @__PURE__ */ m(
|
|
2118
|
+
children: ({ isSelected: t }) => /* @__PURE__ */ m(Tt, {
|
|
1881
2119
|
descriptor: e.descriptor,
|
|
1882
2120
|
isSelected: t
|
|
1883
2121
|
})
|
|
1884
2122
|
})
|
|
1885
2123
|
});
|
|
1886
2124
|
}
|
|
1887
|
-
function
|
|
1888
|
-
let i = a(
|
|
2125
|
+
function vn({ form: e, interactionDisabled: t, name: n, readOnly: r }) {
|
|
2126
|
+
let i = a(Ne);
|
|
1889
2127
|
return !r || t || !n || i === null ? null : /* @__PURE__ */ m("input", {
|
|
1890
2128
|
form: e,
|
|
1891
2129
|
name: n,
|
|
@@ -1893,30 +2131,30 @@ function on({ form: e, interactionDisabled: t, name: n, readOnly: r }) {
|
|
|
1893
2131
|
value: i.value === null ? "" : String(i.value)
|
|
1894
2132
|
});
|
|
1895
2133
|
}
|
|
1896
|
-
function
|
|
1897
|
-
let i = a(
|
|
2134
|
+
function yn({ disabled: e, items: t, readOnly: n, triggerRef: r }) {
|
|
2135
|
+
let i = a(Ne), s = e || n || t.length === 0, c = !s && (i?.isOpen ?? !1);
|
|
1898
2136
|
return o(() => {
|
|
1899
2137
|
s && i?.isOpen && i.setOpen(!1);
|
|
1900
|
-
}, [s, i]), /* @__PURE__ */ m(
|
|
1901
|
-
className:
|
|
2138
|
+
}, [s, i]), /* @__PURE__ */ m(wt, {
|
|
2139
|
+
className: Z.base.popover,
|
|
1902
2140
|
isOpen: c,
|
|
1903
2141
|
onOpenChange: (e) => i?.setOpen(e),
|
|
1904
2142
|
triggerRef: r,
|
|
1905
|
-
children: /* @__PURE__ */ m(
|
|
2143
|
+
children: /* @__PURE__ */ m(_n, { items: t })
|
|
1906
2144
|
});
|
|
1907
2145
|
}
|
|
1908
|
-
function
|
|
1909
|
-
let { messages: T } =
|
|
2146
|
+
function bn({ 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 }) {
|
|
2147
|
+
let { messages: T } = W(), 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) => ({
|
|
1910
2148
|
descriptor: d(e),
|
|
1911
2149
|
item: e
|
|
1912
2150
|
})), [d, p]), ee;
|
|
1913
2151
|
ee = w === void 0 ? void 0 : w === null ? null : d(w).id;
|
|
1914
2152
|
let te = n == null ? null : d(n).id;
|
|
1915
|
-
return /* @__PURE__ */ h(
|
|
2153
|
+
return /* @__PURE__ */ h(Me, {
|
|
1916
2154
|
"aria-label": v ? _ : void 0,
|
|
1917
2155
|
autoComplete: e,
|
|
1918
2156
|
autoFocus: t,
|
|
1919
|
-
className:
|
|
2157
|
+
className: q.base.root,
|
|
1920
2158
|
defaultValue: te,
|
|
1921
2159
|
form: c,
|
|
1922
2160
|
id: j,
|
|
@@ -1933,16 +2171,16 @@ function cn({ autoComplete: e, autoFocus: t, defaultValue: n, description: i, di
|
|
|
1933
2171
|
validationBehavior: "aria",
|
|
1934
2172
|
value: ee,
|
|
1935
2173
|
children: [
|
|
1936
|
-
/* @__PURE__ */ m(
|
|
2174
|
+
/* @__PURE__ */ m(at, {
|
|
1937
2175
|
htmlFor: j,
|
|
1938
2176
|
label: _,
|
|
1939
2177
|
loading: v,
|
|
1940
2178
|
onClick: () => M.current?.focus()
|
|
1941
2179
|
}),
|
|
1942
2180
|
/* @__PURE__ */ h("div", {
|
|
1943
|
-
className:
|
|
2181
|
+
className: q.base.control,
|
|
1944
2182
|
children: [/* @__PURE__ */ h(g, {
|
|
1945
|
-
className:
|
|
2183
|
+
className: J(gn.base.trigger, S && gn.state.readOnlyTrigger, v && "breeze:!opacity-0"),
|
|
1946
2184
|
isDisabled: O,
|
|
1947
2185
|
ref: M,
|
|
1948
2186
|
render: (e) => r("button", {
|
|
@@ -1953,16 +2191,16 @@ function cn({ autoComplete: e, autoFocus: t, defaultValue: n, description: i, di
|
|
|
1953
2191
|
"data-invalid": k || void 0,
|
|
1954
2192
|
type: "button"
|
|
1955
2193
|
}),
|
|
1956
|
-
children: [/* @__PURE__ */ m(
|
|
1957
|
-
className:
|
|
2194
|
+
children: [/* @__PURE__ */ m(Pe, {
|
|
2195
|
+
className: J(Z.base.content, "breeze:text-start"),
|
|
1958
2196
|
children: ({ isPlaceholder: e, selectedText: t }) => e ? x ?? "" : t
|
|
1959
|
-
}), /* @__PURE__ */ m(
|
|
2197
|
+
}), /* @__PURE__ */ m(Y, {
|
|
1960
2198
|
name: "expand",
|
|
1961
2199
|
size: "sm"
|
|
1962
2200
|
})]
|
|
1963
2201
|
}), v && /* @__PURE__ */ m("span", {
|
|
1964
|
-
className:
|
|
1965
|
-
children: /* @__PURE__ */ m(
|
|
2202
|
+
className: q.base.skeleton,
|
|
2203
|
+
children: /* @__PURE__ */ m(G, {
|
|
1966
2204
|
blockSize: "100%",
|
|
1967
2205
|
inlineSize: "100%",
|
|
1968
2206
|
label: T.loading,
|
|
@@ -1970,19 +2208,19 @@ function cn({ autoComplete: e, autoFocus: t, defaultValue: n, description: i, di
|
|
|
1970
2208
|
})
|
|
1971
2209
|
})]
|
|
1972
2210
|
}),
|
|
1973
|
-
/* @__PURE__ */ m(
|
|
2211
|
+
/* @__PURE__ */ m(yn, {
|
|
1974
2212
|
disabled: O,
|
|
1975
2213
|
items: N,
|
|
1976
2214
|
readOnly: S,
|
|
1977
2215
|
triggerRef: M
|
|
1978
2216
|
}),
|
|
1979
|
-
/* @__PURE__ */ m(
|
|
2217
|
+
/* @__PURE__ */ m(vn, {
|
|
1980
2218
|
form: c,
|
|
1981
2219
|
interactionDisabled: O,
|
|
1982
2220
|
name: y,
|
|
1983
2221
|
readOnly: S
|
|
1984
2222
|
}),
|
|
1985
|
-
/* @__PURE__ */ m(
|
|
2223
|
+
/* @__PURE__ */ m(ot, {
|
|
1986
2224
|
description: E,
|
|
1987
2225
|
error: D,
|
|
1988
2226
|
loading: v
|
|
@@ -1992,7 +2230,7 @@ function cn({ autoComplete: e, autoFocus: t, defaultValue: n, description: i, di
|
|
|
1992
2230
|
}
|
|
1993
2231
|
//#endregion
|
|
1994
2232
|
//#region src/primitives/Separator/Separator.tsx
|
|
1995
|
-
var
|
|
2233
|
+
var xn = {
|
|
1996
2234
|
base: { separator: "breeze:m-0 breeze:shrink-0 breeze:border-0 breeze:bg-breeze-line breeze:forced-colors:bg-[CanvasText]" },
|
|
1997
2235
|
compound: {},
|
|
1998
2236
|
size: {},
|
|
@@ -2002,15 +2240,15 @@ var ln = {
|
|
|
2002
2240
|
vertical: "breeze:block-size-full breeze:inline-size-breeze-px"
|
|
2003
2241
|
}
|
|
2004
2242
|
};
|
|
2005
|
-
function
|
|
2243
|
+
function Sn({ orientation: e = "horizontal" }) {
|
|
2006
2244
|
return /* @__PURE__ */ m("hr", {
|
|
2007
2245
|
"aria-orientation": e,
|
|
2008
|
-
className: [
|
|
2246
|
+
className: [xn.base.separator, xn.variant[e]].join(" ")
|
|
2009
2247
|
});
|
|
2010
2248
|
}
|
|
2011
2249
|
//#endregion
|
|
2012
2250
|
//#region src/primitives/Stack/Stack.tsx
|
|
2013
|
-
var
|
|
2251
|
+
var Cn = {
|
|
2014
2252
|
base: { stack: "breeze:flex breeze:min-inline-size-0 breeze:flex-col" },
|
|
2015
2253
|
compound: {},
|
|
2016
2254
|
size: {
|
|
@@ -2032,24 +2270,24 @@ var dn = {
|
|
|
2032
2270
|
stretch: "breeze:items-stretch"
|
|
2033
2271
|
}
|
|
2034
2272
|
};
|
|
2035
|
-
function
|
|
2036
|
-
let { accessibleLabel: o, role: s } =
|
|
2273
|
+
function wn({ "aria-label": e, children: t, element: n = "div", gap: i = 3, horizontalAlign: a = "stretch" }) {
|
|
2274
|
+
let { accessibleLabel: o, role: s } = nt(e, n);
|
|
2037
2275
|
return r(n, {
|
|
2038
2276
|
"aria-label": o,
|
|
2039
2277
|
className: [
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2278
|
+
Cn.base.stack,
|
|
2279
|
+
Cn.variant[a],
|
|
2280
|
+
Cn.size[i]
|
|
2043
2281
|
].join(" "),
|
|
2044
2282
|
role: s
|
|
2045
2283
|
}, t);
|
|
2046
2284
|
}
|
|
2047
2285
|
//#endregion
|
|
2048
2286
|
//#region src/primitives/TextField/TextField.tsx
|
|
2049
|
-
function
|
|
2050
|
-
let { messages: b } =
|
|
2051
|
-
return /* @__PURE__ */ h(
|
|
2052
|
-
className:
|
|
2287
|
+
function Tn({ autoComplete: e, autoFocus: t, defaultValue: n, description: r, disabled: i = !1, error: a, form: o, id: s, label: c, loading: l = !1, name: u, onChange: d, placeholder: f, readOnly: p = !1, ref: g, required: _ = !1, type: v = "text", value: y }) {
|
|
2288
|
+
let { messages: b } = W(), x = r?.trim() || void 0, S = a?.trim() || void 0, C = i || l;
|
|
2289
|
+
return /* @__PURE__ */ h(Fe, {
|
|
2290
|
+
className: q.base.root,
|
|
2053
2291
|
defaultValue: n,
|
|
2054
2292
|
"aria-label": l ? c : void 0,
|
|
2055
2293
|
id: s,
|
|
@@ -2063,23 +2301,23 @@ function pn({ autoComplete: e, autoFocus: t, defaultValue: n, description: r, di
|
|
|
2063
2301
|
validationBehavior: "aria",
|
|
2064
2302
|
value: y,
|
|
2065
2303
|
children: [
|
|
2066
|
-
/* @__PURE__ */ m(
|
|
2304
|
+
/* @__PURE__ */ m(at, {
|
|
2067
2305
|
label: c,
|
|
2068
2306
|
loading: l
|
|
2069
2307
|
}),
|
|
2070
2308
|
/* @__PURE__ */ h("span", {
|
|
2071
|
-
className:
|
|
2072
|
-
children: [/* @__PURE__ */ m(
|
|
2309
|
+
className: q.base.control,
|
|
2310
|
+
children: [/* @__PURE__ */ m(ve, {
|
|
2073
2311
|
"aria-busy": l || void 0,
|
|
2074
|
-
className:
|
|
2312
|
+
className: J(q.base.input, l && q.state.loadingInput),
|
|
2075
2313
|
autoComplete: e,
|
|
2076
2314
|
autoFocus: t,
|
|
2077
2315
|
form: o,
|
|
2078
2316
|
placeholder: f,
|
|
2079
2317
|
ref: g
|
|
2080
2318
|
}), l && /* @__PURE__ */ m("span", {
|
|
2081
|
-
className:
|
|
2082
|
-
children: /* @__PURE__ */ m(
|
|
2319
|
+
className: q.base.skeleton,
|
|
2320
|
+
children: /* @__PURE__ */ m(G, {
|
|
2083
2321
|
blockSize: "100%",
|
|
2084
2322
|
inlineSize: "100%",
|
|
2085
2323
|
label: b.loading,
|
|
@@ -2087,7 +2325,7 @@ function pn({ autoComplete: e, autoFocus: t, defaultValue: n, description: r, di
|
|
|
2087
2325
|
})
|
|
2088
2326
|
})]
|
|
2089
2327
|
}),
|
|
2090
|
-
/* @__PURE__ */ m(
|
|
2328
|
+
/* @__PURE__ */ m(ot, {
|
|
2091
2329
|
description: x,
|
|
2092
2330
|
error: S,
|
|
2093
2331
|
loading: l
|
|
@@ -2097,18 +2335,18 @@ function pn({ autoComplete: e, autoFocus: t, defaultValue: n, description: r, di
|
|
|
2097
2335
|
}
|
|
2098
2336
|
//#endregion
|
|
2099
2337
|
//#region src/primitives/Toast/Toast.tsx
|
|
2100
|
-
var
|
|
2101
|
-
function
|
|
2338
|
+
var En = 2600, Dn = "BreezeProvider toastLimit must be a positive integer.", On = "Toast components must be rendered within BreezeProvider.";
|
|
2339
|
+
function kn(e) {
|
|
2102
2340
|
return e.isIntersecting && e.intersectionRatio >= 1;
|
|
2103
2341
|
}
|
|
2104
|
-
function
|
|
2342
|
+
function An(e, t, n, r) {
|
|
2105
2343
|
let i = Number(e.target.dataset.breezeToastId);
|
|
2106
|
-
t.has(i) && (
|
|
2344
|
+
t.has(i) && (kn(e) ? n(i) : r(i));
|
|
2107
2345
|
}
|
|
2108
|
-
var
|
|
2109
|
-
function
|
|
2110
|
-
|
|
2111
|
-
let t = a(
|
|
2346
|
+
var jn = n(null), Mn = n(!0), Nn = n(null);
|
|
2347
|
+
function Pn({ children: e }) {
|
|
2348
|
+
W();
|
|
2349
|
+
let t = a(Mn), n = a(Nn), [r, i] = d(() => n?.message ?? null);
|
|
2112
2350
|
return o(() => {
|
|
2113
2351
|
if (!t || typeof document < "u" && document.hidden || r === e) return;
|
|
2114
2352
|
let a = setTimeout(() => {
|
|
@@ -2126,15 +2364,15 @@ function Sn({ children: e }) {
|
|
|
2126
2364
|
"aria-live": "polite",
|
|
2127
2365
|
className: "breeze-toast",
|
|
2128
2366
|
role: "status",
|
|
2129
|
-
children: [/* @__PURE__ */ m(
|
|
2367
|
+
children: [/* @__PURE__ */ m(Y, {
|
|
2130
2368
|
name: "check",
|
|
2131
2369
|
size: "sm"
|
|
2132
2370
|
}), /* @__PURE__ */ m("span", { children: r })]
|
|
2133
2371
|
});
|
|
2134
2372
|
}
|
|
2135
|
-
function
|
|
2136
|
-
let n =
|
|
2137
|
-
if (!Number.isInteger(t) || t < 1) throw RangeError(
|
|
2373
|
+
function Fn({ children: e, limit: t }) {
|
|
2374
|
+
let n = xt(), r = ht(), 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());
|
|
2375
|
+
if (!Number.isInteger(t) || t < 1) throw RangeError(Dn);
|
|
2138
2376
|
let b = i((e, t) => {
|
|
2139
2377
|
let n = y.current.get(e);
|
|
2140
2378
|
n !== void 0 && (n.message = t);
|
|
@@ -2169,7 +2407,7 @@ function Cn({ children: e, limit: t }) {
|
|
|
2169
2407
|
if (!s || typeof document < "u" && document.hidden || t !== void 0 && t.handle !== null) return;
|
|
2170
2408
|
let n = t ?? {
|
|
2171
2409
|
handle: null,
|
|
2172
|
-
remaining:
|
|
2410
|
+
remaining: En,
|
|
2173
2411
|
startedAt: null
|
|
2174
2412
|
};
|
|
2175
2413
|
if (n.remaining <= 0) {
|
|
@@ -2203,7 +2441,7 @@ function Cn({ children: e, limit: t }) {
|
|
|
2203
2441
|
}
|
|
2204
2442
|
let o, c = setTimeout(() => {
|
|
2205
2443
|
o = new IntersectionObserver((e) => {
|
|
2206
|
-
e.forEach((e) =>
|
|
2444
|
+
e.forEach((e) => An(e, r, D, w));
|
|
2207
2445
|
}, { threshold: 1 }), Array.from(i.children).forEach((e) => {
|
|
2208
2446
|
e instanceof HTMLElement && e.dataset.breezeToastId !== void 0 && !e.hidden && o?.observe(e);
|
|
2209
2447
|
});
|
|
@@ -2221,11 +2459,11 @@ function Cn({ children: e, limit: t }) {
|
|
|
2221
2459
|
D
|
|
2222
2460
|
]), o(() => C, [C]);
|
|
2223
2461
|
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));
|
|
2224
|
-
return /* @__PURE__ */ m(
|
|
2462
|
+
return /* @__PURE__ */ m(Mn, {
|
|
2225
2463
|
value: s,
|
|
2226
|
-
children: /* @__PURE__ */ h(
|
|
2464
|
+
children: /* @__PURE__ */ h(jn, {
|
|
2227
2465
|
value: x,
|
|
2228
|
-
children: [e, n &&
|
|
2466
|
+
children: [e, n && Ie(/* @__PURE__ */ m("div", {
|
|
2229
2467
|
ref: a,
|
|
2230
2468
|
className: "breeze-toast-region",
|
|
2231
2469
|
"data-breeze-toast-region": "",
|
|
@@ -2238,11 +2476,11 @@ function Cn({ children: e, limit: t }) {
|
|
|
2238
2476
|
"aria-hidden": n ? "true" : void 0,
|
|
2239
2477
|
"data-breeze-toast-id": e,
|
|
2240
2478
|
hidden: n,
|
|
2241
|
-
children: /* @__PURE__ */ m(
|
|
2479
|
+
children: /* @__PURE__ */ m(Nn, {
|
|
2242
2480
|
value: y.current.get(e) ?? null,
|
|
2243
|
-
children: /* @__PURE__ */ m(
|
|
2481
|
+
children: /* @__PURE__ */ m(Mn, {
|
|
2244
2482
|
value: s && !n,
|
|
2245
|
-
children: /* @__PURE__ */ m(
|
|
2483
|
+
children: /* @__PURE__ */ m(Pn, { children: t })
|
|
2246
2484
|
})
|
|
2247
2485
|
})
|
|
2248
2486
|
}, e);
|
|
@@ -2251,14 +2489,133 @@ function Cn({ children: e, limit: t }) {
|
|
|
2251
2489
|
})
|
|
2252
2490
|
});
|
|
2253
2491
|
}
|
|
2254
|
-
function
|
|
2255
|
-
let e = a(
|
|
2256
|
-
if (e === null) throw Error(
|
|
2492
|
+
function In() {
|
|
2493
|
+
let e = a(jn);
|
|
2494
|
+
if (e === null) throw Error(On);
|
|
2257
2495
|
return e;
|
|
2258
2496
|
}
|
|
2259
2497
|
//#endregion
|
|
2498
|
+
//#region src/primitives/Toggle/Toggle.tsx
|
|
2499
|
+
var Ln = {
|
|
2500
|
+
base: { toggle: "breeze:inline-grid breeze:items-center breeze:justify-center breeze:rounded-breeze-ctl breeze:border breeze:border-solid breeze:border-breeze-line-strong breeze:bg-breeze-surface breeze:font-breeze-sans breeze:font-semibold breeze:text-breeze-ink breeze:cursor-pointer breeze:select-none breeze:outline-offset-2 breeze:data-[hovered]:bg-breeze-sunken breeze:data-[focus-visible]:outline-2 breeze:data-[focus-visible]:outline-solid breeze:data-[focus-visible]:outline-breeze-brand breeze:data-[disabled]:cursor-not-allowed breeze:data-[disabled]:opacity-60 breeze:any-pointer-coarse:min-block-breeze-tap breeze:any-pointer-coarse:min-inline-breeze-tap" },
|
|
2501
|
+
compound: {},
|
|
2502
|
+
size: {
|
|
2503
|
+
lg: "breeze:min-block-breeze-lg breeze:ps-breeze-5 breeze:pe-breeze-5 breeze:py-breeze-3 breeze:text-breeze-sm",
|
|
2504
|
+
md: "breeze:min-block-breeze-md breeze:ps-breeze-3 breeze:pe-breeze-3 breeze:py-breeze-2 breeze:text-breeze-sm",
|
|
2505
|
+
sm: "breeze:min-block-breeze-sm breeze:ps-breeze-3 breeze:pe-breeze-3 breeze:py-breeze-1 breeze:text-breeze-xs"
|
|
2506
|
+
},
|
|
2507
|
+
state: { pressed: "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" },
|
|
2508
|
+
variant: {}
|
|
2509
|
+
};
|
|
2510
|
+
function Rn({ "aria-describedby": e, "aria-label": t, "aria-labelledby": n, children: r, defaultPressed: i, disabled: a = !1, id: o, loading: s = !1, onChange: c, pressed: l, ref: u, size: d = "md" }) {
|
|
2511
|
+
return /* @__PURE__ */ m(ut, {
|
|
2512
|
+
"aria-describedby": e,
|
|
2513
|
+
"aria-label": t,
|
|
2514
|
+
"aria-labelledby": n,
|
|
2515
|
+
className: [
|
|
2516
|
+
Ln.base.toggle,
|
|
2517
|
+
Ln.size[d],
|
|
2518
|
+
Ln.state.pressed
|
|
2519
|
+
].join(" "),
|
|
2520
|
+
defaultPressed: i,
|
|
2521
|
+
disabled: a,
|
|
2522
|
+
id: o,
|
|
2523
|
+
loading: s,
|
|
2524
|
+
onChange: c,
|
|
2525
|
+
pressed: l,
|
|
2526
|
+
ref: u,
|
|
2527
|
+
children: r
|
|
2528
|
+
});
|
|
2529
|
+
}
|
|
2530
|
+
//#endregion
|
|
2531
|
+
//#region src/primitives/ToggleGroup/ToggleGroup.tsx
|
|
2532
|
+
var zn = {
|
|
2533
|
+
base: {
|
|
2534
|
+
description: "breeze:text-breeze-2xs breeze:font-normal breeze:leading-breeze-snug breeze:text-breeze-ink-3",
|
|
2535
|
+
group: "breeze:inline-flex breeze:items-center breeze:gap-breeze-1 breeze:rounded-breeze-ctl breeze:bg-breeze-sunken breeze:p-breeze-1 breeze:font-breeze-sans",
|
|
2536
|
+
item: "breeze:inline-grid breeze:items-center breeze:justify-center breeze:gap-breeze-2 breeze:rounded-breeze-sm breeze:border breeze:border-solid breeze:border-transparent breeze:font-semibold breeze:text-breeze-ink-2 breeze:cursor-pointer breeze:select-none breeze:outline-offset-[-2px] breeze:data-[hovered]:bg-breeze-raised breeze:data-[focus-visible]:outline-2 breeze:data-[focus-visible]:outline-solid breeze:data-[focus-visible]:outline-breeze-brand breeze:data-[disabled]:cursor-not-allowed breeze:data-[disabled]:opacity-60 breeze:any-pointer-coarse:min-block-breeze-tap breeze:any-pointer-coarse:min-inline-breeze-tap",
|
|
2537
|
+
label: "breeze:font-medium",
|
|
2538
|
+
optionContent: "breeze:flex breeze:min-inline-size-0 breeze:flex-col",
|
|
2539
|
+
optionDetails: "breeze:inline-flex breeze:items-center breeze:gap-breeze-2"
|
|
2540
|
+
},
|
|
2541
|
+
compound: {},
|
|
2542
|
+
size: {
|
|
2543
|
+
lg: "breeze:min-block-breeze-lg breeze:ps-breeze-4 breeze:pe-breeze-4 breeze:py-breeze-2 breeze:text-breeze-sm",
|
|
2544
|
+
md: "breeze:min-block-breeze-md breeze:ps-breeze-3 breeze:pe-breeze-3 breeze:py-breeze-2 breeze:text-breeze-sm",
|
|
2545
|
+
sm: "breeze:min-block-breeze-sm breeze:ps-breeze-2 breeze:pe-breeze-2 breeze:py-breeze-1 breeze:text-breeze-xs"
|
|
2546
|
+
},
|
|
2547
|
+
state: { selected: "breeze:data-[selected]:border-breeze-line-strong breeze:data-[selected]:bg-breeze-surface breeze:data-[selected]:text-breeze-ink breeze:forced-colors:data-[selected]:outline-2 breeze:forced-colors:data-[selected]:outline-offset-2" },
|
|
2548
|
+
variant: {}
|
|
2549
|
+
};
|
|
2550
|
+
function Bn({ "aria-describedby": e, "aria-label": t, defaultSelected: n, disabled: r = !1, getItem: i, id: a, items: o, loading: s = !1, onChange: c, selected: l, size: u = "md" }) {
|
|
2551
|
+
let { getMessageLocale: f, messages: g } = W(), [_, v] = d(() => n == null ? null : i(n).id), y = o.map((e) => ({
|
|
2552
|
+
descriptor: i(e),
|
|
2553
|
+
item: e
|
|
2554
|
+
})), b = _;
|
|
2555
|
+
return l !== void 0 && (b = l === null ? null : i(l).id), /* @__PURE__ */ h(p, { children: [
|
|
2556
|
+
/* @__PURE__ */ h("fieldset", {
|
|
2557
|
+
"aria-describedby": e,
|
|
2558
|
+
"aria-busy": s || void 0,
|
|
2559
|
+
className: `${zn.base.group} breeze:border-0 breeze:m-0 breeze:min-inline-size-0`,
|
|
2560
|
+
disabled: r,
|
|
2561
|
+
id: a,
|
|
2562
|
+
children: [/* @__PURE__ */ m("legend", {
|
|
2563
|
+
className: "breeze:sr-only",
|
|
2564
|
+
children: t
|
|
2565
|
+
}), y.map(({ descriptor: e, item: t }) => /* @__PURE__ */ m(ut, {
|
|
2566
|
+
announceLoading: !1,
|
|
2567
|
+
className: [
|
|
2568
|
+
zn.base.item,
|
|
2569
|
+
zn.size[u],
|
|
2570
|
+
zn.state.selected
|
|
2571
|
+
].join(" "),
|
|
2572
|
+
disabled: r || e.disabled === !0,
|
|
2573
|
+
loading: s,
|
|
2574
|
+
onChange: (n) => {
|
|
2575
|
+
l === void 0 && v(n ? e.id : null), c?.(n ? t : null);
|
|
2576
|
+
},
|
|
2577
|
+
pressed: b === e.id,
|
|
2578
|
+
children: /* @__PURE__ */ h("span", {
|
|
2579
|
+
className: zn.base.optionDetails,
|
|
2580
|
+
children: [
|
|
2581
|
+
e.icon && /* @__PURE__ */ m(Y, {
|
|
2582
|
+
name: e.icon,
|
|
2583
|
+
size: "sm"
|
|
2584
|
+
}),
|
|
2585
|
+
/* @__PURE__ */ h("span", {
|
|
2586
|
+
className: zn.base.optionContent,
|
|
2587
|
+
children: [/* @__PURE__ */ m("span", {
|
|
2588
|
+
className: zn.base.label,
|
|
2589
|
+
children: e.label
|
|
2590
|
+
}), e.description && /* @__PURE__ */ m("span", {
|
|
2591
|
+
className: zn.base.description,
|
|
2592
|
+
children: e.description
|
|
2593
|
+
})]
|
|
2594
|
+
}),
|
|
2595
|
+
e.badge && /* @__PURE__ */ m(Ke, {
|
|
2596
|
+
"aria-label": e.badge["aria-label"],
|
|
2597
|
+
variant: e.badge.variant,
|
|
2598
|
+
children: e.badge.children
|
|
2599
|
+
})
|
|
2600
|
+
]
|
|
2601
|
+
})
|
|
2602
|
+
}, e.id))]
|
|
2603
|
+
}),
|
|
2604
|
+
s && /* @__PURE__ */ m("span", {
|
|
2605
|
+
className: "breeze:sr-only",
|
|
2606
|
+
children: /* @__PURE__ */ m(G, { label: g.loading })
|
|
2607
|
+
}),
|
|
2608
|
+
/* @__PURE__ */ m("output", {
|
|
2609
|
+
"aria-live": "polite",
|
|
2610
|
+
className: "breeze:sr-only",
|
|
2611
|
+
lang: f("loading"),
|
|
2612
|
+
children: s ? g.loading : ""
|
|
2613
|
+
})
|
|
2614
|
+
] });
|
|
2615
|
+
}
|
|
2616
|
+
//#endregion
|
|
2260
2617
|
//#region src/provider/en-GB.ts
|
|
2261
|
-
var
|
|
2618
|
+
var Vn = {
|
|
2262
2619
|
appearance: "Appearance",
|
|
2263
2620
|
appearanceAutomatic: "Auto",
|
|
2264
2621
|
appearanceDark: "Dark",
|
|
@@ -2270,11 +2627,11 @@ var Tn = {
|
|
|
2270
2627
|
};
|
|
2271
2628
|
//#endregion
|
|
2272
2629
|
//#region src/provider/BreezeProvider.tsx
|
|
2273
|
-
function
|
|
2630
|
+
function Hn(e, t) {
|
|
2274
2631
|
return e === "automatic" ? t ? "dark" : "light" : e;
|
|
2275
2632
|
}
|
|
2276
|
-
function
|
|
2277
|
-
let { direction: t, locale: n } =
|
|
2633
|
+
function Un({ children: e }) {
|
|
2634
|
+
let { direction: t, locale: n } = we();
|
|
2278
2635
|
return /* @__PURE__ */ m("div", {
|
|
2279
2636
|
"data-breeze-root": "",
|
|
2280
2637
|
dir: t,
|
|
@@ -2282,8 +2639,8 @@ function Dn({ children: e }) {
|
|
|
2282
2639
|
children: e
|
|
2283
2640
|
});
|
|
2284
2641
|
}
|
|
2285
|
-
function
|
|
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 =
|
|
2642
|
+
function Wn({ appearance: e, children: t, defaultAppearance: n = "automatic", locale: r, messages: a, onAppearanceChange: s, portalContainer: u, toastLimit: f = 3 }) {
|
|
2643
|
+
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 = Hn(y, h);
|
|
2287
2644
|
o(() => {
|
|
2288
2645
|
if (!p) return;
|
|
2289
2646
|
g(p.matches);
|
|
@@ -2300,22 +2657,22 @@ function On({ appearance: e, children: t, defaultAppearance: n = "automatic", lo
|
|
|
2300
2657
|
let x = i((t) => {
|
|
2301
2658
|
e === void 0 && v(t), s?.(t);
|
|
2302
2659
|
}, [e, s]), S = i((e) => a?.[e] === void 0 ? "en-GB" : r, [r, a]);
|
|
2303
|
-
return /* @__PURE__ */ m(
|
|
2660
|
+
return /* @__PURE__ */ m(Ce, {
|
|
2304
2661
|
locale: r,
|
|
2305
|
-
children: /* @__PURE__ */ m(
|
|
2662
|
+
children: /* @__PURE__ */ m(Le, {
|
|
2306
2663
|
value: l(() => ({
|
|
2307
2664
|
appearance: y,
|
|
2308
2665
|
getMessageLocale: S,
|
|
2309
2666
|
locale: r,
|
|
2310
2667
|
messages: {
|
|
2311
|
-
appearance: a?.appearance ??
|
|
2312
|
-
appearanceAutomatic: a?.appearanceAutomatic ??
|
|
2313
|
-
appearanceDark: a?.appearanceDark ??
|
|
2314
|
-
appearanceLight: a?.appearanceLight ??
|
|
2315
|
-
close: a?.close ??
|
|
2316
|
-
loading: a?.loading ??
|
|
2317
|
-
required: a?.required ??
|
|
2318
|
-
selectDate: a?.selectDate ??
|
|
2668
|
+
appearance: a?.appearance ?? Vn.appearance,
|
|
2669
|
+
appearanceAutomatic: a?.appearanceAutomatic ?? Vn.appearanceAutomatic,
|
|
2670
|
+
appearanceDark: a?.appearanceDark ?? Vn.appearanceDark,
|
|
2671
|
+
appearanceLight: a?.appearanceLight ?? Vn.appearanceLight,
|
|
2672
|
+
close: a?.close ?? Vn.close,
|
|
2673
|
+
loading: a?.loading ?? Vn.loading,
|
|
2674
|
+
required: a?.required ?? Vn.required,
|
|
2675
|
+
selectDate: a?.selectDate ?? Vn.selectDate
|
|
2319
2676
|
},
|
|
2320
2677
|
resolvedAppearance: b,
|
|
2321
2678
|
setAppearance: x
|
|
@@ -2327,18 +2684,18 @@ function On({ appearance: e, children: t, defaultAppearance: n = "automatic", lo
|
|
|
2327
2684
|
b,
|
|
2328
2685
|
x
|
|
2329
2686
|
]),
|
|
2330
|
-
children: /* @__PURE__ */ m(
|
|
2687
|
+
children: /* @__PURE__ */ m(bt, {
|
|
2331
2688
|
locale: r,
|
|
2332
2689
|
portalContainer: u,
|
|
2333
|
-
children: /* @__PURE__ */ m(
|
|
2690
|
+
children: /* @__PURE__ */ m(Fn, {
|
|
2334
2691
|
limit: f,
|
|
2335
|
-
children: /* @__PURE__ */ m(
|
|
2692
|
+
children: /* @__PURE__ */ m(Un, { children: t })
|
|
2336
2693
|
})
|
|
2337
2694
|
})
|
|
2338
2695
|
})
|
|
2339
2696
|
});
|
|
2340
2697
|
}
|
|
2341
2698
|
//#endregion
|
|
2342
|
-
export {
|
|
2699
|
+
export { Ve as AppearanceControl, Ke as Badge, Wn as BreezeProvider, Je as Button, tt as Calendar, it as Card, ct as Checkbox, ft as Chip, Ft as ComboBox, Lt as Container, Yt as DatePicker, tn as Dialog, nn as Drawer, an as Grid, Y as Icon, sn as IconTile, ln as Inline, pn as Menu, mn as NumberField, hn as Popover, bn as Select, Sn as Separator, G as Skeleton, wn as Stack, Tn as TextField, Pn as Toast, Rn as Toggle, Bn as ToggleGroup, Ut as Typography, We as VisuallyHidden, In as useToast };
|
|
2343
2700
|
|
|
2344
2701
|
//# sourceMappingURL=index.js.map
|