@revolist/ui 4.0.6 → 4.0.10
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/README.md +37 -1
- package/_chunks/{arrow-up-Cw8hW9vp.js → arrow-up-BSYhTAus.js} +1 -1
- package/_chunks/{calculator-CDWOuAcp.js → calculator-BG0Xd_Uw.js} +1 -1
- package/_chunks/{calendar-BQYQLu8Q.js → calendar-CQHVwHLW.js} +3 -3
- package/_chunks/{chart-frame-GprenwEg.js → chart-frame-pj5EQxXr.js} +5 -5
- package/_chunks/{check-BwI7iCAm.js → check-BFIC9pge.js} +1 -1
- package/_chunks/{chevron-down-GbplLa6s.js → chevron-down-BkrpxJYD.js} +1 -1
- package/_chunks/{chevron-right-CM3ljziP.js → chevron-right-DZ79RmYV.js} +1 -1
- package/_chunks/{chevron-up-BLuNMPDn.js → chevron-up-Dt846uIR.js} +1 -1
- package/_chunks/{choice-chips-C5OxD0GV.js → choice-chips-BIGT7gjO.js} +4 -4
- package/_chunks/{clock-BOhPNlW3.js → clock-DTfr4p2S.js} +1 -1
- package/_chunks/{color-palette-7siNch__.js → color-palette-DL0f3igd.js} +3 -3
- package/_chunks/{color-picker-Cfc9eqZb.js → color-picker-BWBM9GE1.js} +7 -7
- package/_chunks/{component-C3k_8uIq.js → component-B22CtP21.js} +58 -43
- package/_chunks/{component-metadata-DlVkpW3h.js → component-metadata-B_hLjtM0.js} +4 -1
- package/_chunks/{configurator-actions-vRnI54mO.js → configurator-actions-BhIk4oM_.js} +18 -18
- package/_chunks/{configurator-field-icon-CmcM_sPs.js → configurator-field-icon-B0S_208W.js} +2 -2
- package/_chunks/{control-BRfF5DWQ.js → control-zCLB1tGz.js} +2 -2
- package/_chunks/{controller-BbiQuRt-.js → controller-ChkqiANQ.js} +1 -1
- package/_chunks/{controls-B3EgM_DS.js → controls-Ip2E6jIu.js} +10 -9
- package/_chunks/{date-control-87dcA5br.js → date-control-UmJvxQ5C.js} +4 -4
- package/_chunks/{date-time-CfiFYodx.js → date-time-B9YGqree.js} +57 -57
- package/_chunks/{delete-button-jneO24wa.js → delete-button-DQSK6G-4.js} +1 -1
- package/_chunks/{dialog.parts-NqEEVc9P.js → dialog.parts-CpMwNhTM.js} +5 -5
- package/_chunks/{duration-BGZ_qJ99.js → duration-BrsE4QgL.js} +15 -15
- package/_chunks/{editor-commit-Dyo-FMgD.js → editor-commit-BXIUX0As.js} +2 -2
- package/_chunks/{editor-popup-NNP9Fh9U.js → editor-popup-Ds0GPAcn.js} +3 -3
- package/_chunks/{field-configurator-DPulsY3l.js → field-configurator-BMQnmWNd.js} +10 -9
- package/_chunks/{field-context-C4_WrO2z.js → field-context-0oUi-w-G.js} +1 -1
- package/_chunks/{framework-mount-D4I8HpVp.js → framework-mount-CX0oj05W.js} +3 -3
- package/_chunks/{hooks.module-CG3gN83z.js → hooks.module-CXpO2xq6.js} +2 -2
- package/_chunks/{icon-toolbar-BAAdEvr9.js → icon-toolbar-C4J_Wqph.js} +6 -6
- package/_chunks/{jsxRuntime.module-F6UFnpT-.js → jsxRuntime.module-ksX_VSbv.js} +2 -2
- package/_chunks/{magnifying-glass-CvrTDSkB.js → magnifying-glass-BFZrFs8M.js} +1 -1
- package/_chunks/{minus-BOAR3A1C.js → minus-DE8NPK_D.js} +1 -1
- package/_chunks/{mount-C8CnIW9k.js → mount-BgI_QV2H.js} +7 -7
- package/_chunks/native-C9tJWAXF.js +52 -0
- package/_chunks/{native-CJm3eq3-.js → native-RudS9C_q.js} +2 -2
- package/_chunks/{native-control-um1L1wgZ.js → native-control-DjJ8Na3T.js} +49 -44
- package/_chunks/{number-input-CKiA4d1N.js → number-input-Bb5guKP4.js} +4 -4
- package/_chunks/{picker-igNshTRC.js → picker-DDUmhT93.js} +5 -5
- package/_chunks/{plus-CbGRkIGl.js → plus-BaXticu7.js} +1 -1
- package/_chunks/{popup-DECYM9FI.js → popup-HEUnOeq-.js} +5 -5
- package/_chunks/{preact.module-BBM36DnO.js → preact.module-DzTStiZX.js} +1 -1
- package/_chunks/{rating-choice-CepVfGUq.js → rating-choice-CtrABPp-.js} +3 -3
- package/_chunks/{render-bTk3curw.js → render-C6PFWlqh.js} +2 -2
- package/_chunks/{reorder-list-B4w3aARt.js → reorder-list-DvwZcFPH.js} +4 -4
- package/_chunks/{request-trail-B1zVRPEf.js → request-trail-D5PKrBlC.js} +11 -11
- package/_chunks/{rich-text-Ci4d6dHn.js → rich-text-DW1vcBAY.js} +31 -31
- package/_chunks/{rotate-left-BF6G883o.js → rotate-left-CTHmcGBP.js} +1 -1
- package/_chunks/{rotate-right-Iha5ScJ1.js → rotate-right-BIfKgVun.js} +1 -1
- package/_chunks/{selection-list-tooltips-m00U3L6z.js → selection-list-tooltips-j84Wufjj.js} +8 -4
- package/_chunks/{title-tooltip-ncldbUwS.js → title-tooltip-DKiWhsL7.js} +1 -1
- package/_chunks/tooltip-BkuH0JdW.js +93 -0
- package/_chunks/tooltip-session-BBKkwhLZ.js +244 -0
- package/_chunks/{tooltip-text-BN5WdGHn.js → tooltip-text-CH_c2J-J.js} +2 -2
- package/_chunks/top-layer-popup-DU1r_2v5.js +107 -0
- package/_chunks/{xmark-DD_PBvZI.js → xmark-DQRQfXZI.js} +1 -1
- package/activity-message.js +1 -1
- package/ai/index.js +2 -2
- package/angular/angular.d.ts +2 -0
- package/angular/angular.js +1 -0
- package/assignee/index.js +28 -28
- package/avatar/index.js +3 -3
- package/browser/favicon.svg +9 -0
- package/browser/pdf-viewer.css +2 -0
- package/browser/pdf.worker.min.mjs +28 -0
- package/browser/pdfjs-LICENSE +177 -0
- package/browser/revo-ui.global.js +671 -0
- package/browser/revo-ui.js +35538 -0
- package/browser/robots.txt +4 -0
- package/browser.d.ts +3 -0
- package/browser.js +34 -0
- package/brush-range/component.js +2 -2
- package/buttons/delete-button.js +1 -1
- package/buttons/remove-button.js +2 -2
- package/buttons/svg-button.js +4 -4
- package/calendar/_calendar.scss +12 -4
- package/calendar/calendar.js +1 -1
- package/calendar/day.js +1 -1
- package/calendar/header.js +2 -2
- package/calendar/index.js +2 -2
- package/calendar/month-grid.js +1 -1
- package/calendar/year-grid.js +1 -1
- package/checkbox/index.js +1 -1
- package/choice-chips/index.js +1 -1
- package/color-palette/color-palette.js +1 -1
- package/color-palette/color-picker.js +2 -2
- package/configurator-actions.js +1 -1
- package/configurator-aggregation-list.js +6 -6
- package/configurator-drop-zone.js +3 -3
- package/configurator-field-icon.js +1 -1
- package/configurator-focus.js +1 -1
- package/configurator-sections.js +3 -3
- package/control-presentation.js +2 -2
- package/controls.js +2 -2
- package/core/editor-popup.js +1 -1
- package/core/popover-controller.d.ts +31 -6
- package/core/popover-controller.js +171 -46
- package/core/popup-ownership.d.ts +1 -1
- package/core/tooltip-options.d.ts +143 -0
- package/core/tooltip-options.js +20 -0
- package/core/tooltip-session.d.ts +32 -8
- package/core/tooltip-surface.d.ts +14 -3
- package/core/tooltip.d.ts +20 -19
- package/core/top-layer-popup.d.ts +2 -1
- package/core/top-layer-popup.js +1 -1
- package/date-time/index.js +1 -1
- package/dialog/dialog.dom.js +3 -3
- package/dialog/dialog.parts.js +1 -1
- package/dialog/dialog.preact.js +1 -1
- package/distribution-chart/area-chart.js +3 -3
- package/distribution-chart/bar-chart.js +2 -2
- package/distribution-chart/index.js +1 -1
- package/distribution-chart/line-chart.js +2 -2
- package/dropdown/content.d.ts +3 -1
- package/dropdown/content.js +1 -1
- package/dropdown/control.js +1 -1
- package/dropdown/dropdown.service.js +56 -56
- package/dropdown/index.js +2 -2
- package/dropdown/lookup-field.js +7 -7
- package/dropdown/popup.js +1 -1
- package/duration/index.js +1 -1
- package/editor-actions.js +3 -3
- package/editor-layout/index.js +3 -3
- package/field-configurator.js +1 -1
- package/field-reorder.hook.js +1 -1
- package/filter/filters/slider/preact.js +1 -1
- package/filter/filters/slider/runtime.js +1 -1
- package/filter/filters/slider/single.js +2 -2
- package/filter-badge.js +4 -4
- package/filter-controls.js +3 -3
- package/form-controls/index.js +3 -3
- package/form-controls/presentation.js +4 -4
- package/formatting/index.js +7 -7
- package/framework.js +135 -135
- package/history-controls.js +3 -3
- package/icon-toolbar.js +1 -1
- package/icons/icon.js +1 -1
- package/legend.js +1 -1
- package/masked-input/index.js +3 -3
- package/native-control.js +1 -1
- package/native.js +29 -79
- package/number-input/index.js +1 -1
- package/package.json +21 -1
- package/pagination.js +1 -1
- package/pdf-viewer/controller.js +1 -1
- package/pdf-viewer/index.js +3 -3
- package/pickers.d.ts +11 -4
- package/preact-mount.js +1 -1
- package/preact.d.ts +2 -0
- package/preact.js +66 -65
- package/rating-choice.js +1 -1
- package/react-adapter.d.ts +1 -1
- package/react.d.ts +2 -0
- package/react.js +64 -63
- package/reorder-list.js +1 -1
- package/resource-picker/resource-picker-avatar.js +2 -2
- package/resource-picker/resource-picker-option.js +1 -1
- package/resource-picker/resource-picker-popup.js +2 -2
- package/resource-picker/resource-picker.js +5 -5
- package/rich-text/index.js +1 -1
- package/search-input/index.js +3 -3
- package/segmented-switch/index.js +1 -1
- package/select.js +1 -1
- package/selection-list.js +1 -1
- package/status-feedback/exit-snapshot.js +1 -1
- package/status-feedback/header.js +3 -3
- package/status-feedback/index.js +1 -1
- package/status-feedback/popover.js +1 -1
- package/status-feedback/render.js +1 -1
- package/styles.css +1 -1
- package/surfaces.d.ts +1 -0
- package/surfaces.js +25 -24
- package/svelte.d.ts +2 -0
- package/svelte.js +30 -29
- package/switch/index.js +2 -2
- package/time-grid.js +4 -4
- package/timeline-track/_style.scss +33 -2
- package/timeline-track/component.d.ts +10 -1
- package/timeline-track/index.js +136 -74
- package/ui.css +1 -1
- package/vue.d.ts +11 -13
- package/vue.js +94 -90
- package/_chunks/tooltip-h-Z8yFBY.js +0 -54
- package/_chunks/tooltip-session-CBtRMBPr.js +0 -110
- package/_chunks/top-layer-popup-CKJ7VJOF.js +0 -59
package/surfaces.d.ts
CHANGED
|
@@ -36,3 +36,4 @@ export declare function attachResizeHandle(handle: HTMLElement, options: ResizeO
|
|
|
36
36
|
export { useTooltip, ControlTooltip } from './core/tooltip';
|
|
37
37
|
export { prepareTooltipSurface, ensureTooltipStyles, } from './core/tooltip-surface';
|
|
38
38
|
export { TooltipText } from './core/tooltip-text';
|
|
39
|
+
export * from './core/tooltip-options';
|
package/surfaces.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { releasePreactElement as e } from "./preact-mount.js";
|
|
2
|
-
import {
|
|
2
|
+
import { l as t, s as n } from "./_chunks/top-layer-popup-DU1r_2v5.js";
|
|
3
3
|
import { inheritUiMotion as r } from "./core/motion.js";
|
|
4
4
|
import { PopoverController as i, TooltipController as a, createTooltipElement as o } from "./core/popover-controller.js";
|
|
5
|
-
import { r as s, t as c } from "./_chunks/tooltip-
|
|
5
|
+
import { r as s, t as c } from "./_chunks/tooltip-BkuH0JdW.js";
|
|
6
6
|
import { createDialogElements as l, getDialogFocusableElements as u, trapDialogFocus as d } from "./dialog/dialog.dom.js";
|
|
7
7
|
import { attachDialogDrag as f } from "./dialog/dialog.drag.js";
|
|
8
|
-
import { t as p } from "./_chunks/tooltip-text-
|
|
8
|
+
import { t as p } from "./_chunks/tooltip-text-CH_c2J-J.js";
|
|
9
|
+
import { TooltipGroup as m, createTooltipGroup as h } from "./core/tooltip-options.js";
|
|
9
10
|
//#region package/surfaces.tsx
|
|
10
|
-
var
|
|
11
|
+
var g = /* @__PURE__ */ new WeakMap(), _ = class {
|
|
11
12
|
document;
|
|
12
13
|
environment;
|
|
13
14
|
active;
|
|
@@ -19,32 +20,32 @@ var m = /* @__PURE__ */ new WeakMap(), h = class {
|
|
|
19
20
|
}
|
|
20
21
|
open(t) {
|
|
21
22
|
this.close();
|
|
22
|
-
let n = this.document, i = n.activeElement, a = !1, o, s, c =
|
|
23
|
-
|
|
23
|
+
let n = this.document, i = n.activeElement, a = !1, o, s, c = g.get(n) ?? [];
|
|
24
|
+
g.set(n, c);
|
|
24
25
|
let p = () => {
|
|
25
26
|
if (a) return;
|
|
26
|
-
a = !0, o?.(), s?.(), e(
|
|
27
|
-
let n = c.indexOf(
|
|
28
|
-
n !== -1 && c.splice(n, 1), this.active?.root ===
|
|
27
|
+
a = !0, o?.(), s?.(), e(m.root);
|
|
28
|
+
let n = c.indexOf(m.root), r = n === c.length - 1;
|
|
29
|
+
n !== -1 && c.splice(n, 1), this.active?.root === m.root && (this.active = void 0);
|
|
29
30
|
try {
|
|
30
31
|
t.onClose?.();
|
|
31
32
|
} finally {
|
|
32
33
|
r && (this.environment.restoreFocus ? this.environment.restoreFocus(t.returnFocus, i ?? void 0) : [t.returnFocus, i].find((e) => e?.isConnected)?.focus?.({ preventScroll: !0 }));
|
|
33
34
|
}
|
|
34
|
-
},
|
|
35
|
-
...
|
|
35
|
+
}, m = l(n, t, p), h = {
|
|
36
|
+
...m,
|
|
36
37
|
close: p
|
|
37
38
|
};
|
|
38
|
-
return this.environment.beforeMount?.(
|
|
39
|
-
e.target ===
|
|
40
|
-
}),
|
|
41
|
-
c.at(-1) ===
|
|
42
|
-
}), n.body.append(
|
|
43
|
-
target:
|
|
44
|
-
handle:
|
|
45
|
-
})), this.active =
|
|
46
|
-
!a && c.at(-1) ===
|
|
47
|
-
}),
|
|
39
|
+
return this.environment.beforeMount?.(m.root), s = r(t.returnFocus ?? i, m.root), m.root.addEventListener("mousedown", (e) => {
|
|
40
|
+
e.target === m.root && c.at(-1) === m.root && p();
|
|
41
|
+
}), m.root.addEventListener("keydown", (e) => {
|
|
42
|
+
c.at(-1) === m.root && (e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), p()) : e.key === "Tab" && d(m.root, e));
|
|
43
|
+
}), n.body.append(m.root), c.push(m.root), t.draggable !== !1 && (o = f({
|
|
44
|
+
target: m.surface,
|
|
45
|
+
handle: m.header
|
|
46
|
+
})), this.active = h, this.environment.onOpen?.(t), queueMicrotask(() => {
|
|
47
|
+
!a && c.at(-1) === m.root && (u(m.root)[0] ?? m.root).focus({ preventScroll: !0 });
|
|
48
|
+
}), h;
|
|
48
49
|
}
|
|
49
50
|
close(e) {
|
|
50
51
|
(!e || this.active?.root === e) && this.active?.close();
|
|
@@ -53,7 +54,7 @@ var m = /* @__PURE__ */ new WeakMap(), h = class {
|
|
|
53
54
|
this.close();
|
|
54
55
|
}
|
|
55
56
|
};
|
|
56
|
-
function
|
|
57
|
+
function v(e, t = () => {}, n = {}) {
|
|
57
58
|
let r = (r) => {
|
|
58
59
|
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);
|
|
59
60
|
[
|
|
@@ -65,7 +66,7 @@ function g(e, t = () => {}, n = {}) {
|
|
|
65
66
|
};
|
|
66
67
|
return e.addEventListener("keydown", r), () => e.removeEventListener("keydown", r);
|
|
67
68
|
}
|
|
68
|
-
function
|
|
69
|
+
function y(e, t) {
|
|
69
70
|
let n = typeof t == "function" ? t : () => t, r = n().value, i = r, a = () => {
|
|
70
71
|
let e = n();
|
|
71
72
|
return e.value !== i && (i = e.value, r = e.value), e;
|
|
@@ -98,4 +99,4 @@ function _(e, t) {
|
|
|
98
99
|
};
|
|
99
100
|
}
|
|
100
101
|
//#endregion
|
|
101
|
-
export { c as ControlTooltip,
|
|
102
|
+
export { c as ControlTooltip, _ as DialogController, i as PopoverController, a as TooltipController, m as TooltipGroup, p as TooltipText, v as attachMenuKeyboard, y as attachResizeHandle, o as createTooltipElement, h as createTooltipGroup, n as ensureTooltipStyles, t as prepareTooltipSurface, s as useTooltip };
|
package/svelte.d.ts
CHANGED
|
@@ -7,3 +7,5 @@ export type { PdfViewerProps, PdfViewerText } from './pdf-viewer/component';
|
|
|
7
7
|
export type { PdfViewerToolbarProps } from './pdf-viewer/toolbar';
|
|
8
8
|
export type { PdfViewerButton, PdfViewerButtonOptions, PdfViewerToolbarOptions, PdfViewerToolbarConfig, } from './pdf-viewer/toolbar-options';
|
|
9
9
|
export { defaultPdfViewerText } from './pdf-viewer/translations';
|
|
10
|
+
export { createTooltipGroup, TooltipGroup } from './core/tooltip-options';
|
|
11
|
+
export type { TooltipAnchor, TooltipSide, TooltipAlign, TooltipReason, TooltipContent, TooltipOffset, TooltipOffsetContext, TooltipGroupOptions, TooltipOptions, TooltipControllerOptions, TooltipChangeDetails, TooltipContentContext, TooltipPositionOptions, } from './core/tooltip-options';
|
package/svelte.js
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { TooltipGroup as e, createTooltipGroup as t } from "./core/tooltip-options.js";
|
|
2
|
+
import { i as n } from "./_chunks/component-B22CtP21.js";
|
|
3
|
+
import { t as r } from "./_chunks/component-metadata-B_hLjtM0.js";
|
|
4
|
+
import { n as i, t as a } from "./_chunks/framework-mount-CX0oj05W.js";
|
|
5
|
+
import { uiComponents as o } from "./framework.js";
|
|
5
6
|
import "svelte/internal/disclose-version";
|
|
6
|
-
import * as
|
|
7
|
-
import { onMount as
|
|
7
|
+
import * as s from "svelte/internal/client";
|
|
8
|
+
import { onMount as c, untrack as l } from "svelte";
|
|
8
9
|
//#region package/svelte/UiComponent.svelte
|
|
9
|
-
var
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
let e =
|
|
15
|
-
|
|
10
|
+
var u = s.from_html("<span style=\"display: contents\" data-rv-svelte-content=\"\"><!></span>"), d = s.from_html("<span style=\"display: contents\"></span> <!>", 1);
|
|
11
|
+
function f(e, t) {
|
|
12
|
+
s.push(t, !0);
|
|
13
|
+
let n = s.prop(t, "props", 19, () => ({})), f = s.prop(t, "slots", 19, () => ({})), p, m = s.state([]), h = s.state(void 0);
|
|
14
|
+
c(() => {
|
|
15
|
+
let e = a(p, (e) => {
|
|
16
|
+
s.set(m, e);
|
|
16
17
|
});
|
|
17
|
-
return
|
|
18
|
+
return s.set(h, e), () => {
|
|
18
19
|
e.destroy();
|
|
19
20
|
};
|
|
20
|
-
}),
|
|
21
|
-
let e = { ...
|
|
21
|
+
}), s.user_effect(() => {
|
|
22
|
+
let e = { ...n() }, a = t.component, c = {
|
|
22
23
|
...f(),
|
|
23
|
-
...
|
|
24
|
-
},
|
|
24
|
+
...t.children ? { default: t.children } : {}
|
|
25
|
+
}, u = t.onValueChange, d = t.onUiEvent, p = s.get(h), m = r[a], g = /* @__PURE__ */ new Set([
|
|
25
26
|
...Object.keys(e).filter((e) => /^on[A-Z]/.test(e)),
|
|
26
27
|
"onClose",
|
|
27
28
|
...m ? [m.callback] : []
|
|
@@ -30,29 +31,29 @@ function u(e, u) {
|
|
|
30
31
|
let n = e[t];
|
|
31
32
|
e[t] = (...e) => {
|
|
32
33
|
let r = n?.(...e);
|
|
33
|
-
return t === m?.callback &&
|
|
34
|
+
return t === m?.callback && u?.(e[0]), d?.({
|
|
34
35
|
name: t,
|
|
35
36
|
args: e
|
|
36
37
|
}), r;
|
|
37
38
|
};
|
|
38
39
|
}
|
|
39
|
-
|
|
40
|
+
l(() => p?.render(o[a], e, (e, t) => i(a, e, c, t)));
|
|
40
41
|
});
|
|
41
42
|
function g(e, t) {
|
|
42
43
|
return t.appendChild(e), { update(t) {
|
|
43
44
|
t.appendChild(e);
|
|
44
45
|
} };
|
|
45
46
|
}
|
|
46
|
-
var _ =
|
|
47
|
-
|
|
48
|
-
var y =
|
|
49
|
-
|
|
50
|
-
var n =
|
|
51
|
-
|
|
52
|
-
}),
|
|
47
|
+
var _ = d(), v = s.first_child(_);
|
|
48
|
+
s.bind_this(v, (e) => p = e, () => p);
|
|
49
|
+
var y = s.sibling(v, 2);
|
|
50
|
+
s.each(y, 17, () => s.get(m), (e) => e.id, (e, t) => {
|
|
51
|
+
var n = u(), r = s.child(n);
|
|
52
|
+
s.snippet(r, () => s.get(t).content, () => s.get(t).scope), s.reset(n), s.action(n, (e, t) => g?.(e, t), () => s.get(t).element), s.append(e, n);
|
|
53
|
+
}), s.template_effect(() => s.set_attribute(v, "data-rv-svelte-host", t.component)), s.append(e, _), s.pop();
|
|
53
54
|
}
|
|
54
55
|
//#endregion
|
|
55
56
|
//#region package/svelte.ts
|
|
56
|
-
var
|
|
57
|
+
var p = f;
|
|
57
58
|
//#endregion
|
|
58
|
-
export {
|
|
59
|
+
export { e as TooltipGroup, p as UiComponent, t as createTooltipGroup, n as defaultPdfViewerText };
|
package/switch/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "../_chunks/jsxRuntime.module-
|
|
2
|
-
import { t } from "../_chunks/native-control-
|
|
1
|
+
import { t as e } from "../_chunks/jsxRuntime.module-ksX_VSbv.js";
|
|
2
|
+
import { t } from "../_chunks/native-control-DjJ8Na3T.js";
|
|
3
3
|
//#region package/switch/index.tsx
|
|
4
4
|
function n({ checked: n, onChange: r, label: i, ariaLabel: a, className: o = "", disabled: s = !1, labelPosition: c = "before", title: l, testId: u }) {
|
|
5
5
|
let d = /* @__PURE__ */ e("span", {
|
package/time-grid.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as e, t } from "./_chunks/hooks.module-
|
|
2
|
-
import { t as n } from "./_chunks/jsxRuntime.module-
|
|
3
|
-
import { t as r } from "./_chunks/native-control-
|
|
4
|
-
import { t as i } from "./_chunks/tooltip-text-
|
|
1
|
+
import { r as e, t } from "./_chunks/hooks.module-CXpO2xq6.js";
|
|
2
|
+
import { t as n } from "./_chunks/jsxRuntime.module-ksX_VSbv.js";
|
|
3
|
+
import { t as r } from "./_chunks/native-control-DjJ8Na3T.js";
|
|
4
|
+
import { t as i } from "./_chunks/tooltip-text-CH_c2J-J.js";
|
|
5
5
|
//#region package/time-grid.tsx
|
|
6
6
|
var a = (e, t) => `${e}:${t}`;
|
|
7
7
|
function o(e) {
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
position: relative;
|
|
4
4
|
box-sizing: border-box;
|
|
5
5
|
width: 100%;
|
|
6
|
+
min-width: 82px;
|
|
7
|
+
--rv-timeline-lane-size: max(42px, calc(1lh + 24px));
|
|
6
8
|
height: 112px;
|
|
7
9
|
margin: 0 0 12px;
|
|
8
10
|
overflow: hidden;
|
|
@@ -64,8 +66,8 @@
|
|
|
64
66
|
top: 39px;
|
|
65
67
|
z-index: 1;
|
|
66
68
|
box-sizing: border-box;
|
|
67
|
-
min-width:
|
|
68
|
-
height: 30px;
|
|
69
|
+
min-width: 56px;
|
|
70
|
+
height: max(30px, calc(1lh + 12px));
|
|
69
71
|
border: 1px solid var(--timeline-event-color-end, #15803d);
|
|
70
72
|
border-radius: 7px;
|
|
71
73
|
background: var(--timeline-event-color, #16a34a);
|
|
@@ -191,3 +193,32 @@
|
|
|
191
193
|
background: HighlightText;
|
|
192
194
|
}
|
|
193
195
|
}
|
|
196
|
+
|
|
197
|
+
.rv-timeline-control__actions {
|
|
198
|
+
margin-block: 8px;
|
|
199
|
+
summary {
|
|
200
|
+
cursor: pointer;
|
|
201
|
+
min-height: 24px;
|
|
202
|
+
}
|
|
203
|
+
fieldset {
|
|
204
|
+
min-width: 0;
|
|
205
|
+
margin-block: 8px;
|
|
206
|
+
border: 1px solid var(--rv-ui-border);
|
|
207
|
+
border-radius: 6px;
|
|
208
|
+
}
|
|
209
|
+
output {
|
|
210
|
+
display: block;
|
|
211
|
+
margin-bottom: 8px;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
.rv-timeline-control__commands {
|
|
215
|
+
display: flex;
|
|
216
|
+
flex-wrap: wrap;
|
|
217
|
+
gap: 8px;
|
|
218
|
+
}
|
|
219
|
+
@media (forced-colors: active) {
|
|
220
|
+
.rv-timeline-control__track button:focus-visible {
|
|
221
|
+
outline: 2px solid Highlight;
|
|
222
|
+
outline-offset: -2px;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
@@ -7,6 +7,13 @@ export interface TimelineTrackItem<T extends TimelineTrackEvent> {
|
|
|
7
7
|
}
|
|
8
8
|
export interface TimelineTrackLabels {
|
|
9
9
|
readonly preview: string;
|
|
10
|
+
readonly editEvents?: string;
|
|
11
|
+
readonly moveEarlier?: string;
|
|
12
|
+
readonly moveLater?: string;
|
|
13
|
+
readonly startEarlier?: string;
|
|
14
|
+
readonly startLater?: string;
|
|
15
|
+
readonly endEarlier?: string;
|
|
16
|
+
readonly endLater?: string;
|
|
10
17
|
readonly moveEvent: (index: number) => string;
|
|
11
18
|
readonly resizeStart: (label: string) => string;
|
|
12
19
|
readonly resizeEnd: (label: string) => string;
|
|
@@ -14,6 +21,8 @@ export interface TimelineTrackLabels {
|
|
|
14
21
|
export interface TimelineTrackProps<T extends TimelineTrackEvent> {
|
|
15
22
|
readonly rows: readonly TimelineTrackItem<T>[];
|
|
16
23
|
readonly tooltip?: boolean;
|
|
24
|
+
/** Show click/tap alternatives to dragging. Hosts hiding these must supply equivalent controls. */
|
|
25
|
+
readonly showActions?: boolean;
|
|
17
26
|
readonly formatValue?: (value: number) => string;
|
|
18
27
|
readonly getTooltip?: (event: T) => string;
|
|
19
28
|
readonly selected?: string | number;
|
|
@@ -24,4 +33,4 @@ export interface TimelineTrackProps<T extends TimelineTrackEvent> {
|
|
|
24
33
|
readonly onEventChange: (id: string | number, event: T) => void;
|
|
25
34
|
}
|
|
26
35
|
/** Controlled numeric timeline. Changes preserve event metadata; consumers own commits. */
|
|
27
|
-
export declare function TimelineTrack<T extends TimelineTrackEvent>({ rows, tooltip, formatValue, getTooltip, selected, range, labels, onSelect, onEventChange, }: TimelineTrackProps<T>): JSX.Element;
|
|
36
|
+
export declare function TimelineTrack<T extends TimelineTrackEvent>({ rows, tooltip, showActions, formatValue, getTooltip, selected, range, labels, onSelect, onEventChange, }: TimelineTrackProps<T>): JSX.Element;
|
package/timeline-track/index.js
CHANGED
|
@@ -1,156 +1,218 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "../_chunks/
|
|
3
|
-
import { t as n } from "../_chunks/
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { i as e } from "../_chunks/preact.module-DzTStiZX.js";
|
|
2
|
+
import { t } from "../_chunks/hooks.module-CXpO2xq6.js";
|
|
3
|
+
import { t as n } from "../_chunks/jsxRuntime.module-ksX_VSbv.js";
|
|
4
|
+
import { t as r } from "../_chunks/native-control-DjJ8Na3T.js";
|
|
5
|
+
import { n as i } from "../_chunks/tooltip-BkuH0JdW.js";
|
|
6
|
+
import { eventOutsideRange as a, moveTimelineEvent as o, niceTimelineStep as s, resizeTimelineEvent as c, timelineEventBackground as l, timelineGeometry as u } from "./model.js";
|
|
6
7
|
//#region package/timeline-track/component.tsx
|
|
7
|
-
var
|
|
8
|
+
var d = {
|
|
8
9
|
preview: "Timeline preview",
|
|
10
|
+
editEvents: "Edit timeline events",
|
|
11
|
+
moveEarlier: "Move earlier",
|
|
12
|
+
moveLater: "Move later",
|
|
13
|
+
startEarlier: "Start earlier",
|
|
14
|
+
startLater: "Start later",
|
|
15
|
+
endEarlier: "End earlier",
|
|
16
|
+
endLater: "End later",
|
|
9
17
|
moveEvent: (e) => `Move event ${e}`,
|
|
10
18
|
resizeStart: (e) => `Resize start of ${e}`,
|
|
11
19
|
resizeEnd: (e) => `Resize end of ${e}`
|
|
12
20
|
};
|
|
13
|
-
function
|
|
14
|
-
let
|
|
15
|
-
...
|
|
16
|
-
...
|
|
17
|
-
},
|
|
21
|
+
function f({ rows: i, tooltip: f = !0, showActions: m = !0, formatValue: h = String, getTooltip: g, selected: _, range: v, labels: y, onSelect: b, onEventChange: x }) {
|
|
22
|
+
let S = {
|
|
23
|
+
...d,
|
|
24
|
+
...y
|
|
25
|
+
}, C = t(), w = (e, t, n) => {
|
|
18
26
|
let r = e.currentTarget.closest(".rv-timeline-control__track");
|
|
19
|
-
r && (e.preventDefault(), e.currentTarget.setPointerCapture?.(e.pointerId),
|
|
27
|
+
r && (e.preventDefault(), e.currentTarget.setPointerCapture?.(e.pointerId), C.current = {
|
|
20
28
|
id: t.id,
|
|
21
29
|
mode: n,
|
|
22
30
|
clientX: e.clientX,
|
|
23
31
|
event: t.event,
|
|
24
32
|
width: r.getBoundingClientRect().width
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
let t =
|
|
33
|
+
}, b(t.id));
|
|
34
|
+
}, T = (e) => {
|
|
35
|
+
let t = C.current;
|
|
28
36
|
if (!t) return;
|
|
29
|
-
let n =
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
},
|
|
37
|
+
let n = s(v), r = (e.clientX - t.clientX) / Math.max(1, t.width) * (v.end - v.start), i = Math.round(r / n) * n, a = t.mode === "move" ? o(t.event, i, v) : c(t.event, t.mode, i, v);
|
|
38
|
+
x(t.id, a);
|
|
39
|
+
}, E = () => {
|
|
40
|
+
C.current = void 0;
|
|
41
|
+
}, D = (e, t, n) => {
|
|
34
42
|
if (e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
|
|
35
43
|
e.preventDefault();
|
|
36
|
-
let r =
|
|
37
|
-
|
|
44
|
+
let r = s(v) * (e.key === "ArrowLeft" ? -1 : 1);
|
|
45
|
+
x(t.id, n === "move" ? o(t.event, r, v) : c(t.event, n, r, v));
|
|
38
46
|
};
|
|
39
|
-
return /* @__PURE__ */
|
|
47
|
+
return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("div", {
|
|
40
48
|
class: "rv-timeline-editor__track rv-timeline-control__track",
|
|
41
49
|
role: "group",
|
|
42
|
-
"aria-label":
|
|
50
|
+
"aria-label": S.preview,
|
|
51
|
+
style: { height: `max(112px, calc(70px + ${i.length} * var(--rv-timeline-lane-size)))` },
|
|
43
52
|
children: [
|
|
44
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ n("span", {
|
|
45
54
|
class: "rv-timeline-editor__range rv-timeline-editor__range--start rv-timeline-control__range rv-timeline-control__range--start",
|
|
46
|
-
children:
|
|
55
|
+
children: v.start
|
|
47
56
|
}),
|
|
48
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ n("span", {
|
|
49
58
|
class: "rv-timeline-editor__range rv-timeline-editor__range--end rv-timeline-control__range rv-timeline-control__range--end",
|
|
50
|
-
children:
|
|
59
|
+
children: v.end
|
|
51
60
|
}),
|
|
52
|
-
|
|
61
|
+
i.map((e, t) => ({
|
|
53
62
|
row: e,
|
|
54
63
|
index: t
|
|
55
|
-
})).filter(({ row: e }) => Number.isFinite(e.event.start) && Number.isFinite(e.event.end) && e.event.end >= e.event.start).map(({ row: e, index:
|
|
56
|
-
let
|
|
57
|
-
return /* @__PURE__ */
|
|
58
|
-
tooltipText:
|
|
64
|
+
})).filter(({ row: e }) => Number.isFinite(e.event.start) && Number.isFinite(e.event.end) && e.event.end >= e.event.start).map(({ row: e, index: t }) => {
|
|
65
|
+
let i = u(e.event, v), o = `clamp(56px, ${i.width}%, calc(100% - 24px))`, s = a(e.event, v), c = e.event.label || S.moveEvent(t + 1);
|
|
66
|
+
return /* @__PURE__ */ n(p, {
|
|
67
|
+
tooltipText: f ? g?.(e.event) ?? `${c}: ${h(e.event.start)} – ${h(e.event.end)}` : void 0,
|
|
59
68
|
class: [
|
|
60
69
|
"rv-timeline-editor__bar rv-timeline-control__bar",
|
|
61
|
-
|
|
70
|
+
_ === e.id ? "rv-timeline-editor__bar--selected rv-timeline-control__bar--selected" : "",
|
|
62
71
|
e.event.start === e.event.end ? "rv-timeline-editor__bar--milestone rv-timeline-control__bar--milestone" : "",
|
|
63
|
-
|
|
72
|
+
s ? "rv-timeline-editor__bar--outside rv-timeline-control__bar--outside" : ""
|
|
64
73
|
].filter(Boolean).join(" "),
|
|
65
74
|
style: {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
75
|
+
top: `calc(39px + ${t} * var(--rv-timeline-lane-size))`,
|
|
76
|
+
left: `clamp(12px, ${i.left}%, calc(100% - ${o} - 12px))`,
|
|
77
|
+
width: o,
|
|
78
|
+
background: l(e.event),
|
|
69
79
|
color: e.event.textColor,
|
|
70
80
|
"--timeline-event-color": e.event.color,
|
|
71
81
|
"--timeline-event-color-end": e.event.color
|
|
72
82
|
},
|
|
73
83
|
role: "group",
|
|
74
|
-
"aria-label":
|
|
84
|
+
"aria-label": c,
|
|
75
85
|
children: [
|
|
76
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ n(r, {
|
|
77
87
|
unstyled: !0,
|
|
78
88
|
type: "button",
|
|
79
89
|
class: "rv-timeline-editor__bar-move rv-timeline-control__bar-move",
|
|
80
|
-
"data-autofocus":
|
|
81
|
-
"aria-label": e.event.label ? `${
|
|
90
|
+
"data-autofocus": t === 0 ? "" : void 0,
|
|
91
|
+
"aria-label": e.event.label ? `${S.moveEvent(t + 1)}: ${e.event.label}` : S.moveEvent(t + 1),
|
|
82
92
|
"aria-keyshortcuts": "ArrowLeft ArrowRight",
|
|
83
|
-
onFocus: () =>
|
|
84
|
-
onPointerDown: (t) =>
|
|
85
|
-
onPointerMove:
|
|
86
|
-
onPointerUp:
|
|
87
|
-
onPointerCancel:
|
|
88
|
-
onKeyDown: (t) =>
|
|
89
|
-
children: /* @__PURE__ */
|
|
93
|
+
onFocus: () => b(e.id),
|
|
94
|
+
onPointerDown: (t) => w(t, e, "move"),
|
|
95
|
+
onPointerMove: T,
|
|
96
|
+
onPointerUp: E,
|
|
97
|
+
onPointerCancel: E,
|
|
98
|
+
onKeyDown: (t) => D(t, e, "move"),
|
|
99
|
+
children: /* @__PURE__ */ n("span", {
|
|
90
100
|
class: "rv-timeline-editor__bar-label rv-timeline-control__bar-label",
|
|
91
101
|
children: e.event.label
|
|
92
102
|
})
|
|
93
103
|
}),
|
|
94
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ n(r, {
|
|
95
105
|
unstyled: !0,
|
|
96
106
|
type: "button",
|
|
97
107
|
class: "rv-timeline-editor__handle rv-timeline-editor__handle--start rv-timeline-control__handle rv-timeline-control__handle--start",
|
|
98
108
|
role: "slider",
|
|
99
109
|
"aria-orientation": "horizontal",
|
|
100
|
-
"aria-label":
|
|
101
|
-
"aria-valuemin": Math.min(
|
|
110
|
+
"aria-label": S.resizeStart(c),
|
|
111
|
+
"aria-valuemin": Math.min(v.start, e.event.start),
|
|
102
112
|
"aria-valuemax": e.event.end,
|
|
103
113
|
"aria-valuenow": e.event.start,
|
|
104
114
|
"aria-keyshortcuts": "ArrowLeft ArrowRight",
|
|
105
|
-
onFocus: () =>
|
|
115
|
+
onFocus: () => b(e.id),
|
|
106
116
|
onPointerDown: (t) => {
|
|
107
|
-
t.stopPropagation(),
|
|
117
|
+
t.stopPropagation(), w(t, e, "start");
|
|
108
118
|
},
|
|
109
|
-
onPointerMove:
|
|
110
|
-
onPointerUp:
|
|
111
|
-
onPointerCancel:
|
|
119
|
+
onPointerMove: T,
|
|
120
|
+
onPointerUp: E,
|
|
121
|
+
onPointerCancel: E,
|
|
112
122
|
onKeyDown: (t) => {
|
|
113
|
-
t.stopPropagation(),
|
|
123
|
+
t.stopPropagation(), D(t, e, "start");
|
|
114
124
|
}
|
|
115
125
|
}),
|
|
116
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ n(r, {
|
|
117
127
|
unstyled: !0,
|
|
118
128
|
type: "button",
|
|
119
129
|
class: "rv-timeline-editor__handle rv-timeline-editor__handle--end rv-timeline-control__handle rv-timeline-control__handle--end",
|
|
120
130
|
role: "slider",
|
|
121
131
|
"aria-orientation": "horizontal",
|
|
122
|
-
"aria-label":
|
|
132
|
+
"aria-label": S.resizeEnd(c),
|
|
123
133
|
"aria-valuemin": e.event.start,
|
|
124
|
-
"aria-valuemax": Math.max(
|
|
134
|
+
"aria-valuemax": Math.max(v.end, e.event.end),
|
|
125
135
|
"aria-valuenow": e.event.end,
|
|
126
136
|
"aria-keyshortcuts": "ArrowLeft ArrowRight",
|
|
127
|
-
onFocus: () =>
|
|
137
|
+
onFocus: () => b(e.id),
|
|
128
138
|
onPointerDown: (t) => {
|
|
129
|
-
t.stopPropagation(),
|
|
139
|
+
t.stopPropagation(), w(t, e, "end");
|
|
130
140
|
},
|
|
131
|
-
onPointerMove:
|
|
132
|
-
onPointerUp:
|
|
133
|
-
onPointerCancel:
|
|
141
|
+
onPointerMove: T,
|
|
142
|
+
onPointerUp: E,
|
|
143
|
+
onPointerCancel: E,
|
|
134
144
|
onKeyDown: (t) => {
|
|
135
|
-
t.stopPropagation(),
|
|
145
|
+
t.stopPropagation(), D(t, e, "end");
|
|
136
146
|
}
|
|
137
147
|
})
|
|
138
148
|
]
|
|
139
149
|
}, e.id);
|
|
140
150
|
})
|
|
141
151
|
]
|
|
142
|
-
})
|
|
152
|
+
}), m && /* @__PURE__ */ n("details", {
|
|
153
|
+
class: "rv-timeline-control__actions",
|
|
154
|
+
children: [/* @__PURE__ */ n("summary", { children: S.editEvents }), i.filter(({ event: e }) => Number.isFinite(e.start) && Number.isFinite(e.end) && e.end >= e.start).map((e, t) => /* @__PURE__ */ n("fieldset", { children: [
|
|
155
|
+
/* @__PURE__ */ n("legend", { children: e.event.label || S.moveEvent(t + 1) }),
|
|
156
|
+
/* @__PURE__ */ n("output", { children: [
|
|
157
|
+
h(e.event.start),
|
|
158
|
+
" – ",
|
|
159
|
+
h(e.event.end)
|
|
160
|
+
] }),
|
|
161
|
+
/* @__PURE__ */ n("div", {
|
|
162
|
+
class: "rv-timeline-control__commands",
|
|
163
|
+
children: [
|
|
164
|
+
[
|
|
165
|
+
"move",
|
|
166
|
+
-1,
|
|
167
|
+
S.moveEarlier
|
|
168
|
+
],
|
|
169
|
+
[
|
|
170
|
+
"move",
|
|
171
|
+
1,
|
|
172
|
+
S.moveLater
|
|
173
|
+
],
|
|
174
|
+
[
|
|
175
|
+
"start",
|
|
176
|
+
-1,
|
|
177
|
+
S.startEarlier
|
|
178
|
+
],
|
|
179
|
+
[
|
|
180
|
+
"start",
|
|
181
|
+
1,
|
|
182
|
+
S.startLater
|
|
183
|
+
],
|
|
184
|
+
[
|
|
185
|
+
"end",
|
|
186
|
+
-1,
|
|
187
|
+
S.endEarlier
|
|
188
|
+
],
|
|
189
|
+
[
|
|
190
|
+
"end",
|
|
191
|
+
1,
|
|
192
|
+
S.endLater
|
|
193
|
+
]
|
|
194
|
+
].map(([t, i, a]) => /* @__PURE__ */ n(r, {
|
|
195
|
+
type: "button",
|
|
196
|
+
onClick: () => {
|
|
197
|
+
let n = s(v) * i;
|
|
198
|
+
b(e.id), x(e.id, t === "move" ? o(e.event, n, v) : c(e.event, t, n, v));
|
|
199
|
+
},
|
|
200
|
+
children: a
|
|
201
|
+
}))
|
|
202
|
+
})
|
|
203
|
+
] }, e.id))]
|
|
204
|
+
})] });
|
|
143
205
|
}
|
|
144
|
-
function
|
|
145
|
-
let a =
|
|
206
|
+
function p({ tooltipText: e, children: t, ...r }) {
|
|
207
|
+
let a = i(e ?? "", !0, {
|
|
146
208
|
className: "rv-control-tooltip",
|
|
147
209
|
placement: "above"
|
|
148
210
|
});
|
|
149
|
-
return /* @__PURE__ */
|
|
150
|
-
...
|
|
211
|
+
return /* @__PURE__ */ n("div", {
|
|
212
|
+
...r,
|
|
151
213
|
...e ? a.triggerProps : {},
|
|
152
|
-
children: [
|
|
214
|
+
children: [t, e && a.tooltip]
|
|
153
215
|
});
|
|
154
216
|
}
|
|
155
217
|
//#endregion
|
|
156
|
-
export {
|
|
218
|
+
export { f as TimelineTrack, a as eventOutsideRange, o as moveTimelineEvent, s as niceTimelineStep, c as resizeTimelineEvent, l as timelineEventBackground, u as timelineGeometry };
|