@sellmate/design-system 1.0.17 → 1.0.19
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_21.cjs.entry.js +14 -13
- package/dist/cjs/sd-toast.cjs.entry.js +60 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/assets/checkFilled/index.js +1 -1
- package/dist/collection/components/assets/checkOutline/index.js +1 -1
- package/dist/collection/components/sd-button/sd-button.js +2 -2
- package/dist/collection/components/sd-field/sd-field.css +3 -0
- package/dist/collection/components/sd-icon/sd-icon.js +1 -1
- package/dist/collection/components/sd-number-input/sd-number-input.js +5 -4
- package/dist/collection/components/sd-popover/sd-popover.js +1 -1
- 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} +12 -12
- package/dist/collection/components/sd-tooltip/sd-tooltip.js +1 -1
- package/dist/components/{p-BhfNRQpq.js → p-B0h4b7LA.js} +1 -1
- package/dist/components/{p-CbR8h94f.js → p-B77f6eKX.js} +1 -1
- package/dist/components/{p-D8iZcruV.js → p-BQbcWEFr.js} +1 -1
- package/dist/components/{p-DGXSqFYF.js → p-BpucJmh6.js} +1 -1
- package/dist/components/{p-Ca2v-uuC.js → p-BtHLGsSf.js} +1 -1
- package/dist/components/{p-B1d3IESD.js → p-C-ZB0plq.js} +1 -1
- package/dist/components/{p-BumvzURf.js → p-C2-el8dy.js} +1 -1
- package/dist/components/{p-BJ1sZUZE.js → p-C7O3k1Yw.js} +1 -1
- package/dist/components/{p-BSPYsa_p.js → p-CB4FbXBv.js} +1 -1
- package/dist/components/{p-BUiP8HLx.js → p-CVjJkym8.js} +1 -1
- package/dist/components/{p--wNfOAvE.js → p-DC98okO0.js} +1 -1
- package/dist/components/{p-IlOHs7VA.js → p-DJlL3vSO.js} +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 +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-guide.js +1 -1
- package/dist/components/sd-icon.js +1 -1
- package/dist/components/sd-input.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-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-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-0b0c743d.entry.js +1 -0
- package/dist/design-system/p-ec4c214f.entry.js +1 -0
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sd-button_21.entry.js +14 -13
- package/dist/esm/sd-toast.entry.js +58 -0
- package/dist/types/components/assets/checkFilled/index.d.ts +1 -1
- package/dist/types/components/assets/checkOutline/index.d.ts +1 -1
- package/dist/types/components/assets/index.d.ts +2 -2
- 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 +24 -23
- package/hydrate/index.mjs +24 -23
- package/package.json +1 -1
- package/dist/cjs/sd-toast-message.cjs.entry.js +0 -60
- package/dist/components/sd-toast-message.js +0 -1
- package/dist/design-system/p-5b616cae.entry.js +0 -1
- package/dist/design-system/p-a98c256a.entry.js +0 -1
- package/dist/esm/sd-toast-message.entry.js +0 -58
package/hydrate/index.js
CHANGED
|
@@ -6131,7 +6131,7 @@ class SdDateRangePicker {
|
|
|
6131
6131
|
}; }
|
|
6132
6132
|
}
|
|
6133
6133
|
|
|
6134
|
-
const sdFieldCss = () => `sd-field{display:inline-flex;flex-flow:column nowrap;height:fit-content;width:100%}sd-field .sd-field *:focus,sd-field .sd-field *:focus-visible,sd-field .sd-field *:focus-within{outline:none !important}sd-field .sd-field:not(.sd-field--disabled):hover .sd-field__control{border:1px solid #0075ff !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field.sd-field--disabled{cursor:not-allowed}sd-field .sd-field.sd-field--disabled .sd-field__wrapper{cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__label-inside{border-color:#cccccc;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__control{background-color:#eeeeee;border-color:#cccccc;color:#888888;cursor:not-allowed !important}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label{display:flex;align-items:center;margin-right:12px}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__required-icon{margin-right:4px}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__text{font-size:12px;line-height:20px;color:#333333;white-space:nowrap}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__tooltip{margin-left:2px}sd-field .sd-field--has-label-inside .sd-field__wrapper .sd-field__label{margin-right:0;display:flex;align-items:center;justify-content:center;padding:3px 12px;border:1px solid #cccccc;border-right:none;border-radius:4px 0 0 4px;border-color:#aaaaaa;background-color:#f6f6f6}sd-field .sd-field__wrapper{width:100%;height:28px;display:flex;align-items:center;flex-flow:row nowrap;position:relative;color:#333333;cursor:pointer;-webkit-user-select:none;user-select:none}sd-field .sd-field__wrapper .sd-field__control{position:relative;width:100%;height:100%;display:flex;flex:1;border:1px solid #aaaaaa;border-radius:4px;background:white}sd-field .sd-field__wrapper .sd-field__control--label-inside{border-top-left-radius:0px;border-bottom-left-radius:0px}sd-field .sd-field--error:not(:hover) .sd-field__wrapper .sd-field__control{border:1px solid #fb4444 !important}sd-field .sd-field.sd-field--focus .sd-field__wrapper .sd-field__control,sd-field .sd-field.sd-field--hover .sd-field__wrapper .sd-field__control{border:1px solid #0075ff !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field .sd-field__error-message{color:#fb4444;font-size:12px;line-height:20px;margin-top:4px}`;
|
|
6134
|
+
const sdFieldCss = () => `sd-field{display:inline-flex;flex-flow:column nowrap;height:fit-content;width:100%}sd-field .sd-field *:focus,sd-field .sd-field *:focus-visible,sd-field .sd-field *:focus-within{outline:none !important}sd-field .sd-field:not(.sd-field--disabled):hover .sd-field__control{border:1px solid #0075ff !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field.sd-field--disabled{cursor:not-allowed}sd-field .sd-field.sd-field--disabled .sd-field__wrapper{cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__label-inside{border-color:#cccccc;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__control{background-color:#eeeeee;border-color:#cccccc;color:#888888;cursor:not-allowed !important}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label{display:flex;align-items:center;margin-right:12px}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__required-icon{margin-right:4px}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__text{font-size:12px;line-height:20px;color:#333333;white-space:nowrap}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__tooltip{margin-left:2px}sd-field .sd-field--has-label-inside .sd-field__wrapper .sd-field__label{margin-right:0;display:flex;align-items:center;justify-content:center;padding:3px 12px;border:1px solid #cccccc;border-right:none;border-radius:4px 0 0 4px;border-color:#aaaaaa;background-color:#f6f6f6}sd-field .sd-field__wrapper{width:100%;height:28px;display:flex;align-items:center;flex-flow:row nowrap;position:relative;color:#333333;cursor:pointer;-webkit-user-select:none;user-select:none}sd-field .sd-field__wrapper .sd-field__control{position:relative;width:100%;height:100%;display:flex;flex:1;border:1px solid #aaaaaa;border-radius:4px;background:white}sd-field .sd-field__wrapper .sd-field__control--label-inside{border-top-left-radius:0px;border-bottom-left-radius:0px}sd-field .sd-field--error:not(:hover) .sd-field__wrapper .sd-field__control{border:1px solid #fb4444 !important}sd-field .sd-field.sd-field--focus .sd-field__wrapper .sd-field__control,sd-field .sd-field.sd-field--hover .sd-field__wrapper .sd-field__control{border:1px solid #0075ff !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field.sd-field--pass .sd-field__wrapper .sd-field__control{border:1px solid #2bce6c !important}sd-field .sd-field .sd-field__error-message{color:#fb4444;font-size:12px;line-height:20px;margin-top:4px}`;
|
|
6135
6135
|
|
|
6136
6136
|
const FORM_PARENT_TAGS = [
|
|
6137
6137
|
'sd-select',
|
|
@@ -7515,7 +7515,7 @@ const CheckFilled20 = (props) => (hAsync("svg", { ...props, width: "20", height:
|
|
|
7515
7515
|
|
|
7516
7516
|
const CheckFilled24 = (props) => (hAsync("svg", { ...props, width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, hAsync("path", { d: "M12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1ZM18.1299 8.46973C17.837 8.17703 17.3622 8.1769 17.0693 8.46973L10.8125 14.7275L7.09961 11.0146C6.80684 10.7221 6.33191 10.7223 6.03906 11.0146C5.74625 11.3075 5.7464 11.7823 6.03906 12.0752L10.1045 16.1416C10.495 16.5321 11.129 16.5321 11.5195 16.1416L18.1299 9.53027C18.4228 9.23738 18.4228 8.76262 18.1299 8.46973Z", fill: "currentColor" })));
|
|
7517
7517
|
|
|
7518
|
-
const
|
|
7518
|
+
const checkFilled = {
|
|
7519
7519
|
8: CheckFilled8,
|
|
7520
7520
|
10: CheckFilled10,
|
|
7521
7521
|
12: CheckFilled12,
|
|
@@ -7524,9 +7524,9 @@ const CheckFilled = {
|
|
|
7524
7524
|
24: CheckFilled24,
|
|
7525
7525
|
};
|
|
7526
7526
|
|
|
7527
|
-
var CheckFilled
|
|
7527
|
+
var CheckFilled = /*#__PURE__*/Object.freeze({
|
|
7528
7528
|
__proto__: null,
|
|
7529
|
-
|
|
7529
|
+
checkFilled: checkFilled
|
|
7530
7530
|
});
|
|
7531
7531
|
|
|
7532
7532
|
const CheckOutline8 = (props) => (hAsync("svg", { ...props, width: "8", height: "8", viewBox: "0 0 8 8", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, hAsync("path", { d: "M4 0.0332031C6.19058 0.0333789 7.9668 1.80938 7.9668 4C7.96662 6.19047 6.19047 7.96662 4 7.9668C1.80939 7.96679 0.0333844 6.19057 0.0332031 4C0.0332031 1.80927 1.80927 0.0332059 4 0.0332031ZM4 0.632812C2.14064 0.632815 0.632812 2.14064 0.632812 4C0.632994 5.8592 2.14076 7.36621 4 7.36621C5.8591 7.36603 7.36603 5.8591 7.36621 4C7.36621 2.14075 5.85921 0.632988 4 0.632812ZM5.6543 2.78809C5.77145 2.67093 5.96097 2.67093 6.07812 2.78809C6.19518 2.90525 6.19525 3.09479 6.07812 3.21191L3.875 5.41504C3.72544 5.5646 3.48274 5.56529 3.33301 5.41602L1.97754 4.06055C1.86045 3.94345 1.86057 3.75389 1.97754 3.63672C2.0947 3.51956 2.28421 3.51956 2.40137 3.63672L3.60352 4.83887L5.6543 2.78809Z", fill: "currentColor" })));
|
|
@@ -7541,7 +7541,7 @@ const CheckOutline20 = (props) => (hAsync("svg", { ...props, width: "20", height
|
|
|
7541
7541
|
|
|
7542
7542
|
const CheckOutline24 = (props) => (hAsync("svg", { ...props, width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, hAsync("path", { d: "M12 0.25C18.4893 0.25 23.75 5.51065 23.75 12C23.75 18.4893 18.4893 23.75 12 23.75C5.51065 23.75 0.25 18.4893 0.25 12C0.25 5.51065 5.51065 0.25 12 0.25ZM12 1.75C6.33908 1.75 1.75 6.33908 1.75 12C1.75 17.6609 6.33908 22.25 12 22.25C17.6609 22.25 22.25 17.6609 22.25 12C22.25 6.33908 17.6609 1.75 12 1.75ZM17.0693 8.46973C17.3622 8.1769 17.837 8.17703 18.1299 8.46973C18.4228 8.76262 18.4228 9.23738 18.1299 9.53027L11.5195 16.1416C11.129 16.5321 10.495 16.5321 10.1045 16.1416L6.03906 12.0752C5.7464 11.7823 5.74625 11.3075 6.03906 11.0146C6.33191 10.7223 6.80684 10.7221 7.09961 11.0146L10.8125 14.7275L17.0693 8.46973Z", fill: "currentColor" })));
|
|
7543
7543
|
|
|
7544
|
-
const
|
|
7544
|
+
const checkOutline = {
|
|
7545
7545
|
8: CheckOutline8,
|
|
7546
7546
|
10: CheckOutline10,
|
|
7547
7547
|
12: CheckOutline12,
|
|
@@ -7550,9 +7550,9 @@ const CheckOutline = {
|
|
|
7550
7550
|
24: CheckOutline24,
|
|
7551
7551
|
};
|
|
7552
7552
|
|
|
7553
|
-
var CheckOutline
|
|
7553
|
+
var CheckOutline = /*#__PURE__*/Object.freeze({
|
|
7554
7554
|
__proto__: null,
|
|
7555
|
-
|
|
7555
|
+
checkOutline: checkOutline
|
|
7556
7556
|
});
|
|
7557
7557
|
|
|
7558
7558
|
const ClockFilled8 = (props) => (hAsync("svg", { ...props, width: "8", height: "8", viewBox: "0 0 8 8", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, hAsync("path", { d: "M4.00034 0.333313C6.02523 0.333489 7.66635 1.97537 7.66635 4.00031C7.66618 6.02509 6.02512 7.66614 4.00034 7.66632C1.9754 7.66632 0.333519 6.0252 0.333344 4.00031C0.333344 1.97526 1.97529 0.333313 4.00034 0.333313ZM4.00034 1.33331C3.81636 1.33331 3.66751 1.48239 3.66733 1.66632V3.99933C3.66733 4.18342 3.81624 4.33331 4.00034 4.33331H6.33334C6.51728 4.33313 6.66733 4.18331 6.66733 3.99933C6.66697 3.81565 6.51706 3.6665 6.33334 3.66632H4.33334V1.66632C4.33316 1.4825 4.18416 1.33349 4.00034 1.33331Z", fill: "currentColor" })));
|
|
@@ -8707,8 +8707,8 @@ const Icons = {
|
|
|
8707
8707
|
...CaretRight,
|
|
8708
8708
|
...CaretUp,
|
|
8709
8709
|
...Check,
|
|
8710
|
-
...CheckFilled
|
|
8711
|
-
...CheckOutline
|
|
8710
|
+
...CheckFilled,
|
|
8711
|
+
...CheckOutline,
|
|
8712
8712
|
...ClockFilled,
|
|
8713
8713
|
...ClockOutline,
|
|
8714
8714
|
...Close,
|
|
@@ -9223,6 +9223,7 @@ class SdNumberInput {
|
|
|
9223
9223
|
}
|
|
9224
9224
|
};
|
|
9225
9225
|
handleFocus = (event) => {
|
|
9226
|
+
this.focused = true;
|
|
9226
9227
|
this.focus?.emit(event);
|
|
9227
9228
|
};
|
|
9228
9229
|
handleBlur = async (event) => {
|
|
@@ -9293,17 +9294,17 @@ class SdNumberInput {
|
|
|
9293
9294
|
const inputStyles = {
|
|
9294
9295
|
textAlign: this.useButton ? 'center' : 'right',
|
|
9295
9296
|
};
|
|
9296
|
-
return (hAsync("sd-field", { key: '
|
|
9297
|
+
return (hAsync("sd-field", { key: '7aa387eeb5850052e121931b3f8183373b4319aa', name: this.name, label: this.label, insideLabel: this.insideLabel, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, ref: el => (this.formField = el), style: inputWidth }, hAsync("label", { key: 'f5bbb6c76e32de4aefe59c6958a38e1a560f05c9', class: {
|
|
9297
9298
|
'sd-number-input': true,
|
|
9298
9299
|
[this.getInputStatus()]: true,
|
|
9299
9300
|
'sd-number-input--with-buttons': this.useButton,
|
|
9300
|
-
}, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: this.inputStyle }, hAsync("input", { key: '
|
|
9301
|
+
}, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: this.inputStyle }, hAsync("input", { key: 'fc26b7cf0d121025c9a748b158640e03188d72d3', name: this.name, ref: el => (this.nativeEl = el), class: `sd-number-input__input ${this.inputClass}`, type: "text", inputMode: "numeric", value: this.displayValue, placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, autofocus: this.autoFocus, onInput: this.handleInput, onKeyDown: this.handleKeyDown, style: inputStyles, onFocus: this.handleFocus, onBlur: this.handleBlur }), this.useButton && (hAsync("div", { key: 'c9325ea7dd19c02fead55a0d63ac0b7b16143d08', class: "sd-number-input__buttons" }, hAsync("button", { key: 'ec96811ce7046a3fe9506ca0635db97413d8283a', type: "button", class: {
|
|
9301
9302
|
'sd-number-input__button': true,
|
|
9302
9303
|
'sd-number-input__button--decrement': true,
|
|
9303
|
-
}, disabled: this.isDecrementDisabled(), onClick: this.handleDecrement, tabindex: -1 }, hAsync("sd-icon", { key: '
|
|
9304
|
+
}, disabled: this.isDecrementDisabled(), onClick: this.handleDecrement, tabindex: -1 }, hAsync("sd-icon", { key: '70311a7723356ecc88125042d366bf567b0b5a2a', name: "minus", size: 12, color: this.isDecrementDisabled() ? 'grey_45' : 'brilliantblue_70' })), hAsync("button", { key: 'b7086218dc98fec4287e4becb0d834634fd52055', type: "button", class: {
|
|
9304
9305
|
'sd-number-input__button': true,
|
|
9305
9306
|
'sd-number-input__button--increment': true,
|
|
9306
|
-
}, disabled: this.isIncrementDisabled(), onClick: this.handleIncrement, tabindex: -1 }, hAsync("sd-icon", { key: '
|
|
9307
|
+
}, disabled: this.isIncrementDisabled(), onClick: this.handleIncrement, tabindex: -1 }, hAsync("sd-icon", { key: 'b945a1561978dc4bba1868fa57652e94a6bcfc34', name: "add", size: 12, color: this.isIncrementDisabled() ? 'grey_45' : 'brilliantblue_70' })))))));
|
|
9307
9308
|
}
|
|
9308
9309
|
static get watchers() { return {
|
|
9309
9310
|
"value": [{
|
|
@@ -12442,9 +12443,9 @@ class SdTextarea {
|
|
|
12442
12443
|
}; }
|
|
12443
12444
|
}
|
|
12444
12445
|
|
|
12445
|
-
const
|
|
12446
|
+
const sdToastCss = () => `sd-toast{display:block;width:fit-content;height:fit-content}sd-toast .sd-toast{display:flex;width:fit-content;align-items:center;gap:16px;padding:12px 24px;border-radius:4px;background-color:var(--sd-toast-bg);color:var(--sd-toast-text);transition:opacity 0.2s ease, visibility 0.2s ease;box-shadow:2px 2px 8px 2px rgba(0, 0, 0, 0.2)}sd-toast .sd-toast--hidden{opacity:0;visibility:hidden;pointer-events:none}sd-toast .sd-toast__icon{display:flex;align-items:center;flex-shrink:0}sd-toast .sd-toast__content{display:flex;flex:1}sd-toast .sd-toast__message{font-size:14px;line-height:20px;font-weight:400}sd-toast .sd-toast__link{font-size:14px;line-height:20px;color:var(--sd-toast-text);text-decoration:underline;cursor:pointer;transition:opacity 0.2s ease;margin-left:4px}sd-toast .sd-toast__link:hover{opacity:0.8}sd-toast .sd-toast__button{flex-shrink:0}sd-toast .sd-toast__button button{color:var(--button-text-color, inherit) !important}sd-toast .sd-toast__close{display:flex;align-items:center;justify-content:center;padding:4px;background-color:transparent;border:none;cursor:pointer;transition:opacity 0.2s ease;flex-shrink:0}sd-toast .sd-toast__close:hover{opacity:0.7}sd-toast .sd-toast__close:active{opacity:0.5}`;
|
|
12446
12447
|
|
|
12447
|
-
class
|
|
12448
|
+
class SdToast {
|
|
12448
12449
|
constructor(hostRef) {
|
|
12449
12450
|
registerInstance(this, hostRef);
|
|
12450
12451
|
this.close = createEvent(this, "sdClose");
|
|
@@ -12476,27 +12477,27 @@ class SdToastMessage {
|
|
|
12476
12477
|
this.buttonClick.emit();
|
|
12477
12478
|
};
|
|
12478
12479
|
getContainerClasses() {
|
|
12479
|
-
const classes = ['sd-toast
|
|
12480
|
+
const classes = ['sd-toast', `sd-toast--${this.type}`];
|
|
12480
12481
|
if (!this.isVisible) {
|
|
12481
|
-
classes.push('sd-toast
|
|
12482
|
+
classes.push('sd-toast--hidden');
|
|
12482
12483
|
}
|
|
12483
12484
|
return classes.join(' ');
|
|
12484
12485
|
}
|
|
12485
12486
|
render() {
|
|
12486
|
-
const colorTokens =
|
|
12487
|
+
const colorTokens = SdToast.COLOR_OF_TYPE[this.type];
|
|
12487
12488
|
const colors = {
|
|
12488
12489
|
background: resolveColor(colorTokens.background),
|
|
12489
12490
|
text: resolveColor(colorTokens.text),
|
|
12490
12491
|
};
|
|
12491
|
-
return (hAsync("div", { key: '
|
|
12492
|
+
return (hAsync("div", { key: '8118f67a55a3080ea91ffdfbd929bbe3464ab044', style: {
|
|
12492
12493
|
'--sd-toast-bg': colors.background,
|
|
12493
12494
|
'--sd-toast-text': colors.text,
|
|
12494
|
-
} }, hAsync("div", { key: '
|
|
12495
|
+
} }, hAsync("div", { key: 'f05c16b0c8ef6de2d62161f80591cb3a82c24434', class: this.getContainerClasses(), role: "status", "aria-live": "polite", "aria-atomic": "true" }, this.icon && (hAsync("div", { key: 'b16fee2031c4093c263229d2ef07ad8f6e69778b', class: "sd-toast__icon" }, hAsync("sd-icon", { key: 'cd8b4c4d9cbc329fdfc99236ca56a49658c0ca8c', name: this.icon, size: 16, color: colors.text }))), hAsync("div", { key: '888748872d886745ace2ef8491d7098528df8a46', class: "sd-toast__content" }, hAsync("span", { key: '31b285a6b6a03b833577b4a9fb860fd76e066cb6', class: "sd-toast__message" }, this.message)), this.link && (hAsync("a", { key: '61d1aacf70e7062abbedd2364474e7da990f485f', href: this.link, class: "sd-toast__link", target: "_blank", rel: "noopener noreferrer" }, this.linkLabel || this.link)), this.buttonLabel && (hAsync("sd-button", { key: '94aa75ef25ee18f0577d5539337152d654dab5c1', 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 && (hAsync("button", { key: 'db0b83f7030feb5459597156c2d25f3437b91904', type: "button", class: "sd-toast__close", onClick: this.handleClose, "aria-label": "Close", title: "Close" }, hAsync("sd-icon", { key: 'a3aab6c19c32043182f2d05d2583271520458493', name: "close", size: 12, color: colors.text }))))));
|
|
12495
12496
|
}
|
|
12496
|
-
static get style() { return
|
|
12497
|
+
static get style() { return sdToastCss(); }
|
|
12497
12498
|
static get cmpMeta() { return {
|
|
12498
12499
|
"$flags$": 512,
|
|
12499
|
-
"$tagName$": "sd-toast
|
|
12500
|
+
"$tagName$": "sd-toast",
|
|
12500
12501
|
"$members$": {
|
|
12501
12502
|
"icon": [1],
|
|
12502
12503
|
"message": [1],
|
|
@@ -12737,7 +12738,7 @@ registerComponents([
|
|
|
12737
12738
|
SdTabs,
|
|
12738
12739
|
SdTag,
|
|
12739
12740
|
SdTextarea,
|
|
12740
|
-
|
|
12741
|
+
SdToast,
|
|
12741
12742
|
SdToggle,
|
|
12742
12743
|
SdToggleButton,
|
|
12743
12744
|
SdTooltip,
|
package/hydrate/index.mjs
CHANGED
|
@@ -6129,7 +6129,7 @@ class SdDateRangePicker {
|
|
|
6129
6129
|
}; }
|
|
6130
6130
|
}
|
|
6131
6131
|
|
|
6132
|
-
const sdFieldCss = () => `sd-field{display:inline-flex;flex-flow:column nowrap;height:fit-content;width:100%}sd-field .sd-field *:focus,sd-field .sd-field *:focus-visible,sd-field .sd-field *:focus-within{outline:none !important}sd-field .sd-field:not(.sd-field--disabled):hover .sd-field__control{border:1px solid #0075ff !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field.sd-field--disabled{cursor:not-allowed}sd-field .sd-field.sd-field--disabled .sd-field__wrapper{cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__label-inside{border-color:#cccccc;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__control{background-color:#eeeeee;border-color:#cccccc;color:#888888;cursor:not-allowed !important}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label{display:flex;align-items:center;margin-right:12px}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__required-icon{margin-right:4px}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__text{font-size:12px;line-height:20px;color:#333333;white-space:nowrap}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__tooltip{margin-left:2px}sd-field .sd-field--has-label-inside .sd-field__wrapper .sd-field__label{margin-right:0;display:flex;align-items:center;justify-content:center;padding:3px 12px;border:1px solid #cccccc;border-right:none;border-radius:4px 0 0 4px;border-color:#aaaaaa;background-color:#f6f6f6}sd-field .sd-field__wrapper{width:100%;height:28px;display:flex;align-items:center;flex-flow:row nowrap;position:relative;color:#333333;cursor:pointer;-webkit-user-select:none;user-select:none}sd-field .sd-field__wrapper .sd-field__control{position:relative;width:100%;height:100%;display:flex;flex:1;border:1px solid #aaaaaa;border-radius:4px;background:white}sd-field .sd-field__wrapper .sd-field__control--label-inside{border-top-left-radius:0px;border-bottom-left-radius:0px}sd-field .sd-field--error:not(:hover) .sd-field__wrapper .sd-field__control{border:1px solid #fb4444 !important}sd-field .sd-field.sd-field--focus .sd-field__wrapper .sd-field__control,sd-field .sd-field.sd-field--hover .sd-field__wrapper .sd-field__control{border:1px solid #0075ff !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field .sd-field__error-message{color:#fb4444;font-size:12px;line-height:20px;margin-top:4px}`;
|
|
6132
|
+
const sdFieldCss = () => `sd-field{display:inline-flex;flex-flow:column nowrap;height:fit-content;width:100%}sd-field .sd-field *:focus,sd-field .sd-field *:focus-visible,sd-field .sd-field *:focus-within{outline:none !important}sd-field .sd-field:not(.sd-field--disabled):hover .sd-field__control{border:1px solid #0075ff !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field.sd-field--disabled{cursor:not-allowed}sd-field .sd-field.sd-field--disabled .sd-field__wrapper{cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__label-inside{border-color:#cccccc;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__control{background-color:#eeeeee;border-color:#cccccc;color:#888888;cursor:not-allowed !important}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label{display:flex;align-items:center;margin-right:12px}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__required-icon{margin-right:4px}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__text{font-size:12px;line-height:20px;color:#333333;white-space:nowrap}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__tooltip{margin-left:2px}sd-field .sd-field--has-label-inside .sd-field__wrapper .sd-field__label{margin-right:0;display:flex;align-items:center;justify-content:center;padding:3px 12px;border:1px solid #cccccc;border-right:none;border-radius:4px 0 0 4px;border-color:#aaaaaa;background-color:#f6f6f6}sd-field .sd-field__wrapper{width:100%;height:28px;display:flex;align-items:center;flex-flow:row nowrap;position:relative;color:#333333;cursor:pointer;-webkit-user-select:none;user-select:none}sd-field .sd-field__wrapper .sd-field__control{position:relative;width:100%;height:100%;display:flex;flex:1;border:1px solid #aaaaaa;border-radius:4px;background:white}sd-field .sd-field__wrapper .sd-field__control--label-inside{border-top-left-radius:0px;border-bottom-left-radius:0px}sd-field .sd-field--error:not(:hover) .sd-field__wrapper .sd-field__control{border:1px solid #fb4444 !important}sd-field .sd-field.sd-field--focus .sd-field__wrapper .sd-field__control,sd-field .sd-field.sd-field--hover .sd-field__wrapper .sd-field__control{border:1px solid #0075ff !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field.sd-field--pass .sd-field__wrapper .sd-field__control{border:1px solid #2bce6c !important}sd-field .sd-field .sd-field__error-message{color:#fb4444;font-size:12px;line-height:20px;margin-top:4px}`;
|
|
6133
6133
|
|
|
6134
6134
|
const FORM_PARENT_TAGS = [
|
|
6135
6135
|
'sd-select',
|
|
@@ -7513,7 +7513,7 @@ const CheckFilled20 = (props) => (hAsync("svg", { ...props, width: "20", height:
|
|
|
7513
7513
|
|
|
7514
7514
|
const CheckFilled24 = (props) => (hAsync("svg", { ...props, width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, hAsync("path", { d: "M12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1ZM18.1299 8.46973C17.837 8.17703 17.3622 8.1769 17.0693 8.46973L10.8125 14.7275L7.09961 11.0146C6.80684 10.7221 6.33191 10.7223 6.03906 11.0146C5.74625 11.3075 5.7464 11.7823 6.03906 12.0752L10.1045 16.1416C10.495 16.5321 11.129 16.5321 11.5195 16.1416L18.1299 9.53027C18.4228 9.23738 18.4228 8.76262 18.1299 8.46973Z", fill: "currentColor" })));
|
|
7515
7515
|
|
|
7516
|
-
const
|
|
7516
|
+
const checkFilled = {
|
|
7517
7517
|
8: CheckFilled8,
|
|
7518
7518
|
10: CheckFilled10,
|
|
7519
7519
|
12: CheckFilled12,
|
|
@@ -7522,9 +7522,9 @@ const CheckFilled = {
|
|
|
7522
7522
|
24: CheckFilled24,
|
|
7523
7523
|
};
|
|
7524
7524
|
|
|
7525
|
-
var CheckFilled
|
|
7525
|
+
var CheckFilled = /*#__PURE__*/Object.freeze({
|
|
7526
7526
|
__proto__: null,
|
|
7527
|
-
|
|
7527
|
+
checkFilled: checkFilled
|
|
7528
7528
|
});
|
|
7529
7529
|
|
|
7530
7530
|
const CheckOutline8 = (props) => (hAsync("svg", { ...props, width: "8", height: "8", viewBox: "0 0 8 8", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, hAsync("path", { d: "M4 0.0332031C6.19058 0.0333789 7.9668 1.80938 7.9668 4C7.96662 6.19047 6.19047 7.96662 4 7.9668C1.80939 7.96679 0.0333844 6.19057 0.0332031 4C0.0332031 1.80927 1.80927 0.0332059 4 0.0332031ZM4 0.632812C2.14064 0.632815 0.632812 2.14064 0.632812 4C0.632994 5.8592 2.14076 7.36621 4 7.36621C5.8591 7.36603 7.36603 5.8591 7.36621 4C7.36621 2.14075 5.85921 0.632988 4 0.632812ZM5.6543 2.78809C5.77145 2.67093 5.96097 2.67093 6.07812 2.78809C6.19518 2.90525 6.19525 3.09479 6.07812 3.21191L3.875 5.41504C3.72544 5.5646 3.48274 5.56529 3.33301 5.41602L1.97754 4.06055C1.86045 3.94345 1.86057 3.75389 1.97754 3.63672C2.0947 3.51956 2.28421 3.51956 2.40137 3.63672L3.60352 4.83887L5.6543 2.78809Z", fill: "currentColor" })));
|
|
@@ -7539,7 +7539,7 @@ const CheckOutline20 = (props) => (hAsync("svg", { ...props, width: "20", height
|
|
|
7539
7539
|
|
|
7540
7540
|
const CheckOutline24 = (props) => (hAsync("svg", { ...props, width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, hAsync("path", { d: "M12 0.25C18.4893 0.25 23.75 5.51065 23.75 12C23.75 18.4893 18.4893 23.75 12 23.75C5.51065 23.75 0.25 18.4893 0.25 12C0.25 5.51065 5.51065 0.25 12 0.25ZM12 1.75C6.33908 1.75 1.75 6.33908 1.75 12C1.75 17.6609 6.33908 22.25 12 22.25C17.6609 22.25 22.25 17.6609 22.25 12C22.25 6.33908 17.6609 1.75 12 1.75ZM17.0693 8.46973C17.3622 8.1769 17.837 8.17703 18.1299 8.46973C18.4228 8.76262 18.4228 9.23738 18.1299 9.53027L11.5195 16.1416C11.129 16.5321 10.495 16.5321 10.1045 16.1416L6.03906 12.0752C5.7464 11.7823 5.74625 11.3075 6.03906 11.0146C6.33191 10.7223 6.80684 10.7221 7.09961 11.0146L10.8125 14.7275L17.0693 8.46973Z", fill: "currentColor" })));
|
|
7541
7541
|
|
|
7542
|
-
const
|
|
7542
|
+
const checkOutline = {
|
|
7543
7543
|
8: CheckOutline8,
|
|
7544
7544
|
10: CheckOutline10,
|
|
7545
7545
|
12: CheckOutline12,
|
|
@@ -7548,9 +7548,9 @@ const CheckOutline = {
|
|
|
7548
7548
|
24: CheckOutline24,
|
|
7549
7549
|
};
|
|
7550
7550
|
|
|
7551
|
-
var CheckOutline
|
|
7551
|
+
var CheckOutline = /*#__PURE__*/Object.freeze({
|
|
7552
7552
|
__proto__: null,
|
|
7553
|
-
|
|
7553
|
+
checkOutline: checkOutline
|
|
7554
7554
|
});
|
|
7555
7555
|
|
|
7556
7556
|
const ClockFilled8 = (props) => (hAsync("svg", { ...props, width: "8", height: "8", viewBox: "0 0 8 8", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, hAsync("path", { d: "M4.00034 0.333313C6.02523 0.333489 7.66635 1.97537 7.66635 4.00031C7.66618 6.02509 6.02512 7.66614 4.00034 7.66632C1.9754 7.66632 0.333519 6.0252 0.333344 4.00031C0.333344 1.97526 1.97529 0.333313 4.00034 0.333313ZM4.00034 1.33331C3.81636 1.33331 3.66751 1.48239 3.66733 1.66632V3.99933C3.66733 4.18342 3.81624 4.33331 4.00034 4.33331H6.33334C6.51728 4.33313 6.66733 4.18331 6.66733 3.99933C6.66697 3.81565 6.51706 3.6665 6.33334 3.66632H4.33334V1.66632C4.33316 1.4825 4.18416 1.33349 4.00034 1.33331Z", fill: "currentColor" })));
|
|
@@ -8705,8 +8705,8 @@ const Icons = {
|
|
|
8705
8705
|
...CaretRight,
|
|
8706
8706
|
...CaretUp,
|
|
8707
8707
|
...Check,
|
|
8708
|
-
...CheckFilled
|
|
8709
|
-
...CheckOutline
|
|
8708
|
+
...CheckFilled,
|
|
8709
|
+
...CheckOutline,
|
|
8710
8710
|
...ClockFilled,
|
|
8711
8711
|
...ClockOutline,
|
|
8712
8712
|
...Close,
|
|
@@ -9221,6 +9221,7 @@ class SdNumberInput {
|
|
|
9221
9221
|
}
|
|
9222
9222
|
};
|
|
9223
9223
|
handleFocus = (event) => {
|
|
9224
|
+
this.focused = true;
|
|
9224
9225
|
this.focus?.emit(event);
|
|
9225
9226
|
};
|
|
9226
9227
|
handleBlur = async (event) => {
|
|
@@ -9291,17 +9292,17 @@ class SdNumberInput {
|
|
|
9291
9292
|
const inputStyles = {
|
|
9292
9293
|
textAlign: this.useButton ? 'center' : 'right',
|
|
9293
9294
|
};
|
|
9294
|
-
return (hAsync("sd-field", { key: '
|
|
9295
|
+
return (hAsync("sd-field", { key: '7aa387eeb5850052e121931b3f8183373b4319aa', name: this.name, label: this.label, insideLabel: this.insideLabel, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, ref: el => (this.formField = el), style: inputWidth }, hAsync("label", { key: 'f5bbb6c76e32de4aefe59c6958a38e1a560f05c9', class: {
|
|
9295
9296
|
'sd-number-input': true,
|
|
9296
9297
|
[this.getInputStatus()]: true,
|
|
9297
9298
|
'sd-number-input--with-buttons': this.useButton,
|
|
9298
|
-
}, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: this.inputStyle }, hAsync("input", { key: '
|
|
9299
|
+
}, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: this.inputStyle }, hAsync("input", { key: 'fc26b7cf0d121025c9a748b158640e03188d72d3', name: this.name, ref: el => (this.nativeEl = el), class: `sd-number-input__input ${this.inputClass}`, type: "text", inputMode: "numeric", value: this.displayValue, placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, autofocus: this.autoFocus, onInput: this.handleInput, onKeyDown: this.handleKeyDown, style: inputStyles, onFocus: this.handleFocus, onBlur: this.handleBlur }), this.useButton && (hAsync("div", { key: 'c9325ea7dd19c02fead55a0d63ac0b7b16143d08', class: "sd-number-input__buttons" }, hAsync("button", { key: 'ec96811ce7046a3fe9506ca0635db97413d8283a', type: "button", class: {
|
|
9299
9300
|
'sd-number-input__button': true,
|
|
9300
9301
|
'sd-number-input__button--decrement': true,
|
|
9301
|
-
}, disabled: this.isDecrementDisabled(), onClick: this.handleDecrement, tabindex: -1 }, hAsync("sd-icon", { key: '
|
|
9302
|
+
}, disabled: this.isDecrementDisabled(), onClick: this.handleDecrement, tabindex: -1 }, hAsync("sd-icon", { key: '70311a7723356ecc88125042d366bf567b0b5a2a', name: "minus", size: 12, color: this.isDecrementDisabled() ? 'grey_45' : 'brilliantblue_70' })), hAsync("button", { key: 'b7086218dc98fec4287e4becb0d834634fd52055', type: "button", class: {
|
|
9302
9303
|
'sd-number-input__button': true,
|
|
9303
9304
|
'sd-number-input__button--increment': true,
|
|
9304
|
-
}, disabled: this.isIncrementDisabled(), onClick: this.handleIncrement, tabindex: -1 }, hAsync("sd-icon", { key: '
|
|
9305
|
+
}, disabled: this.isIncrementDisabled(), onClick: this.handleIncrement, tabindex: -1 }, hAsync("sd-icon", { key: 'b945a1561978dc4bba1868fa57652e94a6bcfc34', name: "add", size: 12, color: this.isIncrementDisabled() ? 'grey_45' : 'brilliantblue_70' })))))));
|
|
9305
9306
|
}
|
|
9306
9307
|
static get watchers() { return {
|
|
9307
9308
|
"value": [{
|
|
@@ -12440,9 +12441,9 @@ class SdTextarea {
|
|
|
12440
12441
|
}; }
|
|
12441
12442
|
}
|
|
12442
12443
|
|
|
12443
|
-
const
|
|
12444
|
+
const sdToastCss = () => `sd-toast{display:block;width:fit-content;height:fit-content}sd-toast .sd-toast{display:flex;width:fit-content;align-items:center;gap:16px;padding:12px 24px;border-radius:4px;background-color:var(--sd-toast-bg);color:var(--sd-toast-text);transition:opacity 0.2s ease, visibility 0.2s ease;box-shadow:2px 2px 8px 2px rgba(0, 0, 0, 0.2)}sd-toast .sd-toast--hidden{opacity:0;visibility:hidden;pointer-events:none}sd-toast .sd-toast__icon{display:flex;align-items:center;flex-shrink:0}sd-toast .sd-toast__content{display:flex;flex:1}sd-toast .sd-toast__message{font-size:14px;line-height:20px;font-weight:400}sd-toast .sd-toast__link{font-size:14px;line-height:20px;color:var(--sd-toast-text);text-decoration:underline;cursor:pointer;transition:opacity 0.2s ease;margin-left:4px}sd-toast .sd-toast__link:hover{opacity:0.8}sd-toast .sd-toast__button{flex-shrink:0}sd-toast .sd-toast__button button{color:var(--button-text-color, inherit) !important}sd-toast .sd-toast__close{display:flex;align-items:center;justify-content:center;padding:4px;background-color:transparent;border:none;cursor:pointer;transition:opacity 0.2s ease;flex-shrink:0}sd-toast .sd-toast__close:hover{opacity:0.7}sd-toast .sd-toast__close:active{opacity:0.5}`;
|
|
12444
12445
|
|
|
12445
|
-
class
|
|
12446
|
+
class SdToast {
|
|
12446
12447
|
constructor(hostRef) {
|
|
12447
12448
|
registerInstance(this, hostRef);
|
|
12448
12449
|
this.close = createEvent(this, "sdClose");
|
|
@@ -12474,27 +12475,27 @@ class SdToastMessage {
|
|
|
12474
12475
|
this.buttonClick.emit();
|
|
12475
12476
|
};
|
|
12476
12477
|
getContainerClasses() {
|
|
12477
|
-
const classes = ['sd-toast
|
|
12478
|
+
const classes = ['sd-toast', `sd-toast--${this.type}`];
|
|
12478
12479
|
if (!this.isVisible) {
|
|
12479
|
-
classes.push('sd-toast
|
|
12480
|
+
classes.push('sd-toast--hidden');
|
|
12480
12481
|
}
|
|
12481
12482
|
return classes.join(' ');
|
|
12482
12483
|
}
|
|
12483
12484
|
render() {
|
|
12484
|
-
const colorTokens =
|
|
12485
|
+
const colorTokens = SdToast.COLOR_OF_TYPE[this.type];
|
|
12485
12486
|
const colors = {
|
|
12486
12487
|
background: resolveColor(colorTokens.background),
|
|
12487
12488
|
text: resolveColor(colorTokens.text),
|
|
12488
12489
|
};
|
|
12489
|
-
return (hAsync("div", { key: '
|
|
12490
|
+
return (hAsync("div", { key: '8118f67a55a3080ea91ffdfbd929bbe3464ab044', style: {
|
|
12490
12491
|
'--sd-toast-bg': colors.background,
|
|
12491
12492
|
'--sd-toast-text': colors.text,
|
|
12492
|
-
} }, hAsync("div", { key: '
|
|
12493
|
+
} }, hAsync("div", { key: 'f05c16b0c8ef6de2d62161f80591cb3a82c24434', class: this.getContainerClasses(), role: "status", "aria-live": "polite", "aria-atomic": "true" }, this.icon && (hAsync("div", { key: 'b16fee2031c4093c263229d2ef07ad8f6e69778b', class: "sd-toast__icon" }, hAsync("sd-icon", { key: 'cd8b4c4d9cbc329fdfc99236ca56a49658c0ca8c', name: this.icon, size: 16, color: colors.text }))), hAsync("div", { key: '888748872d886745ace2ef8491d7098528df8a46', class: "sd-toast__content" }, hAsync("span", { key: '31b285a6b6a03b833577b4a9fb860fd76e066cb6', class: "sd-toast__message" }, this.message)), this.link && (hAsync("a", { key: '61d1aacf70e7062abbedd2364474e7da990f485f', href: this.link, class: "sd-toast__link", target: "_blank", rel: "noopener noreferrer" }, this.linkLabel || this.link)), this.buttonLabel && (hAsync("sd-button", { key: '94aa75ef25ee18f0577d5539337152d654dab5c1', 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 && (hAsync("button", { key: 'db0b83f7030feb5459597156c2d25f3437b91904', type: "button", class: "sd-toast__close", onClick: this.handleClose, "aria-label": "Close", title: "Close" }, hAsync("sd-icon", { key: 'a3aab6c19c32043182f2d05d2583271520458493', name: "close", size: 12, color: colors.text }))))));
|
|
12493
12494
|
}
|
|
12494
|
-
static get style() { return
|
|
12495
|
+
static get style() { return sdToastCss(); }
|
|
12495
12496
|
static get cmpMeta() { return {
|
|
12496
12497
|
"$flags$": 512,
|
|
12497
|
-
"$tagName$": "sd-toast
|
|
12498
|
+
"$tagName$": "sd-toast",
|
|
12498
12499
|
"$members$": {
|
|
12499
12500
|
"icon": [1],
|
|
12500
12501
|
"message": [1],
|
|
@@ -12735,7 +12736,7 @@ registerComponents([
|
|
|
12735
12736
|
SdTabs,
|
|
12736
12737
|
SdTag,
|
|
12737
12738
|
SdTextarea,
|
|
12738
|
-
|
|
12739
|
+
SdToast,
|
|
12739
12740
|
SdToggle,
|
|
12740
12741
|
SdToggleButton,
|
|
12741
12742
|
SdTooltip,
|
package/package.json
CHANGED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index--TtofS7_.js');
|
|
4
|
-
var resolveColor = require('./resolveColor-B7Ku3IGq.js');
|
|
5
|
-
|
|
6
|
-
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}`;
|
|
7
|
-
|
|
8
|
-
const SdToastMessage = class {
|
|
9
|
-
constructor(hostRef) {
|
|
10
|
-
index.registerInstance(this, hostRef);
|
|
11
|
-
this.close = index.createEvent(this, "sdClose");
|
|
12
|
-
this.buttonClick = index.createEvent(this, "sdButtonClick");
|
|
13
|
-
}
|
|
14
|
-
icon;
|
|
15
|
-
message;
|
|
16
|
-
link;
|
|
17
|
-
linkLabel;
|
|
18
|
-
buttonLabel;
|
|
19
|
-
useClose = false;
|
|
20
|
-
type = 'basicDark';
|
|
21
|
-
close;
|
|
22
|
-
buttonClick;
|
|
23
|
-
isVisible = true;
|
|
24
|
-
static COLOR_OF_TYPE = {
|
|
25
|
-
basicLight: { background: 'white', text: 'grey_95' },
|
|
26
|
-
basicDark: { background: 'steelblue_90', text: 'white' },
|
|
27
|
-
error: { background: 'red_70', text: 'white' },
|
|
28
|
-
caution: { background: 'yellow_40', text: 'grey_90' },
|
|
29
|
-
complete: { background: 'green_75', text: 'white' },
|
|
30
|
-
progress: { background: 'brilliantblue_80', text: 'white' },
|
|
31
|
-
};
|
|
32
|
-
handleClose = () => {
|
|
33
|
-
this.isVisible = false;
|
|
34
|
-
this.close.emit();
|
|
35
|
-
};
|
|
36
|
-
handleButtonClick = () => {
|
|
37
|
-
this.buttonClick.emit();
|
|
38
|
-
};
|
|
39
|
-
getContainerClasses() {
|
|
40
|
-
const classes = ['sd-toast-message', `sd-toast-message--${this.type}`];
|
|
41
|
-
if (!this.isVisible) {
|
|
42
|
-
classes.push('sd-toast-message--hidden');
|
|
43
|
-
}
|
|
44
|
-
return classes.join(' ');
|
|
45
|
-
}
|
|
46
|
-
render() {
|
|
47
|
-
const colorTokens = SdToastMessage.COLOR_OF_TYPE[this.type];
|
|
48
|
-
const colors = {
|
|
49
|
-
background: resolveColor.resolveColor(colorTokens.background),
|
|
50
|
-
text: resolveColor.resolveColor(colorTokens.text),
|
|
51
|
-
};
|
|
52
|
-
return (index.h("div", { key: '5fd84c67e2766016835cfa6fb87a6624b654338d', style: {
|
|
53
|
-
'--sd-toast-bg': colors.background,
|
|
54
|
-
'--sd-toast-text': colors.text,
|
|
55
|
-
} }, index.h("div", { key: '00cbdacb890e65c6a4a1980933496e3a007d4c55', class: this.getContainerClasses(), role: "status", "aria-live": "polite", "aria-atomic": "true" }, this.icon && (index.h("div", { key: '40a4942dafb3c7b5e720ece5af28bfbe40a05726', class: "sd-toast-message__icon" }, index.h("sd-icon", { key: 'a2541d653e24e33a2496a36f476a98acd81d1d9d', name: this.icon, size: 16, color: colors.text }))), index.h("div", { key: '09d913c231f397813f4c145577113334b4d8936c', class: "sd-toast-message__content" }, index.h("span", { key: '1b6ddeadab09234698824b2e07b6b3170a52b742', class: "sd-toast-message__message" }, this.message)), this.link && (index.h("a", { key: '2c85646a763edb49dfd4ace150b11704064ffacb', href: this.link, class: "sd-toast-message__link", target: "_blank", rel: "noopener noreferrer" }, this.linkLabel || this.link)), this.buttonLabel && (index.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.resolveColor('grey_95') } : {} })), this.useClose && (index.h("button", { key: '78583506f960dab8c2e978a51de52fa0cfecc559', type: "button", class: "sd-toast-message__close", onClick: this.handleClose, "aria-label": "Close", title: "Close" }, index.h("sd-icon", { key: '926c90a10942c2bb2ed0815236e2857d3d46b6f6', name: "close", size: 12, color: colors.text }))))));
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
SdToastMessage.style = sdToastMessageCss();
|
|
59
|
-
|
|
60
|
-
exports.sd_toast_message = SdToastMessage;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as s,H as t,c as e,h as a,t as o}from"./p-4iQAU7kM.js";import{r as i}from"./p-DcGvp3RM.js";import{d as n}from"./p-BJ1sZUZE.js";import{d}from"./p-IlOHs7VA.js";const c=s(class s extends t{constructor(s){super(),!1!==s&&this.__registerHost(),this.close=e(this,"sdClose"),this.buttonClick=e(this,"sdButtonClick")}icon;message;link;linkLabel;buttonLabel;useClose=!1;type="basicDark";close;buttonClick;isVisible=!0;static COLOR_OF_TYPE={basicLight:{background:"white",text:"grey_95"},basicDark:{background:"steelblue_90",text:"white"},error:{background:"red_70",text:"white"},caution:{background:"yellow_40",text:"grey_90"},complete:{background:"green_75",text:"white"},progress:{background:"brilliantblue_80",text:"white"}};handleClose=()=>{this.isVisible=!1,this.close.emit()};handleButtonClick=()=>{this.buttonClick.emit()};getContainerClasses(){const s=["sd-toast-message","sd-toast-message--"+this.type];return this.isVisible||s.push("sd-toast-message--hidden"),s.join(" ")}render(){const t=s.COLOR_OF_TYPE[this.type],e={background:i(t.background),text:i(t.text)};return a("div",{key:"5fd84c67e2766016835cfa6fb87a6624b654338d",style:{"--sd-toast-bg":e.background,"--sd-toast-text":e.text}},a("div",{key:"00cbdacb890e65c6a4a1980933496e3a007d4c55",class:this.getContainerClasses(),role:"status","aria-live":"polite","aria-atomic":"true"},this.icon&&a("div",{key:"40a4942dafb3c7b5e720ece5af28bfbe40a05726",class:"sd-toast-message__icon"},a("sd-icon",{key:"a2541d653e24e33a2496a36f476a98acd81d1d9d",name:this.icon,size:16,color:e.text})),a("div",{key:"09d913c231f397813f4c145577113334b4d8936c",class:"sd-toast-message__content"},a("span",{key:"1b6ddeadab09234698824b2e07b6b3170a52b742",class:"sd-toast-message__message"},this.message)),this.link&&a("a",{key:"2c85646a763edb49dfd4ace150b11704064ffacb",href:this.link,class:"sd-toast-message__link",target:"_blank",rel:"noopener noreferrer"},this.linkLabel||this.link),this.buttonLabel&&a("sd-button",{key:"5e53f5a629c3b9a1000b8606877d833eaf56de2a",class:"sd-toast-message__button "+("basicLight"===this.type?"text-white":""),label:this.buttonLabel,variant:"primary",color:"basicLight"===this.type?"oceanblue_75":"white",size:"sm",onSdClick:this.handleButtonClick,style:"basicLight"!==this.type?{"--button-text-color":i("grey_95")}:{}}),this.useClose&&a("button",{key:"78583506f960dab8c2e978a51de52fa0cfecc559",type:"button",class:"sd-toast-message__close",onClick:this.handleClose,"aria-label":"Close",title:"Close"},a("sd-icon",{key:"926c90a10942c2bb2ed0815236e2857d3d46b6f6",name:"close",size:12,color:e.text}))))}static get style(){return"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}"}},[512,"sd-toast-message",{icon:[1],message:[1],link:[1],linkLabel:[1,"link-label"],buttonLabel:[1,"button-label"],useClose:[4,"use-close"],type:[1],isVisible:[32]}]),l=c,r=function(){"undefined"!=typeof customElements&&["sd-toast-message","sd-button","sd-icon"].forEach((s=>{switch(s){case"sd-toast-message":customElements.get(o(s))||customElements.define(o(s),c);break;case"sd-button":customElements.get(o(s))||n();break;case"sd-icon":customElements.get(o(s))||d()}}))};export{l as SdToastMessage,r as defineCustomElement}
|