@maggioli-design-system/mds-push-notification 5.1.2 → 5.2.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.
- package/dist/collection/common/number.js +5 -0
- package/dist/collection/common/unit.js +16 -1
- package/dist/collection/dictionary/button.js +16 -1
- package/dist/documentation.json +1 -1
- package/dist/stats.json +5 -3
- package/dist/types/common/number.d.ts +2 -0
- package/dist/types/common/unit.d.ts +3 -1
- package/dist/types/dictionary/button.d.ts +3 -1
- package/dist/types/type/button.d.ts +1 -0
- package/documentation.json +11 -1
- package/package.json +2 -2
- package/src/common/number.ts +8 -0
- package/src/common/unit.ts +23 -0
- package/src/dictionary/button.ts +19 -0
- package/src/fixtures/icons.json +5 -0
- package/src/type/button.ts +11 -0
|
@@ -7,6 +7,15 @@ const cssDurationToMilliseconds = (duration, defaultValue = 1000) => {
|
|
|
7
7
|
}
|
|
8
8
|
return defaultValue;
|
|
9
9
|
};
|
|
10
|
+
const cssDurationToSeconds = (duration, defaultValue = 1000) => {
|
|
11
|
+
if (duration.includes('ms')) {
|
|
12
|
+
return Number(duration.replace('ms', '')) / 1000;
|
|
13
|
+
}
|
|
14
|
+
if (duration.includes('s')) {
|
|
15
|
+
return Number(duration.replace('s', ''));
|
|
16
|
+
}
|
|
17
|
+
return defaultValue;
|
|
18
|
+
};
|
|
10
19
|
const cssSizeToNumber = (size, defaultValue = 0) => {
|
|
11
20
|
if (size.includes('px')) {
|
|
12
21
|
return Number(size.replace('px', ''));
|
|
@@ -19,4 +28,10 @@ const cssSizeToNumber = (size, defaultValue = 0) => {
|
|
|
19
28
|
}
|
|
20
29
|
return defaultValue;
|
|
21
30
|
};
|
|
22
|
-
|
|
31
|
+
const cssRotationToNumber = (size, defaultValue = 0) => {
|
|
32
|
+
if (size.includes('deg')) {
|
|
33
|
+
return Number(size.replace('deg', ''));
|
|
34
|
+
}
|
|
35
|
+
return defaultValue;
|
|
36
|
+
};
|
|
37
|
+
export { cssDurationToMilliseconds, cssDurationToSeconds, cssRotationToNumber, cssSizeToNumber, };
|
|
@@ -11,12 +11,27 @@ const buttonVariantDictionary = [
|
|
|
11
11
|
'success',
|
|
12
12
|
'warning',
|
|
13
13
|
];
|
|
14
|
+
const buttonDropdownVariantDictionary = [
|
|
15
|
+
'ai',
|
|
16
|
+
'dark',
|
|
17
|
+
'error',
|
|
18
|
+
'info',
|
|
19
|
+
'light',
|
|
20
|
+
'primary',
|
|
21
|
+
'secondary',
|
|
22
|
+
'success',
|
|
23
|
+
'warning',
|
|
24
|
+
];
|
|
14
25
|
const buttonToneVariantDictionary = [
|
|
15
26
|
'strong',
|
|
16
27
|
'weak',
|
|
17
28
|
'ghost',
|
|
18
29
|
'quiet',
|
|
19
30
|
];
|
|
31
|
+
const buttonToneMinimalVariantDictionary = [
|
|
32
|
+
'strong',
|
|
33
|
+
'weak',
|
|
34
|
+
];
|
|
20
35
|
const buttonTargetDictionary = [
|
|
21
36
|
'blank',
|
|
22
37
|
'self',
|
|
@@ -36,4 +51,4 @@ const buttonTypeDictionary = [
|
|
|
36
51
|
'submit',
|
|
37
52
|
'reset',
|
|
38
53
|
];
|
|
39
|
-
export { buttonIconPositionDictionary, buttonSizeDictionary, buttonTargetDictionary, buttonToneVariantDictionary, buttonTypeDictionary, buttonVariantDictionary, };
|
|
54
|
+
export { buttonDropdownVariantDictionary, buttonIconPositionDictionary, buttonSizeDictionary, buttonTargetDictionary, buttonToneMinimalVariantDictionary, buttonToneVariantDictionary, buttonTypeDictionary, buttonVariantDictionary, };
|
package/dist/documentation.json
CHANGED
package/dist/stats.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2025-06-
|
|
2
|
+
"timestamp": "2025-06-23T15:01:25",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "node",
|
|
5
5
|
"version": "22.11.0"
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
"fsNamespace": "mds-push-notification",
|
|
10
10
|
"components": 1,
|
|
11
11
|
"entries": 1,
|
|
12
|
-
"bundles":
|
|
12
|
+
"bundles": 105,
|
|
13
13
|
"outputs": [
|
|
14
14
|
{
|
|
15
15
|
"name": "dist-collection",
|
|
16
|
-
"files":
|
|
16
|
+
"files": 57,
|
|
17
17
|
"generatedFiles": [
|
|
18
18
|
"./dist/collection/common/aria.js",
|
|
19
19
|
"./dist/collection/common/browser.js",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"./dist/collection/common/icon.js",
|
|
25
25
|
"./dist/collection/common/keyboard-manager.js",
|
|
26
26
|
"./dist/collection/common/locale.js",
|
|
27
|
+
"./dist/collection/common/number.js",
|
|
27
28
|
"./dist/collection/common/slot.js",
|
|
28
29
|
"./dist/collection/common/string.js",
|
|
29
30
|
"./dist/collection/common/unit.js",
|
|
@@ -773,6 +774,7 @@
|
|
|
773
774
|
"./src/common/icon.ts": [],
|
|
774
775
|
"./src/common/keyboard-manager.ts": [],
|
|
775
776
|
"./src/common/locale.ts": [],
|
|
777
|
+
"./src/common/number.ts": [],
|
|
776
778
|
"./src/common/slot.ts": [],
|
|
777
779
|
"./src/common/string.ts": [],
|
|
778
780
|
"./src/common/unit.ts": [],
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
declare const cssDurationToMilliseconds: (duration: string, defaultValue?: number) => number;
|
|
2
|
+
declare const cssDurationToSeconds: (duration: string, defaultValue?: number) => number;
|
|
2
3
|
declare const cssSizeToNumber: (size: string, defaultValue?: number) => number;
|
|
3
|
-
|
|
4
|
+
declare const cssRotationToNumber: (size: string, defaultValue?: number) => number;
|
|
5
|
+
export { cssDurationToMilliseconds, cssDurationToSeconds, cssRotationToNumber, cssSizeToNumber, };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
declare const buttonVariantDictionary: string[];
|
|
2
|
+
declare const buttonDropdownVariantDictionary: string[];
|
|
2
3
|
declare const buttonToneVariantDictionary: string[];
|
|
4
|
+
declare const buttonToneMinimalVariantDictionary: string[];
|
|
3
5
|
declare const buttonTargetDictionary: string[];
|
|
4
6
|
declare const buttonSizeDictionary: string[];
|
|
5
7
|
declare const buttonIconPositionDictionary: string[];
|
|
6
8
|
declare const buttonTypeDictionary: string[];
|
|
7
|
-
export { buttonIconPositionDictionary, buttonSizeDictionary, buttonTargetDictionary, buttonToneVariantDictionary, buttonTypeDictionary, buttonVariantDictionary, };
|
|
9
|
+
export { buttonDropdownVariantDictionary, buttonIconPositionDictionary, buttonSizeDictionary, buttonTargetDictionary, buttonToneMinimalVariantDictionary, buttonToneVariantDictionary, buttonTypeDictionary, buttonVariantDictionary, };
|
|
@@ -3,3 +3,4 @@ export type ButtonTargetType = 'self' | 'blank';
|
|
|
3
3
|
export type ButtonSizeType = 'sm' | 'md' | 'lg' | 'xl';
|
|
4
4
|
export type ButtonIconPositionType = 'left' | 'right';
|
|
5
5
|
export type ButtonVariantType = 'ai' | 'apple' | 'dark' | 'error' | 'google' | 'info' | 'light' | 'primary' | 'secondary' | 'success' | 'warning';
|
|
6
|
+
export type ButtonDropdownVariantType = 'ai' | 'dark' | 'error' | 'info' | 'light' | 'primary' | 'secondary' | 'success' | 'warning';
|
package/documentation.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2025-06-
|
|
2
|
+
"timestamp": "2025-06-23T13:28:32",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.27.2",
|
|
@@ -399,6 +399,11 @@
|
|
|
399
399
|
"docstring": "",
|
|
400
400
|
"path": "src/type/text.ts"
|
|
401
401
|
},
|
|
402
|
+
"src/type/button.ts::ButtonDropdownVariantType": {
|
|
403
|
+
"declaration": "export type ButtonDropdownVariantType =\n | 'ai'\n | 'dark'\n | 'error'\n | 'info'\n | 'light'\n | 'primary'\n | 'secondary'\n | 'success'\n | 'warning'",
|
|
404
|
+
"docstring": "",
|
|
405
|
+
"path": "src/type/button.ts"
|
|
406
|
+
},
|
|
402
407
|
"src/components/mds-calendar-cell/meta/types.ts::CalendarCellType": {
|
|
403
408
|
"declaration": "export type CalendarCellType =\n | 'other'\n | 'current'\n | 'weekend'",
|
|
404
409
|
"docstring": "",
|
|
@@ -629,6 +634,11 @@
|
|
|
629
634
|
"docstring": "",
|
|
630
635
|
"path": "src/type/typography.ts"
|
|
631
636
|
},
|
|
637
|
+
"src/components/mds-mention/meta/type.ts::MentionSize": {
|
|
638
|
+
"declaration": "export type MentionSize =\n | 'sm'\n | 'md'\n | 'lg'",
|
|
639
|
+
"docstring": "",
|
|
640
|
+
"path": "src/components/mds-mention/meta/type.ts"
|
|
641
|
+
},
|
|
632
642
|
"src/components/mds-modal/meta/types.ts::ModalPositionType": {
|
|
633
643
|
"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'",
|
|
634
644
|
"docstring": "",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maggioli-design-system/mds-push-notification",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "mds-push-notification 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",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"test": "stencil test --spec --e2e"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@maggioli-design-system/mds-push-notification-item": "1.
|
|
27
|
+
"@maggioli-design-system/mds-push-notification-item": "1.2.0",
|
|
28
28
|
"@maggioli-design-system/styles": "15.11.0",
|
|
29
29
|
"@stencil/core": "4.27.2",
|
|
30
30
|
"clsx": "2.1.0"
|
package/src/common/unit.ts
CHANGED
|
@@ -11,6 +11,19 @@ const cssDurationToMilliseconds = (duration: string, defaultValue = 1000): numbe
|
|
|
11
11
|
return defaultValue
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
const cssDurationToSeconds = (duration: string, defaultValue = 1000): number => {
|
|
15
|
+
|
|
16
|
+
if (duration.includes('ms')) {
|
|
17
|
+
return Number(duration.replace('ms', '')) / 1000
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (duration.includes('s')) {
|
|
21
|
+
return Number(duration.replace('s', ''))
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return defaultValue
|
|
25
|
+
}
|
|
26
|
+
|
|
14
27
|
const cssSizeToNumber = (size: string, defaultValue = 0): number => {
|
|
15
28
|
if (size.includes('px')) {
|
|
16
29
|
return Number(size.replace('px', ''))
|
|
@@ -27,7 +40,17 @@ const cssSizeToNumber = (size: string, defaultValue = 0): number => {
|
|
|
27
40
|
return defaultValue
|
|
28
41
|
}
|
|
29
42
|
|
|
43
|
+
const cssRotationToNumber = (size: string, defaultValue = 0): number => {
|
|
44
|
+
if (size.includes('deg')) {
|
|
45
|
+
return Number(size.replace('deg', ''))
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return defaultValue
|
|
49
|
+
}
|
|
50
|
+
|
|
30
51
|
export {
|
|
31
52
|
cssDurationToMilliseconds,
|
|
53
|
+
cssDurationToSeconds,
|
|
54
|
+
cssRotationToNumber,
|
|
32
55
|
cssSizeToNumber,
|
|
33
56
|
}
|
package/src/dictionary/button.ts
CHANGED
|
@@ -12,6 +12,18 @@ const buttonVariantDictionary = [
|
|
|
12
12
|
'warning',
|
|
13
13
|
]
|
|
14
14
|
|
|
15
|
+
const buttonDropdownVariantDictionary = [
|
|
16
|
+
'ai',
|
|
17
|
+
'dark',
|
|
18
|
+
'error',
|
|
19
|
+
'info',
|
|
20
|
+
'light',
|
|
21
|
+
'primary',
|
|
22
|
+
'secondary',
|
|
23
|
+
'success',
|
|
24
|
+
'warning',
|
|
25
|
+
]
|
|
26
|
+
|
|
15
27
|
const buttonToneVariantDictionary = [
|
|
16
28
|
'strong',
|
|
17
29
|
'weak',
|
|
@@ -19,6 +31,11 @@ const buttonToneVariantDictionary = [
|
|
|
19
31
|
'quiet',
|
|
20
32
|
]
|
|
21
33
|
|
|
34
|
+
const buttonToneMinimalVariantDictionary = [
|
|
35
|
+
'strong',
|
|
36
|
+
'weak',
|
|
37
|
+
]
|
|
38
|
+
|
|
22
39
|
const buttonTargetDictionary = [
|
|
23
40
|
'blank',
|
|
24
41
|
'self',
|
|
@@ -43,9 +60,11 @@ const buttonTypeDictionary = [
|
|
|
43
60
|
]
|
|
44
61
|
|
|
45
62
|
export {
|
|
63
|
+
buttonDropdownVariantDictionary,
|
|
46
64
|
buttonIconPositionDictionary,
|
|
47
65
|
buttonSizeDictionary,
|
|
48
66
|
buttonTargetDictionary,
|
|
67
|
+
buttonToneMinimalVariantDictionary,
|
|
49
68
|
buttonToneVariantDictionary,
|
|
50
69
|
buttonTypeDictionary,
|
|
51
70
|
buttonVariantDictionary,
|
package/src/fixtures/icons.json
CHANGED
|
@@ -343,6 +343,7 @@
|
|
|
343
343
|
"mi/baseline/add-circle",
|
|
344
344
|
"mi/baseline/adobe",
|
|
345
345
|
"mi/baseline/agriculture",
|
|
346
|
+
"mi/baseline/alternate-email",
|
|
346
347
|
"mi/baseline/animation",
|
|
347
348
|
"mi/baseline/arrow-back",
|
|
348
349
|
"mi/baseline/arrow-back-ios-new",
|
|
@@ -376,6 +377,7 @@
|
|
|
376
377
|
"mi/baseline/directions-run",
|
|
377
378
|
"mi/baseline/directions-walk",
|
|
378
379
|
"mi/baseline/done",
|
|
380
|
+
"mi/baseline/done-all",
|
|
379
381
|
"mi/baseline/downhill-skiing",
|
|
380
382
|
"mi/baseline/draw",
|
|
381
383
|
"mi/baseline/eco",
|
|
@@ -433,6 +435,8 @@
|
|
|
433
435
|
"mi/baseline/sports-soccer",
|
|
434
436
|
"mi/baseline/stadium",
|
|
435
437
|
"mi/baseline/terminal",
|
|
438
|
+
"mi/baseline/text-format",
|
|
439
|
+
"mi/baseline/text-rotate-up",
|
|
436
440
|
"mi/baseline/timer",
|
|
437
441
|
"mi/baseline/tv",
|
|
438
442
|
"mi/baseline/undo",
|
|
@@ -446,6 +450,7 @@
|
|
|
446
450
|
"mi/baseline/warning",
|
|
447
451
|
"mi/baseline/warning-amber",
|
|
448
452
|
"mi/baseline/web",
|
|
453
|
+
"mi/baseline/wrap-text",
|
|
449
454
|
"mi/baseline/wysiwyg",
|
|
450
455
|
"mi/outline/auto-awesome",
|
|
451
456
|
"mi/outline/backspace",
|
package/src/type/button.ts
CHANGED