@ecopages/radiant-ui 0.1.0-rc.7 → 0.1.0

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 (238) hide show
  1. package/README.md +11 -3
  2. package/dist/components/ui/alert/alert.d.ts +2 -4
  3. package/dist/components/ui/alert/alert.script.d.ts +25 -15
  4. package/dist/components/ui/autocomplete/autocomplete.css +1 -2
  5. package/dist/components/ui/autocomplete/autocomplete.d.ts +8 -3
  6. package/dist/components/ui/autocomplete/autocomplete.script.d.ts +29 -4
  7. package/dist/components/ui/avatar/avatar.css +10 -8
  8. package/dist/components/ui/avatar/avatar.d.ts +3 -1
  9. package/dist/components/ui/breadcrumb/breadcrumb.d.ts +11 -11
  10. package/dist/components/ui/breadcrumb/breadcrumb.script.d.ts +10 -10
  11. package/dist/components/ui/calendar/calendar.css +10 -5
  12. package/dist/components/ui/calendar/calendar.script.d.ts +24 -21
  13. package/dist/components/ui/calendar/index.js +1 -1
  14. package/dist/components/ui/calendar/index.js.map +3 -3
  15. package/dist/components/ui/carousel/carousel-autoplay.d.ts +22 -0
  16. package/dist/components/ui/carousel/carousel-swipe.d.ts +17 -0
  17. package/dist/components/ui/carousel/carousel-window.d.ts +63 -0
  18. package/dist/components/ui/carousel/carousel.css +71 -18
  19. package/dist/components/ui/carousel/carousel.d.ts +8 -4
  20. package/dist/components/ui/carousel/carousel.script.d.ts +73 -40
  21. package/dist/components/ui/carousel/index.js +1 -1
  22. package/dist/components/ui/carousel/index.js.map +4 -4
  23. package/dist/components/ui/checkbox/checkbox.d.ts +11 -0
  24. package/dist/components/ui/checkbox/checkbox.script.d.ts +31 -8
  25. package/dist/components/ui/checkbox/index.js +1 -1
  26. package/dist/components/ui/checkbox/index.js.map +4 -4
  27. package/dist/components/ui/checkbox-group/checkbox-group.d.ts +4 -2
  28. package/dist/components/ui/checkbox-group/checkbox-group.script.d.ts +39 -20
  29. package/dist/components/ui/checkbox-group/index.js +1 -1
  30. package/dist/components/ui/checkbox-group/index.js.map +4 -4
  31. package/dist/components/ui/combobox/combobox.css +9 -1
  32. package/dist/components/ui/combobox/combobox.d.ts +12 -4
  33. package/dist/components/ui/combobox/combobox.script.d.ts +74 -25
  34. package/dist/components/ui/combobox/index.d.ts +2 -2
  35. package/dist/components/ui/combobox/index.js +1 -1
  36. package/dist/components/ui/combobox/index.js.map +4 -4
  37. package/dist/components/ui/cycle-toggle/cycle-toggle.d.ts +6 -2
  38. package/dist/components/ui/cycle-toggle/cycle-toggle.script.d.ts +35 -4
  39. package/dist/components/ui/cycle-toggle/index.js +1 -1
  40. package/dist/components/ui/cycle-toggle/index.js.map +3 -3
  41. package/dist/components/ui/date-field/date-field.css +13 -17
  42. package/dist/components/ui/date-field/date-field.d.ts +10 -8
  43. package/dist/components/ui/date-field/date-field.script.d.ts +35 -52
  44. package/dist/components/ui/date-field/index.js +1 -1
  45. package/dist/components/ui/date-field/index.js.map +4 -4
  46. package/dist/components/ui/date-input/date-input-segment-dom.d.ts +24 -0
  47. package/dist/components/ui/date-input/date-input.css +50 -0
  48. package/dist/components/ui/date-input/date-input.d.ts +8 -0
  49. package/dist/components/ui/date-input/date-input.script.d.ts +137 -0
  50. package/dist/components/ui/date-input/index.d.ts +2 -0
  51. package/dist/components/ui/date-input/index.js +2 -0
  52. package/dist/components/ui/date-input/index.js.map +7 -0
  53. package/dist/components/ui/date-range-picker/date-range-picker.css +18 -19
  54. package/dist/components/ui/date-range-picker/date-range-picker.d.ts +11 -9
  55. package/dist/components/ui/date-range-picker/date-range-picker.script.d.ts +42 -51
  56. package/dist/components/ui/date-range-picker/index.js +1 -1
  57. package/dist/components/ui/date-range-picker/index.js.map +4 -4
  58. package/dist/components/ui/dialog/dialog.css +18 -14
  59. package/dist/components/ui/dialog/dialog.d.ts +6 -0
  60. package/dist/components/ui/dialog/dialog.script.d.ts +43 -10
  61. package/dist/components/ui/dialog/index.js +1 -1
  62. package/dist/components/ui/dialog/index.js.map +4 -4
  63. package/dist/components/ui/disclosure/disclosure-group.script.d.ts +19 -3
  64. package/dist/components/ui/disclosure/disclosure.css +3 -6
  65. package/dist/components/ui/disclosure/disclosure.d.ts +23 -7
  66. package/dist/components/ui/disclosure/disclosure.script.d.ts +31 -7
  67. package/dist/components/ui/disclosure/index.d.ts +1 -1
  68. package/dist/components/ui/disclosure/index.js +1 -1
  69. package/dist/components/ui/disclosure/index.js.map +4 -4
  70. package/dist/components/ui/field/field-description.d.ts +1 -0
  71. package/dist/components/ui/field/field-error.d.ts +2 -2
  72. package/dist/components/ui/field/field.d.ts +4 -4
  73. package/dist/components/ui/field/field.script.d.ts +54 -24
  74. package/dist/components/ui/field/index.js +1 -1
  75. package/dist/components/ui/field/index.js.map +4 -4
  76. package/dist/components/ui/form/control-protocol.d.ts +38 -1
  77. package/dist/components/ui/form/form-context.d.ts +3 -0
  78. package/dist/components/ui/form/form.d.ts +6 -0
  79. package/dist/components/ui/form/form.script.d.ts +29 -12
  80. package/dist/components/ui/form/index.d.ts +2 -1
  81. package/dist/components/ui/form/index.js +1 -1
  82. package/dist/components/ui/form/index.js.map +4 -4
  83. package/dist/components/ui/grid/grid.d.ts +4 -3
  84. package/dist/components/ui/grid/grid.script.d.ts +19 -11
  85. package/dist/components/ui/hover-card/hover-card.css +12 -101
  86. package/dist/components/ui/hover-card/hover-card.d.ts +7 -2
  87. package/dist/components/ui/hover-card/hover-card.script.d.ts +36 -5
  88. package/dist/components/ui/hover-card/index.js +1 -1
  89. package/dist/components/ui/hover-card/index.js.map +4 -4
  90. package/dist/components/ui/input/index.js +1 -1
  91. package/dist/components/ui/input/index.js.map +4 -4
  92. package/dist/components/ui/input/input.css +1 -1
  93. package/dist/components/ui/knob/index.js +1 -1
  94. package/dist/components/ui/knob/index.js.map +3 -3
  95. package/dist/components/ui/knob/knob.css +6 -1
  96. package/dist/components/ui/knob/knob.d.ts +4 -4
  97. package/dist/components/ui/knob/knob.script.d.ts +55 -20
  98. package/dist/components/ui/label/index.js +1 -1
  99. package/dist/components/ui/label/index.js.map +4 -4
  100. package/dist/components/ui/label/label.d.ts +2 -1
  101. package/dist/components/ui/listbox/index.d.ts +2 -2
  102. package/dist/components/ui/listbox/index.js +1 -1
  103. package/dist/components/ui/listbox/index.js.map +4 -4
  104. package/dist/components/ui/listbox/listbox.css +14 -0
  105. package/dist/components/ui/listbox/listbox.d.ts +16 -2
  106. package/dist/components/ui/listbox/listbox.script.d.ts +55 -12
  107. package/dist/components/ui/menu-button/index.js +1 -1
  108. package/dist/components/ui/menu-button/index.js.map +4 -4
  109. package/dist/components/ui/menu-button/menu-button.d.ts +2 -2
  110. package/dist/components/ui/menu-button/menu-button.script.d.ts +30 -27
  111. package/dist/components/ui/menubar/index.js +1 -1
  112. package/dist/components/ui/menubar/index.js.map +4 -4
  113. package/dist/components/ui/menubar/menubar.script.d.ts +41 -15
  114. package/dist/components/ui/meter/index.js +1 -1
  115. package/dist/components/ui/meter/index.js.map +3 -3
  116. package/dist/components/ui/meter/meter.css +27 -2
  117. package/dist/components/ui/meter/meter.script.d.ts +19 -14
  118. package/dist/components/ui/navigation-menu/index.d.ts +1 -1
  119. package/dist/components/ui/navigation-menu/index.js +1 -1
  120. package/dist/components/ui/navigation-menu/index.js.map +4 -4
  121. package/dist/components/ui/navigation-menu/navigation-menu.css +32 -34
  122. package/dist/components/ui/navigation-menu/navigation-menu.d.ts +34 -5
  123. package/dist/components/ui/navigation-menu/navigation-menu.script.d.ts +93 -12
  124. package/dist/components/ui/number-field/index.js +1 -1
  125. package/dist/components/ui/number-field/index.js.map +4 -4
  126. package/dist/components/ui/number-field/number-field.css +1 -1
  127. package/dist/components/ui/number-field/number-field.d.ts +8 -19
  128. package/dist/components/ui/number-field/number-field.script.d.ts +30 -9
  129. package/dist/components/ui/pagination/index.d.ts +1 -1
  130. package/dist/components/ui/pagination/index.js +1 -1
  131. package/dist/components/ui/pagination/index.js.map +3 -3
  132. package/dist/components/ui/pagination/pagination.css +50 -13
  133. package/dist/components/ui/pagination/pagination.d.ts +33 -9
  134. package/dist/components/ui/pagination/pagination.script.d.ts +29 -9
  135. package/dist/components/ui/popover/index.js +1 -1
  136. package/dist/components/ui/popover/index.js.map +4 -4
  137. package/dist/components/ui/popover/popover.d.ts +17 -1
  138. package/dist/components/ui/popover/popover.script.d.ts +57 -9
  139. package/dist/components/ui/radio-group/index.js +1 -1
  140. package/dist/components/ui/radio-group/index.js.map +4 -4
  141. package/dist/components/ui/radio-group/radio-group.d.ts +2 -2
  142. package/dist/components/ui/radio-group/radio-group.script.d.ts +35 -16
  143. package/dist/components/ui/select/index.d.ts +2 -2
  144. package/dist/components/ui/select/index.js +1 -1
  145. package/dist/components/ui/select/index.js.map +4 -4
  146. package/dist/components/ui/select/select.css +8 -6
  147. package/dist/components/ui/select/select.d.ts +18 -9
  148. package/dist/components/ui/select/select.script.d.ts +74 -26
  149. package/dist/components/ui/shared/calendar-popover-behavior.d.ts +27 -0
  150. package/dist/components/ui/shared/control-toggle.css +8 -4
  151. package/dist/components/ui/shared/field-label.d.ts +5 -0
  152. package/dist/components/ui/shared/listbox-host-controller.d.ts +41 -0
  153. package/dist/components/ui/shared/listbox-option.d.ts +4 -0
  154. package/dist/components/ui/shared/multi-value.d.ts +23 -1
  155. package/dist/components/ui/shared/numeric-range.d.ts +8 -0
  156. package/dist/components/ui/shared/popover.css +10 -99
  157. package/dist/components/ui/sidebar/index.d.ts +2 -1
  158. package/dist/components/ui/sidebar/index.js +1 -1
  159. package/dist/components/ui/sidebar/index.js.map +4 -4
  160. package/dist/components/ui/sidebar/sidebar-trigger.d.ts +12 -0
  161. package/dist/components/ui/sidebar/sidebar-trigger.script.d.ts +52 -31
  162. package/dist/components/ui/sidebar/sidebar.css +67 -61
  163. package/dist/components/ui/sidebar/sidebar.d.ts +9 -4
  164. package/dist/components/ui/sidebar/sidebar.script.d.ts +42 -20
  165. package/dist/components/ui/slider/index.js +1 -1
  166. package/dist/components/ui/slider/index.js.map +4 -4
  167. package/dist/components/ui/slider/slider.css +5 -5
  168. package/dist/components/ui/slider/slider.d.ts +20 -10
  169. package/dist/components/ui/slider/slider.script.d.ts +103 -27
  170. package/dist/components/ui/switch/index.js +1 -1
  171. package/dist/components/ui/switch/index.js.map +4 -4
  172. package/dist/components/ui/switch/switch.css +28 -22
  173. package/dist/components/ui/switch/switch.d.ts +13 -0
  174. package/dist/components/ui/switch/switch.script.d.ts +34 -8
  175. package/dist/components/ui/table/index.js +1 -1
  176. package/dist/components/ui/table/index.js.map +4 -4
  177. package/dist/components/ui/table/table.d.ts +9 -7
  178. package/dist/components/ui/table/table.script.d.ts +55 -12
  179. package/dist/components/ui/tabs/tabs.css +18 -12
  180. package/dist/components/ui/tabs/tabs.d.ts +7 -4
  181. package/dist/components/ui/tabs/tabs.script.d.ts +39 -9
  182. package/dist/components/ui/tag-group/index.js +1 -1
  183. package/dist/components/ui/tag-group/index.js.map +4 -4
  184. package/dist/components/ui/tag-group/tag-group.d.ts +19 -7
  185. package/dist/components/ui/tag-group/tag-group.script.d.ts +58 -10
  186. package/dist/components/ui/textarea/index.js +1 -1
  187. package/dist/components/ui/textarea/index.js.map +4 -4
  188. package/dist/components/ui/textarea/textarea.css +1 -1
  189. package/dist/components/ui/toast/index.js +1 -1
  190. package/dist/components/ui/toast/index.js.map +4 -4
  191. package/dist/components/ui/toast/toast.css +35 -32
  192. package/dist/components/ui/toast/toast.script.d.ts +17 -31
  193. package/dist/components/ui/toast/toaster.script.d.ts +24 -12
  194. package/dist/components/ui/toc/toc.script.d.ts +19 -8
  195. package/dist/components/ui/toolbar/toolbar.d.ts +5 -0
  196. package/dist/components/ui/toolbar/toolbar.script.d.ts +24 -4
  197. package/dist/components/ui/tooltip/index.js +1 -1
  198. package/dist/components/ui/tooltip/index.js.map +4 -4
  199. package/dist/components/ui/tooltip/tooltip.css +14 -94
  200. package/dist/components/ui/tooltip/tooltip.d.ts +7 -0
  201. package/dist/components/ui/tooltip/tooltip.script.d.ts +36 -6
  202. package/dist/components/ui/tree/tree.d.ts +4 -3
  203. package/dist/components/ui/tree/tree.script.d.ts +28 -15
  204. package/dist/components/ui/treegrid/treegrid.d.ts +5 -3
  205. package/dist/components/ui/treegrid/treegrid.script.d.ts +33 -14
  206. package/dist/components/ui/window-splitter/index.d.ts +1 -1
  207. package/dist/components/ui/window-splitter/index.js +1 -1
  208. package/dist/components/ui/window-splitter/index.js.map +3 -3
  209. package/dist/components/ui/window-splitter/window-splitter.d.ts +10 -1
  210. package/dist/components/ui/window-splitter/window-splitter.script.d.ts +26 -8
  211. package/dist/index.d.ts +2 -0
  212. package/dist/index.js +1 -1
  213. package/dist/index.js.map +4 -4
  214. package/dist/lib/icons/check.d.ts +3 -0
  215. package/dist/lib/icons/chevron-down.d.ts +0 -1
  216. package/dist/lib/icons/index.d.ts +2 -0
  217. package/dist/lib/icons/x.d.ts +5 -0
  218. package/dist/lib/intl-date/index.d.ts +4 -2
  219. package/dist/lib/intl-date/segment-editing.d.ts +34 -0
  220. package/dist/lib/intl-date/segments.d.ts +26 -4
  221. package/dist/lib/non-empty.d.ts +6 -0
  222. package/dist/lib/unique-id.d.ts +11 -0
  223. package/dist/lib/viewport/breakpoints.d.ts +6 -0
  224. package/dist/lib/viewport/mobile-layout.d.ts +15 -0
  225. package/dist/styles/primitives.css +14 -11
  226. package/dist/styles/radiant-ui-core.css +10 -0
  227. package/dist/styles/radiant-ui.css +40 -11
  228. package/dist/styles/style-dependencies.json +38 -13
  229. package/dist/styles/styles.css +485 -252
  230. package/dist/styles/tailwind.css +40 -101
  231. package/dist/styles/tokens/presets/colors/aurora.css +2 -0
  232. package/dist/styles/tokens/presets/colors/basalt.css +2 -0
  233. package/dist/styles/tokens/presets/colors/ember.css +2 -0
  234. package/dist/styles/tokens/presets/colors/glacier.css +2 -0
  235. package/dist/styles/tokens/semantic.css +1 -0
  236. package/dist/styles/tokens/system.css +11 -3
  237. package/dist/styles/tokens/typography/default.css +8 -0
  238. package/package.json +27 -13
@@ -1,5 +1,4 @@
1
1
  /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
2
- @layer properties;
3
2
  rui-hover-card {
4
3
  display: inline-flex;
5
4
  }
@@ -12,110 +11,22 @@ rui-hover-card {
12
11
  display: inline-flex;
13
12
  }
14
13
  .rui-hover-card__content {
14
+ --rui-hover-card-width: 20rem;
15
+ --rui-hover-card-padding: var(--space-inset);
16
+ --rui-hover-card-radius: var(--radius-container);
17
+ --rui-hover-card-surface: var(--background);
18
+ --rui-hover-card-border-color: var(--border);
19
+ --rui-hover-card-shadow: var(--shadow-overlay);
15
20
  z-index: var(--z-index-overlay, var(--z-overlay));
16
- width: calc(var(--spacing, 0.25rem) * 80);
17
- border-radius: var(--radius-container, var(--radius-container));
18
- border-style: var(--tw-border-style);
19
- border-width: 1px;
20
- border-color: var(--color-border, var(--border));
21
- background-color: var(--color-background, var(--background));
22
- padding: var(--spacing-4, var(--space-4));
23
21
  color: var(--color-on-background, var(--on-background));
24
- --tw-shadow: var(--shadow-overlay);
25
- box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
22
+ inline-size: var(--rui-hover-card-width);
23
+ padding: var(--rui-hover-card-padding);
24
+ border-radius: var(--rui-hover-card-radius);
25
+ border: 1px solid var(--rui-hover-card-border-color);
26
+ background-color: var(--rui-hover-card-surface);
27
+ box-shadow: var(--rui-hover-card-shadow);
26
28
  }
27
29
  .rui-hover-card__content[hidden] {
28
30
  display: none;
29
31
  }
30
32
  }
31
- @property --tw-border-style {
32
- syntax: "*";
33
- inherits: false;
34
- initial-value: solid;
35
- }
36
- @property --tw-shadow {
37
- syntax: "*";
38
- inherits: false;
39
- initial-value: 0 0 #0000;
40
- }
41
- @property --tw-shadow-color {
42
- syntax: "*";
43
- inherits: false;
44
- }
45
- @property --tw-shadow-alpha {
46
- syntax: "<percentage>";
47
- inherits: false;
48
- initial-value: 100%;
49
- }
50
- @property --tw-inset-shadow {
51
- syntax: "*";
52
- inherits: false;
53
- initial-value: 0 0 #0000;
54
- }
55
- @property --tw-inset-shadow-color {
56
- syntax: "*";
57
- inherits: false;
58
- }
59
- @property --tw-inset-shadow-alpha {
60
- syntax: "<percentage>";
61
- inherits: false;
62
- initial-value: 100%;
63
- }
64
- @property --tw-ring-color {
65
- syntax: "*";
66
- inherits: false;
67
- }
68
- @property --tw-ring-shadow {
69
- syntax: "*";
70
- inherits: false;
71
- initial-value: 0 0 #0000;
72
- }
73
- @property --tw-inset-ring-color {
74
- syntax: "*";
75
- inherits: false;
76
- }
77
- @property --tw-inset-ring-shadow {
78
- syntax: "*";
79
- inherits: false;
80
- initial-value: 0 0 #0000;
81
- }
82
- @property --tw-ring-inset {
83
- syntax: "*";
84
- inherits: false;
85
- }
86
- @property --tw-ring-offset-width {
87
- syntax: "<length>";
88
- inherits: false;
89
- initial-value: 0px;
90
- }
91
- @property --tw-ring-offset-color {
92
- syntax: "*";
93
- inherits: false;
94
- initial-value: #fff;
95
- }
96
- @property --tw-ring-offset-shadow {
97
- syntax: "*";
98
- inherits: false;
99
- initial-value: 0 0 #0000;
100
- }
101
- @layer properties {
102
- @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
103
- *, ::before, ::after, ::backdrop {
104
- --tw-border-style: solid;
105
- --tw-shadow: 0 0 #0000;
106
- --tw-shadow-color: initial;
107
- --tw-shadow-alpha: 100%;
108
- --tw-inset-shadow: 0 0 #0000;
109
- --tw-inset-shadow-color: initial;
110
- --tw-inset-shadow-alpha: 100%;
111
- --tw-ring-color: initial;
112
- --tw-ring-shadow: 0 0 #0000;
113
- --tw-inset-ring-color: initial;
114
- --tw-inset-ring-shadow: 0 0 #0000;
115
- --tw-ring-inset: initial;
116
- --tw-ring-offset-width: 0px;
117
- --tw-ring-offset-color: #fff;
118
- --tw-ring-offset-shadow: 0 0 #0000;
119
- }
120
- }
121
- }
@@ -2,9 +2,14 @@ import type { JsxCustomElementAttributes, JsxElementProps } from '@ecopages/jsx'
2
2
  import { type RuiHoverCard as RuiHoverCardElement, type RuiHoverCardProps } from './hover-card.script';
3
3
  import './hover-card.script';
4
4
  export type RuiHoverCardTriggerProps = JsxElementProps<HTMLSpanElement>;
5
- /** Anchor for the hover card preview. */
5
+ /** Anchor for the hover card preview. Stamps `[data-ref="trigger"]` wrapping `[data-hover-card-trigger]`. */
6
6
  export declare function RuiHoverCardTrigger({ children, class: className, ...props }: RuiHoverCardTriggerProps): import("@ecopages/jsx").JsxRenderable;
7
7
  export type RuiHoverCardContentProps = JsxElementProps<HTMLDivElement>;
8
- /** Rich preview content rendered in the floating surface. */
8
+ /** Rich preview content. Stamps `[data-ref="content"]` with `role="dialog"`. */
9
9
  export declare function RuiHoverCardContent({ children, class: className, ...props }: RuiHoverCardContentProps): import("@ecopages/jsx").JsxRenderable;
10
+ /**
11
+ * Hover card view. Compose `RuiHoverCardTrigger` and `RuiHoverCardContent` as children.
12
+ *
13
+ * @cssclass rui-hover-card - Root wrapper around trigger and content.
14
+ */
10
15
  export declare function RuiHoverCard({ children, contentLabel, ...props }: JsxCustomElementAttributes<RuiHoverCardElement, RuiHoverCardProps>): import("@ecopages/jsx").JsxRenderable;
@@ -28,7 +28,11 @@ export type RuiHoverCardProps = {
28
28
  */
29
29
  export declare const HOVER_CARD_DEFAULT_CONTENT_LABEL = "Preview";
30
30
  /**
31
- * `<rui-hover-card>` — a floating preview surfaced on hover or focus.
31
+ * `<rui-hover-card>` — floating preview surfaced on hover or focus.
32
+ *
33
+ * The custom element is a behavior host: it does not render the composed tree.
34
+ * Import the script and place light-DOM children that match the contract below,
35
+ * or use the `RuiHoverCard` view helpers which stamp the same targets.
32
36
  *
33
37
  * Unlike `rui-tooltip`, the card can hold rich, interactive content (links,
34
38
  * avatars, buttons). It is not an APG tooltip: the panel does not use
@@ -38,13 +42,40 @@ export declare const HOVER_CARD_DEFAULT_CONTENT_LABEL = "Preview";
38
42
  * preview waits for `delay`, then subsequent previews open immediately until the post-close
39
43
  * cooldown elapses. Touch pointers open on long press.
40
44
  *
45
+ * ## Light-DOM contract
46
+ *
47
+ * Required:
48
+ * - `[data-hover-card-trigger]` — anchor wrapper. Host resolves the focusable anchor inside.
49
+ * - `[data-ref="content"]` — floating preview surface. Host assigns `id` and `aria-label`
50
+ * (from `content-label`). The view seeds `role="dialog"`.
51
+ * - `[data-ref="trigger"]` — focus bridge wrapping the anchor. Host listens for `focusin`,
52
+ * `focusout`, and `keydown` here.
53
+ *
54
+ * Host sets `aria-controls` and `aria-expanded` on the resolved anchor.
55
+ * Do not set `id`, `aria-label`, `aria-controls`, or `aria-expanded` on the anchor or surface.
56
+ *
57
+ * Nested hosts: none.
58
+ *
41
59
  * @element rui-hover-card
60
+ * @attr {boolean} open - Whether the card is open (controlled). Default: `false`.
61
+ * @attr {string} placement - Placement relative to the anchor. Default: `bottom-start`.
62
+ * @attr {number} delay - Show delay in ms. Default: `600`.
63
+ * @attr {number} close-delay - Hide delay in ms after pointer/focus leaves. Default: `200`.
64
+ * @attr {boolean} portal - Teleport the surface to `document.body`. Default: `true`.
42
65
  * @attr {boolean} disabled - Suppress hover/focus preview interactions. Default: `false`.
43
66
  * @attr {string} content-label - Accessible name for the preview dialog. Default: `Preview`.
44
67
  * @fires rui-open-change - Emitted when open state changes; `detail.open`.
45
- * @cssclass rui-hover-card - Root wrapper.
46
- * @cssclass rui-hover-card__trigger - Host wrapper for the trigger.
47
- * @cssclass rui-hover-card__content - Floating preview surface.
68
+ *
69
+ * @cssprop --rui-hover-card-width - Panel width. Default: `20rem`. Override on `.rui-hover-card__content`.
70
+ * @cssprop --rui-hover-card-padding - Panel padding. Default: `--space-inset`.
71
+ * @cssprop --rui-hover-card-radius - Panel corner radius. Default: `--radius-container`.
72
+ * @cssprop --rui-hover-card-surface - Panel fill. Default: `--background`.
73
+ * @cssprop --rui-hover-card-border-color - Panel border. Default: `--border`.
74
+ * @cssprop --rui-hover-card-shadow - Panel shadow. Default: `--shadow-overlay`.
75
+ *
76
+ * @remarks
77
+ * `setOpen(next, emit?)` toggles open state. Minimum tree: `[data-ref="trigger"]` >
78
+ * `[data-hover-card-trigger]` + `[data-ref="content"]`. BEM classes live on the view.
48
79
  */
49
80
  export declare class RuiHoverCard extends RadiantElement {
50
81
  open: boolean;
@@ -76,7 +107,7 @@ export declare class RuiHoverCard extends RadiantElement {
76
107
  private scheduleHide;
77
108
  private isTouchPointer;
78
109
  onDocumentKeydown(event: KeyboardEvent): void;
79
- onFocusIn(): void;
110
+ onFocusIn(event: FocusEvent): void;
80
111
  onFocusOut(event: FocusEvent): void;
81
112
  onHostKeydown(event: KeyboardEvent): void;
82
113
  onPointerEnter(event: PointerEvent): void;
@@ -1,2 +1,2 @@
1
- import{jsx as R}from"@ecopages/jsx/jsx-runtime";function Q(...t){return t.filter(Boolean).join(" ")}import{RadiantElement as We,bound as S,customElement as lt,event as ct,onEvent as W,onUpdated as ut,prop as A,query as ht}from"@ecopages/radiant";var Ge="a[href], button, input, select, textarea, [tabindex]";function Xe(t){return!t.hasAttribute("disabled")&&t.getAttribute("tabindex")!=="-1"}function Ye(t){return Array.from(t.querySelectorAll(Ge)).filter(Xe)}function V(t){return Ye(t)[0]}var H=0,de=0;function fe(){H+=1}function Z(t=Date.now(),e=300){H=Math.max(0,H-1),H===0&&(de=t+e)}function pe(t,e=Date.now()){return H>0||e<de?0:t}var Je={top:"bottom",bottom:"top",left:"right",right:"left"},Qe=8;function Ze(t){let e=t.indexOf("-");if(e===-1)return{side:t,align:"center"};let n=t.slice(0,e),i=t.slice(e+1);return{side:n,align:i==="start"||i==="end"?i:"center"}}function ve(t){return t==="top"||t==="bottom"?"y":"x"}function ge(t,e,n,i,r){let{width:o,height:a}=e,s=0,f=0;switch(n){case"top":f=t.top-a-r;break;case"bottom":f=t.bottom+r;break;case"left":s=t.left-o-r;break;case"right":s=t.right+r;break}return ve(n)==="y"?i==="start"?s=t.left:i==="end"?s=t.right-o:s=t.left+(t.width-o)/2:i==="start"?f=t.top:i==="end"?f=t.bottom-a:f=t.top+(t.height-a)/2,{x:s,y:f}}function ze(t,e,n,i){let{padding:r,width:o,height:a}=i;return n==="top"?Math.max(0,r-t.y):n==="bottom"?Math.max(0,t.y+e.height-(a-r)):n==="left"?Math.max(0,r-t.x):Math.max(0,t.x+e.width-(o-r))}function me(t,e,n,i){let{padding:r,width:o,height:a}=i;return n==="top"?t.top-r-e.height:n==="bottom"?a-r-e.height-t.bottom:n==="left"?t.left-r-e.width:o-r-e.width-t.right}function et(t,e){return e==="center"?t:`${t}-${e}`}function tt(t,e,n,i){let{padding:r,width:o,height:a}=i;if(ve(n)==="y"){let f=Math.max(r,o-r-e.width);return{x:Math.min(Math.max(t.x,r),f),y:t.y}}let s=Math.max(r,a-r-e.height);return{x:t.x,y:Math.min(Math.max(t.y,r),s)}}function nt(t,e,n,i,r={width:typeof window>"u"?0:window.innerWidth,height:typeof window>"u"?0:window.innerHeight,padding:Qe}){let{side:o,align:a}=Ze(n),s=ge(t,e,o,a,i),f=ze(s,e,o,r),T=o,x=s;if(f>0){let P=Je[o],C=ge(t,e,P,a,i),B=me(t,e,o,r);me(t,e,P,r)>B&&(T=P,x=C)}return{coords:tt(x,e,T,r),placement:et(T,a)}}function it(t,e,n,i,r={}){let{coords:o,placement:a}=nt(t.getBoundingClientRect(),{width:e.offsetWidth,height:e.offsetHeight},n,i);return Object.assign(e.style,{position:"fixed",left:`${o.x}px`,top:`${o.y}px`,right:"auto",bottom:"auto",visibility:"visible"}),r.matchAnchorWidth&&(e.style.width=`${t.offsetWidth}px`),e.setAttribute("data-placement",a),a}function ye({anchor:t,floating:e,getPlacement:n,gap:i,matchAnchorWidth:r}){let o=()=>{e.hidden||it(t,e,n(),i,{matchAnchorWidth:r})};o(),window.addEventListener("resize",o),window.addEventListener("scroll",o,!0);let a=new ResizeObserver(o);return a.observe(t),a.observe(e),()=>{window.removeEventListener("resize",o),window.removeEventListener("scroll",o,!0),a.disconnect()}}function be(t,e=document.body){let n=t.parentNode;if(!n)return{unmount:()=>{}};let i=document.createComment("rui-portal");return n.insertBefore(i,t),e.appendChild(t),{unmount:()=>{let r=i.parentNode;r&&(r.insertBefore(t,i),i.remove())}}}function we(t,e,n){return n?!!(t?.contains(n)||e?.contains(n)):!1}function _e(t,e,n){return n instanceof Node?!we(t,e,n):!0}var K=class{config;cleanupFloating=null;portalHandle=null;floatingElement=null;constructor(e){this.config=e}updateConfig(e){this.config={...this.config,...e}}sync(){let e=this.resolveFloating();if(!e)return;if(!this.config.getOpen()){this.teardown(),e.toggleAttribute("hidden",!0);return}let i=this.config.getAnchor();if(!i)return;e.toggleAttribute("hidden",!1),this.config.portal!==!1?this.portalHandle||(this.portalHandle=be(e,this.config.portalContainer??document.body)):this.portalHandle&&(this.portalHandle.unmount(),this.portalHandle=null),this.teardownFloating(),this.cleanupFloating=ye({anchor:i,floating:e,getPlacement:this.config.getPlacement,gap:this.config.gap??8,matchAnchorWidth:this.config.matchAnchorWidth})}contains(e){return we(this.config.getAnchor(),this.resolveFloating(),e)}getFloatingElement(){return this.resolveFloating()}teardown(){this.teardownFloating(),this.portalHandle&&(this.portalHandle.unmount(),this.portalHandle=null)}destroy(){this.teardown(),this.floatingElement=null}resolveFloating(){let e=this.config.getFloating();return e&&(this.floatingElement=e),e??this.floatingElement}teardownFloating(){this.cleanupFloating?.(),this.cleanupFloating=null}};var Ee,Te,xe,Pe,Ce,Le,Ae,Fe,Oe,De,He,Se,Re,Be,Me,je,Ie,Ue,ke,Ve;function rt(t,e,n,i,r,o){var a,s,f,T,x,P,C,B=Symbol.metadata||Symbol.for("Symbol.metadata"),q=Object.defineProperty,$=Object.create,ee=[$(null),$(null)],te=e.length;function M(l,v,g){return function(c,u){v&&(u=c,c=t);for(var y=0;y<l.length;y++)u=l[y].apply(c,g?[u]:[]);return g?u:c}}function _(l,v,g,c){if(typeof l!="function"&&(c||l!==void 0))throw new TypeError(v+" must "+(g||"be")+" a function"+(c?"":" or undefined"));return l}function ne(l,v,g,c,u,y,L,m,b,w,re){function N(d){if(!re(d))throw new TypeError("Attempted to access private element on non-instance")}var G=[].concat(v[0]),oe=v[3],X=!L,O=u===1,se=u===3,ae=u===4,j=u===2;function I(d,F,ue){return function(k,he){return F&&(he=k,k=l),ue&&ue(k),h[d].call(k,he)}}if(!X){var h={},Y=[],E=se?"get":ae||O?"set":"value";if(b?(w||O?h={get:Ke(function(){return oe(this)},c,"get"),set:function(d){v[4](this,d)}}:h[E]=oe,w||Ke(h[E],c,j?"":E)):w||(h=Object.getOwnPropertyDescriptor(l,c)),!w&&!b){if((s=ee[+m][c])&&(s^u)!==7)throw Error("Decorating two elements with the same name ("+h[E].name+") is not supported yet");ee[+m][c]=u<3?1:u}}for(var p=l,U=G.length-1;U>=0;U-=g?2:1){var le=_(G[U],"A decorator","be",!0),ce=g?G[U-1]:void 0,J={},D={kind:["field","accessor","method","getter","setter","class"][u],name:c,metadata:a,addInitializer:function(d,F){if(d.v)throw new TypeError("attempted to call addInitializer after decoration was finished");_(F,"An initializer","be",!0),y.push(F)}.bind(null,J)};if(X)s=le.call(ce,p,D),J.v=1,_(s,"class decorators","return")&&(p=s);else if(D.static=m,D.private=b,s=D.access={has:b?re.bind():function(d){return c in d}},ae||(s.get=b?j?function(d){return N(d),h.value}:I("get",0,N):function(d){return d[c]}),j||se||(s.set=b?I("set",0,N):function(d,F){d[c]=F}),p=le.call(ce,O?{get:h.get,set:h.set}:h[E],D),J.v=1,O){if(typeof p=="object"&&p)(s=_(p.get,"accessor.get"))&&(h.get=s),(s=_(p.set,"accessor.set"))&&(h.set=s),(s=_(p.init,"accessor.init"))&&Y.unshift(s);else if(p!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else _(p,(w?"field":"method")+" decorators","return")&&(w?Y.unshift(p):h[E]=p)}return u<2&&L.push(M(Y,m,1),M(y,m,0)),w||X||(b?O?L.splice(-1,0,I("get",m),I("set",m)):L.push(j?h[E]:_.call.bind(h[E])):q(l,c,h)),p}function ie(l){return q(l,B,{configurable:!0,enumerable:!0,value:a})}return o!==void 0&&(a=o[B]),a=$(a??null),x=[],P=function(l){l&&x.push(M(l))},C=function(l,v){for(var g=0;g<n.length;g++){var c=n[g],u=c[1],y=7&u;if((8&u)==l&&!y==v){var L=c[2],m=!!c[3],b=16&u;ne(l?t:t.prototype,c,b,m?"#"+L:ot(L),y,y<2?[]:l?T=T||[]:f=f||[],x,!!l,m,v,l&&m?function(w){return at(w)===t}:r)}}},C(8,0),C(0,0),C(8,1),C(0,1),P(f),P(T),s=x,te||ie(t),{e:s,get c(){var l=[];return te&&[ie(t=ne(t,[e],i,t.name,5,l)),M(l,1)]}}}function ot(t){var e=st(t,"string");return typeof e=="symbol"?e:e+""}function st(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ke(t,e,n){typeof e=="symbol"&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch{}return t}function at(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(t!==null?typeof t:"null"));return t}var z="Preview",qe=8,dt=500,Ne,$e=class extends We{static{({e:[xe,Pe,Ce,Le,Ae,Fe,Oe,De,He,Se,Re,Be,Me,je,Ie,Ue,ke,Ve,Ee],c:[Ne,Te]}=rt(this,[lt("rui-hover-card")],[[A({type:Boolean,reflect:!0,defaultValue:!1}),0,"open"],[A({type:String,defaultValue:"bottom-start"}),0,"placement"],[A({type:Number,defaultValue:600}),0,"delay"],[A({type:Number,defaultValue:200}),0,"closeDelay"],[A({type:Boolean,defaultValue:!0}),0,"portal"],[A({type:Boolean,reflect:!0,defaultValue:!1}),0,"disabled"],[A({type:String,attribute:"content-label",reflect:!0,defaultValue:z}),0,"contentLabel"],[ht({ref:"content"}),0,"contentTarget"],[ct({name:"rui-open-change",bubbles:!0,composed:!0}),0,"openChangeEvent"],[[S,ut(["open","placement","portal","disabled","contentLabel"])],2,"syncCard"],[W({document:!0,type:"keydown"}),2,"onDocumentKeydown"],[W({type:"focusin",selector:".rui-hover-card__trigger"}),2,"onFocusIn"],[W({type:"focusout",selector:".rui-hover-card__trigger"}),2,"onFocusOut"],[W({type:"keydown",selector:".rui-hover-card__trigger"}),2,"onHostKeydown"],[S,2,"onPointerEnter"],[S,2,"onPointerLeave"],[S,2,"onPointerDown"],[S,2,"onPointerUp"]],0,void 0,We))}open=(Ee(this),xe(this));placement=(Pe(this),Ce(this));delay=(Le(this),Ae(this));closeDelay=(Fe(this),Oe(this));portal=(De(this),He(this));disabled=(Se(this),Re(this));contentLabel=(Be(this),Me(this));contentTarget=(je(this),Ie(this));openChangeEvent=(Ue(this),ke(this));contentId=(Ve(this),`rui-hover-card-${Math.random().toString(36).slice(2,9)}`);controller=null;showTimer=null;hideTimer=null;longPressTimer=null;openedByKeyboard=!1;connectedCallback(){super.connectedCallback(),this.addEventListener("pointerenter",this.onPointerEnter),this.addEventListener("pointerleave",this.onPointerLeave),this.addEventListener("pointerdown",this.onPointerDown),this.addEventListener("pointerup",this.onPointerUp),this.addEventListener("pointercancel",this.onPointerUp)}onConnected(){this.syncCard()}disconnectedCallback(){this.clearTimers(),this.open&&Z(),this.controller?.destroy(),this.controller=null,this.removeEventListener("pointerenter",this.onPointerEnter),this.removeEventListener("pointerleave",this.onPointerLeave),this.removeEventListener("pointerdown",this.onPointerDown),this.removeEventListener("pointerup",this.onPointerUp),this.removeEventListener("pointercancel",this.onPointerUp),super.disconnectedCallback()}clearTimers(){this.showTimer&&clearTimeout(this.showTimer),this.hideTimer&&clearTimeout(this.hideTimer),this.longPressTimer&&clearTimeout(this.longPressTimer),this.showTimer=null,this.hideTimer=null,this.longPressTimer=null}getAnchor(){let e=this.querySelector("[data-hover-card-trigger]");return e instanceof HTMLElement?V(e)??e:V(this)??this}getFloatingElement(){return this.controller?.getFloatingElement()??this.contentTarget}ensureController(){return this.controller||(this.controller=new K({getAnchor:()=>this.getAnchor(),getFloating:()=>this.contentTarget,getOpen:()=>this.open,getPlacement:()=>this.placement,gap:qe,portal:this.portal})),this.controller}syncCard(){let e=this.getAnchor(),n=this.contentTarget;n&&(n.id=this.contentId,n.setAttribute("aria-label",this.contentLabel)),e&&(e.setAttribute("aria-controls",this.contentId),e.setAttribute("aria-expanded",String(this.open)));let i=this.ensureController();i.updateConfig({getAnchor:()=>this.getAnchor(),getFloating:()=>this.contentTarget,getOpen:()=>this.open,getPlacement:()=>this.placement,gap:qe,portal:this.portal}),i.sync(),this.syncContentPointerBridge()}syncContentPointerBridge(){let e=this.getFloatingElement();e&&(e.removeEventListener("pointerenter",this.onPointerEnter),e.removeEventListener("pointerleave",this.onPointerLeave),this.open&&(e.addEventListener("pointerenter",this.onPointerEnter),e.addEventListener("pointerleave",this.onPointerLeave)))}setOpen(e,n=!0){if(this.disabled&&e)return;if(this.open===e){this.syncCard();return}let i=this.open;this.open=e,e?fe():i&&Z(),n&&this.openChangeEvent.emit({open:e}),this.syncCard()}scheduleShow(e=!1){if(this.disabled||this.open)return;this.clearTimers(),this.openedByKeyboard=e;let n=pe(this.delay);if(n<=0){this.setOpen(!0);return}this.showTimer=setTimeout(()=>this.setOpen(!0),n)}scheduleHide(){this.clearTimers();let e=this.closeDelay>0?this.closeDelay:0;if(e<=0){this.setOpen(!1);return}this.hideTimer=setTimeout(()=>this.setOpen(!1),e)}isTouchPointer(e){return e.pointerType==="touch"}onDocumentKeydown(e){!this.open||e.key!=="Escape"||(e.preventDefault(),this.setOpen(!1),this.getAnchor()?.focus())}onFocusIn(){this.scheduleShow(!0)}onFocusOut(e){_e(this.getAnchor(),this.getFloatingElement(),e.relatedTarget)&&this.scheduleHide()}onHostKeydown(e){if(!this.open||e.key!=="Tab"||e.shiftKey||!this.openedByKeyboard)return;let n=this.getFloatingElement();if(!n)return;let i=V(n);i&&(e.preventDefault(),i.focus())}onPointerEnter(e){this.isTouchPointer(e)||this.scheduleShow()}onPointerLeave(e){this.isTouchPointer(e)||this.scheduleHide()}onPointerDown(e){this.disabled||!this.isTouchPointer(e)||(this.clearTimers(),this.longPressTimer=setTimeout(()=>{this.openedByKeyboard=!1,this.setOpen(!0)},dt))}onPointerUp(){this.longPressTimer&&(clearTimeout(this.longPressTimer),this.longPressTimer=null)}static{Te()}};function ft({children:t,class:e,...n}){return R("span",{class:"rui-hover-card__trigger",children:R("span",{...n,"data-hover-card-trigger":!0,class:Q(e),children:t})})}function pt({children:t,class:e,...n}){return R("div",{...n,"data-ref":"content",class:Q("rui-hover-card__content","rui-floating",e),role:"dialog",children:t})}function gt({children:t,contentLabel:e=z,...n}){return R("rui-hover-card",{contentLabel:e,...n,children:R("span",{class:"rui-hover-card",children:t})})}export{gt as RuiHoverCard,pt as RuiHoverCardContent,Ne as RuiHoverCardElement,ft as RuiHoverCardTrigger};
1
+ import{jsx as R}from"@ecopages/jsx/jsx-runtime";function z(...e){return e.filter(Boolean).join(" ")}import{RadiantElement as Nt,bindTo as pe,bound as H,customElement as me,event as ge,onEvent as $,onUpdated as ye,prop as F,query as ve}from"@ecopages/radiant";var Yt="a[href], button, input, select, textarea, [tabindex]";function zt(e){return!e.hasAttribute("disabled")&&e.getAttribute("tabindex")!=="-1"}function Jt(e){return Array.from(e.querySelectorAll(Yt)).filter(zt)}function k(e){return Jt(e)[0]}var Qt=/^[A-Za-z][A-Za-z0-9_-]*$/;function pt(e){return Qt.test(e)}function te(e){let t=e.trim();if(pt(t))return t;let n=`rui-${t}`;return t&&pt(n)?n:"rui"}function mt(e){let t=typeof crypto.randomUUID=="function"?crypto.randomUUID().replace(/-/g,""):Array.from(crypto.getRandomValues(new Uint8Array(16)),n=>n.toString(16).padStart(2,"0")).join("");return`${te(e)}-${t}`}var S=0,gt=0;function yt(){S+=1}function J(e=Date.now(),t=300){S=Math.max(0,S-1),S===0&&(gt=e+t)}function vt(e,t=Date.now()){return S>0||t<gt?0:e}var ee={top:"bottom",bottom:"top",left:"right",right:"left"},ne=8,Q=new WeakMap;function re(e){Q.has(e)&&(e.style.width="",e.style.minWidth="",e.style.maxWidth="",e.style.boxSizing="",Q.delete(e))}function ie(e){let t=e.indexOf("-");if(t===-1)return{side:e,align:"center"};let n=e.slice(0,t),r=e.slice(t+1);return{side:n,align:r==="start"||r==="end"?r:"center"}}function _t(e){return e==="top"||e==="bottom"?"y":"x"}function bt(e,t,n,r,i){let{width:a,height:s}=t,o=0,h=0;switch(n){case"top":h=e.top-s-i;break;case"bottom":h=e.bottom+i;break;case"left":o=e.left-a-i;break;case"right":o=e.right+i;break}return _t(n)==="y"?r==="start"?o=e.left:r==="end"?o=e.right-a:o=e.left+(e.width-a)/2:r==="start"?h=e.top:r==="end"?h=e.bottom-s:h=e.top+(e.height-s)/2,{x:o,y:h}}function oe(e,t,n,r){let{padding:i,width:a,height:s}=r;return n==="top"?Math.max(0,i-e.y):n==="bottom"?Math.max(0,e.y+t.height-(s-i)):n==="left"?Math.max(0,i-e.x):Math.max(0,e.x+t.width-(a-i))}function wt(e,t,n,r){let{padding:i,width:a,height:s}=r;return n==="top"?e.top-i-t.height:n==="bottom"?s-i-t.height-e.bottom:n==="left"?e.left-i-t.width:a-i-t.width-e.right}function se(e,t){return t==="center"?e:`${e}-${t}`}function ae(e,t,n,r){let{padding:i,width:a,height:s}=r;if(_t(n)==="y"){let h=Math.max(i,a-i-t.width);return{x:Math.min(Math.max(e.x,i),h),y:Math.max(i,e.y)}}let o=Math.max(i,s-i-t.height);return{x:Math.max(i,e.x),y:Math.min(Math.max(e.y,i),o)}}function le(e,t,n,r,i={width:typeof window>"u"?0:window.innerWidth,height:typeof window>"u"?0:window.innerHeight,padding:ne}){let{side:a,align:s}=ie(n),o=bt(e,t,a,s,r),h=oe(o,t,a,i),y=a,T=o;if(h>0){let P=ee[a],C=bt(e,t,P,s,r),I=wt(e,t,a,i);wt(e,t,P,i)>I&&(y=P,T=C)}return{coords:ae(T,t,y,i),placement:se(y,s)}}function ce(e,t,n,r,i={}){let a=i.matchAnchorWidth===!0,s=e.offsetWidth,o=a?{width:s,height:t.offsetHeight}:{width:t.offsetWidth,height:t.offsetHeight};a?(t.style.width=`${s}px`,t.style.minWidth=`${s}px`,t.style.maxWidth=`${s}px`,t.style.boxSizing="border-box",Q.set(t,!0)):re(t);let{coords:h,placement:y}=le(e.getBoundingClientRect(),o,n,r);return Object.assign(t.style,{position:"fixed",left:`${h.x}px`,top:`${h.y}px`,right:"auto",bottom:"auto",visibility:"visible"}),t.setAttribute("data-placement",y),y}function xt({anchor:e,floating:t,getPlacement:n,gap:r,matchAnchorWidth:i}){let a=()=>{t.hidden||ce(e,t,n(),r,{matchAnchorWidth:i})};a(),window.addEventListener("resize",a),window.addEventListener("scroll",a,!0);let s=new ResizeObserver(a);return s.observe(e),s.observe(t),()=>{window.removeEventListener("resize",a),window.removeEventListener("scroll",a,!0),s.disconnect()}}function Et(e,t=document.body){let n=e.parentNode;if(!n)return{unmount:()=>{}};let r=document.createComment("rui-portal");return n.insertBefore(r,e),t.appendChild(e),{unmount:()=>{let i=r.parentNode;i&&(i.insertBefore(e,r),r.remove())}}}function Tt(e,t,n){return n?!!(e?.contains(n)||t?.contains(n)):!1}function tt(e,t,n){return n instanceof Node?!Tt(e,t,n):!0}var V=class{config;cleanupFloating=null;portalHandle=null;floatingElement=null;constructor(t){this.config=t}updateConfig(t){this.config={...this.config,...t}}sync(){let t=this.resolveFloating();if(!t)return;if(!this.config.getOpen()){this.teardown(),t.toggleAttribute("hidden",!0);return}let r=this.config.getAnchor();if(!r)return;t.toggleAttribute("hidden",!1),this.config.portal!==!1?this.portalHandle||(this.portalHandle=Et(t,this.config.portalContainer??document.body)):this.portalHandle&&(this.portalHandle.unmount(),this.portalHandle=null),this.teardownFloating(),this.cleanupFloating=xt({anchor:r,floating:t,getPlacement:this.config.getPlacement,gap:this.config.gap??8,matchAnchorWidth:this.config.matchAnchorWidth})}contains(t){return Tt(this.config.getAnchor(),this.resolveFloating(),t)}getFloatingElement(){return this.resolveFloating()}teardown(){this.teardownFloating(),this.portalHandle&&(this.portalHandle.unmount(),this.portalHandle=null)}destroy(){this.teardown(),this.floatingElement=null}resolveFloating(){let t=this.config.getFloating();return t&&(this.floatingElement=t),t??this.floatingElement}teardownFloating(){this.cleanupFloating?.(),this.cleanupFloating=null}};var Pt,Ct,At,Ft,Dt,Lt,Ot,St,Ht,Rt,It,Mt,Ut,Wt,Bt,jt,kt,Vt,$t,Kt;function ue(e,t,n,r,i,a){var s,o,h,y,T,P,C,I=Symbol.metadata||Symbol.for("Symbol.metadata"),K=Object.defineProperty,q=Object.create,nt=[q(null),q(null)],rt=t.length;function M(l,v,m){return function(c,u){v&&(u=c,c=e);for(var b=0;b<l.length;b++)u=l[b].apply(c,m?[u]:[]);return m?u:c}}function x(l,v,m,c){if(typeof l!="function"&&(c||l!==void 0))throw new TypeError(v+" must "+(m||"be")+" a function"+(c?"":" or undefined"));return l}function it(l,v,m,c,u,b,A,g,w,_,st){function N(f){if(!st(f))throw new TypeError("Attempted to access private element on non-instance")}var G=[].concat(v[0]),at=v[3],Z=!A,L=u===1,lt=u===3,ct=u===4,U=u===2;function W(f,D,dt){return function(j,ft){return D&&(ft=j,j=l),dt&&dt(j),d[f].call(j,ft)}}if(!Z){var d={},X=[],E=lt?"get":ct||L?"set":"value";if(w?(_||L?d={get:qt(function(){return at(this)},c,"get"),set:function(f){v[4](this,f)}}:d[E]=at,_||qt(d[E],c,U?"":E)):_||(d=Object.getOwnPropertyDescriptor(l,c)),!_&&!w){if((o=nt[+g][c])&&(o^u)!==7)throw Error("Decorating two elements with the same name ("+d[E].name+") is not supported yet");nt[+g][c]=u<3?1:u}}for(var p=l,B=G.length-1;B>=0;B-=m?2:1){var ut=x(G[B],"A decorator","be",!0),ht=m?G[B-1]:void 0,Y={},O={kind:["field","accessor","method","getter","setter","class"][u],name:c,metadata:s,addInitializer:function(f,D){if(f.v)throw new TypeError("attempted to call addInitializer after decoration was finished");x(D,"An initializer","be",!0),b.push(D)}.bind(null,Y)};if(Z)o=ut.call(ht,p,O),Y.v=1,x(o,"class decorators","return")&&(p=o);else if(O.static=g,O.private=w,o=O.access={has:w?st.bind():function(f){return c in f}},ct||(o.get=w?U?function(f){return N(f),d.value}:W("get",0,N):function(f){return f[c]}),U||lt||(o.set=w?W("set",0,N):function(f,D){f[c]=D}),p=ut.call(ht,L?{get:d.get,set:d.set}:d[E],O),Y.v=1,L){if(typeof p=="object"&&p)(o=x(p.get,"accessor.get"))&&(d.get=o),(o=x(p.set,"accessor.set"))&&(d.set=o),(o=x(p.init,"accessor.init"))&&X.unshift(o);else if(p!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else x(p,(_?"field":"method")+" decorators","return")&&(_?X.unshift(p):d[E]=p)}return u<2&&A.push(M(X,g,1),M(b,g,0)),_||Z||(w?L?A.splice(-1,0,W("get",g),W("set",g)):A.push(U?d[E]:x.call.bind(d[E])):K(l,c,d)),p}function ot(l){return K(l,I,{configurable:!0,enumerable:!0,value:s})}return a!==void 0&&(s=a[I]),s=q(s??null),T=[],P=function(l){l&&T.push(M(l))},C=function(l,v){for(var m=0;m<n.length;m++){var c=n[m],u=c[1],b=7&u;if((8&u)==l&&!b==v){var A=c[2],g=!!c[3],w=16&u;it(l?e:e.prototype,c,w,g?"#"+A:he(A),b,b<2?[]:l?y=y||[]:h=h||[],T,!!l,g,v,l&&g?function(_){return fe(_)===e}:i)}}},C(8,0),C(0,0),C(8,1),C(0,1),P(h),P(y),o=T,rt||ot(e),{e:o,get c(){var l=[];return rt&&[ot(e=it(e,[t],r,e.name,5,l)),M(l,1)]}}}function he(e){var t=de(e,"string");return typeof t=="symbol"?t:t+""}function de(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qt(e,t,n){typeof t=="symbol"&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+" "+t:t})}catch{}return e}function fe(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(e!==null?typeof e:"null"));return e}var et="Preview",Gt=8,be=500,Xt,Zt=class extends Nt{static{({e:[At,Ft,Dt,Lt,Ot,St,Ht,Rt,It,Mt,Ut,Wt,Bt,jt,kt,Vt,$t,Kt,Pt],c:[Xt,Ct]}=ue(this,[me("rui-hover-card")],[[F({type:Boolean,reflect:!0,defaultValue:!1}),0,"open"],[F({type:String,defaultValue:"bottom-start"}),0,"placement"],[F({type:Number,defaultValue:600}),0,"delay"],[F({type:Number,defaultValue:200}),0,"closeDelay"],[F({type:Boolean,defaultValue:!0}),0,"portal"],[F({type:Boolean,reflect:!0,defaultValue:!1}),0,"disabled"],[[F({type:String,attribute:"content-label",reflect:!0,defaultValue:et}),pe({ref:"content",attr:"aria-label"})],0,"contentLabel"],[ve({ref:"content"}),0,"contentTarget"],[ge({name:"rui-open-change",bubbles:!0,composed:!0}),0,"openChangeEvent"],[[H,ye(["open","placement","portal","disabled"])],2,"syncCard"],[$({document:!0,type:"keydown"}),2,"onDocumentKeydown"],[$({type:"focusin",ref:"trigger"}),2,"onFocusIn"],[$({type:"focusout",ref:"trigger"}),2,"onFocusOut"],[$({type:"keydown",ref:"trigger"}),2,"onHostKeydown"],[H,2,"onPointerEnter"],[H,2,"onPointerLeave"],[H,2,"onPointerDown"],[H,2,"onPointerUp"]],0,void 0,Nt))}open=(Pt(this),At(this));placement=(Ft(this),Dt(this));delay=(Lt(this),Ot(this));closeDelay=(St(this),Ht(this));portal=(Rt(this),It(this));disabled=(Mt(this),Ut(this));contentLabel=(Wt(this),Bt(this));contentTarget=(jt(this),kt(this));openChangeEvent=(Vt(this),$t(this));contentId=(Kt(this),mt("rui-hover-card"));controller=null;showTimer=null;hideTimer=null;longPressTimer=null;openedByKeyboard=!1;connectedCallback(){super.connectedCallback(),this.addEventListener("pointerenter",this.onPointerEnter),this.addEventListener("pointerleave",this.onPointerLeave),this.addEventListener("pointerdown",this.onPointerDown),this.addEventListener("pointerup",this.onPointerUp),this.addEventListener("pointercancel",this.onPointerUp)}onConnected(){this.syncCard()}disconnectedCallback(){this.clearTimers(),this.open&&J(),this.controller?.destroy(),this.controller=null,this.removeEventListener("pointerenter",this.onPointerEnter),this.removeEventListener("pointerleave",this.onPointerLeave),this.removeEventListener("pointerdown",this.onPointerDown),this.removeEventListener("pointerup",this.onPointerUp),this.removeEventListener("pointercancel",this.onPointerUp),super.disconnectedCallback()}clearTimers(){this.showTimer&&clearTimeout(this.showTimer),this.hideTimer&&clearTimeout(this.hideTimer),this.longPressTimer&&clearTimeout(this.longPressTimer),this.showTimer=null,this.hideTimer=null,this.longPressTimer=null}getAnchor(){let t=this.querySelector("[data-hover-card-trigger]");return t instanceof HTMLElement?k(t)??t:k(this)??this}getFloatingElement(){return this.controller?.getFloatingElement()??this.contentTarget}ensureController(){return this.controller||(this.controller=new V({getAnchor:()=>this.getAnchor(),getFloating:()=>this.contentTarget,getOpen:()=>this.open,getPlacement:()=>this.placement,gap:Gt,portal:this.portal})),this.controller}syncCard(){let t=this.getAnchor(),n=this.contentTarget;n&&(n.id=this.contentId),t&&(t.setAttribute("aria-controls",this.contentId),t.setAttribute("aria-expanded",String(this.open)));let r=this.ensureController();r.updateConfig({getAnchor:()=>this.getAnchor(),getFloating:()=>this.contentTarget,getOpen:()=>this.open,getPlacement:()=>this.placement,gap:Gt,portal:this.portal}),r.sync(),this.syncContentPointerBridge()}syncContentPointerBridge(){let t=this.getFloatingElement();t&&(t.removeEventListener("pointerenter",this.onPointerEnter),t.removeEventListener("pointerleave",this.onPointerLeave),this.open&&(t.addEventListener("pointerenter",this.onPointerEnter),t.addEventListener("pointerleave",this.onPointerLeave)))}setOpen(t,n=!0){if(this.disabled&&t)return;if(this.open===t){this.syncCard();return}let r=this.open;this.open=t,t?yt():r&&J(),n&&this.openChangeEvent.emit({open:t}),this.syncCard()}scheduleShow(t=!1){if(this.disabled||this.open)return;this.clearTimers(),this.openedByKeyboard=t;let n=vt(this.delay);if(n<=0){this.setOpen(!0);return}this.showTimer=setTimeout(()=>this.setOpen(!0),n)}scheduleHide(){this.clearTimers();let t=this.closeDelay>0?this.closeDelay:0;if(t<=0){this.setOpen(!1);return}this.hideTimer=setTimeout(()=>this.setOpen(!1),t)}isTouchPointer(t){return t.pointerType==="touch"}onDocumentKeydown(t){if(!this.open||t.key!=="Escape")return;t.preventDefault();let n=this.getAnchor();this.setOpen(!1),n&&document.activeElement!==n&&n.focus()}onFocusIn(t){tt(this.getAnchor(),this.getFloatingElement(),t.relatedTarget)&&this.scheduleShow(!0)}onFocusOut(t){tt(this.getAnchor(),this.getFloatingElement(),t.relatedTarget)&&this.scheduleHide()}onHostKeydown(t){if(!this.open||t.key!=="Tab"||t.shiftKey||!this.openedByKeyboard)return;let n=this.getFloatingElement();if(!n)return;let r=k(n);r&&(t.preventDefault(),r.focus())}onPointerEnter(t){this.isTouchPointer(t)||this.scheduleShow()}onPointerLeave(t){this.isTouchPointer(t)||this.scheduleHide()}onPointerDown(t){this.disabled||!this.isTouchPointer(t)||(this.clearTimers(),this.longPressTimer=setTimeout(()=>{this.openedByKeyboard=!1,this.setOpen(!0)},be))}onPointerUp(){this.longPressTimer&&(clearTimeout(this.longPressTimer),this.longPressTimer=null)}static{Ct()}};function we({children:e,class:t,...n}){return R("span",{class:"rui-hover-card__trigger","data-ref":"trigger",children:R("span",{...n,"data-hover-card-trigger":!0,class:z(t),children:e})})}function _e({children:e,class:t,...n}){return R("div",{...n,"data-ref":"content",class:z("rui-hover-card__content","rui-floating",t),role:"dialog",hidden:!0,children:e})}function xe({children:e,contentLabel:t=et,...n}){return R("rui-hover-card",{contentLabel:t,...n,children:R("span",{class:"rui-hover-card",children:e})})}export{xe as RuiHoverCard,_e as RuiHoverCardContent,Xt as RuiHoverCardElement,we as RuiHoverCardTrigger};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/components/ui/hover-card/hover-card.tsx", "../../../../src/lib/cx.ts", "../../../../src/components/ui/hover-card/hover-card.script.tsx", "../../../../src/lib/focusable-elements.ts", "../../../../src/components/ui/shared/preview-timing.ts", "../../../../src/components/ui/shared/floating-position.ts", "../../../../src/components/ui/shared/portal.ts", "../../../../src/components/ui/shared/popover-controller.ts"],
4
- "sourcesContent": ["import { jsx } from \"@ecopages/jsx/jsx-runtime\";\nimport { cx } from \"@/lib/cx\";\nimport { HOVER_CARD_DEFAULT_CONTENT_LABEL } from \"./hover-card.script\";\nimport \"./hover-card.script\";\nexport function RuiHoverCardTrigger({\n children,\n class: className,\n ...props\n}) {\n return /* @__PURE__ */jsx(\"span\", {\n class: \"rui-hover-card__trigger\",\n children: /* @__PURE__ */jsx(\"span\", {\n ...props,\n \"data-hover-card-trigger\": true,\n class: cx(className),\n children\n })\n });\n}\nexport function RuiHoverCardContent({\n children,\n class: className,\n ...props\n}) {\n return /* @__PURE__ */jsx(\"div\", {\n ...props,\n \"data-ref\": \"content\",\n class: cx(\"rui-hover-card__content\", \"rui-floating\", className),\n role: \"dialog\",\n children\n });\n}\nexport function RuiHoverCard({\n children,\n contentLabel = HOVER_CARD_DEFAULT_CONTENT_LABEL,\n ...props\n}) {\n return /* @__PURE__ */jsx(\"rui-hover-card\", {\n contentLabel,\n ...props,\n children: /* @__PURE__ */jsx(\"span\", {\n class: \"rui-hover-card\",\n children\n })\n });\n}", "export function cx(...parts) {\n return parts.filter(Boolean).join(\" \");\n}", "let _initProto, _initClass, _init_open, _init_extra_open, _init_placement, _init_extra_placement, _init_delay, _init_extra_delay, _init_closeDelay, _init_extra_closeDelay, _init_portal, _init_extra_portal, _init_disabled, _init_extra_disabled, _init_contentLabel, _init_extra_contentLabel, _init_contentTarget, _init_extra_contentTarget, _init_openChangeEvent, _init_extra_openChangeEvent;\nfunction _applyDecs(e, t, n, r, o, i) { var a, c, u, s, f, l, p, d = Symbol.metadata || Symbol.for(\"Symbol.metadata\"), m = Object.defineProperty, h = Object.create, y = [h(null), h(null)], v = t.length; function g(t, n, r) { return function (o, i) { n && (i = o, o = e); for (var a = 0; a < t.length; a++) i = t[a].apply(o, r ? [i] : []); return r ? i : o; }; } function b(e, t, n, r) { if (\"function\" != typeof e && (r || void 0 !== e)) throw new TypeError(t + \" must \" + (n || \"be\") + \" a function\" + (r ? \"\" : \" or undefined\")); return e; } function applyDec(e, t, n, r, o, i, u, s, f, l, p) { function d(e) { if (!p(e)) throw new TypeError(\"Attempted to access private element on non-instance\"); } var h = [].concat(t[0]), v = t[3], w = !u, D = 1 === o, S = 3 === o, j = 4 === o, E = 2 === o; function I(t, n, r) { return function (o, i) { return n && (i = o, o = e), r && r(o), P[t].call(o, i); }; } if (!w) { var P = {}, k = [], F = S ? \"get\" : j || D ? \"set\" : \"value\"; if (f ? (l || D ? P = { get: _setFunctionName(function () { return v(this); }, r, \"get\"), set: function (e) { t[4](this, e); } } : P[F] = v, l || _setFunctionName(P[F], r, E ? \"\" : F)) : l || (P = Object.getOwnPropertyDescriptor(e, r)), !l && !f) { if ((c = y[+s][r]) && 7 !== (c ^ o)) throw Error(\"Decorating two elements with the same name (\" + P[F].name + \") is not supported yet\"); y[+s][r] = o < 3 ? 1 : o; } } for (var N = e, O = h.length - 1; O >= 0; O -= n ? 2 : 1) { var T = b(h[O], \"A decorator\", \"be\", !0), z = n ? h[O - 1] : void 0, A = {}, H = { kind: [\"field\", \"accessor\", \"method\", \"getter\", \"setter\", \"class\"][o], name: r, metadata: a, addInitializer: function (e, t) { if (e.v) throw new TypeError(\"attempted to call addInitializer after decoration was finished\"); b(t, \"An initializer\", \"be\", !0), i.push(t); }.bind(null, A) }; if (w) c = T.call(z, N, H), A.v = 1, b(c, \"class decorators\", \"return\") && (N = c);else if (H.static = s, H.private = f, c = H.access = { has: f ? p.bind() : function (e) { return r in e; } }, j || (c.get = f ? E ? function (e) { return d(e), P.value; } : I(\"get\", 0, d) : function (e) { return e[r]; }), E || S || (c.set = f ? I(\"set\", 0, d) : function (e, t) { e[r] = t; }), N = T.call(z, D ? { get: P.get, set: P.set } : P[F], H), A.v = 1, D) { if (\"object\" == typeof N && N) (c = b(N.get, \"accessor.get\")) && (P.get = c), (c = b(N.set, \"accessor.set\")) && (P.set = c), (c = b(N.init, \"accessor.init\")) && k.unshift(c);else if (void 0 !== N) throw new TypeError(\"accessor decorators must return an object with get, set, or init properties or undefined\"); } else b(N, (l ? \"field\" : \"method\") + \" decorators\", \"return\") && (l ? k.unshift(N) : P[F] = N); } return o < 2 && u.push(g(k, s, 1), g(i, s, 0)), l || w || (f ? D ? u.splice(-1, 0, I(\"get\", s), I(\"set\", s)) : u.push(E ? P[F] : b.call.bind(P[F])) : m(e, r, P)), N; } function w(e) { return m(e, d, { configurable: !0, enumerable: !0, value: a }); } return void 0 !== i && (a = i[d]), a = h(null == a ? null : a), f = [], l = function (e) { e && f.push(g(e)); }, p = function (t, r) { for (var i = 0; i < n.length; i++) { var a = n[i], c = a[1], l = 7 & c; if ((8 & c) == t && !l == r) { var p = a[2], d = !!a[3], m = 16 & c; applyDec(t ? e : e.prototype, a, m, d ? \"#\" + p : _toPropertyKey(p), l, l < 2 ? [] : t ? s = s || [] : u = u || [], f, !!t, d, r, t && d ? function (t) { return _checkInRHS(t) === e; } : o); } } }, p(8, 0), p(0, 0), p(8, 1), p(0, 1), l(u), l(s), c = f, v || w(e), { e: c, get c() { var n = []; return v && [w(e = applyDec(e, [t], r, e.name, 5, n)), g(n, 1)]; } }; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _setFunctionName(e, t, n) { \"symbol\" == typeof t && (t = (t = t.description) ? \"[\" + t + \"]\" : \"\"); try { Object.defineProperty(e, \"name\", { configurable: !0, value: n ? n + \" \" + t : t }); } catch (e) {} return e; }\nfunction _checkInRHS(e) { if (Object(e) !== e) throw TypeError(\"right-hand side of 'in' should be an object, got \" + (null !== e ? typeof e : \"null\")); return e; }\nimport { RadiantElement, bound, customElement, event, onEvent, onUpdated, prop, query } from \"@ecopages/radiant\";\nimport { findFirstFocusableCandidate } from \"@/lib/focusable-elements\";\nimport { notePreviewClosed, notePreviewOpened, resolvePreviewOpenDelay } from \"../shared/preview-timing\";\nimport { PopoverController, shouldDismissPopoverFocus } from \"../shared/popover-controller\";\nexport const HOVER_CARD_DEFAULT_CONTENT_LABEL = \"Preview\";\nconst HOVER_CARD_GAP = 8;\nconst LONG_PRESS_MS = 500;\nlet _RuiHoverCard;\nclass RuiHoverCard extends RadiantElement {\n static {\n ({\n e: [_init_open, _init_extra_open, _init_placement, _init_extra_placement, _init_delay, _init_extra_delay, _init_closeDelay, _init_extra_closeDelay, _init_portal, _init_extra_portal, _init_disabled, _init_extra_disabled, _init_contentLabel, _init_extra_contentLabel, _init_contentTarget, _init_extra_contentTarget, _init_openChangeEvent, _init_extra_openChangeEvent, _initProto],\n c: [_RuiHoverCard, _initClass]\n } = _applyDecs(this, [customElement(\"rui-hover-card\")], [[prop({\n type: Boolean,\n reflect: true,\n defaultValue: false\n }), 0, \"open\"], [prop({\n type: String,\n defaultValue: \"bottom-start\"\n }), 0, \"placement\"], [prop({\n type: Number,\n defaultValue: 600\n }), 0, \"delay\"], [prop({\n type: Number,\n defaultValue: 200\n }), 0, \"closeDelay\"], [prop({\n type: Boolean,\n defaultValue: true\n }), 0, \"portal\"], [prop({\n type: Boolean,\n reflect: true,\n defaultValue: false\n }), 0, \"disabled\"], [prop({\n type: String,\n attribute: \"content-label\",\n reflect: true,\n defaultValue: HOVER_CARD_DEFAULT_CONTENT_LABEL\n }), 0, \"contentLabel\"], [query({\n ref: \"content\"\n }), 0, \"contentTarget\"], [event({\n name: \"rui-open-change\",\n bubbles: true,\n composed: true\n }), 0, \"openChangeEvent\"], [[bound, onUpdated([\"open\", \"placement\", \"portal\", \"disabled\", \"contentLabel\"])], 2, \"syncCard\"], [onEvent({\n document: true,\n type: \"keydown\"\n }), 2, \"onDocumentKeydown\"], [onEvent({\n type: \"focusin\",\n selector: \".rui-hover-card__trigger\"\n }), 2, \"onFocusIn\"], [onEvent({\n type: \"focusout\",\n selector: \".rui-hover-card__trigger\"\n }), 2, \"onFocusOut\"], [onEvent({\n type: \"keydown\",\n selector: \".rui-hover-card__trigger\"\n }), 2, \"onHostKeydown\"], [bound, 2, \"onPointerEnter\"], [bound, 2, \"onPointerLeave\"], [bound, 2, \"onPointerDown\"], [bound, 2, \"onPointerUp\"]], 0, void 0, RadiantElement));\n }\n open = (_initProto(this), _init_open(this));\n placement = (_init_extra_open(this), _init_placement(this));\n delay = (_init_extra_placement(this), _init_delay(this));\n closeDelay = (_init_extra_delay(this), _init_closeDelay(this));\n portal = (_init_extra_closeDelay(this), _init_portal(this));\n disabled = (_init_extra_portal(this), _init_disabled(this));\n contentLabel = (_init_extra_disabled(this), _init_contentLabel(this));\n contentTarget = (_init_extra_contentLabel(this), _init_contentTarget(this));\n openChangeEvent = (_init_extra_contentTarget(this), _init_openChangeEvent(this));\n contentId = (_init_extra_openChangeEvent(this), `rui-hover-card-${Math.random().toString(36).slice(2, 9)}`);\n controller = null;\n showTimer = null;\n hideTimer = null;\n longPressTimer = null;\n openedByKeyboard = false;\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener(\"pointerenter\", this.onPointerEnter);\n this.addEventListener(\"pointerleave\", this.onPointerLeave);\n this.addEventListener(\"pointerdown\", this.onPointerDown);\n this.addEventListener(\"pointerup\", this.onPointerUp);\n this.addEventListener(\"pointercancel\", this.onPointerUp);\n }\n onConnected() {\n this.syncCard();\n }\n disconnectedCallback() {\n this.clearTimers();\n if (this.open) {\n notePreviewClosed();\n }\n this.controller?.destroy();\n this.controller = null;\n this.removeEventListener(\"pointerenter\", this.onPointerEnter);\n this.removeEventListener(\"pointerleave\", this.onPointerLeave);\n this.removeEventListener(\"pointerdown\", this.onPointerDown);\n this.removeEventListener(\"pointerup\", this.onPointerUp);\n this.removeEventListener(\"pointercancel\", this.onPointerUp);\n super.disconnectedCallback();\n }\n clearTimers() {\n if (this.showTimer) clearTimeout(this.showTimer);\n if (this.hideTimer) clearTimeout(this.hideTimer);\n if (this.longPressTimer) clearTimeout(this.longPressTimer);\n this.showTimer = null;\n this.hideTimer = null;\n this.longPressTimer = null;\n }\n getAnchor() {\n const trigger = this.querySelector(\"[data-hover-card-trigger]\");\n if (trigger instanceof HTMLElement) {\n return findFirstFocusableCandidate(trigger) ?? trigger;\n }\n return findFirstFocusableCandidate(this) ?? this;\n }\n getFloatingElement() {\n return this.controller?.getFloatingElement() ?? this.contentTarget;\n }\n ensureController() {\n if (!this.controller) {\n this.controller = new PopoverController({\n getAnchor: () => this.getAnchor(),\n getFloating: () => this.contentTarget,\n getOpen: () => this.open,\n getPlacement: () => this.placement,\n gap: HOVER_CARD_GAP,\n portal: this.portal\n });\n }\n return this.controller;\n }\n syncCard() {\n const anchor = this.getAnchor();\n const surface = this.contentTarget;\n if (surface) {\n surface.id = this.contentId;\n surface.setAttribute(\"aria-label\", this.contentLabel);\n }\n if (anchor) {\n anchor.setAttribute(\"aria-controls\", this.contentId);\n anchor.setAttribute(\"aria-expanded\", String(this.open));\n }\n const controller = this.ensureController();\n controller.updateConfig({\n getAnchor: () => this.getAnchor(),\n getFloating: () => this.contentTarget,\n getOpen: () => this.open,\n getPlacement: () => this.placement,\n gap: HOVER_CARD_GAP,\n portal: this.portal\n });\n controller.sync();\n this.syncContentPointerBridge();\n }\n syncContentPointerBridge() {\n const surface = this.getFloatingElement();\n if (!surface) {\n return;\n }\n surface.removeEventListener(\"pointerenter\", this.onPointerEnter);\n surface.removeEventListener(\"pointerleave\", this.onPointerLeave);\n if (this.open) {\n surface.addEventListener(\"pointerenter\", this.onPointerEnter);\n surface.addEventListener(\"pointerleave\", this.onPointerLeave);\n }\n }\n setOpen(next, emit = true) {\n if (this.disabled && next) {\n return;\n }\n if (this.open === next) {\n this.syncCard();\n return;\n }\n const wasOpen = this.open;\n this.open = next;\n if (next) {\n notePreviewOpened();\n } else if (wasOpen) {\n notePreviewClosed();\n }\n if (emit) {\n this.openChangeEvent.emit({\n open: next\n });\n }\n this.syncCard();\n }\n scheduleShow(fromKeyboard = false) {\n if (this.disabled || this.open) {\n return;\n }\n this.clearTimers();\n this.openedByKeyboard = fromKeyboard;\n const effectiveDelay = resolvePreviewOpenDelay(this.delay);\n if (effectiveDelay <= 0) {\n this.setOpen(true);\n return;\n }\n this.showTimer = setTimeout(() => this.setOpen(true), effectiveDelay);\n }\n scheduleHide() {\n this.clearTimers();\n const delay = this.closeDelay > 0 ? this.closeDelay : 0;\n if (delay <= 0) {\n this.setOpen(false);\n return;\n }\n this.hideTimer = setTimeout(() => this.setOpen(false), delay);\n }\n isTouchPointer(event2) {\n return event2.pointerType === \"touch\";\n }\n onDocumentKeydown(event2) {\n if (!this.open || event2.key !== \"Escape\") {\n return;\n }\n event2.preventDefault();\n this.setOpen(false);\n this.getAnchor()?.focus();\n }\n onFocusIn() {\n this.scheduleShow(true);\n }\n onFocusOut(event2) {\n if (!shouldDismissPopoverFocus(this.getAnchor(), this.getFloatingElement(), event2.relatedTarget)) {\n return;\n }\n this.scheduleHide();\n }\n onHostKeydown(event2) {\n if (!this.open || event2.key !== \"Tab\" || event2.shiftKey || !this.openedByKeyboard) {\n return;\n }\n const floating = this.getFloatingElement();\n if (!floating) {\n return;\n }\n const first = findFirstFocusableCandidate(floating);\n if (!first) {\n return;\n }\n event2.preventDefault();\n first.focus();\n }\n onPointerEnter(event2) {\n if (this.isTouchPointer(event2)) {\n return;\n }\n this.scheduleShow();\n }\n onPointerLeave(event2) {\n if (this.isTouchPointer(event2)) {\n return;\n }\n this.scheduleHide();\n }\n onPointerDown(event2) {\n if (this.disabled || !this.isTouchPointer(event2)) {\n return;\n }\n this.clearTimers();\n this.longPressTimer = setTimeout(() => {\n this.openedByKeyboard = false;\n this.setOpen(true);\n }, LONG_PRESS_MS);\n }\n onPointerUp() {\n if (this.longPressTimer) {\n clearTimeout(this.longPressTimer);\n this.longPressTimer = null;\n }\n }\n static {\n _initClass();\n }\n}\nexport { _RuiHoverCard as RuiHoverCard };", "const FOCUSABLE_CANDIDATE_SELECTOR = \"a[href], button, input, select, textarea, [tabindex]\";\nfunction isFocusableCandidate(element) {\n return !element.hasAttribute(\"disabled\") && element.getAttribute(\"tabindex\") !== \"-1\";\n}\nexport function queryFocusableCandidates(root) {\n return Array.from(root.querySelectorAll(FOCUSABLE_CANDIDATE_SELECTOR)).filter(isFocusableCandidate);\n}\nexport function queryRovingTabindexItems(root) {\n return Array.from(root.querySelectorAll(FOCUSABLE_CANDIDATE_SELECTOR)).filter(element => !element.hasAttribute(\"disabled\"));\n}\nexport function findFirstFocusableCandidate(root) {\n return queryFocusableCandidates(root)[0];\n}\nfunction isVisible(element) {\n return element.getClientRects().length > 0 && !element.closest(\"[hidden]\");\n}\nexport function getFocusableElements(root) {\n return queryFocusableCandidates(root).filter(isVisible);\n}", "const DEFAULT_COOLDOWN_MS = 300;\nlet openCount = 0;\nlet fastPathUntil = 0;\nexport function resetPreviewTimingForTests() {\n openCount = 0;\n fastPathUntil = 0;\n}\nexport function notePreviewOpened() {\n openCount += 1;\n}\nexport function notePreviewClosed(now = Date.now(), cooldownMs = DEFAULT_COOLDOWN_MS) {\n openCount = Math.max(0, openCount - 1);\n if (openCount === 0) {\n fastPathUntil = now + cooldownMs;\n }\n}\nexport function resolvePreviewOpenDelay(requestedDelay, now = Date.now()) {\n if (openCount > 0) {\n return 0;\n }\n if (now < fastPathUntil) {\n return 0;\n }\n return requestedDelay;\n}", "const OPPOSITE = {\n top: \"bottom\",\n bottom: \"top\",\n left: \"right\",\n right: \"left\"\n};\nconst DEFAULT_VIEWPORT_PADDING = 8;\nfunction parsePlacement(placement) {\n const dash = placement.indexOf(\"-\");\n if (dash === -1) return {\n side: placement,\n align: \"center\"\n };\n const side = placement.slice(0, dash);\n const align = placement.slice(dash + 1);\n return {\n side,\n align: align === \"start\" || align === \"end\" ? align : \"center\"\n };\n}\nfunction primaryAxis(side) {\n return side === \"top\" || side === \"bottom\" ? \"y\" : \"x\";\n}\nfunction coordsFor(anchor, size, side, align, gap) {\n const {\n width,\n height\n } = size;\n let x = 0;\n let y = 0;\n switch (side) {\n case \"top\":\n y = anchor.top - height - gap;\n break;\n case \"bottom\":\n y = anchor.bottom + gap;\n break;\n case \"left\":\n x = anchor.left - width - gap;\n break;\n case \"right\":\n x = anchor.right + gap;\n break;\n }\n if (primaryAxis(side) === \"y\") {\n if (align === \"start\") x = anchor.left;else if (align === \"end\") x = anchor.right - width;else x = anchor.left + (anchor.width - width) / 2;\n } else {\n if (align === \"start\") y = anchor.top;else if (align === \"end\") y = anchor.bottom - height;else y = anchor.top + (anchor.height - height) / 2;\n }\n return {\n x,\n y\n };\n}\nfunction overflowOnPrimary(coords, size, side, viewport) {\n const {\n padding,\n width: vw,\n height: vh\n } = viewport;\n if (side === \"top\") return Math.max(0, padding - coords.y);\n if (side === \"bottom\") return Math.max(0, coords.y + size.height - (vh - padding));\n if (side === \"left\") return Math.max(0, padding - coords.x);\n return Math.max(0, coords.x + size.width - (vw - padding));\n}\nfunction freeSpaceOnSide(anchor, size, side, viewport) {\n const {\n padding,\n width: vw,\n height: vh\n } = viewport;\n if (side === \"top\") return anchor.top - padding - size.height;\n if (side === \"bottom\") return vh - padding - size.height - anchor.bottom;\n if (side === \"left\") return anchor.left - padding - size.width;\n return vw - padding - size.width - anchor.right;\n}\nfunction toPlacement(side, align) {\n if (align === \"center\") {\n return side;\n }\n return `${side}-${align}`;\n}\nfunction clampCrossAxis(coords, size, side, viewport) {\n const {\n padding,\n width: vw,\n height: vh\n } = viewport;\n if (primaryAxis(side) === \"y\") {\n const maxX = Math.max(padding, vw - padding - size.width);\n return {\n x: Math.min(Math.max(coords.x, padding), maxX),\n y: coords.y\n };\n }\n const maxY = Math.max(padding, vh - padding - size.height);\n return {\n x: coords.x,\n y: Math.min(Math.max(coords.y, padding), maxY)\n };\n}\nexport function computeFloatingCoords(anchor, size, placement, gap, viewport = {\n width: typeof window === \"undefined\" ? 0 : window.innerWidth,\n height: typeof window === \"undefined\" ? 0 : window.innerHeight,\n padding: DEFAULT_VIEWPORT_PADDING\n}) {\n return computeFloatingPosition(anchor, size, placement, gap, viewport).coords;\n}\nexport function computeFloatingPosition(anchor, size, placement, gap, viewport = {\n width: typeof window === \"undefined\" ? 0 : window.innerWidth,\n height: typeof window === \"undefined\" ? 0 : window.innerHeight,\n padding: DEFAULT_VIEWPORT_PADDING\n}) {\n const {\n side: preferred,\n align\n } = parsePlacement(placement);\n const preferredCoords = coordsFor(anchor, size, preferred, align, gap);\n const preferredOverflow = overflowOnPrimary(preferredCoords, size, preferred, viewport);\n let side = preferred;\n let coords = preferredCoords;\n if (preferredOverflow > 0) {\n const flipped = OPPOSITE[preferred];\n const flippedCoords = coordsFor(anchor, size, flipped, align, gap);\n const preferredFree = freeSpaceOnSide(anchor, size, preferred, viewport);\n const flippedFree = freeSpaceOnSide(anchor, size, flipped, viewport);\n if (flippedFree > preferredFree) {\n side = flipped;\n coords = flippedCoords;\n }\n }\n return {\n coords: clampCrossAxis(coords, size, side, viewport),\n placement: toPlacement(side, align)\n };\n}\nexport function applyFloatingPosition(anchor, floating, placement, gap, options = {}) {\n const {\n coords,\n placement: resolved\n } = computeFloatingPosition(anchor.getBoundingClientRect(), {\n width: floating.offsetWidth,\n height: floating.offsetHeight\n }, placement, gap);\n Object.assign(floating.style, {\n position: \"fixed\",\n left: `${coords.x}px`,\n top: `${coords.y}px`,\n right: \"auto\",\n bottom: \"auto\",\n visibility: \"visible\"\n });\n if (options.matchAnchorWidth) {\n floating.style.width = `${anchor.offsetWidth}px`;\n }\n floating.setAttribute(\"data-placement\", resolved);\n return resolved;\n}\nexport function attachFloating({\n anchor,\n floating,\n getPlacement,\n gap,\n matchAnchorWidth\n}) {\n const update = () => {\n if (floating.hidden) return;\n applyFloatingPosition(anchor, floating, getPlacement(), gap, {\n matchAnchorWidth\n });\n };\n update();\n window.addEventListener(\"resize\", update);\n window.addEventListener(\"scroll\", update, true);\n const observer = new ResizeObserver(update);\n observer.observe(anchor);\n observer.observe(floating);\n return () => {\n window.removeEventListener(\"resize\", update);\n window.removeEventListener(\"scroll\", update, true);\n observer.disconnect();\n };\n}", "export function mountPortal(node, container = document.body) {\n const parent = node.parentNode;\n if (!parent) {\n return {\n unmount: () => {}\n };\n }\n const placeholder = document.createComment(\"rui-portal\");\n parent.insertBefore(placeholder, node);\n container.appendChild(node);\n return {\n unmount: () => {\n const restoreParent = placeholder.parentNode;\n if (!restoreParent) {\n return;\n }\n restoreParent.insertBefore(node, placeholder);\n placeholder.remove();\n }\n };\n}", "import { attachFloating } from \"./floating-position\";\nimport { mountPortal } from \"./portal\";\nexport function popoverContains(anchor, floating, node) {\n if (!node) {\n return false;\n }\n return Boolean(anchor?.contains(node) || floating?.contains(node));\n}\nexport function shouldDismissPopoverFocus(anchor, floating, relatedTarget) {\n if (!(relatedTarget instanceof Node)) {\n return true;\n }\n return !popoverContains(anchor, floating, relatedTarget);\n}\nexport function shouldDismissPopoverPointer(anchor, floating, target) {\n return !popoverContains(anchor, floating, target);\n}\nexport class PopoverController {\n config;\n cleanupFloating = null;\n portalHandle = null;\n floatingElement = null;\n constructor(config) {\n this.config = config;\n }\n updateConfig(patch) {\n this.config = {\n ...this.config,\n ...patch\n };\n }\n sync() {\n const floating = this.resolveFloating();\n if (!floating) {\n return;\n }\n const open = this.config.getOpen();\n if (!open) {\n this.teardown();\n floating.toggleAttribute(\"hidden\", true);\n return;\n }\n const anchor = this.config.getAnchor();\n if (!anchor) {\n return;\n }\n floating.toggleAttribute(\"hidden\", false);\n const usePortal = this.config.portal !== false;\n if (usePortal) {\n if (!this.portalHandle) {\n this.portalHandle = mountPortal(floating, this.config.portalContainer ?? document.body);\n }\n } else if (this.portalHandle) {\n this.portalHandle.unmount();\n this.portalHandle = null;\n }\n this.teardownFloating();\n this.cleanupFloating = attachFloating({\n anchor,\n floating,\n getPlacement: this.config.getPlacement,\n gap: this.config.gap ?? 8,\n matchAnchorWidth: this.config.matchAnchorWidth\n });\n }\n contains(node) {\n return popoverContains(this.config.getAnchor(), this.resolveFloating(), node);\n }\n getFloatingElement() {\n return this.resolveFloating();\n }\n teardown() {\n this.teardownFloating();\n if (this.portalHandle) {\n this.portalHandle.unmount();\n this.portalHandle = null;\n }\n }\n destroy() {\n this.teardown();\n this.floatingElement = null;\n }\n resolveFloating() {\n const configuredFloating = this.config.getFloating();\n if (configuredFloating) {\n this.floatingElement = configuredFloating;\n }\n return configuredFloating ?? this.floatingElement;\n }\n teardownFloating() {\n this.cleanupFloating?.();\n this.cleanupFloating = null;\n }\n}"],
5
- "mappings": "AAAA,OAAS,OAAAA,MAAW,4BCAb,SAASC,KAAMC,EAAO,CAC3B,OAAOA,EAAM,OAAO,OAAO,EAAE,KAAK,GAAG,CACvC,CCIA,OAAS,kBAAAC,GAAgB,SAAAC,EAAO,iBAAAC,GAAe,SAAAC,GAAO,WAAAC,EAAS,aAAAC,GAAW,QAAAC,EAAM,SAAAC,OAAa,oBCN7F,IAAMC,GAA+B,uDACrC,SAASC,GAAqBC,EAAS,CACrC,MAAO,CAACA,EAAQ,aAAa,UAAU,GAAKA,EAAQ,aAAa,UAAU,IAAM,IACnF,CACO,SAASC,GAAyBC,EAAM,CAC7C,OAAO,MAAM,KAAKA,EAAK,iBAAiBJ,EAA4B,CAAC,EAAE,OAAOC,EAAoB,CACpG,CAIO,SAASI,EAA4BC,EAAM,CAChD,OAAOC,GAAyBD,CAAI,EAAE,CAAC,CACzC,CCXA,IAAIE,EAAY,EACZC,GAAgB,EAKb,SAASC,IAAoB,CAClC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BAAmB,GACxB,KAAK,QAAQ,EAAI,CACnB,EAAG1B,EAAa,EAClB,CACA,aAAc,CACR,KAAK,iBACP,aAAa,KAAK,cAAc,EAChC,KAAK,eAAiB,KAE1B,CACA,MAAO,CACL7D,GAAW,CACb,CACF,EFpRO,SAAS2F,GAAoB,CAClC,SAAAC,EACA,MAAOC,EACP,GAAGC,CACL,EAAG,CACD,OAAsBC,EAAI,OAAQ,CAChC,MAAO,0BACP,SAAyBA,EAAI,OAAQ,CACnC,GAAGD,EACH,0BAA2B,GAC3B,MAAOE,EAAGH,CAAS,EACnB,SAAAD,CACF,CAAC,CACH,CAAC,CACH,CACO,SAASK,GAAoB,CAClC,SAAAL,EACA,MAAOC,EACP,GAAGC,CACL,EAAG,CACD,OAAsBC,EAAI,MAAO,CAC/B,GAAGD,EACH,WAAY,UACZ,MAAOE,EAAG,0BAA2B,eAAgBH,CAAS,EAC9D,KAAM,SACN,SAAAD,CACF,CAAC,CACH,CACO,SAASM,GAAa,CAC3B,SAAAN,EACA,aAAAO,EAAeC,EACf,GAAGN,CACL,EAAG,CACD,OAAsBC,EAAI,iBAAkB,CAC1C,aAAAI,EACA,GAAGL,EACH,SAAyBC,EAAI,OAAQ,CACnC,MAAO,iBACP,SAAAH,CACF,CAAC,CACH,CAAC,CACH",
6
- "names": ["jsx", "cx", "parts", "RadiantElement", "bound", "customElement", "event", "onEvent", "onUpdated", "prop", "query", "FOCUSABLE_CANDIDATE_SELECTOR", "isFocusableCandidate", "element", "queryFocusableCandidates", "root", "findFirstFocusableCandidate", "root", "queryFocusableCandidates", "openCount", "fastPathUntil", "notePreviewOpened", "openCount", "notePreviewClosed", "now", "cooldownMs", "fastPathUntil", "resolvePreviewOpenDelay", "requestedDelay", "OPPOSITE", "DEFAULT_VIEWPORT_PADDING", "parsePlacement", "placement", "dash", "side", "align", "primaryAxis", "coordsFor", "anchor", "size", "gap", "width", "height", "x", "y", "overflowOnPrimary", "coords", "viewport", "padding", "vw", "vh", "freeSpaceOnSide", "toPlacement", "clampCrossAxis", "maxX", "maxY", "computeFloatingPosition", "anchor", "size", "placement", "gap", "viewport", "DEFAULT_VIEWPORT_PADDING", "preferred", "align", "parsePlacement", "preferredCoords", "coordsFor", "preferredOverflow", "overflowOnPrimary", "side", "coords", "flipped", "OPPOSITE", "flippedCoords", "preferredFree", "freeSpaceOnSide", "clampCrossAxis", "toPlacement", "applyFloatingPosition", "floating", "options", "resolved", "attachFloating", "getPlacement", "matchAnchorWidth", "update", "observer", "mountPortal", "node", "container", "parent", "placeholder", "restoreParent", "popoverContains", "anchor", "floating", "node", "shouldDismissPopoverFocus", "relatedTarget", "PopoverController", "config", "patch", "floating", "anchor", "mountPortal", "attachFloating", "node", "popoverContains", "configuredFloating", "_initProto", "_initClass", "_init_open", "_init_extra_open", "_init_placement", "_init_extra_placement", "_init_delay", "_init_extra_delay", "_init_closeDelay", "_init_extra_closeDelay", "_init_portal", "_init_extra_portal", "_init_disabled", "_init_extra_disabled", "_init_contentLabel", "_init_extra_contentLabel", "_init_contentTarget", "_init_extra_contentTarget", "_init_openChangeEvent", "_init_extra_openChangeEvent", "_applyDecs", "e", "t", "r", "o", "i", "c", "u", "s", "f", "l", "p", "d", "m", "h", "y", "v", "g", "n", "a", "b", "applyDec", "w", "D", "S", "j", "E", "P", "k", "F", "_setFunctionName", "N", "O", "T", "z", "A", "H", "_toPropertyKey", "_checkInRHS", "_toPrimitive", "HOVER_CARD_DEFAULT_CONTENT_LABEL", "HOVER_CARD_GAP", "LONG_PRESS_MS", "_RuiHoverCard", "RuiHoverCard", "RadiantElement", "customElement", "prop", "query", "event", "bound", "onUpdated", "onEvent", "notePreviewClosed", "trigger", "findFirstFocusableCandidate", "PopoverController", "anchor", "surface", "controller", "next", "emit", "wasOpen", "notePreviewOpened", "fromKeyboard", "effectiveDelay", "resolvePreviewOpenDelay", "delay", "event2", "shouldDismissPopoverFocus", "floating", "first", "RuiHoverCardTrigger", "children", "className", "props", "jsx", "cx", "RuiHoverCardContent", "RuiHoverCard", "contentLabel", "HOVER_CARD_DEFAULT_CONTENT_LABEL"]
3
+ "sources": ["../../../../src/components/ui/hover-card/hover-card.tsx", "../../../../src/lib/cx.ts", "../../../../src/components/ui/hover-card/hover-card.script.tsx", "../../../../src/lib/focusable-elements.ts", "../../../../src/lib/unique-id.ts", "../../../../src/components/ui/shared/preview-timing.ts", "../../../../src/components/ui/shared/floating-position.ts", "../../../../src/components/ui/shared/portal.ts", "../../../../src/components/ui/shared/popover-controller.ts"],
4
+ "sourcesContent": ["import { jsx } from \"@ecopages/jsx/jsx-runtime\";\nimport { cx } from \"@/lib/cx\";\nimport { HOVER_CARD_DEFAULT_CONTENT_LABEL } from \"./hover-card.script\";\nimport \"./hover-card.script\";\nexport function RuiHoverCardTrigger({\n children,\n class: className,\n ...props\n}) {\n return /* @__PURE__ */jsx(\"span\", {\n class: \"rui-hover-card__trigger\",\n \"data-ref\": \"trigger\",\n children: /* @__PURE__ */jsx(\"span\", {\n ...props,\n \"data-hover-card-trigger\": true,\n class: cx(className),\n children\n })\n });\n}\nexport function RuiHoverCardContent({\n children,\n class: className,\n ...props\n}) {\n return /* @__PURE__ */jsx(\"div\", {\n ...props,\n \"data-ref\": \"content\",\n class: cx(\"rui-hover-card__content\", \"rui-floating\", className),\n role: \"dialog\",\n hidden: true,\n children\n });\n}\nexport function RuiHoverCard({\n children,\n contentLabel = HOVER_CARD_DEFAULT_CONTENT_LABEL,\n ...props\n}) {\n return /* @__PURE__ */jsx(\"rui-hover-card\", {\n contentLabel,\n ...props,\n children: /* @__PURE__ */jsx(\"span\", {\n class: \"rui-hover-card\",\n children\n })\n });\n}", "export function cx(...parts) {\n return parts.filter(Boolean).join(\" \");\n}", "let _initProto, _initClass, _init_open, _init_extra_open, _init_placement, _init_extra_placement, _init_delay, _init_extra_delay, _init_closeDelay, _init_extra_closeDelay, _init_portal, _init_extra_portal, _init_disabled, _init_extra_disabled, _init_contentLabel, _init_extra_contentLabel, _init_contentTarget, _init_extra_contentTarget, _init_openChangeEvent, _init_extra_openChangeEvent;\nfunction _applyDecs(e, t, n, r, o, i) { var a, c, u, s, f, l, p, d = Symbol.metadata || Symbol.for(\"Symbol.metadata\"), m = Object.defineProperty, h = Object.create, y = [h(null), h(null)], v = t.length; function g(t, n, r) { return function (o, i) { n && (i = o, o = e); for (var a = 0; a < t.length; a++) i = t[a].apply(o, r ? [i] : []); return r ? i : o; }; } function b(e, t, n, r) { if (\"function\" != typeof e && (r || void 0 !== e)) throw new TypeError(t + \" must \" + (n || \"be\") + \" a function\" + (r ? \"\" : \" or undefined\")); return e; } function applyDec(e, t, n, r, o, i, u, s, f, l, p) { function d(e) { if (!p(e)) throw new TypeError(\"Attempted to access private element on non-instance\"); } var h = [].concat(t[0]), v = t[3], w = !u, D = 1 === o, S = 3 === o, j = 4 === o, E = 2 === o; function I(t, n, r) { return function (o, i) { return n && (i = o, o = e), r && r(o), P[t].call(o, i); }; } if (!w) { var P = {}, k = [], F = S ? \"get\" : j || D ? \"set\" : \"value\"; if (f ? (l || D ? P = { get: _setFunctionName(function () { return v(this); }, r, \"get\"), set: function (e) { t[4](this, e); } } : P[F] = v, l || _setFunctionName(P[F], r, E ? \"\" : F)) : l || (P = Object.getOwnPropertyDescriptor(e, r)), !l && !f) { if ((c = y[+s][r]) && 7 !== (c ^ o)) throw Error(\"Decorating two elements with the same name (\" + P[F].name + \") is not supported yet\"); y[+s][r] = o < 3 ? 1 : o; } } for (var N = e, O = h.length - 1; O >= 0; O -= n ? 2 : 1) { var T = b(h[O], \"A decorator\", \"be\", !0), z = n ? h[O - 1] : void 0, A = {}, H = { kind: [\"field\", \"accessor\", \"method\", \"getter\", \"setter\", \"class\"][o], name: r, metadata: a, addInitializer: function (e, t) { if (e.v) throw new TypeError(\"attempted to call addInitializer after decoration was finished\"); b(t, \"An initializer\", \"be\", !0), i.push(t); }.bind(null, A) }; if (w) c = T.call(z, N, H), A.v = 1, b(c, \"class decorators\", \"return\") && (N = c);else if (H.static = s, H.private = f, c = H.access = { has: f ? p.bind() : function (e) { return r in e; } }, j || (c.get = f ? E ? function (e) { return d(e), P.value; } : I(\"get\", 0, d) : function (e) { return e[r]; }), E || S || (c.set = f ? I(\"set\", 0, d) : function (e, t) { e[r] = t; }), N = T.call(z, D ? { get: P.get, set: P.set } : P[F], H), A.v = 1, D) { if (\"object\" == typeof N && N) (c = b(N.get, \"accessor.get\")) && (P.get = c), (c = b(N.set, \"accessor.set\")) && (P.set = c), (c = b(N.init, \"accessor.init\")) && k.unshift(c);else if (void 0 !== N) throw new TypeError(\"accessor decorators must return an object with get, set, or init properties or undefined\"); } else b(N, (l ? \"field\" : \"method\") + \" decorators\", \"return\") && (l ? k.unshift(N) : P[F] = N); } return o < 2 && u.push(g(k, s, 1), g(i, s, 0)), l || w || (f ? D ? u.splice(-1, 0, I(\"get\", s), I(\"set\", s)) : u.push(E ? P[F] : b.call.bind(P[F])) : m(e, r, P)), N; } function w(e) { return m(e, d, { configurable: !0, enumerable: !0, value: a }); } return void 0 !== i && (a = i[d]), a = h(null == a ? null : a), f = [], l = function (e) { e && f.push(g(e)); }, p = function (t, r) { for (var i = 0; i < n.length; i++) { var a = n[i], c = a[1], l = 7 & c; if ((8 & c) == t && !l == r) { var p = a[2], d = !!a[3], m = 16 & c; applyDec(t ? e : e.prototype, a, m, d ? \"#\" + p : _toPropertyKey(p), l, l < 2 ? [] : t ? s = s || [] : u = u || [], f, !!t, d, r, t && d ? function (t) { return _checkInRHS(t) === e; } : o); } } }, p(8, 0), p(0, 0), p(8, 1), p(0, 1), l(u), l(s), c = f, v || w(e), { e: c, get c() { var n = []; return v && [w(e = applyDec(e, [t], r, e.name, 5, n)), g(n, 1)]; } }; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _setFunctionName(e, t, n) { \"symbol\" == typeof t && (t = (t = t.description) ? \"[\" + t + \"]\" : \"\"); try { Object.defineProperty(e, \"name\", { configurable: !0, value: n ? n + \" \" + t : t }); } catch (e) {} return e; }\nfunction _checkInRHS(e) { if (Object(e) !== e) throw TypeError(\"right-hand side of 'in' should be an object, got \" + (null !== e ? typeof e : \"null\")); return e; }\nimport { RadiantElement, bindTo, bound, customElement, event, onEvent, onUpdated, prop, query } from \"@ecopages/radiant\";\nimport { findFirstFocusableCandidate } from \"@/lib/focusable-elements\";\nimport { uniqueId } from \"@/lib/unique-id\";\nimport { notePreviewClosed, notePreviewOpened, resolvePreviewOpenDelay } from \"../shared/preview-timing\";\nimport { PopoverController, shouldDismissPopoverFocus } from \"../shared/popover-controller\";\nexport const HOVER_CARD_DEFAULT_CONTENT_LABEL = \"Preview\";\nconst HOVER_CARD_GAP = 8;\nconst LONG_PRESS_MS = 500;\nlet _RuiHoverCard;\nclass RuiHoverCard extends RadiantElement {\n static {\n ({\n e: [_init_open, _init_extra_open, _init_placement, _init_extra_placement, _init_delay, _init_extra_delay, _init_closeDelay, _init_extra_closeDelay, _init_portal, _init_extra_portal, _init_disabled, _init_extra_disabled, _init_contentLabel, _init_extra_contentLabel, _init_contentTarget, _init_extra_contentTarget, _init_openChangeEvent, _init_extra_openChangeEvent, _initProto],\n c: [_RuiHoverCard, _initClass]\n } = _applyDecs(this, [customElement(\"rui-hover-card\")], [[prop({\n type: Boolean,\n reflect: true,\n defaultValue: false\n }), 0, \"open\"], [prop({\n type: String,\n defaultValue: \"bottom-start\"\n }), 0, \"placement\"], [prop({\n type: Number,\n defaultValue: 600\n }), 0, \"delay\"], [prop({\n type: Number,\n defaultValue: 200\n }), 0, \"closeDelay\"], [prop({\n type: Boolean,\n defaultValue: true\n }), 0, \"portal\"], [prop({\n type: Boolean,\n reflect: true,\n defaultValue: false\n }), 0, \"disabled\"], [[prop({\n type: String,\n attribute: \"content-label\",\n reflect: true,\n defaultValue: HOVER_CARD_DEFAULT_CONTENT_LABEL\n }), bindTo({\n ref: \"content\",\n attr: \"aria-label\"\n })], 0, \"contentLabel\"], [query({\n ref: \"content\"\n }), 0, \"contentTarget\"], [event({\n name: \"rui-open-change\",\n bubbles: true,\n composed: true\n }), 0, \"openChangeEvent\"], [[bound, onUpdated([\"open\", \"placement\", \"portal\", \"disabled\"])], 2, \"syncCard\"], [onEvent({\n document: true,\n type: \"keydown\"\n }), 2, \"onDocumentKeydown\"], [onEvent({\n type: \"focusin\",\n ref: \"trigger\"\n }), 2, \"onFocusIn\"], [onEvent({\n type: \"focusout\",\n ref: \"trigger\"\n }), 2, \"onFocusOut\"], [onEvent({\n type: \"keydown\",\n ref: \"trigger\"\n }), 2, \"onHostKeydown\"], [bound, 2, \"onPointerEnter\"], [bound, 2, \"onPointerLeave\"], [bound, 2, \"onPointerDown\"], [bound, 2, \"onPointerUp\"]], 0, void 0, RadiantElement));\n }\n open = (_initProto(this), _init_open(this));\n placement = (_init_extra_open(this), _init_placement(this));\n delay = (_init_extra_placement(this), _init_delay(this));\n closeDelay = (_init_extra_delay(this), _init_closeDelay(this));\n portal = (_init_extra_closeDelay(this), _init_portal(this));\n disabled = (_init_extra_portal(this), _init_disabled(this));\n contentLabel = (_init_extra_disabled(this), _init_contentLabel(this));\n contentTarget = (_init_extra_contentLabel(this), _init_contentTarget(this));\n openChangeEvent = (_init_extra_contentTarget(this), _init_openChangeEvent(this));\n contentId = (_init_extra_openChangeEvent(this), uniqueId(\"rui-hover-card\"));\n controller = null;\n showTimer = null;\n hideTimer = null;\n longPressTimer = null;\n openedByKeyboard = false;\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener(\"pointerenter\", this.onPointerEnter);\n this.addEventListener(\"pointerleave\", this.onPointerLeave);\n this.addEventListener(\"pointerdown\", this.onPointerDown);\n this.addEventListener(\"pointerup\", this.onPointerUp);\n this.addEventListener(\"pointercancel\", this.onPointerUp);\n }\n onConnected() {\n this.syncCard();\n }\n disconnectedCallback() {\n this.clearTimers();\n if (this.open) {\n notePreviewClosed();\n }\n this.controller?.destroy();\n this.controller = null;\n this.removeEventListener(\"pointerenter\", this.onPointerEnter);\n this.removeEventListener(\"pointerleave\", this.onPointerLeave);\n this.removeEventListener(\"pointerdown\", this.onPointerDown);\n this.removeEventListener(\"pointerup\", this.onPointerUp);\n this.removeEventListener(\"pointercancel\", this.onPointerUp);\n super.disconnectedCallback();\n }\n clearTimers() {\n if (this.showTimer) clearTimeout(this.showTimer);\n if (this.hideTimer) clearTimeout(this.hideTimer);\n if (this.longPressTimer) clearTimeout(this.longPressTimer);\n this.showTimer = null;\n this.hideTimer = null;\n this.longPressTimer = null;\n }\n getAnchor() {\n const trigger = this.querySelector(\"[data-hover-card-trigger]\");\n if (trigger instanceof HTMLElement) {\n return findFirstFocusableCandidate(trigger) ?? trigger;\n }\n return findFirstFocusableCandidate(this) ?? this;\n }\n getFloatingElement() {\n return this.controller?.getFloatingElement() ?? this.contentTarget;\n }\n ensureController() {\n if (!this.controller) {\n this.controller = new PopoverController({\n getAnchor: () => this.getAnchor(),\n getFloating: () => this.contentTarget,\n getOpen: () => this.open,\n getPlacement: () => this.placement,\n gap: HOVER_CARD_GAP,\n portal: this.portal\n });\n }\n return this.controller;\n }\n syncCard() {\n const anchor = this.getAnchor();\n const surface = this.contentTarget;\n if (surface) {\n surface.id = this.contentId;\n }\n if (anchor) {\n anchor.setAttribute(\"aria-controls\", this.contentId);\n anchor.setAttribute(\"aria-expanded\", String(this.open));\n }\n const controller = this.ensureController();\n controller.updateConfig({\n getAnchor: () => this.getAnchor(),\n getFloating: () => this.contentTarget,\n getOpen: () => this.open,\n getPlacement: () => this.placement,\n gap: HOVER_CARD_GAP,\n portal: this.portal\n });\n controller.sync();\n this.syncContentPointerBridge();\n }\n syncContentPointerBridge() {\n const surface = this.getFloatingElement();\n if (!surface) {\n return;\n }\n surface.removeEventListener(\"pointerenter\", this.onPointerEnter);\n surface.removeEventListener(\"pointerleave\", this.onPointerLeave);\n if (this.open) {\n surface.addEventListener(\"pointerenter\", this.onPointerEnter);\n surface.addEventListener(\"pointerleave\", this.onPointerLeave);\n }\n }\n setOpen(next, emit = true) {\n if (this.disabled && next) {\n return;\n }\n if (this.open === next) {\n this.syncCard();\n return;\n }\n const wasOpen = this.open;\n this.open = next;\n if (next) {\n notePreviewOpened();\n } else if (wasOpen) {\n notePreviewClosed();\n }\n if (emit) {\n this.openChangeEvent.emit({\n open: next\n });\n }\n this.syncCard();\n }\n scheduleShow(fromKeyboard = false) {\n if (this.disabled || this.open) {\n return;\n }\n this.clearTimers();\n this.openedByKeyboard = fromKeyboard;\n const effectiveDelay = resolvePreviewOpenDelay(this.delay);\n if (effectiveDelay <= 0) {\n this.setOpen(true);\n return;\n }\n this.showTimer = setTimeout(() => this.setOpen(true), effectiveDelay);\n }\n scheduleHide() {\n this.clearTimers();\n const delay = this.closeDelay > 0 ? this.closeDelay : 0;\n if (delay <= 0) {\n this.setOpen(false);\n return;\n }\n this.hideTimer = setTimeout(() => this.setOpen(false), delay);\n }\n isTouchPointer(event2) {\n return event2.pointerType === \"touch\";\n }\n onDocumentKeydown(event2) {\n if (!this.open || event2.key !== \"Escape\") {\n return;\n }\n event2.preventDefault();\n const anchor = this.getAnchor();\n this.setOpen(false);\n if (anchor && document.activeElement !== anchor) {\n anchor.focus();\n }\n }\n onFocusIn(event2) {\n if (!shouldDismissPopoverFocus(this.getAnchor(), this.getFloatingElement(), event2.relatedTarget)) {\n return;\n }\n this.scheduleShow(true);\n }\n onFocusOut(event2) {\n if (!shouldDismissPopoverFocus(this.getAnchor(), this.getFloatingElement(), event2.relatedTarget)) {\n return;\n }\n this.scheduleHide();\n }\n onHostKeydown(event2) {\n if (!this.open || event2.key !== \"Tab\" || event2.shiftKey || !this.openedByKeyboard) {\n return;\n }\n const floating = this.getFloatingElement();\n if (!floating) {\n return;\n }\n const first = findFirstFocusableCandidate(floating);\n if (!first) {\n return;\n }\n event2.preventDefault();\n first.focus();\n }\n onPointerEnter(event2) {\n if (this.isTouchPointer(event2)) {\n return;\n }\n this.scheduleShow();\n }\n onPointerLeave(event2) {\n if (this.isTouchPointer(event2)) {\n return;\n }\n this.scheduleHide();\n }\n onPointerDown(event2) {\n if (this.disabled || !this.isTouchPointer(event2)) {\n return;\n }\n this.clearTimers();\n this.longPressTimer = setTimeout(() => {\n this.openedByKeyboard = false;\n this.setOpen(true);\n }, LONG_PRESS_MS);\n }\n onPointerUp() {\n if (this.longPressTimer) {\n clearTimeout(this.longPressTimer);\n this.longPressTimer = null;\n }\n }\n static {\n _initClass();\n }\n}\nexport { _RuiHoverCard as RuiHoverCard };", "const FOCUSABLE_CANDIDATE_SELECTOR = \"a[href], button, input, select, textarea, [tabindex]\";\nfunction isFocusableCandidate(element) {\n return !element.hasAttribute(\"disabled\") && element.getAttribute(\"tabindex\") !== \"-1\";\n}\nexport function queryFocusableCandidates(root) {\n return Array.from(root.querySelectorAll(FOCUSABLE_CANDIDATE_SELECTOR)).filter(isFocusableCandidate);\n}\nexport function queryRovingTabindexItems(root) {\n return Array.from(root.querySelectorAll(FOCUSABLE_CANDIDATE_SELECTOR)).filter(element => !element.hasAttribute(\"disabled\"));\n}\nexport function findFirstFocusableCandidate(root) {\n return queryFocusableCandidates(root)[0];\n}\nfunction isVisible(element) {\n return element.getClientRects().length > 0 && !element.closest(\"[hidden]\");\n}\nexport function getFocusableElements(root) {\n return queryFocusableCandidates(root).filter(isVisible);\n}", "const CSS_SAFE_ID = /^[A-Za-z][A-Za-z0-9_-]*$/;\nexport function isCssSafeId(value) {\n return CSS_SAFE_ID.test(value);\n}\nfunction cssSafePrefix(prefix) {\n const trimmed = prefix.trim();\n if (isCssSafeId(trimmed)) {\n return trimmed;\n }\n const prefixed = `rui-${trimmed}`;\n if (trimmed && isCssSafeId(prefixed)) {\n return prefixed;\n }\n return \"rui\";\n}\nexport function uniqueId(prefix) {\n const token = typeof crypto.randomUUID === \"function\" ? crypto.randomUUID().replace(/-/g, \"\") : Array.from(crypto.getRandomValues(new Uint8Array(16)), byte => byte.toString(16).padStart(2, \"0\")).join(\"\");\n return `${cssSafePrefix(prefix)}-${token}`;\n}", "const DEFAULT_COOLDOWN_MS = 300;\nlet openCount = 0;\nlet fastPathUntil = 0;\nexport function resetPreviewTimingForTests() {\n openCount = 0;\n fastPathUntil = 0;\n}\nexport function notePreviewOpened() {\n openCount += 1;\n}\nexport function notePreviewClosed(now = Date.now(), cooldownMs = DEFAULT_COOLDOWN_MS) {\n openCount = Math.max(0, openCount - 1);\n if (openCount === 0) {\n fastPathUntil = now + cooldownMs;\n }\n}\nexport function resolvePreviewOpenDelay(requestedDelay, now = Date.now()) {\n if (openCount > 0) {\n return 0;\n }\n if (now < fastPathUntil) {\n return 0;\n }\n return requestedDelay;\n}", "const OPPOSITE = {\n top: \"bottom\",\n bottom: \"top\",\n left: \"right\",\n right: \"left\"\n};\nconst DEFAULT_VIEWPORT_PADDING = 8;\nconst matchAnchorWidthStylesApplied = /* @__PURE__ */new WeakMap();\nfunction clearMatchAnchorWidthStyles(floating) {\n if (!matchAnchorWidthStylesApplied.has(floating)) {\n return;\n }\n floating.style.width = \"\";\n floating.style.minWidth = \"\";\n floating.style.maxWidth = \"\";\n floating.style.boxSizing = \"\";\n matchAnchorWidthStylesApplied.delete(floating);\n}\nfunction parsePlacement(placement) {\n const dash = placement.indexOf(\"-\");\n if (dash === -1) return {\n side: placement,\n align: \"center\"\n };\n const side = placement.slice(0, dash);\n const align = placement.slice(dash + 1);\n return {\n side,\n align: align === \"start\" || align === \"end\" ? align : \"center\"\n };\n}\nfunction primaryAxis(side) {\n return side === \"top\" || side === \"bottom\" ? \"y\" : \"x\";\n}\nfunction coordsFor(anchor, size, side, align, gap) {\n const {\n width,\n height\n } = size;\n let x = 0;\n let y = 0;\n switch (side) {\n case \"top\":\n y = anchor.top - height - gap;\n break;\n case \"bottom\":\n y = anchor.bottom + gap;\n break;\n case \"left\":\n x = anchor.left - width - gap;\n break;\n case \"right\":\n x = anchor.right + gap;\n break;\n }\n if (primaryAxis(side) === \"y\") {\n if (align === \"start\") x = anchor.left;else if (align === \"end\") x = anchor.right - width;else x = anchor.left + (anchor.width - width) / 2;\n } else {\n if (align === \"start\") y = anchor.top;else if (align === \"end\") y = anchor.bottom - height;else y = anchor.top + (anchor.height - height) / 2;\n }\n return {\n x,\n y\n };\n}\nfunction overflowOnPrimary(coords, size, side, viewport) {\n const {\n padding,\n width: vw,\n height: vh\n } = viewport;\n if (side === \"top\") return Math.max(0, padding - coords.y);\n if (side === \"bottom\") return Math.max(0, coords.y + size.height - (vh - padding));\n if (side === \"left\") return Math.max(0, padding - coords.x);\n return Math.max(0, coords.x + size.width - (vw - padding));\n}\nfunction freeSpaceOnSide(anchor, size, side, viewport) {\n const {\n padding,\n width: vw,\n height: vh\n } = viewport;\n if (side === \"top\") return anchor.top - padding - size.height;\n if (side === \"bottom\") return vh - padding - size.height - anchor.bottom;\n if (side === \"left\") return anchor.left - padding - size.width;\n return vw - padding - size.width - anchor.right;\n}\nfunction toPlacement(side, align) {\n if (align === \"center\") {\n return side;\n }\n return `${side}-${align}`;\n}\nfunction clampCrossAxis(coords, size, side, viewport) {\n const {\n padding,\n width: vw,\n height: vh\n } = viewport;\n if (primaryAxis(side) === \"y\") {\n const maxX = Math.max(padding, vw - padding - size.width);\n return {\n x: Math.min(Math.max(coords.x, padding), maxX),\n y: Math.max(padding, coords.y)\n };\n }\n const maxY = Math.max(padding, vh - padding - size.height);\n return {\n x: Math.max(padding, coords.x),\n y: Math.min(Math.max(coords.y, padding), maxY)\n };\n}\nexport function computeFloatingCoords(anchor, size, placement, gap, viewport = {\n width: typeof window === \"undefined\" ? 0 : window.innerWidth,\n height: typeof window === \"undefined\" ? 0 : window.innerHeight,\n padding: DEFAULT_VIEWPORT_PADDING\n}) {\n return computeFloatingPosition(anchor, size, placement, gap, viewport).coords;\n}\nexport function computeFloatingPosition(anchor, size, placement, gap, viewport = {\n width: typeof window === \"undefined\" ? 0 : window.innerWidth,\n height: typeof window === \"undefined\" ? 0 : window.innerHeight,\n padding: DEFAULT_VIEWPORT_PADDING\n}) {\n const {\n side: preferred,\n align\n } = parsePlacement(placement);\n const preferredCoords = coordsFor(anchor, size, preferred, align, gap);\n const preferredOverflow = overflowOnPrimary(preferredCoords, size, preferred, viewport);\n let side = preferred;\n let coords = preferredCoords;\n if (preferredOverflow > 0) {\n const flipped = OPPOSITE[preferred];\n const flippedCoords = coordsFor(anchor, size, flipped, align, gap);\n const preferredFree = freeSpaceOnSide(anchor, size, preferred, viewport);\n const flippedFree = freeSpaceOnSide(anchor, size, flipped, viewport);\n if (flippedFree > preferredFree) {\n side = flipped;\n coords = flippedCoords;\n }\n }\n return {\n coords: clampCrossAxis(coords, size, side, viewport),\n placement: toPlacement(side, align)\n };\n}\nexport function applyFloatingPosition(anchor, floating, placement, gap, options = {}) {\n const matchAnchorWidth = options.matchAnchorWidth === true;\n const anchorWidth = anchor.offsetWidth;\n const size = matchAnchorWidth ? {\n width: anchorWidth,\n height: floating.offsetHeight\n } : {\n width: floating.offsetWidth,\n height: floating.offsetHeight\n };\n if (matchAnchorWidth) {\n floating.style.width = `${anchorWidth}px`;\n floating.style.minWidth = `${anchorWidth}px`;\n floating.style.maxWidth = `${anchorWidth}px`;\n floating.style.boxSizing = \"border-box\";\n matchAnchorWidthStylesApplied.set(floating, true);\n } else {\n clearMatchAnchorWidthStyles(floating);\n }\n const {\n coords,\n placement: resolved\n } = computeFloatingPosition(anchor.getBoundingClientRect(), size, placement, gap);\n Object.assign(floating.style, {\n position: \"fixed\",\n left: `${coords.x}px`,\n top: `${coords.y}px`,\n right: \"auto\",\n bottom: \"auto\",\n visibility: \"visible\"\n });\n floating.setAttribute(\"data-placement\", resolved);\n return resolved;\n}\nexport function attachFloating({\n anchor,\n floating,\n getPlacement,\n gap,\n matchAnchorWidth\n}) {\n const update = () => {\n if (floating.hidden) return;\n applyFloatingPosition(anchor, floating, getPlacement(), gap, {\n matchAnchorWidth\n });\n };\n update();\n window.addEventListener(\"resize\", update);\n window.addEventListener(\"scroll\", update, true);\n const observer = new ResizeObserver(update);\n observer.observe(anchor);\n observer.observe(floating);\n return () => {\n window.removeEventListener(\"resize\", update);\n window.removeEventListener(\"scroll\", update, true);\n observer.disconnect();\n };\n}", "export function mountPortal(node, container = document.body) {\n const parent = node.parentNode;\n if (!parent) {\n return {\n unmount: () => {}\n };\n }\n const placeholder = document.createComment(\"rui-portal\");\n parent.insertBefore(placeholder, node);\n container.appendChild(node);\n return {\n unmount: () => {\n const restoreParent = placeholder.parentNode;\n if (!restoreParent) {\n return;\n }\n restoreParent.insertBefore(node, placeholder);\n placeholder.remove();\n }\n };\n}", "import { attachFloating } from \"./floating-position\";\nimport { mountPortal } from \"./portal\";\nexport function popoverContains(anchor, floating, node) {\n if (!node) {\n return false;\n }\n return Boolean(anchor?.contains(node) || floating?.contains(node));\n}\nexport function shouldDismissPopoverFocus(anchor, floating, relatedTarget) {\n if (!(relatedTarget instanceof Node)) {\n return true;\n }\n return !popoverContains(anchor, floating, relatedTarget);\n}\nexport function shouldDismissPopoverPointer(anchor, floating, target) {\n return !popoverContains(anchor, floating, target);\n}\nexport class PopoverController {\n config;\n cleanupFloating = null;\n portalHandle = null;\n floatingElement = null;\n constructor(config) {\n this.config = config;\n }\n updateConfig(patch) {\n this.config = {\n ...this.config,\n ...patch\n };\n }\n sync() {\n const floating = this.resolveFloating();\n if (!floating) {\n return;\n }\n const open = this.config.getOpen();\n if (!open) {\n this.teardown();\n floating.toggleAttribute(\"hidden\", true);\n return;\n }\n const anchor = this.config.getAnchor();\n if (!anchor) {\n return;\n }\n floating.toggleAttribute(\"hidden\", false);\n const usePortal = this.config.portal !== false;\n if (usePortal) {\n if (!this.portalHandle) {\n this.portalHandle = mountPortal(floating, this.config.portalContainer ?? document.body);\n }\n } else if (this.portalHandle) {\n this.portalHandle.unmount();\n this.portalHandle = null;\n }\n this.teardownFloating();\n this.cleanupFloating = attachFloating({\n anchor,\n floating,\n getPlacement: this.config.getPlacement,\n gap: this.config.gap ?? 8,\n matchAnchorWidth: this.config.matchAnchorWidth\n });\n }\n contains(node) {\n return popoverContains(this.config.getAnchor(), this.resolveFloating(), node);\n }\n getFloatingElement() {\n return this.resolveFloating();\n }\n teardown() {\n this.teardownFloating();\n if (this.portalHandle) {\n this.portalHandle.unmount();\n this.portalHandle = null;\n }\n }\n destroy() {\n this.teardown();\n this.floatingElement = null;\n }\n resolveFloating() {\n const configuredFloating = this.config.getFloating();\n if (configuredFloating) {\n this.floatingElement = configuredFloating;\n }\n return configuredFloating ?? this.floatingElement;\n }\n teardownFloating() {\n this.cleanupFloating?.();\n this.cleanupFloating = null;\n }\n}"],
5
+ "mappings": "AAAA,OAAS,OAAAA,MAAW,4BCAb,SAASC,KAAMC,EAAO,CAC3B,OAAOA,EAAM,OAAO,OAAO,EAAE,KAAK,GAAG,CACvC,CCIA,OAAS,kBAAAC,GAAgB,UAAAC,GAAQ,SAAAC,EAAO,iBAAAC,GAAe,SAAAC,GAAO,WAAAC,EAAS,aAAAC,GAAW,QAAAC,EAAM,SAAAC,OAAa,oBCNrG,IAAMC,GAA+B,uDACrC,SAASC,GAAqBC,EAAS,CACrC,MAAO,CAACA,EAAQ,aAAa,UAAU,GAAKA,EAAQ,aAAa,UAAU,IAAM,IACnF,CACO,SAASC,GAAyBC,EAAM,CAC7C,OAAO,MAAM,KAAKA,EAAK,iBAAiBJ,EAA4B,CAAC,EAAE,OAAOC,EAAoB,CACpG,CAIO,SAASI,EAA4BC,EAAM,CAChD,OAAOC,GAAyBD,CAAI,EAAE,CAAC,CACzC,CCZA,IAAME,GAAc,2BACb,SAASC,GAAYC,EAAO,CACjC,OAAOF,GAAY,KAAKE,CAAK,CAC/B,CACA,SAASC,GAAcC,EAAQ,CAC7B,IAAMC,EAAUD,EAAO,KAAK,EAC5B,GAAIH,GAAYI,CAAO,EACrB,OAAOA,E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CACF,EF7RO,SAAS8F,GAAoB,CAClC,SAAAC,EACA,MAAOC,EACP,GAAGC,CACL,EAAG,CACD,OAAsBC,EAAI,OAAQ,CAChC,MAAO,0BACP,WAAY,UACZ,SAAyBA,EAAI,OAAQ,CACnC,GAAGD,EACH,0BAA2B,GAC3B,MAAOE,EAAGH,CAAS,EACnB,SAAAD,CACF,CAAC,CACH,CAAC,CACH,CACO,SAASK,GAAoB,CAClC,SAAAL,EACA,MAAOC,EACP,GAAGC,CACL,EAAG,CACD,OAAsBC,EAAI,MAAO,CAC/B,GAAGD,EACH,WAAY,UACZ,MAAOE,EAAG,0BAA2B,eAAgBH,CAAS,EAC9D,KAAM,SACN,OAAQ,GACR,SAAAD,CACF,CAAC,CACH,CACO,SAASM,GAAa,CAC3B,SAAAN,EACA,aAAAO,EAAeC,GACf,GAAGN,CACL,EAAG,CACD,OAAsBC,EAAI,iBAAkB,CAC1C,aAAAI,EACA,GAAGL,EACH,SAAyBC,EAAI,OAAQ,CACnC,MAAO,iBACP,SAAAH,CACF,CAAC,CACH,CAAC,CACH",
6
+ "names": ["jsx", "cx", "parts", "RadiantElement", "bindTo", "bound", "customElement", "event", "onEvent", "onUpdated", "prop", "query", "FOCUSABLE_CANDIDATE_SELECTOR", "isFocusableCandidate", "element", "queryFocusableCandidates", "root", "findFirstFocusableCandidate", "root", "queryFocusableCandidates", "CSS_SAFE_ID", "isCssSafeId", "value", "cssSafePrefix", "prefix", "trimmed", "prefixed", "uniqueId", "token", "byte", "openCount", "fastPathUntil", "notePreviewOpened", "openCount", "notePreviewClosed", "now", "cooldownMs", "fastPathUntil", "resolvePreviewOpenDelay", "requestedDelay", "OPPOSITE", "DEFAULT_VIEWPORT_PADDING", "matchAnchorWidthStylesApplied", "clearMatchAnchorWidthStyles", "floating", "parsePlacement", "placement", "dash", "side", "align", "primaryAxis", "coordsFor", "anchor", "size", "gap", "width", "height", "x", "y", "overflowOnPrimary", "coords", "viewport", "padding", "vw", "vh", "freeSpaceOnSide", "toPlacement", "clampCrossAxis", "maxX", "maxY", "computeFloatingPosition", "anchor", "size", "placement", "gap", "viewport", "DEFAULT_VIEWPORT_PADDING", "preferred", "align", "parsePlacement", "preferredCoords", "coordsFor", "preferredOverflow", "overflowOnPrimary", "side", "coords", "flipped", "OPPOSITE", "flippedCoords", "preferredFree", "freeSpaceOnSide", "clampCrossAxis", "toPlacement", "applyFloatingPosition", "floating", "options", "matchAnchorWidth", "anchorWidth", "matchAnchorWidthStylesApplied", "clearMatchAnchorWidthStyles", "resolved", "attachFloating", "getPlacement", "update", "observer", "mountPortal", "node", "container", "parent", "placeholder", "restoreParent", "popoverContains", "anchor", "floating", "node", "shouldDismissPopoverFocus", "relatedTarget", "PopoverController", "config", "patch", "floating", "anchor", "mountPortal", "attachFloating", "node", "popoverContains", "configuredFloating", "_initProto", "_initClass", "_init_open", "_init_extra_open", "_init_placement", "_init_extra_placement", "_init_delay", "_init_extra_delay", "_init_closeDelay", "_init_extra_closeDelay", "_init_portal", "_init_extra_portal", "_init_disabled", "_init_extra_disabled", "_init_contentLabel", "_init_extra_contentLabel", "_init_contentTarget", "_init_extra_contentTarget", "_init_openChangeEvent", "_init_extra_openChangeEvent", "_applyDecs", "o", "i", "a", "c", "u", "s", "f", "l", "p", "d", "m", "h", "y", "v", "g", "t", "n", "r", "b", "e", "applyDec", "w", "D", "S", "j", "E", "I", "P", "k", "F", "_setFunctionName", "N", "O", "T", "z", "A", "H", "_toPropertyKey", "_checkInRHS", "_toPrimitive", "HOVER_CARD_DEFAULT_CONTENT_LABEL", "HOVER_CARD_GAP", "LONG_PRESS_MS", "_RuiHoverCard", "RuiHoverCard", "RadiantElement", "customElement", "prop", "bindTo", "query", "event", "bound", "onUpdated", "onEvent", "uniqueId", "notePreviewClosed", "trigger", "findFirstFocusableCandidate", "PopoverController", "anchor", "surface", "controller", "next", "emit", "wasOpen", "notePreviewOpened", "fromKeyboard", "effectiveDelay", "resolvePreviewOpenDelay", "delay", "event2", "shouldDismissPopoverFocus", "floating", "first", "RuiHoverCardTrigger", "children", "className", "props", "jsx", "cx", "RuiHoverCardContent", "RuiHoverCard", "contentLabel", "HOVER_CARD_DEFAULT_CONTENT_LABEL"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{jsx as N}from"@ecopages/jsx/jsx-runtime";function m(...t){return t.filter(Boolean).join(" ")}var A={0:"digit",a:"letter","*":"any"},R=/\p{L}/u;function T(t,i){let n=i?.[t];if(n instanceof RegExp)return{kind:"any",pattern:n};if(n)return{kind:n};let e=A[t];return e?{kind:e}:null}function h(t,i,n){return n?n.test(t):i==="digit"?/\d/.test(t):i==="letter"?R.test(t):t.length>0}function x(t,i,n=!1){let e=[],r=0;for(;r<t.length;){let u=t[r];if(u==="\\"){let o=t[r+1];o&&e.push({type:"literal",value:o}),r+=2;continue}if(u==="{"){let o=t.indexOf("}",r+1);if(o<0){e.push({type:"literal",value:"{"}),r+=1;continue}e.push({type:"fixed",value:t.slice(r+1,o)}),r=o+1;continue}if(u==="["){let o=v(t,r+1);if(o<0){e.push({type:"literal",value:"["}),r+=1;continue}let p=x(t.slice(r+1,o),i,!0);e.push(...p),r=o+1;continue}if(u==="]")break;let a=T(u,i);if(a){e.push({type:"input",definition:u,kind:a.kind,pattern:a.pattern,optional:n}),r+=1;continue}e.push({type:"literal",value:u}),r+=1}return e}function v(t,i){let n=1;for(let e=i;e<t.length;e+=1)if(t[e]==="["&&t[e-1]!=="\\"&&(n+=1),t[e]==="]"&&t[e-1]!=="\\"&&(n-=1,n===0))return e;return-1}function c(t,i){return x(t,i)}function b(t,i={}){return t.filter(n=>n.type==="input"&&(!i.requiredOnly||!n.optional)).length}function f(t,i){let n=c(t,i),e="";for(let r of n){if(r.type==="literal"||r.type==="fixed"){e+=r.value;continue}e+="_"}return e}function y(t,i){let n="",e=0;for(let r of i){if(r.type==="fixed"||r.type==="literal"){t.slice(e,e+r.value.length)===r.value&&(e+=r.value.length);continue}if(e>=t.length)continue;let u=t[e];h(u,r.kind,r.pattern)&&(n+=u,e+=1)}return n}function k(t,i){if(!t)return"";let n=0,e="";for(let r of i){if(r.type==="fixed"||r.type==="literal"){e+=r.value;continue}if(n>=t.length){if(r.optional)continue;break}let u=t[n];if(!h(u,r.kind,r.pattern)){if(r.optional)continue;break}e+=u,n+=1}return e}function S(t){return t.every(i=>i.type!=="input"||i.kind==="digit")}function E(t,i){let n=t.replace(/\D/g,""),e=i.filter(r=>r.type==="fixed").map(r=>r.value.replace(/\D/g,"")).join("");return e&&n.startsWith(e)?n.slice(e.length):n}function s(t,i,n){let e=c(i,n),r=b(e),u=y(t,e);return u.length===0&&/\S/.test(t)&&S(e)&&(u=E(t,e)),u.length>r&&(u=u.slice(0,r)),k(u,e)}var d="data-rui-control";var I=new Set(["rui-combobox","rui-date-field","rui-date-range-picker","rui-select","rui-tag-group","rui-checkbox","rui-checkbox-group","rui-switch","rui-radio-group","rui-slider","rui-knob","rui-number-field","rui-listbox"]),F=`[${d}], ${Array.from(I).join(", ")}`;function _(t){let{class:i,type:n="text",mask:e,placeholder:r,"on:input":u,...a}=t,o=e?f(e):r;return N("input",{...a,type:n,placeholder:o,"on:input":e?l=>{if(e){let g=l.target;g.value=s(g.value,e)}typeof u=="function"?u(l):u!=null&&typeof u=="object"&&"handleEvent"in u&&u.handleEvent(l)}:u,inputmode:e?"numeric":void 0,[d]:"","data-rui-control-type":"text",class:m("rui-input",i)})}export{_ as RuiInput};
1
+ import{jsx as $}from"@ecopages/jsx/jsx-runtime";function h(...e){return e.filter(Boolean).join(" ")}var F={0:"digit",a:"letter","*":"any"},L=/\p{L}/u;function M(e,t){let n=t?.[e];if(n instanceof RegExp)return{kind:"any",pattern:n};if(n)return{kind:n};let r=F[e];return r?{kind:r}:null}function b(e,t,n){return n?n.test(e):t==="digit"?/\d/.test(e):t==="letter"?L.test(e):e.length>0}function g(e,t,n=!1){let r=[],i=0;for(;i<e.length;){let u=e[i];if(u==="\\"){let o=e[i+1];o&&r.push({type:"literal",value:o}),i+=2;continue}if(u==="{"){let o=e.indexOf("}",i+1);if(o<0){r.push({type:"literal",value:"{"}),i+=1;continue}r.push({type:"fixed",value:e.slice(i+1,o)}),i=o+1;continue}if(u==="["){let o=P(e,i+1);if(o<0){r.push({type:"literal",value:"["}),i+=1;continue}let m=g(e.slice(i+1,o),t,!0);r.push(...m),i=o+1;continue}if(u==="]")break;let a=M(u,t);if(a){r.push({type:"input",definition:u,kind:a.kind,pattern:a.pattern,optional:n}),i+=1;continue}r.push({type:"literal",value:u}),i+=1}return r}function P(e,t){let n=1;for(let r=t;r<e.length;r+=1)if(e[r]==="["&&e[r-1]!=="\\"&&(n+=1),e[r]==="]"&&e[r-1]!=="\\"&&(n-=1,n===0))return r;return-1}function f(e,t){return g(e,t)}function y(e,t={}){return e.filter(n=>n.type==="input"&&(!t.requiredOnly||!n.optional)).length}function p(e,t){let n=f(e,t),r="";for(let i of n){if(i.type==="literal"||i.type==="fixed"){r+=i.value;continue}r+="_"}return r}function x(e,t){let n="",r=0;for(let i of t){if(i.type==="fixed"||i.type==="literal"){e.slice(r,r+i.value.length)===i.value&&(r+=i.value.length);continue}if(r>=e.length)continue;let u=e[r];b(u,i.kind,i.pattern)&&(n+=u,r+=1)}return n}function k(e,t){if(!e)return"";let n=0,r="";for(let i of t){if(i.type==="fixed"||i.type==="literal"){r+=i.value;continue}if(n>=e.length){if(i.optional)continue;break}let u=e[n];if(!b(u,i.kind,i.pattern)){if(i.optional)continue;break}r+=u,n+=1}return r}function q(e){return e.every(t=>t.type!=="input"||t.kind==="digit")}function w(e,t){let n=e.replace(/\D/g,""),r=t.filter(i=>i.type==="fixed").map(i=>i.value.replace(/\D/g,"")).join("");return r&&n.startsWith(r)?n.slice(r.length):n}function d(e,t,n){let r=f(t,n),i=y(r),u=x(e,r);return u.length===0&&/\S/.test(e)&&q(r)&&(u=w(e,r)),u.length>i&&(u=u.slice(0,i)),k(u,r)}function R(e){return e?S(e.split(",")):[]}function V(e){return e.join(",")}var I={fromAttribute:e=>R(e),toAttribute:e=>e.length>0?V(e):null,fromProperty:e=>Array.isArray(e)?S(e.map(String)):typeof e=="string"?R(e):[]};function T(e){return e?e.split(",").map(t=>Number(t.trim())).filter(t=>Number.isFinite(t)):[]}function O(e){return e.join(",")}var E={fromAttribute:e=>T(e),toAttribute:e=>e.length>0?O(e):null,fromProperty:e=>Array.isArray(e)?e.map(Number).filter(t=>Number.isFinite(t)):typeof e=="number"&&Number.isFinite(e)?[e]:typeof e=="string"?T(e):[]};function S(e){return[...new Set(e.map(t=>t.trim()).filter(Boolean))]}var D="data-rui-control";var l={read:e=>{let t=Reflect.get(e,"value");return typeof t=="string"?t:e.getAttribute("value")??""},write:(e,t)=>{let n=t==null?"":String(t);e.setAttribute("value",n),"value"in e&&Reflect.set(e,"value",n)}},N={read:e=>{let t=Reflect.get(e,"value");if(typeof t=="number")return t;let n=e.getAttribute("value");return n==null||n===""?"":Number(n)},write:(e,t)=>{let n=t==null?"":String(t);e.setAttribute("value",n),"value"in e&&Reflect.set(e,"value",t)}},_={read:e=>e.querySelector('input[type="checkbox"]')?.checked??e.hasAttribute("checked"),write:(e,t)=>{t?e.setAttribute("checked",""):e.removeAttribute("checked")}};function v(e,t){let n=Reflect.get(e,"value");return n!==void 0&&t.fromProperty?t.fromProperty(n):t.fromAttribute?t.fromAttribute(e.getAttribute("value")):n}function C(e,t){Reflect.set(e,"value",t)}var s={read:e=>v(e,I),write:C},U={read:e=>v(e,E),write:C},K=new Map([["rui-checkbox",_],["rui-switch",_],["rui-combobox",{...s,submission:"none"}],["rui-date-field",l],["rui-date-input",{...l,submission:"host"}],["rui-date-range-picker",l],["rui-select",{...s,submission:"none"}],["rui-radio-group",l],["rui-checkbox-group",s],["rui-listbox",s],["rui-tag-group",s],["rui-slider",{...U,submission:"host"}],["rui-knob",{...N,submission:"host"}],["rui-number-field",{...N,submission:"host"}]]);function j(e){let{class:t,type:n="text",mask:r,placeholder:i,"on:input":u,...a}=e,o=r?p(r):i;return $("input",{...a,type:n,placeholder:o,"on:input":r?c=>{if(r){let A=c.target;A.value=d(A.value,r)}typeof u=="function"?u(c):u!=null&&typeof u=="object"&&"handleEvent"in u&&u.handleEvent(c)}:u,inputmode:r?"numeric":void 0,[D]:"","data-rui-control-type":"text",class:h("rui-input",t)})}export{j as RuiInput};
2
2
  //# sourceMappingURL=index.js.map