Compare commits
158 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
299bae8d3d | ||
|
ef93944618 | ||
|
cff17612de | ||
|
6af37991a4 | ||
|
6a0e9e566b | ||
|
b06accb14f | ||
|
9e3067627c | ||
|
fd143ea7a5 | ||
|
5f5c532d8e | ||
|
e20626296e | ||
|
96fa281b11 | ||
|
8d4bb9b762 | ||
|
dcf54bf4b9 | ||
|
6caad49ff8 | ||
|
24b1018f7a | ||
|
501e9cb3b8 | ||
|
8071f3565c | ||
|
fff3f5e647 | ||
|
1ca5f60449 | ||
|
07aed8835e | ||
|
3c3956da68 | ||
|
65a2f9028a | ||
|
2bd148274f | ||
|
ae4955f00c | ||
|
8bfd244be2 | ||
|
921667d7e9 | ||
|
ce70f81113 | ||
|
504118e92e | ||
|
073ddc9d7c | ||
|
994237e98e | ||
|
625189077b | ||
|
dc288d42bb | ||
|
ef57a78a03 | ||
|
38dfcfe794 | ||
|
f8dfcfee1f | ||
|
34a00841b1 | ||
|
8f77be03dc | ||
|
7749fdc8e2 | ||
|
1fb81ec69f | ||
|
738f5ae2ad | ||
|
a5ef570311 | ||
|
1964852b1c | ||
|
3c833bacb1 | ||
|
e960c0d56d | ||
|
b78de670e9 | ||
|
edeb8b105d | ||
|
cf208cd03b | ||
|
fee74298c0 | ||
|
45c3945627 | ||
|
efc442316c | ||
|
6bb72c9147 | ||
|
d8b80c506d | ||
|
b490b2a720 | ||
|
6b8d621217 | ||
|
95a1699f2f | ||
|
2dda891c43 | ||
|
5f8a7ae4c2 | ||
|
184417f484 | ||
|
e4915e618b | ||
|
7bae04e7c0 | ||
|
96f8465d8c | ||
|
649c59ecb4 | ||
|
c0d36a8c33 | ||
|
2c4651800d | ||
|
7d5fa0100c | ||
|
52d7f57276 | ||
|
26e6288529 | ||
|
eed44a1214 | ||
|
dbf30cc066 | ||
|
b02ce1bd7e | ||
|
853b6cc4b6 | ||
|
3ab504e262 | ||
|
f05f4f0ee5 | ||
|
4d3febf19b | ||
|
d36eec1d5e | ||
|
8cfb13d1b3 | ||
|
18fa9df5bf | ||
|
521206a589 | ||
|
b61eb6fe4a | ||
|
19c8de7350 | ||
|
c21d7e5c78 | ||
|
2ab992a321 | ||
|
534be360a1 | ||
|
de3ce627ba | ||
|
779cc5146a | ||
|
34cdb4c12e | ||
|
e5a2843c9f | ||
|
ef777d539f | ||
|
bca12f60b8 | ||
|
a84d47e0fc | ||
|
8eaa8db835 | ||
|
0f2d287cf7 | ||
|
6c62dfe9b5 | ||
|
60384e5957 | ||
|
d731e8213e | ||
|
ba7e8d4639 | ||
|
2041974712 | ||
|
359c2cba12 | ||
|
b06172f72f | ||
|
76d85039e3 | ||
|
42c2d8d70d | ||
|
430876cfbf | ||
|
7014804a25 | ||
|
feb54ca613 | ||
|
c57cf6f96b | ||
|
674475984e | ||
|
b335bae79c | ||
|
dc01f4694d | ||
|
4a86b1cd57 | ||
|
564f036030 | ||
|
b2a353f109 | ||
|
b998522b05 | ||
|
93cd17aef5 | ||
|
e46ba8127d | ||
|
0ebc29b3df | ||
|
d99331c9ee | ||
|
8a99e698f4 | ||
|
80e2c6e358 | ||
|
717c5f8e6e | ||
|
072aa34050 | ||
|
8f9c0716b1 | ||
|
1c4b59b246 | ||
|
a066efea10 | ||
|
1d5a3839c7 | ||
|
72bcd63466 | ||
|
e01dd93629 | ||
|
d202205e5e | ||
|
385233ea8b | ||
|
e2db26d340 | ||
|
1530b66396 | ||
|
92d3564654 | ||
|
bfe699150e | ||
|
c3073c1219 | ||
|
4c76522d52 | ||
|
3c64a187f7 | ||
|
254119edc9 | ||
|
76d75d6756 | ||
|
a3a8fa05b9 | ||
|
7ee1b3fefd | ||
|
c46f2889cd | ||
|
46d9d12781 | ||
|
b0b6a35906 | ||
|
4e42d0256c | ||
|
2a03550d09 | ||
|
c73d2e0892 | ||
|
43472332dd | ||
|
c035a7dce5 | ||
|
80825394b8 | ||
|
ae0cd7a5b0 | ||
|
fad2a30a6b | ||
|
3d6b27c13c | ||
|
a4bbfeb9ad | ||
|
5612d5d6f4 | ||
|
0c8540511e | ||
|
43ea5c5fdd | ||
|
94611cef94 | ||
|
825b0aaeab | ||
|
b2045352ac |
39
CHANGELOG.md
39
CHANGELOG.md
|
@ -5,6 +5,45 @@ 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/),
|
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).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [1.0.28] - 2025-08-11
|
||||||
|
### fixed
|
||||||
|
- bug fixed
|
||||||
|
|
||||||
|
## [1.0.24] - 2025-08-02
|
||||||
|
### fixed
|
||||||
|
- Composable error fixed
|
||||||
|
|
||||||
|
## [1.0.22] - 2025-08-02
|
||||||
|
### fixed
|
||||||
|
- Fixed bugs related to dependencies
|
||||||
|
|
||||||
|
## [1.0.20] - 2025-07-31
|
||||||
|
### fixed
|
||||||
|
- Composable error fixed
|
||||||
|
|
||||||
|
## [1.0.19] - 2025-07-31
|
||||||
|
### Added
|
||||||
|
- Style component added
|
||||||
|
|
||||||
|
## [1.0.18] - 2025-07-31
|
||||||
|
### fixed
|
||||||
|
- Package publication error fixed
|
||||||
|
- Component export file configuration
|
||||||
|
|
||||||
|
## [1.0.15] - 2025-07-30
|
||||||
|
### Added
|
||||||
|
- Menu bar compoenent
|
||||||
|
|
||||||
|
## [1.0.14] - 2025-07-29
|
||||||
|
### fixed
|
||||||
|
- Package publication error fixed
|
||||||
|
- Component export file configuration
|
||||||
|
|
||||||
|
## [1.0.13] - 2025-07-29
|
||||||
|
### Added
|
||||||
|
- Data table compoenent
|
||||||
|
- List style
|
||||||
|
|
||||||
## [1.0.12] - 2025-07-28
|
## [1.0.12] - 2025-07-28
|
||||||
### Added
|
### Added
|
||||||
- Modal compoenent
|
- Modal compoenent
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
# visua-vue
|
# visua-vue
|
||||||
|
|
||||||
**Current version: v1.0.12**
|
**Current version: v1.0.28**
|
8
env.d.ts
vendored
8
env.d.ts
vendored
|
@ -1 +1,9 @@
|
||||||
|
|
||||||
|
|
||||||
/// <reference types="vite/client" />
|
/// <reference types="vite/client" />
|
||||||
|
|
||||||
|
declare module '*.vue' {
|
||||||
|
import { DefineComponent } from 'vue';
|
||||||
|
const component: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
|
||||||
|
export default component;
|
||||||
|
}
|
||||||
|
|
1342
package-lock.json
generated
1342
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
65
package.json
65
package.json
|
@ -1,21 +1,41 @@
|
||||||
{
|
{
|
||||||
"name": "@cellule-financiere-pmo/visua-vue",
|
"name": "@cellule-financiere-pmo/visua-vue",
|
||||||
"version": "1.0.12",
|
"version": "1.0.28",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
"description": "Vue.js components of the Visua Design System.",
|
||||||
|
"main": "./dist/visua-vue.umd.cjs",
|
||||||
|
"module": "./dist/visua-vue.es.js",
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
|
"require": "./dist/visua-vue.umd.cjs",
|
||||||
|
"import": "./dist/visua-vue.es.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sideEffects": false,
|
||||||
|
"files": [
|
||||||
|
"dist",
|
||||||
|
"README.md"
|
||||||
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"clean": "rimraf dist",
|
||||||
|
"build": "npm-run-all clean build:assets build:types",
|
||||||
|
"build:assets": "vite build",
|
||||||
|
"build:types": "vue-tsc --emitDeclarationOnly --outDir dist && tsc --project tsconfig.types.json",
|
||||||
|
"prepare": "npm run build",
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "run-p type-check \"build-only {@}\" --",
|
|
||||||
"preview": "vite preview",
|
|
||||||
"build-only": "vite build",
|
|
||||||
"type-check": "vue-tsc --build",
|
"type-check": "vue-tsc --build",
|
||||||
"lint": "eslint . --fix",
|
"lint": "eslint . --fix",
|
||||||
"test:unit": "vitest run --coverage"
|
"test": "vitest --config vitest.config.ts",
|
||||||
|
"test:unit": "vitest run --coverage",
|
||||||
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@cellule-financiere-pmo/visua": "1.1.3",
|
"@cellule-financiere-pmo/visua": "1.1.3"
|
||||||
"jsdom": "^26.1.0",
|
},
|
||||||
|
"peerDependencies": {
|
||||||
"primevue": "^4.3.6",
|
"primevue": "^4.3.6",
|
||||||
"vite-plugin-inspect": "^11.3.0",
|
|
||||||
"vue": "^3.5.17",
|
"vue": "^3.5.17",
|
||||||
"vue-router": "^4.5.1"
|
"vue-router": "^4.5.1"
|
||||||
},
|
},
|
||||||
|
@ -30,28 +50,37 @@
|
||||||
"eslint": "^9.29.0",
|
"eslint": "^9.29.0",
|
||||||
"eslint-plugin-vue": "~10.2.0",
|
"eslint-plugin-vue": "~10.2.0",
|
||||||
"jiti": "^2.4.2",
|
"jiti": "^2.4.2",
|
||||||
|
"jsdom": "^26.1.0",
|
||||||
"npm-run-all2": "^8.0.4",
|
"npm-run-all2": "^8.0.4",
|
||||||
|
"rimraf": "^5.0.10",
|
||||||
"typescript": "~5.8.0",
|
"typescript": "~5.8.0",
|
||||||
"vite": "^7.0.0",
|
"vite": "^7.0.0",
|
||||||
|
"vite-plugin-inspect": "^11.3.0",
|
||||||
"vite-plugin-vue-devtools": "^7.7.7",
|
"vite-plugin-vue-devtools": "^7.7.7",
|
||||||
"vitest": "^3.2.4",
|
"vitest": "^3.2.4",
|
||||||
|
"vue": "^3.5.17",
|
||||||
|
"vue-router": "^4.5.1",
|
||||||
"vue-tsc": "^2.2.10"
|
"vue-tsc": "^2.2.10"
|
||||||
},
|
},
|
||||||
"description": "**Current version: v0.0.0**",
|
|
||||||
"main": "index.js",
|
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://gitlab.com/cellule-financiere-pmo/design-system/visua-vue.git"
|
"url": "https://gitlab.com/cellule-financiere-pmo/design-system/visua-vue.git"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
|
||||||
"author": "",
|
|
||||||
"license": "ISC",
|
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://gitlab.com/cellule-financiere-pmo/design-system/visua-vue/issues"
|
"url": "https://gitlab.com/cellule-financiere-pmo/design-system/visua-vue/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://gitlab.com/cellule-financiere-pmo/design-system/visua-vue#readme",
|
"homepage": "https://gitlab.com/cellule-financiere-pmo/design-system/visua-vue#readme",
|
||||||
"files": [
|
"keywords": [
|
||||||
"src/components/*",
|
"vue",
|
||||||
"src/assets/style/*"
|
"typescript",
|
||||||
]
|
"design-system",
|
||||||
|
"components",
|
||||||
|
"vite",
|
||||||
|
"library"
|
||||||
|
],
|
||||||
|
"author": {
|
||||||
|
"name": "CGI",
|
||||||
|
"url": "https://www.cgi.com"
|
||||||
|
},
|
||||||
|
"license": "ISC"
|
||||||
}
|
}
|
||||||
|
|
22
src/App.vue
22
src/App.vue
|
@ -12,7 +12,10 @@
|
||||||
// import VFileUploadView from '../template/VFileUploadView.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';
|
// import VModalView from '../template/VModalView.vue';
|
||||||
import VConfirmModalView from '../template/VConfirmModalView.vue';
|
// import VConfirmModalView from '../template/VConfirmModalView.vue';
|
||||||
|
import VDataTableView from '../template/VDataTableView.vue';
|
||||||
|
// import VMenuBarView from '../template/VMenuBarView.vue'
|
||||||
|
// import VDataTable from './components/table/VDataTable.vue';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,12 +26,23 @@ import VConfirmModalView from '../template/VConfirmModalView.vue';
|
||||||
<!-- <VAccordionView/> -->
|
<!-- <VAccordionView/> -->
|
||||||
<!-- <VInputView/> -->
|
<!-- <VInputView/> -->
|
||||||
<!-- <VCheckboxView/> -->
|
<!-- <VCheckboxView/> -->
|
||||||
<!-- <VBadgeView/>
|
<!-- <VBadgeView/>-->
|
||||||
<VSelectView/> -->
|
<!-- <VSelectView/> -->
|
||||||
<!-- <VProgressBarView/> -->
|
<!-- <VProgressBarView/> -->
|
||||||
<!-- <VMessageView/> -->
|
<!-- <VMessageView/> -->
|
||||||
<!-- <VFileUploadView/> -->
|
<!-- <VFileUploadView/> -->
|
||||||
<!-- <VAlertView/> -->
|
<!-- <VAlertView/> -->
|
||||||
<!-- <VModalView/> -->
|
<!-- <VModalView/> -->
|
||||||
<VConfirmModalView/>
|
<!-- <VConfirmModalView/> -->
|
||||||
|
<VDataTableView/>
|
||||||
|
<!-- <RouterView/> -->
|
||||||
|
<!-- <VMenuBarView/> -->
|
||||||
|
<!-- <VDataTable/> -->
|
||||||
</template>
|
</template>
|
||||||
|
<style lang="css" scoped>
|
||||||
|
*{
|
||||||
|
padding: 0px;
|
||||||
|
margin: 0px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -8,4 +8,6 @@ html {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-family: var(--font-family-primary);
|
font-family: var(--font-family-primary);
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
|
padding: 0px;
|
||||||
|
margin: 0px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
--input-padding-y: 0.5rem;
|
--input-padding-y: 0.5rem;
|
||||||
--input-border-raduis: 0.25rem 0.25rem 0px 0px;
|
--input-border-raduis: 0.25rem 0.25rem 0px 0px;
|
||||||
/* datatable */
|
/* datatable */
|
||||||
--datatable-background: var(--background-contrast-grey);
|
--datatable-background: var(--background-default-grey);
|
||||||
--datatable-alt-background: var(--background-alt-grey);
|
--datatable-alt-background: var(--background-alt-grey);
|
||||||
--datatable-hover-background: var(--background-alt-grey-hover);
|
--datatable-hover-background: var(--background-alt-grey-hover);
|
||||||
--datatable-active-background: var(--background-alt-grey-active);
|
--datatable-active-background: var(--background-alt-grey-active);
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
/* menu */
|
/* menu */
|
||||||
--menu-container-border-color: var(--border-default-grey);
|
--menu-container-border-color: var(--border-default-grey);
|
||||||
--menu-border-width: 0px 0px 0px var(--large-border-width);
|
--menu-border-width: 0px 0px 0px var(--large-border-width);
|
||||||
--menu-default-background: var(--background-transparent);
|
--menu-default-background: var(--background-default-grey);
|
||||||
--menu-default-color: var(--text-default-grey);
|
--menu-default-color: var(--text-default-grey);
|
||||||
--menu-active-color: var(--text-active-blue-france);
|
--menu-active-color: var(--text-active-blue-france);
|
||||||
--menu-hover-background: var(--background-transparent-active);
|
--menu-hover-background: var(--background-transparent-active);
|
||||||
|
@ -41,4 +41,5 @@
|
||||||
--menu-indent: 1rem;
|
--menu-indent: 1rem;
|
||||||
--menu-border-color: transparent;
|
--menu-border-color: transparent;
|
||||||
--menu-border-color-active: var(--border-active-blue-france);
|
--menu-border-color-active: var(--border-active-blue-france);
|
||||||
|
--menu-border-radius: 0px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,3 +18,8 @@
|
||||||
@import './primevue-style/toast.css';
|
@import './primevue-style/toast.css';
|
||||||
@import './primevue-style/dialog.css';
|
@import './primevue-style/dialog.css';
|
||||||
@import './primevue-style/confirmdialog.css';
|
@import './primevue-style/confirmdialog.css';
|
||||||
|
@import './primevue-style/datatable.css';
|
||||||
|
@import './primevue-style/paginator.css';
|
||||||
|
@import './primevue-style/list.css';
|
||||||
|
@import './primevue-style/menubar.css';
|
||||||
|
@import './primevue-style/navigation.css';
|
||||||
|
|
110
src/assets/style/primevue-style/datatable.css
Normal file
110
src/assets/style/primevue-style/datatable.css
Normal file
|
@ -0,0 +1,110 @@
|
||||||
|
:root{
|
||||||
|
--p-datatable-paginator-bottom-border-color: var(--p-datatable-border-color);
|
||||||
|
--p-datatable-paginator-bottom-border-width: 0 0 1px 0;
|
||||||
|
--p-datatable-paginator-top-border-color: var(--p-datatable-border-color);
|
||||||
|
--p-datatable-paginator-top-border-width: 0 0 1px 0;
|
||||||
|
--p-datatable-filter-inline-gap: 0.5rem;
|
||||||
|
--p-datatable-filter-constraint-focus-background: var(--p-list-option-focus-background);
|
||||||
|
--p-datatable-filter-constraint-selected-background: var(--p-list-option-selected-background);
|
||||||
|
--p-datatable-filter-constraint-selected-focus-background: var(--p-list-option-selected-focus-background);
|
||||||
|
--p-datatable-filter-constraint-color: var(--p-list-option-color);
|
||||||
|
--p-datatable-filter-constraint-focus-color: var(--p-list-option-focus-color);
|
||||||
|
--p-datatable-filter-constraint-selected-color: var(--p-list-option-selected-color);
|
||||||
|
--p-datatable-filter-constraint-selected-focus-color: var(--p-list-option-selected-focus-color);
|
||||||
|
--p-datatable-filter-constraint-padding: var(--p-list-option-padding);
|
||||||
|
--p-datatable-filter-constraint-border-radius: var(--p-list-option-border-radius);
|
||||||
|
--p-datatable-filter-constraint-separator-border-color: var(--p-content-border-color);
|
||||||
|
--p-datatable-filter-constraint-list-padding: var(--p-list-padding);
|
||||||
|
--p-datatable-filter-constraint-list-gap: var(--p-list-gap);
|
||||||
|
--p-datatable-filter-rule-border-color: var(--p-content-border-color);
|
||||||
|
--p-datatable-filter-overlay-popover-background: var(--p-overlay-popover-background);
|
||||||
|
--p-datatable-filter-overlay-popover-border-color: var(--p-overlay-popover-border-color);
|
||||||
|
--p-datatable-filter-overlay-popover-border-radius: var(--p-overlay-popover-border-radius);
|
||||||
|
--p-datatable-filter-overlay-popover-color: var(--p-overlay-popover-color);
|
||||||
|
--p-datatable-filter-overlay-popover-shadow: var(--p-overlay-popover-shadow);
|
||||||
|
--p-datatable-filter-overlay-popover-padding: var(--p-overlay-popover-padding);
|
||||||
|
--p-datatable-filter-overlay-popover-gap: 0.5rem;
|
||||||
|
--p-datatable-filter-overlay-select-background: var(--p-overlay-select-background);
|
||||||
|
--p-datatable-filter-overlay-select-border-color: var(--p-overlay-select-border-color);
|
||||||
|
--p-datatable-filter-overlay-select-border-radius: var(--p-overlay-select-border-radius);
|
||||||
|
--p-datatable-filter-overlay-select-color: var(--p-overlay-select-color);
|
||||||
|
--p-datatable-filter-overlay-select-shadow: var(--p-overlay-select-shadow);
|
||||||
|
--p-datatable-row-toggle-button-hover-background: var(--datatable-hover-background);
|
||||||
|
--p-datatable-row-toggle-button-selected-hover-background: var(--datatable-background);
|
||||||
|
--p-datatable-row-toggle-button-color: var(--datatable-row-color);
|
||||||
|
--p-datatable-row-toggle-button-hover-color: var(--datatable-row-color);
|
||||||
|
--p-datatable-row-toggle-button-selected-hover-color: var(--datatable-row-color);
|
||||||
|
--p-datatable-row-toggle-button-size: 1.75rem;
|
||||||
|
--p-datatable-row-toggle-button-border-radius: 0px;
|
||||||
|
--p-datatable-row-toggle-button-focus-ring-width: var(--focus-width);
|
||||||
|
--p-datatable-row-toggle-button-focus-ring-style: var(--focus-style);
|
||||||
|
--p-datatable-row-toggle-button-focus-ring-color: var(--focus-color);
|
||||||
|
--p-datatable-row-toggle-button-focus-ring-offset: var(--focus-offset);
|
||||||
|
/* --p-datatable-row-toggle-button-focus-ring-shadow: var(--p-focus-ring-shadow); */
|
||||||
|
--p-datatable-loading-icon-size: 2rem;
|
||||||
|
--p-datatable-sort-icon-color: var(--datatable-row-color);
|
||||||
|
--p-datatable-sort-icon-hover-color: var(--datatable-row-color);
|
||||||
|
--p-datatable-sort-icon-size: 0.875rem;
|
||||||
|
--p-datatable-resize-indicator-width: 1px;
|
||||||
|
--p-datatable-resize-indicator-color: var(--p-primary-color);
|
||||||
|
--p-datatable-column-resizer-width: 0.5rem;
|
||||||
|
--p-datatable-drop-point-color: var(--p-primary-color);
|
||||||
|
--p-datatable-footer-background: var(--datatable-background);
|
||||||
|
--p-datatable-footer-border-color: var(--p-datatable-border-color);
|
||||||
|
--p-datatable-footer-color: var(--p-content-color);
|
||||||
|
--p-datatable-footer-border-width: 0 0 1px 0;
|
||||||
|
--p-datatable-footer-padding: 0.75rem;
|
||||||
|
--p-datatable-footer-lg-padding: 1rem;
|
||||||
|
--p-datatable-footer-sm-padding: 0.5rem;
|
||||||
|
--p-datatable-column-footer-font-weight: 600;
|
||||||
|
--p-datatable-footer-cell-background: var(--datatable-background);
|
||||||
|
--p-datatable-footer-cell-border-color: var(--p-datatable-border-color);
|
||||||
|
--p-datatable-footer-cell-color: var(--p-content-color);
|
||||||
|
--p-datatable-footer-cell-padding: 0.75rem;
|
||||||
|
--p-datatable-footer-cell-lg-padding: 1rem;
|
||||||
|
--p-datatable-footer-cell-sm-padding: 0.5rem;
|
||||||
|
--p-datatable-body-cell-border-color: var(--p-datatable-border-color);
|
||||||
|
--p-datatable-body-cell-padding: 0.75rem;
|
||||||
|
--p-datatable-body-cell-lg-padding: 1rem;
|
||||||
|
--p-datatable-body-cell-sm-padding: 0.5rem;
|
||||||
|
--p-datatable-row-background: var(--datatable-background);
|
||||||
|
--p-datatable-row-hover-background: var(--datatable-hover-background);
|
||||||
|
--p-datatable-row-selected-background: var(--datatable-active-background);
|
||||||
|
--p-datatable-row-color: var(--datatable-row-color);
|
||||||
|
--p-datatable-row-hover-color: var(--datatable-row-color);
|
||||||
|
--p-datatable-row-selected-color: var(--datatable-row-color);
|
||||||
|
--p-datatable-row-focus-ring-width: var(--focus-width);
|
||||||
|
--p-datatable-row-focus-ring-style: var(--focus-style);
|
||||||
|
--p-datatable-row-focus-ring-color: var(--focus-color);
|
||||||
|
--p-datatable-row-focus-ring-offset: -1px;
|
||||||
|
/* --p-datatable-row-focus-ring-shadow: var(--p-focus-ring-shadow); */
|
||||||
|
--p-datatable-column-title-font-weight: var(--text-body-SM-detail-text-Medium-weight);
|
||||||
|
--p-datatable-header-cell-background: var(--primary-color-850-blue-france-default);
|
||||||
|
--p-datatable-header-cell-hover-background: var(--primary-color-850-blue-france-hover);
|
||||||
|
--p-datatable-header-cell-selected-background: var(--primary-color-850-blue-france-active);
|
||||||
|
--p-datatable-header-cell-border-color: var(--border-plain-grey);
|
||||||
|
--p-datatable-header-cell-color: var(--datatable-header-cell-color);
|
||||||
|
--p-datatable-header-cell-hover-color: var(--datatable-header-cell-color);
|
||||||
|
--p-datatable-header-cell-selected-color: var(--datatable-header-cell-color);
|
||||||
|
--p-datatable-header-cell-gap: 0.5rem;
|
||||||
|
--p-datatable-header-cell-padding: 0.75rem;
|
||||||
|
--p-datatable-header-cell-lg-padding: 1rem;
|
||||||
|
--p-datatable-header-cell-sm-padding: 0.5rem;
|
||||||
|
--p-datatable-header-cell-focus-ring-width: var(--focus-width);
|
||||||
|
--p-datatable-header-cell-focus-ring-style: var(--focus-style);
|
||||||
|
--p-datatable-header-cell-focus-ring-color: var(--focus-color);
|
||||||
|
--p-datatable-header-cell-focus-ring-offset: -1px;
|
||||||
|
/* --p-datatable-header-cell-focus-ring-shadow: var(--p-focus-ring-shadow); */
|
||||||
|
--p-datatable-header-background: var(--datatable-background);
|
||||||
|
--p-datatable-header-border-color: transparent;
|
||||||
|
--p-datatable-header-color: var(--datatable-header-cell-color);
|
||||||
|
--p-datatable-header-border-width: 0 0 1px 0;
|
||||||
|
--p-datatable-header-padding: 0.75rem;
|
||||||
|
--p-datatable-header-lg-padding: 1rem;
|
||||||
|
--p-datatable-header-sm-padding: 0.5rem;
|
||||||
|
/* --p-datatable-transition-duration: var(--p-transition-duration); */
|
||||||
|
--p-datatable-body-cell-selected-border-color: var(--datatable-active-background);
|
||||||
|
--p-datatable-row-striped-background: var(--datatable-background);
|
||||||
|
--p-datatable-border-color: var(--p-content-border-color);
|
||||||
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
--p-fileupload-file-gap: 1rem;
|
--p-fileupload-file-gap: 1rem;
|
||||||
--p-fileupload-file-border-color: var(--border-default-grey);
|
--p-fileupload-file-border-color: var(--border-default-grey);
|
||||||
--p-fileupload-file-info-gap: 0.5rem;
|
--p-fileupload-file-info-gap: 0.5rem;
|
||||||
--p-fileupload-content-highlight-border-color: var(--p-primary-color);
|
--p-fileupload-content-highlight-border-color: var(--border-action-high-grey);
|
||||||
--p-fileupload-content-padding: 0rem;
|
--p-fileupload-content-padding: 0rem;
|
||||||
--p-fileupload-content-gap: 1rem;
|
--p-fileupload-content-gap: 1rem;
|
||||||
--p-fileupload-header-background: transparent;
|
--p-fileupload-header-background: transparent;
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
--p-fileupload-header-border-width: 0;
|
--p-fileupload-header-border-width: 0;
|
||||||
--p-fileupload-header-border-radius: 0;
|
--p-fileupload-header-border-radius: 0;
|
||||||
--p-fileupload-header-gap: 0.5rem;
|
--p-fileupload-header-gap: 0.5rem;
|
||||||
--p-fileupload-background: var(--background-transparent);
|
--p-fileupload-background: var(--background-default-grey);
|
||||||
--p-fileupload-border-color: var(--border-default-grey);
|
--p-fileupload-border-color: var(--border-default-grey);
|
||||||
--p-fileupload-color: var(--text-default-grey);
|
--p-fileupload-color: var(--text-default-grey);
|
||||||
--p-fileupload-border-radius: 0px;
|
--p-fileupload-border-radius: 0px;
|
||||||
|
|
20
src/assets/style/primevue-style/list.css
Normal file
20
src/assets/style/primevue-style/list.css
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
:root{
|
||||||
|
--p-list-option-group-padding: 0.25rem;
|
||||||
|
--p-list-option-group-font-weight: var(--text-body-MD-standard-text-Regular-weight);
|
||||||
|
--p-list-option-padding: 0.25rem;
|
||||||
|
--p-list-option-border-radius: 0px;
|
||||||
|
--p-list-option-group-background: var(--input-background);
|
||||||
|
--p-list-option-group-color: var(--input-color);
|
||||||
|
--p-list-option-focus-background: var(--background-transparent-active);
|
||||||
|
--p-list-option-selected-background: var(--background-active-blue-france);
|
||||||
|
--p-list-option-selected-focus-background: var(--background-active-blue-france);
|
||||||
|
--p-list-option-color: var(--input-color);
|
||||||
|
--p-list-option-focus-color: var(--input-color);
|
||||||
|
--p-list-option-selected-color: var(--text-inverted-blue-france);
|
||||||
|
--p-list-option-selected-focus-color: var(--text-inverted-blue-france);
|
||||||
|
--p-list-option-icon-color: var(--input-color);
|
||||||
|
--p-list-option-icon-focus-color: var(--input-color);
|
||||||
|
--p-list-padding: 0.25rem;
|
||||||
|
--p-list-gap: 0.125rem;
|
||||||
|
--p-list-header-padding: 0.5rem 1rem;
|
||||||
|
}
|
44
src/assets/style/primevue-style/menubar.css
Normal file
44
src/assets/style/primevue-style/menubar.css
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
:root {
|
||||||
|
--p-menubar-mobile-button-border-radius: var(--menu-border-radius);
|
||||||
|
--p-menubar-mobile-button-size: 1.75rem;
|
||||||
|
--p-menubar-mobile-button-color: var(--text-active-blue-france);
|
||||||
|
--p-menubar-mobile-button-hover-color: var(--text-active-blue-france);
|
||||||
|
--p-menubar-mobile-button-hover-background: var(--background-transparent-active);
|
||||||
|
--p-menubar-mobile-button-focus-ring-width: var(--focus-width);
|
||||||
|
--p-menubar-mobile-button-focus-ring-style: var(--focus-style);
|
||||||
|
--p-menubar-mobile-button-focus-ring-color: var(--focus-color);
|
||||||
|
--p-menubar-mobile-button-focus-ring-offset: var(--focus-offset);
|
||||||
|
/* --p-menubar-mobile-button-focus-ring-shadow: */
|
||||||
|
--p-menubar-separator-border-color: var(--border-default-grey);
|
||||||
|
--p-menubar-submenu-padding: var(--p-navigation-list-padding);
|
||||||
|
--p-menubar-submenu-gap: var(--p-navigation-list-gap);
|
||||||
|
--p-menubar-submenu-background: var(--background-transparent);
|
||||||
|
--p-menubar-submenu-border-color: var(--border-default-grey);
|
||||||
|
--p-menubar-submenu-border-radius: var(--menu-border-radius);
|
||||||
|
--p-menubar-submenu-shadow: var(--shadow);
|
||||||
|
--p-menubar-submenu-mobile-indent: 1rem;
|
||||||
|
--p-menubar-submenu-icon-size: var(--p-navigation-submenu-icon-size);
|
||||||
|
--p-menubar-submenu-icon-color: var(--p-navigation-submenu-icon-color);
|
||||||
|
--p-menubar-submenu-icon-focus-color: var(--p-navigation-submenu-icon-focus-color);
|
||||||
|
--p-menubar-submenu-icon-active-color: var(--p-navigation-submenu-icon-active-color);
|
||||||
|
--p-menubar-item-focus-background: var(--p-navigation-item-focus-background);
|
||||||
|
--p-menubar-item-active-background: var(--p-navigation-item-active-background);
|
||||||
|
--p-menubar-item-color: var(--p-navigation-item-color);
|
||||||
|
--p-menubar-item-focus-color: var(--p-navigation-item-focus-color);
|
||||||
|
--p-menubar-item-active-color: var(--p-navigation-item-active-color);
|
||||||
|
--p-menubar-item-padding: var(--p-navigation-item-padding);
|
||||||
|
--p-menubar-item-border-radius: var(--p-navigation-item-border-radius);
|
||||||
|
--p-menubar-item-gap: var(--p-navigation-item-gap);
|
||||||
|
--p-menubar-item-icon-color: var(--p-navigation-item-icon-color);
|
||||||
|
--p-menubar-item-icon-focus-color: var(--p-navigation-item-icon-focus-color);
|
||||||
|
--p-menubar-item-icon-active-color: var(--p-navigation-item-icon-active-color);
|
||||||
|
--p-menubar-base-item-border-radius: var(--menu-border-radius);
|
||||||
|
--p-menubar-base-item-padding: var(--p-navigation-item-padding);
|
||||||
|
--p-menubar-background: var(--background-transparent);
|
||||||
|
--p-menubar-border-color: var(--border-default-grey);
|
||||||
|
--p-menubar-border-radius: var(--menu-border-radius);
|
||||||
|
--p-menubar-color: var(--menu-default-color);
|
||||||
|
--p-menubar-gap: 0.5rem;
|
||||||
|
--p-menubar-padding: var(--menu-padding);
|
||||||
|
--p-menubar-transition-duration: var(--transition-duration);
|
||||||
|
}
|
23
src/assets/style/primevue-style/navigation.css
Normal file
23
src/assets/style/primevue-style/navigation.css
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
:root{
|
||||||
|
--p-navigation-submenu-icon-size: 0.875rem;
|
||||||
|
--p-navigation-submenu-label-padding: var(--menu-padding);
|
||||||
|
--p-navigation-submenu-label-font-weight: var( --titles-H4-SM-weight);
|
||||||
|
--p-navigation-item-padding: calc(var(--menu-padding) * 3);
|
||||||
|
--p-navigation-item-border-radius: var(--p-border-radius-sm);
|
||||||
|
--p-navigation-item-gap: var(--menu-item-gap);
|
||||||
|
--p-navigation-list-padding: var(--menu-padding);
|
||||||
|
--p-navigation-list-gap: var(--menu-gap);
|
||||||
|
--p-navigation-submenu-icon-color: var(--menu-default-color);
|
||||||
|
--p-navigation-submenu-icon-focus-color: var(--menu-active-color);
|
||||||
|
--p-navigation-submenu-icon-active-color: var(--menu-active-color);
|
||||||
|
--p-navigation-submenu-label-background: var(--menu-default-background);
|
||||||
|
--p-navigation-submenu-label-color: var(--menu-default-color);
|
||||||
|
--p-navigation-item-focus-background: var(--menu-default-background);
|
||||||
|
--p-navigation-item-active-background: var(--menu-default-background);
|
||||||
|
--p-navigation-item-color: var(--menu-default-color);
|
||||||
|
--p-navigation-item-focus-color: var(--menu-active-color);
|
||||||
|
--p-navigation-item-active-color: var(--menu-active-color);
|
||||||
|
--p-navigation-item-icon-color: var(--menu-default-color);
|
||||||
|
--p-navigation-item-icon-focus-color: var(--menu-active-color);
|
||||||
|
--p-navigation-item-icon-active-color: var(--menu-active-color);
|
||||||
|
}
|
|
@ -14,4 +14,7 @@
|
||||||
--p-overlay-popover-shadow: var(--shadow);
|
--p-overlay-popover-shadow: var(--shadow);
|
||||||
--p-overlay-select-border-radius: 0px;
|
--p-overlay-select-border-radius: 0px;
|
||||||
--p-overlay-select-shadow: var(--shadow);
|
--p-overlay-select-shadow: var(--shadow);
|
||||||
|
--p-overlay-select-background: var(--input-background);
|
||||||
|
--p-overlay-select-border-color: var(--input-border-color);
|
||||||
|
--p-overlay-select-color: var(--input-color);
|
||||||
}
|
}
|
||||||
|
|
24
src/assets/style/primevue-style/paginator.css
Normal file
24
src/assets/style/primevue-style/paginator.css
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
:root{
|
||||||
|
--p-paginator-jump-to-page-input-max-width: 2.5rem;
|
||||||
|
--p-paginator-current-page-report-color: var(--text-action-high-grey);
|
||||||
|
--p-paginator-nav-button-background: transparent;
|
||||||
|
--p-paginator-nav-button-hover-background: var(--background-transparent-hover);
|
||||||
|
--p-paginator-nav-button-selected-background: var(--background-action-high-blue-france);
|
||||||
|
--p-paginator-nav-button-color: var(--text-action-high-grey);
|
||||||
|
--p-paginator-nav-button-hover-color: var(--text-action-high-grey);
|
||||||
|
--p-paginator-nav-button-selected-color: var(--text-inverted-blue-france);
|
||||||
|
--p-paginator-nav-button-width: 2rem;
|
||||||
|
--p-paginator-nav-button-height: 2rem;
|
||||||
|
--p-paginator-nav-button-border-radius: 0px;
|
||||||
|
--p-paginator-nav-button-focus-ring-width: var(--focus-width);
|
||||||
|
--p-paginator-nav-button-focus-ring-style: var(--focus-style);
|
||||||
|
--p-paginator-nav-button-focus-ring-color: var(--focus-color);
|
||||||
|
--p-paginator-nav-button-focus-ring-offset: var(--focus-offset);
|
||||||
|
/* --p-paginator-nav-button-focus-ring-shadow: var(--p-focus-ring-shadow); */
|
||||||
|
--p-paginator-padding: 0px;
|
||||||
|
--p-paginator-gap: 1rem;
|
||||||
|
--p-paginator-border-radius: 0px;
|
||||||
|
--p-paginator-background: transparent;
|
||||||
|
--p-paginator-color: var(--text-action-high-grey);
|
||||||
|
--p-paginator-transition-duration: var(--transition-duration);
|
||||||
|
}
|
|
@ -6,8 +6,8 @@
|
||||||
--p-toast-content-padding: 0.25rem;
|
--p-toast-content-padding: 0.25rem;
|
||||||
--p-toast-content-gap: 0.5rem;
|
--p-toast-content-gap: 0.5rem;
|
||||||
--p-toast-text-gap: 0.5rem;
|
--p-toast-text-gap: 0.5rem;
|
||||||
--p-toast-summary-font-weight: var( --text-body-MD-standard-text-weight);
|
--p-toast-summary-font-weight: var( --text-body-MD-standard-text-Medium-weight);
|
||||||
--p-toast-summary-font-size: var(--text-body-MD-standard-text-size);
|
--p-toast-summary-font-size: var(--text-body-MD-standard-text-Medium-size);
|
||||||
--p-toast-detail-font-weight: var( --text-body-MD-standard-text-Regular-weight);
|
--p-toast-detail-font-weight: var( --text-body-MD-standard-text-Regular-weight);
|
||||||
--p-toast-detail-font-size: var(--text-body-MD-standard-text-Regular-size);
|
--p-toast-detail-font-size: var(--text-body-MD-standard-text-Regular-size);
|
||||||
/* info */
|
/* info */
|
||||||
|
|
|
@ -3,4 +3,11 @@
|
||||||
--p-text-muted-color: var(--text-action-high-grey);
|
--p-text-muted-color: var(--text-action-high-grey);
|
||||||
--p-transition-duration: var(--transition-duration);
|
--p-transition-duration: var(--transition-duration);
|
||||||
--p-anchor-gutter: 2px;
|
--p-anchor-gutter: 2px;
|
||||||
|
--p-content-background: var(--input-background);
|
||||||
|
--p-content-hover-background: var(--background-transparent-active);
|
||||||
|
--p-content-border-color: var(--border-action-high-grey);
|
||||||
|
--p-content-color: var(--text-action-high-grey);
|
||||||
|
--p-content-hover-color: var(--text-action-high-grey);
|
||||||
|
--p-content-border-radius: 0px;
|
||||||
|
--p-primary-color: var(--background-action-high-blue-france);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Accordion from 'primevue/accordion';
|
import Accordion from 'primevue/accordion';
|
||||||
import VAccordionChild from './VAccordionChild.vue';
|
import VAccordionChild from './VAccordionChild.vue';
|
||||||
import type IVAccordion from './IVAccordion.type';
|
import type IVAccordion from './IVAccordion.type.js';
|
||||||
import { ref, watch } from 'vue';
|
import { ref, watch } from 'vue';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<IVAccordion>(), {
|
const props = withDefaults(defineProps<IVAccordion>(), {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import AccordionPanel from 'primevue/accordionpanel';
|
import AccordionPanel from 'primevue/accordionpanel';
|
||||||
import AccordionHeader from 'primevue/accordionheader';
|
import AccordionHeader from 'primevue/accordionheader';
|
||||||
import AccordionContent from 'primevue/accordioncontent';
|
import AccordionContent from 'primevue/accordioncontent';
|
||||||
import type IVAccordion from './IVAccordion.type';
|
import type IVAccordion from './IVAccordion.type.js';
|
||||||
import { useId } from 'vue';
|
import { useId } from 'vue';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<IVAccordion>(), {
|
const props = withDefaults(defineProps<IVAccordion>(), {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type IVBadge from './IVBadge.type';
|
import type IVBadge from './IVBadge.type.js';
|
||||||
import Tag from 'primevue/tag';
|
import Tag from 'primevue/tag';
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Button from 'primevue/button';
|
import Button from 'primevue/button';
|
||||||
import type IVButton from './IVButton.type';
|
import type IVButton from './IVButton.type.js';
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import styles from '@visua/typography.module.css';
|
import styles from '@visua/typography.module.css';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import VButton from './VButton.vue';
|
import VButton from './VButton.vue';
|
||||||
import type IVButtonGroup from './IVButton.type.ts';
|
import type IVButtonGroup from './IVButton.type.js';
|
||||||
import { computed, ref, onMounted } from 'vue';
|
import { computed, ref, onMounted } from 'vue';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<IVButtonGroup>(), {
|
const props = withDefaults(defineProps<IVButtonGroup>(), {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Button from 'primevue/button';
|
import Button from 'primevue/button';
|
||||||
import type IVLink from '@/components/button/IVLink.type';
|
import type IVLink from '@/components/button/IVLink.type.js';
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import styles from '@visua/typography.module.css';
|
import styles from '@visua/typography.module.css';
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import Checkbox from 'primevue/checkbox';
|
import Checkbox from 'primevue/checkbox';
|
||||||
import VLabel from '../label/VLabel.vue';
|
import VLabel from '../label/VLabel.vue';
|
||||||
import VHint from '../hint/VHint.vue';
|
import VHint from '../hint/VHint.vue';
|
||||||
import type IVCheckBox from './IVCheckbox.type';
|
import type IVCheckBox from './IVCheckbox.type.js';
|
||||||
import { useId, computed, watch, ref } from 'vue';
|
import { useId, computed, watch, ref } from 'vue';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<IVCheckBox>(), {
|
const props = withDefaults(defineProps<IVCheckBox>(), {
|
||||||
|
|
2
src/components/composable/index.ts
Normal file
2
src/components/composable/index.ts
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
export * from './useAlert.js';
|
||||||
|
export * from './useConfirmModal.js';
|
|
@ -1,5 +1,5 @@
|
||||||
import { useToast } from "primevue/usetoast";
|
import { useToast } from "primevue/usetoast";
|
||||||
import type IVAlert from "@/components/alert/IVAlert.type";
|
import type IVAlert from "../alert/IVAlert.type.js";
|
||||||
|
|
||||||
export function useAlert() {
|
export function useAlert() {
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
|
|
|
@ -6,16 +6,20 @@ import VButton from '../button/VButton.vue';
|
||||||
import VButtonGroup from '../button/VButtonGroup.vue';
|
import VButtonGroup from '../button/VButtonGroup.vue';
|
||||||
import VFile from './VFile.vue';
|
import VFile from './VFile.vue';
|
||||||
import VMessage from '../message/VMessage.vue';
|
import VMessage from '../message/VMessage.vue';
|
||||||
import VScrollpanel from '../scrollpanel/VScrollpanel.vue';
|
import VScrollPanel from '../scrollpanel/VScrollPanel.vue';
|
||||||
import VLabelErrorProxy from './VLabelErrorProxy.vue';
|
import VLabelErrorProxy from './VLabelErrorProxy.vue';
|
||||||
import type IVFileUpload from './IVFileUpload.type';
|
import type IVFileUpload from './IVFileUpload.type.js';
|
||||||
import type { FileUploadErrorEvent, FileUploadProgressEvent, FileUploadRemoveEvent, FileUploadSelectEvent, FileUploadUploadEvent } from 'primevue/fileupload';
|
import type { FileUploadErrorEvent, FileUploadProgressEvent, FileUploadRemoveEvent, FileUploadSelectEvent, FileUploadUploadEvent } from 'primevue/fileupload';
|
||||||
import { computed, useId, ref } from 'vue';
|
import { computed, useId, ref } from 'vue';
|
||||||
import styles from '@visua/typography.module.css';
|
import styles from '@visua/typography.module.css';
|
||||||
|
|
||||||
const fileUploadRef = ref();
|
const fileUploadRef = ref();
|
||||||
const fileProgressMap = ref<Record<string, number>>({});
|
const fileProgressMap = ref<Record<string, number>>({});
|
||||||
const hasActiveError = ref(false);
|
const hasValidationError = ref(false);
|
||||||
|
const hasSystemError = ref(false);
|
||||||
|
const systemErrorMessage = ref('');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
|
@ -72,7 +76,6 @@ const handleSelect = (event: FileUploadSelectEvent) => {
|
||||||
|
|
||||||
const handleClear = () => {
|
const handleClear = () => {
|
||||||
emit('clear');
|
emit('clear');
|
||||||
hasActiveError.value = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleUpload = (event: FileUploadUploadEvent) => {
|
const handleUpload = (event: FileUploadUploadEvent) => {
|
||||||
|
@ -81,7 +84,6 @@ const handleUpload = (event: FileUploadUploadEvent) => {
|
||||||
|
|
||||||
const handleRemove = (event: FileUploadRemoveEvent) => {
|
const handleRemove = (event: FileUploadRemoveEvent) => {
|
||||||
emit('remove', event);
|
emit('remove', event);
|
||||||
hasActiveError.value =false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleProgress = (event: FileUploadProgressEvent) => {
|
const handleProgress = (event: FileUploadProgressEvent) => {
|
||||||
|
@ -95,11 +97,21 @@ const handleProgress = (event: FileUploadProgressEvent) => {
|
||||||
|
|
||||||
const handleError = (event: FileUploadErrorEvent) => {
|
const handleError = (event: FileUploadErrorEvent) => {
|
||||||
emit('error', event);
|
emit('error', event);
|
||||||
hasActiveError.value = true;
|
hasSystemError.value = true;
|
||||||
|
|
||||||
|
const status = event.xhr?.status;
|
||||||
|
const statusText = event.xhr?.statusText || 'Erreur inconnue';
|
||||||
|
const fileNames = Array.isArray(event.files)
|
||||||
|
? event.files.map(f => f.name).join(', ')
|
||||||
|
: event.files.name;
|
||||||
|
|
||||||
|
systemErrorMessage.value = `Echec de téléversement du fichier ${fileNames} {Status : ${status} | Message : <${statusText}>}`;
|
||||||
|
|
||||||
if (!props.advanced && fileUploadRef.value) {
|
if (!props.advanced && fileUploadRef.value) {
|
||||||
fileUploadRef.value.uploadedFiles = [];
|
fileUploadRef.value.uploadedFiles = [];
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
const lastSelectedFile = computed(() => {
|
const lastSelectedFile = computed(() => {
|
||||||
const files = fileUploadRef.value?.files || [];
|
const files = fileUploadRef.value?.files || [];
|
||||||
|
@ -114,10 +126,10 @@ const padding = computed(() => props.advanced ? '1.125rem' : '0rem')
|
||||||
const borderColor = computed(() => props.advanced ? 'var(--border-default-grey)' : 'transparent');
|
const borderColor = computed(() => props.advanced ? 'var(--border-default-grey)' : 'transparent');
|
||||||
|
|
||||||
const labelState = computed(() => {
|
const labelState = computed(() => {
|
||||||
if(!hasActiveError.value && !props.disabled) return 'default';
|
if ((hasValidationError.value || hasSystemError.value) && !props.disabled) return 'error';
|
||||||
else if(hasActiveError.value && !props.disabled) return 'error';
|
return 'default';
|
||||||
else return undefined
|
});
|
||||||
})
|
|
||||||
|
|
||||||
type MessageType = 'alert' | 'warning' | 'success' | 'info';
|
type MessageType = 'alert' | 'warning' | 'success' | 'info';
|
||||||
|
|
||||||
|
@ -222,27 +234,27 @@ const globalStatusMessage = computed<{
|
||||||
title="parcourir les fichiers"
|
title="parcourir les fichiers"
|
||||||
/>
|
/>
|
||||||
<span
|
<span
|
||||||
v-if="(!slotProps.files || slotProps.files.length === 0) && (!slotProps.uploadedFiles || slotProps.uploadedFiles.length === 0) && !hasActiveError"
|
v-if="(!slotProps.files || slotProps.files.length === 0) && (!slotProps.uploadedFiles || slotProps.uploadedFiles.length === 0) && !(hasSystemError || hasValidationError)"
|
||||||
:class="[styles['text-body-SM-detail-text-Regular']]"
|
:class="[styles['text-body-SM-detail-text-Regular']]"
|
||||||
>
|
>
|
||||||
Aucun fichier sélectionné
|
Aucun fichier sélectionné
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #empty v-if="props.advanced && !hasActiveError">
|
<template #empty v-if="props.advanced && !(hasSystemError || hasValidationError)">
|
||||||
<div class="fileupload-empty" :class="[styles['text-body-SM-detail-text-Regular']]">
|
<div class="fileupload-empty" :class="[styles['text-body-SM-detail-text-Regular']]">
|
||||||
<i class="ri-upload-cloud-line upload-cloud-icon"></i>
|
<i class="ri-upload-cloud-line upload-cloud-icon"></i>
|
||||||
<p>Glissez-déposez les fichiers ici pour les téléverser.</p>
|
<p>Glissez-déposez les fichiers ici pour les téléverser.</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #content="slotProps">
|
<template #content="slotProps">
|
||||||
<div v-if="props.advanced && !hasActiveError" style="margin-top: 0.75rem;" class="file-content">
|
<div v-if="props.advanced && !(hasValidationError || hasSystemError)" style="margin-top: 0.75rem;" class="file-content">
|
||||||
<VMessage
|
<VMessage
|
||||||
v-if="globalStatusMessage"
|
v-if="globalStatusMessage"
|
||||||
:type="globalStatusMessage.type"
|
:type="globalStatusMessage.type"
|
||||||
:title="globalStatusMessage.title"
|
:title="globalStatusMessage.title"
|
||||||
/>
|
/>
|
||||||
<VScrollpanel height="20rem">
|
<VScrollPanel height="20rem">
|
||||||
<div class="file-area">
|
<div class="file-area">
|
||||||
<div v-if="slotProps.files.length > 0" class="file-non-uploaded-area">
|
<div v-if="slotProps.files.length > 0" class="file-non-uploaded-area">
|
||||||
<VFile
|
<VFile
|
||||||
|
@ -269,9 +281,9 @@ const globalStatusMessage = computed<{
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</VScrollpanel>
|
</VScrollPanel>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!props.advanced && !hasActiveError">
|
<div v-if="!props.advanced && !(hasValidationError || hasSystemError)">
|
||||||
<VFile
|
<VFile
|
||||||
v-if="lastSelectedFile"
|
v-if="lastSelectedFile"
|
||||||
:file="lastSelectedFile"
|
:file="lastSelectedFile"
|
||||||
|
@ -290,14 +302,17 @@ const globalStatusMessage = computed<{
|
||||||
aria-live="polite"
|
aria-live="polite"
|
||||||
>
|
>
|
||||||
<VHint
|
<VHint
|
||||||
v-for="message of slotProps.messages"
|
v-for="message of [...(slotProps.messages ?? []), ...(hasSystemError ? [systemErrorMessage] : [])]"
|
||||||
:key="message"
|
:key="message"
|
||||||
:title="message"
|
:title="message"
|
||||||
type="alert"
|
type="alert"
|
||||||
icon
|
icon
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<VLabelErrorProxy :hasError="(slotProps.messages ?? []).length > 0" @update:error="hasActiveError = $event" />
|
<VLabelErrorProxy
|
||||||
|
:hasError="(slotProps.messages ?? []).length > 0"
|
||||||
|
@update:error="hasValidationError = $event"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</FileUpload>
|
</FileUpload>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type IVGroup from './IVGroup.type';
|
import type IVGroup from './IVGroup.type.js';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<IVGroup>(), {
|
const props = withDefaults(defineProps<IVGroup>(), {
|
||||||
type: 'default',
|
type: 'default',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Message from 'primevue/message';
|
import Message from 'primevue/message';
|
||||||
import type IVHint from './IVHint.type';
|
import type IVHint from './IVHint.type.js';
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import styles from '@visua/typography.module.css';
|
import styles from '@visua/typography.module.css';
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import Textarea from 'primevue/textarea';
|
||||||
import VHint from '../hint/VHint.vue';
|
import VHint from '../hint/VHint.vue';
|
||||||
import VDivider from '../divider/VDivider.vue';
|
import VDivider from '../divider/VDivider.vue';
|
||||||
import VLabel from '../label/VLabel.vue';
|
import VLabel from '../label/VLabel.vue';
|
||||||
import type IVInput from './IVInput.type';
|
import type IVInput from './IVInput.type.js';
|
||||||
import { computed, useAttrs, useId, ref, watch } from 'vue';
|
import { computed, useAttrs, useId, ref, watch } from 'vue';
|
||||||
import styles from '@visua/typography.module.css';
|
import styles from '@visua/typography.module.css';
|
||||||
import Password from 'primevue/password';
|
import Password from 'primevue/password';
|
||||||
|
@ -70,7 +70,7 @@ const labelState = computed(() => {
|
||||||
v-if="props.labelVisible"
|
v-if="props.labelVisible"
|
||||||
:for="props.id"
|
:for="props.id"
|
||||||
:label="props.label"
|
:label="props.label"
|
||||||
:required="!props.disabled"
|
:required="!props.disabled && props.required"
|
||||||
:disabled="props.disabled"
|
:disabled="props.disabled"
|
||||||
:type="labelState"
|
:type="labelState"
|
||||||
:hint="props.hint"
|
:hint="props.hint"
|
||||||
|
|
18
src/components/interface/index.ts
Normal file
18
src/components/interface/index.ts
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
export type { default as IVAccordion } from '../accordion/IVAccordion.type.js';
|
||||||
|
export type { default as IVAlert } from '../alert/IVAlert.type.js';
|
||||||
|
export type { default as IVBadge } from '../badge/IVBadge.type.js';
|
||||||
|
export type { default as IVButton } from '../button/IVButton.type.js';
|
||||||
|
export type { default as IVButtonGroup } from '../button/IVButton.type.js';
|
||||||
|
export type { default as IVCheckbox } from '../checkbox/IVCheckbox.type.js';
|
||||||
|
export type { default as IVLink } from '../button/IVLink.type.js';
|
||||||
|
export type { default as IVFileUpload } from '../file/IVFileUpload.type.js';
|
||||||
|
export type { default as IVGroup } from '../group/IVGroup.type.js';
|
||||||
|
export type { default as IVHint } from '../hint/IVHint.type.js';
|
||||||
|
export type { default as IVInput } from '../input/IVInput.type.js';
|
||||||
|
export type { default as IVLabel } from '../label/IVLabel.type.js';
|
||||||
|
export type { default as IVMessage } from '../message/IVMessage.type.js';
|
||||||
|
export type { default as IVModal } from '../modal/IVModal.type.js';
|
||||||
|
export type { default as IVProgressBar } from '../progressbar/IVProgressBar.type.js';
|
||||||
|
export type { default as IVSelect } from '../select/IVSelect.type.js';
|
||||||
|
export type { default as IVMenuBar } from '../menu/IVMenuBar.type.js';
|
||||||
|
export type { default as IVMenuBarItem } from '../menu/IVMenuBar.type.js';
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type IVLabel from './IVLabel.type';
|
import type IVLabel from './IVLabel.type.js';
|
||||||
import styles from '@visua/typography.module.css';
|
import styles from '@visua/typography.module.css';
|
||||||
import VHint from '../hint/VHint.vue';
|
import VHint from '../hint/VHint.vue';
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ const props = withDefaults(defineProps<IVLabel>(), {
|
||||||
<template>
|
<template>
|
||||||
<label
|
<label
|
||||||
:for="props.for"
|
:for="props.for"
|
||||||
|
class="label-container"
|
||||||
:class="[styles['text-body-MD-standard-text-Regular'], {
|
:class="[styles['text-body-MD-standard-text-Regular'], {
|
||||||
'label': props.type === 'default',
|
'label': props.type === 'default',
|
||||||
'success': props.type === 'success',
|
'success': props.type === 'success',
|
||||||
|
@ -23,12 +24,14 @@ const props = withDefaults(defineProps<IVLabel>(), {
|
||||||
:aria-label="props.label"
|
:aria-label="props.label"
|
||||||
:aria-disabled="props.disabled"
|
:aria-disabled="props.disabled"
|
||||||
>
|
>
|
||||||
|
<span>
|
||||||
{{ props.label }}
|
{{ props.label }}
|
||||||
<template v-if="props.required">
|
<template v-if="props.required">
|
||||||
<span v-if="props.required" :class="{ 'required': !props.disabled}">
|
<span v-if="props.required" :class="{ 'required': !props.disabled}">
|
||||||
<slot name="required-tip">*</slot>
|
<slot name="required-tip">*</slot>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
</span>
|
||||||
<VHint
|
<VHint
|
||||||
v-if="props.hint"
|
v-if="props.hint"
|
||||||
:title="props.hint"
|
:title="props.hint"
|
||||||
|
@ -38,6 +41,18 @@ const props = withDefaults(defineProps<IVLabel>(), {
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="css" scoped>
|
<style lang="css" scoped>
|
||||||
|
*{
|
||||||
|
padding: 0px;
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label-container{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: start;
|
||||||
|
gap: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
.label {color: var(--text-label-grey);}
|
.label {color: var(--text-label-grey);}
|
||||||
.success {color: var(--text-default-success);}
|
.success {color: var(--text-default-success);}
|
||||||
.error {color: var(--text-default-error);}
|
.error {color: var(--text-default-error);}
|
||||||
|
|
93
src/components/menu/IVMenuBar.type.ts
Normal file
93
src/components/menu/IVMenuBar.type.ts
Normal file
|
@ -0,0 +1,93 @@
|
||||||
|
import type { HTMLAttributes } from "vue"
|
||||||
|
import type { RouteLocationRaw } from "vue-router"
|
||||||
|
import type { MenuItem } from "primevue/menuitem"
|
||||||
|
/**
|
||||||
|
* Describes a link or button item in a menu bar.
|
||||||
|
*/
|
||||||
|
export interface IVMenuBarLinks {
|
||||||
|
/** Whether the item should be rendered as a button */
|
||||||
|
button?: boolean;
|
||||||
|
|
||||||
|
/** Name of the icon to display on the left */
|
||||||
|
icon?: string;
|
||||||
|
|
||||||
|
/** Whether the icon appears on the right side */
|
||||||
|
iconRight?: boolean;
|
||||||
|
|
||||||
|
/** Text label for the item */
|
||||||
|
label?: string;
|
||||||
|
|
||||||
|
/** Target URL if rendered as an anchor (<a>) */
|
||||||
|
target?: string;
|
||||||
|
|
||||||
|
/** Callback executed when the item is clicked */
|
||||||
|
onClick?: ($event: MouseEvent) => void;
|
||||||
|
|
||||||
|
/** Navigation route */
|
||||||
|
to?: RouteLocationRaw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extends PrimeVue's MenuItem with optional routing capabilities.
|
||||||
|
* Excludes 'style' and 'class' to avoid conflicts with Vue attributes.
|
||||||
|
*/
|
||||||
|
export interface IVMenuBarItem
|
||||||
|
extends Partial<Omit<MenuItem, 'style' | 'class'>>,
|
||||||
|
Partial<Pick<IVMenuBarLinks, 'to'>> {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interface for configuring a customizable menu bar component.
|
||||||
|
*/
|
||||||
|
export default interface IVMenuBar {
|
||||||
|
/** HTML id for the searchbar input */
|
||||||
|
searchbarId?: string;
|
||||||
|
|
||||||
|
/** Title of the service or application */
|
||||||
|
serviceTitle?: string;
|
||||||
|
|
||||||
|
/** Description of the service */
|
||||||
|
serviceDescription?: string;
|
||||||
|
|
||||||
|
/** Text displayed beside the logo (can be multiline) */
|
||||||
|
logoText?: string | string[];
|
||||||
|
|
||||||
|
/** Whether to show the logo */
|
||||||
|
logo?: boolean;
|
||||||
|
|
||||||
|
/** Bound model value for the search input */
|
||||||
|
modelValue?: string;
|
||||||
|
|
||||||
|
/** Placeholder text for the search input */
|
||||||
|
placeholder?: string;
|
||||||
|
|
||||||
|
/** List of quick link items with additional HTML attributes */
|
||||||
|
quickLinks?: (IVMenuBarItem & HTMLAttributes)[];
|
||||||
|
|
||||||
|
/** Label for the search input (accessibility) */
|
||||||
|
searchLabel?: string;
|
||||||
|
|
||||||
|
/** ARIA label for the quick links section */
|
||||||
|
quickLinksAriaLabel?: string;
|
||||||
|
|
||||||
|
/** Whether to display the search bar */
|
||||||
|
showSearch?: boolean;
|
||||||
|
|
||||||
|
/** Label describing the search bar visibility */
|
||||||
|
showSearchLabel?: string;
|
||||||
|
|
||||||
|
/** Label for the main menu toggle button */
|
||||||
|
menuLabel?: string;
|
||||||
|
|
||||||
|
/** Label used in modal menus */
|
||||||
|
menuModalLabel?: string;
|
||||||
|
|
||||||
|
/** Label for closing the modal menu */
|
||||||
|
closeMenuModalLabel?: string;
|
||||||
|
|
||||||
|
/** Responsive breakpoints (e.g. Tailwind-style classes) */
|
||||||
|
breakpoints?: string;
|
||||||
|
|
||||||
|
logoPath?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
122
src/components/menu/VMenuBar.vue
Normal file
122
src/components/menu/VMenuBar.vue
Normal file
|
@ -0,0 +1,122 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
import Menubar from 'primevue/menubar';
|
||||||
|
import type IVMenuBar from './IVMenuBar.type.js';
|
||||||
|
import styles from '@visua/typography.module.css'
|
||||||
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
|
const props = withDefaults(defineProps<IVMenuBar>(), {
|
||||||
|
searchbarId: 'searchbar-header',
|
||||||
|
serviceTitle: undefined,
|
||||||
|
serviceDescription: undefined,
|
||||||
|
logo: false,
|
||||||
|
logoText: undefined,
|
||||||
|
breakpoints: '960px',
|
||||||
|
quickLinks: undefined,
|
||||||
|
menuLabel: undefined,
|
||||||
|
logoPath: '/home',
|
||||||
|
})
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<Menubar
|
||||||
|
role="banner"
|
||||||
|
:model="props.quickLinks"
|
||||||
|
:breakpoint="props.breakpoints"
|
||||||
|
class="p-menubar"
|
||||||
|
>
|
||||||
|
<template #start>
|
||||||
|
<RouterLink :to=props.logoPath class="logo-container">
|
||||||
|
<div v-if="$slots.logo" class="logo">
|
||||||
|
<slot name="logo"/>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
v-if="!!props.serviceTitle"
|
||||||
|
:class="[styles['titles-H6-XXS']]"
|
||||||
|
style="color: var(--text-title-grey);"
|
||||||
|
>
|
||||||
|
{{ props.serviceTitle }}
|
||||||
|
</span>
|
||||||
|
</RouterLink>
|
||||||
|
</template>
|
||||||
|
<template #end>
|
||||||
|
<slot name="end"/>
|
||||||
|
</template>
|
||||||
|
<template #item="{ item, props, hasSubmenu }">
|
||||||
|
<component
|
||||||
|
v-if="hasSubmenu || 'label' in item || 'icon' in item"
|
||||||
|
:is="item.to ? 'RouterLink' : item.url ? 'a' : 'div'"
|
||||||
|
:to="item.to"
|
||||||
|
:href="item.url"
|
||||||
|
:target="item.target"
|
||||||
|
:tabindex="0"
|
||||||
|
v-bind="props.action"
|
||||||
|
class="item"
|
||||||
|
:class="[styles['text-body-LG-article-text-Regular'],
|
||||||
|
item.to === route.path ? 'active' : ''
|
||||||
|
]"
|
||||||
|
>
|
||||||
|
<slot name="itemicon" :item="item" v-if="'icon' in item">
|
||||||
|
<i :class="[item.icon]"></i>
|
||||||
|
</slot>
|
||||||
|
<span v-if="'label' in item" style="width: 100%;">{{ item.label }}</span>
|
||||||
|
<slot name="submenuicon" v-if="hasSubmenu">
|
||||||
|
<i class="ri-arrow-down-s-line"/>
|
||||||
|
</slot>
|
||||||
|
</component>
|
||||||
|
</template>
|
||||||
|
<template #button="{id, toggleCallback}">
|
||||||
|
<slot name="button" :id="id" :toggleCallback="toggleCallback"/>
|
||||||
|
</template>
|
||||||
|
<template #buttonicon>
|
||||||
|
<slot name="buttonicon"/>
|
||||||
|
</template>
|
||||||
|
</Menubar>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="css" scoped>
|
||||||
|
*{
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a{
|
||||||
|
color: var(--p-menubar-color);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.logo{
|
||||||
|
display: block;
|
||||||
|
width: 25%;
|
||||||
|
height: auto;
|
||||||
|
padding: 0px;
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo-container{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
width: fit-content;
|
||||||
|
gap: var(--p-menubar-gap);
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-menubar{
|
||||||
|
width: 100%;
|
||||||
|
height: 4.5rem;
|
||||||
|
border-width: 0px 0px var(--border-width) 0px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: var(--p-menubar-border-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.item:hover,
|
||||||
|
.item.active{
|
||||||
|
color: var(--menu-active-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.item.active {
|
||||||
|
height: 100%;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type IVMessage from './IVMessage.type';
|
import type IVMessage from './IVMessage.type.js';
|
||||||
import Message from 'primevue/message';
|
import Message from 'primevue/message';
|
||||||
import VButton from '../button/VButton.vue';
|
import VButton from '../button/VButton.vue';
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import type { HTMLAttributes } from 'vue';
|
import type { HTMLAttributes } from 'vue';
|
||||||
import type IVButton from '../button/IVButton.type';
|
import type IVButton from '../button/IVButton.type.js';
|
||||||
import { type DialogBreakpoints } from 'primevue';
|
import { type DialogBreakpoints } from 'primevue';
|
||||||
import type { HintedString } from '@primevue/core';
|
import type { HintedString } from '@primevue/core';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import ProgressBar from 'primevue/progressbar';
|
import ProgressBar from 'primevue/progressbar';
|
||||||
import type IVProgressBar from './IVProgressBar.type';
|
import type IVProgressBar from './IVProgressBar.type.js';
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<IVProgressBar>(), {
|
const props = withDefaults(defineProps<IVProgressBar>(), {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Select from 'primevue/select';
|
import Select, { type SelectSlots } from 'primevue/select';
|
||||||
import type IVSelect from './IVSelect.type';
|
import type IVSelect from './IVSelect.type.js';
|
||||||
import { useId, computed, watch, ref } from 'vue';
|
import { useId, computed, watch, ref } from 'vue';
|
||||||
import VLabel from '../label/VLabel.vue';
|
import VLabel from '../label/VLabel.vue';
|
||||||
import VHint from '../hint/VHint.vue';
|
import VHint from '../hint/VHint.vue';
|
||||||
|
@ -29,9 +29,7 @@ const props = withDefaults(defineProps<IVSelect>(), {
|
||||||
selectionMessage: 'Elements sélectionnés',
|
selectionMessage: 'Elements sélectionnés',
|
||||||
emptySelectionMessage: 'Aucun élément sélectionné',
|
emptySelectionMessage: 'Aucun élément sélectionné',
|
||||||
emptyFilterMessage: 'Aucun résultat trouvé',
|
emptyFilterMessage: 'Aucun résultat trouvé',
|
||||||
emptyMessage: 'Aucune option disponible',
|
emptyMessage: 'Aucune option disponible'
|
||||||
optionTemplate: false,
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits([
|
const emit = defineEmits([
|
||||||
|
@ -78,20 +76,48 @@ const labelState = computed(() => {
|
||||||
else if(props.errorMessage && !props.successMessage && !props.disabled) return 'error';
|
else if(props.errorMessage && !props.successMessage && !props.disabled) return 'error';
|
||||||
else return undefined
|
else return undefined
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
type VSelectSlots = SelectSlots & {
|
||||||
|
required?: (props: Record<string, unknown>) => unknown
|
||||||
|
};
|
||||||
|
|
||||||
|
const slots = defineSlots<VSelectSlots>();
|
||||||
|
|
||||||
|
const selectSlotKeys = [
|
||||||
|
'value',
|
||||||
|
'header',
|
||||||
|
'footer',
|
||||||
|
'option',
|
||||||
|
'optiongroup',
|
||||||
|
'emptyfilter',
|
||||||
|
'empty',
|
||||||
|
'content',
|
||||||
|
'loader',
|
||||||
|
'clearicon',
|
||||||
|
'dropdownicon',
|
||||||
|
'loadingicon',
|
||||||
|
'filtericon'
|
||||||
|
] as const;
|
||||||
|
|
||||||
|
const availableSlots = computed(() =>
|
||||||
|
selectSlotKeys.filter((key) => !!slots[key]).map((key) => [key, slots[key]])
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="main-container">
|
<div class="main-container">
|
||||||
<VLabel
|
<VLabel
|
||||||
|
v-if="props.label"
|
||||||
:for="props.selectId"
|
:for="props.selectId"
|
||||||
:label="props.label"
|
:label="props.label"
|
||||||
:required="!props.disabled"
|
:required="props.required && !props.disabled"
|
||||||
:disabled="props.disabled"
|
:disabled="props.disabled"
|
||||||
:type="labelState"
|
:type="labelState"
|
||||||
:hint="props.hint"
|
:hint="props.hint"
|
||||||
>
|
>
|
||||||
<template #required-type v-if="props.required">
|
<template #required-type v-if="props.required">
|
||||||
<slot name="required-type"/>
|
<slot name="required"/>
|
||||||
</template>
|
</template>
|
||||||
</VLabel>
|
</VLabel>
|
||||||
<Select
|
<Select
|
||||||
|
@ -140,8 +166,12 @@ const labelState = computed(() => {
|
||||||
}
|
}
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<template v-if="props.optionTemplate" #option="{option, selected, index}">
|
<template
|
||||||
<slot name="option" :option="option" :selected="selected" :index="index"/>
|
v-for="([name]) in availableSlots"
|
||||||
|
:key="name"
|
||||||
|
v-slot:[name]="slotProps"
|
||||||
|
>
|
||||||
|
<slot :name="name" v-bind="slotProps" />
|
||||||
</template>
|
</template>
|
||||||
</Select>
|
</Select>
|
||||||
<div
|
<div
|
||||||
|
@ -173,6 +203,8 @@ const labelState = computed(() => {
|
||||||
--p-select-dropdown-color: var(--text-disabled-grey);
|
--p-select-dropdown-color: var(--text-disabled-grey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.p-select.error, .p-select.success{border-width: var(--large-border-width);}
|
||||||
|
|
||||||
.p-select.error{
|
.p-select.error{
|
||||||
--p-select-border-color: var(--border-plain-error);
|
--p-select-border-color: var(--border-plain-error);
|
||||||
--p-select-hover-border-color: var(--border-plain-error);
|
--p-select-hover-border-color: var(--border-plain-error);
|
||||||
|
|
446
src/components/table/VDataTable.vue
Normal file
446
src/components/table/VDataTable.vue
Normal file
|
@ -0,0 +1,446 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
import DataTable from 'primevue/datatable';
|
||||||
|
import type { DataTableProps, DataTableSlots } from 'primevue/datatable';
|
||||||
|
import { useId, ref, watch, computed } from 'vue';
|
||||||
|
import styles from '@visua/typography.module.css';
|
||||||
|
|
||||||
|
export interface IVDataTable extends Partial<Omit<DataTableProps, 'pt' | 'dt' | 'ptOptions' | 'unstyled'>>{
|
||||||
|
id?: string
|
||||||
|
title?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const props = withDefaults(defineProps<IVDataTable>(), {
|
||||||
|
id: () => useId(),
|
||||||
|
title: '',
|
||||||
|
selection: undefined,
|
||||||
|
paginator: false,
|
||||||
|
rowsPerPageOptions: undefined,
|
||||||
|
rows: 0,
|
||||||
|
value: undefined,
|
||||||
|
dataKey: undefined,
|
||||||
|
showGridlines: false,
|
||||||
|
stripedRows: false,
|
||||||
|
first: 0,
|
||||||
|
totalRecords: 0,
|
||||||
|
pageLinkSize: 5,
|
||||||
|
paginatorPosition: 'bottom',
|
||||||
|
paginatorTemplate: undefined,
|
||||||
|
alwaysShowPaginator:true,
|
||||||
|
currentPageReportTemplate: '({currentPage} de {totalPages})',
|
||||||
|
lazy: false,
|
||||||
|
loading: false,
|
||||||
|
sortField: undefined,
|
||||||
|
sortOrder: undefined,
|
||||||
|
nullSortOrder: 1,
|
||||||
|
defaultSortOrder: 1,
|
||||||
|
sortMode: 'single',
|
||||||
|
removableSort: false,
|
||||||
|
filters: undefined,
|
||||||
|
filterDisplay: undefined,
|
||||||
|
globalFilterFields: undefined,
|
||||||
|
filterLocale: undefined,
|
||||||
|
selectionMode: undefined,
|
||||||
|
compareSelectionBy: 'deepEquals',
|
||||||
|
metaKeySelection: false,
|
||||||
|
contextMenu: false,
|
||||||
|
contextMenuSelection: undefined,
|
||||||
|
selectAll: undefined,
|
||||||
|
rowHover: false,
|
||||||
|
csvSeparator: ',',
|
||||||
|
exportFilename: 'download',
|
||||||
|
exportFunction: undefined,
|
||||||
|
resizableColumns: false,
|
||||||
|
columnResizeMode: 'fit',
|
||||||
|
reorderableColumns: false,
|
||||||
|
expandedRows: undefined,
|
||||||
|
expandedRowIcon: undefined,
|
||||||
|
collapsedRowIcon: undefined,
|
||||||
|
rowGroupMode: undefined,
|
||||||
|
groupRowsBy: undefined,
|
||||||
|
expandableRowGroups: false,
|
||||||
|
expandedRowGroups: undefined,
|
||||||
|
stateStorage: 'session',
|
||||||
|
stateKey: undefined,
|
||||||
|
editMode: undefined,
|
||||||
|
editingRows: undefined,
|
||||||
|
rowClass: undefined,
|
||||||
|
rowStyle: undefined,
|
||||||
|
scrollable: false,
|
||||||
|
scrollHeight: undefined,
|
||||||
|
virtualScrollerOptions: undefined,
|
||||||
|
frozenValue: undefined,
|
||||||
|
breakpoint: '960px',
|
||||||
|
showHeaders: true,
|
||||||
|
highlightOnSelect: false,
|
||||||
|
size: undefined,
|
||||||
|
tableClass: undefined,
|
||||||
|
tableProps: undefined,
|
||||||
|
tableStyle: undefined,
|
||||||
|
filterButtonProps: undefined,
|
||||||
|
editButtonProps: undefined,
|
||||||
|
multiSortMeta: undefined,
|
||||||
|
})
|
||||||
|
|
||||||
|
type VDataTableSlots = DataTableSlots & {
|
||||||
|
default?: (props: Record<string, unknown>) => unknown
|
||||||
|
};
|
||||||
|
|
||||||
|
const slots = defineSlots<VDataTableSlots>();
|
||||||
|
|
||||||
|
|
||||||
|
const dataTableSlotKeys = [
|
||||||
|
'header',
|
||||||
|
'footer',
|
||||||
|
'empty',
|
||||||
|
'groupheader',
|
||||||
|
'groupfooter',
|
||||||
|
'loading',
|
||||||
|
'expansion',
|
||||||
|
'loadingicon',
|
||||||
|
'rowreorderindicatorupicon',
|
||||||
|
'rowreorderindicatordownicon',
|
||||||
|
'rowgrouptogglericon',
|
||||||
|
'paginatorcontainer',
|
||||||
|
'paginatorstart',
|
||||||
|
'paginatorend',
|
||||||
|
'paginatorfirstpagelinkicon',
|
||||||
|
'paginatorprevpagelinkicon',
|
||||||
|
'paginatornextpagelinkicon',
|
||||||
|
'paginatorlastpagelinkicon',
|
||||||
|
'paginatorrowsperpagedropdownicon',
|
||||||
|
'paginatorjumptopagedropdownicon'
|
||||||
|
] as const;
|
||||||
|
|
||||||
|
const availableSlots = computed(() =>
|
||||||
|
dataTableSlotKeys.filter((key) => !!slots[key]).map((key) => [key, slots[key]])
|
||||||
|
);
|
||||||
|
|
||||||
|
const dataTableRef = ref();
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
exportCSV: () => dataTableRef.value.exportCSV()
|
||||||
|
});
|
||||||
|
|
||||||
|
const emit = defineEmits([
|
||||||
|
'update:selection',
|
||||||
|
'update:rows',
|
||||||
|
'update:sortField',
|
||||||
|
'update:sortOrder',
|
||||||
|
'update:multiSortMeta',
|
||||||
|
'update:contextMenuSelection',
|
||||||
|
'update:expandedRows',
|
||||||
|
'update:expandedRowGroups',
|
||||||
|
'update:filters',
|
||||||
|
'update:editingRows',
|
||||||
|
'update:first',
|
||||||
|
'page',
|
||||||
|
'sort',
|
||||||
|
'row-select',
|
||||||
|
'row-unselect',
|
||||||
|
'filter',
|
||||||
|
'value-change',
|
||||||
|
'row-click',
|
||||||
|
'row-dbclick',
|
||||||
|
'row-contextmenu',
|
||||||
|
'row-select-all',
|
||||||
|
'row-unselect-all',
|
||||||
|
'select-all-change',
|
||||||
|
'column-resize-end',
|
||||||
|
'column-reorder',
|
||||||
|
'row-reorder',
|
||||||
|
'row-expand',
|
||||||
|
'row-collapse',
|
||||||
|
'rowgroup-expand',
|
||||||
|
'rowgroup-collapse',
|
||||||
|
'cell-edit-init',
|
||||||
|
'cell-edit-complete',
|
||||||
|
'cell-edit-cancel',
|
||||||
|
'row-edit-init',
|
||||||
|
'row-edit-save',
|
||||||
|
'row-edit-cancel',
|
||||||
|
'state-restore',
|
||||||
|
'state-save',
|
||||||
|
]);
|
||||||
|
|
||||||
|
const localSelection = ref(props.selection);
|
||||||
|
watch(() => props.selection, (newVal) => {
|
||||||
|
if(localSelection.value !== newVal) {
|
||||||
|
localSelection.value = newVal;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
watch(localSelection, (newVal) => {
|
||||||
|
if(props.selection !== newVal){
|
||||||
|
emit('update:selection', newVal);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const localRows = ref(props.rows);
|
||||||
|
watch(() => props.rows, (newVal) => {
|
||||||
|
if(localRows.value !== newVal){
|
||||||
|
localRows.value = newVal;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
watch(localRows, (newVal) => {
|
||||||
|
if(props.rows !== newVal){
|
||||||
|
emit('update:rows', newVal);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const localFirst = ref(props.first);
|
||||||
|
watch(() => props.first, (newVal) => {
|
||||||
|
if(localFirst.value !== newVal){
|
||||||
|
localFirst.value = newVal;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
watch(localFirst, (newVal) => {
|
||||||
|
if(props.first !== newVal){
|
||||||
|
emit('update:first', newVal);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const localSortField = ref(props.sortField);
|
||||||
|
watch(() => props.sortField, (newVal) => {
|
||||||
|
if(localSortField.value !== newVal){
|
||||||
|
localSortField.value = newVal;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
watch(localSortField, (newVal) => {
|
||||||
|
if(props.sortField !== newVal){
|
||||||
|
emit('update:sortField', newVal);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const localSortOrder = ref(props.sortOrder);
|
||||||
|
watch(() => props.sortOrder, (newVal) => {
|
||||||
|
if(localSortOrder.value !== newVal){
|
||||||
|
localSortOrder.value = newVal;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
watch(localSortOrder, (newVal) => {
|
||||||
|
if(props.sortOrder !== newVal){
|
||||||
|
emit('update:sortOrder', newVal);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const localMultiSortMeta = ref(props.multiSortMeta);
|
||||||
|
watch(() => props.multiSortMeta, (newVal) => {
|
||||||
|
if(localMultiSortMeta.value !== newVal){
|
||||||
|
localMultiSortMeta.value = newVal;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
watch(localMultiSortMeta, (newVal) => {
|
||||||
|
if(props.multiSortMeta !== newVal){
|
||||||
|
emit('update:multiSortMeta', newVal);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const localContextMenuSelection = ref(props.contextMenuSelection);
|
||||||
|
watch(() => props.contextMenuSelection, (newVal) => {
|
||||||
|
if(localContextMenuSelection.value !== newVal){
|
||||||
|
localContextMenuSelection.value = newVal;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
watch(localContextMenuSelection, (newVal) => {
|
||||||
|
if(props.contextMenuSelection){
|
||||||
|
emit('update:contextMenuSelection', newVal);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const localExpandedRows = ref(props.expandedRows);
|
||||||
|
watch(() => props.expandedRows, (newVal) => {
|
||||||
|
if(localExpandedRows.value !== newVal){
|
||||||
|
localExpandedRows.value = newVal;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
watch(localExpandedRows, (newVal) => {
|
||||||
|
if(props.expandedRows !== newVal){
|
||||||
|
emit('update:expandedRows', newVal);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const localExpandedRowGroups = ref(props.expandedRowGroups);
|
||||||
|
watch(() => props.expandedRowGroups, (newVal) => {
|
||||||
|
if(localExpandedRowGroups.value !== newVal){
|
||||||
|
localExpandedRowGroups.value = newVal;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
watch(localExpandedRowGroups, (newVal) => {
|
||||||
|
if(props.expandedRowGroups !== newVal){
|
||||||
|
emit('update:expandedRowGroups', newVal);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const localFilters = ref(props.filters);
|
||||||
|
watch(() => props.filters, (newVal) => {
|
||||||
|
if(localFilters.value !== newVal){
|
||||||
|
localFilters.value = newVal;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
watch(localFilters, (newVal) => {
|
||||||
|
if(props.filters !== newVal){
|
||||||
|
emit('update:filters', newVal);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const localEditingRows = ref(props.editingRows);
|
||||||
|
watch(() => props.editingRows, (newVal) => {
|
||||||
|
if(localEditingRows.value = newVal){
|
||||||
|
localEditingRows.value = newVal;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
watch(localEditingRows, (newVal) => {
|
||||||
|
if(props.editingRows !== newVal){
|
||||||
|
emit('update:editingRows', newVal);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<DataTable
|
||||||
|
:id="`datatable-${props.id}`"
|
||||||
|
role="table"
|
||||||
|
ref="dataTableRef"
|
||||||
|
:value="props.value"
|
||||||
|
:paginator="props.paginator"
|
||||||
|
:rowsPerPageOptions="props.rowsPerPageOptions"
|
||||||
|
:data-key="props.dataKey"
|
||||||
|
:show-gridlines="props.showGridlines"
|
||||||
|
:striped-rows="props.stripedRows"
|
||||||
|
:total-records="props.totalRecords"
|
||||||
|
:page-link-size="props.pageLinkSize"
|
||||||
|
:paginator-position="props.paginatorPosition"
|
||||||
|
:paginator-template="props.paginatorTemplate"
|
||||||
|
:always-show-paginator="props.alwaysShowPaginator"
|
||||||
|
:current-page-report-template="props.currentPageReportTemplate"
|
||||||
|
:lazy="props.lazy"
|
||||||
|
:loading="props.loading"
|
||||||
|
:nullSortOrder="props.nullSortOrder"
|
||||||
|
:defaultSortOrder="props.defaultSortOrder"
|
||||||
|
:sortMode="props.sortMode"
|
||||||
|
:removableSort="props.removableSort"
|
||||||
|
:filterDisplay="props.filterDisplay"
|
||||||
|
:globalFilterFields="props.globalFilterFields"
|
||||||
|
:filterLocale="props.filterLocale"
|
||||||
|
:selectionMode="props.selectionMode"
|
||||||
|
:compareSelectionBy="props.compareSelectionBy"
|
||||||
|
:metaKeySelection="props.metaKeySelection"
|
||||||
|
:contextMenu="props.contextMenu"
|
||||||
|
:selectAll="props.selectAll"
|
||||||
|
:rowHover="props.rowHover"
|
||||||
|
:csvSeparator="props.csvSeparator"
|
||||||
|
:exportFilename="props.exportFilename"
|
||||||
|
:exportFunction="props.exportFunction"
|
||||||
|
:resizableColumns="props.resizableColumns"
|
||||||
|
:columnResizeMode="props.columnResizeMode"
|
||||||
|
:reorderableColumns="props.reorderableColumns"
|
||||||
|
:expandedRowIcon="props.expandedRowIcon"
|
||||||
|
:collapsedRowIcon="props.collapsedRowIcon"
|
||||||
|
:rowGroupMode="props.rowGroupMode"
|
||||||
|
:groupRowsBy="props.groupRowsBy"
|
||||||
|
:expandableRowGroups="props.expandableRowGroups"
|
||||||
|
:stateStorage="props.stateStorage"
|
||||||
|
:stateKey="props.stateKey"
|
||||||
|
:editMode="props.editMode"
|
||||||
|
:rowClass="props.rowClass"
|
||||||
|
:rowStyle="props.rowStyle"
|
||||||
|
:scrollable="props.scrollable"
|
||||||
|
:scrollHeight="props.scrollHeight"
|
||||||
|
:virtualScrollerOptions="props.virtualScrollerOptions"
|
||||||
|
:frozenValue="props.frozenValue"
|
||||||
|
:breakpoint="props.breakpoint"
|
||||||
|
:showHeaders="props.showHeaders"
|
||||||
|
:highlightOnSelect="props.highlightOnSelect"
|
||||||
|
:size="props.size"
|
||||||
|
:tableClass="props.tableClass"
|
||||||
|
:tableProps="props.tableProps"
|
||||||
|
:tableStyle="props.tableStyle"
|
||||||
|
:filterButtonProps="props.filterButtonProps"
|
||||||
|
:editButtonProps="props.editButtonProps"
|
||||||
|
style="width: 100%; height: fit-content;"
|
||||||
|
v-model:selection="localSelection"
|
||||||
|
v-model:rows="localRows"
|
||||||
|
v-model:first="localFirst"
|
||||||
|
v-model:sortField="localSortField"
|
||||||
|
v-model:sortOrder="localSortOrder"
|
||||||
|
v-model:filters="localFilters"
|
||||||
|
v-model:contextMenuSelection="localContextMenuSelection"
|
||||||
|
v-model:expandedRows="localExpandedRows"
|
||||||
|
v-model:expandedRowGroups="localExpandedRowGroups"
|
||||||
|
v-model:editingRows="localEditingRows"
|
||||||
|
v-model:multi-sort-meta="localMultiSortMeta"
|
||||||
|
@update:selection="emit('update:selection', $event)"
|
||||||
|
@update:context-menu-selection="emit('update:contextMenuSelection', $event)"
|
||||||
|
@update:editing-rows="emit('update:editingRows', $event)"
|
||||||
|
@update:expanded-row-groups="emit('update:expandedRowGroups', $event)"
|
||||||
|
@update:filters="emit('update:filters', $event)"
|
||||||
|
@update:first="emit('update:first', $event)"
|
||||||
|
@update:multi-sort-meta="emit('update:multiSortMeta', $event)"
|
||||||
|
@update:rows="emit('update:rows', $event)"
|
||||||
|
@update:sort-field="emit('update:sortField', $event)"
|
||||||
|
@update:sort-order="emit('update:sortOrder', $event)"
|
||||||
|
@page="emit('page', $event)"
|
||||||
|
@sort="emit('sort', $event)"
|
||||||
|
@rowSelect="emit('row-select', $event)"
|
||||||
|
@rowUnselect="emit('row-unselect', $event)"
|
||||||
|
@filter="emit('filter', $event)"
|
||||||
|
@valueChange="emit('value-change', $event)"
|
||||||
|
@rowClick="emit('row-click', $event)"
|
||||||
|
@rowCollapse="emit('row-collapse', $event)"
|
||||||
|
@rowContextmenu="emit('row-contextmenu', $event)"
|
||||||
|
@rowDblclick="emit('row-dbclick', $event)"
|
||||||
|
@rowEditCancel="emit('row-edit-cancel', $event)"
|
||||||
|
@rowEditInit="emit('row-edit-init', $event)"
|
||||||
|
@rowEditSave="emit('row-edit-save', $event)"
|
||||||
|
@rowExpand="emit('row-expand', $event)"
|
||||||
|
@rowReorder="emit('row-reorder', $event)"
|
||||||
|
@rowSelectAll="emit('row-select-all', $event)"
|
||||||
|
@rowUnselectAll="emit('row-unselect-all', $event)"
|
||||||
|
@rowgroupCollapse="emit('rowgroup-collapse', $event)"
|
||||||
|
@rowgroupExpand="emit('rowgroup-expand', $event)"
|
||||||
|
@columnReorder="emit('column-reorder', $event)"
|
||||||
|
@columnResizeEnd="emit('column-resize-end', $event)"
|
||||||
|
@cellEditCancel="emit('cell-edit-cancel', $event)"
|
||||||
|
@cellEditComplete="emit('cell-edit-complete', $event)"
|
||||||
|
@cellEditInit="emit('cell-edit-init', $event)"
|
||||||
|
@stateRestore="emit('state-restore', $event)"
|
||||||
|
@stateSave="emit('state-save', $event)"
|
||||||
|
@selectAllChange="emit('select-all-change', $event)"
|
||||||
|
class="p-datatable"
|
||||||
|
>
|
||||||
|
<template
|
||||||
|
v-for="([name]) in availableSlots"
|
||||||
|
:key="name"
|
||||||
|
v-slot:[name]="slotProps"
|
||||||
|
>
|
||||||
|
<slot :name="name" v-bind="slotProps" />
|
||||||
|
</template>
|
||||||
|
<slot></slot>
|
||||||
|
<template #empty>
|
||||||
|
<div class="datatable-empty" :class="[styles['text-body-SM-detail-text-Regular']]">
|
||||||
|
<i class="ri-database-line database-icon"></i>
|
||||||
|
<span> Aucune donnée trouvée. </span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</DataTable>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="css" scoped>
|
||||||
|
.datatable-empty{
|
||||||
|
height: fit-content;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
gap: 1.5rem;
|
||||||
|
margin-top: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.database-icon{
|
||||||
|
padding: 0px;
|
||||||
|
margin: 0px;
|
||||||
|
display: block;
|
||||||
|
color: var(--border-contrast-grey);
|
||||||
|
font-size: 5rem;
|
||||||
|
}
|
||||||
|
</style>
|
5
src/env.d.ts
vendored
Normal file
5
src/env.d.ts
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
declare module '*.vue' {
|
||||||
|
import { DefineComponent } from 'vue';
|
||||||
|
const component: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
|
||||||
|
export default component;
|
||||||
|
}
|
121
src/index.ts
Normal file
121
src/index.ts
Normal file
|
@ -0,0 +1,121 @@
|
||||||
|
/**
|
||||||
|
* Visua Design System Vue Component Library
|
||||||
|
*
|
||||||
|
* This file serves as the entry point for the library, exporting components, utilities,
|
||||||
|
* and styles that make up the Visua Vue ecosystem.
|
||||||
|
*
|
||||||
|
* @module visua-vue
|
||||||
|
*/
|
||||||
|
|
||||||
|
//////////////////////////
|
||||||
|
// Component Exports //
|
||||||
|
//////////////////////////
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Accordion components
|
||||||
|
*/
|
||||||
|
export { default as VAccordion } from './components/accordion/VAccordion.vue';
|
||||||
|
export { default as VAccordionChild } from './components/accordion/VAccordionChild.vue';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Alert and notification components
|
||||||
|
*/
|
||||||
|
export { default as VAlert } from './components/alert/VAlert.vue';
|
||||||
|
export { default as VBadge } from './components/badge/VBadge.vue';
|
||||||
|
export { default as VMessage } from './components/message/VMessage.vue';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Button and link components
|
||||||
|
*/
|
||||||
|
export { default as VButton } from './components/button/VButton.vue';
|
||||||
|
export { default as VButtonGroup } from './components/button/VButtonGroup.vue';
|
||||||
|
export { default as VLink } from './components/button/VLink.vue';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Form input and control components
|
||||||
|
*/
|
||||||
|
export { default as VCheckbox } from './components/checkbox/VCheckbox.vue';
|
||||||
|
export { default as VInput } from './components/input/VInput.vue';
|
||||||
|
export { default as VSelect } from './components/select/VSelect.vue';
|
||||||
|
export { default as VFile } from './components/file/VFile.vue';
|
||||||
|
export { default as VFileUpload } from './components/file/VFileUpload.vue';
|
||||||
|
export { default as VLabelErrorProxy } from './components/file/VLabelErrorProxy.vue';
|
||||||
|
export { default as VHint } from './components/hint/VHint.vue';
|
||||||
|
export { default as VLabel } from './components/label/VLabel.vue';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Layout and grouping components
|
||||||
|
*/
|
||||||
|
export { default as VDivider } from './components/divider/VDivider.vue';
|
||||||
|
export { default as VGroup } from './components/group/VGroup.vue';
|
||||||
|
export { default as VScrollPanel } from './components/scrollpanel/VScrollPanel.vue';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Navigation and menu components
|
||||||
|
*/
|
||||||
|
export { default as VMenuBar } from './components/menu/VMenuBar.vue';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Modal and overlay components
|
||||||
|
*/
|
||||||
|
export { default as VModal } from './components/modal/VModal.vue';
|
||||||
|
export { default as VConfirmModal } from './components/modal/VConfirmModal.vue';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Visual feedback components
|
||||||
|
*/
|
||||||
|
export { default as VProgressBar } from './components/progressbar/VProgressBar.vue';
|
||||||
|
export { default as VDataTable } from './components/table/VDataTable.vue';
|
||||||
|
|
||||||
|
//////////////////////////////////////
|
||||||
|
// Composables & Interfaces //
|
||||||
|
//////////////////////////////////////
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Composable functions (hooks)
|
||||||
|
*/
|
||||||
|
export * from './components/composable/index.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom TypeScript interfaces
|
||||||
|
*/
|
||||||
|
export * from './components/interface/index.js';
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
// Global Styles //
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Global and layout styles
|
||||||
|
*/
|
||||||
|
import './assets/style/global.css';
|
||||||
|
import './assets/style/primevue-configuration.css';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PrimeVue component-specific style overrides
|
||||||
|
*/
|
||||||
|
import './assets/style/primevue-style/accordion.css';
|
||||||
|
import './assets/style/primevue-style/button.css';
|
||||||
|
import './assets/style/primevue-style/checkbox.css';
|
||||||
|
import './assets/style/primevue-style/confirmdialog.css';
|
||||||
|
import './assets/style/primevue-style/datatable.css';
|
||||||
|
import './assets/style/primevue-style/dialog.css';
|
||||||
|
import './assets/style/primevue-style/divider.css';
|
||||||
|
import './assets/style/primevue-style/fileupload.css';
|
||||||
|
import './assets/style/primevue-style/form.css';
|
||||||
|
import './assets/style/primevue-style/iconfield.css';
|
||||||
|
import './assets/style/primevue-style/input.css';
|
||||||
|
import './assets/style/primevue-style/list.css';
|
||||||
|
import './assets/style/primevue-style/menubar.css';
|
||||||
|
import './assets/style/primevue-style/message.css';
|
||||||
|
import './assets/style/primevue-style/navigation.css';
|
||||||
|
import './assets/style/primevue-style/overlay.css';
|
||||||
|
import './assets/style/primevue-style/paginator.css';
|
||||||
|
import './assets/style/primevue-style/password.css';
|
||||||
|
import './assets/style/primevue-style/progressbar.css';
|
||||||
|
import './assets/style/primevue-style/scrollpanel.css';
|
||||||
|
import './assets/style/primevue-style/select.css';
|
||||||
|
import './assets/style/primevue-style/tag.css';
|
||||||
|
import './assets/style/primevue-style/textarea.css';
|
||||||
|
import './assets/style/primevue-style/toast.css';
|
||||||
|
import './assets/style/primevue-style/various.css';
|
|
@ -4,11 +4,13 @@ import App from './App.vue'
|
||||||
import primeVue from 'primevue/config'
|
import primeVue from 'primevue/config'
|
||||||
import ToastService from 'primevue/toastservice'
|
import ToastService from 'primevue/toastservice'
|
||||||
import ConfirmationService from 'primevue/confirmationservice'
|
import ConfirmationService from 'primevue/confirmationservice'
|
||||||
|
// import router from '../template/router'
|
||||||
|
|
||||||
const app = createApp(App)
|
const app = createApp(App)
|
||||||
|
|
||||||
app.use(primeVue)
|
app.use(primeVue)
|
||||||
app.use(ToastService)
|
app.use(ToastService)
|
||||||
app.use(ConfirmationService)
|
app.use(ConfirmationService)
|
||||||
|
// app.use(router)
|
||||||
|
|
||||||
app.mount('#app')
|
app.mount('#app')
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
{
|
{
|
||||||
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
||||||
"include": ["env.d.ts", "src/**/*", "src/**/*.vue", "test/VButton.spec.ts"],
|
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
|
||||||
"exclude": ["src/**/__tests__/*"],
|
"exclude": ["src/**/__tests__/*", "src/App.vue", "src/main.ts"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
"declaration": true,
|
||||||
|
"emitDeclarationOnly": true,
|
||||||
|
"outDir": "dist",
|
||||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
||||||
|
"lib": ["es2022", "dom"],
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["./src/*"],
|
"@/*": ["./src/*"],
|
||||||
"@visua/*": ["./node_modules/@cellule-financiere-pmo/visua/output/*"]
|
"@visua/*": ["./node_modules/@cellule-financiere-pmo/visua/output/*"]
|
||||||
|
|
|
@ -1,14 +1,20 @@
|
||||||
{
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"types": ["vitest"],
|
||||||
|
"emitDeclarationOnly": true,
|
||||||
|
"declaration": true,
|
||||||
|
"outDir": "dist"
|
||||||
|
},
|
||||||
"files": [],
|
"files": [],
|
||||||
"references": [
|
"references": [
|
||||||
|
{
|
||||||
|
"path": "./tsconfig.app.json"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "./tsconfig.node.json"
|
"path": "./tsconfig.node.json"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "./tsconfig.app.json"
|
"path": "./tsconfig.types.json"
|
||||||
}
|
|
||||||
],
|
|
||||||
"compilerOptions": {
|
|
||||||
"types": ["vitest"]
|
|
||||||
}
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
22
tsconfig.types.json
Normal file
22
tsconfig.types.json
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"declaration": true,
|
||||||
|
"emitDeclarationOnly": true,
|
||||||
|
"outDir": "./dist",
|
||||||
|
"baseUrl": ".",
|
||||||
|
"module": "NodeNext",
|
||||||
|
"target": "ESNext",
|
||||||
|
"moduleResolution": "nodenext",
|
||||||
|
"strict": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"allowJs": true,
|
||||||
|
"lib": ["es2022", "dom"],
|
||||||
|
"paths": {
|
||||||
|
"@/*": ["src/*"],
|
||||||
|
"@visua/*": ["node_modules/@cellule-financiere-pmo/visua/output/*"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"include": ["src", "src/**/*.vue", "env.d.ts"],
|
||||||
|
"exclude": ["src/**/__tests__/*", "src/App.vue", "src/main.ts"]
|
||||||
|
}
|
|
@ -1,24 +1,38 @@
|
||||||
|
// vite.config.ts
|
||||||
import { fileURLToPath, URL } from 'node:url'
|
import { fileURLToPath, URL } from 'node:url'
|
||||||
import { defineConfig } from 'vitest/config'
|
import { defineConfig } from 'vite'
|
||||||
import vue from '@vitejs/plugin-vue'
|
import vue from '@vitejs/plugin-vue'
|
||||||
import vueDevTools from 'vite-plugin-vue-devtools'
|
import vueDevTools from 'vite-plugin-vue-devtools'
|
||||||
import path from 'path'
|
import path from 'path'
|
||||||
|
|
||||||
// https://vite.dev/config/
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [
|
plugins: [
|
||||||
vue(),
|
vue(),
|
||||||
vueDevTools(),
|
vueDevTools()
|
||||||
],
|
],
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||||
'@visua': path.resolve(__dirname, './node_modules/@cellule-financiere-pmo/visua/output')
|
'@visua': path.resolve(__dirname, './node_modules/@cellule-financiere-pmo/visua/output'),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
build: {
|
||||||
|
lib: {
|
||||||
|
entry: path.resolve(__dirname, 'src/index.ts'),
|
||||||
|
name: 'VisuaVue',
|
||||||
|
fileName: (format) => format === 'es' ? 'visua-vue.es.js' : 'visua-vue.umd.cjs',
|
||||||
|
formats: ['es', 'umd'],
|
||||||
|
},
|
||||||
|
rollupOptions: {
|
||||||
|
external: ['vue', 'primevue', 'vue-router', 'primeicons'],
|
||||||
|
output: {
|
||||||
|
globals: {
|
||||||
|
vue: 'Vue',
|
||||||
|
primevue: 'PrimeVue',
|
||||||
|
'vue-router': 'VueRouter',
|
||||||
|
primeicons: 'primeicons'
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
test: {
|
|
||||||
globals: true,
|
|
||||||
environment: 'jsdom',
|
|
||||||
include: ['test/**/*.spec.ts'],
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
20
vitest.config.ts
Normal file
20
vitest.config.ts
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
// vitest.config.ts
|
||||||
|
import { fileURLToPath, URL } from 'node:url';
|
||||||
|
import { defineConfig } from 'vitest/config';
|
||||||
|
import path from 'path';
|
||||||
|
import vue from '@vitejs/plugin-vue';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [vue()],
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||||
|
'@visua': path.resolve(__dirname, './node_modules/@cellule-financiere-pmo/visua/output'),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
test: {
|
||||||
|
globals: true,
|
||||||
|
environment: 'jsdom',
|
||||||
|
include: ['test/**/*.spec.ts'],
|
||||||
|
},
|
||||||
|
});
|
4
vue-shim.d.ts
vendored
Normal file
4
vue-shim.d.ts
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
declare module '*.vue' {
|
||||||
|
const component: unknown;
|
||||||
|
export default component;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user