@maggioli-design-system/mds-accordion-timer 3.10.4 → 4.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 (101) 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 +18 -14
  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/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-accordion-timer/mds-accordion-timer.css +0 -219
  11. package/dist/collection/components/mds-accordion-timer/mds-accordion-timer.js +16 -12
  12. package/dist/collection/dictionary/button.js +1 -0
  13. package/dist/collection/dictionary/file-extensions.js +114 -56
  14. package/dist/collection/dictionary/text.js +60 -1
  15. package/dist/collection/dictionary/variant.js +10 -1
  16. package/dist/collection/type/variant-file-format.js +0 -34
  17. package/dist/components/mds-accordion-timer.js +17 -13
  18. package/dist/documentation.json +3 -3
  19. package/dist/esm/{index-20fd282d.js → index-af411208.js} +14 -3
  20. package/dist/esm/loader.js +2 -2
  21. package/dist/esm/mds-accordion-timer.entry.js +18 -14
  22. package/dist/esm/mds-accordion-timer.js +3 -3
  23. package/dist/esm-es5/index-af411208.js +1 -0
  24. package/dist/esm-es5/loader.js +1 -1
  25. package/dist/esm-es5/mds-accordion-timer.entry.js +1 -1
  26. package/dist/esm-es5/mds-accordion-timer.js +1 -1
  27. package/dist/mds-accordion-timer/mds-accordion-timer.esm.js +1 -1
  28. package/dist/mds-accordion-timer/mds-accordion-timer.js +1 -1
  29. package/dist/mds-accordion-timer/{p-dd7ad5d9.system.js → p-25856ee2.system.js} +1 -1
  30. package/dist/mds-accordion-timer/p-4eb3ec08.system.entry.js +1 -0
  31. package/dist/mds-accordion-timer/p-62c48ff3.system.js +2 -0
  32. package/dist/mds-accordion-timer/p-86e0d6b4.entry.js +1 -0
  33. package/dist/mds-accordion-timer/p-8dd37a13.js +2 -0
  34. package/dist/stats.json +35 -35
  35. package/dist/types/common/aria.d.ts +3 -1
  36. package/dist/types/common/date.d.ts +1 -1
  37. package/dist/types/common/device.d.ts +2 -0
  38. package/dist/types/common/file.d.ts +3 -4
  39. package/dist/types/common/locale.d.ts +3 -1
  40. package/dist/types/dictionary/file-extensions.d.ts +2 -1
  41. package/dist/types/dictionary/text.d.ts +3 -1
  42. package/dist/types/dictionary/variant.d.ts +2 -1
  43. package/dist/types/stencil-public-runtime.d.ts +6 -0
  44. package/dist/types/type/autocomplete.d.ts +1 -1
  45. package/dist/types/type/button.d.ts +1 -1
  46. package/dist/types/type/header-bar.d.ts +2 -0
  47. package/dist/types/type/input.d.ts +3 -0
  48. package/dist/types/type/text.d.ts +2 -0
  49. package/dist/types/type/variant-file-format.d.ts +4 -4
  50. package/dist/types/type/variant.d.ts +2 -1
  51. package/documentation.json +39 -34
  52. package/package.json +5 -5
  53. package/readme.md +12 -1
  54. package/src/common/aria.ts +22 -2
  55. package/src/common/device.ts +9 -0
  56. package/src/common/file.ts +2 -3
  57. package/src/common/keyboard-manager.ts +2 -2
  58. package/src/common/locale.ts +20 -6
  59. package/src/common/unit.ts +1 -1
  60. package/src/components/mds-accordion-timer/.gitlab-ci.yml +5 -10
  61. package/src/components/mds-accordion-timer/mds-accordion-timer.tsx +15 -11
  62. package/src/dictionary/button.ts +1 -0
  63. package/src/dictionary/file-extensions.ts +118 -57
  64. package/src/dictionary/text.ts +64 -0
  65. package/src/dictionary/variant.ts +11 -0
  66. package/src/fixtures/icons.json +15 -2
  67. package/src/fixtures/iconsauce.json +7 -0
  68. package/src/meta/file-format/locale.el.json +39 -0
  69. package/src/meta/file-format/locale.en.json +39 -0
  70. package/src/meta/file-format/locale.es.json +39 -0
  71. package/src/meta/file-format/locale.it.json +39 -0
  72. package/src/tailwind/components.css +1 -1
  73. package/src/type/autocomplete.ts +0 -1
  74. package/src/type/button.ts +1 -0
  75. package/src/type/header-bar.ts +11 -0
  76. package/src/type/input.ts +4 -0
  77. package/src/type/text.ts +59 -0
  78. package/src/type/variant-file-format.ts +20 -37
  79. package/src/type/variant.ts +9 -1
  80. package/www/build/mds-accordion-timer.esm.js +1 -1
  81. package/www/build/mds-accordion-timer.js +1 -1
  82. package/www/build/{p-dd7ad5d9.system.js → p-25856ee2.system.js} +1 -1
  83. package/www/build/p-4eb3ec08.system.entry.js +1 -0
  84. package/www/build/p-62c48ff3.system.js +2 -0
  85. package/www/build/p-86e0d6b4.entry.js +1 -0
  86. package/www/build/p-8dd37a13.js +2 -0
  87. package/dist/collection/type/language.js +0 -1
  88. package/dist/esm-es5/index-20fd282d.js +0 -1
  89. package/dist/mds-accordion-timer/p-6d230e24.js +0 -2
  90. package/dist/mds-accordion-timer/p-9d12b7bb.entry.js +0 -1
  91. package/dist/mds-accordion-timer/p-b63ea901.system.entry.js +0 -1
  92. package/dist/mds-accordion-timer/p-fe7bbbcf.system.js +0 -2
  93. package/dist/types/interface/input-value.d.ts +0 -4
  94. package/dist/types/type/language.d.ts +0 -2
  95. package/src/interface/input-value.ts +0 -5
  96. package/src/type/language.ts +0 -8
  97. package/www/build/p-6d230e24.js +0 -2
  98. package/www/build/p-9d12b7bb.entry.js +0 -1
  99. package/www/build/p-b63ea901.system.entry.js +0 -1
  100. package/www/build/p-fe7bbbcf.system.js +0 -2
  101. /package/dist/collection/{interface/input-value.js → type/header-bar.js} +0 -0
@@ -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-10-23T14:37:27",
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-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": "",
@@ -562,6 +562,11 @@
562
562
  "docstring": "",
563
563
  "path": "src/components/mds-push-notification/meta/event-detail.ts"
564
564
  },
565
+ "src/type/text.ts::TypographyHeadingTagType": {
566
+ "declaration": "export type TypographyHeadingTagType =\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'",
567
+ "docstring": "",
568
+ "path": "src/type/text.ts"
569
+ },
565
570
  "src/components/mds-stepper-bar/meta/event-detail.ts::MdsStepperBarEventDetail": {
566
571
  "declaration": "export interface MdsStepperBarEventDetail {\n step: number\n value: string\n}",
567
572
  "docstring": "",
@@ -593,7 +598,7 @@
593
598
  "path": "src/components/mds-tab-item/meta/event-detail.ts"
594
599
  },
595
600
  "src/components/mds-table-header-cell/meta/types.ts::SortDirectionType": {
596
- "declaration": "export type SortDirectionType =\n | 'asc'\n | 'desc'\n | 'none'",
601
+ "declaration": "export type SortDirectionType =\n | 'ascending'\n | 'descending'\n | 'none'",
597
602
  "docstring": "",
598
603
  "path": "src/components/mds-table-header-cell/meta/types.ts"
599
604
  },
@@ -602,10 +607,10 @@
602
607
  "docstring": "",
603
608
  "path": "src/components/mds-text/meta/types.ts"
604
609
  },
605
- "src/components/mds-text/meta/types.ts::TypographyTagType": {
610
+ "src/type/text.ts::TypographyTagType": {
606
611
  "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'",
607
612
  "docstring": "",
608
- "path": "src/components/mds-text/meta/types.ts"
613
+ "path": "src/type/text.ts"
609
614
  },
610
615
  "src/type/variant.ts::ThemeLuminanceVariantType": {
611
616
  "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-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.1",
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.1",
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)
@@ -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-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]
@@ -58,7 +58,9 @@ export class MdsAccordionTimer {
58
58
  }
59
59
 
60
60
  private readonly clearIntervals = (): void => {
61
- window.clearInterval(this.timeChecker)
61
+ if (typeof window !== 'undefined') {
62
+ window.clearInterval(this.timeChecker)
63
+ }
62
64
  this.timeChecker = 0
63
65
  }
64
66
 
@@ -77,16 +79,18 @@ export class MdsAccordionTimer {
77
79
  }
78
80
 
79
81
  private readonly addTimeListener = (): void => {
80
- this.timeChecker = window.setInterval(() => {
81
- const progress = this.progress()
82
- if (this.selectedItem !== undefined) {
83
- this.selectedItem.progress = progress
84
- }
85
- if (progress === 1) {
86
- this.selectedItem.progress = 0
87
- this.startNext()
88
- }
89
- }, 100)
82
+ if (typeof window !== 'undefined') {
83
+ this.timeChecker = window.setInterval(() => {
84
+ const progress = this.progress()
85
+ if (this.selectedItem !== undefined) {
86
+ this.selectedItem.progress = progress
87
+ }
88
+ if (progress === 1) {
89
+ this.selectedItem.progress = 0
90
+ this.startNext()
91
+ }
92
+ }, 100)
93
+ }
90
94
  }
91
95
 
92
96
  private readonly beginningTime = (): number => {
@@ -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
  ]