aeico-components 0.1.6 → 0.1.8

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 (380) hide show
  1. package/README.md +0 -0
  2. package/dist/alert.cjs +637 -4
  3. package/dist/alert.cjs.map +7 -1
  4. package/dist/alert.js +575 -3
  5. package/dist/alert.js.map +7 -1
  6. package/dist/badge.cjs +573 -4
  7. package/dist/badge.cjs.map +7 -1
  8. package/dist/badge.js +510 -3
  9. package/dist/badge.js.map +7 -1
  10. package/dist/breadcrumb.cjs +709 -5
  11. package/dist/breadcrumb.cjs.map +7 -1
  12. package/dist/breadcrumb.js +644 -4
  13. package/dist/breadcrumb.js.map +7 -1
  14. package/dist/button-group.cjs +546 -4
  15. package/dist/button-group.cjs.map +7 -1
  16. package/dist/button-group.js +489 -3
  17. package/dist/button-group.js.map +7 -1
  18. package/dist/button.cjs +834 -4
  19. package/dist/button.cjs.map +7 -1
  20. package/dist/button.js +771 -3
  21. package/dist/button.js.map +7 -1
  22. package/dist/card.cjs +574 -4
  23. package/dist/card.cjs.map +7 -1
  24. package/dist/card.js +516 -3
  25. package/dist/card.js.map +7 -1
  26. package/dist/checkbox.cjs +867 -4
  27. package/dist/checkbox.cjs.map +7 -1
  28. package/dist/checkbox.js +794 -3
  29. package/dist/checkbox.js.map +7 -1
  30. package/dist/copy-button.cjs +1046 -4
  31. package/dist/copy-button.cjs.map +7 -1
  32. package/dist/copy-button.js +969 -3
  33. package/dist/copy-button.js.map +7 -1
  34. package/dist/detail-group.cjs +533 -0
  35. package/dist/detail-group.cjs.map +7 -0
  36. package/dist/detail-group.js +477 -0
  37. package/dist/detail-group.js.map +7 -0
  38. package/dist/detail.cjs +627 -4
  39. package/dist/detail.cjs.map +7 -1
  40. package/dist/detail.js +569 -3
  41. package/dist/detail.js.map +7 -1
  42. package/dist/dialog.cjs +738 -4
  43. package/dist/dialog.cjs.map +7 -1
  44. package/dist/dialog.js +665 -3
  45. package/dist/dialog.js.map +7 -1
  46. package/dist/divider.cjs +558 -4
  47. package/dist/divider.cjs.map +7 -1
  48. package/dist/divider.js +502 -3
  49. package/dist/divider.js.map +7 -1
  50. package/dist/drawer.cjs +818 -4
  51. package/dist/drawer.cjs.map +7 -1
  52. package/dist/drawer.js +749 -3
  53. package/dist/drawer.js.map +7 -1
  54. package/dist/dropdown.cjs +1396 -5
  55. package/dist/dropdown.cjs.map +7 -1
  56. package/dist/dropdown.js +1316 -4
  57. package/dist/dropdown.js.map +7 -1
  58. package/dist/icon-button.cjs +999 -4
  59. package/dist/icon-button.cjs.map +7 -1
  60. package/dist/icon-button.js +930 -3
  61. package/dist/icon-button.js.map +7 -1
  62. package/dist/icon.cjs +613 -4
  63. package/dist/icon.cjs.map +7 -1
  64. package/dist/icon.js +547 -3
  65. package/dist/icon.js.map +7 -1
  66. package/dist/index.cjs +6484 -188
  67. package/dist/index.cjs.map +7 -1
  68. package/dist/index.js +6095 -147
  69. package/dist/index.js.map +7 -1
  70. package/dist/menu.cjs +841 -4
  71. package/dist/menu.cjs.map +7 -1
  72. package/dist/menu.js +785 -3
  73. package/dist/menu.js.map +7 -1
  74. package/dist/navbar.cjs +622 -4
  75. package/dist/navbar.cjs.map +7 -1
  76. package/dist/navbar.js +564 -3
  77. package/dist/navbar.js.map +7 -1
  78. package/dist/number-input.cjs +887 -0
  79. package/dist/number-input.cjs.map +7 -0
  80. package/dist/number-input.js +820 -0
  81. package/dist/number-input.js.map +7 -0
  82. package/dist/pagination.cjs +1099 -4
  83. package/dist/pagination.cjs.map +7 -1
  84. package/dist/pagination.js +1029 -3
  85. package/dist/pagination.js.map +7 -1
  86. package/dist/progress-bar.cjs +581 -4
  87. package/dist/progress-bar.cjs.map +7 -1
  88. package/dist/progress-bar.js +525 -3
  89. package/dist/progress-bar.js.map +7 -1
  90. package/dist/radio-group.cjs +973 -5
  91. package/dist/radio-group.cjs.map +7 -1
  92. package/dist/radio-group.js +899 -4
  93. package/dist/radio-group.js.map +7 -1
  94. package/dist/select.cjs +1242 -45
  95. package/dist/select.cjs.map +7 -1
  96. package/dist/select.js +1159 -44
  97. package/dist/select.js.map +7 -1
  98. package/dist/slider.cjs +1420 -4
  99. package/dist/slider.cjs.map +7 -1
  100. package/dist/slider.js +1351 -3
  101. package/dist/slider.js.map +7 -1
  102. package/dist/spinner.cjs +587 -4
  103. package/dist/spinner.cjs.map +7 -1
  104. package/dist/spinner.js +528 -3
  105. package/dist/spinner.js.map +7 -1
  106. package/dist/styles/layout.cjs +1 -0
  107. package/dist/styles/layout.js +1 -0
  108. package/dist/styles/radius.cjs +1 -0
  109. package/dist/styles/radius.js +1 -0
  110. package/dist/styles/variables.cjs +1 -0
  111. package/dist/styles/variables.js +1 -0
  112. package/dist/switch.cjs +1092 -4
  113. package/dist/switch.cjs.map +7 -1
  114. package/dist/switch.js +1013 -3
  115. package/dist/switch.js.map +7 -1
  116. package/dist/tabs.cjs +660 -6
  117. package/dist/tabs.cjs.map +7 -1
  118. package/dist/tabs.js +591 -5
  119. package/dist/tabs.js.map +7 -1
  120. package/dist/tag.cjs +591 -3
  121. package/dist/tag.cjs.map +7 -1
  122. package/dist/tag.js +532 -2
  123. package/dist/tag.js.map +7 -1
  124. package/dist/text-input.cjs +829 -4
  125. package/dist/text-input.cjs.map +7 -1
  126. package/dist/text-input.js +761 -3
  127. package/dist/text-input.js.map +7 -1
  128. package/dist/textarea.cjs +914 -3
  129. package/dist/textarea.cjs.map +7 -1
  130. package/dist/textarea.js +854 -2
  131. package/dist/textarea.js.map +7 -1
  132. package/dist/tooltip.cjs +764 -4
  133. package/dist/tooltip.cjs.map +7 -1
  134. package/dist/tooltip.js +711 -3
  135. package/dist/tooltip.js.map +7 -1
  136. package/dist/tree.cjs +1059 -4
  137. package/dist/tree.cjs.map +7 -1
  138. package/dist/tree.js +985 -3
  139. package/dist/tree.js.map +7 -1
  140. package/dist/types/card/defines.d.ts +1 -1
  141. package/dist/types/detail/defines.d.ts +1 -1
  142. package/dist/types/dialog/dialog.d.ts +1 -0
  143. package/dist/types/drawer/drawer.d.ts +2 -0
  144. package/dist/types/icon/defines.d.ts +7 -1
  145. package/dist/types/icon/index.d.ts +1 -1
  146. package/dist/types/menu/defines.d.ts +1 -0
  147. package/dist/types/menu/menu-item.d.ts +1 -0
  148. package/dist/types/menu/menu.d.ts +1 -0
  149. package/dist/types/styles/layout.d.ts +2 -0
  150. package/dist/types/styles/radius.d.ts +2 -0
  151. package/dist/types/styles/variables.d.ts +2 -0
  152. package/dist/types/tabs/defines.d.ts +1 -0
  153. package/dist/types/tabs/tabs.d.ts +3 -0
  154. package/package.json +31 -7
  155. package/src/alert/alert.ts +3 -3
  156. package/src/badge/badge.ts +4 -4
  157. package/src/breadcrumb/breadcrumb-item.ts +2 -2
  158. package/src/breadcrumb/breadcrumb.ts +3 -3
  159. package/src/button/button.ts +4 -4
  160. package/src/button-group/button-group.ts +8 -9
  161. package/src/card/card.ts +3 -3
  162. package/src/card/defines.ts +1 -1
  163. package/src/checkbox/checkbox.ts +6 -6
  164. package/src/copy-button/copy-button.ts +13 -9
  165. package/src/detail/defines.ts +1 -1
  166. package/src/detail/detail.ts +3 -3
  167. package/src/detail-group/detail-group.ts +2 -2
  168. package/src/dialog/dialog.ts +15 -14
  169. package/src/divider/divider.ts +3 -3
  170. package/src/drawer/drawer.ts +28 -11
  171. package/src/dropdown/dropdown-item.ts +2 -2
  172. package/src/dropdown/dropdown.ts +2 -2
  173. package/src/icon/defines.ts +8 -1
  174. package/src/icon/icon.ts +32 -14
  175. package/src/icon/index.ts +1 -1
  176. package/src/icon/registry.ts +2 -2
  177. package/src/menu/defines.ts +1 -0
  178. package/src/menu/menu-item.ts +14 -4
  179. package/src/menu/menu.ts +5 -2
  180. package/src/navbar/navbar.ts +3 -3
  181. package/src/number-input/number-input.ts +5 -5
  182. package/src/pagination/pagination.ts +3 -3
  183. package/src/progress-bar/progress-bar.ts +3 -3
  184. package/src/radio-group/radio-group.ts +12 -8
  185. package/src/select/select-option.ts +2 -2
  186. package/src/select/select.ts +5 -5
  187. package/src/slider/slider.ts +6 -6
  188. package/src/spinner/spinner.ts +4 -4
  189. package/src/styles/color.css +91 -91
  190. package/src/styles/components/action-button.css +12 -12
  191. package/src/styles/components/alert.css +22 -28
  192. package/src/styles/components/badge.css +13 -20
  193. package/src/styles/components/breadcrumb-item.css +7 -7
  194. package/src/styles/components/button-group.css +2 -0
  195. package/src/styles/components/button.css +39 -50
  196. package/src/styles/components/card.css +69 -30
  197. package/src/styles/components/checkbox.css +22 -16
  198. package/src/styles/components/copy-button.css +22 -33
  199. package/src/styles/components/detail.css +51 -39
  200. package/src/styles/components/dialog.css +11 -11
  201. package/src/styles/components/divider.css +3 -3
  202. package/src/styles/components/drawer.css +59 -27
  203. package/src/styles/components/dropdown-item.css +7 -8
  204. package/src/styles/components/dropdown.css +3 -4
  205. package/src/styles/components/field-label.css +13 -13
  206. package/src/styles/components/icon-button.css +25 -36
  207. package/src/styles/components/icon.css +1 -1
  208. package/src/styles/components/menu-item.css +13 -8
  209. package/src/styles/components/navbar.css +23 -44
  210. package/src/styles/components/number-input.css +27 -36
  211. package/src/styles/components/pagination.css +31 -31
  212. package/src/styles/components/progress-bar.css +2 -3
  213. package/src/styles/components/radio-group.css +88 -83
  214. package/src/styles/components/select-option.css +5 -5
  215. package/src/styles/components/select.css +21 -33
  216. package/src/styles/components/slider.css +56 -34
  217. package/src/styles/components/spinner.css +7 -9
  218. package/src/styles/components/switch.css +21 -19
  219. package/src/styles/components/tab.css +4 -5
  220. package/src/styles/components/tabs.css +48 -1
  221. package/src/styles/components/tag.css +14 -21
  222. package/src/styles/components/text-input.css +13 -22
  223. package/src/styles/components/textarea.css +12 -21
  224. package/src/styles/components/tooltip.css +4 -5
  225. package/src/styles/components/tree-item.css +12 -12
  226. package/src/styles/layout.css +5 -2
  227. package/src/styles/radius.css +25 -0
  228. package/src/styles/size.css +7 -7
  229. package/src/styles/variables.css +271 -247
  230. package/src/switch/switch.ts +6 -6
  231. package/src/tabs/defines.ts +1 -0
  232. package/src/tabs/tab-panel.ts +1 -1
  233. package/src/tabs/tab.ts +1 -1
  234. package/src/tabs/tabs.ts +14 -2
  235. package/src/tag/tag.ts +4 -4
  236. package/src/text-input/text-input.ts +5 -5
  237. package/src/textarea/textarea.ts +5 -5
  238. package/src/tooltip/tooltip.ts +2 -2
  239. package/src/tree/tree-item.ts +2 -2
  240. package/src/tree/tree.ts +2 -2
  241. package/dist/chunks/action-button.cjs +0 -296
  242. package/dist/chunks/action-button.cjs.map +0 -1
  243. package/dist/chunks/action-button.js +0 -297
  244. package/dist/chunks/action-button.js.map +0 -1
  245. package/dist/chunks/aeico-component.cjs +0 -17
  246. package/dist/chunks/aeico-component.cjs.map +0 -1
  247. package/dist/chunks/aeico-component.js +0 -18
  248. package/dist/chunks/aeico-component.js.map +0 -1
  249. package/dist/chunks/alert.cjs +0 -170
  250. package/dist/chunks/alert.cjs.map +0 -1
  251. package/dist/chunks/alert.js +0 -171
  252. package/dist/chunks/alert.js.map +0 -1
  253. package/dist/chunks/badge.cjs +0 -85
  254. package/dist/chunks/badge.cjs.map +0 -1
  255. package/dist/chunks/badge.js +0 -86
  256. package/dist/chunks/badge.js.map +0 -1
  257. package/dist/chunks/breadcrumb-item.cjs +0 -261
  258. package/dist/chunks/breadcrumb-item.cjs.map +0 -1
  259. package/dist/chunks/breadcrumb-item.js +0 -262
  260. package/dist/chunks/breadcrumb-item.js.map +0 -1
  261. package/dist/chunks/button-group.cjs +0 -79
  262. package/dist/chunks/button-group.cjs.map +0 -1
  263. package/dist/chunks/button-group.js +0 -80
  264. package/dist/chunks/button-group.js.map +0 -1
  265. package/dist/chunks/button.cjs +0 -348
  266. package/dist/chunks/button.cjs.map +0 -1
  267. package/dist/chunks/button.js +0 -349
  268. package/dist/chunks/button.js.map +0 -1
  269. package/dist/chunks/card.cjs +0 -93
  270. package/dist/chunks/card.cjs.map +0 -1
  271. package/dist/chunks/card.js +0 -94
  272. package/dist/chunks/card.js.map +0 -1
  273. package/dist/chunks/checkbox.cjs +0 -86
  274. package/dist/chunks/checkbox.cjs.map +0 -1
  275. package/dist/chunks/checkbox.js +0 -87
  276. package/dist/chunks/checkbox.js.map +0 -1
  277. package/dist/chunks/color.cjs +0 -4
  278. package/dist/chunks/color.cjs.map +0 -1
  279. package/dist/chunks/color.js +0 -5
  280. package/dist/chunks/color.js.map +0 -1
  281. package/dist/chunks/copy-button.cjs +0 -168
  282. package/dist/chunks/copy-button.cjs.map +0 -1
  283. package/dist/chunks/copy-button.js +0 -169
  284. package/dist/chunks/copy-button.js.map +0 -1
  285. package/dist/chunks/detail.cjs +0 -146
  286. package/dist/chunks/detail.cjs.map +0 -1
  287. package/dist/chunks/detail.js +0 -147
  288. package/dist/chunks/detail.js.map +0 -1
  289. package/dist/chunks/dialog.cjs +0 -117
  290. package/dist/chunks/dialog.cjs.map +0 -1
  291. package/dist/chunks/dialog.js +0 -118
  292. package/dist/chunks/dialog.js.map +0 -1
  293. package/dist/chunks/divider.cjs +0 -80
  294. package/dist/chunks/divider.cjs.map +0 -1
  295. package/dist/chunks/divider.js +0 -81
  296. package/dist/chunks/divider.js.map +0 -1
  297. package/dist/chunks/drawer.cjs +0 -180
  298. package/dist/chunks/drawer.cjs.map +0 -1
  299. package/dist/chunks/drawer.js +0 -181
  300. package/dist/chunks/drawer.js.map +0 -1
  301. package/dist/chunks/dropdown-button.cjs +0 -534
  302. package/dist/chunks/dropdown-button.cjs.map +0 -1
  303. package/dist/chunks/dropdown-button.js +0 -535
  304. package/dist/chunks/dropdown-button.js.map +0 -1
  305. package/dist/chunks/icon-button.cjs +0 -35
  306. package/dist/chunks/icon-button.cjs.map +0 -1
  307. package/dist/chunks/icon-button.js +0 -36
  308. package/dist/chunks/icon-button.js.map +0 -1
  309. package/dist/chunks/icon.cjs +0 -108
  310. package/dist/chunks/icon.cjs.map +0 -1
  311. package/dist/chunks/icon.js +0 -109
  312. package/dist/chunks/icon.js.map +0 -1
  313. package/dist/chunks/menu.cjs +0 -396
  314. package/dist/chunks/menu.cjs.map +0 -1
  315. package/dist/chunks/menu.js +0 -397
  316. package/dist/chunks/menu.js.map +0 -1
  317. package/dist/chunks/navbar.cjs +0 -142
  318. package/dist/chunks/navbar.cjs.map +0 -1
  319. package/dist/chunks/navbar.js +0 -143
  320. package/dist/chunks/navbar.js.map +0 -1
  321. package/dist/chunks/pagination.cjs +0 -475
  322. package/dist/chunks/pagination.cjs.map +0 -1
  323. package/dist/chunks/pagination.js +0 -476
  324. package/dist/chunks/pagination.js.map +0 -1
  325. package/dist/chunks/progress-bar.cjs +0 -101
  326. package/dist/chunks/progress-bar.cjs.map +0 -1
  327. package/dist/chunks/progress-bar.js +0 -102
  328. package/dist/chunks/progress-bar.js.map +0 -1
  329. package/dist/chunks/radio.cjs +0 -185
  330. package/dist/chunks/radio.cjs.map +0 -1
  331. package/dist/chunks/radio.js +0 -186
  332. package/dist/chunks/radio.js.map +0 -1
  333. package/dist/chunks/select.cjs +0 -381
  334. package/dist/chunks/select.cjs.map +0 -1
  335. package/dist/chunks/select.js +0 -382
  336. package/dist/chunks/select.js.map +0 -1
  337. package/dist/chunks/size.cjs +0 -4
  338. package/dist/chunks/size.cjs.map +0 -1
  339. package/dist/chunks/size.js +0 -5
  340. package/dist/chunks/size.js.map +0 -1
  341. package/dist/chunks/slider.cjs +0 -611
  342. package/dist/chunks/slider.cjs.map +0 -1
  343. package/dist/chunks/slider.js +0 -612
  344. package/dist/chunks/slider.js.map +0 -1
  345. package/dist/chunks/spinner.cjs +0 -102
  346. package/dist/chunks/spinner.cjs.map +0 -1
  347. package/dist/chunks/spinner.js +0 -103
  348. package/dist/chunks/spinner.js.map +0 -1
  349. package/dist/chunks/switch.cjs +0 -167
  350. package/dist/chunks/switch.cjs.map +0 -1
  351. package/dist/chunks/switch.js +0 -168
  352. package/dist/chunks/switch.js.map +0 -1
  353. package/dist/chunks/tab-panel.cjs +0 -165
  354. package/dist/chunks/tab-panel.cjs.map +0 -1
  355. package/dist/chunks/tab-panel.js +0 -166
  356. package/dist/chunks/tab-panel.js.map +0 -1
  357. package/dist/chunks/tag.cjs +0 -108
  358. package/dist/chunks/tag.cjs.map +0 -1
  359. package/dist/chunks/tag.js +0 -109
  360. package/dist/chunks/tag.js.map +0 -1
  361. package/dist/chunks/text-input.cjs +0 -54
  362. package/dist/chunks/text-input.cjs.map +0 -1
  363. package/dist/chunks/text-input.js +0 -55
  364. package/dist/chunks/text-input.js.map +0 -1
  365. package/dist/chunks/textarea.cjs +0 -137
  366. package/dist/chunks/textarea.cjs.map +0 -1
  367. package/dist/chunks/textarea.js +0 -138
  368. package/dist/chunks/textarea.js.map +0 -1
  369. package/dist/chunks/tooltip.cjs +0 -293
  370. package/dist/chunks/tooltip.cjs.map +0 -1
  371. package/dist/chunks/tooltip.js +0 -294
  372. package/dist/chunks/tooltip.js.map +0 -1
  373. package/dist/chunks/tree.cjs +0 -468
  374. package/dist/chunks/tree.cjs.map +0 -1
  375. package/dist/chunks/tree.js +0 -469
  376. package/dist/chunks/tree.js.map +0 -1
  377. package/dist/chunks/variables.cjs +0 -372
  378. package/dist/chunks/variables.cjs.map +0 -1
  379. package/dist/chunks/variables.js +0 -373
  380. package/dist/chunks/variables.js.map +0 -1
@@ -1 +1,2 @@
1
1
  export type TabActiveIndex = number;
2
+ export type TabVariant = 'subtle' | 'faint' | 'filled' | 'outlined' | 'text';
@@ -1,4 +1,4 @@
1
- import tabPanelStyle from '../styles/components/tab-panel.css?inline';
1
+ import tabPanelStyle from '../styles/components/tab-panel.css';
2
2
  import AeicoComponent from '../aeico-component';
3
3
  import { html } from 'aeico';
4
4
 
package/src/tabs/tab.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { Props } from 'aeico';
2
- import tabStyle from '../styles/components/tab.css?inline';
2
+ import tabStyle from '../styles/components/tab.css';
3
3
  import AeicoComponent from '../aeico-component';
4
4
  import { html } from 'aeico';
5
5
 
package/src/tabs/tabs.ts CHANGED
@@ -1,16 +1,19 @@
1
1
  import type { Props } from 'aeico';
2
- import styleVariables from '../styles/variables.css?inline';
3
- import tabsStyle from '../styles/components/tabs.css?inline';
2
+ import styleVariables from '../styles/variables.css';
3
+ import tabsStyle from '../styles/components/tabs.css';
4
4
  import AeicoComponent from '../aeico-component';
5
5
  import { html } from 'aeico';
6
6
  import type Tab from './tab';
7
+ import type { TabVariant } from './defines';
7
8
 
8
9
  class Tabs extends AeicoComponent {
9
10
  static props: Props = {
10
11
  activeIndex: { type: Number },
12
+ variant: { type: String },
11
13
  };
12
14
 
13
15
  declare activeIndex?: number;
16
+ declare variant?: TabVariant;
14
17
 
15
18
  protected static styles = [styleVariables, tabsStyle];
16
19
 
@@ -77,9 +80,18 @@ class Tabs extends AeicoComponent {
77
80
  }
78
81
 
79
82
  protected onUpdated() {
83
+ this._syncVariant();
80
84
  this._syncActive();
81
85
  }
82
86
 
87
+ private _syncVariant() {
88
+ const variant = this.variant ?? 'text';
89
+ this.setAttribute('variant', variant);
90
+ for (const tab of this._tabs) {
91
+ tab.setAttribute('variant', variant);
92
+ }
93
+ }
94
+
83
95
  private _handleTabClick = (e: Event) => {
84
96
  const pairs = this._getPairs();
85
97
  const target = e.target as Element;
package/src/tag/tag.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import type { InferProps } from 'aeico';
2
- import styleVariables from '../styles/variables.css?inline';
3
- import sizeCSS from '../styles/size.css?inline';
4
- import colorCSS from '../styles/color.css?inline';
5
- import tagStyle from '../styles/components/tag.css?inline';
2
+ import styleVariables from '../styles/variables.css';
3
+ import sizeCSS from '../styles/size.css';
4
+ import colorCSS from '../styles/color.css';
5
+ import tagStyle from '../styles/components/tag.css';
6
6
  import AeicoComponent from '../aeico-component';
7
7
  import { html } from 'aeico';
8
8
  import type { TagColor, TagSize, TagVariant } from './defines';
@@ -1,11 +1,11 @@
1
1
  import AeicoField from '../aeico-field';
2
2
  import type { InferProps, Props } from 'aeico';
3
3
  import { html } from 'aeico';
4
- import variables from '../styles/variables.css?inline';
5
- import sizeCSS from '../styles/size.css?inline';
6
- import fieldLabelCSS from '../styles/components/field-label.css?inline';
7
- import actionButtonCSS from '../styles/components/action-button.css?inline';
8
- import style from '../styles/components/text-input.css?inline';
4
+ import variables from '../styles/variables.css';
5
+ import sizeCSS from '../styles/size.css';
6
+ import fieldLabelCSS from '../styles/components/field-label.css';
7
+ import actionButtonCSS from '../styles/components/action-button.css';
8
+ import style from '../styles/components/text-input.css';
9
9
 
10
10
  class TextInput extends AeicoField {
11
11
  protected fieldElement: HTMLInputElement | null = null;
@@ -1,11 +1,11 @@
1
1
  import AeicoField from '../aeico-field';
2
2
  import type { InferProps } from 'aeico';
3
3
  import { html, prop } from 'aeico';
4
- import variables from '../styles/variables.css?inline';
5
- import sizeCSS from '../styles/size.css?inline';
6
- import fieldLabelCSS from '../styles/components/field-label.css?inline';
7
- import actionButtonCSS from '../styles/components/action-button.css?inline';
8
- import style from '../styles/components/textarea.css?inline';
4
+ import variables from '../styles/variables.css';
5
+ import sizeCSS from '../styles/size.css';
6
+ import fieldLabelCSS from '../styles/components/field-label.css';
7
+ import actionButtonCSS from '../styles/components/action-button.css';
8
+ import style from '../styles/components/textarea.css';
9
9
 
10
10
  export type TextareaResize = 'none' | 'vertical' | 'horizontal' | 'both';
11
11
 
@@ -1,6 +1,6 @@
1
1
  import type { InferProps } from 'aeico';
2
- import styleVariables from '../styles/variables.css?inline';
3
- import tooltipStyle from '../styles/components/tooltip.css?inline';
2
+ import styleVariables from '../styles/variables.css';
3
+ import tooltipStyle from '../styles/components/tooltip.css';
4
4
  import AeicoComponent from '../aeico-component';
5
5
  import { html, prop } from 'aeico';
6
6
  import type { TooltipPlacement, TooltipTrigger } from './defines';
@@ -1,8 +1,8 @@
1
1
  import AeicoComponent from '../aeico-component';
2
2
  import type { InferProps } from 'aeico';
3
3
  import { html, prop } from 'aeico';
4
- import style from '../styles/components/tree-item.css?inline';
5
- import variables from '../styles/variables.css?inline';
4
+ import style from '../styles/components/tree-item.css';
5
+ import variables from '../styles/variables.css';
6
6
  import type { ParentTreeLike } from './defines';
7
7
  import { SVG_NS } from '../utils';
8
8
  import '../icon';
package/src/tree/tree.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import AeicoComponent from '../aeico-component';
2
2
  import type { InferProps } from 'aeico';
3
3
  import { html, prop } from 'aeico';
4
- import style from '../styles/components/tree.css?inline';
5
- import variables from '../styles/variables.css?inline';
4
+ import style from '../styles/components/tree.css';
5
+ import variables from '../styles/variables.css';
6
6
  import type { TreeSelectDetail, TreeExpandDetail, TreeCheckDetail } from './defines';
7
7
  import './tree-item';
8
8
  import type TreeItem from './tree-item';
@@ -1,296 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
- const aeico = require("aeico");
6
- const aeicoComponent = require("./aeico-component.cjs");
7
- const _AeicoField = class _AeicoField extends aeicoComponent.AeicoComponent {
8
- constructor() {
9
- super();
10
- __publicField(this, "_fieldId");
11
- /**
12
- * The underlying form control element (input, select, etc.)
13
- * Subclasses should set this to their specific element
14
- */
15
- __publicField(this, "fieldElement", null);
16
- __publicField(this, "resetBtn", null);
17
- __publicField(this, "clearBtn", null);
18
- __publicField(this, "boundOnChange", () => this.setValue(this.getValue(), { silent: false, action: "change" }));
19
- __publicField(this, "boundOnReset", () => this.onReset());
20
- __publicField(this, "boundOnClear", () => this.onClear());
21
- this._fieldId = `ae-field-${++_AeicoField._fieldIdCounter}`;
22
- }
23
- /**
24
- * Lifecycle: Component connected to DOM
25
- */
26
- connectedCallback() {
27
- super.connectedCallback();
28
- }
29
- /**
30
- * Lifecycle: Component disconnected from DOM
31
- */
32
- disconnectedCallback() {
33
- super.disconnectedCallback();
34
- }
35
- /**
36
- * Render action buttons (clear/reset) using this.builder.
37
- * Must be called from within a build() callback.
38
- */
39
- renderActionButtons(force = false) {
40
- const style = this.actionButtonStyle || "integrated";
41
- const hasActions = force || this.clearable || this.resettable;
42
- if (hasActions && style === "integrated") {
43
- aeico.tags.div({ className: "action-controls" }, () => {
44
- this.renderClearButton(force);
45
- this.renderResetButton(force);
46
- });
47
- } else {
48
- this.renderClearButton(force);
49
- this.renderResetButton(force);
50
- }
51
- }
52
- renderResetButton(force = false) {
53
- const { button } = aeico.tags;
54
- const style = this.actionButtonStyle || "integrated";
55
- if (force || this.resettable) {
56
- const className = style === "integrated" ? "reset-btn action-btn" : "reset-btn";
57
- this.resetBtn = button({
58
- className,
59
- textContent: this.resetText || "↺",
60
- title: this.resetTitle || "↺",
61
- "@click": this.boundOnReset
62
- });
63
- }
64
- }
65
- renderClearButton(force = false) {
66
- const { button } = aeico.tags;
67
- const style = this.actionButtonStyle || "integrated";
68
- if (force || this.clearable) {
69
- const className = style === "integrated" ? "clear-btn action-btn" : "clear-btn";
70
- this.clearBtn = button({
71
- className,
72
- textContent: this.clearText || "✕",
73
- title: this.clearTitle || "✕",
74
- "@click": this.boundOnClear
75
- });
76
- }
77
- }
78
- /**
79
- * Returns a stable unique ID for this field instance,
80
- * used to associate <label htmlFor> with the underlying input.
81
- */
82
- getFieldId() {
83
- return this._fieldId;
84
- }
85
- /**
86
- * Renders a <label> element when the `label` prop is set.
87
- * Call this as the first statement inside the render() html() callback.
88
- * @param fieldId - The id to set on the underlying form control element (pass to input via id prop)
89
- */
90
- renderLabel(fieldId) {
91
- if (!this.label) return;
92
- const { span } = aeico.tags;
93
- aeico.tags.label({ id: `${fieldId}-label`, className: "field-label", for: fieldId }, () => {
94
- span({ textContent: this.label });
95
- if (this.required) {
96
- span({ className: "field-required", "aria-hidden": "true", textContent: " *" });
97
- }
98
- });
99
- }
100
- /**
101
- * Renders helper text below the field. Hidden when `error` is set.
102
- * Call this after the field-body div in render().
103
- */
104
- renderHelperText() {
105
- if (!this.helperText || this.error) return;
106
- const { span } = aeico.tags;
107
- span({ className: "field-helper", textContent: this.helperText });
108
- }
109
- /**
110
- * Renders an error message below the field when `error` is set.
111
- * Call this after renderHelperText() in render().
112
- */
113
- renderError() {
114
- if (!this.error) return;
115
- const { span } = aeico.tags;
116
- span({ className: "field-error", textContent: this.error });
117
- }
118
- /**
119
- * Watcher for disabled property
120
- */
121
- onDisabledChanged(newValue) {
122
- if (this.fieldElement) {
123
- this.fieldElement.disabled = Boolean(newValue);
124
- }
125
- }
126
- /**
127
- * Watcher for error property — syncs aria-invalid on the field element
128
- */
129
- onErrorChanged(newValue) {
130
- if (this.fieldElement) {
131
- if (newValue) {
132
- this.fieldElement.setAttribute("aria-invalid", "true");
133
- } else {
134
- this.fieldElement.removeAttribute("aria-invalid");
135
- }
136
- }
137
- }
138
- /**
139
- * Lifecycle: called after every render update.
140
- * Keeps aria-invalid on fieldElement in sync regardless of watcher timing.
141
- */
142
- onUpdated(_changedProps) {
143
- if (!this.fieldElement) return;
144
- if (this.error) {
145
- this.fieldElement.setAttribute("aria-invalid", "true");
146
- } else {
147
- this.fieldElement.removeAttribute("aria-invalid");
148
- }
149
- }
150
- /**
151
- * Returns true if the field passes constraint validation.
152
- * Delegates to the underlying fieldElement when available;
153
- * falls back to a manual required-check otherwise.
154
- */
155
- checkValidity() {
156
- if (this.fieldElement) {
157
- return this.fieldElement.checkValidity();
158
- }
159
- if (this.required) {
160
- const v = this.value;
161
- return v !== void 0 && v !== "" && v !== null;
162
- }
163
- return true;
164
- }
165
- /**
166
- * Reports validity, showing the browser's built-in validation UI when possible.
167
- */
168
- reportValidity() {
169
- if (this.fieldElement) {
170
- return this.fieldElement.reportValidity();
171
- }
172
- return this.checkValidity();
173
- }
174
- /**
175
- * Render the field component
176
- * Override in subclass to provide custom rendering
177
- */
178
- render() {
179
- }
180
- /**
181
- * Get current value from the field element
182
- * Default implementation returns the value property of fieldElement
183
- * Override in subclasses if needed (e.g., checkbox uses checked instead of value)
184
- *
185
- * @returns Current field value
186
- */
187
- getValue() {
188
- var _a;
189
- return ((_a = this.fieldElement) == null ? void 0 : _a.value) || "";
190
- }
191
- /**
192
- * Write value to the underlying UI element and sync props
193
- * Subclasses must override this to update their specific UI element
194
- *
195
- * @param _value New value to write to the element
196
- */
197
- writeValue(_value) {
198
- }
199
- /**
200
- * Get event payload for change events
201
- * Override in subclasses to customize event data (e.g., { checked, oldChecked } for checkbox)
202
- *
203
- * @param value New value
204
- * @param oldValue Previous value
205
- * @param action Action type
206
- * @returns Event payload object
207
- */
208
- getEventPayload(value, oldValue, action) {
209
- return { value, oldValue, action };
210
- }
211
- /**
212
- * Update field value programmatically (internal method)
213
- * Subclasses should provide type-safe public wrappers (e.g., change() method)
214
- *
215
- * @param value New value
216
- * @param options.silent If true, won't emit change event (default: true)
217
- * @param options.action Action type for the event (default: 'change')
218
- */
219
- setValue(value, options) {
220
- const oldValue = this.getValue();
221
- this.value = value;
222
- this.writeValue(value);
223
- if ((options == null ? void 0 : options.silent) === false) {
224
- const payload = this.getEventPayload(value, oldValue, options.action || "change");
225
- this.emit("change", { detail: payload });
226
- }
227
- }
228
- /**
229
- * Reset field to specified value or default value
230
- *
231
- * @param value Value to reset to, defaults to defaultValue prop
232
- * @param options.silent If false, will emit reset event (default: true)
233
- */
234
- reset(value, options) {
235
- const resetValue = value !== void 0 ? value : this.defaultValue;
236
- this.setValue(resetValue, { ...options, action: "reset" });
237
- }
238
- /**
239
- * Clear the field value
240
- *
241
- * @param options.silent If false, will emit clear event (default: true)
242
- */
243
- clear(options) {
244
- this.setValue("", { ...options, action: "clear" });
245
- }
246
- /**
247
- * Handle clear button click
248
- * Clears the field and dispatches event
249
- */
250
- onClear() {
251
- this.clear({ silent: false });
252
- }
253
- /**
254
- * Handle reset button click
255
- * Resets to default value and dispatches event
256
- */
257
- onReset() {
258
- this.reset(void 0, { silent: false });
259
- }
260
- };
261
- /**
262
- * Define base field properties (extends AeicoElement properties)
263
- */
264
- __publicField(_AeicoField, "props", {
265
- value: { type: String },
266
- defaultValue: { type: String },
267
- resettable: { type: Boolean },
268
- resetText: { type: String },
269
- resetTitle: { type: String },
270
- clearable: { type: Boolean },
271
- clearText: { type: String },
272
- clearTitle: { type: String },
273
- actionButtonStyle: { type: String },
274
- size: { type: String },
275
- disabled: { type: Boolean },
276
- label: { type: String },
277
- labelPlacement: { type: String },
278
- required: { type: Boolean },
279
- helperText: { type: String },
280
- error: { type: String }
281
- });
282
- /**
283
- * Property watchers
284
- */
285
- __publicField(_AeicoField, "watchers", {
286
- disabled: "onDisabledChanged",
287
- error: "onErrorChanged"
288
- });
289
- __publicField(_AeicoField, "_fieldIdCounter", 0);
290
- let AeicoField = _AeicoField;
291
- const fieldLabelCSS = ':host {\n --field-label-gap: 4px;\n --field-label-col-gap: 8px;\n --field-label-width: 100px;\n --field-label-font-size: 0.875em;\n --field-label-color: inherit;\n --field-required-color: var(--red, #dc3545);\n --field-helper-color: var(--color-text-muted, #6e6e6e);\n --field-error-color: var(--red, #dc3545);\n}\n\n:host([label]) {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: var(--field-label-gap);\n}\n\n:host([label][label-placement="left"]) {\n display: grid;\n grid-template-columns: var(--field-label-width) 1fr;\n column-gap: var(--field-label-col-gap);\n row-gap: var(--field-label-gap);\n align-items: start;\n}\n\n:host([label][label-placement="left"]) .field-label {\n align-self: center;\n}\n\n:host([label][label-placement="left"]) .field-helper,\n:host([label][label-placement="left"]) .field-error {\n grid-column: 2;\n}\n\n.field-label {\n font-size: var(--field-label-font-size);\n color: var(--field-label-color);\n user-select: none;\n line-height: 1.4;\n}\n\n.field-required {\n color: var(--field-required-color);\n margin-left: 2px;\n}\n\n.field-helper {\n font-size: 0.8em;\n color: var(--field-helper-color);\n line-height: 1.4;\n}\n\n.field-error {\n font-size: 0.8em;\n color: var(--field-error-color);\n line-height: 1.4;\n}\n\n/* Action controls container (integrated style) */\n.action-controls {\n display: flex;\n flex-direction: row;\n align-items: stretch;\n margin-left: calc(-1 * var(--field-action-gap, 4px) - 1px);\n border: var(--field-action-border-width, 1px) solid var(--field-action-border-color, var(--border-subtle));\n border-radius: 0 var(--field-action-border-radius, 2px) var(--field-action-border-radius, 2px) 0;\n overflow: hidden;\n flex-shrink: 0;\n transition: border-color 0.12s;\n background: var(--field-action-bg, var(--surface-base));\n position: relative;\n z-index: 1;\n align-self: stretch;\n}\n\n.action-controls .action-btn {\n border: none;\n background: transparent;\n color: var(--field-action-color, var(--color-text-muted));\n font-size: 0.875em;\n line-height: 1;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 0.5em;\n transition: background 0.12s;\n}\n\n.action-controls .action-btn:hover:not(:disabled) {\n background: var(--field-action-bg-hover, var(--surface-raised));\n}\n\n.action-controls .action-btn:active:not(:disabled) {\n background: var(--field-action-bg-focus, var(--surface-raised));\n}\n\n.action-controls .action-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.action-controls .action-btn + .action-btn {\n border-left: var(--field-action-border-width, 1px) solid var(--field-action-border-color, var(--border-subtle));\n}\n\n.input-container:has(input:focus) ~ .action-controls,\n.input-container:has(input:focus) .action-controls,\n.container:has(.trigger.open) ~ .action-controls,\n.container:has(.trigger.open) .action-controls {\n border-color: var(--field-action-border-color-focus, var(--border-focus));\n}\n\n.input-container:has(input:hover:not(:focus)) ~ .action-controls,\n.input-container:has(input:hover:not(:focus)) .action-controls,\n.container:has(.trigger:hover:not(.disabled)) ~ .action-controls,\n.container:has(.trigger:hover:not(.disabled)) .action-controls {\n border-color: var(--field-action-border-color-hover, var(--border-default));\n}\n';
292
- const actionButtonCSS = "/* Action button base styles — shared by clear-btn and reset-btn (standalone mode) */\n.clear-btn:not(.action-btn),\n.reset-btn:not(.action-btn) {\n width: 1.333em;\n height: 1.333em;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n line-height: 1;\n}\n\n.clear-btn:not(.action-btn) {\n border-radius: var(--clear-btn-border-radius);\n background: var(--clear-btn-bg);\n color: var(--clear-btn-color);\n transition: var(--clear-btn-transition);\n}\n\n.reset-btn:not(.action-btn) {\n border-radius: var(--reset-btn-border-radius);\n background: var(--reset-btn-bg);\n color: var(--reset-btn-color);\n transition: var(--reset-btn-transition);\n}\n\n.clear-btn:not(.action-btn):hover {\n background: var(--clear-btn-bg-hover);\n color: var(--clear-btn-color-hover);\n}\n\n.reset-btn:not(.action-btn):hover {\n background: var(--reset-btn-bg-hover);\n color: var(--reset-btn-color-hover);\n}\n";
293
- exports.AeicoField = AeicoField;
294
- exports.actionButtonCSS = actionButtonCSS;
295
- exports.fieldLabelCSS = fieldLabelCSS;
296
- //# sourceMappingURL=action-button.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"action-button.cjs","sources":["../../src/aeico-field.ts"],"sourcesContent":["import type { InferProps, Props, Watchers } from 'aeico';\nimport { tags } from 'aeico';\nimport AeicoComponent from './aeico-component';\n\nexport type FieldAction = 'clear' | 'reset' | 'change';\nexport type FieldElement = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;\nexport type ActionButtonStyle = 'standalone' | 'integrated';\n\n/**\n * Base class for form field components\n *\n * Provides common functionality for field components including:\n * - Theme support\n * - i18n integration (via Localizable mixin)\n * - Reset button management\n * - Value management\n * - Common configuration handling\n */\nclass AeicoField<TValue = string> extends AeicoComponent {\n /**\n * Define base field properties (extends AeicoElement properties)\n */\n static props: Props = {\n value: { type: String },\n defaultValue: { type: String },\n resettable: { type: Boolean },\n resetText: { type: String },\n resetTitle: { type: String },\n clearable: { type: Boolean },\n clearText: { type: String },\n clearTitle: { type: String },\n actionButtonStyle: { type: String },\n size: { type: String },\n disabled: { type: Boolean },\n label: { type: String },\n labelPlacement: { type: String },\n required: { type: Boolean },\n helperText: { type: String },\n error: { type: String },\n };\n\n /**\n * Property watchers\n */\n static watchers: Watchers = {\n disabled: 'onDisabledChanged',\n error: 'onErrorChanged',\n };\n\n private static _fieldIdCounter = 0;\n private readonly _fieldId: string;\n\n constructor() {\n super();\n this._fieldId = `ae-field-${++AeicoField._fieldIdCounter}`;\n }\n\n /**\n * The underlying form control element (input, select, etc.)\n * Subclasses should set this to their specific element\n */\n protected fieldElement: FieldElement | null = null;\n\n protected resetBtn: HTMLButtonElement | null = null;\n protected clearBtn: HTMLButtonElement | null = null;\n\n protected readonly boundOnChange = () =>\n this.setValue(this.getValue(), { silent: false, action: 'change' });\n\n protected readonly boundOnReset = () => this.onReset();\n protected readonly boundOnClear = () => this.onClear();\n\n // Declare reactive properties for TypeScript\n declare value?: TValue;\n declare defaultValue?: TValue | string;\n declare resettable?: boolean;\n declare resetText?: string;\n declare resetTitle?: string;\n declare clearable?: boolean;\n declare clearText?: string;\n declare clearTitle?: string;\n declare actionButtonStyle?: ActionButtonStyle;\n declare size?: string;\n declare disabled?: boolean;\n declare label?: string;\n declare labelPlacement?: 'top' | 'left';\n declare required?: boolean;\n declare helperText?: string;\n declare error?: string;\n\n /**\n * Lifecycle: Component connected to DOM\n */\n connectedCallback() {\n super.connectedCallback();\n }\n\n /**\n * Lifecycle: Component disconnected from DOM\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n }\n\n /**\n * Render action buttons (clear/reset) using this.builder.\n * Must be called from within a build() callback.\n */\n protected renderActionButtons(force: boolean = false) {\n const style = this.actionButtonStyle || 'integrated';\n const hasActions = force || this.clearable || this.resettable;\n\n if (hasActions && style === 'integrated') {\n tags.div({ className: 'action-controls' }, () => {\n this.renderClearButton(force);\n this.renderResetButton(force);\n });\n } else {\n this.renderClearButton(force);\n this.renderResetButton(force);\n }\n }\n\n protected renderResetButton(force: boolean = false) {\n const { button } = tags;\n const style = this.actionButtonStyle || 'integrated';\n\n if (force || this.resettable) {\n const className = style === 'integrated' ? 'reset-btn action-btn' : 'reset-btn';\n this.resetBtn = button({\n className,\n textContent: this.resetText || '↺',\n title: this.resetTitle || '↺',\n '@click': this.boundOnReset,\n });\n }\n }\n\n protected renderClearButton(force: boolean = false) {\n const { button } = tags;\n const style = this.actionButtonStyle || 'integrated';\n\n if (force || this.clearable) {\n const className = style === 'integrated' ? 'clear-btn action-btn' : 'clear-btn';\n this.clearBtn = button({\n className,\n textContent: this.clearText || '✕',\n title: this.clearTitle || '✕',\n '@click': this.boundOnClear,\n });\n }\n }\n\n /**\n * Returns a stable unique ID for this field instance,\n * used to associate <label htmlFor> with the underlying input.\n */\n protected getFieldId(): string {\n return this._fieldId;\n }\n\n /**\n * Renders a <label> element when the `label` prop is set.\n * Call this as the first statement inside the render() html() callback.\n * @param fieldId - The id to set on the underlying form control element (pass to input via id prop)\n */\n protected renderLabel(fieldId: string): void {\n if (!this.label) return;\n const { span } = tags;\n tags.label({ id: `${fieldId}-label`, className: 'field-label', for: fieldId }, () => {\n span({ textContent: this.label! });\n if (this.required) {\n span({ className: 'field-required', 'aria-hidden': 'true', textContent: ' *' });\n }\n });\n }\n\n /**\n * Renders helper text below the field. Hidden when `error` is set.\n * Call this after the field-body div in render().\n */\n protected renderHelperText(): void {\n if (!this.helperText || this.error) return;\n const { span } = tags;\n span({ className: 'field-helper', textContent: this.helperText });\n }\n\n /**\n * Renders an error message below the field when `error` is set.\n * Call this after renderHelperText() in render().\n */\n protected renderError(): void {\n if (!this.error) return;\n const { span } = tags;\n span({ className: 'field-error', textContent: this.error });\n }\n\n /**\n * Watcher for disabled property\n */\n protected onDisabledChanged(newValue: boolean) {\n if (this.fieldElement) {\n (this.fieldElement as HTMLInputElement | HTMLSelectElement).disabled = Boolean(newValue);\n }\n }\n\n /**\n * Watcher for error property — syncs aria-invalid on the field element\n */\n protected onErrorChanged(newValue: string | undefined): void {\n if (this.fieldElement) {\n if (newValue) {\n this.fieldElement.setAttribute('aria-invalid', 'true');\n } else {\n this.fieldElement.removeAttribute('aria-invalid');\n }\n }\n }\n\n /**\n * Lifecycle: called after every render update.\n * Keeps aria-invalid on fieldElement in sync regardless of watcher timing.\n */\n protected onUpdated(_changedProps: Map<string, unknown>): void {\n if (!this.fieldElement) return;\n if (this.error) {\n this.fieldElement.setAttribute('aria-invalid', 'true');\n } else {\n this.fieldElement.removeAttribute('aria-invalid');\n }\n }\n\n /**\n * Returns true if the field passes constraint validation.\n * Delegates to the underlying fieldElement when available;\n * falls back to a manual required-check otherwise.\n */\n public checkValidity(): boolean {\n if (this.fieldElement) {\n return this.fieldElement.checkValidity();\n }\n if (this.required) {\n const v = this.value;\n return v !== undefined && v !== '' && v !== null;\n }\n return true;\n }\n\n /**\n * Reports validity, showing the browser's built-in validation UI when possible.\n */\n public reportValidity(): boolean {\n if (this.fieldElement) {\n return this.fieldElement.reportValidity();\n }\n return this.checkValidity();\n }\n\n /**\n * Render the field component\n * Override in subclass to provide custom rendering\n */\n render(): void {\n // Default implementation - subclasses can override\n }\n\n /**\n * Get current value from the field element\n * Default implementation returns the value property of fieldElement\n * Override in subclasses if needed (e.g., checkbox uses checked instead of value)\n *\n * @returns Current field value\n */\n protected getValue(): TValue {\n return (this.fieldElement?.value || '') as TValue;\n }\n\n /**\n * Write value to the underlying UI element and sync props\n * Subclasses must override this to update their specific UI element\n *\n * @param _value New value to write to the element\n */\n protected writeValue(_value: TValue): void {\n // Base implementation - subclasses override\n }\n\n /**\n * Get event payload for change events\n * Override in subclasses to customize event data (e.g., { checked, oldChecked } for checkbox)\n *\n * @param value New value\n * @param oldValue Previous value\n * @param action Action type\n * @returns Event payload object\n */\n protected getEventPayload(\n value: TValue,\n oldValue: TValue,\n action: FieldAction,\n ): Record<string, unknown> {\n return { value, oldValue, action };\n }\n\n /**\n * Update field value programmatically (internal method)\n * Subclasses should provide type-safe public wrappers (e.g., change() method)\n *\n * @param value New value\n * @param options.silent If true, won't emit change event (default: true)\n * @param options.action Action type for the event (default: 'change')\n */\n protected setValue(value: TValue, options?: { silent?: boolean; action?: FieldAction }): void {\n const oldValue = this.getValue();\n\n // Update property value\n this.value = value;\n\n // Write to UI element (DOM only)\n this.writeValue(value);\n\n // Emit event if not silent\n if (options?.silent === false) {\n const payload = this.getEventPayload(value, oldValue, options.action || 'change');\n this.emit('change', { detail: payload });\n }\n }\n\n /**\n * Reset field to specified value or default value\n *\n * @param value Value to reset to, defaults to defaultValue prop\n * @param options.silent If false, will emit reset event (default: true)\n */\n public reset(value?: TValue, options?: { silent?: boolean }): void {\n const resetValue = value !== undefined ? value : this.defaultValue;\n this.setValue(resetValue as TValue, { ...options, action: 'reset' });\n }\n\n /**\n * Clear the field value\n *\n * @param options.silent If false, will emit clear event (default: true)\n */\n public clear(options?: { silent?: boolean }): void {\n this.setValue('' as TValue, { ...options, action: 'clear' });\n }\n\n /**\n * Handle clear button click\n * Clears the field and dispatches event\n */\n protected onClear(): void {\n this.clear({ silent: false });\n }\n\n /**\n * Handle reset button click\n * Resets to default value and dispatches event\n */\n protected onReset(): void {\n this.reset(undefined, { silent: false });\n }\n}\n\nexport default AeicoField;\nexport type AeicoFieldProps = InferProps<typeof AeicoField>;\n"],"names":["AeicoComponent","tags"],"mappings":";;;;;;AAkBA,MAAM,cAAN,MAAM,oBAAoCA,eAAAA,eAAe;AAAA,EAkCvD,cAAc;AACZ,UAAA;AAHe;AAWP;AAAA;AAAA;AAAA;AAAA,wCAAoC;AAEpC,oCAAqC;AACrC,oCAAqC;AAE5B,yCAAgB,MACjC,KAAK,SAAS,KAAK,YAAY,EAAE,QAAQ,OAAO,QAAQ,SAAA,CAAU;AAEjD,wCAAe,MAAM,KAAK,QAAA;AAC1B,wCAAe,MAAM,KAAK,QAAA;AAhB3C,SAAK,WAAW,YAAY,EAAE,YAAW,eAAe;AAAA,EAC1D;AAAA;AAAA;AAAA;AAAA,EAsCA,oBAAoB;AAClB,UAAM,kBAAA;AAAA,EACR;AAAA;AAAA;AAAA;AAAA,EAKA,uBAAuB;AACrB,UAAM,qBAAA;AAAA,EACR;AAAA;AAAA;AAAA;AAAA;AAAA,EAMU,oBAAoB,QAAiB,OAAO;AACpD,UAAM,QAAQ,KAAK,qBAAqB;AACxC,UAAM,aAAa,SAAS,KAAK,aAAa,KAAK;AAEnD,QAAI,cAAc,UAAU,cAAc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