aeico-components 0.1.3 → 0.1.5

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 (218) hide show
  1. package/dist/alert.cjs +6 -0
  2. package/dist/alert.cjs.map +1 -0
  3. package/dist/alert.js +6 -0
  4. package/dist/alert.js.map +1 -0
  5. package/dist/badge.cjs +6 -0
  6. package/dist/badge.cjs.map +1 -0
  7. package/dist/badge.js +6 -0
  8. package/dist/badge.js.map +1 -0
  9. package/dist/breadcrumb.cjs +7 -0
  10. package/dist/breadcrumb.cjs.map +1 -0
  11. package/dist/breadcrumb.js +7 -0
  12. package/dist/breadcrumb.js.map +1 -0
  13. package/dist/button-group.cjs +6 -0
  14. package/dist/button-group.cjs.map +1 -0
  15. package/dist/button-group.js +6 -0
  16. package/dist/button-group.js.map +1 -0
  17. package/dist/button.cjs +6 -0
  18. package/dist/button.cjs.map +1 -0
  19. package/dist/button.js +6 -0
  20. package/dist/button.js.map +1 -0
  21. package/dist/card.cjs +6 -0
  22. package/dist/card.cjs.map +1 -0
  23. package/dist/card.js +6 -0
  24. package/dist/card.js.map +1 -0
  25. package/dist/checkbox.cjs +6 -0
  26. package/dist/checkbox.cjs.map +1 -0
  27. package/dist/checkbox.js +6 -0
  28. package/dist/checkbox.js.map +1 -0
  29. package/dist/chunks/aeico-component.cjs +17 -0
  30. package/dist/chunks/aeico-component.cjs.map +1 -0
  31. package/dist/chunks/aeico-component.js +18 -0
  32. package/dist/chunks/aeico-component.js.map +1 -0
  33. package/dist/chunks/aeico-field.cjs +179 -0
  34. package/dist/chunks/aeico-field.cjs.map +1 -0
  35. package/dist/chunks/aeico-field.js +180 -0
  36. package/dist/chunks/aeico-field.js.map +1 -0
  37. package/dist/chunks/alert.cjs +170 -0
  38. package/dist/chunks/alert.cjs.map +1 -0
  39. package/dist/chunks/alert.js +171 -0
  40. package/dist/chunks/alert.js.map +1 -0
  41. package/dist/chunks/badge.cjs +85 -0
  42. package/dist/chunks/badge.cjs.map +1 -0
  43. package/dist/chunks/badge.js +86 -0
  44. package/dist/chunks/badge.js.map +1 -0
  45. package/dist/chunks/breadcrumb-item.cjs +261 -0
  46. package/dist/chunks/breadcrumb-item.cjs.map +1 -0
  47. package/dist/chunks/breadcrumb-item.js +262 -0
  48. package/dist/chunks/breadcrumb-item.js.map +1 -0
  49. package/dist/chunks/button-group.cjs +79 -0
  50. package/dist/chunks/button-group.cjs.map +1 -0
  51. package/dist/chunks/button-group.js +80 -0
  52. package/dist/chunks/button-group.js.map +1 -0
  53. package/dist/chunks/button.cjs +348 -0
  54. package/dist/chunks/button.cjs.map +1 -0
  55. package/dist/chunks/button.js +349 -0
  56. package/dist/chunks/button.js.map +1 -0
  57. package/dist/chunks/card.cjs +93 -0
  58. package/dist/chunks/card.cjs.map +1 -0
  59. package/dist/chunks/card.js +94 -0
  60. package/dist/chunks/card.js.map +1 -0
  61. package/dist/chunks/checkbox.cjs +73 -0
  62. package/dist/chunks/checkbox.cjs.map +1 -0
  63. package/dist/chunks/checkbox.js +74 -0
  64. package/dist/chunks/checkbox.js.map +1 -0
  65. package/dist/chunks/color.cjs +4 -0
  66. package/dist/chunks/color.cjs.map +1 -0
  67. package/dist/chunks/color.js +5 -0
  68. package/dist/chunks/color.js.map +1 -0
  69. package/dist/chunks/detail.cjs +143 -0
  70. package/dist/chunks/detail.cjs.map +1 -0
  71. package/dist/chunks/detail.js +144 -0
  72. package/dist/chunks/detail.js.map +1 -0
  73. package/dist/chunks/dialog.cjs +117 -0
  74. package/dist/chunks/dialog.cjs.map +1 -0
  75. package/dist/chunks/dialog.js +118 -0
  76. package/dist/chunks/dialog.js.map +1 -0
  77. package/dist/chunks/divider.cjs +80 -0
  78. package/dist/chunks/divider.cjs.map +1 -0
  79. package/dist/chunks/divider.js +81 -0
  80. package/dist/chunks/divider.js.map +1 -0
  81. package/dist/chunks/dropdown-button.cjs +534 -0
  82. package/dist/chunks/dropdown-button.cjs.map +1 -0
  83. package/dist/chunks/dropdown-button.js +535 -0
  84. package/dist/chunks/dropdown-button.js.map +1 -0
  85. package/dist/chunks/icon-button.cjs +35 -0
  86. package/dist/chunks/icon-button.cjs.map +1 -0
  87. package/dist/chunks/icon-button.js +36 -0
  88. package/dist/chunks/icon-button.js.map +1 -0
  89. package/dist/chunks/icon.cjs +78 -0
  90. package/dist/chunks/icon.cjs.map +1 -0
  91. package/dist/chunks/icon.js +79 -0
  92. package/dist/chunks/icon.js.map +1 -0
  93. package/dist/chunks/navbar.cjs +142 -0
  94. package/dist/chunks/navbar.cjs.map +1 -0
  95. package/dist/chunks/navbar.js +143 -0
  96. package/dist/chunks/navbar.js.map +1 -0
  97. package/dist/chunks/radio.cjs +181 -0
  98. package/dist/chunks/radio.cjs.map +1 -0
  99. package/dist/chunks/radio.js +182 -0
  100. package/dist/chunks/radio.js.map +1 -0
  101. package/dist/chunks/select.cjs +350 -0
  102. package/dist/chunks/select.cjs.map +1 -0
  103. package/dist/chunks/select.js +351 -0
  104. package/dist/chunks/select.js.map +1 -0
  105. package/dist/chunks/size.cjs +4 -0
  106. package/dist/chunks/size.cjs.map +1 -0
  107. package/dist/chunks/size.js +5 -0
  108. package/dist/chunks/size.js.map +1 -0
  109. package/dist/chunks/slider.cjs +648 -0
  110. package/dist/chunks/slider.cjs.map +1 -0
  111. package/dist/chunks/slider.js +649 -0
  112. package/dist/chunks/slider.js.map +1 -0
  113. package/dist/chunks/switch.cjs +73 -0
  114. package/dist/chunks/switch.cjs.map +1 -0
  115. package/dist/chunks/switch.js +74 -0
  116. package/dist/chunks/switch.js.map +1 -0
  117. package/dist/chunks/tab-panel.cjs +165 -0
  118. package/dist/chunks/tab-panel.cjs.map +1 -0
  119. package/dist/chunks/tab-panel.js +166 -0
  120. package/dist/chunks/tab-panel.js.map +1 -0
  121. package/dist/chunks/tag.cjs +108 -0
  122. package/dist/chunks/tag.cjs.map +1 -0
  123. package/dist/chunks/tag.js +109 -0
  124. package/dist/chunks/tag.js.map +1 -0
  125. package/dist/chunks/text-input.cjs +59 -0
  126. package/dist/chunks/text-input.cjs.map +1 -0
  127. package/dist/chunks/text-input.js +60 -0
  128. package/dist/chunks/text-input.js.map +1 -0
  129. package/dist/chunks/variables.cjs +372 -0
  130. package/dist/chunks/variables.cjs.map +1 -0
  131. package/dist/chunks/variables.js +373 -0
  132. package/dist/chunks/variables.js.map +1 -0
  133. package/dist/detail.cjs +6 -0
  134. package/dist/detail.cjs.map +1 -0
  135. package/dist/detail.js +6 -0
  136. package/dist/detail.js.map +1 -0
  137. package/dist/dialog.cjs +6 -0
  138. package/dist/dialog.cjs.map +1 -0
  139. package/dist/dialog.js +6 -0
  140. package/dist/dialog.js.map +1 -0
  141. package/dist/divider.cjs +6 -0
  142. package/dist/divider.cjs.map +1 -0
  143. package/dist/divider.js +6 -0
  144. package/dist/divider.js.map +1 -0
  145. package/dist/dropdown.cjs +7 -0
  146. package/dist/dropdown.cjs.map +1 -0
  147. package/dist/dropdown.js +7 -0
  148. package/dist/dropdown.js.map +1 -0
  149. package/dist/icon-button.cjs +6 -0
  150. package/dist/icon-button.cjs.map +1 -0
  151. package/dist/icon-button.js +6 -0
  152. package/dist/icon-button.js.map +1 -0
  153. package/dist/icon.cjs +6 -0
  154. package/dist/icon.cjs.map +1 -0
  155. package/dist/icon.js +6 -0
  156. package/dist/icon.js.map +1 -0
  157. package/dist/index.cjs +93 -4168
  158. package/dist/index.cjs.map +1 -1
  159. package/dist/index.js +92 -4167
  160. package/dist/index.js.map +1 -1
  161. package/dist/navbar.cjs +6 -0
  162. package/dist/navbar.cjs.map +1 -0
  163. package/dist/navbar.js +6 -0
  164. package/dist/navbar.js.map +1 -0
  165. package/dist/radio-group.cjs +7 -0
  166. package/dist/radio-group.cjs.map +1 -0
  167. package/dist/radio-group.js +7 -0
  168. package/dist/radio-group.js.map +1 -0
  169. package/dist/select.cjs +99 -0
  170. package/dist/select.cjs.map +1 -0
  171. package/dist/select.js +99 -0
  172. package/dist/select.js.map +1 -0
  173. package/dist/slider.cjs +6 -0
  174. package/dist/slider.cjs.map +1 -0
  175. package/dist/slider.js +6 -0
  176. package/dist/slider.js.map +1 -0
  177. package/dist/switch.cjs +6 -0
  178. package/dist/switch.cjs.map +1 -0
  179. package/dist/switch.js +6 -0
  180. package/dist/switch.js.map +1 -0
  181. package/dist/tabs.cjs +8 -0
  182. package/dist/tabs.cjs.map +1 -0
  183. package/dist/tabs.js +8 -0
  184. package/dist/tabs.js.map +1 -0
  185. package/dist/tag.cjs +5 -0
  186. package/dist/tag.cjs.map +1 -0
  187. package/dist/tag.js +5 -0
  188. package/dist/tag.js.map +1 -0
  189. package/dist/text-input.cjs +6 -0
  190. package/dist/text-input.cjs.map +1 -0
  191. package/dist/text-input.js +6 -0
  192. package/dist/text-input.js.map +1 -0
  193. package/dist/types/aeico-field.d.ts +5 -5
  194. package/dist/types/button/button.d.ts +2 -1
  195. package/dist/types/checkbox/checkbox.d.ts +5 -5
  196. package/dist/types/index.d.ts +2 -0
  197. package/dist/types/progress-bar/defines.d.ts +1 -0
  198. package/dist/types/progress-bar/index.d.ts +3 -0
  199. package/dist/types/progress-bar/progress-bar.d.ts +37 -0
  200. package/dist/types/radio-group/radio-group.d.ts +1 -1
  201. package/dist/types/select/select.d.ts +1 -1
  202. package/dist/types/switch/switch.d.ts +5 -5
  203. package/package.json +16 -4
  204. package/src/aeico-field.ts +12 -8
  205. package/src/button/button.ts +11 -13
  206. package/src/checkbox/checkbox.ts +4 -4
  207. package/src/index.ts +2 -0
  208. package/src/navbar/navbar.ts +1 -3
  209. package/src/progress-bar/defines.ts +8 -0
  210. package/src/progress-bar/index.ts +3 -0
  211. package/src/progress-bar/progress-bar.ts +80 -0
  212. package/src/radio-group/radio-group.ts +1 -1
  213. package/src/select/select.ts +1 -1
  214. package/src/styles/components/progress-bar.css +44 -0
  215. package/src/switch/switch.ts +4 -4
  216. package/src/tabs/tab.ts +1 -1
  217. package/src/tabs/tabs.ts +1 -2
  218. package/src/utils.ts +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.cjs","sources":["../src/select/select-option.ts"],"sourcesContent":["import AeicoComponent from '../aeico-component';\nimport type { InferProps } from 'aeico';\nimport { html } from 'aeico';\nimport style from '../styles/components/select-option.css?inline';\nimport variables from '../styles/variables.css?inline';\nimport { prop } from 'aeico';\n\nclass SelectOption extends AeicoComponent {\n static tagName = 'select-option';\n\n @prop({ type: String })\n accessor value: string | undefined;\n\n @prop({ type: String })\n accessor label: string | undefined;\n\n @prop({ type: Boolean })\n accessor disabled: boolean = false;\n\n @prop({ type: Boolean })\n accessor selected: boolean | undefined = false;\n\n protected static styles = [variables, style];\n\n connectedCallback() {\n super.connectedCallback();\n this.listen('click', this._handleClick);\n }\n\n private _handleClick = (e: Event): void => {\n if (this.disabled) {\n e.stopPropagation();\n\n return;\n }\n\n const displayLabel = this.label || this.textContent?.trim() || '';\n this.emit('selectoption', { detail: { value: this.value ?? '', label: displayLabel } });\n };\n\n render() {\n return html(({ div, slot }) => {\n div({ className: 'option-item' }, () => {\n slot();\n });\n });\n }\n}\n\nSelectOption.register();\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ae-select-option': SelectOption;\n }\n}\n\nexport default SelectOption;\nexport type SelectOptionProps = InferProps<typeof SelectOption>;\n"],"names":["AeicoComponent","prop","_a","html","variables"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,eAAA,eAAA,YAAA,YAAA,IAAA,OAAA,QAAA,QAAA,WAAA;AAOA,MAAM,sBAAqB,KAAAA,eAAAA,gBAGzB,aAAA,CAACC,MAAAA,KAAK,EAAE,MAAM,OAAA,CAAQ,CAAA,GAGtB,aAAA,CAACA,MAAAA,KAAK,EAAE,MAAM,OAAA,CAAQ,CAAA,GAGtB,gBAAA,CAACA,MAAAA,KAAK,EAAE,MAAM,QAAA,CAAS,CAAA,GAGvB,gBAAA,CAACA,MAAAA,KAAK,EAAE,MAAM,QAAA,CAAS,IAZE,IAAe;AAAA,EAA1C,cAAA;AAAA,UAAA,GAAA,SAAA;AAIE,iBAAA,MAAS,QAAT,kBAAA,OAAA,GAAA,IAAA,CAAA,GAAA,kBAAA,OAAA,IAAA,IAAA;AAGA,iBAAA,MAAS,QAAT,kBAAA,OAAA,IAAA,IAAA,CAAA,GAAA,kBAAA,OAAA,IAAA,IAAA;AAGA,iBAAA,MAAS,WAAoB,kBAA7B,OAAA,IAAA,MAA6B,KAAA,CAAA,GAA7B,kBAAA,OAAA,IAAA,IAAA;AAGA,iBAAA,MAAS,WAAgC,kBAAzC,OAAA,IAAA,MAAyC,KAAA,CAAA,GAAzC,kBAAA,OAAA,IAAA,IAAA;AASA,kBAAA,MAAQ,gBAAe,CAAC,MAAmB;;AACzC,UAAI,KAAK,UAAU;AACjB,UAAE,gBAAA;AAEF;AAAA,MACF;AAEA,YAAM,eAAe,KAAK,WAASC,MAAA,KAAK,gBAAL,gBAAAA,IAAkB,WAAU;AAC/D,WAAK,KAAK,gBAAgB,EAAE,QAAQ,EAAE,OAAO,KAAK,SAAS,IAAI,OAAO,aAAA,EAAa,CAAG;AAAA,IACxF,CAAA;AAAA,EAAA;AAAA,EAdA,oBAAoB;AAClB,UAAM,kBAAA;AACN,SAAK,OAAO,SAAS,KAAK,YAAY;AAAA,EACxC;AAAA,EAaA,SAAS;AACP,WAAOC,WAAK,CAAC,EAAE,KAAK,WAAW;AAC7B,UAAI,EAAE,WAAW,cAAA,GAAiB,MAAM;AACtC,aAAA;AAAA,MACF,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AACF;AAxCA,QAAA,iBAAA,EAAA;AAIW,SAAA,oBAAA,QAAA;AAGA,SAAA,oBAAA,QAAA;AAGA,YAAA,oBAAA,QAAA;AAGA,YAAA,oBAAA,QAAA;AATT,kBAAA,OAAA,GAAS,SADT,YAHI,cAIK,MAAA;AAGT,kBAAA,OAAA,GAAS,SADT,YANI,cAOK,MAAA;AAGT,kBAAA,OAAA,GAAS,YADT,eATI,cAUK,SAAA;AAGT,kBAAA,OAAA,GAAS,YADT,eAZI,cAaK,SAAA;AAbX,oBAAA,OAAM,YAAA;AACJ,cADI,cACG,WAAU,eAAA;AAcjB,cAfI,cAea,UAAS,CAACC,UAAAA,gBAAW,KAAK,CAAA;AA2B7C,aAAa,SAAA;;;;"}
package/dist/select.js ADDED
@@ -0,0 +1,99 @@
1
+ import { S, S as S2 } from "./chunks/select.js";
2
+ import { A as AeicoComponent } from "./chunks/aeico-component.js";
3
+ import { prop, html } from "aeico";
4
+ import { s as styleVariables } from "./chunks/variables.js";
5
+ const style = ":host {\n display: block;\n\n --option-padding: 0.417em 0.667em;\n --option-bg: transparent;\n --option-bg-hover: var(--surface-raised);\n --option-bg-selected: color-mix(in srgb, var(--color-primary) 12%, transparent);\n --option-color: var(--color-text-main);\n --option-color-disabled: var(--color-text-disabled);\n --option-color-selected: var(--color-primary);\n --option-font-size: 1em;\n --option-transition: background 0.1s;\n}\n\n.option-item {\n padding: var(--option-padding);\n font-size: var(--option-font-size);\n color: var(--option-color);\n background: var(--option-bg);\n cursor: pointer;\n transition: var(--option-transition);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n user-select: none;\n}\n\n:host(:hover:not([disabled])) .option-item {\n background: var(--option-bg-hover);\n}\n\n:host([selected]) .option-item {\n background: var(--option-bg-selected);\n color: var(--option-color-selected);\n}\n\n:host([disabled]) .option-item {\n color: var(--option-color-disabled);\n cursor: default;\n pointer-events: none;\n}\n\n\n";
6
+ var __create = Object.create;
7
+ var __defProp = Object.defineProperty;
8
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
9
+ var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
10
+ var __typeError = (msg) => {
11
+ throw TypeError(msg);
12
+ };
13
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
14
+ var __decoratorStart = (base) => [, , , __create((base == null ? void 0 : base[__knownSymbol("metadata")]) ?? null)];
15
+ var __decoratorStrings = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"];
16
+ var __expectFn = (fn) => fn !== void 0 && typeof fn !== "function" ? __typeError("Function expected") : fn;
17
+ var __decoratorContext = (kind, name, done, metadata, fns) => ({ kind: __decoratorStrings[kind], name, metadata, addInitializer: (fn) => done._ ? __typeError("Already initialized") : fns.push(__expectFn(fn || null)) });
18
+ var __decoratorMetadata = (array, target) => __defNormalProp(target, __knownSymbol("metadata"), array[3]);
19
+ var __runInitializers = (array, flags, self, value) => {
20
+ for (var i = 0, fns = array[flags >> 1], n = fns && fns.length; i < n; i++) flags & 1 ? fns[i].call(self) : value = fns[i].call(self, value);
21
+ return value;
22
+ };
23
+ var __decorateElement = (array, flags, name, decorators, target, extra) => {
24
+ var fn, it, done, ctx, access, k = flags & 7, s = false, p = false;
25
+ var j = array.length + 1, key = __decoratorStrings[k + 5];
26
+ var initializers = array[j - 1] = [], extraInitializers = array[j] || (array[j] = []);
27
+ var desc = (target = target.prototype, __getOwnPropDesc({ get [name]() {
28
+ return __privateGet(this, extra);
29
+ }, set [name](x) {
30
+ return __privateSet(this, extra, x);
31
+ } }, name));
32
+ for (var i = decorators.length - 1; i >= 0; i--) {
33
+ ctx = __decoratorContext(k, name, done = {}, array[3], extraInitializers);
34
+ {
35
+ ctx.static = s, ctx.private = p, access = ctx.access = { has: (x) => name in x };
36
+ access.get = (x) => x[name];
37
+ access.set = (x, y) => x[name] = y;
38
+ }
39
+ it = (0, decorators[i])({ get: desc.get, set: desc.set }, ctx), done._ = 1;
40
+ if (it === void 0) __expectFn(it) && (desc[key] = it);
41
+ else if (typeof it !== "object" || it === null) __typeError("Object expected");
42
+ else __expectFn(fn = it.get) && (desc.get = fn), __expectFn(fn = it.set) && (desc.set = fn), __expectFn(fn = it.init) && initializers.unshift(fn);
43
+ }
44
+ return desc && __defProp(target, name, desc), target;
45
+ };
46
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
47
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
48
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), member.get(obj));
49
+ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
50
+ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
51
+ var _selected_dec, _disabled_dec, _label_dec, _value_dec, _a, _init, _value, _label, _disabled, _selected;
52
+ class SelectOption extends (_a = AeicoComponent, _value_dec = [prop({ type: String })], _label_dec = [prop({ type: String })], _disabled_dec = [prop({ type: Boolean })], _selected_dec = [prop({ type: Boolean })], _a) {
53
+ constructor() {
54
+ super(...arguments);
55
+ __privateAdd(this, _value, __runInitializers(_init, 8, this)), __runInitializers(_init, 11, this);
56
+ __privateAdd(this, _label, __runInitializers(_init, 12, this)), __runInitializers(_init, 15, this);
57
+ __privateAdd(this, _disabled, __runInitializers(_init, 16, this, false)), __runInitializers(_init, 19, this);
58
+ __privateAdd(this, _selected, __runInitializers(_init, 20, this, false)), __runInitializers(_init, 23, this);
59
+ __publicField(this, "_handleClick", (e) => {
60
+ var _a2;
61
+ if (this.disabled) {
62
+ e.stopPropagation();
63
+ return;
64
+ }
65
+ const displayLabel = this.label || ((_a2 = this.textContent) == null ? void 0 : _a2.trim()) || "";
66
+ this.emit("selectoption", { detail: { value: this.value ?? "", label: displayLabel } });
67
+ });
68
+ }
69
+ connectedCallback() {
70
+ super.connectedCallback();
71
+ this.listen("click", this._handleClick);
72
+ }
73
+ render() {
74
+ return html(({ div, slot }) => {
75
+ div({ className: "option-item" }, () => {
76
+ slot();
77
+ });
78
+ });
79
+ }
80
+ }
81
+ _init = __decoratorStart(_a);
82
+ _value = /* @__PURE__ */ new WeakMap();
83
+ _label = /* @__PURE__ */ new WeakMap();
84
+ _disabled = /* @__PURE__ */ new WeakMap();
85
+ _selected = /* @__PURE__ */ new WeakMap();
86
+ __decorateElement(_init, 4, "value", _value_dec, SelectOption, _value);
87
+ __decorateElement(_init, 4, "label", _label_dec, SelectOption, _label);
88
+ __decorateElement(_init, 4, "disabled", _disabled_dec, SelectOption, _disabled);
89
+ __decorateElement(_init, 4, "selected", _selected_dec, SelectOption, _selected);
90
+ __decoratorMetadata(_init, SelectOption);
91
+ __publicField(SelectOption, "tagName", "select-option");
92
+ __publicField(SelectOption, "styles", [styleVariables, style]);
93
+ SelectOption.register();
94
+ export {
95
+ S as Select,
96
+ SelectOption,
97
+ S2 as default
98
+ };
99
+ //# sourceMappingURL=select.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.js","sources":["../src/select/select-option.ts"],"sourcesContent":["import AeicoComponent from '../aeico-component';\nimport type { InferProps } from 'aeico';\nimport { html } from 'aeico';\nimport style from '../styles/components/select-option.css?inline';\nimport variables from '../styles/variables.css?inline';\nimport { prop } from 'aeico';\n\nclass SelectOption extends AeicoComponent {\n static tagName = 'select-option';\n\n @prop({ type: String })\n accessor value: string | undefined;\n\n @prop({ type: String })\n accessor label: string | undefined;\n\n @prop({ type: Boolean })\n accessor disabled: boolean = false;\n\n @prop({ type: Boolean })\n accessor selected: boolean | undefined = false;\n\n protected static styles = [variables, style];\n\n connectedCallback() {\n super.connectedCallback();\n this.listen('click', this._handleClick);\n }\n\n private _handleClick = (e: Event): void => {\n if (this.disabled) {\n e.stopPropagation();\n\n return;\n }\n\n const displayLabel = this.label || this.textContent?.trim() || '';\n this.emit('selectoption', { detail: { value: this.value ?? '', label: displayLabel } });\n };\n\n render() {\n return html(({ div, slot }) => {\n div({ className: 'option-item' }, () => {\n slot();\n });\n });\n }\n}\n\nSelectOption.register();\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ae-select-option': SelectOption;\n }\n}\n\nexport default SelectOption;\nexport type SelectOptionProps = InferProps<typeof SelectOption>;\n"],"names":["_a","variables"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,eAAA,eAAA,YAAA,YAAA,IAAA,OAAA,QAAA,QAAA,WAAA;AAOA,MAAM,sBAAqB,KAAA,gBAGzB,aAAA,CAAC,KAAK,EAAE,MAAM,OAAA,CAAQ,CAAA,GAGtB,aAAA,CAAC,KAAK,EAAE,MAAM,OAAA,CAAQ,CAAA,GAGtB,gBAAA,CAAC,KAAK,EAAE,MAAM,QAAA,CAAS,CAAA,GAGvB,gBAAA,CAAC,KAAK,EAAE,MAAM,QAAA,CAAS,IAZE,IAAe;AAAA,EAA1C,cAAA;AAAA,UAAA,GAAA,SAAA;AAIE,iBAAA,MAAS,QAAT,kBAAA,OAAA,GAAA,IAAA,CAAA,GAAA,kBAAA,OAAA,IAAA,IAAA;AAGA,iBAAA,MAAS,QAAT,kBAAA,OAAA,IAAA,IAAA,CAAA,GAAA,kBAAA,OAAA,IAAA,IAAA;AAGA,iBAAA,MAAS,WAAoB,kBAA7B,OAAA,IAAA,MAA6B,KAAA,CAAA,GAA7B,kBAAA,OAAA,IAAA,IAAA;AAGA,iBAAA,MAAS,WAAgC,kBAAzC,OAAA,IAAA,MAAyC,KAAA,CAAA,GAAzC,kBAAA,OAAA,IAAA,IAAA;AASA,kBAAA,MAAQ,gBAAe,CAAC,MAAmB;;AACzC,UAAI,KAAK,UAAU;AACjB,UAAE,gBAAA;AAEF;AAAA,MACF;AAEA,YAAM,eAAe,KAAK,WAASA,MAAA,KAAK,gBAAL,gBAAAA,IAAkB,WAAU;AAC/D,WAAK,KAAK,gBAAgB,EAAE,QAAQ,EAAE,OAAO,KAAK,SAAS,IAAI,OAAO,aAAA,EAAa,CAAG;AAAA,IACxF,CAAA;AAAA,EAAA;AAAA,EAdA,oBAAoB;AAClB,UAAM,kBAAA;AACN,SAAK,OAAO,SAAS,KAAK,YAAY;AAAA,EACxC;AAAA,EAaA,SAAS;AACP,WAAO,KAAK,CAAC,EAAE,KAAK,WAAW;AAC7B,UAAI,EAAE,WAAW,cAAA,GAAiB,MAAM;AACtC,aAAA;AAAA,MACF,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AACF;AAxCA,QAAA,iBAAA,EAAA;AAIW,SAAA,oBAAA,QAAA;AAGA,SAAA,oBAAA,QAAA;AAGA,YAAA,oBAAA,QAAA;AAGA,YAAA,oBAAA,QAAA;AATT,kBAAA,OAAA,GAAS,SADT,YAHI,cAIK,MAAA;AAGT,kBAAA,OAAA,GAAS,SADT,YANI,cAOK,MAAA;AAGT,kBAAA,OAAA,GAAS,YADT,eATI,cAUK,SAAA;AAGT,kBAAA,OAAA,GAAS,YADT,eAZI,cAaK,SAAA;AAbX,oBAAA,OAAM,YAAA;AACJ,cADI,cACG,WAAU,eAAA;AAcjB,cAfI,cAea,UAAS,CAACC,gBAAW,KAAK,CAAA;AA2B7C,aAAa,SAAA;"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const slider = require("./chunks/slider.cjs");
4
+ exports.Slider = slider.Slider;
5
+ exports.default = slider.Slider;
6
+ //# sourceMappingURL=slider.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slider.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
package/dist/slider.js ADDED
@@ -0,0 +1,6 @@
1
+ import { S, S as S2 } from "./chunks/slider.js";
2
+ export {
3
+ S as Slider,
4
+ S2 as default
5
+ };
6
+ //# sourceMappingURL=slider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slider.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const _switch = require("./chunks/switch.cjs");
4
+ exports.Switch = _switch.Switch;
5
+ exports.default = _switch.Switch;
6
+ //# sourceMappingURL=switch.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
package/dist/switch.js ADDED
@@ -0,0 +1,6 @@
1
+ import { S, S as S2 } from "./chunks/switch.js";
2
+ export {
3
+ S as Switch,
4
+ S2 as default
5
+ };
6
+ //# sourceMappingURL=switch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/dist/tabs.cjs ADDED
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const tabPanel = require("./chunks/tab-panel.cjs");
4
+ exports.Tab = tabPanel.Tab;
5
+ exports.TabPanel = tabPanel.TabPanel;
6
+ exports.Tabs = tabPanel.Tabs;
7
+ exports.default = tabPanel.Tabs;
8
+ //# sourceMappingURL=tabs.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
package/dist/tabs.js ADDED
@@ -0,0 +1,8 @@
1
+ import { T, a, b, b as b2 } from "./chunks/tab-panel.js";
2
+ export {
3
+ T as Tab,
4
+ a as TabPanel,
5
+ b as Tabs,
6
+ b2 as default
7
+ };
8
+ //# sourceMappingURL=tabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/dist/tag.cjs ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const tag = require("./chunks/tag.cjs");
4
+ exports.default = tag.Tag;
5
+ //# sourceMappingURL=tag.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
package/dist/tag.js ADDED
@@ -0,0 +1,5 @@
1
+ import { T } from "./chunks/tag.js";
2
+ export {
3
+ T as default
4
+ };
5
+ //# sourceMappingURL=tag.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const textInput = require("./chunks/text-input.cjs");
4
+ exports.TextInput = textInput.TextInput;
5
+ exports.default = textInput.TextInput;
6
+ //# sourceMappingURL=text-input.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-input.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -0,0 +1,6 @@
1
+ import { T, T as T2 } from "./chunks/text-input.js";
2
+ export {
3
+ T as TextInput,
4
+ T2 as default
5
+ };
6
+ //# sourceMappingURL=text-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-input.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -70,14 +70,14 @@ declare class AeicoField<TValue = string> extends AeicoComponent {
70
70
  *
71
71
  * @returns Current field value
72
72
  */
73
- protected getValue(): any;
73
+ protected getValue(): TValue;
74
74
  /**
75
75
  * Write value to the underlying UI element and sync props
76
76
  * Subclasses must override this to update their specific UI element
77
77
  *
78
78
  * @param _value New value to write to the element
79
79
  */
80
- protected writeValue(_value: any): void;
80
+ protected writeValue(_value: TValue): void;
81
81
  /**
82
82
  * Get event payload for change events
83
83
  * Override in subclasses to customize event data (e.g., { checked, oldChecked } for checkbox)
@@ -87,7 +87,7 @@ declare class AeicoField<TValue = string> extends AeicoComponent {
87
87
  * @param action Action type
88
88
  * @returns Event payload object
89
89
  */
90
- protected getEventPayload(value: any, oldValue: any, action: FieldAction): Record<string, any>;
90
+ protected getEventPayload(value: TValue, oldValue: TValue, action: FieldAction): Record<string, unknown>;
91
91
  /**
92
92
  * Update field value programmatically (internal method)
93
93
  * Subclasses should provide type-safe public wrappers (e.g., change() method)
@@ -96,7 +96,7 @@ declare class AeicoField<TValue = string> extends AeicoComponent {
96
96
  * @param options.silent If true, won't emit change event (default: true)
97
97
  * @param options.action Action type for the event (default: 'change')
98
98
  */
99
- protected setValue(value: any, options?: {
99
+ protected setValue(value: TValue, options?: {
100
100
  silent?: boolean;
101
101
  action?: FieldAction;
102
102
  }): void;
@@ -106,7 +106,7 @@ declare class AeicoField<TValue = string> extends AeicoComponent {
106
106
  * @param value Value to reset to, defaults to defaultValue prop
107
107
  * @param options.silent If false, will emit reset event (default: true)
108
108
  */
109
- reset(value?: any, options?: {
109
+ reset(value?: TValue, options?: {
110
110
  silent?: boolean;
111
111
  }): void;
112
112
  /**
@@ -33,7 +33,8 @@ declare class Button extends AeicoComponent {
33
33
  type?: 'button' | 'submit' | 'reset';
34
34
  active?: boolean;
35
35
  block?: boolean;
36
- private buttonElement;
36
+ private _buttonElement;
37
+ private _slotElement;
37
38
  private _autoAriaLabel;
38
39
  protected onMounted(): void;
39
40
  private _handleSlotChange;
@@ -1,7 +1,7 @@
1
- import AeicoField from '../aeico-field';
1
+ import AeicoField, { type FieldAction } from '../aeico-field';
2
2
  import type { InferProps, Props } from 'aeico';
3
3
  import { CheckboxVariant } from './defines';
4
- declare class Checkbox extends AeicoField {
4
+ declare class Checkbox extends AeicoField<boolean> {
5
5
  protected fieldElement: HTMLInputElement | null;
6
6
  static tagName: string;
7
7
  static props: Props;
@@ -11,14 +11,14 @@ declare class Checkbox extends AeicoField {
11
11
  protected static styles: string[];
12
12
  protected getValue(): boolean;
13
13
  protected writeValue(checked: boolean): void;
14
- protected getEventPayload(checked: boolean, oldChecked: boolean, action: any): {
14
+ protected getEventPayload(checked: boolean, oldChecked: boolean, action: FieldAction): {
15
15
  checked: boolean;
16
16
  oldChecked: boolean;
17
- action: any;
17
+ action: FieldAction;
18
18
  };
19
19
  protected setValue(checked: boolean, options?: {
20
20
  silent?: boolean;
21
- action?: any;
21
+ action?: FieldAction;
22
22
  }): void;
23
23
  reset(checked?: boolean, options?: {
24
24
  silent?: boolean;
@@ -53,6 +53,7 @@ export { default as Divider } from './divider';
53
53
  export { default as Card } from './card';
54
54
  export { default as Navbar } from './navbar';
55
55
  export { default as Detail } from './detail';
56
+ export { default as ProgressBar } from './progress-bar';
56
57
  export type { SelectProps, SelectOption, SelectOptions, SelectOptionValue } from './select';
57
58
  export type { SliderProps, SliderOption, SliderOptions, SliderOptionValue } from './slider';
58
59
  export type { CheckboxProps, CheckboxVariant } from './checkbox';
@@ -67,6 +68,7 @@ export type { BadgeProps, BadgeColor, BadgeSize, BadgeVariant } from './badge';
67
68
  export type { TagProps, TagColor, TagSize, TagVariant } from './tag';
68
69
  export type { DialogProps } from './dialog';
69
70
  export type { IconProps, IconSize, IconColor, IconDefinition, IconRegistryData } from './icon';
71
+ export type { ProgressBarProps, ProgressBarColor } from './progress-bar';
70
72
  export type { IconButtonProps, IconButtonVariant, IconButtonSize } from './icon-button';
71
73
  export type { DividerProps } from './divider';
72
74
  export type { CardProps, CardVariant, CardColor } from './card';
@@ -0,0 +1 @@
1
+ export type ProgressBarColor = 'default' | 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info';
@@ -0,0 +1,3 @@
1
+ export { default, default as ProgressBar } from './progress-bar';
2
+ export type { ProgressBarProps } from './progress-bar';
3
+ export type { ProgressBarColor } from './defines';
@@ -0,0 +1,37 @@
1
+ import type { InferProps } from 'aeico';
2
+ import AeicoComponent from '../aeico-component';
3
+ import type { ProgressBarColor } from './defines';
4
+ /**
5
+ * Progress bars show how far along an ongoing operation is as a horizontal fill.
6
+ * Use them for file uploads, multi-step flows, or any task with measurable progress.
7
+ *
8
+ * @prop {number} value - Completion percentage, automatically clamped to 0–100.
9
+ * @prop {string} label - Accessible label applied as `aria-label` on the track.
10
+ * @prop {'default'|'primary'|'secondary'|'success'|'danger'|'warning'|'info'} color
11
+ * - Preset color variant driven by the shared color system.
12
+ * @prop {boolean} animated - When set, overlays a shimmer sweep animation on the bar.
13
+ *
14
+ * @csspart base - The outermost wrapper `<div>`.
15
+ * @csspart track - The background track `<div>`.
16
+ * @csspart bar - The filled progress `<span>`.
17
+ *
18
+ * @cssproperty [--progress-height=8px] - Height of both the track and the bar.
19
+ * @cssproperty [--progress-bar-color=var(--color-solid)] - Fill color of the bar.
20
+ * When set, takes precedence over the `color` prop entirely.
21
+ */
22
+ declare class ProgressBar extends AeicoComponent {
23
+ static tagName: string;
24
+ protected static styles: string[];
25
+ accessor value: number;
26
+ accessor label: string;
27
+ accessor color: ProgressBarColor;
28
+ accessor animated: boolean;
29
+ protected render(): import("aeico-view").RenderResult;
30
+ }
31
+ declare global {
32
+ interface HTMLElementTagNameMap {
33
+ 'ae-progress-bar': ProgressBar;
34
+ }
35
+ }
36
+ export default ProgressBar;
37
+ export type ProgressBarProps = InferProps<typeof ProgressBar>;
@@ -25,7 +25,7 @@ declare class RadioGroup extends AeicoField {
25
25
  private _boundOnRadioClick;
26
26
  private _boundOnButtonClick;
27
27
  protected getValue(): string;
28
- protected writeValue(_value: any): void;
28
+ protected writeValue(_value: string): void;
29
29
  protected onReset(): void;
30
30
  protected onClear(): void;
31
31
  render(): import("aeico-view").RenderResult;
@@ -32,7 +32,7 @@ declare class Select extends AeicoField<SelectOptionValue | SelectMultiValue> {
32
32
  defaultValue: SelectOptionValue | SelectMultiValue | undefined;
33
33
  protected static styles: string[];
34
34
  protected writeValue(_value: SelectOptionValue | SelectMultiValue): void;
35
- protected getValue(): any;
35
+ protected getValue(): SelectOptionValue | SelectMultiValue;
36
36
  private _getMultiValues;
37
37
  protected onDisabledChanged(_newValue: boolean): void;
38
38
  protected onUpdated(_changedProps: Map<string, unknown>): void;
@@ -1,6 +1,6 @@
1
- import AeicoField from '../aeico-field';
1
+ import AeicoField, { type FieldAction } from '../aeico-field';
2
2
  import type { InferProps, Props } from 'aeico';
3
- declare class Switch extends AeicoField {
3
+ declare class Switch extends AeicoField<boolean> {
4
4
  protected fieldElement: HTMLInputElement | null;
5
5
  static tagName: string;
6
6
  static props: Props;
@@ -9,14 +9,14 @@ declare class Switch extends AeicoField {
9
9
  protected static styles: string[];
10
10
  protected getValue(): boolean;
11
11
  protected writeValue(checked: boolean): void;
12
- protected getEventPayload(checked: boolean, oldChecked: boolean, action: any): {
12
+ protected getEventPayload(checked: boolean, oldChecked: boolean, action: FieldAction): {
13
13
  checked: boolean;
14
14
  oldChecked: boolean;
15
- action: any;
15
+ action: FieldAction;
16
16
  };
17
17
  protected setValue(checked: boolean, options?: {
18
18
  silent?: boolean;
19
- action?: any;
19
+ action?: FieldAction;
20
20
  }): void;
21
21
  reset(checked?: boolean, options?: {
22
22
  silent?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aeico-components",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Built-in UI components for the Aeico Web Components framework",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -11,6 +11,11 @@
11
11
  "types": "./dist/types/index.d.ts",
12
12
  "import": "./dist/index.js",
13
13
  "require": "./dist/index.cjs"
14
+ },
15
+ "./*": {
16
+ "types": "./dist/types/*/index.d.ts",
17
+ "import": "./dist/*.js",
18
+ "require": "./dist/*.cjs"
14
19
  }
15
20
  },
16
21
  "files": [
@@ -18,7 +23,12 @@
18
23
  "!dist/*.tsbuildinfo",
19
24
  "src"
20
25
  ],
21
- "sideEffects": false,
26
+ "sideEffects": [
27
+ "./dist/*.js",
28
+ "./dist/*.cjs",
29
+ "./dist/chunks/*.js",
30
+ "./dist/chunks/*.cjs"
31
+ ],
22
32
  "scripts": {
23
33
  "build": "vite build && tsc --declaration --emitDeclarationOnly --outDir dist/types -p tsconfig.json",
24
34
  "dev": "vite build --watch",
@@ -41,11 +51,13 @@
41
51
  ],
42
52
  "author": "",
43
53
  "license": "ISC",
44
- "dependencies": {
45
- "aeico": "^0.1.3",
54
+ "peerDependencies": {
55
+ "aeico": "^0.1.5",
46
56
  "aeico-localize": "^0.1.1"
47
57
  },
48
58
  "devDependencies": {
59
+ "aeico": "^0.1.5",
60
+ "aeico-localize": "^0.1.1",
49
61
  "@eslint/js": "^10.0.1",
50
62
  "@esm-bundle/chai": "^4.3.4-fix.0",
51
63
  "@types/mocha": "^10.0.10",
@@ -136,8 +136,8 @@ class AeicoField<TValue = string> extends AeicoComponent {
136
136
  *
137
137
  * @returns Current field value
138
138
  */
139
- protected getValue(): any {
140
- return this.fieldElement?.value || '';
139
+ protected getValue(): TValue {
140
+ return (this.fieldElement?.value || '') as TValue;
141
141
  }
142
142
 
143
143
  /**
@@ -146,7 +146,7 @@ class AeicoField<TValue = string> extends AeicoComponent {
146
146
  *
147
147
  * @param _value New value to write to the element
148
148
  */
149
- protected writeValue(_value: any): void {
149
+ protected writeValue(_value: TValue): void {
150
150
  // Base implementation - subclasses override
151
151
  }
152
152
 
@@ -159,7 +159,11 @@ class AeicoField<TValue = string> extends AeicoComponent {
159
159
  * @param action Action type
160
160
  * @returns Event payload object
161
161
  */
162
- protected getEventPayload(value: any, oldValue: any, action: FieldAction): Record<string, any> {
162
+ protected getEventPayload(
163
+ value: TValue,
164
+ oldValue: TValue,
165
+ action: FieldAction,
166
+ ): Record<string, unknown> {
163
167
  return { value, oldValue, action };
164
168
  }
165
169
 
@@ -171,7 +175,7 @@ class AeicoField<TValue = string> extends AeicoComponent {
171
175
  * @param options.silent If true, won't emit change event (default: true)
172
176
  * @param options.action Action type for the event (default: 'change')
173
177
  */
174
- protected setValue(value: any, options?: { silent?: boolean; action?: FieldAction }): void {
178
+ protected setValue(value: TValue, options?: { silent?: boolean; action?: FieldAction }): void {
175
179
  const oldValue = this.getValue();
176
180
 
177
181
  // Update property value
@@ -193,9 +197,9 @@ class AeicoField<TValue = string> extends AeicoComponent {
193
197
  * @param value Value to reset to, defaults to defaultValue prop
194
198
  * @param options.silent If false, will emit reset event (default: true)
195
199
  */
196
- public reset(value?: any, options?: { silent?: boolean }): void {
200
+ public reset(value?: TValue, options?: { silent?: boolean }): void {
197
201
  const resetValue = value !== undefined ? value : this.defaultValue;
198
- this.setValue(resetValue, { ...options, action: 'reset' });
202
+ this.setValue(resetValue as TValue, { ...options, action: 'reset' });
199
203
  }
200
204
 
201
205
  /**
@@ -204,7 +208,7 @@ class AeicoField<TValue = string> extends AeicoComponent {
204
208
  * @param options.silent If false, will emit clear event (default: true)
205
209
  */
206
210
  public clear(options?: { silent?: boolean }): void {
207
- this.setValue('', { ...options, action: 'clear' });
211
+ this.setValue('' as TValue, { ...options, action: 'clear' });
208
212
  }
209
213
 
210
214
  /**
@@ -55,18 +55,16 @@ class Button extends AeicoComponent {
55
55
  @prop({ type: Boolean })
56
56
  block?: boolean;
57
57
 
58
- private buttonElement: HTMLButtonElement | null = null;
58
+ private _buttonElement: HTMLButtonElement | null = null;
59
+ private _slotElement: HTMLSlotElement | null = null;
59
60
  private _autoAriaLabel = false;
60
61
 
61
62
  protected onMounted() {
62
- const slot = this.shadowRoot?.querySelector('slot:not([name])');
63
- if (slot) this.listen(slot, 'slotchange', this._handleSlotChange);
64
63
  this._handleSlotChange();
65
64
  }
66
65
 
67
66
  private _handleSlotChange = () => {
68
- const slot = this.shadowRoot?.querySelector('slot:not([name])') as HTMLSlotElement | null;
69
- const nodes = slot?.assignedNodes() ?? [];
67
+ const nodes = this._slotElement?.assignedNodes() ?? [];
70
68
  // Icon-only: exactly one element (ae-icon) and no meaningful text nodes
71
69
  const elements = nodes.filter((n): n is Element => n.nodeType === Node.ELEMENT_NODE);
72
70
  const hasText = nodes.some(
@@ -92,7 +90,7 @@ class Button extends AeicoComponent {
92
90
 
93
91
  protected render() {
94
92
  return html(({ button, slot }) => {
95
- this.buttonElement = button(
93
+ this._buttonElement = button(
96
94
  {
97
95
  type: this.type || 'button',
98
96
  disabled: this.disabled,
@@ -101,7 +99,7 @@ class Button extends AeicoComponent {
101
99
  'aria-disabled': this.disabled,
102
100
  },
103
101
  () => {
104
- slot();
102
+ this._slotElement = slot({ '@slotchange': this._handleSlotChange });
105
103
  },
106
104
  );
107
105
  });
@@ -111,8 +109,8 @@ class Button extends AeicoComponent {
111
109
  * Programmatically click the button
112
110
  */
113
111
  click() {
114
- if (!this.disabled && this.buttonElement) {
115
- this.buttonElement.click();
112
+ if (!this.disabled && this._buttonElement) {
113
+ this._buttonElement.click();
116
114
  }
117
115
  }
118
116
 
@@ -120,8 +118,8 @@ class Button extends AeicoComponent {
120
118
  * Focus the button
121
119
  */
122
120
  focus() {
123
- if (this.buttonElement) {
124
- this.buttonElement.focus();
121
+ if (this._buttonElement) {
122
+ this._buttonElement.focus();
125
123
  }
126
124
  }
127
125
 
@@ -129,8 +127,8 @@ class Button extends AeicoComponent {
129
127
  * Blur the button
130
128
  */
131
129
  blur() {
132
- if (this.buttonElement) {
133
- this.buttonElement.blur();
130
+ if (this._buttonElement) {
131
+ this._buttonElement.blur();
134
132
  }
135
133
  }
136
134
  }