aeico-components 0.1.7 → 0.1.9

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 (350) 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 +531 -4
  35. package/dist/detail-group.cjs.map +7 -1
  36. package/dist/detail-group.js +474 -3
  37. package/dist/detail-group.js.map +7 -1
  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 +6532 -74
  67. package/dist/index.cjs.map +7 -1
  68. package/dist/index.js +6183 -73
  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 +885 -4
  79. package/dist/number-input.cjs.map +7 -1
  80. package/dist/number-input.js +817 -3
  81. package/dist/number-input.js.map +7 -1
  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/dialog/dialog.d.ts +1 -0
  141. package/dist/types/drawer/drawer.d.ts +2 -0
  142. package/dist/types/icon/defines.d.ts +2 -0
  143. package/dist/types/menu/defines.d.ts +1 -0
  144. package/dist/types/menu/menu-item.d.ts +1 -0
  145. package/dist/types/menu/menu.d.ts +1 -0
  146. package/dist/types/styles/layout.d.ts +2 -0
  147. package/dist/types/styles/radius.d.ts +2 -0
  148. package/dist/types/styles/variables.d.ts +2 -0
  149. package/package.json +31 -7
  150. package/src/alert/alert.ts +3 -3
  151. package/src/badge/badge.ts +4 -4
  152. package/src/breadcrumb/breadcrumb-item.ts +2 -2
  153. package/src/breadcrumb/breadcrumb.ts +3 -3
  154. package/src/button/button.ts +4 -4
  155. package/src/button-group/button-group.ts +8 -9
  156. package/src/card/card.ts +3 -3
  157. package/src/checkbox/checkbox.ts +6 -6
  158. package/src/copy-button/copy-button.ts +4 -4
  159. package/src/detail/detail.ts +3 -3
  160. package/src/detail-group/detail-group.ts +2 -2
  161. package/src/dialog/dialog.ts +15 -14
  162. package/src/divider/divider.ts +3 -3
  163. package/src/drawer/drawer.ts +28 -11
  164. package/src/dropdown/dropdown-item.ts +2 -2
  165. package/src/dropdown/dropdown.ts +2 -2
  166. package/src/icon/defines.ts +2 -0
  167. package/src/icon/icon.ts +4 -4
  168. package/src/menu/defines.ts +1 -0
  169. package/src/menu/menu-item.ts +14 -4
  170. package/src/menu/menu.ts +5 -2
  171. package/src/navbar/navbar.ts +3 -3
  172. package/src/number-input/number-input.ts +5 -5
  173. package/src/pagination/pagination.ts +3 -3
  174. package/src/progress-bar/progress-bar.ts +3 -3
  175. package/src/radio-group/radio-group.ts +12 -8
  176. package/src/select/select-option.ts +2 -2
  177. package/src/select/select.ts +5 -5
  178. package/src/slider/slider.ts +6 -6
  179. package/src/spinner/spinner.ts +4 -4
  180. package/src/styles/components/button-group.css +2 -0
  181. package/src/styles/components/card.css +42 -18
  182. package/src/styles/components/checkbox.css +16 -5
  183. package/src/styles/components/dialog.css +1 -1
  184. package/src/styles/components/drawer.css +50 -9
  185. package/src/styles/components/field-label.css +1 -1
  186. package/src/styles/components/menu-item.css +6 -0
  187. package/src/styles/components/navbar.css +7 -28
  188. package/src/styles/components/radio-group.css +19 -0
  189. package/src/styles/components/slider.css +30 -5
  190. package/src/styles/components/switch.css +16 -2
  191. package/src/styles/layout.css +5 -2
  192. package/src/styles/radius.css +15 -0
  193. package/src/switch/switch.ts +6 -6
  194. package/src/tabs/tab-panel.ts +1 -1
  195. package/src/tabs/tab.ts +1 -1
  196. package/src/tabs/tabs.ts +2 -2
  197. package/src/tag/tag.ts +4 -4
  198. package/src/text-input/text-input.ts +5 -5
  199. package/src/textarea/textarea.ts +5 -5
  200. package/src/tooltip/tooltip.ts +2 -2
  201. package/src/tree/tree-item.ts +2 -2
  202. package/src/tree/tree.ts +2 -2
  203. package/dist/chunks/action-button.cjs +0 -296
  204. package/dist/chunks/action-button.cjs.map +0 -1
  205. package/dist/chunks/action-button.js +0 -297
  206. package/dist/chunks/action-button.js.map +0 -1
  207. package/dist/chunks/aeico-component.cjs +0 -17
  208. package/dist/chunks/aeico-component.cjs.map +0 -1
  209. package/dist/chunks/aeico-component.js +0 -18
  210. package/dist/chunks/aeico-component.js.map +0 -1
  211. package/dist/chunks/alert.cjs +0 -164
  212. package/dist/chunks/alert.cjs.map +0 -1
  213. package/dist/chunks/alert.js +0 -165
  214. package/dist/chunks/alert.js.map +0 -1
  215. package/dist/chunks/badge.cjs +0 -85
  216. package/dist/chunks/badge.cjs.map +0 -1
  217. package/dist/chunks/badge.js +0 -86
  218. package/dist/chunks/badge.js.map +0 -1
  219. package/dist/chunks/breadcrumb-item.cjs +0 -261
  220. package/dist/chunks/breadcrumb-item.cjs.map +0 -1
  221. package/dist/chunks/breadcrumb-item.js +0 -262
  222. package/dist/chunks/breadcrumb-item.js.map +0 -1
  223. package/dist/chunks/button-group.cjs +0 -79
  224. package/dist/chunks/button-group.cjs.map +0 -1
  225. package/dist/chunks/button-group.js +0 -80
  226. package/dist/chunks/button-group.js.map +0 -1
  227. package/dist/chunks/button.cjs +0 -337
  228. package/dist/chunks/button.cjs.map +0 -1
  229. package/dist/chunks/button.js +0 -338
  230. package/dist/chunks/button.js.map +0 -1
  231. package/dist/chunks/card.cjs +0 -93
  232. package/dist/chunks/card.cjs.map +0 -1
  233. package/dist/chunks/card.js +0 -94
  234. package/dist/chunks/card.js.map +0 -1
  235. package/dist/chunks/checkbox.cjs +0 -86
  236. package/dist/chunks/checkbox.cjs.map +0 -1
  237. package/dist/chunks/checkbox.js +0 -87
  238. package/dist/chunks/checkbox.js.map +0 -1
  239. package/dist/chunks/color.cjs +0 -4
  240. package/dist/chunks/color.cjs.map +0 -1
  241. package/dist/chunks/color.js +0 -5
  242. package/dist/chunks/color.js.map +0 -1
  243. package/dist/chunks/copy-button.cjs +0 -171
  244. package/dist/chunks/copy-button.cjs.map +0 -1
  245. package/dist/chunks/copy-button.js +0 -172
  246. package/dist/chunks/copy-button.js.map +0 -1
  247. package/dist/chunks/detail-group.cjs +0 -65
  248. package/dist/chunks/detail-group.cjs.map +0 -1
  249. package/dist/chunks/detail-group.js +0 -66
  250. package/dist/chunks/detail-group.js.map +0 -1
  251. package/dist/chunks/detail.cjs +0 -146
  252. package/dist/chunks/detail.cjs.map +0 -1
  253. package/dist/chunks/detail.js +0 -147
  254. package/dist/chunks/detail.js.map +0 -1
  255. package/dist/chunks/dialog.cjs +0 -117
  256. package/dist/chunks/dialog.cjs.map +0 -1
  257. package/dist/chunks/dialog.js +0 -118
  258. package/dist/chunks/dialog.js.map +0 -1
  259. package/dist/chunks/divider.cjs +0 -80
  260. package/dist/chunks/divider.cjs.map +0 -1
  261. package/dist/chunks/divider.js +0 -81
  262. package/dist/chunks/divider.js.map +0 -1
  263. package/dist/chunks/drawer.cjs +0 -180
  264. package/dist/chunks/drawer.cjs.map +0 -1
  265. package/dist/chunks/drawer.js +0 -181
  266. package/dist/chunks/drawer.js.map +0 -1
  267. package/dist/chunks/dropdown-button.cjs +0 -533
  268. package/dist/chunks/dropdown-button.cjs.map +0 -1
  269. package/dist/chunks/dropdown-button.js +0 -534
  270. package/dist/chunks/dropdown-button.js.map +0 -1
  271. package/dist/chunks/icon-button.cjs +0 -35
  272. package/dist/chunks/icon-button.cjs.map +0 -1
  273. package/dist/chunks/icon-button.js +0 -36
  274. package/dist/chunks/icon-button.js.map +0 -1
  275. package/dist/chunks/icon.cjs +0 -124
  276. package/dist/chunks/icon.cjs.map +0 -1
  277. package/dist/chunks/icon.js +0 -125
  278. package/dist/chunks/icon.js.map +0 -1
  279. package/dist/chunks/menu.cjs +0 -396
  280. package/dist/chunks/menu.cjs.map +0 -1
  281. package/dist/chunks/menu.js +0 -397
  282. package/dist/chunks/menu.js.map +0 -1
  283. package/dist/chunks/navbar.cjs +0 -142
  284. package/dist/chunks/navbar.cjs.map +0 -1
  285. package/dist/chunks/navbar.js +0 -143
  286. package/dist/chunks/navbar.js.map +0 -1
  287. package/dist/chunks/number-input.cjs +0 -110
  288. package/dist/chunks/number-input.cjs.map +0 -1
  289. package/dist/chunks/number-input.js +0 -111
  290. package/dist/chunks/number-input.js.map +0 -1
  291. package/dist/chunks/pagination.cjs +0 -475
  292. package/dist/chunks/pagination.cjs.map +0 -1
  293. package/dist/chunks/pagination.js +0 -476
  294. package/dist/chunks/pagination.js.map +0 -1
  295. package/dist/chunks/progress-bar.cjs +0 -101
  296. package/dist/chunks/progress-bar.cjs.map +0 -1
  297. package/dist/chunks/progress-bar.js +0 -102
  298. package/dist/chunks/progress-bar.js.map +0 -1
  299. package/dist/chunks/radio.cjs +0 -185
  300. package/dist/chunks/radio.cjs.map +0 -1
  301. package/dist/chunks/radio.js +0 -186
  302. package/dist/chunks/radio.js.map +0 -1
  303. package/dist/chunks/select.cjs +0 -381
  304. package/dist/chunks/select.cjs.map +0 -1
  305. package/dist/chunks/select.js +0 -382
  306. package/dist/chunks/select.js.map +0 -1
  307. package/dist/chunks/size.cjs +0 -4
  308. package/dist/chunks/size.cjs.map +0 -1
  309. package/dist/chunks/size.js +0 -5
  310. package/dist/chunks/size.js.map +0 -1
  311. package/dist/chunks/slider.cjs +0 -608
  312. package/dist/chunks/slider.cjs.map +0 -1
  313. package/dist/chunks/slider.js +0 -609
  314. package/dist/chunks/slider.js.map +0 -1
  315. package/dist/chunks/spinner.cjs +0 -102
  316. package/dist/chunks/spinner.cjs.map +0 -1
  317. package/dist/chunks/spinner.js +0 -103
  318. package/dist/chunks/spinner.js.map +0 -1
  319. package/dist/chunks/switch.cjs +0 -167
  320. package/dist/chunks/switch.cjs.map +0 -1
  321. package/dist/chunks/switch.js +0 -168
  322. package/dist/chunks/switch.js.map +0 -1
  323. package/dist/chunks/tab-panel.cjs +0 -174
  324. package/dist/chunks/tab-panel.cjs.map +0 -1
  325. package/dist/chunks/tab-panel.js +0 -175
  326. package/dist/chunks/tab-panel.js.map +0 -1
  327. package/dist/chunks/tag.cjs +0 -108
  328. package/dist/chunks/tag.cjs.map +0 -1
  329. package/dist/chunks/tag.js +0 -109
  330. package/dist/chunks/tag.js.map +0 -1
  331. package/dist/chunks/text-input.cjs +0 -54
  332. package/dist/chunks/text-input.cjs.map +0 -1
  333. package/dist/chunks/text-input.js +0 -55
  334. package/dist/chunks/text-input.js.map +0 -1
  335. package/dist/chunks/textarea.cjs +0 -137
  336. package/dist/chunks/textarea.cjs.map +0 -1
  337. package/dist/chunks/textarea.js +0 -138
  338. package/dist/chunks/textarea.js.map +0 -1
  339. package/dist/chunks/tooltip.cjs +0 -292
  340. package/dist/chunks/tooltip.cjs.map +0 -1
  341. package/dist/chunks/tooltip.js +0 -293
  342. package/dist/chunks/tooltip.js.map +0 -1
  343. package/dist/chunks/tree.cjs +0 -468
  344. package/dist/chunks/tree.cjs.map +0 -1
  345. package/dist/chunks/tree.js +0 -469
  346. package/dist/chunks/tree.js.map +0 -1
  347. package/dist/chunks/variables.cjs +0 -396
  348. package/dist/chunks/variables.cjs.map +0 -1
  349. package/dist/chunks/variables.js +0 -397
  350. package/dist/chunks/variables.js.map +0 -1
@@ -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';
@@ -12,6 +12,8 @@ export type IconColor =
12
12
  export interface IconPathDef {
13
13
  d: string;
14
14
  fill?: string;
15
+ stroke?: boolean;
16
+ strokeWidth?: number;
15
17
  }
16
18
 
17
19
  export interface IconDefinition {
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';
@@ -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
  /**
@@ -15,6 +15,8 @@
15
15
 
16
16
  :host([compact]) {
17
17
  gap: 0;
18
+ /* Reset --ae-border-radius so individual --_btn-r-* corners take effect */
19
+ --ae-border-radius: initial;
18
20
  }
19
21
 
20
22
  /* Raise hovered/focused button so its border shows above neighbours */
@@ -10,7 +10,6 @@
10
10
  overflow: hidden;
11
11
  }
12
12
 
13
- /* variant overrides */
14
13
  :host([variant="faint"]) .card {
15
14
  border-color: var(--ae-color-border-subtle);
16
15
  background: var(--ae-color-bg-subtle);
@@ -21,41 +20,24 @@
21
20
  border-color: transparent;
22
21
  }
23
22
 
24
- :host([variant="subtle"]) .header { border-bottom-color: transparent; }
25
- :host([variant="subtle"]) .footer { border-top-color: transparent; }
26
-
27
23
  :host([variant="filled"]) .card {
28
24
  border-color: var(--ae-color-solid);
29
25
  background: var(--ae-color-solid);
30
26
  color: var(--ae-color-on-solid);
31
27
  }
32
28
 
33
- :host([variant="filled"]) .header {
34
- border-bottom-color: color-mix(in srgb, var(--ae-color-solid), black 15%);
35
- }
36
-
37
- :host([variant="filled"]) .footer {
38
- border-top-color: color-mix(in srgb, var(--ae-color-solid), black 15%);
39
- }
40
-
41
29
  :host([variant="outlined"]) .card {
42
30
  border-color: var(--ae-color-border);
43
31
  background: transparent;
44
32
  color: var(--ae-color-text-subtle);
45
33
  }
46
34
 
47
- :host([variant="outlined"]) .header { border-bottom-color: var(--ae-color-border-subtle); }
48
- :host([variant="outlined"]) .footer { border-top-color: var(--ae-color-border-subtle); }
49
-
50
35
  :host([variant="text"]) .card {
51
36
  border-color: transparent;
52
37
  background: transparent;
53
38
  color: var(--ae-color-text-main);
54
39
  }
55
40
 
56
- :host([variant="text"]) .header { border-bottom-color: transparent; color: var(--ae-color-accent); }
57
- :host([variant="text"]) .footer { border-top-color: transparent; color: var(--ae-color-accent); }
58
-
59
41
  .header,
60
42
  .footer {
61
43
  display: none;
@@ -74,6 +56,48 @@
74
56
  border-top: 1px solid var(--ae-color-border-subtle);
75
57
  }
76
58
 
59
+ :host([variant="faint"][has-header]) .header {
60
+ border-bottom-color: var(--ae-color-border-subtle);
61
+ }
62
+
63
+ :host([variant="faint"][has-footer]) .footer {
64
+ border-top-color: var(--ae-color-border-subtle);
65
+ }
66
+
67
+ :host([variant="subtle"][has-header]) .header {
68
+ border-bottom-color: var(--ae-color-border-subtle);
69
+ }
70
+
71
+ :host([variant="subtle"][has-footer]) .footer {
72
+ border-top-color: var(--ae-color-border-subtle);
73
+ }
74
+
75
+ :host([variant="filled"][has-header]) .header {
76
+ border-bottom-color: rgba(0, 0, 0, 0.15);
77
+ }
78
+
79
+ :host([variant="filled"][has-footer]) .footer {
80
+ border-top-color: rgba(0, 0, 0, 0.15);
81
+ }
82
+
83
+ :host([variant="outlined"][has-header]) .header {
84
+ border-bottom-color: var(--ae-color-border-subtle);
85
+ }
86
+
87
+ :host([variant="outlined"][has-footer]) .footer {
88
+ border-top-color: var(--ae-color-border-subtle);
89
+ }
90
+
91
+ :host([variant="text"][has-header]) .header {
92
+ border-bottom-color: transparent;
93
+ color: var(--ae-color-accent);
94
+ }
95
+
96
+ :host([variant="text"][has-footer]) .footer {
97
+ border-top-color: transparent;
98
+ color: var(--ae-color-accent);
99
+ }
100
+
77
101
  .body {
78
102
  padding: 16px;
79
103
  }
@@ -3,11 +3,7 @@
3
3
  flex: 1;
4
4
  min-width: 0;
5
5
  font-size: var(--ae-size-base);
6
-
7
- /* Layout */
8
6
  --checkbox-field-gap: 4px;
9
-
10
- /* Checkbox */
11
7
  --checkbox-size: 1.167em;
12
8
  --checkbox-border-width: 1px;
13
9
  --checkbox-border-color: var(--ae-border-subtle);
@@ -44,8 +40,23 @@
44
40
  cursor: not-allowed;
45
41
  }
46
42
 
47
- /* Error state */
48
43
  :host([error]) .field-input {
49
44
  outline: 2px solid var(--field-error-color, var(--ae-red));
50
45
  outline-offset: 1px;
51
46
  }
47
+
48
+ .checkbox-container .action-controls {
49
+ display: flex;
50
+ margin-left: 2px;
51
+ border: var(--checkbox-border-width) solid var(--field-action-border-color, var(--ae-border-subtle));
52
+ border-radius: var(--ae-radius-sm);
53
+ overflow: hidden;
54
+ background: var(--field-action-bg, var(--ae-surface-base));
55
+ height: 1.333em;
56
+ box-sizing: border-box;
57
+ }
58
+
59
+ .checkbox-container .action-controls .action-btn {
60
+ padding: 0 0.35em;
61
+ font-size: 0.7em;
62
+ }
@@ -6,7 +6,7 @@ dialog {
6
6
  display: none;
7
7
  flex-direction: column;
8
8
  border: none;
9
- border-radius: var(--ae-border-radius, var(--ae-border-radius));
9
+ border-radius: var(--ae-border-radius, var(--ae-radius-lg));
10
10
  padding: 0;
11
11
  max-width: min(90vw, 600px);
12
12
  max-height: 90vh;