@maggioli-design-system/mds-input-tip 1.1.3 → 1.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.
Files changed (99) hide show
  1. package/dist/cjs/{index-f87612f6.js → index-442db91d.js} +14 -3
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mds-input-tip.cjs.entry.js +2 -2
  4. package/dist/cjs/mds-input-tip.cjs.js +2 -2
  5. package/dist/collection/collection-manifest.json +2 -2
  6. package/dist/collection/common/aria.js +17 -1
  7. package/dist/collection/common/device.js +6 -0
  8. package/dist/collection/common/keyboard-manager.js +2 -2
  9. package/dist/collection/common/locale.js +17 -5
  10. package/dist/collection/components/mds-input-tip/mds-input-tip.css +1 -228
  11. package/dist/collection/dictionary/button.js +1 -0
  12. package/dist/collection/dictionary/file-extensions.js +114 -56
  13. package/dist/collection/dictionary/text.js +60 -1
  14. package/dist/collection/dictionary/variant.js +10 -1
  15. package/dist/collection/type/variant-file-format.js +0 -34
  16. package/dist/components/mds-input-tip.js +1 -1
  17. package/dist/documentation.json +3 -3
  18. package/dist/esm/{index-a04da9f4.js → index-8fed469d.js} +14 -3
  19. package/dist/esm/loader.js +2 -2
  20. package/dist/esm/mds-input-tip.entry.js +2 -2
  21. package/dist/esm/mds-input-tip.js +3 -3
  22. package/dist/esm-es5/index-8fed469d.js +1 -0
  23. package/dist/esm-es5/loader.js +1 -1
  24. package/dist/esm-es5/mds-input-tip.entry.js +1 -1
  25. package/dist/esm-es5/mds-input-tip.js +1 -1
  26. package/dist/mds-input-tip/mds-input-tip.esm.js +1 -1
  27. package/dist/mds-input-tip/mds-input-tip.js +1 -1
  28. package/dist/mds-input-tip/p-37c61f56.system.js +2 -0
  29. package/dist/mds-input-tip/p-3e967425.js +2 -0
  30. package/dist/mds-input-tip/p-4486a5e4.entry.js +1 -0
  31. package/dist/mds-input-tip/{p-ca408384.system.js → p-c915dfb3.system.js} +1 -1
  32. package/dist/mds-input-tip/p-fadf816e.system.entry.js +1 -0
  33. package/dist/stats.json +34 -34
  34. package/dist/types/common/aria.d.ts +3 -1
  35. package/dist/types/common/date.d.ts +1 -1
  36. package/dist/types/common/device.d.ts +2 -0
  37. package/dist/types/common/file.d.ts +3 -4
  38. package/dist/types/common/locale.d.ts +3 -1
  39. package/dist/types/dictionary/file-extensions.d.ts +2 -1
  40. package/dist/types/dictionary/text.d.ts +3 -1
  41. package/dist/types/dictionary/variant.d.ts +2 -1
  42. package/dist/types/stencil-public-runtime.d.ts +6 -0
  43. package/dist/types/type/autocomplete.d.ts +1 -1
  44. package/dist/types/type/button.d.ts +1 -1
  45. package/dist/types/type/header-bar.d.ts +2 -0
  46. package/dist/types/type/input.d.ts +3 -0
  47. package/dist/types/type/text.d.ts +2 -0
  48. package/dist/types/type/variant-file-format.d.ts +4 -4
  49. package/dist/types/type/variant.d.ts +2 -1
  50. package/documentation.json +46 -26
  51. package/package.json +5 -5
  52. package/src/common/aria.ts +22 -2
  53. package/src/common/device.ts +9 -0
  54. package/src/common/file.ts +2 -3
  55. package/src/common/keyboard-manager.ts +2 -2
  56. package/src/common/locale.ts +20 -6
  57. package/src/common/unit.ts +1 -1
  58. package/src/components/mds-input-tip/.gitlab-ci.yml +5 -10
  59. package/src/components/mds-input-tip/mds-input-tip.css +2 -2
  60. package/src/dictionary/button.ts +1 -0
  61. package/src/dictionary/file-extensions.ts +118 -57
  62. package/src/dictionary/text.ts +64 -0
  63. package/src/dictionary/variant.ts +11 -0
  64. package/src/fixtures/icons.json +37 -3
  65. package/src/fixtures/iconsauce.json +26 -1
  66. package/src/meta/file-format/locale.el.json +39 -0
  67. package/src/meta/file-format/locale.en.json +39 -0
  68. package/src/meta/file-format/locale.es.json +39 -0
  69. package/src/meta/file-format/locale.it.json +39 -0
  70. package/src/tailwind/components.css +1 -1
  71. package/src/type/autocomplete.ts +0 -1
  72. package/src/type/button.ts +1 -0
  73. package/src/type/header-bar.ts +11 -0
  74. package/src/type/input.ts +4 -0
  75. package/src/type/text.ts +59 -0
  76. package/src/type/variant-file-format.ts +20 -37
  77. package/src/type/variant.ts +9 -1
  78. package/www/build/mds-input-tip.esm.js +1 -1
  79. package/www/build/mds-input-tip.js +1 -1
  80. package/www/build/p-37c61f56.system.js +2 -0
  81. package/www/build/p-3e967425.js +2 -0
  82. package/www/build/p-4486a5e4.entry.js +1 -0
  83. package/www/build/{p-ca408384.system.js → p-c915dfb3.system.js} +1 -1
  84. package/www/build/p-fadf816e.system.entry.js +1 -0
  85. package/dist/collection/type/language.js +0 -1
  86. package/dist/esm-es5/index-a04da9f4.js +0 -1
  87. package/dist/mds-input-tip/p-14639038.entry.js +0 -1
  88. package/dist/mds-input-tip/p-58828816.system.js +0 -2
  89. package/dist/mds-input-tip/p-96bf634c.js +0 -2
  90. package/dist/mds-input-tip/p-ed74ada1.system.entry.js +0 -1
  91. package/dist/types/interface/input-value.d.ts +0 -4
  92. package/dist/types/type/language.d.ts +0 -1
  93. package/src/interface/input-value.ts +0 -5
  94. package/src/type/language.ts +0 -4
  95. package/www/build/p-14639038.entry.js +0 -1
  96. package/www/build/p-58828816.system.js +0 -2
  97. package/www/build/p-96bf634c.js +0 -2
  98. package/www/build/p-ed74ada1.system.entry.js +0 -1
  99. /package/dist/collection/{interface/input-value.js → type/header-bar.js} +0 -0
package/dist/stats.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
- "timestamp": "2024-09-26T10:58:34",
2
+ "timestamp": "2024-12-04T17:23:48",
3
3
  "compiler": {
4
4
  "name": "node",
5
- "version": "20.10.0"
5
+ "version": "22.11.0"
6
6
  },
7
7
  "app": {
8
8
  "namespace": "MdsInputTip",
@@ -17,6 +17,7 @@
17
17
  "generatedFiles": [
18
18
  "./dist/collection/common/aria.js",
19
19
  "./dist/collection/common/date.js",
20
+ "./dist/collection/common/device.js",
20
21
  "./dist/collection/common/file.js",
21
22
  "./dist/collection/common/icon.js",
22
23
  "./dist/collection/common/keyboard-manager.js",
@@ -46,15 +47,14 @@
46
47
  "./dist/collection/dictionary/variant.js",
47
48
  "./dist/collection/fixtures/cities.js",
48
49
  "./dist/collection/fixtures/filenames.js",
49
- "./dist/collection/interface/input-value.js",
50
50
  "./dist/collection/type/autocomplete.js",
51
51
  "./dist/collection/type/button.js",
52
52
  "./dist/collection/type/date.js",
53
53
  "./dist/collection/type/file-types.js",
54
54
  "./dist/collection/type/floating-ui.js",
55
55
  "./dist/collection/type/form-rel.js",
56
+ "./dist/collection/type/header-bar.js",
56
57
  "./dist/collection/type/input.js",
57
- "./dist/collection/type/language.js",
58
58
  "./dist/collection/type/loading.js",
59
59
  "./dist/collection/type/preference.js",
60
60
  "./dist/collection/type/text.js",
@@ -78,19 +78,19 @@
78
78
  "files": 42,
79
79
  "generatedFiles": [
80
80
  "./dist/cjs/app-globals-3a1e7e63.js",
81
- "./dist/cjs/index-f87612f6.js",
81
+ "./dist/cjs/index-442db91d.js",
82
82
  "./dist/cjs/index.cjs.js",
83
83
  "./dist/cjs/loader.cjs.js",
84
84
  "./dist/cjs/mds-input-tip.cjs.entry.js",
85
85
  "./dist/cjs/mds-input-tip.cjs.js",
86
86
  "./dist/esm-es5/app-globals-0f993ce5.js",
87
- "./dist/esm-es5/index-a04da9f4.js",
87
+ "./dist/esm-es5/index-8fed469d.js",
88
88
  "./dist/esm-es5/index.js",
89
89
  "./dist/esm-es5/loader.js",
90
90
  "./dist/esm-es5/mds-input-tip.entry.js",
91
91
  "./dist/esm-es5/mds-input-tip.js",
92
92
  "./dist/esm/app-globals-0f993ce5.js",
93
- "./dist/esm/index-a04da9f4.js",
93
+ "./dist/esm/index-8fed469d.js",
94
94
  "./dist/esm/index.js",
95
95
  "./dist/esm/loader.js",
96
96
  "./dist/esm/mds-input-tip.entry.js",
@@ -100,25 +100,25 @@
100
100
  "./dist/mds-input-tip/index.esm.js",
101
101
  "./dist/mds-input-tip/mds-input-tip.esm.js",
102
102
  "./dist/mds-input-tip/mds-input-tip.js",
103
- "./dist/mds-input-tip/p-14639038.entry.js",
103
+ "./dist/mds-input-tip/p-37c61f56.system.js",
104
+ "./dist/mds-input-tip/p-3e967425.js",
105
+ "./dist/mds-input-tip/p-4486a5e4.entry.js",
104
106
  "./dist/mds-input-tip/p-50ea2036.system.js",
105
107
  "./dist/mds-input-tip/p-56ba5cbf.system.js",
106
- "./dist/mds-input-tip/p-58828816.system.js",
107
- "./dist/mds-input-tip/p-96bf634c.js",
108
- "./dist/mds-input-tip/p-ca408384.system.js",
108
+ "./dist/mds-input-tip/p-c915dfb3.system.js",
109
109
  "./dist/mds-input-tip/p-e1255160.js",
110
- "./dist/mds-input-tip/p-ed74ada1.system.entry.js",
110
+ "./dist/mds-input-tip/p-fadf816e.system.entry.js",
111
111
  "./www/build/index.esm.js",
112
112
  "./www/build/mds-input-tip.esm.js",
113
113
  "./www/build/mds-input-tip.js",
114
- "./www/build/p-14639038.entry.js",
114
+ "./www/build/p-37c61f56.system.js",
115
+ "./www/build/p-3e967425.js",
116
+ "./www/build/p-4486a5e4.entry.js",
115
117
  "./www/build/p-50ea2036.system.js",
116
118
  "./www/build/p-56ba5cbf.system.js",
117
- "./www/build/p-58828816.system.js",
118
- "./www/build/p-96bf634c.js",
119
- "./www/build/p-ca408384.system.js",
119
+ "./www/build/p-c915dfb3.system.js",
120
120
  "./www/build/p-e1255160.js",
121
- "./www/build/p-ed74ada1.system.entry.js"
121
+ "./www/build/p-fadf816e.system.entry.js"
122
122
  ]
123
123
  },
124
124
  {
@@ -151,12 +151,12 @@
151
151
  "components": [
152
152
  "mds-input-tip"
153
153
  ],
154
- "bundleId": "p-14639038",
155
- "fileName": "p-14639038.entry.js",
154
+ "bundleId": "p-4486a5e4",
155
+ "fileName": "p-4486a5e4.entry.js",
156
156
  "imports": [
157
- "p-96bf634c.js"
157
+ "p-3e967425.js"
158
158
  ],
159
- "originalByteSize": 6818
159
+ "originalByteSize": 2476
160
160
  }
161
161
  ],
162
162
  "esm": [
@@ -168,9 +168,9 @@
168
168
  "bundleId": "mds-input-tip",
169
169
  "fileName": "mds-input-tip.entry.js",
170
170
  "imports": [
171
- "index-a04da9f4.js"
171
+ "index-8fed469d.js"
172
172
  ],
173
- "originalByteSize": 6822
173
+ "originalByteSize": 2480
174
174
  }
175
175
  ],
176
176
  "es5": [
@@ -182,9 +182,9 @@
182
182
  "bundleId": "mds-input-tip",
183
183
  "fileName": "mds-input-tip.entry.js",
184
184
  "imports": [
185
- "index-a04da9f4.js"
185
+ "index-8fed469d.js"
186
186
  ],
187
- "originalByteSize": 6822
187
+ "originalByteSize": 2480
188
188
  }
189
189
  ],
190
190
  "system": [
@@ -193,12 +193,12 @@
193
193
  "components": [
194
194
  "mds-input-tip"
195
195
  ],
196
- "bundleId": "p-ed74ada1.system",
197
- "fileName": "p-ed74ada1.system.entry.js",
196
+ "bundleId": "p-fadf816e.system",
197
+ "fileName": "p-fadf816e.system.entry.js",
198
198
  "imports": [
199
- "p-58828816.system.js"
199
+ "p-37c61f56.system.js"
200
200
  ],
201
- "originalByteSize": 7097
201
+ "originalByteSize": 2755
202
202
  }
203
203
  ],
204
204
  "commonjs": [
@@ -210,9 +210,9 @@
210
210
  "bundleId": "mds-input-tip.cjs",
211
211
  "fileName": "mds-input-tip.cjs.entry.js",
212
212
  "imports": [
213
- "index-f87612f6.js"
213
+ "index-442db91d.js"
214
214
  ],
215
- "originalByteSize": 6892
215
+ "originalByteSize": 2550
216
216
  }
217
217
  ]
218
218
  },
@@ -449,12 +449,13 @@
449
449
  ],
450
450
  "componentGraph": {
451
451
  "sc-mds-input-tip": [
452
- "p-96bf634c.js"
452
+ "p-3e967425.js"
453
453
  ]
454
454
  },
455
455
  "sourceGraph": {
456
456
  "./src/common/aria.ts": [],
457
457
  "./src/common/date.ts": [],
458
+ "./src/common/device.ts": [],
458
459
  "./src/common/file.ts": [],
459
460
  "./src/common/icon.ts": [],
460
461
  "./src/common/keyboard-manager.ts": [],
@@ -498,15 +499,14 @@
498
499
  "./src/dictionary/variant.ts": [],
499
500
  "./src/fixtures/cities.ts": [],
500
501
  "./src/fixtures/filenames.ts": [],
501
- "./src/interface/input-value.ts": [],
502
502
  "./src/type/autocomplete.ts": [],
503
503
  "./src/type/button.ts": [],
504
504
  "./src/type/date.ts": [],
505
505
  "./src/type/file-types.ts": [],
506
506
  "./src/type/floating-ui.ts": [],
507
507
  "./src/type/form-rel.ts": [],
508
+ "./src/type/header-bar.ts": [],
508
509
  "./src/type/input.ts": [],
509
- "./src/type/language.ts": [],
510
510
  "./src/type/loading.ts": [],
511
511
  "./src/type/preference.ts": [],
512
512
  "./src/type/text.ts": [],
@@ -1,5 +1,7 @@
1
1
  declare const unslugName: (name: string) => string;
2
2
  declare const setAttributeIfEmpty: (element: HTMLElement, attribute: string, value: string) => string;
3
+ declare const removeAttributesIf: (element: HTMLElement, attribute: string, valueCheck: string | undefined, cleanAttributes: string | string[]) => boolean;
4
+ declare const ifAttribute: (element: HTMLElement, attribute: string, valueCheck?: string) => boolean;
3
5
  declare const hashValue: (value: string) => string;
4
6
  declare const hashRandomValue: (value?: string) => string;
5
- export { unslugName, setAttributeIfEmpty, hashRandomValue, hashValue, };
7
+ export { hashRandomValue, hashValue, removeAttributesIf, setAttributeIfEmpty, ifAttribute, unslugName, };
@@ -1,4 +1,4 @@
1
- import { ISO8601Date } from '@type/date';
1
+ import { ISO8601Date } from "../type/date";
2
2
  declare const isISO8601Date: (dateString: string) => boolean;
3
3
  declare const sanitizeISO8601Date: (dateString: string) => ISO8601Date;
4
4
  export { sanitizeISO8601Date, isISO8601Date, };
@@ -0,0 +1,2 @@
1
+ declare const isMobileDevice: () => boolean;
2
+ export { isMobileDevice, };
@@ -1,9 +1,8 @@
1
- import { ExtensionInfo } from '@dictionary/file-extensions';
1
+ import { ExtensionInfo } from "../dictionary/file-extensions";
2
+ import { ThemeFullVariantType } from "../type/variant";
2
3
  interface FileFormatsVariants {
3
- color: string;
4
4
  icon: string;
5
- iconBackground: string;
6
- variant: string;
5
+ variant: ThemeFullVariantType;
7
6
  }
8
7
  declare const getName: (rawFilename: string) => string;
9
8
  declare const getSuffix: (rawFilename: string, suffixOverride?: string) => string;
@@ -9,9 +9,11 @@ export declare class Locale {
9
9
  language: string;
10
10
  config: LocaleConfig;
11
11
  closestElement: HTMLElement;
12
+ element: HTMLElement;
12
13
  constructor(configData?: LocaleConfig);
13
14
  set: (configData: LocaleConfig) => void;
14
- lang: (element: HTMLElement) => string;
15
+ lang: (el: HTMLElement) => string;
16
+ update: (doc?: Document | ShadowRoot) => void;
15
17
  private pluralize;
16
18
  get: (tag: string | string[], context?: Record<string, string | number>) => string;
17
19
  }
@@ -1,9 +1,10 @@
1
+ import { FileFormat } from "../type/variant-file-format";
1
2
  interface FileExtenstion {
2
3
  [key: string]: ExtensionInfo;
3
4
  }
4
5
  interface ExtensionInfo {
5
6
  preview?: boolean;
6
- format: string;
7
+ format: FileFormat;
7
8
  description: string;
8
9
  }
9
10
  declare const fileExtensionsDictionary: FileExtenstion;
@@ -1,2 +1,4 @@
1
+ declare const typographyTagDictionary: string[];
2
+ declare const typographyHeadingTagDictionary: string[];
1
3
  declare const truncateDictionary: string[];
2
- export { truncateDictionary, };
4
+ export { truncateDictionary, typographyHeadingTagDictionary, typographyTagDictionary, };
@@ -5,8 +5,9 @@ declare const themeFullVariantDictionary: string[];
5
5
  declare const themeFullVariantAvatarDictionary: string[];
6
6
  declare const themeLabelVariantDictionary: string[];
7
7
  declare const toneVariantDictionary: string[];
8
+ declare const themeVariantChipDictionary: string[];
8
9
  declare const toneActionVariantDictionary: string[];
9
10
  declare const toneSimpleVariantDictionary: string[];
10
11
  declare const toneSmartVariantDictionary: string[];
11
12
  declare const toneMinimalVariantDictionary: string[];
12
- export { themeFullVariantAvatarDictionary, themeFullVariantDictionary, themeLabelVariantDictionary, themeLuminanceVariantDictionary, themeStatusVariantDictionary, themeVariantDictionary, toneActionVariantDictionary, toneMinimalVariantDictionary, toneSimpleVariantDictionary, toneSmartVariantDictionary, toneVariantDictionary, };
13
+ export { themeFullVariantAvatarDictionary, themeFullVariantDictionary, themeLabelVariantDictionary, themeLuminanceVariantDictionary, themeStatusVariantDictionary, themeVariantDictionary, themeVariantChipDictionary, toneActionVariantDictionary, toneMinimalVariantDictionary, toneSimpleVariantDictionary, toneSmartVariantDictionary, toneVariantDictionary, };
@@ -1015,6 +1015,8 @@ export declare namespace JSXBase {
1015
1015
  autoPlay?: boolean;
1016
1016
  autoplay?: boolean | string;
1017
1017
  controls?: boolean;
1018
+ controlslist?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';
1019
+ controlsList?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';
1018
1020
  crossOrigin?: string;
1019
1021
  crossorigin?: string;
1020
1022
  loop?: boolean;
@@ -1564,6 +1566,10 @@ export declare namespace JSXBase {
1564
1566
  onSubmitCapture?: (event: Event) => void;
1565
1567
  onInvalid?: (event: Event) => void;
1566
1568
  onInvalidCapture?: (event: Event) => void;
1569
+ onBeforeToggle?: (event: Event) => void;
1570
+ onBeforeToggleCapture?: (event: Event) => void;
1571
+ onToggle?: (event: Event) => void;
1572
+ onToggleCapture?: (event: Event) => void;
1567
1573
  onLoad?: (event: Event) => void;
1568
1574
  onLoadCapture?: (event: Event) => void;
1569
1575
  onError?: (event: Event) => void;
@@ -1,2 +1,2 @@
1
- export type AutocompleteType = 'additional-name' | 'address' | 'address-level1' | 'address-level2' | 'address-level3' | 'address-level4' | 'address-line1' | 'address-line2' | 'address-line3' | 'bday' | 'bday-day' | 'bday-month' | 'bday-year' | 'cc-additional-name' | 'cc-csc' | 'cc-exp' | 'cc-exp-month' | 'cc-exp-year' | 'cc-family-name' | 'cc-family-name' | 'cc-given-name' | 'cc-name' | 'cc-number' | 'cc-type' | 'country' | 'country-name' | 'current-password' | 'email' | 'family-name' | 'given-name' | 'honorific-prefix' | 'honorific-suffix' | 'impp' | 'language' | 'name' | 'new-password' | 'nickname' | 'off' | 'on' | 'one-time-code' | 'organization' | 'organization-title' | 'photo' | 'postal-code' | 'sex' | 'street-address' | 'tel' | 'tel-area-code' | 'tel-country-code' | 'tel-extension' | 'tel-local' | 'tel-national' | 'transaction-amount' | 'transaction-currency' | 'url' | 'username';
1
+ export type AutocompleteType = 'additional-name' | 'address' | 'address-level1' | 'address-level2' | 'address-level3' | 'address-level4' | 'address-line1' | 'address-line2' | 'address-line3' | 'bday' | 'bday-day' | 'bday-month' | 'bday-year' | 'cc-additional-name' | 'cc-csc' | 'cc-exp' | 'cc-exp-month' | 'cc-exp-year' | 'cc-family-name' | 'cc-given-name' | 'cc-name' | 'cc-number' | 'cc-type' | 'country' | 'country-name' | 'current-password' | 'email' | 'family-name' | 'given-name' | 'honorific-prefix' | 'honorific-suffix' | 'impp' | 'language' | 'name' | 'new-password' | 'nickname' | 'off' | 'on' | 'one-time-code' | 'organization' | 'organization-title' | 'photo' | 'postal-code' | 'sex' | 'street-address' | 'tel' | 'tel-area-code' | 'tel-country-code' | 'tel-extension' | 'tel-local' | 'tel-national' | 'transaction-amount' | 'transaction-currency' | 'url' | 'username';
2
2
  export type InputTextType = 'date' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'textarea' | 'time' | 'url';
@@ -2,4 +2,4 @@ export type ButtonType = 'a' | 'button' | 'reset' | 'submit';
2
2
  export type ButtonTargetType = 'self' | 'blank';
3
3
  export type ButtonSizeType = 'sm' | 'md' | 'lg' | 'xl';
4
4
  export type ButtonIconPositionType = 'left' | 'right';
5
- export type ButtonVariantType = 'primary' | 'dark' | 'light' | 'error' | 'info' | 'success' | 'warning';
5
+ export type ButtonVariantType = 'primary' | 'secondary' | 'dark' | 'light' | 'error' | 'info' | 'success' | 'warning';
@@ -0,0 +1,2 @@
1
+ export type HeaderBarMenuType = 'all' | 'desktop' | 'mobile' | 'none';
2
+ export type HeaderBarNavType = 'all' | 'desktop' | 'mobile' | 'none';
@@ -2,3 +2,6 @@ export type InputControlsLayoutType = 'horizontal' | 'vertical';
2
2
  export type InputControlsIconType = 'arrow' | 'arithmetic';
3
3
  export type InputValueType = null | number | string | undefined;
4
4
  export type InputTextType = 'date' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'textarea' | 'time' | 'url';
5
+ export interface MdsInputEventDetail {
6
+ value?: File | string | FormData | null;
7
+ }
@@ -1 +1,3 @@
1
+ export type TypographyTagType = 'abbr' | 'address' | 'article' | 'b' | 'bdo' | 'blockquote' | 'cite' | 'code' | 'dd' | 'del' | 'details' | 'dfn' | 'div' | 'dl' | 'dt' | 'em' | 'figcaption' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'i' | 'ins' | 'kbd' | 'label' | 'legend' | 'li' | 'mark' | 'ol' | 'p' | 'pre' | 'q' | 'rb' | 'rt' | 'ruby' | 's' | 'samp' | 'small' | 'span' | 'strong' | 'sub' | 'summary' | 'sup' | 'time' | 'u' | 'ul' | 'var';
2
+ export type TypographyHeadingTagType = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
1
3
  export type TypographyTruncateType = 'all' | 'none' | 'word';
@@ -1,11 +1,11 @@
1
+ import { ThemeFullVariantType } from "./variant";
2
+ type FileFormat = 'archive' | 'attachment' | 'audio' | 'code' | 'data' | 'document' | 'email' | 'executable' | 'image' | 'markup' | 'slide' | 'spreadsheet' | 'text' | 'vector' | 'video';
1
3
  interface FileFormatVariant {
2
- color: string;
3
4
  icon: string;
4
- iconBackground: string;
5
- variant: string;
5
+ variant: ThemeFullVariantType;
6
6
  }
7
7
  interface FileFormatVariants {
8
8
  [key: string]: FileFormatVariant;
9
9
  }
10
10
  declare const fileFormatsVariant: FileFormatVariants;
11
- export { fileFormatsVariant, FileFormatVariant, FileFormatVariants, };
11
+ export { fileFormatsVariant, FileFormat, FileFormatVariant, FileFormatVariants, };
@@ -5,8 +5,9 @@ export type ThemeFullVariantAvatarType = 'amaranth' | 'aqua' | 'blue' | 'error'
5
5
  export type ThemeLuminanceVariantType = 'dark' | 'light';
6
6
  export type LabelVariantType = 'amaranth' | 'aqua' | 'blue' | 'green' | 'lime' | 'orange' | 'orchid' | 'sky' | 'violet' | 'yellow';
7
7
  export type ActionVariantType = 'primary' | 'dark' | 'light';
8
+ export type ChipVariantType = 'primary' | 'secondary' | 'dark' | 'error' | 'info' | 'success' | 'warning';
8
9
  export type StateVariantType = 'disabled' | 'focused' | 'readonly';
9
- export type ToneActionVariantType = 'primary' | 'secondary' | 'tertiary' | 'strong' | 'weak' | 'ghost' | 'quiet';
10
+ export type ToneActionVariantType = 'primary' | 'secondary' | 'strong' | 'weak' | 'ghost' | 'quiet';
10
11
  export type ToneVariantType = 'strong' | 'weak' | 'ghost' | 'quiet';
11
12
  export type ToneSimpleVariantType = 'quiet' | 'strong' | 'weak';
12
13
  export type ToneMinimalVariantType = 'strong' | 'weak';
@@ -1,9 +1,9 @@
1
1
  {
2
- "timestamp": "2024-09-26T07:00:37",
2
+ "timestamp": "2024-12-04T15:30:05",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
- "version": "4.21.0",
6
- "typescriptVersion": "5.5.3"
5
+ "version": "4.22.2",
6
+ "typescriptVersion": "5.5.4"
7
7
  },
8
8
  "components": [
9
9
  {
@@ -114,6 +114,11 @@
114
114
  "docstring": "",
115
115
  "path": "src/components/mds-accordion-item/meta/event-detail.ts"
116
116
  },
117
+ "src/components/mds-accordion-timer/meta/event-detail.ts::MdsAccordionTimerEventDetail": {
118
+ "declaration": "export interface MdsAccordionTimerEventDetail {\n index: number;\n}",
119
+ "docstring": "",
120
+ "path": "src/components/mds-accordion-timer/meta/event-detail.ts"
121
+ },
117
122
  "src/components/mds-accordion-timer-item/meta/event-detail.ts::MdsAccordionTimerItemEventDetail": {
118
123
  "declaration": "export interface MdsAccordionTimerItemEventDetail {\n selected: boolean;\n uuid: number;\n}",
119
124
  "docstring": "",
@@ -200,7 +205,7 @@
200
205
  "path": "src/type/button.ts"
201
206
  },
202
207
  "src/type/button.ts::ButtonVariantType": {
203
- "declaration": "export type ButtonVariantType =\n | 'primary'\n | 'dark'\n | 'light'\n | 'error'\n | 'info'\n | 'success'\n | 'warning'",
208
+ "declaration": "export type ButtonVariantType =\n | 'primary'\n | 'secondary'\n | 'dark'\n | 'light'\n | 'error'\n | 'info'\n | 'success'\n | 'warning'",
204
209
  "docstring": "",
205
210
  "path": "src/type/button.ts"
206
211
  },
@@ -214,6 +219,11 @@
214
219
  "docstring": "",
215
220
  "path": "src/type/button.ts"
216
221
  },
222
+ "src/type/variant.ts::ChipVariantType": {
223
+ "declaration": "export type ChipVariantType =\n | 'primary'\n | 'secondary'\n | 'dark'\n | 'error'\n | 'info'\n | 'success'\n | 'warning'",
224
+ "docstring": "",
225
+ "path": "src/type/variant.ts"
226
+ },
217
227
  "src/components/mds-chip/meta/interface.ts::MdsChipEvent": {
218
228
  "declaration": "interface MdsChipEvent {\n event: Event\n element: HTMLMdsChipElement\n}",
219
229
  "docstring": "",
@@ -255,7 +265,7 @@
255
265
  "path": "src/type/text.ts"
256
266
  },
257
267
  "src/components/mds-file-preview/meta/event-detail.ts::MdsFilePreviewEventDetail": {
258
- "declaration": "export interface MdsFilePreviewEventDetail {\n extension: string\n filename: string\n target: HTMLMdsFileElement\n}",
268
+ "declaration": "export interface MdsFilePreviewEventDetail {\n extension: string\n filename: string\n target: HTMLMdsFilePreviewElement\n}",
259
269
  "docstring": "",
260
270
  "path": "src/components/mds-file-preview/meta/event-detail.ts"
261
271
  },
@@ -269,10 +279,15 @@
269
279
  "docstring": "",
270
280
  "path": "src/components/mds-filter-item/meta/event-detail.ts"
271
281
  },
272
- "src/components/mds-header-bar/meta/types.ts::MenuType": {
273
- "declaration": "export type MenuType =\n | 'all'\n | 'desktop'\n | 'mobile'\n | 'none'",
282
+ "src/type/header-bar.ts::HeaderBarMenuType": {
283
+ "declaration": "export type HeaderBarMenuType =\n | 'all'\n | 'desktop'\n | 'mobile'\n | 'none'",
274
284
  "docstring": "",
275
- "path": "src/components/mds-header-bar/meta/types.ts"
285
+ "path": "src/type/header-bar.ts"
286
+ },
287
+ "src/type/header-bar.ts::HeaderBarNavType": {
288
+ "declaration": "export type HeaderBarNavType =\n | 'all'\n | 'desktop'\n | 'mobile'\n | 'none'",
289
+ "docstring": "",
290
+ "path": "src/type/header-bar.ts"
276
291
  },
277
292
  "src/components/mds-header/meta/event-detail.ts::MdsHeaderEventDetail": {
278
293
  "declaration": "export interface MdsHeaderEventDetail {\n bar: HTMLMdsHeaderBarElement\n}",
@@ -310,7 +325,7 @@
310
325
  "path": "src/components/mds-img/meta/event-detail.ts"
311
326
  },
312
327
  "src/type/autocomplete.ts::AutocompleteType": {
313
- "declaration": "export type AutocompleteType =\n | 'additional-name'\n | 'address'\n | 'address-level1'\n | 'address-level2'\n | 'address-level3'\n | 'address-level4'\n | 'address-line1'\n | 'address-line2'\n | 'address-line3'\n | 'bday'\n | 'bday-day'\n | 'bday-month'\n | 'bday-year'\n | 'cc-additional-name'\n | 'cc-csc'\n | 'cc-exp'\n | 'cc-exp-month'\n | 'cc-exp-year'\n | 'cc-family-name'\n | 'cc-family-name'\n | 'cc-given-name'\n | 'cc-name'\n | 'cc-number'\n | 'cc-type'\n | 'country'\n | 'country-name'\n | 'current-password'\n | 'email'\n | 'family-name'\n | 'given-name'\n | 'honorific-prefix'\n | 'honorific-suffix'\n | 'impp'\n | 'language'\n | 'name'\n | 'new-password'\n | 'nickname'\n | 'off'\n | 'on'\n | 'one-time-code'\n | 'organization'\n | 'organization-title'\n | 'photo'\n | 'postal-code'\n | 'sex'\n | 'street-address'\n | 'tel'\n | 'tel-area-code'\n | 'tel-country-code'\n | 'tel-extension'\n | 'tel-local'\n | 'tel-national'\n | 'transaction-amount'\n | 'transaction-currency'\n | 'url'\n | 'username'",
328
+ "declaration": "export type AutocompleteType =\n | 'additional-name'\n | 'address'\n | 'address-level1'\n | 'address-level2'\n | 'address-level3'\n | 'address-level4'\n | 'address-line1'\n | 'address-line2'\n | 'address-line3'\n | 'bday'\n | 'bday-day'\n | 'bday-month'\n | 'bday-year'\n | 'cc-additional-name'\n | 'cc-csc'\n | 'cc-exp'\n | 'cc-exp-month'\n | 'cc-exp-year'\n | 'cc-family-name'\n | 'cc-given-name'\n | 'cc-name'\n | 'cc-number'\n | 'cc-type'\n | 'country'\n | 'country-name'\n | 'current-password'\n | 'email'\n | 'family-name'\n | 'given-name'\n | 'honorific-prefix'\n | 'honorific-suffix'\n | 'impp'\n | 'language'\n | 'name'\n | 'new-password'\n | 'nickname'\n | 'off'\n | 'on'\n | 'one-time-code'\n | 'organization'\n | 'organization-title'\n | 'photo'\n | 'postal-code'\n | 'sex'\n | 'street-address'\n | 'tel'\n | 'tel-area-code'\n | 'tel-country-code'\n | 'tel-extension'\n | 'tel-local'\n | 'tel-national'\n | 'transaction-amount'\n | 'transaction-currency'\n | 'url'\n | 'username'",
314
329
  "docstring": "",
315
330
  "path": "src/type/autocomplete.ts"
316
331
  },
@@ -339,10 +354,10 @@
339
354
  "docstring": "",
340
355
  "path": "src/type/typography.ts"
341
356
  },
342
- "src/components/mds-input/meta/event-detail.ts::MdsInputEventDetail": {
343
- "declaration": "export interface MdsInputEventDetail {\n value?: string\n}",
357
+ "src/type/input.ts::MdsInputEventDetail": {
358
+ "declaration": "export interface MdsInputEventDetail {\n value?: File | string | FormData | null\n}",
344
359
  "docstring": "",
345
- "path": "src/components/mds-input/meta/event-detail.ts"
360
+ "path": "src/type/input.ts"
346
361
  },
347
362
  "src/components/mds-input-field/meta/types.ts::InputFieldType": {
348
363
  "declaration": "export type InputFieldType =\n | 'date'\n | 'email'\n | 'number'\n | 'password'\n | 'search'\n | 'tel'\n | 'text'\n | 'textarea'\n | 'time'\n | 'url'\n | 'cc'\n | 'cf'\n | 'isbn'\n | 'piva'",
@@ -359,11 +374,6 @@
359
374
  "docstring": "",
360
375
  "path": "src/components/mds-input-field/meta/validators.ts"
361
376
  },
362
- "src/interface/input-value.ts::InputValue": {
363
- "declaration": "export interface InputValue {\n value: InputValueType\n}",
364
- "docstring": "",
365
- "path": "src/interface/input-value.ts"
366
- },
367
377
  "src/components/mds-input-switch/meta/types.ts::InputSwitchSizeType": {
368
378
  "declaration": "export type InputSwitchSizeType =\n | 'sm'\n | 'md'\n | 'lg'",
369
379
  "docstring": "",
@@ -410,7 +420,12 @@
410
420
  "path": "src/type/typography.ts"
411
421
  },
412
422
  "src/components/mds-modal/meta/types.ts::ModalPositionType": {
413
- "declaration": "export type ModalPositionType =\n | 'bottom'\n | 'center'\n | 'left'\n | 'right'\n | 'top'",
423
+ "declaration": "export type ModalPositionType =\n | 'bottom'\n | 'bottom-left'\n | 'bottom-right'\n | 'center'\n | 'left'\n | 'right'\n | 'top'\n | 'top-left'\n | 'top-right'",
424
+ "docstring": "",
425
+ "path": "src/components/mds-modal/meta/types.ts"
426
+ },
427
+ "src/components/mds-modal/meta/types.ts::ModalAnimationStateType": {
428
+ "declaration": "export type ModalAnimationStateType =\n | 'intro'\n | 'none'\n | 'outro'",
414
429
  "docstring": "",
415
430
  "path": "src/components/mds-modal/meta/types.ts"
416
431
  },
@@ -449,13 +464,8 @@
449
464
  "docstring": "",
450
465
  "path": "src/components/mds-pref-contrast/meta/types.ts"
451
466
  },
452
- "src/type/language.ts::LanguageType": {
453
- "declaration": "export type LanguageType =\n | 'auto'\n | `${Lowercase<string>}${Lowercase<string>}`\n | `${Lowercase<string>}${Lowercase<string>}${Lowercase<string>}`",
454
- "docstring": "",
455
- "path": "src/type/language.ts"
456
- },
457
467
  "src/event-detail/language.ts::MdsPrefLanguageEventDetail": {
458
- "declaration": "export interface MdsPrefLanguageEventDetail {\n language?: LanguageType\n}",
468
+ "declaration": "export interface MdsPrefLanguageEventDetail {\n /* A string representing the language version as defined in {@link https://datatracker.ietf.org/doc/html/rfc5646 RFC 5646: Tags for Identifying Languages (also known as BCP 47)}.\n *\n * `Examples of valid language codes include \"en\", \"en-US\", \"fr\", \"fr-FR\", \"es-ES\", etc.`\n */\n language?: string\n}",
459
469
  "docstring": "",
460
470
  "path": "src/event-detail/language.ts"
461
471
  },
@@ -499,6 +509,11 @@
499
509
  "docstring": "",
500
510
  "path": "src/components/mds-push-notification/meta/event-detail.ts"
501
511
  },
512
+ "src/type/text.ts::TypographyHeadingTagType": {
513
+ "declaration": "export type TypographyHeadingTagType =\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'",
514
+ "docstring": "",
515
+ "path": "src/type/text.ts"
516
+ },
502
517
  "src/components/mds-stepper-bar/meta/event-detail.ts::MdsStepperBarEventDetail": {
503
518
  "declaration": "export interface MdsStepperBarEventDetail {\n step: number\n value: string\n}",
504
519
  "docstring": "",
@@ -529,15 +544,20 @@
529
544
  "docstring": "",
530
545
  "path": "src/components/mds-tab-item/meta/event-detail.ts"
531
546
  },
547
+ "src/components/mds-table-header-cell/meta/types.ts::SortDirectionType": {
548
+ "declaration": "export type SortDirectionType =\n | 'ascending'\n | 'descending'\n | 'none'",
549
+ "docstring": "",
550
+ "path": "src/components/mds-table-header-cell/meta/types.ts"
551
+ },
532
552
  "src/components/mds-text/meta/types.ts::TextAnimationType": {
533
553
  "declaration": "export type TextAnimationType =\n | 'none'\n | 'yugop'",
534
554
  "docstring": "",
535
555
  "path": "src/components/mds-text/meta/types.ts"
536
556
  },
537
- "src/components/mds-text/meta/types.ts::TypographyTagType": {
557
+ "src/type/text.ts::TypographyTagType": {
538
558
  "declaration": "export type TypographyTagType =\n | 'abbr'\n | 'address'\n | 'article'\n | 'b'\n | 'bdo'\n | 'blockquote'\n | 'cite'\n | 'code'\n | 'dd'\n | 'del'\n | 'details'\n | 'dfn'\n | 'div'\n | 'dl'\n | 'dt'\n | 'em'\n | 'figcaption'\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'\n | 'i'\n | 'ins'\n | 'kbd'\n | 'label'\n | 'legend'\n | 'li'\n | 'mark'\n | 'ol'\n | 'p'\n | 'pre'\n | 'q'\n | 'rb'\n | 'rt'\n | 'ruby'\n | 's'\n | 'samp'\n | 'small'\n | 'span'\n | 'strong'\n | 'sub'\n | 'summary'\n | 'sup'\n | 'time'\n | 'u'\n | 'ul'\n | 'var'",
539
559
  "docstring": "",
540
- "path": "src/components/mds-text/meta/types.ts"
560
+ "path": "src/type/text.ts"
541
561
  },
542
562
  "src/type/variant.ts::ThemeLuminanceVariantType": {
543
563
  "declaration": "export type ThemeLuminanceVariantType =\n | 'dark'\n | 'light'",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maggioli-design-system/mds-input-tip",
3
- "version": "1.1.3",
4
- "description": "mds-input-tip is a web-component from Magma Design System, built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the JavaScirpt framework you are using.",
3
+ "version": "1.2.2",
4
+ "description": "mds-input-tip is a web-component from Magma Design System, built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the JavaScript framework you are using.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
7
7
  "es2015": "dist/esm/index.mjs",
@@ -24,9 +24,9 @@
24
24
  "test": "stencil test --spec --e2e"
25
25
  },
26
26
  "dependencies": {
27
- "@maggioli-design-system/mds-input-tip-item": "1.1.3",
28
- "@maggioli-design-system/styles": "15.3.2",
29
- "@stencil/core": "4.21.0"
27
+ "@maggioli-design-system/mds-input-tip-item": "1.2.2",
28
+ "@maggioli-design-system/styles": "15.5.0",
29
+ "@stencil/core": "4.22.2"
30
30
  },
31
31
  "license": "MIT",
32
32
  "author": {
@@ -20,6 +20,24 @@ const setAttributeIfEmpty = (element: HTMLElement, attribute: string, value: str
20
20
  return value
21
21
  }
22
22
 
23
+ const removeAttributesIf = (element: HTMLElement, attribute: string, valueCheck: string = 'true', cleanAttributes: string | string[]): boolean => {
24
+ if (ifAttribute(element, attribute, valueCheck)) {
25
+ const attributesList = Array.isArray(cleanAttributes) ? cleanAttributes : [cleanAttributes]
26
+ attributesList.forEach(attributeToRemove => {
27
+ element.removeAttribute(attributeToRemove)
28
+ })
29
+ return true
30
+ }
31
+ return false
32
+ }
33
+
34
+ const ifAttribute = (element: HTMLElement, attribute: string, valueCheck: string = 'true'): boolean => {
35
+ if (element.hasAttribute(attribute) && element.getAttribute(attribute) === valueCheck) {
36
+ return true
37
+ }
38
+ return false
39
+ }
40
+
23
41
  const hashValue = (value: string): string => `${value}-${hash(value)}`
24
42
 
25
43
  const hashRandomValue = (value?: string): string => {
@@ -32,8 +50,10 @@ const hashRandomValue = (value?: string): string => {
32
50
  }
33
51
 
34
52
  export {
35
- unslugName,
36
- setAttributeIfEmpty,
37
53
  hashRandomValue,
38
54
  hashValue,
55
+ removeAttributesIf,
56
+ setAttributeIfEmpty,
57
+ ifAttribute,
58
+ unslugName,
39
59
  }
@@ -0,0 +1,9 @@
1
+ const isMobileDevice = (): boolean => {
2
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3
+ const userAgent = navigator.userAgent || navigator.vendor || (window as any).opera
4
+ return /android|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(userAgent)
5
+ }
6
+
7
+ export {
8
+ isMobileDevice,
9
+ }
@@ -1,11 +1,10 @@
1
1
  import { fileExtensionsDictionary, ExtensionInfo } from '@dictionary/file-extensions'
2
2
  import { fileFormatsVariant } from '@type/variant-file-format'
3
+ import { ThemeFullVariantType } from '@type/variant'
3
4
 
4
5
  interface FileFormatsVariants {
5
- color: string
6
6
  icon: string
7
- iconBackground: string
8
- variant: string
7
+ variant: ThemeFullVariantType
9
8
  }
10
9
 
11
10
  const sanitizeFilename = (filename: string, error: string = 'Attribute "filename" is undefined.') => {