@revolist/ui 4.0.4-rc → 4.0.5-rc
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/OWNERSHIP.md +1 -1
- package/README.md +16 -0
- package/_chunks/arrow-up-Cw8hW9vp.js +4 -0
- package/_chunks/badge.view-D30pMUfi.js +14 -0
- package/_chunks/calculator-CDWOuAcp.js +4 -0
- package/_chunks/{calendar-xpZ0v3xf.js → calendar-DsXIhybL.js} +19 -19
- package/_chunks/chart-frame-CuZABXVI.js +141 -0
- package/_chunks/check-BwI7iCAm.js +4 -0
- package/_chunks/choice-chips-BhP8MZjs.js +126 -0
- package/_chunks/{color-palette-D8vyPfld.js → color-palette-DMJUChWC.js} +20 -22
- package/_chunks/color-picker-B4TQvxxB.js +143 -0
- package/_chunks/{component-C_T2VN5u.js → component-qKctqdzk.js} +281 -265
- package/_chunks/configurator-actions-C19O1rda.js +155 -0
- package/_chunks/configurator-field-icon-CmcM_sPs.js +53 -0
- package/_chunks/{control-AHKXD5Eu.js → control-BkWukVt9.js} +13 -13
- package/_chunks/{controls-DsNi8V8I.js → controls-BLQnWEd7.js} +147 -155
- package/_chunks/{date-control-DrVFX13g.js → date-control-Cgw5PwlZ.js} +1 -1
- package/_chunks/date-time-B8rK5gpC.js +784 -0
- package/_chunks/{dialog.parts-CKGkC5zP.js → dialog.parts-BSbvnEwX.js} +21 -21
- package/_chunks/{duration-CL68Em0o.js → duration-DwFXonEV.js} +1 -4
- package/_chunks/editor-popup-BaaxL89T.js +81 -0
- package/_chunks/field-configurator-1eQP0tKy.js +223 -0
- package/_chunks/icon-toolbar-xbqa0hu9.js +128 -0
- package/_chunks/magnifying-glass-CvrTDSkB.js +4 -0
- package/_chunks/minus-BOAR3A1C.js +4 -0
- package/_chunks/mount-D1i5DLRn.js +266 -0
- package/_chunks/native-control-DO0d1kgx.js +636 -0
- package/_chunks/{number-input-BKwA5FnM.js → number-input-s9ddPwX6.js} +7 -7
- package/_chunks/{picker-h1P5RUgp.js → picker-AY05b41W.js} +2 -2
- package/_chunks/plus-CbGRkIGl.js +4 -0
- package/_chunks/popover-controller-D-AvKQ7B.js +102 -0
- package/_chunks/{popup-CT2uD3go.js → popup-UXGCiv3n.js} +97 -97
- package/_chunks/{rating-choice-DZgmaic0.js → rating-choice-BEs_QFZC.js} +1 -1
- package/_chunks/{reorder-list-CSlqAGHw.js → reorder-list-A49l172e.js} +1 -1
- package/_chunks/request-trail-DCOfa5zw.js +753 -0
- package/_chunks/rich-text-xfMWadGi.js +842 -0
- package/_chunks/rotate-left-BF6G883o.js +4 -0
- package/_chunks/title-tooltip-Cw6LOZhb.js +11 -0
- package/_chunks/tooltip-D4xkio5G.js +54 -0
- package/_chunks/tooltip-owner-DjdvqKzz.js +19 -0
- package/_chunks/tooltip-session-B6X6x8G_.js +110 -0
- package/_chunks/tooltip-text-BXsUEmBH.js +12 -0
- package/_chunks/top-layer-popup-CNSDdfJV.js +59 -0
- package/ai/_chat.scss +28 -3
- package/ai/_style.scss +55 -2
- package/ai/chat.d.ts +3 -1
- package/ai/components.d.ts +13 -2
- package/ai/index.d.ts +1 -0
- package/ai/index.js +3 -3
- package/ai/mount.d.ts +17 -1
- package/ai/results/_style.scss +80 -0
- package/ai/results/index.d.ts +11 -0
- package/ai/results/metrics.d.ts +5 -0
- package/ai/results/table.d.ts +5 -0
- package/ai/results/text.d.ts +5 -0
- package/ai/results/types.d.ts +29 -0
- package/ai/transcript.d.ts +2 -0
- package/ai/translations.d.ts +1 -1
- package/assignee/index.js +2 -2
- package/avatar/index.js +32 -31
- package/badge.view.d.ts +8 -0
- package/brush-range/component.js +28 -27
- package/buttons/svg-button.d.ts +1 -1
- package/buttons/svg-button.js +16 -16
- package/calendar/_calendar.scss +2 -2
- package/calendar/calendar.js +1 -1
- package/calendar/index.js +2 -2
- package/choice-chips/index.d.ts +3 -1
- package/choice-chips/index.js +1 -1
- package/color-palette/color-palette.js +1 -1
- package/color-palette/color-palette.style.scss +1 -1
- package/color-palette/color-picker.js +2 -2
- package/component-catalog.d.ts +6 -1
- package/configurator-actions.d.ts +67 -0
- package/configurator-actions.js +1 -0
- package/configurator-aggregation-list.d.ts +14 -0
- package/configurator-aggregation-list.js +61 -0
- package/configurator-drop-zone.d.ts +38 -0
- package/configurator-drop-zone.js +64 -0
- package/configurator-field-icon.d.ts +10 -0
- package/configurator-field-icon.js +1 -0
- package/configurator-focus.d.ts +4 -0
- package/configurator-focus.js +39 -0
- package/configurator-sections.d.ts +42 -0
- package/configurator-sections.js +71 -0
- package/control-presentation.js +24 -19
- package/controls.d.ts +1 -2
- package/controls.js +4 -3
- package/core/editor-popup.js +1 -1
- package/core/popover-controller.d.ts +35 -0
- package/core/popup-ownership.d.ts +2 -0
- package/core/title-tooltip.d.ts +2 -0
- package/core/tooltip-session.d.ts +29 -0
- package/core/tooltip-surface.d.ts +13 -0
- package/core/tooltip-text.d.ts +6 -0
- package/core/tooltip.d.ts +35 -0
- package/core/top-layer-popup.d.ts +4 -0
- package/core/top-layer-popup.js +1 -23
- package/date-time/index.js +1 -1
- package/date-time/style.scss +50 -7
- package/date-time/time-selection.d.ts +3 -1
- package/dialog/dialog.dom.js +8 -8
- package/dialog/dialog.parts.js +1 -1
- package/distribution-chart/_distribution-chart.scss +1 -57
- package/distribution-chart/area-chart.js +1 -1
- package/distribution-chart/bar-chart.js +1 -1
- package/distribution-chart/line-chart.js +1 -1
- package/dropdown/content.js +1 -1
- package/dropdown/control.js +1 -1
- package/dropdown/index.js +2 -2
- package/dropdown/lookup-field.js +2 -1
- package/dropdown/popup.d.ts +2 -2
- package/dropdown/popup.js +1 -1
- package/duration/index.js +1 -1
- package/editor-actions.js +1 -1
- package/field-configurator.d.ts +19 -0
- package/field-configurator.js +4 -170
- package/field-expansion.d.ts +9 -0
- package/filter/filters/slider/_slider.scss +0 -17
- package/filter/filters/slider/control.js +2 -0
- package/filter/filters/slider/runtime.js +49 -22
- package/filter/filters/slider/single.js +1 -1
- package/filter-badge.js +1 -1
- package/filter-controls.js +1 -1
- package/form-controls/index.js +6 -6
- package/form-controls/presentation.js +12 -12
- package/formatting/control-tooltip.d.ts +2 -27
- package/formatting/index.js +22 -21
- package/formatting/styles.scss +2 -47
- package/framework.js +215 -208
- package/history-controls.js +27 -1
- package/icon-toolbar.d.ts +58 -0
- package/icon-toolbar.js +1 -0
- package/masked-input/index.js +1 -1
- package/native-control.d.ts +1 -2
- package/native-control.js +1 -1
- package/native-styles.css +1 -1
- package/native.js +45 -42
- package/number-input/index.js +1 -1
- package/package.json +36 -1
- package/pagination.js +1 -1
- package/pdf-viewer/index.js +1 -1
- package/pickers.d.ts +5 -1
- package/preact-mount.js +1 -1
- package/preact.d.ts +7 -0
- package/preact.js +68 -61
- package/rating-choice.js +1 -1
- package/react.d.ts +5 -0
- package/react.js +67 -65
- package/reorder-list.js +1 -1
- package/resource-picker/resource-picker-popup.js +1 -1
- package/resource-picker/resource-picker.js +4 -4
- package/rich-text/engine.d.ts +1 -0
- package/rich-text/format-html.d.ts +2 -0
- package/rich-text/index.d.ts +4 -0
- package/rich-text/index.js +1 -1
- package/rich-text/model.d.ts +2 -0
- package/rich-text/style.scss +165 -70
- package/rich-text/syntax.d.ts +5 -0
- package/rich-text/translations.d.ts +2 -0
- package/select.d.ts +3 -1
- package/select.js +1 -1
- package/status-feedback/exit-snapshot.js +4 -4
- package/status-feedback/popover.js +4 -4
- package/styles/_compositions.scss +3 -3
- package/styles/_field-configurator.scss +146 -0
- package/styles/_fields-grid.scss +35 -0
- package/styles/_primitives.scss +25 -18
- package/styles/configurator-actions.scss +141 -0
- package/styles/legacy-pagination.css +19 -2
- package/styles.css +1 -1
- package/surfaces.d.ts +3 -0
- package/surfaces.js +34 -131
- package/surfaces.view.d.ts +4 -34
- package/svelte.js +1 -1
- package/switch/index.js +15 -14
- package/time-grid.js +37 -36
- package/timeline-track/index.js +2 -2
- package/ui.css +1 -1
- package/vue.d.ts +24 -9
- package/vue.js +118 -116
- package/_chunks/chart-frame-Cmc7xU1i.js +0 -130
- package/_chunks/choice-chips-CHQTUdLs.js +0 -110
- package/_chunks/color-picker-CudqPYZo.js +0 -138
- package/_chunks/control-tooltip-uscKfAnV.js +0 -100
- package/_chunks/date-time-qIhp5vaX.js +0 -768
- package/_chunks/editor-popup-WDdtVDNA.js +0 -81
- package/_chunks/history-controls-B3u3INEK.js +0 -27
- package/_chunks/mount-DQ1cpppK.js +0 -257
- package/_chunks/native-control-C_yok8_-.js +0 -605
- package/_chunks/request-trail-DSlFix6i.js +0 -618
- package/_chunks/rich-text-CH7gIqOS.js +0 -636
|
@@ -0,0 +1,636 @@
|
|
|
1
|
+
import { c as e, i as t, u as n } from "./preact.module-BBM36DnO.js";
|
|
2
|
+
import { c as r, i, n as a, o, r as s, s as c, t as l } from "./hooks.module-CG3gN83z.js";
|
|
3
|
+
import { t as u } from "./jsxRuntime.module-F6UFnpT-.js";
|
|
4
|
+
import { renderPreactInto as d } from "../preact-mount.js";
|
|
5
|
+
import { i as f } from "./top-layer-popup-CNSDdfJV.js";
|
|
6
|
+
import { t as p } from "./title-tooltip-Cw6LOZhb.js";
|
|
7
|
+
import { t as m } from "./field-context-D57PnBbH.js";
|
|
8
|
+
import { r as h, t as g } from "./popup-UXGCiv3n.js";
|
|
9
|
+
import { useDropdownService as _ } from "../dropdown/dropdown.service.js";
|
|
10
|
+
import { RemoveButton as v } from "../buttons/remove-button.js";
|
|
11
|
+
import { t as y } from "./chevron-down-GbplLa6s.js";
|
|
12
|
+
import { registerControl as b, renderControl as x } from "../control-presentation.js";
|
|
13
|
+
//#region src/dropdown/remote.ts
|
|
14
|
+
var S = {
|
|
15
|
+
loading: "Loading…",
|
|
16
|
+
empty: "No results found",
|
|
17
|
+
error: "Unable to load options.",
|
|
18
|
+
retry: "Retry",
|
|
19
|
+
loadMore: "Load more",
|
|
20
|
+
unavailable: (e) => `Unavailable (${String(e)})`
|
|
21
|
+
}, C = class {
|
|
22
|
+
source;
|
|
23
|
+
context;
|
|
24
|
+
changed;
|
|
25
|
+
text;
|
|
26
|
+
settings;
|
|
27
|
+
cache = /* @__PURE__ */ new Map();
|
|
28
|
+
ids = [];
|
|
29
|
+
items = [];
|
|
30
|
+
query = "";
|
|
31
|
+
cursor;
|
|
32
|
+
seen = /* @__PURE__ */ new Set();
|
|
33
|
+
searchAbort;
|
|
34
|
+
resolveAbort;
|
|
35
|
+
timer;
|
|
36
|
+
generation = 0;
|
|
37
|
+
resolution = 0;
|
|
38
|
+
disposed = !1;
|
|
39
|
+
loading = !1;
|
|
40
|
+
searchFailed = !1;
|
|
41
|
+
failedCursor;
|
|
42
|
+
resolveFailed = !1;
|
|
43
|
+
opened = !1;
|
|
44
|
+
constructor(e, t, n, r = S, i = {}) {
|
|
45
|
+
this.source = e, this.context = t, this.changed = n, this.text = r, this.settings = i;
|
|
46
|
+
}
|
|
47
|
+
remember(e) {
|
|
48
|
+
for (let t of e) {
|
|
49
|
+
if (typeof t.value != "string" && (typeof t.value != "number" || !Number.isFinite(t.value))) throw TypeError("Remote dropdown values must be finite numeric or string IDs.");
|
|
50
|
+
this.cache.set(t.value, t);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
emit() {
|
|
54
|
+
this.disposed || this.changed({
|
|
55
|
+
items: [...this.items],
|
|
56
|
+
selected: this.ids.map((e) => this.cache.get(e) ?? {
|
|
57
|
+
value: e,
|
|
58
|
+
label: this.text.unavailable(e),
|
|
59
|
+
unresolved: !0
|
|
60
|
+
}),
|
|
61
|
+
loading: this.loading,
|
|
62
|
+
error: this.searchFailed || this.resolveFailed,
|
|
63
|
+
hasMore: this.cursor !== void 0
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
setSelected(e, t = []) {
|
|
67
|
+
this.remember(t), this.ids = [...new Set(e)], this.resolveAbort?.abort();
|
|
68
|
+
let n = ++this.resolution, r = this.ids.filter((e) => !this.cache.has(e));
|
|
69
|
+
if (this.resolveFailed = !1, this.emit(), !r.length || this.disposed) return;
|
|
70
|
+
let i = this.resolveAbort = new AbortController();
|
|
71
|
+
Promise.resolve().then(() => this.source.resolve({
|
|
72
|
+
ids: r,
|
|
73
|
+
signal: i.signal,
|
|
74
|
+
context: this.context
|
|
75
|
+
})).then((e) => {
|
|
76
|
+
this.disposed || i.signal.aborted || n !== this.resolution || (this.remember(e), this.emit());
|
|
77
|
+
}).catch(() => {
|
|
78
|
+
this.disposed || i.signal.aborted || n !== this.resolution || (this.resolveFailed = !0, this.emit());
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
search(e, t = !1) {
|
|
82
|
+
this.disposed || (this.opened = !0, this.query = e, this.searchAbort?.abort(), clearTimeout(this.timer), ++this.generation, this.items = [], this.cursor = void 0, this.seen.clear(), this.loading = !0, this.searchFailed = !1, this.emit(), t ? this.page(void 0, this.generation) : this.timer = setTimeout(() => void this.page(void 0, this.generation), this.settings.debounceMs ?? 200));
|
|
83
|
+
}
|
|
84
|
+
async page(e, t) {
|
|
85
|
+
if (this.disposed || t !== this.generation || this.seen.has(e)) return;
|
|
86
|
+
this.seen.add(e), this.loading = !0, this.searchFailed = !1, this.emit();
|
|
87
|
+
let n = this.searchAbort = new AbortController();
|
|
88
|
+
try {
|
|
89
|
+
let r = await this.source.search({
|
|
90
|
+
query: this.query,
|
|
91
|
+
cursor: e,
|
|
92
|
+
pageSize: this.settings.pageSize ?? 50,
|
|
93
|
+
signal: n.signal,
|
|
94
|
+
context: this.context
|
|
95
|
+
});
|
|
96
|
+
if (this.disposed || n.signal.aborted || t !== this.generation) return;
|
|
97
|
+
this.remember(r.items);
|
|
98
|
+
let i = new Map(this.items.map((e) => [e.value, e]));
|
|
99
|
+
r.items.forEach((e) => i.set(e.value, e)), this.items = [...i.values()], this.cursor = r.nextCursor ?? void 0, this.seen.has(this.cursor) && (this.cursor = void 0);
|
|
100
|
+
} catch {
|
|
101
|
+
if (this.disposed || n.signal.aborted || t !== this.generation) return;
|
|
102
|
+
this.seen.delete(e), this.failedCursor = e, this.searchFailed = !0;
|
|
103
|
+
} finally {
|
|
104
|
+
!this.disposed && !n.signal.aborted && t === this.generation && (this.loading = !1, this.emit());
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
loadMore() {
|
|
108
|
+
!this.loading && !this.searchFailed && this.cursor !== void 0 && this.page(this.cursor, this.generation);
|
|
109
|
+
}
|
|
110
|
+
retry() {
|
|
111
|
+
this.resolveFailed && this.setSelected(this.ids), this.searchFailed && this.opened && this.page(this.failedCursor, this.generation);
|
|
112
|
+
}
|
|
113
|
+
close() {
|
|
114
|
+
this.opened = !1, this.searchAbort?.abort(), clearTimeout(this.timer), ++this.generation, this.loading = !1, this.emit();
|
|
115
|
+
}
|
|
116
|
+
destroy() {
|
|
117
|
+
this.disposed = !0, this.close(), this.resolveAbort?.abort(), ++this.resolution;
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region src/dropdown/remote-hook.ts
|
|
122
|
+
function w(e) {
|
|
123
|
+
let t = a(() => ({
|
|
124
|
+
...S,
|
|
125
|
+
...e.remoteText
|
|
126
|
+
}), [e.remoteText]), [n, o] = i({
|
|
127
|
+
items: [],
|
|
128
|
+
selected: [],
|
|
129
|
+
loading: !1,
|
|
130
|
+
error: !1,
|
|
131
|
+
hasMore: !1
|
|
132
|
+
}), c = l(), u = e.value === null || e.value === void 0 ? [] : Array.isArray(e.value) ? e.value : [e.value], d = JSON.stringify(u);
|
|
133
|
+
return s(() => {
|
|
134
|
+
if (!e.dataSource || e.disabled) {
|
|
135
|
+
o({
|
|
136
|
+
items: [],
|
|
137
|
+
selected: [],
|
|
138
|
+
loading: !1,
|
|
139
|
+
error: !1,
|
|
140
|
+
hasMore: !1
|
|
141
|
+
});
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
let n = new C(e.dataSource, e.dataContext, o, t);
|
|
145
|
+
return c.current = n, () => {
|
|
146
|
+
n.destroy(), c.current === n && (c.current = void 0);
|
|
147
|
+
};
|
|
148
|
+
}, [
|
|
149
|
+
e.dataSource,
|
|
150
|
+
e.dataContext,
|
|
151
|
+
e.disabled,
|
|
152
|
+
t
|
|
153
|
+
]), s(() => {
|
|
154
|
+
c.current?.setSelected(u, e.source);
|
|
155
|
+
}, [
|
|
156
|
+
d,
|
|
157
|
+
e.source,
|
|
158
|
+
e.dataSource,
|
|
159
|
+
e.dataContext,
|
|
160
|
+
e.disabled,
|
|
161
|
+
t
|
|
162
|
+
]), r(() => {
|
|
163
|
+
e.open ? c.current?.search(e.initialQuery, !0) : c.current?.close();
|
|
164
|
+
}, [
|
|
165
|
+
e.open,
|
|
166
|
+
e.dataSource,
|
|
167
|
+
e.dataContext,
|
|
168
|
+
e.disabled,
|
|
169
|
+
e.initialQuery,
|
|
170
|
+
t
|
|
171
|
+
]), {
|
|
172
|
+
...n,
|
|
173
|
+
text: t,
|
|
174
|
+
search: (e) => c.current?.search(e),
|
|
175
|
+
loadMore: () => c.current?.loadMore(),
|
|
176
|
+
retry: () => c.current?.retry()
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
//#endregion
|
|
180
|
+
//#region src/dropdown/content.tsx
|
|
181
|
+
function T({ options: e, selectedValues: t, remote: n, value: i, onChange: a, config: o, multiSelect: s, search: c, searchPlaceholder: d, listboxId: f, searchId: p, renderOption: m, renderNoResults: h, onClose: g, onTabNavigation: v, theme: y }) {
|
|
182
|
+
let b = l(null), x = l(null), S = l(null), { searchValue: C, focusedIndex: w, selectedOptions: T, filteredOptions: D, handleSelect: ee, handleKeyDown: O, handleSearchChange: k, setFocusedIndex: A } = _(e, i, a, o, g, n && {
|
|
183
|
+
selected: t ?? [],
|
|
184
|
+
search: n.search
|
|
185
|
+
}), j = w >= 0 && w < D.length && !D[w].disabled ? `${f}-option-${w}` : void 0;
|
|
186
|
+
return r(() => {
|
|
187
|
+
if (!o.autoFocus) return;
|
|
188
|
+
let e = () => {
|
|
189
|
+
c && b.current ? b.current.focus({ preventScroll: !0 }) : x.current?.focus({ preventScroll: !0 });
|
|
190
|
+
}, t = x.current?.ownerDocument.defaultView ?? (typeof window < "u" ? window : void 0);
|
|
191
|
+
if (!t) return;
|
|
192
|
+
e();
|
|
193
|
+
let n = t.setTimeout(e, 0), r = t.requestAnimationFrame(e), i = t.setTimeout(e, 16);
|
|
194
|
+
return () => {
|
|
195
|
+
t.clearTimeout(n), t.cancelAnimationFrame(r), t.clearTimeout(i);
|
|
196
|
+
};
|
|
197
|
+
}, [o.autoFocus, c]), /* @__PURE__ */ u("div", {
|
|
198
|
+
ref: x,
|
|
199
|
+
className: "dropdown-listbox",
|
|
200
|
+
"data-theme": y ?? "default",
|
|
201
|
+
role: "listbox",
|
|
202
|
+
id: f,
|
|
203
|
+
"aria-multiselectable": s,
|
|
204
|
+
"aria-activedescendant": j,
|
|
205
|
+
tabIndex: -1,
|
|
206
|
+
"aria-busy": n?.loading,
|
|
207
|
+
onScrollCapture: (e) => {
|
|
208
|
+
let t = e.target;
|
|
209
|
+
n && t.scrollHeight - t.scrollTop - t.clientHeight < 48 && n.loadMore();
|
|
210
|
+
},
|
|
211
|
+
onKeyUp: (e) => e.stopPropagation(),
|
|
212
|
+
onKeyDown: (e) => {
|
|
213
|
+
if (e.stopPropagation(), e.key === "Escape") e.preventDefault(), e.stopPropagation(), g(!1);
|
|
214
|
+
else if (e.key === "Tab") {
|
|
215
|
+
if (o.nativeTabNavigation && v) {
|
|
216
|
+
v();
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
e.preventDefault(), e.stopPropagation(), o.closeOnTab && g(!0);
|
|
220
|
+
} else (e.key !== " " || e.target !== b.current) && O(e);
|
|
221
|
+
},
|
|
222
|
+
children: [
|
|
223
|
+
c && /* @__PURE__ */ u("div", {
|
|
224
|
+
className: "dropdown-search",
|
|
225
|
+
children: /* @__PURE__ */ u("input", {
|
|
226
|
+
ref: b,
|
|
227
|
+
type: "text",
|
|
228
|
+
id: p,
|
|
229
|
+
className: `dropdown-search-input ${y ? `theme-${y}` : ""}`,
|
|
230
|
+
placeholder: d,
|
|
231
|
+
value: C,
|
|
232
|
+
onChange: k,
|
|
233
|
+
onInput: k,
|
|
234
|
+
"aria-label": o.searchAriaLabel ?? "Search options"
|
|
235
|
+
})
|
|
236
|
+
}),
|
|
237
|
+
n?.loading && /* @__PURE__ */ u("div", {
|
|
238
|
+
role: "status",
|
|
239
|
+
children: n.text.loading
|
|
240
|
+
}),
|
|
241
|
+
n?.error && /* @__PURE__ */ u("div", {
|
|
242
|
+
role: "alert",
|
|
243
|
+
children: [
|
|
244
|
+
n.text.error,
|
|
245
|
+
" ",
|
|
246
|
+
/* @__PURE__ */ u(V, {
|
|
247
|
+
onClick: n.retry,
|
|
248
|
+
children: n.text.retry
|
|
249
|
+
})
|
|
250
|
+
]
|
|
251
|
+
}),
|
|
252
|
+
/* @__PURE__ */ u(E, {
|
|
253
|
+
options: e,
|
|
254
|
+
filteredOptions: D,
|
|
255
|
+
multiSelect: s,
|
|
256
|
+
focusedIndex: w,
|
|
257
|
+
selectedOptions: T,
|
|
258
|
+
onKeyDown: O,
|
|
259
|
+
onSelect: ee,
|
|
260
|
+
onFocusChange: A,
|
|
261
|
+
renderOption: m,
|
|
262
|
+
renderNoResults: n ? () => n.loading || n.error ? null : n.text.empty : h,
|
|
263
|
+
dropdownListRef: S,
|
|
264
|
+
theme: y,
|
|
265
|
+
optionIdPrefix: f
|
|
266
|
+
}),
|
|
267
|
+
n?.hasMore && /* @__PURE__ */ u(V, {
|
|
268
|
+
disabled: n.loading,
|
|
269
|
+
onClick: n.loadMore,
|
|
270
|
+
children: n.text.loadMore
|
|
271
|
+
})
|
|
272
|
+
]
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
function E({ options: n, filteredOptions: r, multiSelect: i, focusedIndex: a, selectedOptions: s, onKeyDown: c, onSelect: l, onFocusChange: d, renderOption: f, renderNoResults: p, dropdownListRef: m, theme: h, optionIdPrefix: g }) {
|
|
276
|
+
let _ = o((e) => s.some((t) => JSON.stringify(t.value) === JSON.stringify(e.value)), [s]), v = o((t, n) => {
|
|
277
|
+
let r = _(t), o = a === n;
|
|
278
|
+
return /* @__PURE__ */ u("li", {
|
|
279
|
+
id: `${g}-option-${n}`,
|
|
280
|
+
role: "option",
|
|
281
|
+
"data-value": typeof t.value == "string" || typeof t.value == "number" ? String(t.value) : void 0,
|
|
282
|
+
"aria-selected": r,
|
|
283
|
+
"aria-disabled": t.disabled,
|
|
284
|
+
tabIndex: -1,
|
|
285
|
+
className: `dropdown-option ${r ? "selected" : ""} ${o ? "focused" : ""} ${t.disabled ? "disabled" : ""} ${h ? `theme-${h}` : ""}`,
|
|
286
|
+
onClick: () => l(t),
|
|
287
|
+
onMouseEnter: () => {
|
|
288
|
+
t.disabled || d(n);
|
|
289
|
+
},
|
|
290
|
+
children: f ? f(e, t, r) : /* @__PURE__ */ u("div", {
|
|
291
|
+
className: "option-content",
|
|
292
|
+
children: [i && /* @__PURE__ */ u("input", {
|
|
293
|
+
type: "checkbox",
|
|
294
|
+
checked: r,
|
|
295
|
+
readOnly: !0,
|
|
296
|
+
disabled: t.disabled,
|
|
297
|
+
tabIndex: -1,
|
|
298
|
+
"aria-hidden": "true"
|
|
299
|
+
}), /* @__PURE__ */ u("span", { children: t.label })]
|
|
300
|
+
})
|
|
301
|
+
}, `${t.label}-${n}`);
|
|
302
|
+
}, [
|
|
303
|
+
a,
|
|
304
|
+
l,
|
|
305
|
+
_,
|
|
306
|
+
i,
|
|
307
|
+
f,
|
|
308
|
+
d,
|
|
309
|
+
h
|
|
310
|
+
]);
|
|
311
|
+
return /* @__PURE__ */ u(t, { children: /* @__PURE__ */ u("ul", {
|
|
312
|
+
ref: m,
|
|
313
|
+
className: "dropdown-options",
|
|
314
|
+
role: "presentation",
|
|
315
|
+
tabIndex: -1,
|
|
316
|
+
children: r.length > 0 ? r.map(v) : /* @__PURE__ */ u("li", {
|
|
317
|
+
className: "no-results",
|
|
318
|
+
children: p ? p(e) : /* @__PURE__ */ u("span", { children: "No results found" })
|
|
319
|
+
})
|
|
320
|
+
}) });
|
|
321
|
+
}
|
|
322
|
+
//#endregion
|
|
323
|
+
//#region src/dropdown/index.tsx
|
|
324
|
+
var D = ({ options: t, className: n, renderValue: r }) => /* @__PURE__ */ u("span", {
|
|
325
|
+
className: `selected-value ${n}`,
|
|
326
|
+
children: r ? r(e, t[0]) : t[0].label
|
|
327
|
+
}), ee = ({ options: t, removeOption: n, className: r, renderValue: i, disabled: a, removeLabel: o }) => /* @__PURE__ */ u("div", {
|
|
328
|
+
className: `selected-values ${r}`,
|
|
329
|
+
children: t.map((t, r) => /* @__PURE__ */ u("span", {
|
|
330
|
+
className: "selected-tag",
|
|
331
|
+
children: [i ? i(e, t) : t.label, !a && !t.disabled && /* @__PURE__ */ u(v, {
|
|
332
|
+
compact: !0,
|
|
333
|
+
onClick: (e) => {
|
|
334
|
+
e.stopPropagation(), n(t);
|
|
335
|
+
},
|
|
336
|
+
locale: {
|
|
337
|
+
title: o?.(t.label) ?? `Remove ${t.label}`,
|
|
338
|
+
ariaLabel: o?.(t.label) ?? `Remove ${t.label}`
|
|
339
|
+
}
|
|
340
|
+
})]
|
|
341
|
+
}, r))
|
|
342
|
+
}), O = ({ className: e }) => /* @__PURE__ */ u("span", {
|
|
343
|
+
className: `dropdown-arrow ${e}`,
|
|
344
|
+
"aria-hidden": "true",
|
|
345
|
+
dangerouslySetInnerHTML: { __html: y }
|
|
346
|
+
}), k = ({ placeholder: e, className: t }) => [/* @__PURE__ */ u("span", {
|
|
347
|
+
className: `placeholder px-2 ${t}`,
|
|
348
|
+
children: e
|
|
349
|
+
}), /* @__PURE__ */ u(O, { className: "mr-2" })];
|
|
350
|
+
function A({ source: t, triggerAttributes: n, dataSource: o, dataContext: s, remoteText: c, value: d, onChange: m, placeholder: h = "Select an option", disabled: _ = !1, name: v, id: y, className: b = "", style: x, config: S = {}, renderContent: C, renderOption: E, renderValue: A, renderPlaceholder: j, renderSelectedValue: M, renderNoResults: N, onClose: P, beforeOutsideClose: F, environment: I }) {
|
|
351
|
+
let { search: L = !1, searchPlaceholder: R = "Search...", closeOnClickOutside: z = !0, autoOpen: B = !1, multiSelect: V = !1, portalTarget: H, ariaLabel: te, ariaLabelledBy: ne, ariaDescribedBy: re, popupClassName: ie, maxHeight: ae } = S, { title: oe, ...se } = n ?? {}, U = p(typeof oe == "string" ? oe : void 0), W = H ?? (S.topLayer ? U.current?.closest("dialog[open], [role=dialog], revo-grid") : void 0) ?? (typeof document < "u" ? document.body : null), G = a(() => y || `dropdown-${Math.random().toString(36).substring(2, 9)}`, [y]), K = `${G}-listbox`, ce = `${G}-search`, q = `${G}-menu`, [J, Y] = i(B && !_), [le, ue] = i(!_ && (B || !!S.autoFocus)), de = l(B), fe = S.theme ?? "default";
|
|
352
|
+
r(() => {
|
|
353
|
+
B && !de.current && !_ && (ue(!0), Y(!0)), de.current = B;
|
|
354
|
+
}, [B, _]), r(() => {
|
|
355
|
+
_ && J && (Y(!1), P?.(!1));
|
|
356
|
+
}, [_, J]);
|
|
357
|
+
let X = w({
|
|
358
|
+
dataSource: o,
|
|
359
|
+
dataContext: s,
|
|
360
|
+
remoteText: c,
|
|
361
|
+
value: d,
|
|
362
|
+
disabled: _,
|
|
363
|
+
source: t,
|
|
364
|
+
open: J,
|
|
365
|
+
initialQuery: S.initialSearch ?? ""
|
|
366
|
+
}), Z = o ? [...new Map([...X.selected, ...X.items].map((e) => [e.value, e])).values()] : t, Q = a(() => {
|
|
367
|
+
if (d === void 0) return [];
|
|
368
|
+
if (V && Array.isArray(d)) return Z.filter((e) => d.some((t) => JSON.stringify(t) === JSON.stringify(e.value)));
|
|
369
|
+
{
|
|
370
|
+
let e = Z.find((e) => JSON.stringify(e.value) === JSON.stringify(d));
|
|
371
|
+
return e ? [e] : [];
|
|
372
|
+
}
|
|
373
|
+
}, [
|
|
374
|
+
d,
|
|
375
|
+
Z,
|
|
376
|
+
V
|
|
377
|
+
]), pe = () => {
|
|
378
|
+
_ || Y((e) => {
|
|
379
|
+
let t = !e;
|
|
380
|
+
return t && ue(!0), t;
|
|
381
|
+
});
|
|
382
|
+
}, $ = (e = !1) => {
|
|
383
|
+
Y((t) => (t && P?.(e), !1));
|
|
384
|
+
};
|
|
385
|
+
r(() => {
|
|
386
|
+
if (!J) return;
|
|
387
|
+
let e = U.current;
|
|
388
|
+
if (e) return I?.onOpen?.(e, $);
|
|
389
|
+
}, [J]);
|
|
390
|
+
let me = (e) => {
|
|
391
|
+
if (!(_ || e.disabled)) {
|
|
392
|
+
if (V) {
|
|
393
|
+
let t = Q.some((t) => JSON.stringify(t.value) === JSON.stringify(e.value)), n;
|
|
394
|
+
n = t ? Q.filter((t) => JSON.stringify(t.value) !== JSON.stringify(e.value)) : [...Q, e], m && m(n.map((e) => e.value));
|
|
395
|
+
} else m && m(e.value), $();
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
r(() => {
|
|
399
|
+
if (!z || !J) return;
|
|
400
|
+
let e = W?.ownerDocument ?? U.current?.ownerDocument ?? (typeof document < "u" ? document : void 0);
|
|
401
|
+
if (!e) return;
|
|
402
|
+
let t = (t) => {
|
|
403
|
+
let n = e.getElementById(q), r = t.target;
|
|
404
|
+
if (n && r && !f(n, r) && U.current && !U.current.contains(r)) {
|
|
405
|
+
if (F?.() === !1) {
|
|
406
|
+
t.preventDefault(), t.stopImmediatePropagation();
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
$();
|
|
410
|
+
}
|
|
411
|
+
}, n = !!F;
|
|
412
|
+
return e.addEventListener("pointerdown", t, n), () => {
|
|
413
|
+
e.removeEventListener("pointerdown", t, n);
|
|
414
|
+
};
|
|
415
|
+
}, [
|
|
416
|
+
z,
|
|
417
|
+
J,
|
|
418
|
+
q,
|
|
419
|
+
W,
|
|
420
|
+
F
|
|
421
|
+
]);
|
|
422
|
+
let he = () => {
|
|
423
|
+
let t = [O({})];
|
|
424
|
+
return M ? M(e, Q, t) : Q.length > 0 ? V ? [/* @__PURE__ */ u(ee, {
|
|
425
|
+
options: Q,
|
|
426
|
+
removeOption: me,
|
|
427
|
+
renderValue: A,
|
|
428
|
+
disabled: _,
|
|
429
|
+
removeLabel: S.removeLabel
|
|
430
|
+
}), /* @__PURE__ */ u(O, { className: "mr-2" })] : [/* @__PURE__ */ u(D, {
|
|
431
|
+
options: Q,
|
|
432
|
+
renderValue: A
|
|
433
|
+
}), /* @__PURE__ */ u(O, { className: "mr-2" })] : j ? j(e, h, t) : /* @__PURE__ */ u(k, { placeholder: h });
|
|
434
|
+
}, ge = () => /* @__PURE__ */ u(g, {
|
|
435
|
+
onPointerRelease: I?.onPointerRelease,
|
|
436
|
+
topLayer: S.topLayer,
|
|
437
|
+
triggerRef: U,
|
|
438
|
+
portalTarget: W,
|
|
439
|
+
theme: fe,
|
|
440
|
+
dropdownMenuId: q,
|
|
441
|
+
popupClassName: ie,
|
|
442
|
+
maxHeight: ae,
|
|
443
|
+
children: C ? C({
|
|
444
|
+
id: K,
|
|
445
|
+
close: $
|
|
446
|
+
}) : /* @__PURE__ */ u(T, {
|
|
447
|
+
options: o ? X.items : Z,
|
|
448
|
+
selectedValues: o ? X.selected : void 0,
|
|
449
|
+
remote: o ? X : void 0,
|
|
450
|
+
value: d,
|
|
451
|
+
onChange: (e) => {
|
|
452
|
+
if (!_ && (m?.(e), !V)) {
|
|
453
|
+
let e = U.current;
|
|
454
|
+
e?.ownerDocument.defaultView?.requestAnimationFrame(() => {
|
|
455
|
+
let t = e.ownerDocument.activeElement;
|
|
456
|
+
e.isConnected && (!t || t === e.ownerDocument.body || f(e, t)) && e.focus({ preventScroll: !0 });
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
},
|
|
460
|
+
config: {
|
|
461
|
+
...S,
|
|
462
|
+
autoFocus: S.autoFocus || le
|
|
463
|
+
},
|
|
464
|
+
multiSelect: V,
|
|
465
|
+
search: !!o || L,
|
|
466
|
+
searchPlaceholder: R,
|
|
467
|
+
listboxId: K,
|
|
468
|
+
searchId: ce,
|
|
469
|
+
renderOption: E,
|
|
470
|
+
renderNoResults: N,
|
|
471
|
+
onClose: $,
|
|
472
|
+
onTabNavigation: () => {
|
|
473
|
+
$(), U.current?.focus();
|
|
474
|
+
},
|
|
475
|
+
theme: fe
|
|
476
|
+
})
|
|
477
|
+
});
|
|
478
|
+
return /* @__PURE__ */ u("div", {
|
|
479
|
+
className: `dropdown-container ${b} ${_ ? "disabled" : ""}`,
|
|
480
|
+
style: x,
|
|
481
|
+
children: [
|
|
482
|
+
/* @__PURE__ */ u("div", {
|
|
483
|
+
...se,
|
|
484
|
+
ref: U,
|
|
485
|
+
className: `dropdown-trigger ${J ? "open" : ""}`,
|
|
486
|
+
role: "combobox",
|
|
487
|
+
"data-value": Array.isArray(d) ? JSON.stringify(d) : d == null ? "" : String(d),
|
|
488
|
+
"aria-haspopup": C ? "dialog" : "listbox",
|
|
489
|
+
"aria-expanded": J && !_,
|
|
490
|
+
"aria-disabled": _,
|
|
491
|
+
"aria-owns": K,
|
|
492
|
+
"aria-controls": K,
|
|
493
|
+
"aria-label": te,
|
|
494
|
+
"aria-labelledby": ne,
|
|
495
|
+
"aria-describedby": re,
|
|
496
|
+
tabIndex: _ ? -1 : 0,
|
|
497
|
+
onClick: _ ? void 0 : pe,
|
|
498
|
+
onKeyDown: (e) => {
|
|
499
|
+
_ || e.target !== e.currentTarget || (J && e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), $()) : !J && (e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(), e.stopPropagation(), pe()));
|
|
500
|
+
},
|
|
501
|
+
children: he()
|
|
502
|
+
}),
|
|
503
|
+
J && !_ && ge(),
|
|
504
|
+
v && /* @__PURE__ */ u("input", {
|
|
505
|
+
type: "hidden",
|
|
506
|
+
name: v,
|
|
507
|
+
value: JSON.stringify(V ? Q.map((e) => e.value) : Q[0]?.value || "")
|
|
508
|
+
})
|
|
509
|
+
]
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
var j = (e, t) => {
|
|
513
|
+
d(e, /* @__PURE__ */ u(A, { ...t }));
|
|
514
|
+
}, M = (e) => {
|
|
515
|
+
d(e, null);
|
|
516
|
+
};
|
|
517
|
+
//#endregion
|
|
518
|
+
//#region src/select.tsx
|
|
519
|
+
function N(e) {
|
|
520
|
+
return Array.isArray(e) ? e.map(N).join("") : n(e) ? N(e.props.children) : e == null || typeof e == "boolean" ? "" : String(e);
|
|
521
|
+
}
|
|
522
|
+
function P(e, r, i = "", a = !1) {
|
|
523
|
+
if (Array.isArray(e)) return e.flatMap((e) => P(e, r, i, a));
|
|
524
|
+
if (!n(e)) return [];
|
|
525
|
+
let o = e.props;
|
|
526
|
+
if (e.type === t) return P(o.children, r, i, a);
|
|
527
|
+
if (e.type === "optgroup") return P(o.children, r, o.label ?? "", a || !!o.disabled);
|
|
528
|
+
let s = r ? r(o) : o, c = {
|
|
529
|
+
...s,
|
|
530
|
+
disabled: o.disabled || s.disabled,
|
|
531
|
+
hidden: o.hidden || s.hidden
|
|
532
|
+
}, l = String(c.label ?? N(c.children)).trim();
|
|
533
|
+
return [{
|
|
534
|
+
value: String(c.value ?? l),
|
|
535
|
+
label: i ? `${i}: ${l}` : l,
|
|
536
|
+
disabled: a || !!c.disabled,
|
|
537
|
+
hidden: !!c.hidden,
|
|
538
|
+
selected: !!c.selected
|
|
539
|
+
}];
|
|
540
|
+
}
|
|
541
|
+
function F(e) {
|
|
542
|
+
let { children: n, environment: r, value: a, defaultValue: o, onValueChange: s, optionPolicy: l, multiple: d, disabled: f, name: p, class: h, className: g, style: _, ...v } = e, y = c(m), b = y.disabled || !!f, x = P(n, l), [S, C] = i(() => {
|
|
543
|
+
let e = o ?? (d ? x.filter((e) => e.selected).map((e) => e.value) : x.find((e) => e.selected)?.value ?? x[0]?.value ?? "");
|
|
544
|
+
return Array.isArray(e) ? [...e] : String(e);
|
|
545
|
+
}), w = a === void 0 ? S : Array.isArray(a) ? [...a] : String(a), T = Array.isArray(w) ? w : [w], E = x.filter((e) => !e.hidden || T.includes(e.value)), D = `rv-select rv-select-control ${typeof h == "string" ? h : ""} ${g ?? ""}`.replace(/\brv-control\b/g, "").trim();
|
|
546
|
+
return /* @__PURE__ */ u(t, { children: [/* @__PURE__ */ u(A, {
|
|
547
|
+
environment: r,
|
|
548
|
+
renderOption: (e, t) => /* @__PURE__ */ u("span", {
|
|
549
|
+
"data-select-option": t.value,
|
|
550
|
+
children: t.label
|
|
551
|
+
}),
|
|
552
|
+
source: E,
|
|
553
|
+
value: w,
|
|
554
|
+
disabled: !!b,
|
|
555
|
+
className: D,
|
|
556
|
+
style: _,
|
|
557
|
+
triggerAttributes: {
|
|
558
|
+
...v,
|
|
559
|
+
"data-select-value": Array.isArray(w) ? JSON.stringify(w) : w
|
|
560
|
+
},
|
|
561
|
+
config: {
|
|
562
|
+
nativeTabNavigation: !0,
|
|
563
|
+
multiSelect: !!d,
|
|
564
|
+
topLayer: !0,
|
|
565
|
+
ariaLabel: v["aria-label"],
|
|
566
|
+
ariaLabelledBy: v["aria-labelledby"] ?? (v["aria-label"] ? void 0 : y.labelId),
|
|
567
|
+
ariaDescribedBy: v["aria-describedby"] ?? y.hintId
|
|
568
|
+
},
|
|
569
|
+
onChange: (e) => {
|
|
570
|
+
let t = d ? Array.isArray(e) ? e : [e] : String(Array.isArray(e) ? e[0] ?? "" : e);
|
|
571
|
+
a === void 0 && C(t), s?.(t);
|
|
572
|
+
}
|
|
573
|
+
}), p && T.map((e) => /* @__PURE__ */ u("input", {
|
|
574
|
+
type: "hidden",
|
|
575
|
+
name: p,
|
|
576
|
+
value: e,
|
|
577
|
+
disabled: !!b
|
|
578
|
+
}))] });
|
|
579
|
+
}
|
|
580
|
+
//#endregion
|
|
581
|
+
//#region src/fieldset.tsx
|
|
582
|
+
function I(e) {
|
|
583
|
+
let t = c(m), n = t.disabled || !!e.disabled;
|
|
584
|
+
return /* @__PURE__ */ u(m.Provider, {
|
|
585
|
+
value: {
|
|
586
|
+
...t,
|
|
587
|
+
disabled: n
|
|
588
|
+
},
|
|
589
|
+
children: /* @__PURE__ */ u("fieldset", {
|
|
590
|
+
...e,
|
|
591
|
+
disabled: n
|
|
592
|
+
})
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
//#endregion
|
|
596
|
+
//#region src/native-control.tsx
|
|
597
|
+
function L(t, n, ...r) {
|
|
598
|
+
let { onChange: i, ...a } = n, o = x(e, t, a, ...r);
|
|
599
|
+
return i && !(t === "button" && n.busy) && Object.assign(o.props, { onChange: i }), o;
|
|
600
|
+
}
|
|
601
|
+
function R(e, t) {
|
|
602
|
+
let n = p(typeof e == "string" ? e : void 0);
|
|
603
|
+
return o((e) => {
|
|
604
|
+
n.current = e, typeof t == "function" ? t(e) : t && (t.current = e);
|
|
605
|
+
}, [t]);
|
|
606
|
+
}
|
|
607
|
+
var z = b(h(({ title: e, ...t }, n) => {
|
|
608
|
+
let r = R(e, n);
|
|
609
|
+
return L("input", {
|
|
610
|
+
...t,
|
|
611
|
+
ref: r
|
|
612
|
+
});
|
|
613
|
+
}), "input"), B = b(h(({ children: e, title: t, ...n }, r) => {
|
|
614
|
+
let i = R(t, r);
|
|
615
|
+
return L("textarea", {
|
|
616
|
+
...n,
|
|
617
|
+
ref: i
|
|
618
|
+
}, e);
|
|
619
|
+
}), "textarea"), V = b(h(({ children: e, title: t, ...n }, r) => {
|
|
620
|
+
let i = p(typeof t == "string" ? t : void 0), a = o((e) => {
|
|
621
|
+
i.current = e, typeof r == "function" ? r(e) : r && (r.current = e);
|
|
622
|
+
}, [r]);
|
|
623
|
+
return L("button", {
|
|
624
|
+
...n,
|
|
625
|
+
ref: a,
|
|
626
|
+
"aria-label": n["aria-label"] ?? (!e && typeof t == "string" ? t : void 0)
|
|
627
|
+
}, e);
|
|
628
|
+
}), "button"), H = b(h(({ children: e, title: t, ...n }, r) => {
|
|
629
|
+
let i = R(t, r);
|
|
630
|
+
return L("summary", {
|
|
631
|
+
...n,
|
|
632
|
+
ref: i
|
|
633
|
+
}, e);
|
|
634
|
+
}), "summary"), te = b(F, "select");
|
|
635
|
+
//#endregion
|
|
636
|
+
export { B as a, P as c, M as d, E as f, H as i, A as l, z as n, I as o, T as p, te as r, F as s, V as t, j as u };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as e, i as t, t as n } from "./hooks.module-CG3gN83z.js";
|
|
2
2
|
import { t as r } from "./jsxRuntime.module-F6UFnpT-.js";
|
|
3
|
-
import {
|
|
4
|
-
import { n as a } from "./
|
|
5
|
-
import {
|
|
3
|
+
import { createControlId as i } from "../core/control-id.js";
|
|
4
|
+
import { n as a } from "./native-control-DO0d1kgx.js";
|
|
5
|
+
import { t as o } from "./controls-BLQnWEd7.js";
|
|
6
6
|
import { EditorActions as s } from "../editor-actions.js";
|
|
7
7
|
//#region src/number-input/model.ts
|
|
8
8
|
var c = {
|
|
@@ -158,7 +158,7 @@ function v({ value: l, options: u, apply: d, cancel: f, initialSelection: p = "a
|
|
|
158
158
|
} catch {
|
|
159
159
|
return String(l ?? "");
|
|
160
160
|
}
|
|
161
|
-
}), [y, b] = t(""), [x] = t(() =>
|
|
161
|
+
}), [y, b] = t(""), [x] = t(() => i("rv-number")), S = n(null), C = n(!1), w = {
|
|
162
162
|
...c,
|
|
163
163
|
...u.text
|
|
164
164
|
}, T = h(g, u), E = T.error ?? y, D = T.error !== void 0 || !!y, O = () => {
|
|
@@ -190,7 +190,7 @@ function v({ value: l, options: u, apply: d, cancel: f, initialSelection: p = "a
|
|
|
190
190
|
/* @__PURE__ */ r("div", {
|
|
191
191
|
class: "rv-number-draft__entry",
|
|
192
192
|
children: [
|
|
193
|
-
/* @__PURE__ */ r(
|
|
193
|
+
/* @__PURE__ */ r(a, {
|
|
194
194
|
ref: S,
|
|
195
195
|
id: x,
|
|
196
196
|
class: "rv-control",
|
|
@@ -208,13 +208,13 @@ function v({ value: l, options: u, apply: d, cancel: f, initialSelection: p = "a
|
|
|
208
208
|
},
|
|
209
209
|
onInput: (e) => k(e.currentTarget.value)
|
|
210
210
|
}),
|
|
211
|
-
/* @__PURE__ */ r(
|
|
211
|
+
/* @__PURE__ */ r(o, {
|
|
212
212
|
"aria-label": w.decrease,
|
|
213
213
|
disabled: T.error !== void 0,
|
|
214
214
|
onClick: () => A(-1),
|
|
215
215
|
children: "−"
|
|
216
216
|
}),
|
|
217
|
-
/* @__PURE__ */ r(
|
|
217
|
+
/* @__PURE__ */ r(o, {
|
|
218
218
|
"aria-label": w.increase,
|
|
219
219
|
disabled: T.error !== void 0,
|
|
220
220
|
onClick: () => A(1),
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { i as e } from "./preact.module-BBM36DnO.js";
|
|
2
2
|
import { i as t } from "./hooks.module-CG3gN83z.js";
|
|
3
3
|
import { t as n } from "./jsxRuntime.module-F6UFnpT-.js";
|
|
4
|
-
import { t as r } from "./native-control-
|
|
4
|
+
import { t as r } from "./native-control-DO0d1kgx.js";
|
|
5
5
|
import { DEFAULT_CALENDAR_TRANSLATIONS as i } from "../calendar/translations.js";
|
|
6
6
|
import { n as a } from "./iso-B0YHBK7m.js";
|
|
7
7
|
import { f as o, h as s, m as c, o as l, p as u } from "./model-mPO2tG2f.js";
|
|
8
|
-
import { t as d } from "./calendar-
|
|
8
|
+
import { t as d } from "./calendar-DsXIhybL.js";
|
|
9
9
|
//#region src/calendar/picker.tsx
|
|
10
10
|
function f(f) {
|
|
11
11
|
let { selected: p, onSelectionChange: ee, presets: m, mode: h = "single", min: g = 0, max: _ = Infinity, required: v = !1, excludeDisabled: y = !1, month: b, defaultMonth: x, onMonthChange: S, ...C } = f, w = typeof p == "string" ? p : Array.isArray(p) ? p[0] : p?.from, [T, E] = t(x ?? w ?? f.referenceDate ?? s()), [D, O] = t(w ?? T), [k, A] = t(), [j, M] = t(), N = (e) => {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/@fortawesome+fontawesome-free@7.3.1/node_modules/@fortawesome/fontawesome-free/svgs/solid/plus.svg?raw
|
|
2
|
+
var e = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M256 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 160-160 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l160 0 0 160c0 17.7 14.3 32 32 32s32-14.3 32-32l0-160 160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0 0-160z\"/></svg>";
|
|
3
|
+
//#endregion
|
|
4
|
+
export { e as t };
|