@wirecore/wirelayer-react 0.7.0 → 0.9.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/ContextMenu-GCeoPu8T.js +1523 -0
- package/dist/{Input-C8T3WLd5.js → Input-CtYSQznO.js} +41 -40
- package/dist/PasswordInput-CxZXGV2m.js +449 -0
- package/dist/Select-CGyqfOm3.js +256 -0
- package/dist/components/Alert/Alert.d.ts +3 -1
- package/dist/components/Alert/Alert.d.ts.map +1 -1
- package/dist/components/Avatar/Avatar.d.ts +3 -1
- package/dist/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/Card/Card.d.ts +3 -1
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +9 -5
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/Code/Code.d.ts +11 -0
- package/dist/components/Code/Code.d.ts.map +1 -0
- package/dist/components/Combobox/Combobox.d.ts +10 -1
- package/dist/components/Combobox/Combobox.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.d.ts +14 -4
- package/dist/components/ContextMenu/ContextMenu.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/Input/Input.d.ts +7 -2
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Menu/Menu.d.ts +27 -3
- package/dist/components/Menu/Menu.d.ts.map +1 -1
- package/dist/components/NativeSelect/NativeSelect.d.ts +14 -8
- package/dist/components/NativeSelect/NativeSelect.d.ts.map +1 -1
- package/dist/components/NumberInput/NumberInput.d.ts +12 -4
- package/dist/components/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/components/PasswordInput/PasswordInput.d.ts +7 -2
- package/dist/components/PasswordInput/PasswordInput.d.ts.map +1 -1
- package/dist/components/Progress/Progress.d.ts +15 -1
- package/dist/components/Progress/Progress.d.ts.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +16 -7
- package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/components/RadioGroup/RadioGroupItem.d.ts +3 -2
- package/dist/components/RadioGroup/RadioGroupItem.d.ts.map +1 -1
- package/dist/components/RadioGroup/context.d.ts +3 -0
- package/dist/components/RadioGroup/context.d.ts.map +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +14 -5
- package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts +20 -5
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Stepper/Stepper.d.ts +3 -1
- package/dist/components/Stepper/Stepper.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts +11 -2
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.d.ts +7 -2
- package/dist/components/Textarea/Textarea.d.ts.map +1 -1
- package/dist/components/Wizard/Wizard.d.ts +11 -3
- package/dist/components/Wizard/Wizard.d.ts.map +1 -1
- package/dist/data-table.js +3 -3
- package/dist/form.js +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/media.d.ts +7 -0
- package/dist/hooks/media.d.ts.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2111 -2026
- package/dist/pdf.js +2 -2
- package/dist/sources/Code.css +2 -0
- package/llms-full.txt +106 -28
- package/llms.txt +6 -4
- package/package.json +3 -3
- package/dist/ContextMenu-BD72S5n6.js +0 -1452
- package/dist/PasswordInput-SjO66gZB.js +0 -422
- package/dist/Select-7rfeNmJb.js +0 -242
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { a as e, n as t } from "./RecipesProvider-0idafuGm.js";
|
|
3
|
+
import { a as n, c as r, n as i, o as a } from "./Highlight-43-H9459.js";
|
|
4
|
+
import { controlIds as o, select as s, spinner as c } from "@wirecore/wirelayer-recipes";
|
|
5
|
+
import { ChevronDown as l, LoaderCircle as u, X as d } from "lucide-react";
|
|
6
|
+
import { useCallback as f, useEffect as p, useId as ee, useMemo as m, useRef as te, useState as ne } from "react";
|
|
7
|
+
import { Fragment as h, jsx as g, jsxs as _ } 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 { createListCollection as ae } from "@ark-ui/react/collection";
|
|
11
|
+
import { Select as v } from "@ark-ui/react/select";
|
|
12
|
+
//#region src/components/Spinner/Spinner.tsx
|
|
13
|
+
var y = 2 * Math.PI * 9;
|
|
14
|
+
function b({ classes: n, size: r, label: i, value: a, className: o, ...s }) {
|
|
15
|
+
let l = t("spinner", c, n), d = e(), f = l({ size: r });
|
|
16
|
+
if (a !== void 0) {
|
|
17
|
+
let e = Math.min(100, Math.max(0, a));
|
|
18
|
+
return /* @__PURE__ */ g("span", {
|
|
19
|
+
...s,
|
|
20
|
+
className: f.base({ class: o }),
|
|
21
|
+
role: "progressbar",
|
|
22
|
+
"aria-label": i ?? d.common.loading,
|
|
23
|
+
"aria-valuemin": 0,
|
|
24
|
+
"aria-valuemax": 100,
|
|
25
|
+
"aria-valuenow": e,
|
|
26
|
+
"aria-valuetext": `${Math.round(e)} %`,
|
|
27
|
+
children: /* @__PURE__ */ _("svg", {
|
|
28
|
+
className: f.ring(),
|
|
29
|
+
viewBox: "0 0 24 24",
|
|
30
|
+
"aria-hidden": "true",
|
|
31
|
+
children: [/* @__PURE__ */ g("circle", {
|
|
32
|
+
className: f.ringTrack(),
|
|
33
|
+
cx: "12",
|
|
34
|
+
cy: "12",
|
|
35
|
+
r: "9",
|
|
36
|
+
strokeWidth: "3"
|
|
37
|
+
}), /* @__PURE__ */ g("circle", {
|
|
38
|
+
className: f.ringRange(),
|
|
39
|
+
cx: "12",
|
|
40
|
+
cy: "12",
|
|
41
|
+
r: "9",
|
|
42
|
+
strokeWidth: "3",
|
|
43
|
+
strokeLinecap: "round",
|
|
44
|
+
strokeDasharray: `${e / 100 * y} ${y}`
|
|
45
|
+
})]
|
|
46
|
+
})
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return /* @__PURE__ */ _("span", {
|
|
50
|
+
...s,
|
|
51
|
+
className: f.base({ class: o }),
|
|
52
|
+
role: "status",
|
|
53
|
+
children: [/* @__PURE__ */ g(u, {
|
|
54
|
+
className: f.icon(),
|
|
55
|
+
"aria-hidden": "true"
|
|
56
|
+
}), /* @__PURE__ */ g("span", {
|
|
57
|
+
className: f.label(),
|
|
58
|
+
children: i ?? d.common.loading
|
|
59
|
+
})]
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/components/Select/Select.tsx
|
|
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 = t("select", s, c)({
|
|
66
|
+
size: ve,
|
|
67
|
+
clearable: w
|
|
68
|
+
}), P = ie(), F = e(), I = F.select, L = {
|
|
69
|
+
itemValue: de,
|
|
70
|
+
itemLabel: fe,
|
|
71
|
+
itemDisabled: pe,
|
|
72
|
+
itemGroup: me,
|
|
73
|
+
itemKeywords: he,
|
|
74
|
+
valueKey: ge
|
|
75
|
+
}, [R, z] = ne(""), B = r({
|
|
76
|
+
items: y,
|
|
77
|
+
source: k,
|
|
78
|
+
accessors: L,
|
|
79
|
+
pageSize: Ce,
|
|
80
|
+
minSearchLength: Se
|
|
81
|
+
}), { options: V, groups: Me, ordered: H, firstFor: Ne } = n(B.items, L, E && !D && !k ? R : ""), U = m(() => [...V, ...B.resolvedOptions], [V, B.resolvedOptions]), W = (e) => C !== void 0 && e === C ? null : e, { selected: G, keys: K, commit: q, commitKeys: Pe } = a({
|
|
82
|
+
multiple: !1,
|
|
83
|
+
value: W(b),
|
|
84
|
+
defaultValue: W(x),
|
|
85
|
+
accessors: L,
|
|
86
|
+
items: U,
|
|
87
|
+
onChange: S && ((e) => S(e === null ? C ?? null : e)),
|
|
88
|
+
check: {
|
|
89
|
+
component: "Select",
|
|
90
|
+
ready: !k && !T && y.length > 0
|
|
91
|
+
}
|
|
92
|
+
}), Fe = K.join("\0");
|
|
93
|
+
p(() => {
|
|
94
|
+
B.resolve(K, U);
|
|
95
|
+
}, [Fe, k]);
|
|
96
|
+
let J = T || B.loading, Y = G[0], Ie = m(() => ae({
|
|
97
|
+
items: H,
|
|
98
|
+
itemToString: (e) => e.label,
|
|
99
|
+
itemToValue: (e) => e.key,
|
|
100
|
+
isItemDisabled: (e) => e.disabled
|
|
101
|
+
}), [H]), X = ee(), Z = Y?.icon, Le = {
|
|
102
|
+
item: N.item(),
|
|
103
|
+
itemText: N.itemText(),
|
|
104
|
+
icon: N.icon(),
|
|
105
|
+
itemIndicator: N.itemIndicator(),
|
|
106
|
+
itemBody: N.itemBody(),
|
|
107
|
+
itemDescription: N.itemDescription(),
|
|
108
|
+
group: N.group(),
|
|
109
|
+
groupLabel: N.groupLabel(),
|
|
110
|
+
loading: N.loading(),
|
|
111
|
+
loadingIcon: N.loadingIcon(),
|
|
112
|
+
sentinel: N.sentinel(),
|
|
113
|
+
empty: N.empty()
|
|
114
|
+
}, Q = /* @__PURE__ */ g(i, {
|
|
115
|
+
parts: v,
|
|
116
|
+
groups: Me,
|
|
117
|
+
classes: Le,
|
|
118
|
+
loading: J,
|
|
119
|
+
loadingText: _e ?? F.common.loading,
|
|
120
|
+
hasMore: be || B.hasMore,
|
|
121
|
+
onLoadMore: () => k ? B.loadMore() : xe?.(),
|
|
122
|
+
emptyText: ye ?? B.emptyText ?? (R ? F.common.noResults : F.common.empty),
|
|
123
|
+
renderItem: De
|
|
124
|
+
});
|
|
125
|
+
function Re(e) {
|
|
126
|
+
je?.(e), A && e.key === "Enter" && e.stopPropagation(), w && G.length && (e.key === "Backspace" || e.key === "Delete") && (e.preventDefault(), q([]));
|
|
127
|
+
}
|
|
128
|
+
let $ = te(A);
|
|
129
|
+
p(() => {
|
|
130
|
+
$.current = A;
|
|
131
|
+
});
|
|
132
|
+
let ze = f((e) => {
|
|
133
|
+
e?.addEventListener("keydown", (e) => {
|
|
134
|
+
$.current && e.key === "Escape" && e.stopPropagation();
|
|
135
|
+
});
|
|
136
|
+
}, []);
|
|
137
|
+
function Be(e, t) {
|
|
138
|
+
z(t), O?.(t), k && B.search(t);
|
|
139
|
+
let n = D || k ? void 0 : Ne(t);
|
|
140
|
+
n && requestAnimationFrame(() => e.setHighlightValue(n.key));
|
|
141
|
+
}
|
|
142
|
+
return /* @__PURE__ */ _(v.Root, {
|
|
143
|
+
className: N.base({ class: ke }),
|
|
144
|
+
style: Ae,
|
|
145
|
+
collection: Ie,
|
|
146
|
+
value: K,
|
|
147
|
+
onValueChange: (e) => Pe(e.value, e.items),
|
|
148
|
+
open: Te,
|
|
149
|
+
onOpenChange: (e) => {
|
|
150
|
+
Ee?.(e.open), e.open && B.open(), !e.open && R && (z(""), O?.(""), k && B.search(""));
|
|
151
|
+
},
|
|
152
|
+
disabled: se,
|
|
153
|
+
invalid: ce,
|
|
154
|
+
required: le,
|
|
155
|
+
name: ue,
|
|
156
|
+
...o(Oe, "trigger", {
|
|
157
|
+
label: P?.ids.label,
|
|
158
|
+
hiddenSelect: P?.ids.control
|
|
159
|
+
}, we),
|
|
160
|
+
positioning: {
|
|
161
|
+
sameWidth: !0,
|
|
162
|
+
gutter: 4
|
|
163
|
+
},
|
|
164
|
+
composite: !E,
|
|
165
|
+
lazyMount: !0,
|
|
166
|
+
unmountOnExit: !0,
|
|
167
|
+
children: [
|
|
168
|
+
/* @__PURE__ */ _(v.Control, {
|
|
169
|
+
...w ? { className: N.control() } : {},
|
|
170
|
+
children: [/* @__PURE__ */ _(v.Trigger, {
|
|
171
|
+
...M,
|
|
172
|
+
className: N.trigger(),
|
|
173
|
+
"aria-busy": T || void 0,
|
|
174
|
+
onKeyDown: Re,
|
|
175
|
+
children: [/* @__PURE__ */ g("span", {
|
|
176
|
+
className: N.value(),
|
|
177
|
+
children: j && Y ? j(Y.item) : /* @__PURE__ */ _(h, { children: [Z && /* @__PURE__ */ g(Z, {
|
|
178
|
+
className: N.icon(),
|
|
179
|
+
"aria-hidden": "true"
|
|
180
|
+
}), /* @__PURE__ */ g(v.ValueText, {
|
|
181
|
+
placeholder: oe ?? F.common.placeholder,
|
|
182
|
+
children: Y?.label || void 0
|
|
183
|
+
})] })
|
|
184
|
+
}), /* @__PURE__ */ g(v.Indicator, {
|
|
185
|
+
className: N.indicator(),
|
|
186
|
+
children: T ? /* @__PURE__ */ g(u, {
|
|
187
|
+
className: N.spinner(),
|
|
188
|
+
"aria-hidden": "true"
|
|
189
|
+
}) : /* @__PURE__ */ g(l, {
|
|
190
|
+
className: N.indicatorIcon(),
|
|
191
|
+
"aria-hidden": "true"
|
|
192
|
+
})
|
|
193
|
+
})]
|
|
194
|
+
}), w && /* @__PURE__ */ g(v.Context, { children: (e) => Y && !e.disabled && /* @__PURE__ */ g("button", {
|
|
195
|
+
type: "button",
|
|
196
|
+
tabIndex: -1,
|
|
197
|
+
className: N.clear(),
|
|
198
|
+
"aria-label": I.clear,
|
|
199
|
+
onClick: () => {
|
|
200
|
+
q([]), e.focus();
|
|
201
|
+
},
|
|
202
|
+
children: /* @__PURE__ */ g(d, {
|
|
203
|
+
className: N.clearIcon(),
|
|
204
|
+
"aria-hidden": "true"
|
|
205
|
+
})
|
|
206
|
+
}) })]
|
|
207
|
+
}),
|
|
208
|
+
/* @__PURE__ */ g(re, { children: /* @__PURE__ */ g(v.Positioner, { children: /* @__PURE__ */ g(v.Content, {
|
|
209
|
+
className: N.content(),
|
|
210
|
+
"aria-busy": J || void 0,
|
|
211
|
+
"aria-label": E ? M["aria-label"] : void 0,
|
|
212
|
+
ref: ze,
|
|
213
|
+
onKeyDown: (e) => {
|
|
214
|
+
A && (e.key === "Enter" || e.key === "Tab") && e.stopPropagation();
|
|
215
|
+
},
|
|
216
|
+
children: E ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("div", {
|
|
217
|
+
className: N.header(),
|
|
218
|
+
children: /* @__PURE__ */ g(v.Context, { children: (e) => /* @__PURE__ */ g("input", {
|
|
219
|
+
type: "text",
|
|
220
|
+
role: "combobox",
|
|
221
|
+
autoComplete: "off",
|
|
222
|
+
"aria-autocomplete": "list",
|
|
223
|
+
"aria-expanded": "true",
|
|
224
|
+
"data-autofocus": "",
|
|
225
|
+
"aria-controls": X,
|
|
226
|
+
"aria-activedescendant": e.highlightedItem ? e.getItemProps({ item: e.highlightedItem }).id : void 0,
|
|
227
|
+
"aria-label": I.filter,
|
|
228
|
+
placeholder: F.combobox.search,
|
|
229
|
+
value: R,
|
|
230
|
+
className: N.search(),
|
|
231
|
+
onChange: (t) => Be(e, t.target.value),
|
|
232
|
+
onKeyDown: (e) => {
|
|
233
|
+
[
|
|
234
|
+
" ",
|
|
235
|
+
"Home",
|
|
236
|
+
"End"
|
|
237
|
+
].includes(e.key) && e.stopPropagation();
|
|
238
|
+
}
|
|
239
|
+
}) })
|
|
240
|
+
}), /* @__PURE__ */ g(v.List, {
|
|
241
|
+
id: X,
|
|
242
|
+
className: N.list(),
|
|
243
|
+
children: Q
|
|
244
|
+
})] }) : Q
|
|
245
|
+
}) }) }),
|
|
246
|
+
/* @__PURE__ */ g(v.HiddenSelect, {}),
|
|
247
|
+
k && /* @__PURE__ */ g("span", {
|
|
248
|
+
role: "status",
|
|
249
|
+
className: N.status(),
|
|
250
|
+
children: B.announcement
|
|
251
|
+
})
|
|
252
|
+
]
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
//#endregion
|
|
256
|
+
export { b as n, x as t };
|
|
@@ -16,9 +16,11 @@ export interface AlertProps extends Omit<ComponentProps<'div'>, 'title'> {
|
|
|
16
16
|
*/
|
|
17
17
|
duration?: number;
|
|
18
18
|
onDismiss?: () => void;
|
|
19
|
+
/** Buttons in the message, e.g. "Unlock" or "Reconnect" – beside the text, below it when there is little room */
|
|
20
|
+
actions?: ReactNode;
|
|
19
21
|
/** Extra classes per part of the component, e.g. { base: "…" } (see the recipe) */
|
|
20
22
|
classes?: RecipeClasses<typeof alertRecipe>;
|
|
21
23
|
}
|
|
22
24
|
/** Message box with status colour, icon, title and text; role="alert" for errors and warnings, optionally dismissible */
|
|
23
|
-
export declare function Alert({ classes, status, variant, size, title, dismissible, dismissLabel, duration, onDismiss, className, children, onMouseEnter, onMouseLeave, onFocus, onBlur, ...props }: AlertProps): import("react").JSX.Element;
|
|
25
|
+
export declare function Alert({ classes, status, variant, size, title, dismissible, dismissLabel, duration, onDismiss, actions, className, children, onMouseEnter, onMouseLeave, onFocus, onBlur, ...props }: AlertProps): import("react").JSX.Element;
|
|
24
26
|
//# sourceMappingURL=Alert.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../src/components/Alert/Alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,IAAI,WAAW,EAEpB,KAAK,WAAW,EAChB,KAAK,YAAY,EAEjB,KAAK,aAAa,EACrB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAqB,KAAK,cAAc,EAAmB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIhG,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACpE,MAAM,CAAC,E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ClD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,0CAA0C;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,iHAAiH;IACjH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,mFAAmF;IACnF,OAAO,CAAC,EAAE,aAAa,CAAC,OAAO,WAAW,CAAC,CAAC;CAC/C;AAID,yHAAyH;AACzH,wBAAgB,KAAK,CAAC,EAClB,OAAO,EACP,MAAe,EACf,OAAO,EACP,IAAI,EACJ,KAAK,EACL,WAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,OAAO,EACP,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,MAAM,EACN,GAAG,KAAK,EACX,EAAE,UAAU,+BA+EZ"}
|
|
@@ -4,6 +4,8 @@ import type { IconComponent } from '../../types.js';
|
|
|
4
4
|
export interface AvatarProps extends Omit<ComponentProps<'div'>, 'children'> {
|
|
5
5
|
/** Person or organisation – accessible name of the avatar and source of the initials */
|
|
6
6
|
name?: string;
|
|
7
|
+
/** Own initials instead of the ones taken from `name`, e.g. "MS" for "my-server" */
|
|
8
|
+
initials?: string;
|
|
7
9
|
/** Image URL; initials (or the icon) are shown while it loads or if it fails */
|
|
8
10
|
src?: string;
|
|
9
11
|
/** Icon shown when there is neither an image nor a name (default: user icon) */
|
|
@@ -23,5 +25,5 @@ export interface AvatarProps extends Omit<ComponentProps<'div'>, 'children'> {
|
|
|
23
25
|
as?: 'div' | 'button';
|
|
24
26
|
}
|
|
25
27
|
/** Image, initials or icon of a person or organisation; `as="button"` makes it a trigger, e.g. of a user menu */
|
|
26
|
-
export declare function Avatar({ classes, name, src, icon: Icon, variant, size, shape, color, as: Tag, className, ...props }: AvatarProps): import("react").JSX.Element;
|
|
28
|
+
export declare function Avatar({ classes, name, initials: ownInitials, src, icon: Icon, variant, size, shape, color, as: Tag, className, ...props }: AvatarProps): import("react").JSX.Element;
|
|
27
29
|
//# sourceMappingURL=Avatar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.tsx"],"names":[],"mappings":"AACA,OAAO,EACH,MAAM,IAAI,YAAY,EAGtB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,aAAa,EACrB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAIpD,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IACxE,wFAAwF;IACxF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gFAAgF;IAChF,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,0DAA0D;IAC1D,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;IAC7B,mFAAmF;IACnF,OAAO,CAAC,EAAE,aAAa,CAAC,OAAO,YAAY,CAAC,CAAC;IAC7C,2GAA2G;IAC3G,EAAE,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;CACzB;AAED,iHAAiH;AACjH,wBAAgB,MAAM,CAAC,EACnB,OAAO,EACP,IAAI,EACJ,GAAG,EACH,IAAI,EAAE,IAAW,EACjB,OAAO,EACP,IAAI,EACJ,KAAK,EACL,KAAK,EACL,EAAE,EAAE,GAAW,EACf,SAAS,EACT,GAA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X,EAAE,WAAW,+BA+Cb"}
|
|
@@ -16,6 +16,8 @@ export interface CardProps extends Omit<ComponentProps<'div'>, 'title'> {
|
|
|
16
16
|
titleTag?: 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p';
|
|
17
17
|
/** `horizontal`: media at the start, the content beside it */
|
|
18
18
|
orientation?: 'vertical' | 'horizontal';
|
|
19
|
+
/** `sm`: smaller radius, padding and title, e.g. for cards in a list inside a dialog */
|
|
20
|
+
size?: 'sm' | 'md';
|
|
19
21
|
/** Image or video above the content (beside it when horizontal) */
|
|
20
22
|
media?: ReactNode;
|
|
21
23
|
/** Extra content in the header, after the title (e.g. a badge or a menu) */
|
|
@@ -26,5 +28,5 @@ export interface CardProps extends Omit<ComponentProps<'div'>, 'title'> {
|
|
|
26
28
|
classes?: RecipeClasses<typeof cardRecipe> & RecipeClasses<typeof cardPartsRecipe>;
|
|
27
29
|
}
|
|
28
30
|
/** Surface for grouped content, optionally with title, media and footer; interactive cards with asChild */
|
|
29
|
-
export declare function Card({ classes, interactive, asChild, title, subtitle, titleTag: TitleTag, orientation, media, header, footer, className, children, ...props }: CardProps): import("react").JSX.Element;
|
|
31
|
+
export declare function Card({ classes, interactive, asChild, title, subtitle, titleTag: TitleTag, orientation, size, media, header, footer, className, children, ...props }: CardProps): import("react").JSX.Element;
|
|
30
32
|
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/Card/Card.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,SAAS,IAAI,eAAe,EAAE,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACnH,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACnE;;;OAG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IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,8GAA8G;IAC9G,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0BAA0B;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,GAAG,CAAC;IAClD,8DAA8D;IAC9D,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACxC,wFAAwF;IACxF,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,mEAAmE;IACnE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,4EAA4E;IAC5E,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,qCAAqC;IACrC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,mHAAmH;IACnH,OAAO,CAAC,EAAE,aAAa,CAAC,OAAO,UAAU,CAAC,GAAG,aAAa,CAAC,OAAO,eAAe,CAAC,CAAC;CACtF;AAED,2GAA2G;AAC3G,wBAAgB,IAAI,CAAC,EACjB,OAAO,EACP,WAAmB,EACnB,OAAe,EACf,KAAK,EACL,QAAQ,EACR,QAAQ,EAAE,QAAe,EACzB,WAAwB,EACxB,IAAI,EACJ,KAAK,EACL,MAAM,EACN,MAAM,EACN,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACX,EAAE,SAAS,+BAmCX"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { checkbox as checkboxRecipe, type RecipeClasses } from '@wirecore/wirelayer-recipes';
|
|
2
2
|
import type { ComponentProps, ReactNode } from 'react';
|
|
3
3
|
export type CheckedState = boolean | 'indeterminate';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
/**
|
|
5
|
+
* `C`: the state type – inferred from `checked`/`defaultChecked`, so a boolean `checked` gets booleans back in
|
|
6
|
+
* onCheckedChange (the indeterminate state only comes from `checked`)
|
|
7
|
+
*/
|
|
8
|
+
export interface CheckboxProps<C extends CheckedState = CheckedState> extends Omit<ComponentProps<'input'>, 'checked' | 'defaultChecked' | 'value' | 'type'> {
|
|
9
|
+
checked?: C;
|
|
10
|
+
defaultChecked?: C;
|
|
11
|
+
onCheckedChange?: (checked: C) => void;
|
|
8
12
|
invalid?: boolean;
|
|
9
13
|
value?: string;
|
|
10
14
|
children?: ReactNode;
|
|
@@ -12,5 +16,5 @@ export interface CheckboxProps extends Omit<ComponentProps<'input'>, 'checked' |
|
|
|
12
16
|
classes?: RecipeClasses<typeof checkboxRecipe>;
|
|
13
17
|
}
|
|
14
18
|
/** Checkbox with label (also indeterminate), works inside Field */
|
|
15
|
-
export declare function Checkbox({ classes, checked, defaultChecked, onCheckedChange, disabled, invalid, required, name, value, id, className, style, children, ...props }: CheckboxProps): import("react").JSX.Element;
|
|
19
|
+
export declare function Checkbox<C extends CheckedState = CheckedState>({ classes, checked, defaultChecked, onCheckedChange, disabled, invalid, required, name, value, id, className, style, children, ...props }: CheckboxProps<C>): import("react").JSX.Element;
|
|
16
20
|
//# sourceMappingURL=Checkbox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,QAAQ,IAAI,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEzG,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,eAAe,CAAC;AAErD,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,QAAQ,IAAI,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEzG,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,eAAe,CAAC;AAErD;;;GAGG;AACH,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,CAAE,SAAQ,IAAI,CAC9E,cAAc,CAAC,OAAO,CAAC,EACvB,SAAS,GAAG,gBAAgB,GAAG,OAAO,GAAG,MAAM,CAClD;IACG,OAAO,CAAC,EAAE,CAAC,CAAC;IACZ,cAAc,CAAC,EAAE,CAAC,CAAC;IACnB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,mFAAmF;IACnF,OAAO,CAAC,EAAE,aAAa,CAAC,OAAO,cAAc,CAAC,CAAC;CAClD;AAED,mEAAmE;AACnE,wBAAgB,QAAQ,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,EAAE,EAC5D,OAAO,EACP,OAAO,EACP,cAAc,EACd,eAAe,EACf,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,EAAE,EACF,SAAS,EACT,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACX,EAAE,aAAa,CAAC,CAAC,CAAC,+BA+BlB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { inlineCode as inlineCodeRecipe, type RecipeClasses } from '@wirecore/wirelayer-recipes';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
export interface CodeProps extends ComponentProps<'code'> {
|
|
4
|
+
/** The code (one line) – or pass it as the content */
|
|
5
|
+
code?: string;
|
|
6
|
+
/** Extra classes of the recipe (see the recipe inlineCode) */
|
|
7
|
+
classes?: RecipeClasses<typeof inlineCodeRecipe>;
|
|
8
|
+
}
|
|
9
|
+
/** Code inside a sentence, without syntax colours: the look of InlineCode (/code) without shiki */
|
|
10
|
+
export declare function Code({ code, classes, className, children, ...props }: CodeProps): import("react").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=Code.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Code.d.ts","sourceRoot":"","sources":["../../../src/components/Code/Code.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,MAAM,CAAC;IACrD,sDAAsD;IACtD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,OAAO,CAAC,EAAE,aAAa,CAAC,OAAO,gBAAgB,CAAC,CAAC;CACpD;AAED,mGAAmG;AACnG,wBAAgB,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,+BAO/E"}
|
|
@@ -63,11 +63,20 @@ export interface ComboboxProps<T = SelectItem, V = ItemValueOf<T>> extends Omit<
|
|
|
63
63
|
minSearchLength?: number;
|
|
64
64
|
/** Options per request of the data source (default 50) */
|
|
65
65
|
pageSize?: number;
|
|
66
|
+
/** Whether the list is open (controlled, with onOpenChange) */
|
|
67
|
+
open?: boolean;
|
|
68
|
+
/** The list opened or closed */
|
|
69
|
+
onOpenChange?: (open: boolean) => void;
|
|
70
|
+
/**
|
|
71
|
+
* Keeps the keys the open list handles itself (Enter choosing, Escape closing, Tab leaving) from bubbling up – e.g.
|
|
72
|
+
* in a dialog with window shortcuts for Enter (save) and Escape (cancel)
|
|
73
|
+
*/
|
|
74
|
+
stopKeyPropagation?: boolean;
|
|
66
75
|
/** Content of an option (instead of icon and label) */
|
|
67
76
|
renderItem?: (item: T, state: ListItemState) => ReactNode;
|
|
68
77
|
/** Extra classes per part of the component, e.g. { base: "…" } (see the recipe) */
|
|
69
78
|
classes?: RecipeClasses<typeof comboboxRecipe>;
|
|
70
79
|
}
|
|
71
80
|
/** Text field with suggestions (autocomplete): type to filter, arrow keys to choose, Enter to take */
|
|
72
|
-
export declare function Combobox<T = SelectItem, V = ItemValueOf<T>>({ classes, items, value, defaultValue, onValueChange, onInputValueChange, onFilterChange, filter, manualFilter, allowCustomValue, emptyText, placeholder, disabled, readOnly, invalid, required, name, itemValue, itemLabel, itemDisabled, itemGroup, itemKeywords, valueKey, clearable, loading, loadingText, size, hasMore, onLoadMore, dataSource, minSearchLength, pageSize, renderItem, id, className, style, onBlur, onKeyDown, ...props }: ComboboxProps<T, V>): import("react").JSX.Element;
|
|
81
|
+
export declare function Combobox<T = SelectItem, V = ItemValueOf<T>>({ classes, items, value, defaultValue, onValueChange, onInputValueChange, onFilterChange, filter, manualFilter, allowCustomValue, emptyText, placeholder, disabled, readOnly, invalid, required, name, itemValue, itemLabel, itemDisabled, itemGroup, itemKeywords, valueKey, clearable, loading, loadingText, size, hasMore, onLoadMore, dataSource, minSearchLength, pageSize, open, onOpenChange, stopKeyPropagation, renderItem, id, className, style, onBlur, onKeyDown, ...props }: ComboboxProps<T, V>): import("react").JSX.Element;
|
|
73
82
|
//# sourceMappingURL=Combobox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/Combobox.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEH,QAAQ,IAAI,cAAc,EAC1B,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,WAAW,EAEhB,KAAK,aAAa,EACrB,MAAM,6BAA6B,CAAC;AAErC,OAAO,
|
|
1
|
+
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","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AAO,KAAK,IAAI,CAAC;IACvC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,uDAAuD;IACvD,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,aAAa,KAAK,SAAS,CAAC;IAC1D,mFAAmF;IACnF,OAAO,CAAC,EAAE,aAAa,CAAC,OAAO,cAAc,CAAC,CAAC;CAClD;AAED,sGAAsG;AACtG,wBAAgB,QAAQ,CAAC,CAAC,GAAG,UAAU,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,EACzD,OAAO,EACP,KAAK,EACL,KAAK,EACL,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,MAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,SAAS,EACT,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,SAAgB,EAChB,OAAO,EACP,WAAW,EACX,IAAI,EACJ,OAAO,EACP,UAAU,EACV,UAAU,EACV,eAAe,EACf,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,kBAA0B,EAC1B,UAAU,EACV,EAAE,EACF,SAAS,EACT,KAAK,EACL,MAAM,EACN,SAAS,EACT,GAAG,KAAK,EACX,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,+BAmLrB"}
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
import { menu as menuRecipe, type OverlayHandle, type RecipeClasses } from '@wirecore/wirelayer-recipes';
|
|
1
|
+
import { menu as menuRecipe, type ContextMenuOpenDetails, type OverlayHandle, type RecipeClasses } from '@wirecore/wirelayer-recipes';
|
|
2
2
|
import { type ReactElement, type Ref } from 'react';
|
|
3
|
-
import { type MenuEntry, type MenuItemOptions } from '../Menu/Menu.js';
|
|
4
|
-
export interface ContextMenuProps extends MenuItemOptions {
|
|
3
|
+
import { type MenuBehaviorOptions, type MenuEntry, type MenuItemOptions } from '../Menu/Menu.js';
|
|
4
|
+
export interface ContextMenuProps extends MenuItemOptions, MenuBehaviorOptions {
|
|
5
5
|
/** Items, groups, separators, checkbox items, radio groups and submenus – as in Menu */
|
|
6
6
|
items: readonly MenuEntry[];
|
|
7
7
|
/** Accessible name of the menu – without it the menu is named by the area's content */
|
|
8
8
|
label?: string;
|
|
9
|
+
/** Whether the menu is open (controlled, with onOpenChange) */
|
|
10
|
+
open?: boolean;
|
|
11
|
+
/** The menu opened or closed – e.g. to pause list shortcuts while it is open */
|
|
12
|
+
onOpenChange?: (open: boolean) => void;
|
|
13
|
+
/**
|
|
14
|
+
* A right click, long press or the menu key is opening the menu, on this element (e.g. the row under the pointer –
|
|
15
|
+
* select it before the menu shows); `details.source` tells pointer from keyboard, with the keyboard
|
|
16
|
+
* `details.focused` is the focused element (e.g. the row with the focus)
|
|
17
|
+
*/
|
|
18
|
+
onBeforeOpen?: (target: Element, details: ContextMenuOpenDetails) => void;
|
|
9
19
|
/** open(anchor), close(), toggle(anchor) – e.g. open(event) from your own handler */
|
|
10
20
|
ref?: Ref<OverlayHandle>;
|
|
11
21
|
/** The area that opens the menu */
|
|
@@ -17,5 +27,5 @@ export interface ContextMenuProps extends MenuItemOptions {
|
|
|
17
27
|
* Opens at the pointer on right click, on touch screens with a long press (and with Shift+F10 or the menu key on the
|
|
18
28
|
* focused area). The actions should also be reachable another way.
|
|
19
29
|
*/
|
|
20
|
-
export declare function ContextMenu({ classes, items, label, onSelect, onCheckedChange, onValueChange, linkAs, renderItem, ref, children, }: ContextMenuProps): import("react").JSX.Element;
|
|
30
|
+
export declare function ContextMenu({ classes, items, label, onSelect, onCheckedChange, onValueChange, linkAs, renderItem, open, onOpenChange, onBeforeOpen, closeOnScroll, closeOnResize, closeOnBlur, highlightFirst, ref, children, }: ContextMenuProps): import("react").JSX.Element;
|
|
21
31
|
//# sourceMappingURL=ContextMenu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../src/components/ContextMenu/ContextMenu.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../src/components/ContextMenu/ContextMenu.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGH,IAAI,IAAI,UAAU,EAClB,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAClB,KAAK,aAAa,EACrB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAA+B,KAAK,YAAY,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AACjF,OAAO,EAIH,KAAK,mBAAmB,EACxB,KAAK,SAAS,EACd,KAAK,eAAe,EACvB,MAAM,iBAAiB,CAAC;AAIzB,MAAM,WAAW,gBAAiB,SAAQ,eAAe,EAAE,mBAAmB;IAC1E,wFAAwF;IACxF,KAAK,EAAE,SAAS,SAAS,EAAE,CAAC;IAC5B,uFAAuF;IACvF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+DAA+D;IAC/D,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,gFAAgF;IAChF,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;;;OAIG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,sBAAsB,KAAK,IAAI,CAAC;IAC1E,qFAAqF;IACrF,GAAG,CAAC,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC;IACzB,mCAAmC;IACnC,QAAQ,EAAE,YAAY,CAAC;IACvB,mFAAmF;IACnF,OAAO,CAAC,EAAE,aAAa,CAAC,OAAO,UAAU,CAAC,CAAC;CAC9C;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EACxB,OAAO,EACP,KAAK,EACL,KAAK,EACL,QAAQ,EACR,eAAe,EACf,aAAa,EACb,MAAM,EACN,UAAU,EACV,IAAI,EACJ,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,aAAa,EACb,WAAW,EACX,cAAc,EACd,GAAG,EACH,QAAQ,GACX,EAAE,gBAAgB,+BAwElB"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { dialog as dialogRecipe, type DialogPosition, type DialogStatus, type OverlaySize, type RecipeClasses } from '@wirecore/wirelayer-recipes';
|
|
2
|
-
import { type ComponentProps, type ReactElement, type ReactNode } from 'react';
|
|
2
|
+
import { type ComponentProps, type ReactElement, type ReactNode, type RefObject } from 'react';
|
|
3
3
|
import type { IconComponent } from '../../types.js';
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Settings of the surrounding Dialog/Drawer that its content needs (no backdrop when non-modal); the Dialog's initial
|
|
6
|
+
* focus looks for `data-autoselect` in `contentRef`
|
|
7
|
+
*/
|
|
5
8
|
export declare const DialogRootContext: import("react").Context<{
|
|
6
9
|
modal: boolean;
|
|
10
|
+
contentRef?: RefObject<HTMLElement | null>;
|
|
7
11
|
}>;
|
|
8
12
|
export interface DialogProps {
|
|
9
13
|
open?: boolean;
|
|
@@ -36,6 +40,11 @@ export interface DialogContentProps extends Omit<ComponentProps<'div'>, 'title'>
|
|
|
36
40
|
title: string;
|
|
37
41
|
/** The title only for screen readers – it still names the dialog (e.g. a video in a dialog) */
|
|
38
42
|
hideTitle?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* `body` (default): the title below the header row; `header`: in the row of the close button, after a smaller
|
|
45
|
+
* icon, the header separated by a line (as on the Drawer)
|
|
46
|
+
*/
|
|
47
|
+
titlePosition?: 'body' | 'header';
|
|
39
48
|
description?: string;
|
|
40
49
|
/** Icon component in the coloured box at the top */
|
|
41
50
|
icon?: IconComponent;
|
|
@@ -77,5 +86,5 @@ export interface DialogContentProps extends Omit<ComponentProps<'div'>, 'title'>
|
|
|
77
86
|
classes?: RecipeClasses<typeof dialogRecipe>;
|
|
78
87
|
}
|
|
79
88
|
/** The modal window of a Dialog: title, description, focus trap, Escape closes */
|
|
80
|
-
export declare function DialogContent({ classes, title, hideTitle, description, icon: Icon, status, size, position, fullscreen, maximizable, maximized, defaultMaximized, onMaximizedChange, draggable, closable, scrollBehavior, responsive, closeLabel, maximizeLabel, restoreLabel, footer, portalTarget, className, style, onKeyDown, children, ...props }: DialogContentProps): import("react").JSX.Element;
|
|
89
|
+
export declare function DialogContent({ classes, title, hideTitle, titlePosition, description, icon: Icon, status, size, position, fullscreen, maximizable, maximized, defaultMaximized, onMaximizedChange, draggable, closable, scrollBehavior, responsive, closeLabel, maximizeLabel, restoreLabel, footer, portalTarget, className, style, onKeyDown, children, ref, ...props }: DialogContentProps): import("react").JSX.Element;
|
|
81
90
|
//# sourceMappingURL=Dialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGH,MAAM,IAAI,YAAY,EAGtB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,aAAa,EACrB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAKH,KAAK,cAAc,EAGnB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,SAAS,EACjB,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAIpD;;;GAGG;AACH,eAAO,MAAM,iBAAiB;WAA0B,OAAO;iBAAe,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC;EAEzG,CAAC;AAEH,MAAM,WAAW,WAAW;IACxB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,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
19
19
|
prefix?: string;
|
|
20
20
|
/** Static text segment after the input, e.g. `.de` */
|
|
21
21
|
suffix?: string;
|
|
22
|
+
/** Monospace font of the theme (JetBrains Mono) – for paths, tokens, codes, URLs and keys */
|
|
23
|
+
mono?: boolean;
|
|
22
24
|
/** Extra classes per part of the component, e.g. { base: "…" } (see the recipe) */
|
|
23
25
|
classes?: RecipeClasses<typeof inputRecipe>;
|
|
24
26
|
}
|
|
25
|
-
/**
|
|
26
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Text field with sizes, leading icon, prefix and suffix; works inside Field. `ref` reaches the native input (focus,
|
|
29
|
+
* select, setSelectionRange)
|
|
30
|
+
*/
|
|
31
|
+
export declare function Input({ classes, size, invalid, success, loading, clearable, clearLabel, disabled, leadingIcon: LeadingIcon, prefix, suffix, mono, className, style, onChange, ...props }: InputProps): import("react").JSX.Element;
|
|
27
32
|
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,WAAW,EAAuB,KAAK,IAAI,EAAE,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEvH,OAAO,EAA2B,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAMpD,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAChF,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,2EAA2E;IAC3E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gGAAgG;IAChG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gGAAgG;IAChG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iEAAiE;IACjE,SAAS,CAAC,EAAE,OAAO,CAA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C,OAAO,WAAW,CAAC,CAAC;CAC/C;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,EAClB,OAAO,EACP,IAAI,EACJ,OAAe,EACf,OAAe,EACf,OAAe,EACf,SAAiB,EACjB,UAAU,EACV,QAAgB,EAChB,WAAW,EAAE,WAAW,EACxB,MAAM,EACN,MAAM,EACN,IAAY,EACZ,SAAS,EACT,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACX,EAAE,UAAU,+BAuFZ"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type LinkTo, menu as menuRecipe, type OverlayHandle, type RecipeClasses } from '@wirecore/wirelayer-recipes';
|
|
2
|
-
import { type ElementType, type ReactElement, type ReactNode, type Ref } from 'react';
|
|
2
|
+
import { type ElementType, type ReactElement, type ReactNode, type Ref, type RefObject } from 'react';
|
|
3
3
|
import type { IconComponent } from '../../types.js';
|
|
4
4
|
import { type AnchorProp } from '../../overlay.js';
|
|
5
5
|
import type { PopoverPlacement } from '../Popover/Popover.js';
|
|
@@ -102,7 +102,31 @@ export interface MenuItemOptions {
|
|
|
102
102
|
/** Own content of an item (instead of icon, label and shortcut) */
|
|
103
103
|
renderItem?: MenuItemRenderer;
|
|
104
104
|
}
|
|
105
|
-
|
|
105
|
+
/** Opt-in behaviour of an open menu (Menu, ContextMenu) */
|
|
106
|
+
export interface MenuBehaviorOptions {
|
|
107
|
+
/** Closes when the page (or a container) scrolls – e.g. for a menu opened at a point */
|
|
108
|
+
closeOnScroll?: boolean;
|
|
109
|
+
/** Closes when the window is resized */
|
|
110
|
+
closeOnResize?: boolean;
|
|
111
|
+
/** Closes when the window loses the focus (switching to another window) */
|
|
112
|
+
closeOnBlur?: boolean;
|
|
113
|
+
/** Highlights the first item also when the menu opens by pointer, so Enter takes it (as in desktop menus) */
|
|
114
|
+
highlightFirst?: boolean;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Closing an open menu when the page scrolls, the window is resized or loses the focus, and highlighting the first item
|
|
118
|
+
* when it opens. Returns Ark's root props for the highlight – controlled only with `highlightFirst`.
|
|
119
|
+
*/
|
|
120
|
+
export declare function useMenuBehavior(open: boolean, close: () => void, content: RefObject<HTMLElement | null>, { closeOnScroll, closeOnResize, closeOnBlur, highlightFirst }: MenuBehaviorOptions): {
|
|
121
|
+
highlightedValue: string | null;
|
|
122
|
+
onHighlightChange: (details: {
|
|
123
|
+
highlightedValue: string | null;
|
|
124
|
+
}) => void;
|
|
125
|
+
} | {
|
|
126
|
+
highlightedValue?: undefined;
|
|
127
|
+
onHighlightChange?: undefined;
|
|
128
|
+
};
|
|
129
|
+
export interface MenuProps extends MenuItemOptions, MenuBehaviorOptions {
|
|
106
130
|
/**
|
|
107
131
|
* Items, groups ({ type: 'group' }), separators ({ type: 'separator' }), checkbox items ({ type: 'checkbox' }) and
|
|
108
132
|
* radio groups ({ type: 'radio' }); items with children open a submenu, items with href or to are links
|
|
@@ -128,7 +152,7 @@ export interface MenuProps extends MenuItemOptions {
|
|
|
128
152
|
/** Extra classes per part of the component, e.g. { base: "…" } (see the recipe) */
|
|
129
153
|
classes?: RecipeClasses<typeof menuRecipe>;
|
|
130
154
|
}
|
|
131
|
-
export declare function Menu({ classes, items, onSelect, onCheckedChange, onValueChange, linkAs, renderItem, open, defaultOpen, onOpenChange, anchor, searchable, searchLabel, placement, arrow, ref, children, }: MenuProps): import("react").JSX.Element;
|
|
155
|
+
export declare function Menu({ classes, items, onSelect, onCheckedChange, onValueChange, linkAs, renderItem, open, defaultOpen, onOpenChange, anchor, searchable, searchLabel, placement, arrow, closeOnScroll, closeOnResize, closeOnBlur, highlightFirst, ref, children, }: MenuProps): import("react").JSX.Element;
|
|
132
156
|
/**
|
|
133
157
|
* Items, groups with a heading, checkbox and radio items, separators and submenus (recursive) – shared by Menu,
|
|
134
158
|
* ContextMenu, Menubar
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/Menu.tsx"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/Menu.tsx"],"names":[],"mappings":"AAGA,OAAO,EAKH,KAAK,MAAM,EACX,IAAI,IAAI,UAAU,EAElB,KAAK,aAAa,EAClB,KAAK,aAAa,EAErB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAOH,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,GAAG,EACR,KAAK,SAAS,EACjB,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD,OAAO,EAAsB,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,MAAM,WAAW,QAAQ;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sDAAsD;IACtD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wFAAwF;IACxF,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC;IACvB,+FAA+F;IAC/F,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mHAAmH;IACnH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,iDAAiD;IACjD,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,iEAAiE;AACjE,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,aA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