zuii 1.5.6 → 1.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,24 @@
1
+ interface ErrorpageTexts {
2
+ errorLabel?: string;
3
+ title?: string;
4
+ message?: string;
5
+ backButton?: string;
6
+ }
1
7
  interface Props {
2
8
  /**
3
9
  * Le code de l'erreur (ex: 404).
4
10
  */
5
11
  code?: number | string;
12
+ /**
13
+ * Textes personnalisés pour la traduction.
14
+ */
15
+ texts?: ErrorpageTexts;
6
16
  }
7
17
  /**
8
18
  * Composant pour la page d'erreur.
9
19
  *
10
- * @param {Props} props Les propriétés du composant.
20
+ * @param props Les propriétés du composant.
11
21
  * @returns {JSX.Element} Le rendu de la page d'erreur.
12
22
  */
13
- export declare const Errorpage: ({ code }: Props) => import("react/jsx-runtime").JSX.Element;
23
+ export declare const Errorpage: ({ code, texts }: Props) => import("react/jsx-runtime").JSX.Element;
14
24
  export {};
@@ -1,10 +1,10 @@
1
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
2
- import { useNavigate as p } from "react-router-dom";
1
+ import { jsx as r, jsxs as o } from "react/jsx-runtime";
2
+ import { useNavigate as a } from "react-router-dom";
3
3
  import '../../Slider/style/index.css';import '../../Grid/style/index.css';import '../../Loader/style/index.css';import '../style/index.css';import '../../Lang-selector/style/index.css';import '../../../node_modules/.pnpm/flag-icons@7.5.0/node_modules/flag-icons/css/flag-icons.min.css';import '../../Placeholder/style/index.css';import '../../Logo/style/index.css';import '../../Radius/style/index.css';import '../../Shadow/style/index.css';import '../../Context-menu/style/index.css';import '../../Divider/style/index.css';import '../../Badge/style/index.css';import '../../Avatar/style/index.css';import '../../Color/style/index.css';import '../../../packages/core/src/styles/main.css';/* empty css */
4
4
  /* empty css */
5
- import { Button as e } from "../../Button/react/index.js";
6
- import { Icon as a } from "../../Icon/react/index.js";
7
- import { Group as o } from "../../Group/react/index.js";
5
+ import { Button as n } from "../../Button/react/index.js";
6
+ import { Icon as c } from "../../Icon/react/index.js";
7
+ import { Group as i } from "../../Group/react/index.js";
8
8
  /* empty css */
9
9
  /* empty css */
10
10
  /* empty css */
@@ -37,21 +37,27 @@ import "@splidejs/react-splide";
37
37
  /* empty css */
38
38
  import "../../Card/react/index.js";
39
39
  import "../../../packages/cookie-consent/src/js/cookie-consent.js";
40
- const U = ({ code: t = 404 }) => {
41
- const m = p();
42
- return /* @__PURE__ */ r("main", { className: "error-page", children: /* @__PURE__ */ r("div", { className: "error-page__container ", children: /* @__PURE__ */ i("div", { className: "container", children: [
43
- /* @__PURE__ */ i(o, { className: "text-secondary mb-4", children: [
44
- /* @__PURE__ */ r(a, { name: "icon-triangle-alert", size: "4xl" }),
45
- /* @__PURE__ */ i("h1", { children: [
46
- "Erreur ",
47
- t
40
+ const s = {
41
+ errorLabel: "Erreur",
42
+ title: "Oups ! Page non trouvée",
43
+ message: "La page que vous recherchez semble avoir disparu dans le néant numérique.",
44
+ backButton: "Retour à l'accueil"
45
+ }, X = ({ code: e = 404, texts: m }) => {
46
+ const p = a(), t = { ...s, ...m };
47
+ return /* @__PURE__ */ r("main", { className: "error-page", children: /* @__PURE__ */ r("div", { className: "error-page__container ", children: /* @__PURE__ */ o("div", { className: "container", children: [
48
+ /* @__PURE__ */ o(i, { className: "text-secondary mb-4", children: [
49
+ /* @__PURE__ */ r(c, { name: "icon-triangle-alert", size: "4xl" }),
50
+ /* @__PURE__ */ o("h1", { children: [
51
+ t.errorLabel,
52
+ " ",
53
+ e
48
54
  ] })
49
55
  ] }),
50
- /* @__PURE__ */ r("h2", { children: "Oups ! Page non trouvée" }),
51
- /* @__PURE__ */ r("p", { children: "La page que vous recherchez semble avoir disparu dans le néant numérique." }),
52
- /* @__PURE__ */ r(o, { className: "mt-4", children: /* @__PURE__ */ r(e, { onClick: () => m("/"), variant: "primary", children: "Retour à l'accueil" }) })
56
+ /* @__PURE__ */ r("h2", { children: t.title }),
57
+ /* @__PURE__ */ r("p", { children: t.message }),
58
+ /* @__PURE__ */ r(i, { className: "mt-4", children: /* @__PURE__ */ r(n, { onClick: () => p("/"), variant: "primary", children: t.backButton }) })
53
59
  ] }) }) });
54
60
  };
55
61
  export {
56
- U as Errorpage
62
+ X as Errorpage
57
63
  };
@@ -1,3 +1,4 @@
1
+ import { MemoryRouter } from 'react-router-dom';
1
2
  import { Errorpage } from '../../index';
2
3
 
3
4
  /**
@@ -8,10 +9,23 @@ export const Errorpages = () => {
8
9
  <div className="Errorpages-demo">
9
10
  <section className="mb-5">
10
11
  <h3>Errorpages</h3>
11
- <p className="text-muted mb-4">Le composant <code>Errorpage</code> permet de ... .</p>
12
- <h5 className='mt-4'>Exemple</h5>
13
- <p className="text-muted mb-4">Voici un exemple de composant Errorpage.</p>
14
- <Errorpage />
12
+ <p className="text-muted mb-4">Le composant <code>Errorpage</code> affiche une page d'erreur avec code et textes personnalisables.</p>
13
+ <h5 className='mt-4'>Français (défaut)</h5>
14
+ <MemoryRouter>
15
+ <Errorpage code={404} />
16
+ </MemoryRouter>
17
+ <h5 className='mt-4'>Anglais</h5>
18
+ <MemoryRouter>
19
+ <Errorpage
20
+ code={404}
21
+ texts={{
22
+ errorLabel: "Error",
23
+ title: "Oops! Page not found",
24
+ message: "The page you are looking for seems to have vanished into the digital void.",
25
+ backButton: "Back to home",
26
+ }}
27
+ />
28
+ </MemoryRouter>
15
29
  </section>
16
30
  </div>
17
31
  );
package/package.json CHANGED
@@ -1,114 +1,112 @@
1
1
  {
2
- "name": "zuii",
3
- "version": "1.5.6",
4
- "packageManager": "pnpm@9.9.0",
5
- "description": "Bibliothèque de composants UI légère, intuitive et modulaire pour les interfaces web modernes.",
6
- "type": "module",
7
- "repository": {
8
- "type": "git",
9
- "url": "git+https://github.com/vincentm498/zuii.git"
10
- },
11
- "bugs": {
12
- "url": "https://github.com/vincentm498/zuii/issues"
13
- },
14
- "homepage": "https://github.com/vincentm498/zuii#readme",
15
- "main": "./dist/index.js",
16
- "module": "./dist/index.js",
17
- "types": "./dist/index.d.ts",
18
- "files": [
19
- "dist",
20
- "scripts/tokens"
21
- ],
22
- "exports": {
23
- ".": {
24
- "import": "./dist/index.js",
25
- "types": "./dist/index.d.ts"
26
- },
27
- "./templates": {
28
- "import": "./dist/templates/index.ts",
29
- "types": "./dist/templates/index.d.ts"
30
- },
31
- "./core/*": "./dist/core/*"
32
- },
33
- "bin": {
34
- "zuii-tokens": "./scripts/tokens/build.js"
35
- },
36
- "scripts": {
37
- "dev": "vite",
38
- "prebuild": "pnpm run tokens:build",
39
- "build:packages": "pnpm --filter \"@zuii/*\" --parallel run build",
40
- "build": "vite build",
41
- "postbuild": "mkdir -p dist/core/styles && cp packages/core/src/styles/_tokens.scss packages/core/src/styles/tokens.css packages/core/src/styles/tokens.ts dist/core/styles/ && cp -r src/templates dist/",
42
- "preview": "vite preview",
43
- "prepublishOnly": "pnpm run build",
44
- "tokens:build": "node scripts/tokens/build.js --output packages/core/src/styles",
45
- "component:create": "node scripts/create-component.js"
46
- },
47
- "keywords": [],
48
- "author": "Vincent Moreau",
49
- "license": "MIT",
50
- "peerDependencies": {
51
- "react": ">=16.8.0",
52
- "react-dom": ">=16.8.0",
53
- "react-router-dom": "^7.13.0"
54
- },
55
- "publishConfig": {
56
- "access": "public",
57
- "registry": "https://registry.npmjs.org/"
58
- },
59
- "dependencies": {
60
- "@ag-grid-community/locale": "^35.0.1",
61
- "@simonwep/pickr": "^1.9.1",
62
- "@splidejs/react-splide": "^0.7.12",
63
- "@splidejs/splide": "^4.1.4",
64
- "@uppy/compressor": "^3.1.0",
65
- "@uppy/core": "^5.2.0",
66
- "@uppy/dashboard": "^5.1.1",
67
- "@uppy/image-editor": "^4.2.0",
68
- "@uppy/locales": "^5.1.1",
69
- "@uppy/react": "^5.2.0",
70
- "@uppy/webcam": "^5.1.0",
71
- "ag-grid-community": "^35.0.1",
72
- "ag-grid-react": "^35.0.1",
73
- "apca-w3": "^0.1.9",
74
- "bootstrap": "^5.3.8",
75
- "choices.js": "^11.1.0",
76
- "colord": "^2.9.3",
77
- "flag-icons": "^7.5.0",
78
- "flatpickr": "^4.6.13",
79
- "intl-tel-input": "^26.1.1",
80
- "lucide-static": "^0.563.0",
81
- "react-bootstrap": "^2.10.10",
82
- "sass-embedded": "^1.97.3",
83
- "style-dictionary": "^4.2.0",
84
- "sweetalert2": "^11.26.18",
85
- "sweetalert2-react-content": "^5.1.1",
86
- "vanilla-cookieconsent": "^3.1.0"
87
- },
88
- "devDependencies": {
89
- "@changesets/cli": "^2.30.0",
90
- "@semantic-release/changelog": "^6.0.3",
91
- "@semantic-release/git": "^10.0.1",
92
- "@semantic-release/github": "^12.0.2",
93
- "@semantic-release/npm": "^13.1.3",
94
- "@types/intl-tel-input": "^18.1.4",
95
- "@types/node": "^25.1.0",
96
- "@types/react": "^19.2.10",
97
- "@types/react-dom": "^19.2.3",
98
- "@types/react-router-dom": "^5.3.3",
99
- "@vitejs/plugin-react": "^5.1.2",
100
- "@zuii/cookie-consent": "workspace:*",
101
- "@zuii/core": "workspace:*",
102
- "esbuild": "^0.27.4",
103
- "esbuild-sass-plugin": "^3.7.0",
104
- "react": "^19.2.4",
105
- "react-dom": "^19.2.4",
106
- "sass": "^1.97.3",
107
- "semantic-release": "^25.0.2",
108
- "tsup": "^8.5.1",
109
- "typescript": "^5.9.3",
110
- "vite": "^7.3.1",
111
- "vite-plugin-dts": "^4.5.4",
112
- "vite-plugin-lib-inject-css": "^2.2.2"
113
- }
114
- }
2
+ "name": "zuii",
3
+ "version": "1.5.8",
4
+ "description": "Bibliothèque de composants UI légère, intuitive et modulaire pour les interfaces web modernes.",
5
+ "type": "module",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/vincentm498/zuii.git"
9
+ },
10
+ "bugs": {
11
+ "url": "https://github.com/vincentm498/zuii/issues"
12
+ },
13
+ "homepage": "https://github.com/vincentm498/zuii#readme",
14
+ "main": "./dist/index.js",
15
+ "module": "./dist/index.js",
16
+ "types": "./dist/index.d.ts",
17
+ "files": [
18
+ "dist",
19
+ "scripts/tokens"
20
+ ],
21
+ "exports": {
22
+ ".": {
23
+ "import": "./dist/index.js",
24
+ "types": "./dist/index.d.ts"
25
+ },
26
+ "./templates": {
27
+ "import": "./dist/templates/index.ts",
28
+ "types": "./dist/templates/index.d.ts"
29
+ },
30
+ "./core/*": "./dist/core/*"
31
+ },
32
+ "bin": {
33
+ "zuii-tokens": "./scripts/tokens/build.js"
34
+ },
35
+ "keywords": [],
36
+ "author": "Vincent Moreau",
37
+ "license": "MIT",
38
+ "peerDependencies": {
39
+ "react": ">=16.8.0",
40
+ "react-dom": ">=16.8.0",
41
+ "react-router-dom": "^7.13.0"
42
+ },
43
+ "publishConfig": {
44
+ "access": "public",
45
+ "registry": "https://registry.npmjs.org/"
46
+ },
47
+ "dependencies": {
48
+ "@ag-grid-community/locale": "^35.0.1",
49
+ "@simonwep/pickr": "^1.9.1",
50
+ "@splidejs/react-splide": "^0.7.12",
51
+ "@splidejs/splide": "^4.1.4",
52
+ "@uppy/compressor": "^3.1.0",
53
+ "@uppy/core": "^5.2.0",
54
+ "@uppy/dashboard": "^5.1.1",
55
+ "@uppy/image-editor": "^4.2.0",
56
+ "@uppy/locales": "^5.1.1",
57
+ "@uppy/react": "^5.2.0",
58
+ "@uppy/webcam": "^5.1.0",
59
+ "ag-grid-community": "^35.0.1",
60
+ "ag-grid-react": "^35.0.1",
61
+ "apca-w3": "^0.1.9",
62
+ "bootstrap": "^5.3.8",
63
+ "choices.js": "^11.1.0",
64
+ "colord": "^2.9.3",
65
+ "flag-icons": "^7.5.0",
66
+ "flatpickr": "^4.6.13",
67
+ "intl-tel-input": "^26.1.1",
68
+ "lucide-static": "^0.563.0",
69
+ "react-bootstrap": "^2.10.10",
70
+ "sass-embedded": "^1.97.3",
71
+ "style-dictionary": "^4.2.0",
72
+ "sweetalert2": "^11.26.18",
73
+ "sweetalert2-react-content": "^5.1.1",
74
+ "vanilla-cookieconsent": "^3.1.0"
75
+ },
76
+ "devDependencies": {
77
+ "@changesets/cli": "^2.30.0",
78
+ "@semantic-release/changelog": "^6.0.3",
79
+ "@semantic-release/git": "^10.0.1",
80
+ "@semantic-release/github": "^12.0.2",
81
+ "@semantic-release/npm": "^13.1.3",
82
+ "@types/intl-tel-input": "^18.1.4",
83
+ "@types/node": "^25.1.0",
84
+ "@types/react": "^19.2.10",
85
+ "@types/react-dom": "^19.2.3",
86
+ "@types/react-router-dom": "^5.3.3",
87
+ "@vitejs/plugin-react": "^5.1.2",
88
+ "esbuild": "^0.27.4",
89
+ "esbuild-sass-plugin": "^3.7.0",
90
+ "react": "^19.2.4",
91
+ "react-dom": "^19.2.4",
92
+ "sass": "^1.97.3",
93
+ "semantic-release": "^25.0.2",
94
+ "tsup": "^8.5.1",
95
+ "typescript": "^5.9.3",
96
+ "vite": "^7.3.1",
97
+ "vite-plugin-dts": "^4.5.4",
98
+ "vite-plugin-lib-inject-css": "^2.2.2",
99
+ "@zuii/core": "0.3.0",
100
+ "@zuii/cookie-consent": "0.3.0"
101
+ },
102
+ "scripts": {
103
+ "dev": "vite",
104
+ "prebuild": "pnpm run tokens:build",
105
+ "build:packages": "pnpm --filter \"@zuii/*\" --parallel run build",
106
+ "build": "vite build",
107
+ "postbuild": "mkdir -p dist/core/styles && cp packages/core/src/styles/_tokens.scss packages/core/src/styles/tokens.css packages/core/src/styles/tokens.ts dist/core/styles/ && cp -r src/templates dist/",
108
+ "preview": "vite preview",
109
+ "tokens:build": "node scripts/tokens/build.js --output packages/core/src/styles",
110
+ "component:create": "node scripts/create-component.js"
111
+ }
112
+ }