@andespindola/ui-core 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 (298) hide show
  1. package/README.md +45 -0
  2. package/dist/cjs/floating-ui.dom-BPemvNRD.js +1542 -0
  3. package/dist/cjs/index-Cb1tfi_9.js +1728 -0
  4. package/dist/cjs/index.cjs.js +2 -0
  5. package/dist/cjs/loader.cjs.js +12 -0
  6. package/dist/cjs/ui-accordion-item.cjs.entry.js +27 -0
  7. package/dist/cjs/ui-accordion.cjs.entry.js +17 -0
  8. package/dist/cjs/ui-avatar.cjs.entry.js +19 -0
  9. package/dist/cjs/ui-badge.cjs.entry.js +19 -0
  10. package/dist/cjs/ui-button.cjs.entry.js +31 -0
  11. package/dist/cjs/ui-card.cjs.entry.js +17 -0
  12. package/dist/cjs/ui-checkbox.cjs.entry.js +34 -0
  13. package/dist/cjs/ui-dialog.cjs.entry.js +57 -0
  14. package/dist/cjs/ui-drawer.cjs.entry.js +59 -0
  15. package/dist/cjs/ui-dropdown-item.cjs.entry.js +27 -0
  16. package/dist/cjs/ui-dropdown-menu.cjs.entry.js +97 -0
  17. package/dist/cjs/ui-field.cjs.entry.js +19 -0
  18. package/dist/cjs/ui-input.cjs.entry.js +35 -0
  19. package/dist/cjs/ui-label.cjs.entry.js +17 -0
  20. package/dist/cjs/ui-loading-overlay.cjs.entry.js +24 -0
  21. package/dist/cjs/ui-popover.cjs.entry.js +94 -0
  22. package/dist/cjs/ui-progress.cjs.entry.js +33 -0
  23. package/dist/cjs/ui-radio-group.cjs.entry.js +49 -0
  24. package/dist/cjs/ui-reveal.cjs.entry.js +41 -0
  25. package/dist/cjs/ui-scroll-progress.cjs.entry.js +37 -0
  26. package/dist/cjs/ui-section.cjs.entry.js +23 -0
  27. package/dist/cjs/ui-select.cjs.entry.js +28 -0
  28. package/dist/cjs/ui-separator.cjs.entry.js +19 -0
  29. package/dist/cjs/ui-skeleton.cjs.entry.js +17 -0
  30. package/dist/cjs/ui-slider.cjs.entry.js +37 -0
  31. package/dist/cjs/ui-spinner.cjs.entry.js +19 -0
  32. package/dist/cjs/ui-switch.cjs.entry.js +34 -0
  33. package/dist/cjs/ui-tabs.cjs.entry.js +31 -0
  34. package/dist/cjs/ui-textarea.cjs.entry.js +35 -0
  35. package/dist/cjs/ui-theme-toggle.cjs.entry.js +65 -0
  36. package/dist/cjs/ui-toast.cjs.entry.js +67 -0
  37. package/dist/cjs/ui-toaster.cjs.entry.js +29 -0
  38. package/dist/cjs/ui-tooltip.cjs.entry.js +64 -0
  39. package/dist/cjs/uikit.cjs.js +24 -0
  40. package/dist/collection/collection-manifest.json +45 -0
  41. package/dist/collection/components/ui-accordion/ui-accordion.css +4 -0
  42. package/dist/collection/components/ui-accordion/ui-accordion.js +18 -0
  43. package/dist/collection/components/ui-accordion-item/ui-accordion-item.css +42 -0
  44. package/dist/collection/components/ui-accordion-item/ui-accordion-item.js +91 -0
  45. package/dist/collection/components/ui-avatar/ui-avatar.css +30 -0
  46. package/dist/collection/components/ui-avatar/ui-avatar.js +84 -0
  47. package/dist/collection/components/ui-badge/ui-badge.css +46 -0
  48. package/dist/collection/components/ui-badge/ui-badge.js +52 -0
  49. package/dist/collection/components/ui-button/ui-button.css +130 -0
  50. package/dist/collection/components/ui-button/ui-button.js +150 -0
  51. package/dist/collection/components/ui-card/ui-card.css +24 -0
  52. package/dist/collection/components/ui-card/ui-card.js +18 -0
  53. package/dist/collection/components/ui-checkbox/ui-checkbox.css +46 -0
  54. package/dist/collection/components/ui-checkbox/ui-checkbox.js +136 -0
  55. package/dist/collection/components/ui-dialog/ui-dialog.css +48 -0
  56. package/dist/collection/components/ui-dialog/ui-dialog.js +140 -0
  57. package/dist/collection/components/ui-drawer/ui-drawer.css +88 -0
  58. package/dist/collection/components/ui-drawer/ui-drawer.js +162 -0
  59. package/dist/collection/components/ui-dropdown-item/ui-dropdown-item.css +36 -0
  60. package/dist/collection/components/ui-dropdown-item/ui-dropdown-item.js +71 -0
  61. package/dist/collection/components/ui-dropdown-menu/ui-dropdown-menu.css +39 -0
  62. package/dist/collection/components/ui-dropdown-menu/ui-dropdown-menu.js +216 -0
  63. package/dist/collection/components/ui-field/ui-field.css +34 -0
  64. package/dist/collection/components/ui-field/ui-field.js +122 -0
  65. package/dist/collection/components/ui-input/ui-input.css +40 -0
  66. package/dist/collection/components/ui-input/ui-input.js +191 -0
  67. package/dist/collection/components/ui-label/ui-label.css +10 -0
  68. package/dist/collection/components/ui-label/ui-label.js +18 -0
  69. package/dist/collection/components/ui-loading-overlay/ui-loading-overlay.css +24 -0
  70. package/dist/collection/components/ui-loading-overlay/ui-loading-overlay.js +102 -0
  71. package/dist/collection/components/ui-popover/ui-popover.css +36 -0
  72. package/dist/collection/components/ui-popover/ui-popover.js +204 -0
  73. package/dist/collection/components/ui-progress/ui-progress.css +32 -0
  74. package/dist/collection/components/ui-progress/ui-progress.js +100 -0
  75. package/dist/collection/components/ui-radio-group/ui-radio-group.css +67 -0
  76. package/dist/collection/components/ui-radio-group/ui-radio-group.js +155 -0
  77. package/dist/collection/components/ui-reveal/ui-reveal.css +17 -0
  78. package/dist/collection/components/ui-reveal/ui-reveal.js +73 -0
  79. package/dist/collection/components/ui-scroll-progress/ui-scroll-progress.css +20 -0
  80. package/dist/collection/components/ui-scroll-progress/ui-scroll-progress.js +45 -0
  81. package/dist/collection/components/ui-section/ui-section.css +32 -0
  82. package/dist/collection/components/ui-section/ui-section.js +90 -0
  83. package/dist/collection/components/ui-select/ui-select.css +49 -0
  84. package/dist/collection/components/ui-select/ui-select.js +153 -0
  85. package/dist/collection/components/ui-separator/ui-separator.css +15 -0
  86. package/dist/collection/components/ui-separator/ui-separator.js +52 -0
  87. package/dist/collection/components/ui-skeleton/ui-skeleton.css +27 -0
  88. package/dist/collection/components/ui-skeleton/ui-skeleton.js +18 -0
  89. package/dist/collection/components/ui-slider/ui-slider.css +80 -0
  90. package/dist/collection/components/ui-slider/ui-slider.js +175 -0
  91. package/dist/collection/components/ui-spinner/ui-spinner.css +39 -0
  92. package/dist/collection/components/ui-spinner/ui-spinner.js +52 -0
  93. package/dist/collection/components/ui-switch/ui-switch.css +47 -0
  94. package/dist/collection/components/ui-switch/ui-switch.js +98 -0
  95. package/dist/collection/components/ui-tabs/ui-tabs.css +38 -0
  96. package/dist/collection/components/ui-tabs/ui-tabs.js +99 -0
  97. package/dist/collection/components/ui-textarea/ui-textarea.css +42 -0
  98. package/dist/collection/components/ui-textarea/ui-textarea.js +191 -0
  99. package/dist/collection/components/ui-theme-toggle/ui-theme-toggle.css +28 -0
  100. package/dist/collection/components/ui-theme-toggle/ui-theme-toggle.js +90 -0
  101. package/dist/collection/components/ui-toast/ui-toast.css +81 -0
  102. package/dist/collection/components/ui-toast/ui-toast.js +234 -0
  103. package/dist/collection/components/ui-toaster/ui-toaster.css +15 -0
  104. package/dist/collection/components/ui-toaster/ui-toaster.js +67 -0
  105. package/dist/collection/components/ui-tooltip/ui-tooltip.css +37 -0
  106. package/dist/collection/components/ui-tooltip/ui-tooltip.js +143 -0
  107. package/dist/collection/index.js +1 -0
  108. package/dist/components/index.d.ts +35 -0
  109. package/dist/components/index.js +1 -0
  110. package/dist/components/p-Bz9HyboB.js +1 -0
  111. package/dist/components/p-C8ePpPG3.js +1 -0
  112. package/dist/components/p-CyBRmmbs.js +1 -0
  113. package/dist/components/ui-accordion-item.d.ts +11 -0
  114. package/dist/components/ui-accordion-item.js +1 -0
  115. package/dist/components/ui-accordion.d.ts +11 -0
  116. package/dist/components/ui-accordion.js +1 -0
  117. package/dist/components/ui-avatar.d.ts +11 -0
  118. package/dist/components/ui-avatar.js +1 -0
  119. package/dist/components/ui-badge.d.ts +11 -0
  120. package/dist/components/ui-badge.js +1 -0
  121. package/dist/components/ui-button.d.ts +11 -0
  122. package/dist/components/ui-button.js +1 -0
  123. package/dist/components/ui-card.d.ts +11 -0
  124. package/dist/components/ui-card.js +1 -0
  125. package/dist/components/ui-checkbox.d.ts +11 -0
  126. package/dist/components/ui-checkbox.js +1 -0
  127. package/dist/components/ui-dialog.d.ts +11 -0
  128. package/dist/components/ui-dialog.js +1 -0
  129. package/dist/components/ui-drawer.d.ts +11 -0
  130. package/dist/components/ui-drawer.js +1 -0
  131. package/dist/components/ui-dropdown-item.d.ts +11 -0
  132. package/dist/components/ui-dropdown-item.js +1 -0
  133. package/dist/components/ui-dropdown-menu.d.ts +11 -0
  134. package/dist/components/ui-dropdown-menu.js +1 -0
  135. package/dist/components/ui-field.d.ts +11 -0
  136. package/dist/components/ui-field.js +1 -0
  137. package/dist/components/ui-input.d.ts +11 -0
  138. package/dist/components/ui-input.js +1 -0
  139. package/dist/components/ui-label.d.ts +11 -0
  140. package/dist/components/ui-label.js +1 -0
  141. package/dist/components/ui-loading-overlay.d.ts +11 -0
  142. package/dist/components/ui-loading-overlay.js +1 -0
  143. package/dist/components/ui-popover.d.ts +11 -0
  144. package/dist/components/ui-popover.js +1 -0
  145. package/dist/components/ui-progress.d.ts +11 -0
  146. package/dist/components/ui-progress.js +1 -0
  147. package/dist/components/ui-radio-group.d.ts +11 -0
  148. package/dist/components/ui-radio-group.js +1 -0
  149. package/dist/components/ui-reveal.d.ts +11 -0
  150. package/dist/components/ui-reveal.js +1 -0
  151. package/dist/components/ui-scroll-progress.d.ts +11 -0
  152. package/dist/components/ui-scroll-progress.js +1 -0
  153. package/dist/components/ui-section.d.ts +11 -0
  154. package/dist/components/ui-section.js +1 -0
  155. package/dist/components/ui-select.d.ts +11 -0
  156. package/dist/components/ui-select.js +1 -0
  157. package/dist/components/ui-separator.d.ts +11 -0
  158. package/dist/components/ui-separator.js +1 -0
  159. package/dist/components/ui-skeleton.d.ts +11 -0
  160. package/dist/components/ui-skeleton.js +1 -0
  161. package/dist/components/ui-slider.d.ts +11 -0
  162. package/dist/components/ui-slider.js +1 -0
  163. package/dist/components/ui-spinner.d.ts +11 -0
  164. package/dist/components/ui-spinner.js +1 -0
  165. package/dist/components/ui-switch.d.ts +11 -0
  166. package/dist/components/ui-switch.js +1 -0
  167. package/dist/components/ui-tabs.d.ts +11 -0
  168. package/dist/components/ui-tabs.js +1 -0
  169. package/dist/components/ui-textarea.d.ts +11 -0
  170. package/dist/components/ui-textarea.js +1 -0
  171. package/dist/components/ui-theme-toggle.d.ts +11 -0
  172. package/dist/components/ui-theme-toggle.js +1 -0
  173. package/dist/components/ui-toast.d.ts +11 -0
  174. package/dist/components/ui-toast.js +1 -0
  175. package/dist/components/ui-toaster.d.ts +11 -0
  176. package/dist/components/ui-toaster.js +1 -0
  177. package/dist/components/ui-tooltip.d.ts +11 -0
  178. package/dist/components/ui-tooltip.js +1 -0
  179. package/dist/esm/floating-ui.dom-CyBRmmbs.js +1536 -0
  180. package/dist/esm/index-DYwlrXg_.js +1718 -0
  181. package/dist/esm/index.js +1 -0
  182. package/dist/esm/loader.js +10 -0
  183. package/dist/esm/ui-accordion-item.entry.js +25 -0
  184. package/dist/esm/ui-accordion.entry.js +15 -0
  185. package/dist/esm/ui-avatar.entry.js +17 -0
  186. package/dist/esm/ui-badge.entry.js +17 -0
  187. package/dist/esm/ui-button.entry.js +29 -0
  188. package/dist/esm/ui-card.entry.js +15 -0
  189. package/dist/esm/ui-checkbox.entry.js +32 -0
  190. package/dist/esm/ui-dialog.entry.js +55 -0
  191. package/dist/esm/ui-drawer.entry.js +57 -0
  192. package/dist/esm/ui-dropdown-item.entry.js +25 -0
  193. package/dist/esm/ui-dropdown-menu.entry.js +95 -0
  194. package/dist/esm/ui-field.entry.js +17 -0
  195. package/dist/esm/ui-input.entry.js +33 -0
  196. package/dist/esm/ui-label.entry.js +15 -0
  197. package/dist/esm/ui-loading-overlay.entry.js +22 -0
  198. package/dist/esm/ui-popover.entry.js +92 -0
  199. package/dist/esm/ui-progress.entry.js +31 -0
  200. package/dist/esm/ui-radio-group.entry.js +47 -0
  201. package/dist/esm/ui-reveal.entry.js +39 -0
  202. package/dist/esm/ui-scroll-progress.entry.js +35 -0
  203. package/dist/esm/ui-section.entry.js +21 -0
  204. package/dist/esm/ui-select.entry.js +26 -0
  205. package/dist/esm/ui-separator.entry.js +17 -0
  206. package/dist/esm/ui-skeleton.entry.js +15 -0
  207. package/dist/esm/ui-slider.entry.js +35 -0
  208. package/dist/esm/ui-spinner.entry.js +17 -0
  209. package/dist/esm/ui-switch.entry.js +32 -0
  210. package/dist/esm/ui-tabs.entry.js +29 -0
  211. package/dist/esm/ui-textarea.entry.js +33 -0
  212. package/dist/esm/ui-theme-toggle.entry.js +63 -0
  213. package/dist/esm/ui-toast.entry.js +65 -0
  214. package/dist/esm/ui-toaster.entry.js +27 -0
  215. package/dist/esm/ui-tooltip.entry.js +62 -0
  216. package/dist/esm/uikit.js +20 -0
  217. package/dist/index.cjs.js +1 -0
  218. package/dist/index.js +1 -0
  219. package/dist/types/components/ui-accordion/ui-accordion.d.ts +3 -0
  220. package/dist/types/components/ui-accordion-item/ui-accordion-item.d.ts +11 -0
  221. package/dist/types/components/ui-avatar/ui-avatar.d.ts +9 -0
  222. package/dist/types/components/ui-badge/ui-badge.d.ts +6 -0
  223. package/dist/types/components/ui-button/ui-button.d.ts +15 -0
  224. package/dist/types/components/ui-card/ui-card.d.ts +3 -0
  225. package/dist/types/components/ui-checkbox/ui-checkbox.d.ts +16 -0
  226. package/dist/types/components/ui-dialog/ui-dialog.d.ts +18 -0
  227. package/dist/types/components/ui-drawer/ui-drawer.d.ts +20 -0
  228. package/dist/types/components/ui-dropdown-item/ui-dropdown-item.d.ts +10 -0
  229. package/dist/types/components/ui-dropdown-menu/ui-dropdown-menu.d.ts +28 -0
  230. package/dist/types/components/ui-field/ui-field.d.ts +13 -0
  231. package/dist/types/components/ui-input/ui-input.d.ts +22 -0
  232. package/dist/types/components/ui-label/ui-label.d.ts +3 -0
  233. package/dist/types/components/ui-loading-overlay/ui-loading-overlay.d.ts +15 -0
  234. package/dist/types/components/ui-popover/ui-popover.d.ts +27 -0
  235. package/dist/types/components/ui-progress/ui-progress.d.ts +11 -0
  236. package/dist/types/components/ui-radio-group/ui-radio-group.d.ts +20 -0
  237. package/dist/types/components/ui-reveal/ui-reveal.d.ts +11 -0
  238. package/dist/types/components/ui-scroll-progress/ui-scroll-progress.d.ts +8 -0
  239. package/dist/types/components/ui-section/ui-section.d.ts +9 -0
  240. package/dist/types/components/ui-select/ui-select.d.ts +21 -0
  241. package/dist/types/components/ui-separator/ui-separator.d.ts +6 -0
  242. package/dist/types/components/ui-skeleton/ui-skeleton.d.ts +3 -0
  243. package/dist/types/components/ui-slider/ui-slider.d.ts +20 -0
  244. package/dist/types/components/ui-spinner/ui-spinner.d.ts +6 -0
  245. package/dist/types/components/ui-switch/ui-switch.d.ts +12 -0
  246. package/dist/types/components/ui-tabs/ui-tabs.d.ts +15 -0
  247. package/dist/types/components/ui-textarea/ui-textarea.d.ts +22 -0
  248. package/dist/types/components/ui-theme-toggle/ui-theme-toggle.d.ts +13 -0
  249. package/dist/types/components/ui-toast/ui-toast.d.ts +28 -0
  250. package/dist/types/components/ui-toaster/ui-toaster.d.ts +19 -0
  251. package/dist/types/components/ui-tooltip/ui-tooltip.d.ts +21 -0
  252. package/dist/types/components.d.ts +1727 -0
  253. package/dist/types/index.d.ts +1 -0
  254. package/dist/types/stencil-public-runtime.d.ts +1861 -0
  255. package/dist/uikit/index.esm.js +0 -0
  256. package/dist/uikit/p-06d6d907.entry.js +1 -0
  257. package/dist/uikit/p-0fb4949b.entry.js +1 -0
  258. package/dist/uikit/p-162302d1.entry.js +1 -0
  259. package/dist/uikit/p-19b81437.entry.js +1 -0
  260. package/dist/uikit/p-24edfe3e.entry.js +1 -0
  261. package/dist/uikit/p-3d30bc7a.entry.js +1 -0
  262. package/dist/uikit/p-4382718f.entry.js +1 -0
  263. package/dist/uikit/p-4a1abc1c.entry.js +1 -0
  264. package/dist/uikit/p-57058c30.entry.js +1 -0
  265. package/dist/uikit/p-5df32809.entry.js +1 -0
  266. package/dist/uikit/p-5ea42ee5.entry.js +1 -0
  267. package/dist/uikit/p-629c1728.entry.js +1 -0
  268. package/dist/uikit/p-76f0f79f.entry.js +1 -0
  269. package/dist/uikit/p-83159bfc.entry.js +1 -0
  270. package/dist/uikit/p-8bcd423c.entry.js +1 -0
  271. package/dist/uikit/p-8cebbe65.entry.js +1 -0
  272. package/dist/uikit/p-90d49509.entry.js +1 -0
  273. package/dist/uikit/p-94fb298e.entry.js +1 -0
  274. package/dist/uikit/p-9aa557d1.entry.js +1 -0
  275. package/dist/uikit/p-9c57cf57.entry.js +1 -0
  276. package/dist/uikit/p-9d784b04.entry.js +1 -0
  277. package/dist/uikit/p-9e7b81ef.entry.js +1 -0
  278. package/dist/uikit/p-9f7c6ca8.entry.js +1 -0
  279. package/dist/uikit/p-CyBRmmbs.js +1 -0
  280. package/dist/uikit/p-DYwlrXg_.js +2 -0
  281. package/dist/uikit/p-a7be1c69.entry.js +1 -0
  282. package/dist/uikit/p-b30aa6a6.entry.js +1 -0
  283. package/dist/uikit/p-b61e3df4.entry.js +1 -0
  284. package/dist/uikit/p-c72ed105.entry.js +1 -0
  285. package/dist/uikit/p-cb2adfb7.entry.js +1 -0
  286. package/dist/uikit/p-cf10ca3b.entry.js +1 -0
  287. package/dist/uikit/p-e410c789.entry.js +1 -0
  288. package/dist/uikit/p-f7402442.entry.js +1 -0
  289. package/dist/uikit/p-fd05c146.entry.js +1 -0
  290. package/dist/uikit/p-fd1648bf.entry.js +1 -0
  291. package/dist/uikit/uikit.css +6 -0
  292. package/dist/uikit/uikit.esm.js +1 -0
  293. package/loader/cdn.js +1 -0
  294. package/loader/index.cjs.js +1 -0
  295. package/loader/index.d.ts +24 -0
  296. package/loader/index.es2017.js +1 -0
  297. package/loader/index.js +2 -0
  298. package/package.json +48 -0
@@ -0,0 +1,162 @@
1
+ import { h, Host, } from "@stencil/core";
2
+ export class UiDrawer {
3
+ constructor() {
4
+ /** Controla a abertura do painel lateral. */
5
+ this.open = false;
6
+ /** Borda onde o painel é ancorado. */
7
+ this.side = "right";
8
+ this.onClose = () => {
9
+ if (this.open) {
10
+ this.open = false;
11
+ this.uiClose.emit();
12
+ }
13
+ };
14
+ this.onBackdropClick = (event) => {
15
+ if (event.target === this.dialogEl)
16
+ this.close();
17
+ };
18
+ }
19
+ onOpenChange(value) {
20
+ this.sync(value);
21
+ }
22
+ componentDidLoad() {
23
+ this.sync(this.open);
24
+ }
25
+ sync(value) {
26
+ if (!this.dialogEl)
27
+ return;
28
+ if (value && !this.dialogEl.open)
29
+ this.dialogEl.showModal();
30
+ else if (!value && this.dialogEl.open)
31
+ this.dialogEl.close();
32
+ }
33
+ /** Abre o painel imperativamente. */
34
+ async show() {
35
+ this.open = true;
36
+ }
37
+ /** Fecha o painel imperativamente. */
38
+ async close() {
39
+ this.open = false;
40
+ }
41
+ render() {
42
+ return (h(Host, { key: '96c4f4cec0fdc9a8601448bfc9a16dda37b33507' }, h("dialog", { key: '72ef71e674d116c9d2f47bf4d997fc9d5ca1472d', class: `drawer side-${this.side}`, ref: (el) => (this.dialogEl = el), onClose: this.onClose, onCancel: this.onClose, onClick: this.onBackdropClick }, h("div", { key: '25e537c059dcc33085bd0c0c47aa39448a16176b', class: "content" }, h("slot", { key: '3c0b746055fb6f1ac6a8c0c4713aa9cd47fd1a00' })))));
43
+ }
44
+ static get is() { return "ui-drawer"; }
45
+ static get encapsulation() { return "shadow"; }
46
+ static get originalStyleUrls() {
47
+ return {
48
+ "$": ["ui-drawer.css"]
49
+ };
50
+ }
51
+ static get styleUrls() {
52
+ return {
53
+ "$": ["ui-drawer.css"]
54
+ };
55
+ }
56
+ static get properties() {
57
+ return {
58
+ "open": {
59
+ "type": "boolean",
60
+ "mutable": true,
61
+ "complexType": {
62
+ "original": "boolean",
63
+ "resolved": "boolean",
64
+ "references": {}
65
+ },
66
+ "required": false,
67
+ "optional": false,
68
+ "docs": {
69
+ "tags": [],
70
+ "text": "Controla a abertura do painel lateral."
71
+ },
72
+ "getter": false,
73
+ "setter": false,
74
+ "reflect": true,
75
+ "attribute": "open",
76
+ "defaultValue": "false"
77
+ },
78
+ "side": {
79
+ "type": "string",
80
+ "mutable": false,
81
+ "complexType": {
82
+ "original": "\"right\" | \"bottom\"",
83
+ "resolved": "\"bottom\" | \"right\"",
84
+ "references": {}
85
+ },
86
+ "required": false,
87
+ "optional": false,
88
+ "docs": {
89
+ "tags": [],
90
+ "text": "Borda onde o painel \u00E9 ancorado."
91
+ },
92
+ "getter": false,
93
+ "setter": false,
94
+ "reflect": true,
95
+ "attribute": "side",
96
+ "defaultValue": "\"right\""
97
+ }
98
+ };
99
+ }
100
+ static get events() {
101
+ return [{
102
+ "method": "uiClose",
103
+ "name": "uiClose",
104
+ "bubbles": true,
105
+ "cancelable": true,
106
+ "composed": true,
107
+ "docs": {
108
+ "tags": [],
109
+ "text": "Emitido quando o painel \u00E9 fechado (Esc, backdrop ou close())."
110
+ },
111
+ "complexType": {
112
+ "original": "void",
113
+ "resolved": "void",
114
+ "references": {}
115
+ }
116
+ }];
117
+ }
118
+ static get methods() {
119
+ return {
120
+ "show": {
121
+ "complexType": {
122
+ "signature": "() => Promise<void>",
123
+ "parameters": [],
124
+ "references": {
125
+ "Promise": {
126
+ "location": "global",
127
+ "id": "global::Promise"
128
+ }
129
+ },
130
+ "return": "Promise<void>"
131
+ },
132
+ "docs": {
133
+ "text": "Abre o painel imperativamente.",
134
+ "tags": []
135
+ }
136
+ },
137
+ "close": {
138
+ "complexType": {
139
+ "signature": "() => Promise<void>",
140
+ "parameters": [],
141
+ "references": {
142
+ "Promise": {
143
+ "location": "global",
144
+ "id": "global::Promise"
145
+ }
146
+ },
147
+ "return": "Promise<void>"
148
+ },
149
+ "docs": {
150
+ "text": "Fecha o painel imperativamente.",
151
+ "tags": []
152
+ }
153
+ }
154
+ };
155
+ }
156
+ static get watchers() {
157
+ return [{
158
+ "propName": "open",
159
+ "methodName": "onOpenChange"
160
+ }];
161
+ }
162
+ }
@@ -0,0 +1,36 @@
1
+ :host {
2
+ display: block;
3
+ }
4
+
5
+ .item {
6
+ display: flex;
7
+ align-items: center;
8
+ gap: 0.5rem;
9
+ width: 100%;
10
+ padding: 0.5rem 0.625rem;
11
+ font-family: var(--ui-font-sans);
12
+ font-size: 0.875rem;
13
+ text-align: left;
14
+ color: var(--ui-foreground);
15
+ background: transparent;
16
+ border: none;
17
+ border-radius: var(--ui-radius-sm);
18
+ cursor: pointer;
19
+ outline: none;
20
+ transition: background var(--ui-duration) var(--ui-ease);
21
+ }
22
+
23
+ .item:hover,
24
+ .item:focus-visible {
25
+ background: var(--ui-chip);
26
+ }
27
+
28
+ .item:focus-visible {
29
+ box-shadow: 0 0 0 2px var(--ui-ring);
30
+ }
31
+
32
+ .item:disabled {
33
+ pointer-events: none;
34
+ opacity: 0.5;
35
+ cursor: default;
36
+ }
@@ -0,0 +1,71 @@
1
+ import { h, Host, } from "@stencil/core";
2
+ export class UiDropdownItem {
3
+ constructor() {
4
+ /** Desabilita o item, impedindo seleção. */
5
+ this.disabled = false;
6
+ this.onClick = () => {
7
+ if (this.disabled)
8
+ return;
9
+ this.uiSelect.emit();
10
+ this.host.dispatchEvent(new CustomEvent("uiDropdownClose", { bubbles: true, composed: true }));
11
+ };
12
+ }
13
+ render() {
14
+ return (h(Host, { key: '9e88bb2a1ccec0a6c5f088cdd40a7881cba6e3ac' }, h("button", { key: '371c531f920cbd1a5374b8c6812d9b67c97e44f4', type: "button", class: "item", role: "menuitem", disabled: this.disabled, onClick: this.onClick }, h("slot", { key: 'fe16aad1402e098180719edd9110c83ee550224c' }))));
15
+ }
16
+ static get is() { return "ui-dropdown-item"; }
17
+ static get encapsulation() { return "shadow"; }
18
+ static get originalStyleUrls() {
19
+ return {
20
+ "$": ["ui-dropdown-item.css"]
21
+ };
22
+ }
23
+ static get styleUrls() {
24
+ return {
25
+ "$": ["ui-dropdown-item.css"]
26
+ };
27
+ }
28
+ static get properties() {
29
+ return {
30
+ "disabled": {
31
+ "type": "boolean",
32
+ "mutable": false,
33
+ "complexType": {
34
+ "original": "boolean",
35
+ "resolved": "boolean",
36
+ "references": {}
37
+ },
38
+ "required": false,
39
+ "optional": false,
40
+ "docs": {
41
+ "tags": [],
42
+ "text": "Desabilita o item, impedindo sele\u00E7\u00E3o."
43
+ },
44
+ "getter": false,
45
+ "setter": false,
46
+ "reflect": true,
47
+ "attribute": "disabled",
48
+ "defaultValue": "false"
49
+ }
50
+ };
51
+ }
52
+ static get events() {
53
+ return [{
54
+ "method": "uiSelect",
55
+ "name": "uiSelect",
56
+ "bubbles": true,
57
+ "cancelable": true,
58
+ "composed": true,
59
+ "docs": {
60
+ "tags": [],
61
+ "text": "Emitido quando o item \u00E9 selecionado."
62
+ },
63
+ "complexType": {
64
+ "original": "void",
65
+ "resolved": "void",
66
+ "references": {}
67
+ }
68
+ }];
69
+ }
70
+ static get elementRef() { return "host"; }
71
+ }
@@ -0,0 +1,39 @@
1
+ :host {
2
+ display: inline-block;
3
+ }
4
+
5
+ .trigger {
6
+ display: inline-flex;
7
+ }
8
+
9
+ .menu {
10
+ position: fixed;
11
+ top: 0;
12
+ left: 0;
13
+ z-index: 50;
14
+ display: flex;
15
+ flex-direction: column;
16
+ gap: 0.125rem;
17
+ min-width: 10rem;
18
+ max-width: calc(100vw - 1rem);
19
+ padding: 0.375rem;
20
+ font-family: var(--ui-font-sans);
21
+ color: var(--ui-foreground);
22
+ border: 1px solid var(--ui-border);
23
+ background: var(--ui-panel-strong);
24
+ box-shadow: var(--ui-shadow-lg);
25
+ backdrop-filter: blur(22px);
26
+ border-radius: var(--ui-radius);
27
+ visibility: hidden;
28
+ opacity: 0;
29
+ transform: scale(0.96);
30
+ transition:
31
+ opacity var(--ui-duration) var(--ui-ease),
32
+ transform var(--ui-duration) var(--ui-ease);
33
+ }
34
+
35
+ .menu.is-open {
36
+ visibility: visible;
37
+ opacity: 1;
38
+ transform: scale(1);
39
+ }
@@ -0,0 +1,216 @@
1
+ import { h, Host, } from "@stencil/core";
2
+ import { computePosition, autoUpdate, offset, flip, shift, } from "@floating-ui/dom";
3
+ export class UiDropdownMenu {
4
+ constructor() {
5
+ /** Controla a abertura do menu. */
6
+ this.open = false;
7
+ /** Posição preferida do menu relativo ao gatilho. */
8
+ this.placement = "bottom";
9
+ this.onTriggerClick = (event) => {
10
+ event.stopPropagation();
11
+ this.setOpen(!this.open);
12
+ };
13
+ this.onDocumentClick = (event) => {
14
+ if (!this.open)
15
+ return;
16
+ if (event.composedPath().includes(this.host))
17
+ return;
18
+ this.setOpen(false);
19
+ };
20
+ this.onKeydown = (event) => {
21
+ if (event.key === "Escape" && this.open)
22
+ this.setOpen(false);
23
+ };
24
+ }
25
+ onOpenChange(value) {
26
+ if (value) {
27
+ requestAnimationFrame(() => this.start());
28
+ document.addEventListener("click", this.onDocumentClick);
29
+ document.addEventListener("keydown", this.onKeydown);
30
+ }
31
+ else {
32
+ this.stop();
33
+ document.removeEventListener("click", this.onDocumentClick);
34
+ document.removeEventListener("keydown", this.onKeydown);
35
+ }
36
+ }
37
+ disconnectedCallback() {
38
+ this.stop();
39
+ document.removeEventListener("click", this.onDocumentClick);
40
+ document.removeEventListener("keydown", this.onKeydown);
41
+ }
42
+ /** Abre o menu imperativamente. */
43
+ async show() {
44
+ this.setOpen(true);
45
+ }
46
+ /** Fecha o menu imperativamente. */
47
+ async close() {
48
+ this.setOpen(false);
49
+ }
50
+ onItemClose() {
51
+ this.setOpen(false);
52
+ }
53
+ setOpen(value) {
54
+ if (this.open === value)
55
+ return;
56
+ this.open = value;
57
+ this.uiOpenChange.emit(value);
58
+ }
59
+ start() {
60
+ if (!this.triggerEl || !this.floatingEl)
61
+ return;
62
+ this.stop();
63
+ this.cleanup = autoUpdate(this.triggerEl, this.floatingEl, () => {
64
+ if (!this.triggerEl || !this.floatingEl)
65
+ return;
66
+ computePosition(this.triggerEl, this.floatingEl, {
67
+ placement: this.placement,
68
+ middleware: [offset(8), flip(), shift({ padding: 8 })],
69
+ }).then(({ x, y }) => {
70
+ Object.assign(this.floatingEl.style, { left: `${x}px`, top: `${y}px` });
71
+ });
72
+ });
73
+ }
74
+ stop() {
75
+ this.cleanup?.();
76
+ this.cleanup = undefined;
77
+ }
78
+ render() {
79
+ return (h(Host, { key: '83694eb278f8a9c711ae30677254a4168dbd825f' }, h("span", { key: 'dabab12417ed473e22097578c07842f36a05e397', class: "trigger", ref: (el) => (this.triggerEl = el), onClick: this.onTriggerClick }, h("slot", { key: '6e3b0f1c2c83a48c0c70a2416c6e0ac34b05c68e', name: "trigger" })), h("div", { key: '2b6059c9bfa98c6f5bc9656d86ffeaf1009a887b', class: { menu: true, "is-open": this.open }, role: "menu", ref: (el) => (this.floatingEl = el) }, h("slot", { key: 'af01e24903f705ef30174ba37735d774b8e5aa99' }))));
80
+ }
81
+ static get is() { return "ui-dropdown-menu"; }
82
+ static get encapsulation() { return "shadow"; }
83
+ static get originalStyleUrls() {
84
+ return {
85
+ "$": ["ui-dropdown-menu.css"]
86
+ };
87
+ }
88
+ static get styleUrls() {
89
+ return {
90
+ "$": ["ui-dropdown-menu.css"]
91
+ };
92
+ }
93
+ static get properties() {
94
+ return {
95
+ "open": {
96
+ "type": "boolean",
97
+ "mutable": true,
98
+ "complexType": {
99
+ "original": "boolean",
100
+ "resolved": "boolean",
101
+ "references": {}
102
+ },
103
+ "required": false,
104
+ "optional": false,
105
+ "docs": {
106
+ "tags": [],
107
+ "text": "Controla a abertura do menu."
108
+ },
109
+ "getter": false,
110
+ "setter": false,
111
+ "reflect": true,
112
+ "attribute": "open",
113
+ "defaultValue": "false"
114
+ },
115
+ "placement": {
116
+ "type": "string",
117
+ "mutable": false,
118
+ "complexType": {
119
+ "original": "Placement",
120
+ "resolved": "\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"",
121
+ "references": {
122
+ "Placement": {
123
+ "location": "import",
124
+ "path": "@floating-ui/dom",
125
+ "id": "../../node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts::Placement",
126
+ "referenceLocation": "Placement"
127
+ }
128
+ }
129
+ },
130
+ "required": false,
131
+ "optional": false,
132
+ "docs": {
133
+ "tags": [],
134
+ "text": "Posi\u00E7\u00E3o preferida do menu relativo ao gatilho."
135
+ },
136
+ "getter": false,
137
+ "setter": false,
138
+ "reflect": false,
139
+ "attribute": "placement",
140
+ "defaultValue": "\"bottom\""
141
+ }
142
+ };
143
+ }
144
+ static get events() {
145
+ return [{
146
+ "method": "uiOpenChange",
147
+ "name": "uiOpenChange",
148
+ "bubbles": true,
149
+ "cancelable": true,
150
+ "composed": true,
151
+ "docs": {
152
+ "tags": [],
153
+ "text": "Emitido quando o estado de abertura muda."
154
+ },
155
+ "complexType": {
156
+ "original": "boolean",
157
+ "resolved": "boolean",
158
+ "references": {}
159
+ }
160
+ }];
161
+ }
162
+ static get methods() {
163
+ return {
164
+ "show": {
165
+ "complexType": {
166
+ "signature": "() => Promise<void>",
167
+ "parameters": [],
168
+ "references": {
169
+ "Promise": {
170
+ "location": "global",
171
+ "id": "global::Promise"
172
+ }
173
+ },
174
+ "return": "Promise<void>"
175
+ },
176
+ "docs": {
177
+ "text": "Abre o menu imperativamente.",
178
+ "tags": []
179
+ }
180
+ },
181
+ "close": {
182
+ "complexType": {
183
+ "signature": "() => Promise<void>",
184
+ "parameters": [],
185
+ "references": {
186
+ "Promise": {
187
+ "location": "global",
188
+ "id": "global::Promise"
189
+ }
190
+ },
191
+ "return": "Promise<void>"
192
+ },
193
+ "docs": {
194
+ "text": "Fecha o menu imperativamente.",
195
+ "tags": []
196
+ }
197
+ }
198
+ };
199
+ }
200
+ static get elementRef() { return "host"; }
201
+ static get watchers() {
202
+ return [{
203
+ "propName": "open",
204
+ "methodName": "onOpenChange"
205
+ }];
206
+ }
207
+ static get listeners() {
208
+ return [{
209
+ "name": "uiDropdownClose",
210
+ "method": "onItemClose",
211
+ "target": undefined,
212
+ "capture": false,
213
+ "passive": false
214
+ }];
215
+ }
216
+ }
@@ -0,0 +1,34 @@
1
+ :host {
2
+ display: block;
3
+ }
4
+
5
+ .field {
6
+ display: flex;
7
+ flex-direction: column;
8
+ gap: 0.375rem;
9
+ }
10
+
11
+ .label {
12
+ font-family: var(--ui-font-sans);
13
+ font-size: 0.875rem;
14
+ font-weight: 500;
15
+ color: var(--ui-foreground);
16
+ }
17
+
18
+ .required {
19
+ color: var(--ui-danger);
20
+ }
21
+
22
+ .error {
23
+ margin: 0;
24
+ font-family: var(--ui-font-sans);
25
+ font-size: 0.75rem;
26
+ color: var(--ui-danger);
27
+ }
28
+
29
+ .description {
30
+ margin: 0;
31
+ font-family: var(--ui-font-sans);
32
+ font-size: 0.75rem;
33
+ color: var(--ui-text-muted);
34
+ }
@@ -0,0 +1,122 @@
1
+ import { h, Host } from "@stencil/core";
2
+ export class UiField {
3
+ constructor() {
4
+ /** Marca o campo como obrigatório (asterisco). */
5
+ this.required = false;
6
+ }
7
+ render() {
8
+ return (h(Host, { key: '1f944085a10d6c795ce06a7a91021fee46780347' }, h("div", { key: 'a2f2fde238292d543c65bf6e1ed0dfd0dce424f9', class: "field" }, this.label && (h("label", { key: '4f450b5e43f1ea8dda3b3134022a010391a2f404', class: "label", htmlFor: this.fieldId }, this.label, this.required && (h("span", { key: '1853d16b19752584b646a294dcbe2b8359ec12b4', class: "required", "aria-hidden": "true" }, " *")))), h("slot", { key: '75adc24c2264e3e954618737769232535caa13e4' }), this.error ? (h("p", { class: "error", role: "alert" }, this.error)) : (this.description && h("p", { class: "description" }, this.description)))));
9
+ }
10
+ static get is() { return "ui-field"; }
11
+ static get encapsulation() { return "shadow"; }
12
+ static get originalStyleUrls() {
13
+ return {
14
+ "$": ["ui-field.css"]
15
+ };
16
+ }
17
+ static get styleUrls() {
18
+ return {
19
+ "$": ["ui-field.css"]
20
+ };
21
+ }
22
+ static get properties() {
23
+ return {
24
+ "label": {
25
+ "type": "string",
26
+ "mutable": false,
27
+ "complexType": {
28
+ "original": "string",
29
+ "resolved": "string | undefined",
30
+ "references": {}
31
+ },
32
+ "required": false,
33
+ "optional": true,
34
+ "docs": {
35
+ "tags": [],
36
+ "text": "Texto do r\u00F3tulo."
37
+ },
38
+ "getter": false,
39
+ "setter": false,
40
+ "reflect": false,
41
+ "attribute": "label"
42
+ },
43
+ "description": {
44
+ "type": "string",
45
+ "mutable": false,
46
+ "complexType": {
47
+ "original": "string",
48
+ "resolved": "string | undefined",
49
+ "references": {}
50
+ },
51
+ "required": false,
52
+ "optional": true,
53
+ "docs": {
54
+ "tags": [],
55
+ "text": "Texto auxiliar exibido abaixo do controle."
56
+ },
57
+ "getter": false,
58
+ "setter": false,
59
+ "reflect": false,
60
+ "attribute": "description"
61
+ },
62
+ "error": {
63
+ "type": "string",
64
+ "mutable": false,
65
+ "complexType": {
66
+ "original": "string",
67
+ "resolved": "string | undefined",
68
+ "references": {}
69
+ },
70
+ "required": false,
71
+ "optional": true,
72
+ "docs": {
73
+ "tags": [],
74
+ "text": "Mensagem de erro; quando presente substitui a descri\u00E7\u00E3o."
75
+ },
76
+ "getter": false,
77
+ "setter": false,
78
+ "reflect": false,
79
+ "attribute": "error"
80
+ },
81
+ "required": {
82
+ "type": "boolean",
83
+ "mutable": false,
84
+ "complexType": {
85
+ "original": "boolean",
86
+ "resolved": "boolean",
87
+ "references": {}
88
+ },
89
+ "required": false,
90
+ "optional": false,
91
+ "docs": {
92
+ "tags": [],
93
+ "text": "Marca o campo como obrigat\u00F3rio (asterisco)."
94
+ },
95
+ "getter": false,
96
+ "setter": false,
97
+ "reflect": false,
98
+ "attribute": "required",
99
+ "defaultValue": "false"
100
+ },
101
+ "fieldId": {
102
+ "type": "string",
103
+ "mutable": false,
104
+ "complexType": {
105
+ "original": "string",
106
+ "resolved": "string | undefined",
107
+ "references": {}
108
+ },
109
+ "required": false,
110
+ "optional": true,
111
+ "docs": {
112
+ "tags": [],
113
+ "text": "Id do controle associado ao r\u00F3tulo."
114
+ },
115
+ "getter": false,
116
+ "setter": false,
117
+ "reflect": false,
118
+ "attribute": "field-id"
119
+ }
120
+ };
121
+ }
122
+ }