@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
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { r as e, t } from "./hooks.module-CG3gN83z.js";
|
|
2
|
-
import { t as n } from "./jsxRuntime.module-F6UFnpT-.js";
|
|
3
|
-
import { SvgIcon as r } from "../icons/icon.js";
|
|
4
|
-
import { t as i } from "./native-control-C_yok8_-.js";
|
|
5
|
-
import { RemoveButton as a } from "../buttons/remove-button.js";
|
|
6
|
-
import { TooltipController as o } from "../surfaces.js";
|
|
7
|
-
//#region ../../node_modules/.pnpm/@fortawesome+fontawesome-free@7.3.1/node_modules/@fortawesome/fontawesome-free/svgs/solid/circle-info.svg?raw
|
|
8
|
-
var s = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM224 160a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm-8 64l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z\"/></svg>";
|
|
9
|
-
//#endregion
|
|
10
|
-
//#region src/choice-chips/index.tsx
|
|
11
|
-
function c({ value: e, options: t, onChange: r, ariaLabel: i, appearance: a = "soft", size: o = "medium", className: s = "", itemClassName: c = "", disabled: l = !1, testId: d }) {
|
|
12
|
-
let f = Array.isArray(e) ? e : e === void 0 ? [] : [e];
|
|
13
|
-
return /* @__PURE__ */ n("div", {
|
|
14
|
-
class: `rv-choice-chips rv-choice-chips--${a} rv-choice-chips--${o} ${s}`.trim(),
|
|
15
|
-
role: "group",
|
|
16
|
-
"aria-label": i,
|
|
17
|
-
"data-testid": d,
|
|
18
|
-
children: t.map((e) => {
|
|
19
|
-
let t = f.includes(e.value), i = l || !!e.disabled;
|
|
20
|
-
return /* @__PURE__ */ n(u, {
|
|
21
|
-
className: `${c} ${e.className ?? ""}`.trim(),
|
|
22
|
-
style: e.style,
|
|
23
|
-
color: e.color,
|
|
24
|
-
selected: t,
|
|
25
|
-
"aria-label": e.ariaLabel,
|
|
26
|
-
title: e.title,
|
|
27
|
-
disabled: i,
|
|
28
|
-
"data-value": String(e.value),
|
|
29
|
-
"data-testid": e.testId,
|
|
30
|
-
onSelect: () => {
|
|
31
|
-
i || r(e.value, e);
|
|
32
|
-
},
|
|
33
|
-
info: e.info,
|
|
34
|
-
onRemove: e.onRemove,
|
|
35
|
-
removeLabel: e.removeLabel,
|
|
36
|
-
children: e.label
|
|
37
|
-
}, String(e.value));
|
|
38
|
-
})
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
function l({ "data-tooltip": a, title: c, ref: l, ...u }) {
|
|
42
|
-
let d = t(null), f = a ?? (typeof c == "object" ? c.value : c);
|
|
43
|
-
return e(() => {
|
|
44
|
-
if (!d.current || !f) return;
|
|
45
|
-
let e = new o();
|
|
46
|
-
return e.bind(d.current, f, { trigger: "click" }), () => e.destroy();
|
|
47
|
-
}, [f]), /* @__PURE__ */ n(i, {
|
|
48
|
-
...u,
|
|
49
|
-
type: "button",
|
|
50
|
-
ref: (e) => {
|
|
51
|
-
d.current = e, typeof l == "function" ? l(e) : l && (l.current = e);
|
|
52
|
-
},
|
|
53
|
-
class: `rv-choice-chip-info ${u.className ?? u.class ?? ""}`.trim(),
|
|
54
|
-
children: /* @__PURE__ */ n(r, {
|
|
55
|
-
svg: s,
|
|
56
|
-
size: 12
|
|
57
|
-
})
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
function u({ children: e, color: t, selected: r, onSelect: i, info: o, onRemove: s, removeLabel: c, removeClassName: l = "", className: u = "", disabled: d, ...f }) {
|
|
61
|
-
let p = t ? typeof f.style == "string" ? `${f.style};--rv-choice-chip-color:${t}` : {
|
|
62
|
-
...f.style,
|
|
63
|
-
"--rv-choice-chip-color": t
|
|
64
|
-
} : f.style;
|
|
65
|
-
return !o && !s && i ? /* @__PURE__ */ n("button", {
|
|
66
|
-
...f,
|
|
67
|
-
style: p,
|
|
68
|
-
"data-color": t ? "true" : void 0,
|
|
69
|
-
type: "button",
|
|
70
|
-
class: `rv-choice-chip ${u}`.trim(),
|
|
71
|
-
"aria-pressed": r,
|
|
72
|
-
disabled: d,
|
|
73
|
-
onClick: i,
|
|
74
|
-
children: e
|
|
75
|
-
}) : /* @__PURE__ */ n("span", {
|
|
76
|
-
class: `rv-choice-chip rv-choice-chip--composite ${u}`.trim(),
|
|
77
|
-
role: f.role,
|
|
78
|
-
style: p,
|
|
79
|
-
"data-color": t ? "true" : void 0,
|
|
80
|
-
"data-selected": r ? "true" : void 0,
|
|
81
|
-
"aria-disabled": d || void 0,
|
|
82
|
-
children: [
|
|
83
|
-
i ? /* @__PURE__ */ n("button", {
|
|
84
|
-
...f,
|
|
85
|
-
type: "button",
|
|
86
|
-
class: "rv-choice-chip-label",
|
|
87
|
-
"aria-pressed": r,
|
|
88
|
-
disabled: d,
|
|
89
|
-
onClick: i,
|
|
90
|
-
children: e
|
|
91
|
-
}) : /* @__PURE__ */ n("span", {
|
|
92
|
-
class: "rv-choice-chip-label",
|
|
93
|
-
children: e
|
|
94
|
-
}),
|
|
95
|
-
o,
|
|
96
|
-
s && /* @__PURE__ */ n(a, {
|
|
97
|
-
compact: !0,
|
|
98
|
-
className: l,
|
|
99
|
-
disabled: typeof d == "object" ? d.value : d,
|
|
100
|
-
locale: {
|
|
101
|
-
title: c ?? "Remove",
|
|
102
|
-
ariaLabel: c ?? "Remove"
|
|
103
|
-
},
|
|
104
|
-
onClick: s
|
|
105
|
-
})
|
|
106
|
-
]
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
//#endregion
|
|
110
|
-
export { l as n, c as r, u as t };
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { c as e, i as t, t as n } from "./hooks.module-CG3gN83z.js";
|
|
2
|
-
import { t as r } from "./jsxRuntime.module-F6UFnpT-.js";
|
|
3
|
-
import { n as i, t as a } from "./native-control-C_yok8_-.js";
|
|
4
|
-
import { t as o } from "./chevron-down-GbplLa6s.js";
|
|
5
|
-
import { createControlId as s } from "../core/control-id.js";
|
|
6
|
-
import { n as c, t as l } from "./color-palette-D8vyPfld.js";
|
|
7
|
-
import { COLOR_PICKER_DEFAULT_COLOR as u } from "../color-palette/color-picker.constants.js";
|
|
8
|
-
//#region ../../node_modules/.pnpm/@fortawesome+fontawesome-free@7.3.1/node_modules/@fortawesome/fontawesome-free/svgs/solid/ban.svg?raw
|
|
9
|
-
var d = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M367.2 412.5L99.5 144.8c-22.4 31.4-35.5 69.8-35.5 111.2 0 106 86 192 192 192 41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3c22.4-31.4 35.5-69.8 35.5-111.2 0-106-86-192-192-192-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM0 256a256 256 0 1 1 512 0 256 256 0 1 1 -512 0z\"/></svg>", f = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M512 256c0 .9 0 1.8 0 2.7-.4 36.5-33.6 61.3-70.1 61.3L344 320c-26.5 0-48 21.5-48 48 0 3.4 .4 6.7 1 9.9 2.1 10.2 6.5 20 10.8 29.9 6.1 13.8 12.1 27.5 12.1 42 0 31.8-21.6 60.7-53.4 62-3.5 .1-7 .2-10.6 .2-141.4 0-256-114.6-256-256S114.6 0 256 0 512 114.6 512 256zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0-96a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 96a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"/></svg>";
|
|
10
|
-
//#endregion
|
|
11
|
-
//#region src/color-palette/color-picker.tsx
|
|
12
|
-
function p({ icon: e, className: t = "rv-format-icon rv-format-color-picker__icon" }) {
|
|
13
|
-
return /* @__PURE__ */ r("span", {
|
|
14
|
-
class: t,
|
|
15
|
-
"aria-hidden": "true",
|
|
16
|
-
dangerouslySetInnerHTML: { __html: e }
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
function m({ label: m, value: h, defaultLabel: g, customLabel: _, customHexLabel: v, invalidColor: y, colorLabels: b, optional: x = !0, allowHexInput: S = !0, disabled: C = !1, onChange: w }) {
|
|
20
|
-
let [T] = t(s), E = `rv-format-color-popover-${T}`, D = `rv-format-color-custom-${T}`, O = `rv-format-color-error-${T}`, k = `--rv-format-color-anchor-${T}`, A = n(null), [j, M] = t(!1), [N, P] = t(!1), [F, I] = t(h ?? u), [L, R] = t(!1);
|
|
21
|
-
e(() => {
|
|
22
|
-
I(h ?? u), R(!1);
|
|
23
|
-
}, [h]);
|
|
24
|
-
let z = (e) => {
|
|
25
|
-
let t = c(e);
|
|
26
|
-
t ? (R(!1), I(t), C || w(t)) : R(!0);
|
|
27
|
-
}, B = () => A.current?.hidePopover?.();
|
|
28
|
-
return e(() => {
|
|
29
|
-
C && (B(), M(!1));
|
|
30
|
-
}, [C]), /* @__PURE__ */ r("div", {
|
|
31
|
-
class: "rv-format-color-picker",
|
|
32
|
-
onKeyDownCapture: (e) => {
|
|
33
|
-
e.key === "Escape" && A.current?.matches(":popover-open") && (e.preventDefault(), e.stopPropagation(), B());
|
|
34
|
-
},
|
|
35
|
-
children: [/* @__PURE__ */ r(a, {
|
|
36
|
-
unstyled: !0,
|
|
37
|
-
type: "button",
|
|
38
|
-
class: "rv-format-color-picker__trigger",
|
|
39
|
-
"aria-label": `${m}: ${h?.toUpperCase() ?? g}`,
|
|
40
|
-
"aria-haspopup": "dialog",
|
|
41
|
-
"aria-expanded": j,
|
|
42
|
-
"aria-controls": E,
|
|
43
|
-
title: m,
|
|
44
|
-
disabled: C,
|
|
45
|
-
popovertarget: E,
|
|
46
|
-
style: `anchor-name: ${k}`,
|
|
47
|
-
children: [
|
|
48
|
-
/* @__PURE__ */ r("span", {
|
|
49
|
-
class: `rv-format-color-picker__trigger-swatch${h ? "" : " rv-format-color-picker__trigger-swatch--empty"}`,
|
|
50
|
-
style: h ? { backgroundColor: h } : void 0,
|
|
51
|
-
children: h ? null : /* @__PURE__ */ r(p, {
|
|
52
|
-
icon: d,
|
|
53
|
-
className: "rv-format-color-picker__empty-icon"
|
|
54
|
-
})
|
|
55
|
-
}),
|
|
56
|
-
/* @__PURE__ */ r("span", {
|
|
57
|
-
class: "rv-format-color-picker__trigger-value",
|
|
58
|
-
children: h?.toUpperCase() ?? g
|
|
59
|
-
}),
|
|
60
|
-
/* @__PURE__ */ r(p, { icon: o })
|
|
61
|
-
]
|
|
62
|
-
}), /* @__PURE__ */ r("div", {
|
|
63
|
-
id: E,
|
|
64
|
-
ref: A,
|
|
65
|
-
class: "rv-format-color-picker__popover",
|
|
66
|
-
role: "dialog",
|
|
67
|
-
"aria-label": m,
|
|
68
|
-
popover: "auto",
|
|
69
|
-
style: `position-anchor: ${k}`,
|
|
70
|
-
onToggle: (e) => M(e.currentTarget.matches(":popover-open")),
|
|
71
|
-
children: [
|
|
72
|
-
/* @__PURE__ */ r(l, {
|
|
73
|
-
value: c(h) ?? h ?? null,
|
|
74
|
-
ariaLabel: m,
|
|
75
|
-
defaultLabel: g,
|
|
76
|
-
colorAriaLabel: (e) => b[e.value] ?? e.label,
|
|
77
|
-
includeDefault: x,
|
|
78
|
-
disabled: C,
|
|
79
|
-
onChange: (e) => {
|
|
80
|
-
C || (w(e ?? void 0), B());
|
|
81
|
-
}
|
|
82
|
-
}),
|
|
83
|
-
/* @__PURE__ */ r("div", {
|
|
84
|
-
id: D,
|
|
85
|
-
class: "rv-format-color-picker__custom-controls",
|
|
86
|
-
"data-selection-only": !S || void 0,
|
|
87
|
-
hidden: !N,
|
|
88
|
-
children: [
|
|
89
|
-
/* @__PURE__ */ r(i, {
|
|
90
|
-
type: "color",
|
|
91
|
-
disabled: C,
|
|
92
|
-
class: "rv-format-color-picker__native",
|
|
93
|
-
"aria-label": _,
|
|
94
|
-
title: _,
|
|
95
|
-
value: c(F) ?? u,
|
|
96
|
-
onInput: (e) => z(e.currentTarget.value)
|
|
97
|
-
}),
|
|
98
|
-
S ? /* @__PURE__ */ r(i, {
|
|
99
|
-
type: "text",
|
|
100
|
-
disabled: C,
|
|
101
|
-
class: "rv-control rv-format-color-picker__hex",
|
|
102
|
-
inputMode: "text",
|
|
103
|
-
maxLength: 7,
|
|
104
|
-
"aria-label": v,
|
|
105
|
-
"aria-invalid": L,
|
|
106
|
-
"aria-describedby": L ? O : void 0,
|
|
107
|
-
title: v,
|
|
108
|
-
value: F.toUpperCase(),
|
|
109
|
-
onInput: (e) => {
|
|
110
|
-
I(e.currentTarget.value), L && R(!1);
|
|
111
|
-
},
|
|
112
|
-
onChange: (e) => z(e.currentTarget.value)
|
|
113
|
-
}) : null,
|
|
114
|
-
S && L ? /* @__PURE__ */ r("span", {
|
|
115
|
-
id: O,
|
|
116
|
-
class: "rv-format-color-picker__error",
|
|
117
|
-
role: "alert",
|
|
118
|
-
children: y
|
|
119
|
-
}) : null
|
|
120
|
-
]
|
|
121
|
-
}),
|
|
122
|
-
/* @__PURE__ */ r(a, {
|
|
123
|
-
unstyled: !0,
|
|
124
|
-
type: "button",
|
|
125
|
-
class: "rv-format-color-picker__custom-action",
|
|
126
|
-
disabled: C,
|
|
127
|
-
"aria-expanded": N,
|
|
128
|
-
"aria-controls": D,
|
|
129
|
-
title: _,
|
|
130
|
-
onClick: () => P((e) => !e),
|
|
131
|
-
children: [/* @__PURE__ */ r(p, { icon: f }), _]
|
|
132
|
-
})
|
|
133
|
-
]
|
|
134
|
-
})]
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
//#endregion
|
|
138
|
-
export { m as t };
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { calculateAnchoredPopoverPosition as e } from "../core/anchored-popover.js";
|
|
2
|
-
import { i as t, o as n, r, t as i } from "./hooks.module-CG3gN83z.js";
|
|
3
|
-
import { t as a } from "./jsxRuntime.module-F6UFnpT-.js";
|
|
4
|
-
import { hideTopLayerPopup as o, showTopLayerPopup as s } from "../core/top-layer-popup.js";
|
|
5
|
-
import { createControlId as c } from "../core/control-id.js";
|
|
6
|
-
//#region src/formatting/control-tooltip.tsx
|
|
7
|
-
var l = /* @__PURE__ */ new WeakMap();
|
|
8
|
-
function u(e, o = !1, s) {
|
|
9
|
-
let [u] = t(() => c("rv-format-control-tooltip")), [f, p] = t(!1), m = i(null), h = i(!1), g = n(() => {
|
|
10
|
-
let e = m.current?.ownerDocument;
|
|
11
|
-
e && l.get(e) === g && l.delete(e), p(!1);
|
|
12
|
-
}, []), _ = (e) => {
|
|
13
|
-
m.current = e;
|
|
14
|
-
let t = e.ownerDocument, n = l.get(t);
|
|
15
|
-
n !== g && n?.(), l.set(t, g), p(!0);
|
|
16
|
-
};
|
|
17
|
-
return r(() => {
|
|
18
|
-
if (!f) return;
|
|
19
|
-
let e = m.current?.ownerDocument;
|
|
20
|
-
if (!e) return;
|
|
21
|
-
let t = e.defaultView, n = m.current?.closest("[popover]"), r = () => {
|
|
22
|
-
n?.matches(":popover-open") || g();
|
|
23
|
-
}, i = (e) => {
|
|
24
|
-
m.current?.contains(e.target) || g();
|
|
25
|
-
};
|
|
26
|
-
return e.addEventListener("pointerdown", i, !0), e.addEventListener("scroll", g, !0), e.addEventListener("visibilitychange", g), t?.addEventListener("resize", g), t?.addEventListener("blur", g), n?.addEventListener("toggle", r), () => {
|
|
27
|
-
e.removeEventListener("pointerdown", i, !0), e.removeEventListener("scroll", g, !0), e.removeEventListener("visibilitychange", g), t?.removeEventListener("resize", g), t?.removeEventListener("blur", g), n?.removeEventListener("toggle", r);
|
|
28
|
-
};
|
|
29
|
-
}, [f, g]), r(() => () => {
|
|
30
|
-
let e = m.current?.ownerDocument;
|
|
31
|
-
e && l.get(e) === g && l.delete(e);
|
|
32
|
-
}, [g]), {
|
|
33
|
-
id: u,
|
|
34
|
-
hide: g,
|
|
35
|
-
triggerProps: {
|
|
36
|
-
"aria-describedby": u,
|
|
37
|
-
onFocus: (e) => {
|
|
38
|
-
m.current = e.currentTarget, h.current || _(e.currentTarget);
|
|
39
|
-
},
|
|
40
|
-
onBlur: () => {
|
|
41
|
-
h.current = !1, g();
|
|
42
|
-
},
|
|
43
|
-
onMouseEnter: (e) => _(e.currentTarget),
|
|
44
|
-
onMouseLeave: g,
|
|
45
|
-
onPointerDown: (e) => {
|
|
46
|
-
m.current = e.currentTarget, h.current = !0, g();
|
|
47
|
-
},
|
|
48
|
-
onPointerCancel: g,
|
|
49
|
-
onKeyDown: (e) => {
|
|
50
|
-
e.key === "Escape" && f ? (e.preventDefault(), e.stopPropagation(), g()) : (e.key === "Enter" || e.key === " ") && g();
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
tooltip: /* @__PURE__ */ a(d, {
|
|
54
|
-
id: u,
|
|
55
|
-
text: e,
|
|
56
|
-
visible: f,
|
|
57
|
-
anchor: o ? m.current : null,
|
|
58
|
-
className: s?.className,
|
|
59
|
-
placement: s?.placement
|
|
60
|
-
})
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
function d({ id: t, text: n, visible: c, anchor: l = null, className: u = "rv-format-control-tooltip", placement: d }) {
|
|
64
|
-
let f = i(null);
|
|
65
|
-
return r(() => {
|
|
66
|
-
let t = f.current;
|
|
67
|
-
if (!c || !l || !t) return;
|
|
68
|
-
let n = s(t, "block"), r = l.ownerDocument.defaultView, i = e(l.getBoundingClientRect(), t.getBoundingClientRect(), {
|
|
69
|
-
width: r?.innerWidth ?? 0,
|
|
70
|
-
height: r?.innerHeight ?? 0
|
|
71
|
-
}), a = l.getBoundingClientRect(), u = t.getBoundingClientRect(), p = a.top - u.height - 8;
|
|
72
|
-
return Object.assign(t.style, {
|
|
73
|
-
left: `${d === "above" ? Math.max(8, Math.min(a.left + (a.width - u.width) / 2, (r?.innerWidth ?? 0) - u.width - 8)) : i.left}px`,
|
|
74
|
-
top: `${d === "above" && p >= 8 ? p : i.top}px`
|
|
75
|
-
}), () => o(t, n);
|
|
76
|
-
}, [
|
|
77
|
-
c,
|
|
78
|
-
l,
|
|
79
|
-
d
|
|
80
|
-
]), /* @__PURE__ */ a("span", {
|
|
81
|
-
ref: f,
|
|
82
|
-
id: t,
|
|
83
|
-
class: u,
|
|
84
|
-
role: "tooltip",
|
|
85
|
-
"data-visible": c,
|
|
86
|
-
style: l ? {
|
|
87
|
-
position: "fixed",
|
|
88
|
-
inset: "auto",
|
|
89
|
-
margin: 0,
|
|
90
|
-
transform: "none",
|
|
91
|
-
positionAnchor: "auto",
|
|
92
|
-
positionArea: "none",
|
|
93
|
-
display: c ? "block" : "none",
|
|
94
|
-
visibility: c ? "visible" : "hidden"
|
|
95
|
-
} : void 0,
|
|
96
|
-
children: n
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
//#endregion
|
|
100
|
-
export { u as n, d as t };
|