@maggioli-design-system/mds-input-select 3.4.5 → 3.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 (71) hide show
  1. package/dist/cjs/{index-648a2952.js → index-18f29026.js} +13 -2
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/mds-input-select.cjs.entry.js +42 -20
  4. package/dist/cjs/mds-input-select.cjs.js +2 -2
  5. package/dist/collection/common/locale.js +10 -8
  6. package/dist/collection/common/slot.js +10 -1
  7. package/dist/collection/components/mds-input-select/mds-input-select.css +3 -3
  8. package/dist/collection/components/mds-input-select/mds-input-select.js +60 -17
  9. package/dist/collection/components/mds-input-select/test/mds-input-select.stories.js +35 -20
  10. package/dist/collection/dictionary/button.js +5 -1
  11. package/dist/collection/dictionary/icon.js +1 -1
  12. package/dist/components/mds-input-select.js +44 -21
  13. package/dist/documentation.json +33 -1
  14. package/dist/esm/{index-e1f2fe2a.js → index-60887c04.js} +13 -2
  15. package/dist/esm/loader.js +3 -3
  16. package/dist/esm/mds-input-select.entry.js +42 -20
  17. package/dist/esm/mds-input-select.js +3 -3
  18. package/dist/esm-es5/index-60887c04.js +1 -0
  19. package/dist/esm-es5/loader.js +1 -1
  20. package/dist/esm-es5/mds-input-select.entry.js +1 -1
  21. package/dist/esm-es5/mds-input-select.js +1 -1
  22. package/dist/mds-input-select/mds-input-select.esm.js +1 -1
  23. package/dist/mds-input-select/mds-input-select.js +1 -1
  24. package/dist/mds-input-select/p-0760aca1.system.entry.js +1 -0
  25. package/dist/mds-input-select/p-39d143a4.system.js +1 -0
  26. package/dist/mds-input-select/p-41875927.js +2 -0
  27. package/dist/mds-input-select/p-9758de3c.entry.js +1 -0
  28. package/dist/mds-input-select/p-db5fddbf.system.js +2 -0
  29. package/dist/stats.json +81 -41
  30. package/dist/types/common/slot.d.ts +2 -1
  31. package/dist/types/components/mds-input-select/mds-input-select.d.ts +14 -1
  32. package/dist/types/components/mds-input-select/test/mds-input-select.stories.d.ts +34 -6
  33. package/dist/types/components.d.ts +8 -0
  34. package/dist/types/dictionary/button.d.ts +2 -1
  35. package/dist/types/dictionary/icon.d.ts +1 -1
  36. package/dist/types/type/button.d.ts +1 -0
  37. package/documentation.json +49 -2
  38. package/package.json +1 -1
  39. package/readme.md +13 -12
  40. package/src/common/locale.ts +10 -8
  41. package/src/common/slot.ts +12 -0
  42. package/src/components/mds-input-select/mds-input-select.css +3 -3
  43. package/src/components/mds-input-select/mds-input-select.tsx +45 -18
  44. package/src/components/mds-input-select/readme.md +13 -12
  45. package/src/components/mds-input-select/test/mds-input-select.mdx +7 -0
  46. package/src/components/mds-input-select/test/mds-input-select.stories.tsx +63 -31
  47. package/src/components.d.ts +8 -0
  48. package/src/dictionary/button.ts +6 -0
  49. package/src/dictionary/icon.ts +2 -1
  50. package/src/tailwind/components.css +1 -1
  51. package/src/type/button.ts +4 -0
  52. package/www/build/mds-input-select.esm.js +1 -1
  53. package/www/build/mds-input-select.js +1 -1
  54. package/www/build/p-0760aca1.system.entry.js +1 -0
  55. package/www/build/p-39d143a4.system.js +1 -0
  56. package/www/build/p-41875927.js +2 -0
  57. package/www/build/p-9758de3c.entry.js +1 -0
  58. package/www/build/p-db5fddbf.system.js +2 -0
  59. package/dist/esm-es5/index-e1f2fe2a.js +0 -1
  60. package/dist/mds-input-select/p-5f2a815f.system.js +0 -1
  61. package/dist/mds-input-select/p-6c484f11.entry.js +0 -1
  62. package/dist/mds-input-select/p-bf3133aa.js +0 -2
  63. package/dist/mds-input-select/p-c5f708cb.system.entry.js +0 -1
  64. package/dist/mds-input-select/p-cbce7086.system.js +0 -2
  65. package/src/fixtures/icons.json +0 -470
  66. package/src/fixtures/iconsauce.json +0 -310
  67. package/www/build/p-5f2a815f.system.js +0 -1
  68. package/www/build/p-6c484f11.entry.js +0 -1
  69. package/www/build/p-bf3133aa.js +0 -2
  70. package/www/build/p-c5f708cb.system.entry.js +0 -1
  71. package/www/build/p-cbce7086.system.js +0 -2
package/dist/stats.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
- "timestamp": "2025-06-23T14:13:40",
2
+ "timestamp": "2025-12-03T10:39: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": "MdsInputSelect",
@@ -88,19 +88,19 @@
88
88
  "files": 42,
89
89
  "generatedFiles": [
90
90
  "./dist/cjs/app-globals-3a1e7e63.js",
91
- "./dist/cjs/index-648a2952.js",
91
+ "./dist/cjs/index-18f29026.js",
92
92
  "./dist/cjs/index.cjs.js",
93
93
  "./dist/cjs/loader.cjs.js",
94
94
  "./dist/cjs/mds-input-select.cjs.entry.js",
95
95
  "./dist/cjs/mds-input-select.cjs.js",
96
96
  "./dist/esm-es5/app-globals-0f993ce5.js",
97
- "./dist/esm-es5/index-e1f2fe2a.js",
97
+ "./dist/esm-es5/index-60887c04.js",
98
98
  "./dist/esm-es5/index.js",
99
99
  "./dist/esm-es5/loader.js",
100
100
  "./dist/esm-es5/mds-input-select.entry.js",
101
101
  "./dist/esm-es5/mds-input-select.js",
102
102
  "./dist/esm/app-globals-0f993ce5.js",
103
- "./dist/esm/index-e1f2fe2a.js",
103
+ "./dist/esm/index-60887c04.js",
104
104
  "./dist/esm/index.js",
105
105
  "./dist/esm/loader.js",
106
106
  "./dist/esm/mds-input-select.entry.js",
@@ -110,24 +110,24 @@
110
110
  "./dist/mds-input-select/index.esm.js",
111
111
  "./dist/mds-input-select/mds-input-select.esm.js",
112
112
  "./dist/mds-input-select/mds-input-select.js",
113
+ "./dist/mds-input-select/p-0760aca1.system.entry.js",
114
+ "./dist/mds-input-select/p-39d143a4.system.js",
115
+ "./dist/mds-input-select/p-41875927.js",
113
116
  "./dist/mds-input-select/p-50ea2036.system.js",
114
117
  "./dist/mds-input-select/p-56ba5cbf.system.js",
115
- "./dist/mds-input-select/p-5f2a815f.system.js",
116
- "./dist/mds-input-select/p-6c484f11.entry.js",
117
- "./dist/mds-input-select/p-bf3133aa.js",
118
- "./dist/mds-input-select/p-c5f708cb.system.entry.js",
119
- "./dist/mds-input-select/p-cbce7086.system.js",
118
+ "./dist/mds-input-select/p-9758de3c.entry.js",
119
+ "./dist/mds-input-select/p-db5fddbf.system.js",
120
120
  "./dist/mds-input-select/p-e1255160.js",
121
121
  "./www/build/index.esm.js",
122
122
  "./www/build/mds-input-select.esm.js",
123
123
  "./www/build/mds-input-select.js",
124
+ "./www/build/p-0760aca1.system.entry.js",
125
+ "./www/build/p-39d143a4.system.js",
126
+ "./www/build/p-41875927.js",
124
127
  "./www/build/p-50ea2036.system.js",
125
128
  "./www/build/p-56ba5cbf.system.js",
126
- "./www/build/p-5f2a815f.system.js",
127
- "./www/build/p-6c484f11.entry.js",
128
- "./www/build/p-bf3133aa.js",
129
- "./www/build/p-c5f708cb.system.entry.js",
130
- "./www/build/p-cbce7086.system.js",
129
+ "./www/build/p-9758de3c.entry.js",
130
+ "./www/build/p-db5fddbf.system.js",
131
131
  "./www/build/p-e1255160.js"
132
132
  ]
133
133
  },
@@ -161,12 +161,12 @@
161
161
  "components": [
162
162
  "mds-input-select"
163
163
  ],
164
- "bundleId": "p-6c484f11",
165
- "fileName": "p-6c484f11.entry.js",
164
+ "bundleId": "p-9758de3c",
165
+ "fileName": "p-9758de3c.entry.js",
166
166
  "imports": [
167
- "p-bf3133aa.js"
167
+ "p-41875927.js"
168
168
  ],
169
- "originalByteSize": 24154
169
+ "originalByteSize": 24811
170
170
  }
171
171
  ],
172
172
  "esm": [
@@ -178,9 +178,9 @@
178
178
  "bundleId": "mds-input-select",
179
179
  "fileName": "mds-input-select.entry.js",
180
180
  "imports": [
181
- "index-e1f2fe2a.js"
181
+ "index-60887c04.js"
182
182
  ],
183
- "originalByteSize": 24158
183
+ "originalByteSize": 24815
184
184
  }
185
185
  ],
186
186
  "es5": [
@@ -192,9 +192,9 @@
192
192
  "bundleId": "mds-input-select",
193
193
  "fileName": "mds-input-select.entry.js",
194
194
  "imports": [
195
- "index-e1f2fe2a.js"
195
+ "index-60887c04.js"
196
196
  ],
197
- "originalByteSize": 24158
197
+ "originalByteSize": 24815
198
198
  }
199
199
  ],
200
200
  "system": [
@@ -203,12 +203,12 @@
203
203
  "components": [
204
204
  "mds-input-select"
205
205
  ],
206
- "bundleId": "p-c5f708cb.system",
207
- "fileName": "p-c5f708cb.system.entry.js",
206
+ "bundleId": "p-0760aca1.system",
207
+ "fileName": "p-0760aca1.system.entry.js",
208
208
  "imports": [
209
- "p-cbce7086.system.js"
209
+ "p-db5fddbf.system.js"
210
210
  ],
211
- "originalByteSize": 25211
211
+ "originalByteSize": 26006
212
212
  }
213
213
  ],
214
214
  "commonjs": [
@@ -220,9 +220,9 @@
220
220
  "bundleId": "mds-input-select.cjs",
221
221
  "fileName": "mds-input-select.cjs.entry.js",
222
222
  "imports": [
223
- "index-648a2952.js"
223
+ "index-18f29026.js"
224
224
  ],
225
- "originalByteSize": 24253
225
+ "originalByteSize": 24910
226
226
  }
227
227
  ]
228
228
  },
@@ -476,6 +476,27 @@
476
476
  "getter": false,
477
477
  "setter": false
478
478
  },
479
+ {
480
+ "name": "defaultValue",
481
+ "type": "any",
482
+ "attribute": "default-value",
483
+ "reflect": true,
484
+ "mutable": false,
485
+ "required": false,
486
+ "optional": true,
487
+ "complexType": {
488
+ "original": "string | number | null",
489
+ "resolved": "null | number | string | undefined",
490
+ "references": {}
491
+ },
492
+ "docs": {
493
+ "tags": [],
494
+ "text": "Specifies the default value of the component"
495
+ },
496
+ "internal": false,
497
+ "getter": false,
498
+ "setter": false
499
+ },
479
500
  {
480
501
  "name": "variant",
481
502
  "type": "string",
@@ -506,9 +527,6 @@
506
527
  ],
507
528
  "shadowDelegatesFocus": false,
508
529
  "states": [
509
- {
510
- "name": "selected"
511
- },
512
530
  {
513
531
  "name": "hasFocus"
514
532
  }
@@ -723,6 +741,27 @@
723
741
  "getter": false,
724
742
  "setter": false
725
743
  },
744
+ {
745
+ "name": "defaultValue",
746
+ "type": "any",
747
+ "attribute": "default-value",
748
+ "reflect": true,
749
+ "mutable": false,
750
+ "required": false,
751
+ "optional": true,
752
+ "complexType": {
753
+ "original": "string | number | null",
754
+ "resolved": "null | number | string | undefined",
755
+ "references": {}
756
+ },
757
+ "docs": {
758
+ "tags": [],
759
+ "text": "Specifies the default value of the component"
760
+ },
761
+ "internal": false,
762
+ "getter": false,
763
+ "setter": false
764
+ },
726
765
  {
727
766
  "name": "variant",
728
767
  "type": "string",
@@ -753,9 +792,6 @@
753
792
  ],
754
793
  "virtualProperties": [],
755
794
  "states": [
756
- {
757
- "name": "selected"
758
- },
759
795
  {
760
796
  "name": "hasFocus"
761
797
  }
@@ -795,6 +831,10 @@
795
831
  {
796
832
  "propName": "disabled",
797
833
  "methodName": "disabledChanged"
834
+ },
835
+ {
836
+ "propName": "placeholder",
837
+ "methodName": "placeholderChanged"
798
838
  }
799
839
  ],
800
840
  "styles": [
@@ -828,7 +868,7 @@
828
868
  "sourceFilePath": "/builds/maggiolispa/ricerca-sviluppo-new-media/magma/design-system/projects/stencil/.build/mds-input-select/src/components/mds-input-select/mds-input-select.tsx",
829
869
  "sourceMapPath": null,
830
870
  "hasAttributeChangedCallbackFn": false,
831
- "hasComponentWillLoadFn": false,
871
+ "hasComponentWillLoadFn": true,
832
872
  "hasComponentDidLoadFn": true,
833
873
  "hasComponentShouldUpdateFn": false,
834
874
  "hasComponentWillUpdateFn": false,
@@ -867,7 +907,7 @@
867
907
  "hasVdomKey": true,
868
908
  "hasVdomListener": true,
869
909
  "hasVdomPropOrAttr": true,
870
- "hasVdomRef": false,
910
+ "hasVdomRef": true,
871
911
  "hasVdomRender": true,
872
912
  "hasVdomStyle": false,
873
913
  "hasVdomText": true,
@@ -885,6 +925,7 @@
885
925
  "multiple",
886
926
  "size",
887
927
  "part",
928
+ "ref",
888
929
  "value",
889
930
  "selected",
890
931
  "innerHTML",
@@ -895,8 +936,8 @@
895
936
  "variant"
896
937
  ],
897
938
  "htmlTagNames": [
898
- "select",
899
939
  "option",
940
+ "select",
900
941
  "div",
901
942
  "i",
902
943
  "slot",
@@ -922,7 +963,7 @@
922
963
  ],
923
964
  "componentGraph": {
924
965
  "sc-mds-input-select": [
925
- "p-bf3133aa.js"
966
+ "p-41875927.js"
926
967
  ]
927
968
  },
928
969
  "sourceGraph": {
@@ -967,8 +1008,7 @@
967
1008
  "./src/dictionary/file-extensions.ts": [],
968
1009
  "./src/dictionary/floating-ui.ts": [],
969
1010
  "./src/dictionary/icon.ts": [
970
- "./src/fixtures/icons.json",
971
- "./src/fixtures/iconsauce.json"
1011
+ "./src/fixtures/icons.json"
972
1012
  ],
973
1013
  "./src/dictionary/input.ts": [],
974
1014
  "./src/dictionary/keyboard.ts": [],
@@ -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, };
@@ -5,8 +5,8 @@ import { ThemeStatusVariantType } from "../../type/variant";
5
5
  * @part select - The select HTML element
6
6
  */
7
7
  export declare class MdsInputSelect {
8
+ private selectEl;
8
9
  host: HTMLMdsInputSelectElement;
9
- selected: boolean;
10
10
  hasFocus: boolean;
11
11
  internals: ElementInternals;
12
12
  /**
@@ -45,6 +45,10 @@ export declare class MdsInputSelect {
45
45
  * Specifies the value of the component
46
46
  */
47
47
  value?: string | number | null;
48
+ /**
49
+ * Specifies the default value of the component
50
+ */
51
+ defaultValue?: string | number | null;
48
52
  /**
49
53
  * Sets the variant of the component
50
54
  */
@@ -58,7 +62,16 @@ export declare class MdsInputSelect {
58
62
  */
59
63
  protected valueChanged(): void;
60
64
  protected disabledChanged(newValue: boolean): void;
65
+ /**
66
+ * This is for the react component because placeholder is valued after didload
67
+ * and therefore the placeholder option is drawn as the last option.
68
+ * Here the option is brought back to the first position
69
+ * @param newValue placeholder new value
70
+ * @param oldValue placeholder old value
71
+ */
72
+ protected placeholderChanged(newValue: string | undefined, oldValue: string | undefined): void;
61
73
  formResetCallback(): void;
74
+ componentWillLoad(): void;
62
75
  componentDidLoad(): void;
63
76
  private onInput;
64
77
  private onBlur;
@@ -63,9 +63,37 @@ declare const _default: {
63
63
  };
64
64
  };
65
65
  export default _default;
66
- export declare const Default: any;
67
- export declare const Multiple: any;
68
- export declare const Required: any;
69
- export declare const Disabled: any;
70
- export declare const FormIntegrationWithPlaceholder: any;
71
- export declare const FormIntegration: any;
66
+ export declare const Default: {
67
+ render: (args: any) => any;
68
+ args: {
69
+ placeholder: string;
70
+ };
71
+ };
72
+ export declare const Multiple: {
73
+ render: (args: any) => any;
74
+ args: {
75
+ multiple: boolean;
76
+ };
77
+ };
78
+ export declare const Required: {
79
+ render: (args: any) => any;
80
+ args: {
81
+ required: boolean;
82
+ placeholder: string;
83
+ };
84
+ };
85
+ export declare const Disabled: {
86
+ render: (args: any) => any;
87
+ args: {
88
+ disabled: boolean;
89
+ };
90
+ };
91
+ export declare const FormIntegrationWithPlaceholder: {
92
+ render: (args: any) => any;
93
+ args: {
94
+ placeholder: string;
95
+ };
96
+ };
97
+ export declare const FormIntegration: {
98
+ render: (args: any) => any;
99
+ };
@@ -19,6 +19,10 @@ export namespace Components {
19
19
  * Specifies a short hint that describes the expected value of the element
20
20
  */
21
21
  "autocomplete"?: 'on';
22
+ /**
23
+ * Specifies the default value of the component
24
+ */
25
+ "defaultValue"?: string | number | null;
22
26
  /**
23
27
  * If true, the element is displayed as disabled
24
28
  */
@@ -89,6 +93,10 @@ declare namespace LocalJSX {
89
93
  * Specifies a short hint that describes the expected value of the element
90
94
  */
91
95
  "autocomplete"?: 'on';
96
+ /**
97
+ * Specifies the default value of the component
98
+ */
99
+ "defaultValue"?: string | number | null;
92
100
  /**
93
101
  * If true, the element is displayed as disabled
94
102
  */
@@ -4,6 +4,7 @@ declare const buttonToneVariantDictionary: string[];
4
4
  declare const buttonToneMinimalVariantDictionary: string[];
5
5
  declare const buttonTargetDictionary: string[];
6
6
  declare const buttonSizeDictionary: string[];
7
+ declare const tabSizeDictionary: string[];
7
8
  declare const buttonIconPositionDictionary: string[];
8
9
  declare const buttonTypeDictionary: string[];
9
- export { buttonDropdownVariantDictionary, buttonIconPositionDictionary, buttonSizeDictionary, buttonTargetDictionary, buttonToneMinimalVariantDictionary, buttonToneVariantDictionary, buttonTypeDictionary, buttonVariantDictionary, };
10
+ export { buttonDropdownVariantDictionary, buttonIconPositionDictionary, buttonSizeDictionary, buttonTargetDictionary, buttonToneMinimalVariantDictionary, buttonToneVariantDictionary, buttonTypeDictionary, buttonVariantDictionary, tabSizeDictionary, };
@@ -1,4 +1,4 @@
1
- declare const iconsDictionary: string[];
1
+ declare const iconsDictionary: any;
2
2
  declare const mggIconsDictionary: string[];
3
3
  declare const svgIconsDictionary: string[];
4
4
  export { iconsDictionary, mggIconsDictionary, svgIconsDictionary, };
@@ -1,6 +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';
6
7
  export type ButtonDropdownVariantType = 'ai' | 'dark' | 'error' | 'info' | 'light' | 'primary' | 'secondary' | 'success' | 'warning';
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2025-06-23T13:28:32",
2
+ "timestamp": "2025-12-03T09:57:43",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.27.2",
@@ -73,6 +73,38 @@
73
73
  "getter": false,
74
74
  "setter": false
75
75
  },
76
+ {
77
+ "name": "defaultValue",
78
+ "type": "null | number | string | undefined",
79
+ "complexType": {
80
+ "original": "string | number | null",
81
+ "resolved": "null | number | string | undefined",
82
+ "references": {}
83
+ },
84
+ "mutable": false,
85
+ "attr": "default-value",
86
+ "reflectToAttr": true,
87
+ "docs": "Specifies the default value of the component",
88
+ "docsTags": [],
89
+ "values": [
90
+ {
91
+ "type": "null"
92
+ },
93
+ {
94
+ "type": "number"
95
+ },
96
+ {
97
+ "type": "string"
98
+ },
99
+ {
100
+ "type": "undefined"
101
+ }
102
+ ],
103
+ "optional": true,
104
+ "required": false,
105
+ "getter": false,
106
+ "setter": false
107
+ },
76
108
  {
77
109
  "name": "disabled",
78
110
  "type": "boolean | undefined",
@@ -522,7 +554,7 @@
522
554
  "path": "src/type/variant.ts"
523
555
  },
524
556
  "src/components/mds-chip/meta/interface.ts::MdsChipEvent": {
525
- "declaration": "interface MdsChipEvent {\n event: Event\n element: HTMLMdsChipElement\n}",
557
+ "declaration": "interface MdsChipEvent {\n event: Event\n selected?: boolean\n element: HTMLMdsChipElement\n}",
526
558
  "docstring": "",
527
559
  "path": "src/components/mds-chip/meta/interface.ts"
528
560
  },
@@ -776,6 +808,11 @@
776
808
  "docstring": "",
777
809
  "path": "src/components/mds-policy-ai/meta/types.ts"
778
810
  },
811
+ "src/type/button.ts::TabSizeType": {
812
+ "declaration": "export type TabSizeType =\n | 'sm'\n | 'md'",
813
+ "docstring": "",
814
+ "path": "src/type/button.ts"
815
+ },
779
816
  "src/components/mds-pref-animation/meta/types.ts::AnimationModeType": {
780
817
  "declaration": "export type AnimationModeType =\n | 'reduce'\n | 'no-preference'\n | 'system'",
781
818
  "docstring": "",
@@ -856,6 +893,11 @@
856
893
  "docstring": "",
857
894
  "path": "src/components/mds-radial-menu/meta/types.ts"
858
895
  },
896
+ "src/components.d.ts::ModalOverflowType": {
897
+ "declaration": "any",
898
+ "docstring": "",
899
+ "path": "src/components.d.ts"
900
+ },
859
901
  "src/components/mds-stepper-bar/meta/event-detail.ts::MdsStepperBarEventDetail": {
860
902
  "declaration": "export interface MdsStepperBarEventDetail {\n step: number\n value: string\n}",
861
903
  "docstring": "",
@@ -866,6 +908,11 @@
866
908
  "docstring": "",
867
909
  "path": "src/components/mds-stepper-bar-item/meta/event-detail.ts"
868
910
  },
911
+ "src/components/mds-tab/meta/type.ts::DirectionType": {
912
+ "declaration": "export type DirectionType =\n | 'horizontal'\n | 'vertical'",
913
+ "docstring": "",
914
+ "path": "src/components/mds-tab/meta/type.ts"
915
+ },
869
916
  "src/type/animation.ts::HorizontalActionsAnimationType": {
870
917
  "declaration": "export type HorizontalActionsAnimationType =\n | 'fade'\n | 'slide'",
871
918
  "docstring": "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maggioli-design-system/mds-input-select",
3
- "version": "3.4.5",
3
+ "version": "3.5.0",
4
4
  "description": "mds-input-select 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
@@ -9,18 +9,19 @@ This is a web-component from Maggioli Design System [Magma](https://magma.maggio
9
9
 
10
10
  ## Properties
11
11
 
12
- | Property | Attribute | Description | Type | Default |
13
- | -------------- | -------------- | -------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | ----------- |
14
- | `autoFocus` | `auto-focus` | Specifies a short hint that describes the expected value of the element | `boolean \| undefined` | `undefined` |
15
- | `autocomplete` | `autocomplete` | Specifies a short hint that describes the expected value of the element | `"on" \| undefined` | `undefined` |
16
- | `disabled` | `disabled` | If true, the element is displayed as disabled | `boolean \| undefined` | `false` |
17
- | `multiple` | `multiple` | Specifies if the select should allow multiple options to be selected in the list | `boolean \| undefined` | `false` |
18
- | `name` | `name` | Is needed to reference the form data after the form is submitted | `string \| undefined` | `undefined` |
19
- | `placeholder` | `placeholder` | Specifies a short hint that describes the expected value of the element | `string \| undefined` | `undefined` |
20
- | `required` | `required` | Specifies that the element must be filled out before submitting the form | `boolean \| undefined` | `false` |
21
- | `size` | `size` | When `multiple` is set to `true`, represents the number or rows in the list that should be visible | `number \| undefined` | `0` |
22
- | `value` | `value` | Specifies the value of the component | `null \| number \| string \| undefined` | `''` |
23
- | `variant` | `variant` | Sets the variant of the component | `"error" \| "info" \| "success" \| "warning" \| undefined` | `undefined` |
12
+ | Property | Attribute | Description | Type | Default |
13
+ | -------------- | --------------- | -------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | ----------- |
14
+ | `autoFocus` | `auto-focus` | Specifies a short hint that describes the expected value of the element | `boolean \| undefined` | `undefined` |
15
+ | `autocomplete` | `autocomplete` | Specifies a short hint that describes the expected value of the element | `"on" \| undefined` | `undefined` |
16
+ | `defaultValue` | `default-value` | Specifies the default value of the component | `null \| number \| string \| undefined` | `undefined` |
17
+ | `disabled` | `disabled` | If true, the element is displayed as disabled | `boolean \| undefined` | `false` |
18
+ | `multiple` | `multiple` | Specifies if the select should allow multiple options to be selected in the list | `boolean \| undefined` | `false` |
19
+ | `name` | `name` | Is needed to reference the form data after the form is submitted | `string \| undefined` | `undefined` |
20
+ | `placeholder` | `placeholder` | Specifies a short hint that describes the expected value of the element | `string \| undefined` | `undefined` |
21
+ | `required` | `required` | Specifies that the element must be filled out before submitting the form | `boolean \| undefined` | `false` |
22
+ | `size` | `size` | When `multiple` is set to `true`, represents the number or rows in the list that should be visible | `number \| undefined` | `0` |
23
+ | `value` | `value` | Specifies the value of the component | `null \| number \| string \| undefined` | `''` |
24
+ | `variant` | `variant` | Sets the variant of the component | `"error" \| "info" \| "success" \| "warning" \| undefined` | `undefined` |
24
25
 
25
26
 
26
27
  ## Events
@@ -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 => {
@@ -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
  }
@@ -54,7 +54,7 @@
54
54
  border: 0;
55
55
  box-shadow: var(--mds-input-select-ring), var(--mds-input-select-shadow);
56
56
  box-sizing: border-box;
57
- color: theme('colors.tone-neutral-05');
57
+ color: theme('colors.tone-neutral-02');
58
58
  cursor: pointer;
59
59
  overflow: hidden;
60
60
  text-overflow: ellipsis;
@@ -75,8 +75,8 @@
75
75
  color: theme('colors.tone-neutral-03');
76
76
  }
77
77
 
78
- .input--mds-input-select-selected {
79
- color: theme('colors.tone-neutral-02');
78
+ :host([required]:not([required="false"])) .input {
79
+ color: theme('colors.tone-neutral-05');
80
80
  }
81
81
 
82
82
  .input:disabled {