@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,199 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-Qvv0fGgj.js');
|
|
4
|
+
|
|
5
|
+
const modal = {
|
|
6
|
+
title: {
|
|
7
|
+
icon: "32"
|
|
8
|
+
},
|
|
9
|
+
close: {
|
|
10
|
+
size: "20",
|
|
11
|
+
color: "#888888"
|
|
12
|
+
},
|
|
13
|
+
confirm: {
|
|
14
|
+
positive: {
|
|
15
|
+
icon: "#0075FF"
|
|
16
|
+
},
|
|
17
|
+
negative: {
|
|
18
|
+
icon: "#E30000"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
var modalTokens = {
|
|
23
|
+
modal: modal
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const CONFIRM_MODAL_DEFAULT_BUTTON = {
|
|
27
|
+
positive: 'primary_md',
|
|
28
|
+
negative: 'danger_md',
|
|
29
|
+
};
|
|
30
|
+
const CONFIRM_MODAL_ICON_MAP = {
|
|
31
|
+
positive: 'notificationOutline',
|
|
32
|
+
negative: 'warningOutline',
|
|
33
|
+
};
|
|
34
|
+
const CONFIRM_MODAL_ICON_COLOR = {
|
|
35
|
+
positive: modalTokens.modal.confirm.positive.icon,
|
|
36
|
+
negative: modalTokens.modal.confirm.negative.icon,
|
|
37
|
+
};
|
|
38
|
+
const TITLE_ICON_SIZE = Number(modalTokens.modal.title.icon);
|
|
39
|
+
const CLOSE_ICON_SIZE = Number(modalTokens.modal.close.size);
|
|
40
|
+
const CLOSE_ICON_COLOR = modalTokens.modal.close.color;
|
|
41
|
+
const SUB_BUTTON_PRESET = 'neutral_outline_md';
|
|
42
|
+
|
|
43
|
+
const sdConfirmModalCss = () => `sd-confirm-modal{display:block;width:fit-content;min-width:520px}sd-confirm-modal .sd-confirm-modal{position:relative;padding:var(--sd-modal-modal-padding-y) var(--sd-modal-modal-padding-x);border-radius:var(--sd-modal-modal-radius);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.2);background:var(--sd-modal-modal-bg)}sd-confirm-modal .sd-confirm-modal__close-button{position:absolute;top:16px;right:16px;cursor:pointer}sd-confirm-modal .sd-confirm-modal__icon{display:block;width:var(--sd-modal-modal-title-icon);height:var(--sd-modal-modal-title-icon);margin:0 auto var(--sd-modal-modal-title-gap) auto}sd-confirm-modal .sd-confirm-modal__title{color:var(--sd-modal-modal-title-color);font-size:var(--sd-modal-modal-title-typography-font-size);font-weight:var(--sd-modal-modal-title-typography-font-weight);line-height:var(--sd-modal-modal-title-typography-line-height);text-align:center;margin:0 0 var(--sd-modal-modal-body-gap) 0}sd-confirm-modal .sd-confirm-modal__body{display:flex;flex-direction:column;gap:var(--sd-modal-modal-body-gap)}sd-confirm-modal .sd-confirm-modal__message-text{color:var(--sd-modal-modal-message-color);font-size:var(--sd-modal-modal-message-typography-font-size);font-weight:var(--sd-modal-modal-message-typography-font-weight);line-height:var(--sd-modal-modal-message-typography-line-height);text-align:center;margin:0}sd-confirm-modal .sd-confirm-modal__content-box{display:flex;align-items:center;justify-content:center;gap:8px;padding:12px 16px;border:1px solid #e1e1e1;border-radius:8px;background:white}sd-confirm-modal .sd-confirm-modal__slot-label{font-size:14px;font-weight:700;line-height:var(--sd-modal-modal-message-typography-line-height);color:var(--sd-modal-modal-message-color)}sd-confirm-modal .sd-confirm-modal__button{display:flex;justify-content:center;gap:var(--sd-modal-modal-button-gap);margin-top:32px}`;
|
|
44
|
+
|
|
45
|
+
const SdConfirmModal = class {
|
|
46
|
+
constructor(hostRef) {
|
|
47
|
+
index.registerInstance(this, hostRef);
|
|
48
|
+
this.close = index.createEvent(this, "sdClose");
|
|
49
|
+
this.confirm = index.createEvent(this, "sdConfirm");
|
|
50
|
+
}
|
|
51
|
+
get el() { return index.getElement(this); }
|
|
52
|
+
hasSlottedContent = false;
|
|
53
|
+
customContentRef;
|
|
54
|
+
slotObserver;
|
|
55
|
+
type = 'positive';
|
|
56
|
+
modalTitle = '';
|
|
57
|
+
titleClass = '';
|
|
58
|
+
topMessage = [];
|
|
59
|
+
bottomMessage = [];
|
|
60
|
+
mainButtonName;
|
|
61
|
+
mainButtonLabel = '확인';
|
|
62
|
+
subButtonLabel = '';
|
|
63
|
+
tagPreset = 'square_sm_grey';
|
|
64
|
+
tagLabel = '';
|
|
65
|
+
slotLabel = '';
|
|
66
|
+
tagContents;
|
|
67
|
+
close;
|
|
68
|
+
confirm;
|
|
69
|
+
componentWillLoad() {
|
|
70
|
+
this.syncHasSlottedContent();
|
|
71
|
+
}
|
|
72
|
+
componentDidLoad() {
|
|
73
|
+
if (typeof MutationObserver === 'undefined')
|
|
74
|
+
return;
|
|
75
|
+
this.slotObserver = new MutationObserver(() => this.syncHasSlottedContent());
|
|
76
|
+
this.slotObserver.observe(this.el, {
|
|
77
|
+
childList: true,
|
|
78
|
+
characterData: true,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
componentDidRender() {
|
|
82
|
+
if (this.customContentRef && this.tagContents instanceof HTMLElement) {
|
|
83
|
+
if (typeof this.customContentRef.replaceChildren === 'function') {
|
|
84
|
+
this.customContentRef.replaceChildren(this.tagContents);
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
this.customContentRef.innerHTML = '';
|
|
88
|
+
this.customContentRef.appendChild(this.tagContents);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
disconnectedCallback() {
|
|
93
|
+
this.slotObserver?.disconnect();
|
|
94
|
+
}
|
|
95
|
+
get resolvedMainButton() {
|
|
96
|
+
return this.mainButtonName ?? CONFIRM_MODAL_DEFAULT_BUTTON[this.type];
|
|
97
|
+
}
|
|
98
|
+
get hasTagContent() {
|
|
99
|
+
return !!(this.tagLabel || this.slotLabel);
|
|
100
|
+
}
|
|
101
|
+
get showContentBox() {
|
|
102
|
+
return !!this.tagContents || this.hasTagContent || this.hasSlottedContent;
|
|
103
|
+
}
|
|
104
|
+
syncHasSlottedContent() {
|
|
105
|
+
const hasSlottedContent = Array.from(this.el.childNodes).some(node => !(node.nodeType === Node.ELEMENT_NODE &&
|
|
106
|
+
node.classList.contains('sd-confirm-modal')) &&
|
|
107
|
+
(node.nodeType === Node.ELEMENT_NODE ||
|
|
108
|
+
(node.nodeType === Node.TEXT_NODE && node.textContent?.trim())));
|
|
109
|
+
if (hasSlottedContent !== this.hasSlottedContent) {
|
|
110
|
+
this.hasSlottedContent = hasSlottedContent;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
render() {
|
|
114
|
+
const iconName = CONFIRM_MODAL_ICON_MAP[this.type];
|
|
115
|
+
const iconColor = CONFIRM_MODAL_ICON_COLOR[this.type];
|
|
116
|
+
return (index.h("div", { key: '6fc7e6c41e74e44c1eb6228375a8230ffa46dab5', class: "sd-confirm-modal" }, index.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() }), index.h("sd-icon", { key: '8d80711f1ddea567a388b0ad7c76608f0d794fde', class: "sd-confirm-modal__icon", name: iconName, size: TITLE_ICON_SIZE, color: iconColor }), index.h("h2", { key: '47dcfe8774e2d14d4edc8d1c23fff413146119e6', class: `sd-confirm-modal__title ${this.titleClass}` }, this.modalTitle), index.h("div", { key: 'fb18833bd9f5cb858f2f5b05b7b45d5e0f3cdb72', class: "sd-confirm-modal__body" }, (this.topMessage ?? []).length > 0 && (index.h("div", { key: '9d158176578cb4374fe1ca37b62b4d61e81df6a1', class: "sd-confirm-modal__message" }, (this.topMessage ?? []).map(msg => (index.h("p", { class: "sd-confirm-modal__message-text", innerHTML: msg }))))), this.showContentBox && (index.h("div", { key: '4f781266ecdd43ac51195e1ee473d67d2bcff681', class: "sd-confirm-modal__content-box" }, this.tagContents ? (index.h("div", { class: "sd-confirm-modal__custom-content", ref: el => {
|
|
117
|
+
this.customContentRef = el;
|
|
118
|
+
} })) : (index.h("slot", { onSlotchange: () => this.syncHasSlottedContent() }, this.tagLabel && index.h("sd-tag", { name: this.tagPreset, label: this.tagLabel }), this.slotLabel && (index.h("span", { class: "sd-confirm-modal__slot-label" }, this.slotLabel)))))), (this.bottomMessage ?? []).length > 0 && (index.h("div", { key: '04baced447a0cf11406df52b734f73ea39ff00d2', class: "sd-confirm-modal__message" }, (this.bottomMessage ?? []).map(msg => (index.h("p", { class: "sd-confirm-modal__message-text", innerHTML: msg })))))), index.h("div", { key: '7054a3388d93610b21152c4c3df34445b7b64cdd', class: "sd-confirm-modal__button" }, this.subButtonLabel && (index.h("sd-button-v2", { key: '25fdec9094700beaf4d6fa0dee15920d6c3c294a', name: SUB_BUTTON_PRESET, label: this.subButtonLabel, onSdClick: () => this.close.emit() })), index.h("sd-button-v2", { key: '7611e5b0a187b1588026308220b09e3239f59463', name: this.resolvedMainButton, label: this.mainButtonLabel, onSdClick: () => this.confirm.emit() }))));
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
SdConfirmModal.style = sdConfirmModalCss();
|
|
122
|
+
|
|
123
|
+
const NOTICE_BUTTON_PRESET = 'neutral_outline_md';
|
|
124
|
+
|
|
125
|
+
const sdNoticeModalCss = () => `sd-notice-modal{display:block;width:fit-content;min-width:520px}sd-notice-modal .sd-notice-modal{position:relative;padding:var(--sd-modal-modal-padding-y) var(--sd-modal-modal-padding-x);border-radius:var(--sd-modal-modal-radius);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.2);background:var(--sd-modal-modal-bg)}sd-notice-modal .sd-notice-modal__close-button{position:absolute;top:16px;right:16px;cursor:pointer}sd-notice-modal .sd-notice-modal__title{color:var(--sd-modal-modal-title-color);font-size:var(--sd-modal-modal-title-typography-font-size);font-weight:var(--sd-modal-modal-title-typography-font-weight);line-height:var(--sd-modal-modal-title-typography-line-height);text-align:center;margin:0 0 var(--sd-modal-modal-body-gap) 0}sd-notice-modal .sd-notice-modal__body{display:flex;flex-direction:column;gap:var(--sd-modal-modal-body-gap)}sd-notice-modal .sd-notice-modal__message-text{color:var(--sd-modal-modal-message-color);font-size:var(--sd-modal-modal-message-typography-font-size);font-weight:var(--sd-modal-modal-message-typography-font-weight);line-height:var(--sd-modal-modal-message-typography-line-height);text-align:center;margin:0}sd-notice-modal .sd-notice-modal__content-box{display:flex;align-items:center;justify-content:center;gap:8px;padding:12px 16px;border:1px solid #e1e1e1;border-radius:8px;background:white}sd-notice-modal .sd-notice-modal__slot-label{font-size:14px;font-weight:700;line-height:var(--sd-modal-modal-message-typography-line-height);color:var(--sd-modal-modal-message-color)}sd-notice-modal .sd-notice-modal__button{display:flex;justify-content:center;gap:var(--sd-modal-modal-button-gap);margin-top:32px}`;
|
|
126
|
+
|
|
127
|
+
const SdNoticeModal = class {
|
|
128
|
+
constructor(hostRef) {
|
|
129
|
+
index.registerInstance(this, hostRef);
|
|
130
|
+
this.close = index.createEvent(this, "sdClose");
|
|
131
|
+
this.confirm = index.createEvent(this, "sdConfirm");
|
|
132
|
+
}
|
|
133
|
+
get el() { return index.getElement(this); }
|
|
134
|
+
hasSlottedContent = false;
|
|
135
|
+
customContentRef;
|
|
136
|
+
slotObserver;
|
|
137
|
+
modalTitle = '';
|
|
138
|
+
titleClass = '';
|
|
139
|
+
topMessage = [];
|
|
140
|
+
bottomMessage = [];
|
|
141
|
+
mainButtonLabel = '확인';
|
|
142
|
+
subButtonLabel = '';
|
|
143
|
+
tagPreset;
|
|
144
|
+
tagLabel = '';
|
|
145
|
+
slotLabel = '';
|
|
146
|
+
tagContents;
|
|
147
|
+
close;
|
|
148
|
+
confirm;
|
|
149
|
+
componentWillLoad() {
|
|
150
|
+
this.syncHasSlottedContent();
|
|
151
|
+
}
|
|
152
|
+
componentDidLoad() {
|
|
153
|
+
if (typeof MutationObserver === 'undefined')
|
|
154
|
+
return;
|
|
155
|
+
this.slotObserver = new MutationObserver(() => this.syncHasSlottedContent());
|
|
156
|
+
this.slotObserver.observe(this.el, {
|
|
157
|
+
childList: true,
|
|
158
|
+
characterData: true,
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
componentDidRender() {
|
|
162
|
+
if (this.customContentRef && this.tagContents instanceof HTMLElement) {
|
|
163
|
+
if (typeof this.customContentRef.replaceChildren === 'function') {
|
|
164
|
+
this.customContentRef.replaceChildren(this.tagContents);
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
this.customContentRef.innerHTML = '';
|
|
168
|
+
this.customContentRef.appendChild(this.tagContents);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
disconnectedCallback() {
|
|
173
|
+
this.slotObserver?.disconnect();
|
|
174
|
+
}
|
|
175
|
+
get hasTagContent() {
|
|
176
|
+
return !!(this.tagLabel && this.tagPreset);
|
|
177
|
+
}
|
|
178
|
+
get showContentBox() {
|
|
179
|
+
return !!this.tagContents || this.hasTagContent || this.hasSlottedContent;
|
|
180
|
+
}
|
|
181
|
+
syncHasSlottedContent() {
|
|
182
|
+
const hasSlottedContent = Array.from(this.el.childNodes).some(node => !(node.nodeType === Node.ELEMENT_NODE &&
|
|
183
|
+
node.classList.contains('sd-notice-modal')) &&
|
|
184
|
+
(node.nodeType === Node.ELEMENT_NODE ||
|
|
185
|
+
(node.nodeType === Node.TEXT_NODE && node.textContent?.trim())));
|
|
186
|
+
if (hasSlottedContent !== this.hasSlottedContent) {
|
|
187
|
+
this.hasSlottedContent = hasSlottedContent;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
render() {
|
|
191
|
+
return (index.h("div", { key: 'bdabd03353df6668e77ea29477e79586b9ee18ad', class: "sd-notice-modal" }, index.h("sd-icon", { key: '2369161b7a25a72da40235f32f6cc006c8b060bd', class: "sd-notice-modal__close-button", name: "close", size: CLOSE_ICON_SIZE, color: CLOSE_ICON_COLOR, onClick: () => this.close.emit() }), index.h("h2", { key: '9a8b1c37f874b5299911ae5f081f692cd2bce470', class: `sd-notice-modal__title ${this.titleClass}` }, this.modalTitle), index.h("div", { key: 'c44382d6484301d3ed4081cda456628bad387f53', class: "sd-notice-modal__body" }, (this.topMessage ?? []).length > 0 && (index.h("div", { key: '81ff93a305aeb3e1fac90362e0a5158355b96d88', class: "sd-notice-modal__message" }, (this.topMessage ?? []).map(msg => (index.h("p", { class: "sd-notice-modal__message-text", innerHTML: msg }))))), this.showContentBox && (index.h("div", { key: '5d3131ed1aba498fdadf4b035df9c1b178dd1b36', class: "sd-notice-modal__content-box" }, this.tagContents ? (index.h("div", { class: "sd-notice-modal__custom-content", ref: el => {
|
|
192
|
+
this.customContentRef = el;
|
|
193
|
+
} })) : (index.h("slot", { onSlotchange: () => this.syncHasSlottedContent() }, this.hasTagContent && index.h("sd-tag", { name: this.tagPreset, label: this.tagLabel }), this.slotLabel && index.h("span", { class: "sd-notice-modal__slot-label" }, this.slotLabel))))), (this.bottomMessage ?? []).length > 0 && (index.h("div", { key: '0c9e040dbcdb0873f6a4e1606ef0fa9729340860', class: "sd-notice-modal__message" }, (this.bottomMessage ?? []).map(msg => (index.h("p", { class: "sd-notice-modal__message-text", innerHTML: msg })))))), index.h("div", { key: '7fe0737620fd3583300a62eb5b55704147a7511e', class: "sd-notice-modal__button" }, this.subButtonLabel && (index.h("sd-button-v2", { key: '70f0d98a14eb0184ac08cd16aa0676e848fa035d', name: NOTICE_BUTTON_PRESET, label: this.subButtonLabel, onSdClick: () => this.close.emit() })), index.h("sd-button-v2", { key: '54554ce5c26fa59924db03728628cca8538de081', name: NOTICE_BUTTON_PRESET, label: this.mainButtonLabel, onSdClick: () => this.confirm.emit() }))));
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
SdNoticeModal.style = sdNoticeModalCss();
|
|
197
|
+
|
|
198
|
+
exports.sd_confirm_modal = SdConfirmModal;
|
|
199
|
+
exports.sd_notice_modal = SdNoticeModal;
|
|
@@ -37,7 +37,7 @@ const SdDatePicker = class {
|
|
|
37
37
|
this.viewChange.emit(e.detail);
|
|
38
38
|
};
|
|
39
39
|
render() {
|
|
40
|
-
return (index.h("div", { key: '
|
|
40
|
+
return (index.h("div", { key: '9f1e5b391dec4623e6f628449a459ab1a6f6ec7d', class: { 'sd-date-picker': true, 'sd-date-picker--disabled': this.disabled } }, index.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() }, index.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 && (index.h("sd-portal", { key: '9b85074b30fc5d6e8204c1e815fe325871e8205a', open: this.isOpen, parentRef: this.inputEl, onSdClose: this.handleClose }, index.h("div", { key: 'fff4a6d1d2b1c0923b74abcf453a32829ee5865a', class: "sd-date-picker__menu" }, index.h("sd-calendar", { key: 'f157822fca3dffb9fbbaa05e9d9ba67ba6a440bb', value: this.value, selectable: this.selectable, onSdSelect: this.handleSelect, onSdViewChange: this.handleViewChange }))))));
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
SdDatePicker.style = sdDatePickerCss();
|
|
@@ -4,18 +4,7 @@ var index = require('./index-Qvv0fGgj.js');
|
|
|
4
4
|
var baseDropdownEvent = require('./base-dropdown-event-BTPlZ1KF.js');
|
|
5
5
|
var sdButtonV2_config = require('./sd-button-v2.config-DniiNqy_.js');
|
|
6
6
|
var component_button = require('./component.button-BjTPq93d.js');
|
|
7
|
-
|
|
8
|
-
const color = {
|
|
9
|
-
bg: {
|
|
10
|
-
accent: {
|
|
11
|
-
"default": "#0075FF"}},
|
|
12
|
-
content: {
|
|
13
|
-
secondary: "#555555",
|
|
14
|
-
inverse: "#FFFFFF"
|
|
15
|
-
}};
|
|
16
|
-
var systemTokens = {
|
|
17
|
-
color: color
|
|
18
|
-
};
|
|
7
|
+
var system = require('./system-lN7yOMPF.js');
|
|
19
8
|
|
|
20
9
|
const DROPDOWN_BUTTON_NAMES = Object.keys(sdButtonV2_config.BUTTON_CONFIG).filter((name) => !name.endsWith('_lg'));
|
|
21
10
|
const DROPDOWN_BUTTON_CONFIG = Object.fromEntries(DROPDOWN_BUTTON_NAMES.map(name => [name, sdButtonV2_config.BUTTON_CONFIG[name]]));
|
|
@@ -35,9 +24,9 @@ const PRESET_DIVIDER_COLORS = {
|
|
|
35
24
|
danger: component_button.buttonTokens.danger.strong.dropdown.divider,
|
|
36
25
|
danger_outline: PRESET_BORDER_COLORS.danger_outline,
|
|
37
26
|
};
|
|
38
|
-
const MENU_ITEM_COLOR = systemTokens.color.content.secondary;
|
|
39
|
-
const MENU_ITEM_ACTIVE_BACKGROUND = systemTokens.color.bg.accent.default;
|
|
40
|
-
const MENU_ITEM_ACTIVE_COLOR = systemTokens.color.content.inverse;
|
|
27
|
+
const MENU_ITEM_COLOR = system.systemTokens.color.content.secondary;
|
|
28
|
+
const MENU_ITEM_ACTIVE_BACKGROUND = system.systemTokens.color.bg.accent.default;
|
|
29
|
+
const MENU_ITEM_ACTIVE_COLOR = system.systemTokens.color.content.inverse;
|
|
41
30
|
const PRESET_MENU_ITEM_COLORS = {
|
|
42
31
|
primary: MENU_ITEM_COLOR,
|
|
43
32
|
secondary: MENU_ITEM_COLOR,
|
|
@@ -257,7 +246,7 @@ const SdDropdownButton = class extends baseDropdownEvent.BaseDropdownEvent {
|
|
|
257
246
|
}
|
|
258
247
|
render() {
|
|
259
248
|
const { config, preset } = this.resolvedConfig;
|
|
260
|
-
return (index.h("div", { key: '
|
|
249
|
+
return (index.h("div", { key: 'd2c725861a4667633a2726b47101d604436c5c16', class: "sd-dropdown-button" }, index.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: {
|
|
261
250
|
'--sd-dropdown-button-min-width': `${DROPDOWN_BUTTON_MIN_WIDTHS[config.size]}px`,
|
|
262
251
|
'--sd-dropdown-button-bg': config.color,
|
|
263
252
|
'--sd-dropdown-button-bg-hover': PRESET_HOVER_BACKGROUNDS[preset],
|
|
@@ -268,10 +257,10 @@ const SdDropdownButton = class extends baseDropdownEvent.BaseDropdownEvent {
|
|
|
268
257
|
'--sd-dropdown-button-disabled-bg': DROPDOWN_DISABLED_BACKGROUND,
|
|
269
258
|
'--sd-dropdown-button-disabled-content': DROPDOWN_DISABLED_CONTENT,
|
|
270
259
|
'--sd-dropdown-button-disabled-border': DROPDOWN_DISABLED_BORDER,
|
|
271
|
-
} }, index.h("span", { key: '
|
|
260
|
+
} }, index.h("span", { key: '595bf90d834102371492f478e23f7886ec7e5dcf', class: "sd-dropdown-button__trigger-label" }, this.label), index.h("span", { key: '79a12ecba11d82944e2563d60dfb76c5a9bb9a39', class: "sd-dropdown-button__trigger-divider", "aria-hidden": "true" }), index.h("span", { key: '7160b1e8f7e25d822c539a57ab19ee2572c7b146', class: {
|
|
272
261
|
'sd-dropdown-button__trigger-icon': true,
|
|
273
262
|
'sd-dropdown-button__trigger-icon--open': this.isOpen,
|
|
274
|
-
}, "aria-hidden": "true" }, index.h("sd-icon", { key: '
|
|
263
|
+
}, "aria-hidden": "true" }, index.h("sd-icon", { key: 'd041b1bfb0bb902f5b670fbf5524babfa0ee47ac', name: "arrowDown", size: 12, color: "var(--sd-dropdown-button-current-content)" }))), this.renderDropdown(preset)));
|
|
275
264
|
}
|
|
276
265
|
static get watchers() { return {
|
|
277
266
|
"isOpen": [{
|
|
@@ -100,15 +100,15 @@ const SdFilePicker = class {
|
|
|
100
100
|
render() {
|
|
101
101
|
const hasFiles = this.hasFiles();
|
|
102
102
|
const displayText = this.getDisplayText();
|
|
103
|
-
return (index.h("div", { key: '
|
|
103
|
+
return (index.h("div", { key: 'f1a0f3eaf06618eb5e4c08f465425eeb969fffaa', class: {
|
|
104
104
|
'sd-file-picker': true,
|
|
105
105
|
[this.getStatusClass()]: true,
|
|
106
106
|
'sd-file-picker--inline': this.inline,
|
|
107
|
-
}, onClick: this.handleClick, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, index.h("input", { key: '
|
|
107
|
+
}, onClick: this.handleClick, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, index.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 }), index.h("sd-icon", { key: '95f94370b7b64e16220b7e4a63d4613790bb6e28', name: "attachFile", size: 16, color: this.getIconColor(), class: "sd-file-picker__icon" }), index.h("div", { key: '1bae1466b85d68719bd558a67c64e86c6070b9d0', ref: el => (this.fileNamesRef = el), class: {
|
|
108
108
|
'sd-file-picker__text': true,
|
|
109
109
|
'sd-file-picker__text--placeholder': !hasFiles,
|
|
110
110
|
'sd-file-picker__text--active': hasFiles,
|
|
111
|
-
} }, displayText), !this.disabled && hasFiles && (index.h("sd-icon", { key: '
|
|
111
|
+
} }, displayText), !this.disabled && hasFiles && (index.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 && (index.h("div", { key: '8bcd7f87363167c482f3b99d931443491eaa7bbe', class: "sd-file-picker__tooltip" }, displayText))));
|
|
112
112
|
}
|
|
113
113
|
static get watchers() { return {
|
|
114
114
|
"value": [{
|
|
@@ -55,9 +55,9 @@ const SdGuide = class {
|
|
|
55
55
|
};
|
|
56
56
|
render() {
|
|
57
57
|
const { name: iconName, size: iconSize, color: iconColor } = GUIDE_ICON[this.type];
|
|
58
|
-
return (index.h("div", { key: '
|
|
58
|
+
return (index.h("div", { key: '9dc36025eb3c7571bda1eefaee5dafd1f040ff30', class: "sd-guide", style: {
|
|
59
59
|
'--sd-guide-color': GUIDE_ICON[this.type].color,
|
|
60
|
-
} }, index.h("sd-button", { key: '
|
|
60
|
+
} }, index.h("sd-button", { key: '8b64096d65f427d62b783903ed58d8569a8f60c1', ref: el => (this.guideRef = el), class: this.guideClass, variant: this.popupShow ? 'primary' : 'outline', label: this.label || GUIDE_LABEL[this.type], size: "sm", color: this.popupShow ? GUIDE_ICON[this.type].color : 'grey_45', icon: iconName, iconColor: this.popupShow ? 'white' : iconColor, iconSize: iconSize, noHover: this.popupShow, onSdClick: this.handleClickGuide }), this.type === 'help' && this.popupShow && (index.h("sd-portal", { key: '255c720a0b9fe59e55bd53bd8463a18586b311c0', open: this.popupShow, parentRef: this.guideRef, onSdClose: this.closeDropdown, offset: [0, 4] }, index.h("div", { key: '0b367183b33c6299afd7525b0ee09f342d1f3a53', style: { position: 'absolute', width: '0px', height: '0px' } }, index.h("div", { key: '2c8f947b3e127b968a62ad5965a040ae3f915484', class: "sd-guide__popup", style: { width: this.popupWidth ? this.popupWidth + 'px' : '426px' } }, index.h("sd-button", { key: '856eba0563552527573e778cf26102a5bc47750c', class: "sd-guide__popup__close", icon: "close", color: "grey_65", size: "md", variant: "ghost", noHover: true, onSdClick: this.closeDropdown }), index.h("div", { key: '4741f95d5b63475bafc6cc3cd78f675c68ea1dd7', class: "sd-guide__popup__header" }, index.h("sd-icon", { key: '1b2a1303d08fe08b362300a0565ded6bff897159', name: "helpOutline", size: 24, color: "green_65" }), index.h("h3", { key: '062bf0c82c7330cc93301d757316d6e691871c86', class: "sd-guide__popup__title" }, this.popupTitle || GUIDE_LABEL[this.type])), index.h("ul", { key: 'e2a239b690587639422d5d7a8dfeff2682198d27', class: "sd-guide__popup__list" }, this.renderListItem(this.message))))))));
|
|
61
61
|
}
|
|
62
62
|
// 현재 2depth까지만 스타일 적용
|
|
63
63
|
renderListItem(message, depth = 0) {
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-Qvv0fGgj.js');
|
|
4
|
+
|
|
5
|
+
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, 10000);display:flex;align-items:center;justify-content:center}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}sd-modal-container .sd-modal-container__backdrop--visible{opacity:1}sd-modal-container .sd-modal-container__content{position:relative;z-index:1;display:grid;place-items:center}sd-modal-container .sd-modal-container__content>*{grid-row:1;grid-column:1}sd-modal-container .sd-modal-container__modal{opacity:0;transform:scale(0);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)}}`;
|
|
6
|
+
|
|
7
|
+
let modalIdCounter = 0;
|
|
8
|
+
const ANIMATION_DURATION = 350;
|
|
9
|
+
const SdModalContainer = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
}
|
|
13
|
+
get el() { return index.getElement(this); }
|
|
14
|
+
entries = [];
|
|
15
|
+
isVisible = false;
|
|
16
|
+
isBackdropVisible = false;
|
|
17
|
+
contentRef;
|
|
18
|
+
containerDismissTimerId;
|
|
19
|
+
handleKeydown(e) {
|
|
20
|
+
if (e.key === 'Escape') {
|
|
21
|
+
const top = this.getTopEntry();
|
|
22
|
+
if (!top)
|
|
23
|
+
return;
|
|
24
|
+
if (top.persistent) {
|
|
25
|
+
this.shakeModal(top.modalEl);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
this.requestDismiss(top.id, 'cancel');
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
async open(options, chain) {
|
|
32
|
+
const id = `modal-${++modalIdCounter}`;
|
|
33
|
+
const modalEl = this.createConfirmModal(id, options);
|
|
34
|
+
if (this.containerDismissTimerId) {
|
|
35
|
+
clearTimeout(this.containerDismissTimerId);
|
|
36
|
+
this.containerDismissTimerId = undefined;
|
|
37
|
+
}
|
|
38
|
+
this.entries = [...(this.entries ?? []), { id, modalEl, chain, persistent: !!options.persistent, closing: false }];
|
|
39
|
+
this.isVisible = true;
|
|
40
|
+
// Append after the container renders, then wait until the modal can paint before starting transitions.
|
|
41
|
+
requestAnimationFrame(() => {
|
|
42
|
+
if (this.contentRef) {
|
|
43
|
+
this.contentRef.appendChild(modalEl);
|
|
44
|
+
this.waitForModalReady(modalEl).then(() => {
|
|
45
|
+
requestAnimationFrame(() => {
|
|
46
|
+
const currentEntry = (this.entries ?? []).find(item => item.id === id);
|
|
47
|
+
if (!currentEntry || currentEntry.closing || !modalEl.isConnected)
|
|
48
|
+
return;
|
|
49
|
+
this.isBackdropVisible = true;
|
|
50
|
+
modalEl.classList.add('sd-modal-container__modal--visible');
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
return id;
|
|
56
|
+
}
|
|
57
|
+
async openNotice(options, chain) {
|
|
58
|
+
const id = `modal-${++modalIdCounter}`;
|
|
59
|
+
const modalEl = this.createNoticeModal(id, options);
|
|
60
|
+
if (this.containerDismissTimerId) {
|
|
61
|
+
clearTimeout(this.containerDismissTimerId);
|
|
62
|
+
this.containerDismissTimerId = undefined;
|
|
63
|
+
}
|
|
64
|
+
this.entries = [...(this.entries ?? []), { id, modalEl, chain, persistent: !!options.persistent, closing: false }];
|
|
65
|
+
this.isVisible = true;
|
|
66
|
+
requestAnimationFrame(() => {
|
|
67
|
+
if (this.contentRef) {
|
|
68
|
+
this.contentRef.appendChild(modalEl);
|
|
69
|
+
this.waitForModalReady(modalEl).then(() => {
|
|
70
|
+
requestAnimationFrame(() => {
|
|
71
|
+
const currentEntry = (this.entries ?? []).find(item => item.id === id);
|
|
72
|
+
if (!currentEntry || currentEntry.closing || !modalEl.isConnected)
|
|
73
|
+
return;
|
|
74
|
+
this.isBackdropVisible = true;
|
|
75
|
+
modalEl.classList.add('sd-modal-container__modal--visible');
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
return id;
|
|
81
|
+
}
|
|
82
|
+
async update(id, props) {
|
|
83
|
+
const entry = (this.entries ?? []).find(e => e.id === id);
|
|
84
|
+
if (!entry || entry.closing)
|
|
85
|
+
return;
|
|
86
|
+
this.applyProps(entry.modalEl, props);
|
|
87
|
+
}
|
|
88
|
+
createConfirmModal(id, options) {
|
|
89
|
+
const el = document.createElement('sd-confirm-modal');
|
|
90
|
+
el.setAttribute('data-modal-id', id);
|
|
91
|
+
el.classList.add('sd-modal-container__modal');
|
|
92
|
+
this.applyProps(el, options);
|
|
93
|
+
el.addEventListener('sdConfirm', () => {
|
|
94
|
+
this.requestDismiss(id, 'confirm');
|
|
95
|
+
});
|
|
96
|
+
el.addEventListener('sdClose', () => {
|
|
97
|
+
this.requestDismiss(id, 'cancel');
|
|
98
|
+
});
|
|
99
|
+
return el;
|
|
100
|
+
}
|
|
101
|
+
applyProps(el, options) {
|
|
102
|
+
if (this.hasOwnProp(options, 'type'))
|
|
103
|
+
this.setAttr(el, 'type', options.type);
|
|
104
|
+
if (this.hasOwnProp(options, 'title'))
|
|
105
|
+
this.setAttr(el, 'modal-title', options.title);
|
|
106
|
+
if (this.hasOwnProp(options, 'titleClass'))
|
|
107
|
+
this.setAttr(el, 'title-class', options.titleClass);
|
|
108
|
+
if (this.hasOwnProp(options, 'mainButtonLabel')) {
|
|
109
|
+
this.setAttr(el, 'main-button-label', options.mainButtonLabel);
|
|
110
|
+
}
|
|
111
|
+
if (this.hasOwnProp(options, 'mainButtonName')) {
|
|
112
|
+
this.setAttr(el, 'main-button-name', options.mainButtonName);
|
|
113
|
+
}
|
|
114
|
+
if (this.hasOwnProp(options, 'subButtonLabel')) {
|
|
115
|
+
this.setAttr(el, 'sub-button-label', options.subButtonLabel);
|
|
116
|
+
}
|
|
117
|
+
if (this.hasOwnProp(options, 'tagPreset'))
|
|
118
|
+
this.setAttr(el, 'tag-preset', options.tagPreset);
|
|
119
|
+
if (this.hasOwnProp(options, 'tagLabel'))
|
|
120
|
+
this.setAttr(el, 'tag-label', options.tagLabel);
|
|
121
|
+
if (this.hasOwnProp(options, 'slotLabel'))
|
|
122
|
+
this.setAttr(el, 'slot-label', options.slotLabel);
|
|
123
|
+
if (this.hasOwnProp(options, 'topMessage'))
|
|
124
|
+
el.topMessage = options.topMessage ?? [];
|
|
125
|
+
if (this.hasOwnProp(options, 'bottomMessage'))
|
|
126
|
+
el.bottomMessage = options.bottomMessage ?? [];
|
|
127
|
+
if (this.hasOwnProp(options, 'tagContents'))
|
|
128
|
+
el.tagContents = options.tagContents;
|
|
129
|
+
}
|
|
130
|
+
createNoticeModal(id, options) {
|
|
131
|
+
const el = document.createElement('sd-notice-modal');
|
|
132
|
+
el.setAttribute('data-modal-id', id);
|
|
133
|
+
el.classList.add('sd-modal-container__modal');
|
|
134
|
+
this.applyNoticeProps(el, options);
|
|
135
|
+
el.addEventListener('sdConfirm', () => {
|
|
136
|
+
this.requestDismiss(id, 'confirm');
|
|
137
|
+
});
|
|
138
|
+
el.addEventListener('sdClose', () => {
|
|
139
|
+
this.requestDismiss(id, 'cancel');
|
|
140
|
+
});
|
|
141
|
+
return el;
|
|
142
|
+
}
|
|
143
|
+
applyNoticeProps(el, options) {
|
|
144
|
+
if (this.hasOwnProp(options, 'title'))
|
|
145
|
+
this.setAttr(el, 'modal-title', options.title);
|
|
146
|
+
if (this.hasOwnProp(options, 'titleClass'))
|
|
147
|
+
this.setAttr(el, 'title-class', options.titleClass);
|
|
148
|
+
if (this.hasOwnProp(options, 'mainButtonLabel')) {
|
|
149
|
+
this.setAttr(el, 'main-button-label', options.mainButtonLabel);
|
|
150
|
+
}
|
|
151
|
+
if (this.hasOwnProp(options, 'subButtonLabel')) {
|
|
152
|
+
this.setAttr(el, 'sub-button-label', options.subButtonLabel);
|
|
153
|
+
}
|
|
154
|
+
if (this.hasOwnProp(options, 'tagPreset'))
|
|
155
|
+
this.setAttr(el, 'tag-preset', options.tagPreset);
|
|
156
|
+
if (this.hasOwnProp(options, 'tagLabel'))
|
|
157
|
+
this.setAttr(el, 'tag-label', options.tagLabel);
|
|
158
|
+
if (this.hasOwnProp(options, 'slotLabel'))
|
|
159
|
+
this.setAttr(el, 'slot-label', options.slotLabel);
|
|
160
|
+
if (this.hasOwnProp(options, 'topMessage'))
|
|
161
|
+
el.topMessage = options.topMessage ?? [];
|
|
162
|
+
if (this.hasOwnProp(options, 'bottomMessage'))
|
|
163
|
+
el.bottomMessage = options.bottomMessage ?? [];
|
|
164
|
+
if (this.hasOwnProp(options, 'tagContents'))
|
|
165
|
+
el.tagContents = options.tagContents;
|
|
166
|
+
}
|
|
167
|
+
handleBackdropClick = () => {
|
|
168
|
+
const top = this.getTopEntry();
|
|
169
|
+
if (!top)
|
|
170
|
+
return;
|
|
171
|
+
if (top.persistent) {
|
|
172
|
+
this.shakeModal(top.modalEl);
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
this.requestDismiss(top.id, 'cancel');
|
|
176
|
+
};
|
|
177
|
+
shakeModal(modalEl) {
|
|
178
|
+
const cls = 'sd-modal-container__modal--shake';
|
|
179
|
+
modalEl.classList.remove(cls);
|
|
180
|
+
modalEl.addEventListener('animationend', () => modalEl.classList.remove(cls), { once: true });
|
|
181
|
+
requestAnimationFrame(() => {
|
|
182
|
+
modalEl.classList.add(cls);
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
disconnectedCallback() {
|
|
186
|
+
(this.entries ?? []).forEach(entry => {
|
|
187
|
+
if (entry.dismissTimerId)
|
|
188
|
+
clearTimeout(entry.dismissTimerId);
|
|
189
|
+
});
|
|
190
|
+
if (this.containerDismissTimerId)
|
|
191
|
+
clearTimeout(this.containerDismissTimerId);
|
|
192
|
+
}
|
|
193
|
+
getTopEntry() {
|
|
194
|
+
return [...(this.entries ?? [])].reverse().find(entry => !entry.closing);
|
|
195
|
+
}
|
|
196
|
+
requestDismiss(id, reason) {
|
|
197
|
+
const entry = (this.entries ?? []).find(item => item.id === id);
|
|
198
|
+
if (!entry || entry.closing)
|
|
199
|
+
return;
|
|
200
|
+
entry.modalEl.classList.remove('sd-modal-container__modal--visible');
|
|
201
|
+
// fade out backdrop simultaneously if this is the last active modal
|
|
202
|
+
const remainingActive = (this.entries ?? []).filter(item => item.id !== id && !item.closing);
|
|
203
|
+
if (remainingActive.length === 0) {
|
|
204
|
+
this.isBackdropVisible = false;
|
|
205
|
+
}
|
|
206
|
+
const dismissTimerId = setTimeout(() => {
|
|
207
|
+
this.finalizeDismiss(id);
|
|
208
|
+
}, ANIMATION_DURATION);
|
|
209
|
+
this.entries = (this.entries ?? []).map(item => item.id === id ? { ...item, closing: true, dismissTimerId } : item);
|
|
210
|
+
if (reason === 'confirm')
|
|
211
|
+
entry.chain._triggerOk();
|
|
212
|
+
if (reason === 'cancel')
|
|
213
|
+
entry.chain._triggerCancel();
|
|
214
|
+
}
|
|
215
|
+
finalizeDismiss(id) {
|
|
216
|
+
const entry = (this.entries ?? []).find(item => item.id === id);
|
|
217
|
+
if (!entry)
|
|
218
|
+
return;
|
|
219
|
+
if (entry.dismissTimerId)
|
|
220
|
+
clearTimeout(entry.dismissTimerId);
|
|
221
|
+
entry.modalEl.remove();
|
|
222
|
+
const nextEntries = (this.entries ?? []).filter(item => item.id !== id);
|
|
223
|
+
this.entries = nextEntries;
|
|
224
|
+
if (nextEntries.length === 0) {
|
|
225
|
+
this.containerDismissTimerId = setTimeout(() => {
|
|
226
|
+
if ((this.entries ?? []).length === 0) {
|
|
227
|
+
this.isVisible = false;
|
|
228
|
+
}
|
|
229
|
+
this.containerDismissTimerId = undefined;
|
|
230
|
+
}, ANIMATION_DURATION);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
waitForModalReady(modalEl) {
|
|
234
|
+
const componentOnReady = modalEl.componentOnReady;
|
|
235
|
+
if (typeof componentOnReady === 'function') {
|
|
236
|
+
return componentOnReady.call(modalEl).then(() => undefined);
|
|
237
|
+
}
|
|
238
|
+
return new Promise(resolve => {
|
|
239
|
+
requestAnimationFrame(() => {
|
|
240
|
+
requestAnimationFrame(() => resolve());
|
|
241
|
+
});
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
hasOwnProp(options, key) {
|
|
245
|
+
return Object.prototype.hasOwnProperty.call(options, key);
|
|
246
|
+
}
|
|
247
|
+
setAttr(el, name, value) {
|
|
248
|
+
if (value == null)
|
|
249
|
+
return;
|
|
250
|
+
el.setAttribute(name, value);
|
|
251
|
+
}
|
|
252
|
+
render() {
|
|
253
|
+
if (!this.isVisible)
|
|
254
|
+
return null;
|
|
255
|
+
return (index.h("div", { class: "sd-modal-container" }, index.h("div", { class: {
|
|
256
|
+
'sd-modal-container__backdrop': true,
|
|
257
|
+
'sd-modal-container__backdrop--visible': this.isBackdropVisible,
|
|
258
|
+
}, onClick: this.handleBackdropClick }), index.h("div", { class: "sd-modal-container__content", ref: el => { this.contentRef = el; } })));
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
SdModalContainer.style = sdModalContainerCss();
|
|
262
|
+
|
|
263
|
+
exports.sd_modal_container = SdModalContainer;
|
|
@@ -48,14 +48,14 @@ const SdPopover = class {
|
|
|
48
48
|
this.showPopover = false;
|
|
49
49
|
};
|
|
50
50
|
render() {
|
|
51
|
-
return (index.h(index.Fragment, { key: '
|
|
51
|
+
return (index.h(index.Fragment, { key: '205b8f574ce69afcb2abef1b0d0d6ec769230783' }, this.label ? (index.h("sd-button", { ref: el => (this.buttonEl = el), label: this.label, icon: this.icon, size: this.buttonSize, color: this.color, variant: this.buttonVariant, class: "sd-popover", onSdClick: () => (this.showPopover = !this.showPopover) })) : (index.h("sd-icon", { ref: el => (this.buttonEl = el), name: this.icon, size: this.iconSize, color: this.color, class: "sd-popover", onClick: () => (this.showPopover = !this.showPopover) })), this.showPopover && (index.h("sd-floating-portal", { key: 'af82589e6ed773709c83a6855c37b1ac7092b9ec', parentRef: this.buttonEl, onSdClose: this.handleClose, placement: this.placement }, index.h("div", { key: 'dfee40fa54b436a43583ebdc71830e6d590e1793', class: {
|
|
52
52
|
'sd-floating-menu': true,
|
|
53
53
|
'sd-floating-menu--popover': true,
|
|
54
54
|
[`sd-floating-menu--${this.placement}`]: true,
|
|
55
55
|
[this.menuClass]: !!this.menuClass,
|
|
56
56
|
}, style: {
|
|
57
57
|
'--sd-floating-bg': popoverTokens.popover.bg,
|
|
58
|
-
} }, index.h("i", { key: '
|
|
58
|
+
} }, index.h("i", { key: '388ac52f514ddd9247e79d20309a1de029fcd601', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${this.placement}` }, index.h(tooltipArrow.TooltipArrow, { key: '2502e1a63e3dca7e9c6d66805a9ec04e3106dd99' })), index.h("div", { key: 'e12b0df1dbdfe4b34de81ed231e1578bb5361afa', class: "sd-floating-menu__content" }, this.menuTitle && index.h("div", { key: '91f068beee3338f547157db06a0eee4f5e88355d', class: "sd-floating-menu__title" }, this.menuTitle), this.messages.length > 0 && (index.h("div", { key: '1283a6209c1c062d925ae1c32ba2a4f2aa98c8fa', class: "sd-floating-menu__messages" }, this.messages.map(message => (index.h("div", null, message))))), this.buttons.length > 0 && (index.h("div", { key: '130f5468eb8ac34bb02dce9a5a55c1fad17c8dcf', class: `sd-floating-menu__buttons sd-floating-menu__buttons--${this.buttons.length}` }, this.buttons.map(button => (index.h("sd-button", { ...button })))))), this.useClose && (index.h("button", { key: '330fb79d032bac9da45afec3ccf0f2ec6e3dafba', title: "close", class: "sd-floating-menu__close-button", onClick: () => this.handleClose() }, index.h("sd-icon", { key: '7ba5d1e112ac776bb29253ac2cee510d36147ced', name: "close", size: popoverTokens.popover.close.icon, color: popoverTokens.popover.close.color }))))))));
|
|
59
59
|
}
|
|
60
60
|
static get watchers() { return {
|
|
61
61
|
"show": [{
|
|
@@ -41,10 +41,10 @@ const SdProgress = class {
|
|
|
41
41
|
return this.statusColor[this.progressStatus];
|
|
42
42
|
}
|
|
43
43
|
render() {
|
|
44
|
-
return (index.h("div", { key: '
|
|
44
|
+
return (index.h("div", { key: '864f669831515b9c149ad579b6233e960eee79a9', style: {
|
|
45
45
|
'--progress-color': this.progressColor,
|
|
46
46
|
'--progress-percentage': `${this.progressPercentage}%`,
|
|
47
|
-
} }, this.type === 'bar' ? this.renderBarProgress() : this.renderSpinnerProgress(), this.label && index.h("div", { key: '
|
|
47
|
+
} }, this.type === 'bar' ? this.renderBarProgress() : this.renderSpinnerProgress(), this.label && index.h("div", { key: '42920cc06b249371ec7d98c07d2185d71265a538', class: "sd-progress__label" }, this.label)));
|
|
48
48
|
}
|
|
49
49
|
renderBarProgress() {
|
|
50
50
|
return (index.h("div", { class: `sd-progress__bar sd-progress__bar--${this.progressStatus}` }, index.h("div", { class: ['sd-progress__bar__percent', this.progressPercentage < 100 ? 'proceed' : ''].join(' ') }), index.h("div", { class: "sd-progress__bar__indicator sd-progress__bar__indicator--left" }, this.progressPercentage, "%"), index.h("div", { class: "sd-progress__bar__indicator sd-progress__bar__indicator--right" }, this.progressPercentage, "%")));
|
|
@@ -45,7 +45,7 @@ const SdRadioButtonGroup = class {
|
|
|
45
45
|
}
|
|
46
46
|
groupName = this.name || `sd-radio-button-group-${crypto.randomUUID()}`;
|
|
47
47
|
render() {
|
|
48
|
-
return (index.h("div", { key: '
|
|
48
|
+
return (index.h("div", { key: '05df370841cb40291e350df3c7edf6b75be01f14', class: this.getGroupClasses(), role: "radiogroup", "aria-disabled": this.disabled.toString() }, this.radioOptions.map(option => {
|
|
49
49
|
const isSelected = this.isOptionSelected(option);
|
|
50
50
|
const isDisabled = this.isOptionDisabled(option);
|
|
51
51
|
return (index.h("label", { key: `radio-${option.value}`, class: this.getButtonClasses(option), "aria-label": option.label || 'radio option', "data-label": option.label }, index.h("input", { type: "radio", name: this.groupName, value: option.value.toString(), checked: isSelected, disabled: isDisabled, onInput: () => this.handleRadioChange(option.value, option.disabled) }), option.label && index.h("span", { class: "sd-radio-button-group__label" }, option.label)));
|
|
@@ -29,7 +29,7 @@ const SdRadioGroup = class {
|
|
|
29
29
|
return classes.join(' ');
|
|
30
30
|
}
|
|
31
31
|
render() {
|
|
32
|
-
return (index.h("div", { key: '
|
|
32
|
+
return (index.h("div", { key: '264fed43fa10c8869762dab2b0530989e7901178', class: this.getGroupClasses(), role: "radiogroup" }, this.radioOptions.map(option => {
|
|
33
33
|
return (index.h("sd-radio", { key: `radio-${option.value}`, val: String(option.value), value: this.value, label: option.label, disabled: this.disabled || !!option.disabled, onSdUpdate: ({ detail }) => this.handleRadioChange(detail) }));
|
|
34
34
|
})));
|
|
35
35
|
}
|