@sellmate/design-system 1.0.78 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/component.table-CMqGfEui.js +66 -0
- package/dist/cjs/design-system.cjs.js +2 -2
- package/dist/cjs/{index--F2wGuAi.js → index-Cw-78mnC.js} +1 -1
- package/dist/cjs/index.cjs.js +5 -5
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{resolveColor-LhfOKtTZ.js → resolveColor-B0hzQNLG.js} +2 -2
- package/dist/cjs/sd-action-modal.cjs.entry.js +3 -3
- package/dist/cjs/sd-badge.cjs.entry.js +2 -3
- package/dist/cjs/sd-barcode-input.cjs.entry.js +3 -3
- package/dist/cjs/{sd-button-v2.config-CnqCQQMi.js → sd-button.config-DH08UNfl.js} +114 -28
- package/dist/cjs/{sd-button-v2_2.cjs.entry.js → sd-button_2.cjs.entry.js} +102 -85
- package/dist/cjs/sd-calendar.cjs.entry.js +15 -15
- package/dist/cjs/sd-card.cjs.entry.js +2 -2
- package/dist/cjs/sd-checkbox.cjs.entry.js +4 -4
- package/dist/cjs/sd-chip.cjs.entry.js +4 -4
- package/dist/cjs/sd-circle-progress.cjs.entry.js +3 -3
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +19 -11
- package/dist/cjs/sd-date-box.cjs.entry.js +9 -4
- package/dist/cjs/{sd-date-picker-calendar.cjs.entry.js → sd-date-picker-calendar_2.cjs.entry.js} +59 -6
- package/dist/cjs/{sd-date-picker.config-CRgCT5dn.js → sd-date-picker.config-CjvrFpYK.js} +1 -2
- package/dist/cjs/sd-date-picker_7.cjs.entry.js +1235 -0
- package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +14 -14
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +32 -27
- package/dist/cjs/{sd-button_4.cjs.entry.js → sd-field_3.cjs.entry.js} +47 -102
- package/dist/cjs/sd-form.cjs.entry.js +5 -5
- package/dist/cjs/sd-ghost-button.cjs.entry.js +12 -10
- package/dist/cjs/sd-guide.cjs.entry.js +11 -11
- package/dist/cjs/sd-key-value-table.cjs.entry.js +230 -0
- 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 +3 -3
- package/dist/cjs/{sd-pagination_5.cjs.entry.js → sd-pagination_4.cjs.entry.js} +136 -325
- package/dist/cjs/sd-popover.cjs.entry.js +18 -11
- package/dist/cjs/sd-popup.cjs.entry.js +112 -0
- package/dist/cjs/sd-portal.cjs.entry.js +3 -3
- package/dist/cjs/sd-radio-button.cjs.entry.js +9 -6
- package/dist/cjs/sd-radio.cjs.entry.js +2 -2
- package/dist/cjs/sd-select-list-item_2.cjs.entry.js +159 -0
- package/dist/cjs/sd-select.config-B19ptCT2.js +178 -0
- package/dist/cjs/{sd-select-list-item_4.cjs.entry.js → sd-select_3.cjs.entry.js} +296 -323
- package/dist/cjs/sd-switch.cjs.entry.js +2 -2
- package/dist/cjs/sd-table.cjs.entry.js +188 -48
- package/dist/cjs/sd-table.config-BIpldZtw.js +76 -0
- package/dist/cjs/sd-tabs.cjs.entry.js +8 -3
- package/dist/cjs/sd-tag.cjs.entry.js +56 -21
- package/dist/cjs/sd-td.cjs.entry.js +52 -10
- package/dist/cjs/sd-text-link.cjs.entry.js +13 -5
- package/dist/cjs/sd-toast-container.cjs.entry.js +5 -5
- package/dist/cjs/sd-toast.cjs.entry.js +35 -5
- package/dist/cjs/sd-toggle.cjs.entry.js +2 -2
- package/dist/cjs/{system-DpTN1vBC.js → system-VmZRYp6V.js} +4 -2
- package/dist/cjs/{tooltipArrow-D1-wcNm1.js → tooltipArrow-BjSFKIUq.js} +1 -1
- package/dist/collection/collection-manifest.json +4 -3
- package/dist/collection/components/assets/CheckboxCheck.js +5 -0
- package/dist/collection/components/assets/CheckboxIndeterminate.js +5 -0
- package/dist/collection/components/assets/index.js +4 -0
- package/dist/collection/components/sd-action-modal/sd-action-modal.css +1 -1
- package/dist/collection/components/sd-action-modal/sd-action-modal.js +7 -7
- package/dist/collection/components/sd-badge/sd-badge.config.js +10 -1
- package/dist/collection/components/sd-badge/sd-badge.js +1 -22
- package/dist/collection/components/sd-barcode-input/sd-barcode-input.js +4 -4
- package/dist/collection/components/{sd-button-v2/sd-button-v2.config.js → sd-button/sd-button.config.js} +1 -1
- package/dist/collection/components/sd-button/sd-button.css +47 -93
- package/dist/collection/components/sd-button/sd-button.js +100 -173
- package/dist/collection/components/sd-calendar/sd-calendar.js +14 -14
- package/dist/collection/components/sd-card/sd-card.js +1 -1
- package/dist/collection/components/sd-checkbox/sd-checkbox.js +3 -3
- package/dist/collection/components/sd-chip/sd-chip.js +4 -4
- package/dist/collection/components/sd-circle-progress/sd-circle-progress.js +1 -1
- package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +13 -8
- package/dist/collection/components/sd-date-box/sd-date-box.js +8 -3
- package/dist/collection/components/sd-date-picker/sd-date-picker-calendar/sd-date-picker-calendar.js +4 -4
- package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.css +1 -1
- package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.js +13 -6
- package/dist/collection/components/sd-date-picker/sd-date-picker.js +4 -4
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.js +12 -12
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.js +5 -5
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.config.js +7 -3
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.js +13 -11
- package/dist/collection/components/sd-field/sd-field.css +6 -2
- package/dist/collection/components/sd-field/sd-field.js +48 -22
- package/dist/collection/components/sd-file-picker/sd-file-picker.js +10 -5
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.css +1 -3
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +6 -6
- package/dist/collection/components/sd-form/sd-form.js +4 -4
- package/dist/collection/components/sd-ghost-button/sd-ghost-button.js +12 -10
- package/dist/collection/components/sd-guide/sd-guide.css +8 -172
- package/dist/collection/components/sd-guide/sd-guide.js +8 -6
- package/dist/collection/components/sd-icon/sd-icon.js +4 -4
- package/dist/collection/components/sd-input/sd-input.css +4 -2
- package/dist/collection/components/sd-input/sd-input.js +6 -6
- package/dist/collection/components/sd-key-value-table/sd-key-value-table.config.js +36 -0
- package/dist/collection/components/sd-key-value-table/sd-key-value-table.css +119 -0
- package/dist/collection/components/sd-key-value-table/sd-key-value-table.js +301 -0
- 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 +6 -3
- package/dist/collection/components/sd-modal-container/sd-modal-container.js +2 -2
- package/dist/collection/components/sd-number-input/sd-number-input.css +7 -0
- package/dist/collection/components/sd-number-input/sd-number-input.js +8 -5
- package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
- package/dist/collection/components/sd-popover/sd-popover.js +129 -36
- package/dist/collection/components/sd-popup/sd-popup.config.js +34 -0
- package/dist/collection/components/sd-popup/sd-popup.css +73 -0
- package/dist/collection/components/sd-popup/sd-popup.js +163 -0
- package/dist/collection/components/sd-portal/sd-portal.js +2 -2
- package/dist/collection/components/sd-radio/sd-radio.js +1 -1
- package/dist/collection/components/sd-radio-button/sd-radio-button.js +8 -5
- package/dist/collection/components/sd-radio-group/sd-radio-group.js +2 -2
- package/dist/collection/components/sd-select/sd-select-list-item/sd-select-list-item.js +7 -3
- package/dist/collection/components/sd-select/sd-select-list-item-search/sd-select-list-item-search.css +4 -4
- package/dist/collection/components/sd-select/sd-select-list-item-search/sd-select-list-item-search.js +7 -7
- package/dist/collection/components/sd-select/sd-select-listbox/sd-select-listbox.js +8 -8
- package/dist/collection/components/sd-select/sd-select-trigger/sd-select-trigger.js +9 -4
- package/dist/collection/components/sd-select/sd-select.js +6 -6
- package/dist/collection/components/sd-switch/sd-switch.js +1 -1
- package/dist/collection/components/sd-table/sd-table.config.js +6 -2
- package/dist/collection/components/sd-table/sd-table.css +30 -11
- package/dist/collection/components/sd-table/sd-table.js +233 -50
- package/dist/collection/components/sd-table/sd-table.stories.helpers.js +2 -3
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +5 -5
- package/dist/collection/components/sd-table/sd-td/sd-td.js +111 -9
- package/dist/collection/components/sd-table/sd-thead/sd-thead.js +30 -16
- package/dist/collection/components/sd-table/sd-tr/sd-tr.css +24 -1
- package/dist/collection/components/sd-table/sd-tr/sd-tr.js +116 -19
- package/dist/collection/components/sd-tabs/sd-tabs.js +7 -2
- package/dist/collection/components/sd-tag/sd-tag.config.js +43 -11
- package/dist/collection/components/sd-tag/sd-tag.js +13 -7
- package/dist/collection/components/sd-text-link/sd-text-link.css +1 -0
- package/dist/collection/components/sd-text-link/sd-text-link.js +10 -4
- package/dist/collection/components/sd-textarea/sd-textarea.css +3 -0
- package/dist/collection/components/sd-textarea/sd-textarea.js +2 -2
- package/dist/collection/components/sd-toast/sd-toast.config.js +14 -0
- package/dist/collection/components/sd-toast/sd-toast.css +3 -5
- package/dist/collection/components/sd-toast/sd-toast.js +52 -5
- package/dist/collection/components/sd-toast-container/sd-toast-container.js +4 -4
- package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
- package/dist/collection/components/sd-tooltip/sd-tooltip.js +77 -30
- package/dist/collection/utils/color/resolveColor.js +2 -2
- package/dist/collection/utils/dropdown-manager.js +1 -1
- package/dist/collection/utils/modal.js +1 -1
- package/dist/collection/utils/toast.js +4 -4
- package/dist/components/index.js +1 -1
- package/dist/components/p-2wB9cing.js +1 -0
- package/dist/components/p-B-sK7I83.js +1 -0
- package/dist/components/p-B3D43x7F.js +1 -0
- package/dist/components/p-B7mpdnNl.js +1 -0
- package/dist/components/{p-TwGlKfsC.js → p-BAcmO7w0.js} +1 -1
- package/dist/components/p-BL0ZcHK8.js +1 -0
- package/dist/components/p-BXCyVrle.js +1 -0
- package/dist/components/p-BY1LGlfc.js +1 -0
- package/dist/components/p-BjkROjjt.js +1 -0
- package/dist/components/p-Bm3W_eBv.js +1 -0
- package/dist/components/p-BnfUIhUj.js +1 -0
- package/dist/components/{p-Dcc2Vm6z.js → p-BorUSgEK.js} +1 -1
- package/dist/components/{p-Bvq0Vpln.js → p-BsM-fwYd.js} +1 -1
- package/dist/components/p-C5CH-s6a.js +1 -0
- package/dist/components/p-C7WLft_0.js +1 -0
- package/dist/components/p-CK9ciBIR.js +1 -0
- package/dist/components/p-CQI40kiY.js +1 -0
- package/dist/components/p-CRL7TjSB.js +1 -0
- package/dist/components/p-CdOHomUp.js +1 -0
- package/dist/components/p-Ch5Yu1qd.js +1 -0
- package/dist/components/p-Cktiasfd.js +1 -0
- package/dist/components/p-CsVAx6KV.js +1 -0
- package/dist/components/p-D0Jiw-Zk.js +1 -0
- package/dist/components/p-D5F7wCNo.js +1 -0
- package/dist/components/p-DBFgk0rX.js +1 -0
- package/dist/components/p-DFLCjX1a.js +1 -0
- package/dist/components/p-DL1ac1QS.js +1 -0
- package/dist/components/p-DdLntfiw.js +1 -0
- package/dist/components/p-DeQcDHpn.js +1 -0
- package/dist/components/p-DfK4DiDI.js +1 -0
- package/dist/components/p-DhTcn6jX.js +1 -0
- package/dist/components/p-Dl8TIEQu.js +1 -0
- package/dist/components/p-DyAnn9ea.js +1 -0
- package/dist/components/p-GBlVDmy4.js +1 -0
- package/dist/components/p-Jts7ueOa.js +1 -0
- package/dist/components/p-arZfxxPn.js +1 -0
- package/dist/components/p-mmdt-WnS.js +1 -0
- package/dist/components/p-nOCYbyW4.js +1 -0
- package/dist/components/p-teN3CfOr.js +1 -0
- package/dist/components/p-u8teDaMa.js +1 -0
- package/dist/components/p-wCNRlKLa.js +1 -0
- package/dist/components/sd-action-modal.js +1 -1
- package/dist/components/sd-badge.js +1 -1
- package/dist/components/sd-barcode-input.js +1 -1
- package/dist/components/sd-button.js +1 -1
- package/dist/components/sd-calendar.js +1 -1
- package/dist/components/sd-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-key-value-table.d.ts +11 -0
- package/dist/components/sd-key-value-table.js +1 -0
- 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-button-v2.d.ts → sd-popup.d.ts} +4 -4
- package/dist/components/sd-popup.js +1 -0
- package/dist/components/sd-portal.js +1 -1
- package/dist/components/sd-radio-button.js +1 -1
- package/dist/components/sd-radio-group.js +1 -1
- package/dist/components/sd-radio.js +1 -1
- package/dist/components/sd-select-list-item-search.js +1 -1
- package/dist/components/sd-select-list-item.js +1 -1
- package/dist/components/sd-select-listbox.js +1 -1
- package/dist/components/sd-select-trigger.js +1 -1
- package/dist/components/sd-select.js +1 -1
- package/dist/components/sd-switch.js +1 -1
- package/dist/components/sd-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-04fdb4b1.entry.js +1 -0
- package/dist/design-system/p-05611ff7.entry.js +1 -0
- package/dist/design-system/p-0U6dRjlq.js +2 -0
- package/dist/design-system/{p-fe9cef6a.entry.js → p-0fe603a4.entry.js} +1 -1
- package/dist/design-system/p-100f5887.entry.js +1 -0
- package/dist/design-system/p-18c5ae1a.entry.js +1 -0
- package/dist/design-system/p-1baa05ae.entry.js +1 -0
- package/dist/design-system/p-2a1ef965.entry.js +1 -0
- package/dist/design-system/p-2c63404f.entry.js +1 -0
- package/dist/design-system/{p-33bc3176.entry.js → p-435ae69e.entry.js} +1 -1
- package/dist/design-system/p-43e97572.entry.js +1 -0
- package/dist/design-system/p-44d05570.entry.js +1 -0
- package/dist/design-system/p-501fae20.entry.js +1 -0
- package/dist/design-system/{p-ead3e688.entry.js → p-5705e6d6.entry.js} +1 -1
- package/dist/design-system/p-5cbaf1db.entry.js +1 -0
- package/dist/design-system/p-5ed0becf.entry.js +1 -0
- package/dist/design-system/p-5f1c39b8.entry.js +1 -0
- package/dist/design-system/p-66af0ba0.entry.js +1 -0
- package/dist/design-system/p-77690440.entry.js +1 -0
- package/dist/design-system/p-78cc0289.entry.js +1 -0
- package/dist/design-system/p-790165f8.entry.js +1 -0
- package/dist/design-system/p-80466582.entry.js +1 -0
- package/dist/design-system/{p-e5cebccd.entry.js → p-857c44e8.entry.js} +1 -1
- package/dist/design-system/{p-f522c91d.entry.js → p-87c868c3.entry.js} +1 -1
- package/dist/design-system/p-8db7d8f2.entry.js +1 -0
- package/dist/design-system/p-8ee990bd.entry.js +1 -0
- package/dist/design-system/p-8f22106e.entry.js +1 -0
- package/dist/design-system/p-BDjErF_K.js +1 -0
- package/dist/design-system/p-BnfUIhUj.js +1 -0
- package/dist/{components/p-DkJqVXpD.js → design-system/p-C29HUShl.js} +1 -1
- package/dist/design-system/{p-BxPyZJaz.js → p-Ce0cmS4R.js} +1 -1
- package/dist/design-system/p-CxOCk_ge.js +1 -0
- package/dist/design-system/p-GBlVDmy4.js +1 -0
- package/dist/design-system/p-a6545130.entry.js +1 -0
- package/dist/design-system/p-ae2d45a2.entry.js +1 -0
- package/dist/design-system/{p-797517b5.entry.js → p-aeccfb2b.entry.js} +1 -1
- package/dist/design-system/p-b0aad445.entry.js +1 -0
- package/dist/design-system/p-b3c144ff.entry.js +1 -0
- package/dist/design-system/p-caee95b0.entry.js +1 -0
- package/dist/design-system/p-d30c823e.entry.js +1 -0
- package/dist/design-system/{p-3f7bc660.entry.js → p-d3212544.entry.js} +1 -1
- package/dist/design-system/p-d8c41313.entry.js +1 -0
- package/dist/design-system/{p-6bfe3612.entry.js → p-de8bb9ba.entry.js} +1 -1
- package/dist/design-system/p-e2334c1c.entry.js +1 -0
- package/dist/design-system/p-f4d73a0c.entry.js +1 -0
- package/dist/design-system/p-fc973500.entry.js +1 -0
- package/dist/design-system/p-fe0a5368.entry.js +1 -0
- package/dist/design-system/p-mmdt-WnS.js +1 -0
- package/dist/esm/component.table-BnfUIhUj.js +64 -0
- package/dist/esm/design-system.js +3 -3
- package/dist/esm/{index-Cnwbjz1F.js → index-0U6dRjlq.js} +1 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{resolveColor-BxPyZJaz.js → resolveColor-Ce0cmS4R.js} +2 -2
- package/dist/esm/sd-action-modal.entry.js +3 -3
- package/dist/esm/sd-badge.entry.js +2 -3
- package/dist/esm/sd-barcode-input.entry.js +3 -3
- package/dist/esm/{sd-button-v2.config-CV4xelxV.js → sd-button.config-BDjErF_K.js} +88 -3
- package/dist/esm/{sd-button-v2_2.entry.js → sd-button_2.entry.js} +102 -85
- package/dist/esm/sd-calendar.entry.js +15 -15
- package/dist/esm/sd-card.entry.js +2 -2
- package/dist/esm/sd-checkbox.entry.js +4 -4
- package/dist/esm/sd-chip.entry.js +4 -4
- package/dist/esm/sd-circle-progress.entry.js +3 -3
- package/dist/esm/sd-confirm-modal_2.entry.js +19 -11
- package/dist/esm/sd-date-box.entry.js +9 -4
- package/dist/esm/{sd-date-picker-calendar.entry.js → sd-date-picker-calendar_2.entry.js} +59 -7
- package/dist/esm/{sd-date-picker.config-C2fDbE9d.js → sd-date-picker.config-B6cqMQaM.js} +1 -2
- package/dist/esm/sd-date-picker_7.entry.js +1227 -0
- package/dist/esm/sd-date-range-picker-calendar.entry.js +14 -14
- package/dist/esm/sd-dropdown-button.entry.js +21 -16
- package/dist/esm/{sd-button_4.entry.js → sd-field_3.entry.js} +48 -102
- package/dist/esm/sd-form.entry.js +5 -5
- package/dist/esm/sd-ghost-button.entry.js +12 -10
- package/dist/esm/sd-guide.entry.js +11 -11
- package/dist/esm/sd-key-value-table.entry.js +228 -0
- 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 +3 -3
- package/dist/esm/{sd-pagination_5.entry.js → sd-pagination_4.entry.js} +137 -325
- package/dist/esm/sd-popover.entry.js +18 -11
- package/dist/esm/sd-popup.entry.js +110 -0
- package/dist/esm/sd-portal.entry.js +3 -3
- package/dist/esm/sd-radio-button.entry.js +9 -6
- package/dist/esm/sd-radio.entry.js +2 -2
- package/dist/esm/sd-select-list-item_2.entry.js +156 -0
- package/dist/esm/sd-select.config-CxOCk_ge.js +165 -0
- package/dist/esm/{sd-select-list-item_4.entry.js → sd-select_3.entry.js} +281 -307
- package/dist/esm/sd-switch.entry.js +2 -2
- package/dist/esm/{sd-table.config-Bj-EEo7N.js → sd-table.config-B-VgXXT7.js} +16 -46
- package/dist/esm/sd-table.entry.js +188 -48
- package/dist/esm/sd-tabs.entry.js +8 -3
- package/dist/esm/sd-tag.entry.js +56 -21
- package/dist/esm/sd-td.entry.js +52 -10
- package/dist/esm/sd-text-link.entry.js +13 -5
- package/dist/esm/sd-toast-container.entry.js +5 -5
- package/dist/esm/sd-toast.entry.js +35 -5
- package/dist/esm/sd-toggle.entry.js +2 -2
- package/dist/esm/{system-CZ4ltUOw.js → system-GBlVDmy4.js} +4 -2
- package/dist/esm/{tooltipArrow-D8sr81Xw.js → tooltipArrow-O5LOsHae.js} +1 -1
- package/dist/types/components/assets/CheckboxCheck.d.ts +1 -0
- package/dist/types/components/assets/CheckboxIndeterminate.d.ts +1 -0
- package/dist/types/components/assets/index.d.ts +2 -0
- package/dist/types/components/sd-action-modal/sd-action-modal.d.ts +2 -2
- package/dist/types/components/sd-badge/sd-badge.d.ts +0 -1
- package/dist/types/components/{sd-button-v2/sd-button-v2.config.d.ts → sd-button/sd-button.config.d.ts} +9 -15
- package/dist/types/components/sd-button/sd-button.d.ts +11 -13
- package/dist/types/components/sd-confirm-modal/sd-confirm-modal.config.d.ts +3 -3
- package/dist/types/components/sd-confirm-modal/sd-confirm-modal.d.ts +2 -1
- package/dist/types/components/sd-dropdown-button/sd-dropdown-button.config.d.ts +6 -5
- package/dist/types/components/sd-dropdown-button/sd-dropdown-button.d.ts +1 -0
- package/dist/types/components/sd-field/sd-field.d.ts +1 -0
- package/dist/types/components/sd-key-value-table/sd-key-value-table.config.d.ts +105 -0
- package/dist/types/components/sd-key-value-table/sd-key-value-table.d.ts +38 -0
- package/dist/types/components/sd-loading-modal/sd-loading-modal.config.d.ts +2 -2
- package/dist/types/components/sd-loading-modal/sd-loading-modal.d.ts +1 -0
- package/dist/types/components/sd-modal-container/sd-modal-container.config.d.ts +1 -1
- package/dist/types/components/sd-popover/sd-popover.d.ts +16 -10
- package/dist/types/components/sd-popup/sd-popup.config.d.ts +30 -0
- package/dist/types/components/sd-popup/sd-popup.d.ts +11 -0
- package/dist/types/components/sd-table/constants.d.ts +2 -0
- package/dist/types/components/sd-table/sd-table.config.d.ts +4 -0
- package/dist/types/components/sd-table/sd-table.d.ts +21 -15
- package/dist/types/components/sd-table/sd-td/sd-td.d.ts +6 -0
- package/dist/types/components/sd-table/sd-tr/sd-tr.d.ts +9 -0
- package/dist/types/components/sd-tag/sd-tag.d.ts +2 -0
- package/dist/types/components/sd-toast/sd-toast.config.d.ts +5 -1
- package/dist/types/components/sd-toast/sd-toast.d.ts +2 -0
- package/dist/types/components/sd-toast-container/sd-toast-container.config.d.ts +2 -0
- package/dist/types/components/sd-tooltip/sd-tooltip.config.d.ts +2 -13
- package/dist/types/components/sd-tooltip/sd-tooltip.d.ts +6 -4
- package/dist/types/components.d.ts +278 -192
- package/dist/types/index.d.ts +1 -1
- package/dist/types/types/form.d.ts +1 -1
- package/dist/types/types/global.d.ts +14 -13
- package/dist/types/utils/toast.d.ts +1 -1
- package/hydrate/index.js +5513 -4761
- package/hydrate/index.mjs +5513 -4761
- package/package.json +111 -97
- package/readme.md +13 -7
- package/dist/cjs/component.button-cqV-iCG5.js +0 -90
- package/dist/cjs/sd-date-picker-trigger.cjs.entry.js +0 -51
- package/dist/cjs/sd-date-picker.cjs.entry.js +0 -117
- package/dist/cjs/sd-date-range-picker.cjs.entry.js +0 -123
- package/dist/cjs/sd-file-picker.cjs.entry.js +0 -244
- package/dist/cjs/sd-input.cjs.entry.js +0 -175
- package/dist/cjs/sd-number-input.cjs.entry.js +0 -409
- package/dist/cjs/sd-radio-group.cjs.entry.js +0 -46
- package/dist/cjs/sd-table.config-Cb0Ot3C6.js +0 -105
- package/dist/cjs/sd-textarea.cjs.entry.js +0 -146
- package/dist/collection/components/sd-button-v2/sd-button-v2.css +0 -125
- package/dist/collection/components/sd-button-v2/sd-button-v2.js +0 -273
- package/dist/components/p-B1XBwjCW.js +0 -1
- package/dist/components/p-B8jXOXtJ.js +0 -1
- package/dist/components/p-BE6TxbtX.js +0 -1
- package/dist/components/p-BJsHakU2.js +0 -1
- package/dist/components/p-BStczlLa.js +0 -1
- package/dist/components/p-BcMNA89i.js +0 -1
- package/dist/components/p-BheX6lAy.js +0 -1
- package/dist/components/p-BmYM7-4v.js +0 -1
- package/dist/components/p-BppjYHF6.js +0 -1
- package/dist/components/p-BwWDMpJc.js +0 -1
- package/dist/components/p-C-kw2p2a.js +0 -1
- package/dist/components/p-C5qZtNLl.js +0 -1
- package/dist/components/p-C7DajKYn.js +0 -1
- package/dist/components/p-CZ4ltUOw.js +0 -1
- package/dist/components/p-CeVMl_M9.js +0 -1
- package/dist/components/p-D1DpOp6M.js +0 -1
- package/dist/components/p-D3gjBBCU.js +0 -1
- package/dist/components/p-DC-6inj0.js +0 -1
- package/dist/components/p-DRF0He-x.js +0 -1
- package/dist/components/p-DegvQLTF.js +0 -1
- package/dist/components/p-Dey-lS6x.js +0 -1
- package/dist/components/p-DfH_fO01.js +0 -1
- package/dist/components/p-DngV3MT1.js +0 -1
- package/dist/components/p-EbjZr2OA.js +0 -1
- package/dist/components/p-LwWOleLJ.js +0 -1
- package/dist/components/p-Nvx13YlG.js +0 -1
- package/dist/components/p-ZMpCZhXP.js +0 -1
- package/dist/components/p-dNJIFthT.js +0 -1
- package/dist/components/p-q0VWISKA.js +0 -1
- package/dist/components/p-xnLvZ-xn.js +0 -1
- package/dist/components/sd-button-v2.js +0 -1
- package/dist/design-system/p-0356c195.entry.js +0 -1
- package/dist/design-system/p-045bc426.entry.js +0 -1
- package/dist/design-system/p-12dfd239.entry.js +0 -1
- package/dist/design-system/p-16d3a485.entry.js +0 -1
- package/dist/design-system/p-1706ed6f.entry.js +0 -1
- package/dist/design-system/p-182548f7.entry.js +0 -1
- package/dist/design-system/p-1a79edce.entry.js +0 -1
- package/dist/design-system/p-1cf87e87.entry.js +0 -1
- package/dist/design-system/p-25a08e98.entry.js +0 -1
- package/dist/design-system/p-2812b9ce.entry.js +0 -1
- package/dist/design-system/p-38f661ea.entry.js +0 -1
- package/dist/design-system/p-429dab5c.entry.js +0 -1
- package/dist/design-system/p-455dccf5.entry.js +0 -1
- package/dist/design-system/p-59313838.entry.js +0 -1
- package/dist/design-system/p-6af01ab0.entry.js +0 -1
- package/dist/design-system/p-70d4903f.entry.js +0 -1
- package/dist/design-system/p-767e99f9.entry.js +0 -1
- package/dist/design-system/p-7c370335.entry.js +0 -1
- package/dist/design-system/p-7fe8be6a.entry.js +0 -1
- package/dist/design-system/p-83b262dc.entry.js +0 -1
- package/dist/design-system/p-881adaa5.entry.js +0 -1
- package/dist/design-system/p-88d7303c.entry.js +0 -1
- package/dist/design-system/p-8a601e0f.entry.js +0 -1
- package/dist/design-system/p-B1XBwjCW.js +0 -1
- package/dist/design-system/p-BsrEibf7.js +0 -1
- package/dist/design-system/p-C5qZtNLl.js +0 -1
- package/dist/design-system/p-CZ4ltUOw.js +0 -1
- package/dist/design-system/p-Cnwbjz1F.js +0 -2
- package/dist/design-system/p-DnCBBIoq.js +0 -1
- package/dist/design-system/p-a82be987.entry.js +0 -1
- package/dist/design-system/p-b917c82a.entry.js +0 -1
- package/dist/design-system/p-b9f00eef.entry.js +0 -1
- package/dist/design-system/p-bcb53788.entry.js +0 -1
- package/dist/design-system/p-c24344ac.entry.js +0 -1
- package/dist/design-system/p-d76192bd.entry.js +0 -1
- package/dist/design-system/p-d9d8c51b.entry.js +0 -1
- package/dist/design-system/p-de67937d.entry.js +0 -1
- package/dist/design-system/p-ea5e6c2c.entry.js +0 -1
- package/dist/design-system/p-eeb1cac2.entry.js +0 -1
- package/dist/design-system/p-f1a74359.entry.js +0 -1
- package/dist/design-system/p-f44786a9.entry.js +0 -1
- package/dist/design-system/p-f69c7539.entry.js +0 -1
- package/dist/esm/component.button-B1XBwjCW.js +0 -88
- package/dist/esm/sd-date-picker-trigger.entry.js +0 -49
- package/dist/esm/sd-date-picker.entry.js +0 -115
- package/dist/esm/sd-date-range-picker.entry.js +0 -121
- package/dist/esm/sd-file-picker.entry.js +0 -242
- package/dist/esm/sd-input.entry.js +0 -173
- package/dist/esm/sd-number-input.entry.js +0 -407
- package/dist/esm/sd-radio-group.entry.js +0 -44
- package/dist/esm/sd-textarea.entry.js +0 -144
- package/dist/types/components/sd-button-v2/sd-button-v2.d.ts +0 -19
- /package/dist/components/{p-C2fDbE9d.js → p-B6cqMQaM.js} +0 -0
- /package/dist/design-system/{p-C2fDbE9d.js → p-B6cqMQaM.js} +0 -0
|
@@ -11,6 +11,10 @@ export class SdTd {
|
|
|
11
11
|
// <sd-td> 호스트는 display:contents라 호스트의 class는 시각 효과가 없기 때문에,
|
|
12
12
|
// 이 prop을 통해 sd-table 레지스트리에 등록 → sd-tr가 td 렌더 시 합쳐 사용한다.
|
|
13
13
|
sdClass;
|
|
14
|
+
dividerLeft = false;
|
|
15
|
+
dividerRight = false;
|
|
16
|
+
// true이면 이 셀이 속한 행 전체가 dense를 무시하고 default 레이아웃으로 동작한다.
|
|
17
|
+
useFrame = false;
|
|
14
18
|
handleFieldChange(_newField, oldField) {
|
|
15
19
|
this.syncSlotName();
|
|
16
20
|
this.syncSpanRegistration();
|
|
@@ -27,10 +31,18 @@ export class SdTd {
|
|
|
27
31
|
handleSdClassChange() {
|
|
28
32
|
this.syncCellClassRegistration();
|
|
29
33
|
}
|
|
34
|
+
handleDividerChange() {
|
|
35
|
+
this.syncCellClassRegistration();
|
|
36
|
+
}
|
|
37
|
+
handleUseFieldChange() {
|
|
38
|
+
this.syncUseFieldRegistration();
|
|
39
|
+
this.requestParentTrUpdate();
|
|
40
|
+
}
|
|
30
41
|
componentWillLoad() {
|
|
31
42
|
this.syncSlotName();
|
|
32
43
|
this.syncSpanRegistration();
|
|
33
44
|
this.syncCellClassRegistration();
|
|
45
|
+
this.syncUseFieldRegistration();
|
|
34
46
|
// slot 타이밍 엇갈림 대응: 부모 sd-tr forceUpdate로 슬롯 재매칭
|
|
35
47
|
const parentTr = this.el.parentElement;
|
|
36
48
|
if (parentTr?.tagName?.toLowerCase() === 'sd-tr') {
|
|
@@ -41,6 +53,7 @@ export class SdTd {
|
|
|
41
53
|
this.syncSlotName();
|
|
42
54
|
this.syncSpanRegistration();
|
|
43
55
|
this.syncCellClassRegistration();
|
|
56
|
+
this.syncUseFieldRegistration();
|
|
44
57
|
}
|
|
45
58
|
// React StrictMode에서는 disconnect/reconnect 사이클이 일어나면서
|
|
46
59
|
// 동일 인스턴스의 componentWillLoad는 더 이상 호출되지 않는다.
|
|
@@ -48,12 +61,14 @@ export class SdTd {
|
|
|
48
61
|
connectedCallback() {
|
|
49
62
|
this.syncSpanRegistration();
|
|
50
63
|
this.syncCellClassRegistration();
|
|
64
|
+
this.syncUseFieldRegistration();
|
|
51
65
|
}
|
|
52
66
|
disconnectedCallback() {
|
|
53
67
|
const table = this.findTable();
|
|
54
|
-
if (table && this.field && this.rowKey != null) {
|
|
68
|
+
if (table != null && this.field !== '' && this.rowKey != null) {
|
|
55
69
|
table.unregisterSpanSync?.(String(this.rowKey), this.field);
|
|
56
70
|
table.unregisterCellClassSync?.(String(this.rowKey), this.field);
|
|
71
|
+
table.unregisterUseFrameSync?.(String(this.rowKey), this.field);
|
|
57
72
|
this.requestParentTrUpdate();
|
|
58
73
|
}
|
|
59
74
|
}
|
|
@@ -74,7 +89,7 @@ export class SdTd {
|
|
|
74
89
|
}
|
|
75
90
|
syncSpanRegistration() {
|
|
76
91
|
const table = this.findTable();
|
|
77
|
-
if (
|
|
92
|
+
if (table?.registerSpanSync == null || this.field === '' || this.rowKey == null)
|
|
78
93
|
return;
|
|
79
94
|
const rs = Math.max(1, Math.floor(Number(this.rowspan) || 1));
|
|
80
95
|
const cs = Math.max(1, Math.floor(Number(this.colspan) || 1));
|
|
@@ -88,27 +103,45 @@ export class SdTd {
|
|
|
88
103
|
return;
|
|
89
104
|
const oldField = prevField ?? this.field;
|
|
90
105
|
const oldRowKey = prevRowKey ?? (this.rowKey != null ? String(this.rowKey) : undefined);
|
|
91
|
-
if (oldField && oldRowKey != null) {
|
|
106
|
+
if (oldField !== '' && oldRowKey != null) {
|
|
92
107
|
table.unregisterCellClassSync?.(oldRowKey, oldField);
|
|
93
108
|
}
|
|
94
|
-
if (!table.registerCellClassSync ||
|
|
109
|
+
if (!table.registerCellClassSync || this.field === '' || this.rowKey == null)
|
|
95
110
|
return;
|
|
96
|
-
|
|
111
|
+
const combinedClass = [
|
|
112
|
+
this.sdClass,
|
|
113
|
+
this.dividerLeft && 'td--divider-left',
|
|
114
|
+
this.dividerRight && 'td--divider-right',
|
|
115
|
+
]
|
|
116
|
+
.filter(Boolean)
|
|
117
|
+
.join(' ') || undefined;
|
|
118
|
+
table.registerCellClassSync(String(this.rowKey), this.field, combinedClass);
|
|
97
119
|
this.requestParentTrUpdate();
|
|
98
120
|
}
|
|
121
|
+
syncUseFieldRegistration() {
|
|
122
|
+
const table = this.findTable();
|
|
123
|
+
if (!table || this.field === '' || this.rowKey == null)
|
|
124
|
+
return;
|
|
125
|
+
if (this.useFrame) {
|
|
126
|
+
table.registerUseFrameSync?.(String(this.rowKey), this.field);
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
table.unregisterUseFrameSync?.(String(this.rowKey), this.field);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
99
132
|
syncSlotName() {
|
|
100
133
|
const table = this.el.closest('sd-table');
|
|
101
134
|
const fromMethod = table?.getTableIdSync?.();
|
|
102
135
|
const fromAttr = table?.getAttribute(TABLE_ID_ATTR);
|
|
103
|
-
const tableId = (fromMethod && fromMethod !== 'undefined' ? fromMethod : null) ??
|
|
104
|
-
(fromAttr && fromAttr !== 'undefined' ? fromAttr : null) ??
|
|
136
|
+
const tableId = (fromMethod != null && fromMethod !== '' && fromMethod !== 'undefined' ? fromMethod : null) ??
|
|
137
|
+
(fromAttr != null && fromAttr !== '' && fromAttr !== 'undefined' ? fromAttr : null) ??
|
|
105
138
|
'';
|
|
106
|
-
if (this.field && this.rowKey !== undefined && tableId) {
|
|
139
|
+
if (this.field !== '' && this.rowKey !== undefined && tableId !== '') {
|
|
107
140
|
this.el.setAttribute('slot', `${tableId}-${this.field}-${this.rowKey}`);
|
|
108
141
|
}
|
|
109
142
|
}
|
|
110
143
|
render() {
|
|
111
|
-
return (h(Host, { key: '
|
|
144
|
+
return (h(Host, { key: 'ececfaf265a550ee38c5c2cc2ddd2875352deb10', class: { [`align-${this.align}`]: Boolean(this.align) } }, h("slot", { key: 'c4a43f9affc1938d882e63e91ac90d570efffa37' })));
|
|
112
145
|
}
|
|
113
146
|
static get is() { return "sd-td"; }
|
|
114
147
|
static get originalStyleUrls() {
|
|
@@ -236,6 +269,66 @@ export class SdTd {
|
|
|
236
269
|
"setter": false,
|
|
237
270
|
"reflect": false,
|
|
238
271
|
"attribute": "sd-class"
|
|
272
|
+
},
|
|
273
|
+
"dividerLeft": {
|
|
274
|
+
"type": "boolean",
|
|
275
|
+
"mutable": false,
|
|
276
|
+
"complexType": {
|
|
277
|
+
"original": "boolean",
|
|
278
|
+
"resolved": "boolean",
|
|
279
|
+
"references": {}
|
|
280
|
+
},
|
|
281
|
+
"required": false,
|
|
282
|
+
"optional": false,
|
|
283
|
+
"docs": {
|
|
284
|
+
"tags": [],
|
|
285
|
+
"text": ""
|
|
286
|
+
},
|
|
287
|
+
"getter": false,
|
|
288
|
+
"setter": false,
|
|
289
|
+
"reflect": false,
|
|
290
|
+
"attribute": "divider-left",
|
|
291
|
+
"defaultValue": "false"
|
|
292
|
+
},
|
|
293
|
+
"dividerRight": {
|
|
294
|
+
"type": "boolean",
|
|
295
|
+
"mutable": false,
|
|
296
|
+
"complexType": {
|
|
297
|
+
"original": "boolean",
|
|
298
|
+
"resolved": "boolean",
|
|
299
|
+
"references": {}
|
|
300
|
+
},
|
|
301
|
+
"required": false,
|
|
302
|
+
"optional": false,
|
|
303
|
+
"docs": {
|
|
304
|
+
"tags": [],
|
|
305
|
+
"text": ""
|
|
306
|
+
},
|
|
307
|
+
"getter": false,
|
|
308
|
+
"setter": false,
|
|
309
|
+
"reflect": false,
|
|
310
|
+
"attribute": "divider-right",
|
|
311
|
+
"defaultValue": "false"
|
|
312
|
+
},
|
|
313
|
+
"useFrame": {
|
|
314
|
+
"type": "boolean",
|
|
315
|
+
"mutable": false,
|
|
316
|
+
"complexType": {
|
|
317
|
+
"original": "boolean",
|
|
318
|
+
"resolved": "boolean",
|
|
319
|
+
"references": {}
|
|
320
|
+
},
|
|
321
|
+
"required": false,
|
|
322
|
+
"optional": false,
|
|
323
|
+
"docs": {
|
|
324
|
+
"tags": [],
|
|
325
|
+
"text": ""
|
|
326
|
+
},
|
|
327
|
+
"getter": false,
|
|
328
|
+
"setter": false,
|
|
329
|
+
"reflect": false,
|
|
330
|
+
"attribute": "use-frame",
|
|
331
|
+
"defaultValue": "false"
|
|
239
332
|
}
|
|
240
333
|
};
|
|
241
334
|
}
|
|
@@ -256,6 +349,15 @@ export class SdTd {
|
|
|
256
349
|
}, {
|
|
257
350
|
"propName": "sdClass",
|
|
258
351
|
"methodName": "handleSdClassChange"
|
|
352
|
+
}, {
|
|
353
|
+
"propName": "dividerLeft",
|
|
354
|
+
"methodName": "handleDividerChange"
|
|
355
|
+
}, {
|
|
356
|
+
"propName": "dividerRight",
|
|
357
|
+
"methodName": "handleDividerChange"
|
|
358
|
+
}, {
|
|
359
|
+
"propName": "useFrame",
|
|
360
|
+
"methodName": "handleUseFieldChange"
|
|
259
361
|
}];
|
|
260
362
|
}
|
|
261
363
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, Host } from "@stencil/core";
|
|
1
|
+
import { h, Host, } from "@stencil/core";
|
|
2
2
|
import { TABLE_ID_ATTR, } from "../constants";
|
|
3
3
|
import { resolveTableIconColor, resolveSortIconName, TABLE_HEADER_LAYOUT, TABLE_HEADER_TYPOGRAPHY, TABLE_HEADER_COLORS, TABLE_HEADER_RESIZING_BAR, TABLE_BORDER, } from "../sd-table.config";
|
|
4
4
|
export class SdThead {
|
|
@@ -24,7 +24,7 @@ export class SdThead {
|
|
|
24
24
|
tableEl = null;
|
|
25
25
|
handleColumnsChange(newCols) {
|
|
26
26
|
if (Array.isArray(newCols) && (this.columnWidths ?? []).length === 0) {
|
|
27
|
-
this.columnWidths = newCols.map(c => parseInt(c.width || '120', 10));
|
|
27
|
+
this.columnWidths = newCols.map(c => (c.autoWidth ? 0 : parseInt(c.width || '120', 10)));
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
componentWillLoad() {
|
|
@@ -32,7 +32,7 @@ export class SdThead {
|
|
|
32
32
|
this.columnWidths = Array.isArray(this.columnWidths) ? this.columnWidths : [];
|
|
33
33
|
this.resolveConfig();
|
|
34
34
|
if ((this.columnWidths ?? []).length === 0) {
|
|
35
|
-
this.columnWidths = this._columns.map(c => parseInt(c.width || '120', 10));
|
|
35
|
+
this.columnWidths = this._columns.map(c => c.autoWidth ? 0 : parseInt(c.width || '120', 10));
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
componentDidLoad() {
|
|
@@ -49,10 +49,10 @@ export class SdThead {
|
|
|
49
49
|
this.tableEl = table;
|
|
50
50
|
const fromMethod = table?.getTableIdSync?.();
|
|
51
51
|
const fromAttr = table?.getAttribute(TABLE_ID_ATTR);
|
|
52
|
-
const resolvedTableId = (fromMethod && fromMethod !== 'undefined' ? fromMethod : null) ??
|
|
53
|
-
(fromAttr && fromAttr !== 'undefined' ? fromAttr : null) ??
|
|
52
|
+
const resolvedTableId = (fromMethod != null && fromMethod !== '' && fromMethod !== 'undefined' ? fromMethod : null) ??
|
|
53
|
+
(fromAttr != null && fromAttr !== '' && fromAttr !== 'undefined' ? fromAttr : null) ??
|
|
54
54
|
'';
|
|
55
|
-
if (resolvedTableId && resolvedTableId !== this.tableId) {
|
|
55
|
+
if (resolvedTableId !== '' && resolvedTableId !== this.tableId) {
|
|
56
56
|
this.tableId = resolvedTableId;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
@@ -100,13 +100,17 @@ export class SdThead {
|
|
|
100
100
|
const rightOffset = this.columnWidths
|
|
101
101
|
.filter((_, i) => i >= this.visibleColumns.length - (this._stickyColumn.right || 0) && i > colIdx)
|
|
102
102
|
.reduce((a, b) => a + b, 0);
|
|
103
|
-
|
|
103
|
+
const col = this.visibleColumns[colIdx];
|
|
104
|
+
const base = {
|
|
104
105
|
'--sticky-left-offset': `${leftOffset}px`,
|
|
105
106
|
'--sticky-right-offset': `${rightOffset}px`,
|
|
106
|
-
'width': `${this.columnWidths[colIdx]}px`,
|
|
107
|
-
'minWidth': `${this.columnWidths[colIdx]}px`,
|
|
108
|
-
'maxWidth': `${this.columnWidths[colIdx]}px`,
|
|
109
107
|
};
|
|
108
|
+
if (!col?.autoWidth) {
|
|
109
|
+
base['width'] = `${this.columnWidths[colIdx]}px`;
|
|
110
|
+
base['minWidth'] = `${this.columnWidths[colIdx]}px`;
|
|
111
|
+
base['maxWidth'] = `${this.columnWidths[colIdx]}px`;
|
|
112
|
+
}
|
|
113
|
+
return base;
|
|
110
114
|
}
|
|
111
115
|
handleResize(index, event, reversed = false) {
|
|
112
116
|
if (this.tableEl?.handleResize) {
|
|
@@ -137,6 +141,7 @@ export class SdThead {
|
|
|
137
141
|
const stickyLeftCols = this.visibleColumns.slice(0, stickyLeftCount);
|
|
138
142
|
const middleCols = this.visibleColumns.slice(stickyLeftCount, this.visibleColumns.length - stickyRightCount);
|
|
139
143
|
const stickyRightCols = this.visibleColumns.slice(this.visibleColumns.length - stickyRightCount);
|
|
144
|
+
const lastColIdx = this.visibleColumns.length - 1;
|
|
140
145
|
const headStyle = {
|
|
141
146
|
'--table-header-height': `${TABLE_HEADER_LAYOUT.height}px`,
|
|
142
147
|
'--table-header-padding-x': `${TABLE_HEADER_LAYOUT.paddingX}px`,
|
|
@@ -152,27 +157,33 @@ export class SdThead {
|
|
|
152
157
|
'--table-border-color': TABLE_BORDER.color,
|
|
153
158
|
'--table-border-width': `${TABLE_BORDER.width}px`,
|
|
154
159
|
};
|
|
155
|
-
return (h(Host, { key: '
|
|
160
|
+
return (h(Host, { key: '424fa72b833a94bce945ae50e8445cbed0527025', slot: `${this.tableId}-head`, style: headStyle }, h("thead", { key: '1a5704d78992b553c5db5ba92bb3814de7c19898', class: {
|
|
156
161
|
'thead': true,
|
|
157
162
|
'thead--sticky': this._stickyHeader,
|
|
158
|
-
} }, h("tr", { key: '
|
|
163
|
+
} }, h("tr", { key: '1369ff7c99a5691bcd5fa54af4f7c02ff41dceb3', class: "tr" }, this._selectable && (h("th", { key: '72159c6f8ef28b0b93790e180cb9b12345727525', class: {
|
|
159
164
|
'th': true,
|
|
160
165
|
'th--selected': true,
|
|
161
166
|
'sticky-left': true,
|
|
162
167
|
'sticky-left-edge': stickyLeftCount === 0,
|
|
163
168
|
'is-scrolled-left': stickyLeftCount === 0 && this._scrolledLeft,
|
|
164
|
-
}, style: { '--sticky-left-offset': '0px' } }, h("sd-checkbox", { key: '
|
|
169
|
+
}, style: { '--sticky-left-offset': '0px' } }, h("sd-checkbox", { key: '1c5c035346fc6d13d956475480374a8bd93d3d6d', value: this.getIsAllChecked(), disabled: safeRows.length === 0, onSdUpdate: (e) => this.handleSelectAll(e.detail) }))), stickyLeftCols.map((col, idx) => (h("th", { key: col.name, class: {
|
|
165
170
|
'th': true,
|
|
166
171
|
[`${col.thClass}`]: Boolean(col.thClass),
|
|
167
172
|
'sticky-left': true,
|
|
168
173
|
'sticky-left-edge': idx === stickyLeftCount - 1,
|
|
169
174
|
'is-scrolled-left': idx === stickyLeftCount - 1 && this._scrolledLeft,
|
|
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 &&
|
|
175
|
+
}, 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 && idx !== lastColIdx && (
|
|
176
|
+
// column resize 는 마우스 드래그 전용 인터랙션이라 키보드 핸들러를 두지 않는다.
|
|
177
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
178
|
+
h("div", { class: "th__resizer", onMouseDown: (evt) => this.handleResize(idx, evt) }))))), middleCols.map((col, relativeIdx) => {
|
|
171
179
|
const actualColIdx = stickyLeftCount + relativeIdx;
|
|
172
180
|
return (h("th", { key: col.name, class: {
|
|
173
181
|
th: true,
|
|
174
182
|
[`${col.thClass}`]: Boolean(col.thClass),
|
|
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 &&
|
|
183
|
+
}, 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 && actualColIdx !== lastColIdx && (
|
|
184
|
+
// column resize 는 마우스 드래그 전용 인터랙션이라 키보드 핸들러를 두지 않는다.
|
|
185
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
186
|
+
h("div", { class: "th__resizer", onMouseDown: (evt) => this.handleResize(actualColIdx, evt) }))));
|
|
176
187
|
}), stickyRightCols.map((col, relativeIdx) => {
|
|
177
188
|
const actualColIdx = this.visibleColumns.length - stickyRightCount + relativeIdx;
|
|
178
189
|
return (h("th", { key: col.name, class: {
|
|
@@ -181,7 +192,10 @@ export class SdThead {
|
|
|
181
192
|
'sticky-right': true,
|
|
182
193
|
'sticky-right-edge': relativeIdx === 0,
|
|
183
194
|
'is-scrolled-right': relativeIdx === 0 && this._scrolledRight,
|
|
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 && (
|
|
195
|
+
}, 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 && (
|
|
196
|
+
// column resize 는 마우스 드래그 전용 인터랙션이라 키보드 핸들러를 두지 않는다.
|
|
197
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
198
|
+
h("div", { class: "th__resizer th__resizer--left", onMouseDown: (evt) => this.handleResize(actualColIdx, evt, true) }))));
|
|
185
199
|
})))));
|
|
186
200
|
}
|
|
187
201
|
static get is() { return "sd-thead"; }
|
|
@@ -18,7 +18,7 @@ sd-tr * {
|
|
|
18
18
|
.td {
|
|
19
19
|
display: table-cell;
|
|
20
20
|
height: var(--table-body-height, 44px);
|
|
21
|
-
padding: 0 var(--table-body-padding-x, 16px);
|
|
21
|
+
padding: var(--table-body-padding-y, 0) var(--table-body-padding-x, 16px);
|
|
22
22
|
border-bottom: var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1);
|
|
23
23
|
background: white;
|
|
24
24
|
vertical-align: middle;
|
|
@@ -116,4 +116,27 @@ sd-tr * {
|
|
|
116
116
|
.tr--no-hover:hover .td.sticky-left,
|
|
117
117
|
.tr--no-hover:hover .td.sticky-right {
|
|
118
118
|
background-color: white;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.td.td--last-row {
|
|
122
|
+
border-bottom: none;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.tr--separator .td--separator {
|
|
126
|
+
height: var(--table-separator-width, 6px);
|
|
127
|
+
padding: 0;
|
|
128
|
+
background-color: var(--table-separator-color, #eeeeee);
|
|
129
|
+
border-bottom: none;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.td.td--before-separator {
|
|
133
|
+
border-bottom: none;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.td--divider-left {
|
|
137
|
+
border-left: var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.td--divider-right {
|
|
141
|
+
border-right: var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1);
|
|
119
142
|
}
|
|
@@ -1,6 +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
|
+
import { TABLE_BODY_LAYOUT, TABLE_BODY_TYPOGRAPHY, TABLE_BORDER, TABLE_SEPARATOR, } from "../sd-table.config";
|
|
4
4
|
export class SdTr {
|
|
5
5
|
el;
|
|
6
6
|
columns;
|
|
@@ -8,6 +8,7 @@ export class SdTr {
|
|
|
8
8
|
stickyColumn;
|
|
9
9
|
rowKey = '';
|
|
10
10
|
row = {};
|
|
11
|
+
separator;
|
|
11
12
|
tableId = '';
|
|
12
13
|
columnWidths = [];
|
|
13
14
|
isVisible = true;
|
|
@@ -17,16 +18,32 @@ export class SdTr {
|
|
|
17
18
|
_stickyColumn = { left: 0, right: 0 };
|
|
18
19
|
_scrolledLeft = false;
|
|
19
20
|
_scrolledRight = false;
|
|
21
|
+
_dense = false;
|
|
20
22
|
tableEl = null;
|
|
23
|
+
_prevRowKey = null;
|
|
21
24
|
componentWillLoad() {
|
|
22
25
|
this.syncTableContext();
|
|
23
26
|
this.columnWidths = this.columnWidths ?? [];
|
|
24
27
|
this.resolveConfig();
|
|
25
|
-
this.columnWidths = this._columns.map(c => parseInt(c.width || '120', 10));
|
|
28
|
+
this.columnWidths = this._columns.map(c => (c.autoWidth ? 0 : parseInt(c.width || '120', 10)));
|
|
26
29
|
this.updateVisibilitySync();
|
|
27
30
|
}
|
|
28
31
|
componentDidLoad() {
|
|
29
32
|
this.syncTableContext();
|
|
33
|
+
if (this.separator) {
|
|
34
|
+
const prev = this.el.previousElementSibling;
|
|
35
|
+
if (prev?.tagName?.toLowerCase() === 'sd-tr') {
|
|
36
|
+
const prevRowKey = prev.rowKey;
|
|
37
|
+
this._prevRowKey = prevRowKey;
|
|
38
|
+
this.tableEl?.registerSeparatorSync?.(prevRowKey);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
disconnectedCallback() {
|
|
43
|
+
if (this._prevRowKey !== null) {
|
|
44
|
+
this.tableEl?.unregisterSeparatorSync?.(this._prevRowKey);
|
|
45
|
+
this._prevRowKey = null;
|
|
46
|
+
}
|
|
30
47
|
}
|
|
31
48
|
syncTableContext() {
|
|
32
49
|
// sd-table이 shadow:true이므로 fallback content로 렌더되면 closest가 경계를 못 넘는다.
|
|
@@ -38,10 +55,10 @@ export class SdTr {
|
|
|
38
55
|
this.tableEl = table;
|
|
39
56
|
const fromMethod = table?.getTableIdSync?.();
|
|
40
57
|
const fromAttr = table?.getAttribute(TABLE_ID_ATTR);
|
|
41
|
-
const resolvedTableId = (fromMethod && fromMethod !== 'undefined' ? fromMethod : null) ??
|
|
42
|
-
(fromAttr && fromAttr !== 'undefined' ? fromAttr : null) ??
|
|
58
|
+
const resolvedTableId = (fromMethod != null && fromMethod !== '' && fromMethod !== 'undefined' ? fromMethod : null) ??
|
|
59
|
+
(fromAttr != null && fromAttr !== '' && fromAttr !== 'undefined' ? fromAttr : null) ??
|
|
43
60
|
'';
|
|
44
|
-
if (resolvedTableId && resolvedTableId !== this.tableId) {
|
|
61
|
+
if (resolvedTableId !== '' && resolvedTableId !== this.tableId) {
|
|
45
62
|
this.tableId = resolvedTableId;
|
|
46
63
|
}
|
|
47
64
|
}
|
|
@@ -52,6 +69,7 @@ export class SdTr {
|
|
|
52
69
|
this._stickyColumn = this.stickyColumn ?? config?.stickyColumn ?? { left: 0, right: 0 };
|
|
53
70
|
this._scrolledLeft = config?.scrolledLeft ?? false;
|
|
54
71
|
this._scrolledRight = config?.scrolledRight ?? false;
|
|
72
|
+
this._dense = config?.dense ?? false;
|
|
55
73
|
if (config?.columnWidths && (this.columnWidths ?? []).length === 0) {
|
|
56
74
|
this.columnWidths = [...config.columnWidths];
|
|
57
75
|
}
|
|
@@ -97,7 +115,11 @@ export class SdTr {
|
|
|
97
115
|
}
|
|
98
116
|
getCellValue(column) {
|
|
99
117
|
const { field, format, name } = column;
|
|
100
|
-
const value = typeof field === 'function'
|
|
118
|
+
const value = typeof field === 'function'
|
|
119
|
+
? field(this.row)
|
|
120
|
+
: field !== ''
|
|
121
|
+
? this.row[field]
|
|
122
|
+
: this.row[name];
|
|
101
123
|
return format ? format(value, this.row) : this.formatValue(value);
|
|
102
124
|
}
|
|
103
125
|
getStickyStyle(colIdx) {
|
|
@@ -108,13 +130,17 @@ export class SdTr {
|
|
|
108
130
|
const rightOffset = this.columnWidths
|
|
109
131
|
.filter((_, i) => i >= this.visibleColumns.length - (this._stickyColumn.right || 0) && i > colIdx)
|
|
110
132
|
.reduce((a, b) => a + b, 0);
|
|
111
|
-
|
|
133
|
+
const col = this.visibleColumns[colIdx];
|
|
134
|
+
const base = {
|
|
112
135
|
'--sticky-left-offset': `${leftOffset}px`,
|
|
113
136
|
'--sticky-right-offset': `${rightOffset}px`,
|
|
114
|
-
'width': `${this.columnWidths[colIdx]}px`,
|
|
115
|
-
'minWidth': `${this.columnWidths[colIdx]}px`,
|
|
116
|
-
'maxWidth': `${this.columnWidths[colIdx]}px`,
|
|
117
137
|
};
|
|
138
|
+
if (!col?.autoWidth) {
|
|
139
|
+
base['width'] = `${this.columnWidths[colIdx]}px`;
|
|
140
|
+
base['minWidth'] = `${this.columnWidths[colIdx]}px`;
|
|
141
|
+
base['maxWidth'] = `${this.columnWidths[colIdx]}px`;
|
|
142
|
+
}
|
|
143
|
+
return base;
|
|
118
144
|
}
|
|
119
145
|
isSelected() {
|
|
120
146
|
if (this.tableEl?.isRowSelectedSync) {
|
|
@@ -144,6 +170,39 @@ export class SdTr {
|
|
|
144
170
|
const fieldName = typeof col.field === 'string' ? col.field : col.name;
|
|
145
171
|
return this.tableEl.getCellClassSync(this.rowKey, fieldName);
|
|
146
172
|
}
|
|
173
|
+
expandCellClass(classStr) {
|
|
174
|
+
if (classStr == null || classStr === '')
|
|
175
|
+
return {};
|
|
176
|
+
return Object.fromEntries(classStr
|
|
177
|
+
.split(/\s+/)
|
|
178
|
+
.filter(Boolean)
|
|
179
|
+
.map(c => [c, true]));
|
|
180
|
+
}
|
|
181
|
+
isVisualLastRow(col) {
|
|
182
|
+
if (!this.tableEl?.isVisualLastRowSync)
|
|
183
|
+
return false;
|
|
184
|
+
const fieldName = typeof col.field === 'string' ? col.field : col.name;
|
|
185
|
+
return this.tableEl.isVisualLastRowSync(this.rowKey, fieldName);
|
|
186
|
+
}
|
|
187
|
+
// selectable td는 column 정보가 없으므로 빈 field로 평가한다.
|
|
188
|
+
// 해당 위치는 rowspan을 등록할 수 없으므로 spanRegistry에 매칭이 없고,
|
|
189
|
+
// 결과적으로 "내 row 자체가 시각적 마지막인지"가 판정된다.
|
|
190
|
+
isVisualLastRowForSelfRow() {
|
|
191
|
+
if (!this.tableEl?.isVisualLastRowSync)
|
|
192
|
+
return false;
|
|
193
|
+
return this.tableEl.isVisualLastRowSync(this.rowKey, '');
|
|
194
|
+
}
|
|
195
|
+
isVisualLastRowBeforeSeparator(col) {
|
|
196
|
+
if (!this.tableEl?.isVisualLastRowBeforeSeparatorSync)
|
|
197
|
+
return false;
|
|
198
|
+
const fieldName = typeof col.field === 'string' ? col.field : col.name;
|
|
199
|
+
return this.tableEl.isVisualLastRowBeforeSeparatorSync(this.rowKey, fieldName);
|
|
200
|
+
}
|
|
201
|
+
isVisualLastRowBeforeSeparatorForSelfRow() {
|
|
202
|
+
if (!this.tableEl?.isVisualLastRowBeforeSeparatorSync)
|
|
203
|
+
return false;
|
|
204
|
+
return this.tableEl.isVisualLastRowBeforeSeparatorSync(this.rowKey, '');
|
|
205
|
+
}
|
|
147
206
|
render() {
|
|
148
207
|
const stickyLeftCount = this._stickyColumn.left || 0;
|
|
149
208
|
const stickyRightCount = this._stickyColumn.right || 0;
|
|
@@ -151,9 +210,13 @@ export class SdTr {
|
|
|
151
210
|
const middleCols = this.visibleColumns.slice(stickyLeftCount, this.visibleColumns.length - stickyRightCount);
|
|
152
211
|
const stickyRightCols = this.visibleColumns.slice(this.visibleColumns.length - stickyRightCount);
|
|
153
212
|
const hasRowspan = this.tableEl?.hasRowspanSync?.() ?? false;
|
|
213
|
+
const isUseFrameRow = this.tableEl?.hasUseFrameInRowSync?.(this.rowKey) ?? false;
|
|
214
|
+
const effectiveDense = this._dense && !isUseFrameRow;
|
|
215
|
+
const bodyLayout = effectiveDense ? TABLE_BODY_LAYOUT.dense : TABLE_BODY_LAYOUT.default;
|
|
154
216
|
const rowStyle = {
|
|
155
|
-
display: this.isVisible ? '' : 'none',
|
|
156
|
-
'--table-body-height': `${
|
|
217
|
+
'display': this.isVisible ? '' : 'none',
|
|
218
|
+
'--table-body-height': `${bodyLayout.height}px`,
|
|
219
|
+
'--table-body-padding-y': `${bodyLayout.paddingY}px`,
|
|
157
220
|
'--table-body-padding-x': `${TABLE_BODY_LAYOUT.paddingX}px`,
|
|
158
221
|
'--table-body-font-family': TABLE_BODY_TYPOGRAPHY.fontFamily,
|
|
159
222
|
'--table-body-font-weight': TABLE_BODY_TYPOGRAPHY.fontWeight,
|
|
@@ -162,14 +225,22 @@ export class SdTr {
|
|
|
162
225
|
'--table-body-text-decoration': TABLE_BODY_TYPOGRAPHY.textDecoration,
|
|
163
226
|
'--table-border-color': TABLE_BORDER.color,
|
|
164
227
|
'--table-border-width': `${TABLE_BORDER.width}px`,
|
|
228
|
+
'--table-separator-color': TABLE_SEPARATOR.color,
|
|
229
|
+
'--table-separator-width': `${TABLE_SEPARATOR.width}px`,
|
|
165
230
|
};
|
|
166
|
-
|
|
231
|
+
if (this.separator) {
|
|
232
|
+
const totalCols = this.visibleColumns.length + (this._selectable ? 1 : 0);
|
|
233
|
+
return (h(Host, { style: rowStyle }, h("tr", { class: "tr tr--separator" }, h("td", { colSpan: totalCols, class: "td td--separator" }))));
|
|
234
|
+
}
|
|
235
|
+
return (h(Host, { style: rowStyle }, h("tr", { class: { 'tr': true, 'tr--no-hover': hasRowspan } }, this._selectable && (h("td", { class: {
|
|
167
236
|
'td': true,
|
|
168
237
|
'td--selected': true,
|
|
238
|
+
'td--last-row': this.isVisualLastRowForSelfRow(),
|
|
239
|
+
'td--before-separator': this.isVisualLastRowBeforeSeparatorForSelfRow(),
|
|
169
240
|
'sticky-left': true,
|
|
170
241
|
'sticky-left-edge': stickyLeftCount === 0,
|
|
171
242
|
'is-scrolled-left': stickyLeftCount === 0 && this._scrolledLeft,
|
|
172
|
-
}, style: { '--sticky-left-offset': '0px' } }, h("sd-checkbox", {
|
|
243
|
+
}, style: { '--sticky-left-offset': '0px' } }, h("sd-checkbox", { value: this.isSelected(), onSdUpdate: () => this.handleSelect() }))), stickyLeftCols.map((col, idx) => {
|
|
173
244
|
if (this.isCovered(idx))
|
|
174
245
|
return null;
|
|
175
246
|
const span = this.getSpanFor(col);
|
|
@@ -177,11 +248,13 @@ export class SdTr {
|
|
|
177
248
|
return (h("td", { key: col.name, rowSpan: span?.rowspan, colSpan: span?.colspan, class: {
|
|
178
249
|
'td': true,
|
|
179
250
|
[`td--${col.align || 'left'}`]: true,
|
|
251
|
+
'td--last-row': this.isVisualLastRow(col),
|
|
252
|
+
'td--before-separator': this.isVisualLastRowBeforeSeparator(col),
|
|
180
253
|
'sticky-left': true,
|
|
181
254
|
'sticky-left-edge': idx === stickyLeftCount - 1,
|
|
182
255
|
'is-scrolled-left': idx === stickyLeftCount - 1 && this._scrolledLeft,
|
|
183
256
|
[`${col.tdClass}`]: Boolean(col.tdClass),
|
|
184
|
-
|
|
257
|
+
...this.expandCellClass(sdCellClass),
|
|
185
258
|
}, 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)))));
|
|
186
259
|
}), middleCols.map((col, relativeIdx) => {
|
|
187
260
|
const actualColIdx = stickyLeftCount + relativeIdx;
|
|
@@ -191,10 +264,12 @@ export class SdTr {
|
|
|
191
264
|
const span = this.getSpanFor(col);
|
|
192
265
|
const sdCellClass = this.getCellClassFor(col);
|
|
193
266
|
return (h("td", { key: col.name, rowSpan: span?.rowspan, colSpan: span?.colspan, class: {
|
|
194
|
-
td: true,
|
|
267
|
+
'td': true,
|
|
195
268
|
[`td--${col.align || 'left'}`]: true,
|
|
269
|
+
'td--last-row': this.isVisualLastRow(col),
|
|
270
|
+
'td--before-separator': this.isVisualLastRowBeforeSeparator(col),
|
|
196
271
|
[`${col.tdClass}`]: Boolean(col.tdClass),
|
|
197
|
-
|
|
272
|
+
...this.expandCellClass(sdCellClass),
|
|
198
273
|
}, style: this.getStickyStyle(actualColIdx) }, h("slot", { name: `${this.tableId}-${fieldName}-${this.rowKey}` }, h("span", null, this.getCellValue(col)))));
|
|
199
274
|
}), stickyRightCols.map((col, relativeIdx) => {
|
|
200
275
|
const actualColIdx = this.visibleColumns.length - stickyRightCount + relativeIdx;
|
|
@@ -206,11 +281,13 @@ export class SdTr {
|
|
|
206
281
|
return (h("td", { key: col.name, rowSpan: span?.rowspan, colSpan: span?.colspan, class: {
|
|
207
282
|
'td': true,
|
|
208
283
|
[`td--${col.align || 'left'}`]: true,
|
|
284
|
+
'td--last-row': this.isVisualLastRow(col),
|
|
285
|
+
'td--before-separator': this.isVisualLastRowBeforeSeparator(col),
|
|
209
286
|
'sticky-right': true,
|
|
210
287
|
'sticky-right-edge': relativeIdx === 0,
|
|
211
288
|
'is-scrolled-right': relativeIdx === 0 && this._scrolledRight,
|
|
212
289
|
[`${col.tdClass}`]: Boolean(col.tdClass),
|
|
213
|
-
|
|
290
|
+
...this.expandCellClass(sdCellClass),
|
|
214
291
|
}, style: this.getStickyStyle(actualColIdx) }, h("slot", { name: `${this.tableId}-${fieldName}-${this.rowKey}` }, h("span", null, this.getCellValue(col)))));
|
|
215
292
|
}))));
|
|
216
293
|
}
|
|
@@ -338,6 +415,25 @@ export class SdTr {
|
|
|
338
415
|
"getter": false,
|
|
339
416
|
"setter": false,
|
|
340
417
|
"defaultValue": "{}"
|
|
418
|
+
},
|
|
419
|
+
"separator": {
|
|
420
|
+
"type": "boolean",
|
|
421
|
+
"mutable": false,
|
|
422
|
+
"complexType": {
|
|
423
|
+
"original": "boolean",
|
|
424
|
+
"resolved": "boolean | undefined",
|
|
425
|
+
"references": {}
|
|
426
|
+
},
|
|
427
|
+
"required": false,
|
|
428
|
+
"optional": true,
|
|
429
|
+
"docs": {
|
|
430
|
+
"tags": [],
|
|
431
|
+
"text": ""
|
|
432
|
+
},
|
|
433
|
+
"getter": false,
|
|
434
|
+
"setter": false,
|
|
435
|
+
"reflect": false,
|
|
436
|
+
"attribute": "separator"
|
|
341
437
|
}
|
|
342
438
|
};
|
|
343
439
|
}
|
|
@@ -351,7 +447,8 @@ export class SdTr {
|
|
|
351
447
|
"_selectable": {},
|
|
352
448
|
"_stickyColumn": {},
|
|
353
449
|
"_scrolledLeft": {},
|
|
354
|
-
"_scrolledRight": {}
|
|
450
|
+
"_scrolledRight": {},
|
|
451
|
+
"_dense": {}
|
|
355
452
|
};
|
|
356
453
|
}
|
|
357
454
|
static get methods() {
|
|
@@ -67,9 +67,14 @@ export class SdTabs {
|
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
69
|
render() {
|
|
70
|
-
return (h("div", { key: '
|
|
70
|
+
return (h("div", { key: 'dd4377850ef052d22b6eb790b7766a3521a41c1c', class: this.getContainerClasses(), style: this.buildCssVars() }, this.tabs.map((tab, index) => {
|
|
71
71
|
const badgeName = this.getBadgeName(tab);
|
|
72
|
-
return (h("div", { key: `tab-${index}`,
|
|
72
|
+
return (h("div", { key: `tab-${index}`, role: "tab", tabindex: 0, "aria-selected": tab.value === this.value ? 'true' : 'false', class: this.getTabClasses(tab), "aria-label": tab.label || 'tab', onClick: () => this.handleTabClick(tab), onKeyDown: e => {
|
|
73
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
74
|
+
e.preventDefault();
|
|
75
|
+
this.handleTabClick(tab);
|
|
76
|
+
}
|
|
77
|
+
} }, 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
78
|
})));
|
|
74
79
|
}
|
|
75
80
|
static get is() { return "sd-tabs"; }
|