@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
package/surfaces.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { calculateAnchoredPopoverPosition as e } from "./core/anchored-popover.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { hideTopLayerPopup as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
2
|
+
import { t } from "./_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
3
|
+
import { inheritUiMotion as n } from "./core/motion.js";
|
|
4
|
+
import { hideTopLayerPopup as r, showTopLayerPopup as i } from "./core/top-layer-popup.js";
|
|
5
|
+
import { createPreactElement as a, releasePreactElement as o } from "./preact-mount.js";
|
|
6
|
+
import { createControlId as s } from "./core/control-id.js";
|
|
7
|
+
import { createDialogElements as c, getDialogFocusableElements as l, trapDialogFocus as u } from "./dialog/dialog.dom.js";
|
|
8
|
+
import { attachDialogDrag as d } from "./dialog/dialog.drag.js";
|
|
9
9
|
//#region src/surfaces.view.tsx
|
|
10
10
|
var f = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap(), m = class {
|
|
11
11
|
document;
|
|
@@ -19,31 +19,31 @@ var f = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap(), m = cl
|
|
|
19
19
|
}
|
|
20
20
|
open(e) {
|
|
21
21
|
this.close();
|
|
22
|
-
let t = this.document, r = t.activeElement, i = !1, a,
|
|
22
|
+
let t = this.document, r = t.activeElement, i = !1, a, s, f = p.get(t) ?? [];
|
|
23
23
|
p.set(t, f);
|
|
24
24
|
let m = () => {
|
|
25
25
|
if (i) return;
|
|
26
|
-
i = !0, a?.(),
|
|
27
|
-
let t = f.indexOf(h.root),
|
|
26
|
+
i = !0, a?.(), s?.(), o(h.root);
|
|
27
|
+
let t = f.indexOf(h.root), n = t === f.length - 1;
|
|
28
28
|
t !== -1 && f.splice(t, 1), this.active?.root === h.root && (this.active = void 0);
|
|
29
29
|
try {
|
|
30
30
|
e.onClose?.();
|
|
31
31
|
} finally {
|
|
32
|
-
|
|
32
|
+
n && (this.environment.restoreFocus ? this.environment.restoreFocus(e.returnFocus, r ?? void 0) : [e.returnFocus, r].find((e) => e?.isConnected)?.focus?.({ preventScroll: !0 }));
|
|
33
33
|
}
|
|
34
|
-
}, h =
|
|
34
|
+
}, h = c(t, e, m), g = {
|
|
35
35
|
...h,
|
|
36
36
|
close: m
|
|
37
37
|
};
|
|
38
|
-
return this.environment.beforeMount?.(h.root),
|
|
38
|
+
return this.environment.beforeMount?.(h.root), s = n(e.returnFocus ?? r, h.root), h.root.addEventListener("mousedown", (e) => {
|
|
39
39
|
e.target === h.root && f.at(-1) === h.root && m();
|
|
40
40
|
}), h.root.addEventListener("keydown", (e) => {
|
|
41
|
-
f.at(-1) === h.root && (e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), m()) : e.key === "Tab" &&
|
|
42
|
-
}), t.body.append(h.root), f.push(h.root), e.draggable !== !1 && (a =
|
|
41
|
+
f.at(-1) === h.root && (e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), m()) : e.key === "Tab" && u(h.root, e));
|
|
42
|
+
}), t.body.append(h.root), f.push(h.root), e.draggable !== !1 && (a = d({
|
|
43
43
|
target: h.surface,
|
|
44
44
|
handle: h.header
|
|
45
45
|
})), this.active = g, this.environment.onOpen?.(e), queueMicrotask(() => {
|
|
46
|
-
!i && f.at(-1) === h.root && (
|
|
46
|
+
!i && f.at(-1) === h.root && (l(h.root)[0] ?? h.root).focus({ preventScroll: !0 });
|
|
47
47
|
}), g;
|
|
48
48
|
}
|
|
49
49
|
close(e) {
|
|
@@ -59,44 +59,44 @@ var f = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap(), m = cl
|
|
|
59
59
|
}
|
|
60
60
|
open(t) {
|
|
61
61
|
this.close(!1);
|
|
62
|
-
let { anchor:
|
|
62
|
+
let { anchor: a, content: o } = t, s = a.ownerDocument, c = s.defaultView, l = f.get(s) ?? [];
|
|
63
63
|
f.set(s, l);
|
|
64
|
-
let u =
|
|
65
|
-
if (!
|
|
64
|
+
let u = o.parentNode, d = o.nextSibling, p = o.hidden, m = o.getAttribute("style"), h = o.getAttribute("popover"), g = n(a, o), _ = () => {
|
|
65
|
+
if (!a.isConnected) {
|
|
66
66
|
b(!1);
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
|
-
let t = e(
|
|
69
|
+
let t = e(a.getBoundingClientRect(), o.getBoundingClientRect(), {
|
|
70
70
|
width: s.documentElement.clientWidth || c?.innerWidth || 0,
|
|
71
71
|
height: s.documentElement.clientHeight || c?.innerHeight || 0
|
|
72
72
|
});
|
|
73
|
-
Object.assign(
|
|
73
|
+
Object.assign(o.style, {
|
|
74
74
|
left: `${t.left}px`,
|
|
75
75
|
top: `${t.top}px`
|
|
76
76
|
});
|
|
77
77
|
}, v, y = !1, b = (e = t.restoreFocus !== !1) => {
|
|
78
78
|
if (y) return;
|
|
79
|
-
y = !0, s.removeEventListener("pointerdown", x, !0), s.removeEventListener("keydown", S), c?.removeEventListener("resize", _), s.removeEventListener("scroll", _, !0), C?.disconnect();
|
|
80
|
-
let
|
|
81
|
-
|
|
79
|
+
y = !0, s.removeEventListener("pointerdown", x, !0), o.removeEventListener("keydown", S), s.removeEventListener("keydown", S), c?.removeEventListener("resize", _), s.removeEventListener("scroll", _, !0), C?.disconnect();
|
|
80
|
+
let n = l.indexOf(o);
|
|
81
|
+
n !== -1 && l.splice(n, 1), r(o, v), g(), u?.isConnected ? u.insertBefore(o, d?.parentNode === u ? d : null) : o.remove(), m === null ? o.removeAttribute("style") : o.setAttribute("style", m), o.hidden = p, h === null ? o.removeAttribute("popover") : o.setAttribute("popover", h), this.active?.content === o && (this.active = void 0), e && a.isConnected && a.focus({ preventScroll: !0 }), t.onClose?.();
|
|
82
82
|
}, x = (e) => {
|
|
83
|
-
if (l.at(-1) !==
|
|
84
|
-
let
|
|
85
|
-
t.closeOnOutside !== !1 && !
|
|
83
|
+
if (l.at(-1) !== o) return;
|
|
84
|
+
let n = e.composedPath();
|
|
85
|
+
t.closeOnOutside !== !1 && !n.includes(a) && !n.includes(o) && b(!1);
|
|
86
86
|
}, S = (e) => {
|
|
87
|
-
l.at(-1) ===
|
|
87
|
+
l.at(-1) === o && e.key === "Escape" && t.closeOnEscape !== !1 && !e.defaultPrevented && (e.preventDefault(), e.stopPropagation(), b());
|
|
88
88
|
};
|
|
89
|
-
(t.appendTo ?? s.body).append(
|
|
89
|
+
(t.appendTo ?? s.body).append(o), o.hidden = !1, Object.assign(o.style, {
|
|
90
90
|
position: "fixed",
|
|
91
91
|
inset: "auto",
|
|
92
92
|
margin: "0"
|
|
93
|
-
}), v =
|
|
93
|
+
}), v = i(o, t.display ?? "block");
|
|
94
94
|
let C = c?.ResizeObserver ? new c.ResizeObserver(_) : void 0;
|
|
95
|
-
return C?.observe(
|
|
96
|
-
content:
|
|
95
|
+
return C?.observe(a), C?.observe(o), this.active = {
|
|
96
|
+
content: o,
|
|
97
97
|
close: b,
|
|
98
98
|
position: _
|
|
99
|
-
}, l.push(
|
|
99
|
+
}, l.push(o), s.addEventListener("pointerdown", x, !0), o.addEventListener("keydown", S), s.addEventListener("keydown", S), c?.addEventListener("resize", _), s.addEventListener("scroll", _, !0), _(), {
|
|
100
100
|
close: b,
|
|
101
101
|
refresh: _
|
|
102
102
|
};
|
|
@@ -112,8 +112,8 @@ var f = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap(), m = cl
|
|
|
112
112
|
}
|
|
113
113
|
};
|
|
114
114
|
function g(e, n = "grid-tooltip") {
|
|
115
|
-
return
|
|
116
|
-
id:
|
|
115
|
+
return a(e, /* @__PURE__ */ t("div", {
|
|
116
|
+
id: s("rv-tooltip"),
|
|
117
117
|
class: n,
|
|
118
118
|
role: "tooltip",
|
|
119
119
|
hidden: !0
|
|
@@ -122,28 +122,28 @@ function g(e, n = "grid-tooltip") {
|
|
|
122
122
|
var _ = /* @__PURE__ */ new WeakMap(), v = class {
|
|
123
123
|
popover = new h();
|
|
124
124
|
release;
|
|
125
|
-
bind(e, t,
|
|
125
|
+
bind(e, t, n = {}) {
|
|
126
126
|
this.destroy();
|
|
127
|
-
let
|
|
128
|
-
|
|
129
|
-
let
|
|
130
|
-
_.get(e.ownerDocument) ===
|
|
131
|
-
},
|
|
132
|
-
|
|
133
|
-
}, s = e.getAttribute("aria-describedby"), c =
|
|
127
|
+
let r = g(e.ownerDocument, "rv-tooltip");
|
|
128
|
+
r.textContent = t;
|
|
129
|
+
let i = () => {
|
|
130
|
+
_.get(e.ownerDocument) === a && _.delete(e.ownerDocument);
|
|
131
|
+
}, a = () => {
|
|
132
|
+
i(), this.popover.close(!1), r.hidden = !0, e.setAttribute("aria-describedby", s ?? ""), s === null && e.removeAttribute("aria-describedby");
|
|
133
|
+
}, s = e.getAttribute("aria-describedby"), c = n.trigger === "click", l = e.getAttribute("aria-expanded");
|
|
134
134
|
c && e.setAttribute("aria-expanded", "false");
|
|
135
135
|
let u = () => {
|
|
136
|
-
this.popover.isOpen || (_.get(e.ownerDocument)?.(), _.set(e.ownerDocument,
|
|
136
|
+
this.popover.isOpen || (_.get(e.ownerDocument)?.(), _.set(e.ownerDocument, a), r.hidden = !1, c && e.setAttribute("aria-expanded", "true"), e.setAttribute("aria-describedby", [s, r.id].filter(Boolean).join(" ")), this.popover.open({
|
|
137
137
|
anchor: e,
|
|
138
|
-
content:
|
|
138
|
+
content: r,
|
|
139
139
|
restoreFocus: !1,
|
|
140
140
|
onClose: () => {
|
|
141
|
-
|
|
141
|
+
i(), r.hidden = !0, c && e.setAttribute("aria-expanded", "false"), s === null ? e.removeAttribute("aria-describedby") : e.setAttribute("aria-describedby", s);
|
|
142
142
|
}
|
|
143
143
|
}));
|
|
144
|
-
}, d = () => this.popover.isOpen ?
|
|
145
|
-
return c ? e.addEventListener("click", d) : (e.addEventListener("pointerenter", u), e.addEventListener("pointerleave",
|
|
146
|
-
|
|
144
|
+
}, d = () => this.popover.isOpen ? a() : u();
|
|
145
|
+
return c ? e.addEventListener("click", d) : (e.addEventListener("pointerenter", u), e.addEventListener("pointerleave", a), e.addEventListener("focus", u), e.addEventListener("blur", a)), this.release = () => {
|
|
146
|
+
a(), e.removeEventListener("click", d), c && (l === null ? e.removeAttribute("aria-expanded") : e.setAttribute("aria-expanded", l)), e.removeEventListener("pointerenter", u), e.removeEventListener("pointerleave", a), e.removeEventListener("focus", u), e.removeEventListener("blur", a), o(r);
|
|
147
147
|
}, () => this.destroy();
|
|
148
148
|
}
|
|
149
149
|
destroy() {
|
|
@@ -8,8 +8,6 @@ import {
|
|
|
8
8
|
withFrameworkContent
|
|
9
9
|
} from '../framework.js';
|
|
10
10
|
|
|
11
|
-
import { controlAttributes } from '../control-attributes.js';
|
|
12
|
-
|
|
13
11
|
export default function UiComponent($$renderer, $$props) {
|
|
14
12
|
$$renderer.component(($$renderer) => {
|
|
15
13
|
let {
|
|
@@ -47,52 +45,7 @@ export default function UiComponent($$renderer, $$props) {
|
|
|
47
45
|
};
|
|
48
46
|
}
|
|
49
47
|
|
|
50
|
-
|
|
51
|
-
props.onChange?.(event);
|
|
52
|
-
|
|
53
|
-
if (event.defaultPrevented) return;
|
|
54
|
-
|
|
55
|
-
const value = event.currentTarget.value;
|
|
56
|
-
|
|
57
|
-
props.onValueChange?.(value);
|
|
58
|
-
onValueChange?.(value);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
let selectProps = $.derived(() => {
|
|
62
|
-
const { onChange, onValueChange, ...rest } = props;
|
|
63
|
-
|
|
64
|
-
return controlAttributes('select', rest);
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
$$renderer.push(`<span style="display: contents"${$.attr('data-rv-svelte-host', component)}></span> `);
|
|
68
|
-
|
|
69
|
-
if (component === 'NativeSelect') {
|
|
70
|
-
$$renderer.push('<!--[0-->');
|
|
71
|
-
|
|
72
|
-
$$renderer.select(
|
|
73
|
-
{ ...selectProps(), onchange: nativeChange },
|
|
74
|
-
($$renderer) => {
|
|
75
|
-
if (children) {
|
|
76
|
-
$$renderer.push('<!--[0-->');
|
|
77
|
-
children($$renderer, {});
|
|
78
|
-
$$renderer.push(`<!---->`);
|
|
79
|
-
} else {
|
|
80
|
-
$$renderer.push('<!--[-1-->');
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
$$renderer.push(`<!--]-->`);
|
|
84
|
-
},
|
|
85
|
-
void 0,
|
|
86
|
-
void 0,
|
|
87
|
-
void 0,
|
|
88
|
-
void 0,
|
|
89
|
-
true
|
|
90
|
-
);
|
|
91
|
-
} else {
|
|
92
|
-
$$renderer.push('<!--[-1-->');
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
$$renderer.push(`<!--]--> <!--[-->`);
|
|
48
|
+
$$renderer.push(`<span style="display: contents"${$.attr('data-rv-svelte-host', component)}></span> <!--[-->`);
|
|
96
49
|
|
|
97
50
|
const each_array = $.ensure_array_like(targets);
|
|
98
51
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { onMount, untrack, type Snippet } from 'svelte';
|
|
3
3
|
import { uiComponents, componentModels, createFrameworkMount, withFrameworkContent, type UiContentTarget, type UiFrameworkMount } from '../framework';
|
|
4
|
-
import { controlAttributes } from '../control-attributes';
|
|
5
4
|
import type { SvelteUiProps } from '../svelte-props';
|
|
6
5
|
|
|
7
6
|
let { component, props = {}, children, slots = {}, onValueChange, onUiEvent }: SvelteUiProps = $props();
|
|
@@ -21,10 +20,6 @@
|
|
|
21
20
|
const change = onValueChange;
|
|
22
21
|
const event = onUiEvent;
|
|
23
22
|
const renderer = mount;
|
|
24
|
-
if (name === 'NativeSelect') {
|
|
25
|
-
untrack(() => { renderer?.render(() => null, {}); });
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
23
|
const model = componentModels[name];
|
|
29
24
|
const callbacks = new Set([...Object.keys(next).filter(key => /^on[A-Z]/.test(key)),
|
|
30
25
|
'onClose', ...(model ? [model.callback] : [])]);
|
|
@@ -44,25 +39,9 @@
|
|
|
44
39
|
target.appendChild(node);
|
|
45
40
|
return { update(next: HTMLElement) { next.appendChild(node); } };
|
|
46
41
|
}
|
|
47
|
-
function nativeChange(event: Event) {
|
|
48
|
-
props.onChange?.(event);
|
|
49
|
-
if (event.defaultPrevented) return;
|
|
50
|
-
const value = (event.currentTarget as HTMLSelectElement).value;
|
|
51
|
-
props.onValueChange?.(value);
|
|
52
|
-
onValueChange?.(value);
|
|
53
|
-
}
|
|
54
|
-
let selectProps = $derived.by(() => {
|
|
55
|
-
const { onChange, onValueChange, ...rest } = props;
|
|
56
|
-
return controlAttributes('select', rest);
|
|
57
|
-
});
|
|
58
42
|
</script>
|
|
59
43
|
|
|
60
44
|
<span bind:this={host} style="display: contents" data-rv-svelte-host={component}></span>
|
|
61
|
-
{#if component === 'NativeSelect'}
|
|
62
|
-
<select {...selectProps} onchange={nativeChange}>
|
|
63
|
-
{#if children}{@render children({})}{/if}
|
|
64
|
-
</select>
|
|
65
|
-
{/if}
|
|
66
45
|
{#each targets as target (target.id)}
|
|
67
46
|
<span use:portal={target.element} style="display: contents" data-rv-svelte-content>
|
|
68
47
|
{@render target.content(target.scope)}
|
package/svelte.js
CHANGED
|
@@ -1,93 +1,58 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
5
|
-
import { uiComponents as a } from "./framework.js";
|
|
1
|
+
import { i as e } from "./_chunks/component-C_T2VN5u.js";
|
|
2
|
+
import { t } from "./_chunks/component-metadata-BMOOmqx5.js";
|
|
3
|
+
import { n, t as r } from "./_chunks/framework-mount--RTLIqE-.js";
|
|
4
|
+
import { uiComponents as i } from "./framework.js";
|
|
6
5
|
import "svelte/internal/disclose-version";
|
|
7
|
-
import * as
|
|
8
|
-
import { onMount as
|
|
6
|
+
import * as a from "svelte/internal/client";
|
|
7
|
+
import { onMount as o, untrack as s } from "svelte";
|
|
9
8
|
//#region src/svelte/UiComponent.svelte
|
|
10
|
-
var
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
let e =
|
|
16
|
-
|
|
9
|
+
var c = a.from_html("<span style=\"display: contents\" data-rv-svelte-content=\"\"><!></span>"), l = a.from_html("<span style=\"display: contents\"></span> <!>", 1);
|
|
10
|
+
function u(e, u) {
|
|
11
|
+
a.push(u, !0);
|
|
12
|
+
let d = a.prop(u, "props", 19, () => ({})), f = a.prop(u, "slots", 19, () => ({})), p, m = a.state([]), h = a.state(void 0);
|
|
13
|
+
o(() => {
|
|
14
|
+
let e = r(p, (e) => {
|
|
15
|
+
a.set(m, e);
|
|
17
16
|
});
|
|
18
|
-
return
|
|
17
|
+
return a.set(h, e), () => {
|
|
19
18
|
e.destroy();
|
|
20
19
|
};
|
|
21
|
-
}),
|
|
22
|
-
let e = { ...
|
|
23
|
-
...
|
|
24
|
-
...
|
|
25
|
-
},
|
|
26
|
-
if (t === "NativeSelect") {
|
|
27
|
-
c(() => {
|
|
28
|
-
u?.render(() => null, {});
|
|
29
|
-
});
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
let d = n[t], f = /* @__PURE__ */ new Set([
|
|
20
|
+
}), a.user_effect(() => {
|
|
21
|
+
let e = { ...d() }, r = u.component, o = {
|
|
22
|
+
...f(),
|
|
23
|
+
...u.children ? { default: u.children } : {}
|
|
24
|
+
}, c = u.onValueChange, l = u.onUiEvent, p = a.get(h), m = t[r], g = /* @__PURE__ */ new Set([
|
|
33
25
|
...Object.keys(e).filter((e) => /^on[A-Z]/.test(e)),
|
|
34
26
|
"onClose",
|
|
35
|
-
...
|
|
27
|
+
...m ? [m.callback] : []
|
|
36
28
|
]);
|
|
37
|
-
for (let t of
|
|
29
|
+
for (let t of g) {
|
|
38
30
|
let n = e[t];
|
|
39
31
|
e[t] = (...e) => {
|
|
40
32
|
let r = n?.(...e);
|
|
41
|
-
return t ===
|
|
33
|
+
return t === m?.callback && c?.(e[0]), l?.({
|
|
42
34
|
name: t,
|
|
43
35
|
args: e
|
|
44
36
|
}), r;
|
|
45
37
|
};
|
|
46
38
|
}
|
|
47
|
-
|
|
39
|
+
s(() => p?.render(i[r], e, (e, t) => n(r, e, o, t)));
|
|
48
40
|
});
|
|
49
|
-
function
|
|
41
|
+
function g(e, t) {
|
|
50
42
|
return t.appendChild(e), { update(t) {
|
|
51
43
|
t.appendChild(e);
|
|
52
44
|
} };
|
|
53
45
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return e("select", r);
|
|
62
|
-
});
|
|
63
|
-
var S = f(), C = o.first_child(S);
|
|
64
|
-
o.bind_this(C, (e) => g = e, () => g);
|
|
65
|
-
var w = o.sibling(C, 2), T = (e) => {
|
|
66
|
-
var t = u();
|
|
67
|
-
o.attribute_effect(t, () => ({
|
|
68
|
-
...o.get(x),
|
|
69
|
-
onchange: b
|
|
70
|
-
})), o.customizable_select(t, () => {
|
|
71
|
-
var e = o.child(t), n = l(), r = o.first_child(n), i = (e) => {
|
|
72
|
-
var t = o.comment(), n = o.first_child(t);
|
|
73
|
-
o.snippet(n, () => p.children, () => ({})), o.append(e, t);
|
|
74
|
-
};
|
|
75
|
-
o.if(r, (e) => {
|
|
76
|
-
p.children && e(i);
|
|
77
|
-
}), o.append(e, n);
|
|
78
|
-
}), o.append(e, t);
|
|
79
|
-
};
|
|
80
|
-
o.if(w, (e) => {
|
|
81
|
-
p.component === "NativeSelect" && e(T);
|
|
82
|
-
});
|
|
83
|
-
var E = o.sibling(w, 2);
|
|
84
|
-
o.each(E, 17, () => o.get(_), (e) => e.id, (e, t) => {
|
|
85
|
-
var n = d(), r = o.child(n);
|
|
86
|
-
o.snippet(r, () => o.get(t).content, () => o.get(t).scope), o.reset(n), o.action(n, (e, t) => y?.(e, t), () => o.get(t).element), o.append(e, n);
|
|
87
|
-
}), o.template_effect(() => o.set_attribute(C, "data-rv-svelte-host", p.component)), o.append(t, S), o.pop();
|
|
46
|
+
var _ = l(), v = a.first_child(_);
|
|
47
|
+
a.bind_this(v, (e) => p = e, () => p);
|
|
48
|
+
var y = a.sibling(v, 2);
|
|
49
|
+
a.each(y, 17, () => a.get(m), (e) => e.id, (e, t) => {
|
|
50
|
+
var n = c(), r = a.child(n);
|
|
51
|
+
a.snippet(r, () => a.get(t).content, () => a.get(t).scope), a.reset(n), a.action(n, (e, t) => g?.(e, t), () => a.get(t).element), a.append(e, n);
|
|
52
|
+
}), a.template_effect(() => a.set_attribute(v, "data-rv-svelte-host", u.component)), a.append(e, _), a.pop();
|
|
88
53
|
}
|
|
89
54
|
//#endregion
|
|
90
55
|
//#region src/svelte.ts
|
|
91
|
-
var
|
|
56
|
+
var d = u;
|
|
92
57
|
//#endregion
|
|
93
|
-
export {
|
|
58
|
+
export { d as UiComponent, e as defaultPdfViewerText };
|
package/switch/index.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as e } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
2
2
|
//#region src/switch/index.tsx
|
|
3
|
-
function
|
|
4
|
-
let
|
|
3
|
+
function t({ checked: t, onChange: n, label: r, ariaLabel: i, className: a = "", disabled: o = !1, labelPosition: s = "before", title: c, testId: l }) {
|
|
4
|
+
let u = /* @__PURE__ */ e("span", {
|
|
5
5
|
class: "rv-switch-label",
|
|
6
|
-
children:
|
|
7
|
-
}),
|
|
6
|
+
children: r
|
|
7
|
+
}), d = /* @__PURE__ */ e("span", {
|
|
8
8
|
class: "rv-switch-track",
|
|
9
9
|
"aria-hidden": "true",
|
|
10
10
|
children: /* @__PURE__ */ e("span", { class: "rv-switch-thumb" })
|
|
11
11
|
});
|
|
12
|
-
return /* @__PURE__ */
|
|
12
|
+
return /* @__PURE__ */ e("button", {
|
|
13
13
|
type: "button",
|
|
14
|
-
class: `rv-switch ${
|
|
14
|
+
class: `rv-switch ${a}`.trim(),
|
|
15
15
|
role: "switch",
|
|
16
|
-
"aria-checked":
|
|
17
|
-
"aria-label":
|
|
18
|
-
disabled:
|
|
19
|
-
title:
|
|
20
|
-
"data-testid":
|
|
21
|
-
onClick: () =>
|
|
22
|
-
children: [
|
|
16
|
+
"aria-checked": t,
|
|
17
|
+
"aria-label": i ?? (typeof r == "string" ? r : void 0),
|
|
18
|
+
disabled: o,
|
|
19
|
+
title: c,
|
|
20
|
+
"data-testid": l,
|
|
21
|
+
onClick: () => n(!t),
|
|
22
|
+
children: [s === "before" ? u : d, s === "before" ? d : u]
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
//#endregion
|
|
26
|
-
export {
|
|
26
|
+
export { t as Switch };
|
package/time-grid.d.ts
CHANGED
package/time-grid.js
CHANGED
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { r as e, t } from "./_chunks/hooks.module-CG3gN83z.js";
|
|
2
|
+
import { t as n } from "./_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
3
|
+
import { t as r } from "./_chunks/native-control-C_yok8_-.js";
|
|
4
4
|
//#region src/time-grid.tsx
|
|
5
|
-
var
|
|
6
|
-
function
|
|
5
|
+
var i = (e, t) => `${e}:${t}`;
|
|
6
|
+
function a(e) {
|
|
7
7
|
return [
|
|
8
8
|
"rv-time-grid__cell",
|
|
9
9
|
e.weekend && "is-weekend",
|
|
10
10
|
e.outsideWorkHours && "is-outside-work-hours"
|
|
11
11
|
].filter(Boolean).join(" ");
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
let
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
class:
|
|
17
|
-
children: [/* @__PURE__ */
|
|
18
|
-
class:
|
|
13
|
+
function o(e) {
|
|
14
|
+
let t = (t) => `rv-time-grid__${t}${e.legacyClassPrefix ? ` ${e.legacyClassPrefix}__${t}` : ""}`, o = Array.from({ length: 12 }, (e, t) => t * 2);
|
|
15
|
+
return /* @__PURE__ */ n("div", {
|
|
16
|
+
class: t("schedule"),
|
|
17
|
+
children: [/* @__PURE__ */ n("div", {
|
|
18
|
+
class: t("hours"),
|
|
19
19
|
"aria-hidden": "true",
|
|
20
|
-
children: [/* @__PURE__ */
|
|
21
|
-
class:
|
|
22
|
-
children:
|
|
23
|
-
},
|
|
24
|
-
}), /* @__PURE__ */
|
|
25
|
-
ref:
|
|
26
|
-
class:
|
|
20
|
+
children: [/* @__PURE__ */ n("span", {}), o.map((r) => /* @__PURE__ */ n("span", {
|
|
21
|
+
class: t("hour"),
|
|
22
|
+
children: e.hourLabel(r)
|
|
23
|
+
}, r))]
|
|
24
|
+
}), /* @__PURE__ */ n("div", {
|
|
25
|
+
ref: e.matrixRef,
|
|
26
|
+
class: t("matrix"),
|
|
27
27
|
role: "grid",
|
|
28
|
-
"aria-label":
|
|
29
|
-
"aria-rowcount":
|
|
28
|
+
"aria-label": e.gridLabel,
|
|
29
|
+
"aria-rowcount": e.days.length,
|
|
30
30
|
"aria-colcount": 12,
|
|
31
|
-
children:
|
|
32
|
-
let { weekday:
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
-
class: `${
|
|
31
|
+
children: e.days.map((s) => {
|
|
32
|
+
let { weekday: c, short: l, long: u } = s, d = e.weekendDays.includes(c);
|
|
33
|
+
return /* @__PURE__ */ n("div", {
|
|
34
|
+
class: `${t("row")}${d ? " is-weekend" : ""}`,
|
|
35
35
|
role: "row",
|
|
36
|
-
children: [/* @__PURE__ */
|
|
37
|
-
class:
|
|
36
|
+
children: [/* @__PURE__ */ n("span", {
|
|
37
|
+
class: t("weekday"),
|
|
38
38
|
role: "rowheader",
|
|
39
|
-
title:
|
|
40
|
-
children:
|
|
41
|
-
}),
|
|
42
|
-
let
|
|
43
|
-
return /* @__PURE__ */ r
|
|
39
|
+
title: u,
|
|
40
|
+
children: l
|
|
41
|
+
}), o.map((t) => {
|
|
42
|
+
let o = i(c, t), l = e.cells.has(o) || e.cells.has(i(c, t + 1)), u = e.workingHours ? t < e.workingHours.startHour || t + 2 > e.workingHours.endHour : !1;
|
|
43
|
+
return /* @__PURE__ */ n(r, {
|
|
44
44
|
type: "button",
|
|
45
|
-
disabled:
|
|
45
|
+
disabled: e.disabled,
|
|
46
46
|
role: "gridcell",
|
|
47
|
-
"data-time-cell":
|
|
48
|
-
class: `${
|
|
49
|
-
weekend:
|
|
47
|
+
"data-time-cell": o,
|
|
48
|
+
class: `${a({
|
|
49
|
+
weekend: d,
|
|
50
50
|
outsideWorkHours: u
|
|
51
|
-
})} ${
|
|
52
|
-
"aria-selected":
|
|
53
|
-
"aria-label":
|
|
54
|
-
tabIndex:
|
|
55
|
-
onFocus: () =>
|
|
56
|
-
onKeyDown: (
|
|
57
|
-
onClick: (
|
|
58
|
-
onPointerDown: (
|
|
59
|
-
onPointerEnter: () =>
|
|
60
|
-
},
|
|
51
|
+
})} ${e.legacyClassPrefix ? `${e.legacyClassPrefix}__cell` : ""}`,
|
|
52
|
+
"aria-selected": l,
|
|
53
|
+
"aria-label": e.cellLabel(s, e.hourLabel(t), e.hourLabel(t + 2), l),
|
|
54
|
+
tabIndex: e.focused === o ? 0 : -1,
|
|
55
|
+
onFocus: () => e.onFocus(o),
|
|
56
|
+
onKeyDown: (n) => e.onKeyDown(n, c, t),
|
|
57
|
+
onClick: (n) => e.onClick(n, c, t, l),
|
|
58
|
+
onPointerDown: (n) => e.onPointerDown(n, c, t, l),
|
|
59
|
+
onPointerEnter: () => e.onPointerEnter(c, t)
|
|
60
|
+
}, o);
|
|
61
61
|
})]
|
|
62
|
-
},
|
|
62
|
+
}, c);
|
|
63
63
|
})
|
|
64
64
|
})]
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
let r = n
|
|
69
|
-
r.current =
|
|
70
|
-
let
|
|
67
|
+
function s(n) {
|
|
68
|
+
let r = t(n);
|
|
69
|
+
r.current = n;
|
|
70
|
+
let a = t(), o = t(), s = t(), c = () => {
|
|
71
71
|
o.current?.(), o.current = void 0;
|
|
72
72
|
};
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
e(() => () => {
|
|
74
|
+
a.current = void 0, c(), s.current !== void 0 && cancelAnimationFrame(s.current);
|
|
75
75
|
}, []);
|
|
76
76
|
let l = (e, t) => {
|
|
77
|
-
let n =
|
|
77
|
+
let n = i(e, t);
|
|
78
78
|
r.current.onFocus(n), s.current !== void 0 && cancelAnimationFrame(s.current), s.current = requestAnimationFrame(() => r.current.matrixRef.current?.querySelector(`[data-time-cell="${n}"]`)?.focus());
|
|
79
79
|
};
|
|
80
80
|
return {
|
|
@@ -97,18 +97,18 @@ function c(e) {
|
|
|
97
97
|
},
|
|
98
98
|
onPointerDown: (e, t, n, s) => {
|
|
99
99
|
if (r.current.disabled || e.button !== 0) return;
|
|
100
|
-
e.preventDefault(), c(),
|
|
100
|
+
e.preventDefault(), c(), a.current = { selected: !s };
|
|
101
101
|
let l = e.currentTarget.ownerDocument, u = () => {
|
|
102
|
-
|
|
102
|
+
a.current && (a.current = void 0, c(), r.current.onCommit());
|
|
103
103
|
};
|
|
104
104
|
l.addEventListener("pointerup", u), l.addEventListener("pointercancel", u), o.current = () => {
|
|
105
105
|
l.removeEventListener("pointerup", u), l.removeEventListener("pointercancel", u);
|
|
106
|
-
}, r.current.onPaint(t, n, !s), r.current.onFocus(
|
|
106
|
+
}, r.current.onPaint(t, n, !s), r.current.onFocus(i(t, n));
|
|
107
107
|
},
|
|
108
108
|
onPointerEnter: (e, t) => {
|
|
109
|
-
|
|
109
|
+
a.current && !r.current.disabled && r.current.onPaint(e, t, a.current.selected);
|
|
110
110
|
}
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
113
|
//#endregion
|
|
114
|
-
export {
|
|
114
|
+
export { o as TimeGrid, i as timeGridCellKey, s as useTimeGridInteraction };
|