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,8 +1,9 @@
1
1
  import type { InferProps, Props } from 'aeico';
2
- import styleVariables from '../styles/variables.css?inline';
3
- import style from '../styles/components/dialog.css?inline';
2
+ import styleVariables from '../styles/variables.css';
3
+ import style from '../styles/components/dialog.css';
4
4
  import AeicoComponent from '../aeico-component';
5
- import { html } from 'aeico';
5
+ import { html, tags } from 'aeico';
6
+ import '../icon/icon';
6
7
 
7
8
  class Dialog extends AeicoComponent {
8
9
  static props: Props = {
@@ -40,28 +41,31 @@ class Dialog extends AeicoComponent {
40
41
  },
41
42
  },
42
43
  () => {
43
- // Header
44
44
  if (this.header !== false) {
45
45
  header({}, () => {
46
46
  slot({ name: 'header' }, () => {
47
47
  span({ className: 'label', textContent: this.label || '' });
48
48
  });
49
49
  if (this.closable !== false) {
50
- button({
51
- className: 'close-btn',
52
- textContent: '×',
53
- '@click': () => this.close(),
54
- });
50
+ const { aeIcon } = tags;
51
+ button(
52
+ {
53
+ className: 'close-btn',
54
+ 'aria-label': 'close',
55
+ '@click': () => this.close(),
56
+ },
57
+ () => {
58
+ aeIcon({ name: 'close' });
59
+ },
60
+ );
55
61
  }
56
62
  });
57
63
  }
58
64
 
59
- // Body
60
65
  div({ className: 'body' }, () => {
61
66
  slot();
62
67
  });
63
68
 
64
- // Footer — always rendered to capture slotchange, hidden when empty
65
69
  footer(
66
70
  {
67
71
  style: { display: this._hasFooter ? '' : 'none' },
@@ -79,7 +83,6 @@ class Dialog extends AeicoComponent {
79
83
  const mouseEvent = e as MouseEvent;
80
84
  const path = mouseEvent.composedPath();
81
85
 
82
- // data-close: any slotted element with [data-close] closes the dialog
83
86
  for (const el of path) {
84
87
  if (el instanceof Element && el.hasAttribute('data-close')) {
85
88
  this.close();
@@ -88,7 +91,6 @@ class Dialog extends AeicoComponent {
88
91
  if (el === this._dialogEl) break;
89
92
  }
90
93
 
91
- // Backdrop click (modal mode only)
92
94
  if (this.modal !== false && this.closeOnOverlayClick !== false) {
93
95
  if (mouseEvent.target === this._dialogEl) {
94
96
  const rect = this._dialogEl!.getBoundingClientRect();
@@ -129,7 +131,6 @@ class Dialog extends AeicoComponent {
129
131
 
130
132
  close() {
131
133
  this._dialogEl?.close();
132
- // emit('close') is handled by _handleNativeClose via the native 'close' event
133
134
  }
134
135
 
135
136
  isOpen(): boolean {
@@ -1,8 +1,8 @@
1
1
  import AeicoComponent from '../aeico-component';
2
2
  import type { InferProps } from 'aeico';
3
- import styleVariables from '../styles/variables.css?inline';
4
- import colorCSS from '../styles/color.css?inline';
5
- import style from '../styles/components/divider.css?inline';
3
+ import styleVariables from '../styles/variables.css';
4
+ import colorCSS from '../styles/color.css';
5
+ import style from '../styles/components/divider.css';
6
6
  import { prop } from 'aeico';
7
7
  /**
8
8
  * A simple divider component that can be used to separate content. It supports both horizontal and vertical orientations, as well as customizable thickness and color.
@@ -1,9 +1,10 @@
1
1
  import type { InferProps } from 'aeico';
2
- import styleVariables from '../styles/variables.css?inline';
3
- import style from '../styles/components/drawer.css?inline';
2
+ import styleVariables from '../styles/variables.css';
3
+ import style from '../styles/components/drawer.css';
4
4
  import AeicoComponent from '../aeico-component';
5
- import { html, prop } from 'aeico';
5
+ import { html, prop, tags } from 'aeico';
6
6
  import type { DrawerPlacement } from './defines';
7
+ import '../icon/icon';
7
8
 
8
9
  class Drawer extends AeicoComponent {
9
10
  protected static styles = [styleVariables, style];
@@ -63,11 +64,17 @@ class Drawer extends AeicoComponent {
63
64
  span({ className: 'label', textContent: this.label || '' });
64
65
  });
65
66
  if (this.closable) {
66
- button({
67
- className: 'close-btn',
68
- textContent: '×',
69
- '@click': () => this.close(),
70
- });
67
+ const { aeIcon } = tags;
68
+ button(
69
+ {
70
+ className: 'close-btn',
71
+ 'aria-label': 'close',
72
+ '@click': () => this.close(),
73
+ },
74
+ () => {
75
+ aeIcon({ name: 'close' });
76
+ },
77
+ );
71
78
  }
72
79
  });
73
80
  }
@@ -119,7 +126,11 @@ class Drawer extends AeicoComponent {
119
126
  }
120
127
  };
121
128
 
129
+ private _closeTimeout: ReturnType<typeof setTimeout> | null = null;
130
+
122
131
  open() {
132
+ clearTimeout(this._closeTimeout!);
133
+ this.removeAttribute('data-closing');
123
134
  this.setAttribute('data-open', '');
124
135
  document.addEventListener('keydown', this._handleKeydown);
125
136
  requestAnimationFrame(() => {
@@ -130,17 +141,23 @@ class Drawer extends AeicoComponent {
130
141
  }
131
142
 
132
143
  close() {
133
- this.removeAttribute('data-open');
144
+ if (this.hasAttribute('data-closing')) return;
145
+ this.setAttribute('data-closing', '');
134
146
  document.removeEventListener('keydown', this._handleKeydown);
135
- this.emit('close', { detail: { target: this } });
147
+ this._closeTimeout = setTimeout(() => {
148
+ this.removeAttribute('data-open');
149
+ this.removeAttribute('data-closing');
150
+ this.emit('close', { detail: { target: this } });
151
+ }, 220);
136
152
  }
137
153
 
138
154
  isOpen(): boolean {
139
- return this.hasAttribute('data-open');
155
+ return this.hasAttribute('data-open') && !this.hasAttribute('data-closing');
140
156
  }
141
157
 
142
158
  disconnectedCallback() {
143
159
  super.disconnectedCallback();
160
+ clearTimeout(this._closeTimeout!);
144
161
  document.removeEventListener('keydown', this._handleKeydown);
145
162
  }
146
163
  }
@@ -1,8 +1,8 @@
1
1
  import AeicoComponent from '../aeico-component';
2
2
  import type { InferProps } from 'aeico';
3
3
  import { html } from 'aeico';
4
- import style from '../styles/components/dropdown-item.css?inline';
5
- import variables from '../styles/variables.css?inline';
4
+ import style from '../styles/components/dropdown-item.css';
5
+ import variables from '../styles/variables.css';
6
6
  import { prop } from 'aeico';
7
7
  // Ensure ae-icon is registered when icons are used
8
8
  import '../icon/icon';
@@ -2,8 +2,8 @@
2
2
  import type { InferProps } from 'aeico';
3
3
  import { html } from 'aeico';
4
4
  import { prop } from 'aeico';
5
- import style from '../styles/components/dropdown.css?inline';
6
- import variables from '../styles/variables.css?inline';
5
+ import style from '../styles/components/dropdown.css';
6
+ import variables from '../styles/variables.css';
7
7
  import type { DropdownPlacement } from './defines';
8
8
  // Ensure ae-dropdown-item is registered when this module is used
9
9
  import './dropdown-item';
@@ -9,8 +9,15 @@ export type IconColor =
9
9
  | 'warning'
10
10
  | 'info';
11
11
 
12
+ export interface IconPathDef {
13
+ d: string;
14
+ fill?: string;
15
+ stroke?: boolean;
16
+ strokeWidth?: number;
17
+ }
18
+
12
19
  export interface IconDefinition {
13
- path: string;
20
+ paths: string | IconPathDef[];
14
21
  viewBox?: string;
15
22
  stroke?: boolean;
16
23
  strokeWidth?: number;
package/src/icon/icon.ts CHANGED
@@ -2,10 +2,10 @@
2
2
  import { SVG_NS } from '../utils';
3
3
  import AeicoComponent from '../aeico-component';
4
4
  import { html } from 'aeico';
5
- import styleVariables from '../styles/variables.css?inline';
6
- import sizeCSS from '../styles/size.css?inline';
7
- import colorCSS from '../styles/color.css?inline';
8
- import style from '../styles/components/icon.css?inline';
5
+ import styleVariables from '../styles/variables.css';
6
+ import sizeCSS from '../styles/size.css';
7
+ import colorCSS from '../styles/color.css';
8
+ import style from '../styles/components/icon.css';
9
9
  import type { IconSize, IconColor } from './defines';
10
10
  import { defaultViewBox } from './defines';
11
11
  import IconRegistry from './registry';
@@ -41,22 +41,32 @@ class Icon extends AeicoComponent {
41
41
  this.style.removeProperty('font-size');
42
42
  }
43
43
 
44
- // Resolve stroke: component prop takes priority over registry definition
45
- const useStroke = this.stroke ?? def?.stroke ?? false;
46
- const useStrokeWidth = this.strokeWidth ?? def?.strokeWidth ?? 2;
44
+ if (!def) return;
45
+
46
+ const { paths } = def;
47
+ const isMultiPath = Array.isArray(paths);
48
+
49
+ // Stroke CSS variables only apply in single-path mode (component props)
50
+ if (!isMultiPath) {
51
+ const useStroke =
52
+ this.stroke ?? (this.strokeWidth !== undefined ? true : (def.stroke ?? false));
53
+ const useStrokeWidth = this.strokeWidth ?? def.strokeWidth ?? 2;
47
54
 
48
- if (useStroke) {
49
- this.style.setProperty('--icon-fill', 'none');
50
- this.style.setProperty('--icon-stroke', 'currentColor');
51
- this.style.setProperty('--icon-stroke-width', String(useStrokeWidth));
55
+ if (useStroke) {
56
+ this.style.setProperty('--icon-fill', 'none');
57
+ this.style.setProperty('--icon-stroke', 'currentColor');
58
+ this.style.setProperty('--icon-stroke-width', String(useStrokeWidth));
59
+ } else {
60
+ this.style.removeProperty('--icon-fill');
61
+ this.style.removeProperty('--icon-stroke');
62
+ this.style.removeProperty('--icon-stroke-width');
63
+ }
52
64
  } else {
53
65
  this.style.removeProperty('--icon-fill');
54
66
  this.style.removeProperty('--icon-stroke');
55
67
  this.style.removeProperty('--icon-stroke-width');
56
68
  }
57
69
 
58
- if (!def) return;
59
-
60
70
  return html(({ svg, path }) => {
61
71
  svg(
62
72
  {
@@ -66,7 +76,15 @@ class Icon extends AeicoComponent {
66
76
  xmlns: SVG_NS,
67
77
  },
68
78
  () => {
69
- path({ d: def.path });
79
+ if (typeof paths === 'string') {
80
+ path({ d: paths });
81
+ } else {
82
+ for (const p of paths) {
83
+ const attrs: Record<string, unknown> = { d: p.d };
84
+ if (p.fill) attrs.style = { fill: p.fill };
85
+ path(attrs);
86
+ }
87
+ }
70
88
  },
71
89
  );
72
90
  });
package/src/icon/index.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { default as Icon } from './icon';
2
2
  export type { IconProps } from './icon';
3
3
  export { default as IconRegistry } from './registry';
4
- export type { IconSize, IconColor, IconDefinition, IconRegistryData } from './defines';
4
+ export type { IconSize, IconColor, IconDefinition, IconPathDef, IconRegistryData } from './defines';
@@ -9,7 +9,7 @@ class IconRegistry {
9
9
  static add(icons: IconRegistryData) {
10
10
  for (const [name, data] of Object.entries(icons)) {
11
11
  if (typeof data === 'string') {
12
- this._icons.set(name, { path: data, viewBox: defaultViewBox });
12
+ this._icons.set(name, { paths: data, viewBox: defaultViewBox });
13
13
  } else {
14
14
  this._icons.set(name, data);
15
15
  }
@@ -27,7 +27,7 @@ class IconRegistry {
27
27
  // Skip if the user has already registered this icon
28
28
  if (this._icons.has(name) && !this._builtInKeys.has(name)) continue;
29
29
  if (typeof data === 'string') {
30
- this._icons.set(name, { path: data, viewBox: defaultViewBox });
30
+ this._icons.set(name, { paths: data, viewBox: defaultViewBox });
31
31
  } else {
32
32
  this._icons.set(name, data);
33
33
  }
@@ -8,6 +8,7 @@ export interface ParentMenuLike extends Element {
8
8
  mode?: MenuMode;
9
9
  orientation?: MenuOrientation;
10
10
  trigger?: MenuTrigger;
11
+ wrapText?: boolean;
11
12
  }
12
13
 
13
14
  export interface MenuSelectDetail {
@@ -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/menu-item.css?inline';
5
- import variables from '../styles/variables.css?inline';
4
+ import style from '../styles/components/menu-item.css';
5
+ import variables from '../styles/variables.css';
6
6
  import type {
7
7
  MenuMode,
8
8
  MenuOrientation,
@@ -113,6 +113,10 @@ class MenuItem extends AeicoComponent {
113
113
  return this._parentMenu?.trigger ?? 'click';
114
114
  }
115
115
 
116
+ private get _wrapText(): boolean {
117
+ return this._parentMenu?.wrapText ?? false;
118
+ }
119
+
116
120
  private get _isParent(): boolean {
117
121
  return this.label != null && this.label !== '';
118
122
  }
@@ -212,6 +216,7 @@ class MenuItem extends AeicoComponent {
212
216
  // Arrow direction: inline always shows ► (rotates to ▼ on open)
213
217
  // flyout-bottom shows ▼; flyout-right shows ►
214
218
  const arrowDir = !isInline && panelPlacement === 'bottom' ? 'bottom' : 'right';
219
+ const wrapText = this._wrapText;
215
220
  // Leaf items inside a submenu panel (depth > 0) need different padding
216
221
  const isNested = !!this.parentElement?.closest('ae-menu-item');
217
222
 
@@ -221,7 +226,12 @@ class MenuItem extends AeicoComponent {
221
226
  button(
222
227
  {
223
228
  type: 'button',
224
- className: { item: true, 'item--parent': true, 'item--open': this.open },
229
+ className: {
230
+ item: true,
231
+ 'item--parent': true,
232
+ 'item--open': this.open,
233
+ 'item--wrap': wrapText,
234
+ },
225
235
  disabled: this.disabled,
226
236
  'aria-haspopup': 'menu',
227
237
  'aria-expanded': String(this.open),
@@ -268,7 +278,7 @@ class MenuItem extends AeicoComponent {
268
278
  } else {
269
279
  // Leaf item
270
280
  const sharedProps = {
271
- className: { item: true, 'item--leaf-in-panel': isNested },
281
+ className: { item: true, 'item--leaf-in-panel': isNested, 'item--wrap': wrapText },
272
282
  role: 'menuitem',
273
283
  '@click': this._handleLeafClick,
274
284
  '@keydown': this._handleKeydown,
package/src/menu/menu.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/menu.css?inline';
5
- import variables from '../styles/variables.css?inline';
4
+ import style from '../styles/components/menu.css';
5
+ import variables from '../styles/variables.css';
6
6
  import type { MenuMode, MenuOrientation, MenuSelectDetail, MenuTrigger } from './defines';
7
7
  // Ensure ae-menu-item is registered when this module is used
8
8
  import './menu-item';
@@ -36,6 +36,9 @@ class Menu extends AeicoComponent {
36
36
  @prop({ type: String })
37
37
  accessor selectedKey: string | undefined;
38
38
 
39
+ @prop({ type: Boolean })
40
+ accessor wrapText: boolean = false;
41
+
39
42
  connectedCallback() {
40
43
  super.connectedCallback();
41
44
  this.listen('_menu-item-select', this._handleItemSelect as EventListener);
@@ -1,7 +1,7 @@
1
1
  import type { InferProps } from 'aeico';
2
- import styleVariables from '../styles/variables.css?inline';
3
- import colorCSS from '../styles/color.css?inline';
4
- import navbarStyle from '../styles/components/navbar.css?inline';
2
+ import styleVariables from '../styles/variables.css';
3
+ import colorCSS from '../styles/color.css';
4
+ import navbarStyle from '../styles/components/navbar.css';
5
5
  import AeicoComponent from '../aeico-component';
6
6
  import { html } from 'aeico';
7
7
  import { prop } from 'aeico';
@@ -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/number-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/number-input.css';
9
9
 
10
10
  class NumberInput extends AeicoField<number> {
11
11
  protected fieldElement: HTMLInputElement | null = null;
@@ -1,9 +1,9 @@
1
1
  import { html, prop, tags } from 'aeico';
2
2
  import type { InferProps } from 'aeico';
3
3
  import AeicoComponent from '../aeico-component';
4
- import styleVariables from '../styles/variables.css?inline';
5
- import sizeCSS from '../styles/size.css?inline';
6
- import paginationStyle from '../styles/components/pagination.css?inline';
4
+ import styleVariables from '../styles/variables.css';
5
+ import sizeCSS from '../styles/size.css';
6
+ import paginationStyle from '../styles/components/pagination.css';
7
7
  import type { PaginationSize, PaginationVariant } from './defines';
8
8
  import '../icon/icon';
9
9
 
@@ -1,9 +1,9 @@
1
1
  import type { InferProps } from 'aeico';
2
2
  import { html, prop } from 'aeico';
3
3
  import AeicoComponent from '../aeico-component';
4
- import styleVariables from '../styles/variables.css?inline';
5
- import colorCSS from '../styles/color.css?inline';
6
- import style from '../styles/components/progress-bar.css?inline';
4
+ import styleVariables from '../styles/variables.css';
5
+ import colorCSS from '../styles/color.css';
6
+ import style from '../styles/components/progress-bar.css';
7
7
  import type { ProgressBarColor } from './defines';
8
8
 
9
9
  /**
@@ -4,12 +4,12 @@ import { html, tags } from 'aeico';
4
4
  import type { ButtonColor, ButtonVariant, ButtonSize } from '../button';
5
5
  import type { RadioGroupMode, RadioGroupOption, RadioGroupOptions } from './defines';
6
6
  import Radio from './radio';
7
- import style from '../styles/components/radio-group.css?inline';
8
- import variables from '../styles/variables.css?inline';
9
- import sizeCSS from '../styles/size.css?inline';
10
- import colorCSS from '../styles/color.css?inline';
11
- import fieldLabelCSS from '../styles/components/field-label.css?inline';
12
- import actionButtonCSS from '../styles/components/action-button.css?inline';
7
+ import style from '../styles/components/radio-group.css';
8
+ import variables from '../styles/variables.css';
9
+ import sizeCSS from '../styles/size.css';
10
+ import colorCSS from '../styles/color.css';
11
+ import fieldLabelCSS from '../styles/components/field-label.css';
12
+ import actionButtonCSS from '../styles/components/action-button.css';
13
13
 
14
14
  class RadioGroup extends AeicoField {
15
15
  protected fieldElement: HTMLInputElement | null = null;
@@ -29,6 +29,7 @@ class RadioGroup extends AeicoField {
29
29
  variant: { type: String },
30
30
  size: { type: String },
31
31
  allowEmpty: { type: Boolean },
32
+ actionButtonStyle: { type: String },
32
33
  };
33
34
 
34
35
  declare options?: RadioGroupOptions;
@@ -143,13 +144,16 @@ class RadioGroup extends AeicoField {
143
144
  div({ id, role: 'group', className: 'rg-container field-body' }, () => {
144
145
  if (mode === 'default') {
145
146
  this._renderRadio(opts, current);
147
+ this.renderActionButtons();
146
148
  } else {
147
149
  this._renderButtons(opts, current, mode);
148
150
  }
149
151
  });
150
152
 
151
- if (this.allowEmpty) this.renderClearButton();
152
- this.renderResetButton();
153
+ if (mode !== 'default') {
154
+ if (this.allowEmpty) this.renderClearButton();
155
+ this.renderResetButton();
156
+ }
153
157
 
154
158
  // Hidden slot — captures <option> light DOM children
155
159
  this._slotEl = slot({
@@ -1,8 +1,8 @@
1
1
  import AeicoComponent from '../aeico-component';
2
2
  import type { InferProps } from 'aeico';
3
3
  import { html } from 'aeico';
4
- import style from '../styles/components/select-option.css?inline';
5
- import variables from '../styles/variables.css?inline';
4
+ import style from '../styles/components/select-option.css';
5
+ import variables from '../styles/variables.css';
6
6
  import { prop } from 'aeico';
7
7
 
8
8
  class SelectOption extends AeicoComponent {
@@ -8,11 +8,11 @@ import type {
8
8
  SelectPosition,
9
9
  SelectMultiValue,
10
10
  } from './defines';
11
- import style from '../styles/components/select.css?inline';
12
- import variables from '../styles/variables.css?inline';
13
- import sizeCSS from '../styles/size.css?inline';
14
- import fieldLabelCSS from '../styles/components/field-label.css?inline';
15
- import actionButtonCSS from '../styles/components/action-button.css?inline';
11
+ import style from '../styles/components/select.css';
12
+ import variables from '../styles/variables.css';
13
+ import sizeCSS from '../styles/size.css';
14
+ import fieldLabelCSS from '../styles/components/field-label.css';
15
+ import actionButtonCSS from '../styles/components/action-button.css';
16
16
  import SelectOptionElement from './select-option';
17
17
  import '../tag/tag';
18
18
  import { prop } from 'aeico';
@@ -2,12 +2,12 @@
2
2
  import type { InferProps } from 'aeico';
3
3
  import { html, tags } from 'aeico';
4
4
  import type { NormalizedOption, SliderMarks, SliderOption, SliderOptions } from './defines';
5
- import style from '../styles/components/slider.css?inline';
6
- import variables from '../styles/variables.css?inline';
7
- import sizeCSS from '../styles/size.css?inline';
8
- import colorCSS from '../styles/color.css?inline';
9
- import fieldLabelCSS from '../styles/components/field-label.css?inline';
10
- import actionButtonCSS from '../styles/components/action-button.css?inline';
5
+ import style from '../styles/components/slider.css';
6
+ import variables from '../styles/variables.css';
7
+ import sizeCSS from '../styles/size.css';
8
+ import colorCSS from '../styles/color.css';
9
+ import fieldLabelCSS from '../styles/components/field-label.css';
10
+ import actionButtonCSS from '../styles/components/action-button.css';
11
11
  import { prop } from 'aeico';
12
12
 
13
13
  class Slider extends AeicoField {
@@ -1,10 +1,10 @@
1
1
  import AeicoComponent from '../aeico-component';
2
2
  import type { InferProps } from 'aeico';
3
3
  import { html, prop } from 'aeico';
4
- import styleVariables from '../styles/variables.css?inline';
5
- import sizeCSS from '../styles/size.css?inline';
6
- import colorCSS from '../styles/color.css?inline';
7
- import style from '../styles/components/spinner.css?inline';
4
+ import styleVariables from '../styles/variables.css';
5
+ import sizeCSS from '../styles/size.css';
6
+ import colorCSS from '../styles/color.css';
7
+ import style from '../styles/components/spinner.css';
8
8
  import type { SpinnerColor, SpinnerSize, SpinnerVariant } from './defines';
9
9
 
10
10
  /**