@maggioli-design-system/mds-input-select 1.0.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 (186) hide show
  1. package/dist/cjs/index-49333be9.js +1713 -0
  2. package/dist/cjs/index.cjs.js +2 -0
  3. package/dist/cjs/loader.cjs.js +13 -0
  4. package/dist/cjs/mds-input-select.cjs.entry.js +80 -0
  5. package/dist/cjs/mds-input-select.cjs.js +23 -0
  6. package/dist/collection/collection-manifest.json +12 -0
  7. package/dist/collection/common/aria.js +29 -0
  8. package/dist/collection/common/file.js +48 -0
  9. package/dist/collection/common/icon.js +15 -0
  10. package/dist/collection/common/keyboard-manager.js +45 -0
  11. package/dist/collection/common/unit.js +22 -0
  12. package/dist/collection/common/yugop/core.js +16 -0
  13. package/dist/collection/common/yugop/index.js +3 -0
  14. package/dist/collection/common/yugop/random-text.js +59 -0
  15. package/dist/collection/common/yugop/utils/math.js +11 -0
  16. package/dist/collection/common/yugop/utils/noop.js +1 -0
  17. package/dist/collection/common/yugop/utils/prng.js +21 -0
  18. package/dist/collection/common/yugop/utils/string.js +2 -0
  19. package/dist/collection/components/mds-input-select/mds-input-select.css +533 -0
  20. package/dist/collection/components/mds-input-select/mds-input-select.js +174 -0
  21. package/dist/collection/components/mds-input-select/test/mds-input-select.e2e.js +10 -0
  22. package/dist/collection/components/mds-input-select/test/mds-input-select.stories.js +28 -0
  23. package/dist/collection/dictionary/autocomplete.js +59 -0
  24. package/dist/collection/dictionary/button.js +30 -0
  25. package/dist/collection/dictionary/color.js +19 -0
  26. package/dist/collection/dictionary/file-extensions.js +64 -0
  27. package/dist/collection/dictionary/floating-ui.js +19 -0
  28. package/dist/collection/dictionary/icon.js +10 -0
  29. package/dist/collection/dictionary/input.js +37 -0
  30. package/dist/collection/dictionary/loading.js +5 -0
  31. package/dist/collection/dictionary/text.js +6 -0
  32. package/dist/collection/dictionary/typography.js +67 -0
  33. package/dist/collection/dictionary/variant.js +90 -0
  34. package/dist/collection/fixtures/cities.js +110 -0
  35. package/dist/collection/fixtures/filenames.js +57 -0
  36. package/dist/collection/interface/input-value.js +1 -0
  37. package/dist/collection/type/autocomplete.js +1 -0
  38. package/dist/collection/type/button.js +1 -0
  39. package/dist/collection/type/file-types.js +1 -0
  40. package/dist/collection/type/floating-ui.js +1 -0
  41. package/dist/collection/type/form-rel.js +1 -0
  42. package/dist/collection/type/input.js +1 -0
  43. package/dist/collection/type/loading.js +1 -0
  44. package/dist/collection/type/text.js +1 -0
  45. package/dist/collection/type/typography.js +1 -0
  46. package/dist/collection/type/variant-file-format.js +111 -0
  47. package/dist/collection/type/variant.js +1 -0
  48. package/dist/components/index.d.ts +33 -0
  49. package/dist/components/index.js +1 -0
  50. package/dist/components/mds-input-select.d.ts +11 -0
  51. package/dist/components/mds-input-select.js +94 -0
  52. package/dist/documentation.d.ts +401 -0
  53. package/dist/documentation.json +161 -0
  54. package/dist/esm/index-5f46338e.js +1684 -0
  55. package/dist/esm/index.js +1 -0
  56. package/dist/esm/loader.js +9 -0
  57. package/dist/esm/mds-input-select.entry.js +76 -0
  58. package/dist/esm/mds-input-select.js +18 -0
  59. package/dist/esm/polyfills/core-js.js +11 -0
  60. package/dist/esm/polyfills/dom.js +79 -0
  61. package/dist/esm/polyfills/es5-html-element.js +1 -0
  62. package/dist/esm/polyfills/index.js +34 -0
  63. package/dist/esm/polyfills/system.js +6 -0
  64. package/dist/esm-es5/index-5f46338e.js +1 -0
  65. package/dist/esm-es5/index.js +0 -0
  66. package/dist/esm-es5/loader.js +1 -0
  67. package/dist/esm-es5/mds-input-select.entry.js +1 -0
  68. package/dist/esm-es5/mds-input-select.js +1 -0
  69. package/dist/index.cjs.js +1 -0
  70. package/dist/index.js +1 -0
  71. package/dist/mds-input-select/index.esm.js +0 -0
  72. package/dist/mds-input-select/mds-input-select.esm.js +1 -0
  73. package/dist/mds-input-select/mds-input-select.js +127 -0
  74. package/dist/mds-input-select/p-50ea2036.system.js +1 -0
  75. package/dist/mds-input-select/p-7c9868ca.entry.js +1 -0
  76. package/dist/mds-input-select/p-861fc894.system.js +2 -0
  77. package/dist/mds-input-select/p-ac8d0a7e.js +2 -0
  78. package/dist/mds-input-select/p-d16d283c.system.js +1 -0
  79. package/dist/mds-input-select/p-f6ca4ca0.system.entry.js +1 -0
  80. package/dist/stats.json +628 -0
  81. package/dist/types/common/aria.d.ts +5 -0
  82. package/dist/types/common/file.d.ts +12 -0
  83. package/dist/types/common/icon.d.ts +5 -0
  84. package/dist/types/common/keyboard-manager.d.ts +12 -0
  85. package/dist/types/common/unit.d.ts +3 -0
  86. package/dist/types/common/yugop/core.d.ts +10 -0
  87. package/dist/types/common/yugop/index.d.ts +1 -0
  88. package/dist/types/common/yugop/random-text.d.ts +31 -0
  89. package/dist/types/common/yugop/utils/math.d.ts +3 -0
  90. package/dist/types/common/yugop/utils/noop.d.ts +1 -0
  91. package/dist/types/common/yugop/utils/prng.d.ts +8 -0
  92. package/dist/types/common/yugop/utils/string.d.ts +1 -0
  93. package/dist/types/components/mds-input-select/test/mds-input-select.stories.d.ts +26 -0
  94. package/dist/types/components.d.ts +90 -0
  95. package/dist/types/dictionary/autocomplete.d.ts +2 -0
  96. package/dist/types/dictionary/button.d.ts +6 -0
  97. package/dist/types/dictionary/color.d.ts +3 -0
  98. package/dist/types/dictionary/file-extensions.d.ts +11 -0
  99. package/dist/types/dictionary/floating-ui.d.ts +3 -0
  100. package/dist/types/dictionary/icon.d.ts +4 -0
  101. package/dist/types/dictionary/input.d.ts +5 -0
  102. package/dist/types/dictionary/loading.d.ts +2 -0
  103. package/dist/types/dictionary/text.d.ts +2 -0
  104. package/dist/types/dictionary/typography.d.ts +11 -0
  105. package/dist/types/dictionary/variant.d.ts +11 -0
  106. package/dist/types/fixtures/cities.d.ts +2 -0
  107. package/dist/types/fixtures/filenames.d.ts +2 -0
  108. package/dist/types/interface/input-value.d.ts +4 -0
  109. package/dist/types/stencil-public-runtime.d.ts +1681 -0
  110. package/dist/types/type/autocomplete.d.ts +2 -0
  111. package/dist/types/type/button.d.ts +5 -0
  112. package/dist/types/type/file-types.d.ts +1 -0
  113. package/dist/types/type/floating-ui.d.ts +2 -0
  114. package/dist/types/type/form-rel.d.ts +1 -0
  115. package/dist/types/type/input.d.ts +4 -0
  116. package/dist/types/type/loading.d.ts +1 -0
  117. package/dist/types/type/text.d.ts +1 -0
  118. package/dist/types/type/typography.d.ts +10 -0
  119. package/dist/types/type/variant-file-format.d.ts +11 -0
  120. package/dist/types/type/variant.d.ts +12 -0
  121. package/documentation.json +577 -0
  122. package/loader/cdn.js +3 -0
  123. package/loader/index.cjs.js +3 -0
  124. package/loader/index.d.ts +21 -0
  125. package/loader/index.es2017.js +3 -0
  126. package/loader/index.js +4 -0
  127. package/loader/package.json +11 -0
  128. package/package.json +57 -0
  129. package/readme.md +29 -0
  130. package/src/common/aria.ts +39 -0
  131. package/src/common/file.ts +63 -0
  132. package/src/common/icon.ts +25 -0
  133. package/src/common/keyboard-manager.ts +50 -0
  134. package/src/common/unit.ts +33 -0
  135. package/src/common/yugop/core.ts +47 -0
  136. package/src/common/yugop/index.ts +4 -0
  137. package/src/common/yugop/random-text.ts +95 -0
  138. package/src/common/yugop/utils/math.ts +21 -0
  139. package/src/common/yugop/utils/noop.ts +1 -0
  140. package/src/common/yugop/utils/prng.ts +35 -0
  141. package/src/common/yugop/utils/string.ts +4 -0
  142. package/src/components/mds-input-select/.gitlab-ci.yml +25 -0
  143. package/src/components/mds-input-select/mds-input-select.css +98 -0
  144. package/src/components/mds-input-select/mds-input-select.tsx +112 -0
  145. package/src/components/mds-input-select/readme.md +27 -0
  146. package/src/components/mds-input-select/test/mds-input-select.e2e.ts +12 -0
  147. package/src/components/mds-input-select/test/mds-input-select.stories.tsx +38 -0
  148. package/src/components.d.ts +90 -0
  149. package/src/dictionary/autocomplete.ts +62 -0
  150. package/src/dictionary/button.ts +41 -0
  151. package/src/dictionary/color.ts +24 -0
  152. package/src/dictionary/file-extensions.ts +81 -0
  153. package/src/dictionary/floating-ui.ts +25 -0
  154. package/src/dictionary/icon.ts +15 -0
  155. package/src/dictionary/input.ts +48 -0
  156. package/src/dictionary/loading.ts +9 -0
  157. package/src/dictionary/text.ts +9 -0
  158. package/src/dictionary/typography.ts +88 -0
  159. package/src/dictionary/variant.ts +111 -0
  160. package/src/fixtures/cities.ts +116 -0
  161. package/src/fixtures/filenames.ts +60 -0
  162. package/src/fixtures/icons.json +315 -0
  163. package/src/fixtures/iconsauce.json +236 -0
  164. package/src/interface/input-value.ts +5 -0
  165. package/src/tailwind/components.css +15 -0
  166. package/src/type/autocomplete.ts +69 -0
  167. package/src/type/button.ts +28 -0
  168. package/src/type/file-types.ts +55 -0
  169. package/src/type/floating-ui.ts +17 -0
  170. package/src/type/form-rel.ts +11 -0
  171. package/src/type/input.ts +25 -0
  172. package/src/type/loading.ts +3 -0
  173. package/src/type/text.ts +4 -0
  174. package/src/type/typography.ts +65 -0
  175. package/src/type/variant-file-format.ts +128 -0
  176. package/src/type/variant.ts +99 -0
  177. package/www/build/index.esm.js +0 -0
  178. package/www/build/mds-input-select.esm.js +1 -0
  179. package/www/build/mds-input-select.js +127 -0
  180. package/www/build/p-50ea2036.system.js +1 -0
  181. package/www/build/p-7c9868ca.entry.js +1 -0
  182. package/www/build/p-861fc894.system.js +2 -0
  183. package/www/build/p-ac8d0a7e.js +2 -0
  184. package/www/build/p-d16d283c.system.js +1 -0
  185. package/www/build/p-f6ca4ca0.system.entry.js +1 -0
  186. package/www/host.config.json +15 -0
@@ -0,0 +1,533 @@
1
+ @tailwind components;
2
+
3
+ *, ::before, ::after{
4
+
5
+ --tw-border-spacing-x: 0;
6
+
7
+ --tw-border-spacing-y: 0;
8
+
9
+ --tw-translate-x: 0;
10
+
11
+ --tw-translate-y: 0;
12
+
13
+ --tw-rotate: 0;
14
+
15
+ --tw-skew-x: 0;
16
+
17
+ --tw-skew-y: 0;
18
+
19
+ --tw-scale-x: 1;
20
+
21
+ --tw-scale-y: 1;
22
+
23
+ --tw-pan-x: ;
24
+
25
+ --tw-pan-y: ;
26
+
27
+ --tw-pinch-zoom: ;
28
+
29
+ --tw-scroll-snap-strictness: proximity;
30
+
31
+ --tw-gradient-from-position: ;
32
+
33
+ --tw-gradient-via-position: ;
34
+
35
+ --tw-gradient-to-position: ;
36
+
37
+ --tw-ordinal: ;
38
+
39
+ --tw-slashed-zero: ;
40
+
41
+ --tw-numeric-figure: ;
42
+
43
+ --tw-numeric-spacing: ;
44
+
45
+ --tw-numeric-fraction: ;
46
+
47
+ --tw-ring-inset: ;
48
+
49
+ --tw-ring-offset-width: 0px;
50
+
51
+ --tw-ring-offset-color: #fff;
52
+
53
+ --tw-ring-color: rgb(59 130 246 / 0.5);
54
+
55
+ --tw-ring-offset-shadow: 0 0 #0000;
56
+
57
+ --tw-ring-shadow: 0 0 #0000;
58
+
59
+ --tw-shadow: 0 0 #0000;
60
+
61
+ --tw-shadow-colored: 0 0 #0000;
62
+
63
+ --tw-blur: ;
64
+
65
+ --tw-brightness: ;
66
+
67
+ --tw-contrast: ;
68
+
69
+ --tw-grayscale: ;
70
+
71
+ --tw-hue-rotate: ;
72
+
73
+ --tw-invert: ;
74
+
75
+ --tw-saturate: ;
76
+
77
+ --tw-sepia: ;
78
+
79
+ --tw-drop-shadow: ;
80
+
81
+ --tw-backdrop-blur: ;
82
+
83
+ --tw-backdrop-brightness: ;
84
+
85
+ --tw-backdrop-contrast: ;
86
+
87
+ --tw-backdrop-grayscale: ;
88
+
89
+ --tw-backdrop-hue-rotate: ;
90
+
91
+ --tw-backdrop-invert: ;
92
+
93
+ --tw-backdrop-opacity: ;
94
+
95
+ --tw-backdrop-saturate: ;
96
+
97
+ --tw-backdrop-sepia: ;
98
+ }
99
+
100
+ ::backdrop{
101
+
102
+ --tw-border-spacing-x: 0;
103
+
104
+ --tw-border-spacing-y: 0;
105
+
106
+ --tw-translate-x: 0;
107
+
108
+ --tw-translate-y: 0;
109
+
110
+ --tw-rotate: 0;
111
+
112
+ --tw-skew-x: 0;
113
+
114
+ --tw-skew-y: 0;
115
+
116
+ --tw-scale-x: 1;
117
+
118
+ --tw-scale-y: 1;
119
+
120
+ --tw-pan-x: ;
121
+
122
+ --tw-pan-y: ;
123
+
124
+ --tw-pinch-zoom: ;
125
+
126
+ --tw-scroll-snap-strictness: proximity;
127
+
128
+ --tw-gradient-from-position: ;
129
+
130
+ --tw-gradient-via-position: ;
131
+
132
+ --tw-gradient-to-position: ;
133
+
134
+ --tw-ordinal: ;
135
+
136
+ --tw-slashed-zero: ;
137
+
138
+ --tw-numeric-figure: ;
139
+
140
+ --tw-numeric-spacing: ;
141
+
142
+ --tw-numeric-fraction: ;
143
+
144
+ --tw-ring-inset: ;
145
+
146
+ --tw-ring-offset-width: 0px;
147
+
148
+ --tw-ring-offset-color: #fff;
149
+
150
+ --tw-ring-color: rgb(59 130 246 / 0.5);
151
+
152
+ --tw-ring-offset-shadow: 0 0 #0000;
153
+
154
+ --tw-ring-shadow: 0 0 #0000;
155
+
156
+ --tw-shadow: 0 0 #0000;
157
+
158
+ --tw-shadow-colored: 0 0 #0000;
159
+
160
+ --tw-blur: ;
161
+
162
+ --tw-brightness: ;
163
+
164
+ --tw-contrast: ;
165
+
166
+ --tw-grayscale: ;
167
+
168
+ --tw-hue-rotate: ;
169
+
170
+ --tw-invert: ;
171
+
172
+ --tw-saturate: ;
173
+
174
+ --tw-sepia: ;
175
+
176
+ --tw-drop-shadow: ;
177
+
178
+ --tw-backdrop-blur: ;
179
+
180
+ --tw-backdrop-brightness: ;
181
+
182
+ --tw-backdrop-contrast: ;
183
+
184
+ --tw-backdrop-grayscale: ;
185
+
186
+ --tw-backdrop-hue-rotate: ;
187
+
188
+ --tw-backdrop-invert: ;
189
+
190
+ --tw-backdrop-opacity: ;
191
+
192
+ --tw-backdrop-saturate: ;
193
+
194
+ --tw-backdrop-sepia: ;
195
+ }
196
+ .svg{
197
+
198
+ display: flex;
199
+ }
200
+ .svg svg{
201
+
202
+ aspect-ratio: 1/1;
203
+
204
+ height: 100%;
205
+
206
+ width: 100%;
207
+ }
208
+ .static{
209
+
210
+ position: static;
211
+ }
212
+ .fixed{
213
+
214
+ position: fixed;
215
+ }
216
+ .absolute{
217
+
218
+ position: absolute;
219
+ }
220
+ .border{
221
+
222
+ border-width: 1px;
223
+ }
224
+ .bg-label-amaranth-10{
225
+
226
+ --tw-bg-opacity: 1;
227
+
228
+ background-color: rgb(var(--label-amaranth-10) / var(--tw-bg-opacity));
229
+ }
230
+ .bg-label-aqua-10{
231
+
232
+ --tw-bg-opacity: 1;
233
+
234
+ background-color: rgb(var(--label-aqua-10) / var(--tw-bg-opacity));
235
+ }
236
+ .bg-label-blue-10{
237
+
238
+ --tw-bg-opacity: 1;
239
+
240
+ background-color: rgb(var(--label-blue-10) / var(--tw-bg-opacity));
241
+ }
242
+ .bg-label-green-10{
243
+
244
+ --tw-bg-opacity: 1;
245
+
246
+ background-color: rgb(var(--label-green-10) / var(--tw-bg-opacity));
247
+ }
248
+ .bg-label-lime-10{
249
+
250
+ --tw-bg-opacity: 1;
251
+
252
+ background-color: rgb(var(--label-lime-10) / var(--tw-bg-opacity));
253
+ }
254
+ .bg-label-orange-10{
255
+
256
+ --tw-bg-opacity: 1;
257
+
258
+ background-color: rgb(var(--label-orange-10) / var(--tw-bg-opacity));
259
+ }
260
+ .bg-label-orchid-10{
261
+
262
+ --tw-bg-opacity: 1;
263
+
264
+ background-color: rgb(var(--label-orchid-10) / var(--tw-bg-opacity));
265
+ }
266
+ .bg-label-violet-10{
267
+
268
+ --tw-bg-opacity: 1;
269
+
270
+ background-color: rgb(var(--label-violet-10) / var(--tw-bg-opacity));
271
+ }
272
+ .bg-label-yellow-10{
273
+
274
+ --tw-bg-opacity: 1;
275
+
276
+ background-color: rgb(var(--label-yellow-10) / var(--tw-bg-opacity));
277
+ }
278
+ .bg-tone-neutral-10{
279
+
280
+ --tw-bg-opacity: 1;
281
+
282
+ background-color: rgb(var(--tone-neutral-10) / var(--tw-bg-opacity));
283
+ }
284
+ .fill-label-amaranth-04{
285
+
286
+ fill: rgb(var(--label-amaranth-04));
287
+ }
288
+ .fill-label-aqua-04{
289
+
290
+ fill: rgb(var(--label-aqua-04));
291
+ }
292
+ .fill-label-blue-04{
293
+
294
+ fill: rgb(var(--label-blue-04));
295
+ }
296
+ .fill-label-green-04{
297
+
298
+ fill: rgb(var(--label-green-04));
299
+ }
300
+ .fill-label-lime-04{
301
+
302
+ fill: rgb(var(--label-lime-04));
303
+ }
304
+ .fill-label-orange-04{
305
+
306
+ fill: rgb(var(--label-orange-04));
307
+ }
308
+ .fill-label-orchid-04{
309
+
310
+ fill: rgb(var(--label-orchid-04));
311
+ }
312
+ .fill-label-violet-04{
313
+
314
+ fill: rgb(var(--label-violet-04));
315
+ }
316
+ .fill-label-yellow-04{
317
+
318
+ fill: rgb(var(--label-yellow-04));
319
+ }
320
+ .fill-tone-neutral-04{
321
+
322
+ fill: rgb(var(--tone-neutral-04));
323
+ }
324
+ .text-label-amaranth-04{
325
+
326
+ --tw-text-opacity: 1;
327
+
328
+ color: rgb(var(--label-amaranth-04) / var(--tw-text-opacity));
329
+ }
330
+ .text-label-aqua-04{
331
+
332
+ --tw-text-opacity: 1;
333
+
334
+ color: rgb(var(--label-aqua-04) / var(--tw-text-opacity));
335
+ }
336
+ .text-label-blue-04{
337
+
338
+ --tw-text-opacity: 1;
339
+
340
+ color: rgb(var(--label-blue-04) / var(--tw-text-opacity));
341
+ }
342
+ .text-label-green-04{
343
+
344
+ --tw-text-opacity: 1;
345
+
346
+ color: rgb(var(--label-green-04) / var(--tw-text-opacity));
347
+ }
348
+ .text-label-lime-04{
349
+
350
+ --tw-text-opacity: 1;
351
+
352
+ color: rgb(var(--label-lime-04) / var(--tw-text-opacity));
353
+ }
354
+ .text-label-orange-04{
355
+
356
+ --tw-text-opacity: 1;
357
+
358
+ color: rgb(var(--label-orange-04) / var(--tw-text-opacity));
359
+ }
360
+ .text-label-orchid-04{
361
+
362
+ --tw-text-opacity: 1;
363
+
364
+ color: rgb(var(--label-orchid-04) / var(--tw-text-opacity));
365
+ }
366
+ .text-label-violet-04{
367
+
368
+ --tw-text-opacity: 1;
369
+
370
+ color: rgb(var(--label-violet-04) / var(--tw-text-opacity));
371
+ }
372
+ .text-label-yellow-04{
373
+
374
+ --tw-text-opacity: 1;
375
+
376
+ color: rgb(var(--label-yellow-04) / var(--tw-text-opacity));
377
+ }
378
+ .text-tone-neutral-04{
379
+
380
+ --tw-text-opacity: 1;
381
+
382
+ color: rgb(var(--tone-neutral-04) / var(--tw-text-opacity));
383
+ }
384
+ .shadow{
385
+
386
+ --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
387
+
388
+ --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
389
+
390
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
391
+ }
392
+
393
+
394
+ :host{
395
+
396
+ min-height: 1.5rem;
397
+
398
+ font-family: Karla, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
399
+
400
+ font-size: 1rem;
401
+
402
+ line-height: 1.5rem;
403
+
404
+ -webkit-font-smoothing: antialiased;
405
+
406
+ -moz-osx-font-smoothing: grayscale;
407
+
408
+ --mds-input-select-variant-color: var(--tone-neutral-01);
409
+ --mds-input-select-ring: 0 0 0 1px rgb(var(--mds-input-select-variant-color) / 0.1);
410
+ --mds-input-select-shadow: 0 1px 3px 0 rgb(var(--mds-input-select-variant-color) / 0.1), 0 1px 2px 0 rgb(var(--mds-input-select-variant-color) / 0.06);
411
+
412
+ color: rgb(var(--tone-neutral-02));
413
+ display: flex;
414
+ position: relative;
415
+ }
416
+
417
+ .input{
418
+
419
+ font-family: Karla, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
420
+
421
+ font-size: 1rem;
422
+
423
+ line-height: 1.5rem;
424
+
425
+ -webkit-font-smoothing: antialiased;
426
+
427
+ -moz-osx-font-smoothing: grayscale;
428
+
429
+ margin: 0rem;
430
+
431
+ min-height: 3rem;
432
+
433
+ width: 100%;
434
+
435
+ border-radius: 0.5rem;
436
+
437
+ padding-top: 0.75rem;
438
+
439
+ padding-bottom: 0.75rem;
440
+
441
+ padding-left: 1rem;
442
+
443
+ padding-right: 3rem;
444
+
445
+ transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
446
+
447
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
448
+
449
+ transition-duration: 300ms;
450
+
451
+ transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
452
+
453
+ -webkit-appearance: none;
454
+
455
+ -moz-appearance: none;
456
+
457
+ appearance: none;
458
+ background-color: rgb(var(--tone-neutral));
459
+ border: 0;
460
+ box-shadow: var(--mds-input-select-ring), var(--mds-input-select-shadow);
461
+ box-sizing: border-box;
462
+ color: rgb(var(--tone-neutral-05));
463
+ cursor: pointer;
464
+ overflow: hidden;
465
+ text-overflow: ellipsis;
466
+ }
467
+
468
+ .input:hover,
469
+ .input:focus{
470
+
471
+ outline: 2px solid transparent;
472
+
473
+ outline-offset: 2px;
474
+
475
+ transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
476
+
477
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
478
+
479
+ transition-duration: 300ms;
480
+
481
+ transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
482
+
483
+ --mds-input-select-variant-color: var(--brand-maggioli-04);
484
+ --mds-input-select-ring: 0 0 0 3px rgb(var(--mds-input-select-variant-color) / 1);
485
+ --mds-input-select-shadow: 0 4px 6px -1px rgb(var(--mds-input-select-variant-color) / 0.1), 0 2px 4px -1px rgb(var(--mds-input-select-variant-color) / 0.06);
486
+
487
+ color: rgb(var(--tone-neutral-03));
488
+ }
489
+
490
+ :host([value]:not([value=""])) .input {
491
+ color: rgb(var(--tone-neutral-03));
492
+ }
493
+
494
+ .input--mds-input-select-selected {
495
+ color: rgb(var(--tone-neutral-02));
496
+ }
497
+
498
+ .icon-container{
499
+
500
+ right: 1rem;
501
+
502
+ height: 3rem;
503
+
504
+ align-items: center;
505
+ color: inherit;
506
+ display: flex;
507
+ pointer-events: none;
508
+ position: absolute;
509
+ }
510
+
511
+ .icon{
512
+
513
+ border-radius: 9999px;
514
+
515
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
516
+
517
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
518
+
519
+ transition-duration: 200ms;
520
+
521
+ background-color: transparent;
522
+ fill: rgb(var(--brand-maggioli-04));
523
+ }
524
+
525
+ .input:focus + .icon-container .icon,
526
+ .input:hover + .icon-container .icon {
527
+ background-color: rgb(var(--tone-neutral-09));
528
+ fill: rgb(var(--brand-maggioli-02));
529
+ }
530
+
531
+ .option-container {
532
+ display: none;
533
+ }
@@ -0,0 +1,174 @@
1
+ import clsx from "clsx";
2
+ import miBaselineKeyboardArrowDown from "@icon/mi/baseline/keyboard-arrow-down.svg";
3
+ import { Host, h } from "@stencil/core";
4
+ export class MdsInputSelect {
5
+ constructor() {
6
+ this.onInput = (ev) => {
7
+ const input = ev.target;
8
+ if (input) {
9
+ this.selected = input.value !== '';
10
+ this.value = input.value;
11
+ this.internals.setFormValue(input.value);
12
+ }
13
+ };
14
+ this.emptyOptions = () => {
15
+ var _a;
16
+ const select = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('select');
17
+ const options = select === null || select === void 0 ? void 0 : select.querySelectorAll('option');
18
+ if (!options) {
19
+ return;
20
+ }
21
+ options.forEach((option, index) => {
22
+ if (!this.placeholder) {
23
+ option.remove();
24
+ }
25
+ if (this.placeholder && index > 0) {
26
+ option.remove();
27
+ }
28
+ });
29
+ };
30
+ this.onSlotChangeHandler = () => {
31
+ var _a, _b, _c;
32
+ const elements = (_b = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('slot')[0]) === null || _b === void 0 ? void 0 : _b.assignedNodes();
33
+ const select = (_c = this.host.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector('select');
34
+ const options = select === null || select === void 0 ? void 0 : select.querySelectorAll('option');
35
+ if (!options) {
36
+ return;
37
+ }
38
+ if (!this.placeholder && options.length > 0) {
39
+ this.emptyOptions();
40
+ }
41
+ if (this.placeholder && options.length > 1) {
42
+ this.emptyOptions();
43
+ }
44
+ elements === null || elements === void 0 ? void 0 : elements.forEach((element) => {
45
+ select === null || select === void 0 ? void 0 : select.appendChild(element.cloneNode(true));
46
+ });
47
+ };
48
+ this.selected = undefined;
49
+ this.autocomplete = undefined;
50
+ this.autoFocus = undefined;
51
+ this.placeholder = undefined;
52
+ this.value = '';
53
+ }
54
+ render() {
55
+ return (h(Host, null, h("select", { class: clsx('input', this.selected && 'input--selected'), onInput: this.onInput.bind(this) }, this.placeholder && h("option", { value: "", disabled: true, selected: true }, this.placeholder)), h("div", { class: "icon-container" }, h("i", { class: "svg icon", innerHTML: miBaselineKeyboardArrowDown })), h("div", { class: "option-container" }, h("slot", { onSlotchange: this.onSlotChangeHandler }))));
56
+ }
57
+ static get is() { return "mds-input-select"; }
58
+ static get encapsulation() { return "shadow"; }
59
+ static get formAssociated() { return true; }
60
+ static get originalStyleUrls() {
61
+ return {
62
+ "$": ["mds-input-select.css"]
63
+ };
64
+ }
65
+ static get styleUrls() {
66
+ return {
67
+ "$": ["mds-input-select.css"]
68
+ };
69
+ }
70
+ static get properties() {
71
+ return {
72
+ "autocomplete": {
73
+ "type": "string",
74
+ "mutable": false,
75
+ "complexType": {
76
+ "original": "'on'",
77
+ "resolved": "\"on\" | undefined",
78
+ "references": {}
79
+ },
80
+ "required": false,
81
+ "optional": true,
82
+ "docs": {
83
+ "tags": [],
84
+ "text": "Specifies a short hint that describes the expected value of the element"
85
+ },
86
+ "attribute": "autocomplete",
87
+ "reflect": true
88
+ },
89
+ "autoFocus": {
90
+ "type": "boolean",
91
+ "mutable": false,
92
+ "complexType": {
93
+ "original": "boolean",
94
+ "resolved": "boolean | undefined",
95
+ "references": {}
96
+ },
97
+ "required": false,
98
+ "optional": true,
99
+ "docs": {
100
+ "tags": [],
101
+ "text": "Specifies a short hint that describes the expected value of the element"
102
+ },
103
+ "attribute": "auto-focus",
104
+ "reflect": true
105
+ },
106
+ "placeholder": {
107
+ "type": "string",
108
+ "mutable": false,
109
+ "complexType": {
110
+ "original": "string",
111
+ "resolved": "string | undefined",
112
+ "references": {}
113
+ },
114
+ "required": false,
115
+ "optional": true,
116
+ "docs": {
117
+ "tags": [],
118
+ "text": "Specifies a short hint that describes the expected value of the element"
119
+ },
120
+ "attribute": "placeholder",
121
+ "reflect": true
122
+ },
123
+ "value": {
124
+ "type": "any",
125
+ "mutable": false,
126
+ "complexType": {
127
+ "original": "string | number | null",
128
+ "resolved": "null | number | string | undefined",
129
+ "references": {}
130
+ },
131
+ "required": false,
132
+ "optional": true,
133
+ "docs": {
134
+ "tags": [],
135
+ "text": "Specifies the value of the element"
136
+ },
137
+ "attribute": "value",
138
+ "reflect": true,
139
+ "defaultValue": "''"
140
+ }
141
+ };
142
+ }
143
+ static get states() {
144
+ return {
145
+ "selected": {}
146
+ };
147
+ }
148
+ static get events() {
149
+ return [{
150
+ "method": "changeEvent",
151
+ "name": "mdsInputSelectChange",
152
+ "bubbles": true,
153
+ "cancelable": true,
154
+ "composed": true,
155
+ "docs": {
156
+ "tags": [],
157
+ "text": "Emits an InputChangeEventDetail when the value of the input element changes"
158
+ },
159
+ "complexType": {
160
+ "original": "InputValue",
161
+ "resolved": "InputValue",
162
+ "references": {
163
+ "InputValue": {
164
+ "location": "import",
165
+ "path": "@interface/input-value",
166
+ "id": "src/interface/input-value.ts::InputValue"
167
+ }
168
+ }
169
+ }
170
+ }];
171
+ }
172
+ static get elementRef() { return "host"; }
173
+ static get attachInternalsMemberName() { return "internals"; }
174
+ }
@@ -0,0 +1,10 @@
1
+ import { newE2EPage } from "@stencil/core/testing";
2
+ describe('mds-input-select', () => {
3
+ it('renders', async () => {
4
+ const page = await newE2EPage();
5
+ await page.setContent('<mds-input-select></mds-input-select>');
6
+ const element = await page.find('mds-input-select');
7
+ expect(element).toHaveAttribute('hydrated');
8
+ expect(true).toBe(true);
9
+ });
10
+ });