@sellmate/design-system 1.0.75 → 1.0.77
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-CaGGRpd8.js} +1 -1
- package/dist/cjs/index.cjs.js +5 -0
- 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 +3 -3
- 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 +2 -2
- package/dist/cjs/sd-date-picker-trigger.cjs.entry.js +3 -3
- package/dist/cjs/sd-date-picker.cjs.entry.js +3 -3
- package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +2 -2
- package/dist/cjs/sd-date-range-picker.cjs.entry.js +1 -1
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +94 -7
- 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 +11 -6
- package/dist/cjs/sd-guide.cjs.entry.js +2 -2
- 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 +3 -3
- package/dist/cjs/sd-loading-container.cjs.entry.js +3 -3
- package/dist/cjs/sd-modal-container.cjs.entry.js +77 -69
- package/dist/cjs/sd-number-input.cjs.entry.js +4 -4
- package/dist/cjs/sd-pagination_5.cjs.entry.js +921 -0
- 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 +7 -2
- 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} +108 -48
- package/dist/cjs/sd-switch.cjs.entry.js +2 -2
- package/dist/cjs/sd-table.cjs.entry.js +178 -21
- package/dist/cjs/sd-table.config-hnNodd18.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 +54 -2
- 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 +3 -3
- package/dist/cjs/sd-toggle.cjs.entry.js +2 -2
- package/dist/cjs/{system-BbCUNhDJ.js → system-DRemSdU1.js} +7 -1
- package/dist/cjs/{tooltipArrow-DuANjCfc.js → tooltipArrow-BEff0q3z.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.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.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 +10 -5
- 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-modal-container/sd-modal-container.js +77 -71
- 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-radio-button/sd-radio-button.js +6 -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} +133 -33
- 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 +81 -0
- package/dist/collection/components/sd-table/sd-table.css +17 -9
- package/dist/collection/components/sd-table/sd-table.js +179 -21
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.css +0 -8
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +9 -5
- package/dist/collection/components/sd-table/sd-td/sd-td.js +91 -1
- package/dist/collection/components/sd-table/sd-thead/sd-thead.css +16 -12
- package/dist/collection/components/sd-table/sd-thead/sd-thead.js +58 -9
- package/dist/collection/components/sd-table/sd-tr/sd-tr.css +11 -3
- package/dist/collection/components/sd-table/sd-tr/sd-tr.js +75 -12
- 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/modal.js +5 -0
- 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-B6KZfiQ5.js +1 -0
- package/dist/components/{p-CTwEbxRN.js → p-BEOrkEV1.js} +1 -1
- package/dist/components/p-BJJvCBQs.js +1 -0
- package/dist/components/p-BM_PRj8W.js +1 -0
- package/dist/components/p-BR_ZAr48.js +1 -0
- package/dist/components/p-BeNJfxnb.js +1 -0
- package/dist/components/{p-BLwIhCdO.js → p-BfoLbEZx.js} +1 -1
- package/dist/components/p-Bm8Fue-a.js +1 -0
- package/dist/components/{p-DaAhgdib.js → p-BynnUMVZ.js} +1 -1
- package/dist/components/{p-D5HLYqT-.js → p-C52iEAqd.js} +1 -1
- package/dist/components/p-C8Dy_x5h.js +1 -0
- package/dist/components/{p-C3dI7f7C.js → p-CJAQuJik.js} +1 -1
- package/dist/components/{p-iAWNMLXh.js → p-CJqZcEqD.js} +1 -1
- package/dist/components/{p-H-9uoufd.js → p-CNm5Qbf-.js} +1 -1
- package/dist/components/{p-B3xZdEDI.js → p-CQy5JErK.js} +1 -1
- package/dist/components/{p-BgFLSKqC.js → p-CZxeqYuw.js} +1 -1
- package/dist/components/{p-SDBnyM8D.js → p-CkgQbCMR.js} +1 -1
- package/dist/components/p-CvnC61M9.js +1 -0
- package/dist/components/{p-6LtMeKKA.js → p-D1SJ2TMu.js} +1 -1
- package/dist/components/{p-BXdEjuI_.js → p-D2FOkhao.js} +1 -1
- package/dist/components/p-D66nhMt3.js +1 -0
- package/dist/components/p-DDDZWrWj.js +1 -0
- package/dist/components/p-DK3vj3bG.js +1 -0
- package/dist/components/{p-CZPR_5mk.js → p-DcuLMUdl.js} +1 -1
- package/dist/components/p-DxXwz3cY.js +1 -0
- package/dist/components/p-NlCzTjK4.js +1 -0
- package/dist/components/{p-BZm6KN1s.js → p-RpjjrX78.js} +1 -1
- package/dist/components/{p-BM0sVq5Z.js → p-ZH78tQXS.js} +1 -1
- package/dist/components/{p-DQfNwvwx.js → p-ZLsQA11g.js} +1 -1
- package/dist/components/{p-DdJyzIYe.js → p-eGToaKCt.js} +1 -1
- package/dist/components/p-hTUSl23P.js +1 -0
- package/dist/components/p-mqa9-iql.js +1 -0
- package/dist/components/sd-action-modal.js +1 -1
- package/dist/components/sd-badge.js +1 -1
- package/dist/components/sd-barcode-input.js +1 -1
- package/dist/components/sd-button-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/index.esm.js +1 -1
- package/dist/design-system/{p-dad07e1a.entry.js → p-120df622.entry.js} +1 -1
- package/dist/design-system/{p-6af9e663.entry.js → p-28b727df.entry.js} +1 -1
- package/dist/design-system/{p-05a1c092.entry.js → p-2cd2fb76.entry.js} +1 -1
- package/dist/design-system/p-3f9d60a0.entry.js +1 -0
- package/dist/design-system/p-400b3676.entry.js +1 -0
- package/dist/design-system/{p-2eb910ec.entry.js → p-41ea33fb.entry.js} +1 -1
- package/dist/design-system/{p-c7bcb232.entry.js → p-42906763.entry.js} +1 -1
- package/dist/design-system/p-42a8f8a2.entry.js +1 -0
- package/dist/design-system/{p-fdcfaa7c.entry.js → p-43ffe7b0.entry.js} +1 -1
- package/dist/design-system/p-4ad9a5b8.entry.js +1 -0
- package/dist/design-system/{p-3a9559ee.entry.js → p-504033e8.entry.js} +1 -1
- package/dist/design-system/p-64d3c984.entry.js +1 -0
- package/dist/design-system/{p-ce3d0f9c.entry.js → p-67f88b1a.entry.js} +1 -1
- package/dist/design-system/{p-6a3f8588.entry.js → p-68d0fa15.entry.js} +1 -1
- package/dist/design-system/p-6dc47f4c.entry.js +1 -0
- package/dist/design-system/{p-d6896893.entry.js → p-6f9b0b32.entry.js} +1 -1
- package/dist/design-system/{p-3ca5c303.entry.js → p-704dc1f1.entry.js} +1 -1
- package/dist/design-system/{p-17cd3a33.entry.js → p-732ee178.entry.js} +1 -1
- package/dist/design-system/{p-8200b5f2.entry.js → p-7d892b68.entry.js} +1 -1
- package/dist/design-system/{p-16a15368.entry.js → p-809e616c.entry.js} +1 -1
- package/dist/design-system/p-80c51996.entry.js +1 -0
- package/dist/design-system/{p-b745cd95.entry.js → p-889971bc.entry.js} +1 -1
- package/dist/design-system/{p-33bec0e3.entry.js → p-8abc2413.entry.js} +1 -1
- package/dist/design-system/{p-bb492ba7.entry.js → p-970f9ea5.entry.js} +1 -1
- package/dist/design-system/p-BHmXH7dZ.js +2 -0
- package/dist/design-system/{p-BgFLSKqC.js → p-CZxeqYuw.js} +1 -1
- package/dist/design-system/p-DDDZWrWj.js +1 -0
- package/dist/design-system/p-DG7d45mX.js +1 -0
- package/dist/design-system/{p-280dc548.entry.js → p-a69d6a99.entry.js} +1 -1
- package/dist/design-system/{p-49f78122.entry.js → p-ab5a94c8.entry.js} +1 -1
- package/dist/design-system/{p-f4a00276.entry.js → p-ae626d30.entry.js} +1 -1
- package/dist/design-system/p-b9a870bf.entry.js +1 -0
- package/dist/design-system/{p-97ebf578.entry.js → p-bab814c5.entry.js} +1 -1
- package/dist/design-system/{p-eb29dc9f.entry.js → p-c21f30de.entry.js} +1 -1
- package/dist/design-system/p-c863a31d.entry.js +1 -0
- package/dist/design-system/{p-a8bde8d9.entry.js → p-cab35b9a.entry.js} +1 -1
- package/dist/design-system/p-cea424f6.entry.js +1 -0
- package/dist/design-system/p-d8bb2cb4.entry.js +1 -0
- package/dist/design-system/p-dd63e10f.entry.js +1 -0
- package/dist/design-system/p-e04302a2.entry.js +1 -0
- package/dist/design-system/{p-5f6379e9.entry.js → p-e84d1bac.entry.js} +1 -1
- package/dist/design-system/p-ebbffddb.entry.js +1 -0
- package/dist/design-system/{p-d1dfa0e1.entry.js → p-ec02b3e8.entry.js} +1 -1
- package/dist/design-system/{p-8ff967f7.entry.js → p-ed1c4625.entry.js} +1 -1
- package/dist/design-system/{p-2d154fe0.entry.js → p-f06038fd.entry.js} +1 -1
- package/dist/design-system/{p-2cd2f2dd.entry.js → p-f80d10ad.entry.js} +1 -1
- package/dist/design-system/p-fbb7e090.entry.js +1 -0
- package/dist/design-system/{p-a9fc2c21.entry.js → p-feb84f87.entry.js} +1 -1
- package/dist/esm/design-system.js +3 -3
- package/dist/esm/{index-Bp7ytJz5.js → index-BHmXH7dZ.js} +1 -1
- package/dist/esm/index.js +5 -0
- 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 +3 -3
- 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 +2 -2
- package/dist/esm/sd-date-picker-trigger.entry.js +3 -3
- package/dist/esm/sd-date-picker.entry.js +3 -3
- package/dist/esm/sd-date-range-picker-calendar.entry.js +2 -2
- package/dist/esm/sd-date-range-picker.entry.js +1 -1
- package/dist/esm/sd-dropdown-button.entry.js +93 -6
- 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 +11 -6
- package/dist/esm/sd-guide.entry.js +2 -2
- package/dist/esm/{sd-input_2.entry.js → sd-input.entry.js} +4 -43
- 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 +77 -69
- package/dist/esm/sd-number-input.entry.js +4 -4
- package/dist/esm/sd-pagination_5.entry.js +915 -0
- 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 +7 -2
- 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} +105 -45
- package/dist/esm/sd-switch.entry.js +2 -2
- package/dist/esm/sd-table.config-DKkzCQwJ.js +94 -0
- package/dist/esm/sd-table.entry.js +178 -21
- 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 +54 -2
- 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 +3 -3
- package/dist/esm/sd-toggle.entry.js +2 -2
- package/dist/esm/{system-BgFLSKqC.js → system-CZxeqYuw.js} +7 -1
- package/dist/esm/{tooltipArrow-BHRQVawd.js → tooltipArrow-DZ-N5HBq.js} +1 -1
- package/dist/types/components/sd-ghost-button/sd-ghost-button.d.ts +1 -0
- package/dist/types/components/sd-modal-container/sd-modal-container.config.d.ts +1 -1
- package/dist/types/components/sd-modal-container/sd-modal-container.d.ts +6 -4
- package/dist/types/components/sd-radio-button/sd-radio-button.d.ts +1 -0
- 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} +15 -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 +17 -0
- package/dist/types/components/sd-table/sd-td/sd-td.d.ts +8 -0
- 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 +4 -0
- package/dist/types/components.d.ts +1012 -2402
- package/dist/types/utils/testing/index.d.ts +2 -0
- package/dist/types/utils/testing/mocks.d.ts +4 -0
- package/hydrate/index.js +821 -2272
- package/hydrate/index.mjs +821 -2272
- package/package.json +1 -1
- package/dist/cjs/base-dropdown-event-BTPlZ1KF.js +0 -91
- package/dist/cjs/sd-pagination_2.cjs.entry.js +0 -427
- 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/sd-tbody.cjs.entry.js +0 -66
- package/dist/cjs/sd-thead.cjs.entry.js +0 -179
- package/dist/cjs/sd-tr.cjs.entry.js +0 -171
- 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 -819
- 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-9ZtJl4s6.js +0 -1
- package/dist/components/p-BALOEavB.js +0 -1
- package/dist/components/p-BZc6lwGD.js +0 -1
- package/dist/components/p-Bbs5Ws0k.js +0 -1
- package/dist/components/p-Bp0B8tcl.js +0 -1
- package/dist/components/p-Btx5sC7s.js +0 -1
- package/dist/components/p-CHFGWh0m.js +0 -1
- package/dist/components/p-CNAzAL53.js +0 -1
- package/dist/components/p-CWEeXx2E.js +0 -1
- package/dist/components/p-CgL8_FSD.js +0 -1
- package/dist/components/p-CqghR1aS.js +0 -1
- package/dist/components/p-Cy6HMEsK.js +0 -1
- package/dist/components/p-D8fG9Yt7.js +0 -1
- package/dist/components/p-DBex-RJU.js +0 -1
- package/dist/components/p-DEBakAhm.js +0 -1
- package/dist/components/p-DWMY9O2B.js +0 -1
- package/dist/components/p-DuMkBStM.js +0 -1
- package/dist/components/p-vQDL-PZ8.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-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-380198bc.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-6b537e2f.entry.js +0 -1
- package/dist/design-system/p-6e90fb80.entry.js +0 -1
- package/dist/design-system/p-711c59fc.entry.js +0 -1
- package/dist/design-system/p-7b77c65c.entry.js +0 -1
- package/dist/design-system/p-850de8d4.entry.js +0 -1
- package/dist/design-system/p-8f88bd67.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-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-ba5fea6f.entry.js +0 -1
- package/dist/design-system/p-be54d6bd.entry.js +0 -1
- package/dist/design-system/p-c3379a6e.entry.js +0 -1
- package/dist/design-system/p-cc62c180.entry.js +0 -1
- package/dist/design-system/p-ce2210ad.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/design-system/p-dc07d618.entry.js +0 -1
- package/dist/design-system/p-ef09409c.entry.js +0 -1
- package/dist/design-system/p-f8237991.entry.js +0 -1
- package/dist/esm/base-dropdown-event-CRdYeSBK.js +0 -89
- package/dist/esm/sd-pagination_2.entry.js +0 -424
- 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/sd-tbody.entry.js +0 -64
- package/dist/esm/sd-thead.entry.js +0 -177
- package/dist/esm/sd-tr.entry.js +0 -169
- 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 -71
- 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
|
@@ -7,7 +7,7 @@ sd-thead * {
|
|
|
7
7
|
|
|
8
8
|
.thead {
|
|
9
9
|
display: table-header-group;
|
|
10
|
-
height: 36px;
|
|
10
|
+
height: var(--table-header-height, 36px);
|
|
11
11
|
}
|
|
12
12
|
.thead--sticky {
|
|
13
13
|
position: sticky;
|
|
@@ -22,12 +22,16 @@ sd-thead * {
|
|
|
22
22
|
|
|
23
23
|
.th {
|
|
24
24
|
display: table-cell;
|
|
25
|
-
background: #F5FAFF;
|
|
26
|
-
height: 36px;
|
|
27
|
-
padding: 0 16px;
|
|
28
|
-
font-
|
|
25
|
+
background: var(--table-header-bg, #F5FAFF);
|
|
26
|
+
height: var(--table-header-height, 36px);
|
|
27
|
+
padding: 0 var(--table-header-padding-x, 16px);
|
|
28
|
+
font-family: var(--table-header-font-family, inherit);
|
|
29
|
+
font-weight: var(--table-header-font-weight, 500);
|
|
30
|
+
font-size: var(--table-header-font-size, 12px);
|
|
31
|
+
line-height: var(--table-header-line-height, 20px);
|
|
32
|
+
text-decoration: var(--table-header-text-decoration, none);
|
|
29
33
|
vertical-align: middle;
|
|
30
|
-
border-bottom: 1px solid #E1E1E1;
|
|
34
|
+
border-bottom: var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1);
|
|
31
35
|
-webkit-user-select: none;
|
|
32
36
|
user-select: none;
|
|
33
37
|
position: relative;
|
|
@@ -54,13 +58,13 @@ sd-thead * {
|
|
|
54
58
|
}
|
|
55
59
|
.th.sticky-left {
|
|
56
60
|
position: sticky;
|
|
57
|
-
background-color: #F5FAFF;
|
|
61
|
+
background-color: var(--table-header-bg, #F5FAFF);
|
|
58
62
|
z-index: 110 !important;
|
|
59
63
|
left: var(--sticky-left-offset, 0);
|
|
60
64
|
}
|
|
61
65
|
.th.sticky-right {
|
|
62
66
|
position: sticky;
|
|
63
|
-
background-color: #F5FAFF;
|
|
67
|
+
background-color: var(--table-header-bg, #F5FAFF);
|
|
64
68
|
z-index: 110 !important;
|
|
65
69
|
right: var(--sticky-right-offset, 0);
|
|
66
70
|
}
|
|
@@ -112,7 +116,7 @@ sd-thead * {
|
|
|
112
116
|
display: flex;
|
|
113
117
|
flex-flow: row nowrap;
|
|
114
118
|
align-items: center;
|
|
115
|
-
gap: 4px;
|
|
119
|
+
gap: var(--table-header-gap, 4px);
|
|
116
120
|
}
|
|
117
121
|
.th__content--left {
|
|
118
122
|
justify-content: flex-start;
|
|
@@ -135,11 +139,11 @@ sd-thead * {
|
|
|
135
139
|
right: 0;
|
|
136
140
|
transform: translateY(-50%);
|
|
137
141
|
width: 4px;
|
|
138
|
-
height: 16px;
|
|
142
|
+
height: var(--table-header-resizer-height, 16px);
|
|
139
143
|
cursor: col-resize;
|
|
140
144
|
z-index: 3;
|
|
141
|
-
border-left: 1px solid #CCCCCC;
|
|
142
|
-
border-right: 1px solid #CCCCCC;
|
|
145
|
+
border-left: var(--table-border-width, 1px) solid var(--table-header-resizer-color, #CCCCCC);
|
|
146
|
+
border-right: var(--table-border-width, 1px) solid var(--table-header-resizer-color, #CCCCCC);
|
|
143
147
|
}
|
|
144
148
|
.th__resizer--left {
|
|
145
149
|
right: auto;
|
|
@@ -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;
|
|
@@ -38,7 +40,12 @@ export class SdThead {
|
|
|
38
40
|
this.resolveConfig();
|
|
39
41
|
}
|
|
40
42
|
syncTableContext() {
|
|
41
|
-
|
|
43
|
+
// sd-table이 shadow:true이므로 fallback content로 렌더되면 closest가 경계를 못 넘는다.
|
|
44
|
+
// 그 경우 getRootNode().host(=sd-table)로 폴백한다.
|
|
45
|
+
const closest = this.el.closest('sd-table');
|
|
46
|
+
const root = this.el.getRootNode();
|
|
47
|
+
const fromShadow = root instanceof ShadowRoot ? root.host : null;
|
|
48
|
+
const table = closest ?? fromShadow;
|
|
42
49
|
this.tableEl = table;
|
|
43
50
|
const fromMethod = table?.getTableIdSync?.();
|
|
44
51
|
const fromAttr = table?.getAttribute(TABLE_ID_ATTR);
|
|
@@ -106,9 +113,11 @@ export class SdThead {
|
|
|
106
113
|
this.tableEl.handleResize(index, event, reversed);
|
|
107
114
|
}
|
|
108
115
|
}
|
|
116
|
+
handleColumnSort = (col) => {
|
|
117
|
+
this.sdColumnSort.emit({ column: col });
|
|
118
|
+
};
|
|
109
119
|
handleSelectAll(checked) {
|
|
110
|
-
const
|
|
111
|
-
const nextChecked = currentState === null ? false : !!checked;
|
|
120
|
+
const nextChecked = !!checked;
|
|
112
121
|
const safeRows = Array.isArray(this.rows) ? this.rows : [];
|
|
113
122
|
if (this.tableEl?.toggleSelectAllSync) {
|
|
114
123
|
this.tableEl.toggleSelectAllSync(nextChecked, safeRows);
|
|
@@ -128,27 +137,42 @@ export class SdThead {
|
|
|
128
137
|
const stickyLeftCols = this.visibleColumns.slice(0, stickyLeftCount);
|
|
129
138
|
const middleCols = this.visibleColumns.slice(stickyLeftCount, this.visibleColumns.length - stickyRightCount);
|
|
130
139
|
const stickyRightCols = this.visibleColumns.slice(this.visibleColumns.length - stickyRightCount);
|
|
131
|
-
|
|
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: {
|
|
132
156
|
'thead': true,
|
|
133
157
|
'thead--sticky': this._stickyHeader,
|
|
134
|
-
} }, h("tr", { key: '
|
|
158
|
+
} }, h("tr", { key: 'da786d82d4896b6124becf42f634bcc5b0a6ffb7', class: "tr" }, this._selectable && (h("th", { key: 'b257c5475b7e528fbfc52ea85031a4c49bed7b36', class: {
|
|
135
159
|
'th': true,
|
|
136
160
|
'th--selected': true,
|
|
137
161
|
'sticky-left': true,
|
|
138
162
|
'sticky-left-edge': stickyLeftCount === 0,
|
|
139
163
|
'is-scrolled-left': stickyLeftCount === 0 && this._scrolledLeft,
|
|
140
|
-
}, 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: {
|
|
141
165
|
'th': true,
|
|
142
166
|
[`${col.thClass}`]: Boolean(col.thClass),
|
|
143
167
|
'sticky-left': true,
|
|
144
168
|
'sticky-left-edge': idx === stickyLeftCount - 1,
|
|
145
169
|
'is-scrolled-left': idx === stickyLeftCount - 1 && this._scrolledLeft,
|
|
146
|
-
}, 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) => {
|
|
147
171
|
const actualColIdx = stickyLeftCount + relativeIdx;
|
|
148
172
|
return (h("th", { key: col.name, class: {
|
|
149
173
|
th: true,
|
|
150
174
|
[`${col.thClass}`]: Boolean(col.thClass),
|
|
151
|
-
}, 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) }))));
|
|
152
176
|
}), stickyRightCols.map((col, relativeIdx) => {
|
|
153
177
|
const actualColIdx = this.visibleColumns.length - stickyRightCount + relativeIdx;
|
|
154
178
|
return (h("th", { key: col.name, class: {
|
|
@@ -157,7 +181,7 @@ export class SdThead {
|
|
|
157
181
|
'sticky-right': true,
|
|
158
182
|
'sticky-right-edge': relativeIdx === 0,
|
|
159
183
|
'is-scrolled-right': relativeIdx === 0 && this._scrolledRight,
|
|
160
|
-
}, 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) }))));
|
|
161
185
|
})))));
|
|
162
186
|
}
|
|
163
187
|
static get is() { return "sd-thead"; }
|
|
@@ -373,6 +397,31 @@ export class SdThead {
|
|
|
373
397
|
"_scrolledRight": {}
|
|
374
398
|
};
|
|
375
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
|
+
}
|
|
376
425
|
static get methods() {
|
|
377
426
|
return {
|
|
378
427
|
"refreshConfig": {
|
|
@@ -11,12 +11,15 @@ sd-tr * {
|
|
|
11
11
|
.tr:hover .td {
|
|
12
12
|
background-color: #F9F9F9;
|
|
13
13
|
}
|
|
14
|
+
.tr--no-hover:hover .td {
|
|
15
|
+
background-color: white;
|
|
16
|
+
}
|
|
14
17
|
|
|
15
18
|
.td {
|
|
16
19
|
display: table-cell;
|
|
17
|
-
height: 44px;
|
|
18
|
-
padding: 0 16px;
|
|
19
|
-
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);
|
|
20
23
|
background: white;
|
|
21
24
|
vertical-align: middle;
|
|
22
25
|
overflow: hidden;
|
|
@@ -108,4 +111,9 @@ sd-tr * {
|
|
|
108
111
|
.tr:hover .td.sticky-left,
|
|
109
112
|
.tr:hover .td.sticky-right {
|
|
110
113
|
background-color: #F9F9F9;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.tr--no-hover:hover .td.sticky-left,
|
|
117
|
+
.tr--no-hover:hover .td.sticky-right {
|
|
118
|
+
background-color: white;
|
|
111
119
|
}
|
|
@@ -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;
|
|
@@ -10,6 +11,7 @@ export class SdTr {
|
|
|
10
11
|
tableId = '';
|
|
11
12
|
columnWidths = [];
|
|
12
13
|
isVisible = true;
|
|
14
|
+
spansVersion = 0;
|
|
13
15
|
_columns = [];
|
|
14
16
|
_selectable = false;
|
|
15
17
|
_stickyColumn = { left: 0, right: 0 };
|
|
@@ -27,7 +29,12 @@ export class SdTr {
|
|
|
27
29
|
this.syncTableContext();
|
|
28
30
|
}
|
|
29
31
|
syncTableContext() {
|
|
30
|
-
|
|
32
|
+
// sd-table이 shadow:true이므로 fallback content로 렌더되면 closest가 경계를 못 넘는다.
|
|
33
|
+
// 그 경우 getRootNode().host(=sd-table)로 폴백한다.
|
|
34
|
+
const closest = this.el.closest('sd-table');
|
|
35
|
+
const root = this.el.getRootNode();
|
|
36
|
+
const fromShadow = root instanceof ShadowRoot ? root.host : null;
|
|
37
|
+
const table = closest ?? fromShadow;
|
|
31
38
|
this.tableEl = table;
|
|
32
39
|
const fromMethod = table?.getTableIdSync?.();
|
|
33
40
|
const fromAttr = table?.getAttribute(TABLE_ID_ATTR);
|
|
@@ -52,6 +59,9 @@ export class SdTr {
|
|
|
52
59
|
async refreshConfig() {
|
|
53
60
|
this.resolveConfig();
|
|
54
61
|
}
|
|
62
|
+
async bumpSpansVersion() {
|
|
63
|
+
this.spansVersion = this.spansVersion + 1;
|
|
64
|
+
}
|
|
55
65
|
async updateVisibility() {
|
|
56
66
|
this.updateVisibilitySync();
|
|
57
67
|
}
|
|
@@ -117,37 +127,72 @@ export class SdTr {
|
|
|
117
127
|
this.tableEl.updateRowSelectSync(this.row);
|
|
118
128
|
}
|
|
119
129
|
}
|
|
130
|
+
getSpanFor(col) {
|
|
131
|
+
if (!this.tableEl?.getSpanSync)
|
|
132
|
+
return undefined;
|
|
133
|
+
const fieldName = typeof col.field === 'string' ? col.field : col.name;
|
|
134
|
+
return this.tableEl.getSpanSync(this.rowKey, fieldName);
|
|
135
|
+
}
|
|
136
|
+
isCovered(colIdx) {
|
|
137
|
+
if (!this.tableEl?.isCoveredSync)
|
|
138
|
+
return false;
|
|
139
|
+
return this.tableEl.isCoveredSync(this.rowKey, colIdx, this._columns);
|
|
140
|
+
}
|
|
120
141
|
render() {
|
|
121
142
|
const stickyLeftCount = this._stickyColumn.left || 0;
|
|
122
143
|
const stickyRightCount = this._stickyColumn.right || 0;
|
|
123
144
|
const stickyLeftCols = this.visibleColumns.slice(0, stickyLeftCount);
|
|
124
145
|
const middleCols = this.visibleColumns.slice(stickyLeftCount, this.visibleColumns.length - stickyRightCount);
|
|
125
146
|
const stickyRightCols = this.visibleColumns.slice(this.visibleColumns.length - stickyRightCount);
|
|
126
|
-
|
|
147
|
+
const hasRowspan = this.tableEl?.hasRowspanSync?.() ?? false;
|
|
148
|
+
const rowStyle = {
|
|
149
|
+
display: this.isVisible ? '' : 'none',
|
|
150
|
+
'--table-body-height': `${TABLE_BODY_LAYOUT.default.height}px`,
|
|
151
|
+
'--table-body-padding-x': `${TABLE_BODY_LAYOUT.paddingX}px`,
|
|
152
|
+
'--table-body-font-family': TABLE_BODY_TYPOGRAPHY.fontFamily,
|
|
153
|
+
'--table-body-font-weight': TABLE_BODY_TYPOGRAPHY.fontWeight,
|
|
154
|
+
'--table-body-font-size': `${TABLE_BODY_TYPOGRAPHY.fontSize}px`,
|
|
155
|
+
'--table-body-line-height': `${TABLE_BODY_TYPOGRAPHY.lineHeight}px`,
|
|
156
|
+
'--table-body-text-decoration': TABLE_BODY_TYPOGRAPHY.textDecoration,
|
|
157
|
+
'--table-border-color': TABLE_BORDER.color,
|
|
158
|
+
'--table-border-width': `${TABLE_BORDER.width}px`,
|
|
159
|
+
};
|
|
160
|
+
return (h(Host, { key: '33228ee9f020f915e77f9827e9360087fc2cd565', style: rowStyle }, h("tr", { key: '2f308a547ad19584e509543027cf60ff8faec2f8', class: { 'tr': true, 'tr--no-hover': hasRowspan } }, this._selectable && (h("td", { key: '94f50aa6fd31a63d8d99e8c6f25faf8ba6f68ddf', class: {
|
|
127
161
|
'td': true,
|
|
128
162
|
'td--selected': true,
|
|
129
163
|
'sticky-left': true,
|
|
130
164
|
'sticky-left-edge': stickyLeftCount === 0,
|
|
131
165
|
'is-scrolled-left': stickyLeftCount === 0 && this._scrolledLeft,
|
|
132
|
-
}, style: { '--sticky-left-offset': '0px' } }, h("sd-checkbox", { key: '
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
166
|
+
}, style: { '--sticky-left-offset': '0px' } }, h("sd-checkbox", { key: 'e8808068b601529c95b8055c16e7af8a746bdccc', value: this.isSelected(), onSdUpdate: () => this.handleSelect() }))), stickyLeftCols.map((col, idx) => {
|
|
167
|
+
if (this.isCovered(idx))
|
|
168
|
+
return null;
|
|
169
|
+
const span = this.getSpanFor(col);
|
|
170
|
+
return (h("td", { key: col.name, rowSpan: span?.rowspan, colSpan: span?.colspan, class: {
|
|
171
|
+
'td': true,
|
|
172
|
+
[`td--${col.align || 'left'}`]: true,
|
|
173
|
+
'sticky-left': true,
|
|
174
|
+
'sticky-left-edge': idx === stickyLeftCount - 1,
|
|
175
|
+
'is-scrolled-left': idx === stickyLeftCount - 1 && this._scrolledLeft,
|
|
176
|
+
[`${col.tdClass}`]: Boolean(col.tdClass),
|
|
177
|
+
}, 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)))));
|
|
178
|
+
}), middleCols.map((col, relativeIdx) => {
|
|
140
179
|
const actualColIdx = stickyLeftCount + relativeIdx;
|
|
180
|
+
if (this.isCovered(actualColIdx))
|
|
181
|
+
return null;
|
|
141
182
|
const fieldName = typeof col.field === 'string' ? col.field : col.name;
|
|
142
|
-
|
|
183
|
+
const span = this.getSpanFor(col);
|
|
184
|
+
return (h("td", { key: col.name, rowSpan: span?.rowspan, colSpan: span?.colspan, class: {
|
|
143
185
|
td: true,
|
|
144
186
|
[`td--${col.align || 'left'}`]: true,
|
|
145
187
|
[`${col.tdClass}`]: Boolean(col.tdClass),
|
|
146
188
|
}, style: this.getStickyStyle(actualColIdx) }, h("slot", { name: `${this.tableId}-${fieldName}-${this.rowKey}` }, h("span", null, this.getCellValue(col)))));
|
|
147
189
|
}), stickyRightCols.map((col, relativeIdx) => {
|
|
148
190
|
const actualColIdx = this.visibleColumns.length - stickyRightCount + relativeIdx;
|
|
191
|
+
if (this.isCovered(actualColIdx))
|
|
192
|
+
return null;
|
|
149
193
|
const fieldName = typeof col.field === 'string' ? col.field : col.name;
|
|
150
|
-
|
|
194
|
+
const span = this.getSpanFor(col);
|
|
195
|
+
return (h("td", { key: col.name, rowSpan: span?.rowspan, colSpan: span?.colspan, class: {
|
|
151
196
|
'td': true,
|
|
152
197
|
[`td--${col.align || 'left'}`]: true,
|
|
153
198
|
'sticky-right': true,
|
|
@@ -289,6 +334,7 @@ export class SdTr {
|
|
|
289
334
|
"tableId": {},
|
|
290
335
|
"columnWidths": {},
|
|
291
336
|
"isVisible": {},
|
|
337
|
+
"spansVersion": {},
|
|
292
338
|
"_columns": {},
|
|
293
339
|
"_selectable": {},
|
|
294
340
|
"_stickyColumn": {},
|
|
@@ -315,6 +361,23 @@ export class SdTr {
|
|
|
315
361
|
"tags": []
|
|
316
362
|
}
|
|
317
363
|
},
|
|
364
|
+
"bumpSpansVersion": {
|
|
365
|
+
"complexType": {
|
|
366
|
+
"signature": "() => Promise<void>",
|
|
367
|
+
"parameters": [],
|
|
368
|
+
"references": {
|
|
369
|
+
"Promise": {
|
|
370
|
+
"location": "global",
|
|
371
|
+
"id": "global::Promise"
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
"return": "Promise<void>"
|
|
375
|
+
},
|
|
376
|
+
"docs": {
|
|
377
|
+
"text": "",
|
|
378
|
+
"tags": []
|
|
379
|
+
}
|
|
380
|
+
},
|
|
318
381
|
"updateVisibility": {
|
|
319
382
|
"complexType": {
|
|
320
383
|
"signature": "() => Promise<void>",
|
|
@@ -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() {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { configureModalStack } from "./modal-stack";
|
|
2
2
|
const MODAL_CONTAINER_TAG = 'sd-modal-container';
|
|
3
|
+
let sharedContainer = null;
|
|
3
4
|
const REASON_TO_CONTAINER = {
|
|
4
5
|
ok: 'confirm',
|
|
5
6
|
cancel: 'cancel',
|
|
@@ -111,9 +112,13 @@ function assertModalContainerDefined() {
|
|
|
111
112
|
function createContainer() {
|
|
112
113
|
assertBrowserEnvironment();
|
|
113
114
|
assertModalContainerDefined();
|
|
115
|
+
if (sharedContainer && sharedContainer.isConnected) {
|
|
116
|
+
return sharedContainer;
|
|
117
|
+
}
|
|
114
118
|
const container = document.createElement(MODAL_CONTAINER_TAG);
|
|
115
119
|
container.setAttribute('auto-remove', '');
|
|
116
120
|
document.body.appendChild(container);
|
|
121
|
+
sharedContainer = container;
|
|
117
122
|
return container;
|
|
118
123
|
}
|
|
119
124
|
async function whenReady(el) {
|
|
@@ -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-Bm8Fue-a.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 F={show(t={}){A((n=>{n.show?.(t)}))},hide(){k&&A((t=>{t.hide?.()}))}};export{y as _attachSdModalWithRef,p as _createSdModalRef,F as sdLoading,E as sdModal,c as sdToast}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as s,h as e,d as o,t as i}from"./p-Bm8Fue-a.js";import{T as a}from"./p-sZMi_32I.js";const d=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}get el(){return this}rows=[];tableId="";topSpacerHeight=0;bottomSpacerHeight=0;tableEl=null;handleRowsChange(t){const s=t??[];this.tableEl?.setRowCountSync&&this.tableEl.setRowCountSync(s.length)}componentWillLoad(){this.syncTableContext(),this.rows=this.rows??[],this.tableEl?.setRowCountSync&&this.tableEl.setRowCountSync(this.rows.length),this.el.setSpacersSync=(t,s)=>{this.topSpacerHeight=t,this.bottomSpacerHeight=s}}componentDidLoad(){this.syncTableContext()}syncTableContext(){const t=this.el.closest("sd-table"),s=this.el.getRootNode(),e=s instanceof ShadowRoot?s.host:null,o=t??e;this.tableEl=o;const i=o?.getTableIdSync?.(),d=o?.getAttribute(a),c=(i&&"undefined"!==i?i:null)??(d&&"undefined"!==d?d:null)??"";c&&c!==this.tableId&&(this.tableId=c)}render(){return e(o,{key:"e474bc09fdec9d48d978ec87620b161220b5236c",slot:`${this.tableId}-body`},e("tbody",{key:"c74261b3f30c43e8ac8c3bdea1180f17bfc7dbc8",class:{tbody:!0}},[this.topSpacerHeight>0&&e("tr",{key:"spacer-top",class:"tbody__spacer",style:{height:`${this.topSpacerHeight}px`,display:"block"}}),e("slot",{key:"f686e7e8fa81e725a32592a58267d0b5cd7551e6"}),this.bottomSpacerHeight>0&&e("tr",{key:"spacer-bottom",class:"tbody__spacer",style:{height:`${this.bottomSpacerHeight}px`,display:"block"}})]))}static get watchers(){return{rows:[{handleRowsChange:0}]}}static get style(){return":host{display:contents}:host *{box-sizing:border-box}.tbody{display:table-row-group}"}},[769,"sd-tbody",{rows:[16],tableId:[32],topSpacerHeight:[32],bottomSpacerHeight:[32]},void 0,{rows:[{handleRowsChange:0}]}]);function c(){"undefined"!=typeof customElements&&["sd-tbody"].forEach((t=>{"sd-tbody"===t&&(customElements.get(i(t))||customElements.define(i(t),d))}))}export{d as S,c as d}
|