@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
package/surfaces.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
/** Compatibility entry; markup is owned by the Preact TSX implementation. */
|
|
2
2
|
export * from './surfaces.view';
|
|
3
|
+
export { useTooltip, ControlTooltip as TooltipSurface } from './core/tooltip';
|
|
4
|
+
export { prepareTooltipSurface, ensureTooltipStyles } from './core/tooltip-surface';
|
|
5
|
+
export { TooltipText } from './core/tooltip-text';
|
package/surfaces.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "./_chunks/
|
|
3
|
-
import { inheritUiMotion as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { releasePreactElement as e } from "./preact-mount.js";
|
|
2
|
+
import { c as t, s as n } from "./_chunks/top-layer-popup-CNSDdfJV.js";
|
|
3
|
+
import { inheritUiMotion as r } from "./core/motion.js";
|
|
4
|
+
import { n as i, r as a, t as o } from "./_chunks/popover-controller-D-AvKQ7B.js";
|
|
5
|
+
import { r as s, t as c } from "./_chunks/tooltip-D4xkio5G.js";
|
|
6
|
+
import { createDialogElements as l, getDialogFocusableElements as u, trapDialogFocus as d } from "./dialog/dialog.dom.js";
|
|
7
|
+
import { attachDialogDrag as f } from "./dialog/dialog.drag.js";
|
|
8
|
+
import { t as p } from "./_chunks/tooltip-text-BXsUEmBH.js";
|
|
9
9
|
//#region src/surfaces.view.tsx
|
|
10
|
-
var
|
|
10
|
+
var m = /* @__PURE__ */ new WeakMap(), h = class {
|
|
11
11
|
document;
|
|
12
12
|
environment;
|
|
13
13
|
active;
|
|
@@ -17,33 +17,33 @@ var f = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap(), m = cl
|
|
|
17
17
|
get isOpen() {
|
|
18
18
|
return !!this.active;
|
|
19
19
|
}
|
|
20
|
-
open(
|
|
20
|
+
open(t) {
|
|
21
21
|
this.close();
|
|
22
|
-
let
|
|
23
|
-
|
|
24
|
-
let
|
|
25
|
-
if (
|
|
26
|
-
|
|
27
|
-
let
|
|
28
|
-
|
|
22
|
+
let n = this.document, i = n.activeElement, a = !1, o, s, c = m.get(n) ?? [];
|
|
23
|
+
m.set(n, c);
|
|
24
|
+
let p = () => {
|
|
25
|
+
if (a) return;
|
|
26
|
+
a = !0, o?.(), s?.(), e(h.root);
|
|
27
|
+
let n = c.indexOf(h.root), r = n === c.length - 1;
|
|
28
|
+
n !== -1 && c.splice(n, 1), this.active?.root === h.root && (this.active = void 0);
|
|
29
29
|
try {
|
|
30
|
-
|
|
30
|
+
t.onClose?.();
|
|
31
31
|
} finally {
|
|
32
|
-
|
|
32
|
+
r && (this.environment.restoreFocus ? this.environment.restoreFocus(t.returnFocus, i ?? void 0) : [t.returnFocus, i].find((e) => e?.isConnected)?.focus?.({ preventScroll: !0 }));
|
|
33
33
|
}
|
|
34
|
-
}, h =
|
|
34
|
+
}, h = l(n, t, p), g = {
|
|
35
35
|
...h,
|
|
36
|
-
close:
|
|
36
|
+
close: p
|
|
37
37
|
};
|
|
38
|
-
return this.environment.beforeMount?.(h.root), s =
|
|
39
|
-
e.target === h.root &&
|
|
38
|
+
return this.environment.beforeMount?.(h.root), s = r(t.returnFocus ?? i, h.root), h.root.addEventListener("mousedown", (e) => {
|
|
39
|
+
e.target === h.root && c.at(-1) === h.root && p();
|
|
40
40
|
}), h.root.addEventListener("keydown", (e) => {
|
|
41
|
-
|
|
42
|
-
}),
|
|
41
|
+
c.at(-1) === h.root && (e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), p()) : e.key === "Tab" && d(h.root, e));
|
|
42
|
+
}), n.body.append(h.root), c.push(h.root), t.draggable !== !1 && (o = f({
|
|
43
43
|
target: h.surface,
|
|
44
44
|
handle: h.header
|
|
45
|
-
})), this.active = g, this.environment.onOpen?.(
|
|
46
|
-
!
|
|
45
|
+
})), this.active = g, this.environment.onOpen?.(t), queueMicrotask(() => {
|
|
46
|
+
!a && c.at(-1) === h.root && (u(h.root)[0] ?? h.root).focus({ preventScroll: !0 });
|
|
47
47
|
}), g;
|
|
48
48
|
}
|
|
49
49
|
close(e) {
|
|
@@ -52,117 +52,20 @@ var f = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap(), m = cl
|
|
|
52
52
|
destroy() {
|
|
53
53
|
this.close();
|
|
54
54
|
}
|
|
55
|
-
}, h = class {
|
|
56
|
-
active;
|
|
57
|
-
get isOpen() {
|
|
58
|
-
return !!this.active;
|
|
59
|
-
}
|
|
60
|
-
open(t) {
|
|
61
|
-
this.close(!1);
|
|
62
|
-
let { anchor: a, content: o } = t, s = a.ownerDocument, c = s.defaultView, l = f.get(s) ?? [];
|
|
63
|
-
f.set(s, l);
|
|
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
|
-
b(!1);
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
let t = e(a.getBoundingClientRect(), o.getBoundingClientRect(), {
|
|
70
|
-
width: s.documentElement.clientWidth || c?.innerWidth || 0,
|
|
71
|
-
height: s.documentElement.clientHeight || c?.innerHeight || 0
|
|
72
|
-
});
|
|
73
|
-
Object.assign(o.style, {
|
|
74
|
-
left: `${t.left}px`,
|
|
75
|
-
top: `${t.top}px`
|
|
76
|
-
});
|
|
77
|
-
}, v, y = !1, b = (e = t.restoreFocus !== !1) => {
|
|
78
|
-
if (y) return;
|
|
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
|
-
}, x = (e) => {
|
|
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
|
-
}, S = (e) => {
|
|
87
|
-
l.at(-1) === o && e.key === "Escape" && t.closeOnEscape !== !1 && !e.defaultPrevented && (e.preventDefault(), e.stopPropagation(), b());
|
|
88
|
-
};
|
|
89
|
-
(t.appendTo ?? s.body).append(o), o.hidden = !1, Object.assign(o.style, {
|
|
90
|
-
position: "fixed",
|
|
91
|
-
inset: "auto",
|
|
92
|
-
margin: "0"
|
|
93
|
-
}), v = i(o, t.display ?? "block");
|
|
94
|
-
let C = c?.ResizeObserver ? new c.ResizeObserver(_) : void 0;
|
|
95
|
-
return C?.observe(a), C?.observe(o), this.active = {
|
|
96
|
-
content: o,
|
|
97
|
-
close: b,
|
|
98
|
-
position: _
|
|
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
|
-
close: b,
|
|
101
|
-
refresh: _
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
refresh() {
|
|
105
|
-
this.active?.position();
|
|
106
|
-
}
|
|
107
|
-
close(e) {
|
|
108
|
-
this.active?.close(e);
|
|
109
|
-
}
|
|
110
|
-
destroy() {
|
|
111
|
-
this.close(!1);
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
function g(e, n = "grid-tooltip") {
|
|
115
|
-
return a(e, /* @__PURE__ */ t("div", {
|
|
116
|
-
id: s("rv-tooltip"),
|
|
117
|
-
class: n,
|
|
118
|
-
role: "tooltip",
|
|
119
|
-
hidden: !0
|
|
120
|
-
}));
|
|
121
|
-
}
|
|
122
|
-
var _ = /* @__PURE__ */ new WeakMap(), v = class {
|
|
123
|
-
popover = new h();
|
|
124
|
-
release;
|
|
125
|
-
bind(e, t, n = {}) {
|
|
126
|
-
this.destroy();
|
|
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
|
-
c && e.setAttribute("aria-expanded", "false");
|
|
135
|
-
let u = () => {
|
|
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
|
-
anchor: e,
|
|
138
|
-
content: r,
|
|
139
|
-
restoreFocus: !1,
|
|
140
|
-
onClose: () => {
|
|
141
|
-
i(), r.hidden = !0, c && e.setAttribute("aria-expanded", "false"), s === null ? e.removeAttribute("aria-describedby") : e.setAttribute("aria-describedby", s);
|
|
142
|
-
}
|
|
143
|
-
}));
|
|
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
|
-
}, () => this.destroy();
|
|
148
|
-
}
|
|
149
|
-
destroy() {
|
|
150
|
-
this.release?.(), this.release = void 0, this.popover.destroy();
|
|
151
|
-
}
|
|
152
55
|
};
|
|
153
|
-
function
|
|
154
|
-
let
|
|
155
|
-
let
|
|
56
|
+
function g(e, t = () => {}, n = {}) {
|
|
57
|
+
let r = (r) => {
|
|
58
|
+
let i = Array.from(e.querySelectorAll("[role=\"menuitem\"], [role=\"menuitemcheckbox\"], [role=\"menuitemradio\"]")).filter((t) => t.closest("[role=\"menu\"]") === e && t.getAttribute("aria-disabled") !== "true" && !t.hasAttribute("disabled") && !t.hidden), a = i.indexOf(e.ownerDocument.activeElement);
|
|
156
59
|
[
|
|
157
60
|
"ArrowDown",
|
|
158
61
|
"ArrowUp",
|
|
159
62
|
"Home",
|
|
160
63
|
"End"
|
|
161
|
-
].includes(
|
|
64
|
+
].includes(r.key) && i.length ? (r.preventDefault(), r.stopPropagation(), i[r.key === "Home" ? 0 : r.key === "End" ? i.length - 1 : (a + (r.key === "ArrowUp" ? -1 : 1) + i.length) % i.length]?.focus()) : r.key === "Escape" && n.closeOnEscape !== !1 && (r.preventDefault(), r.stopPropagation(), t());
|
|
162
65
|
};
|
|
163
|
-
return e.addEventListener("keydown",
|
|
66
|
+
return e.addEventListener("keydown", r), () => e.removeEventListener("keydown", r);
|
|
164
67
|
}
|
|
165
|
-
function
|
|
68
|
+
function _(e, t) {
|
|
166
69
|
let n = typeof t == "function" ? t : () => t, r = n().value, i = r, a = () => {
|
|
167
70
|
let e = n();
|
|
168
71
|
return e.value !== i && (i = e.value, r = e.value), e;
|
|
@@ -195,4 +98,4 @@ function b(e, t) {
|
|
|
195
98
|
};
|
|
196
99
|
}
|
|
197
100
|
//#endregion
|
|
198
|
-
export {
|
|
101
|
+
export { h as DialogController, o as PopoverController, i as TooltipController, c as TooltipSurface, p as TooltipText, g as attachMenuKeyboard, _ as attachResizeHandle, a as createTooltipElement, n as ensureTooltipStyles, t as prepareTooltipSurface, s as useTooltip };
|
package/surfaces.view.d.ts
CHANGED
|
@@ -15,41 +15,11 @@ export declare class DialogController {
|
|
|
15
15
|
close(root?: HTMLElement): void;
|
|
16
16
|
destroy(): void;
|
|
17
17
|
}
|
|
18
|
-
export
|
|
19
|
-
anchor: HTMLElement;
|
|
20
|
-
content: HTMLElement;
|
|
21
|
-
/** Defaults to the document body. */
|
|
22
|
-
appendTo?: HTMLElement;
|
|
23
|
-
onClose?: () => void;
|
|
24
|
-
restoreFocus?: boolean;
|
|
25
|
-
closeOnOutside?: boolean;
|
|
26
|
-
closeOnEscape?: boolean;
|
|
27
|
-
display?: string;
|
|
28
|
-
}
|
|
29
|
-
/** One owner for native top-layer promotion, viewport positioning and disposal. */
|
|
30
|
-
export declare class PopoverController {
|
|
31
|
-
private active?;
|
|
32
|
-
get isOpen(): boolean;
|
|
33
|
-
open(options: PopoverOptions): {
|
|
34
|
-
close: (restoreFocus?: boolean) => void;
|
|
35
|
-
refresh: () => void;
|
|
36
|
-
};
|
|
37
|
-
refresh(): void;
|
|
38
|
-
close(restoreFocus?: boolean): void;
|
|
39
|
-
destroy(): void;
|
|
40
|
-
}
|
|
41
|
-
export declare function createTooltipElement(document: Document, className?: string): HTMLDivElement;
|
|
42
|
-
/** Plain text tooltip with keyboard, pointer and explicit teardown support. */
|
|
43
|
-
export declare class TooltipController {
|
|
44
|
-
private readonly popover;
|
|
45
|
-
private release?;
|
|
46
|
-
bind(anchor: HTMLElement, text: string, options?: {
|
|
47
|
-
trigger?: 'hover' | 'click';
|
|
48
|
-
}): () => void;
|
|
49
|
-
destroy(): void;
|
|
50
|
-
}
|
|
18
|
+
export { PopoverController, TooltipController, createTooltipElement, type PopoverOptions } from './core/popover-controller';
|
|
51
19
|
/** Keyboard behavior for menu surfaces; activation stays on native buttons. */
|
|
52
|
-
export declare function attachMenuKeyboard(menu: HTMLElement, onClose?: () => void
|
|
20
|
+
export declare function attachMenuKeyboard(menu: HTMLElement, onClose?: () => void, options?: {
|
|
21
|
+
closeOnEscape?: boolean;
|
|
22
|
+
}): () => void;
|
|
53
23
|
export interface ResizeOptions {
|
|
54
24
|
value: number;
|
|
55
25
|
min?: number;
|
package/svelte.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as e } from "./_chunks/component-
|
|
1
|
+
import { i as e } from "./_chunks/component-qKctqdzk.js";
|
|
2
2
|
import { t } from "./_chunks/component-metadata-BMOOmqx5.js";
|
|
3
3
|
import { n, t as r } from "./_chunks/framework-mount--RTLIqE-.js";
|
|
4
4
|
import { uiComponents as i } from "./framework.js";
|
package/switch/index.js
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
import { t as e } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
2
|
+
import { t } from "../_chunks/native-control-DO0d1kgx.js";
|
|
2
3
|
//#region src/switch/index.tsx
|
|
3
|
-
function
|
|
4
|
-
let
|
|
4
|
+
function n({ checked: n, onChange: r, label: i, ariaLabel: a, className: o = "", disabled: s = !1, labelPosition: c = "before", title: l, testId: u }) {
|
|
5
|
+
let d = /* @__PURE__ */ e("span", {
|
|
5
6
|
class: "rv-switch-label",
|
|
6
|
-
children:
|
|
7
|
-
}),
|
|
7
|
+
children: i
|
|
8
|
+
}), f = /* @__PURE__ */ e("span", {
|
|
8
9
|
class: "rv-switch-track",
|
|
9
10
|
"aria-hidden": "true",
|
|
10
11
|
children: /* @__PURE__ */ e("span", { class: "rv-switch-thumb" })
|
|
11
12
|
});
|
|
12
|
-
return /* @__PURE__ */ e(
|
|
13
|
+
return /* @__PURE__ */ e(t, {
|
|
13
14
|
type: "button",
|
|
14
|
-
class: `rv-switch ${
|
|
15
|
+
class: `rv-switch ${o}`.trim(),
|
|
15
16
|
role: "switch",
|
|
16
|
-
"aria-checked":
|
|
17
|
-
"aria-label":
|
|
18
|
-
disabled:
|
|
19
|
-
title:
|
|
20
|
-
"data-testid":
|
|
21
|
-
onClick: () =>
|
|
22
|
-
children: [
|
|
17
|
+
"aria-checked": n,
|
|
18
|
+
"aria-label": a ?? (typeof i == "string" ? i : void 0),
|
|
19
|
+
disabled: s,
|
|
20
|
+
title: l,
|
|
21
|
+
"data-testid": u,
|
|
22
|
+
onClick: () => r(!n),
|
|
23
|
+
children: [c === "before" ? d : f, c === "before" ? f : d]
|
|
23
24
|
});
|
|
24
25
|
}
|
|
25
26
|
//#endregion
|
|
26
|
-
export {
|
|
27
|
+
export { n as Switch };
|
package/time-grid.js
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { r as e, t } from "./_chunks/hooks.module-CG3gN83z.js";
|
|
2
2
|
import { t as n } from "./_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
3
|
-
import { t as r } from "./_chunks/native-control-
|
|
3
|
+
import { t as r } from "./_chunks/native-control-DO0d1kgx.js";
|
|
4
|
+
import { t as i } from "./_chunks/tooltip-text-BXsUEmBH.js";
|
|
4
5
|
//#region src/time-grid.tsx
|
|
5
|
-
var
|
|
6
|
-
function
|
|
6
|
+
var a = (e, t) => `${e}:${t}`;
|
|
7
|
+
function o(e) {
|
|
7
8
|
return [
|
|
8
9
|
"rv-time-grid__cell",
|
|
9
10
|
e.weekend && "is-weekend",
|
|
10
11
|
e.outsideWorkHours && "is-outside-work-hours"
|
|
11
12
|
].filter(Boolean).join(" ");
|
|
12
13
|
}
|
|
13
|
-
function
|
|
14
|
-
let t = (t) => `rv-time-grid__${t}${e.legacyClassPrefix ? ` ${e.legacyClassPrefix}__${t}` : ""}`,
|
|
14
|
+
function s(e) {
|
|
15
|
+
let t = (t) => `rv-time-grid__${t}${e.legacyClassPrefix ? ` ${e.legacyClassPrefix}__${t}` : ""}`, s = Array.from({ length: 12 }, (e, t) => t * 2);
|
|
15
16
|
return /* @__PURE__ */ n("div", {
|
|
16
17
|
class: t("schedule"),
|
|
17
18
|
children: [/* @__PURE__ */ n("div", {
|
|
18
19
|
class: t("hours"),
|
|
19
20
|
"aria-hidden": "true",
|
|
20
|
-
children: [/* @__PURE__ */ n("span", {}),
|
|
21
|
+
children: [/* @__PURE__ */ n("span", {}), s.map((r) => /* @__PURE__ */ n("span", {
|
|
21
22
|
class: t("hour"),
|
|
22
23
|
children: e.hourLabel(r)
|
|
23
24
|
}, r))]
|
|
@@ -28,53 +29,53 @@ function o(e) {
|
|
|
28
29
|
"aria-label": e.gridLabel,
|
|
29
30
|
"aria-rowcount": e.days.length,
|
|
30
31
|
"aria-colcount": 12,
|
|
31
|
-
children: e.days.map((
|
|
32
|
-
let { weekday:
|
|
32
|
+
children: e.days.map((c) => {
|
|
33
|
+
let { weekday: l, short: u, long: d } = c, f = e.weekendDays.includes(l);
|
|
33
34
|
return /* @__PURE__ */ n("div", {
|
|
34
|
-
class: `${t("row")}${
|
|
35
|
+
class: `${t("row")}${f ? " is-weekend" : ""}`,
|
|
35
36
|
role: "row",
|
|
36
|
-
children: [/* @__PURE__ */ n(
|
|
37
|
+
children: [/* @__PURE__ */ n(i, {
|
|
37
38
|
class: t("weekday"),
|
|
38
39
|
role: "rowheader",
|
|
39
|
-
title:
|
|
40
|
-
children:
|
|
41
|
-
}),
|
|
42
|
-
let
|
|
40
|
+
title: d,
|
|
41
|
+
children: u
|
|
42
|
+
}), s.map((t) => {
|
|
43
|
+
let i = a(l, t), s = e.cells.has(i) || e.cells.has(a(l, t + 1)), u = e.workingHours ? t < e.workingHours.startHour || t + 2 > e.workingHours.endHour : !1;
|
|
43
44
|
return /* @__PURE__ */ n(r, {
|
|
44
45
|
type: "button",
|
|
45
46
|
disabled: e.disabled,
|
|
46
47
|
role: "gridcell",
|
|
47
|
-
"data-time-cell":
|
|
48
|
-
class: `${
|
|
49
|
-
weekend:
|
|
48
|
+
"data-time-cell": i,
|
|
49
|
+
class: `${o({
|
|
50
|
+
weekend: f,
|
|
50
51
|
outsideWorkHours: u
|
|
51
52
|
})} ${e.legacyClassPrefix ? `${e.legacyClassPrefix}__cell` : ""}`,
|
|
52
|
-
"aria-selected":
|
|
53
|
-
"aria-label": e.cellLabel(
|
|
54
|
-
tabIndex: e.focused ===
|
|
55
|
-
onFocus: () => e.onFocus(
|
|
56
|
-
onKeyDown: (n) => e.onKeyDown(n,
|
|
57
|
-
onClick: (n) => e.onClick(n,
|
|
58
|
-
onPointerDown: (n) => e.onPointerDown(n,
|
|
59
|
-
onPointerEnter: () => e.onPointerEnter(
|
|
60
|
-
},
|
|
53
|
+
"aria-selected": s,
|
|
54
|
+
"aria-label": e.cellLabel(c, e.hourLabel(t), e.hourLabel(t + 2), s),
|
|
55
|
+
tabIndex: e.focused === i ? 0 : -1,
|
|
56
|
+
onFocus: () => e.onFocus(i),
|
|
57
|
+
onKeyDown: (n) => e.onKeyDown(n, l, t),
|
|
58
|
+
onClick: (n) => e.onClick(n, l, t, s),
|
|
59
|
+
onPointerDown: (n) => e.onPointerDown(n, l, t, s),
|
|
60
|
+
onPointerEnter: () => e.onPointerEnter(l, t)
|
|
61
|
+
}, i);
|
|
61
62
|
})]
|
|
62
|
-
},
|
|
63
|
+
}, l);
|
|
63
64
|
})
|
|
64
65
|
})]
|
|
65
66
|
});
|
|
66
67
|
}
|
|
67
|
-
function
|
|
68
|
+
function c(n) {
|
|
68
69
|
let r = t(n);
|
|
69
70
|
r.current = n;
|
|
70
|
-
let
|
|
71
|
+
let i = t(), o = t(), s = t(), c = () => {
|
|
71
72
|
o.current?.(), o.current = void 0;
|
|
72
73
|
};
|
|
73
74
|
e(() => () => {
|
|
74
|
-
|
|
75
|
+
i.current = void 0, c(), s.current !== void 0 && cancelAnimationFrame(s.current);
|
|
75
76
|
}, []);
|
|
76
77
|
let l = (e, t) => {
|
|
77
|
-
let n =
|
|
78
|
+
let n = a(e, t);
|
|
78
79
|
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
80
|
};
|
|
80
81
|
return {
|
|
@@ -97,18 +98,18 @@ function s(n) {
|
|
|
97
98
|
},
|
|
98
99
|
onPointerDown: (e, t, n, s) => {
|
|
99
100
|
if (r.current.disabled || e.button !== 0) return;
|
|
100
|
-
e.preventDefault(), c(),
|
|
101
|
+
e.preventDefault(), c(), i.current = { selected: !s };
|
|
101
102
|
let l = e.currentTarget.ownerDocument, u = () => {
|
|
102
|
-
|
|
103
|
+
i.current && (i.current = void 0, c(), r.current.onCommit());
|
|
103
104
|
};
|
|
104
105
|
l.addEventListener("pointerup", u), l.addEventListener("pointercancel", u), o.current = () => {
|
|
105
106
|
l.removeEventListener("pointerup", u), l.removeEventListener("pointercancel", u);
|
|
106
|
-
}, r.current.onPaint(t, n, !s), r.current.onFocus(
|
|
107
|
+
}, r.current.onPaint(t, n, !s), r.current.onFocus(a(t, n));
|
|
107
108
|
},
|
|
108
109
|
onPointerEnter: (e, t) => {
|
|
109
|
-
|
|
110
|
+
i.current && !r.current.disabled && r.current.onPaint(e, t, i.current.selected);
|
|
110
111
|
}
|
|
111
112
|
};
|
|
112
113
|
}
|
|
113
114
|
//#endregion
|
|
114
|
-
export {
|
|
115
|
+
export { s as TimeGrid, a as timeGridCellKey, c as useTimeGridInteraction };
|
package/timeline-track/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "../_chunks/hooks.module-CG3gN83z.js";
|
|
2
2
|
import { t } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
3
|
-
import { t as n } from "../_chunks/native-control-
|
|
4
|
-
import { n as r } from "../_chunks/
|
|
3
|
+
import { t as n } from "../_chunks/native-control-DO0d1kgx.js";
|
|
4
|
+
import { n as r } from "../_chunks/tooltip-D4xkio5G.js";
|
|
5
5
|
import { eventOutsideRange as i, moveTimelineEvent as a, niceTimelineStep as o, resizeTimelineEvent as s, timelineEventBackground as c, timelineGeometry as l } from "./model.js";
|
|
6
6
|
//#region src/timeline-track/component.tsx
|
|
7
7
|
var u = {
|