@maggioli-design-system/mds-input 4.2.0 → 4.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-3097681c.js → index-2bcac156.js} +119 -24
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mds-input.cjs.entry.js +2 -2
- package/dist/cjs/mds-input.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/common/aria.js +9 -1
- package/dist/collection/common/keyboard-manager.js +2 -2
- package/dist/collection/components/mds-input/mds-input.css +34 -71
- package/dist/collection/components/mds-input/test/mds-input.stories.js +5 -5
- package/dist/components/mds-input.js +3 -1
- package/dist/documentation.json +3 -3
- package/dist/esm/{index-e22ac7e3.js → index-0c539bb1.js} +119 -24
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mds-input.entry.js +2 -2
- package/dist/esm/mds-input.js +4 -4
- package/dist/esm-es5/index-0c539bb1.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mds-input.entry.js +1 -1
- package/dist/esm-es5/mds-input.js +1 -1
- package/dist/mds-input/mds-input.esm.js +1 -1
- package/dist/mds-input/mds-input.js +1 -1
- package/dist/mds-input/p-5d146ed2.entry.js +1 -0
- package/dist/mds-input/p-a71f012b.js +2 -0
- package/dist/mds-input/p-b114c68e.system.js +1 -0
- package/dist/mds-input/p-c6930a3e.system.js +2 -0
- package/dist/mds-input/p-d184781a.system.entry.js +1 -0
- package/dist/stats.json +32 -30
- package/dist/types/common/aria.d.ts +2 -1
- package/dist/types/stencil-public-runtime.d.ts +19 -0
- package/documentation.json +14 -4
- package/package.json +6 -6
- package/readme.md +3 -1
- package/src/common/aria.ts +12 -0
- package/src/common/keyboard-manager.ts +2 -2
- package/src/components/mds-input/mds-input.css +33 -34
- package/src/components/mds-input/readme.md +1 -1
- package/src/components/mds-input/test/mds-input.stories.mdx +1 -3
- package/src/components/mds-input/test/mds-input.stories.tsx +5 -5
- package/src/fixtures/icons.json +2 -0
- package/www/build/mds-input.esm.js +1 -1
- package/www/build/mds-input.js +1 -1
- package/www/build/p-5d146ed2.entry.js +1 -0
- package/www/build/p-a71f012b.js +2 -0
- package/www/build/p-b114c68e.system.js +1 -0
- package/www/build/p-c6930a3e.system.js +2 -0
- package/www/build/p-d184781a.system.entry.js +1 -0
- package/dist/esm-es5/index-e22ac7e3.js +0 -2
- package/dist/mds-input/p-228b0fab.system.js +0 -2
- package/dist/mds-input/p-2ccb5a3f.system.entry.js +0 -1
- package/dist/mds-input/p-34c8c829.system.js +0 -1
- package/dist/mds-input/p-4111271f.entry.js +0 -1
- package/dist/mds-input/p-c226a52a.js +0 -2
- package/www/build/p-228b0fab.system.js +0 -2
- package/www/build/p-2ccb5a3f.system.entry.js +0 -1
- package/www/build/p-34c8c829.system.js +0 -1
- package/www/build/p-4111271f.entry.js +0 -1
- package/www/build/p-c226a52a.js +0 -2
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
|
|
|
2
2
|
|
|
3
3
|
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
4
4
|
|
|
5
|
-
const mdsInputCss = "*,::before,::after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::-webkit-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::-ms-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}@tailwind utilities; :host{--mds-input-background:rgb(var(--tone-neutral));--mds-input-icon-color:var(--mds-input-variant-color);--mds-input-tip-background:84, 84, 84;--mds-input-ring:0 0 0 1px
|
|
5
|
+
const mdsInputCss = "*,::before,::after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::-webkit-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::-ms-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}@tailwind utilities; :host{--mds-input-background:rgb(var(--tone-neutral));--mds-input-icon-color:var(--mds-input-variant-color);--mds-input-tip-background:84, 84, 84;--mds-input-ring:0 0 0 1px rgb(var(--mds-input-variant-color) 0.1);--mds-input-shadow:0 1px 3px 0 rgb(var(--mds-input-variant-color) 0.1), 0 1px 2px 0 rgb(var(--mds-input-variant-color) 0.06);--mds-input-variant-color:0, 0, 0;font-family:Karla, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:16px;line-height:1.5rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:-ms-flexbox;display:flex;position:relative}.input{font-family:Karla, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:16px;line-height:1.5rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0px;min-height:3rem;width:100%;text-overflow:ellipsis;border-radius:0.5rem;padding-left:1rem;padding-right:1rem;padding-top:0.75rem;padding-bottom:0.75rem;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);background-color:var(--mds-input-background);border:0;border-color:transparent;-webkit-box-shadow:var(--mds-input-ring), var(--mds-input-shadow);box-shadow:var(--mds-input-ring), var(--mds-input-shadow);-webkit-box-sizing:border-box;box-sizing:border-box;color:rgb(var(--tone-neutral-02));overflow:hidden}textarea.input:active{-webkit-transition-property:none;transition-property:none}textarea.input{max-height:16rem;min-height:6rem;border-bottom-right-radius:0px}.input:focus{outline:2px solid transparent;outline-offset:2px;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);--mds-input-ring:0 0 0 3px rgb(var(--mds-input-variant-color) 1);--mds-input-shadow:0 4px 6px -1px rgb(var(--mds-input-variant-color) 0.1), 0 2px 4px -1px rgb(var(--mds-input-variant-color) 0.06)}.input:disabled{background-color:rgb(var(--tone-neutral-10))}.input:disabled::-moz-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled::-webkit-input-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled:-ms-input-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled::-ms-input-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled,.input:disabled::placeholder{color:rgb(var(--tone-neutral-05))}.input.has-icon{padding-left:2.75rem}.tip{right:0.25rem;height:0.75rem;border-radius:9999px;padding-left:0.5rem;padding-right:0.5rem;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);background-color:rgb(var(--mds-input-tip-background));color:rgb(var(--tone-neutral));-ms-flex-pack:center;justify-content:center;line-height:0.75rem;pointer-events:none;position:absolute;text-align:center}.tip-variant{--mds-input-tip-background:var(--mds-input-icon-color)}.read-only{background-color:rgb(var(--status-info-05));color:rgb(var(--tone-neutral))}.required{width:0.75rem;padding:0px;background-color:rgb(var(--status-error-05));color:transparent}.disabled{background-color:rgb(var(--tone-neutral-05))}.input:focus+.required{width:6rem;color:rgb(var(--tone-neutral))}.icon{left:0.75rem;top:0.75rem;fill:rgb(var(--mds-input-icon-color));position:absolute}.fixed{position:fixed}.absolute{position:absolute}.bottom-1{bottom:0.25rem}.top-1{top:0.25rem}.flex{display:-ms-flexbox;display:flex}.w-min{width:-moz-min-content;width:-webkit-min-content;width:min-content}.flex-col{-ms-flex-direction:column;flex-direction:column}.gap-y-2{row-gap:0.5rem}.border{border-width:1px}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{--mds-input-icon-color:10, 80, 212;--mds-input-variant-color:0, 0, 0}:host(:focus){--mds-input-variant-color:31, 101, 232;}:host([variant=\"info\"]){--mds-input-icon-color:25, 143, 182;--mds-input-variant-color:0, 0, 0}:host([variant=\"info\"]:focus){--mds-input-icon-color:21, 119, 151;--mds-input-variant-color:25, 143, 182;}:host([variant=\"success\"]){--mds-input-icon-color:26, 151, 91;--mds-input-variant-color:0, 0, 0}:host([variant=\"success\"]:focus){--mds-input-icon-color:22, 125, 76;--mds-input-variant-color:26, 151, 91;}:host([variant=\"warning\"]){--mds-input-icon-color:168, 126, 0;--mds-input-variant-color:0, 0, 0}:host([variant=\"warning\"]:focus){--mds-input-icon-color:139, 104, 0;--mds-input-variant-color:168, 126, 0;}:host([variant=\"error\"]){--mds-input-icon-color:234, 77, 73;--mds-input-variant-color:0, 0, 0}:host([variant=\"error\"]:focus){--mds-input-icon-color:215, 29, 25;--mds-input-variant-color:234, 77, 73;}";
|
|
6
6
|
|
|
7
7
|
const MdsInput$1 = /*@__PURE__*/ proxyCustomElement(class MdsInput extends HTMLElement {
|
|
8
8
|
constructor() {
|
|
@@ -131,6 +131,8 @@ const MdsInput$1 = /*@__PURE__*/ proxyCustomElement(class MdsInput extends HTMLE
|
|
|
131
131
|
"hasFocus": [32],
|
|
132
132
|
"setFocus": [64],
|
|
133
133
|
"getInputElement": [64]
|
|
134
|
+
}, undefined, {
|
|
135
|
+
"value": ["valueChanged"]
|
|
134
136
|
}]);
|
|
135
137
|
function defineCustomElement$1() {
|
|
136
138
|
if (typeof customElements === "undefined") {
|
package/dist/documentation.json
CHANGED
|
@@ -781,9 +781,9 @@ const patch = (oldVNode, newVNode) => {
|
|
|
781
781
|
}
|
|
782
782
|
};
|
|
783
783
|
/**
|
|
784
|
-
* 'Nullify' any VDom `ref` callbacks on a VDom node or its children by
|
|
785
|
-
*
|
|
786
|
-
*
|
|
784
|
+
* 'Nullify' any VDom `ref` callbacks on a VDom node or its children by calling
|
|
785
|
+
* them with `null`. This signals that the DOM element corresponding to the VDom
|
|
786
|
+
* node has been removed from the DOM.
|
|
787
787
|
*
|
|
788
788
|
* @param vNode a virtual DOM node
|
|
789
789
|
*/
|
|
@@ -999,6 +999,10 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
999
999
|
*/
|
|
1000
1000
|
const callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
1001
1001
|
try {
|
|
1002
|
+
/**
|
|
1003
|
+
* minification optimization: `allRenderFn` is `true` if all components have a `render`
|
|
1004
|
+
* method, so we can call the method immediately. If not, check before calling it.
|
|
1005
|
+
*/
|
|
1002
1006
|
instance = instance.render() ;
|
|
1003
1007
|
{
|
|
1004
1008
|
hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
@@ -1071,6 +1075,16 @@ const appDidLoad = (who) => {
|
|
|
1071
1075
|
}
|
|
1072
1076
|
nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
|
|
1073
1077
|
};
|
|
1078
|
+
/**
|
|
1079
|
+
* Allows to safely call a method, e.g. `componentDidLoad`, on an instance,
|
|
1080
|
+
* e.g. custom element node. If a build figures out that e.g. no component
|
|
1081
|
+
* has a `componentDidLoad` method, the instance method gets removed from the
|
|
1082
|
+
* output bundle and this function returns `undefined`.
|
|
1083
|
+
* @param instance any object that may or may not contain methods
|
|
1084
|
+
* @param method method name
|
|
1085
|
+
* @param arg single arbitrary argument
|
|
1086
|
+
* @returns result of method call if it exists, otherwise `undefined`
|
|
1087
|
+
*/
|
|
1074
1088
|
const safeCall = (instance, method, arg) => {
|
|
1075
1089
|
if (instance && instance[method]) {
|
|
1076
1090
|
try {
|
|
@@ -1138,6 +1152,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1138
1152
|
* @returns a reference to the same constructor passed in (but now mutated)
|
|
1139
1153
|
*/
|
|
1140
1154
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1155
|
+
var _a;
|
|
1141
1156
|
if (cmpMeta.$members$) {
|
|
1142
1157
|
if (Cstr.watchers) {
|
|
1143
1158
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
@@ -1175,7 +1190,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1175
1190
|
});
|
|
1176
1191
|
if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
|
|
1177
1192
|
const attrNameToPropName = new Map();
|
|
1178
|
-
prototype.attributeChangedCallback = function (attrName,
|
|
1193
|
+
prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
|
|
1179
1194
|
plt.jmp(() => {
|
|
1180
1195
|
const propName = attrNameToPropName.get(attrName);
|
|
1181
1196
|
// In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
|
|
@@ -1223,26 +1238,65 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1223
1238
|
// `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
|
|
1224
1239
|
return;
|
|
1225
1240
|
}
|
|
1241
|
+
else if (propName == null) {
|
|
1242
|
+
// At this point we should know this is not a "member", so we can treat it like watching an attribute
|
|
1243
|
+
// on a vanilla web component
|
|
1244
|
+
const hostRef = getHostRef(this);
|
|
1245
|
+
const flags = hostRef === null || hostRef === void 0 ? void 0 : hostRef.$flags$;
|
|
1246
|
+
// We only want to trigger the callback(s) if:
|
|
1247
|
+
// 1. The instance is ready
|
|
1248
|
+
// 2. The watchers are ready
|
|
1249
|
+
// 3. The value has changed
|
|
1250
|
+
if (!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
|
|
1251
|
+
flags & 128 /* HOST_FLAGS.isWatchReady */ &&
|
|
1252
|
+
newValue !== oldValue) {
|
|
1253
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1254
|
+
const entry = cmpMeta.$watchers$[attrName];
|
|
1255
|
+
entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
|
|
1256
|
+
if (instance[callbackName] != null) {
|
|
1257
|
+
instance[callbackName].call(instance, newValue, oldValue, attrName);
|
|
1258
|
+
}
|
|
1259
|
+
});
|
|
1260
|
+
}
|
|
1261
|
+
return;
|
|
1262
|
+
}
|
|
1226
1263
|
this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
|
|
1227
1264
|
});
|
|
1228
1265
|
};
|
|
1229
|
-
//
|
|
1230
|
-
//
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1266
|
+
// Create an array of attributes to observe
|
|
1267
|
+
// This list in comprised of all strings used within a `@Watch()` decorator
|
|
1268
|
+
// on a component as well as any Stencil-specific "members" (`@Prop()`s and `@State()`s).
|
|
1269
|
+
// As such, there is no way to guarantee type-safety here that a user hasn't entered
|
|
1270
|
+
// an invalid attribute.
|
|
1271
|
+
Cstr.observedAttributes = Array.from(new Set([
|
|
1272
|
+
...Object.keys((_a = cmpMeta.$watchers$) !== null && _a !== void 0 ? _a : {}),
|
|
1273
|
+
...members
|
|
1274
|
+
.filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)
|
|
1275
|
+
.map(([propName, m]) => {
|
|
1276
|
+
const attrName = m[1] || propName;
|
|
1277
|
+
attrNameToPropName.set(attrName, propName);
|
|
1278
|
+
if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
|
|
1279
|
+
cmpMeta.$attrsToReflect$.push([propName, attrName]);
|
|
1280
|
+
}
|
|
1281
|
+
return attrName;
|
|
1282
|
+
}),
|
|
1283
|
+
]));
|
|
1241
1284
|
}
|
|
1242
1285
|
}
|
|
1243
1286
|
return Cstr;
|
|
1244
1287
|
};
|
|
1245
|
-
|
|
1288
|
+
/**
|
|
1289
|
+
* Initialize a Stencil component given a reference to its host element, its
|
|
1290
|
+
* runtime bookkeeping data structure, runtime metadata about the component,
|
|
1291
|
+
* and (optionally) an HMR version ID.
|
|
1292
|
+
*
|
|
1293
|
+
* @param elm a host element
|
|
1294
|
+
* @param hostRef the element's runtime bookkeeping object
|
|
1295
|
+
* @param cmpMeta runtime metadata for the Stencil component
|
|
1296
|
+
* @param hmrVersionId an (optional) HMR version ID
|
|
1297
|
+
*/
|
|
1298
|
+
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
1299
|
+
let Cstr;
|
|
1246
1300
|
// initializeComponent
|
|
1247
1301
|
if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
|
|
1248
1302
|
// Let the runtime know that the component has been initialized
|
|
@@ -1397,6 +1451,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1397
1451
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
|
|
1398
1452
|
lazyBundles.map((lazyBundle) => {
|
|
1399
1453
|
lazyBundle[1].map((compactMeta) => {
|
|
1454
|
+
var _a;
|
|
1400
1455
|
const cmpMeta = {
|
|
1401
1456
|
$flags$: compactMeta[0],
|
|
1402
1457
|
$tagName$: compactMeta[1],
|
|
@@ -1410,7 +1465,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1410
1465
|
cmpMeta.$attrsToReflect$ = [];
|
|
1411
1466
|
}
|
|
1412
1467
|
{
|
|
1413
|
-
cmpMeta.$watchers$ = {};
|
|
1468
|
+
cmpMeta.$watchers$ = (_a = compactMeta[4]) !== null && _a !== void 0 ? _a : {};
|
|
1414
1469
|
}
|
|
1415
1470
|
const tagName = cmpMeta.$tagName$;
|
|
1416
1471
|
const HostElement = class extends HTMLElement {
|
|
@@ -1489,13 +1544,40 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1489
1544
|
* @returns void
|
|
1490
1545
|
*/
|
|
1491
1546
|
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
|
1547
|
+
/**
|
|
1548
|
+
* A WeakMap mapping runtime component references to their corresponding host reference
|
|
1549
|
+
* instances.
|
|
1550
|
+
*/
|
|
1492
1551
|
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1552
|
+
/**
|
|
1553
|
+
* Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}
|
|
1554
|
+
*
|
|
1555
|
+
* @param ref the runtime ref of interest
|
|
1556
|
+
* @returns the Host reference (if found) or undefined
|
|
1557
|
+
*/
|
|
1493
1558
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1559
|
+
/**
|
|
1560
|
+
* Register a lazy instance with the {@link hostRefs} object so it's
|
|
1561
|
+
* corresponding {@link d.HostRef} can be retrieved later.
|
|
1562
|
+
*
|
|
1563
|
+
* @param lazyInstance the lazy instance of interest
|
|
1564
|
+
* @param hostRef that instances `HostRef` object
|
|
1565
|
+
* @returns a reference to the host ref WeakMap
|
|
1566
|
+
*/
|
|
1494
1567
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
1495
|
-
|
|
1568
|
+
/**
|
|
1569
|
+
* Register a host element for a Stencil component, setting up various metadata
|
|
1570
|
+
* and callbacks based on {@link BUILD} flags as well as the component's runtime
|
|
1571
|
+
* metadata.
|
|
1572
|
+
*
|
|
1573
|
+
* @param hostElement the host element to register
|
|
1574
|
+
* @param cmpMeta runtime metadata for that component
|
|
1575
|
+
* @returns a reference to the host ref WeakMap
|
|
1576
|
+
*/
|
|
1577
|
+
const registerHost = (hostElement, cmpMeta) => {
|
|
1496
1578
|
const hostRef = {
|
|
1497
1579
|
$flags$: 0,
|
|
1498
|
-
$hostElement$:
|
|
1580
|
+
$hostElement$: hostElement,
|
|
1499
1581
|
$cmpMeta$: cmpMeta,
|
|
1500
1582
|
$instanceValues$: new Map(),
|
|
1501
1583
|
};
|
|
@@ -1504,10 +1586,10 @@ const registerHost = (elm, cmpMeta) => {
|
|
|
1504
1586
|
}
|
|
1505
1587
|
{
|
|
1506
1588
|
hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
|
|
1507
|
-
|
|
1508
|
-
|
|
1589
|
+
hostElement['s-p'] = [];
|
|
1590
|
+
hostElement['s-rc'] = [];
|
|
1509
1591
|
}
|
|
1510
|
-
return hostRefs.set(
|
|
1592
|
+
return hostRefs.set(hostElement, hostRef);
|
|
1511
1593
|
};
|
|
1512
1594
|
const isMemberInElement = (elm, memberName) => memberName in elm;
|
|
1513
1595
|
const consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -1520,7 +1602,20 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1520
1602
|
if (module) {
|
|
1521
1603
|
return module[exportName];
|
|
1522
1604
|
}
|
|
1523
|
-
|
|
1605
|
+
|
|
1606
|
+
if (!hmrVersionId || !BUILD.hotModuleReplacement) {
|
|
1607
|
+
const processMod = importedModule => {
|
|
1608
|
+
cmpModules.set(bundleId, importedModule);
|
|
1609
|
+
return importedModule[exportName];
|
|
1610
|
+
}
|
|
1611
|
+
switch(bundleId) {
|
|
1612
|
+
|
|
1613
|
+
case 'mds-input':
|
|
1614
|
+
return import(
|
|
1615
|
+
/* webpackMode: "lazy" */
|
|
1616
|
+
'./mds-input.entry.js').then(processMod, consoleError);
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1524
1619
|
return import(
|
|
1525
1620
|
/* @vite-ignore */
|
|
1526
1621
|
/* webpackInclude: /\.entry\.js$/ */
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-0c539bb1.js';
|
|
2
|
+
export { s as setNonce } from './index-0c539bb1.js';
|
|
3
3
|
|
|
4
4
|
const defineCustomElements = (win, options) => {
|
|
5
5
|
if (typeof window === 'undefined') return undefined;
|
|
6
|
-
return bootstrapLazy([["mds-input",[[1,"mds-input",{"autocomplete":[1],"autofocus":[4],"datalist":[16],"disabled":[4],"icon":[1],"max":[2],"maxlength":[2],"min":[1],"minlength":[2],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"variant":[513],"tip":[1],"step":[1],"type":[1],"value":[8],"hasFocus":[32],"setFocus":[64],"getInputElement":[64]}]]]], options);
|
|
6
|
+
return bootstrapLazy([["mds-input",[[1,"mds-input",{"autocomplete":[1],"autofocus":[4],"datalist":[16],"disabled":[4],"icon":[1],"max":[2],"maxlength":[2],"min":[1],"minlength":[2],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"variant":[513],"tip":[1],"step":[1],"type":[1],"value":[8],"hasFocus":[32],"setFocus":[64],"getInputElement":[64]},null,{"value":["valueChanged"]}]]]], options);
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export { defineCustomElements };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-0c539bb1.js';
|
|
2
2
|
|
|
3
3
|
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
4
4
|
|
|
5
|
-
const mdsInputCss = "*,::before,::after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::-webkit-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::-ms-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}@tailwind utilities; :host{--mds-input-background:rgb(var(--tone-neutral));--mds-input-icon-color:var(--mds-input-variant-color);--mds-input-tip-background:84, 84, 84;--mds-input-ring:0 0 0 1px
|
|
5
|
+
const mdsInputCss = "*,::before,::after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::-webkit-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::-ms-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}@tailwind utilities; :host{--mds-input-background:rgb(var(--tone-neutral));--mds-input-icon-color:var(--mds-input-variant-color);--mds-input-tip-background:84, 84, 84;--mds-input-ring:0 0 0 1px rgb(var(--mds-input-variant-color) 0.1);--mds-input-shadow:0 1px 3px 0 rgb(var(--mds-input-variant-color) 0.1), 0 1px 2px 0 rgb(var(--mds-input-variant-color) 0.06);--mds-input-variant-color:0, 0, 0;font-family:Karla, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:16px;line-height:1.5rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:-ms-flexbox;display:flex;position:relative}.input{font-family:Karla, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:16px;line-height:1.5rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0px;min-height:3rem;width:100%;text-overflow:ellipsis;border-radius:0.5rem;padding-left:1rem;padding-right:1rem;padding-top:0.75rem;padding-bottom:0.75rem;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);background-color:var(--mds-input-background);border:0;border-color:transparent;-webkit-box-shadow:var(--mds-input-ring), var(--mds-input-shadow);box-shadow:var(--mds-input-ring), var(--mds-input-shadow);-webkit-box-sizing:border-box;box-sizing:border-box;color:rgb(var(--tone-neutral-02));overflow:hidden}textarea.input:active{-webkit-transition-property:none;transition-property:none}textarea.input{max-height:16rem;min-height:6rem;border-bottom-right-radius:0px}.input:focus{outline:2px solid transparent;outline-offset:2px;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);--mds-input-ring:0 0 0 3px rgb(var(--mds-input-variant-color) 1);--mds-input-shadow:0 4px 6px -1px rgb(var(--mds-input-variant-color) 0.1), 0 2px 4px -1px rgb(var(--mds-input-variant-color) 0.06)}.input:disabled{background-color:rgb(var(--tone-neutral-10))}.input:disabled::-moz-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled::-webkit-input-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled:-ms-input-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled::-ms-input-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled,.input:disabled::placeholder{color:rgb(var(--tone-neutral-05))}.input.has-icon{padding-left:2.75rem}.tip{right:0.25rem;height:0.75rem;border-radius:9999px;padding-left:0.5rem;padding-right:0.5rem;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);background-color:rgb(var(--mds-input-tip-background));color:rgb(var(--tone-neutral));-ms-flex-pack:center;justify-content:center;line-height:0.75rem;pointer-events:none;position:absolute;text-align:center}.tip-variant{--mds-input-tip-background:var(--mds-input-icon-color)}.read-only{background-color:rgb(var(--status-info-05));color:rgb(var(--tone-neutral))}.required{width:0.75rem;padding:0px;background-color:rgb(var(--status-error-05));color:transparent}.disabled{background-color:rgb(var(--tone-neutral-05))}.input:focus+.required{width:6rem;color:rgb(var(--tone-neutral))}.icon{left:0.75rem;top:0.75rem;fill:rgb(var(--mds-input-icon-color));position:absolute}.fixed{position:fixed}.absolute{position:absolute}.bottom-1{bottom:0.25rem}.top-1{top:0.25rem}.flex{display:-ms-flexbox;display:flex}.w-min{width:-moz-min-content;width:-webkit-min-content;width:min-content}.flex-col{-ms-flex-direction:column;flex-direction:column}.gap-y-2{row-gap:0.5rem}.border{border-width:1px}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{--mds-input-icon-color:10, 80, 212;--mds-input-variant-color:0, 0, 0}:host(:focus){--mds-input-variant-color:31, 101, 232;}:host([variant=\"info\"]){--mds-input-icon-color:25, 143, 182;--mds-input-variant-color:0, 0, 0}:host([variant=\"info\"]:focus){--mds-input-icon-color:21, 119, 151;--mds-input-variant-color:25, 143, 182;}:host([variant=\"success\"]){--mds-input-icon-color:26, 151, 91;--mds-input-variant-color:0, 0, 0}:host([variant=\"success\"]:focus){--mds-input-icon-color:22, 125, 76;--mds-input-variant-color:26, 151, 91;}:host([variant=\"warning\"]){--mds-input-icon-color:168, 126, 0;--mds-input-variant-color:0, 0, 0}:host([variant=\"warning\"]:focus){--mds-input-icon-color:139, 104, 0;--mds-input-variant-color:168, 126, 0;}:host([variant=\"error\"]){--mds-input-icon-color:234, 77, 73;--mds-input-variant-color:0, 0, 0}:host([variant=\"error\"]:focus){--mds-input-icon-color:215, 29, 25;--mds-input-variant-color:234, 77, 73;}";
|
|
6
6
|
|
|
7
7
|
const MdsInput = class {
|
|
8
8
|
constructor(hostRef) {
|
package/dist/esm/mds-input.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-0c539bb1.js';
|
|
2
|
+
export { s as setNonce } from './index-0c539bb1.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Patch Browser v4.
|
|
5
|
+
Stencil Client Patch Browser v4.5.0 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
const patchBrowser = () => {
|
|
8
8
|
const importMeta = import.meta.url;
|
|
@@ -14,5 +14,5 @@ const patchBrowser = () => {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
patchBrowser().then(options => {
|
|
17
|
-
return bootstrapLazy([["mds-input",[[1,"mds-input",{"autocomplete":[1],"autofocus":[4],"datalist":[16],"disabled":[4],"icon":[1],"max":[2],"maxlength":[2],"min":[1],"minlength":[2],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"variant":[513],"tip":[1],"step":[1],"type":[1],"value":[8],"hasFocus":[32],"setFocus":[64],"getInputElement":[64]}]]]], options);
|
|
17
|
+
return bootstrapLazy([["mds-input",[[1,"mds-input",{"autocomplete":[1],"autofocus":[4],"datalist":[16],"disabled":[4],"icon":[1],"max":[2],"maxlength":[2],"min":[1],"minlength":[2],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"variant":[513],"tip":[1],"step":[1],"type":[1],"value":[8],"hasFocus":[32],"setFocus":[64],"getInputElement":[64]},null,{"value":["valueChanged"]}]]]], options);
|
|
18
18
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __extends=this&&this.__extends||function(){var e=function(n,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r))e[r]=n[r]};return e(n,r)};return function(n,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(n,r);function t(){this.constructor=n}n.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();var __awaiter=this&&this.__awaiter||function(e,n,r,t){function i(e){return e instanceof r?e:new r((function(n){n(e)}))}return new(r||(r=Promise))((function(r,a){function o(e){try{f(t.next(e))}catch(e){a(e)}}function u(e){try{f(t["throw"](e))}catch(e){a(e)}}function f(e){e.done?r(e.value):i(e.value).then(o,u)}f((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},t,i,a,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(e){return function(n){return f([e,n])}}function f(u){if(t)throw new TypeError("Generator is already executing.");while(o&&(o=0,u[0]&&(r=0)),r)try{if(t=1,i&&(a=u[0]&2?i["return"]:u[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;if(i=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:r.label++;return{value:u[1],done:false};case 5:r.label++;i=u[1];u=[0];continue;case 7:u=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1];a=u;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(u);break}if(a[2])r.ops.pop();r.trys.pop();continue}u=n.call(e,r)}catch(e){u=[6,e];i=0}finally{t=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,n,r){if(r||arguments.length===2)for(var t=0,i=n.length,a;t<i;t++){if(a||!(t in n)){if(!a)a=Array.prototype.slice.call(n,0,t);a[t]=n[t]}}return e.concat(a||Array.prototype.slice.call(n))};var NAMESPACE="mds-input";var scopeId;var hostTagName;var isSvgMode=false;var queuePending=false;var createTime=function(e,n){if(n===void 0){n=""}{return function(){return}}};var uniqueTime=function(e,n){{return function(){return}}};var HYDRATED_CSS="{visibility:hidden}[hydrated]{visibility:inherit}";var EMPTY_OBJ={};var isDef=function(e){return e!=null};var isComplexType=function(e){e=typeof e;return e==="object"||e==="function"};function queryNonceMetaTagContent(e){var n,r,t;return(t=(r=(n=e.head)===null||n===void 0?void 0:n.querySelector('meta[name="csp-nonce"]'))===null||r===void 0?void 0:r.getAttribute("content"))!==null&&t!==void 0?t:undefined}var h=function(e,n){var r=[];for(var t=2;t<arguments.length;t++){r[t-2]=arguments[t]}var i=null;var a=false;var o=false;var u=[];var f=function(n){for(var r=0;r<n.length;r++){i=n[r];if(Array.isArray(i)){f(i)}else if(i!=null&&typeof i!=="boolean"){if(a=typeof e!=="function"&&!isComplexType(i)){i=String(i)}if(a&&o){u[u.length-1].t+=i}else{u.push(a?newVNode(null,i):i)}o=a}}};f(r);if(n){{var s=n.className||n.class;if(s){n.class=typeof s!=="object"?s:Object.keys(s).filter((function(e){return s[e]})).join(" ")}}}var l=newVNode(e,null);l.i=n;if(u.length>0){l.o=u}return l};var newVNode=function(e,n){var r={u:0,l:e,t:n,v:null,o:null};{r.i=null}return r};var Host={};var isHost=function(e){return e&&e.l===Host};var parsePropertyValue=function(e,n){if(e!=null&&!isComplexType(e)){if(n&4){return e==="false"?false:e===""||!!e}if(n&2){return parseFloat(e)}if(n&1){return String(e)}return e}return e};var getElement=function(e){return getHostRef(e).$hostElement$};var createEvent=function(e,n,r){var t=getElement(e);return{emit:function(e){return emitEvent(t,n,{bubbles:!!(r&4),composed:!!(r&2),cancelable:!!(r&1),detail:e})}}};var emitEvent=function(e,n,r){var t=plt.ce(n,r);e.dispatchEvent(t);return t};var rootAppliedStyles=new WeakMap;var registerStyle=function(e,n,r){var t=styles.get(e);if(supportsConstructableStylesheets&&r){t=t||new CSSStyleSheet;if(typeof t==="string"){t=n}else{t.replaceSync(n)}}else{t=n}styles.set(e,t)};var addStyle=function(e,n,r){var t;var i=getScopeId(n);var a=styles.get(i);e=e.nodeType===11?e:doc;if(a){if(typeof a==="string"){e=e.head||e;var o=rootAppliedStyles.get(e);var u=void 0;if(!o){rootAppliedStyles.set(e,o=new Set)}if(!o.has(i)){{u=doc.createElement("style");u.innerHTML=a;var f=(t=plt.p)!==null&&t!==void 0?t:queryNonceMetaTagContent(doc);if(f!=null){u.setAttribute("nonce",f)}e.insertBefore(u,e.querySelector("link"))}if(o){o.add(i)}}}else if(!e.adoptedStyleSheets.includes(a)){e.adoptedStyleSheets=__spreadArray(__spreadArray([],e.adoptedStyleSheets,true),[a],false)}}return i};var attachStyles=function(e){var n=e.m;var r=e.$hostElement$;var t=n.u;var i=createTime("attachStyles",n.h);var a=addStyle(r.shadowRoot?r.shadowRoot:r.getRootNode(),n);if(t&10){r["s-sc"]=a;r.classList.add(a+"-h")}i()};var getScopeId=function(e,n){return"sc-"+e.h};var setAccessor=function(e,n,r,t,i,a){if(r!==t){var o=isMemberInElement(e,n);var u=n.toLowerCase();if(n==="class"){var f=e.classList;var s=parseClassList(r);var l=parseClassList(t);f.remove.apply(f,s.filter((function(e){return e&&!l.includes(e)})));f.add.apply(f,l.filter((function(e){return e&&!s.includes(e)})))}else if(n==="ref"){if(t){t(e)}}else if(!o&&n[0]==="o"&&n[1]==="n"){if(n[2]==="-"){n=n.slice(3)}else if(isMemberInElement(win,u)){n=u.slice(2)}else{n=u[2]+n.slice(3)}if(r){plt.rel(e,n,r,false)}if(t){plt.ael(e,n,t,false)}}else{var c=isComplexType(t);if((o||c&&t!==null)&&!i){try{if(!e.tagName.includes("-")){var v=t==null?"":t;if(n==="list"){o=false}else if(r==null||e[n]!=v){e[n]=v}}else{e[n]=t}}catch(e){}}if(t==null||t===false){if(t!==false||e.getAttribute(n)===""){{e.removeAttribute(n)}}}else if((!o||a&4||i)&&!c){t=t===true?"":t;{e.setAttribute(n,t)}}}}};var parseClassListRegex=/\s/;var parseClassList=function(e){return!e?[]:e.split(parseClassListRegex)};var updateElement=function(e,n,r,t){var i=n.v.nodeType===11&&n.v.host?n.v.host:n.v;var a=e&&e.i||EMPTY_OBJ;var o=n.i||EMPTY_OBJ;{for(t in a){if(!(t in o)){setAccessor(i,t,a[t],undefined,r,n.u)}}}for(t in o){setAccessor(i,t,a[t],o[t],r,n.u)}};var createElm=function(e,n,r,t){var i=n.o[r];var a=0;var o;var u;if(i.t!==null){o=i.v=doc.createTextNode(i.t)}else{o=i.v=doc.createElement(i.l);{updateElement(null,i,isSvgMode)}if(isDef(scopeId)&&o["s-si"]!==scopeId){o.classList.add(o["s-si"]=scopeId)}if(i.o){for(a=0;a<i.o.length;++a){u=createElm(e,i,a);if(u){o.appendChild(u)}}}}return o};var addVnodes=function(e,n,r,t,i,a){var o=e;var u;if(o.shadowRoot&&o.tagName===hostTagName){o=o.shadowRoot}for(;i<=a;++i){if(t[i]){u=createElm(null,r,i);if(u){t[i].v=u;o.insertBefore(u,n)}}}};var removeVnodes=function(e,n,r){for(var t=n;t<=r;++t){var i=e[t];if(i){var a=i.v;nullifyVNodeRefs(i);if(a){a.remove()}}}};var updateChildren=function(e,n,r,t){var i=0;var a=0;var o=n.length-1;var u=n[0];var f=n[o];var s=t.length-1;var l=t[0];var c=t[s];var v;while(i<=o&&a<=s){if(u==null){u=n[++i]}else if(f==null){f=n[--o]}else if(l==null){l=t[++a]}else if(c==null){c=t[--s]}else if(isSameVnode(u,l)){patch(u,l);u=n[++i];l=t[++a]}else if(isSameVnode(f,c)){patch(f,c);f=n[--o];c=t[--s]}else if(isSameVnode(u,c)){patch(u,c);e.insertBefore(u.v,f.v.nextSibling);u=n[++i];c=t[--s]}else if(isSameVnode(f,l)){patch(f,l);e.insertBefore(f.v,u.v);f=n[--o];l=t[++a]}else{{v=createElm(n&&n[a],r,a);l=t[++a]}if(v){{u.v.parentNode.insertBefore(v,u.v)}}}}if(i>o){addVnodes(e,t[s+1]==null?null:t[s+1].v,r,t,a,s)}else if(a>s){removeVnodes(n,i,o)}};var isSameVnode=function(e,n){if(e.l===n.l){return true}return false};var patch=function(e,n){var r=n.v=e.v;var t=e.o;var i=n.o;var a=n.t;if(a===null){{{updateElement(e,n,isSvgMode)}}if(t!==null&&i!==null){updateChildren(r,t,n,i)}else if(i!==null){if(e.t!==null){r.textContent=""}addVnodes(r,null,n,i,0,i.length-1)}else if(t!==null){removeVnodes(t,0,t.length-1)}}else if(e.t!==a){r.data=a}};var nullifyVNodeRefs=function(e){{e.i&&e.i.ref&&e.i.ref(null);e.o&&e.o.map(nullifyVNodeRefs)}};var renderVdom=function(e,n,r){if(r===void 0){r=false}var t=e.$hostElement$;var i=e.m;var a=e.S||newVNode(null,null);var o=isHost(n)?n:h(null,null,n);hostTagName=t.tagName;if(i.C){o.i=o.i||{};i.C.map((function(e){var n=e[0],r=e[1];return o.i[r]=t[n]}))}if(r&&o.i){for(var u=0,f=Object.keys(o.i);u<f.length;u++){var s=f[u];if(t.hasAttribute(s)&&!["key","ref","style","class"].includes(s)){o.i[s]=t[s]}}}o.l=null;o.u|=4;e.S=o;o.v=a.v=t.shadowRoot||t;{scopeId=t["s-sc"]}patch(a,o)};var attachToAncestor=function(e,n){if(n&&!e.T&&n["s-p"]){n["s-p"].push(new Promise((function(n){return e.T=n})))}};var scheduleUpdate=function(e,n){{e.u|=16}if(e.u&4){e.u|=512;return}attachToAncestor(e,e._);var r=function(){return dispatchHooks(e,n)};return writeTask(r)};var dispatchHooks=function(e,n){var r=createTime("scheduleUpdate",e.m.h);var t=e.$;var i;if(n){{i=safeCall(t,"componentWillLoad")}}r();return enqueue(i,(function(){return updateComponent(e,t,n)}))};var enqueue=function(e,n){return isPromisey(e)?e.then(n):n()};var isPromisey=function(e){return e instanceof Promise||e&&e.then&&typeof e.then==="function"};var updateComponent=function(e,n,r){return __awaiter(void 0,void 0,void 0,(function(){var t,i,a,o,u,f,s;return __generator(this,(function(l){i=e.$hostElement$;a=createTime("update",e.m.h);o=i["s-rc"];if(r){attachStyles(e)}u=createTime("render",e.m.h);{callRender(e,n,i,r)}if(o){o.map((function(e){return e()}));i["s-rc"]=undefined}u();a();{f=(t=i["s-p"])!==null&&t!==void 0?t:[];s=function(){return postUpdateComponent(e)};if(f.length===0){s()}else{Promise.all(f).then(s);e.u|=4;f.length=0}}return[2]}))}))};var callRender=function(e,n,r,t){try{n=n.render();{e.u&=~16}{e.u|=2}{{{renderVdom(e,n,t)}}}}catch(n){consoleError(n,e.$hostElement$)}return null};var postUpdateComponent=function(e){var n=e.m.h;var r=e.$hostElement$;var t=createTime("postUpdate",n);var i=e._;if(!(e.u&64)){e.u|=64;{addHydratedFlag(r)}t();{e.R(r);if(!i){appDidLoad()}}}else{t()}{e.M(r)}{if(e.T){e.T();e.T=undefined}if(e.u&512){nextTick((function(){return scheduleUpdate(e,false)}))}e.u&=~(4|512)}};var appDidLoad=function(e){{addHydratedFlag(doc.documentElement)}nextTick((function(){return emitEvent(win,"appload",{detail:{namespace:NAMESPACE}})}))};var safeCall=function(e,n,r){if(e&&e[n]){try{return e[n](r)}catch(e){consoleError(e)}}return undefined};var addHydratedFlag=function(e){return e.setAttribute("hydrated","")};var getValue=function(e,n){return getHostRef(e).V.get(n)};var setValue=function(e,n,r,t){var i=getHostRef(e);var a=i.$hostElement$;var o=i.V.get(n);var u=i.u;var f=i.$;r=parsePropertyValue(r,t.k[n][0]);var s=Number.isNaN(o)&&Number.isNaN(r);var l=r!==o&&!s;if((!(u&8)||o===undefined)&&l){i.V.set(n,r);if(f){if(t.A&&u&128){var c=t.A[n];if(c){c.map((function(e){try{f[e](r,o,n)}catch(e){consoleError(e,a)}}))}}if((u&(2|16))===2){scheduleUpdate(i,false)}}}};var proxyComponent=function(e,n,r){var t;if(n.k){if(e.watchers){n.A=e.watchers}var i=Object.entries(n.k);var a=e.prototype;i.map((function(e){var t=e[0],i=e[1][0];if(i&31||r&2&&i&32){Object.defineProperty(a,t,{get:function(){return getValue(this,t)},set:function(e){setValue(this,t,e,n)},configurable:true,enumerable:true})}else if(r&1&&i&64){Object.defineProperty(a,t,{value:function(){var e=[];for(var n=0;n<arguments.length;n++){e[n]=arguments[n]}var r=getHostRef(this);return r.H.then((function(){var n;return(n=r.$)[t].apply(n,e)}))}})}}));if(r&1){var o=new Map;a.attributeChangedCallback=function(e,r,t){var i=this;plt.jmp((function(){var u=o.get(e);if(i.hasOwnProperty(u)){t=i[u];delete i[u]}else if(a.hasOwnProperty(u)&&typeof i[u]==="number"&&i[u]==t){return}else if(u==null){var f=getHostRef(i);var s=f===null||f===void 0?void 0:f.u;if(!(s&8)&&s&128&&t!==r){var l=f.$;var c=n.A[e];c===null||c===void 0?void 0:c.forEach((function(n){if(l[n]!=null){l[n].call(l,t,r,e)}}))}return}i[u]=t===null&&typeof i[u]==="boolean"?false:t}))};e.observedAttributes=Array.from(new Set(__spreadArray(__spreadArray([],Object.keys((t=n.A)!==null&&t!==void 0?t:{}),true),i.filter((function(e){var n=e[0],r=e[1];return r[0]&15})).map((function(e){var r=e[0],t=e[1];var i=t[1]||r;o.set(i,r);if(t[0]&512){n.C.push([r,i])}return i})),true)))}}return e};var initializeComponent=function(e,n,r,t){return __awaiter(void 0,void 0,void 0,(function(){var e,t,i,a,o,u,f,s;return __generator(this,(function(l){switch(l.label){case 0:if(!((n.u&32)===0))return[3,3];n.u|=32;e=loadModule(r);if(!e.then)return[3,2];t=uniqueTime();return[4,e];case 1:e=l.sent();t();l.label=2;case 2:if(!e.isProxied){{r.A=e.watchers}proxyComponent(e,r,2);e.isProxied=true}i=createTime("createInstance",r.h);{n.u|=8}try{new e(n)}catch(e){consoleError(e)}{n.u&=~8}{n.u|=128}i();if(e.style){a=e.style;o=getScopeId(r);if(!styles.has(o)){u=createTime("registerStyles",r.h);registerStyle(o,a,!!(r.u&1));u()}}l.label=3;case 3:f=n._;s=function(){return scheduleUpdate(n,true)};if(f&&f["s-rc"]){f["s-rc"].push(s)}else{s()}return[2]}}))}))};var fireConnectedCallback=function(e){};var connectedCallback=function(e){if((plt.u&1)===0){var n=getHostRef(e);var r=n.m;var t=createTime("connectedCallback",r.h);if(!(n.u&1)){n.u|=1;{var i=e;while(i=i.parentNode||i.host){if(i["s-p"]){attachToAncestor(n,n._=i);break}}}if(r.k){Object.entries(r.k).map((function(n){var r=n[0],t=n[1][0];if(t&31&&e.hasOwnProperty(r)){var i=e[r];delete e[r];e[r]=i}}))}{initializeComponent(e,n,r)}}else{if(n===null||n===void 0?void 0:n.$);else if(n===null||n===void 0?void 0:n.q){n.q.then((function(){return fireConnectedCallback()}))}}t()}};var disconnectInstance=function(e){};var disconnectedCallback=function(e){return __awaiter(void 0,void 0,void 0,(function(){var n;return __generator(this,(function(r){if((plt.u&1)===0){n=getHostRef(e);if(n===null||n===void 0?void 0:n.$);else if(n===null||n===void 0?void 0:n.q){n.q.then((function(){return disconnectInstance()}))}}return[2]}))}))};var bootstrapLazy=function(e,n){if(n===void 0){n={}}var r;var t=createTime();var i=[];var a=n.exclude||[];var o=win.customElements;var u=doc.head;var f=u.querySelector("meta[charset]");var s=doc.createElement("style");var l=[];var c;var v=true;Object.assign(plt,n);plt.N=new URL(n.resourcesUrl||"./",doc.baseURI).href;e.map((function(e){e[1].map((function(n){var r;var t={u:n[0],h:n[1],k:n[2],P:n[3]};{t.k=n[2]}{t.C=[]}{t.A=(r=n[4])!==null&&r!==void 0?r:{}}var u=t.h;var f=function(e){__extends(n,e);function n(n){var r=e.call(this,n)||this;n=r;registerHost(n,t);if(t.u&1){{{n.attachShadow({mode:"open"})}}}return r}n.prototype.connectedCallback=function(){var e=this;if(c){clearTimeout(c);c=null}if(v){l.push(this)}else{plt.jmp((function(){return connectedCallback(e)}))}};n.prototype.disconnectedCallback=function(){var e=this;plt.jmp((function(){return disconnectedCallback(e)}))};n.prototype.componentOnReady=function(){return getHostRef(this).q};return n}(HTMLElement);t.I=e[0];if(!a.includes(u)&&!o.get(u)){i.push(u);o.define(u,proxyComponent(f,t,1))}}))}));{s.innerHTML=i+HYDRATED_CSS;s.setAttribute("data-styles","");var d=(r=plt.p)!==null&&r!==void 0?r:queryNonceMetaTagContent(doc);if(d!=null){s.setAttribute("nonce",d)}u.insertBefore(s,f?f.nextSibling:u.firstChild)}v=false;if(l.length){l.map((function(e){return e.connectedCallback()}))}else{{plt.jmp((function(){return c=setTimeout(appDidLoad,30)}))}}t()};var setNonce=function(e){return plt.p=e};var hostRefs=new WeakMap;var getHostRef=function(e){return hostRefs.get(e)};var registerInstance=function(e,n){return hostRefs.set(n.$=e,n)};var registerHost=function(e,n){var r={u:0,$hostElement$:e,m:n,V:new Map};{r.H=new Promise((function(e){return r.M=e}))}{r.q=new Promise((function(e){return r.R=e}));e["s-p"]=[];e["s-rc"]=[]}return hostRefs.set(e,r)};var isMemberInElement=function(e,n){return n in e};var consoleError=function(e,n){return(0,console.error)(e,n)};var cmpModules=new Map;var loadModule=function(e,n,r){var t=e.h.replace(/-/g,"_");var i=e.I;var a=cmpModules.get(i);if(a){return a[t]}if(!r||!BUILD.hotModuleReplacement){var o=function(e){cmpModules.set(i,e);return e[t]};switch(i){case"mds-input":return import("./mds-input.entry.js").then(o,consoleError)}}return import("./".concat(i,".entry.js").concat("")).then((function(e){{cmpModules.set(i,e)}return e[t]}),consoleError)};var styles=new Map;var win=typeof window!=="undefined"?window:{};var doc=win.document||{head:{}};var plt={u:0,N:"",jmp:function(e){return e()},raf:function(e){return requestAnimationFrame(e)},ael:function(e,n,r,t){return e.addEventListener(n,r,t)},rel:function(e,n,r,t){return e.removeEventListener(n,r,t)},ce:function(e,n){return new CustomEvent(e,n)}};var promiseResolve=function(e){return Promise.resolve(e)};var supportsConstructableStylesheets=function(){try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(e){}return false}();var queueDomReads=[];var queueDomWrites=[];var queueTask=function(e,n){return function(r){e.push(r);if(!queuePending){queuePending=true;if(n&&plt.u&4){nextTick(flush)}else{plt.raf(flush)}}}};var consume=function(e){for(var n=0;n<e.length;n++){try{e[n](performance.now())}catch(e){consoleError(e)}}e.length=0};var flush=function(){consume(queueDomReads);{consume(queueDomWrites);if(queuePending=queueDomReads.length>0){plt.raf(flush)}}};var nextTick=function(e){return promiseResolve().then(e)};var writeTask=queueTask(queueDomWrites,true);export{Host as H,bootstrapLazy as b,createEvent as c,getElement as g,h,promiseResolve as p,registerInstance as r,setNonce as s};
|
package/dist/esm-es5/loader.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as bootstrapLazy}from"./index-
|
|
1
|
+
import{b as bootstrapLazy}from"./index-0c539bb1.js";export{s as setNonce}from"./index-0c539bb1.js";var defineCustomElements=function(e,t){if(typeof window==="undefined")return undefined;return bootstrapLazy([["mds-input",[[1,"mds-input",{autocomplete:[1],autofocus:[4],datalist:[16],disabled:[4],icon:[1],max:[2],maxlength:[2],min:[1],minlength:[2],name:[1],pattern:[1],placeholder:[1],readonly:[4],required:[4],variant:[513],tip:[1],step:[1],type:[1],value:[8],hasFocus:[32],setFocus:[64],getInputElement:[64]},null,{value:["valueChanged"]}]]]],t)};export{defineCustomElements};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,i,o,r){function n(t){return t instanceof o?t:new o((function(i){i(t)}))}return new(o||(o=Promise))((function(o,e){function a(t){try{c(r.next(t))}catch(t){e(t)}}function s(t){try{c(r["throw"](t))}catch(t){e(t)}}function c(t){t.done?o(t.value):n(t.value).then(a,s)}c((r=r.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var o={label:0,sent:function(){if(e[0]&1)throw e[1];return e[1]},trys:[],ops:[]},r,n,e,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(i){return c([t,i])}}function c(s){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(o=0)),o)try{if(r=1,n&&(e=s[0]&2?n["return"]:s[0]?n["throw"]||((e=n["return"])&&e.call(n),0):n.next)&&!(e=e.call(n,s[1])).done)return e;if(n=0,e)s=[s[0]&2,e.value];switch(s[0]){case 0:case 1:e=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;n=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(e=o.trys,e=e.length>0&&e[e.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!e||s[1]>e[0]&&s[1]<e[3])){o.label=s[1];break}if(s[0]===6&&o.label<e[1]){o.label=e[1];e=s;break}if(e&&o.label<e[2]){o.label=e[2];o.ops.push(s);break}if(e[2])o.ops.pop();o.trys.pop();continue}s=i.call(t,o)}catch(t){s=[6,t];n=0}finally{r=e=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-e22ac7e3.js";function r(t){var i,o,n="";if("string"==typeof t||"number"==typeof t)n+=t;else if("object"==typeof t)if(Array.isArray(t))for(i=0;i<t.length;i++)t[i]&&(o=r(t[i]))&&(n&&(n+=" "),n+=o);else for(i in t)t[i]&&(n&&(n+=" "),n+=i);return n}function clsx(){for(var t,i,o=0,n="";o<arguments.length;)(t=arguments[o++])&&(i=r(t))&&(n&&(n+=" "),n+=i);return n}var mdsInputCss='*,::before,::after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::-webkit-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::-ms-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}@tailwind utilities; :host{--mds-input-background:rgb(var(--tone-neutral));--mds-input-icon-color:var(--mds-input-variant-color);--mds-input-tip-background:84, 84, 84;--mds-input-ring:0 0 0 1px rgba(var(--mds-input-variant-color), 0.1);--mds-input-shadow:0 1px 3px 0 rgba(var(--mds-input-variant-color), 0.1), 0 1px 2px 0 rgba(var(--mds-input-variant-color), 0.06);--mds-input-variant-color:0, 0, 0;font-family:Karla, -apple-system, BlinkMacSystemFont, \'San Francisco\', \'Segoe UI\', \'Helvetica Neue\', sans-serif;font-size:16px;line-height:1.5rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:relative;display:-ms-flexbox;display:flex}.input{font-family:Karla, -apple-system, BlinkMacSystemFont, \'San Francisco\', \'Segoe UI\', \'Helvetica Neue\', sans-serif;font-size:16px;line-height:1.5rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0px;-webkit-box-sizing:border-box;box-sizing:border-box;min-height:3rem;width:100%;overflow:hidden;text-overflow:ellipsis;border-radius:0.5rem;border-style:none;border-color:transparent;padding-left:1rem;padding-right:1rem;padding-top:0.75rem;padding-bottom:0.75rem;--tw-text-opacity:1;color:rgba(var(--tone-neutral-02), var(--tw-text-opacity));-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);background-color:var(--mds-input-background);-webkit-box-shadow:var(--mds-input-ring), var(--mds-input-shadow);box-shadow:var(--mds-input-ring), var(--mds-input-shadow)}textarea.input:active{-webkit-transition-property:none;transition-property:none}textarea.input{max-height:16rem;min-height:6rem;border-bottom-right-radius:0px}.input:focus{outline:2px solid transparent;outline-offset:2px;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);--mds-input-ring:0 0 0 3px rgba(var(--mds-input-variant-color), 1);--mds-input-shadow:0 4px 6px -1px rgba(var(--mds-input-variant-color), 0.1), 0 2px 4px -1px rgba(var(--mds-input-variant-color), 0.06)}.input:disabled{--tw-bg-opacity:1;background-color:rgba(var(--tone-neutral-10), var(--tw-bg-opacity))}.input:disabled::-moz-placeholder{--tw-text-opacity:1;color:rgba(var(--tone-neutral-05), var(--tw-text-opacity))}.input:disabled::-webkit-input-placeholder{--tw-text-opacity:1;color:rgba(var(--tone-neutral-05), var(--tw-text-opacity))}.input:disabled:-ms-input-placeholder{--tw-text-opacity:1;color:rgba(var(--tone-neutral-05), var(--tw-text-opacity))}.input:disabled::-ms-input-placeholder{--tw-text-opacity:1;color:rgba(var(--tone-neutral-05), var(--tw-text-opacity))}.input:disabled,.input:disabled::placeholder{--tw-text-opacity:1;color:rgba(var(--tone-neutral-05), var(--tw-text-opacity))}.input.has-icon{padding-left:2.75rem}.tip{pointer-events:none;position:absolute;right:0.25rem;height:0.75rem;-ms-flex-pack:center;justify-content:center;border-radius:9999px;padding-left:0.5rem;padding-right:0.5rem;text-align:center;--tw-text-opacity:1;color:rgba(var(--tone-neutral), var(--tw-text-opacity));-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);line-height:0.75rem;background-color:rgb(var(--mds-input-tip-background))}.tip-variant{--mds-input-tip-background:var(--mds-input-icon-color)}.read-only{--tw-bg-opacity:1;background-color:rgba(var(--status-info-05), var(--tw-bg-opacity));--tw-text-opacity:1;color:rgba(var(--status-info-09), var(--tw-text-opacity))}.required{width:0.75rem;--tw-bg-opacity:1;background-color:rgba(var(--status-error-05), var(--tw-bg-opacity));padding:0px;color:rgba(var(--tone-neutral), var(--tw-text-opacity));--tw-text-opacity:0}.disabled{--tw-bg-opacity:1;background-color:rgba(var(--tone-neutral-05), var(--tw-bg-opacity))}.input:focus+.required{width:6rem;--tw-text-opacity:1}.icon{position:absolute;left:0.75rem;top:0.75rem;fill:rgb(var(--mds-input-icon-color))}.fixed{position:fixed}.absolute{position:absolute}.bottom-1{bottom:0.25rem}.top-1{top:0.25rem}.flex{display:-ms-flexbox;display:flex}.w-min{width:-moz-min-content;width:-webkit-min-content;width:min-content}.flex-col{-ms-flex-direction:column;flex-direction:column}.gap-y-2{row-gap:0.5rem}.border{border-width:1px}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{--mds-input-icon-color:10, 80, 212;--mds-input-variant-color:0, 0, 0}:host(:focus){--mds-input-variant-color:31, 101, 232;}:host([variant="info"]){--mds-input-icon-color:25, 143, 182;--mds-input-variant-color:0, 0, 0}:host([variant="info"]:focus){--mds-input-icon-color:21, 119, 151;--mds-input-variant-color:25, 143, 182;}:host([variant="success"]){--mds-input-icon-color:26, 151, 91;--mds-input-variant-color:0, 0, 0}:host([variant="success"]:focus){--mds-input-icon-color:22, 125, 76;--mds-input-variant-color:26, 151, 91;}:host([variant="warning"]){--mds-input-icon-color:168, 126, 0;--mds-input-variant-color:0, 0, 0}:host([variant="warning"]:focus){--mds-input-icon-color:139, 104, 0;--mds-input-variant-color:168, 126, 0;}:host([variant="error"]){--mds-input-icon-color:234, 77, 73;--mds-input-variant-color:0, 0, 0}:host([variant="error"]:focus){--mds-input-icon-color:215, 29, 25;--mds-input-variant-color:234, 77, 73;}';var MdsInput=function(){function t(t){var i=this;registerInstance(this,t);this.changeEvent=createEvent(this,"mdsInputChange",7);this.keyDownEvent=createEvent(this,"mdsInputKeydown",7);this.blurEvent=createEvent(this,"mdsInputBlur",7);this.focusEvent=createEvent(this,"mdsInputFocus",7);this.onInput=function(t){var o=t.target;if(o){i.value=o.value}i.keyDownEvent.emit(t)};this.onBlur=function(){i.hasFocus=false;i.blurEvent.emit()};this.onFocus=function(t){var o=t.target;i.hasFocus=true;i.focusEvent.emit();if(i.readonly){setTimeout((function(){o.select()}),10)}};this.hasFocus=false;this.autocomplete="off";this.autofocus=false;this.datalist=undefined;this.disabled=false;this.icon=undefined;this.max=undefined;this.maxlength=undefined;this.min=undefined;this.minlength=undefined;this.name=undefined;this.pattern=undefined;this.placeholder="";this.readonly=false;this.required=false;this.variant=undefined;this.tip=undefined;this.step=undefined;this.type="text";this.value=""}t.prototype.componentWillLoad=function(){if(this.el.hasAttribute("tabindex")){var t=this.el.getAttribute("tabindex");this.tabindex=t!==null?parseInt(t):undefined;this.el.removeAttribute("tabindex")}};t.prototype.valueChanged=function(){this.changeEvent.emit({value:this.value})};t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.nativeInput){this.nativeInput.focus()}return[2]}))}))};t.prototype.getInputElement=function(){return Promise.resolve(this.nativeInput)};t.prototype.getValue=function(){var t;return typeof this.value==="number"?this.value.toString():(t=this.value)!==null&&t!==void 0?t:""};t.prototype.render=function(){var t=this;var i=this.getValue();return h(Host,null,this.type==="textarea"?h("textarea",{class:clsx("input",this.icon&&"has-icon"),autoFocus:this.autofocus,disabled:this.disabled,maxLength:this.maxlength,minLength:this.minlength,name:this.name,onBlur:this.onBlur,onFocus:this.onFocus,onInput:this.onInput,placeholder:this.placeholder,readOnly:this.readonly,ref:function(i){return t.nativeInput=i},required:this.required,tabIndex:this.tabindex,value:i}):h("input",{class:clsx("input",this.icon&&"has-icon"),autoComplete:this.autocomplete,autoFocus:this.autofocus,disabled:this.disabled,max:this.max,maxLength:this.maxlength,min:this.min,minLength:this.minlength,name:this.name,onBlur:this.onBlur,onFocus:this.onFocus,onInput:this.onInput,pattern:this.pattern,list:this.datalist&&"datalist",placeholder:this.placeholder,readOnly:this.readonly,ref:function(i){return t.nativeInput=i},required:this.required,step:this.step,tabIndex:this.tabindex,type:this.type,value:i}),this.disabled&&h("mds-text",{typography:"option",class:"tip top-1 disabled"},"Disabilitato"),this.readonly&&!this.disabled&&h("mds-text",{typography:"option",class:"tip top-1 read-only"},"Sola lettura"),this.required&&!this.disabled&&!this.readonly&&h("mds-text",{typography:"option",class:"tip top-1 required"},"Obbligatorio"),this.tip&&h("mds-text",{typography:"option",class:clsx("tip bottom-1",this.variant&&"tip-variant")},this.tip),this.datalist&&h("datalist",{id:"datalist",class:"datalist"},this.datalist.forEach((function(t){h("option",{value:t})}))),this.icon&&h("mds-icon",{class:clsx("icon",this.variant),name:this.icon}))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{value:["valueChanged"]}},enumerable:false,configurable:true});return t}();MdsInput.style=mdsInputCss;export{MdsInput as mds_input};
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,i,o,r){function n(t){return t instanceof o?t:new o((function(i){i(t)}))}return new(o||(o=Promise))((function(o,e){function a(t){try{c(r.next(t))}catch(t){e(t)}}function s(t){try{c(r["throw"](t))}catch(t){e(t)}}function c(t){t.done?o(t.value):n(t.value).then(a,s)}c((r=r.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var o={label:0,sent:function(){if(e[0]&1)throw e[1];return e[1]},trys:[],ops:[]},r,n,e,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(i){return c([t,i])}}function c(s){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(o=0)),o)try{if(r=1,n&&(e=s[0]&2?n["return"]:s[0]?n["throw"]||((e=n["return"])&&e.call(n),0):n.next)&&!(e=e.call(n,s[1])).done)return e;if(n=0,e)s=[s[0]&2,e.value];switch(s[0]){case 0:case 1:e=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;n=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(e=o.trys,e=e.length>0&&e[e.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!e||s[1]>e[0]&&s[1]<e[3])){o.label=s[1];break}if(s[0]===6&&o.label<e[1]){o.label=e[1];e=s;break}if(e&&o.label<e[2]){o.label=e[2];o.ops.push(s);break}if(e[2])o.ops.pop();o.trys.pop();continue}s=i.call(t,o)}catch(t){s=[6,t];n=0}finally{r=e=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-0c539bb1.js";function r(t){var i,o,n="";if("string"==typeof t||"number"==typeof t)n+=t;else if("object"==typeof t)if(Array.isArray(t))for(i=0;i<t.length;i++)t[i]&&(o=r(t[i]))&&(n&&(n+=" "),n+=o);else for(i in t)t[i]&&(n&&(n+=" "),n+=i);return n}function clsx(){for(var t,i,o=0,n="";o<arguments.length;)(t=arguments[o++])&&(i=r(t))&&(n&&(n+=" "),n+=i);return n}var mdsInputCss='*,::before,::after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::-webkit-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::-ms-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}@tailwind utilities; :host{--mds-input-background:rgb(var(--tone-neutral));--mds-input-icon-color:var(--mds-input-variant-color);--mds-input-tip-background:84, 84, 84;--mds-input-ring:0 0 0 1px rgb(var(--mds-input-variant-color) 0.1);--mds-input-shadow:0 1px 3px 0 rgb(var(--mds-input-variant-color) 0.1), 0 1px 2px 0 rgb(var(--mds-input-variant-color) 0.06);--mds-input-variant-color:0, 0, 0;font-family:Karla, -apple-system, BlinkMacSystemFont, \'San Francisco\', \'Segoe UI\', \'Helvetica Neue\', sans-serif;font-size:16px;line-height:1.5rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:-ms-flexbox;display:flex;position:relative}.input{font-family:Karla, -apple-system, BlinkMacSystemFont, \'San Francisco\', \'Segoe UI\', \'Helvetica Neue\', sans-serif;font-size:16px;line-height:1.5rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0px;min-height:3rem;width:100%;text-overflow:ellipsis;border-radius:0.5rem;padding-left:1rem;padding-right:1rem;padding-top:0.75rem;padding-bottom:0.75rem;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);background-color:var(--mds-input-background);border:0;border-color:transparent;-webkit-box-shadow:var(--mds-input-ring), var(--mds-input-shadow);box-shadow:var(--mds-input-ring), var(--mds-input-shadow);-webkit-box-sizing:border-box;box-sizing:border-box;color:rgb(var(--tone-neutral-02));overflow:hidden}textarea.input:active{-webkit-transition-property:none;transition-property:none}textarea.input{max-height:16rem;min-height:6rem;border-bottom-right-radius:0px}.input:focus{outline:2px solid transparent;outline-offset:2px;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);--mds-input-ring:0 0 0 3px rgb(var(--mds-input-variant-color) 1);--mds-input-shadow:0 4px 6px -1px rgb(var(--mds-input-variant-color) 0.1), 0 2px 4px -1px rgb(var(--mds-input-variant-color) 0.06)}.input:disabled{background-color:rgb(var(--tone-neutral-10))}.input:disabled::-moz-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled::-webkit-input-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled:-ms-input-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled::-ms-input-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled,.input:disabled::placeholder{color:rgb(var(--tone-neutral-05))}.input.has-icon{padding-left:2.75rem}.tip{right:0.25rem;height:0.75rem;border-radius:9999px;padding-left:0.5rem;padding-right:0.5rem;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);background-color:rgb(var(--mds-input-tip-background));color:rgb(var(--tone-neutral));-ms-flex-pack:center;justify-content:center;line-height:0.75rem;pointer-events:none;position:absolute;text-align:center}.tip-variant{--mds-input-tip-background:var(--mds-input-icon-color)}.read-only{background-color:rgb(var(--status-info-05));color:rgb(var(--tone-neutral))}.required{width:0.75rem;padding:0px;background-color:rgb(var(--status-error-05));color:transparent}.disabled{background-color:rgb(var(--tone-neutral-05))}.input:focus+.required{width:6rem;color:rgb(var(--tone-neutral))}.icon{left:0.75rem;top:0.75rem;fill:rgb(var(--mds-input-icon-color));position:absolute}.fixed{position:fixed}.absolute{position:absolute}.bottom-1{bottom:0.25rem}.top-1{top:0.25rem}.flex{display:-ms-flexbox;display:flex}.w-min{width:-moz-min-content;width:-webkit-min-content;width:min-content}.flex-col{-ms-flex-direction:column;flex-direction:column}.gap-y-2{row-gap:0.5rem}.border{border-width:1px}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{--mds-input-icon-color:10, 80, 212;--mds-input-variant-color:0, 0, 0}:host(:focus){--mds-input-variant-color:31, 101, 232;}:host([variant="info"]){--mds-input-icon-color:25, 143, 182;--mds-input-variant-color:0, 0, 0}:host([variant="info"]:focus){--mds-input-icon-color:21, 119, 151;--mds-input-variant-color:25, 143, 182;}:host([variant="success"]){--mds-input-icon-color:26, 151, 91;--mds-input-variant-color:0, 0, 0}:host([variant="success"]:focus){--mds-input-icon-color:22, 125, 76;--mds-input-variant-color:26, 151, 91;}:host([variant="warning"]){--mds-input-icon-color:168, 126, 0;--mds-input-variant-color:0, 0, 0}:host([variant="warning"]:focus){--mds-input-icon-color:139, 104, 0;--mds-input-variant-color:168, 126, 0;}:host([variant="error"]){--mds-input-icon-color:234, 77, 73;--mds-input-variant-color:0, 0, 0}:host([variant="error"]:focus){--mds-input-icon-color:215, 29, 25;--mds-input-variant-color:234, 77, 73;}';var MdsInput=function(){function t(t){var i=this;registerInstance(this,t);this.changeEvent=createEvent(this,"mdsInputChange",7);this.keyDownEvent=createEvent(this,"mdsInputKeydown",7);this.blurEvent=createEvent(this,"mdsInputBlur",7);this.focusEvent=createEvent(this,"mdsInputFocus",7);this.onInput=function(t){var o=t.target;if(o){i.value=o.value}i.keyDownEvent.emit(t)};this.onBlur=function(){i.hasFocus=false;i.blurEvent.emit()};this.onFocus=function(t){var o=t.target;i.hasFocus=true;i.focusEvent.emit();if(i.readonly){setTimeout((function(){o.select()}),10)}};this.hasFocus=false;this.autocomplete="off";this.autofocus=false;this.datalist=undefined;this.disabled=false;this.icon=undefined;this.max=undefined;this.maxlength=undefined;this.min=undefined;this.minlength=undefined;this.name=undefined;this.pattern=undefined;this.placeholder="";this.readonly=false;this.required=false;this.variant=undefined;this.tip=undefined;this.step=undefined;this.type="text";this.value=""}t.prototype.componentWillLoad=function(){if(this.el.hasAttribute("tabindex")){var t=this.el.getAttribute("tabindex");this.tabindex=t!==null?parseInt(t):undefined;this.el.removeAttribute("tabindex")}};t.prototype.valueChanged=function(){this.changeEvent.emit({value:this.value})};t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.nativeInput){this.nativeInput.focus()}return[2]}))}))};t.prototype.getInputElement=function(){return Promise.resolve(this.nativeInput)};t.prototype.getValue=function(){var t;return typeof this.value==="number"?this.value.toString():(t=this.value)!==null&&t!==void 0?t:""};t.prototype.render=function(){var t=this;var i=this.getValue();return h(Host,null,this.type==="textarea"?h("textarea",{class:clsx("input",this.icon&&"has-icon"),autoFocus:this.autofocus,disabled:this.disabled,maxLength:this.maxlength,minLength:this.minlength,name:this.name,onBlur:this.onBlur,onFocus:this.onFocus,onInput:this.onInput,placeholder:this.placeholder,readOnly:this.readonly,ref:function(i){return t.nativeInput=i},required:this.required,tabIndex:this.tabindex,value:i}):h("input",{class:clsx("input",this.icon&&"has-icon"),autoComplete:this.autocomplete,autoFocus:this.autofocus,disabled:this.disabled,max:this.max,maxLength:this.maxlength,min:this.min,minLength:this.minlength,name:this.name,onBlur:this.onBlur,onFocus:this.onFocus,onInput:this.onInput,pattern:this.pattern,list:this.datalist&&"datalist",placeholder:this.placeholder,readOnly:this.readonly,ref:function(i){return t.nativeInput=i},required:this.required,step:this.step,tabIndex:this.tabindex,type:this.type,value:i}),this.disabled&&h("mds-text",{typography:"option",class:"tip top-1 disabled"},"Disabilitato"),this.readonly&&!this.disabled&&h("mds-text",{typography:"option",class:"tip top-1 read-only"},"Sola lettura"),this.required&&!this.disabled&&!this.readonly&&h("mds-text",{typography:"option",class:"tip top-1 required"},"Obbligatorio"),this.tip&&h("mds-text",{typography:"option",class:clsx("tip bottom-1",this.variant&&"tip-variant")},this.tip),this.datalist&&h("datalist",{id:"datalist",class:"datalist"},this.datalist.forEach((function(t){h("option",{value:t})}))),this.icon&&h("mds-icon",{class:clsx("icon",this.variant),name:this.icon}))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{value:["valueChanged"]}},enumerable:false,configurable:true});return t}();MdsInput.style=mdsInputCss;export{MdsInput as mds_input};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as promiseResolve,b as bootstrapLazy}from"./index-
|
|
1
|
+
import{p as promiseResolve,b as bootstrapLazy}from"./index-0c539bb1.js";export{s as setNonce}from"./index-0c539bb1.js";var patchBrowser=function(){var e=import.meta.url;var t={};if(e!==""){t.resourcesUrl=new URL(".",e).href}return promiseResolve(t)};patchBrowser().then((function(e){return bootstrapLazy([["mds-input",[[1,"mds-input",{autocomplete:[1],autofocus:[4],datalist:[16],disabled:[4],icon:[1],max:[2],maxlength:[2],min:[1],minlength:[2],name:[1],pattern:[1],placeholder:[1],readonly:[4],required:[4],variant:[513],tip:[1],step:[1],type:[1],value:[8],hasFocus:[32],setFocus:[64],getInputElement:[64]},null,{value:["valueChanged"]}]]]],e)}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-
|
|
1
|
+
import{p as e,b as t}from"./p-a71f012b.js";export{s as setNonce}from"./p-a71f012b.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t([["p-5d146ed2",[[1,"mds-input",{autocomplete:[1],autofocus:[4],datalist:[16],disabled:[4],icon:[1],max:[2],maxlength:[2],min:[1],minlength:[2],name:[1],pattern:[1],placeholder:[1],readonly:[4],required:[4],variant:[513],tip:[1],step:[1],type:[1],value:[8],hasFocus:[32],setFocus:[64],getInputElement:[64]},null,{value:["valueChanged"]}]]]],e)));
|
|
@@ -115,7 +115,7 @@ DOMTokenList
|
|
|
115
115
|
var resourcesUrl = scriptElm ? scriptElm.getAttribute('data-resources-url') || scriptElm.src : '';
|
|
116
116
|
var start = function() {
|
|
117
117
|
// if src is not present then origin is "null", and new URL() throws TypeError: Failed to construct 'URL': Invalid base URL
|
|
118
|
-
var url = new URL('./p-
|
|
118
|
+
var url = new URL('./p-b114c68e.system.js', new URL(resourcesUrl, window.location.origin !== 'null' ? window.location.origin : undefined));
|
|
119
119
|
System.import(url.href);
|
|
120
120
|
};
|
|
121
121
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as o,H as r,g as n}from"./p-a71f012b.js";function s(t){var i,o,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t))for(i=0;i<t.length;i++)t[i]&&(o=s(t[i]))&&(r&&(r+=" "),r+=o);else for(i in t)t[i]&&(r&&(r+=" "),r+=i);return r}function a(){for(var t,i,o=0,r="";o<arguments.length;)(t=arguments[o++])&&(i=s(t))&&(r&&(r+=" "),r+=i);return r}const e=class{constructor(o){t(this,o),this.changeEvent=i(this,"mdsInputChange",7),this.keyDownEvent=i(this,"mdsInputKeydown",7),this.blurEvent=i(this,"mdsInputBlur",7),this.focusEvent=i(this,"mdsInputFocus",7),this.onInput=t=>{const i=t.target;i&&(this.value=i.value),this.keyDownEvent.emit(t)},this.onBlur=()=>{this.hasFocus=!1,this.blurEvent.emit()},this.onFocus=t=>{const i=t.target;this.hasFocus=!0,this.focusEvent.emit(),this.readonly&&setTimeout((()=>{i.select()}),10)},this.hasFocus=!1,this.autocomplete="off",this.autofocus=!1,this.datalist=void 0,this.disabled=!1,this.icon=void 0,this.max=void 0,this.maxlength=void 0,this.min=void 0,this.minlength=void 0,this.name=void 0,this.pattern=void 0,this.placeholder="",this.readonly=!1,this.required=!1,this.variant=void 0,this.tip=void 0,this.step=void 0,this.type="text",this.value=""}componentWillLoad(){if(this.el.hasAttribute("tabindex")){const t=this.el.getAttribute("tabindex");this.tabindex=null!==t?parseInt(t):void 0,this.el.removeAttribute("tabindex")}}valueChanged(){this.changeEvent.emit({value:this.value})}async setFocus(){this.nativeInput&&this.nativeInput.focus()}getInputElement(){return Promise.resolve(this.nativeInput)}getValue(){var t;return"number"==typeof this.value?this.value.toString():null!==(t=this.value)&&void 0!==t?t:""}render(){const t=this.getValue();return o(r,null,"textarea"===this.type?o("textarea",{class:a("input",this.icon&&"has-icon"),autoFocus:this.autofocus,disabled:this.disabled,maxLength:this.maxlength,minLength:this.minlength,name:this.name,onBlur:this.onBlur,onFocus:this.onFocus,onInput:this.onInput,placeholder:this.placeholder,readOnly:this.readonly,ref:t=>this.nativeInput=t,required:this.required,tabIndex:this.tabindex,value:t}):o("input",{class:a("input",this.icon&&"has-icon"),autoComplete:this.autocomplete,autoFocus:this.autofocus,disabled:this.disabled,max:this.max,maxLength:this.maxlength,min:this.min,minLength:this.minlength,name:this.name,onBlur:this.onBlur,onFocus:this.onFocus,onInput:this.onInput,pattern:this.pattern,list:this.datalist&&"datalist",placeholder:this.placeholder,readOnly:this.readonly,ref:t=>this.nativeInput=t,required:this.required,step:this.step,tabIndex:this.tabindex,type:this.type,value:t}),this.disabled&&o("mds-text",{typography:"option",class:"tip top-1 disabled"},"Disabilitato"),this.readonly&&!this.disabled&&o("mds-text",{typography:"option",class:"tip top-1 read-only"},"Sola lettura"),this.required&&!this.disabled&&!this.readonly&&o("mds-text",{typography:"option",class:"tip top-1 required"},"Obbligatorio"),this.tip&&o("mds-text",{typography:"option",class:a("tip bottom-1",this.variant&&"tip-variant")},this.tip),this.datalist&&o("datalist",{id:"datalist",class:"datalist"},this.datalist.forEach((t=>{o("option",{value:t})}))),this.icon&&o("mds-icon",{class:a("icon",this.variant),name:this.icon}))}get el(){return n(this)}static get watchers(){return{value:["valueChanged"]}}};e.style='*,::before,::after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::-webkit-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::-ms-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}@tailwind utilities; :host{--mds-input-background:rgb(var(--tone-neutral));--mds-input-icon-color:var(--mds-input-variant-color);--mds-input-tip-background:84, 84, 84;--mds-input-ring:0 0 0 1px rgb(var(--mds-input-variant-color) 0.1);--mds-input-shadow:0 1px 3px 0 rgb(var(--mds-input-variant-color) 0.1), 0 1px 2px 0 rgb(var(--mds-input-variant-color) 0.06);--mds-input-variant-color:0, 0, 0;font-family:Karla, -apple-system, BlinkMacSystemFont, \'San Francisco\', \'Segoe UI\', \'Helvetica Neue\', sans-serif;font-size:16px;line-height:1.5rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:-ms-flexbox;display:flex;position:relative}.input{font-family:Karla, -apple-system, BlinkMacSystemFont, \'San Francisco\', \'Segoe UI\', \'Helvetica Neue\', sans-serif;font-size:16px;line-height:1.5rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0px;min-height:3rem;width:100%;text-overflow:ellipsis;border-radius:0.5rem;padding-left:1rem;padding-right:1rem;padding-top:0.75rem;padding-bottom:0.75rem;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);background-color:var(--mds-input-background);border:0;border-color:transparent;-webkit-box-shadow:var(--mds-input-ring), var(--mds-input-shadow);box-shadow:var(--mds-input-ring), var(--mds-input-shadow);-webkit-box-sizing:border-box;box-sizing:border-box;color:rgb(var(--tone-neutral-02));overflow:hidden}textarea.input:active{-webkit-transition-property:none;transition-property:none}textarea.input{max-height:16rem;min-height:6rem;border-bottom-right-radius:0px}.input:focus{outline:2px solid transparent;outline-offset:2px;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);--mds-input-ring:0 0 0 3px rgb(var(--mds-input-variant-color) 1);--mds-input-shadow:0 4px 6px -1px rgb(var(--mds-input-variant-color) 0.1), 0 2px 4px -1px rgb(var(--mds-input-variant-color) 0.06)}.input:disabled{background-color:rgb(var(--tone-neutral-10))}.input:disabled::-moz-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled::-webkit-input-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled:-ms-input-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled::-ms-input-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled,.input:disabled::placeholder{color:rgb(var(--tone-neutral-05))}.input.has-icon{padding-left:2.75rem}.tip{right:0.25rem;height:0.75rem;border-radius:9999px;padding-left:0.5rem;padding-right:0.5rem;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);background-color:rgb(var(--mds-input-tip-background));color:rgb(var(--tone-neutral));-ms-flex-pack:center;justify-content:center;line-height:0.75rem;pointer-events:none;position:absolute;text-align:center}.tip-variant{--mds-input-tip-background:var(--mds-input-icon-color)}.read-only{background-color:rgb(var(--status-info-05));color:rgb(var(--tone-neutral))}.required{width:0.75rem;padding:0px;background-color:rgb(var(--status-error-05));color:transparent}.disabled{background-color:rgb(var(--tone-neutral-05))}.input:focus+.required{width:6rem;color:rgb(var(--tone-neutral))}.icon{left:0.75rem;top:0.75rem;fill:rgb(var(--mds-input-icon-color));position:absolute}.fixed{position:fixed}.absolute{position:absolute}.bottom-1{bottom:0.25rem}.top-1{top:0.25rem}.flex{display:-ms-flexbox;display:flex}.w-min{width:-moz-min-content;width:-webkit-min-content;width:min-content}.flex-col{-ms-flex-direction:column;flex-direction:column}.gap-y-2{row-gap:0.5rem}.border{border-width:1px}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{--mds-input-icon-color:10, 80, 212;--mds-input-variant-color:0, 0, 0}:host(:focus){--mds-input-variant-color:31, 101, 232;}:host([variant="info"]){--mds-input-icon-color:25, 143, 182;--mds-input-variant-color:0, 0, 0}:host([variant="info"]:focus){--mds-input-icon-color:21, 119, 151;--mds-input-variant-color:25, 143, 182;}:host([variant="success"]){--mds-input-icon-color:26, 151, 91;--mds-input-variant-color:0, 0, 0}:host([variant="success"]:focus){--mds-input-icon-color:22, 125, 76;--mds-input-variant-color:26, 151, 91;}:host([variant="warning"]){--mds-input-icon-color:168, 126, 0;--mds-input-variant-color:0, 0, 0}:host([variant="warning"]:focus){--mds-input-icon-color:139, 104, 0;--mds-input-variant-color:168, 126, 0;}:host([variant="error"]){--mds-input-icon-color:234, 77, 73;--mds-input-variant-color:0, 0, 0}:host([variant="error"]:focus){--mds-input-icon-color:215, 29, 25;--mds-input-variant-color:234, 77, 73;}';export{e as mds_input}
|