@maggioli-design-system/mds-accordion-timer 3.10.4 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/cjs/{index-dba9169e.js → index-0853bd56.js} +14 -3
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mds-accordion-timer.cjs.entry.js +2 -2
  4. package/dist/cjs/mds-accordion-timer.cjs.js +2 -2
  5. package/dist/collection/collection-manifest.json +2 -2
  6. package/dist/collection/common/locale.js +17 -5
  7. package/dist/collection/components/mds-accordion-timer/mds-accordion-timer.css +0 -219
  8. package/dist/collection/dictionary/button.js +1 -0
  9. package/dist/collection/dictionary/variant.js +10 -1
  10. package/dist/collection/type/variant-file-format.js +0 -34
  11. package/dist/components/mds-accordion-timer.js +1 -1
  12. package/dist/documentation.json +3 -3
  13. package/dist/esm/{index-20fd282d.js → index-af411208.js} +14 -3
  14. package/dist/esm/loader.js +2 -2
  15. package/dist/esm/mds-accordion-timer.entry.js +2 -2
  16. package/dist/esm/mds-accordion-timer.js +3 -3
  17. package/dist/esm-es5/index-af411208.js +1 -0
  18. package/dist/esm-es5/loader.js +1 -1
  19. package/dist/esm-es5/mds-accordion-timer.entry.js +1 -1
  20. package/dist/esm-es5/mds-accordion-timer.js +1 -1
  21. package/dist/mds-accordion-timer/mds-accordion-timer.esm.js +1 -1
  22. package/dist/mds-accordion-timer/mds-accordion-timer.js +1 -1
  23. package/dist/mds-accordion-timer/{p-dd7ad5d9.system.js → p-25856ee2.system.js} +1 -1
  24. package/dist/mds-accordion-timer/p-4dac14fb.entry.js +1 -0
  25. package/dist/mds-accordion-timer/p-62c48ff3.system.js +2 -0
  26. package/dist/mds-accordion-timer/p-7ae27bb3.system.entry.js +1 -0
  27. package/dist/mds-accordion-timer/p-8dd37a13.js +2 -0
  28. package/dist/stats.json +35 -37
  29. package/dist/types/common/date.d.ts +1 -1
  30. package/dist/types/common/file.d.ts +3 -4
  31. package/dist/types/common/locale.d.ts +3 -1
  32. package/dist/types/dictionary/file-extensions.d.ts +2 -1
  33. package/dist/types/dictionary/variant.d.ts +2 -1
  34. package/dist/types/stencil-public-runtime.d.ts +6 -0
  35. package/dist/types/type/autocomplete.d.ts +1 -1
  36. package/dist/types/type/button.d.ts +1 -1
  37. package/dist/types/type/header-bar.d.ts +2 -0
  38. package/dist/types/type/input.d.ts +3 -0
  39. package/dist/types/type/variant-file-format.d.ts +4 -4
  40. package/dist/types/type/variant.d.ts +2 -1
  41. package/documentation.json +31 -31
  42. package/package.json +5 -5
  43. package/readme.md +12 -1
  44. package/src/common/file.ts +2 -3
  45. package/src/common/locale.ts +20 -6
  46. package/src/common/unit.ts +1 -1
  47. package/src/components/mds-accordion-timer/.gitlab-ci.yml +5 -10
  48. package/src/dictionary/button.ts +1 -0
  49. package/src/dictionary/file-extensions.ts +3 -1
  50. package/src/dictionary/variant.ts +11 -0
  51. package/src/fixtures/icons.json +7 -2
  52. package/src/fixtures/iconsauce.json +2 -0
  53. package/src/tailwind/components.css +1 -1
  54. package/src/type/autocomplete.ts +0 -1
  55. package/src/type/button.ts +1 -0
  56. package/src/type/header-bar.ts +11 -0
  57. package/src/type/input.ts +4 -0
  58. package/src/type/variant-file-format.ts +20 -37
  59. package/src/type/variant.ts +9 -1
  60. package/www/build/mds-accordion-timer.esm.js +1 -1
  61. package/www/build/mds-accordion-timer.js +1 -1
  62. package/www/build/{p-dd7ad5d9.system.js → p-25856ee2.system.js} +1 -1
  63. package/www/build/p-4dac14fb.entry.js +1 -0
  64. package/www/build/p-62c48ff3.system.js +2 -0
  65. package/www/build/p-7ae27bb3.system.entry.js +1 -0
  66. package/www/build/p-8dd37a13.js +2 -0
  67. package/dist/collection/type/language.js +0 -1
  68. package/dist/esm-es5/index-20fd282d.js +0 -1
  69. package/dist/mds-accordion-timer/p-6d230e24.js +0 -2
  70. package/dist/mds-accordion-timer/p-9d12b7bb.entry.js +0 -1
  71. package/dist/mds-accordion-timer/p-b63ea901.system.entry.js +0 -1
  72. package/dist/mds-accordion-timer/p-fe7bbbcf.system.js +0 -2
  73. package/dist/types/interface/input-value.d.ts +0 -4
  74. package/dist/types/type/language.d.ts +0 -2
  75. package/src/interface/input-value.ts +0 -5
  76. package/src/type/language.ts +0 -8
  77. package/www/build/p-6d230e24.js +0 -2
  78. package/www/build/p-9d12b7bb.entry.js +0 -1
  79. package/www/build/p-b63ea901.system.entry.js +0 -1
  80. package/www/build/p-fe7bbbcf.system.js +0 -2
  81. /package/dist/collection/{interface/input-value.js → type/header-bar.js} +0 -0
@@ -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-10-23T14:37:27",
2
+ "timestamp": "2024-11-25T16:00:58",
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-accordion-timer/mds-accordion-timer.tsx",
11
11
  "encapsulation": "shadow",
12
12
  "tag": "mds-accordion-timer",
13
- "readme": "# mds-accordion-timer\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-accordion-timer\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": "slot",
@@ -258,7 +258,7 @@
258
258
  "path": "src/type/button.ts"
259
259
  },
260
260
  "src/type/button.ts::ButtonVariantType": {
261
- "declaration": "export type ButtonVariantType =\n | 'primary'\n | 'dark'\n | 'light'\n | 'error'\n | 'info'\n | 'success'\n | 'warning'",
261
+ "declaration": "export type ButtonVariantType =\n | 'primary'\n | 'secondary'\n | 'dark'\n | 'light'\n | 'error'\n | 'info'\n | 'success'\n | 'warning'",
262
262
  "docstring": "",
263
263
  "path": "src/type/button.ts"
264
264
  },
@@ -272,6 +272,11 @@
272
272
  "docstring": "",
273
273
  "path": "src/type/button.ts"
274
274
  },
275
+ "src/type/variant.ts::ChipVariantType": {
276
+ "declaration": "export type ChipVariantType =\n | 'primary'\n | 'secondary'\n | 'dark'\n | 'error'\n | 'info'\n | 'success'\n | 'warning'",
277
+ "docstring": "",
278
+ "path": "src/type/variant.ts"
279
+ },
275
280
  "src/components/mds-chip/meta/interface.ts::MdsChipEvent": {
276
281
  "declaration": "interface MdsChipEvent {\n event: Event\n element: HTMLMdsChipElement\n}",
277
282
  "docstring": "",
@@ -313,7 +318,7 @@
313
318
  "path": "src/type/text.ts"
314
319
  },
315
320
  "src/components/mds-file-preview/meta/event-detail.ts::MdsFilePreviewEventDetail": {
316
- "declaration": "export interface MdsFilePreviewEventDetail {\n extension: string\n filename: string\n target: HTMLMdsFileElement\n}",
321
+ "declaration": "export interface MdsFilePreviewEventDetail {\n extension: string\n filename: string\n target: HTMLMdsFilePreviewElement\n}",
317
322
  "docstring": "",
318
323
  "path": "src/components/mds-file-preview/meta/event-detail.ts"
319
324
  },
@@ -327,10 +332,15 @@
327
332
  "docstring": "",
328
333
  "path": "src/components/mds-filter-item/meta/event-detail.ts"
329
334
  },
330
- "src/components/mds-header-bar/meta/types.ts::MenuType": {
331
- "declaration": "export type MenuType =\n | 'all'\n | 'desktop'\n | 'mobile'\n | 'none'",
335
+ "src/type/header-bar.ts::HeaderBarMenuType": {
336
+ "declaration": "export type HeaderBarMenuType =\n | 'all'\n | 'desktop'\n | 'mobile'\n | 'none'",
337
+ "docstring": "",
338
+ "path": "src/type/header-bar.ts"
339
+ },
340
+ "src/type/header-bar.ts::HeaderBarNavType": {
341
+ "declaration": "export type HeaderBarNavType =\n | 'all'\n | 'desktop'\n | 'mobile'\n | 'none'",
332
342
  "docstring": "",
333
- "path": "src/components/mds-header-bar/meta/types.ts"
343
+ "path": "src/type/header-bar.ts"
334
344
  },
335
345
  "src/components/mds-header/meta/event-detail.ts::MdsHeaderEventDetail": {
336
346
  "declaration": "export interface MdsHeaderEventDetail {\n bar: HTMLMdsHeaderBarElement\n}",
@@ -368,7 +378,7 @@
368
378
  "path": "src/components/mds-img/meta/event-detail.ts"
369
379
  },
370
380
  "src/type/autocomplete.ts::AutocompleteType": {
371
- "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'",
381
+ "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'",
372
382
  "docstring": "",
373
383
  "path": "src/type/autocomplete.ts"
374
384
  },
@@ -397,10 +407,10 @@
397
407
  "docstring": "",
398
408
  "path": "src/type/typography.ts"
399
409
  },
400
- "src/components/mds-input/meta/event-detail.ts::MdsInputEventDetail": {
401
- "declaration": "export interface MdsInputEventDetail {\n value?: string\n}",
410
+ "src/type/input.ts::MdsInputEventDetail": {
411
+ "declaration": "export interface MdsInputEventDetail {\n value?: File | string | FormData | null\n}",
402
412
  "docstring": "",
403
- "path": "src/components/mds-input/meta/event-detail.ts"
413
+ "path": "src/type/input.ts"
404
414
  },
405
415
  "src/components/mds-input-field/meta/types.ts::InputFieldType": {
406
416
  "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'",
@@ -417,11 +427,6 @@
417
427
  "docstring": "",
418
428
  "path": "src/components/mds-input-field/meta/validators.ts"
419
429
  },
420
- "src/interface/input-value.ts::InputValue": {
421
- "declaration": "export interface InputValue {\n value: InputValueType\n}",
422
- "docstring": "",
423
- "path": "src/interface/input-value.ts"
424
- },
425
430
  "src/components/mds-input-switch/meta/types.ts::InputSwitchSizeType": {
426
431
  "declaration": "export type InputSwitchSizeType =\n | 'sm'\n | 'md'\n | 'lg'",
427
432
  "docstring": "",
@@ -468,7 +473,12 @@
468
473
  "path": "src/type/typography.ts"
469
474
  },
470
475
  "src/components/mds-modal/meta/types.ts::ModalPositionType": {
471
- "declaration": "export type ModalPositionType =\n | 'bottom'\n | 'center'\n | 'left'\n | 'right'\n | 'top'",
476
+ "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'",
477
+ "docstring": "",
478
+ "path": "src/components/mds-modal/meta/types.ts"
479
+ },
480
+ "src/components/mds-modal/meta/types.ts::ModalAnimationStateType": {
481
+ "declaration": "export type ModalAnimationStateType =\n | 'intro'\n | 'none'\n | 'outro'",
472
482
  "docstring": "",
473
483
  "path": "src/components/mds-modal/meta/types.ts"
474
484
  },
@@ -507,21 +517,11 @@
507
517
  "docstring": "",
508
518
  "path": "src/components/mds-pref-contrast/meta/types.ts"
509
519
  },
510
- "src/type/language.ts::PrefLanguageType": {
511
- "declaration": "export type PrefLanguageType =\n | 'auto'\n | `${Lowercase<string>}${Lowercase<string>}`\n | `${Lowercase<string>}${Lowercase<string>}${Lowercase<string>}`",
512
- "docstring": "",
513
- "path": "src/type/language.ts"
514
- },
515
520
  "src/event-detail/language.ts::MdsPrefLanguageEventDetail": {
516
- "declaration": "export interface MdsPrefLanguageEventDetail {\n language?: LanguageType\n}",
521
+ "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}",
517
522
  "docstring": "",
518
523
  "path": "src/event-detail/language.ts"
519
524
  },
520
- "src/type/language.ts::LanguageType": {
521
- "declaration": "export type LanguageType =\n | `${Lowercase<string>}${Lowercase<string>}`\n | `${Lowercase<string>}${Lowercase<string>}${Lowercase<string>}`",
522
- "docstring": "",
523
- "path": "src/type/language.ts"
524
- },
525
525
  "src/components/mds-pref-theme/meta/types.ts::ThemeModeType": {
526
526
  "declaration": "export type ThemeModeType =\n | 'light'\n | 'dark'\n | 'system'",
527
527
  "docstring": "",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maggioli-design-system/mds-accordion-timer",
3
- "version": "3.10.4",
4
- "description": "mds-accordion-timer 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": "4.0.0",
4
+ "description": "mds-accordion-timer 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-accordion-timer-item": "3.10.3",
28
- "@maggioli-design-system/styles": "15.3.2",
29
- "@stencil/core": "4.21.0"
27
+ "@maggioli-design-system/mds-accordion-timer-item": "4.0.0",
28
+ "@maggioli-design-system/styles": "15.5.0",
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
 
@@ -29,6 +29,17 @@ This is a web-component from Maggioli Design System [Magma](https://magma.maggio
29
29
  | `"default"` | Add `mds-accordion-timer-item` element/s. |
30
30
 
31
31
 
32
+ ## CSS Custom Properties
33
+
34
+ | Name | Description |
35
+ | ----------------------------------------------- | ------------------------------------------------------------------------------------------- |
36
+ | `--mds-accordion-timer-color` | Sets the text color of the component mds-accordion-timer-item |
37
+ | `--mds-accordion-timer-duration` | Sets the transition duration of open/close animation of the mds-accordion-timer-item |
38
+ | `--mds-accordion-timer-progress-bar-background` | Sets the background-color of the progress bar when the mds-accordion-timer-item is selected |
39
+ | `--mds-accordion-timer-progress-bar-color` | Sets the color of the progress bar when the mds-accordion-timer-item is selected |
40
+ | `--mds-accordion-timer-progress-bar-thickness` | Sets thickness of the progress bar of the mds-accordion-timer-item |
41
+
42
+
32
43
  ----------------------------------------------
33
44
 
34
45
  Built with love @ [Gruppo Maggioli](https://www.maggioli.com) from [R&D Department](https://www.maggioli.com/it-it/chi-siamo/ricerca-sviluppo)
@@ -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.') => {
@@ -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-accordion-timer
4
4
 
5
- # ISOLATE
6
- accordion-timer-isolate:
7
- extends: [.base-isolate, .base-accordion-timer]
8
- dependencies: [base-stencil-build]
9
-
10
5
  # TEST
11
6
  accordion-timer-publish-test:
12
7
  extends: [.base-stencil-publish-test, .base-accordion-timer]
13
- dependencies: [base-stencil-build, accordion-timer-isolate]
8
+ dependencies: [base-stencil-build, base-isolate]
14
9
 
15
10
  # PUBLISH
16
11
  accordion-timer-publish:
17
12
  extends: [.base-stencil-publish, .base-accordion-timer]
18
- dependencies: [base-stencil-build, accordion-timer-isolate]
19
- needs: [base-stencil-build, accordion-timer-isolate, accordion-timer-publish-test]
13
+ dependencies: [base-stencil-build, base-isolate]
14
+ needs: [base-stencil-build, base-isolate, accordion-timer-publish-test]
20
15
 
21
16
  # INSTALL TEST
22
17
  accordion-timer-install-test:
23
18
  extends: [.base-stencil-install-test, .base-accordion-timer]
24
- dependencies: [base-stencil-build, accordion-timer-isolate]
25
- needs: [base-stencil-build, accordion-timer-isolate, accordion-timer-publish]
19
+ dependencies: [base-stencil-build, base-isolate]
20
+ needs: [base-stencil-build, base-isolate, accordion-timer-publish]
@@ -4,6 +4,7 @@ const buttonVariantDictionary = [
4
4
  'info',
5
5
  'light',
6
6
  'primary',
7
+ 'secondary',
7
8
  'success',
8
9
  'warning',
9
10
  ]
@@ -1,10 +1,12 @@
1
+ import { FileFormat } from '@type/variant-file-format'
2
+
1
3
  interface FileExtenstion {
2
4
  [key: string]: ExtensionInfo
3
5
  }
4
6
 
5
7
  interface ExtensionInfo {
6
8
  preview?: boolean
7
- format: string
9
+ format: FileFormat
8
10
  description: string
9
11
  }
10
12
 
@@ -77,6 +77,16 @@ const toneVariantDictionary = [
77
77
  'quiet',
78
78
  ]
79
79
 
80
+ const themeVariantChipDictionary = [
81
+ 'primary',
82
+ 'secondary',
83
+ 'dark',
84
+ 'error',
85
+ 'info',
86
+ 'success',
87
+ 'warning',
88
+ ]
89
+
80
90
  const toneActionVariantDictionary = [
81
91
  'primary',
82
92
  'secondary',
@@ -110,6 +120,7 @@ export {
110
120
  themeLuminanceVariantDictionary,
111
121
  themeStatusVariantDictionary,
112
122
  themeVariantDictionary,
123
+ themeVariantChipDictionary,
113
124
  toneActionVariantDictionary,
114
125
  toneMinimalVariantDictionary,
115
126
  toneSimpleVariantDictionary,
@@ -42,6 +42,7 @@
42
42
  "mgg/ai-status-processing",
43
43
  "mgg/ai-status-suspended",
44
44
  "mgg/alerts-pagopa",
45
+ "mgg/anpr",
45
46
  "mgg/ansc",
46
47
  "mgg/area-edificabile",
47
48
  "mgg/area-weather",
@@ -298,6 +299,7 @@
298
299
  "mgg/user-substitution",
299
300
  "mgg/view-chart-gantt",
300
301
  "mgg/view-side-by-side",
302
+ "mgg/vote",
301
303
  "mgg/warning-superscript",
302
304
  "mgg/web-app-ansc",
303
305
  "mgg/work-book",
@@ -328,6 +330,8 @@
328
330
  "mi/baseline/css",
329
331
  "mi/baseline/dark-mode",
330
332
  "mi/baseline/description",
333
+ "mi/baseline/directions-run",
334
+ "mi/baseline/directions-walk",
331
335
  "mi/baseline/done",
332
336
  "mi/baseline/downhill-skiing",
333
337
  "mi/baseline/eco",
@@ -336,7 +340,6 @@
336
340
  "mi/baseline/explore",
337
341
  "mi/baseline/file-download-done",
338
342
  "mi/baseline/folder-zip",
339
- "mi/baseline/groups",
340
343
  "mi/baseline/horizontal-rule",
341
344
  "mi/baseline/indeterminate-check-box",
342
345
  "mi/baseline/info",
@@ -358,6 +361,9 @@
358
361
  "mi/baseline/remove-circle",
359
362
  "mi/baseline/route",
360
363
  "mi/baseline/settings",
364
+ "mi/baseline/sports",
365
+ "mi/baseline/sports-soccer",
366
+ "mi/baseline/stadium",
361
367
  "mi/baseline/terminal",
362
368
  "mi/baseline/timer",
363
369
  "mi/baseline/tv",
@@ -376,7 +382,6 @@
376
382
  "mi/outline/schedule",
377
383
  "mi/round/arrow-circle-down",
378
384
  "mi/round/email",
379
- "mi/round/groups",
380
385
  "mi/round/menu",
381
386
  "mi/round/more-vert",
382
387
  "mi/round/person"
@@ -30,6 +30,7 @@
30
30
  "mgg/ai-status-processing",
31
31
  "mgg/ai-status-suspended",
32
32
  "mgg/alerts-pagopa",
33
+ "mgg/anpr",
33
34
  "mgg/ansc",
34
35
  "mgg/area-edificabile",
35
36
  "mgg/area-weather",
@@ -286,6 +287,7 @@
286
287
  "mgg/user-substitution",
287
288
  "mgg/view-chart-gantt",
288
289
  "mgg/view-side-by-side",
290
+ "mgg/vote",
289
291
  "mgg/warning-superscript",
290
292
  "mgg/web-app-ansc",
291
293
  "mgg/work-book"
@@ -75,7 +75,7 @@
75
75
  }
76
76
 
77
77
  @container style(--magma-pref-animation: system) {
78
-
78
+
79
79
  @media (prefers-reduced-motion) {
80
80
  .contrast-area,
81
81
  .contrast-area-50 {
@@ -18,7 +18,6 @@ export type AutocompleteType =
18
18
  | 'cc-exp-month'
19
19
  | 'cc-exp-year'
20
20
  | 'cc-family-name'
21
- | 'cc-family-name'
22
21
  | 'cc-given-name'
23
22
  | 'cc-name'
24
23
  | 'cc-number'
@@ -20,6 +20,7 @@ export type ButtonIconPositionType =
20
20
 
21
21
  export type ButtonVariantType =
22
22
  | 'primary'
23
+ | 'secondary'
23
24
  | 'dark'
24
25
  | 'light'
25
26
  | 'error'
@@ -0,0 +1,11 @@
1
+ export type HeaderBarMenuType =
2
+ | 'all'
3
+ | 'desktop'
4
+ | 'mobile'
5
+ | 'none'
6
+
7
+ export type HeaderBarNavType =
8
+ | 'all'
9
+ | 'desktop'
10
+ | 'mobile'
11
+ | 'none'
package/src/type/input.ts CHANGED
@@ -23,3 +23,7 @@ export type InputTextType =
23
23
  | 'textarea'
24
24
  | 'time'
25
25
  | 'url'
26
+
27
+ export interface MdsInputEventDetail {
28
+ value?: File | string | FormData | null
29
+ }
@@ -13,12 +13,28 @@ import baselineBorderAll from '@icon/mi/baseline/border-all.svg'
13
13
  import baselineDescription from '@icon/mi/baseline/description.svg'
14
14
  import mdiVectorCurve from '@icon/mdi/vector-curve.svg'
15
15
  import baselineVideocam from '@icon/mi/baseline/videocam.svg'
16
+ import { ThemeFullVariantType } from '@type/variant'
17
+
18
+ type FileFormat =
19
+ | 'archive'
20
+ | 'attachment'
21
+ | 'audio'
22
+ | 'code'
23
+ | 'data'
24
+ | 'document'
25
+ | 'email'
26
+ | 'executable'
27
+ | 'image'
28
+ | 'markup'
29
+ | 'slide'
30
+ | 'spreadsheet'
31
+ | 'text'
32
+ | 'vector'
33
+ | 'video'
16
34
 
17
35
  interface FileFormatVariant {
18
- color: string
19
36
  icon: string
20
- iconBackground: string
21
- variant: string
37
+ variant: ThemeFullVariantType
22
38
  }
23
39
 
24
40
  interface FileFormatVariants {
@@ -27,111 +43,78 @@ interface FileFormatVariants {
27
43
 
28
44
  const fileFormatsVariant: FileFormatVariants = {
29
45
  archive: {
30
- color: 'fill-label-amaranth-04 text-label-amaranth-04',
31
46
  icon: baselineFolderZip,
32
- iconBackground: 'bg-label-amaranth-10',
33
47
  variant: 'amaranth',
34
48
  },
35
49
  attachment: {
36
- color: 'fill-tone-neutral-04 text-tone-neutral-04',
37
50
  icon: baselineAttachFile,
38
- iconBackground: 'bg-tone-neutral-10',
39
51
  variant: 'dark',
40
52
  },
41
53
  audio: {
42
- color: 'fill-label-violet-04 text-label-violet-04',
43
54
  icon: baselineAudiotrack,
44
- iconBackground: 'bg-label-violet-10',
45
55
  variant: 'violet',
46
56
  },
47
57
  code: {
48
- color: 'fill-label-yellow-04 text-label-yellow-04',
49
58
  icon: baselineTerminal,
50
- iconBackground: 'bg-label-yellow-10',
51
59
  variant: 'yellow',
52
60
  },
53
61
  data: {
54
- color: 'fill-label-yellow-04 text-label-yellow-04',
55
62
  icon: mdiHardDisk,
56
- iconBackground: 'bg-label-yellow-10',
57
63
  variant: 'yellow',
58
64
  },
59
65
  document: {
60
- color: 'fill-label-orange-04 text-label-orange-04',
61
66
  icon: baselineInsertDriveFile,
62
- iconBackground: 'bg-label-orange-10',
63
67
  variant: 'orange',
64
68
  },
65
69
  email: {
66
- color: 'fill-label-blue-04 text-label-blue-04',
67
70
  icon: baselineEmail,
68
- iconBackground: 'bg-label-blue-10',
69
71
  variant: 'blue',
70
72
  },
71
73
  executable: {
72
- color: 'fill-label-amaranth-04 text-label-amaranth-04',
73
74
  icon: baselineWysiwyg,
74
- iconBackground: 'bg-label-amaranth-10',
75
75
  variant: 'amaranth',
76
76
  },
77
77
  image: {
78
- color: 'fill-label-green-04 text-label-green-04',
79
78
  icon: baselinePanorama,
80
- iconBackground: 'bg-label-green-10',
81
79
  variant: 'green',
82
80
  },
83
81
  imageRaster: {
84
- color: 'fill-label-green-04 text-label-green-04',
85
82
  icon: baselinePanorama,
86
- iconBackground: 'bg-label-green-10',
87
83
  variant: 'green',
88
84
  },
89
85
  markup: {
90
- color: 'fill-label-yellow-04 text-label-yellow-04',
91
86
  icon: baselineWeb,
92
- iconBackground: 'bg-label-yellow-10',
93
87
  variant: 'yellow',
94
88
  },
95
89
  slide: {
96
- color: 'fill-label-orchid-04 text-label-orchid-04',
97
90
  icon: baselineTV,
98
- iconBackground: 'bg-label-orchid-10',
99
91
  variant: 'orchid',
100
92
  },
101
93
  spreadsheet: {
102
- color: 'fill-label-lime-04 text-label-lime-04',
103
94
  icon: baselineBorderAll,
104
- iconBackground: 'bg-label-lime-10',
105
95
  variant: 'lime',
106
96
  },
107
97
  text: {
108
- color: 'fill-label-blue-04 text-label-blue-04',
109
98
  icon: baselineDescription,
110
- iconBackground: 'bg-label-blue-10',
111
99
  variant: 'blue',
112
100
  },
113
101
  vectorImage: {
114
- color: 'fill-label-aqua-04 text-label-aqua-04',
115
102
  icon: mdiVectorCurve,
116
- iconBackground: 'bg-label-aqua-10',
117
103
  variant: 'aqua',
118
104
  },
119
105
  vector: {
120
- color: 'fill-label-aqua-04 text-label-aqua-04',
121
106
  icon: mdiVectorCurve,
122
- iconBackground: 'bg-label-aqua-10',
123
107
  variant: 'aqua',
124
108
  },
125
109
  video: {
126
- color: 'fill-label-violet-04 text-label-violet-04',
127
110
  icon: baselineVideocam,
128
- iconBackground: 'bg-label-violet-10',
129
111
  variant: 'violet',
130
112
  },
131
113
  }
132
114
 
133
115
  export {
134
116
  fileFormatsVariant,
117
+ FileFormat,
135
118
  FileFormatVariant,
136
119
  FileFormatVariants,
137
120
  }