@andespindola/ui-core 0.2.0 → 0.3.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 (285) hide show
  1. package/dist/cjs/{floating-ui.dom-BPemvNRD.js → floating-ui.dom-BZk7Blsu.js} +93 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/ui-accordion-item.cjs.entry.js +1 -1
  4. package/dist/cjs/ui-accordion.cjs.entry.js +1 -1
  5. package/dist/cjs/ui-avatar-group.cjs.entry.js +1 -1
  6. package/dist/cjs/ui-avatar.cjs.entry.js +1 -1
  7. package/dist/cjs/ui-breadcrumb-item.cjs.entry.js +1 -1
  8. package/dist/cjs/ui-breadcrumb.cjs.entry.js +1 -1
  9. package/dist/cjs/ui-button.cjs.entry.js +1 -1
  10. package/dist/cjs/ui-card.cjs.entry.js +1 -1
  11. package/dist/cjs/ui-checkbox.cjs.entry.js +1 -1
  12. package/dist/cjs/ui-combobox.cjs.entry.js +153 -0
  13. package/dist/cjs/ui-container.cjs.entry.js +1 -1
  14. package/dist/cjs/ui-date-picker.cjs.entry.js +171 -0
  15. package/dist/cjs/ui-dialog.cjs.entry.js +1 -1
  16. package/dist/cjs/ui-drawer.cjs.entry.js +1 -1
  17. package/dist/cjs/ui-dropdown-item.cjs.entry.js +1 -1
  18. package/dist/cjs/ui-dropdown-menu.cjs.entry.js +2 -2
  19. package/dist/cjs/ui-field.cjs.entry.js +1 -1
  20. package/dist/cjs/ui-file-upload.cjs.entry.js +57 -0
  21. package/dist/cjs/ui-grid.cjs.entry.js +1 -1
  22. package/dist/cjs/ui-input.cjs.entry.js +1 -1
  23. package/dist/cjs/ui-label.cjs.entry.js +1 -1
  24. package/dist/cjs/ui-navbar.cjs.entry.js +17 -0
  25. package/dist/cjs/ui-pagination.cjs.entry.js +2 -2
  26. package/dist/cjs/ui-popover.cjs.entry.js +2 -2
  27. package/dist/cjs/ui-progress-circular.cjs.entry.js +44 -0
  28. package/dist/cjs/ui-progress.cjs.entry.js +1 -1
  29. package/dist/cjs/ui-radio-group.cjs.entry.js +1 -1
  30. package/dist/cjs/ui-rating.cjs.entry.js +45 -0
  31. package/dist/cjs/ui-reveal.cjs.entry.js +1 -1
  32. package/dist/cjs/ui-scroll-progress.cjs.entry.js +1 -1
  33. package/dist/cjs/ui-section.cjs.entry.js +1 -1
  34. package/dist/cjs/ui-segmented.cjs.entry.js +1 -1
  35. package/dist/cjs/ui-select.cjs.entry.js +1 -1
  36. package/dist/cjs/ui-separator.cjs.entry.js +1 -1
  37. package/dist/cjs/ui-skeleton.cjs.entry.js +1 -1
  38. package/dist/cjs/ui-slider.cjs.entry.js +1 -1
  39. package/dist/cjs/ui-spinner.cjs.entry.js +1 -1
  40. package/dist/cjs/ui-stack.cjs.entry.js +1 -1
  41. package/dist/cjs/ui-stat.cjs.entry.js +1 -1
  42. package/dist/cjs/ui-switch.cjs.entry.js +1 -1
  43. package/dist/cjs/ui-table.cjs.entry.js +25 -0
  44. package/dist/cjs/ui-tabs.cjs.entry.js +2 -2
  45. package/dist/cjs/ui-textarea.cjs.entry.js +1 -1
  46. package/dist/cjs/ui-theme-toggle.cjs.entry.js +1 -1
  47. package/dist/cjs/ui-toast.cjs.entry.js +1 -1
  48. package/dist/cjs/ui-toaster.cjs.entry.js +1 -1
  49. package/dist/cjs/ui-tooltip.cjs.entry.js +2 -2
  50. package/dist/cjs/uikit.cjs.js +1 -1
  51. package/dist/collection/collection-manifest.json +7 -0
  52. package/dist/collection/components/ui-accordion/ui-accordion.js +1 -1
  53. package/dist/collection/components/ui-accordion-item/ui-accordion-item.js +1 -1
  54. package/dist/collection/components/ui-avatar/ui-avatar.js +1 -1
  55. package/dist/collection/components/ui-avatar-group/ui-avatar-group.js +1 -1
  56. package/dist/collection/components/ui-breadcrumb/ui-breadcrumb.js +1 -1
  57. package/dist/collection/components/ui-breadcrumb-item/ui-breadcrumb-item.js +1 -1
  58. package/dist/collection/components/ui-button/ui-button.css +2 -0
  59. package/dist/collection/components/ui-card/ui-card.js +1 -1
  60. package/dist/collection/components/ui-checkbox/ui-checkbox.js +1 -1
  61. package/dist/collection/components/ui-combobox/ui-combobox.css +93 -0
  62. package/dist/collection/components/ui-combobox/ui-combobox.js +248 -0
  63. package/dist/collection/components/ui-container/ui-container.js +1 -1
  64. package/dist/collection/components/ui-date-picker/ui-date-picker.css +176 -0
  65. package/dist/collection/components/ui-date-picker/ui-date-picker.js +243 -0
  66. package/dist/collection/components/ui-dialog/ui-dialog.js +1 -1
  67. package/dist/collection/components/ui-drawer/ui-drawer.js +1 -1
  68. package/dist/collection/components/ui-dropdown-item/ui-dropdown-item.js +1 -1
  69. package/dist/collection/components/ui-dropdown-menu/ui-dropdown-menu.js +1 -1
  70. package/dist/collection/components/ui-field/ui-field.js +1 -1
  71. package/dist/collection/components/ui-file-upload/ui-file-upload.css +79 -0
  72. package/dist/collection/components/ui-file-upload/ui-file-upload.js +151 -0
  73. package/dist/collection/components/ui-grid/ui-grid.js +1 -1
  74. package/dist/collection/components/ui-input/ui-input.js +1 -1
  75. package/dist/collection/components/ui-label/ui-label.js +1 -1
  76. package/dist/collection/components/ui-navbar/ui-navbar.css +36 -0
  77. package/dist/collection/components/ui-navbar/ui-navbar.js +18 -0
  78. package/dist/collection/components/ui-pagination/ui-pagination.js +2 -2
  79. package/dist/collection/components/ui-popover/ui-popover.js +1 -1
  80. package/dist/collection/components/ui-progress/ui-progress.js +1 -1
  81. package/dist/collection/components/ui-progress-circular/ui-progress-circular.css +46 -0
  82. package/dist/collection/components/ui-progress-circular/ui-progress-circular.js +171 -0
  83. package/dist/collection/components/ui-radio-group/ui-radio-group.js +1 -1
  84. package/dist/collection/components/ui-rating/ui-rating.css +52 -0
  85. package/dist/collection/components/ui-rating/ui-rating.js +134 -0
  86. package/dist/collection/components/ui-reveal/ui-reveal.js +1 -1
  87. package/dist/collection/components/ui-scroll-progress/ui-scroll-progress.js +1 -1
  88. package/dist/collection/components/ui-section/ui-section.js +1 -1
  89. package/dist/collection/components/ui-segmented/ui-segmented.js +1 -1
  90. package/dist/collection/components/ui-select/ui-select.js +1 -1
  91. package/dist/collection/components/ui-separator/ui-separator.js +1 -1
  92. package/dist/collection/components/ui-skeleton/ui-skeleton.js +1 -1
  93. package/dist/collection/components/ui-slider/ui-slider.js +1 -1
  94. package/dist/collection/components/ui-spinner/ui-spinner.js +1 -1
  95. package/dist/collection/components/ui-stack/ui-stack.js +1 -1
  96. package/dist/collection/components/ui-stat/ui-stat.js +1 -1
  97. package/dist/collection/components/ui-switch/ui-switch.js +1 -1
  98. package/dist/collection/components/ui-table/ui-table.css +46 -0
  99. package/dist/collection/components/ui-table/ui-table.js +119 -0
  100. package/dist/collection/components/ui-tabs/ui-tabs.js +2 -2
  101. package/dist/collection/components/ui-textarea/ui-textarea.js +1 -1
  102. package/dist/collection/components/ui-theme-toggle/ui-theme-toggle.js +1 -1
  103. package/dist/collection/components/ui-toast/ui-toast.js +1 -1
  104. package/dist/collection/components/ui-toaster/ui-toaster.js +1 -1
  105. package/dist/collection/components/ui-tooltip/ui-tooltip.js +1 -1
  106. package/dist/components/{p-CgsjJD8o.js → p-DDJE__UC.js} +1 -1
  107. package/dist/{uikit/p-CyBRmmbs.js → components/p-DDtwbwIl.js} +1 -1
  108. package/dist/components/{p-BwNtNvTb.js → p-DUT2Q8Df.js} +1 -1
  109. package/dist/components/ui-accordion-item.js +1 -1
  110. package/dist/components/ui-accordion.js +1 -1
  111. package/dist/components/ui-avatar-group.js +1 -1
  112. package/dist/components/ui-avatar.js +1 -1
  113. package/dist/components/ui-breadcrumb-item.js +1 -1
  114. package/dist/components/ui-breadcrumb.js +1 -1
  115. package/dist/components/ui-button.js +1 -1
  116. package/dist/components/ui-card.js +1 -1
  117. package/dist/components/ui-checkbox.js +1 -1
  118. package/dist/components/ui-combobox.d.ts +11 -0
  119. package/dist/components/ui-combobox.js +1 -0
  120. package/dist/components/ui-container.js +1 -1
  121. package/dist/components/ui-date-picker.d.ts +11 -0
  122. package/dist/components/ui-date-picker.js +1 -0
  123. package/dist/components/ui-dialog.js +1 -1
  124. package/dist/components/ui-drawer.js +1 -1
  125. package/dist/components/ui-dropdown-item.js +1 -1
  126. package/dist/components/ui-dropdown-menu.js +1 -1
  127. package/dist/components/ui-field.js +1 -1
  128. package/dist/components/ui-file-upload.d.ts +11 -0
  129. package/dist/components/ui-file-upload.js +1 -0
  130. package/dist/components/ui-grid.js +1 -1
  131. package/dist/components/ui-input.js +1 -1
  132. package/dist/components/ui-label.js +1 -1
  133. package/dist/components/ui-loading-overlay.js +1 -1
  134. package/dist/components/ui-navbar.d.ts +11 -0
  135. package/dist/components/ui-navbar.js +1 -0
  136. package/dist/components/ui-pagination.js +1 -1
  137. package/dist/components/ui-popover.js +1 -1
  138. package/dist/components/ui-progress-circular.d.ts +11 -0
  139. package/dist/components/ui-progress-circular.js +1 -0
  140. package/dist/components/ui-progress.js +1 -1
  141. package/dist/components/ui-radio-group.js +1 -1
  142. package/dist/components/ui-rating.d.ts +11 -0
  143. package/dist/components/ui-rating.js +1 -0
  144. package/dist/components/ui-reveal.js +1 -1
  145. package/dist/components/ui-scroll-progress.js +1 -1
  146. package/dist/components/ui-section.js +1 -1
  147. package/dist/components/ui-segmented.js +1 -1
  148. package/dist/components/ui-select.js +1 -1
  149. package/dist/components/ui-separator.js +1 -1
  150. package/dist/components/ui-skeleton.js +1 -1
  151. package/dist/components/ui-slider.js +1 -1
  152. package/dist/components/ui-spinner.js +1 -1
  153. package/dist/components/ui-stack.js +1 -1
  154. package/dist/components/ui-stat.js +1 -1
  155. package/dist/components/ui-switch.js +1 -1
  156. package/dist/components/ui-table.d.ts +11 -0
  157. package/dist/components/ui-table.js +1 -0
  158. package/dist/components/ui-tabs.js +1 -1
  159. package/dist/components/ui-textarea.js +1 -1
  160. package/dist/components/ui-theme-toggle.js +1 -1
  161. package/dist/components/ui-toast.js +1 -1
  162. package/dist/components/ui-toaster.js +1 -1
  163. package/dist/components/ui-tooltip.js +1 -1
  164. package/dist/esm/{floating-ui.dom-CyBRmmbs.js → floating-ui.dom-DDtwbwIl.js} +93 -1
  165. package/dist/esm/loader.js +1 -1
  166. package/dist/esm/ui-accordion-item.entry.js +1 -1
  167. package/dist/esm/ui-accordion.entry.js +1 -1
  168. package/dist/esm/ui-avatar-group.entry.js +1 -1
  169. package/dist/esm/ui-avatar.entry.js +1 -1
  170. package/dist/esm/ui-breadcrumb-item.entry.js +1 -1
  171. package/dist/esm/ui-breadcrumb.entry.js +1 -1
  172. package/dist/esm/ui-button.entry.js +1 -1
  173. package/dist/esm/ui-card.entry.js +1 -1
  174. package/dist/esm/ui-checkbox.entry.js +1 -1
  175. package/dist/esm/ui-combobox.entry.js +151 -0
  176. package/dist/esm/ui-container.entry.js +1 -1
  177. package/dist/esm/ui-date-picker.entry.js +169 -0
  178. package/dist/esm/ui-dialog.entry.js +1 -1
  179. package/dist/esm/ui-drawer.entry.js +1 -1
  180. package/dist/esm/ui-dropdown-item.entry.js +1 -1
  181. package/dist/esm/ui-dropdown-menu.entry.js +2 -2
  182. package/dist/esm/ui-field.entry.js +1 -1
  183. package/dist/esm/ui-file-upload.entry.js +55 -0
  184. package/dist/esm/ui-grid.entry.js +1 -1
  185. package/dist/esm/ui-input.entry.js +1 -1
  186. package/dist/esm/ui-label.entry.js +1 -1
  187. package/dist/esm/ui-navbar.entry.js +15 -0
  188. package/dist/esm/ui-pagination.entry.js +2 -2
  189. package/dist/esm/ui-popover.entry.js +2 -2
  190. package/dist/esm/ui-progress-circular.entry.js +42 -0
  191. package/dist/esm/ui-progress.entry.js +1 -1
  192. package/dist/esm/ui-radio-group.entry.js +1 -1
  193. package/dist/esm/ui-rating.entry.js +43 -0
  194. package/dist/esm/ui-reveal.entry.js +1 -1
  195. package/dist/esm/ui-scroll-progress.entry.js +1 -1
  196. package/dist/esm/ui-section.entry.js +1 -1
  197. package/dist/esm/ui-segmented.entry.js +1 -1
  198. package/dist/esm/ui-select.entry.js +1 -1
  199. package/dist/esm/ui-separator.entry.js +1 -1
  200. package/dist/esm/ui-skeleton.entry.js +1 -1
  201. package/dist/esm/ui-slider.entry.js +1 -1
  202. package/dist/esm/ui-spinner.entry.js +1 -1
  203. package/dist/esm/ui-stack.entry.js +1 -1
  204. package/dist/esm/ui-stat.entry.js +1 -1
  205. package/dist/esm/ui-switch.entry.js +1 -1
  206. package/dist/esm/ui-table.entry.js +23 -0
  207. package/dist/esm/ui-tabs.entry.js +2 -2
  208. package/dist/esm/ui-textarea.entry.js +1 -1
  209. package/dist/esm/ui-theme-toggle.entry.js +1 -1
  210. package/dist/esm/ui-toast.entry.js +1 -1
  211. package/dist/esm/ui-toaster.entry.js +1 -1
  212. package/dist/esm/ui-tooltip.entry.js +2 -2
  213. package/dist/esm/uikit.js +1 -1
  214. package/dist/types/components/ui-combobox/ui-combobox.d.ts +38 -0
  215. package/dist/types/components/ui-date-picker/ui-date-picker.d.ts +42 -0
  216. package/dist/types/components/ui-file-upload/ui-file-upload.d.ts +24 -0
  217. package/dist/types/components/ui-navbar/ui-navbar.d.ts +3 -0
  218. package/dist/types/components/ui-progress-circular/ui-progress-circular.d.ts +17 -0
  219. package/dist/types/components/ui-rating/ui-rating.d.ts +17 -0
  220. package/dist/types/components/ui-table/ui-table.d.ts +16 -0
  221. package/dist/types/components.d.ts +409 -0
  222. package/dist/types/index.d.ts +1 -0
  223. package/dist/uikit/{p-81b45a43.entry.js → p-008118af.entry.js} +1 -1
  224. package/dist/uikit/p-0715db16.entry.js +1 -0
  225. package/dist/uikit/p-10afa395.entry.js +1 -0
  226. package/dist/uikit/{p-25637424.entry.js → p-1449f229.entry.js} +1 -1
  227. package/dist/uikit/{p-567f7496.entry.js → p-1514ae37.entry.js} +1 -1
  228. package/dist/uikit/{p-cd0ec835.entry.js → p-1685191b.entry.js} +1 -1
  229. package/dist/uikit/p-1ef7948f.entry.js +1 -0
  230. package/dist/uikit/p-283e7623.entry.js +1 -0
  231. package/dist/uikit/p-2d92ce04.entry.js +1 -0
  232. package/dist/uikit/{p-faa98928.entry.js → p-3995852d.entry.js} +1 -1
  233. package/dist/uikit/p-3b1f92da.entry.js +1 -0
  234. package/dist/uikit/p-3fdfad2e.entry.js +1 -0
  235. package/dist/uikit/p-4044ebde.entry.js +1 -0
  236. package/dist/uikit/{p-95cd976e.entry.js → p-413cfbc6.entry.js} +1 -1
  237. package/dist/uikit/p-4ba0e4bc.entry.js +1 -0
  238. package/dist/uikit/{p-635862e6.entry.js → p-5e0bc34a.entry.js} +1 -1
  239. package/dist/uikit/{p-86ed6154.entry.js → p-60910c03.entry.js} +1 -1
  240. package/dist/uikit/{p-c73c1009.entry.js → p-62881327.entry.js} +1 -1
  241. package/dist/uikit/p-6c51a216.entry.js +1 -0
  242. package/dist/uikit/p-6d363a02.entry.js +1 -0
  243. package/dist/uikit/{p-67963692.entry.js → p-8535f5c9.entry.js} +1 -1
  244. package/dist/uikit/{p-2601d8b6.entry.js → p-88238a16.entry.js} +1 -1
  245. package/dist/uikit/{p-595e146f.entry.js → p-894fc85f.entry.js} +1 -1
  246. package/dist/uikit/p-8b882367.entry.js +1 -0
  247. package/dist/uikit/{p-12db6a6e.entry.js → p-9310b73b.entry.js} +1 -1
  248. package/dist/uikit/{p-1d016ea4.entry.js → p-99b7e461.entry.js} +1 -1
  249. package/dist/uikit/p-9d8d420e.entry.js +1 -0
  250. package/dist/uikit/{p-55a23f91.entry.js → p-9dbe7e12.entry.js} +1 -1
  251. package/dist/uikit/{p-09895cd0.entry.js → p-9f09fcec.entry.js} +1 -1
  252. package/dist/{components/p-CyBRmmbs.js → uikit/p-DDtwbwIl.js} +1 -1
  253. package/dist/uikit/{p-a977a0db.entry.js → p-a3d819cd.entry.js} +1 -1
  254. package/dist/uikit/{p-979f6178.entry.js → p-b0f2b1c8.entry.js} +1 -1
  255. package/dist/uikit/{p-3996590f.entry.js → p-b7e30398.entry.js} +1 -1
  256. package/dist/uikit/p-bac2c523.entry.js +1 -0
  257. package/dist/uikit/p-bbc718ef.entry.js +1 -0
  258. package/dist/uikit/{p-74b60a60.entry.js → p-bdd30484.entry.js} +1 -1
  259. package/dist/uikit/{p-fd832f52.entry.js → p-c1a9db7c.entry.js} +1 -1
  260. package/dist/uikit/p-c2138fb9.entry.js +1 -0
  261. package/dist/uikit/{p-ddd70374.entry.js → p-c94492ff.entry.js} +1 -1
  262. package/dist/uikit/{p-7f2c2924.entry.js → p-ccca2aeb.entry.js} +1 -1
  263. package/dist/uikit/{p-a01305a5.entry.js → p-d7ab158f.entry.js} +1 -1
  264. package/dist/uikit/p-da807078.entry.js +1 -0
  265. package/dist/uikit/p-e2065caa.entry.js +1 -0
  266. package/dist/uikit/{p-dca9f6f9.entry.js → p-f2983e94.entry.js} +1 -1
  267. package/dist/uikit/{p-2de05aac.entry.js → p-f4344cce.entry.js} +1 -1
  268. package/dist/uikit/{p-3fc062a6.entry.js → p-fb89d9a4.entry.js} +1 -1
  269. package/dist/uikit/p-fbe7806c.entry.js +1 -0
  270. package/dist/uikit/p-ffcd1faf.entry.js +1 -0
  271. package/dist/uikit/uikit.esm.js +1 -1
  272. package/package.json +1 -1
  273. package/dist/uikit/p-0cba0d11.entry.js +0 -1
  274. package/dist/uikit/p-6c0e9809.entry.js +0 -1
  275. package/dist/uikit/p-7a3d85da.entry.js +0 -1
  276. package/dist/uikit/p-94ad46a5.entry.js +0 -1
  277. package/dist/uikit/p-97d4dbf4.entry.js +0 -1
  278. package/dist/uikit/p-9a4dc343.entry.js +0 -1
  279. package/dist/uikit/p-9a9590b9.entry.js +0 -1
  280. package/dist/uikit/p-a080f46a.entry.js +0 -1
  281. package/dist/uikit/p-a92a7b19.entry.js +0 -1
  282. package/dist/uikit/p-b2df8437.entry.js +0 -1
  283. package/dist/uikit/p-d20452b4.entry.js +0 -1
  284. package/dist/uikit/p-d7021157.entry.js +0 -1
  285. package/dist/uikit/p-db07f9c5.entry.js +0 -1
@@ -0,0 +1,134 @@
1
+ import { h, Host, } from "@stencil/core";
2
+ export class UiRating {
3
+ constructor() {
4
+ /** Valor selecionado. */
5
+ this.value = 0;
6
+ /** Quantidade de estrelas. */
7
+ this.max = 5;
8
+ /** Apenas leitura, sem interação. */
9
+ this.readonly = false;
10
+ /** Estrela atualmente sob o cursor (-1 quando sem hover). */
11
+ this.hoverValue = -1;
12
+ this.onLeave = () => {
13
+ this.hoverValue = -1;
14
+ };
15
+ }
16
+ select(index) {
17
+ if (this.readonly)
18
+ return;
19
+ this.value = index;
20
+ this.uiChange.emit(this.value);
21
+ }
22
+ onEnter(index) {
23
+ if (this.readonly)
24
+ return;
25
+ this.hoverValue = index;
26
+ }
27
+ render() {
28
+ const active = this.hoverValue > 0 ? this.hoverValue : this.value;
29
+ const stars = Array.from({ length: this.max }, (_, i) => i + 1);
30
+ return (h(Host, { key: 'b334c2aea5f4b15907ef5d386f344403b97f0324' }, h("div", { key: '635e2ec90f98eb3f90c4f365d32fc82b5763cf42', class: "rating", role: "radiogroup", "aria-label": "Avalia\u00E7\u00E3o", onMouseLeave: this.onLeave }, stars.map((index) => {
31
+ const filled = index <= active;
32
+ return (h("button", { class: { star: true, filled, readonly: this.readonly }, type: "button", role: "radio", "aria-checked": index === this.value ? "true" : "false", "aria-label": `${index} estrelas`, onClick: () => this.select(index), onMouseEnter: () => this.onEnter(index) }, h("svg", { viewBox: "0 0 24 24", width: "100%", height: "100%" }, h("path", { d: "M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" }))));
33
+ }))));
34
+ }
35
+ static get is() { return "ui-rating"; }
36
+ static get encapsulation() { return "shadow"; }
37
+ static get originalStyleUrls() {
38
+ return {
39
+ "$": ["ui-rating.css"]
40
+ };
41
+ }
42
+ static get styleUrls() {
43
+ return {
44
+ "$": ["ui-rating.css"]
45
+ };
46
+ }
47
+ static get properties() {
48
+ return {
49
+ "value": {
50
+ "type": "number",
51
+ "mutable": true,
52
+ "complexType": {
53
+ "original": "number",
54
+ "resolved": "number",
55
+ "references": {}
56
+ },
57
+ "required": false,
58
+ "optional": false,
59
+ "docs": {
60
+ "tags": [],
61
+ "text": "Valor selecionado."
62
+ },
63
+ "getter": false,
64
+ "setter": false,
65
+ "reflect": false,
66
+ "attribute": "value",
67
+ "defaultValue": "0"
68
+ },
69
+ "max": {
70
+ "type": "number",
71
+ "mutable": false,
72
+ "complexType": {
73
+ "original": "number",
74
+ "resolved": "number",
75
+ "references": {}
76
+ },
77
+ "required": false,
78
+ "optional": false,
79
+ "docs": {
80
+ "tags": [],
81
+ "text": "Quantidade de estrelas."
82
+ },
83
+ "getter": false,
84
+ "setter": false,
85
+ "reflect": false,
86
+ "attribute": "max",
87
+ "defaultValue": "5"
88
+ },
89
+ "readonly": {
90
+ "type": "boolean",
91
+ "mutable": false,
92
+ "complexType": {
93
+ "original": "boolean",
94
+ "resolved": "boolean",
95
+ "references": {}
96
+ },
97
+ "required": false,
98
+ "optional": false,
99
+ "docs": {
100
+ "tags": [],
101
+ "text": "Apenas leitura, sem intera\u00E7\u00E3o."
102
+ },
103
+ "getter": false,
104
+ "setter": false,
105
+ "reflect": false,
106
+ "attribute": "readonly",
107
+ "defaultValue": "false"
108
+ }
109
+ };
110
+ }
111
+ static get states() {
112
+ return {
113
+ "hoverValue": {}
114
+ };
115
+ }
116
+ static get events() {
117
+ return [{
118
+ "method": "uiChange",
119
+ "name": "uiChange",
120
+ "bubbles": true,
121
+ "cancelable": true,
122
+ "composed": true,
123
+ "docs": {
124
+ "tags": [],
125
+ "text": "Emitido quando o valor muda."
126
+ },
127
+ "complexType": {
128
+ "original": "number",
129
+ "resolved": "number",
130
+ "references": {}
131
+ }
132
+ }];
133
+ }
134
+ }
@@ -26,7 +26,7 @@ export class UiReveal {
26
26
  this.observer?.disconnect();
27
27
  }
28
28
  render() {
29
- return (h(Host, { key: '4ab570c0eaa9fb6b4d6a9d01887fde6edd72ba8d' }, h("div", { key: 'cf0287499bfa5107fb49cadc85c85f2f70063967', class: { reveal: true, visible: this.visible }, style: { transitionDelay: `${this.delay}ms` } }, h("slot", { key: 'b46502732e597f13d60ec55be0d456dba8181386' }))));
29
+ return (h(Host, { key: '5bb285428644e0c3e130178e5c34811ff5c52d5a' }, h("div", { key: '1884cbc6f94fdee392ed94ab8fbc4a449747138a', class: { reveal: true, visible: this.visible }, style: { transitionDelay: `${this.delay}ms` } }, h("slot", { key: '270ee6624c2ba58edc786d80fb3d777ff3cebb41' }))));
30
30
  }
31
31
  static get is() { return "ui-reveal"; }
32
32
  static get encapsulation() { return "shadow"; }
@@ -23,7 +23,7 @@ export class UiScrollProgress {
23
23
  window.removeEventListener("scroll", this.onScroll);
24
24
  }
25
25
  render() {
26
- return (h(Host, { key: 'cb2d746b6e0ca3642a0460cff5685f2eb83a6301' }, h("div", { key: '7fdb8b414f833110c389aef8620c313fb8c001c7', class: "bar", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": Math.round(this.progress * 100), style: { transform: `scaleX(${this.progress})` } })));
26
+ return (h(Host, { key: 'fee75a94ba6949fffe43501b672492795632f687' }, h("div", { key: 'fc881ac42582dc50df17861b918d96331216b86f', class: "bar", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": Math.round(this.progress * 100), style: { transform: `scaleX(${this.progress})` } })));
27
27
  }
28
28
  static get is() { return "ui-scroll-progress"; }
29
29
  static get encapsulation() { return "shadow"; }
@@ -9,7 +9,7 @@ export class UiSection {
9
9
  this.description = "";
10
10
  }
11
11
  render() {
12
- return (h(Host, { key: '71344e4d5a4c6bccade1bf5151aeba1dffa14d7f' }, h("section", { key: '404cb27c6db128f60608b4eff44fa6e05520016b' }, this.eyebrow && h("p", { key: '204ced95531d3bf77c2a32f940c3ec4bc0e76f53', class: "eyebrow" }, this.eyebrow), this.heading && h("h2", { key: '46818123dd264ef60db8ff9c7a2ad93979d71434', class: "heading" }, this.heading), this.description && h("p", { key: 'eaba39853cd12a874c9079e2181aca9e0fc130b7', class: "description" }, this.description), h("slot", { key: '24d02b1d9176e42d7906ef43881807d7cfda2e52' }))));
12
+ return (h(Host, { key: '541fff68d5138d9c8767a22f4fc031d77d532010' }, h("section", { key: 'a05b3596b2dae7e78216b087af28f0be57d79468' }, this.eyebrow && h("p", { key: 'd429995b90a7877792fb4c2def70a2dd9fd1865d', class: "eyebrow" }, this.eyebrow), this.heading && h("h2", { key: '41849c37d94c9d91cfedaa0bceec0a453089326d', class: "heading" }, this.heading), this.description && h("p", { key: '5b244c629c70ed213426d141bec5c67da670d566', class: "description" }, this.description), h("slot", { key: '7ad5eafe43915eb69f31532417f1ea28f232b5c8' }))));
13
13
  }
14
14
  static get is() { return "ui-section"; }
15
15
  static get encapsulation() { return "shadow"; }
@@ -13,7 +13,7 @@ export class UiSegmented {
13
13
  };
14
14
  }
15
15
  render() {
16
- return (h(Host, { key: '92649a392383aebb62bab90e3f20a008783f2ed2' }, h("div", { key: '22983cd496ee1f9ed1dbf49d989c409cdca3c8b4', class: "track", role: "radiogroup" }, this.items.map((item) => {
16
+ return (h(Host, { key: 'ff4e74a388b0c7db02c4065e32c93b66d1338fb8' }, h("div", { key: '163708540ba5221f2b7a90dc7778c2d83072b6e4', class: "track", role: "radiogroup" }, this.items.map((item) => {
17
17
  const active = item.value === this.value;
18
18
  return (h("button", { key: item.value, class: { segment: true, active }, type: "button", role: "radio", "aria-checked": active ? "true" : "false", onClick: () => this.select(item.value) }, item.label));
19
19
  }))));
@@ -13,7 +13,7 @@ export class UiSelect {
13
13
  }
14
14
  render() {
15
15
  const hasValue = this.value !== undefined && this.value !== "";
16
- return (h(Host, { key: '5f41047362d77643cc663925900c15c6cd10ec60' }, h("div", { key: '53ec77b2100bdd6de568ad549a42ad8fd080ac6a', class: "wrapper" }, h("select", { key: 'b0b4b1def7b7166bf24f996f9736a670a9b7b052', class: "select", name: this.name, disabled: this.disabled, onChange: this.onChange }, this.placeholder && (h("option", { key: 'e83b039418ac74bb3124c151dca9af43ff05dd61', value: "", disabled: true, selected: !hasValue }, this.placeholder)), this.options.map((option) => (h("option", { value: option.value, selected: option.value === this.value }, option.label)))), h("svg", { key: 'bb3165c856d11b352b2c7a64cc12ab4284541fb4', class: "chevron", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("polyline", { key: 'ab5e3cb2419dc63fbcd3804740b781c856ae8240', points: "6 9 12 15 18 9" })))));
16
+ return (h(Host, { key: 'a1abda48256851c19e13b1516c9789ff270fd55f' }, h("div", { key: '9556917c11784833418565b305b814e176b4ce22', class: "wrapper" }, h("select", { key: '6f724cd6c5c83d841839c1a13b8e1f74720edd57', class: "select", name: this.name, disabled: this.disabled, onChange: this.onChange }, this.placeholder && (h("option", { key: '2b70163c4f64850d05f8194b310041bc32d18930', value: "", disabled: true, selected: !hasValue }, this.placeholder)), this.options.map((option) => (h("option", { value: option.value, selected: option.value === this.value }, option.label)))), h("svg", { key: '748cda678998b6739fc56aaa7df36964a37a0f12', class: "chevron", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("polyline", { key: '957613dc5eeb6471f4dfc1cc4e8203c90d291cdb', points: "6 9 12 15 18 9" })))));
17
17
  }
18
18
  static get is() { return "ui-select"; }
19
19
  static get encapsulation() { return "shadow"; }
@@ -5,7 +5,7 @@ export class UiSeparator {
5
5
  this.orientation = "horizontal";
6
6
  }
7
7
  render() {
8
- return (h(Host, { key: '33e452485ff7838e37a378f9acba10f242069cfc', role: "separator", "aria-orientation": this.orientation, class: `orientation-${this.orientation}` }));
8
+ return (h(Host, { key: '64211b51121d5c090a1f7e3feb88e7c076dc5b7b', role: "separator", "aria-orientation": this.orientation, class: `orientation-${this.orientation}` }));
9
9
  }
10
10
  static get is() { return "ui-separator"; }
11
11
  static get encapsulation() { return "shadow"; }
@@ -1,7 +1,7 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  export class UiSkeleton {
3
3
  render() {
4
- return (h(Host, { key: '8f839817a493a8221e9d3b2e95fd7ae5ece2e70e' }, h("span", { key: '295dce8e9e6489def8b20a703f04c65ad3740ce8', class: "skeleton" })));
4
+ return (h(Host, { key: 'b8c2b1288e037ec55d582d07a6f9d83ad63789b4' }, h("span", { key: '3a939a4d6ab7ce5791bd3ffb7210743ad68e0db8', class: "skeleton" })));
5
5
  }
6
6
  static get is() { return "ui-skeleton"; }
7
7
  static get encapsulation() { return "shadow"; }
@@ -21,7 +21,7 @@ export class UiSlider {
21
21
  };
22
22
  }
23
23
  render() {
24
- return (h(Host, { key: '22fe57f0e95edb2e169718c8b1fb5c2f3d78ddfe' }, h("input", { key: 'a9e16ef8f97f412c22911f72c4b7212f6d04a293', class: "slider", type: "range", min: this.min, max: this.max, step: this.step, value: this.value, disabled: this.disabled, onInput: this.onInput, onChange: this.onChange })));
24
+ return (h(Host, { key: 'eeb569c6927ebcda5c1702c8bdbade3e15ede9c2' }, h("input", { key: '1fd45574a52ed9d857941c870650995f092283f8', class: "slider", type: "range", min: this.min, max: this.max, step: this.step, value: this.value, disabled: this.disabled, onInput: this.onInput, onChange: this.onChange })));
25
25
  }
26
26
  static get is() { return "ui-slider"; }
27
27
  static get encapsulation() { return "shadow"; }
@@ -5,7 +5,7 @@ export class UiSpinner {
5
5
  this.size = "md";
6
6
  }
7
7
  render() {
8
- return (h(Host, { key: '0414d6e3be8588ad4c71c5e4cf227075ac7494ab', role: "status" }, h("span", { key: '61e5d0a16b5fd566767ef098477c3144a9c1c987', class: { spinner: true, [`size-${this.size}`]: true } }), h("span", { key: 'ea33b6e6603ba23e7a117ef978329c83818a044b', class: "sr-only" }, "Carregando")));
8
+ return (h(Host, { key: '3ce50c4de9703a057c0971fbaa71f6535a30c196', role: "status" }, h("span", { key: '83aba34de038600be6535662d7243489d4db79f1', class: { spinner: true, [`size-${this.size}`]: true } }), h("span", { key: 'ff7523e8ab8e073dea03314b72c93aaf566fa32e', class: "sr-only" }, "Carregando")));
9
9
  }
10
10
  static get is() { return "ui-spinner"; }
11
11
  static get encapsulation() { return "shadow"; }
@@ -39,7 +39,7 @@ export class UiStack {
39
39
  justifyContent: JUSTIFY[this.justify],
40
40
  flexWrap: this.wrap ? "wrap" : "nowrap",
41
41
  };
42
- return (h(Host, { key: 'ba9547e72877aa05a5e93afbe098d7402b315df3' }, h("div", { key: 'e0fd73777e2211925435f2fd8bfcb74ad2eb8085', class: "stack", style: style }, h("slot", { key: '3a5aa50721c641f0cc81328a21262ff5d375e55c' }))));
42
+ return (h(Host, { key: 'f10c42228c323efa8c5ded4e8ca552e38d1ef923' }, h("div", { key: 'c296191b05e5ad4e9fdec382808b24b6e798867d', class: "stack", style: style }, h("slot", { key: '8cc418111a0833cf404e0578e81c23f9aaa69fda' }))));
43
43
  }
44
44
  static get is() { return "ui-stack"; }
45
45
  static get encapsulation() { return "shadow"; }
@@ -14,7 +14,7 @@ export class UiStat {
14
14
  return null;
15
15
  }
16
16
  render() {
17
- return (h(Host, { key: '7afc03397921ff23d08da136999896a40d8a31be' }, h("div", { key: '35a7d594e9ebb426f10ff256ba4805ee88a0100c', class: "card" }, h("p", { key: '92a82cf415c22f884ed782d410e25559ff391017', class: "label" }, this.label), h("div", { key: '1c8d08800ca0a6f38e574930c5187ec979666a62', class: "value-row" }, h("span", { key: '0bb5e825e9d51a045638f48616c24bdc7a4a0ee0', class: "value" }, this.value), this.delta && (h("span", { key: '01aa434582c8eee2c1fd6b69c16de0262fb89daf', class: { delta: true, [`trend-${this.trend}`]: true } }, this.renderArrow(), this.delta))), h("div", { key: '4446e15c156412cc8b6c72f823a49396f31e8e74', class: "extra" }, h("slot", { key: 'ca4e0cc60f588840d3fd88e3efaecabb84cd633d' })))));
17
+ return (h(Host, { key: 'd4d0f5f87e9049b60b849afa096438bb5defa710' }, h("div", { key: '9dbd07ca51110a52ea852894401b0908b4cf7d30', class: "card" }, h("p", { key: '41e30e19f7ca5d26df13381e34a6c6a87ca530ce', class: "label" }, this.label), h("div", { key: '40c72d2e2bda9fb9017a52eec04737c673910ea3', class: "value-row" }, h("span", { key: 'b217030e5603cd2c0e0a99913461e83047a73378', class: "value" }, this.value), this.delta && (h("span", { key: 'df0a67ef011043f334512a43c1a6fb1ac9bb6978', class: { delta: true, [`trend-${this.trend}`]: true } }, this.renderArrow(), this.delta))), h("div", { key: '3e4fb6a69cf7b22d2a1f60f28f5f5747f900165a', class: "extra" }, h("slot", { key: '97237fcf1fc5c46a30426728c0f240cab4808541' })))));
18
18
  }
19
19
  static get is() { return "ui-stat"; }
20
20
  static get encapsulation() { return "shadow"; }
@@ -19,7 +19,7 @@ export class UiSwitch {
19
19
  };
20
20
  }
21
21
  render() {
22
- return (h(Host, { key: '018ccd47d567e5c16ce40a600c15a9e2281301d2' }, h("button", { key: '7975d671d3c6d048b760b285a68e9ae832c93ebc', class: "switch", type: "button", role: "switch", "aria-checked": this.checked ? "true" : "false", disabled: this.disabled, onClick: this.toggle, onKeyDown: this.onKeyDown }, h("span", { key: '4ac740348a215ff97e0cae3bbbbd411163760792', class: "thumb" }))));
22
+ return (h(Host, { key: '428fb05e4d51811bca60b1e3513c38002bcdd6f7' }, h("button", { key: '39192341845fd5877a6a73f3c7ef8257a526601e', class: "switch", type: "button", role: "switch", "aria-checked": this.checked ? "true" : "false", disabled: this.disabled, onClick: this.toggle, onKeyDown: this.onKeyDown }, h("span", { key: '51fa9f37d6e7083e8aaf4de69e234dbb56bc4c8b', class: "thumb" }))));
23
23
  }
24
24
  static get is() { return "ui-switch"; }
25
25
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,46 @@
1
+ :host {
2
+ display: block;
3
+ }
4
+
5
+ .wrapper {
6
+ overflow: hidden;
7
+ border: 1px solid var(--ui-border);
8
+ background: var(--ui-panel);
9
+ box-shadow: var(--ui-shadow-lg);
10
+ backdrop-filter: blur(22px) saturate(140%);
11
+ border-radius: var(--ui-radius-lg);
12
+ font-family: var(--ui-font-sans);
13
+ }
14
+
15
+ .table {
16
+ width: 100%;
17
+ border-collapse: collapse;
18
+ }
19
+
20
+ .table thead th {
21
+ padding: 0.75rem 1rem;
22
+ font-size: 0.7rem;
23
+ font-weight: 600;
24
+ text-transform: uppercase;
25
+ letter-spacing: 0.05em;
26
+ color: var(--ui-text-faint);
27
+ background: var(--ui-chip);
28
+ }
29
+
30
+ .table tbody td {
31
+ padding: 0.75rem 1rem;
32
+ font-size: 0.875rem;
33
+ color: var(--ui-text-soft);
34
+ }
35
+
36
+ .table tbody tr {
37
+ border-top: 1px solid var(--ui-border);
38
+ }
39
+
40
+ .table.striped tbody tr:nth-child(even) {
41
+ background: color-mix(in srgb, var(--ui-chip) 50%, transparent);
42
+ }
43
+
44
+ .table.hoverable tbody tr:hover {
45
+ background: var(--ui-chip);
46
+ }
@@ -0,0 +1,119 @@
1
+ import { h, Host } from "@stencil/core";
2
+ export class UiTable {
3
+ constructor() {
4
+ /** Definição das colunas. */
5
+ this.columns = [];
6
+ /** Linhas de dados. */
7
+ this.rows = [];
8
+ /** Aplica fundo alternado nas linhas pares. */
9
+ this.striped = false;
10
+ /** Destaca a linha sob o cursor. */
11
+ this.hoverable = true;
12
+ }
13
+ render() {
14
+ return (h(Host, { key: 'e62b59e8da83f4b9f0c3d622623bbe216d3cfb8f' }, h("div", { key: 'e46a0eeeedaa9efa10867a9e38a03514a6d23d0b', class: "wrapper" }, h("table", { key: 'fe0a34ee49101b57d74e0e2ad765861bf5e3509e', class: { table: true, striped: this.striped, hoverable: this.hoverable } }, h("thead", { key: '0ea948edf967524a5fc55df8bdc453a3fd6a58a4' }, h("tr", { key: '69d9be2deeb57d4811ebdb8714d0713d675c8c1e' }, this.columns.map((column) => (h("th", { key: column.key, style: { textAlign: column.align ?? "left" } }, column.label))))), h("tbody", { key: '4b0fa5fbc25f6f0952da9a85bd03289f24ffdf9a' }, this.rows.map((row, rowIndex) => (h("tr", { key: rowIndex }, this.columns.map((column) => (h("td", { key: column.key, style: { textAlign: column.align ?? "left" } }, String(row[column.key] ?? ""))))))))))));
15
+ }
16
+ static get is() { return "ui-table"; }
17
+ static get encapsulation() { return "shadow"; }
18
+ static get originalStyleUrls() {
19
+ return {
20
+ "$": ["ui-table.css"]
21
+ };
22
+ }
23
+ static get styleUrls() {
24
+ return {
25
+ "$": ["ui-table.css"]
26
+ };
27
+ }
28
+ static get properties() {
29
+ return {
30
+ "columns": {
31
+ "type": "unknown",
32
+ "mutable": false,
33
+ "complexType": {
34
+ "original": "UiTableColumn[]",
35
+ "resolved": "UiTableColumn[]",
36
+ "references": {
37
+ "UiTableColumn": {
38
+ "location": "local",
39
+ "path": "/Users/andersonespindola/.ghq/github.com/andersonflima/ui/packages/core/src/components/ui-table/ui-table.tsx",
40
+ "id": "src/components/ui-table/ui-table.tsx::UiTableColumn"
41
+ }
42
+ }
43
+ },
44
+ "required": false,
45
+ "optional": false,
46
+ "docs": {
47
+ "tags": [],
48
+ "text": "Defini\u00E7\u00E3o das colunas."
49
+ },
50
+ "getter": false,
51
+ "setter": false,
52
+ "defaultValue": "[]"
53
+ },
54
+ "rows": {
55
+ "type": "unknown",
56
+ "mutable": false,
57
+ "complexType": {
58
+ "original": "Record<string, unknown>[]",
59
+ "resolved": "Record<string, unknown>[]",
60
+ "references": {
61
+ "Record": {
62
+ "location": "global",
63
+ "id": "global::Record"
64
+ }
65
+ }
66
+ },
67
+ "required": false,
68
+ "optional": false,
69
+ "docs": {
70
+ "tags": [],
71
+ "text": "Linhas de dados."
72
+ },
73
+ "getter": false,
74
+ "setter": false,
75
+ "defaultValue": "[]"
76
+ },
77
+ "striped": {
78
+ "type": "boolean",
79
+ "mutable": false,
80
+ "complexType": {
81
+ "original": "boolean",
82
+ "resolved": "boolean",
83
+ "references": {}
84
+ },
85
+ "required": false,
86
+ "optional": false,
87
+ "docs": {
88
+ "tags": [],
89
+ "text": "Aplica fundo alternado nas linhas pares."
90
+ },
91
+ "getter": false,
92
+ "setter": false,
93
+ "reflect": false,
94
+ "attribute": "striped",
95
+ "defaultValue": "false"
96
+ },
97
+ "hoverable": {
98
+ "type": "boolean",
99
+ "mutable": false,
100
+ "complexType": {
101
+ "original": "boolean",
102
+ "resolved": "boolean",
103
+ "references": {}
104
+ },
105
+ "required": false,
106
+ "optional": false,
107
+ "docs": {
108
+ "tags": [],
109
+ "text": "Destaca a linha sob o cursor."
110
+ },
111
+ "getter": false,
112
+ "setter": false,
113
+ "reflect": false,
114
+ "attribute": "hoverable",
115
+ "defaultValue": "true"
116
+ }
117
+ };
118
+ }
119
+ }
@@ -13,10 +13,10 @@ export class UiTabs {
13
13
  };
14
14
  }
15
15
  render() {
16
- return (h(Host, { key: 'fc0926743b6a547c13660f574fc56abefc6e6c2e' }, h("div", { key: 'a1582c6234e1faaa5cb6b563a51ecf2192a88d40', class: "tablist", role: "tablist" }, this.items.map((item) => {
16
+ return (h(Host, { key: '498d6b8302e63ed96533c7d68f4ac00c06b513cb' }, h("div", { key: '20699e632c2596a7157dd69e0f77b7db75b8b40e', class: "tablist", role: "tablist" }, this.items.map((item) => {
17
17
  const active = item.value === this.value;
18
18
  return (h("button", { key: item.value, class: { tab: true, active }, type: "button", role: "tab", "aria-selected": active ? "true" : "false", onClick: () => this.select(item.value) }, item.label));
19
- })), h("div", { key: '5d9b8d61e8005b7e6baa216ffd571f7b9403acd5', class: "panel", role: "tabpanel" }, h("slot", { key: '8ba0cf22e6e837f038c2ec7fad8d533287325119', name: this.value }))));
19
+ })), h("div", { key: 'd4d5577f928378d8e400779954831fd5f6416c04', class: "panel", role: "tabpanel" }, h("slot", { key: '77e86a40c41666945704a560222edd22cd92443f', name: this.value }))));
20
20
  }
21
21
  static get is() { return "ui-tabs"; }
22
22
  static get encapsulation() { return "shadow"; }
@@ -19,7 +19,7 @@ export class UiTextarea {
19
19
  };
20
20
  }
21
21
  render() {
22
- return (h(Host, { key: 'ba1b88ab3fa990a903e6d61f31fbbade7b58eb27' }, h("textarea", { key: 'f9ac9e1aff98e94b3562b812cef34fcc138cd350', class: { textarea: true, invalid: this.invalid }, name: this.name, rows: this.rows, placeholder: this.placeholder, disabled: this.disabled, "aria-invalid": this.invalid ? "true" : null, onInput: this.onInput, onChange: this.onChange }, this.value)));
22
+ return (h(Host, { key: '4134da9c40b56d7a690aacf84f285d32c76e0e97' }, h("textarea", { key: 'ed094856a7982bb44cc2a6b756daf5ee12f57c01', class: { textarea: true, invalid: this.invalid }, name: this.name, rows: this.rows, placeholder: this.placeholder, disabled: this.disabled, "aria-invalid": this.invalid ? "true" : null, onInput: this.onInput, onChange: this.onChange }, this.value)));
23
23
  }
24
24
  static get is() { return "ui-textarea"; }
25
25
  static get encapsulation() { return "shadow"; }
@@ -50,7 +50,7 @@ export class UiThemeToggle {
50
50
  return (h("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("circle", { cx: "12", cy: "12", r: "4" }), h("line", { x1: "12", y1: "2", x2: "12", y2: "4" }), h("line", { x1: "12", y1: "20", x2: "12", y2: "22" }), h("line", { x1: "2", y1: "12", x2: "4", y2: "12" }), h("line", { x1: "20", y1: "12", x2: "22", y2: "12" }), h("line", { x1: "4.93", y1: "4.93", x2: "6.34", y2: "6.34" }), h("line", { x1: "17.66", y1: "17.66", x2: "19.07", y2: "19.07" }), h("line", { x1: "4.93", y1: "19.07", x2: "6.34", y2: "17.66" }), h("line", { x1: "17.66", y1: "6.34", x2: "19.07", y2: "4.93" })));
51
51
  }
52
52
  render() {
53
- return (h(Host, { key: 'da51d59a9d5b28dec214d4fe63f5cebf78d80a51' }, h("button", { key: '55436252c82f49628c4b0394905623bc5a78dc00', class: "toggle", type: "button", "aria-label": this.isDark ? "Ativar tema claro" : "Ativar tema escuro", "aria-pressed": this.isDark ? "true" : "false", onClick: this.toggle }, this.renderIcon())));
53
+ return (h(Host, { key: 'a654dba08923ee4ede01577964a9c1ae00152eeb' }, h("button", { key: '84477ec9d4693aa93457fb6564ceae1ab2c3516b', class: "toggle", type: "button", "aria-label": this.isDark ? "Ativar tema claro" : "Ativar tema escuro", "aria-pressed": this.isDark ? "true" : "false", onClick: this.toggle }, this.renderIcon())));
54
54
  }
55
55
  static get is() { return "ui-theme-toggle"; }
56
56
  static get encapsulation() { return "shadow"; }
@@ -47,7 +47,7 @@ export class UiToast {
47
47
  this.dismiss();
48
48
  }
49
49
  render() {
50
- return (h(Host, { key: '79bd3e7ed207efd5ff62f5296ab11a06993ce347' }, this.open && (h("div", { key: '15a138288380473dff3ff1880e3298e211377339', class: { toast: true, [`variant-${this.variant}`]: true }, role: "status" }, h("div", { key: '33adfee858ddfd37f144b34f8677f312b89c04f3', class: "body" }, this.heading && h("p", { key: 'a56d837636f27897f06a8d693f28763b4bc95db6', class: "heading" }, this.heading), this.description && (h("p", { key: '7c86fb20c84c42e3c5e3262cc91061e9a80804aa', class: "description" }, this.description))), h("button", { key: '4d8160818b76b65c29a27e4404c39a7525441a72', class: "close", type: "button", "aria-label": "Fechar", onClick: () => this.dismiss() }, h("svg", { key: 'ce7ee6982cc1d742b4d4de8573ca11d18166c814', width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("line", { key: 'c8440dbbb12ce67dd30a052aef92bc736a4532f9', x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { key: '9ee2d2ec78efa7566e63feb337e346a5574ccf55', x1: "6", y1: "6", x2: "18", y2: "18" })))))));
50
+ return (h(Host, { key: '21a97579800abf5e870eec28557e06165b96d404' }, this.open && (h("div", { key: 'e77a782182779213db337796c83eff1d0cf5d5c2', class: { toast: true, [`variant-${this.variant}`]: true }, role: "status" }, h("div", { key: '0d6c35786aa00e5f6678e33944df564f1ad8edec', class: "body" }, this.heading && h("p", { key: '1b91fe3a120c8caf7ba614d1d658121d77b52be5', class: "heading" }, this.heading), this.description && (h("p", { key: 'dff799cd6f2c4fd62fa716538a9de375ee1f49af', class: "description" }, this.description))), h("button", { key: 'c30f977f65a960b4062965ac77b2e3ac9d09dc8a', class: "close", type: "button", "aria-label": "Fechar", onClick: () => this.dismiss() }, h("svg", { key: 'ae2d9a2fab756ce67c5a7379bb3a4f93fec4222f', width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("line", { key: '29972be7ff1556a629365956f39c7c0bfe85d512', x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { key: '59087f986b5dd641be586d04b4aa70f1a09dcfe3', x1: "6", y1: "6", x2: "18", y2: "18" })))))));
51
51
  }
52
52
  static get is() { return "ui-toast"; }
53
53
  static get encapsulation() { return "shadow"; }
@@ -15,7 +15,7 @@ export class UiToaster {
15
15
  this.items = this.items.filter((item) => item.id !== id);
16
16
  }
17
17
  render() {
18
- return (h(Host, { key: 'eb3198a053270b41c8b632b91135987f04735ac5' }, h("div", { key: 'd37bf3710646977e7db39690f221e76360c43aee', class: "container" }, this.items.map((item) => (h("ui-toast", { key: item.id, open: true, heading: item.heading, description: item.description, variant: item.variant ?? "default", duration: item.duration ?? 4000, onUiClose: () => this.remove(item.id) }))))));
18
+ return (h(Host, { key: '608a15f7a5805eb336aeb5eed46fc7ca9f7ef32e' }, h("div", { key: 'ebf5b3f7cdafa526fe0845d3025bf10579beb848', class: "container" }, this.items.map((item) => (h("ui-toast", { key: item.id, open: true, heading: item.heading, description: item.description, variant: item.variant ?? "default", duration: item.duration ?? 4000, onUiClose: () => this.remove(item.id) }))))));
19
19
  }
20
20
  static get is() { return "ui-toaster"; }
21
21
  static get encapsulation() { return "shadow"; }
@@ -49,7 +49,7 @@ export class UiTooltip {
49
49
  this.cleanup = undefined;
50
50
  }
51
51
  render() {
52
- return (h(Host, { key: '5e20fbcdd1ae94f29596938ab465a863b46ed65b', onMouseEnter: this.onEnter, onMouseLeave: this.onLeave, onFocusin: this.onEnter, onFocusout: this.onLeave }, h("span", { key: '5f4e8b75930fee583f37f1977473c60f6e681ee6', class: "trigger", ref: (el) => (this.triggerEl = el) }, h("slot", { key: 'eae9e842023fe1e4589d2af1889c6e6753bc9010' })), h("div", { key: 'dc815b28e5d1dfbd91a970ce50b77fc8ecd3f5ab', class: { tooltip: true, "is-visible": this.visible }, role: "tooltip", ref: (el) => (this.floatingEl = el) }, this.content)));
52
+ return (h(Host, { key: '401cfeba060afec776fd2455ab597f5591733566', onMouseEnter: this.onEnter, onMouseLeave: this.onLeave, onFocusin: this.onEnter, onFocusout: this.onLeave }, h("span", { key: '6ee621aefa5092194d3e1c3dabf5a33501421c6c', class: "trigger", ref: (el) => (this.triggerEl = el) }, h("slot", { key: '771078940a2c4e17ecf30dc39f6e0f0c90691b5e' })), h("div", { key: '263d4868a251cab4f302a8fe1d890a419f4158d1', class: { tooltip: true, "is-visible": this.visible }, role: "tooltip", ref: (el) => (this.floatingEl = el) }, this.content)));
53
53
  }
54
54
  static get is() { return "ui-tooltip"; }
55
55
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- import{t as e,p as t,H as a,c as i,h as r,a as s}from"./index.js";const o=t(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.uiClose=i(this,"uiClose"),this.open=!1,this.variant="default",this.duration=4e3}onOpenChange(e){e?this.startTimer():this.clearTimer()}componentDidLoad(){this.open&&this.startTimer()}disconnectedCallback(){this.clearTimer()}startTimer(){this.clearTimer(),this.duration>0&&(this.timer=setTimeout((()=>this.dismiss()),this.duration))}clearTimer(){this.timer&&(clearTimeout(this.timer),this.timer=void 0)}dismiss(){this.clearTimer(),this.open=!1,this.uiClose.emit()}async show(){this.open=!0}async close(){this.dismiss()}render(){return r(s,{key:"79bd3e7ed207efd5ff62f5296ab11a06993ce347"},this.open&&r("div",{key:"15a138288380473dff3ff1880e3298e211377339",class:{toast:!0,[`variant-${this.variant}`]:!0},role:"status"},r("div",{key:"33adfee858ddfd37f144b34f8677f312b89c04f3",class:"body"},this.heading&&r("p",{key:"a56d837636f27897f06a8d693f28763b4bc95db6",class:"heading"},this.heading),this.description&&r("p",{key:"7c86fb20c84c42e3c5e3262cc91061e9a80804aa",class:"description"},this.description)),r("button",{key:"4d8160818b76b65c29a27e4404c39a7525441a72",class:"close",type:"button","aria-label":"Fechar",onClick:()=>this.dismiss()},r("svg",{key:"ce7ee6982cc1d742b4d4de8573ca11d18166c814",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},r("line",{key:"c8440dbbb12ce67dd30a052aef92bc736a4532f9",x1:"18",y1:"6",x2:"6",y2:"18"}),r("line",{key:"9ee2d2ec78efa7566e63feb337e346a5574ccf55",x1:"6",y1:"6",x2:"18",y2:"18"})))))}static get watchers(){return{open:[{onOpenChange:0}]}}static get style(){return":host{display:block}.toast{display:flex;align-items:flex-start;gap:0.75rem;padding:0.875rem 1rem;border:1px solid var(--ui-border);border-left:3px solid var(--ui-accent);border-radius:var(--ui-radius);background:var(--ui-panel-strong);backdrop-filter:blur(22px);box-shadow:var(--ui-shadow-lg);font-family:var(--ui-font-sans);animation:ui-toast-pop var(--ui-duration) var(--ui-ease)}.variant-default{border-left-color:var(--ui-accent)}.variant-success{border-left-color:var(--ui-success)}.variant-warning{border-left-color:var(--ui-warning)}.variant-danger{border-left-color:var(--ui-danger)}.body{flex:1;min-width:0;display:flex;flex-direction:column;gap:0.25rem}.heading{margin:0;font-size:0.875rem;font-weight:600;color:var(--ui-foreground)}.description{margin:0;font-size:0.8125rem;color:var(--ui-text-muted)}.close{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:0.125rem;border:none;background:transparent;color:var(--ui-text-muted);cursor:pointer;border-radius:var(--ui-radius-sm);transition:color var(--ui-duration) var(--ui-ease)}.close:hover{color:var(--ui-foreground)}@keyframes ui-toast-pop{from{opacity:0;transform:translateY(0.5rem) scale(0.98)}to{opacity:1;transform:translateY(0) scale(1)}}"}},[1,"ui-toast",{open:[1540],variant:[1],heading:[1],description:[1],duration:[2],show:[64],close:[64]},void 0,{open:[{onOpenChange:0}]}]);function n(){"undefined"!=typeof customElements&&["ui-toast"].forEach((t=>{"ui-toast"===t&&(customElements.get(e(t))||customElements.define(e(t),o))}))}n();export{o as U,n as d}
1
+ import{t as e,p as t,H as a,c as i,h as r,a as s}from"./index.js";const o=t(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.uiClose=i(this,"uiClose"),this.open=!1,this.variant="default",this.duration=4e3}onOpenChange(e){e?this.startTimer():this.clearTimer()}componentDidLoad(){this.open&&this.startTimer()}disconnectedCallback(){this.clearTimer()}startTimer(){this.clearTimer(),this.duration>0&&(this.timer=setTimeout((()=>this.dismiss()),this.duration))}clearTimer(){this.timer&&(clearTimeout(this.timer),this.timer=void 0)}dismiss(){this.clearTimer(),this.open=!1,this.uiClose.emit()}async show(){this.open=!0}async close(){this.dismiss()}render(){return r(s,{key:"21a97579800abf5e870eec28557e06165b96d404"},this.open&&r("div",{key:"e77a782182779213db337796c83eff1d0cf5d5c2",class:{toast:!0,[`variant-${this.variant}`]:!0},role:"status"},r("div",{key:"0d6c35786aa00e5f6678e33944df564f1ad8edec",class:"body"},this.heading&&r("p",{key:"1b91fe3a120c8caf7ba614d1d658121d77b52be5",class:"heading"},this.heading),this.description&&r("p",{key:"dff799cd6f2c4fd62fa716538a9de375ee1f49af",class:"description"},this.description)),r("button",{key:"c30f977f65a960b4062965ac77b2e3ac9d09dc8a",class:"close",type:"button","aria-label":"Fechar",onClick:()=>this.dismiss()},r("svg",{key:"ae2d9a2fab756ce67c5a7379bb3a4f93fec4222f",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},r("line",{key:"29972be7ff1556a629365956f39c7c0bfe85d512",x1:"18",y1:"6",x2:"6",y2:"18"}),r("line",{key:"59087f986b5dd641be586d04b4aa70f1a09dcfe3",x1:"6",y1:"6",x2:"18",y2:"18"})))))}static get watchers(){return{open:[{onOpenChange:0}]}}static get style(){return":host{display:block}.toast{display:flex;align-items:flex-start;gap:0.75rem;padding:0.875rem 1rem;border:1px solid var(--ui-border);border-left:3px solid var(--ui-accent);border-radius:var(--ui-radius);background:var(--ui-panel-strong);backdrop-filter:blur(22px);box-shadow:var(--ui-shadow-lg);font-family:var(--ui-font-sans);animation:ui-toast-pop var(--ui-duration) var(--ui-ease)}.variant-default{border-left-color:var(--ui-accent)}.variant-success{border-left-color:var(--ui-success)}.variant-warning{border-left-color:var(--ui-warning)}.variant-danger{border-left-color:var(--ui-danger)}.body{flex:1;min-width:0;display:flex;flex-direction:column;gap:0.25rem}.heading{margin:0;font-size:0.875rem;font-weight:600;color:var(--ui-foreground)}.description{margin:0;font-size:0.8125rem;color:var(--ui-text-muted)}.close{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:0.125rem;border:none;background:transparent;color:var(--ui-text-muted);cursor:pointer;border-radius:var(--ui-radius-sm);transition:color var(--ui-duration) var(--ui-ease)}.close:hover{color:var(--ui-foreground)}@keyframes ui-toast-pop{from{opacity:0;transform:translateY(0.5rem) scale(0.98)}to{opacity:1;transform:translateY(0) scale(1)}}"}},[1,"ui-toast",{open:[1540],variant:[1],heading:[1],description:[1],duration:[2],show:[64],close:[64]},void 0,{open:[{onOpenChange:0}]}]);function n(){"undefined"!=typeof customElements&&["ui-toast"].forEach((t=>{"ui-toast"===t&&(customElements.get(e(t))||customElements.define(e(t),o))}))}n();export{o as U,n as d}
@@ -1 +1 @@
1
- const t=Math.min,n=Math.max,e=Math.round,o=Math.floor,r=t=>({x:t,y:t}),i={left:"right",right:"left",bottom:"top",top:"bottom"};function c(e,o,r){return n(e,t(o,r))}function l(t,n){return"function"==typeof t?t(n):t}function a(t){return t.split("-")[0]}function s(t){return t.split("-")[1]}function u(t){return"x"===t?"y":"x"}function f(t){return"y"===t?"height":"width"}function d(t){const n=t[0];return"t"===n||"b"===n?"y":"x"}function m(t){return u(d(t))}function y(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const h=["left","right"],p=["right","left"],x=["top","bottom"],w=["bottom","top"];function g(t){const n=a(t);return i[n]+t.slice(n.length)}function v(t){const{x:n,y:e,width:o,height:r}=t;return{width:o,height:r,top:e,left:n,right:n+o,bottom:e+r,x:n,y:e}}function b(t,n,e){let{reference:o,floating:r}=t;const i=d(n),c=m(n),l=f(c),u=a(n),y="y"===i,h=o.x+o.width/2-r.width/2,p=o.y+o.height/2-r.height/2,x=o[l]/2-r[l]/2;let w;switch(u){case"top":w={x:h,y:o.y-r.height};break;case"bottom":w={x:h,y:o.y+o.height};break;case"right":w={x:o.x+o.width,y:p};break;case"left":w={x:o.x-r.width,y:p};break;default:w={x:o.x,y:o.y}}switch(s(n)){case"start":w[c]-=x*(e&&y?-1:1);break;case"end":w[c]+=x*(e&&y?-1:1)}return w}async function A(t,n){var e;void 0===n&&(n={});const{x:o,y:r,platform:i,rects:c,elements:a,strategy:s}=t,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:m=!1,padding:y=0}=l(n,t),h=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(y),p=a[m?"floating"===d?"reference":"floating":d],x=v(await i.getClippingRect({element:null==(e=await(null==i.isElement?void 0:i.isElement(p)))||e?p:p.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:s})),w="floating"===d?{x:o,y:r,width:c.floating.width,height:c.floating.height}:c.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},A=v(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:g,strategy:s}):w);return{top:(x.top-A.top+h.top)/b.y,bottom:(A.bottom-x.bottom+h.bottom)/b.y,left:(x.left-A.left+h.left)/b.x,right:(A.right-x.right+h.right)/b.x}}const S=new Set(["left","top"]);function R(){return"undefined"!=typeof window}function F(t){return O(t)?(t.nodeName||"").toLowerCase():"#document"}function k(t){var n;return(null==t||null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function C(t){var n;return null==(n=(O(t)?t.ownerDocument:t.document)||window.document)?void 0:n.documentElement}function O(t){return!!R()&&(t instanceof Node||t instanceof k(t).Node)}function T(t){return!!R()&&(t instanceof Element||t instanceof k(t).Element)}function M(t){return!!R()&&(t instanceof HTMLElement||t instanceof k(t).HTMLElement)}function P(t){return!(!R()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof k(t).ShadowRoot)}function D(t){const{overflow:n,overflowX:e,overflowY:o,display:r}=H(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&"inline"!==r&&"contents"!==r}function z(t){return/^(table|td|th)$/.test(F(t))}function L(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const E=/transform|translate|scale|rotate|perspective|filter/,B=/paint|layout|strict|content/,$=t=>!!t&&"none"!==t;let I;function N(t){const n=T(t)?H(t):t;return $(n.transform)||$(n.translate)||$(n.scale)||$(n.rotate)||$(n.perspective)||!j()&&($(n.backdropFilter)||$(n.filter))||E.test(n.willChange||"")||B.test(n.contain||"")}function j(){return null==I&&(I="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),I}function q(t){return/^(html|body|#document)$/.test(F(t))}function H(t){return k(t).getComputedStyle(t)}function V(t){return T(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function X(t){if("html"===F(t))return t;const n=t.assignedSlot||t.parentNode||P(t)&&t.host||C(t);return P(n)?n.host:n}function Y(t){const n=X(t);return q(n)?t.ownerDocument?t.ownerDocument.body:t.body:M(n)&&D(n)?n:Y(n)}function _(t,n,e){var o;void 0===n&&(n=[]),void 0===e&&(e=!0);const r=Y(t),i=r===(null==(o=t.ownerDocument)?void 0:o.body),c=k(r);if(i){const t=G(c);return n.concat(c,c.visualViewport||[],D(r)?r:[],t&&e?_(t):[])}return n.concat(r,_(r,[],e))}function G(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function J(t){const n=H(t);let o=parseFloat(n.width)||0,r=parseFloat(n.height)||0;const i=M(t),c=i?t.offsetWidth:o,l=i?t.offsetHeight:r,a=e(o)!==c||e(r)!==l;return a&&(o=c,r=l),{width:o,height:r,$:a}}function K(t){return T(t)?t:t.contextElement}function Q(t){const n=K(t);if(!M(n))return r(1);const o=n.getBoundingClientRect(),{width:i,height:c,$:l}=J(n);let a=(l?e(o.width):o.width)/i,s=(l?e(o.height):o.height)/c;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const U=r(0);function W(t){const n=k(t);return j()&&n.visualViewport?{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}:U}function Z(t,n,e,o){void 0===n&&(n=!1),void 0===e&&(e=!1);const i=t.getBoundingClientRect(),c=K(t);let l=r(1);n&&(o?T(o)&&(l=Q(o)):l=Q(t));const a=function(t,n,e){return void 0===n&&(n=!1),!(!e||n&&e!==k(t))&&n}(c,e,o)?W(c):r(0);let s=(i.left+a.x)/l.x,u=(i.top+a.y)/l.y,f=i.width/l.x,d=i.height/l.y;if(c){const t=k(c),n=o&&T(o)?k(o):o;let e=t,r=G(e);for(;r&&o&&n!==e;){const t=Q(r),n=r.getBoundingClientRect(),o=H(r),i=n.left+(r.clientLeft+parseFloat(o.paddingLeft))*t.x,c=n.top+(r.clientTop+parseFloat(o.paddingTop))*t.y;s*=t.x,u*=t.y,f*=t.x,d*=t.y,s+=i,u+=c,e=k(r),r=G(e)}}return v({width:f,height:d,x:s,y:u})}function tt(t,n){const e=V(t).scrollLeft;return n?n.left+e:Z(C(t)).left+e}function nt(t,n){const e=t.getBoundingClientRect();return{x:e.left+n.scrollLeft-tt(t,e),y:e.top+n.scrollTop}}function et(t,e,o){let i;if("viewport"===e)i=function(t,n){const e=k(t),o=C(t),r=e.visualViewport;let i=o.clientWidth,c=o.clientHeight,l=0,a=0;if(r){i=r.width,c=r.height;const t=j();(!t||t&&"fixed"===n)&&(l=r.offsetLeft,a=r.offsetTop)}const s=tt(o);if(s<=0){const t=o.ownerDocument,n=t.body,e=getComputedStyle(n),r="CSS1Compat"===t.compatMode&&parseFloat(e.marginLeft)+parseFloat(e.marginRight)||0,c=Math.abs(o.clientWidth-n.clientWidth-r);c<=25&&(i-=c)}else s<=25&&(i+=s);return{width:i,height:c,x:l,y:a}}(t,o);else if("document"===e)i=function(t){const e=C(t),o=V(t),r=t.ownerDocument.body,i=n(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),c=n(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let l=-o.scrollLeft+tt(t);const a=-o.scrollTop;return"rtl"===H(r).direction&&(l+=n(e.clientWidth,r.clientWidth)-i),{width:i,height:c,x:l,y:a}}(C(t));else if(T(e))i=function(t,n){const e=Z(t,!0,"fixed"===n),o=e.top+t.clientTop,i=e.left+t.clientLeft,c=M(t)?Q(t):r(1);return{width:t.clientWidth*c.x,height:t.clientHeight*c.y,x:i*c.x,y:o*c.y}}(e,o);else{const n=W(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return v(i)}function ot(t,n){const e=X(t);return!(e===n||!T(e)||q(e))&&("fixed"===H(e).position||ot(e,n))}function rt(t,n,e){const o=M(n),i=C(n),c="fixed"===e,l=Z(t,!0,c,n);let a={scrollLeft:0,scrollTop:0};const s=r(0);function u(){s.x=tt(i)}if(o||!o&&!c)if(("body"!==F(n)||D(i))&&(a=V(n)),o){const t=Z(n,!0,c,n);s.x=t.x+n.clientLeft,s.y=t.y+n.clientTop}else i&&u();c&&!o&&i&&u();const f=!i||o||c?r(0):nt(i,a);return{x:l.left+a.scrollLeft-s.x-f.x,y:l.top+a.scrollTop-s.y-f.y,width:l.width,height:l.height}}function it(t){return"static"===H(t).position}function ct(t,n){if(!M(t)||"fixed"===H(t).position)return null;if(n)return n(t);let e=t.offsetParent;return C(t)===e&&(e=e.ownerDocument.body),e}function lt(t,n){const e=k(t);if(L(t))return e;if(!M(t)){let n=X(t);for(;n&&!q(n);){if(T(n)&&!it(n))return n;n=X(n)}return e}let o=ct(t,n);for(;o&&z(o)&&it(o);)o=ct(o,n);return o&&q(o)&&it(o)&&!N(o)?e:o||function(t){let n=X(t);for(;M(n)&&!q(n);){if(N(n))return n;if(L(n))return null;n=X(n)}return null}(t)||e}const at={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:n,rect:e,offsetParent:o,strategy:i}=t;const c="fixed"===i,l=C(o),a=!!n&&L(n.floating);if(o===l||a&&c)return e;let s={scrollLeft:0,scrollTop:0},u=r(1);const f=r(0),d=M(o);if((d||!d&&!c)&&(("body"!==F(o)||D(l))&&(s=V(o)),d)){const t=Z(o);u=Q(o),f.x=t.x+o.clientLeft,f.y=t.y+o.clientTop}const m=!l||d||c?r(0):nt(l,s);return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-s.scrollLeft*u.x+f.x+m.x,y:e.y*u.y-s.scrollTop*u.y+f.y+m.y}},getDocumentElement:C,getClippingRect:function(e){let{element:o,boundary:r,rootBoundary:i,strategy:c}=e;const l=[..."clippingAncestors"===r?L(o)?[]:function(t,n){const e=n.get(t);if(e)return e;let o=_(t,[],!1).filter((t=>T(t)&&"body"!==F(t))),r=null;const i="fixed"===H(t).position;let c=i?X(t):t;for(;T(c)&&!q(c);){const n=H(c),e=N(c);e||"fixed"!==n.position||(r=null),(i?!e&&!r:!e&&"static"===n.position&&r&&("absolute"===r.position||"fixed"===r.position)||D(c)&&!e&&ot(t,c))?o=o.filter((t=>t!==c)):r=n,c=X(c)}return n.set(t,o),o}(o,this._c):[].concat(r),i],a=et(o,l[0],c);let s=a.top,u=a.right,f=a.bottom,d=a.left;for(let e=1;e<l.length;e++){const r=et(o,l[e],c);s=n(r.top,s),u=t(r.right,u),f=t(r.bottom,f),d=n(r.left,d)}return{width:u-d,height:f-s,x:d,y:s}},getOffsetParent:lt,getElementRects:async function(t){const n=this.getOffsetParent||lt,e=this.getDimensions,o=await e(t.floating);return{reference:rt(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:n,height:e}=J(t);return{width:n,height:e}},getScale:Q,isElement:T,isRTL:function(t){return"rtl"===H(t).direction}};function st(t,n){return t.x===n.x&&t.y===n.y&&t.width===n.width&&t.height===n.height}function ut(e,r,i,c){void 0===c&&(c={});const{ancestorScroll:l=!0,ancestorResize:a=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:f=!1}=c,d=K(e),m=l||a?[...d?_(d):[],...r?_(r):[]]:[];m.forEach((t=>{l&&t.addEventListener("scroll",i,{passive:!0}),a&&t.addEventListener("resize",i)}));const y=d&&u?function(e,r){let i,c=null;const l=C(e);function a(){var t;clearTimeout(i),null==(t=c)||t.disconnect(),c=null}return function s(u,f){void 0===u&&(u=!1),void 0===f&&(f=1),a();const d=e.getBoundingClientRect(),{left:m,top:y,width:h,height:p}=d;if(u||r(),!h||!p)return;const x={rootMargin:-o(y)+"px "+-o(l.clientWidth-(m+h))+"px "+-o(l.clientHeight-(y+p))+"px "+-o(m)+"px",threshold:n(0,t(1,f))||1};let w=!0;function g(t){const n=t[0].intersectionRatio;if(n!==f){if(!w)return s();n?s(!1,n):i=setTimeout((()=>{s(!1,1e-7)}),1e3)}1!==n||st(d,e.getBoundingClientRect())||s(),w=!1}try{c=new IntersectionObserver(g,{...x,root:l.ownerDocument})}catch(t){c=new IntersectionObserver(g,x)}c.observe(e)}(!0),a}(d,i):null;let h,p=-1,x=null;s&&(x=new ResizeObserver((t=>{let[n]=t;n&&n.target===d&&x&&r&&(x.unobserve(r),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var t;null==(t=x)||t.observe(r)}))),i()})),d&&!f&&x.observe(d),r&&x.observe(r));let w=f?Z(e):null;return f&&function t(){const n=Z(e);w&&!st(w,n)&&i(),w=n,h=requestAnimationFrame(t)}(),i(),()=>{var t;m.forEach((t=>{l&&t.removeEventListener("scroll",i),a&&t.removeEventListener("resize",i)})),null==y||y(),null==(t=x)||t.disconnect(),x=null,f&&cancelAnimationFrame(h)}}const ft=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(n){var e,o;const{x:r,y:i,placement:c,middlewareData:u}=n,f=await async function(t,n){const{placement:e,platform:o,elements:r}=t,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),c=a(e),u=s(e),f="y"===d(e),m=S.has(c)?-1:1,y=i&&f?-1:1,h=l(n,t);let{mainAxis:p,crossAxis:x,alignmentAxis:w}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return u&&"number"==typeof w&&(x="end"===u?-1*w:w),f?{x:x*y,y:p*m}:{x:p*m,y:x*y}}(n,t);return c===(null==(e=u.offset)?void 0:e.placement)&&null!=(o=u.arrow)&&o.alignmentOffset?{}:{x:r+f.x,y:i+f.y,data:{...f,placement:c}}}}},dt=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(n){const{x:e,y:o,placement:r,platform:i}=n,{mainAxis:s=!0,crossAxis:f=!1,limiter:m={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...y}=l(t,n),h={x:e,y:o},p=await i.detectOverflow(n,y),x=d(a(r)),w=u(x);let g=h[w],v=h[x];s&&(g=c(g+p["y"===w?"top":"left"],g,g-p["y"===w?"bottom":"right"])),f&&(v=c(v+p["y"===x?"top":"left"],v,v-p["y"===x?"bottom":"right"]));const b=m.fn({...n,[w]:g,[x]:v});return{...b,data:{x:b.x-e,y:b.y-o,enabled:{[w]:s,[x]:f}}}}}},mt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(n){var e,o;const{placement:r,middlewareData:i,rects:c,initialPlacement:u,platform:v,elements:b}=n,{mainAxis:A=!0,crossAxis:S=!0,fallbackPlacements:R,fallbackStrategy:F="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:C=!0,...O}=l(t,n);if(null!=(e=i.arrow)&&e.alignmentOffset)return{};const T=a(r),M=d(u),P=a(u)===u,D=await(null==v.isRTL?void 0:v.isRTL(b.floating)),z=R||(P||!C?[g(u)]:function(t){const n=g(t);return[y(t),n,y(n)]}(u)),L="none"!==k;!R&&L&&z.push(...function(t,n,e,o){const r=s(t);let i=function(t,n,e){switch(t){case"top":case"bottom":return e?n?p:h:n?h:p;case"left":case"right":return n?x:w;default:return[]}}(a(t),"start"===e,o);return r&&(i=i.map((t=>t+"-"+r)),n&&(i=i.concat(i.map(y)))),i}(u,C,k,D));const E=[u,...z],B=await v.detectOverflow(n,O),$=[];let I=(null==(o=i.flip)?void 0:o.overflows)||[];if(A&&$.push(B[T]),S){const t=function(t,n,e){void 0===e&&(e=!1);const o=s(t),r=m(t),i=f(r);let c="x"===r?o===(e?"end":"start")?"right":"left":"start"===o?"bottom":"top";return n.reference[i]>n.floating[i]&&(c=g(c)),[c,g(c)]}(r,c,D);$.push(B[t[0]],B[t[1]])}if(I=[...I,{placement:r,overflows:$}],!$.every((t=>t<=0))){var N,j;const t=((null==(N=i.flip)?void 0:N.index)||0)+1,n=E[t];if(n&&("alignment"!==S||M===d(n)||I.every((t=>d(t.placement)!==M||t.overflows[0]>0))))return{data:{index:t,overflows:I},reset:{placement:n}};let e=null==(j=I.filter((t=>t.overflows[0]<=0)).sort(((t,n)=>t.overflows[1]-n.overflows[1]))[0])?void 0:j.placement;if(!e)switch(F){case"bestFit":{var q;const t=null==(q=I.filter((t=>{if(L){const n=d(t.placement);return n===M||"y"===n}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])?void 0:q[0];t&&(e=t);break}case"initialPlacement":e=u}if(r!==e)return{reset:{placement:e}}}return{}}}},yt=(t,n,e)=>{const o=new Map,r={platform:at,...e},i={...r.platform,_c:o};return(async(t,n,e)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:c}=e,l=c.detectOverflow?c:{...c,detectOverflow:A},a=await(null==c.isRTL?void 0:c.isRTL(n));let s=await c.getElementRects({reference:t,floating:n,strategy:r}),{x:u,y:f}=b(s,o,a),d=o,m=0;const y={};for(let e=0;e<i.length;e++){const h=i[e];if(!h)continue;const{name:p,fn:x}=h,{x:w,y:g,data:v,reset:A}=await x({x:u,y:f,initialPlacement:o,placement:d,strategy:r,middlewareData:y,rects:s,platform:l,elements:{reference:t,floating:n}});u=null!=w?w:u,f=null!=g?g:f,y[p]={...y[p],...v},A&&m<50&&(m++,"object"==typeof A&&(A.placement&&(d=A.placement),A.rects&&(s=!0===A.rects?await c.getElementRects({reference:t,floating:n,strategy:r}):A.rects),({x:u,y:f}=b(s,d,a))),e=-1)}return{x:u,y:f,placement:d,strategy:r,middlewareData:y}})(t,n,{...r,platform:i})};export{ut as a,yt as c,mt as f,ft as o,dt as s}
1
+ const t=Math.min,n=Math.max,e=Math.round,o=Math.floor,r=t=>({x:t,y:t}),i={left:"right",right:"left",bottom:"top",top:"bottom"};function c(e,o,r){return n(e,t(o,r))}function l(t,n){return"function"==typeof t?t(n):t}function a(t){return t.split("-")[0]}function s(t){return t.split("-")[1]}function u(t){return"x"===t?"y":"x"}function f(t){return"y"===t?"height":"width"}function d(t){const n=t[0];return"t"===n||"b"===n?"y":"x"}function m(t){return u(d(t))}function y(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const h=["left","right"],p=["right","left"],w=["top","bottom"],x=["bottom","top"];function g(t){const n=a(t);return i[n]+t.slice(n.length)}function v(t){const{x:n,y:e,width:o,height:r}=t;return{width:o,height:r,top:e,left:n,right:n+o,bottom:e+r,x:n,y:e}}function b(t,n,e){let{reference:o,floating:r}=t;const i=d(n),c=m(n),l=f(c),u=a(n),y="y"===i,h=o.x+o.width/2-r.width/2,p=o.y+o.height/2-r.height/2,w=o[l]/2-r[l]/2;let x;switch(u){case"top":x={x:h,y:o.y-r.height};break;case"bottom":x={x:h,y:o.y+o.height};break;case"right":x={x:o.x+o.width,y:p};break;case"left":x={x:o.x-r.width,y:p};break;default:x={x:o.x,y:o.y}}switch(s(n)){case"start":x[c]-=w*(e&&y?-1:1);break;case"end":x[c]+=w*(e&&y?-1:1)}return x}async function A(t,n){var e;void 0===n&&(n={});const{x:o,y:r,platform:i,rects:c,elements:a,strategy:s}=t,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:m=!1,padding:y=0}=l(n,t),h=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(y),p=a[m?"floating"===d?"reference":"floating":d],w=v(await i.getClippingRect({element:null==(e=await(null==i.isElement?void 0:i.isElement(p)))||e?p:p.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:s})),x="floating"===d?{x:o,y:r,width:c.floating.width,height:c.floating.height}:c.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},A=v(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:g,strategy:s}):x);return{top:(w.top-A.top+h.top)/b.y,bottom:(A.bottom-w.bottom+h.bottom)/b.y,left:(w.left-A.left+h.left)/b.x,right:(A.right-w.right+h.right)/b.x}}const S=new Set(["left","top"]);function R(){return"undefined"!=typeof window}function F(t){return O(t)?(t.nodeName||"").toLowerCase():"#document"}function k(t){var n;return(null==t||null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function C(t){var n;return null==(n=(O(t)?t.ownerDocument:t.document)||window.document)?void 0:n.documentElement}function O(t){return!!R()&&(t instanceof Node||t instanceof k(t).Node)}function T(t){return!!R()&&(t instanceof Element||t instanceof k(t).Element)}function M(t){return!!R()&&(t instanceof HTMLElement||t instanceof k(t).HTMLElement)}function P(t){return!(!R()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof k(t).ShadowRoot)}function z(t){const{overflow:n,overflowX:e,overflowY:o,display:r}=H(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&"inline"!==r&&"contents"!==r}function D(t){return/^(table|td|th)$/.test(F(t))}function L(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const E=/transform|translate|scale|rotate|perspective|filter/,B=/paint|layout|strict|content/,$=t=>!!t&&"none"!==t;let I;function N(t){const n=T(t)?H(t):t;return $(n.transform)||$(n.translate)||$(n.scale)||$(n.rotate)||$(n.perspective)||!j()&&($(n.backdropFilter)||$(n.filter))||E.test(n.willChange||"")||B.test(n.contain||"")}function j(){return null==I&&(I="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),I}function q(t){return/^(html|body|#document)$/.test(F(t))}function H(t){return k(t).getComputedStyle(t)}function V(t){return T(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function W(t){if("html"===F(t))return t;const n=t.assignedSlot||t.parentNode||P(t)&&t.host||C(t);return P(n)?n.host:n}function X(t){const n=W(t);return q(n)?t.ownerDocument?t.ownerDocument.body:t.body:M(n)&&z(n)?n:X(n)}function Y(t,n,e){var o;void 0===n&&(n=[]),void 0===e&&(e=!0);const r=X(t),i=r===(null==(o=t.ownerDocument)?void 0:o.body),c=k(r);if(i){const t=_(c);return n.concat(c,c.visualViewport||[],z(r)?r:[],t&&e?Y(t):[])}return n.concat(r,Y(r,[],e))}function _(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function G(t){const n=H(t);let o=parseFloat(n.width)||0,r=parseFloat(n.height)||0;const i=M(t),c=i?t.offsetWidth:o,l=i?t.offsetHeight:r,a=e(o)!==c||e(r)!==l;return a&&(o=c,r=l),{width:o,height:r,$:a}}function J(t){return T(t)?t:t.contextElement}function K(t){const n=J(t);if(!M(n))return r(1);const o=n.getBoundingClientRect(),{width:i,height:c,$:l}=G(n);let a=(l?e(o.width):o.width)/i,s=(l?e(o.height):o.height)/c;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Q=r(0);function U(t){const n=k(t);return j()&&n.visualViewport?{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}:Q}function Z(t,n,e,o){void 0===n&&(n=!1),void 0===e&&(e=!1);const i=t.getBoundingClientRect(),c=J(t);let l=r(1);n&&(o?T(o)&&(l=K(o)):l=K(t));const a=function(t,n,e){return void 0===n&&(n=!1),!(!e||n&&e!==k(t))&&n}(c,e,o)?U(c):r(0);let s=(i.left+a.x)/l.x,u=(i.top+a.y)/l.y,f=i.width/l.x,d=i.height/l.y;if(c){const t=k(c),n=o&&T(o)?k(o):o;let e=t,r=_(e);for(;r&&o&&n!==e;){const t=K(r),n=r.getBoundingClientRect(),o=H(r),i=n.left+(r.clientLeft+parseFloat(o.paddingLeft))*t.x,c=n.top+(r.clientTop+parseFloat(o.paddingTop))*t.y;s*=t.x,u*=t.y,f*=t.x,d*=t.y,s+=i,u+=c,e=k(r),r=_(e)}}return v({width:f,height:d,x:s,y:u})}function tt(t,n){const e=V(t).scrollLeft;return n?n.left+e:Z(C(t)).left+e}function nt(t,n){const e=t.getBoundingClientRect();return{x:e.left+n.scrollLeft-tt(t,e),y:e.top+n.scrollTop}}function et(t,e,o){let i;if("viewport"===e)i=function(t,n){const e=k(t),o=C(t),r=e.visualViewport;let i=o.clientWidth,c=o.clientHeight,l=0,a=0;if(r){i=r.width,c=r.height;const t=j();(!t||t&&"fixed"===n)&&(l=r.offsetLeft,a=r.offsetTop)}const s=tt(o);if(s<=0){const t=o.ownerDocument,n=t.body,e=getComputedStyle(n),r="CSS1Compat"===t.compatMode&&parseFloat(e.marginLeft)+parseFloat(e.marginRight)||0,c=Math.abs(o.clientWidth-n.clientWidth-r);c<=25&&(i-=c)}else s<=25&&(i+=s);return{width:i,height:c,x:l,y:a}}(t,o);else if("document"===e)i=function(t){const e=C(t),o=V(t),r=t.ownerDocument.body,i=n(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),c=n(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let l=-o.scrollLeft+tt(t);const a=-o.scrollTop;return"rtl"===H(r).direction&&(l+=n(e.clientWidth,r.clientWidth)-i),{width:i,height:c,x:l,y:a}}(C(t));else if(T(e))i=function(t,n){const e=Z(t,!0,"fixed"===n),o=e.top+t.clientTop,i=e.left+t.clientLeft,c=M(t)?K(t):r(1);return{width:t.clientWidth*c.x,height:t.clientHeight*c.y,x:i*c.x,y:o*c.y}}(e,o);else{const n=U(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return v(i)}function ot(t,n){const e=W(t);return!(e===n||!T(e)||q(e))&&("fixed"===H(e).position||ot(e,n))}function rt(t,n,e){const o=M(n),i=C(n),c="fixed"===e,l=Z(t,!0,c,n);let a={scrollLeft:0,scrollTop:0};const s=r(0);function u(){s.x=tt(i)}if(o||!o&&!c)if(("body"!==F(n)||z(i))&&(a=V(n)),o){const t=Z(n,!0,c,n);s.x=t.x+n.clientLeft,s.y=t.y+n.clientTop}else i&&u();c&&!o&&i&&u();const f=!i||o||c?r(0):nt(i,a);return{x:l.left+a.scrollLeft-s.x-f.x,y:l.top+a.scrollTop-s.y-f.y,width:l.width,height:l.height}}function it(t){return"static"===H(t).position}function ct(t,n){if(!M(t)||"fixed"===H(t).position)return null;if(n)return n(t);let e=t.offsetParent;return C(t)===e&&(e=e.ownerDocument.body),e}function lt(t,n){const e=k(t);if(L(t))return e;if(!M(t)){let n=W(t);for(;n&&!q(n);){if(T(n)&&!it(n))return n;n=W(n)}return e}let o=ct(t,n);for(;o&&D(o)&&it(o);)o=ct(o,n);return o&&q(o)&&it(o)&&!N(o)?e:o||function(t){let n=W(t);for(;M(n)&&!q(n);){if(N(n))return n;if(L(n))return null;n=W(n)}return null}(t)||e}const at={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:n,rect:e,offsetParent:o,strategy:i}=t;const c="fixed"===i,l=C(o),a=!!n&&L(n.floating);if(o===l||a&&c)return e;let s={scrollLeft:0,scrollTop:0},u=r(1);const f=r(0),d=M(o);if((d||!d&&!c)&&(("body"!==F(o)||z(l))&&(s=V(o)),d)){const t=Z(o);u=K(o),f.x=t.x+o.clientLeft,f.y=t.y+o.clientTop}const m=!l||d||c?r(0):nt(l,s);return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-s.scrollLeft*u.x+f.x+m.x,y:e.y*u.y-s.scrollTop*u.y+f.y+m.y}},getDocumentElement:C,getClippingRect:function(e){let{element:o,boundary:r,rootBoundary:i,strategy:c}=e;const l=[..."clippingAncestors"===r?L(o)?[]:function(t,n){const e=n.get(t);if(e)return e;let o=Y(t,[],!1).filter((t=>T(t)&&"body"!==F(t))),r=null;const i="fixed"===H(t).position;let c=i?W(t):t;for(;T(c)&&!q(c);){const n=H(c),e=N(c);e||"fixed"!==n.position||(r=null),(i?!e&&!r:!e&&"static"===n.position&&r&&("absolute"===r.position||"fixed"===r.position)||z(c)&&!e&&ot(t,c))?o=o.filter((t=>t!==c)):r=n,c=W(c)}return n.set(t,o),o}(o,this._c):[].concat(r),i],a=et(o,l[0],c);let s=a.top,u=a.right,f=a.bottom,d=a.left;for(let e=1;e<l.length;e++){const r=et(o,l[e],c);s=n(r.top,s),u=t(r.right,u),f=t(r.bottom,f),d=n(r.left,d)}return{width:u-d,height:f-s,x:d,y:s}},getOffsetParent:lt,getElementRects:async function(t){const n=this.getOffsetParent||lt,e=this.getDimensions,o=await e(t.floating);return{reference:rt(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:n,height:e}=G(t);return{width:n,height:e}},getScale:K,isElement:T,isRTL:function(t){return"rtl"===H(t).direction}};function st(t,n){return t.x===n.x&&t.y===n.y&&t.width===n.width&&t.height===n.height}function ut(e,r,i,c){void 0===c&&(c={});const{ancestorScroll:l=!0,ancestorResize:a=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:f=!1}=c,d=J(e),m=l||a?[...d?Y(d):[],...r?Y(r):[]]:[];m.forEach((t=>{l&&t.addEventListener("scroll",i,{passive:!0}),a&&t.addEventListener("resize",i)}));const y=d&&u?function(e,r){let i,c=null;const l=C(e);function a(){var t;clearTimeout(i),null==(t=c)||t.disconnect(),c=null}return function s(u,f){void 0===u&&(u=!1),void 0===f&&(f=1),a();const d=e.getBoundingClientRect(),{left:m,top:y,width:h,height:p}=d;if(u||r(),!h||!p)return;const w={rootMargin:-o(y)+"px "+-o(l.clientWidth-(m+h))+"px "+-o(l.clientHeight-(y+p))+"px "+-o(m)+"px",threshold:n(0,t(1,f))||1};let x=!0;function g(t){const n=t[0].intersectionRatio;if(n!==f){if(!x)return s();n?s(!1,n):i=setTimeout((()=>{s(!1,1e-7)}),1e3)}1!==n||st(d,e.getBoundingClientRect())||s(),x=!1}try{c=new IntersectionObserver(g,{...w,root:l.ownerDocument})}catch(t){c=new IntersectionObserver(g,w)}c.observe(e)}(!0),a}(d,i):null;let h,p=-1,w=null;s&&(w=new ResizeObserver((t=>{let[n]=t;n&&n.target===d&&w&&r&&(w.unobserve(r),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var t;null==(t=w)||t.observe(r)}))),i()})),d&&!f&&w.observe(d),r&&w.observe(r));let x=f?Z(e):null;return f&&function t(){const n=Z(e);x&&!st(x,n)&&i(),x=n,h=requestAnimationFrame(t)}(),i(),()=>{var t;m.forEach((t=>{l&&t.removeEventListener("scroll",i),a&&t.removeEventListener("resize",i)})),null==y||y(),null==(t=w)||t.disconnect(),w=null,f&&cancelAnimationFrame(h)}}const ft=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(n){var e,o;const{x:r,y:i,placement:c,middlewareData:u}=n,f=await async function(t,n){const{placement:e,platform:o,elements:r}=t,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),c=a(e),u=s(e),f="y"===d(e),m=S.has(c)?-1:1,y=i&&f?-1:1,h=l(n,t);let{mainAxis:p,crossAxis:w,alignmentAxis:x}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return u&&"number"==typeof x&&(w="end"===u?-1*x:x),f?{x:w*y,y:p*m}:{x:p*m,y:w*y}}(n,t);return c===(null==(e=u.offset)?void 0:e.placement)&&null!=(o=u.arrow)&&o.alignmentOffset?{}:{x:r+f.x,y:i+f.y,data:{...f,placement:c}}}}},dt=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(n){const{x:e,y:o,placement:r,platform:i}=n,{mainAxis:s=!0,crossAxis:f=!1,limiter:m={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...y}=l(t,n),h={x:e,y:o},p=await i.detectOverflow(n,y),w=d(a(r)),x=u(w);let g=h[x],v=h[w];s&&(g=c(g+p["y"===x?"top":"left"],g,g-p["y"===x?"bottom":"right"])),f&&(v=c(v+p["y"===w?"top":"left"],v,v-p["y"===w?"bottom":"right"]));const b=m.fn({...n,[x]:g,[w]:v});return{...b,data:{x:b.x-e,y:b.y-o,enabled:{[x]:s,[w]:f}}}}}},mt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(n){var e,o;const{placement:r,middlewareData:i,rects:c,initialPlacement:u,platform:v,elements:b}=n,{mainAxis:A=!0,crossAxis:S=!0,fallbackPlacements:R,fallbackStrategy:F="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:C=!0,...O}=l(t,n);if(null!=(e=i.arrow)&&e.alignmentOffset)return{};const T=a(r),M=d(u),P=a(u)===u,z=await(null==v.isRTL?void 0:v.isRTL(b.floating)),D=R||(P||!C?[g(u)]:function(t){const n=g(t);return[y(t),n,y(n)]}(u)),L="none"!==k;!R&&L&&D.push(...function(t,n,e,o){const r=s(t);let i=function(t,n,e){switch(t){case"top":case"bottom":return e?n?p:h:n?h:p;case"left":case"right":return n?w:x;default:return[]}}(a(t),"start"===e,o);return r&&(i=i.map((t=>t+"-"+r)),n&&(i=i.concat(i.map(y)))),i}(u,C,k,z));const E=[u,...D],B=await v.detectOverflow(n,O),$=[];let I=(null==(o=i.flip)?void 0:o.overflows)||[];if(A&&$.push(B[T]),S){const t=function(t,n,e){void 0===e&&(e=!1);const o=s(t),r=m(t),i=f(r);let c="x"===r?o===(e?"end":"start")?"right":"left":"start"===o?"bottom":"top";return n.reference[i]>n.floating[i]&&(c=g(c)),[c,g(c)]}(r,c,z);$.push(B[t[0]],B[t[1]])}if(I=[...I,{placement:r,overflows:$}],!$.every((t=>t<=0))){var N,j;const t=((null==(N=i.flip)?void 0:N.index)||0)+1,n=E[t];if(n&&("alignment"!==S||M===d(n)||I.every((t=>d(t.placement)!==M||t.overflows[0]>0))))return{data:{index:t,overflows:I},reset:{placement:n}};let e=null==(j=I.filter((t=>t.overflows[0]<=0)).sort(((t,n)=>t.overflows[1]-n.overflows[1]))[0])?void 0:j.placement;if(!e)switch(F){case"bestFit":{var q;const t=null==(q=I.filter((t=>{if(L){const n=d(t.placement);return n===M||"y"===n}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])?void 0:q[0];t&&(e=t);break}case"initialPlacement":e=u}if(r!==e)return{reset:{placement:e}}}return{}}}},yt=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(o){var r,i;const{placement:c,rects:u,platform:f,elements:m}=o,{apply:y=()=>{},...h}=l(e,o),p=await f.detectOverflow(o,h),w=a(c),x=s(c),g="y"===d(c),{width:v,height:b}=u.floating;let A,S;"top"===w||"bottom"===w?(A=w,S=x===(await(null==f.isRTL?void 0:f.isRTL(m.floating))?"start":"end")?"left":"right"):(S=w,A="end"===x?"top":"bottom");const R=b-p.top-p.bottom,F=v-p.left-p.right;let k=t(b-p[A],R),C=t(v-p[S],F);if(null!=(r=o.middlewareData.shift)&&r.enabled.x&&(C=F),null!=(i=o.middlewareData.shift)&&i.enabled.y&&(k=R),!o.middlewareData.shift&&!x){const t=n(p.left,0),e=n(p.right,0),o=n(p.top,0),r=n(p.bottom,0);g?C=v-2*(0!==t||0!==e?t+e:n(p.left,p.right)):k=b-2*(0!==o||0!==r?o+r:n(p.top,p.bottom))}await y({...o,availableWidth:C,availableHeight:k});const O=await f.getDimensions(m.floating);return v!==O.width||b!==O.height?{reset:{rects:!0}}:{}}}},ht=(t,n,e)=>{const o=new Map,r={platform:at,...e},i={...r.platform,_c:o};return(async(t,n,e)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:c}=e,l=c.detectOverflow?c:{...c,detectOverflow:A},a=await(null==c.isRTL?void 0:c.isRTL(n));let s=await c.getElementRects({reference:t,floating:n,strategy:r}),{x:u,y:f}=b(s,o,a),d=o,m=0;const y={};for(let e=0;e<i.length;e++){const h=i[e];if(!h)continue;const{name:p,fn:w}=h,{x,y:g,data:v,reset:A}=await w({x:u,y:f,initialPlacement:o,placement:d,strategy:r,middlewareData:y,rects:s,platform:l,elements:{reference:t,floating:n}});u=null!=x?x:u,f=null!=g?g:f,y[p]={...y[p],...v},A&&m<50&&(m++,"object"==typeof A&&(A.placement&&(d=A.placement),A.rects&&(s=!0===A.rects?await c.getElementRects({reference:t,floating:n,strategy:r}):A.rects),({x:u,y:f}=b(s,d,a))),e=-1)}return{x:u,y:f,placement:d,strategy:r,middlewareData:y}})(t,n,{...r,platform:i})};export{ut as a,yt as b,ht as c,mt as f,ft as o,dt as s}