@maggioli-design-system/mds-input 1.0.0 → 2.0.0
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-3aa055da.js → index-926865d7.js} +32 -19
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/mds-input.cjs.entry.js +3 -3
- package/dist/cjs/mds-input.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/mds-input/mds-input.css +44 -53
- package/dist/collection/components/mds-input/mds-input.js +1 -1
- package/dist/collection/components/mds-input/test/mds-input.stories.js +33 -1
- package/dist/collection/dictionary/icon.js +2 -2
- package/dist/components/index.d.ts +1 -1
- package/dist/components/mds-input.js +4 -6
- package/dist/esm/{index-2cdf06e7.js → index-393bb7cb.js} +32 -19
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mds-input.entry.js +3 -3
- package/dist/esm/mds-input.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm-es5/index-393bb7cb.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-5152ec89.entry.js +1 -0
- package/dist/mds-input/p-92e90ca1.system.js +1 -0
- package/dist/mds-input/p-aae3e2da.system.entry.js +1 -0
- package/dist/mds-input/p-ca6ff30c.system.js +1 -0
- package/dist/mds-input/p-d6028bfd.js +1 -0
- package/dist/stats.json +40 -38
- package/dist/types/dictionary/icon.d.ts +1 -1
- package/package.json +6 -5
- package/readme.md +3 -0
- package/src/components/mds-input/.gitlab-ci.yml +18 -0
- package/src/components/mds-input/mds-input.css +7 -2
- package/src/components/mds-input/mds-input.tsx +1 -1
- package/src/components/mds-input/test/mds-input.stories.js +33 -1
- package/src/components/mds-input/test/mds-input.stories.mdx +19 -0
- package/src/dictionary/icon.ts +2 -2
- package/src/tailwind/components.css +14 -0
- package/www/build/mds-input.esm.js +1 -1
- package/www/build/mds-input.js +1 -1
- package/www/build/p-5152ec89.entry.js +1 -0
- package/www/build/p-92e90ca1.system.js +1 -0
- package/www/build/p-aae3e2da.system.entry.js +1 -0
- package/www/build/p-ca6ff30c.system.js +1 -0
- package/www/build/p-d6028bfd.js +1 -0
- package/dist/esm-es5/index-2cdf06e7.js +0 -1
- package/dist/mds-input/p-132bdeae.system.entry.js +0 -1
- package/dist/mds-input/p-275873d7.entry.js +0 -1
- package/dist/mds-input/p-8bdf82a6.js +0 -1
- package/dist/mds-input/p-91d946fe.system.js +0 -1
- package/dist/mds-input/p-992602db.system.js +0 -1
- package/www/build/p-132bdeae.system.entry.js +0 -1
- package/www/build/p-275873d7.entry.js +0 -1
- package/www/build/p-8bdf82a6.js +0 -1
- package/www/build/p-91d946fe.system.js +0 -1
- package/www/build/p-992602db.system.js +0 -1
|
@@ -23,7 +23,6 @@ function _interopNamespace(e) {
|
|
|
23
23
|
const NAMESPACE = 'mds-input';
|
|
24
24
|
|
|
25
25
|
let scopeId;
|
|
26
|
-
let hostTagName;
|
|
27
26
|
let isSvgMode = false;
|
|
28
27
|
let queuePending = false;
|
|
29
28
|
const win = typeof window !== 'undefined' ? window : {};
|
|
@@ -112,7 +111,7 @@ const attachStyles = (hostRef) => {
|
|
|
112
111
|
const elm = hostRef.$hostElement$;
|
|
113
112
|
const flags = cmpMeta.$flags$;
|
|
114
113
|
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
115
|
-
const scopeId = addStyle(elm.
|
|
114
|
+
const scopeId = addStyle(elm.getRootNode(), cmpMeta);
|
|
116
115
|
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
117
116
|
// only required when we're NOT using native shadow dom (slot)
|
|
118
117
|
// or this browser doesn't support native shadow dom
|
|
@@ -123,6 +122,9 @@ const attachStyles = (hostRef) => {
|
|
|
123
122
|
// DOM WRITE!!
|
|
124
123
|
elm['s-sc'] = scopeId;
|
|
125
124
|
elm.classList.add(scopeId + '-h');
|
|
125
|
+
if (flags & 2 /* scopedCssEncapsulation */) {
|
|
126
|
+
elm.classList.add(scopeId + '-s');
|
|
127
|
+
}
|
|
126
128
|
}
|
|
127
129
|
endAttachStyles();
|
|
128
130
|
};
|
|
@@ -379,9 +381,6 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
379
381
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
380
382
|
let containerElm = (parentElm);
|
|
381
383
|
let childNode;
|
|
382
|
-
if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
|
|
383
|
-
containerElm = containerElm.shadowRoot;
|
|
384
|
-
}
|
|
385
384
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
386
385
|
if (vnodes[startIdx]) {
|
|
387
386
|
childNode = createElm(null, parentVNode, startIdx);
|
|
@@ -526,7 +525,6 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
526
525
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
527
526
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
528
527
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
529
|
-
hostTagName = hostElm.tagName;
|
|
530
528
|
if (cmpMeta.$attrsToReflect$) {
|
|
531
529
|
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
532
530
|
cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
|
|
@@ -534,7 +532,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
534
532
|
rootVnode.$tag$ = null;
|
|
535
533
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
536
534
|
hostRef.$vnode$ = rootVnode;
|
|
537
|
-
rootVnode.$elm$ = oldVNode.$elm$ = (hostElm
|
|
535
|
+
rootVnode.$elm$ = oldVNode.$elm$ = (hostElm);
|
|
538
536
|
{
|
|
539
537
|
scopeId = hostElm['s-sc'];
|
|
540
538
|
}
|
|
@@ -724,6 +722,29 @@ const then = (promise, thenFn) => {
|
|
|
724
722
|
};
|
|
725
723
|
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
726
724
|
;
|
|
725
|
+
/**
|
|
726
|
+
* Parse a new property value for a given property type.
|
|
727
|
+
*
|
|
728
|
+
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
729
|
+
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
730
|
+
* 1. `any`, the type given to `propValue` in the function signature
|
|
731
|
+
* 2. the type stored from `propType`.
|
|
732
|
+
*
|
|
733
|
+
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
734
|
+
*
|
|
735
|
+
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
736
|
+
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
737
|
+
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
738
|
+
* ```tsx
|
|
739
|
+
* <my-cmp prop-val={0}></my-cmp>
|
|
740
|
+
* ```
|
|
741
|
+
*
|
|
742
|
+
* HTML prop values on the other hand, will always a string
|
|
743
|
+
*
|
|
744
|
+
* @param propValue the new value to coerce to some type
|
|
745
|
+
* @param propType the type of the prop, expressed as a binary number
|
|
746
|
+
* @returns the parsed/coerced value
|
|
747
|
+
*/
|
|
727
748
|
const parsePropertyValue = (propValue, propType) => {
|
|
728
749
|
// ensure this value is of the correct prop type
|
|
729
750
|
if (propValue != null && !isComplexType(propValue)) {
|
|
@@ -757,7 +778,10 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
757
778
|
const flags = hostRef.$flags$;
|
|
758
779
|
const instance = hostRef.$lazyInstance$ ;
|
|
759
780
|
newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
|
|
760
|
-
|
|
781
|
+
// explicitly check for NaN on both sides, as `NaN === NaN` is always false
|
|
782
|
+
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
783
|
+
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
784
|
+
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && didValueChange) {
|
|
761
785
|
// gadzooks! the property's value has changed!!
|
|
762
786
|
// set our new value!
|
|
763
787
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
@@ -1055,17 +1079,6 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1055
1079
|
super(self);
|
|
1056
1080
|
self = this;
|
|
1057
1081
|
registerHost(self, cmpMeta);
|
|
1058
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1059
|
-
// this component is using shadow dom
|
|
1060
|
-
// and this browser supports shadow dom
|
|
1061
|
-
// add the read-only property "shadowRoot" to the host element
|
|
1062
|
-
// adding the shadow root build conditionals to minimize runtime
|
|
1063
|
-
{
|
|
1064
|
-
{
|
|
1065
|
-
self.attachShadow({ mode: 'open' });
|
|
1066
|
-
}
|
|
1067
|
-
}
|
|
1068
|
-
}
|
|
1069
1082
|
}
|
|
1070
1083
|
connectedCallback() {
|
|
1071
1084
|
if (appLoadFallback) {
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-926865d7.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Esm v2.
|
|
8
|
+
Stencil Client Patch Esm v2.15.1 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchEsm = () => {
|
|
11
11
|
return index.promiseResolve();
|
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["mds-input.cjs",[[
|
|
17
|
+
return index.bootstrapLazy([["mds-input.cjs",[[2,"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],"variantTip":[1,"variant-tip"],"step":[1],"type":[1],"value":[8],"hasFocus":[32],"setFocus":[64],"getInputElement":[64]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-926865d7.js');
|
|
6
6
|
|
|
7
7
|
function toVal(mix) {
|
|
8
8
|
var k, y, str='';
|
|
@@ -45,9 +45,9 @@ function clsx () {
|
|
|
45
45
|
return str;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
const mdsInputCss = "*,::before,::after{--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{font-family:Karla, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:1rem;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:1rem;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(--adjust-tone-02), var(--tw-text-opacity));--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);--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);-webkit-box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);--tw-ring-color:rgba(var(--adjust-tone-02), var(--tw-ring-opacity));--tw-ring-opacity:0.1;-webkit-transition-property:background-color, border-color, color, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-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(--background, rgb(var(--adjust-tone)))}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{--tw-shadow:0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px 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);--tw-shadow-color:rgba(var(--brand-maggioli-04), 0.5);--tw-shadow:var(--tw-shadow-colored);outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);-webkit-box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);--tw-ring-opacity:1;--tw-ring-color:rgba(var(--brand-maggioli-04), var(--tw-ring-opacity));-webkit-transition-property:background-color, border-color, color, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-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)}.input:disabled{--tw-bg-opacity:1;background-color:rgba(var(--adjust-tone-10), var(--tw-bg-opacity))}.input:disabled::-moz-placeholder{--tw-text-opacity:1;color:rgba(var(--adjust-tone-05), var(--tw-text-opacity))}.input:disabled:-ms-input-placeholder{--tw-text-opacity:1;color:rgba(var(--adjust-tone-05), var(--tw-text-opacity))}.input:disabled::-webkit-input-placeholder{--tw-text-opacity:1;color:rgba(var(--adjust-tone-05), var(--tw-text-opacity))}.input:disabled::-ms-input-placeholder{--tw-text-opacity:1;color:rgba(var(--adjust-tone-05), var(--tw-text-opacity))}.input:disabled,.input:disabled::placeholder{--tw-text-opacity:1;color:rgba(var(--adjust-tone-05), var(--tw-text-opacity))}.input.has-icon{padding-left:2.75rem}.tip,.tip-variant{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(--adjust-tone), var(--tw-text-opacity));-webkit-transition-property:background-color, border-color, color, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-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}.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(--adjust-tone), var(--tw-text-opacity));--tw-text-opacity:0}.disabled{--tw-bg-opacity:1;background-color:rgba(var(--adjust-tone-05), var(--tw-bg-opacity))}.input:focus+.required{width:6rem;--tw-text-opacity:1}.icon{position:absolute;left:0.75rem;top:0.75rem;--tw-text-opacity:1;color:rgba(var(--brand-maggioli-04), var(--tw-text-opacity))}.top-1{top:0.25rem}.bottom-1{bottom:0.25rem}.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([variant=info]) .input:focus{--tw-shadow-color:rgba(var(--status-info-06), 0.5);--tw-shadow:var(--tw-shadow-colored);--tw-ring-opacity:1;--tw-ring-color:rgba(var(--status-info-06), var(--tw-ring-opacity))}:host([variant=info]) .tip-variant{--tw-bg-opacity:1;background-color:rgba(var(--status-info-06), var(--tw-bg-opacity));--tw-text-opacity:1;color:rgba(var(--adjust-tone), var(--tw-text-opacity))}:host([variant=info]) .icon{--tw-text-opacity:1;color:rgba(var(--status-info-06), var(--tw-text-opacity))}:host([variant=success]) .input:focus{--tw-shadow-color:rgba(var(--status-success-06), 0.5);--tw-shadow:var(--tw-shadow-colored);--tw-ring-opacity:1;--tw-ring-color:rgba(var(--status-success-06), var(--tw-ring-opacity))}:host([variant=success]) .tip-variant{--tw-bg-opacity:1;background-color:rgba(var(--status-success-06), var(--tw-bg-opacity));--tw-text-opacity:1;color:rgba(var(--adjust-tone), var(--tw-text-opacity))}:host([variant=success]) .icon{--tw-text-opacity:1;color:rgba(var(--status-success-06), var(--tw-text-opacity))}:host([variant=warning]) .input:focus{--tw-shadow-color:rgba(var(--status-warning-06), 0.5);--tw-shadow:var(--tw-shadow-colored);--tw-ring-opacity:1;--tw-ring-color:rgba(var(--status-warning-06), var(--tw-ring-opacity))}:host([variant=warning]) .tip-variant{--tw-bg-opacity:1;background-color:rgba(var(--status-warning-06), var(--tw-bg-opacity));--tw-text-opacity:1;color:rgba(var(--adjust-tone), var(--tw-text-opacity))}:host([variant=warning]) .icon{--tw-text-opacity:1;color:rgba(var(--status-warning-06), var(--tw-text-opacity))}:host([variant=error]) .input:focus{--tw-shadow-color:rgba(var(--status-error-06), 0.5);--tw-shadow:var(--tw-shadow-colored);--tw-ring-opacity:1;--tw-ring-color:rgba(var(--status-error-06), var(--tw-ring-opacity))}:host([variant=error]) .tip-variant{--tw-bg-opacity:1;background-color:rgba(var(--status-error-06), var(--tw-bg-opacity));--tw-text-opacity:1;color:rgba(var(--adjust-tone), var(--tw-text-opacity))}:host([variant=error]) .icon{--tw-text-opacity:1;color:rgba(var(--status-error-06), var(--tw-text-opacity))}";
|
|
48
|
+
const mdsInputCss = "*.sc-mds-input,.sc-mds-input::before,.sc-mds-input::after{--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; .sc-mds-input-h{--background:rgb(var(--adjust-tone));--icon-color:rgb(var(--adjust-tone));font-family:Karla, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:1rem;line-height:1.5rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:relative;display:-ms-flexbox;display:flex}.input.sc-mds-input{font-family:Karla, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:1rem;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(--adjust-tone-02), var(--tw-text-opacity));--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);--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);-webkit-box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);--tw-ring-color:rgba(var(--adjust-tone-02), var(--tw-ring-opacity));--tw-ring-opacity:0.1;-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(--background)}textarea.input.sc-mds-input:active{-webkit-transition-property:none;transition-property:none}textarea.input.sc-mds-input{max-height:16rem;min-height:6rem;border-bottom-right-radius:0px}.input.sc-mds-input:focus{--tw-shadow:0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px 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);--tw-shadow-color:rgba(var(--brand-maggioli-04), 0.5);--tw-shadow:var(--tw-shadow-colored);outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);-webkit-box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);--tw-ring-opacity:1;--tw-ring-color:rgba(var(--brand-maggioli-04), var(--tw-ring-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)}.input.sc-mds-input:disabled{--tw-bg-opacity:1;background-color:rgba(var(--adjust-tone-10), var(--tw-bg-opacity))}.input.sc-mds-input:disabled::-moz-placeholder{--tw-text-opacity:1;color:rgba(var(--adjust-tone-05), var(--tw-text-opacity))}.input.sc-mds-input:disabled:-ms-input-placeholder{--tw-text-opacity:1;color:rgba(var(--adjust-tone-05), var(--tw-text-opacity))}.input.sc-mds-input:disabled::-webkit-input-placeholder{--tw-text-opacity:1;color:rgba(var(--adjust-tone-05), var(--tw-text-opacity))}.input.sc-mds-input:disabled::-ms-input-placeholder{--tw-text-opacity:1;color:rgba(var(--adjust-tone-05), var(--tw-text-opacity))}.input.sc-mds-input:disabled,.input.sc-mds-input:disabled::placeholder{--tw-text-opacity:1;color:rgba(var(--adjust-tone-05), var(--tw-text-opacity))}.input.has-icon.sc-mds-input{padding-left:2.75rem}.tip.sc-mds-input,.tip-variant.sc-mds-input{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(--adjust-tone), 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}.read-only.sc-mds-input{--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.sc-mds-input{width:0.75rem;--tw-bg-opacity:1;background-color:rgba(var(--status-error-05), var(--tw-bg-opacity));padding:0px;color:rgba(var(--adjust-tone), var(--tw-text-opacity));--tw-text-opacity:0}.disabled.sc-mds-input{--tw-bg-opacity:1;background-color:rgba(var(--adjust-tone-05), var(--tw-bg-opacity))}.input.sc-mds-input:focus+.required.sc-mds-input{width:6rem;--tw-text-opacity:1}.icon.sc-mds-input{position:absolute;left:0.75rem;top:0.75rem;fill:rgb(var(--brand-maggioli-04))}.top-1.sc-mds-input{top:0.25rem}.bottom-1.sc-mds-input{bottom:0.25rem}.border.sc-mds-input{border-width:1px}.sc-mds-input-h(.sc-mds-input [variant=info].sc-mds-input).sc-mds-input .input.sc-mds-input:focus{--tw-shadow-color:rgba(var(--status-info-06), 0.5);--tw-shadow:var(--tw-shadow-colored);--tw-ring-opacity:1;--tw-ring-color:rgba(var(--status-info-06), var(--tw-ring-opacity))}.sc-mds-input-h(.sc-mds-input [variant=info].sc-mds-input).sc-mds-input .tip-variant.sc-mds-input{--tw-bg-opacity:1;background-color:rgba(var(--status-info-06), var(--tw-bg-opacity));--tw-text-opacity:1;color:rgba(var(--adjust-tone), var(--tw-text-opacity))}.sc-mds-input-h(.sc-mds-input [variant=info].sc-mds-input).sc-mds-input .icon.sc-mds-input{--tw-text-opacity:1;color:rgba(var(--status-info-06), var(--tw-text-opacity))}.sc-mds-input-h(.sc-mds-input [variant=success].sc-mds-input).sc-mds-input .input.sc-mds-input:focus{--tw-shadow-color:rgba(var(--status-success-06), 0.5);--tw-shadow:var(--tw-shadow-colored);--tw-ring-opacity:1;--tw-ring-color:rgba(var(--status-success-06), var(--tw-ring-opacity))}.sc-mds-input-h(.sc-mds-input [variant=success].sc-mds-input).sc-mds-input .tip-variant.sc-mds-input{--tw-bg-opacity:1;background-color:rgba(var(--status-success-06), var(--tw-bg-opacity));--tw-text-opacity:1;color:rgba(var(--adjust-tone), var(--tw-text-opacity))}.sc-mds-input-h(.sc-mds-input [variant=success].sc-mds-input).sc-mds-input .icon.sc-mds-input{--tw-text-opacity:1;color:rgba(var(--status-success-06), var(--tw-text-opacity))}.sc-mds-input-h(.sc-mds-input [variant=warning].sc-mds-input).sc-mds-input .input.sc-mds-input:focus{--tw-shadow-color:rgba(var(--status-warning-06), 0.5);--tw-shadow:var(--tw-shadow-colored);--tw-ring-opacity:1;--tw-ring-color:rgba(var(--status-warning-06), var(--tw-ring-opacity))}.sc-mds-input-h(.sc-mds-input [variant=warning].sc-mds-input).sc-mds-input .tip-variant.sc-mds-input{--tw-bg-opacity:1;background-color:rgba(var(--status-warning-06), var(--tw-bg-opacity));--tw-text-opacity:1;color:rgba(var(--adjust-tone), var(--tw-text-opacity))}.sc-mds-input-h(.sc-mds-input [variant=warning].sc-mds-input).sc-mds-input .icon.sc-mds-input{--tw-text-opacity:1;color:rgba(var(--status-warning-06), var(--tw-text-opacity))}.sc-mds-input-h(.sc-mds-input [variant=error].sc-mds-input).sc-mds-input .input.sc-mds-input:focus{--tw-shadow-color:rgba(var(--status-error-06), 0.5);--tw-shadow:var(--tw-shadow-colored);--tw-ring-opacity:1;--tw-ring-color:rgba(var(--status-error-06), var(--tw-ring-opacity))}.sc-mds-input-h(.sc-mds-input [variant=error].sc-mds-input).sc-mds-input .tip-variant.sc-mds-input{--tw-bg-opacity:1;background-color:rgba(var(--status-error-06), var(--tw-bg-opacity));--tw-text-opacity:1;color:rgba(var(--adjust-tone), var(--tw-text-opacity))}.sc-mds-input-h(.sc-mds-input [variant=error].sc-mds-input).sc-mds-input .icon.sc-mds-input{--tw-text-opacity:1;color:rgba(var(--status-error-06), var(--tw-text-opacity))}";
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
const MdsInput = class {
|
|
51
51
|
constructor(hostRef) {
|
|
52
52
|
index.registerInstance(this, hostRef);
|
|
53
53
|
this.changeEvent = index.createEvent(this, "changeEvent", 7);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-926865d7.js');
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
|
-
Stencil Client Patch Browser v2.
|
|
6
|
+
Stencil Client Patch Browser v2.15.1 | MIT Licensed | https://stenciljs.com
|
|
7
7
|
*/
|
|
8
8
|
const patchBrowser = () => {
|
|
9
9
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('mds-input.cjs.js', document.baseURI).href));
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["mds-input.cjs",[[
|
|
18
|
+
return index.bootstrapLazy([["mds-input.cjs",[[2,"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],"variantTip":[1,"variant-tip"],"step":[1],"type":[1],"value":[8],"hasFocus":[32],"setFocus":[64],"getInputElement":[64]}]]]], options);
|
|
19
19
|
});
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
|
|
83
83
|
--tw-backdrop-saturate: ;
|
|
84
84
|
|
|
85
|
-
--tw-backdrop-sepia:
|
|
85
|
+
--tw-backdrop-sepia: ;
|
|
86
86
|
}
|
|
87
87
|
@tailwind utilities;
|
|
88
88
|
|
|
@@ -90,21 +90,17 @@
|
|
|
90
90
|
* @prop --background: Sets the background-color of the component
|
|
91
91
|
*/
|
|
92
92
|
|
|
93
|
-
:host{
|
|
93
|
+
:host {
|
|
94
94
|
|
|
95
|
+
--background: rgb(var(--adjust-tone));
|
|
96
|
+
--icon-color: rgb(var(--adjust-tone));
|
|
95
97
|
font-family: Karla, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;
|
|
96
|
-
|
|
97
98
|
font-size: 1rem;
|
|
98
|
-
|
|
99
99
|
line-height: 1.5rem;
|
|
100
|
-
|
|
101
100
|
-webkit-font-smoothing: antialiased;
|
|
102
|
-
|
|
103
101
|
-moz-osx-font-smoothing: grayscale;
|
|
104
|
-
|
|
105
102
|
position: relative;
|
|
106
|
-
|
|
107
|
-
display: flex
|
|
103
|
+
display: flex;
|
|
108
104
|
}
|
|
109
105
|
|
|
110
106
|
.input{
|
|
@@ -165,18 +161,20 @@
|
|
|
165
161
|
|
|
166
162
|
--tw-ring-opacity: 0.1;
|
|
167
163
|
|
|
168
|
-
transition-property: background-color, border-color, box-shadow, color, height, margin, opacity, padding, transform, width;
|
|
164
|
+
transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
|
|
165
|
+
|
|
166
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
169
167
|
|
|
170
168
|
transition-duration: 300ms;
|
|
171
169
|
|
|
172
170
|
transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
|
|
173
171
|
|
|
174
|
-
background-color: var(--background
|
|
172
|
+
background-color: var(--background);
|
|
175
173
|
}
|
|
176
174
|
|
|
177
175
|
textarea.input:active{
|
|
178
176
|
|
|
179
|
-
transition-property: none
|
|
177
|
+
transition-property: none;
|
|
180
178
|
}
|
|
181
179
|
|
|
182
180
|
textarea.input{
|
|
@@ -185,7 +183,7 @@ textarea.input{
|
|
|
185
183
|
|
|
186
184
|
min-height: 6rem;
|
|
187
185
|
|
|
188
|
-
border-bottom-right-radius: 0px
|
|
186
|
+
border-bottom-right-radius: 0px;
|
|
189
187
|
}
|
|
190
188
|
|
|
191
189
|
.input:focus{
|
|
@@ -214,44 +212,46 @@ textarea.input{
|
|
|
214
212
|
|
|
215
213
|
--tw-ring-color: rgba(var(--brand-maggioli-04), var(--tw-ring-opacity));
|
|
216
214
|
|
|
217
|
-
transition-property: background-color, border-color, box-shadow, color, height, margin, opacity, padding, transform, width;
|
|
215
|
+
transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
|
|
216
|
+
|
|
217
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
218
218
|
|
|
219
219
|
transition-duration: 300ms;
|
|
220
220
|
|
|
221
|
-
transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1)
|
|
221
|
+
transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
.input:disabled{
|
|
225
225
|
|
|
226
226
|
--tw-bg-opacity: 1;
|
|
227
227
|
|
|
228
|
-
background-color: rgba(var(--adjust-tone-10), var(--tw-bg-opacity))
|
|
228
|
+
background-color: rgba(var(--adjust-tone-10), var(--tw-bg-opacity));
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
.input:disabled::-moz-placeholder{
|
|
232
232
|
|
|
233
233
|
--tw-text-opacity: 1;
|
|
234
234
|
|
|
235
|
-
color: rgba(var(--adjust-tone-05), var(--tw-text-opacity))
|
|
235
|
+
color: rgba(var(--adjust-tone-05), var(--tw-text-opacity));
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
.input:disabled:-ms-input-placeholder{
|
|
239
239
|
|
|
240
240
|
--tw-text-opacity: 1;
|
|
241
241
|
|
|
242
|
-
color: rgba(var(--adjust-tone-05), var(--tw-text-opacity))
|
|
242
|
+
color: rgba(var(--adjust-tone-05), var(--tw-text-opacity));
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
.input:disabled, .input:disabled::placeholder{
|
|
246
246
|
|
|
247
247
|
--tw-text-opacity: 1;
|
|
248
248
|
|
|
249
|
-
color: rgba(var(--adjust-tone-05), var(--tw-text-opacity))
|
|
249
|
+
color: rgba(var(--adjust-tone-05), var(--tw-text-opacity));
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
.input.has-icon{
|
|
253
253
|
|
|
254
|
-
padding-left: 2.75rem
|
|
254
|
+
padding-left: 2.75rem;
|
|
255
255
|
}
|
|
256
256
|
|
|
257
257
|
.tip, .tip-variant{
|
|
@@ -278,13 +278,15 @@ textarea.input{
|
|
|
278
278
|
|
|
279
279
|
color: rgba(var(--adjust-tone), var(--tw-text-opacity));
|
|
280
280
|
|
|
281
|
-
transition-property: background-color, border-color, box-shadow, color, height, margin, opacity, padding, transform, width;
|
|
281
|
+
transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
|
|
282
|
+
|
|
283
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
282
284
|
|
|
283
285
|
transition-duration: 300ms;
|
|
284
286
|
|
|
285
287
|
transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
|
|
286
288
|
|
|
287
|
-
line-height: 0.75rem
|
|
289
|
+
line-height: 0.75rem;
|
|
288
290
|
}
|
|
289
291
|
|
|
290
292
|
.read-only{
|
|
@@ -295,7 +297,7 @@ textarea.input{
|
|
|
295
297
|
|
|
296
298
|
--tw-text-opacity: 1;
|
|
297
299
|
|
|
298
|
-
color: rgba(var(--status-info-09), var(--tw-text-opacity))
|
|
300
|
+
color: rgba(var(--status-info-09), var(--tw-text-opacity));
|
|
299
301
|
}
|
|
300
302
|
|
|
301
303
|
.required{
|
|
@@ -310,21 +312,21 @@ textarea.input{
|
|
|
310
312
|
|
|
311
313
|
color: rgba(var(--adjust-tone), var(--tw-text-opacity));
|
|
312
314
|
|
|
313
|
-
--tw-text-opacity: 0
|
|
315
|
+
--tw-text-opacity: 0;
|
|
314
316
|
}
|
|
315
317
|
|
|
316
318
|
.disabled{
|
|
317
319
|
|
|
318
320
|
--tw-bg-opacity: 1;
|
|
319
321
|
|
|
320
|
-
background-color: rgba(var(--adjust-tone-05), var(--tw-bg-opacity))
|
|
322
|
+
background-color: rgba(var(--adjust-tone-05), var(--tw-bg-opacity));
|
|
321
323
|
}
|
|
322
324
|
|
|
323
325
|
.input:focus + .required{
|
|
324
326
|
|
|
325
327
|
width: 6rem;
|
|
326
328
|
|
|
327
|
-
--tw-text-opacity: 1
|
|
329
|
+
--tw-text-opacity: 1;
|
|
328
330
|
}
|
|
329
331
|
|
|
330
332
|
.icon{
|
|
@@ -335,33 +337,22 @@ textarea.input{
|
|
|
335
337
|
|
|
336
338
|
top: 0.75rem;
|
|
337
339
|
|
|
338
|
-
--
|
|
339
|
-
|
|
340
|
-
color: rgba(var(--brand-maggioli-04), var(--tw-text-opacity))
|
|
340
|
+
fill: rgb(var(--brand-maggioli-04));
|
|
341
341
|
}
|
|
342
342
|
|
|
343
343
|
.top-1{
|
|
344
344
|
|
|
345
|
-
top: 0.25rem
|
|
345
|
+
top: 0.25rem;
|
|
346
346
|
}
|
|
347
347
|
|
|
348
348
|
.bottom-1{
|
|
349
349
|
|
|
350
|
-
bottom: 0.25rem
|
|
350
|
+
bottom: 0.25rem;
|
|
351
351
|
}
|
|
352
352
|
|
|
353
353
|
.border{
|
|
354
354
|
|
|
355
|
-
border-width: 1px
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
.shadow{
|
|
359
|
-
|
|
360
|
-
--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
361
|
-
|
|
362
|
-
--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
|
|
363
|
-
|
|
364
|
-
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)
|
|
355
|
+
border-width: 1px;
|
|
365
356
|
}
|
|
366
357
|
|
|
367
358
|
:host ( [variant=info] ) .input:focus{
|
|
@@ -372,7 +363,7 @@ textarea.input{
|
|
|
372
363
|
|
|
373
364
|
--tw-ring-opacity: 1;
|
|
374
365
|
|
|
375
|
-
--tw-ring-color: rgba(var(--status-info-06), var(--tw-ring-opacity))
|
|
366
|
+
--tw-ring-color: rgba(var(--status-info-06), var(--tw-ring-opacity));
|
|
376
367
|
}
|
|
377
368
|
|
|
378
369
|
:host ( [variant=info] ) .tip-variant{
|
|
@@ -383,14 +374,14 @@ textarea.input{
|
|
|
383
374
|
|
|
384
375
|
--tw-text-opacity: 1;
|
|
385
376
|
|
|
386
|
-
color: rgba(var(--adjust-tone), var(--tw-text-opacity))
|
|
377
|
+
color: rgba(var(--adjust-tone), var(--tw-text-opacity));
|
|
387
378
|
}
|
|
388
379
|
|
|
389
380
|
:host ( [variant=info] ) .icon{
|
|
390
381
|
|
|
391
382
|
--tw-text-opacity: 1;
|
|
392
383
|
|
|
393
|
-
color: rgba(var(--status-info-06), var(--tw-text-opacity))
|
|
384
|
+
color: rgba(var(--status-info-06), var(--tw-text-opacity));
|
|
394
385
|
}
|
|
395
386
|
|
|
396
387
|
:host ( [variant=success] ) .input:focus{
|
|
@@ -401,7 +392,7 @@ textarea.input{
|
|
|
401
392
|
|
|
402
393
|
--tw-ring-opacity: 1;
|
|
403
394
|
|
|
404
|
-
--tw-ring-color: rgba(var(--status-success-06), var(--tw-ring-opacity))
|
|
395
|
+
--tw-ring-color: rgba(var(--status-success-06), var(--tw-ring-opacity));
|
|
405
396
|
}
|
|
406
397
|
|
|
407
398
|
:host ( [variant=success] ) .tip-variant{
|
|
@@ -412,14 +403,14 @@ textarea.input{
|
|
|
412
403
|
|
|
413
404
|
--tw-text-opacity: 1;
|
|
414
405
|
|
|
415
|
-
color: rgba(var(--adjust-tone), var(--tw-text-opacity))
|
|
406
|
+
color: rgba(var(--adjust-tone), var(--tw-text-opacity));
|
|
416
407
|
}
|
|
417
408
|
|
|
418
409
|
:host ( [variant=success] ) .icon{
|
|
419
410
|
|
|
420
411
|
--tw-text-opacity: 1;
|
|
421
412
|
|
|
422
|
-
color: rgba(var(--status-success-06), var(--tw-text-opacity))
|
|
413
|
+
color: rgba(var(--status-success-06), var(--tw-text-opacity));
|
|
423
414
|
}
|
|
424
415
|
|
|
425
416
|
:host ( [variant=warning] ) .input:focus{
|
|
@@ -430,7 +421,7 @@ textarea.input{
|
|
|
430
421
|
|
|
431
422
|
--tw-ring-opacity: 1;
|
|
432
423
|
|
|
433
|
-
--tw-ring-color: rgba(var(--status-warning-06), var(--tw-ring-opacity))
|
|
424
|
+
--tw-ring-color: rgba(var(--status-warning-06), var(--tw-ring-opacity));
|
|
434
425
|
}
|
|
435
426
|
|
|
436
427
|
:host ( [variant=warning] ) .tip-variant{
|
|
@@ -441,14 +432,14 @@ textarea.input{
|
|
|
441
432
|
|
|
442
433
|
--tw-text-opacity: 1;
|
|
443
434
|
|
|
444
|
-
color: rgba(var(--adjust-tone), var(--tw-text-opacity))
|
|
435
|
+
color: rgba(var(--adjust-tone), var(--tw-text-opacity));
|
|
445
436
|
}
|
|
446
437
|
|
|
447
438
|
:host ( [variant=warning] ) .icon{
|
|
448
439
|
|
|
449
440
|
--tw-text-opacity: 1;
|
|
450
441
|
|
|
451
|
-
color: rgba(var(--status-warning-06), var(--tw-text-opacity))
|
|
442
|
+
color: rgba(var(--status-warning-06), var(--tw-text-opacity));
|
|
452
443
|
}
|
|
453
444
|
|
|
454
445
|
:host ( [variant=error] ) .input:focus{
|
|
@@ -459,7 +450,7 @@ textarea.input{
|
|
|
459
450
|
|
|
460
451
|
--tw-ring-opacity: 1;
|
|
461
452
|
|
|
462
|
-
--tw-ring-color: rgba(var(--status-error-06), var(--tw-ring-opacity))
|
|
453
|
+
--tw-ring-color: rgba(var(--status-error-06), var(--tw-ring-opacity));
|
|
463
454
|
}
|
|
464
455
|
|
|
465
456
|
:host ( [variant=error] ) .tip-variant{
|
|
@@ -470,13 +461,13 @@ textarea.input{
|
|
|
470
461
|
|
|
471
462
|
--tw-text-opacity: 1;
|
|
472
463
|
|
|
473
|
-
color: rgba(var(--adjust-tone), var(--tw-text-opacity))
|
|
464
|
+
color: rgba(var(--adjust-tone), var(--tw-text-opacity));
|
|
474
465
|
}
|
|
475
466
|
|
|
476
467
|
:host ( [variant=error] ) .icon{
|
|
477
468
|
|
|
478
469
|
--tw-text-opacity: 1;
|
|
479
470
|
|
|
480
|
-
color: rgba(var(--status-error-06), var(--tw-text-opacity))
|
|
471
|
+
color: rgba(var(--status-error-06), var(--tw-text-opacity));
|
|
481
472
|
}
|
|
482
473
|
|
|
@@ -108,7 +108,7 @@ export class MdsInput {
|
|
|
108
108
|
this.icon && h("mds-icon", { class: clsx('icon', this.variant), name: this.icon })));
|
|
109
109
|
}
|
|
110
110
|
static get is() { return "mds-input"; }
|
|
111
|
-
static get encapsulation() { return "
|
|
111
|
+
static get encapsulation() { return "scoped"; }
|
|
112
112
|
static get originalStyleUrls() { return {
|
|
113
113
|
"$": ["mds-input.css"]
|
|
114
114
|
}; }
|
|
@@ -160,6 +160,38 @@ search.args = {
|
|
|
160
160
|
|
|
161
161
|
export const icon = Template.bind({})
|
|
162
162
|
icon.args = {
|
|
163
|
-
icon: 'email',
|
|
163
|
+
icon: 'mi/round/email',
|
|
164
164
|
placeholder: 'Status input field',
|
|
165
165
|
}
|
|
166
|
+
|
|
167
|
+
const FormIntegration = (args) => (
|
|
168
|
+
<form className="flex flex-col gap-y-2" id="mds-icon-fi" name="mds-icon-fi">
|
|
169
|
+
<mds-input {...args}></mds-input>
|
|
170
|
+
<mds-button class="w-min" type="button" onClick={() => {
|
|
171
|
+
const input = document.querySelector('input[name="inputto"]')
|
|
172
|
+
const form = document.querySelector('form');
|
|
173
|
+
const mdsInput = document.querySelector('mds-input');
|
|
174
|
+
|
|
175
|
+
console.log('Input', input)
|
|
176
|
+
console.log('Form', form)
|
|
177
|
+
console.log('Form elements', form.elements)
|
|
178
|
+
console.log('MdsInput', mdsInput)
|
|
179
|
+
|
|
180
|
+
mdsInput.getInputElement().then((inputElement) => {
|
|
181
|
+
console.log('MdsInput input element', inputElement)
|
|
182
|
+
})
|
|
183
|
+
|
|
184
|
+
input.addEventListener('input', function(e) { console.error('Input', e.target.value)})
|
|
185
|
+
input.addEventListener('change', function(e) { console.warn('Change', e.target.value)})
|
|
186
|
+
mdsInput.addEventListener('changeEvent', function(e) { console.info('MdsInput ChangeEvent', e.detail.value) })
|
|
187
|
+
|
|
188
|
+
form.addEventListener('submit', function(e) { e.preventDefault(), console.info('Submitted', e)})
|
|
189
|
+
}}>Trigger listener</mds-button>
|
|
190
|
+
</form>
|
|
191
|
+
)
|
|
192
|
+
|
|
193
|
+
export const formIntegration = FormIntegration.bind({})
|
|
194
|
+
formIntegration.args = {
|
|
195
|
+
placeholder: 'Mi integro col form!',
|
|
196
|
+
name: 'inputto',
|
|
197
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
const iconsDictionary =
|
|
1
|
+
import jsonIconsDictionary from '../fixtures/icons.json';
|
|
2
|
+
const iconsDictionary = jsonIconsDictionary;
|
|
3
3
|
export { iconsDictionary, };
|
|
@@ -9,7 +9,7 @@ import type { Components, JSX } from "../types/components";
|
|
|
9
9
|
* "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
|
|
10
10
|
* dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
|
|
11
11
|
* But do note that this configuration depends on how your script is bundled, or lack of
|
|
12
|
-
*
|
|
12
|
+
* bundling, and where your assets can be loaded from. Additionally custom bundling
|
|
13
13
|
* will have to ensure the static assets are copied to its build directory.
|
|
14
14
|
*/
|
|
15
15
|
export declare const setAssetPath: (path: string) => void;
|