@luzmo/lucero 1.0.1-alpha.19 → 1.0.1-alpha.20

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.
@@ -15,14 +15,14 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- import { VIRTUALIZE_AS_OF_NUM_ITEMS as A } from "../options/index.js";
19
- import { T as f, b as V, c as R, $ as N, h as K } from "../luzmo-icons-CiSek5iM.js";
20
- import { r as U, E as v, x as n, B as W, n as c } from "../base-CFWO09N1.js";
18
+ import { VIRTUALIZE_AS_OF_NUM_ITEMS as D } from "../options/index.js";
19
+ import { T as f, b as A, c as V, $ as R, h as N } from "../luzmo-icons-CiSek5iM.js";
20
+ import { r as K, E as b, x as i, B as U, n as c } from "../base-CFWO09N1.js";
21
21
  import { r as x } from "../state-DwIwYPvt.js";
22
22
  import { e as z } from "../query-D_KR_GUc.js";
23
- import { e as H } from "../class-map-CGfNk3Ee.js";
23
+ import { e as W } from "../class-map-CGfNk3Ee.js";
24
24
  import { o as y } from "../if-defined-DULpqYwi.js";
25
- import { M as j, I as G, s as L } from "../strategies-CUMLHtQI.js";
25
+ import { M as H, I as j, s as G } from "../strategies-Bk97oVn1.js";
26
26
  import { F as Z } from "../focusable-C5JjRZmT.js";
27
27
  import { D as J } from "../dependency-manger-CO-VPlqq.js";
28
28
  import { P as Q } from "../pending-state-B2wWssTo.js";
@@ -32,13 +32,13 @@ import "../overlay/index.js";
32
32
  import "../popover/index.js";
33
33
  import "../progress-circle/index.js";
34
34
  import "../tooltip/index.js";
35
- const D = () => {
35
+ const F = () => {
36
36
  if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
37
37
  const d = document.createElement("style");
38
38
  d.setAttribute("data-luzmo-vars", ""), d.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-informative-color: #1a77e9;--luzmo-informative-color-rgb: 26, 119, 233;--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}', document.head.appendChild(d);
39
39
  }
40
40
  };
41
- D();
41
+ F();
42
42
  const Y = (d, e) => {
43
43
  let o = getComputedStyle(d).getPropertyValue(e);
44
44
  for (; !o && d.parentElement; )
@@ -46,28 +46,28 @@ const Y = (d, e) => {
46
46
  return o.trim();
47
47
  }, ee = ':host{font-family:var(--luzmo-select-font-family, var(--select-font-family));font-size:var(--luzmo-select-font-size, var(--select-font-size))}#button{cursor:pointer;-webkit-user-select:none;user-select:none;font-family:var(--luzmo-button-font-family, var(--luzmo-font-family));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:var(--luzmo-button-line-height, var(--luzmo-line-height, 1.3));text-transform:none;vertical-align:top;-webkit-appearance:button;transition:background var(--luzmo-button-animation-duration, var(--luzmo-animation-duration)) ease-out,border-color var(--luzmo-button-animation-duration, var(--luzmo-animation-duration)) ease-out,color var(--luzmo-button-animation-duration, var(--luzmo-animation-duration)) ease-out,box-shadow var(--luzmo-button-animation-duration, var(--luzmo-animation-duration)) ease-out;justify-content:center;align-items:center;margin:0;-webkit-text-decoration:none;text-decoration:none;display:inline-flex;position:relative;overflow:visible}#button::-moz-focus-inner{border-style:none;padding:0}#button:focus{outline:none}#icon{margin-inline-end:var(--luzmo-select-spacing-text-to-icon, var(--select-spacing-text-to-icon));font-size:var(--luzmo-select-font-size, var(--select-font-size))}@media (forced-colors: active){:host{--highcontrast-select-focus-indicator-color: Highlight;--highcontrast-select-border-color-default: ButtonBorder;--highcontrast-select-border-color-hover: Highlight;--highcontrast-select-border-color-disabled: GrayText;--highcontrast-select-content-color-default: ButtonText;--highcontrast-select-content-color-disabled: GrayText;--highcontrast-select-background-color: ButtonFace}#button:focus-visible{--highcontrast-select-border-color-hover: ButtonText}#button .label,#button:after{forced-color-adjust:none}}#button{box-sizing:border-box;max-inline-size:100%;min-inline-size:calc(var(--select-minimum-width-multiplier) * var(--luzmo-select-button-block-size, var(--select-button-block-size)));block-size:var(--luzmo-select-button-block-size, var(--select-button-block-size));border-width:var(--luzmo-select-button-border-width, var(--select-button-border-width));border-radius:var(--luzmo-select-button-border-radius, var(--select-button-border-radius));box-shadow:var(--luzmo-select-button-box-shadow, var(--select-button-box-shadow));transition:background-color var(--luzmo-select-animation-duration, var(--select-animation-duration)),box-shadow var(--luzmo-select-animation-duration, var(--select-animation-duration)),border-color var(--luzmo-select-animation-duration, var(--select-animation-duration)) ease-in-out;color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-default, var(--select-font-color-default)));background-color:var(--highcontrast-select-background-color, var(--luzmo-select-background-color-default, var(--select-background-color-default)));border-style:solid;border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-color-default, var(--select-border-color-default)));margin-block-start:var(--luzmo-select-spacing-label-to-select, var(--select-spacing-label-to-select));padding-block:0;padding-inline-start:var(--luzmo-select-spacing-edge-to-text, var(--select-spacing-edge-to-text));padding-inline-end:var(--luzmo-select-spacing-edge-to-disclosure-icon, var(--select-spacing-edge-to-disclosure-icon));display:flex}#button:after{pointer-events:none;content:"";block-size:calc(100% + var(--luzmo-select-focus-indicator-gap, var(--select-focus-indicator-gap)) * 2 + var(--luzmo-select-button-border-width, var(--select-button-border-width)) * 2);inline-size:calc(100% + var(--luzmo-select-focus-indicator-gap, var(--select-focus-indicator-gap)) * 2 + var(--luzmo-select-button-border-width, var(--select-button-border-width)) * 2);border-style:solid;border-width:var(--luzmo-select-focus-indicator-width, var(--select-focus-indicator-width));border-radius:calc(var(--luzmo-select-button-border-radius, var(--select-button-border-radius)) + var(--luzmo-select-focus-indicator-gap, var(--select-focus-indicator-gap)) + var(--luzmo-select-button-border-width, var(--select-button-border-width)));border-color:#0000;margin-block-start:calc((var(--luzmo-select-focus-indicator-gap, var(--select-focus-indicator-gap)) + var(--luzmo-select-focus-indicator-width, var(--select-focus-indicator-width)) + var(--luzmo-select-button-border-width, var(--select-button-border-width))) * -1);margin-inline-start:calc((var(--luzmo-select-focus-indicator-gap, var(--select-focus-indicator-gap)) + var(--luzmo-select-focus-indicator-width, var(--select-focus-indicator-width)) + var(--luzmo-select-button-border-width, var(--select-button-border-width))) * -1);position:absolute;inset-block:0;inset-inline:0}#button:active{background-color:var(--highcontrast-select-background-color, var(--luzmo-select-background-color-active, var(--select-background-color-active)));border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-active, var(--select-border-color-active)))}#button:active:after{border-color:#0000}#button.placeholder:active .label{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-active, var(--select-font-color-active)))}#button:focus-visible{background-color:var(--highcontrast-select-background-color, var(--luzmo-select-background-color-key-focus, var(--select-background-color-key-focus)));border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-color-key-focus, var(--select-border-color-key-focus)));color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-key-focus, var(--select-font-color-key-focus)));outline:none}#button:focus-visible:after{border-color:var(--highcontrast-select-focus-indicator-color, var(--luzmo-select-focus-indicator-color, var(--select-focus-indicator-color)))}#button.placeholder:focus-visible{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-key-focus, var(--select-font-color-key-focus)))}#button:focus-visible .disclosure-icon,#button:focus-visible .clear-icon{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-icon-color-key-focus, var(--select-icon-color-key-focus)))}:host([open]) #button:not(:disabled,.is-disabled){color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-default-open, var(--select-font-color-default-open)));background-color:var(--highcontrast-select-background-color, var(--luzmo-select-background-color-default-open, var(--select-background-color-default-open)));border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-default-open, var(--select-border-color-default-open)))}:host([open]) #button:not(:disabled,.is-disabled) .disclosure-icon,:host([open]) #button:not(:disabled,.is-disabled) .clear-icon{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-icon-color-default-open, var(--select-icon-color-default-open)))}:host([invalid]) #button:not(:disabled,.is-disabled){border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-color-error-default, var(--select-border-color-error-default)))}:host([invalid]) #button:not(:disabled,.is-disabled) .validation-icon{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-icon-color-error, var(--select-icon-color-error)))}:host([invalid]) #button:not(:disabled,.is-disabled):active{border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-color-error-active, var(--select-border-color-error-active)))}:host([invalid][open]) #button:not(:disabled,.is-disabled){border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-color-error-default-open, var(--select-border-color-error-default-open)))}:host([invalid]) #button:not(:disabled,.is-disabled):focus-visible{border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-color-error-key-focus, var(--select-border-color-error-key-focus)))}:host([pending]) #button .disclosure-icon,:host([pending]) #button .clear-icon{color:var(--highcontrast-select-content-color-disabled, var(--luzmo-select-icon-color-disabled, var(--select-icon-color-disabled)))}.icon{flex-shrink:0}.label{white-space:nowrap;font-size:var(--luzmo-select-font-size, var(--select-font-size));line-height:var(--luzmo-select-button-line-height, var(--select-button-line-height));font-weight:var(--luzmo-select-font-weight, var(--select-font-weight));text-overflow:ellipsis;text-align:start;flex:auto;overflow:hidden}.label.placeholder{font-weight:var(--luzmo-select-placeholder-font-weight, var(--select-font-weight));font-style:var(--luzmo-select-placeholder-font-style, var(--select-placeholder-font-style));transition:color var(--luzmo-select-animation-duration, var(--select-animation-duration)) ease-in-out;color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-default, var(--select-font-color-default)))}.label.placeholder:active{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-active, var(--select-font-color-active)))}.clear-icon,.disclosure-icon{vertical-align:top;transition:color var(--luzmo-select-animation-duration, var(--select-animation-duration)) ease-out;color:var(--highcontrast-select-content-color-default, var(--luzmo-select-icon-color-default, var(--select-icon-color-default)));flex-shrink:0;display:inline-block;position:relative}.disclosure-icon{margin-inline-start:var(--luzmo-select-spacing-icon-to-disclosure-icon, var(--select-spacing-icon-to-disclosure-icon))}.clear-icon{margin-inline-start:var(--luzmo-select-spacing-icon-to-clear-icon, var(--select-spacing-icon-to-clear-icon))}.disclosure-icon:active{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-icon-color-active, var(--select-icon-color-active)))}luzmo-progress-circle,.validation-icon{margin-inline-start:var(--luzmo-select-spacing-text-to-icon, var(--select-spacing-text-to-icon))}.icon-container{display:flex;position:relative;height:100%;align-items:center;font-size:var(--luzmo-select-disclosure-icon-size, var(--select-disclosure-icon-size))}.icon-container.disclosure-icon{margin-inline-end:0}.label~.disclosure-icon,.label~.clear-icon{margin-inline-start:var(--luzmo-select-spacing-text-to-icon, var(--select-spacing-text-to-icon))}:host([quiet]) #button{inline-size:auto;min-inline-size:0;padding-inline:var(--luzmo-select-spacing-edge-to-text-quiet, var(--select-spacing-edge-to-text-quiet));color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-default, var(--select-font-color-default)));background-color:initial;background-color:var(--highcontrast-select-background-color, transparent);border:none;border-radius:0;box-shadow:none;margin-block-start:calc(var(--luzmo-select-spacing-label-to-select-quiet, var(--select-spacing-label-to-select-quiet)) + 1px)}:host([quiet]) #button.label-inline{margin-block-start:0}:host([quiet]) #button .disclosure-icon{margin-inline-end:var(--luzmo-select-spacing-edge-to-disclosure-icon-quiet, var(--select-spacing-edge-to-disclosure-icon-quiet))}:host([quiet]) #button:after{block-size:auto;inline-size:auto;border:none}@media (hover: hover){#button:hover{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-hover, var(--select-font-color-hover)));background-color:var(--highcontrast-select-background-color, var(--luzmo-select-background-color-hover, var(--select-background-color-hover)));border-color:var(--highcontrast-select-border-color-hover, var(--luzmo-select-border-color-hover, var(--select-border-color-hover)))}#button:hover .disclosure-icon,#button:hover .clear-icon{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-icon-color-hover, var(--select-icon-color-hover)))}#button:hover .clear-icon:hover{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-clear-icon-color-hover, var(--select-icon-color-focus)))}:host([open]):not([quiet]) #button:not(:disabled,.is-disabled):hover{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-hover-open, var(--select-font-color-hover-open)));background-color:var(--highcontrast-select-background-color, var(--luzmo-select-background-color-hover-open, var(--select-background-color-hover-open)));border-color:var(--highcontrast-select-border-color-hover, var(--luzmo-select-border-color-hover-open, var(--select-border-color-hover-open)))}:host([open]) #button:not(:disabled,.is-disabled):hover .disclosure-icon,:host([open]) #button:not(:disabled,.is-disabled):hover .clear-icon{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-icon-color-hover-open, var(--select-icon-color-hover-open)))}:host([invalid]) #button:not(:disabled,.is-disabled):hover{border-color:var(--highcontrast-select-border-color-hover, var(--luzmo-select-border-color-error-hover, var(--select-border-color-error-hover)))}:host([invalid][open]) #button:not(:disabled,.is-disabled):hover{border-color:var(--highcontrast-select-border-color-hover, var(--luzmo-select-border-color-error-hover-open, var(--select-border-color-error-hover-open)))}.label.placeholder:hover{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-hover, var(--select-font-color-hover)))}:host([quiet]) #button:hover{background-color:initial;background-color:var(--highcontrast-select-background-color, transparent)!important}}:host([quiet]) #button:focus-visible{background-color:initial;background-color:var(--highcontrast-select-background-color, transparent)}:host([quiet]) #button:focus-visible:after{box-shadow:0 var(--luzmo-select-focus-indicator-width, var(--select-focus-indicator-width)) 0 0 var(--highcontrast-select-focus-indicator-color, var(--luzmo-select-focus-indicator-color, var(--select-focus-indicator-color)));margin:calc((var(--luzmo-select-focus-indicator-gap, var(--select-focus-indicator-gap)) + var(--luzmo-select-button-border-width, var(--select-button-border-width))) * -1) 0;border:none;border-radius:0}:host([quiet][open]) #button,:host([quiet][disabled]) #button#button,:host([quiet]) #button#button:disabled,:host([quiet]) #button:active{background-color:initial;background-color:var(--highcontrast-select-background-color, transparent)}.label-inline{vertical-align:top;display:inline-flex}:host([disabled]) #button,#button:disabled{cursor:default;background-color:var(--highcontrast-select-background-color, var(--luzmo-select-background-color-disabled, var(--select-background-color-disabled)));border-color:#0000;border-color:var(--highcontrast-select-border-color-disabled, transparent);color:var(--highcontrast-select-content-color-disabled, var(--luzmo-select-font-color-disabled, var(--select-font-color-disabled)))}:host([disabled]) #button .icon,:host([disabled]) #button .disclosure-icon,:host([disabled]) #button .clear-icon,:host([disabled]) #button .validation-icon,#button:disabled .icon,#button:disabled .disclosure-icon,#button:disabled .clear-icon,#button:disabled .validation-icon{color:var(--highcontrast-select-content-color-disabled, var(--luzmo-select-icon-color-disabled, var(--select-icon-color-disabled)))}:host([disabled]) #button .label.placeholder,#button:disabled .label.placeholder{color:var(--highcontrast-select-content-color-disabled, var(--luzmo-select-font-color-disabled, var(--select-font-color-disabled)))}#popover{max-width:var(--luzmo-select-popover-max-width, var(--select-popover-max-width));min-width:var(--luzmo-select-popover-min-width, var(--select-popover-min-width));width:var(--luzmo-select-popover-width, var(--select-popover-width))}#search-container{flex:0 0 auto;display:flex;position:relative;border-bottom:var(--luzmo-select-search-container-border-bottom-width, var(--select-search-container-border-bottom-width)) solid var(--luzmo-select-search-container-border-bottom-color, var(--select-search-container-border-bottom-color))}#search-icon{position:absolute;left:var(--luzmo-select-spacing-edge-to-text, var(--select-spacing-edge-to-text));color:var(--luzmo-select-search-icon-color, var(--select-search-icon-color));top:0;bottom:0;pointer-events:none}#search:focus-within+#search-icon,#search:focus+#search-icon{color:var(--luzmo-select-search-icon-color-focus, var(--select-search-icon-color-focus))}#search{width:100%;box-sizing:border-box;color:var(--luzmo-select-search-color, var(--select-search-color));height:var(--luzmo-select-button-block-size, var(--select-button-block-size));padding-left:calc(var(--luzmo-select-spacing-edge-to-text, var(--select-spacing-edge-to-text)) + var(--luzmo-select-spacing-search-icon-to-text, var(--select-spacing-search-icon-to-text)) + var(--luzmo-select-font-size, var(--select-font-size)));padding-right:var(--luzmo-select-spacing-edge-to-text, var(--select-spacing-edge-to-text));font-size:var(--luzmo-select-font-size, var(--select-font-size));line-height:var(--luzmo-select-button-line-height, var(--select-button-line-height));font-weight:var(--luzmo-select-font-weight, var(--select-font-weight));border:var(--luzmo-select-search-input-border-bottom-width, var(--select-search-input-border-bottom-width)) solid var(--luzmo-select-search-input-border-bottom-color, var(--select-search-input-border-bottom-color));outline:none}#no-results{color:var(--luzmo-select-no-results-color, var(--select-no-results-color));font-style:var(--luzmo-select-no-results-font-style, var(--select-no-results-font-style));height:var(--luzmo-select-no-results-height, var(--select-no-results-height));padding-inline:var(--luzmo-select-no-results-spacing-edge-to-text, var(--select-no-results-spacing-edge-to-text));display:flex;align-items:center}:host{--select-popover-max-width: 300px;--select-popover-min-width: 160px;--select-font-family: var(--luzmo-font-family);--select-font-size: var(--luzmo-font-size);--select-spacing-search-icon-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--select-search-icon-color: var(--luzmo-disabled-color);--select-search-icon-color-focus: var(--luzmo-font-color);--select-search-color: var(--luzmo-font-color);--select-search-container-border-bottom-width: var(--luzmo-border-width);--select-search-container-border-bottom-color: var(--luzmo-border-color);--select-search-input-border-bottom-width: var(--luzmo-border-width);--select-search-input-border-bottom-color: transparent;--select-background-color-default: var(--luzmo-background-color);--select-background-color-default-open: var(--luzmo-background-color-hover);--select-background-color-active: var(--luzmo-background-color-down);--select-background-color-hover: var(--luzmo-background-color-hover);--select-background-color-hover-open: var(--luzmo-background-color-down);--select-background-color-key-focus: var(--luzmo-background-color-down);--select-border-color-default: var(--luzmo-border-color);--select-border-color-default-open: var(--luzmo-border-color-hover);--select-border-color-hover: var(--luzmo-border-color);--select-border-color-hover-open: var(--luzmo-border-color-hover);--select-border-color-active: var(--luzmo-border-color);--select-border-color-key-focus: var(--luzmo-border-color);--select-button-border-width: var(--luzmo-border-width);--select-font-weight: var(--luzmo-font-weight);--select-placeholder-font-style: var(--luzmo-font-style);--select-button-line-height: var(--luzmo-line-height);--select-button-box-shadow: 0px 1px 3px 0px rgba(var(--luzmo-border-color-rgb), .06);--select-button-block-size: var(--luzmo-component-height);--select-button-border-radius: var(--luzmo-border-radius);--select-button-border-radius-reset: 0;--select-spacing-edge-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--select-spacing-text-to-icon: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--select-spacing-text-to-icon-inline-end: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--select-spacing-icon-to-disclosure-icon: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--select-spacing-icon-to-clear-icon: var( --select-spacing-icon-to-disclosure-icon );--select-spacing-edge-to-text-quiet: 0px;--select-spacing-label-to-select: 0px;--select-spacing-label-to-select-quiet: calc( -1 * var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--select-spacing-edge-to-disclosure-icon: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--select-spacing-edge-to-disclosure-icon-quiet: 0px;--select-animation-duration: var(--luzmo-animation-duration);--select-font-color-default: var(--luzmo-font-color);--select-font-color-default-open: var(--luzmo-font-color-hover);--select-font-color-hover: var(--luzmo-font-color-hover);--select-font-color-hover-open: var(--luzmo-font-color-down);--select-font-color-active: var(--luzmo-font-color-focus);--select-font-color-key-focus: var(--luzmo-font-color-focus);--select-icon-color-default: var(--luzmo-font-color);--select-icon-color-default-open: var(--luzmo-font-color-hover);--select-icon-color-hover: var(--luzmo-font-color-hover);--select-icon-color-hover-open: var(--luzmo-font-color-hover);--select-icon-color-active: var(--luzmo-font-color-focus);--select-icon-color-key-focus: var(--luzmo-font-color-focus);--select-border-color-error-default: var(--luzmo-negative-color);--select-border-color-error-default-open: var(--luzmo-negative-color-down);--select-border-color-error-hover: var(--luzmo-negative-color-hover);--select-border-color-error-hover-open: var(--luzmo-negative-color-down);--select-border-color-error-active: var(--luzmo-negative-color-down);--select-border-color-error-key-focus: var(--luzmo-negative-color-focus);--select-icon-color-error: var(--luzmo-negative-color);--select-background-color-disabled: var(--luzmo-background-color-disabled);--select-font-color-disabled: var(--luzmo-disabled-color);--select-icon-color-disabled: var(--luzmo-disabled-color);--select-focus-indicator-gap: var(--luzmo-indicator-gap);--select-focus-indicator-width: var(--luzmo-indicator-width);--select-focus-indicator-color: var(--luzmo-indicator-color);--select-disclosure-icon-size: var(--luzmo-font-size-s);--select-no-results-height: var(--select-button-block-size);--select-no-results-color: var(--select-font-color-disabled);--select-no-results-font-style: italic;--select-no-results-spacing-edge-to-text: var(--select-spacing-edge-to-text)}:host([size=s]){--select-button-block-size: var(--luzmo-component-height-s);--select-font-size: var(--luzmo-font-size-s);--select-popover-max-width: 280px;--select-popover-min-width: 140px;--select-spacing-search-icon-to-text: var(--luzmo-spacing-3);--select-spacing-edge-to-text: var(--luzmo-spacing-3);--select-spacing-text-to-icon: var(--luzmo-spacing-3);--select-spacing-text-to-icon-inline-end: var(--luzmo-spacing-3);--select-spacing-icon-to-disclosure-icon: var(--luzmo-spacing-3);--select-spacing-label-to-select-quiet: calc(-1 * var(--luzmo-spacing-3));--select-spacing-edge-to-disclosure-icon: var(--luzmo-spacing-3);--select-disclosure-icon-size: var(--luzmo-font-size-s)}:host([size=l]){--select-button-block-size: var(--luzmo-component-height-l);--select-font-size: var(--luzmo-font-size-l);--select-popover-max-width: 360px;--select-popover-min-width: 220px;--select-spacing-search-icon-to-text: var(--luzmo-spacing-4);--select-spacing-edge-to-text: var(--luzmo-spacing-4);--select-spacing-text-to-icon: var(--luzmo-spacing-4);--select-spacing-text-to-icon-inline-end: var(--luzmo-spacing-4);--select-spacing-icon-to-disclosure-icon: var(--luzmo-spacing-4);--select-spacing-label-to-select-quiet: calc(-1 * var(--luzmo-spacing-4));--select-spacing-edge-to-disclosure-icon: var(--luzmo-spacing-4);--select-disclosure-icon-size: var(--luzmo-font-size)}:host([size=xl]){--select-button-block-size: var(--luzmo-component-height-xl);--select-font-size: var(--luzmo-font-size-xl);--select-popover-max-width: 400px;--select-popover-min-width: 260px;--select-spacing-search-icon-to-text: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--select-spacing-edge-to-text: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--select-spacing-text-to-icon: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--select-spacing-text-to-icon-inline-end: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--select-spacing-icon-to-disclosure-icon: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--select-spacing-label-to-select-quiet: calc( -1 * var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--select-spacing-edge-to-disclosure-icon: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--select-disclosure-icon-size: var(--luzmo-font-size-l)}:host([variant=highlight]) ::slotted(luzmo-option[selected]){--option-highlight-label-content-color: var(--luzmo-primary-inverse-color);--option-label-icon-color-default: var(--luzmo-primary-inverse-color);--menu-checkmark-display: var(--menu-checkmark-display-hidden);padding-inline-start:var(--luzmo-option-label-inline-edge-to-content, var(--option-label-inline-edge-to-content));background-color:var(--luzmo-option-highlight-label-background-color, var(--option-highlight-label-background-color, var(--luzmo-border-color)))}:host{display:inline-flex;vertical-align:top;max-inline-size:100%;inline-size:var(--luzmo-select-inline-size, var(--select-inline-size));min-inline-size:calc(var(--select-minimum-width-multiplier) * var(--luzmo-select-block-size, var(--select-block-size)))}:host([quiet]){width:auto;min-width:0}:host([disabled]){pointer-events:none}#button{width:100%;min-width:100%;max-width:100%}#icon:not([hidden]){display:inline-flex}:host([readonly]) #button{-webkit-user-select:inherit;user-select:inherit}.validation-icon{flex-shrink:0}luzmo-overlay{pointer-events:none}luzmo-options{pointer-events:initial}:host>#no-results,:host>luzmo-options{display:none}:host([focused]:not([quiet])) #button #label.placeholder{color:var(--select-placeholder-text-color-key-focus, var(--alias-placeholder-text-color-hover))}.visually-hidden{border:0;clip:rect(0,0,0,0);clip-path:inset(50%);height:1px;margin:0 -1px -1px 0;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}luzmo-overlay:not(:defined){display:none}#button.remove-focus-ring-safari-hack:focus-visible{background-color:var(--highcontrast-select-background-color, var(--luzmo-select-background-color-default, var(--select-background-color-default)));border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-color-default, var(--select-border-color-default)));color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-default, var(--select-font-color-default)))}#button.remove-focus-ring-safari-hack:after{border:none}#button.remove-focus-ring-safari-hack:focus-visible:after{box-shadow:none}#button.remove-focus-ring-safari-hack:active{background-color:var(--highcontrast-select-background-color, var(--luzmo-select-background-color-default, var(--select-background-color-default)));border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-color-default, var(--select-border-color-default)));color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-default, var(--select-font-color-default)))}';
48
48
  var oe = Object.defineProperty, a = (d, e, o, r) => {
49
- for (var s = void 0, t = d.length - 1, i; t >= 0; t--)
50
- (i = d[t]) && (s = i(e, o, s) || s);
49
+ for (var s = void 0, t = d.length - 1, n; t >= 0; t--)
50
+ (n = d[t]) && (s = n(e, o, s) || s);
51
51
  return s && oe(e, o, s), s;
52
52
  };
53
- const te = () => n`
53
+ const te = () => i`
54
54
  <div class="disclosure-icon icon">
55
- ${f(R, { className: "indicator" })}
55
+ ${f(V, { className: "indicator" })}
56
56
  </div>
57
- `, re = () => n`
57
+ `, re = () => i`
58
58
  <div class="icon-container validation-icon icon">
59
- ${f(N)}
59
+ ${f(R)}
60
60
  </div>
61
- `, le = () => n`
61
+ `, le = () => i`
62
62
  <div class="icon-container search-icon icon" id="search-icon">
63
- ${f(K)}
63
+ ${f(N)}
64
64
  </div>
65
- `, P = "select-option-menu", se = 20;
65
+ `, L = "select-option-menu", se = 20;
66
66
  class l extends X(Z, {
67
67
  noDefaultSize: !0
68
68
  }) {
69
69
  constructor() {
70
- super(), this.disabled = !1, this.focused = !1, this.variant = "checkmarks", this.emphasized = !1, this.invalid = !1, this.search = "auto", this.noWrap = !1, this.retrieving = !1, this.pending = !1, this.clearable = !1, this.pendingLabel = "Pending", this.searchLabel = "Search", this.noResultsLabel = "No results", this.noDataLabel = "No data", this.multipleLabelTemplate = "Selected {count} items", this.open = !1, this.readonly = !1, this.placement = "bottom-end", this.quiet = !1, this.value = [], this.options = [], this.selects = "multiple", this.dependencyManager = new J(this), this.isMobile = new j(this, G), this.listRole = "listbox", this.itemRole = "option", this.hasRenderedOverlay = !1, this._selfManageFocusElement = !1, this.selectionPromise = Promise.resolve(), this.enterKeydownOn = null, this._selectedOptions = [], this.handleSlottableRequest = (e) => {
70
+ super(), this.disabled = !1, this.focused = !1, this.variant = "checkmarks", this.emphasized = !1, this.invalid = !1, this.search = "auto", this.noWrap = !1, this.retrieving = !1, this.pending = !1, this.clearable = !1, this.pendingLabel = "Pending", this.searchLabel = "Search", this.noResultsLabel = "No results", this.noDataLabel = "No data", this.multipleLabelTemplate = "Selected {count} items", this.open = !1, this.readonly = !1, this.placement = "bottom-end", this.quiet = !1, this.value = [], this.options = [], this.selects = "multiple", this.dependencyManager = new J(this), this.isMobile = new H(this, j), this.listRole = "listbox", this.itemRole = "option", this.hasRenderedOverlay = !1, this._selfManageFocusElement = !1, this.selectionPromise = Promise.resolve(), this.enterKeydownOn = null, this._selectedOptions = [], this.handleSlottableRequest = (e) => {
71
71
  }, this.renderAngleIcon = () => te(), this.renderAlertIcon = () => re(), this.handleEnterKeydown = (e) => {
72
72
  if (e.code === "Enter") {
73
73
  if (this.enterKeydownOn) {
@@ -106,15 +106,15 @@ class l extends X(Z, {
106
106
  return;
107
107
  }
108
108
  if (e.preventDefault(), this.selects === "single") {
109
- const t = o === "ArrowRight" ? 1 : -1, i = this.options.findIndex(
110
- (h) => {
111
- var b, m, g;
112
- return ((b = h == null ? void 0 : h.value) == null ? void 0 : b.toString()) === ((g = (m = this.value) == null ? void 0 : m[0]) == null ? void 0 : g.toString());
109
+ const t = o === "ArrowRight" ? 1 : -1, n = this.options.findIndex(
110
+ (p) => {
111
+ var v, m, g;
112
+ return ((v = p == null ? void 0 : p.value) == null ? void 0 : v.toString()) === ((g = (m = this.value) == null ? void 0 : m[0]) == null ? void 0 : g.toString());
113
113
  }
114
114
  );
115
- let u = (this.options.length + i + t) % this.options.length, p = this.options.length;
116
- for (; (s = (r = this.options) == null ? void 0 : r[u]) != null && s.disabled && p; )
117
- p -= 1, u = (this.options.length + u + t) % this.options.length;
115
+ let u = (this.options.length + n + t) % this.options.length, h = this.options.length;
116
+ for (; (s = (r = this.options) == null ? void 0 : r[u]) != null && s.disabled && h; )
117
+ h -= 1, u = (this.options.length + u + t) % this.options.length;
118
118
  this.value = [this.options[u].value], this.dispatchEvent(
119
119
  new CustomEvent("change", {
120
120
  bubbles: !0,
@@ -133,7 +133,7 @@ class l extends X(Z, {
133
133
  * @internal
134
134
  */
135
135
  static get styles() {
136
- return [U(ee)];
136
+ return [K(ee)];
137
137
  }
138
138
  /**
139
139
  * @internal
@@ -187,8 +187,8 @@ class l extends X(Z, {
187
187
  this.readonly || this.strategy && (this.open = !1, this.strategy.open = !1);
188
188
  }
189
189
  bindEvents() {
190
- var e;
191
- (e = this.strategy) == null || e.abort(), this.strategy = this.isMobile.matches ? new L.mobile(this.button, this) : new L.desktop(this.button, this);
190
+ var e, o;
191
+ (e = this.strategy) == null || e.abort(), this.strategy = new G.desktop(this.button, this), (o = this.strategy) != null && o.overlay && (this.strategy.overlay.type = "auto", this.strategy.overlay.placement = this.placement);
192
192
  }
193
193
  connectedCallback() {
194
194
  super.connectedCallback();
@@ -204,17 +204,17 @@ class l extends X(Z, {
204
204
  * @internal
205
205
  */
206
206
  get labelTemplate() {
207
- var p, h, b, m, g, w, k, S, $, E, C, I, O, _, q;
208
- const e = ((p = this._selectedOptions) == null ? void 0 : p.length) === 1 && ((h = this._selectedOptions[0]) == null ? void 0 : h.icon), o = n`<div
207
+ var h, p, v, m, g, w, k, S, $, E, C, I, O, _, q;
208
+ const e = ((h = this._selectedOptions) == null ? void 0 : h.length) === 1 && ((p = this._selectedOptions[0]) == null ? void 0 : p.icon), o = i`<div
209
209
  id="icon"
210
- ?hidden=${typeof this.icons == "string" || ((b = this.value) == null ? void 0 : b.length) > 1 || !e}
210
+ ?hidden=${typeof this.icons == "string" || ((v = this.value) == null ? void 0 : v.length) > 1 || !e}
211
211
  >
212
- ${e ? f(this._selectedOptions[0].icon) : v}
213
- </div>`, r = (T) => T.replaceAll(
212
+ ${e ? f(this._selectedOptions[0].icon) : b}
213
+ </div>`, r = (P) => P.replaceAll(
214
214
  /{([^}]+)}/g,
215
- (M, F) => {
215
+ (T, M) => {
216
216
  var B;
217
- return F === "count" ? String((B = this.value) == null ? void 0 : B.length) : M;
217
+ return M === "count" ? String((B = this.value) == null ? void 0 : B.length) : T;
218
218
  }
219
219
  ), s = {
220
220
  "visually-hidden": this.icons === "only" && ((m = this.value) == null ? void 0 : m.length) > 0,
@@ -222,39 +222,39 @@ class l extends X(Z, {
222
222
  label: !0
223
223
  };
224
224
  let t;
225
- (w = this.value) != null && w.length ? t = this.value.length === 1 ? n`<span
225
+ (w = this.value) != null && w.length ? t = this.value.length === 1 ? i`<span
226
226
  >${((S = (k = this._selectedOptions) == null ? void 0 : k[0]) == null ? void 0 : S.shortLabel) ?? ((E = ($ = this._selectedOptions) == null ? void 0 : $[0]) == null ? void 0 : E.label) ?? ((C = this.value) == null ? void 0 : C[0])}</span
227
- >` : n`<span
227
+ >` : i`<span
228
228
  >${r(this.multipleLabelTemplate)}</span
229
- >` : t = n`
229
+ >` : t = i`
230
230
  <slot name="label" id="label">
231
231
  <span aria-hidden="true"> ${this.label} </span>
232
232
  </slot>
233
233
  `;
234
- const i = (I = this.value) != null && I.length ? n`
234
+ const n = (I = this.value) != null && I.length ? i`
235
235
  <div aria-hidden="true" class="visually-hidden" id="applied-label">
236
236
  ${this.label}
237
237
  <slot name="label"></slot>
238
238
  </div>
239
- ` : n` <span hidden id="applied-label">${this.label}</span> `, u = () => n`
239
+ ` : i` <span hidden id="applied-label">${this.label}</span> `, u = () => i`
240
240
  <div class="icon-container clear-icon icon" @click=${this.clearValue}>
241
- ${f(V)}
241
+ ${f(A)}
242
242
  </div>
243
243
  `;
244
244
  return [
245
- n`
246
- ${((O = this.value) == null ? void 0 : O.length) === 1 ? o : v}
245
+ i`
246
+ ${((O = this.value) == null ? void 0 : O.length) === 1 ? o : b}
247
247
  <div
248
248
  id=${y((_ = this.value) != null && _.length ? "label" : void 0)}
249
- class=${H(s)}
249
+ class=${W(s)}
250
250
  >
251
251
  ${t}
252
252
  </div>
253
- ${i}
254
- ${this.invalid && !this.pending ? n` ${this.renderAlertIcon()} ` : v}
253
+ ${n}
254
+ ${this.invalid && !this.pending ? i` ${this.renderAlertIcon()} ` : b}
255
255
  ${this.pendingStateController.renderPendingState()}
256
- ${this.clearable && !this.readonly && ((q = this.value) == null ? void 0 : q.length) > 0 ? u() : v}
257
- ${this.readonly ? v : this.renderAngleIcon()}
256
+ ${this.clearable && !this.readonly && ((q = this.value) == null ? void 0 : q.length) > 0 ? u() : b}
257
+ ${this.readonly ? b : this.renderAngleIcon()}
258
258
  <slot
259
259
  aria-hidden="true"
260
260
  name="tooltip"
@@ -272,24 +272,25 @@ class l extends X(Z, {
272
272
  }
273
273
  willUpdate(e) {
274
274
  var u;
275
- const o = e.has("open"), r = e.has("value"), s = e.has("options"), t = e.has("selects"), i = e.get("open");
275
+ const o = e.has("open"), r = e.has("value"), s = e.has("options"), t = e.has("selects"), n = e.get("open");
276
276
  t && this.selects === "single" && ((u = this.value) == null ? void 0 : u.length) > 1 && (console.warn(
277
277
  "luzmo-select is being set to a single value given the selects property changed to 'single'"
278
- ), this.value = this.value.slice(0, 1)), o && i === !1 && this.open && this.searchString && (this.searchString = ""), (r || s) && this.setSelectedOptionsFromValue();
278
+ ), this.value = this.value.slice(0, 1)), o && n === !1 && this.open && this.searchString && (this.searchString = ""), (r || s) && this.setSelectedOptionsFromValue();
279
279
  }
280
280
  updated(e) {
281
- var s;
281
+ var s, t;
282
282
  super.updated(e);
283
283
  const o = e.has("options");
284
284
  if (e.has("open") && (this.strategy.open = this.open, this.open === !1 && this.optionsMenu.scrollToTop()), o)
285
- if (((s = this.options) == null ? void 0 : s.length) > A) {
286
- const t = this.options.reduce((i, u) => {
287
- var p, h;
288
- return (((p = i == null ? void 0 : i.label) == null ? void 0 : p.length) ?? 0) > (((h = u == null ? void 0 : u.label) == null ? void 0 : h.length) ?? 0) ? i : u;
285
+ if (((s = this.options) == null ? void 0 : s.length) > D) {
286
+ const n = this.options.reduce((u, h) => {
287
+ var p, v;
288
+ return (((p = u == null ? void 0 : u.label) == null ? void 0 : p.length) ?? 0) > (((v = h == null ? void 0 : h.label) == null ? void 0 : v.length) ?? 0) ? u : h;
289
289
  }, 0);
290
- this._estimatePopoverWidth(t);
290
+ this._estimatePopoverWidth(n);
291
291
  } else
292
292
  this.style.removeProperty("--select-popover-width");
293
+ (t = this.strategy) != null && t.overlay && this.strategy.overlay.type !== "auto" && (this.strategy.overlay.type = "auto", this.strategy.overlay.placement = this.placement);
293
294
  }
294
295
  firstUpdated(e) {
295
296
  super.firstUpdated(e), this.bindButtonKeydownListener(), this.bindEvents();
@@ -314,17 +315,17 @@ class l extends X(Z, {
314
315
  _estimatePopoverWidth(e) {
315
316
  const o = this._getCssVarInPixels("--luzmo-select-font-size") ?? this._getCssVarInPixels("--select-font-size"), r = this._getCssVarInPixels("--luzmo-select-popover-min-width") ?? this._getCssVarInPixels("--select-popover-min-width"), s = this._getCssVarInPixels("--luzmo-spacing-5"), t = document.createElement("luzmo-options");
316
317
  t.style.setProperty("--luzmo-select-font-size", `${o}px`), t.options = [e], t.value = [e], t.variant = this.variant, t.size = this.size, t.style.position = "absolute", t.style.left = "-9999px", t.style.top = "-9999px", t.style.opacity = "0", t.style.width = "auto", document.body.append(t), t.updateComplete.then(() => {
317
- const i = t.offsetWidth + (s ?? 0);
318
- return i > (r ?? 0) ? this.style.setProperty("--select-popover-width", `${i}px`) : this.style.removeProperty("--select-popover-width"), t.remove(), i;
319
- }).catch((i) => {
320
- console.error(i), t.remove();
318
+ const n = t.offsetWidth + (s ?? 0);
319
+ return n > (r ?? 0) ? this.style.setProperty("--select-popover-width", `${n}px`) : this.style.removeProperty("--select-popover-width"), t.remove(), n;
320
+ }).catch((n) => {
321
+ console.error(n), t.remove();
321
322
  });
322
323
  }
323
324
  /**
324
325
  * @internal
325
326
  */
326
327
  get dismissHelper() {
327
- return n`
328
+ return i`
328
329
  <div class="visually-hidden">
329
330
  <button
330
331
  tabindex="-1"
@@ -337,12 +338,12 @@ class l extends X(Z, {
337
338
  // a helper to throw focus to the button is needed because Safari
338
339
  // won't include buttons in the tab order even with tabindex="0"
339
340
  render() {
340
- return this.tooltipEl && (this.tooltipEl.disabled = this.open), n`
341
+ return this.tooltipEl && (this.tooltipEl.disabled = this.open), i`
341
342
  <span
342
343
  id="focus-helper"
343
344
  tabindex=${this.focused || this.open ? "-1" : "0"}
344
345
  @focus=${this.handleHelperFocus}
345
- aria-describedby=${P}
346
+ aria-describedby=${L}
346
347
  ></span>
347
348
  <button
348
349
  aria-controls=${y(this.open ? "menu" : void 0)}
@@ -371,8 +372,8 @@ class l extends X(Z, {
371
372
  * @internal
372
373
  */
373
374
  get renderDescriptionSlot() {
374
- return n`
375
- <div id=${P}>
375
+ return i`
376
+ <div id=${L}>
376
377
  <slot name="description"></slot>
377
378
  </div>
378
379
  `;
@@ -385,7 +386,7 @@ class l extends X(Z, {
385
386
  });
386
387
  }
387
388
  renderSearchInput() {
388
- return n`
389
+ return i`
389
390
  <div id="search-container">
390
391
  <input
391
392
  type="text"
@@ -409,10 +410,10 @@ class l extends X(Z, {
409
410
  */
410
411
  get renderMenu() {
411
412
  const e = this.options.filter((r) => {
412
- var t, i, u;
413
+ var t, n, u;
413
414
  const s = typeof r == "string" ? r : r == null ? void 0 : r.label;
414
- return (u = (t = s == null ? void 0 : s.toString()) == null ? void 0 : t.toLowerCase()) == null ? void 0 : u.includes(((i = this.searchString) == null ? void 0 : i.toLowerCase()) ?? "");
415
- }), o = n`
415
+ return (u = (t = s == null ? void 0 : s.toString()) == null ? void 0 : t.toLowerCase()) == null ? void 0 : u.includes(((n = this.searchString) == null ? void 0 : n.toLowerCase()) ?? "");
416
+ }), o = i`
416
417
  <luzmo-options
417
418
  .variant=${this.variant}
418
419
  aria-labelledby="applied-label"
@@ -435,9 +436,9 @@ class l extends X(Z, {
435
436
  tabindex="0"
436
437
  >
437
438
  </luzmo-options>
438
- ${e.length === 0 && !this.retrieving && !this.pending ? n`<div id="no-results">
439
+ ${e.length === 0 && !this.retrieving && !this.pending ? i`<div id="no-results">
439
440
  ${this.searchString ? this.noResultsLabel : this.noDataLabel}
440
- </div>` : v}
441
+ </div>` : b}
441
442
  `;
442
443
  return this.hasRenderedOverlay = this.hasRenderedOverlay || this.focused || this.open, this.hasRenderedOverlay ? (this.dependencyManager.loaded && this.dependencyManager.add("luzmo-overlay"), this.renderOverlay(o)) : o;
443
444
  }
@@ -446,16 +447,16 @@ class l extends X(Z, {
446
447
  if (((r = this.strategy) == null ? void 0 : r.overlay) === void 0)
447
448
  return e;
448
449
  const o = this.renderContainer(e);
449
- return W(o, (s = this.strategy) == null ? void 0 : s.overlay, {
450
+ return U(o, (s = this.strategy) == null ? void 0 : s.overlay, {
450
451
  host: this
451
452
  }), (t = this.strategy) == null ? void 0 : t.overlay;
452
453
  }
453
454
  renderContainer(e) {
454
455
  var s, t;
455
- const o = this.search === "on" || this.searchString && ((s = this.searchString) == null ? void 0 : s.length) > 0 || this.search === "auto" && ((t = this.options) == null ? void 0 : t.length) > 20 ? this.renderSearchInput() : v, r = n`
456
+ const o = this.search === "on" || this.searchString && ((s = this.searchString) == null ? void 0 : s.length) > 0 || this.search === "auto" && ((t = this.options) == null ? void 0 : t.length) > 20 ? this.renderSearchInput() : b, r = i`
456
457
  ${o} ${this.dismissHelper} ${e} ${this.dismissHelper}
457
458
  `;
458
- return this.dependencyManager.add("luzmo-popover"), n`
459
+ return this.dependencyManager.add("luzmo-popover"), i`
459
460
  <luzmo-popover
460
461
  id="popover"
461
462
  size=${this.size}
@@ -15,9 +15,8 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- import { f as h } from "./platform-BM-uMWpX.js";
19
- const u = "(max-width: 743px) and (hover: none) and (pointer: coarse)";
20
- class g {
18
+ const l = "(max-width: 743px) and (hover: none) and (pointer: coarse)";
19
+ class d {
21
20
  constructor(t, e) {
22
21
  this.key = Symbol("match-media-key"), this.matches = !1, this.host = t, this.host.addController(this), typeof window > "u" ? this.matches = !1 : (this.media = window.matchMedia(e), this.matches = this.media.matches), this.onChange = this.onChange.bind(this), t.addController(this);
23
22
  }
@@ -34,8 +33,7 @@ class g {
34
33
  }
35
34
  }
36
35
  var r = /* @__PURE__ */ ((o) => (o[o.desktop = 0] = "desktop", o[o.mobile = 1] = "mobile", o))(r || {});
37
- const i = "remove-focus-ring-safari-hack";
38
- class l {
36
+ class h {
39
37
  constructor(t, e) {
40
38
  this.target = t, this.host = e, this.preventNextToggle = "no", this.pointerdownState = !1, this.enterKeydownOn = null, this._open = !1, this.target = t, this.host = e, this.host.addController(this), this.init();
41
39
  }
@@ -108,7 +106,7 @@ class l {
108
106
  this.overlay && this.host.dependencyManager.loaded && this.host.open !== this.overlay.open && (this.overlay.willPreventClose = this.preventNextToggle !== "no", this.overlay.open = this.host.open);
109
107
  }
110
108
  }
111
- class c extends l {
109
+ class a extends h {
112
110
  constructor() {
113
111
  super(...arguments), this.type = r.desktop;
114
112
  }
@@ -116,15 +114,15 @@ class c extends l {
116
114
  if (t.target.closest(".clear-icon") || t.button !== 0 || t.pointerType === "touch")
117
115
  return;
118
116
  this.pointerdownState = this.open, this.preventNextToggle = "maybe";
119
- let a = 0;
120
- const n = () => {
121
- cancelAnimationFrame(a), a = requestAnimationFrame(() => {
122
- document.removeEventListener("pointerup", n), document.removeEventListener("pointercancel", n), this.target.removeEventListener("click", n), requestAnimationFrame(() => {
117
+ let n = 0;
118
+ const i = () => {
119
+ cancelAnimationFrame(n), n = requestAnimationFrame(() => {
120
+ document.removeEventListener("pointerup", i), document.removeEventListener("pointercancel", i), this.target.removeEventListener("click", i), requestAnimationFrame(() => {
123
121
  this.preventNextToggle = "no";
124
122
  });
125
123
  });
126
124
  };
127
- document.addEventListener("pointerup", n), document.addEventListener("pointercancel", n), this.target.addEventListener("click", n), this.handleActivate();
125
+ document.addEventListener("pointerup", i), document.addEventListener("pointercancel", i), this.target.addEventListener("click", i), this.handleActivate();
128
126
  }
129
127
  handleActivate(t) {
130
128
  this.enterKeydownOn && this.enterKeydownOn !== this.target || this.preventNextToggle !== "yes" && ((t == null ? void 0 : t.type) === "click" && this.open !== this.pointerdownState || this.host.toggle());
@@ -152,44 +150,11 @@ class c extends l {
152
150
  );
153
151
  }
154
152
  }
155
- class d extends l {
156
- constructor() {
157
- super(...arguments), this.type = r.mobile;
158
- }
159
- handleClick(t) {
160
- t.target.closest(".clear-button") && (this.preventNextToggle === "no" && (this.open = !this.open), this.preventNextToggle = "no");
161
- }
162
- handlePointerdown(t) {
163
- t.target.closest(".clear-button") && (this.preventNextToggle = this.open ? "yes" : "no", h() && this.target.classList.add(i));
164
- }
165
- handleFocusOut() {
166
- this.host.open || h() && this.target.classList.contains(i) && this.target.classList.remove(i);
167
- }
168
- init() {
169
- var e;
170
- (e = this.abortController) == null || e.abort(), this.abortController = new AbortController();
171
- const { signal: t } = this.abortController;
172
- this.target.addEventListener(
173
- "click",
174
- (s) => this.handleClick(s),
175
- {
176
- signal: t
177
- }
178
- ), this.target.addEventListener(
179
- "pointerdown",
180
- (s) => this.handlePointerdown(s),
181
- { signal: t }
182
- ), this.target.addEventListener("focusout", () => this.handleFocusOut(), {
183
- signal: t
184
- });
185
- }
186
- }
187
- const v = {
188
- desktop: c,
189
- mobile: d
153
+ const c = {
154
+ desktop: a
190
155
  };
191
156
  export {
192
- u as I,
193
- g as M,
194
- v as s
157
+ l as I,
158
+ d as M,
159
+ c as s
195
160
  };
@@ -0,0 +1,18 @@
1
+ /*! * Lucero - The design system for Luzmo.
2
+ *
3
+ * Copyright © 2025 Luzmo
4
+ * All rights reserved.
5
+ * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
+ * This license allows users with a current active Luzmo account to use Lucero.
7
+ * This license terminates automatically if a user no longer has an active Luzmo account.
8
+ * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
+ *
10
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
+ * SOFTWARE.
17
+ * */
18
+ "use strict";const h="(max-width: 743px) and (hover: none) and (pointer: coarse)";class a{constructor(e,t){this.key=Symbol("match-media-key"),this.matches=!1,this.host=e,this.host.addController(this),typeof window>"u"?this.matches=!1:(this.media=window.matchMedia(t),this.matches=this.media.matches),this.onChange=this.onChange.bind(this),e.addController(this)}hostConnected(){var e;(e=this.media)==null||e.addEventListener("change",this.onChange)}hostDisconnected(){var e;(e=this.media)==null||e.removeEventListener("change",this.onChange)}onChange(e){this.matches!==e.matches&&(this.matches=e.matches,this.host.requestUpdate(this.key,!this.matches))}}var r=(o=>(o[o.desktop=0]="desktop",o[o.mobile=1]="mobile",o))(r||{});class l{constructor(e,t){this.target=e,this.host=t,this.preventNextToggle="no",this.pointerdownState=!1,this.enterKeydownOn=null,this._open=!1,this.target=e,this.host=t,this.host.addController(this),this.init()}get activelyOpening(){return!1}get open(){return this._open}set open(e){if(this._open!==e){if(this._open=e,this.overlay){this.host.open=e;return}customElements.whenDefined("luzmo-overlay").then(async()=>{const{LuzmoOverlay:t}=await Promise.resolve().then(()=>require("./overlay/index.cjs"));this.overlay=new t,this.host.open=!0,this.host.requestUpdate()}),Promise.resolve().then(()=>require("./overlay/index.cjs"))}}get overlay(){return this._overlay}set overlay(e){e&&this.overlay!==e&&(this._overlay=e,this.initOverlay())}releaseDescription(){}handleBeforetoggle(e){var t,s;e.composedPath()[0]===e.target&&(e.newState==="closed"&&(this.preventNextToggle==="no"?this.open=!1:this.pointerdownState||(t=this.overlay)==null||t.manuallyKeepOpen()),this.open||(this.host.optionsMenu.updateSelectedItemIndex(),typeof((s=this.host.optionsMenu)==null?void 0:s.closeDescendentOverlays)=="function"&&this.host.optionsMenu.closeDescendentOverlays()))}initOverlay(){this.overlay&&(this.overlay.addEventListener("beforetoggle",e=>{this.handleBeforetoggle(e)}),this.overlay.type=this.host.isMobile.matches?"modal":"auto",this.overlay.triggerElement=this.host,this.overlay.placement=this.host.isMobile.matches?void 0:this.host.placement,this.overlay.receivesFocus="true",this.overlay.willPreventClose=this.preventNextToggle!=="no"&&this.open,this.overlay.addEventListener("slottable-request",this.host.handleSlottableRequest))}handlePointerdown(e){}handleButtonFocus(e){this.preventNextToggle==="maybe"&&e.relatedTarget===this.host.optionsMenu&&(this.preventNextToggle="yes")}handleActivate(e){}init(){}abort(){var e;this.releaseDescription(),(e=this.abortController)==null||e.abort()}hostConnected(){this.init()}hostDisconnected(){var e;(e=this.abortController)==null||e.abort()}hostUpdated(){this.overlay&&this.host.dependencyManager.loaded&&this.host.open!==this.overlay.open&&(this.overlay.willPreventClose=this.preventNextToggle!=="no",this.overlay.open=this.host.open)}}class d extends l{constructor(){super(...arguments),this.type=r.desktop}handlePointerdown(e){if(e.target.closest(".clear-icon")||e.button!==0||e.pointerType==="touch")return;this.pointerdownState=this.open,this.preventNextToggle="maybe";let n=0;const i=()=>{cancelAnimationFrame(n),n=requestAnimationFrame(()=>{document.removeEventListener("pointerup",i),document.removeEventListener("pointercancel",i),this.target.removeEventListener("click",i),requestAnimationFrame(()=>{this.preventNextToggle="no"})})};document.addEventListener("pointerup",i),document.addEventListener("pointercancel",i),this.target.addEventListener("click",i),this.handleActivate()}handleActivate(e){this.enterKeydownOn&&this.enterKeydownOn!==this.target||this.preventNextToggle!=="yes"&&((e==null?void 0:e.type)==="click"&&this.open!==this.pointerdownState||this.host.toggle())}init(){var t;(t=this.abortController)==null||t.abort(),this.abortController=new AbortController;const{signal:e}=this.abortController;this.target.addEventListener("click",s=>this.handleActivate(s),{signal:e}),this.target.addEventListener("pointerdown",s=>this.handlePointerdown(s),{signal:e}),this.target.addEventListener("focus",s=>this.handleButtonFocus(s),{signal:e})}}const c={desktop:d};exports.IS_MOBILE=h;exports.MatchMediaController=a;exports.strategies=c;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luzmo/lucero",
3
- "version": "1.0.1-alpha.19",
3
+ "version": "1.0.1-alpha.20",
4
4
  "homepage": "https://luzmo.com",
5
5
  "description": "Lucero - The design system for Luzmo",
6
6
  "type": "module",
@@ -1,18 +0,0 @@
1
- /*! * Lucero - The design system for Luzmo.
2
- *
3
- * Copyright © 2025 Luzmo
4
- * All rights reserved.
5
- * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
- * This license allows users with a current active Luzmo account to use Lucero.
7
- * This license terminates automatically if a user no longer has an active Luzmo account.
8
- * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
- *
10
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
- * SOFTWARE.
17
- * */
18
- "use strict";const h=require("./platform-BiXhwqk3.cjs"),c="(max-width: 743px) and (hover: none) and (pointer: coarse)";class d{constructor(t,e){this.key=Symbol("match-media-key"),this.matches=!1,this.host=t,this.host.addController(this),typeof window>"u"?this.matches=!1:(this.media=window.matchMedia(e),this.matches=this.media.matches),this.onChange=this.onChange.bind(this),t.addController(this)}hostConnected(){var t;(t=this.media)==null||t.addEventListener("change",this.onChange)}hostDisconnected(){var t;(t=this.media)==null||t.removeEventListener("change",this.onChange)}onChange(t){this.matches!==t.matches&&(this.matches=t.matches,this.host.requestUpdate(this.key,!this.matches))}}var r=(o=>(o[o.desktop=0]="desktop",o[o.mobile=1]="mobile",o))(r||{});const i="remove-focus-ring-safari-hack";class l{constructor(t,e){this.target=t,this.host=e,this.preventNextToggle="no",this.pointerdownState=!1,this.enterKeydownOn=null,this._open=!1,this.target=t,this.host=e,this.host.addController(this),this.init()}get activelyOpening(){return!1}get open(){return this._open}set open(t){if(this._open!==t){if(this._open=t,this.overlay){this.host.open=t;return}customElements.whenDefined("luzmo-overlay").then(async()=>{const{LuzmoOverlay:e}=await Promise.resolve().then(()=>require("./overlay/index.cjs"));this.overlay=new e,this.host.open=!0,this.host.requestUpdate()}),Promise.resolve().then(()=>require("./overlay/index.cjs"))}}get overlay(){return this._overlay}set overlay(t){t&&this.overlay!==t&&(this._overlay=t,this.initOverlay())}releaseDescription(){}handleBeforetoggle(t){var e,s;t.composedPath()[0]===t.target&&(t.newState==="closed"&&(this.preventNextToggle==="no"?this.open=!1:this.pointerdownState||(e=this.overlay)==null||e.manuallyKeepOpen()),this.open||(this.host.optionsMenu.updateSelectedItemIndex(),typeof((s=this.host.optionsMenu)==null?void 0:s.closeDescendentOverlays)=="function"&&this.host.optionsMenu.closeDescendentOverlays()))}initOverlay(){this.overlay&&(this.overlay.addEventListener("beforetoggle",t=>{this.handleBeforetoggle(t)}),this.overlay.type=this.host.isMobile.matches?"modal":"auto",this.overlay.triggerElement=this.host,this.overlay.placement=this.host.isMobile.matches?void 0:this.host.placement,this.overlay.receivesFocus="true",this.overlay.willPreventClose=this.preventNextToggle!=="no"&&this.open,this.overlay.addEventListener("slottable-request",this.host.handleSlottableRequest))}handlePointerdown(t){}handleButtonFocus(t){this.preventNextToggle==="maybe"&&t.relatedTarget===this.host.optionsMenu&&(this.preventNextToggle="yes")}handleActivate(t){}init(){}abort(){var t;this.releaseDescription(),(t=this.abortController)==null||t.abort()}hostConnected(){this.init()}hostDisconnected(){var t;(t=this.abortController)==null||t.abort()}hostUpdated(){this.overlay&&this.host.dependencyManager.loaded&&this.host.open!==this.overlay.open&&(this.overlay.willPreventClose=this.preventNextToggle!=="no",this.overlay.open=this.host.open)}}class u extends l{constructor(){super(...arguments),this.type=r.desktop}handlePointerdown(t){if(t.target.closest(".clear-icon")||t.button!==0||t.pointerType==="touch")return;this.pointerdownState=this.open,this.preventNextToggle="maybe";let a=0;const n=()=>{cancelAnimationFrame(a),a=requestAnimationFrame(()=>{document.removeEventListener("pointerup",n),document.removeEventListener("pointercancel",n),this.target.removeEventListener("click",n),requestAnimationFrame(()=>{this.preventNextToggle="no"})})};document.addEventListener("pointerup",n),document.addEventListener("pointercancel",n),this.target.addEventListener("click",n),this.handleActivate()}handleActivate(t){this.enterKeydownOn&&this.enterKeydownOn!==this.target||this.preventNextToggle!=="yes"&&((t==null?void 0:t.type)==="click"&&this.open!==this.pointerdownState||this.host.toggle())}init(){var e;(e=this.abortController)==null||e.abort(),this.abortController=new AbortController;const{signal:t}=this.abortController;this.target.addEventListener("click",s=>this.handleActivate(s),{signal:t}),this.target.addEventListener("pointerdown",s=>this.handlePointerdown(s),{signal:t}),this.target.addEventListener("focus",s=>this.handleButtonFocus(s),{signal:t})}}class g extends l{constructor(){super(...arguments),this.type=r.mobile}handleClick(t){t.target.closest(".clear-button")&&(this.preventNextToggle==="no"&&(this.open=!this.open),this.preventNextToggle="no")}handlePointerdown(t){t.target.closest(".clear-button")&&(this.preventNextToggle=this.open?"yes":"no",h.isWebKit()&&this.target.classList.add(i))}handleFocusOut(){this.host.open||h.isWebKit()&&this.target.classList.contains(i)&&this.target.classList.remove(i)}init(){var e;(e=this.abortController)==null||e.abort(),this.abortController=new AbortController;const{signal:t}=this.abortController;this.target.addEventListener("click",s=>this.handleClick(s),{signal:t}),this.target.addEventListener("pointerdown",s=>this.handlePointerdown(s),{signal:t}),this.target.addEventListener("focusout",()=>this.handleFocusOut(),{signal:t})}}const p={desktop:u,mobile:g};exports.IS_MOBILE=c;exports.MatchMediaController=d;exports.strategies=p;