@maggioli-design-system/mds-input-range 1.2.3 → 2.0.1

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 (107) hide show
  1. package/dist/cjs/{index-a544b1ef.js → index-f984e289.js} +14 -3
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mds-input-range.cjs.entry.js +6 -5
  4. package/dist/cjs/mds-input-range.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-range/mds-input-range.css +16 -270
  11. package/dist/collection/components/mds-input-range/mds-input-range.js +4 -3
  12. package/dist/collection/components/mds-input-range/test/mds-input-range.stories.js +4 -4
  13. package/dist/collection/dictionary/button.js +1 -0
  14. package/dist/collection/dictionary/file-extensions.js +114 -56
  15. package/dist/collection/dictionary/text.js +60 -1
  16. package/dist/collection/dictionary/variant.js +10 -1
  17. package/dist/collection/type/variant-file-format.js +0 -34
  18. package/dist/components/mds-input-range.js +5 -4
  19. package/dist/documentation.json +3 -3
  20. package/dist/esm/{index-9cf44097.js → index-e0ac0a55.js} +14 -3
  21. package/dist/esm/loader.js +2 -2
  22. package/dist/esm/mds-input-range.entry.js +6 -5
  23. package/dist/esm/mds-input-range.js +3 -3
  24. package/dist/esm-es5/index-e0ac0a55.js +1 -0
  25. package/dist/esm-es5/loader.js +1 -1
  26. package/dist/esm-es5/mds-input-range.entry.js +1 -1
  27. package/dist/esm-es5/mds-input-range.js +1 -1
  28. package/dist/mds-input-range/mds-input-range.esm.js +1 -1
  29. package/dist/mds-input-range/mds-input-range.js +1 -1
  30. package/dist/mds-input-range/p-48fdc5db.system.entry.js +1 -0
  31. package/dist/mds-input-range/p-4e0b934e.system.js +2 -0
  32. package/dist/mds-input-range/{p-ca462756.system.js → p-76412b19.system.js} +1 -1
  33. package/dist/mds-input-range/p-d697edb0.entry.js +1 -0
  34. package/dist/mds-input-range/p-f6cc8c2e.js +2 -0
  35. package/dist/stats.json +36 -35
  36. package/dist/types/common/aria.d.ts +3 -1
  37. package/dist/types/common/date.d.ts +1 -1
  38. package/dist/types/common/device.d.ts +2 -0
  39. package/dist/types/common/file.d.ts +3 -4
  40. package/dist/types/common/locale.d.ts +3 -1
  41. package/dist/types/components/mds-input-range/mds-input-range.d.ts +1 -0
  42. package/dist/types/components/mds-input-range/test/mds-input-range.stories.d.ts +0 -4
  43. package/dist/types/dictionary/file-extensions.d.ts +2 -1
  44. package/dist/types/dictionary/text.d.ts +3 -1
  45. package/dist/types/dictionary/variant.d.ts +2 -1
  46. package/dist/types/stencil-public-runtime.d.ts +6 -0
  47. package/dist/types/type/autocomplete.d.ts +1 -1
  48. package/dist/types/type/button.d.ts +1 -1
  49. package/dist/types/type/header-bar.d.ts +2 -0
  50. package/dist/types/type/input.d.ts +3 -0
  51. package/dist/types/type/text.d.ts +2 -0
  52. package/dist/types/type/variant-file-format.d.ts +4 -4
  53. package/dist/types/type/variant.d.ts +2 -1
  54. package/documentation.json +48 -28
  55. package/package.json +5 -5
  56. package/readme.md +12 -1
  57. package/src/common/aria.ts +22 -2
  58. package/src/common/device.ts +9 -0
  59. package/src/common/file.ts +2 -3
  60. package/src/common/keyboard-manager.ts +2 -2
  61. package/src/common/locale.ts +20 -6
  62. package/src/common/unit.ts +1 -1
  63. package/src/components/mds-input-range/.gitlab-ci.yml +5 -10
  64. package/src/components/mds-input-range/css/mds-input-range-pref-theme.css +4 -4
  65. package/src/components/mds-input-range/mds-input-range.css +14 -22
  66. package/src/components/mds-input-range/mds-input-range.tsx +3 -0
  67. package/src/components/mds-input-range/test/mds-input-range.stories.tsx +4 -4
  68. package/src/dictionary/button.ts +1 -0
  69. package/src/dictionary/file-extensions.ts +118 -57
  70. package/src/dictionary/text.ts +64 -0
  71. package/src/dictionary/variant.ts +11 -0
  72. package/src/fixtures/icons.json +37 -3
  73. package/src/fixtures/iconsauce.json +26 -1
  74. package/src/meta/file-format/locale.el.json +39 -0
  75. package/src/meta/file-format/locale.en.json +39 -0
  76. package/src/meta/file-format/locale.es.json +39 -0
  77. package/src/meta/file-format/locale.it.json +39 -0
  78. package/src/tailwind/components.css +1 -1
  79. package/src/type/autocomplete.ts +0 -1
  80. package/src/type/button.ts +1 -0
  81. package/src/type/header-bar.ts +11 -0
  82. package/src/type/input.ts +4 -0
  83. package/src/type/text.ts +59 -0
  84. package/src/type/variant-file-format.ts +20 -37
  85. package/src/type/variant.ts +9 -1
  86. package/www/build/mds-input-range.esm.js +1 -1
  87. package/www/build/mds-input-range.js +1 -1
  88. package/www/build/p-48fdc5db.system.entry.js +1 -0
  89. package/www/build/p-4e0b934e.system.js +2 -0
  90. package/www/build/{p-ca462756.system.js → p-76412b19.system.js} +1 -1
  91. package/www/build/p-d697edb0.entry.js +1 -0
  92. package/www/build/p-f6cc8c2e.js +2 -0
  93. package/dist/collection/type/language.js +0 -1
  94. package/dist/esm-es5/index-9cf44097.js +0 -1
  95. package/dist/mds-input-range/p-47995aad.system.entry.js +0 -1
  96. package/dist/mds-input-range/p-51b9684c.system.js +0 -2
  97. package/dist/mds-input-range/p-54651c4c.js +0 -2
  98. package/dist/mds-input-range/p-b8731af1.entry.js +0 -1
  99. package/dist/types/interface/input-value.d.ts +0 -4
  100. package/dist/types/type/language.d.ts +0 -1
  101. package/src/interface/input-value.ts +0 -5
  102. package/src/type/language.ts +0 -4
  103. package/www/build/p-47995aad.system.entry.js +0 -1
  104. package/www/build/p-51b9684c.system.js +0 -2
  105. package/www/build/p-54651c4c.js +0 -2
  106. package/www/build/p-b8731af1.entry.js +0 -1
  107. /package/dist/collection/{interface/input-value.js → type/header-bar.js} +0 -0
@@ -4,28 +4,24 @@ declare const _default: {
4
4
  min: {
5
5
  type: {
6
6
  name: string;
7
- required: boolean;
8
7
  };
9
8
  description: string;
10
9
  };
11
10
  max: {
12
11
  type: {
13
12
  name: string;
14
- required: boolean;
15
13
  };
16
14
  description: string;
17
15
  };
18
16
  step: {
19
17
  type: {
20
18
  name: string;
21
- required: boolean;
22
19
  };
23
20
  description: string;
24
21
  };
25
22
  value: {
26
23
  type: {
27
24
  name: string;
28
- required: boolean;
29
25
  };
30
26
  description: string;
31
27
  };
@@ -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,17 +1,17 @@
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
  {
10
10
  "filePath": "src/components/mds-input-range/mds-input-range.tsx",
11
11
  "encapsulation": "shadow",
12
12
  "tag": "mds-input-range",
13
- "readme": "# mds-input-range\n\n\n\nThis is a web-component from Maggioli Design System [Magma](https://magma.maggiolicloud.it), 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.\n",
14
- "docs": "This is a web-component from Maggioli Design System [Magma](https://magma.maggiolicloud.it), 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.",
13
+ "readme": "# mds-input-range\n\n\n\nThis is a web-component from Maggioli Design System [Magma](https://magma.maggiolicloud.it), 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.\n",
14
+ "docs": "This is a web-component from Maggioli Design System [Magma](https://magma.maggiolicloud.it), 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.",
15
15
  "docsTags": [
16
16
  {
17
17
  "name": "part",
@@ -187,6 +187,11 @@
187
187
  "docstring": "",
188
188
  "path": "src/components/mds-accordion-item/meta/event-detail.ts"
189
189
  },
190
+ "src/components/mds-accordion-timer/meta/event-detail.ts::MdsAccordionTimerEventDetail": {
191
+ "declaration": "export interface MdsAccordionTimerEventDetail {\n index: number;\n}",
192
+ "docstring": "",
193
+ "path": "src/components/mds-accordion-timer/meta/event-detail.ts"
194
+ },
190
195
  "src/components/mds-accordion-timer-item/meta/event-detail.ts::MdsAccordionTimerItemEventDetail": {
191
196
  "declaration": "export interface MdsAccordionTimerItemEventDetail {\n selected: boolean;\n uuid: number;\n}",
192
197
  "docstring": "",
@@ -273,7 +278,7 @@
273
278
  "path": "src/type/button.ts"
274
279
  },
275
280
  "src/type/button.ts::ButtonVariantType": {
276
- "declaration": "export type ButtonVariantType =\n | 'primary'\n | 'dark'\n | 'light'\n | 'error'\n | 'info'\n | 'success'\n | 'warning'",
281
+ "declaration": "export type ButtonVariantType =\n | 'primary'\n | 'secondary'\n | 'dark'\n | 'light'\n | 'error'\n | 'info'\n | 'success'\n | 'warning'",
277
282
  "docstring": "",
278
283
  "path": "src/type/button.ts"
279
284
  },
@@ -287,6 +292,11 @@
287
292
  "docstring": "",
288
293
  "path": "src/type/button.ts"
289
294
  },
295
+ "src/type/variant.ts::ChipVariantType": {
296
+ "declaration": "export type ChipVariantType =\n | 'primary'\n | 'secondary'\n | 'dark'\n | 'error'\n | 'info'\n | 'success'\n | 'warning'",
297
+ "docstring": "",
298
+ "path": "src/type/variant.ts"
299
+ },
290
300
  "src/components/mds-chip/meta/interface.ts::MdsChipEvent": {
291
301
  "declaration": "interface MdsChipEvent {\n event: Event\n element: HTMLMdsChipElement\n}",
292
302
  "docstring": "",
@@ -328,7 +338,7 @@
328
338
  "path": "src/type/text.ts"
329
339
  },
330
340
  "src/components/mds-file-preview/meta/event-detail.ts::MdsFilePreviewEventDetail": {
331
- "declaration": "export interface MdsFilePreviewEventDetail {\n extension: string\n filename: string\n target: HTMLMdsFileElement\n}",
341
+ "declaration": "export interface MdsFilePreviewEventDetail {\n extension: string\n filename: string\n target: HTMLMdsFilePreviewElement\n}",
332
342
  "docstring": "",
333
343
  "path": "src/components/mds-file-preview/meta/event-detail.ts"
334
344
  },
@@ -342,10 +352,15 @@
342
352
  "docstring": "",
343
353
  "path": "src/components/mds-filter-item/meta/event-detail.ts"
344
354
  },
345
- "src/components/mds-header-bar/meta/types.ts::MenuType": {
346
- "declaration": "export type MenuType =\n | 'all'\n | 'desktop'\n | 'mobile'\n | 'none'",
355
+ "src/type/header-bar.ts::HeaderBarMenuType": {
356
+ "declaration": "export type HeaderBarMenuType =\n | 'all'\n | 'desktop'\n | 'mobile'\n | 'none'",
347
357
  "docstring": "",
348
- "path": "src/components/mds-header-bar/meta/types.ts"
358
+ "path": "src/type/header-bar.ts"
359
+ },
360
+ "src/type/header-bar.ts::HeaderBarNavType": {
361
+ "declaration": "export type HeaderBarNavType =\n | 'all'\n | 'desktop'\n | 'mobile'\n | 'none'",
362
+ "docstring": "",
363
+ "path": "src/type/header-bar.ts"
349
364
  },
350
365
  "src/components/mds-header/meta/event-detail.ts::MdsHeaderEventDetail": {
351
366
  "declaration": "export interface MdsHeaderEventDetail {\n bar: HTMLMdsHeaderBarElement\n}",
@@ -383,7 +398,7 @@
383
398
  "path": "src/components/mds-img/meta/event-detail.ts"
384
399
  },
385
400
  "src/type/autocomplete.ts::AutocompleteType": {
386
- "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'",
401
+ "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'",
387
402
  "docstring": "",
388
403
  "path": "src/type/autocomplete.ts"
389
404
  },
@@ -412,10 +427,10 @@
412
427
  "docstring": "",
413
428
  "path": "src/type/typography.ts"
414
429
  },
415
- "src/components/mds-input/meta/event-detail.ts::MdsInputEventDetail": {
416
- "declaration": "export interface MdsInputEventDetail {\n value?: string\n}",
430
+ "src/type/input.ts::MdsInputEventDetail": {
431
+ "declaration": "export interface MdsInputEventDetail {\n value?: File | string | FormData | null\n}",
417
432
  "docstring": "",
418
- "path": "src/components/mds-input/meta/event-detail.ts"
433
+ "path": "src/type/input.ts"
419
434
  },
420
435
  "src/components/mds-input-field/meta/types.ts::InputFieldType": {
421
436
  "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'",
@@ -432,11 +447,6 @@
432
447
  "docstring": "",
433
448
  "path": "src/components/mds-input-field/meta/validators.ts"
434
449
  },
435
- "src/interface/input-value.ts::InputValue": {
436
- "declaration": "export interface InputValue {\n value: InputValueType\n}",
437
- "docstring": "",
438
- "path": "src/interface/input-value.ts"
439
- },
440
450
  "src/components/mds-input-switch/meta/types.ts::InputSwitchSizeType": {
441
451
  "declaration": "export type InputSwitchSizeType =\n | 'sm'\n | 'md'\n | 'lg'",
442
452
  "docstring": "",
@@ -483,7 +493,12 @@
483
493
  "path": "src/type/typography.ts"
484
494
  },
485
495
  "src/components/mds-modal/meta/types.ts::ModalPositionType": {
486
- "declaration": "export type ModalPositionType =\n | 'bottom'\n | 'center'\n | 'left'\n | 'right'\n | 'top'",
496
+ "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'",
497
+ "docstring": "",
498
+ "path": "src/components/mds-modal/meta/types.ts"
499
+ },
500
+ "src/components/mds-modal/meta/types.ts::ModalAnimationStateType": {
501
+ "declaration": "export type ModalAnimationStateType =\n | 'intro'\n | 'none'\n | 'outro'",
487
502
  "docstring": "",
488
503
  "path": "src/components/mds-modal/meta/types.ts"
489
504
  },
@@ -522,13 +537,8 @@
522
537
  "docstring": "",
523
538
  "path": "src/components/mds-pref-contrast/meta/types.ts"
524
539
  },
525
- "src/type/language.ts::LanguageType": {
526
- "declaration": "export type LanguageType =\n | 'auto'\n | `${Lowercase<string>}${Lowercase<string>}`\n | `${Lowercase<string>}${Lowercase<string>}${Lowercase<string>}`",
527
- "docstring": "",
528
- "path": "src/type/language.ts"
529
- },
530
540
  "src/event-detail/language.ts::MdsPrefLanguageEventDetail": {
531
- "declaration": "export interface MdsPrefLanguageEventDetail {\n language?: LanguageType\n}",
541
+ "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}",
532
542
  "docstring": "",
533
543
  "path": "src/event-detail/language.ts"
534
544
  },
@@ -572,6 +582,11 @@
572
582
  "docstring": "",
573
583
  "path": "src/components/mds-push-notification/meta/event-detail.ts"
574
584
  },
585
+ "src/type/text.ts::TypographyHeadingTagType": {
586
+ "declaration": "export type TypographyHeadingTagType =\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'",
587
+ "docstring": "",
588
+ "path": "src/type/text.ts"
589
+ },
575
590
  "src/components/mds-stepper-bar/meta/event-detail.ts::MdsStepperBarEventDetail": {
576
591
  "declaration": "export interface MdsStepperBarEventDetail {\n step: number\n value: string\n}",
577
592
  "docstring": "",
@@ -602,15 +617,20 @@
602
617
  "docstring": "",
603
618
  "path": "src/components/mds-tab-item/meta/event-detail.ts"
604
619
  },
620
+ "src/components/mds-table-header-cell/meta/types.ts::SortDirectionType": {
621
+ "declaration": "export type SortDirectionType =\n | 'ascending'\n | 'descending'\n | 'none'",
622
+ "docstring": "",
623
+ "path": "src/components/mds-table-header-cell/meta/types.ts"
624
+ },
605
625
  "src/components/mds-text/meta/types.ts::TextAnimationType": {
606
626
  "declaration": "export type TextAnimationType =\n | 'none'\n | 'yugop'",
607
627
  "docstring": "",
608
628
  "path": "src/components/mds-text/meta/types.ts"
609
629
  },
610
- "src/components/mds-text/meta/types.ts::TypographyTagType": {
630
+ "src/type/text.ts::TypographyTagType": {
611
631
  "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'",
612
632
  "docstring": "",
613
- "path": "src/components/mds-text/meta/types.ts"
633
+ "path": "src/type/text.ts"
614
634
  },
615
635
  "src/type/variant.ts::ThemeLuminanceVariantType": {
616
636
  "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-range",
3
- "version": "1.2.3",
4
- "description": "mds-input-range 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": "2.0.1",
4
+ "description": "mds-input-range 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/styles": "15.3.2",
28
- "@maggioli-design-system/mds-text": "4.4.3",
29
- "@stencil/core": "4.21.0"
27
+ "@maggioli-design-system/styles": "15.5.0",
28
+ "@maggioli-design-system/mds-text": "4.5.2",
29
+ "@stencil/core": "4.22.2"
30
30
  },
31
31
  "license": "MIT",
32
32
  "author": {
package/readme.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- This is a web-component from Maggioli Design System [Magma](https://magma.maggiolicloud.it), 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.
5
+ This is a web-component from Maggioli Design System [Magma](https://magma.maggiolicloud.it), 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.
6
6
 
7
7
  <!-- Auto Generated Below -->
8
8
 
@@ -31,6 +31,17 @@ This is a web-component from Maggioli Design System [Magma](https://magma.maggio
31
31
  | `"header"` | The element containing the labels displayed over the input element |
32
32
 
33
33
 
34
+ ## CSS Custom Properties
35
+
36
+ | Name | Description |
37
+ | --------------------------------------------- | ------------------------------------------------ |
38
+ | `--mds-input-range-thumb-background` | |
39
+ | `--mds-input-range-thumb-size` | Sets the thumb width and height of the component |
40
+ | `--mds-input-range-track-background` | |
41
+ | `--mds-input-range-track-progress-background` | |
42
+ | `--mds-input-range-track-size` | |
43
+
44
+
34
45
  ## Dependencies
35
46
 
36
47
  ### Depends on
@@ -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.') => {
@@ -36,14 +36,14 @@ export class KeyboardManager {
36
36
 
37
37
  attachEscapeBehavior = (callback: () => void): void => {
38
38
  this.escapeCallback = callback
39
- if (window !== undefined) {
39
+ if (typeof window !== 'undefined') {
40
40
  window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this))
41
41
  }
42
42
  }
43
43
 
44
44
  detachEscapeBehavior = (): void => {
45
45
  this.escapeCallback = () => { return }
46
- if (window !== undefined) {
46
+ if (typeof window !== 'undefined') {
47
47
  window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this))
48
48
  }
49
49
  }
@@ -1,4 +1,4 @@
1
- import Handlebars from 'handlebars'
1
+ import { render } from 'mustache'
2
2
 
3
3
  type LocaleConfig = {
4
4
  el?: Record<string, string | string[]>
@@ -12,6 +12,7 @@ export class Locale {
12
12
  language: string
13
13
  config: LocaleConfig
14
14
  closestElement:HTMLElement
15
+ element: HTMLElement
15
16
 
16
17
  constructor (configData?: LocaleConfig) {
17
18
  if (configData) {
@@ -23,8 +24,9 @@ export class Locale {
23
24
  this.config = configData
24
25
  }
25
26
 
26
- lang = (element: HTMLElement): string => {
27
- this.closestElement = element.closest('[lang]') as HTMLElement
27
+ lang = (el: HTMLElement): string => {
28
+ this.element = el
29
+ this.closestElement = this.element.closest('[lang]') as HTMLElement
28
30
 
29
31
  if (this.closestElement) {
30
32
  if (this.closestElement.lang) {
@@ -37,11 +39,24 @@ export class Locale {
37
39
  return this.language
38
40
  }
39
41
 
42
+ update = (doc?: Document | ShadowRoot): void => {
43
+ const context = doc ?? this.element.shadowRoot
44
+ context && context.querySelectorAll('*').forEach(el => {
45
+ if (el.tagName.toLowerCase().startsWith('mds-')) {
46
+ // eslint-disable-next-line no-restricted-syntax
47
+ if (el && 'updateLang' in el) {
48
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
49
+ (el as any).updateLang()
50
+ }
51
+ }
52
+ })
53
+ }
54
+
40
55
  private pluralize = (tag: string | string[], context: Record<string, string | number>): string => {
41
56
 
42
57
  const languagePhrase: string | string[] = this.config[this.language] ? this.config[this.language][tag] : this.config[this.rollbackLanguage][tag]
43
58
  const phrases: string[] = []
44
-
59
+
45
60
  if (Array.isArray(languagePhrase)) {
46
61
  phrases.push(languagePhrase[0])
47
62
  phrases.push(languagePhrase[1])
@@ -63,8 +78,7 @@ export class Locale {
63
78
  }
64
79
  }
65
80
 
66
- const template = Handlebars.compile(translatePhrase)
67
- return template(context)
81
+ return render(translatePhrase, context)
68
82
  }
69
83
 
70
84
  get = (tag: string | string[], context?: Record<string, string | number>): string => {
@@ -23,7 +23,7 @@ const cssSizeToNumber = (size: string, defaultValue = 0): number => {
23
23
  if (size.includes('em')) {
24
24
  return Number(size.replace('em', '')) * 16
25
25
  }
26
-
26
+
27
27
  return defaultValue
28
28
  }
29
29
 
@@ -2,24 +2,19 @@
2
2
  variables:
3
3
  COMPONENT: mds-input-range
4
4
 
5
- # ISOLATE
6
- input-range-isolate:
7
- extends: [.base-isolate, .base-input-range]
8
- dependencies: [base-stencil-build]
9
-
10
5
  # TEST
11
6
  input-range-publish-test:
12
7
  extends: [.base-stencil-publish-test, .base-input-range]
13
- dependencies: [base-stencil-build, input-range-isolate]
8
+ dependencies: [base-stencil-build, base-isolate]
14
9
 
15
10
  # PUBLISH
16
11
  input-range-publish:
17
12
  extends: [.base-stencil-publish, .base-input-range]
18
- dependencies: [base-stencil-build, input-range-isolate]
19
- needs: [base-stencil-build, input-range-isolate, input-range-publish-test]
13
+ dependencies: [base-stencil-build, base-isolate]
14
+ needs: [base-stencil-build, base-isolate, input-range-publish-test]
20
15
 
21
16
  # INSTALL TEST
22
17
  input-range-install-test:
23
18
  extends: [.base-stencil-install-test, .base-input-range]
24
- dependencies: [base-stencil-build, input-range-isolate]
25
- needs: [base-stencil-build, input-range-isolate, input-range-publish]
19
+ dependencies: [base-stencil-build, base-isolate]
20
+ needs: [base-stencil-build, base-isolate, input-range-publish]
@@ -3,9 +3,9 @@
3
3
  @container style(--magma-pref-theme: dark) {
4
4
  :host {
5
5
 
6
- --mds-input-range-thumb-background: theme('colors.brand-maggioli-04');
6
+ --mds-input-range-thumb-background: theme('colors.variant-primary-04');
7
7
  --mds-input-range-track-background: theme('colors.tone-neutral-07');
8
- --mds-input-range-track-progress-background: theme('colors.brand-maggioli-05');
8
+ --mds-input-range-track-progress-background: theme('colors.variant-primary-05');
9
9
  }
10
10
  }
11
11
 
@@ -14,9 +14,9 @@
14
14
  @media (prefers-color-scheme: dark) {
15
15
  :host {
16
16
 
17
- --mds-input-range-thumb-background: theme('colors.brand-maggioli-04');
17
+ --mds-input-range-thumb-background: theme('colors.variant-primary-04');
18
18
  --mds-input-range-track-background: theme('colors.tone-neutral-07');
19
- --mds-input-range-track-progress-background: theme('colors.brand-maggioli-05');
19
+ --mds-input-range-track-progress-background: theme('colors.variant-primary-05');
20
20
  }
21
21
  }
22
22
  }