@luzmo/lucero 2.5.1 → 2.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.cjs +1 -1
- package/components/accordion/index.js +1 -2
- package/components/{accordion-ciplqKwM.js → accordion-BJLsCC-2.js} +7 -8
- package/components/{accordion-BK0LfhmL.cjs → accordion-OQ0RoC_7.cjs} +1 -1
- package/components/action-bar/index.cjs +1 -1
- package/components/action-bar/index.js +1 -2
- package/components/{action-bar-BZBIeGo7.js → action-bar-B-Y-gJ8B.js} +9 -17
- package/components/{action-bar-DAqG_7VG.cjs → action-bar-Dyt2tyjr.cjs} +1 -1
- package/components/action-button/index.cjs +1 -1
- package/components/action-button/index.js +1 -2
- package/components/{action-button-DU95RNNi.js → action-button-BB3ZZFNN.js} +6 -8
- package/components/{action-button-B4_uvHiN.cjs → action-button-CL4ZlryE.cjs} +1 -1
- package/components/action-group/index.cjs +1 -1
- package/components/action-group/index.js +1 -2
- package/components/{action-group-oo7YV0EW.cjs → action-group-Doll-3Bf.cjs} +1 -1
- package/components/{action-group-DSiruuF0.js → action-group-HECoPCas.js} +7 -9
- package/components/action-menu/index.cjs +1 -1
- package/components/action-menu/index.js +1 -2
- package/components/{action-menu-C_vyFNJt.cjs → action-menu-BW-XpCVO.cjs} +1 -1
- package/components/{action-menu-B6nNYwlL.js → action-menu-LnXQ7reF.js} +11 -13
- package/components/avatar/index.cjs +1 -1
- package/components/avatar/index.js +1 -2
- package/components/{avatar-CwSyYAKV.js → avatar-CVRQDsx6.js} +7 -9
- package/components/{avatar-DHS5UGTJ.cjs → avatar-DFzJbtId.cjs} +1 -1
- package/components/badge/index.cjs +1 -1
- package/components/badge/index.js +1 -2
- package/components/{badge-Bp-1d70q.js → badge-BSfzmBRf.js} +6 -8
- package/components/{badge-CNeUkS4b.cjs → badge-DzElGOcl.cjs} +1 -1
- package/components/button/index.cjs +1 -1
- package/components/button/index.js +2 -2
- package/components/{button-B1V_2tHk.cjs → button-BGEWdRbY.cjs} +2 -2
- package/components/{button-QXavBh1X.js → button-CpaltgRZ.js} +12 -13
- package/components/{button-base-DiPzVpp4.js → button-base-BzakIKd0.js} +12 -35
- package/components/{button-base-DiNxrttk.cjs → button-base-CpK2ktvQ.cjs} +3 -3
- package/components/button-group/index.cjs +1 -1
- package/components/button-group/index.js +1 -2
- package/components/{button-group-Du7R4SxZ.cjs → button-group-C23OtGC0.cjs} +1 -1
- package/components/{button-group-Duf-Igst.js → button-group-DMsT6N0P.js} +4 -6
- package/components/calendar/index.cjs +1 -1
- package/components/calendar/index.js +1 -2
- package/components/{calendar-CLGqcox8.cjs → calendar-BqyGW8gU.cjs} +3 -3
- package/components/{calendar-BNGwCJsG.js → calendar-D4x5gp_0.js} +14 -33
- package/components/chat-message/index.cjs +1 -1
- package/components/chat-message/index.js +1 -2
- package/components/{chat-message-D6U-sprD.js → chat-message-5gP_qbiz.js} +665 -654
- package/components/chat-message-Dn5GKsSD.cjs +148 -0
- package/components/chat-message-group/index.cjs +1 -1
- package/components/chat-message-group/index.js +1 -2
- package/components/{chat-message-group-k9lo-ZqD.js → chat-message-group-Bp4mshBY.js} +18 -18
- package/components/{chat-message-group-CvxdX3jt.cjs → chat-message-group-CJddlS85.cjs} +1 -1
- package/components/checkbox/index.cjs +1 -1
- package/components/checkbox/index.js +1 -2
- package/components/checkbox-CVi4GMoo.cjs +25 -0
- package/components/{checkbox-CydI9yXG.js → checkbox-CvRvgRzh.js} +7 -13
- package/components/{checkbox-mixin-jqmrh48O.js → checkbox-mixin-BIuvxtEt.js} +2 -3
- package/components/{checkbox-mixin-rFRXqyrK.cjs → checkbox-mixin-DAdnTm-F.cjs} +1 -1
- package/components/{close-button-Dlvtf9lB.js → close-button-7zS6PUzh.js} +5 -6
- package/components/{close-button-BAELImQY.cjs → close-button-B06i2hJn.cjs} +1 -1
- package/components/color-area/index.cjs +1 -1
- package/components/color-area/index.js +1 -2
- package/components/{color-area-CmKlQG1i.cjs → color-area-D1fRozE0.cjs} +1 -1
- package/components/{color-area-lbg8wwZG.js → color-area-qlEAp8ZN.js} +10 -20
- package/components/color-controller-BpdydwTO.cjs +18 -0
- package/components/{color-controller-Rg_Zl0sT.js → color-controller-CauSxC_r.js} +1 -2
- package/components/color-field/index.cjs +1 -1
- package/components/color-field/index.js +1 -2
- package/components/{color-field-BH9x46k_.cjs → color-field-CN8shDl_.cjs} +1 -1
- package/components/{color-field-C9S-Fv46.js → color-field-CVyDNZ4b.js} +5 -7
- package/components/color-handle/index.cjs +1 -1
- package/components/color-handle/index.js +1 -2
- package/components/{color-handle-2iFLp9FN.cjs → color-handle-BE0Z1gTU.cjs} +1 -1
- package/components/{color-handle-BEDQ1RcS.js → color-handle-Dc0uLgkf.js} +4 -6
- package/components/color-loupe/index.cjs +1 -1
- package/components/color-loupe/index.js +1 -2
- package/components/{color-loupe-6NcLbFco.cjs → color-loupe-2X1bCYU9.cjs} +1 -1
- package/components/{color-loupe-CqHyyvjQ.js → color-loupe-Bu37Uwk6.js} +3 -5
- package/components/color-menu/index.cjs +1 -1
- package/components/color-menu/index.js +1 -2
- package/components/{color-menu-qJK_clDq.js → color-menu-BxFQnH79.js} +12 -14
- package/components/{color-menu-BYTgxLQG.cjs → color-menu-Cus3S-Re.cjs} +1 -1
- package/components/color-palette/index.cjs +1 -1
- package/components/color-palette/index.js +1 -2
- package/components/{color-palette-x6W09EBL.cjs → color-palette-D5NZDz5I.cjs} +1 -1
- package/components/{color-palette-CqiO5ohz.js → color-palette-UU7Feiwh.js} +7 -8
- package/components/color-palette-group/index.cjs +1 -1
- package/components/color-palette-group/index.js +1 -2
- package/components/{color-palette-group-zByrO_qb.js → color-palette-group-CwmC9iR1.js} +5 -7
- package/components/{color-palette-group-D4k_7pW6.cjs → color-palette-group-DhGh0Db8.cjs} +1 -1
- package/components/color-picker/index.cjs +1 -1
- package/components/color-picker/index.js +1 -2
- package/components/{color-picker-BAikpqUT.cjs → color-picker-BTT1O-76.cjs} +1 -1
- package/components/{color-picker-CSuAPo5X.js → color-picker-orFSIqoZ.js} +9 -11
- package/components/color-slider/index.cjs +1 -1
- package/components/color-slider/index.js +1 -2
- package/components/{color-slider-CMW8gJ0Z.cjs → color-slider-9Ck28Qdk.cjs} +1 -1
- package/components/{color-slider-0JzdSRTy.js → color-slider-X1EArAnx.js} +8 -14
- package/components/{condition-attribute-with-id-BdnTdWKz.js → condition-attribute-with-id-v1wjKZc3.js} +1 -2
- package/components/date-range-picker/index.cjs +1 -1
- package/components/date-range-picker/index.js +1 -2
- package/components/{date-range-picker-5SDPe2fQ.js → date-range-picker-CoCz3uDz.js} +28 -29
- package/components/{date-range-picker-CLfEEYkE.cjs → date-range-picker-DyJdcFiA.cjs} +3 -3
- package/components/date-time-picker/index.cjs +1 -1
- package/components/date-time-picker/index.js +1 -2
- package/components/{date-time-picker-DXTksnPd.cjs → date-time-picker-CEEeMXGn.cjs} +3 -3
- package/components/{date-time-picker-s3xujamC.js → date-time-picker-CsgO17tA.js} +23 -36
- package/components/{decorate-CkCg3wfh.js → decorate-CpKsOs9z.js} +18 -19
- package/components/{decorate-Dq34MBGe.cjs → decorate-SO02l0A6.cjs} +1 -1
- package/components/{dependency-manger-wHEXoU92.js → dependency-manger-BneVBZQi.js} +1 -2
- package/components/divider/index.cjs +1 -1
- package/components/divider/index.js +1 -2
- package/components/{divider-Cz5nyvP9.js → divider-Bt0NIqfu.js} +5 -7
- package/components/{divider-BcE8D-pH.cjs → divider-fWGUxO6A.cjs} +1 -1
- package/components/{divider.module-CPEKsaqR.js → divider.module-B_GRUJ4d.js} +1 -2
- package/components/{element-resolution-gap51AVo.js → element-resolution-BYvcpZwK.js} +1 -2
- package/components/field-group/index.cjs +1 -1
- package/components/field-group/index.js +2 -3
- package/components/{field-group-Dd5xYczm.cjs → field-group-B8mhEhNJ.cjs} +1 -1
- package/components/{field-group-C_kRq7pJ.js → field-group-CdDcdMO1.js} +3 -4
- package/components/field-label/index.cjs +1 -1
- package/components/field-label/index.js +1 -2
- package/components/{field-label-C0vfY1b6.cjs → field-label-B3IsGUTv.cjs} +2 -2
- package/components/{field-label-C28wWqC5.js → field-label-DOUnHwwh.js} +9 -15
- package/components/focus-group-C0ncbmUD.cjs +18 -0
- package/components/{focus-group-DVPa1zxz.js → focus-group-lQqPbdDl.js} +5 -7
- package/components/{focus-visible-DNHNlrty.cjs → focus-visible-BQAhwoxi.cjs} +1 -1
- package/components/{focus-visible-Bt2uDmuM.js → focus-visible-D6TRtUd7.js} +2 -3
- package/components/focusable-BIHTrJd6.cjs +18 -0
- package/components/{focusable-selectors-BWpiuXz5.js → focusable-selectors-BDNeWxbe.js} +1 -2
- package/components/{focusable-DuP0-Kuy.js → focusable-xjv79E40.js} +9 -17
- package/components/{get-label-from-slot-Bo9mqYCZ.js → get-label-from-slot-Bw5crGFw.js} +1 -2
- package/components/icon/index.cjs +1 -1
- package/components/icon/index.js +1 -2
- package/components/{icon-zOPAWCdx.cjs → icon-BlbMP3mJ.cjs} +1 -1
- package/components/{icon-CsJZMhIm.js → icon-DADJww_a.js} +4 -7
- package/components/index.cjs +1 -1
- package/components/index.js +71 -71
- package/components/infield-button/index.cjs +1 -1
- package/components/infield-button/index.js +1 -2
- package/components/{infield-button-DiE8R6ol.js → infield-button-CeE_JxR6.js} +5 -7
- package/components/{infield-button-kilVRjwB.cjs → infield-button-uD1GqTLW.cjs} +1 -1
- package/components/label/index.cjs +1 -1
- package/components/label/index.js +1 -2
- package/components/{label-e6Y13vrS.js → label-D1v4e6mN.js} +3 -5
- package/components/{label-B3zs6OX0.cjs → label-uuwIy_Ge.cjs} +1 -1
- package/components/{language-resolution-BaKYDD1a.js → language-resolution-7rc0khIK.js} +3 -4
- package/components/{language-resolution-CSjktYg5.cjs → language-resolution-B7D3hQ6_.cjs} +1 -1
- package/components/{like-anchor-DXCaEv7O.js → like-anchor-DcFv8rEo.js} +2 -3
- package/components/{like-anchor-BX4PSB3d.cjs → like-anchor-De9STeWr.cjs} +1 -1
- package/components/{manage-help-text-ByLb0QYX.js → manage-help-text-CFUaqINN.js} +4 -6
- package/components/{match-media-C5X2OZiD.js → match-media-UNh23w4s.js} +1 -2
- package/components/menu/index.cjs +1 -1
- package/components/menu/index.js +1 -2
- package/components/menu-BKwt6rnv.cjs +108 -0
- package/components/{menu-fdJseu1y.js → menu-L5qYivn6.js} +43 -67
- package/components/multi-language-field/index.cjs +1 -1
- package/components/multi-language-field/index.js +1 -2
- package/components/{multi-language-field-vJMK-osi.js → multi-language-field-NY2XwK2M.js} +6 -8
- package/components/{multi-language-field-BndVikur.cjs → multi-language-field-djoM4Okc.cjs} +1 -1
- package/components/notice/index.cjs +1 -1
- package/components/notice/index.js +1 -2
- package/components/{notice-CQI5kFRd.js → notice-CrLVNmqL.js} +6 -8
- package/components/{notice-CQFyo6OE.cjs → notice-f0p0TiGw.cjs} +1 -1
- package/components/number-field/index.cjs +1 -1
- package/components/number-field/index.js +1 -2
- package/components/{number-field-xxXgR70l.cjs → number-field-Ceeli_mh.cjs} +2 -2
- package/components/{number-field-DAOy_AvQ.js → number-field-D9UqpqpW.js} +12 -20
- package/components/{observe-slot-presence-BKY6n06-.js → observe-slot-presence-t2N_C6Ud.js} +1 -2
- package/components/{observe-slot-text-CvL-2ey3.cjs → observe-slot-text-BqwCIv2a.cjs} +1 -1
- package/components/{observe-slot-text-Db8Kx3P-.js → observe-slot-text-Dzkb_VqN.js} +2 -3
- package/components/options/index.cjs +1 -1
- package/components/options/index.js +1 -2
- package/components/{options-D_ifU0DH.js → options-BHDesKbF.js} +20 -31
- package/components/{options-CP9V2CSJ.cjs → options-Dk1uFeUT.cjs} +5 -5
- package/components/overlay/index.cjs +1 -1
- package/components/overlay/index.js +2 -2
- package/components/overlay-DAOyrYJL.cjs +102 -0
- package/components/{overlay-DpHIYJtd.js → overlay-D_Xfq92b.js} +62 -118
- package/components/{pending-state-CGHvTtKR.cjs → pending-state-A6NrvaQj.cjs} +1 -1
- package/components/{pending-state-D_b45qvi.js → pending-state-BuYmUP6G.js} +2 -3
- package/components/picker/index.cjs +1 -1
- package/components/picker/index.js +2 -3
- package/components/{picker-Czkf6auL.js → picker-C5eX5WBl.js} +24 -40
- package/components/{picker-C1tD-4ac.cjs → picker-CQCAt4Mx.cjs} +4 -4
- package/components/picker-button/index.cjs +1 -1
- package/components/picker-button/index.js +1 -2
- package/components/{picker-button-B8Jbf9jK.cjs → picker-button-BWDfzx38.cjs} +2 -2
- package/components/{picker-button-CJQJshbo.js → picker-button-BhfY9gyk.js} +11 -12
- package/components/{platform-Ce9pNsR9.js → platform-CDW-WdXN.js} +1 -2
- package/components/popover/index.cjs +1 -1
- package/components/popover/index.js +1 -2
- package/components/{popover-BsdqkvKI.cjs → popover-CFzz83f8.cjs} +1 -1
- package/components/{popover-DC8tkee-.js → popover-CWrRLzOL.js} +4 -6
- package/components/progress-bar/index.cjs +1 -1
- package/components/progress-bar/index.js +1 -2
- package/components/{progress-bar-CrodWzcc.cjs → progress-bar-9Qg0PYAq.cjs} +2 -2
- package/components/{progress-bar-D4iFHkp7.js → progress-bar-D6wIZV5l.js} +16 -22
- package/components/progress-circle/index.cjs +1 -1
- package/components/progress-circle/index.js +1 -2
- package/components/{progress-circle-bO_VAX3N.cjs → progress-circle-C_9UZs2Y.cjs} +1 -1
- package/components/{progress-circle-By6qUQYe.js → progress-circle-DcGKwBTC.js} +5 -7
- package/components/progress-steps/index.cjs +1 -1
- package/components/progress-steps/index.js +1 -2
- package/components/progress-steps/progress-steps-model.d.ts +5 -0
- package/components/progress-steps/progress-steps.d.ts +4 -3
- package/components/progress-steps-5MhpnGKv.cjs +98 -0
- package/components/{progress-steps-CXJEaaUg.js → progress-steps-Byem5ieS.js} +43 -51
- package/components/prompt-box/index.cjs +1 -1
- package/components/prompt-box/index.js +1 -2
- package/components/{prompt-box-CA8bsoZP.js → prompt-box-CrtFGmjm.js} +80 -112
- package/components/{prompt-box-DyODaKXV.cjs → prompt-box-D7owyhfG.cjs} +15 -15
- package/components/question-box/index.cjs +1 -1
- package/components/question-box/index.js +1 -2
- package/components/{question-box-DSwTpxAW.js → question-box-BJYYLghb.js} +40 -86
- package/components/{question-box-cBeVshAq.cjs → question-box-ym1eakXA.cjs} +3 -3
- package/components/radio/index.cjs +1 -1
- package/components/radio/index.js +1 -2
- package/components/{radio-B6hX9Klr.js → radio-CyxICbLM.js} +9 -15
- package/components/{radio-CRTfoEX_.cjs → radio-Dd-GgUMm.cjs} +2 -2
- package/components/{random-id-CiMDyX7v.js → random-id-CO3s9i3n.js} +1 -2
- package/components/{rolldown-runtime-Dy4uBu1J.js → rolldown-runtime-CGnMp29N.js} +1 -2
- package/components/{roving-tabindex-pomAn3z-.js → roving-tabindex-BKMkfzY0.js} +2 -3
- package/components/{roving-tabindex-BoPao4td.cjs → roving-tabindex-BUFR8hPH.cjs} +1 -1
- package/components/{scaled-indicator-C-TupV4L.js → scaled-indicator-CsfzvTDr.js} +1 -2
- package/components/search/index.cjs +1 -1
- package/components/search/index.js +1 -2
- package/components/{search-CFTOvmWA.js → search-C5uFmm6S.js} +7 -9
- package/components/{search-DJ6KwOam.cjs → search-DiCwSHFf.cjs} +1 -1
- package/components/segments-factory-BFgL5o9K.cjs +18 -0
- package/components/{segments-factory-BCRi1NKb.js → segments-factory-B_IBjpdp.js} +5 -12
- package/components/select/index.cjs +1 -1
- package/components/select/index.js +1 -2
- package/components/{select-CKMCEJf7.cjs → select-2Fvb7tpj.cjs} +6 -6
- package/components/{select-B86uAHme.js → select-HqF3tcHz.js} +31 -56
- package/components/{sized-mixin-DzQTebN-.js → sized-mixin-BmxIAuoH.js} +2 -3
- package/components/{sized-mixin-BT7cv-fT.cjs → sized-mixin-CSajkMro.cjs} +1 -1
- package/components/skeleton-loader/index.cjs +1 -1
- package/components/skeleton-loader/index.js +1 -2
- package/components/{skeleton-loader-CNcwCh4V.cjs → skeleton-loader-CEca0cqz.cjs} +1 -1
- package/components/{skeleton-loader-BeCsYADg.js → skeleton-loader-tin9y3xc.js} +3 -5
- package/components/slider/index.cjs +1 -1
- package/components/slider/index.js +1 -2
- package/components/{slider-C_8pSK4N.cjs → slider-C1AdDTfB.cjs} +2 -2
- package/components/{slider-Bsl8Xrme.js → slider-Ch7OgTdj.js} +13 -26
- package/components/{slottable-request-event-MRSZbgTu.js → slottable-request-event-24jJOhbh.js} +1 -2
- package/components/split-view/index.cjs +1 -1
- package/components/split-view/index.js +1 -2
- package/components/{split-view-CDwHDmII.js → split-view-DDwpoN2O.js} +8 -11
- package/components/{split-view-BwCFYey6.cjs → split-view-DNVlr5VD.cjs} +1 -1
- package/components/status-light/index.cjs +1 -1
- package/components/status-light/index.js +1 -2
- package/components/{status-light-COApWq-B.cjs → status-light-Do6z53mM.cjs} +1 -1
- package/components/{status-light-B1T3aGJs.js → status-light-DqHhhZed.js} +5 -7
- package/components/strategies-C6hzAW86.cjs +18 -0
- package/components/{strategies-COS7mShJ.js → strategies-DgPG-vNk.js} +6 -13
- package/components/{streaming-listener-CtcMpYfS.js → streaming-listener-B6mDl4pZ.js} +1 -2
- package/components/swatch/index.cjs +1 -1
- package/components/swatch/index.js +1 -2
- package/components/{swatch-Bj2FARl1.js → swatch-BBVsuSAV.js} +25 -44
- package/components/{swatch-CQ0inIHK.cjs → swatch-DiNMN-SZ.cjs} +3 -3
- package/components/switch/index.cjs +1 -1
- package/components/switch/index.js +1 -2
- package/components/{switch-CpG-hSWY.js → switch-BBtewLDD.js} +6 -8
- package/components/{switch-qwpYXVnO.cjs → switch-DMhCYTgq.cjs} +1 -1
- package/components/table/index.cjs +1 -1
- package/components/table/index.js +1 -2
- package/components/{table-Bcq2K21l.cjs → table-CLMLGloR.cjs} +11 -11
- package/components/{table-BckZkgeh.js → table-DlOWqm5C.js} +47 -103
- package/components/tabs/index.cjs +1 -1
- package/components/tabs/index.js +1 -2
- package/components/{tabs-CMU8X4ho.cjs → tabs-B0WHKMuF.cjs} +2 -2
- package/components/{tabs-D8U2PxcE.js → tabs-Dkt0B_-A.js} +17 -22
- package/components/tags/index.cjs +1 -1
- package/components/tags/index.js +1 -2
- package/components/{tags-ZzY_q4TH.js → tags-Be4yrNPw.js} +9 -11
- package/components/{tags-D8F1o4UZ.cjs → tags-CHDNXpxh.cjs} +1 -1
- package/components/{template-property-DNDi7lQv.js → template-property-Bks4Db5C.js} +1 -2
- package/components/text-field/index.cjs +1 -1
- package/components/text-field/index.js +2 -2
- package/components/{text-field-3fDtTQkR.cjs → text-field-BVl-HWzb.cjs} +1 -1
- package/components/{text-field-CmyqQxq0.js → text-field-D49lAD7L.js} +4 -5
- package/components/{text-field-CbN4nydd.cjs → text-field-DCcOZSvY.cjs} +1 -1
- package/components/{text-field-CmSym2QK.js → text-field-DpvP_tCP.js} +7 -10
- package/components/{text-field.module-BHhBReKL.js → text-field.module-hEHhPVFf.js} +1 -2
- package/components/toast/index.cjs +1 -1
- package/components/toast/index.js +1 -2
- package/components/{toast-DRrGgznK.cjs → toast-B6yesIcI.cjs} +1 -1
- package/components/{toast-KwHx-agn.js → toast-CXZUVaYz.js} +5 -7
- package/components/tokens.js +1 -2
- package/components/tooltip/index.cjs +1 -1
- package/components/tooltip/index.js +1 -2
- package/components/{tooltip-DjOW52n2.cjs → tooltip-BE01O3Sg.cjs} +1 -1
- package/components/{tooltip-xTa9Q5JW.js → tooltip-g2jd5Wsv.js} +19 -24
- package/components/top-nav/index.cjs +1 -1
- package/components/top-nav/index.js +1 -2
- package/components/{top-nav-81IKEGjR.cjs → top-nav-B0E1K_zf.cjs} +1 -1
- package/components/{top-nav-CXjnpdFR.js → top-nav-DiUCsUpZ.js} +9 -11
- package/components/utils.cjs +1 -1
- package/components/utils.js +8 -8
- package/components/{voice-recorder-CTg3kRxx.js → voice-recorder-BXY_l_78.js} +1 -2
- package/custom-elements.json +1 -1
- package/package.json +1 -1
- package/standalone/accordion.js +6 -2
- package/standalone/action-bar.js +1 -1
- package/standalone/action-button.js +1 -1
- package/standalone/action-group.js +1 -1
- package/standalone/action-menu.js +1 -1
- package/standalone/avatar.js +1 -1
- package/standalone/badge.js +1 -1
- package/standalone/button-group.js +1 -1
- package/standalone/button.js +1 -1
- package/standalone/calendar.js +1 -1
- package/standalone/chat-message-group.js +1 -1
- package/standalone/chat-message.js +31 -31
- package/standalone/checkbox.js +1 -1
- package/standalone/chunks/NumberFormatter-COykocAS.js +2 -0
- package/standalone/chunks/NumberParser--1Rm0Yk7.js +2 -0
- package/standalone/chunks/{action-button-BJGE_BDu.js → action-button-0d4u0dWv.js} +1 -1
- package/standalone/chunks/{action-group-DTxf-0tP.js → action-group-DlClwXLO.js} +5 -1
- package/standalone/chunks/async-directive-ByLzVnWY.js +2 -0
- package/standalone/chunks/async-directive-DNgXlN7F.js +2 -0
- package/standalone/chunks/{badge-SNXdnyCZ.js → badge-DPFbBRCY.js} +1 -1
- package/standalone/chunks/{button-DTL9dD2r.js → button-Bgc3zdEa.js} +1 -1
- package/standalone/chunks/{button-DHan4NJY.js → button-BhSe7abg.js} +1 -1
- package/standalone/chunks/button-base-DLYrzCSm.js +9 -0
- package/standalone/chunks/calendar-BxARYymw.js +122 -0
- package/standalone/chunks/checkbox-Cl6YBcGA.js +9 -0
- package/standalone/chunks/{checkbox-mixin-BAQWmwps.js → checkbox-mixin-HnfmivU3.js} +1 -1
- package/standalone/chunks/class-map-E9JVium5.js +2 -0
- package/standalone/chunks/{clear-button-3zpCVxG5.js → clear-button-B4r_oxfc.js} +1 -1
- package/standalone/chunks/{close-button-C96dazyi.js → close-button-DVCeu3_f.js} +1 -1
- package/standalone/chunks/{color-area-Cj8oPsIF.js → color-area-BCI2oMGd.js} +3 -1
- package/standalone/chunks/color-controller-BlFueK6Y.js +2 -0
- package/standalone/chunks/{color-field-BFvUGE4L.js → color-field-BaVvupq0.js} +1 -1
- package/standalone/chunks/{color-handle-BHrAxEG2.js → color-handle-BLQiuRSS.js} +1 -1
- package/standalone/chunks/{color-loupe-C34cms5t.js → color-loupe-_dC69K1Z.js} +1 -1
- package/standalone/chunks/{color-menu-BIKuitbH.js → color-menu-BDZh85nX.js} +1 -1
- package/standalone/chunks/color-slider-Bipcekrc.js +49 -0
- package/standalone/chunks/{directive-helpers-Bu8icI7Y.js → directive-helpers-DM8VtBpR.js} +1 -1
- package/standalone/chunks/{divider-Bf9Drp2z.js → divider-vAjIOfo1.js} +1 -1
- package/standalone/chunks/{field-group-D8EjgC6F.js → field-group-C1oDgW9m.js} +1 -1
- package/standalone/chunks/{field-label-VWHDlW9_.js → field-label-Djcst_hn.js} +2 -2
- package/standalone/chunks/flow-CL5kBpdV.js +2 -0
- package/standalone/chunks/focus-group-xdTxdfaB.js +4 -0
- package/standalone/chunks/{icon-BypO7M7G.js → icon-6P1RsbD1.js} +1 -1
- package/standalone/chunks/{infield-button-D03MpU_s.js → infield-button-B8EkjwP9.js} +1 -1
- package/standalone/chunks/keyed-DYJaQjip.js +2 -0
- package/standalone/chunks/{language-resolution-BWHk9A73.js → language-resolution-BwIkGyuH.js} +1 -1
- package/standalone/chunks/lit-DWANyjiY.js +3 -0
- package/standalone/chunks/lucero-runtime-DMlHjBe_.js +18 -0
- package/standalone/chunks/{luzmo-icons-B-pCv-xg.js → luzmo-icons-vtQE0BSI.js} +1 -1
- package/standalone/chunks/{manage-help-text-Cl9OJ2xf.js → manage-help-text-DO3PkWgh.js} +1 -1
- package/standalone/chunks/menu-CefrRBIS.js +100 -0
- package/standalone/chunks/{number-field-B6BDXkL7.js → number-field-Dc4nBa6l.js} +2 -2
- package/standalone/chunks/observe-slot-presence-BxmG6A0m.js +2 -0
- package/standalone/chunks/options-rb_zaAJ6.js +89 -0
- package/standalone/chunks/overlay-CgQMEmrM.js +122 -0
- package/standalone/chunks/{pending-state-DxeRqe6Q.js → pending-state-DnTXKvtm.js} +1 -1
- package/standalone/chunks/{picker-jZI5AjVJ.js → picker-HoERLlkx.js} +4 -4
- package/standalone/chunks/{picker-button-BZWqDoNQ.js → picker-button-DbamPU-T.js} +2 -2
- package/standalone/chunks/platform-wNs7qaiE.js +10 -0
- package/standalone/chunks/{popover-BsB3dmQe.js → popover-Ca-FBqiU.js} +1 -1
- package/standalone/chunks/{progress-circle-CEx1b5Sv.js → progress-circle-CFtVq9Ou.js} +1 -1
- package/standalone/chunks/property-BsDbx7Z2.js +2 -0
- package/standalone/chunks/{radio-2vHhfmHw.js → radio-BJ3RhyUD.js} +2 -2
- package/standalone/chunks/random-id-0GBXy8EY.js +2 -0
- package/standalone/chunks/repeat-CtNle5_O.js +2 -0
- package/standalone/chunks/{roving-tabindex-CB4xC55P.js → roving-tabindex-CivopiNn.js} +1 -1
- package/standalone/chunks/scaled-indicator-Do5uhz24.js +10 -0
- package/standalone/chunks/segments-factory-B6oGyosS.js +2 -0
- package/standalone/chunks/{skeleton-loader-BxYcRRJr.js → skeleton-loader-CymPdQl3.js} +1 -1
- package/standalone/chunks/strategies-yujlVHBS.js +4 -0
- package/standalone/chunks/streaming-listener-DbMoHlSj.js +8 -0
- package/standalone/chunks/style-map-DmBaq1-c.js +2 -0
- package/standalone/chunks/{swatch-CGR_GWqO.js → swatch-DivHeYOK.js} +4 -4
- package/standalone/chunks/{template-property-Dn64faHO.js → template-property-CyrkVY0Q.js} +1 -1
- package/standalone/chunks/{text-field-4OKvLOXG.js → text-field-D5ncaa2n.js} +1 -1
- package/standalone/chunks/{text-field-C2oROxum.js → text-field-DXzpM1Qn.js} +1 -1
- package/standalone/chunks/{tooltip-DB6jRVyB.js → tooltip-B-j8PrNl.js} +13 -1
- package/standalone/chunks/{unsafe-html-BPQaWy0v.js → unsafe-html-BeDipvu3.js} +1 -1
- package/standalone/clear-button.js +1 -1
- package/standalone/close-button.js +1 -1
- package/standalone/color-area.js +1 -1
- package/standalone/color-field.js +1 -1
- package/standalone/color-handle.js +1 -1
- package/standalone/color-loupe.js +1 -1
- package/standalone/color-menu.js +1 -1
- package/standalone/color-palette-group.js +1 -1
- package/standalone/color-palette.js +1 -1
- package/standalone/color-picker.js +1 -1
- package/standalone/color-slider.js +1 -1
- package/standalone/date-range-picker.js +3 -3
- package/standalone/date-time-picker.js +3 -3
- package/standalone/divider.js +1 -1
- package/standalone/field-group.js +1 -1
- package/standalone/field-label.js +1 -1
- package/standalone/icon.js +1 -1
- package/standalone/infield-button.js +1 -1
- package/standalone/label.js +1 -1
- package/standalone/lit.js +1 -1
- package/standalone/manifest.json +65 -66
- package/standalone/menu.js +1 -1
- package/standalone/multi-language-field.js +1 -1
- package/standalone/notice.js +1 -1
- package/standalone/number-field.js +1 -1
- package/standalone/options.js +1 -1
- package/standalone/overlay.js +1 -1
- package/standalone/picker-button.js +1 -1
- package/standalone/picker.js +1 -1
- package/standalone/popover.js +1 -1
- package/standalone/progress-bar.js +2 -2
- package/standalone/progress-circle.js +1 -1
- package/standalone/progress-steps.js +10 -10
- package/standalone/prompt-box.js +17 -17
- package/standalone/question-box.js +3 -3
- package/standalone/radio.js +1 -1
- package/standalone/search.js +1 -1
- package/standalone/select.js +6 -6
- package/standalone/skeleton-loader.js +1 -1
- package/standalone/slider.js +2 -2
- package/standalone/split-view.js +1 -1
- package/standalone/status-light.js +1 -1
- package/standalone/swatch.js +1 -1
- package/standalone/switch.js +1 -1
- package/standalone/table.js +22 -22
- package/standalone/tabs.js +2 -2
- package/standalone/tags.js +1 -1
- package/standalone/text-field.js +1 -1
- package/standalone/toast.js +1 -1
- package/standalone/tooltip.js +1 -1
- package/standalone/top-nav.js +1 -1
- package/standalone/utils.js +1 -1
- package/components/chat-message-BDfomRm-.cjs +0 -148
- package/components/checkbox-JCvBro0K.cjs +0 -25
- package/components/color-controller-DbyPc33Y.cjs +0 -18
- package/components/focus-group-C8lOjbi9.cjs +0 -18
- package/components/focusable-B6h03pAe.cjs +0 -18
- package/components/menu-CrhA2iPZ.cjs +0 -108
- package/components/overlay-Dn7EbA_W.cjs +0 -102
- package/components/progress-steps-Dqh53oC1.cjs +0 -98
- package/components/segments-factory-DtPyN5sh.cjs +0 -18
- package/components/strategies-Bb7zEjrU.cjs +0 -18
- package/standalone/chunks/NumberFormatter-DMCfW685.js +0 -2
- package/standalone/chunks/NumberParser-r_jv94LA.js +0 -2
- package/standalone/chunks/async-directive-BA2_dM-5.js +0 -2
- package/standalone/chunks/async-directive-CPdA0BOw.js +0 -2
- package/standalone/chunks/button-base-C7jeeyLp.js +0 -9
- package/standalone/chunks/calendar-BOzu003d.js +0 -122
- package/standalone/chunks/checkbox-DQ4wPgG_.js +0 -9
- package/standalone/chunks/class-map-CxQ0PcQP.js +0 -2
- package/standalone/chunks/color-controller-fJNWRHVI.js +0 -2
- package/standalone/chunks/color-slider-CAqvxsgS.js +0 -41
- package/standalone/chunks/flow-aCcJ5kgi.js +0 -2
- package/standalone/chunks/focus-group-Cl6MLy-C.js +0 -2
- package/standalone/chunks/keyed-CNWmQd2J.js +0 -2
- package/standalone/chunks/lit-BN_lRQbJ.js +0 -3
- package/standalone/chunks/lucero-runtime-DGJ9-isg.js +0 -16
- package/standalone/chunks/menu-DSMoQt1w.js +0 -92
- package/standalone/chunks/observe-slot-presence-DWPtw22K.js +0 -2
- package/standalone/chunks/options-CkmITqgV.js +0 -89
- package/standalone/chunks/overlay-C4ir0iyC.js +0 -31
- package/standalone/chunks/overlay-C_XW8yry.js +0 -57
- package/standalone/chunks/platform-BfrBbd97.js +0 -2
- package/standalone/chunks/property-CLXrnTGx.js +0 -2
- package/standalone/chunks/random-id-CeLe5NEk.js +0 -2
- package/standalone/chunks/repeat-CZdNcszA.js +0 -2
- package/standalone/chunks/scaled-indicator-k-1JmS0b.js +0 -10
- package/standalone/chunks/segments-factory-Da9ojsLC.js +0 -2
- package/standalone/chunks/strategies-C-vW4MlK.js +0 -2
- package/standalone/chunks/streaming-listener-DFczLm8I.js +0 -2
- package/standalone/chunks/style-map-D4QeV3m0.js +0 -2
|
@@ -16,24 +16,24 @@
|
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
18
|
import "./tokens.js";
|
|
19
|
-
import { n as e, t } from "./decorate-
|
|
20
|
-
import { n } from "./sized-mixin-
|
|
21
|
-
import { t as r } from "./roving-tabindex-
|
|
22
|
-
import "./icon-
|
|
23
|
-
import { t as i } from "./language-resolution-
|
|
24
|
-
import "./action-button-
|
|
25
|
-
import "./badge-
|
|
26
|
-
import "./button-
|
|
27
|
-
import "./checkbox-
|
|
19
|
+
import { n as e, t } from "./decorate-CpKsOs9z.js";
|
|
20
|
+
import { n } from "./sized-mixin-BmxIAuoH.js";
|
|
21
|
+
import { t as r } from "./roving-tabindex-BKMkfzY0.js";
|
|
22
|
+
import "./icon-DADJww_a.js";
|
|
23
|
+
import { t as i } from "./language-resolution-7rc0khIK.js";
|
|
24
|
+
import "./action-button-BB3ZZFNN.js";
|
|
25
|
+
import "./badge-BSfzmBRf.js";
|
|
26
|
+
import "./button-CpaltgRZ.js";
|
|
27
|
+
import "./checkbox-CvRvgRzh.js";
|
|
28
28
|
import "./field-group/index.js";
|
|
29
|
-
import "./text-field-
|
|
30
|
-
import "./radio-
|
|
29
|
+
import "./text-field-D49lAD7L.js";
|
|
30
|
+
import "./radio-CyxICbLM.js";
|
|
31
31
|
import { html as a, nothing as o, unsafeCSS as s } from "lit";
|
|
32
32
|
import { property as c, query as l, state as u } from "lit/decorators.js";
|
|
33
33
|
import { luzmoAngleLeft as d, luzmoAngleRight as f, luzmoPencil as p } from "@luzmo/icons";
|
|
34
34
|
import { ifDefined as m } from "lit/directives/if-defined.js";
|
|
35
35
|
import { repeat as h } from "lit/directives/repeat.js";
|
|
36
|
-
|
|
36
|
+
// src/components/question-box/question-box.module.scss?inline
|
|
37
37
|
var g = ":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)}", _ = "__other__", v = {
|
|
38
38
|
continue: "Next",
|
|
39
39
|
back: "Back",
|
|
@@ -236,7 +236,7 @@ var g = ":host{font-family:var(--question-box-font-family);font-size:var(--quest
|
|
|
236
236
|
let t = e.oneOf ?? e.items?.anyOf;
|
|
237
237
|
if (Array.isArray(t)) {
|
|
238
238
|
let e = [], n = /* @__PURE__ */ new Set();
|
|
239
|
-
for (let r of t)
|
|
239
|
+
for (let r of t) z(r) && typeof r.const == "string" && r.const && !n.has(r.const) && (n.add(r.const), e.push({
|
|
240
240
|
value: r.const,
|
|
241
241
|
label: typeof r.title == "string" && r.title ? r.title : r.const
|
|
242
242
|
}));
|
|
@@ -294,8 +294,7 @@ var g = ":host{font-family:var(--question-box-font-family);font-size:var(--quest
|
|
|
294
294
|
}
|
|
295
295
|
return i;
|
|
296
296
|
};
|
|
297
|
-
|
|
298
|
-
//#region src/components/question-box/question-box-templates.ts
|
|
297
|
+
// src/components/question-box/question-box-templates.ts
|
|
299
298
|
function G(e) {
|
|
300
299
|
switch (e) {
|
|
301
300
|
case "s": return "xs";
|
|
@@ -325,16 +324,16 @@ function ue(e, t) {
|
|
|
325
324
|
}), e.language);
|
|
326
325
|
}
|
|
327
326
|
function de(e, t) {
|
|
328
|
-
let n = ue(e, t);
|
|
329
|
-
return a`<span class="summary-value">${
|
|
327
|
+
let n = ue(e, t), r = e.copy.answer.split("{answer}").map((e, t) => a`${t > 0 ? a`<span class="summary-answer">${n}</span>` : o}${e}`);
|
|
328
|
+
return a`<span class="summary-value">${r}</span>`;
|
|
330
329
|
}
|
|
331
330
|
function fe(e) {
|
|
332
|
-
let t = e.copy;
|
|
331
|
+
let t = e.copy, n = e.questions.reduce((t, n) => t + e.selectedValues(n).length, 0);
|
|
333
332
|
return a`
|
|
334
333
|
<div class="card resolved">
|
|
335
334
|
<div class="summary">
|
|
336
335
|
<h2 class="summary-heading" id="resolved-title" tabindex="-1">
|
|
337
|
-
${
|
|
336
|
+
${n === 1 ? t.answerTitle : t.answersTitle}
|
|
338
337
|
</h2>
|
|
339
338
|
${h(e.questions, (e) => e.id, (t) => a`
|
|
340
339
|
<div class="summary-row">
|
|
@@ -781,8 +780,7 @@ function be(e) {
|
|
|
781
780
|
</div>
|
|
782
781
|
`;
|
|
783
782
|
}
|
|
784
|
-
|
|
785
|
-
//#region src/components/question-box/question-box.ts
|
|
783
|
+
// src/components/question-box/question-box.ts
|
|
786
784
|
var $ = class extends n(e, { validSizes: [
|
|
787
785
|
"s",
|
|
788
786
|
"m",
|
|
@@ -822,13 +820,11 @@ var $ = class extends n(e, { validSizes: [
|
|
|
822
820
|
return;
|
|
823
821
|
}
|
|
824
822
|
o.click();
|
|
825
|
-
|
|
826
|
-
}
|
|
827
|
-
e.key === "Escape" && (e.preventDefault(), !this.disabled && this.cancel());
|
|
823
|
+
} else e.key === "Escape" && (e.preventDefault(), !this.disabled && this.cancel());
|
|
828
824
|
}, this.handleKeyup = (e) => {
|
|
829
825
|
if (this.disabled || this.readonly || e.code !== "Space") return;
|
|
830
826
|
let t = this.focusedOptionForEvent(e);
|
|
831
|
-
|
|
827
|
+
t && !t.hasAttribute("disabled") && (e.preventDefault(), t.click());
|
|
832
828
|
}, this.handleFocusIn = (e) => {
|
|
833
829
|
let t = this.focusedOptionForEvent(e);
|
|
834
830
|
this.markKeyboardFocus(t && this.optionShowsKeyboardFocus(t) ? t : void 0);
|
|
@@ -837,7 +833,7 @@ var $ = class extends n(e, { validSizes: [
|
|
|
837
833
|
}, this.handleFocusOut = () => {
|
|
838
834
|
requestAnimationFrame(() => {
|
|
839
835
|
let e = this.shadowRoot?.activeElement;
|
|
840
|
-
|
|
836
|
+
e instanceof HTMLElement && e.dataset.optionIndex !== void 0 || this.markKeyboardFocus();
|
|
841
837
|
});
|
|
842
838
|
}, this.handleCancelClick = (e) => {
|
|
843
839
|
e.preventDefault(), this.cancel();
|
|
@@ -847,17 +843,7 @@ var $ = class extends n(e, { validSizes: [
|
|
|
847
843
|
e.preventDefault(), !(this.disabled || this._step === 0) && (this._showError = !1, --this._step, this.updateComplete.then(() => this.moveFocus(this.questionTitle)));
|
|
848
844
|
}, this.handlePrimary = () => {
|
|
849
845
|
let e = this.currentQuestion;
|
|
850
|
-
|
|
851
|
-
if (this.questionInvalid(e)) {
|
|
852
|
-
this._showError = !0, this.focusOptions();
|
|
853
|
-
return;
|
|
854
|
-
}
|
|
855
|
-
if (this._showError = !1, this._step < this.questions.length - 1) {
|
|
856
|
-
this._step += 1, this.updateComplete.then(() => this.moveFocus(this.questionTitle));
|
|
857
|
-
return;
|
|
858
|
-
}
|
|
859
|
-
this.acceptFlow();
|
|
860
|
-
}
|
|
846
|
+
!e || this.disabled || this.readonly || (this.questionInvalid(e) ? (this._showError = !0, this.focusOptions()) : (this._showError = !1, this._step < this.questions.length - 1 ? (this._step += 1, this.updateComplete.then(() => this.moveFocus(this.questionTitle))) : this.acceptFlow()));
|
|
861
847
|
}, this.handleChange = () => {
|
|
862
848
|
this._resolved = !1, this._submitted = !1, this._showError = !1, this.updateComplete.then(() => this.focusOptions());
|
|
863
849
|
}, this.handleRadioChange = (e) => {
|
|
@@ -865,15 +851,9 @@ var $ = class extends n(e, { validSizes: [
|
|
|
865
851
|
let t = this.currentQuestion;
|
|
866
852
|
if (!t) return;
|
|
867
853
|
let n = e.target.value || e.currentTarget.selected;
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
return;
|
|
872
|
-
}
|
|
873
|
-
this.commitAnswer(t.id, n, !0), n !== "__other__" && (this._radioChangeAdvanced = !0, this.advanceAfterSingleSelection(), queueMicrotask(() => {
|
|
874
|
-
this._radioChangeAdvanced = !1;
|
|
875
|
-
}));
|
|
876
|
-
}
|
|
854
|
+
n && (n === "__other__" && !String(this.value[y(t.id)] ?? "").trim() ? (this.requestUpdate(), this.updateComplete.then(() => this.moveFocus(this.otherField))) : (this.commitAnswer(t.id, n, !0), n !== "__other__" && (this._radioChangeAdvanced = !0, this.advanceAfterSingleSelection(), queueMicrotask(() => {
|
|
855
|
+
this._radioChangeAdvanced = !1;
|
|
856
|
+
}))));
|
|
877
857
|
}, this.handleRadioClick = (e) => {
|
|
878
858
|
if (this._radioChangeAdvanced || this.disabled || this.readonly) return;
|
|
879
859
|
let t = this.currentQuestion, n = e.currentTarget;
|
|
@@ -926,21 +906,13 @@ var $ = class extends n(e, { validSizes: [
|
|
|
926
906
|
super.connectedCallback(), this.addEventListener("keydown", this.handleKeydown), this.addEventListener("keyup", this.handleKeyup), this.addEventListener("focusin", this.handleFocusIn);
|
|
927
907
|
}
|
|
928
908
|
attributeChangedCallback(e, t, n) {
|
|
929
|
-
|
|
930
|
-
this.setAttribute("option-indicator", "numbers");
|
|
931
|
-
return;
|
|
932
|
-
}
|
|
933
|
-
super.attributeChangedCallback(e, t, n);
|
|
909
|
+
e === "option-indicator" && n !== null && n !== "numbers" && n !== "letters" ? this.setAttribute("option-indicator", "numbers") : super.attributeChangedCallback(e, t, n);
|
|
934
910
|
}
|
|
935
911
|
disconnectedCallback() {
|
|
936
912
|
this.removeEventListener("keydown", this.handleKeydown), this.removeEventListener("keyup", this.handleKeyup), this.removeEventListener("focusin", this.handleFocusIn), super.disconnectedCallback();
|
|
937
913
|
}
|
|
938
914
|
focus() {
|
|
939
|
-
|
|
940
|
-
this.moveFocus(this.resolvedTitle);
|
|
941
|
-
return;
|
|
942
|
-
}
|
|
943
|
-
this.focusOptions();
|
|
915
|
+
this._resolved ? this.moveFocus(this.resolvedTitle) : this.focusOptions();
|
|
944
916
|
}
|
|
945
917
|
checkValidity() {
|
|
946
918
|
return this.questions.every((e) => !this.questionInvalid(e));
|
|
@@ -1063,19 +1035,11 @@ var $ = class extends n(e, { validSizes: [
|
|
|
1063
1035
|
this.moveFocus(r ?? i ?? e);
|
|
1064
1036
|
}
|
|
1065
1037
|
advanceAfterSingleSelection() {
|
|
1066
|
-
|
|
1067
|
-
this._step += 1, this.updateComplete.then(() => this.moveFocus(this.questionTitle));
|
|
1068
|
-
return;
|
|
1069
|
-
}
|
|
1070
|
-
this._resolved = !0, this._submitted = !1, this.updateComplete.then(() => this.focus());
|
|
1038
|
+
this._step < this.questions.length - 1 ? (this._step += 1, this.updateComplete.then(() => this.moveFocus(this.questionTitle))) : (this._resolved = !0, this._submitted = !1, this.updateComplete.then(() => this.focus()));
|
|
1071
1039
|
}
|
|
1072
1040
|
acceptFlow() {
|
|
1073
1041
|
let e = this.questions.findIndex((e) => this.questionInvalid(e));
|
|
1074
|
-
|
|
1075
|
-
this._step = e, this._showError = !0, this.updateComplete.then(() => this.focusOptions());
|
|
1076
|
-
return;
|
|
1077
|
-
}
|
|
1078
|
-
this._showError = !1, this._resolved = !0, this._submitted = !0, this.emitResult("accept", R(this.questions, this.value)), this.updateComplete.then(() => this.focus());
|
|
1042
|
+
e === -1 ? (this._showError = !1, this._resolved = !0, this._submitted = !0, this.emitResult("accept", R(this.questions, this.value)), this.updateComplete.then(() => this.focus())) : (this._step = e, this._showError = !0, this.updateComplete.then(() => this.focusOptions()));
|
|
1079
1043
|
}
|
|
1080
1044
|
commitAnswer(e, t, n) {
|
|
1081
1045
|
let r = S(this.value);
|
|
@@ -1106,23 +1070,15 @@ var $ = class extends n(e, { validSizes: [
|
|
|
1106
1070
|
action: e,
|
|
1107
1071
|
content: t
|
|
1108
1072
|
} : { action: e };
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
this.dispatchEvent(new CustomEvent("luzmo-decline", {
|
|
1119
|
-
detail: n,
|
|
1120
|
-
bubbles: !0,
|
|
1121
|
-
composed: !0
|
|
1122
|
-
}));
|
|
1123
|
-
return;
|
|
1124
|
-
}
|
|
1125
|
-
this.dispatchEvent(new CustomEvent("luzmo-cancel", {
|
|
1073
|
+
e === "accept" ? this.dispatchEvent(new CustomEvent("luzmo-submit", {
|
|
1074
|
+
detail: n,
|
|
1075
|
+
bubbles: !0,
|
|
1076
|
+
composed: !0
|
|
1077
|
+
})) : e === "decline" ? this.dispatchEvent(new CustomEvent("luzmo-decline", {
|
|
1078
|
+
detail: n,
|
|
1079
|
+
bubbles: !0,
|
|
1080
|
+
composed: !0
|
|
1081
|
+
})) : this.dispatchEvent(new CustomEvent("luzmo-cancel", {
|
|
1126
1082
|
detail: n,
|
|
1127
1083
|
bubbles: !0,
|
|
1128
1084
|
composed: !0
|
|
@@ -1144,8 +1100,7 @@ var $ = class extends n(e, { validSizes: [
|
|
|
1144
1100
|
return re(e, t, n, this.value, this.disabled);
|
|
1145
1101
|
}
|
|
1146
1102
|
};
|
|
1147
|
-
|
|
1148
|
-
//#region src/components/question-box/index.ts
|
|
1103
|
+
// src/components/question-box/index.ts
|
|
1149
1104
|
t([c({ attribute: !1 })], $.prototype, "questions", void 0), t([c({ attribute: !1 })], $.prototype, "value", void 0), t([c({ attribute: !1 })], $.prototype, "labels", void 0), t([c({ reflect: !0 })], $.prototype, "dir", void 0), t([c({
|
|
1150
1105
|
type: Boolean,
|
|
1151
1106
|
reflect: !0
|
|
@@ -1168,5 +1123,4 @@ t([c({ attribute: !1 })], $.prototype, "questions", void 0), t([c({ attribute: !
|
|
|
1168
1123
|
reflect: !0,
|
|
1169
1124
|
attribute: "option-indicator"
|
|
1170
1125
|
})], $.prototype, "optionIndicator", null), t([u()], $.prototype, "_step", void 0), t([u()], $.prototype, "_resolved", void 0), t([u()], $.prototype, "_submitted", void 0), t([u()], $.prototype, "_showError", void 0), t([l("#question-title")], $.prototype, "questionTitle", void 0), t([l("#other-field")], $.prototype, "otherField", void 0), t([l("#options")], $.prototype, "optionsGroup", void 0), t([l("#resolved-title")], $.prototype, "resolvedTitle", void 0), typeof customElements < "u" && !customElements.get("luzmo-question-box") && customElements.define("luzmo-question-box", $);
|
|
1171
|
-
//#endregion
|
|
1172
1126
|
export { v as a, R as i, I as n, _ as o, le as r, y as s, $ as t };
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
require("./tokens.cjs");const e=require("./decorate-Dq34MBGe.cjs"),t=require("./sized-mixin-BT7cv-fT.cjs"),n=require("./roving-tabindex-BoPao4td.cjs");require("./icon-zOPAWCdx.cjs");const r=require("./language-resolution-CSjktYg5.cjs");require("./action-button-B4_uvHiN.cjs"),require("./badge-CNeUkS4b.cjs"),require("./button-B1V_2tHk.cjs"),require("./checkbox-JCvBro0K.cjs"),require("./field-group/index.cjs"),require("./text-field-CbN4nydd.cjs"),require("./radio-CRTfoEX_.cjs");let i=require("lit"),a=require("lit/decorators.js"),o=require("@luzmo/icons"),s=require("lit/directives/if-defined.js"),c=require("lit/directives/repeat.js");var l=`:host{font-family:var(--question-box-font-family);font-size:var(--question-box-font-size);color:var(--highcontrast-question-box-color,var(--question-box-color));box-sizing:border-box;inline-size:100%;max-inline-size:var(--luzmo-question-box-max-inline-size,var(--question-box-max-inline-size));display:block}:host([disabled]){pointer-events:none}.card{gap:var(--question-box-gap);padding:var(--question-box-padding);box-sizing:border-box;border-width:var(--question-box-border-width);border-style:solid;border-color:var(--highcontrast-question-box-border-color,var(--question-box-border-color));border-radius:var(--question-box-border-radius);background-color:var(--highcontrast-question-box-background-color,var(--question-box-background-color));flex-direction:column;display:flex}.header{justify-content:space-between;align-items:flex-start;gap:var(--question-box-header-gap);display:flex}.header-actions,.step-navigation{align-items:center;display:flex}.header-actions{gap:var(--question-box-header-actions-gap);min-block-size:0;block-size:max(var(--question-box-title-font-size) * var(--question-box-title-line-height), var(--question-box-header-control-size) - 2 * (var(--question-box-padding) - var(--question-box-header-actions-inset)));flex-shrink:0;margin-inline-start:auto;overflow:visible}.step-navigation{gap:var(--question-box-copy-gap)}.heading{gap:var(--question-box-heading-copy-gap);flex-direction:column;min-inline-size:0;display:flex}.progress{font-size:var(--question-box-progress-font-size);color:var(--question-box-muted-color);margin:0}.title{font-size:var(--question-box-title-font-size);font-weight:var(--luzmo-font-weight-bold);line-height:var(--question-box-title-line-height);margin:0}.title:focus,.summary-heading:focus{outline:none}.title:focus-visible,.summary-heading:focus-visible{-webkit-text-decoration-color:var(--question-box-focus-ring-color);text-decoration-color:var(--question-box-focus-ring-color);text-decoration-line:underline;text-decoration-thickness:var(--question-box-focus-ring-width);text-underline-offset:var(--question-box-focus-ring-gap);outline:none}.description{color:var(--question-box-muted-color);font-size:inherit;margin:0;margin-block-start:var(--question-box-heading-copy-offset);line-height:1.4}.close{flex-shrink:0}.body{gap:var(--question-box-option-gap);max-block-size:var(--luzmo-question-box-body-max-block-size,var(--question-box-body-max-block-size));padding-block:var(--question-box-body-focus-inset);margin-block:calc(var(--question-box-body-focus-inset) * -1);flex-direction:column;display:flex;overflow:hidden auto}.body::-webkit-scrollbar{width:var(--luzmo-question-box-scrollbar-width,var(--question-box-scrollbar-width));height:var(--luzmo-question-box-scrollbar-width,var(--question-box-scrollbar-width))}.body::-webkit-scrollbar-track{background:var(--luzmo-question-box-scrollbar-track-background,var(--question-box-scrollbar-track-background));border-radius:var(--luzmo-question-box-scrollbar-track-border-radius,var(--question-box-scrollbar-track-border-radius))}.body::-webkit-scrollbar-thumb{background:var(--luzmo-question-box-scrollbar-thumb-background,var(--question-box-scrollbar-thumb-background));border-radius:var(--luzmo-question-box-scrollbar-thumb-border-radius,var(--question-box-scrollbar-thumb-border-radius))}.body::-webkit-scrollbar-thumb:hover{background:var(--luzmo-question-box-scrollbar-thumb-hover-background,var(--question-box-scrollbar-thumb-hover-background))}.body{scrollbar-width:var(--luzmo-scrollbar-width,thin);scrollbar-color:var(--luzmo-question-box-scrollbar-thumb-background,var(--question-box-scrollbar-thumb-background)) var(--luzmo-question-box-scrollbar-track-background,var(--question-box-scrollbar-track-background))}.options{box-sizing:border-box;flex-direction:column;inline-size:100%;min-inline-size:0;display:flex}.options--descriptive luzmo-radio,.options--descriptive luzmo-checkbox,.options--descriptive .other-option-answer{padding-block:var(--luzmo-question-box-descriptive-option-padding-block,var(--question-box-descriptive-option-padding-block))}.body:has(.options--descriptive){margin-block:calc(var(--question-box-option-padding-block) - var(--question-box-body-focus-inset) - var(--luzmo-question-box-descriptive-option-padding-block,var(--question-box-descriptive-option-padding-block)))}luzmo-radio,luzmo-checkbox{box-sizing:border-box;inline-size:100%;min-block-size:var(--question-box-option-min-block-size);padding-block:var(--question-box-option-padding-block);padding-inline:var(--question-box-option-padding-inline);border-block-end-width:var(--luzmo-question-box-divider-width,var(--question-box-divider-width));border-block-end-style:solid;border-block-end-color:var(--luzmo-question-box-divider-color,var(--question-box-divider-color));border-radius:var(--luzmo-border-radius-s);align-items:center;display:flex}luzmo-radio:hover,luzmo-checkbox:hover{background-color:var(--question-box-option-hover-background)}.other-option-row{align-items:center;gap:var(--question-box-option-gap);box-sizing:border-box;border-block-end-width:var(--luzmo-question-box-divider-width,var(--question-box-divider-width));border-block-end-style:solid;border-block-end-color:var(--luzmo-question-box-divider-color,var(--question-box-divider-color));inline-size:100%;max-inline-size:100%;display:flex}.other-option-answer{align-items:center;gap:var(--question-box-option-gap);box-sizing:border-box;min-inline-size:0;min-block-size:var(--question-box-option-min-block-size);padding-block:var(--question-box-option-padding-block);padding-inline:var(--question-box-option-padding-inline);border-radius:var(--luzmo-border-radius-s);flex:1;display:flex}.other-option-answer:hover{background-color:var(--question-box-option-hover-background)}luzmo-radio.other-option,luzmo-checkbox.other-option{border:0;flex:none;min-block-size:auto;inline-size:auto;padding:0}luzmo-radio.other-option{--luzmo-radio-button-top-to-control:0px}luzmo-radio.numbered-option{--luzmo-radio-button-control-size:0px;--luzmo-radio-button-top-to-control:0px;--luzmo-radio-text-to-control:0px;--luzmo-radio-border-width:0px;--luzmo-radio-focus-indicator-width:0px}luzmo-checkbox.numbered-option{--luzmo-checkbox-control-size:0px;--luzmo-checkbox-text-to-control:0px;--luzmo-checkbox-top-to-text:0px;--luzmo-checkbox-border-width:0px;--luzmo-checkbox-selected-border-width:0px;--luzmo-checkbox-focus-indicator-width:0px}luzmo-radio.numbered-option::part(control),luzmo-checkbox.numbered-option::part(control){display:none}luzmo-radio.other-option:hover,luzmo-checkbox.other-option:hover{background-color:#0000}.other-field{inline-size:auto;min-inline-size:0;max-inline-size:100%;min-block-size:var(--question-box-other-field-min-block-size);font-size:var(--question-box-other-field-font-size);--luzmo-text-field-width:100%;--luzmo-text-field-height:var(--question-box-other-field-min-block-size);--luzmo-text-field-background-color:transparent;--luzmo-text-field-background-color-disabled:transparent;--luzmo-text-field-placeholder-font-size:var(--question-box-other-field-font-size);--luzmo-text-field-border-width:0px;--luzmo-text-field-spacing-inline:0px;--luzmo-text-field-spacing-block-start:0px;--luzmo-text-field-spacing-block-end:0px;flex:1;justify-content:center}.other-primary{flex:none}.other-actions{box-sizing:border-box;justify-content:flex-end;align-items:center;gap:var(--question-box-copy-gap-detailed);inline-size:100%;padding-inline:var(--question-box-option-padding-inline);margin-block-start:var(--question-box-copy-gap-detailed);display:flex}.selected-count{font-size:var(--luzmo-question-box-selected-count-font-size,var(--question-box-selected-count-font-size))}.other-actions .selected-count{min-inline-size:0;margin-inline-end:auto}.other-actions luzmo-button{flex:none}.status-error{--luzmo-helptext-font-size:var(--luzmo-question-box-selected-count-font-size,var(--question-box-selected-count-font-size));--luzmo-helptext-min-height:0;--luzmo-helptext-top-to-text:0;--luzmo-helptext-bottom-to-text:0}.visually-hidden{clip-path:inset(50%);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.option-content{align-items:flex-start;gap:var(--question-box-option-gap);inline-size:100%;display:flex}.option-number{forced-color-adjust:none;inline-size:var(--question-box-option-number-size);block-size:var(--question-box-option-number-size);box-sizing:border-box;border:var(--luzmo-border-width) solid var(--highcontrast-question-box-option-number-border-color,var(--question-box-option-number-border-color));border-radius:var(--luzmo-border-radius);color:var(--highcontrast-question-box-option-number-color,var(--question-box-option-number-color));background-color:var(--highcontrast-question-box-option-number-background,var(--question-box-option-number-background));transition:color var(--luzmo-animation-duration) ease-in-out, border-color var(--luzmo-animation-duration) ease-in-out, background-color var(--luzmo-animation-duration) ease-in-out;flex:none;justify-content:center;align-items:center;line-height:1;display:inline-flex}luzmo-radio[checked] .option-number,luzmo-checkbox[checked] .option-number{color:var(--highcontrast-question-box-option-number-selected-color,var(--question-box-option-number-selected-color));border-color:var(--highcontrast-question-box-option-number-selected-background,var(--question-box-option-number-selected-background));background-color:var(--highcontrast-question-box-option-number-selected-background,var(--question-box-option-number-selected-background))}luzmo-radio[data-focus-visible] .option-number,luzmo-checkbox[data-focus-visible] .option-number,.option-number--focused{outline:var(--luzmo-question-box-focus-ring-width,var(--question-box-focus-ring-width)) solid var(--highcontrast-question-box-focus-ring-color,var(--luzmo-question-box-focus-ring-color,var(--question-box-focus-ring-color)));outline-offset:var(--luzmo-question-box-focus-ring-gap,var(--question-box-focus-ring-gap))}luzmo-radio[disabled] .option-number,luzmo-checkbox[disabled] .option-number{opacity:.5}.option-copy{gap:var(--question-box-copy-gap);flex-direction:column;flex:1;min-inline-size:0;display:flex}.option-edit luzmo-icon{color:inherit}.option-heading{align-items:center;gap:var(--question-box-recommended-gap);min-block-size:var(--question-box-option-number-size);flex-wrap:wrap;display:flex}.option-text{align-items:baseline;gap:var(--question-box-recommended-gap);flex-wrap:wrap;min-inline-size:0;display:flex}.option-description{color:var(--question-box-muted-color);line-height:1.4}.option-hint{color:var(--question-box-muted-color);font-size:var(--luzmo-font-size-s)}.footer{justify-content:space-between;align-items:center;gap:var(--question-box-option-gap);flex-wrap:wrap;display:flex}.status{color:var(--question-box-muted-color);font-size:var(--luzmo-question-box-selected-count-font-size,var(--question-box-selected-count-font-size))}.actions{justify-content:flex-end;gap:var(--question-box-recommended-gap);flex-wrap:wrap;margin-inline-start:auto;display:flex}:host([dir=rtl]) .step-navigation luzmo-icon{transform:scaleX(-1)}.resolved{gap:var(--question-box-summary-gap)}.summary-actions{justify-content:flex-end;gap:var(--question-box-recommended-gap);flex-wrap:wrap;display:flex}.summary{gap:var(--question-box-option-gap);flex-direction:column;display:flex}.summary-heading{font-size:var(--question-box-title-font-size);line-height:var(--question-box-title-line-height);margin:0}.summary-row{gap:var(--question-box-copy-gap);flex-direction:column;display:flex}.summary-title{color:var(--question-box-muted-color);font-size:var(--luzmo-font-size-s)}.summary-answer{font-weight:var(--luzmo-font-weight-bold)}@media (prefers-reduced-motion:reduce){.option-number{transition-duration:0s}}@media (forced-colors:active){:host{--highcontrast-question-box-border-color:CanvasText;--highcontrast-question-box-background-color:Canvas;--highcontrast-question-box-color:CanvasText;--highcontrast-question-box-focus-ring-color:Highlight;--highcontrast-question-box-option-number-border-color:ButtonText;--highcontrast-question-box-option-number-color:ButtonText;--highcontrast-question-box-option-number-background:Canvas;--highcontrast-question-box-option-number-selected-background:Highlight;--highcontrast-question-box-option-number-selected-color:HighlightText}}:host{--question-box-font-family:var(--luzmo-font-family);--question-box-font-size:var(--luzmo-font-size-m);--question-box-color:var(--luzmo-font-color);--question-box-muted-color:color-mix(in srgb, var(--luzmo-font-color) 80%, var(--luzmo-background-color));--question-box-background-color:var(--luzmo-background-color);--question-box-border-color:var(--luzmo-border-color);--question-box-border-width:var(--luzmo-border-width);--question-box-border-radius:var(--luzmo-border-radius-l);--question-box-padding:var(--luzmo-spacing-5);--question-box-gap:var(--luzmo-spacing-4);--question-box-header-gap:var(--luzmo-spacing-3);--question-box-header-actions-gap:var(--luzmo-spacing-2);--question-box-header-actions-inset:var(--luzmo-spacing-2);--question-box-header-control-size:var(--luzmo-component-height);--question-box-max-inline-size:40rem;--question-box-body-max-block-size:24rem;--question-box-title-font-size:var(--question-box-font-size);--question-box-title-line-height:1.3;--question-box-progress-font-size:var(--luzmo-font-size-s);--question-box-selected-count-font-size:var(--luzmo-font-size-s);--question-box-option-min-block-size:var(--luzmo-component-height);--question-box-option-hover-background:var(--luzmo-background-color-hover);--question-box-option-number-size:var(--luzmo-component-height-xs);--question-box-descriptive-option-padding-block:var(--question-box-option-padding-block);--question-box-option-padding-block:var(--luzmo-spacing-1);--question-box-option-padding-inline:var(--luzmo-spacing-3);--question-box-option-gap:var(--luzmo-spacing-3);--question-box-heading-copy-gap:0px;--question-box-heading-copy-offset:calc(var(--question-box-font-size) * -.25);--question-box-copy-gap:var(--luzmo-spacing-1);--question-box-copy-gap-detailed:var(--luzmo-spacing-2);--question-box-recommended-gap:var(--luzmo-spacing-2);--question-box-summary-gap:var(--luzmo-spacing-4);--question-box-body-focus-inset:calc(var(--luzmo-indicator-gap) + var(--luzmo-indicator-width));--question-box-focus-ring-width:var(--luzmo-indicator-width);--question-box-focus-ring-gap:var(--luzmo-indicator-gap);--question-box-focus-ring-color:var(--luzmo-indicator-color);--question-box-divider-width:0px;--question-box-option-number-background:var(--luzmo-background-color);--question-box-option-number-border-color:var(--luzmo-border-color);--question-box-option-number-color:var(--luzmo-font-color);--question-box-option-number-selected-background:var(--luzmo-primary);--question-box-option-number-selected-color:var(--luzmo-primary-inverse-color);--question-box-other-field-min-block-size:var(--question-box-option-min-block-size);--question-box-other-field-font-size:var(--question-box-font-size);--question-box-divider-color:var(--luzmo-border-color);--question-box-scrollbar-width:var(--luzmo-scrollbar-size);--question-box-scrollbar-track-background:var(--luzmo-scrollbar-track-background);--question-box-scrollbar-track-border-radius:var(--luzmo-scrollbar-track-border-radius);--question-box-scrollbar-thumb-background:var(--luzmo-scrollbar-thumb-background);--question-box-scrollbar-thumb-border-radius:var(--luzmo-scrollbar-thumb-border-radius);--question-box-scrollbar-thumb-hover-background:var(--luzmo-scrollbar-thumb-hover-background)}:host([size=s]){--question-box-padding:var(--luzmo-spacing-4);--question-box-font-size:var(--luzmo-font-size-s);--question-box-selected-count-font-size:var(--luzmo-font-size-xs);--question-box-title-font-size:var(--question-box-font-size);--question-box-header-control-size:var(--luzmo-component-height-s);--question-box-option-min-block-size:var(--luzmo-component-height-s);--question-box-option-number-size:var(--luzmo-component-height-xs);--question-box-other-field-min-block-size:var(--question-box-option-min-block-size);--question-box-other-field-font-size:var(--question-box-font-size)}:host([size=l]){--question-box-font-size:var(--luzmo-font-size-l);--question-box-selected-count-font-size:var(--luzmo-font-size-m);--question-box-title-font-size:var(--question-box-font-size);--question-box-header-control-size:var(--luzmo-component-height-l);--question-box-option-min-block-size:var(--luzmo-component-height-l);--question-box-option-number-size:var(--luzmo-component-height-s);--question-box-other-field-min-block-size:var(--question-box-option-min-block-size);--question-box-other-field-font-size:var(--question-box-font-size)}:host([size=xl]){--question-box-font-size:var(--luzmo-font-size-xl);--question-box-selected-count-font-size:var(--luzmo-font-size-l);--question-box-title-font-size:var(--question-box-font-size);--question-box-header-control-size:var(--luzmo-component-height-xl);--question-box-option-min-block-size:var(--luzmo-component-height-xl);--question-box-option-number-size:var(--luzmo-component-height);--question-box-other-field-min-block-size:var(--question-box-option-min-block-size);--question-box-other-field-font-size:var(--question-box-font-size)}`,u=`__other__`,d={continue:`Next`,back:`Back`,submit:`Submit`,skip:`Skip`,change:`Change`,close:`Close`,other:`Something else`,otherPlaceholder:`Something else`,recommended:`Recommended`,answerTitle:`Answer`,answersTitle:`Answers`,progress:`{current} of {total}`,selectedCount:`{count} selected`,selectedCountOne:`{count} selected`,recommendedSuffix:`{label} ({recommended})`,answer:`{answer}`,requiredSelectionDescription:`Choose one or more options.`,selectionRangeDescription:`Choose between {min} and {max} options.`,minSelectedError:`Choose at least {min} options.`,maxSelectedError:`Choose at most {max} options.`,otherRequiredError:`Enter a value for this option.`},f=e=>`${e}Other`,p=e=>!!e.other||e.options.length===0,m=e=>typeof e.other==`object`&&e.other?e.other:{},h=e=>Object.fromEntries(Object.entries(e)),g=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},_=(e,t)=>{let n=new Set([...Object.keys(e),...Object.keys(t)]);for(let r of n){let n=e[r],i=t[r];if(Array.isArray(n)||Array.isArray(i)){if(!Array.isArray(n)||!Array.isArray(i)||n.length!==i.length||n.some((e,t)=>e!==i[t]))return!1}else if(n!==i)return!1}return!0},v=e=>{let t=new Set,n=[];for(let r of e)t.has(r)||(t.add(r),n.push(r));return n},y=e=>{let t=new Set(e.options.map(e=>e.value));return p(e)&&t.add(u),t},b=(e,t)=>{let n=t[e.id];return e.type===`single`?typeof n==`string`&&n?[n]:[]:Array.isArray(n)?v(n):[]},x=(e,t)=>b(e,t).includes(u),S=e=>{let t=Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0));return{...d,...t}},C=(e,t)=>{let n=e;for(let[e,r]of Object.entries(t))n=n.replaceAll(`{${e}}`,r);return n},w=e=>{let t=new Set;for(let n of e){if(!n.id)throw TypeError(`luzmo-question-box: every question needs an id.`);if(t.has(n.id))throw TypeError(`luzmo-question-box: duplicate question id "${n.id}".`);t.add(n.id);let r=f(n.id);if(e.some(e=>e.id===r))throw TypeError(`luzmo-question-box: question id "${r}" collides with Other text for "${n.id}".`);if(n.type!==`multiple`&&(n.minSelected!==void 0||n.maxSelected!==void 0))throw TypeError(`luzmo-question-box: minSelected and maxSelected only apply to multiple-choice question "${n.id}".`);for(let[e,t]of[[`minSelected`,n.minSelected],[`maxSelected`,n.maxSelected]])if(t!==void 0&&(!Number.isInteger(t)||t<0))throw TypeError(`luzmo-question-box: ${e} must be a non-negative integer on "${n.id}".`);let i=n.minSelected??+!!n.required;if(n.maxSelected!==void 0&&i>n.maxSelected)throw TypeError(`luzmo-question-box: minSelected cannot exceed maxSelected on "${n.id}".`);let a=n.options.filter(e=>!e.disabled).length+ +!!p(n);if(n.type===`multiple`&&i>a)throw TypeError(`luzmo-question-box: minSelected exceeds the available options on "${n.id}".`);let o=new Set;for(let e of n.options){if(!e.value)throw TypeError(`luzmo-question-box: option values cannot be empty on "${n.id}".`);if(e.value===`__other__`)throw TypeError(`luzmo-question-box: "${u}" is reserved on "${n.id}".`);if(o.has(e.value))throw TypeError(`luzmo-question-box: duplicate option value "${e.value}" on "${n.id}".`);o.add(e.value)}}},T=(e,t)=>{let n=Object.fromEntries([]);for(let r of e){let e=y(r),i=t[r.id],a=Object.hasOwn(t,r.id);if(r.type===`single`)typeof i==`string`&&e.has(i)?g(n,r.id,i):!a&&typeof r.default==`string`&&(e.has(r.default)||r.options.length===0)&&g(n,r.id,r.options.length===0?u:r.default);else{let t=[...r.options.map(e=>e.value),...p(r)?[u]:[]],o=v(Array.isArray(i)?i.filter(t=>e.has(t)):[]);if(o.length>0)g(n,r.id,t.filter(e=>o.includes(e)));else if(!a&&Array.isArray(r.default)){let i=v(r.default.filter(t=>e.has(t)));i.length>0&&g(n,r.id,t.filter(e=>i.includes(e)))}}let o=f(r.id),s=t[o];typeof s==`string`?g(n,o,s):!a&&r.options.length===0&&typeof r.default==`string`&&g(n,o,r.default)}return n},E=e=>e.minSelected??+!!e.required,D=(e,t)=>{let n=E(e),r=e.maxSelected;return n>0&&r!==void 0?C(t.selectionRangeDescription,{min:String(n),max:String(r)}):n===1?t.requiredSelectionDescription:n>1?C(t.minSelectedError,{min:String(n)}):r===void 0?void 0:C(t.maxSelectedError,{max:String(r)})},O=(e,t)=>{let n=b(e,t),r=E(e),i=e.maxSelected;if(n.length<r)return r<=1?`missing`:`minimum`;if(i!==void 0&&n.length>i)return`maximum`;if(x(e,t)&&!String(t[f(e.id)]??``).trim())return`otherText`},k=(e,t)=>O(e,t)!==void 0,A=(e,t,n)=>{switch(O(e,t)){case`minimum`:return C(n.minSelectedError,{min:String(E(e))});case`maximum`:return C(n.maxSelectedError,{max:String(e.maxSelected)});case`otherText`:return n.otherRequiredError;default:return}},j=(e,t,n,r,i)=>{if(i||t.disabled)return!0;if(e.type!==`multiple`||n)return!1;let a=e.maxSelected;return a!==void 0&&b(e,r).length>=a},M=(e,t)=>C(e===1?t.selectedCountOne:t.selectedCount,{count:String(e)}),N,ee=(e,t)=>{try{return N?.language!==t&&(N={language:t,formatter:new Intl.ListFormat(t,{style:`narrow`,type:`conjunction`})}),N.formatter.format(e)}catch{return e.join(`, `)}},te=(e,t)=>e.recommended?C(t.recommendedSuffix,{label:e.label,recommended:t.recommended}):e.label,ne=e=>{let t=e.options.map(e=>({const:e.value,title:e.label}));return p(e)&&e.options.length>0&&t.push({const:u,title:typeof e.other==`object`&&e.other.label||d.other}),t},re=e=>{let t={type:`string`};return typeof e.other==`object`&&e.other.label&&(t.title=e.other.label),t},ie=e=>{let t=[],n=[];for(let r of e){if(r.options.length===0){let e={type:`string`};r.title&&(e.title=r.title),r.description&&(e.description=r.description),typeof r.default==`string`&&(e.default=r.default),t.push([r.id,e]),r.required&&n.push(r.id);continue}let e=ne(r);if(r.type===`single`){let n={type:`string`,oneOf:e};r.title&&(n.title=r.title),r.description&&(n.description=r.description),typeof r.default==`string`&&r.options.some(e=>e.value===r.default)&&(n.default=r.default),t.push([r.id,n])}else{let n={type:`array`,items:{anyOf:e}};r.title&&(n.title=r.title),r.description&&(n.description=r.description);let i=r.minSelected??(r.required?1:void 0);if(i!==void 0&&(n.minItems=i),r.maxSelected!==void 0&&(n.maxItems=r.maxSelected),Array.isArray(r.default)){let t=new Set(e.map(e=>e.const)),i=r.default.filter(e=>t.has(e));i.length>0&&(n.default=i)}t.push([r.id,n])}r.required&&n.push(r.id),p(r)&&t.push([f(r.id),re(r)])}let r=Object.fromEntries(t);return n.length>0?{type:`object`,properties:r,required:n}:{type:`object`,properties:r}},ae=(e,t)=>String(t[f(e.id)]??``).trim(),P=(e,t)=>{let n=[];for(let r of e){let e=ae(r,t);if(r.options.length===0){e&&n.push([r.id,e]);continue}let i=b(r,t);r.type===`single`?i[0]&&n.push([r.id,i[0]]):i.length>0&&n.push([r.id,[...i]]),p(r)&&x(r,t)&&e&&n.push([f(r.id),e])}return Object.fromEntries(n)},F=e=>!!e&&typeof e==`object`&&!Array.isArray(e),I=e=>F(e)?e:{},L=e=>{let t=e.oneOf??e.items?.anyOf;if(Array.isArray(t)){let e=[],n=new Set;for(let r of t)!F(r)||typeof r.const!=`string`||!r.const||n.has(r.const)||(n.add(r.const),e.push({value:r.const,label:typeof r.title==`string`&&r.title?r.title:r.const}));return{declared:!0,options:e}}let n=e.enum??e.items?.enum;if(Array.isArray(n)){let t=e.enumNames??e.items?.enumNames,r=new Set,i=[];for(let[e,a]of n.entries()){if(typeof a!=`string`||!a||r.has(a))continue;r.add(a);let n=t?.[e];i.push({value:a,label:typeof n==`string`&&n?n:a})}return{declared:!0,options:i}}return{declared:!1,options:[]}},R=e=>f(e),z=e=>e.format!==void 0||e.minLength!==void 0||e.maxLength!==void 0||e.pattern!==void 0,B=e=>e.type===`string`&&!L(e).declared&&!z(e),V=e=>{if(e.type!==`object`||!e.properties)return[];let t=e.properties,n=new Set(e.required??[]),r=new Set;for(let e of Object.keys(t)){let n=R(e),i=L(I(t[e])),a=I(t[n]);n in t&&B(a)&&i.options.some(e=>e.value===`__other__`)&&r.add(n)}let i=[];for(let[e,a]of Object.entries(t)){if(r.has(e))continue;let o=I(a),s=L(o),c=s.options.some(e=>e.value===u),l=R(e);if(c&&!r.has(l))continue;let d=s.options.filter(e=>e.value!==u);if(o.type===`number`||o.type===`integer`||o.type===`boolean`||o.type!==`string`&&o.type!==`array`||s.declared&&s.options.length===0||o.type===`array`&&!s.declared||o.type===`string`&&!s.declared&&z(o))continue;let f={id:e,type:o.type===`array`?`multiple`:`single`,title:o.title||e,options:d};if(o.description&&(f.description=o.description),n.has(e)&&(f.required=!0),o.type===`array`?(o.minItems!==void 0&&(f.minSelected=o.minItems),o.maxItems!==void 0&&(f.maxSelected=o.maxItems),Array.isArray(o.default)&&o.default.length>0&&(f.default=o.default)):typeof o.default==`string`&&(f.default=o.default),c&&l in t){let e=I(t[l]);f.other=!e.title||{label:e.title}}i.push(f)}return i};function H(e){switch(e){case`s`:return`xs`;case`m`:return`s`;case`l`:return`m`;default:return`l`}}function U(e){switch(e){case`m`:return`xs`;case`l`:return`s`;case`xl`:case`xxl`:return`m`;default:return`xxs`}}function W(e){return e.step>=e.questions.length-1}function G(e,t){let n=e.selectedValues(t);return n.length===0?``:ee(n.map(n=>{if(n===`__other__`)return String(e.value[f(t.id)]??e.copy.other);let r=t.options.find(e=>e.value===n);return r?te(r,e.copy):n}),e.language)}function K(e,t){let n=G(e,t);return i.html`<span class="summary-value">${e.copy.answer.split(`{answer}`).map((e,t)=>i.html`${t>0?i.html`<span class="summary-answer">${n}</span>`:i.nothing}${e}`)}</span>`}function q(e){let t=e.copy;return i.html`
|
|
18
|
+
require("./tokens.cjs");const e=require("./decorate-SO02l0A6.cjs"),t=require("./sized-mixin-CSajkMro.cjs"),n=require("./roving-tabindex-BUFR8hPH.cjs");require("./icon-BlbMP3mJ.cjs");const r=require("./language-resolution-B7D3hQ6_.cjs");require("./action-button-CL4ZlryE.cjs"),require("./badge-DzElGOcl.cjs"),require("./button-BGEWdRbY.cjs"),require("./checkbox-CVi4GMoo.cjs"),require("./field-group/index.cjs"),require("./text-field-DCcOZSvY.cjs"),require("./radio-Dd-GgUMm.cjs");let i=require("lit"),a=require("lit/decorators.js"),o=require("@luzmo/icons"),s=require("lit/directives/if-defined.js"),c=require("lit/directives/repeat.js");var l=`:host{font-family:var(--question-box-font-family);font-size:var(--question-box-font-size);color:var(--highcontrast-question-box-color,var(--question-box-color));box-sizing:border-box;inline-size:100%;max-inline-size:var(--luzmo-question-box-max-inline-size,var(--question-box-max-inline-size));display:block}:host([disabled]){pointer-events:none}.card{gap:var(--question-box-gap);padding:var(--question-box-padding);box-sizing:border-box;border-width:var(--question-box-border-width);border-style:solid;border-color:var(--highcontrast-question-box-border-color,var(--question-box-border-color));border-radius:var(--question-box-border-radius);background-color:var(--highcontrast-question-box-background-color,var(--question-box-background-color));flex-direction:column;display:flex}.header{justify-content:space-between;align-items:flex-start;gap:var(--question-box-header-gap);display:flex}.header-actions,.step-navigation{align-items:center;display:flex}.header-actions{gap:var(--question-box-header-actions-gap);min-block-size:0;block-size:max(var(--question-box-title-font-size) * var(--question-box-title-line-height), var(--question-box-header-control-size) - 2 * (var(--question-box-padding) - var(--question-box-header-actions-inset)));flex-shrink:0;margin-inline-start:auto;overflow:visible}.step-navigation{gap:var(--question-box-copy-gap)}.heading{gap:var(--question-box-heading-copy-gap);flex-direction:column;min-inline-size:0;display:flex}.progress{font-size:var(--question-box-progress-font-size);color:var(--question-box-muted-color);margin:0}.title{font-size:var(--question-box-title-font-size);font-weight:var(--luzmo-font-weight-bold);line-height:var(--question-box-title-line-height);margin:0}.title:focus,.summary-heading:focus{outline:none}.title:focus-visible,.summary-heading:focus-visible{-webkit-text-decoration-color:var(--question-box-focus-ring-color);text-decoration-color:var(--question-box-focus-ring-color);text-decoration-line:underline;text-decoration-thickness:var(--question-box-focus-ring-width);text-underline-offset:var(--question-box-focus-ring-gap);outline:none}.description{color:var(--question-box-muted-color);font-size:inherit;margin:0;margin-block-start:var(--question-box-heading-copy-offset);line-height:1.4}.close{flex-shrink:0}.body{gap:var(--question-box-option-gap);max-block-size:var(--luzmo-question-box-body-max-block-size,var(--question-box-body-max-block-size));padding-block:var(--question-box-body-focus-inset);margin-block:calc(var(--question-box-body-focus-inset) * -1);flex-direction:column;display:flex;overflow:hidden auto}.body::-webkit-scrollbar{width:var(--luzmo-question-box-scrollbar-width,var(--question-box-scrollbar-width));height:var(--luzmo-question-box-scrollbar-width,var(--question-box-scrollbar-width))}.body::-webkit-scrollbar-track{background:var(--luzmo-question-box-scrollbar-track-background,var(--question-box-scrollbar-track-background));border-radius:var(--luzmo-question-box-scrollbar-track-border-radius,var(--question-box-scrollbar-track-border-radius))}.body::-webkit-scrollbar-thumb{background:var(--luzmo-question-box-scrollbar-thumb-background,var(--question-box-scrollbar-thumb-background));border-radius:var(--luzmo-question-box-scrollbar-thumb-border-radius,var(--question-box-scrollbar-thumb-border-radius))}.body::-webkit-scrollbar-thumb:hover{background:var(--luzmo-question-box-scrollbar-thumb-hover-background,var(--question-box-scrollbar-thumb-hover-background))}.body{scrollbar-width:var(--luzmo-scrollbar-width,thin);scrollbar-color:var(--luzmo-question-box-scrollbar-thumb-background,var(--question-box-scrollbar-thumb-background)) var(--luzmo-question-box-scrollbar-track-background,var(--question-box-scrollbar-track-background))}.options{box-sizing:border-box;flex-direction:column;inline-size:100%;min-inline-size:0;display:flex}.options--descriptive luzmo-radio,.options--descriptive luzmo-checkbox,.options--descriptive .other-option-answer{padding-block:var(--luzmo-question-box-descriptive-option-padding-block,var(--question-box-descriptive-option-padding-block))}.body:has(.options--descriptive){margin-block:calc(var(--question-box-option-padding-block) - var(--question-box-body-focus-inset) - var(--luzmo-question-box-descriptive-option-padding-block,var(--question-box-descriptive-option-padding-block)))}luzmo-radio,luzmo-checkbox{box-sizing:border-box;inline-size:100%;min-block-size:var(--question-box-option-min-block-size);padding-block:var(--question-box-option-padding-block);padding-inline:var(--question-box-option-padding-inline);border-block-end-width:var(--luzmo-question-box-divider-width,var(--question-box-divider-width));border-block-end-style:solid;border-block-end-color:var(--luzmo-question-box-divider-color,var(--question-box-divider-color));border-radius:var(--luzmo-border-radius-s);align-items:center;display:flex}luzmo-radio:hover,luzmo-checkbox:hover{background-color:var(--question-box-option-hover-background)}.other-option-row{align-items:center;gap:var(--question-box-option-gap);box-sizing:border-box;border-block-end-width:var(--luzmo-question-box-divider-width,var(--question-box-divider-width));border-block-end-style:solid;border-block-end-color:var(--luzmo-question-box-divider-color,var(--question-box-divider-color));inline-size:100%;max-inline-size:100%;display:flex}.other-option-answer{align-items:center;gap:var(--question-box-option-gap);box-sizing:border-box;min-inline-size:0;min-block-size:var(--question-box-option-min-block-size);padding-block:var(--question-box-option-padding-block);padding-inline:var(--question-box-option-padding-inline);border-radius:var(--luzmo-border-radius-s);flex:1;display:flex}.other-option-answer:hover{background-color:var(--question-box-option-hover-background)}luzmo-radio.other-option,luzmo-checkbox.other-option{border:0;flex:none;min-block-size:auto;inline-size:auto;padding:0}luzmo-radio.other-option{--luzmo-radio-button-top-to-control:0px}luzmo-radio.numbered-option{--luzmo-radio-button-control-size:0px;--luzmo-radio-button-top-to-control:0px;--luzmo-radio-text-to-control:0px;--luzmo-radio-border-width:0px;--luzmo-radio-focus-indicator-width:0px}luzmo-checkbox.numbered-option{--luzmo-checkbox-control-size:0px;--luzmo-checkbox-text-to-control:0px;--luzmo-checkbox-top-to-text:0px;--luzmo-checkbox-border-width:0px;--luzmo-checkbox-selected-border-width:0px;--luzmo-checkbox-focus-indicator-width:0px}luzmo-radio.numbered-option::part(control),luzmo-checkbox.numbered-option::part(control){display:none}luzmo-radio.other-option:hover,luzmo-checkbox.other-option:hover{background-color:#0000}.other-field{inline-size:auto;min-inline-size:0;max-inline-size:100%;min-block-size:var(--question-box-other-field-min-block-size);font-size:var(--question-box-other-field-font-size);--luzmo-text-field-width:100%;--luzmo-text-field-height:var(--question-box-other-field-min-block-size);--luzmo-text-field-background-color:transparent;--luzmo-text-field-background-color-disabled:transparent;--luzmo-text-field-placeholder-font-size:var(--question-box-other-field-font-size);--luzmo-text-field-border-width:0px;--luzmo-text-field-spacing-inline:0px;--luzmo-text-field-spacing-block-start:0px;--luzmo-text-field-spacing-block-end:0px;flex:1;justify-content:center}.other-primary{flex:none}.other-actions{box-sizing:border-box;justify-content:flex-end;align-items:center;gap:var(--question-box-copy-gap-detailed);inline-size:100%;padding-inline:var(--question-box-option-padding-inline);margin-block-start:var(--question-box-copy-gap-detailed);display:flex}.selected-count{font-size:var(--luzmo-question-box-selected-count-font-size,var(--question-box-selected-count-font-size))}.other-actions .selected-count{min-inline-size:0;margin-inline-end:auto}.other-actions luzmo-button{flex:none}.status-error{--luzmo-helptext-font-size:var(--luzmo-question-box-selected-count-font-size,var(--question-box-selected-count-font-size));--luzmo-helptext-min-height:0;--luzmo-helptext-top-to-text:0;--luzmo-helptext-bottom-to-text:0}.visually-hidden{clip-path:inset(50%);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.option-content{align-items:flex-start;gap:var(--question-box-option-gap);inline-size:100%;display:flex}.option-number{forced-color-adjust:none;inline-size:var(--question-box-option-number-size);block-size:var(--question-box-option-number-size);box-sizing:border-box;border:var(--luzmo-border-width) solid var(--highcontrast-question-box-option-number-border-color,var(--question-box-option-number-border-color));border-radius:var(--luzmo-border-radius);color:var(--highcontrast-question-box-option-number-color,var(--question-box-option-number-color));background-color:var(--highcontrast-question-box-option-number-background,var(--question-box-option-number-background));transition:color var(--luzmo-animation-duration) ease-in-out, border-color var(--luzmo-animation-duration) ease-in-out, background-color var(--luzmo-animation-duration) ease-in-out;flex:none;justify-content:center;align-items:center;line-height:1;display:inline-flex}luzmo-radio[checked] .option-number,luzmo-checkbox[checked] .option-number{color:var(--highcontrast-question-box-option-number-selected-color,var(--question-box-option-number-selected-color));border-color:var(--highcontrast-question-box-option-number-selected-background,var(--question-box-option-number-selected-background));background-color:var(--highcontrast-question-box-option-number-selected-background,var(--question-box-option-number-selected-background))}luzmo-radio[data-focus-visible] .option-number,luzmo-checkbox[data-focus-visible] .option-number,.option-number--focused{outline:var(--luzmo-question-box-focus-ring-width,var(--question-box-focus-ring-width)) solid var(--highcontrast-question-box-focus-ring-color,var(--luzmo-question-box-focus-ring-color,var(--question-box-focus-ring-color)));outline-offset:var(--luzmo-question-box-focus-ring-gap,var(--question-box-focus-ring-gap))}luzmo-radio[disabled] .option-number,luzmo-checkbox[disabled] .option-number{opacity:.5}.option-copy{gap:var(--question-box-copy-gap);flex-direction:column;flex:1;min-inline-size:0;display:flex}.option-edit luzmo-icon{color:inherit}.option-heading{align-items:center;gap:var(--question-box-recommended-gap);min-block-size:var(--question-box-option-number-size);flex-wrap:wrap;display:flex}.option-text{align-items:baseline;gap:var(--question-box-recommended-gap);flex-wrap:wrap;min-inline-size:0;display:flex}.option-description{color:var(--question-box-muted-color);line-height:1.4}.option-hint{color:var(--question-box-muted-color);font-size:var(--luzmo-font-size-s)}.footer{justify-content:space-between;align-items:center;gap:var(--question-box-option-gap);flex-wrap:wrap;display:flex}.status{color:var(--question-box-muted-color);font-size:var(--luzmo-question-box-selected-count-font-size,var(--question-box-selected-count-font-size))}.actions{justify-content:flex-end;gap:var(--question-box-recommended-gap);flex-wrap:wrap;margin-inline-start:auto;display:flex}:host([dir=rtl]) .step-navigation luzmo-icon{transform:scaleX(-1)}.resolved{gap:var(--question-box-summary-gap)}.summary-actions{justify-content:flex-end;gap:var(--question-box-recommended-gap);flex-wrap:wrap;display:flex}.summary{gap:var(--question-box-option-gap);flex-direction:column;display:flex}.summary-heading{font-size:var(--question-box-title-font-size);line-height:var(--question-box-title-line-height);margin:0}.summary-row{gap:var(--question-box-copy-gap);flex-direction:column;display:flex}.summary-title{color:var(--question-box-muted-color);font-size:var(--luzmo-font-size-s)}.summary-answer{font-weight:var(--luzmo-font-weight-bold)}@media (prefers-reduced-motion:reduce){.option-number{transition-duration:0s}}@media (forced-colors:active){:host{--highcontrast-question-box-border-color:CanvasText;--highcontrast-question-box-background-color:Canvas;--highcontrast-question-box-color:CanvasText;--highcontrast-question-box-focus-ring-color:Highlight;--highcontrast-question-box-option-number-border-color:ButtonText;--highcontrast-question-box-option-number-color:ButtonText;--highcontrast-question-box-option-number-background:Canvas;--highcontrast-question-box-option-number-selected-background:Highlight;--highcontrast-question-box-option-number-selected-color:HighlightText}}:host{--question-box-font-family:var(--luzmo-font-family);--question-box-font-size:var(--luzmo-font-size-m);--question-box-color:var(--luzmo-font-color);--question-box-muted-color:color-mix(in srgb, var(--luzmo-font-color) 80%, var(--luzmo-background-color));--question-box-background-color:var(--luzmo-background-color);--question-box-border-color:var(--luzmo-border-color);--question-box-border-width:var(--luzmo-border-width);--question-box-border-radius:var(--luzmo-border-radius-l);--question-box-padding:var(--luzmo-spacing-5);--question-box-gap:var(--luzmo-spacing-4);--question-box-header-gap:var(--luzmo-spacing-3);--question-box-header-actions-gap:var(--luzmo-spacing-2);--question-box-header-actions-inset:var(--luzmo-spacing-2);--question-box-header-control-size:var(--luzmo-component-height);--question-box-max-inline-size:40rem;--question-box-body-max-block-size:24rem;--question-box-title-font-size:var(--question-box-font-size);--question-box-title-line-height:1.3;--question-box-progress-font-size:var(--luzmo-font-size-s);--question-box-selected-count-font-size:var(--luzmo-font-size-s);--question-box-option-min-block-size:var(--luzmo-component-height);--question-box-option-hover-background:var(--luzmo-background-color-hover);--question-box-option-number-size:var(--luzmo-component-height-xs);--question-box-descriptive-option-padding-block:var(--question-box-option-padding-block);--question-box-option-padding-block:var(--luzmo-spacing-1);--question-box-option-padding-inline:var(--luzmo-spacing-3);--question-box-option-gap:var(--luzmo-spacing-3);--question-box-heading-copy-gap:0px;--question-box-heading-copy-offset:calc(var(--question-box-font-size) * -.25);--question-box-copy-gap:var(--luzmo-spacing-1);--question-box-copy-gap-detailed:var(--luzmo-spacing-2);--question-box-recommended-gap:var(--luzmo-spacing-2);--question-box-summary-gap:var(--luzmo-spacing-4);--question-box-body-focus-inset:calc(var(--luzmo-indicator-gap) + var(--luzmo-indicator-width));--question-box-focus-ring-width:var(--luzmo-indicator-width);--question-box-focus-ring-gap:var(--luzmo-indicator-gap);--question-box-focus-ring-color:var(--luzmo-indicator-color);--question-box-divider-width:0px;--question-box-option-number-background:var(--luzmo-background-color);--question-box-option-number-border-color:var(--luzmo-border-color);--question-box-option-number-color:var(--luzmo-font-color);--question-box-option-number-selected-background:var(--luzmo-primary);--question-box-option-number-selected-color:var(--luzmo-primary-inverse-color);--question-box-other-field-min-block-size:var(--question-box-option-min-block-size);--question-box-other-field-font-size:var(--question-box-font-size);--question-box-divider-color:var(--luzmo-border-color);--question-box-scrollbar-width:var(--luzmo-scrollbar-size);--question-box-scrollbar-track-background:var(--luzmo-scrollbar-track-background);--question-box-scrollbar-track-border-radius:var(--luzmo-scrollbar-track-border-radius);--question-box-scrollbar-thumb-background:var(--luzmo-scrollbar-thumb-background);--question-box-scrollbar-thumb-border-radius:var(--luzmo-scrollbar-thumb-border-radius);--question-box-scrollbar-thumb-hover-background:var(--luzmo-scrollbar-thumb-hover-background)}:host([size=s]){--question-box-padding:var(--luzmo-spacing-4);--question-box-font-size:var(--luzmo-font-size-s);--question-box-selected-count-font-size:var(--luzmo-font-size-xs);--question-box-title-font-size:var(--question-box-font-size);--question-box-header-control-size:var(--luzmo-component-height-s);--question-box-option-min-block-size:var(--luzmo-component-height-s);--question-box-option-number-size:var(--luzmo-component-height-xs);--question-box-other-field-min-block-size:var(--question-box-option-min-block-size);--question-box-other-field-font-size:var(--question-box-font-size)}:host([size=l]){--question-box-font-size:var(--luzmo-font-size-l);--question-box-selected-count-font-size:var(--luzmo-font-size-m);--question-box-title-font-size:var(--question-box-font-size);--question-box-header-control-size:var(--luzmo-component-height-l);--question-box-option-min-block-size:var(--luzmo-component-height-l);--question-box-option-number-size:var(--luzmo-component-height-s);--question-box-other-field-min-block-size:var(--question-box-option-min-block-size);--question-box-other-field-font-size:var(--question-box-font-size)}:host([size=xl]){--question-box-font-size:var(--luzmo-font-size-xl);--question-box-selected-count-font-size:var(--luzmo-font-size-l);--question-box-title-font-size:var(--question-box-font-size);--question-box-header-control-size:var(--luzmo-component-height-xl);--question-box-option-min-block-size:var(--luzmo-component-height-xl);--question-box-option-number-size:var(--luzmo-component-height);--question-box-other-field-min-block-size:var(--question-box-option-min-block-size);--question-box-other-field-font-size:var(--question-box-font-size)}`,u=`__other__`,d={continue:`Next`,back:`Back`,submit:`Submit`,skip:`Skip`,change:`Change`,close:`Close`,other:`Something else`,otherPlaceholder:`Something else`,recommended:`Recommended`,answerTitle:`Answer`,answersTitle:`Answers`,progress:`{current} of {total}`,selectedCount:`{count} selected`,selectedCountOne:`{count} selected`,recommendedSuffix:`{label} ({recommended})`,answer:`{answer}`,requiredSelectionDescription:`Choose one or more options.`,selectionRangeDescription:`Choose between {min} and {max} options.`,minSelectedError:`Choose at least {min} options.`,maxSelectedError:`Choose at most {max} options.`,otherRequiredError:`Enter a value for this option.`},f=e=>`${e}Other`,p=e=>!!e.other||e.options.length===0,m=e=>typeof e.other==`object`&&e.other?e.other:{},h=e=>Object.fromEntries(Object.entries(e)),g=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},_=(e,t)=>{let n=new Set([...Object.keys(e),...Object.keys(t)]);for(let r of n){let n=e[r],i=t[r];if(Array.isArray(n)||Array.isArray(i)){if(!Array.isArray(n)||!Array.isArray(i)||n.length!==i.length||n.some((e,t)=>e!==i[t]))return!1}else if(n!==i)return!1}return!0},v=e=>{let t=new Set,n=[];for(let r of e)t.has(r)||(t.add(r),n.push(r));return n},y=e=>{let t=new Set(e.options.map(e=>e.value));return p(e)&&t.add(u),t},b=(e,t)=>{let n=t[e.id];return e.type===`single`?typeof n==`string`&&n?[n]:[]:Array.isArray(n)?v(n):[]},x=(e,t)=>b(e,t).includes(u),S=e=>{let t=Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0));return{...d,...t}},C=(e,t)=>{let n=e;for(let[e,r]of Object.entries(t))n=n.replaceAll(`{${e}}`,r);return n},w=e=>{let t=new Set;for(let n of e){if(!n.id)throw TypeError(`luzmo-question-box: every question needs an id.`);if(t.has(n.id))throw TypeError(`luzmo-question-box: duplicate question id "${n.id}".`);t.add(n.id);let r=f(n.id);if(e.some(e=>e.id===r))throw TypeError(`luzmo-question-box: question id "${r}" collides with Other text for "${n.id}".`);if(n.type!==`multiple`&&(n.minSelected!==void 0||n.maxSelected!==void 0))throw TypeError(`luzmo-question-box: minSelected and maxSelected only apply to multiple-choice question "${n.id}".`);for(let[e,t]of[[`minSelected`,n.minSelected],[`maxSelected`,n.maxSelected]])if(t!==void 0&&(!Number.isInteger(t)||t<0))throw TypeError(`luzmo-question-box: ${e} must be a non-negative integer on "${n.id}".`);let i=n.minSelected??+!!n.required;if(n.maxSelected!==void 0&&i>n.maxSelected)throw TypeError(`luzmo-question-box: minSelected cannot exceed maxSelected on "${n.id}".`);let a=n.options.filter(e=>!e.disabled).length+ +!!p(n);if(n.type===`multiple`&&i>a)throw TypeError(`luzmo-question-box: minSelected exceeds the available options on "${n.id}".`);let o=new Set;for(let e of n.options){if(!e.value)throw TypeError(`luzmo-question-box: option values cannot be empty on "${n.id}".`);if(e.value===`__other__`)throw TypeError(`luzmo-question-box: "${u}" is reserved on "${n.id}".`);if(o.has(e.value))throw TypeError(`luzmo-question-box: duplicate option value "${e.value}" on "${n.id}".`);o.add(e.value)}}},T=(e,t)=>{let n=Object.fromEntries([]);for(let r of e){let e=y(r),i=t[r.id],a=Object.hasOwn(t,r.id);if(r.type===`single`)typeof i==`string`&&e.has(i)?g(n,r.id,i):!a&&typeof r.default==`string`&&(e.has(r.default)||r.options.length===0)&&g(n,r.id,r.options.length===0?u:r.default);else{let t=[...r.options.map(e=>e.value),...p(r)?[u]:[]],o=v(Array.isArray(i)?i.filter(t=>e.has(t)):[]);if(o.length>0)g(n,r.id,t.filter(e=>o.includes(e)));else if(!a&&Array.isArray(r.default)){let i=v(r.default.filter(t=>e.has(t)));i.length>0&&g(n,r.id,t.filter(e=>i.includes(e)))}}let o=f(r.id),s=t[o];typeof s==`string`?g(n,o,s):!a&&r.options.length===0&&typeof r.default==`string`&&g(n,o,r.default)}return n},E=e=>e.minSelected??+!!e.required,D=(e,t)=>{let n=E(e),r=e.maxSelected;return n>0&&r!==void 0?C(t.selectionRangeDescription,{min:String(n),max:String(r)}):n===1?t.requiredSelectionDescription:n>1?C(t.minSelectedError,{min:String(n)}):r===void 0?void 0:C(t.maxSelectedError,{max:String(r)})},O=(e,t)=>{let n=b(e,t),r=E(e),i=e.maxSelected;if(n.length<r)return r<=1?`missing`:`minimum`;if(i!==void 0&&n.length>i)return`maximum`;if(x(e,t)&&!String(t[f(e.id)]??``).trim())return`otherText`},k=(e,t)=>O(e,t)!==void 0,A=(e,t,n)=>{switch(O(e,t)){case`minimum`:return C(n.minSelectedError,{min:String(E(e))});case`maximum`:return C(n.maxSelectedError,{max:String(e.maxSelected)});case`otherText`:return n.otherRequiredError;default:return}},j=(e,t,n,r,i)=>{if(i||t.disabled)return!0;if(e.type!==`multiple`||n)return!1;let a=e.maxSelected;return a!==void 0&&b(e,r).length>=a},M=(e,t)=>C(e===1?t.selectedCountOne:t.selectedCount,{count:String(e)}),N,ee=(e,t)=>{try{return N?.language!==t&&(N={language:t,formatter:new Intl.ListFormat(t,{style:`narrow`,type:`conjunction`})}),N.formatter.format(e)}catch{return e.join(`, `)}},te=(e,t)=>e.recommended?C(t.recommendedSuffix,{label:e.label,recommended:t.recommended}):e.label,ne=e=>{let t=e.options.map(e=>({const:e.value,title:e.label}));return p(e)&&e.options.length>0&&t.push({const:u,title:typeof e.other==`object`&&e.other.label||d.other}),t},re=e=>{let t={type:`string`};return typeof e.other==`object`&&e.other.label&&(t.title=e.other.label),t},ie=e=>{let t=[],n=[];for(let r of e){if(r.options.length===0){let e={type:`string`};r.title&&(e.title=r.title),r.description&&(e.description=r.description),typeof r.default==`string`&&(e.default=r.default),t.push([r.id,e]),r.required&&n.push(r.id);continue}let e=ne(r);if(r.type===`single`){let n={type:`string`,oneOf:e};r.title&&(n.title=r.title),r.description&&(n.description=r.description),typeof r.default==`string`&&r.options.some(e=>e.value===r.default)&&(n.default=r.default),t.push([r.id,n])}else{let n={type:`array`,items:{anyOf:e}};r.title&&(n.title=r.title),r.description&&(n.description=r.description);let i=r.minSelected??(r.required?1:void 0);if(i!==void 0&&(n.minItems=i),r.maxSelected!==void 0&&(n.maxItems=r.maxSelected),Array.isArray(r.default)){let t=new Set(e.map(e=>e.const)),i=r.default.filter(e=>t.has(e));i.length>0&&(n.default=i)}t.push([r.id,n])}r.required&&n.push(r.id),p(r)&&t.push([f(r.id),re(r)])}let r=Object.fromEntries(t);return n.length>0?{type:`object`,properties:r,required:n}:{type:`object`,properties:r}},ae=(e,t)=>String(t[f(e.id)]??``).trim(),P=(e,t)=>{let n=[];for(let r of e){let e=ae(r,t);if(r.options.length===0){e&&n.push([r.id,e]);continue}let i=b(r,t);r.type===`single`?i[0]&&n.push([r.id,i[0]]):i.length>0&&n.push([r.id,[...i]]),p(r)&&x(r,t)&&e&&n.push([f(r.id),e])}return Object.fromEntries(n)},F=e=>!!e&&typeof e==`object`&&!Array.isArray(e),I=e=>F(e)?e:{},L=e=>{let t=e.oneOf??e.items?.anyOf;if(Array.isArray(t)){let e=[],n=new Set;for(let r of t)F(r)&&typeof r.const==`string`&&r.const&&!n.has(r.const)&&(n.add(r.const),e.push({value:r.const,label:typeof r.title==`string`&&r.title?r.title:r.const}));return{declared:!0,options:e}}let n=e.enum??e.items?.enum;if(Array.isArray(n)){let t=e.enumNames??e.items?.enumNames,r=new Set,i=[];for(let[e,a]of n.entries()){if(typeof a!=`string`||!a||r.has(a))continue;r.add(a);let n=t?.[e];i.push({value:a,label:typeof n==`string`&&n?n:a})}return{declared:!0,options:i}}return{declared:!1,options:[]}},R=e=>f(e),z=e=>e.format!==void 0||e.minLength!==void 0||e.maxLength!==void 0||e.pattern!==void 0,B=e=>e.type===`string`&&!L(e).declared&&!z(e),V=e=>{if(e.type!==`object`||!e.properties)return[];let t=e.properties,n=new Set(e.required??[]),r=new Set;for(let e of Object.keys(t)){let n=R(e),i=L(I(t[e])),a=I(t[n]);n in t&&B(a)&&i.options.some(e=>e.value===`__other__`)&&r.add(n)}let i=[];for(let[e,a]of Object.entries(t)){if(r.has(e))continue;let o=I(a),s=L(o),c=s.options.some(e=>e.value===u),l=R(e);if(c&&!r.has(l))continue;let d=s.options.filter(e=>e.value!==u);if(o.type===`number`||o.type===`integer`||o.type===`boolean`||o.type!==`string`&&o.type!==`array`||s.declared&&s.options.length===0||o.type===`array`&&!s.declared||o.type===`string`&&!s.declared&&z(o))continue;let f={id:e,type:o.type===`array`?`multiple`:`single`,title:o.title||e,options:d};if(o.description&&(f.description=o.description),n.has(e)&&(f.required=!0),o.type===`array`?(o.minItems!==void 0&&(f.minSelected=o.minItems),o.maxItems!==void 0&&(f.maxSelected=o.maxItems),Array.isArray(o.default)&&o.default.length>0&&(f.default=o.default)):typeof o.default==`string`&&(f.default=o.default),c&&l in t){let e=I(t[l]);f.other=!e.title||{label:e.title}}i.push(f)}return i};function H(e){switch(e){case`s`:return`xs`;case`m`:return`s`;case`l`:return`m`;default:return`l`}}function U(e){switch(e){case`m`:return`xs`;case`l`:return`s`;case`xl`:case`xxl`:return`m`;default:return`xxs`}}function W(e){return e.step>=e.questions.length-1}function G(e,t){let n=e.selectedValues(t);return n.length===0?``:ee(n.map(n=>{if(n===`__other__`)return String(e.value[f(t.id)]??e.copy.other);let r=t.options.find(e=>e.value===n);return r?te(r,e.copy):n}),e.language)}function K(e,t){let n=G(e,t),r=e.copy.answer.split(`{answer}`).map((e,t)=>i.html`${t>0?i.html`<span class="summary-answer">${n}</span>`:i.nothing}${e}`);return i.html`<span class="summary-value">${r}</span>`}function q(e){let t=e.copy,n=e.questions.reduce((t,n)=>t+e.selectedValues(n).length,0);return i.html`
|
|
19
19
|
<div class="card resolved">
|
|
20
20
|
<div class="summary">
|
|
21
21
|
<h2 class="summary-heading" id="resolved-title" tabindex="-1">
|
|
22
|
-
${
|
|
22
|
+
${n===1?t.answerTitle:t.answersTitle}
|
|
23
23
|
</h2>
|
|
24
24
|
${(0,c.repeat)(e.questions,e=>e.id,t=>i.html`
|
|
25
25
|
<div class="summary-row">
|
|
@@ -398,4 +398,4 @@ require("./tokens.cjs");const e=require("./decorate-Dq34MBGe.cjs"),t=require("./
|
|
|
398
398
|
</div>
|
|
399
399
|
${r?fe(e,t):i.nothing}
|
|
400
400
|
</div>
|
|
401
|
-
`}var $=class extends t.n(e.n,{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 r.t(this),this._radioChangeAdvanced=!1,this.multipleChoiceRoving=new n.t(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[f(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[f(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),...p(t)?[u]:[]].filter(e=>i.has(e));this.commitAnswer(t.id,v(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[f(t.id)]??``).trim()&&this.handlePrimary()}}static get styles(){let e=super.styles;return[...Array.isArray(e)?e:e?[e]:[],(0,i.unsafeCSS)(l)]}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`)){w(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=T(this.questions,this.value);_(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 pe(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 S(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`,P(this.questions,this.value)),this.updateComplete.then(()=>this.focus())}commitAnswer(e,t,n){let r=h(this.value);g(r,e,t),this.assignValue(r,n)}commitOther(e,t,n){let r=h(this.value);g(r,f(e.id),t);let i=t.trim().length>0;if(e.type===`single`)i?g(r,e.id,u):r[e.id]===`__other__`&&g(r,e.id,``);else{let t=new Set(this.selectedValues(e));i?t.add(u):t.delete(u),g(r,e.id,[...e.options.map(e=>e.value),u].filter(e=>t.has(e)))}this.assignValue(r,n)}assignValue(e,t){_(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 b(e,this.value)}isOtherSelected(e){return x(e,this.value)}questionError(e){return A(e,this.value,this.copy)}questionInvalid(e){return k(e,this.value)}optionDisabled(e,t,n){return j(e,t,n,this.value,this.disabled)}};e.t([(0,a.property)({attribute:!1})],$.prototype,`questions`,void 0),e.t([(0,a.property)({attribute:!1})],$.prototype,`value`,void 0),e.t([(0,a.property)({attribute:!1})],$.prototype,`labels`,void 0),e.t([(0,a.property)({reflect:!0})],$.prototype,`dir`,void 0),e.t([(0,a.property)({type:Boolean,reflect:!0})],$.prototype,`disabled`,void 0),e.t([(0,a.property)({type:Boolean,reflect:!0})],$.prototype,`readonly`,void 0),e.t([(0,a.property)({type:Boolean,reflect:!0,attribute:`hide-close`})],$.prototype,`hideClose`,void 0),e.t([(0,a.property)({type:Boolean,reflect:!0,attribute:`hide-skip`})],$.prototype,`hideSkip`,void 0),e.t([(0,a.property)({type:Boolean,reflect:!0,attribute:`show-change`})],$.prototype,`showChange`,void 0),e.t([(0,a.property)({reflect:!0,attribute:`option-indicator`})],$.prototype,`optionIndicator`,null),e.t([(0,a.state)()],$.prototype,`_step`,void 0),e.t([(0,a.state)()],$.prototype,`_resolved`,void 0),e.t([(0,a.state)()],$.prototype,`_submitted`,void 0),e.t([(0,a.state)()],$.prototype,`_showError`,void 0),e.t([(0,a.query)(`#question-title`)],$.prototype,`questionTitle`,void 0),e.t([(0,a.query)(`#other-field`)],$.prototype,`otherField`,void 0),e.t([(0,a.query)(`#options`)],$.prototype,`optionsGroup`,void 0),e.t([(0,a.query)(`#resolved-title`)],$.prototype,`resolvedTitle`,void 0),typeof customElements<`u`&&!customElements.get(`luzmo-question-box`)&&customElements.define(`luzmo-question-box`,$),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return $}});
|
|
401
|
+
`}var $=class extends t.n(e.n,{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 r.t(this),this._radioChangeAdvanced=!1,this.multipleChoiceRoving=new n.t(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()}else 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;!e||this.disabled||this.readonly||(this.questionInvalid(e)?(this._showError=!0,this.focusOptions()):(this._showError=!1,this._step<this.questions.length-1?(this._step+=1,this.updateComplete.then(()=>this.moveFocus(this.questionTitle))):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;n&&(n===`__other__`&&!String(this.value[f(t.id)]??``).trim()?(this.requestUpdate(),this.updateComplete.then(()=>this.moveFocus(this.otherField))):(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[f(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),...p(t)?[u]:[]].filter(e=>i.has(e));this.commitAnswer(t.id,v(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[f(t.id)]??``).trim()&&this.handlePrimary()}}static get styles(){let e=super.styles;return[...Array.isArray(e)?e:e?[e]:[],(0,i.unsafeCSS)(l)]}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){e===`option-indicator`&&n!==null&&n!==`numbers`&&n!==`letters`?this.setAttribute(`option-indicator`,`numbers`):super.attributeChangedCallback(e,t,n)}disconnectedCallback(){this.removeEventListener(`keydown`,this.handleKeydown),this.removeEventListener(`keyup`,this.handleKeyup),this.removeEventListener(`focusin`,this.handleFocusIn),super.disconnectedCallback()}focus(){this._resolved?this.moveFocus(this.resolvedTitle):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`)){w(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=T(this.questions,this.value);_(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 pe(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 S(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(){this._step<this.questions.length-1?(this._step+=1,this.updateComplete.then(()=>this.moveFocus(this.questionTitle))):(this._resolved=!0,this._submitted=!1,this.updateComplete.then(()=>this.focus()))}acceptFlow(){let e=this.questions.findIndex(e=>this.questionInvalid(e));e===-1?(this._showError=!1,this._resolved=!0,this._submitted=!0,this.emitResult(`accept`,P(this.questions,this.value)),this.updateComplete.then(()=>this.focus())):(this._step=e,this._showError=!0,this.updateComplete.then(()=>this.focusOptions()))}commitAnswer(e,t,n){let r=h(this.value);g(r,e,t),this.assignValue(r,n)}commitOther(e,t,n){let r=h(this.value);g(r,f(e.id),t);let i=t.trim().length>0;if(e.type===`single`)i?g(r,e.id,u):r[e.id]===`__other__`&&g(r,e.id,``);else{let t=new Set(this.selectedValues(e));i?t.add(u):t.delete(u),g(r,e.id,[...e.options.map(e=>e.value),u].filter(e=>t.has(e)))}this.assignValue(r,n)}assignValue(e,t){_(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};e===`accept`?this.dispatchEvent(new CustomEvent(`luzmo-submit`,{detail:n,bubbles:!0,composed:!0})):e===`decline`?this.dispatchEvent(new CustomEvent(`luzmo-decline`,{detail:n,bubbles:!0,composed:!0})):this.dispatchEvent(new CustomEvent(`luzmo-cancel`,{detail:n,bubbles:!0,composed:!0}))}selectedValues(e){return b(e,this.value)}isOtherSelected(e){return x(e,this.value)}questionError(e){return A(e,this.value,this.copy)}questionInvalid(e){return k(e,this.value)}optionDisabled(e,t,n){return j(e,t,n,this.value,this.disabled)}};e.t([(0,a.property)({attribute:!1})],$.prototype,`questions`,void 0),e.t([(0,a.property)({attribute:!1})],$.prototype,`value`,void 0),e.t([(0,a.property)({attribute:!1})],$.prototype,`labels`,void 0),e.t([(0,a.property)({reflect:!0})],$.prototype,`dir`,void 0),e.t([(0,a.property)({type:Boolean,reflect:!0})],$.prototype,`disabled`,void 0),e.t([(0,a.property)({type:Boolean,reflect:!0})],$.prototype,`readonly`,void 0),e.t([(0,a.property)({type:Boolean,reflect:!0,attribute:`hide-close`})],$.prototype,`hideClose`,void 0),e.t([(0,a.property)({type:Boolean,reflect:!0,attribute:`hide-skip`})],$.prototype,`hideSkip`,void 0),e.t([(0,a.property)({type:Boolean,reflect:!0,attribute:`show-change`})],$.prototype,`showChange`,void 0),e.t([(0,a.property)({reflect:!0,attribute:`option-indicator`})],$.prototype,`optionIndicator`,null),e.t([(0,a.state)()],$.prototype,`_step`,void 0),e.t([(0,a.state)()],$.prototype,`_resolved`,void 0),e.t([(0,a.state)()],$.prototype,`_submitted`,void 0),e.t([(0,a.state)()],$.prototype,`_showError`,void 0),e.t([(0,a.query)(`#question-title`)],$.prototype,`questionTitle`,void 0),e.t([(0,a.query)(`#other-field`)],$.prototype,`otherField`,void 0),e.t([(0,a.query)(`#options`)],$.prototype,`optionsGroup`,void 0),e.t([(0,a.query)(`#resolved-title`)],$.prototype,`resolvedTitle`,void 0),typeof customElements<`u`&&!customElements.get(`luzmo-question-box`)&&customElements.define(`luzmo-question-box`,$),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return $}});
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../tokens.cjs");const e=require("../radio-
|
|
18
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../tokens.cjs");const e=require("../radio-Dd-GgUMm.cjs");exports.LuzmoRadio=e.n,exports.LuzmoRadioGroup=e.t;
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
18
|
import "./tokens.js";
|
|
19
|
-
import { n as e, t } from "./decorate-
|
|
20
|
-
import { n } from "./sized-mixin-
|
|
21
|
-
import { t as r } from "./focus-visible-
|
|
22
|
-
import { t as i } from "./roving-tabindex-
|
|
23
|
-
import { t as a } from "./field-group-
|
|
19
|
+
import { n as e, t } from "./decorate-CpKsOs9z.js";
|
|
20
|
+
import { n } from "./sized-mixin-BmxIAuoH.js";
|
|
21
|
+
import { t as r } from "./focus-visible-D6TRtUd7.js";
|
|
22
|
+
import { t as i } from "./roving-tabindex-BKMkfzY0.js";
|
|
23
|
+
import { t as a } from "./field-group-CdDcdMO1.js";
|
|
24
24
|
import { html as o, unsafeCSS as s } from "lit";
|
|
25
25
|
import { property as c } from "lit/decorators.js";
|
|
26
|
-
|
|
26
|
+
// src/components/radio/radio.module.scss?inline
|
|
27
27
|
var l = "@media (forced-colors:active){:host{--highcontrast-radio-neutral-content-color:CanvasText;--highcontrast-radio-neutral-content-color-hover:CanvasText;--highcontrast-radio-neutral-content-color-down:CanvasText;--highcontrast-radio-neutral-content-color-focus:CanvasText;--highcontrast-radio-button-border-color-default:ButtonText;--highcontrast-radio-button-border-color-hover:Highlight;--highcontrast-radio-button-border-color-down:ButtonText;--highcontrast-radio-button-border-color-focus:Highlight;--highcontrast-radio-emphasized-accent-color:ButtonText;--highcontrast-radio-emphasized-accent-color-hover:Highlight;--highcontrast-radio-emphasized-accent-color-down:ButtonText;--highcontrast-radio-emphasized-accent-color-focus:Highlight;--highcontrast-radio-button-checked-border-color-default:Highlight;--highcontrast-radio-button-checked-border-color-hover:Highlight;--highcontrast-radio-button-checked-border-color-down:Highlight;--highcontrast-radio-button-checked-border-color-focus:Highlight;--highcontrast-radio-disabled-content-color:GrayText;--highcontrast-radio-disabled-border-color:GrayText;--highcontrast-radio-focus-indicator-color:CanvasText}#button:after{forced-color-adjust:none}}:host{vertical-align:top;min-block-size:var(--luzmo-radio-height,var(--radio-height));max-inline-size:100%;font-family:var(--luzmo-radio-font-family,var(--luzmo-font-family));align-items:flex-start;display:inline-flex;position:relative}:host(:active) #button:before{border-color:var(--highcontrast-radio-button-border-color-down,var(--luzmo-radio-button-border-color-down,var(--radio-button-border-color-down)))}:host(:active[checked]) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-down,var(--luzmo-radio-button-checked-border-color-down,var(--radio-button-checked-border-color-down)))}:host(:active) #label{color:var(--highcontrast-radio-neutral-content-color-down,var(--luzmo-radio-neutral-content-color-down,var(--radio-neutral-content-color-down)))}:host(:focus-visible) #button:before{border-color:var(--highcontrast-radio-button-border-color-focus,var(--luzmo-radio-button-border-color-focus,var(--radio-button-border-color-focus)))}:host(:focus-visible) #button:after{border-style:solid;border-color:var(--highcontrast-radio-focus-indicator-color,var(--luzmo-radio-focus-indicator-color,var(--radio-focus-indicator-color)));border-width:var(--luzmo-radio-focus-indicator-width,var(--radio-focus-indicator-width));inline-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2);block-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2)}:host(:focus-visible[checked]) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-focus,var(--luzmo-radio-button-checked-border-color-focus,var(--radio-button-checked-border-color-focus)))}:host(:focus-visible) #label{color:var(--highcontrast-radio-neutral-content-color-focus,var(--luzmo-radio-neutral-content-color-focus,var(--radio-neutral-content-color-focus)))}:host([readonly]) #input:read-only{cursor:auto}:host([readonly]) #button{clip:rect(1px, 1px, 1px, 1px);clip-path:inset(50%);position:fixed;inset-block-end:100%;inset-inline-end:100%}:host([readonly][checked][disabled]) #input~#label,:host([readonly][disabled]) #input~#label,:host([readonly]) #label{color:var(--highcontrast-radio-neutral-content-color,var(--luzmo-radio-neutral-content-color,var(--radio-neutral-content-color)));margin-inline-start:0}:host([emphasized][checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color,var(--luzmo-radio-emphasized-accent-color,var(--radio-emphasized-accent-color)))}@media (hover:hover){:host(:hover) #button:before{border-color:var(--highcontrast-radio-button-border-color-hover,var(--luzmo-radio-button-border-color-hover,var(--radio-button-border-color-hover)))}:host([checked]:hover) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-hover,var(--luzmo-radio-button-checked-border-color-hover,var(--radio-button-checked-border-color-hover)))}:host(:hover) #label{color:var(--highcontrast-radio-neutral-content-color-hover,var(--luzmo-radio-neutral-content-color-hover,var(--radio-neutral-content-color-hover)))}:host([emphasized][checked]:hover) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-hover,var(--luzmo-radio-emphasized-accent-color-hover,var(--radio-emphasized-accent-color-hover)))}}:host([emphasized]:active[checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-down,var(--luzmo-radio-emphasized-accent-color-down,var(--radio-emphasized-accent-color-down)))}:host([emphasized]:focus-visible[checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-focus,var(--luzmo-radio-emphasized-accent-color-focus,var(--radio-emphasized-accent-color-focus)))}:host([checked][disabled]) #input+#button:before,:host([disabled]) #input+#button:before{border-color:var(--highcontrast-radio-disabled-border-color,var(--luzmo-radio-disabled-border-color,var(--radio-disabled-border-color)))}:host([checked][disabled]) #input~#label,:host([disabled]) #input~#label{color:var(--highcontrast-radio-disabled-content-color,var(--luzmo-radio-disabled-content-color,var(--radio-disabled-content-color)))}#input{font-family:inherit;font-size:100%;line-height:var(--luzmo-radio-line-height,var(--radio-line-height));box-sizing:border-box;opacity:0;z-index:1;cursor:pointer;block-size:100%;inline-size:100%;margin:0;padding:0;position:absolute;overflow:visible}:host([disabled]) #input{cursor:default}:host([checked]) #input+#button:before{border-width:calc(var(--radio-button-control-size) / 2 - var(--radio-button-selection-indicator) / 2);border-color:var(--highcontrast-radio-button-checked-border-color-default,var(--luzmo-radio-button-checked-border-color-default,var(--radio-button-checked-border-color-default)))}#input:focus-visible+#button:after{border-width:var(--luzmo-radio-focus-indicator-width,var(--radio-focus-indicator-width));border-color:var(--highcontrast-radio-focus-indicator-color,var(--luzmo-radio-focus-indicator-color,var(--radio-focus-indicator-color)));inline-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2);block-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2);border-style:solid}#label{text-align:start;font-size:var(--luzmo-radio-font-size,var(--radio-font-size));color:var(--highcontrast-radio-neutral-content-color,var(--luzmo-radio-neutral-content-color,var(--radio-neutral-content-color)));line-height:var(--luzmo-radio-line-height,var(--radio-line-height));transition:color var(--luzmo-radio-animation-duration,var(--radio-animation-duration)) ease-in-out;margin-block-start:var(--radio-label-top-to-text);margin-block-end:var(--radio-label-bottom-to-text);margin-inline-start:var(--luzmo-radio-text-to-control,var(--radio-text-to-control))}#label:lang(ja),#label:lang(ko),#label:lang(zh){line-height:var(--luzmo-radio-line-height-cjk,var(--radio-line-height-cjk))}#button{box-sizing:border-box;inline-size:var(--luzmo-radio-button-control-size,var(--radio-button-control-size));block-size:var(--luzmo-radio-button-control-size,var(--radio-button-control-size));flex-grow:0;flex-shrink:0;margin-block-start:var(--luzmo-radio-button-top-to-control,var(--radio-button-top-to-control));position:relative}#button:before{z-index:0;content:\"\";box-sizing:border-box;inline-size:var(--luzmo-radio-button-control-size,var(--radio-button-control-size));block-size:var(--luzmo-radio-button-control-size,var(--radio-button-control-size));background-color:var(--highcontrast-radio-button-background-color,var(--luzmo-radio-button-background-color,var(--radio-button-background-color)));border-width:var(--luzmo-radio-border-width,var(--radio-border-width));border-color:var(--highcontrast-radio-button-border-color-default,var(--luzmo-radio-button-border-color-default,var(--radio-button-border-color-default)));transition:border var(--luzmo-radio-animation-duration,var(--radio-animation-duration)) ease-in-out, box-shadow var(--luzmo-radio-animation-duration,var(--radio-animation-duration)) ease-in-out;border-style:solid;border-radius:50%;display:block;position:absolute}#button:after{content:\"\";transition:opacity var(--luzmo-radio-animation-duration,var(--radio-animation-duration)) ease-out, margin var(--luzmo-radio-animation-duration,var(--radio-animation-duration)) ease-out;border-radius:50%;display:block;position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%)translateY(-50%)}:host:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) #button:after{transform:translate(50%)translateY(-50%)}:host{--radio-button-border-color-default:var(--luzmo-border-color-full);--radio-button-border-color-hover:var(--luzmo-border-color-full-hover);--radio-button-border-color-down:var(--luzmo-border-color-full-hover);--radio-button-border-color-focus:var(--luzmo-border-color-full-hover);--radio-neutral-content-color:var(--luzmo-selected-color-hard);--radio-neutral-content-color-hover:var(--luzmo-selected-color-hard-hover);--radio-neutral-content-color-down:var(--luzmo-selected-color-hard-down);--radio-neutral-content-color-focus:var(--luzmo-selected-color-hard-focus);--radio-button-selection-indicator:var(--luzmo-spacing-2);--radio-focus-indicator-width:var(--luzmo-indicator-width);--radio-focus-indicator-gap:var(--luzmo-indicator-gap);--radio-focus-indicator-color:var(--luzmo-primary);--radio-disabled-content-color:var(--luzmo-disabled-color);--radio-disabled-border-color:var(--luzmo-border-color-disabled);--radio-emphasized-accent-color:var(--luzmo-primary);--radio-emphasized-accent-color-hover:var(--luzmo-primary-hover);--radio-emphasized-accent-color-down:var(--luzmo-primary-down);--radio-emphasized-accent-color-focus:var(--luzmo-primary-focus);--radio-border-width:calc(var(--luzmo-border-width) * 2);--radio-button-background-color:var(--luzmo-background-color);--radio-button-checked-border-color-default:var(--luzmo-selected-color-hard);--radio-button-checked-border-color-hover:var(--luzmo-selected-color-hard-hover);--radio-button-checked-border-color-down:var(--luzmo-selected-color-hard-down);--radio-button-checked-border-color-focus:var(--luzmo-selected-color-hard-focus);--radio-line-height:1.3;--radio-animation-duration:var(--luzmo-animation-duration);--radio-height:32px;--radio-button-control-size:14px;--radio-text-to-control:10px;--radio-label-top-to-text:6px;--radio-label-bottom-to-text:9px;--radio-button-top-to-control:9px;--radio-font-size:14px}:host(:lang(ja)),:host(:lang(zh)),:host(:lang(ko)){--radio-line-height-cjk:1.5}:host{--radio-height:var(--luzmo-component-height);--radio-button-control-size:14px;--radio-text-to-control:10px;--radio-label-top-to-text:7px;--radio-label-bottom-to-text:9px;--radio-button-top-to-control:9px;--radio-font-size:14px}:host([size=s]){--radio-height:var(--luzmo-component-height-s);--radio-button-control-size:var(--luzmo-spacing-4);--radio-text-to-control:9px;--radio-label-top-to-text:var(--luzmo-spacing-2);--radio-label-bottom-to-text:5px;--radio-button-top-to-control:6px;--radio-font-size:var(--luzmo-spacing-4)}:host([size=l]){--radio-height:var(--luzmo-component-height-l);--radio-button-control-size:16px;--radio-text-to-control:11px;--radio-label-top-to-text:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--radio-label-bottom-to-text:11px;--radio-button-top-to-control:var(--luzmo-spacing-4);--radio-font-size:16px}:host([size=xl]){--radio-height:var(--luzmo-component-height-xl);--radio-button-control-size:18px;--radio-text-to-control:13px;--radio-label-top-to-text:var(--luzmo-spacing-4);--radio-label-bottom-to-text:14px;--radio-button-top-to-control:15px;--radio-font-size:18px}:host([emphasized]){--radio-button-checked-border-color-default:var(--luzmo-primary);--radio-button-checked-border-color-hover:var(--luzmo-primary-hover);--radio-button-checked-border-color-down:var(--luzmo-primary-down);--radio-button-checked-border-color-focus:var(--luzmo-primary-focus)}:host(:focus){outline:none}:host([disabled]){pointer-events:none}:host([dir=rtl]) #button:after{transform:translate(50%)translateY(-50%)}", u = class extends n(r(e), { noDefaultSize: !0 }) {
|
|
28
28
|
constructor(...e) {
|
|
29
29
|
super(...e), this.autofocus = !1, this.value = "", this.checked = !1, this.disabled = !1, this.emphasized = !1, this.invalid = !1, this.readonly = !1;
|
|
@@ -79,8 +79,7 @@ t([c({ type: Boolean })], u.prototype, "autofocus", void 0), t([c({
|
|
|
79
79
|
type: Boolean,
|
|
80
80
|
reflect: !0
|
|
81
81
|
})], u.prototype, "readonly", void 0);
|
|
82
|
-
|
|
83
|
-
//#region src/components/radio/radio-group.ts
|
|
82
|
+
// src/components/radio/radio-group.ts
|
|
84
83
|
var d = class extends r(a) {
|
|
85
84
|
constructor(...e) {
|
|
86
85
|
super(...e), this.name = "", this.manualSelection = !1, this.rovingTabindexController = new i(this, {
|
|
@@ -101,15 +100,11 @@ var d = class extends r(a) {
|
|
|
101
100
|
_setSelected(e) {
|
|
102
101
|
if (e === this.selected) return;
|
|
103
102
|
let t = this.selected, n = e ? this.querySelector(`luzmo-radio[value="${CSS.escape(e)}"]`) : void 0;
|
|
104
|
-
|
|
103
|
+
this.selected = n ? e : "", this.dispatchEvent(new Event("change", {
|
|
105
104
|
cancelable: !0,
|
|
106
105
|
bubbles: !0,
|
|
107
106
|
composed: !0
|
|
108
|
-
})))
|
|
109
|
-
this.selected = t;
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
this.validateRadios();
|
|
107
|
+
})) ? this.validateRadios() : this.selected = t;
|
|
113
108
|
}
|
|
114
109
|
willUpdate(e) {
|
|
115
110
|
if (!this.hasUpdated) {
|
|
@@ -142,5 +137,4 @@ t([c({ type: String })], d.prototype, "name", void 0), t([c({
|
|
|
142
137
|
reflect: !0,
|
|
143
138
|
attribute: "manual-selection"
|
|
144
139
|
})], d.prototype, "manualSelection", void 0), t([c({ reflect: !0 })], d.prototype, "selected", void 0), customElements.get("luzmo-radio") || customElements.define("luzmo-radio", u), customElements.get("luzmo-radio-group") || customElements.define("luzmo-radio-group", d);
|
|
145
|
-
//#endregion
|
|
146
140
|
export { u as n, d as t };
|