le-kit 0.4.0 → 0.5.0

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 (126) hide show
  1. package/LLM_CONTEXT.md +1377 -0
  2. package/dist/cjs/le-bar_16.cjs.entry.js +15 -15
  3. package/dist/cjs/le-code-input.cjs.entry.js +181 -0
  4. package/dist/cjs/le-combobox.cjs.entry.js +1 -1
  5. package/dist/cjs/le-header-placeholder.cjs.entry.js +1 -1
  6. package/dist/cjs/le-kit.cjs.js +1 -1
  7. package/dist/cjs/le-multiselect.cjs.entry.js +3 -3
  8. package/dist/cjs/le-number-input.cjs.entry.js +1 -1
  9. package/dist/cjs/le-round-progress.cjs.entry.js +1 -1
  10. package/dist/cjs/le-segmented-control.cjs.entry.js +1 -1
  11. package/dist/cjs/le-stack.cjs.entry.js +1 -1
  12. package/dist/cjs/le-tab-bar.cjs.entry.js +1 -1
  13. package/dist/cjs/le-tab-panel.cjs.entry.js +2 -2
  14. package/dist/cjs/le-tab.cjs.entry.js +1 -1
  15. package/dist/cjs/le-tabs.cjs.entry.js +2 -2
  16. package/dist/cjs/le-tag.cjs.entry.js +1 -1
  17. package/dist/cjs/le-turntable.cjs.entry.js +1 -1
  18. package/dist/cjs/loader.cjs.js +1 -1
  19. package/dist/collection/collection-manifest.json +1 -0
  20. package/dist/collection/components/le-code-input/le-code-input.css +106 -0
  21. package/dist/collection/components/le-code-input/le-code-input.js +466 -0
  22. package/dist/collection/components/le-code-input/le-code-input.js.map +1 -0
  23. package/dist/collection/components/le-collapse/le-collapse.js +1 -1
  24. package/dist/collection/components/le-combobox/le-combobox.js +1 -1
  25. package/dist/collection/components/le-current-heading/le-current-heading.js +1 -1
  26. package/dist/collection/components/le-dropdown-base/le-dropdown-base.js +1 -1
  27. package/dist/collection/components/le-header/le-header.js +2 -2
  28. package/dist/collection/components/le-header-placeholder/le-header-placeholder.js +1 -1
  29. package/dist/collection/components/le-icon/le-icon.js +1 -1
  30. package/dist/collection/components/le-multiselect/le-multiselect.js +3 -3
  31. package/dist/collection/components/le-number-input/le-number-input.js +1 -1
  32. package/dist/collection/components/le-popover/le-popover.js +3 -3
  33. package/dist/collection/components/le-round-progress/le-round-progress.js +1 -1
  34. package/dist/collection/components/le-scroll-progress/le-scroll-progress.js +1 -1
  35. package/dist/collection/components/le-segmented-control/le-segmented-control.js +1 -1
  36. package/dist/collection/components/le-select/le-select.js +2 -2
  37. package/dist/collection/components/le-slot/le-slot.js +1 -1
  38. package/dist/collection/components/le-stack/le-stack.js +1 -1
  39. package/dist/collection/components/le-string-input/le-string-input.js +2 -2
  40. package/dist/collection/components/le-tab/le-tab.js +1 -1
  41. package/dist/collection/components/le-tab-bar/le-tab-bar.js +1 -1
  42. package/dist/collection/components/le-tab-panel/le-tab-panel.js +2 -2
  43. package/dist/collection/components/le-tabs/le-tabs.js +2 -2
  44. package/dist/collection/components/le-tag/le-tag.js +1 -1
  45. package/dist/collection/components/le-turntable/le-turntable.js +1 -1
  46. package/dist/collection/dist/components/assets/custom-elements.json +1248 -871
  47. package/dist/components/assets/custom-elements.json +1248 -871
  48. package/dist/components/le-button2.js +5 -5
  49. package/dist/components/le-code-input.d.ts +11 -0
  50. package/dist/components/le-code-input.js +265 -0
  51. package/dist/components/le-code-input.js.map +1 -0
  52. package/dist/components/le-collapse2.js +1 -1
  53. package/dist/components/le-combobox.js +1 -1
  54. package/dist/components/le-current-heading.js +1 -1
  55. package/dist/components/le-dropdown-base2.js +1 -1
  56. package/dist/components/le-header-placeholder.js +1 -1
  57. package/dist/components/le-header.js +2 -2
  58. package/dist/components/le-icon2.js +1 -1
  59. package/dist/components/le-multiselect.js +3 -3
  60. package/dist/components/le-number-input.js +1 -1
  61. package/dist/components/le-popover2.js +3 -3
  62. package/dist/components/le-round-progress.js +1 -1
  63. package/dist/components/le-scroll-progress.js +1 -1
  64. package/dist/components/le-segmented-control.js +1 -1
  65. package/dist/components/le-stack.js +1 -1
  66. package/dist/components/le-tab-bar.js +1 -1
  67. package/dist/components/le-tab-panel.js +2 -2
  68. package/dist/components/le-tab2.js +1 -1
  69. package/dist/components/le-tabs.js +2 -2
  70. package/dist/components/le-tag2.js +1 -1
  71. package/dist/components/le-turntable.js +1 -1
  72. package/dist/docs.json +442 -1
  73. package/dist/esm/le-bar_16.entry.js +15 -15
  74. package/dist/esm/le-code-input.entry.js +179 -0
  75. package/dist/esm/le-code-input.entry.js.map +1 -0
  76. package/dist/esm/le-combobox.entry.js +1 -1
  77. package/dist/esm/le-header-placeholder.entry.js +1 -1
  78. package/dist/esm/le-kit.js +1 -1
  79. package/dist/esm/le-multiselect.entry.js +3 -3
  80. package/dist/esm/le-number-input.entry.js +1 -1
  81. package/dist/esm/le-round-progress.entry.js +1 -1
  82. package/dist/esm/le-segmented-control.entry.js +1 -1
  83. package/dist/esm/le-stack.entry.js +1 -1
  84. package/dist/esm/le-tab-bar.entry.js +1 -1
  85. package/dist/esm/le-tab-panel.entry.js +2 -2
  86. package/dist/esm/le-tab.entry.js +1 -1
  87. package/dist/esm/le-tabs.entry.js +2 -2
  88. package/dist/esm/le-tag.entry.js +1 -1
  89. package/dist/esm/le-turntable.entry.js +1 -1
  90. package/dist/esm/loader.js +1 -1
  91. package/dist/le-kit/dist/components/assets/custom-elements.json +1248 -871
  92. package/dist/le-kit/le-kit.esm.js +1 -1
  93. package/dist/le-kit/{p-c4975e66.entry.js → p-24112ca3.entry.js} +2 -2
  94. package/dist/le-kit/{p-3f26be75.entry.js → p-2c6d080d.entry.js} +2 -2
  95. package/dist/le-kit/p-516c8531.entry.js +2 -0
  96. package/dist/le-kit/{p-69dd089a.entry.js → p-6b69f9a2.entry.js} +2 -2
  97. package/dist/le-kit/{p-6da2d81a.entry.js → p-6d14306f.entry.js} +2 -2
  98. package/dist/le-kit/{p-7201ae65.entry.js → p-7bcdf2d4.entry.js} +2 -2
  99. package/dist/le-kit/{p-36f126bb.entry.js → p-7cf1e23c.entry.js} +2 -2
  100. package/dist/le-kit/{p-d449a88b.entry.js → p-85f2fd4d.entry.js} +2 -2
  101. package/dist/le-kit/{p-d1eee582.entry.js → p-ab6c1def.entry.js} +2 -2
  102. package/dist/le-kit/{p-3f31e31b.entry.js → p-ae4ead64.entry.js} +2 -2
  103. package/dist/le-kit/{p-33a24394.entry.js → p-b05d4511.entry.js} +2 -2
  104. package/dist/le-kit/{p-9863d6fb.entry.js → p-b6ac02ff.entry.js} +2 -2
  105. package/dist/le-kit/{p-cd38c01b.entry.js → p-c24769e2.entry.js} +2 -2
  106. package/dist/le-kit/{p-bf66757c.entry.js → p-dc0445ad.entry.js} +2 -2
  107. package/dist/le-kit/p-eb5286f2.entry.js +2 -0
  108. package/dist/le-kit/p-eb5286f2.entry.js.map +1 -0
  109. package/dist/types/components/le-code-input/le-code-input.d.ts +102 -0
  110. package/dist/types/components.d.ts +183 -0
  111. package/package.json +7 -5
  112. package/dist/le-kit/p-7a60bfff.entry.js +0 -2
  113. /package/dist/le-kit/{p-c4975e66.entry.js.map → p-24112ca3.entry.js.map} +0 -0
  114. /package/dist/le-kit/{p-3f26be75.entry.js.map → p-2c6d080d.entry.js.map} +0 -0
  115. /package/dist/le-kit/{p-7a60bfff.entry.js.map → p-516c8531.entry.js.map} +0 -0
  116. /package/dist/le-kit/{p-69dd089a.entry.js.map → p-6b69f9a2.entry.js.map} +0 -0
  117. /package/dist/le-kit/{p-6da2d81a.entry.js.map → p-6d14306f.entry.js.map} +0 -0
  118. /package/dist/le-kit/{p-7201ae65.entry.js.map → p-7bcdf2d4.entry.js.map} +0 -0
  119. /package/dist/le-kit/{p-36f126bb.entry.js.map → p-7cf1e23c.entry.js.map} +0 -0
  120. /package/dist/le-kit/{p-d449a88b.entry.js.map → p-85f2fd4d.entry.js.map} +0 -0
  121. /package/dist/le-kit/{p-d1eee582.entry.js.map → p-ab6c1def.entry.js.map} +0 -0
  122. /package/dist/le-kit/{p-3f31e31b.entry.js.map → p-ae4ead64.entry.js.map} +0 -0
  123. /package/dist/le-kit/{p-33a24394.entry.js.map → p-b05d4511.entry.js.map} +0 -0
  124. /package/dist/le-kit/{p-9863d6fb.entry.js.map → p-b6ac02ff.entry.js.map} +0 -0
  125. /package/dist/le-kit/{p-cd38c01b.entry.js.map → p-c24769e2.entry.js.map} +0 -0
  126. /package/dist/le-kit/{p-bf66757c.entry.js.map → p-dc0445ad.entry.js.map} +0 -0
@@ -100,11 +100,11 @@ const LeStringInput = /*@__PURE__*/ proxyCustomElement(class LeStringInput exten
100
100
  ev.stopPropagation();
101
101
  };
102
102
  render() {
103
- return (h("le-component", { key: 'e6d0050c7ea5558ab9ad2cdbd8db5b027e556193', component: "le-string-input", hostClass: classnames({ disabled: this.disabled }) }, h("div", { key: '44402f98d796663ff98b59dbe0506f2e91ef56d0', class: "le-input-wrapper" }, this.label && (h("label", { key: '01e55b65b0747c8c7f5b4dc3c4323f7cbf721f3c', class: "le-input-label", htmlFor: this.name }, this.label)), h("div", { key: 'b25a63a348fccc71e06d2ca3cb5635c1e4c14942', class: "le-input-container", part: "container" }, this.iconStart && h("span", { key: 'cc251e0e186380655127111d361a78326bf49226', class: "icon-start" }, this.iconStart), h("input", { key: '946e7d3e5463d907fa244a9bee5b7b4c0ccfde41', ref: el => {
103
+ return (h("le-component", { key: '385fe7607d573ab4cfe81315f74e650f8e57faa1', component: "le-string-input", hostClass: classnames({ disabled: this.disabled }) }, h("div", { key: 'a36c5a32238eb6c9c574aeb3955343e042d89225', class: "le-input-wrapper" }, this.label && (h("label", { key: 'c1ff01932ada19ecea0cd2e2b477615d0c873ff0', class: "le-input-label", htmlFor: this.name }, this.label)), h("div", { key: '7c8909ed5e4e3404a2900a3f9beef8b0f331d62c', class: "le-input-container", part: "container" }, this.iconStart && h("span", { key: 'cf7e7355e22de3100bade2399ba63702731350e0', class: "icon-start" }, this.iconStart), h("input", { key: '6d71245d395f6cd2c55110ca902fc0374c74026b', ref: el => {
104
104
  if (this.inputRef) {
105
105
  this.inputRef(el);
106
106
  }
107
- }, id: this.name, type: this.type, name: this.name, value: this.value, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput, onChange: this.handleChange, onClick: this.handleClick }), this.iconEnd && h("span", { key: 'a08a7bb614ac53233467b48fcc2a02cef4f4baf0', class: "icon-end" }, this.iconEnd)), !this.hideDescription && (h("div", { key: '963ce40a19dba21f8f9816f2351fa0a67640f4d7', class: "le-input-description" }, h("le-slot", { key: '0339964344887afbf1ce2b8628a8fd021774f365', name: "description", type: "text", tag: "p", label: "Description" }, h("slot", { key: '7545d884dced3d96d62b290420f1cabbe3cc765b', name: "description" })))))));
107
+ }, id: this.name, type: this.type, name: this.name, value: this.value, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput, onChange: this.handleChange, onClick: this.handleClick }), this.iconEnd && h("span", { key: 'e086f9559b086212be3cd231b7c870cdb229a733', class: "icon-end" }, this.iconEnd)), !this.hideDescription && (h("div", { key: '531ac78b43382166023a79475152345956188bcc', class: "le-input-description" }, h("le-slot", { key: '38700e86adc0c3bf049b0ad828d14993ddef7844', name: "description", type: "text", tag: "p", label: "Description" }, h("slot", { key: 'c2982e93304a872ec79446fe525eb5448e764401', name: "description" })))))));
108
108
  }
109
109
  static get style() { return leStringInputCss(); }
110
110
  }, [769, "le-string-input", {
@@ -515,7 +515,7 @@ const LeSlot = /*@__PURE__*/ proxyCustomElement(class LeSlot extends HTMLElement
515
515
  render() {
516
516
  const displayLabel = this.label || this.name;
517
517
  // Always render the same structure, CSS handles visibility via .admin-mode class
518
- return (h(Host, { key: '836c599ceb5767304c414364288a89f302d70fe2', class: {
518
+ return (h(Host, { key: '8a48f7865340d9a2e201a2f878b2f1c66c55d86c', class: {
519
519
  'admin-mode': this.adminMode,
520
520
  'invalid-html': !this.isValidHtml,
521
521
  }, role: this.adminMode ? 'region' : undefined, "aria-label": this.adminMode ? `Slot: ${displayLabel}` : undefined, "data-slot-name": this.name, "data-slot-type": this.type, "data-allowed": this.allowedComponents, "data-multiple": this.multiple, "data-required": this.required }, this.adminMode ? (h("div", { class: "le-slot-container" }, h("div", { class: classnames('le-slot-header', {
@@ -802,13 +802,13 @@ const LeSelect = /*@__PURE__*/ proxyCustomElement(class LeSelect extends HTMLEle
802
802
  }
803
803
  render() {
804
804
  const hasValue = this.selectedOption !== undefined;
805
- return (h("le-component", { key: '6edb2eef1f5bab89b57739ac86218343c7590433', component: "le-select" }, h("le-dropdown-base", { key: 'cc36749a3999c7ab0f5c1853a76a357ff4584e1b', ref: el => (this.dropdownEl = el), options: this.parsedOptions, value: this.value, disabled: this.disabled, filterFn: this.searchable ? this.filterOption : undefined, filterQuery: this.searchQuery, onLeOptionSelect: this.handleOptionSelect, onLeDropdownOpen: this.handleDropdownOpen, onLeDropdownClose: this.handleDropdownClose, fullWidth: this.fullWidth }, h("le-button", { key: '0c2e67c97b3bcdf3af8885a9d8c980171674a8f8', variant: this.variant && this.variant !== 'default' ? this.variant : 'outlined', slot: "trigger", align: "space-between", class: {
805
+ return (h("le-component", { key: '670430a0ca8f310b7454c7dd93098b6b57f3bb82', component: "le-select" }, h("le-dropdown-base", { key: '58716c031b14513b67a1106b90b6174fa363c8b4', ref: el => (this.dropdownEl = el), options: this.parsedOptions, value: this.value, disabled: this.disabled, filterFn: this.searchable ? this.filterOption : undefined, filterQuery: this.searchQuery, onLeOptionSelect: this.handleOptionSelect, onLeDropdownOpen: this.handleDropdownOpen, onLeDropdownClose: this.handleDropdownClose, fullWidth: this.fullWidth }, h("le-button", { key: 'b9cb202179c8fbc6dea9bc7af5ccf11deeb7c0f1', variant: this.variant && this.variant !== 'default' ? this.variant : 'outlined', slot: "trigger", align: "space-between", class: {
806
806
  'select-trigger': true,
807
807
  'has-value': hasValue,
808
808
  'is-open': this.open,
809
809
  }, mode: "default", size: this.size, disabled: this.disabled, "aria-haspopup": "listbox", "aria-expanded": this.open ? 'true' : 'false', onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown, fullWidth: this.fullWidth, iconStart: hasValue && this.selectedOption?.iconStart
810
810
  ? this.renderIcon(this.selectedOption.iconStart)
811
- : null, iconEnd: h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("path", { d: "M4 6l4 4 4-4" })) }, h("span", { key: '9fd3bab8442ed94d2c282423ef69cbf22badedf8', class: "trigger-label" }, hasValue ? this.selectedOption.label : this.placeholder)), this.searchable && this.open && (h("div", { key: '366d778182b1818b2c4d995d4cb8262228e55bf0', class: "multiselect-search", slot: "header" }, h("le-string-input", { key: 'b15a6d879857ac5ef3d8b041ba9902f3d8f29309', mode: "default", inputRef: el => (this.inputEl = el), class: "search-input", placeholder: "Search...", value: this.searchQuery, onInput: this.handleSearchInput })))), this.name && h("input", { key: '60582cf4d7024d35df34d871fbe154bc13c5937a', type: "hidden", name: this.name, value: this.value?.toString() ?? '' })));
811
+ : null, iconEnd: h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("path", { d: "M4 6l4 4 4-4" })) }, h("span", { key: '592267788f6a02d6b501941863e91bcd68742233', class: "trigger-label" }, hasValue ? this.selectedOption.label : this.placeholder)), this.searchable && this.open && (h("div", { key: 'd4d2611e8b1f7fb243675cc11fa4982331b3c330', class: "multiselect-search", slot: "header" }, h("le-string-input", { key: 'f2a7e477eaf730173cfbca35b33d263eda860dc2', mode: "default", inputRef: el => (this.inputEl = el), class: "search-input", placeholder: "Search...", value: this.searchQuery, onInput: this.handleSearchInput })))), this.name && h("input", { key: 'bf9dc8141d02c272b0b81557dbc7c24a419ce558', type: "hidden", name: this.name, value: this.value?.toString() ?? '' })));
812
812
  }
813
813
  static get watchers() { return {
814
814
  "value": ["handleValueChange"],
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface LeCodeInput extends Components.LeCodeInput, HTMLElement {}
4
+ export const LeCodeInput: {
5
+ prototype: LeCodeInput;
6
+ new (): LeCodeInput;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,265 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, transformTag } from '@stencil/core/internal/client';
2
+ import { c as classnames } from './utils.js';
3
+ import { d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, c as defineCustomElement$5, e as defineCustomElement$8, f as defineCustomElement$9, g as defineCustomElement$a } from './le-button2.js';
4
+ import { d as defineCustomElement$7 } from './le-dropdown-base2.js';
5
+ import { d as defineCustomElement$6 } from './le-popover2.js';
6
+
7
+ const leCodeInputCss = () => `:host{display:block;--le-input-bg:var(--le-color-surface, #ffffff);--le-input-color:var(--le-color-text-primary, #333333);--le-input-border:var(--le-border-width, 2px) solid var(--le-color-border-input, #007bff);--le-input-radius:var(--le-radius-sm, 4px);--le-input-border-focus:2px solid var(--le-color-focus);--le-input-border-focus-offset:2px}.le-code-input-wrapper{position:relative;display:flex;flex-direction:column}.le-input-label{display:block;margin-bottom:var(--le-spacing-2, 0.5rem);color:var(--le-text-color, inherit);font-size:var(--le-font-size-sm, 0.875rem);font-weight:500}.input-group{position:relative;display:inline-flex;width:fit-content}.ghost-input{position:absolute;inset:0;width:100%;height:100%;opacity:0;z-index:10;cursor:text;color:transparent;background:transparent;caret-color:transparent;border:none;outline:none;letter-spacing:1em;}.ghost-input:disabled{cursor:not-allowed}.visual-container{display:flex;gap:var(--le-spacing-2, 8px);pointer-events:none;}.code-box{position:relative;width:var(--le-code-box-size, 32px);height:var(--le-code-box-size, 42px);display:flex;align-items:center;justify-content:center;background:var(--le-input-bg);border:var(--le-input-border);border-radius:var(--le-input-radius);color:var(--le-input-color);font-size:1.2rem;transition:all 0.15s ease-in-out;box-sizing:border-box;user-select:none}.code-box.active{outline:var(--le-input-border-focus);outline-offset:var(--le-input-border-focus-offset);z-index:1}.code-box.selected{background-color:SelectedItem;outline:var(--le-input-border-focus);outline-offset:var(--le-input-border-focus-offset)}.input-group.has-error .code-box{border:var(--le-input-border-error, 1px solid #ef4444)}.input-group.has-error .code-box.active{border-width:2px}:host(.disabled) .code-box{background-color:var(--le-color-disabled-bg, #f3f4f6);color:var(--le-color-disabled-text, #9ca3af);border-color:var(--le-color-disabled-border, #e5e7eb)}.le-input-description,:host(p){margin-top:var(--le-spacing-1, 0.25rem);color:var(--le-text-muted, #6b7280);font-size:var(--le-font-size-sm, 0.875rem)}`;
8
+
9
+ const LeCodeInput$1 = /*@__PURE__*/ proxyCustomElement(class LeCodeInput extends HTMLElement {
10
+ constructor(registerHost) {
11
+ super();
12
+ if (registerHost !== false) {
13
+ this.__registerHost();
14
+ }
15
+ this.__attachShadow();
16
+ this.leChange = createEvent(this, "leChange", 7);
17
+ this.leInput = createEvent(this, "leInput", 7);
18
+ this.leFocus = createEvent(this, "leFocus", 7);
19
+ this.leBlur = createEvent(this, "leBlur", 7);
20
+ }
21
+ get el() { return this; }
22
+ /**
23
+ * The value of the input
24
+ */
25
+ value = '';
26
+ /**
27
+ * The name of the input
28
+ */
29
+ name;
30
+ /**
31
+ * Label for the input
32
+ */
33
+ label;
34
+ /**
35
+ * Length of the code (number of characters)
36
+ */
37
+ length = 6;
38
+ /**
39
+ * Description text displayed below the input
40
+ * in case there is a more complex markup,
41
+ * it can be provided via slot as well
42
+ */
43
+ description;
44
+ /**
45
+ * The type of code (numeric or alphanumeric)
46
+ * This affects the keyboard layout on mobile devices.
47
+ */
48
+ type = 'text';
49
+ /**
50
+ * Whether the input is disabled
51
+ */
52
+ disabled = false;
53
+ /**
54
+ * Whether the input is read-only
55
+ */
56
+ readonly = false;
57
+ /**
58
+ * External ID for linking with external systems
59
+ */
60
+ externalId;
61
+ /**
62
+ * Internal validation state (can be set externally manually or via simple check)
63
+ */
64
+ error = false;
65
+ /**
66
+ * Emitted when the value changes (on blur or Enter)
67
+ */
68
+ leChange;
69
+ /**
70
+ * Emitted when the input value changes (on keystroke)
71
+ */
72
+ leInput;
73
+ /**
74
+ * Emitted when the input is focused
75
+ */
76
+ leFocus;
77
+ /**
78
+ * Emitted when the input is blurred
79
+ */
80
+ leBlur;
81
+ isFocused = false;
82
+ selectionStart = 0;
83
+ selectionEnd = 0;
84
+ valueChanged(newValue) {
85
+ if (newValue && newValue.length > this.length) {
86
+ this.value = newValue.slice(0, this.length);
87
+ }
88
+ }
89
+ componentWillLoad() {
90
+ if (this.value && this.value.length > this.length) {
91
+ this.value = this.value.slice(0, this.length);
92
+ }
93
+ }
94
+ handleInput = (ev) => {
95
+ const input = ev.target;
96
+ let val = input.value;
97
+ // Enforce length limit
98
+ if (val.length > this.length) {
99
+ val = val.slice(0, this.length);
100
+ // We need to force update the input value if it exceeded length
101
+ // because Stencil prop update might not happen if value is same as prop but input is different
102
+ input.value = val;
103
+ }
104
+ this.value = val;
105
+ this.updateSelection(input);
106
+ this.leInput.emit({
107
+ value: this.value,
108
+ name: this.name,
109
+ externalId: this.externalId,
110
+ });
111
+ };
112
+ handleChange = () => {
113
+ this.leChange.emit({
114
+ value: this.value,
115
+ name: this.name,
116
+ externalId: this.externalId,
117
+ });
118
+ };
119
+ handleFocus = (ev) => {
120
+ this.isFocused = true;
121
+ const input = ev.target;
122
+ // Move cursor to the end on focus so typing appends to current value
123
+ window.requestAnimationFrame(() => {
124
+ const len = input.value.length;
125
+ input.setSelectionRange(len, len);
126
+ this.updateSelection(input);
127
+ });
128
+ this.leFocus.emit();
129
+ };
130
+ handleBlur = () => {
131
+ this.isFocused = false;
132
+ this.leBlur.emit();
133
+ // Trigger change on blur
134
+ this.handleChange();
135
+ };
136
+ handleSelect = (ev) => {
137
+ this.updateSelection(ev.target);
138
+ };
139
+ updateSelection(input) {
140
+ this.selectionStart = input.selectionStart || 0;
141
+ this.selectionEnd = input.selectionEnd || 0;
142
+ }
143
+ /**
144
+ * Helper to determine active index for focus ring
145
+ */
146
+ getActiveIndex() {
147
+ if (!this.isFocused)
148
+ return -1;
149
+ // If we have a range selection, usually focus ring is not shown or shown around selection?
150
+ // We'll stick to showing it at the cursor end (selectionEnd) or start?
151
+ // If range selected, `selectionStart` is start of range.
152
+ // If cursor is at the very end (pos == length), we highlight the last box
153
+ if (this.selectionStart === this.length && this.length > 0) {
154
+ return this.length - 1;
155
+ }
156
+ return this.selectionStart;
157
+ }
158
+ renderBoxes() {
159
+ const boxes = [];
160
+ const activeIndex = this.getActiveIndex();
161
+ const isRangeSelection = this.selectionEnd - this.selectionStart > 0;
162
+ for (let i = 0; i < this.length; i++) {
163
+ const char = this.value ? this.value[i] : '';
164
+ const isActive = this.isFocused && !isRangeSelection && i === activeIndex;
165
+ const isSelected = this.isFocused && isRangeSelection && i >= this.selectionStart && i < this.selectionEnd;
166
+ boxes.push(h("div", { class: classnames('code-box', {
167
+ 'active': isActive,
168
+ 'selected': isSelected,
169
+ 'has-value': !!char,
170
+ }) }, char));
171
+ }
172
+ return boxes;
173
+ }
174
+ render() {
175
+ return (h("le-component", { key: '74615aa06971f7b2883e4a8e6f77b76918722e53', component: "le-code-input", hostClass: classnames({ 'disabled': this.disabled, 'has-error': this.error }) }, h("div", { key: '423a974717f0676b266a362d0151540577ae8845', class: "le-code-input-wrapper" }, this.label && (h("label", { key: 'f2ba7d9c8a8a400ca31adc944919e4750785503d', class: "le-input-label", htmlFor: this.name }, this.label)), h("div", { key: 'f56b80ffc1362c164bdfe473877d934c252c9bd5', class: classnames('input-group', { 'has-error': this.error }) }, h("input", { key: 'a94d422a0884c731ecfc6221133d725057fbb87c', class: "ghost-input", id: this.name, name: this.name, type: "text", inputMode: this.type === 'number' ? 'numeric' : 'text', pattern: this.type === 'number' ? '[0-9]*' : undefined, autocomplete: "one-time-code", value: this.value, maxLength: this.length, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, onSelect: this.handleSelect,
176
+ // Prevent browser autofill background from messing up visual
177
+ spellcheck: false, autoCapitalize: "none", autoCorrect: "off" }), h("div", { key: '9436ca5298d83aae923e762748d634b9517a3b17', class: "visual-container" }, this.renderBoxes())), !this.error && (h("div", { key: '398a377af9c6c26f441e94b3598a1007c64e6ea0', class: "le-input-description" }, h("le-slot", { key: '3d9a8c248efc57ffa026f9ffdf889599b276f344', name: "description", type: "text", tag: "p", label: "Description" }, h("slot", { key: '6873dec4bea990f9fe6de013e8fa729fc385871c', name: "description" }, this.description)))))));
178
+ }
179
+ static get watchers() { return {
180
+ "value": ["valueChanged"]
181
+ }; }
182
+ static get style() { return leCodeInputCss(); }
183
+ }, [769, "le-code-input", {
184
+ "value": [1537],
185
+ "name": [1],
186
+ "label": [1],
187
+ "length": [2],
188
+ "description": [1],
189
+ "type": [1],
190
+ "disabled": [4],
191
+ "readonly": [4],
192
+ "externalId": [1, "external-id"],
193
+ "error": [4],
194
+ "isFocused": [32],
195
+ "selectionStart": [32],
196
+ "selectionEnd": [32]
197
+ }, undefined, {
198
+ "value": ["valueChanged"]
199
+ }]);
200
+ function defineCustomElement$1() {
201
+ if (typeof customElements === "undefined") {
202
+ return;
203
+ }
204
+ const components = ["le-code-input", "le-button", "le-checkbox", "le-component", "le-dropdown-base", "le-popover", "le-popup", "le-select", "le-slot", "le-string-input"];
205
+ components.forEach(tagName => { switch (tagName) {
206
+ case "le-code-input":
207
+ if (!customElements.get(transformTag(tagName))) {
208
+ customElements.define(transformTag(tagName), LeCodeInput$1);
209
+ }
210
+ break;
211
+ case "le-button":
212
+ if (!customElements.get(transformTag(tagName))) {
213
+ defineCustomElement$a();
214
+ }
215
+ break;
216
+ case "le-checkbox":
217
+ if (!customElements.get(transformTag(tagName))) {
218
+ defineCustomElement$9();
219
+ }
220
+ break;
221
+ case "le-component":
222
+ if (!customElements.get(transformTag(tagName))) {
223
+ defineCustomElement$8();
224
+ }
225
+ break;
226
+ case "le-dropdown-base":
227
+ if (!customElements.get(transformTag(tagName))) {
228
+ defineCustomElement$7();
229
+ }
230
+ break;
231
+ case "le-popover":
232
+ if (!customElements.get(transformTag(tagName))) {
233
+ defineCustomElement$6();
234
+ }
235
+ break;
236
+ case "le-popup":
237
+ if (!customElements.get(transformTag(tagName))) {
238
+ defineCustomElement$5();
239
+ }
240
+ break;
241
+ case "le-select":
242
+ if (!customElements.get(transformTag(tagName))) {
243
+ defineCustomElement$4();
244
+ }
245
+ break;
246
+ case "le-slot":
247
+ if (!customElements.get(transformTag(tagName))) {
248
+ defineCustomElement$3();
249
+ }
250
+ break;
251
+ case "le-string-input":
252
+ if (!customElements.get(transformTag(tagName))) {
253
+ defineCustomElement$2();
254
+ }
255
+ break;
256
+ } });
257
+ }
258
+
259
+ const LeCodeInput = LeCodeInput$1;
260
+ const defineCustomElement = defineCustomElement$1;
261
+
262
+ export { LeCodeInput, defineCustomElement };
263
+ //# sourceMappingURL=le-code-input.js.map
264
+
265
+ //# sourceMappingURL=le-code-input.js.map
@@ -0,0 +1 @@
1
+ {"file":"le-code-input.js","mappings":";;;;;;AAAA,MAAM,cAAc,GAAG,MAAM,CAAC,kiEAAkiE,CAAC;;MCsBpjEA,aAAW,iBAAAC,kBAAA,CAAA,MAAA,WAAA,SAAA,WAAA,CAAA;;;;;;;;;;;;;AAGtB;;AAEG;IACqC,KAAK,GAAW,EAAE;AAE1D;;AAEG;AACK,IAAA,IAAI;AAEZ;;AAEG;AACK,IAAA,KAAK;AAEb;;AAEG;IACK,MAAM,GAAW,CAAC;AAE1B;;;;AAIG;AACK,IAAA,WAAW;AAEnB;;;AAGG;IACK,IAAI,GAAsB,MAAM;AAExC;;AAEG;IACK,QAAQ,GAAY,KAAK;AAEjC;;AAEG;IACK,QAAQ,GAAY,KAAK;AAEjC;;AAEG;AACK,IAAA,UAAU;AAElB;;AAEG;IACK,KAAK,GAAY,KAAK;AAE9B;;AAEG;AACM,IAAA,QAAQ;AAEjB;;AAEG;AACM,IAAA,OAAO;AAEhB;;AAEG;AACM,IAAA,OAAO;AAEhB;;AAEG;AACM,IAAA,MAAM;IAEE,SAAS,GAAY,KAAK;IAC1B,cAAc,GAAW,CAAC;IAC1B,YAAY,GAAW,CAA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A,0CAAA,EAAS,IAAI,EAAC,aAAa,EAAC,IAAI,EAAC,MAAM,EAAC,GAAG,EAAC,GAAG,EAAC,KAAK,EAAC,aAAa,EAAA,EACjE,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,aAAa,EAAA,EAAE,IAAI,CAAC,WAAW,CAAQ,CAC1C,CACN,CACP,CACG,CACO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["LeCodeInput","__stencil_proxyCustomElement"],"sources":["src/components/le-code-input/le-code-input.css?tag=le-code-input&encapsulation=shadow","src/components/le-code-input/le-code-input.tsx"],"sourcesContent":[":host {\n display: block;\n\n --le-input-bg: var(--le-color-surface, #ffffff);\n --le-input-color: var(--le-color-text-primary, #333333);\n --le-input-border: var(--le-border-width, 2px) solid var(--le-color-border-input, #007bff);\n --le-input-radius: var(--le-radius-sm, 4px);\n --le-input-border-focus: 2px solid var(--le-color-focus);\n --le-input-border-focus-offset: 2px;\n}\n\n.le-code-input-wrapper {\n position: relative;\n display: flex;\n flex-direction: column;\n}\n\n.le-input-label {\n display: block;\n margin-bottom: var(--le-spacing-2, 0.5rem);\n color: var(--le-text-color, inherit);\n font-size: var(--le-font-size-sm, 0.875rem);\n font-weight: 500;\n}\n\n.input-group {\n position: relative;\n display: inline-flex;\n width: fit-content;\n}\n\n.ghost-input {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n z-index: 10;\n cursor: text;\n color: transparent;\n background: transparent;\n caret-color: transparent;\n border: none;\n outline: none;\n letter-spacing: 1em; /* Try to match boxes? */\n}\n\n.ghost-input:disabled {\n cursor: not-allowed;\n}\n\n.visual-container {\n display: flex;\n gap: var(--le-spacing-2, 8px);\n pointer-events: none; /* Let clicks pass to ghost input */\n}\n\n.code-box {\n position: relative;\n width: var(--le-code-box-size, 32px);\n height: var(--le-code-box-size, 42px);\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--le-input-bg);\n border: var(--le-input-border);\n border-radius: var(--le-input-radius);\n color: var(--le-input-color);\n font-size: 1.2rem;\n transition: all 0.15s ease-in-out;\n box-sizing: border-box;\n user-select: none;\n}\n\n.code-box.active {\n outline: var(--le-input-border-focus);\n outline-offset: var(--le-input-border-focus-offset);\n z-index: 1;\n}\n\n.code-box.selected {\n background-color: SelectedItem;\n outline: var(--le-input-border-focus);\n outline-offset: var(--le-input-border-focus-offset);\n}\n\n.input-group.has-error .code-box {\n border: var(--le-input-border-error, 1px solid #ef4444);\n}\n\n.input-group.has-error .code-box.active {\n border-width: 2px;\n}\n\n:host(.disabled) .code-box {\n background-color: var(--le-color-disabled-bg, #f3f4f6);\n color: var(--le-color-disabled-text, #9ca3af);\n border-color: var(--le-color-disabled-border, #e5e7eb);\n}\n\n.le-input-description,\n:host(p) {\n margin-top: var(--le-spacing-1, 0.25rem);\n color: var(--le-text-muted, #6b7280);\n font-size: var(--le-font-size-sm, 0.875rem);\n}\n","import { Component, Prop, Event, EventEmitter, State, h, Element, Watch } from '@stencil/core';\nimport { classnames } from '../../utils/utils';\n\n/**\n * A one-time code input component with individual frames for each character.\n * Supports standard copy/paste and range selection behaviors.\n *\n * @slot description - Additional description text displayed below the input\n *\n * @cssprop --le-code-box-size - Size of each character box (default: 40px width, 48px height)\n * @cssprop --le-input-bg - Input background color\n * @cssprop --le-input-color - Input text color\n * @cssprop --le-input-border - Input border style\n * @cssprop --le-input-border-focus - Input border style when focused\n * @cssprop --le-input-border-error - Input border style when invalid\n * @cssprop --le-input-radius - Input border radius\n */\n@Component({\n tag: 'le-code-input',\n styleUrl: 'le-code-input.css',\n shadow: true,\n})\nexport class LeCodeInput {\n @Element() el: HTMLElement;\n\n /**\n * The value of the input\n */\n @Prop({ mutable: true, reflect: true }) value: string = '';\n\n /**\n * The name of the input\n */\n @Prop() name: string;\n\n /**\n * Label for the input\n */\n @Prop() label: string;\n\n /**\n * Length of the code (number of characters)\n */\n @Prop() length: number = 6;\n\n /**\n * Description text displayed below the input\n * in case there is a more complex markup,\n * it can be provided via slot as well\n */\n @Prop() description?: string;\n\n /**\n * The type of code (numeric or alphanumeric)\n * This affects the keyboard layout on mobile devices.\n */\n @Prop() type: 'text' | 'number' = 'text';\n\n /**\n * Whether the input is disabled\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Whether the input is read-only\n */\n @Prop() readonly: boolean = false;\n\n /**\n * External ID for linking with external systems\n */\n @Prop() externalId: string;\n\n /**\n * Internal validation state (can be set externally manually or via simple check)\n */\n @Prop() error: boolean = false;\n\n /**\n * Emitted when the value changes (on blur or Enter)\n */\n @Event() leChange: EventEmitter<{ value: string; name: string; externalId: string }>;\n\n /**\n * Emitted when the input value changes (on keystroke)\n */\n @Event() leInput: EventEmitter<{ value: string; name: string; externalId: string }>;\n\n /**\n * Emitted when the input is focused\n */\n @Event() leFocus: EventEmitter<void>;\n\n /**\n * Emitted when the input is blurred\n */\n @Event() leBlur: EventEmitter<void>;\n\n @State() private isFocused: boolean = false;\n @State() private selectionStart: number = 0;\n @State() private selectionEnd: number = 0;\n\n @Watch('value')\n valueChanged(newValue: string) {\n if (newValue && newValue.length > this.length) {\n this.value = newValue.slice(0, this.length);\n }\n }\n\n componentWillLoad() {\n if (this.value && this.value.length > this.length) {\n this.value = this.value.slice(0, this.length);\n }\n }\n\n private handleInput = (ev: Event) => {\n const input = ev.target as HTMLInputElement;\n let val = input.value;\n\n // Enforce length limit\n if (val.length > this.length) {\n val = val.slice(0, this.length);\n // We need to force update the input value if it exceeded length\n // because Stencil prop update might not happen if value is same as prop but input is different\n input.value = val;\n }\n\n this.value = val;\n this.updateSelection(input);\n\n this.leInput.emit({\n value: this.value,\n name: this.name,\n externalId: this.externalId,\n });\n };\n\n private handleChange = () => {\n this.leChange.emit({\n value: this.value,\n name: this.name,\n externalId: this.externalId,\n });\n };\n\n private handleFocus = (ev: Event) => {\n this.isFocused = true;\n const input = ev.target as HTMLInputElement;\n\n // Move cursor to the end on focus so typing appends to current value\n window.requestAnimationFrame(() => {\n const len = input.value.length;\n input.setSelectionRange(len, len);\n this.updateSelection(input);\n });\n\n this.leFocus.emit();\n };\n\n private handleBlur = () => {\n this.isFocused = false;\n this.leBlur.emit();\n // Trigger change on blur\n this.handleChange();\n };\n\n private handleSelect = (ev: Event) => {\n this.updateSelection(ev.target as HTMLInputElement);\n };\n\n private updateSelection(input: HTMLInputElement) {\n this.selectionStart = input.selectionStart || 0;\n this.selectionEnd = input.selectionEnd || 0;\n }\n\n /**\n * Helper to determine active index for focus ring\n */\n private getActiveIndex(): number {\n if (!this.isFocused) return -1;\n\n // If we have a range selection, usually focus ring is not shown or shown around selection?\n // We'll stick to showing it at the cursor end (selectionEnd) or start?\n // If range selected, `selectionStart` is start of range.\n\n // If cursor is at the very end (pos == length), we highlight the last box\n if (this.selectionStart === this.length && this.length > 0) {\n return this.length - 1;\n }\n\n return this.selectionStart;\n }\n\n private renderBoxes() {\n const boxes = [];\n const activeIndex = this.getActiveIndex();\n const isRangeSelection = this.selectionEnd - this.selectionStart > 0;\n\n for (let i = 0; i < this.length; i++) {\n const char = this.value ? this.value[i] : '';\n const isActive = this.isFocused && !isRangeSelection && i === activeIndex;\n const isSelected =\n this.isFocused && isRangeSelection && i >= this.selectionStart && i < this.selectionEnd;\n\n boxes.push(\n <div\n class={classnames('code-box', {\n 'active': isActive,\n 'selected': isSelected,\n 'has-value': !!char,\n })}\n >\n {char}\n </div>,\n );\n }\n return boxes;\n }\n\n render() {\n return (\n <le-component\n component=\"le-code-input\"\n hostClass={classnames({ 'disabled': this.disabled, 'has-error': this.error })}\n >\n <div class=\"le-code-input-wrapper\">\n {this.label && (\n <label class=\"le-input-label\" htmlFor={this.name}>\n {this.label}\n </label>\n )}\n\n <div class={classnames('input-group', { 'has-error': this.error })}>\n <input\n class=\"ghost-input\"\n id={this.name}\n name={this.name}\n type=\"text\"\n inputMode={this.type === 'number' ? 'numeric' : 'text'}\n pattern={this.type === 'number' ? '[0-9]*' : undefined}\n autocomplete=\"one-time-code\"\n value={this.value}\n maxLength={this.length}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInput}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n onSelect={this.handleSelect}\n // Prevent browser autofill background from messing up visual\n spellcheck={false}\n autoCapitalize=\"none\"\n autoCorrect=\"off\"\n />\n\n <div class=\"visual-container\">{this.renderBoxes()}</div>\n </div>\n\n {!this.error && (\n <div class=\"le-input-description\">\n <le-slot name=\"description\" type=\"text\" tag=\"p\" label=\"Description\">\n <slot name=\"description\">{this.description}</slot>\n </le-slot>\n </div>\n )}\n </div>\n </le-component>\n );\n }\n}\n"],"version":3}
@@ -56,7 +56,7 @@ const LeCollapse = /*@__PURE__*/ proxyCustomElement(class LeCollapse extends HTM
56
56
  this.el.toggleAttribute('data-open', nextOpen);
57
57
  }
58
58
  render() {
59
- return (h(Host, { key: 'e4df69be14a3693bc68a699a5976787f37eaded3', "data-open": this.shouldBeOpen() ? 'true' : 'false' }, h("le-component", { key: '7feb39eb288b5d07baee781a57a3750e204831be', component: "le-collapse" }, h("div", { key: '57873975bdcf529277a5ae27ffee075718a1a1ea', class: { 'region': true, 'scroll-down': this.scrollDown }, part: "region" }, h("slot", { key: 'd5bb01ca6c07413bde337b7401d45c458d549a9d' })))));
59
+ return (h(Host, { key: 'e0882ec40ed132dbd6eeaa43da4aff03b6e45352', "data-open": this.shouldBeOpen() ? 'true' : 'false' }, h("le-component", { key: '55c98e5382ddd6b5ef8a8f506f9a2901fc0b48ce', component: "le-collapse" }, h("div", { key: '0bcfa5aada8a7a6f9c86011e6a3dfa5bbb5e08c4', class: { 'region': true, 'scroll-down': this.scrollDown }, part: "region" }, h("slot", { key: '7b762e372802512a287ae98d4aeecdb3160bb54e' })))));
60
60
  }
61
61
  static get watchers() { return {
62
62
  "open": ["onOpenChange"],
@@ -229,7 +229,7 @@ const LeCombobox$1 = /*@__PURE__*/ proxyCustomElement(class LeCombobox extends H
229
229
  }
230
230
  render() {
231
231
  const hasValue = this.inputValue.length > 0;
232
- return (h("le-component", { key: 'e5cdd2f466fa9f63dea7577d27d2a465b69c4d07', component: "le-combobox" }, h("le-dropdown-base", { key: '0266db9e59d7f35b07d515b78d265bb4cc987979', ref: el => (this.dropdownEl = el), options: this.parsedOptions, value: this.value, disabled: this.disabled, filterFn: this.filterOption, filterQuery: this.inputValue, emptyText: this.emptyText, fullWidth: this.fullWidth, closeOnClickOutside: false, onLeOptionSelect: this.handleOptionSelect, onLeDropdownOpen: this.handleDropdownOpen, onLeDropdownClose: this.handleDropdownClose }, h("div", { key: '01c44e676e9e55bc5d9df98c43c4a350c69e9c40', slot: "trigger", class: { 'combobox-trigger': true, 'is-open': this.open } }, h("le-string-input", { key: 'dd7a91dcd35f0bdfd3d0d2695aeadebf5ec6f997', mode: "default", hideDescription: true, inputRef: el => (this.inputEl = el), type: "text", class: "combobox-input", value: this.inputValue, placeholder: this.placeholder, disabled: this.disabled, "aria-haspopup": "listbox", "aria-expanded": this.open ? 'true' : 'false', "aria-autocomplete": "list", onInput: this.handleInputChange, onFocus: this.handleInputFocus, onKeyDown: this.handleInputKeyDown }), hasValue && !this.disabled && (h("button", { key: 'dadc76ed16245f133cd57a2151dcfc2e8cf90806', type: "button", class: "combobox-clear", onClick: this.handleClear, "aria-label": "Clear", tabIndex: -1 }, h("svg", { key: '1e0f2ff6acaf99d82aa15f5b6db983b4dd0d66e7', viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("path", { key: 'cb432ca68c84837dd6f99086835206691fb6b49c', d: "M4 4l8 8M12 4l-8 8" })))), h("span", { key: '133470f68a827868ac6a754906dc66df7cbb2716', class: "combobox-arrow" }, h("svg", { key: '404e2fd3edcdd7e7e6564017a5faa5c5cb89a787', viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("path", { key: '514b76dc80dc2115943eb14bfd8c5aa8f54637ad', d: "M4 6l4 4 4-4" }))))), this.name && h("input", { key: '2e6423b5c01125b5452b35bcfd6a7fbaf63a0e60', type: "hidden", name: this.name, value: this.value?.toString() ?? '' })));
232
+ return (h("le-component", { key: '77660875e900dceb4cca50087a9ea7fad38d0de8', component: "le-combobox" }, h("le-dropdown-base", { key: 'a7d46b3226322945465a8d22c87c3df1939d0c11', ref: el => (this.dropdownEl = el), options: this.parsedOptions, value: this.value, disabled: this.disabled, filterFn: this.filterOption, filterQuery: this.inputValue, emptyText: this.emptyText, fullWidth: this.fullWidth, closeOnClickOutside: false, onLeOptionSelect: this.handleOptionSelect, onLeDropdownOpen: this.handleDropdownOpen, onLeDropdownClose: this.handleDropdownClose }, h("div", { key: 'bc402ba87163d604c49d41acf32a2da7710c12d5', slot: "trigger", class: { 'combobox-trigger': true, 'is-open': this.open } }, h("le-string-input", { key: 'd676bb665963d090e88195b133f7a0f5e379b9e9', mode: "default", hideDescription: true, inputRef: el => (this.inputEl = el), type: "text", class: "combobox-input", value: this.inputValue, placeholder: this.placeholder, disabled: this.disabled, "aria-haspopup": "listbox", "aria-expanded": this.open ? 'true' : 'false', "aria-autocomplete": "list", onInput: this.handleInputChange, onFocus: this.handleInputFocus, onKeyDown: this.handleInputKeyDown }), hasValue && !this.disabled && (h("button", { key: '78446bc41c35fa2815acbfc34ea377dc33a1e55b', type: "button", class: "combobox-clear", onClick: this.handleClear, "aria-label": "Clear", tabIndex: -1 }, h("svg", { key: 'a596191694990ebb2e48d1529da0e0a6eb61e5b9', viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("path", { key: 'd6503800924e82555571c8955b33bcfddd90c7d0', d: "M4 4l8 8M12 4l-8 8" })))), h("span", { key: 'a032adbc03c135bf0e9c28f7272fa125c22fd37c', class: "combobox-arrow" }, h("svg", { key: '258a8d6a98071654a8bf59ac23dc517a9af19daa', viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("path", { key: '5960ffe0d91ae52563420fa901653e17d458b522', d: "M4 6l4 4 4-4" }))))), this.name && h("input", { key: '44791ad0af7eae39a3d8b7cabf12a68b11fc20ba', type: "hidden", name: this.name, value: this.value?.toString() ?? '' })));
233
233
  }
234
234
  static get watchers() { return {
235
235
  "value": ["handleValueChange"],
@@ -58,7 +58,7 @@ const LeCurrentHeading$1 = /*@__PURE__*/ proxyCustomElement(class LeCurrentHeadi
58
58
  }
59
59
  }
60
60
  render() {
61
- return (h(Host, { key: '028e550ecf987156ec431772147061fa5aadd25b' }, this.activeText ? (h("span", { class: "title", part: "title" }, this.activeText)) : (h("slot", null))));
61
+ return (h(Host, { key: 'c8d94a695a402039000210914b6780264a034a89' }, this.activeText ? (h("span", { class: "title", part: "title" }, this.activeText)) : (h("slot", null))));
62
62
  }
63
63
  static get watchers() { return {
64
64
  "selector": ["onSelectorChange"]
@@ -338,7 +338,7 @@ const LeDropdownBase = /*@__PURE__*/ proxyCustomElement(class LeDropdownBase ext
338
338
  }
339
339
  render() {
340
340
  const dropdownWidth = this.width || (this.triggerWidth ? `${this.triggerWidth}px` : undefined);
341
- return (h(Host, { key: '3a315f23fe74e31268e6decc30973983a118b877' }, h("le-popover", { key: 'b79a77be208e7e8f373dbc36a56b0a1e9e5556b4', ref: el => (this.popoverEl = el), position: "bottom", align: "start", showClose: false, closeOnClickOutside: this.closeOnClickOutside, closeOnEscape: true, offset: 4, width: dropdownWidth, minWidth: "150px", "trigger-full-width": this.fullWidth, onLePopoverOpen: this.handlePopoverOpen, onLePopoverClose: this.handlePopoverClose }, h("slot", { key: '2bb2996a1cb81018f19c710524b41fd1ddbaa10b', name: "trigger", slot: "trigger" }), h("slot", { key: '0fc8ce22948b69071b58622bc876c121a61043bc', name: "header" }), h("div", { key: '412af7260014a319c7889624ac359186e3e27857', class: "dropdown-list", role: "listbox", "aria-multiselectable": this.multiple ? 'true' : undefined, ref: el => (this.listEl = el), style: { maxHeight: this.maxHeight } }, this.renderOptions()))));
341
+ return (h(Host, { key: '90bca5763b9110f8e5cad70870110cab1efeeec6' }, h("le-popover", { key: 'ebded64a4f2b23c8b1a954dd995c4d6171ef9c88', ref: el => (this.popoverEl = el), position: "bottom", align: "start", showClose: false, closeOnClickOutside: this.closeOnClickOutside, closeOnEscape: true, offset: 4, width: dropdownWidth, minWidth: "150px", "trigger-full-width": this.fullWidth, onLePopoverOpen: this.handlePopoverOpen, onLePopoverClose: this.handlePopoverClose }, h("slot", { key: '57e540660ee269de594209186d6fbe066b9c8fc1', name: "trigger", slot: "trigger" }), h("slot", { key: 'e58a76a0097f938873f5462c844ee9f1a5eece72', name: "header" }), h("div", { key: 'c4fa35069438df82894e45e87f46aef67a189c43', class: "dropdown-list", role: "listbox", "aria-multiselectable": this.multiple ? 'true' : undefined, ref: el => (this.listEl = el), style: { maxHeight: this.maxHeight } }, this.renderOptions()))));
342
342
  }
343
343
  static get watchers() { return {
344
344
  "options": ["handleOptionsChange"],
@@ -8,7 +8,7 @@ const LeHeaderPlaceholder$1 = /*@__PURE__*/ proxyCustomElement(class LeHeaderPla
8
8
  }
9
9
  }
10
10
  render() {
11
- return (h(Host, { key: '944e0118b48d068ddf49e18a2d3e881783b68a21', "aria-hidden": "true", style: {
11
+ return (h(Host, { key: '0b056eac512d668bc8c3aa7000bdc7363dace713', "aria-hidden": "true", style: {
12
12
  display: 'block',
13
13
  height: 'var(--le-header-height, 64px)',
14
14
  } }));
@@ -243,7 +243,7 @@ const LeHeader$1 = /*@__PURE__*/ proxyCustomElement(class LeHeader extends HTMLE
243
243
  'is-hidden': !this.revealed,
244
244
  'is-shrunk': this.shrunk,
245
245
  });
246
- return (h(Host, { key: 'b7ed8d1208c9b25bf51df7adfbe0314a218ff9cd', class: hostClass, onMouseEnter: () => {
246
+ return (h(Host, { key: 'd1a4ae64dff81139b1c35681698539fdf072ae66', class: hostClass, onMouseEnter: () => {
247
247
  if (!this.expandOnHover)
248
248
  return;
249
249
  this.hoverActive = true;
@@ -253,7 +253,7 @@ const LeHeader$1 = /*@__PURE__*/ proxyCustomElement(class LeHeader extends HTMLE
253
253
  return;
254
254
  this.hoverActive = false;
255
255
  this.scheduleUpdate(true);
256
- } }, h("le-component", { key: '661da8897d22f2f68a5e204d95ad0e752a82bb80', component: "le-header" }, h("header", { key: '17fb8590fb9c77ae0b7bbd035779c8baedfcfd81', class: "header", part: "header", role: "banner", ref: el => (this.headerEl = el) }, h("div", { key: '7e6a8c4513faea999238f04b89f1ae8e0b6e9e14', class: "inner", part: "inner" }, h("div", { key: 'dd0096602b5d43b53df9a183b43db882bc7bbd80', class: "row", part: "row" }, h("div", { key: '1266ebdbc9ed4ab768ab5ab3fc238d83fbc9073d', class: "start", part: "start" }, h("le-slot", { key: 'de676387770a8c11ba10e202dc693cce3a135a1d', name: "start", label: "Start", description: "Logo / back button / nav", "allowed-components": "le-button,le-text,le-tag,le-box,le-stack" }, h("slot", { key: 'd4cd5d4b13dea34f42dc9585d4fabb42dd2e014e', name: "start" }))), h("div", { key: 'd4d1b192b19589f9dd6181f34e88d549ef93a4b6', class: "title", part: "title" }, h("le-slot", { key: '7e3d81978c17bfde2b25368349cd57a74c77473e', name: "title", label: "Title", description: "Header title", type: "text", tag: "span" }, h("span", { key: '32622e4910ff8d6391d0183c7be87a172c0a47d7', class: "title-slot", part: "title" }, h("slot", { key: '05882cf5752e3a1951672b029e7992d6a2d6304c', name: "title" })))), h("div", { key: 'ed4ae04bdda4d47bc51239f0d5d87b9084c0bb52', class: "end", part: "end" }, h("le-slot", { key: 'acc6c5386e2a0e453ce025e06313c3b43b5fc63d', name: "end", label: "End", description: "Actions", "allowed-components": "le-button,le-text,le-tag,le-box,le-stack" }, h("slot", { key: '4a295322956320c87974b2ffc276bb1fd17b1e65', name: "end" })))), h("div", { key: '95670490864701d5ec3fd55f28dc8ae4a1bd3ed3', class: "secondary", part: "secondary" }, h("le-slot", { key: '289d8af446f8c662472498e514c3ecc663cfdf5a', name: "", label: "Secondary", description: "Secondary row content", "allowed-components": "le-tabs,le-tab-bar,le-select,le-combobox,le-text,le-stack,le-box" }, h("slot", { key: '684a8e0f9aff40a14e08ddc64c4f21d14f174499' }))))))));
256
+ } }, h("le-component", { key: '305bc8b4aefaf2ef1dd7287422167cfd68d3e8c2', component: "le-header" }, h("header", { key: '1cf3b2ab01140e14870c1282e49e6eb3dbae5bf8', class: "header", part: "header", role: "banner", ref: el => (this.headerEl = el) }, h("div", { key: 'b238e3762dd31228f3ab3627fbca2ff1a9c630fd', class: "inner", part: "inner" }, h("div", { key: 'f186fbecc9c9b6f6f08f45c272c292af9333450e', class: "row", part: "row" }, h("div", { key: 'e496055801a36f4cf7a045513df2bc917a573786', class: "start", part: "start" }, h("le-slot", { key: '697b90a8291836452c17d2c9d3759c23b7238e93', name: "start", label: "Start", description: "Logo / back button / nav", "allowed-components": "le-button,le-text,le-tag,le-box,le-stack" }, h("slot", { key: 'e7e2b7ad283ce089def47d1f11f78a8a1603face', name: "start" }))), h("div", { key: '145aaadb93972b9018f9303baee2d5b3c42db319', class: "title", part: "title" }, h("le-slot", { key: 'c488ef0d01da476a6351ae4b7dfb397950f9c3ce', name: "title", label: "Title", description: "Header title", type: "text", tag: "span" }, h("span", { key: '78c21f46cbc81dc720e2f803cb3edc81ba5f76cf', class: "title-slot", part: "title" }, h("slot", { key: 'a47d5c8d4d0ae42b1cb4d7fab98022cbb380a27e', name: "title" })))), h("div", { key: '5fb7c5febcfb9b837f313caa65ea9b5e08b6f9cb', class: "end", part: "end" }, h("le-slot", { key: 'cc2ed75ea779a29e5c616daafec3ef90bbec3cfc', name: "end", label: "End", description: "Actions", "allowed-components": "le-button,le-text,le-tag,le-box,le-stack" }, h("slot", { key: '135e8c2c0d7a7d9bef174f380d1f31d377cb043f', name: "end" })))), h("div", { key: 'b0d9e5fba045b7cfd5640e7ba700cb44d673f982', class: "secondary", part: "secondary" }, h("le-slot", { key: '75ed60e3ddef918db1534f8818cd0f337c71e8db', name: "", label: "Secondary", description: "Secondary row content", "allowed-components": "le-tabs,le-tab-bar,le-select,le-combobox,le-text,le-stack,le-box" }, h("slot", { key: '1266dc5bb54bf22055acbfc23befb398c1ee5a31' }))))))));
257
257
  }
258
258
  static get watchers() { return {
259
259
  "revealOnScroll": ["onBehaviorPropsChange"],
@@ -115,7 +115,7 @@ const LeIcon = /*@__PURE__*/ proxyCustomElement(class LeIcon extends HTMLElement
115
115
  return svgElements;
116
116
  }
117
117
  render() {
118
- return (h("svg", { key: 'ca1bf648c3ea7cd129854fed4d42a02b87624b96', xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", height: this.size || 16, width: this.size || 16, viewBox: this.iconData?.viewBox || `0 0 ${this.size || 16} ${this.size || 16}` }, this.renderSVGContent(this.iconData?.children)));
118
+ return (h("svg", { key: '679c2641c722c5321ffc90a372d3f5fa5d748946', xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", height: this.size || 16, width: this.size || 16, viewBox: this.iconData?.viewBox || `0 0 ${this.size || 16} ${this.size || 16}` }, this.renderSVGContent(this.iconData?.children)));
119
119
  }
120
120
  static get assetsDirs() { return ["assets/icons"]; }
121
121
  static get watchers() { return {
@@ -292,13 +292,13 @@ const LeMultiselect$1 = /*@__PURE__*/ proxyCustomElement(class LeMultiselect ext
292
292
  render() {
293
293
  const hasSelections = this.selectedOptions.length > 0;
294
294
  const atMaxSelections = this.maxSelections && this.value.length >= this.maxSelections;
295
- return (h("le-component", { key: 'a2a63cfca9ce976fa4adfc8e6074928b2bff824e', component: "le-multiselect" }, h("le-dropdown-base", { key: '5df0d2b8ca639e4b21dcc2ad75d7cafb378d275c', ref: el => (this.dropdownEl = el), options: this.effectiveOptions, value: this.value, multiple: true, disabled: this.disabled, filterFn: this.searchable ? this.filterOption : undefined, filterQuery: this.searchQuery, emptyText: this.emptyText, showCheckboxes: true, fullWidth: this.fullWidth, onLeOptionSelect: this.handleOptionSelect, onLeDropdownOpen: this.handleDropdownOpen, onLeDropdownClose: this.handleDropdownClose }, h("div", { key: '8a0ed59a9a4f95b601c0feb41ab80d63628a6e96', slot: "trigger", class: {
295
+ return (h("le-component", { key: 'e6183adb112775737e6a7f47b0be614a76a1c110', component: "le-multiselect" }, h("le-dropdown-base", { key: 'ee8ba9e02608a5c26d8a8b0a659e89e5631f3f6a', ref: el => (this.dropdownEl = el), options: this.effectiveOptions, value: this.value, multiple: true, disabled: this.disabled, filterFn: this.searchable ? this.filterOption : undefined, filterQuery: this.searchQuery, emptyText: this.emptyText, showCheckboxes: true, fullWidth: this.fullWidth, onLeOptionSelect: this.handleOptionSelect, onLeDropdownOpen: this.handleDropdownOpen, onLeDropdownClose: this.handleDropdownClose }, h("div", { key: '4c87bf167dd876476dae3b0259cda2f28e3787a5', slot: "trigger", class: {
296
296
  'multiselect-trigger': true,
297
297
  'has-selections': hasSelections,
298
298
  'is-open': this.open,
299
299
  'is-disabled': this.disabled,
300
- }, tabIndex: this.disabled ? -1 : 0, role: "combobox", "aria-haspopup": "listbox", "aria-expanded": this.open ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : undefined, onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown }, this.renderTags(), h("div", { key: '1eb2d36631f9f9fc060d81fbbd09509584e46db4', class: "multiselect-actions" }, hasSelections && !this.disabled && (h("button", { key: 'bd5e5f6df6d87c0243390c5e39f0fd4e401d347c', type: "button", class: "multiselect-clear", onClick: this.handleClearAll, "aria-label": "Clear all", tabIndex: -1 }, h("svg", { key: 'ec5e02d4efe51fee37de296a3e9219638886fcf1', viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("path", { key: '37a295fe1eaf777494b94994c42dcfaf6ebc18a4', d: "M4 4l8 8M12 4l-8 8" })))), h("span", { key: '570ab6b1808001f51ae005557aa57780bd6ed27a', class: "multiselect-arrow" }, h("svg", { key: '418a5e6d237994247dc052b80fae2544aef32053', viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("path", { key: '3062461aa7c73439a8ff2a05e413f763984b0665', d: "M4 6l4 4 4-4" }))))), this.searchable && this.open && (h("div", { key: '33a55647b1d73a0ab87b5517194da8cff5e398fc', class: "multiselect-search", slot: "header" }, h("le-string-input", { key: '2992c9500610e433da67767b6e02115f26731305', mode: "default", inputRef: el => (this.inputEl = el), class: "search-input", placeholder: "Search...", value: this.searchQuery, onInput: this.handleSearchInput })))), this.name &&
301
- this.value.map(val => (h("input", { type: "hidden", name: this.name, value: val.toString(), key: val.toString() }))), atMaxSelections && (h("span", { key: '864313565f2b263fd65df446f6dc899511e65b58', class: "multiselect-status" }, "Maximum ", this.maxSelections, " selections"))));
300
+ }, tabIndex: this.disabled ? -1 : 0, role: "combobox", "aria-haspopup": "listbox", "aria-expanded": this.open ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : undefined, onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown }, this.renderTags(), h("div", { key: 'be629671c75d408127edb480df54c6649e28ca2a', class: "multiselect-actions" }, hasSelections && !this.disabled && (h("button", { key: '67f4c2152e4b2f8f52b8b98093fbb238571f6105', type: "button", class: "multiselect-clear", onClick: this.handleClearAll, "aria-label": "Clear all", tabIndex: -1 }, h("svg", { key: '5894bfb10a310a29f21c865323b2175cde05173e', viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("path", { key: '50f7445b3627bf110a899dbba2b5f7244d706a49', d: "M4 4l8 8M12 4l-8 8" })))), h("span", { key: '58ef10834f74ce5b21b675b47a4c2a96df4bd173', class: "multiselect-arrow" }, h("svg", { key: '74a20681e12aff0295c219c8ff8f953908aa9a94', viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("path", { key: '8e48c5333f7f3035e4c4f80f7c3507e5d3d4caaa', d: "M4 6l4 4 4-4" }))))), this.searchable && this.open && (h("div", { key: '906f9596d6a0da2840d534570d38ea008d7cdb4b', class: "multiselect-search", slot: "header" }, h("le-string-input", { key: 'ccd7f1b2594be3440adb16ef5c001beaa5547396', mode: "default", inputRef: el => (this.inputEl = el), class: "search-input", placeholder: "Search...", value: this.searchQuery, onInput: this.handleSearchInput })))), this.name &&
301
+ this.value.map(val => (h("input", { type: "hidden", name: this.name, value: val.toString(), key: val.toString() }))), atMaxSelections && (h("span", { key: 'c329c06d0e00a1516c9d3323ad4a83b81a205f13', class: "multiselect-status" }, "Maximum ", this.maxSelections, " selections"))));
302
302
  }
303
303
  static get watchers() { return {
304
304
  "value": ["handleValueChange"],
@@ -195,7 +195,7 @@ const LeNumberInput$1 = /*@__PURE__*/ proxyCustomElement(class LeNumberInput ext
195
195
  this.emitChange();
196
196
  };
197
197
  render() {
198
- return (h("le-component", { key: '966dacf86b59482b00576de5d86afdd470856250', component: "le-number-input", hostClass: classnames({ 'disabled': this.disabled }) }, h("div", { key: '14ee10eb15c30d17fcf3d2c1a8bb2a7bfafd4c2a', class: "le-input-wrapper" }, this.label && (h("label", { key: '28ea233b530e918f26930e246deeccae21f13886', class: "le-input-label", htmlFor: this.name }, this.label)), h("div", { key: '8e67e90f7402c52a2965404f4859ddb06c484aa5', class: classnames('le-input-container', { 'has-error': !this.isValid }) }, this.iconStart && (h("span", { key: '187589859d48c968e6264453359ea130187c0921', class: "icon-start" }, this.iconStart)), h("input", { key: '2c62909f0f4fb0897ed62c9bed65f4082fa1bf84', id: this.name, type: "number", name: this.name, placeholder: this.placeholder, min: this.min, max: this.max, step: this.step, value: this.value, disabled: this.disabled, readOnly: this.readonly, required: this.required, onInput: this.handleInput, onChange: this.handleChange, onKeyDown: this.handleKeyDown, onWheel: this.handleWheel }), this.showSpinners && (h("div", { key: 'dd5c86f866993b70be997631581a18d8368f2c7f', class: "le-input-controls" }, h("le-button", { key: '2e2828b3bf5f49eddd18bea1815e6ef834cefb63', mode: "default", variant: "clear", size: "small", "icon-only": true, class: "le-input-control-btn", onClick: this.increment, disabled: this.disabled || this.readonly || (this.max !== undefined && this.value >= this.max), tabindex: "-1" }, h("span", { key: '7ba187623d069ced9d0b93c99bf897c6bc0356f5', slot: "icon-only" }, "\u2191")), h("le-button", { key: 'bd29e0d6aa0370cf0523a2e1828d101dee3ca1ce', mode: "default", variant: "clear", size: "small", "icon-only": true, class: "le-input-control-btn", onClick: this.decrement, disabled: this.disabled || this.readonly || (this.min !== undefined && this.value <= this.min), tabindex: "-1" }, h("span", { key: 'd78fa929daf6a56aaba8de5115f7eb73b5c201ab', slot: "icon-only" }, "\u2193"))))), !this.isValid && h("div", { key: 'ad66111e3eb326f9ab9b6dd00244001e3dd659b8', class: "le-input-error" }, this.validationMessage), h("div", { key: '261f01e9a7f1cfff57852bd46bc29d69d7fea0ed', class: "le-input-description" }, h("le-slot", { key: 'cbb6decae4d264620de64280cbfafc8bb6d0e755', name: "description", type: "text", tag: "p", label: "Description" }, h("slot", { key: '2d711826f9e2f8e1a41905553fc425360dc5069e', name: "description" }))))));
198
+ return (h("le-component", { key: '38670cabc16dd9a966a5f430e1d4d5e2fc618744', component: "le-number-input", hostClass: classnames({ 'disabled': this.disabled }) }, h("div", { key: '473450ef637fa744c7a83416beabd87fe9540436', class: "le-input-wrapper" }, this.label && (h("label", { key: 'c74d4166c1925f02c743dc1250b574a679415ae8', class: "le-input-label", htmlFor: this.name }, this.label)), h("div", { key: '9066bfe0737700717bf902f46a6a6fa51b22a3a1', class: classnames('le-input-container', { 'has-error': !this.isValid }) }, this.iconStart && (h("span", { key: 'dcabeda7256fc25dc8bacd4ecbd2cc2941ea02d7', class: "icon-start" }, this.iconStart)), h("input", { key: '85d9040a37f4f5cf5c8c403dd58a3b1e9947d21d', id: this.name, type: "number", name: this.name, placeholder: this.placeholder, min: this.min, max: this.max, step: this.step, value: this.value, disabled: this.disabled, readOnly: this.readonly, required: this.required, onInput: this.handleInput, onChange: this.handleChange, onKeyDown: this.handleKeyDown, onWheel: this.handleWheel }), this.showSpinners && (h("div", { key: '9a197fc41798ff09b5618f5fb901b51ca2581d28', class: "le-input-controls" }, h("le-button", { key: '8befc86b373c03417ba87110d4092c8f6bf2f19c', mode: "default", variant: "clear", size: "small", "icon-only": true, class: "le-input-control-btn", onClick: this.increment, disabled: this.disabled || this.readonly || (this.max !== undefined && this.value >= this.max), tabindex: "-1" }, h("span", { key: '70b53c26b9e061cd747bd1ccaa39d14c4ac69b68', slot: "icon-only" }, "\u2191")), h("le-button", { key: '3f9f65048977127cc2faaf911b9db6861005e17d', mode: "default", variant: "clear", size: "small", "icon-only": true, class: "le-input-control-btn", onClick: this.decrement, disabled: this.disabled || this.readonly || (this.min !== undefined && this.value <= this.min), tabindex: "-1" }, h("span", { key: 'ecbdfd9a72b357b1daca7be54ba5188795a44929', slot: "icon-only" }, "\u2193"))))), !this.isValid && h("div", { key: '41b7315c03d7caba36a535375e6a4774f9ff82b9', class: "le-input-error" }, this.validationMessage), h("div", { key: '3eda10b4e02add4dd780f6b51b5fd9565882dba8', class: "le-input-description" }, h("le-slot", { key: '7f9d9e5299dde3bc2f003687830f6d26d9f234b1', name: "description", type: "text", tag: "p", label: "Description" }, h("slot", { key: 'a80e340b5ba3c4b84e6d684156ccdfae106d6fc0', name: "description" }))))));
199
199
  }
200
200
  static get watchers() { return {
201
201
  "value": ["valueChanged"]
@@ -619,12 +619,12 @@ const LePopover = /*@__PURE__*/ proxyCustomElement(class LePopover extends HTMLE
619
619
  popoverStyles.minWidth = this.minWidth;
620
620
  if (this.maxWidth)
621
621
  popoverStyles.maxWidth = this.maxWidth;
622
- return (h(Host, { key: '53b5f7b67ed2bff9b575fe74877b9e01a3f93cb5', "trigger-full-width": this.triggerFullWidth }, h("div", { key: 'c788cc07ee7c3fc925b8f82b4b992423a8878a93', class: classnames('le-popover-trigger', {
622
+ return (h(Host, { key: '542d4ab391a9b176d110fe00c0dd61f2c46d73ef', "trigger-full-width": this.triggerFullWidth }, h("div", { key: '2248ab763d65e8a9150e62644452085f01c6a238', class: classnames('le-popover-trigger', {
623
623
  'le-popover-trigger-full-width': this.triggerFullWidth,
624
- }), ref: el => (this.triggerEl = el), onClick: this.handleTriggerClick, part: "trigger" }, h("slot", { key: '1014de044c0c01f8143ae5cb3ad517f0d0daf6ff', name: "trigger" }, h("button", { key: '065ec5a55eacd869154463dd02f80346770eafb4', type: "button", class: "le-popover-default-trigger" }, h("span", { key: 'd3fb5d8e09fa2ecdd317a2529e43e274b8350306' }, "\u2295")))), h("div", { key: 'fd9a333a7022582c80132e50d7f2b0f4a8cccbbc', id: this.uniqueId, class: "le-popover-content",
624
+ }), ref: el => (this.triggerEl = el), onClick: this.handleTriggerClick, part: "trigger" }, h("slot", { key: '9d9a5f05f4b9f1b11f1fcbb09d29f0c1e36a2cd6', name: "trigger" }, h("button", { key: 'ed573daefaffb7b1effb3c7891722aa40e4b606e', type: "button", class: "le-popover-default-trigger" }, h("span", { key: '61f00ea9761935224e1529adc3b102b85efd4f33' }, "\u2295")))), h("div", { key: 'bf447493c9c7dedb7f2ae7083c80a7a2d06aebe0', id: this.uniqueId, class: "le-popover-content",
625
625
  // Always use manual mode so nested popovers can be open together.
626
626
  // We implement click-outside and Escape handling ourselves.
627
- popover: "manual", ref: el => (this.popoverEl = el), style: popoverStyles, "data-fallback-open": this.supportsPopoverApi ? undefined : String(this.open) }, (this.popoverTitle || this.showClose) && (h("div", { key: 'a78484f785a6c1f890a01b9e10c46fd8583f0ae8', class: "le-popover-header" }, this.popoverTitle && h("span", { key: 'd4ecd774aa49b8ca3d50340a426e42ea78b3eac1', class: "le-popover-title" }, this.popoverTitle), this.showClose && (h("button", { key: 'fe6941fd4116d78812a1564cf0d8fa3d8dcc1264', type: "button", class: "le-popover-close", onClick: () => this.hide(), "aria-label": "Close" }, "\u00D7")))), h("div", { key: '5ba9a2dac4523c98c8ce6f15bbba340500aa18c2', class: "le-popover-body", part: "content" }, h("slot", { key: '72913f121df20bdc59ec7ed1ac5781f6e665ab73' })))));
627
+ popover: "manual", ref: el => (this.popoverEl = el), style: popoverStyles, "data-fallback-open": this.supportsPopoverApi ? undefined : String(this.open) }, (this.popoverTitle || this.showClose) && (h("div", { key: '50fe79bb415b5de315aea7f766d57ae911a90343', class: "le-popover-header" }, this.popoverTitle && h("span", { key: 'd809f12c512197bd34ca215a05820b533f4d8734', class: "le-popover-title" }, this.popoverTitle), this.showClose && (h("button", { key: '2baee3e910ad65243a66eee2bba1c46d9fa628b4', type: "button", class: "le-popover-close", onClick: () => this.hide(), "aria-label": "Close" }, "\u00D7")))), h("div", { key: 'eacad60a20becde7f4f8b9fa01d195dd3f4c08f1', class: "le-popover-body", part: "content" }, h("slot", { key: 'f8aa2edd170ee039d5277a1b9ebc8ee077a1a9dc' })))));
628
628
  }
629
629
  static get style() { return lePopoverCss(); }
630
630
  }, [769, "le-popover", {
@@ -94,7 +94,7 @@ const LeRoundProgress$1 = /*@__PURE__*/ proxyCustomElement(class LeRoundProgress
94
94
  return (h("svg", { viewBox: this.getViewBox(), class: "round-progress" }, paths));
95
95
  }
96
96
  render() {
97
- return (h("div", { key: '254325e88bf931a52415ddea51775700c404bd86', class: "round-progress--container" }, this.getPaths(), h("svg", { key: '9680797956195b3bdb09162df9227f11757608e5', viewBox: this.getViewBox(), class: "round-progress round-progress--progress" }, h("path", { key: 'd0c9fbd69f34619a252eade6f8ee800757fa9a76', class: "round-progress--circle", "stroke-dasharray": this.getStrokeDashArray(), d: this.getPath() })), h("slot", { key: '99d330f846846ef200404db257596f15dd18e08e' })));
97
+ return (h("div", { key: 'dd678c7e3ff93c60f9eb6c2c09cbf1eab963ec69', class: "round-progress--container" }, this.getPaths(), h("svg", { key: '4a7fc03af132741d9bcddb10d94db800a51e53bc', viewBox: this.getViewBox(), class: "round-progress round-progress--progress" }, h("path", { key: 'd3091d22a5c5e696d0e58748f880471d99f4ac4d', class: "round-progress--circle", "stroke-dasharray": this.getStrokeDashArray(), d: this.getPath() })), h("slot", { key: '8dabb64461b68928e1e58c48dcaec84f504d4639' })));
98
98
  }
99
99
  static get watchers() { return {
100
100
  "value": ["updateValue"],
@@ -107,7 +107,7 @@ const LeScrollProgress$1 = /*@__PURE__*/ proxyCustomElement(class LeScrollProgre
107
107
  }
108
108
  render() {
109
109
  const width = `${this.progress * 100}%`;
110
- return (h(Host, { key: '7cfe453e9738eeff5d967cd26f5635ca5b17f986' }, h("div", { key: '39422f65b3695b849d7fb29a23914fb1d84159d4', class: "track", part: "track", "aria-hidden": "true" }, h("div", { key: '4848b9b07e898d21fe68882af5763e9c8c37bafd', class: "fill", part: "fill", style: { width } }))));
110
+ return (h(Host, { key: '7a93dbfd8b14e5e581ff1480ad0e657f8f33bcf4' }, h("div", { key: 'fe4ff14af541e2a610d0b32605aaadb87ccea957', class: "track", part: "track", "aria-hidden": "true" }, h("div", { key: 'f46a09358bf77a7cff64deafa63702360a686c6a', class: "fill", part: "fill", style: { width } }))));
111
111
  }
112
112
  static get watchers() { return {
113
113
  "trackScrollProgress": ["onTrackChange"]
@@ -234,7 +234,7 @@ const LeSegmentedControl$1 = /*@__PURE__*/ proxyCustomElement(class LeSegmentedC
234
234
  'full-width': fullWidth,
235
235
  'disabled': disabled,
236
236
  };
237
- return (h(Host, { key: '8cf5102c9418447bc6648a367261d1ebe9dd8e96', class: `overflow-${this.overflow}` }, h("le-component", { key: '035ed7391d0ca24d020383a8e03fee4e366c1216', component: "le-segmented-control" }, h("div", { key: '7273688a85a0f3b4b4fabb5e754bcd1b69adefb3', class: classes, ref: el => (this.containerRef = el), role: "radiogroup", part: "container", onKeyDown: this.handleKeyDown, tabIndex: 0 }, segmentConfigs.map(option => {
237
+ return (h(Host, { key: 'dfe7d637e07af470756a57e8878e455c472a2790', class: `overflow-${this.overflow}` }, h("le-component", { key: '5ffa309951b8f509fe0b0db09a9273256ec5a1b5', component: "le-segmented-control" }, h("div", { key: 'a448e9be4011230c689a4bab5963f1588496c1ba', class: classes, ref: el => (this.containerRef = el), role: "radiogroup", part: "container", onKeyDown: this.handleKeyDown, tabIndex: 0 }, segmentConfigs.map(option => {
238
238
  const optValue = this.getOptionValue(option);
239
239
  const isSelected = optValue === value;
240
240
  const isDisabled = option.disabled || disabled;
@@ -131,7 +131,7 @@ const LeStack$1 = /*@__PURE__*/ proxyCustomElement(class LeStack extends HTMLEle
131
131
  });
132
132
  // Slot style for admin mode - make items display in the same direction
133
133
  const slotStyle = `display: flex; flex-direction: ${this.getFlexDirection()}; gap: ${this.gap || 'var(--le-space-md)'}; flex-wrap: ${this.wrap ? 'wrap' : 'nowrap'}; justify-content: ${this.getJustifyContent()}; align-items: ${this.getAlignItems()};`;
134
- return (h("le-component", { key: 'b9b70eea315cf0f3bfb21e4895ee55d8ea29e699', component: "le-stack", hostClass: hostClass }, h("div", { key: 'b4f44316ffffb7237743d208fdce5ac0b8641229', class: "stack", part: "stack", style: style }, h("le-slot", { key: 'c7ea0239e08d93f109a4e5a22c0424bd85fec678', name: "", description: `Items arranged ${this.direction}ly${this.maxItems ? ` (max ${this.maxItems})` : ''}`, type: "slot", "allowed-components": "le-text,le-box,le-card,le-button,le-stack", slotStyle: slotStyle }, h("slot", { key: '2dfcdc5bd6219c681245ab0293faa78b51aec0db' })))));
134
+ return (h("le-component", { key: '465b00b5165b3c19f0043f5ffaab5081464692dc', component: "le-stack", hostClass: hostClass }, h("div", { key: '1787122eea7ee7f2986581ef8ab3c65068ef799f', class: "stack", part: "stack", style: style }, h("le-slot", { key: '5be191bf1ea7d4edc2f27a6f97e57a038dc8cc94', name: "", description: `Items arranged ${this.direction}ly${this.maxItems ? ` (max ${this.maxItems})` : ''}`, type: "slot", "allowed-components": "le-text,le-box,le-card,le-button,le-stack", slotStyle: slotStyle }, h("slot", { key: '9b11206293f60733a0c59de456513088373ce245' })))));
135
135
  }
136
136
  static get style() { return leStackDefaultCss(); }
137
137
  }, [769, "le-stack", {
@@ -231,7 +231,7 @@ const LeTabBar$1 = /*@__PURE__*/ proxyCustomElement(class LeTabBar extends HTMLE
231
231
  'position-top': this.position === 'top',
232
232
  'position-bottom': this.position === 'bottom',
233
233
  };
234
- return (h(Host, { key: 'd8a7700cb1c84cb2d8039cd819f14205fb7dc416', class: classes }, h("le-component", { key: '9c25d330964d24fc535dc7ec137e703c2a673857', component: "le-tab-bar" }, h("div", { key: '38f6cf8830098ae6dfb3a4a3c4beb88757f4e19d', class: "tablist", role: "tablist", "aria-orientation": "horizontal", part: "tablist", onKeyDown: this.handleKeyDown }, h("le-slot", { key: 'f255d56190da910945689a12d9ac72ff2fe06610', name: "", type: "slot", allowedComponents: "le-tab" }, tabConfigs.map(tab => {
234
+ return (h(Host, { key: '71b1a2d80884dc9a494edf55b28bfa178b44f284', class: classes }, h("le-component", { key: 'a09f1adff893b3b1f7c2f2ea0115133df906153f', component: "le-tab-bar" }, h("div", { key: 'f9b3046469fcaf0a3164fc5bb2038d54916dcb83', class: "tablist", role: "tablist", "aria-orientation": "horizontal", part: "tablist", onKeyDown: this.handleKeyDown }, h("le-slot", { key: '2a4ef6c858a7a0c8d9d2942d68183887153101c3', name: "", type: "slot", allowedComponents: "le-tab" }, tabConfigs.map(tab => {
235
235
  const value = this.getTabValue(tab);
236
236
  const isSelected = value === selected;
237
237
  return (h("le-tab", { key: value, class: "tab", role: "tab", variant: "icon-only", label: tab.label, value: tab.value, icon: tab.icon, href: tab.href, selected: isSelected, disabled: tab.disabled, showLabel: this.showLabels, size: size, part: isSelected ? 'tab tab-active' : 'tab', "aria-selected": isSelected ? 'true' : 'false', "aria-disabled": tab.disabled ? 'true' : undefined, tabIndex: -1, onClick: () => this.handleTabClick(tab) }, h("span", { class: "tab-label" }, tab.label)));