@revolist/ui 4.0.3-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.
Files changed (192) hide show
  1. package/OWNERSHIP.md +1 -1
  2. package/README.md +16 -0
  3. package/_chunks/arrow-up-Cw8hW9vp.js +4 -0
  4. package/_chunks/badge.view-D30pMUfi.js +14 -0
  5. package/_chunks/calculator-CDWOuAcp.js +4 -0
  6. package/_chunks/{calendar-xpZ0v3xf.js → calendar-DsXIhybL.js} +19 -19
  7. package/_chunks/chart-frame-CuZABXVI.js +141 -0
  8. package/_chunks/check-BwI7iCAm.js +4 -0
  9. package/_chunks/choice-chips-BhP8MZjs.js +126 -0
  10. package/_chunks/{color-palette-D8vyPfld.js → color-palette-DMJUChWC.js} +20 -22
  11. package/_chunks/color-picker-B4TQvxxB.js +143 -0
  12. package/_chunks/{component-C_T2VN5u.js → component-qKctqdzk.js} +281 -265
  13. package/_chunks/configurator-actions-C19O1rda.js +155 -0
  14. package/_chunks/configurator-field-icon-CmcM_sPs.js +53 -0
  15. package/_chunks/{control-AHKXD5Eu.js → control-BkWukVt9.js} +13 -13
  16. package/_chunks/{controls-DsNi8V8I.js → controls-BLQnWEd7.js} +147 -155
  17. package/_chunks/{date-control-DrVFX13g.js → date-control-Cgw5PwlZ.js} +1 -1
  18. package/_chunks/date-time-B8rK5gpC.js +784 -0
  19. package/_chunks/{dialog.parts-CKGkC5zP.js → dialog.parts-BSbvnEwX.js} +21 -21
  20. package/_chunks/{duration-CL68Em0o.js → duration-DwFXonEV.js} +1 -4
  21. package/_chunks/editor-popup-BaaxL89T.js +81 -0
  22. package/_chunks/field-configurator-1eQP0tKy.js +223 -0
  23. package/_chunks/icon-toolbar-xbqa0hu9.js +128 -0
  24. package/_chunks/magnifying-glass-CvrTDSkB.js +4 -0
  25. package/_chunks/minus-BOAR3A1C.js +4 -0
  26. package/_chunks/mount-D1i5DLRn.js +266 -0
  27. package/_chunks/native-control-DO0d1kgx.js +636 -0
  28. package/_chunks/{number-input-BKwA5FnM.js → number-input-s9ddPwX6.js} +7 -7
  29. package/_chunks/{picker-h1P5RUgp.js → picker-AY05b41W.js} +2 -2
  30. package/_chunks/plus-CbGRkIGl.js +4 -0
  31. package/_chunks/popover-controller-D-AvKQ7B.js +102 -0
  32. package/_chunks/{popup-CT2uD3go.js → popup-UXGCiv3n.js} +97 -97
  33. package/_chunks/{rating-choice-DZgmaic0.js → rating-choice-BEs_QFZC.js} +1 -1
  34. package/_chunks/{reorder-list-CSlqAGHw.js → reorder-list-A49l172e.js} +1 -1
  35. package/_chunks/request-trail-DCOfa5zw.js +753 -0
  36. package/_chunks/rich-text-xfMWadGi.js +842 -0
  37. package/_chunks/rotate-left-BF6G883o.js +4 -0
  38. package/_chunks/title-tooltip-Cw6LOZhb.js +11 -0
  39. package/_chunks/tooltip-D4xkio5G.js +54 -0
  40. package/_chunks/tooltip-owner-DjdvqKzz.js +19 -0
  41. package/_chunks/tooltip-session-B6X6x8G_.js +110 -0
  42. package/_chunks/tooltip-text-BXsUEmBH.js +12 -0
  43. package/_chunks/top-layer-popup-CNSDdfJV.js +59 -0
  44. package/ai/_chat.scss +28 -3
  45. package/ai/_style.scss +55 -2
  46. package/ai/chat.d.ts +3 -1
  47. package/ai/components.d.ts +13 -2
  48. package/ai/index.d.ts +1 -0
  49. package/ai/index.js +3 -3
  50. package/ai/mount.d.ts +17 -1
  51. package/ai/results/_style.scss +80 -0
  52. package/ai/results/index.d.ts +11 -0
  53. package/ai/results/metrics.d.ts +5 -0
  54. package/ai/results/table.d.ts +5 -0
  55. package/ai/results/text.d.ts +5 -0
  56. package/ai/results/types.d.ts +29 -0
  57. package/ai/transcript.d.ts +2 -0
  58. package/ai/translations.d.ts +1 -1
  59. package/assignee/index.js +2 -2
  60. package/avatar/index.js +32 -31
  61. package/badge.view.d.ts +8 -0
  62. package/brush-range/component.js +28 -27
  63. package/buttons/svg-button.d.ts +1 -1
  64. package/buttons/svg-button.js +16 -16
  65. package/calendar/_calendar.scss +2 -2
  66. package/calendar/calendar.js +1 -1
  67. package/calendar/index.js +2 -2
  68. package/choice-chips/index.d.ts +3 -1
  69. package/choice-chips/index.js +1 -1
  70. package/color-palette/color-palette.js +1 -1
  71. package/color-palette/color-palette.style.scss +1 -1
  72. package/color-palette/color-picker.js +2 -2
  73. package/component-catalog.d.ts +6 -1
  74. package/configurator-actions.d.ts +67 -0
  75. package/configurator-actions.js +1 -0
  76. package/configurator-aggregation-list.d.ts +14 -0
  77. package/configurator-aggregation-list.js +61 -0
  78. package/configurator-drop-zone.d.ts +38 -0
  79. package/configurator-drop-zone.js +64 -0
  80. package/configurator-field-icon.d.ts +10 -0
  81. package/configurator-field-icon.js +1 -0
  82. package/configurator-focus.d.ts +4 -0
  83. package/configurator-focus.js +39 -0
  84. package/configurator-sections.d.ts +42 -0
  85. package/configurator-sections.js +71 -0
  86. package/control-presentation.js +24 -19
  87. package/controls.d.ts +1 -2
  88. package/controls.js +4 -3
  89. package/core/editor-popup.js +1 -1
  90. package/core/popover-controller.d.ts +35 -0
  91. package/core/popup-ownership.d.ts +2 -0
  92. package/core/title-tooltip.d.ts +2 -0
  93. package/core/tooltip-session.d.ts +29 -0
  94. package/core/tooltip-surface.d.ts +13 -0
  95. package/core/tooltip-text.d.ts +6 -0
  96. package/core/tooltip.d.ts +35 -0
  97. package/core/top-layer-popup.d.ts +4 -0
  98. package/core/top-layer-popup.js +1 -23
  99. package/date-time/index.js +1 -1
  100. package/date-time/style.scss +50 -7
  101. package/date-time/time-selection.d.ts +3 -1
  102. package/dialog/dialog.dom.js +8 -8
  103. package/dialog/dialog.parts.js +1 -1
  104. package/distribution-chart/_distribution-chart.scss +1 -57
  105. package/distribution-chart/area-chart.js +1 -1
  106. package/distribution-chart/bar-chart.js +1 -1
  107. package/distribution-chart/line-chart.js +1 -1
  108. package/dropdown/content.js +1 -1
  109. package/dropdown/control.js +1 -1
  110. package/dropdown/index.js +2 -2
  111. package/dropdown/lookup-field.js +2 -1
  112. package/dropdown/popup.d.ts +2 -2
  113. package/dropdown/popup.js +1 -1
  114. package/duration/index.js +1 -1
  115. package/editor-actions.js +1 -1
  116. package/field-configurator.d.ts +19 -0
  117. package/field-configurator.js +4 -170
  118. package/field-expansion.d.ts +9 -0
  119. package/filter/filters/slider/_slider.scss +0 -17
  120. package/filter/filters/slider/control.js +2 -0
  121. package/filter/filters/slider/runtime.js +49 -22
  122. package/filter/filters/slider/single.js +1 -1
  123. package/filter-badge.js +1 -1
  124. package/filter-controls.js +1 -1
  125. package/form-controls/index.js +6 -6
  126. package/form-controls/presentation.js +12 -12
  127. package/formatting/control-tooltip.d.ts +2 -27
  128. package/formatting/index.js +22 -21
  129. package/formatting/styles.scss +2 -47
  130. package/framework.js +215 -208
  131. package/history-controls.js +27 -1
  132. package/icon-toolbar.d.ts +58 -0
  133. package/icon-toolbar.js +1 -0
  134. package/masked-input/index.js +1 -1
  135. package/native-control.d.ts +1 -2
  136. package/native-control.js +1 -1
  137. package/native-styles.css +1 -1
  138. package/native.js +45 -42
  139. package/number-input/index.js +1 -1
  140. package/package.json +71 -2
  141. package/pagination.js +1 -1
  142. package/pdf-viewer/index.js +1 -1
  143. package/pickers.d.ts +5 -1
  144. package/preact-mount.js +1 -1
  145. package/preact.d.ts +7 -0
  146. package/preact.js +68 -61
  147. package/rating-choice.js +1 -1
  148. package/react.d.ts +5 -0
  149. package/react.js +67 -65
  150. package/reorder-list.js +1 -1
  151. package/resource-picker/resource-picker-popup.js +1 -1
  152. package/resource-picker/resource-picker.js +4 -4
  153. package/rich-text/engine.d.ts +1 -0
  154. package/rich-text/format-html.d.ts +2 -0
  155. package/rich-text/index.d.ts +4 -0
  156. package/rich-text/index.js +1 -1
  157. package/rich-text/model.d.ts +2 -0
  158. package/rich-text/style.scss +165 -70
  159. package/rich-text/syntax.d.ts +5 -0
  160. package/rich-text/translations.d.ts +2 -0
  161. package/select.d.ts +3 -1
  162. package/select.js +1 -1
  163. package/status-feedback/exit-snapshot.js +4 -4
  164. package/status-feedback/popover.js +4 -4
  165. package/styles/_compositions.scss +3 -3
  166. package/styles/_field-configurator.scss +146 -0
  167. package/styles/_fields-grid.scss +35 -0
  168. package/styles/_primitives.scss +25 -18
  169. package/styles/configurator-actions.scss +141 -0
  170. package/styles/legacy-pagination.css +19 -2
  171. package/styles.css +1 -1
  172. package/surfaces.d.ts +3 -0
  173. package/surfaces.js +34 -131
  174. package/surfaces.view.d.ts +4 -34
  175. package/svelte.js +1 -1
  176. package/switch/index.js +15 -14
  177. package/time-grid.js +37 -36
  178. package/timeline-track/index.js +2 -2
  179. package/ui.css +1 -1
  180. package/vue.d.ts +24 -9
  181. package/vue.js +118 -116
  182. package/_chunks/chart-frame-Cmc7xU1i.js +0 -130
  183. package/_chunks/choice-chips-CHQTUdLs.js +0 -110
  184. package/_chunks/color-picker-CudqPYZo.js +0 -138
  185. package/_chunks/control-tooltip-uscKfAnV.js +0 -100
  186. package/_chunks/date-time-qIhp5vaX.js +0 -768
  187. package/_chunks/editor-popup-WDdtVDNA.js +0 -81
  188. package/_chunks/history-controls-B3u3INEK.js +0 -27
  189. package/_chunks/mount-DQ1cpppK.js +0 -257
  190. package/_chunks/native-control-C_yok8_-.js +0 -605
  191. package/_chunks/request-trail-DSlFix6i.js +0 -618
  192. 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 };