@maggioli-design-system/mds-table-row 4.4.2 → 4.5.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 (101) hide show
  1. package/dist/cjs/{index-74074cfd.js → index-7b6fb148.js} +22 -14
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mds-table-row.cjs.entry.js +2 -2
  4. package/dist/cjs/mds-table-row.cjs.js +2 -2
  5. package/dist/collection/collection-manifest.json +2 -2
  6. package/dist/collection/common/file.js +48 -0
  7. package/dist/collection/common/icon.js +15 -0
  8. package/dist/collection/common/unit.js +15 -3
  9. package/dist/collection/common/yugop/core.js +16 -0
  10. package/dist/collection/common/yugop/index.js +3 -0
  11. package/dist/collection/common/yugop/random-text.js +59 -0
  12. package/dist/collection/common/yugop/utils/math.js +11 -0
  13. package/dist/collection/common/yugop/utils/noop.js +1 -0
  14. package/dist/collection/common/yugop/utils/prng.js +21 -0
  15. package/dist/collection/common/yugop/utils/string.js +2 -0
  16. package/dist/collection/components/mds-table-row/mds-table-row.css +142 -2
  17. package/dist/collection/dictionary/file-extensions.js +64 -0
  18. package/dist/collection/dictionary/icon.js +6 -1
  19. package/dist/collection/dictionary/text.js +6 -0
  20. package/dist/collection/dictionary/variant.js +18 -1
  21. package/dist/collection/fixtures/filenames.js +57 -0
  22. package/dist/collection/type/file-types.js +1 -0
  23. package/dist/collection/type/text.js +1 -0
  24. package/dist/collection/type/variant-file-format.js +111 -0
  25. package/dist/components/mds-table-row.js +1 -1
  26. package/dist/documentation.d.ts +1 -21
  27. package/dist/documentation.json +3 -3
  28. package/dist/esm/{index-152f5146.js → index-9f40909f.js} +22 -14
  29. package/dist/esm/loader.js +2 -2
  30. package/dist/esm/mds-table-row.entry.js +2 -2
  31. package/dist/esm/mds-table-row.js +3 -3
  32. package/dist/esm-es5/index-9f40909f.js +1 -0
  33. package/dist/esm-es5/loader.js +1 -1
  34. package/dist/esm-es5/mds-table-row.entry.js +1 -1
  35. package/dist/esm-es5/mds-table-row.js +1 -1
  36. package/dist/mds-table-row/mds-table-row.esm.js +1 -1
  37. package/dist/mds-table-row/mds-table-row.js +1 -1
  38. package/dist/mds-table-row/p-24e0f761.system.js +2 -0
  39. package/dist/mds-table-row/p-4e5a0559.js +2 -0
  40. package/dist/mds-table-row/{p-1bbb8bb6.system.js → p-65fbbba9.system.js} +1 -1
  41. package/dist/mds-table-row/p-ab9fb13e.entry.js +1 -0
  42. package/dist/mds-table-row/p-f8b0aa6b.system.entry.js +1 -0
  43. package/dist/stats.json +77 -35
  44. package/dist/types/common/file.d.ts +12 -0
  45. package/dist/types/common/icon.d.ts +5 -0
  46. package/dist/types/common/unit.d.ts +2 -1
  47. package/dist/types/common/yugop/core.d.ts +10 -0
  48. package/dist/types/common/yugop/index.d.ts +1 -0
  49. package/dist/types/common/yugop/random-text.d.ts +31 -0
  50. package/dist/types/common/yugop/utils/math.d.ts +3 -0
  51. package/dist/types/common/yugop/utils/noop.d.ts +1 -0
  52. package/dist/types/common/yugop/utils/prng.d.ts +8 -0
  53. package/dist/types/common/yugop/utils/string.d.ts +1 -0
  54. package/dist/types/dictionary/file-extensions.d.ts +11 -0
  55. package/dist/types/dictionary/icon.d.ts +2 -1
  56. package/dist/types/dictionary/text.d.ts +2 -0
  57. package/dist/types/dictionary/variant.d.ts +2 -1
  58. package/dist/types/fixtures/filenames.d.ts +2 -0
  59. package/dist/types/type/file-types.d.ts +1 -0
  60. package/dist/types/type/text.d.ts +1 -0
  61. package/dist/types/type/variant-file-format.d.ts +11 -0
  62. package/dist/types/type/variant.d.ts +1 -0
  63. package/documentation.json +47 -12
  64. package/package.json +4 -4
  65. package/src/common/file.ts +63 -0
  66. package/src/common/icon.ts +25 -0
  67. package/src/common/unit.ts +21 -2
  68. package/src/common/yugop/core.ts +47 -0
  69. package/src/common/yugop/index.ts +4 -0
  70. package/src/common/yugop/random-text.ts +95 -0
  71. package/src/common/yugop/utils/math.ts +21 -0
  72. package/src/common/yugop/utils/noop.ts +1 -0
  73. package/src/common/yugop/utils/prng.ts +35 -0
  74. package/src/common/yugop/utils/string.ts +4 -0
  75. package/src/dictionary/file-extensions.ts +81 -0
  76. package/src/dictionary/icon.ts +6 -0
  77. package/src/dictionary/text.ts +9 -0
  78. package/src/dictionary/variant.ts +19 -0
  79. package/src/fixtures/filenames.ts +60 -0
  80. package/src/fixtures/icons.json +10 -0
  81. package/src/fixtures/iconsauce.json +3 -0
  82. package/src/type/file-types.ts +55 -0
  83. package/src/type/text.ts +4 -0
  84. package/src/type/variant-file-format.ts +128 -0
  85. package/src/type/variant.ts +17 -0
  86. package/www/build/mds-table-row.esm.js +1 -1
  87. package/www/build/mds-table-row.js +1 -1
  88. package/www/build/p-24e0f761.system.js +2 -0
  89. package/www/build/p-4e5a0559.js +2 -0
  90. package/www/build/{p-1bbb8bb6.system.js → p-65fbbba9.system.js} +1 -1
  91. package/www/build/p-ab9fb13e.entry.js +1 -0
  92. package/www/build/p-f8b0aa6b.system.entry.js +1 -0
  93. package/dist/esm-es5/index-152f5146.js +0 -1
  94. package/dist/mds-table-row/p-0461a91a.system.entry.js +0 -1
  95. package/dist/mds-table-row/p-6d1e82c7.system.js +0 -2
  96. package/dist/mds-table-row/p-8b036a2e.entry.js +0 -1
  97. package/dist/mds-table-row/p-ccb2cba7.js +0 -2
  98. package/www/build/p-0461a91a.system.entry.js +0 -1
  99. package/www/build/p-6d1e82c7.system.js +0 -2
  100. package/www/build/p-8b036a2e.entry.js +0 -1
  101. package/www/build/p-ccb2cba7.js +0 -2
package/dist/stats.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2023-12-20T08:53:28",
2
+ "timestamp": "2024-02-09T14:57:10",
3
3
  "compiler": {
4
4
  "name": "node",
5
5
  "version": "20.10.0"
@@ -9,34 +9,49 @@
9
9
  "fsNamespace": "mds-table-row",
10
10
  "components": 1,
11
11
  "entries": 1,
12
- "bundles": 64,
12
+ "bundles": 79,
13
13
  "outputs": [
14
14
  {
15
15
  "name": "dist-collection",
16
- "files": 23,
16
+ "files": 38,
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-table-row/mds-table-row.js",
22
31
  "./dist/collection/dictionary/autocomplete.js",
23
32
  "./dist/collection/dictionary/button.js",
24
33
  "./dist/collection/dictionary/color.js",
34
+ "./dist/collection/dictionary/file-extensions.js",
25
35
  "./dist/collection/dictionary/floating-ui.js",
26
36
  "./dist/collection/dictionary/icon.js",
27
37
  "./dist/collection/dictionary/input.js",
28
38
  "./dist/collection/dictionary/loading.js",
39
+ "./dist/collection/dictionary/text.js",
29
40
  "./dist/collection/dictionary/typography.js",
30
41
  "./dist/collection/dictionary/variant.js",
31
42
  "./dist/collection/fixtures/cities.js",
43
+ "./dist/collection/fixtures/filenames.js",
32
44
  "./dist/collection/interface/input-value.js",
33
45
  "./dist/collection/type/autocomplete.js",
34
46
  "./dist/collection/type/button.js",
47
+ "./dist/collection/type/file-types.js",
35
48
  "./dist/collection/type/floating-ui.js",
36
49
  "./dist/collection/type/form-rel.js",
37
50
  "./dist/collection/type/input.js",
38
51
  "./dist/collection/type/loading.js",
52
+ "./dist/collection/type/text.js",
39
53
  "./dist/collection/type/typography.js",
54
+ "./dist/collection/type/variant-file-format.js",
40
55
  "./dist/collection/type/variant.js"
41
56
  ]
42
57
  },
@@ -54,17 +69,17 @@
54
69
  "name": "dist-lazy",
55
70
  "files": 35,
56
71
  "generatedFiles": [
57
- "./dist/cjs/index-74074cfd.js",
72
+ "./dist/cjs/index-7b6fb148.js",
58
73
  "./dist/cjs/index.cjs.js",
59
74
  "./dist/cjs/loader.cjs.js",
60
75
  "./dist/cjs/mds-table-row.cjs.entry.js",
61
76
  "./dist/cjs/mds-table-row.cjs.js",
62
- "./dist/esm-es5/index-152f5146.js",
77
+ "./dist/esm-es5/index-9f40909f.js",
63
78
  "./dist/esm-es5/index.js",
64
79
  "./dist/esm-es5/loader.js",
65
80
  "./dist/esm-es5/mds-table-row.entry.js",
66
81
  "./dist/esm-es5/mds-table-row.js",
67
- "./dist/esm/index-152f5146.js",
82
+ "./dist/esm/index-9f40909f.js",
68
83
  "./dist/esm/index.js",
69
84
  "./dist/esm/loader.js",
70
85
  "./dist/esm/mds-table-row.entry.js",
@@ -74,21 +89,21 @@
74
89
  "./dist/mds-table-row/index.esm.js",
75
90
  "./dist/mds-table-row/mds-table-row.esm.js",
76
91
  "./dist/mds-table-row/mds-table-row.js",
77
- "./dist/mds-table-row/p-0461a91a.system.entry.js",
78
- "./dist/mds-table-row/p-1bbb8bb6.system.js",
92
+ "./dist/mds-table-row/p-24e0f761.system.js",
93
+ "./dist/mds-table-row/p-4e5a0559.js",
79
94
  "./dist/mds-table-row/p-50ea2036.system.js",
80
- "./dist/mds-table-row/p-6d1e82c7.system.js",
81
- "./dist/mds-table-row/p-8b036a2e.entry.js",
82
- "./dist/mds-table-row/p-ccb2cba7.js",
95
+ "./dist/mds-table-row/p-65fbbba9.system.js",
96
+ "./dist/mds-table-row/p-ab9fb13e.entry.js",
97
+ "./dist/mds-table-row/p-f8b0aa6b.system.entry.js",
83
98
  "./www/build/index.esm.js",
84
99
  "./www/build/mds-table-row.esm.js",
85
100
  "./www/build/mds-table-row.js",
86
- "./www/build/p-0461a91a.system.entry.js",
87
- "./www/build/p-1bbb8bb6.system.js",
101
+ "./www/build/p-24e0f761.system.js",
102
+ "./www/build/p-4e5a0559.js",
88
103
  "./www/build/p-50ea2036.system.js",
89
- "./www/build/p-6d1e82c7.system.js",
90
- "./www/build/p-8b036a2e.entry.js",
91
- "./www/build/p-ccb2cba7.js"
104
+ "./www/build/p-65fbbba9.system.js",
105
+ "./www/build/p-ab9fb13e.entry.js",
106
+ "./www/build/p-f8b0aa6b.system.entry.js"
92
107
  ]
93
108
  },
94
109
  {
@@ -121,12 +136,12 @@
121
136
  "components": [
122
137
  "mds-table-row"
123
138
  ],
124
- "bundleId": "p-8b036a2e",
125
- "fileName": "p-8b036a2e.entry.js",
139
+ "bundleId": "p-ab9fb13e",
140
+ "fileName": "p-ab9fb13e.entry.js",
126
141
  "imports": [
127
- "p-ccb2cba7.js"
142
+ "p-4e5a0559.js"
128
143
  ],
129
- "originalByteSize": 1116
144
+ "originalByteSize": 3709
130
145
  }
131
146
  ],
132
147
  "esm": [
@@ -138,9 +153,9 @@
138
153
  "bundleId": "mds-table-row",
139
154
  "fileName": "mds-table-row.entry.js",
140
155
  "imports": [
141
- "index-152f5146.js"
156
+ "index-9f40909f.js"
142
157
  ],
143
- "originalByteSize": 1120
158
+ "originalByteSize": 3713
144
159
  }
145
160
  ],
146
161
  "es5": [
@@ -152,9 +167,9 @@
152
167
  "bundleId": "mds-table-row",
153
168
  "fileName": "mds-table-row.entry.js",
154
169
  "imports": [
155
- "index-152f5146.js"
170
+ "index-9f40909f.js"
156
171
  ],
157
- "originalByteSize": 1120
172
+ "originalByteSize": 3713
158
173
  }
159
174
  ],
160
175
  "system": [
@@ -163,12 +178,12 @@
163
178
  "components": [
164
179
  "mds-table-row"
165
180
  ],
166
- "bundleId": "p-0461a91a.system",
167
- "fileName": "p-0461a91a.system.entry.js",
181
+ "bundleId": "p-f8b0aa6b.system",
182
+ "fileName": "p-f8b0aa6b.system.entry.js",
168
183
  "imports": [
169
- "p-6d1e82c7.system.js"
184
+ "p-24e0f761.system.js"
170
185
  ],
171
- "originalByteSize": 1401
186
+ "originalByteSize": 3994
172
187
  }
173
188
  ],
174
189
  "commonjs": [
@@ -180,9 +195,9 @@
180
195
  "bundleId": "mds-table-row.cjs",
181
196
  "fileName": "mds-table-row.cjs.entry.js",
182
197
  "imports": [
183
- "index-74074cfd.js"
198
+ "index-7b6fb148.js"
184
199
  ],
185
- "originalByteSize": 1190
200
+ "originalByteSize": 3783
186
201
  }
187
202
  ]
188
203
  },
@@ -300,7 +315,7 @@
300
315
  "modeName": "$",
301
316
  "styleId": "MDS-TABLE-ROW",
302
317
  "styleStr": null,
303
- "styleIdentifier": "mdsTableRowStyle",
318
+ "styleIdentifier": "MdsTableRowStyle",
304
319
  "externalStyles": [
305
320
  {
306
321
  "absolutePath": "/builds/maggiolispa/ricerca-sviluppo-new-media/magma/design-system/projects/stencil/.build/mds-table-row/src/components/mds-table-row/mds-table-row.css",
@@ -380,10 +395,10 @@
380
395
  "htmlParts": [],
381
396
  "isUpdateable": true,
382
397
  "potentialCmpRefs": [],
383
- "directDependencies": [],
384
- "dependencies": [],
385
398
  "dependents": [],
386
- "directDependents": []
399
+ "dependencies": [],
400
+ "directDependents": [],
401
+ "directDependencies": []
387
402
  }
388
403
  ],
389
404
  "entryKey": "mds-table-row.entry"
@@ -391,17 +406,36 @@
391
406
  ],
392
407
  "componentGraph": {
393
408
  "sc-mds-table-row": [
394
- "p-ccb2cba7.js"
409
+ "p-4e5a0559.js"
395
410
  ]
396
411
  },
397
412
  "sourceGraph": {
398
413
  "./src/common/aria.ts": [],
414
+ "./src/common/file.ts": [],
415
+ "./src/common/icon.ts": [],
399
416
  "./src/common/keyboard-manager.ts": [],
400
417
  "./src/common/unit.ts": [],
418
+ "./src/common/yugop/core.ts": [
419
+ "./src/common/yugop/utils/math",
420
+ "./src/common/yugop/utils/prng",
421
+ "./src/common/yugop/utils/string"
422
+ ],
423
+ "./src/common/yugop/index.ts": [],
424
+ "./src/common/yugop/random-text.ts": [
425
+ "./src/common/yugop/core",
426
+ "./src/common/yugop/utils/noop"
427
+ ],
428
+ "./src/common/yugop/utils/math.ts": [
429
+ "./src/common/yugop/utils/prng"
430
+ ],
431
+ "./src/common/yugop/utils/noop.ts": [],
432
+ "./src/common/yugop/utils/prng.ts": [],
433
+ "./src/common/yugop/utils/string.ts": [],
401
434
  "./src/components/mds-table-row/mds-table-row.tsx": [],
402
435
  "./src/dictionary/autocomplete.ts": [],
403
436
  "./src/dictionary/button.ts": [],
404
437
  "./src/dictionary/color.ts": [],
438
+ "./src/dictionary/file-extensions.ts": [],
405
439
  "./src/dictionary/floating-ui.ts": [],
406
440
  "./src/dictionary/icon.ts": [
407
441
  "./src/fixtures/icons.json",
@@ -409,18 +443,26 @@
409
443
  ],
410
444
  "./src/dictionary/input.ts": [],
411
445
  "./src/dictionary/loading.ts": [],
446
+ "./src/dictionary/text.ts": [],
412
447
  "./src/dictionary/typography.ts": [],
413
448
  "./src/dictionary/variant.ts": [],
414
449
  "./src/fixtures/cities.ts": [],
450
+ "./src/fixtures/filenames.ts": [],
415
451
  "./src/interface/input-value.ts": [],
416
452
  "./src/type/autocomplete.ts": [],
417
453
  "./src/type/button.ts": [],
454
+ "./src/type/file-types.ts": [],
418
455
  "./src/type/floating-ui.ts": [],
419
456
  "./src/type/form-rel.ts": [],
420
457
  "./src/type/input.ts": [],
421
458
  "./src/type/loading.ts": [],
459
+ "./src/type/text.ts": [],
422
460
  "./src/type/typography.ts": [],
461
+ "./src/type/variant-file-format.ts": [],
423
462
  "./src/type/variant.ts": []
424
463
  },
464
+ "rollupResults": {
465
+ "modules": []
466
+ },
425
467
  "collections": []
426
468
  }
@@ -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": "2023-12-20T08:21:18",
2
+ "timestamp": "2024-02-09T14:18:39",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
- "version": "4.8.0",
6
- "typescriptVersion": "5.2.2"
5
+ "version": "4.10.0",
6
+ "typescriptVersion": "5.3.3"
7
7
  },
8
8
  "components": [
9
9
  {
@@ -86,6 +86,16 @@
86
86
  "docstring": "",
87
87
  "path": "src/components/mds-accordion-timer-item/meta/event-detail.ts"
88
88
  },
89
+ "src/type/variant.ts::ToneMinimalVariantType": {
90
+ "declaration": "export type ToneMinimalVariantType =\n| 'strong'\n| 'weak'",
91
+ "docstring": "",
92
+ "path": "src/type/variant.ts"
93
+ },
94
+ "src/type/variant.ts::ThemeFullVariantAvatarType": {
95
+ "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'",
96
+ "docstring": "",
97
+ "path": "src/type/variant.ts"
98
+ },
89
99
  "src/type/variant.ts::ThemeFullVariantType": {
90
100
  "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'",
91
101
  "docstring": "",
@@ -191,16 +201,26 @@
191
201
  "docstring": "",
192
202
  "path": "src/components/mds-dropdown/meta/event-detail.ts"
193
203
  },
194
- "src/components/mds-file/meta/types.ts::ExtensionSuffixType": {
195
- "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'",
204
+ "src/type/file-types.ts::ExtensionSuffixType": {
205
+ "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'",
196
206
  "docstring": "",
197
- "path": "src/components/mds-file/meta/types.ts"
207
+ "path": "src/type/file-types.ts"
198
208
  },
199
209
  "src/components/mds-file/meta/event-detail.ts::MdsFileEventDetail": {
200
210
  "declaration": "export interface MdsFileEventDetail {\n description: string\n extension: string\n filename: string\n target: HTMLMdsFileElement\n type: string\n}",
201
211
  "docstring": "",
202
212
  "path": "src/components/mds-file/meta/event-detail.ts"
203
213
  },
214
+ "src/type/text.ts::TypographyTruncateType": {
215
+ "declaration": "export type TypographyTruncateType =\n | 'all'\n | 'none'\n | 'word'",
216
+ "docstring": "",
217
+ "path": "src/type/text.ts"
218
+ },
219
+ "src/components/mds-file-preview/meta/event-detail.ts::MdsFilePreviewEventDetail": {
220
+ "declaration": "export interface MdsFilePreviewEventDetail {\n extension: string\n filename: string\n target: HTMLMdsFileElement\n}",
221
+ "docstring": "",
222
+ "path": "src/components/mds-file-preview/meta/event-detail.ts"
223
+ },
204
224
  "src/components/mds-filter/meta/event-detail.ts::MdsFilterEventDetail": {
205
225
  "declaration": "export interface MdsFilterEventDetail {\n children: NodeListOf<HTMLMdsFilterItemElement>\n value: string\n}",
206
226
  "docstring": "",
@@ -336,6 +356,11 @@
336
356
  "docstring": "",
337
357
  "path": "src/type/input.ts"
338
358
  },
359
+ "src/components/mds-input-upload/meta/types.ts::AttachmentSort": {
360
+ "declaration": "enum AttachmentSort {\n status = 'status',\n date = 'date',\n}",
361
+ "docstring": "",
362
+ "path": "src/components/mds-input-upload/meta/types.ts"
363
+ },
339
364
  "src/type/typography.ts::TypographyType": {
340
365
  "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'",
341
366
  "docstring": "",
@@ -376,6 +401,11 @@
376
401
  "docstring": "",
377
402
  "path": "src/components/mds-progress/meta/types.ts"
378
403
  },
404
+ "src/components/mds-push-notification/meta/types.ts::NotificationPreviewType": {
405
+ "declaration": "export type NotificationPreviewType =\n | 'avatar'\n | 'image'",
406
+ "docstring": "",
407
+ "path": "src/components/mds-push-notification/meta/types.ts"
408
+ },
379
409
  "src/components/mds-stepper-bar/meta/event-detail.ts::MdsStepperBarEventDetail": {
380
410
  "declaration": "export interface MdsStepperBarEventDetail {\n step: number\n value: string\n}",
381
411
  "docstring": "",
@@ -387,7 +417,7 @@
387
417
  "path": "src/components/mds-stepper-bar-item/meta/event-detail.ts"
388
418
  },
389
419
  "src/components/mds-tab/meta/event-detail.ts::MdsTabEventDetail": {
390
- "declaration": "export interface MdsTabEventDetail {\n id: number\n}",
420
+ "declaration": "export interface MdsTabEventDetail {\n id: number\n value?: string\n}",
391
421
  "docstring": "",
392
422
  "path": "src/components/mds-tab/meta/event-detail.ts"
393
423
  },
@@ -401,6 +431,16 @@
401
431
  "docstring": "",
402
432
  "path": "src/type/typography.ts"
403
433
  },
434
+ "src/components/mds-tab-item/meta/event-detail.ts::MdsTabItemEventDetail": {
435
+ "declaration": "export interface MdsTabItemEventDetail {\n target: HTMLMdsTabItemElement\n value?: string\n}",
436
+ "docstring": "",
437
+ "path": "src/components/mds-tab-item/meta/event-detail.ts"
438
+ },
439
+ "src/components/mds-text/meta/types.ts::TextAnimationType": {
440
+ "declaration": "export type TextAnimationType =\n | 'none'\n | 'yugop'",
441
+ "docstring": "",
442
+ "path": "src/components/mds-text/meta/types.ts"
443
+ },
404
444
  "src/components/mds-text/meta/types.ts::TypographyTagType": {
405
445
  "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'",
406
446
  "docstring": "",
@@ -411,11 +451,6 @@
411
451
  "docstring": "",
412
452
  "path": "src/type/variant.ts"
413
453
  },
414
- "src/type/variant.ts::ToneMinimalVariantType": {
415
- "declaration": "export type ToneMinimalVariantType =\n| 'strong'\n| 'weak'",
416
- "docstring": "",
417
- "path": "src/type/variant.ts"
418
- },
419
454
  "src/components/mds-toast/meta/types.ts::ToastPosition": {
420
455
  "declaration": "export type ToastPosition =\n | 'top-left'\n | 'top-center'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-center'\n | 'bottom-right'",
421
456
  "docstring": "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maggioli-design-system/mds-table-row",
3
- "version": "4.4.2",
3
+ "version": "4.5.0",
4
4
  "description": "mds-table-row 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",
@@ -23,9 +23,9 @@
23
23
  "prepublishOnly": "npm run build"
24
24
  },
25
25
  "dependencies": {
26
- "@maggioli-design-system/mds-table-cell": "4.4.2",
27
- "@maggioli-design-system/styles": "14.0.0",
28
- "@stencil/core": "4.8.0"
26
+ "@maggioli-design-system/mds-table-cell": "4.5.0",
27
+ "@maggioli-design-system/styles": "14.2.1",
28
+ "@stencil/core": "4.10.0"
29
29
  },
30
30
  "license": "MIT",
31
31
  "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
+ }