@maggioli-design-system/mds-progress 3.2.3 → 3.3.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 (51) hide show
  1. package/dist/cjs/mds-progress.cjs.entry.js +2 -2
  2. package/dist/collection/common/locale.js +10 -8
  3. package/dist/collection/common/number.js +5 -0
  4. package/dist/collection/common/slot.js +10 -1
  5. package/dist/collection/common/unit.js +16 -1
  6. package/dist/collection/components/mds-progress/mds-progress.css +10 -2
  7. package/dist/collection/components/mds-progress/mds-progress.js +4 -1
  8. package/dist/collection/components/mds-progress/test/mds-progress.stories.js +6 -4
  9. package/dist/collection/dictionary/button.js +20 -1
  10. package/dist/collection/dictionary/icon.js +1 -1
  11. package/dist/components/mds-progress.js +2 -2
  12. package/dist/documentation.json +13 -3
  13. package/dist/esm/mds-progress.entry.js +2 -2
  14. package/dist/esm-es5/mds-progress.entry.js +1 -1
  15. package/dist/mds-progress/mds-progress.esm.js +1 -1
  16. package/dist/mds-progress/p-1a4bce59.system.entry.js +1 -0
  17. package/dist/mds-progress/p-1d5b5b51.system.js +1 -1
  18. package/dist/mds-progress/p-73f6f6b3.entry.js +1 -0
  19. package/dist/stats.json +37 -23
  20. package/dist/types/common/number.d.ts +2 -0
  21. package/dist/types/common/slot.d.ts +2 -1
  22. package/dist/types/common/unit.d.ts +3 -1
  23. package/dist/types/components/mds-progress/mds-progress.d.ts +3 -0
  24. package/dist/types/components/mds-progress/test/mds-progress.stories.d.ts +6 -1
  25. package/dist/types/dictionary/button.d.ts +4 -1
  26. package/dist/types/type/button.d.ts +2 -0
  27. package/documentation.json +44 -4
  28. package/package.json +1 -1
  29. package/readme.md +7 -0
  30. package/src/common/locale.ts +10 -8
  31. package/src/common/number.ts +8 -0
  32. package/src/common/slot.ts +12 -0
  33. package/src/common/unit.ts +23 -0
  34. package/src/components/mds-progress/css/mds-progress-pref-theme.css +10 -2
  35. package/src/components/mds-progress/mds-progress.tsx +5 -2
  36. package/src/components/mds-progress/readme.md +7 -0
  37. package/src/components/mds-progress/test/mds-progress.stories.tsx +13 -7
  38. package/src/dictionary/button.ts +25 -0
  39. package/src/dictionary/icon.ts +2 -1
  40. package/src/fixtures/icons.json +9 -0
  41. package/src/tailwind/components.css +1 -1
  42. package/src/type/button.ts +15 -0
  43. package/www/build/mds-progress.esm.js +1 -1
  44. package/www/build/p-1a4bce59.system.entry.js +1 -0
  45. package/www/build/p-1d5b5b51.system.js +1 -1
  46. package/www/build/p-73f6f6b3.entry.js +1 -0
  47. package/dist/mds-progress/p-7a09a95a.entry.js +0 -1
  48. package/dist/mds-progress/p-eaa61e27.system.entry.js +0 -1
  49. package/src/fixtures/iconsauce.json +0 -310
  50. package/www/build/p-7a09a95a.entry.js +0 -1
  51. package/www/build/p-eaa61e27.system.entry.js +0 -1
package/dist/stats.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
- "timestamp": "2025-06-03T14:18:34",
2
+ "timestamp": "2026-02-13T10:25:24",
3
3
  "compiler": {
4
4
  "name": "node",
5
- "version": "22.11.0"
5
+ "version": "22.15.0"
6
6
  },
7
7
  "app": {
8
8
  "namespace": "MdsProgress",
9
9
  "fsNamespace": "mds-progress",
10
10
  "components": 1,
11
11
  "entries": 1,
12
- "bundles": 105,
12
+ "bundles": 106,
13
13
  "outputs": [
14
14
  {
15
15
  "name": "dist-collection",
16
- "files": 57,
16
+ "files": 58,
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",
@@ -111,25 +112,25 @@
111
112
  "./dist/mds-progress/index.esm.js",
112
113
  "./dist/mds-progress/mds-progress.esm.js",
113
114
  "./dist/mds-progress/mds-progress.js",
115
+ "./dist/mds-progress/p-1a4bce59.system.entry.js",
114
116
  "./dist/mds-progress/p-1d5b5b51.system.js",
115
117
  "./dist/mds-progress/p-50ea2036.system.js",
116
118
  "./dist/mds-progress/p-56ba5cbf.system.js",
117
- "./dist/mds-progress/p-7a09a95a.entry.js",
119
+ "./dist/mds-progress/p-73f6f6b3.entry.js",
118
120
  "./dist/mds-progress/p-8c9db3a8.system.js",
119
121
  "./dist/mds-progress/p-e1255160.js",
120
122
  "./dist/mds-progress/p-e65c1ecc.js",
121
- "./dist/mds-progress/p-eaa61e27.system.entry.js",
122
123
  "./www/build/index.esm.js",
123
124
  "./www/build/mds-progress.esm.js",
124
125
  "./www/build/mds-progress.js",
126
+ "./www/build/p-1a4bce59.system.entry.js",
125
127
  "./www/build/p-1d5b5b51.system.js",
126
128
  "./www/build/p-50ea2036.system.js",
127
129
  "./www/build/p-56ba5cbf.system.js",
128
- "./www/build/p-7a09a95a.entry.js",
130
+ "./www/build/p-73f6f6b3.entry.js",
129
131
  "./www/build/p-8c9db3a8.system.js",
130
132
  "./www/build/p-e1255160.js",
131
- "./www/build/p-e65c1ecc.js",
132
- "./www/build/p-eaa61e27.system.entry.js"
133
+ "./www/build/p-e65c1ecc.js"
133
134
  ]
134
135
  },
135
136
  {
@@ -162,12 +163,12 @@
162
163
  "components": [
163
164
  "mds-progress"
164
165
  ],
165
- "bundleId": "p-7a09a95a",
166
- "fileName": "p-7a09a95a.entry.js",
166
+ "bundleId": "p-73f6f6b3",
167
+ "fileName": "p-73f6f6b3.entry.js",
167
168
  "imports": [
168
169
  "p-e65c1ecc.js"
169
170
  ],
170
- "originalByteSize": 13070
171
+ "originalByteSize": 13257
171
172
  }
172
173
  ],
173
174
  "esm": [
@@ -181,7 +182,7 @@
181
182
  "imports": [
182
183
  "index-bdcbc2fe.js"
183
184
  ],
184
- "originalByteSize": 13074
185
+ "originalByteSize": 13261
185
186
  }
186
187
  ],
187
188
  "es5": [
@@ -195,7 +196,7 @@
195
196
  "imports": [
196
197
  "index-bdcbc2fe.js"
197
198
  ],
198
- "originalByteSize": 13074
199
+ "originalByteSize": 13261
199
200
  }
200
201
  ],
201
202
  "system": [
@@ -204,12 +205,12 @@
204
205
  "components": [
205
206
  "mds-progress"
206
207
  ],
207
- "bundleId": "p-eaa61e27.system",
208
- "fileName": "p-eaa61e27.system.entry.js",
208
+ "bundleId": "p-1a4bce59.system",
209
+ "fileName": "p-1a4bce59.system.entry.js",
209
210
  "imports": [
210
211
  "p-8c9db3a8.system.js"
211
212
  ],
212
- "originalByteSize": 14207
213
+ "originalByteSize": 14394
213
214
  }
214
215
  ],
215
216
  "commonjs": [
@@ -223,7 +224,7 @@
223
224
  "imports": [
224
225
  "index-e0686900.js"
225
226
  ],
226
- "originalByteSize": 13139
227
+ "originalByteSize": 13320
227
228
  }
228
229
  ]
229
230
  },
@@ -240,7 +241,12 @@
240
241
  "directDependencies": [],
241
242
  "directDependents": [],
242
243
  "docs": {
243
- "tags": [],
244
+ "tags": [
245
+ {
246
+ "name": "part",
247
+ "text": "progress - Selects the `div` element that contains the progress bar"
248
+ }
249
+ ],
244
250
  "text": ""
245
251
  },
246
252
  "encapsulation": "shadow",
@@ -544,7 +550,12 @@
544
550
  }
545
551
  ],
546
552
  "docs": {
547
- "tags": [],
553
+ "tags": [
554
+ {
555
+ "name": "part",
556
+ "text": "progress - Selects the `div` element that contains the progress bar"
557
+ }
558
+ ],
548
559
  "text": ""
549
560
  },
550
561
  "jsFilePath": "/builds/maggiolispa/ricerca-sviluppo-new-media/magma/design-system/projects/stencil/.build/mds-progress/src/components/mds-progress/mds-progress.js",
@@ -603,12 +614,15 @@
603
614
  "aria-valuenow",
604
615
  "role",
605
616
  "class",
617
+ "part",
606
618
  "style"
607
619
  ],
608
620
  "htmlTagNames": [
609
621
  "div"
610
622
  ],
611
- "htmlParts": [],
623
+ "htmlParts": [
624
+ "progress"
625
+ ],
612
626
  "isUpdateable": true,
613
627
  "potentialCmpRefs": [],
614
628
  "dependents": [],
@@ -638,6 +652,7 @@
638
652
  "./src/common/icon.ts": [],
639
653
  "./src/common/keyboard-manager.ts": [],
640
654
  "./src/common/locale.ts": [],
655
+ "./src/common/number.ts": [],
641
656
  "./src/common/slot.ts": [],
642
657
  "./src/common/string.ts": [],
643
658
  "./src/common/unit.ts": [],
@@ -670,8 +685,7 @@
670
685
  "./src/dictionary/file-extensions.ts": [],
671
686
  "./src/dictionary/floating-ui.ts": [],
672
687
  "./src/dictionary/icon.ts": [
673
- "./src/fixtures/icons.json",
674
- "./src/fixtures/iconsauce.json"
688
+ "./src/fixtures/icons.json"
675
689
  ],
676
690
  "./src/dictionary/input.ts": [],
677
691
  "./src/dictionary/keyboard.ts": [],
@@ -0,0 +1,2 @@
1
+ declare const randomNumber: (min: number, max: number, integer?: boolean) => number;
2
+ export { randomNumber, };
@@ -1,4 +1,5 @@
1
1
  declare const hasSlottedElements: (el: HTMLElement, name?: string) => boolean;
2
2
  declare const hasSlottedNodes: (el: HTMLElement, name?: string) => boolean;
3
3
  declare const hasSlotted: (el: HTMLElement, name?: string) => boolean;
4
- export { hasSlottedElements, hasSlottedNodes, hasSlotted, };
4
+ declare const hasSlottedContent: (el: HTMLElement, name?: string) => boolean;
5
+ export { hasSlottedElements, hasSlottedNodes, hasSlottedContent, hasSlotted, };
@@ -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
- export { cssDurationToMilliseconds, cssSizeToNumber, };
4
+ declare const cssRotationToNumber: (size: string, defaultValue?: number) => number;
5
+ export { cssDurationToMilliseconds, cssDurationToSeconds, cssRotationToNumber, cssSizeToNumber, };
@@ -1,5 +1,8 @@
1
1
  import { DirectionType } from './meta/types';
2
2
  import { ThemeVariantType } from "../../type/variant";
3
+ /**
4
+ * @part progress - Selects the `div` element that contains the progress bar
5
+ */
3
6
  export declare class MdsProgress {
4
7
  private element;
5
8
  currentStep: string;
@@ -39,4 +39,9 @@ declare const _default: {
39
39
  };
40
40
  };
41
41
  export default _default;
42
- export declare const Default: any;
42
+ export declare const Default: {
43
+ render: (args: any) => any;
44
+ args: {
45
+ progress: number;
46
+ };
47
+ };
@@ -1,7 +1,10 @@
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[];
7
+ declare const tabSizeDictionary: string[];
5
8
  declare const buttonIconPositionDictionary: string[];
6
9
  declare const buttonTypeDictionary: string[];
7
- export { buttonIconPositionDictionary, buttonSizeDictionary, buttonTargetDictionary, buttonToneVariantDictionary, buttonTypeDictionary, buttonVariantDictionary, };
10
+ export { buttonDropdownVariantDictionary, buttonIconPositionDictionary, buttonSizeDictionary, buttonTargetDictionary, buttonToneMinimalVariantDictionary, buttonToneVariantDictionary, buttonTypeDictionary, buttonVariantDictionary, tabSizeDictionary, };
@@ -1,5 +1,7 @@
1
1
  export type ButtonType = 'a' | 'button' | 'reset' | 'submit';
2
2
  export type ButtonTargetType = 'self' | 'blank';
3
3
  export type ButtonSizeType = 'sm' | 'md' | 'lg' | 'xl';
4
+ export type TabSizeType = 'sm' | 'md';
4
5
  export type ButtonIconPositionType = 'left' | 'right';
5
6
  export type ButtonVariantType = 'ai' | 'apple' | 'dark' | 'error' | 'google' | 'info' | 'light' | 'primary' | 'secondary' | 'success' | 'warning';
7
+ export type ButtonDropdownVariantType = 'ai' | 'dark' | 'error' | 'info' | 'light' | 'primary' | 'secondary' | 'success' | 'warning';
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2025-06-03T08:10:23",
2
+ "timestamp": "2026-02-13T10:05:07",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.27.2",
@@ -12,7 +12,12 @@
12
12
  "tag": "mds-progress",
13
13
  "readme": "# mds-progress\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
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
- "docsTags": [],
15
+ "docsTags": [
16
+ {
17
+ "name": "part",
18
+ "text": "progress - Selects the `div` element that contains the progress bar"
19
+ }
20
+ ],
16
21
  "usage": {},
17
22
  "props": [
18
23
  {
@@ -192,7 +197,12 @@
192
197
  }
193
198
  ],
194
199
  "slots": [],
195
- "parts": [],
200
+ "parts": [
201
+ {
202
+ "name": "progress",
203
+ "docs": "Selects the `div` element that contains the progress bar"
204
+ }
205
+ ],
196
206
  "dependents": [
197
207
  "mds-accordion-timer-item",
198
208
  "mds-benchmark-bar",
@@ -352,6 +362,11 @@
352
362
  "docstring": "",
353
363
  "path": "src/type/text.ts"
354
364
  },
365
+ "src/type/button.ts::ButtonDropdownVariantType": {
366
+ "declaration": "export type ButtonDropdownVariantType =\n | 'ai'\n | 'dark'\n | 'error'\n | 'info'\n | 'light'\n | 'primary'\n | 'secondary'\n | 'success'\n | 'warning'",
367
+ "docstring": "",
368
+ "path": "src/type/button.ts"
369
+ },
355
370
  "src/components/mds-calendar-cell/meta/types.ts::CalendarCellType": {
356
371
  "declaration": "export type CalendarCellType =\n | 'other'\n | 'current'\n | 'weekend'",
357
372
  "docstring": "",
@@ -373,7 +388,7 @@
373
388
  "path": "src/type/variant.ts"
374
389
  },
375
390
  "src/components/mds-chip/meta/interface.ts::MdsChipEvent": {
376
- "declaration": "interface MdsChipEvent {\n event: Event\n element: HTMLMdsChipElement\n}",
391
+ "declaration": "interface MdsChipEvent {\n event: Event\n selected?: boolean\n element: HTMLMdsChipElement\n}",
377
392
  "docstring": "",
378
393
  "path": "src/components/mds-chip/meta/interface.ts"
379
394
  },
@@ -582,6 +597,11 @@
582
597
  "docstring": "",
583
598
  "path": "src/type/typography.ts"
584
599
  },
600
+ "src/components/mds-mention/meta/type.ts::MentionSize": {
601
+ "declaration": "export type MentionSize =\n | 'sm'\n | 'md'\n | 'lg'",
602
+ "docstring": "",
603
+ "path": "src/components/mds-mention/meta/type.ts"
604
+ },
585
605
  "src/components/mds-modal/meta/types.ts::ModalPositionType": {
586
606
  "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'",
587
607
  "docstring": "",
@@ -622,6 +642,11 @@
622
642
  "docstring": "",
623
643
  "path": "src/components/mds-policy-ai/meta/types.ts"
624
644
  },
645
+ "src/type/button.ts::TabSizeType": {
646
+ "declaration": "export type TabSizeType =\n | 'sm'\n | 'md'",
647
+ "docstring": "",
648
+ "path": "src/type/button.ts"
649
+ },
625
650
  "src/components/mds-pref-animation/meta/types.ts::AnimationModeType": {
626
651
  "declaration": "export type AnimationModeType =\n | 'reduce'\n | 'no-preference'\n | 'system'",
627
652
  "docstring": "",
@@ -702,6 +727,16 @@
702
727
  "docstring": "",
703
728
  "path": "src/components/mds-radial-menu/meta/types.ts"
704
729
  },
730
+ "src/components.d.ts::ModalOverflowType": {
731
+ "declaration": "any",
732
+ "docstring": "",
733
+ "path": "src/components.d.ts"
734
+ },
735
+ "src/components/mds-status-bar/meta/types.ts::StatusBarPositionType": {
736
+ "declaration": "export type StatusBarPositionType =\n | 'bottom'\n | 'bottom-left'\n | 'bottom-right'",
737
+ "docstring": "",
738
+ "path": "src/components/mds-status-bar/meta/types.ts"
739
+ },
705
740
  "src/components/mds-stepper-bar/meta/event-detail.ts::MdsStepperBarEventDetail": {
706
741
  "declaration": "export interface MdsStepperBarEventDetail {\n step: number\n value: string\n}",
707
742
  "docstring": "",
@@ -712,6 +747,11 @@
712
747
  "docstring": "",
713
748
  "path": "src/components/mds-stepper-bar-item/meta/event-detail.ts"
714
749
  },
750
+ "src/components/mds-tab/meta/type.ts::DirectionType": {
751
+ "declaration": "export type DirectionType =\n | 'horizontal'\n | 'vertical'",
752
+ "docstring": "",
753
+ "path": "src/components/mds-tab/meta/type.ts"
754
+ },
715
755
  "src/type/animation.ts::HorizontalActionsAnimationType": {
716
756
  "declaration": "export type HorizontalActionsAnimationType =\n | 'fade'\n | 'slide'",
717
757
  "docstring": "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maggioli-design-system/mds-progress",
3
- "version": "3.2.3",
3
+ "version": "3.3.0",
4
4
  "description": "mds-progress 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",
package/readme.md CHANGED
@@ -17,6 +17,13 @@ This is a web-component from Maggioli Design System [Magma](https://magma.maggio
17
17
  | `variant` | `variant` | Sets the theme variant colors | `"ai" \| "dark" \| "error" \| "info" \| "light" \| "primary" \| "success" \| "warning"` | `'primary'` |
18
18
 
19
19
 
20
+ ## Shadow Parts
21
+
22
+ | Part | Description |
23
+ | ------------ | -------------------------------------------------------- |
24
+ | `"progress"` | Selects the `div` element that contains the progress bar |
25
+
26
+
20
27
  ## CSS Custom Properties
21
28
 
22
29
  | Name | Description |
@@ -41,15 +41,17 @@ export class Locale {
41
41
 
42
42
  update = (doc?: Document | ShadowRoot): void => {
43
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()
44
+ if (context) {
45
+ context.querySelectorAll('*').forEach(el => {
46
+ if (el.tagName.toLowerCase().startsWith('mds-')) {
47
+ // eslint-disable-next-line no-restricted-syntax
48
+ if (el && 'updateLang' in el) {
49
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
50
+ (el as any).updateLang()
51
+ }
50
52
  }
51
- }
52
- })
53
+ })
54
+ }
53
55
  }
54
56
 
55
57
  private pluralize = (tag: string | string[], context: Record<string, string | number | boolean>): string => {
@@ -0,0 +1,8 @@
1
+ const randomNumber = (min: number, max: number, integer: boolean = false): number => {
2
+ const num = Math.random() * (max - min) + min
3
+ return integer ? Math.floor(num) : num
4
+ }
5
+
6
+ export {
7
+ randomNumber,
8
+ }
@@ -28,8 +28,20 @@ const hasSlotted = (el: HTMLElement, name?: string): boolean => {
28
28
  return false
29
29
  }
30
30
 
31
+ const hasSlottedContent = (el: HTMLElement, name?: string): boolean => {
32
+ const query = name ? `slot[name="${name}"]` : 'slot:not([name])'
33
+ const slot: HTMLSlotElement = el.shadowRoot?.querySelector(query) as HTMLSlotElement
34
+ if (!slot) return false
35
+
36
+ const assignedNodes = slot.assignedNodes({ flatten: true })
37
+ return assignedNodes.some(node =>
38
+ node.nodeType === Node.TEXT_NODE && node.textContent?.trim() !== '',
39
+ )
40
+ }
41
+
31
42
  export {
32
43
  hasSlottedElements,
33
44
  hasSlottedNodes,
45
+ hasSlottedContent,
34
46
  hasSlotted,
35
47
  }
@@ -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
  }
@@ -1,9 +1,13 @@
1
- :host-context(.pref-theme-dark),
2
1
  :host-context(.pref-theme-dark):host([variant="primary"]) {
3
2
  --mds-progress-color: theme('colors.variant-primary-05');
4
3
  --mds-progress-background: theme('colors.tone-neutral-07');
5
4
  }
6
5
 
6
+ :host-context(.pref-theme-dark):host([variant="dark"]) {
7
+ --mds-progress-color: theme('colors.tone-neutral-04');
8
+ --mds-progress-background: theme('colors.tone-neutral-08');
9
+ }
10
+
7
11
  :host-context(.pref-theme-dark):host([variant="error"]) {
8
12
  --mds-progress-color: theme('colors.status-error-04');
9
13
  --mds-progress-background: theme('colors.status-error-07');
@@ -26,12 +30,16 @@
26
30
 
27
31
 
28
32
  @media (prefers-color-scheme: dark) {
29
- :host-context(.pref-theme-system),
30
33
  :host-context(.pref-theme-system):host([variant="primary"]) {
31
34
  --mds-progress-color: theme('colors.variant-primary-05');
32
35
  --mds-progress-background: theme('colors.tone-neutral-07');
33
36
  }
34
37
 
38
+ :host-context(.pref-theme-system):host([variant="dark"]) {
39
+ --mds-progress-color: theme('colors.tone-neutral-04');
40
+ --mds-progress-background: theme('colors.tone-neutral-08');
41
+ }
42
+
35
43
  :host-context(.pref-theme-system):host([variant="error"]) {
36
44
  --mds-progress-color: theme('colors.status-error-04');
37
45
  --mds-progress-background: theme('colors.status-error-07');
@@ -3,6 +3,10 @@ import { DirectionType } from './meta/types'
3
3
  import { ThemeVariantType } from '@type/variant'
4
4
  import { removeAttributesIf, ifAttribute } from '@common/aria'
5
5
 
6
+ /**
7
+ * @part progress - Selects the `div` element that contains the progress bar
8
+ */
9
+
6
10
  @Component({
7
11
  tag: 'mds-progress',
8
12
  styleUrl: 'mds-progress.css',
@@ -64,8 +68,7 @@ export class MdsProgress {
64
68
  render () {
65
69
  return (
66
70
  <Host aria-valuemax="100" aria-valuemin="0" aria-valuenow={ !ifAttribute(this.element, 'aria-hidden') && Math.round(this.progress * 100) } role="progressbar">
67
- <div class="contrast-area"></div>
68
- <div class="progress" style={
71
+ <div class="progress" part="progress" style={
69
72
  this.direction === 'horizontal'
70
73
  ? { flexGrow: `${this.progress}` }
71
74
  : { flexGrow: `${this.progress}`, width: '100%' }
@@ -15,6 +15,13 @@
15
15
  | `variant` | `variant` | Sets the theme variant colors | `"ai" \| "dark" \| "error" \| "info" \| "light" \| "primary" \| "success" \| "warning"` | `'primary'` |
16
16
 
17
17
 
18
+ ## Shadow Parts
19
+
20
+ | Part | Description |
21
+ | ------------ | -------------------------------------------------------- |
22
+ | `"progress"` | Selects the `div` element that contains the progress bar |
23
+
24
+
18
25
  ## CSS Custom Properties
19
26
 
20
27
  | Name | Description |
@@ -8,13 +8,15 @@ export default {
8
8
  direction: {
9
9
  type: { name: 'string', required: false },
10
10
  control: { type: 'select' },
11
- description: 'Specifies the direction of the progress bar, if horizonatl or vertical',
11
+ description:
12
+ 'Specifies the direction of the progress bar, if horizonatl or vertical',
12
13
  options: directionDictionary,
13
14
  },
14
15
  progress: {
15
16
  control: { type: 'range', step: 0.01, min: 0, max: 1 },
16
17
  type: { name: 'number', required: false },
17
- description: 'A value between 0 and 1 that rapresents the status progress',
18
+ description:
19
+ 'A value between 0 and 1 that rapresents the status progress',
18
20
  },
19
21
  variant: {
20
22
  type: { name: 'string', required: false },
@@ -25,10 +27,14 @@ export default {
25
27
  },
26
28
  }
27
29
 
28
- const Template = args =>
29
- <mds-progress aria-label="Progress bar title" {...args}/>
30
+ const Template = args => (
31
+ <mds-progress aria-label="Progress bar title" {...args} />
32
+ )
30
33
 
31
- export const Default = Template.bind({})
32
- Default.args = {
33
- progress: 0.35,
34
+ export const Default = {
35
+ render: Template,
36
+
37
+ args: {
38
+ progress: 0.35,
39
+ },
34
40
  }
@@ -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',
@@ -31,6 +48,11 @@ const buttonSizeDictionary = [
31
48
  'xl',
32
49
  ]
33
50
 
51
+ const tabSizeDictionary = [
52
+ 'sm',
53
+ 'md',
54
+ ]
55
+
34
56
  const buttonIconPositionDictionary = [
35
57
  'left',
36
58
  'right',
@@ -43,10 +65,13 @@ const buttonTypeDictionary = [
43
65
  ]
44
66
 
45
67
  export {
68
+ buttonDropdownVariantDictionary,
46
69
  buttonIconPositionDictionary,
47
70
  buttonSizeDictionary,
48
71
  buttonTargetDictionary,
72
+ buttonToneMinimalVariantDictionary,
49
73
  buttonToneVariantDictionary,
50
74
  buttonTypeDictionary,
51
75
  buttonVariantDictionary,
76
+ tabSizeDictionary,
52
77
  }
@@ -1,5 +1,6 @@
1
1
  import jsonIconsDictionary from '../fixtures/icons.json'
2
- import jsonMggIconsDictionary from '../fixtures/iconsauce.json'
2
+ import jsonMggIconsDictionary from '@maggioli-design-system/svg-icons/dist/iconsauce.json'
3
+
3
4
  const iconsDictionary = jsonIconsDictionary
4
5
  const mggIconsDictionary = jsonMggIconsDictionary
5
6
  const svgIconsDictionary = [