@wirecore/wirelayer-react 0.12.1 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Button-Cd7lufvJ.js → Button-D_ctSYR-.js} +1 -1
- package/dist/{Checkbox-BMRax6m4.js → Checkbox-DXiff9X7.js} +1 -1
- package/dist/{ContextMenu-Bz723GfL.js → ContextMenu-Z23QyLFn.js} +408 -370
- package/dist/{CopyButton-C_LAuCkR.js → CopyButton-Dr_QrMYf.js} +2 -2
- package/dist/{Field-DkYxlVar.js → Field-DFh-zcjr.js} +3 -3
- package/dist/{Highlight-43-H9459.js → Highlight-CpYN310r.js} +1 -1
- package/dist/{Input-CtYSQznO.js → Input-D8lXkJcv.js} +4 -4
- package/dist/PasswordInput-DQIzdTGq.js +452 -0
- package/dist/{RecipesProvider-0idafuGm.js → RecipesProvider-COODXvxz.js} +8 -1
- package/dist/{Select-CGyqfOm3.js → Select-E_geb3hU.js} +5 -5
- package/dist/{Slider-Bfm_jjYE.js → Slider-BFGCHR5_.js} +3 -3
- package/dist/{Tree-DLHbcH3-.js → Tree-BDYg4j6i.js} +128 -128
- package/dist/chart.js +2 -2
- package/dist/code.js +14 -14
- package/dist/components/Confirm/ConfirmDialog.d.ts.map +1 -1
- package/dist/components/Confirm/confirm.d.ts +5 -0
- package/dist/components/Confirm/confirm.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts +12 -3
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/DialogService/DialogHost.d.ts.map +1 -1
- package/dist/components/DialogService/dialogs.d.ts +5 -0
- package/dist/components/DialogService/dialogs.d.ts.map +1 -1
- package/dist/components/Drawer/Drawer.d.ts +10 -2
- package/dist/components/Drawer/Drawer.d.ts.map +1 -1
- package/dist/components/NotificationCenter/NotificationCenter.d.ts +8 -2
- package/dist/components/NotificationCenter/NotificationCenter.d.ts.map +1 -1
- package/dist/components/RecipesProvider/RecipesProvider.d.ts +6 -0
- package/dist/components/RecipesProvider/RecipesProvider.d.ts.map +1 -1
- package/dist/data-table/DataTable.d.ts +26 -7
- package/dist/data-table/DataTable.d.ts.map +1 -1
- package/dist/data-table/FilterMenu.d.ts.map +1 -1
- package/dist/data-table/ValueInput.d.ts +5 -1
- package/dist/data-table/ValueInput.d.ts.map +1 -1
- package/dist/data-table/features.d.ts +10 -0
- package/dist/data-table/features.d.ts.map +1 -1
- package/dist/data-table/index.d.ts +1 -1
- package/dist/data-table/index.d.ts.map +1 -1
- package/dist/data-table/inputs.d.ts +5 -0
- package/dist/data-table/inputs.d.ts.map +1 -1
- package/dist/data-table/types.d.ts +3 -0
- package/dist/data-table/types.d.ts.map +1 -1
- package/dist/data-table.js +1150 -1083
- package/dist/editor.js +4 -4
- package/dist/form.js +10 -10
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2088 -2111
- package/dist/pdf.js +7 -7
- package/dist/sources/dateRangeInput.css +3 -0
- package/dist/virtual.js +7 -7
- package/llms-full.txt +127 -26
- package/llms.txt +1 -0
- package/package.json +3 -3
- package/dist/PasswordInput-CxZXGV2m.js +0 -449
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { n as e, o as t } from "./RecipesProvider-COODXvxz.js";
|
|
3
3
|
import { controlIds as n, copyButton as r, iconButton as i } from "@wirecore/wirelayer-recipes";
|
|
4
4
|
import { Check as a, Copy as o } from "lucide-react";
|
|
5
5
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
6
6
|
import { Clipboard as l } from "@ark-ui/react/clipboard";
|
|
7
7
|
//#region src/components/CopyButton/CopyButton.tsx
|
|
8
8
|
function u({ classes: u, value: d, showValue: f = !1, label: p, size: m = "sm", className: h, style: g, ..._ }) {
|
|
9
|
-
let v =
|
|
9
|
+
let v = e("copyButton", r, u), y = e("iconButton", i), b = v(), x = t(), S = p ?? x.copyButton.label, C = y({
|
|
10
10
|
variant: "text",
|
|
11
11
|
size: m
|
|
12
12
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { n as e, o as t } from "./RecipesProvider-COODXvxz.js";
|
|
3
3
|
import { n } from "./InputStatus-hVzkU_4q.js";
|
|
4
4
|
import { field as r, toggletip as i } from "@wirecore/wirelayer-recipes";
|
|
5
5
|
import { CircleCheck as a, Info as o } from "lucide-react";
|
|
@@ -8,7 +8,7 @@ import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
|
8
8
|
import { Field as f } from "@ark-ui/react/field";
|
|
9
9
|
//#region src/components/Toggletip/Toggletip.tsx
|
|
10
10
|
function p({ classes: n, content: r, label: a, triggerLabel: f, open: p, onOpenChange: m, icon: h = o, className: g, children: _, ...v }) {
|
|
11
|
-
let y =
|
|
11
|
+
let y = e("toggletip", i, n), b = t(), x = y(), [S, C] = l(!1), w = p ?? S, T = c(null), E = (e) => {
|
|
12
12
|
C(e), m?.(e);
|
|
13
13
|
}, D = c(E);
|
|
14
14
|
s(() => {
|
|
@@ -51,7 +51,7 @@ function p({ classes: n, content: r, label: a, triggerLabel: f, open: p, onOpenC
|
|
|
51
51
|
//#endregion
|
|
52
52
|
//#region src/components/Field/Field.tsx
|
|
53
53
|
function m({ classes: i, label: o, helperText: s, error: c, invalid: l = !1, success: m, required: h = !1, optional: g = !1, optionalText: _, disabled: v = !1, readOnly: y = !1, labelHelp: b, className: x, children: S, ...C }) {
|
|
54
|
-
let w =
|
|
54
|
+
let w = e("field", r, i), T = t(), E = w(), D = l || !!c, O = !!m && !D, k = /* @__PURE__ */ d(f.Label, {
|
|
55
55
|
className: E.label(),
|
|
56
56
|
children: [
|
|
57
57
|
o,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { a as e, n as t } from "./RecipesProvider-COODXvxz.js";
|
|
3
3
|
import { DataKeyResolver as n, checkListValues as r, createDataList as i, dataListAnnouncement as a, filterListOptions as o, groupListOptions as s, highlight as c, highlightChunks as l, indexListOptions as u, listOptionsForValues as d, listValues as f, toListOptions as p } from "@wirecore/wirelayer-recipes";
|
|
4
4
|
import { Check as m, LoaderCircle as h } from "lucide-react";
|
|
5
5
|
import { Fragment as g, useEffect as _, useMemo as v, useRef as y, useState as b } from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { n as e, o as t } from "./RecipesProvider-COODXvxz.js";
|
|
3
3
|
import { r as n, t as r } from "./InputStatus-hVzkU_4q.js";
|
|
4
4
|
import { buttonColorKey as i, formatCount as a, iconButton as o, input as s, setTextControlValue as c, spinner as l } from "@wirecore/wirelayer-recipes";
|
|
5
5
|
import { CircleAlert as u, LoaderCircle as d } from "lucide-react";
|
|
@@ -7,8 +7,8 @@ import { useId as f, useRef as p, useState as m } from "react";
|
|
|
7
7
|
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
8
8
|
import { Field as _, useFieldContext as v } from "@ark-ui/react/field";
|
|
9
9
|
//#region src/components/IconButton/IconButton.tsx
|
|
10
|
-
function y({ classes:
|
|
11
|
-
let w =
|
|
10
|
+
function y({ classes: t, icon: n, iconProps: r, label: s, variant: c, color: u, size: f, shape: p, disabled: m = !1, loading: _ = !1, type: v = "button", badge: y = !1, badgeLabel: b = (e) => e === null ? "new" : `${e} new`, className: x, onClick: S, ...C }) {
|
|
11
|
+
let w = e("iconButton", o, t), T = e("spinner", l), E = w({
|
|
12
12
|
variant: c,
|
|
13
13
|
color: i(u),
|
|
14
14
|
size: f,
|
|
@@ -47,7 +47,7 @@ function y({ classes: e, icon: n, iconProps: r, label: s, variant: c, color: u,
|
|
|
47
47
|
//#endregion
|
|
48
48
|
//#region src/components/Input/Input.tsx
|
|
49
49
|
function b({ classes: i, size: a, invalid: o = !1, success: l = !1, loading: d = !1, clearable: y = !1, clearLabel: b, disabled: x = !1, leadingIcon: S, prefix: C, suffix: w, mono: T = !1, className: E, style: D, onChange: O, ...k }) {
|
|
50
|
-
let A =
|
|
50
|
+
let A = e("input", s, i), j = t(), M = v(), N = n(), P = o || !!M?.invalid, F = !P && (l || N.success), I = x || !!M?.disabled, L = !!k.readOnly || !!M?.readOnly, R = A({
|
|
51
51
|
size: a,
|
|
52
52
|
invalid: P,
|
|
53
53
|
success: F,
|
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { n as e, o as t, r as n } from "./RecipesProvider-COODXvxz.js";
|
|
3
|
+
import { r, t as i } from "./InputStatus-hVzkU_4q.js";
|
|
4
|
+
import { autoselectElement as a, checkPasswordRequirements as o, clampDialogOffset as s, closeTab as c, controlIds as l, dialog as u, dialogMoveForKey as d, dialogMoveKeys as f, passwordInput as p, passwordStrength as m, scrollEdges as h, setTextControlValue as g, tabs as _ } from "@wirecore/wirelayer-recipes";
|
|
5
|
+
import { Check as v, ChevronLeft as y, ChevronRight as b, Circle as ee, Eye as x, EyeOff as te, Maximize2 as ne, Minimize2 as S, X as C } from "lucide-react";
|
|
6
|
+
import { createContext as w, useContext as T, useEffect as E, useId as D, useLayoutEffect as O, useRef as k, useState as A } from "react";
|
|
7
|
+
import { jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
8
|
+
import { Portal as re } from "@ark-ui/react/portal";
|
|
9
|
+
import { useFieldContext as ie } from "@ark-ui/react/field";
|
|
10
|
+
import { Tabs as N } from "@ark-ui/react/tabs";
|
|
11
|
+
import { Dialog as P, useDialogContext as F } from "@ark-ui/react/dialog";
|
|
12
|
+
import { PasswordInput as I } from "@ark-ui/react/password-input";
|
|
13
|
+
//#region src/components/Tabs/Tabs.tsx
|
|
14
|
+
var L = typeof document > "u" ? E : O, R = w(!1);
|
|
15
|
+
function z({ classes: t, value: n, defaultValue: r, onValueChange: i, label: a, orientation: o, activationMode: s, lazyMount: c, unmountOnExit: l, className: u, ...d }) {
|
|
16
|
+
let f = e("tabs", _, t)();
|
|
17
|
+
return /* @__PURE__ */ j(R, {
|
|
18
|
+
value: n === null,
|
|
19
|
+
children: /* @__PURE__ */ j(N.Root, {
|
|
20
|
+
...d,
|
|
21
|
+
className: f.base({ class: u }),
|
|
22
|
+
value: n,
|
|
23
|
+
defaultValue: r,
|
|
24
|
+
onValueChange: (e) => i?.(e.value),
|
|
25
|
+
orientation: o,
|
|
26
|
+
activationMode: s,
|
|
27
|
+
lazyMount: c,
|
|
28
|
+
unmountOnExit: l,
|
|
29
|
+
translations: a ? { listLabel: a } : void 0
|
|
30
|
+
})
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function B({ scrollable: t = !1, className: n, children: r, ...i }) {
|
|
34
|
+
let a = e("tabs", _)(), o = k(null), [s, c] = A({
|
|
35
|
+
start: !1,
|
|
36
|
+
end: !1
|
|
37
|
+
}), l = () => o.current && c(h(o.current));
|
|
38
|
+
E(() => {
|
|
39
|
+
if (!t || !o.current) return;
|
|
40
|
+
l();
|
|
41
|
+
let e = new ResizeObserver(l);
|
|
42
|
+
return e.observe(o.current), () => e.disconnect();
|
|
43
|
+
}, [t]);
|
|
44
|
+
let u = (e) => {
|
|
45
|
+
let t = o.current;
|
|
46
|
+
if (!t) return;
|
|
47
|
+
let n = getComputedStyle(t).direction === "rtl", r = t.clientWidth * .8 * (e ? 1 : -1) * (n ? -1 : 1), i = !matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
48
|
+
t.scrollBy({
|
|
49
|
+
left: r,
|
|
50
|
+
behavior: i ? "smooth" : "auto"
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
return t ? /* @__PURE__ */ M("div", {
|
|
54
|
+
className: a.scroller(),
|
|
55
|
+
children: [
|
|
56
|
+
s.start && /* @__PURE__ */ j("button", {
|
|
57
|
+
type: "button",
|
|
58
|
+
tabIndex: -1,
|
|
59
|
+
"aria-hidden": "true",
|
|
60
|
+
"data-side": "start",
|
|
61
|
+
className: a.scrollButton(),
|
|
62
|
+
onClick: () => u(!1),
|
|
63
|
+
children: /* @__PURE__ */ j(y, { className: a.scrollIcon() })
|
|
64
|
+
}),
|
|
65
|
+
/* @__PURE__ */ j(N.List, {
|
|
66
|
+
...i,
|
|
67
|
+
ref: o,
|
|
68
|
+
className: a.list({ class: [a.scrollList(), n] }),
|
|
69
|
+
onScroll: (e) => {
|
|
70
|
+
l(), i.onScroll?.(e);
|
|
71
|
+
},
|
|
72
|
+
children: r
|
|
73
|
+
}),
|
|
74
|
+
s.end && /* @__PURE__ */ j("button", {
|
|
75
|
+
type: "button",
|
|
76
|
+
tabIndex: -1,
|
|
77
|
+
"aria-hidden": "true",
|
|
78
|
+
"data-side": "end",
|
|
79
|
+
className: a.scrollButton(),
|
|
80
|
+
onClick: () => u(!0),
|
|
81
|
+
children: /* @__PURE__ */ j(b, { className: a.scrollIcon() })
|
|
82
|
+
})
|
|
83
|
+
]
|
|
84
|
+
}) : /* @__PURE__ */ j(N.List, {
|
|
85
|
+
...i,
|
|
86
|
+
className: a.list({ class: n }),
|
|
87
|
+
children: r
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
function V({ classes: t, value: n, icon: r, disabled: i, closable: a = !1, onClose: o, controls: s, className: l, children: u, onKeyDown: d, ref: f, ...p }) {
|
|
91
|
+
let m = e("tabs", _, t)({ closable: a }), h = T(R), g = k(null), [v, y] = A(!1);
|
|
92
|
+
L(() => {
|
|
93
|
+
let e = g.current;
|
|
94
|
+
y(!!e && e.closest("[role=tablist]")?.querySelector("[role=tab]:not([disabled])") === e);
|
|
95
|
+
});
|
|
96
|
+
let b = /* @__PURE__ */ M(N.Trigger, {
|
|
97
|
+
...p,
|
|
98
|
+
ref: (e) => {
|
|
99
|
+
if (g.current = e, typeof f == "function") return f(e);
|
|
100
|
+
f && (f.current = e);
|
|
101
|
+
},
|
|
102
|
+
...s === void 0 ? {} : { "aria-controls": s },
|
|
103
|
+
...h && v ? { tabIndex: 0 } : {},
|
|
104
|
+
className: m.trigger({ class: l }),
|
|
105
|
+
value: n,
|
|
106
|
+
disabled: i,
|
|
107
|
+
...a ? {
|
|
108
|
+
"aria-keyshortcuts": "Delete",
|
|
109
|
+
onKeyDown: (e) => {
|
|
110
|
+
d?.(e), !(e.key !== "Delete" || e.defaultPrevented || i) && (e.preventDefault(), c(e.currentTarget, () => o?.(n)));
|
|
111
|
+
}
|
|
112
|
+
} : { onKeyDown: d },
|
|
113
|
+
children: [r && /* @__PURE__ */ j(r, {
|
|
114
|
+
className: m.icon(),
|
|
115
|
+
"aria-hidden": "true"
|
|
116
|
+
}), u]
|
|
117
|
+
});
|
|
118
|
+
return a ? /* @__PURE__ */ M("span", {
|
|
119
|
+
role: "presentation",
|
|
120
|
+
className: m.tab(),
|
|
121
|
+
children: [b, /* @__PURE__ */ j("button", {
|
|
122
|
+
type: "button",
|
|
123
|
+
tabIndex: -1,
|
|
124
|
+
"aria-hidden": "true",
|
|
125
|
+
className: m.close(),
|
|
126
|
+
disabled: i,
|
|
127
|
+
onClick: (e) => {
|
|
128
|
+
let t = e.currentTarget.parentElement?.querySelector("[role=tab]");
|
|
129
|
+
t && c(t, () => o?.(n));
|
|
130
|
+
},
|
|
131
|
+
children: /* @__PURE__ */ j(C, { className: m.closeIcon() })
|
|
132
|
+
})]
|
|
133
|
+
}) : b;
|
|
134
|
+
}
|
|
135
|
+
function H({ classes: t, value: n, className: r, ...i }) {
|
|
136
|
+
let a = e("tabs", _, t)();
|
|
137
|
+
return /* @__PURE__ */ j(N.Content, {
|
|
138
|
+
...i,
|
|
139
|
+
className: a.content({ class: r }),
|
|
140
|
+
value: n
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
//#endregion
|
|
144
|
+
//#region src/components/Dialog/Dialog.tsx
|
|
145
|
+
var U = w({ modal: !0 });
|
|
146
|
+
function W({ open: e, defaultOpen: t, onOpenChange: n, role: r = "dialog", modal: i = !0, closeOnEscape: o = !0, closeOnInteractOutside: s, children: c }) {
|
|
147
|
+
let l = k(null);
|
|
148
|
+
return /* @__PURE__ */ j(U.Provider, {
|
|
149
|
+
value: {
|
|
150
|
+
modal: i,
|
|
151
|
+
contentRef: l
|
|
152
|
+
},
|
|
153
|
+
children: /* @__PURE__ */ j(P.Root, {
|
|
154
|
+
open: e,
|
|
155
|
+
defaultOpen: t,
|
|
156
|
+
onOpenChange: (e) => n?.(e.open),
|
|
157
|
+
role: r,
|
|
158
|
+
modal: i,
|
|
159
|
+
closeOnEscape: o,
|
|
160
|
+
closeOnInteractOutside: s,
|
|
161
|
+
initialFocusEl: () => a(l.current) ?? (r === "alertdialog" ? l.current?.querySelector("[data-part=close-trigger]") : null) ?? null,
|
|
162
|
+
lazyMount: !0,
|
|
163
|
+
unmountOnExit: !0,
|
|
164
|
+
children: c
|
|
165
|
+
})
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
function G({ children: e }) {
|
|
169
|
+
return /* @__PURE__ */ j(P.Trigger, {
|
|
170
|
+
asChild: !0,
|
|
171
|
+
children: e
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
function K({ children: e }) {
|
|
175
|
+
return /* @__PURE__ */ j(P.CloseTrigger, {
|
|
176
|
+
asChild: !0,
|
|
177
|
+
children: e
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
function q(e, t) {
|
|
181
|
+
let [n, r] = A({
|
|
182
|
+
x: 0,
|
|
183
|
+
y: 0
|
|
184
|
+
}), i = k(null), [a, o] = A(t);
|
|
185
|
+
a !== t && (o(t), t || r({
|
|
186
|
+
x: 0,
|
|
187
|
+
y: 0
|
|
188
|
+
}));
|
|
189
|
+
let c = (e, t, n) => {
|
|
190
|
+
let i = t.getBoundingClientRect(), a = {
|
|
191
|
+
x: i.x - n.x,
|
|
192
|
+
y: i.y - n.y,
|
|
193
|
+
width: i.width,
|
|
194
|
+
height: i.height
|
|
195
|
+
};
|
|
196
|
+
r(s(e, a, {
|
|
197
|
+
width: innerWidth,
|
|
198
|
+
height: innerHeight
|
|
199
|
+
}));
|
|
200
|
+
};
|
|
201
|
+
return {
|
|
202
|
+
header: {
|
|
203
|
+
onPointerDown(t) {
|
|
204
|
+
if (!e || t.button !== 0 || t.target.closest("button, a, input")) return;
|
|
205
|
+
let r = t.currentTarget.closest("[data-part=content]");
|
|
206
|
+
r && (i.current = {
|
|
207
|
+
id: t.pointerId,
|
|
208
|
+
x: t.clientX,
|
|
209
|
+
y: t.clientY,
|
|
210
|
+
origin: n,
|
|
211
|
+
content: r
|
|
212
|
+
}, t.currentTarget.setPointerCapture?.(t.pointerId), t.preventDefault());
|
|
213
|
+
},
|
|
214
|
+
onPointerMove(e) {
|
|
215
|
+
let t = i.current;
|
|
216
|
+
t && e.pointerId === t.id && c({
|
|
217
|
+
x: t.origin.x + e.clientX - t.x,
|
|
218
|
+
y: t.origin.y + e.clientY - t.y
|
|
219
|
+
}, t.content, n);
|
|
220
|
+
},
|
|
221
|
+
onPointerUp() {
|
|
222
|
+
i.current = null;
|
|
223
|
+
},
|
|
224
|
+
onPointerCancel() {
|
|
225
|
+
i.current = null;
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
onKeyDown: (t) => {
|
|
229
|
+
if (!e) return;
|
|
230
|
+
let r = d(t);
|
|
231
|
+
r && (t.preventDefault(), c({
|
|
232
|
+
x: n.x + r.x,
|
|
233
|
+
y: n.y + r.y
|
|
234
|
+
}, t.currentTarget, n));
|
|
235
|
+
},
|
|
236
|
+
style: e && (n.x || n.y) ? { translate: `${n.x}px ${n.y}px` } : void 0
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
function J({ classes: r, title: i, hideTitle: a, header: o, titlePosition: s, description: c, icon: l, status: d, size: p, position: m, fullscreen: h, maximizable: g, maximized: _, defaultMaximized: v, onMaximizedChange: y, draggable: b, closable: ee = !0, scrollBehavior: x, responsive: te = !0, closeLabel: w, maximizeLabel: E, restoreLabel: D, footer: O, portalTarget: k, className: ie, style: N, onKeyDown: I, children: L, ref: R, ...z }) {
|
|
240
|
+
let B = e("dialog", u, r), V = n("dialog", u), H = s ?? (V.titleInHeader ? "header" : "body"), W = t(), { modal: G, contentRef: K } = T(U), J = F(), [Y, ae] = A(v ?? !1), X = _ ?? Y, oe = () => {
|
|
241
|
+
ae(!X), y?.(!X);
|
|
242
|
+
}, se = !!b && !X && !h, ce = o != null && o !== !1, Z = q(se, J.open), Q = B({
|
|
243
|
+
status: d,
|
|
244
|
+
size: p,
|
|
245
|
+
position: m,
|
|
246
|
+
scrollBehavior: x,
|
|
247
|
+
fullscreen: h || X,
|
|
248
|
+
responsive: te,
|
|
249
|
+
draggable: b && !X,
|
|
250
|
+
maximizable: g,
|
|
251
|
+
hideTitle: a ?? ce,
|
|
252
|
+
titleInHeader: H === "header"
|
|
253
|
+
}), $ = /* @__PURE__ */ j(P.Title, {
|
|
254
|
+
className: Q.title(),
|
|
255
|
+
children: i
|
|
256
|
+
}), le = X ? S : ne;
|
|
257
|
+
return /* @__PURE__ */ M(re, {
|
|
258
|
+
...k ? { container: { current: k } } : {},
|
|
259
|
+
children: [G && /* @__PURE__ */ j(P.Backdrop, { className: Q.backdrop() }), /* @__PURE__ */ j(P.Positioner, {
|
|
260
|
+
className: Q.positioner(),
|
|
261
|
+
children: /* @__PURE__ */ M(P.Content, {
|
|
262
|
+
...z,
|
|
263
|
+
ref: (e) => {
|
|
264
|
+
if (K && (K.current = e), typeof R == "function") return R(e);
|
|
265
|
+
R && (R.current = e);
|
|
266
|
+
},
|
|
267
|
+
...b ? { "aria-keyshortcuts": f } : {},
|
|
268
|
+
className: Q.content({ class: ie }),
|
|
269
|
+
style: Z.style ? {
|
|
270
|
+
...N,
|
|
271
|
+
...Z.style
|
|
272
|
+
} : N,
|
|
273
|
+
onKeyDown: (e) => {
|
|
274
|
+
I?.(e), b && Z.onKeyDown(e);
|
|
275
|
+
},
|
|
276
|
+
children: [
|
|
277
|
+
/* @__PURE__ */ M("div", {
|
|
278
|
+
className: Q.header(),
|
|
279
|
+
...b ? Z.header : {},
|
|
280
|
+
children: [
|
|
281
|
+
l && /* @__PURE__ */ j("span", {
|
|
282
|
+
className: Q.iconBox(),
|
|
283
|
+
children: /* @__PURE__ */ j(l, {
|
|
284
|
+
className: Q.icon(),
|
|
285
|
+
"aria-hidden": "true"
|
|
286
|
+
})
|
|
287
|
+
}),
|
|
288
|
+
ce ? /* @__PURE__ */ M("div", {
|
|
289
|
+
className: Q.headerContent(),
|
|
290
|
+
children: [o, H === "header" && $]
|
|
291
|
+
}) : H === "header" && $,
|
|
292
|
+
g && /* @__PURE__ */ j("button", {
|
|
293
|
+
type: "button",
|
|
294
|
+
className: Q.maximize(),
|
|
295
|
+
"aria-label": X ? D ?? W.dialog.restore : E ?? W.dialog.maximize,
|
|
296
|
+
onClick: oe,
|
|
297
|
+
children: /* @__PURE__ */ j(le, {
|
|
298
|
+
className: Q.maximizeIcon(),
|
|
299
|
+
"aria-hidden": "true"
|
|
300
|
+
})
|
|
301
|
+
}),
|
|
302
|
+
ee && /* @__PURE__ */ j(P.CloseTrigger, {
|
|
303
|
+
className: Q.close(),
|
|
304
|
+
"aria-label": w ?? W.common.close,
|
|
305
|
+
children: /* @__PURE__ */ j(C, {
|
|
306
|
+
className: Q.closeIcon(),
|
|
307
|
+
"aria-hidden": "true"
|
|
308
|
+
})
|
|
309
|
+
})
|
|
310
|
+
]
|
|
311
|
+
}),
|
|
312
|
+
/* @__PURE__ */ M("div", {
|
|
313
|
+
className: Q.body(),
|
|
314
|
+
children: [
|
|
315
|
+
H === "body" && $,
|
|
316
|
+
c && /* @__PURE__ */ j(P.Description, {
|
|
317
|
+
className: Q.description(),
|
|
318
|
+
children: c
|
|
319
|
+
}),
|
|
320
|
+
L
|
|
321
|
+
]
|
|
322
|
+
}),
|
|
323
|
+
O && /* @__PURE__ */ j("div", {
|
|
324
|
+
className: Q.footer(),
|
|
325
|
+
children: O
|
|
326
|
+
})
|
|
327
|
+
]
|
|
328
|
+
})
|
|
329
|
+
})]
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
//#endregion
|
|
333
|
+
//#region src/components/PasswordInput/PasswordInput.tsx
|
|
334
|
+
function Y({ classes: n, size: a, invalid: s, success: c, disabled: u, readOnly: d, required: f, name: h, defaultVisible: _, visible: y, onVisibleChange: b, autoComplete: ne = "current-password", strength: S = !1, requirements: C, loading: w = !1, clearable: T = !1, clearLabel: E, mono: O = !1, id: re, className: N, style: P, ...F }) {
|
|
335
|
+
let L = e("passwordInput", p, n), R = t(), z = ie(), B = r(), V = !(s || z?.invalid) && (!!c || B.success), H = L({
|
|
336
|
+
size: a,
|
|
337
|
+
success: V,
|
|
338
|
+
mono: O
|
|
339
|
+
}), U = D(), [W, G] = A(String(F.defaultValue ?? "")), K = F.value === void 0 ? W : String(F.value), q = m(K), J = K ? R.passwordStrength.levels[q] : "", Y = o(K, C ?? []), ae = S || C?.length ? [
|
|
340
|
+
z?.ariaDescribedby,
|
|
341
|
+
S && `${U}strength`,
|
|
342
|
+
C?.length && `${U}requirements`
|
|
343
|
+
].filter(Boolean).join(" ") : void 0, X = k(null), oe = () => {
|
|
344
|
+
let e = X.current?.querySelector("input");
|
|
345
|
+
e && (g(e), e.focus());
|
|
346
|
+
};
|
|
347
|
+
return /* @__PURE__ */ M(I.Root, {
|
|
348
|
+
className: H.base({ class: N }),
|
|
349
|
+
style: P,
|
|
350
|
+
invalid: s,
|
|
351
|
+
disabled: u,
|
|
352
|
+
readOnly: d,
|
|
353
|
+
required: f,
|
|
354
|
+
name: h,
|
|
355
|
+
defaultVisible: _,
|
|
356
|
+
visible: y,
|
|
357
|
+
onVisibilityChange: (e) => b?.(e.visible),
|
|
358
|
+
autoComplete: ne,
|
|
359
|
+
translations: R.passwordInput,
|
|
360
|
+
...l(re, "input", { input: z?.ids.control }),
|
|
361
|
+
children: [
|
|
362
|
+
/* @__PURE__ */ M(I.Control, {
|
|
363
|
+
ref: X,
|
|
364
|
+
className: H.control(),
|
|
365
|
+
children: [
|
|
366
|
+
/* @__PURE__ */ j(I.Input, {
|
|
367
|
+
...F,
|
|
368
|
+
"aria-describedby": ae,
|
|
369
|
+
"aria-busy": w || void 0,
|
|
370
|
+
className: H.input(),
|
|
371
|
+
onChange: (e) => {
|
|
372
|
+
G(e.target.value), F.onChange?.(e);
|
|
373
|
+
}
|
|
374
|
+
}),
|
|
375
|
+
(w || T || V) && /* @__PURE__ */ j(i, {
|
|
376
|
+
loading: w,
|
|
377
|
+
clear: T && !!K && !(u || z?.disabled) && !(d || z?.readOnly),
|
|
378
|
+
clearLabel: E ?? R.field.clear,
|
|
379
|
+
onClear: oe,
|
|
380
|
+
success: V,
|
|
381
|
+
classes: {
|
|
382
|
+
spinner: H.spinner(),
|
|
383
|
+
clear: H.clear(),
|
|
384
|
+
clearIcon: H.clearIcon(),
|
|
385
|
+
statusIcon: H.statusIcon()
|
|
386
|
+
}
|
|
387
|
+
}),
|
|
388
|
+
/* @__PURE__ */ j(I.VisibilityTrigger, {
|
|
389
|
+
className: H.toggle(),
|
|
390
|
+
children: /* @__PURE__ */ j(I.Indicator, {
|
|
391
|
+
fallback: /* @__PURE__ */ j(x, {
|
|
392
|
+
className: H.toggleIcon(),
|
|
393
|
+
"aria-hidden": "true"
|
|
394
|
+
}),
|
|
395
|
+
children: /* @__PURE__ */ j(te, {
|
|
396
|
+
className: H.toggleIcon(),
|
|
397
|
+
"aria-hidden": "true"
|
|
398
|
+
})
|
|
399
|
+
})
|
|
400
|
+
})
|
|
401
|
+
]
|
|
402
|
+
}),
|
|
403
|
+
S && /* @__PURE__ */ M("div", {
|
|
404
|
+
className: H.strength(),
|
|
405
|
+
children: [/* @__PURE__ */ j("div", {
|
|
406
|
+
className: H.meter(),
|
|
407
|
+
"aria-hidden": "true",
|
|
408
|
+
children: [
|
|
409
|
+
1,
|
|
410
|
+
2,
|
|
411
|
+
3,
|
|
412
|
+
4
|
|
413
|
+
].map((e) => /* @__PURE__ */ j("span", {
|
|
414
|
+
className: H.bar(),
|
|
415
|
+
"data-level": q,
|
|
416
|
+
"data-filled": e <= q || void 0
|
|
417
|
+
}, e))
|
|
418
|
+
}), /* @__PURE__ */ j("span", {
|
|
419
|
+
id: `${U}strength`,
|
|
420
|
+
className: H.strengthText(),
|
|
421
|
+
"aria-live": "polite",
|
|
422
|
+
children: J && R.passwordStrength.label(J)
|
|
423
|
+
})]
|
|
424
|
+
}),
|
|
425
|
+
!!C?.length && /* @__PURE__ */ j("ul", {
|
|
426
|
+
id: `${U}requirements`,
|
|
427
|
+
className: H.requirements(),
|
|
428
|
+
"aria-label": R.passwordRequirements.label,
|
|
429
|
+
children: C.map((e, t) => /* @__PURE__ */ M("li", {
|
|
430
|
+
className: H.requirement(),
|
|
431
|
+
"data-met": Y[t] || void 0,
|
|
432
|
+
children: [
|
|
433
|
+
Y[t] ? /* @__PURE__ */ j(v, {
|
|
434
|
+
className: H.requirementIcon(),
|
|
435
|
+
"aria-hidden": "true"
|
|
436
|
+
}) : /* @__PURE__ */ j(ee, {
|
|
437
|
+
className: H.requirementIcon(),
|
|
438
|
+
"aria-hidden": "true"
|
|
439
|
+
}),
|
|
440
|
+
e.label,
|
|
441
|
+
/* @__PURE__ */ j("span", {
|
|
442
|
+
className: H.requirementState(),
|
|
443
|
+
children: `: ${Y[t] ? R.passwordRequirements.met : R.passwordRequirements.unmet}`
|
|
444
|
+
})
|
|
445
|
+
]
|
|
446
|
+
}, e.label))
|
|
447
|
+
})
|
|
448
|
+
]
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
//#endregion
|
|
452
|
+
export { U as a, H as c, J as i, B as l, W as n, G as o, K as r, z as s, Y as t, V as u };
|
|
@@ -35,5 +35,12 @@ function g(t, n, r) {
|
|
|
35
35
|
let a = o(m);
|
|
36
36
|
return e(t), i(n, [a[t], r ? { classes: r } : void 0]);
|
|
37
37
|
}
|
|
38
|
+
function _(e, t) {
|
|
39
|
+
let n = o(m);
|
|
40
|
+
return {
|
|
41
|
+
...t.defaultVariants,
|
|
42
|
+
...n[e]?.defaultVariants
|
|
43
|
+
};
|
|
44
|
+
}
|
|
38
45
|
//#endregion
|
|
39
|
-
export {
|
|
46
|
+
export { f as a, d as i, g as n, p as o, _ as r, h as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { a as n, c as r, n as i, o as a } from "./Highlight-
|
|
2
|
+
import { n as e, o as t } from "./RecipesProvider-COODXvxz.js";
|
|
3
|
+
import { a as n, c as r, n as i, o as a } from "./Highlight-CpYN310r.js";
|
|
4
4
|
import { controlIds as o, select as s, spinner as c } from "@wirecore/wirelayer-recipes";
|
|
5
5
|
import { ChevronDown as l, LoaderCircle as u, X as d } from "lucide-react";
|
|
6
6
|
import { useCallback as f, useEffect as p, useId as ee, useMemo as m, useRef as te, useState as ne } from "react";
|
|
@@ -12,7 +12,7 @@ import { Select as v } from "@ark-ui/react/select";
|
|
|
12
12
|
//#region src/components/Spinner/Spinner.tsx
|
|
13
13
|
var y = 2 * Math.PI * 9;
|
|
14
14
|
function b({ classes: n, size: r, label: i, value: a, className: o, ...s }) {
|
|
15
|
-
let l =
|
|
15
|
+
let l = e("spinner", c, n), d = t(), f = l({ size: r });
|
|
16
16
|
if (a !== void 0) {
|
|
17
17
|
let e = Math.min(100, Math.max(0, a));
|
|
18
18
|
return /* @__PURE__ */ g("span", {
|
|
@@ -62,10 +62,10 @@ function b({ classes: n, size: r, label: i, value: a, className: o, ...s }) {
|
|
|
62
62
|
//#endregion
|
|
63
63
|
//#region src/components/Select/Select.tsx
|
|
64
64
|
function x({ classes: c, items: y, value: b, defaultValue: x, onValueChange: S, emptyValue: C, placeholder: oe, disabled: se, invalid: ce, required: le, name: ue, itemValue: de, itemLabel: fe, itemDisabled: pe, itemGroup: me, itemKeywords: he, valueKey: ge, clearable: w, loading: T, loadingText: _e, size: ve, filter: E, manualFilter: D, onFilterChange: O, emptyText: ye, hasMore: be, onLoadMore: xe, dataSource: k, minSearchLength: Se, pageSize: Ce, standalone: we, open: Te, onOpenChange: Ee, stopKeyPropagation: A = !1, renderItem: De, renderValue: j, id: Oe, className: ke, style: Ae, onKeyDown: je, ...M }) {
|
|
65
|
-
let N =
|
|
65
|
+
let N = e("select", s, c)({
|
|
66
66
|
size: ve,
|
|
67
67
|
clearable: w
|
|
68
|
-
}), P = ie(), F =
|
|
68
|
+
}), P = ie(), F = t(), I = F.select, L = {
|
|
69
69
|
itemValue: de,
|
|
70
70
|
itemLabel: fe,
|
|
71
71
|
itemDisabled: pe,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { n as e, o as t } from "./RecipesProvider-COODXvxz.js";
|
|
3
3
|
import { t as n } from "./label-for-DYgV5EwH.js";
|
|
4
4
|
import { slider as r, snapToMarks as i } from "@wirecore/wirelayer-recipes";
|
|
5
5
|
import { useId as a, useState as o } from "react";
|
|
@@ -8,11 +8,11 @@ import { Slider as l } from "@ark-ui/react/slider";
|
|
|
8
8
|
//#region src/components/Slider/Slider.tsx
|
|
9
9
|
function u({ classes: u, value: d, defaultValue: f = [0], onValueChange: p, onValueChangeEnd: m, min: h = 0, max: g = 100, step: _ = 1, label: v, thumbLabels: y, showValue: b = !0, hideLabel: x = !1, formatValue: S = String, disabled: C, name: w, orientation: T, marks: E, restrictToMarks: D = !1, minRange: O, className: k, ...A }) {
|
|
10
10
|
n("Slider", A.id);
|
|
11
|
-
let j =
|
|
11
|
+
let j = e("slider", r, u)({
|
|
12
12
|
withMarks: !!E?.length,
|
|
13
13
|
hideLabel: x,
|
|
14
14
|
hideHeader: x && !b
|
|
15
|
-
}), M = (E ?? []).map((e) => typeof e == "number" ? { value: e } : e), [N, P] = o(f), F = D && M.length > 0, I = F ? d ?? N : d, L =
|
|
15
|
+
}), M = (E ?? []).map((e) => typeof e == "number" ? { value: e } : e), [N, P] = o(f), F = D && M.length > 0, I = F ? d ?? N : d, L = t(), R = a(), z = `${R}label`, B = (d ?? f).length;
|
|
16
16
|
return /* @__PURE__ */ c(l.Root, {
|
|
17
17
|
...A,
|
|
18
18
|
className: j.base({ class: k }),
|