@motech-development/breeze-ui 4.3.0 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +8 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +768 -318
- package/lib/index.js.map +1 -1
- package/lib/overlays/OverlayStack.d.ts +2 -0
- package/lib/overlays/OverlayStack.d.ts.map +1 -1
- package/lib/primitives/Checkbox/Checkbox.d.ts +54 -0
- package/lib/primitives/Checkbox/Checkbox.d.ts.map +1 -0
- package/lib/primitives/Field/field.presentation.d.ts +13 -0
- package/lib/primitives/Field/field.presentation.d.ts.map +1 -0
- package/lib/primitives/Field/field.styles.d.ts +20 -0
- package/lib/primitives/Field/field.styles.d.ts.map +1 -0
- package/lib/primitives/NumberField/NumberField.d.ts +66 -0
- package/lib/primitives/NumberField/NumberField.d.ts.map +1 -0
- package/lib/primitives/TextField/TextField.d.ts +61 -0
- package/lib/primitives/TextField/TextField.d.ts.map +1 -0
- package/lib/primitives/Toast/Toast.d.ts +22 -0
- package/lib/primitives/Toast/Toast.d.ts.map +1 -0
- package/lib/provider/BreezeProvider.d.ts +3 -1
- package/lib/provider/BreezeProvider.d.ts.map +1 -1
- package/lib/styles.css +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -5,23 +5,33 @@ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
|
5
5
|
import { Button as g } from "react-aria-components/Button";
|
|
6
6
|
import { ProgressBarContext as _ } from "react-aria-components/ProgressBar";
|
|
7
7
|
import { useSlottedContext as v } from "react-aria-components/slots";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
8
|
+
import { useObjectRef as y } from "react-aria/useObjectRef";
|
|
9
|
+
import { CheckboxButton as b, CheckboxField as x } from "react-aria-components/Checkbox";
|
|
10
|
+
import { FieldError as S } from "react-aria-components/FieldError";
|
|
11
|
+
import { Label as C } from "react-aria-components/Label";
|
|
12
|
+
import { Text as w } from "react-aria-components/Text";
|
|
13
|
+
import { Dialog as T } from "react-aria-components/Dialog";
|
|
14
|
+
import { Modal as E, ModalOverlay as D } from "react-aria-components/Modal";
|
|
15
|
+
import { Popover as ee } from "react-aria-components/Popover";
|
|
16
|
+
import { UNSAFE_PortalProvider as te } from "react-aria/PortalProvider";
|
|
17
|
+
import { I18nProvider as ne, useLocale as re } from "react-aria-components/I18nProvider";
|
|
18
|
+
import { ArrowDownLeft as O, ArrowUpRight as k, Bell as A, Building2 as j, CalendarDays as ie, Camera as ae, Check as oe, ChevronDown as se, ChevronLeft as ce, ChevronRight as M, Clock3 as N, Download as P, Ellipsis as F, FileText as le, House as ue, List as I, LockKeyhole as L, LogOut as de, Plus as fe, Settings as R, Trash2 as z, TriangleAlert as B, Upload as pe, Users as me, X as he } from "lucide-react";
|
|
19
|
+
import { Group as ge } from "react-aria-components/Group";
|
|
20
|
+
import { Input as _e } from "react-aria-components/Input";
|
|
21
|
+
import { NumberField as ve } from "react-aria-components/NumberField";
|
|
22
|
+
import { TextField as ye } from "react-aria-components/TextField";
|
|
23
|
+
import { createPortal as be } from "react-dom";
|
|
24
|
+
import { parseDate as xe } from "@internationalized/date";
|
|
15
25
|
//#region src/provider/BreezeContext.ts
|
|
16
|
-
var
|
|
17
|
-
function
|
|
18
|
-
let e = a(
|
|
26
|
+
var Se = n(null);
|
|
27
|
+
function V() {
|
|
28
|
+
let e = a(Se);
|
|
19
29
|
if (e === null) throw Error("Breeze components must be rendered within BreezeProvider.");
|
|
20
30
|
return e;
|
|
21
31
|
}
|
|
22
32
|
//#endregion
|
|
23
33
|
//#region src/patterns/AppearanceControl/AppearanceControl.tsx
|
|
24
|
-
var
|
|
34
|
+
var H = {
|
|
25
35
|
base: {
|
|
26
36
|
control: "breeze:flex breeze:items-center breeze:gap-breeze-2 breeze:font-breeze-sans",
|
|
27
37
|
group: "breeze:flex breeze:items-center breeze:gap-breeze-2",
|
|
@@ -32,7 +42,7 @@ var U = {
|
|
|
32
42
|
size: {},
|
|
33
43
|
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" },
|
|
34
44
|
variant: {}
|
|
35
|
-
},
|
|
45
|
+
}, Ce = [
|
|
36
46
|
{
|
|
37
47
|
message: "appearanceLight",
|
|
38
48
|
value: "light"
|
|
@@ -46,30 +56,30 @@ var U = {
|
|
|
46
56
|
value: "dark"
|
|
47
57
|
}
|
|
48
58
|
];
|
|
49
|
-
function
|
|
50
|
-
return
|
|
59
|
+
function we(e) {
|
|
60
|
+
return Ce.some((t) => t.value === e);
|
|
51
61
|
}
|
|
52
|
-
function
|
|
53
|
-
let { appearance: n, getMessageLocale: r, messages: i, setAppearance: a } =
|
|
62
|
+
function Te() {
|
|
63
|
+
let { appearance: n, getMessageLocale: r, messages: i, setAppearance: a } = V();
|
|
54
64
|
return /* @__PURE__ */ h("div", {
|
|
55
|
-
className:
|
|
65
|
+
className: H.base.control,
|
|
56
66
|
children: [/* @__PURE__ */ m("span", {
|
|
57
|
-
className:
|
|
67
|
+
className: H.base.label,
|
|
58
68
|
lang: r("appearance"),
|
|
59
69
|
children: i.appearance
|
|
60
70
|
}), /* @__PURE__ */ m(t, {
|
|
61
71
|
"aria-label": i.appearance,
|
|
62
|
-
className:
|
|
72
|
+
className: H.base.group,
|
|
63
73
|
disallowEmptySelection: !0,
|
|
64
74
|
lang: r("appearance"),
|
|
65
75
|
onSelectionChange: (e) => {
|
|
66
76
|
let [t] = e;
|
|
67
|
-
|
|
77
|
+
we(t) && a(t);
|
|
68
78
|
},
|
|
69
79
|
selectedKeys: [n],
|
|
70
80
|
selectionMode: "single",
|
|
71
|
-
children:
|
|
72
|
-
className: [
|
|
81
|
+
children: Ce.map((t) => /* @__PURE__ */ m(e, {
|
|
82
|
+
className: [H.base.option, H.state.selected].join(" "),
|
|
73
83
|
id: t.value,
|
|
74
84
|
lang: r(t.message),
|
|
75
85
|
children: i[t.message]
|
|
@@ -79,7 +89,7 @@ function fe() {
|
|
|
79
89
|
}
|
|
80
90
|
//#endregion
|
|
81
91
|
//#region src/primitives/Skeleton/Skeleton.tsx
|
|
82
|
-
var
|
|
92
|
+
var Ee = {
|
|
83
93
|
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]" },
|
|
84
94
|
compound: {},
|
|
85
95
|
size: {},
|
|
@@ -90,37 +100,37 @@ var pe = {
|
|
|
90
100
|
text: "breeze:block-size-breeze-3 breeze:inline-size-full breeze:rounded-breeze-xs"
|
|
91
101
|
}
|
|
92
102
|
};
|
|
93
|
-
function
|
|
94
|
-
let { getMessageLocale: i, messages: a } =
|
|
103
|
+
function U({ blockSize: e, inlineSize: t, label: n, shape: r = "text" }) {
|
|
104
|
+
let { getMessageLocale: i, messages: a } = V(), o = n?.trim() || void 0, s = e ?? t ?? "0.75rem", c = {
|
|
95
105
|
blockSize: r === "circle" ? s : e,
|
|
96
106
|
inlineSize: r === "circle" ? s : t
|
|
97
107
|
};
|
|
98
108
|
return /* @__PURE__ */ m("progress", {
|
|
99
109
|
"aria-hidden": o === void 0 || void 0,
|
|
100
110
|
"aria-label": o,
|
|
101
|
-
className: [
|
|
111
|
+
className: [Ee.base.skeleton, Ee.variant[r]].join(" "),
|
|
102
112
|
lang: o === a.loading.trim() ? i("loading") : void 0,
|
|
103
113
|
style: c
|
|
104
114
|
});
|
|
105
115
|
}
|
|
106
116
|
//#endregion
|
|
107
117
|
//#region src/primitives/VisuallyHidden/VisuallyHidden.tsx
|
|
108
|
-
var
|
|
118
|
+
var De = {
|
|
109
119
|
base: { hidden: "breeze:sr-only" },
|
|
110
120
|
compound: {},
|
|
111
121
|
size: {},
|
|
112
122
|
state: {},
|
|
113
123
|
variant: {}
|
|
114
124
|
};
|
|
115
|
-
function
|
|
125
|
+
function Oe({ children: e }) {
|
|
116
126
|
return /* @__PURE__ */ m("span", {
|
|
117
|
-
className:
|
|
127
|
+
className: De.base.hidden,
|
|
118
128
|
children: e
|
|
119
129
|
});
|
|
120
130
|
}
|
|
121
131
|
//#endregion
|
|
122
132
|
//#region src/primitives/Badge/Badge.tsx
|
|
123
|
-
var
|
|
133
|
+
var W = {
|
|
124
134
|
base: {
|
|
125
135
|
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",
|
|
126
136
|
content: "breeze:[grid-area:1/1]",
|
|
@@ -137,29 +147,29 @@ var K = {
|
|
|
137
147
|
warning: "breeze:bg-breeze-warn-soft breeze:text-breeze-warn"
|
|
138
148
|
}
|
|
139
149
|
};
|
|
140
|
-
function
|
|
141
|
-
let { messages: i } =
|
|
150
|
+
function ke({ "aria-label": e, children: t, loading: n = !1, variant: r = "neutral" }) {
|
|
151
|
+
let { messages: i } = V(), a = e?.trim() || void 0, o;
|
|
142
152
|
return n ? o = /* @__PURE__ */ m("span", {
|
|
143
|
-
className:
|
|
144
|
-
children: /* @__PURE__ */ m(
|
|
153
|
+
className: W.base.skeleton,
|
|
154
|
+
children: /* @__PURE__ */ m(U, {
|
|
145
155
|
blockSize: 8,
|
|
146
156
|
inlineSize: "100%",
|
|
147
157
|
label: i.loading,
|
|
148
158
|
shape: "rectangle"
|
|
149
159
|
})
|
|
150
|
-
}) : a !== void 0 && (o = /* @__PURE__ */ m(
|
|
160
|
+
}) : a !== void 0 && (o = /* @__PURE__ */ m(Oe, { children: a })), /* @__PURE__ */ h("span", {
|
|
151
161
|
"aria-busy": n || void 0,
|
|
152
|
-
className: [
|
|
162
|
+
className: [W.base.badge, W.variant[r]].join(" "),
|
|
153
163
|
children: [/* @__PURE__ */ m("span", {
|
|
154
164
|
"aria-hidden": n || a !== void 0 ? !0 : void 0,
|
|
155
|
-
className: [
|
|
165
|
+
className: [W.base.content, n && W.state.contentLoading].filter(Boolean).join(" "),
|
|
156
166
|
children: t
|
|
157
167
|
}), o]
|
|
158
168
|
});
|
|
159
169
|
}
|
|
160
170
|
//#endregion
|
|
161
171
|
//#region src/primitives/Button/Button.tsx
|
|
162
|
-
var
|
|
172
|
+
var G = {
|
|
163
173
|
base: {
|
|
164
174
|
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",
|
|
165
175
|
label: "breeze:[grid-area:1/1]",
|
|
@@ -189,23 +199,23 @@ var q = {
|
|
|
189
199
|
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"
|
|
190
200
|
}
|
|
191
201
|
};
|
|
192
|
-
function
|
|
193
|
-
let e = v(_), { getMessageLocale: t, messages: n } =
|
|
202
|
+
function Ae() {
|
|
203
|
+
let e = v(_), { getMessageLocale: t, messages: n } = V();
|
|
194
204
|
return /* @__PURE__ */ m("progress", {
|
|
195
205
|
"aria-label": n.loading,
|
|
196
|
-
className:
|
|
206
|
+
className: G.state.loadingStatus,
|
|
197
207
|
id: e?.id,
|
|
198
208
|
lang: t("loading")
|
|
199
209
|
});
|
|
200
210
|
}
|
|
201
|
-
function
|
|
202
|
-
|
|
211
|
+
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" }) {
|
|
212
|
+
V();
|
|
203
213
|
let C = [
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
c &&
|
|
208
|
-
d &&
|
|
214
|
+
G.base.button,
|
|
215
|
+
G.variant[S],
|
|
216
|
+
G.size[y],
|
|
217
|
+
c && G.state.disabled,
|
|
218
|
+
d && G.state.loading
|
|
209
219
|
].filter(Boolean).join(" ");
|
|
210
220
|
return /* @__PURE__ */ h(g, {
|
|
211
221
|
"aria-controls": e,
|
|
@@ -231,18 +241,18 @@ function ve({ "aria-controls": e, "aria-describedby": t, "aria-expanded": n, "ar
|
|
|
231
241
|
type: b,
|
|
232
242
|
value: x,
|
|
233
243
|
children: [/* @__PURE__ */ m("span", {
|
|
234
|
-
className: [
|
|
244
|
+
className: [G.base.label, d && G.state.loadingLabel].filter(Boolean).join(" "),
|
|
235
245
|
children: s
|
|
236
|
-
}), d && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(
|
|
246
|
+
}), d && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(Ae, {}), /* @__PURE__ */ m("span", {
|
|
237
247
|
"aria-hidden": "true",
|
|
238
|
-
className: [
|
|
248
|
+
className: [G.base.skeleton, G.compound.loading[S]].join(" "),
|
|
239
249
|
"data-breeze-skeleton": ""
|
|
240
250
|
})] })]
|
|
241
251
|
});
|
|
242
252
|
}
|
|
243
253
|
//#endregion
|
|
244
254
|
//#region src/primitives/layout.accessibility.ts
|
|
245
|
-
function
|
|
255
|
+
function K(e, t) {
|
|
246
256
|
let n = e?.trim() || void 0;
|
|
247
257
|
return {
|
|
248
258
|
accessibleLabel: n,
|
|
@@ -251,7 +261,7 @@ function J(e, t) {
|
|
|
251
261
|
}
|
|
252
262
|
//#endregion
|
|
253
263
|
//#region src/primitives/Card/Card.tsx
|
|
254
|
-
var
|
|
264
|
+
var Me = {
|
|
255
265
|
base: { card: "breeze:min-inline-size-0 breeze:rounded-breeze-panel breeze:border breeze:border-solid breeze:border-breeze-line breeze:shadow-breeze-panel" },
|
|
256
266
|
compound: {},
|
|
257
267
|
size: {
|
|
@@ -271,22 +281,144 @@ var ye = {
|
|
|
271
281
|
surface: "breeze:bg-breeze-surface"
|
|
272
282
|
}
|
|
273
283
|
};
|
|
274
|
-
function
|
|
275
|
-
let { accessibleLabel: s, role: c } =
|
|
284
|
+
function Ne({ "aria-label": e, children: t, clipped: n = !0, element: i = "div", padding: a = 4, variant: o = "surface" }) {
|
|
285
|
+
let { accessibleLabel: s, role: c } = K(e, i);
|
|
276
286
|
return r(i, {
|
|
277
287
|
"aria-label": s,
|
|
278
288
|
className: [
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
n &&
|
|
289
|
+
Me.base.card,
|
|
290
|
+
Me.variant[o],
|
|
291
|
+
Me.size[a],
|
|
292
|
+
n && Me.state.clipped
|
|
283
293
|
].filter(Boolean).join(" "),
|
|
284
294
|
role: c
|
|
285
295
|
}, t);
|
|
286
296
|
}
|
|
287
297
|
//#endregion
|
|
298
|
+
//#region src/primitives/Field/field.styles.ts
|
|
299
|
+
var q = {
|
|
300
|
+
base: {
|
|
301
|
+
control: "breeze:relative breeze:inline-grid breeze:min-inline-size-0 breeze:inline-size-full",
|
|
302
|
+
description: "breeze:m-0 breeze:text-breeze-xs breeze:font-normal breeze:leading-breeze-snug breeze:text-breeze-ink-3",
|
|
303
|
+
error: "breeze:m-0 breeze:text-breeze-xs breeze:font-medium breeze:leading-breeze-snug breeze:text-breeze-danger",
|
|
304
|
+
input: "breeze:min-block-breeze-md breeze:any-pointer-coarse:min-block-breeze-tap breeze:min-inline-size-0 breeze:inline-size-full breeze:rounded-breeze-ctl breeze:border breeze:border-solid breeze:border-breeze-line-strong breeze:bg-breeze-surface breeze:ps-breeze-3 breeze:pe-breeze-3 breeze:py-breeze-2 breeze:font-breeze-sans breeze:text-breeze-sm breeze:leading-breeze-snug breeze:text-breeze-ink breeze:outline-offset-2 breeze:placeholder:text-breeze-ink-3 breeze:data-[hovered]:border-breeze-brand breeze:data-[focus-visible]:outline-2 breeze:data-[focus-visible]:outline-solid breeze:data-[focus-visible]:outline-breeze-brand breeze:data-[invalid]:border-breeze-danger breeze:disabled:cursor-not-allowed breeze:disabled:bg-breeze-sunken breeze:disabled:opacity-60 breeze:read-only:cursor-default breeze:read-only:bg-breeze-sunken",
|
|
305
|
+
label: "breeze:m-0 breeze:text-breeze-xs breeze:font-medium breeze:leading-breeze-snug breeze:text-breeze-ink",
|
|
306
|
+
root: "breeze:flex breeze:min-inline-size-0 breeze:flex-col breeze:gap-breeze-2",
|
|
307
|
+
skeleton: "breeze:pointer-events-none breeze:absolute breeze:[inset-block:0] breeze:[inset-inline:0]"
|
|
308
|
+
},
|
|
309
|
+
compound: {},
|
|
310
|
+
size: {},
|
|
311
|
+
state: { loadingInput: "breeze:!opacity-0" },
|
|
312
|
+
variant: {}
|
|
313
|
+
};
|
|
314
|
+
function J(...e) {
|
|
315
|
+
return e.filter(Boolean).join(" ");
|
|
316
|
+
}
|
|
317
|
+
//#endregion
|
|
318
|
+
//#region src/primitives/Field/field.presentation.tsx
|
|
319
|
+
function Pe({ label: e, loading: t }) {
|
|
320
|
+
return /* @__PURE__ */ m(C, {
|
|
321
|
+
className: q.base.label,
|
|
322
|
+
children: t ? /* @__PURE__ */ m(U, {
|
|
323
|
+
blockSize: "1lh",
|
|
324
|
+
inlineSize: "12em",
|
|
325
|
+
shape: "rectangle"
|
|
326
|
+
}) : e
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
function Fe({ description: e, error: t, loading: n }) {
|
|
330
|
+
return /* @__PURE__ */ h(p, { children: [e && /* @__PURE__ */ m(w, {
|
|
331
|
+
className: q.base.description,
|
|
332
|
+
slot: "description",
|
|
333
|
+
children: n ? /* @__PURE__ */ m(U, {
|
|
334
|
+
blockSize: "1lh",
|
|
335
|
+
inlineSize: "12em",
|
|
336
|
+
shape: "rectangle"
|
|
337
|
+
}) : e
|
|
338
|
+
}), t && (n ? /* @__PURE__ */ m("span", {
|
|
339
|
+
"aria-hidden": "true",
|
|
340
|
+
className: q.base.error,
|
|
341
|
+
children: /* @__PURE__ */ m(U, {
|
|
342
|
+
blockSize: "1lh",
|
|
343
|
+
inlineSize: "12em",
|
|
344
|
+
shape: "rectangle"
|
|
345
|
+
})
|
|
346
|
+
}) : /* @__PURE__ */ m(S, {
|
|
347
|
+
className: q.base.error,
|
|
348
|
+
children: t
|
|
349
|
+
}))] });
|
|
350
|
+
}
|
|
351
|
+
//#endregion
|
|
352
|
+
//#region src/primitives/Checkbox/Checkbox.tsx
|
|
353
|
+
var Y = {
|
|
354
|
+
base: {
|
|
355
|
+
control: "breeze:relative breeze:inline-grid breeze:min-block-breeze-tap breeze:grid-flow-col breeze:items-center breeze:gap-breeze-2 breeze:cursor-pointer breeze:select-none breeze:font-breeze-sans breeze:text-breeze-sm breeze:font-medium breeze:leading-breeze-snug breeze:text-breeze-ink breeze:data-[disabled]:cursor-not-allowed breeze:data-[disabled]:opacity-60",
|
|
356
|
+
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",
|
|
357
|
+
label: "breeze:[grid-area:1/2]",
|
|
358
|
+
skeleton: "breeze:pointer-events-none breeze:[grid-area:1/2]",
|
|
359
|
+
skeletonIndicator: "breeze:pointer-events-none breeze:[grid-area:1/1] breeze:block-size-breeze-5 breeze:inline-size-breeze-5"
|
|
360
|
+
},
|
|
361
|
+
compound: {},
|
|
362
|
+
size: {},
|
|
363
|
+
state: {},
|
|
364
|
+
variant: {}
|
|
365
|
+
};
|
|
366
|
+
function Ie({ 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: _ }) {
|
|
367
|
+
let { messages: v } = V(), S = y(d), C = t?.trim() || void 0, w = r?.trim() || void 0, T = n || s;
|
|
368
|
+
return /* @__PURE__ */ h(x, {
|
|
369
|
+
className: q.base.root,
|
|
370
|
+
defaultSelected: e,
|
|
371
|
+
form: i,
|
|
372
|
+
id: a,
|
|
373
|
+
inputRef: S,
|
|
374
|
+
"aria-label": s ? o : void 0,
|
|
375
|
+
isDisabled: T,
|
|
376
|
+
isInvalid: !s && w !== void 0,
|
|
377
|
+
isReadOnly: u,
|
|
378
|
+
isRequired: f,
|
|
379
|
+
isSelected: g,
|
|
380
|
+
name: c,
|
|
381
|
+
onChange: l,
|
|
382
|
+
value: _,
|
|
383
|
+
validationBehavior: "aria",
|
|
384
|
+
children: [/* @__PURE__ */ m(b, {
|
|
385
|
+
className: Y.base.control,
|
|
386
|
+
children: ({ isFocusVisible: e, isSelected: t }) => /* @__PURE__ */ h(p, { children: [s && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("span", {
|
|
387
|
+
"aria-hidden": "true",
|
|
388
|
+
className: Y.base.skeletonIndicator,
|
|
389
|
+
children: /* @__PURE__ */ m(U, {
|
|
390
|
+
blockSize: "100%",
|
|
391
|
+
inlineSize: "100%",
|
|
392
|
+
shape: "rectangle"
|
|
393
|
+
})
|
|
394
|
+
}), /* @__PURE__ */ m("span", {
|
|
395
|
+
className: Y.base.skeleton,
|
|
396
|
+
children: /* @__PURE__ */ m(U, {
|
|
397
|
+
blockSize: "1lh",
|
|
398
|
+
inlineSize: "12em",
|
|
399
|
+
label: v.loading,
|
|
400
|
+
shape: "rectangle"
|
|
401
|
+
})
|
|
402
|
+
})] }), !s && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("span", {
|
|
403
|
+
"aria-hidden": "true",
|
|
404
|
+
className: Y.base.indicator,
|
|
405
|
+
"data-focus-visible": e || void 0,
|
|
406
|
+
"data-selected": t || void 0,
|
|
407
|
+
children: t ? "✓" : ""
|
|
408
|
+
}), /* @__PURE__ */ m("span", {
|
|
409
|
+
className: Y.base.label,
|
|
410
|
+
children: o
|
|
411
|
+
})] })] })
|
|
412
|
+
}), /* @__PURE__ */ m(Fe, {
|
|
413
|
+
description: C,
|
|
414
|
+
error: w,
|
|
415
|
+
loading: s
|
|
416
|
+
})]
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
//#endregion
|
|
288
420
|
//#region src/primitives/Container/Container.tsx
|
|
289
|
-
var
|
|
421
|
+
var Le = {
|
|
290
422
|
base: { container: "breeze:mx-auto breeze:inline-size-full breeze:min-inline-size-0" },
|
|
291
423
|
compound: {},
|
|
292
424
|
size: {
|
|
@@ -297,21 +429,21 @@ var xe = {
|
|
|
297
429
|
state: { padded: "breeze:ps-breeze-4 breeze:pe-breeze-4 breeze:breeze-md:ps-breeze-7 breeze:breeze-md:pe-breeze-7" },
|
|
298
430
|
variant: {}
|
|
299
431
|
};
|
|
300
|
-
function
|
|
301
|
-
let { accessibleLabel: o, role: s } =
|
|
432
|
+
function Re({ "aria-label": e, children: t, element: n = "div", padded: i = !0, width: a = "page" }) {
|
|
433
|
+
let { accessibleLabel: o, role: s } = K(e, n);
|
|
302
434
|
return r(n, {
|
|
303
435
|
"aria-label": o,
|
|
304
436
|
className: [
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
i &&
|
|
437
|
+
Le.base.container,
|
|
438
|
+
Le.size[a],
|
|
439
|
+
i && Le.state.padded
|
|
308
440
|
].filter(Boolean).join(" "),
|
|
309
441
|
role: s
|
|
310
442
|
}, t);
|
|
311
443
|
}
|
|
312
444
|
//#endregion
|
|
313
445
|
//#region src/overlays/OverlayStack.ts
|
|
314
|
-
function
|
|
446
|
+
function ze() {
|
|
315
447
|
let e = [], t = /* @__PURE__ */ new Set(), n = () => t.forEach((e) => e());
|
|
316
448
|
return {
|
|
317
449
|
getSnapshot: () => e,
|
|
@@ -327,9 +459,15 @@ function Ce() {
|
|
|
327
459
|
})
|
|
328
460
|
};
|
|
329
461
|
}
|
|
330
|
-
var
|
|
331
|
-
function
|
|
332
|
-
let
|
|
462
|
+
var Be = n(null);
|
|
463
|
+
function Ve() {
|
|
464
|
+
let e = a(Be);
|
|
465
|
+
if (!e) throw Error("Breeze components must be rendered within BreezeProvider.");
|
|
466
|
+
return 100 + f(e.subscribe, e.getSnapshot, e.getSnapshot).length * 2;
|
|
467
|
+
}
|
|
468
|
+
var He = n(null);
|
|
469
|
+
function Ue(e, t, n) {
|
|
470
|
+
let r = a(Be), i = a(He), o = s();
|
|
333
471
|
if (!r) throw Error("Breeze components must be rendered within BreezeProvider.");
|
|
334
472
|
let l = f(r.subscribe, r.getSnapshot, r.getSnapshot), u = i?.id;
|
|
335
473
|
c(() => () => r.remove(o), [o, r]), c(() => {
|
|
@@ -368,12 +506,12 @@ function Ee(e, t, n) {
|
|
|
368
506
|
}
|
|
369
507
|
//#endregion
|
|
370
508
|
//#region src/overlays/OverlayProvider.tsx
|
|
371
|
-
var
|
|
372
|
-
function
|
|
373
|
-
let { direction: r } =
|
|
509
|
+
var We = n(null), Ge = "BreezeProvider portalContainer must belong to the current document and light DOM.";
|
|
510
|
+
function Ke({ children: e, portalContainer: t, locale: n }) {
|
|
511
|
+
let { direction: r } = re(), [i] = d(ze), [a, o] = d(null);
|
|
374
512
|
return c(() => {
|
|
375
513
|
let e = t ?? document.body;
|
|
376
|
-
if (e.ownerDocument !== document || e.getRootNode() !== document) throw Error(
|
|
514
|
+
if (e.ownerDocument !== document || e.getRootNode() !== document) throw Error(Ge);
|
|
377
515
|
let n = e.ownerDocument.createElement("div");
|
|
378
516
|
return n.dataset.breezeRoot = "", n.dataset.breezePortal = "", e.append(n), o(n), () => n.remove();
|
|
379
517
|
}, [t]), c(() => {
|
|
@@ -382,23 +520,23 @@ function ke({ children: e, portalContainer: t, locale: n }) {
|
|
|
382
520
|
r,
|
|
383
521
|
a,
|
|
384
522
|
n
|
|
385
|
-
]), /* @__PURE__ */ m(
|
|
523
|
+
]), /* @__PURE__ */ m(te, {
|
|
386
524
|
getContainer: () => a,
|
|
387
|
-
children: /* @__PURE__ */ m(
|
|
525
|
+
children: /* @__PURE__ */ m(Be, {
|
|
388
526
|
value: i,
|
|
389
|
-
children: /* @__PURE__ */ m(
|
|
527
|
+
children: /* @__PURE__ */ m(We, {
|
|
390
528
|
value: a,
|
|
391
529
|
children: e
|
|
392
530
|
})
|
|
393
531
|
})
|
|
394
532
|
});
|
|
395
533
|
}
|
|
396
|
-
function
|
|
397
|
-
return a(
|
|
534
|
+
function qe() {
|
|
535
|
+
return a(We);
|
|
398
536
|
}
|
|
399
537
|
//#endregion
|
|
400
538
|
//#region src/overlays/OverlaySurface.tsx
|
|
401
|
-
var
|
|
539
|
+
var X = {
|
|
402
540
|
base: {
|
|
403
541
|
content: "breeze-overlay-content",
|
|
404
542
|
header: "breeze-overlay-header",
|
|
@@ -413,214 +551,214 @@ var Y = {
|
|
|
413
551
|
fullscreen: "breeze-fullscreen",
|
|
414
552
|
popover: "breeze-popover"
|
|
415
553
|
}
|
|
416
|
-
},
|
|
417
|
-
function
|
|
554
|
+
}, Je = "Breeze overlay triggers and portal containers must belong to the current document and light DOM.";
|
|
555
|
+
function Ye(e) {
|
|
418
556
|
return typeof e == "object" && !!e && "nodeType" in e && typeof e.contains == "function";
|
|
419
557
|
}
|
|
420
|
-
function
|
|
558
|
+
function Xe(e) {
|
|
421
559
|
return e.dataset?.breezeOverlay !== void 0;
|
|
422
560
|
}
|
|
423
|
-
function
|
|
424
|
-
let { getMessageLocale:
|
|
425
|
-
o(() =>
|
|
426
|
-
let [
|
|
561
|
+
function Ze({ children: e, defaultOpen: t = !1, dismissible: n = !0, kind: r, onOpenChange: s, open: f, placement: g = "bottom", title: _, trigger: v }) {
|
|
562
|
+
let { getMessageLocale: y, messages: b } = V(), x = r === "popover" || r === "fullscreen", S = qe(), C = a(He), [w, te] = d(C === null);
|
|
563
|
+
o(() => te(!0), []);
|
|
564
|
+
let [ne, re] = d(t), O = f ?? ne, k = C?.open ?? !0, A = O && k, j = u(null), ie = u(null), ae = u(null), [oe, se] = d(!1), ce = u(!1), M = u(null), N = u(null), P = u(null), F = u(null), le = u(!1);
|
|
427
565
|
c(() => {
|
|
428
|
-
if (
|
|
429
|
-
}, [
|
|
430
|
-
let
|
|
431
|
-
if (!e && !
|
|
432
|
-
if (
|
|
433
|
-
|
|
566
|
+
if (S && j.current && (j.current.ownerDocument !== document || j.current.getRootNode() !== document || S.ownerDocument !== document || S.getRootNode() !== document)) throw Error(Je);
|
|
567
|
+
}, [S]);
|
|
568
|
+
let ue = l(() => r === "fullscreen" ? { current: S } : j, [S, r]), I = Ue(r, A && w && S !== null, A || oe), L = i((e) => {
|
|
569
|
+
if (!e && !k) {
|
|
570
|
+
if (le.current) return;
|
|
571
|
+
O && (le.current = !0);
|
|
434
572
|
}
|
|
435
|
-
f === void 0 &&
|
|
573
|
+
f === void 0 && re(e), s?.(e);
|
|
436
574
|
}, [
|
|
437
575
|
f,
|
|
438
576
|
s,
|
|
439
|
-
|
|
440
|
-
|
|
577
|
+
k,
|
|
578
|
+
O
|
|
441
579
|
]);
|
|
442
580
|
o(() => {
|
|
443
|
-
|
|
581
|
+
k ? le.current = !1 : O && L(!1);
|
|
444
582
|
}, [
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
583
|
+
L,
|
|
584
|
+
k,
|
|
585
|
+
O
|
|
448
586
|
]), o(() => {
|
|
449
|
-
if (r !== "popover" || !
|
|
587
|
+
if (r !== "popover" || !A || !n || !I.topmost || !S) return;
|
|
450
588
|
let e = () => {
|
|
451
|
-
|
|
452
|
-
}, t = (e, t) => !!e && !!t && (e === t || e.contains(t) || t.contains(e)), i = (e) => e.button === 0, a = (e) =>
|
|
453
|
-
i(t) && (e(),
|
|
589
|
+
N.current !== null && (clearTimeout(N.current), N.current = null);
|
|
590
|
+
}, t = (e, t) => !!e && !!t && (e === t || e.contains(t) || t.contains(e)), i = (e) => e.button === 0, a = (e) => Ye(e) && !ie.current?.contains(e) && !j.current?.contains(e), o = (t) => {
|
|
591
|
+
i(t) && (e(), F.current = null, P.current = Ye(t.target) ? t.target : null);
|
|
454
592
|
}, s = (n) => {
|
|
455
593
|
if (!i(n)) return;
|
|
456
|
-
let r =
|
|
457
|
-
!a(r) || !a(o) || (e(),
|
|
458
|
-
|
|
459
|
-
let e =
|
|
460
|
-
|
|
594
|
+
let r = P.current, o = Ye(n.target) ? n.target : null;
|
|
595
|
+
!a(r) || !a(o) || (e(), N.current = setTimeout(() => {
|
|
596
|
+
N.current = null;
|
|
597
|
+
let e = F.current, n = P.current;
|
|
598
|
+
F.current = null, P.current = null, !(t(e, o) && t(e, n)) && L(!1);
|
|
461
599
|
}, 0));
|
|
462
600
|
}, c = () => {
|
|
463
|
-
e(),
|
|
601
|
+
e(), F.current = null, P.current = null;
|
|
464
602
|
}, l = (n) => {
|
|
465
|
-
let r =
|
|
603
|
+
let r = Ye(n.target) ? n.target : null;
|
|
466
604
|
if (e(), a(r)) {
|
|
467
|
-
let e =
|
|
468
|
-
if (
|
|
469
|
-
|
|
605
|
+
let e = F.current, n = P.current;
|
|
606
|
+
if (F.current = null, P.current = null, t(e, r) && t(e, n)) return;
|
|
607
|
+
L(!1);
|
|
470
608
|
}
|
|
471
609
|
};
|
|
472
|
-
return
|
|
473
|
-
e(),
|
|
610
|
+
return S.ownerDocument.addEventListener("pointerdown", o, !0), S.ownerDocument.addEventListener("pointerup", s, !0), S.ownerDocument.addEventListener("pointercancel", c, !0), S.ownerDocument.addEventListener("click", l, !0), () => {
|
|
611
|
+
e(), S.ownerDocument.removeEventListener("pointerdown", o, !0), S.ownerDocument.removeEventListener("pointerup", s, !0), S.ownerDocument.removeEventListener("pointercancel", c, !0), S.ownerDocument.removeEventListener("click", l, !0), F.current = null, P.current = null;
|
|
474
612
|
};
|
|
475
613
|
}, [
|
|
476
|
-
|
|
614
|
+
L,
|
|
477
615
|
n,
|
|
478
|
-
|
|
616
|
+
S,
|
|
479
617
|
r,
|
|
480
|
-
|
|
481
|
-
|
|
618
|
+
I.topmost,
|
|
619
|
+
A
|
|
482
620
|
]);
|
|
483
|
-
let
|
|
484
|
-
let e =
|
|
485
|
-
if (!t || !
|
|
486
|
-
let r =
|
|
621
|
+
let de = C?.restoreFocus, fe = C?.id, R = i(() => {
|
|
622
|
+
let e = j.current, t = S?.ownerDocument, n = t?.activeElement;
|
|
623
|
+
if (!t || !S) return;
|
|
624
|
+
let r = fe ? t.getElementById(fe) : null;
|
|
487
625
|
if (!(n === t.body || n === r || n?.closest("[data-exiting]"))) return;
|
|
488
626
|
if (!e?.isConnected) {
|
|
489
|
-
|
|
627
|
+
de?.();
|
|
490
628
|
return;
|
|
491
629
|
}
|
|
492
|
-
let i =
|
|
630
|
+
let i = S.querySelector("[data-breeze-topmost=\"true\"]");
|
|
493
631
|
(!i || i.contains(e)) && !e.closest("[inert], [aria-hidden=\"true\"]") && e.focus({ preventScroll: !0 });
|
|
494
632
|
}, [
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
]),
|
|
499
|
-
|
|
500
|
-
}, []),
|
|
633
|
+
S,
|
|
634
|
+
fe,
|
|
635
|
+
de
|
|
636
|
+
]), z = i(() => {
|
|
637
|
+
M.current !== null && (clearTimeout(M.current), M.current = null);
|
|
638
|
+
}, []), B = i((e) => {
|
|
501
639
|
queueMicrotask(() => {
|
|
502
|
-
!e.isConnected || e.closest("[inert], [data-exiting]") || (
|
|
640
|
+
!e.isConnected || e.closest("[inert], [data-exiting]") || (z(), e.focus({ preventScroll: !0 }), M.current = setTimeout(() => {
|
|
503
641
|
let { ownerDocument: t } = e, { activeElement: n } = t;
|
|
504
|
-
e.isConnected && !e.closest("[inert], [data-exiting]") && (n === e || n === t.body) && (
|
|
642
|
+
e.isConnected && !e.closest("[inert], [data-exiting]") && (n === e || n === t.body) && (ce.current = !0, e.blur(), e.focus({ preventScroll: !0 }), ce.current = !1), M.current = null;
|
|
505
643
|
}, 500));
|
|
506
644
|
});
|
|
507
|
-
}, [
|
|
645
|
+
}, [z]), pe = u(A);
|
|
508
646
|
o(() => {
|
|
509
|
-
let e =
|
|
510
|
-
|
|
647
|
+
let e = pe.current;
|
|
648
|
+
pe.current = A, !(!x || !A || e || !ae.current) && B(ae.current);
|
|
511
649
|
}, [
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
650
|
+
B,
|
|
651
|
+
x,
|
|
652
|
+
A
|
|
515
653
|
]);
|
|
516
|
-
let
|
|
517
|
-
|
|
654
|
+
let me = i((e) => {
|
|
655
|
+
ae.current = e;
|
|
518
656
|
let t = () => {
|
|
519
|
-
|
|
657
|
+
z(), ae.current = null, se(!1), requestAnimationFrame(R);
|
|
520
658
|
};
|
|
521
659
|
if (!e) {
|
|
522
660
|
t();
|
|
523
661
|
return;
|
|
524
662
|
}
|
|
525
|
-
return se(!0),
|
|
663
|
+
return se(!0), x && B(e), t;
|
|
526
664
|
}, [
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
]),
|
|
532
|
-
id:
|
|
533
|
-
open:
|
|
534
|
-
restoreFocus:
|
|
665
|
+
z,
|
|
666
|
+
B,
|
|
667
|
+
x,
|
|
668
|
+
R
|
|
669
|
+
]), he = l(() => ({
|
|
670
|
+
id: I.id,
|
|
671
|
+
open: A,
|
|
672
|
+
restoreFocus: R
|
|
535
673
|
}), [
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
]),
|
|
540
|
-
className:
|
|
674
|
+
I.id,
|
|
675
|
+
A,
|
|
676
|
+
R
|
|
677
|
+
]), ge = /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h("div", {
|
|
678
|
+
className: X.base.header,
|
|
541
679
|
children: [/* @__PURE__ */ m("h2", {
|
|
542
|
-
className:
|
|
680
|
+
className: X.base.title,
|
|
543
681
|
children: _
|
|
544
682
|
}), /* @__PURE__ */ m("span", {
|
|
545
|
-
lang:
|
|
546
|
-
children: /* @__PURE__ */ m(
|
|
547
|
-
onAction: () =>
|
|
683
|
+
lang: y("close"),
|
|
684
|
+
children: /* @__PURE__ */ m(je, {
|
|
685
|
+
onAction: () => L(!1),
|
|
548
686
|
variant: "quiet",
|
|
549
|
-
children:
|
|
687
|
+
children: b.close
|
|
550
688
|
})
|
|
551
689
|
})]
|
|
552
|
-
}), e] }),
|
|
553
|
-
value:
|
|
554
|
-
children:
|
|
690
|
+
}), e] }), _e = /* @__PURE__ */ m(He, {
|
|
691
|
+
value: he,
|
|
692
|
+
children: x ? /* @__PURE__ */ m("section", {
|
|
555
693
|
"aria-label": _,
|
|
556
|
-
className:
|
|
557
|
-
id:
|
|
694
|
+
className: X.base.content,
|
|
695
|
+
id: I.id,
|
|
558
696
|
onBlur: (e) => {
|
|
559
|
-
if (
|
|
697
|
+
if (ce.current) {
|
|
560
698
|
e.stopPropagation();
|
|
561
699
|
return;
|
|
562
700
|
}
|
|
563
701
|
let { relatedTarget: t } = e;
|
|
564
|
-
r === "popover" && n &&
|
|
702
|
+
r === "popover" && n && I.topmost && Ye(t) && !e.currentTarget.contains(t) && !j.current?.contains(t) && (F.current = t);
|
|
565
703
|
},
|
|
566
|
-
ref:
|
|
704
|
+
ref: me,
|
|
567
705
|
role: "dialog",
|
|
568
706
|
tabIndex: -1,
|
|
569
|
-
children:
|
|
570
|
-
}) : /* @__PURE__ */ m(
|
|
707
|
+
children: ge
|
|
708
|
+
}) : /* @__PURE__ */ m(T, {
|
|
571
709
|
"aria-label": _,
|
|
572
|
-
className:
|
|
573
|
-
id:
|
|
574
|
-
ref:
|
|
575
|
-
children:
|
|
710
|
+
className: X.base.content,
|
|
711
|
+
id: I.id,
|
|
712
|
+
ref: me,
|
|
713
|
+
children: ge
|
|
576
714
|
})
|
|
577
715
|
});
|
|
578
|
-
return /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(
|
|
579
|
-
"aria-controls":
|
|
580
|
-
"aria-expanded":
|
|
716
|
+
return /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(je, {
|
|
717
|
+
"aria-controls": A ? I.id : void 0,
|
|
718
|
+
"aria-expanded": A,
|
|
581
719
|
"aria-haspopup": "dialog",
|
|
582
|
-
onAction: () =>
|
|
583
|
-
ref:
|
|
720
|
+
onAction: () => L(!x || !A),
|
|
721
|
+
ref: j,
|
|
584
722
|
children: v
|
|
585
|
-
}),
|
|
586
|
-
className:
|
|
723
|
+
}), S && w && (x ? /* @__PURE__ */ m(ee, {
|
|
724
|
+
className: X.variant[r],
|
|
587
725
|
"data-breeze-overlay": r,
|
|
588
|
-
"data-breeze-topmost":
|
|
589
|
-
"data-breeze-interactive":
|
|
590
|
-
inert: !
|
|
726
|
+
"data-breeze-topmost": I.topmost,
|
|
727
|
+
"data-breeze-interactive": I.interactive,
|
|
728
|
+
inert: !I.interactive,
|
|
591
729
|
isNonModal: !0,
|
|
592
|
-
isOpen:
|
|
593
|
-
isKeyboardDismissDisabled: !n || !
|
|
594
|
-
onOpenChange:
|
|
730
|
+
isOpen: A,
|
|
731
|
+
isKeyboardDismissDisabled: !n || !I.topmost,
|
|
732
|
+
onOpenChange: L,
|
|
595
733
|
placement: g,
|
|
596
|
-
ref:
|
|
597
|
-
shouldCloseOnInteractOutside: (e) => r === "popover" && n &&
|
|
598
|
-
style: { zIndex:
|
|
599
|
-
triggerRef:
|
|
600
|
-
children:
|
|
601
|
-
}) : /* @__PURE__ */ m(
|
|
734
|
+
ref: ie,
|
|
735
|
+
shouldCloseOnInteractOutside: (e) => r === "popover" && n && I.topmost && !j.current?.contains(e),
|
|
736
|
+
style: { zIndex: I.zIndex },
|
|
737
|
+
triggerRef: ue,
|
|
738
|
+
children: _e
|
|
739
|
+
}) : /* @__PURE__ */ m(D, {
|
|
602
740
|
className: "breeze-overlay-backdrop",
|
|
603
741
|
"data-breeze-overlay": r,
|
|
604
|
-
"data-breeze-scrim":
|
|
605
|
-
"data-breeze-topmost":
|
|
606
|
-
"data-breeze-interactive":
|
|
607
|
-
inert: !
|
|
608
|
-
isDismissable: n &&
|
|
609
|
-
isKeyboardDismissDisabled: !n || !
|
|
610
|
-
isOpen:
|
|
611
|
-
onOpenChange:
|
|
612
|
-
shouldCloseOnInteractOutside: (e) =>
|
|
613
|
-
style: { zIndex:
|
|
614
|
-
children: /* @__PURE__ */ m(
|
|
615
|
-
className:
|
|
616
|
-
children:
|
|
742
|
+
"data-breeze-scrim": I.scrim,
|
|
743
|
+
"data-breeze-topmost": I.topmost,
|
|
744
|
+
"data-breeze-interactive": I.interactive,
|
|
745
|
+
inert: !I.interactive,
|
|
746
|
+
isDismissable: n && I.topmost,
|
|
747
|
+
isKeyboardDismissDisabled: !n || !I.topmost,
|
|
748
|
+
isOpen: A,
|
|
749
|
+
onOpenChange: L,
|
|
750
|
+
shouldCloseOnInteractOutside: (e) => I.topmost && Xe(e),
|
|
751
|
+
style: { zIndex: I.zIndex },
|
|
752
|
+
children: /* @__PURE__ */ m(E, {
|
|
753
|
+
className: X.variant[r],
|
|
754
|
+
children: _e
|
|
617
755
|
})
|
|
618
756
|
}))] });
|
|
619
757
|
}
|
|
620
758
|
//#endregion
|
|
621
759
|
//#region src/primitives/Dialog/Dialog.tsx
|
|
622
|
-
function
|
|
623
|
-
return /* @__PURE__ */ m(
|
|
760
|
+
function Qe({ children: e, defaultOpen: t, dismissible: n, onOpenChange: r, open: i, title: a, trigger: o }) {
|
|
761
|
+
return /* @__PURE__ */ m(Ze, {
|
|
624
762
|
defaultOpen: t,
|
|
625
763
|
dismissible: n,
|
|
626
764
|
onOpenChange: r,
|
|
@@ -633,8 +771,8 @@ function Pe({ children: e, defaultOpen: t, dismissible: n, onOpenChange: r, open
|
|
|
633
771
|
}
|
|
634
772
|
//#endregion
|
|
635
773
|
//#region src/primitives/Drawer/Drawer.tsx
|
|
636
|
-
function
|
|
637
|
-
return /* @__PURE__ */ m(
|
|
774
|
+
function $e({ children: e, defaultOpen: t, dismissible: n, onOpenChange: r, open: i, title: a, trigger: o }) {
|
|
775
|
+
return /* @__PURE__ */ m(Ze, {
|
|
638
776
|
defaultOpen: t,
|
|
639
777
|
dismissible: n,
|
|
640
778
|
onOpenChange: r,
|
|
@@ -647,7 +785,7 @@ function Fe({ children: e, defaultOpen: t, dismissible: n, onOpenChange: r, open
|
|
|
647
785
|
}
|
|
648
786
|
//#endregion
|
|
649
787
|
//#region src/primitives/Grid/Grid.tsx
|
|
650
|
-
var
|
|
788
|
+
var et = {
|
|
651
789
|
base: { grid: "breeze:grid breeze:min-inline-size-0" },
|
|
652
790
|
compound: { columns: {
|
|
653
791
|
1: {
|
|
@@ -683,48 +821,48 @@ var Ie = {
|
|
|
683
821
|
state: {},
|
|
684
822
|
variant: {}
|
|
685
823
|
};
|
|
686
|
-
function
|
|
687
|
-
let { accessibleLabel: s, role: c } =
|
|
824
|
+
function tt({ "aria-label": e, children: t, collapseBelow: n = "md", columns: i = 2, element: a = "div", gap: o = 4 }) {
|
|
825
|
+
let { accessibleLabel: s, role: c } = K(e, a);
|
|
688
826
|
return r(a, {
|
|
689
827
|
"aria-label": s,
|
|
690
828
|
className: [
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
829
|
+
et.base.grid,
|
|
830
|
+
et.compound.columns[i][n],
|
|
831
|
+
et.size[o]
|
|
694
832
|
].join(" "),
|
|
695
833
|
role: c
|
|
696
834
|
}, t);
|
|
697
835
|
}
|
|
698
836
|
//#endregion
|
|
699
837
|
//#region src/primitives/Icon/Icon.tsx
|
|
700
|
-
var
|
|
701
|
-
add:
|
|
702
|
-
back:
|
|
703
|
-
building:
|
|
704
|
-
calendar:
|
|
705
|
-
camera:
|
|
706
|
-
check:
|
|
707
|
-
clock:
|
|
708
|
-
close:
|
|
709
|
-
delete:
|
|
710
|
-
document:
|
|
711
|
-
download:
|
|
712
|
-
expand:
|
|
713
|
-
forward:
|
|
714
|
-
lock:
|
|
715
|
-
money:
|
|
716
|
-
moneyIn:
|
|
717
|
-
moneyOut:
|
|
718
|
-
more:
|
|
719
|
-
next:
|
|
720
|
-
notifications:
|
|
721
|
-
overview:
|
|
722
|
-
people:
|
|
723
|
-
settings:
|
|
724
|
-
signOut:
|
|
725
|
-
upload:
|
|
726
|
-
warning:
|
|
727
|
-
},
|
|
838
|
+
var nt = {
|
|
839
|
+
add: fe,
|
|
840
|
+
back: ce,
|
|
841
|
+
building: j,
|
|
842
|
+
calendar: ie,
|
|
843
|
+
camera: ae,
|
|
844
|
+
check: oe,
|
|
845
|
+
clock: N,
|
|
846
|
+
close: he,
|
|
847
|
+
delete: z,
|
|
848
|
+
document: le,
|
|
849
|
+
download: P,
|
|
850
|
+
expand: se,
|
|
851
|
+
forward: M,
|
|
852
|
+
lock: L,
|
|
853
|
+
money: I,
|
|
854
|
+
moneyIn: O,
|
|
855
|
+
moneyOut: k,
|
|
856
|
+
more: F,
|
|
857
|
+
next: M,
|
|
858
|
+
notifications: A,
|
|
859
|
+
overview: ue,
|
|
860
|
+
people: me,
|
|
861
|
+
settings: R,
|
|
862
|
+
signOut: de,
|
|
863
|
+
upload: pe,
|
|
864
|
+
warning: B
|
|
865
|
+
}, rt = {
|
|
728
866
|
base: { icon: "breeze:block breeze:shrink-0" },
|
|
729
867
|
compound: {},
|
|
730
868
|
size: {
|
|
@@ -734,20 +872,20 @@ var Re = {
|
|
|
734
872
|
},
|
|
735
873
|
state: { logicalDirection: "breeze:rtl:rotate-180" },
|
|
736
874
|
variant: {}
|
|
737
|
-
},
|
|
875
|
+
}, it = /* @__PURE__ */ new Set([
|
|
738
876
|
"back",
|
|
739
877
|
"forward",
|
|
740
878
|
"next"
|
|
741
879
|
]);
|
|
742
|
-
function
|
|
743
|
-
let r =
|
|
880
|
+
function at({ label: e, name: t, size: n = "md" }) {
|
|
881
|
+
let r = nt[t], i = e?.trim() || void 0;
|
|
744
882
|
return /* @__PURE__ */ m(r, {
|
|
745
883
|
"aria-hidden": i === void 0 || void 0,
|
|
746
884
|
"aria-label": i,
|
|
747
885
|
className: [
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
886
|
+
rt.base.icon,
|
|
887
|
+
rt.size[n],
|
|
888
|
+
it.has(t) && rt.state.logicalDirection
|
|
751
889
|
].filter(Boolean).join(" "),
|
|
752
890
|
focusable: "false",
|
|
753
891
|
role: i === void 0 ? void 0 : "img",
|
|
@@ -756,7 +894,7 @@ function Ve({ label: e, name: t, size: n = "md" }) {
|
|
|
756
894
|
}
|
|
757
895
|
//#endregion
|
|
758
896
|
//#region src/primitives/IconTile/IconTile.tsx
|
|
759
|
-
var
|
|
897
|
+
var ot = {
|
|
760
898
|
base: { tile: "breeze:inline-flex breeze:shrink-0 breeze:items-center breeze:justify-center" },
|
|
761
899
|
compound: {},
|
|
762
900
|
size: {
|
|
@@ -778,15 +916,15 @@ var He = {
|
|
|
778
916
|
}
|
|
779
917
|
}
|
|
780
918
|
};
|
|
781
|
-
function
|
|
919
|
+
function st({ label: e, name: t, shape: n = "square", size: r = "lg", tone: i = "brand" }) {
|
|
782
920
|
return /* @__PURE__ */ m("span", {
|
|
783
921
|
className: [
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
922
|
+
ot.base.tile,
|
|
923
|
+
ot.variant.tone[i],
|
|
924
|
+
ot.variant.shape[n],
|
|
925
|
+
ot.size[r]
|
|
788
926
|
].join(" "),
|
|
789
|
-
children: /* @__PURE__ */ m(
|
|
927
|
+
children: /* @__PURE__ */ m(at, {
|
|
790
928
|
label: e,
|
|
791
929
|
name: t,
|
|
792
930
|
size: r === "lg" ? "md" : "sm"
|
|
@@ -795,7 +933,7 @@ function Ue({ label: e, name: t, shape: n = "square", size: r = "lg", tone: i =
|
|
|
795
933
|
}
|
|
796
934
|
//#endregion
|
|
797
935
|
//#region src/primitives/Inline/Inline.tsx
|
|
798
|
-
var
|
|
936
|
+
var ct = {
|
|
799
937
|
base: { inline: "breeze:flex breeze:min-inline-size-0" },
|
|
800
938
|
compound: {},
|
|
801
939
|
size: {
|
|
@@ -825,24 +963,121 @@ var Z = {
|
|
|
825
963
|
}
|
|
826
964
|
}
|
|
827
965
|
};
|
|
828
|
-
function
|
|
829
|
-
let { accessibleLabel: c, role: l } =
|
|
966
|
+
function lt({ "aria-label": e, children: t, element: n = "div", gap: i = 3, justify: a = "start", verticalAlign: o = "center", wrap: s = !1 }) {
|
|
967
|
+
let { accessibleLabel: c, role: l } = K(e, n);
|
|
830
968
|
return r(n, {
|
|
831
969
|
"aria-label": c,
|
|
832
970
|
className: [
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
s &&
|
|
971
|
+
ct.base.inline,
|
|
972
|
+
ct.variant.align[o],
|
|
973
|
+
ct.variant.justify[a],
|
|
974
|
+
ct.size[i],
|
|
975
|
+
s && ct.state.wrap
|
|
838
976
|
].filter(Boolean).join(" "),
|
|
839
977
|
role: l
|
|
840
978
|
}, t);
|
|
841
979
|
}
|
|
842
980
|
//#endregion
|
|
981
|
+
//#region src/primitives/NumberField/NumberField.tsx
|
|
982
|
+
var Z = {
|
|
983
|
+
base: {
|
|
984
|
+
group: "breeze:relative breeze:inline-flex breeze:min-block-breeze-md breeze:min-inline-size-0 breeze:inline-size-full breeze:items-stretch breeze:overflow-hidden breeze:rounded-breeze-ctl breeze:border breeze:border-solid breeze:border-breeze-line-strong breeze:bg-breeze-surface breeze:has-[input[data-focus-visible]]:outline-2 breeze:has-[input[data-focus-visible]]:outline-solid breeze:has-[input[data-focus-visible]]:outline-breeze-brand breeze:has-[input[data-invalid]]:border-breeze-danger breeze:data-[disabled]:cursor-not-allowed breeze:data-[disabled]:bg-breeze-sunken",
|
|
985
|
+
input: "breeze:min-block-breeze-md breeze:min-inline-size-0 breeze:flex-1 breeze:border-0 breeze:rounded-none breeze:bg-transparent breeze:tabular-nums breeze:outline-none breeze:placeholder:text-breeze-ink-3 breeze:data-[hovered]:border-transparent breeze:data-[focus-visible]:!outline-none breeze:data-[invalid]:border-transparent breeze:disabled:cursor-not-allowed breeze:read-only:cursor-default",
|
|
986
|
+
skeleton: "breeze:pointer-events-none breeze:absolute breeze:[inset-block:0] breeze:[inset-inline:0]",
|
|
987
|
+
stepButton: "breeze:min-inline-breeze-md breeze:border-0 breeze:bg-transparent breeze:ps-breeze-2 breeze:pe-breeze-2 breeze:font-breeze-sans breeze:text-breeze-md breeze:font-semibold breeze:leading-none breeze:text-breeze-ink breeze:disabled:cursor-not-allowed breeze:disabled:opacity-50 breeze:any-pointer-coarse:min-block-breeze-tap breeze:any-pointer-coarse:min-inline-breeze-tap breeze:hover:text-breeze-brand breeze:focus-visible:outline-2 breeze:focus-visible:outline-solid breeze:focus-visible:outline-breeze-brand breeze:outline-offset-[-2px]"
|
|
988
|
+
},
|
|
989
|
+
compound: {},
|
|
990
|
+
size: {},
|
|
991
|
+
state: {
|
|
992
|
+
loadingGroup: "breeze:!bg-transparent breeze:!border-transparent breeze:!opacity-100 breeze:!overflow-visible",
|
|
993
|
+
loadingInput: "breeze:!opacity-0",
|
|
994
|
+
loadingStepButton: "breeze:!opacity-0",
|
|
995
|
+
readOnlyGroup: "breeze:!bg-breeze-sunken"
|
|
996
|
+
},
|
|
997
|
+
variant: {}
|
|
998
|
+
};
|
|
999
|
+
function ut({ 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 }) {
|
|
1000
|
+
let { messages: T } = V(), E = i?.trim() || void 0, D = o?.trim() || void 0, ee = a || d;
|
|
1001
|
+
return /* @__PURE__ */ h(ve, {
|
|
1002
|
+
autoFocus: t,
|
|
1003
|
+
"aria-label": d ? u : void 0,
|
|
1004
|
+
className: q.base.root,
|
|
1005
|
+
defaultValue: n,
|
|
1006
|
+
form: s,
|
|
1007
|
+
formatOptions: c,
|
|
1008
|
+
id: l,
|
|
1009
|
+
isDisabled: ee,
|
|
1010
|
+
isInvalid: !d && D !== void 0,
|
|
1011
|
+
isReadOnly: b,
|
|
1012
|
+
isRequired: S,
|
|
1013
|
+
maxValue: f,
|
|
1014
|
+
minValue: p,
|
|
1015
|
+
name: _,
|
|
1016
|
+
onChange: v,
|
|
1017
|
+
step: C,
|
|
1018
|
+
validationBehavior: "aria",
|
|
1019
|
+
value: w,
|
|
1020
|
+
children: [
|
|
1021
|
+
/* @__PURE__ */ m(Pe, {
|
|
1022
|
+
label: u,
|
|
1023
|
+
loading: d
|
|
1024
|
+
}),
|
|
1025
|
+
/* @__PURE__ */ h(ge, {
|
|
1026
|
+
className: J(Z.base.group, b && !d && Z.state.readOnlyGroup, d && Z.state.loadingGroup),
|
|
1027
|
+
children: [
|
|
1028
|
+
/* @__PURE__ */ m(_e, {
|
|
1029
|
+
"aria-busy": d || void 0,
|
|
1030
|
+
className: J(q.base.input, Z.base.input, d && Z.state.loadingInput),
|
|
1031
|
+
autoComplete: e,
|
|
1032
|
+
placeholder: y,
|
|
1033
|
+
form: s,
|
|
1034
|
+
ref: x
|
|
1035
|
+
}),
|
|
1036
|
+
/* @__PURE__ */ m(g, {
|
|
1037
|
+
className: J(Z.base.stepButton, d && Z.state.loadingStepButton),
|
|
1038
|
+
render: (e) => r("button", {
|
|
1039
|
+
...e,
|
|
1040
|
+
"aria-hidden": d || void 0,
|
|
1041
|
+
type: "button"
|
|
1042
|
+
}),
|
|
1043
|
+
slot: "decrement",
|
|
1044
|
+
type: "button",
|
|
1045
|
+
children: "−"
|
|
1046
|
+
}),
|
|
1047
|
+
/* @__PURE__ */ m(g, {
|
|
1048
|
+
className: J(Z.base.stepButton, d && Z.state.loadingStepButton),
|
|
1049
|
+
render: (e) => r("button", {
|
|
1050
|
+
...e,
|
|
1051
|
+
"aria-hidden": d || void 0,
|
|
1052
|
+
type: "button"
|
|
1053
|
+
}),
|
|
1054
|
+
slot: "increment",
|
|
1055
|
+
type: "button",
|
|
1056
|
+
children: "+"
|
|
1057
|
+
}),
|
|
1058
|
+
d && /* @__PURE__ */ m("span", {
|
|
1059
|
+
className: Z.base.skeleton,
|
|
1060
|
+
children: /* @__PURE__ */ m(U, {
|
|
1061
|
+
blockSize: "100%",
|
|
1062
|
+
inlineSize: "100%",
|
|
1063
|
+
label: T.loading,
|
|
1064
|
+
shape: "rectangle"
|
|
1065
|
+
})
|
|
1066
|
+
})
|
|
1067
|
+
]
|
|
1068
|
+
}),
|
|
1069
|
+
/* @__PURE__ */ m(Fe, {
|
|
1070
|
+
description: E,
|
|
1071
|
+
error: D,
|
|
1072
|
+
loading: d
|
|
1073
|
+
})
|
|
1074
|
+
]
|
|
1075
|
+
});
|
|
1076
|
+
}
|
|
1077
|
+
//#endregion
|
|
843
1078
|
//#region src/primitives/Popover/Popover.tsx
|
|
844
|
-
function
|
|
845
|
-
return /* @__PURE__ */ m(
|
|
1079
|
+
function dt({ children: e, defaultOpen: t, dismissible: n, onOpenChange: r, open: i, title: a, trigger: o, placement: s }) {
|
|
1080
|
+
return /* @__PURE__ */ m(Ze, {
|
|
846
1081
|
defaultOpen: t,
|
|
847
1082
|
dismissible: n,
|
|
848
1083
|
onOpenChange: r,
|
|
@@ -856,7 +1091,7 @@ function Ge({ children: e, defaultOpen: t, dismissible: n, onOpenChange: r, open
|
|
|
856
1091
|
}
|
|
857
1092
|
//#endregion
|
|
858
1093
|
//#region src/primitives/Separator/Separator.tsx
|
|
859
|
-
var
|
|
1094
|
+
var ft = {
|
|
860
1095
|
base: { separator: "breeze:m-0 breeze:shrink-0 breeze:border-0 breeze:bg-breeze-line breeze:forced-colors:bg-[CanvasText]" },
|
|
861
1096
|
compound: {},
|
|
862
1097
|
size: {},
|
|
@@ -866,15 +1101,15 @@ var Ke = {
|
|
|
866
1101
|
vertical: "breeze:block-size-full breeze:inline-size-breeze-px"
|
|
867
1102
|
}
|
|
868
1103
|
};
|
|
869
|
-
function
|
|
1104
|
+
function pt({ orientation: e = "horizontal" }) {
|
|
870
1105
|
return /* @__PURE__ */ m("hr", {
|
|
871
1106
|
"aria-orientation": e,
|
|
872
|
-
className: [
|
|
1107
|
+
className: [ft.base.separator, ft.variant[e]].join(" ")
|
|
873
1108
|
});
|
|
874
1109
|
}
|
|
875
1110
|
//#endregion
|
|
876
1111
|
//#region src/primitives/Stack/Stack.tsx
|
|
877
|
-
var
|
|
1112
|
+
var mt = {
|
|
878
1113
|
base: { stack: "breeze:flex breeze:min-inline-size-0 breeze:flex-col" },
|
|
879
1114
|
compound: {},
|
|
880
1115
|
size: {
|
|
@@ -896,19 +1131,231 @@ var Je = {
|
|
|
896
1131
|
stretch: "breeze:items-stretch"
|
|
897
1132
|
}
|
|
898
1133
|
};
|
|
899
|
-
function
|
|
900
|
-
let { accessibleLabel: o, role: s } =
|
|
1134
|
+
function ht({ "aria-label": e, children: t, element: n = "div", gap: i = 3, horizontalAlign: a = "stretch" }) {
|
|
1135
|
+
let { accessibleLabel: o, role: s } = K(e, n);
|
|
901
1136
|
return r(n, {
|
|
902
1137
|
"aria-label": o,
|
|
903
1138
|
className: [
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
1139
|
+
mt.base.stack,
|
|
1140
|
+
mt.variant[a],
|
|
1141
|
+
mt.size[i]
|
|
907
1142
|
].join(" "),
|
|
908
1143
|
role: s
|
|
909
1144
|
}, t);
|
|
910
1145
|
}
|
|
911
1146
|
//#endregion
|
|
1147
|
+
//#region src/primitives/TextField/TextField.tsx
|
|
1148
|
+
function gt({ 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 }) {
|
|
1149
|
+
let { messages: b } = V(), x = r?.trim() || void 0, S = a?.trim() || void 0, C = i || l;
|
|
1150
|
+
return /* @__PURE__ */ h(ye, {
|
|
1151
|
+
className: q.base.root,
|
|
1152
|
+
defaultValue: n,
|
|
1153
|
+
"aria-label": l ? c : void 0,
|
|
1154
|
+
id: s,
|
|
1155
|
+
isDisabled: C,
|
|
1156
|
+
isInvalid: !l && S !== void 0,
|
|
1157
|
+
isReadOnly: p,
|
|
1158
|
+
isRequired: _,
|
|
1159
|
+
name: u,
|
|
1160
|
+
onChange: d,
|
|
1161
|
+
type: v,
|
|
1162
|
+
validationBehavior: "aria",
|
|
1163
|
+
value: y,
|
|
1164
|
+
children: [
|
|
1165
|
+
/* @__PURE__ */ m(Pe, {
|
|
1166
|
+
label: c,
|
|
1167
|
+
loading: l
|
|
1168
|
+
}),
|
|
1169
|
+
/* @__PURE__ */ h("span", {
|
|
1170
|
+
className: q.base.control,
|
|
1171
|
+
children: [/* @__PURE__ */ m(_e, {
|
|
1172
|
+
"aria-busy": l || void 0,
|
|
1173
|
+
className: J(q.base.input, l && q.state.loadingInput),
|
|
1174
|
+
autoComplete: e,
|
|
1175
|
+
autoFocus: t,
|
|
1176
|
+
form: o,
|
|
1177
|
+
placeholder: f,
|
|
1178
|
+
ref: g
|
|
1179
|
+
}), l && /* @__PURE__ */ m("span", {
|
|
1180
|
+
className: q.base.skeleton,
|
|
1181
|
+
children: /* @__PURE__ */ m(U, {
|
|
1182
|
+
blockSize: "100%",
|
|
1183
|
+
inlineSize: "100%",
|
|
1184
|
+
label: b.loading,
|
|
1185
|
+
shape: "rectangle"
|
|
1186
|
+
})
|
|
1187
|
+
})]
|
|
1188
|
+
}),
|
|
1189
|
+
/* @__PURE__ */ m(Fe, {
|
|
1190
|
+
description: x,
|
|
1191
|
+
error: S,
|
|
1192
|
+
loading: l
|
|
1193
|
+
})
|
|
1194
|
+
]
|
|
1195
|
+
});
|
|
1196
|
+
}
|
|
1197
|
+
//#endregion
|
|
1198
|
+
//#region src/primitives/Toast/Toast.tsx
|
|
1199
|
+
var _t = 2600, vt = "BreezeProvider toastLimit must be a positive integer.", yt = "Toast components must be rendered within BreezeProvider.";
|
|
1200
|
+
function bt(e) {
|
|
1201
|
+
return e.isIntersecting && e.intersectionRatio >= 1;
|
|
1202
|
+
}
|
|
1203
|
+
function xt(e, t, n, r) {
|
|
1204
|
+
let i = Number(e.target.dataset.breezeToastId);
|
|
1205
|
+
t.has(i) && (bt(e) ? n(i) : r(i));
|
|
1206
|
+
}
|
|
1207
|
+
var St = n(null), Ct = n(!0), wt = n(null);
|
|
1208
|
+
function Tt({ children: e }) {
|
|
1209
|
+
V();
|
|
1210
|
+
let t = a(Ct), n = a(wt), [r, i] = d(() => n?.message ?? null);
|
|
1211
|
+
return o(() => {
|
|
1212
|
+
if (!t || typeof document < "u" && document.hidden || r === e) return;
|
|
1213
|
+
let a = setTimeout(() => {
|
|
1214
|
+
i(e), n?.remember(e);
|
|
1215
|
+
}, 0);
|
|
1216
|
+
return () => clearTimeout(a);
|
|
1217
|
+
}, [
|
|
1218
|
+
e,
|
|
1219
|
+
n,
|
|
1220
|
+
t,
|
|
1221
|
+
r
|
|
1222
|
+
]), /* @__PURE__ */ h("div", {
|
|
1223
|
+
"aria-atomic": "true",
|
|
1224
|
+
"aria-label": r ?? void 0,
|
|
1225
|
+
"aria-live": "polite",
|
|
1226
|
+
className: "breeze-toast",
|
|
1227
|
+
role: "status",
|
|
1228
|
+
children: [/* @__PURE__ */ m(at, {
|
|
1229
|
+
name: "check",
|
|
1230
|
+
size: "sm"
|
|
1231
|
+
}), /* @__PURE__ */ m("span", { children: r })]
|
|
1232
|
+
});
|
|
1233
|
+
}
|
|
1234
|
+
function Et({ children: e, limit: t }) {
|
|
1235
|
+
let n = qe(), r = Ve(), 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());
|
|
1236
|
+
if (!Number.isInteger(t) || t < 1) throw RangeError(vt);
|
|
1237
|
+
let b = i((e, t) => {
|
|
1238
|
+
let n = y.current.get(e);
|
|
1239
|
+
n !== void 0 && (n.message = t);
|
|
1240
|
+
}, []), x = i((e) => {
|
|
1241
|
+
let t = g.current;
|
|
1242
|
+
g.current += 1, y.current.set(t, {
|
|
1243
|
+
message: null,
|
|
1244
|
+
remember: (e) => b(t, e)
|
|
1245
|
+
}), p((n) => [...n, {
|
|
1246
|
+
id: t,
|
|
1247
|
+
message: e
|
|
1248
|
+
}]);
|
|
1249
|
+
}, [b]), S = i((e) => {
|
|
1250
|
+
_.current.delete(e), v.current.delete(e), y.current.delete(e), p((t) => t.filter((t) => t.id !== e));
|
|
1251
|
+
}, []), C = i(() => {
|
|
1252
|
+
Array.from(_.current.values()).forEach(({ handle: e }) => {
|
|
1253
|
+
e !== null && clearTimeout(e);
|
|
1254
|
+
}), _.current.clear();
|
|
1255
|
+
}, []), w = i((e, t = Date.now()) => {
|
|
1256
|
+
let n = _.current.get(e);
|
|
1257
|
+
n?.handle === null || n?.startedAt === null || n === void 0 || (n.remaining = Math.max(0, n.remaining - Math.max(0, t - n.startedAt)), clearTimeout(n.handle), n.handle = null, n.startedAt = null, n.remaining === 0 && S(e));
|
|
1258
|
+
}, [S]), T = i(() => {
|
|
1259
|
+
let e = Date.now();
|
|
1260
|
+
Array.from(_.current.keys()).forEach((t) => {
|
|
1261
|
+
w(t, e);
|
|
1262
|
+
});
|
|
1263
|
+
}, [w]), E = i((e) => {
|
|
1264
|
+
let t = _.current.get(e);
|
|
1265
|
+
t?.handle !== null && t?.handle !== void 0 && clearTimeout(t.handle), _.current.delete(e);
|
|
1266
|
+
}, []), D = i((e) => {
|
|
1267
|
+
let t = _.current.get(e);
|
|
1268
|
+
if (!s || typeof document < "u" && document.hidden || t !== void 0 && t.handle !== null) return;
|
|
1269
|
+
let n = t ?? {
|
|
1270
|
+
handle: null,
|
|
1271
|
+
remaining: _t,
|
|
1272
|
+
startedAt: null
|
|
1273
|
+
};
|
|
1274
|
+
if (n.remaining <= 0) {
|
|
1275
|
+
S(e);
|
|
1276
|
+
return;
|
|
1277
|
+
}
|
|
1278
|
+
n.startedAt = Date.now(), n.handle = setTimeout(() => S(e), n.remaining), _.current.set(e, n);
|
|
1279
|
+
}, [S, s]);
|
|
1280
|
+
o(() => {
|
|
1281
|
+
let e = () => {
|
|
1282
|
+
let e = !document.hidden;
|
|
1283
|
+
e || T(), l(e);
|
|
1284
|
+
};
|
|
1285
|
+
return document.addEventListener("visibilitychange", e), e(), () => document.removeEventListener("visibilitychange", e);
|
|
1286
|
+
}, [T]), c(() => {
|
|
1287
|
+
let e = f.slice(0, t), n = new Set(e.map(({ id: e }) => e)), r = new Set(f.map(({ id: e }) => e));
|
|
1288
|
+
e.forEach(({ id: e }) => v.current.add(e)), Array.from(_.current.keys()).forEach((e) => {
|
|
1289
|
+
n.has(e) || (r.has(e) ? w(e) : E(e));
|
|
1290
|
+
});
|
|
1291
|
+
}, [
|
|
1292
|
+
t,
|
|
1293
|
+
w,
|
|
1294
|
+
f,
|
|
1295
|
+
E
|
|
1296
|
+
]), o(() => {
|
|
1297
|
+
let e = f.slice(0, t), r = new Set(e.map(({ id: e }) => e)), i = a.current;
|
|
1298
|
+
if (n === null || i === null || !s) return;
|
|
1299
|
+
if (typeof IntersectionObserver > "u") {
|
|
1300
|
+
e.forEach((e) => D(e.id));
|
|
1301
|
+
return;
|
|
1302
|
+
}
|
|
1303
|
+
let o, c = setTimeout(() => {
|
|
1304
|
+
o = new IntersectionObserver((e) => {
|
|
1305
|
+
e.forEach((e) => xt(e, r, D, w));
|
|
1306
|
+
}, { threshold: 1 }), Array.from(i.children).forEach((e) => {
|
|
1307
|
+
e instanceof HTMLElement && e.dataset.breezeToastId !== void 0 && !e.hidden && o?.observe(e);
|
|
1308
|
+
});
|
|
1309
|
+
}, 0);
|
|
1310
|
+
return () => {
|
|
1311
|
+
clearTimeout(c), o?.disconnect();
|
|
1312
|
+
};
|
|
1313
|
+
}, [
|
|
1314
|
+
n,
|
|
1315
|
+
s,
|
|
1316
|
+
t,
|
|
1317
|
+
w,
|
|
1318
|
+
f,
|
|
1319
|
+
E,
|
|
1320
|
+
D
|
|
1321
|
+
]), o(() => C, [C]);
|
|
1322
|
+
let ee = f.slice(0, t), te = new Set(ee.map(({ id: e }) => e)), ne = f.filter(({ id: e }) => te.has(e) || v.current.has(e));
|
|
1323
|
+
return /* @__PURE__ */ m(Ct, {
|
|
1324
|
+
value: s,
|
|
1325
|
+
children: /* @__PURE__ */ h(St, {
|
|
1326
|
+
value: x,
|
|
1327
|
+
children: [e, n && be(/* @__PURE__ */ m("div", {
|
|
1328
|
+
ref: a,
|
|
1329
|
+
className: "breeze-toast-region",
|
|
1330
|
+
"data-breeze-toast-region": "",
|
|
1331
|
+
"data-live-announcer": "",
|
|
1332
|
+
"data-react-aria-top-layer": "",
|
|
1333
|
+
style: { zIndex: r },
|
|
1334
|
+
children: ne.map(({ id: e, message: t }) => {
|
|
1335
|
+
let n = !te.has(e);
|
|
1336
|
+
return /* @__PURE__ */ m("div", {
|
|
1337
|
+
"aria-hidden": n ? "true" : void 0,
|
|
1338
|
+
"data-breeze-toast-id": e,
|
|
1339
|
+
hidden: n,
|
|
1340
|
+
children: /* @__PURE__ */ m(wt, {
|
|
1341
|
+
value: y.current.get(e) ?? null,
|
|
1342
|
+
children: /* @__PURE__ */ m(Ct, {
|
|
1343
|
+
value: s && !n,
|
|
1344
|
+
children: /* @__PURE__ */ m(Tt, { children: t })
|
|
1345
|
+
})
|
|
1346
|
+
})
|
|
1347
|
+
}, e);
|
|
1348
|
+
})
|
|
1349
|
+
}), n)]
|
|
1350
|
+
})
|
|
1351
|
+
});
|
|
1352
|
+
}
|
|
1353
|
+
function Dt() {
|
|
1354
|
+
let e = a(St);
|
|
1355
|
+
if (e === null) throw Error(yt);
|
|
1356
|
+
return e;
|
|
1357
|
+
}
|
|
1358
|
+
//#endregion
|
|
912
1359
|
//#region src/primitives/Typography/Typography.tsx
|
|
913
1360
|
var Q = {
|
|
914
1361
|
base: { text: "breeze:m-0 breeze:font-breeze-sans" },
|
|
@@ -946,10 +1393,10 @@ var Q = {
|
|
|
946
1393
|
}
|
|
947
1394
|
}
|
|
948
1395
|
};
|
|
949
|
-
function
|
|
1396
|
+
function Ot(e) {
|
|
950
1397
|
return e === "heading" ? "h2" : e === "title" ? "h3" : e === "body" ? "p" : "span";
|
|
951
1398
|
}
|
|
952
|
-
function
|
|
1399
|
+
function kt(e, t, n, r) {
|
|
953
1400
|
let i;
|
|
954
1401
|
try {
|
|
955
1402
|
i = new Intl.NumberFormat(n, {
|
|
@@ -963,10 +1410,10 @@ function Ze(e, t, n, r) {
|
|
|
963
1410
|
}
|
|
964
1411
|
return i.map((e) => e.type === "minusSign" ? "−" : e.value).join("");
|
|
965
1412
|
}
|
|
966
|
-
function
|
|
1413
|
+
function At(e, t, n) {
|
|
967
1414
|
let r;
|
|
968
1415
|
try {
|
|
969
|
-
r =
|
|
1416
|
+
r = xe(e).toDate("UTC");
|
|
970
1417
|
} catch {
|
|
971
1418
|
return e;
|
|
972
1419
|
}
|
|
@@ -975,26 +1422,26 @@ function Qe(e, t, n) {
|
|
|
975
1422
|
timeZone: "UTC"
|
|
976
1423
|
}).format(r);
|
|
977
1424
|
}
|
|
978
|
-
function
|
|
979
|
-
return e.loading ? /* @__PURE__ */ m(
|
|
1425
|
+
function jt(e, t, n) {
|
|
1426
|
+
return e.loading ? /* @__PURE__ */ m(U, {
|
|
980
1427
|
blockSize: "1lh",
|
|
981
1428
|
inlineSize: "8em",
|
|
982
1429
|
label: n
|
|
983
|
-
}) : e.format === "currency" ?
|
|
1430
|
+
}) : e.format === "currency" ? kt(e.value, e.currency, t, e.sign ?? "auto") : e.format === "date" ? At(e.value, t, e.dateStyle) : e.children;
|
|
984
1431
|
}
|
|
985
|
-
function
|
|
986
|
-
let { locale: t, messages: n } =
|
|
1432
|
+
function Mt(e) {
|
|
1433
|
+
let { locale: t, messages: n } = V(), { "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 ?? Ot(_), y = i?.trim() || void 0, b = a ?? (_ === "money" || d ? "end" : "start"), x = a !== void 0 || _ === "money" || d, S = jt(e, t, n.loading), C = c !== void 0 || typeof o == "string" || typeof o == "number", w = !u && y !== void 0 && !C && [
|
|
987
1434
|
"h1",
|
|
988
1435
|
"h2",
|
|
989
1436
|
"h3",
|
|
990
1437
|
"h4"
|
|
991
|
-
].includes(v),
|
|
1438
|
+
].includes(v), T = !u && y !== void 0 && !C && !w;
|
|
992
1439
|
return !u && y !== void 0 && C && (S = /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("span", {
|
|
993
1440
|
"aria-hidden": "true",
|
|
994
1441
|
children: S
|
|
995
|
-
}), /* @__PURE__ */ m(
|
|
1442
|
+
}), /* @__PURE__ */ m(Oe, { children: y })] })), r(v, {
|
|
996
1443
|
"aria-busy": u || void 0,
|
|
997
|
-
"aria-label":
|
|
1444
|
+
"aria-label": T || w ? y : void 0,
|
|
998
1445
|
className: [
|
|
999
1446
|
Q.base.text,
|
|
1000
1447
|
Q.variant.role[_],
|
|
@@ -1007,7 +1454,7 @@ function et(e) {
|
|
|
1007
1454
|
].filter(Boolean).join(" "),
|
|
1008
1455
|
id: l,
|
|
1009
1456
|
lang: t,
|
|
1010
|
-
role:
|
|
1457
|
+
role: T ? "group" : void 0
|
|
1011
1458
|
}, S);
|
|
1012
1459
|
}
|
|
1013
1460
|
//#endregion
|
|
@@ -1022,11 +1469,11 @@ var $ = {
|
|
|
1022
1469
|
};
|
|
1023
1470
|
//#endregion
|
|
1024
1471
|
//#region src/provider/BreezeProvider.tsx
|
|
1025
|
-
function
|
|
1472
|
+
function Nt(e, t) {
|
|
1026
1473
|
return e === "automatic" ? t ? "dark" : "light" : e;
|
|
1027
1474
|
}
|
|
1028
|
-
function
|
|
1029
|
-
let { direction: t, locale: n } =
|
|
1475
|
+
function Pt({ children: e }) {
|
|
1476
|
+
let { direction: t, locale: n } = re();
|
|
1030
1477
|
return /* @__PURE__ */ m("div", {
|
|
1031
1478
|
"data-breeze-root": "",
|
|
1032
1479
|
dir: t,
|
|
@@ -1034,30 +1481,30 @@ function nt({ children: e }) {
|
|
|
1034
1481
|
children: e
|
|
1035
1482
|
});
|
|
1036
1483
|
}
|
|
1037
|
-
function
|
|
1038
|
-
let [
|
|
1484
|
+
function Ft({ appearance: e, children: t, defaultAppearance: n = "automatic", locale: r, messages: a, onAppearanceChange: s, portalContainer: u, toastLimit: f = 3 }) {
|
|
1485
|
+
let [p] = d(() => typeof window > "u" || !window.matchMedia ? null : window.matchMedia("(prefers-color-scheme: dark)")), [h, g] = d(() => p?.matches ?? !1), [_, v] = d(n), y = e ?? _, b = Nt(y, h);
|
|
1039
1486
|
o(() => {
|
|
1040
|
-
if (!
|
|
1041
|
-
|
|
1487
|
+
if (!p) return;
|
|
1488
|
+
g(p.matches);
|
|
1042
1489
|
let e = (e) => {
|
|
1043
|
-
|
|
1490
|
+
g(e.matches);
|
|
1044
1491
|
};
|
|
1045
|
-
return
|
|
1046
|
-
}, [
|
|
1492
|
+
return p.addEventListener("change", e), () => p.removeEventListener("change", e);
|
|
1493
|
+
}, [p]), c(() => {
|
|
1047
1494
|
let { documentElement: e } = document, t = e.dataset.theme, n = e.style.colorScheme;
|
|
1048
|
-
return e.dataset.theme =
|
|
1495
|
+
return e.dataset.theme = b, e.style.colorScheme = b, () => {
|
|
1049
1496
|
t === void 0 ? delete e.dataset.theme : e.dataset.theme = t, e.style.colorScheme = n;
|
|
1050
1497
|
};
|
|
1051
|
-
}, [
|
|
1052
|
-
let
|
|
1053
|
-
e === void 0 &&
|
|
1054
|
-
}, [e, s]),
|
|
1055
|
-
return /* @__PURE__ */ m(
|
|
1498
|
+
}, [b]);
|
|
1499
|
+
let x = i((t) => {
|
|
1500
|
+
e === void 0 && v(t), s?.(t);
|
|
1501
|
+
}, [e, s]), S = i((e) => a?.[e] === void 0 ? "en-GB" : r, [r, a]);
|
|
1502
|
+
return /* @__PURE__ */ m(ne, {
|
|
1056
1503
|
locale: r,
|
|
1057
|
-
children: /* @__PURE__ */ m(
|
|
1504
|
+
children: /* @__PURE__ */ m(Se, {
|
|
1058
1505
|
value: l(() => ({
|
|
1059
|
-
appearance:
|
|
1060
|
-
getMessageLocale:
|
|
1506
|
+
appearance: y,
|
|
1507
|
+
getMessageLocale: S,
|
|
1061
1508
|
locale: r,
|
|
1062
1509
|
messages: {
|
|
1063
1510
|
appearance: a?.appearance ?? $.appearance,
|
|
@@ -1067,25 +1514,28 @@ function rt({ appearance: e, children: t, defaultAppearance: n = "automatic", lo
|
|
|
1067
1514
|
close: a?.close ?? $.close,
|
|
1068
1515
|
loading: a?.loading ?? $.loading
|
|
1069
1516
|
},
|
|
1070
|
-
resolvedAppearance:
|
|
1071
|
-
setAppearance:
|
|
1517
|
+
resolvedAppearance: b,
|
|
1518
|
+
setAppearance: x
|
|
1072
1519
|
}), [
|
|
1073
|
-
|
|
1074
|
-
|
|
1520
|
+
y,
|
|
1521
|
+
S,
|
|
1075
1522
|
r,
|
|
1076
1523
|
a,
|
|
1077
|
-
|
|
1078
|
-
|
|
1524
|
+
b,
|
|
1525
|
+
x
|
|
1079
1526
|
]),
|
|
1080
|
-
children: /* @__PURE__ */ m(
|
|
1527
|
+
children: /* @__PURE__ */ m(Ke, {
|
|
1081
1528
|
locale: r,
|
|
1082
1529
|
portalContainer: u,
|
|
1083
|
-
children: /* @__PURE__ */ m(
|
|
1530
|
+
children: /* @__PURE__ */ m(Et, {
|
|
1531
|
+
limit: f,
|
|
1532
|
+
children: /* @__PURE__ */ m(Pt, { children: t })
|
|
1533
|
+
})
|
|
1084
1534
|
})
|
|
1085
1535
|
})
|
|
1086
1536
|
});
|
|
1087
1537
|
}
|
|
1088
1538
|
//#endregion
|
|
1089
|
-
export {
|
|
1539
|
+
export { Te as AppearanceControl, ke as Badge, Ft as BreezeProvider, je as Button, Ne as Card, Ie as Checkbox, Re as Container, Qe as Dialog, $e as Drawer, tt as Grid, at as Icon, st as IconTile, lt as Inline, ut as NumberField, dt as Popover, pt as Separator, U as Skeleton, ht as Stack, gt as TextField, Tt as Toast, Mt as Typography, Oe as VisuallyHidden, Dt as useToast };
|
|
1090
1540
|
|
|
1091
1541
|
//# sourceMappingURL=index.js.map
|