@sellmate/design-system 1.0.37 → 1.0.39
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 +1 -1
- package/dist/cjs/index.cjs.js +124 -19
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sd-badge.cjs.entry.js +1 -1
- package/dist/cjs/{sd-button-v2.cjs.entry.js → sd-button-v2_2.cjs.entry.js} +184 -2
- package/dist/cjs/{sd-button_21.cjs.entry.js → sd-button_20.cjs.entry.js} +154 -89
- package/dist/cjs/sd-card.cjs.entry.js +1 -1
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +199 -0
- package/dist/cjs/sd-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +7 -18
- package/dist/cjs/sd-file-picker.cjs.entry.js +3 -3
- package/dist/cjs/sd-guide.cjs.entry.js +2 -2
- package/dist/cjs/sd-modal-container.cjs.entry.js +263 -0
- package/dist/cjs/sd-popover.cjs.entry.js +2 -2
- package/dist/cjs/sd-progress.cjs.entry.js +2 -2
- package/dist/cjs/sd-radio-button-group.cjs.entry.js +1 -1
- package/dist/cjs/sd-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-group.cjs.entry.js +2 -2
- package/dist/cjs/sd-select-multiple-group.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-multiple.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-option-group.cjs.entry.js +3 -3
- package/dist/cjs/sd-select-v2-list-item_2.cjs.entry.js +6 -6
- package/dist/cjs/sd-select-v2-listbox_2.cjs.entry.js +5 -10
- package/dist/cjs/sd-select-v2.cjs.entry.js +20 -8
- package/dist/cjs/{sd-select-v2.config-DedHbMz4.js → sd-select-v2.config-DZrPJ6OS.js} +0 -14
- package/dist/cjs/sd-tabs.cjs.entry.js +1 -1
- package/dist/cjs/sd-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/sd-toast.cjs.entry.js +2 -2
- package/dist/cjs/sd-toggle-button.cjs.entry.js +1 -1
- package/dist/cjs/sd-toggle.cjs.entry.js +1 -1
- package/dist/cjs/system-lN7yOMPF.js +20 -0
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/sd-badge/sd-badge.js +1 -1
- package/dist/collection/components/sd-button-v2/sd-button-v2.js +2 -2
- package/dist/collection/components/sd-card/sd-card.js +1 -1
- package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.config.js +17 -0
- package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.css +67 -0
- package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +385 -0
- package/dist/collection/components/sd-date-picker/sd-date-picker.js +1 -1
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.js +4 -4
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.js +3 -3
- package/dist/collection/components/sd-field/sd-field.css +12 -15
- package/dist/collection/components/sd-field/sd-field.js +26 -13
- package/dist/collection/components/sd-file-picker/sd-file-picker.js +3 -3
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
- package/dist/collection/components/sd-guide/sd-guide.js +2 -2
- package/dist/collection/components/sd-icon/sd-icon.js +1 -1
- package/dist/collection/components/sd-input/sd-input.config.js +34 -0
- package/dist/collection/components/sd-input/sd-input.css +16 -6
- package/dist/collection/components/sd-input/sd-input.js +61 -36
- package/dist/collection/components/sd-loading-spinner/sd-loading-spinner.js +1 -1
- package/dist/collection/components/sd-modal-container/sd-modal-container.config.js +1 -0
- package/dist/collection/components/sd-modal-container/sd-modal-container.css +58 -0
- package/dist/collection/components/sd-modal-container/sd-modal-container.js +399 -0
- package/dist/collection/components/sd-notice-modal/sd-notice-modal.config.js +3 -0
- package/dist/collection/components/sd-notice-modal/sd-notice-modal.css +61 -0
- package/dist/collection/components/sd-notice-modal/sd-notice-modal.js +324 -0
- package/dist/collection/components/sd-number-input/sd-number-input.js +11 -11
- package/dist/collection/components/sd-pagination/sd-pagination.js +2 -2
- package/dist/collection/components/sd-popover/sd-popover.js +2 -2
- package/dist/collection/components/sd-portal/sd-portal.js +1 -1
- package/dist/collection/components/sd-progress/sd-progress.js +2 -2
- package/dist/collection/components/sd-radio/sd-radio.js +1 -1
- package/dist/collection/components/sd-radio-button-group/sd-radio-button-group.js +1 -1
- package/dist/collection/components/sd-radio-group/sd-radio-group.js +1 -1
- package/dist/collection/components/sd-select/sd-select-dropdown/sd-select-dropdown.js +2 -2
- package/dist/collection/components/sd-select/sd-select-option/sd-select-option.js +1 -1
- package/dist/collection/components/sd-select/sd-select-search-input/sd-select-search-input.js +3 -3
- package/dist/collection/components/sd-select/sd-select.js +8 -8
- package/dist/collection/components/sd-select-group/sd-select-group.js +8 -8
- package/dist/collection/components/sd-select-multiple/sd-select-multiple.js +1 -1
- package/dist/collection/components/sd-select-multiple-group/sd-select-multiple-group.js +1 -1
- package/dist/collection/components/sd-select-multiple-group/sd-select-option-group/sd-select-option-group.js +3 -3
- package/dist/collection/components/sd-select-v2/sd-select-v2-list-item/sd-select-v2-list-item.js +2 -2
- package/dist/collection/components/sd-select-v2/sd-select-v2-list-item-search/sd-select-v2-list-item-search.js +3 -3
- package/dist/collection/components/sd-select-v2/sd-select-v2-listbox/sd-select-v2-listbox.js +1 -1
- package/dist/collection/components/sd-select-v2/sd-select-v2-trigger/sd-select-v2-trigger.css +0 -12
- package/dist/collection/components/sd-select-v2/sd-select-v2-trigger/sd-select-v2-trigger.js +2 -27
- package/dist/collection/components/sd-select-v2/sd-select-v2.config.js +0 -8
- package/dist/collection/components/sd-select-v2/sd-select-v2.js +42 -16
- package/dist/collection/components/sd-table/sd-table.js +4 -4
- package/dist/collection/components/sd-tabs/sd-tabs.js +1 -1
- package/dist/collection/components/sd-tag/sd-tag.js +2 -2
- package/dist/collection/components/sd-textarea/sd-textarea.js +2 -2
- package/dist/collection/components/sd-toast/sd-toast.js +2 -2
- package/dist/collection/components/sd-toast-container/sd-toast-container.js +1 -1
- package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
- package/dist/collection/components/sd-toggle-button/sd-toggle-button.js +1 -1
- package/dist/collection/components/sd-tooltip/sd-tooltip.js +2 -2
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/modal.js +103 -0
- package/dist/components/index.js +1 -1
- package/dist/components/{p-dBp4oI6E.js → p-0gO8WB9o.js} +1 -1
- package/dist/components/p-5UN9Ry8A.js +1 -0
- package/dist/components/{p-DkjKNMgx.js → p-9EyS2_Bp.js} +1 -1
- package/dist/components/p-BH_WRHMs.js +1 -0
- package/dist/components/{p-CtOFXnU0.js → p-BL0JF-Wh.js} +1 -1
- package/dist/components/{p-CyfWQr0q.js → p-BMpVqedy.js} +1 -1
- package/dist/components/{p-CdOU_SOg.js → p-BdjLD8BG.js} +1 -1
- package/dist/components/{p-DOt_ptQc.js → p-C7G_tiJw.js} +1 -1
- package/dist/components/p-CBmWor54.js +1 -0
- package/dist/components/p-CCGsaeed.js +1 -0
- package/dist/components/{p-eM9OCX16.js → p-CGU_sdK0.js} +1 -1
- package/dist/components/p-CIwsurLw.js +1 -0
- package/dist/components/p-CS6ohqwt.js +1 -0
- package/dist/components/p-C_L-UaCP.js +1 -0
- package/dist/components/{p-BBpn_mYj.js → p-Cefcggep.js} +1 -1
- package/dist/components/{p-gnF0_mDJ.js → p-Cm4BQbyn.js} +1 -1
- package/dist/components/{p-zUWRVubn.js → p-CnGJ-zsX.js} +1 -1
- package/dist/components/{p-BvBroZuS.js → p-CsS4T0El.js} +1 -1
- package/dist/components/{p-CxT7-293.js → p-DBCQtIY4.js} +1 -1
- package/dist/components/{p-yQoaU7-d.js → p-DEBuE-pW.js} +1 -1
- package/dist/components/{p-CiHU8TZa.js → p-DEP3qjY2.js} +1 -1
- package/dist/components/{p-Cva7D7mF.js → p-DS5oSTUS.js} +1 -1
- package/dist/components/{p-DKcKp__V.js → p-Dzg317Va.js} +1 -1
- package/dist/components/p-Trj68Yo5.js +1 -0
- package/dist/components/p-_Zc2887O.js +1 -0
- package/dist/components/{p-CgwiT7OF.js → p-cWdYmHLY.js} +1 -1
- package/dist/components/{p-CXoqcDFa.js → p-dvfewOFM.js} +1 -1
- package/dist/components/{p-D8OiOEB8.js → p-l5p-E_Gh.js} +1 -1
- package/dist/components/p-nLkkdmKA.js +1 -0
- package/dist/components/{p-41grr69M.js → p-vMfU_F7J.js} +1 -1
- package/dist/components/sd-badge.js +1 -1
- package/dist/components/sd-button-v2.js +1 -1
- package/dist/components/sd-button.js +1 -1
- package/dist/components/sd-calendar.js +1 -1
- package/dist/components/sd-card.js +1 -1
- package/dist/components/sd-checkbox.js +1 -1
- package/dist/components/sd-confirm-modal.d.ts +11 -0
- package/dist/components/sd-confirm-modal.js +1 -0
- package/dist/components/sd-date-picker.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-guide.js +1 -1
- package/dist/components/sd-icon.js +1 -1
- package/dist/components/sd-input.js +1 -1
- package/dist/components/sd-loading-spinner.js +1 -1
- package/dist/components/sd-modal-container.d.ts +11 -0
- package/dist/components/sd-modal-container.js +1 -0
- package/dist/components/{sd-modal-card.d.ts → sd-notice-modal.d.ts} +4 -4
- package/dist/components/sd-notice-modal.js +1 -0
- package/dist/components/sd-number-input.js +1 -1
- package/dist/components/sd-pagination.js +1 -1
- package/dist/components/sd-popover.js +1 -1
- package/dist/components/sd-portal.js +1 -1
- package/dist/components/sd-progress.js +1 -1
- package/dist/components/sd-radio-button-group.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-dropdown.js +1 -1
- package/dist/components/sd-select-group.js +1 -1
- package/dist/components/sd-select-multiple-group.js +1 -1
- package/dist/components/sd-select-multiple.js +1 -1
- package/dist/components/sd-select-option-group.js +1 -1
- package/dist/components/sd-select-option.js +1 -1
- package/dist/components/sd-select-search-input.js +1 -1
- package/dist/components/sd-select-v2-list-item-search.js +1 -1
- package/dist/components/sd-select-v2-list-item.js +1 -1
- package/dist/components/sd-select-v2-listbox.js +1 -1
- package/dist/components/sd-select-v2-trigger.js +1 -1
- package/dist/components/sd-select-v2.js +1 -1
- package/dist/components/sd-select.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-textarea.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-button.js +1 -1
- package/dist/components/sd-toggle.js +1 -1
- package/dist/components/sd-tooltip.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-a35adbbc.entry.js → p-021e4171.entry.js} +1 -1
- package/dist/design-system/{p-d817c235.entry.js → p-0cca5deb.entry.js} +1 -1
- package/dist/design-system/{p-97bfc75f.entry.js → p-0fdca641.entry.js} +1 -1
- package/dist/design-system/{p-270227ae.entry.js → p-10945e57.entry.js} +1 -1
- package/dist/design-system/{p-5b2d9ef2.entry.js → p-12f04366.entry.js} +1 -1
- package/dist/design-system/{p-2119dddc.entry.js → p-13d4baf3.entry.js} +1 -1
- package/dist/design-system/p-1e975178.entry.js +1 -0
- package/dist/design-system/{p-e4a19588.entry.js → p-2408d1ab.entry.js} +1 -1
- package/dist/design-system/p-342f48ab.entry.js +1 -0
- package/dist/design-system/p-36ba5f33.entry.js +1 -0
- package/dist/design-system/{p-c4f9aeed.entry.js → p-37e9e161.entry.js} +1 -1
- package/dist/design-system/{p-a88dabbd.entry.js → p-4731457c.entry.js} +1 -1
- package/dist/design-system/{p-1d7ea568.entry.js → p-63f997d7.entry.js} +1 -1
- package/dist/design-system/{p-b3473468.entry.js → p-6d9e16bd.entry.js} +1 -1
- package/dist/design-system/p-9c6fea35.entry.js +1 -0
- package/dist/design-system/p-9d431ea6.entry.js +1 -0
- package/dist/design-system/p-BOmBg3kj.js +1 -0
- package/dist/design-system/{p-CdOU_SOg.js → p-BdjLD8BG.js} +1 -1
- package/dist/design-system/p-CS6ohqwt.js +1 -0
- package/dist/design-system/{p-0c2e44fb.entry.js → p-a4e87345.entry.js} +1 -1
- package/dist/design-system/{p-594dee9b.entry.js → p-acb529cb.entry.js} +1 -1
- package/dist/design-system/{p-a94ed4a3.entry.js → p-b71d0858.entry.js} +1 -1
- package/dist/design-system/p-ba393cc8.entry.js +1 -0
- package/dist/design-system/p-d8b04e91.entry.js +1 -0
- package/dist/design-system/{p-01a7b38b.entry.js → p-e0ef7658.entry.js} +1 -1
- package/dist/design-system/p-e96c881f.entry.js +1 -0
- package/dist/design-system/p-f186c0f4.entry.js +1 -0
- package/dist/design-system/p-f87b6a45.entry.js +1 -0
- package/dist/design-system/p-f9075737.entry.js +1 -0
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/index.js +124 -20
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sd-badge.entry.js +1 -1
- package/dist/esm/{sd-button-v2.config-CRtF2Br0.js → sd-button-v2.config-Dtf44MOf.js} +1 -1
- package/dist/esm/{sd-button-v2.entry.js → sd-button-v2_2.entry.js} +185 -4
- package/dist/esm/{sd-button_21.entry.js → sd-button_20.entry.js} +155 -89
- package/dist/esm/sd-card.entry.js +1 -1
- package/dist/esm/sd-confirm-modal_2.entry.js +196 -0
- package/dist/esm/sd-date-picker.entry.js +1 -1
- package/dist/esm/sd-dropdown-button.entry.js +5 -16
- package/dist/esm/sd-file-picker.entry.js +3 -3
- package/dist/esm/sd-guide.entry.js +2 -2
- package/dist/esm/sd-modal-container.entry.js +261 -0
- package/dist/esm/sd-popover.entry.js +2 -2
- package/dist/esm/sd-progress.entry.js +2 -2
- package/dist/esm/sd-radio-button-group.entry.js +1 -1
- package/dist/esm/sd-radio-group.entry.js +1 -1
- package/dist/esm/sd-select-group.entry.js +2 -2
- package/dist/esm/sd-select-multiple-group.entry.js +1 -1
- package/dist/esm/sd-select-multiple.entry.js +1 -1
- package/dist/esm/sd-select-option-group.entry.js +3 -3
- package/dist/esm/sd-select-v2-list-item_2.entry.js +6 -6
- package/dist/esm/sd-select-v2-listbox_2.entry.js +5 -10
- package/dist/esm/{sd-select-v2.config-BXY0UBNx.js → sd-select-v2.config-BOmBg3kj.js} +0 -14
- package/dist/esm/sd-select-v2.entry.js +20 -8
- package/dist/esm/sd-tabs.entry.js +1 -1
- package/dist/esm/sd-toast-container.entry.js +1 -1
- package/dist/esm/sd-toast.entry.js +2 -2
- package/dist/esm/sd-toggle-button.entry.js +1 -1
- package/dist/esm/sd-toggle.entry.js +1 -1
- package/dist/esm/system-CS6ohqwt.js +18 -0
- package/dist/types/components/sd-confirm-modal/sd-confirm-modal.config.d.ts +14 -0
- package/dist/types/components/sd-confirm-modal/sd-confirm-modal.d.ts +31 -0
- package/dist/types/components/sd-field/sd-field.d.ts +1 -1
- package/dist/types/components/sd-input/sd-input.config.d.ts +38 -0
- package/dist/types/components/sd-input/sd-input.d.ts +4 -3
- package/dist/types/components/sd-modal-container/sd-modal-container.config.d.ts +45 -0
- package/dist/types/components/sd-modal-container/sd-modal-container.d.ts +27 -0
- package/dist/types/components/sd-notice-modal/sd-notice-modal.config.d.ts +5 -0
- package/dist/types/components/sd-notice-modal/sd-notice-modal.d.ts +28 -0
- package/dist/types/components/sd-number-input/sd-number-input.d.ts +1 -1
- package/dist/types/components/sd-select/sd-select.d.ts +1 -1
- package/dist/types/components/sd-select-group/sd-select-group.d.ts +1 -1
- package/dist/types/components/sd-select-v2/sd-select-v2-trigger/sd-select-v2-trigger.d.ts +0 -1
- package/dist/types/components/sd-select-v2/sd-select-v2.config.d.ts +0 -8
- package/dist/types/components/sd-select-v2/sd-select-v2.d.ts +3 -2
- package/dist/types/components.d.ts +288 -123
- package/dist/types/index.d.ts +2 -0
- package/dist/types/utils/modal.d.ts +12 -0
- package/hydrate/index.js +720 -164
- package/hydrate/index.mjs +720 -164
- package/package.json +1 -1
- package/dist/cjs/sd-tag.cjs.entry.js +0 -186
- package/dist/collection/components/sd-modal-card/sd-modal-card.css +0 -51
- package/dist/collection/components/sd-modal-card/sd-modal-card.js +0 -254
- package/dist/components/p-72hNB1Fw.js +0 -1
- package/dist/components/p-C6uWXKpX.js +0 -1
- package/dist/components/p-CC6lx8di.js +0 -1
- package/dist/components/p-CpfPgt7c.js +0 -1
- package/dist/components/p-d1GtjL2y.js +0 -1
- package/dist/components/sd-modal-card.js +0 -1
- package/dist/design-system/p-2185ffaa.entry.js +0 -1
- package/dist/design-system/p-35473290.entry.js +0 -1
- package/dist/design-system/p-4810e846.entry.js +0 -1
- package/dist/design-system/p-62581abe.entry.js +0 -1
- package/dist/design-system/p-687f8414.entry.js +0 -1
- package/dist/design-system/p-89578577.entry.js +0 -1
- package/dist/design-system/p-93c2d29f.entry.js +0 -1
- package/dist/design-system/p-BXY0UBNx.js +0 -1
- package/dist/design-system/p-e7654632.entry.js +0 -1
- package/dist/design-system/p-ebee1495.entry.js +0 -1
- package/dist/design-system/p-fea7dbce.entry.js +0 -1
- package/dist/esm/sd-tag.entry.js +0 -184
- package/dist/types/components/sd-modal-card/sd-modal-card.d.ts +0 -25
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { CONFIRM_MODAL_ICON_MAP, CONFIRM_MODAL_ICON_COLOR, CONFIRM_MODAL_DEFAULT_BUTTON, TITLE_ICON_SIZE, CLOSE_ICON_SIZE, CLOSE_ICON_COLOR, SUB_BUTTON_PRESET, } from "./sd-confirm-modal.config";
|
|
3
|
+
export class SdConfirmModal {
|
|
4
|
+
el;
|
|
5
|
+
hasSlottedContent = false;
|
|
6
|
+
customContentRef;
|
|
7
|
+
slotObserver;
|
|
8
|
+
type = 'positive';
|
|
9
|
+
modalTitle = '';
|
|
10
|
+
titleClass = '';
|
|
11
|
+
topMessage = [];
|
|
12
|
+
bottomMessage = [];
|
|
13
|
+
mainButtonName;
|
|
14
|
+
mainButtonLabel = '확인';
|
|
15
|
+
subButtonLabel = '';
|
|
16
|
+
tagPreset = 'square_sm_grey';
|
|
17
|
+
tagLabel = '';
|
|
18
|
+
slotLabel = '';
|
|
19
|
+
tagContents;
|
|
20
|
+
close;
|
|
21
|
+
confirm;
|
|
22
|
+
componentWillLoad() {
|
|
23
|
+
this.syncHasSlottedContent();
|
|
24
|
+
}
|
|
25
|
+
componentDidLoad() {
|
|
26
|
+
if (typeof MutationObserver === 'undefined')
|
|
27
|
+
return;
|
|
28
|
+
this.slotObserver = new MutationObserver(() => this.syncHasSlottedContent());
|
|
29
|
+
this.slotObserver.observe(this.el, {
|
|
30
|
+
childList: true,
|
|
31
|
+
characterData: true,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
componentDidRender() {
|
|
35
|
+
if (this.customContentRef && this.tagContents instanceof HTMLElement) {
|
|
36
|
+
if (typeof this.customContentRef.replaceChildren === 'function') {
|
|
37
|
+
this.customContentRef.replaceChildren(this.tagContents);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
this.customContentRef.innerHTML = '';
|
|
41
|
+
this.customContentRef.appendChild(this.tagContents);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
disconnectedCallback() {
|
|
46
|
+
this.slotObserver?.disconnect();
|
|
47
|
+
}
|
|
48
|
+
get resolvedMainButton() {
|
|
49
|
+
return this.mainButtonName ?? CONFIRM_MODAL_DEFAULT_BUTTON[this.type];
|
|
50
|
+
}
|
|
51
|
+
get hasTagContent() {
|
|
52
|
+
return !!(this.tagLabel || this.slotLabel);
|
|
53
|
+
}
|
|
54
|
+
get showContentBox() {
|
|
55
|
+
return !!this.tagContents || this.hasTagContent || this.hasSlottedContent;
|
|
56
|
+
}
|
|
57
|
+
syncHasSlottedContent() {
|
|
58
|
+
const hasSlottedContent = Array.from(this.el.childNodes).some(node => !(node.nodeType === Node.ELEMENT_NODE &&
|
|
59
|
+
node.classList.contains('sd-confirm-modal')) &&
|
|
60
|
+
(node.nodeType === Node.ELEMENT_NODE ||
|
|
61
|
+
(node.nodeType === Node.TEXT_NODE && node.textContent?.trim())));
|
|
62
|
+
if (hasSlottedContent !== this.hasSlottedContent) {
|
|
63
|
+
this.hasSlottedContent = hasSlottedContent;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
render() {
|
|
67
|
+
const iconName = CONFIRM_MODAL_ICON_MAP[this.type];
|
|
68
|
+
const iconColor = CONFIRM_MODAL_ICON_COLOR[this.type];
|
|
69
|
+
return (h("div", { key: '6fc7e6c41e74e44c1eb6228375a8230ffa46dab5', class: "sd-confirm-modal" }, h("sd-icon", { key: '79e901efb1b32fdd8d7be3bd8f33eb2d606cd25c', class: "sd-confirm-modal__close-button", name: "close", size: CLOSE_ICON_SIZE, color: CLOSE_ICON_COLOR, onClick: () => this.close.emit() }), h("sd-icon", { key: '8d80711f1ddea567a388b0ad7c76608f0d794fde', class: "sd-confirm-modal__icon", name: iconName, size: TITLE_ICON_SIZE, color: iconColor }), h("h2", { key: '47dcfe8774e2d14d4edc8d1c23fff413146119e6', class: `sd-confirm-modal__title ${this.titleClass}` }, this.modalTitle), h("div", { key: 'fb18833bd9f5cb858f2f5b05b7b45d5e0f3cdb72', class: "sd-confirm-modal__body" }, (this.topMessage ?? []).length > 0 && (h("div", { key: '9d158176578cb4374fe1ca37b62b4d61e81df6a1', class: "sd-confirm-modal__message" }, (this.topMessage ?? []).map(msg => (h("p", { class: "sd-confirm-modal__message-text", innerHTML: msg }))))), this.showContentBox && (h("div", { key: '4f781266ecdd43ac51195e1ee473d67d2bcff681', class: "sd-confirm-modal__content-box" }, this.tagContents ? (h("div", { class: "sd-confirm-modal__custom-content", ref: el => {
|
|
70
|
+
this.customContentRef = el;
|
|
71
|
+
} })) : (h("slot", { onSlotchange: () => this.syncHasSlottedContent() }, this.tagLabel && h("sd-tag", { name: this.tagPreset, label: this.tagLabel }), this.slotLabel && (h("span", { class: "sd-confirm-modal__slot-label" }, this.slotLabel)))))), (this.bottomMessage ?? []).length > 0 && (h("div", { key: '04baced447a0cf11406df52b734f73ea39ff00d2', class: "sd-confirm-modal__message" }, (this.bottomMessage ?? []).map(msg => (h("p", { class: "sd-confirm-modal__message-text", innerHTML: msg })))))), h("div", { key: '7054a3388d93610b21152c4c3df34445b7b64cdd', class: "sd-confirm-modal__button" }, this.subButtonLabel && (h("sd-button-v2", { key: '25fdec9094700beaf4d6fa0dee15920d6c3c294a', name: SUB_BUTTON_PRESET, label: this.subButtonLabel, onSdClick: () => this.close.emit() })), h("sd-button-v2", { key: '7611e5b0a187b1588026308220b09e3239f59463', name: this.resolvedMainButton, label: this.mainButtonLabel, onSdClick: () => this.confirm.emit() }))));
|
|
72
|
+
}
|
|
73
|
+
static get is() { return "sd-confirm-modal"; }
|
|
74
|
+
static get originalStyleUrls() {
|
|
75
|
+
return {
|
|
76
|
+
"$": ["sd-confirm-modal.scss"]
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
static get styleUrls() {
|
|
80
|
+
return {
|
|
81
|
+
"$": ["sd-confirm-modal.css"]
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
static get properties() {
|
|
85
|
+
return {
|
|
86
|
+
"type": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"mutable": false,
|
|
89
|
+
"complexType": {
|
|
90
|
+
"original": "ConfirmModalType",
|
|
91
|
+
"resolved": "\"negative\" | \"positive\"",
|
|
92
|
+
"references": {
|
|
93
|
+
"ConfirmModalType": {
|
|
94
|
+
"location": "import",
|
|
95
|
+
"path": "./sd-confirm-modal.config",
|
|
96
|
+
"id": "src/components/sd-confirm-modal/sd-confirm-modal.config.ts::ConfirmModalType",
|
|
97
|
+
"referenceLocation": "ConfirmModalType"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"required": false,
|
|
102
|
+
"optional": false,
|
|
103
|
+
"docs": {
|
|
104
|
+
"tags": [],
|
|
105
|
+
"text": ""
|
|
106
|
+
},
|
|
107
|
+
"getter": false,
|
|
108
|
+
"setter": false,
|
|
109
|
+
"reflect": false,
|
|
110
|
+
"attribute": "type",
|
|
111
|
+
"defaultValue": "'positive'"
|
|
112
|
+
},
|
|
113
|
+
"modalTitle": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"mutable": false,
|
|
116
|
+
"complexType": {
|
|
117
|
+
"original": "string",
|
|
118
|
+
"resolved": "string",
|
|
119
|
+
"references": {}
|
|
120
|
+
},
|
|
121
|
+
"required": false,
|
|
122
|
+
"optional": false,
|
|
123
|
+
"docs": {
|
|
124
|
+
"tags": [],
|
|
125
|
+
"text": ""
|
|
126
|
+
},
|
|
127
|
+
"getter": false,
|
|
128
|
+
"setter": false,
|
|
129
|
+
"reflect": false,
|
|
130
|
+
"attribute": "modal-title",
|
|
131
|
+
"defaultValue": "''"
|
|
132
|
+
},
|
|
133
|
+
"titleClass": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"mutable": false,
|
|
136
|
+
"complexType": {
|
|
137
|
+
"original": "string",
|
|
138
|
+
"resolved": "string",
|
|
139
|
+
"references": {}
|
|
140
|
+
},
|
|
141
|
+
"required": false,
|
|
142
|
+
"optional": false,
|
|
143
|
+
"docs": {
|
|
144
|
+
"tags": [],
|
|
145
|
+
"text": ""
|
|
146
|
+
},
|
|
147
|
+
"getter": false,
|
|
148
|
+
"setter": false,
|
|
149
|
+
"reflect": false,
|
|
150
|
+
"attribute": "title-class",
|
|
151
|
+
"defaultValue": "''"
|
|
152
|
+
},
|
|
153
|
+
"topMessage": {
|
|
154
|
+
"type": "unknown",
|
|
155
|
+
"mutable": false,
|
|
156
|
+
"complexType": {
|
|
157
|
+
"original": "string[]",
|
|
158
|
+
"resolved": "string[]",
|
|
159
|
+
"references": {}
|
|
160
|
+
},
|
|
161
|
+
"required": false,
|
|
162
|
+
"optional": false,
|
|
163
|
+
"docs": {
|
|
164
|
+
"tags": [],
|
|
165
|
+
"text": ""
|
|
166
|
+
},
|
|
167
|
+
"getter": false,
|
|
168
|
+
"setter": false,
|
|
169
|
+
"defaultValue": "[]"
|
|
170
|
+
},
|
|
171
|
+
"bottomMessage": {
|
|
172
|
+
"type": "unknown",
|
|
173
|
+
"mutable": false,
|
|
174
|
+
"complexType": {
|
|
175
|
+
"original": "string[]",
|
|
176
|
+
"resolved": "string[]",
|
|
177
|
+
"references": {}
|
|
178
|
+
},
|
|
179
|
+
"required": false,
|
|
180
|
+
"optional": false,
|
|
181
|
+
"docs": {
|
|
182
|
+
"tags": [],
|
|
183
|
+
"text": ""
|
|
184
|
+
},
|
|
185
|
+
"getter": false,
|
|
186
|
+
"setter": false,
|
|
187
|
+
"defaultValue": "[]"
|
|
188
|
+
},
|
|
189
|
+
"mainButtonName": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"mutable": false,
|
|
192
|
+
"complexType": {
|
|
193
|
+
"original": "ConfirmModalMainButton",
|
|
194
|
+
"resolved": "\"danger_md\" | \"danger_outline_md\" | \"primary_md\" | \"primary_outline_md\" | undefined",
|
|
195
|
+
"references": {
|
|
196
|
+
"ConfirmModalMainButton": {
|
|
197
|
+
"location": "import",
|
|
198
|
+
"path": "./sd-confirm-modal.config",
|
|
199
|
+
"id": "src/components/sd-confirm-modal/sd-confirm-modal.config.ts::ConfirmModalMainButton",
|
|
200
|
+
"referenceLocation": "ConfirmModalMainButton"
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"required": false,
|
|
205
|
+
"optional": true,
|
|
206
|
+
"docs": {
|
|
207
|
+
"tags": [],
|
|
208
|
+
"text": ""
|
|
209
|
+
},
|
|
210
|
+
"getter": false,
|
|
211
|
+
"setter": false,
|
|
212
|
+
"reflect": false,
|
|
213
|
+
"attribute": "main-button-name"
|
|
214
|
+
},
|
|
215
|
+
"mainButtonLabel": {
|
|
216
|
+
"type": "string",
|
|
217
|
+
"mutable": false,
|
|
218
|
+
"complexType": {
|
|
219
|
+
"original": "string",
|
|
220
|
+
"resolved": "string",
|
|
221
|
+
"references": {}
|
|
222
|
+
},
|
|
223
|
+
"required": false,
|
|
224
|
+
"optional": false,
|
|
225
|
+
"docs": {
|
|
226
|
+
"tags": [],
|
|
227
|
+
"text": ""
|
|
228
|
+
},
|
|
229
|
+
"getter": false,
|
|
230
|
+
"setter": false,
|
|
231
|
+
"reflect": false,
|
|
232
|
+
"attribute": "main-button-label",
|
|
233
|
+
"defaultValue": "'\uD655\uC778'"
|
|
234
|
+
},
|
|
235
|
+
"subButtonLabel": {
|
|
236
|
+
"type": "string",
|
|
237
|
+
"mutable": false,
|
|
238
|
+
"complexType": {
|
|
239
|
+
"original": "string",
|
|
240
|
+
"resolved": "string",
|
|
241
|
+
"references": {}
|
|
242
|
+
},
|
|
243
|
+
"required": false,
|
|
244
|
+
"optional": false,
|
|
245
|
+
"docs": {
|
|
246
|
+
"tags": [],
|
|
247
|
+
"text": ""
|
|
248
|
+
},
|
|
249
|
+
"getter": false,
|
|
250
|
+
"setter": false,
|
|
251
|
+
"reflect": false,
|
|
252
|
+
"attribute": "sub-button-label",
|
|
253
|
+
"defaultValue": "''"
|
|
254
|
+
},
|
|
255
|
+
"tagPreset": {
|
|
256
|
+
"type": "string",
|
|
257
|
+
"mutable": false,
|
|
258
|
+
"complexType": {
|
|
259
|
+
"original": "TagName",
|
|
260
|
+
"resolved": "\"pill_md_blue\" | \"pill_md_darkblue\" | \"pill_md_green\" | \"pill_md_grey\" | \"pill_md_indigo\" | \"pill_md_orange\" | \"pill_md_red\" | \"pill_md_yellow\" | \"pill_sm_blue\" | \"pill_sm_darkblue\" | \"pill_sm_green\" | \"pill_sm_grey\" | \"pill_sm_indigo\" | \"pill_sm_orange\" | \"pill_sm_red\" | \"pill_sm_yellow\" | \"pill_xs_blue\" | \"pill_xs_darkblue\" | \"pill_xs_green\" | \"pill_xs_grey\" | \"pill_xs_indigo\" | \"pill_xs_orange\" | \"pill_xs_red\" | \"pill_xs_yellow\" | \"square_md_blue\" | \"square_md_darkblue\" | \"square_md_green\" | \"square_md_grey\" | \"square_md_indigo\" | \"square_md_orange\" | \"square_md_red\" | \"square_md_yellow\" | \"square_sm_blue\" | \"square_sm_darkblue\" | \"square_sm_green\" | \"square_sm_grey\" | \"square_sm_indigo\" | \"square_sm_orange\" | \"square_sm_red\" | \"square_sm_yellow\" | \"square_xs_blue\" | \"square_xs_darkblue\" | \"square_xs_green\" | \"square_xs_grey\" | \"square_xs_indigo\" | \"square_xs_orange\" | \"square_xs_red\" | \"square_xs_yellow\"",
|
|
261
|
+
"references": {
|
|
262
|
+
"TagName": {
|
|
263
|
+
"location": "import",
|
|
264
|
+
"path": "./sd-confirm-modal.config",
|
|
265
|
+
"id": "src/components/sd-confirm-modal/sd-confirm-modal.config.ts::TagName",
|
|
266
|
+
"referenceLocation": "TagName"
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
"required": false,
|
|
271
|
+
"optional": false,
|
|
272
|
+
"docs": {
|
|
273
|
+
"tags": [],
|
|
274
|
+
"text": ""
|
|
275
|
+
},
|
|
276
|
+
"getter": false,
|
|
277
|
+
"setter": false,
|
|
278
|
+
"reflect": false,
|
|
279
|
+
"attribute": "tag-preset",
|
|
280
|
+
"defaultValue": "'square_sm_grey'"
|
|
281
|
+
},
|
|
282
|
+
"tagLabel": {
|
|
283
|
+
"type": "string",
|
|
284
|
+
"mutable": false,
|
|
285
|
+
"complexType": {
|
|
286
|
+
"original": "string",
|
|
287
|
+
"resolved": "string",
|
|
288
|
+
"references": {}
|
|
289
|
+
},
|
|
290
|
+
"required": false,
|
|
291
|
+
"optional": false,
|
|
292
|
+
"docs": {
|
|
293
|
+
"tags": [],
|
|
294
|
+
"text": ""
|
|
295
|
+
},
|
|
296
|
+
"getter": false,
|
|
297
|
+
"setter": false,
|
|
298
|
+
"reflect": false,
|
|
299
|
+
"attribute": "tag-label",
|
|
300
|
+
"defaultValue": "''"
|
|
301
|
+
},
|
|
302
|
+
"slotLabel": {
|
|
303
|
+
"type": "string",
|
|
304
|
+
"mutable": false,
|
|
305
|
+
"complexType": {
|
|
306
|
+
"original": "string",
|
|
307
|
+
"resolved": "string",
|
|
308
|
+
"references": {}
|
|
309
|
+
},
|
|
310
|
+
"required": false,
|
|
311
|
+
"optional": false,
|
|
312
|
+
"docs": {
|
|
313
|
+
"tags": [],
|
|
314
|
+
"text": ""
|
|
315
|
+
},
|
|
316
|
+
"getter": false,
|
|
317
|
+
"setter": false,
|
|
318
|
+
"reflect": false,
|
|
319
|
+
"attribute": "slot-label",
|
|
320
|
+
"defaultValue": "''"
|
|
321
|
+
},
|
|
322
|
+
"tagContents": {
|
|
323
|
+
"type": "unknown",
|
|
324
|
+
"mutable": false,
|
|
325
|
+
"complexType": {
|
|
326
|
+
"original": "HTMLElement",
|
|
327
|
+
"resolved": "HTMLElement | undefined",
|
|
328
|
+
"references": {
|
|
329
|
+
"HTMLElement": {
|
|
330
|
+
"location": "global",
|
|
331
|
+
"id": "global::HTMLElement"
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
"required": false,
|
|
336
|
+
"optional": true,
|
|
337
|
+
"docs": {
|
|
338
|
+
"tags": [],
|
|
339
|
+
"text": ""
|
|
340
|
+
},
|
|
341
|
+
"getter": false,
|
|
342
|
+
"setter": false
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
static get states() {
|
|
347
|
+
return {
|
|
348
|
+
"hasSlottedContent": {}
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
static get events() {
|
|
352
|
+
return [{
|
|
353
|
+
"method": "close",
|
|
354
|
+
"name": "sdClose",
|
|
355
|
+
"bubbles": true,
|
|
356
|
+
"cancelable": true,
|
|
357
|
+
"composed": true,
|
|
358
|
+
"docs": {
|
|
359
|
+
"tags": [],
|
|
360
|
+
"text": ""
|
|
361
|
+
},
|
|
362
|
+
"complexType": {
|
|
363
|
+
"original": "void",
|
|
364
|
+
"resolved": "void",
|
|
365
|
+
"references": {}
|
|
366
|
+
}
|
|
367
|
+
}, {
|
|
368
|
+
"method": "confirm",
|
|
369
|
+
"name": "sdConfirm",
|
|
370
|
+
"bubbles": true,
|
|
371
|
+
"cancelable": true,
|
|
372
|
+
"composed": true,
|
|
373
|
+
"docs": {
|
|
374
|
+
"tags": [],
|
|
375
|
+
"text": ""
|
|
376
|
+
},
|
|
377
|
+
"complexType": {
|
|
378
|
+
"original": "void",
|
|
379
|
+
"resolved": "void",
|
|
380
|
+
"references": {}
|
|
381
|
+
}
|
|
382
|
+
}];
|
|
383
|
+
}
|
|
384
|
+
static get elementRef() { return "el"; }
|
|
385
|
+
}
|
|
@@ -27,7 +27,7 @@ export class SdDatePicker {
|
|
|
27
27
|
this.viewChange.emit(e.detail);
|
|
28
28
|
};
|
|
29
29
|
render() {
|
|
30
|
-
return (h("div", { key: '
|
|
30
|
+
return (h("div", { key: '9f1e5b391dec4623e6f628449a459ab1a6f6ec7d', class: { 'sd-date-picker': true, 'sd-date-picker--disabled': this.disabled } }, h("sd-input", { key: '8473fc052a8e61b1b403328046b984b858a69ccd', ref: el => (this.inputEl = el), value: this.value, addonLabel: this.label, readonly: true, disabled: this.disabled, placeholder: this.placeholder, inputClass: "sd-date-picker__input", onClick: () => this.openMenu() }, h("sd-icon", { key: 'ccc4ac16bcb3e340e574d1098d229d93bba32671', slot: "prefix", name: "date", size: "16", color: this.disabled ? 'grey_65' : 'grey_70', class: "date-icon", onClick: () => this.openMenu() })), this.isOpen && (h("sd-portal", { key: '9b85074b30fc5d6e8204c1e815fe325871e8205a', open: this.isOpen, parentRef: this.inputEl, onSdClose: this.handleClose }, h("div", { key: 'fff4a6d1d2b1c0923b74abcf453a32829ee5865a', class: "sd-date-picker__menu" }, h("sd-calendar", { key: 'f157822fca3dffb9fbbaa05e9d9ba67ba6a440bb', value: this.value, selectable: this.selectable, onSdSelect: this.handleSelect, onSdViewChange: this.handleViewChange }))))));
|
|
31
31
|
}
|
|
32
32
|
static get is() { return "sd-date-picker"; }
|
|
33
33
|
static get encapsulation() { return "scoped"; }
|
|
@@ -158,16 +158,16 @@ export class SdDateRangePicker {
|
|
|
158
158
|
this.setHoverDate(hoverDate);
|
|
159
159
|
}
|
|
160
160
|
render() {
|
|
161
|
-
return (h("div", { key: '
|
|
161
|
+
return (h("div", { key: 'd76c5830570b080fe07fc01e9a3ea8f09ec1bf40', class: {
|
|
162
162
|
'sd-date-range-picker': true,
|
|
163
163
|
'sd-date-range-picker--disabled': this.disabled,
|
|
164
|
-
} }, h("sd-input", { key: '
|
|
164
|
+
} }, h("sd-input", { key: '3ecf2ccaa66e472037607fca63f29317a59e2f5d', ref: el => (this.inputEl = el), value: !!this.dateRange[0] ? `${this.dateRange[0]} ~ ${this.dateRange[1]}` : '', addonLabel: this.label, readonly: true, disabled: this.disabled, placeholder: this.placeholder, inputClass: "sd-date-range-picker__input", onClick: () => this.openMenu() }, h("sd-icon", { key: '317167fa8f25a25e869757dfdc6df63671caea57', slot: "prefix", name: "date", size: "16", color: this.disabled ? 'grey_65' : 'grey_70', class: "date-icon", onClick: () => this.openMenu() })), this.isOpen && (h("sd-portal", { key: 'f11baac3755a432b5c379a1b5a26590341136d68', open: this.isOpen, parentRef: this.inputEl, onSdClose: this.closeMenu }, h("div", { key: 'c0cbd599dd4fac9970f3aa9bd84594fffb394533', class: "sd-date-range-picker__menu" }, h("div", { key: 'caaaa777a14f77d421b5d547ee45d71731390f74', class: "sd-date-range-picker__header mb-16pxr flex flex-nowrap items-center justify-center" }, h("button", { key: '6c5169b88ce2f6d132ae18f1944ab4dcae3ba304', type: "button", name: "prev", title: "Previous", onClick: () => {
|
|
165
165
|
this.setPrevYear(this.prevYear - 1);
|
|
166
166
|
this.viewChange.emit({ year: this.prevYear, month: this.prevMonth });
|
|
167
|
-
} }, h("sd-icon", { key: '
|
|
167
|
+
} }, h("sd-icon", { key: '19a1d47598e047faa63ad230e5470421e71ecc66', name: "arrowLeft", size: "12", color: "#CCCCCC" })), h("div", { key: '8f6d4100f1de0b5c830cc2b7cf1479a7e87f77f5', class: "header-label" }, this.prevYear), h("button", { key: '56d402286b78e5be0c2d1cc3227afbc6e8b327c7', type: "button", name: "next", title: "Next", onClick: () => {
|
|
168
168
|
this.setPrevYear(this.prevYear + 1);
|
|
169
169
|
this.viewChange.emit({ year: this.prevYear, month: this.prevMonth });
|
|
170
|
-
} }, h("sd-icon", { key: '
|
|
170
|
+
} }, h("sd-icon", { key: '6d6faeb9a890643e8b4b79a40d5c71a4a0e488f6', name: "arrowRight", size: "12", color: "#CCCCCC" }))), h("div", { key: 'a959a9309a6a6fe17f3cf4b813c865d0b0470722', class: "sd-date-range-picker__body" }, [this.prevCalendar, this.nextCalendar].map((calendar, index) => (h(Fragment, null, index === 1 && h("div", { class: "separator" }), h("div", { key: index, class: "calendar-container" }, h("div", { class: "calendar-header" }, h("button", { type: "button", name: "month", title: "Month", class: index === 0 ? 'header-button-prev' : 'header-button-next', onClick: () => this.updateYearMonth(index === 0 ? 'prev' : 'next') }, h("sd-icon", { name: index === 0 ? 'arrowLeft' : 'arrowRight', size: "12", color: "#CCCCCC" })), index === 0
|
|
171
171
|
? `${this.prevYear}.${String(this.prevMonth).padStart(2, '0')}`
|
|
172
172
|
: `${this.nextYear}.${String(this.nextMonth).padStart(2, '0')}`), h("div", { class: "calendar-days" }, ['일', '월', '화', '수', '목', '금', '토'].map(day => (h("sd-date-box", { key: day, date: day, disabled: true, class: "day" })))), h("div", { class: "calendar-body mt-12pxr grid grid-cols-7 gap-y-8pxr" }, [...calendar.prevMonthDays, ...calendar.days, ...calendar.afterMonthDays].map((day, idx) => (h("sd-date-box", { key: `prev${day}_${idx}`, date: !day ? '' : Number(day), selected: this.dateRange.some(date => date === this.formatDate(index, Number(day))), type: this.getDateBoxType(this.formatDate(index, Number(day))), isToday: today === this.formatDate(index, Number(day)), disabled: !day ? true : this.isDisabledDate(this.formatDate(index, Number(day))), inRange: this.isDateInRange(this.formatDate(index, Number(day))), isStartDate: this.dateRange[0] === this.formatDate(index, Number(day)), isEndDate: this.dateRange[1] === this.formatDate(index, Number(day)), onSdClick: () => this.handleDateClick(index, Number(day)), onSdMouseOver: () => this.handleDateHover(index, Number(day)) }))))))))))))));
|
|
173
173
|
}
|
|
@@ -186,7 +186,7 @@ export class SdDropdownButton extends BaseDropdownEvent {
|
|
|
186
186
|
}
|
|
187
187
|
render() {
|
|
188
188
|
const { config, preset } = this.resolvedConfig;
|
|
189
|
-
return (h("div", { key: '
|
|
189
|
+
return (h("div", { key: 'd2c725861a4667633a2726b47101d604436c5c16', class: "sd-dropdown-button" }, h("button", { key: '51a4a2f049f53d61f45632a89e179c95f9cf9755', 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
190
|
'--sd-dropdown-button-min-width': `${DROPDOWN_BUTTON_MIN_WIDTHS[config.size]}px`,
|
|
191
191
|
'--sd-dropdown-button-bg': config.color,
|
|
192
192
|
'--sd-dropdown-button-bg-hover': PRESET_HOVER_BACKGROUNDS[preset],
|
|
@@ -197,10 +197,10 @@ export class SdDropdownButton extends BaseDropdownEvent {
|
|
|
197
197
|
'--sd-dropdown-button-disabled-bg': DROPDOWN_DISABLED_BACKGROUND,
|
|
198
198
|
'--sd-dropdown-button-disabled-content': DROPDOWN_DISABLED_CONTENT,
|
|
199
199
|
'--sd-dropdown-button-disabled-border': DROPDOWN_DISABLED_BORDER,
|
|
200
|
-
} }, h("span", { key: '
|
|
200
|
+
} }, h("span", { key: '595bf90d834102371492f478e23f7886ec7e5dcf', class: "sd-dropdown-button__trigger-label" }, this.label), h("span", { key: '79a12ecba11d82944e2563d60dfb76c5a9bb9a39', class: "sd-dropdown-button__trigger-divider", "aria-hidden": "true" }), h("span", { key: '7160b1e8f7e25d822c539a57ab19ee2572c7b146', class: {
|
|
201
201
|
'sd-dropdown-button__trigger-icon': true,
|
|
202
202
|
'sd-dropdown-button__trigger-icon--open': this.isOpen,
|
|
203
|
-
}, "aria-hidden": "true" }, h("sd-icon", { key: '
|
|
203
|
+
}, "aria-hidden": "true" }, h("sd-icon", { key: 'd041b1bfb0bb902f5b670fbf5524babfa0ee47ac', name: "arrowDown", size: 12, color: "var(--sd-dropdown-button-current-content)" }))), this.renderDropdown(preset)));
|
|
204
204
|
}
|
|
205
205
|
static get is() { return "sd-dropdown-button"; }
|
|
206
206
|
static get originalStyleUrls() {
|
|
@@ -33,7 +33,7 @@ sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__control {
|
|
|
33
33
|
sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label {
|
|
34
34
|
display: flex;
|
|
35
35
|
align-items: center;
|
|
36
|
-
margin-right: var(--sd-system-space-field-gap);
|
|
36
|
+
margin-right: var(--sd-system-space-field-sm-gap);
|
|
37
37
|
}
|
|
38
38
|
sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__icon {
|
|
39
39
|
margin-right: 6px;
|
|
@@ -47,20 +47,21 @@ sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__text {
|
|
|
47
47
|
sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__tooltip {
|
|
48
48
|
margin-left: 2px;
|
|
49
49
|
}
|
|
50
|
-
sd-field .sd-field--has-
|
|
51
|
-
margin-right: 0;
|
|
50
|
+
sd-field .sd-field--has-addon .sd-field__control .sd-field__addon {
|
|
52
51
|
display: flex;
|
|
53
52
|
align-items: center;
|
|
54
|
-
|
|
55
|
-
padding:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
background
|
|
53
|
+
white-space: nowrap;
|
|
54
|
+
padding: 0 var(--sd-field-addon-padding-x);
|
|
55
|
+
font-size: var(--sd-field-addon-font-size);
|
|
56
|
+
line-height: var(--sd-field-addon-line-height);
|
|
57
|
+
font-weight: var(--sd-field-addon-font-weight);
|
|
58
|
+
background: var(--sd-field-addon-bg);
|
|
59
|
+
border-right: 1px solid var(--sd-field-addon-border-color);
|
|
60
|
+
border-radius: calc(var(--sd-system-radius-field-sm) - 1px) 0 0 calc(var(--sd-system-radius-field-sm) - 1px);
|
|
60
61
|
}
|
|
61
62
|
sd-field .sd-field__wrapper {
|
|
62
63
|
width: 100%;
|
|
63
|
-
height: var(--sd-system-size-field-height);
|
|
64
|
+
height: var(--sd-system-size-field-sm-height);
|
|
64
65
|
display: flex;
|
|
65
66
|
align-items: center;
|
|
66
67
|
flex-flow: row nowrap;
|
|
@@ -77,13 +78,9 @@ sd-field .sd-field__wrapper .sd-field__control {
|
|
|
77
78
|
display: flex;
|
|
78
79
|
flex: 1;
|
|
79
80
|
border: 1px solid var(--sd-system-color-field-border-default);
|
|
80
|
-
border-radius: var(--sd-system-radius-field-
|
|
81
|
+
border-radius: var(--sd-system-radius-field-sm);
|
|
81
82
|
background: var(--sd-system-color-field-bg-default);
|
|
82
83
|
}
|
|
83
|
-
sd-field .sd-field__wrapper .sd-field__control--label-inside {
|
|
84
|
-
border-top-left-radius: 0px;
|
|
85
|
-
border-bottom-left-radius: 0px;
|
|
86
|
-
}
|
|
87
84
|
sd-field .sd-field--error:not(:hover) .sd-field__wrapper .sd-field__control {
|
|
88
85
|
border: 1px solid var(--sd-system-color-field-border-danger) !important;
|
|
89
86
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
+
import fieldTokens from "../../tokens/generated/component.field.json";
|
|
2
3
|
const FORM_PARENT_TAGS = [
|
|
3
4
|
'sd-select',
|
|
4
5
|
'sd-select-multiple',
|
|
@@ -19,7 +20,7 @@ export class SdField {
|
|
|
19
20
|
status;
|
|
20
21
|
// props - label
|
|
21
22
|
label = '';
|
|
22
|
-
|
|
23
|
+
addonLabel = '';
|
|
23
24
|
icon = undefined;
|
|
24
25
|
labelTooltip = '';
|
|
25
26
|
labelTooltipProps = null;
|
|
@@ -115,20 +116,32 @@ export class SdField {
|
|
|
115
116
|
}
|
|
116
117
|
}
|
|
117
118
|
render() {
|
|
118
|
-
|
|
119
|
+
const addon = this.addonLabel;
|
|
120
|
+
const addonTokens = fieldTokens.field.addonLabel;
|
|
121
|
+
const addonCssVars = addon ? {
|
|
122
|
+
'--sd-field-addon-padding-x': `${addonTokens.paddingX}px`,
|
|
123
|
+
'--sd-field-addon-font-size': `${addonTokens.typography.fontSize}px`,
|
|
124
|
+
'--sd-field-addon-line-height': `${addonTokens.typography.lineHeight}px`,
|
|
125
|
+
'--sd-field-addon-font-weight': addonTokens.typography.fontWeight,
|
|
126
|
+
'--sd-field-addon-bg': addonTokens.bg,
|
|
127
|
+
'--sd-field-addon-border-color': this.disabled
|
|
128
|
+
? addonTokens.border.disabled
|
|
129
|
+
: addonTokens.border.default,
|
|
130
|
+
} : {};
|
|
131
|
+
return (h("div", { key: '54d2c495dbfb3a4e749b49fe770c3ed4b5f9f5ad', class: {
|
|
119
132
|
'sd-field': true,
|
|
120
133
|
'sd-field--has-label': !!this.label,
|
|
121
|
-
'sd-field--has-
|
|
134
|
+
'sd-field--has-addon': !!addon,
|
|
122
135
|
[this.fieldStatus]: !!this.fieldStatus,
|
|
123
|
-
} }, h("div", { key: '
|
|
136
|
+
}, style: addonCssVars }, h("div", { key: '7399b420af3adf54f3a1c7c3257e85453e17a9a1', class: "sd-field__wrapper" }, this.renderLabel(this.label), h("div", { key: 'db4915376244d14cfd63fcd07258de2c7d0e4c81', class: {
|
|
124
137
|
'sd-field__control': true,
|
|
125
|
-
'sd-field__control--
|
|
126
|
-
} }, h("slot", { key: '
|
|
138
|
+
'sd-field__control--has-addon': !!addon,
|
|
139
|
+
} }, addon && (h("div", { key: 'f1dde4b40f69fd14a625ff93146b0837d02b2a78', class: "sd-field__addon" }, addon)), h("slot", { key: '44d3d67efa90d71eb9868de9a8a7fcdd373dfff8' }))), this.errorMsg && h("div", { key: '2923e6fd9be55fe20489e7b1b164afa719d86dfa', class: "sd-field__error-message" }, this.errorMsg)));
|
|
127
140
|
}
|
|
128
141
|
renderLabel(label) {
|
|
129
142
|
if (!label)
|
|
130
143
|
return null;
|
|
131
|
-
return (h("label", { class:
|
|
144
|
+
return (h("label", { class: "sd-field__label" }, this.icon && (h("sd-icon", { name: this.icon.name, size: this.icon.size ?? 10, 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 }, h("div", { slot: "content" }, this.labelTooltip)))));
|
|
132
145
|
}
|
|
133
146
|
static get is() { return "sd-field"; }
|
|
134
147
|
static get originalStyleUrls() {
|
|
@@ -307,12 +320,12 @@ export class SdField {
|
|
|
307
320
|
"attribute": "label",
|
|
308
321
|
"defaultValue": "''"
|
|
309
322
|
},
|
|
310
|
-
"
|
|
311
|
-
"type": "
|
|
323
|
+
"addonLabel": {
|
|
324
|
+
"type": "string",
|
|
312
325
|
"mutable": false,
|
|
313
326
|
"complexType": {
|
|
314
|
-
"original": "
|
|
315
|
-
"resolved": "
|
|
327
|
+
"original": "string",
|
|
328
|
+
"resolved": "string",
|
|
316
329
|
"references": {}
|
|
317
330
|
},
|
|
318
331
|
"required": false,
|
|
@@ -324,8 +337,8 @@ export class SdField {
|
|
|
324
337
|
"getter": false,
|
|
325
338
|
"setter": false,
|
|
326
339
|
"reflect": false,
|
|
327
|
-
"attribute": "
|
|
328
|
-
"defaultValue": "
|
|
340
|
+
"attribute": "addon-label",
|
|
341
|
+
"defaultValue": "''"
|
|
329
342
|
},
|
|
330
343
|
"icon": {
|
|
331
344
|
"type": "unknown",
|
|
@@ -91,15 +91,15 @@ export class SdFilePicker {
|
|
|
91
91
|
render() {
|
|
92
92
|
const hasFiles = this.hasFiles();
|
|
93
93
|
const displayText = this.getDisplayText();
|
|
94
|
-
return (h("div", { key: '
|
|
94
|
+
return (h("div", { key: 'f1a0f3eaf06618eb5e4c08f465425eeb969fffaa', class: {
|
|
95
95
|
'sd-file-picker': true,
|
|
96
96
|
[this.getStatusClass()]: true,
|
|
97
97
|
'sd-file-picker--inline': this.inline,
|
|
98
|
-
}, onClick: this.handleClick, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, h("input", { key: '
|
|
98
|
+
}, onClick: this.handleClick, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, h("input", { key: '759217d5121c7b97dab6c70516efbf79b836884e', 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 }), h("sd-icon", { key: '95f94370b7b64e16220b7e4a63d4613790bb6e28', name: "attachFile", size: 16, color: this.getIconColor(), class: "sd-file-picker__icon" }), h("div", { key: '1bae1466b85d68719bd558a67c64e86c6070b9d0', ref: el => (this.fileNamesRef = el), class: {
|
|
99
99
|
'sd-file-picker__text': true,
|
|
100
100
|
'sd-file-picker__text--placeholder': !hasFiles,
|
|
101
101
|
'sd-file-picker__text--active': hasFiles,
|
|
102
|
-
} }, displayText), !this.disabled && hasFiles && (h("sd-icon", { key: '
|
|
102
|
+
} }, displayText), !this.disabled && hasFiles && (h("sd-icon", { key: 'd45e9a39d8c2661f8e92bd7760c36b170c1a76c0', name: "close", size: 12, color: "#888888", class: "sd-file-picker__clear-icon", onClick: this.handleClear })), this.showTooltip && hasFiles && this.hovered && (h("div", { key: '8bcd7f87363167c482f3b99d931443491eaa7bbe', class: "sd-file-picker__tooltip" }, displayText))));
|
|
103
103
|
}
|
|
104
104
|
static get is() { return "sd-file-picker"; }
|
|
105
105
|
static get originalStyleUrls() {
|
|
@@ -144,7 +144,7 @@ export class SdFloatingPopover {
|
|
|
144
144
|
this.close.emit();
|
|
145
145
|
}
|
|
146
146
|
render() {
|
|
147
|
-
return h("slot", { key: '
|
|
147
|
+
return h("slot", { key: 'a49df03bd324a4d37ac077881c0df71603cd3c8f' });
|
|
148
148
|
}
|
|
149
149
|
static get is() { return "sd-floating-portal"; }
|
|
150
150
|
static get originalStyleUrls() {
|