@maggioli-design-system/mds-input-select 2.0.5 → 3.0.1
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/cjs/{index-9a5feb6d.js → index-f192b288.js} +14 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mds-input-select.cjs.entry.js +8 -8
- package/dist/cjs/mds-input-select.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/common/aria.js +17 -1
- package/dist/collection/common/device.js +6 -0
- package/dist/collection/common/keyboard-manager.js +2 -2
- package/dist/collection/common/locale.js +17 -5
- package/dist/collection/components/mds-input-select/mds-input-select.css +33 -503
- package/dist/collection/components/mds-input-select/mds-input-select.js +11 -11
- package/dist/collection/dictionary/button.js +1 -0
- package/dist/collection/dictionary/file-extensions.js +114 -56
- package/dist/collection/dictionary/text.js +60 -1
- package/dist/collection/dictionary/variant.js +10 -1
- package/dist/collection/type/variant-file-format.js +0 -34
- package/dist/components/mds-input-select.js +7 -7
- package/dist/documentation.json +12 -12
- package/dist/esm/{index-27f9b67f.js → index-f99575c3.js} +14 -3
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mds-input-select.entry.js +8 -8
- package/dist/esm/mds-input-select.js +3 -3
- package/dist/esm-es5/index-f99575c3.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mds-input-select.entry.js +1 -1
- package/dist/esm-es5/mds-input-select.js +1 -1
- package/dist/mds-input-select/mds-input-select.esm.js +1 -1
- package/dist/mds-input-select/mds-input-select.js +1 -1
- package/dist/mds-input-select/p-39558724.system.js +2 -0
- package/dist/mds-input-select/p-99fd6ce0.entry.js +1 -0
- package/dist/mds-input-select/p-ec8a0b02.system.js +1 -0
- package/dist/mds-input-select/p-ecf343d4.js +2 -0
- package/dist/mds-input-select/p-f1804d7b.system.entry.js +1 -0
- package/dist/stats.json +44 -44
- package/dist/types/common/aria.d.ts +3 -1
- package/dist/types/common/date.d.ts +1 -1
- package/dist/types/common/device.d.ts +2 -0
- package/dist/types/common/file.d.ts +3 -4
- package/dist/types/common/locale.d.ts +3 -1
- package/dist/types/components/mds-input-select/mds-input-select.d.ts +3 -3
- package/dist/types/components.d.ts +6 -6
- package/dist/types/dictionary/file-extensions.d.ts +2 -1
- package/dist/types/dictionary/text.d.ts +3 -1
- package/dist/types/dictionary/variant.d.ts +2 -1
- package/dist/types/stencil-public-runtime.d.ts +6 -0
- package/dist/types/type/autocomplete.d.ts +1 -1
- package/dist/types/type/button.d.ts +1 -1
- package/dist/types/type/header-bar.d.ts +2 -0
- package/dist/types/type/input.d.ts +3 -0
- package/dist/types/type/text.d.ts +2 -0
- package/dist/types/type/variant-file-format.d.ts +4 -4
- package/dist/types/type/variant.d.ts +2 -1
- package/documentation.json +54 -39
- package/package.json +5 -5
- package/readme.md +4 -4
- package/src/common/aria.ts +22 -2
- package/src/common/device.ts +9 -0
- package/src/common/file.ts +2 -3
- package/src/common/keyboard-manager.ts +2 -2
- package/src/common/locale.ts +20 -6
- package/src/common/unit.ts +1 -1
- package/src/components/mds-input-select/.gitlab-ci.yml +5 -10
- package/src/components/mds-input-select/css/mds-input-select-pref-theme.css +2 -2
- package/src/components/mds-input-select/css/mds-input-select-variant.css +6 -6
- package/src/components/mds-input-select/mds-input-select.css +13 -17
- package/src/components/mds-input-select/mds-input-select.tsx +6 -6
- package/src/components/mds-input-select/readme.md +3 -3
- package/src/components.d.ts +6 -6
- package/src/dictionary/button.ts +1 -0
- package/src/dictionary/file-extensions.ts +118 -57
- package/src/dictionary/text.ts +64 -0
- package/src/dictionary/variant.ts +11 -0
- package/src/fixtures/icons.json +30 -3
- package/src/fixtures/iconsauce.json +21 -1
- package/src/meta/file-format/locale.el.json +39 -0
- package/src/meta/file-format/locale.en.json +39 -0
- package/src/meta/file-format/locale.es.json +39 -0
- package/src/meta/file-format/locale.it.json +39 -0
- package/src/tailwind/components.css +1 -1
- package/src/type/autocomplete.ts +0 -1
- package/src/type/button.ts +1 -0
- package/src/type/header-bar.ts +11 -0
- package/src/type/input.ts +4 -0
- package/src/type/text.ts +59 -0
- package/src/type/variant-file-format.ts +20 -37
- package/src/type/variant.ts +9 -1
- package/www/build/mds-input-select.esm.js +1 -1
- package/www/build/mds-input-select.js +1 -1
- package/www/build/p-39558724.system.js +2 -0
- package/www/build/p-99fd6ce0.entry.js +1 -0
- package/www/build/p-ec8a0b02.system.js +1 -0
- package/www/build/p-ecf343d4.js +2 -0
- package/www/build/p-f1804d7b.system.entry.js +1 -0
- package/dist/collection/type/language.js +0 -1
- package/dist/esm-es5/index-27f9b67f.js +0 -1
- package/dist/mds-input-select/p-5a0746e7.system.js +0 -2
- package/dist/mds-input-select/p-750f66cc.system.js +0 -1
- package/dist/mds-input-select/p-7ab40018.system.entry.js +0 -1
- package/dist/mds-input-select/p-babc558f.js +0 -2
- package/dist/mds-input-select/p-e743c791.entry.js +0 -1
- package/dist/types/interface/input-value.d.ts +0 -4
- package/dist/types/type/language.d.ts +0 -2
- package/src/interface/input-value.ts +0 -5
- package/src/type/language.ts +0 -8
- package/www/build/p-5a0746e7.system.js +0 -2
- package/www/build/p-750f66cc.system.js +0 -1
- package/www/build/p-7ab40018.system.entry.js +0 -1
- package/www/build/p-babc558f.js +0 -2
- package/www/build/p-e743c791.entry.js +0 -1
- /package/dist/collection/{interface/input-value.js → type/header-bar.js} +0 -0
package/documentation.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2024-
|
|
2
|
+
"timestamp": "2024-12-04T15:30:05",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
|
-
"version": "4.
|
|
6
|
-
"typescriptVersion": "5.5.
|
|
5
|
+
"version": "4.22.2",
|
|
6
|
+
"typescriptVersion": "5.5.4"
|
|
7
7
|
},
|
|
8
8
|
"components": [
|
|
9
9
|
{
|
|
10
10
|
"filePath": "src/components/mds-input-select/mds-input-select.tsx",
|
|
11
11
|
"encapsulation": "shadow",
|
|
12
12
|
"tag": "mds-input-select",
|
|
13
|
-
"readme": "# mds-input-select\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
|
|
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
|
|
13
|
+
"readme": "# mds-input-select\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
|
+
"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
15
|
"docsTags": [
|
|
16
16
|
{
|
|
17
17
|
"name": "part",
|
|
@@ -296,16 +296,16 @@
|
|
|
296
296
|
"events": [
|
|
297
297
|
{
|
|
298
298
|
"event": "mdsInputSelectChange",
|
|
299
|
-
"detail": "
|
|
299
|
+
"detail": "MdsInputEventDetail",
|
|
300
300
|
"bubbles": true,
|
|
301
301
|
"complexType": {
|
|
302
|
-
"original": "
|
|
303
|
-
"resolved": "
|
|
302
|
+
"original": "MdsInputEventDetail",
|
|
303
|
+
"resolved": "MdsInputEventDetail",
|
|
304
304
|
"references": {
|
|
305
|
-
"
|
|
305
|
+
"MdsInputEventDetail": {
|
|
306
306
|
"location": "import",
|
|
307
|
-
"path": "@
|
|
308
|
-
"id": "src/
|
|
307
|
+
"path": "@type/input",
|
|
308
|
+
"id": "src/type/input.ts::MdsInputEventDetail"
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
311
|
},
|
|
@@ -356,6 +356,11 @@
|
|
|
356
356
|
"docstring": "",
|
|
357
357
|
"path": "src/components/mds-accordion-item/meta/event-detail.ts"
|
|
358
358
|
},
|
|
359
|
+
"src/components/mds-accordion-timer/meta/event-detail.ts::MdsAccordionTimerEventDetail": {
|
|
360
|
+
"declaration": "export interface MdsAccordionTimerEventDetail {\n index: number;\n}",
|
|
361
|
+
"docstring": "",
|
|
362
|
+
"path": "src/components/mds-accordion-timer/meta/event-detail.ts"
|
|
363
|
+
},
|
|
359
364
|
"src/components/mds-accordion-timer-item/meta/event-detail.ts::MdsAccordionTimerItemEventDetail": {
|
|
360
365
|
"declaration": "export interface MdsAccordionTimerItemEventDetail {\n selected: boolean;\n uuid: number;\n}",
|
|
361
366
|
"docstring": "",
|
|
@@ -442,7 +447,7 @@
|
|
|
442
447
|
"path": "src/type/button.ts"
|
|
443
448
|
},
|
|
444
449
|
"src/type/button.ts::ButtonVariantType": {
|
|
445
|
-
"declaration": "export type ButtonVariantType =\n | 'primary'\n | 'dark'\n | 'light'\n | 'error'\n | 'info'\n | 'success'\n | 'warning'",
|
|
450
|
+
"declaration": "export type ButtonVariantType =\n | 'primary'\n | 'secondary'\n | 'dark'\n | 'light'\n | 'error'\n | 'info'\n | 'success'\n | 'warning'",
|
|
446
451
|
"docstring": "",
|
|
447
452
|
"path": "src/type/button.ts"
|
|
448
453
|
},
|
|
@@ -456,6 +461,11 @@
|
|
|
456
461
|
"docstring": "",
|
|
457
462
|
"path": "src/type/button.ts"
|
|
458
463
|
},
|
|
464
|
+
"src/type/variant.ts::ChipVariantType": {
|
|
465
|
+
"declaration": "export type ChipVariantType =\n | 'primary'\n | 'secondary'\n | 'dark'\n | 'error'\n | 'info'\n | 'success'\n | 'warning'",
|
|
466
|
+
"docstring": "",
|
|
467
|
+
"path": "src/type/variant.ts"
|
|
468
|
+
},
|
|
459
469
|
"src/components/mds-chip/meta/interface.ts::MdsChipEvent": {
|
|
460
470
|
"declaration": "interface MdsChipEvent {\n event: Event\n element: HTMLMdsChipElement\n}",
|
|
461
471
|
"docstring": "",
|
|
@@ -497,7 +507,7 @@
|
|
|
497
507
|
"path": "src/type/text.ts"
|
|
498
508
|
},
|
|
499
509
|
"src/components/mds-file-preview/meta/event-detail.ts::MdsFilePreviewEventDetail": {
|
|
500
|
-
"declaration": "export interface MdsFilePreviewEventDetail {\n extension: string\n filename: string\n target:
|
|
510
|
+
"declaration": "export interface MdsFilePreviewEventDetail {\n extension: string\n filename: string\n target: HTMLMdsFilePreviewElement\n}",
|
|
501
511
|
"docstring": "",
|
|
502
512
|
"path": "src/components/mds-file-preview/meta/event-detail.ts"
|
|
503
513
|
},
|
|
@@ -511,10 +521,15 @@
|
|
|
511
521
|
"docstring": "",
|
|
512
522
|
"path": "src/components/mds-filter-item/meta/event-detail.ts"
|
|
513
523
|
},
|
|
514
|
-
"src/
|
|
515
|
-
"declaration": "export type
|
|
524
|
+
"src/type/header-bar.ts::HeaderBarMenuType": {
|
|
525
|
+
"declaration": "export type HeaderBarMenuType =\n | 'all'\n | 'desktop'\n | 'mobile'\n | 'none'",
|
|
526
|
+
"docstring": "",
|
|
527
|
+
"path": "src/type/header-bar.ts"
|
|
528
|
+
},
|
|
529
|
+
"src/type/header-bar.ts::HeaderBarNavType": {
|
|
530
|
+
"declaration": "export type HeaderBarNavType =\n | 'all'\n | 'desktop'\n | 'mobile'\n | 'none'",
|
|
516
531
|
"docstring": "",
|
|
517
|
-
"path": "src/
|
|
532
|
+
"path": "src/type/header-bar.ts"
|
|
518
533
|
},
|
|
519
534
|
"src/components/mds-header/meta/event-detail.ts::MdsHeaderEventDetail": {
|
|
520
535
|
"declaration": "export interface MdsHeaderEventDetail {\n bar: HTMLMdsHeaderBarElement\n}",
|
|
@@ -552,7 +567,7 @@
|
|
|
552
567
|
"path": "src/components/mds-img/meta/event-detail.ts"
|
|
553
568
|
},
|
|
554
569
|
"src/type/autocomplete.ts::AutocompleteType": {
|
|
555
|
-
"declaration": "export type AutocompleteType =\n | 'additional-name'\n | 'address'\n | 'address-level1'\n | 'address-level2'\n | 'address-level3'\n | 'address-level4'\n | 'address-line1'\n | 'address-line2'\n | 'address-line3'\n | 'bday'\n | 'bday-day'\n | 'bday-month'\n | 'bday-year'\n | 'cc-additional-name'\n | 'cc-csc'\n | 'cc-exp'\n | 'cc-exp-month'\n | 'cc-exp-year'\n | 'cc-family-name'\n | 'cc-
|
|
570
|
+
"declaration": "export type AutocompleteType =\n | 'additional-name'\n | 'address'\n | 'address-level1'\n | 'address-level2'\n | 'address-level3'\n | 'address-level4'\n | 'address-line1'\n | 'address-line2'\n | 'address-line3'\n | 'bday'\n | 'bday-day'\n | 'bday-month'\n | 'bday-year'\n | 'cc-additional-name'\n | 'cc-csc'\n | 'cc-exp'\n | 'cc-exp-month'\n | 'cc-exp-year'\n | 'cc-family-name'\n | 'cc-given-name'\n | 'cc-name'\n | 'cc-number'\n | 'cc-type'\n | 'country'\n | 'country-name'\n | 'current-password'\n | 'email'\n | 'family-name'\n | 'given-name'\n | 'honorific-prefix'\n | 'honorific-suffix'\n | 'impp'\n | 'language'\n | 'name'\n | 'new-password'\n | 'nickname'\n | 'off'\n | 'on'\n | 'one-time-code'\n | 'organization'\n | 'organization-title'\n | 'photo'\n | 'postal-code'\n | 'sex'\n | 'street-address'\n | 'tel'\n | 'tel-area-code'\n | 'tel-country-code'\n | 'tel-extension'\n | 'tel-local'\n | 'tel-national'\n | 'transaction-amount'\n | 'transaction-currency'\n | 'url'\n | 'username'",
|
|
556
571
|
"docstring": "",
|
|
557
572
|
"path": "src/type/autocomplete.ts"
|
|
558
573
|
},
|
|
@@ -581,10 +596,10 @@
|
|
|
581
596
|
"docstring": "",
|
|
582
597
|
"path": "src/type/typography.ts"
|
|
583
598
|
},
|
|
584
|
-
"src/
|
|
585
|
-
"declaration": "export interface MdsInputEventDetail {\n value?: string\n}",
|
|
599
|
+
"src/type/input.ts::MdsInputEventDetail": {
|
|
600
|
+
"declaration": "export interface MdsInputEventDetail {\n value?: File | string | FormData | null\n}",
|
|
586
601
|
"docstring": "",
|
|
587
|
-
"path": "src/
|
|
602
|
+
"path": "src/type/input.ts"
|
|
588
603
|
},
|
|
589
604
|
"src/components/mds-input-field/meta/types.ts::InputFieldType": {
|
|
590
605
|
"declaration": "export type InputFieldType =\n | 'date'\n | 'email'\n | 'number'\n | 'password'\n | 'search'\n | 'tel'\n | 'text'\n | 'textarea'\n | 'time'\n | 'url'\n | 'cc'\n | 'cf'\n | 'isbn'\n | 'piva'",
|
|
@@ -601,11 +616,6 @@
|
|
|
601
616
|
"docstring": "",
|
|
602
617
|
"path": "src/components/mds-input-field/meta/validators.ts"
|
|
603
618
|
},
|
|
604
|
-
"src/interface/input-value.ts::InputValue": {
|
|
605
|
-
"declaration": "export interface InputValue {\n value: InputValueType\n}",
|
|
606
|
-
"docstring": "",
|
|
607
|
-
"path": "src/interface/input-value.ts"
|
|
608
|
-
},
|
|
609
619
|
"src/components/mds-input-switch/meta/types.ts::InputSwitchSizeType": {
|
|
610
620
|
"declaration": "export type InputSwitchSizeType =\n | 'sm'\n | 'md'\n | 'lg'",
|
|
611
621
|
"docstring": "",
|
|
@@ -652,7 +662,12 @@
|
|
|
652
662
|
"path": "src/type/typography.ts"
|
|
653
663
|
},
|
|
654
664
|
"src/components/mds-modal/meta/types.ts::ModalPositionType": {
|
|
655
|
-
"declaration": "export type ModalPositionType =\n | 'bottom'\n | 'center'\n | 'left'\n | 'right'\n | 'top'",
|
|
665
|
+
"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'",
|
|
666
|
+
"docstring": "",
|
|
667
|
+
"path": "src/components/mds-modal/meta/types.ts"
|
|
668
|
+
},
|
|
669
|
+
"src/components/mds-modal/meta/types.ts::ModalAnimationStateType": {
|
|
670
|
+
"declaration": "export type ModalAnimationStateType =\n | 'intro'\n | 'none'\n | 'outro'",
|
|
656
671
|
"docstring": "",
|
|
657
672
|
"path": "src/components/mds-modal/meta/types.ts"
|
|
658
673
|
},
|
|
@@ -691,21 +706,11 @@
|
|
|
691
706
|
"docstring": "",
|
|
692
707
|
"path": "src/components/mds-pref-contrast/meta/types.ts"
|
|
693
708
|
},
|
|
694
|
-
"src/type/language.ts::PrefLanguageType": {
|
|
695
|
-
"declaration": "export type PrefLanguageType =\n | 'auto'\n | `${Lowercase<string>}${Lowercase<string>}`\n | `${Lowercase<string>}${Lowercase<string>}${Lowercase<string>}`",
|
|
696
|
-
"docstring": "",
|
|
697
|
-
"path": "src/type/language.ts"
|
|
698
|
-
},
|
|
699
709
|
"src/event-detail/language.ts::MdsPrefLanguageEventDetail": {
|
|
700
|
-
"declaration": "export interface MdsPrefLanguageEventDetail {\n language?:
|
|
710
|
+
"declaration": "export interface MdsPrefLanguageEventDetail {\n /* A string representing the language version as defined in {@link https://datatracker.ietf.org/doc/html/rfc5646 RFC 5646: Tags for Identifying Languages (also known as BCP 47)}.\n *\n * `Examples of valid language codes include \"en\", \"en-US\", \"fr\", \"fr-FR\", \"es-ES\", etc.`\n */\n language?: string\n}",
|
|
701
711
|
"docstring": "",
|
|
702
712
|
"path": "src/event-detail/language.ts"
|
|
703
713
|
},
|
|
704
|
-
"src/type/language.ts::LanguageType": {
|
|
705
|
-
"declaration": "export type LanguageType =\n | `${Lowercase<string>}${Lowercase<string>}`\n | `${Lowercase<string>}${Lowercase<string>}${Lowercase<string>}`",
|
|
706
|
-
"docstring": "",
|
|
707
|
-
"path": "src/type/language.ts"
|
|
708
|
-
},
|
|
709
714
|
"src/components/mds-pref-theme/meta/types.ts::ThemeModeType": {
|
|
710
715
|
"declaration": "export type ThemeModeType =\n | 'light'\n | 'dark'\n | 'system'",
|
|
711
716
|
"docstring": "",
|
|
@@ -746,6 +751,11 @@
|
|
|
746
751
|
"docstring": "",
|
|
747
752
|
"path": "src/components/mds-push-notification/meta/event-detail.ts"
|
|
748
753
|
},
|
|
754
|
+
"src/type/text.ts::TypographyHeadingTagType": {
|
|
755
|
+
"declaration": "export type TypographyHeadingTagType =\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'",
|
|
756
|
+
"docstring": "",
|
|
757
|
+
"path": "src/type/text.ts"
|
|
758
|
+
},
|
|
749
759
|
"src/components/mds-stepper-bar/meta/event-detail.ts::MdsStepperBarEventDetail": {
|
|
750
760
|
"declaration": "export interface MdsStepperBarEventDetail {\n step: number\n value: string\n}",
|
|
751
761
|
"docstring": "",
|
|
@@ -776,15 +786,20 @@
|
|
|
776
786
|
"docstring": "",
|
|
777
787
|
"path": "src/components/mds-tab-item/meta/event-detail.ts"
|
|
778
788
|
},
|
|
789
|
+
"src/components/mds-table-header-cell/meta/types.ts::SortDirectionType": {
|
|
790
|
+
"declaration": "export type SortDirectionType =\n | 'ascending'\n | 'descending'\n | 'none'",
|
|
791
|
+
"docstring": "",
|
|
792
|
+
"path": "src/components/mds-table-header-cell/meta/types.ts"
|
|
793
|
+
},
|
|
779
794
|
"src/components/mds-text/meta/types.ts::TextAnimationType": {
|
|
780
795
|
"declaration": "export type TextAnimationType =\n | 'none'\n | 'yugop'",
|
|
781
796
|
"docstring": "",
|
|
782
797
|
"path": "src/components/mds-text/meta/types.ts"
|
|
783
798
|
},
|
|
784
|
-
"src/
|
|
799
|
+
"src/type/text.ts::TypographyTagType": {
|
|
785
800
|
"declaration": "export type TypographyTagType =\n | 'abbr'\n | 'address'\n | 'article'\n | 'b'\n | 'bdo'\n | 'blockquote'\n | 'cite'\n | 'code'\n | 'dd'\n | 'del'\n | 'details'\n | 'dfn'\n | 'div'\n | 'dl'\n | 'dt'\n | 'em'\n | 'figcaption'\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'\n | 'i'\n | 'ins'\n | 'kbd'\n | 'label'\n | 'legend'\n | 'li'\n | 'mark'\n | 'ol'\n | 'p'\n | 'pre'\n | 'q'\n | 'rb'\n | 'rt'\n | 'ruby'\n | 's'\n | 'samp'\n | 'small'\n | 'span'\n | 'strong'\n | 'sub'\n | 'summary'\n | 'sup'\n | 'time'\n | 'u'\n | 'ul'\n | 'var'",
|
|
786
801
|
"docstring": "",
|
|
787
|
-
"path": "src/
|
|
802
|
+
"path": "src/type/text.ts"
|
|
788
803
|
},
|
|
789
804
|
"src/type/variant.ts::ThemeLuminanceVariantType": {
|
|
790
805
|
"declaration": "export type ThemeLuminanceVariantType =\n | 'dark'\n | 'light'",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maggioli-design-system/mds-input-select",
|
|
3
|
-
"version": "
|
|
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
|
|
3
|
+
"version": "3.0.1",
|
|
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",
|
|
7
7
|
"es2015": "dist/esm/index.mjs",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"test": "stencil test --spec --e2e"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@maggioli-design-system/styles": "15.
|
|
28
|
-
"@maggioli-design-system/mds-input-tip": "1.
|
|
29
|
-
"@stencil/core": "4.
|
|
27
|
+
"@maggioli-design-system/styles": "15.5.0",
|
|
28
|
+
"@maggioli-design-system/mds-input-tip": "1.2.2",
|
|
29
|
+
"@stencil/core": "4.22.2",
|
|
30
30
|
"clsx": "2.1.0"
|
|
31
31
|
},
|
|
32
32
|
"license": "MIT",
|
package/readme.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
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
|
|
5
|
+
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.
|
|
6
6
|
|
|
7
7
|
<!-- Auto Generated Below -->
|
|
8
8
|
|
|
@@ -25,9 +25,9 @@ This is a web-component from Maggioli Design System [Magma](https://magma.maggio
|
|
|
25
25
|
|
|
26
26
|
## Events
|
|
27
27
|
|
|
28
|
-
| Event | Description | Type
|
|
29
|
-
| ---------------------- | --------------------------------------------------------------------------- |
|
|
30
|
-
| `mdsInputSelectChange` | Emits an InputChangeEventDetail when the value of the input element changes | `CustomEvent<
|
|
28
|
+
| Event | Description | Type |
|
|
29
|
+
| ---------------------- | --------------------------------------------------------------------------- | ---------------------------------- |
|
|
30
|
+
| `mdsInputSelectChange` | Emits an InputChangeEventDetail when the value of the input element changes | `CustomEvent<MdsInputEventDetail>` |
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
## Shadow Parts
|
package/src/common/aria.ts
CHANGED
|
@@ -20,6 +20,24 @@ const setAttributeIfEmpty = (element: HTMLElement, attribute: string, value: str
|
|
|
20
20
|
return value
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
const removeAttributesIf = (element: HTMLElement, attribute: string, valueCheck: string = 'true', cleanAttributes: string | string[]): boolean => {
|
|
24
|
+
if (ifAttribute(element, attribute, valueCheck)) {
|
|
25
|
+
const attributesList = Array.isArray(cleanAttributes) ? cleanAttributes : [cleanAttributes]
|
|
26
|
+
attributesList.forEach(attributeToRemove => {
|
|
27
|
+
element.removeAttribute(attributeToRemove)
|
|
28
|
+
})
|
|
29
|
+
return true
|
|
30
|
+
}
|
|
31
|
+
return false
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const ifAttribute = (element: HTMLElement, attribute: string, valueCheck: string = 'true'): boolean => {
|
|
35
|
+
if (element.hasAttribute(attribute) && element.getAttribute(attribute) === valueCheck) {
|
|
36
|
+
return true
|
|
37
|
+
}
|
|
38
|
+
return false
|
|
39
|
+
}
|
|
40
|
+
|
|
23
41
|
const hashValue = (value: string): string => `${value}-${hash(value)}`
|
|
24
42
|
|
|
25
43
|
const hashRandomValue = (value?: string): string => {
|
|
@@ -32,8 +50,10 @@ const hashRandomValue = (value?: string): string => {
|
|
|
32
50
|
}
|
|
33
51
|
|
|
34
52
|
export {
|
|
35
|
-
unslugName,
|
|
36
|
-
setAttributeIfEmpty,
|
|
37
53
|
hashRandomValue,
|
|
38
54
|
hashValue,
|
|
55
|
+
removeAttributesIf,
|
|
56
|
+
setAttributeIfEmpty,
|
|
57
|
+
ifAttribute,
|
|
58
|
+
unslugName,
|
|
39
59
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const isMobileDevice = (): boolean => {
|
|
2
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3
|
+
const userAgent = navigator.userAgent || navigator.vendor || (window as any).opera
|
|
4
|
+
return /android|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(userAgent)
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
isMobileDevice,
|
|
9
|
+
}
|
package/src/common/file.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { fileExtensionsDictionary, ExtensionInfo } from '@dictionary/file-extensions'
|
|
2
2
|
import { fileFormatsVariant } from '@type/variant-file-format'
|
|
3
|
+
import { ThemeFullVariantType } from '@type/variant'
|
|
3
4
|
|
|
4
5
|
interface FileFormatsVariants {
|
|
5
|
-
color: string
|
|
6
6
|
icon: string
|
|
7
|
-
|
|
8
|
-
variant: string
|
|
7
|
+
variant: ThemeFullVariantType
|
|
9
8
|
}
|
|
10
9
|
|
|
11
10
|
const sanitizeFilename = (filename: string, error: string = 'Attribute "filename" is undefined.') => {
|
|
@@ -36,14 +36,14 @@ export class KeyboardManager {
|
|
|
36
36
|
|
|
37
37
|
attachEscapeBehavior = (callback: () => void): void => {
|
|
38
38
|
this.escapeCallback = callback
|
|
39
|
-
if (window !== undefined) {
|
|
39
|
+
if (typeof window !== 'undefined') {
|
|
40
40
|
window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this))
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
detachEscapeBehavior = (): void => {
|
|
45
45
|
this.escapeCallback = () => { return }
|
|
46
|
-
if (window !== undefined) {
|
|
46
|
+
if (typeof window !== 'undefined') {
|
|
47
47
|
window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this))
|
|
48
48
|
}
|
|
49
49
|
}
|
package/src/common/locale.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { render } from 'mustache'
|
|
2
2
|
|
|
3
3
|
type LocaleConfig = {
|
|
4
4
|
el?: Record<string, string | string[]>
|
|
@@ -12,6 +12,7 @@ export class Locale {
|
|
|
12
12
|
language: string
|
|
13
13
|
config: LocaleConfig
|
|
14
14
|
closestElement:HTMLElement
|
|
15
|
+
element: HTMLElement
|
|
15
16
|
|
|
16
17
|
constructor (configData?: LocaleConfig) {
|
|
17
18
|
if (configData) {
|
|
@@ -23,8 +24,9 @@ export class Locale {
|
|
|
23
24
|
this.config = configData
|
|
24
25
|
}
|
|
25
26
|
|
|
26
|
-
lang = (
|
|
27
|
-
this.
|
|
27
|
+
lang = (el: HTMLElement): string => {
|
|
28
|
+
this.element = el
|
|
29
|
+
this.closestElement = this.element.closest('[lang]') as HTMLElement
|
|
28
30
|
|
|
29
31
|
if (this.closestElement) {
|
|
30
32
|
if (this.closestElement.lang) {
|
|
@@ -37,11 +39,24 @@ export class Locale {
|
|
|
37
39
|
return this.language
|
|
38
40
|
}
|
|
39
41
|
|
|
42
|
+
update = (doc?: Document | ShadowRoot): void => {
|
|
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()
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
}
|
|
54
|
+
|
|
40
55
|
private pluralize = (tag: string | string[], context: Record<string, string | number>): string => {
|
|
41
56
|
|
|
42
57
|
const languagePhrase: string | string[] = this.config[this.language] ? this.config[this.language][tag] : this.config[this.rollbackLanguage][tag]
|
|
43
58
|
const phrases: string[] = []
|
|
44
|
-
|
|
59
|
+
|
|
45
60
|
if (Array.isArray(languagePhrase)) {
|
|
46
61
|
phrases.push(languagePhrase[0])
|
|
47
62
|
phrases.push(languagePhrase[1])
|
|
@@ -63,8 +78,7 @@ export class Locale {
|
|
|
63
78
|
}
|
|
64
79
|
}
|
|
65
80
|
|
|
66
|
-
|
|
67
|
-
return template(context)
|
|
81
|
+
return render(translatePhrase, context)
|
|
68
82
|
}
|
|
69
83
|
|
|
70
84
|
get = (tag: string | string[], context?: Record<string, string | number>): string => {
|
package/src/common/unit.ts
CHANGED
|
@@ -2,24 +2,19 @@
|
|
|
2
2
|
variables:
|
|
3
3
|
COMPONENT: mds-input-select
|
|
4
4
|
|
|
5
|
-
# ISOLATE
|
|
6
|
-
input-select-isolate:
|
|
7
|
-
extends: [.base-isolate, .base-input-select]
|
|
8
|
-
dependencies: [base-stencil-build]
|
|
9
|
-
|
|
10
5
|
# TEST
|
|
11
6
|
input-select-publish-test:
|
|
12
7
|
extends: [.base-stencil-publish-test, .base-input-select]
|
|
13
|
-
dependencies: [base-stencil-build,
|
|
8
|
+
dependencies: [base-stencil-build, base-isolate]
|
|
14
9
|
|
|
15
10
|
# PUBLISH
|
|
16
11
|
input-select-publish:
|
|
17
12
|
extends: [.base-stencil-publish, .base-input-select]
|
|
18
|
-
dependencies: [base-stencil-build,
|
|
19
|
-
needs: [base-stencil-build,
|
|
13
|
+
dependencies: [base-stencil-build, base-isolate]
|
|
14
|
+
needs: [base-stencil-build, base-isolate, input-select-publish-test]
|
|
20
15
|
|
|
21
16
|
# INSTALL TEST
|
|
22
17
|
input-select-install-test:
|
|
23
18
|
extends: [.base-stencil-install-test, .base-input-select]
|
|
24
|
-
dependencies: [base-stencil-build,
|
|
25
|
-
needs: [base-stencil-build,
|
|
19
|
+
dependencies: [base-stencil-build, base-isolate]
|
|
20
|
+
needs: [base-stencil-build, base-isolate, input-select-publish]
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
--mds-input-select-ring: theme('boxShadow.outline-50');
|
|
7
7
|
--mds-input-select-arrow-icon-background-color: var(--mds-input-select-arrow-icon-blur-background-color);
|
|
8
|
-
--mds-input-select-arrow-icon-blur-background-color: theme('colors.
|
|
8
|
+
--mds-input-select-arrow-icon-blur-background-color: theme('colors.variant-primary-05');
|
|
9
9
|
--mds-input-select-arrow-icon-blur-color: rgb(var(--mds-input-select-variant-color));
|
|
10
10
|
--mds-input-select-arrow-icon-color: var(--mds-input-select-arrow-icon-blur-color);
|
|
11
11
|
--mds-input-select-arrow-icon-hover-background-color: rgb(var(--mds-input-select-variant-color));
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
--mds-input-select-ring: theme('boxShadow.outline-50');
|
|
26
26
|
--mds-input-select-arrow-icon-background-color: var(--mds-input-select-arrow-icon-blur-background-color);
|
|
27
|
-
--mds-input-select-arrow-icon-blur-background-color: theme('colors.
|
|
27
|
+
--mds-input-select-arrow-icon-blur-background-color: theme('colors.variant-primary-05');
|
|
28
28
|
--mds-input-select-arrow-icon-blur-color: rgb(var(--mds-input-select-variant-color));
|
|
29
29
|
--mds-input-select-arrow-icon-color: var(--mds-input-select-arrow-icon-blur-color);
|
|
30
30
|
--mds-input-select-arrow-icon-hover-background-color: rgb(var(--mds-input-select-variant-color));
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
:host {
|
|
4
4
|
|
|
5
|
-
--mds-input-select-icon-color: var(--
|
|
5
|
+
--mds-input-select-icon-color: var(--variant-primary-03);
|
|
6
6
|
--mds-input-select-variant-color: 0 0 0;
|
|
7
|
-
--mds-input-select-arrow-icon-blur-background-color: rgb(var(--
|
|
8
|
-
--mds-input-select-arrow-icon-hover-background-color: rgb(var(--
|
|
9
|
-
--mds-input-select-arrow-icon-blur-color: rgb(var(--
|
|
10
|
-
--mds-input-select-arrow-icon-hover-color: rgb(var(--
|
|
7
|
+
--mds-input-select-arrow-icon-blur-background-color: rgb(var(--variant-primary-09));
|
|
8
|
+
--mds-input-select-arrow-icon-hover-background-color: rgb(var(--variant-primary-08));
|
|
9
|
+
--mds-input-select-arrow-icon-blur-color: rgb(var(--variant-primary-06));
|
|
10
|
+
--mds-input-select-arrow-icon-hover-color: rgb(var(--variant-primary-04));
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
:host( :hover ),
|
|
14
14
|
:host( :focus-within ) {
|
|
15
15
|
|
|
16
|
-
--mds-input-select-variant-color: var(--
|
|
16
|
+
--mds-input-select-variant-color: var(--variant-primary-04);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
:host( [variant="info"] ) {
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
@import '~@maggioli-design-system/styles/dist/tailwind/typography.css';
|
|
2
2
|
@import '../../tailwind/components.css';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
@tailwind base;
|
|
6
3
|
@tailwind components;
|
|
7
4
|
@tailwind utilities;
|
|
8
5
|
|
|
@@ -26,14 +23,14 @@
|
|
|
26
23
|
user-select: none;
|
|
27
24
|
}
|
|
28
25
|
|
|
29
|
-
:host(
|
|
30
|
-
|
|
26
|
+
:host([required]:not([required="false"]):focus-within) .icon {
|
|
27
|
+
transform: translate(theme('spacing.150'), theme('spacing.150'));
|
|
31
28
|
}
|
|
32
29
|
|
|
33
|
-
:host(
|
|
34
|
-
:host(
|
|
30
|
+
:host(:hover),
|
|
31
|
+
:host(:focus-within) {
|
|
35
32
|
|
|
36
|
-
--mds-input-select-variant-color: var(--
|
|
33
|
+
--mds-input-select-variant-color: var(--variant-primary-03);
|
|
37
34
|
--mds-input-select-ring: 0 0 0 3px rgb(var(--mds-input-select-variant-color) / 1);
|
|
38
35
|
--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);
|
|
39
36
|
--mds-input-select-arrow-icon-background-color: var(--mds-input-select-arrow-icon-hover-background-color);
|
|
@@ -51,7 +48,6 @@
|
|
|
51
48
|
py-300
|
|
52
49
|
rounded-lg
|
|
53
50
|
text-info-detail
|
|
54
|
-
transition-cosmetic
|
|
55
51
|
w-full;
|
|
56
52
|
|
|
57
53
|
appearance: none;
|
|
@@ -63,6 +59,7 @@
|
|
|
63
59
|
cursor: pointer;
|
|
64
60
|
overflow: hidden;
|
|
65
61
|
text-overflow: ellipsis;
|
|
62
|
+
transition-property: background-color, border-color, box-shadow, color, fill;
|
|
66
63
|
}
|
|
67
64
|
|
|
68
65
|
.input:hover,
|
|
@@ -70,8 +67,7 @@
|
|
|
70
67
|
@apply
|
|
71
68
|
duration-300
|
|
72
69
|
ease-out-expo
|
|
73
|
-
outline-none
|
|
74
|
-
transition-cosmetic;
|
|
70
|
+
outline-none;
|
|
75
71
|
|
|
76
72
|
color: theme('colors.tone-neutral-03');
|
|
77
73
|
}
|
|
@@ -98,9 +94,8 @@
|
|
|
98
94
|
}
|
|
99
95
|
|
|
100
96
|
:host([disabled]:not([disabled="false"])) .icon {
|
|
101
|
-
@apply translate-y-200 translate-x-250;
|
|
102
|
-
|
|
103
97
|
fill: theme('colors.tone-neutral-06');
|
|
98
|
+
transform: translate(theme('spacing.250'), theme('spacing.200'));
|
|
104
99
|
}
|
|
105
100
|
|
|
106
101
|
.icon-container {
|
|
@@ -119,10 +114,11 @@
|
|
|
119
114
|
@apply
|
|
120
115
|
duration-200
|
|
121
116
|
rounded-full
|
|
122
|
-
|
|
117
|
+
svg;
|
|
123
118
|
|
|
124
|
-
background-color: var(--mds-input-select-arrow-icon-background-color, theme('colors.
|
|
125
|
-
fill: var(--mds-input-select-arrow-icon-color, theme('colors.
|
|
119
|
+
background-color: var(--mds-input-select-arrow-icon-background-color, theme('colors.variant-primary-09'));
|
|
120
|
+
fill: var(--mds-input-select-arrow-icon-color, theme('colors.variant-primary-04'));
|
|
121
|
+
transition-property: background-color, fill;
|
|
126
122
|
}
|
|
127
123
|
|
|
128
124
|
.option-container {
|
|
@@ -143,7 +139,7 @@
|
|
|
143
139
|
|
|
144
140
|
:host {
|
|
145
141
|
|
|
146
|
-
--mds-input-select-background: theme('colors.
|
|
142
|
+
--mds-input-select-background: theme('colors.variant-primary-07');
|
|
147
143
|
}
|
|
148
144
|
}
|
|
149
145
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import clsx from 'clsx'
|
|
2
2
|
import miBaselineKeyboardArrowDown from '@icon/mi/baseline/keyboard-arrow-down.svg'
|
|
3
3
|
import { AttachInternals, Component, Element, Event, EventEmitter, Host, Prop, h, State, Watch } from '@stencil/core'
|
|
4
|
-
import {
|
|
4
|
+
import { MdsInputEventDetail } from '@type/input'
|
|
5
5
|
import { ThemeStatusVariantType } from '@type/variant'
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -74,7 +74,7 @@ export class MdsInputSelect {
|
|
|
74
74
|
/**
|
|
75
75
|
* Emits an InputChangeEventDetail when the value of the input element changes
|
|
76
76
|
*/
|
|
77
|
-
@Event({ eventName: 'mdsInputSelectChange' }) changeEvent: EventEmitter<
|
|
77
|
+
@Event({ eventName: 'mdsInputSelectChange' }) changeEvent: EventEmitter<MdsInputEventDetail>
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
80
|
* Emits the change event when the component value changes
|
|
@@ -82,15 +82,15 @@ export class MdsInputSelect {
|
|
|
82
82
|
@Watch('value')
|
|
83
83
|
protected valueChanged ():void {
|
|
84
84
|
this.selected = this.value !== ''
|
|
85
|
-
this.changeEvent.emit({ value: this.value })
|
|
86
|
-
this.internals.setFormValue(
|
|
85
|
+
this.changeEvent.emit({ value: this.value?.toString() })
|
|
86
|
+
this.internals.setFormValue(this.value?.toString() ?? null)
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
componentDidLoad (): void {
|
|
90
90
|
if (this.value) {
|
|
91
91
|
this.selected = true
|
|
92
92
|
|
|
93
|
-
this.internals.setFormValue(this.value
|
|
93
|
+
this.internals.setFormValue(this.value.toString())
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
|
|
@@ -180,7 +180,7 @@ export class MdsInputSelect {
|
|
|
180
180
|
{ this.placeholder && <option value="" disabled selected>{ this.placeholder }</option> }
|
|
181
181
|
</select>
|
|
182
182
|
<div class="icon-container">
|
|
183
|
-
<i class="
|
|
183
|
+
<i class="icon" innerHTML={miBaselineKeyboardArrowDown} />
|
|
184
184
|
</div>
|
|
185
185
|
<div class="option-container">
|
|
186
186
|
<slot onSlotchange={this.onSlotChangeHandler}></slot>
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
|
|
24
24
|
## Events
|
|
25
25
|
|
|
26
|
-
| Event | Description | Type
|
|
27
|
-
| ---------------------- | --------------------------------------------------------------------------- |
|
|
28
|
-
| `mdsInputSelectChange` | Emits an InputChangeEventDetail when the value of the input element changes | `CustomEvent<
|
|
26
|
+
| Event | Description | Type |
|
|
27
|
+
| ---------------------- | --------------------------------------------------------------------------- | ---------------------------------- |
|
|
28
|
+
| `mdsInputSelectChange` | Emits an InputChangeEventDetail when the value of the input element changes | `CustomEvent<MdsInputEventDetail>` |
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
## Shadow Parts
|