@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,40 @@
1
+ :host {
2
+ display: block;
3
+ }
4
+
5
+ .input {
6
+ width: 100%;
7
+ height: 2.75rem;
8
+ padding: 0 1rem;
9
+ border: 1px solid var(--ui-border);
10
+ border-radius: var(--ui-radius-sm);
11
+ background: var(--ui-panel);
12
+ color: var(--ui-foreground);
13
+ font-family: var(--ui-font-sans);
14
+ font-size: 0.875rem;
15
+ outline: none;
16
+ backdrop-filter: blur(22px);
17
+ transition: all var(--ui-duration) var(--ui-ease);
18
+ box-sizing: border-box;
19
+ }
20
+
21
+ .input::placeholder {
22
+ color: var(--ui-text-faint);
23
+ }
24
+
25
+ .input:focus-visible {
26
+ border-color: var(--ui-accent);
27
+ box-shadow: 0 0 0 2px var(--ui-ring);
28
+ }
29
+
30
+ .input:disabled {
31
+ opacity: 0.5;
32
+ pointer-events: none;
33
+ }
34
+
35
+ .input.invalid {
36
+ border-color: var(--ui-danger);
37
+ }
38
+ .input.invalid:focus-visible {
39
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--ui-danger) 40%, transparent);
40
+ }
@@ -0,0 +1,191 @@
1
+ import { h, Host } from "@stencil/core";
2
+ export class UiInput {
3
+ constructor() {
4
+ /** Valor do campo. */
5
+ this.value = "";
6
+ /** Tipo do input nativo. */
7
+ this.type = "text";
8
+ /** Desabilita o campo. */
9
+ this.disabled = false;
10
+ /** Marca o campo como inválido (estilo + aria-invalid). */
11
+ this.invalid = false;
12
+ this.onInput = (event) => {
13
+ const target = event.target;
14
+ this.value = target.value;
15
+ this.uiInput.emit(target.value);
16
+ };
17
+ this.onChange = (event) => {
18
+ this.uiChange.emit(event.target.value);
19
+ };
20
+ }
21
+ render() {
22
+ return (h(Host, { key: 'e2ca2973fb898cde6988d2422f8b346662caf375' }, h("input", { key: '6e2b0358dc583f448a71f95f319d0fd675536c60', class: { input: true, invalid: this.invalid }, type: this.type, value: this.value, name: this.name, placeholder: this.placeholder, disabled: this.disabled, "aria-invalid": this.invalid ? "true" : null, onInput: this.onInput, onChange: this.onChange })));
23
+ }
24
+ static get is() { return "ui-input"; }
25
+ static get encapsulation() { return "shadow"; }
26
+ static get originalStyleUrls() {
27
+ return {
28
+ "$": ["ui-input.css"]
29
+ };
30
+ }
31
+ static get styleUrls() {
32
+ return {
33
+ "$": ["ui-input.css"]
34
+ };
35
+ }
36
+ static get properties() {
37
+ return {
38
+ "value": {
39
+ "type": "string",
40
+ "mutable": true,
41
+ "complexType": {
42
+ "original": "string",
43
+ "resolved": "string",
44
+ "references": {}
45
+ },
46
+ "required": false,
47
+ "optional": false,
48
+ "docs": {
49
+ "tags": [],
50
+ "text": "Valor do campo."
51
+ },
52
+ "getter": false,
53
+ "setter": false,
54
+ "reflect": false,
55
+ "attribute": "value",
56
+ "defaultValue": "\"\""
57
+ },
58
+ "placeholder": {
59
+ "type": "string",
60
+ "mutable": false,
61
+ "complexType": {
62
+ "original": "string",
63
+ "resolved": "string | undefined",
64
+ "references": {}
65
+ },
66
+ "required": false,
67
+ "optional": true,
68
+ "docs": {
69
+ "tags": [],
70
+ "text": "Placeholder."
71
+ },
72
+ "getter": false,
73
+ "setter": false,
74
+ "reflect": false,
75
+ "attribute": "placeholder"
76
+ },
77
+ "type": {
78
+ "type": "string",
79
+ "mutable": false,
80
+ "complexType": {
81
+ "original": "string",
82
+ "resolved": "string",
83
+ "references": {}
84
+ },
85
+ "required": false,
86
+ "optional": false,
87
+ "docs": {
88
+ "tags": [],
89
+ "text": "Tipo do input nativo."
90
+ },
91
+ "getter": false,
92
+ "setter": false,
93
+ "reflect": false,
94
+ "attribute": "type",
95
+ "defaultValue": "\"text\""
96
+ },
97
+ "disabled": {
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": "Desabilita o campo."
110
+ },
111
+ "getter": false,
112
+ "setter": false,
113
+ "reflect": false,
114
+ "attribute": "disabled",
115
+ "defaultValue": "false"
116
+ },
117
+ "invalid": {
118
+ "type": "boolean",
119
+ "mutable": false,
120
+ "complexType": {
121
+ "original": "boolean",
122
+ "resolved": "boolean",
123
+ "references": {}
124
+ },
125
+ "required": false,
126
+ "optional": false,
127
+ "docs": {
128
+ "tags": [],
129
+ "text": "Marca o campo como inv\u00E1lido (estilo + aria-invalid)."
130
+ },
131
+ "getter": false,
132
+ "setter": false,
133
+ "reflect": false,
134
+ "attribute": "invalid",
135
+ "defaultValue": "false"
136
+ },
137
+ "name": {
138
+ "type": "string",
139
+ "mutable": false,
140
+ "complexType": {
141
+ "original": "string",
142
+ "resolved": "string | undefined",
143
+ "references": {}
144
+ },
145
+ "required": false,
146
+ "optional": true,
147
+ "docs": {
148
+ "tags": [],
149
+ "text": "Nome do campo."
150
+ },
151
+ "getter": false,
152
+ "setter": false,
153
+ "reflect": false,
154
+ "attribute": "name"
155
+ }
156
+ };
157
+ }
158
+ static get events() {
159
+ return [{
160
+ "method": "uiInput",
161
+ "name": "uiInput",
162
+ "bubbles": true,
163
+ "cancelable": true,
164
+ "composed": true,
165
+ "docs": {
166
+ "tags": [],
167
+ "text": "Emitido a cada digita\u00E7\u00E3o."
168
+ },
169
+ "complexType": {
170
+ "original": "string",
171
+ "resolved": "string",
172
+ "references": {}
173
+ }
174
+ }, {
175
+ "method": "uiChange",
176
+ "name": "uiChange",
177
+ "bubbles": true,
178
+ "cancelable": true,
179
+ "composed": true,
180
+ "docs": {
181
+ "tags": [],
182
+ "text": "Emitido ao confirmar (change)."
183
+ },
184
+ "complexType": {
185
+ "original": "string",
186
+ "resolved": "string",
187
+ "references": {}
188
+ }
189
+ }];
190
+ }
191
+ }
@@ -0,0 +1,10 @@
1
+ :host {
2
+ display: inline-block;
3
+ }
4
+
5
+ .label {
6
+ font-family: var(--ui-font-sans);
7
+ font-size: 0.875rem;
8
+ font-weight: 500;
9
+ color: var(--ui-foreground);
10
+ }
@@ -0,0 +1,18 @@
1
+ import { h, Host } from "@stencil/core";
2
+ export class UiLabel {
3
+ render() {
4
+ return (h(Host, { key: 'bb726d8b26a82776e688532b6fbe69c178308c75' }, h("label", { key: 'bfd33ad1561fcee62395be37e83894cdce0ec259', class: "label" }, h("slot", { key: 'c0ac5938df3aea7219a59caf46cb7cd152046770' }))));
5
+ }
6
+ static get is() { return "ui-label"; }
7
+ static get encapsulation() { return "shadow"; }
8
+ static get originalStyleUrls() {
9
+ return {
10
+ "$": ["ui-label.css"]
11
+ };
12
+ }
13
+ static get styleUrls() {
14
+ return {
15
+ "$": ["ui-label.css"]
16
+ };
17
+ }
18
+ }
@@ -0,0 +1,24 @@
1
+ :host {
2
+ display: contents;
3
+ }
4
+
5
+ .overlay {
6
+ position: absolute;
7
+ inset: 0;
8
+ z-index: 40;
9
+ display: flex;
10
+ flex-direction: column;
11
+ align-items: center;
12
+ justify-content: center;
13
+ gap: 0.75rem;
14
+ background: var(--ui-overlay);
15
+ backdrop-filter: blur(4px);
16
+ border-radius: inherit;
17
+ font-family: var(--ui-font-sans);
18
+ }
19
+
20
+ .label {
21
+ margin: 0;
22
+ font-size: 0.875rem;
23
+ color: var(--ui-text-soft);
24
+ }
@@ -0,0 +1,102 @@
1
+ import { h, Host } from "@stencil/core";
2
+ /**
3
+ * Sobreposição de carregamento que cobre o elemento pai.
4
+ * O host pai deve ter `position: relative` para que a sobreposição
5
+ * absoluta (inset 0) o cubra corretamente.
6
+ */
7
+ export class UiLoadingOverlay {
8
+ constructor() {
9
+ /** Controla a exibição da sobreposição. */
10
+ this.visible = false;
11
+ /** Tamanho do spinner. */
12
+ this.spinnerSize = "md";
13
+ }
14
+ render() {
15
+ if (!this.visible) {
16
+ return h(Host, null);
17
+ }
18
+ return (h(Host, { role: "status", "aria-live": "polite" }, h("div", { class: "overlay" }, h("ui-spinner", { size: this.spinnerSize }), this.label && h("p", { class: "label" }, this.label))));
19
+ }
20
+ static get is() { return "ui-loading-overlay"; }
21
+ static get encapsulation() { return "shadow"; }
22
+ static get originalStyleUrls() {
23
+ return {
24
+ "$": ["ui-loading-overlay.css"]
25
+ };
26
+ }
27
+ static get styleUrls() {
28
+ return {
29
+ "$": ["ui-loading-overlay.css"]
30
+ };
31
+ }
32
+ static get properties() {
33
+ return {
34
+ "visible": {
35
+ "type": "boolean",
36
+ "mutable": false,
37
+ "complexType": {
38
+ "original": "boolean",
39
+ "resolved": "boolean",
40
+ "references": {}
41
+ },
42
+ "required": false,
43
+ "optional": false,
44
+ "docs": {
45
+ "tags": [],
46
+ "text": "Controla a exibi\u00E7\u00E3o da sobreposi\u00E7\u00E3o."
47
+ },
48
+ "getter": false,
49
+ "setter": false,
50
+ "reflect": false,
51
+ "attribute": "visible",
52
+ "defaultValue": "false"
53
+ },
54
+ "label": {
55
+ "type": "string",
56
+ "mutable": false,
57
+ "complexType": {
58
+ "original": "string",
59
+ "resolved": "string | undefined",
60
+ "references": {}
61
+ },
62
+ "required": false,
63
+ "optional": true,
64
+ "docs": {
65
+ "tags": [],
66
+ "text": "Texto opcional exibido abaixo do spinner."
67
+ },
68
+ "getter": false,
69
+ "setter": false,
70
+ "reflect": false,
71
+ "attribute": "label"
72
+ },
73
+ "spinnerSize": {
74
+ "type": "string",
75
+ "mutable": false,
76
+ "complexType": {
77
+ "original": "UiSpinnerSize",
78
+ "resolved": "\"lg\" | \"md\" | \"sm\"",
79
+ "references": {
80
+ "UiSpinnerSize": {
81
+ "location": "import",
82
+ "path": "../ui-spinner/ui-spinner",
83
+ "id": "src/components/ui-spinner/ui-spinner.tsx::UiSpinnerSize",
84
+ "referenceLocation": "UiSpinnerSize"
85
+ }
86
+ }
87
+ },
88
+ "required": false,
89
+ "optional": false,
90
+ "docs": {
91
+ "tags": [],
92
+ "text": "Tamanho do spinner."
93
+ },
94
+ "getter": false,
95
+ "setter": false,
96
+ "reflect": false,
97
+ "attribute": "spinner-size",
98
+ "defaultValue": "\"md\""
99
+ }
100
+ };
101
+ }
102
+ }
@@ -0,0 +1,36 @@
1
+ :host {
2
+ display: inline-block;
3
+ }
4
+
5
+ .trigger {
6
+ display: inline-flex;
7
+ }
8
+
9
+ .panel {
10
+ position: fixed;
11
+ top: 0;
12
+ left: 0;
13
+ z-index: 50;
14
+ width: 18rem;
15
+ max-width: calc(100vw - 1rem);
16
+ padding: 1rem;
17
+ font-family: var(--ui-font-sans);
18
+ color: var(--ui-foreground);
19
+ border: 1px solid var(--ui-border);
20
+ background: var(--ui-panel-strong);
21
+ box-shadow: var(--ui-shadow-lg);
22
+ backdrop-filter: blur(22px);
23
+ border-radius: var(--ui-radius);
24
+ visibility: hidden;
25
+ opacity: 0;
26
+ transform: scale(0.96);
27
+ transition:
28
+ opacity var(--ui-duration) var(--ui-ease),
29
+ transform var(--ui-duration) var(--ui-ease);
30
+ }
31
+
32
+ .panel.is-open {
33
+ visibility: visible;
34
+ opacity: 1;
35
+ transform: scale(1);
36
+ }
@@ -0,0 +1,204 @@
1
+ import { h, Host, } from "@stencil/core";
2
+ import { computePosition, autoUpdate, offset, flip, shift, } from "@floating-ui/dom";
3
+ export class UiPopover {
4
+ constructor() {
5
+ /** Controla a abertura do conteúdo flutuante. */
6
+ this.open = false;
7
+ /** Posição preferida do conteúdo 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 popover imperativamente. */
43
+ async show() {
44
+ this.setOpen(true);
45
+ }
46
+ /** Fecha o popover imperativamente. */
47
+ async close() {
48
+ this.setOpen(false);
49
+ }
50
+ setOpen(value) {
51
+ if (this.open === value)
52
+ return;
53
+ this.open = value;
54
+ this.uiOpenChange.emit(value);
55
+ }
56
+ start() {
57
+ if (!this.triggerEl || !this.floatingEl)
58
+ return;
59
+ this.stop();
60
+ this.cleanup = autoUpdate(this.triggerEl, this.floatingEl, () => {
61
+ if (!this.triggerEl || !this.floatingEl)
62
+ return;
63
+ computePosition(this.triggerEl, this.floatingEl, {
64
+ placement: this.placement,
65
+ middleware: [offset(8), flip(), shift({ padding: 8 })],
66
+ }).then(({ x, y }) => {
67
+ Object.assign(this.floatingEl.style, { left: `${x}px`, top: `${y}px` });
68
+ });
69
+ });
70
+ }
71
+ stop() {
72
+ this.cleanup?.();
73
+ this.cleanup = undefined;
74
+ }
75
+ render() {
76
+ return (h(Host, { key: '193a3f6fb440dc2da1837c2387511d38f71e7da3' }, h("span", { key: '8732b0b40340e39ac26b80e38864438cf9bf01cc', class: "trigger", ref: (el) => (this.triggerEl = el), onClick: this.onTriggerClick }, h("slot", { key: 'd51743b5fa62e8fd5c5639ba2d9681caa8556fb0', name: "trigger" })), h("div", { key: 'a2ae9fd5bb67dc1ad4243ac478ecc11cb4c28665', class: { panel: true, "is-open": this.open }, ref: (el) => (this.floatingEl = el) }, h("slot", { key: '655d8b979962d25dabe8497516be51199ce16452' }))));
77
+ }
78
+ static get is() { return "ui-popover"; }
79
+ static get encapsulation() { return "shadow"; }
80
+ static get originalStyleUrls() {
81
+ return {
82
+ "$": ["ui-popover.css"]
83
+ };
84
+ }
85
+ static get styleUrls() {
86
+ return {
87
+ "$": ["ui-popover.css"]
88
+ };
89
+ }
90
+ static get properties() {
91
+ return {
92
+ "open": {
93
+ "type": "boolean",
94
+ "mutable": true,
95
+ "complexType": {
96
+ "original": "boolean",
97
+ "resolved": "boolean",
98
+ "references": {}
99
+ },
100
+ "required": false,
101
+ "optional": false,
102
+ "docs": {
103
+ "tags": [],
104
+ "text": "Controla a abertura do conte\u00FAdo flutuante."
105
+ },
106
+ "getter": false,
107
+ "setter": false,
108
+ "reflect": true,
109
+ "attribute": "open",
110
+ "defaultValue": "false"
111
+ },
112
+ "placement": {
113
+ "type": "string",
114
+ "mutable": false,
115
+ "complexType": {
116
+ "original": "Placement",
117
+ "resolved": "\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"",
118
+ "references": {
119
+ "Placement": {
120
+ "location": "import",
121
+ "path": "@floating-ui/dom",
122
+ "id": "../../node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts::Placement",
123
+ "referenceLocation": "Placement"
124
+ }
125
+ }
126
+ },
127
+ "required": false,
128
+ "optional": false,
129
+ "docs": {
130
+ "tags": [],
131
+ "text": "Posi\u00E7\u00E3o preferida do conte\u00FAdo relativo ao gatilho."
132
+ },
133
+ "getter": false,
134
+ "setter": false,
135
+ "reflect": false,
136
+ "attribute": "placement",
137
+ "defaultValue": "\"bottom\""
138
+ }
139
+ };
140
+ }
141
+ static get events() {
142
+ return [{
143
+ "method": "uiOpenChange",
144
+ "name": "uiOpenChange",
145
+ "bubbles": true,
146
+ "cancelable": true,
147
+ "composed": true,
148
+ "docs": {
149
+ "tags": [],
150
+ "text": "Emitido quando o estado de abertura muda."
151
+ },
152
+ "complexType": {
153
+ "original": "boolean",
154
+ "resolved": "boolean",
155
+ "references": {}
156
+ }
157
+ }];
158
+ }
159
+ static get methods() {
160
+ return {
161
+ "show": {
162
+ "complexType": {
163
+ "signature": "() => Promise<void>",
164
+ "parameters": [],
165
+ "references": {
166
+ "Promise": {
167
+ "location": "global",
168
+ "id": "global::Promise"
169
+ }
170
+ },
171
+ "return": "Promise<void>"
172
+ },
173
+ "docs": {
174
+ "text": "Abre o popover imperativamente.",
175
+ "tags": []
176
+ }
177
+ },
178
+ "close": {
179
+ "complexType": {
180
+ "signature": "() => Promise<void>",
181
+ "parameters": [],
182
+ "references": {
183
+ "Promise": {
184
+ "location": "global",
185
+ "id": "global::Promise"
186
+ }
187
+ },
188
+ "return": "Promise<void>"
189
+ },
190
+ "docs": {
191
+ "text": "Fecha o popover imperativamente.",
192
+ "tags": []
193
+ }
194
+ }
195
+ };
196
+ }
197
+ static get elementRef() { return "host"; }
198
+ static get watchers() {
199
+ return [{
200
+ "propName": "open",
201
+ "methodName": "onOpenChange"
202
+ }];
203
+ }
204
+ }
@@ -0,0 +1,32 @@
1
+ :host {
2
+ display: block;
3
+ }
4
+
5
+ .track {
6
+ width: 100%;
7
+ height: 0.5rem;
8
+ border-radius: var(--ui-radius-full);
9
+ background: var(--ui-chip);
10
+ overflow: hidden;
11
+ }
12
+
13
+ .indicator {
14
+ height: 100%;
15
+ border-radius: var(--ui-radius-full);
16
+ background: var(--ui-accent);
17
+ transition: width var(--ui-duration) var(--ui-ease);
18
+ }
19
+
20
+ .indicator.indeterminate {
21
+ width: 40%;
22
+ animation: ui-progress-slide 1.2s ease-in-out infinite;
23
+ }
24
+
25
+ @keyframes ui-progress-slide {
26
+ 0% {
27
+ transform: translateX(-100%);
28
+ }
29
+ 100% {
30
+ transform: translateX(250%);
31
+ }
32
+ }