@sellmate/design-system 1.31.0 → 1.33.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.field-C7it8cZm.js → component.field-TjxaMQMn.js} +8 -6
- package/dist/cjs/{component.listItem-cAO_ppOz.js → component.listItem-CfZSDrA7.js} +4 -2
- package/dist/cjs/{component.textinput-Bb-nU5xI.js → component.textinput-BTgbHS8t.js} +2 -1
- package/dist/cjs/design-system.cjs.js +2 -2
- package/dist/cjs/{index-Jr8OU0y9.js → index-PIjvNamO.js} +1 -1
- 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 +2 -2
- package/dist/cjs/sd-button_2.cjs.entry.js +1 -1
- package/dist/cjs/sd-calendar_2.cjs.entry.js +4 -4
- 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 +5 -3
- package/dist/cjs/sd-chip-input.cjs.entry.js +5 -4
- package/dist/cjs/sd-chip.cjs.entry.js +1 -1
- package/dist/cjs/sd-circle-progress.cjs.entry.js +2 -2
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +2 -2
- package/dist/cjs/sd-date-box.cjs.entry.js +1 -1
- package/dist/cjs/{sd-date-picker.config-CgyNxY03.js → sd-date-picker.config-CvdiwEii.js} +7 -5
- package/dist/cjs/sd-date-picker_8.cjs.entry.js +25 -24
- 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-expansion-item.cjs.entry.js +68 -0
- package/dist/cjs/sd-field_3.cjs.entry.js +21 -14
- package/dist/cjs/sd-form.cjs.entry.js +1 -1
- package/dist/cjs/sd-ghost-button_3.cjs.entry.js +1 -1
- package/dist/cjs/sd-guide.cjs.entry.js +4 -3
- package/dist/cjs/sd-key-value-table.cjs.entry.js +2 -2
- 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 +1 -1
- package/dist/cjs/sd-pagination.cjs.entry.js +4 -4
- package/dist/cjs/sd-popover.cjs.entry.js +7 -7
- package/dist/cjs/sd-popup.cjs.entry.js +4 -4
- package/dist/cjs/sd-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/sd-radio.cjs.entry.js +5 -3
- package/dist/cjs/sd-scroll-area.cjs.entry.js +44 -0
- package/dist/cjs/sd-select-list-item_4.cjs.entry.js +15 -14
- package/dist/cjs/sd-stepper.cjs.entry.js +190 -0
- package/dist/cjs/sd-switch.cjs.entry.js +4 -4
- package/dist/cjs/sd-tabs.cjs.entry.js +2 -2
- package/dist/cjs/sd-text-link.cjs.entry.js +4 -4
- package/dist/cjs/sd-time-picker-selector.cjs.entry.js +4 -4
- package/dist/cjs/sd-time-picker-trigger.cjs.entry.js +5 -5
- package/dist/cjs/sd-time-picker.cjs.entry.js +5 -5
- package/dist/cjs/{sd-time-picker.config-C7REB08L.js → sd-time-picker.config-BR3hVQiH.js} +28 -29
- package/dist/cjs/sd-time-range-picker-selector.cjs.entry.js +4 -4
- package/dist/cjs/sd-time-range-picker.cjs.entry.js +5 -5
- 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-B4KkVpu2.js → system-BGCBFBcM.js} +3 -1
- package/dist/cjs/{tooltipArrow-BlrFItn5.js → tooltipArrow-BUV7X2B8.js} +1 -1
- package/dist/cjs/{useDatePicker-j06ymWZ_.js → useDatePicker-D4fa6SZx.js} +1 -1
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/sd-divider/sd-divider.js +1 -1
- package/dist/collection/components/sd-expansion-item/sd-expansion-item.config.js +2 -0
- package/dist/collection/components/sd-expansion-item/sd-expansion-item.css +61 -0
- package/dist/collection/components/sd-expansion-item/sd-expansion-item.js +201 -0
- package/dist/collection/components/sd-field/sd-field.css +8 -0
- package/dist/collection/components/sd-field/sd-field.js +16 -9
- 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-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-number-input/sd-number-input.js +4 -4
- package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
- package/dist/collection/components/sd-popover/sd-popover.js +5 -5
- package/dist/collection/components/sd-popup/sd-popup.css +40 -0
- package/dist/collection/components/sd-popup/sd-popup.js +1 -1
- package/dist/collection/components/sd-scroll-area/sd-scroll-area.config.js +8 -0
- package/dist/collection/components/sd-scroll-area/sd-scroll-area.css +61 -0
- package/dist/collection/components/sd-scroll-area/sd-scroll-area.js +151 -0
- 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.css +33 -9
- 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-stepper/sd-stepper.config.js +35 -0
- package/dist/collection/components/sd-stepper/sd-stepper.css +50 -0
- package/dist/collection/components/sd-stepper/sd-stepper.js +186 -0
- 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-text-link/sd-text-link.js +3 -3
- package/dist/collection/components/sd-textarea/sd-textarea.js +1 -1
- package/dist/collection/components/sd-time-picker/sd-time-picker-selector/sd-time-picker-selector.js +1 -1
- package/dist/collection/components/sd-time-picker/sd-time-picker-trigger/sd-time-picker-trigger.js +2 -2
- package/dist/collection/components/sd-time-picker/sd-time-picker.js +2 -2
- package/dist/collection/components/sd-time-range-picker/sd-time-range-picker-selector/sd-time-range-picker-selector.js +1 -1
- package/dist/collection/components/sd-time-range-picker/sd-time-range-picker.js +2 -2
- 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-D8yhjm54.js → p-1ZYElZaM.js} +1 -1
- package/dist/components/p-7VzVE0oV.js +1 -0
- package/dist/components/{p-SYnTIeiO.js → p-B-DK72cc.js} +1 -1
- package/dist/components/{p-D9qp3o5Y.js → p-B7_BI_-L.js} +1 -1
- package/dist/components/{p-qZxAQy4p.js → p-B7fiz4d8.js} +1 -1
- package/dist/components/{p-DE8Ws9As.js → p-B7yWar7A.js} +1 -1
- package/dist/components/{p-DjKOoQuF.js → p-B9hmJn6D.js} +1 -1
- package/dist/components/{p-mcbwNjNT.js → p-BD30POlo.js} +1 -1
- package/dist/components/{p-DSWD8udu.js → p-BFBKrBpn.js} +1 -1
- package/dist/components/{p-CghFB91T.js → p-BPC5SuWU.js} +1 -1
- package/dist/components/{p-OnBLxJAP.js → p-BUNdqbhQ.js} +1 -1
- package/dist/components/{p-6U1qyU5A.js → p-BnioPrIq.js} +1 -1
- package/dist/components/{p-FGII920I.js → p-Bq8PIS3p.js} +1 -1
- package/dist/components/p-Br8E2gpA.js +1 -0
- package/dist/components/{p-CmCOLnc0.js → p-BsNOZUfc.js} +1 -1
- package/dist/components/{p-Dc9g3-5z.js → p-Bt0JuXIx.js} +1 -1
- package/dist/components/{p-Bxv2AFOb.js → p-C5P9PUI3.js} +1 -1
- package/dist/components/{p-B-EV9bey.js → p-CLhUHKxg.js} +1 -1
- package/dist/components/{p-CKV2W-zU.js → p-CWXl1y4p.js} +1 -1
- package/dist/components/{p-CTCt17CE.js → p-CZym_85X.js} +1 -1
- package/dist/components/{p-DasiqnrU.js → p-CbffRIae.js} +1 -1
- package/dist/components/{p-BvJ14GuJ.js → p-Cf3_sXLv.js} +1 -1
- package/dist/components/p-Cj1tlXCY.js +1 -0
- package/dist/components/{p-2g4jlJ3i.js → p-Cl_48yfz.js} +1 -1
- package/dist/components/{p-In6mljvA.js → p-CsBK3_Oz.js} +1 -1
- package/dist/components/{p-Hjv7LqkN.js → p-DI0Ozqgn.js} +1 -1
- package/dist/components/{p-C9IKm4j5.js → p-DQi-e0ko.js} +1 -1
- package/dist/components/{p-CwzkplrI.js → p-DWyPo9fo.js} +1 -1
- package/dist/components/{p-x9AWBHPy.js → p-D_XhV8nM.js} +1 -1
- package/dist/components/{p-BPzs63D8.js → p-DdvvWKaG.js} +1 -1
- package/dist/components/{p-C6o10dl7.js → p-Do-jFKZ8.js} +1 -1
- package/dist/components/{p-DYjaQs6e.js → p-DoeAW35u.js} +1 -1
- package/dist/components/{p-1DsQj3tv.js → p-Dq0k3GHj.js} +1 -1
- package/dist/components/{p-DnlLqzGM.js → p-DrZYy9kv.js} +1 -1
- package/dist/components/{p-ClbD4Gsr.js → p-GBy_9AmI.js} +1 -1
- package/dist/components/{p-CH9dgzTr.js → p-Hh0L_XZ6.js} +1 -1
- package/dist/components/{p-Ckr9iuVb.js → p-MquwxbYp.js} +1 -1
- package/dist/components/{p-B887QQl2.js → p-YMr1C1Dx.js} +1 -1
- package/dist/components/{p-CzJ9g73f.js → p-hXul9Vdx.js} +1 -1
- package/dist/components/{p-DWnuCSqC.js → p-jbqIrDHw.js} +1 -1
- package/dist/components/{p-DOfLrOEu.js → p-n7Aqcaet.js} +1 -1
- package/dist/components/{p-Bth2l1cy.js → p-rayWyWtG.js} +1 -1
- package/dist/components/{p-DMm_GeZC.js → p-tH_3uKAX.js} +1 -1
- 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-expansion-item.d.ts +11 -0
- package/dist/components/sd-expansion-item.js +1 -0
- 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-scroll-area.d.ts +11 -0
- package/dist/components/sd-scroll-area.js +1 -0
- 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-stepper.d.ts +11 -0
- package/dist/components/sd-stepper.js +1 -0
- 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-time-picker-selector.js +1 -1
- package/dist/components/sd-time-picker-trigger.js +1 -1
- package/dist/components/sd-time-picker.js +1 -1
- package/dist/components/sd-time-range-picker-selector.js +1 -1
- package/dist/components/sd-time-range-picker.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-BnUjeY2n.js → p--VkAQGHJ.js} +1 -1
- package/dist/design-system/{p-15f43b9b.entry.js → p-013bc087.entry.js} +1 -1
- package/dist/design-system/{p-b2dc1202.entry.js → p-06dd824e.entry.js} +1 -1
- package/dist/design-system/{p-e0e4a451.entry.js → p-115023e4.entry.js} +1 -1
- package/dist/design-system/{p-46da4e95.entry.js → p-11f0b27f.entry.js} +1 -1
- package/dist/design-system/p-1226fe8a.entry.js +1 -0
- package/dist/design-system/{p-82cb62a9.entry.js → p-151e6c9a.entry.js} +1 -1
- package/dist/design-system/{p-cdb2433a.entry.js → p-199eaf3b.entry.js} +1 -1
- package/dist/design-system/{p-843d1a8a.entry.js → p-25bb7c8d.entry.js} +1 -1
- package/dist/design-system/{p-c1e625e5.entry.js → p-3874f72a.entry.js} +1 -1
- package/dist/design-system/p-39d9250a.entry.js +1 -0
- package/dist/design-system/{p-e387ec65.entry.js → p-3cb1bd19.entry.js} +1 -1
- package/dist/design-system/{p-16b9eac4.entry.js → p-3d1f8228.entry.js} +1 -1
- package/dist/design-system/{p-2534d3d4.entry.js → p-409d9ad3.entry.js} +1 -1
- package/dist/design-system/{p-b5229957.entry.js → p-444bb9d8.entry.js} +1 -1
- package/dist/design-system/{p-22ac9e05.entry.js → p-4dd46ee3.entry.js} +1 -1
- package/dist/design-system/p-4e04d600.entry.js +1 -0
- package/dist/design-system/{p-4ae0a64a.entry.js → p-4edcb754.entry.js} +1 -1
- package/dist/design-system/{p-a9cc4697.entry.js → p-5121075d.entry.js} +1 -1
- package/dist/design-system/{p-4a117dd6.entry.js → p-513e9cbd.entry.js} +1 -1
- package/dist/design-system/p-52cf9533.entry.js +1 -0
- package/dist/design-system/{p-c7f03dea.entry.js → p-56c15038.entry.js} +1 -1
- package/dist/design-system/p-6726cdf9.entry.js +1 -0
- package/dist/design-system/{p-a0c55a19.entry.js → p-67f1f4da.entry.js} +1 -1
- package/dist/design-system/{p-570b9e91.entry.js → p-697fe396.entry.js} +1 -1
- package/dist/design-system/{p-6c4fa9d7.entry.js → p-6bd2918c.entry.js} +1 -1
- package/dist/design-system/{p-46eb3421.entry.js → p-6cc37004.entry.js} +1 -1
- package/dist/design-system/{p-8af8e302.entry.js → p-7dbfbdc6.entry.js} +1 -1
- package/dist/design-system/{p-129b6330.entry.js → p-909740d3.entry.js} +1 -1
- package/dist/design-system/p-91b33f8c.entry.js +1 -0
- package/dist/design-system/{p-efe3601d.entry.js → p-94e8016a.entry.js} +1 -1
- package/dist/design-system/{p-8836d9ff.entry.js → p-9a75c827.entry.js} +1 -1
- package/dist/design-system/{p-d5325895.entry.js → p-9bdc1024.entry.js} +1 -1
- package/dist/design-system/{p-DjKOoQuF.js → p-B9hmJn6D.js} +1 -1
- package/dist/design-system/{p-Dz23PPdF.js → p-Bc1bqF3P.js} +1 -1
- package/dist/design-system/p-YU6oWX32.js +2 -0
- package/dist/design-system/{p-9c131122.entry.js → p-a4063e6e.entry.js} +1 -1
- package/dist/design-system/{p-52b1be6f.entry.js → p-a6ad7139.entry.js} +1 -1
- package/dist/design-system/{p-3859316f.entry.js → p-a8dc243c.entry.js} +1 -1
- package/dist/design-system/{p-a6c292d1.entry.js → p-c0b77a96.entry.js} +1 -1
- package/dist/design-system/{p-219288ef.entry.js → p-d2fd5d5a.entry.js} +1 -1
- package/dist/design-system/{p-5a113197.entry.js → p-d346f5bf.entry.js} +1 -1
- package/dist/design-system/{p-21672bb8.entry.js → p-d3f6262e.entry.js} +1 -1
- package/dist/design-system/{p-62ff77e4.entry.js → p-d52ed5b8.entry.js} +1 -1
- package/dist/design-system/{p-809a0a71.entry.js → p-e722acec.entry.js} +1 -1
- package/dist/design-system/p-f3b1e6d4.entry.js +1 -0
- package/dist/design-system/{p-66cff123.entry.js → p-f77ca71d.entry.js} +1 -1
- package/dist/design-system/{p-1858636f.entry.js → p-fc5cf632.entry.js} +1 -1
- package/dist/design-system/{p-655324cd.entry.js → p-fd73281c.entry.js} +1 -1
- package/dist/design-system/{p-Cn8LZw1e.js → p-qK7MPoKS.js} +1 -1
- package/dist/design-system/{p-Bth2l1cy.js → p-rayWyWtG.js} +1 -1
- package/dist/design-system/{p-DMm_GeZC.js → p-tH_3uKAX.js} +1 -1
- package/dist/esm/{component.field-DjKOoQuF.js → component.field-B9hmJn6D.js} +8 -6
- package/dist/esm/{component.listItem-4S0_Ykmo.js → component.listItem-DgXp5DEl.js} +4 -2
- package/dist/esm/{component.textinput-e0ABNkP6.js → component.textinput-BqZ8dpm7.js} +2 -1
- package/dist/esm/design-system.js +3 -3
- package/dist/esm/{index-C599jhDs.js → index-YU6oWX32.js} +1 -1
- 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 +2 -2
- package/dist/esm/sd-button_2.entry.js +1 -1
- package/dist/esm/sd-calendar_2.entry.js +4 -4
- 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 +5 -3
- package/dist/esm/sd-chip-input.entry.js +5 -4
- package/dist/esm/sd-chip.entry.js +1 -1
- package/dist/esm/sd-circle-progress.entry.js +2 -2
- package/dist/esm/sd-confirm-modal_2.entry.js +2 -2
- package/dist/esm/sd-date-box.entry.js +1 -1
- package/dist/esm/{sd-date-picker.config-CdXJcOGr.js → sd-date-picker.config-ab8NXZUc.js} +7 -5
- package/dist/esm/sd-date-picker_8.entry.js +25 -24
- 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-expansion-item.entry.js +66 -0
- package/dist/esm/sd-field_3.entry.js +21 -14
- package/dist/esm/sd-form.entry.js +1 -1
- package/dist/esm/sd-ghost-button_3.entry.js +1 -1
- package/dist/esm/sd-guide.entry.js +4 -3
- package/dist/esm/sd-key-value-table.entry.js +2 -2
- 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 +1 -1
- package/dist/esm/sd-pagination.entry.js +4 -4
- package/dist/esm/sd-popover.entry.js +7 -7
- package/dist/esm/sd-popup.entry.js +4 -4
- package/dist/esm/sd-radio-button.entry.js +1 -1
- package/dist/esm/sd-radio.entry.js +5 -3
- package/dist/esm/sd-scroll-area.entry.js +42 -0
- package/dist/esm/sd-select-list-item_4.entry.js +15 -14
- package/dist/esm/sd-stepper.entry.js +188 -0
- package/dist/esm/sd-switch.entry.js +4 -4
- package/dist/esm/sd-tabs.entry.js +2 -2
- package/dist/esm/sd-text-link.entry.js +4 -4
- package/dist/esm/sd-time-picker-selector.entry.js +4 -4
- package/dist/esm/sd-time-picker-trigger.entry.js +5 -5
- package/dist/esm/{sd-time-picker.config-DUq29Nhs.js → sd-time-picker.config-nR5BQAyT.js} +28 -29
- package/dist/esm/sd-time-picker.entry.js +5 -5
- package/dist/esm/sd-time-range-picker-selector.entry.js +4 -4
- package/dist/esm/sd-time-range-picker.entry.js +5 -5
- 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-Bth2l1cy.js → system-rayWyWtG.js} +3 -1
- package/dist/esm/{tooltipArrow-DbLihSLI.js → tooltipArrow-D3op61Yf.js} +1 -1
- package/dist/esm/{useDatePicker-DQ5Kyy_D.js → useDatePicker-DFUnA3DH.js} +1 -1
- package/dist/types/components/sd-expansion-item/sd-expansion-item.config.d.ts +57 -0
- package/dist/types/components/sd-expansion-item/sd-expansion-item.d.ts +21 -0
- package/dist/types/components/sd-field/sd-field.d.ts +5 -1
- package/dist/types/components/sd-number-input/sd-number-input.config.d.ts +2 -2
- package/dist/types/components/sd-scroll-area/sd-scroll-area.config.d.ts +5 -0
- package/dist/types/components/sd-scroll-area/sd-scroll-area.d.ts +14 -0
- package/dist/types/components/sd-stepper/sd-stepper.config.d.ts +43 -0
- package/dist/types/components/sd-stepper/sd-stepper.d.ts +18 -0
- package/dist/types/components/sd-time-picker/sd-time-picker.config.d.ts +10 -3
- package/dist/types/components.d.ts +234 -2
- package/hydrate/index.js +481 -126
- package/hydrate/index.mjs +481 -126
- package/package.json +1 -1
- package/dist/components/p-C6wuKkUq.js +0 -1
- package/dist/components/p-DsZwiWiU.js +0 -1
- package/dist/components/p-bXzpfkfN.js +0 -1
- package/dist/design-system/p-4782331f.entry.js +0 -1
- package/dist/design-system/p-56e7c87b.entry.js +0 -1
- package/dist/design-system/p-C599jhDs.js +0 -2
- package/dist/design-system/p-b75cc0dd.entry.js +0 -1
- package/dist/design-system/p-b97a6cf3.entry.js +0 -1
- /package/dist/components/{p-e0ABNkP6.js → p-BqZ8dpm7.js} +0 -0
- /package/dist/components/{p-4S0_Ykmo.js → p-DgXp5DEl.js} +0 -0
- /package/dist/design-system/{p-e0ABNkP6.js → p-BqZ8dpm7.js} +0 -0
- /package/dist/design-system/{p-4S0_Ykmo.js → p-DgXp5DEl.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as s,H as a,c as o,h as e,d,t}from"./p-
|
|
1
|
+
import{p as s,H as a,c as o,h as e,d,t}from"./p-Br8E2gpA.js";import{m as i}from"./p-Cw8yDfQh.js";import{d as l}from"./p-CWXl1y4p.js";import{d as n}from"./p-GBy_9AmI.js";import{d as r}from"./p-B-DK72cc.js";import{d as m}from"./p-jbqIrDHw.js";import{d as g}from"./p-Hh0L_XZ6.js";import{d as c}from"./p-CZym_85X.js";const h={minWidth:Number(i.modal.loading.width),minHeight:Number(i.modal.loading.height),gap:Number(i.modal.loading.gap),contentSize:Number(i.modal.loading.content),radius:Number(i.modal.radius)},u={bg:i.modal.bg,messageColor:i.modal.loading.message.color,errorIcon:i.modal.confirm.negative.icon},p=i.modal.loading.message.typography.fontFamily,b=Number(i.modal.loading.message.typography.fontSize),f=Number(i.modal.loading.message.typography.fontWeight),_=Number(i.modal.loading.message.typography.lineHeight),y={loading:"작업 진행중...",error:"작업에 실패하였습니다. 다시 시도해 주세요."},v={loading:"작업 취소",error:"다시 시도"},x=s(class extends a{constructor(s){super(),!1!==s&&this.__registerHost(),this.click=o(this,"sdClick",7),this.close=o(this,"sdClose",7)}state="loading";message="";useButton=!1;buttonLabel="";width;height;progress;click;close;get resolvedState(){return this.state??"loading"}get resolvedMessage(){return this.message||y[this.resolvedState]}get resolvedButtonLabel(){return this.buttonLabel||v[this.resolvedState]}get showButton(){return this.useButton||"error"===this.resolvedState}handleClick=()=>{this.click.emit()};toCssSize(s){if(null!=s&&""!==s)return"number"==typeof s?`${s}px`:s}render(){const s={"--sd-loading-modal-min-width":`${h.minWidth}px`,"--sd-loading-modal-min-height":`${h.minHeight}px`,"--sd-loading-modal-gap":`${h.gap}px`,"--sd-loading-modal-content-size":`${h.contentSize}px`,"--sd-loading-modal-radius":`${h.radius}px`,"--sd-loading-modal-bg":u.bg,"--sd-loading-modal-message-color":u.messageColor,"--sd-loading-modal-message-font-family":p,"--sd-loading-modal-message-font-size":`${b}px`,"--sd-loading-modal-message-font-weight":`${f}`,"--sd-loading-modal-message-line-height":`${_}px`,"--sd-loading-modal-error-color":u.errorIcon,"--sd-loading-modal-width":this.toCssSize(this.width)??`${h.minWidth}px`,"--sd-loading-modal-height":this.toCssSize(this.height)??`${h.minHeight}px`};return e(d,{key:"3345eafdbadbeafbded749980fc430a562641186",style:s},e("div",{key:"f2e176fef188efddf8da7c1eb7ec1b81c297103a",class:"sd-loading-modal"},"error"===this.resolvedState&&e("sd-ghost-button",{key:"10467944830b01596eaf0d2b71bed674965a4c49",class:"sd-loading-modal__close",icon:"close",ariaLabel:"close",onClick:()=>this.close.emit()}),e("div",{key:"93f086d4e84705eebd44ad08eaca0a99f9d604a0",class:"sd-loading-modal__content"},"loading"===this.resolvedState?e("sd-circle-progress",void 0!==this.progress?{value:this.progress}:{indeterminate:!0}):e("sd-icon",{class:"sd-loading-modal__icon",name:"warningOutline",size:h.contentSize,color:u.errorIcon})),e("div",{key:"c18752743b70f933746d8057c78c126b2f02520e",class:"sd-loading-modal__message-wrapper"},Array.isArray(this.resolvedMessage)?this.resolvedMessage.map((s=>e("p",{class:"sd-loading-modal__message"},s))):e("p",{class:"sd-loading-modal__message"},this.resolvedMessage)),this.showButton&&e("div",{key:"260f9247f8a7e66ea16ddf7866b560f15c824be8",class:"sd-loading-modal__button"},e("sd-button",{key:"ab5ca5a2bc6adb63b15f7a8cc22fa9c091f627bd",name:"neutral_outline_sm",label:this.resolvedButtonLabel,onSdClick:this.handleClick}))))}static get style(){return"sd-loading-modal{display:inline-block}sd-loading-modal .sd-loading-modal{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--sd-loading-modal-gap);min-width:var(--sd-loading-modal-min-width);min-height:var(--sd-loading-modal-min-height);width:var(--sd-loading-modal-width, auto);height:var(--sd-loading-modal-height, auto);border-radius:var(--sd-loading-modal-radius);background:var(--sd-loading-modal-bg);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.2)}sd-loading-modal .sd-loading-modal__close{position:absolute;top:16px;right:16px;cursor:pointer}sd-loading-modal .sd-loading-modal__content{display:flex;align-items:center;justify-content:center;width:var(--sd-loading-modal-content-size);height:var(--sd-loading-modal-content-size)}sd-loading-modal .sd-loading-modal__message{margin:0;color:var(--sd-loading-modal-message-color);font-family:var(--sd-loading-modal-message-font-family);font-size:var(--sd-loading-modal-message-font-size);font-weight:var(--sd-loading-modal-message-font-weight);line-height:var(--sd-loading-modal-message-line-height);text-align:center}sd-loading-modal .sd-loading-modal__button{display:flex;justify-content:center}"}},[512,"sd-loading-modal",{state:[513],message:[1],useButton:[516,"use-button"],buttonLabel:[1,"button-label"],width:[8],height:[8],progress:[2]}]);function k(){"undefined"!=typeof customElements&&["sd-loading-modal","sd-button","sd-circle-progress","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((s=>{switch(s){case"sd-loading-modal":customElements.get(t(s))||customElements.define(t(s),x);break;case"sd-button":customElements.get(t(s))||l();break;case"sd-circle-progress":customElements.get(t(s))||n();break;case"sd-ghost-button":customElements.get(t(s))||r();break;case"sd-icon":customElements.get(t(s))||m();break;case"sd-portal":customElements.get(t(s))||g();break;case"sd-tag":customElements.get(t(s))||c()}}))}export{x as S,k as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={field:{label:{sm:{height:"28",gap:"6",icon:"16",typography:{
|
|
1
|
+
var e={field:{label:{sm:{height:"28",gap:"6",icon:"16",typography:{fontSize:"12",lineHeight:"20",fontWeight:"700"}},md:{height:"36",gap:"8",icon:"16",typography:{fontWeight:"700",fontSize:"14",lineHeight:"24"}}},addonLabel:{gap:"6",paddingX:"12",typography:{fontSize:"12",lineHeight:"20",fontWeight:"500"},bg:"#F6F6F6",border:{default:"#AAAAAA",disabled:"#CCCCCC",width:"1"}},hint:{typography:{fontSize:"12",lineHeight:"20"},color:"#555555"},errorMessage:{typography:{fontSize:"12",lineHeight:"20"},color:"#E30000"},contents:{gap:"4"}}};export{e as f}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,c as i,h as s,t as n}from"./p-C6wuKkUq.js";import{n as r}from"./p-CCwNgVmC.js";import{f as d}from"./p-DjKOoQuF.js";import{d as u}from"./p-DsZwiWiU.js";import{d as a}from"./p-DSWD8udu.js";import{d as o}from"./p-SYnTIeiO.js";import{d as l}from"./p-DWnuCSqC.js";import{d as p}from"./p-CH9dgzTr.js";import{d as h}from"./p-CTCt17CE.js";import{d as c}from"./p-qZxAQy4p.js";var m={numberInput:{sm:{height:"28",paddingX:"6",radius:"4",typography:{fontWeight:"400",fontSize:"12",lineHeight:"20"}},md:{height:"36",paddingX:"8",radius:"6",typography:{fontWeight:"400",fontSize:"14",lineHeight:"24"}},border:{default:"#AAAAAA",focus:"#0075FF",danger:"#FB4444"},bg:{default:"#FFFFFF"},text:{default:"#222222",placeholder:"#AAAAAA",disabled:"#888888"},stepper:{sm:{size:"20"},md:{size:"24"},radius:"4",bg:{default:"#EFF6FF",disabled:"#EEEEEE"},icon:{default:"#0075FF",disabled:"#BBBBBB"}}}};const b=m.numberInput.sm,f=m.numberInput.md,g={sm:{height:b.height,paddingX:b.paddingX,radius:b.radius,fontSize:b.typography.fontSize,lineHeight:b.typography.lineHeight,fontWeight:b.typography.fontWeight},md:{height:f.height,paddingX:f.paddingX,radius:f.radius,fontSize:f.typography.fontSize,lineHeight:f.typography.lineHeight,fontWeight:f.typography.fontWeight}},y={border:m.numberInput.border,bg:m.numberInput.bg,text:m.numberInput.text},x={sm:{size:m.numberInput.stepper.sm.size},md:{size:m.numberInput.stepper.md.size},radius:m.numberInput.stepper.radius,bg:m.numberInput.stepper.bg,icon:m.numberInput.stepper.icon},_=d.field.hint,v=d.field.errorMessage,w=d.field.contents.gap,k=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.update=i(this,"sdUpdate",7),this.focus=i(this,"sdFocus",7),this.blur=i(this,"sdBlur",7)}get el(){return this}size="sm";min=Number.NEGATIVE_INFINITY;max=Number.POSITIVE_INFINITY;step=1;useButton=!1;useDecimal=!1;maxDecimalLength;value=null;label;labelWidth="";icon=void 0;labelTooltip="";labelTooltipProps=null;addonLabel="";addonAlign="start";placeholder="입력해 주세요.";disabled=!1;width;rules=[];autoFocus=!1;status;hint="";errorMessage="";inputPrefix="";inputSuffix="";inputClass="";readonly=!1;inputStyle={};error=!1;focused=!1;hovered=!1;internalValue=null;displayValue="";nativeEl=void 0;formField;name=r();update;focus;blur;toNumber(t){if(null==t||""===t)return null;if("number"==typeof t)return isNaN(t)?null:t;if("string"==typeof t)return this.parseInput(t);const e=Number(t);return isNaN(e)?null:e}formatWithCommas(t){if(null==t||isNaN(t))return"";const e=t<0,i=Math.abs(t),[s,n]=i.toString().split("."),r=(+s).toLocaleString(),d=e?"-"+r:r;return void 0!==n&&""!==n?d+"."+n:String(d)}getDecimalLimit(){if(this.useDecimal&&void 0!==this.maxDecimalLength&&Number.isFinite(this.maxDecimalLength))return Math.max(0,Math.floor(this.maxDecimalLength))}truncateToDecimalLimit(t,e){if(!t.includes("."))return t;const[i,s=""]=t.split("."),n=s.slice(0,e);return""===n?i:`${i}.${n}`}applyDecimalLimit(t){const e=this.getDecimalLimit();if(void 0===e)return t;const i=parseFloat(this.truncateToDecimalLimit(t.toString(),e));return isNaN(i)?t:i}parseInput(t){if(""===t.trim())return null;const e=t.replace(/,/g,"").trim();if(!/^-?(\d+\.?\d*|\d*\.\d+)$/.test(e))return null;if(!this.useDecimal&&e.includes("."))return null;const i=this.getDecimalLimit(),s=void 0!==i?this.truncateToDecimalLimit(e,i):e,n=parseFloat(s);return isNaN(n)?null:n}clampMinMax(t){return isNaN(t)?0:Math.min(Math.max(t,this.min),this.max)}updateDisplay(){this.displayValue=this.formatWithCommas(this.internalValue)}isIncrementDisabled(){return!(!this.disabled&&!this.readonly)||null!==this.internalValue&&this.internalValue>=this.max}isDecrementDisabled(){return!(!this.disabled&&!this.readonly)||null!==this.internalValue&&this.internalValue<=this.min}valueChanged(t){const e=this.toNumber(t);this.internalValue=null!==e?this.clampMinMax(e):null,this.updateDisplay()}internalValueChanged(t){this.updateDisplay(),t!==this.value&&(this.value=t,this.update?.emit(t))}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}async sdGetNativeElement(){return this.nativeEl||null}componentWillLoad(){const t=this.toNumber(this.value);null!==t&&(this.internalValue=this.clampMinMax(t)),this.updateDisplay()}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=t=>{const e=t.target,i=e.value;if(""===i)return this.internalValue=null,void(this.displayValue="");const s=i.replace(/,/g,""),n=(s.match(/\./g)||[]).length;if(n>1)return void(e.value=this.displayValue);if("-"===s||"."===s||"-."===s)return void(e.value=s);if(s.endsWith(".")&&1===n){const t=s.slice(0,-1),i=this.parseInput(t);if(null!==i){const t=this.formatWithCommas(i);return void(e.value=t+".")}}const r=this.parseInput(s);if(null!==r){if(r<this.min)return void(e.value=this.displayValue);if(r>this.max)return void(e.value=this.displayValue);this.internalValue=r,this.displayValue=this.formatWithCommas(r),e.value=this.displayValue}else e.value=this.displayValue};handleFocus=t=>{this.focused=!0,this.focus?.emit(t)};handleBlur=async t=>{this.updateDisplay(),this.nativeEl&&(this.nativeEl.value=this.displayValue),this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.focused=!1,this.blur?.emit(t)};handleKeyDown=t=>{"ArrowUp"===t.key?(t.preventDefault(),this.handleIncrement()):"ArrowDown"===t.key&&(t.preventDefault(),this.handleDecrement())};handleIncrement=()=>{if(this.isIncrementDisabled())return;const t=this.internalValue??this.min??0;let e=t+this.step;e>this.max&&(e=this.max),e=this.applyDecimalLimit(e),e!==t&&(this.internalValue=e)};handleDecrement=()=>{if(this.isDecrementDisabled())return;const t=this.internalValue??this.min??0;let e=t-this.step;e<this.min&&(e=this.min),e=this.applyDecimalLimit(e),e!==t&&(this.internalValue=e)};render(){const t=g[this.size]??g.sm,e="md"===this.size?14:12;return s("sd-field",{key:"ffa6befb9565a33e762fce231c29d7a2f663eb08",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-number-input-font-size":`${t.fontSize}px`,"--sd-number-input-line-height":`${t.lineHeight}px`,"--sd-number-input-font-weight":t.fontWeight,"--sd-number-input-padding-x":`${t.paddingX}px`,"--sd-number-input-text-color":y.text.default,"--sd-number-input-placeholder-color":y.text.placeholder,"--sd-number-input-disabled-color":y.text.disabled,"--sd-number-input-stepper-size":`${x[this.size]?.size??x.sm.size}px`,"--sd-number-input-stepper-radius":`${x.radius}px`,"--sd-number-input-stepper-bg":x.bg.default,"--sd-number-input-stepper-bg-disabled":x.bg.disabled,"--sd-number-input-stepper-icon-color":x.icon.default,"--sd-number-input-stepper-icon-disabled":x.icon.disabled,"--sd-system-size-field-sm-height":`${t.height}px`,"--sd-system-radius-field-sm":`${t.radius}px`,"--sd-system-color-field-border-default":y.border.default,"--sd-system-color-field-border-focus":y.border.focus,"--sd-system-color-field-border-danger":y.border.danger,"--sd-system-color-field-bg-default":y.bg.default,"--sd-textinput-input-text-error-message":v.color,"--sd-textinput-input-error-message-typography-font-size":`${v.typography.fontSize}px`,"--sd-textinput-input-error-message-typography-line-height":`${v.typography.lineHeight}px`,"--sd-textinput-input-text-hint":_.color,"--sd-textinput-input-hint-typography-font-size":`${_.typography.fontSize}px`,"--sd-textinput-input-hint-typography-line-height":`${_.typography.lineHeight}px`,"--sd-textinput-input-contents-gap":`${w}px`}},s("div",{key:"2fb1686b071fd69c65fc0c908807c029edc3b253",class:{"sd-number-input__content":!0,"sd-number-input__content--no-stepper":!this.useButton}},this.useButton&&s("button",{key:"6b2464867bb0224f4fbcb50ea4e4bfc5386474ba",type:"button",class:"sd-number-input__stepper sd-number-input__stepper--decrement",disabled:this.isDecrementDisabled(),onClick:this.handleDecrement,tabindex:-1},s("sd-icon",{key:"f65e9144ad93f4ba8d293b5af1bf9fd1286e7520",name:"minus",size:e,color:this.isDecrementDisabled()?x.icon.disabled:x.icon.default})),this.inputPrefix&&s("span",{key:"3d89b3557f961f36b429e3cf4ae247098a412b30",class:"sd-number-input__prefix"},this.inputPrefix),s("input",{key:"c5c503b634aee3b0c8d81f855b5de1d0abe35eac",name:this.name,ref:t=>this.nativeEl=t,class:`sd-number-input__native ${this.inputClass}`,type:"text",inputMode:"numeric",value:this.displayValue,placeholder:this.placeholder??"입력해 주세요.",disabled:this.disabled,readonly:this.readonly,autofocus:this.autoFocus,onInput:this.handleInput,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,style:{textAlign:this.useButton?"center":"right",...this.inputStyle}}),this.inputSuffix&&s("span",{key:"15177064a4daab2ede3af4f8758912da266f1c29",class:"sd-number-input__suffix"},this.inputSuffix),this.useButton&&s("button",{key:"dcc1fbfe7c4e7eaa6db95fe7dc9a34f4b82ade8b",type:"button",class:"sd-number-input__stepper sd-number-input__stepper--increment",disabled:this.isIncrementDisabled(),onClick:this.handleIncrement,tabindex:-1},s("sd-icon",{key:"58eee48f37c0e942a3734a9275a9d459bc9bc420",name:"add",size:e,color:this.isIncrementDisabled()?x.icon.disabled:x.icon.default}))))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}static get style(){return"sd-number-input{display:inline-flex}sd-number-input .sd-number-input__content{width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;gap:var(--sd-number-input-padding-x);color:var(--sd-number-input-text-color);font-size:var(--sd-number-input-font-size);line-height:var(--sd-number-input-line-height);font-weight:var(--sd-number-input-font-weight);padding:0 var(--sd-number-input-padding-x)}sd-number-input .sd-number-input__content--no-stepper{padding:0 calc(var(--sd-number-input-padding-x) * 2)}sd-number-input .sd-number-input__content .sd-number-input__native{width:100%;height:100%;min-width:0;border:none;outline:none;background:transparent;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;padding-block:0;padding-inline:0}sd-number-input .sd-number-input__content .sd-number-input__native[disabled]{cursor:not-allowed;color:var(--sd-number-input-disabled-color)}sd-number-input .sd-number-input__content .sd-number-input__native[readonly]{color:var(--sd-system-color-field-text-read-only)}sd-number-input .sd-number-input__content .sd-number-input__native::placeholder{color:var(--sd-number-input-placeholder-color)}sd-number-input .sd-number-input__content .sd-number-input__prefix,sd-number-input .sd-number-input__content .sd-number-input__suffix{flex-shrink:0;white-space:nowrap;color:var(--sd-number-input-placeholder-color);font-size:inherit;line-height:inherit}sd-number-input .sd-number-input__content .sd-number-input__stepper{flex-shrink:0;width:var(--sd-number-input-stepper-size);height:var(--sd-number-input-stepper-size);border:none;border-radius:var(--sd-number-input-stepper-radius);background-color:var(--sd-number-input-stepper-bg);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;margin:0;transition:background-color 0.15s ease}sd-number-input .sd-number-input__content .sd-number-input__stepper:hover:not(:disabled){filter:brightness(0.95)}sd-number-input .sd-number-input__content .sd-number-input__stepper:disabled{background-color:var(--sd-number-input-stepper-bg-disabled);cursor:not-allowed}"}},[512,"sd-number-input",{size:[1],min:[2],max:[2],step:[2],useButton:[4,"use-button"],useDecimal:[4,"use-decimal"],maxDecimalLength:[2,"max-decimal-length"],value:[1032],label:[1],labelWidth:[8,"label-width"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],placeholder:[1],disabled:[4],width:[8],rules:[16],autoFocus:[4,"auto-focus"],status:[1],hint:[1],errorMessage:[1,"error-message"],inputPrefix:[1,"input-prefix"],inputSuffix:[1,"input-suffix"],inputClass:[1,"input-class"],readonly:[4],inputStyle:[16],error:[1028],focused:[1028],hovered:[1028],name:[1],internalValue:[32],displayValue:[32],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64],sdGetNativeElement:[64]},void 0,{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}]);function F(){"undefined"!=typeof customElements&&["sd-number-input","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag","sd-tooltip"].forEach((t=>{switch(t){case"sd-number-input":customElements.get(n(t))||customElements.define(n(t),k);break;case"sd-field":customElements.get(n(t))||u();break;case"sd-floating-portal":customElements.get(n(t))||a();break;case"sd-ghost-button":customElements.get(n(t))||o();break;case"sd-icon":customElements.get(n(t))||l();break;case"sd-portal":customElements.get(n(t))||p();break;case"sd-tag":customElements.get(n(t))||h();break;case"sd-tooltip":customElements.get(n(t))||c()}}))}export{k as S,F as d}
|
|
1
|
+
import{p as t,H as e,c as i,h as s,t as n}from"./p-Br8E2gpA.js";import{n as r}from"./p-CCwNgVmC.js";import{f as d}from"./p-B9hmJn6D.js";import{d as u}from"./p-7VzVE0oV.js";import{d as a}from"./p-BFBKrBpn.js";import{d as o}from"./p-B-DK72cc.js";import{d as l}from"./p-jbqIrDHw.js";import{d as p}from"./p-Hh0L_XZ6.js";import{d as h}from"./p-CZym_85X.js";import{d as c}from"./p-B7fiz4d8.js";var m={numberInput:{sm:{height:"28",paddingX:"6",radius:"4",typography:{fontWeight:"400",fontSize:"12",lineHeight:"20"}},md:{height:"36",paddingX:"8",radius:"6",typography:{fontWeight:"400",fontSize:"14",lineHeight:"24"}},border:{default:"#AAAAAA",focus:"#0075FF",danger:"#FB4444"},bg:{default:"#FFFFFF"},text:{default:"#222222",placeholder:"#AAAAAA",disabled:"#888888"},stepper:{sm:{size:"20"},md:{size:"24"},radius:"4",bg:{default:"#EFF6FF",disabled:"#EEEEEE"},icon:{default:"#0075FF",disabled:"#BBBBBB"}}}};const b=m.numberInput.sm,f=m.numberInput.md,g={sm:{height:b.height,paddingX:b.paddingX,radius:b.radius,fontSize:b.typography.fontSize,lineHeight:b.typography.lineHeight,fontWeight:b.typography.fontWeight},md:{height:f.height,paddingX:f.paddingX,radius:f.radius,fontSize:f.typography.fontSize,lineHeight:f.typography.lineHeight,fontWeight:f.typography.fontWeight}},y={border:m.numberInput.border,bg:m.numberInput.bg,text:m.numberInput.text},_={sm:{size:m.numberInput.stepper.sm.size},md:{size:m.numberInput.stepper.md.size},radius:m.numberInput.stepper.radius,bg:m.numberInput.stepper.bg,icon:m.numberInput.stepper.icon},x=d.field.hint,v=d.field.errorMessage,w=d.field.contents.gap,z=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.update=i(this,"sdUpdate",7),this.focus=i(this,"sdFocus",7),this.blur=i(this,"sdBlur",7)}get el(){return this}size="sm";min=Number.NEGATIVE_INFINITY;max=Number.POSITIVE_INFINITY;step=1;useButton=!1;useDecimal=!1;maxDecimalLength;value=null;label;labelWidth="";icon=void 0;labelTooltip="";labelTooltipProps=null;addonLabel="";addonAlign="start";placeholder="입력해 주세요.";disabled=!1;width;rules=[];autoFocus=!1;status;hint="";errorMessage="";inputPrefix="";inputSuffix="";inputClass="";readonly=!1;inputStyle={};error=!1;focused=!1;hovered=!1;internalValue=null;displayValue="";nativeEl=void 0;formField;name=r();update;focus;blur;toNumber(t){if(null==t||""===t)return null;if("number"==typeof t)return isNaN(t)?null:t;if("string"==typeof t)return this.parseInput(t);const e=Number(t);return isNaN(e)?null:e}formatWithCommas(t){if(null==t||isNaN(t))return"";const e=t<0,i=Math.abs(t),[s,n]=i.toString().split("."),r=(+s).toLocaleString(),d=e?"-"+r:r;return void 0!==n&&""!==n?d+"."+n:String(d)}getDecimalLimit(){if(this.useDecimal&&void 0!==this.maxDecimalLength&&Number.isFinite(this.maxDecimalLength))return Math.max(0,Math.floor(this.maxDecimalLength))}truncateToDecimalLimit(t,e){if(!t.includes("."))return t;const[i,s=""]=t.split("."),n=s.slice(0,e);return""===n?i:`${i}.${n}`}applyDecimalLimit(t){const e=this.getDecimalLimit();if(void 0===e)return t;const i=parseFloat(this.truncateToDecimalLimit(t.toString(),e));return isNaN(i)?t:i}parseInput(t){if(""===t.trim())return null;const e=t.replace(/,/g,"").trim();if(!/^-?(\d+\.?\d*|\d*\.\d+)$/.test(e))return null;if(!this.useDecimal&&e.includes("."))return null;const i=this.getDecimalLimit(),s=void 0!==i?this.truncateToDecimalLimit(e,i):e,n=parseFloat(s);return isNaN(n)?null:n}clampMinMax(t){return isNaN(t)?0:Math.min(Math.max(t,this.min),this.max)}updateDisplay(){this.displayValue=this.formatWithCommas(this.internalValue)}isIncrementDisabled(){return!(!this.disabled&&!this.readonly)||null!==this.internalValue&&this.internalValue>=this.max}isDecrementDisabled(){return!(!this.disabled&&!this.readonly)||null!==this.internalValue&&this.internalValue<=this.min}valueChanged(t){const e=this.toNumber(t);this.internalValue=null!==e?this.clampMinMax(e):null,this.updateDisplay()}internalValueChanged(t){this.updateDisplay(),t!==this.value&&(this.value=t,this.update?.emit(t))}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}async sdGetNativeElement(){return this.nativeEl||null}componentWillLoad(){const t=this.toNumber(this.value);null!==t&&(this.internalValue=this.clampMinMax(t)),this.updateDisplay()}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=t=>{const e=t.target,i=e.value;if(""===i)return this.internalValue=null,void(this.displayValue="");const s=i.replace(/,/g,""),n=(s.match(/\./g)||[]).length;if(n>1)return void(e.value=this.displayValue);if("-"===s||"."===s||"-."===s)return void(e.value=s);if(s.endsWith(".")&&1===n){const t=s.slice(0,-1),i=this.parseInput(t);if(null!==i){const t=this.formatWithCommas(i);return void(e.value=t+".")}}const r=this.parseInput(s);if(null!==r){if(r<this.min)return void(e.value=this.displayValue);if(r>this.max)return void(e.value=this.displayValue);this.internalValue=r,this.displayValue=this.formatWithCommas(r),e.value=this.displayValue}else e.value=this.displayValue};handleFocus=t=>{this.focused=!0,this.focus?.emit(t)};handleBlur=async t=>{this.updateDisplay(),this.nativeEl&&(this.nativeEl.value=this.displayValue),this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.focused=!1,this.blur?.emit(t)};handleKeyDown=t=>{"ArrowUp"===t.key?(t.preventDefault(),this.handleIncrement()):"ArrowDown"===t.key&&(t.preventDefault(),this.handleDecrement())};handleIncrement=()=>{if(this.isIncrementDisabled())return;const t=this.internalValue??this.min??0;let e=t+this.step;e>this.max&&(e=this.max),e=this.applyDecimalLimit(e),e!==t&&(this.internalValue=e)};handleDecrement=()=>{if(this.isDecrementDisabled())return;const t=this.internalValue??this.min??0;let e=t-this.step;e<this.min&&(e=this.min),e=this.applyDecimalLimit(e),e!==t&&(this.internalValue=e)};render(){const t=g[this.size]??g.sm,e="md"===this.size?14:12;return s("sd-field",{key:"4a54c567270f657086819fc6e3856d84c60315d5",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-number-input-font-size":`${t.fontSize}px`,"--sd-number-input-line-height":`${t.lineHeight}px`,"--sd-number-input-font-weight":t.fontWeight,"--sd-number-input-padding-x":`${t.paddingX}px`,"--sd-number-input-text-color":y.text.default,"--sd-number-input-placeholder-color":y.text.placeholder,"--sd-number-input-disabled-color":y.text.disabled,"--sd-number-input-stepper-size":`${_[this.size]?.size??_.sm.size}px`,"--sd-number-input-stepper-radius":`${_.radius}px`,"--sd-number-input-stepper-bg":_.bg.default,"--sd-number-input-stepper-bg-disabled":_.bg.disabled,"--sd-number-input-stepper-icon-color":_.icon.default,"--sd-number-input-stepper-icon-disabled":_.icon.disabled,"--sd-system-size-field-sm-height":`${t.height}px`,"--sd-system-radius-field-sm":`${t.radius}px`,"--sd-system-color-field-border-default":y.border.default,"--sd-system-color-field-border-focus":y.border.focus,"--sd-system-color-field-border-danger":y.border.danger,"--sd-system-color-field-bg-default":y.bg.default,"--sd-textinput-input-text-error-message":v.color,"--sd-textinput-input-error-message-typography-font-size":`${v.typography.fontSize}px`,"--sd-textinput-input-error-message-typography-line-height":`${v.typography.lineHeight}px`,"--sd-textinput-input-text-hint":x.color,"--sd-textinput-input-hint-typography-font-size":`${x.typography.fontSize}px`,"--sd-textinput-input-hint-typography-line-height":`${x.typography.lineHeight}px`,"--sd-textinput-input-contents-gap":`${w}px`}},s("div",{key:"ce88be1aa4f4b684e3a4036495b39a3b0fc88289",class:{"sd-number-input__content":!0,"sd-number-input__content--no-stepper":!this.useButton}},this.useButton&&s("button",{key:"fb7b50a15c6925fb39ab0ccc0b6df2ad14d07aa6",type:"button",class:"sd-number-input__stepper sd-number-input__stepper--decrement",disabled:this.isDecrementDisabled(),onClick:this.handleDecrement,tabindex:-1},s("sd-icon",{key:"6e53dc6237c049c0a766f5c141abe872abc17e32",name:"minus",size:e,color:this.isDecrementDisabled()?_.icon.disabled:_.icon.default})),this.inputPrefix&&s("span",{key:"c378b1efe0df186b2a6137fd7738467b53892d12",class:"sd-number-input__prefix"},this.inputPrefix),s("input",{key:"f264c7af10764a0d4b49bd5696b5f84985b9df2d",name:this.name,ref:t=>this.nativeEl=t,class:`sd-number-input__native ${this.inputClass}`,type:"text",inputMode:"numeric",value:this.displayValue,placeholder:this.placeholder??"입력해 주세요.",disabled:this.disabled,readonly:this.readonly,autofocus:this.autoFocus,onInput:this.handleInput,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,style:{textAlign:this.useButton?"center":"right",...this.inputStyle}}),this.inputSuffix&&s("span",{key:"100aeecc5de810c6f67679bf214ec9d612decf26",class:"sd-number-input__suffix"},this.inputSuffix),this.useButton&&s("button",{key:"2fa415cdfa3e0b2bb8f4bdd992ff69457d496913",type:"button",class:"sd-number-input__stepper sd-number-input__stepper--increment",disabled:this.isIncrementDisabled(),onClick:this.handleIncrement,tabindex:-1},s("sd-icon",{key:"ec2e9109753f67d28d3b819e4902d4c00ce7e4e6",name:"add",size:e,color:this.isIncrementDisabled()?_.icon.disabled:_.icon.default}))))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}static get style(){return"sd-number-input{display:inline-flex}sd-number-input .sd-number-input__content{width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;gap:var(--sd-number-input-padding-x);color:var(--sd-number-input-text-color);font-size:var(--sd-number-input-font-size);line-height:var(--sd-number-input-line-height);font-weight:var(--sd-number-input-font-weight);padding:0 var(--sd-number-input-padding-x)}sd-number-input .sd-number-input__content--no-stepper{padding:0 calc(var(--sd-number-input-padding-x) * 2)}sd-number-input .sd-number-input__content .sd-number-input__native{width:100%;height:100%;min-width:0;border:none;outline:none;background:transparent;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;padding-block:0;padding-inline:0}sd-number-input .sd-number-input__content .sd-number-input__native[disabled]{cursor:not-allowed;color:var(--sd-number-input-disabled-color)}sd-number-input .sd-number-input__content .sd-number-input__native[readonly]{color:var(--sd-system-color-field-text-read-only)}sd-number-input .sd-number-input__content .sd-number-input__native::placeholder{color:var(--sd-number-input-placeholder-color)}sd-number-input .sd-number-input__content .sd-number-input__prefix,sd-number-input .sd-number-input__content .sd-number-input__suffix{flex-shrink:0;white-space:nowrap;color:var(--sd-number-input-placeholder-color);font-size:inherit;line-height:inherit}sd-number-input .sd-number-input__content .sd-number-input__stepper{flex-shrink:0;width:var(--sd-number-input-stepper-size);height:var(--sd-number-input-stepper-size);border:none;border-radius:var(--sd-number-input-stepper-radius);background-color:var(--sd-number-input-stepper-bg);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;margin:0;transition:background-color 0.15s ease}sd-number-input .sd-number-input__content .sd-number-input__stepper:hover:not(:disabled){filter:brightness(0.95)}sd-number-input .sd-number-input__content .sd-number-input__stepper:disabled{background-color:var(--sd-number-input-stepper-bg-disabled);cursor:not-allowed}"}},[512,"sd-number-input",{size:[1],min:[2],max:[2],step:[2],useButton:[4,"use-button"],useDecimal:[4,"use-decimal"],maxDecimalLength:[2,"max-decimal-length"],value:[1032],label:[1],labelWidth:[8,"label-width"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],placeholder:[1],disabled:[4],width:[8],rules:[16],autoFocus:[4,"auto-focus"],status:[1],hint:[1],errorMessage:[1,"error-message"],inputPrefix:[1,"input-prefix"],inputSuffix:[1,"input-suffix"],inputClass:[1,"input-class"],readonly:[4],inputStyle:[16],error:[1028],focused:[1028],hovered:[1028],name:[1],internalValue:[32],displayValue:[32],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64],sdGetNativeElement:[64]},void 0,{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}]);function F(){"undefined"!=typeof customElements&&["sd-number-input","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag","sd-tooltip"].forEach((t=>{switch(t){case"sd-number-input":customElements.get(n(t))||customElements.define(n(t),z);break;case"sd-field":customElements.get(n(t))||u();break;case"sd-floating-portal":customElements.get(n(t))||a();break;case"sd-ghost-button":customElements.get(n(t))||o();break;case"sd-icon":customElements.get(n(t))||l();break;case"sd-portal":customElements.get(n(t))||p();break;case"sd-tag":customElements.get(n(t))||h();break;case"sd-tooltip":customElements.get(n(t))||c()}}))}export{z as S,F as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as n,c as o,h as e,t as i}from"./p-
|
|
1
|
+
import{p as t,H as n,c as o,h as e,t as i}from"./p-Br8E2gpA.js";const s=t(class t extends n{constructor(t){super(),!1!==t&&this.__registerHost(),this.close=o(this,"sdClose",7)}get el(){return this}to="body";parentRef=null;offset=[0,0];zIndex=996;placement="bottom";open=!1;close;container;wrapper;rafId;isInsideClick=!1;resizeObserver;mutationObserver;scrollHandler=()=>this.updatePosition();static ARROW_SIZE=11.2;componentDidLoad(){this.container=this.resolveContainer(),this.createWrapper(),this.moveSlotContent(),requestAnimationFrame((()=>{this.updatePosition(),this.wrapper&&(this.wrapper.style.visibility="visible")})),this.observeParent(),window.addEventListener("scroll",this.scrollHandler,!0)}componentDidRender(){this.wrapper&&(this.open?(this.wrapper.style.display="block",requestAnimationFrame((()=>{this.updatePosition(),this.wrapper&&(this.wrapper.style.visibility="visible")}))):(this.wrapper.style.display="none",this.wrapper.style.visibility="hidden"))}disconnectedCallback(){void 0!==this.rafId&&cancelAnimationFrame(this.rafId),window.removeEventListener("scroll",this.scrollHandler,!0),this.unobserveParent(),this.wrapper?.remove()}resolveContainer(){const t="string"==typeof this.to?document.querySelector(this.to):this.to;return t instanceof n?t:document.body}resolveZIndex(){const t=this.zIndex??996,o=this.parentRef?.closest(".sd-modal-container__layer");if(!o)return t;const e=o.closest(".sd-modal-container"),i=e instanceof n?parseInt(getComputedStyle(e).zIndex,10):NaN,s=Number.isFinite(i)?i:997;return Math.max(t,s+1)}createWrapper(){this.wrapper=document.createElement("div"),Object.assign(this.wrapper.style,{position:"fixed",zIndex:this.resolveZIndex().toString(),transition:"opacity 0.4s",top:"-9999px",left:"-9999px"}),this.container.appendChild(this.wrapper)}moveSlotContent(){this.wrapper&&Array.from(this.el.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 n=this.parentRef.getBoundingClientRect();if(0===n.width&&0===n.height)return;const[o,e]=this.offset??[0,0],i=t.ARROW_SIZE;let s=0,a=0;switch(this.placement??"bottom"){case"top":s=n.top-this.wrapper.offsetHeight+e-i,a=n.left+n.width/2-this.wrapper.offsetWidth/2+o;break;case"bottom":s=n.bottom+e+i,a=n.left+n.width/2-this.wrapper.offsetWidth/2+o;break;case"left":s=n.top+n.height/2-this.wrapper.offsetHeight/2+e,a=n.left-this.wrapper.offsetWidth-o-i;break;case"right":s=n.top+n.height/2-this.wrapper.offsetHeight/2+e,a=n.right+o+i}Object.assign(this.wrapper.style,{top:`${s}px`,left:`${a}px`})}))}observeParent(){this.parentRef&&(this.resizeObserver=new ResizeObserver((()=>this.updatePosition())),this.resizeObserver.observe(this.parentRef),this.mutationObserver=new MutationObserver((()=>this.updatePosition())),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0}))}unobserveParent(){this.resizeObserver?.disconnect(),this.mutationObserver?.disconnect()}handleMouseDown(t){this.isInsideClick=!!(this.wrapper&&this.wrapper.contains(t.target)||this.parentRef&&this.parentRef.contains(t.target))}handleWindowClick(t){this.isInsideClick?this.isInsideClick=!1:this.wrapper?.contains(t.target)||this.close.emit()}handleKeydown(t){"Escape"===t.key&&this.close.emit()}render(){return e("slot",{key:"3bb6b4021e838211556f8d64f1714094ce53ef9c"})}static get style(){return".sd-floating-menu{width:fit-content;padding:12px 16px;border-radius:6px;font-size:12px;font-weight:500;line-height:20px;position:relative;box-sizing:border-box;background:var(--sd-floating-bg, #07284A);color:var(--sd-floating-content, #FFFFFF);animation:sd-floating-fade-in 0.35s ease-out}.sd-floating-menu--top{animation-name:sd-floating-slide-top}.sd-floating-menu--bottom{animation-name:sd-floating-slide-bottom}.sd-floating-menu--left{animation-name:sd-floating-slide-left}.sd-floating-menu--right{animation-name:sd-floating-slide-right}.sd-floating-menu .sd-floating-menu__arrow{color:var(--sd-floating-bg, #07284A)}.sd-floating-menu--default{background:var(--sd-floating-bg, #07284A);color:var(--sd-floating-content, #FFFFFF);font-weight:500}.sd-floating-menu--default .sd-floating-menu__arrow{color:var(--sd-floating-bg, #07284A)}.sd-floating-menu--danger{background:var(--sd-floating-bg, #FCE6E6);color:var(--sd-floating-content, #FB4444);font-weight:700}.sd-floating-menu--danger .sd-floating-menu__arrow{color:var(--sd-floating-bg, #FCE6E6)}.sd-floating-menu--warning{background:var(--sd-floating-bg, #FEF1EA);color:var(--sd-floating-content, #FF6B00);font-weight:700}.sd-floating-menu--warning .sd-floating-menu__arrow{color:var(--sd-floating-bg, #FEF1EA)}.sd-floating-menu--accent{background:var(--sd-floating-bg, #E6F1FF);color:var(--sd-floating-content, #0075FF);font-weight:700}.sd-floating-menu--accent .sd-floating-menu__arrow{color:var(--sd-floating-bg, #E6F1FF)}.sd-floating-menu__arrow{position:absolute;display:flex;width:16px;height:12px}.sd-floating-menu__arrow svg{width:100%;height:100%}.sd-floating-menu__arrow--top{bottom:-12px;left:50%;transform:translateX(-50%)}.sd-floating-menu__arrow--bottom{top:-12px;left:50%;transform:translateX(-50%) rotate(180deg)}.sd-floating-menu__arrow--left{right:-12px;top:50%;transform:translateY(-50%) rotate(-90deg)}.sd-floating-menu__arrow--right{left:-12px;top:50%;transform:translateY(-50%) rotate(90deg)}.sd-floating-menu__content{font-size:12px;line-height:20px}.sd-floating-menu__content .sd-floating-menu__title{font-size:14px;font-weight:700;line-height:24px;margin-bottom:4px}.sd-floating-menu__content .sd-floating-menu__messages{font-weight:500}.sd-floating-menu__content .sd-floating-menu__buttons{margin-top:12px;display:flex;gap:8px;align-items:center;justify-content:flex-end}.sd-floating-menu__content .sd-floating-menu__buttons--with-link{justify-content:space-between}.sd-floating-menu--popover{padding:16px 20px;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1)}.sd-floating-menu--popover .sd-floating-menu__content{gap:4px}.sd-floating-menu--popover .sd-floating-menu__title{font-size:14px;font-weight:700;line-height:24px}.sd-floating-menu--popover .sd-floating-menu__messages{font-size:12px;font-weight:500;line-height:20px}.sd-floating-menu--closing{animation:sd-floating-fade-out 0.15s ease-in forwards}.sd-floating-menu--closing.sd-floating-menu--top{animation-name:sd-floating-slide-out-top}.sd-floating-menu--closing.sd-floating-menu--bottom{animation-name:sd-floating-slide-out-bottom}.sd-floating-menu--closing.sd-floating-menu--left{animation-name:sd-floating-slide-out-left}.sd-floating-menu--closing.sd-floating-menu--right{animation-name:sd-floating-slide-out-right}.sd-floating-menu--has-close .sd-floating-menu__content{padding-right:28px}.sd-floating-menu__close-button{position:absolute;top:12px;right:12px}@keyframes sd-floating-fade-out{from{opacity:1}to{opacity:0}}@keyframes sd-floating-slide-out-top{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(4px)}}@keyframes sd-floating-slide-out-bottom{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-4px)}}@keyframes sd-floating-slide-out-left{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(4px)}}@keyframes sd-floating-slide-out-right{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-4px)}}@keyframes sd-floating-fade-in{from{opacity:0}to{opacity:1}}@keyframes sd-floating-slide-top{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes sd-floating-slide-bottom{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@keyframes sd-floating-slide-left{from{opacity:0;transform:translateX(4px)}to{opacity:1;transform:translateX(0)}}@keyframes sd-floating-slide-right{from{opacity:0;transform:translateX(-4px)}to{opacity:1;transform:translateX(0)}}"}},[772,"sd-floating-portal",{to:[1],parentRef:[16],offset:[16],zIndex:[2,"z-index"],placement:[1],open:[4]},[[9,"resize","updatePosition"],[9,"mousedown","handleMouseDown"],[8,"click","handleWindowClick"],[8,"keydown","handleKeydown"]]]);function a(){"undefined"!=typeof customElements&&["sd-floating-portal"].forEach((t=>{"sd-floating-portal"===t&&(customElements.get(i(t))||customElements.define(i(t),s))}))}export{s as S,a as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={datepicker:{sm:{height:"28",paddingX:"12",gap:"8",icon:"16",typography:{fontWeight:"400",fontSize:"12",lineHeight:"20"},radius:"4"},md:{height:"36",paddingX:"16",gap:"12",icon:"20",typography:{fontWeight:"400",fontSize:"14",lineHeight:"24"},radius:"6"},border:{default:"#AAAAAA",focus:"#0075FF"},bg:{default:"#FFFFFF"},icon:{default:"#888888",disabled:"#BBBBBB"},text:{default:"#222222",disabled:"#888888"},calendar:{bg:"#FFFFFF",paddingXY:"24",gap:"12",radius:"8",header:{gap:"8",divider:"#E1E1E1",typography:{fontWeight:"500",fontSize:"14",lineHeight:"24"}},week:{typography:{fontWeight:"400",fontSize:"12",lineHeight:"20"},color:"#888888"},grid:{rowGap:"4"},day:{width:"40",circle:{size:"32",radius:"9999"},default:{text:"#222222"},hover:{text:"#222222",border:"#0075FF"},select:{bg:"#0075FF",text:"#FFFFFF"},disabled:{text:"#BBBBBB"},typography:{default:{fontWeight:"400",fontSize:"14",lineHeight:"24"},bold:{fontWeight:"700"}},dot:{size:"6",gap:"2",paddingY:"4"}},range:{bg:"#D9EAFF",height:"32",panelGap:"24",divider:"#E1E1E1"},legend:{typography:{fontWeight:"400",fontSize:"11",lineHeight:"18"},gap:"4",group:{gap:"12"}},time:{bg:{default:"#F9F9F9",selected:"#F5FAFF"},date:{label:"#222222",unit:"#888888",gap:"6"},radius:"8",paddingX:"16",paddingY:"12",gap:"12",section:{gap:"12"},unit:{gap:"2"},typography:{
|
|
1
|
+
var e={datepicker:{sm:{height:"28",paddingX:"12",gap:"8",icon:"16",typography:{fontWeight:"400",fontSize:"12",lineHeight:"20"},radius:"4"},md:{height:"36",paddingX:"16",gap:"12",icon:"20",typography:{fontWeight:"400",fontSize:"14",lineHeight:"24"},radius:"6"},border:{default:"#AAAAAA",focus:"#0075FF"},bg:{default:"#FFFFFF"},icon:{default:"#888888",disabled:"#BBBBBB"},text:{default:"#222222",disabled:"#888888"},calendar:{bg:"#FFFFFF",paddingXY:"24",gap:"12",radius:"8",header:{gap:"8",divider:"#E1E1E1",typography:{fontWeight:"500",fontSize:"14",lineHeight:"24"}},week:{typography:{fontWeight:"400",fontSize:"12",lineHeight:"20"},color:"#888888"},grid:{rowGap:"4"},day:{width:"40",circle:{size:"32",radius:"9999"},default:{text:"#222222"},hover:{text:"#222222",border:"#0075FF"},select:{bg:"#0075FF",text:"#FFFFFF"},disabled:{text:"#BBBBBB"},typography:{default:{fontWeight:"400",fontSize:"14",lineHeight:"24"},bold:{fontWeight:"700"}},dot:{size:"6",gap:"2",paddingY:"4"}},range:{bg:"#D9EAFF",height:"32",panelGap:"24",divider:"#E1E1E1"},legend:{typography:{fontWeight:"400",fontSize:"11",lineHeight:"18"},gap:"4",group:{gap:"12"}},time:{bg:{default:"#F9F9F9",selected:"#F5FAFF"},date:{label:"#222222",unit:"#888888",gap:"6"},radius:"8",paddingX:"16",paddingY:"12",gap:"12",section:{gap:"12"},unit:{gap:"2"},typography:{fontSize:"12",lineHeight:"20",fontWeight:"500"}}}}};export{e as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,c as s,h as i,t as o}from"./p-
|
|
1
|
+
import{p as t,H as e,c as s,h as i,t as o}from"./p-Br8E2gpA.js";import{n as r}from"./p-CCwNgVmC.js";import{d as h}from"./p-Bq8PIS3p.js";import{d as l}from"./p-7VzVE0oV.js";import{d}from"./p-BFBKrBpn.js";import{d as a}from"./p-B-DK72cc.js";import{d as n}from"./p-jbqIrDHw.js";import{d as c}from"./p-Hh0L_XZ6.js";import{d as p}from"./p-DQi-e0ko.js";import{d as u}from"./p-DrZYy9kv.js";import{d as m}from"./p-DWyPo9fo.js";import{d as b}from"./p-CLhUHKxg.js";import{d as f}from"./p-CZym_85X.js";import{d as g}from"./p-B7fiz4d8.js";const w=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),h=Math.max(window.innerHeight-e.bottom-s-i,0),l=Math.max(e.top-s-i,0),d=Math.max(h,l),a=Math.max(window.innerWidth-2*s,0);this.resolvedDropdownHeight=`${Math.min(o,d)}px`,this.resolvedMaxDropdownWidth=`${Math.min(r,a)}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:"a0c87e52733b30d61b3d5d5c62448afd42430458",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:"0ae8920ff073dec69d26224b6f3c9d393014b276",class:"sd-select",ref:t=>{this.triggerRef=t}},i("sd-select-trigger",{key:"196b9e1fdfede2c24f8d1f963bfbb14062a7a819",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:"1c0ddae84bbe0b02e7a726eccff2ecbdc0214d72",...e},i("sd-select-listbox",{key:"90372a0eb3db042ed1c23fd789356a3e1d90cc80",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 x(){"undefined"!=typeof customElements&&["sd-select","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),w);break;case"sd-checkbox":customElements.get(o(t))||h();break;case"sd-field":customElements.get(o(t))||l();break;case"sd-floating-portal":customElements.get(o(t))||d();break;case"sd-ghost-button":customElements.get(o(t))||a();break;case"sd-icon":customElements.get(o(t))||n();break;case"sd-portal":customElements.get(o(t))||c();break;case"sd-select-list-item":customElements.get(o(t))||p();break;case"sd-select-list-item-search":customElements.get(o(t))||u();break;case"sd-select-listbox":customElements.get(o(t))||m();break;case"sd-select-trigger":customElements.get(o(t))||b();break;case"sd-tag":customElements.get(o(t))||f();break;case"sd-tooltip":customElements.get(o(t))||g()}}))}export{w as S,x 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-Br8E2gpA.js";import{d as n}from"./p-B-DK72cc.js";import{d as o}from"./p-jbqIrDHw.js";import{d}from"./p-Hh0L_XZ6.js";import{d as a}from"./p-CZym_85X.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=!1;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!0===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:"1dbe21611f38fdcd5670bddf6da42ae4581253e8",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))||d();break;case"sd-tag":customElements.get(h(t))||a()}}))}export{f as C,m as S,u as a,p as b,g as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as c,c as d,h as s,t as o}from"./p-
|
|
1
|
+
import{p as e,H as c,c as d,h as s,t as o}from"./p-Br8E2gpA.js";import{d as h}from"./p-jbqIrDHw.js";var b={default:{fontWeight:"400",fontSize:"12",lineHeight:"20"},selected:{fontWeight:"500"}},i={bg:{default:"#FFFFFF",hover:"#D9EAFF"},border:{default:"#AAAAAA",hover:"#0075FF"}},r={bg:{default:"#0075FF"},icon:{default:"#FFFFFF",disabled:"#BBBBBB",inverse:"#FFFFFF"},border:{inverse:"#FFFFFF"}},t={default:"#222222",inverse:"#FFFFFF",disabled:"#888888"};const a={size:"16",radius:"2",borderWidth:"1",gap:"8",iconSize:"12"},n={fontSize:b.default.fontSize,lineHeight:b.default.lineHeight,fontWeight:b.default.fontWeight,selectedFontWeight:b.selected.fontWeight},k={unchecked:{bg:i.bg.default,bgHover:i.bg.hover,border:i.border.default,borderHover:i.border.hover},checked:{bg:r.bg.default,icon:r.icon.default,iconDisabled:r.icon.disabled,iconInverse:r.icon.inverse,borderInverse:r.border.inverse},label:t.default,labelInverse:t.inverse,labelDisabled:t.disabled,disabled:{bg:{disabled:"#E1E1E1"}.disabled,border:{disabled:"#CCCCCC"}.disabled}},l=e(class extends c{constructor(e){super(),!1!==e&&this.__registerHost(),this.update=d(this,"sdUpdate",7)}get el(){return this}value;val;disabled=!1;inverse=!1;label="";isChecked=!1;hasWarnedMissingVal=!1;inputEl;update;componentWillLoad(){this.updateCheckedState(this.value)}watchValueHandler(e){this.updateCheckedState(e)}get checkboxClasses(){const e=["sd-checkbox","sd-checkbox--"+(this.isChecked?"checked":null===this.isChecked?"indeterminate":"unchecked")];return this.disabled&&e.push("sd-checkbox--disabled"),this.inverse&&e.push("sd-checkbox--inverse"),e.join(" ")}updateCheckedState(e){this.isChecked=null===e?null:"boolean"==typeof e?e:!!Array.isArray(e)&&void 0!==this.val&&e.includes(this.val),this.inputEl&&(this.inputEl.indeterminate=null===this.isChecked)}handleChange=()=>{if(this.disabled)return;let e;if("boolean"==typeof this.value)e=!this.value;else if(Array.isArray(this.value)){void 0!==this.val||this.hasWarnedMissingVal||(console.warn('A "val" property is required when using an array for the "value" property.'),this.hasWarnedMissingVal=!0);const c=new Set(this.value);c.has(this.val)?c.delete(this.val):c.add(this.val),e=Array.from(c)}else e=null!==this.value&&!this.isChecked;this.value=e,this.update.emit(e)};render(){return s("label",{key:"e8c51cf3c43e401dc7d5a625a424dc59203a18db",class:this.checkboxClasses,style:{"--sd-checkbox-size":`${a.size}px`,"--sd-checkbox-radius":`${a.radius}px`,"--sd-checkbox-border-width":`${a.borderWidth}px`,"--sd-checkbox-gap":`${a.gap}px`,"--sd-checkbox-font-size":`${n.fontSize}px`,"--sd-checkbox-line-height":`${n.lineHeight}px`,"--sd-checkbox-font-weight":n.fontWeight,"--sd-checkbox-font-weight-selected":n.selectedFontWeight,"--sd-checkbox-unchecked-bg":k.unchecked.bg,"--sd-checkbox-unchecked-bg-hover":k.unchecked.bgHover,"--sd-checkbox-unchecked-border":k.unchecked.border,"--sd-checkbox-unchecked-border-hover":k.unchecked.borderHover,"--sd-checkbox-checked-bg":k.checked.bg,"--sd-checkbox-label-color":k.label,"--sd-checkbox-label-disabled":k.labelDisabled,"--sd-checkbox-disabled-bg":k.disabled.bg,"--sd-checkbox-disabled-border":k.disabled.border,"--sd-checkbox-inverse-border":k.checked.borderInverse,"--sd-checkbox-inverse-icon":k.checked.iconInverse,"--sd-checkbox-inverse-label":k.labelInverse}},s("input",{key:"46d20e76a9c5b7a8a44bf13c7f75970dc5c05bad",type:"checkbox",ref:e=>{this.inputEl=e},value:this.val,checked:!!this.isChecked,disabled:this.disabled,onChange:this.handleChange,name:this.val?.toString()||"checkbox","aria-label":this.label||"checkbox","aria-checked":null===this.isChecked?"mixed":this.isChecked?"true":"false","aria-disabled":this.disabled?"true":"false"}),s("div",{key:"86a6a05ee77c940ae0eb54c0839eda9c0afb988e",class:"sd-checkbox__bg"},!1!==this.isChecked?s("sd-icon",{name:!0===this.isChecked?"checkboxCheck":"checkboxIndeterminate",size:Number(a.iconSize),color:this.disabled?k.checked.iconDisabled:this.inverse?k.checked.iconInverse:k.checked.icon}):null),this.label&&s("span",{key:"2ef1708c384c6668f256b8a75d2c7821f06ec10f",class:"sd-checkbox__label","data-text":this.label},this.label))}static get watchers(){return{value:[{watchValueHandler:0}]}}static get style(){return"sd-checkbox{display:block;height:var(--sd-checkbox-line-height);line-height:0}sd-checkbox .sd-checkbox{cursor:pointer;display:inline-flex;align-items:center;gap:var(--sd-checkbox-gap);height:var(--sd-checkbox-line-height);max-height:var(--sd-checkbox-line-height)}sd-checkbox .sd-checkbox>input{position:absolute;width:0;height:0;opacity:0;pointer-events:none}sd-checkbox .sd-checkbox>input:focus-visible+.sd-checkbox__bg{box-shadow:0 0 0 2px white, 0 0 0 4px var(--sd-checkbox-checked-bg);outline:none}sd-checkbox .sd-checkbox:hover.sd-checkbox--unchecked .sd-checkbox__bg{border-color:var(--sd-checkbox-unchecked-border-hover);background:var(--sd-checkbox-unchecked-bg-hover)}sd-checkbox .sd-checkbox:hover.sd-checkbox--disabled .sd-checkbox__bg{border-color:transparent;background:var(--sd-checkbox-disabled-bg)}sd-checkbox .sd-checkbox__bg{width:var(--sd-checkbox-size);height:var(--sd-checkbox-size);border-radius:var(--sd-checkbox-radius);border:var(--sd-checkbox-border-width) solid var(--sd-checkbox-unchecked-border);box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;overflow:hidden;line-height:0}sd-checkbox .sd-checkbox__label{display:inline-flex;flex-direction:column;font-size:var(--sd-checkbox-font-size);font-weight:var(--sd-checkbox-font-weight);color:var(--sd-checkbox-label-color);line-height:var(--sd-checkbox-line-height)}sd-checkbox .sd-checkbox__label::after{content:attr(data-text);height:0;font-weight:var(--sd-checkbox-font-weight-selected);overflow:hidden;visibility:hidden;pointer-events:none}sd-checkbox .sd-checkbox--checked .sd-checkbox__label,sd-checkbox .sd-checkbox--indeterminate .sd-checkbox__label{font-weight:var(--sd-checkbox-font-weight-selected)}sd-checkbox .sd-checkbox--checked .sd-checkbox__bg,sd-checkbox .sd-checkbox--indeterminate .sd-checkbox__bg{border-color:var(--sd-checkbox-checked-bg);background:var(--sd-checkbox-checked-bg)}sd-checkbox .sd-checkbox--checked.sd-checkbox--disabled .sd-checkbox__bg,sd-checkbox .sd-checkbox--indeterminate.sd-checkbox--disabled .sd-checkbox__bg{background:var(--sd-checkbox-disabled-bg);border-color:var(--sd-checkbox-disabled-border)}sd-checkbox .sd-checkbox--unchecked .sd-checkbox__bg{background:var(--sd-checkbox-unchecked-bg)}sd-checkbox .sd-checkbox--disabled{cursor:not-allowed}sd-checkbox .sd-checkbox--disabled .sd-checkbox__label{color:var(--sd-checkbox-label-disabled)}sd-checkbox .sd-checkbox--disabled .sd-checkbox__bg{background:var(--sd-checkbox-disabled-bg);border-color:var(--sd-checkbox-disabled-border)}sd-checkbox .sd-checkbox--inverse .sd-checkbox__label{color:var(--sd-checkbox-inverse-label)}sd-checkbox .sd-checkbox--inverse.sd-checkbox--unchecked .sd-checkbox__bg{background:transparent;border-color:var(--sd-checkbox-inverse-border)}sd-checkbox .sd-checkbox--inverse.sd-checkbox--checked .sd-checkbox__bg,sd-checkbox .sd-checkbox--inverse.sd-checkbox--indeterminate .sd-checkbox__bg{background:transparent;border-color:var(--sd-checkbox-inverse-border)}sd-checkbox .sd-checkbox--inverse:hover.sd-checkbox--unchecked .sd-checkbox__bg{background:rgba(255, 255, 255, 0.12);border-color:var(--sd-checkbox-inverse-border)}"}},[512,"sd-checkbox",{value:[1028],val:[8],disabled:[516],inverse:[516],label:[1],isChecked:[32]},void 0,{value:[{watchValueHandler:0}]}]);function x(){"undefined"!=typeof customElements&&["sd-checkbox","sd-icon"].forEach((e=>{switch(e){case"sd-checkbox":customElements.get(o(e))||customElements.define(o(e),l);break;case"sd-icon":customElements.get(o(e))||h()}}))}export{l as S,x as d}
|