@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.
Files changed (187) hide show
  1. package/README.md +37 -1
  2. package/_chunks/{arrow-up-Cw8hW9vp.js → arrow-up-BSYhTAus.js} +1 -1
  3. package/_chunks/{calculator-CDWOuAcp.js → calculator-BG0Xd_Uw.js} +1 -1
  4. package/_chunks/{calendar-BQYQLu8Q.js → calendar-CQHVwHLW.js} +3 -3
  5. package/_chunks/{chart-frame-GprenwEg.js → chart-frame-pj5EQxXr.js} +5 -5
  6. package/_chunks/{check-BwI7iCAm.js → check-BFIC9pge.js} +1 -1
  7. package/_chunks/{chevron-down-GbplLa6s.js → chevron-down-BkrpxJYD.js} +1 -1
  8. package/_chunks/{chevron-right-CM3ljziP.js → chevron-right-DZ79RmYV.js} +1 -1
  9. package/_chunks/{chevron-up-BLuNMPDn.js → chevron-up-Dt846uIR.js} +1 -1
  10. package/_chunks/{choice-chips-C5OxD0GV.js → choice-chips-BIGT7gjO.js} +4 -4
  11. package/_chunks/{clock-BOhPNlW3.js → clock-DTfr4p2S.js} +1 -1
  12. package/_chunks/{color-palette-7siNch__.js → color-palette-DL0f3igd.js} +3 -3
  13. package/_chunks/{color-picker-Cfc9eqZb.js → color-picker-BWBM9GE1.js} +7 -7
  14. package/_chunks/{component-C3k_8uIq.js → component-B22CtP21.js} +58 -43
  15. package/_chunks/{component-metadata-DlVkpW3h.js → component-metadata-B_hLjtM0.js} +4 -1
  16. package/_chunks/{configurator-actions-vRnI54mO.js → configurator-actions-BhIk4oM_.js} +18 -18
  17. package/_chunks/{configurator-field-icon-CmcM_sPs.js → configurator-field-icon-B0S_208W.js} +2 -2
  18. package/_chunks/{control-BRfF5DWQ.js → control-zCLB1tGz.js} +2 -2
  19. package/_chunks/{controller-BbiQuRt-.js → controller-ChkqiANQ.js} +1 -1
  20. package/_chunks/{controls-B3EgM_DS.js → controls-Ip2E6jIu.js} +10 -9
  21. package/_chunks/{date-control-87dcA5br.js → date-control-UmJvxQ5C.js} +4 -4
  22. package/_chunks/{date-time-CfiFYodx.js → date-time-B9YGqree.js} +57 -57
  23. package/_chunks/{delete-button-jneO24wa.js → delete-button-DQSK6G-4.js} +1 -1
  24. package/_chunks/{dialog.parts-NqEEVc9P.js → dialog.parts-CpMwNhTM.js} +5 -5
  25. package/_chunks/{duration-BGZ_qJ99.js → duration-BrsE4QgL.js} +15 -15
  26. package/_chunks/{editor-commit-Dyo-FMgD.js → editor-commit-BXIUX0As.js} +2 -2
  27. package/_chunks/{editor-popup-NNP9Fh9U.js → editor-popup-Ds0GPAcn.js} +3 -3
  28. package/_chunks/{field-configurator-DPulsY3l.js → field-configurator-BMQnmWNd.js} +10 -9
  29. package/_chunks/{field-context-C4_WrO2z.js → field-context-0oUi-w-G.js} +1 -1
  30. package/_chunks/{framework-mount-D4I8HpVp.js → framework-mount-CX0oj05W.js} +3 -3
  31. package/_chunks/{hooks.module-CG3gN83z.js → hooks.module-CXpO2xq6.js} +2 -2
  32. package/_chunks/{icon-toolbar-BAAdEvr9.js → icon-toolbar-C4J_Wqph.js} +6 -6
  33. package/_chunks/{jsxRuntime.module-F6UFnpT-.js → jsxRuntime.module-ksX_VSbv.js} +2 -2
  34. package/_chunks/{magnifying-glass-CvrTDSkB.js → magnifying-glass-BFZrFs8M.js} +1 -1
  35. package/_chunks/{minus-BOAR3A1C.js → minus-DE8NPK_D.js} +1 -1
  36. package/_chunks/{mount-C8CnIW9k.js → mount-BgI_QV2H.js} +7 -7
  37. package/_chunks/native-C9tJWAXF.js +52 -0
  38. package/_chunks/{native-CJm3eq3-.js → native-RudS9C_q.js} +2 -2
  39. package/_chunks/{native-control-um1L1wgZ.js → native-control-DjJ8Na3T.js} +49 -44
  40. package/_chunks/{number-input-CKiA4d1N.js → number-input-Bb5guKP4.js} +4 -4
  41. package/_chunks/{picker-igNshTRC.js → picker-DDUmhT93.js} +5 -5
  42. package/_chunks/{plus-CbGRkIGl.js → plus-BaXticu7.js} +1 -1
  43. package/_chunks/{popup-DECYM9FI.js → popup-HEUnOeq-.js} +5 -5
  44. package/_chunks/{preact.module-BBM36DnO.js → preact.module-DzTStiZX.js} +1 -1
  45. package/_chunks/{rating-choice-CepVfGUq.js → rating-choice-CtrABPp-.js} +3 -3
  46. package/_chunks/{render-bTk3curw.js → render-C6PFWlqh.js} +2 -2
  47. package/_chunks/{reorder-list-B4w3aARt.js → reorder-list-DvwZcFPH.js} +4 -4
  48. package/_chunks/{request-trail-B1zVRPEf.js → request-trail-D5PKrBlC.js} +11 -11
  49. package/_chunks/{rich-text-Ci4d6dHn.js → rich-text-DW1vcBAY.js} +31 -31
  50. package/_chunks/{rotate-left-BF6G883o.js → rotate-left-CTHmcGBP.js} +1 -1
  51. package/_chunks/{rotate-right-Iha5ScJ1.js → rotate-right-BIfKgVun.js} +1 -1
  52. package/_chunks/{selection-list-tooltips-m00U3L6z.js → selection-list-tooltips-j84Wufjj.js} +8 -4
  53. package/_chunks/{title-tooltip-ncldbUwS.js → title-tooltip-DKiWhsL7.js} +1 -1
  54. package/_chunks/tooltip-BkuH0JdW.js +93 -0
  55. package/_chunks/tooltip-session-BBKkwhLZ.js +244 -0
  56. package/_chunks/{tooltip-text-BN5WdGHn.js → tooltip-text-CH_c2J-J.js} +2 -2
  57. package/_chunks/top-layer-popup-DU1r_2v5.js +107 -0
  58. package/_chunks/{xmark-DD_PBvZI.js → xmark-DQRQfXZI.js} +1 -1
  59. package/activity-message.js +1 -1
  60. package/ai/index.js +2 -2
  61. package/angular/angular.d.ts +2 -0
  62. package/angular/angular.js +1 -0
  63. package/assignee/index.js +28 -28
  64. package/avatar/index.js +3 -3
  65. package/browser/favicon.svg +9 -0
  66. package/browser/pdf-viewer.css +2 -0
  67. package/browser/pdf.worker.min.mjs +28 -0
  68. package/browser/pdfjs-LICENSE +177 -0
  69. package/browser/revo-ui.global.js +671 -0
  70. package/browser/revo-ui.js +35538 -0
  71. package/browser/robots.txt +4 -0
  72. package/browser.d.ts +3 -0
  73. package/browser.js +34 -0
  74. package/brush-range/component.js +2 -2
  75. package/buttons/delete-button.js +1 -1
  76. package/buttons/remove-button.js +2 -2
  77. package/buttons/svg-button.js +4 -4
  78. package/calendar/_calendar.scss +12 -4
  79. package/calendar/calendar.js +1 -1
  80. package/calendar/day.js +1 -1
  81. package/calendar/header.js +2 -2
  82. package/calendar/index.js +2 -2
  83. package/calendar/month-grid.js +1 -1
  84. package/calendar/year-grid.js +1 -1
  85. package/checkbox/index.js +1 -1
  86. package/choice-chips/index.js +1 -1
  87. package/color-palette/color-palette.js +1 -1
  88. package/color-palette/color-picker.js +2 -2
  89. package/configurator-actions.js +1 -1
  90. package/configurator-aggregation-list.js +6 -6
  91. package/configurator-drop-zone.js +3 -3
  92. package/configurator-field-icon.js +1 -1
  93. package/configurator-focus.js +1 -1
  94. package/configurator-sections.js +3 -3
  95. package/control-presentation.js +2 -2
  96. package/controls.js +2 -2
  97. package/core/editor-popup.js +1 -1
  98. package/core/popover-controller.d.ts +31 -6
  99. package/core/popover-controller.js +171 -46
  100. package/core/popup-ownership.d.ts +1 -1
  101. package/core/tooltip-options.d.ts +143 -0
  102. package/core/tooltip-options.js +20 -0
  103. package/core/tooltip-session.d.ts +32 -8
  104. package/core/tooltip-surface.d.ts +14 -3
  105. package/core/tooltip.d.ts +20 -19
  106. package/core/top-layer-popup.d.ts +2 -1
  107. package/core/top-layer-popup.js +1 -1
  108. package/date-time/index.js +1 -1
  109. package/dialog/dialog.dom.js +3 -3
  110. package/dialog/dialog.parts.js +1 -1
  111. package/dialog/dialog.preact.js +1 -1
  112. package/distribution-chart/area-chart.js +3 -3
  113. package/distribution-chart/bar-chart.js +2 -2
  114. package/distribution-chart/index.js +1 -1
  115. package/distribution-chart/line-chart.js +2 -2
  116. package/dropdown/content.d.ts +3 -1
  117. package/dropdown/content.js +1 -1
  118. package/dropdown/control.js +1 -1
  119. package/dropdown/dropdown.service.js +56 -56
  120. package/dropdown/index.js +2 -2
  121. package/dropdown/lookup-field.js +7 -7
  122. package/dropdown/popup.js +1 -1
  123. package/duration/index.js +1 -1
  124. package/editor-actions.js +3 -3
  125. package/editor-layout/index.js +3 -3
  126. package/field-configurator.js +1 -1
  127. package/field-reorder.hook.js +1 -1
  128. package/filter/filters/slider/preact.js +1 -1
  129. package/filter/filters/slider/runtime.js +1 -1
  130. package/filter/filters/slider/single.js +2 -2
  131. package/filter-badge.js +4 -4
  132. package/filter-controls.js +3 -3
  133. package/form-controls/index.js +3 -3
  134. package/form-controls/presentation.js +4 -4
  135. package/formatting/index.js +7 -7
  136. package/framework.js +135 -135
  137. package/history-controls.js +3 -3
  138. package/icon-toolbar.js +1 -1
  139. package/icons/icon.js +1 -1
  140. package/legend.js +1 -1
  141. package/masked-input/index.js +3 -3
  142. package/native-control.js +1 -1
  143. package/native.js +29 -79
  144. package/number-input/index.js +1 -1
  145. package/package.json +21 -1
  146. package/pagination.js +1 -1
  147. package/pdf-viewer/controller.js +1 -1
  148. package/pdf-viewer/index.js +3 -3
  149. package/pickers.d.ts +11 -4
  150. package/preact-mount.js +1 -1
  151. package/preact.d.ts +2 -0
  152. package/preact.js +66 -65
  153. package/rating-choice.js +1 -1
  154. package/react-adapter.d.ts +1 -1
  155. package/react.d.ts +2 -0
  156. package/react.js +64 -63
  157. package/reorder-list.js +1 -1
  158. package/resource-picker/resource-picker-avatar.js +2 -2
  159. package/resource-picker/resource-picker-option.js +1 -1
  160. package/resource-picker/resource-picker-popup.js +2 -2
  161. package/resource-picker/resource-picker.js +5 -5
  162. package/rich-text/index.js +1 -1
  163. package/search-input/index.js +3 -3
  164. package/segmented-switch/index.js +1 -1
  165. package/select.js +1 -1
  166. package/selection-list.js +1 -1
  167. package/status-feedback/exit-snapshot.js +1 -1
  168. package/status-feedback/header.js +3 -3
  169. package/status-feedback/index.js +1 -1
  170. package/status-feedback/popover.js +1 -1
  171. package/status-feedback/render.js +1 -1
  172. package/styles.css +1 -1
  173. package/surfaces.d.ts +1 -0
  174. package/surfaces.js +25 -24
  175. package/svelte.d.ts +2 -0
  176. package/svelte.js +30 -29
  177. package/switch/index.js +2 -2
  178. package/time-grid.js +4 -4
  179. package/timeline-track/_style.scss +33 -2
  180. package/timeline-track/component.d.ts +10 -1
  181. package/timeline-track/index.js +136 -74
  182. package/ui.css +1 -1
  183. package/vue.d.ts +11 -13
  184. package/vue.js +94 -90
  185. package/_chunks/tooltip-h-Z8yFBY.js +0 -54
  186. package/_chunks/tooltip-session-CBtRMBPr.js +0 -110
  187. package/_chunks/top-layer-popup-CKJ7VJOF.js +0 -59
@@ -0,0 +1,4 @@
1
+ User-agent: *
2
+ Allow: /
3
+
4
+ Sitemap: https://ui.rv-grid.com/sitemap.xml
package/browser.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ /** Standalone browser distribution over the same native/component contracts. */
2
+ export * from './native';
3
+ export * from './framework';
package/browser.js ADDED
@@ -0,0 +1,34 @@
1
+ import { calculateAnchoredPopoverPosition as e } from "./core/anchored-popover.js";
2
+ import { t } from "./_chunks/mount-BgI_QV2H.js";
3
+ import { a as n, i as r, l as i, n as a, r as o, s, t as c } from "./_chunks/top-layer-popup-DU1r_2v5.js";
4
+ import { getUiMotionDuration as l, inheritUiMotion as u, isUiMotionEnabled as d } from "./core/motion.js";
5
+ import { createControlId as f } from "./core/control-id.js";
6
+ import { PopoverController as p, TooltipController as m, createTooltipElement as h } from "./core/popover-controller.js";
7
+ import { controlAttributes as g, controlClassName as _ } from "./control-attributes.js";
8
+ import { createControl as v, decorateIconAction as y, nativeControlTag as b, registerControl as x, renderControl as S } from "./control-presentation.js";
9
+ import { t as C } from "./_chunks/control-zCLB1tGz.js";
10
+ import { PaginationPanel as w, paginationItems as T, renderPaginationButton as E } from "./pagination.js";
11
+ import { G as D, H as O, K as k, U as A, V as j, W as M, z as N } from "./_chunks/controls-Ip2E6jIu.js";
12
+ import { r as P, t as F } from "./_chunks/tooltip-BkuH0JdW.js";
13
+ import { d as I, u as L } from "./_chunks/dialog.parts-CpMwNhTM.js";
14
+ import { createDialogButton as R, createDialogCloseButton as z, createDialogElements as B, getDialogFocusableElements as V, trapDialogFocus as H } from "./dialog/dialog.dom.js";
15
+ import { attachDialogDrag as U } from "./dialog/dialog.drag.js";
16
+ import { t as W } from "./_chunks/tooltip-text-CH_c2J-J.js";
17
+ import { TooltipGroup as G, createTooltipGroup as K } from "./core/tooltip-options.js";
18
+ import { DialogController as q, attachMenuKeyboard as J, attachResizeHandle as Y } from "./surfaces.js";
19
+ import { normalizeProgressRange as X } from "./progress/range.js";
20
+ import { badgeClassName as Z } from "./badge.js";
21
+ import { createFormField as Q, createTextControl as $ } from "./form-controls/index.js";
22
+ import { AVATAR_CELL_BACKGROUNDS as ee } from "./color-palette/common-palettes.js";
23
+ import { AvatarElement as te, avatarTemplate as ne, avatarWithTextTemplate as re, createAvatarElement as ie, getAvatarCellBackground as ae, getAvatarIndex as oe, getAvatarInitials as se } from "./avatar/index.js";
24
+ import { renderProgressBar as ce } from "./progress/bar.js";
25
+ import { renderRangeSlider as le } from "./filter/filters/slider/component.js";
26
+ import { renderCircularProgress as ue } from "./progress/circular.js";
27
+ import { applyControlPresentation as de } from "./html-controls.js";
28
+ import { n as fe, t as pe } from "./_chunks/native-RudS9C_q.js";
29
+ import { a as me, i as he, n as ge, r as _e, t as ve } from "./_chunks/native-C9tJWAXF.js";
30
+ import { a as ye, c as be, d as xe, f as Se, h as Ce, i as we, l as Te, m as Ee, n as De, o as Oe, p as ke, r as Ae, s as je, t as Me, u as Ne } from "./_chunks/cell-visuals-r6DOOhGh.js";
31
+ import { i as Pe, n as Fe, r as Ie, t as Le } from "./_chunks/component-metadata-B_hLjtM0.js";
32
+ import { n as Re, t as ze } from "./_chunks/framework-mount-CX0oj05W.js";
33
+ import { uiComponents as Be } from "./framework.js";
34
+ export { ee as AVATAR_CELL_BACKGROUNDS, L as ActionFooterView, te as AvatarElement, F as ControlTooltip, me as DRAWING_TOOL_PATHS, q as DialogController, w as PaginationPanel, p as PopoverController, n as TOOLTIP_STYLES, m as TooltipController, G as TooltipGroup, W as TooltipText, de as applyControlPresentation, U as attachDialogDrag, J as attachMenuKeyboard, Y as attachResizeHandle, ne as avatarTemplate, re as avatarWithTextTemplate, Z as badgeClassName, e as calculateAnchoredPopoverPosition, Le as componentModels, Fe as componentRenderSlots, g as controlAttributes, _ as controlClassName, ve as createAlertElement, ie as createAvatarElement, j as createButtonElement, v as createControl, f as createControlId, R as createDialogButton, z as createDialogCloseButton, B as createDialogElements, C as createDropdownControl, Q as createFormField, ze as createFrameworkMount, pe as createSearchInput, $ as createTextControl, h as createTooltipElement, K as createTooltipGroup, y as decorateIconAction, Ie as dropdownRenderSlots, s as ensureTooltipStyles, De as formatTimelineEvents, ae as getAvatarCellBackground, oe as getAvatarIndex, se as getAvatarInitials, V as getDialogFocusableElements, l as getUiMotionDuration, c as hideTopLayerPopup, u as inheritUiMotion, d as isUiMotionEnabled, t as mountAiAssistant, he as mountColorPicker, I as mountDialogActionFooter, b as nativeControlTag, X as normalizeProgressRange, r as ownsPopupTarget, T as paginationItems, Pe as pdfViewerRenderSlots, a as popupOwnsTarget, i as prepareTooltipSurface, x as registerControl, ge as releaseAlertElement, je as renderAggregateSummary, N as renderAlert, _e as renderAlertInto, be as renderBadgeValue, Te as renderChange, ue as renderCircularProgress, S as renderControl, O as renderCounter, we as renderHeatmap, Ne as renderLabelledIcon, A as renderLoadingIndicator, M as renderMenuItem, ye as renderMiniBarChart, E as renderPaginationButton, xe as renderPercentageSummary, Me as renderPie, ce as renderProgressBar, Se as renderProgressLine, ke as renderProgressLineValue, le as renderRangeSlider, D as renderRatingStars, k as renderScalarSlider, fe as renderSearchInput, Oe as renderSparkline, Ee as renderThumbs, Ae as renderTimeline, Ce as renderTypeIcon, o as showTopLayerPopup, H as trapDialogFocus, Be as uiComponents, P as useTooltip, Re as withFrameworkContent };
@@ -1,5 +1,5 @@
1
- import { t as e } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
2
- import { t } from "../_chunks/tooltip-text-BN5WdGHn.js";
1
+ import { t as e } from "../_chunks/jsxRuntime.module-ksX_VSbv.js";
2
+ import { t } from "../_chunks/tooltip-text-CH_c2J-J.js";
3
3
  import { PreactRangeSlider as n } from "../filter/filters/slider/preact.js";
4
4
  import { DistributionChart as r } from "../distribution-chart/index.js";
5
5
  //#region package/brush-range/component.tsx
@@ -1 +1 @@
1
- export { t as DeleteButton } from "../_chunks/delete-button-jneO24wa.js";
1
+ export { t as DeleteButton } from "../_chunks/delete-button-DQSK6G-4.js";
@@ -1,5 +1,5 @@
1
- import { t as e } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
2
- import { t } from "../_chunks/delete-button-jneO24wa.js";
1
+ import { t as e } from "../_chunks/jsxRuntime.module-ksX_VSbv.js";
2
+ import { t } from "../_chunks/delete-button-DQSK6G-4.js";
3
3
  //#region package/buttons/remove-button.tsx
4
4
  function n({ compact: n = !1, className: r = "", ...i }) {
5
5
  return /* @__PURE__ */ e(t, {
@@ -1,8 +1,8 @@
1
- import { t as e } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
1
+ import { t as e } from "../_chunks/jsxRuntime.module-ksX_VSbv.js";
2
2
  import { SvgIcon as t } from "../icons/icon.js";
3
- import { t as n } from "../_chunks/native-control-um1L1wgZ.js";
3
+ import { t as n } from "../_chunks/native-control-DjJ8Na3T.js";
4
4
  import { controlClassName as r } from "../control-attributes.js";
5
- import { n as i } from "../_chunks/tooltip-h-Z8yFBY.js";
5
+ import { n as i } from "../_chunks/tooltip-BkuH0JdW.js";
6
6
  //#region package/buttons/svg-button.tsx
7
7
  function a({ label: a, variant: o, icon: s, visibleLabel: c, className: l, iconClassName: u, labelClassName: d, children: f, iconContent: p, badge: m, badgeClassName: h = "", class: g, disabled: _, title: v, ...y }) {
8
8
  let b = i(typeof v == "string" ? v : a, !0, {
@@ -26,7 +26,7 @@ function a({ label: a, variant: o, icon: s, visibleLabel: c, className: l, iconC
26
26
  b.triggerProps.onMouseEnter(e), y.onMouseEnter?.(e);
27
27
  },
28
28
  onMouseLeave: (e) => {
29
- b.triggerProps.onMouseLeave(), y.onMouseLeave?.(e);
29
+ b.triggerProps.onMouseLeave(e), y.onMouseLeave?.(e);
30
30
  },
31
31
  onPointerDown: (e) => {
32
32
  b.triggerProps.onPointerDown(e), y.onPointerDown?.(e);
@@ -87,7 +87,11 @@
87
87
  .revo-calendar__header .revo-calendar__month-label-button {
88
88
  width: auto;
89
89
  max-width: 100%;
90
- height: var(--calendar-cell-size);
90
+ min-height: var(--calendar-cell-size);
91
+ height: auto;
92
+ overflow: visible;
93
+ white-space: normal;
94
+ overflow-wrap: anywhere;
91
95
  padding: 4px 9px;
92
96
  justify-self: center;
93
97
  }
@@ -143,6 +147,7 @@
143
147
 
144
148
  .revo-calendar__weekdays span {
145
149
  min-height: 18px;
150
+ overflow-wrap: anywhere;
146
151
  color: var(--revo-grid-filter-popup-label-color, var(--rv-ui-text-muted));
147
152
  font-size: 11px;
148
153
  font-weight: 500;
@@ -153,7 +158,7 @@
153
158
  .revo-calendar__day {
154
159
  position: relative;
155
160
  min-width: 0;
156
- height: var(--calendar-cell-size);
161
+ height: max(var(--calendar-cell-size), 1lh);
157
162
  padding: 0;
158
163
  border-radius: 0;
159
164
  line-height: var(--calendar-cell-size);
@@ -260,12 +265,15 @@
260
265
  max-width: 100%;
261
266
  }
262
267
  .revo-calendar__month-panel {
263
- width: var(--revo-calendar-month-width, calc(var(--calendar-cell-size) * 7));
268
+ width: var(
269
+ --revo-calendar-month-width,
270
+ max(calc(var(--calendar-cell-size) * 7), 14em)
271
+ );
264
272
  max-width: 100%;
265
273
  min-width: 0;
266
274
  }
267
275
  .revo-calendar--week-numbers .revo-calendar__month-panel {
268
- width: calc(var(--calendar-cell-size) * 8);
276
+ width: max(calc(var(--calendar-cell-size) * 8), 16em);
269
277
  }
270
278
  .revo-calendar--week-numbers .revo-calendar__weekdays,
271
279
  .revo-calendar--week-numbers .revo-calendar__week {
@@ -1 +1 @@
1
- export { t as Calendar } from "../_chunks/calendar-BQYQLu8Q.js";
1
+ export { t as Calendar } from "../_chunks/calendar-CQHVwHLW.js";
package/calendar/day.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as e } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
1
+ import { t as e } from "../_chunks/jsxRuntime.module-ksX_VSbv.js";
2
2
  import { c as t } from "../_chunks/iso-CJQl2kmq.js";
3
3
  //#region package/calendar/day.tsx
4
4
  function n(n) {
@@ -1,5 +1,5 @@
1
- import { t as e } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
2
- import { n as t, t as n } from "../_chunks/chevron-right-CM3ljziP.js";
1
+ import { t as e } from "../_chunks/jsxRuntime.module-ksX_VSbv.js";
2
+ import { n as t, t as n } from "../_chunks/chevron-right-DZ79RmYV.js";
3
3
  //#region package/calendar/header.tsx
4
4
  function r({ label: r, previousLabel: i, nextLabel: a, labelAction: o, caption: s, showLabel: c = !0, showPrevious: l = !0, showNext: u = !0, previousDisabled: d = !1, nextDisabled: f = !1, onPrevious: p, onNext: m }) {
5
5
  return /* @__PURE__ */ e("header", {
package/calendar/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { DEFAULT_CALENDAR_TRANSLATIONS as e } from "./translations.js";
2
2
  import { a as t, i as n, n as r, o as i, r as a, t as o } from "../_chunks/model-CFrBgRHm.js";
3
3
  import { CalendarHeader as s, CalendarWeekdays as c } from "./header.js";
4
- import { t as l } from "../_chunks/calendar-BQYQLu8Q.js";
4
+ import { t as l } from "../_chunks/calendar-CQHVwHLW.js";
5
5
  import { CalendarDay as u } from "./day.js";
6
6
  import { CalendarMonthGrid as d } from "./month-grid.js";
7
7
  import { CalendarYearGrid as f } from "./year-grid.js";
8
- import { t as p } from "../_chunks/picker-igNshTRC.js";
8
+ import { t as p } from "../_chunks/picker-DDUmhT93.js";
9
9
  export { l as Calendar, u as CalendarDay, s as CalendarHeader, d as CalendarMonthGrid, p as CalendarPicker, c as CalendarWeekdays, f as CalendarYearGrid, e as DEFAULT_CALENDAR_TRANSLATIONS, o as createCalendarMonth, r as isCalendarDateDisabled, a as isCalendarMonthDisabled, n as isDateInCalendarRange, t as moveCalendarFocus, i as orderCalendarRange };
@@ -1,4 +1,4 @@
1
- import { t as e } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
1
+ import { t as e } from "../_chunks/jsxRuntime.module-ksX_VSbv.js";
2
2
  import { f as t, i as n } from "../_chunks/model-CFrBgRHm.js";
3
3
  import { CalendarDay as r } from "./day.js";
4
4
  //#region package/calendar/month-grid.tsx
@@ -1,4 +1,4 @@
1
- import { t as e } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
1
+ import { t as e } from "../_chunks/jsxRuntime.module-ksX_VSbv.js";
2
2
  import { f as t, l as n, r, u as i } from "../_chunks/model-CFrBgRHm.js";
3
3
  //#region package/calendar/year-grid.tsx
4
4
  function a({ month: a, system: o = "gregory", referenceDate: s, minDate: c, maxDate: l, isMonthDisabled: u, locale: d, ariaLabel: f, onSelect: p, onEscape: m }) {
package/checkbox/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { c as e } from "../_chunks/preact.module-BBM36DnO.js";
1
+ import { c as e } from "../_chunks/preact.module-DzTStiZX.js";
2
2
  import { renderControl as t } from "../control-presentation.js";
3
3
  //#region package/checkbox/index.ts
4
4
  var n = "rv-checkbox";
@@ -1 +1 @@
1
- export { t as ChoiceChip, n as ChoiceChipInfoButton, r as ChoiceChips } from "../_chunks/choice-chips-C5OxD0GV.js";
1
+ export { t as ChoiceChip, n as ChoiceChipInfoButton, r as ChoiceChips } from "../_chunks/choice-chips-BIGT7gjO.js";
@@ -1,3 +1,3 @@
1
- import { t as e } from "../_chunks/color-palette-7siNch__.js";
1
+ import { t as e } from "../_chunks/color-palette-DL0f3igd.js";
2
2
  import { DEFAULT_COLOR_PALETTE_OPTIONS as t } from "./palette.js";
3
3
  export { e as ColorPalette, t as DEFAULT_COLOR_PALETTE_OPTIONS };
@@ -1,3 +1,3 @@
1
- import { n as e } from "../_chunks/color-palette-7siNch__.js";
2
- import { t } from "../_chunks/color-picker-Cfc9eqZb.js";
1
+ import { n as e } from "../_chunks/color-palette-DL0f3igd.js";
2
+ import { t } from "../_chunks/color-picker-BWBM9GE1.js";
3
3
  export { t as ColorPicker, e as normalizeHexColor };
@@ -1 +1 @@
1
- export { t as CONFIGURATOR_AREA_ICONS, n as ConfiguratorActionButton, r as ConfiguratorActionGroup, i as ConfiguratorActionIcon, a as ConfiguratorActionPanel, o as ConfiguratorActionTrigger, s as ConfiguratorFieldCaption, c as ConfiguratorFieldPicker, l as ConfiguratorFieldSearch, u as ConfiguratorFieldTypeIcon, d as ConfiguratorFilterStatus, f as ConfiguratorHint, p as ConfiguratorRemoveButton, m as ConfiguratorZoneActions, h as renderConfiguratorActionTrigger } from "./_chunks/configurator-actions-vRnI54mO.js";
1
+ export { t as CONFIGURATOR_AREA_ICONS, n as ConfiguratorActionButton, r as ConfiguratorActionGroup, i as ConfiguratorActionIcon, a as ConfiguratorActionPanel, o as ConfiguratorActionTrigger, s as ConfiguratorFieldCaption, c as ConfiguratorFieldPicker, l as ConfiguratorFieldSearch, u as ConfiguratorFieldTypeIcon, d as ConfiguratorFilterStatus, f as ConfiguratorHint, p as ConfiguratorRemoveButton, m as ConfiguratorZoneActions, h as renderConfiguratorActionTrigger } from "./_chunks/configurator-actions-BhIk4oM_.js";
@@ -1,9 +1,9 @@
1
- import { i as e } from "./_chunks/hooks.module-CG3gN83z.js";
2
- import { t } from "./_chunks/jsxRuntime.module-F6UFnpT-.js";
3
- import { t as n } from "./_chunks/native-control-um1L1wgZ.js";
4
- import { t as r } from "./_chunks/selection-list-tooltips-m00U3L6z.js";
5
- import "./_chunks/check-BwI7iCAm.js";
6
- import { t as i } from "./_chunks/calculator-CDWOuAcp.js";
1
+ import { i as e } from "./_chunks/hooks.module-CXpO2xq6.js";
2
+ import { t } from "./_chunks/jsxRuntime.module-ksX_VSbv.js";
3
+ import { t as n } from "./_chunks/native-control-DjJ8Na3T.js";
4
+ import { t as r } from "./_chunks/selection-list-tooltips-j84Wufjj.js";
5
+ import "./_chunks/check-BFIC9pge.js";
6
+ import { t as i } from "./_chunks/calculator-BG0Xd_Uw.js";
7
7
  //#region package/configurator-aggregation-list.tsx
8
8
  function a({ value: a, aggregators: o, i18n: s, disabled: c, onChange: l }) {
9
9
  let u = r("[role=\"menuitemradio\"]"), d = o.includes(a) ? o : [a, ...o], [f, p] = e(), m = f && o.includes(f) ? f : o.includes(a) ? a : o[0];
@@ -1,6 +1,6 @@
1
- import { i as e } from "./_chunks/preact.module-BBM36DnO.js";
2
- import { t } from "./_chunks/jsxRuntime.module-F6UFnpT-.js";
3
- import { a as n, f as r, o as i, p as a, v as o } from "./_chunks/field-configurator-DPulsY3l.js";
1
+ import { i as e } from "./_chunks/preact.module-DzTStiZX.js";
2
+ import { t } from "./_chunks/jsxRuntime.module-ksX_VSbv.js";
3
+ import { a as n, f as r, o as i, p as a, v as o } from "./_chunks/field-configurator-BMQnmWNd.js";
4
4
  import { useFieldDropTarget as s } from "./field-reorder.hook.js";
5
5
  //#region package/configurator-drop-zone.tsx
6
6
  function c({ title: c, label: l, id: u, footer: d, removeLabel: f, headerActions: p, renderActions: m, allowFieldRemoving: h = !0, panel: g, items: _, itemKeys: v, dimensions: y, placeholder: b, i18n: x, renderItem: S, onRemove: C, onDrop: w, onDragOver: T, canDrop: E = () => !0, onDragEnter: D, onItemDragStart: O, onItemDragEnd: k, allowFieldDragging: A = !0, dragActive: j, renderIcon: M }) {
@@ -1 +1 @@
1
- export { t as resolveConfiguratorFieldIcon } from "./_chunks/configurator-field-icon-CmcM_sPs.js";
1
+ export { t as resolveConfiguratorFieldIcon } from "./_chunks/configurator-field-icon-B0S_208W.js";
@@ -1,4 +1,4 @@
1
- import { r as e, t } from "./_chunks/hooks.module-CG3gN83z.js";
1
+ import { r as e, t } from "./_chunks/hooks.module-CXpO2xq6.js";
2
2
  //#region package/configurator-focus.ts
3
3
  var n = () => {};
4
4
  function r(e, t) {
@@ -1,6 +1,6 @@
1
- import { i as e } from "./_chunks/preact.module-BBM36DnO.js";
2
- import { i as t, r as n, t as r } from "./_chunks/hooks.module-CG3gN83z.js";
3
- import { t as i } from "./_chunks/jsxRuntime.module-F6UFnpT-.js";
1
+ import { i as e } from "./_chunks/preact.module-DzTStiZX.js";
2
+ import { i as t, r as n, t as r } from "./_chunks/hooks.module-CXpO2xq6.js";
3
+ import { t as i } from "./_chunks/jsxRuntime.module-ksX_VSbv.js";
4
4
  import { SegmentedSwitch as a } from "./segmented-switch/index.js";
5
5
  //#region package/configurator-sections.tsx
6
6
  function o(e, n, r = !1) {
@@ -1,5 +1,5 @@
1
- import { c as e } from "./_chunks/preact.module-BBM36DnO.js";
2
- import { t } from "./_chunks/jsxRuntime.module-F6UFnpT-.js";
1
+ import { c as e } from "./_chunks/preact.module-DzTStiZX.js";
2
+ import { t } from "./_chunks/jsxRuntime.module-ksX_VSbv.js";
3
3
  import { createPreactElement as n } from "./preact-mount.js";
4
4
  import { TooltipController as r } from "./core/popover-controller.js";
5
5
  import { controlAttributes as i, controlClassName as a } from "./control-attributes.js";
package/controls.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as e } from "./_chunks/selection-list-tooltips-m00U3L6z.js";
2
- import { A as t, B as n, C as r, D as i, E as a, F as o, I as s, L as c, M as l, N as u, O as d, P as f, R as p, S as m, T as h, _ as g, a as _, b as v, c as y, d as b, f as x, g as S, h as C, i as w, j as T, k as E, l as D, m as O, n as k, o as A, p as j, r as M, s as N, t as P, u as F, v as I, w as L, x as R, y as z } from "./_chunks/controls-B3EgM_DS.js";
1
+ import { t as e } from "./_chunks/selection-list-tooltips-j84Wufjj.js";
2
+ import { A as t, B as n, C as r, D as i, E as a, F as o, I as s, L as c, M as l, N as u, O as d, P as f, R as p, S as m, T as h, _ as g, a as _, b as v, c as y, d as b, f as x, g as S, h as C, i as w, j as T, k as E, l as D, m as O, n as k, o as A, p as j, r as M, s as N, t as P, u as F, v as I, w as L, x as R, y as z } from "./_chunks/controls-Ip2E6jIu.js";
3
3
  import { EditorList as B, EditorListGroup as V, EditorListItem as H, EditorListItemContent as U, EditorPane as W, EditorSplitLayout as G } from "./editor-layout/index.js";
4
4
  export { p as Alert, n as Badge, P as Button, k as ButtonGroup, M as Chip, w as CircularProgress, _ as CountBadge, A as DateInput, N as DateTimeInput, y as Disclosure, D as EmptyState, F as FieldError, b as FieldHint, x as FormSection, j as IconButton, B as Listbox, V as ListboxGroup, H as ListboxOption, U as ListboxOptionContent, O as LoadingOverlay, C as Menu, S as MenuItem, g as MenuSeparator, I as NumberInput, z as NumberStepper, v as Pagination, W as Pane, R as Panel, m as PanelResizeHandle, r as RadioGroup, L as Rating, h as ResizeHandle, a as SegmentedControl, i as Spinner, G as SplitLayout, d as Submenu, E as TabPanel, t as Tabs, T as TextInput, l as Textarea, u as TimeInput, f as ToggleButton, o as Toolbar, s as ToolbarGroup, c as ToolbarSeparator, e as useSelectionListTooltips };
@@ -1 +1 @@
1
- export { t as mountEditorPopup } from "../_chunks/editor-popup-NNP9Fh9U.js";
1
+ export { t as mountEditorPopup } from "../_chunks/editor-popup-Ds0GPAcn.js";
@@ -1,3 +1,4 @@
1
+ import { TooltipAnchor, TooltipContent, TooltipControllerOptions } from './tooltip-options';
1
2
  export interface PopoverOptions {
2
3
  anchor: HTMLElement | SVGElement;
3
4
  placement?: 'above';
@@ -23,13 +24,37 @@ export declare class PopoverController {
23
24
  destroy(): void;
24
25
  }
25
26
  export declare function createTooltipElement(document: Document, className?: string): HTMLDivElement;
26
- /** Imperative binding adapter over the same session used by useTooltip. */
27
+ /** Imperative/delegated adapter over the shared tooltip session. */
27
28
  export declare class TooltipController {
29
+ private session?;
30
+ private root?;
31
+ private content;
32
+ private options;
28
33
  private release?;
29
- bind(anchor: HTMLElement | SVGElement, text: string, options?: {
30
- trigger?: 'hover' | 'click';
31
- surface?: HTMLElement;
32
- onEscape?: () => void;
33
- }): () => void;
34
+ private abort?;
35
+ private context?;
36
+ private generation;
37
+ private loading;
38
+ private asyncContent;
39
+ private renderedNode?;
40
+ private renderedNodes;
41
+ get isOpen(): boolean;
42
+ get element(): HTMLElement | undefined;
43
+ target(): TooltipAnchor | undefined;
44
+ private render;
45
+ private renderCurrent;
46
+ private load;
47
+ private reveal;
48
+ /** Bind one trigger, or a container with options.filter for delegated triggers. */
49
+ bind(anchor: TooltipAnchor, content: TooltipContent, options?: TooltipControllerOptions): () => void;
50
+ update(options: TooltipControllerOptions): void;
51
+ setContent(content: TooltipContent): void;
52
+ /** Immediate imperative methods; controlled values still authorize visibility. */
53
+ show(target?: TooltipAnchor | undefined): void;
54
+ hide(): void;
55
+ toggle(target?: TooltipAnchor | undefined): void;
56
+ /** Synchronize controlled/default state without emitting another change request. */
57
+ setOpen(open: boolean, target?: TooltipAnchor | undefined): void;
58
+ refresh(): void;
34
59
  destroy(): void;
35
60
  }
@@ -1,56 +1,57 @@
1
1
  import { calculateAnchoredPopoverPosition as e } from "./anchored-popover.js";
2
- import { t } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
3
- import { createPreactElement as n, releasePreactElement as r } from "../preact-mount.js";
4
- import { o as i, r as a, t as o } from "../_chunks/top-layer-popup-CKJ7VJOF.js";
5
- import { t as s } from "../_chunks/tooltip-session-CBtRMBPr.js";
6
- import { createControlId as c } from "./control-id.js";
2
+ import { c as t } from "../_chunks/preact.module-DzTStiZX.js";
3
+ import { t as n } from "../_chunks/jsxRuntime.module-ksX_VSbv.js";
4
+ import { createPreactElement as r, releasePreactElement as i, renderPreactInto as a } from "../preact-mount.js";
5
+ import { o, r as s, t as c } from "../_chunks/top-layer-popup-DU1r_2v5.js";
7
6
  import { inheritUiMotion as l } from "./motion.js";
7
+ import { t as u } from "../_chunks/tooltip-session-BBKkwhLZ.js";
8
+ import { createControlId as d } from "./control-id.js";
8
9
  //#region package/core/popover-controller.tsx
9
- var u = /* @__PURE__ */ new WeakMap(), d = class {
10
+ var f = /* @__PURE__ */ new WeakMap(), p = class {
10
11
  active;
11
12
  get isOpen() {
12
13
  return !!this.active;
13
14
  }
14
15
  open(t) {
15
16
  this.close(!1);
16
- let { anchor: n, content: r } = t, s = n.ownerDocument, c = s.defaultView, d = u.get(s) ?? [];
17
- u.set(s, d);
18
- let f = r.parentNode, p = r.nextSibling, m = r.hidden, h = r.getAttribute("style"), g = r.getAttribute("popover"), _ = l(n, r), v = () => {
17
+ let { anchor: n, content: r } = t, i = n.ownerDocument, a = i.defaultView, u = f.get(i) ?? [];
18
+ f.set(i, u);
19
+ let d = r.parentNode, p = r.nextSibling, m = r.hidden, h = r.getAttribute("style"), g = r.getAttribute("popover"), _ = l(n, r), v = () => {
19
20
  if (!n.isConnected) {
20
21
  x(!1);
21
22
  return;
22
23
  }
23
- let a = (t.placement === "above" ? i : e)(n.getBoundingClientRect(), r.getBoundingClientRect(), {
24
- width: s.documentElement.clientWidth || c?.innerWidth || 0,
25
- height: s.documentElement.clientHeight || c?.innerHeight || 0
24
+ let s = (t.placement === "above" ? o : e)(n.getBoundingClientRect(), r.getBoundingClientRect(), {
25
+ width: i.documentElement.clientWidth || a?.innerWidth || 0,
26
+ height: i.documentElement.clientHeight || a?.innerHeight || 0
26
27
  });
27
28
  Object.assign(r.style, {
28
- left: `${a.left}px`,
29
- top: `${a.top}px`
29
+ left: `${s.left}px`,
30
+ top: `${s.top}px`
30
31
  });
31
32
  }, y, b = !1, x = (e = t.restoreFocus !== !1) => {
32
33
  if (b) return;
33
- b = !0, s.removeEventListener("pointerdown", S, !0), r.removeEventListener("keydown", C), s.removeEventListener("keydown", C), c?.removeEventListener("resize", v), s.removeEventListener("scroll", v, !0), w?.disconnect();
34
- let i = d.indexOf(r);
35
- i !== -1 && d.splice(i, 1), o(r, y), _(), f?.isConnected ? f.insertBefore(r, p?.parentNode === f ? p : null) : r.remove(), h === null ? r.removeAttribute("style") : r.setAttribute("style", h), r.hidden = m, g === null ? r.removeAttribute("popover") : r.setAttribute("popover", g), this.active?.content === r && (this.active = void 0), e && n.isConnected && n.focus({ preventScroll: !0 }), t.onClose?.();
34
+ b = !0, i.removeEventListener("pointerdown", S, !0), r.removeEventListener("keydown", C), i.removeEventListener("keydown", C), a?.removeEventListener("resize", v), i.removeEventListener("scroll", v, !0), w?.disconnect();
35
+ let o = u.indexOf(r);
36
+ o !== -1 && u.splice(o, 1), c(r, y), _(), d?.isConnected ? d.insertBefore(r, p?.parentNode === d ? p : null) : r.remove(), h === null ? r.removeAttribute("style") : r.setAttribute("style", h), r.hidden = m, g === null ? r.removeAttribute("popover") : r.setAttribute("popover", g), this.active?.content === r && (this.active = void 0), e && n.isConnected && n.focus({ preventScroll: !0 }), t.onClose?.();
36
37
  }, S = (e) => {
37
- if (d.at(-1) !== r) return;
38
+ if (u.at(-1) !== r) return;
38
39
  let i = e.composedPath();
39
40
  t.closeOnOutside !== !1 && !i.includes(n) && !i.includes(r) && x(!1);
40
41
  }, C = (e) => {
41
- d.at(-1) === r && e.key === "Escape" && t.closeOnEscape !== !1 && !e.defaultPrevented && (e.preventDefault(), e.stopPropagation(), x());
42
+ u.at(-1) === r && e.key === "Escape" && t.closeOnEscape !== !1 && !e.defaultPrevented && (e.preventDefault(), e.stopPropagation(), x());
42
43
  };
43
- (t.appendTo ?? s.body).append(r), r.hidden = !1, Object.assign(r.style, {
44
+ (t.appendTo ?? i.body).append(r), r.hidden = !1, Object.assign(r.style, {
44
45
  position: "fixed",
45
46
  inset: "auto",
46
47
  margin: "0"
47
- }), y = a(r, t.display ?? "block");
48
- let w = c?.ResizeObserver ? new c.ResizeObserver(v) : void 0;
48
+ }), y = s(r, t.display ?? "block");
49
+ let w = a?.ResizeObserver ? new a.ResizeObserver(v) : void 0;
49
50
  return w?.observe(n), w?.observe(r), this.active = {
50
51
  content: r,
51
52
  close: x,
52
53
  position: v
53
- }, d.push(r), s.addEventListener("pointerdown", S, !0), r.addEventListener("keydown", C), s.addEventListener("keydown", C), c?.addEventListener("resize", v), s.addEventListener("scroll", v, !0), v(), {
54
+ }, u.push(r), i.addEventListener("pointerdown", S, !0), r.addEventListener("keydown", C), i.addEventListener("keydown", C), a?.addEventListener("resize", v), i.addEventListener("scroll", v, !0), v(), {
54
55
  close: x,
55
56
  refresh: v
56
57
  };
@@ -65,38 +66,162 @@ var u = /* @__PURE__ */ new WeakMap(), d = class {
65
66
  this.close(!1);
66
67
  }
67
68
  };
68
- function f(e, r = "grid-tooltip") {
69
- return n(e, /* @__PURE__ */ t("div", {
70
- id: c("rv-tooltip"),
71
- class: r,
69
+ function m(e, t = "grid-tooltip") {
70
+ return r(e, /* @__PURE__ */ n("div", {
71
+ id: d("rv-tooltip"),
72
+ class: t,
72
73
  role: "tooltip",
73
74
  hidden: !0
74
75
  }));
75
76
  }
76
- var p = class {
77
+ var h = class {
78
+ session;
79
+ root;
80
+ content = "";
81
+ options = {};
77
82
  release;
83
+ abort;
84
+ context;
85
+ generation = 0;
86
+ loading = !1;
87
+ asyncContent;
88
+ renderedNode;
89
+ renderedNodes = [];
90
+ get isOpen() {
91
+ return this.session?.isOpen ?? !1;
92
+ }
93
+ get element() {
94
+ return this.session?.element;
95
+ }
96
+ target() {
97
+ return this.session?.target;
98
+ }
99
+ render(e) {
100
+ let n = this.element;
101
+ if (!n) return;
102
+ let r = e && typeof e == "object" && "nodeType" in e ? e : void 0, i = r?.nodeType === 11 ? r === this.renderedNode && !r.childNodes.length ? this.renderedNodes : [...r.childNodes] : r ? [r] : [];
103
+ for (let e of this.renderedNodes) n.contains(e) && e.parentNode?.removeChild(e);
104
+ this.renderedNode = r, this.renderedNodes = i, a(n, t("span", {
105
+ class: "rv-tooltip__content",
106
+ ref: r ? (e) => {
107
+ if (e) for (let t of i) t.parentNode !== e && e.append(t);
108
+ } : void 0
109
+ }, r ? null : e)), this.session?.refresh();
110
+ }
111
+ renderCurrent() {
112
+ this.context && this.render(this.options.loadContent && this.asyncContent !== void 0 ? this.asyncContent : this.options.renderContent?.(this.context) ?? this.content);
113
+ }
114
+ load(e) {
115
+ this.abort?.abort(), this.abort = new AbortController();
116
+ let t = ++this.generation;
117
+ this.asyncContent = void 0;
118
+ let n = this.options.loadContent;
119
+ if (!n) {
120
+ this.loading = !1, this.renderCurrent();
121
+ return;
122
+ }
123
+ this.loading = !0, this.element?.setAttribute("aria-busy", "true"), this.render(this.options.loadingContent ?? this.content);
124
+ let r = this.abort.signal;
125
+ Promise.resolve().then(() => n({
126
+ ...e,
127
+ signal: r
128
+ })).then((n) => {
129
+ !r.aborted && t === this.generation && this.isOpen && (this.loading = !1, this.element?.removeAttribute("aria-busy"), this.asyncContent = n, this.render(n), this.options.onContentLoad?.(n, e));
130
+ }, (n) => {
131
+ !r.aborted && t === this.generation && this.isOpen && (this.loading = !1, this.element?.removeAttribute("aria-busy"), this.options.errorContent === void 0 ? this.hide() : (this.asyncContent = this.options.errorContent, this.render(this.options.errorContent)), this.options.onError?.(n, e));
132
+ });
133
+ }
134
+ reveal(e, t, n) {
135
+ this.context = {
136
+ target: e,
137
+ reason: t,
138
+ event: n
139
+ }, (!this.isOpen || this.target() !== e) && this.renderCurrent(), this.session?.show(e, t, n);
140
+ }
78
141
  bind(e, t, n = {}) {
79
- this.destroy();
80
- let i = n.surface ?? f(e.ownerDocument, "rv-tooltip");
81
- i.textContent = t;
82
- let a = new s();
83
- a.setSurface(i), a.onEscape = n.onEscape;
84
- let o = n.trigger === "click", c = e.getAttribute("aria-expanded");
85
- o && e.setAttribute("aria-expanded", "false"), a.onHide = () => {
86
- o && e.setAttribute("aria-expanded", "false");
142
+ this.destroy(), this.root = e, this.content = t, this.options = n, n.filter && e.querySelector(n.filter);
143
+ let r = n.surface ?? m(e.ownerDocument, "rv-tooltip");
144
+ n.id && (r.id = n.id), r.id ||= d("rv-tooltip");
145
+ let o = this.session = new u();
146
+ o.setSurface(r), o.configure(n);
147
+ let s = /* @__PURE__ */ new Map(), c = (e, t) => {
148
+ s.has(e) || s.set(e, e.getAttribute("aria-expanded")), e.setAttribute("aria-expanded", String(t));
149
+ };
150
+ n.trigger === "click" && !n.filter && c(e, !1), o.onShow = (e) => {
151
+ f().includes("click") && c(e.target, !0), this.context = e, this.load(e);
152
+ }, o.onHide = () => {
153
+ this.abort?.abort(), this.generation++, this.loading = !1, r.removeAttribute("aria-busy"), this.target() && s.has(this.target()) && c(this.target(), !1);
87
154
  };
88
- let l = () => {
89
- a.show(e), o && e.setAttribute("aria-expanded", String(a.isOpen));
90
- }, u = () => a.isOpen ? a.hide() : l(), d = () => a.focus(e), p = () => a.blur(), m = () => a.leave(e), h = () => {
91
- a.pointerDown(), a.hide();
92
- }, g = (e) => a.keyDown(e);
93
- return o ? e.addEventListener("click", u) : (e.addEventListener("pointerenter", l), e.addEventListener("pointerleave", m), e.addEventListener("focus", d), e.addEventListener("blur", p), e.addEventListener("pointerdown", h), e.addEventListener("keydown", g)), this.release = () => {
94
- a.destroy(), e.removeEventListener("click", u), e.removeEventListener("pointerenter", l), e.removeEventListener("pointerleave", m), e.removeEventListener("focus", d), e.removeEventListener("blur", p), e.removeEventListener("pointerdown", h), e.removeEventListener("keydown", g), o && (c === null ? e.removeAttribute("aria-expanded") : e.setAttribute("aria-expanded", c)), n.surface || r(i);
95
- }, () => this.destroy();
155
+ let l = (t) => {
156
+ if (!this.options.filter) return e;
157
+ let n = t.target?.closest?.(this.options.filter);
158
+ return n && e.contains(n) ? n : void 0;
159
+ }, f = () => Array.isArray(this.options.trigger) ? this.options.trigger : this.options.trigger === "manual" ? [] : this.options.trigger === "click" ? ["click"] : this.options.trigger === "focus" ? ["focus"] : ["hover", "focus"], p = [
160
+ [n.filter ? "pointerover" : "pointerenter", (e) => {
161
+ let t = l(e), n = e.relatedTarget;
162
+ n && t?.contains(n) || t && f().includes("hover") && e.pointerType !== "touch" && this.reveal(t, "hover", e);
163
+ }],
164
+ [n.filter ? "pointerout" : "pointerleave", (e) => {
165
+ let t = l(e);
166
+ if (!t || t !== this.target()) return;
167
+ let n = e.relatedTarget;
168
+ n && t.contains(n) || o.leave(t, e);
169
+ }],
170
+ ["focus", (e) => {
171
+ let t = l(e);
172
+ t && f().includes("focus") && this.reveal(t, "focus", e);
173
+ }],
174
+ ["blur", (e) => {
175
+ let t = l(e);
176
+ t && t === this.target() && o.blur(e);
177
+ }],
178
+ ["pointerdown", (e) => {
179
+ o.pointerDown(), this.options.hideOnClick !== !1 && !f().includes("click") && o.hide("press", e);
180
+ }],
181
+ ["keydown", (e) => {
182
+ (!f().includes("click") || e.key === "Escape") && o.keyDown(e);
183
+ }],
184
+ ["click", (e) => {
185
+ let t = l(e);
186
+ t && (f().includes("click") ? this.isOpen && this.target() === t ? o.hide("click", e) : this.reveal(t, "click", e) : this.options.hideOnClick !== !1 && o.hide("press", e));
187
+ }]
188
+ ];
189
+ for (let [t, n] of p) e.addEventListener(t, n, !0);
190
+ return this.release = () => {
191
+ this.abort?.abort(), this.generation++;
192
+ for (let [t, n] of p) e.removeEventListener(t, n, !0);
193
+ o.destroy(), a(r, null);
194
+ for (let [e, t] of s) t === null ? e.removeAttribute("aria-expanded") : e.setAttribute("aria-expanded", t);
195
+ n.surface || i(r);
196
+ }, n.filter || (this.context = {
197
+ target: e,
198
+ reason: "imperative"
199
+ }, this.renderCurrent()), e.ownerDocument.activeElement === e && f().includes("focus") && this.reveal(e, "focus"), () => this.destroy();
200
+ }
201
+ update(e) {
202
+ this.options.loadContent && !e.loadContent && (this.abort?.abort(), this.generation++, this.loading = !1, this.asyncContent = void 0, this.element?.removeAttribute("aria-busy")), this.options = e, this.session?.configure(e), e.id && this.element && !this.isOpen && (this.element.id = e.id), this.isOpen && !this.loading && this.renderCurrent();
203
+ }
204
+ setContent(e) {
205
+ this.content = e, this.isOpen && !this.loading && this.renderCurrent();
206
+ }
207
+ show(e = this.target() ?? this.root) {
208
+ e && this.reveal(e, "imperative");
209
+ }
210
+ hide() {
211
+ this.session?.hide();
212
+ }
213
+ toggle(e = this.target() ?? this.root) {
214
+ this.isOpen ? this.hide() : this.show(e);
215
+ }
216
+ setOpen(e, t = this.target() ?? this.root) {
217
+ e && t ? this.reveal(t, "controlled") : this.session?.hide("controlled");
218
+ }
219
+ refresh() {
220
+ this.isOpen && this.context && this.load(this.context), this.session?.refresh();
96
221
  }
97
222
  destroy() {
98
- this.release?.(), this.release = void 0;
223
+ this.release?.(), this.release = void 0, this.session = void 0, this.root = void 0, this.context = void 0, this.abort = void 0, this.asyncContent = void 0, this.renderedNode = void 0, this.renderedNodes = [];
99
224
  }
100
225
  };
101
226
  //#endregion
102
- export { d as PopoverController, p as TooltipController, f as createTooltipElement };
227
+ export { p as PopoverController, h as TooltipController, m as createTooltipElement };