@maggioli-design-system/mds-accordion-timer 3.6.4 → 3.7.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 (69) hide show
  1. package/dist/cjs/mds-accordion-timer.cjs.js +1 -1
  2. package/dist/collection/collection-manifest.json +2 -2
  3. package/dist/collection/common/file.js +48 -0
  4. package/dist/collection/common/icon.js +15 -0
  5. package/dist/collection/common/unit.js +15 -3
  6. package/dist/collection/common/yugop/core.js +16 -0
  7. package/dist/collection/common/yugop/index.js +3 -0
  8. package/dist/collection/common/yugop/random-text.js +59 -0
  9. package/dist/collection/common/yugop/utils/math.js +11 -0
  10. package/dist/collection/common/yugop/utils/noop.js +1 -0
  11. package/dist/collection/common/yugop/utils/prng.js +21 -0
  12. package/dist/collection/common/yugop/utils/string.js +2 -0
  13. package/dist/collection/dictionary/file-extensions.js +64 -0
  14. package/dist/collection/dictionary/icon.js +6 -1
  15. package/dist/collection/dictionary/text.js +6 -0
  16. package/dist/collection/dictionary/variant.js +18 -1
  17. package/dist/collection/fixtures/filenames.js +57 -0
  18. package/dist/collection/type/file-types.js +1 -0
  19. package/dist/collection/type/text.js +1 -0
  20. package/dist/collection/type/variant-file-format.js +111 -0
  21. package/dist/documentation.json +3 -3
  22. package/dist/esm/mds-accordion-timer.js +1 -1
  23. package/dist/mds-accordion-timer/mds-accordion-timer.js +1 -1
  24. package/dist/stats.json +45 -6
  25. package/dist/types/common/file.d.ts +12 -0
  26. package/dist/types/common/icon.d.ts +5 -0
  27. package/dist/types/common/unit.d.ts +2 -1
  28. package/dist/types/common/yugop/core.d.ts +10 -0
  29. package/dist/types/common/yugop/index.d.ts +1 -0
  30. package/dist/types/common/yugop/random-text.d.ts +31 -0
  31. package/dist/types/common/yugop/utils/math.d.ts +3 -0
  32. package/dist/types/common/yugop/utils/noop.d.ts +1 -0
  33. package/dist/types/common/yugop/utils/prng.d.ts +8 -0
  34. package/dist/types/common/yugop/utils/string.d.ts +1 -0
  35. package/dist/types/dictionary/file-extensions.d.ts +11 -0
  36. package/dist/types/dictionary/icon.d.ts +2 -1
  37. package/dist/types/dictionary/text.d.ts +2 -0
  38. package/dist/types/dictionary/variant.d.ts +2 -1
  39. package/dist/types/fixtures/filenames.d.ts +2 -0
  40. package/dist/types/type/file-types.d.ts +1 -0
  41. package/dist/types/type/text.d.ts +1 -0
  42. package/dist/types/type/variant-file-format.d.ts +11 -0
  43. package/dist/types/type/variant.d.ts +1 -0
  44. package/documentation.json +47 -12
  45. package/package.json +4 -4
  46. package/src/common/file.ts +63 -0
  47. package/src/common/icon.ts +25 -0
  48. package/src/common/unit.ts +21 -2
  49. package/src/common/yugop/core.ts +47 -0
  50. package/src/common/yugop/index.ts +4 -0
  51. package/src/common/yugop/random-text.ts +95 -0
  52. package/src/common/yugop/utils/math.ts +21 -0
  53. package/src/common/yugop/utils/noop.ts +1 -0
  54. package/src/common/yugop/utils/prng.ts +35 -0
  55. package/src/common/yugop/utils/string.ts +4 -0
  56. package/src/dictionary/file-extensions.ts +81 -0
  57. package/src/dictionary/icon.ts +6 -0
  58. package/src/dictionary/text.ts +9 -0
  59. package/src/dictionary/variant.ts +19 -0
  60. package/src/fixtures/filenames.ts +60 -0
  61. package/src/fixtures/icons.json +10 -0
  62. package/src/fixtures/iconsauce.json +3 -0
  63. package/src/type/file-types.ts +55 -0
  64. package/src/type/text.ts +4 -0
  65. package/src/type/variant-file-format.ts +128 -0
  66. package/src/type/variant.ts +17 -0
  67. package/www/build/mds-accordion-timer.js +1 -1
  68. /package/dist/mds-accordion-timer/{p-d589761b.system.js → p-0c153b11.system.js} +0 -0
  69. /package/www/build/{p-d589761b.system.js → p-0c153b11.system.js} +0 -0
package/dist/stats.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2024-01-10T08:22:23",
2
+ "timestamp": "2024-02-09T14:47:28",
3
3
  "compiler": {
4
4
  "name": "node",
5
5
  "version": "20.10.0"
@@ -9,36 +9,51 @@
9
9
  "fsNamespace": "mds-accordion-timer",
10
10
  "components": 1,
11
11
  "entries": 1,
12
- "bundles": 66,
12
+ "bundles": 81,
13
13
  "outputs": [
14
14
  {
15
15
  "name": "dist-collection",
16
- "files": 25,
16
+ "files": 40,
17
17
  "generatedFiles": [
18
18
  "./dist/collection/common/aria.js",
19
+ "./dist/collection/common/file.js",
20
+ "./dist/collection/common/icon.js",
19
21
  "./dist/collection/common/keyboard-manager.js",
20
22
  "./dist/collection/common/unit.js",
23
+ "./dist/collection/common/yugop/core.js",
24
+ "./dist/collection/common/yugop/index.js",
25
+ "./dist/collection/common/yugop/random-text.js",
26
+ "./dist/collection/common/yugop/utils/math.js",
27
+ "./dist/collection/common/yugop/utils/noop.js",
28
+ "./dist/collection/common/yugop/utils/prng.js",
29
+ "./dist/collection/common/yugop/utils/string.js",
21
30
  "./dist/collection/components/mds-accordion-timer/mds-accordion-timer.js",
22
31
  "./dist/collection/components/mds-accordion-timer/test/mds-accordion-timer.e2e.js",
23
32
  "./dist/collection/components/mds-accordion-timer/test/mds-accordion-timer.stories.js",
24
33
  "./dist/collection/dictionary/autocomplete.js",
25
34
  "./dist/collection/dictionary/button.js",
26
35
  "./dist/collection/dictionary/color.js",
36
+ "./dist/collection/dictionary/file-extensions.js",
27
37
  "./dist/collection/dictionary/floating-ui.js",
28
38
  "./dist/collection/dictionary/icon.js",
29
39
  "./dist/collection/dictionary/input.js",
30
40
  "./dist/collection/dictionary/loading.js",
41
+ "./dist/collection/dictionary/text.js",
31
42
  "./dist/collection/dictionary/typography.js",
32
43
  "./dist/collection/dictionary/variant.js",
33
44
  "./dist/collection/fixtures/cities.js",
45
+ "./dist/collection/fixtures/filenames.js",
34
46
  "./dist/collection/interface/input-value.js",
35
47
  "./dist/collection/type/autocomplete.js",
36
48
  "./dist/collection/type/button.js",
49
+ "./dist/collection/type/file-types.js",
37
50
  "./dist/collection/type/floating-ui.js",
38
51
  "./dist/collection/type/form-rel.js",
39
52
  "./dist/collection/type/input.js",
40
53
  "./dist/collection/type/loading.js",
54
+ "./dist/collection/type/text.js",
41
55
  "./dist/collection/type/typography.js",
56
+ "./dist/collection/type/variant-file-format.js",
42
57
  "./dist/collection/type/variant.js"
43
58
  ]
44
59
  },
@@ -76,21 +91,21 @@
76
91
  "./dist/mds-accordion-timer/index.esm.js",
77
92
  "./dist/mds-accordion-timer/mds-accordion-timer.esm.js",
78
93
  "./dist/mds-accordion-timer/mds-accordion-timer.js",
94
+ "./dist/mds-accordion-timer/p-0c153b11.system.js",
79
95
  "./dist/mds-accordion-timer/p-25b4e062.entry.js",
80
96
  "./dist/mds-accordion-timer/p-50ea2036.system.js",
81
97
  "./dist/mds-accordion-timer/p-8a701c9c.system.entry.js",
82
98
  "./dist/mds-accordion-timer/p-ba38686d.system.js",
83
99
  "./dist/mds-accordion-timer/p-d3af5915.js",
84
- "./dist/mds-accordion-timer/p-d589761b.system.js",
85
100
  "./www/build/index.esm.js",
86
101
  "./www/build/mds-accordion-timer.esm.js",
87
102
  "./www/build/mds-accordion-timer.js",
103
+ "./www/build/p-0c153b11.system.js",
88
104
  "./www/build/p-25b4e062.entry.js",
89
105
  "./www/build/p-50ea2036.system.js",
90
106
  "./www/build/p-8a701c9c.system.entry.js",
91
107
  "./www/build/p-ba38686d.system.js",
92
- "./www/build/p-d3af5915.js",
93
- "./www/build/p-d589761b.system.js"
108
+ "./www/build/p-d3af5915.js"
94
109
  ]
95
110
  },
96
111
  {
@@ -490,14 +505,33 @@
490
505
  },
491
506
  "sourceGraph": {
492
507
  "./src/common/aria.ts": [],
508
+ "./src/common/file.ts": [],
509
+ "./src/common/icon.ts": [],
493
510
  "./src/common/keyboard-manager.ts": [],
494
511
  "./src/common/unit.ts": [],
512
+ "./src/common/yugop/core.ts": [
513
+ "./src/common/yugop/utils/math",
514
+ "./src/common/yugop/utils/prng",
515
+ "./src/common/yugop/utils/string"
516
+ ],
517
+ "./src/common/yugop/index.ts": [],
518
+ "./src/common/yugop/random-text.ts": [
519
+ "./src/common/yugop/core",
520
+ "./src/common/yugop/utils/noop"
521
+ ],
522
+ "./src/common/yugop/utils/math.ts": [
523
+ "./src/common/yugop/utils/prng"
524
+ ],
525
+ "./src/common/yugop/utils/noop.ts": [],
526
+ "./src/common/yugop/utils/prng.ts": [],
527
+ "./src/common/yugop/utils/string.ts": [],
495
528
  "./src/components/mds-accordion-timer/mds-accordion-timer.tsx": [],
496
529
  "./src/components/mds-accordion-timer/test/mds-accordion-timer.e2e.ts": [],
497
530
  "./src/components/mds-accordion-timer/test/mds-accordion-timer.stories.tsx": [],
498
531
  "./src/dictionary/autocomplete.ts": [],
499
532
  "./src/dictionary/button.ts": [],
500
533
  "./src/dictionary/color.ts": [],
534
+ "./src/dictionary/file-extensions.ts": [],
501
535
  "./src/dictionary/floating-ui.ts": [],
502
536
  "./src/dictionary/icon.ts": [
503
537
  "./src/fixtures/icons.json",
@@ -505,17 +539,22 @@
505
539
  ],
506
540
  "./src/dictionary/input.ts": [],
507
541
  "./src/dictionary/loading.ts": [],
542
+ "./src/dictionary/text.ts": [],
508
543
  "./src/dictionary/typography.ts": [],
509
544
  "./src/dictionary/variant.ts": [],
510
545
  "./src/fixtures/cities.ts": [],
546
+ "./src/fixtures/filenames.ts": [],
511
547
  "./src/interface/input-value.ts": [],
512
548
  "./src/type/autocomplete.ts": [],
513
549
  "./src/type/button.ts": [],
550
+ "./src/type/file-types.ts": [],
514
551
  "./src/type/floating-ui.ts": [],
515
552
  "./src/type/form-rel.ts": [],
516
553
  "./src/type/input.ts": [],
517
554
  "./src/type/loading.ts": [],
555
+ "./src/type/text.ts": [],
518
556
  "./src/type/typography.ts": [],
557
+ "./src/type/variant-file-format.ts": [],
519
558
  "./src/type/variant.ts": []
520
559
  },
521
560
  "rollupResults": {
@@ -0,0 +1,12 @@
1
+ import { ExtensionInfo } from '@dictionary/file-extensions';
2
+ interface FileFormatsVariants {
3
+ color: string;
4
+ icon: string;
5
+ iconBackground: string;
6
+ variant: string;
7
+ }
8
+ declare const getName: (rawFilename: string) => string;
9
+ declare const getSuffix: (rawFilename: string, suffixOverride?: string) => string;
10
+ declare const getExtensionInfos: (rawFilename: string, suffixOverride?: string) => ExtensionInfo;
11
+ declare const getFormatsVariant: (rawFilename: string, suffixOverride?: string) => FileFormatsVariants;
12
+ export { getExtensionInfos, getFormatsVariant, getSuffix, getName, };
@@ -0,0 +1,5 @@
1
+ declare const BASE64_SVG_ICON = "data:image/svg+xml;base64,";
2
+ declare const MARKUP_SVG_ICON = "<svg ";
3
+ declare const isIconFormatIsBase64: (icon?: string) => boolean;
4
+ declare const isIconFormatIsSVG: (icon?: string) => boolean;
5
+ export { isIconFormatIsBase64, isIconFormatIsSVG, BASE64_SVG_ICON, MARKUP_SVG_ICON, };
@@ -1,2 +1,3 @@
1
1
  declare const cssDurationToMilliseconds: (duration: string, defaultValue?: number) => number;
2
- export { cssDurationToMilliseconds, };
2
+ declare const cssSizeToNumber: (size: string, defaultValue?: number) => number;
3
+ export { cssDurationToMilliseconds, cssSizeToNumber, };
@@ -0,0 +1,10 @@
1
+ export declare const generateRandomCharCodeArray: (arg0: number, arg1: number) => (arg0: string) => number[];
2
+ type Options = {
3
+ str: string;
4
+ minCharCode: number;
5
+ maxCharCode: number;
6
+ placeholderChar: string;
7
+ charStep: number;
8
+ };
9
+ export declare const charCodeArrayToString: (arg0: Options) => (arg0: number[]) => string;
10
+ export {};
@@ -0,0 +1 @@
1
+ export { default } from './random-text';
@@ -0,0 +1,31 @@
1
+ type Options = {
2
+ str: string;
3
+ speed?: number;
4
+ placeholderChar?: string;
5
+ frameOffset?: number;
6
+ charOffset?: number;
7
+ charStep?: number;
8
+ minCharCode?: number;
9
+ maxCharCode?: number;
10
+ onProgress?: (arg0: string) => void;
11
+ onComplete?: (arg0: string) => void;
12
+ };
13
+ declare class RandomText {
14
+ static defaults: Options;
15
+ str: string;
16
+ speed: number;
17
+ placeholderChar: string;
18
+ frameOffset: number;
19
+ charOffset: number;
20
+ charStep: number;
21
+ minCharCode: number;
22
+ maxCharCode: number;
23
+ onProgress: (...args: Array<string>) => string;
24
+ onComplete: (...args: Array<string>) => string;
25
+ rafId: number;
26
+ constructor(options: Options);
27
+ start: () => void;
28
+ stop(): void;
29
+ step(randoms: number[], stepCount: number, speed: number): void;
30
+ }
31
+ export default RandomText;
@@ -0,0 +1,3 @@
1
+ export declare const randomSign: () => number;
2
+ export declare const generateRandomNumbers: (arg0: number) => (arg0: number) => (arg0: number) => number[];
3
+ export declare const minMaxLooped: (arg0: number, arg1: number) => (arg0: number) => number;
@@ -0,0 +1 @@
1
+ export declare const noop: (...rest: unknown[]) => unknown;
@@ -0,0 +1,8 @@
1
+ type Generator = (_?: number) => {
2
+ random: () => number;
3
+ randomFloat: () => number;
4
+ range: (min: number, max: number) => number;
5
+ rangeFloat: (min: number, max: number) => number;
6
+ };
7
+ export declare const generator: Generator;
8
+ export {};
@@ -0,0 +1 @@
1
+ export declare const strToCharCodeArray: (arg0: string) => number[];
@@ -0,0 +1,11 @@
1
+ interface FileExtenstion {
2
+ [key: string]: ExtensionInfo;
3
+ }
4
+ interface ExtensionInfo {
5
+ preview?: boolean;
6
+ format: string;
7
+ description: string;
8
+ }
9
+ declare const fileExtensionsDictionary: FileExtenstion;
10
+ declare const genericMimeToExt: Map<string, string[]>;
11
+ export { FileExtenstion, ExtensionInfo, fileExtensionsDictionary, genericMimeToExt, };
@@ -1,3 +1,4 @@
1
1
  declare const iconsDictionary: string[];
2
2
  declare const mggIconsDictionary: string[];
3
- export { iconsDictionary, mggIconsDictionary, };
3
+ declare const svgIconsDictionary: string[];
4
+ export { iconsDictionary, mggIconsDictionary, svgIconsDictionary, };
@@ -0,0 +1,2 @@
1
+ declare const truncateDictionary: string[];
2
+ export { truncateDictionary, };
@@ -2,9 +2,10 @@ declare const themeVariantDictionary: string[];
2
2
  declare const themeLuminanceVariantDictionary: string[];
3
3
  declare const themeStatusVariantDictionary: string[];
4
4
  declare const themeFullVariantDictionary: string[];
5
+ declare const themeFullVariantAvatarDictionary: string[];
5
6
  declare const themeLabelVariantDictionary: string[];
6
7
  declare const toneVariantDictionary: string[];
7
8
  declare const toneActionVariantDictionary: string[];
8
9
  declare const toneSimpleVariantDictionary: string[];
9
10
  declare const toneMinimalVariantDictionary: string[];
10
- export { themeFullVariantDictionary, themeLabelVariantDictionary, themeLuminanceVariantDictionary, themeStatusVariantDictionary, themeVariantDictionary, toneActionVariantDictionary, toneMinimalVariantDictionary, toneSimpleVariantDictionary, toneVariantDictionary, };
11
+ export { themeFullVariantAvatarDictionary, themeFullVariantDictionary, themeLabelVariantDictionary, themeLuminanceVariantDictionary, themeStatusVariantDictionary, themeVariantDictionary, toneActionVariantDictionary, toneMinimalVariantDictionary, toneSimpleVariantDictionary, toneVariantDictionary, };
@@ -0,0 +1,2 @@
1
+ declare const filesList: string[];
2
+ export { filesList, };
@@ -0,0 +1 @@
1
+ export type ExtensionSuffixType = '7z' | 'ace' | 'ai' | 'db' | 'default' | 'dmg' | 'doc' | 'docm' | 'docx' | 'eml' | 'eps' | 'exe' | 'flac' | 'gif' | 'heic' | 'htm' | 'html' | 'jpe' | 'jpeg' | 'jpg' | 'js' | 'json' | 'jsx' | 'm2v' | 'mp2' | 'mp3' | 'mp4' | 'mp4v' | 'mpeg' | 'mpg' | 'mpg4' | 'mpga' | 'odp' | 'ods' | 'odt' | 'pdf' | 'php' | 'png' | 'ppt' | 'rar' | 'rtf' | 'sass' | 'shtml' | 'svg' | 'tar' | 'tiff' | 'ts' | 'txt' | 'wav' | 'webp' | 'xar' | 'xls' | 'xlsx' | 'zip';
@@ -0,0 +1 @@
1
+ export type TypographyTruncateType = 'all' | 'none' | 'word';
@@ -0,0 +1,11 @@
1
+ interface FileFormatVariant {
2
+ color: string;
3
+ icon: string;
4
+ iconBackground: string;
5
+ variant: string;
6
+ }
7
+ interface FileFormatVariants {
8
+ [key: string]: FileFormatVariant;
9
+ }
10
+ declare const fileFormatsVariant: FileFormatVariants;
11
+ export { fileFormatsVariant, FileFormatVariant, FileFormatVariants, };
@@ -1,6 +1,7 @@
1
1
  export type ThemeStatusVariantType = 'error' | 'info' | 'success' | 'warning';
2
2
  export type ThemeVariantType = 'dark' | 'error' | 'info' | 'light' | 'primary' | 'success' | 'warning';
3
3
  export type ThemeFullVariantType = 'amaranth' | 'aqua' | 'blue' | 'dark' | 'error' | 'green' | 'info' | 'light' | 'lime' | 'orange' | 'orchid' | 'sky' | 'success' | 'violet' | 'warning' | 'yellow';
4
+ export type ThemeFullVariantAvatarType = 'amaranth' | 'aqua' | 'blue' | 'error' | 'green' | 'info' | 'lime' | 'orange' | 'orchid' | 'primary' | 'sky' | 'success' | 'violet' | 'warning' | 'yellow';
4
5
  export type ThemeLuminanceVariantType = 'dark' | 'light';
5
6
  export type LabelVariantType = 'amaranth' | 'aqua' | 'blue' | 'green' | 'lime' | 'orange' | 'orchid' | 'sky' | 'violet' | 'yellow';
6
7
  export type ActionVariantType = 'primary' | 'dark' | 'light';
@@ -1,9 +1,9 @@
1
1
  {
2
- "timestamp": "2024-01-10T08:00:22",
2
+ "timestamp": "2024-02-09T14:18:39",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
- "version": "4.9.1",
6
- "typescriptVersion": "5.2.2"
5
+ "version": "4.10.0",
6
+ "typescriptVersion": "5.3.3"
7
7
  },
8
8
  "components": [
9
9
  {
@@ -137,6 +137,16 @@
137
137
  "docstring": "",
138
138
  "path": "src/components/mds-accordion-timer-item/meta/event-detail.ts"
139
139
  },
140
+ "src/type/variant.ts::ToneMinimalVariantType": {
141
+ "declaration": "export type ToneMinimalVariantType =\n| 'strong'\n| 'weak'",
142
+ "docstring": "",
143
+ "path": "src/type/variant.ts"
144
+ },
145
+ "src/type/variant.ts::ThemeFullVariantAvatarType": {
146
+ "declaration": "export type ThemeFullVariantAvatarType =\n | 'amaranth'\n | 'aqua'\n | 'blue'\n | 'error'\n | 'green'\n | 'info'\n | 'lime'\n | 'orange'\n | 'orchid'\n | 'primary'\n | 'sky'\n | 'success'\n | 'violet'\n | 'warning'\n | 'yellow'",
147
+ "docstring": "",
148
+ "path": "src/type/variant.ts"
149
+ },
140
150
  "src/type/variant.ts::ThemeFullVariantType": {
141
151
  "declaration": "export type ThemeFullVariantType =\n | 'amaranth'\n | 'aqua'\n | 'blue'\n | 'dark'\n | 'error'\n | 'green'\n | 'info'\n | 'light'\n | 'lime'\n | 'orange'\n | 'orchid'\n | 'sky'\n | 'success'\n | 'violet'\n | 'warning'\n | 'yellow'",
142
152
  "docstring": "",
@@ -242,16 +252,26 @@
242
252
  "docstring": "",
243
253
  "path": "src/components/mds-dropdown/meta/event-detail.ts"
244
254
  },
245
- "src/components/mds-file/meta/types.ts::ExtensionSuffixType": {
246
- "declaration": "export type ExtensionSuffixType =\n | '7z'\n | 'ace'\n | 'ai'\n | 'db'\n | 'default'\n | 'dmg'\n | 'doc'\n | 'docm'\n | 'docx'\n | 'eml'\n | 'eps'\n | 'exe'\n | 'flac'\n | 'gif'\n | 'htm'\n | 'html'\n | 'jpe'\n | 'jpeg'\n | 'jpg'\n | 'js'\n | 'json'\n | 'jsx'\n | 'm2v'\n | 'mp2'\n | 'mp3'\n | 'mp4'\n | 'mp4v'\n | 'mpeg'\n | 'mpg'\n | 'mpg4'\n | 'mpga'\n | 'odp'\n | 'ods'\n | 'odt'\n | 'pdf'\n | 'php'\n | 'png'\n | 'ppt'\n | 'rar'\n | 'rtf'\n | 'sass'\n | 'shtml'\n | 'svg'\n | 'tar'\n | 'ts'\n | 'txt'\n | 'wav'\n | 'xar'\n | 'xls'\n | 'xlsx'\n | 'zip'",
255
+ "src/type/file-types.ts::ExtensionSuffixType": {
256
+ "declaration": "export type ExtensionSuffixType =\n | '7z'\n | 'ace'\n | 'ai'\n | 'db'\n | 'default'\n | 'dmg'\n | 'doc'\n | 'docm'\n | 'docx'\n | 'eml'\n | 'eps'\n | 'exe'\n | 'flac'\n | 'gif'\n | 'heic'\n | 'htm'\n | 'html'\n | 'jpe'\n | 'jpeg'\n | 'jpg'\n | 'js'\n | 'json'\n | 'jsx'\n | 'm2v'\n | 'mp2'\n | 'mp3'\n | 'mp4'\n | 'mp4v'\n | 'mpeg'\n | 'mpg'\n | 'mpg4'\n | 'mpga'\n | 'odp'\n | 'ods'\n | 'odt'\n | 'pdf'\n | 'php'\n | 'png'\n | 'ppt'\n | 'rar'\n | 'rtf'\n | 'sass'\n | 'shtml'\n | 'svg'\n | 'tar'\n | 'tiff'\n | 'ts'\n | 'txt'\n | 'wav'\n | 'webp'\n | 'xar'\n | 'xls'\n | 'xlsx'\n | 'zip'",
247
257
  "docstring": "",
248
- "path": "src/components/mds-file/meta/types.ts"
258
+ "path": "src/type/file-types.ts"
249
259
  },
250
260
  "src/components/mds-file/meta/event-detail.ts::MdsFileEventDetail": {
251
261
  "declaration": "export interface MdsFileEventDetail {\n description: string\n extension: string\n filename: string\n target: HTMLMdsFileElement\n type: string\n}",
252
262
  "docstring": "",
253
263
  "path": "src/components/mds-file/meta/event-detail.ts"
254
264
  },
265
+ "src/type/text.ts::TypographyTruncateType": {
266
+ "declaration": "export type TypographyTruncateType =\n | 'all'\n | 'none'\n | 'word'",
267
+ "docstring": "",
268
+ "path": "src/type/text.ts"
269
+ },
270
+ "src/components/mds-file-preview/meta/event-detail.ts::MdsFilePreviewEventDetail": {
271
+ "declaration": "export interface MdsFilePreviewEventDetail {\n extension: string\n filename: string\n target: HTMLMdsFileElement\n}",
272
+ "docstring": "",
273
+ "path": "src/components/mds-file-preview/meta/event-detail.ts"
274
+ },
255
275
  "src/components/mds-filter/meta/event-detail.ts::MdsFilterEventDetail": {
256
276
  "declaration": "export interface MdsFilterEventDetail {\n children: NodeListOf<HTMLMdsFilterItemElement>\n value: string\n}",
257
277
  "docstring": "",
@@ -387,6 +407,11 @@
387
407
  "docstring": "",
388
408
  "path": "src/type/input.ts"
389
409
  },
410
+ "src/components/mds-input-upload/meta/types.ts::AttachmentSort": {
411
+ "declaration": "enum AttachmentSort {\n status = 'status',\n date = 'date',\n}",
412
+ "docstring": "",
413
+ "path": "src/components/mds-input-upload/meta/types.ts"
414
+ },
390
415
  "src/type/typography.ts::TypographyType": {
391
416
  "declaration": "export type TypographyType =\n | 'action'\n | 'caption'\n | 'snippet'\n | 'detail'\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'\n | 'hack'\n | 'label'\n | 'option'\n | 'paragraph'\n | 'tip'",
392
417
  "docstring": "",
@@ -427,6 +452,11 @@
427
452
  "docstring": "",
428
453
  "path": "src/components/mds-progress/meta/types.ts"
429
454
  },
455
+ "src/components/mds-push-notification/meta/types.ts::NotificationPreviewType": {
456
+ "declaration": "export type NotificationPreviewType =\n | 'avatar'\n | 'image'",
457
+ "docstring": "",
458
+ "path": "src/components/mds-push-notification/meta/types.ts"
459
+ },
430
460
  "src/components/mds-stepper-bar/meta/event-detail.ts::MdsStepperBarEventDetail": {
431
461
  "declaration": "export interface MdsStepperBarEventDetail {\n step: number\n value: string\n}",
432
462
  "docstring": "",
@@ -438,7 +468,7 @@
438
468
  "path": "src/components/mds-stepper-bar-item/meta/event-detail.ts"
439
469
  },
440
470
  "src/components/mds-tab/meta/event-detail.ts::MdsTabEventDetail": {
441
- "declaration": "export interface MdsTabEventDetail {\n id: number\n}",
471
+ "declaration": "export interface MdsTabEventDetail {\n id: number\n value?: string\n}",
442
472
  "docstring": "",
443
473
  "path": "src/components/mds-tab/meta/event-detail.ts"
444
474
  },
@@ -452,6 +482,16 @@
452
482
  "docstring": "",
453
483
  "path": "src/type/typography.ts"
454
484
  },
485
+ "src/components/mds-tab-item/meta/event-detail.ts::MdsTabItemEventDetail": {
486
+ "declaration": "export interface MdsTabItemEventDetail {\n target: HTMLMdsTabItemElement\n value?: string\n}",
487
+ "docstring": "",
488
+ "path": "src/components/mds-tab-item/meta/event-detail.ts"
489
+ },
490
+ "src/components/mds-text/meta/types.ts::TextAnimationType": {
491
+ "declaration": "export type TextAnimationType =\n | 'none'\n | 'yugop'",
492
+ "docstring": "",
493
+ "path": "src/components/mds-text/meta/types.ts"
494
+ },
455
495
  "src/components/mds-text/meta/types.ts::TypographyTagType": {
456
496
  "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'",
457
497
  "docstring": "",
@@ -462,11 +502,6 @@
462
502
  "docstring": "",
463
503
  "path": "src/type/variant.ts"
464
504
  },
465
- "src/type/variant.ts::ToneMinimalVariantType": {
466
- "declaration": "export type ToneMinimalVariantType =\n| 'strong'\n| 'weak'",
467
- "docstring": "",
468
- "path": "src/type/variant.ts"
469
- },
470
505
  "src/components/mds-toast/meta/types.ts::ToastPosition": {
471
506
  "declaration": "export type ToastPosition =\n | 'top-left'\n | 'top-center'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-center'\n | 'bottom-right'",
472
507
  "docstring": "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maggioli-design-system/mds-accordion-timer",
3
- "version": "3.6.4",
3
+ "version": "3.7.0",
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.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -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.6.4",
28
- "@maggioli-design-system/styles": "14.1.0",
29
- "@stencil/core": "4.9.1"
27
+ "@maggioli-design-system/mds-accordion-timer-item": "3.7.0",
28
+ "@maggioli-design-system/styles": "14.2.1",
29
+ "@stencil/core": "4.10.0"
30
30
  },
31
31
  "license": "MIT",
32
32
  "author": {
@@ -0,0 +1,63 @@
1
+ import { fileExtensionsDictionary, ExtensionInfo } from '@dictionary/file-extensions'
2
+ import { fileFormatsVariant } from '@type/variant-file-format'
3
+
4
+ interface FileFormatsVariants {
5
+ color: string
6
+ icon: string
7
+ iconBackground: string
8
+ variant: string
9
+ }
10
+
11
+ const sanitizeFilename = (filename: string, error: string = 'Attribute "filename" is undefined.') => {
12
+ if (filename === undefined ) {
13
+ throw console.error(error)
14
+ }
15
+ if (filename.includes('/')) {
16
+ return filename.split('/').pop() ?? ''
17
+ }
18
+ return filename
19
+ }
20
+
21
+ const sanitizeSuffix = (rawFilename: string) => {
22
+ const filename = sanitizeFilename(rawFilename)
23
+ if (filename.includes('.')) {
24
+ return filename.split('.').pop() ?? ''
25
+ }
26
+ return filename
27
+ }
28
+
29
+ const getName = (rawFilename: string): string => {
30
+ const filename = sanitizeFilename(rawFilename)
31
+ if (filename.includes('.')) {
32
+ return filename.split('.')[0] ?? ''
33
+ }
34
+ return filename
35
+ }
36
+
37
+ const getSuffix = (rawFilename: string, suffixOverride?: string): string => {
38
+ const suffix = sanitizeSuffix(rawFilename)
39
+ const filename = sanitizeFilename(rawFilename)
40
+ if (suffixOverride !== null && suffixOverride !== undefined) {
41
+ return suffixOverride.toLowerCase()
42
+ }
43
+ if (suffix !== filename) {
44
+ return suffix
45
+ }
46
+ return 'default'
47
+ }
48
+
49
+ const getExtensionInfos = (rawFilename: string, suffixOverride?: string): ExtensionInfo => {
50
+ const suffix = getSuffix(rawFilename, suffixOverride).toLocaleLowerCase()
51
+ return fileExtensionsDictionary[suffix] ?? fileExtensionsDictionary.default
52
+ }
53
+
54
+ const getFormatsVariant = (rawFilename: string, suffixOverride?: string): FileFormatsVariants => {
55
+ return fileFormatsVariant[getExtensionInfos(rawFilename, suffixOverride).format]
56
+ }
57
+
58
+ export {
59
+ getExtensionInfos,
60
+ getFormatsVariant,
61
+ getSuffix,
62
+ getName,
63
+ }
@@ -0,0 +1,25 @@
1
+ const BASE64_SVG_ICON = 'data:image/svg+xml;base64,'
2
+ const MARKUP_SVG_ICON = '<svg '
3
+
4
+ const isIconFormatIsBase64 = (icon?: string): boolean => {
5
+ if (!icon) {
6
+ return false
7
+ }
8
+ return icon.startsWith(BASE64_SVG_ICON)
9
+ }
10
+
11
+ const isIconFormatIsSVG = (icon?: string): boolean => {
12
+ if (!icon) {
13
+ return false
14
+ }
15
+ return icon.startsWith(MARKUP_SVG_ICON)
16
+ }
17
+
18
+
19
+
20
+ export {
21
+ isIconFormatIsBase64,
22
+ isIconFormatIsSVG,
23
+ BASE64_SVG_ICON,
24
+ MARKUP_SVG_ICON,
25
+ }
@@ -1,14 +1,33 @@
1
1
  const cssDurationToMilliseconds = (duration: string, defaultValue = 1000): number => {
2
+
3
+ if (duration.includes('ms')) {
4
+ return Number(duration.replace('ms', ''))
5
+ }
6
+
2
7
  if (duration.includes('s')) {
3
8
  return Number(duration.replace('s', '')) * 1000
4
9
  }
5
10
 
6
- if (duration.includes('ms')) {
7
- return Number(duration.replace('s', ''))
11
+ return defaultValue
12
+ }
13
+
14
+ const cssSizeToNumber = (size: string, defaultValue = 0): number => {
15
+ if (size.includes('px')) {
16
+ return Number(size.replace('px', ''))
17
+ }
18
+
19
+ if (size.includes('rem')) {
20
+ return Number(size.replace('rem', '')) * 16
8
21
  }
9
22
 
23
+ if (size.includes('em')) {
24
+ return Number(size.replace('em', '')) * 16
25
+ }
26
+
10
27
  return defaultValue
11
28
  }
29
+
12
30
  export {
13
31
  cssDurationToMilliseconds,
32
+ cssSizeToNumber,
14
33
  }
@@ -0,0 +1,47 @@
1
+ import { generator } from './utils/prng'
2
+ import { strToCharCodeArray } from './utils/string'
3
+ import { randomSign, minMaxLooped } from './utils/math'
4
+ const rand = generator()
5
+
6
+ const random: (arg0: number, arg1: number) => () => number = (
7
+ base,
8
+ offset,
9
+ ) => () => (base + rand.range(0, offset)) * randomSign()
10
+
11
+ export const generateRandomCharCodeArray: (
12
+ arg0: number,
13
+ arg1: number
14
+ ) => (arg0: string) => number[] = (base, offset) => str =>
15
+ strToCharCodeArray(str).map(random(base, offset))
16
+ type Options = {
17
+ str: string
18
+ minCharCode: number
19
+ maxCharCode: number
20
+ placeholderChar: string
21
+ charStep: number
22
+ }
23
+ export const charCodeArrayToString: (
24
+ arg0: Options
25
+ ) => (arg0: number[]) => string = ({
26
+ str,
27
+ minCharCode,
28
+ maxCharCode,
29
+ placeholderChar,
30
+ charStep,
31
+ }) => charCodes =>
32
+ charCodes.reduce((acc, item, index) => {
33
+ if (item !== 0) {
34
+ if (Math.abs(item) > charStep) {
35
+ return acc + placeholderChar
36
+ }
37
+
38
+ return (
39
+ acc +
40
+ String.fromCharCode(
41
+ minMaxLooped(minCharCode, maxCharCode)(str.charCodeAt(index) + item),
42
+ )
43
+ )
44
+ }
45
+
46
+ return acc + str.charAt(index)
47
+ }, '')
@@ -0,0 +1,4 @@
1
+ // taken from https://github.com/zenoplex/random-text
2
+
3
+ // @flow
4
+ export { default } from './random-text'