@sellmate/design-system 1.21.0 → 1.23.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/design-system.cjs.js +2 -2
- package/dist/cjs/{index-C-F-JEv_.js → index-BuaQW9U4.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/sd-action-modal.cjs.entry.js +1 -1
- package/dist/cjs/sd-badge.cjs.entry.js +1 -1
- package/dist/cjs/sd-barcode-input.cjs.entry.js +1 -1
- package/dist/cjs/sd-button_2.cjs.entry.js +5 -5
- package/dist/cjs/sd-calendar_2.cjs.entry.js +1 -1
- package/dist/cjs/sd-callout.cjs.entry.js +1 -1
- package/dist/cjs/sd-card.cjs.entry.js +1 -1
- package/dist/cjs/sd-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/sd-chip-input.cjs.entry.js +61 -19
- package/dist/cjs/sd-chip.cjs.entry.js +6 -4
- package/dist/cjs/{sd-chip.config-DiLoRpct.js → sd-chip.config-DCNCzV8s.js} +1 -1
- package/dist/cjs/sd-circle-progress.cjs.entry.js +1 -1
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/sd-date-box.cjs.entry.js +1 -1
- package/dist/cjs/sd-date-picker_7.cjs.entry.js +1 -1
- package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +1 -1
- package/dist/cjs/sd-divider.cjs.entry.js +1 -1
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +1 -1
- package/dist/cjs/sd-field_3.cjs.entry.js +2 -2
- package/dist/cjs/sd-form.cjs.entry.js +1 -1
- package/dist/cjs/sd-ghost-button_3.cjs.entry.js +4 -4
- package/dist/cjs/sd-guide.cjs.entry.js +1 -1
- package/dist/cjs/sd-key-value-table.cjs.entry.js +1 -1
- package/dist/cjs/sd-linear-progress.cjs.entry.js +1 -1
- package/dist/cjs/sd-loading-container.cjs.entry.js +1 -1
- package/dist/cjs/sd-modal-container.cjs.entry.js +1 -1
- package/dist/cjs/sd-pagination_4.cjs.entry.js +87 -8
- package/dist/cjs/sd-popover.cjs.entry.js +2 -2
- package/dist/cjs/sd-popup.cjs.entry.js +1 -1
- package/dist/cjs/sd-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/sd-radio.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-list-item_2.cjs.entry.js +1 -1
- package/dist/cjs/sd-select_3.cjs.entry.js +1 -1
- package/dist/cjs/sd-switch.cjs.entry.js +1 -1
- package/dist/cjs/sd-table.cjs.entry.js +1 -1
- package/dist/cjs/sd-tabs.cjs.entry.js +1 -1
- package/dist/cjs/sd-td.cjs.entry.js +1 -1
- package/dist/cjs/sd-text-link.cjs.entry.js +1 -1
- package/dist/cjs/sd-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/sd-toast.cjs.entry.js +1 -1
- package/dist/cjs/sd-toggle.cjs.entry.js +1 -1
- package/dist/cjs/{tooltipArrow-26hYtSrD.js → tooltipArrow-VQq73W83.js} +1 -1
- package/dist/collection/components/assets/CaretDown.js +1 -1
- package/dist/collection/components/assets/CaretLeft.js +1 -1
- package/dist/collection/components/assets/CaretRight.js +1 -1
- package/dist/collection/components/assets/CaretUp.js +1 -1
- package/dist/collection/components/sd-chip/sd-chip.js +24 -2
- package/dist/collection/components/sd-chip-input/sd-chip-input.css +5 -0
- package/dist/collection/components/sd-chip-input/sd-chip-input.js +58 -16
- package/dist/collection/components/sd-ghost-button/sd-ghost-button.js +3 -3
- package/dist/collection/components/sd-table/sd-table.stories.helpers.js +97 -0
- package/dist/collection/components/sd-table/sd-thead/sd-thead.css +21 -0
- package/dist/collection/components/sd-table/sd-thead/sd-thead.js +87 -7
- package/dist/components/index.js +1 -1
- package/dist/components/{p-C1QezE7u.js → p-2-7UYvqL.js} +1 -1
- package/dist/components/{p-B-Igud6n.js → p-4I0LJNSg.js} +1 -1
- package/dist/components/p-B3bERWUt.js +1 -0
- package/dist/components/{p-DIc8C633.js → p-BDm6daTX.js} +1 -1
- package/dist/components/{p-CZYTZeMe.js → p-BFMUpKa2.js} +1 -1
- package/dist/components/{p-Cj_1bYZF.js → p-BJMpxQSk.js} +1 -1
- package/dist/components/{p-DU0IkIvI.js → p-BLsuwMw4.js} +1 -1
- package/dist/components/{p-DZikCqcw.js → p-BRKeMTWI.js} +1 -1
- package/dist/components/{p-BjSMh85k.js → p-BUB0CcPo.js} +1 -1
- package/dist/components/{p-CBDBmMmw.js → p-BYgT6mRD.js} +1 -1
- package/dist/components/p-BdFwmTyS.js +1 -0
- package/dist/components/{p-BIHVGo10.js → p-BeKMwT89.js} +1 -1
- package/dist/components/p-BnhzUsGP.js +1 -0
- package/dist/components/{p-C3mTIE8H.js → p-Btpf6Xpg.js} +1 -1
- package/dist/components/{p-B76pFg6k.js → p-BwgUEhOa.js} +1 -1
- package/dist/components/{p-CTw1Deo8.js → p-C2cNc56z.js} +1 -1
- package/dist/components/{p-CTxZT3Je.js → p-C3rOud8J.js} +1 -1
- package/dist/components/{p-D4zy1T3V.js → p-C9rjLN0u.js} +1 -1
- package/dist/components/{p-CCCwPJ5p.js → p-CEVDmQdt.js} +1 -1
- package/dist/components/{p-BQQC-6k4.js → p-CGJ1L8_Y.js} +1 -1
- package/dist/components/{p-4MIzxb0h.js → p-CZpcFpSk.js} +1 -1
- package/dist/components/p-C_g09O6z.js +1 -0
- package/dist/components/{p-B5VNSTAf.js → p-CaQ-qyG-.js} +1 -1
- package/dist/components/{p-S2-XqY2R.js → p-ChwRSZ6R.js} +1 -1
- package/dist/components/{p-s_75vJTu.js → p-ClBvavih.js} +1 -1
- package/dist/components/{p-Dz7VXmIA.js → p-CpBPNHYe.js} +1 -1
- package/dist/components/{p-FA9fGvbL.js → p-D3dq5pt5.js} +1 -1
- package/dist/components/p-DDahT3Mp.js +1 -0
- package/dist/components/{p-BrHnpCXR.js → p-DfKZyde8.js} +1 -1
- package/dist/components/{p-DPXOBYhf.js → p-DgZ_vzrA.js} +1 -1
- package/dist/components/{p-BFlmHQm9.js → p-Dj1iJxUT.js} +1 -1
- package/dist/components/{p-CEKu7cxA.js → p-Dn93jl-w.js} +1 -1
- package/dist/components/{p-CcwzTAJC.js → p-DnHzWLdY.js} +1 -1
- package/dist/components/{p-Btj50AUe.js → p-IMWw_SJ1.js} +1 -1
- package/dist/components/{p-DC5W8Uy1.js → p-iORPryb0.js} +1 -1
- package/dist/components/{p-Cugxp5lo.js → p-kDokArZu.js} +1 -1
- package/dist/components/{p-l7TaS8q9.js → p-lL2VxD2V.js} +1 -1
- package/dist/components/sd-action-modal.js +1 -1
- package/dist/components/sd-badge.js +1 -1
- package/dist/components/sd-barcode-input.js +1 -1
- package/dist/components/sd-button.js +1 -1
- package/dist/components/sd-calendar.js +1 -1
- package/dist/components/sd-callout.js +1 -1
- package/dist/components/sd-card.js +1 -1
- package/dist/components/sd-checkbox.js +1 -1
- package/dist/components/sd-chip-input.js +1 -1
- package/dist/components/sd-chip.js +1 -1
- package/dist/components/sd-circle-progress.js +1 -1
- package/dist/components/sd-confirm-modal.js +1 -1
- package/dist/components/sd-date-box.js +1 -1
- package/dist/components/sd-date-picker-trigger.js +1 -1
- package/dist/components/sd-date-picker.js +1 -1
- package/dist/components/sd-date-range-picker-calendar.js +1 -1
- package/dist/components/sd-date-range-picker.js +1 -1
- package/dist/components/sd-divider.js +1 -1
- package/dist/components/sd-dropdown-button.js +1 -1
- package/dist/components/sd-field.js +1 -1
- package/dist/components/sd-file-picker.js +1 -1
- package/dist/components/sd-floating-portal.js +1 -1
- package/dist/components/sd-form.js +1 -1
- package/dist/components/sd-ghost-button.js +1 -1
- package/dist/components/sd-guide.js +1 -1
- package/dist/components/sd-icon.js +1 -1
- package/dist/components/sd-input.js +1 -1
- package/dist/components/sd-key-value-table.js +1 -1
- package/dist/components/sd-linear-progress.js +1 -1
- package/dist/components/sd-loading-container.js +1 -1
- package/dist/components/sd-loading-modal.js +1 -1
- package/dist/components/sd-modal-container.js +1 -1
- package/dist/components/sd-number-input.js +1 -1
- package/dist/components/sd-pagination.js +1 -1
- package/dist/components/sd-popover.js +1 -1
- package/dist/components/sd-popup.js +1 -1
- package/dist/components/sd-portal.js +1 -1
- package/dist/components/sd-radio-button.js +1 -1
- package/dist/components/sd-radio-group.js +1 -1
- package/dist/components/sd-radio.js +1 -1
- package/dist/components/sd-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/{p-2ba0b35a.entry.js → p-12e7b9fc.entry.js} +1 -1
- package/dist/design-system/{p-ccc85130.entry.js → p-1e1a5c69.entry.js} +1 -1
- package/dist/design-system/p-1e9793d6.entry.js +1 -0
- package/dist/design-system/{p-ce83eca1.entry.js → p-2646a746.entry.js} +1 -1
- package/dist/design-system/{p-a71a8b31.entry.js → p-3c4b57b5.entry.js} +1 -1
- package/dist/design-system/{p-99f33027.entry.js → p-43316703.entry.js} +1 -1
- package/dist/design-system/{p-e310f188.entry.js → p-43c79402.entry.js} +1 -1
- package/dist/design-system/{p-bfba449b.entry.js → p-45651573.entry.js} +1 -1
- package/dist/design-system/{p-88926a42.entry.js → p-496d3684.entry.js} +1 -1
- package/dist/design-system/{p-d5b535ad.entry.js → p-4d68b0a8.entry.js} +1 -1
- package/dist/design-system/{p-68687503.entry.js → p-578683b5.entry.js} +1 -1
- package/dist/design-system/{p-ce5df7ef.entry.js → p-586602a8.entry.js} +1 -1
- package/dist/design-system/{p-9dc0c2f9.entry.js → p-60f3ce4f.entry.js} +1 -1
- package/dist/design-system/{p-4f69fde0.entry.js → p-64d63a3f.entry.js} +1 -1
- package/dist/design-system/{p-563a8242.entry.js → p-6cd3da51.entry.js} +1 -1
- package/dist/design-system/p-7233ffb7.entry.js +1 -0
- package/dist/design-system/p-754c11a8.entry.js +1 -0
- package/dist/design-system/{p-ac81b46e.entry.js → p-8101c564.entry.js} +1 -1
- package/dist/design-system/{p-4bc0ce52.entry.js → p-829b7e4f.entry.js} +1 -1
- package/dist/design-system/{p-7c507d39.entry.js → p-83a86e6d.entry.js} +1 -1
- package/dist/design-system/p-86e54f19.entry.js +1 -0
- package/dist/design-system/{p-4eeca0cb.entry.js → p-93f876ce.entry.js} +1 -1
- package/dist/design-system/p-956956af.entry.js +1 -0
- package/dist/design-system/{p-90436be8.entry.js → p-9761ef4a.entry.js} +1 -1
- package/dist/design-system/{p-50b5cf37.entry.js → p-9b7d3077.entry.js} +1 -1
- package/dist/design-system/{p-C7HJ-NfO.js → p-BZ5lcC25.js} +1 -1
- package/dist/{components/p-BRmilX-4.js → design-system/p-GXE2lEVj.js} +1 -1
- package/dist/design-system/{p-DDj5KTBF.js → p-ITP9Focx.js} +1 -1
- package/dist/design-system/{p-c684cd96.entry.js → p-a42bcc11.entry.js} +1 -1
- package/dist/design-system/{p-ff726fad.entry.js → p-a5fe8b9a.entry.js} +1 -1
- package/dist/design-system/{p-2ca4902b.entry.js → p-b1f4e1e5.entry.js} +1 -1
- package/dist/design-system/{p-abcc9367.entry.js → p-b29569d7.entry.js} +1 -1
- package/dist/design-system/{p-a80cc067.entry.js → p-b2ef677a.entry.js} +1 -1
- package/dist/design-system/{p-35e1e2fa.entry.js → p-b7e80770.entry.js} +1 -1
- package/dist/design-system/{p-6d8a4a23.entry.js → p-c4c81918.entry.js} +1 -1
- package/dist/design-system/{p-2df32f8c.entry.js → p-c79bf2eb.entry.js} +1 -1
- package/dist/design-system/{p-52e88677.entry.js → p-ccbf8687.entry.js} +1 -1
- package/dist/design-system/{p-b881bbb6.entry.js → p-d10efe7e.entry.js} +1 -1
- package/dist/design-system/{p-274dbc65.entry.js → p-df5e8dba.entry.js} +1 -1
- package/dist/design-system/{p-fc65bbe2.entry.js → p-e018fdb1.entry.js} +1 -1
- package/dist/design-system/{p-9a010c12.entry.js → p-e897484c.entry.js} +1 -1
- package/dist/design-system/{p-552acf98.entry.js → p-e94bd6d7.entry.js} +1 -1
- package/dist/design-system/{p-c93c623f.entry.js → p-f280e59d.entry.js} +1 -1
- package/dist/esm/design-system.js +3 -3
- package/dist/esm/{index-C7HJ-NfO.js → index-BZ5lcC25.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/sd-action-modal.entry.js +1 -1
- package/dist/esm/sd-badge.entry.js +1 -1
- package/dist/esm/sd-barcode-input.entry.js +1 -1
- package/dist/esm/sd-button_2.entry.js +5 -5
- package/dist/esm/sd-calendar_2.entry.js +1 -1
- package/dist/esm/sd-callout.entry.js +1 -1
- package/dist/esm/sd-card.entry.js +1 -1
- package/dist/esm/sd-checkbox.entry.js +1 -1
- package/dist/esm/sd-chip-input.entry.js +61 -19
- package/dist/esm/{sd-chip.config-DDj5KTBF.js → sd-chip.config-ITP9Focx.js} +1 -1
- package/dist/esm/sd-chip.entry.js +6 -4
- package/dist/esm/sd-circle-progress.entry.js +1 -1
- package/dist/esm/sd-confirm-modal_2.entry.js +1 -1
- package/dist/esm/sd-date-box.entry.js +1 -1
- package/dist/esm/sd-date-picker_7.entry.js +1 -1
- package/dist/esm/sd-date-range-picker-calendar.entry.js +1 -1
- package/dist/esm/sd-divider.entry.js +1 -1
- package/dist/esm/sd-dropdown-button.entry.js +1 -1
- package/dist/esm/sd-field_3.entry.js +2 -2
- package/dist/esm/sd-form.entry.js +1 -1
- package/dist/esm/sd-ghost-button_3.entry.js +4 -4
- package/dist/esm/sd-guide.entry.js +1 -1
- package/dist/esm/sd-key-value-table.entry.js +1 -1
- package/dist/esm/sd-linear-progress.entry.js +1 -1
- package/dist/esm/sd-loading-container.entry.js +1 -1
- package/dist/esm/sd-modal-container.entry.js +1 -1
- package/dist/esm/sd-pagination_4.entry.js +87 -8
- package/dist/esm/sd-popover.entry.js +2 -2
- package/dist/esm/sd-popup.entry.js +1 -1
- package/dist/esm/sd-radio-button.entry.js +1 -1
- package/dist/esm/sd-radio.entry.js +1 -1
- package/dist/esm/sd-select-list-item_2.entry.js +1 -1
- package/dist/esm/sd-select_3.entry.js +1 -1
- package/dist/esm/sd-switch.entry.js +1 -1
- package/dist/esm/sd-table.entry.js +1 -1
- package/dist/esm/sd-tabs.entry.js +1 -1
- package/dist/esm/sd-td.entry.js +1 -1
- package/dist/esm/sd-text-link.entry.js +1 -1
- package/dist/esm/sd-toast-container.entry.js +1 -1
- package/dist/esm/sd-toast.entry.js +1 -1
- package/dist/esm/sd-toggle.entry.js +1 -1
- package/dist/esm/{tooltipArrow-Bgf3crs7.js → tooltipArrow-ByHjyr3Z.js} +1 -1
- package/dist/types/components/sd-chip/sd-chip.d.ts +2 -0
- package/dist/types/components/sd-table/constants.d.ts +1 -0
- package/dist/types/components/sd-table/sd-table.stories.helpers.d.ts +10 -0
- package/dist/types/components/sd-table/sd-thead/sd-thead.d.ts +8 -0
- package/dist/types/components.d.ts +11 -0
- package/hydrate/index.js +160 -35
- package/hydrate/index.mjs +160 -35
- package/package.json +1 -1
- package/dist/components/p-BVlg0BoC.js +0 -1
- package/dist/components/p-BzsHwLh6.js +0 -1
- package/dist/components/p-DJY7lCe4.js +0 -1
- package/dist/components/p-YpyfqzoP.js +0 -1
- package/dist/design-system/p-0f35cd21.entry.js +0 -1
- package/dist/design-system/p-35da166a.entry.js +0 -1
- package/dist/design-system/p-4c1559c8.entry.js +0 -1
- package/dist/design-system/p-4e44b45b.entry.js +0 -1
- package/dist/design-system/p-DUyBmuH_.js +0 -1
- package/dist/design-system/p-fe5b8eaa.entry.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BuaQW9U4.js');
|
|
4
4
|
|
|
5
5
|
const sdLoadingContainerCss = () => `sd-loading-container .sd-loading-container{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:var(--sd-loading-container-z-index, 999);opacity:0;visibility:hidden;transition:opacity 0.2s ease, visibility 0s linear 0.2s;pointer-events:none}sd-loading-container .sd-loading-container--visible{opacity:1;visibility:visible;transition:opacity 0.2s ease, visibility 0s linear 0s;pointer-events:auto}sd-loading-container .sd-loading-container__backdrop{position:absolute;inset:0;background:rgba(0, 0, 0, 0.4)}sd-loading-container .sd-loading-container__content{position:relative;display:flex;flex-direction:column;align-items:center;gap:16px}sd-loading-container .sd-loading-container__message{margin:0;color:#ffffff;font-size:14px;font-weight:500;line-height:22px;text-align:center;max-width:400px;word-break:keep-all}`;
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BuaQW9U4.js');
|
|
4
4
|
var modalStack = require('./modal-stack-DucFLON7.js');
|
|
5
5
|
|
|
6
6
|
const sdModalContainerCss = () => `sd-modal-container{display:block}sd-modal-container .sd-modal-container{position:fixed;inset:0;z-index:var(--sd-modal-container-z-index, 997);pointer-events:none}sd-modal-container .sd-modal-container__layer{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none}sd-modal-container .sd-modal-container__backdrop{position:absolute;inset:0;background:rgba(0, 0, 0, 0.4);opacity:0;transition:opacity 0.3s ease-out;pointer-events:none}sd-modal-container .sd-modal-container__backdrop--visible{opacity:1;pointer-events:auto}sd-modal-container .sd-modal-container__modal{position:relative;z-index:1;opacity:0;transform:scale(0);pointer-events:auto;transition:opacity 0.3s ease-out, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)}sd-modal-container .sd-modal-container__modal--visible{opacity:1;transform:scale(1)}sd-modal-container .sd-modal-container__modal--shake{animation:modal-shake 0.3s ease-out}@keyframes modal-shake{0%,100%{transform:scale(1)}25%{transform:scale(1.03)}50%{transform:scale(0.97)}75%{transform:scale(1.01)}}`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BuaQW9U4.js');
|
|
4
4
|
var constants = require('./constants-DJRV1upE.js');
|
|
5
5
|
var sdTable_config = require('./sd-table.config-B7MuRLoR.js');
|
|
6
6
|
require('./component.table-DIxmbGBT.js');
|
|
@@ -234,7 +234,7 @@ const SdTbody = class {
|
|
|
234
234
|
};
|
|
235
235
|
SdTbody.style = sdTbodyCss();
|
|
236
236
|
|
|
237
|
-
const sdTheadCss = () => `sd-thead{display:contents}sd-thead *{box-sizing:border-box}.thead{display:table-header-group;height:var(--table-header-height, 36px)}.thead--sticky{position:sticky;top:0;z-index:120}.tr{display:table-row;width:100%}.th{display:table-cell;background:var(--table-header-bg, #F5FAFF);height:var(--table-header-height, 36px);padding:0 var(--table-header-padding-x, 16px);font-family:var(--table-header-font-family, inherit);font-weight:var(--table-header-font-weight, 500);font-size:var(--table-header-font-size, 12px);line-height:var(--table-header-line-height, 20px);text-decoration:var(--table-header-text-decoration, none);vertical-align:middle;border-bottom:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1);-webkit-user-select:none;user-select:none;position:relative;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.th--selected{position:relative;width:var(--table-selectable-width, 48px) !important;max-width:var(--table-selectable-width, 48px) !important;min-width:var(--table-selectable-width, 48px) !important;text-align:center}.th--selected sd-checkbox label{position:relative}.th--selected sd-checkbox label:before{content:"";position:absolute;inset:-6px}.th.sticky-left{position:sticky;background-color:var(--table-header-bg, #F5FAFF);z-index:110 !important;left:var(--sticky-left-offset, 0)}.th.sticky-right{position:sticky;background-color:var(--table-header-bg, #F5FAFF);z-index:110 !important;right:var(--sticky-right-offset, 0)}.th.sticky-left-edge:after{content:"";position:absolute;top:0;left:100%;right:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset 12px 0 20px -25px;opacity:0;pointer-events:none;transition:opacity 0.2s}.th.sticky-right-edge:after{content:"";position:absolute;top:0;left:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset -12px 0 20px -25px;opacity:0;pointer-events:none;transition:opacity 0.2s}.th.sticky-left-edge.is-scrolled-left{overflow:visible}.th.sticky-left-edge.is-scrolled-left:after{opacity:1}.th.sticky-right-edge.is-scrolled-right{overflow:visible}.th.sticky-right-edge.is-scrolled-right:after{opacity:1}.th__content{display:flex;flex-flow:row nowrap;align-items:center;gap:var(--table-header-gap, 4px)}.th__content--left{justify-content:flex-start}.th__content--center{justify-content:center}.th__content--right{justify-content:flex-end}.th__content--label{white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.th__bar{position:absolute;top:50%;right:0;transform:translateY(-50%);width:var(--table-border-width, 1px);height:var(--table-header-resizer-height, 16px);z-index:3;background-color:var(--table-header-resizer-color, #CCCCCC)}.th__resizer{position:absolute;top:50%;right:0;transform:translateY(-50%);width:4px;height:var(--table-header-resizer-height, 16px);cursor:col-resize;z-index:3;border-left:var(--table-border-width, 1px) solid var(--table-header-resizer-color, #CCCCCC);border-right:var(--table-border-width, 1px) solid var(--table-header-resizer-color, #CCCCCC)}.th__resizer--left{right:auto;left:0}`;
|
|
237
|
+
const sdTheadCss = () => `sd-thead{display:contents}sd-thead *{box-sizing:border-box}.thead{display:table-header-group;height:var(--table-header-height, 36px)}.thead--sticky{position:sticky;top:0;z-index:120}.tr{display:table-row;width:100%}.th{display:table-cell;background:var(--table-header-bg, #F5FAFF);height:var(--table-header-height, 36px);padding:0 var(--table-header-padding-x, 16px);font-family:var(--table-header-font-family, inherit);font-weight:var(--table-header-font-weight, 500);font-size:var(--table-header-font-size, 12px);line-height:var(--table-header-line-height, 20px);text-decoration:var(--table-header-text-decoration, none);vertical-align:middle;border-bottom:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1);-webkit-user-select:none;user-select:none;position:relative;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.th--selected{position:relative;width:var(--table-selectable-width, 48px) !important;max-width:var(--table-selectable-width, 48px) !important;min-width:var(--table-selectable-width, 48px) !important;text-align:center}.th--selected sd-checkbox label{position:relative}.th--selected sd-checkbox label:before{content:"";position:absolute;inset:-6px}.th.sticky-left{position:sticky;background-color:var(--table-header-bg, #F5FAFF);z-index:110 !important;left:var(--sticky-left-offset, 0)}.th.sticky-right{position:sticky;background-color:var(--table-header-bg, #F5FAFF);z-index:110 !important;right:var(--sticky-right-offset, 0)}.th.sticky-left-edge:after{content:"";position:absolute;top:0;left:100%;right:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset 12px 0 20px -25px;opacity:0;pointer-events:none;transition:opacity 0.2s}.th.sticky-right-edge:after{content:"";position:absolute;top:0;left:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset -12px 0 20px -25px;opacity:0;pointer-events:none;transition:opacity 0.2s}.th.sticky-left-edge.is-scrolled-left{overflow:visible}.th.sticky-left-edge.is-scrolled-left:after{opacity:1}.th.sticky-right-edge.is-scrolled-right{overflow:visible}.th.sticky-right-edge.is-scrolled-right:after{opacity:1}.th__content{display:flex;flex-flow:row nowrap;align-items:center;gap:var(--table-header-gap, 4px)}.th__content--left{justify-content:flex-start}.th__content--center{justify-content:center}.th__content--right{justify-content:flex-end}.th__content--label{white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.th__bar{position:absolute;top:50%;right:0;transform:translateY(-50%);width:var(--table-border-width, 1px);height:var(--table-header-resizer-height, 16px);z-index:3;background-color:var(--table-header-resizer-color, #CCCCCC)}.th__dropdown-trigger{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:16px;height:16px;padding:0;border:none;background:transparent;cursor:pointer;color:inherit;border-radius:2px}.th__dropdown-trigger sd-icon{transition:transform 0.15s ease}.th__dropdown-trigger--open sd-icon{transform:rotate(180deg)}.th__resizer{position:absolute;top:50%;right:0;transform:translateY(-50%);width:4px;height:var(--table-header-resizer-height, 16px);cursor:col-resize;z-index:3;border-left:var(--table-border-width, 1px) solid var(--table-header-resizer-color, #CCCCCC);border-right:var(--table-border-width, 1px) solid var(--table-header-resizer-color, #CCCCCC)}.th__resizer--left{right:auto;left:0}`;
|
|
238
238
|
|
|
239
239
|
const SdThead = class {
|
|
240
240
|
constructor(hostRef) {
|
|
@@ -270,14 +270,29 @@ const SdThead = class {
|
|
|
270
270
|
_stickyHeader = false;
|
|
271
271
|
_scrolledLeft = false;
|
|
272
272
|
_scrolledRight = false;
|
|
273
|
+
dropdownOpenMap = {};
|
|
273
274
|
tableEl = null;
|
|
275
|
+
dropdownRefs = {};
|
|
276
|
+
dropdownThRefs = {};
|
|
277
|
+
dropdownPortals = {};
|
|
274
278
|
handleColumnsChange(newCols) {
|
|
275
279
|
if (Array.isArray(newCols) && (this.columnWidths ?? []).length === 0) {
|
|
276
280
|
this.columnWidths = newCols.map(c => (c.autoWidth ? 0 : parseInt(c.width || '120', 10)));
|
|
277
281
|
}
|
|
278
282
|
}
|
|
283
|
+
disconnectedCallback() {
|
|
284
|
+
const portals = this.dropdownPortals ?? {};
|
|
285
|
+
Object.values(portals).forEach(portal => {
|
|
286
|
+
if (portal?.parentNode != null)
|
|
287
|
+
portal.parentNode.removeChild(portal);
|
|
288
|
+
});
|
|
289
|
+
}
|
|
279
290
|
componentWillLoad() {
|
|
280
291
|
this.syncTableContext();
|
|
292
|
+
this.dropdownOpenMap = this.dropdownOpenMap ?? {};
|
|
293
|
+
this.dropdownRefs = this.dropdownRefs ?? {};
|
|
294
|
+
this.dropdownThRefs = this.dropdownThRefs ?? {};
|
|
295
|
+
this.dropdownPortals = this.dropdownPortals ?? {};
|
|
281
296
|
this.columnWidths = Array.isArray(this.columnWidths) ? this.columnWidths : [];
|
|
282
297
|
this.resolveConfig();
|
|
283
298
|
if ((this.columnWidths ?? []).length === 0) {
|
|
@@ -287,6 +302,36 @@ const SdThead = class {
|
|
|
287
302
|
componentDidLoad() {
|
|
288
303
|
this.syncTableContext();
|
|
289
304
|
this.resolveConfig();
|
|
305
|
+
this.initDropdownPortals();
|
|
306
|
+
}
|
|
307
|
+
// sd-portal을 body에 붙여 CSS transform 영향 없이 정확한 위치에 패널을 표시한다.
|
|
308
|
+
// <slot>을 render에 두지 않고 직접 DOM 이동(slot 속성 제거)으로 Stencil 슬롯 에뮬레이션 충돌을 피한다.
|
|
309
|
+
initDropdownPortals() {
|
|
310
|
+
const cols = this._columns ?? [];
|
|
311
|
+
const hasDropdownCols = cols.filter(c => c.hasDropdown === true);
|
|
312
|
+
if (hasDropdownCols.length === 0)
|
|
313
|
+
return;
|
|
314
|
+
for (const col of hasDropdownCols) {
|
|
315
|
+
const colName = col.name;
|
|
316
|
+
// 이미 포탈이 생성된 컬럼은 건너뜀 (refreshConfig 재호출 대비)
|
|
317
|
+
if ((this.dropdownPortals ?? {})[colName] != null)
|
|
318
|
+
continue;
|
|
319
|
+
const slotContent = this.el.querySelector(`[slot="dropdown-${colName}"]`);
|
|
320
|
+
if (slotContent == null)
|
|
321
|
+
continue;
|
|
322
|
+
// slot 속성 제거: Stencil 슬롯 에뮬레이션이 재배포하지 못하게 한다
|
|
323
|
+
slotContent.removeAttribute('slot');
|
|
324
|
+
const portal = document.createElement('sd-portal');
|
|
325
|
+
portal.parentRef = this.dropdownThRefs[colName] ?? null;
|
|
326
|
+
portal.open = false;
|
|
327
|
+
// 첫 open 전까지 포탈 호스트 자체를 숨긴다.
|
|
328
|
+
// moveSlotContent()가 open=true 시 children을 독립 wrapper div로 이동하므로 이후 동작에 영향 없음.
|
|
329
|
+
portal.style.display = 'none';
|
|
330
|
+
portal.addEventListener('sdClose', () => this.closeDropdown(colName));
|
|
331
|
+
portal.appendChild(slotContent);
|
|
332
|
+
document.body.appendChild(portal);
|
|
333
|
+
this.dropdownPortals[colName] = portal;
|
|
334
|
+
}
|
|
290
335
|
}
|
|
291
336
|
syncTableContext() {
|
|
292
337
|
// sd-table이 shadow:true이므로 fallback content로 렌더되면 closest가 경계를 못 넘는다.
|
|
@@ -329,6 +374,7 @@ const SdThead = class {
|
|
|
329
374
|
/** 테이블 설정을 다시 불러옵니다. */
|
|
330
375
|
async refreshConfig() {
|
|
331
376
|
this.resolveConfig();
|
|
377
|
+
this.initDropdownPortals();
|
|
332
378
|
}
|
|
333
379
|
/** 컬럼 너비를 업데이트합니다. */
|
|
334
380
|
async setColumnWidths(widths) {
|
|
@@ -373,6 +419,28 @@ const SdThead = class {
|
|
|
373
419
|
handleColumnSort = (col) => {
|
|
374
420
|
this.sdColumnSort.emit({ column: col });
|
|
375
421
|
};
|
|
422
|
+
toggleDropdown(name) {
|
|
423
|
+
const isOpen = this.dropdownOpenMap[name] !== true;
|
|
424
|
+
const portals = this.dropdownPortals ?? {};
|
|
425
|
+
const newMap = { ...this.dropdownOpenMap };
|
|
426
|
+
// _columns 기준으로 순회: portals가 비어도 dropdownOpenMap은 항상 갱신됨
|
|
427
|
+
for (const col of (this._columns ?? []).filter(c => c.hasDropdown === true)) {
|
|
428
|
+
const shouldBeOpen = col.name === name ? isOpen : false;
|
|
429
|
+
newMap[col.name] = shouldBeOpen;
|
|
430
|
+
const portal = portals[col.name];
|
|
431
|
+
if (portal != null)
|
|
432
|
+
portal.open = shouldBeOpen;
|
|
433
|
+
}
|
|
434
|
+
this.dropdownOpenMap = newMap;
|
|
435
|
+
}
|
|
436
|
+
closeDropdown(name) {
|
|
437
|
+
if (this.dropdownOpenMap[name] !== true)
|
|
438
|
+
return;
|
|
439
|
+
this.dropdownOpenMap = { ...this.dropdownOpenMap, [name]: false };
|
|
440
|
+
const portal = (this.dropdownPortals ?? {})[name];
|
|
441
|
+
if (portal != null)
|
|
442
|
+
portal.open = false;
|
|
443
|
+
}
|
|
376
444
|
handleSelectAll(checked) {
|
|
377
445
|
const nextChecked = !!checked;
|
|
378
446
|
const safeRows = Array.isArray(this.rows) ? this.rows : [];
|
|
@@ -389,6 +457,8 @@ const SdThead = class {
|
|
|
389
457
|
}
|
|
390
458
|
render() {
|
|
391
459
|
const safeRows = Array.isArray(this.rows) ? this.rows : [];
|
|
460
|
+
const dropdownOpenMap = this.dropdownOpenMap ?? {};
|
|
461
|
+
const dropdownRefs = this.dropdownRefs ?? {};
|
|
392
462
|
const stickyLeftCount = this._stickyColumn.left || 0;
|
|
393
463
|
const stickyRightCount = this._stickyColumn.right || 0;
|
|
394
464
|
const stickyLeftCols = this.visibleColumns.slice(0, stickyLeftCount);
|
|
@@ -410,22 +480,25 @@ const SdThead = class {
|
|
|
410
480
|
'--table-border-color': sdTable_config.TABLE_BORDER.color,
|
|
411
481
|
'--table-border-width': `${sdTable_config.TABLE_BORDER.width}px`,
|
|
412
482
|
};
|
|
413
|
-
return (index.h(index.Host, { key: '
|
|
483
|
+
return (index.h(index.Host, { key: '947f5e5b0e59e7e6f8a73e4fd44dbfa646cb630a', slot: `${this.tableId}-head`, style: headStyle }, index.h("thead", { key: '2e0ffbfe9d96528c6e0082d4883fa462a18831d6', class: {
|
|
414
484
|
'thead': true,
|
|
415
485
|
'thead--sticky': this._stickyHeader,
|
|
416
|
-
} }, index.h("tr", { key: '
|
|
486
|
+
} }, index.h("tr", { key: '5843a18e1548bc6546e447d4c9213375116af0e9', class: "tr" }, this._selectable && (index.h("th", { key: '914024ca35874747e39f1819337cd4ad1cbe733d', class: {
|
|
417
487
|
'th': true,
|
|
418
488
|
'th--selected': true,
|
|
419
489
|
'sticky-left': true,
|
|
420
490
|
'sticky-left-edge': stickyLeftCount === 0,
|
|
421
491
|
'is-scrolled-left': stickyLeftCount === 0 && this._scrolledLeft,
|
|
422
|
-
}, style: { '--sticky-left-offset': '0px' } }, index.h("sd-checkbox", { key: '
|
|
492
|
+
}, style: { '--sticky-left-offset': '0px' } }, index.h("sd-checkbox", { key: 'e07232f1f5fa02589573ddaae53ebdadbdb97674', value: this.getIsAllChecked(), disabled: safeRows.length === 0, onSdUpdate: (e) => this.handleSelectAll(e.detail) }), index.h("div", { key: '08b504cfd4f420e76e91d649eed28c7068517044', class: "th__bar" }))), stickyLeftCols.map((col, idx) => (index.h("th", { key: col.name, class: {
|
|
423
493
|
'th': true,
|
|
424
494
|
[`${col.thClass}`]: Boolean(col.thClass),
|
|
425
495
|
'sticky-left': true,
|
|
426
496
|
'sticky-left-edge': idx === stickyLeftCount - 1,
|
|
427
497
|
'is-scrolled-left': idx === stickyLeftCount - 1 && this._scrolledLeft,
|
|
428
|
-
}, style: { ...col.thStyle, ...this.getStickyStyle(idx) } }, index.h("div", { class: `th__content th__content--${col.align || 'left'}` }, index.h("div", { class: "th__content--label" }, col.label), col.icon && (index.h("sd-icon", { name: col.icon, size: "12", color: sdTable_config.resolveTableIconColor(col.icon, col.iconColor) })), col.sort && (index.h("sd-icon", { name: sdTable_config.resolveSortIconName(col.sort), size: "12", color: sdTable_config.resolveTableIconColor(sdTable_config.resolveSortIconName(col.sort), col.iconColor), onClick: () => this.handleColumnSort(col), style: { cursor: 'pointer' } })), col.tooltip && (index.h("sd-tooltip", { ...col.tooltipOptions }, index.h("div", { slot: "content" }, col.tooltip.map(text => (index.h("p", null, text))))))
|
|
498
|
+
}, style: { ...col.thStyle, ...this.getStickyStyle(idx) }, ref: col.hasDropdown === true ? (el => { this.dropdownThRefs[col.name] = el; }) : undefined }, index.h("div", { class: `th__content th__content--${col.align || 'left'}` }, index.h("div", { class: "th__content--label" }, col.label), col.icon && (index.h("sd-icon", { name: col.icon, size: "12", color: sdTable_config.resolveTableIconColor(col.icon, col.iconColor) })), col.sort && (index.h("sd-icon", { name: sdTable_config.resolveSortIconName(col.sort), size: "12", color: sdTable_config.resolveTableIconColor(sdTable_config.resolveSortIconName(col.sort), col.iconColor), onClick: () => this.handleColumnSort(col), style: { cursor: 'pointer' } })), col.tooltip && (index.h("sd-tooltip", { ...col.tooltipOptions }, index.h("div", { slot: "content" }, col.tooltip.map(text => (index.h("p", null, text)))))), col.hasDropdown === true && (index.h("button", { class: {
|
|
499
|
+
'th__dropdown-trigger': true,
|
|
500
|
+
'th__dropdown-trigger--open': dropdownOpenMap[col.name] === true,
|
|
501
|
+
}, ref: el => { dropdownRefs[col.name] = el; }, onClick: () => this.toggleDropdown(col.name), "aria-haspopup": "listbox", "aria-expanded": dropdownOpenMap[col.name] === true ? 'true' : 'false' }, index.h("sd-icon", { name: "chevronDown", size: "12" })))), this._resizable && idx !== lastColIdx && (
|
|
429
502
|
// column resize 는 마우스 드래그 전용 인터랙션이라 키보드 핸들러를 두지 않는다.
|
|
430
503
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
431
504
|
index.h("div", { class: "th__resizer", onMouseDown: (evt) => this.handleResize(idx, evt) }))))), middleCols.map((col, relativeIdx) => {
|
|
@@ -433,7 +506,10 @@ const SdThead = class {
|
|
|
433
506
|
return (index.h("th", { key: col.name, class: {
|
|
434
507
|
th: true,
|
|
435
508
|
[`${col.thClass}`]: Boolean(col.thClass),
|
|
436
|
-
}, style: { ...col.thStyle, ...this.getStickyStyle(actualColIdx) } }, index.h("div", { class: `th__content th__content--${col.align || 'left'}` }, index.h("div", { class: "th__content--label" }, col.label), col.icon && (index.h("sd-icon", { name: col.icon, size: "12", color: sdTable_config.resolveTableIconColor(col.icon, col.iconColor) })), col.sort && (index.h("sd-icon", { name: sdTable_config.resolveSortIconName(col.sort), size: "12", color: sdTable_config.resolveTableIconColor(sdTable_config.resolveSortIconName(col.sort), col.iconColor), onClick: () => this.handleColumnSort(col), style: { cursor: 'pointer' } })), col.tooltip && (index.h("sd-tooltip", { ...col.tooltipOptions }, index.h("div", { slot: "content" }, col.tooltip.map(text => (index.h("p", null, text))))))
|
|
509
|
+
}, style: { ...col.thStyle, ...this.getStickyStyle(actualColIdx) }, ref: col.hasDropdown === true ? (el => { this.dropdownThRefs[col.name] = el; }) : undefined }, index.h("div", { class: `th__content th__content--${col.align || 'left'}` }, index.h("div", { class: "th__content--label" }, col.label), col.icon && (index.h("sd-icon", { name: col.icon, size: "12", color: sdTable_config.resolveTableIconColor(col.icon, col.iconColor) })), col.sort && (index.h("sd-icon", { name: sdTable_config.resolveSortIconName(col.sort), size: "12", color: sdTable_config.resolveTableIconColor(sdTable_config.resolveSortIconName(col.sort), col.iconColor), onClick: () => this.handleColumnSort(col), style: { cursor: 'pointer' } })), col.tooltip && (index.h("sd-tooltip", { ...col.tooltipOptions }, index.h("div", { slot: "content" }, col.tooltip.map(text => (index.h("p", null, text)))))), col.hasDropdown === true && (index.h("button", { class: {
|
|
510
|
+
'th__dropdown-trigger': true,
|
|
511
|
+
'th__dropdown-trigger--open': this.dropdownOpenMap[col.name] === true,
|
|
512
|
+
}, ref: el => { this.dropdownRefs[col.name] = el; }, onClick: () => this.toggleDropdown(col.name), "aria-haspopup": "listbox", "aria-expanded": this.dropdownOpenMap[col.name] === true ? 'true' : 'false' }, index.h("sd-icon", { name: "chevronDown", size: "12" })))), this._resizable && actualColIdx !== lastColIdx && (
|
|
437
513
|
// column resize 는 마우스 드래그 전용 인터랙션이라 키보드 핸들러를 두지 않는다.
|
|
438
514
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
439
515
|
index.h("div", { class: "th__resizer", onMouseDown: (evt) => this.handleResize(actualColIdx, evt) }))));
|
|
@@ -445,7 +521,10 @@ const SdThead = class {
|
|
|
445
521
|
'sticky-right': true,
|
|
446
522
|
'sticky-right-edge': relativeIdx === 0,
|
|
447
523
|
'is-scrolled-right': relativeIdx === 0 && this._scrolledRight,
|
|
448
|
-
}, style: { ...col.thStyle, ...this.getStickyStyle(actualColIdx) } }, index.h("div", { class: `th__content th__content--${col.align || 'left'}` }, index.h("div", { class: "th__content--label" }, col.label), col.icon && (index.h("sd-icon", { name: col.icon, size: "12", color: sdTable_config.resolveTableIconColor(col.icon, col.iconColor) })), col.sort && (index.h("sd-icon", { name: sdTable_config.resolveSortIconName(col.sort), size: "12", color: sdTable_config.resolveTableIconColor(sdTable_config.resolveSortIconName(col.sort), col.iconColor), onClick: () => this.handleColumnSort(col), style: { cursor: 'pointer' } })), col.tooltip && (index.h("sd-tooltip", { ...col.tooltipOptions }, index.h("div", { slot: "content" }, col.tooltip.map(text => (index.h("p", null, text))))))
|
|
524
|
+
}, style: { ...col.thStyle, ...this.getStickyStyle(actualColIdx) }, ref: col.hasDropdown === true ? (el => { this.dropdownThRefs[col.name] = el; }) : undefined }, index.h("div", { class: `th__content th__content--${col.align || 'left'}` }, index.h("div", { class: "th__content--label" }, col.label), col.icon && (index.h("sd-icon", { name: col.icon, size: "12", color: sdTable_config.resolveTableIconColor(col.icon, col.iconColor) })), col.sort && (index.h("sd-icon", { name: sdTable_config.resolveSortIconName(col.sort), size: "12", color: sdTable_config.resolveTableIconColor(sdTable_config.resolveSortIconName(col.sort), col.iconColor), onClick: () => this.handleColumnSort(col), style: { cursor: 'pointer' } })), col.tooltip && (index.h("sd-tooltip", { ...col.tooltipOptions }, index.h("div", { slot: "content" }, col.tooltip.map(text => (index.h("p", null, text)))))), col.hasDropdown === true && (index.h("button", { class: {
|
|
525
|
+
'th__dropdown-trigger': true,
|
|
526
|
+
'th__dropdown-trigger--open': this.dropdownOpenMap[col.name] === true,
|
|
527
|
+
}, ref: el => { this.dropdownRefs[col.name] = el; }, onClick: () => this.toggleDropdown(col.name), "aria-haspopup": "listbox", "aria-expanded": this.dropdownOpenMap[col.name] === true ? 'true' : 'false' }, index.h("sd-icon", { name: "chevronDown", size: "12" })))), this._resizable && (
|
|
449
528
|
// column resize 는 마우스 드래그 전용 인터랙션이라 키보드 핸들러를 두지 않는다.
|
|
450
529
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
451
530
|
index.h("div", { class: "th__resizer th__resizer--left", onMouseDown: (evt) => this.handleResize(actualColIdx, evt, true) }))));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var tooltipArrow = require('./tooltipArrow-
|
|
3
|
+
var index = require('./index-BuaQW9U4.js');
|
|
4
|
+
var tooltipArrow = require('./tooltipArrow-VQq73W83.js');
|
|
5
5
|
|
|
6
6
|
const popover = {
|
|
7
7
|
"default": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BuaQW9U4.js');
|
|
4
4
|
var sdSelect_config = require('./sd-select.config-C9Ohe1QA.js');
|
|
5
5
|
var sanitizeInlineHtml = require('./sanitize-inline-html-CRCAeQ46.js');
|
|
6
6
|
require('./component.listItem-Bnh0r_CA.js');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BuaQW9U4.js');
|
|
4
4
|
var index$1 = require('./index-BUvXpPc3.js');
|
|
5
5
|
var sdSelect_config = require('./sd-select.config-C9Ohe1QA.js');
|
|
6
6
|
var sanitizeInlineHtml = require('./sanitize-inline-html-CRCAeQ46.js');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BuaQW9U4.js');
|
|
4
4
|
var constants = require('./constants-DJRV1upE.js');
|
|
5
5
|
var sdTable_config = require('./sd-table.config-B7MuRLoR.js');
|
|
6
6
|
require('./component.table-DIxmbGBT.js');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BuaQW9U4.js');
|
|
4
4
|
var constants = require('./constants-DJRV1upE.js');
|
|
5
5
|
|
|
6
6
|
const sdTdCss = () => `sd-td *{box-sizing:border-box}sd-td{display:contents}sd-td.align-left{text-align:left}sd-td.align-center{text-align:center}sd-td.align-right{text-align:right}`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BuaQW9U4.js');
|
|
4
4
|
|
|
5
5
|
const TooltipArrow = (props) => (index.h("svg", { width: "16", height: "12", viewBox: "0 0 16 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, index.h("path", { d: "M8.83205 10.7519C8.43623 11.3457 7.56377 11.3457 7.16795 10.7519L1.04907e-06 -1.39876e-06L16 0L8.83205 10.7519Z", fill: "currentColor" })));
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
export const CaretDown = (props) => {
|
|
3
3
|
const { size = 24, ...rest } = props;
|
|
4
|
-
return (h("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest }, h("path", { d: "
|
|
4
|
+
return (h("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest }, h("path", { d: "M19.2188 8.25C19.9555 8.25 20.2813 9.44246 19.7061 10.0342L12.4874 17.46C12.2028 17.7526 11.7974 17.7526 11.5127 17.46L4.294 10.0342C3.71879 9.44247 4.04461 8.25 4.7813 8.25H19.2188Z", fill: "currentColor" })));
|
|
5
5
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
export const CaretLeft = (props) => {
|
|
3
3
|
const { size = 24, ...rest } = props;
|
|
4
|
-
return (h("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest }, h("path", { d: "
|
|
4
|
+
return (h("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest }, h("path", { d: "M14.1423 4.29416C14.7698 3.71888 16.0358 4.04475 16.0358 4.78146V19.219C16.0358 19.9557 14.7698 20.2815 14.1423 19.7063L6.26827 12.4865C5.95813 12.2019 5.95791 11.7975 6.26827 11.5129L14.1423 4.29416Z", fill: "currentColor" })));
|
|
5
5
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
export const CaretRight = (props) => {
|
|
3
3
|
const { size = 24, ...rest } = props;
|
|
4
|
-
return (h("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest }, h("path", { d: "
|
|
4
|
+
return (h("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest }, h("path", { d: "M8.25 4.78127C8.25 4.04456 9.44248 3.71871 10.0342 4.29397L17.46 11.5127C17.7526 11.7973 17.7526 12.2027 17.46 12.4873L10.0342 19.7061C9.44249 20.2814 8.25 19.9555 8.25 19.2188V4.78127Z", fill: "currentColor" })));
|
|
5
5
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
export const CaretUp = (props) => {
|
|
3
3
|
const { size = 24, ...rest } = props;
|
|
4
|
-
return (h("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest }, h("path", { d: "M11.
|
|
4
|
+
return (h("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest }, h("path", { d: "M11.6252 6.44362C11.8583 6.27919 12.1422 6.27906 12.3752 6.44362L12.4865 6.5403L19.7063 13.9651C20.2815 14.5568 19.9557 15.7503 19.219 15.7503H4.78146C4.04475 15.7503 3.71888 14.5568 4.29416 13.9651L11.5129 6.5403L11.6252 6.44362Z", fill: "currentColor" })));
|
|
5
5
|
};
|
|
@@ -12,6 +12,8 @@ export class SdChip {
|
|
|
12
12
|
disabled = false;
|
|
13
13
|
/** 인라인 편집 가능 여부 */
|
|
14
14
|
editable = true;
|
|
15
|
+
/** 닫기 버튼 표시 여부 */
|
|
16
|
+
showRemove = true;
|
|
15
17
|
/** 편집 중 표시할 placeholder */
|
|
16
18
|
placeholder = '';
|
|
17
19
|
/** 유효성 검사 규칙 목록 */
|
|
@@ -232,14 +234,14 @@ export class SdChip {
|
|
|
232
234
|
'--sd-chip-font-weight': typography.fontWeight,
|
|
233
235
|
'--sd-chip-line-height': typography.lineHeight,
|
|
234
236
|
};
|
|
235
|
-
return (h("span", { key: '
|
|
237
|
+
return (h("span", { key: '619cbcb7bac8b8c92c0b12c773d5ee4e34fbe8ea', class: {
|
|
236
238
|
'sd-chip': true,
|
|
237
239
|
[`sd-chip--${state}`]: true,
|
|
238
240
|
'sd-chip--disabled': this.disabled,
|
|
239
241
|
'sd-chip--editable': !this.disabled && this.isEditable,
|
|
240
242
|
}, role: this.disabled || !this.isEditable ? undefined : 'button', tabIndex: this.disabled || this.isEditing || !this.isEditable ? -1 : 0, "aria-disabled": this.disabled ? 'true' : undefined, style: cssVars, onClick: this.handleChipClick, onKeyDown: this.handleChipKeyDown }, this.isEditing ? (h("span", { key: "chip-input", ref: el => (this.inputEl = el), class: "sd-chip__input", role: "textbox", tabindex: this.disabled ? -1 : 0, contentEditable: !this.disabled, "data-placeholder": this.placeholder, spellcheck: false, onInput: this.handleInputChange, onKeyDown: this.handleInputKeyDown, onBlur: this.handleInputBlur, onPaste: this.handlePaste, onClick: event => event.stopPropagation() })) : ([
|
|
241
243
|
h("span", { key: "chip-label", class: "sd-chip__label" }, this.internalValue),
|
|
242
|
-
!this.disabled && (h("sd-ghost-button", { key: "chip-remove", class: "sd-chip__remove", icon: "close", size: "xxs", ariaLabel: "remove", onClick: this.handleRemoveClick })),
|
|
244
|
+
!this.disabled && (this.showRemove ?? true) && (h("sd-ghost-button", { key: "chip-remove", class: "sd-chip__remove", icon: "close", size: "xxs", ariaLabel: "remove", onClick: this.handleRemoveClick })),
|
|
243
245
|
])));
|
|
244
246
|
}
|
|
245
247
|
static get is() { return "sd-chip"; }
|
|
@@ -355,6 +357,26 @@ export class SdChip {
|
|
|
355
357
|
"attribute": "editable",
|
|
356
358
|
"defaultValue": "true"
|
|
357
359
|
},
|
|
360
|
+
"showRemove": {
|
|
361
|
+
"type": "boolean",
|
|
362
|
+
"mutable": false,
|
|
363
|
+
"complexType": {
|
|
364
|
+
"original": "boolean",
|
|
365
|
+
"resolved": "boolean",
|
|
366
|
+
"references": {}
|
|
367
|
+
},
|
|
368
|
+
"required": false,
|
|
369
|
+
"optional": false,
|
|
370
|
+
"docs": {
|
|
371
|
+
"tags": [],
|
|
372
|
+
"text": "\uB2EB\uAE30 \uBC84\uD2BC \uD45C\uC2DC \uC5EC\uBD80"
|
|
373
|
+
},
|
|
374
|
+
"getter": false,
|
|
375
|
+
"setter": false,
|
|
376
|
+
"reflect": false,
|
|
377
|
+
"attribute": "show-remove",
|
|
378
|
+
"defaultValue": "true"
|
|
379
|
+
},
|
|
358
380
|
"placeholder": {
|
|
359
381
|
"type": "string",
|
|
360
382
|
"mutable": false,
|
|
@@ -133,6 +133,11 @@ sd-chip-input .sd-chip-input__suggestion-item--active {
|
|
|
133
133
|
color: var(--sd-chip-input-suggestion-color-hover);
|
|
134
134
|
font-weight: var(--sd-chip-input-suggestion-font-weight-selected);
|
|
135
135
|
}
|
|
136
|
+
sd-chip-input .sd-chip-input__suggestion-item--selected {
|
|
137
|
+
cursor: default;
|
|
138
|
+
overflow: visible;
|
|
139
|
+
text-overflow: unset;
|
|
140
|
+
}
|
|
136
141
|
sd-chip-input .sd-chip-input__suggestions-empty {
|
|
137
142
|
padding: 12px;
|
|
138
143
|
text-align: center;
|
|
@@ -222,7 +222,9 @@ export class SdChipInput {
|
|
|
222
222
|
}
|
|
223
223
|
if (event.key === 'Enter' && this.activeSuggestionIndex >= 0) {
|
|
224
224
|
event.preventDefault();
|
|
225
|
-
|
|
225
|
+
const selectedItem = activeItems[this.activeSuggestionIndex];
|
|
226
|
+
if (!(this.internalValues ?? []).includes(selectedItem))
|
|
227
|
+
this.addChip(selectedItem);
|
|
226
228
|
return;
|
|
227
229
|
}
|
|
228
230
|
}
|
|
@@ -282,6 +284,10 @@ export class SdChipInput {
|
|
|
282
284
|
};
|
|
283
285
|
handleContainerClick = () => {
|
|
284
286
|
if (!this.disabled) {
|
|
287
|
+
// 이미 포커스된 상태에서 재클릭 시 handleFocus가 다시 실행되지 않으므로
|
|
288
|
+
// suppress 플래그를 여기서 직접 해제한다.
|
|
289
|
+
this.suppressRecommendations = false;
|
|
290
|
+
this.suppressSuggestions = false;
|
|
285
291
|
this.inputEl?.focus();
|
|
286
292
|
}
|
|
287
293
|
};
|
|
@@ -426,7 +432,7 @@ export class SdChipInput {
|
|
|
426
432
|
fontFamily: CHIP_INPUT_SUGGESTIONS.itemFontFamily,
|
|
427
433
|
color: CHIP_INPUT_SUGGESTIONS.emptyColor,
|
|
428
434
|
};
|
|
429
|
-
return (h("sd-field", { key: '
|
|
435
|
+
return (h("sd-field", { key: 'b72e33b6f204ebdf6791cc2f20d01bbb74a4203a', name: this.name, label: this.label, labelWidth: this.labelWidth, hint: this.hint, errorMessage: this.errorMessage, rules: [this.duplicateRule, ...(this.rules ?? [])], error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, size: this.size, width: this.width, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), style: cssVars, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, h("div", { key: '499114d06f4d375fed5575edd394c501f4d72691', class: "sd-chip-input", ref: el => (this.chipInputRef = el), onClick: this.handleContainerClick }, (this.internalValues ?? []).map((value, i) => (h("sd-chip", { key: i, value: value, error: this.getChipError(i), disabled: this.getChipDisabled(i), editable: false, onSdRemove: () => this.handleChipRemove(i) }))), !isMaxReached && (h("div", { key: '5910a2d0e0e9cbc472baa1d9c9c3fa07e89fbdcb', class: {
|
|
430
436
|
'sd-chip-input__field': true,
|
|
431
437
|
'sd-chip-input__field--filled': this.inputValue !== '',
|
|
432
438
|
'sd-chip-input__field--empty': this.inputValue === '' && this.internalValues.length > 0 && !this.focused,
|
|
@@ -434,20 +440,56 @@ export class SdChipInput {
|
|
|
434
440
|
? this.inputValue
|
|
435
441
|
: this.internalValues.length === 0
|
|
436
442
|
? this.placeholder
|
|
437
|
-
: '' }, h("input", { key: '
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
443
|
+
: '' }, h("input", { key: '3c1e75d691332b67a500a2d17030d5db191bdeb9', ref: el => (this.inputEl = el), class: "sd-chip-input__input", placeholder: this.internalValues.length === 0 ? this.placeholder : '', disabled: this.disabled, size: 1, onInput: this.handleInput, onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur }))), showResetArea && (
|
|
444
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
445
|
+
h("div", { key: '4aa212280a928b88b85dffa3d453ea8f563e1fe0', class: "sd-chip-input__reset",
|
|
446
|
+
// 리셋 버튼 클릭 시 input blur → portal unmount → refocus → 새 portal mount로
|
|
447
|
+
// 두 wrapper가 body에 잠깐 겹치는 타이밍 이슈를 방지한다.
|
|
448
|
+
onMouseDown: e => e.preventDefault() }, this.inputValue === '' && h("span", { key: 'f7faa45b57d8e38dda8cc98119357f92d914fee4', class: "sd-chip-input__divider" }), this.maxCount != null && (h("span", { key: 'dfde4ea82558414614fb2d817f7bfa1fb5d4bf5f', class: "sd-chip-input__max-count" }, "\uCD5C\uB300 ", this.maxCount, "\uAC1C")), this.useReset && this.internalValues.length > 0 && (h("sd-text-link", { key: '9b43c82c1a5d425e5b187e92b4259e7d919491e3', icon: "reset", iconColor: CHIP_INPUT_RESET.iconColor, label: "\uC785\uB825 \uCD08\uAE30\uD654", underline: true, disabled: this.disabled, style: { '--sd-text-link-color': CHIP_INPUT_RESET.labelColor }, onSdClick: this.handleResetInput })))), showDropdown && (h("sd-portal", { key: 'aa205aacbbafcd8c3d9855268637e6da956d4a74', open: showDropdown, parentRef: this.chipInputRef ?? null, viewportPadding: SdChipInput.SUGGESTIONS_VIEWPORT_PADDING, onSdClose: this.closeSuggestions }, h("div", { key: '26814734f202da3a13e695ae1d0c913ea430b888', class: "sd-chip-input__suggestions", role: "listbox", style: suggestionBoxStyle }, isDropdownLoading && (h("div", { key: 'df80d11b79f67dc6cfe6503b258528efa3752265', class: "sd-chip-input__suggestions-empty", style: suggestionEmptyStyle }, "\uBD88\uB7EC\uC624\uB294 \uC911...")), showRecommendations ? (h("div", { style: {
|
|
449
|
+
display: 'flex',
|
|
450
|
+
flexWrap: 'wrap',
|
|
451
|
+
gap: '8px',
|
|
452
|
+
padding: '12px',
|
|
453
|
+
} }, recommendedItems.map((item, i) => {
|
|
454
|
+
const isSelected = (this.internalValues ?? []).includes(item);
|
|
455
|
+
const isActive = i === this.activeSuggestionIndex && !isSelected;
|
|
456
|
+
return (h("div", { key: item, role: "option", tabIndex: -1, "aria-selected": isSelected || isActive, "aria-disabled": isSelected ? 'true' : undefined, style: {
|
|
457
|
+
cursor: isSelected ? 'default' : 'pointer',
|
|
458
|
+
borderRadius: '999px',
|
|
459
|
+
outline: isActive ? '2px solid #0075FF' : undefined,
|
|
460
|
+
outlineOffset: '1px',
|
|
461
|
+
}, onMouseDown: e => {
|
|
462
|
+
e.preventDefault();
|
|
463
|
+
if (!isSelected)
|
|
464
|
+
this.addChip(item);
|
|
465
|
+
} }, h("sd-chip", { value: item, disabled: isSelected, editable: false, showRemove: false })));
|
|
466
|
+
}))) : (dropdownItems.map((item, i) => {
|
|
467
|
+
const isSelected = (this.internalValues ?? []).includes(item);
|
|
468
|
+
const isActive = i === this.activeSuggestionIndex && !isSelected;
|
|
469
|
+
return (h("div", { key: item, class: {
|
|
470
|
+
'sd-chip-input__suggestion-item': true,
|
|
471
|
+
'sd-chip-input__suggestion-item--active': isActive,
|
|
472
|
+
'sd-chip-input__suggestion-item--selected': isSelected,
|
|
473
|
+
}, role: "option", tabIndex: -1, "aria-selected": isSelected || isActive, "aria-disabled": isSelected ? 'true' : undefined, style: isSelected
|
|
474
|
+
? {
|
|
475
|
+
...suggestionItemStyle,
|
|
476
|
+
color: '#0075FF',
|
|
477
|
+
fontWeight: CHIP_INPUT_SUGGESTIONS.itemFontWeightSelected,
|
|
478
|
+
cursor: 'default',
|
|
479
|
+
}
|
|
480
|
+
: isActive
|
|
481
|
+
? {
|
|
482
|
+
...suggestionItemStyle,
|
|
483
|
+
background: CHIP_INPUT_SUGGESTIONS.itemBgHover,
|
|
484
|
+
color: CHIP_INPUT_SUGGESTIONS.itemColorHover,
|
|
485
|
+
fontWeight: CHIP_INPUT_SUGGESTIONS.itemFontWeightSelected,
|
|
486
|
+
}
|
|
487
|
+
: suggestionItemStyle, onMouseDown: e => {
|
|
488
|
+
e.preventDefault();
|
|
489
|
+
if (!isSelected)
|
|
490
|
+
this.addChip(item);
|
|
491
|
+
} }, h("span", { style: { flex: '1' } }, item), isSelected && (h("sd-icon", { name: "check", size: "12", style: { color: '#0075FF', flexShrink: '0' } }))));
|
|
492
|
+
}))))))));
|
|
451
493
|
}
|
|
452
494
|
static get is() { return "sd-chip-input"; }
|
|
453
495
|
static get originalStyleUrls() {
|