@maggioli-design-system/mds-input-tip 1.0.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/index-f87612f6.js +1122 -0
- package/dist/cjs/loader.cjs.js +4 -2
- package/dist/cjs/mds-input-tip.cjs.entry.js +5 -4
- package/dist/cjs/mds-input-tip.cjs.js +12 -10
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/common/locale.js +37 -9
- package/dist/collection/components/mds-input-tip/mds-input-tip.css +105 -87
- package/dist/collection/components/mds-input-tip/mds-input-tip.js +2 -2
- package/dist/collection/components/mds-input-tip/meta/dictionary.js +5 -0
- package/dist/collection/components/mds-input-tip/test/mds-input-tip.stories.js +18 -0
- package/dist/collection/type/language.js +1 -0
- package/dist/collection/type/preference.js +1 -0
- package/dist/components/mds-input-tip.js +4 -3
- package/dist/documentation.d.ts +34 -0
- package/dist/documentation.json +4 -4
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/index-a04da9f4.js +1095 -0
- package/dist/esm/loader.js +5 -3
- package/dist/esm/mds-input-tip.entry.js +5 -4
- package/dist/esm/mds-input-tip.js +13 -11
- package/dist/esm-es5/app-globals-0f993ce5.js +1 -0
- package/dist/esm-es5/index-a04da9f4.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mds-input-tip.entry.js +1 -1
- package/dist/esm-es5/mds-input-tip.js +1 -1
- package/dist/mds-input-tip/mds-input-tip.esm.js +1 -1
- package/dist/mds-input-tip/mds-input-tip.js +1 -1
- package/dist/mds-input-tip/p-14639038.entry.js +1 -0
- package/dist/mds-input-tip/p-56ba5cbf.system.js +1 -0
- package/dist/mds-input-tip/p-58828816.system.js +2 -0
- package/dist/mds-input-tip/p-96bf634c.js +2 -0
- package/dist/mds-input-tip/p-ca408384.system.js +1 -0
- package/dist/mds-input-tip/p-e1255160.js +1 -0
- package/dist/mds-input-tip/p-ed74ada1.system.entry.js +1 -0
- package/dist/stats.json +56 -39
- package/dist/types/common/locale.d.ts +8 -5
- package/dist/types/components/mds-input-tip/mds-input-tip.d.ts +1 -1
- package/dist/types/components/mds-input-tip/meta/dictionary.d.ts +2 -0
- package/dist/types/components/mds-input-tip/test/mds-input-tip.stories.d.ts +20 -0
- package/dist/types/components.d.ts +2 -2
- package/dist/types/stencil-public-runtime.d.ts +3 -10
- package/dist/types/type/language.d.ts +1 -0
- package/dist/types/type/preference.d.ts +2 -0
- package/documentation.json +22 -27
- package/loader/cdn.js +1 -2
- package/loader/index.cjs.js +1 -2
- package/loader/index.d.ts +3 -0
- package/loader/index.es2017.js +1 -2
- package/loader/index.js +1 -2
- package/package.json +19 -19
- package/readme.md +4 -4
- package/src/common/locale.ts +50 -11
- package/src/components/mds-input-tip/css/mds-input-tip-pref-animation.css +16 -0
- package/src/components/mds-input-tip/mds-input-tip.css +9 -7
- package/src/components/mds-input-tip/mds-input-tip.tsx +1 -1
- package/src/components/mds-input-tip/meta/dictionary.ts +8 -0
- package/src/components/mds-input-tip/readme.md +4 -4
- package/src/components/mds-input-tip/test/mds-input-tip.stories.tsx +26 -0
- package/src/components.d.ts +2 -2
- package/src/fixtures/icons.json +1 -0
- package/src/tailwind/components.css +71 -0
- package/src/type/language.ts +4 -0
- package/src/type/preference.ts +11 -0
- package/www/build/mds-input-tip.esm.js +1 -1
- package/www/build/mds-input-tip.js +1 -1
- package/www/build/p-14639038.entry.js +1 -0
- package/www/build/p-56ba5cbf.system.js +1 -0
- package/www/build/p-58828816.system.js +2 -0
- package/www/build/p-96bf634c.js +2 -0
- package/www/build/p-ca408384.system.js +1 -0
- package/www/build/p-e1255160.js +1 -0
- package/www/build/p-ed74ada1.system.entry.js +1 -0
- package/dist/cjs/index-fe2df682.js +0 -1571
- package/dist/collection/components/mds-input-tip/test/mds-input-tip.e2e.js +0 -9
- package/dist/esm/index-351c5c8a.js +0 -1544
- package/dist/esm-es5/index-351c5c8a.js +0 -1
- package/dist/mds-input-tip/p-22b86e20.js +0 -2
- package/dist/mds-input-tip/p-3428f886.system.js +0 -2
- package/dist/mds-input-tip/p-630886b5.entry.js +0 -1
- package/dist/mds-input-tip/p-89e037f5.system.entry.js +0 -1
- package/dist/mds-input-tip/p-e5fe0b68.system.js +0 -1
- package/www/build/p-22b86e20.js +0 -2
- package/www/build/p-3428f886.system.js +0 -2
- package/www/build/p-630886b5.entry.js +0 -1
- package/www/build/p-89e037f5.system.entry.js +0 -1
- package/www/build/p-e5fe0b68.system.js +0 -1
package/dist/cjs/loader.cjs.js
CHANGED
@@ -2,10 +2,12 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
const index = require('./index-
|
5
|
+
const index = require('./index-f87612f6.js');
|
6
|
+
const appGlobals = require('./app-globals-3a1e7e63.js');
|
6
7
|
|
7
|
-
const defineCustomElements = (win, options) => {
|
8
|
+
const defineCustomElements = async (win, options) => {
|
8
9
|
if (typeof window === 'undefined') return undefined;
|
10
|
+
await appGlobals.globalScripts();
|
9
11
|
return index.bootstrapLazy([["mds-input-tip.cjs",[[1,"mds-input-tip",{"active":[516],"position":[513]}]]]], options);
|
10
12
|
};
|
11
13
|
|
@@ -2,9 +2,10 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
const index = require('./index-
|
5
|
+
const index = require('./index-f87612f6.js');
|
6
6
|
|
7
|
-
const mdsInputTipCss = ".static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.border{border-width:1px}.bg-label-amaranth-10{--tw-bg-opacity:1
|
7
|
+
const mdsInputTipCss = "@tailwind utilities;\n\n:host {\n\n --mds-input-tip-active-translate: translate(0, 0);\n\n left: 0.25rem;\n\n right: 0.25rem;\n\n gap: 0.25rem;\n\n -webkit-transition-property: background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;\n\n transition-property: background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;\n\n transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;\n\n transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;\n\n -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n\n -webkit-transition-duration: 300ms;\n\n transition-duration: 300ms;\n\n -webkit-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n display: -ms-flexbox;\n\n display: flex;\n -ms-flex-pack: end;\n justify-content: flex-end;\n pointer-events: none;\n position: absolute;\n -webkit-transform: var(--mds-input-tip-active-translate);\n transform: var(--mds-input-tip-active-translate);\n}\n\n:host(:empty) {\n display: none;\n}\n\n:host([position=\"top\"]) {\n top: 0.25rem;\n}\n\n:host([position=\"bottom\"]) {\n bottom: 0.25rem;\n}\n\n:host([position=\"top\"][active]:not([active=\"false\"])) {\n\n --mds-input-tip-active-translate: translate(calc(0.25rem * -1), calc(0.25rem * -1));\n}\n\n:host([position=\"top\"][active]:not([active=\"false\"])) ::slotted( mds-input-tip-item ) {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n}\n\n:host([position=\"bottom\"][active]:not([active=\"false\"])) {\n\n --mds-input-tip-active-translate: translate(calc(0.25rem * -1), 0.25rem);\n}\n\n:host([position=\"bottom\"][active]:not([active=\"false\"])) ::slotted( mds-input-tip-item ) {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.static{\n\n position: static;\n}\n\n.fixed{\n\n position: fixed;\n}\n\n.absolute{\n\n position: absolute;\n}\n\n.relative{\n\n position: relative;\n}\n\n.border{\n\n border-width: 1px;\n}\n\n.bg-label-amaranth-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--label-amaranth-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-aqua-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--label-aqua-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-blue-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--label-blue-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-green-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--label-green-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-lime-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--label-lime-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-orange-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--label-orange-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-orchid-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--label-orchid-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-violet-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--label-violet-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-yellow-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--label-yellow-10) / var(--tw-bg-opacity));\n}\n\n.bg-tone-neutral-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--tone-neutral-10) / var(--tw-bg-opacity));\n}\n\n.fill-label-amaranth-04{\n\n fill: rgb(var(--label-amaranth-04));\n}\n\n.fill-label-aqua-04{\n\n fill: rgb(var(--label-aqua-04));\n}\n\n.fill-label-blue-04{\n\n fill: rgb(var(--label-blue-04));\n}\n\n.fill-label-green-04{\n\n fill: rgb(var(--label-green-04));\n}\n\n.fill-label-lime-04{\n\n fill: rgb(var(--label-lime-04));\n}\n\n.fill-label-orange-04{\n\n fill: rgb(var(--label-orange-04));\n}\n\n.fill-label-orchid-04{\n\n fill: rgb(var(--label-orchid-04));\n}\n\n.fill-label-violet-04{\n\n fill: rgb(var(--label-violet-04));\n}\n\n.fill-label-yellow-04{\n\n fill: rgb(var(--label-yellow-04));\n}\n\n.fill-tone-neutral-04{\n\n fill: rgb(var(--tone-neutral-04));\n}\n\n.text-label-amaranth-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--label-amaranth-04) / var(--tw-text-opacity));\n}\n\n.text-label-aqua-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--label-aqua-04) / var(--tw-text-opacity));\n}\n\n.text-label-blue-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--label-blue-04) / var(--tw-text-opacity));\n}\n\n.text-label-green-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--label-green-04) / var(--tw-text-opacity));\n}\n\n.text-label-lime-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--label-lime-04) / var(--tw-text-opacity));\n}\n\n.text-label-orange-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--label-orange-04) / var(--tw-text-opacity));\n}\n\n.text-label-orchid-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--label-orchid-04) / var(--tw-text-opacity));\n}\n\n.text-label-violet-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--label-violet-04) / var(--tw-text-opacity));\n}\n\n.text-label-yellow-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--label-yellow-04) / var(--tw-text-opacity));\n}\n\n.text-tone-neutral-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--tone-neutral-04) / var(--tw-text-opacity));\n}\n\n.shadow{\n\n --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n\n -webkit-box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n@container style(--magma-pref-animation: reduce) {\n :host {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n}\n\n@container style(--magma-pref-animation: system) {\n\n @media (prefers-reduced-motion) {\n :host {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n }\n}\n\n";
|
8
|
+
const MdsInputTipStyle0 = mdsInputTipCss;
|
8
9
|
|
9
10
|
const MdsInputTip = class {
|
10
11
|
constructor(hostRef) {
|
@@ -13,9 +14,9 @@ const MdsInputTip = class {
|
|
13
14
|
this.position = 'top';
|
14
15
|
}
|
15
16
|
render() {
|
16
|
-
return (index.h(index.Host,
|
17
|
+
return (index.h(index.Host, { key: '0f883b978b66900598d4a7abeed8d8079d72c420' }, index.h("slot", { key: 'cca41852411fe5bc23e2ab27e656a7ad17326a14' })));
|
17
18
|
}
|
18
19
|
};
|
19
|
-
MdsInputTip.style =
|
20
|
+
MdsInputTip.style = MdsInputTipStyle0;
|
20
21
|
|
21
22
|
exports.mds_input_tip = MdsInputTip;
|
@@ -2,21 +2,23 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
const index = require('./index-
|
5
|
+
const index = require('./index-f87612f6.js');
|
6
|
+
const appGlobals = require('./app-globals-3a1e7e63.js');
|
6
7
|
|
7
8
|
/*
|
8
|
-
Stencil Client Patch Browser v4.
|
9
|
+
Stencil Client Patch Browser v4.21.0 | MIT Licensed | https://stenciljs.com
|
9
10
|
*/
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
var patchBrowser = () => {
|
12
|
+
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('mds-input-tip.cjs.js', document.baseURI).href));
|
13
|
+
const opts = {};
|
14
|
+
if (importMeta !== "") {
|
15
|
+
opts.resourcesUrl = new URL(".", importMeta).href;
|
16
|
+
}
|
17
|
+
return index.promiseResolve(opts);
|
17
18
|
};
|
18
19
|
|
19
|
-
patchBrowser().then(options => {
|
20
|
+
patchBrowser().then(async (options) => {
|
21
|
+
await appGlobals.globalScripts();
|
20
22
|
return index.bootstrapLazy([["mds-input-tip.cjs",[[1,"mds-input-tip",{"active":[516],"position":[513]}]]]], options);
|
21
23
|
});
|
22
24
|
|
@@ -1,19 +1,47 @@
|
|
1
|
+
import Handlebars from "handlebars";
|
1
2
|
export class Locale {
|
2
3
|
constructor(configData) {
|
3
|
-
this.
|
4
|
+
this.rollbackLanguage = 'en';
|
4
5
|
this.lang = (element) => {
|
5
|
-
|
6
|
-
if (closestElement) {
|
7
|
-
if (closestElement.lang) {
|
8
|
-
this.language = closestElement.lang;
|
6
|
+
this.closestElement = element.closest('[lang]');
|
7
|
+
if (this.closestElement) {
|
8
|
+
if (this.closestElement.lang) {
|
9
|
+
this.language = this.closestElement.lang;
|
9
10
|
return;
|
10
11
|
}
|
11
12
|
}
|
12
|
-
this.language = this.
|
13
|
+
this.language = this.rollbackLanguage;
|
13
14
|
};
|
14
|
-
this.
|
15
|
-
|
16
|
-
|
15
|
+
this.pluralize = (tag, context) => {
|
16
|
+
const languagePhrase = this.config[this.language] ? this.config[this.language][tag] : this.config[this.rollbackLanguage][tag];
|
17
|
+
const phrases = [];
|
18
|
+
if (Array.isArray(languagePhrase)) {
|
19
|
+
phrases.push(languagePhrase[0]);
|
20
|
+
phrases.push(languagePhrase[1]);
|
21
|
+
}
|
22
|
+
else {
|
23
|
+
phrases.push(languagePhrase);
|
24
|
+
phrases.push(languagePhrase);
|
25
|
+
}
|
26
|
+
const [defaultPhrase] = phrases;
|
27
|
+
let translatePhrase = defaultPhrase;
|
28
|
+
const keys = Object.keys(context);
|
29
|
+
if (keys.length > 0) {
|
30
|
+
const [firstKey] = keys;
|
31
|
+
if (typeof context[firstKey] === 'number') {
|
32
|
+
if (context[firstKey] !== 1) {
|
33
|
+
translatePhrase = phrases[1];
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}
|
37
|
+
const template = Handlebars.compile(translatePhrase);
|
38
|
+
return template(context);
|
39
|
+
};
|
40
|
+
this.get = (tag, context) => {
|
41
|
+
if (context) {
|
42
|
+
return this.pluralize(tag, context);
|
43
|
+
}
|
44
|
+
return this.config[this.language] ? this.config[this.language][tag] : this.config[this.rollbackLanguage][tag];
|
17
45
|
};
|
18
46
|
this.config = configData;
|
19
47
|
}
|
@@ -1,219 +1,278 @@
|
|
1
|
-
|
1
|
+
@tailwind utilities;
|
2
|
+
|
3
|
+
:host {
|
4
|
+
|
5
|
+
--mds-input-tip-active-translate: translate(0, 0);
|
6
|
+
|
7
|
+
left: 0.25rem;
|
8
|
+
|
9
|
+
right: 0.25rem;
|
10
|
+
|
11
|
+
gap: 0.25rem;
|
12
|
+
|
13
|
+
transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
|
14
|
+
|
15
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
16
|
+
|
17
|
+
transition-duration: 300ms;
|
18
|
+
|
19
|
+
transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
|
20
|
+
|
21
|
+
display: flex;
|
22
|
+
justify-content: flex-end;
|
23
|
+
pointer-events: none;
|
24
|
+
position: absolute;
|
25
|
+
transform: var(--mds-input-tip-active-translate);
|
26
|
+
}
|
27
|
+
|
28
|
+
:host(:empty) {
|
29
|
+
display: none;
|
30
|
+
}
|
31
|
+
|
32
|
+
:host([position="top"]) {
|
33
|
+
top: 0.25rem;
|
34
|
+
}
|
35
|
+
|
36
|
+
:host([position="bottom"]) {
|
37
|
+
bottom: 0.25rem;
|
38
|
+
}
|
39
|
+
|
40
|
+
:host([position="top"][active]:not([active="false"])) {
|
41
|
+
|
42
|
+
--mds-input-tip-active-translate: translate(calc(0.25rem * -1), calc(0.25rem * -1));
|
43
|
+
}
|
44
|
+
|
45
|
+
:host([position="top"][active]:not([active="false"])) ::slotted( mds-input-tip-item ) {
|
46
|
+
border-top-left-radius: 0;
|
47
|
+
border-top-right-radius: 0;
|
48
|
+
}
|
49
|
+
|
50
|
+
:host([position="bottom"][active]:not([active="false"])) {
|
51
|
+
|
52
|
+
--mds-input-tip-active-translate: translate(calc(0.25rem * -1), 0.25rem);
|
53
|
+
}
|
54
|
+
|
55
|
+
:host([position="bottom"][active]:not([active="false"])) ::slotted( mds-input-tip-item ) {
|
56
|
+
border-bottom-left-radius: 0;
|
57
|
+
border-bottom-right-radius: 0;
|
58
|
+
}
|
59
|
+
|
60
|
+
.static{
|
2
61
|
|
3
62
|
position: static;
|
4
63
|
}
|
5
64
|
|
6
|
-
.fixed
|
65
|
+
.fixed{
|
7
66
|
|
8
67
|
position: fixed;
|
9
68
|
}
|
10
69
|
|
11
|
-
.absolute
|
70
|
+
.absolute{
|
12
71
|
|
13
72
|
position: absolute;
|
14
73
|
}
|
15
74
|
|
16
|
-
.relative
|
75
|
+
.relative{
|
17
76
|
|
18
77
|
position: relative;
|
19
78
|
}
|
20
79
|
|
21
|
-
.border
|
80
|
+
.border{
|
22
81
|
|
23
82
|
border-width: 1px;
|
24
83
|
}
|
25
84
|
|
26
|
-
.bg-label-amaranth-10
|
85
|
+
.bg-label-amaranth-10{
|
27
86
|
|
28
87
|
--tw-bg-opacity: 1;
|
29
88
|
|
30
89
|
background-color: rgb(var(--label-amaranth-10) / var(--tw-bg-opacity));
|
31
90
|
}
|
32
91
|
|
33
|
-
.bg-label-aqua-10
|
92
|
+
.bg-label-aqua-10{
|
34
93
|
|
35
94
|
--tw-bg-opacity: 1;
|
36
95
|
|
37
96
|
background-color: rgb(var(--label-aqua-10) / var(--tw-bg-opacity));
|
38
97
|
}
|
39
98
|
|
40
|
-
.bg-label-blue-10
|
99
|
+
.bg-label-blue-10{
|
41
100
|
|
42
101
|
--tw-bg-opacity: 1;
|
43
102
|
|
44
103
|
background-color: rgb(var(--label-blue-10) / var(--tw-bg-opacity));
|
45
104
|
}
|
46
105
|
|
47
|
-
.bg-label-green-10
|
106
|
+
.bg-label-green-10{
|
48
107
|
|
49
108
|
--tw-bg-opacity: 1;
|
50
109
|
|
51
110
|
background-color: rgb(var(--label-green-10) / var(--tw-bg-opacity));
|
52
111
|
}
|
53
112
|
|
54
|
-
.bg-label-lime-10
|
113
|
+
.bg-label-lime-10{
|
55
114
|
|
56
115
|
--tw-bg-opacity: 1;
|
57
116
|
|
58
117
|
background-color: rgb(var(--label-lime-10) / var(--tw-bg-opacity));
|
59
118
|
}
|
60
119
|
|
61
|
-
.bg-label-orange-10
|
120
|
+
.bg-label-orange-10{
|
62
121
|
|
63
122
|
--tw-bg-opacity: 1;
|
64
123
|
|
65
124
|
background-color: rgb(var(--label-orange-10) / var(--tw-bg-opacity));
|
66
125
|
}
|
67
126
|
|
68
|
-
.bg-label-orchid-10
|
127
|
+
.bg-label-orchid-10{
|
69
128
|
|
70
129
|
--tw-bg-opacity: 1;
|
71
130
|
|
72
131
|
background-color: rgb(var(--label-orchid-10) / var(--tw-bg-opacity));
|
73
132
|
}
|
74
133
|
|
75
|
-
.bg-label-violet-10
|
134
|
+
.bg-label-violet-10{
|
76
135
|
|
77
136
|
--tw-bg-opacity: 1;
|
78
137
|
|
79
138
|
background-color: rgb(var(--label-violet-10) / var(--tw-bg-opacity));
|
80
139
|
}
|
81
140
|
|
82
|
-
.bg-label-yellow-10
|
141
|
+
.bg-label-yellow-10{
|
83
142
|
|
84
143
|
--tw-bg-opacity: 1;
|
85
144
|
|
86
145
|
background-color: rgb(var(--label-yellow-10) / var(--tw-bg-opacity));
|
87
146
|
}
|
88
147
|
|
89
|
-
.bg-tone-neutral-10
|
148
|
+
.bg-tone-neutral-10{
|
90
149
|
|
91
150
|
--tw-bg-opacity: 1;
|
92
151
|
|
93
152
|
background-color: rgb(var(--tone-neutral-10) / var(--tw-bg-opacity));
|
94
153
|
}
|
95
154
|
|
96
|
-
.fill-label-amaranth-04
|
155
|
+
.fill-label-amaranth-04{
|
97
156
|
|
98
157
|
fill: rgb(var(--label-amaranth-04));
|
99
158
|
}
|
100
159
|
|
101
|
-
.fill-label-aqua-04
|
160
|
+
.fill-label-aqua-04{
|
102
161
|
|
103
162
|
fill: rgb(var(--label-aqua-04));
|
104
163
|
}
|
105
164
|
|
106
|
-
.fill-label-blue-04
|
165
|
+
.fill-label-blue-04{
|
107
166
|
|
108
167
|
fill: rgb(var(--label-blue-04));
|
109
168
|
}
|
110
169
|
|
111
|
-
.fill-label-green-04
|
170
|
+
.fill-label-green-04{
|
112
171
|
|
113
172
|
fill: rgb(var(--label-green-04));
|
114
173
|
}
|
115
174
|
|
116
|
-
.fill-label-lime-04
|
175
|
+
.fill-label-lime-04{
|
117
176
|
|
118
177
|
fill: rgb(var(--label-lime-04));
|
119
178
|
}
|
120
179
|
|
121
|
-
.fill-label-orange-04
|
180
|
+
.fill-label-orange-04{
|
122
181
|
|
123
182
|
fill: rgb(var(--label-orange-04));
|
124
183
|
}
|
125
184
|
|
126
|
-
.fill-label-orchid-04
|
185
|
+
.fill-label-orchid-04{
|
127
186
|
|
128
187
|
fill: rgb(var(--label-orchid-04));
|
129
188
|
}
|
130
189
|
|
131
|
-
.fill-label-violet-04
|
190
|
+
.fill-label-violet-04{
|
132
191
|
|
133
192
|
fill: rgb(var(--label-violet-04));
|
134
193
|
}
|
135
194
|
|
136
|
-
.fill-label-yellow-04
|
195
|
+
.fill-label-yellow-04{
|
137
196
|
|
138
197
|
fill: rgb(var(--label-yellow-04));
|
139
198
|
}
|
140
199
|
|
141
|
-
.fill-tone-neutral-04
|
200
|
+
.fill-tone-neutral-04{
|
142
201
|
|
143
202
|
fill: rgb(var(--tone-neutral-04));
|
144
203
|
}
|
145
204
|
|
146
|
-
.text-label-amaranth-04
|
205
|
+
.text-label-amaranth-04{
|
147
206
|
|
148
207
|
--tw-text-opacity: 1;
|
149
208
|
|
150
209
|
color: rgb(var(--label-amaranth-04) / var(--tw-text-opacity));
|
151
210
|
}
|
152
211
|
|
153
|
-
.text-label-aqua-04
|
212
|
+
.text-label-aqua-04{
|
154
213
|
|
155
214
|
--tw-text-opacity: 1;
|
156
215
|
|
157
216
|
color: rgb(var(--label-aqua-04) / var(--tw-text-opacity));
|
158
217
|
}
|
159
218
|
|
160
|
-
.text-label-blue-04
|
219
|
+
.text-label-blue-04{
|
161
220
|
|
162
221
|
--tw-text-opacity: 1;
|
163
222
|
|
164
223
|
color: rgb(var(--label-blue-04) / var(--tw-text-opacity));
|
165
224
|
}
|
166
225
|
|
167
|
-
.text-label-green-04
|
226
|
+
.text-label-green-04{
|
168
227
|
|
169
228
|
--tw-text-opacity: 1;
|
170
229
|
|
171
230
|
color: rgb(var(--label-green-04) / var(--tw-text-opacity));
|
172
231
|
}
|
173
232
|
|
174
|
-
.text-label-lime-04
|
233
|
+
.text-label-lime-04{
|
175
234
|
|
176
235
|
--tw-text-opacity: 1;
|
177
236
|
|
178
237
|
color: rgb(var(--label-lime-04) / var(--tw-text-opacity));
|
179
238
|
}
|
180
239
|
|
181
|
-
.text-label-orange-04
|
240
|
+
.text-label-orange-04{
|
182
241
|
|
183
242
|
--tw-text-opacity: 1;
|
184
243
|
|
185
244
|
color: rgb(var(--label-orange-04) / var(--tw-text-opacity));
|
186
245
|
}
|
187
246
|
|
188
|
-
.text-label-orchid-04
|
247
|
+
.text-label-orchid-04{
|
189
248
|
|
190
249
|
--tw-text-opacity: 1;
|
191
250
|
|
192
251
|
color: rgb(var(--label-orchid-04) / var(--tw-text-opacity));
|
193
252
|
}
|
194
253
|
|
195
|
-
.text-label-violet-04
|
254
|
+
.text-label-violet-04{
|
196
255
|
|
197
256
|
--tw-text-opacity: 1;
|
198
257
|
|
199
258
|
color: rgb(var(--label-violet-04) / var(--tw-text-opacity));
|
200
259
|
}
|
201
260
|
|
202
|
-
.text-label-yellow-04
|
261
|
+
.text-label-yellow-04{
|
203
262
|
|
204
263
|
--tw-text-opacity: 1;
|
205
264
|
|
206
265
|
color: rgb(var(--label-yellow-04) / var(--tw-text-opacity));
|
207
266
|
}
|
208
267
|
|
209
|
-
.text-tone-neutral-04
|
268
|
+
.text-tone-neutral-04{
|
210
269
|
|
211
270
|
--tw-text-opacity: 1;
|
212
271
|
|
213
272
|
color: rgb(var(--tone-neutral-04) / var(--tw-text-opacity));
|
214
273
|
}
|
215
274
|
|
216
|
-
.shadow
|
275
|
+
.shadow{
|
217
276
|
|
218
277
|
--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
219
278
|
|
@@ -222,59 +281,18 @@
|
|
222
281
|
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
223
282
|
}
|
224
283
|
|
225
|
-
:
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
left: 0.25rem;
|
230
|
-
|
231
|
-
right: 0.25rem;
|
232
|
-
|
233
|
-
gap: 0.25rem;
|
234
|
-
|
235
|
-
transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
|
236
|
-
|
237
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
238
|
-
|
239
|
-
transition-duration: 300ms;
|
240
|
-
|
241
|
-
transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
|
242
|
-
|
243
|
-
display: flex;
|
244
|
-
justify-content: flex-end;
|
245
|
-
pointer-events: none;
|
246
|
-
position: absolute;
|
247
|
-
transform: var(--mds-input-tip-active-translate);
|
248
|
-
}
|
249
|
-
|
250
|
-
:host ( :empty ) {
|
251
|
-
display: none;
|
252
|
-
}
|
253
|
-
|
254
|
-
:host ( [position="top"] ) {
|
255
|
-
top: 0.25rem;
|
256
|
-
}
|
257
|
-
|
258
|
-
:host ( [position="bottom"] ) {
|
259
|
-
bottom: 0.25rem;
|
284
|
+
@container style(--magma-pref-animation: reduce) {
|
285
|
+
:host {
|
286
|
+
transition-duration: 0s;
|
287
|
+
}
|
260
288
|
}
|
261
289
|
|
262
|
-
|
290
|
+
@container style(--magma-pref-animation: system) {
|
263
291
|
|
264
|
-
|
292
|
+
@media (prefers-reduced-motion) {
|
293
|
+
:host {
|
294
|
+
transition-duration: 0s;
|
295
|
+
}
|
296
|
+
}
|
265
297
|
}
|
266
298
|
|
267
|
-
:host( [position="top"][active]:not([active="false"]) ) ::slotted( mds-input-tip-item ) {
|
268
|
-
border-top-left-radius: 0;
|
269
|
-
border-top-right-radius: 0;
|
270
|
-
}
|
271
|
-
|
272
|
-
:host ( [position="bottom"][active]:not([active="false"]) ) {
|
273
|
-
|
274
|
-
--mds-input-tip-active-translate: translate(calc(0.25rem * -1), 0.25rem);
|
275
|
-
}
|
276
|
-
|
277
|
-
:host( [position="bottom"][active]:not([active="false"]) ) ::slotted( mds-input-tip-item ) {
|
278
|
-
border-bottom-left-radius: 0;
|
279
|
-
border-bottom-right-radius: 0;
|
280
|
-
}
|
@@ -5,7 +5,7 @@ export class MdsInputTip {
|
|
5
5
|
this.position = 'top';
|
6
6
|
}
|
7
7
|
render() {
|
8
|
-
return (h(Host,
|
8
|
+
return (h(Host, { key: '0f883b978b66900598d4a7abeed8d8079d72c420' }, h("slot", { key: 'cca41852411fe5bc23e2ab27e656a7ad17326a14' })));
|
9
9
|
}
|
10
10
|
static get is() { return "mds-input-tip"; }
|
11
11
|
static get encapsulation() { return "shadow"; }
|
@@ -33,7 +33,7 @@ export class MdsInputTip {
|
|
33
33
|
"optional": true,
|
34
34
|
"docs": {
|
35
35
|
"tags": [],
|
36
|
-
"text": "Specifies the
|
36
|
+
"text": "Specifies if the component is active and shows expanded children or not"
|
37
37
|
},
|
38
38
|
"attribute": "active",
|
39
39
|
"reflect": true,
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { inputTipPositionDictionary } from "../meta/dictionary";
|
2
|
+
import { h } from "@stencil/core";
|
3
|
+
export default {
|
4
|
+
title: 'Form / Input Tip',
|
5
|
+
argTypes: {
|
6
|
+
active: {
|
7
|
+
type: { name: 'boolean' },
|
8
|
+
description: 'Specifies if the component is active and shows expanded children or not',
|
9
|
+
},
|
10
|
+
position: {
|
11
|
+
description: 'Specifies the position of the element relative to its container',
|
12
|
+
options: inputTipPositionDictionary,
|
13
|
+
control: { type: 'select' },
|
14
|
+
},
|
15
|
+
},
|
16
|
+
};
|
17
|
+
const Template = args => h("mds-input-tip", Object.assign({}, args), h("mds-input-tip-item", { variant: "required" }), h("mds-input-tip-item", { variant: "disabled" }), h("mds-input-tip-item", { variant: "readonly" }));
|
18
|
+
export const Default = Template.bind({});
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
2
2
|
|
3
|
-
const mdsInputTipCss = ".static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.border{border-width:1px}.bg-label-amaranth-10{--tw-bg-opacity:1
|
3
|
+
const mdsInputTipCss = "@tailwind utilities;\n\n:host {\n\n --mds-input-tip-active-translate: translate(0, 0);\n\n left: 0.25rem;\n\n right: 0.25rem;\n\n gap: 0.25rem;\n\n -webkit-transition-property: background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;\n\n transition-property: background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;\n\n transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;\n\n transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;\n\n -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n\n -webkit-transition-duration: 300ms;\n\n transition-duration: 300ms;\n\n -webkit-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n display: -ms-flexbox;\n\n display: flex;\n -ms-flex-pack: end;\n justify-content: flex-end;\n pointer-events: none;\n position: absolute;\n -webkit-transform: var(--mds-input-tip-active-translate);\n transform: var(--mds-input-tip-active-translate);\n}\n\n:host(:empty) {\n display: none;\n}\n\n:host([position=\"top\"]) {\n top: 0.25rem;\n}\n\n:host([position=\"bottom\"]) {\n bottom: 0.25rem;\n}\n\n:host([position=\"top\"][active]:not([active=\"false\"])) {\n\n --mds-input-tip-active-translate: translate(calc(0.25rem * -1), calc(0.25rem * -1));\n}\n\n:host([position=\"top\"][active]:not([active=\"false\"])) ::slotted( mds-input-tip-item ) {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n}\n\n:host([position=\"bottom\"][active]:not([active=\"false\"])) {\n\n --mds-input-tip-active-translate: translate(calc(0.25rem * -1), 0.25rem);\n}\n\n:host([position=\"bottom\"][active]:not([active=\"false\"])) ::slotted( mds-input-tip-item ) {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.static{\n\n position: static;\n}\n\n.fixed{\n\n position: fixed;\n}\n\n.absolute{\n\n position: absolute;\n}\n\n.relative{\n\n position: relative;\n}\n\n.border{\n\n border-width: 1px;\n}\n\n.bg-label-amaranth-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--label-amaranth-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-aqua-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--label-aqua-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-blue-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--label-blue-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-green-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--label-green-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-lime-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--label-lime-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-orange-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--label-orange-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-orchid-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--label-orchid-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-violet-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--label-violet-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-yellow-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--label-yellow-10) / var(--tw-bg-opacity));\n}\n\n.bg-tone-neutral-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--tone-neutral-10) / var(--tw-bg-opacity));\n}\n\n.fill-label-amaranth-04{\n\n fill: rgb(var(--label-amaranth-04));\n}\n\n.fill-label-aqua-04{\n\n fill: rgb(var(--label-aqua-04));\n}\n\n.fill-label-blue-04{\n\n fill: rgb(var(--label-blue-04));\n}\n\n.fill-label-green-04{\n\n fill: rgb(var(--label-green-04));\n}\n\n.fill-label-lime-04{\n\n fill: rgb(var(--label-lime-04));\n}\n\n.fill-label-orange-04{\n\n fill: rgb(var(--label-orange-04));\n}\n\n.fill-label-orchid-04{\n\n fill: rgb(var(--label-orchid-04));\n}\n\n.fill-label-violet-04{\n\n fill: rgb(var(--label-violet-04));\n}\n\n.fill-label-yellow-04{\n\n fill: rgb(var(--label-yellow-04));\n}\n\n.fill-tone-neutral-04{\n\n fill: rgb(var(--tone-neutral-04));\n}\n\n.text-label-amaranth-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--label-amaranth-04) / var(--tw-text-opacity));\n}\n\n.text-label-aqua-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--label-aqua-04) / var(--tw-text-opacity));\n}\n\n.text-label-blue-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--label-blue-04) / var(--tw-text-opacity));\n}\n\n.text-label-green-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--label-green-04) / var(--tw-text-opacity));\n}\n\n.text-label-lime-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--label-lime-04) / var(--tw-text-opacity));\n}\n\n.text-label-orange-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--label-orange-04) / var(--tw-text-opacity));\n}\n\n.text-label-orchid-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--label-orchid-04) / var(--tw-text-opacity));\n}\n\n.text-label-violet-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--label-violet-04) / var(--tw-text-opacity));\n}\n\n.text-label-yellow-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--label-yellow-04) / var(--tw-text-opacity));\n}\n\n.text-tone-neutral-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--tone-neutral-04) / var(--tw-text-opacity));\n}\n\n.shadow{\n\n --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n\n -webkit-box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n@container style(--magma-pref-animation: reduce) {\n :host {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n}\n\n@container style(--magma-pref-animation: system) {\n\n @media (prefers-reduced-motion) {\n :host {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n }\n}\n\n";
|
4
|
+
const MdsInputTipStyle0 = mdsInputTipCss;
|
4
5
|
|
5
6
|
const MdsInputTip$1 = /*@__PURE__*/ proxyCustomElement(class MdsInputTip extends HTMLElement {
|
6
7
|
constructor() {
|
@@ -11,9 +12,9 @@ const MdsInputTip$1 = /*@__PURE__*/ proxyCustomElement(class MdsInputTip extends
|
|
11
12
|
this.position = 'top';
|
12
13
|
}
|
13
14
|
render() {
|
14
|
-
return (h(Host,
|
15
|
+
return (h(Host, { key: '0f883b978b66900598d4a7abeed8d8079d72c420' }, h("slot", { key: 'cca41852411fe5bc23e2ab27e656a7ad17326a14' })));
|
15
16
|
}
|
16
|
-
static get style() { return
|
17
|
+
static get style() { return MdsInputTipStyle0; }
|
17
18
|
}, [1, "mds-input-tip", {
|
18
19
|
"active": [516],
|
19
20
|
"position": [513]
|