@revolist/ui 4.0.1-rc → 4.0.3-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/LICENSE +21 -0
- package/README.md +345 -262
- package/_chunks/calendar-xpZ0v3xf.js +258 -0
- package/_chunks/chart-frame-Cmc7xU1i.js +130 -0
- package/_chunks/choice-chips-CHQTUdLs.js +110 -0
- package/_chunks/clock-BOhPNlW3.js +4 -0
- package/_chunks/{color-palette-BmZ7kH9R.js → color-palette-D8vyPfld.js} +41 -41
- package/_chunks/color-picker-CudqPYZo.js +138 -0
- package/_chunks/component-C_T2VN5u.js +863 -0
- package/_chunks/{component-metadata-BENbgTjU.js → component-metadata-BMOOmqx5.js} +0 -4
- package/_chunks/control-AHKXD5Eu.js +93 -0
- package/_chunks/{control-tooltip-BCNzQCXE.js → control-tooltip-uscKfAnV.js} +29 -29
- package/_chunks/{controller-CmLo-Ajc.js → controller-hRBm_Lfz.js} +15 -15
- package/_chunks/{controls-NEL5tDaz.js → controls-DsNi8V8I.js} +229 -214
- package/_chunks/{date-control-CYCkb1aQ.js → date-control-DrVFX13g.js} +21 -21
- package/_chunks/date-time-qIhp5vaX.js +768 -0
- package/_chunks/{delete-button-DnpmDNEJ.js → delete-button-CW9vjLnk.js} +7 -7
- package/_chunks/dialog.parts-CKGkC5zP.js +134 -0
- package/_chunks/duration-CL68Em0o.js +272 -0
- package/_chunks/editor-commit-Bq3wSgvr.js +12 -0
- package/_chunks/{editor-popup-B7fu_A_T.js → editor-popup-WDdtVDNA.js} +8 -8
- package/_chunks/field-context-D57PnBbH.js +5 -0
- package/_chunks/framework-mount--RTLIqE-.js +54 -0
- package/_chunks/history-controls-B3u3INEK.js +27 -0
- package/_chunks/hooks.module-CG3gN83z.js +157 -0
- package/_chunks/jsxRuntime.module-F6UFnpT-.js +30 -0
- package/_chunks/mount-DQ1cpppK.js +257 -0
- package/_chunks/native-control-C_yok8_-.js +605 -0
- package/_chunks/native.view-ByyZ1CT5.js +32 -0
- package/_chunks/{number-input-NnH57J4j.js → number-input-BKwA5FnM.js} +89 -89
- package/_chunks/picker-h1P5RUgp.js +122 -0
- package/_chunks/popup-CT2uD3go.js +367 -0
- package/_chunks/preact.module-BBM36DnO.js +290 -0
- package/_chunks/{rating-choice-CWAsNQNS.js → rating-choice-DZgmaic0.js} +10 -10
- package/_chunks/render-m5eMMwFR.js +83 -0
- package/_chunks/reorder-list-CSlqAGHw.js +59 -0
- package/_chunks/request-trail-DSlFix6i.js +618 -0
- package/_chunks/rich-text-CH7gIqOS.js +636 -0
- package/_chunks/rotate-right-Iha5ScJ1.js +4 -0
- package/_form.scss +1 -1
- package/_vendor/preact/LICENSE +21 -0
- package/_vendor/preact/compat/src/index.d.ts +353 -0
- package/_vendor/preact/compat/src/suspense-list.d.ts +16 -0
- package/_vendor/preact/compat/src/suspense.d.ts +19 -0
- package/_vendor/preact/hooks/src/index.d.ts +145 -0
- package/_vendor/preact/src/dom.d.ts +2548 -0
- package/_vendor/preact/src/index.d.ts +373 -0
- package/_vendor/preact/src/jsx.d.ts +2958 -0
- package/activity-message.d.ts +1 -1
- package/activity-message.js +16 -16
- package/ai/_chat.scss +195 -0
- package/ai/_style.scss +105 -34
- package/ai/chat.d.ts +63 -0
- package/ai/components.d.ts +20 -4
- package/ai/index.d.ts +2 -0
- package/ai/index.js +3 -3
- package/ai/mount.d.ts +30 -1
- package/ai/prompt-history.d.ts +13 -0
- package/ai/request-trail.d.ts +1 -1
- package/ai/transcript.d.ts +25 -0
- package/ai/translation-context.d.ts +1 -1
- package/ai/translations.d.ts +1 -1
- package/alert.d.ts +2 -2
- package/angular/angular.js +0 -3
- package/assignee/field.d.ts +2 -2
- package/assignee/index.js +86 -87
- package/assignee/layout.d.ts +2 -2
- package/assignee/picker.d.ts +1 -1
- package/avatar/index.js +25 -25
- package/avatar/index.view.d.ts +1 -1
- package/brush-range/component.d.ts +1 -1
- package/brush-range/component.js +30 -30
- package/buttons/delete-button.d.ts +2 -1
- package/buttons/delete-button.js +1 -1
- package/buttons/remove-button.d.ts +1 -1
- package/buttons/remove-button.js +3 -3
- package/buttons/svg-button.d.ts +2 -1
- package/buttons/svg-button.js +35 -35
- package/calendar/_calendar.scss +7 -2
- package/calendar/calendar.d.ts +1 -1
- package/calendar/calendar.js +1 -1
- package/calendar/caption.d.ts +1 -1
- package/calendar/day.d.ts +1 -1
- package/calendar/day.js +4 -4
- package/calendar/header.d.ts +1 -1
- package/calendar/header.js +35 -35
- package/calendar/index.js +2 -2
- package/calendar/month-grid.d.ts +1 -1
- package/calendar/month-grid.js +37 -37
- package/calendar/picker.d.ts +1 -1
- package/calendar/types.d.ts +1 -1
- package/calendar/year-grid.d.ts +1 -1
- package/calendar/year-grid.js +12 -12
- package/checkbox/index.d.ts +2 -2
- package/checkbox/index.js +9 -9
- package/choice-chips/index.d.ts +1 -1
- package/choice-chips/index.js +1 -1
- package/color-palette/color-palette.d.ts +1 -1
- package/color-palette/color-palette.js +1 -1
- package/color-palette/color-picker.d.ts +1 -1
- package/color-palette/color-picker.js +2 -2
- package/component-catalog.d.ts +34 -23
- package/control-attributes.js +7 -7
- package/control-presentation.js +18 -18
- package/controls.d.ts +12 -10
- package/controls.js +3 -3
- package/core/editor-commit.d.ts +1 -1
- package/core/editor-popup.d.ts +1 -1
- package/core/editor-popup.js +1 -1
- package/date-time/date-control.d.ts +1 -1
- package/date-time/field.d.ts +2 -2
- package/date-time/index.js +1 -1
- package/date-time/picker.d.ts +1 -1
- package/date-time/style.scss +4 -4
- package/date-time/time-control.d.ts +1 -1
- package/date-time/time-selection.d.ts +1 -1
- package/date-time/types.d.ts +1 -1
- package/dialog/dialog-action-footer.view.d.ts +1 -1
- package/dialog/dialog.dom.js +52 -52
- package/dialog/dialog.parts.d.ts +18 -18
- package/dialog/dialog.parts.js +1 -1
- package/dialog/dialog.preact.d.ts +1 -1
- package/dialog/dialog.preact.js +6 -6
- package/distribution-chart/area-chart.d.ts +1 -1
- package/distribution-chart/area-chart.js +25 -25
- package/distribution-chart/bar-chart.d.ts +6 -3
- package/distribution-chart/bar-chart.js +10 -6
- package/distribution-chart/chart-frame.d.ts +3 -2
- package/distribution-chart/index.d.ts +1 -1
- package/distribution-chart/index.js +6 -6
- package/distribution-chart/line-chart.d.ts +1 -1
- package/distribution-chart/line-chart.js +9 -9
- package/distribution-chart/types.d.ts +1 -1
- package/dropdown/content.d.ts +3 -2
- package/dropdown/content.js +1 -141
- package/dropdown/control.d.ts +14 -0
- package/dropdown/control.js +1 -0
- package/dropdown/control.view.d.ts +6 -0
- package/dropdown/dropdown.service.d.ts +1 -1
- package/dropdown/dropdown.service.js +9 -9
- package/dropdown/dropdown.types.d.ts +4 -0
- package/dropdown/editor-dropdown.style.scss +37 -9
- package/dropdown/index.d.ts +1 -1
- package/dropdown/index.js +3 -4
- package/dropdown/lookup-field.d.ts +1 -1
- package/dropdown/lookup-field.js +41 -41
- package/dropdown/popup.d.ts +1 -1
- package/dropdown/popup.js +1 -140
- package/duration/controls.d.ts +1 -1
- package/duration/index.d.ts +2 -2
- package/duration/index.js +1 -1
- package/duration/style.scss +1 -1
- package/editor-actions.d.ts +1 -1
- package/editor-actions.js +21 -20
- package/editor-layout/index.d.ts +1 -1
- package/editor-layout/index.js +27 -27
- package/field-configurator.d.ts +1 -1
- package/field-configurator.js +93 -93
- package/field-reorder.hook.js +32 -32
- package/fieldset.d.ts +3 -0
- package/filter/filters/slider/preact.js +3 -3
- package/filter/filters/slider/single.d.ts +1 -1
- package/filter/filters/slider/single.js +23 -23
- package/filter-badge.d.ts +1 -1
- package/filter-badge.js +23 -22
- package/filter-controls.d.ts +1 -1
- package/filter-controls.js +30 -30
- package/form-controls/field-context.d.ts +5 -0
- package/form-controls/index.js +16 -21
- package/form-controls/index.view.d.ts +2 -4
- package/form-controls/presentation.d.ts +1 -1
- package/form-controls/presentation.js +59 -51
- package/formatting/comparison-preview.d.ts +1 -1
- package/formatting/control-tooltip.d.ts +1 -1
- package/formatting/icon-controls.d.ts +1 -1
- package/formatting/index.js +105 -100
- package/formatting/inspector-section.d.ts +1 -1
- package/formatting/typography-controls.d.ts +1 -1
- package/framework-mount.d.ts +1 -1
- package/framework.js +215 -207
- package/history-controls.d.ts +14 -0
- package/history-controls.js +1 -0
- package/icons/icon.d.ts +1 -1
- package/icons/icon.js +1 -1
- package/legend.d.ts +1 -1
- package/legend.js +12 -12
- package/masked-input/index.d.ts +1 -1
- package/masked-input/index.js +109 -109
- package/native-control.d.ts +14 -12
- package/native-control.js +3 -26
- package/native-styles.css +1 -1
- package/native.js +40 -39
- package/number-input/index.d.ts +1 -1
- package/number-input/index.js +1 -1
- package/package.json +18 -14
- package/pagination.d.ts +3 -0
- package/pagination.js +43 -33
- package/pdf-viewer/component.d.ts +1 -1
- package/pdf-viewer/controller.js +1 -1
- package/pdf-viewer/header.d.ts +1 -1
- package/pdf-viewer/index.js +13 -13
- package/pdf-viewer/search-bar.d.ts +1 -1
- package/pdf-viewer/status.d.ts +1 -1
- package/pdf-viewer/style.scss +3 -4
- package/pdf-viewer/toolbar.d.ts +1 -1
- package/pickers.d.ts +1 -1
- package/preact-mount.d.ts +1 -1
- package/preact-mount.js +1 -1
- package/preact.d.ts +2 -0
- package/preact.js +62 -62
- package/rating-choice.d.ts +1 -1
- package/rating-choice.js +1 -1
- package/react-adapter.d.ts +1 -1
- package/react-control.d.ts +0 -1
- package/react-control.js +2 -2
- package/react.d.ts +13 -3
- package/react.js +71 -88
- package/reorder-list.d.ts +1 -1
- package/reorder-list.js +1 -1
- package/resource-picker/resource-picker-avatar.d.ts +1 -1
- package/resource-picker/resource-picker-avatar.js +14 -14
- package/resource-picker/resource-picker-option.d.ts +1 -1
- package/resource-picker/resource-picker-option.js +28 -28
- package/resource-picker/resource-picker-popup.d.ts +1 -1
- package/resource-picker/resource-picker-popup.js +3 -3
- package/resource-picker/resource-picker.d.ts +1 -1
- package/resource-picker/resource-picker.js +88 -88
- package/resource-picker/resource-picker.scss +6 -3
- package/rich-text/engine.d.ts +16 -19
- package/rich-text/index.d.ts +7 -7
- package/rich-text/index.js +1 -1
- package/rich-text/model.d.ts +4 -3
- package/rich-text/render-model.d.ts +4 -5
- package/rich-text/style.scss +3 -12
- package/rich-text/toolbar.d.ts +7 -7
- package/rich-text/translations.d.ts +3 -15
- package/search-input/index.js +12 -12
- package/segmented-switch/index.d.ts +1 -1
- package/segmented-switch/index.js +1 -1
- package/select.d.ts +20 -0
- package/select.js +1 -0
- package/status-feedback/exit-snapshot.js +4 -4
- package/status-feedback/index.js +2 -2
- package/status-feedback/popover.js +10 -10
- package/status-feedback/render.d.ts +2 -2
- package/status-feedback/render.js +3 -44
- package/status-feedback/status-feedback.scss +7 -0
- package/status-feedback/types.d.ts +4 -0
- package/status-feedback/use-auto-dismiss.d.ts +3 -0
- package/styles/_compositions.scss +3 -1
- package/styles/_control.scss +12 -4
- package/styles/_primitives.scss +9 -8
- package/styles.css +1 -1
- package/surfaces.js +49 -49
- package/svelte/UiComponent.server.js +1 -48
- package/svelte/UiComponent.svelte +0 -21
- package/svelte.js +33 -68
- package/switch/index.js +15 -15
- package/time-grid.d.ts +1 -1
- package/time-grid.js +58 -58
- package/timeline-track/component.d.ts +5 -1
- package/timeline-track/index.js +91 -74
- package/timeline-track/model.d.ts +9 -0
- package/timeline-track/model.js +10 -1
- package/ui.css +1 -1
- package/vue-adapter.d.ts +1 -1
- package/vue.d.ts +138 -119
- package/vue.js +150 -174
- package/_chunks/calendar-BsDxCYhI.js +0 -248
- package/_chunks/chart-frame-BvxbmEU9.js +0 -126
- package/_chunks/choice-chips-0HfOnK_4.js +0 -110
- package/_chunks/color-picker-BRv-__AM.js +0 -138
- package/_chunks/component-D4PH5UZT.js +0 -859
- package/_chunks/date-time-DjucJmbc.js +0 -769
- package/_chunks/dialog.parts-Dt3KinUz.js +0 -134
- package/_chunks/dropdown-CkGQBm1Q.js +0 -357
- package/_chunks/duration-BCaktcvz.js +0 -270
- package/_chunks/editor-commit-D6Rf5rGz.js +0 -12
- package/_chunks/framework-mount-BKIOsvY-.js +0 -54
- package/_chunks/mount-0-8opf1j.js +0 -90
- package/_chunks/native.view-8q_nwQ7x.js +0 -32
- package/_chunks/picker-oazJ7sO_.js +0 -121
- package/_chunks/reorder-list-BV3kZXso.js +0 -59
- package/_chunks/request-trail-D0oVzdRd.js +0 -347
- package/_chunks/rich-text-2Rla349o.js +0 -477
- package/react-native-select.d.ts +0 -6
- package/rich-text/syntax.d.ts +0 -2
- package/vue-native-select.d.ts +0 -9
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as e } from "./jsxRuntime.module-F6UFnpT-.js";
|
|
2
2
|
//#region src/icons/cancel.svg?raw
|
|
3
|
-
var t = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path fill=\"currentColor\" d=\"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z\"/></svg>", n = ({ onClick: n, disabled: r,
|
|
3
|
+
var t = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path fill=\"currentColor\" d=\"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z\"/></svg>", n = ({ onClick: n, disabled: r, rounded: i, className: a, onMouseDown: o, onDblClick: s, locale: c = {
|
|
4
4
|
title: "Remove",
|
|
5
5
|
ariaLabel: "Remove"
|
|
6
6
|
} }) => /* @__PURE__ */ e("button", {
|
|
7
|
-
onMouseDown:
|
|
8
|
-
onDblClick:
|
|
7
|
+
onMouseDown: o,
|
|
8
|
+
onDblClick: s,
|
|
9
9
|
onClick: n,
|
|
10
10
|
disabled: r,
|
|
11
11
|
type: "button",
|
|
12
|
-
title:
|
|
13
|
-
"aria-label":
|
|
14
|
-
className: `rounded-lg flex focus:outline-none remove-btn rv-chip-remove${i ? ` ${
|
|
12
|
+
title: c.title,
|
|
13
|
+
"aria-label": c.ariaLabel,
|
|
14
|
+
className: `rounded-lg flex focus:outline-none remove-btn rv-chip-remove${i ? " rv-btn-rounded" : ""}${a ? ` ${a}` : ""}`,
|
|
15
15
|
dangerouslySetInnerHTML: { __html: t }
|
|
16
16
|
});
|
|
17
17
|
//#endregion
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { c as e, i as t } from "./preact.module-BBM36DnO.js";
|
|
2
|
+
import { t as n } from "./jsxRuntime.module-F6UFnpT-.js";
|
|
3
|
+
import { n as r, t as i } from "./native-control-C_yok8_-.js";
|
|
4
|
+
import { r as a } from "./popup-CT2uD3go.js";
|
|
5
|
+
import { createPreactElement as o, releasePreactElement as s } from "../preact-mount.js";
|
|
6
|
+
import { t as c } from "./xmark-DD_PBvZI.js";
|
|
7
|
+
//#region src/dialog/dialog-action-footer.view.tsx
|
|
8
|
+
function l({ cancel: e = {}, save: t = {}, deleteAction: r = !1, reset: a = !1, start: o, end: s, children: c, actionsClass: l = "", class: u = "", ...d }) {
|
|
9
|
+
let f = (e, t, r, a = "", o = "button") => {
|
|
10
|
+
if (t === !1) return null;
|
|
11
|
+
let { label: s = r, class: c = "", ...l } = t;
|
|
12
|
+
return /* @__PURE__ */ n(i, {
|
|
13
|
+
type: o,
|
|
14
|
+
...l,
|
|
15
|
+
class: `rv-btn ${a} ${c}`,
|
|
16
|
+
"data-dialog-action": e,
|
|
17
|
+
children: s
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
return /* @__PURE__ */ n("footer", {
|
|
21
|
+
...d,
|
|
22
|
+
class: `rv-dialog__footer rv-dialog__action-footer ${u}`,
|
|
23
|
+
children: [c, /* @__PURE__ */ n("div", {
|
|
24
|
+
class: "rv-dialog__action-panel",
|
|
25
|
+
children: [/* @__PURE__ */ n("div", {
|
|
26
|
+
class: "rv-dialog__action-start",
|
|
27
|
+
children: [
|
|
28
|
+
o,
|
|
29
|
+
f("delete", r, "Delete", "rv-btn-danger-outline"),
|
|
30
|
+
f("reset", a, "Reset")
|
|
31
|
+
]
|
|
32
|
+
}), /* @__PURE__ */ n("div", {
|
|
33
|
+
class: `rv-dialog__actions ${l}`,
|
|
34
|
+
children: [
|
|
35
|
+
s,
|
|
36
|
+
f("cancel", e, "Cancel"),
|
|
37
|
+
f("save", t, "Save", "rv-btn-primary", "submit")
|
|
38
|
+
]
|
|
39
|
+
})]
|
|
40
|
+
})]
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function u(e, t) {
|
|
44
|
+
return /* @__PURE__ */ n(l, { ...t });
|
|
45
|
+
}
|
|
46
|
+
function d(e, t) {
|
|
47
|
+
let r = o(e.ownerDocument, /* @__PURE__ */ n(l, { ...t }));
|
|
48
|
+
return e.append(r), { destroy() {
|
|
49
|
+
s(r);
|
|
50
|
+
} };
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region src/dialog/dialog.parts.tsx
|
|
54
|
+
var f = a(({ class: e = "", ...t }, r) => /* @__PURE__ */ n("header", {
|
|
55
|
+
...t,
|
|
56
|
+
ref: r,
|
|
57
|
+
class: `rv-dialog__header ${e}`
|
|
58
|
+
}));
|
|
59
|
+
function p({ class: e = "", ...t }) {
|
|
60
|
+
return /* @__PURE__ */ n("form", {
|
|
61
|
+
...t,
|
|
62
|
+
class: `rv-dialog__surface ${e}`
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
var m = a(({ class: e = "", ...t }, r) => /* @__PURE__ */ n("div", {
|
|
66
|
+
...t,
|
|
67
|
+
ref: r,
|
|
68
|
+
class: `rv-dialog__body ${e}`
|
|
69
|
+
})), h = a(({ class: e = "", ...t }, r) => /* @__PURE__ */ n("footer", {
|
|
70
|
+
...t,
|
|
71
|
+
ref: r,
|
|
72
|
+
class: `rv-dialog__footer ${e}`
|
|
73
|
+
})), g = a(({ class: e = "", ...t }, r) => /* @__PURE__ */ n("div", {
|
|
74
|
+
...t,
|
|
75
|
+
ref: r,
|
|
76
|
+
class: `rv-dialog__actions ${e}`
|
|
77
|
+
}));
|
|
78
|
+
function _({ class: e = "", iconClass: t = "", ...r }) {
|
|
79
|
+
return /* @__PURE__ */ n(i, {
|
|
80
|
+
...r,
|
|
81
|
+
unstyled: !0,
|
|
82
|
+
type: "button",
|
|
83
|
+
class: `rv-dialog__close ${e}`,
|
|
84
|
+
children: /* @__PURE__ */ n("span", {
|
|
85
|
+
class: `rv-dialog__close-icon ${t}`,
|
|
86
|
+
"aria-hidden": "true",
|
|
87
|
+
dangerouslySetInnerHTML: { __html: c }
|
|
88
|
+
})
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
var v = a(({ class: e = "", ...t }, i) => /* @__PURE__ */ n(r, {
|
|
92
|
+
...t,
|
|
93
|
+
ref: i,
|
|
94
|
+
class: `rv-dialog__title-input ${e}`
|
|
95
|
+
})), y = a(({ titleId: e, title: r, name: i, description: a, inputLabel: o, titleHidden: s, headingClass: c = "", kickerClass: l = "", titleClass: u = "", inputProps: d, closeLabel: p, closeProps: m, onClose: h, class: g = "", ...y }, b) => /* @__PURE__ */ n(f, {
|
|
96
|
+
...y,
|
|
97
|
+
ref: b,
|
|
98
|
+
class: `rv-dialog__header--editable ${g}`,
|
|
99
|
+
children: [/* @__PURE__ */ n("div", {
|
|
100
|
+
class: `rv-dialog__heading ${c}`,
|
|
101
|
+
children: [
|
|
102
|
+
!s && i && /* @__PURE__ */ n("span", {
|
|
103
|
+
class: `rv-dialog__kicker ${l}`,
|
|
104
|
+
children: i
|
|
105
|
+
}),
|
|
106
|
+
!s && (d === !1 ? /* @__PURE__ */ n("h3", {
|
|
107
|
+
id: e,
|
|
108
|
+
class: `rv-dialog__title ${u}`,
|
|
109
|
+
children: r
|
|
110
|
+
}) : /* @__PURE__ */ n(t, { children: [/* @__PURE__ */ n("h3", {
|
|
111
|
+
id: e,
|
|
112
|
+
class: `rv-dialog__sr-only ${u}`,
|
|
113
|
+
children: r
|
|
114
|
+
}), /* @__PURE__ */ n(v, {
|
|
115
|
+
"aria-label": o,
|
|
116
|
+
value: r,
|
|
117
|
+
...d
|
|
118
|
+
})] })),
|
|
119
|
+
a && /* @__PURE__ */ n("div", {
|
|
120
|
+
class: "rv-dialog__description",
|
|
121
|
+
children: a
|
|
122
|
+
})
|
|
123
|
+
]
|
|
124
|
+
}), h && /* @__PURE__ */ n(_, {
|
|
125
|
+
...m,
|
|
126
|
+
"aria-label": p,
|
|
127
|
+
onClick: h
|
|
128
|
+
})]
|
|
129
|
+
}));
|
|
130
|
+
function b(t) {
|
|
131
|
+
return u(e, t);
|
|
132
|
+
}
|
|
133
|
+
//#endregion
|
|
134
|
+
export { h as a, v as c, d, u as f, _ as i, y as l, g as n, p as o, m as r, f as s, b as t, l as u };
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { i as e } from "./preact.module-BBM36DnO.js";
|
|
2
|
+
import { c as t, i as n, t as r } from "./hooks.module-CG3gN83z.js";
|
|
3
|
+
import { t as i } from "./jsxRuntime.module-F6UFnpT-.js";
|
|
4
|
+
import { l as a, n as o } from "./native-control-C_yok8_-.js";
|
|
5
|
+
import { SegmentedSwitch as s } from "../segmented-switch/index.js";
|
|
6
|
+
import { SingleValueSlider as c } from "../filter/filters/slider/single.js";
|
|
7
|
+
import { n as l } from "./editor-commit-Bq3wSgvr.js";
|
|
8
|
+
import { EditorActions as u } from "../editor-actions.js";
|
|
9
|
+
//#region ../dates/src/duration.ts
|
|
10
|
+
var d = {
|
|
11
|
+
m: "minute",
|
|
12
|
+
min: "minute",
|
|
13
|
+
mins: "minute",
|
|
14
|
+
minute: "minute",
|
|
15
|
+
minutes: "minute",
|
|
16
|
+
h: "hour",
|
|
17
|
+
hr: "hour",
|
|
18
|
+
hrs: "hour",
|
|
19
|
+
hour: "hour",
|
|
20
|
+
hours: "hour",
|
|
21
|
+
d: "day",
|
|
22
|
+
day: "day",
|
|
23
|
+
days: "day",
|
|
24
|
+
w: "week",
|
|
25
|
+
wk: "week",
|
|
26
|
+
wks: "week",
|
|
27
|
+
week: "week",
|
|
28
|
+
weeks: "week",
|
|
29
|
+
mo: "month",
|
|
30
|
+
mon: "month",
|
|
31
|
+
mons: "month",
|
|
32
|
+
month: "month",
|
|
33
|
+
months: "month",
|
|
34
|
+
q: "quarter",
|
|
35
|
+
qr: "quarter",
|
|
36
|
+
qtr: "quarter",
|
|
37
|
+
qtrs: "quarter",
|
|
38
|
+
quarter: "quarter",
|
|
39
|
+
quarters: "quarter",
|
|
40
|
+
y: "year",
|
|
41
|
+
yr: "year",
|
|
42
|
+
yrs: "year",
|
|
43
|
+
year: "year",
|
|
44
|
+
years: "year"
|
|
45
|
+
}, f = {
|
|
46
|
+
minute: ["minute", "minutes"],
|
|
47
|
+
hour: ["hour", "hours"],
|
|
48
|
+
day: ["day", "days"],
|
|
49
|
+
week: ["week", "weeks"],
|
|
50
|
+
month: ["month", "months"],
|
|
51
|
+
quarter: ["quarter", "quarters"],
|
|
52
|
+
year: ["year", "years"]
|
|
53
|
+
};
|
|
54
|
+
function p(e) {
|
|
55
|
+
return typeof e == "number" && Number.isFinite(e) ? Math.min(20, Math.max(0, Math.floor(e))) : 1;
|
|
56
|
+
}
|
|
57
|
+
function m(e, t) {
|
|
58
|
+
let n = t?.defaultUnit ?? "day";
|
|
59
|
+
if (typeof e == "number") return Number.isFinite(e) && e >= 0 ? {
|
|
60
|
+
value: e,
|
|
61
|
+
unit: n,
|
|
62
|
+
elapsed: !1
|
|
63
|
+
} : null;
|
|
64
|
+
if (typeof e != "string") return null;
|
|
65
|
+
let r = e.trim().toLowerCase();
|
|
66
|
+
if (!r) return null;
|
|
67
|
+
let i = r.match(/^([+]?(?:\d+(?:\.\d+)?|\.\d+))\s*(.*)$/);
|
|
68
|
+
if (!i) return null;
|
|
69
|
+
let a = Number(i[1]);
|
|
70
|
+
if (!Number.isFinite(a) || a < 0) return null;
|
|
71
|
+
let o = i[2].trim().replace(/\s+/g, " "), s = !1;
|
|
72
|
+
if (o.startsWith("elapsed ") ? (s = !0, o = o.slice(8).trim()) : o.startsWith("e") && o.length > 1 && d[o.slice(1)] && (s = !0, o = o.slice(1)), s && t?.allowElapsed === !1) return null;
|
|
73
|
+
let c = o ? d[o] : n;
|
|
74
|
+
return c ? {
|
|
75
|
+
value: a,
|
|
76
|
+
unit: c,
|
|
77
|
+
elapsed: s
|
|
78
|
+
} : null;
|
|
79
|
+
}
|
|
80
|
+
function h(e, t) {
|
|
81
|
+
return Number(e.toFixed(p(t)));
|
|
82
|
+
}
|
|
83
|
+
function g(e, t, n) {
|
|
84
|
+
let r = h(e, n?.maximumFractionDigits ?? 1), i = f[t], a = Math.abs(Math.abs(r) - 1) < 1e-9 ? i[0] : i[1];
|
|
85
|
+
return `${r} ${n?.elapsed ? "elapsed " : ""}${a}`;
|
|
86
|
+
}
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region ../dates/src/duration-control.ts
|
|
89
|
+
function _(e, t) {
|
|
90
|
+
if (e == null || typeof e == "string" && !e.trim()) return {
|
|
91
|
+
valid: !t.required,
|
|
92
|
+
value: null
|
|
93
|
+
};
|
|
94
|
+
let n = m(typeof e == "object" && e && "unit" in e && "value" in e ? `${String(e.value)}${"elapsed" in e && e.elapsed ? " elapsed " : " "}${String(e.unit)}` : e, {
|
|
95
|
+
...t,
|
|
96
|
+
allowElapsed: t.allowElapsed ?? !1
|
|
97
|
+
}), r = !!n && (!t.allowedUnits || t.allowedUnits.includes(n.unit)) && (t.min === void 0 || n.value >= t.min) && (t.max === void 0 || n.value <= t.max);
|
|
98
|
+
return {
|
|
99
|
+
valid: r,
|
|
100
|
+
value: r ? n : null
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
//#region src/duration/controls.tsx
|
|
105
|
+
var v = {
|
|
106
|
+
minute: "min",
|
|
107
|
+
hour: "hour",
|
|
108
|
+
day: "day",
|
|
109
|
+
week: "week",
|
|
110
|
+
month: "month",
|
|
111
|
+
quarter: "qtr",
|
|
112
|
+
year: "year"
|
|
113
|
+
};
|
|
114
|
+
function y(t) {
|
|
115
|
+
let { unit: n, amount: r } = t, o = t.onCommit ?? t.onChange, l = [...new Set(t.allowedUnits ?? Object.keys(v))], u = typeof t.slider == "object" ? t.slider : {}, d = Number.isFinite(t.min) ? Math.max(0, t.min) : 0, f = Math.max(d + 100, r), p = Number.isFinite(t.max) ? t.max : Number.isFinite(u.max) ? u.max : f, m = Number.isFinite(u.step) && u.step > 0 ? u.step : 1;
|
|
116
|
+
return /* @__PURE__ */ i(e, { children: [t.slider && /* @__PURE__ */ i("span", {
|
|
117
|
+
class: "rv-duration-field__slider",
|
|
118
|
+
children: [/* @__PURE__ */ i(c, {
|
|
119
|
+
min: d,
|
|
120
|
+
max: p,
|
|
121
|
+
step: m,
|
|
122
|
+
value: t.amount,
|
|
123
|
+
disabled: t.disabled || p <= d,
|
|
124
|
+
ariaLabel: t.label ?? "Duration",
|
|
125
|
+
ariaValueText: t.draft,
|
|
126
|
+
onChange: (e) => t.onChange(e),
|
|
127
|
+
onCommit: t.onCommit ? (e) => t.onCommit?.(e) : void 0
|
|
128
|
+
}), /* @__PURE__ */ i("span", {
|
|
129
|
+
class: "rv-duration-field__bounds",
|
|
130
|
+
"aria-hidden": "true",
|
|
131
|
+
children: [/* @__PURE__ */ i("span", { children: d }), /* @__PURE__ */ i("span", { children: [
|
|
132
|
+
p,
|
|
133
|
+
" ",
|
|
134
|
+
t.unitLabels?.[n] ?? v[n]
|
|
135
|
+
] })]
|
|
136
|
+
})]
|
|
137
|
+
}), t.unitButtons && /* @__PURE__ */ i("span", {
|
|
138
|
+
class: "rv-duration-field__modes",
|
|
139
|
+
children: [l.length === 0 ? null : l.length > 5 ? /* @__PURE__ */ i(a, {
|
|
140
|
+
className: "rv-select",
|
|
141
|
+
config: { ariaLabel: t.unitLabel ?? "Duration unit" },
|
|
142
|
+
source: l.map((e) => ({
|
|
143
|
+
value: e,
|
|
144
|
+
label: t.unitLabels?.[e] ?? v[e]
|
|
145
|
+
})),
|
|
146
|
+
value: n,
|
|
147
|
+
disabled: t.disabled,
|
|
148
|
+
onChange: (e) => o(r, e)
|
|
149
|
+
}) : /* @__PURE__ */ i(s, {
|
|
150
|
+
role: "radiogroup",
|
|
151
|
+
ariaLabel: t.unitLabel ?? "Duration unit",
|
|
152
|
+
value: n,
|
|
153
|
+
options: l.map((e) => ({
|
|
154
|
+
value: e,
|
|
155
|
+
label: t.unitLabels?.[e] ?? v[e],
|
|
156
|
+
ariaLabel: t.unitLabels?.[e] ?? e
|
|
157
|
+
})),
|
|
158
|
+
disabled: t.disabled,
|
|
159
|
+
onChange: (e) => o(r, e)
|
|
160
|
+
}), t.allowElapsed && /* @__PURE__ */ i(s, {
|
|
161
|
+
role: "radiogroup",
|
|
162
|
+
ariaLabel: t.modeLabel ?? "Duration mode",
|
|
163
|
+
value: t.elapsed ? "elapsed" : "working",
|
|
164
|
+
options: [{
|
|
165
|
+
value: "working",
|
|
166
|
+
label: t.workingLabel ?? "Working"
|
|
167
|
+
}, {
|
|
168
|
+
value: "elapsed",
|
|
169
|
+
label: t.elapsedLabel ?? "Elapsed"
|
|
170
|
+
}],
|
|
171
|
+
disabled: t.disabled,
|
|
172
|
+
onChange: (e) => o(r, n, e === "elapsed")
|
|
173
|
+
})]
|
|
174
|
+
})] });
|
|
175
|
+
}
|
|
176
|
+
//#endregion
|
|
177
|
+
//#region src/duration/index.tsx
|
|
178
|
+
function b(e) {
|
|
179
|
+
let a = (t) => t && typeof t == "object" ? g(t.value, t.unit, {
|
|
180
|
+
elapsed: t.elapsed,
|
|
181
|
+
maximumFractionDigits: e.maximumFractionDigits ?? 10
|
|
182
|
+
}) : t === null ? "" : String(t), [s, c] = n(() => _(e.value, e).value?.unit ?? e.defaultUnit), [l, u] = n(() => a(e.value)), d = r(e.value);
|
|
183
|
+
t(() => {
|
|
184
|
+
e.value !== d.current && (d.current = e.value, u(a(e.value)), c(_(e.value, e).value?.unit ?? e.defaultUnit));
|
|
185
|
+
}, [e.value]);
|
|
186
|
+
let f = {
|
|
187
|
+
...e,
|
|
188
|
+
defaultUnit: e.unitButtons ? s : e.defaultUnit
|
|
189
|
+
}, p = _(l, f);
|
|
190
|
+
t(() => e.onValidityChange?.(p.valid), [p.valid]);
|
|
191
|
+
let m = e.disabled || e.readOnly, h = p.value, v = h?.unit ?? s, b = h?.value ?? 0, x = (t) => {
|
|
192
|
+
u(t), e.onDraftChange?.(t);
|
|
193
|
+
let n = _(t, f);
|
|
194
|
+
n.valid && (n.value && c(n.value.unit), d.current = n.value, e.onChange(n.value));
|
|
195
|
+
}, S = (t, n = v, r = h?.elapsed ?? !1, i = !1) => {
|
|
196
|
+
if (m) return;
|
|
197
|
+
let a = g(t, n, {
|
|
198
|
+
elapsed: r,
|
|
199
|
+
maximumFractionDigits: e.maximumFractionDigits ?? 10
|
|
200
|
+
});
|
|
201
|
+
x(a);
|
|
202
|
+
let o = _(a, f);
|
|
203
|
+
i && o.valid && e.onCommit?.(o.value);
|
|
204
|
+
};
|
|
205
|
+
return /* @__PURE__ */ i("span", {
|
|
206
|
+
class: `rv-duration-field ${e.className ?? ""}`,
|
|
207
|
+
children: [
|
|
208
|
+
/* @__PURE__ */ i(o, {
|
|
209
|
+
type: "text",
|
|
210
|
+
"aria-label": e.label ?? "Duration",
|
|
211
|
+
"aria-invalid": !p.valid,
|
|
212
|
+
value: l,
|
|
213
|
+
disabled: e.disabled,
|
|
214
|
+
readOnly: e.readOnly,
|
|
215
|
+
placeholder: e.placeholder ?? `2 ${e.unitLabels?.[e.defaultUnit] ?? e.defaultUnit}`,
|
|
216
|
+
onInput: (e) => x(e.currentTarget.value)
|
|
217
|
+
}),
|
|
218
|
+
/* @__PURE__ */ i(y, {
|
|
219
|
+
...e,
|
|
220
|
+
unit: v,
|
|
221
|
+
amount: b,
|
|
222
|
+
draft: l,
|
|
223
|
+
elapsed: h?.elapsed ?? !1,
|
|
224
|
+
disabled: m || !p.valid && !!l.trim(),
|
|
225
|
+
onChange: S,
|
|
226
|
+
onCommit: (e, t, n) => S(e, t, n, !0)
|
|
227
|
+
}),
|
|
228
|
+
!p.valid && /* @__PURE__ */ i("span", {
|
|
229
|
+
role: "alert",
|
|
230
|
+
class: "rv-editor-error",
|
|
231
|
+
children: e.invalidText ?? "Enter a valid duration within the allowed units and bounds."
|
|
232
|
+
})
|
|
233
|
+
]
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
function x({ value: e, options: t, apply: a, cancel: o }) {
|
|
237
|
+
let [s, c] = n(!1), [d, f] = n(e), [p, m] = n(0), h = t.autoApply !== !1, g = r(!1), v = r(e), y = (e = !1) => {
|
|
238
|
+
let n = _(v.current, t);
|
|
239
|
+
return n.valid ? ((e || !h || g.current) && (g.current = !1, a(n.value)), !0) : !1;
|
|
240
|
+
};
|
|
241
|
+
return l(y, h), /* @__PURE__ */ i("div", {
|
|
242
|
+
onKeyDown: (e) => {
|
|
243
|
+
let t = e.target instanceof HTMLInputElement && e.target.type === "text";
|
|
244
|
+
!e.isComposing && e.key === "Enter" && (h && t || e.ctrlKey || e.metaKey) && (e.preventDefault(), y(!0));
|
|
245
|
+
},
|
|
246
|
+
children: [/* @__PURE__ */ i(b, {
|
|
247
|
+
...t,
|
|
248
|
+
value: d,
|
|
249
|
+
onChange: (e) => {
|
|
250
|
+
g.current = !0, f(e);
|
|
251
|
+
},
|
|
252
|
+
onDraftChange: (e) => {
|
|
253
|
+
g.current = !0, v.current = e;
|
|
254
|
+
},
|
|
255
|
+
onCommit: h ? (e) => {
|
|
256
|
+
g.current = !1, a(e);
|
|
257
|
+
} : void 0,
|
|
258
|
+
onValidityChange: c
|
|
259
|
+
}, p), /* @__PURE__ */ i(u, {
|
|
260
|
+
showConfirm: t.showActions ?? !h,
|
|
261
|
+
text: t.actions,
|
|
262
|
+
disabled: !s,
|
|
263
|
+
apply: () => y(!0),
|
|
264
|
+
cancel: o,
|
|
265
|
+
clear: t.required ? void 0 : () => {
|
|
266
|
+
h ? a(null) : (v.current = null, f(null), m((e) => e + 1));
|
|
267
|
+
}
|
|
268
|
+
})]
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
//#endregion
|
|
272
|
+
export { b as n, x as t };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { s as e } from "./preact.module-BBM36DnO.js";
|
|
2
|
+
import { r as t, s as n, t as r } from "./hooks.module-CG3gN83z.js";
|
|
3
|
+
//#region src/core/editor-commit.tsx
|
|
4
|
+
var i = e(void 0);
|
|
5
|
+
function a(e, a = !0) {
|
|
6
|
+
let o = n(i), s = r(e);
|
|
7
|
+
s.current = e, t(() => {
|
|
8
|
+
if (a) return o?.(() => s.current());
|
|
9
|
+
}, [o, a]);
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { a as n, i as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { calculateAnchoredPopoverPosition as e } from "../core/anchored-popover.js";
|
|
2
|
-
import {
|
|
3
|
-
import { hideTopLayerPopup as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { t } from "./jsxRuntime.module-F6UFnpT-.js";
|
|
3
|
+
import { hideTopLayerPopup as n, showTopLayerPopup as r } from "../core/top-layer-popup.js";
|
|
4
|
+
import { createPreactElement as i, releasePreactElement as a } from "../preact-mount.js";
|
|
5
|
+
import { t as o } from "./editor-commit-Bq3wSgvr.js";
|
|
6
6
|
//#region src/core/editor-popup-position.ts
|
|
7
7
|
function s(t, n, r, i = 4, a = 8) {
|
|
8
8
|
let o = Math.max(0, r.height - a - t.bottom - i), s = Math.max(0, t.top - a - i), c = n.height <= o || o >= s ? "below" : "above", l = c === "below" ? o : s, u = Math.min(n.height, l);
|
|
@@ -22,7 +22,7 @@ function l(e, l, u) {
|
|
|
22
22
|
let p = !1, m, h = (e) => (m = e, () => {
|
|
23
23
|
m === e && (m = void 0);
|
|
24
24
|
}), g = () => {
|
|
25
|
-
p || (p = !0, T.disconnect(), w?.disconnect(), d.removeEventListener("pointerdown", v, !0), d.removeEventListener("keydown", y, !0), d.removeEventListener("scroll", b, !0), f.removeEventListener("resize", g),
|
|
25
|
+
p || (p = !0, T.disconnect(), w?.disconnect(), d.removeEventListener("pointerdown", v, !0), d.removeEventListener("keydown", y, !0), d.removeEventListener("scroll", b, !0), f.removeEventListener("resize", g), n(x, S), a(x), x.remove(), c.get(d)?.element === x && c.delete(d), u.onClose?.(), e.isConnected && e.focus({ preventScroll: !0 }));
|
|
26
26
|
}, _ = (e) => e ? x.contains(e) ? !0 : [...x.querySelectorAll("[aria-controls]")].some((t) => t.getAttribute("aria-controls")?.split(" ").some((t) => d.getElementById(t)?.contains(e))) : !1, v = (t) => {
|
|
27
27
|
_(t.target) || e.contains(t.target) || (u.isAvailable && !u.isAvailable() ? g() : m?.() === !1 ? (t.preventDefault(), t.stopPropagation()) : g());
|
|
28
28
|
}, y = (e) => {
|
|
@@ -37,7 +37,7 @@ function l(e, l, u) {
|
|
|
37
37
|
}, b = (t) => {
|
|
38
38
|
let n = t.target;
|
|
39
39
|
_(n) || n && (n.contains(e) || E?.contains(n)) && C();
|
|
40
|
-
}, x =
|
|
40
|
+
}, x = i(d, /* @__PURE__ */ t("div", {
|
|
41
41
|
class: `rv-editor-popup ${u.className ?? ""}`,
|
|
42
42
|
role: "dialog",
|
|
43
43
|
"aria-label": u.label,
|
|
@@ -45,13 +45,13 @@ function l(e, l, u) {
|
|
|
45
45
|
onKeyUp: (e) => e.stopPropagation(),
|
|
46
46
|
onMouseDown: (e) => e.stopPropagation(),
|
|
47
47
|
onClick: (e) => e.stopPropagation(),
|
|
48
|
-
children: /* @__PURE__ */ o
|
|
48
|
+
children: /* @__PURE__ */ t(o.Provider, {
|
|
49
49
|
value: h,
|
|
50
50
|
children: l(g)
|
|
51
51
|
})
|
|
52
52
|
}));
|
|
53
53
|
x.style.direction = f.getComputedStyle(e).direction, (e.closest("dialog, [role=\"dialog\"], [role=\"menu\"]") ?? e.closest("revo-grid") ?? d.body).append(x);
|
|
54
|
-
let S =
|
|
54
|
+
let S = r(x, "block"), C = () => {
|
|
55
55
|
x.style.maxHeight = "";
|
|
56
56
|
let t = s(e.getBoundingClientRect(), x.getBoundingClientRect(), {
|
|
57
57
|
width: f.innerWidth,
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { c as e, r as t } from "./preact.module-BBM36DnO.js";
|
|
2
|
+
import { r as n, t as r } from "./hooks.module-CG3gN83z.js";
|
|
3
|
+
import { n as i } from "./component-metadata-BMOOmqx5.js";
|
|
4
|
+
//#region src/framework-mount.ts
|
|
5
|
+
function a(i, a) {
|
|
6
|
+
let o = /* @__PURE__ */ new Map(), s = !1, c = 0;
|
|
7
|
+
function l({ content: t, scope: i }) {
|
|
8
|
+
let l = r(null);
|
|
9
|
+
return n(() => {
|
|
10
|
+
let e = l.current;
|
|
11
|
+
if (!e || s) return;
|
|
12
|
+
let n = o.get(e)?.id ?? c++;
|
|
13
|
+
o.set(e, {
|
|
14
|
+
id: n,
|
|
15
|
+
element: e,
|
|
16
|
+
content: t,
|
|
17
|
+
scope: i
|
|
18
|
+
}), a([...o.values()]);
|
|
19
|
+
}, [t, i]), n(() => {
|
|
20
|
+
let e = l.current;
|
|
21
|
+
return () => {
|
|
22
|
+
e && o.delete(e), s || a([...o.values()]);
|
|
23
|
+
};
|
|
24
|
+
}, []), e("span", {
|
|
25
|
+
ref: l,
|
|
26
|
+
style: { display: "contents" },
|
|
27
|
+
"data-rv-framework-content": ""
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
let u = (t, n = {}) => e(l, {
|
|
31
|
+
content: t,
|
|
32
|
+
scope: n
|
|
33
|
+
});
|
|
34
|
+
return {
|
|
35
|
+
render(n, r, a) {
|
|
36
|
+
if (s) throw Error("Cannot update a destroyed UI mount");
|
|
37
|
+
t(e(n, a ? a(r, u) : r), i);
|
|
38
|
+
},
|
|
39
|
+
destroy() {
|
|
40
|
+
s || (s = !0, t(null, i), o.clear());
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function o(e, t, n, r) {
|
|
45
|
+
let a = { ...t }, o = i(e);
|
|
46
|
+
for (let [e, t] of Object.entries(n)) {
|
|
47
|
+
if (t == null) continue;
|
|
48
|
+
let n = o[e];
|
|
49
|
+
n ? a[n.prop] = (...e) => (n.skipFactory && (e = e.slice(1)), r(t, Object.fromEntries(n.args.map((t, n) => [t, e[n]])))) : a[e === "default" ? "children" : e] = r(t);
|
|
50
|
+
}
|
|
51
|
+
return a;
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
54
|
+
export { o as n, a as t };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { t as e } from "./jsxRuntime.module-F6UFnpT-.js";
|
|
2
|
+
import { SvgButton as t } from "../buttons/svg-button.js";
|
|
3
|
+
import "./rotate-right-Iha5ScJ1.js";
|
|
4
|
+
//#endregion
|
|
5
|
+
//#region src/history-controls.tsx
|
|
6
|
+
function n({ onUndo: n, onRedo: r, canUndo: i, canRedo: a, undoLabel: o = "Undo", redoLabel: s = "Redo", label: c = "History", undoCount: l, redoCount: u }) {
|
|
7
|
+
return /* @__PURE__ */ e("div", {
|
|
8
|
+
class: "rv-history-controls",
|
|
9
|
+
role: "group",
|
|
10
|
+
"aria-label": c,
|
|
11
|
+
children: [n && /* @__PURE__ */ e(t, {
|
|
12
|
+
icon: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 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=\"M24 192l144 0c9.7 0 18.5-5.8 22.2-14.8s1.7-19.3-5.2-26.2l-46.7-46.7c75.3-58.6 184.3-53.3 253.5 15.9 75 75 75 196.5 0 271.5s-196.5 75-271.5 0c-10.2-10.2-19-21.3-26.4-33-9.5-14.9-29.3-19.3-44.2-9.8s-19.3 29.3-9.8 44.2C49.7 408.7 61.4 423.5 75 437 175 537 337 537 437 437S537 175 437 75C342.8-19.3 193.3-24.7 92.7 58.8L41 7C34.1 .2 23.8-1.9 14.8 1.8S0 14.3 0 24L0 168c0 13.3 10.7 24 24 24z\"/></svg>",
|
|
13
|
+
label: o,
|
|
14
|
+
badge: l,
|
|
15
|
+
disabled: !i,
|
|
16
|
+
onClick: n
|
|
17
|
+
}), r && /* @__PURE__ */ e(t, {
|
|
18
|
+
icon: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 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=\"M488 192l-144 0c-9.7 0-18.5-5.8-22.2-14.8s-1.7-19.3 5.2-26.2l46.7-46.7c-75.3-58.6-184.3-53.3-253.5 15.9-75 75-75 196.5 0 271.5s196.5 75 271.5 0c8.2-8.2 15.5-16.9 21.9-26.1 10.1-14.5 30.1-18 44.6-7.9s18 30.1 7.9 44.6c-8.5 12.2-18.2 23.8-29.1 34.7-100 100-262.1 100-362 0S-25 175 75 75c94.3-94.3 243.7-99.6 344.3-16.2L471 7c6.9-6.9 17.2-8.9 26.2-5.2S512 14.3 512 24l0 144c0 13.3-10.7 24-24 24z\"/></svg>",
|
|
19
|
+
label: s,
|
|
20
|
+
badge: u,
|
|
21
|
+
disabled: !a,
|
|
22
|
+
onClick: r
|
|
23
|
+
})]
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { n as t };
|