@sellmate/design-system 1.0.37 → 1.0.38
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} +34 -77
- 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 +3 -3
- 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 +1 -1
- 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 +5 -5
- package/dist/cjs/sd-select-v2-listbox_2.cjs.entry.js +3 -3
- package/dist/cjs/sd-select-v2.cjs.entry.js +2 -1
- 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/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 +384 -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.js +3 -3
- 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.js +1 -1
- 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 +4 -4
- 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 +1 -1
- package/dist/collection/components/sd-select-group/sd-select-group.js +1 -1
- 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.js +2 -2
- package/dist/collection/components/sd-select-v2/sd-select-v2.js +22 -1
- 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-eM9OCX16.js → p-B0wG418y.js} +1 -1
- package/dist/components/{p-CyfWQr0q.js → p-BAghib4O.js} +1 -1
- package/dist/components/{p-D8OiOEB8.js → p-BCPAPvp8.js} +1 -1
- package/dist/components/{p-Cva7D7mF.js → p-BHLuiIDM.js} +1 -1
- package/dist/components/{p-BvBroZuS.js → p-BcrOYmsG.js} +1 -1
- package/dist/components/{p-CdOU_SOg.js → p-BdjLD8BG.js} +1 -1
- package/dist/components/{p-DKcKp__V.js → p-BiCK6R-J.js} +1 -1
- package/dist/components/{p-CXoqcDFa.js → p-BzS0YntY.js} +1 -1
- package/dist/components/{p-CpfPgt7c.js → p-BzUx5X3N.js} +1 -1
- package/dist/components/{p-gnF0_mDJ.js → p-CKi7RueC.js} +1 -1
- package/dist/components/{p-CgwiT7OF.js → p-CNUx4rbY.js} +1 -1
- package/dist/components/{p-BBpn_mYj.js → p-CQfrNtCG.js} +1 -1
- package/dist/components/p-CXKpL2GZ.js +1 -0
- package/dist/components/{p-CtOFXnU0.js → p-C_3U90D_.js} +1 -1
- package/dist/components/p-C_L-UaCP.js +1 -0
- package/dist/components/p-CyJZik9T.js +1 -0
- package/dist/components/p-D23gFKrT.js +1 -0
- package/dist/components/{p-72hNB1Fw.js → p-DASdfaPf.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-41grr69M.js → p-DNyoL0F-.js} +1 -1
- package/dist/components/{p-DOt_ptQc.js → p-DQhPxH3o.js} +1 -1
- package/dist/components/p-Di17TAvI.js +1 -0
- package/dist/components/{p-zUWRVubn.js → p-DjOSobI6.js} +1 -1
- package/dist/components/{p-CxT7-293.js → p-Dpi-ww3O.js} +1 -1
- package/dist/components/{p-C6uWXKpX.js → p-DyFykTJN.js} +1 -1
- package/dist/components/{p-dBp4oI6E.js → p-eZ82xLZt.js} +1 -1
- package/dist/components/{p-DkjKNMgx.js → p-iusjOpcc.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.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-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-e4a19588.entry.js → p-1b80635f.entry.js} +1 -1
- package/dist/design-system/p-26fc1fc0.entry.js +1 -0
- package/dist/design-system/{p-270227ae.entry.js → p-29a60707.entry.js} +1 -1
- package/dist/design-system/{p-c4f9aeed.entry.js → p-37e9e161.entry.js} +1 -1
- package/dist/design-system/{p-b3473468.entry.js → p-6d9e16bd.entry.js} +1 -1
- package/dist/design-system/{p-a88dabbd.entry.js → p-72b09ede.entry.js} +1 -1
- package/dist/design-system/{p-fea7dbce.entry.js → p-812d7c00.entry.js} +1 -1
- package/dist/design-system/p-87a783a7.entry.js +1 -0
- package/dist/design-system/{p-97bfc75f.entry.js → p-9933475e.entry.js} +1 -1
- package/dist/design-system/{p-CdOU_SOg.js → p-BdjLD8BG.js} +1 -1
- 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-ba393cc8.entry.js +1 -0
- package/dist/design-system/p-c549e2c0.entry.js +1 -0
- package/dist/design-system/{p-1d7ea568.entry.js → p-c7c66261.entry.js} +1 -1
- package/dist/design-system/{p-2185ffaa.entry.js → p-cc837ebf.entry.js} +1 -1
- 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-89578577.entry.js → p-e641f41f.entry.js} +1 -1
- package/dist/design-system/{p-93c2d29f.entry.js → p-e8fbedcd.entry.js} +1 -1
- package/dist/design-system/p-f186c0f4.entry.js +1 -0
- package/dist/design-system/p-f5460c6e.entry.js +1 -0
- package/dist/design-system/{p-a94ed4a3.entry.js → p-f7203145.entry.js} +1 -1
- 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} +35 -77
- 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 +4 -4
- 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 +1 -1
- 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 +5 -5
- package/dist/esm/sd-select-v2-listbox_2.entry.js +3 -3
- package/dist/esm/sd-select-v2.entry.js +2 -1
- 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/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-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-select-v2/sd-select-v2.d.ts +1 -0
- package/dist/types/components.d.ts +216 -56
- package/dist/types/index.d.ts +2 -0
- package/dist/types/utils/modal.d.ts +12 -0
- package/hydrate/index.js +565 -112
- package/hydrate/index.mjs +565 -112
- 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-d1GtjL2y.js +0 -1
- package/dist/components/sd-modal-card.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-e7654632.entry.js +0 -1
- package/dist/design-system/p-ebee1495.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
package/dist/esm/sd-tag.entry.js
DELETED
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-B8tGP77V.js';
|
|
2
|
-
|
|
3
|
-
const tag = {
|
|
4
|
-
xs: {
|
|
5
|
-
height: "20",
|
|
6
|
-
paddingX: "6",
|
|
7
|
-
gap: "4",
|
|
8
|
-
icon: "12",
|
|
9
|
-
typography: {
|
|
10
|
-
fontSize: "11",
|
|
11
|
-
fontWeight: "500",
|
|
12
|
-
lineHeight: "18"}
|
|
13
|
-
},
|
|
14
|
-
sm: {
|
|
15
|
-
height: "24",
|
|
16
|
-
paddingX: "8",
|
|
17
|
-
gap: "4",
|
|
18
|
-
icon: "16",
|
|
19
|
-
typography: {
|
|
20
|
-
fontSize: "12",
|
|
21
|
-
fontWeight: "700",
|
|
22
|
-
lineHeight: "20"}
|
|
23
|
-
},
|
|
24
|
-
md: {
|
|
25
|
-
height: "28",
|
|
26
|
-
paddingX: "12",
|
|
27
|
-
gap: "6",
|
|
28
|
-
icon: "16",
|
|
29
|
-
typography: {
|
|
30
|
-
fontSize: "14",
|
|
31
|
-
fontWeight: "700",
|
|
32
|
-
lineHeight: "24"}
|
|
33
|
-
},
|
|
34
|
-
red: {
|
|
35
|
-
bg: "#FB4444",
|
|
36
|
-
content: "#FCEFEF"
|
|
37
|
-
},
|
|
38
|
-
orange: {
|
|
39
|
-
bg: "#FF6B00",
|
|
40
|
-
content: "#FEF1EA"
|
|
41
|
-
},
|
|
42
|
-
yellow: {
|
|
43
|
-
bg: "#916C0D",
|
|
44
|
-
content: "#FFF7DD"
|
|
45
|
-
},
|
|
46
|
-
green: {
|
|
47
|
-
bg: "#00973C",
|
|
48
|
-
content: "#E8F9EF"
|
|
49
|
-
},
|
|
50
|
-
blue: {
|
|
51
|
-
bg: "#0075FF",
|
|
52
|
-
content: "#E6F1FF"
|
|
53
|
-
},
|
|
54
|
-
darkblue: {
|
|
55
|
-
bg: "#006AC1",
|
|
56
|
-
content: "#EAF5FE"
|
|
57
|
-
},
|
|
58
|
-
indigo: {
|
|
59
|
-
bg: "#004290",
|
|
60
|
-
content: "#EFF6FF"
|
|
61
|
-
},
|
|
62
|
-
grey: {
|
|
63
|
-
bg: "#737373",
|
|
64
|
-
content: "#EEEEEE"
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
var tagTokens = {
|
|
68
|
-
tag: tag
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
const TAG_SHAPES = ['square', 'pill'];
|
|
72
|
-
const TAG_SIZES = ['xs', 'sm', 'md'];
|
|
73
|
-
const TAG_COLORS = [
|
|
74
|
-
'grey',
|
|
75
|
-
'red',
|
|
76
|
-
'orange',
|
|
77
|
-
'yellow',
|
|
78
|
-
'green',
|
|
79
|
-
'blue',
|
|
80
|
-
'darkblue',
|
|
81
|
-
'indigo',
|
|
82
|
-
];
|
|
83
|
-
const TAG_COLOR_CONFIG = {
|
|
84
|
-
grey: { background: tagTokens.tag.grey.content, content: tagTokens.tag.grey.bg, icon: tagTokens.tag.grey.bg },
|
|
85
|
-
red: { background: tagTokens.tag.red.content, content: tagTokens.tag.red.bg, icon: tagTokens.tag.red.bg },
|
|
86
|
-
orange: { background: tagTokens.tag.orange.content, content: tagTokens.tag.orange.bg, icon: tagTokens.tag.orange.bg },
|
|
87
|
-
yellow: { background: tagTokens.tag.yellow.content, content: tagTokens.tag.yellow.bg, icon: tagTokens.tag.yellow.bg },
|
|
88
|
-
green: { background: tagTokens.tag.green.content, content: tagTokens.tag.green.bg, icon: tagTokens.tag.green.bg },
|
|
89
|
-
blue: { background: tagTokens.tag.blue.content, content: tagTokens.tag.blue.bg, icon: tagTokens.tag.blue.bg },
|
|
90
|
-
darkblue: { background: tagTokens.tag.darkblue.content, content: tagTokens.tag.darkblue.bg, icon: tagTokens.tag.darkblue.bg },
|
|
91
|
-
indigo: { background: tagTokens.tag.indigo.content, content: tagTokens.tag.indigo.bg, icon: tagTokens.tag.indigo.bg },
|
|
92
|
-
};
|
|
93
|
-
const SQUARE_SIZE_CONFIG = {
|
|
94
|
-
xs: {
|
|
95
|
-
height: `${tagTokens.tag.xs.height}px`,
|
|
96
|
-
paddingX: `${tagTokens.tag.xs.paddingX}px`,
|
|
97
|
-
gap: `${tagTokens.tag.xs.gap}px`,
|
|
98
|
-
fontSize: `${tagTokens.tag.xs.typography.fontSize}px`,
|
|
99
|
-
fontWeight: tagTokens.tag.xs.typography.fontWeight,
|
|
100
|
-
lineHeight: `${tagTokens.tag.xs.typography.lineHeight}px`,
|
|
101
|
-
iconSize: Number(tagTokens.tag.xs.icon),
|
|
102
|
-
radius: '4px',
|
|
103
|
-
},
|
|
104
|
-
sm: {
|
|
105
|
-
height: `${tagTokens.tag.sm.height}px`,
|
|
106
|
-
paddingX: `${tagTokens.tag.sm.paddingX}px`,
|
|
107
|
-
gap: `${tagTokens.tag.sm.gap}px`,
|
|
108
|
-
fontSize: `${tagTokens.tag.sm.typography.fontSize}px`,
|
|
109
|
-
fontWeight: tagTokens.tag.sm.typography.fontWeight,
|
|
110
|
-
lineHeight: `${tagTokens.tag.sm.typography.lineHeight}px`,
|
|
111
|
-
iconSize: Number(tagTokens.tag.sm.icon),
|
|
112
|
-
radius: '4px',
|
|
113
|
-
},
|
|
114
|
-
md: {
|
|
115
|
-
height: `${tagTokens.tag.md.height}px`,
|
|
116
|
-
paddingX: `${tagTokens.tag.md.paddingX}px`,
|
|
117
|
-
gap: `${tagTokens.tag.md.gap}px`,
|
|
118
|
-
fontSize: `${tagTokens.tag.md.typography.fontSize}px`,
|
|
119
|
-
fontWeight: tagTokens.tag.md.typography.fontWeight,
|
|
120
|
-
lineHeight: `${tagTokens.tag.md.typography.lineHeight}px`,
|
|
121
|
-
iconSize: Number(tagTokens.tag.md.icon),
|
|
122
|
-
radius: '5px',
|
|
123
|
-
},
|
|
124
|
-
};
|
|
125
|
-
const PILL_SIZE_CONFIG = {
|
|
126
|
-
xs: { ...SQUARE_SIZE_CONFIG.xs, radius: '999px' },
|
|
127
|
-
sm: { ...SQUARE_SIZE_CONFIG.sm, radius: '999px' },
|
|
128
|
-
md: { ...SQUARE_SIZE_CONFIG.md, radius: '999px' },
|
|
129
|
-
};
|
|
130
|
-
const TAG_CONFIG = Object.fromEntries(TAG_SHAPES.flatMap(shape => TAG_SIZES.flatMap(size => TAG_COLORS.map(color => {
|
|
131
|
-
const sizeConfig = shape === 'square' ? SQUARE_SIZE_CONFIG[size] : PILL_SIZE_CONFIG[size];
|
|
132
|
-
return [
|
|
133
|
-
`${shape}_${size}_${color}`,
|
|
134
|
-
{
|
|
135
|
-
shape,
|
|
136
|
-
size,
|
|
137
|
-
color,
|
|
138
|
-
...sizeConfig,
|
|
139
|
-
...TAG_COLOR_CONFIG[color],
|
|
140
|
-
},
|
|
141
|
-
];
|
|
142
|
-
}))));
|
|
143
|
-
const isTagName = (value) => Object.prototype.hasOwnProperty.call(TAG_CONFIG, value);
|
|
144
|
-
|
|
145
|
-
const sdTagCss = () => `sd-tag{display:inline-flex;width:fit-content;height:fit-content}.sd-tag{display:inline-flex;align-items:center;justify-content:center;gap:var(--sd-tag-gap, 5px);min-height:var(--sd-tag-height, 24px);padding:0 var(--sd-tag-padding-x, 8px);border-radius:var(--sd-tag-radius, 4px);background:var(--sd-tag-background, #f3f3f3);color:var(--sd-tag-content, #7a7a7a);box-sizing:border-box;white-space:nowrap;-webkit-user-select:none;user-select:none}.sd-tag__icon{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center}.sd-tag__label{display:inline-flex;align-items:center;justify-content:center;min-width:0;font-size:var(--sd-tag-font-size, 12px);font-weight:var(--sd-tag-font-weight, 700);line-height:var(--sd-tag-line-height, 20px)}`;
|
|
146
|
-
|
|
147
|
-
const SdTag = class {
|
|
148
|
-
constructor(hostRef) {
|
|
149
|
-
registerInstance(this, hostRef);
|
|
150
|
-
}
|
|
151
|
-
name = 'square_sm_grey';
|
|
152
|
-
label = '';
|
|
153
|
-
icon;
|
|
154
|
-
isLeft = true;
|
|
155
|
-
get resolvedConfig() {
|
|
156
|
-
if (!isTagName(this.name)) {
|
|
157
|
-
throw new Error(`Invalid sd-tag name: ${this.name}`);
|
|
158
|
-
}
|
|
159
|
-
return TAG_CONFIG[this.name];
|
|
160
|
-
}
|
|
161
|
-
renderIcon(color, size) {
|
|
162
|
-
if (!this.icon)
|
|
163
|
-
return null;
|
|
164
|
-
return h("sd-icon", { class: "sd-tag__icon", name: this.icon, size: size, color: color });
|
|
165
|
-
}
|
|
166
|
-
render() {
|
|
167
|
-
const config = this.resolvedConfig;
|
|
168
|
-
const iconNode = this.renderIcon(config.icon, config.iconSize);
|
|
169
|
-
return (h("span", { key: '60c7b64aeed525b55a070ee149aac1c613d43b40', class: "sd-tag", style: {
|
|
170
|
-
'--sd-tag-background': config.background,
|
|
171
|
-
'--sd-tag-content': config.content,
|
|
172
|
-
'--sd-tag-height': config.height,
|
|
173
|
-
'--sd-tag-padding-x': config.paddingX,
|
|
174
|
-
'--sd-tag-gap': config.gap,
|
|
175
|
-
'--sd-tag-font-size': config.fontSize,
|
|
176
|
-
'--sd-tag-font-weight': config.fontWeight,
|
|
177
|
-
'--sd-tag-line-height': config.lineHeight,
|
|
178
|
-
'--sd-tag-radius': config.radius,
|
|
179
|
-
}, "aria-label": this.label || 'tag' }, this.icon && this.isLeft && iconNode, h("span", { key: '3b5f662e5e6af7d36800f1cdca6cc18a748b669c', class: "sd-tag__label" }, this.label), this.icon && !this.isLeft && iconNode));
|
|
180
|
-
}
|
|
181
|
-
};
|
|
182
|
-
SdTag.style = sdTagCss();
|
|
183
|
-
|
|
184
|
-
export { SdTag as sd_tag };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
-
import { ButtonSize, ButtonVariant } from '../sd-button/sd-button';
|
|
3
|
-
export interface SdModalCardButtonProps {
|
|
4
|
-
label: string;
|
|
5
|
-
color: string;
|
|
6
|
-
size: ButtonSize;
|
|
7
|
-
variant?: ButtonVariant;
|
|
8
|
-
class?: string;
|
|
9
|
-
type?: 'confirm' | 'cancel';
|
|
10
|
-
}
|
|
11
|
-
export declare class SdModalCard {
|
|
12
|
-
type: 'info' | 'warning' | 'normal';
|
|
13
|
-
system: 'normal' | 'positive' | 'negative';
|
|
14
|
-
useCloseButton: boolean;
|
|
15
|
-
modalTitle: string;
|
|
16
|
-
buttonFlexDirection: 'row' | 'column';
|
|
17
|
-
buttonProps?: SdModalCardButtonProps[];
|
|
18
|
-
message: string[];
|
|
19
|
-
sdClass: string;
|
|
20
|
-
close: EventEmitter<MouseEvent>;
|
|
21
|
-
confirm: EventEmitter<MouseEvent>;
|
|
22
|
-
private get pointColor();
|
|
23
|
-
private get getModalClass();
|
|
24
|
-
render(): any;
|
|
25
|
-
}
|