@sellmate/design-system 1.28.0 → 1.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{component.datepicker-CUQbDSku.js → component.datepicker-zFTQQKMH.js} +1 -2
- package/dist/cjs/design-system.cjs.js +2 -2
- package/dist/cjs/{index-D12oddge.js → index-iiJZMzVM.js} +1 -15
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/sd-action-modal.cjs.entry.js +1 -1
- package/dist/cjs/sd-badge.cjs.entry.js +1 -1
- package/dist/cjs/sd-barcode-input.cjs.entry.js +1 -1
- package/dist/cjs/sd-button_2.cjs.entry.js +1 -1
- package/dist/cjs/sd-calendar_2.cjs.entry.js +6 -6
- package/dist/cjs/sd-callout.cjs.entry.js +1 -1
- package/dist/cjs/sd-card.cjs.entry.js +1 -1
- package/dist/cjs/sd-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/sd-chip-input.cjs.entry.js +2 -2
- package/dist/cjs/sd-chip.cjs.entry.js +1 -1
- package/dist/cjs/sd-circle-progress.cjs.entry.js +3 -3
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +33 -36
- package/dist/cjs/sd-date-box.cjs.entry.js +1 -1
- package/dist/cjs/{sd-date-picker.config-De7ahWIs.js → sd-date-picker.config-Chrd8c4v.js} +1 -1
- package/dist/cjs/{sd-date-picker_7.cjs.entry.js → sd-date-picker_8.cjs.entry.js} +327 -18
- package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +4 -4
- package/dist/cjs/sd-divider.cjs.entry.js +3 -3
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +2 -2
- package/dist/cjs/sd-field_3.cjs.entry.js +9 -9
- package/dist/cjs/sd-form.cjs.entry.js +1 -1
- package/dist/cjs/sd-ghost-button_3.cjs.entry.js +3 -3
- package/dist/cjs/sd-guide.cjs.entry.js +2 -2
- package/dist/cjs/sd-key-value-table.cjs.entry.js +88 -18
- package/dist/cjs/sd-linear-progress.cjs.entry.js +3 -3
- package/dist/cjs/sd-loading-container.cjs.entry.js +3 -3
- package/dist/cjs/sd-modal-container.cjs.entry.js +16 -2
- package/dist/cjs/sd-pagination.cjs.entry.js +173 -0
- package/dist/cjs/sd-popover.cjs.entry.js +2 -2
- package/dist/cjs/sd-popup.cjs.entry.js +3 -3
- package/dist/cjs/sd-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/sd-radio.cjs.entry.js +1 -1
- package/dist/cjs/{sd-select_3.cjs.entry.js → sd-select-list-item_4.cjs.entry.js} +294 -315
- package/dist/cjs/sd-switch.cjs.entry.js +2 -2
- package/dist/cjs/sd-tabs.cjs.entry.js +2 -2
- package/dist/cjs/sd-text-link.cjs.entry.js +1 -1
- package/dist/cjs/sd-toast-container.cjs.entry.js +2 -2
- package/dist/cjs/sd-toast.cjs.entry.js +3 -3
- package/dist/cjs/sd-toggle.cjs.entry.js +2 -2
- package/dist/cjs/{system-MjrAugX-.js → system-B4KkVpu2.js} +1 -7
- package/dist/cjs/{tooltipArrow-Dda4ik0V.js → tooltipArrow-DOOcBlLp.js} +1 -1
- package/dist/cjs/{useDatePicker-iMd6WToc.js → useDatePicker-CgpIfwLA.js} +1 -1
- package/dist/collection/collection-manifest.json +0 -5
- package/dist/collection/components/sd-circle-progress/sd-circle-progress.css +1 -0
- package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.css +3 -0
- package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +35 -59
- package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.js +2 -2
- package/dist/collection/components/sd-date-picker/sd-date-picker.js +2 -2
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.js +1 -1
- package/dist/collection/components/sd-divider/sd-divider.js +1 -1
- package/dist/collection/components/sd-field/sd-field.js +4 -4
- package/dist/collection/components/sd-file-picker/sd-file-picker.js +6 -6
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
- package/dist/collection/components/sd-input/sd-input.js +2 -2
- package/dist/collection/components/sd-key-value-table/sd-key-value-table.config.js +2 -0
- package/dist/collection/components/sd-key-value-table/sd-key-value-table.css +5 -1
- package/dist/collection/components/sd-key-value-table/sd-key-value-table.js +65 -15
- package/dist/collection/components/sd-linear-progress/sd-linear-progress.js +1 -1
- package/dist/collection/components/sd-loading-container/sd-loading-container.js +2 -2
- package/dist/collection/components/sd-loading-modal/sd-loading-modal.js +1 -1
- package/dist/collection/components/sd-modal-container/sd-modal-container.js +15 -1
- package/dist/collection/components/sd-number-input/sd-number-input.js +4 -4
- package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
- package/dist/collection/components/sd-popup/sd-popup.js +1 -1
- package/dist/collection/components/sd-select/sd-select-list-item/sd-select-list-item.js +2 -2
- package/dist/collection/components/sd-select/sd-select-list-item-search/sd-select-list-item-search.js +4 -4
- package/dist/collection/components/sd-select/sd-select-listbox/sd-select-listbox.js +2 -2
- package/dist/collection/components/sd-select/sd-select-trigger/sd-select-trigger.js +2 -2
- package/dist/collection/components/sd-select/sd-select.js +4 -4
- package/dist/collection/components/sd-switch/sd-switch.js +1 -1
- package/dist/collection/components/sd-tabs/sd-tabs.js +1 -1
- package/dist/collection/components/sd-tag/sd-tag.js +2 -2
- package/dist/collection/components/sd-textarea/sd-textarea.js +1 -1
- package/dist/collection/components/sd-toast/sd-toast.js +2 -2
- package/dist/collection/components/sd-toast-container/sd-toast-container.js +1 -1
- package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
- package/dist/collection/components/sd-tooltip/sd-tooltip.js +2 -2
- package/dist/components/index.js +1 -1
- package/dist/components/{p-pwGA4sDj.js → p-9Ap2W-Mi.js} +1 -1
- package/dist/components/p-BFVfSW9t.js +1 -0
- package/dist/components/{p-BuADVB78.js → p-BHjezpAC.js} +1 -1
- package/dist/components/{p-CHHlQceE.js → p-BIEPMPWA.js} +1 -1
- package/dist/components/{p-CMvHDxR5.js → p-BKu0I6Io.js} +1 -1
- package/dist/components/{p-B3HYnTGx.js → p-B_Zwr4Et.js} +1 -1
- package/dist/components/{p-BysikR_g.js → p-Bpv90tfa.js} +1 -1
- package/dist/components/p-Bth2l1cy.js +1 -0
- package/dist/components/{p-DNbbdJIc.js → p-C7mC7a1z.js} +1 -1
- package/dist/components/{p-B2pYDEK7.js → p-CBoDoYDO.js} +1 -1
- package/dist/components/p-CErFctrV.js +1 -0
- package/dist/components/{p-ClD0nx1l.js → p-CFTyEfB9.js} +1 -1
- package/dist/components/{p-1i6Q61TF.js → p-CSr33M9s.js} +1 -1
- package/dist/components/{p-C0tnN4yn.js → p-CYMMLsGt.js} +1 -1
- package/dist/components/{p-l9RiSWRc.js → p-C_SG4M4z.js} +1 -1
- package/dist/components/{p-BE6ymp9E.js → p-C_in6AVN.js} +1 -1
- package/dist/components/{p-BAVsc1Ml.js → p-CbS69IvC.js} +1 -1
- package/dist/components/{p-BWHQn4fD.js → p-CgSXYw_0.js} +1 -1
- package/dist/components/{p-BQ4Okfcm.js → p-CmRF12Fy.js} +1 -1
- package/dist/components/{p-DbPS61bp.js → p-CnRfET5y.js} +1 -1
- package/dist/components/{p-Bxb7TcZh.js → p-Cvsrc0be.js} +1 -1
- package/dist/components/{p-BCxePXvg.js → p-DJ8z7_EG.js} +1 -1
- package/dist/components/{p-paSLRXAR.js → p-DJmxpVkK.js} +1 -1
- package/dist/components/{p-IDlLs_KA.js → p-DMoFncVl.js} +1 -1
- package/dist/components/{p-B-pJW3nY.js → p-DN7MAx-q.js} +1 -1
- package/dist/components/{p-E8OA_psS.js → p-DS6NVBvu.js} +1 -1
- package/dist/components/{p-BNHhtZUf.js → p-D_56BjcD.js} +1 -1
- package/dist/components/{p-CTDPl65u.js → p-Dg1UrMqI.js} +1 -1
- package/dist/components/{p-BKV1WAFb.js → p-Di1q4f5E.js} +1 -1
- package/dist/components/{p-Bgxca9o5.js → p-OO7xxhkC.js} +1 -1
- package/dist/components/{p-vtuEYpc6.js → p-R-Sdglj0.js} +1 -1
- package/dist/components/p-Uh9emYrV.js +1 -0
- package/dist/components/{p-CSh-DcM7.js → p-f0aBxUBG.js} +1 -1
- package/dist/components/{p-BnI9HUOv.js → p-idG6CMO0.js} +1 -1
- package/dist/components/p-oYbVr-z0.js +1 -0
- package/dist/components/sd-action-modal.js +1 -1
- package/dist/components/sd-badge.js +1 -1
- package/dist/components/sd-barcode-input.js +1 -1
- package/dist/components/sd-button.js +1 -1
- package/dist/components/sd-calendar.js +1 -1
- package/dist/components/sd-callout.js +1 -1
- package/dist/components/sd-card.js +1 -1
- package/dist/components/sd-checkbox.js +1 -1
- package/dist/components/sd-chip-input.js +1 -1
- package/dist/components/sd-chip.js +1 -1
- package/dist/components/sd-circle-progress.js +1 -1
- package/dist/components/sd-confirm-modal.js +1 -1
- package/dist/components/sd-date-box.js +1 -1
- package/dist/components/sd-date-picker-trigger.js +1 -1
- package/dist/components/sd-date-picker.js +1 -1
- package/dist/components/sd-date-range-picker-calendar.js +1 -1
- package/dist/components/sd-date-range-picker.js +1 -1
- package/dist/components/sd-divider.js +1 -1
- package/dist/components/sd-dropdown-button.js +1 -1
- package/dist/components/sd-field.js +1 -1
- package/dist/components/sd-file-picker.js +1 -1
- package/dist/components/sd-floating-portal.js +1 -1
- package/dist/components/sd-form.js +1 -1
- package/dist/components/sd-ghost-button.js +1 -1
- package/dist/components/sd-guide.js +1 -1
- package/dist/components/sd-icon.js +1 -1
- package/dist/components/sd-input.js +1 -1
- package/dist/components/sd-key-value-table.js +1 -1
- package/dist/components/sd-linear-progress.js +1 -1
- package/dist/components/sd-loading-container.js +1 -1
- package/dist/components/sd-loading-modal.js +1 -1
- package/dist/components/sd-modal-container.js +1 -1
- package/dist/components/sd-number-input.js +1 -1
- package/dist/components/sd-pagination.js +1 -1
- package/dist/components/sd-popover.js +1 -1
- package/dist/components/sd-popup.js +1 -1
- package/dist/components/sd-portal.js +1 -1
- package/dist/components/sd-radio-button.js +1 -1
- package/dist/components/sd-radio-group.js +1 -1
- package/dist/components/sd-radio.js +1 -1
- package/dist/components/sd-select-list-item-search.js +1 -1
- package/dist/components/sd-select-list-item.js +1 -1
- package/dist/components/sd-select-listbox.js +1 -1
- package/dist/components/sd-select-trigger.js +1 -1
- package/dist/components/sd-select.js +1 -1
- package/dist/components/sd-switch.js +1 -1
- package/dist/components/sd-tabs.js +1 -1
- package/dist/components/sd-tag.js +1 -1
- package/dist/components/sd-text-link.js +1 -1
- package/dist/components/sd-textarea.js +1 -1
- package/dist/components/sd-toast-container.js +1 -1
- package/dist/components/sd-toast.js +1 -1
- package/dist/components/sd-toggle.js +1 -1
- package/dist/components/sd-tooltip.js +1 -1
- package/dist/design-system/design-system.css +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/{p-fbeed0e4.entry.js → p-02f0b906.entry.js} +1 -1
- package/dist/design-system/{p-4970f1ff.entry.js → p-0c1d1a15.entry.js} +1 -1
- package/dist/design-system/{p-75726e20.entry.js → p-0e014b76.entry.js} +1 -1
- package/dist/design-system/{p-91f7be74.entry.js → p-1b5fcf7b.entry.js} +1 -1
- package/dist/design-system/{p-5687ed0c.entry.js → p-1ed1bfa1.entry.js} +1 -1
- package/dist/design-system/{p-bbd24816.entry.js → p-246aafb9.entry.js} +1 -1
- package/dist/design-system/p-26a27312.entry.js +1 -0
- package/dist/design-system/{p-5c8f4d9c.entry.js → p-2a4d2ee0.entry.js} +1 -1
- package/dist/design-system/{p-b831eded.entry.js → p-2d6a7d7b.entry.js} +1 -1
- package/dist/design-system/{p-2553bb1f.entry.js → p-3595cafb.entry.js} +1 -1
- package/dist/design-system/p-3cd2751a.entry.js +1 -0
- package/dist/design-system/p-4b474538.entry.js +1 -0
- package/dist/design-system/{p-bab692c6.entry.js → p-4c85f6f6.entry.js} +1 -1
- package/dist/design-system/{p-67f19734.entry.js → p-53fe2741.entry.js} +1 -1
- package/dist/design-system/{p-58ec51db.entry.js → p-55c0be7d.entry.js} +1 -1
- package/dist/design-system/p-5a257ed9.entry.js +1 -0
- package/dist/design-system/{p-a938ffee.entry.js → p-840006b1.entry.js} +1 -1
- package/dist/design-system/{p-9c0bca09.entry.js → p-86329ae3.entry.js} +1 -1
- package/dist/design-system/{p-287d8016.entry.js → p-8de3b502.entry.js} +1 -1
- package/dist/design-system/{p-071e73e0.entry.js → p-8ed1d470.entry.js} +1 -1
- package/dist/design-system/{p-D2S9Zafz.js → p-B91K50wC.js} +1 -1
- package/dist/design-system/{p-BqWuC4-J.js → p-BPKiBSGr.js} +1 -1
- package/dist/design-system/p-BhcvMs8c.js +1 -0
- package/dist/design-system/p-Bth2l1cy.js +1 -0
- package/dist/design-system/p-Dz490Ukt.js +2 -0
- package/dist/design-system/{p-d7e302af.entry.js → p-a631cd78.entry.js} +1 -1
- package/dist/design-system/p-adf2f398.entry.js +1 -0
- package/dist/design-system/{p-750a9112.entry.js → p-b585f94b.entry.js} +1 -1
- package/dist/design-system/p-be54fd3a.entry.js +1 -0
- package/dist/design-system/{p-0b8c86c3.entry.js → p-c1066f40.entry.js} +1 -1
- package/dist/design-system/{p-26f2f4c2.entry.js → p-c5cffcc6.entry.js} +1 -1
- package/dist/design-system/{p-3b3a46cd.entry.js → p-c7d2c195.entry.js} +1 -1
- package/dist/design-system/{p-d6b3d78b.entry.js → p-cb6ab65c.entry.js} +1 -1
- package/dist/design-system/{p-1230b51b.entry.js → p-d204cac5.entry.js} +1 -1
- package/dist/design-system/p-d2ce01ac.entry.js +1 -0
- package/dist/design-system/{p-84d0181b.entry.js → p-d51f4170.entry.js} +1 -1
- package/dist/design-system/{p-61f5d5ea.entry.js → p-d9f33192.entry.js} +1 -1
- package/dist/design-system/{p-c5502585.entry.js → p-e7740a5f.entry.js} +1 -1
- package/dist/design-system/p-e85bf462.entry.js +1 -0
- package/dist/design-system/{p-d4e2f412.entry.js → p-ea008087.entry.js} +1 -1
- package/dist/design-system/{p-70608fec.entry.js → p-ec4ad48c.entry.js} +1 -1
- package/dist/design-system/{p-fa967329.entry.js → p-f962e5d2.entry.js} +1 -1
- package/dist/esm/{component.datepicker-laVsm9VM.js → component.datepicker-BOxGhKKP.js} +1 -2
- package/dist/esm/design-system.js +3 -3
- package/dist/esm/{index-DDNBPrZh.js → index-Dz490Ukt.js} +2 -14
- package/dist/esm/loader.js +3 -3
- package/dist/esm/sd-action-modal.entry.js +1 -1
- package/dist/esm/sd-badge.entry.js +1 -1
- package/dist/esm/sd-barcode-input.entry.js +1 -1
- package/dist/esm/sd-button_2.entry.js +1 -1
- package/dist/esm/sd-calendar_2.entry.js +6 -6
- package/dist/esm/sd-callout.entry.js +1 -1
- package/dist/esm/sd-card.entry.js +1 -1
- package/dist/esm/sd-checkbox.entry.js +1 -1
- package/dist/esm/sd-chip-input.entry.js +2 -2
- package/dist/esm/sd-chip.entry.js +1 -1
- package/dist/esm/sd-circle-progress.entry.js +3 -3
- package/dist/esm/sd-confirm-modal_2.entry.js +33 -36
- package/dist/esm/sd-date-box.entry.js +1 -1
- package/dist/esm/{sd-date-picker.config-D-ks6qNf.js → sd-date-picker.config-krRuSUsA.js} +1 -1
- package/dist/esm/{sd-date-picker_7.entry.js → sd-date-picker_8.entry.js} +327 -19
- package/dist/esm/sd-date-range-picker-calendar.entry.js +4 -4
- package/dist/esm/sd-divider.entry.js +3 -3
- package/dist/esm/sd-dropdown-button.entry.js +2 -2
- package/dist/esm/sd-field_3.entry.js +9 -9
- package/dist/esm/sd-form.entry.js +1 -1
- package/dist/esm/sd-ghost-button_3.entry.js +3 -3
- package/dist/esm/sd-guide.entry.js +2 -2
- package/dist/esm/sd-key-value-table.entry.js +87 -17
- package/dist/esm/sd-linear-progress.entry.js +3 -3
- package/dist/esm/sd-loading-container.entry.js +3 -3
- package/dist/esm/sd-modal-container.entry.js +16 -2
- package/dist/esm/sd-pagination.entry.js +171 -0
- package/dist/esm/sd-popover.entry.js +2 -2
- package/dist/esm/sd-popup.entry.js +3 -3
- package/dist/esm/sd-radio-button.entry.js +1 -1
- package/dist/esm/sd-radio.entry.js +1 -1
- package/dist/esm/{sd-select_3.entry.js → sd-select-list-item_4.entry.js} +277 -299
- package/dist/esm/sd-switch.entry.js +2 -2
- package/dist/esm/sd-tabs.entry.js +2 -2
- package/dist/esm/sd-text-link.entry.js +1 -1
- package/dist/esm/sd-toast-container.entry.js +2 -2
- package/dist/esm/sd-toast.entry.js +3 -3
- package/dist/esm/sd-toggle.entry.js +2 -2
- package/dist/esm/{system-BJfiMC9H.js → system-Bth2l1cy.js} +1 -7
- package/dist/esm/{tooltipArrow-blL0aWPE.js → tooltipArrow-CEHVt90h.js} +1 -1
- package/dist/esm/{useDatePicker-DoUg--aq.js → useDatePicker-BG0lUGJG.js} +1 -1
- package/dist/types/components/sd-confirm-modal/sd-confirm-modal.d.ts +10 -10
- package/dist/types/components/sd-key-value-table/sd-key-value-table.config.d.ts +22 -3
- package/dist/types/components/sd-key-value-table/sd-key-value-table.d.ts +9 -1
- package/dist/types/components/sd-modal-container/sd-modal-container.config.d.ts +3 -0
- package/dist/types/components/sd-modal-container/sd-modal-container.d.ts +2 -0
- package/dist/types/components.d.ts +17 -696
- package/dist/types/index.d.ts +0 -1
- package/hydrate/index.js +173 -2217
- package/hydrate/index.mjs +173 -2217
- package/package.json +1 -1
- package/dist/cjs/component.table-POXY492T.js +0 -72
- package/dist/cjs/constants-DJRV1upE.js +0 -5
- package/dist/cjs/sd-pagination_4.cjs.entry.js +0 -858
- package/dist/cjs/sd-select-list-item_2.cjs.entry.js +0 -173
- package/dist/cjs/sd-select.config-omyxekRa.js +0 -144
- package/dist/cjs/sd-table.cjs.entry.js +0 -956
- package/dist/cjs/sd-table.config-DFy_S4bc.js +0 -83
- package/dist/cjs/sd-td.cjs.entry.js +0 -201
- package/dist/collection/components/sd-table/constants.js +0 -1
- package/dist/collection/components/sd-table/sd-table.config.js +0 -88
- package/dist/collection/components/sd-table/sd-table.css +0 -180
- package/dist/collection/components/sd-table/sd-table.js +0 -1709
- package/dist/collection/components/sd-table/sd-table.stories.helpers.js +0 -242
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.css +0 -10
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +0 -110
- package/dist/collection/components/sd-table/sd-td/sd-td.css +0 -15
- package/dist/collection/components/sd-table/sd-td/sd-td.js +0 -381
- package/dist/collection/components/sd-table/sd-thead/sd-thead.css +0 -186
- package/dist/collection/components/sd-table/sd-thead/sd-thead.js +0 -629
- package/dist/collection/components/sd-table/sd-tr/sd-tr.css +0 -145
- package/dist/collection/components/sd-table/sd-tr/sd-tr.js +0 -530
- package/dist/components/p-5pkzwl5N.js +0 -1
- package/dist/components/p-B6ezDhRg.js +0 -1
- package/dist/components/p-BJfiMC9H.js +0 -1
- package/dist/components/p-BSxleKw8.js +0 -1
- package/dist/components/p-BUgGuigd.js +0 -1
- package/dist/components/p-BZXgIBUG.js +0 -1
- package/dist/components/p-Cf62Nvrx.js +0 -1
- package/dist/components/p-DckXBMgo.js +0 -1
- package/dist/components/p-DmAnTwUx.js +0 -1
- package/dist/components/p-PFLrdhQj.js +0 -1
- package/dist/components/p-sZMi_32I.js +0 -1
- package/dist/components/p-yxZBh03f.js +0 -1
- package/dist/components/sd-table.d.ts +0 -11
- package/dist/components/sd-table.js +0 -1
- package/dist/components/sd-tbody.d.ts +0 -11
- package/dist/components/sd-tbody.js +0 -1
- package/dist/components/sd-td.d.ts +0 -11
- package/dist/components/sd-td.js +0 -1
- package/dist/components/sd-thead.d.ts +0 -11
- package/dist/components/sd-thead.js +0 -1
- package/dist/components/sd-tr.d.ts +0 -11
- package/dist/components/sd-tr.js +0 -1
- package/dist/design-system/p-0048de73.entry.js +0 -1
- package/dist/design-system/p-20f69606.entry.js +0 -1
- package/dist/design-system/p-27197194.entry.js +0 -1
- package/dist/design-system/p-5pkzwl5N.js +0 -1
- package/dist/design-system/p-7abf62f3.entry.js +0 -1
- package/dist/design-system/p-7ae27a26.entry.js +0 -1
- package/dist/design-system/p-94d6b7b4.entry.js +0 -1
- package/dist/design-system/p-9b21773a.entry.js +0 -1
- package/dist/design-system/p-BJfiMC9H.js +0 -1
- package/dist/design-system/p-CRWmn35N.js +0 -1
- package/dist/design-system/p-Cf62Nvrx.js +0 -1
- package/dist/design-system/p-CuAh9n2o.js +0 -1
- package/dist/design-system/p-DDNBPrZh.js +0 -2
- package/dist/design-system/p-a12d7362.entry.js +0 -1
- package/dist/design-system/p-c81898a0.entry.js +0 -1
- package/dist/design-system/p-dbfa3931.entry.js +0 -1
- package/dist/design-system/p-f16985c9.entry.js +0 -1
- package/dist/design-system/p-sZMi_32I.js +0 -1
- package/dist/esm/component.table-5pkzwl5N.js +0 -70
- package/dist/esm/constants-sZMi_32I.js +0 -3
- package/dist/esm/sd-pagination_4.entry.js +0 -853
- package/dist/esm/sd-select-list-item_2.entry.js +0 -170
- package/dist/esm/sd-select.config-CeHGlqOT.js +0 -129
- package/dist/esm/sd-table.config-DmOBlnsM.js +0 -70
- package/dist/esm/sd-table.entry.js +0 -954
- package/dist/esm/sd-td.entry.js +0 -199
- package/dist/types/components/sd-table/constants.d.ts +0 -50
- package/dist/types/components/sd-table/sd-table.config.d.ts +0 -71
- package/dist/types/components/sd-table/sd-table.d.ts +0 -199
- package/dist/types/components/sd-table/sd-table.stories.helpers.d.ts +0 -39
- package/dist/types/components/sd-table/sd-tbody/sd-tbody.d.ts +0 -15
- package/dist/types/components/sd-table/sd-td/sd-td.d.ts +0 -38
- package/dist/types/components/sd-table/sd-thead/sd-thead.d.ts +0 -62
- package/dist/types/components/sd-table/sd-tr/sd-tr.d.ts +0 -54
- /package/dist/components/{p-laVsm9VM.js → p-BOxGhKKP.js} +0 -0
- /package/dist/design-system/{p-laVsm9VM.js → p-BOxGhKKP.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as a,c as d,h as n,t as r}from"./p-PFLrdhQj.js";import{u as t,t as l,W as s,C as c}from"./p-BysikR_g.js";import{d as i}from"./p-DckXBMgo.js";import{d as o}from"./p-BKV1WAFb.js";import{d as h}from"./p-BuADVB78.js";import{d as g}from"./p-CSh-DcM7.js";const p=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.update=d(this,"sdUpdate",7),this.viewChange=d(this,"sdViewChange",7)}value=null;selectable;events;elevated=!1;currentYear;currentMonth;update;viewChange;dateUtil=t();_eventMapCache;get eventMap(){const e=this._eventMapCache;if(e&&e.src===this.events)return e.map;const a=new Map;return(this.events??[]).forEach((e=>e.dates.forEach((d=>{const n=a.get(d)??[];n.push({color:e.color,label:e.label}),a.set(d,n)})))),this._eventMapCache={src:this.events,map:a},a}get legendItems(){const e=new Set,a=[];return(this.events??[]).forEach((d=>{const n=`${d.color}|${d.label}`;e.has(n)||(e.add(n),a.push({color:d.color,label:d.label}))})),a}componentWillLoad(){this.syncViewFromValue()}handleValueChange(){this.syncViewFromValue()}syncViewFromValue(){const e=this.value||l,[a,d]=e.split("-").map(Number);this.currentYear=a,this.currentMonth=d}formatDate(e,a,d){return`${e}-${String(a).padStart(2,"0")}-${String(d).padStart(2,"0")}`}get cells(){const e=this.currentYear,a=this.currentMonth,d=new Date(e,a-1,1).getDay(),n=new Date(e,a,0).getDate(),r=1===a?12:a-1,t=1===a?e-1:e,l=new Date(t,r,0).getDate(),s=12===a?1:a+1,c=12===a?e+1:e,i=[];for(let e=d-1;e>=0;e--){const a=l-e;i.push({date:this.formatDate(t,r,a),day:a,inCurrentMonth:!1})}for(let d=1;d<=n;d++)i.push({date:this.formatDate(e,a,d),day:d,inCurrentMonth:!0});const o=(7-i.length%7)%7;for(let e=1;e<=o;e++)i.push({date:this.formatDate(c,s,e),day:e,inCurrentMonth:!1});return i}emitViewChange(){this.viewChange.emit({year:this.currentYear,month:this.currentMonth})}goPrevYear=e=>{e.stopPropagation(),this.currentYear-=1,this.emitViewChange()};goNextYear=e=>{e.stopPropagation(),this.currentYear+=1,this.emitViewChange()};goPrevMonth=e=>{e.stopPropagation();const{newYear:a,newMonth:d}=this.dateUtil.calculateYearMonth(this.currentYear,this.currentMonth,"prev");this.currentYear=a,this.currentMonth=d,this.emitViewChange()};goNextMonth=e=>{e.stopPropagation();const{newYear:a,newMonth:d}=this.dateUtil.calculateYearMonth(this.currentYear,this.currentMonth,"next");this.currentYear=a,this.currentMonth=d,this.emitViewChange()};isDisabled(e){if(!this.selectable)return!1;const[a,d]=this.selectable;return""!==a&&e<a||""!==d&&e>d}handleDayClick(e){this.isDisabled(e.date)||(this.value=e.date,this.update.emit(e.date))}render(){const e={"--calendar-bg":c.bg,"--calendar-padding":`${c.paddingXY}px`,"--calendar-gap":`${c.gap}px`,"--calendar-radius":`${c.radius}px`,"--calendar-header-gap":`${c.header.gap}px`,"--calendar-header-divider":c.header.divider,"--calendar-header-font-size":`${c.header.fontSize}px`,"--calendar-header-line-height":`${c.header.lineHeight}px`,"--calendar-header-font-weight":c.header.fontWeight,"--calendar-week-font-size":`${c.week.fontSize}px`,"--calendar-week-line-height":`${c.week.lineHeight}px`,"--calendar-week-font-weight":c.week.fontWeight,"--calendar-week-color":c.week.color,"--calendar-grid-row-gap":`${c.grid.rowGap}px`,"--calendar-day-size":`${c.day.size}px`,"--calendar-day-circle-size":`${c.day.circleSize}px`,"--calendar-day-circle-radius":`${c.day.circleRadius}px`,"--calendar-day-text":c.day.defaultText,"--calendar-day-hover-text":c.day.hoverText,"--calendar-day-hover-border":c.day.hoverBorder,"--calendar-day-select-bg":c.day.selectBg,"--calendar-day-select-text":c.day.selectText,"--calendar-day-disabled-text":c.day.disabledText,"--calendar-day-font-size":`${c.day.fontSize}px`,"--calendar-day-line-height":`${c.day.lineHeight}px`,"--calendar-day-font-weight":c.day.fontWeight,"--calendar-day-bold-font-weight":c.day.boldFontWeight,"--calendar-day-dot-size":`${c.day.dot.size}px`,"--calendar-day-dot-gap":`${c.day.dot.gap}px`,"--calendar-day-dot-padding-y":`${c.day.dot.paddingY}px`,"--calendar-legend-font-size":`${c.legend.fontSize}px`,"--calendar-legend-line-height":`${c.legend.lineHeight}px`,"--calendar-legend-font-weight":c.legend.fontWeight,"--calendar-legend-gap":`${c.legend.gap}px`,"--calendar-legend-group-gap":`${c.legend.groupGap}px`},a=this.eventMap,d=this.legendItems,r=(this.events?.length??0)>0;return n("div",{key:"317beb7cdffbba8982306539441fec46e6330d82",class:{"sd-calendar":!0,"sd-calendar--elevated":this.elevated},style:e},n("div",{key:"0d9e1084ee0bff994b4a00b7f2d490c0e101aa16",class:"sd-calendar__header"},n("div",{key:"8d82438f1820721fcbcd14cf42c1ae00b3a517d9",class:"sd-calendar__nav-group"},n("sd-ghost-button",{key:"4e3391c57c0fdf3ad95b82d82c7a130c3202229d",ariaLabel:"prevYear",size:"xxs",icon:"chevronLeft",onClick:this.goPrevYear}),n("span",{key:"6a7cbfb0069dd1d29e195cc09a9c55a8ae52aa40",class:"sd-calendar__label"},this.currentYear),n("sd-ghost-button",{key:"239d5e623f830e8ceeb069e78126175772af48de",ariaLabel:"nextYear",size:"xxs",icon:"chevronRight",onClick:this.goNextYear})),n("span",{key:"24362199d36afc204eebe5c5f14a41705f6782d9",class:"sd-calendar__divider","aria-hidden":"true"}),n("div",{key:"7aa04fa1fbb355d8b3fae4cca011999b4f7f5850",class:"sd-calendar__nav-group sd-calendar__nav-group-month"},n("sd-ghost-button",{key:"ea5d0129d4f7eecaeff5793460363e2f15c238b8",ariaLabel:"prevMonth",size:"xxs",icon:"chevronLeft",onClick:this.goPrevMonth}),n("span",{key:"7a3879edb74cb71c46fc500d7c230c21e19042c4",class:"sd-calendar__label sd-calendar__label-month"},this.currentMonth,"월"),n("sd-ghost-button",{key:"7532053f6607d9e4940403f22fd32994128fc457",ariaLabel:"nextMonth",size:"xxs",icon:"chevronRight",onClick:this.goNextMonth}))),n("div",{key:"ef59638defed69c325e49fc71ca0cc73a7d778bf",class:"sd-calendar__week"},s.map((e=>n("span",{key:e,class:"sd-calendar__week-cell"},e)))),n("div",{key:"0205b10254c75567336bc7e4ed8a26d2227ecb33",class:"sd-calendar__grid"},this.cells.map((e=>{const d=e.inCurrentMonth&&""!==this.value&&this.value===e.date,t=e.inCurrentMonth&&l===e.date,s=e.inCurrentMonth&&this.isDisabled(e.date),c=e.inCurrentMonth?a.get(e.date):void 0;return n("button",{type:"button",key:e.date,class:{"sd-calendar__day":!0,"sd-calendar__day--empty":!e.inCurrentMonth,"sd-calendar__day--today":t,"sd-calendar__day--selected":d,"sd-calendar__day--disabled":s},disabled:!e.inCurrentMonth||s,tabindex:e.inCurrentMonth?void 0:-1,"aria-hidden":e.inCurrentMonth?void 0:"true",onClick:()=>e.inCurrentMonth&&this.handleDayClick(e)},n("span",{class:"sd-calendar__day-circle"},e.inCurrentMonth?e.day:""),r&&n("span",{class:"sd-calendar__dot-row","aria-hidden":"true"},c?.map(((e,a)=>n("span",{key:`${e.color}|${e.label}|${a}`,class:"sd-calendar__dot",style:{backgroundColor:e.color}})))))}))),d.length>0&&[n("span",{key:"a06b1cd9ec93891e3762f6334949cd23b643290f",class:"sd-calendar__divider-bottom","aria-hidden":"true"}),n("div",{key:"8dc6bd2495ab471b56ed6fa252c9e0ad5ebe8341",class:"sd-calendar__legend"},d.map((e=>n("span",{key:`${e.color}|${e.label}`,class:"sd-calendar__legend-item"},n("span",{class:"sd-calendar__legend-dot",style:{backgroundColor:e.color},"aria-hidden":"true"}),n("span",{class:"sd-calendar__legend-label"},e.label)))))])}static get watchers(){return{value:[{handleValueChange:0}]}}static get style(){return"sd-calendar{display:block}sd-calendar .sd-calendar{display:flex;flex-direction:column;gap:var(--calendar-gap);width:328px;min-height:328px;padding:var(--calendar-padding);background:var(--calendar-bg);border-radius:var(--calendar-radius);user-select:none}sd-calendar .sd-calendar--elevated{box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.2)}sd-calendar .sd-calendar__header{display:flex;align-items:center;justify-content:center;gap:var(--calendar-header-gap);font-size:var(--calendar-header-font-size);line-height:var(--calendar-header-line-height);font-weight:var(--calendar-header-font-weight);color:var(--calendar-day-text)}sd-calendar .sd-calendar__nav-group{display:inline-flex;align-items:center;gap:var(--calendar-gap)}sd-calendar .sd-calendar__nav-group-month{width:100%}sd-calendar .sd-calendar__label{display:inline-flex;align-items:center;justify-content:center;min-width:40px;text-align:center}sd-calendar .sd-calendar__label-month{width:100%}sd-calendar .sd-calendar__divider{display:inline-block;width:1px;height:16px;background:var(--calendar-header-divider)}sd-calendar .sd-calendar__week{display:grid;grid-template-columns:repeat(7, var(--calendar-day-size))}sd-calendar .sd-calendar__week-cell{display:inline-flex;align-items:center;justify-content:center;height:20px;font-size:var(--calendar-week-font-size);line-height:var(--calendar-week-line-height);font-weight:var(--calendar-week-font-weight);color:var(--calendar-week-color)}sd-calendar .sd-calendar__grid{display:grid;grid-template-columns:repeat(7, var(--calendar-day-size));row-gap:var(--calendar-grid-row-gap)}sd-calendar .sd-calendar__day{display:inline-flex;flex-direction:column;align-items:center;justify-content:flex-start;width:var(--calendar-day-size);min-height:var(--calendar-day-circle-size);padding:0;border:none;background:transparent;cursor:pointer;font-size:var(--calendar-day-font-size);line-height:var(--calendar-day-line-height);font-weight:var(--calendar-day-font-weight);color:var(--calendar-day-text)}sd-calendar .sd-calendar__day-circle{display:inline-flex;align-items:center;justify-content:center;width:var(--calendar-day-circle-size);height:var(--calendar-day-circle-size);border-radius:calc(var(--calendar-day-circle-radius) * 1px);border:1px solid transparent;box-sizing:border-box}sd-calendar .sd-calendar__day:not(:disabled):hover .sd-calendar__day-circle{border-radius:16px;border:1px solid var(--calendar-day-hover-border)}sd-calendar .sd-calendar__day--today .sd-calendar__day-circle{font-weight:700}sd-calendar .sd-calendar__day--selected .sd-calendar__day-circle{border-radius:16px;background:var(--calendar-day-select-bg);color:var(--calendar-day-select-text)}sd-calendar .sd-calendar__day--selected:not(:disabled):hover .sd-calendar__day-circle{background:var(--calendar-day-select-bg);color:var(--calendar-day-select-text)}sd-calendar .sd-calendar__day--disabled{color:var(--calendar-day-disabled-text);background:none !important;cursor:not-allowed}sd-calendar .sd-calendar__day--empty{visibility:hidden;pointer-events:none}sd-calendar .sd-calendar__dot-row{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--calendar-day-dot-gap);box-sizing:border-box;width:100%;min-height:14px;padding-top:var(--calendar-day-dot-padding-y);padding-bottom:var(--calendar-day-dot-padding-y)}sd-calendar .sd-calendar__dot{display:inline-block;width:var(--calendar-day-dot-size);height:var(--calendar-day-dot-size);border-radius:50%}sd-calendar .sd-calendar__divider-bottom{display:block;width:100%;height:1px;background:var(--calendar-header-divider)}sd-calendar .sd-calendar__legend{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;column-gap:var(--calendar-legend-group-gap);row-gap:4px;font-size:var(--calendar-legend-font-size);line-height:var(--calendar-legend-line-height);font-weight:var(--calendar-legend-font-weight);color:var(--calendar-day-text)}sd-calendar .sd-calendar__legend-item{display:inline-flex;align-items:center;gap:var(--calendar-legend-gap)}sd-calendar .sd-calendar__legend-dot{display:inline-block;width:var(--calendar-day-dot-size);height:var(--calendar-day-dot-size);border-radius:50%;flex-shrink:0}sd-calendar .sd-calendar__legend-label{display:inline-block}"}},[512,"sd-calendar",{value:[1025],selectable:[16],events:[16],elevated:[4],currentYear:[32],currentMonth:[32]},void 0,{value:[{handleValueChange:0}]}]);function y(){"undefined"!=typeof customElements&&["sd-calendar","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((e=>{switch(e){case"sd-calendar":customElements.get(r(e))||customElements.define(r(e),p);break;case"sd-ghost-button":customElements.get(r(e))||i();break;case"sd-icon":customElements.get(r(e))||o();break;case"sd-portal":customElements.get(r(e))||h();break;case"sd-tag":customElements.get(r(e))||g()}}))}export{p as S,y as d}
|
|
1
|
+
import{p as e,H as a,c as d,h as n,t as r}from"./p-Uh9emYrV.js";import{u as t,t as l,W as s,C as c}from"./p-Bpv90tfa.js";import{d as i}from"./p-BFVfSW9t.js";import{d as o}from"./p-Di1q4f5E.js";import{d as h}from"./p-BHjezpAC.js";import{d as g}from"./p-f0aBxUBG.js";const p=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.update=d(this,"sdUpdate",7),this.viewChange=d(this,"sdViewChange",7)}value=null;selectable;events;elevated=!1;currentYear;currentMonth;update;viewChange;dateUtil=t();_eventMapCache;get eventMap(){const e=this._eventMapCache;if(e&&e.src===this.events)return e.map;const a=new Map;return(this.events??[]).forEach((e=>e.dates.forEach((d=>{const n=a.get(d)??[];n.push({color:e.color,label:e.label}),a.set(d,n)})))),this._eventMapCache={src:this.events,map:a},a}get legendItems(){const e=new Set,a=[];return(this.events??[]).forEach((d=>{const n=`${d.color}|${d.label}`;e.has(n)||(e.add(n),a.push({color:d.color,label:d.label}))})),a}componentWillLoad(){this.syncViewFromValue()}handleValueChange(){this.syncViewFromValue()}syncViewFromValue(){const e=this.value||l,[a,d]=e.split("-").map(Number);this.currentYear=a,this.currentMonth=d}formatDate(e,a,d){return`${e}-${String(a).padStart(2,"0")}-${String(d).padStart(2,"0")}`}get cells(){const e=this.currentYear,a=this.currentMonth,d=new Date(e,a-1,1).getDay(),n=new Date(e,a,0).getDate(),r=1===a?12:a-1,t=1===a?e-1:e,l=new Date(t,r,0).getDate(),s=12===a?1:a+1,c=12===a?e+1:e,i=[];for(let e=d-1;e>=0;e--){const a=l-e;i.push({date:this.formatDate(t,r,a),day:a,inCurrentMonth:!1})}for(let d=1;d<=n;d++)i.push({date:this.formatDate(e,a,d),day:d,inCurrentMonth:!0});const o=(7-i.length%7)%7;for(let e=1;e<=o;e++)i.push({date:this.formatDate(c,s,e),day:e,inCurrentMonth:!1});return i}emitViewChange(){this.viewChange.emit({year:this.currentYear,month:this.currentMonth})}goPrevYear=e=>{e.stopPropagation(),this.currentYear-=1,this.emitViewChange()};goNextYear=e=>{e.stopPropagation(),this.currentYear+=1,this.emitViewChange()};goPrevMonth=e=>{e.stopPropagation();const{newYear:a,newMonth:d}=this.dateUtil.calculateYearMonth(this.currentYear,this.currentMonth,"prev");this.currentYear=a,this.currentMonth=d,this.emitViewChange()};goNextMonth=e=>{e.stopPropagation();const{newYear:a,newMonth:d}=this.dateUtil.calculateYearMonth(this.currentYear,this.currentMonth,"next");this.currentYear=a,this.currentMonth=d,this.emitViewChange()};isDisabled(e){if(!this.selectable)return!1;const[a,d]=this.selectable;return""!==a&&e<a||""!==d&&e>d}handleDayClick(e){this.isDisabled(e.date)||(this.value=e.date,this.update.emit(e.date))}render(){const e={"--calendar-bg":c.bg,"--calendar-padding":`${c.paddingXY}px`,"--calendar-gap":`${c.gap}px`,"--calendar-radius":`${c.radius}px`,"--calendar-header-gap":`${c.header.gap}px`,"--calendar-header-divider":c.header.divider,"--calendar-header-font-size":`${c.header.fontSize}px`,"--calendar-header-line-height":`${c.header.lineHeight}px`,"--calendar-header-font-weight":c.header.fontWeight,"--calendar-week-font-size":`${c.week.fontSize}px`,"--calendar-week-line-height":`${c.week.lineHeight}px`,"--calendar-week-font-weight":c.week.fontWeight,"--calendar-week-color":c.week.color,"--calendar-grid-row-gap":`${c.grid.rowGap}px`,"--calendar-day-size":`${c.day.size}px`,"--calendar-day-circle-size":`${c.day.circleSize}px`,"--calendar-day-circle-radius":`${c.day.circleRadius}px`,"--calendar-day-text":c.day.defaultText,"--calendar-day-hover-text":c.day.hoverText,"--calendar-day-hover-border":c.day.hoverBorder,"--calendar-day-select-bg":c.day.selectBg,"--calendar-day-select-text":c.day.selectText,"--calendar-day-disabled-text":c.day.disabledText,"--calendar-day-font-size":`${c.day.fontSize}px`,"--calendar-day-line-height":`${c.day.lineHeight}px`,"--calendar-day-font-weight":c.day.fontWeight,"--calendar-day-bold-font-weight":c.day.boldFontWeight,"--calendar-day-dot-size":`${c.day.dot.size}px`,"--calendar-day-dot-gap":`${c.day.dot.gap}px`,"--calendar-day-dot-padding-y":`${c.day.dot.paddingY}px`,"--calendar-legend-font-size":`${c.legend.fontSize}px`,"--calendar-legend-line-height":`${c.legend.lineHeight}px`,"--calendar-legend-font-weight":c.legend.fontWeight,"--calendar-legend-gap":`${c.legend.gap}px`,"--calendar-legend-group-gap":`${c.legend.groupGap}px`},a=this.eventMap,d=this.legendItems,r=(this.events?.length??0)>0;return n("div",{key:"317beb7cdffbba8982306539441fec46e6330d82",class:{"sd-calendar":!0,"sd-calendar--elevated":this.elevated},style:e},n("div",{key:"0d9e1084ee0bff994b4a00b7f2d490c0e101aa16",class:"sd-calendar__header"},n("div",{key:"8d82438f1820721fcbcd14cf42c1ae00b3a517d9",class:"sd-calendar__nav-group"},n("sd-ghost-button",{key:"4e3391c57c0fdf3ad95b82d82c7a130c3202229d",ariaLabel:"prevYear",size:"xxs",icon:"chevronLeft",onClick:this.goPrevYear}),n("span",{key:"6a7cbfb0069dd1d29e195cc09a9c55a8ae52aa40",class:"sd-calendar__label"},this.currentYear),n("sd-ghost-button",{key:"239d5e623f830e8ceeb069e78126175772af48de",ariaLabel:"nextYear",size:"xxs",icon:"chevronRight",onClick:this.goNextYear})),n("span",{key:"24362199d36afc204eebe5c5f14a41705f6782d9",class:"sd-calendar__divider","aria-hidden":"true"}),n("div",{key:"7aa04fa1fbb355d8b3fae4cca011999b4f7f5850",class:"sd-calendar__nav-group sd-calendar__nav-group-month"},n("sd-ghost-button",{key:"ea5d0129d4f7eecaeff5793460363e2f15c238b8",ariaLabel:"prevMonth",size:"xxs",icon:"chevronLeft",onClick:this.goPrevMonth}),n("span",{key:"7a3879edb74cb71c46fc500d7c230c21e19042c4",class:"sd-calendar__label sd-calendar__label-month"},this.currentMonth,"월"),n("sd-ghost-button",{key:"7532053f6607d9e4940403f22fd32994128fc457",ariaLabel:"nextMonth",size:"xxs",icon:"chevronRight",onClick:this.goNextMonth}))),n("div",{key:"ef59638defed69c325e49fc71ca0cc73a7d778bf",class:"sd-calendar__week"},s.map((e=>n("span",{key:e,class:"sd-calendar__week-cell"},e)))),n("div",{key:"0205b10254c75567336bc7e4ed8a26d2227ecb33",class:"sd-calendar__grid"},this.cells.map((e=>{const d=e.inCurrentMonth&&""!==this.value&&this.value===e.date,t=e.inCurrentMonth&&l===e.date,s=e.inCurrentMonth&&this.isDisabled(e.date),c=e.inCurrentMonth?a.get(e.date):void 0;return n("button",{type:"button",key:e.date,class:{"sd-calendar__day":!0,"sd-calendar__day--empty":!e.inCurrentMonth,"sd-calendar__day--today":t,"sd-calendar__day--selected":d,"sd-calendar__day--disabled":s},disabled:!e.inCurrentMonth||s,tabindex:e.inCurrentMonth?void 0:-1,"aria-hidden":e.inCurrentMonth?void 0:"true",onClick:()=>e.inCurrentMonth&&this.handleDayClick(e)},n("span",{class:"sd-calendar__day-circle"},e.inCurrentMonth?e.day:""),r&&n("span",{class:"sd-calendar__dot-row","aria-hidden":"true"},c?.map(((e,a)=>n("span",{key:`${e.color}|${e.label}|${a}`,class:"sd-calendar__dot",style:{backgroundColor:e.color}})))))}))),d.length>0&&[n("span",{key:"a06b1cd9ec93891e3762f6334949cd23b643290f",class:"sd-calendar__divider-bottom","aria-hidden":"true"}),n("div",{key:"8dc6bd2495ab471b56ed6fa252c9e0ad5ebe8341",class:"sd-calendar__legend"},d.map((e=>n("span",{key:`${e.color}|${e.label}`,class:"sd-calendar__legend-item"},n("span",{class:"sd-calendar__legend-dot",style:{backgroundColor:e.color},"aria-hidden":"true"}),n("span",{class:"sd-calendar__legend-label"},e.label)))))])}static get watchers(){return{value:[{handleValueChange:0}]}}static get style(){return"sd-calendar{display:block}sd-calendar .sd-calendar{display:flex;flex-direction:column;gap:var(--calendar-gap);width:328px;min-height:328px;padding:var(--calendar-padding);background:var(--calendar-bg);border-radius:var(--calendar-radius);user-select:none}sd-calendar .sd-calendar--elevated{box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.2)}sd-calendar .sd-calendar__header{display:flex;align-items:center;justify-content:center;gap:var(--calendar-header-gap);font-size:var(--calendar-header-font-size);line-height:var(--calendar-header-line-height);font-weight:var(--calendar-header-font-weight);color:var(--calendar-day-text)}sd-calendar .sd-calendar__nav-group{display:inline-flex;align-items:center;gap:var(--calendar-gap)}sd-calendar .sd-calendar__nav-group-month{width:100%}sd-calendar .sd-calendar__label{display:inline-flex;align-items:center;justify-content:center;min-width:40px;text-align:center}sd-calendar .sd-calendar__label-month{width:100%}sd-calendar .sd-calendar__divider{display:inline-block;width:1px;height:16px;background:var(--calendar-header-divider)}sd-calendar .sd-calendar__week{display:grid;grid-template-columns:repeat(7, var(--calendar-day-size))}sd-calendar .sd-calendar__week-cell{display:inline-flex;align-items:center;justify-content:center;height:20px;font-size:var(--calendar-week-font-size);line-height:var(--calendar-week-line-height);font-weight:var(--calendar-week-font-weight);color:var(--calendar-week-color)}sd-calendar .sd-calendar__grid{display:grid;grid-template-columns:repeat(7, var(--calendar-day-size));row-gap:var(--calendar-grid-row-gap)}sd-calendar .sd-calendar__day{display:inline-flex;flex-direction:column;align-items:center;justify-content:flex-start;width:var(--calendar-day-size);min-height:var(--calendar-day-circle-size);padding:0;border:none;background:transparent;cursor:pointer;font-size:var(--calendar-day-font-size);line-height:var(--calendar-day-line-height);font-weight:var(--calendar-day-font-weight);color:var(--calendar-day-text)}sd-calendar .sd-calendar__day-circle{display:inline-flex;align-items:center;justify-content:center;width:var(--calendar-day-circle-size);height:var(--calendar-day-circle-size);border-radius:calc(var(--calendar-day-circle-radius) * 1px);border:1px solid transparent;box-sizing:border-box}sd-calendar .sd-calendar__day:not(:disabled):hover .sd-calendar__day-circle{border-radius:16px;border:1px solid var(--calendar-day-hover-border)}sd-calendar .sd-calendar__day--today .sd-calendar__day-circle{font-weight:700}sd-calendar .sd-calendar__day--selected .sd-calendar__day-circle{border-radius:16px;background:var(--calendar-day-select-bg);color:var(--calendar-day-select-text)}sd-calendar .sd-calendar__day--selected:not(:disabled):hover .sd-calendar__day-circle{background:var(--calendar-day-select-bg);color:var(--calendar-day-select-text)}sd-calendar .sd-calendar__day--disabled{color:var(--calendar-day-disabled-text);background:none !important;cursor:not-allowed}sd-calendar .sd-calendar__day--empty{visibility:hidden;pointer-events:none}sd-calendar .sd-calendar__dot-row{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--calendar-day-dot-gap);box-sizing:border-box;width:100%;min-height:14px;padding-top:var(--calendar-day-dot-padding-y);padding-bottom:var(--calendar-day-dot-padding-y)}sd-calendar .sd-calendar__dot{display:inline-block;width:var(--calendar-day-dot-size);height:var(--calendar-day-dot-size);border-radius:50%}sd-calendar .sd-calendar__divider-bottom{display:block;width:100%;height:1px;background:var(--calendar-header-divider)}sd-calendar .sd-calendar__legend{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;column-gap:var(--calendar-legend-group-gap);row-gap:4px;font-size:var(--calendar-legend-font-size);line-height:var(--calendar-legend-line-height);font-weight:var(--calendar-legend-font-weight);color:var(--calendar-day-text)}sd-calendar .sd-calendar__legend-item{display:inline-flex;align-items:center;gap:var(--calendar-legend-gap)}sd-calendar .sd-calendar__legend-dot{display:inline-block;width:var(--calendar-day-dot-size);height:var(--calendar-day-dot-size);border-radius:50%;flex-shrink:0}sd-calendar .sd-calendar__legend-label{display:inline-block}"}},[512,"sd-calendar",{value:[1025],selectable:[16],events:[16],elevated:[4],currentYear:[32],currentMonth:[32]},void 0,{value:[{handleValueChange:0}]}]);function y(){"undefined"!=typeof customElements&&["sd-calendar","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((e=>{switch(e){case"sd-calendar":customElements.get(r(e))||customElements.define(r(e),p);break;case"sd-ghost-button":customElements.get(r(e))||i();break;case"sd-icon":customElements.get(r(e))||o();break;case"sd-portal":customElements.get(r(e))||h();break;case"sd-tag":customElements.get(r(e))||g()}}))}export{p as S,y as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as e,c as s,h as o,t as i}from"./p-Uh9emYrV.js";import{d as n}from"./p-Di1q4f5E.js";import{d as a}from"./p-BHjezpAC.js";import{d as r}from"./p-f0aBxUBG.js";var d={size:"16",icon:"12"},b={size:"24",icon:"16"},c={size:"28",icon:"20"},h={size:"36",icon:"24"},u={size:"62",icon:"32"},l={sm:"4",md:"6"},g={opacity:"5%"},m={disabled:"#BBBBBB"},p={content:"#888888",hover:{bg:"#222222"}},f={content:"#E30000",hover:{bg:"#E30000"}},v={content:"#025497",hover:{bg:"#0075FF"}},x={content:"#FFFFFF",disabled:"#E1E1E1",hover:{bg:"#FFFFFF"}};const y={xxs:{size:Number(d.size),icon:Number(d.icon)},xs:{size:Number(b.size),icon:Number(b.icon)},sm:{size:Number(c.size),icon:Number(c.icon)},md:{size:Number(h.size),icon:Number(h.icon)},lg:{size:Number(u.size),icon:Number(u.icon)}},z={xxs:Number(l.sm),xs:Number(l.sm),sm:Number(l.sm),md:Number(l.md),lg:Number(l.md)},F=g.opacity,k={default:p.content,danger:f.content,action:v.content,inverse:x.content},E={default:p.hover.bg,danger:f.hover.bg,action:v.hover.bg,inverse:x.hover.bg},N=m.disabled,B={default:N,danger:N,action:N,inverse:x.disabled},w=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.click=s(this,"sdClick",7)}icon;size="sm";intent="default";ariaLabel="";tooltipText;disabled=!1;get hostEl(){return this}isTooltipOpen=!1;click;hasWarnedMissingAriaLabel=!1;componentWillLoad(){this.size??="sm",this.intent??="default",this.ariaLabel??=""}handleClick=t=>{this.disabled?t.preventDefault():this.click.emit(t)};handleMouseEnter=()=>{this.isTooltipOpen=!0};handleMouseLeave=()=>{this.isTooltipOpen=!1};handleFocus=()=>{this.isTooltipOpen=!0};handleBlur=()=>{this.isTooltipOpen=!1};componentWillRender(){this.warnIfMissingAriaLabel()}warnIfMissingAriaLabel(){""===(this.ariaLabel??"").trim()?this.hasWarnedMissingAriaLabel||(console.warn(`[sd-ghost-button] icon-only buttons require \`ariaLabel\`. Received icon="${this.icon}".`),this.hasWarnedMissingAriaLabel=!0):this.hasWarnedMissingAriaLabel=!1}render(){const t=this.size??"sm",e=this.intent??"default",s=y[t]??y.sm,i=this.disabled?B[e]:k[e],n=(this.ariaLabel??"").trim()||void 0,a=(this.tooltipText??"").trim();return o("button",{key:"9d2d352d36c7c34c67d8c57de6236d72727bd078",class:{"sd-ghost-button":!0,"sd-ghost-button--disabled":this.disabled},type:"button","aria-disabled":this.disabled?"true":void 0,tabIndex:this.disabled?-1:void 0,"aria-label":n,style:{"--sd-ghost-button-size":`${s.size}px`,"--sd-ghost-button-radius":`${z[t]}px`,"--sd-ghost-button-hover-bg":E[e],"--sd-ghost-button-hover-opacity":F,"--sd-ghost-button-accent":"#0075FF"},onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur},a.length>0&&this.isTooltipOpen&&o("sd-portal",{key:"1a73fb53be28a622d03e4f20be0b30e0e76bccd4",parentRef:this.hostEl,open:!0,offset:[s.size/2,4],placement:"top"},o("div",{key:"e4a349dbfbf2fd16eed9a46f5e2ed43935212cfe",class:"sd-ghost-button__tooltip-inner","aria-hidden":"true"},o("sd-tag",{key:"4aa1525a6da6ee72daf1815f1440d665bd1cf2c8",name:"square_xs_grey",label:a}))),o("sd-icon",{key:"4caac22d0d888c1998032697043e3a3761e012aa",name:this.icon,size:s.icon,color:i}))}static get style(){return'sd-ghost-button{display:inline-flex;width:fit-content;height:fit-content}.sd-ghost-button{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--sd-ghost-button-size);height:var(--sd-ghost-button-size);padding:0;border:none;border-radius:var(--sd-ghost-button-radius);background:transparent;cursor:pointer;box-sizing:border-box;transition:box-shadow 0.2s ease;-webkit-user-select:none;user-select:none}.sd-ghost-button::before{content:"";position:absolute;inset:0;border-radius:inherit;background:var(--sd-ghost-button-hover-bg);opacity:0;transition:opacity 0.2s ease;pointer-events:none}.sd-ghost-button:hover:not(.sd-ghost-button--disabled)::before{opacity:var(--sd-ghost-button-hover-opacity)}.sd-ghost-button:focus-visible{outline:0;box-shadow:0 0 0 2px var(--sd-ghost-button-accent)}.sd-ghost-button--disabled{cursor:not-allowed}.sd-ghost-button__tooltip-inner{display:inline-flex;white-space:nowrap;transform:translateX(-50%)}[data-align=right] .sd-ghost-button__tooltip-inner{transform:none}'}},[512,"sd-ghost-button",{icon:[1],size:[1],intent:[1],ariaLabel:[1,"aria-label"],tooltipText:[1,"tooltip-text"],disabled:[4],isTooltipOpen:[32]}]);function L(){"undefined"!=typeof customElements&&["sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((t=>{switch(t){case"sd-ghost-button":customElements.get(i(t))||customElements.define(i(t),w);break;case"sd-icon":customElements.get(i(t))||n();break;case"sd-portal":customElements.get(i(t))||a();break;case"sd-tag":customElements.get(i(t))||r()}}))}export{w as S,L as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as s,c as e,h as i,t as o}from"./p-
|
|
1
|
+
import{p as t,H as s,c as e,h as i,t as o}from"./p-Uh9emYrV.js";const h=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.close=e(this,"sdClose",3)}get hostEl(){return this}to="body";parentRef=null;offset=[0,4];viewportPadding=0;zIndex=996;open=!1;placement="bottom";close;container;wrapper;rafId;isInsideClick=!1;closeTransitionTimer;handleObservedScroll=()=>this.updatePosition();resizeObserver;mutationObserver;scrollParents=[];isObserved=!1;handleOpenChange(){this.syncPortalState()}componentDidLoad(){this.container=this.resolveContainer(),this.syncPortalState()}componentDidRender(){this.syncPortalState()}disconnectedCallback(){if(this.closeTransitionTimer&&clearTimeout(this.closeTransitionTimer),this.unobserveParent(),this.wrapper?.parentNode)try{this.wrapper.parentNode.removeChild(this.wrapper)}catch{}}resolveContainer(){const t="string"==typeof this.to?document.querySelector(this.to):this.to;return t instanceof s?t:document.body}resolveZIndex(){const t=this.zIndex??996,e=this.parentRef?.closest(".sd-modal-container__layer");if(!e)return t;const i=e.closest(".sd-modal-container"),o=i instanceof s?parseInt(getComputedStyle(i).zIndex,10):NaN,h=Number.isFinite(o)?o:997;return Math.max(t,h+1)}createWrapper(){this.wrapper=document.createElement("div"),Object.assign(this.wrapper.style,{position:"fixed",top:"0",left:"0",zIndex:this.resolveZIndex().toString(),opacity:"0",transition:"opacity 0.15s ease-out",boxSizing:"border-box",visibility:"hidden"}),this.container.appendChild(this.wrapper)}ensureWrapper(){this.wrapper||(this.container||=this.resolveContainer(),this.createWrapper(),this.moveSlotContent())}syncPortalState(){if(!this.open)return this.wrapper&&(this.wrapper.style.transition="opacity 0.15s ease-out",this.wrapper.style.opacity="0",this.wrapper.style.pointerEvents="none",this.closeTransitionTimer&&clearTimeout(this.closeTransitionTimer),this.closeTransitionTimer=setTimeout((()=>{this.wrapper&&!this.open&&(this.wrapper.style.display="none")}),150)),void this.unobserveParent();this.closeTransitionTimer&&clearTimeout(this.closeTransitionTimer),this.ensureWrapper(),this.wrapper&&(this.wrapper.style.display="block",this.wrapper.style.transition="opacity 0.25s ease-out",this.wrapper.style.opacity="0",this.wrapper.style.pointerEvents="",this.observeParent(),this.updatePosition())}moveSlotContent(){this.wrapper&&Array.from(this.hostEl.childNodes).filter((t=>t.nodeType!==Node.COMMENT_NODE)).forEach((t=>this.wrapper.appendChild(t)))}updatePosition(){void 0!==this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame((()=>{if(!this.parentRef||!this.wrapper)return;const t=this.parentRef.getBoundingClientRect(),s=window.innerWidth,e=window.innerHeight,i=this.offset??[0,4],o=Math.max(0,this.viewportPadding??0),h=Math.max(s-2*o,0),n=Math.max(e-2*o,0);this.wrapper.style.maxWidth=`${h}px`,this.wrapper.style.maxHeight=`${n}px`;const r=this.wrapper.getBoundingClientRect(),a=e-t.bottom-i[1]-o,d=t.top-i[1]-o;let l,c=t.left+i[0];"top"===(this.placement??"bottom")?(l=t.top-r.height-i[1],d<r.height&&a>d&&(l=t.bottom+i[1])):(l=t.bottom+i[1],a<r.height&&d>a&&(l=t.top-r.height-i[1]));const p=e-o-r.height;l=p<o?o:Math.min(Math.max(l,o),p);const u=c+r.width>s-o,m=o,v=s-o-r.width;this.wrapper.style.top=`${l}px`,v<m?(this.wrapper.style.left=`${m}px`,this.wrapper.style.right="auto",delete this.wrapper.dataset.align):u?(this.wrapper.style.left="auto",this.wrapper.style.right=s-t.right+"px",this.wrapper.dataset.align="right"):(this.wrapper.style.right="auto",delete this.wrapper.dataset.align,c=Math.min(Math.max(c,m),v),this.wrapper.style.left=`${c}px`),this.wrapper.style.visibility="visible",this.wrapper.style.opacity="1"}))}observeParent(){this.parentRef&&!this.isObserved&&(this.observeScrollParents(this.parentRef),"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>this.updatePosition())),this.resizeObserver.observe(this.parentRef)),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver((()=>this.updatePosition())),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0})),this.isObserved=!0)}unobserveParent(){this.isObserved&&(this.unobserveScrollParents(),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.mutationObserver?.disconnect(),this.mutationObserver=void 0,this.isObserved=!1)}observeScrollParents(t){const s=this.getScrollParents(t);s.forEach((t=>{t.addEventListener("scroll",this.handleObservedScroll,{passive:!0})})),this.scrollParents=s}unobserveScrollParents(){this.scrollParents.forEach((t=>{t.removeEventListener("scroll",this.handleObservedScroll)})),this.scrollParents=[]}getScrollParents(t){const s=[];let e=t.parentElement;for(;e;){const{overflow:t,overflowX:i,overflowY:o}=getComputedStyle(e);[t,i,o].some((t=>/(auto|scroll|overlay)/.test(t)))&&s.push(e),e=e.parentElement}return s}isInsideTarget(t){return!(!this.wrapper?.contains(t)&&!this.parentRef?.contains(t))}handleMouseDown(t){this.open&&(this.isInsideClick=this.isInsideTarget(t.target))}handleWindowClick(t){this.open&&(this.isInsideClick?this.isInsideClick=!1:this.isInsideTarget(t.target)||this.close.emit())}render(){return i("slot",{key:"623ee5423b145701ba9dd801d44874214f7a76e3"})}static get watchers(){return{open:[{handleOpenChange:0}]}}static get style(){return":host { display: none !important; }"}},[772,"sd-portal",{to:[1],parentRef:[16],offset:[16],viewportPadding:[2,"viewport-padding"],zIndex:[2,"z-index"],open:[4],placement:[1]},[[9,"scroll","updatePosition"],[9,"resize","updatePosition"],[9,"mousedown","handleMouseDown"],[8,"click","handleWindowClick"]],{open:[{handleOpenChange:0}]}]);function n(){"undefined"!=typeof customElements&&["sd-portal"].forEach((t=>{"sd-portal"===t&&(customElements.get(o(t))||customElements.define(o(t),h))}))}export{h as S,n as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as s,c as e,h as a,t as o}from"./p-
|
|
1
|
+
import{p as t,H as s,c as e,h as a,t as o}from"./p-Uh9emYrV.js";import{d as n}from"./p-oYbVr-z0.js";import{d as i}from"./p-BFVfSW9t.js";import{d as c}from"./p-Di1q4f5E.js";import{d}from"./p-BHjezpAC.js";import{d as l}from"./p-f0aBxUBG.js";var r={bg:"#07284A",content:"#FFFFFF"},b={bg:"#FB4444",content:"#FFFFFF"},f={bg:"#FFC700",content:"#222222"},p={bg:"#00973C",content:"#FFFFFF"},u={bg:"#005CC9",content:"#FFFFFF"},m={bg:"#E6F1FF",icon:"#0075FF",text:"#222222",textLink:"#555555"};const g={default:"secondary_sm",danger:"danger_outline_sm",caution:"neutral_outline_sm",complete:"neutral_outline_sm",accent:"neutral_outline_sm",info:"secondary_sm"},h={default:{bg:r.bg,content:r.content},danger:{bg:b.bg,content:b.content},caution:{bg:f.bg,content:f.content},complete:{bg:p.bg,content:p.content},accent:{bg:u.bg,content:u.content},info:{bg:m.bg,content:m.text,icon:m.icon,linkColor:m.textLink}},_={iconSize:"16"},k=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.close=e(this,"sdClose",7),this.buttonClick=e(this,"sdButtonClick",7)}icon;message;link;linkLabel;buttonLabel;useClose=!1;type="default";close;buttonClick;render(){const t=h[this.type]??h.default,s=Number(_.iconSize),e=t.icon??t.content,o=t.linkColor??t.content,n=["default","caution","info"].includes(this.type),i=g[this.type]??g.default;return a("div",{key:"c402e2eabab8b2d229cc40550d2ffb7c601ad992",style:{"--sd-toast-bg":t.bg,"--sd-toast-text":t.content,"--sd-toast-icon":e,"--sd-toast-link":o}},a("div",{key:"a6dbbc079649181799f434f7158791ec1e52fd4a",class:"sd-toast",role:"status","aria-live":"polite","aria-atomic":"true"},this.icon&&a("div",{key:"c8210c48776c0722ed025049ebfce5eb8477df0a",class:"sd-toast__icon"},a("sd-icon",{key:"ee99941287447694a3aa700281bacdbb5d9605bc",name:this.icon,size:s,color:e})),a("div",{key:"f4be8a8599e84bb75aeaa5414cf6ff2cd063e391",class:"sd-toast__content"},a("span",{key:"af60e01cf1be615fd3b462885c9060445e49c809",class:"sd-toast__message"},this.message)),this.link&&a("a",{key:"cd7bbe3ef56e6f475d4182118321645b444c2334",href:this.link,class:"sd-toast__link",target:"_blank",rel:"noopener noreferrer"},this.linkLabel||this.link),this.buttonLabel&&a("sd-button",{key:"87c9a38fead8416d36850ff9247d02a962e92f27",class:"sd-toast__button",name:i,label:this.buttonLabel,onSdClick:t=>this.buttonClick.emit(t.detail)}),this.useClose&&a("sd-ghost-button",{key:"1af5e0ffa26a26574bb9935fdeb01192895c32eb",class:"sd-toast__close",icon:"close",intent:n?"default":"inverse",ariaLabel:"close",size:"xs",onClick:()=>this.close.emit()})))}static get style(){return"sd-toast{display:block;width:fit-content;height:fit-content}sd-toast .sd-toast{display:flex;width:fit-content;align-items:center;gap:var(--sd-toast-gap, 16px);padding:var(--sd-toast-padding-y, 12px) var(--sd-toast-padding-x, 24px);border-radius:var(--sd-toast-radius, 8px);background-color:var(--sd-toast-bg);color:var(--sd-toast-text);box-shadow:2px 2px 8px 2px rgba(0, 0, 0, 0.2)}sd-toast .sd-toast__icon{display:flex;align-items:center;flex-shrink:0}sd-toast .sd-toast__content{display:flex;flex:1}sd-toast .sd-toast__message{font-size:14px;line-height:24px;font-weight:500;white-space:nowrap}sd-toast .sd-toast__link{font-size:14px;line-height:24px;font-weight:700;color:var(--sd-toast-link, var(--sd-toast-text));text-decoration:underline;cursor:pointer;transition:opacity 0.2s ease;margin-left:4px;white-space:nowrap}sd-toast .sd-toast__link:hover{opacity:0.8}sd-toast .sd-toast__button{flex-shrink:0}sd-toast .sd-toast__close{flex-shrink:0}"}},[512,"sd-toast",{icon:[1],message:[1],link:[1],linkLabel:[1,"link-label"],buttonLabel:[1,"button-label"],useClose:[4,"use-close"],type:[1]}]);function F(){"undefined"!=typeof customElements&&["sd-toast","sd-button","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((t=>{switch(t){case"sd-toast":customElements.get(o(t))||customElements.define(o(t),k);break;case"sd-button":customElements.get(o(t))||n();break;case"sd-ghost-button":customElements.get(o(t))||i();break;case"sd-icon":customElements.get(o(t))||c();break;case"sd-portal":customElements.get(o(t))||d();break;case"sd-tag":customElements.get(o(t))||l()}}))}export{k as S,F as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as d,H as e,c as i,h as a,t as r}from"./p-
|
|
1
|
+
import{p as d,H as e,c as i,h as a,t as r}from"./p-Uh9emYrV.js";var o={default:{fontWeight:"400",fontSize:"12",lineHeight:"20"},selected:{fontWeight:"500"}},s={default:"#FFFFFF",disabled:"#E1E1E1",hover:"#D9EAFF"},t={default:"#AAAAAA",hover:"#0075FF",active:"#0075FF",disabled:"#CCCCCC"},l={default:"#0075FF",disabled:"#CCCCCC",size:"10"},c={default:"#222222",disabled:"#888888"};const n="16",h="1",b="8",g=l.size,u={default:{fontSize:o.default.fontSize,lineHeight:o.default.lineHeight,fontWeight:o.default.fontWeight},selected:{fontWeight:o.selected.fontWeight}},f={unchecked:{bg:s.default,bgHover:s.hover,border:t.default,borderHover:t.hover},checked:{border:t.active,dot:l.default},disabled:{bg:s.disabled,border:t.disabled,dot:l.disabled},label:{default:c.default,disabled:c.disabled}},v=d(class extends e{constructor(d){super(),!1!==d&&this.__registerHost(),this.update=i(this,"sdUpdate",7)}value;val;disabled=!1;label;update;valueChanged(d){this.value=d}get isSelected(){return String(this.val)===String(this.value)}get radioClasses(){const d=["sd-radio",this.isSelected?"sd-radio--checked":"sd-radio--unchecked"];return this.disabled&&d.push("sd-radio--disabled"),d.join(" ")}handleRadioChange=()=>{this.disabled||(this.value=this.val,this.update.emit(this.value))};render(){return a("label",{key:"cc7ff62ac992791ef81db9212bb5986989f6b4d6",class:this.radioClasses,style:{"--sd-radio-size":`${n}px`,"--sd-radio-border-width":`${h}px`,"--sd-radio-gap":`${b}px`,"--sd-radio-dot-size":`${g}px`,"--sd-radio-font-size":`${u.default.fontSize}px`,"--sd-radio-line-height":`${u.default.lineHeight}px`,"--sd-radio-font-weight":u.default.fontWeight,"--sd-radio-selected-font-weight":u.selected.fontWeight,"--sd-radio-unchecked-bg":f.unchecked.bg,"--sd-radio-unchecked-bg-hover":f.unchecked.bgHover,"--sd-radio-unchecked-border":f.unchecked.border,"--sd-radio-unchecked-border-hover":f.unchecked.borderHover,"--sd-radio-checked-border":f.checked.border,"--sd-radio-checked-dot":f.checked.dot,"--sd-radio-disabled-bg":f.disabled.bg,"--sd-radio-disabled-border":f.disabled.border,"--sd-radio-disabled-dot":f.disabled.dot,"--sd-radio-label-color":f.label.default,"--sd-radio-label-disabled-color":f.label.disabled},"aria-checked":this.isSelected?"true":"false","aria-disabled":this.disabled?"true":"false"},a("input",{key:"20bfeaf5bc322335f5300955ebf653213d662fa6",type:"radio",name:String(this.val),value:String(this.val),checked:this.isSelected,disabled:this.disabled,"aria-label":this.label||String(this.val),onInput:this.handleRadioChange}),a("span",{key:"61d8bdfdb5f8309b8832b89ea2979db5b80968c8",class:"sd-radio__circle"}),this.label&&a("span",{key:"cc2a5402e4745aaae897c8f37d5fc287a2ba9b29",class:"sd-radio__label","data-label":this.label},this.label))}static get watchers(){return{value:[{valueChanged:0}]}}static get style(){return'sd-radio{display:inline-flex;width:fit-content;height:var(--sd-radio-line-height);line-height:0}sd-radio .sd-radio{cursor:pointer;display:inline-flex;align-items:center;gap:var(--sd-radio-gap);height:var(--sd-radio-line-height);max-height:var(--sd-radio-line-height)}sd-radio .sd-radio>input{position:absolute;width:0;height:0;opacity:0;pointer-events:none}sd-radio .sd-radio>input:focus-visible+.sd-radio__circle{box-shadow:0 0 0 2px white, 0 0 0 4px var(--sd-radio-checked-border);outline:none}sd-radio .sd-radio__circle{position:relative;width:var(--sd-radio-size);height:var(--sd-radio-size);border-radius:50%;border:var(--sd-radio-border-width) solid var(--sd-radio-unchecked-border);box-sizing:border-box;background:var(--sd-radio-unchecked-bg);display:inline-flex;flex-shrink:0}sd-radio .sd-radio__label{font-size:var(--sd-radio-font-size);font-weight:var(--sd-radio-font-weight);color:var(--sd-radio-label-color);line-height:var(--sd-radio-line-height);display:inline-flex;flex-direction:column}sd-radio .sd-radio__label::before{content:attr(data-label);height:0;font-weight:var(--sd-radio-selected-font-weight);visibility:hidden;overflow:hidden;user-select:none;pointer-events:none}sd-radio .sd-radio:hover:not(.sd-radio--disabled) .sd-radio__circle{background:var(--sd-radio-unchecked-bg-hover);border-color:var(--sd-radio-unchecked-border-hover)}sd-radio .sd-radio--checked .sd-radio__label{font-weight:var(--sd-radio-selected-font-weight)}sd-radio .sd-radio--checked .sd-radio__circle{border-color:var(--sd-radio-checked-border)}sd-radio .sd-radio--checked .sd-radio__circle::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:var(--sd-radio-dot-size);height:var(--sd-radio-dot-size);border-radius:50%;background:var(--sd-radio-checked-dot)}sd-radio .sd-radio--disabled{cursor:not-allowed}sd-radio .sd-radio--disabled .sd-radio__label{color:var(--sd-radio-label-disabled-color)}sd-radio .sd-radio--disabled .sd-radio__circle{background:var(--sd-radio-disabled-bg);border-color:var(--sd-radio-disabled-border)}sd-radio .sd-radio--disabled.sd-radio--checked .sd-radio__circle::after{background:var(--sd-radio-disabled-dot)}'}},[512,"sd-radio",{value:[1032],val:[8],disabled:[4],label:[1]},void 0,{value:[{valueChanged:0}]}]);function p(){"undefined"!=typeof customElements&&["sd-radio"].forEach((d=>{"sd-radio"===d&&(customElements.get(r(d))||customElements.define(r(d),v))}))}export{v as S,p as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as
|
|
1
|
+
import{p as t,H as e,c as s,h as i,t as o}from"./p-Uh9emYrV.js";import{n as r}from"./p-CCwNgVmC.js";import{d as l}from"./p-oYbVr-z0.js";import{d as h}from"./p-DMoFncVl.js";import{d as a}from"./p-DN7MAx-q.js";import{d}from"./p-R-Sdglj0.js";import{d as n}from"./p-BFVfSW9t.js";import{d as c}from"./p-Di1q4f5E.js";import{d as p}from"./p-BHjezpAC.js";import{d as m}from"./p-CbS69IvC.js";import{d as u}from"./p-CFTyEfB9.js";import{d as f}from"./p-C7mC7a1z.js";import{d as b}from"./p-CSr33M9s.js";import{d as g}from"./p-f0aBxUBG.js";import{d as w}from"./p-DJmxpVkK.js";const x=t(class t extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.update=s(this,"sdUpdate",7),this.dropDownShow=s(this,"sdDropDownShow",7)}static VIEWPORT_PADDING=20;static PORTAL_OFFSET_Y=4;static CLOSE_ANIMATION_DURATION=150;get el(){return this}type="default";value=null;options=[];placeholder="선택";dropdownWidth="";maxDropdownWidth="640px";dropdownHeight="260px";disabled=!1;label="";labelWidth="";addonLabel="";addonAlign="start";error=!1;hint="";errorMessage="";rules=[];icon=void 0;labelTooltip="";labelTooltipProps=null;emitValue=!1;width="";useSearch=!1;allSelectedLabel="전체";useSelectAll=!1;isOpen=!1;isAnimatingOut=!1;triggerWidth="200px";resolvedDropdownHeight="260px";resolvedMaxDropdownWidth="640px";focused=!1;hovered=!1;update;dropDownShow;async sdFocus(){this.disabled||await(this.triggerComponentRef?.sdFocus())}async sdOpen(){await new Promise((t=>setTimeout(t,0))),this.disabled||this.isOpen||(this.prepareDropdownGeometry(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)}triggerRef;triggerComponentRef;closeAnimationTimer;name=r();triggerHasFocus=!1;watchIsOpen(t){this.syncFocusedState(t),this.dropDownShow.emit({isOpen:t})}get isMulti(){return"multi"===this.type||"multi_depth"===this.type}get displayText(){if(this.isMulti){if(!Array.isArray(this.value)||0===this.value.length)return"";const t=this.getNonDisabledLeaves(this.options),e=this.getSelectedOptions();if(t.length>0&&t.every((t=>e.some((e=>e.value===t.value)))))return this.allSelectedLabel??"전체";const s=this.flattenOptions(this.options);return this.value.map((t=>{if(null!=t&&"object"==typeof t){const e=t;return e.label??s.find((t=>t.value===e.value))?.label??""}return s.find((e=>e.value===t))?.label??""})).filter(Boolean).join(", ")}if(null==this.value)return"";if(!this.emitValue&&"object"==typeof this.value&&!Array.isArray(this.value))return this.value.label??"";const t=this.flattenOptions(this.options);return t.find((t=>t.value===this.value))?.label??""}flattenOptions(t){return t.flatMap((t=>t.children?this.flattenOptions(t.children):[t]))}getNonDisabledLeaves(t){return t.flatMap((t=>t.disabled?[]:t.children?this.getNonDisabledLeaves(t.children):[t]))}getSelectedOptions(){const t=this.value;return null!=t&&Array.isArray(t)?this.emitValue?t.map((t=>this.findOriginalOption(t,this.options))).filter((t=>!!t)):t:[]}toMultiValue(t){return this.emitValue?t.map((t=>t.value)):t}parsePixelValue(t,e){const s=Number.parseFloat(t);return Number.isFinite(s)?s:e}updateDropdownViewportConstraints(){if(!this.triggerRef)return;const e=this.triggerRef.getBoundingClientRect(),s=t.VIEWPORT_PADDING,i=t.PORTAL_OFFSET_Y,o=this.parsePixelValue(this.dropdownHeight,260),r=this.parsePixelValue(this.maxDropdownWidth,640),l=Math.max(window.innerHeight-e.bottom-s-i,0),h=Math.max(e.top-s-i,0),a=Math.max(l,h),d=Math.max(window.innerWidth-2*s,0);this.resolvedDropdownHeight=`${Math.min(o,a)}px`,this.resolvedMaxDropdownWidth=`${Math.min(r,d)}px`}handleViewportResize=()=>{this.isOpen&&this.updateDropdownViewportConstraints()};findOriginalOption(t,e){for(const s of e){if(s.value===t)return s;if(s.children){const e=this.findOriginalOption(t,s.children);if(e)return e}}}closeDropdown(){this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),t.CLOSE_ANIMATION_DURATION))}prepareDropdownGeometry(){this.triggerRef&&(this.triggerWidth=`${this.triggerRef.offsetWidth}px`),this.updateDropdownViewportConstraints()}syncFocusedState(t=this.isOpen){this.focused=t||this.triggerHasFocus}handleTriggerFocus=()=>{this.triggerHasFocus=!0,this.syncFocusedState()};handleTriggerBlur=()=>{this.triggerHasFocus=!1,this.syncFocusedState()};handleTriggerClick=()=>{this.isOpen?this.closeDropdown():(this.prepareDropdownGeometry(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)};emitUpdate(t){this.update.emit(t)}handleOptionSelect=t=>{const{option:e,leaves:s}=t;if(this.isMulti)this.handleMultiSelect(e,s);else{this.closeDropdown(),this.value=this.emitValue?e.value:e;const t=this.value;requestAnimationFrame((()=>{this.emitUpdate(t)}))}};handleMultiSelect(t,e){const s=this.getSelectedOptions();let i;if(t.children)if(e.every((t=>s.some((e=>e.value===t.value))))){const t=new Set(e.map((t=>t.value)));i=s.filter((e=>!t.has(e.value)))}else{const t=new Set(s.map((t=>t.value))),o=e.filter((e=>!t.has(e.value)));i=[...s,...o]}else i=s.some((e=>e.value===t.value))?s.filter((e=>e.value!==t.value)):[...s,t];this.value=this.toMultiValue(i),this.emitUpdate(this.value)}connectedCallback(){window.addEventListener("resize",this.handleViewportResize)}disconnectedCallback(){window.removeEventListener("resize",this.handleViewportResize),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}render(){const e={open:this.isOpen,parentRef:this.triggerRef,viewportPadding:t.VIEWPORT_PADDING,onSdClose:()=>{this.closeDropdown()}};return i("sd-field",{key:"13ca7b4ddb0e124e90dd2b843df9a11b7cc98487",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,onMouseEnter:()=>{this.hovered=!0},onMouseLeave:()=>{this.hovered=!1}},i("div",{key:"3892e98679d28ed6199578f1033571fec2137143",class:"sd-select",ref:t=>{this.triggerRef=t}},i("sd-select-trigger",{key:"150dda9f50762bedc538181d8c1e5623e8d3fbac",ref:t=>{this.triggerComponentRef=t},displayText:this.displayText,placeholder:this.placeholder??"선택",disabled:this.disabled,isOpen:this.isOpen,onSdTriggerClick:this.handleTriggerClick,onSdTriggerFocus:this.handleTriggerFocus,onSdTriggerBlur:this.handleTriggerBlur})),(this.isOpen||this.isAnimatingOut)&&i("sd-portal",{key:"554e158719e791600a6215223a5c0c7ac289b00a",...e},i("sd-select-listbox",{key:"c309fdfc53ff0c970ff33eb9eeec58636a869408",type:this.type,options:this.options,value:this.value,emitValue:this.emitValue,useSearch:this.useSearch,useSelectAll:this.useSelectAll,triggerWidth:this.dropdownWidth||this.triggerWidth,maxWidth:this.resolvedMaxDropdownWidth,maxHeight:this.resolvedDropdownHeight,onSdOptionSelect:t=>this.handleOptionSelect(t.detail)})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}static get style(){return"sd-select{display:inline-flex}sd-select sd-portal{display:none}sd-select .sd-select{position:relative;width:100%;height:100%}"}},[512,"sd-select",{type:[1],value:[1032],options:[16],placeholder:[1],dropdownWidth:[1,"dropdown-width"],maxDropdownWidth:[1,"max-dropdown-width"],dropdownHeight:[1,"dropdown-height"],disabled:[4],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],error:[1028],hint:[1],errorMessage:[1,"error-message"],rules:[16],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],emitValue:[4,"emit-value"],width:[8],useSearch:[4,"use-search"],allSelectedLabel:[1,"all-selected-label"],useSelectAll:[4,"use-select-all"],name:[1],isOpen:[32],isAnimatingOut:[32],triggerWidth:[32],resolvedDropdownHeight:[32],resolvedMaxDropdownWidth:[32],focused:[32],hovered:[32],sdFocus:[64],sdOpen:[64]},void 0,{isOpen:[{watchIsOpen:0}]}]);function S(){"undefined"!=typeof customElements&&["sd-select","sd-button","sd-checkbox","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-select-list-item","sd-select-list-item-search","sd-select-listbox","sd-select-trigger","sd-tag","sd-tooltip"].forEach((t=>{switch(t){case"sd-select":customElements.get(o(t))||customElements.define(o(t),x);break;case"sd-button":customElements.get(o(t))||l();break;case"sd-checkbox":customElements.get(o(t))||h();break;case"sd-field":customElements.get(o(t))||a();break;case"sd-floating-portal":customElements.get(o(t))||d();break;case"sd-ghost-button":customElements.get(o(t))||n();break;case"sd-icon":customElements.get(o(t))||c();break;case"sd-portal":customElements.get(o(t))||p();break;case"sd-select-list-item":customElements.get(o(t))||m();break;case"sd-select-list-item-search":customElements.get(o(t))||u();break;case"sd-select-listbox":customElements.get(o(t))||f();break;case"sd-select-trigger":customElements.get(o(t))||b();break;case"sd-tag":customElements.get(o(t))||g();break;case"sd-tooltip":customElements.get(o(t))||w()}}))}export{x as S,S as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e}from"./p-
|
|
1
|
+
import{d as e}from"./p-BOxGhKKP.js";const t=(()=>{const e=new Date;return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`})(),r=()=>({formatDate:(e,t,r)=>`${e}-${String(t).padStart(2,"0")}-${String(r).padStart(2,"0")}`,createCalendar:(e,t)=>{const r=(e=>{const t=Number(e.split("-")[0]),r=Number(e.split("-")[1]),n=new Date(t,r,0).getDate();return Array.from({length:n},((e,t)=>t+1))})(`${e}-${String(t).padStart(2,"0")}-01`),n=new Date(e,t-1,1).getDay();return{days:r,prevMonthDays:Array.from({length:n}),afterMonthDays:Array.from({length:(7-(r.length+n)%7)%7})}},calculateYearMonth:(e,t,r)=>{let n=e,a="prev"===r?t-1:t+1;return a<1?(n=e-1,a=12):a>12&&(n=e+1,a=1),{newYear:n,newMonth:a}}}),n={bg:e.datepicker.calendar.bg,paddingXY:e.datepicker.calendar.paddingXY,gap:e.datepicker.calendar.gap,radius:e.datepicker.calendar.radius,header:{gap:e.datepicker.calendar.header.gap,divider:e.datepicker.calendar.header.divider,fontSize:e.datepicker.calendar.header.typography.fontSize,lineHeight:e.datepicker.calendar.header.typography.lineHeight,fontWeight:e.datepicker.calendar.header.typography.fontWeight},week:{fontSize:e.datepicker.calendar.week.typography.fontSize,lineHeight:e.datepicker.calendar.week.typography.lineHeight,fontWeight:e.datepicker.calendar.week.typography.fontWeight,color:e.datepicker.calendar.week.color},grid:{rowGap:e.datepicker.calendar.grid.rowGap},day:{size:e.datepicker.calendar.day.width,circleSize:e.datepicker.calendar.day.circle.size,circleRadius:e.datepicker.calendar.day.circle.radius,defaultText:e.datepicker.calendar.day.default.text,hoverText:e.datepicker.calendar.day.hover.text,hoverBorder:e.datepicker.calendar.day.hover.border,selectBg:e.datepicker.calendar.day.select.bg,selectText:e.datepicker.calendar.day.select.text,disabledText:e.datepicker.calendar.day.disabled.text,fontSize:e.datepicker.calendar.day.typography.default.fontSize,lineHeight:e.datepicker.calendar.day.typography.default.lineHeight,fontWeight:e.datepicker.calendar.day.typography.default.fontWeight,boldFontWeight:e.datepicker.calendar.day.typography.bold.fontWeight,dot:{size:e.datepicker.calendar.day.dot.size,gap:e.datepicker.calendar.day.dot.gap,paddingY:e.datepicker.calendar.day.dot.paddingY}},legend:{fontSize:e.datepicker.calendar.legend.typography.fontSize,lineHeight:e.datepicker.calendar.legend.typography.lineHeight,fontWeight:e.datepicker.calendar.legend.typography.fontWeight,gap:e.datepicker.calendar.legend.gap,groupGap:e.datepicker.calendar.legend.group.gap}},a=["일","월","화","수","목","금","토"];export{n as C,a as W,t,r as u}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={typography:{feedback:{sm:{regular:{fontSize:"12",fontWeight:"400"}}}},color:{bg:{frame:"#FFFFFF",accent:{default:"#0075FF"}},fg:{primary:"#222222",secondary:"#555555",tertiary:"#888888",success:"#00973C",accent:"#0075FF",inverse:"#FFFFFF"},divider:{default:"#E1E1E1"}},shadow:{spread:{md:{x:"0",y:"0",blur:"24",spread:"0",color:"rgba(34,34,34,0.2)"}}}};export{e as s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as s,c as e,h as i,t as
|
|
1
|
+
import{p as t,H as s,c as e,h as i,t as o}from"./p-Uh9emYrV.js";import{c as h,d as l,f as r,i as c,e as n,E as d,g as a}from"./p-x9AWBHPy.js";import{d as u}from"./p-DMoFncVl.js";import{d as m}from"./p-Di1q4f5E.js";import{d as p}from"./p-CbS69IvC.js";import{d as b}from"./p-CFTyEfB9.js";const x=t(class t extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.optionSelect=e(this,"sdOptionSelect",7)}type="default";options=[];value=null;emitValue=!1;useSearch=!1;useSelectAll=!1;triggerWidth="200px";maxWidth="640px";maxHeight="260px";searchKeyword="";isScrolled=!1;focusedIndex=-1;optionSelect;listEl;lastScrolledIndex=-1;keydownAttached=!1;suppressHover=!1;get isDepth(){return"default_depth"===this.type||"multi_depth"===this.type}get isMulti(){return"multi"===this.type||"multi_depth"===this.type}static SELECT_ALL_OPTION={value:"__select_all__",label:"전체"};get showSelectAll(){return this.useSelectAll&&this.isMulti&&this.getAllNonDisabledLeaves().length>0}getAllNonDisabledLeaves(){const t=s=>s.flatMap((s=>s.disabled?[]:s.children?t(s.children):[s]));return t(this.options)}get selectAllState(){if(!this.showSelectAll)return!1;const t=this.getAllNonDisabledLeaves();if(0===t.length)return!1;const s=this.getSelectedValues(),e=t.filter((t=>s.has(t.value))).length;return 0!==e&&(e===t.length||null)}get showSearch(){return!!this.useSearch&&(this.isDepth?h(this.options):this.options.length)>=l}get filteredOptions(){if(null==this.searchKeyword||""===this.searchKeyword)return this.options;if(this.isDepth)return r(this.options,this.searchKeyword);const t=this.searchKeyword.toLowerCase();return this.options.filter((s=>{const e=c(s.label)?n(s.label):s.label;return null!=e&&e.toLowerCase().includes(t)}))}get isEmpty(){return this.isDepth?0===h(this.filteredOptions)&&0===this.filteredOptions.length:0===this.filteredOptions.length}getSelectedValues(){return null!=this.value&&Array.isArray(this.value)?this.emitValue?new Set(this.value):new Set(this.value.map((t=>t.value))):new Set}isOptionSelected(t){return this.isMulti?this.getSelectedValues().has(t.value):this.emitValue||null==this.value||"object"!=typeof this.value||Array.isArray(this.value)?this.value===t.value:this.value.value===t.value}getGroupSelectionState(t){if(!this.isMulti||!t.children)return!1;const s=this.getSelectedValues();if(0===s.size)return!1;const e=this.collectVisibleLeaves(t);if(0===e.length)return!1;const i=e.filter((t=>s.has(t.value))).length;return 0!==i&&(i===e.length||null)}getCountInfo(t){if(!this.isMulti||!t.children)return;const s=this.getSelectedValues(),e=this.collectVisibleLeaves(t);return{selected:e.filter((t=>s.has(t.value))).length,total:e.length}}findOriginalOption(t,s){for(const e of s){if(e.value===t)return e;if(e.children){const s=this.findOriginalOption(t,e.children);if(s)return s}}}collectLeaves(t){return t.children?t.children.flatMap((t=>this.collectLeaves(t))):[t]}collectVisibleLeaves(t){if(t.disabled)return[];if(!t.children)return[t];if(0===t.children.length){const s=this.findOriginalOption(t.value,this.options);return s?this.collectLeaves(s).filter((t=>!t.disabled)):[]}return t.children.flatMap((t=>this.collectVisibleLeaves(t)))}get navigableOptions(){const s=[];this.showSelectAll&&s.push(t.SELECT_ALL_OPTION);const e=t=>{for(const i of t){const t=!!i.children;(!t||this.isMulti)&&!i.disabled&&s.push(i),t&&i.children&&i.children.length>0&&e(i.children)}};return e(this.filteredOptions),s}isSelectAllOption(s){return this.showSelectAll&&s.value===t.SELECT_ALL_OPTION.value}emitSelectAll(){if(!this.showSelectAll)return;const s=this.getAllNonDisabledLeaves();this.optionSelect.emit({option:{...t.SELECT_ALL_OPTION,children:s},leaves:s})}handleSelectAllClick=t=>{t.stopPropagation(),this.emitSelectAll()};isOptionFocused(t){if(this.focusedIndex<0)return!1;const s=this.navigableOptions[this.focusedIndex];return null!=s&&s.value===t.value}resetFocusOnFilter(){this.focusedIndex=this.navigableOptions.length>0?0:-1,this.suppressHover&&(document.removeEventListener("mousemove",this.releaseHoverSuppress,!0),this.suppressHover=!1)}handleSearchFilter=t=>{this.searchKeyword=t.detail};handleScroll=t=>{this.isScrolled=t.target.scrollTop>0};emitOptionSelect(t){this.optionSelect.emit({option:t,leaves:this.collectVisibleLeaves(t)})}handleOptionClick=t=>{t.stopPropagation(),this.emitOptionSelect(t.detail)};handleOptionHover=t=>{if(this.suppressHover)return;const s=this.navigableOptions.findIndex((s=>s.value===t.value));s>=0&&(this.focusedIndex=s)};releaseHoverSuppress=()=>{this.suppressHover=!1,document.removeEventListener("mousemove",this.releaseHoverSuppress,!0)};handleKeyDown=t=>{const s=this.navigableOptions;if("ArrowDown"===t.key){if(0===s.length)return;t.preventDefault(),t.stopPropagation(),this.focusedIndex=this.focusedIndex<0?0:(this.focusedIndex+1)%s.length,this.beginHoverSuppression()}else if("ArrowUp"===t.key){if(0===s.length)return;t.preventDefault(),t.stopPropagation(),this.focusedIndex=this.focusedIndex<=0?s.length-1:this.focusedIndex-1,this.beginHoverSuppression()}else if("Enter"===t.key){if(this.focusedIndex<0||this.focusedIndex>=s.length)return;t.preventDefault(),t.stopPropagation();const e=s[this.focusedIndex];this.isSelectAllOption(e)?this.emitSelectAll():this.emitOptionSelect(e)}};beginHoverSuppression(){this.suppressHover||(this.suppressHover=!0,document.addEventListener("mousemove",this.releaseHoverSuppress,!0))}scrollFocusedIntoView(){const t=this.listEl,s=t?.querySelector(".sd-select-list-item--focused");if(!t||!s)return;const e=t.getBoundingClientRect(),i=s.getBoundingClientRect();i.top<e.top?t.scrollTop+=i.top-e.top:i.bottom>e.bottom&&(t.scrollTop+=i.bottom-e.bottom)}connectedCallback(){this.keydownAttached||(document.addEventListener("keydown",this.handleKeyDown,!0),this.keydownAttached=!0)}disconnectedCallback(){this.keydownAttached&&(document.removeEventListener("keydown",this.handleKeyDown,!0),this.keydownAttached=!1),this.suppressHover&&(document.removeEventListener("mousemove",this.releaseHoverSuppress,!0),this.suppressHover=!1)}componentDidRender(){this.focusedIndex!==this.lastScrolledIndex&&(this.lastScrolledIndex=this.focusedIndex,this.focusedIndex>=0&&this.scrollFocusedIntoView())}renderOptions(t,s=1){return t.map((t=>{const e=!!t.children;return[i("sd-select-list-item",{option:t,depth:s,isSelected:e?this.getGroupSelectionState(t):this.isOptionSelected(t),isFocused:this.isOptionFocused(t),useCheckbox:this.isMulti,countInfo:this.getCountInfo(t),onSdListItemClick:this.handleOptionClick,onMouseEnter:()=>this.handleOptionHover(t)}),e&&t.children?this.renderOptions(t.children,s+1):null]}))}render(){return i("div",{key:"cec8e4e12dd806a93375853386a1d7cc3ac6b269",class:"sd-select-listbox",style:{"--listbox-trigger-width":this.triggerWidth??"200px","--listbox-max-width":this.maxWidth??"640px","--listbox-max-height":this.maxHeight??"260px","--listbox-radius":`${a.radius}px`}},this.showSearch&&i("sd-select-list-item-search",{key:"9e07a7e742e956df314796e9babf6c0a7fb21d7f",isScrolled:this.isScrolled,onSdSearchFilter:this.handleSearchFilter}),i("div",{key:"d5ff5620c63b5c53e69b6348f2c9cd6cb73cbe88",class:"sd-select-listbox__list",onScroll:this.handleScroll,ref:t=>{this.listEl=t}},this.showSelectAll&&i("sd-select-list-item",{key:"9b36cdd7466b639c65497da94ee1e3c5129566cb",option:t.SELECT_ALL_OPTION,depth:1,isSelected:this.selectAllState,isFocused:this.isOptionFocused(t.SELECT_ALL_OPTION),useCheckbox:!0,onSdListItemClick:this.handleSelectAllClick,onMouseEnter:()=>this.handleOptionHover(t.SELECT_ALL_OPTION)}),this.isEmpty?i("div",{class:"sd-select-listbox__empty"},d):this.isDepth?this.renderOptions(this.filteredOptions):this.filteredOptions.map((t=>i("sd-select-list-item",{option:t,depth:1,isSelected:this.isOptionSelected(t),isFocused:this.isOptionFocused(t),useCheckbox:this.isMulti,onSdListItemClick:this.handleOptionClick,onMouseEnter:()=>this.handleOptionHover(t)})))))}static get watchers(){return{searchKeyword:[{resetFocusOnFilter:0}]}}static get style(){return":host{display:block}:host .sd-select-listbox{display:flex;flex-direction:column;width:var(--listbox-trigger-width);max-width:var(--listbox-max-width);max-height:var(--listbox-max-height);border-radius:var(--listbox-radius);background:white;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1);overflow:hidden;outline:none}:host .sd-select-listbox__list{flex:1;min-height:0;overflow-y:auto;padding-bottom:0}:host .sd-select-listbox__list::-webkit-scrollbar{opacity:0;width:8px;background:#E5E5E5}:host .sd-select-listbox__list::-webkit-scrollbar:horizontal{height:8px}:host .sd-select-listbox__list::-webkit-scrollbar-thumb{height:80px;background-color:#CCCCCC;border-radius:4px}:host .sd-select-listbox__list::-webkit-scrollbar-track{background-color:#E5E5E5}:host .sd-select-listbox__empty{padding:12px;text-align:center;font-size:12px;line-height:20px;color:#888888}"}},[513,"sd-select-listbox",{type:[1],options:[16],value:[8],emitValue:[4,"emit-value"],useSearch:[4,"use-search"],useSelectAll:[4,"use-select-all"],triggerWidth:[1,"trigger-width"],maxWidth:[1,"max-width"],maxHeight:[1,"max-height"],searchKeyword:[32],isScrolled:[32],focusedIndex:[32]},void 0,{searchKeyword:[{resetFocusOnFilter:0}]}]);function f(){"undefined"!=typeof customElements&&["sd-select-listbox","sd-checkbox","sd-icon","sd-select-list-item","sd-select-list-item-search"].forEach((t=>{switch(t){case"sd-select-listbox":customElements.get(o(t))||customElements.define(o(t),x);break;case"sd-checkbox":customElements.get(o(t))||u();break;case"sd-icon":customElements.get(o(t))||m();break;case"sd-select-list-item":customElements.get(o(t))||p();break;case"sd-select-list-item-search":customElements.get(o(t))||b()}}))}export{x as S,f as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as s,c as i,h as e,t as n}from"./p-
|
|
1
|
+
import{p as t,H as s,c as i,h as e,t as n}from"./p-Uh9emYrV.js";import{n as o}from"./p-CCwNgVmC.js";import{i as a}from"./p-e0ABNkP6.js";import{d}from"./p-oYbVr-z0.js";import{d as l}from"./p-DN7MAx-q.js";import{d as r}from"./p-R-Sdglj0.js";import{d as u}from"./p-BFVfSW9t.js";import{d as p}from"./p-Di1q4f5E.js";import{d as h}from"./p-BHjezpAC.js";import{d as c}from"./p-f0aBxUBG.js";import{d as f}from"./p-DJmxpVkK.js";const b=a.textinput.sm,m=a.textinput.md,g={sm:{height:b.height,paddingX:b.paddingX,gap:b.gap,radius:b.radius,fontSize:b.typography.fontSize,lineHeight:b.typography.lineHeight,fontWeight:b.typography.fontWeight},md:{height:m.height,paddingX:m.paddingX,gap:m.gap,radius:m.radius,fontSize:m.typography.fontSize,lineHeight:m.typography.lineHeight,fontWeight:m.typography.fontWeight}},_={text:a.textinput.text,icon:a.textinput.icon},x=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.input=i(this,"sdUpdate",7),this.focus=i(this,"sdFocus",7),this.blur=i(this,"sdBlur",7)}get host(){return this}value=null;type="text";size="sm";addonLabel="";addonAlign="start";placeholder="입력해 주세요.";disabled=!1;clearable=!1;width="";rules=[];autoFocus=!1;autocomplete="";maxlength;minlength;inputmode;enterkeyhint;spellcheck=!1;status;hint="";errorMessage="";inputClass="";readonly=!1;error=!1;focused=!1;hovered=!1;label="";labelWidth="";icon=void 0;labelTooltip="";labelTooltipProps=null;inputStyle={};internalValue=null;passwordVisible=!1;nativeEl=void 0;formField;name=o();input;focus;blur;valueChanged(t){this.internalValue=t}internalValueChanged(t){t!==this.value&&(this.value=t,this.input?.emit(this.value))}async sdGetNativeElement(){return this.nativeEl||null}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}componentWillLoad(){null!=this.value&&""!==this.value&&(this.internalValue=this.value)}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=t=>{this.internalValue=t.target.value};handleFocus=async(t,s)=>{this.focused="focus"===t,"blur"===t?(this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.blur?.emit(s)):this.focus?.emit(s)};render(){const t=g[this.size]??g.sm;return e("sd-field",{key:"5707ad3cdfd0194d4200899f3838e6e7ff03cb34",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,readonly:this.readonly,focused:this.focused,hovered:this.hovered,status:this.status,size:this.size,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:t=>this.formField=t,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-input-font-size":`${t.fontSize}px`,"--sd-input-line-height":`${t.lineHeight}px`,"--sd-input-font-weight":t.fontWeight,"--sd-input-padding-x":`${t.paddingX}px`,"--sd-input-gap":`${t.gap}px`,"--sd-input-text-color":_.text.default,"--sd-input-placeholder-color":_.text.placeholder,"--sd-input-disabled-color":_.text.disabled,"--sd-input-icon-color":_.icon.default,"--sd-system-size-field-sm-height":`${t.height}px`,"--sd-system-radius-field-sm":`${t.radius}px`}},e("label",{key:"a5146f59435269a419c8273c72e7704a359108f0",class:"sd-input__content"},e("slot",{key:"cfa0393abc20439a7746e874215864d02d41ce17",name:"prefix"}),e("input",{key:"bf7503a5701e237868c7be863f5d2653d074fb66",name:this.name,ref:t=>this.nativeEl=t,class:`sd-input__native ${this.inputClass}`,type:"password"===this.type&&this.passwordVisible?"text":this.type??"text",value:this.internalValue||"",placeholder:this.placeholder??"입력해 주세요.",disabled:this.disabled,readonly:this.readonly,autofocus:this.autoFocus,autocomplete:this.autocomplete||void 0,maxlength:this.maxlength,minlength:this.minlength,inputmode:this.inputmode,enterkeyhint:this.enterkeyhint,spellcheck:this.spellcheck,onInput:this.handleInput,onFocus:t=>this.handleFocus("focus",t),onBlur:t=>this.handleFocus("blur",t),style:this.inputStyle}),e("slot",{key:"bc16a709380137d6993753892e71cab33e0fc070",name:"suffix"}),this.clearable&&this.internalValue&&!this.disabled&&!this.readonly&&e("sd-ghost-button",{key:"4053ddc137f8d104a3e619f81ca2c99fd7e52a75",icon:"close",ariaLabel:"clear",size:"xxs",disabled:this.disabled,class:"sd-input__clear-icon",onClick:async()=>{this.disabled||this.readonly||(this.internalValue="",await(this.formField?.sdValidate()))}}),"password"===this.type&&e("sd-ghost-button",{key:"7062bbfecd4289185dc847bca0524405d6f4bbfe",icon:this.passwordVisible?"visibilityOn":"visibilityOff",ariaLabel:"visibility",size:"xxs",disabled:this.disabled||this.readonly,class:"sd-input__password-icon",onClick:()=>{this.disabled||this.readonly||(this.passwordVisible=!this.passwordVisible)}})))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}static get style(){return"sd-icon{display:inline-block;line-height:0}sd-icon .sd-icon--rotate-90{transform:rotate(90deg)}sd-icon .sd-icon--rotate-180{transform:rotate(180deg)}sd-icon .sd-icon--rotate-270{transform:rotate(270deg)}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-text-fill-color:#000;-webkit-box-shadow:0 0 0px 1000px #fff inset;box-shadow:0 0 0px 1000px #fff inset;transition:background-color 5000s ease-in-out 0s}input:autofill,input:autofill:hover,input:autofill:focus,input:autofill:active{-webkit-text-fill-color:#000;-webkit-box-shadow:0 0 0px 1000px #fff inset;box-shadow:0 0 0px 1000px #fff inset;transition:background-color 5000s ease-in-out 0s}sd-input{display:inline-flex}sd-input .sd-input__content{width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;color:var(--sd-input-text-color);font-size:var(--sd-input-font-size);line-height:var(--sd-input-line-height);font-weight:var(--sd-input-font-weight);padding:0 var(--sd-input-padding-x);gap:var(--sd-input-gap)}sd-input .sd-input__content .sd-input__native{width:100%;height:100%;border:none;outline:none;background:transparent;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}sd-input .sd-input__content .sd-input__native[disabled]{cursor:not-allowed;color:var(--sd-input-disabled-color)}sd-input .sd-input__content .sd-input__native[readonly]{color:var(--sd-system-color-field-text-read-only)}sd-input .sd-input__content .sd-input__native::placeholder{color:var(--sd-input-placeholder-color)}sd-input .sd-input__content .sd-input__clear-icon,sd-input .sd-input__content .sd-input__password-icon{flex-shrink:0}sd-input .sd-input__content .sd-input__native[disabled]~.sd-input__clear-icon,sd-input .sd-input__content .sd-input__native[disabled]~.sd-input__password-icon,sd-input .sd-input__content .sd-input__native[readonly]~.sd-input__clear-icon,sd-input .sd-input__content .sd-input__native[readonly]~.sd-input__password-icon{cursor:not-allowed;pointer-events:none}"}},[772,"sd-input",{value:[1032],type:[1],size:[1],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],placeholder:[1],disabled:[4],clearable:[4],width:[8],rules:[16],autoFocus:[4,"auto-focus"],autocomplete:[1],maxlength:[2],minlength:[2],inputmode:[1],enterkeyhint:[1],spellcheck:[4],status:[1],hint:[1],errorMessage:[1,"error-message"],inputClass:[1,"input-class"],readonly:[4],error:[1028],focused:[1028],hovered:[1028],label:[1],labelWidth:[8,"label-width"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],inputStyle:[16],name:[1],internalValue:[32],passwordVisible:[32],sdGetNativeElement:[64],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64]},void 0,{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}]);function v(){"undefined"!=typeof customElements&&["sd-input","sd-button","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag","sd-tooltip"].forEach((t=>{switch(t){case"sd-input":customElements.get(n(t))||customElements.define(n(t),x);break;case"sd-button":customElements.get(n(t))||d();break;case"sd-field":customElements.get(n(t))||l();break;case"sd-floating-portal":customElements.get(n(t))||r();break;case"sd-ghost-button":customElements.get(n(t))||u();break;case"sd-icon":customElements.get(n(t))||p();break;case"sd-portal":customElements.get(n(t))||h();break;case"sd-tag":customElements.get(n(t))||c();break;case"sd-tooltip":customElements.get(n(t))||f()}}))}export{x as S,v as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as a,H as t,c as o,h as e,t as s}from"./p-Uh9emYrV.js";import{s as d}from"./p-BE4tnQ2Z.js";import{m as i}from"./p-Cw8yDfQh.js";import{d as n}from"./p-oYbVr-z0.js";import{d as l}from"./p-BFVfSW9t.js";import{d as m}from"./p-Di1q4f5E.js";import{d as c}from"./p-BHjezpAC.js";import{d as r}from"./p-f0aBxUBG.js";const f={positive:"primary_md",negative:"danger_md",default:"neutral_outline_md"},b={positive:"notificationOutline",negative:"warningOutline",default:null},p={positive:i.modal.confirm.positive.icon,negative:i.modal.confirm.negative.icon,default:""},h=Number(i.modal.confirm.title.icon),g=a(class extends t{constructor(a){super(),!1!==a&&this.__registerHost(),this.close=o(this,"sdClose",7),this.cancel=o(this,"sdCancel",7),this.ok=o(this,"sdOk",7)}get el(){return this}hasTagSlot=!1;hasOptionSlot=!1;slotObserver;type="positive";modalTitle="";titleClass="";topMessage=[];bottomMessage=[];mainButtonName;mainButtonLabel="확인";subButtonLabel="";tagPreset="square_sm_grey";tagLabel="";slotLabel="";close;cancel;ok;componentWillLoad(){this.syncHasSlottedContent()}componentDidLoad(){"undefined"!=typeof MutationObserver&&(this.slotObserver=new MutationObserver((()=>this.syncHasSlottedContent())),this.slotObserver.observe(this.el,{childList:!0,characterData:!0}))}disconnectedCallback(){this.slotObserver?.disconnect()}get resolvedType(){return this.type??"positive"}get resolvedMainButton(){return this.mainButtonName??f[this.resolvedType]}get showTagBox(){return""!==this.tagLabel||this.hasTagSlot}get showOption(){return""!==this.slotLabel||this.hasOptionSlot}syncHasSlottedContent(){let a=!1,o=!1;Array.from(this.el.children).forEach((e=>{if(!(e instanceof t))return;if(e.classList.contains("sd-confirm-modal"))return;const s=e.getAttribute("slot");"tag"===s?a=!0:"option"===s&&(o=!0)})),a!==this.hasTagSlot&&(this.hasTagSlot=a),o!==this.hasOptionSlot&&(this.hasOptionSlot=o)}render(){const a=this.resolvedType,t=b[a],o=p[a];return e("div",{key:"0376a60d15b1e090a6ff8d4181f8afb107d5ede3",class:"sd-confirm-modal"},e("sd-ghost-button",{key:"e652536ecf9a97c19a943de4ef5ebca99323a40a",class:"sd-confirm-modal__close-button",icon:"close",ariaLabel:"close",onClick:()=>this.close.emit()}),t&&e("sd-icon",{key:"8bb1e4a9207681ced8f06fa1919c99104a03b71c",class:"sd-confirm-modal__icon",name:t,size:h,color:o}),e("h2",{key:"08991739402f4a1f8b4da3af3df24eec556cf88e",class:`sd-confirm-modal__title ${this.titleClass??""}`},this.modalTitle),e("div",{key:"ba7aad2acaacc31f6e66122648c36b3398620b5b",class:"sd-confirm-modal__body"},(this.topMessage??[]).length>0&&e("div",{key:"6a0ccc07791d2d4c8923c1616fe9346d4a3c92c0",class:"sd-confirm-modal__message"},(this.topMessage??[]).map((a=>e("p",{class:"sd-confirm-modal__message-text",innerHTML:d(a)})))),this.showTagBox&&e("div",{key:"0e380d6d5ffe607863bae04821098b7585016f96",class:"sd-confirm-modal__content-box"},e("slot",{key:"de4eddc19f18831bf59797bda48aa4eaea3fac6a",name:"tag",onSlotchange:()=>this.syncHasSlottedContent()},this.tagLabel&&e("sd-tag",{key:"a63cfc4baaef0a1a8e666d5dba8528b8b135c1bc",name:this.tagPreset??"square_sm_grey",label:this.tagLabel}))),(this.bottomMessage??[]).length>0&&e("div",{key:"0e9ebab6b5aaf4af7282358f7ddc57dc75cd682a",class:"sd-confirm-modal__message"},(this.bottomMessage??[]).map((a=>e("p",{class:"sd-confirm-modal__message-text",innerHTML:d(a)})))),this.showOption&&e("div",{key:"cd8088453591b2fbda51aac93c8284e0f3c23aa9",class:"sd-confirm-modal__option"},e("slot",{key:"4cbe1c57b47f12ba1f3cae23b55fb694f6b00787",name:"option",onSlotchange:()=>this.syncHasSlottedContent()},this.slotLabel&&e("span",{key:"ed7e7aa05f5e32de4a361dcf8e3f2c2207dc9981",class:"sd-confirm-modal__slot-label"},this.slotLabel)))),e("div",{key:"069af4cfe63733e6960dd9e35888b26a06269026",class:"sd-confirm-modal__button"},this.subButtonLabel&&e("sd-button",{key:"a5371149596d109bede88df34736aaff88745f18",name:"neutral_outline_md",label:this.subButtonLabel,onSdClick:()=>this.cancel.emit()}),e("sd-button",{key:"46c0406da30bd761aa4d09f70ae9bb735b8dff5f",name:this.resolvedMainButton,label:this.mainButtonLabel??"확인",onSdClick:()=>this.ok.emit()})))}static get style(){return"sd-confirm-modal{display:block;width:fit-content;min-width:520px}sd-confirm-modal .sd-confirm-modal{position:relative;padding:var(--sd-modal-modal-confirm-padding-y) var(--sd-modal-modal-confirm-padding-x);border-radius:var(--sd-modal-modal-radius);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.2);background:var(--sd-modal-modal-bg)}sd-confirm-modal .sd-confirm-modal__close-button{position:absolute;top:12px;right:12px}sd-confirm-modal .sd-confirm-modal__icon{display:block;width:var(--sd-modal-modal-confirm-title-icon);height:var(--sd-modal-modal-confirm-title-icon);margin:0 auto var(--sd-modal-modal-confirm-title-gap) auto}sd-confirm-modal .sd-confirm-modal__title{color:var(--sd-modal-modal-confirm-title-color);font-size:var(--sd-modal-modal-confirm-title-typography-font-size);font-weight:var(--sd-modal-modal-confirm-title-typography-font-weight);line-height:var(--sd-modal-modal-confirm-title-typography-line-height);text-align:center;margin:0 0 var(--sd-modal-modal-confirm-body-gap) 0}sd-confirm-modal .sd-confirm-modal__body{display:flex;flex-direction:column;gap:var(--sd-modal-modal-confirm-body-gap)}sd-confirm-modal .sd-confirm-modal__message-text{color:var(--sd-modal-modal-confirm-message-color);font-size:12px;font-weight:400;line-height:20px;text-align:center;margin:0}sd-confirm-modal .sd-confirm-modal__content-box{display:flex;align-items:center;justify-content:center;gap:8px;padding:12px 16px;border:1px solid #e1e1e1;border-radius:8px;background:white}sd-confirm-modal .sd-confirm-modal__option{text-align:center}sd-confirm-modal .sd-confirm-modal__slot-label{font-size:14px;font-weight:700;line-height:22px;color:var(--sd-modal-modal-confirm-message-color)}sd-confirm-modal .sd-confirm-modal__button{display:flex;justify-content:center;gap:var(--sd-modal-modal-confirm-button-gap);margin-top:40px}"}},[772,"sd-confirm-modal",{type:[1],modalTitle:[1,"modal-title"],titleClass:[1,"title-class"],topMessage:[16],bottomMessage:[16],mainButtonName:[1,"main-button-name"],mainButtonLabel:[1,"main-button-label"],subButtonLabel:[1,"sub-button-label"],tagPreset:[1,"tag-preset"],tagLabel:[1,"tag-label"],slotLabel:[1,"slot-label"],hasTagSlot:[32],hasOptionSlot:[32]}]);function u(){"undefined"!=typeof customElements&&["sd-confirm-modal","sd-button","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((a=>{switch(a){case"sd-confirm-modal":customElements.get(s(a))||customElements.define(s(a),g);break;case"sd-button":customElements.get(s(a))||n();break;case"sd-ghost-button":customElements.get(s(a))||l();break;case"sd-icon":customElements.get(s(a))||m();break;case"sd-portal":customElements.get(s(a))||c();break;case"sd-tag":customElements.get(s(a))||r()}}))}export{g as S,u as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as s,c as t,h as i,t as c}from"./p-
|
|
1
|
+
import{p as e,H as s,c as t,h as i,t as c}from"./p-Uh9emYrV.js";import{S as a}from"./p-x9AWBHPy.js";import{d as l}from"./p-Di1q4f5E.js";const r=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.searchFilter=t(this,"sdSearchFilter",7),this.searchFocus=t(this,"sdSearchFocus",7)}isScrolled=!1;searchText="";searchFilter;searchFocus;inputEl;debounceTimer;focusRafId;componentDidLoad(){requestAnimationFrame((()=>{this.focusRafId=requestAnimationFrame((()=>{this.inputEl?.focus()}))}))}async sdFocus(){this.inputEl?.focus()}handleInput=e=>{this.searchText=e.target.value,this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((()=>{this.searchFilter.emit(this.searchText)}),a)};handleClear=e=>{e.stopPropagation(),this.searchText="",this.debounceTimer&&clearTimeout(this.debounceTimer),this.searchFilter.emit(""),this.inputEl?.focus()};disconnectedCallback(){void 0!==this.focusRafId&&cancelAnimationFrame(this.focusRafId),void 0!==this.debounceTimer&&clearTimeout(this.debounceTimer)}render(){return i("div",{key:"fd13ed863fa624bb672a80594a1397831c55b859",class:{"sd-select-list-item-search":!0,"sd-select-list-item-search--scrolled":this.isScrolled}},i("div",{key:"c36783523de2c29b04ce300307770a666daad9df",class:"sd-select-list-item-search__inner"},i("sd-icon",{key:"6e21aebf25090024c882dda1e9fec46219dce8ee",name:"search",size:16,color:"grey_70",class:"sd-select-list-item-search__icon"}),i("input",{key:"2ed89f33de74c98cde3caa4e8924ef2e7b3baa0f",ref:e=>{this.inputEl=e},type:"text",class:"sd-select-list-item-search__input",placeholder:"검색어 입력",value:this.searchText,onInput:this.handleInput,onFocus:()=>this.searchFocus.emit()}),i("button",{key:"c16ed94bbddd24e829548b4ff063a6a3095f955a",type:"button",class:{"sd-select-list-item-search__clear":!0,"sd-select-list-item-search__clear--hidden":""===this.searchText},onClick:this.handleClear,tabindex:""!==this.searchText?0:-1,"aria-hidden":""!==this.searchText?"false":"true"},i("sd-icon",{key:"f2808e3b1b5ae6937bd818e4f29f999d04286b60",name:"close",size:12,color:"#888888"}))))}static get style(){return"sd-select-list-item-search{display:block}sd-select-list-item-search .sd-select-list-item-search{padding:4px 8px;position:sticky;top:0;z-index:1;background:white}sd-select-list-item-search .sd-select-list-item-search--scrolled{box-shadow:0 2px 4px rgba(0, 0, 0, 0.08)}sd-select-list-item-search .sd-select-list-item-search__inner{display:flex;align-items:center;gap:6px;padding:4px 8px;border:1px solid #cccccc;border-radius:4px;background:white}sd-select-list-item-search .sd-select-list-item-search__inner:focus-within{border-color:#0075ff}sd-select-list-item-search .sd-select-list-item-search__icon{flex-shrink:0}sd-select-list-item-search .sd-select-list-item-search__input{flex:1;border:none;outline:none;font-size:12px;line-height:20px;color:#222222;background:transparent;min-width:0}sd-select-list-item-search .sd-select-list-item-search__input::placeholder{color:#aaaaaa}sd-select-list-item-search .sd-select-list-item-search__clear{flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:2px;border:none;background:transparent;cursor:pointer;border-radius:2px}sd-select-list-item-search .sd-select-list-item-search__clear:hover{background:#f0f0f0}sd-select-list-item-search .sd-select-list-item-search__clear--hidden{visibility:hidden;pointer-events:none}"}},[512,"sd-select-list-item-search",{isScrolled:[4,"is-scrolled"],searchText:[32],sdFocus:[64]}]);function d(){"undefined"!=typeof customElements&&["sd-select-list-item-search","sd-icon"].forEach((e=>{switch(e){case"sd-select-list-item-search":customElements.get(c(e))||customElements.define(c(e),r);break;case"sd-icon":customElements.get(c(e))||l()}}))}export{r as S,d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as s,c as t,h as r,t as i}from"./p-
|
|
1
|
+
import{p as e,H as s,c as t,h as r,t as i}from"./p-Uh9emYrV.js";import{i as g,h as c,j as o,k as l}from"./p-x9AWBHPy.js";import{s as d}from"./p-BE4tnQ2Z.js";import{d as n}from"./p-Di1q4f5E.js";const a=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.triggerClick=t(this,"sdTriggerClick",7),this.triggerFocus=t(this,"sdTriggerFocus",7),this.triggerBlur=t(this,"sdTriggerBlur",7)}displayText="";placeholder="선택";disabled=!1;isOpen=!1;triggerClick;triggerFocus;triggerBlur;triggerEl;async sdFocus(){this.disabled||this.triggerEl?.focus()}handleClick=()=>{this.disabled||this.triggerClick.emit()};handleFocus=()=>{this.triggerFocus.emit()};handleBlur=()=>{this.triggerBlur.emit()};render(){const e=""!==this.displayText;return r("div",{key:"2ec5e736c0742a10fdfa9b4b12b0820e99c30f7f",ref:e=>{this.triggerEl=e},role:"button","aria-haspopup":"listbox","aria-expanded":this.isOpen?"true":"false",tabindex:this.disabled?-1:0,class:{"sd-select-trigger":!0,"sd-select-trigger--open":this.isOpen,"sd-select-trigger--disabled":this.disabled},style:{"--trigger-padding-x":`${l.paddingX}px`,"--trigger-gap":`${l.gap}px`,"--trigger-font-size":`${o.fontSize}px`,"--trigger-line-height":`${o.lineHeight}px`,"--trigger-font-weight":o.fontWeight,"--trigger-color":this.disabled?c.text.disabled:e?c.text.default:c.icon.default,"--trigger-icon-color":this.disabled?c.icon.disabled:c.icon.default},onClick:this.handleClick,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleClick())},onFocus:this.handleFocus,onBlur:this.handleBlur},r("div",{key:"6b71e60a76d430bfe14bc5b7c59d82130be27c8a",class:"sd-select-trigger__content"},e&&g(this.displayText)?r("span",{class:"sd-select-trigger__text",ref:e=>e&&(e.innerHTML=d(this.displayText))}):r("span",{class:"sd-select-trigger__text"},e?this.displayText:this.placeholder??"선택"),r("sd-icon",{key:"e34eae87f518f1b015e1d59bacf97bec66b6ec6d",name:"chevronDown",size:12,color:"var(--trigger-icon-color)",class:{"sd-select-trigger__icon":!0,"sd-select-trigger__icon--open":this.isOpen}})))}static get style(){return"sd-select-trigger{display:block;width:100%;height:100%}sd-select-trigger .sd-select-trigger{display:flex;width:100%;height:100%;cursor:pointer;user-select:none;overflow:hidden;border-radius:3px}sd-select-trigger .sd-select-trigger--disabled{cursor:not-allowed}sd-select-trigger .sd-select-trigger__content{display:flex;align-items:center;gap:var(--trigger-gap);flex:1;padding:0 var(--trigger-padding-x);min-width:0}sd-select-trigger .sd-select-trigger__text{flex:1;font-size:var(--trigger-font-size);line-height:var(--trigger-line-height);font-weight:var(--trigger-font-weight);color:var(--trigger-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}sd-select-trigger .sd-select-trigger__icon{flex-shrink:0;transition:transform 0.2s ease}sd-select-trigger .sd-select-trigger__icon--open{transform:rotate(180deg)}"}},[512,"sd-select-trigger",{displayText:[1,"display-text"],placeholder:[1],disabled:[4],isOpen:[4,"is-open"],sdFocus:[64]}]);function h(){"undefined"!=typeof customElements&&["sd-select-trigger","sd-icon"].forEach((e=>{switch(e){case"sd-select-trigger":customElements.get(i(e))||customElements.define(i(e),a);break;case"sd-icon":customElements.get(i(e))||n()}}))}export{a as S,h as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as i,c as s,h as t,t as l}from"./p-PFLrdhQj.js";import{n as r}from"./p-CCwNgVmC.js";import{l as a}from"./p-DlJaYVWf.js";import{d as o}from"./p-BUgGuigd.js";import{d}from"./p-BE6ymp9E.js";import{d as c}from"./p-B-pJW3nY.js";import{d as n}from"./p-vtuEYpc6.js";import{d as p}from"./p-DckXBMgo.js";import{d as h}from"./p-BKV1WAFb.js";import{d as f}from"./p-BuADVB78.js";import{d as u}from"./p-CSh-DcM7.js";import{d as b}from"./p-paSLRXAR.js";var k={sm:{height:"28",paddingX:"12",gap:"8",radius:"4",typography:{fontWeight:"400",fontSize:"12",lineHeight:"20"},icon:"16"},text:{default:"#222222",placeholder:"#AAAAAA",disabled:"#888888"},icon:{disabled:"#BBBBBB"}};const m={height:k.sm.height,paddingX:k.sm.paddingX,gap:k.sm.gap,radius:k.sm.radius,fontSize:k.sm.typography.fontSize,lineHeight:k.sm.typography.lineHeight,fontWeight:k.sm.typography.fontWeight,iconSize:k.sm.icon},x={text:k.text,icon:{default:"#888888",disabled:k.icon.disabled}},g={radius:a.listBox.radius,bg:a.listBox.bg,chipPadding:a.listBox.chip.paddingXY,chipGap:a.listBox.chip.gap},_=e(class e extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.update=s(this,"sdUpdate",7),this.reject=s(this,"sdReject",7)}get el(){return this}value=null;placeholder="Click to upload";disabled=!1;inline=!1;multiple=!1;useMultipleListBox=!1;accept;maxFileSize;maxTotalSize;maxFiles;name=r();label="";labelWidth="";addonLabel="";addonAlign="start";hint="";errorMessage="";width="";rules;error=!1;status;icon=void 0;labelTooltip="";labelTooltipProps=null;focused=!1;hovered=!1;internalValue=null;showTooltip=!1;isListboxOpen=!1;listboxWidth="";fileInputRef;fileNamesRef;contentRef;formField;static VIEWPORT_PADDING=20;update;reject;valueChanged(e){this.internalValue=e}componentDidLoad(){this.checkOverflow()}componentDidUpdate(){this.checkOverflow()}async sdValidate(){return this.formField?.sdValidate()??Promise.resolve(!0)}async sdReset(){const e=this.multiple?[]:null;this.value=e,this.internalValue=e,this.fileInputRef&&(this.fileInputRef.value=""),await(this.formField?.sdResetValidation())}async sdResetValidate(){await(this.formField?.sdResetValidation())}toBytes(e){if(null!=e)return"string"==typeof e?Number(e):e}validateFiles(e,i=0){const s=this.toBytes(this.maxFileSize),t=this.toBytes(this.maxTotalSize),l=null!=this.maxFiles?Number(this.maxFiles):void 0;if(null!=l&&i+e.length>l)return{accepted:[],rejected:e,reason:"max-files"};if(null!=s){const i=e.filter((e=>e.size>s));if(i.length>0)return{accepted:[],rejected:i,reason:"max-file-size"}}return null!=t&&e.reduce(((e,i)=>e+i.size),0)>t?{accepted:[],rejected:e,reason:"max-total-size"}:{accepted:e,rejected:[]}}handleFileChange=e=>{const i=e.target.files;if(!i||0===i.length)return;const s=Array.from(i);if(this.multiple){const e=Array.isArray(this.internalValue)?this.internalValue:[],{accepted:i,rejected:t,reason:l}=this.validateFiles(s,e.length);if(this.fileInputRef&&(this.fileInputRef.value=""),null!=l)return void this.reject?.emit({files:t,reason:l});const r=[...e,...i];this.internalValue=r,this.value=r,this.update?.emit(this.value)}else{const{accepted:e,rejected:i,reason:t}=this.validateFiles(s);if(null!=t)return this.reject?.emit({files:i,reason:t}),void(this.fileInputRef&&(this.fileInputRef.value=""));this.internalValue=e[0],this.value=this.internalValue,this.update?.emit(this.value)}};handleClear=e=>{if(this.disabled)return;e.stopPropagation();const i=this.multiple?[]:null;this.value=i,this.internalValue=i,this.update?.emit(i),this.isListboxOpen=!1,this.fileInputRef&&(this.fileInputRef.value="")};handleClick=()=>{this.disabled||this.fileInputRef?.click()};handleListboxToggle=e=>{e.stopPropagation(),this.disabled||(this.isListboxOpen?this.isListboxOpen=!1:(this.contentRef&&(this.listboxWidth=`${this.contentRef.offsetWidth}px`),this.isListboxOpen=!0))};closeListbox=()=>{this.isListboxOpen=!1};hasFiles(){return Array.isArray(this.internalValue)?this.internalValue.length>0:!!this.internalValue}hasChips(){return Array.isArray(this.internalValue)&&this.internalValue.length>0}getDisplayText(){return this.hasFiles()?this.multiple&&Array.isArray(this.internalValue)?this.internalValue.map((e=>e.name)).join(", "):this.internalValue?.name||(this.placeholder??"Click to upload"):this.placeholder??"Click to upload"}handleChipRemove=e=>{if(!Array.isArray(this.internalValue))return;const i=[...this.internalValue];i.splice(e,1),this.internalValue=i,this.value=i,this.update?.emit(this.value),0===i.length&&(this.isListboxOpen=!1)};renderChipList(){return this.hasChips()?t("div",{class:"sd-file-picker__chip-list"},this.internalValue.map(((e,i)=>t("sd-chip",{value:e.name,onSdRemove:()=>this.handleChipRemove(i)})))):null}renderListbox(){return this.hasChips()&&this.isListboxOpen?t("sd-portal",{open:this.isListboxOpen,parentRef:this.contentRef,viewportPadding:e.VIEWPORT_PADDING,onSdClose:this.closeListbox},t("div",{class:"sd-file-picker__listbox",style:{width:this.listboxWidth,padding:`${g.chipPadding}px`,gap:`${g.chipGap}px`,borderRadius:`${g.radius}px`,background:g.bg}},this.internalValue.map(((e,i)=>t("sd-chip",{value:e.name,editable:!1,onSdRemove:()=>this.handleChipRemove(i)}))))):null}checkOverflow(){this.fileNamesRef&&(this.showTooltip=this.fileNamesRef.scrollWidth>this.fileNamesRef.clientWidth)}getIconColor(){return this.disabled?x.icon.disabled:x.icon.default}render(){const e=this.hasFiles(),i=this.getDisplayText(),s={"--sd-file-picker-font-size":`${m.fontSize}px`,"--sd-file-picker-line-height":`${m.lineHeight}px`,"--sd-file-picker-font-weight":m.fontWeight,"--sd-file-picker-padding-x":`${m.paddingX}px`,"--sd-file-picker-gap":`${m.gap}px`,"--sd-file-picker-text-color":x.text.default,"--sd-file-picker-placeholder-color":x.text.placeholder,"--sd-file-picker-disabled-color":x.text.disabled,"--sd-system-size-field-sm-height":`${m.height}px`,"--sd-system-radius-field-sm":`${m.radius}px`},l=this.multiple&&this.useMultipleListBox,r=t("div",{key:"692bb28ba1adaa90317e18c6b824ab7d2287eb96",role:"button",tabindex:this.disabled?-1:0,class:"sd-file-picker__content",ref:e=>this.contentRef=e,onClick:this.handleClick,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleClick())}},t("input",{key:"7a1cddff8097952c0c9eda9ae8d1b46b4a18967e",ref:e=>this.fileInputRef=e,type:"file",class:"sd-file-picker__input",disabled:this.disabled,multiple:this.multiple,accept:this.accept,onInput:this.handleFileChange,"aria-label":this.placeholder??"Click to upload"}),t("sd-icon",{key:"2f7dffb5bfc39efb0eace252a45aaaa23091d337",name:"attachFile",size:Number(m.iconSize),color:this.getIconColor(),class:"sd-file-picker__icon"}),t("div",{key:"1a6ae3daa59c7befebcfcfdcbbb2c46a32c6c40c",ref:e=>this.fileNamesRef=e,class:{"sd-file-picker__text":!0,"sd-file-picker__text--placeholder":!e,"sd-file-picker__text--active":e}},i),l&&e&&!this.disabled&&t("sd-ghost-button",{key:"895eafa47b1e1d851794fd471b304f8458bcac0f",icon:"caretDown",size:"xxs",ariaLabel:"toggle file list",disabled:this.disabled,class:{"sd-file-picker__caret":!0,"sd-file-picker__caret--open":this.isListboxOpen},onClick:this.handleListboxToggle}),!this.disabled&&e&&t("sd-ghost-button",{key:"38d3fe31be05ae66a170671ffb4855bce4984630",icon:"close",size:"xxs",ariaLabel:"clear",disabled:this.disabled,class:"sd-file-picker__clear-icon",onClick:this.handleClear}),this.showTooltip&&e&&this.hovered&&t("div",{key:"bb94815d7149ce9f1117828f893224c8bc1dbc50",class:"sd-file-picker__tooltip"},i));return t("div",{key:"3ada174508214a9fafd4f7f228ff52eb60aa76e4",class:{"sd-file-picker__wrapper":!0,"sd-file-picker--inline":this.inline,"sd-file-picker--inline-disabled":this.inline&&this.disabled},style:s},t("sd-field",{key:"29314b3ba5fc7c6b7d2f1a93a14381d9fb91bcfc",borderless:this.inline,name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,status:this.status,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1},r),this.useMultipleListBox?this.renderListbox():this.renderChipList())}static get watchers(){return{value:[{valueChanged:0}]}}static get style(){return"sd-file-picker{display:flex;flex-direction:column;width:100%}.sd-file-picker__wrapper{display:flex;flex-direction:column;width:100%}.sd-file-picker__chip-list{display:flex;flex-flow:row wrap;gap:8px;margin-top:8px}.sd-file-picker__content{width:100%;height:100%;display:flex;align-items:center;padding:0 var(--sd-file-picker-padding-x);gap:var(--sd-file-picker-gap);cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;vertical-align:middle}.sd-file-picker__text{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:var(--sd-file-picker-font-weight);font-size:var(--sd-file-picker-font-size);line-height:var(--sd-file-picker-line-height);color:var(--sd-file-picker-placeholder-color)}.sd-file-picker__text--active{color:var(--sd-file-picker-text-color)}.sd-file-picker__text--placeholder{color:var(--sd-file-picker-placeholder-color)}.sd-file-picker__icon{flex-shrink:0}.sd-file-picker__clear-icon{flex-shrink:0;cursor:pointer;transition:opacity 0.2s ease}.sd-file-picker__clear-icon:hover{opacity:0.7}.sd-file-picker__caret{flex-shrink:0;cursor:pointer;transition:transform 0.15s ease}.sd-file-picker__caret--open{transform:rotate(180deg)}.sd-file-picker__listbox{display:flex;flex-direction:column;align-items:stretch;box-sizing:border-box;max-width:100%;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1)}.sd-file-picker__input{display:none}.sd-file-picker__tooltip{position:absolute;top:calc(100% - 4px);left:50%;transform:translate(-50%);z-index:998;white-space:nowrap;padding:8px 12px;background:rgba(0, 0, 0, 0.8);color:white;font-size:12px;line-height:18px;border-radius:4px;pointer-events:none}.sd-field--disabled .sd-file-picker__content{cursor:not-allowed}.sd-field--disabled .sd-file-picker__text{color:var(--sd-file-picker-disabled-color)}.sd-file-picker--inline .sd-file-picker__content{padding:0}.sd-file-picker--inline .sd-file-picker__text{color:var(--sd-file-picker-placeholder-color)}.sd-file-picker--inline:not(.sd-file-picker--inline-disabled) .sd-file-picker__content:hover .sd-file-picker__text{color:var(--sd-file-picker-text-color)}.sd-file-picker--inline .sd-file-picker__text--active{color:var(--sd-file-picker-text-color)}.sd-file-picker--inline.sd-file-picker--inline-disabled .sd-file-picker__content{cursor:not-allowed}.sd-file-picker--inline.sd-file-picker--inline-disabled .sd-file-picker__text{color:var(--sd-file-picker-disabled-color)}"}},[512,"sd-file-picker",{value:[1040],placeholder:[513],disabled:[516],inline:[516],multiple:[516],useMultipleListBox:[516,"use-multiple-list-box"],accept:[1],maxFileSize:[8,"max-file-size"],maxTotalSize:[8,"max-total-size"],maxFiles:[8,"max-files"],name:[1],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],hint:[1],errorMessage:[1,"error-message"],width:[8],rules:[16],error:[1028],status:[1],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],focused:[1028],hovered:[1028],internalValue:[32],showTooltip:[32],isListboxOpen:[32],listboxWidth:[32],sdValidate:[64],sdReset:[64],sdResetValidate:[64]},void 0,{value:[{valueChanged:0}]}]);function v(){"undefined"!=typeof customElements&&["sd-file-picker","sd-button","sd-chip","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag","sd-tooltip"].forEach((e=>{switch(e){case"sd-file-picker":customElements.get(l(e))||customElements.define(l(e),_);break;case"sd-button":customElements.get(l(e))||o();break;case"sd-chip":customElements.get(l(e))||d();break;case"sd-field":customElements.get(l(e))||c();break;case"sd-floating-portal":customElements.get(l(e))||n();break;case"sd-ghost-button":customElements.get(l(e))||p();break;case"sd-icon":customElements.get(l(e))||h();break;case"sd-portal":customElements.get(l(e))||f();break;case"sd-tag":customElements.get(l(e))||u();break;case"sd-tooltip":customElements.get(l(e))||b()}}))}export{_ as S,v as d}
|
|
1
|
+
import{p as e,H as i,c as s,h as t,t as l}from"./p-Uh9emYrV.js";import{n as r}from"./p-CCwNgVmC.js";import{l as a}from"./p-DlJaYVWf.js";import{d as o}from"./p-oYbVr-z0.js";import{d}from"./p-C_in6AVN.js";import{d as c}from"./p-DN7MAx-q.js";import{d as n}from"./p-R-Sdglj0.js";import{d as p}from"./p-BFVfSW9t.js";import{d as h}from"./p-Di1q4f5E.js";import{d as f}from"./p-BHjezpAC.js";import{d as u}from"./p-f0aBxUBG.js";import{d as b}from"./p-DJmxpVkK.js";var k={sm:{height:"28",paddingX:"12",gap:"8",radius:"4",typography:{fontWeight:"400",fontSize:"12",lineHeight:"20"},icon:"16"},text:{default:"#222222",placeholder:"#AAAAAA",disabled:"#888888"},icon:{disabled:"#BBBBBB"}};const m={height:k.sm.height,paddingX:k.sm.paddingX,gap:k.sm.gap,radius:k.sm.radius,fontSize:k.sm.typography.fontSize,lineHeight:k.sm.typography.lineHeight,fontWeight:k.sm.typography.fontWeight,iconSize:k.sm.icon},x={text:k.text,icon:{default:"#888888",disabled:k.icon.disabled}},g={radius:a.listBox.radius,bg:a.listBox.bg,chipPadding:a.listBox.chip.paddingXY,chipGap:a.listBox.chip.gap},_=e(class e extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.update=s(this,"sdUpdate",7),this.reject=s(this,"sdReject",7)}get el(){return this}value=null;placeholder="Click to upload";disabled=!1;inline=!1;multiple=!1;useMultipleListBox=!1;accept;maxFileSize;maxTotalSize;maxFiles;name=r();label="";labelWidth="";addonLabel="";addonAlign="start";hint="";errorMessage="";width="";rules;error=!1;status;icon=void 0;labelTooltip="";labelTooltipProps=null;focused=!1;hovered=!1;internalValue=null;showTooltip=!1;isListboxOpen=!1;listboxWidth="";fileInputRef;fileNamesRef;contentRef;formField;static VIEWPORT_PADDING=20;update;reject;valueChanged(e){this.internalValue=e}componentDidLoad(){this.checkOverflow()}componentDidUpdate(){this.checkOverflow()}async sdValidate(){return this.formField?.sdValidate()??Promise.resolve(!0)}async sdReset(){const e=this.multiple?[]:null;this.value=e,this.internalValue=e,this.fileInputRef&&(this.fileInputRef.value=""),await(this.formField?.sdResetValidation())}async sdResetValidate(){await(this.formField?.sdResetValidation())}toBytes(e){if(null!=e)return"string"==typeof e?Number(e):e}validateFiles(e,i=0){const s=this.toBytes(this.maxFileSize),t=this.toBytes(this.maxTotalSize),l=null!=this.maxFiles?Number(this.maxFiles):void 0;if(null!=l&&i+e.length>l)return{accepted:[],rejected:e,reason:"max-files"};if(null!=s){const i=e.filter((e=>e.size>s));if(i.length>0)return{accepted:[],rejected:i,reason:"max-file-size"}}return null!=t&&e.reduce(((e,i)=>e+i.size),0)>t?{accepted:[],rejected:e,reason:"max-total-size"}:{accepted:e,rejected:[]}}handleFileChange=e=>{const i=e.target.files;if(!i||0===i.length)return;const s=Array.from(i);if(this.multiple){const e=Array.isArray(this.internalValue)?this.internalValue:[],{accepted:i,rejected:t,reason:l}=this.validateFiles(s,e.length);if(this.fileInputRef&&(this.fileInputRef.value=""),null!=l)return void this.reject?.emit({files:t,reason:l});const r=[...e,...i];this.internalValue=r,this.value=r,this.update?.emit(this.value)}else{const{accepted:e,rejected:i,reason:t}=this.validateFiles(s);if(null!=t)return this.reject?.emit({files:i,reason:t}),void(this.fileInputRef&&(this.fileInputRef.value=""));this.internalValue=e[0],this.value=this.internalValue,this.update?.emit(this.value)}};handleClear=e=>{if(this.disabled)return;e.stopPropagation();const i=this.multiple?[]:null;this.value=i,this.internalValue=i,this.update?.emit(i),this.isListboxOpen=!1,this.fileInputRef&&(this.fileInputRef.value="")};handleClick=()=>{this.disabled||this.fileInputRef?.click()};handleListboxToggle=e=>{e.stopPropagation(),this.disabled||(this.isListboxOpen?this.isListboxOpen=!1:(this.contentRef&&(this.listboxWidth=`${this.contentRef.offsetWidth}px`),this.isListboxOpen=!0))};closeListbox=()=>{this.isListboxOpen=!1};hasFiles(){return Array.isArray(this.internalValue)?this.internalValue.length>0:!!this.internalValue}hasChips(){return Array.isArray(this.internalValue)&&this.internalValue.length>0}getDisplayText(){return this.hasFiles()?this.multiple&&Array.isArray(this.internalValue)?this.internalValue.map((e=>e.name)).join(", "):this.internalValue?.name||(this.placeholder??"Click to upload"):this.placeholder??"Click to upload"}handleChipRemove=e=>{if(!Array.isArray(this.internalValue))return;const i=[...this.internalValue];i.splice(e,1),this.internalValue=i,this.value=i,this.update?.emit(this.value),0===i.length&&(this.isListboxOpen=!1)};renderChipList(){return this.hasChips()?t("div",{class:"sd-file-picker__chip-list"},this.internalValue.map(((e,i)=>t("sd-chip",{value:e.name,onSdRemove:()=>this.handleChipRemove(i)})))):null}renderListbox(){return this.hasChips()&&this.isListboxOpen?t("sd-portal",{open:this.isListboxOpen,parentRef:this.contentRef,viewportPadding:e.VIEWPORT_PADDING,onSdClose:this.closeListbox},t("div",{class:"sd-file-picker__listbox",style:{width:this.listboxWidth,padding:`${g.chipPadding}px`,gap:`${g.chipGap}px`,borderRadius:`${g.radius}px`,background:g.bg}},this.internalValue.map(((e,i)=>t("sd-chip",{value:e.name,editable:!1,onSdRemove:()=>this.handleChipRemove(i)}))))):null}checkOverflow(){this.fileNamesRef&&(this.showTooltip=this.fileNamesRef.scrollWidth>this.fileNamesRef.clientWidth)}getIconColor(){return this.disabled?x.icon.disabled:x.icon.default}render(){const e=this.hasFiles(),i=this.getDisplayText(),s={"--sd-file-picker-font-size":`${m.fontSize}px`,"--sd-file-picker-line-height":`${m.lineHeight}px`,"--sd-file-picker-font-weight":m.fontWeight,"--sd-file-picker-padding-x":`${m.paddingX}px`,"--sd-file-picker-gap":`${m.gap}px`,"--sd-file-picker-text-color":x.text.default,"--sd-file-picker-placeholder-color":x.text.placeholder,"--sd-file-picker-disabled-color":x.text.disabled,"--sd-system-size-field-sm-height":`${m.height}px`,"--sd-system-radius-field-sm":`${m.radius}px`},l=this.multiple&&this.useMultipleListBox,r=t("div",{key:"932b5549b6b27e0fec8096127dd8fb09f682fe56",role:"button",tabindex:this.disabled?-1:0,class:"sd-file-picker__content",ref:e=>this.contentRef=e,onClick:this.handleClick,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleClick())}},t("input",{key:"d10a6a2bc0606954588cee4ad77898ad28cbbe75",ref:e=>this.fileInputRef=e,type:"file",class:"sd-file-picker__input",disabled:this.disabled,multiple:this.multiple,accept:this.accept,onInput:this.handleFileChange,"aria-label":this.placeholder??"Click to upload"}),t("sd-icon",{key:"70102b5a6ff6606423ba36601015bccc2d48f22c",name:"attachFile",size:Number(m.iconSize),color:this.getIconColor(),class:"sd-file-picker__icon"}),t("div",{key:"7a0696f4f4b3ccd56c707bf2ecee59562ceb1a7b",ref:e=>this.fileNamesRef=e,class:{"sd-file-picker__text":!0,"sd-file-picker__text--placeholder":!e,"sd-file-picker__text--active":e}},i),l&&e&&!this.disabled&&t("sd-ghost-button",{key:"a68ba1cd8dabf75279eba8993befef8dd03008ae",icon:"caretDown",size:"xxs",ariaLabel:"toggle file list",disabled:this.disabled,class:{"sd-file-picker__caret":!0,"sd-file-picker__caret--open":this.isListboxOpen},onClick:this.handleListboxToggle}),!this.disabled&&e&&t("sd-ghost-button",{key:"6abcae4722ebbe7f888ce500774f3a749061ad4e",icon:"close",size:"xxs",ariaLabel:"clear",disabled:this.disabled,class:"sd-file-picker__clear-icon",onClick:this.handleClear}),this.showTooltip&&e&&this.hovered&&t("div",{key:"f1e3821eee58a1b126a6375a8d830a9fc9055cbe",class:"sd-file-picker__tooltip"},i));return t("div",{key:"952fbde18439ce103d62ede9e7b7a59dda408aa1",class:{"sd-file-picker__wrapper":!0,"sd-file-picker--inline":this.inline,"sd-file-picker--inline-disabled":this.inline&&this.disabled},style:s},t("sd-field",{key:"08ed598117f29d7c6977f75a73300c033bb6ec9d",borderless:this.inline,name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,status:this.status,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1},r),this.useMultipleListBox?this.renderListbox():this.renderChipList())}static get watchers(){return{value:[{valueChanged:0}]}}static get style(){return"sd-file-picker{display:flex;flex-direction:column;width:100%}.sd-file-picker__wrapper{display:flex;flex-direction:column;width:100%}.sd-file-picker__chip-list{display:flex;flex-flow:row wrap;gap:8px;margin-top:8px}.sd-file-picker__content{width:100%;height:100%;display:flex;align-items:center;padding:0 var(--sd-file-picker-padding-x);gap:var(--sd-file-picker-gap);cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;vertical-align:middle}.sd-file-picker__text{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:var(--sd-file-picker-font-weight);font-size:var(--sd-file-picker-font-size);line-height:var(--sd-file-picker-line-height);color:var(--sd-file-picker-placeholder-color)}.sd-file-picker__text--active{color:var(--sd-file-picker-text-color)}.sd-file-picker__text--placeholder{color:var(--sd-file-picker-placeholder-color)}.sd-file-picker__icon{flex-shrink:0}.sd-file-picker__clear-icon{flex-shrink:0;cursor:pointer;transition:opacity 0.2s ease}.sd-file-picker__clear-icon:hover{opacity:0.7}.sd-file-picker__caret{flex-shrink:0;cursor:pointer;transition:transform 0.15s ease}.sd-file-picker__caret--open{transform:rotate(180deg)}.sd-file-picker__listbox{display:flex;flex-direction:column;align-items:stretch;box-sizing:border-box;max-width:100%;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1)}.sd-file-picker__input{display:none}.sd-file-picker__tooltip{position:absolute;top:calc(100% - 4px);left:50%;transform:translate(-50%);z-index:998;white-space:nowrap;padding:8px 12px;background:rgba(0, 0, 0, 0.8);color:white;font-size:12px;line-height:18px;border-radius:4px;pointer-events:none}.sd-field--disabled .sd-file-picker__content{cursor:not-allowed}.sd-field--disabled .sd-file-picker__text{color:var(--sd-file-picker-disabled-color)}.sd-file-picker--inline .sd-file-picker__content{padding:0}.sd-file-picker--inline .sd-file-picker__text{color:var(--sd-file-picker-placeholder-color)}.sd-file-picker--inline:not(.sd-file-picker--inline-disabled) .sd-file-picker__content:hover .sd-file-picker__text{color:var(--sd-file-picker-text-color)}.sd-file-picker--inline .sd-file-picker__text--active{color:var(--sd-file-picker-text-color)}.sd-file-picker--inline.sd-file-picker--inline-disabled .sd-file-picker__content{cursor:not-allowed}.sd-file-picker--inline.sd-file-picker--inline-disabled .sd-file-picker__text{color:var(--sd-file-picker-disabled-color)}"}},[512,"sd-file-picker",{value:[1040],placeholder:[513],disabled:[516],inline:[516],multiple:[516],useMultipleListBox:[516,"use-multiple-list-box"],accept:[1],maxFileSize:[8,"max-file-size"],maxTotalSize:[8,"max-total-size"],maxFiles:[8,"max-files"],name:[1],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],hint:[1],errorMessage:[1,"error-message"],width:[8],rules:[16],error:[1028],status:[1],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],focused:[1028],hovered:[1028],internalValue:[32],showTooltip:[32],isListboxOpen:[32],listboxWidth:[32],sdValidate:[64],sdReset:[64],sdResetValidate:[64]},void 0,{value:[{valueChanged:0}]}]);function v(){"undefined"!=typeof customElements&&["sd-file-picker","sd-button","sd-chip","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag","sd-tooltip"].forEach((e=>{switch(e){case"sd-file-picker":customElements.get(l(e))||customElements.define(l(e),_);break;case"sd-button":customElements.get(l(e))||o();break;case"sd-chip":customElements.get(l(e))||d();break;case"sd-field":customElements.get(l(e))||c();break;case"sd-floating-portal":customElements.get(l(e))||n();break;case"sd-ghost-button":customElements.get(l(e))||p();break;case"sd-icon":customElements.get(l(e))||h();break;case"sd-portal":customElements.get(l(e))||f();break;case"sd-tag":customElements.get(l(e))||u();break;case"sd-tooltip":customElements.get(l(e))||b()}}))}export{_ as S,v as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as s,c as t,h as i,t as a}from"./p-
|
|
1
|
+
import{p as e,H as s,c as t,h as i,t as a}from"./p-Uh9emYrV.js";import{n as d}from"./p-CCwNgVmC.js";import{d as r,D as o,a as l}from"./p-DJ8z7_EG.js";import{d as n}from"./p-oYbVr-z0.js";import{d as h}from"./p-CmRF12Fy.js";import{d as c}from"./p-DN7MAx-q.js";import{d as p}from"./p-R-Sdglj0.js";import{d as m}from"./p-BFVfSW9t.js";import{d as b}from"./p-Di1q4f5E.js";import{d as g}from"./p-BHjezpAC.js";import{d as u}from"./p-f0aBxUBG.js";import{d as f}from"./p-DJmxpVkK.js";const k=e(class e extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.update=t(this,"sdUpdate",7),this.viewChange=t(this,"sdViewChange",7)}static CLOSE_ANIMATION_DURATION=150;get el(){return this}value=null;size="sm";placeholder="YYYY-MM-DD ~ YYYY-MM-DD";selectable;maxRange;disabled=!1;width="";label="";labelWidth="";addonLabel="";addonAlign="start";hint="";errorMessage="";rules=[];error=!1;icon=void 0;labelTooltip="";labelTooltipProps=null;isOpen=!1;isAnimatingOut=!1;focused=!1;hovered=!1;update;viewChange;triggerRef;formField;closeAnimationTimer;name=d();watchIsOpen(e){this.focused=e}async sdValidate(){return this.formField?.sdValidate()}async sdReset(){return this.formField?.sdReset()}async sdResetValidate(){return this.formField?.sdResetValidation()}closeDropdown(){this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),e.CLOSE_ANIMATION_DURATION))}handleTriggerClick=()=>{this.disabled||(this.isOpen?this.closeDropdown():(this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0))};handleSelect=e=>{this.closeDropdown(),this.value=e.detail;const s=this.value;requestAnimationFrame((()=>{this.update.emit(s)}))};handleViewChange=e=>{this.viewChange.emit(e.detail)};get displayText(){return null==this.value||""===this.value[0]||""===this.value[1]?"":`${this.value[0]} ~ ${this.value[1]}`}disconnectedCallback(){this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}render(){const e=l[this.size]??l.sm;return i("sd-field",{key:"00e25ab4608b5340b8be9e1dd19050968e34b758",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,size:this.size,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-system-size-field-sm-height":`${e.height}px`,"--sd-system-radius-field-sm":`${e.radius}px`,"--sd-system-color-field-border-default":o.border.default,"--sd-system-color-field-border-focus":o.border.focus,"--sd-system-color-field-bg-default":o.bg.default}},i("div",{key:"98179e2ec90e55f83e5deff6e36fc821fc103456",class:"sd-date-range-picker",ref:e=>{this.triggerRef=e}},i("sd-date-picker-trigger",{key:"fe123228a851da602f0a5a8929fc20782742a24b",displayText:this.displayText,placeholder:this.placeholder,disabled:this.disabled,size:this.size,onSdTriggerClick:this.handleTriggerClick})),(this.isOpen||this.isAnimatingOut)&&i("sd-portal",{key:"ee7eb14cc09fd067a8eeb9f19bd93178378d81b2",open:this.isOpen,parentRef:this.triggerRef,onSdClose:()=>this.closeDropdown()},i("sd-date-range-picker-calendar",{key:"8dc57a29f1ecd6811fb4538a96eea823dfebe080",value:this.value,selectable:this.selectable,maxRange:this.maxRange,onSdSelect:this.handleSelect,onSdViewChange:this.handleViewChange})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}static get style(){return"sd-date-range-picker{display:inline-flex}sd-date-range-picker sd-portal{display:none}sd-date-range-picker .sd-date-range-picker{position:relative;width:100%;height:100%}"}},[512,"sd-date-range-picker",{value:[1040],size:[513],placeholder:[513],selectable:[16],maxRange:[2,"max-range"],disabled:[516],width:[8],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],hint:[1],errorMessage:[1,"error-message"],rules:[16],error:[1028],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],name:[1],isOpen:[32],isAnimatingOut:[32],focused:[32],hovered:[32],sdValidate:[64],sdReset:[64],sdResetValidate:[64]},void 0,{isOpen:[{watchIsOpen:0}]}]);function y(){"undefined"!=typeof customElements&&["sd-date-range-picker","sd-button","sd-date-picker-trigger","sd-date-range-picker-calendar","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag","sd-tooltip"].forEach((e=>{switch(e){case"sd-date-range-picker":customElements.get(a(e))||customElements.define(a(e),k);break;case"sd-button":customElements.get(a(e))||n();break;case"sd-date-picker-trigger":customElements.get(a(e))||r();break;case"sd-date-range-picker-calendar":customElements.get(a(e))||h();break;case"sd-field":customElements.get(a(e))||c();break;case"sd-floating-portal":customElements.get(a(e))||p();break;case"sd-ghost-button":customElements.get(a(e))||m();break;case"sd-icon":customElements.get(a(e))||b();break;case"sd-portal":customElements.get(a(e))||g();break;case"sd-tag":customElements.get(a(e))||u();break;case"sd-tooltip":customElements.get(a(e))||f()}}))}export{k as S,y as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as i,c as s,h as e,t as h}from"./p-
|
|
1
|
+
import{p as t,H as i,c as s,h as e,t as h}from"./p-Uh9emYrV.js";import{d as n}from"./p-BFVfSW9t.js";import{d as o}from"./p-Di1q4f5E.js";import{d as a}from"./p-BHjezpAC.js";import{d}from"./p-f0aBxUBG.js";var r={default:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"12",fontWeight:"500",lineHeight:"20"},focus:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"12",fontWeight:"400",lineHeight:"20"}},c={default:"#F6F6F6",error:"#FCEFEF"},l={default:"#222222",error:"#E30000",focus:"#222222"};const p={height:`${"24"}px`,paddingX:`${"8"}px`,gap:`${"4"}px`,radius:`${"9999"}px`,borderWidth:`${{width:"1"}.width}px`},u={bg:{default:c.default,error:c.error},content:{default:l.default,error:l.error,focus:l.focus}},f={default:{fontFamily:r.default.fontFamily,fontSize:`${r.default.fontSize}px`,fontWeight:r.default.fontWeight,lineHeight:`${r.default.lineHeight}px`},focus:{fontFamily:r.focus.fontFamily,fontSize:`${r.focus.fontSize}px`,fontWeight:r.focus.fontWeight,lineHeight:`${r.focus.lineHeight}px`}},m=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.update=s(this,"sdUpdate",7),this.delete=s(this,"sdRemove",7),this.focus=s(this,"sdFocus",7),this.blur=s(this,"sdBlur",7)}get el(){return this}name="";value="";error=!1;disabled=!1;editable=!0;showRemove=!0;placeholder="";rules=[];internalValue="";isEditing=!1;update;delete;focus;blur;inputEl;draftValue="";shouldInitInput=!1;valueChanged(t){const i=t??"",s=this.isEditing;this.internalValue=i,this.draftValue=i,s&&(this.isEditing=!1,this.shouldInitInput=!1,this.inputEl?.blur(),this.blur.emit())}componentWillLoad(){this.internalValue=this.value??""}componentDidLoad(){this.registerToForm()}disconnectedCallback(){this.unregisterFromForm()}async sdValidate(){if(!this.rules||0===this.rules.length)return this.error=!1,!0;for(const t of this.rules)if(!0!==t(this.internalValue??""))return this.error=!0,!1;return this.error=!1,!0}async sdReset(){this.internalValue="",this.value="",this.error=!1,this.draftValue="",this.isEditing=!1,this.shouldInitInput=!1}async sdResetValidate(){this.error=!1}async sdResetValidation(){this.error=!1}async sdFocus(){this.disabled||this.enterEditMode()}async sdGetNativeElement(){return this.inputEl??null}get isEditable(){return!1!==this.editable}enterEditMode=()=>{this.disabled||this.isEditing||!this.isEditable||(this.draftValue=this.internalValue,this.shouldInitInput=!0,this.isEditing=!0,this.focus.emit())};commitEdit=async()=>{if(!this.isEditing)return;const t=(this.inputEl?.textContent??this.draftValue).trim(),i=t!==this.draftValue;this.internalValue=t,this.isEditing=!1,this.shouldInitInput=!1,this.value=t,i&&this.update.emit(t),await this.sdValidate(),this.blur.emit()};cancelEdit=()=>{this.isEditing&&(this.internalValue=this.draftValue,this.isEditing=!1,this.shouldInitInput=!1,this.blur.emit())};handleChipClick=()=>{this.disabled||this.isEditing||!this.isEditable||this.enterEditMode()};handleChipKeyDown=t=>{this.disabled||this.isEditing||!this.isEditable||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.enterEditMode())};handleInputChange=t=>{this.internalValue=t.target.textContent??""};handleInputKeyDown=t=>{"Enter"===t.key?(t.preventDefault(),t.stopPropagation(),this.commitEdit()):"Escape"===t.key&&(t.preventDefault(),t.stopPropagation(),this.cancelEdit())};handleInputBlur=()=>{this.commitEdit()};handlePaste=t=>{t.preventDefault();const i=t.clipboardData?.getData("text/plain")??"";document.execCommand("insertText",!1,i)};handleRemoveClick=t=>{t.stopPropagation(),this.disabled||this.delete.emit()};syncInputValue(t){if(!this.inputEl)return;this.inputEl.textContent=t;const i=document.createRange();i.selectNodeContents(this.inputEl),i.collapse(!1);const s=window.getSelection();s?.removeAllRanges(),s?.addRange(i)}registerToForm(){const t=this.el.closest("sd-form");t&&"function"==typeof t.componentOnReady&&t.componentOnReady().then((t=>{t.sdRegisterField(this)}))}unregisterFromForm(){if(""===this.name)return;const t=this.el.closest("sd-form");t?.componentOnReady().then((t=>{t.sdUnregisterField(this)}))}componentDidUpdate(){this.isEditing&&this.inputEl&&this.shouldInitInput&&(this.inputEl.focus(),this.syncInputValue(this.internalValue),this.shouldInitInput=!1)}resolveState(){return this.isEditing?"focus":this.error?"error":"default"}render(){const t=this.resolveState(),i=f.default,s={"--sd-chip-height":p.height,"--sd-chip-padding-x":p.paddingX,"--sd-chip-gap":p.gap,"--sd-chip-radius":p.radius,"--sd-chip-border-width":p.borderWidth,"--sd-chip-bg":"error"===t?u.bg.error:u.bg.default,"--sd-chip-content":"error"===t?u.content.error:u.content.default,"--sd-chip-border-color":"transparent","--sd-chip-font-family":i.fontFamily,"--sd-chip-font-size":i.fontSize,"--sd-chip-font-weight":i.fontWeight,"--sd-chip-line-height":i.lineHeight};return e("span",{key:"2cd717bc842330a28bbc89a662deda16f59106ee",class:{"sd-chip":!0,[`sd-chip--${t}`]:!0,"sd-chip--disabled":this.disabled,"sd-chip--editable":!this.disabled&&this.isEditable},role:this.disabled||!this.isEditable?void 0:"button",tabIndex:this.disabled||this.isEditing||!this.isEditable?-1:0,"aria-disabled":this.disabled?"true":void 0,style:s,onClick:this.handleChipClick,onKeyDown:this.handleChipKeyDown},this.isEditing?e("span",{key:"chip-input",ref:t=>this.inputEl=t,class:"sd-chip__input",role:"textbox",tabindex:this.disabled?-1:0,contentEditable:!this.disabled,"data-placeholder":this.placeholder,spellcheck:!1,onInput:this.handleInputChange,onKeyDown:this.handleInputKeyDown,onBlur:this.handleInputBlur,onPaste:this.handlePaste,onClick:t=>t.stopPropagation()}):[e("span",{key:"chip-label",class:"sd-chip__label"},this.internalValue),!this.disabled&&(this.showRemove??!0)&&e("sd-ghost-button",{key:"chip-remove",class:"sd-chip__remove",icon:"close",size:"xxs",ariaLabel:"remove",onClick:this.handleRemoveClick})])}static get watchers(){return{value:[{valueChanged:0}]}}static get style(){return"sd-chip{display:inline-flex;width:fit-content;max-width:100%;height:fit-content}sd-chip .sd-chip{display:inline-flex;align-items:center;justify-content:center;gap:var(--sd-chip-gap);max-width:100%;height:var(--sd-chip-height);padding:0 var(--sd-chip-padding-x);border-radius:var(--sd-chip-radius);background:var(--sd-chip-bg);color:var(--sd-chip-content);border:var(--sd-chip-border-width) solid var(--sd-chip-border-color);font-family:var(--sd-chip-font-family);font-size:var(--sd-chip-font-size);font-weight:var(--sd-chip-font-weight);line-height:var(--sd-chip-line-height);box-sizing:border-box;white-space:nowrap;overflow:hidden;-webkit-user-select:none;user-select:none}sd-chip .sd-chip--editable:not(.sd-chip--focus){cursor:text}sd-chip .sd-chip--disabled{cursor:not-allowed;opacity:0.6}sd-chip .sd-chip__label{display:inline-flex;align-items:center;min-width:0;overflow:hidden;text-overflow:ellipsis}sd-chip .sd-chip__input{display:inline-block;min-width:1ch;outline:none;background:transparent;color:inherit;font:inherit;white-space:nowrap;cursor:text}sd-chip .sd-chip__input:empty::before{content:attr(data-placeholder);color:inherit;opacity:0.6;pointer-events:none}sd-chip .sd-chip__remove{flex-shrink:0}"}},[512,"sd-chip",{name:[1],value:[1025],error:[1028],disabled:[4],editable:[4],showRemove:[4,"show-remove"],placeholder:[1],rules:[16],internalValue:[32],isEditing:[32],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdResetValidation:[64],sdFocus:[64],sdGetNativeElement:[64]},void 0,{value:[{valueChanged:0}]}]);function g(){"undefined"!=typeof customElements&&["sd-chip","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((t=>{switch(t){case"sd-chip":customElements.get(h(t))||customElements.define(h(t),m);break;case"sd-ghost-button":customElements.get(h(t))||n();break;case"sd-icon":customElements.get(h(t))||o();break;case"sd-portal":customElements.get(h(t))||a();break;case"sd-tag":customElements.get(h(t))||d()}}))}export{f as C,m as S,u as a,p as b,g as d}
|