@ecopages/radiant-ui 0.1.0-rc.8 → 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 (196) hide show
  1. package/README.md +9 -1
  2. package/dist/components/ui/autocomplete/autocomplete.css +1 -2
  3. package/dist/components/ui/avatar/avatar.css +10 -8
  4. package/dist/components/ui/avatar/avatar.d.ts +3 -1
  5. package/dist/components/ui/calendar/calendar.css +10 -5
  6. package/dist/components/ui/calendar/calendar.script.d.ts +1 -0
  7. package/dist/components/ui/calendar/index.js +1 -1
  8. package/dist/components/ui/calendar/index.js.map +3 -3
  9. package/dist/components/ui/carousel/carousel-autoplay.d.ts +22 -0
  10. package/dist/components/ui/carousel/carousel-swipe.d.ts +17 -0
  11. package/dist/components/ui/carousel/carousel-window.d.ts +63 -0
  12. package/dist/components/ui/carousel/carousel.css +71 -18
  13. package/dist/components/ui/carousel/carousel.d.ts +1 -1
  14. package/dist/components/ui/carousel/carousel.script.d.ts +49 -21
  15. package/dist/components/ui/carousel/index.js +1 -1
  16. package/dist/components/ui/carousel/index.js.map +4 -4
  17. package/dist/components/ui/checkbox/checkbox.script.d.ts +0 -3
  18. package/dist/components/ui/checkbox/index.js +1 -1
  19. package/dist/components/ui/checkbox/index.js.map +4 -4
  20. package/dist/components/ui/checkbox-group/checkbox-group.d.ts +0 -1
  21. package/dist/components/ui/checkbox-group/checkbox-group.script.d.ts +8 -7
  22. package/dist/components/ui/checkbox-group/index.js +1 -1
  23. package/dist/components/ui/checkbox-group/index.js.map +4 -4
  24. package/dist/components/ui/combobox/combobox.css +2 -2
  25. package/dist/components/ui/combobox/combobox.d.ts +1 -2
  26. package/dist/components/ui/combobox/combobox.script.d.ts +13 -6
  27. package/dist/components/ui/combobox/index.js +1 -1
  28. package/dist/components/ui/combobox/index.js.map +4 -4
  29. package/dist/components/ui/cycle-toggle/index.js +1 -1
  30. package/dist/components/ui/cycle-toggle/index.js.map +3 -3
  31. package/dist/components/ui/date-field/date-field.css +13 -17
  32. package/dist/components/ui/date-field/date-field.d.ts +7 -5
  33. package/dist/components/ui/date-field/date-field.script.d.ts +16 -48
  34. package/dist/components/ui/date-field/index.js +1 -1
  35. package/dist/components/ui/date-field/index.js.map +4 -4
  36. package/dist/components/ui/date-input/date-input-segment-dom.d.ts +24 -0
  37. package/dist/components/ui/date-input/date-input.css +50 -0
  38. package/dist/components/ui/date-input/date-input.d.ts +8 -0
  39. package/dist/components/ui/date-input/date-input.script.d.ts +137 -0
  40. package/dist/components/ui/date-input/index.d.ts +2 -0
  41. package/dist/components/ui/date-input/index.js +2 -0
  42. package/dist/components/ui/date-input/index.js.map +7 -0
  43. package/dist/components/ui/date-range-picker/date-range-picker.css +18 -19
  44. package/dist/components/ui/date-range-picker/date-range-picker.d.ts +8 -6
  45. package/dist/components/ui/date-range-picker/date-range-picker.script.d.ts +24 -47
  46. package/dist/components/ui/date-range-picker/index.js +1 -1
  47. package/dist/components/ui/date-range-picker/index.js.map +4 -4
  48. package/dist/components/ui/dialog/dialog.css +18 -14
  49. package/dist/components/ui/dialog/dialog.script.d.ts +10 -3
  50. package/dist/components/ui/dialog/index.js +1 -1
  51. package/dist/components/ui/dialog/index.js.map +4 -4
  52. package/dist/components/ui/disclosure/disclosure.css +3 -6
  53. package/dist/components/ui/disclosure/disclosure.d.ts +15 -5
  54. package/dist/components/ui/disclosure/disclosure.script.d.ts +2 -2
  55. package/dist/components/ui/disclosure/index.d.ts +1 -1
  56. package/dist/components/ui/disclosure/index.js +1 -1
  57. package/dist/components/ui/disclosure/index.js.map +4 -4
  58. package/dist/components/ui/field/field.d.ts +1 -1
  59. package/dist/components/ui/field/field.script.d.ts +27 -4
  60. package/dist/components/ui/field/index.js +1 -1
  61. package/dist/components/ui/field/index.js.map +4 -4
  62. package/dist/components/ui/form/control-protocol.d.ts +38 -1
  63. package/dist/components/ui/form/form-context.d.ts +3 -0
  64. package/dist/components/ui/form/form.script.d.ts +7 -0
  65. package/dist/components/ui/form/index.d.ts +2 -1
  66. package/dist/components/ui/form/index.js +1 -1
  67. package/dist/components/ui/form/index.js.map +4 -4
  68. package/dist/components/ui/hover-card/hover-card.css +12 -101
  69. package/dist/components/ui/hover-card/hover-card.script.d.ts +7 -0
  70. package/dist/components/ui/hover-card/index.js +1 -1
  71. package/dist/components/ui/hover-card/index.js.map +4 -4
  72. package/dist/components/ui/input/index.js +1 -1
  73. package/dist/components/ui/input/index.js.map +4 -4
  74. package/dist/components/ui/input/input.css +1 -1
  75. package/dist/components/ui/knob/index.js +1 -1
  76. package/dist/components/ui/knob/index.js.map +3 -3
  77. package/dist/components/ui/knob/knob.css +6 -1
  78. package/dist/components/ui/knob/knob.d.ts +1 -1
  79. package/dist/components/ui/knob/knob.script.d.ts +25 -10
  80. package/dist/components/ui/label/index.js +1 -1
  81. package/dist/components/ui/label/index.js.map +4 -4
  82. package/dist/components/ui/listbox/index.js +1 -1
  83. package/dist/components/ui/listbox/index.js.map +4 -4
  84. package/dist/components/ui/listbox/listbox.d.ts +1 -2
  85. package/dist/components/ui/listbox/listbox.script.d.ts +7 -5
  86. package/dist/components/ui/menu-button/index.js +1 -1
  87. package/dist/components/ui/menu-button/index.js.map +4 -4
  88. package/dist/components/ui/menu-button/menu-button.script.d.ts +1 -1
  89. package/dist/components/ui/menubar/index.js +1 -1
  90. package/dist/components/ui/menubar/index.js.map +4 -4
  91. package/dist/components/ui/meter/index.js +1 -1
  92. package/dist/components/ui/meter/index.js.map +3 -3
  93. package/dist/components/ui/meter/meter.css +27 -2
  94. package/dist/components/ui/meter/meter.script.d.ts +14 -4
  95. package/dist/components/ui/navigation-menu/index.d.ts +1 -1
  96. package/dist/components/ui/navigation-menu/index.js +1 -1
  97. package/dist/components/ui/navigation-menu/index.js.map +4 -4
  98. package/dist/components/ui/navigation-menu/navigation-menu.css +32 -34
  99. package/dist/components/ui/navigation-menu/navigation-menu.d.ts +33 -4
  100. package/dist/components/ui/navigation-menu/navigation-menu.script.d.ts +71 -9
  101. package/dist/components/ui/number-field/index.js +1 -1
  102. package/dist/components/ui/number-field/index.js.map +4 -4
  103. package/dist/components/ui/number-field/number-field.css +1 -1
  104. package/dist/components/ui/number-field/number-field.d.ts +1 -1
  105. package/dist/components/ui/number-field/number-field.script.d.ts +7 -9
  106. package/dist/components/ui/pagination/index.d.ts +1 -1
  107. package/dist/components/ui/pagination/index.js +1 -1
  108. package/dist/components/ui/pagination/index.js.map +3 -3
  109. package/dist/components/ui/pagination/pagination.css +50 -13
  110. package/dist/components/ui/pagination/pagination.d.ts +25 -6
  111. package/dist/components/ui/popover/index.js +1 -1
  112. package/dist/components/ui/popover/index.js.map +4 -4
  113. package/dist/components/ui/popover/popover.script.d.ts +5 -0
  114. package/dist/components/ui/radio-group/index.js +1 -1
  115. package/dist/components/ui/radio-group/index.js.map +4 -4
  116. package/dist/components/ui/radio-group/radio-group.script.d.ts +2 -1
  117. package/dist/components/ui/select/index.d.ts +1 -1
  118. package/dist/components/ui/select/index.js +1 -1
  119. package/dist/components/ui/select/index.js.map +4 -4
  120. package/dist/components/ui/select/select.css +4 -3
  121. package/dist/components/ui/select/select.d.ts +7 -5
  122. package/dist/components/ui/select/select.script.d.ts +32 -12
  123. package/dist/components/ui/shared/calendar-popover-behavior.d.ts +27 -0
  124. package/dist/components/ui/shared/listbox-host-controller.d.ts +5 -4
  125. package/dist/components/ui/shared/multi-value.d.ts +18 -8
  126. package/dist/components/ui/shared/numeric-range.d.ts +8 -0
  127. package/dist/components/ui/shared/popover.css +10 -99
  128. package/dist/components/ui/sidebar/index.d.ts +2 -1
  129. package/dist/components/ui/sidebar/index.js +1 -1
  130. package/dist/components/ui/sidebar/index.js.map +4 -4
  131. package/dist/components/ui/sidebar/sidebar-trigger.d.ts +12 -0
  132. package/dist/components/ui/sidebar/sidebar-trigger.script.d.ts +42 -29
  133. package/dist/components/ui/sidebar/sidebar.css +67 -61
  134. package/dist/components/ui/sidebar/sidebar.d.ts +1 -7
  135. package/dist/components/ui/sidebar/sidebar.script.d.ts +12 -7
  136. package/dist/components/ui/slider/index.js +1 -1
  137. package/dist/components/ui/slider/index.js.map +4 -4
  138. package/dist/components/ui/slider/slider.css +5 -5
  139. package/dist/components/ui/slider/slider.d.ts +5 -6
  140. package/dist/components/ui/slider/slider.script.d.ts +72 -29
  141. package/dist/components/ui/switch/index.js +1 -1
  142. package/dist/components/ui/switch/index.js.map +4 -4
  143. package/dist/components/ui/switch/switch.css +28 -22
  144. package/dist/components/ui/switch/switch.script.d.ts +10 -3
  145. package/dist/components/ui/table/index.js +1 -1
  146. package/dist/components/ui/table/index.js.map +4 -4
  147. package/dist/components/ui/table/table.d.ts +5 -3
  148. package/dist/components/ui/table/table.script.d.ts +25 -10
  149. package/dist/components/ui/tabs/tabs.css +18 -12
  150. package/dist/components/ui/tabs/tabs.script.d.ts +7 -0
  151. package/dist/components/ui/tag-group/index.js +1 -1
  152. package/dist/components/ui/tag-group/index.js.map +4 -4
  153. package/dist/components/ui/tag-group/tag-group.d.ts +7 -4
  154. package/dist/components/ui/tag-group/tag-group.script.d.ts +7 -5
  155. package/dist/components/ui/textarea/index.js +1 -1
  156. package/dist/components/ui/textarea/index.js.map +4 -4
  157. package/dist/components/ui/textarea/textarea.css +1 -1
  158. package/dist/components/ui/toast/index.js +1 -1
  159. package/dist/components/ui/toast/index.js.map +3 -3
  160. package/dist/components/ui/toast/toast.css +35 -32
  161. package/dist/components/ui/toast/toast.script.d.ts +2 -1
  162. package/dist/components/ui/toast/toaster.script.d.ts +6 -0
  163. package/dist/components/ui/tooltip/index.js +1 -1
  164. package/dist/components/ui/tooltip/index.js.map +4 -4
  165. package/dist/components/ui/tooltip/tooltip.css +14 -94
  166. package/dist/components/ui/tooltip/tooltip.script.d.ts +9 -1
  167. package/dist/components/ui/window-splitter/index.d.ts +1 -1
  168. package/dist/components/ui/window-splitter/index.js +1 -1
  169. package/dist/components/ui/window-splitter/index.js.map +3 -3
  170. package/dist/components/ui/window-splitter/window-splitter.d.ts +1 -1
  171. package/dist/components/ui/window-splitter/window-splitter.script.d.ts +5 -1
  172. package/dist/index.d.ts +1 -0
  173. package/dist/index.js +1 -1
  174. package/dist/index.js.map +4 -4
  175. package/dist/lib/icons/chevron-down.d.ts +0 -1
  176. package/dist/lib/intl-date/index.d.ts +4 -2
  177. package/dist/lib/intl-date/segment-editing.d.ts +34 -0
  178. package/dist/lib/intl-date/segments.d.ts +26 -4
  179. package/dist/lib/non-empty.d.ts +6 -0
  180. package/dist/lib/unique-id.d.ts +11 -0
  181. package/dist/lib/viewport/breakpoints.d.ts +6 -0
  182. package/dist/lib/viewport/mobile-layout.d.ts +15 -0
  183. package/dist/styles/primitives.css +10 -7
  184. package/dist/styles/radiant-ui-core.css +10 -0
  185. package/dist/styles/radiant-ui.css +40 -3
  186. package/dist/styles/style-dependencies.json +18 -6
  187. package/dist/styles/styles.css +456 -246
  188. package/dist/styles/tailwind.css +40 -93
  189. package/dist/styles/tokens/presets/colors/aurora.css +2 -0
  190. package/dist/styles/tokens/presets/colors/basalt.css +2 -0
  191. package/dist/styles/tokens/presets/colors/ember.css +2 -0
  192. package/dist/styles/tokens/presets/colors/glacier.css +2 -0
  193. package/dist/styles/tokens/semantic.css +1 -0
  194. package/dist/styles/tokens/system.css +11 -3
  195. package/dist/styles/tokens/typography/default.css +8 -0
  196. package/package.json +20 -10
@@ -1,13 +1,16 @@
1
1
  /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
2
2
  @layer properties;
3
3
  rui-toaster {
4
- --toast-offset-x: 16px;
5
- --toast-offset-bottom: 16px;
4
+ --rui-toaster-width: 356px;
5
+ --rui-toaster-gap: 14px;
6
+ --rui-toaster-offset: 24px;
7
+ --rui-toaster-inset-x: 16px;
8
+ --rui-toaster-inset-bottom: 16px;
6
9
  position: fixed;
7
10
  z-index: var(--z-toast, 50);
8
11
  pointer-events: none;
9
12
  box-sizing: border-box;
10
- width: var(--width, 356px);
13
+ width: var(--rui-toaster-width);
11
14
  margin: 0;
12
15
  padding: 0;
13
16
  }
@@ -15,20 +18,20 @@ rui-toaster[data-contained='true'] {
15
18
  position: absolute;
16
19
  }
17
20
  rui-toaster[data-y-position='top'] {
18
- top: var(--viewport-offset, 24px);
21
+ top: var(--rui-toaster-offset, 24px);
19
22
  bottom: auto;
20
23
  }
21
24
  rui-toaster[data-y-position='bottom'] {
22
- bottom: var(--viewport-offset, 24px);
25
+ bottom: var(--rui-toaster-offset, 24px);
23
26
  top: auto;
24
27
  }
25
28
  rui-toaster[data-x-position='end'] {
26
- right: var(--viewport-offset, 24px);
29
+ right: var(--rui-toaster-offset, 24px);
27
30
  left: auto;
28
31
  transform: none;
29
32
  }
30
33
  rui-toaster[data-x-position='start'] {
31
- left: var(--viewport-offset, 24px);
34
+ left: var(--rui-toaster-offset, 24px);
32
35
  right: auto;
33
36
  transform: none;
34
37
  }
@@ -38,20 +41,20 @@ rui-toaster[data-x-position='center'] {
38
41
  transform: translateX(-50%);
39
42
  }
40
43
  rui-toast {
41
- --y: translateY(0);
42
- --z-index: 1;
44
+ --rui-toast-y: translateY(0);
45
+ --rui-toast-z: 1;
43
46
  position: absolute;
44
47
  left: 0;
45
48
  width: 100%;
46
49
  opacity: 0;
47
- transform: var(--y);
50
+ transform: var(--rui-toast-y);
48
51
  touch-action: none;
49
52
  box-sizing: border-box;
50
53
  outline: none;
51
54
  overflow-wrap: anywhere;
52
55
  overflow: hidden;
53
56
  pointer-events: auto;
54
- z-index: var(--z-index);
57
+ z-index: var(--rui-toast-z);
55
58
  transition: transform 400ms ease,
56
59
  opacity 400ms ease,
57
60
  height 400ms ease;
@@ -70,10 +73,10 @@ rui-toast:not([data-mounted='true']) {
70
73
  opacity: 0;
71
74
  }
72
75
  rui-toaster[data-y-position='bottom'] rui-toast:not([data-mounted='true']) {
73
- --y: translateY(100%);
76
+ --rui-toast-y: translateY(100%);
74
77
  }
75
78
  rui-toaster[data-y-position='top'] rui-toast:not([data-mounted='true']) {
76
- --y: translateY(-100%);
79
+ --rui-toast-y: translateY(-100%);
77
80
  }
78
81
  rui-toast[data-mounted='true'] {
79
82
  opacity: 1;
@@ -86,7 +89,7 @@ rui-toast[data-expanded='false'][data-front='false'] {
86
89
  pointer-events: none;
87
90
  }
88
91
  rui-toast[data-swiping='true'] {
89
- transform: var(--y) translateY(var(--swipe-amount-y, 0px)) translateX(var(--swipe-amount-x, 0px));
92
+ transform: var(--rui-toast-y) translateY(var(--rui-toast-swipe-y, 0px)) translateX(var(--rui-toast-swipe-x, 0px));
90
93
  transition: none;
91
94
  }
92
95
  rui-toast[data-removed='true'][data-swipe-out='false'] {
@@ -96,10 +99,10 @@ rui-toast[data-removed='true'][data-swipe-out='false'] {
96
99
  height 400ms ease;
97
100
  }
98
101
  rui-toaster[data-y-position='bottom'] rui-toast[data-removed='true'][data-swipe-out='false'] {
99
- --y: translateY(100%);
102
+ --rui-toast-y: translateY(100%);
100
103
  }
101
104
  rui-toaster[data-y-position='top'] rui-toast[data-removed='true'][data-swipe-out='false'] {
102
- --y: translateY(-100%);
105
+ --rui-toast-y: translateY(-100%);
103
106
  }
104
107
  rui-toast[data-swipe-out='true'] {
105
108
  animation-duration: 200ms;
@@ -123,7 +126,7 @@ rui-toaster[data-y-position='bottom'] rui-toast[data-expanded='true']::after {
123
126
  position: absolute;
124
127
  left: 0;
125
128
  width: 100%;
126
- height: calc(var(--gap, 14px) + 1px);
129
+ height: calc(var(--rui-toaster-gap) + 1px);
127
130
  bottom: 100%;
128
131
  }
129
132
  rui-toaster[data-y-position='top'] rui-toast[data-expanded='true']::after {
@@ -131,7 +134,7 @@ rui-toaster[data-y-position='top'] rui-toast[data-expanded='true']::after {
131
134
  position: absolute;
132
135
  left: 0;
133
136
  width: 100%;
134
- height: calc(var(--gap, 14px) + 1px);
137
+ height: calc(var(--rui-toaster-gap) + 1px);
135
138
  top: 100%;
136
139
  }
137
140
  @layer components {
@@ -308,62 +311,62 @@ rui-toaster[data-y-position='top'] rui-toast[data-expanded='true']::after {
308
311
  }
309
312
  @keyframes rui-toast-swipe-out-left {
310
313
  from {
311
- transform: var(--y) translateX(var(--swipe-amount-x));
314
+ transform: var(--rui-toast-y) translateX(var(--rui-toast-swipe-x));
312
315
  opacity: 1;
313
316
  }
314
317
  to {
315
- transform: var(--y) translateX(calc(var(--swipe-amount-x) - 100%));
318
+ transform: var(--rui-toast-y) translateX(calc(var(--rui-toast-swipe-x) - 100%));
316
319
  opacity: 0;
317
320
  }
318
321
  }
319
322
  @keyframes rui-toast-swipe-out-right {
320
323
  from {
321
- transform: var(--y) translateX(var(--swipe-amount-x));
324
+ transform: var(--rui-toast-y) translateX(var(--rui-toast-swipe-x));
322
325
  opacity: 1;
323
326
  }
324
327
  to {
325
- transform: var(--y) translateX(calc(var(--swipe-amount-x) + 100%));
328
+ transform: var(--rui-toast-y) translateX(calc(var(--rui-toast-swipe-x) + 100%));
326
329
  opacity: 0;
327
330
  }
328
331
  }
329
332
  @keyframes rui-toast-swipe-out-up {
330
333
  from {
331
- transform: var(--y) translateY(var(--swipe-amount-y));
334
+ transform: var(--rui-toast-y) translateY(var(--rui-toast-swipe-y));
332
335
  opacity: 1;
333
336
  }
334
337
  to {
335
- transform: var(--y) translateY(calc(var(--swipe-amount-y) - 100%));
338
+ transform: var(--rui-toast-y) translateY(calc(var(--rui-toast-swipe-y) - 100%));
336
339
  opacity: 0;
337
340
  }
338
341
  }
339
342
  @keyframes rui-toast-swipe-out-down {
340
343
  from {
341
- transform: var(--y) translateY(var(--swipe-amount-y));
344
+ transform: var(--rui-toast-y) translateY(var(--rui-toast-swipe-y));
342
345
  opacity: 1;
343
346
  }
344
347
  to {
345
- transform: var(--y) translateY(calc(var(--swipe-amount-y) + 100%));
348
+ transform: var(--rui-toast-y) translateY(calc(var(--rui-toast-swipe-y) + 100%));
346
349
  opacity: 0;
347
350
  }
348
351
  }
349
352
  @media (max-width: 600px) {
350
353
  rui-toaster {
351
- left: var(--toast-offset-x);
352
- right: var(--toast-offset-x);
354
+ left: var(--rui-toaster-inset-x);
355
+ right: var(--rui-toaster-inset-x);
353
356
  width: auto;
354
357
  transform: none;
355
358
  }
356
359
  rui-toaster[data-y-position='bottom'] {
357
- bottom: var(--toast-offset-bottom);
360
+ bottom: var(--rui-toaster-inset-bottom);
358
361
  }
359
362
  rui-toaster[data-y-position='top'] {
360
- top: var(--toast-offset-x);
363
+ top: var(--rui-toaster-inset-x);
361
364
  }
362
365
  rui-toaster[data-x-position='end'],
363
366
  rui-toaster[data-x-position='start'],
364
367
  rui-toaster[data-x-position='center'] {
365
- left: var(--toast-offset-x);
366
- right: var(--toast-offset-x);
368
+ left: var(--rui-toaster-inset-x);
369
+ right: var(--rui-toaster-inset-x);
367
370
  transform: none;
368
371
  }
369
372
  }
@@ -56,7 +56,8 @@ type RuiToastBindings = {
56
56
  * @remarks
57
57
  * Styling lives on the composed surface. Variants map to semantic status roles in
58
58
  * `toast.css`. The toast owns dismiss lifetime bookkeeping (pause on hover /
59
- * hidden tab, swipe-to-dismiss).
59
+ * hidden tab, swipe-to-dismiss). Stack motion uses host-written `--rui-toast-y`,
60
+ * `--rui-toast-z`, and `--rui-toast-swipe-*` (not theming knobs).
60
61
  */
61
62
  export declare class RuiToast extends RadiantElement<RuiToastBindings> {
62
63
  toastId: string;
@@ -65,6 +65,12 @@ export type RuiToasterProps = {
65
65
  * @attr {number} offset - Viewport inset in px. Default: `24`.
66
66
  * @attr {string} container - CSS selector for a positioning root. Default: `''`.
67
67
  *
68
+ * @cssprop --rui-toaster-width - Stack width. Default: `356px`. Override on `rui-toaster`.
69
+ * @cssprop --rui-toaster-gap - Expanded stack gap. Default: `14px`. The `gap` attribute writes this and wins.
70
+ * @cssprop --rui-toaster-offset - Viewport inset. Default: `24px`. The `offset` attribute writes this and wins.
71
+ * @cssprop --rui-toaster-inset-x - Inline inset below 600px. Default: `16px`.
72
+ * @cssprop --rui-toaster-inset-bottom - Bottom inset below 600px. Default: `16px`.
73
+ *
68
74
  * @remarks
69
75
  * `container` switches the host from `position: fixed` to absolute inside a
70
76
  * matched root — used by docs canvas demos so toasts render inside the preview.
@@ -1,2 +1,2 @@
1
- import{jsx as B,jsxs as Vt}from"@ecopages/jsx/jsx-runtime";import{RadiantElement as _t,bound as Et,customElement as Ht,onEvent as G,onUpdated as Kt,prop as X,query as Bt}from"@ecopages/radiant";var St="a[href], button, input, select, textarea, [tabindex]";function Ct(t){return!t.hasAttribute("disabled")&&t.getAttribute("tabindex")!=="-1"}function jt(t){return Array.from(t.querySelectorAll(St)).filter(Ct)}function at(t){return jt(t)[0]}var It={top:"bottom",bottom:"top",left:"right",right:"left"},Lt=8;function Pt(t){let e=t.indexOf("-");if(e===-1)return{side:t,align:"center"};let i=t.slice(0,e),s=t.slice(e+1);return{side:i,align:s==="start"||s==="end"?s:"center"}}function ut(t){return t==="top"||t==="bottom"?"y":"x"}function lt(t,e,i,s,n){let{width:r,height:a}=e,o=0,p=0;switch(i){case"top":p=t.top-a-n;break;case"bottom":p=t.bottom+n;break;case"left":o=t.left-r-n;break;case"right":o=t.right+n;break}return ut(i)==="y"?s==="start"?o=t.left:s==="end"?o=t.right-r:o=t.left+(t.width-r)/2:s==="start"?p=t.top:s==="end"?p=t.bottom-a:p=t.top+(t.height-a)/2,{x:o,y:p}}function Dt(t,e,i,s){let{padding:n,width:r,height:a}=s;return i==="top"?Math.max(0,n-t.y):i==="bottom"?Math.max(0,t.y+e.height-(a-n)):i==="left"?Math.max(0,n-t.x):Math.max(0,t.x+e.width-(r-n))}function ct(t,e,i,s){let{padding:n,width:r,height:a}=s;return i==="top"?t.top-n-e.height:i==="bottom"?a-n-e.height-t.bottom:i==="left"?t.left-n-e.width:r-n-e.width-t.right}function Rt(t,e){return e==="center"?t:`${t}-${e}`}function Mt(t,e,i,s){let{padding:n,width:r,height:a}=s;if(ut(i)==="y"){let p=Math.max(n,r-n-e.width);return{x:Math.min(Math.max(t.x,n),p),y:t.y}}let o=Math.max(n,a-n-e.height);return{x:t.x,y:Math.min(Math.max(t.y,n),o)}}function kt(t,e,i,s,n={width:typeof window>"u"?0:window.innerWidth,height:typeof window>"u"?0:window.innerHeight,padding:Lt}){let{side:r,align:a}=Pt(i),o=lt(t,e,r,a,s),p=Dt(o,e,r,n),_=r,E=o;if(p>0){let F=It[r],A=lt(t,e,F,a,s),I=ct(t,e,r,n);ct(t,e,F,n)>I&&(_=F,E=A)}return{coords:Mt(E,e,_,n),placement:Rt(_,a)}}function K(t,e,i,s,n={}){let{coords:r,placement:a}=kt(t.getBoundingClientRect(),{width:e.offsetWidth,height:e.offsetHeight},i,s);return Object.assign(e.style,{position:"fixed",left:`${r.x}px`,top:`${r.y}px`,right:"auto",bottom:"auto",visibility:"visible"}),n.matchAnchorWidth&&(e.style.width=`${t.offsetWidth}px`),e.setAttribute("data-placement",a),a}function dt({anchor:t,floating:e,getPlacement:i,gap:s,matchAnchorWidth:n}){let r=()=>{e.hidden||K(t,e,i(),s,{matchAnchorWidth:n})};r(),window.addEventListener("resize",r),window.addEventListener("scroll",r,!0);let a=new ResizeObserver(r);return a.observe(t),a.observe(e),()=>{window.removeEventListener("resize",r),window.removeEventListener("scroll",r,!0),a.disconnect()}}var ht,pt,ft,mt,gt,bt,yt,wt,vt,Tt;function $t(t,e,i,s,n,r){var a,o,p,_,E,F,A,I=Symbol.metadata||Symbol.for("Symbol.metadata"),k=Object.defineProperty,$=Object.create,J=[$(null),$(null)],Q=e.length;function L(l,b,m){return function(c,u){b&&(u=c,c=t);for(var y=0;y<l.length;y++)u=l[y].apply(c,m?[u]:[]);return m?u:c}}function T(l,b,m,c){if(typeof l!="function"&&(c||l!==void 0))throw new TypeError(b+" must "+(m||"be")+" a function"+(c?"":" or undefined"));return l}function Z(l,b,m,c,u,y,O,g,w,v,N){function q(h){if(!N(h))throw new TypeError("Attempted to access private element on non-instance")}var W=[].concat(b[0]),tt=b[3],U=!O,C=u===1,et=u===3,it=u===4,P=u===2;function D(h,S,ot){return function(M,st){return S&&(st=M,M=l),ot&&ot(M),d[h].call(M,st)}}if(!U){var d={},V=[],x=et?"get":it||C?"set":"value";if(w?(v||C?d={get:xt(function(){return tt(this)},c,"get"),set:function(h){b[4](this,h)}}:d[x]=tt,v||xt(d[x],c,P?"":x)):v||(d=Object.getOwnPropertyDescriptor(l,c)),!v&&!w){if((o=J[+g][c])&&(o^u)!==7)throw Error("Decorating two elements with the same name ("+d[x].name+") is not supported yet");J[+g][c]=u<3?1:u}}for(var f=l,R=W.length-1;R>=0;R-=m?2:1){var nt=T(W[R],"A decorator","be",!0),rt=m?W[R-1]:void 0,H={},j={kind:["field","accessor","method","getter","setter","class"][u],name:c,metadata:a,addInitializer:function(h,S){if(h.v)throw new TypeError("attempted to call addInitializer after decoration was finished");T(S,"An initializer","be",!0),y.push(S)}.bind(null,H)};if(U)o=nt.call(rt,f,j),H.v=1,T(o,"class decorators","return")&&(f=o);else if(j.static=g,j.private=w,o=j.access={has:w?N.bind():function(h){return c in h}},it||(o.get=w?P?function(h){return q(h),d.value}:D("get",0,q):function(h){return h[c]}),P||et||(o.set=w?D("set",0,q):function(h,S){h[c]=S}),f=nt.call(rt,C?{get:d.get,set:d.set}:d[x],j),H.v=1,C){if(typeof f=="object"&&f)(o=T(f.get,"accessor.get"))&&(d.get=o),(o=T(f.set,"accessor.set"))&&(d.set=o),(o=T(f.init,"accessor.init"))&&V.unshift(o);else if(f!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else T(f,(v?"field":"method")+" decorators","return")&&(v?V.unshift(f):d[x]=f)}return u<2&&O.push(L(V,g,1),L(y,g,0)),v||U||(w?C?O.splice(-1,0,D("get",g),D("set",g)):O.push(P?d[x]:T.call.bind(d[x])):k(l,c,d)),f}function z(l){return k(l,I,{configurable:!0,enumerable:!0,value:a})}return r!==void 0&&(a=r[I]),a=$(a??null),E=[],F=function(l){l&&E.push(L(l))},A=function(l,b){for(var m=0;m<i.length;m++){var c=i[m],u=c[1],y=7&u;if((8&u)==l&&!y==b){var O=c[2],g=!!c[3],w=16&u;Z(l?t:t.prototype,c,w,g?"#"+O:qt(O),y,y<2?[]:l?_=_||[]:p=p||[],E,!!l,g,b,l&&g?function(v){return Ut(v)===t}:n)}}},A(8,0),A(0,0),A(8,1),A(0,1),F(p),F(_),o=E,Q||z(t),{e:o,get c(){var l=[];return Q&&[z(t=Z(t,[e],s,t.name,5,l)),L(l,1)]}}}function qt(t){var e=Wt(t,"string");return typeof e=="symbol"?e:e+""}function Wt(t,e){if(typeof t!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var s=i.call(t,e||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function xt(t,e,i){typeof e=="symbol"&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:i?i+" "+e:e})}catch{}return t}function Ut(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 Ft=8,Ot,At=class extends _t{static{({e:[ft,mt,gt,bt,yt,wt,vt,Tt,ht],c:[Ot,pt]}=$t(this,[Ht("rui-tooltip")],[[X({type:String,defaultValue:""}),0,"content"],[X({type:String,defaultValue:"top"}),0,"placement"],[X({type:Number,defaultValue:200}),0,"delay"],[Bt({ref:"tooltip"}),0,"tooltipTarget"],[Kt(["content","placement"]),2,"onDescribedPropsUpdated"],[G({document:!0,type:"keydown"}),2,"onDocumentKeydown"],[G({type:"focusin",ref:"trigger"}),2,"onFocusIn"],[G({type:"focusout",ref:"trigger"}),2,"onFocusOut"],[Et,2,"onPointerEnter"],[Et,2,"onPointerLeave"]],0,void 0,_t))}content=(ht(this),ft(this));placement=(mt(this),gt(this));delay=(bt(this),yt(this));tooltipTarget=(wt(this),vt(this));open=(Tt(this),!1);showTimer=null;hideTimer=null;tooltipId=`rui-tooltip-${Math.random().toString(36).slice(2,9)}`;describedEl=null;cleanupFloating=null;connectedCallback(){super.connectedCallback(),this.addEventListener("pointerenter",this.onPointerEnter),this.addEventListener("pointerleave",this.onPointerLeave),queueMicrotask(()=>this.wireTrigger())}disconnectedCallback(){this.clearTimers(),this.teardownFloating(),this.removeEventListener("pointerenter",this.onPointerEnter),this.removeEventListener("pointerleave",this.onPointerLeave),this.describedEl?.removeAttribute("aria-describedby"),super.disconnectedCallback()}clearTimers(){this.showTimer&&clearTimeout(this.showTimer),this.hideTimer&&clearTimeout(this.hideTimer),this.showTimer=null,this.hideTimer=null}teardownFloating(){this.cleanupFloating?.(),this.cleanupFloating=null}getAnchor(){return at(this)??this}wireTrigger(){this.describedEl?.removeAttribute("aria-describedby"),this.describedEl=this.getAnchor(),this.tooltipTarget&&(this.tooltipTarget.id=this.tooltipId),this.describedEl.setAttribute("aria-describedby",this.tooltipId)}attachFloating(){this.tooltipTarget&&(this.teardownFloating(),this.cleanupFloating=dt({anchor:this.getAnchor(),floating:this.tooltipTarget,getPlacement:()=>this.placement,gap:Ft}))}onDescribedPropsUpdated(){this.wireTrigger(),this.open&&this.tooltipTarget&&K(this.getAnchor(),this.tooltipTarget,this.placement,Ft)}setOpen(e){this.clearTimers(),this.open=e,this.tooltipTarget&&(this.tooltipTarget.hidden=!e,e?this.attachFloating():this.teardownFloating())}scheduleShow(){if(this.clearTimers(),this.delay<=0){this.setOpen(!0);return}this.showTimer=setTimeout(()=>this.setOpen(!0),this.delay)}scheduleHide(){this.clearTimers(),this.hideTimer=setTimeout(()=>this.setOpen(!1),80)}onDocumentKeydown(e){!this.open||e.key!=="Escape"||this.setOpen(!1)}onFocusIn(){this.scheduleShow()}onFocusOut(e){let i=e.relatedTarget;i&&this.contains(i)||this.scheduleHide()}onPointerEnter(){this.scheduleShow()}onPointerLeave(){this.scheduleHide()}render(){return Vt("span",{class:"rui-tooltip",children:[B("span",{class:"rui-tooltip__trigger","data-ref":"trigger",children:B("slot",{})}),B("span",{"data-ref":"tooltip",id:this.tooltipId,class:"rui-tooltip__content rui-floating",role:"tooltip",hidden:!0,children:this.$.content})]})}static{pt()}};import{jsx as Y,jsxs as Gt}from"@ecopages/jsx/jsx-runtime";function Xt({children:t,content:e="",...i}){return Y("rui-tooltip",{content:e,...i,children:Gt("span",{class:"rui-tooltip",children:[Y("span",{class:"rui-tooltip__trigger","data-ref":"trigger",children:t}),Y("span",{class:"rui-tooltip__content rui-floating","data-ref":"tooltip",role:"tooltip",hidden:!0,children:e})]})})}export{Xt as RuiTooltip,Ot as RuiTooltipElement};
1
+ import{jsx as G,jsxs as Xt}from"@ecopages/jsx/jsx-runtime";import{RadiantElement as St,bound as Ft,customElement as Yt,onEvent as Z,onUpdated as zt,prop as X,query as Jt}from"@ecopages/radiant";var jt="a[href], button, input, select, textarea, [tabindex]";function Dt(t){return!t.hasAttribute("disabled")&&t.getAttribute("tabindex")!=="-1"}function Pt(t){return Array.from(t.querySelectorAll(jt)).filter(Dt)}function lt(t){return Pt(t)[0]}var Lt=/^[A-Za-z][A-Za-z0-9_-]*$/;function ct(t){return Lt.test(t)}function Mt(t){let e=t.trim();if(ct(e))return e;let i=`rui-${e}`;return e&&ct(i)?i:"rui"}function ut(t){let e=typeof crypto.randomUUID=="function"?crypto.randomUUID().replace(/-/g,""):Array.from(crypto.getRandomValues(new Uint8Array(16)),i=>i.toString(16).padStart(2,"0")).join("");return`${Mt(t)}-${e}`}var Wt={top:"bottom",bottom:"top",left:"right",right:"left"},Rt=8,K=new WeakMap;function kt(t){K.has(t)&&(t.style.width="",t.style.minWidth="",t.style.maxWidth="",t.style.boxSizing="",K.delete(t))}function $t(t){let e=t.indexOf("-");if(e===-1)return{side:t,align:"center"};let i=t.slice(0,e),a=t.slice(e+1);return{side:i,align:a==="start"||a==="end"?a:"center"}}function pt(t){return t==="top"||t==="bottom"?"y":"x"}function dt(t,e,i,a,r){let{width:s,height:o}=e,n=0,d=0;switch(i){case"top":d=t.top-o-r;break;case"bottom":d=t.bottom+r;break;case"left":n=t.left-s-r;break;case"right":n=t.right+r;break}return pt(i)==="y"?a==="start"?n=t.left:a==="end"?n=t.right-s:n=t.left+(t.width-s)/2:a==="start"?d=t.top:a==="end"?d=t.bottom-o:d=t.top+(t.height-o)/2,{x:n,y:d}}function Ut(t,e,i,a){let{padding:r,width:s,height:o}=a;return i==="top"?Math.max(0,r-t.y):i==="bottom"?Math.max(0,t.y+e.height-(o-r)):i==="left"?Math.max(0,r-t.x):Math.max(0,t.x+e.width-(s-r))}function ht(t,e,i,a){let{padding:r,width:s,height:o}=a;return i==="top"?t.top-r-e.height:i==="bottom"?o-r-e.height-t.bottom:i==="left"?t.left-r-e.width:s-r-e.width-t.right}function qt(t,e){return e==="center"?t:`${t}-${e}`}function Vt(t,e,i,a){let{padding:r,width:s,height:o}=a;if(pt(i)==="y"){let d=Math.max(r,s-r-e.width);return{x:Math.min(Math.max(t.x,r),d),y:Math.max(r,t.y)}}let n=Math.max(r,o-r-e.height);return{x:Math.max(r,t.x),y:Math.min(Math.max(t.y,r),n)}}function Ht(t,e,i,a,r={width:typeof window>"u"?0:window.innerWidth,height:typeof window>"u"?0:window.innerHeight,padding:Rt}){let{side:s,align:o}=$t(i),n=dt(t,e,s,o,a),d=Ut(n,e,s,r),y=s,E=n;if(d>0){let A=Wt[s],S=dt(t,e,A,o,a),j=ht(t,e,s,r);ht(t,e,A,r)>j&&(y=A,E=S)}return{coords:Vt(E,e,y,r),placement:qt(y,o)}}function B(t,e,i,a,r={}){let s=r.matchAnchorWidth===!0,o=t.offsetWidth,n=s?{width:o,height:e.offsetHeight}:{width:e.offsetWidth,height:e.offsetHeight};s?(e.style.width=`${o}px`,e.style.minWidth=`${o}px`,e.style.maxWidth=`${o}px`,e.style.boxSizing="border-box",K.set(e,!0)):kt(e);let{coords:d,placement:y}=Ht(t.getBoundingClientRect(),n,i,a);return Object.assign(e.style,{position:"fixed",left:`${d.x}px`,top:`${d.y}px`,right:"auto",bottom:"auto",visibility:"visible"}),e.setAttribute("data-placement",y),y}function ft({anchor:t,floating:e,getPlacement:i,gap:a,matchAnchorWidth:r}){let s=()=>{e.hidden||B(t,e,i(),a,{matchAnchorWidth:r})};s(),window.addEventListener("resize",s),window.addEventListener("scroll",s,!0);let o=new ResizeObserver(s);return o.observe(t),o.observe(e),()=>{window.removeEventListener("resize",s),window.removeEventListener("scroll",s,!0),o.disconnect()}}var mt,gt,yt,bt,wt,vt,xt,Tt,_t,Et;function Kt(t,e,i,a,r,s){var o,n,d,y,E,A,S,j=Symbol.metadata||Symbol.for("Symbol.metadata"),R=Object.defineProperty,k=Object.create,z=[k(null),k(null)],J=e.length;function D(l,b,m){return function(c,u){b&&(u=c,c=t);for(var w=0;w<l.length;w++)u=l[w].apply(c,m?[u]:[]);return m?u:c}}function T(l,b,m,c){if(typeof l!="function"&&(c||l!==void 0))throw new TypeError(b+" must "+(m||"be")+" a function"+(c?"":" or undefined"));return l}function Q(l,b,m,c,u,w,F,g,v,x,tt){function $(p){if(!tt(p))throw new TypeError("Attempted to access private element on non-instance")}var U=[].concat(b[0]),et=b[3],q=!F,I=u===1,it=u===3,rt=u===4,P=u===2;function L(p,O,st){return function(W,at){return O&&(at=W,W=l),st&&st(W),h[p].call(W,at)}}if(!q){var h={},V=[],_=it?"get":rt||I?"set":"value";if(v?(x||I?h={get:At(function(){return et(this)},c,"get"),set:function(p){b[4](this,p)}}:h[_]=et,x||At(h[_],c,P?"":_)):x||(h=Object.getOwnPropertyDescriptor(l,c)),!x&&!v){if((n=z[+g][c])&&(n^u)!==7)throw Error("Decorating two elements with the same name ("+h[_].name+") is not supported yet");z[+g][c]=u<3?1:u}}for(var f=l,M=U.length-1;M>=0;M-=m?2:1){var nt=T(U[M],"A decorator","be",!0),ot=m?U[M-1]:void 0,H={},C={kind:["field","accessor","method","getter","setter","class"][u],name:c,metadata:o,addInitializer:function(p,O){if(p.v)throw new TypeError("attempted to call addInitializer after decoration was finished");T(O,"An initializer","be",!0),w.push(O)}.bind(null,H)};if(q)n=nt.call(ot,f,C),H.v=1,T(n,"class decorators","return")&&(f=n);else if(C.static=g,C.private=v,n=C.access={has:v?tt.bind():function(p){return c in p}},rt||(n.get=v?P?function(p){return $(p),h.value}:L("get",0,$):function(p){return p[c]}),P||it||(n.set=v?L("set",0,$):function(p,O){p[c]=O}),f=nt.call(ot,I?{get:h.get,set:h.set}:h[_],C),H.v=1,I){if(typeof f=="object"&&f)(n=T(f.get,"accessor.get"))&&(h.get=n),(n=T(f.set,"accessor.set"))&&(h.set=n),(n=T(f.init,"accessor.init"))&&V.unshift(n);else if(f!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else T(f,(x?"field":"method")+" decorators","return")&&(x?V.unshift(f):h[_]=f)}return u<2&&F.push(D(V,g,1),D(w,g,0)),x||q||(v?I?F.splice(-1,0,L("get",g),L("set",g)):F.push(P?h[_]:T.call.bind(h[_])):R(l,c,h)),f}function N(l){return R(l,j,{configurable:!0,enumerable:!0,value:o})}return s!==void 0&&(o=s[j]),o=k(o??null),E=[],A=function(l){l&&E.push(D(l))},S=function(l,b){for(var m=0;m<i.length;m++){var c=i[m],u=c[1],w=7&u;if((8&u)==l&&!w==b){var F=c[2],g=!!c[3],v=16&u;Q(l?t:t.prototype,c,v,g?"#"+F:Bt(F),w,w<2?[]:l?y=y||[]:d=d||[],E,!!l,g,b,l&&g?function(x){return Zt(x)===t}:r)}}},S(8,0),S(0,0),S(8,1),S(0,1),A(d),A(y),n=E,J||N(t),{e:n,get c(){var l=[];return J&&[N(t=Q(t,[e],a,t.name,5,l)),D(l,1)]}}}function Bt(t){var e=Gt(t,"string");return typeof e=="symbol"?e:e+""}function Gt(t,e){if(typeof t!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,e||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function At(t,e,i){typeof e=="symbol"&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:i?i+" "+e:e})}catch{}return t}function Zt(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 Ot=8,Ct,It=class extends St{static{({e:[yt,bt,wt,vt,xt,Tt,_t,Et,mt],c:[Ct,gt]}=Kt(this,[Yt("rui-tooltip")],[[X({type:String,defaultValue:""}),0,"content"],[X({type:String,defaultValue:"top"}),0,"placement"],[X({type:Number,defaultValue:200}),0,"delay"],[Jt({ref:"tooltip"}),0,"tooltipTarget"],[zt(["content","placement"]),2,"onDescribedPropsUpdated"],[Z({document:!0,type:"keydown"}),2,"onDocumentKeydown"],[Z({type:"focusin",ref:"trigger"}),2,"onFocusIn"],[Z({type:"focusout",ref:"trigger"}),2,"onFocusOut"],[Ft,2,"onPointerEnter"],[Ft,2,"onPointerLeave"]],0,void 0,St))}content=(mt(this),yt(this));placement=(bt(this),wt(this));delay=(vt(this),xt(this));tooltipTarget=(Tt(this),_t(this));open=(Et(this),!1);showTimer=null;hideTimer=null;tooltipId=ut("rui-tooltip");describedEl=null;cleanupFloating=null;connectedCallback(){super.connectedCallback(),this.addEventListener("pointerenter",this.onPointerEnter),this.addEventListener("pointerleave",this.onPointerLeave),queueMicrotask(()=>this.wireTrigger())}disconnectedCallback(){this.clearTimers(),this.teardownFloating(),this.removeEventListener("pointerenter",this.onPointerEnter),this.removeEventListener("pointerleave",this.onPointerLeave),this.describedEl?.removeAttribute("aria-describedby"),super.disconnectedCallback()}clearTimers(){this.showTimer&&clearTimeout(this.showTimer),this.hideTimer&&clearTimeout(this.hideTimer),this.showTimer=null,this.hideTimer=null}teardownFloating(){this.cleanupFloating?.(),this.cleanupFloating=null}getAnchor(){return lt(this)??this}wireTrigger(){this.describedEl?.removeAttribute("aria-describedby"),this.describedEl=this.getAnchor(),this.tooltipTarget&&(this.tooltipTarget.id=this.tooltipId),this.describedEl.setAttribute("aria-describedby",this.tooltipId)}attachFloating(){this.tooltipTarget&&(this.teardownFloating(),this.cleanupFloating=ft({anchor:this.getAnchor(),floating:this.tooltipTarget,getPlacement:()=>this.placement,gap:Ot}))}onDescribedPropsUpdated(){this.wireTrigger(),this.open&&this.tooltipTarget&&B(this.getAnchor(),this.tooltipTarget,this.placement,Ot)}setOpen(e){this.clearTimers(),this.open=e,this.tooltipTarget&&(this.tooltipTarget.hidden=!e,e?this.attachFloating():this.teardownFloating())}scheduleShow(){if(this.clearTimers(),this.delay<=0){this.setOpen(!0);return}this.showTimer=setTimeout(()=>this.setOpen(!0),this.delay)}scheduleHide(){this.clearTimers(),this.hideTimer=setTimeout(()=>this.setOpen(!1),80)}onDocumentKeydown(e){!this.open||e.key!=="Escape"||this.setOpen(!1)}onFocusIn(){this.scheduleShow()}onFocusOut(e){let i=e.relatedTarget;i&&this.contains(i)||this.scheduleHide()}onPointerEnter(){this.scheduleShow()}onPointerLeave(){this.scheduleHide()}render(){return Xt("span",{class:"rui-tooltip",children:[G("span",{class:"rui-tooltip__trigger","data-ref":"trigger",children:G("slot",{})}),G("span",{"data-ref":"tooltip",id:this.tooltipId,class:"rui-tooltip__content rui-floating",role:"tooltip",hidden:!0,children:this.$.content})]})}static{gt()}};import{jsx as Y,jsxs as Qt}from"@ecopages/jsx/jsx-runtime";function Nt({children:t,content:e="",...i}){return Y("rui-tooltip",{content:e,...i,children:Qt("span",{class:"rui-tooltip",children:[Y("span",{class:"rui-tooltip__trigger","data-ref":"trigger",children:t}),Y("span",{class:"rui-tooltip__content rui-floating","data-ref":"tooltip",role:"tooltip",hidden:!0,children:e})]})})}export{Nt as RuiTooltip,Ct as RuiTooltipElement};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/components/ui/tooltip/tooltip.script.tsx", "../../../../src/lib/focusable-elements.ts", "../../../../src/components/ui/shared/floating-position.ts", "../../../../src/components/ui/tooltip/tooltip.tsx"],
4
- "sourcesContent": ["let _initProto, _initClass, _init_content, _init_extra_content, _init_placement, _init_extra_placement, _init_delay, _init_extra_delay, _init_tooltipTarget, _init_extra_tooltipTarget;\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 { jsx, jsxs } from \"@ecopages/jsx/jsx-runtime\";\nimport { RadiantElement, bound, customElement, onEvent, onUpdated, prop, query } from \"@ecopages/radiant\";\nimport { findFirstFocusableCandidate } from \"@/lib/focusable-elements\";\nimport { applyFloatingPosition, attachFloating } from \"../shared/floating-position\";\nconst TOOLTIP_GAP = 8;\nlet _RuiTooltip;\nclass RuiTooltip extends RadiantElement {\n static {\n ({\n e: [_init_content, _init_extra_content, _init_placement, _init_extra_placement, _init_delay, _init_extra_delay, _init_tooltipTarget, _init_extra_tooltipTarget, _initProto],\n c: [_RuiTooltip, _initClass]\n } = _applyDecs(this, [customElement(\"rui-tooltip\")], [[prop({\n type: String,\n defaultValue: \"\"\n }), 0, \"content\"], [prop({\n type: String,\n defaultValue: \"top\"\n }), 0, \"placement\"], [prop({\n type: Number,\n defaultValue: 200\n }), 0, \"delay\"], [query({\n ref: \"tooltip\"\n }), 0, \"tooltipTarget\"], [onUpdated([\"content\", \"placement\"]), 2, \"onDescribedPropsUpdated\"], [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\"], [bound, 2, \"onPointerEnter\"], [bound, 2, \"onPointerLeave\"]], 0, void 0, RadiantElement));\n }\n content = (_initProto(this), _init_content(this));\n placement = (_init_extra_content(this), _init_placement(this));\n delay = (_init_extra_placement(this), _init_delay(this));\n tooltipTarget = (_init_extra_delay(this), _init_tooltipTarget(this));\n /**\n * Plain (non-reactive) field, not a JSX binding target: `hidden` is toggled\n * imperatively in `setOpen()` rather than bound, since it flips on every\n * hover/focus in/out \u2014 high-frequency enough that a plain synchronous DOM\n * write is preferable to routing it through the reactive binding system.\n */\n open = (_init_extra_tooltipTarget(this), false);\n showTimer = null;\n hideTimer = null;\n tooltipId = `rui-tooltip-${Math.random().toString(36).slice(2, 9)}`;\n describedEl = null;\n cleanupFloating = null;\n /**\n * Pointer enter/leave must be host listeners: those events do not bubble, and\n * `@onEvent` only supports delegated (bubbling) listeners.\n */\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener(\"pointerenter\", this.onPointerEnter);\n this.addEventListener(\"pointerleave\", this.onPointerLeave);\n queueMicrotask(() => this.wireTrigger());\n }\n disconnectedCallback() {\n this.clearTimers();\n this.teardownFloating();\n this.removeEventListener(\"pointerenter\", this.onPointerEnter);\n this.removeEventListener(\"pointerleave\", this.onPointerLeave);\n this.describedEl?.removeAttribute(\"aria-describedby\");\n super.disconnectedCallback();\n }\n clearTimers() {\n if (this.showTimer) clearTimeout(this.showTimer);\n if (this.hideTimer) clearTimeout(this.hideTimer);\n this.showTimer = null;\n this.hideTimer = null;\n }\n teardownFloating() {\n this.cleanupFloating?.();\n this.cleanupFloating = null;\n }\n getAnchor() {\n return findFirstFocusableCandidate(this) ?? this;\n }\n wireTrigger() {\n this.describedEl?.removeAttribute(\"aria-describedby\");\n this.describedEl = this.getAnchor();\n if (this.tooltipTarget) this.tooltipTarget.id = this.tooltipId;\n this.describedEl.setAttribute(\"aria-describedby\", this.tooltipId);\n }\n attachFloating() {\n if (!this.tooltipTarget) return;\n this.teardownFloating();\n this.cleanupFloating = attachFloating({\n anchor: this.getAnchor(),\n floating: this.tooltipTarget,\n getPlacement: () => this.placement,\n gap: TOOLTIP_GAP\n });\n }\n onDescribedPropsUpdated() {\n this.wireTrigger();\n if (this.open && this.tooltipTarget) {\n applyFloatingPosition(this.getAnchor(), this.tooltipTarget, this.placement, TOOLTIP_GAP);\n }\n }\n setOpen(next) {\n this.clearTimers();\n this.open = next;\n if (!this.tooltipTarget) return;\n this.tooltipTarget.hidden = !next;\n if (next) this.attachFloating();else this.teardownFloating();\n }\n scheduleShow() {\n this.clearTimers();\n if (this.delay <= 0) {\n this.setOpen(true);\n return;\n }\n this.showTimer = setTimeout(() => this.setOpen(true), this.delay);\n }\n scheduleHide() {\n this.clearTimers();\n this.hideTimer = setTimeout(() => this.setOpen(false), 80);\n }\n onDocumentKeydown(event) {\n if (!this.open || event.key !== \"Escape\") return;\n this.setOpen(false);\n }\n onFocusIn() {\n this.scheduleShow();\n }\n onFocusOut(event) {\n const next = event.relatedTarget;\n if (next && this.contains(next)) return;\n this.scheduleHide();\n }\n onPointerEnter() {\n this.scheduleShow();\n }\n onPointerLeave() {\n this.scheduleHide();\n }\n render() {\n return /* @__PURE__ */jsxs(\"span\", {\n class: \"rui-tooltip\",\n children: [/* @__PURE__ */jsx(\"span\", {\n class: \"rui-tooltip__trigger\",\n \"data-ref\": \"trigger\",\n children: /* @__PURE__ */jsx(\"slot\", {})\n }), /* @__PURE__ */jsx(\"span\", {\n \"data-ref\": \"tooltip\",\n id: this.tooltipId,\n class: \"rui-tooltip__content rui-floating\",\n role: \"tooltip\",\n hidden: true,\n children: this.$.content\n })]\n });\n }\n static {\n _initClass();\n }\n}\nexport { _RuiTooltip as RuiTooltip };", "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 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}", "import { jsx, jsxs } from \"@ecopages/jsx/jsx-runtime\";\nimport \"./tooltip.script\";\nexport function RuiTooltip({\n children,\n content = \"\",\n ...props\n}) {\n return /* @__PURE__ */jsx(\"rui-tooltip\", {\n content,\n ...props,\n children: /* @__PURE__ */jsxs(\"span\", {\n class: \"rui-tooltip\",\n children: [/* @__PURE__ */jsx(\"span\", {\n class: \"rui-tooltip__trigger\",\n \"data-ref\": \"trigger\",\n children\n }), /* @__PURE__ */jsx(\"span\", {\n class: \"rui-tooltip__content rui-floating\",\n \"data-ref\": \"tooltip\",\n role: \"tooltip\",\n hidden: true,\n children: content\n })]\n })\n });\n}"],
5
- "mappings": "AAMA,OAAS,OAAAA,EAAK,QAAAC,OAAY,4BAC1B,OAAS,kBAAAC,GAAgB,SAAAC,GAAO,iBAAAC,GAAe,WAAAC,EAAS,aAAAC,GAAW,QAAAC,EAAM,SAAAC,OAAa,oBCPtF,IAAMC,GAA+B,uDACrC,SAASC,GAAqBC,EAAS,CACrC,MAAO,CAACA,EAAQ,aAAa,UAAU,GAAKA,EAAQ,aAAa,UAAU,IAAM,IACnF,CACO,SAASC,G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V,KAAK,aAAa,CACpB,CACA,WAAWA,EAAO,CAChB,IAAMD,EAAOC,EAAM,cACfD,GAAQ,KAAK,SAASA,CAAI,GAC9B,KAAK,aAAa,CACpB,CACA,gBAAiB,CACf,KAAK,aAAa,CACpB,CACA,gBAAiB,CACf,KAAK,aAAa,CACpB,CACA,QAAS,CACP,OAAsBE,GAAK,OAAQ,CACjC,MAAO,cACP,SAAU,CAAgBC,EAAI,OAAQ,CACpC,MAAO,uBACP,WAAY,UACZ,SAAyBA,EAAI,OAAQ,CAAC,CAAC,CACzC,CAAC,EAAkBA,EAAI,OAAQ,CAC7B,WAAY,UACZ,GAAI,KAAK,UACT,MAAO,oCACP,KAAM,UACN,OAAQ,GACR,SAAU,KAAK,EAAE,OACnB,CAAC,CAAC,CACJ,CAAC,CACH,CACA,MAAO,CACLlE,GAAW,CACb,CACF,EGrKA,OAAS,OAAAmE,EAAK,QAAAC,OAAY,4BAEnB,SAASC,GAAW,CACzB,SAAAC,EACA,QAAAC,EAAU,GACV,GAAGC,CACL,EAAG,CACD,OAAsBC,EAAI,cAAe,CACvC,QAAAF,EACA,GAAGC,EACH,SAAyBE,GAAK,OAAQ,CACpC,MAAO,cACP,SAAU,CAAgBD,EAAI,OAAQ,CACpC,MAAO,uBACP,WAAY,UACZ,SAAAH,CACF,CAAC,EAAkBG,EAAI,OAAQ,CAC7B,MAAO,oCACP,WAAY,UACZ,KAAM,UACN,OAAQ,GACR,SAAUF,CACZ,CAAC,CAAC,CACJ,CAAC,CACH,CAAC,CACH",
6
- "names": ["jsx", "jsxs", "RadiantElement", "bound", "customElement", "onEvent", "onUpdated", "prop", "query", "FOCUSABLE_CANDIDATE_SELECTOR", "isFocusableCandidate", "element", "queryFocusableCandidates", "root", "findFirstFocusableCandidate", "root", "queryFocusableCandidates", "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", "_initProto", "_initClass", "_init_content", "_init_extra_content", "_init_placement", "_init_extra_placement", "_init_delay", "_init_extra_delay", "_init_tooltipTarget", "_init_extra_tooltipTarget", "_applyDecs", "e", "t", "n", "r", "o", "i", "c", "u", "s", "f", "l", "p", "d", "m", "h", "y", "v", "g", "a", "b", "applyDec", "w", "D", "S", "j", "E", "I", "P", "k", "F", "_setFunctionName", "N", "O", "T", "z", "A", "H", "_toPropertyKey", "_checkInRHS", "_toPrimitive", "TOOLTIP_GAP", "_RuiTooltip", "RuiTooltip", "RadiantElement", "customElement", "prop", "query", "onUpdated", "onEvent", "bound", "findFirstFocusableCandidate", "attachFloating", "applyFloatingPosition", "next", "event", "jsxs", "jsx", "jsx", "jsxs", "RuiTooltip", "children", "content", "props", "jsx", "jsxs"]
3
+ "sources": ["../../../../src/components/ui/tooltip/tooltip.script.tsx", "../../../../src/lib/focusable-elements.ts", "../../../../src/lib/unique-id.ts", "../../../../src/components/ui/shared/floating-position.ts", "../../../../src/components/ui/tooltip/tooltip.tsx"],
4
+ "sourcesContent": ["let _initProto, _initClass, _init_content, _init_extra_content, _init_placement, _init_extra_placement, _init_delay, _init_extra_delay, _init_tooltipTarget, _init_extra_tooltipTarget;\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 { jsx, jsxs } from \"@ecopages/jsx/jsx-runtime\";\nimport { RadiantElement, bound, customElement, onEvent, onUpdated, prop, query } from \"@ecopages/radiant\";\nimport { findFirstFocusableCandidate } from \"@/lib/focusable-elements\";\nimport { uniqueId } from \"@/lib/unique-id\";\nimport { applyFloatingPosition, attachFloating } from \"../shared/floating-position\";\nconst TOOLTIP_GAP = 8;\nlet _RuiTooltip;\nclass RuiTooltip extends RadiantElement {\n static {\n ({\n e: [_init_content, _init_extra_content, _init_placement, _init_extra_placement, _init_delay, _init_extra_delay, _init_tooltipTarget, _init_extra_tooltipTarget, _initProto],\n c: [_RuiTooltip, _initClass]\n } = _applyDecs(this, [customElement(\"rui-tooltip\")], [[prop({\n type: String,\n defaultValue: \"\"\n }), 0, \"content\"], [prop({\n type: String,\n defaultValue: \"top\"\n }), 0, \"placement\"], [prop({\n type: Number,\n defaultValue: 200\n }), 0, \"delay\"], [query({\n ref: \"tooltip\"\n }), 0, \"tooltipTarget\"], [onUpdated([\"content\", \"placement\"]), 2, \"onDescribedPropsUpdated\"], [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\"], [bound, 2, \"onPointerEnter\"], [bound, 2, \"onPointerLeave\"]], 0, void 0, RadiantElement));\n }\n content = (_initProto(this), _init_content(this));\n placement = (_init_extra_content(this), _init_placement(this));\n delay = (_init_extra_placement(this), _init_delay(this));\n tooltipTarget = (_init_extra_delay(this), _init_tooltipTarget(this));\n /**\n * Plain (non-reactive) field, not a JSX binding target: `hidden` is toggled\n * imperatively in `setOpen()` rather than bound, since it flips on every\n * hover/focus in/out \u2014 high-frequency enough that a plain synchronous DOM\n * write is preferable to routing it through the reactive binding system.\n */\n open = (_init_extra_tooltipTarget(this), false);\n showTimer = null;\n hideTimer = null;\n tooltipId = uniqueId(\"rui-tooltip\");\n describedEl = null;\n cleanupFloating = null;\n /**\n * Pointer enter/leave must be host listeners: those events do not bubble, and\n * `@onEvent` only supports delegated (bubbling) listeners.\n */\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener(\"pointerenter\", this.onPointerEnter);\n this.addEventListener(\"pointerleave\", this.onPointerLeave);\n queueMicrotask(() => this.wireTrigger());\n }\n disconnectedCallback() {\n this.clearTimers();\n this.teardownFloating();\n this.removeEventListener(\"pointerenter\", this.onPointerEnter);\n this.removeEventListener(\"pointerleave\", this.onPointerLeave);\n this.describedEl?.removeAttribute(\"aria-describedby\");\n super.disconnectedCallback();\n }\n clearTimers() {\n if (this.showTimer) clearTimeout(this.showTimer);\n if (this.hideTimer) clearTimeout(this.hideTimer);\n this.showTimer = null;\n this.hideTimer = null;\n }\n teardownFloating() {\n this.cleanupFloating?.();\n this.cleanupFloating = null;\n }\n getAnchor() {\n return findFirstFocusableCandidate(this) ?? this;\n }\n wireTrigger() {\n this.describedEl?.removeAttribute(\"aria-describedby\");\n this.describedEl = this.getAnchor();\n if (this.tooltipTarget) this.tooltipTarget.id = this.tooltipId;\n this.describedEl.setAttribute(\"aria-describedby\", this.tooltipId);\n }\n attachFloating() {\n if (!this.tooltipTarget) return;\n this.teardownFloating();\n this.cleanupFloating = attachFloating({\n anchor: this.getAnchor(),\n floating: this.tooltipTarget,\n getPlacement: () => this.placement,\n gap: TOOLTIP_GAP\n });\n }\n onDescribedPropsUpdated() {\n this.wireTrigger();\n if (this.open && this.tooltipTarget) {\n applyFloatingPosition(this.getAnchor(), this.tooltipTarget, this.placement, TOOLTIP_GAP);\n }\n }\n setOpen(next) {\n this.clearTimers();\n this.open = next;\n if (!this.tooltipTarget) return;\n this.tooltipTarget.hidden = !next;\n if (next) this.attachFloating();else this.teardownFloating();\n }\n scheduleShow() {\n this.clearTimers();\n if (this.delay <= 0) {\n this.setOpen(true);\n return;\n }\n this.showTimer = setTimeout(() => this.setOpen(true), this.delay);\n }\n scheduleHide() {\n this.clearTimers();\n this.hideTimer = setTimeout(() => this.setOpen(false), 80);\n }\n onDocumentKeydown(event) {\n if (!this.open || event.key !== \"Escape\") return;\n this.setOpen(false);\n }\n onFocusIn() {\n this.scheduleShow();\n }\n onFocusOut(event) {\n const next = event.relatedTarget;\n if (next && this.contains(next)) return;\n this.scheduleHide();\n }\n onPointerEnter() {\n this.scheduleShow();\n }\n onPointerLeave() {\n this.scheduleHide();\n }\n render() {\n return /* @__PURE__ */jsxs(\"span\", {\n class: \"rui-tooltip\",\n children: [/* @__PURE__ */jsx(\"span\", {\n class: \"rui-tooltip__trigger\",\n \"data-ref\": \"trigger\",\n children: /* @__PURE__ */jsx(\"slot\", {})\n }), /* @__PURE__ */jsx(\"span\", {\n \"data-ref\": \"tooltip\",\n id: this.tooltipId,\n class: \"rui-tooltip__content rui-floating\",\n role: \"tooltip\",\n hidden: true,\n children: this.$.content\n })]\n });\n }\n static {\n _initClass();\n }\n}\nexport { _RuiTooltip as RuiTooltip };", "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 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}", "import { jsx, jsxs } from \"@ecopages/jsx/jsx-runtime\";\nimport \"./tooltip.script\";\nexport function RuiTooltip({\n children,\n content = \"\",\n ...props\n}) {\n return /* @__PURE__ */jsx(\"rui-tooltip\", {\n content,\n ...props,\n children: /* @__PURE__ */jsxs(\"span\", {\n class: \"rui-tooltip\",\n children: [/* @__PURE__ */jsx(\"span\", {\n class: \"rui-tooltip__trigger\",\n \"data-ref\": \"trigger\",\n children\n }), /* @__PURE__ */jsx(\"span\", {\n class: \"rui-tooltip__content rui-floating\",\n \"data-ref\": \"tooltip\",\n role: \"tooltip\",\n hidden: true,\n children: content\n })]\n })\n });\n}"],
5
+ "mappings": "AAMA,OAAS,OAAAA,EAAK,QAAAC,OAAY,4BAC1B,OAAS,kBAAAC,GAAgB,SAAAC,GAAO,iBAAAC,GAAe,WAAAC,EAAS,aAAAC,GAAW,QAAAC,EAAM,SAAAC,OAAa,oBCPtF,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,GAA4BC,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,EAET,IAAMC,EAAW,OAAOD,CAAO,GAC/B,OAA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AAAC,OAAY,4BAEnB,SAASC,GAAW,CACzB,SAAAC,EACA,QAAAC,EAAU,GACV,GAAGC,CACL,EAAG,CACD,OAAsBC,EAAI,cAAe,CACvC,QAAAF,EACA,GAAGC,EACH,SAAyBE,GAAK,OAAQ,CACpC,MAAO,cACP,SAAU,CAAgBD,EAAI,OAAQ,CACpC,MAAO,uBACP,WAAY,UACZ,SAAAH,CACF,CAAC,EAAkBG,EAAI,OAAQ,CAC7B,MAAO,oCACP,WAAY,UACZ,KAAM,UACN,OAAQ,GACR,SAAUF,CACZ,CAAC,CAAC,CACJ,CAAC,CACH,CAAC,CACH",
6
+ "names": ["jsx", "jsxs", "RadiantElement", "bound", "customElement", "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", "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", "_initProto", "_initClass", "_init_content", "_init_extra_content", "_init_placement", "_init_extra_placement", "_init_delay", "_init_extra_delay", "_init_tooltipTarget", "_init_extra_tooltipTarget", "_applyDecs", "e", "t", "n", "r", "o", "i", "a", "c", "u", "s", "f", "l", "p", "d", "m", "h", "y", "v", "g", "b", "applyDec", "w", "D", "S", "j", "E", "I", "P", "k", "F", "_setFunctionName", "N", "O", "T", "z", "A", "H", "_toPropertyKey", "_checkInRHS", "_toPrimitive", "TOOLTIP_GAP", "_RuiTooltip", "RuiTooltip", "RadiantElement", "customElement", "prop", "query", "onUpdated", "onEvent", "bound", "uniqueId", "findFirstFocusableCandidate", "attachFloating", "applyFloatingPosition", "next", "event", "jsxs", "jsx", "jsx", "jsxs", "RuiTooltip", "children", "content", "props", "jsx", "jsxs"]
7
7
  }
@@ -1,6 +1,12 @@
1
1
  /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
2
- @layer properties;
3
2
  rui-tooltip {
3
+ --rui-tooltip-max-width: 20rem;
4
+ --rui-tooltip-padding-x: var(--space-2);
5
+ --rui-tooltip-padding-y: var(--space-1);
6
+ --rui-tooltip-radius: var(--radius-container);
7
+ --rui-tooltip-surface: var(--on-background);
8
+ --rui-tooltip-color: var(--background);
9
+ --rui-tooltip-shadow: var(--shadow-overlay);
4
10
  display: inline-flex;
5
11
  }
6
12
  @layer components {
@@ -13,105 +19,19 @@ rui-tooltip {
13
19
  }
14
20
  .rui-tooltip__content {
15
21
  z-index: var(--z-index-overlay, var(--z-overlay));
16
- max-width: var(--container-xs, 20rem);
17
- border-radius: var(--radius-container, var(--radius-container));
18
- background-color: var(--color-on-background, var(--on-background));
19
- padding-inline: var(--spacing-2, var(--space-2));
20
- padding-block: var(--spacing-1, var(--space-1));
21
22
  font-size: var(--text-xs, var(--text-xs));
22
23
  line-height: var(--tw-leading, var(--text-xs--line-height, calc(1 / 0.75)));
23
- color: var(--color-background, var(--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);
26
24
  width: max-content;
25
+ max-inline-size: var(--rui-tooltip-max-width);
26
+ padding-inline: var(--rui-tooltip-padding-x);
27
+ padding-block: var(--rui-tooltip-padding-y);
28
+ border-radius: var(--rui-tooltip-radius);
29
+ background-color: var(--rui-tooltip-surface);
30
+ color: var(--rui-tooltip-color);
31
+ box-shadow: var(--rui-tooltip-shadow);
27
32
  pointer-events: none;
28
33
  }
29
34
  .rui-tooltip__content[hidden] {
30
35
  display: none;
31
36
  }
32
37
  }
33
- @property --tw-shadow {
34
- syntax: "*";
35
- inherits: false;
36
- initial-value: 0 0 #0000;
37
- }
38
- @property --tw-shadow-color {
39
- syntax: "*";
40
- inherits: false;
41
- }
42
- @property --tw-shadow-alpha {
43
- syntax: "<percentage>";
44
- inherits: false;
45
- initial-value: 100%;
46
- }
47
- @property --tw-inset-shadow {
48
- syntax: "*";
49
- inherits: false;
50
- initial-value: 0 0 #0000;
51
- }
52
- @property --tw-inset-shadow-color {
53
- syntax: "*";
54
- inherits: false;
55
- }
56
- @property --tw-inset-shadow-alpha {
57
- syntax: "<percentage>";
58
- inherits: false;
59
- initial-value: 100%;
60
- }
61
- @property --tw-ring-color {
62
- syntax: "*";
63
- inherits: false;
64
- }
65
- @property --tw-ring-shadow {
66
- syntax: "*";
67
- inherits: false;
68
- initial-value: 0 0 #0000;
69
- }
70
- @property --tw-inset-ring-color {
71
- syntax: "*";
72
- inherits: false;
73
- }
74
- @property --tw-inset-ring-shadow {
75
- syntax: "*";
76
- inherits: false;
77
- initial-value: 0 0 #0000;
78
- }
79
- @property --tw-ring-inset {
80
- syntax: "*";
81
- inherits: false;
82
- }
83
- @property --tw-ring-offset-width {
84
- syntax: "<length>";
85
- inherits: false;
86
- initial-value: 0px;
87
- }
88
- @property --tw-ring-offset-color {
89
- syntax: "*";
90
- inherits: false;
91
- initial-value: #fff;
92
- }
93
- @property --tw-ring-offset-shadow {
94
- syntax: "*";
95
- inherits: false;
96
- initial-value: 0 0 #0000;
97
- }
98
- @layer properties {
99
- @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
100
- *, ::before, ::after, ::backdrop {
101
- --tw-shadow: 0 0 #0000;
102
- --tw-shadow-color: initial;
103
- --tw-shadow-alpha: 100%;
104
- --tw-inset-shadow: 0 0 #0000;
105
- --tw-inset-shadow-color: initial;
106
- --tw-inset-shadow-alpha: 100%;
107
- --tw-ring-color: initial;
108
- --tw-ring-shadow: 0 0 #0000;
109
- --tw-inset-ring-color: initial;
110
- --tw-inset-ring-shadow: 0 0 #0000;
111
- --tw-ring-inset: initial;
112
- --tw-ring-offset-width: 0px;
113
- --tw-ring-offset-color: #fff;
114
- --tw-ring-offset-shadow: 0 0 #0000;
115
- }
116
- }
117
- }
@@ -50,6 +50,14 @@ type RuiTooltipBindings = {
50
50
  * @attr {string} placement - Placement of the tooltip surface relative to its anchor. Default: `top`.
51
51
  * @attr {number} delay - Delay in ms before showing on hover/focus. Default: `200`.
52
52
  *
53
+ * @cssprop --rui-tooltip-max-width - Surface max inline size. Default: `20rem`.
54
+ * @cssprop --rui-tooltip-padding-x - Surface inline padding. Default: `--space-2`.
55
+ * @cssprop --rui-tooltip-padding-y - Surface block padding. Default: `--space-1`.
56
+ * @cssprop --rui-tooltip-radius - Surface corner radius. Default: `--radius-container`.
57
+ * @cssprop --rui-tooltip-surface - Surface fill. Default: `--on-background`.
58
+ * @cssprop --rui-tooltip-color - Surface text. Default: `--background`.
59
+ * @cssprop --rui-tooltip-shadow - Surface shadow. Default: `--shadow-overlay`.
60
+ *
53
61
  * @remarks
54
62
  * With CE `render()`, authored children are projected into `[data-ref="trigger"]`.
55
63
  */
@@ -67,7 +75,7 @@ export declare class RuiTooltip extends RadiantElement<RuiTooltipBindings> {
67
75
  private open;
68
76
  private showTimer;
69
77
  private hideTimer;
70
- private tooltipId;
78
+ private readonly tooltipId;
71
79
  private describedEl;
72
80
  private cleanupFloating;
73
81
  /**
@@ -1,2 +1,2 @@
1
- export { RuiWindowSplitter as RuiWindowSplitterElement, type RuiWindowSplitterProps, type RuiWindowSplitterChangeDetail, } from './window-splitter.script';
1
+ export { RuiWindowSplitter as RuiWindowSplitterElement, WINDOW_SPLITTER_MAX, WINDOW_SPLITTER_MIN, type RuiWindowSplitterProps, type RuiWindowSplitterChangeDetail, } from './window-splitter.script';
2
2
  export { RuiWindowSplitter } from './window-splitter';