@luzmo/lucero 2.2.1 → 2.4.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/LICENSE +1 -1
- package/README.md +34 -1
- package/components/accordion/index.cjs +2 -2
- package/components/accordion/index.js +3 -8
- package/components/{accordion-DpsYMoeb.cjs → accordion-BK0LfhmL.cjs} +2 -2
- package/components/{accordion-BDchhAjE.js → accordion-ciplqKwM.js} +2 -1
- package/components/action-bar/action-bar.d.ts +3 -3
- package/components/action-bar/index.cjs +2 -2
- package/components/action-bar/index.js +3 -8
- package/components/{action-bar-2FGCCKMW.js → action-bar-BZBIeGo7.js} +6 -5
- package/components/action-bar-DAqG_7VG.cjs +39 -0
- package/components/action-button/index.cjs +2 -2
- package/components/action-button/index.js +3 -8
- package/components/{action-button-OB5MM04X.js → action-button-BRijXjEz.js} +2 -1
- package/components/action-button-CX1uYbQp.cjs +22 -0
- package/components/action-group/index.cjs +2 -2
- package/components/action-group/index.js +3 -11
- package/components/{action-group-BQ-fyPYS.js → action-group-DSiruuF0.js} +5 -2
- package/components/action-group-oo7YV0EW.cjs +20 -0
- package/components/action-menu/index.cjs +2 -2
- package/components/action-menu/index.js +3 -8
- package/components/{action-menu-Diehg1Kc.js → action-menu-C0sHNsjG.js} +7 -6
- package/components/{action-menu-CtMswuyc.cjs → action-menu-CwzRbF61.cjs} +2 -2
- package/components/avatar/index.cjs +2 -2
- package/components/avatar/index.js +3 -8
- package/components/{avatar-Nb0368Wi.js → avatar-CwSyYAKV.js} +2 -1
- package/components/avatar-DHS5UGTJ.cjs +34 -0
- package/components/badge/index.cjs +2 -2
- package/components/badge/index.js +3 -8
- package/components/{badge-DP1uxXaZ.js → badge-D2Hjf-Ww.js} +2 -1
- package/components/badge-D8pIDEoq.cjs +23 -0
- package/components/button/index.cjs +2 -2
- package/components/button/index.js +4 -9
- package/components/button-Bvnidb4x.cjs +20 -0
- package/components/{button-DXWWEbir.js → button-DIV_j_U3.js} +4 -3
- package/components/button-base-DiNxrttk.cjs +1 -1
- package/components/button-base-DiPzVpp4.js +1 -1
- package/components/button-group/index.cjs +2 -2
- package/components/button-group/index.js +3 -8
- package/components/button-group-Du7R4SxZ.cjs +18 -0
- package/components/{button-group-DaANSInm.js → button-group-Duf-Igst.js} +2 -1
- package/components/calendar/index.cjs +2 -2
- package/components/calendar/index.js +3 -8
- package/components/{calendar-C8u_88jX.js → calendar-D1UtHvpY.js} +4 -3
- package/components/calendar-pQxEWdYC.cjs +138 -0
- package/components/chat-message/index.cjs +2 -2
- package/components/chat-message/index.js +3 -8
- package/components/chat-message-Dgo6h0rD.cjs +148 -0
- package/components/{chat-message-CXq0Trjx.js → chat-message-T6QIK2Bl.js} +528 -563
- package/components/chat-message-group/index.cjs +2 -2
- package/components/chat-message-group/index.js +3 -8
- package/components/chat-message-group-CvxdX3jt.cjs +24 -0
- package/components/{chat-message-group-D7vdn2gG.js → chat-message-group-k9lo-ZqD.js} +2 -1
- package/components/checkbox/index.cjs +2 -2
- package/components/checkbox/index.js +3 -8
- package/components/{checkbox-6YzkdHR4.js → checkbox-BEjvkjfc.js} +2 -1
- package/components/checkbox-ClVrkeLp.cjs +25 -0
- package/components/checkbox-mixin-jqmrh48O.js +1 -1
- package/components/checkbox-mixin-rFRXqyrK.cjs +1 -1
- package/components/{close-button-BntGLAcp.cjs → close-button-BAELImQY.cjs} +2 -2
- package/components/{close-button-D12zZ9zC.js → close-button-Dlvtf9lB.js} +3 -3
- package/components/color-area/index.cjs +2 -2
- package/components/color-area/index.js +3 -8
- package/components/color-area-CmKlQG1i.cjs +80 -0
- package/components/{color-area-DMpXKgPY.js → color-area-lbg8wwZG.js} +3 -2
- package/components/color-controller-DbyPc33Y.cjs +1 -1
- package/components/color-controller-Rg_Zl0sT.js +1 -1
- package/components/color-field/index.cjs +2 -2
- package/components/color-field/index.js +3 -8
- package/components/{color-field-BNGnBRSO.cjs → color-field-BH9x46k_.cjs} +2 -2
- package/components/{color-field-CUdHxonc.js → color-field-C9S-Fv46.js} +2 -1
- package/components/color-handle/color-handle.d.ts +1 -1
- package/components/color-handle/index.cjs +2 -2
- package/components/color-handle/index.js +3 -8
- package/components/color-handle-2iFLp9FN.cjs +24 -0
- package/components/{color-handle-TKbLs1ax.js → color-handle-BEDQ1RcS.js} +3 -2
- package/components/color-loupe/index.cjs +2 -2
- package/components/color-loupe/index.js +3 -11
- package/components/color-loupe-6NcLbFco.cjs +56 -0
- package/components/{color-loupe-DAxrNPJz.js → color-loupe-CqHyyvjQ.js} +5 -2
- package/components/color-menu/index.cjs +2 -2
- package/components/color-menu/index.js +3 -8
- package/components/color-menu-BYTgxLQG.cjs +89 -0
- package/components/{color-menu-jkdcr5ir.js → color-menu-qJK_clDq.js} +9 -8
- package/components/color-palette/index.cjs +2 -2
- package/components/color-palette/index.js +3 -8
- package/components/{color-palette-FQyIMSwP.js → color-palette-CqiO5ohz.js} +2 -1
- package/components/color-palette-group/index.cjs +2 -2
- package/components/color-palette-group/index.js +3 -8
- package/components/color-palette-group-D4k_7pW6.cjs +28 -0
- package/components/{color-palette-group-o6bnF-Ir.js → color-palette-group-zByrO_qb.js} +2 -1
- package/components/color-palette-x6W09EBL.cjs +18 -0
- package/components/color-picker/index.cjs +2 -2
- package/components/color-picker/index.js +3 -8
- package/components/{color-picker-C4pvkA2k.cjs → color-picker-BAikpqUT.cjs} +2 -2
- package/components/{color-picker-DF3gBQvH.js → color-picker-CSuAPo5X.js} +6 -5
- package/components/color-slider/index.cjs +2 -2
- package/components/color-slider/index.js +3 -8
- package/components/{color-slider-DejvUYrW.js → color-slider-0JzdSRTy.js} +3 -2
- package/components/color-slider-CMW8gJ0Z.cjs +57 -0
- package/components/condition-attribute-with-id-BdnTdWKz.js +1 -1
- package/components/condition-attribute-with-id-Cw92IbcP.cjs +1 -1
- package/components/date-range-picker/index.cjs +2 -2
- package/components/date-range-picker/index.js +3 -8
- package/components/date-range-picker-D149LIGC.cjs +180 -0
- package/components/{date-range-picker-DCOv5PYH.js → date-range-picker-DKVmGpUC.js} +7 -6
- package/components/date-time-picker/index.cjs +2 -2
- package/components/date-time-picker/index.js +3 -8
- package/components/{date-time-picker-ClgATXBy.js → date-time-picker-6c19YzwF.js} +7 -6
- package/components/date-time-picker-CRpvRk9T.cjs +105 -0
- package/components/decorate-CkCg3wfh.js +1 -1
- package/components/decorate-Dq34MBGe.cjs +1 -1
- package/components/dependency-manger-BSaHw9ju.cjs +1 -1
- package/components/dependency-manger-wHEXoU92.js +1 -1
- package/components/divider/index.cjs +2 -2
- package/components/divider/index.js +3 -8
- package/components/divider-BcE8D-pH.cjs +18 -0
- package/components/{divider-CGbT-CL8.js → divider-Cz5nyvP9.js} +2 -1
- package/components/divider.module-BV6tmpOY.cjs +1 -1
- package/components/divider.module-CPEKsaqR.js +1 -1
- package/components/element-resolution-BjaAlqwX.cjs +1 -1
- package/components/element-resolution-gap51AVo.js +1 -1
- package/components/field-group/index.cjs +2 -2
- package/components/field-group/index.js +2 -7
- package/components/field-group-C_kRq7pJ.js +1 -1
- package/components/field-group-Dd5xYczm.cjs +1 -1
- package/components/field-label/index.cjs +2 -2
- package/components/field-label/index.js +3 -11
- package/components/field-label-C0vfY1b6.cjs +25 -0
- package/components/{field-label-B9S41b7c.js → field-label-C28wWqC5.js} +5 -2
- package/components/focus-group-C8lOjbi9.cjs +1 -1
- package/components/focus-group-DVPa1zxz.js +1 -1
- package/components/focus-visible-Bt2uDmuM.js +1 -1
- package/components/focus-visible-DNHNlrty.cjs +1 -1
- package/components/focusable-B6h03pAe.cjs +1 -1
- package/components/focusable-DuP0-Kuy.js +1 -1
- package/components/focusable-selectors-BWpiuXz5.js +1 -1
- package/components/focusable-selectors-DJqGLTJo.cjs +1 -1
- package/components/get-label-from-slot-Bo9mqYCZ.js +1 -1
- package/components/get-label-from-slot-TV4APBYs.cjs +1 -1
- package/components/icon/index.cjs +2 -2
- package/components/icon/index.js +3 -8
- package/components/{icon-DB1DRieA.js → icon-CsJZMhIm.js} +2 -1
- package/components/icon-zOPAWCdx.cjs +18 -0
- package/components/index.cjs +2 -2
- package/components/index.js +64 -75
- package/components/infield-button/index.cjs +2 -2
- package/components/infield-button/index.js +3 -8
- package/components/{infield-button-C1mz69Qf.js → infield-button-DiE8R6ol.js} +2 -1
- package/components/infield-button-kilVRjwB.cjs +22 -0
- package/components/label/index.cjs +2 -2
- package/components/label/index.js +3 -8
- package/components/{label-DPG13Ib0.cjs → label-B3zs6OX0.cjs} +2 -2
- package/components/{label-B1HYQ4Pp.js → label-e6Y13vrS.js} +2 -1
- package/components/language-resolution-BaKYDD1a.js +1 -1
- package/components/language-resolution-CSjktYg5.cjs +1 -1
- package/components/like-anchor-BX4PSB3d.cjs +1 -1
- package/components/like-anchor-DXCaEv7O.js +1 -1
- package/components/manage-help-text-ByLb0QYX.js +1 -1
- package/components/manage-help-text-DtFJsl0k.cjs +1 -1
- package/components/menu/index.cjs +2 -2
- package/components/menu/index.js +3 -8
- package/components/{menu-Cq7BEv5Y.cjs → menu-CrhA2iPZ.cjs} +3 -3
- package/components/{menu-DY8q8qyn.js → menu-fdJseu1y.js} +3 -2
- package/components/multi-language-field/index.cjs +2 -2
- package/components/multi-language-field/index.js +3 -8
- package/components/{multi-language-field-Cfy3M_ZS.cjs → multi-language-field-BndVikur.cjs} +2 -2
- package/components/{multi-language-field-DhQ98r2D.js → multi-language-field-vJMK-osi.js} +3 -2
- package/components/notice/index.cjs +2 -2
- package/components/notice/index.js +3 -8
- package/components/notice-CsWaqcq3.cjs +60 -0
- package/components/{notice-s6QHF_tq.js → notice-N0-lxEf_.js} +4 -3
- package/components/number-field/index.cjs +2 -2
- package/components/number-field/index.js +3 -8
- package/components/{number-field-BqnZS9Gx.js → number-field-DAOy_AvQ.js} +3 -2
- package/components/number-field-xxXgR70l.cjs +57 -0
- package/components/observe-slot-presence-BKY6n06-.js +1 -1
- package/components/observe-slot-presence-CS8pMePk.cjs +1 -1
- package/components/observe-slot-text-CvL-2ey3.cjs +1 -1
- package/components/observe-slot-text-Db8Kx3P-.js +1 -1
- package/components/options/index.cjs +2 -2
- package/components/options/index.js +3 -8
- package/components/options/options.d.ts +1 -0
- package/components/{options-Bd6Uly5_.cjs → options-CP9V2CSJ.cjs} +2 -2
- package/components/{options-CpaaBaxn.js → options-D_ifU0DH.js} +4 -2
- package/components/overlay/index.cjs +2 -2
- package/components/overlay/index.js +4 -10
- package/components/overlay/placement-controller.d.ts +2 -1
- package/components/overlay-Dn7EbA_W.cjs +102 -0
- package/components/{overlay-CyBsHuOL.js → overlay-DpHIYJtd.js} +282 -77
- package/components/{pending-state-a527YMWV.cjs → pending-state-CGHvTtKR.cjs} +2 -2
- package/components/{pending-state-BeG7qBDP.js → pending-state-D_b45qvi.js} +2 -2
- package/components/picker/index.cjs +2 -2
- package/components/picker/index.js +3 -8
- package/components/picker-BliQJlY_.cjs +124 -0
- package/components/{picker-f4fSGZX8.js → picker-D0fMBZLb.js} +6 -6
- package/components/picker-button/index.cjs +2 -2
- package/components/picker-button/index.js +3 -8
- package/components/picker-button-B8Jbf9jK.cjs +37 -0
- package/components/{picker-button-DVzLeTq8.js → picker-button-CJQJshbo.js} +3 -2
- package/components/platform-BAjeJp2W.cjs +1 -1
- package/components/platform-Ce9pNsR9.js +1 -1
- package/components/popover/index.cjs +2 -2
- package/components/popover/index.js +3 -11
- package/components/popover-BsdqkvKI.cjs +30 -0
- package/components/{popover-DTsrgH-f.js → popover-DC8tkee-.js} +17 -15
- package/components/progress-bar/index.cjs +2 -2
- package/components/progress-bar/index.js +3 -8
- package/components/progress-bar-CrodWzcc.cjs +34 -0
- package/components/{progress-bar-BJO8j1aX.js → progress-bar-D4iFHkp7.js} +2 -1
- package/components/progress-circle/index.cjs +2 -2
- package/components/progress-circle/index.js +3 -11
- package/components/{progress-circle-BVToDWX8.js → progress-circle-By6qUQYe.js} +5 -2
- package/components/progress-circle-bO_VAX3N.cjs +33 -0
- package/components/progress-steps/index.cjs +2 -2
- package/components/progress-steps/index.d.ts +2 -1
- package/components/progress-steps/index.js +4 -9
- package/components/progress-steps/progress-steps-model.d.ts +23 -0
- package/components/progress-steps/progress-steps.d.ts +82 -109
- package/components/progress-steps/types.d.ts +18 -3
- package/components/progress-steps-Y-Tgh_fQ.cjs +98 -0
- package/components/progress-steps-ohguJaPa.js +368 -0
- package/components/prompt-box/index.cjs +2 -2
- package/components/prompt-box/index.js +3 -8
- package/components/{prompt-box-BY1xKFZO.js → prompt-box-Cz_m2wso.js} +8 -8
- package/components/{prompt-box-Dg9S0C5x.cjs → prompt-box-sp9_-Hnx.cjs} +3 -3
- package/components/question-box/index.cjs +2 -2
- package/components/question-box/index.js +3 -8
- package/components/{question-box-CZxQTeS9.cjs → question-box-Bdtsgv1k.cjs} +2 -2
- package/components/{question-box-CyojSIop.js → question-box-D7YSi_6c.js} +9 -8
- package/components/radio/index.cjs +2 -2
- package/components/radio/index.js +3 -8
- package/components/{radio-DRI4on-W.js → radio-B6hX9Klr.js} +2 -1
- package/components/radio-CRTfoEX_.cjs +22 -0
- package/components/random-id-BcUJAxUZ.cjs +1 -1
- package/components/random-id-CiMDyX7v.js +1 -1
- package/components/rolldown-runtime-Dy4uBu1J.js +1 -1
- package/components/roving-tabindex-BoPao4td.cjs +1 -1
- package/components/roving-tabindex-pomAn3z-.js +1 -1
- package/components/scaled-indicator-C-TupV4L.js +1 -1
- package/components/scaled-indicator-DLJIztx0.cjs +1 -1
- package/components/search/index.cjs +2 -2
- package/components/search/index.js +3 -8
- package/components/{search-C-EPZmTG.js → search-DEjLSJ96.js} +4 -3
- package/components/search-PxJEuwHt.cjs +47 -0
- package/components/segments-factory-BCRi1NKb.js +1 -1
- package/components/segments-factory-DtPyN5sh.cjs +1 -1
- package/components/select/index.cjs +2 -2
- package/components/select/index.js +3 -8
- package/components/{select-BbFG38ag.js → select-BUgHi69P.js} +9 -8
- package/components/select-DsGVB01K.cjs +158 -0
- package/components/sized-mixin-BT7cv-fT.cjs +1 -1
- package/components/sized-mixin-DzQTebN-.js +1 -1
- package/components/skeleton-loader/index.cjs +2 -2
- package/components/skeleton-loader/index.js +3 -8
- package/components/{skeleton-loader-C0LH3prK.js → skeleton-loader-BeCsYADg.js} +2 -1
- package/components/skeleton-loader-CNcwCh4V.cjs +18 -0
- package/components/slider/index.cjs +2 -2
- package/components/slider/index.js +3 -8
- package/components/{slider-B7QAhDTM.js → slider-Bsl8Xrme.js} +3 -2
- package/components/{slider-DxliwjT6.cjs → slider-C_8pSK4N.cjs} +2 -2
- package/components/slottable-request-event-C6eb7Ch3.cjs +1 -1
- package/components/slottable-request-event-MRSZbgTu.js +1 -1
- package/components/split-view/index.cjs +2 -2
- package/components/split-view/index.js +3 -8
- package/components/split-view-BwCFYey6.cjs +43 -0
- package/components/{split-view-FxpiSCem.js → split-view-CDwHDmII.js} +2 -1
- package/components/status-light/index.cjs +2 -2
- package/components/status-light/index.js +3 -8
- package/components/status-light-D3hdx8Pd.cjs +21 -0
- package/components/{status-light-DC8qqO8q.js → status-light-DwUnjE3t.js} +2 -1
- package/components/strategies-BwNbUXYS.cjs +1 -1
- package/components/strategies-Cl59wdNZ.js +1 -1
- package/components/streaming-listener-Bfyk6Fsx.cjs +1 -1
- package/components/streaming-listener-CtcMpYfS.js +1 -1
- package/components/swatch/index.cjs +2 -2
- package/components/swatch/index.js +3 -8
- package/components/{swatch-C2ty27bJ.js → swatch-Bj2FARl1.js} +2 -1
- package/components/{swatch-DUmBmg4S.cjs → swatch-CQ0inIHK.cjs} +2 -2
- package/components/switch/index.cjs +2 -2
- package/components/switch/index.js +3 -8
- package/components/{switch-DOuXlFwI.js → switch-CpG-hSWY.js} +2 -1
- package/components/switch-qwpYXVnO.cjs +22 -0
- package/components/tabs/index.cjs +2 -2
- package/components/tabs/index.js +3 -8
- package/components/{tabs-CjY4eX9W.js → tabs-BD_ATrBg.js} +4 -3
- package/components/{tabs-ZwcVrVub.cjs → tabs-DxOD4QNt.cjs} +2 -2
- package/components/tags/index.cjs +2 -2
- package/components/tags/index.js +3 -8
- package/components/{tags-BCKNzEaH.js → tags-BIpFgOYy.js} +4 -3
- package/components/tags-fLCGajv_.cjs +47 -0
- package/components/text-field/index.cjs +2 -2
- package/components/text-field/index.js +3 -8
- package/components/text-field-3fDtTQkR.cjs +1 -1
- package/components/text-field-CbN4nydd.cjs +21 -0
- package/components/text-field-CmSym2QK.js +1 -1
- package/components/{text-field-C2MHZbTp.js → text-field-CmyqQxq0.js} +2 -1
- package/components/text-field.module-BHhBReKL.js +1 -1
- package/components/text-field.module-l8CaTCwE.cjs +1 -1
- package/components/toast/index.cjs +2 -2
- package/components/toast/index.js +3 -8
- package/components/toast-DRrGgznK.cjs +51 -0
- package/components/{toast-DlOeMDCI.js → toast-KwHx-agn.js} +3 -2
- package/components/tokens.cjs +18 -0
- package/components/tokens.css +18 -0
- package/components/tokens.js +23 -0
- package/components/tooltip/index.cjs +2 -2
- package/components/tooltip/index.js +3 -8
- package/components/tooltip-DjOW52n2.cjs +45 -0
- package/components/{tooltip-Byl1h4nN.js → tooltip-xTa9Q5JW.js} +2 -1
- package/components/top-nav/index.cjs +2 -2
- package/components/top-nav/index.js +3 -8
- package/components/top-nav-81IKEGjR.cjs +41 -0
- package/components/{top-nav-B9YKdtFB.js → top-nav-CXjnpdFR.js} +2 -1
- package/components/utils.cjs +1 -1
- package/components/utils.js +1 -1
- package/components/voice-recorder-B1tBrGTV.cjs +1 -1
- package/components/voice-recorder-CTg3kRxx.js +1 -1
- package/custom-elements.json +1 -1
- package/package.json +11 -2
- package/standalone/accordion.js +45 -0
- package/standalone/action-bar.js +41 -0
- package/standalone/action-button.js +20 -0
- package/standalone/action-group.js +20 -0
- package/standalone/action-menu.js +58 -0
- package/standalone/avatar.js +36 -0
- package/standalone/badge.js +20 -0
- package/standalone/button-group.js +20 -0
- package/standalone/button.js +20 -0
- package/standalone/calendar.js +20 -0
- package/standalone/chat-message-group.js +26 -0
- package/standalone/chat-message.js +150 -0
- package/standalone/checkbox.js +20 -0
- package/standalone/chunks/NumberFormatter-DMCfW685.js +2 -0
- package/standalone/chunks/NumberParser-r_jv94LA.js +2 -0
- package/standalone/chunks/action-button-BzzPBqt5.js +6 -0
- package/standalone/chunks/action-group-DTxf-0tP.js +4 -0
- package/standalone/chunks/async-directive-BA2_dM-5.js +2 -0
- package/standalone/chunks/async-directive-CPdA0BOw.js +2 -0
- package/standalone/chunks/badge-DD-tMgzi.js +7 -0
- package/standalone/chunks/button-Bv3v7VbN.js +4 -0
- package/standalone/chunks/button-Dykw3TSO.js +2 -0
- package/standalone/chunks/button-base-C7jeeyLp.js +9 -0
- package/standalone/chunks/calendar-ZwUYkzVq.js +122 -0
- package/standalone/chunks/checkbox-OQtakoP8.js +9 -0
- package/standalone/chunks/checkbox-mixin-BAQWmwps.js +11 -0
- package/standalone/chunks/class-map-CxQ0PcQP.js +2 -0
- package/standalone/chunks/clear-button-pVGfwye8.js +2 -0
- package/standalone/chunks/close-button-RpPiwBdf.js +2 -0
- package/standalone/chunks/color-area-Cj8oPsIF.js +64 -0
- package/standalone/chunks/color-controller-fJNWRHVI.js +2 -0
- package/standalone/chunks/color-field-CrCF4kqZ.js +7 -0
- package/standalone/chunks/color-handle-BHrAxEG2.js +8 -0
- package/standalone/chunks/color-loupe-C34cms5t.js +40 -0
- package/standalone/chunks/color-menu-B5UOMYmX.js +73 -0
- package/standalone/chunks/color-slider-CAqvxsgS.js +41 -0
- package/standalone/chunks/condition-attribute-with-id-Dv8Yd-N1.js +2 -0
- package/standalone/chunks/dependency-manger-BPrqqTnJ.js +2 -0
- package/standalone/chunks/directive-Du_3lDov.js +2 -0
- package/standalone/chunks/directive-helpers-Bu8icI7Y.js +2 -0
- package/standalone/chunks/divider-Bf9Drp2z.js +2 -0
- package/standalone/chunks/divider.module-sYekRHno.js +2 -0
- package/standalone/chunks/element-resolution-DX0ea-Cd.js +2 -0
- package/standalone/chunks/field-group-D8EjgC6F.js +7 -0
- package/standalone/chunks/field-label-VWHDlW9_.js +9 -0
- package/standalone/chunks/flow-aCcJ5kgi.js +2 -0
- package/standalone/chunks/focus-group-Cl6MLy-C.js +2 -0
- package/standalone/chunks/focusable-selectors-D5e0OxNL.js +2 -0
- package/standalone/chunks/get-label-from-slot-Dfoiptqo.js +2 -0
- package/standalone/chunks/icon-Dy6J1QeX.js +2 -0
- package/{components/infield-button-CYO9V1eX.cjs → standalone/chunks/infield-button-D03MpU_s.js} +3 -19
- package/standalone/chunks/keyed-CNWmQd2J.js +2 -0
- package/standalone/chunks/language-resolution-BWHk9A73.js +2 -0
- package/standalone/chunks/lit-BN_lRQbJ.js +3 -0
- package/standalone/chunks/lucero-runtime-DGJ9-isg.js +16 -0
- package/standalone/chunks/luzmo-icons-CJa-aByT.js +13 -0
- package/standalone/chunks/manage-help-text-Cl9OJ2xf.js +14 -0
- package/standalone/chunks/menu-nolJetlp.js +92 -0
- package/standalone/chunks/number-field-C3DYfl1s.js +41 -0
- package/standalone/chunks/observe-slot-presence-DWPtw22K.js +2 -0
- package/standalone/chunks/options-BjRSj630.js +89 -0
- package/standalone/chunks/overlay-C4ir0iyC.js +31 -0
- package/standalone/chunks/overlay-C_XW8yry.js +57 -0
- package/standalone/chunks/pending-state-DxeRqe6Q.js +11 -0
- package/standalone/chunks/picker-button-BeXTIgUt.js +21 -0
- package/standalone/chunks/picker-hbMQOkUX.js +108 -0
- package/standalone/chunks/platform-BfrBbd97.js +2 -0
- package/standalone/chunks/popover-BsB3dmQe.js +14 -0
- package/standalone/chunks/progress-circle-CEx1b5Sv.js +17 -0
- package/standalone/chunks/property-CLXrnTGx.js +2 -0
- package/standalone/chunks/radio-2vHhfmHw.js +6 -0
- package/standalone/chunks/random-id-CeLe5NEk.js +2 -0
- package/standalone/chunks/repeat-CZdNcszA.js +2 -0
- package/standalone/chunks/rolldown-runtime-DWK5is8u.js +2 -0
- package/standalone/chunks/roving-tabindex-CB4xC55P.js +2 -0
- package/standalone/chunks/scaled-indicator-k-1JmS0b.js +10 -0
- package/standalone/chunks/segments-factory-Ch3AAizU.js +2 -0
- package/standalone/chunks/skeleton-loader-BxYcRRJr.js +2 -0
- package/standalone/chunks/slottable-request-event-D9FhiqH1.js +2 -0
- package/standalone/chunks/strategies-kad_0dTB.js +2 -0
- package/standalone/chunks/streaming-listener-DFczLm8I.js +2 -0
- package/standalone/chunks/style-map-D4QeV3m0.js +2 -0
- package/standalone/chunks/swatch-m_4GcO2_.js +33 -0
- package/standalone/chunks/text-field-BnZtyodU.js +5 -0
- package/standalone/chunks/text-field-BrlDeJsx.js +65 -0
- package/standalone/chunks/text-field.module-ClDE7laI.js +2 -0
- package/standalone/chunks/tooltip-DB6jRVyB.js +29 -0
- package/standalone/chunks/unsafe-html-BPQaWy0v.js +2 -0
- package/standalone/chunks/voice-recorder--d34tYNu.js +2 -0
- package/standalone/chunks/when-BWvpqCBs.js +2 -0
- package/standalone/clear-button.js +20 -0
- package/standalone/close-button.js +20 -0
- package/standalone/color-area.js +20 -0
- package/standalone/color-field.js +20 -0
- package/standalone/color-handle.js +20 -0
- package/standalone/color-loupe.js +20 -0
- package/standalone/color-menu.js +20 -0
- package/standalone/color-palette-group.js +30 -0
- package/standalone/color-palette.js +20 -0
- package/standalone/color-picker.js +50 -0
- package/standalone/color-slider.js +20 -0
- package/standalone/date-range-picker.js +182 -0
- package/standalone/date-time-picker.js +107 -0
- package/standalone/divider.js +20 -0
- package/standalone/field-group.js +20 -0
- package/standalone/field-label.js +20 -0
- package/standalone/icon.js +20 -0
- package/standalone/infield-button.js +20 -0
- package/standalone/label.js +20 -0
- package/standalone/lit.js +20 -0
- package/standalone/manifest.json +152 -0
- package/standalone/menu.js +20 -0
- package/standalone/multi-language-field.js +42 -0
- package/standalone/notice.js +62 -0
- package/standalone/number-field.js +20 -0
- package/standalone/options.js +20 -0
- package/standalone/overlay.js +20 -0
- package/standalone/picker-button.js +20 -0
- package/standalone/picker.js +20 -0
- package/standalone/popover.js +20 -0
- package/standalone/progress-bar.js +36 -0
- package/standalone/progress-circle.js +20 -0
- package/standalone/progress-steps.js +100 -0
- package/standalone/prompt-box.js +316 -0
- package/standalone/question-box.js +403 -0
- package/standalone/radio.js +20 -0
- package/standalone/search.js +49 -0
- package/standalone/select.js +160 -0
- package/standalone/skeleton-loader.js +20 -0
- package/standalone/slider.js +137 -0
- package/standalone/split-view.js +45 -0
- package/standalone/status-light.js +23 -0
- package/standalone/swatch.js +20 -0
- package/standalone/switch.js +24 -0
- package/standalone/tabs.js +78 -0
- package/standalone/tags.js +49 -0
- package/standalone/text-field.js +20 -0
- package/standalone/toast.js +53 -0
- package/standalone/tokens.css +1 -0
- package/standalone/tokens.js +20 -0
- package/standalone/tooltip.js +20 -0
- package/standalone/top-nav.js +43 -0
- package/standalone/utils.js +20 -0
- package/styles/tokens.d.ts +1 -0
- package/utils/reactive-controllers/pending-state.d.ts +1 -1
- package/components/action-bar-CXT4lT30.cjs +0 -39
- package/components/action-button-BKnzGQR6.cjs +0 -22
- package/components/action-group-D1G30Iir.cjs +0 -20
- package/components/avatar-Cu9c0sCS.cjs +0 -34
- package/components/badge-XJP3sZhB.cjs +0 -23
- package/components/button-group-6M8M-TUI.cjs +0 -18
- package/components/button-l0fRopSN.cjs +0 -20
- package/components/calendar-DZkKMs2L.cjs +0 -138
- package/components/chat-message-group-CzCwyW7F.cjs +0 -24
- package/components/chat-message-t4a0r3R6.cjs +0 -148
- package/components/checkbox-DdatW4xE.cjs +0 -25
- package/components/color-area-B_pRu9Vf.cjs +0 -80
- package/components/color-handle-DIoVrLRF.cjs +0 -24
- package/components/color-loupe-sY1wOisV.cjs +0 -56
- package/components/color-menu-CdETqhbP.cjs +0 -89
- package/components/color-palette-CidHsmE0.cjs +0 -18
- package/components/color-palette-group-B4r4tPfY.cjs +0 -28
- package/components/color-slider-DLEM1nGA.cjs +0 -57
- package/components/date-range-picker-9ioTuDZq.cjs +0 -180
- package/components/date-time-picker-DRjQTyGS.cjs +0 -105
- package/components/divider-wana0uPI.cjs +0 -18
- package/components/field-label-C5vdJ1ys.cjs +0 -25
- package/components/icon-CSqR-OOO.cjs +0 -18
- package/components/notice-xgrLOiC0.cjs +0 -60
- package/components/number-field-04RFqrUa.cjs +0 -57
- package/components/overlay-B-gaxspw.cjs +0 -47
- package/components/overlay-CPZvL0Ic.cjs +0 -73
- package/components/overlay-DdIs4w5M.js +0 -227
- package/components/picker-D225VAbx.cjs +0 -124
- package/components/picker-button-BR7oM7_M.cjs +0 -37
- package/components/popover-DWWYpY-k.cjs +0 -30
- package/components/progress-bar-C7wJ5bxS.cjs +0 -34
- package/components/progress-circle-DyApSKdm.cjs +0 -33
- package/components/progress-steps-Ba4VbAKR.cjs +0 -96
- package/components/progress-steps-nJ8Xw-nG.js +0 -262
- package/components/radio-O3a1rmCe.cjs +0 -22
- package/components/search-BhMhfCBh.cjs +0 -47
- package/components/select-D5fQgPPj.cjs +0 -158
- package/components/skeleton-loader-Cm50Ztzk.cjs +0 -18
- package/components/split-view-5uMSU_b7.cjs +0 -43
- package/components/status-light-BYBYorYy.cjs +0 -21
- package/components/switch-B-gu-War.cjs +0 -22
- package/components/tags-B28zWEic.cjs +0 -47
- package/components/text-field-wJK2bzMT.cjs +0 -21
- package/components/toast-COQ7Xl5T.cjs +0 -51
- package/components/tooltip-Sm0pruxL.cjs +0 -45
- package/components/top-nav-BcZLCBP_.cjs +0 -41
|
@@ -0,0 +1,403 @@
|
|
|
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
|
+
*/
|
|
19
|
+
|
|
20
|
+
import"./tokens.js";import{c as e,i as t,y as n}from"./chunks/lit-BN_lRQbJ.js";import{c as r,g as i,i as a,l as o,u as s,v as c,y as l}from"./chunks/lucero-runtime-DGJ9-isg.js";import{F as u,d,i as f}from"./chunks/luzmo-icons-CJa-aByT.js";import{t as p}from"./chunks/roving-tabindex-CB4xC55P.js";import"./chunks/icon-Dy6J1QeX.js";import{t as ee}from"./chunks/language-resolution-BWHk9A73.js";import"./chunks/action-button-BzzPBqt5.js";import"./chunks/badge-DD-tMgzi.js";import"./chunks/checkbox-OQtakoP8.js";import"./field-group.js";import"./chunks/text-field-BnZtyodU.js";import"./chunks/button-Dykw3TSO.js";import{t as m}from"./chunks/repeat-CZdNcszA.js";import"./chunks/radio-2vHhfmHw.js";var h=`: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)}`,g=`__other__`,_={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.`},v=e=>`${e}Other`,y=e=>!!e.other||e.options.length===0,b=e=>typeof e.other==`object`&&e.other?e.other:{},x=e=>Object.fromEntries(Object.entries(e)),S=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},C=(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},w=e=>{let t=new Set,n=[];for(let r of e)t.has(r)||(t.add(r),n.push(r));return n},te=e=>{let t=new Set(e.options.map(e=>e.value));return y(e)&&t.add(g),t},T=(e,t)=>{let n=t[e.id];return e.type===`single`?typeof n==`string`&&n?[n]:[]:Array.isArray(n)?w(n):[]},E=(e,t)=>T(e,t).includes(g),D=e=>{let t=Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0));return{..._,...t}},O=(e,t)=>{let n=e;for(let[e,r]of Object.entries(t))n=n.replaceAll(`{${e}}`,r);return n},k=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=v(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+ +!!y(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: "${g}" 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)}}},A=(e,t)=>{let n=Object.fromEntries([]);for(let r of e){let e=te(r),i=t[r.id],a=Object.hasOwn(t,r.id);if(r.type===`single`)typeof i==`string`&&e.has(i)?S(n,r.id,i):!a&&typeof r.default==`string`&&(e.has(r.default)||r.options.length===0)&&S(n,r.id,r.options.length===0?g:r.default);else{let t=[...r.options.map(e=>e.value),...y(r)?[g]:[]],o=w(Array.isArray(i)?i.filter(t=>e.has(t)):[]);if(o.length>0)S(n,r.id,t.filter(e=>o.includes(e)));else if(!a&&Array.isArray(r.default)){let i=w(r.default.filter(t=>e.has(t)));i.length>0&&S(n,r.id,t.filter(e=>i.includes(e)))}}let o=v(r.id),s=t[o];typeof s==`string`?S(n,o,s):!a&&r.options.length===0&&typeof r.default==`string`&&S(n,o,r.default)}return n},j=e=>e.minSelected??+!!e.required,ne=(e,t)=>{let n=j(e),r=e.maxSelected;return n>0&&r!==void 0?O(t.selectionRangeDescription,{min:String(n),max:String(r)}):n===1?t.requiredSelectionDescription:n>1?O(t.minSelectedError,{min:String(n)}):r===void 0?void 0:O(t.maxSelectedError,{max:String(r)})},M=(e,t)=>{let n=T(e,t),r=j(e),i=e.maxSelected;if(n.length<r)return r<=1?`missing`:`minimum`;if(i!==void 0&&n.length>i)return`maximum`;if(E(e,t)&&!String(t[v(e.id)]??``).trim())return`otherText`},re=(e,t)=>M(e,t)!==void 0,ie=(e,t,n)=>{switch(M(e,t)){case`minimum`:return O(n.minSelectedError,{min:String(j(e))});case`maximum`:return O(n.maxSelectedError,{max:String(e.maxSelected)});case`otherText`:return n.otherRequiredError;default:return}},ae=(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&&T(e,r).length>=a},oe=(e,t)=>O(e===1?t.selectedCountOne:t.selectedCount,{count:String(e)}),N,se=(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(`, `)}},ce=(e,t)=>e.recommended?O(t.recommendedSuffix,{label:e.label,recommended:t.recommended}):e.label,P=e=>{let t=e.options.map(e=>({const:e.value,title:e.label}));return y(e)&&e.options.length>0&&t.push({const:g,title:typeof e.other==`object`&&e.other.label||_.other}),t},F=e=>{let t={type:`string`};return typeof e.other==`object`&&e.other.label&&(t.title=e.other.label),t},I=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=P(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),y(r)&&t.push([v(r.id),F(r)])}let r=Object.fromEntries(t);return n.length>0?{type:`object`,properties:r,required:n}:{type:`object`,properties:r}},L=(e,t)=>String(t[v(e.id)]??``).trim(),R=(e,t)=>{let n=[];for(let r of e){let e=L(r,t);if(r.options.length===0){e&&n.push([r.id,e]);continue}let i=T(r,t);r.type===`single`?i[0]&&n.push([r.id,i[0]]):i.length>0&&n.push([r.id,[...i]]),y(r)&&E(r,t)&&e&&n.push([v(r.id),e])}return Object.fromEntries(n)},z=e=>!!e&&typeof e==`object`&&!Array.isArray(e),B=e=>z(e)?e:{},V=e=>{let t=e.oneOf??e.items?.anyOf;if(Array.isArray(t)){let e=[],n=new Set;for(let r of t)!z(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:[]}},H=e=>v(e),U=e=>e.format!==void 0||e.minLength!==void 0||e.maxLength!==void 0||e.pattern!==void 0,W=e=>e.type===`string`&&!V(e).declared&&!U(e),le=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=H(e),i=V(B(t[e])),a=B(t[n]);n in t&&W(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=B(a),s=V(o),c=s.options.some(e=>e.value===g),l=H(e);if(c&&!r.has(l))continue;let u=s.options.filter(e=>e.value!==g);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&&U(o))continue;let d={id:e,type:o.type===`array`?`multiple`:`single`,title:o.title||e,options:u};if(o.description&&(d.description=o.description),n.has(e)&&(d.required=!0),o.type===`array`?(o.minItems!==void 0&&(d.minSelected=o.minItems),o.maxItems!==void 0&&(d.maxSelected=o.maxItems),Array.isArray(o.default)&&o.default.length>0&&(d.default=o.default)):typeof o.default==`string`&&(d.default=o.default),c&&l in t){let e=B(t[l]);d.other=!e.title||{label:e.title}}i.push(d)}return i};function G(e){switch(e){case`s`:return`xs`;case`m`:return`s`;case`l`:return`m`;default:return`l`}}function K(e){switch(e){case`m`:return`xs`;case`l`:return`s`;case`xl`:case`xxl`:return`m`;default:return`xxs`}}function q(e){return e.step>=e.questions.length-1}function ue(e,t){let n=e.selectedValues(t);return n.length===0?``:se(n.map(n=>{if(n===`__other__`)return String(e.value[v(t.id)]??e.copy.other);let r=t.options.find(e=>e.value===n);return r?ce(r,e.copy):n}),e.language)}function de(n,r){let i=ue(n,r);return e`<span class="summary-value">${n.copy.answer.split(`{answer}`).map((n,r)=>e`${r>0?e`<span class="summary-answer">${i}</span>`:t}${n}`)}</span>`}function fe(n){let r=n.copy;return e`
|
|
21
|
+
<div class="card resolved">
|
|
22
|
+
<div class="summary">
|
|
23
|
+
<h2 class="summary-heading" id="resolved-title" tabindex="-1">
|
|
24
|
+
${n.questions.reduce((e,t)=>e+n.selectedValues(t).length,0)===1?r.answerTitle:r.answersTitle}
|
|
25
|
+
</h2>
|
|
26
|
+
${m(n.questions,e=>e.id,t=>e`
|
|
27
|
+
<div class="summary-row">
|
|
28
|
+
<span class="summary-title">${t.title}</span>
|
|
29
|
+
${de(n,t)}
|
|
30
|
+
</div>
|
|
31
|
+
`)}
|
|
32
|
+
</div>
|
|
33
|
+
<div class="summary-actions">
|
|
34
|
+
${!n.submitted||n.showChange?e`
|
|
35
|
+
<luzmo-button
|
|
36
|
+
id="change-button"
|
|
37
|
+
dir=${n.dir}
|
|
38
|
+
variant="primary"
|
|
39
|
+
treatment=${n.submitted?`fill`:`outline`}
|
|
40
|
+
size=${n.size}
|
|
41
|
+
?disabled=${n.disabled}
|
|
42
|
+
@click=${n.handlers.change}
|
|
43
|
+
>${r.change}</luzmo-button
|
|
44
|
+
>
|
|
45
|
+
`:t}
|
|
46
|
+
${n.submitted?t:e`
|
|
47
|
+
<luzmo-button
|
|
48
|
+
id="review-submit-button"
|
|
49
|
+
dir=${n.dir}
|
|
50
|
+
variant="primary"
|
|
51
|
+
size=${n.size}
|
|
52
|
+
?disabled=${n.disabled||n.readonly}
|
|
53
|
+
@click=${n.handlers.primary}
|
|
54
|
+
>${r.submit}</luzmo-button
|
|
55
|
+
>
|
|
56
|
+
`}
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
`}function J(n,r,i){let a=n.optionIndicator===`letters`&&i<26?String.fromCharCode(65+i):String(i+1);return e`
|
|
60
|
+
<span
|
|
61
|
+
class=${r.description?`option-content option-content--detailed`:`option-content`}
|
|
62
|
+
>
|
|
63
|
+
<span class="option-number" aria-hidden="true">${a}</span>
|
|
64
|
+
<span class="option-copy">
|
|
65
|
+
<span class="option-heading">
|
|
66
|
+
<span class="option-text">
|
|
67
|
+
<span class="option-label">${r.label}</span>
|
|
68
|
+
${r.hint?e`<span class="option-hint">${r.hint}</span>`:t}
|
|
69
|
+
</span>
|
|
70
|
+
${r.recommended?e`<luzmo-badge
|
|
71
|
+
class="recommended-label"
|
|
72
|
+
dir=${n.dir}
|
|
73
|
+
variant="neutral"
|
|
74
|
+
treatment="subtle"
|
|
75
|
+
size=${G(n.size)}
|
|
76
|
+
>${n.copy.recommended}</luzmo-badge
|
|
77
|
+
>`:t}
|
|
78
|
+
</span>
|
|
79
|
+
${r.description?e`<span class="option-description"
|
|
80
|
+
>${r.description}</span
|
|
81
|
+
>`:t}
|
|
82
|
+
</span>
|
|
83
|
+
</span>
|
|
84
|
+
`}function Y(n,r){return n.disabledReason?e`<span class="visually-hidden" id="option-reason-${r}"
|
|
85
|
+
>${n.disabledReason}</span
|
|
86
|
+
>`:t}function pe(n,r){return r?e`
|
|
87
|
+
<luzmo-help-text
|
|
88
|
+
id="question-error"
|
|
89
|
+
dir=${n.dir}
|
|
90
|
+
slot="negative-help-text"
|
|
91
|
+
>${r}</luzmo-help-text
|
|
92
|
+
>
|
|
93
|
+
`:t}function X(n,r){if(r.type!==`multiple`)return t;let i=n.showError?n.questionError(r):void 0;return e`
|
|
94
|
+
<span class="selected-count" aria-live="polite"
|
|
95
|
+
>${i?e`<luzmo-help-text
|
|
96
|
+
id="question-error"
|
|
97
|
+
class="status-error"
|
|
98
|
+
dir=${n.dir}
|
|
99
|
+
variant="negative"
|
|
100
|
+
>${i}</luzmo-help-text
|
|
101
|
+
>`:oe(n.selectedValues(r).length,n.copy)}</span
|
|
102
|
+
>
|
|
103
|
+
`}function me(n,r){return e`
|
|
104
|
+
<div class="other-actions">
|
|
105
|
+
${X(n,r)}
|
|
106
|
+
${n.hideSkip?t:e`
|
|
107
|
+
<luzmo-button
|
|
108
|
+
id="other-skip-button"
|
|
109
|
+
dir=${n.dir}
|
|
110
|
+
variant="primary"
|
|
111
|
+
size=${G(n.size)}
|
|
112
|
+
quiet
|
|
113
|
+
?disabled=${n.disabled}
|
|
114
|
+
@click=${n.handlers.skip}
|
|
115
|
+
>${n.copy.skip}</luzmo-button
|
|
116
|
+
>
|
|
117
|
+
`}
|
|
118
|
+
<luzmo-button
|
|
119
|
+
id="other-primary-button"
|
|
120
|
+
dir=${n.dir}
|
|
121
|
+
class="other-primary"
|
|
122
|
+
variant="primary"
|
|
123
|
+
treatment="outline"
|
|
124
|
+
size=${G(n.size)}
|
|
125
|
+
?disabled=${n.disabled||n.readonly||n.questionInvalid(r)}
|
|
126
|
+
@click=${n.handlers.primary}
|
|
127
|
+
>${q(n)?n.copy.submit:n.copy.continue}</luzmo-button
|
|
128
|
+
>
|
|
129
|
+
</div>
|
|
130
|
+
`}function he(e,t){return e.isOtherSelected(t)&&String(e.value[v(t.id)]??``).trim().length>0}function Z(t,n){let r=b(n),i=v(n.id),a=t.isOtherSelected(n),o=t.optionDisabled(n,{value:g,label:r.label||t.copy.other},a),s=t.showError&&a&&!!t.questionError(n);return e`
|
|
131
|
+
<luzmo-text-field
|
|
132
|
+
id="other-field"
|
|
133
|
+
dir=${t.dir}
|
|
134
|
+
class="other-field"
|
|
135
|
+
size=${t.size}
|
|
136
|
+
label=${r.label||t.copy.other}
|
|
137
|
+
placeholder=${r.placeholder||t.copy.otherPlaceholder}
|
|
138
|
+
border="none"
|
|
139
|
+
multiline
|
|
140
|
+
grows
|
|
141
|
+
rows="1"
|
|
142
|
+
.value=${String(t.value[i]??``)}
|
|
143
|
+
?disabled=${o}
|
|
144
|
+
?readonly=${t.readonly}
|
|
145
|
+
?invalid=${s}
|
|
146
|
+
@keydown=${t.handlers.otherKeydown}
|
|
147
|
+
@input=${t.handlers.otherInput}
|
|
148
|
+
@change=${t.handlers.otherChange}
|
|
149
|
+
></luzmo-text-field>
|
|
150
|
+
`}function ge(n,r){let i=he(n,r);return r.type===`multiple`||n.hideSkip&&!i?t:e`
|
|
151
|
+
<luzmo-button
|
|
152
|
+
id="other-row-action"
|
|
153
|
+
dir=${n.dir}
|
|
154
|
+
class="other-primary"
|
|
155
|
+
variant="primary"
|
|
156
|
+
treatment="outline"
|
|
157
|
+
size=${G(n.size)}
|
|
158
|
+
?disabled=${i?n.disabled||n.readonly||n.questionInvalid(r):n.disabled}
|
|
159
|
+
@click=${i?n.handlers.primary:n.handlers.skip}
|
|
160
|
+
>${i?q(n)?n.copy.submit:n.copy.continue:n.copy.skip}</luzmo-button
|
|
161
|
+
>
|
|
162
|
+
`}function _e(n,r,i){let o=n.selectedValues(r)[0]??``,s=r.options.some(e=>e.description)?`options options--descriptive`:`options`;return e`
|
|
163
|
+
<luzmo-radio-group
|
|
164
|
+
id="options"
|
|
165
|
+
dir=${n.dir}
|
|
166
|
+
class=${s}
|
|
167
|
+
vertical
|
|
168
|
+
label=${r.title}
|
|
169
|
+
manual-selection
|
|
170
|
+
aria-readonly=${a(n.readonly?`true`:void 0)}
|
|
171
|
+
aria-required=${a(r.required?`true`:void 0)}
|
|
172
|
+
.selected=${o}
|
|
173
|
+
?invalid=${!!i}
|
|
174
|
+
@change=${n.handlers.radioChange}
|
|
175
|
+
@focusin=${n.handlers.focusIn}
|
|
176
|
+
@focusout=${n.handlers.focusOut}
|
|
177
|
+
>
|
|
178
|
+
${m(r.options,e=>e.value,(t,i)=>e`
|
|
179
|
+
<luzmo-radio
|
|
180
|
+
class="numbered-option"
|
|
181
|
+
dir=${n.dir}
|
|
182
|
+
value=${t.value}
|
|
183
|
+
data-option-index=${i}
|
|
184
|
+
size=${n.size}
|
|
185
|
+
emphasized
|
|
186
|
+
?disabled=${n.optionDisabled(r,t,t.value===o)}
|
|
187
|
+
?readonly=${n.readonly}
|
|
188
|
+
aria-describedby=${a(t.disabledReason?`option-reason-${i}`:void 0)}
|
|
189
|
+
@click=${n.handlers.radioClick}
|
|
190
|
+
@change=${n.handlers.radioChange}
|
|
191
|
+
>
|
|
192
|
+
${J(n,t,i)}
|
|
193
|
+
${Y(t,i)}
|
|
194
|
+
</luzmo-radio>
|
|
195
|
+
`)}
|
|
196
|
+
${y(r)?e`
|
|
197
|
+
<div class="other-option-row">
|
|
198
|
+
<div class="other-option-answer">
|
|
199
|
+
<luzmo-radio
|
|
200
|
+
class="numbered-option other-option"
|
|
201
|
+
dir=${n.dir}
|
|
202
|
+
value=${g}
|
|
203
|
+
data-option-index=${r.options.length}
|
|
204
|
+
size=${n.size}
|
|
205
|
+
emphasized
|
|
206
|
+
aria-label=${b(r).label||n.copy.other}
|
|
207
|
+
?disabled=${n.disabled}
|
|
208
|
+
?readonly=${n.readonly}
|
|
209
|
+
@change=${n.handlers.radioChange}
|
|
210
|
+
>
|
|
211
|
+
<span class="option-number option-edit" aria-hidden="true">
|
|
212
|
+
<luzmo-icon
|
|
213
|
+
block
|
|
214
|
+
dir=${n.dir}
|
|
215
|
+
.size=${K(n.size)}
|
|
216
|
+
.icon=${d}
|
|
217
|
+
></luzmo-icon>
|
|
218
|
+
</span>
|
|
219
|
+
</luzmo-radio>
|
|
220
|
+
${Z(n,r)}
|
|
221
|
+
</div>
|
|
222
|
+
${ge(n,r)}
|
|
223
|
+
</div>
|
|
224
|
+
`:t}
|
|
225
|
+
${pe(n,i)}
|
|
226
|
+
</luzmo-radio-group>
|
|
227
|
+
`}function Q(n,r,i){let o=new Set(n.selectedValues(r)),s=n.isOtherSelected(r),c=r.options.some(e=>e.description)?`options options--descriptive`:`options`,l=ne(r,n.copy);return e`
|
|
228
|
+
${l?e`<span class="visually-hidden" id="selection-requirement"
|
|
229
|
+
>${l}</span
|
|
230
|
+
>`:t}
|
|
231
|
+
<luzmo-field-group
|
|
232
|
+
id="options"
|
|
233
|
+
dir=${n.dir}
|
|
234
|
+
class=${c}
|
|
235
|
+
vertical
|
|
236
|
+
label=${r.title}
|
|
237
|
+
aria-describedby=${a(l?`selection-requirement`:void 0)}
|
|
238
|
+
?invalid=${!!i}
|
|
239
|
+
@focusin=${n.handlers.focusIn}
|
|
240
|
+
@focusout=${n.handlers.focusOut}
|
|
241
|
+
>
|
|
242
|
+
${m(r.options,e=>e.value,(t,i)=>e`
|
|
243
|
+
<luzmo-checkbox
|
|
244
|
+
class="numbered-option"
|
|
245
|
+
dir=${n.dir}
|
|
246
|
+
data-value=${t.value}
|
|
247
|
+
data-option-index=${i}
|
|
248
|
+
size=${n.size}
|
|
249
|
+
emphasized
|
|
250
|
+
?checked=${o.has(t.value)}
|
|
251
|
+
?disabled=${n.optionDisabled(r,t,o.has(t.value))}
|
|
252
|
+
?readonly=${n.readonly}
|
|
253
|
+
aria-describedby=${a(t.disabledReason?`option-reason-${i}`:void 0)}
|
|
254
|
+
@change=${n.handlers.checkboxChange}
|
|
255
|
+
>
|
|
256
|
+
${J(n,t,i)}
|
|
257
|
+
${Y(t,i)}
|
|
258
|
+
</luzmo-checkbox>
|
|
259
|
+
`)}
|
|
260
|
+
${y(r)?e`
|
|
261
|
+
<div class="other-option-row other-option-row--multiple">
|
|
262
|
+
<div class="other-option-answer">
|
|
263
|
+
<luzmo-checkbox
|
|
264
|
+
class="numbered-option other-option"
|
|
265
|
+
dir=${n.dir}
|
|
266
|
+
data-value=${g}
|
|
267
|
+
data-option-index=${r.options.length}
|
|
268
|
+
size=${n.size}
|
|
269
|
+
emphasized
|
|
270
|
+
?checked=${s}
|
|
271
|
+
?disabled=${n.optionDisabled(r,{value:g,label:n.copy.other},s)}
|
|
272
|
+
?readonly=${n.readonly}
|
|
273
|
+
@change=${n.handlers.checkboxChange}
|
|
274
|
+
>
|
|
275
|
+
<span class="option-number option-edit" aria-hidden="true">
|
|
276
|
+
<luzmo-icon
|
|
277
|
+
block
|
|
278
|
+
dir=${n.dir}
|
|
279
|
+
.size=${K(n.size)}
|
|
280
|
+
.icon=${d}
|
|
281
|
+
></luzmo-icon>
|
|
282
|
+
</span>
|
|
283
|
+
<span class="visually-hidden"
|
|
284
|
+
>${b(r).label||n.copy.other}</span
|
|
285
|
+
>
|
|
286
|
+
</luzmo-checkbox>
|
|
287
|
+
${Z(n,r)}
|
|
288
|
+
</div>
|
|
289
|
+
</div>
|
|
290
|
+
${me(n,r)}
|
|
291
|
+
`:t}
|
|
292
|
+
</luzmo-field-group>
|
|
293
|
+
`}function ve(n,r){let i=n.copy,a=O(i.progress,{current:String(n.step+1),total:String(n.questions.length)}),o=!n.questionInvalid(r);return e`
|
|
294
|
+
<header class="header">
|
|
295
|
+
<div class="heading">
|
|
296
|
+
<h2 class="title" id="question-title" tabindex="-1">
|
|
297
|
+
${r.title}
|
|
298
|
+
</h2>
|
|
299
|
+
${r.description?e`<p class="description" id="question-description">
|
|
300
|
+
${r.description}
|
|
301
|
+
</p>`:t}
|
|
302
|
+
</div>
|
|
303
|
+
<div class="header-actions">
|
|
304
|
+
${n.questions.length>1?e`
|
|
305
|
+
<nav class="step-navigation" aria-label=${a}>
|
|
306
|
+
<luzmo-action-button
|
|
307
|
+
id="back-button"
|
|
308
|
+
dir=${n.dir}
|
|
309
|
+
quiet
|
|
310
|
+
size=${G(n.size)}
|
|
311
|
+
label=${i.back}
|
|
312
|
+
?disabled=${n.disabled||n.step===0}
|
|
313
|
+
@click=${n.handlers.back}
|
|
314
|
+
>
|
|
315
|
+
<div slot="icon">
|
|
316
|
+
<luzmo-icon
|
|
317
|
+
block
|
|
318
|
+
dir=${n.dir}
|
|
319
|
+
.size=${G(n.size)}
|
|
320
|
+
.icon=${u}
|
|
321
|
+
></luzmo-icon>
|
|
322
|
+
</div>
|
|
323
|
+
</luzmo-action-button>
|
|
324
|
+
<p class="progress" id="progress" aria-live="polite">
|
|
325
|
+
${a}
|
|
326
|
+
</p>
|
|
327
|
+
<luzmo-action-button
|
|
328
|
+
id="continue-button"
|
|
329
|
+
dir=${n.dir}
|
|
330
|
+
quiet
|
|
331
|
+
size=${G(n.size)}
|
|
332
|
+
label=${i.continue}
|
|
333
|
+
?disabled=${n.disabled||n.readonly||q(n)||!o}
|
|
334
|
+
@click=${n.handlers.primary}
|
|
335
|
+
>
|
|
336
|
+
<div slot="icon">
|
|
337
|
+
<luzmo-icon
|
|
338
|
+
block
|
|
339
|
+
dir=${n.dir}
|
|
340
|
+
.size=${G(n.size)}
|
|
341
|
+
.icon=${f}
|
|
342
|
+
></luzmo-icon>
|
|
343
|
+
</div>
|
|
344
|
+
</luzmo-action-button>
|
|
345
|
+
</nav>
|
|
346
|
+
`:t}
|
|
347
|
+
${n.hideClose?t:e`
|
|
348
|
+
<luzmo-close-button
|
|
349
|
+
id="close-button"
|
|
350
|
+
dir=${n.dir}
|
|
351
|
+
class="close"
|
|
352
|
+
label=${i.close}
|
|
353
|
+
size=${n.size}
|
|
354
|
+
?disabled=${n.disabled}
|
|
355
|
+
@click=${n.handlers.cancel}
|
|
356
|
+
></luzmo-close-button>
|
|
357
|
+
`}
|
|
358
|
+
</div>
|
|
359
|
+
</header>
|
|
360
|
+
`}function ye(n,r){let i=n.copy,a=!n.questionInvalid(r);return e`
|
|
361
|
+
<footer class="footer">
|
|
362
|
+
<div class="status">${X(n,r)}</div>
|
|
363
|
+
<div class="actions">
|
|
364
|
+
${n.hideSkip?t:e`
|
|
365
|
+
<luzmo-button
|
|
366
|
+
id="skip-button"
|
|
367
|
+
dir=${n.dir}
|
|
368
|
+
variant="primary"
|
|
369
|
+
treatment="outline"
|
|
370
|
+
size=${G(n.size)}
|
|
371
|
+
?disabled=${n.disabled}
|
|
372
|
+
@click=${n.handlers.skip}
|
|
373
|
+
>${i.skip}</luzmo-button
|
|
374
|
+
>
|
|
375
|
+
`}
|
|
376
|
+
${q(n)&&r.type===`multiple`?e`
|
|
377
|
+
<luzmo-button
|
|
378
|
+
id="submit-button"
|
|
379
|
+
dir=${n.dir}
|
|
380
|
+
variant="primary"
|
|
381
|
+
treatment="outline"
|
|
382
|
+
size=${G(n.size)}
|
|
383
|
+
?disabled=${n.disabled||n.readonly||!a}
|
|
384
|
+
@click=${n.handlers.primary}
|
|
385
|
+
>${i.submit}</luzmo-button
|
|
386
|
+
>
|
|
387
|
+
`:t}
|
|
388
|
+
</div>
|
|
389
|
+
</footer>
|
|
390
|
+
`}function be(n){if(n.questions.length===0)return t;if(n.resolved)return fe(n);let r=n.questions[n.step];if(!r)return t;let i=n.showError?n.questionError(r):void 0,o=!y(r)&&(r.type===`multiple`||!n.hideSkip),s=[n.questions.length>1?`progress`:``,r.description?`question-description`:``,i?`question-error`:``].filter(Boolean).join(` `)||void 0;return e`
|
|
391
|
+
<div class="card" @click=${n.handlers.contentClick}>
|
|
392
|
+
${ve(n,r)}
|
|
393
|
+
<div
|
|
394
|
+
class="body"
|
|
395
|
+
role="group"
|
|
396
|
+
aria-labelledby="question-title"
|
|
397
|
+
aria-describedby=${a(s)}
|
|
398
|
+
>
|
|
399
|
+
${r.type===`single`?_e(n,r,i):Q(n,r,i)}
|
|
400
|
+
</div>
|
|
401
|
+
${o?ye(n,r):t}
|
|
402
|
+
</div>
|
|
403
|
+
`}var $=class extends r(s,{validSizes:[`s`,`m`,`l`,`xl`]}){constructor(...e){super(...e),this.questions=[],this.value={},this.labels={},this.dir=`ltr`,this.disabled=!1,this.readonly=!1,this.hideClose=!1,this.hideSkip=!1,this.showChange=!1,this._optionIndicator=`numbers`,this._step=0,this._resolved=!1,this._submitted=!1,this._showError=!1,this.languageResolver=new ee(this),this._radioChangeAdvanced=!1,this.multipleChoiceRoving=new p(this,{direction:`vertical`,elements:()=>[...this.shadowRoot?.querySelectorAll(`luzmo-field-group#options luzmo-checkbox[data-option-index]`)??[]],focusInIndex:e=>{let t=e.findIndex(e=>e.checked&&!e.disabled);return t===-1?e.findIndex(e=>!e.disabled):t},isFocusableElement:e=>!e.disabled,listenerScope:()=>this.shadowRoot?.querySelector(`luzmo-field-group#options`)}),this.handleKeydown=e=>{if(this.disabled)return;let t=e.composedPath(),n=this.shadowRoot?.activeElement;if(e.key!==`Escape`&&this.otherField&&(t.includes(this.otherField)||n===this.otherField))return;let r=this.focusedOptionForEvent(e),i=this.currentQuestion;if(i?.type===`multiple`&&r&&this.multipleChoiceRoving.acceptsEventCode(e.code)&&!e.defaultPrevented){let t=this.multipleChoiceRoving.elements.indexOf(r);t!==-1&&(this.multipleChoiceRoving.currentIndex=t),this.multipleChoiceRoving.hostContainsFocus(),this.multipleChoiceRoving.handleKeydown(e);return}if(!this.readonly&&e.code===`Space`&&r&&!r.hasAttribute(`disabled`)){e.preventDefault();return}let a=this.optionIndicator===`letters`&&/^[a-z]$/i.test(e.key)?e.key.toUpperCase().charCodeAt(0)-65:this.optionIndicator===`numbers`&&/^[1-9]$/.test(e.key)?Number(e.key)-1:-1,o=!this.readonly&&r&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&a>=0?this.shadowRoot?.querySelector(`[data-option-index="${a}"]:not([disabled])`):void 0;if(o){e.preventDefault();let t=o.getAttribute(`value`)??o.dataset.value;if(i?.type===`single`&&t!==`__other__`&&this.selectedValues(i)[0]===t){this.advanceAfterSingleSelection();return}o.click();return}e.key===`Escape`&&(e.preventDefault(),!this.disabled&&this.cancel())},this.handleKeyup=e=>{if(this.disabled||this.readonly||e.code!==`Space`)return;let t=this.focusedOptionForEvent(e);!t||t.hasAttribute(`disabled`)||(e.preventDefault(),t.click())},this.handleFocusIn=e=>{let t=this.focusedOptionForEvent(e);this.markKeyboardFocus(t&&this.optionShowsKeyboardFocus(t)?t:void 0)},this.handleContentClick=e=>{this.disabled||e.composedPath().some(e=>e instanceof Element&&e.matches(`a[href], button, input, select, textarea, [contenteditable="true"], [data-option-index], #other-field, luzmo-action-button, luzmo-button, luzmo-close-button`))||this.focusOptions()},this.handleFocusOut=()=>{requestAnimationFrame(()=>{let e=this.shadowRoot?.activeElement;(!(e instanceof HTMLElement)||e.dataset.optionIndex===void 0)&&this.markKeyboardFocus()})},this.handleCancelClick=e=>{e.preventDefault(),this.cancel()},this.handleSkip=e=>{e.preventDefault(),!this.disabled&&this.emitResult(`decline`)},this.handleBack=e=>{e.preventDefault(),!(this.disabled||this._step===0)&&(this._showError=!1,--this._step,this.updateComplete.then(()=>this.moveFocus(this.questionTitle)))},this.handlePrimary=()=>{let e=this.currentQuestion;if(!(!e||this.disabled||this.readonly)){if(this.questionInvalid(e)){this._showError=!0,this.focusOptions();return}if(this._showError=!1,this._step<this.questions.length-1){this._step+=1,this.updateComplete.then(()=>this.moveFocus(this.questionTitle));return}this.acceptFlow()}},this.handleChange=()=>{this._resolved=!1,this._submitted=!1,this._showError=!1,this.updateComplete.then(()=>this.focusOptions())},this.handleRadioChange=e=>{if(e.stopPropagation(),this.disabled||this.readonly)return;let t=this.currentQuestion;if(!t)return;let n=e.target.value||e.currentTarget.selected;if(n){if(n===`__other__`&&!String(this.value[v(t.id)]??``).trim()){this.requestUpdate(),this.updateComplete.then(()=>this.moveFocus(this.otherField));return}this.commitAnswer(t.id,n,!0),n!==`__other__`&&(this._radioChangeAdvanced=!0,this.advanceAfterSingleSelection(),queueMicrotask(()=>{this._radioChangeAdvanced=!1}))}},this.handleRadioClick=e=>{if(this._radioChangeAdvanced||this.disabled||this.readonly)return;let t=this.currentQuestion,n=e.currentTarget;t?.type===`single`&&n.value!==`__other__`&&this.selectedValues(t)[0]===n.value&&this.advanceAfterSingleSelection()},this.handleCheckboxChange=e=>{if(e.stopPropagation(),this.disabled||this.readonly)return;let t=this.currentQuestion;if(!t)return;let n=e.currentTarget,r=n.dataset.value;if(!r)return;let i=new Set(this.selectedValues(t));if(r===`__other__`&&n.checked&&!String(this.value[v(t.id)]??``).trim()){n.checked=!1,this.moveFocus(this.otherField);return}n.checked?i.add(r):i.delete(r);let a=[...t.options.map(e=>e.value),...y(t)?[g]:[]].filter(e=>i.has(e));this.commitAnswer(t.id,w(a),!0),r===`__other__`&&n.checked&&this.updateComplete.then(()=>this.moveFocus(this.otherField))},this.handleOtherInput=e=>{if(e.stopPropagation(),this.disabled||this.readonly)return;let t=this.currentQuestion;if(!t)return;let n=e.currentTarget;this.commitOther(t,n.value,!1)},this.handleOtherChange=e=>{if(e.stopPropagation(),this.disabled||this.readonly)return;let t=this.currentQuestion;if(!t)return;let n=e.currentTarget;this.commitOther(t,n.value,!0)},this.handleOtherKeydown=e=>{if(e.key!==`Enter`||e.shiftKey||e.isComposing||this.disabled||this.readonly)return;e.preventDefault();let t=this.currentQuestion;t&&String(this.value[v(t.id)]??``).trim()&&this.handlePrimary()}}static get styles(){let e=super.styles;return[...Array.isArray(e)?e:e?[e]:[],n(h)]}get optionIndicator(){return this._optionIndicator}set optionIndicator(e){let t=this._optionIndicator;this._optionIndicator=e===`letters`?`letters`:`numbers`,this.requestUpdate(`optionIndicator`,t)}connectedCallback(){super.connectedCallback(),this.addEventListener(`keydown`,this.handleKeydown),this.addEventListener(`keyup`,this.handleKeyup),this.addEventListener(`focusin`,this.handleFocusIn)}attributeChangedCallback(e,t,n){if(e===`option-indicator`&&n!==null&&n!==`numbers`&&n!==`letters`){this.setAttribute(`option-indicator`,`numbers`);return}super.attributeChangedCallback(e,t,n)}disconnectedCallback(){this.removeEventListener(`keydown`,this.handleKeydown),this.removeEventListener(`keyup`,this.handleKeyup),this.removeEventListener(`focusin`,this.handleFocusIn),super.disconnectedCallback()}focus(){if(this._resolved){this.moveFocus(this.resolvedTitle);return}this.focusOptions()}checkValidity(){return this.questions.every(e=>!this.questionInvalid(e))}submit(){this.disabled||this.readonly||this._submitted||this.acceptFlow()}reset(){this._resolved=!1,this._submitted=!1,this._showError=!1,this._step=0,this.value={}}cancel(){this.emitResult(`cancel`)}willUpdate(e){if(super.willUpdate(e),e.has(`questions`)||e.has(`value`)){if(e.has(`questions`)){k(this.questions);let t=(e.get(`questions`)??[]).map(e=>e.id),n=this.questions.map(e=>e.id);t.join(`\0`)!==n.join(`\0`)&&(this._step=0,this._resolved=!1,this._submitted=!1,this._showError=!1)}let t=A(this.questions,this.value);C(t,this.value)||(this.value=t)}e.has(`questions`)&&(this._step=Math.min(this._step,Math.max(0,this.questions.length-1)))}updated(e){super.updated(e),(e.has(`questions`)||e.has(`size`)||e.has(`disabled`)||e.has(`readonly`)||e.has(`_step`)||e.has(`_resolved`))&&this.multipleChoiceRoving.clearElementCache()}render(){return be(this.renderContext)}get renderContext(){return{questions:this.questions,value:this.value,copy:this.copy,step:this._step,resolved:this._resolved,submitted:this._submitted,showError:this._showError,disabled:this.disabled,readonly:this.readonly,hideClose:this.hideClose,hideSkip:this.hideSkip,showChange:this.showChange,optionIndicator:this.optionIndicator,size:this.size,dir:this.dir,language:this.languageResolver.language,selectedValues:e=>this.selectedValues(e),isOtherSelected:e=>this.isOtherSelected(e),questionError:e=>this.questionError(e),questionInvalid:e=>this.questionInvalid(e),optionDisabled:(e,t,n)=>this.optionDisabled(e,t,n),handlers:this.renderHandlers}}get renderHandlers(){return{contentClick:this.handleContentClick,back:this.handleBack,primary:this.handlePrimary,skip:this.handleSkip,cancel:this.handleCancelClick,change:this.handleChange,radioChange:this.handleRadioChange,radioClick:this.handleRadioClick,checkboxChange:this.handleCheckboxChange,otherInput:this.handleOtherInput,otherChange:this.handleOtherChange,otherKeydown:this.handleOtherKeydown,focusIn:this.handleFocusIn,focusOut:this.handleFocusOut}}get copy(){return D(this.labels)}get currentQuestion(){return this.questions[this._step]}optionShowsKeyboardFocus(e){let t=e=>{if(!e)return!1;try{return e.matches(`:focus-visible`)||e.matches(`.focus-visible`)}catch{return e.matches(`.focus-visible`)}};return t(e)||t(e.shadowRoot?.activeElement)||this.hasVisibleFocusInTree()}markKeyboardFocus(e){this.shadowRoot?.querySelectorAll(`[data-focus-visible]`).forEach(e=>delete e.dataset.focusVisible),this.shadowRoot?.querySelectorAll(`.option-number--focused`).forEach(e=>e.classList.remove(`option-number--focused`)),e&&(e.dataset.focusVisible=``,e.querySelector(`.option-number`)?.classList.add(`option-number--focused`))}focusedOptionForEvent(e){let t=e.composedPath().find(e=>e instanceof HTMLElement&&e.dataset.optionIndex!==void 0);if(t)return t;let n=this.shadowRoot?.activeElement;return n instanceof HTMLElement&&n.dataset.optionIndex!==void 0?n:void 0}moveFocus(e){if(e)try{e.focus()}catch{try{HTMLElement.prototype.focus.call(e)}catch{return}}}focusOptions(){let e=this.optionsGroup;if(!e){this.moveFocus(this.questionTitle);return}let t=this.currentQuestion,n=t?.type===`single`?this.selectedValues(t)[0]:void 0,r=n?e.querySelector(`luzmo-radio[value="${CSS.escape(n)}"]:not([disabled])`):void 0,i=e.querySelector(`[data-option-index]:not([disabled])`);this.moveFocus(r??i??e)}advanceAfterSingleSelection(){if(this._step<this.questions.length-1){this._step+=1,this.updateComplete.then(()=>this.moveFocus(this.questionTitle));return}this._resolved=!0,this._submitted=!1,this.updateComplete.then(()=>this.focus())}acceptFlow(){let e=this.questions.findIndex(e=>this.questionInvalid(e));if(e!==-1){this._step=e,this._showError=!0,this.updateComplete.then(()=>this.focusOptions());return}this._showError=!1,this._resolved=!0,this._submitted=!0,this.emitResult(`accept`,R(this.questions,this.value)),this.updateComplete.then(()=>this.focus())}commitAnswer(e,t,n){let r=x(this.value);S(r,e,t),this.assignValue(r,n)}commitOther(e,t,n){let r=x(this.value);S(r,v(e.id),t);let i=t.trim().length>0;if(e.type===`single`)i?S(r,e.id,g):r[e.id]===`__other__`&&S(r,e.id,``);else{let t=new Set(this.selectedValues(e));i?t.add(g):t.delete(g),S(r,e.id,[...e.options.map(e=>e.value),g].filter(e=>t.has(e)))}this.assignValue(r,n)}assignValue(e,t){C(e,this.value)||(this.value=e,this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0}))),t&&this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0}))}emitResult(e,t){let n=e===`accept`?{action:e,content:t}:{action:e};if(e===`accept`){this.dispatchEvent(new CustomEvent(`luzmo-submit`,{detail:n,bubbles:!0,composed:!0}));return}if(e===`decline`){this.dispatchEvent(new CustomEvent(`luzmo-decline`,{detail:n,bubbles:!0,composed:!0}));return}this.dispatchEvent(new CustomEvent(`luzmo-cancel`,{detail:n,bubbles:!0,composed:!0}))}selectedValues(e){return T(e,this.value)}isOtherSelected(e){return E(e,this.value)}questionError(e){return ie(e,this.value,this.copy)}questionInvalid(e){return re(e,this.value)}optionDisabled(e,t,n){return ae(e,t,n,this.value,this.disabled)}};o([l({attribute:!1})],$.prototype,`questions`,void 0),o([l({attribute:!1})],$.prototype,`value`,void 0),o([l({attribute:!1})],$.prototype,`labels`,void 0),o([l({reflect:!0})],$.prototype,`dir`,void 0),o([l({type:Boolean,reflect:!0})],$.prototype,`disabled`,void 0),o([l({type:Boolean,reflect:!0})],$.prototype,`readonly`,void 0),o([l({type:Boolean,reflect:!0,attribute:`hide-close`})],$.prototype,`hideClose`,void 0),o([l({type:Boolean,reflect:!0,attribute:`hide-skip`})],$.prototype,`hideSkip`,void 0),o([l({type:Boolean,reflect:!0,attribute:`show-change`})],$.prototype,`showChange`,void 0),o([l({reflect:!0,attribute:`option-indicator`})],$.prototype,`optionIndicator`,null),o([c()],$.prototype,`_step`,void 0),o([c()],$.prototype,`_resolved`,void 0),o([c()],$.prototype,`_submitted`,void 0),o([c()],$.prototype,`_showError`,void 0),o([i(`#question-title`)],$.prototype,`questionTitle`,void 0),o([i(`#other-field`)],$.prototype,`otherField`,void 0),o([i(`#options`)],$.prototype,`optionsGroup`,void 0),o([i(`#resolved-title`)],$.prototype,`resolvedTitle`,void 0),typeof customElements<`u`&&!customElements.get(`luzmo-question-box`)&&customElements.define(`luzmo-question-box`,$);export{_ as DEFAULT_QUESTION_BOX_LABELS,$ as LuzmoQuestionBox,g as QUESTION_BOX_OTHER_VALUE,v as questionBoxOtherKey,I as questionsToRequestedSchema,le as requestedSchemaToQuestions,R as toElicitationContent};
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
*/
|
|
19
|
+
|
|
20
|
+
import"./tokens.js";import{n as e,t}from"./chunks/radio-2vHhfmHw.js";export{e as LuzmoRadio,t as LuzmoRadioGroup};
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
*/
|
|
19
|
+
|
|
20
|
+
import"./tokens.js";import{c as e,i as t,y as n}from"./chunks/lit-BN_lRQbJ.js";import{g as r,i,l as a,y as o}from"./chunks/lucero-runtime-DGJ9-isg.js";import{j as s,n as c,x as l}from"./chunks/luzmo-icons-CJa-aByT.js";import"./chunks/icon-Dy6J1QeX.js";import{t as u}from"./chunks/text-field-BrlDeJsx.js";import"./chunks/button-Dykw3TSO.js";var d=`@media (forced-colors:active){#text-field #text-field,#text-field #text-field .input{--highcontrast-search-color-default:CanvasText;--highcontrast-search-color-hover:CanvasText;--highcontrast-search-color-focus:CanvasText;--highcontrast-search-color-disabled:GrayText}#text-field #button .luzmo-ClearButton-fill{forced-color-adjust:none;background-color:initial}}#text-field{--search-button-inline-size:var(--search-block-size);--search-min-inline-size:calc(var(--search-min-inline-multiplier) * var(--search-block-size));--luzmo-text-field-font-family:var(--luzmo-search-font-family,var(--search-font-family));--luzmo-text-field-font-weight:var(--luzmo-search-font-weight,var(--search-font-weight));--luzmo-text-field-border-radius:var(--luzmo-search-border-radius,var(--search-border-radius));--luzmo-text-field-border-width:var(--luzmo-search-border-width,var(--search-border-width));--luzmo-text-field-focus-indicator-gap:var(--luzmo-search-focus-indicator-gap,var(--search-focus-indicator-gap));--luzmo-text-field-focus-indicator-width:var(--luzmo-search-focus-indicator-width,var(--search-focus-indicator-width));--luzmo-text-field-focus-indicator-color:var(--luzmo-search-focus-indicator-color,var(--search-focus-indicator-color));--luzmo-text-field-text-color-default:var(--luzmo-search-color-default,var(--search-color-default));--luzmo-text-field-text-color-hover:var(--luzmo-search-color-hover,var(--search-color-hover));--luzmo-text-field-text-color-focus:var(--luzmo-search-color-focus,var(--search-color-focus));--luzmo-text-field-text-color-focus-hover:var(--luzmo-search-color-focus-hover,var(--search-color-focus-hover));--luzmo-text-field-text-color-keyboard-focus:var(--luzmo-search-color-key-focus,var(--search-color-key-focus));--luzmo-text-field-text-color-disabled:var(--luzmo-search-color-disabled,var(--search-color-disabled));--luzmo-text-field-border-color:var(--luzmo-search-border-color-default,var(--search-border-color-default));--luzmo-text-field-border-color-hover:var(--luzmo-search-border-color-hover,var(--search-border-color-hover));--luzmo-text-field-border-color-focus:var(--luzmo-search-border-color-focus,var(--search-border-color-focus));--luzmo-text-field-border-color-focus-hover:var(--luzmo-search-border-color-focus-hover,var(--search-border-color-focus-hover));--luzmo-text-field-border-color-keyboard-focus:var(--luzmo-search-border-color-key-focus,var(--search-border-color-key-focus));--luzmo-text-field-border-color-disabled:var(--luzmo-search-border-color-disabled,var(--search-border-color-disabled));--luzmo-text-field-background-color:var(--luzmo-search-background-color,var(--search-background-color));--luzmo-text-field-background-color-disabled:var(--luzmo-search-background-color-disabled,var(--search-background-color-disabled));inline-size:var(--luzmo-search-inline-size,var(--search-inline-size));min-inline-size:var(--luzmo-search-min-inline-size,var(--search-min-inline-size));display:inline-block;position:relative}#text-field .luzmo-HelpText{margin-block-start:var(--luzmo-search-to-help-text,var(--search-to-help-text))}#button{height:var(--search-block-size);width:var(--search-block-size);position:absolute;inset-block-start:0;inset-inline-end:0}#button,#button .luzmo-ClearButton-fill{border-radius:var(--luzmo-search-border-radius,var(--search-border-radius))}:is(:host([invalid]) #form:has(#button) .icon,:host([valid]) #form:has(#button) .icon){inset-inline-end:var(--luzmo-search-button-inline-size,var(--search-button-inline-size))}:is(:host([invalid]:not([quiet])) #form:has(#button) .input,:host([valid]:not([quiet])) #form:has(#button) .input){padding-inline-end:calc(var(--luzmo-search-button-inline-size,var(--search-button-inline-size)) + var(--search-validation-icon-size) + var(--luzmo-search-text-to-icon,var(--search-text-to-icon)) - var(--luzmo-search-border-width,var(--search-border-width)))}:is(:host([invalid][quiet]) #form:has(#button) .input,:host([valid][quiet]) #form:has(#button) .input){padding-inline-end:calc(var(--luzmo-search-button-inline-size,var(--search-button-inline-size)) + var(--search-validation-icon-size) + var(--luzmo-search-text-to-icon,var(--search-text-to-icon)))}#text-field.is-disabled #button{display:none}#text-field{inline-size:100%}.icon-search{--search-color:var(--highcontrast-search-color-default,var(--luzmo-search-color-default,var(--search-color-default)));color:var(--search-color);margin-block:auto;display:block;position:absolute;inset-block:0}#text-field.is-focused .icon-search{--search-color:var(--highcontrast-search-color-focus,var(--luzmo-search-color-focus,var(--search-color-focus)))}#text-field.is-disabled .icon-search,:host([disabled]) #text-field .icon-search,:host([readonly]) #text-field .icon-search{--search-color:var(--highcontrast-search-color-disabled,var(--luzmo-search-color-disabled,var(--search-color-disabled)))}@media (hover:hover){#text-field:hover .icon-search{--search-color:var(--highcontrast-search-color-hover,var(--luzmo-search-color-hover,var(--search-color-hover)))}#text-field.is-focused:hover .icon-search{--search-color:var(--highcontrast-search-color-focus,var(--luzmo-search-color-focus-hover,var(--search-color-focus-hover)))}#text-field.is-disabled:hover .icon-search{--search-color:var(--highcontrast-search-color-disabled,var(--luzmo-search-color-disabled,var(--search-color-disabled)))}}.input{appearance:none;block-size:var(--luzmo-search-block-size,var(--search-block-size));font-style:var(--luzmo-search-font-style,var(--search-font-style));line-height:var(--luzmo-search-line-height,var(--search-line-height));padding-block-start:calc(var(--luzmo-search-top-to-text,var(--search-top-to-text)) - var(--luzmo-search-border-width,var(--search-border-width)));padding-block-end:calc(var(--luzmo-search-bottom-to-text,var(--search-bottom-to-text)) - var(--luzmo-search-border-width,var(--search-border-width)))}.input::-webkit-search-cancel-button{appearance:none}.input::-webkit-search-decoration{appearance:none}:host #text-field .icon-search{inset-inline-start:var(--luzmo-search-edge-to-visual,var(--search-edge-to-visual))}:host(:not([quiet])) #text-field .input{padding-inline-start:calc(var(--luzmo-search-edge-to-visual,var(--search-edge-to-visual)) - var(--luzmo-search-border-width,var(--search-border-width)) + var(--luzmo-search-icon-size,var(--search-icon-size)) + var(--luzmo-search-text-to-icon,var(--search-text-to-icon)));padding-inline-end:calc(var(--luzmo-search-button-inline-size,var(--search-button-inline-size)) - var(--luzmo-search-border-width,var(--search-border-width)))}:host([hide-icon]:not([quiet])) #text-field .input{padding-inline-start:calc(var(--luzmo-search-edge-to-visual,var(--search-edge-to-visual)) - var(--luzmo-search-border-width,var(--search-border-width)))}:host([hide-icon][quiet]) #text-field .input{padding-inline-start:var(--luzmo-search-edge-to-visual,var(--search-edge-to-visual))}:host([quiet]){--search-quiet-button-offset:var(--luzmo-search-quiet-button-offset,calc(var(--luzmo-search-block-size,var(--search-block-size)) / 2 - var(--luzmo-search-icon-size,var(--search-icon-size)) / 2))}:host([quiet]) #button .luzmo-ClearButton-icon{transform:translateX(var(--search-quiet-button-offset))}:host([quiet]) #text-field .input{border-radius:var(--luzmo-search-border-radius,var(--search-border-radius));padding-block-start:var(--luzmo-search-top-to-text,var(--search-top-to-text));padding-inline-start:calc(var(--luzmo-search-edge-to-visual,var(--search-edge-to-visual)) + var(--luzmo-search-icon-size,var(--search-icon-size)) + var(--luzmo-search-text-to-icon,var(--search-text-to-icon)));padding-inline-end:calc(var(--luzmo-search-button-inline-size,var(--search-button-inline-size)) - var(--search-quiet-button-offset))}:host{--search-border-color-default:var(--luzmo-border-color);--search-border-color-hover:rgba(var(--luzmo-primary-rgb), .3);--search-border-color-focus:var(--luzmo-primary);--search-border-color-focus-hover:var(--luzmo-primary);--search-border-color-key-focus:var(--luzmo-primary);--search-inline-size:192px;--search-min-inline-multiplier:3;--search-to-help-text:0px;--search-top-to-text:var(--luzmo-spacing-2);--search-bottom-to-text:var(--luzmo-spacing-2);--search-focus-indicator-width:var(--luzmo-indicator-width);--search-focus-indicator-gap:-1px;--search-focus-indicator-color:var(--luzmo-primary);--search-font-family:var(--luzmo-font-family);--search-font-weight:var(--luzmo-font-weight);--search-font-style:var(--luzmo-font-style);--search-line-height:var(--luzmo-line-height);--search-color-default:var(--luzmo-font-color);--search-color-hover:var(--luzmo-font-color-hover);--search-color-focus:var(--luzmo-font-color-focus);--search-color-focus-hover:var(--luzmo-font-focus);--search-color-key-focus:var(--luzmo-font-color-focus);--search-border-width:var(--luzmo-border-width);--search-background-color:var(--luzmo-background-color);--search-color-disabled:var(--luzmo-disabled-color);--search-background-color-disabled:var(--luzmo-background-color-disabled);--search-border-color-disabled:var(--luzmo-border-color-disabled)}:host #text-field{--search-border-radius:var(--luzmo-border-radius);--search-edge-to-visual:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--search-block-size:var(--luzmo-component-height);--search-icon-size:var(--luzmo-font-size-l);--search-text-to-icon:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1))}:host([invalid]) #text-field{--search-validation-icon-size:var(--luzmo-text-field-icon-size-invalid,var(--text-field-icon-size-invalid))}:host([valid]) #text-field{--search-validation-icon-size:var(--luzmo-text-field-icon-size-valid,var(--text-field-icon-size-valid))}:host([size=s]) #text-field{--search-border-radius:var(--luzmo-border-radius);--search-edge-to-visual:var(--luzmo-spacing-3);--search-block-size:var(--luzmo-component-height-s);--search-icon-size:var(--luzmo-font-size);--search-text-to-icon:var(--luzmo-spacing-3)}:host([size=l]) #text-field{--search-border-radius:var(--luzmo-border-radius);--search-edge-to-visual:var(--luzmo-spacing-4);--search-block-size:var(--luzmo-component-height-l);--search-icon-size:var(--luzmo-font-size-xl);--search-text-to-icon:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1))}:host([size=xl]) #text-field{--search-border-radius:var(--luzmo-border-radius);--search-edge-to-visual:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--search-block-size:var(--luzmo-component-height-xl);--search-icon-size:var(--luzmo-font-size-xxl);--search-text-to-icon:var(--luzmo-spacing-4)}:host([quiet]) #text-field{--search-background-color:transparent;--search-background-color-disabled:transparent;--search-border-color-disabled:var(--luzmo-border-color-disabled);--search-border-radius:0;--search-edge-to-visual:0px}:host{--luzmo-text-field-spacing-inline:var(--alias-infield-button-full-height-m)}input::-webkit-search-cancel-button{display:none}@media (forced-colors:active){luzmo-clear-button{--clear-button-fill-background-color:transparent;--clear-button-fill-background-color-disabled:transparent;--clear-button-fill-background-color-down:transparent;--clear-button-fill-background-color-hover:transparent;--clear-button-fill-background-color-key-focus:transparent}}`,f=e=>e.stopPropagation(),p=e=>e===`s`?c:e===`l`?s:l,m=class extends u{constructor(...e){super(...e),this.action=``,this.label=`Search`,this.placeholder=`Search`,this.hideIcon=!1}static get styles(){return[...super.styles,n(d)]}handleSubmit(e){this.dispatchEvent(new Event(`submit`,{cancelable:!0,bubbles:!0}))||e.preventDefault()}handleKeydown(e){let{code:t}=e;t===`Escape`&&this.holdValueOnEscape||!this.value||t!==`Escape`||this.reset()}async reset(){this.value=``,await this.updateComplete,this.focusElement.dispatchEvent(new InputEvent(`input`,{bubbles:!0,composed:!0})),this.focusElement.dispatchEvent(new InputEvent(`change`,{bubbles:!0}))}renderField(){return e`
|
|
21
|
+
<form
|
|
22
|
+
action=${this.action}
|
|
23
|
+
id="form"
|
|
24
|
+
method=${i(this.method)}
|
|
25
|
+
@submit=${this.handleSubmit}
|
|
26
|
+
@reset=${this.reset}
|
|
27
|
+
@keydown=${this.handleKeydown}
|
|
28
|
+
>
|
|
29
|
+
${this.hideIcon?t:e`
|
|
30
|
+
<luzmo-icon
|
|
31
|
+
block
|
|
32
|
+
.icon=${p(this.size)}
|
|
33
|
+
size=${this.size}
|
|
34
|
+
class="magnifier icon-workflow icon-search"
|
|
35
|
+
></luzmo-icon>
|
|
36
|
+
`}
|
|
37
|
+
${super.renderField()}
|
|
38
|
+
${this.value?e`
|
|
39
|
+
<luzmo-clear-button
|
|
40
|
+
id="button"
|
|
41
|
+
label="Reset"
|
|
42
|
+
tabindex="-1"
|
|
43
|
+
type="reset"
|
|
44
|
+
size=${i(this.size)}
|
|
45
|
+
@keydown=${f}
|
|
46
|
+
></luzmo-clear-button>
|
|
47
|
+
`:t}
|
|
48
|
+
</form>
|
|
49
|
+
`}firstUpdated(e){super.firstUpdated(e),this.hasAttribute(`holdValueOnEscape`)||this.inputElement.setAttribute(`type`,`search`)}willUpdate(){this.multiline=!1}};a([o()],m.prototype,`action`,void 0),a([o()],m.prototype,`label`,void 0),a([o({type:String,reflect:!0})],m.prototype,`border`,void 0),a([o()],m.prototype,`method`,void 0),a([o()],m.prototype,`placeholder`,void 0),a([o({type:Boolean,reflect:!0,attribute:`hide-icon`})],m.prototype,`hideIcon`,void 0),a([o({type:Boolean})],m.prototype,`holdValueOnEscape`,void 0),a([r(`#form`)],m.prototype,`form`,void 0),customElements.get(`luzmo-search`)||customElements.define(`luzmo-search`,m);export{m as LuzmoSearch};
|