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
@@ -0,0 +1,820 @@
1
+ // src/aeico-field.ts
2
+ import { tags } from "aeico";
3
+
4
+ // src/aeico-component.ts
5
+ import { AeicoElement } from "aeico";
6
+
7
+ // src/utils.ts
8
+ function toKebab(str) {
9
+ const cleaned = str.replace(/^[_\d]+/, "");
10
+ return cleaned.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
11
+ }
12
+
13
+ // src/aeico-component.ts
14
+ var TAG_NAME_PREFIX = "ae";
15
+ var AeicoComponent = class extends AeicoElement {
16
+ static register(name) {
17
+ const tagName = name || `${TAG_NAME_PREFIX}-${this.tagName || toKebab(this.name)}`;
18
+ super.register(tagName);
19
+ }
20
+ };
21
+ var aeico_component_default = AeicoComponent;
22
+
23
+ // src/aeico-field.ts
24
+ var AeicoField = class _AeicoField extends aeico_component_default {
25
+ /**
26
+ * Define base field properties (extends AeicoElement properties)
27
+ */
28
+ static props = {
29
+ value: { type: String },
30
+ defaultValue: { type: String },
31
+ resettable: { type: Boolean },
32
+ resetText: { type: String },
33
+ resetTitle: { type: String },
34
+ clearable: { type: Boolean },
35
+ clearText: { type: String },
36
+ clearTitle: { type: String },
37
+ actionButtonStyle: { type: String },
38
+ size: { type: String },
39
+ disabled: { type: Boolean },
40
+ label: { type: String },
41
+ labelPlacement: { type: String },
42
+ required: { type: Boolean },
43
+ helperText: { type: String },
44
+ error: { type: String }
45
+ };
46
+ /**
47
+ * Property watchers
48
+ */
49
+ static watchers = {
50
+ disabled: "onDisabledChanged",
51
+ error: "onErrorChanged"
52
+ };
53
+ static _fieldIdCounter = 0;
54
+ _fieldId;
55
+ constructor() {
56
+ super();
57
+ this._fieldId = `ae-field-${++_AeicoField._fieldIdCounter}`;
58
+ }
59
+ /**
60
+ * The underlying form control element (input, select, etc.)
61
+ * Subclasses should set this to their specific element
62
+ */
63
+ fieldElement = null;
64
+ resetBtn = null;
65
+ clearBtn = null;
66
+ boundOnChange = () => this.setValue(this.getValue(), { silent: false, action: "change" });
67
+ boundOnReset = () => this.onReset();
68
+ boundOnClear = () => this.onClear();
69
+ /**
70
+ * Lifecycle: Component connected to DOM
71
+ */
72
+ connectedCallback() {
73
+ super.connectedCallback();
74
+ }
75
+ /**
76
+ * Lifecycle: Component disconnected from DOM
77
+ */
78
+ disconnectedCallback() {
79
+ super.disconnectedCallback();
80
+ }
81
+ /**
82
+ * Render action buttons (clear/reset) using this.builder.
83
+ * Must be called from within a build() callback.
84
+ */
85
+ renderActionButtons(force = false) {
86
+ const style = this.actionButtonStyle || "integrated";
87
+ const hasActions = force || this.clearable || this.resettable;
88
+ if (hasActions && style === "integrated") {
89
+ tags.div({ className: "action-controls" }, () => {
90
+ this.renderClearButton(force);
91
+ this.renderResetButton(force);
92
+ });
93
+ } else {
94
+ this.renderClearButton(force);
95
+ this.renderResetButton(force);
96
+ }
97
+ }
98
+ renderResetButton(force = false) {
99
+ const { button } = tags;
100
+ const style = this.actionButtonStyle || "integrated";
101
+ if (force || this.resettable) {
102
+ const className = style === "integrated" ? "reset-btn action-btn" : "reset-btn";
103
+ this.resetBtn = button({
104
+ className,
105
+ textContent: this.resetText || "\u21BA",
106
+ title: this.resetTitle || "\u21BA",
107
+ "@click": this.boundOnReset
108
+ });
109
+ }
110
+ }
111
+ renderClearButton(force = false) {
112
+ const { button } = tags;
113
+ const style = this.actionButtonStyle || "integrated";
114
+ if (force || this.clearable) {
115
+ const className = style === "integrated" ? "clear-btn action-btn" : "clear-btn";
116
+ this.clearBtn = button({
117
+ className,
118
+ textContent: this.clearText || "\u2715",
119
+ title: this.clearTitle || "\u2715",
120
+ "@click": this.boundOnClear
121
+ });
122
+ }
123
+ }
124
+ /**
125
+ * Returns a stable unique ID for this field instance,
126
+ * used to associate <label htmlFor> with the underlying input.
127
+ */
128
+ getFieldId() {
129
+ return this._fieldId;
130
+ }
131
+ /**
132
+ * Renders a <label> element when the `label` prop is set.
133
+ * Call this as the first statement inside the render() html() callback.
134
+ * @param fieldId - The id to set on the underlying form control element (pass to input via id prop)
135
+ */
136
+ renderLabel(fieldId) {
137
+ if (!this.label) return;
138
+ const { span } = tags;
139
+ tags.label({ id: `${fieldId}-label`, className: "field-label", for: fieldId }, () => {
140
+ span({ textContent: this.label });
141
+ if (this.required) {
142
+ span({ className: "field-required", "aria-hidden": "true", textContent: " *" });
143
+ }
144
+ });
145
+ }
146
+ /**
147
+ * Renders helper text below the field. Hidden when `error` is set.
148
+ * Call this after the field-body div in render().
149
+ */
150
+ renderHelperText() {
151
+ if (!this.helperText || this.error) return;
152
+ const { span } = tags;
153
+ span({ className: "field-helper", textContent: this.helperText });
154
+ }
155
+ /**
156
+ * Renders an error message below the field when `error` is set.
157
+ * Call this after renderHelperText() in render().
158
+ */
159
+ renderError() {
160
+ if (!this.error) return;
161
+ const { span } = tags;
162
+ span({ className: "field-error", textContent: this.error });
163
+ }
164
+ /**
165
+ * Watcher for disabled property
166
+ */
167
+ onDisabledChanged(newValue) {
168
+ if (this.fieldElement) {
169
+ this.fieldElement.disabled = Boolean(newValue);
170
+ }
171
+ }
172
+ /**
173
+ * Watcher for error property — syncs aria-invalid on the field element
174
+ */
175
+ onErrorChanged(newValue) {
176
+ if (this.fieldElement) {
177
+ if (newValue) {
178
+ this.fieldElement.setAttribute("aria-invalid", "true");
179
+ } else {
180
+ this.fieldElement.removeAttribute("aria-invalid");
181
+ }
182
+ }
183
+ }
184
+ /**
185
+ * Lifecycle: called after every render update.
186
+ * Keeps aria-invalid on fieldElement in sync regardless of watcher timing.
187
+ */
188
+ onUpdated(_changedProps) {
189
+ if (!this.fieldElement) return;
190
+ if (this.error) {
191
+ this.fieldElement.setAttribute("aria-invalid", "true");
192
+ } else {
193
+ this.fieldElement.removeAttribute("aria-invalid");
194
+ }
195
+ }
196
+ /**
197
+ * Returns true if the field passes constraint validation.
198
+ * Delegates to the underlying fieldElement when available;
199
+ * falls back to a manual required-check otherwise.
200
+ */
201
+ checkValidity() {
202
+ if (this.fieldElement) {
203
+ return this.fieldElement.checkValidity();
204
+ }
205
+ if (this.required) {
206
+ const v = this.value;
207
+ return v !== void 0 && v !== "" && v !== null;
208
+ }
209
+ return true;
210
+ }
211
+ /**
212
+ * Reports validity, showing the browser's built-in validation UI when possible.
213
+ */
214
+ reportValidity() {
215
+ if (this.fieldElement) {
216
+ return this.fieldElement.reportValidity();
217
+ }
218
+ return this.checkValidity();
219
+ }
220
+ /**
221
+ * Render the field component
222
+ * Override in subclass to provide custom rendering
223
+ */
224
+ render() {
225
+ }
226
+ /**
227
+ * Get current value from the field element
228
+ * Default implementation returns the value property of fieldElement
229
+ * Override in subclasses if needed (e.g., checkbox uses checked instead of value)
230
+ *
231
+ * @returns Current field value
232
+ */
233
+ getValue() {
234
+ return this.fieldElement?.value || "";
235
+ }
236
+ /**
237
+ * Write value to the underlying UI element and sync props
238
+ * Subclasses must override this to update their specific UI element
239
+ *
240
+ * @param _value New value to write to the element
241
+ */
242
+ writeValue(_value) {
243
+ }
244
+ /**
245
+ * Get event payload for change events
246
+ * Override in subclasses to customize event data (e.g., { checked, oldChecked } for checkbox)
247
+ *
248
+ * @param value New value
249
+ * @param oldValue Previous value
250
+ * @param action Action type
251
+ * @returns Event payload object
252
+ */
253
+ getEventPayload(value, oldValue, action) {
254
+ return { value, oldValue, action };
255
+ }
256
+ /**
257
+ * Update field value programmatically (internal method)
258
+ * Subclasses should provide type-safe public wrappers (e.g., change() method)
259
+ *
260
+ * @param value New value
261
+ * @param options.silent If true, won't emit change event (default: true)
262
+ * @param options.action Action type for the event (default: 'change')
263
+ */
264
+ setValue(value, options) {
265
+ const oldValue = this.getValue();
266
+ this.value = value;
267
+ this.writeValue(value);
268
+ if (options?.silent === false) {
269
+ const payload = this.getEventPayload(value, oldValue, options.action || "change");
270
+ this.emit("change", { detail: payload });
271
+ }
272
+ }
273
+ /**
274
+ * Reset field to specified value or default value
275
+ *
276
+ * @param value Value to reset to, defaults to defaultValue prop
277
+ * @param options.silent If false, will emit reset event (default: true)
278
+ */
279
+ reset(value, options) {
280
+ const resetValue = value !== void 0 ? value : this.defaultValue;
281
+ this.setValue(resetValue, { ...options, action: "reset" });
282
+ }
283
+ /**
284
+ * Clear the field value
285
+ *
286
+ * @param options.silent If false, will emit clear event (default: true)
287
+ */
288
+ clear(options) {
289
+ this.setValue("", { ...options, action: "clear" });
290
+ }
291
+ /**
292
+ * Handle clear button click
293
+ * Clears the field and dispatches event
294
+ */
295
+ onClear() {
296
+ this.clear({ silent: false });
297
+ }
298
+ /**
299
+ * Handle reset button click
300
+ * Resets to default value and dispatches event
301
+ */
302
+ onReset() {
303
+ this.reset(void 0, { silent: false });
304
+ }
305
+ };
306
+ var aeico_field_default = AeicoField;
307
+
308
+ // src/number-input/number-input.ts
309
+ import { html } from "aeico";
310
+
311
+ // css-inline:/home/runner/work/aeico-components/aeico-components/src/styles/variables.css
312
+ var variables_default = `:root,
313
+ :host {
314
+ --ae-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
315
+ "Noto Sans", "Liberation Sans", Arial, sans-serif,
316
+ "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
317
+ --ae-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas,
318
+ "Liberation Mono", "Courier New", monospace;
319
+ font-family: var(--ae-font-sans-serif);
320
+ --ae-blue: #0e639c;
321
+ --ae-green: #28a745;
322
+ --ae-red: #dc3545;
323
+ --ae-yellow: #ffc107;
324
+ --ae-cyan: #17a2b8;
325
+ --ae-gray: #6e6e6e;
326
+ --ae-slate: #64748b;
327
+ --ae-dark: #343a40;
328
+ --ae-light: #f8f9fa;
329
+ }
330
+
331
+ :root,
332
+ :host {
333
+ /* Blue */
334
+ --ae-blue-100: color-mix(in srgb, var(--ae-blue) 20%, white);
335
+ --ae-blue-200: color-mix(in srgb, var(--ae-blue) 40%, white);
336
+ --ae-blue-300: color-mix(in srgb, var(--ae-blue) 60%, white);
337
+ --ae-blue-400: color-mix(in srgb, var(--ae-blue) 80%, white);
338
+ --ae-blue-500: var(--ae-blue);
339
+ --ae-blue-600: color-mix(in srgb, var(--ae-blue) 80%, black);
340
+ --ae-blue-700: color-mix(in srgb, var(--ae-blue) 60%, black);
341
+ --ae-blue-800: color-mix(in srgb, var(--ae-blue) 40%, black);
342
+ --ae-blue-900: color-mix(in srgb, var(--ae-blue) 20%, black);
343
+
344
+ /* Green */
345
+ --ae-green-100: color-mix(in srgb, var(--ae-green) 20%, white);
346
+ --ae-green-200: color-mix(in srgb, var(--ae-green) 40%, white);
347
+ --ae-green-300: color-mix(in srgb, var(--ae-green) 60%, white);
348
+ --ae-green-400: color-mix(in srgb, var(--ae-green) 80%, white);
349
+ --ae-green-500: var(--ae-green);
350
+ --ae-green-600: color-mix(in srgb, var(--ae-green) 80%, black);
351
+ --ae-green-700: color-mix(in srgb, var(--ae-green) 60%, black);
352
+ --ae-green-800: color-mix(in srgb, var(--ae-green) 40%, black);
353
+ --ae-green-900: color-mix(in srgb, var(--ae-green) 20%, black);
354
+
355
+ /* Red */
356
+ --ae-red-100: color-mix(in srgb, var(--ae-red) 20%, white);
357
+ --ae-red-200: color-mix(in srgb, var(--ae-red) 40%, white);
358
+ --ae-red-300: color-mix(in srgb, var(--ae-red) 60%, white);
359
+ --ae-red-400: color-mix(in srgb, var(--ae-red) 80%, white);
360
+ --ae-red-500: var(--ae-red);
361
+ --ae-red-600: color-mix(in srgb, var(--ae-red) 80%, black);
362
+ --ae-red-700: color-mix(in srgb, var(--ae-red) 60%, black);
363
+ --ae-red-800: color-mix(in srgb, var(--ae-red) 40%, black);
364
+ --ae-red-900: color-mix(in srgb, var(--ae-red) 20%, black);
365
+
366
+ /* Yellow */
367
+ --ae-yellow-100: color-mix(in srgb, var(--ae-yellow) 20%, white);
368
+ --ae-yellow-200: color-mix(in srgb, var(--ae-yellow) 40%, white);
369
+ --ae-yellow-300: color-mix(in srgb, var(--ae-yellow) 60%, white);
370
+ --ae-yellow-400: color-mix(in srgb, var(--ae-yellow) 80%, white);
371
+ --ae-yellow-500: var(--ae-yellow);
372
+ --ae-yellow-600: color-mix(in srgb, var(--ae-yellow) 80%, black);
373
+ --ae-yellow-700: color-mix(in srgb, var(--ae-yellow) 60%, black);
374
+ --ae-yellow-800: color-mix(in srgb, var(--ae-yellow) 40%, black);
375
+ --ae-yellow-900: color-mix(in srgb, var(--ae-yellow) 20%, black);
376
+
377
+ /* Cyan */
378
+ --ae-cyan-100: color-mix(in srgb, var(--ae-cyan) 20%, white);
379
+ --ae-cyan-200: color-mix(in srgb, var(--ae-cyan) 40%, white);
380
+ --ae-cyan-300: color-mix(in srgb, var(--ae-cyan) 60%, white);
381
+ --ae-cyan-400: color-mix(in srgb, var(--ae-cyan) 80%, white);
382
+ --ae-cyan-500: var(--ae-cyan);
383
+ --ae-cyan-600: color-mix(in srgb, var(--ae-cyan) 80%, black);
384
+ --ae-cyan-700: color-mix(in srgb, var(--ae-cyan) 60%, black);
385
+ --ae-cyan-800: color-mix(in srgb, var(--ae-cyan) 40%, black);
386
+ --ae-cyan-900: color-mix(in srgb, var(--ae-cyan) 20%, black);
387
+
388
+ /* Gray (neutral \u2014 base #6e6e6e) */
389
+ --ae-gray-100: color-mix(in srgb, var(--ae-gray) 20%, white);
390
+ --ae-gray-200: color-mix(in srgb, var(--ae-gray) 40%, white);
391
+ --ae-gray-300: color-mix(in srgb, var(--ae-gray) 60%, white);
392
+ --ae-gray-400: color-mix(in srgb, var(--ae-gray) 80%, white);
393
+ --ae-gray-500: var(--ae-gray);
394
+ --ae-gray-600: color-mix(in srgb, var(--ae-gray) 80%, black);
395
+ --ae-gray-700: color-mix(in srgb, var(--ae-gray) 60%, black);
396
+ --ae-gray-800: color-mix(in srgb, var(--ae-gray) 40%, black);
397
+ --ae-gray-900: color-mix(in srgb, var(--ae-gray) 20%, black);
398
+
399
+ /* Slate (blue-gray \u2014 base #64748b, used for 'secondary') */
400
+ --ae-slate-100: color-mix(in srgb, var(--ae-slate) 20%, white);
401
+ --ae-slate-200: color-mix(in srgb, var(--ae-slate) 40%, white);
402
+ --ae-slate-300: color-mix(in srgb, var(--ae-slate) 60%, white);
403
+ --ae-slate-400: color-mix(in srgb, var(--ae-slate) 80%, white);
404
+ --ae-slate-500: var(--ae-slate);
405
+ --ae-slate-600: color-mix(in srgb, var(--ae-slate) 80%, black);
406
+ --ae-slate-700: color-mix(in srgb, var(--ae-slate) 60%, black);
407
+ --ae-slate-800: color-mix(in srgb, var(--ae-slate) 40%, black);
408
+ --ae-slate-900: color-mix(in srgb, var(--ae-slate) 20%, black);
409
+
410
+ /* Dark (base #343a40) */
411
+ --ae-dark-100: color-mix(in srgb, var(--ae-dark) 20%, white);
412
+ --ae-dark-200: color-mix(in srgb, var(--ae-dark) 40%, white);
413
+ --ae-dark-300: color-mix(in srgb, var(--ae-dark) 60%, white);
414
+ --ae-dark-400: color-mix(in srgb, var(--ae-dark) 80%, white);
415
+ --ae-dark-500: var(--ae-dark);
416
+ --ae-dark-600: color-mix(in srgb, var(--ae-dark) 80%, black);
417
+ --ae-dark-700: color-mix(in srgb, var(--ae-dark) 60%, black);
418
+ --ae-dark-800: color-mix(in srgb, var(--ae-dark) 40%, black);
419
+ --ae-dark-900: color-mix(in srgb, var(--ae-dark) 20%, black);
420
+
421
+ /* Light (base #f8f9fa) */
422
+ --ae-light-100: color-mix(in srgb, var(--ae-light) 20%, white);
423
+ --ae-light-200: color-mix(in srgb, var(--ae-light) 40%, white);
424
+ --ae-light-300: color-mix(in srgb, var(--ae-light) 60%, white);
425
+ --ae-light-400: color-mix(in srgb, var(--ae-light) 80%, white);
426
+ --ae-light-500: var(--ae-light);
427
+ --ae-light-600: color-mix(in srgb, var(--ae-light) 80%, black);
428
+ --ae-light-700: color-mix(in srgb, var(--ae-light) 60%, black);
429
+ --ae-light-800: color-mix(in srgb, var(--ae-light) 40%, black);
430
+ --ae-light-900: color-mix(in srgb, var(--ae-light) 20%, black);
431
+ }
432
+
433
+ :root,
434
+ :host {
435
+ /* Hover / active mix (light default \u2014 overridden in \xA7 6 dark) */
436
+ --ae-color-mix-hover: black 10%;
437
+ --ae-color-mix-active: black 20%;
438
+
439
+ /* Primary (Blue) */
440
+ --ae-color-primary: var(--ae-blue-500);
441
+ --ae-color-primary-hover: color-mix(in srgb, var(--ae-color-primary), var(--ae-color-mix-hover));
442
+ --ae-color-primary-active: color-mix(in srgb, var(--ae-color-primary), var(--ae-color-mix-active));
443
+ --ae-color-primary-disabled: color-mix(in srgb, var(--ae-blue) 50%, var(--ae-gray-500));
444
+
445
+ /* Success (Green) */
446
+ --ae-color-success: var(--ae-green-500);
447
+ --ae-color-success-hover: color-mix(in srgb, var(--ae-color-success), var(--ae-color-mix-hover));
448
+ --ae-color-success-active: color-mix(in srgb, var(--ae-color-success), var(--ae-color-mix-active));
449
+ --ae-color-success-disabled: color-mix(in srgb, var(--ae-green) 50%, var(--ae-gray-500));
450
+
451
+ /* Danger (Red) */
452
+ --ae-color-danger: var(--ae-red-500);
453
+ --ae-color-danger-hover: color-mix(in srgb, var(--ae-color-danger), var(--ae-color-mix-hover));
454
+ --ae-color-danger-active: color-mix(in srgb, var(--ae-color-danger), var(--ae-color-mix-active));
455
+ --ae-color-danger-disabled: color-mix(in srgb, var(--ae-red) 50%, var(--ae-gray-500));
456
+
457
+ /* Warning (Yellow) */
458
+ --ae-color-warning: var(--ae-yellow-500);
459
+ --ae-color-warning-hover: color-mix(in srgb, var(--ae-color-warning), var(--ae-color-mix-hover));
460
+ --ae-color-warning-active: color-mix(in srgb, var(--ae-color-warning), var(--ae-color-mix-active));
461
+ --ae-color-warning-disabled: color-mix(in srgb, var(--ae-yellow) 50%, var(--ae-gray-500));
462
+
463
+ /* Info (Cyan) */
464
+ --ae-color-info: var(--ae-cyan-500);
465
+ --ae-color-info-hover: color-mix(in srgb, var(--ae-color-info), var(--ae-color-mix-hover));
466
+ --ae-color-info-active: color-mix(in srgb, var(--ae-color-info), var(--ae-color-mix-active));
467
+ --ae-color-info-disabled: color-mix(in srgb, var(--ae-cyan) 50%, var(--ae-gray-500));
468
+
469
+ /* Secondary (Slate) \u2014 base differs per theme, overridden in \xA7 6 dark */
470
+ --ae-color-secondary: var(--ae-slate-500);
471
+ --ae-color-secondary-hover: color-mix(in srgb, var(--ae-color-secondary), var(--ae-color-mix-hover));
472
+ --ae-color-secondary-active: color-mix(in srgb, var(--ae-color-secondary), var(--ae-color-mix-active));
473
+ --ae-color-secondary-text: var(--ae-slate-700);
474
+ }
475
+
476
+
477
+ .theme-light,
478
+ :root[theme="light"],
479
+ :host([theme="light"]),
480
+ :host-context([theme="light"]),
481
+ :where(:root),
482
+ :host {
483
+ color-scheme: light;
484
+
485
+ /* Gray UI aliases \u2014 lighter palette steps for elements on white background */
486
+ --ae-color-gray-dark: var(--ae-gray-400);
487
+ --ae-color-gray: var(--ae-gray-300);
488
+ --ae-color-gray-light: var(--ae-gray-200);
489
+ --ae-color-gray-lighter: var(--ae-gray-100);
490
+ --ae-color-gray-lightest: color-mix(in srgb, var(--ae-gray) 10%, white);
491
+
492
+ /* Text */
493
+ --ae-color-text-main: var(--ae-dark-700);
494
+ --ae-color-text-muted: var(--ae-gray-600);
495
+ --ae-color-text-disabled: var(--ae-gray-300);
496
+ --ae-color-text-link: var(--ae-blue-500);
497
+ --ae-color-text-link-hover: var(--ae-blue-700);
498
+
499
+ /* Surfaces */
500
+ --ae-surface-sunken: var(--ae-light-500);
501
+ --ae-surface-base: white;
502
+ --ae-surface-raised: var(--ae-light-500);
503
+ --ae-surface-overlay: white;
504
+ --ae-color-overlay: rgba(0, 0, 0, 0.4);
505
+
506
+ /* Borders */
507
+ --ae-border-subtle: rgba(0, 0, 0, 0.08);
508
+ --ae-border-default: rgba(0, 0, 0, 0.15);
509
+ --ae-border-hover: rgba(0, 0, 0, 0.25);
510
+ --ae-border-focus: var(--ae-color-primary);
511
+ --ae-border-disabled: rgba(0, 0, 0, 0.06);
512
+
513
+ /* Focus ring */
514
+ --ae-focus-ring: rgb(from var(--ae-blue) r g b / 0.30);
515
+ --ae-focus-ring-sm: rgb(from var(--ae-blue) r g b / 0.15);
516
+
517
+ /* Subtle intent tokens \u2014 light context */
518
+ --ae-color-primary-bg-subtle: rgb(from var(--ae-blue) r g b / 0.08);
519
+ --ae-color-primary-border-subtle: rgb(from var(--ae-blue) r g b / 0.40);
520
+ --ae-color-primary-text-emphasis: var(--ae-blue-700);
521
+
522
+ --ae-color-success-bg-subtle: rgb(from var(--ae-green) r g b / 0.08);
523
+ --ae-color-success-border-subtle: rgb(from var(--ae-green) r g b / 0.40);
524
+ --ae-color-success-text-emphasis: var(--ae-green-700);
525
+
526
+ --ae-color-danger-bg-subtle: rgb(from var(--ae-red) r g b / 0.08);
527
+ --ae-color-danger-border-subtle: rgb(from var(--ae-red) r g b / 0.40);
528
+ --ae-color-danger-text-emphasis: var(--ae-red-700);
529
+
530
+ --ae-color-warning-bg-subtle: rgb(from var(--ae-yellow) r g b / 0.08);
531
+ --ae-color-warning-border-subtle: rgb(from var(--ae-yellow) r g b / 0.40);
532
+ --ae-color-warning-text-emphasis: var(--ae-yellow-700);
533
+
534
+ --ae-color-info-bg-subtle: rgb(from var(--ae-cyan) r g b / 0.08);
535
+ --ae-color-info-border-subtle: rgb(from var(--ae-cyan) r g b / 0.40);
536
+ --ae-color-info-text-emphasis: var(--ae-cyan-700);
537
+
538
+ --ae-color-secondary-bg-subtle: rgb(from var(--ae-slate) r g b / 0.08);
539
+ --ae-color-secondary-border-subtle: rgb(from var(--ae-slate) r g b / 0.40);
540
+ --ae-color-secondary-text-emphasis: var(--ae-slate-700);
541
+
542
+ --ae-color-light-bg-subtle: var(--ae-gray-100); /* opaque on white: ~#e2e2e2 */
543
+ --ae-color-light-border-subtle: var(--ae-gray-200); /* opaque on white: ~#c4c4c4 */
544
+
545
+ --ae-color-dark-bg-subtle: var(--ae-dark-100); /* opaque on white: ~#d6d8d9 */
546
+ --ae-color-dark-border-subtle: var(--ae-dark-300); /* opaque on white: ~#85898c */
547
+
548
+ /* Component tokens \u2014 light defaults */
549
+ --ae-action-btn-bg: var(--ae-gray-200);
550
+ --ae-action-btn-bg-hover: var(--ae-color-primary);
551
+ --ae-action-btn-color: var(--ae-gray-600);
552
+ --ae-action-btn-color-hover: white;
553
+
554
+ --ae-clear-btn-bg-hover: var(--ae-color-danger);
555
+ --ae-clear-btn-color-hover: white;
556
+
557
+ --ae-reset-btn-border-radius: var(--ae-radius-xs);
558
+ --ae-reset-btn-bg: var(--ae-action-btn-bg);
559
+ --ae-reset-btn-bg-hover: var(--ae-action-btn-bg-hover);
560
+ --ae-reset-btn-color: var(--ae-action-btn-color);
561
+ --ae-reset-btn-color-hover: var(--ae-action-btn-color-hover);
562
+ --ae-reset-btn-transition: all 0.12s;
563
+
564
+ --ae-clear-btn-border-radius: var(--ae-radius-xs);
565
+ --ae-clear-btn-bg: var(--ae-action-btn-bg);
566
+ --ae-clear-btn-color: var(--ae-action-btn-color);
567
+ --ae-clear-btn-transition: all 0.12s;
568
+ }
569
+
570
+ :root,
571
+ :host {
572
+ --ae-size-scale: 1;
573
+ --ae-size-base: calc(1rem * var(--ae-size-scale)); /* 16px */
574
+ --ae-size-xl: round(calc(var(--ae-size-l) * 1.125), 1px); /* 23px */
575
+ --ae-size-l: round(calc(var(--ae-size-m) * 1.125 * 1.125), 1px); /* 20px */
576
+ --ae-size-m: var(--ae-size-base); /* 16px */
577
+ --ae-size-s: round(calc(var(--ae-size-m) / 1.125), 1px); /* 14px */
578
+ --ae-size-xs: round(calc(var(--ae-size-s) / 1.125), 1px); /* 12px */
579
+ --ae-size-2xs: round(calc(var(--ae-size-xs) / 1.125), 1px); /* 11px */
580
+ --ae-size-3xs: round(calc(var(--ae-size-2xs) / 1.125), 1px); /* 10px */
581
+ }
582
+
583
+ /* Border-radius tokens \u2014 shared across all components */
584
+ :root,
585
+ :host {
586
+ /**
587
+ * Unified border-radius hook for all components.
588
+ *
589
+ * Not set by default \u2014 each component falls back to its own --ae-radius-*
590
+ * token (e.g. button \u2192 sm, card \u2192 lg, input \u2192 xs).
591
+ *
592
+ * Usage:
593
+ * :root { --ae-border-radius: 0; } // global: all components square
594
+ * :root { --ae-border-radius: 999px; } // global: all components pill
595
+ * ae-button { --ae-border-radius: 50%; } // scoped: only buttons circular
596
+ * .sidebar { --ae-border-radius: 8px; } // scoped: everything inside .sidebar
597
+ *
598
+ * To restore a component to its own default:
599
+ * ae-card { --ae-border-radius: initial; }
600
+ */
601
+
602
+ --ae-radius-square: 0;
603
+ --ae-radius-xs: 2px;
604
+ --ae-radius-sm: 4px;
605
+ --ae-radius-md: 6px;
606
+ --ae-radius-lg: 8px;
607
+ --ae-radius-xl: 12px;
608
+ --ae-radius-pill: 999px;
609
+ --ae-radius-circle: 50%;
610
+ }
611
+
612
+ /* Layout tokens \u2014 defined on :root so all light DOM elements can use them */
613
+ :root,
614
+ :host {
615
+ --container-max-width: 1280px;
616
+ --container-padding-x: 1.5rem;
617
+ }
618
+
619
+ .theme-dark,
620
+ :root[theme="dark"],
621
+ :host([theme="dark"]),
622
+ :host-context([theme="dark"]) {
623
+ color-scheme: dark;
624
+
625
+ /* Hover / active \u2014 slightly gentler on dark backgrounds */
626
+ --ae-color-mix-hover: black 8%;
627
+ --ae-color-mix-active: black 16%;
628
+
629
+ /* Gray UI aliases \u2014 darker palette steps for elements on dark background */
630
+ --ae-color-gray-dark: var(--ae-gray-800);
631
+ --ae-color-gray: var(--ae-gray-700);
632
+ --ae-color-gray-light: var(--ae-gray-600);
633
+ --ae-color-gray-lighter: var(--ae-gray-500);
634
+ --ae-color-gray-lightest: var(--ae-gray-400);
635
+
636
+ /* Secondary \u2014 deeper base on dark background */
637
+ --ae-color-secondary: var(--ae-slate-700);
638
+ --ae-color-secondary-text: var(--ae-slate-300);
639
+
640
+ /* Text */
641
+ --ae-color-text-main: white;
642
+ --ae-color-text-muted: var(--ae-gray-200);
643
+ --ae-color-text-disabled: var(--ae-gray-500);
644
+ --ae-color-text-link: var(--ae-blue-300);
645
+ --ae-color-text-link-hover: var(--ae-blue-200);
646
+
647
+ /* Surfaces */
648
+ --ae-surface-sunken: var(--ae-gray-900);
649
+ --ae-surface-base: color-mix(in srgb, var(--ae-gray) 27%, black);
650
+ --ae-surface-raised: color-mix(in srgb, var(--ae-gray) 34%, black);
651
+ --ae-surface-overlay: color-mix(in srgb, var(--ae-gray) 38%, black);
652
+ --ae-color-overlay: rgba(0, 0, 0, 0.6);
653
+
654
+ /* Borders */
655
+ --ae-border-subtle: rgba(255, 255, 255, 0.08);
656
+ --ae-border-default: rgba(255, 255, 255, 0.12);
657
+ --ae-border-hover: rgba(255, 255, 255, 0.20);
658
+ --ae-border-focus: var(--ae-color-primary);
659
+ --ae-border-disabled: rgba(255, 255, 255, 0.06);
660
+
661
+ /* Focus ring */
662
+ --ae-focus-ring: rgb(from var(--ae-blue) r g b / 0.25);
663
+ --ae-focus-ring-sm: rgb(from var(--ae-blue) r g b / 0.10);
664
+
665
+ /* Subtle intent tokens \u2014 dark context (more alpha, lighter text-emphasis) */
666
+ --ae-color-primary-bg-subtle: rgb(from var(--ae-blue) r g b / 0.10);
667
+ --ae-color-primary-border-subtle: rgb(from var(--ae-blue) r g b / 0.30);
668
+ --ae-color-primary-text-emphasis: var(--ae-blue-300);
669
+
670
+ --ae-color-success-bg-subtle: rgb(from var(--ae-green) r g b / 0.10);
671
+ --ae-color-success-border-subtle: rgb(from var(--ae-green) r g b / 0.30);
672
+ --ae-color-success-text-emphasis: var(--ae-green-300);
673
+
674
+ --ae-color-danger-bg-subtle: rgb(from var(--ae-red) r g b / 0.10);
675
+ --ae-color-danger-border-subtle: rgb(from var(--ae-red) r g b / 0.30);
676
+ --ae-color-danger-text-emphasis: var(--ae-red-300);
677
+
678
+ --ae-color-warning-bg-subtle: rgb(from var(--ae-yellow) r g b / 0.10);
679
+ --ae-color-warning-border-subtle: rgb(from var(--ae-yellow) r g b / 0.30);
680
+ --ae-color-warning-text-emphasis: var(--ae-yellow-300);
681
+
682
+ --ae-color-info-bg-subtle: rgb(from var(--ae-cyan) r g b / 0.10);
683
+ --ae-color-info-border-subtle: rgb(from var(--ae-cyan) r g b / 0.30);
684
+ --ae-color-info-text-emphasis: var(--ae-cyan-300);
685
+
686
+ --ae-color-secondary-bg-subtle: rgb(from var(--ae-slate) r g b / 0.10);
687
+ --ae-color-secondary-border-subtle: rgb(from var(--ae-slate) r g b / 0.30);
688
+ --ae-color-secondary-text-emphasis: var(--ae-slate-300);
689
+
690
+ --ae-color-light-bg-subtle: rgb(from var(--ae-light) r g b / 0.20);
691
+ --ae-color-light-border-subtle: rgb(from var(--ae-light) r g b / 0.25);
692
+
693
+ --ae-color-dark-bg-subtle: rgb(from var(--ae-dark) r g b / 0.30);
694
+ --ae-color-dark-border-subtle: rgb(from var(--ae-dark) r g b / 0.50);
695
+
696
+ /* Component tokens \u2014 dark overrides */
697
+ --ae-action-btn-bg: var(--ae-color-gray);
698
+ --ae-action-btn-bg-hover: color-mix(in srgb, var(--ae-blue) 25%, var(--ae-gray-800));
699
+ --ae-action-btn-color: var(--ae-gray-400);
700
+ --ae-action-btn-color-hover: var(--ae-cyan-300);
701
+ --ae-clear-btn-bg-hover: color-mix(in srgb, var(--ae-red) 25%, var(--ae-gray-800));
702
+ --ae-clear-btn-color-hover: var(--ae-red-300);
703
+ }
704
+ `;
705
+
706
+ // css-inline:/home/runner/work/aeico-components/aeico-components/src/styles/size.css
707
+ var size_default = ':host([size="xs"]) { font-size: var(--ae-size-xs); }\n:host([size="sm"]) { font-size: var(--ae-size-s); }\n:host([size="md"]) { font-size: var(--ae-size-m); }\n:host([size="lg"]) { font-size: var(--ae-size-l); }\n:host([size="xl"]) { font-size: var(--ae-size-xl); }\n:host([size="3xs"]) { font-size: var(--ae-size-3xs); }\n:host([size="2xs"]) { font-size: var(--ae-size-2xs); }\n';
708
+
709
+ // css-inline:/home/runner/work/aeico-components/aeico-components/src/styles/components/field-label.css
710
+ var field_label_default = ':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(--ae-red, #dc3545);\n --field-helper-color: var(--ae-color-text-muted, #6e6e6e);\n --field-error-color: var(--ae-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: center;\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(--ae-border-subtle));\n border-radius: 0 var(--field-action-border-radius, var(--ae-radius-xs)) var(--field-action-border-radius, var(--ae-radius-xs)) 0;\n overflow: hidden;\n flex-shrink: 0;\n transition: border-color 0.12s;\n background: var(--field-action-bg, var(--ae-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(--ae-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(--ae-surface-raised));\n}\n\n.action-controls .action-btn:active:not(:disabled) {\n background: var(--field-action-bg-focus, var(--ae-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(--ae-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(--ae-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(--ae-border-default));\n}\n';
711
+
712
+ // css-inline:/home/runner/work/aeico-components/aeico-components/src/styles/components/action-button.css
713
+ var action_button_default = "/* Action button base styles \u2014 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(--ae-clear-btn-border-radius);\n background: var(--ae-clear-btn-bg);\n color: var(--ae-clear-btn-color);\n transition: var(--ae-clear-btn-transition);\n}\n\n.reset-btn:not(.action-btn) {\n border-radius: var(--ae-reset-btn-border-radius);\n background: var(--ae-reset-btn-bg);\n color: var(--ae-reset-btn-color);\n transition: var(--ae-reset-btn-transition);\n}\n\n.clear-btn:not(.action-btn):hover {\n background: var(--ae-clear-btn-bg-hover);\n color: var(--ae-clear-btn-color-hover);\n}\n\n.reset-btn:not(.action-btn):hover {\n background: var(--ae-reset-btn-bg-hover);\n color: var(--ae-reset-btn-color-hover);\n}\n";
714
+
715
+ // css-inline:/home/runner/work/aeico-components/aeico-components/src/styles/components/number-input.css
716
+ var number_input_default = ":host {\n display: block;\n flex: 1;\n min-width: 0;\n font-size: var(--ae-size-base);\n\n /* Layout variables */\n --input-field-gap: 4px;\n \n /* Input element variables */\n --input-font-size: 1em;\n --input-padding: 0.333em 0.583em;\n --input-border-width: 1px;\n --input-transition: border-color 0.12s, background 0.12s;\n}\n\n.input-container {\n display: flex;\n align-items: center;\n gap: var(--input-field-gap);\n width: 100%;\n}\n\ninput {\n flex: 1;\n min-width: 0;\n font-size: var(--input-font-size);\n padding: var(--input-padding);\n border: var(--input-border-width) solid var(--ae-border-subtle);\n border-radius: var(--ae-border-radius, var(--ae-radius-xs));\n background: var(--ae-surface-base);\n color: var(--ae-color-text-muted);\n transition: var(--input-transition);\n -moz-appearance: textfield;\n appearance: textfield;\n}\n\n/* Hide number spinner arrows in WebKit browsers */\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\ninput::placeholder {\n color: var(--ae-color-text-disabled);\n}\n\ninput:focus {\n outline: none;\n border-color: var(--ae-border-focus);\n background: var(--ae-surface-raised);\n}\n\ninput:hover:not(:focus) {\n border-color: var(--ae-border-default);\n background: var(--ae-surface-raised);\n}\n\ninput:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n/* Number stepper controls (right side, integrated, horizontal) */\n.number-controls {\n display: flex;\n flex-direction: row;\n align-items: stretch;\n margin-left: calc(-1 * var(--input-field-gap) - 1px);\n border: var(--input-border-width) solid var(--ae-border-subtle);\n border-radius: 0 var(--ae-border-radius, var(--ae-radius-xs)) var(--ae-border-radius, var(--ae-radius-xs)) 0;\n overflow: hidden;\n flex-shrink: 0;\n transition: var(--input-transition);\n background: var(--ae-surface-base);\n position: relative;\n z-index: 1;\n align-self: stretch;\n}\n\n.number-btn {\n border: none;\n background: transparent;\n color: var(--ae-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.number-btn:hover:not(:disabled) {\n background: var(--ae-surface-raised);\n}\n\n.number-btn:active:not(:disabled) {\n background: var(--ae-surface-raised);\n}\n\n.number-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.number-btn-increment {\n border-right: var(--input-border-width) solid var(--ae-border-subtle);\n}\n\n.input-container:has(input:focus) .number-controls {\n border-color: var(--ae-border-focus);\n}\n\n.input-container:has(input:hover:not(:focus)) .number-controls {\n border-color: var(--ae-border-default);\n}\n\n:host(:has(.number-controls)) input {\n border-radius: var(--ae-border-radius, var(--ae-radius-xs)) 0 0 var(--ae-border-radius, var(--ae-radius-xs));\n}\n\n:host(:has(.action-controls)) input {\n border-radius: var(--ae-border-radius, var(--ae-radius-xs)) 0 0 var(--ae-border-radius, var(--ae-radius-xs));\n}\n\n.number-controls ~ .action-controls {\n margin-left: calc(-1 * var(--input-field-gap) - 1px);\n}\n\n.input-container:has(.number-controls):has(.action-controls) .number-controls {\n border-right: none;\n border-radius: var(--ae-border-radius, var(--ae-radius-xs));\n}\n\n.input-container:has(.number-controls) ~ .action-controls,\n.input-container:has(.action-controls) .number-controls {\n border-radius: var(--ae-border-radius, var(--ae-radius-xs));\n}\n\n.input-container:has(.number-controls) input {\n border-radius: var(--ae-border-radius, var(--ae-radius-xs)) 0 0 var(--ae-border-radius, var(--ae-radius-xs));\n}\n\n.input-container:has(.action-controls) input {\n border-radius: var(--ae-border-radius, var(--ae-radius-xs)) 0 0 var(--ae-border-radius, var(--ae-radius-xs));\n}\n\n:host([error]) input {\n border-color: var(--field-error-color, var(--ae-red));\n}\n\n:host([error]) input:hover:not(:focus),\n:host([error]) input:focus {\n border-color: var(--field-error-color, var(--ae-red));\n}\n";
717
+
718
+ // src/number-input/number-input.ts
719
+ var NumberInput = class extends aeico_field_default {
720
+ fieldElement = null;
721
+ static tagName = "number-input";
722
+ static props = {
723
+ placeholder: { type: String },
724
+ min: { type: Number },
725
+ max: { type: Number },
726
+ step: { type: Number },
727
+ controls: { type: Boolean }
728
+ };
729
+ static styles = [variables_default, size_default, field_label_default, action_button_default, number_input_default];
730
+ render() {
731
+ return html(({ div, input, button }) => {
732
+ const id = this.getFieldId();
733
+ this.renderLabel(id);
734
+ div({ className: "input-container field-body" }, () => {
735
+ this.fieldElement = input({
736
+ id,
737
+ type: "number",
738
+ placeholder: this.placeholder || "",
739
+ required: Boolean(this.required),
740
+ disabled: Boolean(this.disabled),
741
+ min: this.min != null ? String(this.min) : void 0,
742
+ max: this.max != null ? String(this.max) : void 0,
743
+ step: this.step != null ? String(this.step) : void 0,
744
+ "@input": this.boundOnChange
745
+ });
746
+ if (this.controls) {
747
+ div({ className: "number-controls" }, () => {
748
+ button({
749
+ className: "number-btn number-btn-increment",
750
+ textContent: "+",
751
+ disabled: Boolean(this.disabled),
752
+ "@click": this.boundOnIncrement
753
+ });
754
+ button({
755
+ className: "number-btn number-btn-decrement",
756
+ textContent: "-",
757
+ disabled: Boolean(this.disabled),
758
+ "@click": this.boundOnDecrement
759
+ });
760
+ });
761
+ }
762
+ this.renderActionButtons();
763
+ });
764
+ this.renderHelperText();
765
+ this.renderError();
766
+ if (this.fieldElement && this.value != null) {
767
+ this.fieldElement.value = String(this.value);
768
+ }
769
+ });
770
+ }
771
+ boundOnIncrement = () => {
772
+ const current = this.getValue() || 0;
773
+ const step = this.step ?? 1;
774
+ let next = current + step;
775
+ if (this.max != null && next > this.max) {
776
+ next = this.max;
777
+ }
778
+ this.setValue(next, { silent: false, action: "change" });
779
+ };
780
+ boundOnDecrement = () => {
781
+ const current = this.getValue() || 0;
782
+ const step = this.step ?? 1;
783
+ let next = current - step;
784
+ if (this.min != null && next < this.min) {
785
+ next = this.min;
786
+ }
787
+ this.setValue(next, { silent: false, action: "change" });
788
+ };
789
+ /**
790
+ * Get current value as number
791
+ */
792
+ getValue() {
793
+ if (!this.fieldElement) return 0;
794
+ const val = this.fieldElement.value;
795
+ if (val === "") return 0;
796
+ const num = parseFloat(val);
797
+ return isNaN(num) ? 0 : num;
798
+ }
799
+ /**
800
+ * Write value to the input element (DOM only)
801
+ */
802
+ writeValue(value) {
803
+ if (this.fieldElement) {
804
+ this.fieldElement.value = value != null ? String(value) : "";
805
+ }
806
+ }
807
+ /**
808
+ * Get event payload for change events
809
+ */
810
+ getEventPayload(value, oldValue, action) {
811
+ return { value, oldValue, action };
812
+ }
813
+ };
814
+ NumberInput.register();
815
+ var number_input_default2 = NumberInput;
816
+ export {
817
+ number_input_default2 as NumberInput,
818
+ number_input_default2 as default
819
+ };
820
+ //# sourceMappingURL=number-input.js.map