@sellmate/design-system 1.0.17 → 1.0.18
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-badge.cjs.entry.js +1 -1
- package/dist/cjs/sd-button_21.cjs.entry.js +24 -24
- 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-file-picker.cjs.entry.js +3 -3
- package/dist/cjs/sd-guide.cjs.entry.js +2 -2
- package/dist/cjs/sd-popover.cjs.entry.js +2 -2
- package/dist/cjs/sd-progress.cjs.entry.js +2 -2
- 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-toast.cjs.entry.js +60 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/sd-badge/sd-badge.js +1 -1
- 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-field/sd-field.js +3 -3
- package/dist/collection/components/sd-file-picker/sd-file-picker.js +3 -3
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
- package/dist/collection/components/sd-guide/sd-guide.js +2 -2
- package/dist/collection/components/sd-icon/sd-icon.js +1 -1
- package/dist/collection/components/sd-input/sd-input.js +1 -1
- package/dist/collection/components/sd-loading-spinner/sd-loading-spinner.js +1 -1
- package/dist/collection/components/sd-number-input/sd-number-input.js +4 -4
- package/dist/collection/components/sd-pagination/sd-pagination.js +2 -2
- package/dist/collection/components/sd-popover/sd-popover.js +2 -2
- package/dist/collection/components/sd-portal/sd-portal.js +1 -1
- package/dist/collection/components/sd-progress/sd-progress.js +2 -2
- package/dist/collection/components/sd-select/sd-select-dropdown/sd-select-dropdown.js +2 -2
- package/dist/collection/components/sd-select/sd-select-option/sd-select-option.js +1 -1
- package/dist/collection/components/sd-select/sd-select-search-input/sd-select-search-input.js +3 -3
- package/dist/collection/components/sd-select-multiple/sd-select-multiple.js +1 -1
- package/dist/collection/components/sd-select-multiple-group/sd-select-option-group/sd-select-option-group.js +3 -3
- package/dist/collection/components/sd-textarea/sd-textarea.js +2 -2
- package/dist/collection/components/{sd-toast-message/sd-toast-message.css → sd-toast/sd-toast.css} +13 -13
- package/dist/collection/components/{sd-toast-message/sd-toast-message.js → sd-toast/sd-toast.js} +11 -11
- package/dist/components/{p-BSPYsa_p.js → p-7hAgxVaZ.js} +1 -1
- package/dist/components/{p-DGXSqFYF.js → p-Ay5V-5Fu.js} +1 -1
- package/dist/components/{p-BJ1sZUZE.js → p-B45-wHcP.js} +1 -1
- package/dist/components/{p--wNfOAvE.js → p-BDlbibwl.js} +1 -1
- package/dist/components/{p-BRSMWd2J.js → p-BkU8yMUR.js} +1 -1
- package/dist/components/{p-IlOHs7VA.js → p-Bxs0Hp4o.js} +1 -1
- package/dist/components/{p-BumvzURf.js → p-CIDMF6fj.js} +1 -1
- package/dist/components/{p-BUiP8HLx.js → p-CNgER9mk.js} +1 -1
- package/dist/components/{p-BhfNRQpq.js → p-Csz5Om2E.js} +1 -1
- package/dist/components/{p-D9QyXmjs.js → p-Czdx4VDt.js} +1 -1
- package/dist/components/p-DHdV8DHV.js +1 -0
- package/dist/components/{p-B1d3IESD.js → p-DOdjsjwr.js} +1 -1
- package/dist/components/{p-zP9SItz2.js → p-DojkP9rD.js} +1 -1
- package/dist/components/{p-CbR8h94f.js → p-GjahxZoU.js} +1 -1
- package/dist/components/{p-Ca2v-uuC.js → p-IFDX7o1t.js} +1 -1
- package/dist/components/sd-badge.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-field.js +1 -1
- package/dist/components/sd-file-picker.js +1 -1
- package/dist/components/sd-floating-portal.js +1 -1
- package/dist/components/sd-guide.js +1 -1
- package/dist/components/sd-icon.js +1 -1
- package/dist/components/sd-input.js +1 -1
- package/dist/components/sd-loading-spinner.js +1 -1
- package/dist/components/sd-modal-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-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-textarea.js +1 -1
- package/dist/components/{sd-toast-message.d.ts → sd-toast.d.ts} +4 -4
- package/dist/components/sd-toast.js +1 -0
- package/dist/components/sd-tooltip.js +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/{p-b2bbc545.entry.js → p-12669d98.entry.js} +1 -1
- package/dist/design-system/{p-6d82343b.entry.js → p-21da28bf.entry.js} +1 -1
- package/dist/design-system/{p-6d573397.entry.js → p-2c776f94.entry.js} +1 -1
- package/dist/design-system/p-31175b5c.entry.js +1 -0
- package/dist/design-system/{p-ffd96f05.entry.js → p-358de11a.entry.js} +1 -1
- package/dist/design-system/{p-6d9053d6.entry.js → p-a4f8f2cd.entry.js} +1 -1
- package/dist/design-system/{p-6c7732fd.entry.js → p-b3a0300b.entry.js} +1 -1
- package/dist/design-system/{p-5b616cae.entry.js → p-c5837bdf.entry.js} +1 -1
- package/dist/design-system/p-d9af74c0.entry.js +1 -0
- package/dist/design-system/{p-d676165a.entry.js → p-f69a9ad8.entry.js} +1 -1
- package/dist/design-system/p-fe119275.entry.js +1 -0
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sd-badge.entry.js +1 -1
- package/dist/esm/sd-button_21.entry.js +24 -24
- package/dist/esm/sd-card.entry.js +1 -1
- package/dist/esm/sd-date-picker.entry.js +1 -1
- package/dist/esm/sd-file-picker.entry.js +3 -3
- package/dist/esm/sd-guide.entry.js +2 -2
- package/dist/esm/sd-popover.entry.js +2 -2
- package/dist/esm/sd-progress.entry.js +2 -2
- 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-toast.entry.js +58 -0
- package/dist/types/components/{sd-toast-message/sd-toast-message.d.ts → sd-toast/sd-toast.d.ts} +1 -1
- package/dist/types/components.d.ts +19 -19
- package/hydrate/index.js +50 -50
- package/hydrate/index.mjs +50 -50
- package/package.json +1 -1
- package/dist/cjs/sd-toast-message.cjs.entry.js +0 -60
- package/dist/components/p-D8iZcruV.js +0 -1
- package/dist/components/sd-toast-message.js +0 -1
- package/dist/design-system/p-337a0cac.entry.js +0 -1
- package/dist/design-system/p-a98c256a.entry.js +0 -1
- package/dist/design-system/p-e78cd4af.entry.js +0 -1
- package/dist/esm/sd-toast-message.entry.js +0 -58
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-BNCQkS1w.js';
|
|
2
|
-
import { r as resolveColor } from './resolveColor-DcGvp3RM.js';
|
|
3
|
-
|
|
4
|
-
const sdToastMessageCss = () => `sd-toast-message{display:block;width:fit-content;height:fit-content}sd-toast-message .sd-toast-message{display:flex;width:fit-content;align-items:center;gap:16px;padding:12px 24px;border-radius:4px;background-color:var(--sd-toast-bg);color:var(--sd-toast-text);transition:opacity 0.2s ease, visibility 0.2s ease;box-shadow:2px 2px 8px 2px rgba(0, 0, 0, 0.2)}sd-toast-message .sd-toast-message--hidden{opacity:0;visibility:hidden;pointer-events:none}sd-toast-message .sd-toast-message__icon{display:flex;align-items:center;flex-shrink:0}sd-toast-message .sd-toast-message__content{display:flex;flex:1}sd-toast-message .sd-toast-message__message{font-size:14px;line-height:20px;font-weight:400}sd-toast-message .sd-toast-message__link{font-size:14px;line-height:20px;color:var(--sd-toast-text);text-decoration:underline;cursor:pointer;transition:opacity 0.2s ease;margin-left:4px}sd-toast-message .sd-toast-message__link:hover{opacity:0.8}sd-toast-message .sd-toast-message__button{flex-shrink:0}sd-toast-message .sd-toast-message__button button{color:var(--button-text-color, inherit) !important}sd-toast-message .sd-toast-message__close{display:flex;align-items:center;justify-content:center;padding:4px;background-color:transparent;border:none;cursor:pointer;transition:opacity 0.2s ease;flex-shrink:0}sd-toast-message .sd-toast-message__close:hover{opacity:0.7}sd-toast-message .sd-toast-message__close:active{opacity:0.5}`;
|
|
5
|
-
|
|
6
|
-
const SdToastMessage = class {
|
|
7
|
-
constructor(hostRef) {
|
|
8
|
-
registerInstance(this, hostRef);
|
|
9
|
-
this.close = createEvent(this, "sdClose");
|
|
10
|
-
this.buttonClick = createEvent(this, "sdButtonClick");
|
|
11
|
-
}
|
|
12
|
-
icon;
|
|
13
|
-
message;
|
|
14
|
-
link;
|
|
15
|
-
linkLabel;
|
|
16
|
-
buttonLabel;
|
|
17
|
-
useClose = false;
|
|
18
|
-
type = 'basicDark';
|
|
19
|
-
close;
|
|
20
|
-
buttonClick;
|
|
21
|
-
isVisible = true;
|
|
22
|
-
static COLOR_OF_TYPE = {
|
|
23
|
-
basicLight: { background: 'white', text: 'grey_95' },
|
|
24
|
-
basicDark: { background: 'steelblue_90', text: 'white' },
|
|
25
|
-
error: { background: 'red_70', text: 'white' },
|
|
26
|
-
caution: { background: 'yellow_40', text: 'grey_90' },
|
|
27
|
-
complete: { background: 'green_75', text: 'white' },
|
|
28
|
-
progress: { background: 'brilliantblue_80', text: 'white' },
|
|
29
|
-
};
|
|
30
|
-
handleClose = () => {
|
|
31
|
-
this.isVisible = false;
|
|
32
|
-
this.close.emit();
|
|
33
|
-
};
|
|
34
|
-
handleButtonClick = () => {
|
|
35
|
-
this.buttonClick.emit();
|
|
36
|
-
};
|
|
37
|
-
getContainerClasses() {
|
|
38
|
-
const classes = ['sd-toast-message', `sd-toast-message--${this.type}`];
|
|
39
|
-
if (!this.isVisible) {
|
|
40
|
-
classes.push('sd-toast-message--hidden');
|
|
41
|
-
}
|
|
42
|
-
return classes.join(' ');
|
|
43
|
-
}
|
|
44
|
-
render() {
|
|
45
|
-
const colorTokens = SdToastMessage.COLOR_OF_TYPE[this.type];
|
|
46
|
-
const colors = {
|
|
47
|
-
background: resolveColor(colorTokens.background),
|
|
48
|
-
text: resolveColor(colorTokens.text),
|
|
49
|
-
};
|
|
50
|
-
return (h("div", { key: '5fd84c67e2766016835cfa6fb87a6624b654338d', style: {
|
|
51
|
-
'--sd-toast-bg': colors.background,
|
|
52
|
-
'--sd-toast-text': colors.text,
|
|
53
|
-
} }, h("div", { key: '00cbdacb890e65c6a4a1980933496e3a007d4c55', class: this.getContainerClasses(), role: "status", "aria-live": "polite", "aria-atomic": "true" }, this.icon && (h("div", { key: '40a4942dafb3c7b5e720ece5af28bfbe40a05726', class: "sd-toast-message__icon" }, h("sd-icon", { key: 'a2541d653e24e33a2496a36f476a98acd81d1d9d', name: this.icon, size: 16, color: colors.text }))), h("div", { key: '09d913c231f397813f4c145577113334b4d8936c', class: "sd-toast-message__content" }, h("span", { key: '1b6ddeadab09234698824b2e07b6b3170a52b742', class: "sd-toast-message__message" }, this.message)), this.link && (h("a", { key: '2c85646a763edb49dfd4ace150b11704064ffacb', href: this.link, class: "sd-toast-message__link", target: "_blank", rel: "noopener noreferrer" }, this.linkLabel || this.link)), this.buttonLabel && (h("sd-button", { key: '5e53f5a629c3b9a1000b8606877d833eaf56de2a', class: `sd-toast-message__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: '78583506f960dab8c2e978a51de52fa0cfecc559', type: "button", class: "sd-toast-message__close", onClick: this.handleClose, "aria-label": "Close", title: "Close" }, h("sd-icon", { key: '926c90a10942c2bb2ed0815236e2857d3d46b6f6', name: "close", size: 12, color: colors.text }))))));
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
SdToastMessage.style = sdToastMessageCss();
|
|
57
|
-
|
|
58
|
-
export { SdToastMessage as sd_toast_message };
|