@sellmate/design-system 1.0.76 → 1.0.78
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/design-system.cjs.js +2 -2
- package/dist/cjs/{index-Dptupbm0.js → index--F2wGuAi.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/sd-action-modal.cjs.entry.js +2 -2
- package/dist/cjs/sd-badge.cjs.entry.js +2 -2
- package/dist/cjs/sd-barcode-input.cjs.entry.js +2 -2
- package/dist/cjs/sd-button-v2_2.cjs.entry.js +3 -3
- package/dist/cjs/sd-button_4.cjs.entry.js +10 -13
- package/dist/cjs/sd-calendar.cjs.entry.js +1 -1
- package/dist/cjs/sd-card.cjs.entry.js +2 -2
- package/dist/cjs/sd-checkbox.cjs.entry.js +7 -4
- package/dist/cjs/sd-chip.cjs.entry.js +2 -2
- package/dist/cjs/sd-circle-progress.cjs.entry.js +4 -4
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +4 -4
- package/dist/cjs/sd-date-box.cjs.entry.js +1 -1
- package/dist/cjs/sd-date-picker-calendar.cjs.entry.js +3 -3
- package/dist/cjs/sd-date-picker-trigger.cjs.entry.js +4 -4
- package/dist/cjs/sd-date-picker.cjs.entry.js +4 -4
- package/dist/cjs/{sd-date-picker.config-B705zdZd.js → sd-date-picker.config-CRgCT5dn.js} +4 -2
- package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +3 -3
- package/dist/cjs/sd-date-range-picker.cjs.entry.js +2 -2
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +96 -9
- package/dist/cjs/sd-file-picker.cjs.entry.js +2 -2
- package/dist/cjs/sd-form.cjs.entry.js +1 -1
- package/dist/cjs/sd-ghost-button.cjs.entry.js +3 -3
- package/dist/cjs/sd-guide.cjs.entry.js +3 -3
- package/dist/cjs/{sd-input_2.cjs.entry.js → sd-input.cjs.entry.js} +3 -43
- package/dist/cjs/sd-linear-progress.cjs.entry.js +4 -4
- 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-number-input.cjs.entry.js +4 -4
- package/dist/cjs/sd-pagination_5.cjs.entry.js +77 -33
- package/dist/cjs/sd-popover.cjs.entry.js +2 -2
- package/dist/cjs/sd-portal.cjs.entry.js +2 -2
- package/dist/cjs/sd-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/sd-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/sd-radio.cjs.entry.js +1 -1
- package/dist/cjs/{sd-select-v2-list-item_4.cjs.entry.js → sd-select-list-item_4.cjs.entry.js} +50 -50
- package/dist/cjs/sd-switch.cjs.entry.js +2 -2
- package/dist/cjs/sd-table.cjs.entry.js +91 -16
- package/dist/cjs/sd-table.config-Cb0Ot3C6.js +105 -0
- package/dist/cjs/sd-tabs.cjs.entry.js +2 -2
- package/dist/cjs/sd-tag.cjs.entry.js +3 -3
- package/dist/cjs/sd-td.cjs.entry.js +37 -6
- package/dist/cjs/sd-text-link.cjs.entry.js +4 -4
- package/dist/cjs/sd-textarea.cjs.entry.js +2 -2
- package/dist/cjs/sd-toast-container.cjs.entry.js +2 -2
- package/dist/cjs/sd-toast.cjs.entry.js +4 -5
- package/dist/cjs/sd-toggle.cjs.entry.js +2 -2
- package/dist/cjs/{system-BbCUNhDJ.js → system-DpTN1vBC.js} +8 -2
- package/dist/cjs/{tooltipArrow-DuANjCfc.js → tooltipArrow-D1-wcNm1.js} +1 -1
- package/dist/collection/collection-manifest.json +11 -21
- package/dist/collection/components/sd-action-modal/sd-action-modal.js +1 -1
- package/dist/collection/components/sd-badge/sd-badge.js +1 -1
- package/dist/collection/components/sd-barcode-input/sd-barcode-input.js +1 -1
- package/dist/collection/components/sd-button-v2/sd-button-v2.js +2 -2
- package/dist/collection/components/sd-card/sd-card.js +1 -1
- package/dist/collection/components/sd-checkbox/sd-checkbox.js +6 -3
- package/dist/collection/components/sd-chip/sd-chip.js +1 -1
- package/dist/collection/components/sd-circle-progress/sd-circle-progress.config.js +1 -1
- package/dist/collection/components/sd-circle-progress/sd-circle-progress.js +1 -1
- package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +2 -2
- package/dist/collection/components/sd-date-picker/sd-date-picker-calendar/sd-date-picker-calendar.js +1 -1
- 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-dropdown-button/sd-dropdown-button.config.js +2 -2
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.js +3 -3
- package/dist/collection/components/sd-field/sd-field.js +5 -8
- package/dist/collection/components/sd-file-picker/sd-file-picker.js +1 -1
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
- package/dist/collection/components/sd-ghost-button/sd-ghost-button.js +2 -2
- package/dist/collection/components/sd-guide/sd-guide.config.js +1 -1
- package/dist/collection/components/sd-input/sd-input.js +2 -2
- package/dist/collection/components/sd-linear-progress/sd-linear-progress.config.js +1 -1
- 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 +3 -3
- package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
- package/dist/collection/components/sd-portal/sd-portal.js +1 -1
- package/dist/collection/components/{sd-select-v2/sd-select-v2-list-item/sd-select-v2-list-item.css → sd-select/sd-select-list-item/sd-select-list-item.css} +13 -13
- package/dist/collection/components/{sd-select-v2/sd-select-v2-list-item/sd-select-v2-list-item.js → sd-select/sd-select-list-item/sd-select-list-item.js} +28 -28
- package/dist/collection/components/{sd-select-v2/sd-select-v2-list-item-search/sd-select-v2-list-item-search.css → sd-select/sd-select-list-item-search/sd-select-list-item-search.css} +11 -11
- package/dist/collection/components/{sd-select-v2/sd-select-v2-list-item-search/sd-select-v2-list-item-search.js → sd-select/sd-select-list-item-search/sd-select-list-item-search.js} +13 -13
- package/dist/collection/components/{sd-select-v2/sd-select-v2-listbox/sd-select-v2-listbox.css → sd-select/sd-select-listbox/sd-select-listbox.css} +3 -3
- package/dist/collection/components/{sd-select-v2/sd-select-v2-listbox/sd-select-v2-listbox.js → sd-select/sd-select-listbox/sd-select-listbox.js} +35 -35
- package/dist/collection/components/{sd-select-v2/sd-select-v2-trigger/sd-select-v2-trigger.css → sd-select/sd-select-trigger/sd-select-trigger.css} +7 -7
- package/dist/collection/components/{sd-select-v2/sd-select-v2-trigger/sd-select-v2-trigger.js → sd-select/sd-select-trigger/sd-select-trigger.js} +12 -12
- package/dist/collection/components/sd-select/sd-select.css +3 -47
- package/dist/collection/components/sd-select/sd-select.js +413 -294
- package/dist/collection/components/sd-switch/sd-switch.js +1 -1
- package/dist/collection/components/sd-table/sd-table.config.js +80 -0
- package/dist/collection/components/sd-table/sd-table.css +16 -8
- package/dist/collection/components/sd-table/sd-table.js +88 -14
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.css +0 -8
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +3 -4
- package/dist/collection/components/sd-table/sd-td/sd-td.js +55 -5
- package/dist/collection/components/sd-table/sd-thead/sd-thead.css +16 -12
- package/dist/collection/components/sd-table/sd-thead/sd-thead.js +52 -8
- package/dist/collection/components/sd-table/sd-tr/sd-tr.css +3 -3
- package/dist/collection/components/sd-table/sd-tr/sd-tr.js +27 -2
- 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-text-link/sd-text-link.js +3 -3
- 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/collection/utils/testing/index.js +2 -0
- package/dist/collection/utils/testing/mocks.js +35 -0
- package/dist/components/index.js +1 -1
- package/dist/components/{p-D5HLYqT-.js → p-B8jXOXtJ.js} +1 -1
- package/dist/components/p-BE6TxbtX.js +1 -0
- package/dist/components/{p-BBD_1E3n.js → p-BJsHakU2.js} +1 -1
- package/dist/components/{p-CgMyz4NQ.js → p-BStczlLa.js} +1 -1
- package/dist/components/{p-BM0sVq5Z.js → p-BcMNA89i.js} +1 -1
- package/dist/components/{p-6PsyRF61.js → p-BheX6lAy.js} +1 -1
- package/dist/components/p-BmYM7-4v.js +1 -0
- package/dist/components/{p-CUg9NH6y.js → p-BppjYHF6.js} +1 -1
- package/dist/components/{p-BLwIhCdO.js → p-Bvq0Vpln.js} +1 -1
- package/dist/components/{p-C7h8lwnU.js → p-BwWDMpJc.js} +1 -1
- package/dist/components/p-C5qZtNLl.js +1 -0
- package/dist/components/p-C7DajKYn.js +1 -0
- package/dist/components/p-CZ4ltUOw.js +1 -0
- package/dist/components/{p-d4UB2UF7.js → p-CeVMl_M9.js} +1 -1
- package/dist/components/p-D1DpOp6M.js +1 -0
- package/dist/components/p-D3gjBBCU.js +1 -0
- package/dist/components/{p-DQfNwvwx.js → p-DC-6inj0.js} +1 -1
- package/dist/components/p-DRF0He-x.js +1 -0
- package/dist/components/{p-B3xZdEDI.js → p-Dcc2Vm6z.js} +1 -1
- package/dist/components/p-DegvQLTF.js +1 -0
- package/dist/components/{p-Csfj4h1A.js → p-Dey-lS6x.js} +1 -1
- package/dist/components/p-DfH_fO01.js +1 -0
- package/dist/components/{p-DdJyzIYe.js → p-DkJqVXpD.js} +1 -1
- package/dist/components/{p-CZPR_5mk.js → p-DngV3MT1.js} +1 -1
- package/dist/components/{p-DaAhgdib.js → p-EbjZr2OA.js} +1 -1
- package/dist/components/p-LwWOleLJ.js +1 -0
- package/dist/components/p-Nvx13YlG.js +1 -0
- package/dist/components/{p-BXdEjuI_.js → p-TwGlKfsC.js} +1 -1
- package/dist/components/{p-6LtMeKKA.js → p-ZMpCZhXP.js} +1 -1
- package/dist/components/{p-BZm6KN1s.js → p-dNJIFthT.js} +1 -1
- package/dist/components/{p-iAWNMLXh.js → p-q0VWISKA.js} +1 -1
- package/dist/components/{p-BQvugXhH.js → p-xnLvZ-xn.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-v2.js +1 -1
- package/dist/components/sd-button.js +1 -1
- package/dist/components/sd-calendar.js +1 -1
- package/dist/components/sd-card.js +1 -1
- package/dist/components/sd-checkbox.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-calendar.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-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-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-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.d.ts +11 -0
- package/dist/components/sd-select-list-item-search.js +1 -0
- package/dist/components/{sd-select-multiple.d.ts → sd-select-list-item.d.ts} +4 -4
- package/dist/components/sd-select-list-item.js +1 -0
- package/dist/components/{sd-select-option.d.ts → sd-select-listbox.d.ts} +4 -4
- package/dist/components/sd-select-listbox.js +1 -0
- package/dist/components/{sd-select-group.d.ts → sd-select-trigger.d.ts} +4 -4
- package/dist/components/sd-select-trigger.js +1 -0
- package/dist/components/sd-select.js +1 -1
- package/dist/components/sd-switch.js +1 -1
- package/dist/components/sd-table.js +1 -1
- package/dist/components/sd-tabs.js +1 -1
- package/dist/components/sd-tag.js +1 -1
- package/dist/components/sd-tbody.js +1 -1
- package/dist/components/sd-td.js +1 -1
- package/dist/components/sd-text-link.js +1 -1
- package/dist/components/sd-textarea.js +1 -1
- package/dist/components/sd-thead.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/components/sd-tr.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-6a3f8588.entry.js → p-0356c195.entry.js} +1 -1
- package/dist/design-system/{p-3a9559ee.entry.js → p-045bc426.entry.js} +1 -1
- package/dist/design-system/{p-c7bcb232.entry.js → p-12dfd239.entry.js} +1 -1
- package/dist/design-system/p-16d3a485.entry.js +1 -0
- package/dist/design-system/p-1706ed6f.entry.js +1 -0
- package/dist/design-system/{p-506f2b68.entry.js → p-182548f7.entry.js} +1 -1
- package/dist/design-system/p-1a79edce.entry.js +1 -0
- package/dist/design-system/{p-17cd3a33.entry.js → p-1cf87e87.entry.js} +1 -1
- package/dist/design-system/{p-dad07e1a.entry.js → p-25a08e98.entry.js} +1 -1
- package/dist/design-system/{p-b683f2fe.entry.js → p-2812b9ce.entry.js} +1 -1
- package/dist/design-system/{p-49f78122.entry.js → p-33bc3176.entry.js} +1 -1
- package/dist/design-system/p-38f661ea.entry.js +1 -0
- package/dist/design-system/{p-280dc548.entry.js → p-3f7bc660.entry.js} +1 -1
- package/dist/design-system/{p-eb29dc9f.entry.js → p-429dab5c.entry.js} +1 -1
- package/dist/design-system/p-455dccf5.entry.js +1 -0
- package/dist/design-system/{p-97ebf578.entry.js → p-59313838.entry.js} +1 -1
- package/dist/design-system/{p-5f6379e9.entry.js → p-6af01ab0.entry.js} +1 -1
- package/dist/design-system/{p-531a6a82.entry.js → p-6bfe3612.entry.js} +1 -1
- package/dist/design-system/{p-7fe3a466.entry.js → p-70d4903f.entry.js} +1 -1
- package/dist/design-system/p-767e99f9.entry.js +1 -0
- package/dist/design-system/{p-34f7345b.entry.js → p-797517b5.entry.js} +1 -1
- package/dist/design-system/p-7c370335.entry.js +1 -0
- package/dist/design-system/{p-a8bde8d9.entry.js → p-7fe8be6a.entry.js} +1 -1
- package/dist/design-system/{p-6af9e663.entry.js → p-83b262dc.entry.js} +1 -1
- package/dist/design-system/{p-11029f6e.entry.js → p-881adaa5.entry.js} +1 -1
- package/dist/design-system/{p-3ca5c303.entry.js → p-88d7303c.entry.js} +1 -1
- package/dist/design-system/{p-fdb52620.entry.js → p-8a601e0f.entry.js} +1 -1
- package/dist/design-system/p-C5qZtNLl.js +1 -0
- package/dist/design-system/p-CZ4ltUOw.js +1 -0
- package/dist/design-system/p-Cnwbjz1F.js +2 -0
- package/dist/design-system/p-DnCBBIoq.js +1 -0
- package/dist/design-system/{p-b745cd95.entry.js → p-a82be987.entry.js} +1 -1
- package/dist/design-system/p-b917c82a.entry.js +1 -0
- package/dist/design-system/{p-c9eb70f5.entry.js → p-b9f00eef.entry.js} +1 -1
- package/dist/design-system/{p-55b65a41.entry.js → p-bcb53788.entry.js} +1 -1
- package/dist/design-system/p-c24344ac.entry.js +1 -0
- package/dist/design-system/{p-2cd2f2dd.entry.js → p-d76192bd.entry.js} +1 -1
- package/dist/design-system/p-d9d8c51b.entry.js +1 -0
- package/dist/design-system/p-de67937d.entry.js +1 -0
- package/dist/design-system/{p-68d0d67e.entry.js → p-e5cebccd.entry.js} +1 -1
- package/dist/design-system/{p-a9fc2c21.entry.js → p-ea5e6c2c.entry.js} +1 -1
- package/dist/design-system/p-ead3e688.entry.js +1 -0
- package/dist/design-system/{p-f4a00276.entry.js → p-eeb1cac2.entry.js} +1 -1
- package/dist/design-system/{p-d6896893.entry.js → p-f1a74359.entry.js} +1 -1
- package/dist/design-system/{p-9466cd93.entry.js → p-f44786a9.entry.js} +1 -1
- package/dist/design-system/p-f522c91d.entry.js +1 -0
- package/dist/design-system/{p-bb492ba7.entry.js → p-f69c7539.entry.js} +1 -1
- package/dist/design-system/{p-ce3d0f9c.entry.js → p-fe9cef6a.entry.js} +1 -1
- package/dist/esm/design-system.js +3 -3
- package/dist/esm/{index-Bp7ytJz5.js → index-Cnwbjz1F.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/sd-action-modal.entry.js +2 -2
- package/dist/esm/sd-badge.entry.js +2 -2
- package/dist/esm/sd-barcode-input.entry.js +2 -2
- package/dist/esm/sd-button-v2_2.entry.js +3 -3
- package/dist/esm/sd-button_4.entry.js +10 -13
- package/dist/esm/sd-calendar.entry.js +1 -1
- package/dist/esm/sd-card.entry.js +2 -2
- package/dist/esm/sd-checkbox.entry.js +7 -4
- package/dist/esm/sd-chip.entry.js +2 -2
- package/dist/esm/sd-circle-progress.entry.js +4 -4
- package/dist/esm/sd-confirm-modal_2.entry.js +4 -4
- package/dist/esm/sd-date-box.entry.js +1 -1
- package/dist/esm/sd-date-picker-calendar.entry.js +3 -3
- package/dist/esm/sd-date-picker-trigger.entry.js +4 -4
- package/dist/esm/{sd-date-picker.config-DMbVR8K4.js → sd-date-picker.config-C2fDbE9d.js} +4 -2
- package/dist/esm/sd-date-picker.entry.js +4 -4
- package/dist/esm/sd-date-range-picker-calendar.entry.js +3 -3
- package/dist/esm/sd-date-range-picker.entry.js +2 -2
- package/dist/esm/sd-dropdown-button.entry.js +95 -8
- package/dist/esm/sd-file-picker.entry.js +2 -2
- package/dist/esm/sd-form.entry.js +1 -1
- package/dist/esm/sd-ghost-button.entry.js +3 -3
- package/dist/esm/sd-guide.entry.js +3 -3
- package/dist/esm/{sd-input_2.entry.js → sd-input.entry.js} +4 -43
- package/dist/esm/sd-linear-progress.entry.js +4 -4
- package/dist/esm/sd-loading-container.entry.js +3 -3
- package/dist/esm/sd-modal-container.entry.js +1 -1
- package/dist/esm/sd-number-input.entry.js +4 -4
- package/dist/esm/sd-pagination_5.entry.js +77 -33
- package/dist/esm/sd-popover.entry.js +2 -2
- package/dist/esm/sd-portal.entry.js +2 -2
- package/dist/esm/sd-radio-button.entry.js +1 -1
- package/dist/esm/sd-radio-group.entry.js +1 -1
- package/dist/esm/sd-radio.entry.js +1 -1
- package/dist/esm/{sd-select-v2-list-item_4.entry.js → sd-select-list-item_4.entry.js} +47 -47
- package/dist/esm/sd-switch.entry.js +2 -2
- package/dist/esm/sd-table.config-Bj-EEo7N.js +94 -0
- package/dist/esm/sd-table.entry.js +91 -16
- package/dist/esm/sd-tabs.entry.js +2 -2
- package/dist/esm/sd-tag.entry.js +3 -3
- package/dist/esm/sd-td.entry.js +37 -6
- package/dist/esm/sd-text-link.entry.js +4 -4
- package/dist/esm/sd-textarea.entry.js +2 -2
- package/dist/esm/sd-toast-container.entry.js +2 -2
- package/dist/esm/sd-toast.entry.js +4 -5
- package/dist/esm/sd-toggle.entry.js +2 -2
- package/dist/esm/{system-BgFLSKqC.js → system-CZ4ltUOw.js} +8 -2
- package/dist/esm/{tooltipArrow-BHRQVawd.js → tooltipArrow-D8sr81Xw.js} +1 -1
- package/dist/types/components/{sd-select-v2/sd-select-v2-list-item/sd-select-v2-list-item.d.ts → sd-select/sd-select-list-item/sd-select-list-item.d.ts} +4 -4
- package/dist/types/components/{sd-select-v2/sd-select-v2-list-item-search/sd-select-v2-list-item-search.d.ts → sd-select/sd-select-list-item-search/sd-select-list-item-search.d.ts} +1 -1
- package/dist/types/components/{sd-select-v2/sd-select-v2-listbox/sd-select-v2-listbox.d.ts → sd-select/sd-select-listbox/sd-select-listbox.d.ts} +6 -6
- package/dist/types/components/{sd-select-v2/sd-select-v2-trigger/sd-select-v2-trigger.d.ts → sd-select/sd-select-trigger/sd-select-trigger.d.ts} +1 -1
- package/dist/types/components/{sd-select-v2/sd-select-v2.config.d.ts → sd-select/sd-select.config.d.ts} +12 -12
- package/dist/types/components/sd-select/sd-select.d.ts +56 -84
- package/dist/types/components/sd-table/constants.d.ts +4 -1
- package/dist/types/components/sd-table/sd-table.config.d.ts +64 -0
- package/dist/types/components/sd-table/sd-table.d.ts +8 -0
- package/dist/types/components/sd-table/sd-td/sd-td.d.ts +5 -2
- package/dist/types/components/sd-table/sd-thead/sd-thead.d.ts +5 -0
- package/dist/types/components/sd-table/sd-tr/sd-tr.d.ts +1 -0
- package/dist/types/components.d.ts +943 -2382
- package/dist/types/utils/testing/index.d.ts +2 -0
- package/dist/types/utils/testing/mocks.d.ts +4 -0
- package/hydrate/index.js +533 -2214
- package/hydrate/index.mjs +533 -2214
- package/package.json +1 -1
- package/dist/cjs/base-dropdown-event-BTPlZ1KF.js +0 -91
- package/dist/cjs/sd-progress.cjs.entry.js +0 -63
- package/dist/cjs/sd-select-dropdown_2.cjs.entry.js +0 -231
- package/dist/cjs/sd-select-group.cjs.entry.js +0 -332
- package/dist/cjs/sd-select-multiple-group.cjs.entry.js +0 -458
- package/dist/cjs/sd-select-multiple.cjs.entry.js +0 -191
- package/dist/cjs/sd-select-option-group.cjs.entry.js +0 -68
- package/dist/cjs/sd-select.cjs.entry.js +0 -181
- package/dist/cjs/select-keyboard-navigation-CErfIrGV.js +0 -27
- package/dist/cjs/table-test.cjs.entry.js +0 -96
- package/dist/collection/components/sd-progress/sd-progress.css +0 -63
- package/dist/collection/components/sd-progress/sd-progress.js +0 -186
- package/dist/collection/components/sd-select/sd-select-dropdown/sd-select-dropdown.css +0 -30
- package/dist/collection/components/sd-select/sd-select-dropdown/sd-select-dropdown.js +0 -444
- package/dist/collection/components/sd-select/sd-select-option/sd-select-option.css +0 -36
- package/dist/collection/components/sd-select/sd-select-option/sd-select-option.js +0 -257
- package/dist/collection/components/sd-select/sd-select-search-input/sd-select-search-input.css +0 -23
- package/dist/collection/components/sd-select/sd-select-search-input/sd-select-search-input.js +0 -161
- package/dist/collection/components/sd-select-group/sd-select-group.css +0 -81
- package/dist/collection/components/sd-select-group/sd-select-group.js +0 -1061
- package/dist/collection/components/sd-select-multiple/sd-select-multiple.css +0 -54
- package/dist/collection/components/sd-select-multiple/sd-select-multiple.js +0 -770
- package/dist/collection/components/sd-select-multiple-group/sd-select-multiple-group.css +0 -79
- package/dist/collection/components/sd-select-multiple-group/sd-select-multiple-group.js +0 -1183
- package/dist/collection/components/sd-select-multiple-group/sd-select-option-group/sd-select-option-group.css +0 -75
- package/dist/collection/components/sd-select-multiple-group/sd-select-option-group/sd-select-option-group.js +0 -305
- package/dist/collection/components/sd-select-v2/sd-select-v2.css +0 -11
- package/dist/collection/components/sd-select-v2/sd-select-v2.js +0 -897
- package/dist/collection/components/table-test/table-test.css +0 -59
- package/dist/collection/components/table-test/table-test.js +0 -316
- package/dist/components/p-6AvsuYqF.js +0 -1
- package/dist/components/p-7DKZPPev.js +0 -1
- package/dist/components/p-9ZtJl4s6.js +0 -1
- package/dist/components/p-BRfPoWUn.js +0 -1
- package/dist/components/p-BZc6lwGD.js +0 -1
- package/dist/components/p-BgFLSKqC.js +0 -1
- package/dist/components/p-Btx5sC7s.js +0 -1
- package/dist/components/p-C-BOe23n.js +0 -1
- package/dist/components/p-CNAzAL53.js +0 -1
- package/dist/components/p-CqghR1aS.js +0 -1
- package/dist/components/p-Cy6HMEsK.js +0 -1
- package/dist/components/p-DAC3TaZV.js +0 -1
- package/dist/components/p-DBex-RJU.js +0 -1
- package/dist/components/p-DWMY9O2B.js +0 -1
- package/dist/components/p-DfOYYI9m.js +0 -1
- package/dist/components/p-eEC3ITv0.js +0 -1
- package/dist/components/p-nVHDJc9g.js +0 -1
- package/dist/components/p-rnbt1m4L.js +0 -1
- package/dist/components/sd-progress.d.ts +0 -11
- package/dist/components/sd-progress.js +0 -1
- package/dist/components/sd-select-dropdown.d.ts +0 -11
- package/dist/components/sd-select-dropdown.js +0 -1
- package/dist/components/sd-select-group.js +0 -1
- package/dist/components/sd-select-multiple-group.d.ts +0 -11
- package/dist/components/sd-select-multiple-group.js +0 -1
- package/dist/components/sd-select-multiple.js +0 -1
- package/dist/components/sd-select-option-group.d.ts +0 -11
- package/dist/components/sd-select-option-group.js +0 -1
- package/dist/components/sd-select-option.js +0 -1
- package/dist/components/sd-select-search-input.d.ts +0 -11
- package/dist/components/sd-select-search-input.js +0 -1
- package/dist/components/sd-select-v2-list-item-search.d.ts +0 -11
- package/dist/components/sd-select-v2-list-item-search.js +0 -1
- package/dist/components/sd-select-v2-list-item.d.ts +0 -11
- package/dist/components/sd-select-v2-list-item.js +0 -1
- package/dist/components/sd-select-v2-listbox.d.ts +0 -11
- package/dist/components/sd-select-v2-listbox.js +0 -1
- package/dist/components/sd-select-v2-trigger.d.ts +0 -11
- package/dist/components/sd-select-v2-trigger.js +0 -1
- package/dist/components/sd-select-v2.d.ts +0 -11
- package/dist/components/sd-select-v2.js +0 -1
- package/dist/components/table-test.d.ts +0 -11
- package/dist/components/table-test.js +0 -1
- package/dist/design-system/p-00612047.entry.js +0 -1
- package/dist/design-system/p-07adda3c.entry.js +0 -1
- package/dist/design-system/p-0e1b27cc.entry.js +0 -1
- package/dist/design-system/p-140b40ab.entry.js +0 -1
- package/dist/design-system/p-1573f415.entry.js +0 -1
- package/dist/design-system/p-1b9f6cef.entry.js +0 -1
- package/dist/design-system/p-1cc7d81f.entry.js +0 -1
- package/dist/design-system/p-1fa6c17f.entry.js +0 -1
- package/dist/design-system/p-2eb910ec.entry.js +0 -1
- package/dist/design-system/p-363c9451.entry.js +0 -1
- package/dist/design-system/p-4114eea3.entry.js +0 -1
- package/dist/design-system/p-5e300b77.entry.js +0 -1
- package/dist/design-system/p-711c59fc.entry.js +0 -1
- package/dist/design-system/p-850de8d4.entry.js +0 -1
- package/dist/design-system/p-8ff967f7.entry.js +0 -1
- package/dist/design-system/p-9fee77f0.entry.js +0 -1
- package/dist/design-system/p-BPGLtKk5.js +0 -1
- package/dist/design-system/p-BgFLSKqC.js +0 -1
- package/dist/design-system/p-Bp7ytJz5.js +0 -2
- package/dist/design-system/p-CRdYeSBK.js +0 -1
- package/dist/design-system/p-Cy6HMEsK.js +0 -1
- package/dist/design-system/p-c521e731.entry.js +0 -1
- package/dist/design-system/p-ce2210ad.entry.js +0 -1
- package/dist/design-system/p-d1846df9.entry.js +0 -1
- package/dist/design-system/p-d52f25c6.entry.js +0 -1
- package/dist/design-system/p-dbcbbf1e.entry.js +0 -1
- package/dist/esm/base-dropdown-event-CRdYeSBK.js +0 -89
- package/dist/esm/sd-progress.entry.js +0 -61
- package/dist/esm/sd-select-dropdown_2.entry.js +0 -228
- package/dist/esm/sd-select-group.entry.js +0 -330
- package/dist/esm/sd-select-multiple-group.entry.js +0 -456
- package/dist/esm/sd-select-multiple.entry.js +0 -189
- package/dist/esm/sd-select-option-group.entry.js +0 -66
- package/dist/esm/sd-select.entry.js +0 -179
- package/dist/esm/select-keyboard-navigation-Cy6HMEsK.js +0 -25
- package/dist/esm/table-test.entry.js +0 -94
- package/dist/types/components/sd-progress/sd-progress.d.ts +0 -15
- package/dist/types/components/sd-select/sd-select-dropdown/sd-select-dropdown.d.ts +0 -41
- package/dist/types/components/sd-select/sd-select-option/sd-select-option.d.ts +0 -23
- package/dist/types/components/sd-select/sd-select-search-input/sd-select-search-input.d.ts +0 -11
- package/dist/types/components/sd-select-group/sd-select-group.d.ts +0 -86
- package/dist/types/components/sd-select-multiple/sd-select-multiple.d.ts +0 -64
- package/dist/types/components/sd-select-multiple-group/sd-select-multiple-group.d.ts +0 -110
- package/dist/types/components/sd-select-multiple-group/sd-select-option-group/sd-select-option-group.d.ts +0 -29
- package/dist/types/components/sd-select-v2/sd-select-v2.d.ts +0 -75
- package/dist/types/components/table-test/table-test.d.ts +0 -46
- /package/dist/collection/components/{sd-select-v2/sd-select-v2.config.js → sd-select/sd-select.config.js} +0 -0
- /package/dist/components/{p-DMbVR8K4.js → p-C2fDbE9d.js} +0 -0
- /package/dist/design-system/{p-DMbVR8K4.js → p-C2fDbE9d.js} +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { TABLE_ID_ATTR, } from "../constants";
|
|
3
|
+
import { resolveTableIconColor, resolveSortIconName, TABLE_HEADER_LAYOUT, TABLE_HEADER_TYPOGRAPHY, TABLE_HEADER_COLORS, TABLE_HEADER_RESIZING_BAR, TABLE_BORDER, } from "../sd-table.config";
|
|
3
4
|
export class SdThead {
|
|
4
5
|
el;
|
|
5
6
|
columns;
|
|
@@ -11,6 +12,7 @@ export class SdThead {
|
|
|
11
12
|
scrolledRight;
|
|
12
13
|
rows = [];
|
|
13
14
|
columnWidths = [];
|
|
15
|
+
sdColumnSort;
|
|
14
16
|
tableId = '';
|
|
15
17
|
_columns = [];
|
|
16
18
|
_selectable = false;
|
|
@@ -111,9 +113,11 @@ export class SdThead {
|
|
|
111
113
|
this.tableEl.handleResize(index, event, reversed);
|
|
112
114
|
}
|
|
113
115
|
}
|
|
116
|
+
handleColumnSort = (col) => {
|
|
117
|
+
this.sdColumnSort.emit({ column: col });
|
|
118
|
+
};
|
|
114
119
|
handleSelectAll(checked) {
|
|
115
|
-
const
|
|
116
|
-
const nextChecked = currentState === null ? false : !!checked;
|
|
120
|
+
const nextChecked = !!checked;
|
|
117
121
|
const safeRows = Array.isArray(this.rows) ? this.rows : [];
|
|
118
122
|
if (this.tableEl?.toggleSelectAllSync) {
|
|
119
123
|
this.tableEl.toggleSelectAllSync(nextChecked, safeRows);
|
|
@@ -133,27 +137,42 @@ export class SdThead {
|
|
|
133
137
|
const stickyLeftCols = this.visibleColumns.slice(0, stickyLeftCount);
|
|
134
138
|
const middleCols = this.visibleColumns.slice(stickyLeftCount, this.visibleColumns.length - stickyRightCount);
|
|
135
139
|
const stickyRightCols = this.visibleColumns.slice(this.visibleColumns.length - stickyRightCount);
|
|
136
|
-
|
|
140
|
+
const headStyle = {
|
|
141
|
+
'--table-header-height': `${TABLE_HEADER_LAYOUT.height}px`,
|
|
142
|
+
'--table-header-padding-x': `${TABLE_HEADER_LAYOUT.paddingX}px`,
|
|
143
|
+
'--table-header-gap': `${TABLE_HEADER_LAYOUT.gap}px`,
|
|
144
|
+
'--table-header-bg': TABLE_HEADER_COLORS.bg,
|
|
145
|
+
'--table-header-font-family': TABLE_HEADER_TYPOGRAPHY.fontFamily,
|
|
146
|
+
'--table-header-font-weight': TABLE_HEADER_TYPOGRAPHY.fontWeight,
|
|
147
|
+
'--table-header-font-size': `${TABLE_HEADER_TYPOGRAPHY.fontSize}px`,
|
|
148
|
+
'--table-header-line-height': `${TABLE_HEADER_TYPOGRAPHY.lineHeight}px`,
|
|
149
|
+
'--table-header-text-decoration': TABLE_HEADER_TYPOGRAPHY.textDecoration,
|
|
150
|
+
'--table-header-resizer-color': TABLE_HEADER_RESIZING_BAR.color,
|
|
151
|
+
'--table-header-resizer-height': `${TABLE_HEADER_RESIZING_BAR.height}px`,
|
|
152
|
+
'--table-border-color': TABLE_BORDER.color,
|
|
153
|
+
'--table-border-width': `${TABLE_BORDER.width}px`,
|
|
154
|
+
};
|
|
155
|
+
return (h(Host, { key: 'c4468056cc20a78516e61bccaf4d11c098e83ec6', slot: `${this.tableId}-head`, style: headStyle }, h("thead", { key: 'a9befd1728baf2104bfb9132557d5c5c0eb49748', class: {
|
|
137
156
|
'thead': true,
|
|
138
157
|
'thead--sticky': this._stickyHeader,
|
|
139
|
-
} }, h("tr", { key: '
|
|
158
|
+
} }, h("tr", { key: 'da786d82d4896b6124becf42f634bcc5b0a6ffb7', class: "tr" }, this._selectable && (h("th", { key: 'b257c5475b7e528fbfc52ea85031a4c49bed7b36', class: {
|
|
140
159
|
'th': true,
|
|
141
160
|
'th--selected': true,
|
|
142
161
|
'sticky-left': true,
|
|
143
162
|
'sticky-left-edge': stickyLeftCount === 0,
|
|
144
163
|
'is-scrolled-left': stickyLeftCount === 0 && this._scrolledLeft,
|
|
145
|
-
}, style: { '--sticky-left-offset': '0px' } }, h("sd-checkbox", { key: '
|
|
164
|
+
}, style: { '--sticky-left-offset': '0px' } }, h("sd-checkbox", { key: '6624026c1811c809eeb5131518ddb8c11f66b541', value: this.getIsAllChecked(), disabled: !safeRows.length, onSdUpdate: (e) => this.handleSelectAll(e.detail) }))), stickyLeftCols.map((col, idx) => (h("th", { key: col.name, class: {
|
|
146
165
|
'th': true,
|
|
147
166
|
[`${col.thClass}`]: Boolean(col.thClass),
|
|
148
167
|
'sticky-left': true,
|
|
149
168
|
'sticky-left-edge': idx === stickyLeftCount - 1,
|
|
150
169
|
'is-scrolled-left': idx === stickyLeftCount - 1 && this._scrolledLeft,
|
|
151
|
-
}, style: { ...col.thStyle, ...this.getStickyStyle(idx) } }, h("div", { class: `th__content th__content--${col.align || 'left'}` }, h("div", { class: "th__content--label" }, col.label), col.
|
|
170
|
+
}, style: { ...col.thStyle, ...this.getStickyStyle(idx) } }, h("div", { class: `th__content th__content--${col.align || 'left'}` }, h("div", { class: "th__content--label" }, col.label), col.icon && (h("sd-icon", { name: col.icon, size: "12", color: resolveTableIconColor(col.icon, col.iconColor) })), col.sort && (h("sd-icon", { name: resolveSortIconName(col.sort), size: "12", color: resolveTableIconColor(resolveSortIconName(col.sort), col.iconColor), onClick: () => this.handleColumnSort(col), style: { cursor: 'pointer' } })), col.tooltip && (h("sd-tooltip", { ...col.tooltipOptions }, h("div", { slot: "content" }, col.tooltip.map(text => (h("p", null, text))))))), this._resizable && (h("div", { class: "th__resizer", onMouseDown: (evt) => this.handleResize(idx, evt) }))))), middleCols.map((col, relativeIdx) => {
|
|
152
171
|
const actualColIdx = stickyLeftCount + relativeIdx;
|
|
153
172
|
return (h("th", { key: col.name, class: {
|
|
154
173
|
th: true,
|
|
155
174
|
[`${col.thClass}`]: Boolean(col.thClass),
|
|
156
|
-
}, style: { ...col.thStyle, ...this.getStickyStyle(actualColIdx) } }, h("div", { class: `th__content th__content--${col.align || 'left'}` }, h("div", { class: "th__content--label" }, col.label), col.
|
|
175
|
+
}, style: { ...col.thStyle, ...this.getStickyStyle(actualColIdx) } }, h("div", { class: `th__content th__content--${col.align || 'left'}` }, h("div", { class: "th__content--label" }, col.label), col.icon && (h("sd-icon", { name: col.icon, size: "12", color: resolveTableIconColor(col.icon, col.iconColor) })), col.sort && (h("sd-icon", { name: resolveSortIconName(col.sort), size: "12", color: resolveTableIconColor(resolveSortIconName(col.sort), col.iconColor), onClick: () => this.handleColumnSort(col), style: { cursor: 'pointer' } })), col.tooltip && (h("sd-tooltip", { ...col.tooltipOptions }, h("div", { slot: "content" }, col.tooltip.map(text => (h("p", null, text))))))), this._resizable && (h("div", { class: "th__resizer", onMouseDown: (evt) => this.handleResize(actualColIdx, evt) }))));
|
|
157
176
|
}), stickyRightCols.map((col, relativeIdx) => {
|
|
158
177
|
const actualColIdx = this.visibleColumns.length - stickyRightCount + relativeIdx;
|
|
159
178
|
return (h("th", { key: col.name, class: {
|
|
@@ -162,7 +181,7 @@ export class SdThead {
|
|
|
162
181
|
'sticky-right': true,
|
|
163
182
|
'sticky-right-edge': relativeIdx === 0,
|
|
164
183
|
'is-scrolled-right': relativeIdx === 0 && this._scrolledRight,
|
|
165
|
-
}, style: { ...col.thStyle, ...this.getStickyStyle(actualColIdx) } }, h("div", { class: `th__content th__content--${col.align || 'left'}` }, h("div", { class: "th__content--label" }, col.label), col.
|
|
184
|
+
}, style: { ...col.thStyle, ...this.getStickyStyle(actualColIdx) } }, h("div", { class: `th__content th__content--${col.align || 'left'}` }, h("div", { class: "th__content--label" }, col.label), col.icon && (h("sd-icon", { name: col.icon, size: "12", color: resolveTableIconColor(col.icon, col.iconColor) })), col.sort && (h("sd-icon", { name: resolveSortIconName(col.sort), size: "12", color: resolveTableIconColor(resolveSortIconName(col.sort), col.iconColor), onClick: () => this.handleColumnSort(col), style: { cursor: 'pointer' } })), col.tooltip && (h("sd-tooltip", { ...col.tooltipOptions }, h("div", { slot: "content" }, col.tooltip.map(text => (h("p", null, text))))))), this._resizable && (h("div", { class: "th__resizer th__resizer--left", onMouseDown: (evt) => this.handleResize(actualColIdx, evt, true) }))));
|
|
166
185
|
})))));
|
|
167
186
|
}
|
|
168
187
|
static get is() { return "sd-thead"; }
|
|
@@ -378,6 +397,31 @@ export class SdThead {
|
|
|
378
397
|
"_scrolledRight": {}
|
|
379
398
|
};
|
|
380
399
|
}
|
|
400
|
+
static get events() {
|
|
401
|
+
return [{
|
|
402
|
+
"method": "sdColumnSort",
|
|
403
|
+
"name": "sdColumnSort",
|
|
404
|
+
"bubbles": true,
|
|
405
|
+
"cancelable": true,
|
|
406
|
+
"composed": true,
|
|
407
|
+
"docs": {
|
|
408
|
+
"tags": [],
|
|
409
|
+
"text": ""
|
|
410
|
+
},
|
|
411
|
+
"complexType": {
|
|
412
|
+
"original": "{ column: SdTableColumn }",
|
|
413
|
+
"resolved": "{ column: SdTableColumn; }",
|
|
414
|
+
"references": {
|
|
415
|
+
"SdTableColumn": {
|
|
416
|
+
"location": "import",
|
|
417
|
+
"path": "../constants",
|
|
418
|
+
"id": "src/components/sd-table/constants.ts::SdTableColumn",
|
|
419
|
+
"referenceLocation": "SdTableColumn"
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}];
|
|
424
|
+
}
|
|
381
425
|
static get methods() {
|
|
382
426
|
return {
|
|
383
427
|
"refreshConfig": {
|
|
@@ -17,9 +17,9 @@ sd-tr * {
|
|
|
17
17
|
|
|
18
18
|
.td {
|
|
19
19
|
display: table-cell;
|
|
20
|
-
height: 44px;
|
|
21
|
-
padding: 0 16px;
|
|
22
|
-
border-bottom: 1px solid #E1E1E1;
|
|
20
|
+
height: var(--table-body-height, 44px);
|
|
21
|
+
padding: 0 var(--table-body-padding-x, 16px);
|
|
22
|
+
border-bottom: var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1);
|
|
23
23
|
background: white;
|
|
24
24
|
vertical-align: middle;
|
|
25
25
|
overflow: hidden;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { TABLE_ID_ATTR, } from "../constants";
|
|
3
|
+
import { TABLE_BODY_LAYOUT, TABLE_BODY_TYPOGRAPHY, TABLE_BORDER, } from "../sd-table.config";
|
|
3
4
|
export class SdTr {
|
|
4
5
|
el;
|
|
5
6
|
columns;
|
|
@@ -137,6 +138,12 @@ export class SdTr {
|
|
|
137
138
|
return false;
|
|
138
139
|
return this.tableEl.isCoveredSync(this.rowKey, colIdx, this._columns);
|
|
139
140
|
}
|
|
141
|
+
getCellClassFor(col) {
|
|
142
|
+
if (!this.tableEl?.getCellClassSync)
|
|
143
|
+
return undefined;
|
|
144
|
+
const fieldName = typeof col.field === 'string' ? col.field : col.name;
|
|
145
|
+
return this.tableEl.getCellClassSync(this.rowKey, fieldName);
|
|
146
|
+
}
|
|
140
147
|
render() {
|
|
141
148
|
const stickyLeftCount = this._stickyColumn.left || 0;
|
|
142
149
|
const stickyRightCount = this._stickyColumn.right || 0;
|
|
@@ -144,16 +151,29 @@ export class SdTr {
|
|
|
144
151
|
const middleCols = this.visibleColumns.slice(stickyLeftCount, this.visibleColumns.length - stickyRightCount);
|
|
145
152
|
const stickyRightCols = this.visibleColumns.slice(this.visibleColumns.length - stickyRightCount);
|
|
146
153
|
const hasRowspan = this.tableEl?.hasRowspanSync?.() ?? false;
|
|
147
|
-
|
|
154
|
+
const rowStyle = {
|
|
155
|
+
display: this.isVisible ? '' : 'none',
|
|
156
|
+
'--table-body-height': `${TABLE_BODY_LAYOUT.default.height}px`,
|
|
157
|
+
'--table-body-padding-x': `${TABLE_BODY_LAYOUT.paddingX}px`,
|
|
158
|
+
'--table-body-font-family': TABLE_BODY_TYPOGRAPHY.fontFamily,
|
|
159
|
+
'--table-body-font-weight': TABLE_BODY_TYPOGRAPHY.fontWeight,
|
|
160
|
+
'--table-body-font-size': `${TABLE_BODY_TYPOGRAPHY.fontSize}px`,
|
|
161
|
+
'--table-body-line-height': `${TABLE_BODY_TYPOGRAPHY.lineHeight}px`,
|
|
162
|
+
'--table-body-text-decoration': TABLE_BODY_TYPOGRAPHY.textDecoration,
|
|
163
|
+
'--table-border-color': TABLE_BORDER.color,
|
|
164
|
+
'--table-border-width': `${TABLE_BORDER.width}px`,
|
|
165
|
+
};
|
|
166
|
+
return (h(Host, { key: '5ed784dad3eb187430efe30ed0bc0f153bf57f23', style: rowStyle }, h("tr", { key: 'bcdc07139fce88788a598ced264f3aad503882fe', class: { 'tr': true, 'tr--no-hover': hasRowspan } }, this._selectable && (h("td", { key: '0b2b516a0d2b57beb7bb37ea3ab2c34836cc772c', class: {
|
|
148
167
|
'td': true,
|
|
149
168
|
'td--selected': true,
|
|
150
169
|
'sticky-left': true,
|
|
151
170
|
'sticky-left-edge': stickyLeftCount === 0,
|
|
152
171
|
'is-scrolled-left': stickyLeftCount === 0 && this._scrolledLeft,
|
|
153
|
-
}, style: { '--sticky-left-offset': '0px' } }, h("sd-checkbox", { key: '
|
|
172
|
+
}, style: { '--sticky-left-offset': '0px' } }, h("sd-checkbox", { key: '3fb6dc05e2b0e75bd70ff5b9631330ce2348bd22', value: this.isSelected(), onSdUpdate: () => this.handleSelect() }))), stickyLeftCols.map((col, idx) => {
|
|
154
173
|
if (this.isCovered(idx))
|
|
155
174
|
return null;
|
|
156
175
|
const span = this.getSpanFor(col);
|
|
176
|
+
const sdCellClass = this.getCellClassFor(col);
|
|
157
177
|
return (h("td", { key: col.name, rowSpan: span?.rowspan, colSpan: span?.colspan, class: {
|
|
158
178
|
'td': true,
|
|
159
179
|
[`td--${col.align || 'left'}`]: true,
|
|
@@ -161,6 +181,7 @@ export class SdTr {
|
|
|
161
181
|
'sticky-left-edge': idx === stickyLeftCount - 1,
|
|
162
182
|
'is-scrolled-left': idx === stickyLeftCount - 1 && this._scrolledLeft,
|
|
163
183
|
[`${col.tdClass}`]: Boolean(col.tdClass),
|
|
184
|
+
[`${sdCellClass}`]: Boolean(sdCellClass),
|
|
164
185
|
}, style: this.getStickyStyle(idx) }, h("slot", { name: `${this.tableId}-${typeof col.field === 'string' ? col.field : col.name}-${this.rowKey}` }, h("span", null, this.getCellValue(col)))));
|
|
165
186
|
}), middleCols.map((col, relativeIdx) => {
|
|
166
187
|
const actualColIdx = stickyLeftCount + relativeIdx;
|
|
@@ -168,10 +189,12 @@ export class SdTr {
|
|
|
168
189
|
return null;
|
|
169
190
|
const fieldName = typeof col.field === 'string' ? col.field : col.name;
|
|
170
191
|
const span = this.getSpanFor(col);
|
|
192
|
+
const sdCellClass = this.getCellClassFor(col);
|
|
171
193
|
return (h("td", { key: col.name, rowSpan: span?.rowspan, colSpan: span?.colspan, class: {
|
|
172
194
|
td: true,
|
|
173
195
|
[`td--${col.align || 'left'}`]: true,
|
|
174
196
|
[`${col.tdClass}`]: Boolean(col.tdClass),
|
|
197
|
+
[`${sdCellClass}`]: Boolean(sdCellClass),
|
|
175
198
|
}, style: this.getStickyStyle(actualColIdx) }, h("slot", { name: `${this.tableId}-${fieldName}-${this.rowKey}` }, h("span", null, this.getCellValue(col)))));
|
|
176
199
|
}), stickyRightCols.map((col, relativeIdx) => {
|
|
177
200
|
const actualColIdx = this.visibleColumns.length - stickyRightCount + relativeIdx;
|
|
@@ -179,6 +202,7 @@ export class SdTr {
|
|
|
179
202
|
return null;
|
|
180
203
|
const fieldName = typeof col.field === 'string' ? col.field : col.name;
|
|
181
204
|
const span = this.getSpanFor(col);
|
|
205
|
+
const sdCellClass = this.getCellClassFor(col);
|
|
182
206
|
return (h("td", { key: col.name, rowSpan: span?.rowspan, colSpan: span?.colspan, class: {
|
|
183
207
|
'td': true,
|
|
184
208
|
[`td--${col.align || 'left'}`]: true,
|
|
@@ -186,6 +210,7 @@ export class SdTr {
|
|
|
186
210
|
'sticky-right-edge': relativeIdx === 0,
|
|
187
211
|
'is-scrolled-right': relativeIdx === 0 && this._scrolledRight,
|
|
188
212
|
[`${col.tdClass}`]: Boolean(col.tdClass),
|
|
213
|
+
[`${sdCellClass}`]: Boolean(sdCellClass),
|
|
189
214
|
}, style: this.getStickyStyle(actualColIdx) }, h("slot", { name: `${this.tableId}-${fieldName}-${this.rowKey}` }, h("span", null, this.getCellValue(col)))));
|
|
190
215
|
}))));
|
|
191
216
|
}
|
|
@@ -67,7 +67,7 @@ export class SdTabs {
|
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
69
|
render() {
|
|
70
|
-
return (h("div", { key: '
|
|
70
|
+
return (h("div", { key: 'ff758fbab0a594c28968074a26ad92a28cd4850b', class: this.getContainerClasses(), style: this.buildCssVars() }, this.tabs.map((tab, index) => {
|
|
71
71
|
const badgeName = this.getBadgeName(tab);
|
|
72
72
|
return (h("div", { key: `tab-${index}`, class: this.getTabClasses(tab), "aria-label": tab.label || 'tab', onClick: () => this.handleTabClick(tab) }, h("span", { "data-label": tab.label, class: "sd-tabs__label" }, tab.label), tab.badge !== undefined && tab.badge !== null && tab.badge !== '' && (h("sd-tag", { name: badgeName, label: tab.badge.toString() }))));
|
|
73
73
|
})));
|
|
@@ -19,7 +19,7 @@ export class SdTag {
|
|
|
19
19
|
render() {
|
|
20
20
|
const config = this.resolvedConfig;
|
|
21
21
|
const iconNode = this.renderIcon(config.icon, config.iconSize);
|
|
22
|
-
return (h("span", { key: '
|
|
22
|
+
return (h("span", { key: '3e7a6602ee73f56e5709711ac735460230de7e58', class: "sd-tag", style: {
|
|
23
23
|
'--sd-tag-background': config.background,
|
|
24
24
|
'--sd-tag-content': config.content,
|
|
25
25
|
'--sd-tag-height': config.height,
|
|
@@ -29,7 +29,7 @@ export class SdTag {
|
|
|
29
29
|
'--sd-tag-font-weight': config.fontWeight,
|
|
30
30
|
'--sd-tag-line-height': config.lineHeight,
|
|
31
31
|
'--sd-tag-radius': config.radius,
|
|
32
|
-
}, "aria-label": this.label || 'tag' }, this.icon && this.isLeft && iconNode, h("span", { key: '
|
|
32
|
+
}, "aria-label": this.label || 'tag' }, this.icon && this.isLeft && iconNode, h("span", { key: '8da56711cb12127f96195404799581480280507f', class: "sd-tag__label" }, this.label), this.icon && !this.isLeft && iconNode));
|
|
33
33
|
}
|
|
34
34
|
static get is() { return "sd-tag"; }
|
|
35
35
|
static get originalStyleUrls() {
|
|
@@ -26,16 +26,16 @@ export class SdTextLink {
|
|
|
26
26
|
'--sd-text-link-text-decoration': typo.textDecoration,
|
|
27
27
|
...(this.disabled ? { '--sd-text-link-color': TEXT_LINK_COLORS.content.disabled } : {}),
|
|
28
28
|
};
|
|
29
|
-
return (h("span", { key: '
|
|
29
|
+
return (h("span", { key: '9bd62ac603764a5938f3c72bac3a8bf893dfb233', class: {
|
|
30
30
|
'sd-text-link': true,
|
|
31
31
|
'sd-text-link--disabled': this.disabled,
|
|
32
|
-
}, style: cssVars, onClick: this.handleClick }, this.icon && (h("sd-icon", { key: '
|
|
32
|
+
}, style: cssVars, onClick: this.handleClick }, this.icon && (h("sd-icon", { key: '9d63aea3c45c4962e5766e7059a166a85e7a357f', name: this.icon, size: TEXT_LINK_LAYOUT.iconSize, color: iconColor, class: "sd-text-link__icon" })), h("span", { key: 'dc73d60dd1e593c597a6b5dd977db380c21ff680', class: labelClassName }, this.label), this.useArrow && (h("span", { key: '2b25dfb6ae2f857b674341427f93ee34e4691893', class: "sd-text-link__arrow", style: {
|
|
33
33
|
width: `${TEXT_LINK_LAYOUT.arrowFrame}px`,
|
|
34
34
|
height: `${TEXT_LINK_LAYOUT.arrowFrame}px`,
|
|
35
35
|
display: 'inline-flex',
|
|
36
36
|
alignItems: 'center',
|
|
37
37
|
justifyContent: 'center',
|
|
38
|
-
} }, h("sd-icon", { key: '
|
|
38
|
+
} }, h("sd-icon", { key: 'a5c8fb48e66f4a6820da1a54cedd7b1a13c5dcec', name: "chevronRight", size: TEXT_LINK_LAYOUT.arrowIconSize, color: arrowColor })))));
|
|
39
39
|
}
|
|
40
40
|
static get is() { return "sd-text-link"; }
|
|
41
41
|
static get originalStyleUrls() {
|
|
@@ -105,7 +105,7 @@ export class SdTextarea {
|
|
|
105
105
|
'--sd-system-size-field-sm-height': 'auto',
|
|
106
106
|
'--sd-system-radius-field-sm': `${TEXTAREA_TOKENS.radius}px`,
|
|
107
107
|
};
|
|
108
|
-
return (h("sd-field", { key: '
|
|
108
|
+
return (h("sd-field", { key: 'ca7dc6c13d22ba43cd99ee1e976599d7efb1eceb', 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: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, h("div", { key: 'a36ffabff714596bf780f2a63ccfde3e02eadda7', class: "sd-textarea__content" }, h("textarea", { key: 'b7f8a55b7ee4dfc394c380a97e21c6cc34d12b9b', name: this.name, ref: el => (this.nativeEl = el), class: `sd-textarea__native ${this.textareaClass}`, value: this.internalValue || '', placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, autofocus: this.autoFocus, maxLength: this.maxLength, rows: this.rows, spellcheck: this.spellcheck, onInput: this.handleInput, onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event), style: this.textareaStyle }))));
|
|
109
109
|
}
|
|
110
110
|
static get is() { return "sd-textarea"; }
|
|
111
111
|
static get originalStyleUrls() {
|
|
@@ -11,10 +11,10 @@ export class SdToast {
|
|
|
11
11
|
render() {
|
|
12
12
|
const typeConfig = TOAST_TYPE_CONFIG[this.type] ?? TOAST_TYPE_CONFIG.default;
|
|
13
13
|
const iconSize = Number(TOAST_LAYOUT.iconSize);
|
|
14
|
-
return (h("div", { key: '
|
|
14
|
+
return (h("div", { key: 'f5db941adee41c3d2c57c2c7a12d94d03dcdebb6', style: {
|
|
15
15
|
'--sd-toast-bg': typeConfig.bg,
|
|
16
16
|
'--sd-toast-text': typeConfig.content,
|
|
17
|
-
} }, h("div", { key: '
|
|
17
|
+
} }, h("div", { key: '68362fac26744fc7e805a18c589f4aff5845edc1', class: "sd-toast", role: "status", "aria-live": "polite", "aria-atomic": "true" }, this.icon && (h("div", { key: '8ec7941b469b6d0242ab68b7928a9dbf6e75bb5f', class: "sd-toast__icon" }, h("sd-icon", { key: 'c057a100de91cecc3435bfa6a95c928727eb1836', name: this.icon, size: iconSize, color: typeConfig.content }))), h("div", { key: '21e84dd6cdf7efa52611da532a0983268c7c2cb2', class: "sd-toast__content" }, h("span", { key: '99c370fe3d4a54103fbccef395afadf2923f3613', class: "sd-toast__message" }, this.message)), this.link && (h("a", { key: '3ce7109c2d1f5cd03f4fcc6bb01ede14c6400734', href: this.link, class: "sd-toast__link", target: "_blank", rel: "noopener noreferrer" }, this.linkLabel || this.link)), this.useClose && (h("sd-ghost-button", { key: '2cf982fd1fe538533ceff61bbdecdacd2d69e51c', class: "sd-toast__close", icon: "close", intent: this.type === 'caution' ? 'default' : 'inverse', ariaLabel: "close", size: "xs", onClick: () => this.close.emit() })))));
|
|
18
18
|
}
|
|
19
19
|
static get is() { return "sd-toast"; }
|
|
20
20
|
static get originalStyleUrls() {
|
|
@@ -216,7 +216,7 @@ export class SdToastContainer {
|
|
|
216
216
|
const activeToasts = toasts.filter(t => t.state !== 'exiting').reverse();
|
|
217
217
|
const indexMap = new Map();
|
|
218
218
|
activeToasts.forEach((t, i) => indexMap.set(t.id, i));
|
|
219
|
-
return (h("div", { key: '
|
|
219
|
+
return (h("div", { key: '925f4bf56626e8c722051afa65aa64f2a50007db', class: "sd-toast-container", style: this.getContainerStyles(), onMouseEnter: () => {
|
|
220
220
|
this.expanded = true;
|
|
221
221
|
this.pauseTimers();
|
|
222
222
|
}, onMouseLeave: () => {
|
|
@@ -45,7 +45,7 @@ export class SdToggle {
|
|
|
45
45
|
'--sd-toggle-content-select': TOGGLE_COLORS.content.select,
|
|
46
46
|
'--sd-toggle-content-disabled': TOGGLE_COLORS.content.disabled,
|
|
47
47
|
};
|
|
48
|
-
return (h("label", { key: '
|
|
48
|
+
return (h("label", { key: '9ef981165b998f43ec23f3bb1cf0ef385962d7fb', class: this.toggleClasses, style: cssVars, "aria-label": this.label || 'toggle' }, this.label, h("input", { key: '6b6d2a89f43036f624c7bc291b2c5aa7a93c8f0a', style: { display: 'none' }, type: "checkbox", onInput: this.handleChange })));
|
|
49
49
|
}
|
|
50
50
|
static get is() { return "sd-toggle"; }
|
|
51
51
|
static get originalStyleUrls() {
|
|
@@ -81,14 +81,14 @@ export class SdTooltip {
|
|
|
81
81
|
const toggleTooltip = () => (this.showTooltip = !this.showTooltip);
|
|
82
82
|
const divTrigger = trigger === 'hover' ? hoverTrigger : this.label ? {} : { onClick: toggleTooltip };
|
|
83
83
|
const buttonClickTrigger = trigger === 'click' && this.label ? { onSdClick: toggleTooltip } : {};
|
|
84
|
-
return (h(Fragment, { key: '
|
|
84
|
+
return (h(Fragment, { key: '9e14a4013ea6d04a37529cf7afdb10fe4b3d98eb' }, h("div", { key: 'd98396d4440a795e59b0d2fede7381f8e0da7280', class: `sd-tooltip-trigger ${this.sdClass || ''}`, ...divTrigger }, this.label ? (h("sd-button", { ref: el => (this.buttonEl = el), label: this.label, icon: icon, size: this.buttonSize ?? 'sm', color: color, variant: this.buttonVariant ?? 'primary', class: "sd-tooltip", ...buttonClickTrigger })) : (h("sd-icon", { ref: el => (this.buttonEl = el), name: icon, size: this.iconSize ?? 12, color: color, class: "sd-tooltip" }))), this.showTooltip && (h("sd-floating-portal", { key: '59d42ad7aafd94fbe89fc5af3bddf5a305e13a4c', parentRef: this.buttonEl, onSdClose: this.handleClose.bind(this), placement: placement, offset: this.tooltipOffset }, h("div", { key: '88a927d2c3461c7c68865262e8565d0d1385e9af', ref: el => (this.menuEl = el), class: {
|
|
85
85
|
'sd-floating-menu': true,
|
|
86
86
|
[`sd-floating-menu--${tooltipType}`]: true,
|
|
87
87
|
[`sd-floating-menu--${placement}`]: true,
|
|
88
88
|
}, style: {
|
|
89
89
|
'--sd-floating-bg': typeConfig.bg,
|
|
90
90
|
'--sd-floating-content': typeConfig.content,
|
|
91
|
-
}, onMouseEnter: () => this.show(), onMouseLeave: () => this.startHideTimer() }, h("i", { key: '
|
|
91
|
+
}, onMouseEnter: () => this.show(), onMouseLeave: () => this.startHideTimer() }, h("i", { key: 'eb2bcb4e6faa2066e309b662f372fbf8bef42a3e', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${placement}` }, h(TooltipArrow, { key: 'f13005f88ef3194d43de72a87ee78f2c0858682e' })), h("div", { key: '726aff3af3603593d0b994ee17ba88cec071868a', class: "sd-floating-menu__content", innerHTML: this.slotContentHTML }))))));
|
|
92
92
|
}
|
|
93
93
|
static get is() { return "sd-tooltip"; }
|
|
94
94
|
static get originalStyleUrls() {
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export const mockResizeObserver = () => {
|
|
2
|
+
globalThis.ResizeObserver = jest.fn(() => ({
|
|
3
|
+
observe: jest.fn(),
|
|
4
|
+
unobserve: jest.fn(),
|
|
5
|
+
disconnect: jest.fn(),
|
|
6
|
+
}));
|
|
7
|
+
};
|
|
8
|
+
export const mockMutationObserver = () => {
|
|
9
|
+
globalThis.MutationObserver = jest.fn(() => ({
|
|
10
|
+
observe: jest.fn(),
|
|
11
|
+
disconnect: jest.fn(),
|
|
12
|
+
takeRecords: () => [],
|
|
13
|
+
}));
|
|
14
|
+
};
|
|
15
|
+
export const mockRequestAnimationFrame = () => {
|
|
16
|
+
globalThis.requestAnimationFrame = ((cb) => {
|
|
17
|
+
cb(0);
|
|
18
|
+
return 1;
|
|
19
|
+
});
|
|
20
|
+
globalThis.cancelAnimationFrame = (() => undefined);
|
|
21
|
+
};
|
|
22
|
+
export const mockBoundingRect = (rect = {}) => {
|
|
23
|
+
Element.prototype.getBoundingClientRect = jest.fn(() => ({
|
|
24
|
+
top: 0,
|
|
25
|
+
left: 0,
|
|
26
|
+
bottom: 0,
|
|
27
|
+
right: 0,
|
|
28
|
+
width: 0,
|
|
29
|
+
height: 0,
|
|
30
|
+
x: 0,
|
|
31
|
+
y: 0,
|
|
32
|
+
toJSON: () => ({}),
|
|
33
|
+
...rect,
|
|
34
|
+
}));
|
|
35
|
+
};
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-
|
|
1
|
+
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-D3gjBBCU.js";import{c as t}from"./p-DRVnqiWc.js";let n=null;function e(t,n){n&&(n.position&&t.setAttribute("position",n.position),null!=n.maxVisible&&t.setAttribute("max-visible",n.maxVisible+""),null!=n.defaultDuration&&t.setAttribute("default-duration",n.defaultDuration+""),null!=n.zIndex&&t.setAttribute("z-index",n.zIndex+""))}function o(t){return n&&document.body.contains(n)?(e(n,t),n):(n=document.createElement("sd-toast-container"),e(n,t),document.body.appendChild(n),n)}function i(t){return"function"==typeof t.create?Promise.resolve():new Promise((n=>{const e=()=>{"function"==typeof t.create?n():requestAnimationFrame(e)};requestAnimationFrame(e)}))}const c={async create(t,n,e){const{globalOptions:s,...r}=e??{},c=o(s);return await i(c),c.create({message:t,type:n,...r})},async dismiss(t){if(n)return await i(n),n.dismiss(t)},async dismissAll(){if(n)return await i(n),n.dismissAll()},configure(t){o(t)}},u="sd-modal-container";let d=null;const l={ok:"confirm",cancel:"cancel",close:"close"};class m{modalId;okFn;cancelFn;closeFn;clickFn;dismissedFn;containerRef;pendingActions=[];dismissRequested=!1;constructor(t,n){this.modalId=t,this.containerRef=n}onOk(t){return this.okFn=t,this}onCancel(t){return this.cancelFn=t,this}onClose(t){return this.closeFn=t,this}onClick(t){return this.clickFn=t,this}onDismissed(t){return this.dismissedFn=t,this}update(t){return this.runOrQueue((()=>{this.containerRef.update?.(this.modalId,t)})),this}ok(){return this.dismiss("ok")}cancel(){return this.dismiss("cancel")}close(){return this.dismiss("close")}dismiss(t="close"){if(this.dismissRequested)return this;this.dismissRequested=!0;const n=l[t];return this.runOrQueue((()=>{this.containerRef.dismissById?.(this.modalId,n)})),this}_triggerOk(){this.okFn?.()}_triggerCancel(){this.cancelFn?.()}_triggerClose(){this.closeFn?.()}_triggerClick(){this.clickFn?.()}_triggerDismissed(){this.dismissedFn?.()}_setId(t){this.modalId=t;const n=[...this.pendingActions];this.pendingActions=[],n.forEach((t=>t()))}_setContainer(t){this.containerRef=t}runOrQueue(t){this.modalId&&this.containerRef?t():this.pendingActions.push(t)}}function f(){if("undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof customElements)throw Error("[sdModal] Browser APIs are unavailable. Use `sdModal` only on the client.")}function h(){if(f(),function(){if(!customElements.get(u))throw Error("[sdModal] `sd-modal-container` is not registered. Call `defineCustomElements(window)` before using `sdModal`.")}(),d&&d.isConnected)return d;const t=document.createElement(u);return t.setAttribute("auto-remove",""),document.body.appendChild(t),d=t,t}async function w(t){if(await customElements.whenDefined(u),"function"==typeof t.open)return Promise.resolve();throw Error("[sdModal] `sd-modal-container` is registered but not ready to open dialogs.")}function p(){return new m("")}function y(t,n){const{component:e,persistent:s}=n,o=h(),i={persistent:s};t._setContainer(o),w(o).then((async()=>{const n=await o.createCustom(e,i,t);t._setId(n)}))}const E={confirm(t){const n=h(),e=new m("",n);return w(n).then((async()=>{const s=await n.open(t,e);e._setId(s)})),e},loading(t={}){const n=h(),e=new m("",n);return w(n).then((async()=>{const s=await n.openLoading(t,e);e._setId(s)})),e},create(t){const n=p();return y(n,t),n},configure(n){f(),t(n)}},C="sd-loading-container";let k=null;async function A(t){const n=(function(){if("undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof customElements)throw Error("[sdLoading] Browser APIs are unavailable. Use `sdLoading` only on the client.")}(),function(){if(!customElements.get(C))throw Error("[sdLoading] `sd-loading-container` is not registered. Call `defineCustomElements(window)` before using `sdLoading`.")}(),k&&document.body.contains(k)||(k=document.createElement(C),document.body.appendChild(k)),k);await customElements.whenDefined(C),t(n)}const P={show(t={}){A((n=>{n.show?.(t)}))},hide(){k&&A((t=>{t.hide?.()}))}};export{y as _attachSdModalWithRef,p as _createSdModalRef,P as sdLoading,E as sdModal,c as sdToast}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as n,c as o,h as s,t as d}from"./p-
|
|
1
|
+
import{p as t,H as n,c as o,h as s,t as d}from"./p-D3gjBBCU.js";import{i,g as b,B as e,d as a,c as u,a as r,P as v,b as h}from"./p-C-kw2p2a.js";import{d as l}from"./p-EbjZr2OA.js";const c=t(class extends n{constructor(t){super(),!1!==t&&this.__registerHost(),this.click=o(this,"sdClick",7)}name="primary_sm";label="";icon;rightIcon;ariaLabel="";disabled=!1;type="button";click;hasWarnedMissingAriaLabel=!1;handleClick=t=>{this.disabled?t.preventDefault():this.click.emit(t)};get resolvedConfig(){if(!i(this.name))throw new Error(`Invalid sd-button-v2 name: ${this.name}`);return{config:e[this.name],preset:b(this.name)}}getButtonClasses(t,n,o,s){const d=["sd-button-v2",`sd-button-v2--${t}`,`sd-button-v2--${n}`];return this.disabled&&d.push("sd-button-v2--disabled"),s&&d.push("sd-button-v2--icon-only"),o&&d.push("sd-button-v2--has-label"),d.join(" ")}componentWillRender(){this.warnIfMissingAriaLabel()}warnIfMissingAriaLabel(){this.label||!Boolean(this.icon)&&!Boolean(this.rightIcon)||this.ariaLabel.trim()?this.hasWarnedMissingAriaLabel=!1:this.hasWarnedMissingAriaLabel||(console.warn(`[sd-button-v2] icon-only buttons require \`ariaLabel\`. Received name="${this.name}" icon="${this.icon??this.rightIcon}".`),this.hasWarnedMissingAriaLabel=!0)}render(){const{config:t,preset:n}=this.resolvedConfig,o=Boolean(this.label),d=!this.label&&Boolean(this.icon)!==Boolean(this.rightIcon),i=d&&this.ariaLabel.trim()?this.ariaLabel:void 0;return s("button",{key:"e3e2074fbe2b48117d5834efac7ff3036757aab3",class:this.getButtonClasses(n,t.size,o,d),type:this.type,disabled:this.disabled,"aria-label":i,style:{"--sd-button-v2-bg":t.color,"--sd-button-v2-bg-hover":h[n],"--sd-button-v2-border":v[n],"--sd-button-v2-content":r[n],"--sd-button-v2-accent":u},onClick:this.handleClick},s("span",{key:"90ea3bf42c9e16c836c6fdfdf26a74c8a848c31b",class:"sd-button-v2__content"},this.icon&&s("sd-icon",{key:"b9f4a1c42ae866aac1f65f4bbedb282ae0c10c72",class:"sd-button-v2__icon",name:this.icon,size:a[t.size],color:"var(--sd-button-v2-current-icon)"}),this.label&&s("span",{key:"5e5dfbabdbec86c2da625c6a70fcda10303d0e50",class:"sd-button-v2__label"},this.label),this.rightIcon&&s("sd-icon",{key:"f1c3a74b6d7e83fa755c97f83c6d97dea8411537",class:"sd-button-v2__icon sd-button-v2__icon--right",name:this.rightIcon,size:a[t.size],color:"var(--sd-button-v2-current-icon)"})))}static get style(){return"sd-button-v2{display:inline-flex;width:fit-content;height:fit-content}.sd-button-v2{--sd-button-v2-height:36px;--sd-button-v2-padding-x:20px;--sd-button-v2-gap:8px;--sd-button-v2-font-family:inherit;--sd-button-v2-font-size:16px;--sd-button-v2-font-weight:500;--sd-button-v2-text-decoration:none;--sd-button-v2-label-min-width:auto;--sd-button-v2-icon-only-size:var(--sd-button-v2-height);--sd-button-v2-bg:#025497;--sd-button-v2-bg-hover:#004177;--sd-button-v2-border:transparent;--sd-button-v2-content:#FFFFFF;--sd-button-v2-current-content:var(--sd-button-v2-content);--sd-button-v2-current-icon:var(--sd-button-v2-content);display:inline-flex;align-items:center;justify-content:center;min-height:var(--sd-button-v2-height);min-width:var(--sd-button-v2-min-width, auto);padding:0 var(--sd-button-v2-padding-x);border:var(--sd-button-button-border-width-default, 1px) solid var(--sd-button-v2-border);border-radius:var(--sd-button-button-radius-sm, 4px);background:var(--sd-button-v2-bg);color:var(--sd-button-v2-current-content);cursor:pointer;box-sizing:border-box;font-family:var(--sd-button-v2-font-family);font-size:var(--sd-button-v2-font-size);font-weight:var(--sd-button-v2-font-weight);line-height:1;text-decoration:var(--sd-button-v2-text-decoration);transition:background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;white-space:nowrap;-webkit-user-select:none;user-select:none}.sd-button-v2:hover:not(.sd-button-v2--disabled){background:var(--sd-button-v2-bg-hover)}.sd-button-v2:focus-visible{outline:0;box-shadow:0 0 0 2px var(--sd-button-v2-accent)}.sd-button-v2--xs{--sd-button-v2-height:var(--sd-button-button-xs-height, 24px);--sd-button-v2-padding-x:var(--sd-button-button-xs-padding-x, 8px);--sd-button-v2-gap:var(--sd-button-button-xs-gap, 4px);--sd-button-v2-font-family:var(--sd-button-button-xs-typography-font-family, inherit);--sd-button-v2-font-size:var(--sd-button-button-xs-typography-font-size, 12px);--sd-button-v2-font-weight:var(--sd-button-button-xs-typography-font-weight, 500);--sd-button-v2-text-decoration:var(--sd-button-button-xs-typography-text-decoration, none);--sd-button-v2-label-min-width:var(--sd-button-label-xs-min-width, 36px);--sd-button-v2-icon-only-size:var(--sd-button-button-icon-only-xs-width, var(--sd-button-v2-height))}.sd-button-v2--sm{--sd-button-v2-height:var(--sd-button-button-sm-height, 28px);--sd-button-v2-padding-x:var(--sd-button-button-sm-padding-x, 12px);--sd-button-v2-gap:var(--sd-button-button-sm-gap, 6px);--sd-button-v2-font-family:var(--sd-button-button-sm-typography-font-family, inherit);--sd-button-v2-font-size:var(--sd-button-button-sm-typography-font-size, 12px);--sd-button-v2-font-weight:var(--sd-button-button-sm-typography-font-weight, 500);--sd-button-v2-text-decoration:var(--sd-button-button-sm-typography-text-decoration, none);--sd-button-v2-label-min-width:var(--sd-button-label-sm-min-width, 70px);--sd-button-v2-icon-only-size:var(--sd-button-button-icon-only-sm-width, var(--sd-button-v2-height))}.sd-button-v2--md{--sd-button-v2-height:var(--sd-button-button-md-height, 36px);--sd-button-v2-padding-x:var(--sd-button-button-md-padding-x, 20px);--sd-button-v2-gap:var(--sd-button-button-md-gap, 8px);--sd-button-v2-font-family:var(--sd-button-button-md-typography-font-family, inherit);--sd-button-v2-font-size:var(--sd-button-button-md-typography-font-size, 16px);--sd-button-v2-font-weight:var(--sd-button-button-md-typography-font-weight, 500);--sd-button-v2-text-decoration:var(--sd-button-button-md-typography-text-decoration, none);--sd-button-v2-label-min-width:var(--sd-button-label-md-min-width, 100px);--sd-button-v2-icon-only-size:var(--sd-button-button-icon-only-md-width, var(--sd-button-v2-height));border-radius:var(--sd-button-button-radius-md, 6px)}.sd-button-v2--lg{--sd-button-v2-height:var(--sd-button-button-lg-height, 62px);--sd-button-v2-padding-x:var(--sd-button-button-lg-padding-x, 28px);--sd-button-v2-gap:var(--sd-button-button-lg-gap, 12px);--sd-button-v2-font-family:var(--sd-button-button-lg-typography-font-family, inherit);--sd-button-v2-font-size:var(--sd-button-button-lg-typography-font-size, 18px);--sd-button-v2-font-weight:var(--sd-button-button-lg-typography-font-weight, 500);--sd-button-v2-text-decoration:var(--sd-button-button-lg-typography-text-decoration, none);--sd-button-v2-label-min-width:var(--sd-button-label-lg-min-width, 120px);--sd-button-v2-icon-only-size:var(--sd-button-button-icon-only-lg-width, var(--sd-button-v2-height));border-radius:var(--sd-button-button-radius-md, 6px)}.sd-button-v2--has-label{--sd-button-v2-min-width:var(--sd-button-v2-label-min-width, auto)}.sd-button-v2--icon-only{width:var(--sd-button-v2-icon-only-size, var(--sd-button-v2-height));min-width:var(--sd-button-v2-icon-only-size, var(--sd-button-v2-height));height:var(--sd-button-v2-icon-only-size, var(--sd-button-v2-height));padding:0}.sd-button-v2--icon-only .sd-button-v2__content{gap:0}.sd-button-v2--disabled{border-color:var(--sd-button-button-border-disabled, #CCCCCC);background:var(--sd-button-button-bg-disabled, #E1E1E1);--sd-button-v2-current-content:var(--sd-button-button-text-disabled, #888888);--sd-button-v2-current-icon:var(--sd-button-button-icon-disabled, #BBBBBB);cursor:not-allowed}.sd-button-v2 .sd-button-v2__content{display:inline-flex;align-items:center;justify-content:center;gap:var(--sd-button-v2-gap)}.sd-button-v2 .sd-button-v2__label{font:inherit}"}},[512,"sd-button-v2",{name:[1],label:[1],icon:[1],rightIcon:[1,"right-icon"],ariaLabel:[1,"aria-label"],disabled:[4],type:[1]}]);function p(){"undefined"!=typeof customElements&&["sd-button-v2","sd-icon"].forEach((t=>{switch(t){case"sd-button-v2":customElements.get(d(t))||customElements.define(d(t),c);break;case"sd-icon":customElements.get(d(t))||l()}}))}export{c as S,p as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as o,c as s,h as a,t as e}from"./p-D3gjBBCU.js";import{m as i}from"./p-DOXMJi-V.js";import{d}from"./p-B8jXOXtJ.js";import{d as n}from"./p-Dey-lS6x.js";import{d as l}from"./p-EbjZr2OA.js";import{d as m}from"./p-BppjYHF6.js";const c={positive:"primary_md",negative:"danger_md",default:"neutral_outline_md"},r={positive:"notificationOutline",negative:"warningOutline",default:null},f={positive:i.modal.confirm.positive.icon,negative:i.modal.confirm.negative.icon,default:""},b=Number(i.modal.confirm.title.icon),h=t(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.close=s(this,"sdClose",7),this.cancel=s(this,"sdCancel",7),this.ok=s(this,"sdOk",7)}get el(){return this}hasSlottedContent=!1;customContentRef;slotObserver;type="positive";modalTitle="";titleClass="";topMessage=[];bottomMessage=[];mainButtonName;mainButtonLabel="확인";subButtonLabel="";tagPreset="square_sm_grey";tagLabel="";slotLabel="";tagContents;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}))}componentDidRender(){this.customContentRef&&this.tagContents instanceof o&&("function"==typeof this.customContentRef.replaceChildren?this.customContentRef.replaceChildren(this.tagContents):(this.customContentRef.innerHTML="",this.customContentRef.appendChild(this.tagContents)))}disconnectedCallback(){this.slotObserver?.disconnect()}get resolvedMainButton(){return this.mainButtonName??c[this.type]}get hasTagContent(){return!(!this.tagLabel&&!this.slotLabel)}get showContentBox(){return!!this.tagContents||this.hasTagContent||this.hasSlottedContent}syncHasSlottedContent(){const t=Array.from(this.el.childNodes).some((t=>!(t.nodeType===Node.ELEMENT_NODE&&t.classList.contains("sd-confirm-modal"))&&(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&t.textContent?.trim())));t!==this.hasSlottedContent&&(this.hasSlottedContent=t)}render(){const t=r[this.type],o=f[this.type];return a("div",{key:"4ef44b1b2a86914eae3fc59e3c383b12646d1d0c",class:"sd-confirm-modal"},a("sd-ghost-button",{key:"aa62624aaf76a23eb4f1d30b846e6054f3cf001c",class:"sd-confirm-modal__close-button",icon:"close",ariaLabel:"close",onClick:()=>this.close.emit()}),t&&a("sd-icon",{key:"d1329b8e71d455357790a4aa5f73547142830532",class:"sd-confirm-modal__icon",name:t,size:b,color:o}),a("h2",{key:"2c5e0f902327c5eb663e6ccc5057e22e2be11c03",class:`sd-confirm-modal__title ${this.titleClass}`},this.modalTitle),a("div",{key:"1917ef85f9f06de3dd321d664d4022dd4a1524ff",class:"sd-confirm-modal__body"},(this.topMessage??[]).length>0&&a("div",{key:"afa7e6671f4849b7a90317664d07d3c04178c554",class:"sd-confirm-modal__message"},(this.topMessage??[]).map((t=>a("p",{class:"sd-confirm-modal__message-text",innerHTML:t})))),this.showContentBox&&a("div",{key:"d4c06bfdd2222212b1cf8e3ec86ccaca4c394394",class:"sd-confirm-modal__content-box"},this.tagContents?a("div",{class:"sd-confirm-modal__custom-content",ref:t=>{this.customContentRef=t}}):a("slot",{onSlotchange:()=>this.syncHasSlottedContent()},this.tagLabel&&a("sd-tag",{name:this.tagPreset,label:this.tagLabel}),this.slotLabel&&a("span",{class:"sd-confirm-modal__slot-label"},this.slotLabel))),(this.bottomMessage??[]).length>0&&a("div",{key:"8af201f6b6b08991ba31db2f2e59ee44a7b10d50",class:"sd-confirm-modal__message"},(this.bottomMessage??[]).map((t=>a("p",{class:"sd-confirm-modal__message-text",innerHTML:t}))))),a("div",{key:"733f478a57a68bd9d4cc6563558bc0fafbfa5b9a",class:"sd-confirm-modal__button"},this.subButtonLabel&&a("sd-button-v2",{key:"a7be74a833fbd012d14e79b570a4d97e3a495a52",name:"neutral_outline_md",label:this.subButtonLabel,onSdClick:()=>this.cancel.emit()}),a("sd-button-v2",{key:"e09be98a918aafd291a7b12c221b70e72ba14ab9",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__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"],tagContents:[16],hasSlottedContent:[32]}]);function p(){"undefined"!=typeof customElements&&["sd-confirm-modal","sd-button-v2","sd-ghost-button","sd-icon","sd-tag"].forEach((t=>{switch(t){case"sd-confirm-modal":customElements.get(e(t))||customElements.define(e(t),h);break;case"sd-button-v2":customElements.get(e(t))||d();break;case"sd-ghost-button":customElements.get(e(t))||n();break;case"sd-icon":customElements.get(e(t))||l();break;case"sd-tag":customElements.get(e(t))||m()}}))}export{h as S,p 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-D3gjBBCU.js";import{n as r}from"./p-CCwNgVmC.js";import{d as l}from"./p-dNJIFthT.js";import{d as h}from"./p-DfH_fO01.js";import{d as a}from"./p-C7DajKYn.js";import{d}from"./p-BcMNA89i.js";import{d as n}from"./p-EbjZr2OA.js";import{d as c}from"./p-q0VWISKA.js";import{d as p}from"./p-Nvx13YlG.js";import{d as u}from"./p-DegvQLTF.js";import{d as m}from"./p-xnLvZ-xn.js";import{d as b}from"./p-BmYM7-4v.js";import{d as f}from"./p-BheX6lAy.js";const g=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="선택";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).find((t=>t.value===this.value));return t?.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 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:"76625e332090d20e2f66159bba5ee1b9a11320a6",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:"8a0ae8a5e05459128409dbe21779f5e3d91b3a04",class:"sd-select",ref:t=>{this.triggerRef=t}},i("sd-select-trigger",{key:"6b47231914655a8e197e3b38cd8e37c5214efc17",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:"eaed402d276cc94a1324ede9cbf09bc436f8a1db",...e},i("sd-select-listbox",{key:"a96f75e06d974c8fd88ac72f083fe4b0ef424a0b",type:this.type,options:this.options,value:this.value,emitValue:this.emitValue,useSearch:this.useSearch,useSelectAll:this.useSelectAll,triggerWidth: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],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 w(){"undefined"!=typeof customElements&&["sd-select","sd-button","sd-checkbox","sd-field","sd-floating-portal","sd-icon","sd-portal","sd-select-list-item","sd-select-list-item-search","sd-select-listbox","sd-select-trigger","sd-tooltip"].forEach((t=>{switch(t){case"sd-select":customElements.get(o(t))||customElements.define(o(t),g);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-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-tooltip":customElements.get(o(t))||f()}}))}export{g as S,w as d}
|