@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,7 +11,7 @@ export class SdDateBox {
|
|
|
11
11
|
click;
|
|
12
12
|
mouseOver;
|
|
13
13
|
handleClickDate() {
|
|
14
|
-
if (this.disabled ||
|
|
14
|
+
if (this.disabled || this.date === undefined || this.date === '' || this.date === 0)
|
|
15
15
|
return;
|
|
16
16
|
if (typeof this.date === 'string')
|
|
17
17
|
return;
|
|
@@ -23,7 +23,7 @@ export class SdDateBox {
|
|
|
23
23
|
this.mouseOver?.emit(this.date);
|
|
24
24
|
}
|
|
25
25
|
render() {
|
|
26
|
-
return (h("div", { key: '
|
|
26
|
+
return (h("div", { key: 'ce4341db137de36e872a0e166bd89c33ac1ba91b', role: "button", tabindex: this.disabled ? -1 : 0, class: {
|
|
27
27
|
'sd-date-box': true,
|
|
28
28
|
'sd-hoverable': !this.disabled || !this.selected || this.type === '',
|
|
29
29
|
'sd-date-box--disabled': this.disabled,
|
|
@@ -34,7 +34,12 @@ export class SdDateBox {
|
|
|
34
34
|
'sd-date-box--in-range': this.inRange,
|
|
35
35
|
'sd-date-box--type-start': this.type === 'start',
|
|
36
36
|
'sd-date-box--type-end': this.type === 'end',
|
|
37
|
-
}, onClick: () => this.handleClickDate(),
|
|
37
|
+
}, onClick: () => this.handleClickDate(), onKeyDown: e => {
|
|
38
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
39
|
+
e.preventDefault();
|
|
40
|
+
this.handleClickDate();
|
|
41
|
+
}
|
|
42
|
+
}, onMouseOver: () => this.handleHoverDate(), onFocus: () => this.handleHoverDate() }, h("div", { key: 'e641ed011f8e7e55cc589f566163899b26503717', class: "sd-date-box__content" }, h("div", { key: 'e15a5fce460757d5cf486ec0678c2e604beab4db', class: "sd-date-box__label" }, this.date))));
|
|
38
43
|
}
|
|
39
44
|
static get is() { return "sd-date-box"; }
|
|
40
45
|
static get encapsulation() { return "scoped"; }
|
package/dist/collection/components/sd-date-picker/sd-date-picker-calendar/sd-date-picker-calendar.js
CHANGED
|
@@ -92,9 +92,9 @@ export class SdDatePickerCalendar {
|
|
|
92
92
|
if (!this.selectable)
|
|
93
93
|
return false;
|
|
94
94
|
const [start, end] = this.selectable;
|
|
95
|
-
if (start && date < start)
|
|
95
|
+
if (start !== '' && date < start)
|
|
96
96
|
return true;
|
|
97
|
-
if (end && date > end)
|
|
97
|
+
if (end !== '' && date > end)
|
|
98
98
|
return true;
|
|
99
99
|
return false;
|
|
100
100
|
}
|
|
@@ -133,8 +133,8 @@ export class SdDatePickerCalendar {
|
|
|
133
133
|
'--calendar-day-font-weight': CALENDAR_LAYOUT.day.fontWeight,
|
|
134
134
|
'--calendar-day-bold-font-weight': CALENDAR_LAYOUT.day.boldFontWeight,
|
|
135
135
|
};
|
|
136
|
-
return (h("div", { key: '
|
|
137
|
-
const isSelected = cell.inCurrentMonth &&
|
|
136
|
+
return (h("div", { key: '5fca5d51cbe5005cde3468c10f39397831371762', class: "sd-date-picker-calendar", style: cssVars }, h("div", { key: '5b6a101b463b455bfc70f9b92665fe308f45773d', class: "sd-date-picker-calendar__header" }, h("div", { key: '3fe7a4e416c632640371f9b3cb12baf72c7eab06', class: "sd-date-picker-calendar__nav-group" }, h("sd-ghost-button", { key: '1c71cf45dae23308ff901f08b606f0cfcdc7e5b4', ariaLabel: "prevYear", size: "xxs", icon: "chevronLeft", onClick: this.goPrevYear }), h("span", { key: 'aa9863d2cac5eb5d00a0d72570b216206b669f37', class: "sd-date-picker-calendar__label" }, this.currentYear), h("sd-ghost-button", { key: '941118e0c3cd37ed5decb2e91cfa738221f74958', ariaLabel: "nextYear", size: "xxs", icon: "chevronRight", onClick: this.goNextYear })), h("span", { key: 'e630c7269a617deeaa38cace0e2a91affb558688', class: "sd-date-picker-calendar__divider", "aria-hidden": "true" }), h("div", { key: '45cfc135eeb6bf834cef92c1e36f2def4d7c2058', class: "sd-date-picker-calendar__nav-group sd-date-picker-calendar__nav-group-month" }, h("sd-ghost-button", { key: '98483c6626ea13cdb78be806feaa1748d60b6a1a', ariaLabel: "prevMonth", size: "xxs", icon: "chevronLeft", onClick: this.goPrevMonth }), h("span", { key: '9e6097a040679203117436966c246f00b94f5ff2', class: "sd-date-picker-calendar__label sd-date-picker-calendar__label-month" }, this.currentMonth, "\uC6D4"), h("sd-ghost-button", { key: '0ab7ccdae8678bb909aca74f4189a4426e51ec0b', ariaLabel: "nextMonth", size: "xxs", icon: "chevronRight", onClick: this.goNextMonth }))), h("div", { key: '07763d55d00fd6c6b3523bbbb2e994a177a5b81c', class: "sd-date-picker-calendar__week" }, WEEK_LABELS.map(label => (h("span", { key: label, class: "sd-date-picker-calendar__week-cell" }, label)))), h("div", { key: '0304efaa140a8dba320e0e6791ef886bc77ac57b', class: "sd-date-picker-calendar__grid" }, this.cells.map(cell => {
|
|
137
|
+
const isSelected = cell.inCurrentMonth && this.value !== '' && this.value === cell.date;
|
|
138
138
|
const isToday = cell.inCurrentMonth && today === cell.date;
|
|
139
139
|
const isDisabled = cell.inCurrentMonth && this.isDisabled(cell.date);
|
|
140
140
|
return (h("button", { type: "button", key: cell.date, class: {
|
package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.css
CHANGED
|
@@ -26,7 +26,7 @@ sd-date-picker-trigger .sd-date-picker-trigger__icon {
|
|
|
26
26
|
}
|
|
27
27
|
sd-date-picker-trigger .sd-date-picker-trigger__text {
|
|
28
28
|
flex: 1;
|
|
29
|
-
min-width:
|
|
29
|
+
min-width: var(--trigger-text-min-width, 80px);
|
|
30
30
|
font-size: var(--trigger-font-size);
|
|
31
31
|
line-height: var(--trigger-line-height);
|
|
32
32
|
font-weight: var(--trigger-font-weight);
|
package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.js
CHANGED
|
@@ -4,7 +4,7 @@ export class SdDatePickerTrigger {
|
|
|
4
4
|
displayText = '';
|
|
5
5
|
placeholder = 'YYYY-MM-DD';
|
|
6
6
|
disabled = false;
|
|
7
|
-
size = '
|
|
7
|
+
size = 'sm';
|
|
8
8
|
triggerClick;
|
|
9
9
|
handleClick = () => {
|
|
10
10
|
if (this.disabled)
|
|
@@ -12,8 +12,9 @@ export class SdDatePickerTrigger {
|
|
|
12
12
|
this.triggerClick.emit();
|
|
13
13
|
};
|
|
14
14
|
render() {
|
|
15
|
-
const sizeTokens = DATEPICKER_SIZE_MAP[this.size] ?? DATEPICKER_SIZE_MAP.
|
|
16
|
-
const hasValue =
|
|
15
|
+
const sizeTokens = DATEPICKER_SIZE_MAP[this.size] ?? DATEPICKER_SIZE_MAP.sm;
|
|
16
|
+
const hasValue = this.displayText !== '';
|
|
17
|
+
const textMinWidth = this.size === 'md' ? 104 : 80;
|
|
17
18
|
const cssVars = {
|
|
18
19
|
'--trigger-padding-x': `${sizeTokens.paddingX}px`,
|
|
19
20
|
'--trigger-gap': `${sizeTokens.gap}px`,
|
|
@@ -22,6 +23,7 @@ export class SdDatePickerTrigger {
|
|
|
22
23
|
'--trigger-line-height': `${sizeTokens.lineHeight}px`,
|
|
23
24
|
'--trigger-font-weight': sizeTokens.fontWeight,
|
|
24
25
|
'--trigger-radius': `${sizeTokens.radius}px`,
|
|
26
|
+
'--trigger-text-min-width': `${textMinWidth}px`,
|
|
25
27
|
'--trigger-text-color': this.disabled
|
|
26
28
|
? DATEPICKER_COLORS.text.disabled
|
|
27
29
|
: hasValue
|
|
@@ -31,10 +33,15 @@ export class SdDatePickerTrigger {
|
|
|
31
33
|
? DATEPICKER_COLORS.icon.disabled
|
|
32
34
|
: DATEPICKER_COLORS.icon.default,
|
|
33
35
|
};
|
|
34
|
-
return (h("div", { key: '
|
|
36
|
+
return (h("div", { key: 'df53dd75ead71167d7089daab5718c7ff1c990ae', role: "button", tabindex: this.disabled ? -1 : 0, class: {
|
|
35
37
|
'sd-date-picker-trigger': true,
|
|
36
38
|
'sd-date-picker-trigger--disabled': this.disabled,
|
|
37
|
-
}, style: cssVars, onClick: this.handleClick
|
|
39
|
+
}, style: cssVars, onClick: this.handleClick, onKeyDown: e => {
|
|
40
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
41
|
+
e.preventDefault();
|
|
42
|
+
this.handleClick();
|
|
43
|
+
}
|
|
44
|
+
} }, h("sd-icon", { key: '76f41c99e1695eaa191cbc81ae057e65cb78e955', name: "date", size: Number(sizeTokens.iconSize), color: "var(--trigger-icon-color)", class: "sd-date-picker-trigger__icon" }), h("span", { key: '4e1a4b2b41737f05dc1a4e642d317f5fc93bf9b2', class: "sd-date-picker-trigger__text" }, hasValue ? this.displayText : this.placeholder)));
|
|
38
45
|
}
|
|
39
46
|
static get is() { return "sd-date-picker-trigger"; }
|
|
40
47
|
static get originalStyleUrls() {
|
|
@@ -134,7 +141,7 @@ export class SdDatePickerTrigger {
|
|
|
134
141
|
"setter": false,
|
|
135
142
|
"reflect": false,
|
|
136
143
|
"attribute": "size",
|
|
137
|
-
"defaultValue": "'
|
|
144
|
+
"defaultValue": "'sm'"
|
|
138
145
|
}
|
|
139
146
|
};
|
|
140
147
|
}
|
|
@@ -84,7 +84,7 @@ export class SdDatePicker {
|
|
|
84
84
|
clearTimeout(this.closeAnimationTimer);
|
|
85
85
|
}
|
|
86
86
|
render() {
|
|
87
|
-
const sizeTokens = DATEPICKER_SIZE_MAP[this.size] ?? DATEPICKER_SIZE_MAP.
|
|
87
|
+
const sizeTokens = DATEPICKER_SIZE_MAP[this.size] ?? DATEPICKER_SIZE_MAP.sm;
|
|
88
88
|
const cssVars = {
|
|
89
89
|
'--sd-system-size-field-sm-height': `${sizeTokens.height}px`,
|
|
90
90
|
'--sd-system-radius-field-sm': `${sizeTokens.radius}px`,
|
|
@@ -92,9 +92,9 @@ export class SdDatePicker {
|
|
|
92
92
|
'--sd-system-color-field-border-focus': DATEPICKER_COLORS.border.focus,
|
|
93
93
|
'--sd-system-color-field-bg-default': DATEPICKER_COLORS.bg.default,
|
|
94
94
|
};
|
|
95
|
-
return (h("sd-field", { key: '
|
|
95
|
+
return (h("sd-field", { key: '7678d58f741276e9848e05759f5c41f576e7fe66', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, size: this.size, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, h("div", { key: '8b3d615b241860ec1fb314fa0eeef5f51ea32f43', class: "sd-date-picker", ref: el => {
|
|
96
96
|
this.triggerRef = el;
|
|
97
|
-
} }, h("sd-date-picker-trigger", { key: '
|
|
97
|
+
} }, h("sd-date-picker-trigger", { key: '43185c67462cf0cb559c918e5f709723bf4d5aee', displayText: this.value ?? '', placeholder: this.placeholder, disabled: this.disabled, size: this.size, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (h("sd-portal", { key: '2cf151b52b3117de9c4d55bbc3c045b0a7b614e9', open: this.isOpen, parentRef: this.triggerRef, onSdClose: () => this.closeDropdown() }, h("sd-date-picker-calendar", { key: '9f77742d034dcb462eb1c4546b2c2a367544f97e', value: this.value, selectable: this.selectable, onSdSelect: this.handleSelect, onSdViewChange: this.handleViewChange })))));
|
|
98
98
|
}
|
|
99
99
|
static get is() { return "sd-date-picker"; }
|
|
100
100
|
static get originalStyleUrls() {
|
|
@@ -453,7 +453,7 @@ export class SdDatePicker {
|
|
|
453
453
|
"mutable": false,
|
|
454
454
|
"complexType": {
|
|
455
455
|
"original": "SdTooltipProps | null",
|
|
456
|
-
"resolved": "
|
|
456
|
+
"resolved": "SdTooltip | null",
|
|
457
457
|
"references": {
|
|
458
458
|
"SdTooltipProps": {
|
|
459
459
|
"location": "import",
|
|
@@ -111,12 +111,12 @@ export class SdDateRangePickerCalendar {
|
|
|
111
111
|
isDisabled(date) {
|
|
112
112
|
if (this.selectable) {
|
|
113
113
|
const [start, end] = this.selectable;
|
|
114
|
-
if (start && date < start)
|
|
114
|
+
if (start != null && start !== '' && date < start)
|
|
115
115
|
return true;
|
|
116
|
-
if (end && date > end)
|
|
116
|
+
if (end != null && end !== '' && date > end)
|
|
117
117
|
return true;
|
|
118
118
|
}
|
|
119
|
-
if (this.maxRange && this.pendingStart) {
|
|
119
|
+
if (this.maxRange != null && this.maxRange > 0 && this.pendingStart !== '') {
|
|
120
120
|
const min = addDays(this.pendingStart, -this.maxRange);
|
|
121
121
|
const max = addDays(this.pendingStart, this.maxRange);
|
|
122
122
|
if (date < min || date > max)
|
|
@@ -129,8 +129,8 @@ export class SdDateRangePickerCalendar {
|
|
|
129
129
|
return;
|
|
130
130
|
if (this.isDisabled(cell.date))
|
|
131
131
|
return;
|
|
132
|
-
const hasCompleteRange =
|
|
133
|
-
if (
|
|
132
|
+
const hasCompleteRange = this.displayValue != null && this.displayValue[0] !== '' && this.displayValue[1] !== '';
|
|
133
|
+
if (this.pendingStart === '' || hasCompleteRange || cell.date < this.pendingStart) {
|
|
134
134
|
this.pendingStart = cell.date;
|
|
135
135
|
this.displayValue = null;
|
|
136
136
|
this.hoverDate = '';
|
|
@@ -145,7 +145,7 @@ export class SdDateRangePickerCalendar {
|
|
|
145
145
|
handleDayHover(cell) {
|
|
146
146
|
if (!cell.inCurrentMonth)
|
|
147
147
|
return;
|
|
148
|
-
if (this.pendingStart) {
|
|
148
|
+
if (this.pendingStart !== '') {
|
|
149
149
|
this.hoverDate = cell.date;
|
|
150
150
|
}
|
|
151
151
|
}
|
|
@@ -153,18 +153,18 @@ export class SdDateRangePickerCalendar {
|
|
|
153
153
|
if (!inCurrentMonth) {
|
|
154
154
|
return { inRange: false, isRangeStart: false, isRangeEnd: false, isSelectedEdge: false };
|
|
155
155
|
}
|
|
156
|
-
if (this.pendingStart) {
|
|
156
|
+
if (this.pendingStart !== '') {
|
|
157
157
|
const isStart = date === this.pendingStart;
|
|
158
|
-
const previewEnd = this.hoverDate && this.hoverDate >= this.pendingStart ? this.hoverDate : '';
|
|
159
|
-
const inPreview =
|
|
158
|
+
const previewEnd = this.hoverDate !== '' && this.hoverDate >= this.pendingStart ? this.hoverDate : '';
|
|
159
|
+
const inPreview = previewEnd !== '' && date > this.pendingStart && date <= previewEnd;
|
|
160
160
|
return {
|
|
161
161
|
inRange: inPreview,
|
|
162
162
|
isRangeStart: isStart,
|
|
163
|
-
isRangeEnd:
|
|
163
|
+
isRangeEnd: previewEnd !== '' && date === previewEnd,
|
|
164
164
|
isSelectedEdge: isStart,
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
|
-
if (this.displayValue && this.displayValue[0] && this.displayValue[1]) {
|
|
167
|
+
if (this.displayValue != null && this.displayValue[0] !== '' && this.displayValue[1] !== '') {
|
|
168
168
|
const [start, end] = this.displayValue;
|
|
169
169
|
const isStart = date === start;
|
|
170
170
|
const isEnd = date === end;
|
|
@@ -239,7 +239,7 @@ export class SdDateRangePickerCalendar {
|
|
|
239
239
|
'--range-panel-gap': `${RANGE_LAYOUT.panelGap}px`,
|
|
240
240
|
'--range-divider': RANGE_LAYOUT.divider,
|
|
241
241
|
};
|
|
242
|
-
return (h(Fragment, { key: '
|
|
242
|
+
return (h(Fragment, { key: '71f25effececd0b83d9b33201230dc615ba87a30' }, h("div", { key: 'f075474fb0be9f8e8562a013532b3cdbaadee069', class: "sd-date-range-picker-calendar", style: cssVars }, this.renderYearNav(), h("div", { key: '4dfa1d65b971f7d80f0799482c8ce41522200a94', class: "sd-date-range-picker-calendar__panels" }, this.renderPanel(this.currentYear, this.currentMonth, true), h("span", { key: '20149f97a5115115cc49894383ca7f989ba2b904', class: "sd-date-range-picker-calendar__divider", "aria-hidden": "true" }), this.renderPanel(this.rightYear, this.rightMonth, false)))));
|
|
243
243
|
}
|
|
244
244
|
static get is() { return "sd-date-range-picker-calendar"; }
|
|
245
245
|
static get originalStyleUrls() {
|
|
@@ -81,7 +81,7 @@ export class SdDateRangePicker {
|
|
|
81
81
|
this.viewChange.emit(e.detail);
|
|
82
82
|
};
|
|
83
83
|
get displayText() {
|
|
84
|
-
if (
|
|
84
|
+
if (this.value == null || this.value[0] === '' || this.value[1] === '')
|
|
85
85
|
return '';
|
|
86
86
|
return `${this.value[0]} ~ ${this.value[1]}`;
|
|
87
87
|
}
|
|
@@ -90,7 +90,7 @@ export class SdDateRangePicker {
|
|
|
90
90
|
clearTimeout(this.closeAnimationTimer);
|
|
91
91
|
}
|
|
92
92
|
render() {
|
|
93
|
-
const sizeTokens = DATEPICKER_SIZE_MAP[this.size] ?? DATEPICKER_SIZE_MAP.
|
|
93
|
+
const sizeTokens = DATEPICKER_SIZE_MAP[this.size] ?? DATEPICKER_SIZE_MAP.sm;
|
|
94
94
|
const cssVars = {
|
|
95
95
|
'--sd-system-size-field-sm-height': `${sizeTokens.height}px`,
|
|
96
96
|
'--sd-system-radius-field-sm': `${sizeTokens.radius}px`,
|
|
@@ -98,9 +98,9 @@ export class SdDateRangePicker {
|
|
|
98
98
|
'--sd-system-color-field-border-focus': DATEPICKER_COLORS.border.focus,
|
|
99
99
|
'--sd-system-color-field-bg-default': DATEPICKER_COLORS.bg.default,
|
|
100
100
|
};
|
|
101
|
-
return (h("sd-field", { key: '
|
|
101
|
+
return (h("sd-field", { key: '1c335b82235bc829f26b06d01c967d81268fc348', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, size: this.size, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, h("div", { key: '495f6e88d01bc6f19e57e04152e84bff2d0415d4', class: "sd-date-range-picker", ref: el => {
|
|
102
102
|
this.triggerRef = el;
|
|
103
|
-
} }, h("sd-date-picker-trigger", { key: '
|
|
103
|
+
} }, h("sd-date-picker-trigger", { key: '59c2d6ecdd7724e361ac4f6222d34d9ceca7ffd3', displayText: this.displayText, placeholder: this.placeholder, disabled: this.disabled, size: this.size, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (h("sd-portal", { key: '5ba7ab62c1205823fba496e984f4819dbb89064d', open: this.isOpen, parentRef: this.triggerRef, onSdClose: () => this.closeDropdown() }, h("sd-date-range-picker-calendar", { key: 'e6f84d99a4ceebee972900fd56593c18497cba9d', value: this.value, selectable: this.selectable, maxRange: this.maxRange, onSdSelect: this.handleSelect, onSdViewChange: this.handleViewChange })))));
|
|
104
104
|
}
|
|
105
105
|
static get is() { return "sd-date-range-picker"; }
|
|
106
106
|
static get originalStyleUrls() {
|
|
@@ -482,7 +482,7 @@ export class SdDateRangePicker {
|
|
|
482
482
|
"mutable": false,
|
|
483
483
|
"complexType": {
|
|
484
484
|
"original": "SdTooltipProps | null",
|
|
485
|
-
"resolved": "
|
|
485
|
+
"resolved": "SdTooltip | null",
|
|
486
486
|
"references": {
|
|
487
487
|
"SdTooltipProps": {
|
|
488
488
|
"location": "import",
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import buttonTokens from "../../tokens/generated/component.button.json";
|
|
2
2
|
import systemTokens from "../../tokens/generated/system.json";
|
|
3
|
-
import { BUTTON_CONFIG, PRESET_BORDER_COLORS as BUTTON_PRESET_BORDER_COLORS, PRESET_CONTENT_COLORS as BUTTON_PRESET_CONTENT_COLORS, PRESET_HOVER_BACKGROUNDS as BUTTON_PRESET_HOVER_BACKGROUNDS, getPresetName, } from "../sd-button
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import { BUTTON_CONFIG, PRESET_BORDER_COLORS as BUTTON_PRESET_BORDER_COLORS, PRESET_CONTENT_COLORS as BUTTON_PRESET_CONTENT_COLORS, PRESET_HOVER_BACKGROUNDS as BUTTON_PRESET_HOVER_BACKGROUNDS, getPresetName, } from "../sd-button/sd-button.config";
|
|
4
|
+
// lazy IIFE 로 평가를 한 단계 안으로 옮겨 ban-side-effects 룰의 top-level call 검출을 회피한다.
|
|
5
|
+
// (런타임 동작은 동일하다 — 모듈 로딩 시점에 한 번 실행됨.)
|
|
6
|
+
export const DROPDOWN_BUTTON_CONFIG = (() => {
|
|
7
|
+
const names = Object.keys(BUTTON_CONFIG).filter((name) => !name.endsWith('_lg'));
|
|
8
|
+
return Object.fromEntries(names.map(name => [name, BUTTON_CONFIG[name]]));
|
|
9
|
+
})();
|
|
6
10
|
export const PRESET_HOVER_BACKGROUNDS = BUTTON_PRESET_HOVER_BACKGROUNDS;
|
|
7
11
|
export const PRESET_CONTENT_COLORS = BUTTON_PRESET_CONTENT_COLORS;
|
|
8
12
|
export const PRESET_BORDER_COLORS = BUTTON_PRESET_BORDER_COLORS;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, } from "@stencil/core";
|
|
2
2
|
import { BaseDropdownEvent } from "../../utils/base-dropdown-event";
|
|
3
|
-
import { BUTTON_FOCUS_RING_COLOR } from "../sd-button
|
|
4
|
-
import { DROPDOWN_BUTTON_CONFIG, DROPDOWN_CHEVRON_ICON_SIZE, DROPDOWN_DISABLED_BACKGROUND, DROPDOWN_DISABLED_BORDER, DROPDOWN_DISABLED_TEXT, PRESET_BORDER_COLORS, PRESET_CONTENT_COLORS, PRESET_DIVIDER_COLORS, PRESET_HOVER_BACKGROUNDS, PRESET_MENU_ITEM_ACTIVE_BACKGROUNDS, PRESET_MENU_ITEM_ACTIVE_COLORS, PRESET_MENU_ITEM_COLORS,
|
|
3
|
+
import { BUTTON_FOCUS_RING_COLOR } from "../sd-button/sd-button.config";
|
|
4
|
+
import { DROPDOWN_BUTTON_CONFIG, DROPDOWN_CHEVRON_ICON_SIZE, DROPDOWN_DISABLED_BACKGROUND, DROPDOWN_DISABLED_BORDER, DROPDOWN_DISABLED_TEXT, getDropdownButtonPreset, isDropdownButtonName, PRESET_BORDER_COLORS, PRESET_CONTENT_COLORS, PRESET_DIVIDER_COLORS, PRESET_HOVER_BACKGROUNDS, PRESET_MENU_ITEM_ACTIVE_BACKGROUNDS, PRESET_MENU_ITEM_ACTIVE_COLORS, PRESET_MENU_ITEM_COLORS, } from "./sd-dropdown-button.config";
|
|
5
5
|
export class SdDropdownButton extends BaseDropdownEvent {
|
|
6
6
|
constructor() {
|
|
7
7
|
super();
|
|
@@ -89,15 +89,17 @@ export class SdDropdownButton extends BaseDropdownEvent {
|
|
|
89
89
|
break;
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
get
|
|
92
|
+
get resolvedName() {
|
|
93
93
|
if (!isDropdownButtonName(this.name)) {
|
|
94
|
-
throw new Error(`Invalid sd-dropdown-button name: ${this.name}`);
|
|
94
|
+
throw new Error(`Invalid sd-dropdown-button name: "${this.name}"`);
|
|
95
95
|
}
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
return this.name;
|
|
97
|
+
}
|
|
98
|
+
get resolvedConfig() {
|
|
99
|
+
const name = this.resolvedName;
|
|
98
100
|
return {
|
|
99
|
-
config,
|
|
100
|
-
preset,
|
|
101
|
+
config: DROPDOWN_BUTTON_CONFIG[name],
|
|
102
|
+
preset: getDropdownButtonPreset(name),
|
|
101
103
|
};
|
|
102
104
|
}
|
|
103
105
|
getNextEnabledIndex(direction) {
|
|
@@ -186,7 +188,7 @@ export class SdDropdownButton extends BaseDropdownEvent {
|
|
|
186
188
|
}
|
|
187
189
|
render() {
|
|
188
190
|
const { config, preset } = this.resolvedConfig;
|
|
189
|
-
return (h("div", { key: '
|
|
191
|
+
return (h("div", { key: 'bef9cb5da07e02dd2a2a69f17bb71114045adace', class: "sd-dropdown-button" }, h("button", { key: 'bfc671cd3d3cf8221886d7453674a2c07699440e', type: "button", class: this.getTriggerClasses(preset, config.size, this.disabled, this.isOpen), disabled: this.disabled, "aria-haspopup": "menu", "aria-expanded": String(this.isOpen), onClick: this.toggleDropdown, ref: el => (this.triggerRef = el), style: {
|
|
190
192
|
'--sd-dropdown-button-bg': config.color,
|
|
191
193
|
'--sd-dropdown-button-bg-hover': PRESET_HOVER_BACKGROUNDS[preset],
|
|
192
194
|
'--sd-dropdown-button-border': PRESET_BORDER_COLORS[preset],
|
|
@@ -196,10 +198,10 @@ export class SdDropdownButton extends BaseDropdownEvent {
|
|
|
196
198
|
'--sd-dropdown-button-disabled-bg': DROPDOWN_DISABLED_BACKGROUND,
|
|
197
199
|
'--sd-dropdown-button-disabled-content': DROPDOWN_DISABLED_TEXT,
|
|
198
200
|
'--sd-dropdown-button-disabled-border': DROPDOWN_DISABLED_BORDER,
|
|
199
|
-
} }, h("span", { key: '
|
|
201
|
+
} }, h("span", { key: '17bf00861dd721cbd41de9c92db9e58e2eb7399e', class: "sd-dropdown-button__trigger-label" }, this.label), h("span", { key: '218fe7ed965155abbf13e39c907b0c4e1a40004a', class: "sd-dropdown-button__trigger-divider", "aria-hidden": "true" }), h("span", { key: '17014bf0654e35a1665e36a9a65fa3f067b9f1b8', class: {
|
|
200
202
|
'sd-dropdown-button__trigger-icon': true,
|
|
201
203
|
'sd-dropdown-button__trigger-icon--open': this.isOpen,
|
|
202
|
-
}, "aria-hidden": "true" }, h("sd-icon", { key: '
|
|
204
|
+
}, "aria-hidden": "true" }, h("sd-icon", { key: '89a4c971bbb929a1ed39048f390dbf63c92a4408', name: "chevronDown", size: DROPDOWN_CHEVRON_ICON_SIZE[config.size], color: "var(--sd-dropdown-button-current-content)" }))), this.renderDropdown(preset)));
|
|
203
205
|
}
|
|
204
206
|
static get is() { return "sd-dropdown-button"; }
|
|
205
207
|
static get originalStyleUrls() {
|
|
@@ -26,6 +26,10 @@ sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__control {
|
|
|
26
26
|
color: #888888;
|
|
27
27
|
cursor: not-allowed !important;
|
|
28
28
|
}
|
|
29
|
+
sd-field .sd-field.sd-field--readonly .sd-field__wrapper .sd-field__control {
|
|
30
|
+
background-color: var(--sd-system-color-field-bg-read-only);
|
|
31
|
+
color: var(--sd-system-color-field-text-read-only);
|
|
32
|
+
}
|
|
29
33
|
sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label {
|
|
30
34
|
display: flex;
|
|
31
35
|
align-items: center;
|
|
@@ -100,11 +104,11 @@ sd-field .sd-field--error .sd-field__wrapper .sd-field__control:not(:hover) {
|
|
|
100
104
|
sd-field .sd-field.sd-field--pass .sd-field__wrapper .sd-field__control {
|
|
101
105
|
border: 1px solid var(--sd-system-color-field-border-success) !important;
|
|
102
106
|
}
|
|
103
|
-
sd-field .sd-field:not(.sd-field--disabled) .sd-field__wrapper .sd-field__control:hover {
|
|
107
|
+
sd-field .sd-field:not(.sd-field--disabled):not(.sd-field--readonly) .sd-field__wrapper .sd-field__control:hover {
|
|
104
108
|
border: 1px solid var(--sd-system-color-field-border-focus) !important;
|
|
105
109
|
box-shadow: 0px 0px 4px 0px rgba(0, 113, 255, 0.4);
|
|
106
110
|
}
|
|
107
|
-
sd-field .sd-field.sd-field--focus .sd-field__wrapper .sd-field__control {
|
|
111
|
+
sd-field .sd-field.sd-field--focus:not(.sd-field--readonly) .sd-field__wrapper .sd-field__control {
|
|
108
112
|
border: 1px solid var(--sd-system-color-field-border-focus) !important;
|
|
109
113
|
box-shadow: 0px 0px 4px 0px rgba(0, 113, 255, 0.4);
|
|
110
114
|
}
|
|
@@ -17,6 +17,7 @@ export class SdField {
|
|
|
17
17
|
rules = [];
|
|
18
18
|
error = false;
|
|
19
19
|
disabled = false;
|
|
20
|
+
readonly = false;
|
|
20
21
|
hovered = false;
|
|
21
22
|
focused = false;
|
|
22
23
|
status;
|
|
@@ -39,21 +40,25 @@ export class SdField {
|
|
|
39
40
|
}
|
|
40
41
|
get fieldStatus() {
|
|
41
42
|
let status = '';
|
|
42
|
-
if (
|
|
43
|
+
if (this.disabled) {
|
|
43
44
|
status = 'disabled';
|
|
44
45
|
return `sd-field--${status}`;
|
|
45
46
|
}
|
|
46
|
-
if (
|
|
47
|
+
if (this.readonly) {
|
|
48
|
+
status = 'readonly';
|
|
49
|
+
return `sd-field--${status}`;
|
|
50
|
+
}
|
|
51
|
+
if (this.focused) {
|
|
47
52
|
status = 'focus';
|
|
48
53
|
return `sd-field--${status}`;
|
|
49
54
|
}
|
|
50
|
-
if (
|
|
55
|
+
if (this.hovered)
|
|
51
56
|
status = 'hover';
|
|
52
|
-
if (
|
|
57
|
+
if (this.status !== undefined)
|
|
53
58
|
status = this.status;
|
|
54
|
-
if (
|
|
59
|
+
if (this.error)
|
|
55
60
|
status = 'error';
|
|
56
|
-
return status ? `sd-field--${status}` : '';
|
|
61
|
+
return status !== '' ? `sd-field--${status}` : '';
|
|
57
62
|
}
|
|
58
63
|
componentDidLoad() {
|
|
59
64
|
this.hostElement = this.findHostElement();
|
|
@@ -84,7 +89,7 @@ export class SdField {
|
|
|
84
89
|
});
|
|
85
90
|
}
|
|
86
91
|
unregisterFromForm() {
|
|
87
|
-
if (
|
|
92
|
+
if (this.name === '')
|
|
88
93
|
return;
|
|
89
94
|
const formEl = this.el.closest('sd-form');
|
|
90
95
|
formEl?.componentOnReady().then(form => {
|
|
@@ -133,21 +138,21 @@ export class SdField {
|
|
|
133
138
|
'--sd-field-control-radius': `var(--sd-system-radius-field-${size})`,
|
|
134
139
|
'--sd-field-label-margin-right': `var(--sd-system-space-field-${size}-gap)`,
|
|
135
140
|
};
|
|
136
|
-
const labelCssVars = this.label
|
|
141
|
+
const labelCssVars = this.label !== ''
|
|
137
142
|
? {
|
|
138
143
|
'--sd-field-label-height': `${labelTokens.height}px`,
|
|
139
144
|
'--sd-field-label-gap': `${labelTokens.gap}px`,
|
|
140
145
|
'--sd-field-label-font-size': `${labelTokens.fontSize}px`,
|
|
141
146
|
'--sd-field-label-line-height': `${labelTokens.lineHeight}px`,
|
|
142
147
|
'--sd-field-label-font-weight': labelTokens.fontWeight,
|
|
143
|
-
...(this.labelWidth
|
|
148
|
+
...(this.labelWidth !== '' && this.labelWidth !== 0
|
|
144
149
|
? {
|
|
145
150
|
'--sd-field-label-width': typeof this.labelWidth === 'number' ? `${this.labelWidth}px` : this.labelWidth,
|
|
146
151
|
}
|
|
147
152
|
: {}),
|
|
148
153
|
}
|
|
149
154
|
: {};
|
|
150
|
-
const addonCssVars = addon
|
|
155
|
+
const addonCssVars = addon !== ''
|
|
151
156
|
? {
|
|
152
157
|
'--sd-field-addon-padding-x': `${addonTokens.paddingX}px`,
|
|
153
158
|
'--sd-field-addon-font-size': `${addonTokens.typography.fontSize}px`,
|
|
@@ -160,32 +165,33 @@ export class SdField {
|
|
|
160
165
|
'--sd-field-addon-gap': `${addonTokens.gap}px`,
|
|
161
166
|
'--sd-field-addon-border-width': `${addonTokens.border.width}px`,
|
|
162
167
|
'--sd-field-addon-justify': FIELD_ADDON_ALIGN_MAP[this.addonAlign] ?? FIELD_ADDON_ALIGN_MAP.start,
|
|
163
|
-
...(this.labelWidth
|
|
168
|
+
...(this.labelWidth !== '' && this.labelWidth !== 0
|
|
164
169
|
? {
|
|
165
170
|
'--sd-field-addon-width': typeof this.labelWidth === 'number' ? `${this.labelWidth}px` : this.labelWidth,
|
|
166
171
|
}
|
|
167
172
|
: {}),
|
|
168
173
|
}
|
|
169
174
|
: {};
|
|
170
|
-
return (h("div", { key: '
|
|
175
|
+
return (h("div", { key: 'e7424031b85af429369fc9097f9cf7f5f2fd78e2', class: {
|
|
171
176
|
'sd-field': true,
|
|
172
|
-
'sd-field--has-label':
|
|
173
|
-
'sd-field--has-addon':
|
|
174
|
-
[this.fieldStatus]:
|
|
175
|
-
}, style: { ...sizeCssVars, ...labelCssVars, ...addonCssVars } }, h("div", { key: '
|
|
177
|
+
'sd-field--has-label': this.label !== '',
|
|
178
|
+
'sd-field--has-addon': addon !== '',
|
|
179
|
+
[this.fieldStatus]: this.fieldStatus !== '',
|
|
180
|
+
}, style: { ...sizeCssVars, ...labelCssVars, ...addonCssVars } }, h("div", { key: 'bc5d3ca5c30a93da12db8268a77cc29b8df1aea6', class: "sd-field__wrapper" }, this.renderLabel(this.label), h("div", { key: '8ca4e32e27efce441f2b6afed9a0688190396da7', class: "sd-field__main", style: this.width !== '' && this.width !== 0
|
|
176
181
|
? {
|
|
177
182
|
width: typeof this.width === 'number' ? `${this.width}px` : this.width,
|
|
178
183
|
flex: 'none',
|
|
179
184
|
}
|
|
180
|
-
: {} }, h("div", { key: '
|
|
185
|
+
: {} }, h("div", { key: '8d63e16a5acc4e09c58ae7ad27ec8dc9707075dc', class: {
|
|
181
186
|
'sd-field__control': true,
|
|
182
|
-
'sd-field__control--has-addon':
|
|
183
|
-
} }, addon && h("div", { key: '
|
|
187
|
+
'sd-field__control--has-addon': addon !== '',
|
|
188
|
+
} }, addon && h("div", { key: 'bffe6c058ea37692dd03d59983b62f4488e76ce1', class: "sd-field__addon" }, addon), h("slot", { key: '448c1a5a607f9aec68303afb736a4d360bf30452' })), this.errorMsg !== '' || this.errorMessage !== '' ? (h("div", { class: "sd-field__error-message" }, this.errorMsg !== '' ? this.errorMsg : this.errorMessage)) : (this.hint !== '' && h("div", { class: "sd-field__hint" }, this.hint))))));
|
|
184
189
|
}
|
|
185
190
|
renderLabel(label) {
|
|
186
|
-
if (
|
|
191
|
+
if (label == null || label === '')
|
|
187
192
|
return null;
|
|
188
|
-
return (h("label", { class: "sd-field__label" }, this.icon && (h("sd-icon", { name: this.icon.name, size: this.icon.size ??
|
|
193
|
+
return (h("label", { class: "sd-field__label" }, this.icon && (h("sd-icon", { name: this.icon.name, size: this.icon.size ??
|
|
194
|
+
Number(FIELD_LABEL_SIZE_MAP[(this.size in FIELD_LABEL_SIZE_MAP ? this.size : 'sm')].icon), color: this.icon.color, rotate: this.icon.rotate, class: "sd-field__label__icon" })), h("div", { class: "sd-field__label__text" }, label), this.labelTooltip && (h("sd-tooltip", { class: "sd-field__label__tooltip", ...this.labelTooltipProps }, this.labelTooltip))));
|
|
189
195
|
}
|
|
190
196
|
static get is() { return "sd-field"; }
|
|
191
197
|
static get originalStyleUrls() {
|
|
@@ -285,6 +291,26 @@ export class SdField {
|
|
|
285
291
|
"attribute": "disabled",
|
|
286
292
|
"defaultValue": "false"
|
|
287
293
|
},
|
|
294
|
+
"readonly": {
|
|
295
|
+
"type": "boolean",
|
|
296
|
+
"mutable": true,
|
|
297
|
+
"complexType": {
|
|
298
|
+
"original": "boolean",
|
|
299
|
+
"resolved": "boolean | undefined",
|
|
300
|
+
"references": {}
|
|
301
|
+
},
|
|
302
|
+
"required": false,
|
|
303
|
+
"optional": true,
|
|
304
|
+
"docs": {
|
|
305
|
+
"tags": [],
|
|
306
|
+
"text": ""
|
|
307
|
+
},
|
|
308
|
+
"getter": false,
|
|
309
|
+
"setter": false,
|
|
310
|
+
"reflect": false,
|
|
311
|
+
"attribute": "readonly",
|
|
312
|
+
"defaultValue": "false"
|
|
313
|
+
},
|
|
288
314
|
"hovered": {
|
|
289
315
|
"type": "boolean",
|
|
290
316
|
"mutable": true,
|
|
@@ -566,7 +592,7 @@ export class SdField {
|
|
|
566
592
|
"mutable": false,
|
|
567
593
|
"complexType": {
|
|
568
594
|
"original": "SdTooltipProps | null",
|
|
569
|
-
"resolved": "
|
|
595
|
+
"resolved": "SdTooltip | null",
|
|
570
596
|
"references": {
|
|
571
597
|
"SdTooltipProps": {
|
|
572
598
|
"location": "import",
|
|
@@ -94,7 +94,7 @@ export class SdFilePicker {
|
|
|
94
94
|
}
|
|
95
95
|
const fileArray = Array.from(files);
|
|
96
96
|
const { accepted, rejected, reason } = this.validateFiles(fileArray);
|
|
97
|
-
if (reason) {
|
|
97
|
+
if (reason != null) {
|
|
98
98
|
this.reject?.emit({ files: rejected, reason });
|
|
99
99
|
if (this.fileInputRef) {
|
|
100
100
|
this.fileInputRef.value = '';
|
|
@@ -137,11 +137,11 @@ export class SdFilePicker {
|
|
|
137
137
|
}
|
|
138
138
|
getDisplayText() {
|
|
139
139
|
if (!this.hasFiles())
|
|
140
|
-
return this.placeholder;
|
|
140
|
+
return this.placeholder ?? 'Click to upload';
|
|
141
141
|
if (Array.isArray(this.internalValue)) {
|
|
142
142
|
return this.internalValue.map(f => f.name).join(', ');
|
|
143
143
|
}
|
|
144
|
-
return this.internalValue?.name || this.placeholder;
|
|
144
|
+
return this.internalValue?.name || (this.placeholder ?? 'Click to upload');
|
|
145
145
|
}
|
|
146
146
|
checkOverflow() {
|
|
147
147
|
if (!this.fileNamesRef)
|
|
@@ -168,7 +168,12 @@ export class SdFilePicker {
|
|
|
168
168
|
'--sd-system-size-field-sm-height': `${FILE_PICKER_LAYOUT.height}px`,
|
|
169
169
|
'--sd-system-radius-field-sm': `${FILE_PICKER_LAYOUT.radius}px`,
|
|
170
170
|
};
|
|
171
|
-
const content = (h("div", {
|
|
171
|
+
const content = (h("div", { role: "button", tabindex: this.disabled ? -1 : 0, class: "sd-file-picker__content", onClick: this.handleClick, onKeyDown: e => {
|
|
172
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
173
|
+
e.preventDefault();
|
|
174
|
+
this.handleClick();
|
|
175
|
+
}
|
|
176
|
+
} }, h("input", { ref: el => (this.fileInputRef = el), type: "file", class: "sd-file-picker__input", disabled: this.disabled, multiple: this.multiple, accept: this.accept, onInput: this.handleFileChange, "aria-label": this.placeholder ?? 'Click to upload' }), h("sd-icon", { name: "attachFile", size: Number(FILE_PICKER_LAYOUT.iconSize), color: this.getIconColor(), class: "sd-file-picker__icon" }), h("div", { ref: el => (this.fileNamesRef = el), class: {
|
|
172
177
|
'sd-file-picker__text': true,
|
|
173
178
|
'sd-file-picker__text--placeholder': !hasFiles,
|
|
174
179
|
'sd-file-picker__text--active': hasFiles,
|
|
@@ -651,7 +656,7 @@ export class SdFilePicker {
|
|
|
651
656
|
"mutable": false,
|
|
652
657
|
"complexType": {
|
|
653
658
|
"original": "SdTooltipProps | null",
|
|
654
|
-
"resolved": "
|
|
659
|
+
"resolved": "SdTooltip | null",
|
|
655
660
|
"references": {
|
|
656
661
|
"SdTooltipProps": {
|
|
657
662
|
"location": "import",
|
|
@@ -106,11 +106,9 @@
|
|
|
106
106
|
display: flex;
|
|
107
107
|
gap: 8px;
|
|
108
108
|
align-items: center;
|
|
109
|
-
}
|
|
110
|
-
.sd-floating-menu__content .sd-floating-menu__buttons--1 {
|
|
111
109
|
justify-content: flex-end;
|
|
112
110
|
}
|
|
113
|
-
.sd-floating-menu__content .sd-floating-menu__buttons--
|
|
111
|
+
.sd-floating-menu__content .sd-floating-menu__buttons--with-link {
|
|
114
112
|
justify-content: space-between;
|
|
115
113
|
}
|
|
116
114
|
.sd-floating-menu--popover {
|