@italia/input 1.0.0-alpha.4 → 1.0.0-alpha.5
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/custom-elements.json +70 -1
- package/dist/src/it-input.js +505 -495
- package/dist/src/it-input.js.map +1 -1
- package/package.json +6 -6
- package/styles/globals.scss +4 -7
package/custom-elements.json
CHANGED
|
@@ -469,7 +469,7 @@
|
|
|
469
469
|
{
|
|
470
470
|
"kind": "variable",
|
|
471
471
|
"name": "meta",
|
|
472
|
-
"default": "{ title: 'Componenti/Form/Input Calendario', tags: ['a11y-ok', 'web-component'], component: 'it-input', args: { id: '', label: 'Datepicker', type: 'date', name: 'inputDate', value: undefined, disabled: false, customValidation: false, validityMessage: '', min: undefined, max: undefined, step: undefined, required: false, readonly: false, plaintext: false, placeholder: '', supportText: '', size: undefined, }, argTypes: { label: { control: 'text', description: 'Etichetta del campo', }, type: { control: 'select', options: ['date'], fixed: true, table: { defaultValue: { summary: 'date' } }, }, name: { control: 'text', }, value: { control: 'text', description: 'Valore del campo (nel formato YYYY-MM-DD)', type: 'string', }, disabled: { control: 'boolean', type: 'boolean', table: { defaultValue: { summary: 'false' } }, }, customValidation: { name: 'custom-validation', control: 'boolean', type: 'boolean', table: { defaultValue: { summary: 'false' } }, description: 'Se la validazione del campo è fatta esternamente (lato server o con plugin js), impostare questo attributo a `true`.', }, validityMessage: { name: 'validity-message', control: 'text', description: \"Messaggio da mostrare quando il campo è invalido nel caso di validazione esterna (validazione custom). Se impostato a '' (stringa vuota) il campo viene considerato valido.\", }, min: { control: 'text', description: 'Valore minimo consentito (nel formato YYYY-MM-DD)', type: 'string', }, max: { control: 'text', description: 'Valore massimo consentito (nel formato YYYY-MM-DD)', type: 'string', }, step: { control: 'number', description: 'Incremento per ogni step (utilizzato dai pulsanti +/-)', type: 'string', }, required: { control: 'boolean', type: 'boolean', table: { defaultValue: { summary: 'false' } }, }, readonly: { control: 'boolean', type: 'boolean', table: { defaultValue: { summary: 'false' } }, }, plaintext: { control: 'boolean', type: 'boolean', table: { defaultValue: { summary: 'false' } }, description: \"Se il campo è readonly, con l'attributo 'plaintext' il campo assume l'aspetto di testo normalizzato.\", }, placeholder: { control: 'text', description: 'Testo segnaposto', }, supportText: { name: 'support-text', control: 'text', description: 'Testo di supporto', }, size: { control: { type: 'select', labels: { undefined: '(non definito)', sm: 'sm', lg: 'lg' } }, options: INPUT_SIZES, description: \"Dimensione del campo: 'sm' | (non definito) | 'lg' \", table: { defaultValue: { summary: undefined } }, type: 'string', }, }, } satisfies Meta<InputCalendarProps>"
|
|
472
|
+
"default": "{ title: 'Componenti/Form/Input Calendario', tags: ['a11y-ok', 'web-component', 'new'], component: 'it-input', args: { id: '', label: 'Datepicker', type: 'date', name: 'inputDate', value: undefined, disabled: false, customValidation: false, validityMessage: '', min: undefined, max: undefined, step: undefined, required: false, readonly: false, plaintext: false, placeholder: '', supportText: '', size: undefined, }, argTypes: { label: { control: 'text', description: 'Etichetta del campo', }, type: { control: 'select', options: ['date'], fixed: true, table: { defaultValue: { summary: 'date' } }, }, name: { control: 'text', }, value: { control: 'text', description: 'Valore del campo (nel formato YYYY-MM-DD)', type: 'string', }, disabled: { control: 'boolean', type: 'boolean', table: { defaultValue: { summary: 'false' } }, }, customValidation: { name: 'custom-validation', control: 'boolean', type: 'boolean', table: { defaultValue: { summary: 'false' } }, description: 'Se la validazione del campo è fatta esternamente (lato server o con plugin js), impostare questo attributo a `true`.', }, validityMessage: { name: 'validity-message', control: 'text', description: \"Messaggio da mostrare quando il campo è invalido nel caso di validazione esterna (validazione custom). Se impostato a '' (stringa vuota) il campo viene considerato valido.\", }, min: { control: 'text', description: 'Valore minimo consentito (nel formato YYYY-MM-DD)', type: 'string', }, max: { control: 'text', description: 'Valore massimo consentito (nel formato YYYY-MM-DD)', type: 'string', }, step: { control: 'number', description: 'Incremento per ogni step (utilizzato dai pulsanti +/-)', type: 'string', }, required: { control: 'boolean', type: 'boolean', table: { defaultValue: { summary: 'false' } }, }, readonly: { control: 'boolean', type: 'boolean', table: { defaultValue: { summary: 'false' } }, }, plaintext: { control: 'boolean', type: 'boolean', table: { defaultValue: { summary: 'false' } }, description: \"Se il campo è readonly, con l'attributo 'plaintext' il campo assume l'aspetto di testo normalizzato.\", }, placeholder: { control: 'text', description: 'Testo segnaposto', }, supportText: { name: 'support-text', control: 'text', description: 'Testo di supporto', }, size: { control: { type: 'select', labels: { undefined: '(non definito)', sm: 'sm', lg: 'lg' } }, options: INPUT_SIZES, description: \"Dimensione del campo: 'sm' | (non definito) | 'lg' \", table: { defaultValue: { summary: undefined } }, type: 'string', }, }, } satisfies Meta<InputCalendarProps>"
|
|
473
473
|
},
|
|
474
474
|
{
|
|
475
475
|
"kind": "variable",
|
|
@@ -680,6 +680,59 @@
|
|
|
680
680
|
}
|
|
681
681
|
]
|
|
682
682
|
},
|
|
683
|
+
{
|
|
684
|
+
"kind": "javascript-module",
|
|
685
|
+
"path": "stories/it-input-time.stories.ts",
|
|
686
|
+
"declarations": [
|
|
687
|
+
{
|
|
688
|
+
"kind": "variable",
|
|
689
|
+
"name": "meta",
|
|
690
|
+
"default": "{ title: 'Componenti/Form/Input Ora', tags: ['autodocs', 'a11y-ok', 'web-component', 'alpha'], component: 'it-input', args: { id: '', label: 'Input Ora', type: 'time', name: 'timepicker', value: '', disabled: false, customValidation: false, validityMessage: '', min: undefined, max: undefined, step: undefined, required: false, readonly: false, plaintext: false, placeholder: '', supportText: '', size: undefined, }, argTypes: { label: { control: 'text', description: 'Etichetta del campo', }, type: { control: 'select', options: ['time'], fixed: true, table: { defaultValue: { summary: 'time' } }, }, name: { control: 'text', }, value: { control: 'text', description: 'Valore del campo', }, disabled: { control: 'boolean', type: 'boolean', table: { defaultValue: { summary: 'false' } }, }, customValidation: { name: 'custom-validation', control: 'boolean', type: 'boolean', table: { defaultValue: { summary: 'false' } }, description: 'Se la validazione del campo è fatta esternamente (lato server o con plugin js), impostare questo attributo a `true`.', }, validityMessage: { name: 'validity-message', control: 'text', description: \"Messaggio da mostrare quando il campo è invalido nel caso di validazione esterna (validazione custom). Se impostato a '' (stringa vuota) il campo viene considerato valido.\", }, min: { control: 'text', description: 'Valore minimo consentito nel formato HH:MM. Es: 08:00', type: 'string', }, max: { control: 'text', description: 'Valore massimo consentito nel formato HH:MM. Es: 15:30', type: 'string', }, step: { control: 'number', description: 'Incremento per ogni step (utilizzato dai pulsanti +/-), in secondi', type: 'number', }, required: { control: 'boolean', type: 'boolean', table: { defaultValue: { summary: 'false' } }, }, readonly: { control: 'boolean', type: 'boolean', table: { defaultValue: { summary: 'false' } }, }, plaintext: { control: 'boolean', type: 'boolean', table: { defaultValue: { summary: 'false' } }, description: \"Se il campo è `readonly`, con l'attributo 'plaintext' il campo assume l'aspetto di testo normalizzato.\", }, placeholder: { control: 'text', description: 'Testo segnaposto', }, supportText: { name: 'support-text', control: 'text', description: 'Testo di supporto', }, size: { control: { type: 'select', labels: { undefined: '(non definito)', sm: 'sm', lg: 'lg' } }, options: INPUT_SIZES, description: \"Dimensione del campo: 'sm' | (non definito) | 'lg' \", table: { defaultValue: { summary: undefined } }, type: 'string', }, }, } satisfies Meta<InputNumberProps>"
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
"kind": "variable",
|
|
694
|
+
"name": "EsempioInterattivo",
|
|
695
|
+
"type": {
|
|
696
|
+
"text": "Story"
|
|
697
|
+
},
|
|
698
|
+
"default": "{ ...meta, name: 'Esempio interattivo', tags: ['!autodocs', '!dev'], parameters: { docs: { canvas: { sourceState: 'shown', }, }, }, render: (params) => html`${renderTimeInput({ ...params, label: 'Input Ora', name: 'timepicker', id: 'exampleTimepicker', value: '10:00', })}`, }"
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
"kind": "variable",
|
|
702
|
+
"name": "LimitiEStep",
|
|
703
|
+
"type": {
|
|
704
|
+
"text": "Story"
|
|
705
|
+
},
|
|
706
|
+
"default": "{ ...meta, name: 'Limiti e Step', parameters: { docs: { description: { story: ` Aggiungendo gli attributi HTML \\`min=\"\"\\`, \\`max=\"\"\\` o \\`step=\"\"\\` all'input, puoi limitare il valore minimo e massimo del campo e decidere un intervallo orario valido. Questi attributi sono utili solo ai fini della validazione, e non modificano l'interfaccia del selettore. Gli attributi \\`min=\"\"\\`, \\`max=\"\"\\` accettano valori nel formato HH:MM. L'attributo \\`step=\"\"\\` prevede l'inserimento di un intervallo in secondi. `, }, }, }, args: { value: '10:00', min: '09:00', max: '12:00', step: 1800, }, render: (params) => html` ${renderTimeInput({ ...params, label: 'Min, Max & Step', name: 'inputTimeLimits', id: 'inputTimeLimits', })} `, }"
|
|
707
|
+
}
|
|
708
|
+
],
|
|
709
|
+
"exports": [
|
|
710
|
+
{
|
|
711
|
+
"kind": "js",
|
|
712
|
+
"name": "default",
|
|
713
|
+
"declaration": {
|
|
714
|
+
"name": "meta",
|
|
715
|
+
"module": "stories/it-input-time.stories.ts"
|
|
716
|
+
}
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
"kind": "js",
|
|
720
|
+
"name": "EsempioInterattivo",
|
|
721
|
+
"declaration": {
|
|
722
|
+
"name": "EsempioInterattivo",
|
|
723
|
+
"module": "stories/it-input-time.stories.ts"
|
|
724
|
+
}
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
"kind": "js",
|
|
728
|
+
"name": "LimitiEStep",
|
|
729
|
+
"declaration": {
|
|
730
|
+
"name": "LimitiEStep",
|
|
731
|
+
"module": "stories/it-input-time.stories.ts"
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
]
|
|
735
|
+
},
|
|
683
736
|
{
|
|
684
737
|
"kind": "javascript-module",
|
|
685
738
|
"path": "stories/it-input.stories.ts",
|
|
@@ -800,6 +853,14 @@
|
|
|
800
853
|
"text": "Story"
|
|
801
854
|
},
|
|
802
855
|
"default": "{ ...StoryFormControlMethodAndProps({}), tags: ['!dev'] }"
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
"kind": "variable",
|
|
859
|
+
"name": "I18n",
|
|
860
|
+
"type": {
|
|
861
|
+
"text": "Story"
|
|
862
|
+
},
|
|
863
|
+
"default": "{ name: 'i18n', tags: ['!dev'], render: () => html`<div class=\"hide-preview\"></div>`, parameters: { viewMode: 'docs', docs: { description: { story: ` Per questo componente sono disponibili alcune stringhe traducibili tramite l'[utility di internazionalizzazione](/docs/i18n-internazionalizzazione--documentazione). \\`\\`\\`js const translation = ${JSON.stringify(i18nIT, null, 2)} \\`\\`\\` `, }, }, }, }"
|
|
803
864
|
}
|
|
804
865
|
],
|
|
805
866
|
"exports": [
|
|
@@ -922,6 +983,14 @@
|
|
|
922
983
|
"name": "MetodiEPropPubblici",
|
|
923
984
|
"module": "stories/it-input.stories.ts"
|
|
924
985
|
}
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
"kind": "js",
|
|
989
|
+
"name": "I18n",
|
|
990
|
+
"declaration": {
|
|
991
|
+
"name": "I18n",
|
|
992
|
+
"module": "stories/it-input.stories.ts"
|
|
993
|
+
}
|
|
925
994
|
}
|
|
926
995
|
]
|
|
927
996
|
},
|