@maggioli-design-system/mds-input-tip-item 1.1.2 → 1.1.3
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/mds-input-tip-item.cjs.entry.js +8 -2
- package/dist/collection/common/date.js +13 -0
- package/dist/collection/common/locale.js +8 -2
- package/dist/collection/dictionary/button.js +6 -1
- package/dist/collection/dictionary/variant.js +6 -1
- package/dist/collection/type/date.js +1 -0
- package/dist/components/mds-input-tip-item.js +8 -2
- package/dist/documentation.json +1 -1
- package/dist/esm/mds-input-tip-item.entry.js +8 -2
- package/dist/esm-es5/mds-input-tip-item.entry.js +1 -1
- package/dist/mds-input-tip-item/mds-input-tip-item.esm.js +1 -1
- package/dist/mds-input-tip-item/{p-7f7a0684.system.entry.js → p-17779e2b.system.entry.js} +1 -1
- package/dist/mds-input-tip-item/{p-c23db9de.entry.js → p-d55a6a52.entry.js} +1 -1
- package/dist/mds-input-tip-item/p-f513b09b.system.js +1 -1
- package/dist/stats.json +20 -16
- package/dist/types/common/date.d.ts +4 -0
- package/dist/types/common/locale.d.ts +3 -2
- package/dist/types/dictionary/button.d.ts +2 -1
- package/dist/types/dictionary/variant.d.ts +2 -1
- package/dist/types/type/date.d.ts +5 -0
- package/dist/types/type/variant.d.ts +1 -1
- package/documentation.json +18 -8
- package/package.json +2 -2
- package/src/common/date.ts +21 -0
- package/src/common/locale.ts +10 -4
- package/src/dictionary/button.ts +7 -0
- package/src/dictionary/variant.ts +7 -0
- package/src/fixtures/icons.json +17 -0
- package/src/fixtures/iconsauce.json +17 -0
- package/src/type/date.ts +10 -0
- package/src/type/variant.ts +1 -1
- package/www/build/mds-input-tip-item.esm.js +1 -1
- package/www/build/{p-7f7a0684.system.entry.js → p-17779e2b.system.entry.js} +1 -1
- package/www/build/{p-c23db9de.entry.js → p-d55a6a52.entry.js} +1 -1
- package/www/build/p-f513b09b.system.js +1 -1
|
@@ -4750,15 +4750,19 @@ const Handlebars = /*@__PURE__*/getDefaultExportFromCjs(handlebars.exports);
|
|
|
4750
4750
|
class Locale {
|
|
4751
4751
|
constructor(configData) {
|
|
4752
4752
|
this.rollbackLanguage = 'en';
|
|
4753
|
+
this.set = (configData) => {
|
|
4754
|
+
this.config = configData;
|
|
4755
|
+
};
|
|
4753
4756
|
this.lang = (element) => {
|
|
4754
4757
|
this.closestElement = element.closest('[lang]');
|
|
4755
4758
|
if (this.closestElement) {
|
|
4756
4759
|
if (this.closestElement.lang) {
|
|
4757
4760
|
this.language = this.closestElement.lang;
|
|
4758
|
-
return;
|
|
4761
|
+
return this.language;
|
|
4759
4762
|
}
|
|
4760
4763
|
}
|
|
4761
4764
|
this.language = this.rollbackLanguage;
|
|
4765
|
+
return this.language;
|
|
4762
4766
|
};
|
|
4763
4767
|
this.pluralize = (tag, context) => {
|
|
4764
4768
|
const languagePhrase = this.config[this.language] ? this.config[this.language][tag] : this.config[this.rollbackLanguage][tag];
|
|
@@ -4791,7 +4795,9 @@ class Locale {
|
|
|
4791
4795
|
}
|
|
4792
4796
|
return this.config[this.language] ? this.config[this.language][tag] : this.config[this.rollbackLanguage][tag];
|
|
4793
4797
|
};
|
|
4794
|
-
|
|
4798
|
+
if (configData) {
|
|
4799
|
+
this.set(configData);
|
|
4800
|
+
}
|
|
4795
4801
|
}
|
|
4796
4802
|
}
|
|
4797
4803
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// ISO 8601 date regex allowing optional components (month, day, time)
|
|
2
|
+
const ISO8601RegexString = '^\\d{4}(-\\d{2})?(-\\d{2})?(T\\d{2}(:\\d{2})?(:\\d{2})?(\\.\\d{3})?)?([+-]\\d{2}:\\d{2}|Z)?$';
|
|
3
|
+
const isISO8601Date = (dateString) => {
|
|
4
|
+
const ISO8601Regex = new RegExp(ISO8601RegexString);
|
|
5
|
+
return ISO8601Regex.test(dateString);
|
|
6
|
+
};
|
|
7
|
+
const sanitizeISO8601Date = (dateString) => {
|
|
8
|
+
if (isISO8601Date(dateString)) {
|
|
9
|
+
return dateString;
|
|
10
|
+
}
|
|
11
|
+
return new Date(dateString).toISOString();
|
|
12
|
+
};
|
|
13
|
+
export { sanitizeISO8601Date, isISO8601Date, };
|
|
@@ -2,15 +2,19 @@ import Handlebars from "handlebars";
|
|
|
2
2
|
export class Locale {
|
|
3
3
|
constructor(configData) {
|
|
4
4
|
this.rollbackLanguage = 'en';
|
|
5
|
+
this.set = (configData) => {
|
|
6
|
+
this.config = configData;
|
|
7
|
+
};
|
|
5
8
|
this.lang = (element) => {
|
|
6
9
|
this.closestElement = element.closest('[lang]');
|
|
7
10
|
if (this.closestElement) {
|
|
8
11
|
if (this.closestElement.lang) {
|
|
9
12
|
this.language = this.closestElement.lang;
|
|
10
|
-
return;
|
|
13
|
+
return this.language;
|
|
11
14
|
}
|
|
12
15
|
}
|
|
13
16
|
this.language = this.rollbackLanguage;
|
|
17
|
+
return this.language;
|
|
14
18
|
};
|
|
15
19
|
this.pluralize = (tag, context) => {
|
|
16
20
|
const languagePhrase = this.config[this.language] ? this.config[this.language][tag] : this.config[this.rollbackLanguage][tag];
|
|
@@ -43,6 +47,8 @@ export class Locale {
|
|
|
43
47
|
}
|
|
44
48
|
return this.config[this.language] ? this.config[this.language][tag] : this.config[this.rollbackLanguage][tag];
|
|
45
49
|
};
|
|
46
|
-
|
|
50
|
+
if (configData) {
|
|
51
|
+
this.set(configData);
|
|
52
|
+
}
|
|
47
53
|
}
|
|
48
54
|
}
|
|
@@ -27,4 +27,9 @@ const buttonIconPositionDictionary = [
|
|
|
27
27
|
'left',
|
|
28
28
|
'right',
|
|
29
29
|
];
|
|
30
|
-
|
|
30
|
+
const buttonTypeDictionary = [
|
|
31
|
+
'button',
|
|
32
|
+
'submit',
|
|
33
|
+
'reset',
|
|
34
|
+
];
|
|
35
|
+
export { buttonIconPositionDictionary, buttonSizeDictionary, buttonTargetDictionary, buttonToneVariantDictionary, buttonTypeDictionary, buttonVariantDictionary, };
|
|
@@ -83,8 +83,13 @@ const toneSimpleVariantDictionary = [
|
|
|
83
83
|
'weak',
|
|
84
84
|
'quiet',
|
|
85
85
|
];
|
|
86
|
+
const toneSmartVariantDictionary = [
|
|
87
|
+
'strong',
|
|
88
|
+
'weak',
|
|
89
|
+
'ghost',
|
|
90
|
+
];
|
|
86
91
|
const toneMinimalVariantDictionary = [
|
|
87
92
|
'strong',
|
|
88
93
|
'weak',
|
|
89
94
|
];
|
|
90
|
-
export { themeFullVariantAvatarDictionary, themeFullVariantDictionary, themeLabelVariantDictionary, themeLuminanceVariantDictionary, themeStatusVariantDictionary, themeVariantDictionary, toneActionVariantDictionary, toneMinimalVariantDictionary, toneSimpleVariantDictionary, toneVariantDictionary, };
|
|
95
|
+
export { themeFullVariantAvatarDictionary, themeFullVariantDictionary, themeLabelVariantDictionary, themeLuminanceVariantDictionary, themeStatusVariantDictionary, themeVariantDictionary, toneActionVariantDictionary, toneMinimalVariantDictionary, toneSimpleVariantDictionary, toneSmartVariantDictionary, toneVariantDictionary, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4746,15 +4746,19 @@ const Handlebars = /*@__PURE__*/getDefaultExportFromCjs(handlebars.exports);
|
|
|
4746
4746
|
class Locale {
|
|
4747
4747
|
constructor(configData) {
|
|
4748
4748
|
this.rollbackLanguage = 'en';
|
|
4749
|
+
this.set = (configData) => {
|
|
4750
|
+
this.config = configData;
|
|
4751
|
+
};
|
|
4749
4752
|
this.lang = (element) => {
|
|
4750
4753
|
this.closestElement = element.closest('[lang]');
|
|
4751
4754
|
if (this.closestElement) {
|
|
4752
4755
|
if (this.closestElement.lang) {
|
|
4753
4756
|
this.language = this.closestElement.lang;
|
|
4754
|
-
return;
|
|
4757
|
+
return this.language;
|
|
4755
4758
|
}
|
|
4756
4759
|
}
|
|
4757
4760
|
this.language = this.rollbackLanguage;
|
|
4761
|
+
return this.language;
|
|
4758
4762
|
};
|
|
4759
4763
|
this.pluralize = (tag, context) => {
|
|
4760
4764
|
const languagePhrase = this.config[this.language] ? this.config[this.language][tag] : this.config[this.rollbackLanguage][tag];
|
|
@@ -4787,7 +4791,9 @@ class Locale {
|
|
|
4787
4791
|
}
|
|
4788
4792
|
return this.config[this.language] ? this.config[this.language][tag] : this.config[this.rollbackLanguage][tag];
|
|
4789
4793
|
};
|
|
4790
|
-
|
|
4794
|
+
if (configData) {
|
|
4795
|
+
this.set(configData);
|
|
4796
|
+
}
|
|
4791
4797
|
}
|
|
4792
4798
|
}
|
|
4793
4799
|
|
package/dist/documentation.json
CHANGED
|
@@ -4746,15 +4746,19 @@ const Handlebars = /*@__PURE__*/getDefaultExportFromCjs(handlebars.exports);
|
|
|
4746
4746
|
class Locale {
|
|
4747
4747
|
constructor(configData) {
|
|
4748
4748
|
this.rollbackLanguage = 'en';
|
|
4749
|
+
this.set = (configData) => {
|
|
4750
|
+
this.config = configData;
|
|
4751
|
+
};
|
|
4749
4752
|
this.lang = (element) => {
|
|
4750
4753
|
this.closestElement = element.closest('[lang]');
|
|
4751
4754
|
if (this.closestElement) {
|
|
4752
4755
|
if (this.closestElement.lang) {
|
|
4753
4756
|
this.language = this.closestElement.lang;
|
|
4754
|
-
return;
|
|
4757
|
+
return this.language;
|
|
4755
4758
|
}
|
|
4756
4759
|
}
|
|
4757
4760
|
this.language = this.rollbackLanguage;
|
|
4761
|
+
return this.language;
|
|
4758
4762
|
};
|
|
4759
4763
|
this.pluralize = (tag, context) => {
|
|
4760
4764
|
const languagePhrase = this.config[this.language] ? this.config[this.language][tag] : this.config[this.rollbackLanguage][tag];
|
|
@@ -4787,7 +4791,9 @@ class Locale {
|
|
|
4787
4791
|
}
|
|
4788
4792
|
return this.config[this.language] ? this.config[this.language][tag] : this.config[this.rollbackLanguage][tag];
|
|
4789
4793
|
};
|
|
4790
|
-
|
|
4794
|
+
if (configData) {
|
|
4795
|
+
this.set(configData);
|
|
4796
|
+
}
|
|
4791
4797
|
}
|
|
4792
4798
|
}
|
|
4793
4799
|
|