@sellmate/design-system 0.0.0 → 0.0.2
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/loader.cjs.js +1 -1
- package/dist/cjs/sd-button.sd-guide.sd-icon.sd-portal.entry.cjs.js.map +1 -0
- package/dist/cjs/sd-button_4.cjs.entry.js +851 -0
- package/dist/cjs/sd-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/sd-date-box.sd-input.entry.cjs.js.map +1 -0
- package/dist/cjs/sd-date-box_2.cjs.entry.js +171 -0
- package/dist/cjs/sd-date-picker.cjs.entry.js +102 -0
- package/dist/cjs/sd-date-picker.entry.cjs.js.map +1 -0
- package/dist/cjs/sd-date-range-picker.cjs.entry.js +2 -2
- package/dist/cjs/sd-pagination.sd-tooltip.entry.cjs.js.map +1 -0
- package/dist/cjs/{sd-pagination.cjs.entry.js → sd-pagination_2.cjs.entry.js} +46 -3
- package/dist/cjs/sd-popover.cjs.entry.js +2 -2
- package/dist/cjs/sd-select-option.cjs.entry.js +1 -1
- package/dist/cjs/sd-table.cjs.entry.js +92 -45
- package/dist/cjs/sd-table.entry.cjs.js.map +1 -1
- package/dist/cjs/sd-tag.cjs.entry.js +1 -1
- package/dist/cjs/sd-tooltip-portal.cjs.entry.js +158 -0
- package/dist/cjs/sd-tooltip-portal.entry.cjs.js.map +1 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/assets/event/Event16.js +3 -0
- package/dist/collection/components/assets/event/Event16.js.map +1 -0
- package/dist/collection/components/assets/event/index.js +5 -0
- package/dist/collection/components/assets/event/index.js.map +1 -0
- package/dist/collection/components/assets/index.js +8 -0
- package/dist/collection/components/assets/index.js.map +1 -1
- package/dist/collection/components/assets/notion/Notion16.js +3 -0
- package/dist/collection/components/assets/notion/Notion16.js.map +1 -0
- package/dist/collection/components/assets/notion/index.js +5 -0
- package/dist/collection/components/assets/notion/index.js.map +1 -0
- package/dist/collection/components/assets/pdf/Pdf10.js +3 -0
- package/dist/collection/components/assets/pdf/Pdf10.js.map +1 -0
- package/dist/collection/components/assets/pdf/Pdf12.js +3 -0
- package/dist/collection/components/assets/pdf/Pdf12.js.map +1 -0
- package/dist/collection/components/assets/pdf/Pdf16.js +3 -0
- package/dist/collection/components/assets/pdf/Pdf16.js.map +1 -0
- package/dist/collection/components/assets/pdf/Pdf20.js +3 -0
- package/dist/collection/components/assets/pdf/Pdf20.js.map +1 -0
- package/dist/collection/components/assets/pdf/Pdf24.js +3 -0
- package/dist/collection/components/assets/pdf/Pdf24.js.map +1 -0
- package/dist/collection/components/assets/pdf/Pdf8.js +3 -0
- package/dist/collection/components/assets/pdf/Pdf8.js.map +1 -0
- package/dist/collection/components/assets/pdf/index.js +15 -0
- package/dist/collection/components/assets/pdf/index.js.map +1 -0
- package/dist/collection/components/assets/youtube/Youtube20.js +3 -0
- package/dist/collection/components/assets/youtube/Youtube20.js.map +1 -0
- package/dist/collection/components/assets/youtube/index.js +5 -0
- package/dist/collection/components/assets/youtube/index.js.map +1 -0
- package/dist/collection/components/sd-button/sd-button.js +94 -3
- package/dist/collection/components/sd-button/sd-button.js.map +1 -1
- package/dist/collection/components/sd-checkbox/sd-checkbox.js +1 -1
- package/dist/collection/components/sd-date-picker/sd-date-picker.js +2 -2
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.js +2 -2
- package/dist/collection/components/sd-guide/sd-guide.css +1426 -0
- package/dist/collection/components/sd-guide/sd-guide.js +218 -0
- package/dist/collection/components/sd-guide/sd-guide.js.map +1 -0
- package/dist/collection/components/sd-icon/sd-icon.js +30 -2
- package/dist/collection/components/sd-icon/sd-icon.js.map +1 -1
- package/dist/collection/components/sd-input/sd-input.js +2 -2
- package/dist/collection/components/sd-pagination/sd-pagination.js +2 -2
- package/dist/collection/components/sd-popover/sd-popover.js +3 -3
- package/dist/collection/components/sd-portal/sd-portal.js +1 -1
- package/dist/collection/components/sd-select/sd-select-option/sd-select-option.js +1 -1
- package/dist/collection/components/sd-table/sd-table.css +65 -2
- package/dist/collection/components/sd-table/sd-table.js +133 -45
- package/dist/collection/components/sd-table/sd-table.js.map +1 -1
- package/dist/collection/components/sd-tag/sd-tag.js +1 -1
- package/dist/collection/components/sd-tooltip/sd-tooltip.js +3 -3
- package/dist/collection/components/sd-tooltip-portal/sd-tooltip-portal.js +1 -1
- package/dist/collection/utils/color/index.js +3 -0
- package/dist/collection/utils/color/index.js.map +1 -0
- package/dist/collection/utils/color/isColorKey.js +7 -0
- package/dist/collection/utils/color/isColorKey.js.map +1 -0
- package/dist/collection/utils/color/resolveColor.js +11 -0
- package/dist/collection/utils/color/resolveColor.js.map +1 -0
- package/dist/components/{p-DFpwyGDV.js → p-B9i2YE0t.js} +5 -5
- package/dist/components/{p-DFpwyGDV.js.map → p-B9i2YE0t.js.map} +1 -1
- package/dist/components/{p-BGwfm6Tq.js → p-BCYA4Zc8.js} +3 -3
- package/dist/components/{p-BGwfm6Tq.js.map → p-BCYA4Zc8.js.map} +1 -1
- package/dist/components/{p-DQOaZqiU.js → p-BYJLcD4q.js} +5 -5
- package/dist/components/{p-DQOaZqiU.js.map → p-BYJLcD4q.js.map} +1 -1
- package/dist/components/{p-tyayzXea.js → p-BYycGbL4.js} +7 -7
- package/dist/components/{p-tyayzXea.js.map → p-BYycGbL4.js.map} +1 -1
- package/dist/components/{p-DxXmSZym.js → p-C8U-8ibc.js} +15 -5
- package/dist/components/p-C8U-8ibc.js.map +1 -0
- package/dist/components/{p-CJphMObM.js → p-CUaQiV_x.js} +338 -5
- package/dist/components/p-CUaQiV_x.js.map +1 -0
- package/dist/components/{p-BfaN9cMr.js → p-CyxZzPBJ.js} +3 -3
- package/dist/components/{p-BfaN9cMr.js.map → p-CyxZzPBJ.js.map} +1 -1
- package/dist/components/{p-DKsiyJkt.js → p-_NsXHYCA.js} +5 -5
- package/dist/components/{p-DKsiyJkt.js.map → p-_NsXHYCA.js.map} +1 -1
- package/dist/components/{p-CA23o9eA.js → p-ru6C2WME.js} +4 -4
- package/dist/components/{p-CA23o9eA.js.map → p-ru6C2WME.js.map} +1 -1
- package/dist/components/sd-button.js +1 -1
- package/dist/components/sd-checkbox.js +1 -1
- package/dist/components/sd-date-picker.js +5 -5
- package/dist/components/sd-date-range-picker.js +5 -5
- package/dist/components/sd-guide.d.ts +11 -0
- package/dist/components/sd-guide.js +152 -0
- package/dist/components/sd-guide.js.map +1 -0
- package/dist/components/sd-icon.js +1 -1
- package/dist/components/sd-input.js +1 -1
- package/dist/components/sd-pagination.js +1 -1
- package/dist/components/sd-popover.js +5 -5
- package/dist/components/sd-portal.js +1 -1
- package/dist/components/sd-select-option.js +1 -1
- package/dist/components/sd-select.js +5 -5
- package/dist/components/sd-table.js +108 -56
- package/dist/components/sd-table.js.map +1 -1
- package/dist/components/sd-tag.js +1 -1
- package/dist/components/sd-tooltip-portal.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-0be303fc.entry.js +2 -0
- package/dist/design-system/p-0be303fc.entry.js.map +1 -0
- package/dist/design-system/p-2106f2b1.entry.js +2 -0
- package/dist/design-system/p-2106f2b1.entry.js.map +1 -0
- package/dist/design-system/{p-eab8c812.entry.js → p-3d8c249d.entry.js} +2 -2
- package/dist/design-system/{p-c788ce90.entry.js → p-3ec8c5aa.entry.js} +2 -2
- package/dist/design-system/p-47a18185.entry.js +2 -0
- package/dist/design-system/p-47a18185.entry.js.map +1 -0
- package/dist/design-system/{p-448aeb40.entry.js → p-95e7d47f.entry.js} +2 -2
- package/dist/design-system/{p-5018e77a.entry.js → p-9e1abc28.entry.js} +2 -2
- package/dist/design-system/p-9edcce39.entry.js +2 -0
- package/dist/design-system/p-9edcce39.entry.js.map +1 -0
- package/dist/design-system/p-ae72caf9.entry.js +2 -0
- package/dist/design-system/p-ae72caf9.entry.js.map +1 -0
- package/dist/design-system/p-af40a2ec.entry.js +2 -0
- package/dist/design-system/p-af40a2ec.entry.js.map +1 -0
- package/dist/design-system/p-bda0d32b.entry.js +2 -0
- package/dist/design-system/{p-d47cde44.entry.js.map → p-bda0d32b.entry.js.map} +1 -1
- package/dist/design-system/sd-button.sd-guide.sd-icon.sd-portal.entry.esm.js.map +1 -0
- package/dist/design-system/sd-date-box.sd-input.entry.esm.js.map +1 -0
- package/dist/design-system/sd-date-picker.entry.esm.js.map +1 -0
- package/dist/design-system/sd-pagination.sd-tooltip.entry.esm.js.map +1 -0
- package/dist/design-system/sd-table.entry.esm.js.map +1 -1
- package/dist/design-system/sd-tooltip-portal.entry.esm.js.map +1 -0
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sd-button.sd-guide.sd-icon.sd-portal.entry.js.map +1 -0
- package/dist/esm/sd-button_4.entry.js +846 -0
- package/dist/esm/sd-checkbox.entry.js +1 -1
- package/dist/esm/sd-date-box.sd-input.entry.js.map +1 -0
- package/dist/esm/sd-date-box_2.entry.js +168 -0
- package/dist/esm/sd-date-picker.entry.js +100 -0
- package/dist/esm/sd-date-picker.entry.js.map +1 -0
- package/dist/esm/sd-date-range-picker.entry.js +2 -2
- package/dist/esm/sd-pagination.sd-tooltip.entry.js.map +1 -0
- package/dist/esm/{sd-pagination.entry.js → sd-pagination_2.entry.js} +47 -5
- package/dist/esm/sd-popover.entry.js +2 -2
- package/dist/esm/sd-select-option.entry.js +1 -1
- package/dist/esm/sd-table.entry.js +93 -46
- package/dist/esm/sd-table.entry.js.map +1 -1
- package/dist/esm/sd-tag.entry.js +1 -1
- package/dist/esm/sd-tooltip-portal.entry.js +156 -0
- package/dist/esm/sd-tooltip-portal.entry.js.map +1 -0
- package/dist/types/components/assets/event/Event16.d.ts +1 -0
- package/dist/types/components/assets/event/index.d.ts +3 -0
- package/dist/types/components/assets/index.d.ts +17 -0
- package/dist/types/components/assets/notion/Notion16.d.ts +1 -0
- package/dist/types/components/assets/notion/index.d.ts +3 -0
- package/dist/types/components/assets/pdf/Pdf10.d.ts +1 -0
- package/dist/types/components/assets/pdf/Pdf12.d.ts +1 -0
- package/dist/types/components/assets/pdf/Pdf16.d.ts +1 -0
- package/dist/types/components/assets/pdf/Pdf20.d.ts +1 -0
- package/dist/types/components/assets/pdf/Pdf24.d.ts +1 -0
- package/dist/types/components/assets/pdf/Pdf8.d.ts +1 -0
- package/dist/types/components/assets/pdf/index.d.ts +8 -0
- package/dist/types/components/assets/youtube/Youtube20.d.ts +1 -0
- package/dist/types/components/assets/youtube/index.d.ts +3 -0
- package/dist/types/components/sd-button/sd-button.d.ts +4 -0
- package/dist/types/components/sd-guide/sd-guide.d.ts +25 -0
- package/dist/types/components/sd-icon/sd-icon.d.ts +2 -0
- package/dist/types/components/sd-table/sd-table.d.ts +20 -17
- package/dist/types/components.d.ts +85 -0
- package/dist/types/utils/color/index.d.ts +2 -0
- package/dist/types/utils/color/isColorKey.d.ts +4 -0
- package/dist/types/utils/color/resolveColor.d.ts +1 -0
- package/package.json +2 -2
- package/readme.md +83 -69
- package/dist/cjs/sd-button.sd-date-box.sd-date-picker.sd-icon.sd-input.sd-portal.sd-tooltip.sd-tooltip-portal.entry.cjs.js.map +0 -1
- package/dist/cjs/sd-button_8.cjs.entry.js +0 -869
- package/dist/cjs/sd-pagination.entry.cjs.js.map +0 -1
- package/dist/components/p-CJphMObM.js.map +0 -1
- package/dist/components/p-DxXmSZym.js.map +0 -1
- package/dist/design-system/p-3f905629.entry.js +0 -2
- package/dist/design-system/p-3f905629.entry.js.map +0 -1
- package/dist/design-system/p-bbe6f8ef.entry.js +0 -2
- package/dist/design-system/p-bbe6f8ef.entry.js.map +0 -1
- package/dist/design-system/p-d47cde44.entry.js +0 -2
- package/dist/design-system/p-f4825797.entry.js +0 -2
- package/dist/design-system/p-f4825797.entry.js.map +0 -1
- package/dist/design-system/sd-button.sd-date-box.sd-date-picker.sd-icon.sd-input.sd-portal.sd-tooltip.sd-tooltip-portal.entry.esm.js.map +0 -1
- package/dist/design-system/sd-pagination.entry.esm.js.map +0 -1
- package/dist/esm/sd-button.sd-date-box.sd-date-picker.sd-icon.sd-input.sd-portal.sd-tooltip.sd-tooltip-portal.entry.js.map +0 -1
- package/dist/esm/sd-button_8.entry.js +0 -860
- package/dist/esm/sd-pagination.entry.js.map +0 -1
- /package/dist/design-system/{p-eab8c812.entry.js.map → p-3d8c249d.entry.js.map} +0 -0
- /package/dist/design-system/{p-c788ce90.entry.js.map → p-3ec8c5aa.entry.js.map} +0 -0
- /package/dist/design-system/{p-448aeb40.entry.js.map → p-95e7d47f.entry.js.map} +0 -0
- /package/dist/design-system/{p-5018e77a.entry.js.map → p-9e1abc28.entry.js.map} +0 -0
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import colors from "../../styles/color.json";
|
|
3
|
+
export class SdGuide {
|
|
4
|
+
el;
|
|
5
|
+
type = 'help';
|
|
6
|
+
popupTitle = '';
|
|
7
|
+
message = '';
|
|
8
|
+
guideUrl = '';
|
|
9
|
+
popupWidth;
|
|
10
|
+
popupShow = false;
|
|
11
|
+
guideRef;
|
|
12
|
+
static guideTitle = {
|
|
13
|
+
help: '활용 Tip',
|
|
14
|
+
pdf: 'PDF Guide',
|
|
15
|
+
youtube: 'Video Guide',
|
|
16
|
+
notion: '사용 가이드',
|
|
17
|
+
event: 'Event Button',
|
|
18
|
+
};
|
|
19
|
+
handleClickGuide = () => {
|
|
20
|
+
if (this.type === 'help') {
|
|
21
|
+
this.popupShow = !this.popupShow;
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
if (this.guideUrl) {
|
|
25
|
+
window.open(this.guideUrl, '_blank');
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
getGuideClasses() {
|
|
29
|
+
const classes = ['sd-guide'];
|
|
30
|
+
classes.push(`sd-guide--${this.type}`);
|
|
31
|
+
if (this.popupShow)
|
|
32
|
+
classes.push('sd-guide--active');
|
|
33
|
+
return classes.join(' ');
|
|
34
|
+
}
|
|
35
|
+
getGuideStyle() {
|
|
36
|
+
const styles = {};
|
|
37
|
+
if (this.type === 'help') {
|
|
38
|
+
styles['--guide-border'] = this.popupShow ? colors.green_65 : colors.grey_45;
|
|
39
|
+
styles['--guide-color'] = this.popupShow ? colors.white : colors.grey_90;
|
|
40
|
+
styles['--guide-background'] = this.popupShow ? colors.green_65 : colors.white;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
styles['--guide-border'] = colors.grey_45;
|
|
44
|
+
styles['--guide-color'] = colors.grey_90;
|
|
45
|
+
styles['--guide-background'] = colors.white;
|
|
46
|
+
}
|
|
47
|
+
return styles;
|
|
48
|
+
}
|
|
49
|
+
getGuidIcon() {
|
|
50
|
+
if (this.type === 'pdf') {
|
|
51
|
+
return { name: 'pdf', size: 20, color: colors.red_75 };
|
|
52
|
+
}
|
|
53
|
+
else if (this.type === 'youtube') {
|
|
54
|
+
return { name: 'youtube', size: 20, color: colors.red_75 };
|
|
55
|
+
}
|
|
56
|
+
else if (this.type === 'notion') {
|
|
57
|
+
return { name: 'notion', size: 16, color: colors.black };
|
|
58
|
+
}
|
|
59
|
+
else if (this.type === 'event') {
|
|
60
|
+
return { name: 'event', size: 16, color: colors.brilliantblue_70 };
|
|
61
|
+
}
|
|
62
|
+
return { name: 'helpOutline', size: 20, color: this.popupShow ? colors.white : colors.green_65 };
|
|
63
|
+
}
|
|
64
|
+
closeDropdown = () => {
|
|
65
|
+
this.popupShow = false;
|
|
66
|
+
};
|
|
67
|
+
render() {
|
|
68
|
+
const { name: iconName, size: iconSize, color: iconColor } = this.getGuidIcon();
|
|
69
|
+
return (h(Host, { key: '4313417f5c41f1126e329bddd46d75f2f571bcbe', style: this.getGuideStyle() }, h("sd-button", { key: 'b7ba861de4752828dd7b8747d26b4a8549a409a8', ref: el => (this.guideRef = el), class: this.getGuideClasses(), variant: "outline", label: SdGuide.guideTitle[this.type], size: "md", color: "var(--guide-color)", icon: iconName, iconColor: iconColor, iconSize: iconSize, iconStyle: { marginRight: '4px' }, buttonStyle: {
|
|
70
|
+
height: '28px',
|
|
71
|
+
minHeight: '28px',
|
|
72
|
+
padding: '4px 12px',
|
|
73
|
+
borderRadius: '16px',
|
|
74
|
+
borderColor: 'var(--guide-border)',
|
|
75
|
+
color: 'var(--guide-color)',
|
|
76
|
+
fontSize: '12px',
|
|
77
|
+
fontWeight: '400',
|
|
78
|
+
backgroundColor: 'var(--guide-background)',
|
|
79
|
+
}, onSdClick: this.handleClickGuide }), this.type === 'help' && this.popupShow && (h("sd-portal", { key: '31c52e9aef405c536dfd1a9da8d59450dbf179cf', open: this.popupShow, parentRef: this.guideRef, onSdClose: this.closeDropdown, offset: [0, 24] }, h("div", { key: 'b4798202e35dcd232ce66eb6b939b57993d8de6a', class: "sd-guide__popup", style: { width: this.popupWidth ? this.popupWidth + 'px' : '426px' } }, h("sd-button", { key: '9aa1f1d5e3bb224f606bb204754843e5cd8f5622', class: "sd-guide__popup__close", icon: "close", color: colors.grey_65, size: "md", variant: "ghost", noHover: true, buttonStyle: { padding: '0px', minHeight: '0px' }, onSdClick: this.closeDropdown }), h("div", { key: '87322cfaaced49ba6da7a9aa648eeed7403f88ca', class: "sd-guide__popup__header" }, h("sd-icon", { key: '231f23a8ceb669a39bd89c2054848f82edafd344', name: "helpOutline", size: 24, color: colors.green_65 }), h("h3", { key: 'c4dec3314abeb04d7b71962d76c8191c26332e7c', class: "sd-guide__popup__title" }, this.popupTitle || SdGuide.guideTitle[this.type])), h("ul", { key: '3c19dc7e2b14e29b3079d34e88e52230c1a16911', class: "sd-guide__popup__list" }, this.renderListItem(this.message)))))));
|
|
80
|
+
}
|
|
81
|
+
// 현재 2depth까지만 스타일 적용
|
|
82
|
+
renderListItem(message, depth = 0) {
|
|
83
|
+
const listItems = [];
|
|
84
|
+
if (Array.isArray(message)) {
|
|
85
|
+
const depthMsg = message.map(msg => this.renderListItem(msg, depth + 1));
|
|
86
|
+
listItems.push(...depthMsg.flat());
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
listItems.push(this.renderLi(message, depth));
|
|
90
|
+
}
|
|
91
|
+
return listItems;
|
|
92
|
+
}
|
|
93
|
+
renderLi = (message, depth) => {
|
|
94
|
+
const listContent = message.replace(/ /gi, ' ');
|
|
95
|
+
return (h("li", { class: `sd-guide__popup__list__item sd-guide__popup__list__item--depth-${depth}` }, h("p", { innerHTML: listContent })));
|
|
96
|
+
};
|
|
97
|
+
static get is() { return "sd-guide"; }
|
|
98
|
+
static get originalStyleUrls() {
|
|
99
|
+
return {
|
|
100
|
+
"$": ["sd-guide.scss"]
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
static get styleUrls() {
|
|
104
|
+
return {
|
|
105
|
+
"$": ["sd-guide.css"]
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
static get properties() {
|
|
109
|
+
return {
|
|
110
|
+
"type": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"mutable": false,
|
|
113
|
+
"complexType": {
|
|
114
|
+
"original": "'help' | 'pdf' | 'youtube' | 'notion' | 'event'",
|
|
115
|
+
"resolved": "\"event\" | \"help\" | \"notion\" | \"pdf\" | \"youtube\"",
|
|
116
|
+
"references": {}
|
|
117
|
+
},
|
|
118
|
+
"required": false,
|
|
119
|
+
"optional": false,
|
|
120
|
+
"docs": {
|
|
121
|
+
"tags": [],
|
|
122
|
+
"text": ""
|
|
123
|
+
},
|
|
124
|
+
"getter": false,
|
|
125
|
+
"setter": false,
|
|
126
|
+
"reflect": false,
|
|
127
|
+
"attribute": "type",
|
|
128
|
+
"defaultValue": "'help'"
|
|
129
|
+
},
|
|
130
|
+
"popupTitle": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"mutable": false,
|
|
133
|
+
"complexType": {
|
|
134
|
+
"original": "string",
|
|
135
|
+
"resolved": "string",
|
|
136
|
+
"references": {}
|
|
137
|
+
},
|
|
138
|
+
"required": false,
|
|
139
|
+
"optional": false,
|
|
140
|
+
"docs": {
|
|
141
|
+
"tags": [],
|
|
142
|
+
"text": ""
|
|
143
|
+
},
|
|
144
|
+
"getter": false,
|
|
145
|
+
"setter": false,
|
|
146
|
+
"reflect": false,
|
|
147
|
+
"attribute": "popup-title",
|
|
148
|
+
"defaultValue": "''"
|
|
149
|
+
},
|
|
150
|
+
"message": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"mutable": false,
|
|
153
|
+
"complexType": {
|
|
154
|
+
"original": "string | string[]",
|
|
155
|
+
"resolved": "string | string[]",
|
|
156
|
+
"references": {}
|
|
157
|
+
},
|
|
158
|
+
"required": false,
|
|
159
|
+
"optional": false,
|
|
160
|
+
"docs": {
|
|
161
|
+
"tags": [],
|
|
162
|
+
"text": ""
|
|
163
|
+
},
|
|
164
|
+
"getter": false,
|
|
165
|
+
"setter": false,
|
|
166
|
+
"reflect": false,
|
|
167
|
+
"attribute": "message",
|
|
168
|
+
"defaultValue": "''"
|
|
169
|
+
},
|
|
170
|
+
"guideUrl": {
|
|
171
|
+
"type": "string",
|
|
172
|
+
"mutable": false,
|
|
173
|
+
"complexType": {
|
|
174
|
+
"original": "string",
|
|
175
|
+
"resolved": "string",
|
|
176
|
+
"references": {}
|
|
177
|
+
},
|
|
178
|
+
"required": false,
|
|
179
|
+
"optional": false,
|
|
180
|
+
"docs": {
|
|
181
|
+
"tags": [],
|
|
182
|
+
"text": ""
|
|
183
|
+
},
|
|
184
|
+
"getter": false,
|
|
185
|
+
"setter": false,
|
|
186
|
+
"reflect": false,
|
|
187
|
+
"attribute": "guide-url",
|
|
188
|
+
"defaultValue": "''"
|
|
189
|
+
},
|
|
190
|
+
"popupWidth": {
|
|
191
|
+
"type": "number",
|
|
192
|
+
"mutable": false,
|
|
193
|
+
"complexType": {
|
|
194
|
+
"original": "number",
|
|
195
|
+
"resolved": "number | undefined",
|
|
196
|
+
"references": {}
|
|
197
|
+
},
|
|
198
|
+
"required": false,
|
|
199
|
+
"optional": true,
|
|
200
|
+
"docs": {
|
|
201
|
+
"tags": [],
|
|
202
|
+
"text": ""
|
|
203
|
+
},
|
|
204
|
+
"getter": false,
|
|
205
|
+
"setter": false,
|
|
206
|
+
"reflect": false,
|
|
207
|
+
"attribute": "popup-width"
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
static get states() {
|
|
212
|
+
return {
|
|
213
|
+
"popupShow": {}
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
static get elementRef() { return "el"; }
|
|
217
|
+
}
|
|
218
|
+
//# sourceMappingURL=sd-guide.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sd-guide.js","sourceRoot":"","sources":["../../../src/components/sd-guide/sd-guide.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,MAAM,MAAM,yBAAyB,CAAC;AAM7C,MAAM,OAAO,OAAO;IACR,EAAE,CAAe;IAEpB,IAAI,GAAoD,MAAM,CAAC;IAC/D,UAAU,GAAW,EAAE,CAAC;IACxB,OAAO,GAAsB,EAAE,CAAC;IAChC,QAAQ,GAAW,EAAE,CAAC;IACtB,UAAU,CAAU;IAEnB,SAAS,GAAY,KAAK,CAAC;IAE5B,QAAQ,CAAe;IAE/B,MAAM,CAAC,UAAU,GAAG;QACnB,IAAI,EAAE,QAAQ;QACd,GAAG,EAAE,WAAW;QAChB,OAAO,EAAE,aAAa;QACtB,MAAM,EAAE,QAAQ;QAChB,KAAK,EAAE,cAAc;KACrB,CAAC;IAEM,gBAAgB,GAAG,GAAG,EAAE;QAC/B,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;YAC1B,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC;YACjC,OAAO;QACR,CAAC;QAED,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;Y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AC","sourcesContent":["import { Component, Element, Host, Prop, State, h } from '@stencil/core';\r\nimport colors from '../../styles/color.json';\r\n\r\n@Component({\r\n tag: 'sd-guide',\r\n styleUrl: 'sd-guide.scss',\r\n})\r\nexport class SdGuide {\r\n @Element() el!: HTMLElement;\r\n\r\n @Prop() type: 'help' | 'pdf' | 'youtube' | 'notion' | 'event' = 'help';\r\n @Prop() popupTitle: string = '';\r\n @Prop() message: string | string[] = '';\r\n @Prop() guideUrl: string = '';\r\n @Prop() popupWidth?: number;\r\n\r\n @State() popupShow: boolean = false;\r\n\r\n private guideRef?: HTMLElement;\r\n\r\n static guideTitle = {\r\n help: '활용 Tip',\r\n pdf: 'PDF Guide',\r\n youtube: 'Video Guide',\r\n notion: '사용 가이드',\r\n event: 'Event Button',\r\n };\r\n\r\n private handleClickGuide = () => {\r\n if (this.type === 'help') {\r\n this.popupShow = !this.popupShow;\r\n return;\r\n }\r\n\r\n if (this.guideUrl) {\r\n window.open(this.guideUrl, '_blank');\r\n }\r\n };\r\n\r\n private getGuideClasses(): string {\r\n const classes = ['sd-guide'];\r\n\r\n classes.push(`sd-guide--${this.type}`);\r\n\r\n if (this.popupShow) classes.push('sd-guide--active');\r\n\r\n return classes.join(' ');\r\n }\r\n\r\n private getGuideStyle(): StyleProps {\r\n const styles: StyleProps = {};\r\n\r\n if (this.type === 'help') {\r\n styles['--guide-border'] = this.popupShow ? colors.green_65 : colors.grey_45;\r\n styles['--guide-color'] = this.popupShow ? colors.white : colors.grey_90;\r\n styles['--guide-background'] = this.popupShow ? colors.green_65 : colors.white;\r\n } else {\r\n styles['--guide-border'] = colors.grey_45;\r\n styles['--guide-color'] = colors.grey_90;\r\n styles['--guide-background'] = colors.white;\r\n }\r\n\r\n return styles;\r\n }\r\n\r\n private getGuidIcon(): { name: IconName; size: number; color: string } {\r\n if (this.type === 'pdf') {\r\n return { name: 'pdf', size: 20, color: colors.red_75 };\r\n } else if (this.type === 'youtube') {\r\n return { name: 'youtube', size: 20, color: colors.red_75 };\r\n } else if (this.type === 'notion') {\r\n return { name: 'notion', size: 16, color: colors.black };\r\n } else if (this.type === 'event') {\r\n return { name: 'event', size: 16, color: colors.brilliantblue_70 };\r\n }\r\n\r\n return { name: 'helpOutline', size: 20, color: this.popupShow ? colors.white : colors.green_65 };\r\n }\r\n\r\n closeDropdown = () => {\r\n this.popupShow = false;\r\n };\r\n\r\n render() {\r\n const { name: iconName, size: iconSize, color: iconColor } = this.getGuidIcon();\r\n\r\n return (\r\n <Host style={this.getGuideStyle()}>\r\n <sd-button\r\n ref={el => (this.guideRef = el as unknown as HTMLElement)}\r\n class={this.getGuideClasses()}\r\n variant=\"outline\"\r\n label={SdGuide.guideTitle[this.type]}\r\n size=\"md\"\r\n color=\"var(--guide-color)\"\r\n icon={iconName}\r\n iconColor={iconColor}\r\n iconSize={iconSize}\r\n iconStyle={{ marginRight: '4px' }}\r\n buttonStyle={{\r\n height: '28px',\r\n minHeight: '28px',\r\n padding: '4px 12px',\r\n borderRadius: '16px',\r\n borderColor: 'var(--guide-border)',\r\n color: 'var(--guide-color)',\r\n fontSize: '12px',\r\n fontWeight: '400',\r\n backgroundColor: 'var(--guide-background)',\r\n }}\r\n onSdClick={this.handleClickGuide}\r\n />\r\n {this.type === 'help' && this.popupShow && (\r\n <sd-portal\r\n open={this.popupShow}\r\n parentRef={this.guideRef}\r\n onSdClose={this.closeDropdown}\r\n offset={[0, 24]}\r\n >\r\n <div\r\n class=\"sd-guide__popup\"\r\n style={{ width: this.popupWidth ? this.popupWidth + 'px' : '426px' } as any}\r\n >\r\n <sd-button\r\n class=\"sd-guide__popup__close\"\r\n icon=\"close\"\r\n color={colors.grey_65}\r\n size=\"md\"\r\n variant=\"ghost\"\r\n noHover\r\n buttonStyle={{ padding: '0px', minHeight: '0px' }}\r\n onSdClick={this.closeDropdown}\r\n />\r\n <div class=\"sd-guide__popup__header\">\r\n <sd-icon name=\"helpOutline\" size={24} color={colors.green_65} />\r\n <h3 class=\"sd-guide__popup__title\">{this.popupTitle || SdGuide.guideTitle[this.type]}</h3>\r\n </div>\r\n <ul class=\"sd-guide__popup__list\">{this.renderListItem(this.message)}</ul>\r\n </div>\r\n </sd-portal>\r\n )}\r\n </Host>\r\n );\r\n }\r\n\r\n // 현재 2depth까지만 스타일 적용\r\n renderListItem(message: string | string[], depth: number = 0): HTMLElement[] {\r\n const listItems: HTMLElement[] = [];\r\n\r\n if (Array.isArray(message)) {\r\n const depthMsg = message.map(msg => this.renderListItem(msg, depth + 1));\r\n listItems.push(...depthMsg.flat());\r\n } else {\r\n listItems.push(this.renderLi(message, depth));\r\n }\r\n\r\n return listItems;\r\n }\r\n\r\n renderLi = (message: string, depth: number) => {\r\n const listContent = message.replace(/ /gi, ' ');\r\n return (\r\n <li class={`sd-guide__popup__list__item sd-guide__popup__list__item--depth-${depth}`}>\r\n <p innerHTML={listContent}></p>\r\n </li>\r\n );\r\n };\r\n}\r\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { Icons } from "../assets/index";
|
|
3
|
+
import { resolveColor } from "../../utils/color";
|
|
3
4
|
export class SdIcon {
|
|
4
5
|
/** 아이콘명 */
|
|
5
6
|
name;
|
|
@@ -11,6 +12,7 @@ export class SdIcon {
|
|
|
11
12
|
rotate;
|
|
12
13
|
/** 접근성을 위한 라벨 */
|
|
13
14
|
label;
|
|
15
|
+
iconStyle = {};
|
|
14
16
|
getIconClasses() {
|
|
15
17
|
const classes = ['sd-icon'];
|
|
16
18
|
if (this.rotate) {
|
|
@@ -18,9 +20,12 @@ export class SdIcon {
|
|
|
18
20
|
}
|
|
19
21
|
return classes.join(' ');
|
|
20
22
|
}
|
|
23
|
+
get resolvedColor() {
|
|
24
|
+
return resolveColor(this.color);
|
|
25
|
+
}
|
|
21
26
|
render() {
|
|
22
27
|
const IconComponent = Icons[this.name]?.[this.size];
|
|
23
|
-
return (h("i", { key: '
|
|
28
|
+
return (h("i", { key: 'e4a18e5410daf717d400488c1d68f1dd20017e71', class: this.getIconClasses(), style: this.iconStyle }, h(IconComponent, { key: '1300823f018f8f63a23b9caf1529beafb0b3583c', color: this.resolvedColor })));
|
|
24
29
|
}
|
|
25
30
|
static get is() { return "sd-icon"; }
|
|
26
31
|
static get encapsulation() { return "scoped"; }
|
|
@@ -41,7 +46,7 @@ export class SdIcon {
|
|
|
41
46
|
"mutable": false,
|
|
42
47
|
"complexType": {
|
|
43
48
|
"original": "IconName",
|
|
44
|
-
"resolved": "\"arrowDown\" | \"arrowLeft\" | \"arrowLeftEnd\" | \"arrowRight\" | \"arrowRightEnd\" | \"arrowUp\" | \"check\" | \"close\" | \"date\" | \"helpOutline\" | \"pageMove\" | \"search\"",
|
|
49
|
+
"resolved": "\"arrowDown\" | \"arrowLeft\" | \"arrowLeftEnd\" | \"arrowRight\" | \"arrowRightEnd\" | \"arrowUp\" | \"check\" | \"close\" | \"date\" | \"event\" | \"helpOutline\" | \"notion\" | \"pageMove\" | \"pdf\" | \"search\" | \"youtube\"",
|
|
45
50
|
"references": {
|
|
46
51
|
"IconName": {
|
|
47
52
|
"location": "global",
|
|
@@ -136,6 +141,29 @@ export class SdIcon {
|
|
|
136
141
|
"setter": false,
|
|
137
142
|
"reflect": false,
|
|
138
143
|
"attribute": "label"
|
|
144
|
+
},
|
|
145
|
+
"iconStyle": {
|
|
146
|
+
"type": "unknown",
|
|
147
|
+
"mutable": false,
|
|
148
|
+
"complexType": {
|
|
149
|
+
"original": "StyleProps",
|
|
150
|
+
"resolved": "{ [key: string]: any; }",
|
|
151
|
+
"references": {
|
|
152
|
+
"StyleProps": {
|
|
153
|
+
"location": "global",
|
|
154
|
+
"id": "global::StyleProps"
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"required": false,
|
|
159
|
+
"optional": false,
|
|
160
|
+
"docs": {
|
|
161
|
+
"tags": [],
|
|
162
|
+
"text": ""
|
|
163
|
+
},
|
|
164
|
+
"getter": false,
|
|
165
|
+
"setter": false,
|
|
166
|
+
"defaultValue": "{}"
|
|
139
167
|
}
|
|
140
168
|
};
|
|
141
169
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-icon.js","sourceRoot":"","sources":["../../../src/components/sd-icon/sd-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"sd-icon.js","sourceRoot":"","sources":["../../../src/components/sd-icon/sd-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAOjD,MAAM,OAAO,MAAM;IAClB,WAAW;IACH,IAAI,CAAY;IAExB,aAAa;IACL,IAAI,GAAoB,EAAE,CAAC;IAEnC,aAAa;IACL,KAAK,CAAU;IAEvB,8BAA8B;IACtB,MAAM,CAAsB;IAEpC,iBAAiB;IACT,KAAK,CAAU;IAEf,SAAS,GAAe,EAAE,CAAC;IAE3B,cAAc;QACrB,MAAM,OAAO,GAAG,CAAC,SAAS,CAAC,CAAC;QAE5B,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YACjB,OAAO,CAAC,IAAI,CAAC,mBAAmB,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QAChD,CAAC;QAED,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;IAED,IAAY,aAAa;QACxB,OAAO,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAED,MAAM;QACL,MAAM,aAAa,GAAI,KAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE7D,OAAO,CACN,0DAAG,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS;YACrD,EAAC,aAAa,qDAAC,KAAK,EAAE,IAAI,CAAC,aAAa,GAAI,CACzC,CACJ,CAAC;IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Prop, h } from '@stencil/core';\r\nimport { Icons } from '../assets/index';\r\nimport { resolveColor } from '../../utils/color';\r\n\r\n@Component({\r\n tag: 'sd-icon',\r\n styleUrl: 'sd-icon.scss',\r\n scoped: true,\r\n})\r\nexport class SdIcon {\r\n /** 아이콘명 */\r\n @Prop() name!: IconName;\r\n\r\n /** 아이콘 크기 */\r\n @Prop() size: number | string = 12;\r\n\r\n /** 아이콘 색상 */\r\n @Prop() color?: string;\r\n\r\n /** 회전 각도 (0, 90, 180, 270) */\r\n @Prop() rotate?: 0 | 90 | 180 | 270;\r\n\r\n /** 접근성을 위한 라벨 */\r\n @Prop() label?: string;\r\n\r\n @Prop() iconStyle: StyleProps = {};\r\n\r\n private getIconClasses(): string {\r\n const classes = ['sd-icon'];\r\n\r\n if (this.rotate) {\r\n classes.push(`sd-icon--rotate-${this.rotate}`);\r\n }\r\n\r\n return classes.join(' ');\r\n }\r\n\r\n private get resolvedColor(): string {\r\n return resolveColor(this.color);\r\n }\r\n\r\n render() {\r\n const IconComponent = (Icons as any)[this.name]?.[this.size];\r\n\r\n return (\r\n <i class={this.getIconClasses()} style={this.iconStyle}>\r\n <IconComponent color={this.resolvedColor} />\r\n </i>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -89,11 +89,11 @@ export class SdInput {
|
|
|
89
89
|
'--input-width': typeof this.width === 'number' ? `${this.width}px` : this.width,
|
|
90
90
|
}
|
|
91
91
|
: {};
|
|
92
|
-
return (h(Host, { key: '
|
|
92
|
+
return (h(Host, { key: 'd3d47bbc1d893415b3c04575abb474447b61c9cc', style: inputWidth }, this.label && h("div", { key: '80b9b4e3d39956b9582d7cd6cf1fa7558c2fa400', class: "sd-input__label" }, this.label), h("label", { key: '6a39cf5d0218196c2acf946995f0992abc1b1fdc', class: {
|
|
93
93
|
'sd-input': true,
|
|
94
94
|
[this.getInputStatus()]: true,
|
|
95
95
|
'sd-input--barcode': !!this.barcode,
|
|
96
|
-
}, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: this.inputStyle }, h("slot", { key: '
|
|
96
|
+
}, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: this.inputStyle }, h("slot", { key: '64b0e848cb47fb226f72fe49a11e8743b01d73f0', name: "prefix" }), h("input", { key: '9d2a3b64cf708859b2612a67e54fff2e0978d3c4', ref: el => (this.nativeEl = el), class: `sd-input__native_element ${this.inputClass}`, type: "text", value: this.internalValue || '', placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, autofocus: this.autoFocus, onInput: this.handleInput, onChange: this.handleChange, onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event) }), h("slot", { key: '40788d6c7294cacb0849a4ba6a0d4e3616e69c3a', name: "suffix" }), this.clearable && this.internalValue && (h("sd-icon", { key: '5b407126127593c49a277b7461c912bed02073be', name: "close", color: "#888", style: { marginRight: '-4px', marginLeft: '8px', cursor: 'pointer' }, onClick: () => {
|
|
97
97
|
this.internalValue = '';
|
|
98
98
|
this.sdChange?.emit(this.internalValue);
|
|
99
99
|
this.sdInput?.emit(this.internalValue);
|
|
@@ -73,12 +73,12 @@ export class SdPagination {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
render() {
|
|
76
|
-
return (h("div", { key: '
|
|
76
|
+
return (h("div", { key: '21ac7d547e0a2ebc9bc285f3561278d373a70560', class: this.paginationClasses }, h("div", { key: 'b2e1dee06d5a3751d395fef397f9fd745a49b598', 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: {
|
|
77
77
|
'pagination-btn': true,
|
|
78
78
|
'pagination-btn--selected': this.currentPage === n,
|
|
79
79
|
}, disabled: this.currentPage === n, style: {
|
|
80
80
|
'--pagination-btn-width': `${this.buttonWidth}px`,
|
|
81
|
-
}, onClick: () => this.handlePageChange(n) }, n)))), h("div", { key: '
|
|
81
|
+
}, onClick: () => this.handlePageChange(n) }, n)))), h("div", { key: '714367c37a7db25e5aadd00bb4ca102578d224bf', class: "append-btns" }, this.renderNextButtons())));
|
|
82
82
|
}
|
|
83
83
|
static get is() { return "sd-pagination"; }
|
|
84
84
|
static get encapsulation() { return "shadow"; }
|
|
@@ -31,11 +31,11 @@ export class SdPopover {
|
|
|
31
31
|
this.showPopover = false;
|
|
32
32
|
};
|
|
33
33
|
render() {
|
|
34
|
-
return (h(Fragment, { key: '
|
|
34
|
+
return (h(Fragment, { key: 'd9ce7f31132bea70b2ff39bb6660053030ee2b5e' }, 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", onClick: () => (console.log('click popover'), (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: () => (console.log('click popover'), (this.showPopover = !this.showPopover)) })), this.showPopover && (h("sd-tooltip-portal", { key: '85bfde26c1020ab51e36d33ad427135d0fb98a80', parentRef: this.buttonEl, onSdClose: this.handleClose, placement: this.placement }, h("div", { key: 'd273fc2d701b6f3ab9328cccb000c00317738eb5', class: {
|
|
35
35
|
'sd-popover-menu': true,
|
|
36
36
|
[`sd-popover-menu--${this.placement}`]: true,
|
|
37
37
|
[this.menuClass]: !!this.menuClass,
|
|
38
|
-
} }, h("i", { key: '
|
|
38
|
+
} }, h("i", { key: 'f9740977811bfd4f2b171e74482a3c7e71aebb06', class: `sd-popover-menu__arrow sd-popover-menu__arrow--${this.placement}` }, h(TooltipArrow, { key: 'c261ab4805baf022ca6dbab05c947ada6aa26db2' })), h("div", { key: '962f6cbcada06ebaad1083126573e2255665513d', class: "sd-popover-menu__content" }, this.menuTitle && h("div", { key: '0d39ddeaf9bbf1a59f35b02b6eb572c625ad7bf6', class: "sd-popover-menu__title" }, this.menuTitle), this.messages.length > 0 && (h("div", { key: '2ba5d4b5fafc792cc3095cb378f88a257a048a99', class: "sd-popover-menu__messages" }, this.messages.map(message => (h("div", null, message))))), this.buttons.length > 0 && (h("div", { key: '9b883a14a83f53e30fdc6f2a41a8f3741911d9bc', class: `sd-popover-menu__buttons sd-popover-menu__buttons--${this.buttons.length}` }, this.buttons.map(button => (h("sd-button", { ...button })))))), this.useClose && (h("button", { key: '58d3669781fbdae03bfb6c9564e7d81a9d74cdf4', class: "sd-popover-menu__close-button", onClick: () => this.handleClose() }, h("sd-icon", { key: '4cd92022824f8cc453181dccc50b4e591b312117', name: "close", size: "12", color: "#AAAAAA" }))))))));
|
|
39
39
|
}
|
|
40
40
|
static get is() { return "sd-popover"; }
|
|
41
41
|
static get encapsulation() { return "shadow"; }
|
|
@@ -116,7 +116,7 @@ export class SdPopover {
|
|
|
116
116
|
"mutable": false,
|
|
117
117
|
"complexType": {
|
|
118
118
|
"original": "IconName",
|
|
119
|
-
"resolved": "\"arrowDown\" | \"arrowLeft\" | \"arrowLeftEnd\" | \"arrowRight\" | \"arrowRightEnd\" | \"arrowUp\" | \"check\" | \"close\" | \"date\" | \"helpOutline\" | \"pageMove\" | \"search\"",
|
|
119
|
+
"resolved": "\"arrowDown\" | \"arrowLeft\" | \"arrowLeftEnd\" | \"arrowRight\" | \"arrowRightEnd\" | \"arrowUp\" | \"check\" | \"close\" | \"date\" | \"event\" | \"helpOutline\" | \"notion\" | \"pageMove\" | \"pdf\" | \"search\" | \"youtube\"",
|
|
120
120
|
"references": {
|
|
121
121
|
"IconName": {
|
|
122
122
|
"location": "global",
|
|
@@ -92,7 +92,7 @@ export class SdPortal {
|
|
|
92
92
|
this.sdClose.emit();
|
|
93
93
|
}
|
|
94
94
|
render() {
|
|
95
|
-
return h("slot", { key: '
|
|
95
|
+
return h("slot", { key: '32b0689ed1ad8c20bc400292b63597bc3e56ce2b' });
|
|
96
96
|
}
|
|
97
97
|
static get is() { return "sd-portal"; }
|
|
98
98
|
static get properties() {
|
|
@@ -24,7 +24,7 @@ export class SdSelectOption {
|
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
render() {
|
|
27
|
-
return (h("div", { key: '
|
|
27
|
+
return (h("div", { key: 'afd8da214335c6ea6036a51c617b2b35df104f69', class: {
|
|
28
28
|
'sd-select__option': true,
|
|
29
29
|
'sd-select__option--selected': this.isSelected,
|
|
30
30
|
'sd-select__option--disabled': !!this.option.disabled,
|
|
@@ -1393,11 +1393,11 @@ textarea {
|
|
|
1393
1393
|
.sd-table__container .sd-table__middle {
|
|
1394
1394
|
overflow: auto;
|
|
1395
1395
|
will-change: scroll-position;
|
|
1396
|
-
height:
|
|
1396
|
+
height: var(--table-height, auto);
|
|
1397
1397
|
}
|
|
1398
1398
|
.sd-table__container .sd-table__middle .sd-table {
|
|
1399
1399
|
width: 100%;
|
|
1400
|
-
border-collapse:
|
|
1400
|
+
border-collapse: separate;
|
|
1401
1401
|
border-spacing: 0;
|
|
1402
1402
|
table-layout: fixed;
|
|
1403
1403
|
}
|
|
@@ -1414,6 +1414,69 @@ textarea {
|
|
|
1414
1414
|
top: 0;
|
|
1415
1415
|
z-index: 2;
|
|
1416
1416
|
}
|
|
1417
|
+
.sd-table__container .sd-table__middle .sd-table--sticky-column th.sticky-left,
|
|
1418
|
+
.sd-table__container .sd-table__middle .sd-table--sticky-column th.sticky-right {
|
|
1419
|
+
position: sticky;
|
|
1420
|
+
background-color: #f5faff;
|
|
1421
|
+
z-index: 200 !important;
|
|
1422
|
+
}
|
|
1423
|
+
.sd-table__container .sd-table__middle .sd-table--sticky-column td.sticky-left,
|
|
1424
|
+
.sd-table__container .sd-table__middle .sd-table--sticky-column td.sticky-right {
|
|
1425
|
+
position: sticky;
|
|
1426
|
+
background-color: white;
|
|
1427
|
+
z-index: 100 !important;
|
|
1428
|
+
}
|
|
1429
|
+
.sd-table__container .sd-table__middle .sd-table--sticky-column .sticky-left {
|
|
1430
|
+
left: var(--sticky-left-offset, 0);
|
|
1431
|
+
}
|
|
1432
|
+
.sd-table__container .sd-table__middle .sd-table--sticky-column .sticky-right {
|
|
1433
|
+
right: var(--sticky-right-offset, 0);
|
|
1434
|
+
}
|
|
1435
|
+
.sd-table__container .sd-table__middle .sd-table--sticky-column th.sticky-cell {
|
|
1436
|
+
position: sticky;
|
|
1437
|
+
z-index: 102;
|
|
1438
|
+
background-color: #f5faff;
|
|
1439
|
+
}
|
|
1440
|
+
.sd-table__container .sd-table__middle .sd-table--sticky-column td.sticky-cell {
|
|
1441
|
+
position: sticky;
|
|
1442
|
+
z-index: 101;
|
|
1443
|
+
background-color: white;
|
|
1444
|
+
}
|
|
1445
|
+
.sd-table__container .sd-table__middle .sd-table--scrolled-left th.sticky-left-edge,
|
|
1446
|
+
.sd-table__container .sd-table__middle .sd-table--scrolled-left td.sticky-left-edge {
|
|
1447
|
+
overflow: visible;
|
|
1448
|
+
}
|
|
1449
|
+
.sd-table__container .sd-table__middle .sd-table--scrolled-left th.sticky-left-edge:after,
|
|
1450
|
+
.sd-table__container .sd-table__middle .sd-table--scrolled-left td.sticky-left-edge:after {
|
|
1451
|
+
content: "";
|
|
1452
|
+
position: absolute;
|
|
1453
|
+
top: 0;
|
|
1454
|
+
left: 100%;
|
|
1455
|
+
right: -20px;
|
|
1456
|
+
width: 20px;
|
|
1457
|
+
height: 100%;
|
|
1458
|
+
z-index: 101 !important;
|
|
1459
|
+
box-shadow: inset 12px 0 20px -25px;
|
|
1460
|
+
opacity: 1;
|
|
1461
|
+
pointer-events: none;
|
|
1462
|
+
}
|
|
1463
|
+
.sd-table__container .sd-table__middle .sd-table--scrolled-right th.sticky-right-edge,
|
|
1464
|
+
.sd-table__container .sd-table__middle .sd-table--scrolled-right td.sticky-right-edge {
|
|
1465
|
+
overflow: visible;
|
|
1466
|
+
}
|
|
1467
|
+
.sd-table__container .sd-table__middle .sd-table--scrolled-right th.sticky-right-edge:after,
|
|
1468
|
+
.sd-table__container .sd-table__middle .sd-table--scrolled-right td.sticky-right-edge:after {
|
|
1469
|
+
content: "";
|
|
1470
|
+
position: absolute;
|
|
1471
|
+
top: 0;
|
|
1472
|
+
left: -20px;
|
|
1473
|
+
width: 20px;
|
|
1474
|
+
height: 100%;
|
|
1475
|
+
z-index: 101 !important;
|
|
1476
|
+
box-shadow: inset -12px 0 20px -25px;
|
|
1477
|
+
opacity: 1;
|
|
1478
|
+
pointer-events: none;
|
|
1479
|
+
}
|
|
1417
1480
|
.sd-table__container .sd-table__middle .sd-table--no-data thead {
|
|
1418
1481
|
opacity: 0.4;
|
|
1419
1482
|
}
|