@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,100 @@
1
+ import { h, Host } from "@stencil/core";
2
+ export class UiProgress {
3
+ constructor() {
4
+ /** Valor atual do progresso. `null` torna o componente indeterminado. */
5
+ this.value = null;
6
+ /** Valor máximo. */
7
+ this.max = 100;
8
+ /** Força o estado indeterminado. */
9
+ this.indeterminate = false;
10
+ }
11
+ get isIndeterminate() {
12
+ return this.indeterminate || this.value === null;
13
+ }
14
+ get percent() {
15
+ if (this.value === null || this.max <= 0)
16
+ return 0;
17
+ const clamped = Math.min(Math.max(this.value, 0), this.max);
18
+ return (clamped / this.max) * 100;
19
+ }
20
+ render() {
21
+ const determinate = !this.isIndeterminate;
22
+ return (h(Host, { key: '0be3e6f551bf5401e033a7faba2787eb4166eb0a', role: "progressbar", "aria-valuenow": determinate ? String(this.value) : undefined, "aria-valuemin": determinate ? "0" : undefined, "aria-valuemax": determinate ? String(this.max) : undefined }, h("div", { key: '89151bf96326053ce60b71a2f2f9b6c13d721e39', class: "track" }, h("div", { key: '2cdf8f8cbbe7729813e8e78b671fc43b7ebec153', class: { indicator: true, indeterminate: this.isIndeterminate }, style: determinate ? { width: `${this.percent}%` } : undefined }))));
23
+ }
24
+ static get is() { return "ui-progress"; }
25
+ static get encapsulation() { return "shadow"; }
26
+ static get originalStyleUrls() {
27
+ return {
28
+ "$": ["ui-progress.css"]
29
+ };
30
+ }
31
+ static get styleUrls() {
32
+ return {
33
+ "$": ["ui-progress.css"]
34
+ };
35
+ }
36
+ static get properties() {
37
+ return {
38
+ "value": {
39
+ "type": "number",
40
+ "mutable": false,
41
+ "complexType": {
42
+ "original": "number | null",
43
+ "resolved": "null | number",
44
+ "references": {}
45
+ },
46
+ "required": false,
47
+ "optional": false,
48
+ "docs": {
49
+ "tags": [],
50
+ "text": "Valor atual do progresso. `null` torna o componente indeterminado."
51
+ },
52
+ "getter": false,
53
+ "setter": false,
54
+ "reflect": false,
55
+ "attribute": "value",
56
+ "defaultValue": "null"
57
+ },
58
+ "max": {
59
+ "type": "number",
60
+ "mutable": false,
61
+ "complexType": {
62
+ "original": "number",
63
+ "resolved": "number",
64
+ "references": {}
65
+ },
66
+ "required": false,
67
+ "optional": false,
68
+ "docs": {
69
+ "tags": [],
70
+ "text": "Valor m\u00E1ximo."
71
+ },
72
+ "getter": false,
73
+ "setter": false,
74
+ "reflect": false,
75
+ "attribute": "max",
76
+ "defaultValue": "100"
77
+ },
78
+ "indeterminate": {
79
+ "type": "boolean",
80
+ "mutable": false,
81
+ "complexType": {
82
+ "original": "boolean",
83
+ "resolved": "boolean",
84
+ "references": {}
85
+ },
86
+ "required": false,
87
+ "optional": false,
88
+ "docs": {
89
+ "tags": [],
90
+ "text": "For\u00E7a o estado indeterminado."
91
+ },
92
+ "getter": false,
93
+ "setter": false,
94
+ "reflect": false,
95
+ "attribute": "indeterminate",
96
+ "defaultValue": "false"
97
+ }
98
+ };
99
+ }
100
+ }
@@ -0,0 +1,67 @@
1
+ :host {
2
+ display: block;
3
+ }
4
+
5
+ .group {
6
+ display: flex;
7
+ flex-direction: column;
8
+ gap: 0.5rem;
9
+ }
10
+
11
+ .radio {
12
+ display: inline-flex;
13
+ align-items: center;
14
+ gap: 0.625rem;
15
+ padding: 0;
16
+ border: none;
17
+ background: transparent;
18
+ color: var(--ui-foreground);
19
+ font-family: var(--ui-font-sans);
20
+ font-size: 0.875rem;
21
+ cursor: pointer;
22
+ outline: none;
23
+ }
24
+
25
+ .radio:disabled {
26
+ opacity: 0.5;
27
+ pointer-events: none;
28
+ }
29
+
30
+ .indicator {
31
+ display: inline-flex;
32
+ align-items: center;
33
+ justify-content: center;
34
+ width: 1.25rem;
35
+ height: 1.25rem;
36
+ border: 1px solid var(--ui-border-strong);
37
+ border-radius: var(--ui-radius-full);
38
+ background: var(--ui-panel);
39
+ transition: all var(--ui-duration) var(--ui-ease);
40
+ }
41
+
42
+ .radio:focus-visible .indicator {
43
+ box-shadow: 0 0 0 2px var(--ui-background), 0 0 0 4px var(--ui-ring);
44
+ }
45
+
46
+ .radio[aria-checked="true"] .indicator {
47
+ border-color: var(--ui-accent);
48
+ }
49
+
50
+ .dot {
51
+ width: 0.625rem;
52
+ height: 0.625rem;
53
+ border-radius: var(--ui-radius-full);
54
+ background: var(--ui-accent);
55
+ opacity: 0;
56
+ transform: scale(0.4);
57
+ transition: all var(--ui-duration) var(--ui-ease);
58
+ }
59
+
60
+ .radio[aria-checked="true"] .dot {
61
+ opacity: 1;
62
+ transform: scale(1);
63
+ }
64
+
65
+ .label {
66
+ line-height: 1.25rem;
67
+ }
@@ -0,0 +1,155 @@
1
+ import { h, Host } from "@stencil/core";
2
+ export class UiRadioGroup {
3
+ constructor() {
4
+ /** Opções disponíveis. */
5
+ this.options = [];
6
+ /** Desabilita o grupo. */
7
+ this.disabled = false;
8
+ this.select = (value) => {
9
+ if (this.disabled || value === this.value)
10
+ return;
11
+ this.value = value;
12
+ this.uiChange.emit(value);
13
+ };
14
+ this.onKeyDown = (event, index) => {
15
+ if (this.disabled)
16
+ return;
17
+ const total = this.options.length;
18
+ if (total === 0)
19
+ return;
20
+ let next = -1;
21
+ if (event.key === "ArrowDown" || event.key === "ArrowRight") {
22
+ next = (index + 1) % total;
23
+ }
24
+ else if (event.key === "ArrowUp" || event.key === "ArrowLeft") {
25
+ next = (index - 1 + total) % total;
26
+ }
27
+ if (next >= 0) {
28
+ event.preventDefault();
29
+ this.select(this.options[next].value);
30
+ }
31
+ };
32
+ }
33
+ render() {
34
+ return (h(Host, { key: '80b7e45cfc95e7e82015db2fa893b374ba73cf07' }, h("div", { key: '1133cd7ad3f9eb9ebaa0ac6c8a2ca3e2a52c46a9', class: "group", role: "radiogroup" }, this.options.map((option, index) => {
35
+ const selected = option.value === this.value;
36
+ return (h("button", { class: "radio", type: "button", role: "radio", "aria-checked": selected ? "true" : "false", tabindex: selected || (!this.value && index === 0) ? "0" : "-1", disabled: this.disabled, onClick: () => this.select(option.value), onKeyDown: (event) => this.onKeyDown(event, index) }, h("span", { class: "indicator" }, h("span", { class: "dot" })), h("span", { class: "label" }, option.label)));
37
+ }))));
38
+ }
39
+ static get is() { return "ui-radio-group"; }
40
+ static get encapsulation() { return "shadow"; }
41
+ static get originalStyleUrls() {
42
+ return {
43
+ "$": ["ui-radio-group.css"]
44
+ };
45
+ }
46
+ static get styleUrls() {
47
+ return {
48
+ "$": ["ui-radio-group.css"]
49
+ };
50
+ }
51
+ static get properties() {
52
+ return {
53
+ "value": {
54
+ "type": "string",
55
+ "mutable": true,
56
+ "complexType": {
57
+ "original": "string",
58
+ "resolved": "string | undefined",
59
+ "references": {}
60
+ },
61
+ "required": false,
62
+ "optional": true,
63
+ "docs": {
64
+ "tags": [],
65
+ "text": "Valor selecionado."
66
+ },
67
+ "getter": false,
68
+ "setter": false,
69
+ "reflect": false,
70
+ "attribute": "value"
71
+ },
72
+ "name": {
73
+ "type": "string",
74
+ "mutable": false,
75
+ "complexType": {
76
+ "original": "string",
77
+ "resolved": "string | undefined",
78
+ "references": {}
79
+ },
80
+ "required": false,
81
+ "optional": true,
82
+ "docs": {
83
+ "tags": [],
84
+ "text": "Nome do grupo."
85
+ },
86
+ "getter": false,
87
+ "setter": false,
88
+ "reflect": false,
89
+ "attribute": "name"
90
+ },
91
+ "options": {
92
+ "type": "unknown",
93
+ "mutable": false,
94
+ "complexType": {
95
+ "original": "UiRadioOption[]",
96
+ "resolved": "UiRadioOption[]",
97
+ "references": {
98
+ "UiRadioOption": {
99
+ "location": "local",
100
+ "path": "/Users/andersonespindola/.ghq/github.com/andersonflima/ui/packages/core/src/components/ui-radio-group/ui-radio-group.tsx",
101
+ "id": "src/components/ui-radio-group/ui-radio-group.tsx::UiRadioOption"
102
+ }
103
+ }
104
+ },
105
+ "required": false,
106
+ "optional": false,
107
+ "docs": {
108
+ "tags": [],
109
+ "text": "Op\u00E7\u00F5es dispon\u00EDveis."
110
+ },
111
+ "getter": false,
112
+ "setter": false,
113
+ "defaultValue": "[]"
114
+ },
115
+ "disabled": {
116
+ "type": "boolean",
117
+ "mutable": false,
118
+ "complexType": {
119
+ "original": "boolean",
120
+ "resolved": "boolean",
121
+ "references": {}
122
+ },
123
+ "required": false,
124
+ "optional": false,
125
+ "docs": {
126
+ "tags": [],
127
+ "text": "Desabilita o grupo."
128
+ },
129
+ "getter": false,
130
+ "setter": false,
131
+ "reflect": false,
132
+ "attribute": "disabled",
133
+ "defaultValue": "false"
134
+ }
135
+ };
136
+ }
137
+ static get events() {
138
+ return [{
139
+ "method": "uiChange",
140
+ "name": "uiChange",
141
+ "bubbles": true,
142
+ "cancelable": true,
143
+ "composed": true,
144
+ "docs": {
145
+ "tags": [],
146
+ "text": "Emitido quando a sele\u00E7\u00E3o muda."
147
+ },
148
+ "complexType": {
149
+ "original": "string",
150
+ "resolved": "string",
151
+ "references": {}
152
+ }
153
+ }];
154
+ }
155
+ }
@@ -0,0 +1,17 @@
1
+ :host {
2
+ display: block;
3
+ }
4
+
5
+ .reveal {
6
+ opacity: 0;
7
+ transform: translateY(16px);
8
+ filter: blur(8px);
9
+ transition: opacity 0.6s var(--ui-ease), transform 0.6s var(--ui-ease),
10
+ filter 0.6s var(--ui-ease);
11
+ }
12
+
13
+ .reveal.visible {
14
+ opacity: 1;
15
+ transform: none;
16
+ filter: none;
17
+ }
@@ -0,0 +1,73 @@
1
+ import { h, Host } from "@stencil/core";
2
+ export class UiReveal {
3
+ constructor() {
4
+ /** Atraso da transição em milissegundos. */
5
+ this.delay = 0;
6
+ /** Indica se o conteúdo já foi revelado. */
7
+ this.visible = false;
8
+ }
9
+ connectedCallback() {
10
+ if (typeof IntersectionObserver === "undefined") {
11
+ this.visible = true;
12
+ return;
13
+ }
14
+ this.observer = new IntersectionObserver((entries) => {
15
+ for (const entry of entries) {
16
+ if (entry.isIntersecting) {
17
+ this.visible = true;
18
+ this.observer?.disconnect();
19
+ break;
20
+ }
21
+ }
22
+ });
23
+ this.observer.observe(this.host);
24
+ }
25
+ disconnectedCallback() {
26
+ this.observer?.disconnect();
27
+ }
28
+ render() {
29
+ return (h(Host, { key: '926e1c25b8463f92dc35a010d58b9bd622932c21' }, h("div", { key: '0561142e1b0955e22d12056f316c98556cb5365d', class: { reveal: true, visible: this.visible }, style: { transitionDelay: `${this.delay}ms` } }, h("slot", { key: 'bd53a6ca33153d3f7768a7662e5e5b78ea221cc6' }))));
30
+ }
31
+ static get is() { return "ui-reveal"; }
32
+ static get encapsulation() { return "shadow"; }
33
+ static get originalStyleUrls() {
34
+ return {
35
+ "$": ["ui-reveal.css"]
36
+ };
37
+ }
38
+ static get styleUrls() {
39
+ return {
40
+ "$": ["ui-reveal.css"]
41
+ };
42
+ }
43
+ static get properties() {
44
+ return {
45
+ "delay": {
46
+ "type": "number",
47
+ "mutable": false,
48
+ "complexType": {
49
+ "original": "number",
50
+ "resolved": "number",
51
+ "references": {}
52
+ },
53
+ "required": false,
54
+ "optional": false,
55
+ "docs": {
56
+ "tags": [],
57
+ "text": "Atraso da transi\u00E7\u00E3o em milissegundos."
58
+ },
59
+ "getter": false,
60
+ "setter": false,
61
+ "reflect": false,
62
+ "attribute": "delay",
63
+ "defaultValue": "0"
64
+ }
65
+ };
66
+ }
67
+ static get states() {
68
+ return {
69
+ "visible": {}
70
+ };
71
+ }
72
+ static get elementRef() { return "host"; }
73
+ }
@@ -0,0 +1,20 @@
1
+ :host {
2
+ display: block;
3
+ }
4
+
5
+ .bar {
6
+ position: fixed;
7
+ top: 0;
8
+ left: 0;
9
+ width: 100%;
10
+ height: 2px;
11
+ transform-origin: left;
12
+ transform: scaleX(0);
13
+ background: linear-gradient(
14
+ 90deg,
15
+ var(--ui-accent),
16
+ var(--ui-accent-strong)
17
+ );
18
+ z-index: 100;
19
+ transition: transform var(--ui-duration) var(--ui-ease);
20
+ }
@@ -0,0 +1,45 @@
1
+ import { h, Host } from "@stencil/core";
2
+ export class UiScrollProgress {
3
+ constructor() {
4
+ /** Progresso da rolagem (0 a 1). */
5
+ this.progress = 0;
6
+ this.onScroll = () => {
7
+ if (typeof document === "undefined")
8
+ return;
9
+ const el = document.documentElement;
10
+ const scrollable = el.scrollHeight - el.clientHeight;
11
+ this.progress = scrollable > 0 ? el.scrollTop / scrollable : 0;
12
+ };
13
+ }
14
+ connectedCallback() {
15
+ if (typeof window === "undefined")
16
+ return;
17
+ window.addEventListener("scroll", this.onScroll, { passive: true });
18
+ this.onScroll();
19
+ }
20
+ disconnectedCallback() {
21
+ if (typeof window === "undefined")
22
+ return;
23
+ window.removeEventListener("scroll", this.onScroll);
24
+ }
25
+ render() {
26
+ return (h(Host, { key: '7eced0439a2d6ef04d085396a6fc0e69fbe798ed' }, h("div", { key: '30db3ea1a3fce2a26ebca96568e939c4a0183922', class: "bar", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": Math.round(this.progress * 100), style: { transform: `scaleX(${this.progress})` } })));
27
+ }
28
+ static get is() { return "ui-scroll-progress"; }
29
+ static get encapsulation() { return "shadow"; }
30
+ static get originalStyleUrls() {
31
+ return {
32
+ "$": ["ui-scroll-progress.css"]
33
+ };
34
+ }
35
+ static get styleUrls() {
36
+ return {
37
+ "$": ["ui-scroll-progress.css"]
38
+ };
39
+ }
40
+ static get states() {
41
+ return {
42
+ "progress": {}
43
+ };
44
+ }
45
+ }
@@ -0,0 +1,32 @@
1
+ :host {
2
+ display: block;
3
+ font-family: var(--ui-font-sans);
4
+ }
5
+
6
+ section {
7
+ max-width: 80rem;
8
+ margin: 0 auto;
9
+ padding: 5rem 1.25rem;
10
+ }
11
+
12
+ .eyebrow {
13
+ margin: 0 0 0.75rem;
14
+ text-transform: uppercase;
15
+ letter-spacing: 0.08em;
16
+ font-size: 0.75rem;
17
+ font-weight: 600;
18
+ color: var(--ui-accent);
19
+ }
20
+
21
+ .heading {
22
+ margin: 0 0 1rem;
23
+ font-size: 1.875rem;
24
+ font-weight: 600;
25
+ color: var(--ui-foreground);
26
+ }
27
+
28
+ .description {
29
+ margin: 0 0 2rem;
30
+ max-width: 42rem;
31
+ color: var(--ui-text-muted);
32
+ }
@@ -0,0 +1,90 @@
1
+ import { h, Host } from "@stencil/core";
2
+ export class UiSection {
3
+ constructor() {
4
+ /** Texto curto exibido acima do título. */
5
+ this.eyebrow = "";
6
+ /** Título principal da seção. */
7
+ this.heading = "";
8
+ /** Descrição complementar. */
9
+ this.description = "";
10
+ }
11
+ render() {
12
+ return (h(Host, { key: '63ee126b1e457a4dcd01a66aa519e6fae8377db6' }, h("section", { key: '34f3c07dca2e9f6a3c288b7c41abaf2a3502129f' }, this.eyebrow && h("p", { key: '7c71e3e38e56872757d017ba4f59949f50518c6f', class: "eyebrow" }, this.eyebrow), this.heading && h("h2", { key: 'b8f42a4ae5d2e5d8fb80a4cb9de07ca10c2423fd', class: "heading" }, this.heading), this.description && h("p", { key: 'faeba9733afaa52e7a08629459dd708b4f647740', class: "description" }, this.description), h("slot", { key: '99e906d4ca93461c35125acb4eb3401ed76929fe' }))));
13
+ }
14
+ static get is() { return "ui-section"; }
15
+ static get encapsulation() { return "shadow"; }
16
+ static get originalStyleUrls() {
17
+ return {
18
+ "$": ["ui-section.css"]
19
+ };
20
+ }
21
+ static get styleUrls() {
22
+ return {
23
+ "$": ["ui-section.css"]
24
+ };
25
+ }
26
+ static get properties() {
27
+ return {
28
+ "eyebrow": {
29
+ "type": "string",
30
+ "mutable": false,
31
+ "complexType": {
32
+ "original": "string",
33
+ "resolved": "string",
34
+ "references": {}
35
+ },
36
+ "required": false,
37
+ "optional": false,
38
+ "docs": {
39
+ "tags": [],
40
+ "text": "Texto curto exibido acima do t\u00EDtulo."
41
+ },
42
+ "getter": false,
43
+ "setter": false,
44
+ "reflect": false,
45
+ "attribute": "eyebrow",
46
+ "defaultValue": "\"\""
47
+ },
48
+ "heading": {
49
+ "type": "string",
50
+ "mutable": false,
51
+ "complexType": {
52
+ "original": "string",
53
+ "resolved": "string",
54
+ "references": {}
55
+ },
56
+ "required": false,
57
+ "optional": false,
58
+ "docs": {
59
+ "tags": [],
60
+ "text": "T\u00EDtulo principal da se\u00E7\u00E3o."
61
+ },
62
+ "getter": false,
63
+ "setter": false,
64
+ "reflect": false,
65
+ "attribute": "heading",
66
+ "defaultValue": "\"\""
67
+ },
68
+ "description": {
69
+ "type": "string",
70
+ "mutable": false,
71
+ "complexType": {
72
+ "original": "string",
73
+ "resolved": "string",
74
+ "references": {}
75
+ },
76
+ "required": false,
77
+ "optional": false,
78
+ "docs": {
79
+ "tags": [],
80
+ "text": "Descri\u00E7\u00E3o complementar."
81
+ },
82
+ "getter": false,
83
+ "setter": false,
84
+ "reflect": false,
85
+ "attribute": "description",
86
+ "defaultValue": "\"\""
87
+ }
88
+ };
89
+ }
90
+ }
@@ -0,0 +1,49 @@
1
+ :host {
2
+ display: block;
3
+ }
4
+
5
+ .wrapper {
6
+ position: relative;
7
+ display: block;
8
+ width: 100%;
9
+ }
10
+
11
+ .select {
12
+ width: 100%;
13
+ height: 2.75rem;
14
+ padding: 0 2.5rem 0 1rem;
15
+ border: 1px solid var(--ui-border);
16
+ border-radius: var(--ui-radius-sm);
17
+ background: var(--ui-panel);
18
+ color: var(--ui-foreground);
19
+ font-family: var(--ui-font-sans);
20
+ font-size: 0.875rem;
21
+ outline: none;
22
+ backdrop-filter: blur(22px);
23
+ transition: all var(--ui-duration) var(--ui-ease);
24
+ box-sizing: border-box;
25
+ cursor: pointer;
26
+ -webkit-appearance: none;
27
+ appearance: none;
28
+ }
29
+
30
+ .select:focus-visible {
31
+ border-color: var(--ui-accent);
32
+ box-shadow: 0 0 0 2px var(--ui-ring);
33
+ }
34
+
35
+ .select:disabled {
36
+ opacity: 0.5;
37
+ pointer-events: none;
38
+ }
39
+
40
+ .chevron {
41
+ position: absolute;
42
+ top: 50%;
43
+ right: 0.875rem;
44
+ width: 1.125rem;
45
+ height: 1.125rem;
46
+ color: var(--ui-text-muted);
47
+ transform: translateY(-50%);
48
+ pointer-events: none;
49
+ }