@luzmo/lucero 2.4.2 → 2.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.
- package/components/action-menu/index.cjs +1 -1
- package/components/action-menu/index.js +1 -1
- package/components/{action-menu-CwzRbF61.cjs → action-menu-BNZWjeDd.cjs} +1 -1
- package/components/{action-menu-C0sHNsjG.js → action-menu-D1hTsg9A.js} +1 -1
- package/components/checkbox/index.cjs +1 -1
- package/components/checkbox/index.js +1 -1
- package/components/{checkbox-BEjvkjfc.js → checkbox-CydI9yXG.js} +1 -1
- package/components/{checkbox-ClVrkeLp.cjs → checkbox-JCvBro0K.cjs} +1 -1
- package/components/index.cjs +1 -1
- package/components/index.js +11 -10
- package/components/match-media-B_0cVVtk.cjs +18 -0
- package/components/match-media-C5X2OZiD.js +34 -0
- package/components/picker/index.cjs +1 -1
- package/components/picker/index.js +1 -1
- package/components/picker-COeWCv60.cjs +124 -0
- package/components/{picker-D0fMBZLb.js → picker-uKcRswTQ.js} +6 -5
- package/components/question-box/index.cjs +1 -1
- package/components/question-box/index.js +1 -1
- package/components/{question-box-D7YSi_6c.js → question-box-Bcm-P-UV.js} +1 -1
- package/components/{question-box-Bdtsgv1k.cjs → question-box-DZnuGMBB.cjs} +1 -1
- package/components/select/index.cjs +1 -1
- package/components/select/index.js +1 -1
- package/components/{select-BUgHi69P.js → select-B86uAHme.js} +5 -4
- package/components/select-CKMCEJf7.cjs +158 -0
- package/components/strategies-Bb7zEjrU.cjs +18 -0
- package/components/{strategies-Cl59wdNZ.js → strategies-COS7mShJ.js} +11 -24
- package/components/table/controllers/table-announcer.d.ts +12 -0
- package/components/table/controllers/table-column-resize.d.ts +41 -0
- package/components/table/controllers/table-grid-navigation.d.ts +28 -0
- package/components/table/controllers/table-layout.d.ts +55 -0
- package/components/table/controllers/table-row-expansion.d.ts +45 -0
- package/components/table/controllers/table-virtualizer.d.ts +42 -0
- package/components/table/index.cjs +18 -0
- package/components/table/index.d.ts +32 -0
- package/components/table/index.js +20 -0
- package/components/table/table-body.d.ts +24 -0
- package/components/table/table-cell.d.ts +27 -0
- package/components/table/table-checkbox-cell.d.ts +41 -0
- package/components/table/table-columns.d.ts +45 -0
- package/components/table/table-disclosure-cell.d.ts +21 -0
- package/components/table/table-head-cell.d.ts +77 -0
- package/components/table/table-head.d.ts +34 -0
- package/components/table/table-model.d.ts +56 -0
- package/components/table/table-row-details.d.ts +29 -0
- package/components/table/table-row.d.ts +64 -0
- package/components/table/table-styles.d.ts +9 -0
- package/components/table/table-templates.d.ts +41 -0
- package/components/table/table.d.ts +197 -0
- package/components/table/types.d.ts +81 -0
- package/components/table-B75GjBhD.js +1592 -0
- package/components/table-CHrAaVU1.cjs +180 -0
- package/custom-elements.json +1 -1
- package/index.d.ts +1 -0
- package/package.json +9 -1
- package/standalone/accordion.js +1 -1
- package/standalone/action-bar.js +1 -1
- package/standalone/action-button.js +1 -1
- package/standalone/action-menu.js +1 -1
- package/standalone/avatar.js +1 -1
- package/standalone/calendar.js +1 -1
- package/standalone/checkbox.js +1 -1
- package/standalone/chunks/{action-button-BzzPBqt5.js → action-button-FSsfXYe9.js} +1 -1
- package/standalone/chunks/{button-Dykw3TSO.js → button-Q1n9DH9a.js} +1 -1
- package/standalone/chunks/{calendar-ZwUYkzVq.js → calendar-DcFjY2tw.js} +1 -1
- package/standalone/chunks/{checkbox-OQtakoP8.js → checkbox-DQ4wPgG_.js} +2 -2
- package/standalone/chunks/{clear-button-pVGfwye8.js → clear-button-3zpCVxG5.js} +1 -1
- package/standalone/chunks/{close-button-RpPiwBdf.js → close-button-C96dazyi.js} +1 -1
- package/standalone/chunks/{color-field-CrCF4kqZ.js → color-field-BFvUGE4L.js} +1 -1
- package/standalone/chunks/{color-menu-B5UOMYmX.js → color-menu-BIKuitbH.js} +2 -2
- package/standalone/chunks/{icon-Dy6J1QeX.js → icon-BypO7M7G.js} +1 -1
- package/standalone/chunks/luzmo-icons-B-pCv-xg.js +13 -0
- package/standalone/chunks/match-media-BMi7j6hf.js +2 -0
- package/standalone/chunks/{menu-nolJetlp.js → menu-DSMoQt1w.js} +1 -1
- package/standalone/chunks/{number-field-C3DYfl1s.js → number-field-B6BDXkL7.js} +3 -3
- package/standalone/chunks/{options-BjRSj630.js → options-CkmITqgV.js} +5 -5
- package/standalone/chunks/picker-FCQK0vdE.js +108 -0
- package/standalone/chunks/{picker-button-BeXTIgUt.js → picker-button-BZWqDoNQ.js} +1 -1
- package/standalone/chunks/{segments-factory-Ch3AAizU.js → segments-factory-eS38mJRz.js} +1 -1
- package/standalone/chunks/strategies-C-vW4MlK.js +2 -0
- package/standalone/chunks/{swatch-m_4GcO2_.js → swatch-CGR_GWqO.js} +1 -1
- package/standalone/chunks/{text-field-BnZtyodU.js → text-field-4OKvLOXG.js} +1 -1
- package/standalone/chunks/{text-field-BrlDeJsx.js → text-field-C2oROxum.js} +1 -1
- package/standalone/clear-button.js +1 -1
- package/standalone/close-button.js +1 -1
- package/standalone/color-field.js +1 -1
- package/standalone/color-menu.js +1 -1
- package/standalone/color-picker.js +1 -1
- package/standalone/date-range-picker.js +1 -1
- package/standalone/date-time-picker.js +1 -1
- package/standalone/icon.js +1 -1
- package/standalone/manifest.json +22 -20
- package/standalone/menu.js +1 -1
- package/standalone/multi-language-field.js +1 -1
- package/standalone/notice.js +1 -1
- package/standalone/number-field.js +1 -1
- package/standalone/options.js +1 -1
- package/standalone/picker-button.js +1 -1
- package/standalone/picker.js +1 -1
- package/standalone/progress-steps.js +1 -1
- package/standalone/prompt-box.js +9 -9
- package/standalone/question-box.js +1 -1
- package/standalone/search.js +1 -1
- package/standalone/select.js +2 -2
- package/standalone/slider.js +1 -1
- package/standalone/swatch.js +1 -1
- package/standalone/table.js +185 -0
- package/standalone/tabs.js +1 -1
- package/standalone/tags.js +1 -1
- package/standalone/text-field.js +1 -1
- package/standalone/toast.js +1 -1
- package/components/picker-BliQJlY_.cjs +0 -124
- package/components/select-DsGVB01K.cjs +0 -158
- package/components/strategies-BwNbUXYS.cjs +0 -18
- package/standalone/chunks/luzmo-icons-CJa-aByT.js +0 -13
- package/standalone/chunks/picker-hbMQOkUX.js +0 -108
- package/standalone/chunks/strategies-kad_0dTB.js +0 -2
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
require("./tokens.cjs");const e=require("./decorate-Dq34MBGe.cjs"),t=require("./sized-mixin-BT7cv-fT.cjs"),n=require("./roving-tabindex-BoPao4td.cjs");require("./icon-zOPAWCdx.cjs");const r=require("./language-resolution-CSjktYg5.cjs");require("./action-button-CX1uYbQp.cjs"),require("./badge-D8pIDEoq.cjs"),require("./button-Bvnidb4x.cjs"),require("./checkbox-ClVrkeLp.cjs"),require("./field-group/index.cjs"),require("./text-field-CbN4nydd.cjs"),require("./radio-CRTfoEX_.cjs");let i=require("lit"),a=require("lit/decorators.js"),o=require("@luzmo/icons"),s=require("lit/directives/if-defined.js"),c=require("lit/directives/repeat.js");var l=`:host{font-family:var(--question-box-font-family);font-size:var(--question-box-font-size);color:var(--highcontrast-question-box-color,var(--question-box-color));box-sizing:border-box;inline-size:100%;max-inline-size:var(--luzmo-question-box-max-inline-size,var(--question-box-max-inline-size));display:block}:host([disabled]){pointer-events:none}.card{gap:var(--question-box-gap);padding:var(--question-box-padding);box-sizing:border-box;border-width:var(--question-box-border-width);border-style:solid;border-color:var(--highcontrast-question-box-border-color,var(--question-box-border-color));border-radius:var(--question-box-border-radius);background-color:var(--highcontrast-question-box-background-color,var(--question-box-background-color));flex-direction:column;display:flex}.header{justify-content:space-between;align-items:flex-start;gap:var(--question-box-header-gap);display:flex}.header-actions,.step-navigation{align-items:center;display:flex}.header-actions{gap:var(--question-box-header-actions-gap);min-block-size:0;block-size:max(var(--question-box-title-font-size) * var(--question-box-title-line-height), var(--question-box-header-control-size) - 2 * (var(--question-box-padding) - var(--question-box-header-actions-inset)));flex-shrink:0;margin-inline-start:auto;overflow:visible}.step-navigation{gap:var(--question-box-copy-gap)}.heading{gap:var(--question-box-heading-copy-gap);flex-direction:column;min-inline-size:0;display:flex}.progress{font-size:var(--question-box-progress-font-size);color:var(--question-box-muted-color);margin:0}.title{font-size:var(--question-box-title-font-size);font-weight:var(--luzmo-font-weight-bold);line-height:var(--question-box-title-line-height);margin:0}.title:focus,.summary-heading:focus{outline:none}.title:focus-visible,.summary-heading:focus-visible{-webkit-text-decoration-color:var(--question-box-focus-ring-color);text-decoration-color:var(--question-box-focus-ring-color);text-decoration-line:underline;text-decoration-thickness:var(--question-box-focus-ring-width);text-underline-offset:var(--question-box-focus-ring-gap);outline:none}.description{color:var(--question-box-muted-color);font-size:inherit;margin:0;margin-block-start:var(--question-box-heading-copy-offset);line-height:1.4}.close{flex-shrink:0}.body{gap:var(--question-box-option-gap);max-block-size:var(--luzmo-question-box-body-max-block-size,var(--question-box-body-max-block-size));padding-block:var(--question-box-body-focus-inset);margin-block:calc(var(--question-box-body-focus-inset) * -1);flex-direction:column;display:flex;overflow:hidden auto}.body::-webkit-scrollbar{width:var(--luzmo-question-box-scrollbar-width,var(--question-box-scrollbar-width));height:var(--luzmo-question-box-scrollbar-width,var(--question-box-scrollbar-width))}.body::-webkit-scrollbar-track{background:var(--luzmo-question-box-scrollbar-track-background,var(--question-box-scrollbar-track-background));border-radius:var(--luzmo-question-box-scrollbar-track-border-radius,var(--question-box-scrollbar-track-border-radius))}.body::-webkit-scrollbar-thumb{background:var(--luzmo-question-box-scrollbar-thumb-background,var(--question-box-scrollbar-thumb-background));border-radius:var(--luzmo-question-box-scrollbar-thumb-border-radius,var(--question-box-scrollbar-thumb-border-radius))}.body::-webkit-scrollbar-thumb:hover{background:var(--luzmo-question-box-scrollbar-thumb-hover-background,var(--question-box-scrollbar-thumb-hover-background))}.body{scrollbar-width:var(--luzmo-scrollbar-width,thin);scrollbar-color:var(--luzmo-question-box-scrollbar-thumb-background,var(--question-box-scrollbar-thumb-background)) var(--luzmo-question-box-scrollbar-track-background,var(--question-box-scrollbar-track-background))}.options{box-sizing:border-box;flex-direction:column;inline-size:100%;min-inline-size:0;display:flex}.options--descriptive luzmo-radio,.options--descriptive luzmo-checkbox,.options--descriptive .other-option-answer{padding-block:var(--luzmo-question-box-descriptive-option-padding-block,var(--question-box-descriptive-option-padding-block))}.body:has(.options--descriptive){margin-block:calc(var(--question-box-option-padding-block) - var(--question-box-body-focus-inset) - var(--luzmo-question-box-descriptive-option-padding-block,var(--question-box-descriptive-option-padding-block)))}luzmo-radio,luzmo-checkbox{box-sizing:border-box;inline-size:100%;min-block-size:var(--question-box-option-min-block-size);padding-block:var(--question-box-option-padding-block);padding-inline:var(--question-box-option-padding-inline);border-block-end-width:var(--luzmo-question-box-divider-width,var(--question-box-divider-width));border-block-end-style:solid;border-block-end-color:var(--luzmo-question-box-divider-color,var(--question-box-divider-color));border-radius:var(--luzmo-border-radius-s);align-items:center;display:flex}luzmo-radio:hover,luzmo-checkbox:hover{background-color:var(--question-box-option-hover-background)}.other-option-row{align-items:center;gap:var(--question-box-option-gap);box-sizing:border-box;border-block-end-width:var(--luzmo-question-box-divider-width,var(--question-box-divider-width));border-block-end-style:solid;border-block-end-color:var(--luzmo-question-box-divider-color,var(--question-box-divider-color));inline-size:100%;max-inline-size:100%;display:flex}.other-option-answer{align-items:center;gap:var(--question-box-option-gap);box-sizing:border-box;min-inline-size:0;min-block-size:var(--question-box-option-min-block-size);padding-block:var(--question-box-option-padding-block);padding-inline:var(--question-box-option-padding-inline);border-radius:var(--luzmo-border-radius-s);flex:1;display:flex}.other-option-answer:hover{background-color:var(--question-box-option-hover-background)}luzmo-radio.other-option,luzmo-checkbox.other-option{border:0;flex:none;min-block-size:auto;inline-size:auto;padding:0}luzmo-radio.other-option{--luzmo-radio-button-top-to-control:0px}luzmo-radio.numbered-option{--luzmo-radio-button-control-size:0px;--luzmo-radio-button-top-to-control:0px;--luzmo-radio-text-to-control:0px;--luzmo-radio-border-width:0px;--luzmo-radio-focus-indicator-width:0px}luzmo-checkbox.numbered-option{--luzmo-checkbox-control-size:0px;--luzmo-checkbox-text-to-control:0px;--luzmo-checkbox-top-to-text:0px;--luzmo-checkbox-border-width:0px;--luzmo-checkbox-selected-border-width:0px;--luzmo-checkbox-focus-indicator-width:0px}luzmo-radio.numbered-option::part(control),luzmo-checkbox.numbered-option::part(control){display:none}luzmo-radio.other-option:hover,luzmo-checkbox.other-option:hover{background-color:#0000}.other-field{inline-size:auto;min-inline-size:0;max-inline-size:100%;min-block-size:var(--question-box-other-field-min-block-size);font-size:var(--question-box-other-field-font-size);--luzmo-text-field-width:100%;--luzmo-text-field-height:var(--question-box-other-field-min-block-size);--luzmo-text-field-background-color:transparent;--luzmo-text-field-background-color-disabled:transparent;--luzmo-text-field-placeholder-font-size:var(--question-box-other-field-font-size);--luzmo-text-field-border-width:0px;--luzmo-text-field-spacing-inline:0px;--luzmo-text-field-spacing-block-start:0px;--luzmo-text-field-spacing-block-end:0px;flex:1;justify-content:center}.other-primary{flex:none}.other-actions{box-sizing:border-box;justify-content:flex-end;align-items:center;gap:var(--question-box-copy-gap-detailed);inline-size:100%;padding-inline:var(--question-box-option-padding-inline);margin-block-start:var(--question-box-copy-gap-detailed);display:flex}.selected-count{font-size:var(--luzmo-question-box-selected-count-font-size,var(--question-box-selected-count-font-size))}.other-actions .selected-count{min-inline-size:0;margin-inline-end:auto}.other-actions luzmo-button{flex:none}.status-error{--luzmo-helptext-font-size:var(--luzmo-question-box-selected-count-font-size,var(--question-box-selected-count-font-size));--luzmo-helptext-min-height:0;--luzmo-helptext-top-to-text:0;--luzmo-helptext-bottom-to-text:0}.visually-hidden{clip-path:inset(50%);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.option-content{align-items:flex-start;gap:var(--question-box-option-gap);inline-size:100%;display:flex}.option-number{forced-color-adjust:none;inline-size:var(--question-box-option-number-size);block-size:var(--question-box-option-number-size);box-sizing:border-box;border:var(--luzmo-border-width) solid var(--highcontrast-question-box-option-number-border-color,var(--question-box-option-number-border-color));border-radius:var(--luzmo-border-radius);color:var(--highcontrast-question-box-option-number-color,var(--question-box-option-number-color));background-color:var(--highcontrast-question-box-option-number-background,var(--question-box-option-number-background));transition:color var(--luzmo-animation-duration) ease-in-out, border-color var(--luzmo-animation-duration) ease-in-out, background-color var(--luzmo-animation-duration) ease-in-out;flex:none;justify-content:center;align-items:center;line-height:1;display:inline-flex}luzmo-radio[checked] .option-number,luzmo-checkbox[checked] .option-number{color:var(--highcontrast-question-box-option-number-selected-color,var(--question-box-option-number-selected-color));border-color:var(--highcontrast-question-box-option-number-selected-background,var(--question-box-option-number-selected-background));background-color:var(--highcontrast-question-box-option-number-selected-background,var(--question-box-option-number-selected-background))}luzmo-radio[data-focus-visible] .option-number,luzmo-checkbox[data-focus-visible] .option-number,.option-number--focused{outline:var(--luzmo-question-box-focus-ring-width,var(--question-box-focus-ring-width)) solid var(--highcontrast-question-box-focus-ring-color,var(--luzmo-question-box-focus-ring-color,var(--question-box-focus-ring-color)));outline-offset:var(--luzmo-question-box-focus-ring-gap,var(--question-box-focus-ring-gap))}luzmo-radio[disabled] .option-number,luzmo-checkbox[disabled] .option-number{opacity:.5}.option-copy{gap:var(--question-box-copy-gap);flex-direction:column;flex:1;min-inline-size:0;display:flex}.option-edit luzmo-icon{color:inherit}.option-heading{align-items:center;gap:var(--question-box-recommended-gap);min-block-size:var(--question-box-option-number-size);flex-wrap:wrap;display:flex}.option-text{align-items:baseline;gap:var(--question-box-recommended-gap);flex-wrap:wrap;min-inline-size:0;display:flex}.option-description{color:var(--question-box-muted-color);line-height:1.4}.option-hint{color:var(--question-box-muted-color);font-size:var(--luzmo-font-size-s)}.footer{justify-content:space-between;align-items:center;gap:var(--question-box-option-gap);flex-wrap:wrap;display:flex}.status{color:var(--question-box-muted-color);font-size:var(--luzmo-question-box-selected-count-font-size,var(--question-box-selected-count-font-size))}.actions{justify-content:flex-end;gap:var(--question-box-recommended-gap);flex-wrap:wrap;margin-inline-start:auto;display:flex}:host([dir=rtl]) .step-navigation luzmo-icon{transform:scaleX(-1)}.resolved{gap:var(--question-box-summary-gap)}.summary-actions{justify-content:flex-end;gap:var(--question-box-recommended-gap);flex-wrap:wrap;display:flex}.summary{gap:var(--question-box-option-gap);flex-direction:column;display:flex}.summary-heading{font-size:var(--question-box-title-font-size);line-height:var(--question-box-title-line-height);margin:0}.summary-row{gap:var(--question-box-copy-gap);flex-direction:column;display:flex}.summary-title{color:var(--question-box-muted-color);font-size:var(--luzmo-font-size-s)}.summary-answer{font-weight:var(--luzmo-font-weight-bold)}@media (prefers-reduced-motion:reduce){.option-number{transition-duration:0s}}@media (forced-colors:active){:host{--highcontrast-question-box-border-color:CanvasText;--highcontrast-question-box-background-color:Canvas;--highcontrast-question-box-color:CanvasText;--highcontrast-question-box-focus-ring-color:Highlight;--highcontrast-question-box-option-number-border-color:ButtonText;--highcontrast-question-box-option-number-color:ButtonText;--highcontrast-question-box-option-number-background:Canvas;--highcontrast-question-box-option-number-selected-background:Highlight;--highcontrast-question-box-option-number-selected-color:HighlightText}}:host{--question-box-font-family:var(--luzmo-font-family);--question-box-font-size:var(--luzmo-font-size-m);--question-box-color:var(--luzmo-font-color);--question-box-muted-color:color-mix(in srgb, var(--luzmo-font-color) 80%, var(--luzmo-background-color));--question-box-background-color:var(--luzmo-background-color);--question-box-border-color:var(--luzmo-border-color);--question-box-border-width:var(--luzmo-border-width);--question-box-border-radius:var(--luzmo-border-radius-l);--question-box-padding:var(--luzmo-spacing-5);--question-box-gap:var(--luzmo-spacing-4);--question-box-header-gap:var(--luzmo-spacing-3);--question-box-header-actions-gap:var(--luzmo-spacing-2);--question-box-header-actions-inset:var(--luzmo-spacing-2);--question-box-header-control-size:var(--luzmo-component-height);--question-box-max-inline-size:40rem;--question-box-body-max-block-size:24rem;--question-box-title-font-size:var(--question-box-font-size);--question-box-title-line-height:1.3;--question-box-progress-font-size:var(--luzmo-font-size-s);--question-box-selected-count-font-size:var(--luzmo-font-size-s);--question-box-option-min-block-size:var(--luzmo-component-height);--question-box-option-hover-background:var(--luzmo-background-color-hover);--question-box-option-number-size:var(--luzmo-component-height-xs);--question-box-descriptive-option-padding-block:var(--question-box-option-padding-block);--question-box-option-padding-block:var(--luzmo-spacing-1);--question-box-option-padding-inline:var(--luzmo-spacing-3);--question-box-option-gap:var(--luzmo-spacing-3);--question-box-heading-copy-gap:0px;--question-box-heading-copy-offset:calc(var(--question-box-font-size) * -.25);--question-box-copy-gap:var(--luzmo-spacing-1);--question-box-copy-gap-detailed:var(--luzmo-spacing-2);--question-box-recommended-gap:var(--luzmo-spacing-2);--question-box-summary-gap:var(--luzmo-spacing-4);--question-box-body-focus-inset:calc(var(--luzmo-indicator-gap) + var(--luzmo-indicator-width));--question-box-focus-ring-width:var(--luzmo-indicator-width);--question-box-focus-ring-gap:var(--luzmo-indicator-gap);--question-box-focus-ring-color:var(--luzmo-indicator-color);--question-box-divider-width:0px;--question-box-option-number-background:var(--luzmo-background-color);--question-box-option-number-border-color:var(--luzmo-border-color);--question-box-option-number-color:var(--luzmo-font-color);--question-box-option-number-selected-background:var(--luzmo-primary);--question-box-option-number-selected-color:var(--luzmo-primary-inverse-color);--question-box-other-field-min-block-size:var(--question-box-option-min-block-size);--question-box-other-field-font-size:var(--question-box-font-size);--question-box-divider-color:var(--luzmo-border-color);--question-box-scrollbar-width:var(--luzmo-scrollbar-size);--question-box-scrollbar-track-background:var(--luzmo-scrollbar-track-background);--question-box-scrollbar-track-border-radius:var(--luzmo-scrollbar-track-border-radius);--question-box-scrollbar-thumb-background:var(--luzmo-scrollbar-thumb-background);--question-box-scrollbar-thumb-border-radius:var(--luzmo-scrollbar-thumb-border-radius);--question-box-scrollbar-thumb-hover-background:var(--luzmo-scrollbar-thumb-hover-background)}:host([size=s]){--question-box-padding:var(--luzmo-spacing-4);--question-box-font-size:var(--luzmo-font-size-s);--question-box-selected-count-font-size:var(--luzmo-font-size-xs);--question-box-title-font-size:var(--question-box-font-size);--question-box-header-control-size:var(--luzmo-component-height-s);--question-box-option-min-block-size:var(--luzmo-component-height-s);--question-box-option-number-size:var(--luzmo-component-height-xs);--question-box-other-field-min-block-size:var(--question-box-option-min-block-size);--question-box-other-field-font-size:var(--question-box-font-size)}:host([size=l]){--question-box-font-size:var(--luzmo-font-size-l);--question-box-selected-count-font-size:var(--luzmo-font-size-m);--question-box-title-font-size:var(--question-box-font-size);--question-box-header-control-size:var(--luzmo-component-height-l);--question-box-option-min-block-size:var(--luzmo-component-height-l);--question-box-option-number-size:var(--luzmo-component-height-s);--question-box-other-field-min-block-size:var(--question-box-option-min-block-size);--question-box-other-field-font-size:var(--question-box-font-size)}:host([size=xl]){--question-box-font-size:var(--luzmo-font-size-xl);--question-box-selected-count-font-size:var(--luzmo-font-size-l);--question-box-title-font-size:var(--question-box-font-size);--question-box-header-control-size:var(--luzmo-component-height-xl);--question-box-option-min-block-size:var(--luzmo-component-height-xl);--question-box-option-number-size:var(--luzmo-component-height);--question-box-other-field-min-block-size:var(--question-box-option-min-block-size);--question-box-other-field-font-size:var(--question-box-font-size)}`,u=`__other__`,d={continue:`Next`,back:`Back`,submit:`Submit`,skip:`Skip`,change:`Change`,close:`Close`,other:`Something else`,otherPlaceholder:`Something else`,recommended:`Recommended`,answerTitle:`Answer`,answersTitle:`Answers`,progress:`{current} of {total}`,selectedCount:`{count} selected`,selectedCountOne:`{count} selected`,recommendedSuffix:`{label} ({recommended})`,answer:`{answer}`,requiredSelectionDescription:`Choose one or more options.`,selectionRangeDescription:`Choose between {min} and {max} options.`,minSelectedError:`Choose at least {min} options.`,maxSelectedError:`Choose at most {max} options.`,otherRequiredError:`Enter a value for this option.`},f=e=>`${e}Other`,p=e=>!!e.other||e.options.length===0,m=e=>typeof e.other==`object`&&e.other?e.other:{},h=e=>Object.fromEntries(Object.entries(e)),g=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},_=(e,t)=>{let n=new Set([...Object.keys(e),...Object.keys(t)]);for(let r of n){let n=e[r],i=t[r];if(Array.isArray(n)||Array.isArray(i)){if(!Array.isArray(n)||!Array.isArray(i)||n.length!==i.length||n.some((e,t)=>e!==i[t]))return!1}else if(n!==i)return!1}return!0},v=e=>{let t=new Set,n=[];for(let r of e)t.has(r)||(t.add(r),n.push(r));return n},y=e=>{let t=new Set(e.options.map(e=>e.value));return p(e)&&t.add(u),t},b=(e,t)=>{let n=t[e.id];return e.type===`single`?typeof n==`string`&&n?[n]:[]:Array.isArray(n)?v(n):[]},x=(e,t)=>b(e,t).includes(u),S=e=>{let t=Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0));return{...d,...t}},C=(e,t)=>{let n=e;for(let[e,r]of Object.entries(t))n=n.replaceAll(`{${e}}`,r);return n},w=e=>{let t=new Set;for(let n of e){if(!n.id)throw TypeError(`luzmo-question-box: every question needs an id.`);if(t.has(n.id))throw TypeError(`luzmo-question-box: duplicate question id "${n.id}".`);t.add(n.id);let r=f(n.id);if(e.some(e=>e.id===r))throw TypeError(`luzmo-question-box: question id "${r}" collides with Other text for "${n.id}".`);if(n.type!==`multiple`&&(n.minSelected!==void 0||n.maxSelected!==void 0))throw TypeError(`luzmo-question-box: minSelected and maxSelected only apply to multiple-choice question "${n.id}".`);for(let[e,t]of[[`minSelected`,n.minSelected],[`maxSelected`,n.maxSelected]])if(t!==void 0&&(!Number.isInteger(t)||t<0))throw TypeError(`luzmo-question-box: ${e} must be a non-negative integer on "${n.id}".`);let i=n.minSelected??+!!n.required;if(n.maxSelected!==void 0&&i>n.maxSelected)throw TypeError(`luzmo-question-box: minSelected cannot exceed maxSelected on "${n.id}".`);let a=n.options.filter(e=>!e.disabled).length+ +!!p(n);if(n.type===`multiple`&&i>a)throw TypeError(`luzmo-question-box: minSelected exceeds the available options on "${n.id}".`);let o=new Set;for(let e of n.options){if(!e.value)throw TypeError(`luzmo-question-box: option values cannot be empty on "${n.id}".`);if(e.value===`__other__`)throw TypeError(`luzmo-question-box: "${u}" is reserved on "${n.id}".`);if(o.has(e.value))throw TypeError(`luzmo-question-box: duplicate option value "${e.value}" on "${n.id}".`);o.add(e.value)}}},T=(e,t)=>{let n=Object.fromEntries([]);for(let r of e){let e=y(r),i=t[r.id],a=Object.hasOwn(t,r.id);if(r.type===`single`)typeof i==`string`&&e.has(i)?g(n,r.id,i):!a&&typeof r.default==`string`&&(e.has(r.default)||r.options.length===0)&&g(n,r.id,r.options.length===0?u:r.default);else{let t=[...r.options.map(e=>e.value),...p(r)?[u]:[]],o=v(Array.isArray(i)?i.filter(t=>e.has(t)):[]);if(o.length>0)g(n,r.id,t.filter(e=>o.includes(e)));else if(!a&&Array.isArray(r.default)){let i=v(r.default.filter(t=>e.has(t)));i.length>0&&g(n,r.id,t.filter(e=>i.includes(e)))}}let o=f(r.id),s=t[o];typeof s==`string`?g(n,o,s):!a&&r.options.length===0&&typeof r.default==`string`&&g(n,o,r.default)}return n},E=e=>e.minSelected??+!!e.required,D=(e,t)=>{let n=E(e),r=e.maxSelected;return n>0&&r!==void 0?C(t.selectionRangeDescription,{min:String(n),max:String(r)}):n===1?t.requiredSelectionDescription:n>1?C(t.minSelectedError,{min:String(n)}):r===void 0?void 0:C(t.maxSelectedError,{max:String(r)})},O=(e,t)=>{let n=b(e,t),r=E(e),i=e.maxSelected;if(n.length<r)return r<=1?`missing`:`minimum`;if(i!==void 0&&n.length>i)return`maximum`;if(x(e,t)&&!String(t[f(e.id)]??``).trim())return`otherText`},k=(e,t)=>O(e,t)!==void 0,A=(e,t,n)=>{switch(O(e,t)){case`minimum`:return C(n.minSelectedError,{min:String(E(e))});case`maximum`:return C(n.maxSelectedError,{max:String(e.maxSelected)});case`otherText`:return n.otherRequiredError;default:return}},j=(e,t,n,r,i)=>{if(i||t.disabled)return!0;if(e.type!==`multiple`||n)return!1;let a=e.maxSelected;return a!==void 0&&b(e,r).length>=a},M=(e,t)=>C(e===1?t.selectedCountOne:t.selectedCount,{count:String(e)}),N,ee=(e,t)=>{try{return N?.language!==t&&(N={language:t,formatter:new Intl.ListFormat(t,{style:`narrow`,type:`conjunction`})}),N.formatter.format(e)}catch{return e.join(`, `)}},te=(e,t)=>e.recommended?C(t.recommendedSuffix,{label:e.label,recommended:t.recommended}):e.label,ne=e=>{let t=e.options.map(e=>({const:e.value,title:e.label}));return p(e)&&e.options.length>0&&t.push({const:u,title:typeof e.other==`object`&&e.other.label||d.other}),t},re=e=>{let t={type:`string`};return typeof e.other==`object`&&e.other.label&&(t.title=e.other.label),t},ie=e=>{let t=[],n=[];for(let r of e){if(r.options.length===0){let e={type:`string`};r.title&&(e.title=r.title),r.description&&(e.description=r.description),typeof r.default==`string`&&(e.default=r.default),t.push([r.id,e]),r.required&&n.push(r.id);continue}let e=ne(r);if(r.type===`single`){let n={type:`string`,oneOf:e};r.title&&(n.title=r.title),r.description&&(n.description=r.description),typeof r.default==`string`&&r.options.some(e=>e.value===r.default)&&(n.default=r.default),t.push([r.id,n])}else{let n={type:`array`,items:{anyOf:e}};r.title&&(n.title=r.title),r.description&&(n.description=r.description);let i=r.minSelected??(r.required?1:void 0);if(i!==void 0&&(n.minItems=i),r.maxSelected!==void 0&&(n.maxItems=r.maxSelected),Array.isArray(r.default)){let t=new Set(e.map(e=>e.const)),i=r.default.filter(e=>t.has(e));i.length>0&&(n.default=i)}t.push([r.id,n])}r.required&&n.push(r.id),p(r)&&t.push([f(r.id),re(r)])}let r=Object.fromEntries(t);return n.length>0?{type:`object`,properties:r,required:n}:{type:`object`,properties:r}},ae=(e,t)=>String(t[f(e.id)]??``).trim(),P=(e,t)=>{let n=[];for(let r of e){let e=ae(r,t);if(r.options.length===0){e&&n.push([r.id,e]);continue}let i=b(r,t);r.type===`single`?i[0]&&n.push([r.id,i[0]]):i.length>0&&n.push([r.id,[...i]]),p(r)&&x(r,t)&&e&&n.push([f(r.id),e])}return Object.fromEntries(n)},F=e=>!!e&&typeof e==`object`&&!Array.isArray(e),I=e=>F(e)?e:{},L=e=>{let t=e.oneOf??e.items?.anyOf;if(Array.isArray(t)){let e=[],n=new Set;for(let r of t)!F(r)||typeof r.const!=`string`||!r.const||n.has(r.const)||(n.add(r.const),e.push({value:r.const,label:typeof r.title==`string`&&r.title?r.title:r.const}));return{declared:!0,options:e}}let n=e.enum??e.items?.enum;if(Array.isArray(n)){let t=e.enumNames??e.items?.enumNames,r=new Set,i=[];for(let[e,a]of n.entries()){if(typeof a!=`string`||!a||r.has(a))continue;r.add(a);let n=t?.[e];i.push({value:a,label:typeof n==`string`&&n?n:a})}return{declared:!0,options:i}}return{declared:!1,options:[]}},R=e=>f(e),z=e=>e.format!==void 0||e.minLength!==void 0||e.maxLength!==void 0||e.pattern!==void 0,B=e=>e.type===`string`&&!L(e).declared&&!z(e),V=e=>{if(e.type!==`object`||!e.properties)return[];let t=e.properties,n=new Set(e.required??[]),r=new Set;for(let e of Object.keys(t)){let n=R(e),i=L(I(t[e])),a=I(t[n]);n in t&&B(a)&&i.options.some(e=>e.value===`__other__`)&&r.add(n)}let i=[];for(let[e,a]of Object.entries(t)){if(r.has(e))continue;let o=I(a),s=L(o),c=s.options.some(e=>e.value===u),l=R(e);if(c&&!r.has(l))continue;let d=s.options.filter(e=>e.value!==u);if(o.type===`number`||o.type===`integer`||o.type===`boolean`||o.type!==`string`&&o.type!==`array`||s.declared&&s.options.length===0||o.type===`array`&&!s.declared||o.type===`string`&&!s.declared&&z(o))continue;let f={id:e,type:o.type===`array`?`multiple`:`single`,title:o.title||e,options:d};if(o.description&&(f.description=o.description),n.has(e)&&(f.required=!0),o.type===`array`?(o.minItems!==void 0&&(f.minSelected=o.minItems),o.maxItems!==void 0&&(f.maxSelected=o.maxItems),Array.isArray(o.default)&&o.default.length>0&&(f.default=o.default)):typeof o.default==`string`&&(f.default=o.default),c&&l in t){let e=I(t[l]);f.other=!e.title||{label:e.title}}i.push(f)}return i};function H(e){switch(e){case`s`:return`xs`;case`m`:return`s`;case`l`:return`m`;default:return`l`}}function U(e){switch(e){case`m`:return`xs`;case`l`:return`s`;case`xl`:case`xxl`:return`m`;default:return`xxs`}}function W(e){return e.step>=e.questions.length-1}function G(e,t){let n=e.selectedValues(t);return n.length===0?``:ee(n.map(n=>{if(n===`__other__`)return String(e.value[f(t.id)]??e.copy.other);let r=t.options.find(e=>e.value===n);return r?te(r,e.copy):n}),e.language)}function K(e,t){let n=G(e,t);return i.html`<span class="summary-value">${e.copy.answer.split(`{answer}`).map((e,t)=>i.html`${t>0?i.html`<span class="summary-answer">${n}</span>`:i.nothing}${e}`)}</span>`}function q(e){let t=e.copy;return i.html`
|
|
18
|
+
require("./tokens.cjs");const e=require("./decorate-Dq34MBGe.cjs"),t=require("./sized-mixin-BT7cv-fT.cjs"),n=require("./roving-tabindex-BoPao4td.cjs");require("./icon-zOPAWCdx.cjs");const r=require("./language-resolution-CSjktYg5.cjs");require("./action-button-CX1uYbQp.cjs"),require("./badge-D8pIDEoq.cjs"),require("./button-Bvnidb4x.cjs"),require("./checkbox-JCvBro0K.cjs"),require("./field-group/index.cjs"),require("./text-field-CbN4nydd.cjs"),require("./radio-CRTfoEX_.cjs");let i=require("lit"),a=require("lit/decorators.js"),o=require("@luzmo/icons"),s=require("lit/directives/if-defined.js"),c=require("lit/directives/repeat.js");var l=`:host{font-family:var(--question-box-font-family);font-size:var(--question-box-font-size);color:var(--highcontrast-question-box-color,var(--question-box-color));box-sizing:border-box;inline-size:100%;max-inline-size:var(--luzmo-question-box-max-inline-size,var(--question-box-max-inline-size));display:block}:host([disabled]){pointer-events:none}.card{gap:var(--question-box-gap);padding:var(--question-box-padding);box-sizing:border-box;border-width:var(--question-box-border-width);border-style:solid;border-color:var(--highcontrast-question-box-border-color,var(--question-box-border-color));border-radius:var(--question-box-border-radius);background-color:var(--highcontrast-question-box-background-color,var(--question-box-background-color));flex-direction:column;display:flex}.header{justify-content:space-between;align-items:flex-start;gap:var(--question-box-header-gap);display:flex}.header-actions,.step-navigation{align-items:center;display:flex}.header-actions{gap:var(--question-box-header-actions-gap);min-block-size:0;block-size:max(var(--question-box-title-font-size) * var(--question-box-title-line-height), var(--question-box-header-control-size) - 2 * (var(--question-box-padding) - var(--question-box-header-actions-inset)));flex-shrink:0;margin-inline-start:auto;overflow:visible}.step-navigation{gap:var(--question-box-copy-gap)}.heading{gap:var(--question-box-heading-copy-gap);flex-direction:column;min-inline-size:0;display:flex}.progress{font-size:var(--question-box-progress-font-size);color:var(--question-box-muted-color);margin:0}.title{font-size:var(--question-box-title-font-size);font-weight:var(--luzmo-font-weight-bold);line-height:var(--question-box-title-line-height);margin:0}.title:focus,.summary-heading:focus{outline:none}.title:focus-visible,.summary-heading:focus-visible{-webkit-text-decoration-color:var(--question-box-focus-ring-color);text-decoration-color:var(--question-box-focus-ring-color);text-decoration-line:underline;text-decoration-thickness:var(--question-box-focus-ring-width);text-underline-offset:var(--question-box-focus-ring-gap);outline:none}.description{color:var(--question-box-muted-color);font-size:inherit;margin:0;margin-block-start:var(--question-box-heading-copy-offset);line-height:1.4}.close{flex-shrink:0}.body{gap:var(--question-box-option-gap);max-block-size:var(--luzmo-question-box-body-max-block-size,var(--question-box-body-max-block-size));padding-block:var(--question-box-body-focus-inset);margin-block:calc(var(--question-box-body-focus-inset) * -1);flex-direction:column;display:flex;overflow:hidden auto}.body::-webkit-scrollbar{width:var(--luzmo-question-box-scrollbar-width,var(--question-box-scrollbar-width));height:var(--luzmo-question-box-scrollbar-width,var(--question-box-scrollbar-width))}.body::-webkit-scrollbar-track{background:var(--luzmo-question-box-scrollbar-track-background,var(--question-box-scrollbar-track-background));border-radius:var(--luzmo-question-box-scrollbar-track-border-radius,var(--question-box-scrollbar-track-border-radius))}.body::-webkit-scrollbar-thumb{background:var(--luzmo-question-box-scrollbar-thumb-background,var(--question-box-scrollbar-thumb-background));border-radius:var(--luzmo-question-box-scrollbar-thumb-border-radius,var(--question-box-scrollbar-thumb-border-radius))}.body::-webkit-scrollbar-thumb:hover{background:var(--luzmo-question-box-scrollbar-thumb-hover-background,var(--question-box-scrollbar-thumb-hover-background))}.body{scrollbar-width:var(--luzmo-scrollbar-width,thin);scrollbar-color:var(--luzmo-question-box-scrollbar-thumb-background,var(--question-box-scrollbar-thumb-background)) var(--luzmo-question-box-scrollbar-track-background,var(--question-box-scrollbar-track-background))}.options{box-sizing:border-box;flex-direction:column;inline-size:100%;min-inline-size:0;display:flex}.options--descriptive luzmo-radio,.options--descriptive luzmo-checkbox,.options--descriptive .other-option-answer{padding-block:var(--luzmo-question-box-descriptive-option-padding-block,var(--question-box-descriptive-option-padding-block))}.body:has(.options--descriptive){margin-block:calc(var(--question-box-option-padding-block) - var(--question-box-body-focus-inset) - var(--luzmo-question-box-descriptive-option-padding-block,var(--question-box-descriptive-option-padding-block)))}luzmo-radio,luzmo-checkbox{box-sizing:border-box;inline-size:100%;min-block-size:var(--question-box-option-min-block-size);padding-block:var(--question-box-option-padding-block);padding-inline:var(--question-box-option-padding-inline);border-block-end-width:var(--luzmo-question-box-divider-width,var(--question-box-divider-width));border-block-end-style:solid;border-block-end-color:var(--luzmo-question-box-divider-color,var(--question-box-divider-color));border-radius:var(--luzmo-border-radius-s);align-items:center;display:flex}luzmo-radio:hover,luzmo-checkbox:hover{background-color:var(--question-box-option-hover-background)}.other-option-row{align-items:center;gap:var(--question-box-option-gap);box-sizing:border-box;border-block-end-width:var(--luzmo-question-box-divider-width,var(--question-box-divider-width));border-block-end-style:solid;border-block-end-color:var(--luzmo-question-box-divider-color,var(--question-box-divider-color));inline-size:100%;max-inline-size:100%;display:flex}.other-option-answer{align-items:center;gap:var(--question-box-option-gap);box-sizing:border-box;min-inline-size:0;min-block-size:var(--question-box-option-min-block-size);padding-block:var(--question-box-option-padding-block);padding-inline:var(--question-box-option-padding-inline);border-radius:var(--luzmo-border-radius-s);flex:1;display:flex}.other-option-answer:hover{background-color:var(--question-box-option-hover-background)}luzmo-radio.other-option,luzmo-checkbox.other-option{border:0;flex:none;min-block-size:auto;inline-size:auto;padding:0}luzmo-radio.other-option{--luzmo-radio-button-top-to-control:0px}luzmo-radio.numbered-option{--luzmo-radio-button-control-size:0px;--luzmo-radio-button-top-to-control:0px;--luzmo-radio-text-to-control:0px;--luzmo-radio-border-width:0px;--luzmo-radio-focus-indicator-width:0px}luzmo-checkbox.numbered-option{--luzmo-checkbox-control-size:0px;--luzmo-checkbox-text-to-control:0px;--luzmo-checkbox-top-to-text:0px;--luzmo-checkbox-border-width:0px;--luzmo-checkbox-selected-border-width:0px;--luzmo-checkbox-focus-indicator-width:0px}luzmo-radio.numbered-option::part(control),luzmo-checkbox.numbered-option::part(control){display:none}luzmo-radio.other-option:hover,luzmo-checkbox.other-option:hover{background-color:#0000}.other-field{inline-size:auto;min-inline-size:0;max-inline-size:100%;min-block-size:var(--question-box-other-field-min-block-size);font-size:var(--question-box-other-field-font-size);--luzmo-text-field-width:100%;--luzmo-text-field-height:var(--question-box-other-field-min-block-size);--luzmo-text-field-background-color:transparent;--luzmo-text-field-background-color-disabled:transparent;--luzmo-text-field-placeholder-font-size:var(--question-box-other-field-font-size);--luzmo-text-field-border-width:0px;--luzmo-text-field-spacing-inline:0px;--luzmo-text-field-spacing-block-start:0px;--luzmo-text-field-spacing-block-end:0px;flex:1;justify-content:center}.other-primary{flex:none}.other-actions{box-sizing:border-box;justify-content:flex-end;align-items:center;gap:var(--question-box-copy-gap-detailed);inline-size:100%;padding-inline:var(--question-box-option-padding-inline);margin-block-start:var(--question-box-copy-gap-detailed);display:flex}.selected-count{font-size:var(--luzmo-question-box-selected-count-font-size,var(--question-box-selected-count-font-size))}.other-actions .selected-count{min-inline-size:0;margin-inline-end:auto}.other-actions luzmo-button{flex:none}.status-error{--luzmo-helptext-font-size:var(--luzmo-question-box-selected-count-font-size,var(--question-box-selected-count-font-size));--luzmo-helptext-min-height:0;--luzmo-helptext-top-to-text:0;--luzmo-helptext-bottom-to-text:0}.visually-hidden{clip-path:inset(50%);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.option-content{align-items:flex-start;gap:var(--question-box-option-gap);inline-size:100%;display:flex}.option-number{forced-color-adjust:none;inline-size:var(--question-box-option-number-size);block-size:var(--question-box-option-number-size);box-sizing:border-box;border:var(--luzmo-border-width) solid var(--highcontrast-question-box-option-number-border-color,var(--question-box-option-number-border-color));border-radius:var(--luzmo-border-radius);color:var(--highcontrast-question-box-option-number-color,var(--question-box-option-number-color));background-color:var(--highcontrast-question-box-option-number-background,var(--question-box-option-number-background));transition:color var(--luzmo-animation-duration) ease-in-out, border-color var(--luzmo-animation-duration) ease-in-out, background-color var(--luzmo-animation-duration) ease-in-out;flex:none;justify-content:center;align-items:center;line-height:1;display:inline-flex}luzmo-radio[checked] .option-number,luzmo-checkbox[checked] .option-number{color:var(--highcontrast-question-box-option-number-selected-color,var(--question-box-option-number-selected-color));border-color:var(--highcontrast-question-box-option-number-selected-background,var(--question-box-option-number-selected-background));background-color:var(--highcontrast-question-box-option-number-selected-background,var(--question-box-option-number-selected-background))}luzmo-radio[data-focus-visible] .option-number,luzmo-checkbox[data-focus-visible] .option-number,.option-number--focused{outline:var(--luzmo-question-box-focus-ring-width,var(--question-box-focus-ring-width)) solid var(--highcontrast-question-box-focus-ring-color,var(--luzmo-question-box-focus-ring-color,var(--question-box-focus-ring-color)));outline-offset:var(--luzmo-question-box-focus-ring-gap,var(--question-box-focus-ring-gap))}luzmo-radio[disabled] .option-number,luzmo-checkbox[disabled] .option-number{opacity:.5}.option-copy{gap:var(--question-box-copy-gap);flex-direction:column;flex:1;min-inline-size:0;display:flex}.option-edit luzmo-icon{color:inherit}.option-heading{align-items:center;gap:var(--question-box-recommended-gap);min-block-size:var(--question-box-option-number-size);flex-wrap:wrap;display:flex}.option-text{align-items:baseline;gap:var(--question-box-recommended-gap);flex-wrap:wrap;min-inline-size:0;display:flex}.option-description{color:var(--question-box-muted-color);line-height:1.4}.option-hint{color:var(--question-box-muted-color);font-size:var(--luzmo-font-size-s)}.footer{justify-content:space-between;align-items:center;gap:var(--question-box-option-gap);flex-wrap:wrap;display:flex}.status{color:var(--question-box-muted-color);font-size:var(--luzmo-question-box-selected-count-font-size,var(--question-box-selected-count-font-size))}.actions{justify-content:flex-end;gap:var(--question-box-recommended-gap);flex-wrap:wrap;margin-inline-start:auto;display:flex}:host([dir=rtl]) .step-navigation luzmo-icon{transform:scaleX(-1)}.resolved{gap:var(--question-box-summary-gap)}.summary-actions{justify-content:flex-end;gap:var(--question-box-recommended-gap);flex-wrap:wrap;display:flex}.summary{gap:var(--question-box-option-gap);flex-direction:column;display:flex}.summary-heading{font-size:var(--question-box-title-font-size);line-height:var(--question-box-title-line-height);margin:0}.summary-row{gap:var(--question-box-copy-gap);flex-direction:column;display:flex}.summary-title{color:var(--question-box-muted-color);font-size:var(--luzmo-font-size-s)}.summary-answer{font-weight:var(--luzmo-font-weight-bold)}@media (prefers-reduced-motion:reduce){.option-number{transition-duration:0s}}@media (forced-colors:active){:host{--highcontrast-question-box-border-color:CanvasText;--highcontrast-question-box-background-color:Canvas;--highcontrast-question-box-color:CanvasText;--highcontrast-question-box-focus-ring-color:Highlight;--highcontrast-question-box-option-number-border-color:ButtonText;--highcontrast-question-box-option-number-color:ButtonText;--highcontrast-question-box-option-number-background:Canvas;--highcontrast-question-box-option-number-selected-background:Highlight;--highcontrast-question-box-option-number-selected-color:HighlightText}}:host{--question-box-font-family:var(--luzmo-font-family);--question-box-font-size:var(--luzmo-font-size-m);--question-box-color:var(--luzmo-font-color);--question-box-muted-color:color-mix(in srgb, var(--luzmo-font-color) 80%, var(--luzmo-background-color));--question-box-background-color:var(--luzmo-background-color);--question-box-border-color:var(--luzmo-border-color);--question-box-border-width:var(--luzmo-border-width);--question-box-border-radius:var(--luzmo-border-radius-l);--question-box-padding:var(--luzmo-spacing-5);--question-box-gap:var(--luzmo-spacing-4);--question-box-header-gap:var(--luzmo-spacing-3);--question-box-header-actions-gap:var(--luzmo-spacing-2);--question-box-header-actions-inset:var(--luzmo-spacing-2);--question-box-header-control-size:var(--luzmo-component-height);--question-box-max-inline-size:40rem;--question-box-body-max-block-size:24rem;--question-box-title-font-size:var(--question-box-font-size);--question-box-title-line-height:1.3;--question-box-progress-font-size:var(--luzmo-font-size-s);--question-box-selected-count-font-size:var(--luzmo-font-size-s);--question-box-option-min-block-size:var(--luzmo-component-height);--question-box-option-hover-background:var(--luzmo-background-color-hover);--question-box-option-number-size:var(--luzmo-component-height-xs);--question-box-descriptive-option-padding-block:var(--question-box-option-padding-block);--question-box-option-padding-block:var(--luzmo-spacing-1);--question-box-option-padding-inline:var(--luzmo-spacing-3);--question-box-option-gap:var(--luzmo-spacing-3);--question-box-heading-copy-gap:0px;--question-box-heading-copy-offset:calc(var(--question-box-font-size) * -.25);--question-box-copy-gap:var(--luzmo-spacing-1);--question-box-copy-gap-detailed:var(--luzmo-spacing-2);--question-box-recommended-gap:var(--luzmo-spacing-2);--question-box-summary-gap:var(--luzmo-spacing-4);--question-box-body-focus-inset:calc(var(--luzmo-indicator-gap) + var(--luzmo-indicator-width));--question-box-focus-ring-width:var(--luzmo-indicator-width);--question-box-focus-ring-gap:var(--luzmo-indicator-gap);--question-box-focus-ring-color:var(--luzmo-indicator-color);--question-box-divider-width:0px;--question-box-option-number-background:var(--luzmo-background-color);--question-box-option-number-border-color:var(--luzmo-border-color);--question-box-option-number-color:var(--luzmo-font-color);--question-box-option-number-selected-background:var(--luzmo-primary);--question-box-option-number-selected-color:var(--luzmo-primary-inverse-color);--question-box-other-field-min-block-size:var(--question-box-option-min-block-size);--question-box-other-field-font-size:var(--question-box-font-size);--question-box-divider-color:var(--luzmo-border-color);--question-box-scrollbar-width:var(--luzmo-scrollbar-size);--question-box-scrollbar-track-background:var(--luzmo-scrollbar-track-background);--question-box-scrollbar-track-border-radius:var(--luzmo-scrollbar-track-border-radius);--question-box-scrollbar-thumb-background:var(--luzmo-scrollbar-thumb-background);--question-box-scrollbar-thumb-border-radius:var(--luzmo-scrollbar-thumb-border-radius);--question-box-scrollbar-thumb-hover-background:var(--luzmo-scrollbar-thumb-hover-background)}:host([size=s]){--question-box-padding:var(--luzmo-spacing-4);--question-box-font-size:var(--luzmo-font-size-s);--question-box-selected-count-font-size:var(--luzmo-font-size-xs);--question-box-title-font-size:var(--question-box-font-size);--question-box-header-control-size:var(--luzmo-component-height-s);--question-box-option-min-block-size:var(--luzmo-component-height-s);--question-box-option-number-size:var(--luzmo-component-height-xs);--question-box-other-field-min-block-size:var(--question-box-option-min-block-size);--question-box-other-field-font-size:var(--question-box-font-size)}:host([size=l]){--question-box-font-size:var(--luzmo-font-size-l);--question-box-selected-count-font-size:var(--luzmo-font-size-m);--question-box-title-font-size:var(--question-box-font-size);--question-box-header-control-size:var(--luzmo-component-height-l);--question-box-option-min-block-size:var(--luzmo-component-height-l);--question-box-option-number-size:var(--luzmo-component-height-s);--question-box-other-field-min-block-size:var(--question-box-option-min-block-size);--question-box-other-field-font-size:var(--question-box-font-size)}:host([size=xl]){--question-box-font-size:var(--luzmo-font-size-xl);--question-box-selected-count-font-size:var(--luzmo-font-size-l);--question-box-title-font-size:var(--question-box-font-size);--question-box-header-control-size:var(--luzmo-component-height-xl);--question-box-option-min-block-size:var(--luzmo-component-height-xl);--question-box-option-number-size:var(--luzmo-component-height);--question-box-other-field-min-block-size:var(--question-box-option-min-block-size);--question-box-other-field-font-size:var(--question-box-font-size)}`,u=`__other__`,d={continue:`Next`,back:`Back`,submit:`Submit`,skip:`Skip`,change:`Change`,close:`Close`,other:`Something else`,otherPlaceholder:`Something else`,recommended:`Recommended`,answerTitle:`Answer`,answersTitle:`Answers`,progress:`{current} of {total}`,selectedCount:`{count} selected`,selectedCountOne:`{count} selected`,recommendedSuffix:`{label} ({recommended})`,answer:`{answer}`,requiredSelectionDescription:`Choose one or more options.`,selectionRangeDescription:`Choose between {min} and {max} options.`,minSelectedError:`Choose at least {min} options.`,maxSelectedError:`Choose at most {max} options.`,otherRequiredError:`Enter a value for this option.`},f=e=>`${e}Other`,p=e=>!!e.other||e.options.length===0,m=e=>typeof e.other==`object`&&e.other?e.other:{},h=e=>Object.fromEntries(Object.entries(e)),g=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},_=(e,t)=>{let n=new Set([...Object.keys(e),...Object.keys(t)]);for(let r of n){let n=e[r],i=t[r];if(Array.isArray(n)||Array.isArray(i)){if(!Array.isArray(n)||!Array.isArray(i)||n.length!==i.length||n.some((e,t)=>e!==i[t]))return!1}else if(n!==i)return!1}return!0},v=e=>{let t=new Set,n=[];for(let r of e)t.has(r)||(t.add(r),n.push(r));return n},y=e=>{let t=new Set(e.options.map(e=>e.value));return p(e)&&t.add(u),t},b=(e,t)=>{let n=t[e.id];return e.type===`single`?typeof n==`string`&&n?[n]:[]:Array.isArray(n)?v(n):[]},x=(e,t)=>b(e,t).includes(u),S=e=>{let t=Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0));return{...d,...t}},C=(e,t)=>{let n=e;for(let[e,r]of Object.entries(t))n=n.replaceAll(`{${e}}`,r);return n},w=e=>{let t=new Set;for(let n of e){if(!n.id)throw TypeError(`luzmo-question-box: every question needs an id.`);if(t.has(n.id))throw TypeError(`luzmo-question-box: duplicate question id "${n.id}".`);t.add(n.id);let r=f(n.id);if(e.some(e=>e.id===r))throw TypeError(`luzmo-question-box: question id "${r}" collides with Other text for "${n.id}".`);if(n.type!==`multiple`&&(n.minSelected!==void 0||n.maxSelected!==void 0))throw TypeError(`luzmo-question-box: minSelected and maxSelected only apply to multiple-choice question "${n.id}".`);for(let[e,t]of[[`minSelected`,n.minSelected],[`maxSelected`,n.maxSelected]])if(t!==void 0&&(!Number.isInteger(t)||t<0))throw TypeError(`luzmo-question-box: ${e} must be a non-negative integer on "${n.id}".`);let i=n.minSelected??+!!n.required;if(n.maxSelected!==void 0&&i>n.maxSelected)throw TypeError(`luzmo-question-box: minSelected cannot exceed maxSelected on "${n.id}".`);let a=n.options.filter(e=>!e.disabled).length+ +!!p(n);if(n.type===`multiple`&&i>a)throw TypeError(`luzmo-question-box: minSelected exceeds the available options on "${n.id}".`);let o=new Set;for(let e of n.options){if(!e.value)throw TypeError(`luzmo-question-box: option values cannot be empty on "${n.id}".`);if(e.value===`__other__`)throw TypeError(`luzmo-question-box: "${u}" is reserved on "${n.id}".`);if(o.has(e.value))throw TypeError(`luzmo-question-box: duplicate option value "${e.value}" on "${n.id}".`);o.add(e.value)}}},T=(e,t)=>{let n=Object.fromEntries([]);for(let r of e){let e=y(r),i=t[r.id],a=Object.hasOwn(t,r.id);if(r.type===`single`)typeof i==`string`&&e.has(i)?g(n,r.id,i):!a&&typeof r.default==`string`&&(e.has(r.default)||r.options.length===0)&&g(n,r.id,r.options.length===0?u:r.default);else{let t=[...r.options.map(e=>e.value),...p(r)?[u]:[]],o=v(Array.isArray(i)?i.filter(t=>e.has(t)):[]);if(o.length>0)g(n,r.id,t.filter(e=>o.includes(e)));else if(!a&&Array.isArray(r.default)){let i=v(r.default.filter(t=>e.has(t)));i.length>0&&g(n,r.id,t.filter(e=>i.includes(e)))}}let o=f(r.id),s=t[o];typeof s==`string`?g(n,o,s):!a&&r.options.length===0&&typeof r.default==`string`&&g(n,o,r.default)}return n},E=e=>e.minSelected??+!!e.required,D=(e,t)=>{let n=E(e),r=e.maxSelected;return n>0&&r!==void 0?C(t.selectionRangeDescription,{min:String(n),max:String(r)}):n===1?t.requiredSelectionDescription:n>1?C(t.minSelectedError,{min:String(n)}):r===void 0?void 0:C(t.maxSelectedError,{max:String(r)})},O=(e,t)=>{let n=b(e,t),r=E(e),i=e.maxSelected;if(n.length<r)return r<=1?`missing`:`minimum`;if(i!==void 0&&n.length>i)return`maximum`;if(x(e,t)&&!String(t[f(e.id)]??``).trim())return`otherText`},k=(e,t)=>O(e,t)!==void 0,A=(e,t,n)=>{switch(O(e,t)){case`minimum`:return C(n.minSelectedError,{min:String(E(e))});case`maximum`:return C(n.maxSelectedError,{max:String(e.maxSelected)});case`otherText`:return n.otherRequiredError;default:return}},j=(e,t,n,r,i)=>{if(i||t.disabled)return!0;if(e.type!==`multiple`||n)return!1;let a=e.maxSelected;return a!==void 0&&b(e,r).length>=a},M=(e,t)=>C(e===1?t.selectedCountOne:t.selectedCount,{count:String(e)}),N,ee=(e,t)=>{try{return N?.language!==t&&(N={language:t,formatter:new Intl.ListFormat(t,{style:`narrow`,type:`conjunction`})}),N.formatter.format(e)}catch{return e.join(`, `)}},te=(e,t)=>e.recommended?C(t.recommendedSuffix,{label:e.label,recommended:t.recommended}):e.label,ne=e=>{let t=e.options.map(e=>({const:e.value,title:e.label}));return p(e)&&e.options.length>0&&t.push({const:u,title:typeof e.other==`object`&&e.other.label||d.other}),t},re=e=>{let t={type:`string`};return typeof e.other==`object`&&e.other.label&&(t.title=e.other.label),t},ie=e=>{let t=[],n=[];for(let r of e){if(r.options.length===0){let e={type:`string`};r.title&&(e.title=r.title),r.description&&(e.description=r.description),typeof r.default==`string`&&(e.default=r.default),t.push([r.id,e]),r.required&&n.push(r.id);continue}let e=ne(r);if(r.type===`single`){let n={type:`string`,oneOf:e};r.title&&(n.title=r.title),r.description&&(n.description=r.description),typeof r.default==`string`&&r.options.some(e=>e.value===r.default)&&(n.default=r.default),t.push([r.id,n])}else{let n={type:`array`,items:{anyOf:e}};r.title&&(n.title=r.title),r.description&&(n.description=r.description);let i=r.minSelected??(r.required?1:void 0);if(i!==void 0&&(n.minItems=i),r.maxSelected!==void 0&&(n.maxItems=r.maxSelected),Array.isArray(r.default)){let t=new Set(e.map(e=>e.const)),i=r.default.filter(e=>t.has(e));i.length>0&&(n.default=i)}t.push([r.id,n])}r.required&&n.push(r.id),p(r)&&t.push([f(r.id),re(r)])}let r=Object.fromEntries(t);return n.length>0?{type:`object`,properties:r,required:n}:{type:`object`,properties:r}},ae=(e,t)=>String(t[f(e.id)]??``).trim(),P=(e,t)=>{let n=[];for(let r of e){let e=ae(r,t);if(r.options.length===0){e&&n.push([r.id,e]);continue}let i=b(r,t);r.type===`single`?i[0]&&n.push([r.id,i[0]]):i.length>0&&n.push([r.id,[...i]]),p(r)&&x(r,t)&&e&&n.push([f(r.id),e])}return Object.fromEntries(n)},F=e=>!!e&&typeof e==`object`&&!Array.isArray(e),I=e=>F(e)?e:{},L=e=>{let t=e.oneOf??e.items?.anyOf;if(Array.isArray(t)){let e=[],n=new Set;for(let r of t)!F(r)||typeof r.const!=`string`||!r.const||n.has(r.const)||(n.add(r.const),e.push({value:r.const,label:typeof r.title==`string`&&r.title?r.title:r.const}));return{declared:!0,options:e}}let n=e.enum??e.items?.enum;if(Array.isArray(n)){let t=e.enumNames??e.items?.enumNames,r=new Set,i=[];for(let[e,a]of n.entries()){if(typeof a!=`string`||!a||r.has(a))continue;r.add(a);let n=t?.[e];i.push({value:a,label:typeof n==`string`&&n?n:a})}return{declared:!0,options:i}}return{declared:!1,options:[]}},R=e=>f(e),z=e=>e.format!==void 0||e.minLength!==void 0||e.maxLength!==void 0||e.pattern!==void 0,B=e=>e.type===`string`&&!L(e).declared&&!z(e),V=e=>{if(e.type!==`object`||!e.properties)return[];let t=e.properties,n=new Set(e.required??[]),r=new Set;for(let e of Object.keys(t)){let n=R(e),i=L(I(t[e])),a=I(t[n]);n in t&&B(a)&&i.options.some(e=>e.value===`__other__`)&&r.add(n)}let i=[];for(let[e,a]of Object.entries(t)){if(r.has(e))continue;let o=I(a),s=L(o),c=s.options.some(e=>e.value===u),l=R(e);if(c&&!r.has(l))continue;let d=s.options.filter(e=>e.value!==u);if(o.type===`number`||o.type===`integer`||o.type===`boolean`||o.type!==`string`&&o.type!==`array`||s.declared&&s.options.length===0||o.type===`array`&&!s.declared||o.type===`string`&&!s.declared&&z(o))continue;let f={id:e,type:o.type===`array`?`multiple`:`single`,title:o.title||e,options:d};if(o.description&&(f.description=o.description),n.has(e)&&(f.required=!0),o.type===`array`?(o.minItems!==void 0&&(f.minSelected=o.minItems),o.maxItems!==void 0&&(f.maxSelected=o.maxItems),Array.isArray(o.default)&&o.default.length>0&&(f.default=o.default)):typeof o.default==`string`&&(f.default=o.default),c&&l in t){let e=I(t[l]);f.other=!e.title||{label:e.title}}i.push(f)}return i};function H(e){switch(e){case`s`:return`xs`;case`m`:return`s`;case`l`:return`m`;default:return`l`}}function U(e){switch(e){case`m`:return`xs`;case`l`:return`s`;case`xl`:case`xxl`:return`m`;default:return`xxs`}}function W(e){return e.step>=e.questions.length-1}function G(e,t){let n=e.selectedValues(t);return n.length===0?``:ee(n.map(n=>{if(n===`__other__`)return String(e.value[f(t.id)]??e.copy.other);let r=t.options.find(e=>e.value===n);return r?te(r,e.copy):n}),e.language)}function K(e,t){let n=G(e,t);return i.html`<span class="summary-value">${e.copy.answer.split(`{answer}`).map((e,t)=>i.html`${t>0?i.html`<span class="summary-answer">${n}</span>`:i.nothing}${e}`)}</span>`}function q(e){let t=e.copy;return i.html`
|
|
19
19
|
<div class="card resolved">
|
|
20
20
|
<div class="summary">
|
|
21
21
|
<h2 class="summary-heading" id="resolved-title" tabindex="-1">
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../tokens.cjs");const e=require("../select-
|
|
18
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../tokens.cjs");const e=require("../select-CKMCEJf7.cjs");exports.LuzmoSelect=e.t;
|
|
@@ -22,11 +22,12 @@ import { t as n } from "./focusable-DuP0-Kuy.js";
|
|
|
22
22
|
import "./icon-CsJZMhIm.js";
|
|
23
23
|
import "./popover-DC8tkee-.js";
|
|
24
24
|
import { t as r } from "./dependency-manger-wHEXoU92.js";
|
|
25
|
-
import {
|
|
25
|
+
import { r as i, t as a } from "./match-media-C5X2OZiD.js";
|
|
26
26
|
import "./progress-circle-By6qUQYe.js";
|
|
27
|
-
import { t as
|
|
27
|
+
import { t as o } from "./pending-state-D_b45qvi.js";
|
|
28
28
|
import "./overlay-DpHIYJtd.js";
|
|
29
29
|
import "./tooltip-xTa9Q5JW.js";
|
|
30
|
+
import { t as s } from "./strategies-COS7mShJ.js";
|
|
30
31
|
import { r as c } from "./options-D_ifU0DH.js";
|
|
31
32
|
import { html as l, nothing as u, render as d, unsafeCSS as f } from "lit";
|
|
32
33
|
import { property as p, query as m, state as h } from "lit/decorators.js";
|
|
@@ -105,7 +106,7 @@ var C = (e, t) => {
|
|
|
105
106
|
}));
|
|
106
107
|
}
|
|
107
108
|
}
|
|
108
|
-
}, this.pendingStateController = new
|
|
109
|
+
}, this.pendingStateController = new o(this);
|
|
109
110
|
}
|
|
110
111
|
get focusElement() {
|
|
111
112
|
return this.open ? this.search === "on" || this.search === "auto" && this.options?.length > 20 ? this.searchInput : this.optionsMenu : this.button;
|
|
@@ -144,7 +145,7 @@ var C = (e, t) => {
|
|
|
144
145
|
this.readonly || this.strategy && (this.open = !1, this.strategy.open = !1);
|
|
145
146
|
}
|
|
146
147
|
bindEvents() {
|
|
147
|
-
this.strategy?.abort(), this.strategy = new
|
|
148
|
+
this.strategy?.abort(), this.strategy = new s.desktop(this.button, this), this.strategy?.overlay && (this.strategy.overlay.type = "auto", this.strategy.overlay.placement = this.placement);
|
|
148
149
|
}
|
|
149
150
|
connectedCallback() {
|
|
150
151
|
super.connectedCallback(), this.ensurePopoverDependency();
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/*! * Lucero - The design system for Luzmo.
|
|
2
|
+
*
|
|
3
|
+
* Copyright © 2026 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
|
+
require("./tokens.cjs");const e=require("./decorate-Dq34MBGe.cjs"),t=require("./sized-mixin-BT7cv-fT.cjs"),n=require("./focusable-B6h03pAe.cjs");require("./icon-zOPAWCdx.cjs"),require("./popover-BsdqkvKI.cjs");const r=require("./dependency-manger-BSaHw9ju.cjs"),i=require("./match-media-B_0cVVtk.cjs");require("./progress-circle-bO_VAX3N.cjs");const a=require("./pending-state-CGHvTtKR.cjs");require("./overlay-Dn7EbA_W.cjs"),require("./tooltip-DjOW52n2.cjs");const o=require("./strategies-Bb7zEjrU.cjs"),s=require("./options-CP9V2CSJ.cjs");let c=require("lit"),l=require("lit/decorators.js"),u=require("@luzmo/icons"),d=require("lit/directives/if-defined.js"),f=require("lit/directives/class-map.js");var p=(e,t)=>{let n=getComputedStyle(e).getPropertyValue(t);for(;!n&&e.parentElement;)e=e.parentElement,n=getComputedStyle(e).getPropertyValue(t);return n.trim()},m=`: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{font-size:var(--luzmo-select-font-size,var(--select-font-size));margin-inline-end:var(--luzmo-select-spacing-text-to-icon,var(--select-spacing-text-to-icon))}@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-inline-edge-to-content,var(--select-inline-edge-to-content));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{height:100%;font-size:var(--luzmo-select-disclosure-icon-size,var(--select-disclosure-icon-size));align-items:center;display:flex;position:relative}.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-inline-edge-to-content-quiet,var(--select-inline-edge-to-content-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);box-shadow:none;border:none;border-radius:0;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{border:none;block-size:auto;inline-size:auto}@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))}#popover.search-on{padding:0 0 var(--luzmo-popover-content-area-spacing-vertical,var(--popover-content-area-spacing-vertical)) 0!important}#search-container{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));flex:none;display:flex;position:relative}#search-icon{left:var(--luzmo-select-inline-edge-to-content,var(--select-inline-edge-to-content));color:var(--luzmo-select-search-icon-color,var(--select-search-icon-color));font-size:var(--luzmo-select-search-icon-height,var(--select-search-icon-height));width:var(--luzmo-select-search-icon-width,var(--select-search-icon-width));text-align:center;pointer-events:none;justify-content:center;align-items:center;display:flex;position:absolute;top:0;bottom:0}#search:focus-within+#search-icon,#search:focus+#search-icon{color:var(--luzmo-select-search-icon-color-focus,var(--select-search-icon-color-focus))}#search{box-sizing:border-box;border-top-left-radius:var(--luzmo-popover-border-radius,var(--popover-border-radius));border-top-right-radius:var(--luzmo-popover-border-radius,var(--popover-border-radius));background-color:var(--luzmo-select-search-background-color,var(--select-search-background-color));width:100%;color:var(--luzmo-select-search-color,var(--select-search-color));height:var(--luzmo-select-button-block-size,var(--select-button-block-size));line-height:var(--luzmo-select-button-block-size,var(--select-button-block-size));padding-left:calc(var(--luzmo-select-inline-edge-to-content,var(--select-inline-edge-to-content)) + var(--luzmo-select-spacing-search-icon-to-text,var(--select-spacing-search-icon-to-text)) + var(--luzmo-select-search-icon-width,var(--select-search-icon-width)));padding-right:var(--luzmo-select-inline-edge-to-content,var(--select-inline-edge-to-content));font-size:var(--luzmo-select-font-size,var(--select-font-size));font-family:var(--luzmo-select-font-family,var(--select-font-family));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));align-items:center;display:flex}: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-font-weight:var(--luzmo-font-weight);--select-spacing-search-icon-to-text:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--select-search-icon-height:var(--luzmo-font-size);--select-search-icon-width:var(--luzmo-font-size);--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-background-color:var(--luzmo-background-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-placeholder-font-style:var(--luzmo-font-style);--select-button-line-height:var(--luzmo-line-height);--select-button-box-shadow:0px 1px 3px 0px var(--luzmo-shadow-color);--select-button-block-size:var(--luzmo-component-height);--select-button-border-radius:var(--luzmo-border-radius);--select-button-border-radius-reset:0;--select-inline-edge-to-content: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-inline-edge-to-content-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-inline-edge-to-content)}:host([size=s]){--select-button-block-size:var(--luzmo-component-height-s);--select-font-size:var(--luzmo-font-size-s);--select-search-icon-height:var(--luzmo-font-size-s);--select-search-icon-width: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-inline-edge-to-content: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-search-icon-height:var(--luzmo-font-size-l);--select-search-icon-width: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-inline-edge-to-content: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-search-icon-height:var(--luzmo-font-size-xl);--select-search-icon-width: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-inline-edge-to-content: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);background-color:var(--luzmo-option-highlight-label-background-color,var(--option-highlight-label-background-color,var(--luzmo-border-color)));padding-inline-start:var(--luzmo-option-label-inline-edge-to-content,var(--option-label-inline-edge-to-content))}:host{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)));display:inline-flex}: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{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{clip:rect(0, 0, 0, 0);clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:0 -1px -1px 0;padding:0;position:absolute;overflow:hidden}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)))}`,h=()=>c.html`
|
|
19
|
+
<div class="disclosure-icon icon">
|
|
20
|
+
${(0,u.luzmoIcon)(u.luzmoAngleDown,{className:`indicator`})}
|
|
21
|
+
</div>
|
|
22
|
+
`,g=()=>c.html`
|
|
23
|
+
<div class="icon-container validation-icon icon">
|
|
24
|
+
${(0,u.luzmoIcon)(u.luzmoAlert)}
|
|
25
|
+
</div>
|
|
26
|
+
`,_=()=>c.html`
|
|
27
|
+
<div class="icon-container search-icon icon" id="search-icon">
|
|
28
|
+
${(0,u.luzmoIcon)(u.luzmoSearch)}
|
|
29
|
+
</div>
|
|
30
|
+
`,v=`select-option-menu`,y=class extends t.n(n.t,{noDefaultSize:!0}){static get styles(){return[(0,c.unsafeCSS)(m)]}get selfManageFocusElement(){return this._selfManageFocusElement}constructor(){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.hideDropdownIcon=!1,this.pendingLabel=`Pending`,this.searchLabel=`Search`,this.noResultsLabel=`No results`,this.noDataLabel=`No data`,this.multipleLabelTemplate=`Selected {count} items`,this.label=`Select`,this.open=!1,this.readonly=!1,this.placement=`bottom-end`,this.quiet=!1,this.value=[],this.options=[],this.selects=`multiple`,this.dependencyManager=new r.t(this),this.isMobile=new i.r(this,i.t),this.listRole=`listbox`,this.itemRole=`option`,this.hasRenderedOverlay=!1,this._selfManageFocusElement=!1,this.selectionPromise=Promise.resolve(),this.enterKeydownOn=null,this._selectedOptions=[],this.handleSlottableRequest=e=>{},this.renderAngleIcon=()=>h(),this.renderAlertIcon=()=>g(),this._popoverDependencyRegistered=!1,this.handleEnterKeydown=e=>{if(e.code===`Enter`){if(this.enterKeydownOn){e.preventDefault();return}this.enterKeydownOn=e.target,this.addEventListener(`keyup`,e=>{e.code===`Enter`&&(this.enterKeydownOn=null)},{once:!0})}},this.clearValue=e=>{e.preventDefault(),e.stopPropagation(),this.value=[],this.strategy&&(this.strategy.preventNextToggle=`no`),this.open=!1,this.strategy&&(this.strategy.open=!1),this.dispatchEvent(new CustomEvent(`change`,{bubbles:!0,cancelable:!0,composed:!0,detail:{value:this.value??[]}}))},this.handleEscape=e=>{e.code===`Escape`&&this.open&&(e.stopPropagation(),e.preventDefault(),this.toggle(!1))},this.handleKeydown=e=>{let{code:t}=e;if(t===`Escape`){this.handleEscape(e);return}if([`Delete`,`Backspace`].includes(t)){this.clearValue(e);return}if(this.focused=!0,!(!t.startsWith(`Arrow`)||this.readonly||this.pending)){if(t===`ArrowUp`||t===`ArrowDown`){this.toggle(!0),e.preventDefault();return}if(e.preventDefault(),this.selects===`single`){let e=t===`ArrowRight`?1:-1,n=this.options.findIndex(e=>e?.value?.toString()===this.value?.[0]?.toString()),r=(this.options.length+n+e)%this.options.length,i=this.options.length;for(;(this.options?.[r]?.disabled||s.r(this.options?.[r]))&&i;)--i,r=(this.options.length+r+e)%this.options.length;let a=this.options[r];if(a?.disabled||s.r(a))return;this.value=[a.value??null],this.dispatchEvent(new CustomEvent(`change`,{bubbles:!0,cancelable:!0,composed:!0,detail:{value:this.value??[]}}))}}},this.pendingStateController=new a.t(this)}get focusElement(){return this.open?this.search===`on`||this.search===`auto`&&this.options?.length>20?this.searchInput:this.optionsMenu:this.button}forceFocusVisible(){this.disabled||(this.focused=!0)}click(){this.disabled||this.toggle()}handleButtonBlur(){this.focused=!1}focus(e){super.focus(e),!this.disabled&&this.focusElement&&(this.focused=this.hasVisibleFocusInTree())}handleHelperFocus(){this.focused=!0,this.button.focus()}handleChange(e){let t=e?.detail?.value??[];JSON.stringify(this.value)!==JSON.stringify(t)&&(this.value=t),this.strategy&&(this.strategy.preventNextToggle=`no`),e.stopPropagation(),(!e.cancelable||this.selects===`single`)&&(this.open=!1,this.strategy&&(this.strategy.open=!1)),e.preventDefault(),this.dispatchEvent(new CustomEvent(`change`,{bubbles:!0,cancelable:!0,composed:!0,detail:{value:this.value??[]}}))}handleButtonFocus(e){this.strategy?.handleButtonFocus(e)}toggle(e){this.readonly||this.pending||(this.open=e===void 0?!this.open:e,this.strategy&&(this.strategy.open=this.open),this._selfManageFocusElement=this.open)}close(){this.readonly||this.strategy&&(this.open=!1,this.strategy.open=!1)}bindEvents(){this.strategy?.abort(),this.strategy=new o.t.desktop(this.button,this),this.strategy?.overlay&&(this.strategy.overlay.type=`auto`,this.strategy.overlay.placement=this.placement)}connectedCallback(){super.connectedCallback(),this.ensurePopoverDependency()}disconnectedCallback(){this.close(),this.strategy?.releaseDescription(),super.disconnectedCallback()}handleTooltipSlotchange(e){this.tooltipEl=e.target.assignedElements()[0]}get labelTemplate(){let e=this._selectedOptions?.length===1&&this._selectedOptions[0]?.icon,t=c.html`<div
|
|
31
|
+
id="icon"
|
|
32
|
+
?hidden=${typeof this.icons==`string`||this.value?.length>1||!e}
|
|
33
|
+
>
|
|
34
|
+
${e?(0,u.luzmoIcon)(this._selectedOptions[0].icon):c.nothing}
|
|
35
|
+
</div>`,n=e=>e.replaceAll(/{([^}]+)}/g,(e,t)=>t===`count`?String(this.value?.length):e),r={"visually-hidden":this.icons===`only`&&this.value?.length>0,placeholder:!this.value?.length,label:!0},i;i=this.value?.length?this.value.length===1?c.html`<span
|
|
36
|
+
>${this._selectedOptions?.[0]?.shortLabel??this._selectedOptions?.[0]?.label??this.value?.[0]}</span
|
|
37
|
+
>`:c.html`<span
|
|
38
|
+
>${n(this.multipleLabelTemplate)}</span
|
|
39
|
+
>`:c.html`
|
|
40
|
+
<slot name="label" id="label">
|
|
41
|
+
<span aria-hidden="true"> ${this.label} </span>
|
|
42
|
+
</slot>
|
|
43
|
+
`;let a=this.value?.length?c.html`
|
|
44
|
+
<div aria-hidden="true" class="visually-hidden" id="applied-label">
|
|
45
|
+
${this.label}
|
|
46
|
+
<slot name="label"></slot>
|
|
47
|
+
</div>
|
|
48
|
+
`:c.html` <span hidden id="applied-label">${this.label}</span> `;return[c.html`
|
|
49
|
+
${this.value?.length===1?t:c.nothing}
|
|
50
|
+
<div
|
|
51
|
+
id=${(0,d.ifDefined)(this.value?.length?`label`:void 0)}
|
|
52
|
+
class=${(0,f.classMap)(r)}
|
|
53
|
+
>
|
|
54
|
+
${i}
|
|
55
|
+
</div>
|
|
56
|
+
${a}
|
|
57
|
+
${this.invalid&&!this.pending?c.html` ${this.renderAlertIcon()} `:c.nothing}
|
|
58
|
+
${this.pendingStateController.renderPendingState()}
|
|
59
|
+
${this.clearable&&!this.readonly&&this.value?.length>0?c.html`
|
|
60
|
+
<div class="icon-container clear-icon icon" @click=${this.clearValue}>
|
|
61
|
+
${(0,u.luzmoIcon)(u.luzmoClose14)}
|
|
62
|
+
</div>
|
|
63
|
+
`:c.nothing}
|
|
64
|
+
${this.readonly||this.hideDropdownIcon?c.nothing:this.renderAngleIcon()}
|
|
65
|
+
<slot
|
|
66
|
+
aria-hidden="true"
|
|
67
|
+
name="tooltip"
|
|
68
|
+
id="tooltip"
|
|
69
|
+
@slotchange=${this.handleTooltipSlotchange}
|
|
70
|
+
></slot>
|
|
71
|
+
`]}update(e){e.has(`disabled`)&&this.disabled&&this.strategy&&(this.open=!1,this.strategy.open=!1),e.has(`pending`)&&this.pending&&this.strategy&&(this.open=!1,this.strategy.open=!1),super.update(e)}bindButtonKeydownListener(){this.button.addEventListener(`keydown`,this.handleKeydown)}willUpdate(e){let t=e.has(`open`),n=e.has(`value`),r=e.has(`options`),i=e.has(`selects`),a=e.get(`open`);i&&this.selects===`single`&&this.value?.length>1&&(console.warn(`luzmo-select is being set to a single value given the selects property changed to 'single'`),this.value=this.value.slice(0,1)),t&&a===!1&&this.open&&this.searchString&&(this.searchString=``),(n||r)&&this.setSelectedOptionsFromValue()}updated(e){super.updated(e);let t=e.has(`options`),n=e.has(`open`),r=e.has(`placement`);if(n&&(this.strategy.open=this.open,this.open===!1&&this.optionsMenu.scrollToTop()),t){let e=this.options?.length??0;for(let t of this.options??[])t.children?.length&&(e+=t.children.length);if(e>25){let e=(e,t=e.label)=>(t?.length??0)+(e.children?.length?0:e.shortcut?.length??0),t=this.options[0];for(let n of this.options)e(n)>e(t)&&(t=n);for(let n of this.options)if(n.children?.length)for(let r of n.children){let i=`${n.label} (${r.label})`;e(r,i)>e(t)&&(t={...r,label:i})}this._estimatePopoverWidth(t)}else this.style.removeProperty(`--select-popover-width`)}this.strategy?.overlay&&(this.strategy.overlay.type!==`auto`&&(this.strategy.overlay.type=`auto`),(r||this.strategy.overlay.type===`auto`)&&(this.strategy.overlay.placement=this.placement))}firstUpdated(e){super.firstUpdated(e),this.bindButtonKeydownListener(),this.bindEvents()}_getCssVarInPixels(e){let t=p(this,e),n;if(t.endsWith(`rem`)){let e=Number.parseFloat(getComputedStyle(document.documentElement).fontSize);n=Number.parseFloat(t)*e}else if(t.endsWith(`em`)){let e=Number.parseFloat(getComputedStyle(this).fontSize);n=Number.parseFloat(t)*e}else n=Number.parseFloat(t);return n>=0?n:void 0}_estimatePopoverWidth(e){let t=this._getCssVarInPixels(`--luzmo-select-font-size`)??this._getCssVarInPixels(`--select-font-size`),n=this._getCssVarInPixels(`--luzmo-select-popover-min-width`)??this._getCssVarInPixels(`--select-popover-min-width`),r=this._getCssVarInPixels(`--luzmo-spacing-5`),i=document.createElement(`luzmo-options`);i.style.setProperty(`--luzmo-select-font-size`,`${t}px`),i.options=[e],i.value=[e.value??null],i.variant=this.variant,i.size=this.size,i.style.position=`absolute`,i.style.left=`-9999px`,i.style.top=`-9999px`,i.style.opacity=`0`,i.style.width=`auto`,document.body.append(i),i.updateComplete.then(()=>{let e=i.offsetWidth+(r??0);return e>(n??0)?this.style.setProperty(`--select-popover-width`,`${e}px`):this.style.removeProperty(`--select-popover-width`),i.remove(),e}).catch(e=>{console.error(e),i.remove()})}get dismissHelper(){return c.html`
|
|
72
|
+
<div class="visually-hidden">
|
|
73
|
+
<button
|
|
74
|
+
tabindex="-1"
|
|
75
|
+
aria-label="Dismiss"
|
|
76
|
+
@click=${this.close}
|
|
77
|
+
></button>
|
|
78
|
+
</div>
|
|
79
|
+
`}render(){return this.tooltipEl&&(this.tooltipEl.disabled=this.open),c.html`
|
|
80
|
+
<span
|
|
81
|
+
id="focus-helper"
|
|
82
|
+
tabindex=${this.focused||this.open?`-1`:`0`}
|
|
83
|
+
@focus=${this.handleHelperFocus}
|
|
84
|
+
aria-describedby=${v}
|
|
85
|
+
></span>
|
|
86
|
+
<button
|
|
87
|
+
aria-controls=${(0,d.ifDefined)(this.open?`menu`:void 0)}
|
|
88
|
+
aria-describedby="tooltip"
|
|
89
|
+
aria-expanded=${this.open?`true`:`false`}
|
|
90
|
+
aria-haspopup="true"
|
|
91
|
+
aria-labelledby="loader icon label applied-label"
|
|
92
|
+
id="button"
|
|
93
|
+
class=${(0,d.ifDefined)(this.labelAlignment?`label-${this.labelAlignment}`:void 0)}
|
|
94
|
+
@blur=${this.handleButtonBlur}
|
|
95
|
+
@keydown=${{handleEvent:this.handleEnterKeydown,capture:!0}}
|
|
96
|
+
?disabled=${this.disabled}
|
|
97
|
+
tabindex="-1"
|
|
98
|
+
>
|
|
99
|
+
${this.labelTemplate}
|
|
100
|
+
</button>
|
|
101
|
+
${this.renderMenu} ${this.renderDescriptionSlot}
|
|
102
|
+
`}get renderDescriptionSlot(){return c.html`
|
|
103
|
+
<div id=${v}>
|
|
104
|
+
<slot name="description"></slot>
|
|
105
|
+
</div>
|
|
106
|
+
`}setSelectedOptionsFromValue(){let e=[];for(let t of this.options){let n=t?.value;!t.children?.length&&this.value?.includes(n??null)&&e.push(t);for(let n of t.children??[]){let r=n?.value;this.value?.includes(r??null)&&e.push({...n,label:`${t.label} (${n.label})`})}}this._selectedOptions=e}renderSearchInput(){return c.html`
|
|
107
|
+
<div id="search-container">
|
|
108
|
+
<input
|
|
109
|
+
type="text"
|
|
110
|
+
id="search"
|
|
111
|
+
.placeholder=${this.searchLabel}
|
|
112
|
+
@input=${this.handleSearchInput}
|
|
113
|
+
@keydown=${this.handleSearchKeydown}
|
|
114
|
+
.value=${this.searchString??``}
|
|
115
|
+
.aria-label=${this.searchLabel}
|
|
116
|
+
autocomplete="off"
|
|
117
|
+
tabindex="0"
|
|
118
|
+
role="searchbox"
|
|
119
|
+
/>
|
|
120
|
+
${_()}
|
|
121
|
+
</div>
|
|
122
|
+
`}filterOptions(){let e=this.searchString?.toLowerCase()??``,t=this.options.filter(t=>s.r(t)?!0:!!(typeof t==`string`?t:t?.label)?.toString()?.toLowerCase()?.includes(e));if(!e)return t;let n=t.filter((e,n)=>{if(!s.r(e))return!0;for(let e of t.slice(n+1)){if(e?.header)return!1;if(!s.r(e))return!0}return!1});return n.filter((e,t)=>!e?.divider||t>0&&!n[t-1]?.divider)}get renderMenu(){let e=this.filterOptions(),t=e.some(e=>!s.r(e)),n=c.html`
|
|
123
|
+
<luzmo-options
|
|
124
|
+
.variant=${this.variant}
|
|
125
|
+
aria-labelledby="applied-label"
|
|
126
|
+
id="menu"
|
|
127
|
+
?emphasized=${this.emphasized}
|
|
128
|
+
.selects=${this.selects??`multiple`}
|
|
129
|
+
.options=${e}
|
|
130
|
+
.value=${this.value}
|
|
131
|
+
.optionIconRenderer=${this.optionIconRenderer}
|
|
132
|
+
?pending=${this.retrieving}
|
|
133
|
+
?no-wrap=${this.noWrap}
|
|
134
|
+
@change=${this.handleChange}
|
|
135
|
+
@keydown=${{handleEvent:this.handleEnterKeydown,capture:!0}}
|
|
136
|
+
@luzmo-scrolled=${this.handleScrolled}
|
|
137
|
+
@luzmo-exceeded-top=${this.handleExceededTop}
|
|
138
|
+
role=${this.listRole}
|
|
139
|
+
size=${this.size}
|
|
140
|
+
tabindex="0"
|
|
141
|
+
>
|
|
142
|
+
</luzmo-options>
|
|
143
|
+
${!t&&!this.retrieving&&!this.pending?c.html`<div id="no-results">
|
|
144
|
+
${this.searchString?this.noResultsLabel:this.noDataLabel}
|
|
145
|
+
</div>`:c.nothing}
|
|
146
|
+
`;return this.hasRenderedOverlay=this.hasRenderedOverlay||this.focused||this.open,this.hasRenderedOverlay?(this.dependencyManager.loaded&&this.dependencyManager.add(`luzmo-overlay`),this.renderOverlay(n)):n}renderOverlay(e){return this.strategy?.overlay===void 0?e:((0,c.render)(this.renderContainer(e),this.strategy?.overlay,{host:this}),this.strategy?.overlay)}ensurePopoverDependency(){this._popoverDependencyRegistered||(this._popoverDependencyRegistered=!0,this.dependencyManager.add(`luzmo-popover`))}renderContainer(e){let t=this.search===`on`||this.searchString&&this.searchString?.length>0||this.search===`auto`&&this.options?.length>20,n=c.html`
|
|
147
|
+
${t?this.renderSearchInput():c.nothing} ${this.dismissHelper} ${e} ${this.dismissHelper}
|
|
148
|
+
`;return c.html`
|
|
149
|
+
<luzmo-popover
|
|
150
|
+
class=${(0,d.ifDefined)(t?`search-on`:void 0)}
|
|
151
|
+
id="popover"
|
|
152
|
+
size=${this.size}
|
|
153
|
+
role="presentation"
|
|
154
|
+
placement=${this.placement}
|
|
155
|
+
>
|
|
156
|
+
${n}
|
|
157
|
+
</luzmo-popover>
|
|
158
|
+
`}async getUpdateComplete(){let e=await super.getUpdateComplete();return await this.selectionPromise,this.overlayElement&&await this.overlayElement.updateComplete,e}handleScrolled(e){e.stopPropagation(),e.preventDefault(),this.dispatchEvent(new CustomEvent(`luzmo-scrolled`,{bubbles:!0,composed:!0,cancelable:!0,detail:{first:e?.detail?.first,last:e?.detail?.last}}))}handleExceededTop(e){e.preventDefault(),e.stopPropagation(),this.searchInput?this.searchInput.focus():this.toggle(!1)}handleSearchInput(e){let t=e.target.value;t!==this.searchString&&(this.searchString=t,this.dispatchEvent(new CustomEvent(`luzmo-search`,{bubbles:!0,composed:!0,cancelable:!0,detail:{string:this.searchString}})))}handleSearchKeydown(e){if(e.code===`Escape`){this.searchString?this.searchString=``:this.handleEscape(e);return}if(e.code===`ArrowDown`){this.optionsMenu.focus(),e.preventDefault(),e.stopPropagation();return}else if(e.code===`ArrowUp`){this.toggle(!1);return}}};e.t([(0,l.query)(`#button`)],y.prototype,`button`,void 0),e.t([(0,l.property)({type:Boolean,reflect:!0})],y.prototype,`disabled`,void 0),e.t([(0,l.property)({type:Boolean,reflect:!0})],y.prototype,`focused`,void 0),e.t([(0,l.property)({type:String,reflect:!0})],y.prototype,`icons`,void 0),e.t([(0,l.property)({type:String,reflect:!0})],y.prototype,`variant`,void 0),e.t([(0,l.property)({type:Boolean,reflect:!0})],y.prototype,`emphasized`,void 0),e.t([(0,l.property)({type:Boolean,reflect:!0})],y.prototype,`invalid`,void 0),e.t([(0,l.property)({type:String,reflect:!0})],y.prototype,`search`,void 0),e.t([(0,l.property)({type:Boolean,reflect:!0,attribute:`no-wrap`})],y.prototype,`noWrap`,void 0),e.t([(0,l.property)({type:Boolean,reflect:!0})],y.prototype,`retrieving`,void 0),e.t([(0,l.property)({type:Boolean,reflect:!0})],y.prototype,`pending`,void 0),e.t([(0,l.property)({type:Boolean,reflect:!0})],y.prototype,`clearable`,void 0),e.t([(0,l.property)({type:Boolean,reflect:!0,attribute:`hide-dropdown-icon`})],y.prototype,`hideDropdownIcon`,void 0),e.t([(0,l.property)({type:String,attribute:`pending-label`})],y.prototype,`pendingLabel`,void 0),e.t([(0,l.property)({type:String,attribute:`search-label`})],y.prototype,`searchLabel`,void 0),e.t([(0,l.property)({type:String,attribute:`no-results-label`})],y.prototype,`noResultsLabel`,void 0),e.t([(0,l.property)({type:String,attribute:`no-data-label`})],y.prototype,`noDataLabel`,void 0),e.t([(0,l.property)({type:String,attribute:`multiple-label-template`,reflect:!0})],y.prototype,`multipleLabelTemplate`,void 0),e.t([(0,l.property)({type:String,reflect:!0})],y.prototype,`label`,void 0),e.t([(0,l.property)({type:Boolean,reflect:!0})],y.prototype,`open`,void 0),e.t([(0,l.property)({type:Boolean,reflect:!0})],y.prototype,`readonly`,void 0),e.t([(0,l.state)()],y.prototype,`labelAlignment`,void 0),e.t([(0,l.state)()],y.prototype,`displayLabelContent`,void 0),e.t([(0,l.state)()],y.prototype,`searchString`,void 0),e.t([(0,l.query)(`luzmo-options`)],y.prototype,`optionsMenu`,void 0),e.t([(0,l.query)(`#search`)],y.prototype,`searchInput`,void 0),e.t([(0,l.query)(`luzmo-overlay`)],y.prototype,`overlayElement`,void 0),e.t([(0,l.property)({type:String,reflect:!0})],y.prototype,`placement`,void 0),e.t([(0,l.property)({type:Boolean,reflect:!0})],y.prototype,`quiet`,void 0),e.t([(0,l.property)({type:Array,hasChanged(e,t){return JSON.stringify(e??[])!==JSON.stringify(t??[])},converter:{fromAttribute:e=>{if(!e||e===``)return[];try{return JSON.parse(e)}catch{return[]}},toAttribute:e=>JSON.stringify(e)}})],y.prototype,`value`,void 0),e.t([(0,l.property)({type:Array,hasChanged(e,t){return JSON.stringify(e??[])!==JSON.stringify(t??[])}})],y.prototype,`options`,void 0),e.t([(0,l.property)({attribute:!1})],y.prototype,`optionIconRenderer`,void 0),e.t([(0,l.property)({type:String,reflect:!0})],y.prototype,`selects`,void 0),customElements.get(`luzmo-select`)||customElements.define(`luzmo-select`,y),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return y}});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*! * Lucero - The design system for Luzmo.
|
|
2
|
+
*
|
|
3
|
+
* Copyright © 2026 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
|
+
const e=require("./platform-BAjeJp2W.cjs");var t=function(e){return e[e.desktop=0]=`desktop`,e[e.mobile=1]=`mobile`,e}({}),n=`remove-focus-ring-safari-hack`,r=class{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}Promise.resolve().then(()=>require("./overlay/index.cjs")).then(()=>{this.overlay=document.createElement(`luzmo-overlay`),this.host.open=!0,this.host.requestUpdate()})}}get overlay(){return this._overlay}set overlay(e){e&&this.overlay!==e&&(this._overlay=e,this.initOverlay())}constructor(e,t){this.target=e,this.host=t,this.listenersBound=!1,this.preventNextToggle=`no`,this.pointerdownState=!1,this.enterKeydownOn=null,this._open=!1,this.target=e,this.host=t,this.host.addController(this),this.init()}releaseDescription(){}handleBeforetoggle(e){e.composedPath()[0]===e.target&&(e.newState===`closed`&&(this.preventNextToggle===`no`?this.open=!1:this.pointerdownState||this.overlay?.manuallyKeepOpen()),this.open||(this.host.optionsMenu.updateSelectedItemIndex(),typeof this.host.optionsMenu?.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(){this.releaseDescription(),this.abortController?.abort(),this.listenersBound=!1}hostConnected(){this.init()}hostDisconnected(){this.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)}},i={desktop:class extends r{constructor(...e){super(...e),this.type=t.desktop}handlePointerdown(e){if(e.target.closest(`.clear-icon`)||e.button!==0||e.pointerType===`touch`)return;this.pointerdownState=this.open,this.preventNextToggle=`maybe`;let t=0,n=()=>{cancelAnimationFrame(t),t=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(e){this.enterKeydownOn&&this.enterKeydownOn!==this.target||this.preventNextToggle!==`yes`&&(e?.type===`click`&&this.open!==this.pointerdownState||this.host.toggle())}init(){if(this.listenersBound)return;this.abortController=new AbortController;let{signal:e}=this.abortController;this.target.addEventListener(`click`,e=>this.handleActivate(e),{signal:e}),this.target.addEventListener(`pointerdown`,e=>this.handlePointerdown(e),{signal:e}),this.target.addEventListener(`focus`,e=>this.handleButtonFocus(e),{signal:e}),this.listenersBound=!0}},mobile:class extends r{constructor(...e){super(...e),this.type=t.mobile}handleClick(e){e.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`,e.u()&&this.target.classList.add(n))}handleFocusOut(){this.host.open||e.u()&&this.target.classList.contains(`remove-focus-ring-safari-hack`)&&this.target.classList.remove(n)}init(){if(this.listenersBound)return;this.abortController=new AbortController;let{signal:e}=this.abortController;this.target.addEventListener(`click`,e=>this.handleClick(e),{signal:e}),this.target.addEventListener(`pointerdown`,e=>this.handlePointerdown(e),{signal:e}),this.target.addEventListener(`focusout`,()=>this.handleFocusOut(),{signal:e}),this.listenersBound=!0}}};Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return i}});
|
|
@@ -16,23 +16,10 @@
|
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
18
|
import { u as e } from "./platform-Ce9pNsR9.js";
|
|
19
|
-
//#region src/utils/
|
|
20
|
-
var t =
|
|
21
|
-
constructor(e, t) {
|
|
22
|
-
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);
|
|
23
|
-
}
|
|
24
|
-
hostConnected() {
|
|
25
|
-
this.media?.addEventListener("change", this.onChange);
|
|
26
|
-
}
|
|
27
|
-
hostDisconnected() {
|
|
28
|
-
this.media?.removeEventListener("change", this.onChange);
|
|
29
|
-
}
|
|
30
|
-
onChange(e) {
|
|
31
|
-
this.matches !== e.matches && (this.matches = e.matches, this.host.requestUpdate(this.key, !this.matches));
|
|
32
|
-
}
|
|
33
|
-
}, i = /* @__PURE__ */ function(e) {
|
|
19
|
+
//#region src/utils/button-interaction-controllers/interaction-controller.ts
|
|
20
|
+
var t = /* @__PURE__ */ function(e) {
|
|
34
21
|
return e[e.desktop = 0] = "desktop", e[e.mobile = 1] = "mobile", e;
|
|
35
|
-
}({}),
|
|
22
|
+
}({}), n = "remove-focus-ring-safari-hack", r = class {
|
|
36
23
|
get activelyOpening() {
|
|
37
24
|
return !1;
|
|
38
25
|
}
|
|
@@ -87,10 +74,10 @@ var t = "(max-width: 743px) and (hover: none) and (pointer: coarse)", n = "(hove
|
|
|
87
74
|
hostUpdated() {
|
|
88
75
|
this.overlay && this.host.dependencyManager.loaded && this.host.open !== this.overlay.open && (this.overlay.willPreventClose = this.preventNextToggle !== "no", this.overlay.open = this.host.open);
|
|
89
76
|
}
|
|
90
|
-
},
|
|
91
|
-
desktop: class extends
|
|
77
|
+
}, i = {
|
|
78
|
+
desktop: class extends r {
|
|
92
79
|
constructor(...e) {
|
|
93
|
-
super(...e), this.type =
|
|
80
|
+
super(...e), this.type = t.desktop;
|
|
94
81
|
}
|
|
95
82
|
handlePointerdown(e) {
|
|
96
83
|
if (e.target.closest(".clear-icon") || e.button !== 0 || e.pointerType === "touch") return;
|
|
@@ -114,18 +101,18 @@ var t = "(max-width: 743px) and (hover: none) and (pointer: coarse)", n = "(hove
|
|
|
114
101
|
this.target.addEventListener("click", (e) => this.handleActivate(e), { signal: e }), this.target.addEventListener("pointerdown", (e) => this.handlePointerdown(e), { signal: e }), this.target.addEventListener("focus", (e) => this.handleButtonFocus(e), { signal: e }), this.listenersBound = !0;
|
|
115
102
|
}
|
|
116
103
|
},
|
|
117
|
-
mobile: class extends
|
|
104
|
+
mobile: class extends r {
|
|
118
105
|
constructor(...e) {
|
|
119
|
-
super(...e), this.type =
|
|
106
|
+
super(...e), this.type = t.mobile;
|
|
120
107
|
}
|
|
121
108
|
handleClick(e) {
|
|
122
109
|
e.target.closest(".clear-button") && (this.preventNextToggle === "no" && (this.open = !this.open), this.preventNextToggle = "no");
|
|
123
110
|
}
|
|
124
111
|
handlePointerdown(t) {
|
|
125
|
-
t.target.closest(".clear-button") && (this.preventNextToggle = this.open ? "yes" : "no", e() && this.target.classList.add(
|
|
112
|
+
t.target.closest(".clear-button") && (this.preventNextToggle = this.open ? "yes" : "no", e() && this.target.classList.add(n));
|
|
126
113
|
}
|
|
127
114
|
handleFocusOut() {
|
|
128
|
-
this.host.open || e() && this.target.classList.contains("remove-focus-ring-safari-hack") && this.target.classList.remove(
|
|
115
|
+
this.host.open || e() && this.target.classList.contains("remove-focus-ring-safari-hack") && this.target.classList.remove(n);
|
|
129
116
|
}
|
|
130
117
|
init() {
|
|
131
118
|
if (this.listenersBound) return;
|
|
@@ -136,4 +123,4 @@ var t = "(max-width: 743px) and (hover: none) and (pointer: coarse)", n = "(hove
|
|
|
136
123
|
}
|
|
137
124
|
};
|
|
138
125
|
//#endregion
|
|
139
|
-
export {
|
|
126
|
+
export { i as t };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* Announces sort changes through one polite live region shared by every
|
|
4
|
+
* table. A grid may only own rows, so the region cannot live in the table's
|
|
5
|
+
* own tree; it sits on `document.body` while any table is connected.
|
|
6
|
+
*/
|
|
7
|
+
export declare class TableAnnouncerController implements ReactiveController {
|
|
8
|
+
constructor(host: ReactiveControllerHost);
|
|
9
|
+
announce(message: string): void;
|
|
10
|
+
hostConnected(): void;
|
|
11
|
+
hostDisconnected(): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
+
import { TableColumnLayout } from '../table-columns';
|
|
3
|
+
import type { LuzmoTableHeadCell } from '../table-head-cell';
|
|
4
|
+
import { TableLabels } from '../types';
|
|
5
|
+
export interface TableColumnResizeHost extends ReactiveControllerHost, HTMLElement {
|
|
6
|
+
columnWidths: Record<string, number>;
|
|
7
|
+
}
|
|
8
|
+
export interface TableColumnResizeOptions {
|
|
9
|
+
owns: (event: Event) => boolean;
|
|
10
|
+
isLTR: () => boolean;
|
|
11
|
+
language: () => string;
|
|
12
|
+
labels: () => TableLabels;
|
|
13
|
+
selectAllLabel: () => string | undefined;
|
|
14
|
+
layouts: () => TableColumnLayout[];
|
|
15
|
+
headCells: () => LuzmoTableHeadCell[];
|
|
16
|
+
announce: (message: string) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const resizeHandleFromPath: (path: EventTarget[]) => HTMLElement | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Pointer and keyboard column resizing. Drag state, the localized width
|
|
21
|
+
* announcement, and the committed `luzmo-column-resized` event live here.
|
|
22
|
+
*/
|
|
23
|
+
export declare class TableColumnResizeController implements ReactiveController {
|
|
24
|
+
private readonly host;
|
|
25
|
+
private readonly options;
|
|
26
|
+
private drag?;
|
|
27
|
+
private widthFormatter;
|
|
28
|
+
private formatterLanguage;
|
|
29
|
+
constructor(host: TableColumnResizeHost, options: TableColumnResizeOptions);
|
|
30
|
+
hostConnected(): void;
|
|
31
|
+
hostDisconnected(): void;
|
|
32
|
+
/** Resizes when the event path contains a column separator. */
|
|
33
|
+
handleKeydown(event: KeyboardEvent): void;
|
|
34
|
+
private handlePointerDown;
|
|
35
|
+
private handlePointerMove;
|
|
36
|
+
private handlePointerUp;
|
|
37
|
+
private resizeColumn;
|
|
38
|
+
private setColumnWidth;
|
|
39
|
+
private formatWidth;
|
|
40
|
+
private cellFromPath;
|
|
41
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ReactiveElement } from 'lit';
|
|
2
|
+
import type { FocusGroupConfig } from '../../../utils/reactive-controllers/focus-group';
|
|
3
|
+
import { RovingTabindexController } from '../../../utils/reactive-controllers/roving-tabindex';
|
|
4
|
+
export type TableGridNavigationConfig = FocusGroupConfig<HTMLElement> & {
|
|
5
|
+
rows: () => HTMLElement[][];
|
|
6
|
+
isLTR: () => boolean;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* One roving tab stop for the body grid. Arrow, Home, and End movement lives
|
|
10
|
+
* here because the shared focus group treats Home and End as list wrap-arounds
|
|
11
|
+
* and cannot clamp ragged rows. Header cells and resize separators stay
|
|
12
|
+
* outside this group; each is its own tab stop.
|
|
13
|
+
*/
|
|
14
|
+
export declare class TableGridNavigationController extends RovingTabindexController<HTMLElement> {
|
|
15
|
+
private readonly rows;
|
|
16
|
+
private readonly isLTR;
|
|
17
|
+
constructor(host: ReactiveElement, { rows, isLTR, ...config }: TableGridNavigationConfig);
|
|
18
|
+
acceptsEventCode(code: string): boolean;
|
|
19
|
+
handleFocusout: (event: FocusEvent) => void;
|
|
20
|
+
handleKeydown: (event: KeyboardEvent) => void;
|
|
21
|
+
focusElement(element: HTMLElement, options?: FocusOptions): void;
|
|
22
|
+
private owns;
|
|
23
|
+
private cellFromPath;
|
|
24
|
+
private activeGridCell;
|
|
25
|
+
private navigationTarget;
|
|
26
|
+
private columnKey;
|
|
27
|
+
private cellForKey;
|
|
28
|
+
}
|