From cbfe7726cacbebe9067566ae4427305b046f42bf Mon Sep 17 00:00:00 2001 From: Paul Valerie GOMA Date: Sun, 27 Jul 2025 23:36:32 +0200 Subject: [PATCH 01/21] =?UTF-8?q?=F0=9F=92=84=20Adding*=20the=20style=20of?= =?UTF-8?q?=20the=20primevue=20dialog=20component?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/style/primevue-style/dialog.css | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/assets/style/primevue-style/dialog.css diff --git a/src/assets/style/primevue-style/dialog.css b/src/assets/style/primevue-style/dialog.css new file mode 100644 index 0000000..dbeb53e --- /dev/null +++ b/src/assets/style/primevue-style/dialog.css @@ -0,0 +1,14 @@ +:root{ + --p-dialog-background: var(--background-lifted-grey); + --p-dialog-border-color: var(--border-default-grey); + --p-dialog-color: var(--text-title-grey); + --p-dialog-border-radius: 0px; + --p-dialog-shadow: var(--shadow); + --p-dialog-header-padding: 1rem; + --p-dialog-header-gap: 0.5rem; + --p-dialog-title-font-size: var(--titles-H4-SM-size); + --p-dialog-title-font-weight: var( --titles-H4-SM-weight); + --p-dialog-content-padding: 0 1rem 1rem 1rem; + --p-dialog-footer-padding: 1rem; + --p-dialog-footer-gap: 1rem; +} From 255e7f5021e851c802ab3c390ce0752a28afdcfa Mon Sep 17 00:00:00 2001 From: Paul Valerie GOMA Date: Sun, 27 Jul 2025 23:37:34 +0200 Subject: [PATCH 02/21] =?UTF-8?q?=F0=9F=92=84=20Update=20the=20primevue=20?= =?UTF-8?q?configuration=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/style/primevue-configuration.css | 1 + 1 file changed, 1 insertion(+) diff --git a/src/assets/style/primevue-configuration.css b/src/assets/style/primevue-configuration.css index 9a185a9..5709b60 100644 --- a/src/assets/style/primevue-configuration.css +++ b/src/assets/style/primevue-configuration.css @@ -16,3 +16,4 @@ @import './primevue-style/fileupload.css'; @import './primevue-style/scrollpanel.css'; @import './primevue-style/toast.css'; +@import './primevue-style/dialog.css'; From 99d31824c02182eb438581b26077ab6f0459aa02 Mon Sep 17 00:00:00 2001 From: Paul Valerie GOMA Date: Sun, 27 Jul 2025 23:46:24 +0200 Subject: [PATCH 03/21] =?UTF-8?q?=F0=9F=8F=B7=EF=B8=8F=20=20Modal=20compon?= =?UTF-8?q?ent=20interface=20file=20added?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/modal/IVModal.type.ts | 69 ++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 src/components/modal/IVModal.type.ts diff --git a/src/components/modal/IVModal.type.ts b/src/components/modal/IVModal.type.ts new file mode 100644 index 0000000..fb3a050 --- /dev/null +++ b/src/components/modal/IVModal.type.ts @@ -0,0 +1,69 @@ +import type IVButton from '../button/IVButton.type'; +import type { DialogBreakpoints } from 'primevue/dialog'; + +/** + * Interface representing the properties for a Modal component. + */ +export interface IModal { + /** + * Optional unique identifier for the modal element. + */ + modalId?: string + + /** + * Flag indicating whether the modal is currently open. + */ + opened?: boolean + + /** + * List of actions (buttons) displayed in the modal. + */ + actions?: IVButton[] + + /** + * Determines if the modal should behave like an alert dialog. + */ + isAlert?: boolean + + /** + * Reference to the originating element that triggered the modal, + * used to return focus when the modal is closed. + */ + origin?: { focus: () => void } + + /** + * Title displayed at the top of the modal. + */ + title: string + + /** + * Optional icon name or path to render next to the title. + */ + icon?: string + + /** + * Defines the modal size: 'sm' = small, 'md' = medium, 'lg' = large. + */ + size?: 'sm' | 'md' | 'lg' + + /** + * Accessible label (aria-label) for the close button. + */ + closeButtonLabel?: string + + /** + * Tooltip (title attribute) shown when hovering over the close button. + */ + closeButtonTitle?: string +} + +/** + * Extended Modal interface that includes configuration for responsive breakpoints. + */ +export default interface IVModal extends IModal { + /** + * Breakpoints used to control responsive modal behavior. + * Compatible with PrimeVue Dialog breakpoints format. + */ + breakpoints?: DialogBreakpoints +} From dd5bc2fdb454fd317e08ae8b75e3ba003b62010d Mon Sep 17 00:00:00 2001 From: Paul Valerie GOMA Date: Sun, 27 Jul 2025 23:55:47 +0200 Subject: [PATCH 04/21] =?UTF-8?q?=E2=9C=A8=20feature:=20Modal=20component?= =?UTF-8?q?=20added?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/modal/VModal.vue | 98 +++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 src/components/modal/VModal.vue diff --git a/src/components/modal/VModal.vue b/src/components/modal/VModal.vue new file mode 100644 index 0000000..2bb305f --- /dev/null +++ b/src/components/modal/VModal.vue @@ -0,0 +1,98 @@ + + + From f1f5e1f36a5066ab480f076c7e286f21d0173ab9 Mon Sep 17 00:00:00 2001 From: Paul Valerie GOMA Date: Mon, 28 Jul 2025 00:11:26 +0200 Subject: [PATCH 05/21] =?UTF-8?q?=F0=9F=90=9B=20fix:=20bug=20fixed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/modal/VModal.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/modal/VModal.vue b/src/components/modal/VModal.vue index 2bb305f..ae27449 100644 --- a/src/components/modal/VModal.vue +++ b/src/components/modal/VModal.vue @@ -4,7 +4,7 @@ import type IVModal from './IVModal.type'; import { useId, computed } from 'vue'; import VButtonGroup from '../button/VButtonGroup.vue'; import VButton from '../button/VButton.vue'; -import styles from '@/assets/typography.module.css' +import styles from '@visua/typography.module.css'; const props = withDefaults(defineProps(), { modalId: () => useId(), From 80dc6e4161881bd7d7f3e8e2de1451a13892d468 Mon Sep 17 00:00:00 2001 From: Paul Valerie GOMA Date: Mon, 28 Jul 2025 00:12:07 +0200 Subject: [PATCH 06/21] Display some modal components --- src/App.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/App.vue b/src/App.vue index 0fec676..d29de5d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -10,7 +10,8 @@ // import VProgressBarView from '../template/VProgressBarView.vue'; // import VMessageView from '../template/VMessageView.vue'; // import VFileUploadView from '../template/VFileUploadView.vue'; -import VAlertView from '../template/VAlertView.vue'; +// import VAlertView from '../template/VAlertView.vue'; +import VModalView from '../template/VModalView.vue'; @@ -26,5 +27,6 @@ import VAlertView from '../template/VAlertView.vue'; - + + From 24ea6cb51b42db8556d99f22f70ae9f864c369f3 Mon Sep 17 00:00:00 2001 From: Paul Valerie GOMA Date: Mon, 28 Jul 2025 00:58:31 +0200 Subject: [PATCH 07/21] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20=20refactor:=20modal?= =?UTF-8?q?=20component=20improved?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/modal/VModal.vue | 55 ++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 8 deletions(-) diff --git a/src/components/modal/VModal.vue b/src/components/modal/VModal.vue index ae27449..db18711 100644 --- a/src/components/modal/VModal.vue +++ b/src/components/modal/VModal.vue @@ -1,7 +1,7 @@ @@ -49,14 +73,29 @@ const visible = computed({ From 0732261793a53f01901377414af4705c7cebe85b Mon Sep 17 00:00:00 2001 From: Paul Valerie GOMA Date: Mon, 28 Jul 2025 11:22:30 +0200 Subject: [PATCH 16/21] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20=20refactor:=20useCo?= =?UTF-8?q?nfirmModal=20composable=20updated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/composable/useConfirmModal.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/composable/useConfirmModal.ts b/src/components/composable/useConfirmModal.ts index 85f58a7..0bf333b 100644 --- a/src/components/composable/useConfirmModal.ts +++ b/src/components/composable/useConfirmModal.ts @@ -1,4 +1,4 @@ -import { type ConfirmationOptions } from "primevue/confirmationoptions"; +import type { ConfirmationOptions } from "primevue/confirmationoptions"; import { useConfirm } from "primevue"; import VButton from "../button/VButton.vue"; From 0245e4df4a013b775bf13ae28e069a68d556bc33 Mon Sep 17 00:00:00 2001 From: Paul Valerie GOMA Date: Mon, 28 Jul 2025 11:25:32 +0200 Subject: [PATCH 17/21] =?UTF-8?q?=F0=9F=93=9D=20docs:=20Updated=20CHANGELO?= =?UTF-8?q?G=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce9fa83..25e2ece 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.0.12] - 2025-07-28 +### Added +- Modal compoenent +- Confirm modal component +- useConfirmModal composable + ## [1.0.11] - 2025-07-27 ### Added - Alert compoenent From 0becd4a459e3d4a26f886eba2bd1179da8c1a9db Mon Sep 17 00:00:00 2001 From: Paul Valerie GOMA Date: Mon, 28 Jul 2025 11:29:25 +0200 Subject: [PATCH 18/21] =?UTF-8?q?=E2=9C=A8=20feature:=20Confirm=20modal=20?= =?UTF-8?q?component=20updated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/modal/VConfirmModal.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/modal/VConfirmModal.vue b/src/components/modal/VConfirmModal.vue index 4b067ab..1cb0459 100644 --- a/src/components/modal/VConfirmModal.vue +++ b/src/components/modal/VConfirmModal.vue @@ -16,6 +16,7 @@ const props = withDefaults(defineProps(), { :group="props.group" :draggable="props.draggable" :breakpoints="props.breakpoints" + role="alert" >