@maggioli-design-system/magma 1.10.6 → 1.10.8
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/loader.cjs.js +1 -1
- package/dist/cjs/magma-components.cjs.js +1 -1
- package/dist/cjs/mds-input-select.cjs.entry.js +41 -18
- package/dist/cjs/mds-table-row.cjs.entry.js +8 -7
- package/dist/collection/components/mds-input-select/mds-input-select.css +3 -3
- package/dist/collection/components/mds-input-select/mds-input-select.js +60 -17
- package/dist/collection/components/mds-input-select/test/mds-input-select.stories.js +1 -0
- package/dist/collection/components/mds-table-row/mds-table-row.js +8 -7
- package/dist/components/mds-input-select.js +44 -20
- package/dist/components/mds-table-row.js +8 -7
- package/dist/documentation.json +33 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/magma-components.js +1 -1
- package/dist/esm/mds-input-select.entry.js +41 -18
- package/dist/esm/mds-table-row.entry.js +8 -7
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/magma-components.js +1 -1
- package/dist/esm-es5/mds-input-select.entry.js +1 -1
- package/dist/esm-es5/mds-table-row.entry.js +1 -1
- package/dist/hydrate/index.js +51 -26
- package/dist/hydrate/index.mjs +51 -26
- package/dist/magma-components/magma-components.esm.js +1 -1
- package/dist/magma-components/p-26cd6ec8.system.js +1 -1
- package/dist/magma-components/p-2812b739.entry.js +1 -0
- package/dist/magma-components/{p-028dc4fb.system.entry.js → p-3458887d.system.entry.js} +1 -1
- package/dist/magma-components/p-347adbeb.entry.js +1 -0
- package/dist/magma-components/p-7a01206a.system.entry.js +1 -0
- package/dist/stats.json +77 -42
- package/dist/types/components/mds-input-select/mds-input-select.d.ts +14 -1
- package/dist/types/components/mds-input-select/test/mds-input-select.stories.d.ts +1 -0
- package/dist/types/components/mds-table-row/mds-table-row.d.ts +1 -1
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/dist/magma-components/p-045996f1.system.entry.js +0 -1
- package/dist/magma-components/p-4745e425.entry.js +0 -1
- package/dist/magma-components/p-662d3f69.entry.js +0 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import clsx from "clsx";
|
|
2
1
|
import miBaselineKeyboardArrowDown from "@icon/mi/baseline/keyboard-arrow-down.svg";
|
|
3
2
|
import { Host, h } from "@stencil/core";
|
|
4
3
|
/**
|
|
@@ -6,6 +5,7 @@ import { Host, h } from "@stencil/core";
|
|
|
6
5
|
*/
|
|
7
6
|
export class MdsInputSelect {
|
|
8
7
|
constructor() {
|
|
8
|
+
// @State() selected: boolean
|
|
9
9
|
this.hasFocus = false;
|
|
10
10
|
/**
|
|
11
11
|
* If true, the element is displayed as disabled
|
|
@@ -56,10 +56,9 @@ export class MdsInputSelect {
|
|
|
56
56
|
});
|
|
57
57
|
};
|
|
58
58
|
this.onSlotChangeHandler = () => {
|
|
59
|
-
var _a, _b, _c;
|
|
59
|
+
var _a, _b, _c, _d;
|
|
60
60
|
const elements = (_b = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('slot')[0]) === null || _b === void 0 ? void 0 : _b.assignedNodes();
|
|
61
|
-
const
|
|
62
|
-
const options = select === null || select === void 0 ? void 0 : select.querySelectorAll('option');
|
|
61
|
+
const options = (_c = this.selectEl) === null || _c === void 0 ? void 0 : _c.querySelectorAll('option');
|
|
63
62
|
if (!options) {
|
|
64
63
|
return;
|
|
65
64
|
}
|
|
@@ -70,19 +69,16 @@ export class MdsInputSelect {
|
|
|
70
69
|
this.emptyOptions();
|
|
71
70
|
}
|
|
72
71
|
elements === null || elements === void 0 ? void 0 : elements.forEach((element) => {
|
|
73
|
-
|
|
72
|
+
var _a;
|
|
73
|
+
(_a = this.selectEl) === null || _a === void 0 ? void 0 : _a.appendChild(element.cloneNode(true));
|
|
74
74
|
});
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
* selected option that we wanted as a default
|
|
78
|
-
*/
|
|
79
|
-
if (this.value) {
|
|
80
|
-
select === null || select === void 0 ? void 0 : select.querySelectorAll('option').forEach((element) => {
|
|
75
|
+
if (this.value && this.selectEl) {
|
|
76
|
+
this.selectEl.querySelectorAll('option').forEach((element) => {
|
|
81
77
|
element.selected = element.value === this.value;
|
|
82
78
|
});
|
|
83
79
|
}
|
|
84
80
|
else if (!this.placeholder) {
|
|
85
|
-
this.value =
|
|
81
|
+
this.value = (_d = this.selectEl) === null || _d === void 0 ? void 0 : _d.querySelectorAll('option')[0].value;
|
|
86
82
|
}
|
|
87
83
|
};
|
|
88
84
|
}
|
|
@@ -91,7 +87,6 @@ export class MdsInputSelect {
|
|
|
91
87
|
*/
|
|
92
88
|
valueChanged() {
|
|
93
89
|
var _a, _b, _c;
|
|
94
|
-
this.selected = this.value !== '';
|
|
95
90
|
this.changeEvent.emit({ value: (_a = this.value) === null || _a === void 0 ? void 0 : _a.toString() });
|
|
96
91
|
this.internals.setFormValue((_c = (_b = this.value) === null || _b === void 0 ? void 0 : _b.toString()) !== null && _c !== void 0 ? _c : null);
|
|
97
92
|
}
|
|
@@ -105,18 +100,45 @@ export class MdsInputSelect {
|
|
|
105
100
|
this.internals.setFormValue(null);
|
|
106
101
|
}
|
|
107
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* This is for the react component because placeholder is valued after didload
|
|
105
|
+
* and therefore the placeholder option is drawn as the last option.
|
|
106
|
+
* Here the option is brought back to the first position
|
|
107
|
+
* @param newValue placeholder new value
|
|
108
|
+
* @param oldValue placeholder old value
|
|
109
|
+
*/
|
|
110
|
+
placeholderChanged(newValue, oldValue) {
|
|
111
|
+
if (newValue && !oldValue) {
|
|
112
|
+
let defaultOption = document.querySelector('.placeholder-option');
|
|
113
|
+
if (defaultOption)
|
|
114
|
+
defaultOption.remove();
|
|
115
|
+
defaultOption = document.createElement('option');
|
|
116
|
+
this.selectEl.insertBefore(defaultOption, this.selectEl.firstChild);
|
|
117
|
+
defaultOption.value = '';
|
|
118
|
+
defaultOption.text = newValue;
|
|
119
|
+
if (!this.defaultValue)
|
|
120
|
+
defaultOption.selected = true;
|
|
121
|
+
if (this.required)
|
|
122
|
+
defaultOption.disabled = true;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
108
125
|
formResetCallback() {
|
|
109
126
|
this.internals.setFormValue('');
|
|
110
127
|
}
|
|
128
|
+
componentWillLoad() {
|
|
129
|
+
// needed for react component, this prop should be used as default-value html attributo instead of defaultValue prop
|
|
130
|
+
if (this.defaultValue) {
|
|
131
|
+
this.value = this.defaultValue;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
111
134
|
componentDidLoad() {
|
|
112
135
|
if (this.value) {
|
|
113
|
-
this.selected = true;
|
|
114
136
|
this.internals.setFormValue(this.value.toString());
|
|
115
137
|
}
|
|
116
138
|
}
|
|
117
139
|
render() {
|
|
118
|
-
return (h(Host, { key: '
|
|
119
|
-
h("mds-input-tip-item", { key: '
|
|
140
|
+
return (h(Host, { key: '2f4a0c12b02e735f13102477b670de1d305d4e74' }, h("select", { key: 'af74a6d8be051aa97efe469f02c634b5afb17090', class: 'input', onInput: this.onInput.bind(this), onBlur: this.onBlur, onFocus: this.onFocus, name: this.name, required: this.required, disabled: this.disabled, multiple: this.multiple, size: this.size, part: "select", ref: el => this.selectEl = el }, h("option", { key: 'eed3a91bff7759bf8861dbf8ac2d2ea133e16a55', class: "placeholder-option", value: "", disabled: !this.required ? undefined : true, selected: this.defaultValue ? undefined : true }, this.placeholder)), h("div", { key: '17d85258b38d73baff10b052676fa12e3c07a57e', class: "icon-container" }, h("i", { key: 'a205484c8af4681f9d40c04769220898ebc3bf77', class: "icon", innerHTML: miBaselineKeyboardArrowDown })), h("div", { key: '8f61e86c19b7a7e8ed9ae9a50e31daa4784a4455', class: "option-container" }, h("slot", { key: '425f44dd0376cb0dc9155c9090d2faffaa18a9df', onSlotchange: this.onSlotChangeHandler })), h("mds-input-tip", { key: '0c2cbe8bec30637844b408242be54c471a221e30', position: "top", active: this.hasFocus }, this.disabled && h("mds-input-tip-item", { key: '60bb927f181184b04e6cc703c445f516f77104e0', expanded: true, variant: "disabled" }), this.required &&
|
|
141
|
+
h("mds-input-tip-item", { key: '575b39745f3ecd81165dbf4b3c82ad64b5227403', expanded: this.hasFocus, variant: this.value === '' ? 'required' : 'required-success' }))));
|
|
120
142
|
}
|
|
121
143
|
static get is() { return "mds-input-select"; }
|
|
122
144
|
static get encapsulation() { return "shadow"; }
|
|
@@ -309,6 +331,25 @@ export class MdsInputSelect {
|
|
|
309
331
|
"reflect": true,
|
|
310
332
|
"defaultValue": "''"
|
|
311
333
|
},
|
|
334
|
+
"defaultValue": {
|
|
335
|
+
"type": "any",
|
|
336
|
+
"mutable": false,
|
|
337
|
+
"complexType": {
|
|
338
|
+
"original": "string | number | null",
|
|
339
|
+
"resolved": "null | number | string | undefined",
|
|
340
|
+
"references": {}
|
|
341
|
+
},
|
|
342
|
+
"required": false,
|
|
343
|
+
"optional": true,
|
|
344
|
+
"docs": {
|
|
345
|
+
"tags": [],
|
|
346
|
+
"text": "Specifies the default value of the component"
|
|
347
|
+
},
|
|
348
|
+
"getter": false,
|
|
349
|
+
"setter": false,
|
|
350
|
+
"attribute": "default-value",
|
|
351
|
+
"reflect": true
|
|
352
|
+
},
|
|
312
353
|
"variant": {
|
|
313
354
|
"type": "string",
|
|
314
355
|
"mutable": false,
|
|
@@ -338,7 +379,6 @@ export class MdsInputSelect {
|
|
|
338
379
|
}
|
|
339
380
|
static get states() {
|
|
340
381
|
return {
|
|
341
|
-
"selected": {},
|
|
342
382
|
"hasFocus": {}
|
|
343
383
|
};
|
|
344
384
|
}
|
|
@@ -374,6 +414,9 @@ export class MdsInputSelect {
|
|
|
374
414
|
}, {
|
|
375
415
|
"propName": "disabled",
|
|
376
416
|
"methodName": "disabledChanged"
|
|
417
|
+
}, {
|
|
418
|
+
"propName": "placeholder",
|
|
419
|
+
"methodName": "placeholderChanged"
|
|
377
420
|
}];
|
|
378
421
|
}
|
|
379
422
|
static get attachInternalsMemberName() { return "internals"; }
|
|
@@ -46,19 +46,20 @@ export class MdsTableRow {
|
|
|
46
46
|
this.observer.observe(this.actions);
|
|
47
47
|
}
|
|
48
48
|
disconnectedCallback() {
|
|
49
|
-
this.observer
|
|
49
|
+
if (this.observer)
|
|
50
|
+
this.observer.disconnect();
|
|
50
51
|
}
|
|
51
52
|
render() {
|
|
52
|
-
return (h(Host, { key: '
|
|
53
|
-
h("mds-table-cell", { key: '
|
|
54
|
-
h("mds-table-cell", { key: '
|
|
55
|
-
h("mds-table-cell", { key: '
|
|
53
|
+
return (h(Host, { key: 'c0e67a5763f47d180b02a5a3ca85f7164708a60f', role: "row" }, this.selectable &&
|
|
54
|
+
h("mds-table-cell", { key: '0f55b635bf14f1a5051a4f5438e06424dbf33573', class: "selection-cell" }, h("div", { key: 'bf032a097ae262c64c60cca5d0459726229592c5', class: "checkbox-wrapper" }, h("mds-input-switch", { key: '76b8caf51030115bbda38f71ce237d8f9bfbcf02', title: this.t.get(this.selected ? 'unselectRow' : 'selectRow'), lang: this.language, type: "checkbox", checked: this.selected, onMdsInputSwitchChange: this.handleSelectionChange }))), h("slot", { key: '5e1bdd763f5eec6cb7df2a84775284403c54bdee' }), this.hasActions && isSafari() &&
|
|
55
|
+
h("mds-table-cell", { key: '5496b73c5e1c84f52209f06f8615b35ec72c02fd', class: "actions-cell actions-cell--disable" }, h("div", { key: '49a200874c6f7183b0aea31b6f781132f5e71f9f', class: "actions" }, h("slot", { key: 'd1819cf376deba84c2e92d4c942b40744bcf9cc9', name: "action" }))), this.hasActions && !isSafari() &&
|
|
56
|
+
h("mds-table-cell", { key: '0e8a947018302174747d53d0343592698ec84b04', class: "actions-cell" }, h("div", { key: 'fe19579e1d1f937f784415221414def39a77bcec', class: "actions-sizer", style: {
|
|
56
57
|
minHeight: '1px',
|
|
57
58
|
maxWidth: this.sizerWidth,
|
|
58
59
|
minWidth: this.sizerWidth,
|
|
59
|
-
} }), h("div", { key: '
|
|
60
|
+
} }), h("div", { key: 'cd0c5cf2da7ea6252a68d0a093f6abdb3b2dd90d', class: "actions-view" }, h("div", { key: 'c6b731c14457f0f36b114d1d258e75efc6842f06', class: "actions", ref: el => this.actions = el, style: {
|
|
60
61
|
marginRight: `calc(${this.sizerWidth} + var(--mds-table-cell-padding))`,
|
|
61
|
-
} }, h("slot", { key: '
|
|
62
|
+
} }, h("slot", { key: '8c6c55a4d759fb04d1f0ae13a6263bb01dc4878e', name: "action" }))))));
|
|
62
63
|
}
|
|
63
64
|
static get is() { return "mds-table-row"; }
|
|
64
65
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { c as clsx } from './clsx.js';
|
|
3
2
|
import { m as miBaselineKeyboardArrowDown } from './keyboard-arrow-down.js';
|
|
4
3
|
import { d as defineCustomElement$4 } from './mds-input-tip2.js';
|
|
5
4
|
import { d as defineCustomElement$3 } from './mds-input-tip-item2.js';
|
|
6
5
|
import { d as defineCustomElement$2 } from './mds-text2.js';
|
|
7
6
|
|
|
8
|
-
const mdsInputSelectCss = "@tailwind components;\n\n\n:host{\n\n min-height: 1.5rem;\n\n font-family: Karla, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\n\n font-size: 1rem;\n\n line-height: 1.5rem;\n\n -webkit-font-smoothing: antialiased;\n\n -moz-osx-font-smoothing: grayscale;\n\n --mds-input-select-variant-color: var(--tone-neutral-01);\n --mds-input-select-ring: 0 0 0 1px rgb(var(--mds-input-select-variant-color) / 0.1);\n --mds-input-select-shadow: 0 1px 3px 0 rgb(var(--mds-input-select-variant-color) / 0.1), 0 1px 2px 0 rgb(var(--mds-input-select-variant-color) / 0.06);\n --mds-input-select-arrow-icon-background-color: var(--mds-input-select-arrow-icon-blur-background-color);\n --mds-input-select-arrow-icon-blur-background-color: transparent;\n --mds-input-select-arrow-icon-blur-color: rgb(var(--mds-input-select-variant-color) / 0.5);\n --mds-input-select-arrow-icon-color: var(--mds-input-select-arrow-icon-blur-color);\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--mds-input-select-variant-color) / 0.5);\n --mds-input-select-arrow-icon-hover-color: rgb(var(--mds-input-select-variant-color));\n\n color: rgb(var(--tone-neutral-02));\n display: -ms-flexbox;\n display: flex;\n position: relative;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n:host([required]:not([required=\"false\"]):focus-within) .icon {\n -webkit-transform: translate(0.375rem, 0.375rem);\n transform: translate(0.375rem, 0.375rem);\n}\n\n:host(:hover),\n:host(:focus-within) {\n --mds-input-select-variant-color: var(--variant-primary-03);\n --mds-input-select-ring: 0 0 0 3px rgb(var(--mds-input-select-variant-color) / 1);\n --mds-input-select-shadow: 0 4px 6px -1px rgb(var(--mds-input-select-variant-color) / 0.1), 0 2px 4px -1px rgb(var(--mds-input-select-variant-color) / 0.06);\n --mds-input-select-arrow-icon-background-color: var(--mds-input-select-arrow-icon-hover-background-color);\n --mds-input-select-arrow-icon-color: var(--mds-input-select-arrow-icon-hover-color);\n}\n\n.input{\n\n font-family: Karla, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\n\n font-size: 1rem;\n\n line-height: 1.5rem;\n\n -webkit-font-smoothing: antialiased;\n\n -moz-osx-font-smoothing: grayscale;\n\n margin: 0rem;\n\n min-height: 3rem;\n\n width: 100%;\n\n border-radius: 0.5rem;\n\n padding-top: 0.75rem;\n\n padding-bottom: 0.75rem;\n\n padding-left: 1rem;\n\n padding-right: 3rem;\n\n -webkit-transition-duration: 300ms;\n\n transition-duration: 300ms;\n\n -webkit-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n -webkit-appearance: none;\n\n -moz-appearance: none;\n\n appearance: none;\n background-color: rgb(var(--tone-neutral));\n border: 0;\n -webkit-box-shadow: var(--mds-input-select-ring), var(--mds-input-select-shadow);\n box-shadow: var(--mds-input-select-ring), var(--mds-input-select-shadow);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: rgb(var(--tone-neutral-05));\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n -webkit-transition-property: background-color, border-color, color, fill, -webkit-box-shadow;\n transition-property: background-color, border-color, color, fill, -webkit-box-shadow;\n transition-property: background-color, border-color, box-shadow, color, fill;\n transition-property: background-color, border-color, box-shadow, color, fill, -webkit-box-shadow;\n}\n\n.input:hover,\n.input:focus{\n\n outline: 2px solid transparent;\n\n outline-offset: 2px;\n\n -webkit-transition-duration: 300ms;\n\n transition-duration: 300ms;\n\n -webkit-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n color: rgb(var(--tone-neutral-03));\n}\n\n:host([value]:not([value=\"\"])) .input {\n color: rgb(var(--tone-neutral-03));\n}\n\n.input--mds-input-select-selected {\n color: rgb(var(--tone-neutral-02));\n}\n\n.input:disabled {\n background-color: rgb(var(--tone-neutral-09));\n opacity: 1;\n}\n\n:host([disabled]:not([disabled=\"false\"])) {\n pointer-events: none;\n}\n\n:host([disabled]:not([disabled=\"false\"])) .input {\n pointer-events: none;\n}\n\n:host([disabled]:not([disabled=\"false\"])) .icon {\n fill: rgb(var(--tone-neutral-06));\n -webkit-transform: translate(0.625rem, 0.5rem);\n transform: translate(0.625rem, 0.5rem);\n}\n\n.icon-container{\n\n right: 1rem;\n\n height: 3rem;\n\n -ms-flex-align: center;\n\n align-items: center;\n color: inherit;\n display: -ms-flexbox;\n display: flex;\n pointer-events: none;\n position: absolute;\n}\n\n.icon{\n\n display: -ms-flexbox;\n\n display: flex;\n}\n\n.icon svg{\n\n aspect-ratio: 1/1;\n\n height: 100%;\n\n width: 100%;\n}\n\n.icon{\n\n border-radius: 9999px;\n\n -webkit-transition-duration: 200ms;\n\n transition-duration: 200ms;\n\n background-color: var(--mds-input-select-arrow-icon-background-color, rgb(var(--variant-primary-09)));\n fill: var(--mds-input-select-arrow-icon-color, rgb(var(--variant-primary-04)));\n -webkit-transition-property: background-color, fill;\n transition-property: background-color, fill;\n}\n\n.option-container {\n display: none;\n}\n\n@container (max-width: 210px) {\n :host .tip__content,\n :host(:focus-within) .tip__content {\n grid-template-columns: 0fr;\n opacity: 0;\n }\n\n :host .tip {\n padding-left: 0;\n padding-right: 0;\n }\n\n :host {\n --mds-input-select-background: rgb(var(--variant-primary-07));\n }\n}\n\n:host {\n --mds-input-select-icon-color: var(--variant-primary-03);\n --mds-input-select-variant-color: 0 0 0;\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--variant-primary-09));\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--variant-primary-08));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--variant-primary-06));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--variant-primary-04));\n}\n\n:host(:hover),\n:host(:focus-within) {\n --mds-input-select-variant-color: var(--variant-primary-04);\n}\n\n:host([variant=\"info\"]) {\n --mds-input-select-icon-color: var(--status-info-05);\n --mds-input-select-tip-background: var(--status-info-05);\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--status-info-09));\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--status-info-08));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--status-info-06));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--status-info-04));\n --mds-input-select-variant-color: 0 0 0;\n}\n\n:host([variant=\"info\"]:hover),\n:host([variant=\"info\"]:focus-within) {\n --mds-input-select-icon-color: var(--status-info-04);\n --mds-input-select-variant-color: var(--status-info-05);\n}\n\n:host([variant=\"success\"]) {\n --mds-input-select-icon-color: var(--status-success-05);\n --mds-input-select-tip-background: var(--status-success-05);\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--status-success-09));\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--status-success-08));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--status-success-06));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--status-success-04));\n --mds-input-select-variant-color: 0 0 0;\n}\n\n:host([variant=\"success\"]:hover),\n:host([variant=\"success\"]:focus-within) {\n --mds-input-select-icon-color: var(--status-success-04);\n --mds-input-select-variant-color: var(--status-success-05);\n}\n\n:host([variant=\"warning\"]) {\n --mds-input-select-icon-color: var(--status-warning-05);\n --mds-input-select-tip-background: var(--status-warning-05);\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--status-warning-09));\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--status-warning-08));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--status-warning-06));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--status-warning-04));\n --mds-input-select-variant-color: 0 0 0;\n}\n\n:host([variant=\"warning\"]:hover),\n:host([variant=\"warning\"]:focus-within) {\n --mds-input-select-icon-color: var(--status-warning-04);\n --mds-input-select-variant-color: var(--status-warning-05);\n}\n\n:host([variant=\"error\"]) {\n --mds-input-select-icon-color: var(--status-error-05);\n --mds-input-select-tip-background: var(--status-error-05);\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--status-error-09));\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--status-error-08));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--status-error-06));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--status-error-04));\n --mds-input-select-variant-color: 0 0 0;\n}\n\n:host([variant=\"error\"]:hover),\n:host([variant=\"error\"]:focus-within) {\n --mds-input-select-icon-color: var(--status-error-04);\n --mds-input-select-variant-color: var(--status-error-05);\n}\n\n:host-context(.pref-animation-reduce),\n:host-context(.pref-animation-reduce) .input,\n:host-context(.pref-animation-reduce) .input:hover,\n:host-context(.pref-animation-reduce) .input:focus,\n:host-context(.pref-animation-reduce) .icon {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n}\n\n@media (prefers-reduced-motion) {\n :host-context(.pref-animation-system),\n :host-context(.pref-animation-system) .input,\n :host-context(.pref-animation-system) .input:hover,\n :host-context(.pref-animation-system) .input:focus,\n :host-context(.pref-animation-system) .icon {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n}\n\n:host-context(.pref-theme-dark) {\n --mds-input-select-ring: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.3);\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--variant-primary-05));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--mds-input-select-variant-color));\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--variant-primary-04));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--variant-primary-08));\n}\n\n:host-context(.pref-theme-dark) .input {\n color: rgb(var(--tone-neutral-03));\n}\n\n@media (prefers-color-scheme: dark) {\n :host-context(.pref-theme-system) {\n --mds-input-select-ring: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.3);\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--variant-primary-05));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--mds-input-select-variant-color));\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--variant-primary-04));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--variant-primary-08));\n }\n\n :host-context(.pref-theme-system) .input {\n color: rgb(var(--tone-neutral-03));\n }\n}\n\n:host-context(.pref-contrast-more) {\n --mds-input-select-ring: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6);\n}\n\n:host-context(.pref-contrast-more) .input {\n color: rgb(var(--tone-neutral-01));\n}\n\n@media (prefers-contrast: more) {\n :host-context(.pref-contrast-system) {\n --mds-input-select-ring: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6);\n }\n\n :host-context(.pref-contrast-system) .input {\n color: rgb(var(--tone-neutral-01));\n }\n}\n\n:host(:not(:is([hydrated], .hydrated))) {\n -webkit-animation-duration: 0s;\n animation-duration: 0s;\n border-color: transparent;\n -webkit-box-shadow: 0 0 0 transparent;\n box-shadow: 0 0 0 transparent;\n opacity: 0;\n outline-color: transparent;\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n visibility: hidden;\n}\n\n/* TODO refact(stencil): Uses only used selector from parent shadowDOM component */\n\nmds-accordion:not(:is([hydrated], .hydrated)),\nmds-accordion-item:not(:is([hydrated], .hydrated)),\nmds-accordion-timer:not(:is([hydrated], .hydrated)),\nmds-accordion-timer-item:not(:is([hydrated], .hydrated)),\nmds-author:not(:is([hydrated], .hydrated)),\nmds-avatar:not(:is([hydrated], .hydrated)),\nmds-badge:not(:is([hydrated], .hydrated)),\nmds-banner:not(:is([hydrated], .hydrated)),\nmds-benchmark-bar:not(:is([hydrated], .hydrated)),\nmds-bibliography:not(:is([hydrated], .hydrated)),\nmds-breadcrumb:not(:is([hydrated], .hydrated)),\nmds-breadcrumb-item:not(:is([hydrated], .hydrated)),\nmds-button:not(:is([hydrated], .hydrated)),\nmds-card:not(:is([hydrated], .hydrated)),\nmds-card-content:not(:is([hydrated], .hydrated)),\nmds-card-footer:not(:is([hydrated], .hydrated)),\nmds-card-header:not(:is([hydrated], .hydrated)),\nmds-card-media:not(:is([hydrated], .hydrated)),\nmds-chip:not(:is([hydrated], .hydrated)),\nmds-details:not(:is([hydrated], .hydrated)),\nmds-dropdown:not(:is([hydrated], .hydrated)),\nmds-entity:not(:is([hydrated], .hydrated)),\nmds-file:not(:is([hydrated], .hydrated)),\nmds-file-preview:not(:is([hydrated], .hydrated)),\nmds-filter:not(:is([hydrated], .hydrated)),\nmds-filter-item:not(:is([hydrated], .hydrated)),\nmds-header:not(:is([hydrated], .hydrated)),\nmds-header-bar:not(:is([hydrated], .hydrated)),\nmds-help:not(:is([hydrated], .hydrated)),\nmds-horizontal-scroll:not(:is([hydrated], .hydrated)),\nmds-hr:not(:is([hydrated], .hydrated)),\nmds-icon:not(:is([hydrated], .hydrated)),\nmds-img:not(:is([hydrated], .hydrated)),\nmds-input:not(:is([hydrated], .hydrated)),\nmds-input-field:not(:is([hydrated], .hydrated)),\nmds-input-range:not(:is([hydrated], .hydrated)),\nmds-input-select:not(:is([hydrated], .hydrated)),\nmds-input-switch:not(:is([hydrated], .hydrated)),\nmds-input-tip:not(:is([hydrated], .hydrated)),\nmds-input-tip-item:not(:is([hydrated], .hydrated)),\nmds-input-upload:not(:is([hydrated], .hydrated)),\nmds-keyboard:not(:is([hydrated], .hydrated)),\nmds-keyboard-key:not(:is([hydrated], .hydrated)),\nmds-kpi:not(:is([hydrated], .hydrated)),\nmds-kpi-item:not(:is([hydrated], .hydrated)),\nmds-label:not(:is([hydrated], .hydrated)),\nmds-list:not(:is([hydrated], .hydrated)),\nmds-list-item:not(:is([hydrated], .hydrated)),\nmds-modal:not(:is([hydrated], .hydrated)),\nmds-note:not(:is([hydrated], .hydrated)),\nmds-notification:not(:is([hydrated], .hydrated)),\nmds-paginator:not(:is([hydrated], .hydrated)),\nmds-paginator-item:not(:is([hydrated], .hydrated)),\nmds-pref:not(:is([hydrated], .hydrated)),\nmds-pref-animation:not(:is([hydrated], .hydrated)),\nmds-pref-consumption:not(:is([hydrated], .hydrated)),\nmds-pref-contrast:not(:is([hydrated], .hydrated)),\nmds-pref-language:not(:is([hydrated], .hydrated)),\nmds-pref-language-item:not(:is([hydrated], .hydrated)),\nmds-pref-theme:not(:is([hydrated], .hydrated)),\nmds-price-table:not(:is([hydrated], .hydrated)),\nmds-price-table-features:not(:is([hydrated], .hydrated)),\nmds-price-table-features-cell:not(:is([hydrated], .hydrated)),\nmds-price-table-features-row:not(:is([hydrated], .hydrated)),\nmds-price-table-header:not(:is([hydrated], .hydrated)),\nmds-price-table-list:not(:is([hydrated], .hydrated)),\nmds-price-table-list-item:not(:is([hydrated], .hydrated)),\nmds-progress:not(:is([hydrated], .hydrated)),\nmds-push-notification:not(:is([hydrated], .hydrated)),\nmds-push-notifications:not(:is([hydrated], .hydrated)),\nmds-quote:not(:is([hydrated], .hydrated)),\nmds-separator:not(:is([hydrated], .hydrated)),\nmds-spinner:not(:is([hydrated], .hydrated)),\nmds-stepper-bar:not(:is([hydrated], .hydrated)),\nmds-stepper-bar-item:not(:is([hydrated], .hydrated)),\nmds-tab:not(:is([hydrated], .hydrated)),\nmds-tab-bar:not(:is([hydrated], .hydrated)),\nmds-tab-bar-item:not(:is([hydrated], .hydrated)),\nmds-tab-item:not(:is([hydrated], .hydrated)),\nmds-table:not(:is([hydrated], .hydrated)),\nmds-table-body:not(:is([hydrated], .hydrated)),\nmds-table-cell:not(:is([hydrated], .hydrated)),\nmds-table-footer:not(:is([hydrated], .hydrated)),\nmds-table-header:not(:is([hydrated], .hydrated)),\nmds-table-header-cell:not(:is([hydrated], .hydrated)),\nmds-table-row:not(:is([hydrated], .hydrated)),\nmds-text:not(:is([hydrated], .hydrated)),\nmds-toast:not(:is([hydrated], .hydrated)),\nmds-tooltip:not(:is([hydrated], .hydrated)),\nmds-tree:not(:is([hydrated], .hydrated)),\nmds-tree-item:not(:is([hydrated], .hydrated)),\nmds-url-view:not(:is([hydrated], .hydrated)),\nmds-usage:not(:is([hydrated], .hydrated)),\nmds-video-wall:not(:is([hydrated], .hydrated)),\nmds-zero:not(:is([hydrated], .hydrated))\n{\n -webkit-animation-duration: 0s;\n animation-duration: 0s;\n border-color: transparent;\n -webkit-box-shadow: 0 0 0 transparent;\n box-shadow: 0 0 0 transparent;\n opacity: 0;\n outline-color: transparent;\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n visibility: hidden;\n}\n\n";
|
|
7
|
+
const mdsInputSelectCss = "@tailwind components;\n\n\n:host{\n\n min-height: 1.5rem;\n\n font-family: Karla, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\n\n font-size: 1rem;\n\n line-height: 1.5rem;\n\n -webkit-font-smoothing: antialiased;\n\n -moz-osx-font-smoothing: grayscale;\n\n --mds-input-select-variant-color: var(--tone-neutral-01);\n --mds-input-select-ring: 0 0 0 1px rgb(var(--mds-input-select-variant-color) / 0.1);\n --mds-input-select-shadow: 0 1px 3px 0 rgb(var(--mds-input-select-variant-color) / 0.1), 0 1px 2px 0 rgb(var(--mds-input-select-variant-color) / 0.06);\n --mds-input-select-arrow-icon-background-color: var(--mds-input-select-arrow-icon-blur-background-color);\n --mds-input-select-arrow-icon-blur-background-color: transparent;\n --mds-input-select-arrow-icon-blur-color: rgb(var(--mds-input-select-variant-color) / 0.5);\n --mds-input-select-arrow-icon-color: var(--mds-input-select-arrow-icon-blur-color);\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--mds-input-select-variant-color) / 0.5);\n --mds-input-select-arrow-icon-hover-color: rgb(var(--mds-input-select-variant-color));\n\n color: rgb(var(--tone-neutral-02));\n display: -ms-flexbox;\n display: flex;\n position: relative;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n:host([required]:not([required=\"false\"]):focus-within) .icon {\n -webkit-transform: translate(0.375rem, 0.375rem);\n transform: translate(0.375rem, 0.375rem);\n}\n\n:host(:hover),\n:host(:focus-within) {\n --mds-input-select-variant-color: var(--variant-primary-03);\n --mds-input-select-ring: 0 0 0 3px rgb(var(--mds-input-select-variant-color) / 1);\n --mds-input-select-shadow: 0 4px 6px -1px rgb(var(--mds-input-select-variant-color) / 0.1), 0 2px 4px -1px rgb(var(--mds-input-select-variant-color) / 0.06);\n --mds-input-select-arrow-icon-background-color: var(--mds-input-select-arrow-icon-hover-background-color);\n --mds-input-select-arrow-icon-color: var(--mds-input-select-arrow-icon-hover-color);\n}\n\n.input{\n\n font-family: Karla, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\n\n font-size: 1rem;\n\n line-height: 1.5rem;\n\n -webkit-font-smoothing: antialiased;\n\n -moz-osx-font-smoothing: grayscale;\n\n margin: 0rem;\n\n min-height: 3rem;\n\n width: 100%;\n\n border-radius: 0.5rem;\n\n padding-top: 0.75rem;\n\n padding-bottom: 0.75rem;\n\n padding-left: 1rem;\n\n padding-right: 3rem;\n\n -webkit-transition-duration: 300ms;\n\n transition-duration: 300ms;\n\n -webkit-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n -webkit-appearance: none;\n\n -moz-appearance: none;\n\n appearance: none;\n background-color: rgb(var(--tone-neutral));\n border: 0;\n -webkit-box-shadow: var(--mds-input-select-ring), var(--mds-input-select-shadow);\n box-shadow: var(--mds-input-select-ring), var(--mds-input-select-shadow);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: rgb(var(--tone-neutral-02));\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n -webkit-transition-property: background-color, border-color, color, fill, -webkit-box-shadow;\n transition-property: background-color, border-color, color, fill, -webkit-box-shadow;\n transition-property: background-color, border-color, box-shadow, color, fill;\n transition-property: background-color, border-color, box-shadow, color, fill, -webkit-box-shadow;\n}\n\n.input:hover,\n.input:focus{\n\n outline: 2px solid transparent;\n\n outline-offset: 2px;\n\n -webkit-transition-duration: 300ms;\n\n transition-duration: 300ms;\n\n -webkit-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n color: rgb(var(--tone-neutral-03));\n}\n\n:host([value]:not([value=\"\"])) .input {\n color: rgb(var(--tone-neutral-03));\n}\n\n:host([required]:not([required=\"false\"])) .input {\n color: rgb(var(--tone-neutral-05));\n}\n\n.input:disabled {\n background-color: rgb(var(--tone-neutral-09));\n opacity: 1;\n}\n\n:host([disabled]:not([disabled=\"false\"])) {\n pointer-events: none;\n}\n\n:host([disabled]:not([disabled=\"false\"])) .input {\n pointer-events: none;\n}\n\n:host([disabled]:not([disabled=\"false\"])) .icon {\n fill: rgb(var(--tone-neutral-06));\n -webkit-transform: translate(0.625rem, 0.5rem);\n transform: translate(0.625rem, 0.5rem);\n}\n\n.icon-container{\n\n right: 1rem;\n\n height: 3rem;\n\n -ms-flex-align: center;\n\n align-items: center;\n color: inherit;\n display: -ms-flexbox;\n display: flex;\n pointer-events: none;\n position: absolute;\n}\n\n.icon{\n\n display: -ms-flexbox;\n\n display: flex;\n}\n\n.icon svg{\n\n aspect-ratio: 1/1;\n\n height: 100%;\n\n width: 100%;\n}\n\n.icon{\n\n border-radius: 9999px;\n\n -webkit-transition-duration: 200ms;\n\n transition-duration: 200ms;\n\n background-color: var(--mds-input-select-arrow-icon-background-color, rgb(var(--variant-primary-09)));\n fill: var(--mds-input-select-arrow-icon-color, rgb(var(--variant-primary-04)));\n -webkit-transition-property: background-color, fill;\n transition-property: background-color, fill;\n}\n\n.option-container {\n display: none;\n}\n\n@container (max-width: 210px) {\n :host .tip__content,\n :host(:focus-within) .tip__content {\n grid-template-columns: 0fr;\n opacity: 0;\n }\n\n :host .tip {\n padding-left: 0;\n padding-right: 0;\n }\n\n :host {\n --mds-input-select-background: rgb(var(--variant-primary-07));\n }\n}\n\n:host {\n --mds-input-select-icon-color: var(--variant-primary-03);\n --mds-input-select-variant-color: 0 0 0;\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--variant-primary-09));\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--variant-primary-08));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--variant-primary-06));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--variant-primary-04));\n}\n\n:host(:hover),\n:host(:focus-within) {\n --mds-input-select-variant-color: var(--variant-primary-04);\n}\n\n:host([variant=\"info\"]) {\n --mds-input-select-icon-color: var(--status-info-05);\n --mds-input-select-tip-background: var(--status-info-05);\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--status-info-09));\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--status-info-08));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--status-info-06));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--status-info-04));\n --mds-input-select-variant-color: 0 0 0;\n}\n\n:host([variant=\"info\"]:hover),\n:host([variant=\"info\"]:focus-within) {\n --mds-input-select-icon-color: var(--status-info-04);\n --mds-input-select-variant-color: var(--status-info-05);\n}\n\n:host([variant=\"success\"]) {\n --mds-input-select-icon-color: var(--status-success-05);\n --mds-input-select-tip-background: var(--status-success-05);\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--status-success-09));\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--status-success-08));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--status-success-06));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--status-success-04));\n --mds-input-select-variant-color: 0 0 0;\n}\n\n:host([variant=\"success\"]:hover),\n:host([variant=\"success\"]:focus-within) {\n --mds-input-select-icon-color: var(--status-success-04);\n --mds-input-select-variant-color: var(--status-success-05);\n}\n\n:host([variant=\"warning\"]) {\n --mds-input-select-icon-color: var(--status-warning-05);\n --mds-input-select-tip-background: var(--status-warning-05);\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--status-warning-09));\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--status-warning-08));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--status-warning-06));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--status-warning-04));\n --mds-input-select-variant-color: 0 0 0;\n}\n\n:host([variant=\"warning\"]:hover),\n:host([variant=\"warning\"]:focus-within) {\n --mds-input-select-icon-color: var(--status-warning-04);\n --mds-input-select-variant-color: var(--status-warning-05);\n}\n\n:host([variant=\"error\"]) {\n --mds-input-select-icon-color: var(--status-error-05);\n --mds-input-select-tip-background: var(--status-error-05);\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--status-error-09));\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--status-error-08));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--status-error-06));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--status-error-04));\n --mds-input-select-variant-color: 0 0 0;\n}\n\n:host([variant=\"error\"]:hover),\n:host([variant=\"error\"]:focus-within) {\n --mds-input-select-icon-color: var(--status-error-04);\n --mds-input-select-variant-color: var(--status-error-05);\n}\n\n:host-context(.pref-animation-reduce),\n:host-context(.pref-animation-reduce) .input,\n:host-context(.pref-animation-reduce) .input:hover,\n:host-context(.pref-animation-reduce) .input:focus,\n:host-context(.pref-animation-reduce) .icon {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n}\n\n@media (prefers-reduced-motion) {\n :host-context(.pref-animation-system),\n :host-context(.pref-animation-system) .input,\n :host-context(.pref-animation-system) .input:hover,\n :host-context(.pref-animation-system) .input:focus,\n :host-context(.pref-animation-system) .icon {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n}\n\n:host-context(.pref-theme-dark) {\n --mds-input-select-ring: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.3);\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--variant-primary-05));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--mds-input-select-variant-color));\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--variant-primary-04));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--variant-primary-08));\n}\n\n:host-context(.pref-theme-dark) .input {\n color: rgb(var(--tone-neutral-03));\n}\n\n@media (prefers-color-scheme: dark) {\n :host-context(.pref-theme-system) {\n --mds-input-select-ring: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.3);\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--variant-primary-05));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--mds-input-select-variant-color));\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--variant-primary-04));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--variant-primary-08));\n }\n\n :host-context(.pref-theme-system) .input {\n color: rgb(var(--tone-neutral-03));\n }\n}\n\n:host-context(.pref-contrast-more) {\n --mds-input-select-ring: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6);\n}\n\n:host-context(.pref-contrast-more) .input {\n color: rgb(var(--tone-neutral-01));\n}\n\n@media (prefers-contrast: more) {\n :host-context(.pref-contrast-system) {\n --mds-input-select-ring: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6);\n }\n\n :host-context(.pref-contrast-system) .input {\n color: rgb(var(--tone-neutral-01));\n }\n}\n\n:host(:not(:is([hydrated], .hydrated))) {\n -webkit-animation-duration: 0s;\n animation-duration: 0s;\n border-color: transparent;\n -webkit-box-shadow: 0 0 0 transparent;\n box-shadow: 0 0 0 transparent;\n opacity: 0;\n outline-color: transparent;\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n visibility: hidden;\n}\n\n/* TODO refact(stencil): Uses only used selector from parent shadowDOM component */\n\nmds-accordion:not(:is([hydrated], .hydrated)),\nmds-accordion-item:not(:is([hydrated], .hydrated)),\nmds-accordion-timer:not(:is([hydrated], .hydrated)),\nmds-accordion-timer-item:not(:is([hydrated], .hydrated)),\nmds-author:not(:is([hydrated], .hydrated)),\nmds-avatar:not(:is([hydrated], .hydrated)),\nmds-badge:not(:is([hydrated], .hydrated)),\nmds-banner:not(:is([hydrated], .hydrated)),\nmds-benchmark-bar:not(:is([hydrated], .hydrated)),\nmds-bibliography:not(:is([hydrated], .hydrated)),\nmds-breadcrumb:not(:is([hydrated], .hydrated)),\nmds-breadcrumb-item:not(:is([hydrated], .hydrated)),\nmds-button:not(:is([hydrated], .hydrated)),\nmds-card:not(:is([hydrated], .hydrated)),\nmds-card-content:not(:is([hydrated], .hydrated)),\nmds-card-footer:not(:is([hydrated], .hydrated)),\nmds-card-header:not(:is([hydrated], .hydrated)),\nmds-card-media:not(:is([hydrated], .hydrated)),\nmds-chip:not(:is([hydrated], .hydrated)),\nmds-details:not(:is([hydrated], .hydrated)),\nmds-dropdown:not(:is([hydrated], .hydrated)),\nmds-entity:not(:is([hydrated], .hydrated)),\nmds-file:not(:is([hydrated], .hydrated)),\nmds-file-preview:not(:is([hydrated], .hydrated)),\nmds-filter:not(:is([hydrated], .hydrated)),\nmds-filter-item:not(:is([hydrated], .hydrated)),\nmds-header:not(:is([hydrated], .hydrated)),\nmds-header-bar:not(:is([hydrated], .hydrated)),\nmds-help:not(:is([hydrated], .hydrated)),\nmds-horizontal-scroll:not(:is([hydrated], .hydrated)),\nmds-hr:not(:is([hydrated], .hydrated)),\nmds-icon:not(:is([hydrated], .hydrated)),\nmds-img:not(:is([hydrated], .hydrated)),\nmds-input:not(:is([hydrated], .hydrated)),\nmds-input-field:not(:is([hydrated], .hydrated)),\nmds-input-range:not(:is([hydrated], .hydrated)),\nmds-input-select:not(:is([hydrated], .hydrated)),\nmds-input-switch:not(:is([hydrated], .hydrated)),\nmds-input-tip:not(:is([hydrated], .hydrated)),\nmds-input-tip-item:not(:is([hydrated], .hydrated)),\nmds-input-upload:not(:is([hydrated], .hydrated)),\nmds-keyboard:not(:is([hydrated], .hydrated)),\nmds-keyboard-key:not(:is([hydrated], .hydrated)),\nmds-kpi:not(:is([hydrated], .hydrated)),\nmds-kpi-item:not(:is([hydrated], .hydrated)),\nmds-label:not(:is([hydrated], .hydrated)),\nmds-list:not(:is([hydrated], .hydrated)),\nmds-list-item:not(:is([hydrated], .hydrated)),\nmds-modal:not(:is([hydrated], .hydrated)),\nmds-note:not(:is([hydrated], .hydrated)),\nmds-notification:not(:is([hydrated], .hydrated)),\nmds-paginator:not(:is([hydrated], .hydrated)),\nmds-paginator-item:not(:is([hydrated], .hydrated)),\nmds-pref:not(:is([hydrated], .hydrated)),\nmds-pref-animation:not(:is([hydrated], .hydrated)),\nmds-pref-consumption:not(:is([hydrated], .hydrated)),\nmds-pref-contrast:not(:is([hydrated], .hydrated)),\nmds-pref-language:not(:is([hydrated], .hydrated)),\nmds-pref-language-item:not(:is([hydrated], .hydrated)),\nmds-pref-theme:not(:is([hydrated], .hydrated)),\nmds-price-table:not(:is([hydrated], .hydrated)),\nmds-price-table-features:not(:is([hydrated], .hydrated)),\nmds-price-table-features-cell:not(:is([hydrated], .hydrated)),\nmds-price-table-features-row:not(:is([hydrated], .hydrated)),\nmds-price-table-header:not(:is([hydrated], .hydrated)),\nmds-price-table-list:not(:is([hydrated], .hydrated)),\nmds-price-table-list-item:not(:is([hydrated], .hydrated)),\nmds-progress:not(:is([hydrated], .hydrated)),\nmds-push-notification:not(:is([hydrated], .hydrated)),\nmds-push-notifications:not(:is([hydrated], .hydrated)),\nmds-quote:not(:is([hydrated], .hydrated)),\nmds-separator:not(:is([hydrated], .hydrated)),\nmds-spinner:not(:is([hydrated], .hydrated)),\nmds-stepper-bar:not(:is([hydrated], .hydrated)),\nmds-stepper-bar-item:not(:is([hydrated], .hydrated)),\nmds-tab:not(:is([hydrated], .hydrated)),\nmds-tab-bar:not(:is([hydrated], .hydrated)),\nmds-tab-bar-item:not(:is([hydrated], .hydrated)),\nmds-tab-item:not(:is([hydrated], .hydrated)),\nmds-table:not(:is([hydrated], .hydrated)),\nmds-table-body:not(:is([hydrated], .hydrated)),\nmds-table-cell:not(:is([hydrated], .hydrated)),\nmds-table-footer:not(:is([hydrated], .hydrated)),\nmds-table-header:not(:is([hydrated], .hydrated)),\nmds-table-header-cell:not(:is([hydrated], .hydrated)),\nmds-table-row:not(:is([hydrated], .hydrated)),\nmds-text:not(:is([hydrated], .hydrated)),\nmds-toast:not(:is([hydrated], .hydrated)),\nmds-tooltip:not(:is([hydrated], .hydrated)),\nmds-tree:not(:is([hydrated], .hydrated)),\nmds-tree-item:not(:is([hydrated], .hydrated)),\nmds-url-view:not(:is([hydrated], .hydrated)),\nmds-usage:not(:is([hydrated], .hydrated)),\nmds-video-wall:not(:is([hydrated], .hydrated)),\nmds-zero:not(:is([hydrated], .hydrated))\n{\n -webkit-animation-duration: 0s;\n animation-duration: 0s;\n border-color: transparent;\n -webkit-box-shadow: 0 0 0 transparent;\n box-shadow: 0 0 0 transparent;\n opacity: 0;\n outline-color: transparent;\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n visibility: hidden;\n}\n\n";
|
|
9
8
|
const MdsInputSelectStyle0 = mdsInputSelectCss;
|
|
10
9
|
|
|
11
10
|
const MdsInputSelect$1 = /*@__PURE__*/ proxyCustomElement(class MdsInputSelect extends HTMLElement {
|
|
@@ -15,6 +14,7 @@ const MdsInputSelect$1 = /*@__PURE__*/ proxyCustomElement(class MdsInputSelect e
|
|
|
15
14
|
this.__attachShadow();
|
|
16
15
|
this.changeEvent = createEvent(this, "mdsInputSelectChange", 7);
|
|
17
16
|
this.internals = this.attachInternals();
|
|
17
|
+
// @State() selected: boolean
|
|
18
18
|
this.hasFocus = false;
|
|
19
19
|
/**
|
|
20
20
|
* If true, the element is displayed as disabled
|
|
@@ -65,10 +65,9 @@ const MdsInputSelect$1 = /*@__PURE__*/ proxyCustomElement(class MdsInputSelect e
|
|
|
65
65
|
});
|
|
66
66
|
};
|
|
67
67
|
this.onSlotChangeHandler = () => {
|
|
68
|
-
var _a, _b, _c;
|
|
68
|
+
var _a, _b, _c, _d;
|
|
69
69
|
const elements = (_b = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('slot')[0]) === null || _b === void 0 ? void 0 : _b.assignedNodes();
|
|
70
|
-
const
|
|
71
|
-
const options = select === null || select === void 0 ? void 0 : select.querySelectorAll('option');
|
|
70
|
+
const options = (_c = this.selectEl) === null || _c === void 0 ? void 0 : _c.querySelectorAll('option');
|
|
72
71
|
if (!options) {
|
|
73
72
|
return;
|
|
74
73
|
}
|
|
@@ -79,19 +78,16 @@ const MdsInputSelect$1 = /*@__PURE__*/ proxyCustomElement(class MdsInputSelect e
|
|
|
79
78
|
this.emptyOptions();
|
|
80
79
|
}
|
|
81
80
|
elements === null || elements === void 0 ? void 0 : elements.forEach((element) => {
|
|
82
|
-
|
|
81
|
+
var _a;
|
|
82
|
+
(_a = this.selectEl) === null || _a === void 0 ? void 0 : _a.appendChild(element.cloneNode(true));
|
|
83
83
|
});
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
* selected option that we wanted as a default
|
|
87
|
-
*/
|
|
88
|
-
if (this.value) {
|
|
89
|
-
select === null || select === void 0 ? void 0 : select.querySelectorAll('option').forEach((element) => {
|
|
84
|
+
if (this.value && this.selectEl) {
|
|
85
|
+
this.selectEl.querySelectorAll('option').forEach((element) => {
|
|
90
86
|
element.selected = element.value === this.value;
|
|
91
87
|
});
|
|
92
88
|
}
|
|
93
89
|
else if (!this.placeholder) {
|
|
94
|
-
this.value =
|
|
90
|
+
this.value = (_d = this.selectEl) === null || _d === void 0 ? void 0 : _d.querySelectorAll('option')[0].value;
|
|
95
91
|
}
|
|
96
92
|
};
|
|
97
93
|
}
|
|
@@ -100,7 +96,6 @@ const MdsInputSelect$1 = /*@__PURE__*/ proxyCustomElement(class MdsInputSelect e
|
|
|
100
96
|
*/
|
|
101
97
|
valueChanged() {
|
|
102
98
|
var _a, _b, _c;
|
|
103
|
-
this.selected = this.value !== '';
|
|
104
99
|
this.changeEvent.emit({ value: (_a = this.value) === null || _a === void 0 ? void 0 : _a.toString() });
|
|
105
100
|
this.internals.setFormValue((_c = (_b = this.value) === null || _b === void 0 ? void 0 : _b.toString()) !== null && _c !== void 0 ? _c : null);
|
|
106
101
|
}
|
|
@@ -114,24 +109,52 @@ const MdsInputSelect$1 = /*@__PURE__*/ proxyCustomElement(class MdsInputSelect e
|
|
|
114
109
|
this.internals.setFormValue(null);
|
|
115
110
|
}
|
|
116
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
* This is for the react component because placeholder is valued after didload
|
|
114
|
+
* and therefore the placeholder option is drawn as the last option.
|
|
115
|
+
* Here the option is brought back to the first position
|
|
116
|
+
* @param newValue placeholder new value
|
|
117
|
+
* @param oldValue placeholder old value
|
|
118
|
+
*/
|
|
119
|
+
placeholderChanged(newValue, oldValue) {
|
|
120
|
+
if (newValue && !oldValue) {
|
|
121
|
+
let defaultOption = document.querySelector('.placeholder-option');
|
|
122
|
+
if (defaultOption)
|
|
123
|
+
defaultOption.remove();
|
|
124
|
+
defaultOption = document.createElement('option');
|
|
125
|
+
this.selectEl.insertBefore(defaultOption, this.selectEl.firstChild);
|
|
126
|
+
defaultOption.value = '';
|
|
127
|
+
defaultOption.text = newValue;
|
|
128
|
+
if (!this.defaultValue)
|
|
129
|
+
defaultOption.selected = true;
|
|
130
|
+
if (this.required)
|
|
131
|
+
defaultOption.disabled = true;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
117
134
|
formResetCallback() {
|
|
118
135
|
this.internals.setFormValue('');
|
|
119
136
|
}
|
|
137
|
+
componentWillLoad() {
|
|
138
|
+
// needed for react component, this prop should be used as default-value html attributo instead of defaultValue prop
|
|
139
|
+
if (this.defaultValue) {
|
|
140
|
+
this.value = this.defaultValue;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
120
143
|
componentDidLoad() {
|
|
121
144
|
if (this.value) {
|
|
122
|
-
this.selected = true;
|
|
123
145
|
this.internals.setFormValue(this.value.toString());
|
|
124
146
|
}
|
|
125
147
|
}
|
|
126
148
|
render() {
|
|
127
|
-
return (h(Host, { key: '
|
|
128
|
-
h("mds-input-tip-item", { key: '
|
|
149
|
+
return (h(Host, { key: '2f4a0c12b02e735f13102477b670de1d305d4e74' }, h("select", { key: 'af74a6d8be051aa97efe469f02c634b5afb17090', class: 'input', onInput: this.onInput.bind(this), onBlur: this.onBlur, onFocus: this.onFocus, name: this.name, required: this.required, disabled: this.disabled, multiple: this.multiple, size: this.size, part: "select", ref: el => this.selectEl = el }, h("option", { key: 'eed3a91bff7759bf8861dbf8ac2d2ea133e16a55', class: "placeholder-option", value: "", disabled: !this.required ? undefined : true, selected: this.defaultValue ? undefined : true }, this.placeholder)), h("div", { key: '17d85258b38d73baff10b052676fa12e3c07a57e', class: "icon-container" }, h("i", { key: 'a205484c8af4681f9d40c04769220898ebc3bf77', class: "icon", innerHTML: miBaselineKeyboardArrowDown })), h("div", { key: '8f61e86c19b7a7e8ed9ae9a50e31daa4784a4455', class: "option-container" }, h("slot", { key: '425f44dd0376cb0dc9155c9090d2faffaa18a9df', onSlotchange: this.onSlotChangeHandler })), h("mds-input-tip", { key: '0c2cbe8bec30637844b408242be54c471a221e30', position: "top", active: this.hasFocus }, this.disabled && h("mds-input-tip-item", { key: '60bb927f181184b04e6cc703c445f516f77104e0', expanded: true, variant: "disabled" }), this.required &&
|
|
150
|
+
h("mds-input-tip-item", { key: '575b39745f3ecd81165dbf4b3c82ad64b5227403', expanded: this.hasFocus, variant: this.value === '' ? 'required' : 'required-success' }))));
|
|
129
151
|
}
|
|
130
152
|
static get formAssociated() { return true; }
|
|
131
153
|
get host() { return this; }
|
|
132
154
|
static get watchers() { return {
|
|
133
155
|
"value": ["valueChanged"],
|
|
134
|
-
"disabled": ["disabledChanged"]
|
|
156
|
+
"disabled": ["disabledChanged"],
|
|
157
|
+
"placeholder": ["placeholderChanged"]
|
|
135
158
|
}; }
|
|
136
159
|
static get style() { return MdsInputSelectStyle0; }
|
|
137
160
|
}, [65, "mds-input-select", {
|
|
@@ -144,12 +167,13 @@ const MdsInputSelect$1 = /*@__PURE__*/ proxyCustomElement(class MdsInputSelect e
|
|
|
144
167
|
"multiple": [516],
|
|
145
168
|
"size": [514],
|
|
146
169
|
"value": [520],
|
|
170
|
+
"defaultValue": [520, "default-value"],
|
|
147
171
|
"variant": [513],
|
|
148
|
-
"selected": [32],
|
|
149
172
|
"hasFocus": [32]
|
|
150
173
|
}, undefined, {
|
|
151
174
|
"value": ["valueChanged"],
|
|
152
|
-
"disabled": ["disabledChanged"]
|
|
175
|
+
"disabled": ["disabledChanged"],
|
|
176
|
+
"placeholder": ["placeholderChanged"]
|
|
153
177
|
}]);
|
|
154
178
|
function defineCustomElement$1() {
|
|
155
179
|
if (typeof customElements === "undefined") {
|
|
@@ -76,19 +76,20 @@ const MdsTableRow$1 = /*@__PURE__*/ proxyCustomElement(class MdsTableRow extends
|
|
|
76
76
|
this.observer.observe(this.actions);
|
|
77
77
|
}
|
|
78
78
|
disconnectedCallback() {
|
|
79
|
-
this.observer
|
|
79
|
+
if (this.observer)
|
|
80
|
+
this.observer.disconnect();
|
|
80
81
|
}
|
|
81
82
|
render() {
|
|
82
|
-
return (h(Host, { key: '
|
|
83
|
-
h("mds-table-cell", { key: '
|
|
84
|
-
h("mds-table-cell", { key: '
|
|
85
|
-
h("mds-table-cell", { key: '
|
|
83
|
+
return (h(Host, { key: 'c0e67a5763f47d180b02a5a3ca85f7164708a60f', role: "row" }, this.selectable &&
|
|
84
|
+
h("mds-table-cell", { key: '0f55b635bf14f1a5051a4f5438e06424dbf33573', class: "selection-cell" }, h("div", { key: 'bf032a097ae262c64c60cca5d0459726229592c5', class: "checkbox-wrapper" }, h("mds-input-switch", { key: '76b8caf51030115bbda38f71ce237d8f9bfbcf02', title: this.t.get(this.selected ? 'unselectRow' : 'selectRow'), lang: this.language, type: "checkbox", checked: this.selected, onMdsInputSwitchChange: this.handleSelectionChange }))), h("slot", { key: '5e1bdd763f5eec6cb7df2a84775284403c54bdee' }), this.hasActions && isSafari() &&
|
|
85
|
+
h("mds-table-cell", { key: '5496b73c5e1c84f52209f06f8615b35ec72c02fd', class: "actions-cell actions-cell--disable" }, h("div", { key: '49a200874c6f7183b0aea31b6f781132f5e71f9f', class: "actions" }, h("slot", { key: 'd1819cf376deba84c2e92d4c942b40744bcf9cc9', name: "action" }))), this.hasActions && !isSafari() &&
|
|
86
|
+
h("mds-table-cell", { key: '0e8a947018302174747d53d0343592698ec84b04', class: "actions-cell" }, h("div", { key: 'fe19579e1d1f937f784415221414def39a77bcec', class: "actions-sizer", style: {
|
|
86
87
|
minHeight: '1px',
|
|
87
88
|
maxWidth: this.sizerWidth,
|
|
88
89
|
minWidth: this.sizerWidth,
|
|
89
|
-
} }), h("div", { key: '
|
|
90
|
+
} }), h("div", { key: 'cd0c5cf2da7ea6252a68d0a093f6abdb3b2dd90d', class: "actions-view" }, h("div", { key: 'c6b731c14457f0f36b114d1d258e75efc6842f06', class: "actions", ref: el => this.actions = el, style: {
|
|
90
91
|
marginRight: `calc(${this.sizerWidth} + var(--mds-table-cell-padding))`,
|
|
91
|
-
} }, h("slot", { key: '
|
|
92
|
+
} }, h("slot", { key: '8c6c55a4d759fb04d1f0ae13a6263bb01dc4878e', name: "action" }))))));
|
|
92
93
|
}
|
|
93
94
|
get host() { return this; }
|
|
94
95
|
static get style() { return MdsTableRowStyle0; }
|
package/dist/documentation.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "
|
|
2
|
+
"timestamp": "2026-01-07T09:13:37",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.27.2",
|
|
@@ -12680,6 +12680,38 @@
|
|
|
12680
12680
|
"getter": false,
|
|
12681
12681
|
"setter": false
|
|
12682
12682
|
},
|
|
12683
|
+
{
|
|
12684
|
+
"name": "defaultValue",
|
|
12685
|
+
"type": "null | number | string | undefined",
|
|
12686
|
+
"complexType": {
|
|
12687
|
+
"original": "string | number | null",
|
|
12688
|
+
"resolved": "null | number | string | undefined",
|
|
12689
|
+
"references": {}
|
|
12690
|
+
},
|
|
12691
|
+
"mutable": false,
|
|
12692
|
+
"attr": "default-value",
|
|
12693
|
+
"reflectToAttr": true,
|
|
12694
|
+
"docs": "Specifies the default value of the component",
|
|
12695
|
+
"docsTags": [],
|
|
12696
|
+
"values": [
|
|
12697
|
+
{
|
|
12698
|
+
"type": "null"
|
|
12699
|
+
},
|
|
12700
|
+
{
|
|
12701
|
+
"type": "number"
|
|
12702
|
+
},
|
|
12703
|
+
{
|
|
12704
|
+
"type": "string"
|
|
12705
|
+
},
|
|
12706
|
+
{
|
|
12707
|
+
"type": "undefined"
|
|
12708
|
+
}
|
|
12709
|
+
],
|
|
12710
|
+
"optional": true,
|
|
12711
|
+
"required": false,
|
|
12712
|
+
"getter": false,
|
|
12713
|
+
"setter": false
|
|
12714
|
+
},
|
|
12683
12715
|
{
|
|
12684
12716
|
"name": "disabled",
|
|
12685
12717
|
"type": "boolean | undefined",
|