@sellmate/design-system 1.0.25 → 1.0.27
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/{component.button-C6xBMwHf.js → component.button-ASC_hRm6.js} +0 -7
- package/dist/cjs/design-system.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sd-badge.cjs.entry.js +29 -6
- package/dist/cjs/sd-button-v2.cjs.entry.js +5 -6
- package/dist/cjs/{sd-button-v2.config-BK45EPK_.js → sd-button-v2.config-DGJDtL6W.js} +1 -27
- package/dist/cjs/sd-button_21.cjs.entry.js +77 -50
- package/dist/cjs/sd-card.cjs.entry.js +1 -1
- package/dist/cjs/sd-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +7 -22
- package/dist/cjs/sd-file-picker.cjs.entry.js +3 -3
- package/dist/cjs/sd-form.cjs.entry.js +1 -1
- package/dist/cjs/sd-guide.cjs.entry.js +2 -2
- package/dist/cjs/sd-popover.cjs.entry.js +15 -2
- package/dist/cjs/sd-progress.cjs.entry.js +2 -2
- package/dist/cjs/sd-radio-button-group.cjs.entry.js +1 -1
- package/dist/cjs/sd-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-multiple-group.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-multiple.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-option-group.cjs.entry.js +3 -3
- package/dist/cjs/sd-tabs.cjs.entry.js +1 -1
- package/dist/cjs/sd-tag.cjs.entry.js +104 -35
- package/dist/cjs/sd-toast.cjs.entry.js +3 -3
- package/dist/cjs/sd-toggle-button.cjs.entry.js +1 -1
- package/dist/cjs/sd-toggle.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/sd-badge/sd-badge.config.js +12 -0
- package/dist/collection/components/sd-badge/sd-badge.css +5 -14
- package/dist/collection/components/sd-badge/sd-badge.js +15 -29
- package/dist/collection/components/sd-button-v2/sd-button-v2.config.js +0 -24
- package/dist/collection/components/sd-button-v2/sd-button-v2.css +6 -5
- package/dist/collection/components/sd-button-v2/sd-button-v2.js +4 -5
- 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.config.js +1 -10
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.css +9 -5
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.js +3 -9
- package/dist/collection/components/sd-field/sd-field.js +5 -5
- package/dist/collection/components/sd-file-picker/sd-file-picker.js +3 -3
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.css +52 -28
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
- package/dist/collection/components/sd-form/sd-form.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 +3 -3
- package/dist/collection/components/sd-loading-spinner/sd-loading-spinner.js +1 -1
- package/dist/collection/components/sd-modal-card/sd-modal-card.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 +6 -2
- package/dist/collection/components/sd-portal/sd-portal.js +11 -10
- package/dist/collection/components/sd-progress/sd-progress.js +2 -2
- package/dist/collection/components/sd-radio/sd-radio.js +1 -1
- package/dist/collection/components/sd-radio-button-group/sd-radio-button-group.js +1 -1
- package/dist/collection/components/sd-radio-group/sd-radio-group.js +1 -1
- package/dist/collection/components/sd-select/sd-select-dropdown/sd-select-dropdown.js +2 -2
- package/dist/collection/components/sd-select/sd-select-option/sd-select-option.js +1 -1
- package/dist/collection/components/sd-select/sd-select-search-input/sd-select-search-input.js +3 -3
- package/dist/collection/components/sd-select/sd-select.js +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-multiple-group.js +3 -3
- package/dist/collection/components/sd-select-multiple-group/sd-select-option-group/sd-select-option-group.js +3 -3
- package/dist/collection/components/sd-table/sd-table.js +4 -4
- package/dist/collection/components/sd-tabs/sd-tabs.js +1 -1
- package/dist/collection/components/sd-tag/sd-tag.config.js +35 -31
- package/dist/collection/components/sd-tag/sd-tag.css +1 -1
- package/dist/collection/components/sd-tag/sd-tag.js +6 -5
- 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/collection/components/sd-tooltip/sd-tooltip.config.js +7 -0
- package/dist/collection/components/sd-tooltip/sd-tooltip.js +21 -32
- package/dist/components/{p-Dc4UTGgQ.js → p-2CurSZ9q.js} +1 -1
- package/dist/components/{p-CAZeEBeS.js → p-BDPJKxrr.js} +1 -1
- package/dist/components/{p-D9mJxIjm.js → p-BFVe-fGw.js} +1 -1
- package/dist/components/{p-DYoNy5I7.js → p-BVIzG0vO.js} +1 -1
- package/dist/components/p-BZt0PSLv.js +1 -0
- package/dist/components/{p-2FdkYfts.js → p-CGgmrFwF.js} +1 -1
- package/dist/components/p-COsw7PE1.js +1 -0
- package/dist/components/{p-CdCMe4bN.js → p-CS4tniB3.js} +1 -1
- package/dist/components/{p-CwM24aVj.js → p-CZLePSDf.js} +1 -1
- package/dist/components/{p-B1o7vc2v.js → p-CgilbV-B.js} +1 -1
- package/dist/components/{p-DUqcOPNn.js → p-CquSJNHV.js} +1 -1
- package/dist/components/{p-CzHa12Ax.js → p-D4eRE9J1.js} +1 -1
- package/dist/components/{p-BxXKe48B.js → p-DNQE5SAA.js} +1 -1
- package/dist/components/{p-G4t0nGLP.js → p-DfhTm5zs.js} +1 -1
- package/dist/components/p-DghTuouQ.js +1 -0
- package/dist/components/{p-Czq-8oT7.js → p-DtNd46kD.js} +1 -1
- package/dist/components/p-DuzMehmA.js +1 -0
- package/dist/components/p-fvvA-prd.js +1 -0
- package/dist/components/{p-BKTfQGcR.js → p-kyuN077y.js} +1 -1
- package/dist/components/p-wt_xdZCl.js +1 -0
- 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-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.css +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/{p-c0655cd1.entry.js → p-141f5a74.entry.js} +1 -1
- package/dist/design-system/{p-e6d84ecf.entry.js → p-19805249.entry.js} +1 -1
- package/dist/design-system/{p-Dc4UTGgQ.js → p-2CurSZ9q.js} +1 -1
- package/dist/design-system/p-37e9e161.entry.js +1 -0
- package/dist/design-system/{p-1b80635f.entry.js → p-3d91bd65.entry.js} +1 -1
- package/dist/design-system/{p-5094848f.entry.js → p-58e3bd95.entry.js} +1 -1
- package/dist/design-system/{p-02c5ab69.entry.js → p-5ef7ff34.entry.js} +1 -1
- package/dist/design-system/{p-83f320e6.entry.js → p-680c5afb.entry.js} +1 -1
- package/dist/design-system/p-73362d34.entry.js +1 -0
- package/dist/design-system/p-73d29523.entry.js +1 -0
- package/dist/design-system/{p-3565f871.entry.js → p-7801d0bb.entry.js} +1 -1
- package/dist/design-system/p-8be27d6e.entry.js +1 -0
- package/dist/design-system/p-995f2846.entry.js +1 -0
- package/dist/design-system/{p-DUqcOPNn.js → p-CquSJNHV.js} +1 -1
- package/dist/design-system/p-DuzMehmA.js +1 -0
- package/dist/design-system/{p-ea26b8e9.entry.js → p-a493d89a.entry.js} +1 -1
- package/dist/design-system/{p-8b013328.entry.js → p-a7815753.entry.js} +1 -1
- package/dist/design-system/{p-712c1ef1.entry.js → p-b9f3d804.entry.js} +1 -1
- package/dist/design-system/p-c32943cf.entry.js +1 -0
- package/dist/design-system/p-ce410fca.entry.js +1 -0
- package/dist/design-system/p-d8b04e91.entry.js +1 -0
- package/dist/design-system/{p-df3d3a2a.entry.js → p-e711ab13.entry.js} +1 -1
- package/dist/design-system/{p-5032c700.entry.js → p-e9040a63.entry.js} +1 -1
- package/dist/design-system/{p-f1b31194.entry.js → p-e9bd0893.entry.js} +1 -1
- package/dist/esm/{component.button-Dc4UTGgQ.js → component.button-2CurSZ9q.js} +0 -7
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sd-badge.entry.js +29 -6
- package/dist/esm/{sd-button-v2.config-BWmcscrt.js → sd-button-v2.config-FpT7FqlI.js} +2 -27
- package/dist/esm/sd-button-v2.entry.js +5 -6
- package/dist/esm/sd-button_21.entry.js +77 -50
- package/dist/esm/sd-card.entry.js +1 -1
- package/dist/esm/sd-date-picker.entry.js +1 -1
- package/dist/esm/sd-dropdown-button.entry.js +7 -22
- package/dist/esm/sd-file-picker.entry.js +3 -3
- package/dist/esm/sd-form.entry.js +1 -1
- package/dist/esm/sd-guide.entry.js +2 -2
- package/dist/esm/sd-popover.entry.js +15 -2
- package/dist/esm/sd-progress.entry.js +2 -2
- package/dist/esm/sd-radio-button-group.entry.js +1 -1
- package/dist/esm/sd-radio-group.entry.js +1 -1
- package/dist/esm/sd-select-multiple-group.entry.js +1 -1
- package/dist/esm/sd-select-multiple.entry.js +1 -1
- package/dist/esm/sd-select-option-group.entry.js +3 -3
- package/dist/esm/sd-tabs.entry.js +1 -1
- package/dist/esm/sd-tag.entry.js +104 -35
- package/dist/esm/sd-toast.entry.js +3 -3
- package/dist/esm/sd-toggle-button.entry.js +1 -1
- package/dist/esm/sd-toggle.entry.js +1 -1
- package/dist/types/components/sd-badge/sd-badge.config.d.ts +3 -0
- package/dist/types/components/sd-badge/sd-badge.d.ts +2 -2
- package/dist/types/components/sd-button-v2/sd-button-v2.config.d.ts +0 -23
- package/dist/types/components/sd-dropdown-button/sd-dropdown-button.config.d.ts +1 -4
- package/dist/types/components/sd-field/sd-field.d.ts +1 -1
- package/dist/types/components/sd-input/sd-input.d.ts +1 -1
- package/dist/types/components/sd-select/sd-select.d.ts +1 -1
- package/dist/types/components/sd-select-multiple-group/sd-select-multiple-group.d.ts +1 -1
- package/dist/types/components/sd-tag/sd-tag.config.d.ts +2 -1
- package/dist/types/components/sd-tooltip/sd-tooltip.config.d.ts +18 -0
- package/dist/types/components/sd-tooltip/sd-tooltip.d.ts +2 -15
- package/dist/types/components.d.ts +18 -34
- package/hydrate/index.js +384 -301
- package/hydrate/index.mjs +384 -301
- package/package.json +1 -1
- package/dist/components/p-BFO8hHjW.js +0 -1
- package/dist/components/p-CDzGasXW.js +0 -1
- package/dist/components/p-CVvYLd5J.js +0 -1
- package/dist/components/p-Dun2lZmi.js +0 -1
- package/dist/components/p-NAapFxTw.js +0 -1
- package/dist/components/p-VKF2AWs1.js +0 -1
- package/dist/design-system/p-285cc646.entry.js +0 -1
- package/dist/design-system/p-59a52297.entry.js +0 -1
- package/dist/design-system/p-9563ffe1.entry.js +0 -1
- package/dist/design-system/p-VKF2AWs1.js +0 -1
- package/dist/design-system/p-b1e45f3f.entry.js +0 -1
- package/dist/design-system/p-d8a141e7.entry.js +0 -1
- package/dist/design-system/p-e7d7ceb4.entry.js +0 -1
- package/dist/design-system/p-efd52bd3.entry.js +0 -1
- package/dist/design-system/p-f81d3798.entry.js +0 -1
- package/dist/cjs/{resolveColor-4RlaGD62.js → resolveColor-Di1RNekE.js} +2 -2
- package/dist/esm/{resolveColor-DUqcOPNn.js → resolveColor-CquSJNHV.js} +2 -2
|
@@ -68,12 +68,12 @@ export class SdPagination {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
render() {
|
|
71
|
-
return (h("div", { key: '
|
|
71
|
+
return (h("div", { key: '3113faf5d75fa4a13e267653cae820035270e652', class: this.paginationClasses }, h("div", { key: 'a770afe37da389511bbfda99324e7794ffa299f5', 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: '7e3842b531373d6485ae8912addea1aa531ca891', class: "append-btns" }, this.renderNextButtons())));
|
|
77
77
|
}
|
|
78
78
|
static get is() { return "sd-pagination"; }
|
|
79
79
|
static get originalStyleUrls() {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Fragment, h } from "@stencil/core";
|
|
2
2
|
import { TooltipArrow } from "../assets/tooltipArrow";
|
|
3
|
+
import popoverTokens from "../../tokens/generated/component.popover.json";
|
|
3
4
|
export class SdPopover {
|
|
4
5
|
el;
|
|
5
6
|
show = false;
|
|
@@ -30,11 +31,14 @@ export class SdPopover {
|
|
|
30
31
|
this.showPopover = false;
|
|
31
32
|
};
|
|
32
33
|
render() {
|
|
33
|
-
return (h(Fragment, { key: '
|
|
34
|
+
return (h(Fragment, { key: '4a9b669a48afd220b6f7cca0512704ffca7c853a' }, 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: '3a3a95c0ced8d5cc03c1c00a71455804b4ee2337', parentRef: this.buttonEl, onSdClose: this.handleClose, placement: this.placement }, h("div", { key: '45b78e84b9d6716b16c02868aadc0e03268d0d17', class: {
|
|
34
35
|
'sd-floating-menu': true,
|
|
36
|
+
'sd-floating-menu--popover': true,
|
|
35
37
|
[`sd-floating-menu--${this.placement}`]: true,
|
|
36
38
|
[this.menuClass]: !!this.menuClass,
|
|
37
|
-
}
|
|
39
|
+
}, style: {
|
|
40
|
+
'--sd-floating-bg': popoverTokens.popover.bg,
|
|
41
|
+
} }, h("i", { key: 'dc459621c518762345e42fe201e25c18b00f71db', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${this.placement}` }, h(TooltipArrow, { key: '77b20a4f795453eba89230433204e43696d1572e' })), h("div", { key: '645010d9749bf039a15a3edb6ca8bac72b53a152', class: "sd-floating-menu__content" }, this.menuTitle && h("div", { key: '9c84f5ccf7353dca3c6e6978647c845832003361', class: "sd-floating-menu__title" }, this.menuTitle), this.messages.length > 0 && (h("div", { key: 'd081317a32b5e5304d03deef7b3bcb441e4839c9', class: "sd-floating-menu__messages" }, this.messages.map(message => (h("div", null, message))))), this.buttons.length > 0 && (h("div", { key: 'cf09426459cabbe4443608c9e5edda9e45c394f9', 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: '0677f61f7faa27e10b39b5cce2e22a3eda15dc87', title: "close", class: "sd-floating-menu__close-button", onClick: () => this.handleClose() }, h("sd-icon", { key: '71e254dbc9b34f98e0bc41c378d33c733ce6b582', name: "close", size: popoverTokens.popover.close.icon, color: popoverTokens.popover.close.color }))))))));
|
|
38
42
|
}
|
|
39
43
|
static get is() { return "sd-popover"; }
|
|
40
44
|
static get originalStyleUrls() {
|
|
@@ -45,7 +45,7 @@ export class SdPortal {
|
|
|
45
45
|
this.wrapper = document.createElement('div');
|
|
46
46
|
Object.assign(this.wrapper.style, {
|
|
47
47
|
position: 'absolute',
|
|
48
|
-
zIndex: this.zIndex.toString(),
|
|
48
|
+
zIndex: (this.zIndex ?? 9999).toString(),
|
|
49
49
|
transition: 'opacity 0.4s',
|
|
50
50
|
});
|
|
51
51
|
this.container.appendChild(this.wrapper);
|
|
@@ -89,21 +89,22 @@ export class SdPortal {
|
|
|
89
89
|
width: window.innerWidth,
|
|
90
90
|
height: window.innerHeight,
|
|
91
91
|
};
|
|
92
|
-
|
|
93
|
-
let
|
|
92
|
+
const offset = this.offset ?? [0, 4];
|
|
93
|
+
let top = parentRect.bottom + window.scrollY + offset[1];
|
|
94
|
+
let left = parentRect.left + window.scrollX + offset[0];
|
|
94
95
|
// 화면 상하단 넘어갈 시 반전
|
|
95
|
-
if (parentRect.bottom + wrapperRect.height +
|
|
96
|
-
top = parentRect.top + window.scrollY - wrapperRect.height -
|
|
96
|
+
if (parentRect.bottom + wrapperRect.height + offset[1] > viewport.height) {
|
|
97
|
+
top = parentRect.top + window.scrollY - wrapperRect.height - offset[1];
|
|
97
98
|
}
|
|
98
99
|
if (top < window.scrollY) {
|
|
99
|
-
top = parentRect.bottom + window.scrollY +
|
|
100
|
+
top = parentRect.bottom + window.scrollY + offset[1];
|
|
100
101
|
}
|
|
101
102
|
// 화면 좌우측 넘어갈 시 반전
|
|
102
|
-
if (parentRect.left + wrapperRect.width +
|
|
103
|
-
left = parentRect.right + window.scrollX - wrapperRect.width -
|
|
103
|
+
if (parentRect.left + wrapperRect.width + offset[0] > viewport.width) {
|
|
104
|
+
left = parentRect.right + window.scrollX - wrapperRect.width - offset[0];
|
|
104
105
|
}
|
|
105
106
|
if (left < 0) {
|
|
106
|
-
left =
|
|
107
|
+
left = offset[0];
|
|
107
108
|
}
|
|
108
109
|
this.wrapper.style.top = `${top}px`;
|
|
109
110
|
this.wrapper.style.left = `${left}px`;
|
|
@@ -177,7 +178,7 @@ export class SdPortal {
|
|
|
177
178
|
this.close.emit();
|
|
178
179
|
}
|
|
179
180
|
render() {
|
|
180
|
-
return h("slot", { key: '
|
|
181
|
+
return h("slot", { key: '5fe94d224d2a647a1e7cb3fed1a42073b45a2525' });
|
|
181
182
|
}
|
|
182
183
|
static get is() { return "sd-portal"; }
|
|
183
184
|
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: '43da9dac67e760bfe53b8db11c27eef7ef0d8b3b', 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: 'af4b1c44f655546fede8ad548bddc6afb7810d2b', 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, "%")));
|
|
@@ -23,7 +23,7 @@ export class SdRadio {
|
|
|
23
23
|
this.update.emit(this.value);
|
|
24
24
|
}
|
|
25
25
|
render() {
|
|
26
|
-
return (h("div", { key: '
|
|
26
|
+
return (h("div", { key: '4044958bc2fd4812508ffc65b3cc42bc1091470a', "aria-label": this.val || 'radio option', "aria-checked": String(this.val) === String(this.value) ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', class: this.getRadioClasses() }, h("label", { key: `radio-${this.val}` }, h("input", { key: 'f7ee60381c34f4e9fe22c90c1a982a14d1b87880', type: "radio", name: this.val, value: String(this.val), checked: String(this.val) === String(this.value), disabled: this.disabled, onInput: ({ detail }) => this.handleRadioChange(detail) }), this.val && h("span", { key: '276b647bdc90f33443f0aa98a0a056be5b7eaa5d', class: "sd-radio-group__label" }, this.label || this.val))));
|
|
27
27
|
}
|
|
28
28
|
static get is() { return "sd-radio"; }
|
|
29
29
|
static get originalStyleUrls() {
|
|
@@ -36,7 +36,7 @@ export class SdRadioButtonGroup {
|
|
|
36
36
|
}
|
|
37
37
|
groupName = this.name || `sd-radio-button-group-${crypto.randomUUID()}`;
|
|
38
38
|
render() {
|
|
39
|
-
return (h("div", { key: '
|
|
39
|
+
return (h("div", { key: 'b29629556f8d8922e601feede89bd77bd783ded6', class: this.getGroupClasses(), role: "radiogroup", "aria-disabled": this.disabled.toString() }, this.radioOptions.map(option => {
|
|
40
40
|
const isSelected = this.isOptionSelected(option);
|
|
41
41
|
const isDisabled = this.isOptionDisabled(option);
|
|
42
42
|
return (h("label", { key: `radio-${option.value}`, class: this.getButtonClasses(option), "aria-label": option.label || 'radio option', "data-label": option.label }, h("input", { type: "radio", name: this.groupName, value: option.value.toString(), checked: isSelected, disabled: isDisabled, onInput: () => this.handleRadioChange(option.value, option.disabled) }), option.label && h("span", { class: "sd-radio-button-group__label" }, option.label)));
|
|
@@ -20,7 +20,7 @@ export class SdRadioGroup {
|
|
|
20
20
|
return classes.join(' ');
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return (h("div", { key: '
|
|
23
|
+
return (h("div", { key: '4f24a03003b9e21a7e7da81d70ab95a04551b694', class: this.getGroupClasses(), role: "radiogroup" }, this.radioOptions.map(option => {
|
|
24
24
|
return (h("sd-radio", { key: `radio-${option.value}`, val: String(option.value), value: this.value, label: option.label, disabled: this.disabled || !!option.disabled, onSdUpdate: ({ detail }) => this.handleRadioChange(detail) }));
|
|
25
25
|
})));
|
|
26
26
|
}
|
|
@@ -144,10 +144,10 @@ export class SdSelectDropdown {
|
|
|
144
144
|
this.isScrolled = scrollTop > 0;
|
|
145
145
|
};
|
|
146
146
|
render() {
|
|
147
|
-
return (h("div", { key: '
|
|
147
|
+
return (h("div", { key: 'ff55e2e133114accc2641a0025bdcf551eda3511', class: {
|
|
148
148
|
'sd-select-dropdown': true,
|
|
149
149
|
'sd-select-dropdown--ready': this.isDropdownReady,
|
|
150
|
-
}, style: this.dropdownSize, onScroll: this.handleDropdownScroll, ref: el => (this.dropdownRef = el) }, this.searchable && (h("sd-select-search-input", { key: '
|
|
150
|
+
}, style: this.dropdownSize, onScroll: this.handleDropdownScroll, ref: el => (this.dropdownRef = el) }, this.searchable && (h("sd-select-search-input", { key: 'bfcee14aa06a9a259dd8e67013ed1074c1f9c318', ref: el => (this.searchRef = el), isScrolled: this.isScrolled, searchText: this.searchText, onSdSearchInput: (event) => (this.searchText = event.detail || ''), onSdSearchFocus: () => (this.itemIndex = -1) })), this.filteredOptions.length > 0 ? (this.filteredOptions.map((option, index) => (h("slot", { name: `option-${option.value}` }, h("sd-select-option", { option: option, index: index, isSelected: this.isOptionSelected(option.value), isFocused: index === this.itemIndex, onOptionClick: ({ detail }) => this.optionClick.emit(detail), useCheckbox: this.useCheckbox }))))) : (h("slot", { name: "option-placeholder" }, h("div", { class: 'sd-select-option-placeholder' }, this.optionPlaceholder)))));
|
|
151
151
|
}
|
|
152
152
|
static get is() { return "sd-select-dropdown"; }
|
|
153
153
|
static get originalStyleUrls() {
|
|
@@ -24,7 +24,7 @@ export class SdSelectOption {
|
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
render() {
|
|
27
|
-
return (h("div", { key: '
|
|
27
|
+
return (h("div", { key: 'a4fcca24b0bdde4f4665585c6cede84bd3b64d59', class: {
|
|
28
28
|
'sd-select__option': true,
|
|
29
29
|
'sd-select__option--selected': this.isSelected,
|
|
30
30
|
'sd-select__option--disabled': !!this.option.disabled,
|
package/dist/collection/components/sd-select/sd-select-search-input/sd-select-search-input.js
CHANGED
|
@@ -16,17 +16,17 @@ export class SdSelectSearchInput {
|
|
|
16
16
|
input?.focus({ preventScroll: true });
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
|
-
return (h("div", { key: '
|
|
19
|
+
return (h("div", { key: 'b19a029ef82d876c984c1f827d7a0f29bb823f5d', class: {
|
|
20
20
|
'sd-select-search-input': true,
|
|
21
21
|
'sd-select-search-input--scrolled': !!this.isScrolled,
|
|
22
|
-
}, onClick: event => event.stopPropagation() }, h("sd-input", { key: '
|
|
22
|
+
}, onClick: event => event.stopPropagation() }, h("sd-input", { key: '8e27f40e1b507f0c5cb2d4bde48750cd0089a9da', ref: el => (this.searchRef = el), value: this.searchText, placeholder: "\uAC80\uC0C9", clearable: true, inputStyle: { 'padding-left': '8px' }, autofocus: true, onSdUpdate: event => {
|
|
23
23
|
this.searchInput.emit(String(event?.detail));
|
|
24
24
|
}, onSdFocus: () => {
|
|
25
25
|
this.searchFocus.emit();
|
|
26
26
|
}, onKeyDown: event => {
|
|
27
27
|
if (event.code === 'Enter')
|
|
28
28
|
event.stopPropagation();
|
|
29
|
-
} }, h("sd-icon", { key: '
|
|
29
|
+
} }, h("sd-icon", { key: '2b38a07cbc0bb0d7dd020ece45f18bdff4c262e5', name: "search", size: 16, color: "#737373", style: { marginRight: '4px' }, slot: "prefix" }))));
|
|
30
30
|
}
|
|
31
31
|
static get is() { return "sd-select-search-input"; }
|
|
32
32
|
static get originalStyleUrls() {
|
|
@@ -136,7 +136,7 @@ export class SdSelect extends BaseDropdownEvent {
|
|
|
136
136
|
}
|
|
137
137
|
};
|
|
138
138
|
render() {
|
|
139
|
-
return (h("sd-field", { key: '
|
|
139
|
+
return (h("sd-field", { key: '331489106e60e2304ef08ab8bb9e0b92f883c14f', label: this.label, name: this.name, rules: this.rules, error: this.error, disabled: this.disabled, useLabelRequired: this.useLabelRequired, insideLabel: this.insideLabel, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el) }, h("div", { key: '790254f507e924fcb7a32620a2c0ea264f49a9ae', class: {
|
|
140
140
|
'sd-select': true,
|
|
141
141
|
'sd-select--disabled': this.disabled,
|
|
142
142
|
'sd-select--error': !!this.error,
|
|
@@ -464,8 +464,8 @@ export class SdSelect extends BaseDropdownEvent {
|
|
|
464
464
|
"references": {
|
|
465
465
|
"SdTooltipProps": {
|
|
466
466
|
"location": "import",
|
|
467
|
-
"path": "../sd-tooltip/sd-tooltip",
|
|
468
|
-
"id": "src/components/sd-tooltip/sd-tooltip.
|
|
467
|
+
"path": "../sd-tooltip/sd-tooltip.config",
|
|
468
|
+
"id": "src/components/sd-tooltip/sd-tooltip.config.ts::SdTooltipProps",
|
|
469
469
|
"referenceLocation": "SdTooltipProps"
|
|
470
470
|
}
|
|
471
471
|
}
|
|
@@ -145,7 +145,7 @@ export class SdSelectMultiple extends BaseDropdownEvent {
|
|
|
145
145
|
this.handleOptionSelection(option);
|
|
146
146
|
};
|
|
147
147
|
render() {
|
|
148
|
-
return (h("sd-field", { key: '
|
|
148
|
+
return (h("sd-field", { key: 'e445d2c3f80d78be0e74b1f54371eb27d9c316e8', label: this.label, name: this.name, rules: this.rules, error: this.error, disabled: this.disabled, useLabelRequired: this.useLabelRequired, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el) }, h("div", { key: '9fad0ed744cafb9e1e5f16ee413f36edd8f2c1f3', class: {
|
|
149
149
|
'sd-select-multiple': true,
|
|
150
150
|
'sd-select-multiple--open': this.isOpen,
|
|
151
151
|
'sd-select-multiple--disabled': this.disabled,
|
|
@@ -389,7 +389,7 @@ export class SdSelectMultipleGroup extends BaseDropdownEvent {
|
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
391
|
render() {
|
|
392
|
-
return (h("sd-field", { key: '
|
|
392
|
+
return (h("sd-field", { key: '85f8cf143482bb054d2ce3c15c2028213c877daf', label: this.label, name: this.name, rules: this.rules, error: this.error, disabled: this.disabled, useLabelRequired: this.useLabelRequired, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), style: { '--field-width': this.width || '200px' } }, h("div", { key: '8c92a916b26f1e4935cefc3772ec655f1cd31083', class: {
|
|
393
393
|
'sd-select-multiple-group': true,
|
|
394
394
|
'sd-select-multiple-group--open': this.isOpen,
|
|
395
395
|
'sd-select-multiple-group--disabled': this.disabled,
|
|
@@ -776,8 +776,8 @@ export class SdSelectMultipleGroup extends BaseDropdownEvent {
|
|
|
776
776
|
"references": {
|
|
777
777
|
"SdTooltipProps": {
|
|
778
778
|
"location": "import",
|
|
779
|
-
"path": "../sd-tooltip/sd-tooltip",
|
|
780
|
-
"id": "src/components/sd-tooltip/sd-tooltip.
|
|
779
|
+
"path": "../sd-tooltip/sd-tooltip.config",
|
|
780
|
+
"id": "src/components/sd-tooltip/sd-tooltip.config.ts::SdTooltipProps",
|
|
781
781
|
"referenceLocation": "SdTooltipProps"
|
|
782
782
|
}
|
|
783
783
|
}
|
|
@@ -39,7 +39,7 @@ export class SdSelectOptionGroup {
|
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
render() {
|
|
42
|
-
return (h("div", { key: '
|
|
42
|
+
return (h("div", { key: '8e88aacd2c3122a563fcf78bcbe9731b6a29d8c5', class: {
|
|
43
43
|
'sd-select__option-group': true,
|
|
44
44
|
'sd-select__option-group--selected': !!this.isSelected,
|
|
45
45
|
'sd-select__option-group--disabled': !!this.option.disabled,
|
|
@@ -48,10 +48,10 @@ export class SdSelectOptionGroup {
|
|
|
48
48
|
'sd-select__option-group--group': this.option.type === 'group',
|
|
49
49
|
'sd-select__option-group--subgroup': this.option.type === 'subgroup',
|
|
50
50
|
'sd-select__option-group--item': this.option.type === 'item',
|
|
51
|
-
}, onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), style: this.optionStyle, "data-index": this.index, onClick: event => this.handleClick(this.option, this.isSelected, event) }, h("div", { key: '
|
|
51
|
+
}, onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), style: this.optionStyle, "data-index": this.index, onClick: event => this.handleClick(this.option, this.isSelected, event) }, h("div", { key: 'be4bc7f2867ea5c86505bc9284ac3de46f7077f9', class: "sd-select__option-group__label-wrapper" }, this.useCheckbox && (h("sd-checkbox", { key: '00063ab3a6f1d4f44671ac82dd05524968bec668', value: this.isSelected, disabled: this.option.disabled, onClick: e => {
|
|
52
52
|
e.preventDefault();
|
|
53
53
|
this.handleClick(this.option, this.isSelected, e);
|
|
54
|
-
} })), h("span", { key: '
|
|
54
|
+
} })), h("span", { key: '802c908d44bf1c0db5d64bf4c8d4bab4ebe2b87c', class: "sd-select__option-group-label" }, this.option.label), this.useIndicator && this.option.type !== 'item' && (h("span", { key: 'efd26a2d6e4e2662410de3755b70a2a2585ad0c4', class: "sd-select__option-group__count-indicator" }, `(${this.countInfo?.selectedCount}/${this.countInfo?.totalCount})`)))));
|
|
55
55
|
}
|
|
56
56
|
static get is() { return "sd-select-option-group"; }
|
|
57
57
|
static get originalStyleUrls() {
|
|
@@ -759,16 +759,16 @@ export class SdTable {
|
|
|
759
759
|
return (h("td", { key: `virtual-${position}-spacer-${rowIdx}`, class: "sd-table__virtual-spacer", style: this.getSpacerCellStyle(spacerWidth), "aria-hidden": "true" }, h("div", { class: "sd-table__skeleton-cell" })));
|
|
760
760
|
}
|
|
761
761
|
render() {
|
|
762
|
-
return (h(Fragment, { key: '
|
|
762
|
+
return (h(Fragment, { key: '882ded3f26849b023ade24914d2d88b7278a9d4a' }, h("div", { key: 'cdaaaed9dbda39eae701e2cbfa9f22fbcdc86cf1', class: "sd-table__wrapper", style: {
|
|
763
763
|
'--table-width': this.width,
|
|
764
764
|
'--table-height': this.height,
|
|
765
|
-
} }, h("div", { key: '
|
|
765
|
+
} }, h("div", { key: '818b1f6f742861fe8515b2fd8bb826bbe357100f', class: "sd-table__container", style: {
|
|
766
766
|
'--table-container-height': `calc(${this.height} - ${this.pagination && this.innerRows.length > 0 ? 48 : 0}px)`,
|
|
767
|
-
} }, h("div", { key: '
|
|
767
|
+
} }, h("div", { key: 'b9fd1c56e1ab374ee7da80a82e1b96a2f1584eea', class: {
|
|
768
768
|
'sd-table__middle': true,
|
|
769
769
|
'sd-table__middle--scrollable': this.paginatedRows.length > 0,
|
|
770
770
|
'sd-table__middle--loading': this.isLoading,
|
|
771
|
-
} }, this.isLoading && (h("div", { key: '
|
|
771
|
+
} }, this.isLoading && (h("div", { key: '30521e8896081a62ea96391bf7bc7f20103fc3ed', class: "sd-table__middle--loading__spinner" }, h("sd-loading-spinner", { key: 'db184565e08194d4f6a35da66aa011f0b7641d8a' }))), h("table", { key: 'c8585073a95c0391c14db74d54242998a648437d', part: "table", class: this.sdTableClasses }, this.renderHead(), this.renderBody())), !this.paginatedRows.length && (h("div", { key: '27d8471253fe0a1e6ee8637ed8aecaf1ce9071c2', class: "sd-table__bottom" }, h("div", { key: 'c35591b39ff87a55d38f9b0cb2b91fbd54081f0b', class: "sd-table__no-data" }, h("slot", { key: '0af141458219896bd93dbc7a195389d4a40cf654', name: "no-data" }, this.noDataLabel))))), this.pagination && this.innerRows.length > 0 && (h("div", { key: '981becdef62a000bd6d338428fa1e20b5205c77e', class: "sd-table__pagination" }, h("sd-pagination", { key: '47f042431c47d7dcdb3acfb2e4687d8c8e66ba6c', currentPage: !this.useInternalPagination ? this.pagination.page : this.currentPage, lastPage: !this.useInternalPagination ? this.pagination.lastPage : this.lastPageNumber, onSdPageChange: (e) => this.changePage(e.detail) }), this.useRowsPerPageSelect && (h("sd-select", { key: '0f9edc63cf7e119c9dc1e343ec043c28b36ee83d', value: this.pagination.rowsPerPage, options: this.rowsPerPageOption, width: "128px", onSdUpdate: (e) => this.changeRowsPerPage(e.detail.value) })))))));
|
|
772
772
|
}
|
|
773
773
|
static get is() { return "sd-table"; }
|
|
774
774
|
static get originalStyleUrls() {
|
|
@@ -40,7 +40,7 @@ export class SdTabs {
|
|
|
40
40
|
return `square_${this.size}_${color}`;
|
|
41
41
|
}
|
|
42
42
|
render() {
|
|
43
|
-
return (h("div", { key: '
|
|
43
|
+
return (h("div", { key: 'c7e6f8385e395a8adc7605ce4a7ae32c25f83829', class: this.getContainerClasses() }, this.tabs.map((tab, index) => {
|
|
44
44
|
const badgeName = this.getBadgeName(tab);
|
|
45
45
|
return (h("div", { key: `tab-${index}`, class: this.getTabClasses(tab), "aria-label": tab.label || 'tab', onClick: () => this.handleTabClick(tab.value) }, h("span", { "data-label": tab.label, class: "sd-tabs__label" }, tab.label), tab.badge && (h("sd-tag", { name: badgeName, label: tab.badge.toString() }))));
|
|
46
46
|
})));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import tagTokens from "../../tokens/generated/component.tag.json";
|
|
1
2
|
export const TAG_SHAPES = ['square', 'pill'];
|
|
2
|
-
export const TAG_SIZES = ['
|
|
3
|
+
export const TAG_SIZES = ['xs', 'sm', 'md'];
|
|
3
4
|
export const TAG_COLORS = [
|
|
4
5
|
'grey',
|
|
5
6
|
'red',
|
|
@@ -11,48 +12,51 @@ export const TAG_COLORS = [
|
|
|
11
12
|
'indigo',
|
|
12
13
|
];
|
|
13
14
|
const TAG_COLOR_CONFIG = {
|
|
14
|
-
grey: { background:
|
|
15
|
-
red: { background:
|
|
16
|
-
orange: { background:
|
|
17
|
-
yellow: { background:
|
|
18
|
-
green: { background:
|
|
19
|
-
blue: { background:
|
|
20
|
-
darkblue: { background:
|
|
21
|
-
indigo: { background:
|
|
15
|
+
grey: { background: tagTokens.tag.grey.content, content: tagTokens.tag.grey.bg, icon: tagTokens.tag.grey.bg },
|
|
16
|
+
red: { background: tagTokens.tag.red.content, content: tagTokens.tag.red.bg, icon: tagTokens.tag.red.bg },
|
|
17
|
+
orange: { background: tagTokens.tag.orange.content, content: tagTokens.tag.orange.bg, icon: tagTokens.tag.orange.bg },
|
|
18
|
+
yellow: { background: tagTokens.tag.yellow.content, content: tagTokens.tag.yellow.bg, icon: tagTokens.tag.yellow.bg },
|
|
19
|
+
green: { background: tagTokens.tag.green.content, content: tagTokens.tag.green.bg, icon: tagTokens.tag.green.bg },
|
|
20
|
+
blue: { background: tagTokens.tag.blue.content, content: tagTokens.tag.blue.bg, icon: tagTokens.tag.blue.bg },
|
|
21
|
+
darkblue: { background: tagTokens.tag.darkblue.content, content: tagTokens.tag.darkblue.bg, icon: tagTokens.tag.darkblue.bg },
|
|
22
|
+
indigo: { background: tagTokens.tag.indigo.content, content: tagTokens.tag.indigo.bg, icon: tagTokens.tag.indigo.bg },
|
|
22
23
|
};
|
|
23
24
|
const SQUARE_SIZE_CONFIG = {
|
|
24
|
-
|
|
25
|
-
height:
|
|
26
|
-
paddingX:
|
|
27
|
-
gap:
|
|
28
|
-
fontSize:
|
|
29
|
-
fontWeight:
|
|
30
|
-
|
|
25
|
+
xs: {
|
|
26
|
+
height: `${tagTokens.tag.xs.paddingX ? Number(tagTokens.tag.xs.typography.lineHeight) + Number(tagTokens.tag.xs.paddingX) : 20}px`,
|
|
27
|
+
paddingX: `${tagTokens.tag.xs.paddingX}px`,
|
|
28
|
+
gap: `${tagTokens.tag.xs.gap}px`,
|
|
29
|
+
fontSize: `${tagTokens.tag.xs.typography.fontSize}px`,
|
|
30
|
+
fontWeight: tagTokens.tag.xs.typography.fontWeight,
|
|
31
|
+
lineHeight: `${tagTokens.tag.xs.typography.lineHeight}px`,
|
|
32
|
+
iconSize: Number(tagTokens.tag.xs.icon),
|
|
31
33
|
radius: '4px',
|
|
32
34
|
},
|
|
33
|
-
|
|
34
|
-
height:
|
|
35
|
-
paddingX:
|
|
36
|
-
gap:
|
|
37
|
-
fontSize:
|
|
38
|
-
fontWeight:
|
|
39
|
-
|
|
35
|
+
sm: {
|
|
36
|
+
height: `${tagTokens.tag.sm.paddingX ? Number(tagTokens.tag.sm.typography.lineHeight) + Number(tagTokens.tag.sm.paddingX) : 24}px`,
|
|
37
|
+
paddingX: `${tagTokens.tag.sm.paddingX}px`,
|
|
38
|
+
gap: `${tagTokens.tag.sm.gap}px`,
|
|
39
|
+
fontSize: `${tagTokens.tag.sm.typography.fontSize}px`,
|
|
40
|
+
fontWeight: tagTokens.tag.sm.typography.fontWeight,
|
|
41
|
+
lineHeight: `${tagTokens.tag.sm.typography.lineHeight}px`,
|
|
42
|
+
iconSize: Number(tagTokens.tag.sm.icon),
|
|
40
43
|
radius: '4px',
|
|
41
44
|
},
|
|
42
|
-
|
|
43
|
-
height:
|
|
44
|
-
paddingX:
|
|
45
|
-
gap:
|
|
46
|
-
fontSize:
|
|
47
|
-
fontWeight:
|
|
48
|
-
|
|
45
|
+
md: {
|
|
46
|
+
height: `${tagTokens.tag.md.paddingX ? Number(tagTokens.tag.md.typography.lineHeight) + Number(tagTokens.tag.md.paddingX) : 28}px`,
|
|
47
|
+
paddingX: `${tagTokens.tag.md.paddingX}px`,
|
|
48
|
+
gap: `${tagTokens.tag.md.gap}px`,
|
|
49
|
+
fontSize: `${tagTokens.tag.md.typography.fontSize}px`,
|
|
50
|
+
fontWeight: tagTokens.tag.md.typography.fontWeight,
|
|
51
|
+
lineHeight: `${tagTokens.tag.md.typography.lineHeight}px`,
|
|
52
|
+
iconSize: Number(tagTokens.tag.md.icon),
|
|
49
53
|
radius: '5px',
|
|
50
54
|
},
|
|
51
55
|
};
|
|
52
56
|
const PILL_SIZE_CONFIG = {
|
|
57
|
+
xs: { ...SQUARE_SIZE_CONFIG.xs, radius: '999px' },
|
|
53
58
|
sm: { ...SQUARE_SIZE_CONFIG.sm, radius: '999px' },
|
|
54
59
|
md: { ...SQUARE_SIZE_CONFIG.md, radius: '999px' },
|
|
55
|
-
lg: { ...SQUARE_SIZE_CONFIG.lg, radius: '999px' },
|
|
56
60
|
};
|
|
57
61
|
export const TAG_CONFIG = Object.fromEntries(TAG_SHAPES.flatMap(shape => TAG_SIZES.flatMap(size => TAG_COLORS.map(color => {
|
|
58
62
|
const sizeConfig = shape === 'square' ? SQUARE_SIZE_CONFIG[size] : PILL_SIZE_CONFIG[size];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { TAG_CONFIG, isTagName } from "./sd-tag.config";
|
|
3
3
|
export class SdTag {
|
|
4
|
-
name = '
|
|
4
|
+
name = 'square_sm_grey';
|
|
5
5
|
label = '';
|
|
6
6
|
icon;
|
|
7
7
|
isLeft = true;
|
|
@@ -19,7 +19,7 @@ export class SdTag {
|
|
|
19
19
|
render() {
|
|
20
20
|
const config = this.resolvedConfig;
|
|
21
21
|
const iconNode = this.renderIcon(config.icon, config.iconSize);
|
|
22
|
-
return (h("span", { key: '
|
|
22
|
+
return (h("span", { key: 'c1c80bafa32e7c658780a8c214de97b9a7099697', class: "sd-tag", style: {
|
|
23
23
|
'--sd-tag-background': config.background,
|
|
24
24
|
'--sd-tag-content': config.content,
|
|
25
25
|
'--sd-tag-height': config.height,
|
|
@@ -27,8 +27,9 @@ export class SdTag {
|
|
|
27
27
|
'--sd-tag-gap': config.gap,
|
|
28
28
|
'--sd-tag-font-size': config.fontSize,
|
|
29
29
|
'--sd-tag-font-weight': config.fontWeight,
|
|
30
|
+
'--sd-tag-line-height': config.lineHeight,
|
|
30
31
|
'--sd-tag-radius': config.radius,
|
|
31
|
-
}, "aria-label": this.label || 'tag' }, this.icon && this.isLeft && iconNode, h("span", { key: '
|
|
32
|
+
}, "aria-label": this.label || 'tag' }, this.icon && this.isLeft && iconNode, h("span", { key: '6a0d9ec74319a7cefd0ceae96ffed32c717000bb', class: "sd-tag__label" }, this.label), this.icon && !this.isLeft && iconNode));
|
|
32
33
|
}
|
|
33
34
|
static get is() { return "sd-tag"; }
|
|
34
35
|
static get originalStyleUrls() {
|
|
@@ -48,7 +49,7 @@ export class SdTag {
|
|
|
48
49
|
"mutable": false,
|
|
49
50
|
"complexType": {
|
|
50
51
|
"original": "TagName",
|
|
51
|
-
"resolved": "\"
|
|
52
|
+
"resolved": "\"pill_md_blue\" | \"pill_md_darkblue\" | \"pill_md_green\" | \"pill_md_grey\" | \"pill_md_indigo\" | \"pill_md_orange\" | \"pill_md_red\" | \"pill_md_yellow\" | \"pill_sm_blue\" | \"pill_sm_darkblue\" | \"pill_sm_green\" | \"pill_sm_grey\" | \"pill_sm_indigo\" | \"pill_sm_orange\" | \"pill_sm_red\" | \"pill_sm_yellow\" | \"pill_xs_blue\" | \"pill_xs_darkblue\" | \"pill_xs_green\" | \"pill_xs_grey\" | \"pill_xs_indigo\" | \"pill_xs_orange\" | \"pill_xs_red\" | \"pill_xs_yellow\" | \"square_md_blue\" | \"square_md_darkblue\" | \"square_md_green\" | \"square_md_grey\" | \"square_md_indigo\" | \"square_md_orange\" | \"square_md_red\" | \"square_md_yellow\" | \"square_sm_blue\" | \"square_sm_darkblue\" | \"square_sm_green\" | \"square_sm_grey\" | \"square_sm_indigo\" | \"square_sm_orange\" | \"square_sm_red\" | \"square_sm_yellow\" | \"square_xs_blue\" | \"square_xs_darkblue\" | \"square_xs_green\" | \"square_xs_grey\" | \"square_xs_indigo\" | \"square_xs_orange\" | \"square_xs_red\" | \"square_xs_yellow\"",
|
|
52
53
|
"references": {
|
|
53
54
|
"TagName": {
|
|
54
55
|
"location": "import",
|
|
@@ -68,7 +69,7 @@ export class SdTag {
|
|
|
68
69
|
"setter": false,
|
|
69
70
|
"reflect": false,
|
|
70
71
|
"attribute": "name",
|
|
71
|
-
"defaultValue": "'
|
|
72
|
+
"defaultValue": "'square_sm_grey'"
|
|
72
73
|
},
|
|
73
74
|
"label": {
|
|
74
75
|
"type": "string",
|
|
@@ -75,10 +75,10 @@ export class SdTextarea {
|
|
|
75
75
|
}
|
|
76
76
|
render() {
|
|
77
77
|
const maxLengthCounter = this.getMaxLengthCounter();
|
|
78
|
-
return (h("div", { key: '
|
|
78
|
+
return (h("div", { key: 'b8d0496866829b85f6678f648ccc944d57b45378', class: {
|
|
79
79
|
'sd-textarea': true,
|
|
80
80
|
[this.getTextareaStatus()]: true,
|
|
81
|
-
}, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, h("div", { key: '
|
|
81
|
+
}, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, h("div", { key: 'b43d91b1c7381a2b6c7a0ab1437e43e32396419c', class: "sd-textarea__content" }, h("textarea", { key: '9b77710a8344db09172f57212c55db6a70ec96f2', name: this.name, ref: el => (this.nativeEl = el), class: `sd-textarea__native ${this.textareaClass}`, value: this.internalValue || '', placeholder: this.placeholder, disabled: this.disabled, autofocus: this.autoFocus, maxLength: this.maxLength, onInput: this.handleInput.bind(this), onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event) })), this.hasFooter() && (h("div", { key: '67056ceb0778d11a607cfc1de9de9440c98bd165', class: "sd-textarea__footer" }, this.helpText !== undefined && h("span", { key: 'bcdb6b7991cae0e68a21f04a53299952602e5039', class: "sd-textarea__help-text" }, this.helpText), maxLengthCounter !== null && h("span", { key: '526ff7bcd19688f086ef1f129008b4849a8d3491', class: "sd-textarea__counter" }, maxLengthCounter)))));
|
|
82
82
|
}
|
|
83
83
|
static get is() { return "sd-textarea"; }
|
|
84
84
|
static get originalStyleUrls() {
|
|
@@ -39,10 +39,10 @@ export class SdToast {
|
|
|
39
39
|
background: resolveColor(colorTokens.background),
|
|
40
40
|
text: resolveColor(colorTokens.text),
|
|
41
41
|
};
|
|
42
|
-
return (h("div", { key: '
|
|
42
|
+
return (h("div", { key: '0e0643ca708f95b8b357a1e146343948366ca727', style: {
|
|
43
43
|
'--sd-toast-bg': colors.background,
|
|
44
44
|
'--sd-toast-text': colors.text,
|
|
45
|
-
} }, h("div", { key: '
|
|
45
|
+
} }, h("div", { key: '366f178360029706f54bc44cc95d2807c374318e', class: this.getContainerClasses(), role: "status", "aria-live": "polite", "aria-atomic": "true" }, this.icon && (h("div", { key: 'c110b274a1929970bc818c8a41040b26656ba27e', class: "sd-toast__icon" }, h("sd-icon", { key: '7e71e2878f18c66d7ac4aa07d1e96eff74bea074', name: this.icon, size: 16, color: colors.text }))), h("div", { key: 'b1a3a86d65724b8bbe1ab131e289379451ea7ec4', class: "sd-toast__content" }, h("span", { key: '56ac68520c8be2541528c7ff3242d634f036aec0', class: "sd-toast__message" }, this.message)), this.link && (h("a", { key: '5e93140dea3082f869a1263d0cb0574690173cc8', href: this.link, class: "sd-toast__link", target: "_blank", rel: "noopener noreferrer" }, this.linkLabel || this.link)), this.buttonLabel && (h("sd-button", { key: '79e472c5f4b31e3df155bcf621a5b83345a62788', 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('grey_95') } : {} })), this.useClose && (h("button", { key: 'fb3f5666b04fedf20b81235bb34c1c2d793aa1fa', type: "button", class: "sd-toast__close", onClick: this.handleClose, "aria-label": "Close", title: "Close" }, h("sd-icon", { key: 'dff68640b8f90dba0e2ee77c743e304bd5b80859', name: "close", size: 12, color: colors.text }))))));
|
|
46
46
|
}
|
|
47
47
|
static get is() { return "sd-toast"; }
|
|
48
48
|
static get originalStyleUrls() {
|
|
@@ -28,7 +28,7 @@ export class SdToggle {
|
|
|
28
28
|
this.change.emit(newValue);
|
|
29
29
|
};
|
|
30
30
|
render() {
|
|
31
|
-
return (h("label", { key: '
|
|
31
|
+
return (h("label", { key: '1b2a644cdf09cb16d77ecfe38be28b0fdcbf592a', "aria-label": this.label || 'toggle', class: this.toggleClasses }, h("input", { key: '1f1f09c157fe0d8cab0dd5b45caa51b6418cf80f', type: "checkbox", checked: this.value, disabled: this.disabled, onInput: this.handleChange }), this.label && h("span", { key: '0aedb28652224b3a51bd13b912d2d85a4adbaa12', class: "sd-toggle__label" }, this.label), h("div", { key: 'af31fa9a84bae6c4bb97e339f5a26678f1a951e7', class: "sd-toggle__track" }, h("div", { key: 'cade31468c32d0179d4db0473e66c89d8ac4119c', class: "sd-toggle__thumb" }))));
|
|
32
32
|
}
|
|
33
33
|
static get is() { return "sd-toggle"; }
|
|
34
34
|
static get originalStyleUrls() {
|
|
@@ -32,7 +32,7 @@ export class SdToggleButton {
|
|
|
32
32
|
this.change.emit(newValue);
|
|
33
33
|
};
|
|
34
34
|
render() {
|
|
35
|
-
return (h("label", { key: '
|
|
35
|
+
return (h("label", { key: '765e1ec1a8ca7d55a1c8000044168c39032c649d', class: this.buttonClasses, "aria-label": this.label || 'toggle button' }, this.label, h("input", { key: 'f3ea12b098b9bd5d50c626a3b0611457e580387c', style: { display: 'none' }, type: "checkbox", onInput: this.handleChange })));
|
|
36
36
|
}
|
|
37
37
|
static get is() { return "sd-toggle-button"; }
|
|
38
38
|
static get originalStyleUrls() {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import tooltipTokens from "../../tokens/generated/component.tooltip.json";
|
|
2
|
+
export const TOOLTIP_TYPE_CONFIG = {
|
|
3
|
+
default: { bg: tooltipTokens.tooltip.default.bg, content: tooltipTokens.tooltip.default.content },
|
|
4
|
+
danger: { bg: tooltipTokens.tooltip.danger.bg, content: tooltipTokens.tooltip.danger.content },
|
|
5
|
+
warning: { bg: tooltipTokens.tooltip.warning.bg, content: tooltipTokens.tooltip.warning.content },
|
|
6
|
+
accent: { bg: tooltipTokens.tooltip.accent.bg, content: tooltipTokens.tooltip.accent.content },
|
|
7
|
+
};
|