@sellmate/design-system 1.0.22 → 1.0.23
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/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/cjs/design-system.cjs.js +4 -3
- package/dist/cjs/{index-D-PnW6jc.js → index-Qvv0fGgj.js} +9 -117
- package/dist/cjs/loader.cjs.js +4 -3
- package/dist/cjs/sd-badge.cjs.entry.js +2 -2
- package/dist/cjs/sd-button-v2.cjs.entry.js +3 -3
- package/dist/cjs/sd-button_21.cjs.entry.js +26 -26
- package/dist/cjs/sd-card.cjs.entry.js +2 -2
- package/dist/cjs/sd-date-picker.cjs.entry.js +2 -2
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +3 -3
- package/dist/cjs/sd-file-picker.cjs.entry.js +4 -4
- package/dist/cjs/sd-form.cjs.entry.js +1 -1
- package/dist/cjs/sd-guide.cjs.entry.js +3 -3
- package/dist/cjs/sd-popover.cjs.entry.js +4 -4
- package/dist/cjs/sd-progress.cjs.entry.js +3 -3
- 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-multiple-group.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-multiple.cjs.entry.js +2 -2
- package/dist/cjs/sd-select-option-group.cjs.entry.js +4 -4
- package/dist/cjs/sd-tabs.cjs.entry.js +7 -9
- package/dist/cjs/sd-tag.cjs.entry.js +96 -38
- package/dist/cjs/sd-toast.cjs.entry.js +3 -3
- package/dist/cjs/sd-toggle-button.cjs.entry.js +2 -2
- package/dist/cjs/sd-toggle.cjs.entry.js +2 -2
- package/dist/cjs/{tooltipArrow-CMyNLSC-.js → tooltipArrow-Mb2Dhc7T.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -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-date-picker/sd-date-picker.js +1 -1
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.js +2 -2
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.js +2 -2
- 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-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-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-multiple/sd-select-multiple.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-tabs/sd-tabs.js +6 -8
- package/dist/collection/components/sd-tag/sd-tag.config.js +70 -0
- package/dist/collection/components/sd-tag/sd-tag.css +26 -56
- package/dist/collection/components/sd-tag/sd-tag.js +51 -104
- 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-toggle/sd-toggle.js +1 -1
- package/dist/collection/components/sd-toggle-button/sd-toggle-button.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-DB52ADSW.js → p-2FdkYfts.js} +1 -1
- package/dist/components/{p-DZqrfwuw.js → p-B1o7vc2v.js} +1 -1
- package/dist/components/p-B1vJXa29.js +1 -0
- package/dist/components/p-BFO8hHjW.js +1 -0
- package/dist/components/{p-CAJmL8nc.js → p-BKTfQGcR.js} +1 -1
- package/dist/components/{p-B4p2JGMI.js → p-BNuWMSR_.js} +1 -1
- package/dist/components/{p-B-UC5tW2.js → p-BxXKe48B.js} +1 -1
- package/dist/components/{p-Hvt2oWRk.js → p-CAZeEBeS.js} +1 -1
- package/dist/components/{p-DFgtwoFG.js → p-CDzGasXW.js} +1 -1
- package/dist/components/{p-DF2wExtn.js → p-CVvYLd5J.js} +1 -1
- package/dist/components/{p-DyeU47vV.js → p-CdCMe4bN.js} +1 -1
- package/dist/components/{p-BsQEKShq.js → p-CwM24aVj.js} +1 -1
- package/dist/components/{p-DYsHXden.js → p-CzHa12Ax.js} +1 -1
- package/dist/components/{p-JyVgfdnC.js → p-Czq-8oT7.js} +1 -1
- package/dist/components/{p-DdNQILvd.js → p-D-ian_bu.js} +1 -1
- package/dist/components/{p-D4kmO3k7.js → p-D9mJxIjm.js} +1 -1
- package/dist/components/{p-DExqkuUY.js → p-DYoNy5I7.js} +1 -1
- package/dist/components/{p-CWlCxabU.js → p-Dun2lZmi.js} +1 -1
- package/dist/components/{p-CysnHGj4.js → p-G4t0nGLP.js} +1 -1
- package/dist/components/p-NAapFxTw.js +1 -0
- package/dist/components/{p-C0yQ73oI.js → p-hfbNb5UF.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-card.js +1 -1
- package/dist/components/sd-checkbox.js +1 -1
- package/dist/components/sd-date-box.js +1 -1
- 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-form.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-card.js +1 -1
- package/dist/components/sd-number-input.js +1 -1
- package/dist/components/sd-pagination.js +1 -1
- package/dist/components/sd-popover.js +1 -1
- package/dist/components/sd-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-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.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.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/{p-938940a7.entry.js → p-02c5ab69.entry.js} +1 -1
- package/dist/design-system/{p-6c34df5b.entry.js → p-1b80635f.entry.js} +1 -1
- package/dist/design-system/{p-2ca338f9.entry.js → p-285cc646.entry.js} +1 -1
- package/dist/design-system/{p-8fde8570.entry.js → p-3565f871.entry.js} +1 -1
- package/dist/design-system/{p-0406b7f9.entry.js → p-5032c700.entry.js} +1 -1
- package/dist/design-system/{p-40da6e22.entry.js → p-5094848f.entry.js} +1 -1
- package/dist/design-system/p-59a52297.entry.js +1 -0
- package/dist/design-system/p-712c1ef1.entry.js +1 -0
- package/dist/design-system/{p-b2ab1c50.entry.js → p-83f320e6.entry.js} +1 -1
- package/dist/design-system/{p-32c27eca.entry.js → p-8b013328.entry.js} +1 -1
- package/dist/design-system/{p-d021a375.entry.js → p-9563ffe1.entry.js} +1 -1
- package/dist/design-system/p-B8tGP77V.js +2 -0
- package/dist/design-system/p-BeCHKP_I.js +1 -0
- package/dist/design-system/p-DQuL1Twl.js +1 -0
- package/dist/design-system/{p-9650c304.entry.js → p-a3025f1f.entry.js} +1 -1
- package/dist/design-system/p-b1e45f3f.entry.js +1 -0
- package/dist/design-system/{p-a547f366.entry.js → p-c0655cd1.entry.js} +1 -1
- package/dist/design-system/p-d8a141e7.entry.js +1 -0
- package/dist/design-system/{p-322dbf53.entry.js → p-df3d3a2a.entry.js} +1 -1
- package/dist/design-system/{p-9ad83ffb.entry.js → p-e6d84ecf.entry.js} +1 -1
- package/dist/design-system/{p-7d35c7a7.entry.js → p-e7d7ceb4.entry.js} +1 -1
- package/dist/design-system/{p-646ed990.entry.js → p-ea26b8e9.entry.js} +1 -1
- package/dist/design-system/{p-d38f59b3.entry.js → p-f1b31194.entry.js} +1 -1
- package/dist/design-system/{p-3885ca10.entry.js → p-f81d3798.entry.js} +1 -1
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/esm/design-system.js +4 -3
- package/dist/esm/{index-C_an1PQ3.js → index-B8tGP77V.js} +10 -117
- package/dist/esm/loader.js +4 -3
- package/dist/esm/sd-badge.entry.js +2 -2
- package/dist/esm/sd-button-v2.entry.js +3 -3
- package/dist/esm/sd-button_21.entry.js +26 -26
- package/dist/esm/sd-card.entry.js +2 -2
- package/dist/esm/sd-date-picker.entry.js +2 -2
- package/dist/esm/sd-dropdown-button.entry.js +3 -3
- package/dist/esm/sd-file-picker.entry.js +4 -4
- package/dist/esm/sd-form.entry.js +1 -1
- package/dist/esm/sd-guide.entry.js +3 -3
- package/dist/esm/sd-popover.entry.js +4 -4
- package/dist/esm/sd-progress.entry.js +3 -3
- 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-multiple-group.entry.js +1 -1
- package/dist/esm/sd-select-multiple.entry.js +2 -2
- package/dist/esm/sd-select-option-group.entry.js +4 -4
- package/dist/esm/sd-tabs.entry.js +7 -9
- package/dist/esm/sd-tag.entry.js +96 -38
- package/dist/esm/sd-toast.entry.js +3 -3
- package/dist/esm/sd-toggle-button.entry.js +2 -2
- package/dist/esm/sd-toggle.entry.js +2 -2
- package/dist/esm/{tooltipArrow-BTp0AVR2.js → tooltipArrow-Pdc3NIc9.js} +1 -1
- package/dist/types/components/sd-tabs/sd-tabs.d.ts +1 -1
- package/dist/types/components/sd-tag/sd-tag.config.d.ts +23 -0
- package/dist/types/components/sd-tag/sd-tag.d.ts +6 -10
- package/dist/types/components.d.ts +15 -27
- package/hydrate/index.js +162 -581
- package/hydrate/index.mjs +162 -581
- package/package.json +1 -1
- package/dist/components/p-Bd9o9P1x.js +0 -1
- package/dist/components/p-CDehvEQ5.js +0 -1
- package/dist/components/p-CaEyReID.js +0 -1
- package/dist/design-system/p-3edd59b5.entry.js +0 -1
- package/dist/design-system/p-47d37199.entry.js +0 -1
- package/dist/design-system/p-Bak0zfmv.js +0 -1
- package/dist/design-system/p-C_an1PQ3.js +0 -2
- package/dist/design-system/p-ab3b6f63.entry.js +0 -1
- package/dist/design-system/p-e5c3927f.entry.js +0 -1
|
@@ -1,54 +1,112 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Qvv0fGgj.js');
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
const TAG_COLORS =
|
|
8
|
-
grey
|
|
9
|
-
red
|
|
10
|
-
orange
|
|
11
|
-
yellow
|
|
12
|
-
green
|
|
13
|
-
blue
|
|
14
|
-
darkblue
|
|
15
|
-
indigo
|
|
5
|
+
const TAG_SHAPES = ['square', 'pill'];
|
|
6
|
+
const TAG_SIZES = ['sm', 'md', 'lg'];
|
|
7
|
+
const TAG_COLORS = [
|
|
8
|
+
'grey',
|
|
9
|
+
'red',
|
|
10
|
+
'orange',
|
|
11
|
+
'yellow',
|
|
12
|
+
'green',
|
|
13
|
+
'blue',
|
|
14
|
+
'darkblue',
|
|
15
|
+
'indigo',
|
|
16
|
+
];
|
|
17
|
+
const TAG_COLOR_CONFIG = {
|
|
18
|
+
grey: { background: '#EEEEEE', content: '#737373', icon: '#737373' },
|
|
19
|
+
red: { background: '#FCEFEF', content: '#FB4444', icon: '#FB4444' },
|
|
20
|
+
orange: { background: '#FEF1EA', content: '#FF6B00', icon: '#FF6B00' },
|
|
21
|
+
yellow: { background: '#FFF7DD', content: '#916C0D', icon: '#CA9611' },
|
|
22
|
+
green: { background: '#E8F9EF', content: '#00973C', icon: '#12B553' },
|
|
23
|
+
blue: { background: '#E6F1FF', content: '#0075FF', icon: '#0075FF' },
|
|
24
|
+
darkblue: { background: '#EAF5FE', content: '#006AC1', icon: '#006AC1' },
|
|
25
|
+
indigo: { background: '#EFF6FF', content: '#004290', icon: '#004290' },
|
|
26
|
+
};
|
|
27
|
+
const SQUARE_SIZE_CONFIG = {
|
|
28
|
+
sm: {
|
|
29
|
+
height: '20px',
|
|
30
|
+
paddingX: '6px',
|
|
31
|
+
gap: '4px',
|
|
32
|
+
fontSize: '11px',
|
|
33
|
+
fontWeight: '500',
|
|
34
|
+
iconSize: 12,
|
|
35
|
+
radius: '4px',
|
|
36
|
+
},
|
|
37
|
+
md: {
|
|
38
|
+
height: '24px',
|
|
39
|
+
paddingX: '8px',
|
|
40
|
+
gap: '4px',
|
|
41
|
+
fontSize: '12px',
|
|
42
|
+
fontWeight: '700',
|
|
43
|
+
iconSize: 16,
|
|
44
|
+
radius: '4px',
|
|
45
|
+
},
|
|
46
|
+
lg: {
|
|
47
|
+
height: '28px',
|
|
48
|
+
paddingX: '10px',
|
|
49
|
+
gap: '4px',
|
|
50
|
+
fontSize: '14px',
|
|
51
|
+
fontWeight: '700',
|
|
52
|
+
iconSize: 16,
|
|
53
|
+
radius: '5px',
|
|
54
|
+
},
|
|
16
55
|
};
|
|
56
|
+
const PILL_SIZE_CONFIG = {
|
|
57
|
+
sm: { ...SQUARE_SIZE_CONFIG.sm, radius: '999px' },
|
|
58
|
+
md: { ...SQUARE_SIZE_CONFIG.md, radius: '999px' },
|
|
59
|
+
lg: { ...SQUARE_SIZE_CONFIG.lg, radius: '999px' },
|
|
60
|
+
};
|
|
61
|
+
const TAG_CONFIG = Object.fromEntries(TAG_SHAPES.flatMap(shape => TAG_SIZES.flatMap(size => TAG_COLORS.map(color => {
|
|
62
|
+
const sizeConfig = shape === 'square' ? SQUARE_SIZE_CONFIG[size] : PILL_SIZE_CONFIG[size];
|
|
63
|
+
return [
|
|
64
|
+
`${shape}_${size}_${color}`,
|
|
65
|
+
{
|
|
66
|
+
shape,
|
|
67
|
+
size,
|
|
68
|
+
color,
|
|
69
|
+
...sizeConfig,
|
|
70
|
+
...TAG_COLOR_CONFIG[color],
|
|
71
|
+
},
|
|
72
|
+
];
|
|
73
|
+
}))));
|
|
74
|
+
const isTagName = (value) => Object.prototype.hasOwnProperty.call(TAG_CONFIG, value);
|
|
75
|
+
|
|
76
|
+
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:1}`;
|
|
77
|
+
|
|
17
78
|
const SdTag = class {
|
|
18
79
|
constructor(hostRef) {
|
|
19
80
|
index.registerInstance(this, hostRef);
|
|
20
81
|
}
|
|
21
|
-
|
|
22
|
-
size = 'md';
|
|
23
|
-
color = 'grey';
|
|
24
|
-
rounded = false;
|
|
82
|
+
name = 'square_md_grey';
|
|
25
83
|
label = '';
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
classes.push('sd-tag--rounded');
|
|
32
|
-
}
|
|
33
|
-
if (this.color && !this.bgColor && !this.textColor) {
|
|
34
|
-
classes.push(TAG_COLORS[this.color]);
|
|
35
|
-
}
|
|
36
|
-
if (this.bgColor || this.textColor) {
|
|
37
|
-
classes.push('sd-tag--custom-color');
|
|
84
|
+
icon;
|
|
85
|
+
isLeft = true;
|
|
86
|
+
get resolvedConfig() {
|
|
87
|
+
if (!isTagName(this.name)) {
|
|
88
|
+
throw new Error(`Invalid sd-tag name: ${this.name}`);
|
|
38
89
|
}
|
|
39
|
-
return
|
|
90
|
+
return TAG_CONFIG[this.name];
|
|
40
91
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
92
|
+
renderIcon(color, size) {
|
|
93
|
+
if (!this.icon)
|
|
94
|
+
return null;
|
|
95
|
+
return index.h("sd-icon", { class: "sd-tag__icon", name: this.icon, size: size, color: color });
|
|
45
96
|
}
|
|
46
97
|
render() {
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
'--tag-
|
|
51
|
-
|
|
98
|
+
const config = this.resolvedConfig;
|
|
99
|
+
const iconNode = this.renderIcon(config.icon, config.iconSize);
|
|
100
|
+
return (index.h("span", { key: '5f9ee005b146997dd13bb3e6a06680ff8574bd14', class: "sd-tag", style: {
|
|
101
|
+
'--sd-tag-background': config.background,
|
|
102
|
+
'--sd-tag-content': config.content,
|
|
103
|
+
'--sd-tag-height': config.height,
|
|
104
|
+
'--sd-tag-padding-x': config.paddingX,
|
|
105
|
+
'--sd-tag-gap': config.gap,
|
|
106
|
+
'--sd-tag-font-size': config.fontSize,
|
|
107
|
+
'--sd-tag-font-weight': config.fontWeight,
|
|
108
|
+
'--sd-tag-radius': config.radius,
|
|
109
|
+
}, "aria-label": this.label || 'tag' }, this.icon && this.isLeft && iconNode, index.h("span", { key: 'b123ab6ac015db640e4dc3edc5e2cf90ec5e0ecf', class: "sd-tag__label" }, this.label), this.icon && !this.isLeft && iconNode));
|
|
52
110
|
}
|
|
53
111
|
};
|
|
54
112
|
SdTag.style = sdTagCss();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Qvv0fGgj.js');
|
|
4
4
|
var resolveColor = require('./resolveColor-4RlaGD62.js');
|
|
5
5
|
|
|
6
6
|
const sdToastCss = () => `sd-toast{display:block;width:fit-content;height:fit-content}sd-toast .sd-toast{display:flex;width:fit-content;align-items:center;gap:16px;padding:12px 24px;border-radius:4px;background-color:var(--sd-toast-bg);color:var(--sd-toast-text);transition:opacity 0.2s ease, visibility 0.2s ease;box-shadow:2px 2px 8px 2px rgba(0, 0, 0, 0.2)}sd-toast .sd-toast--hidden{opacity:0;visibility:hidden;pointer-events:none}sd-toast .sd-toast__icon{display:flex;align-items:center;flex-shrink:0}sd-toast .sd-toast__content{display:flex;flex:1}sd-toast .sd-toast__message{font-size:14px;line-height:20px;font-weight:400}sd-toast .sd-toast__link{font-size:14px;line-height:20px;color:var(--sd-toast-text);text-decoration:underline;cursor:pointer;transition:opacity 0.2s ease;margin-left:4px}sd-toast .sd-toast__link:hover{opacity:0.8}sd-toast .sd-toast__button{flex-shrink:0}sd-toast .sd-toast__button button{color:var(--button-text-color, inherit) !important}sd-toast .sd-toast__close{display:flex;align-items:center;justify-content:center;padding:4px;background-color:transparent;border:none;cursor:pointer;transition:opacity 0.2s ease;flex-shrink:0}sd-toast .sd-toast__close:hover{opacity:0.7}sd-toast .sd-toast__close:active{opacity:0.5}`;
|
|
@@ -49,10 +49,10 @@ const SdToast = class {
|
|
|
49
49
|
background: resolveColor.resolveColor(colorTokens.background),
|
|
50
50
|
text: resolveColor.resolveColor(colorTokens.text),
|
|
51
51
|
};
|
|
52
|
-
return (index.h("div", { key: '
|
|
52
|
+
return (index.h("div", { key: '16579a21c0eec78e609b0cf82fcf2d040b8b3388', style: {
|
|
53
53
|
'--sd-toast-bg': colors.background,
|
|
54
54
|
'--sd-toast-text': colors.text,
|
|
55
|
-
} }, index.h("div", { key: '
|
|
55
|
+
} }, index.h("div", { key: '108e47983e1ad99ed462a4fa00c29aa9e3393b8b', class: this.getContainerClasses(), role: "status", "aria-live": "polite", "aria-atomic": "true" }, this.icon && (index.h("div", { key: 'd034c9aaafc272d51de96de6ccefe49208aba7e3', class: "sd-toast__icon" }, index.h("sd-icon", { key: '14b97c4cbe7134f67d919abcf4e10cf673dd909d', name: this.icon, size: 16, color: colors.text }))), index.h("div", { key: '1cecb89bdb19742a7df04625e8f070cd2c207b5e', class: "sd-toast__content" }, index.h("span", { key: '1daf2a2bea963b7b68c580b30c4c8fa2f3a26c8f', class: "sd-toast__message" }, this.message)), this.link && (index.h("a", { key: '8f7961c2c14806aa1323e378f57d74e47614772c', href: this.link, class: "sd-toast__link", target: "_blank", rel: "noopener noreferrer" }, this.linkLabel || this.link)), this.buttonLabel && (index.h("sd-button", { key: '89cba5e58ff368aea05130b799d903d4cf85b120', class: `sd-toast__button ${this.type === 'basicLight' ? 'text-white' : ''}`, label: this.buttonLabel, variant: "primary", color: this.type === 'basicLight' ? 'oceanblue_75' : 'white', size: "sm", onSdClick: this.handleButtonClick, style: this.type !== 'basicLight' ? { '--button-text-color': resolveColor.resolveColor('grey_95') } : {} })), this.useClose && (index.h("button", { key: '0e7fc0737824b61166cbff82a410948ca1745842', type: "button", class: "sd-toast__close", onClick: this.handleClose, "aria-label": "Close", title: "Close" }, index.h("sd-icon", { key: '82d203f6eb584cb04566e8f3b1bd7a86ca50bba4', name: "close", size: 12, color: colors.text }))))));
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
58
|
SdToast.style = sdToastCss();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Qvv0fGgj.js');
|
|
4
4
|
|
|
5
5
|
const sdToggleButtonCss = () => `sd-toggle-button{display:inline-block;line-height:0}.sd-toggle-button{display:inline-flex;align-items:center;justify-content:center;height:28px;padding:4px 12px;gap:6px;border-radius:14px;border:1px solid #888888;background-color:#FFFFFF;color:#737373;font-size:12px;line-height:20px;font-weight:400;cursor:pointer;transition:border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;white-space:nowrap;user-select:none;box-sizing:border-box}.sd-toggle-button--active{border-color:#0075FF;color:#0075FF}.sd-toggle-button--disabled{background-color:#EEEEEE;border-color:#CCCCCC;color:#888888;cursor:not-allowed}.sd-toggle-button--disabled.sd-toggle-button--active{background-color:#EEEEEE;border-color:#CCCCCC;color:#888888}.sd-toggle-button:hover:not(.sd-toggle-button--disabled):not(.sd-toggle-button--active){border-color:#737373}.sd-toggle-button:hover:not(.sd-toggle-button--disabled).sd-toggle-button--active{border-color:#005CC9;color:#005CC9}`;
|
|
6
6
|
|
|
@@ -41,7 +41,7 @@ const SdToggleButton = class {
|
|
|
41
41
|
this.change.emit(newValue);
|
|
42
42
|
};
|
|
43
43
|
render() {
|
|
44
|
-
return (index.h("label", { key: '
|
|
44
|
+
return (index.h("label", { key: '174a62904591e559232574d207ff4ad9c0113ad8', class: this.buttonClasses, "aria-label": this.label || 'toggle button' }, this.label, index.h("input", { key: '7bbd96a0563a8cadcfb7ab9d8e1fb3767508d6bf', style: { display: 'none' }, type: "checkbox", onInput: this.handleChange })));
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
SdToggleButton.style = sdToggleButtonCss();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Qvv0fGgj.js');
|
|
4
4
|
|
|
5
5
|
const sdToggleCss = () => `sd-toggle{display:inline-block;height:20px;line-height:0}sd-toggle .sd-toggle{cursor:pointer;display:inline-flex;align-items:center;gap:8px;height:20px}sd-toggle .sd-toggle>input{display:none}sd-toggle .sd-toggle__label{font-size:12px;color:#333333;line-height:20px}sd-toggle .sd-toggle__track{width:36px;height:20px;border-radius:12px;background:#CCCCCC;position:relative;transition:background-color 0.2s ease}sd-toggle .sd-toggle__thumb{width:16px;height:16px;border-radius:50%;background:white;position:absolute;top:2px;left:2px;transition:transform 0.2s ease}sd-toggle .sd-toggle--checked .sd-toggle__track{background:#0075FF}sd-toggle .sd-toggle--checked .sd-toggle__thumb{transform:translateX(16px)}sd-toggle .sd-toggle--disabled{cursor:not-allowed}sd-toggle .sd-toggle--disabled.sd-toggle--checked .sd-toggle__track{background:#BBDAFF}sd-toggle .sd-toggle--disabled.sd-toggle--unchecked .sd-toggle__track{background:#EEEEEE}sd-toggle .sd-toggle:hover:not(.sd-toggle--disabled).sd-toggle--checked .sd-toggle__track{background:#005CC9}sd-toggle .sd-toggle:hover:not(.sd-toggle--disabled).sd-toggle--unchecked .sd-toggle__track{background:#BBBBBB}`;
|
|
6
6
|
|
|
@@ -37,7 +37,7 @@ const SdToggle = class {
|
|
|
37
37
|
this.change.emit(newValue);
|
|
38
38
|
};
|
|
39
39
|
render() {
|
|
40
|
-
return (index.h("label", { key: '
|
|
40
|
+
return (index.h("label", { key: '9a8a0221e093040e446bc193f682070aa1f95c6c', "aria-label": this.label || 'toggle', class: this.toggleClasses }, index.h("input", { key: '4a2e3c626bfa4e439676cc40df619bd284d0178a', type: "checkbox", checked: this.value, disabled: this.disabled, onInput: this.handleChange }), this.label && index.h("span", { key: '1eecfd810c17610604d6cf93c6f664690f17ff6a', class: "sd-toggle__label" }, this.label), index.h("div", { key: '9f082e2f6036e338f2afb6fb719b4ff8d3a01d99', class: "sd-toggle__track" }, index.h("div", { key: '1d8b1bd11b05091a368c681ead7e79a0e453d510', class: "sd-toggle__thumb" }))));
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
SdToggle.style = sdToggleCss();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Qvv0fGgj.js');
|
|
4
4
|
|
|
5
5
|
const TooltipArrow = (props) => (index.h("svg", { width: "16", height: "12", viewBox: "0 0 16 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, index.h("path", { d: "M8.83205 10.7519C8.43623 11.3457 7.56377 11.3457 7.16795 10.7519L1.04907e-06 -1.39876e-06L16 0L8.83205 10.7519Z", fill: "currentColor" })));
|
|
6
6
|
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
"components/sd-select-multiple-group/sd-select-multiple-group.js",
|
|
14
14
|
"components/sd-table/sd-table.js",
|
|
15
15
|
"components/sd-tabs/sd-tabs.js",
|
|
16
|
-
"components/sd-tag/sd-tag.js",
|
|
17
16
|
"components/sd-toast/sd-toast.js",
|
|
18
17
|
"components/sd-badge/sd-badge.js",
|
|
19
18
|
"components/sd-button-v2/sd-button-v2.js",
|
|
@@ -38,6 +37,7 @@
|
|
|
38
37
|
"components/sd-select/sd-select-search-input/sd-select-search-input.js",
|
|
39
38
|
"components/sd-select-multiple/sd-select-multiple.js",
|
|
40
39
|
"components/sd-select-multiple-group/sd-select-option-group/sd-select-option-group.js",
|
|
40
|
+
"components/sd-tag/sd-tag.js",
|
|
41
41
|
"components/sd-textarea/sd-textarea.js",
|
|
42
42
|
"components/sd-toggle/sd-toggle.js",
|
|
43
43
|
"components/sd-toggle-button/sd-toggle-button.js"
|
|
@@ -6,7 +6,7 @@ export class SdBadge {
|
|
|
6
6
|
label = '';
|
|
7
7
|
render() {
|
|
8
8
|
const resolvedColor = resolveColor(this.color);
|
|
9
|
-
return (h("div", { key: '
|
|
9
|
+
return (h("div", { key: 'a83ffeb7171c32bafc3312d95c9fed576d676a0d', class: `sd-badge sd-badge--${this.size}`, style: { '--sd-badge-color': resolvedColor } }, h("div", { key: 'b6d84b2391d0e03edcab957b4edf73c765c04c35', class: "sd-badge__dot" }), h("div", { key: 'f06b5639135d87d7346b46c90a28ddeb40b05c9f', class: "sd-badge__label" }, this.label)));
|
|
10
10
|
}
|
|
11
11
|
static get is() { return "sd-badge"; }
|
|
12
12
|
static get originalStyleUrls() {
|
|
@@ -62,13 +62,13 @@ export class SdButtonV2 {
|
|
|
62
62
|
const iconOnly = !this.label && Boolean(this.icon);
|
|
63
63
|
const accessibleName = iconOnly && this.ariaLabel.trim() ? this.ariaLabel : undefined;
|
|
64
64
|
const iconColor = this.disabled ? DISABLED_CONTENT : PRESET_CONTENT_COLORS[preset];
|
|
65
|
-
return (h("button", { key: '
|
|
65
|
+
return (h("button", { key: '9adec3868e5337822463a5a37a741ef146a081be', class: this.getButtonClasses(preset, config.size, hasLabel, iconOnly), type: this.type, disabled: this.disabled, "aria-label": accessibleName, style: {
|
|
66
66
|
'--sd-button-v2-bg': config.variant === 'primary' ? config.color : '#FFFFFF',
|
|
67
67
|
'--sd-button-v2-bg-hover': PRESET_HOVER_BACKGROUNDS[preset],
|
|
68
68
|
'--sd-button-v2-border': PRESET_BORDER_COLORS[preset],
|
|
69
69
|
'--sd-button-v2-content': PRESET_CONTENT_COLORS[preset],
|
|
70
70
|
'--sd-button-v2-accent': BUTTON_FOCUS_RING_COLOR,
|
|
71
|
-
}, onClick: this.handleClick }, h("span", { key: '
|
|
71
|
+
}, onClick: this.handleClick }, h("span", { key: '849c90886e77e792e4e34ef064352361a29664f0', class: "sd-button-v2__content" }, this.icon && (h("sd-icon", { key: '5c5bc61ab43aa17124337a7107a3e6ab82f566ae', class: "sd-button-v2__icon", name: this.icon, size: BUTTON_ICON_SIZES[config.size], color: iconColor })), this.label && h("span", { key: 'e2d1a5ce465f07310a4d03966609baaf7e968b0e', class: "sd-button-v2__label" }, this.label))));
|
|
72
72
|
}
|
|
73
73
|
static get is() { return "sd-button-v2"; }
|
|
74
74
|
static get originalStyleUrls() {
|
|
@@ -3,7 +3,7 @@ export class SdCard {
|
|
|
3
3
|
bordered = false;
|
|
4
4
|
sdClass = '';
|
|
5
5
|
render() {
|
|
6
|
-
return (h(Fragment, { key: '
|
|
6
|
+
return (h(Fragment, { key: '3999f64f54054b3a1662fac4aacf9f6898acb957' }, h("div", { key: '666b8e849b92a5e75d259ff079237911fd591cdd', class: `sd-card ${this.bordered ? 'sd-card--bordered' : ''} ${this.sdClass}` }, h("slot", { key: 'dc8f4ae80e9aca7a0aecaed81f45d40e7df2c067' }))));
|
|
7
7
|
}
|
|
8
8
|
static get is() { return "sd-card"; }
|
|
9
9
|
static get originalStyleUrls() {
|
|
@@ -76,7 +76,7 @@ export class SdDatePicker {
|
|
|
76
76
|
this.isOpen = false;
|
|
77
77
|
};
|
|
78
78
|
render() {
|
|
79
|
-
return (h("div", { key: '
|
|
79
|
+
return (h("div", { key: 'cd2f9c240e1e67806d1d9334937a905330d29a1f', class: { 'sd-date-picker': true, 'sd-date-picker--disabled': this.disabled } }, h("sd-input", { key: '1d77404494bd1fadf15d82dfabecbf61b73e5da8', ref: el => (this.inputEl = el), value: this.value, label: this.label, "inside-label": true, readonly: true, disabled: this.disabled, placeholder: this.placeholder, inputClass: "sd-date-picker__input", onClick: () => this.openMenu() }, h("sd-icon", { key: '627b76b7d276cff34224a130bb2596ca6f2ff49e', 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: '9dd006a9051c22dd8084ae9cb72e82c9c0b9be2b', open: this.isOpen, parentRef: this.inputEl, onSdClose: this.handleClose }, h("div", { key: '5090eb945c7241f3224b3d2c7a5a96221cc46c04', class: "sd-date-picker__menu" }, h("div", { key: 'fa127745062937dfe4f04773b7d6afa74d13bd7a', class: "sd-date-picker__header" }, h("div", { key: '7c59917872614d1351a3dfe3783017bd6bc6b75c', class: "year-nav" }, h("button", { key: '9e27d2d76ca72820d57c2d9ebc40fa842129da22', type: "button", name: "prev-year", title: "Previous Year", onClick: () => this.setCurrentYear(this.currentYear - 1) }, h("sd-icon", { key: '17c8f872b7cfb2825d4c9528b5838487b97529f0', name: "arrowLeft", size: "12", color: "#CCCCCC" })), h("span", { key: '41999c78367c90bc4d1d9bfdeb6e3d29d44df2c2', class: "year-nav__current" }, this.currentYear), h("button", { key: '52953ec66118afd480e7ce6207a551f18b61ac6d', type: "button", name: "next-year", title: "Next Year", onClick: () => this.setCurrentYear(this.currentYear + 1) }, h("sd-icon", { key: 'e740bcc2a23f4df850b4e2579ce0cae14419313c', name: "arrowRight", size: "12", color: "#CCCCCC" }))), h("div", { key: '7fac86c6405a3936a1f0bdb51e5ca61463ef463a', class: "month-nav" }, h("button", { key: '62e22a2063c7ea972bf74ea08af0d519a5250b3f', type: "button", name: "prev-month", title: "Previous ", onClick: () => this.handleUpdateMonth('prev') }, h("sd-icon", { key: 'fa53cbb5f2e61a3b1f0807639ce2c81516a1ca57', name: "arrowLeft", size: "12", color: "#CCCCCC" })), h("span", { key: '57eb7eaf1e3a11ba69cf4ef4af9852541abd7902', class: "month-nav__current" }, this.currentMonth, "\uC6D4"), h("button", { key: '08a783b73efd7a5df2638df7c8bcac5411b2e642', type: "button", name: "next-month", title: "Next Month", onClick: () => this.handleUpdateMonth('next') }, h("sd-icon", { key: '4a5bb4f4e6f3105fc9fda008eb51a47efe606b81', name: "arrowRight", size: "12", color: "#CCCCCC" })))), h("div", { key: '8dd540a7188716446b2e9bcda707d7458a2ea817', class: "sd-date-picker__days" }, ['일', '월', '화', '수', '목', '금', '토'].map(day => (h("div", { key: day, class: "day" }, day)))), h("div", { key: 'f2da8d2325cb2fb9cb89d9c93d850cefc62235bf', class: "sd-date-picker__body" }, [
|
|
80
80
|
...this.calendar.prevMonthDays,
|
|
81
81
|
...this.calendar.days,
|
|
82
82
|
...this.calendar.afterMonthDays,
|
|
@@ -155,10 +155,10 @@ export class SdDateRangePicker {
|
|
|
155
155
|
this.setHoverDate(hoverDate);
|
|
156
156
|
}
|
|
157
157
|
render() {
|
|
158
|
-
return (h("div", { key: '
|
|
158
|
+
return (h("div", { key: '1862958ea2e972700ea83ed61f0285f09cf52c02', class: {
|
|
159
159
|
'sd-date-range-picker': true,
|
|
160
160
|
'sd-date-range-picker--disabled': this.disabled,
|
|
161
|
-
} }, h("sd-input", { key: '
|
|
161
|
+
} }, h("sd-input", { key: '808670f22b59401c0125dd1191a6180cc6f72799', ref: el => (this.inputEl = el), value: !!this.dateRange[0] ? `${this.dateRange[0]} ~ ${this.dateRange[1]}` : '', label: this.label, "inside-label": true, readonly: true, disabled: this.disabled, placeholder: this.placeholder, inputClass: "sd-date-range-picker__input", onClick: () => this.openMenu() }, h("sd-icon", { key: '123e8beb77c3fceaaa3a8d994f8a8539fe35d317', 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: '448c174030598565f910df316002d78bdfec3f89', open: this.isOpen, parentRef: this.inputEl, onSdClose: this.closeMenu }, h("div", { key: 'b5cf493587c7831e59a6156df87cb56be6bd585b', class: "sd-date-range-picker__menu" }, h("div", { key: 'c044d5377d0d88affecaa61eec2a2239b87158d8', class: "sd-date-range-picker__header mb-16pxr flex flex-nowrap items-center justify-center" }, h("button", { key: 'c497891fe1d06b8f6c1a79000edc0e4f4fd79735', type: "button", name: "prev", title: "Previous", onClick: () => this.setPrevYear(this.prevYear - 1) }, h("sd-icon", { key: 'ad899e9daec0752b744bc73e9cbd99c6a731b7db', name: "arrowLeft", size: "12", color: "#CCCCCC" })), h("div", { key: '595ac699adc90e8b15775ce47a2cda8bbc2f5c25', class: "header-label" }, this.prevYear), h("button", { key: '684ce75f14b08cd57ce6f019a1dfb3ab384b0c11', type: "button", name: "next", title: "Next", onClick: () => this.setPrevYear(this.prevYear + 1) }, h("sd-icon", { key: '31dde7526d0ee3e7abf965eea6f825d557e7c745', name: "arrowRight", size: "12", color: "#CCCCCC" }))), h("div", { key: '3e70334c95d29f302f2dc6d1cb7fbb3603c74a48', 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
|
|
162
162
|
? `${this.prevYear}.${String(this.prevMonth).padStart(2, '0')}`
|
|
163
163
|
: `${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)) }))))))))))))));
|
|
164
164
|
}
|
|
@@ -170,7 +170,7 @@ export class SdDropdownButton extends BaseDropdownEvent {
|
|
|
170
170
|
render() {
|
|
171
171
|
const { config, preset } = this.resolvedConfig;
|
|
172
172
|
const chevronColor = this.disabled ? DROPDOWN_DISABLED_CONTENT : PRESET_CONTENT_COLORS[preset];
|
|
173
|
-
return (h("div", { key: '
|
|
173
|
+
return (h("div", { key: '93869c11681e1ebaa54ff64fb940a9a5ae6b10e1', class: "sd-dropdown-button" }, h("button", { key: 'e21f44d8b18ed969a30e37263d74327cae73b543', 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: {
|
|
174
174
|
'--sd-dropdown-button-min-width': `${DROPDOWN_BUTTON_MIN_WIDTHS[config.size]}px`,
|
|
175
175
|
'--sd-dropdown-button-bg': config.color,
|
|
176
176
|
'--sd-dropdown-button-bg-hover': PRESET_HOVER_BACKGROUNDS[preset],
|
|
@@ -181,7 +181,7 @@ export class SdDropdownButton extends BaseDropdownEvent {
|
|
|
181
181
|
'--sd-dropdown-button-disabled-bg': DROPDOWN_DISABLED_BACKGROUND,
|
|
182
182
|
'--sd-dropdown-button-disabled-content': DROPDOWN_DISABLED_CONTENT,
|
|
183
183
|
'--sd-dropdown-button-disabled-border': DROPDOWN_DISABLED_BORDER,
|
|
184
|
-
} }, h("span", { key: '
|
|
184
|
+
} }, h("span", { key: '561db14272548fc4eb9ffcf750894198180c0d57', class: "sd-dropdown-button__trigger-label" }, this.label), h("span", { key: '954a689fc1387fd5b37964188c209049f21f94ba', class: "sd-dropdown-button__trigger-divider", "aria-hidden": "true" }), h("span", { key: '41a603c6549fda954eca10081e2d4386c3284561', class: "sd-dropdown-button__trigger-icon", "aria-hidden": "true" }, h("sd-icon", { key: 'f38cb3ee71cdcc11db5993d3aa96f7e1c23953d0', name: this.isOpen ? 'arrowUp' : 'arrowDown', size: 12, color: chevronColor }))), this.renderDropdown(preset)));
|
|
185
185
|
}
|
|
186
186
|
static get is() { return "sd-dropdown-button"; }
|
|
187
187
|
static get originalStyleUrls() {
|
|
@@ -114,15 +114,15 @@ export class SdField {
|
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
render() {
|
|
117
|
-
return (h("div", { key: '
|
|
117
|
+
return (h("div", { key: '9ed0e615761d5c76dff1e95318b131bde22cd376', class: {
|
|
118
118
|
'sd-field': true,
|
|
119
119
|
'sd-field--has-label': !!this.label,
|
|
120
120
|
'sd-field--has-label-inside': !!this.label && this.insideLabel,
|
|
121
121
|
[this.fieldStatus]: !!this.fieldStatus,
|
|
122
|
-
} }, h("div", { key: '
|
|
122
|
+
} }, h("div", { key: '6d051479c9874f3c765d50096db80c73c4fc461b', class: "sd-field__wrapper" }, this.renderLabel(this.label), h("div", { key: '64ea18d481f0ad689ed984cd40837717fb37a751', class: {
|
|
123
123
|
'sd-field__control': true,
|
|
124
124
|
'sd-field__control--label-inside ': !!this.label && this.insideLabel,
|
|
125
|
-
} }, h("slot", { key: '
|
|
125
|
+
} }, h("slot", { key: '8e043b3e476e0d574612c892f6c8c0bca28c117f' }))), this.errorMsg && h("div", { key: '22d42bacdbdfe85dbe08395d21e59a06946986f5', class: "sd-field__error-message" }, this.errorMsg)));
|
|
126
126
|
}
|
|
127
127
|
renderLabel(label) {
|
|
128
128
|
if (!label)
|
|
@@ -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: '8d0b3002090064a062df3bc21e54fb8011a520ed', 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: 'e58b89fa203a86286d088a7ec7b1be0f740b948a', 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: '42440a854a85aeed63f887b25fa13d9609202974', name: "attachFile", size: 16, color: this.getIconColor(), class: "sd-file-picker__icon" }), h("div", { key: '25bd48b058fcff917aa1ee13c9cd991c49ef4aa1', 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: '9d82107ff69909519d1a3051054c42370e6b181c', name: "close", size: 12, color: "#888888", class: "sd-file-picker__clear-icon", onClick: this.handleClear })), this.showTooltip && hasFiles && this.hovered && (h("div", { key: '8c8dfeb9a82c4ca69e6ae88aa8f129c72d884b14', 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: 'fe02da5ce55072c8fa313e467967f2a1c18f86bb' });
|
|
148
148
|
}
|
|
149
149
|
static get is() { return "sd-floating-portal"; }
|
|
150
150
|
static get originalStyleUrls() {
|
|
@@ -47,9 +47,9 @@ export class SdGuide {
|
|
|
47
47
|
};
|
|
48
48
|
render() {
|
|
49
49
|
const { name: iconName, size: iconSize, color: iconColor } = GUIDE_ICON[this.type];
|
|
50
|
-
return (h("div", { key: '
|
|
50
|
+
return (h("div", { key: '69dc81c8fe0c5843e86709e72f0cdf3ecaf8c52a', class: "sd-guide", style: {
|
|
51
51
|
'--sd-guide-color': GUIDE_ICON[this.type].color,
|
|
52
|
-
} }, h("sd-button", { key: '
|
|
52
|
+
} }, h("sd-button", { key: '254e03a9d2e4d36ca26a23158acc960dcfb90578', 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 && (h("sd-portal", { key: '701a049ebcabd0b29fa74fac246cecdedace2022', open: this.popupShow, parentRef: this.guideRef, onSdClose: this.closeDropdown, offset: [0, 4] }, h("div", { key: 'e8f8efcbcbe29d51a29a8ca3803ed0a754a42531', style: { position: 'absolute', width: '0px', height: '0px' } }, h("div", { key: '5f54893503560535d6adedea41d81182c72b04e5', class: "sd-guide__popup", style: { width: this.popupWidth ? this.popupWidth + 'px' : '426px' } }, h("sd-button", { key: '9747683a1123307a9e4214e0f4be63fd09af1fec', class: "sd-guide__popup__close", icon: "close", color: "grey_65", size: "md", variant: "ghost", noHover: true, onSdClick: this.closeDropdown }), h("div", { key: '9fb06eaeae5fc0a805855b78b8d67583183f7a8c', class: "sd-guide__popup__header" }, h("sd-icon", { key: 'ad4b7e1e5740bbd32877efc0a5614b4e657aca8a', name: "helpOutline", size: 24, color: "green_65" }), h("h3", { key: '5cdf73e175a51b13ee2c5408014de27a9650ac20', class: "sd-guide__popup__title" }, this.popupTitle || GUIDE_LABEL[this.type])), h("ul", { key: 'f02a8cf5ffe831d2a466e4357f7721c5622d7bee', class: "sd-guide__popup__list" }, this.renderListItem(this.message))))))));
|
|
53
53
|
}
|
|
54
54
|
// 현재 2depth까지만 스타일 적용
|
|
55
55
|
renderListItem(message, depth = 0) {
|
|
@@ -25,7 +25,7 @@ export class SdIcon {
|
|
|
25
25
|
}
|
|
26
26
|
render() {
|
|
27
27
|
const IconComponent = Icons[this.name]?.[this.size];
|
|
28
|
-
return (h("i", { key: '
|
|
28
|
+
return (h("i", { key: '69b8654e2fd745282c1878306a5c464ba0995468', class: this.getIconClasses(), style: this.iconStyle }, h(IconComponent, { key: '64b00309d5ad7787c4fbf2c200719fd74062ccbd', color: this.resolvedColor })));
|
|
29
29
|
}
|
|
30
30
|
static get is() { return "sd-icon"; }
|
|
31
31
|
static get originalStyleUrls() {
|
|
@@ -85,7 +85,7 @@ export class SdInput {
|
|
|
85
85
|
}
|
|
86
86
|
};
|
|
87
87
|
render() {
|
|
88
|
-
return (h("sd-field", { key: '
|
|
88
|
+
return (h("sd-field", { key: '7f32214220ee8dc3e830597b84f846096b48b305', name: this.name, label: this.label, insideLabel: this.insideLabel, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, useLabelRequired: this.useLabelRequired, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, h("label", { key: '71b1f7ce70d475e28f1d9f29c9a49b3f2f548f53', class: "sd-input__content", style: { width: '100%' } }, h("slot", { key: 'c0c92d686b4cee0930716a47a701459c3afc41ff', name: "prefix" }), h("input", { key: '1cdacf0a76d118c0711bae5b1263650c195db838', name: this.name, ref: el => (this.nativeEl = el), class: `sd-input__native ${this.inputClass}`, type: this.type, value: this.internalValue || '', placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, autofocus: this.autoFocus, onInput: this.handleInput, onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event), style: this.inputStyle }), h("slot", { key: '7786756fca59c02dfb159f10e2925f73b64f0366', name: "suffix" }), this.clearable && this.internalValue && (h("sd-icon", { key: '82b24cae340687d7412ec5210548ad92e33be744', name: "close", color: "grey_65", size: "16", class: "sd-input__clear-icon", onClick: async () => {
|
|
89
89
|
this.internalValue = '';
|
|
90
90
|
await this.formField?.sdValidate();
|
|
91
91
|
} })))));
|
|
@@ -6,7 +6,7 @@ export class SdLoadingSpinner {
|
|
|
6
6
|
return resolveColor(this.color);
|
|
7
7
|
}
|
|
8
8
|
render() {
|
|
9
|
-
return (h(Fragment, { key: '
|
|
9
|
+
return (h(Fragment, { key: '2b60d18fe2f1dc23d90c5552202cdea60a91b2c0' }, h("svg", { key: 'd8e8716433c206019384899897b052d28d486f92', class: "sd-loading-spinner", width: "72px", height: "72px", viewBox: "25 25 50 50", style: { color: this.resolvedColor } }, h("circle", { key: 'c9aaffe398dd40ccea3a2d8a89cb880e3eeb5a6d', class: "path", cx: "50", cy: "50", r: "20", fill: "none", stroke: "currentColor", "stroke-width": "5", "stroke-miterlimit": "10" }))));
|
|
10
10
|
}
|
|
11
11
|
static get is() { return "sd-loading-spinner"; }
|
|
12
12
|
static get originalStyleUrls() {
|
|
@@ -240,17 +240,17 @@ export class SdNumberInput {
|
|
|
240
240
|
const inputStyles = {
|
|
241
241
|
textAlign: this.useButton ? 'center' : 'right',
|
|
242
242
|
};
|
|
243
|
-
return (h("sd-field", { key: '
|
|
243
|
+
return (h("sd-field", { key: 'e72a01e264aa4d680aa740f5098e3be9bb7ac8ac', name: this.name, label: this.label, insideLabel: this.insideLabel, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, ref: el => (this.formField = el), style: inputWidth }, h("label", { key: '3006df4eaf22ecf7e9ad330270623ba7cbbf9c9a', class: {
|
|
244
244
|
'sd-number-input': true,
|
|
245
245
|
[this.getInputStatus()]: true,
|
|
246
246
|
'sd-number-input--with-buttons': this.useButton,
|
|
247
|
-
}, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: this.inputStyle }, h("input", { key: '
|
|
247
|
+
}, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: this.inputStyle }, h("input", { key: 'e52177d9c7266a1630d9287fdc155f12a5dc7cca', name: this.name, ref: el => (this.nativeEl = el), class: `sd-number-input__input ${this.inputClass}`, type: "text", inputMode: "numeric", value: this.displayValue, placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, autofocus: this.autoFocus, onInput: this.handleInput, onKeyDown: this.handleKeyDown, style: inputStyles, onFocus: this.handleFocus, onBlur: this.handleBlur }), this.useButton && (h("div", { key: '18f45963c22ee6a1cdd52e45b41191c3726328ce', class: "sd-number-input__buttons" }, h("button", { key: '73658fecb2300094b1880cae4595975b777b802a', type: "button", class: {
|
|
248
248
|
'sd-number-input__button': true,
|
|
249
249
|
'sd-number-input__button--decrement': true,
|
|
250
|
-
}, disabled: this.isDecrementDisabled(), onClick: this.handleDecrement, tabindex: -1 }, h("sd-icon", { key: '
|
|
250
|
+
}, disabled: this.isDecrementDisabled(), onClick: this.handleDecrement, tabindex: -1 }, h("sd-icon", { key: 'd2b4d8eb6b7f5dd30ba704c7d7b35051a5b0df7b', name: "minus", size: 12, color: this.isDecrementDisabled() ? 'grey_45' : 'brilliantblue_70' })), h("button", { key: 'ddcd2255b7870657afbb6549cdc185a804aa3dbf', type: "button", class: {
|
|
251
251
|
'sd-number-input__button': true,
|
|
252
252
|
'sd-number-input__button--increment': true,
|
|
253
|
-
}, disabled: this.isIncrementDisabled(), onClick: this.handleIncrement, tabindex: -1 }, h("sd-icon", { key: '
|
|
253
|
+
}, disabled: this.isIncrementDisabled(), onClick: this.handleIncrement, tabindex: -1 }, h("sd-icon", { key: '971098976698154e8e644a93265dc746177c2ce0', name: "add", size: 12, color: this.isIncrementDisabled() ? 'grey_45' : 'brilliantblue_70' })))))));
|
|
254
254
|
}
|
|
255
255
|
static get is() { return "sd-number-input"; }
|
|
256
256
|
static get originalStyleUrls() {
|
|
@@ -68,12 +68,12 @@ export class SdPagination {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
render() {
|
|
71
|
-
return (h("div", { key: '
|
|
71
|
+
return (h("div", { key: '8ab0a0f2dfb17154eaba138aa0688606500be296', class: this.paginationClasses }, h("div", { key: '04b985f2d3e06ef35b18d6d375021499f36952f1', class: "prepend-btns" }, this.renderPrevButtons()), this.simple ? (h("div", { class: "pagination-info" }, h("span", { class: "current-page" }, this.currentPage), h("span", null, "/"), h("span", { class: "last-page" }, this.lastPage))) : (this.pageNumbers.map(n => (h("button", { type: "button", "aria-current": this.currentPage === n ? 'page' : undefined, class: {
|
|
72
72
|
'pagination-btn': true,
|
|
73
73
|
'pagination-btn--selected': this.currentPage === n,
|
|
74
74
|
}, disabled: this.currentPage === n, style: {
|
|
75
75
|
'--pagination-btn-width': `${this.buttonWidth}px`,
|
|
76
|
-
}, onClick: () => this.handlePageChange(n) }, n)))), h("div", { key: '
|
|
76
|
+
}, onClick: () => this.handlePageChange(n) }, n)))), h("div", { key: 'c2ef87605487622bed06cac8d13d180f4af23e76', class: "append-btns" }, this.renderNextButtons())));
|
|
77
77
|
}
|
|
78
78
|
static get is() { return "sd-pagination"; }
|
|
79
79
|
static get originalStyleUrls() {
|
|
@@ -30,11 +30,11 @@ export class SdPopover {
|
|
|
30
30
|
this.showPopover = false;
|
|
31
31
|
};
|
|
32
32
|
render() {
|
|
33
|
-
return (h(Fragment, { key: '
|
|
33
|
+
return (h(Fragment, { key: 'fae8880113285544053957bb096c6618dfddc7ec' }, this.label ? (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) })) : (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 && (h("sd-floating-portal", { key: '45323134dcbce4014492dde03c1416deda339ee1', parentRef: this.buttonEl, onSdClose: this.handleClose, placement: this.placement }, h("div", { key: 'c662820224d2c90bb806d2ac010cc95a53308b3a', class: {
|
|
34
34
|
'sd-floating-menu': true,
|
|
35
35
|
[`sd-floating-menu--${this.placement}`]: true,
|
|
36
36
|
[this.menuClass]: !!this.menuClass,
|
|
37
|
-
} }, h("i", { key: '
|
|
37
|
+
} }, h("i", { key: '55bc21085df77a027d252d5c3ef6d665207c71f6', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${this.placement}` }, h(TooltipArrow, { key: 'a9bb570b87481c0fe897e65ada655537dd4b8724' })), h("div", { key: '5f28d241157a9f5481fc7fa4e48fd00fac1def5a', class: "sd-floating-menu__content" }, this.menuTitle && h("div", { key: 'cc1dcbe2703dca70004159aa9fe8b18b122d8dbc', class: "sd-floating-menu__title" }, this.menuTitle), this.messages.length > 0 && (h("div", { key: 'f7b72df569c2dce9e6c85bcd9509e38ac9cbbb80', class: "sd-floating-menu__messages" }, this.messages.map(message => (h("div", null, message))))), this.buttons.length > 0 && (h("div", { key: 'd01d2bc92e79454d747b2fd976bfeb431d4d90fe', class: `sd-floating-menu__buttons sd-floating-menu__buttons--${this.buttons.length}` }, this.buttons.map(button => (h("sd-button", { ...button })))))), this.useClose && (h("button", { key: '9cf8cbd72d5bec64636b778ea0642d56c3229590', title: "close", class: "sd-floating-menu__close-button", onClick: () => this.handleClose() }, h("sd-icon", { key: '6df940385a9472e73b408cc51c647c98c95a9af7', name: "close", size: "12", color: "gery_55" }))))))));
|
|
38
38
|
}
|
|
39
39
|
static get is() { return "sd-popover"; }
|
|
40
40
|
static get originalStyleUrls() {
|
|
@@ -177,7 +177,7 @@ export class SdPortal {
|
|
|
177
177
|
this.close.emit();
|
|
178
178
|
}
|
|
179
179
|
render() {
|
|
180
|
-
return h("slot", { key: '
|
|
180
|
+
return h("slot", { key: 'ceaa6bed28e3b1bd1a539091434fd7acee6a0e4b' });
|
|
181
181
|
}
|
|
182
182
|
static get is() { return "sd-portal"; }
|
|
183
183
|
static get properties() {
|
|
@@ -33,10 +33,10 @@ export class SdProgress {
|
|
|
33
33
|
return this.statusColor[this.progressStatus];
|
|
34
34
|
}
|
|
35
35
|
render() {
|
|
36
|
-
return (h("div", { key: '
|
|
36
|
+
return (h("div", { key: 'a9b7c4a0bb44f7455ea21f632d3ec8edbcc97522', style: {
|
|
37
37
|
'--progress-color': this.progressColor,
|
|
38
38
|
'--progress-percentage': `${this.progressPercentage}%`,
|
|
39
|
-
} }, this.type === 'bar' ? this.renderBarProgress() : this.renderSpinnerProgress(), this.label && h("div", { key: '
|
|
39
|
+
} }, this.type === 'bar' ? this.renderBarProgress() : this.renderSpinnerProgress(), this.label && h("div", { key: 'ff0dfde8b43315883d2e4f17aa5e426fb6bf54ee', class: "sd-progress__label" }, this.label)));
|
|
40
40
|
}
|
|
41
41
|
renderBarProgress() {
|
|
42
42
|
return (h("div", { class: `sd-progress__bar sd-progress__bar--${this.progressStatus}` }, h("div", { class: ['sd-progress__bar__percent', this.progressPercentage < 100 ? 'proceed' : ''].join(' ') }), h("div", { class: "sd-progress__bar__indicator sd-progress__bar__indicator--left" }, this.progressPercentage, "%"), h("div", { class: "sd-progress__bar__indicator sd-progress__bar__indicator--right" }, this.progressPercentage, "%")));
|