diff --git a/src/App.vue b/src/App.vue index 3c30836..42b178a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,7 +2,8 @@ // import VButtonView from '../template/VButtonView.vue' // import VButtonGroupView from '../template/VButtonGroupView.vue'; // import VLinkView from '../template/VLinkView.vue'; -import VAccordionView from '../template/VAccordionView.vue'; +// import VAccordionView from '../template/VAccordionView.vue'; +import VInputView from '../template/VInputView.vue'; @@ -10,5 +11,6 @@ import VAccordionView from '../template/VAccordionView.vue'; - + + diff --git a/src/assets/style/primevue-configuration.css b/src/assets/style/primevue-configuration.css index 3736d1a..1ae4ed8 100644 --- a/src/assets/style/primevue-configuration.css +++ b/src/assets/style/primevue-configuration.css @@ -1,2 +1,9 @@ @import './primevue-style/button.css'; @import './primevue-style/accordion.css'; +@import './primevue-style/message.css'; +@import './primevue-style/input.css'; +@import './primevue-style/password.css'; +@import './primevue-style/textarea.css'; +@import './primevue-style/divider.css'; +@import './primevue-style/various.css'; +@import './primevue-style/form.css'; diff --git a/src/assets/style/primevue-style/divider.css b/src/assets/style/primevue-style/divider.css new file mode 100644 index 0000000..ce7305b --- /dev/null +++ b/src/assets/style/primevue-style/divider.css @@ -0,0 +1,11 @@ +:root{ + --p-divider-vertical-margin: 0 1rem; + --p-divider-vertical-padding: 0.5rem 0; + --p-divider-vertical-content-padding: 0.5rem 0; + --p-divider-horizontal-margin: 1rem 0; + --p-divider-horizontal-padding: 0 1rem; + --p-divider-horizontal-content-padding: 0 0.5rem; + --p-divider-content-background: var(--background-default-grey); + --p-divider-content-color: var(--text-label-grey); + --p-divider-border-color: var(--border-default-grey); +} diff --git a/src/assets/style/primevue-style/form.css b/src/assets/style/primevue-style/form.css new file mode 100644 index 0000000..3fc94be --- /dev/null +++ b/src/assets/style/primevue-style/form.css @@ -0,0 +1,27 @@ +:root { + --p-form-field-background: var(--input-background); + --p-form-field-disabled-background: var(--input-disabled-background); + --p-form-field-border-color: var(--input-border-color); + --p-form-field-hover-border-color: var(--input-border-color); + --p-form-field-focus-border-color: var(--input-border-color); + --p-form-field-color: var(--input-color); + --p-form-field-disabled-color: var(--input-disabled-color); + --p-form-field-placeholder-color: var(--input-color); + --p-form-field-icon-color: var(--input-color); + --p-form-field-padding-x: var(--input-padding-x); + --p-form-field-padding-y: var(--input-padding-y); + --p-form-field-border-radius: var(--input-border-raduis); + --p-form-field-transition-duration: var(--transition-duration); + --p-form-field-focus-ring-width: 0; + --p-form-field-focus-ring-style: none; + --p-form-field-focus-ring-color: transparent; + --p-form-field-focus-ring-offset: 0; + --p-form-field-focus-ring-shadow: none; + --p-form-field-lg-font-size: 1.125rem; + --p-form-field-lg-padding-x: 0.875rem; + --p-form-field-lg-padding-y: 0.625rem; + --p-form-field-sm-font-size: 0.875rem; + --p-form-field-sm-padding-x: 0.625rem; + --p-form-field-sm-padding-y: 0.375rem; + --p-form-field-invalid-border-color: var(--border-plain-error); +} diff --git a/src/assets/style/primevue-style/input.css b/src/assets/style/primevue-style/input.css new file mode 100644 index 0000000..fdba0ba --- /dev/null +++ b/src/assets/style/primevue-style/input.css @@ -0,0 +1,18 @@ +:root{ + --p-inputtext-background: var(--input-background); + --p-inputtext-disabled-background: var(--input-disabled-background); + --p-inputtext-border-color: var(--input-border-color); + --p-inputtext-hover-border-color: var(--input-border-color); + --p-inputtext-focus-border-color: var(--input-border-color); + --p-inputtext-color: var(--input-color); + --p-inputtext-disabled-color: var(--input-disabled-color); + --p-inputtext-placeholder-color: var(--input-color); + --p-inputtext-padding-x: var(--input-padding-x); + --p-inputtext-padding-y: var(--input-padding-y); + --p-inputtext-border-radius: var(--input-border-raduis); + --p-inputtext-focus-ring-color: var(--focus-color); + --p-inputtext-focus-ring-width: var(--focus-width); + --p-inputtext-focus-ring-style: var(--focus-style); + --p-inputtext-focus-ring-offset: var(--focus-offset); + --p-inputtext-invalid-border-color: var(--border-plain-error); +} diff --git a/src/assets/style/primevue-style/message.css b/src/assets/style/primevue-style/message.css new file mode 100644 index 0000000..41c98bc --- /dev/null +++ b/src/assets/style/primevue-style/message.css @@ -0,0 +1,87 @@ +:root { + --p-message-simple-content-padding: 0; + --p-message-outlined-border-width: var(--border-width); + --p-message-close-icon-size: 1rem; + --p-message-close-icon-lg-size: 1.125rem; + --p-message-close-icon-sm-size: 0.875rem; + --p-message-close-button-width: 1.75rem; + --p-message-close-button-height: 1.75rem; + --p-message-close-button-border-radius: 0px; + --p-message-close-button-focus-ring-width: var(--focus-width); + --p-message-close-button-focus-ring-style: var(--focus-style); + --p-message-close-button-focus-ring-offset: var(--focus-offset); + --p-message-icon-size: calc(0.125rem + var(--text-body-MD-standard-text-Regular-size)); + --p-message-icon-lg-size: calc(0.125rem + var(--text-body-MD-standard-text-Regular-size)); + --p-message-icon-sm-size: calc(0.125rem + var(--text-body-XS-mention-text-Regular-size)); + --p-message-text-font-size: var(--text-body-MD-standard-text-Regular-size); + --p-message-text-font-weight: var(--text-body-XS-mention-text-Regular-weight); + --p-message-text-lg-font-size: var(--text-body-MD-standard-text-Regular-size); + --p-message-text-sm-font-size: var(--text-body-XS-mention-text-Regular-size); + --p-message-content-padding: 0.5rem 0.75rem; + --p-message-content-gap: 0.5rem; + --p-message-content-lg-padding: 0.625rem 0.875rem; + --p-message-content-sm-padding: 0.375rem 0.625rem; + --p-message-border-radius: 0px; + --p-message-border-width: var(--border-width); + --p-message-transition-duration: var(--transition-duration); + /* --p-message-contrast-background: + --p-message-contrast-border-color: + --p-message-contrast-color: + --p-message-contrast-shadow: */ + --p-message-contrast-simple-color: var(--text-action-high-blue-france); + /* --p-message-contrast-outlined-color: + --p-message-contrast-outlined-border-color: + --p-message-contrast-close-button-hover-background: + --p-message-contrast-close-button-focus-ring-color: + --p-message-contrast-close-button-focus-ring-shadow: */ + --p-message-secondary-background: none; + --p-message-secondary-border-color: none; + --p-message-secondary-color: none; + --p-message-secondary-shadow: none; + --p-message-secondary-simple-color: var(--text-mention-grey); + --p-message-secondary-outlined-color: none; + --p-message-secondary-outlined-border-color: none; + --p-message-secondary-close-button-hover-background: none; + --p-message-secondary-close-button-focus-ring-color: none; + --p-message-secondary-close-button-focus-ring-shadow: none; + --p-message-error-background: color-mix(in srgb,var(--background-contrast-error),transparent 5%); + --p-message-error-border-color: var(--border-plain-error); + --p-message-error-color: var(--text-default-grey); + --p-message-error-shadow: none; + --p-message-error-simple-color: var(--text-default-error); + --p-message-error-outlined-color: none; + --p-message-error-outlined-border-color: none; + --p-message-error-close-button-hover-background: none; + --p-message-error-close-button-focus-ring-color: none; + --p-message-error-close-button-focus-ring-shadow: none; + --p-message-warn-background: color-mix(in srgb,var(--background-contrast-warning),transparent 5%); + --p-message-warn-border-color: var(--border-plain-warning); + --p-message-warn-color: var(--text-default-grey); + --p-message-warn-shadow: none; + --p-message-warn-simple-color: var(--text-default-warning); + --p-message-warn-outlined-color: none; + --p-message-warn-outlined-border-color: none; + --p-message-warn-close-button-hover-background: none; + --p-message-warn-close-button-focus-ring-color: none; + --p-message-warn-close-button-focus-ring-shadow: none; + --p-message-success-background: color-mix(in srgb,var(--background-contrast-success),transparent 5%); + --p-message-success-border-color: var(--border-plain-success); + --p-message-success-color: var(--text-default-grey); + --p-message-success-shadow: none; + --p-message-success-simple-color: var(--text-default-success); + --p-message-success-outlined-color: var(none); + --p-message-success-outlined-border-color: var(none); + --p-message-success-close-button-hover-background: none; + --p-message-success-close-button-focus-ring-color: none; + --p-message-success-close-button-focus-ring-shadow: none; + --p-message-info-background: color-mix(in srgb,var(--background-contrast-info),transparent 5%); + --p-message-info-border-color: var(--border-plain-info); + --p-message-info-color: var(--text-default-grey); + --p-message-info-shadow: none; + --p-message-info-simple-color: var(--text-default-info); + --p-message-info-outlined-color: none; + --p-message-info-outlined-border-color: none; + --p-message-info-close-button-hover-background: none; + --p-message-info-close-button-focus-ring-color: none; + --p-message-info-close-button-focus-ring-shadow: none; +} diff --git a/src/assets/style/primevue-style/password.css b/src/assets/style/primevue-style/password.css new file mode 100644 index 0000000..2b171f9 --- /dev/null +++ b/src/assets/style/primevue-style/password.css @@ -0,0 +1,16 @@ +:root{ + --p-password-meter-background: var(--background-contrast-grey); + --p-password-meter-border-radius: 0.75rem; + --p-password-meter-height: var(--input-padding-y); + --p-password-icon-color: var(--input-color); + --p-password-overlay-background: var(--input-background); + --p-password-overlay-border-color: var(--input-border-color); + --p-password-overlay-border-radius: 0px; + --p-password-overlay-color: var(--input-color); + --p-password-overlay-padding: 0.75rem; + --p-password-overlay-shadow: var(--shadow); + --p-password-content-gap: 0.125rem; + --p-password-strength-weak-background: var(--background-action-high-error); + --p-password-strength-medium-background: var(--background-action-high-warning); + --p-password-strength-strong-background: var(--background-action-high-success); +} diff --git a/src/assets/style/primevue-style/textarea.css b/src/assets/style/primevue-style/textarea.css new file mode 100644 index 0000000..8ecfde3 --- /dev/null +++ b/src/assets/style/primevue-style/textarea.css @@ -0,0 +1,17 @@ +:root{ + --p-textarea-background: var(--input-background); + --p-textarea-disabled-background: var(--input-disabled-background); + --p-textarea-border-color: var(--input-border-color); + --p-textarea-hover-border-color: var(--input-border-color); + --p-textarea-focus-border-color: var(--input-border-color); + --p-textarea-color: var(--input-color); + --p-textarea-disabled-color: var(--input-disabled-color); + --p-textarea-placeholder-color: var(--input-color); + --p-textarea-padding-x: var(--input-padding-x); + --p-textarea-padding-y: var(--input-padding-y); + --p-textarea-border-radius: var(--input-border-raduis); + --p-textarea-focus-ring-color: var(--focus-color); + --p-textarea-focus-ring-width: var(--focus-width); + --p-textarea-focus-ring-style: var(--focus-style); + --p-textarea-focus-ring-offset: var(--focus-offset); +} diff --git a/src/assets/style/primevue-style/various.css b/src/assets/style/primevue-style/various.css new file mode 100644 index 0000000..cfd1d7b --- /dev/null +++ b/src/assets/style/primevue-style/various.css @@ -0,0 +1,6 @@ +:root{ + --p-icon-size: 1rem; + --p-text-muted-color: var(--text-action-high-grey); + --p-transition-duration: var(--transition-duration); + --p-anchor-gutter: 2px; +} diff --git a/src/components/divider/VDivider.vue b/src/components/divider/VDivider.vue new file mode 100644 index 0000000..def7f46 --- /dev/null +++ b/src/components/divider/VDivider.vue @@ -0,0 +1,15 @@ + + + diff --git a/src/components/group/IVGroup.type.ts b/src/components/group/IVGroup.type.ts new file mode 100644 index 0000000..3a5c5e2 --- /dev/null +++ b/src/components/group/IVGroup.type.ts @@ -0,0 +1,18 @@ +/** + * Interface representing the props for the Group component. + */ +export default interface IVGroup { + /** + * Defines the visual style or status of the group. + * - `'default'`: Standard appearance. + * - `'error'`: Indicates an error state. + * - `'success'`: Indicates a successful state. + * - `undefined`: No specific type applied. + */ + type: 'default' | 'error' | 'success' | undefined; + /** + * If true, disables the group component, making it non-interactive. + * Optional. + */ + disabled?: boolean; +} diff --git a/src/components/group/VGroup.vue b/src/components/group/VGroup.vue new file mode 100644 index 0000000..a2cb2c1 --- /dev/null +++ b/src/components/group/VGroup.vue @@ -0,0 +1,34 @@ + + + + + diff --git a/src/components/hint/IVHint.type.ts b/src/components/hint/IVHint.type.ts new file mode 100644 index 0000000..1cfd440 --- /dev/null +++ b/src/components/hint/IVHint.type.ts @@ -0,0 +1,28 @@ +/** + * Interface representing the properties of the Hint component. + */ +export default interface IVHint { + /** + * The title or main message displayed in the hint. + */ + title: string; + + /** + * Determines whether an icon should be displayed alongside the hint. + * Optional. Defaults to false if not provided. + */ + icon?: boolean; + + /** + * Specifies the type of hint to display. + * Can be one of the following: 'info', 'warning', 'alert', 'success', 'active', or an empty string. + * Optional. + */ + type?: 'info' | 'warning' | 'alert' | 'success' | 'active' | ''; + + /** + * Indicates whether the hint is disabled. + * Optional. When true, the hint may appear inactive or be hidden. + */ + disabled?: boolean; +} diff --git a/src/components/hint/VHint.vue b/src/components/hint/VHint.vue new file mode 100644 index 0000000..455181a --- /dev/null +++ b/src/components/hint/VHint.vue @@ -0,0 +1,59 @@ + + + + + diff --git a/src/components/input/IVInput.type.ts b/src/components/input/IVInput.type.ts new file mode 100644 index 0000000..d026266 --- /dev/null +++ b/src/components/input/IVInput.type.ts @@ -0,0 +1,274 @@ +import type { HintedString, Nullable} from '@primevue/core'; +import type { HTMLAttributes, InputHTMLAttributes } from 'vue'; + +/** + * Interface representing the props for the InputText component. + */ +export interface IInputText { + /** + * The unique identifier for the input element. + */ + id?: string; + + /** + * The ID used to associate the input with a description element for accessibility. + */ + descriptionId?: string; + + /** + * Optional hint text displayed below the input. + */ + hint?: string; + + /** + * Indicates whether the input is in an invalid state. + */ + isInvalid?: boolean; + + /** + * Indicates whether the input is in a valid state. + */ + isValid?: boolean; + + /** + * If true, renders a