kelt-ui-kit-react 0.3.8 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kelt-ui-kit-react",
3
3
  "type": "module",
4
- "version": "0.3.8",
4
+ "version": "0.4.0",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
package/public/index.html CHANGED
@@ -1,43 +1,43 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1" />
7
- <meta name="theme-color" content="#000000" />
8
- <meta
9
- name="description"
10
- content="Web site created using create-react-app"
11
- />
12
- <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13
- <!--
14
- manifest.json provides metadata used when your web app is installed on a
15
- user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16
- -->
17
- <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
18
- <!--
19
- Notice the use of %PUBLIC_URL% in the tags above.
20
- It will be replaced with the URL of the `public` folder during the build.
21
- Only files inside the `public` folder can be referenced from the HTML.
22
-
23
- Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24
- work correctly both with client-side routing and a non-root public URL.
25
- Learn how to configure a non-root public URL by running `npm run build`.
26
- -->
27
- <title>React App</title>
28
- </head>
29
- <body>
30
- <noscript>You need to enable JavaScript to run this app.</noscript>
31
- <div id="root"></div>
32
- <!--
33
- This HTML file is a template.
34
- If you open it directly in the browser, you will see an empty page.
35
-
36
- You can add webfonts, meta tags, or analytics to this file.
37
- The build step will place the bundled scripts into the <body> tag.
38
-
39
- To begin the development, run `npm start` or `yarn start`.
40
- To create a production bundle, use `npm run build` or `yarn build`.
41
- -->
42
- </body>
43
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
7
+ <meta name="theme-color" content="#000000" />
8
+ <meta
9
+ name="description"
10
+ content="Web site created using create-react-app"
11
+ />
12
+ <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13
+ <!--
14
+ manifest.json provides metadata used when your web app is installed on a
15
+ user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16
+ -->
17
+ <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
18
+ <!--
19
+ Notice the use of %PUBLIC_URL% in the tags above.
20
+ It will be replaced with the URL of the `public` folder during the build.
21
+ Only files inside the `public` folder can be referenced from the HTML.
22
+
23
+ Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24
+ work correctly both with client-side routing and a non-root public URL.
25
+ Learn how to configure a non-root public URL by running `npm run build`.
26
+ -->
27
+ <title>React App</title>
28
+ </head>
29
+ <body>
30
+ <noscript>You need to enable JavaScript to run this app.</noscript>
31
+ <div id="root"></div>
32
+ <!--
33
+ This HTML file is a template.
34
+ If you open it directly in the browser, you will see an empty page.
35
+
36
+ You can add webfonts, meta tags, or analytics to this file.
37
+ The build step will place the bundled scripts into the <body> tag.
38
+
39
+ To begin the development, run `npm start` or `yarn start`.
40
+ To create a production bundle, use `npm run build` or `yarn build`.
41
+ -->
42
+ </body>
43
+ </html>
@@ -1,25 +1,25 @@
1
- {
2
- "short_name": "React App",
3
- "name": "Create React App Sample",
4
- "icons": [
5
- {
6
- "src": "favicon.ico",
7
- "sizes": "64x64 32x32 24x24 16x16",
8
- "type": "image/x-icon"
9
- },
10
- {
11
- "src": "logo192.png",
12
- "type": "image/png",
13
- "sizes": "192x192"
14
- },
15
- {
16
- "src": "logo512.png",
17
- "type": "image/png",
18
- "sizes": "512x512"
19
- }
20
- ],
21
- "start_url": ".",
22
- "display": "standalone",
23
- "theme_color": "#000000",
24
- "background_color": "#ffffff"
25
- }
1
+ {
2
+ "short_name": "React App",
3
+ "name": "Create React App Sample",
4
+ "icons": [
5
+ {
6
+ "src": "favicon.ico",
7
+ "sizes": "64x64 32x32 24x24 16x16",
8
+ "type": "image/x-icon"
9
+ },
10
+ {
11
+ "src": "logo192.png",
12
+ "type": "image/png",
13
+ "sizes": "192x192"
14
+ },
15
+ {
16
+ "src": "logo512.png",
17
+ "type": "image/png",
18
+ "sizes": "512x512"
19
+ }
20
+ ],
21
+ "start_url": ".",
22
+ "display": "standalone",
23
+ "theme_color": "#000000",
24
+ "background_color": "#ffffff"
25
+ }
package/public/robots.txt CHANGED
@@ -1,3 +1,3 @@
1
- # https://www.robotstxt.org/robotstxt.html
2
- User-agent: *
3
- Disallow:
1
+ # https://www.robotstxt.org/robotstxt.html
2
+ User-agent: *
3
+ Disallow:
package/src/App.css CHANGED
@@ -1,11 +1,11 @@
1
- .main-layout {
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex-direction: column;
6
- container: app-container/ inline-size;
7
- & .main-layout-content {
8
- flex: 1;
9
- padding: 2rem;
10
- }
11
- }
1
+ .main-layout {
2
+ display: flex;
3
+ height: 100vh;
4
+ width: 100%;
5
+ flex-direction: column;
6
+ container: app-container/ inline-size;
7
+ & .main-layout-content {
8
+ flex: 1;
9
+ padding: 2rem;
10
+ }
11
+ }
@@ -2,7 +2,7 @@ button {
2
2
  background-color: var(--primary-color);
3
3
  color: white;
4
4
  border: none;
5
- padding: 10px 20px;
5
+ padding: 10px 5px;
6
6
  border-radius: 5px;
7
7
  cursor: pointer;
8
8
  font-size: 16px;
package/src/card/Card.tsx CHANGED
@@ -84,7 +84,7 @@ export const Card = ({
84
84
  {customAction && (
85
85
  <div className="card-custom-action">{customAction}</div>
86
86
  )}
87
- <div className="d-flex flex-1">
87
+ <div className="d-flex flex-1 align-items-center">
88
88
  {item.prix && <div className="card-prix">{item.prix}</div>}
89
89
  </div>
90
90
  </div>
package/src/card/card.css CHANGED
@@ -38,6 +38,7 @@
38
38
  .card-footer {
39
39
  display: flex;
40
40
  flex: 1;
41
+ align-items: center;
41
42
  justify-content: space-between;
42
43
  }
43
44
  &.card--horizontal {
@@ -68,7 +69,6 @@
68
69
  flex: 1;
69
70
  display: flex;
70
71
  justify-content: flex-end;
71
- min-width: 100px;
72
72
  }
73
73
  }
74
74
 
@@ -43,8 +43,14 @@ export const CardAction = ({ actions }: CardActionProps) => {
43
43
  className="card-action"
44
44
  onClick={() => setOpenOverlay(!openOverlay)}
45
45
  >
46
- <Icon classIcon={"bi-three-dots-vertical cursor-pointer"} />
47
- <Icon classIcon={"bi-three-dots cursor-pointer"} />
46
+ <Icon
47
+ size={IconSizeEnum.MEDIUM}
48
+ classIcon={"bi-three-dots-vertical cursor-pointer"}
49
+ />
50
+ <Icon
51
+ size={IconSizeEnum.MEDIUM}
52
+ classIcon={"bi-three-dots cursor-pointer"}
53
+ />
48
54
  </div>
49
55
  ) : (
50
56
  ""
@@ -5,7 +5,7 @@
5
5
 
6
6
  & .expand {
7
7
  border: 1px solid #dedede;
8
- padding: 10px;
8
+ padding: 15px 10px;
9
9
  overflow: hidden;
10
10
  margin-bottom: 1rem;
11
11
  border-radius: 4px;
package/src/form/Form.tsx CHANGED
@@ -104,7 +104,7 @@ export const DynamicForm = forwardRef(
104
104
  if (v.focus) {
105
105
  inputRef?.current?.focus();
106
106
  }
107
- }, [v.focus, values]);
107
+ }, []);
108
108
  return (
109
109
  <React.Fragment key={key}>
110
110
  {v.type === "checkbox" ? (
@@ -14,6 +14,7 @@ export const FormView = (): JSX.Element => {
14
14
  {
15
15
  value: "Alexandre",
16
16
  label: "Nom",
17
+ focus: true,
17
18
  name: "nom",
18
19
  type: TypeInputEnum.TEXT,
19
20
  required: true,
@@ -33,7 +34,6 @@ export const FormView = (): JSX.Element => {
33
34
  {
34
35
  value: "password",
35
36
  name: "password",
36
- focus: true,
37
37
  label: "Password",
38
38
  type: TypeInputEnum.PASSWORD,
39
39
  },
@@ -1,5 +1,6 @@
1
1
  import { useCallback, useRef, useState } from "react";
2
2
  import { Icon } from "../icon/Icon";
3
+ import { IconSizeEnum } from "../icon/iconSize.enum";
3
4
  import { OverlayPanel } from "../overlayPanel/OverlayPanel";
4
5
  import "./header.css";
5
6
  import { HeaderInterface } from "./header.interface";
@@ -21,7 +22,7 @@ export const Header = ({
21
22
  <div className={`header ${positionFixed ? "header--fixed" : ""}`}>
22
23
  <div className="flex-1 d-flex align-items-center">
23
24
  <span onClick={onClickMenu}>
24
- <Icon classIcon="bi-list"></Icon>
25
+ <Icon size={IconSizeEnum.MEDIUM} classIcon="bi-list"></Icon>
25
26
  </span>
26
27
  <span
27
28
  className={`header-logo ${onClickLogo && "cursor-pointer"} `}
@@ -33,7 +34,7 @@ export const Header = ({
33
34
  <div className="d-flex align-items-center">
34
35
  {children}
35
36
  <div ref={refButton} onClick={onClickUser}>
36
- <Icon classIcon="bi-person-circle"></Icon>
37
+ <Icon size={IconSizeEnum.MEDIUM} classIcon="bi-person-circle"></Icon>
37
38
  </div>
38
39
  {openOverlay && refButton.current && (
39
40
  <OverlayPanel
@@ -1,43 +1,41 @@
1
1
  .menu {
2
- width: 200px;
3
- padding: 2rem;
2
+ width: 200px;
3
+ padding: 2rem;
4
4
 
5
- ul {
6
- list-style: none;
7
- padding: 0;
8
- margin: 0;
9
- display: flex;
10
- flex-direction: column;
11
- flex-wrap: wrap;
12
- justify-content: center;
13
-
14
- li {
15
- margin: 0 10px;
5
+ ul {
6
+ list-style: none;
7
+ padding: 0;
8
+ margin: 0;
9
+ display: flex;
10
+ flex-direction: column;
11
+ flex-wrap: wrap;
12
+ justify-content: center;
16
13
 
17
- button {
18
- background: transparent;
19
- color: #000;
20
- font-weight: 300;
21
- padding: 0px;
22
- border-radius: 0px;
23
- min-width: auto;
24
- margin: 0;
25
- justify-content: normal;
14
+ li {
15
+ button {
16
+ background: transparent;
17
+ color: #000;
18
+ font-weight: 300;
19
+ padding: 0px;
20
+ border-radius: 0px;
21
+ min-width: auto;
22
+ margin: 0;
23
+ justify-content: normal;
26
24
 
27
- &:hover {
28
- color: #f00;
29
- }
30
- }
25
+ &:hover {
26
+ color: #f00;
27
+ }
28
+ }
31
29
 
32
- a {
33
- text-decoration: none;
34
- color: #000;
35
- font-weight: 300;
30
+ a {
31
+ text-decoration: none;
32
+ color: #000;
33
+ font-weight: 300;
36
34
 
37
- &:hover {
38
- color: #f00;
39
- }
40
- }
35
+ &:hover {
36
+ color: #f00;
41
37
  }
38
+ }
42
39
  }
43
- }
40
+ }
41
+ }
@@ -1,6 +1,7 @@
1
1
  import { useCallback, useState } from "react";
2
2
  import { CardInterface } from "../card/card.interface";
3
3
  import { Icon } from "../icon/Icon";
4
+ import { IconSizeEnum } from "../icon/iconSize.enum";
4
5
  import "./Quantity.css";
5
6
  export interface QuantityProps {
6
7
  setQuantity?: (item: CardInterface, qte: number) => void;
@@ -43,14 +44,14 @@ export const Quantity = ({ setQuantity, item }: QuantityProps) => {
43
44
  onClick={(e) => decrementQte(e)}
44
45
  className="qte-action qte-action--minus "
45
46
  >
46
- <Icon classIcon="bi bi-dash-square" />
47
+ <Icon size={IconSizeEnum.LARGE} classIcon="bi bi-dash-square" />
47
48
  </div>
48
49
  <span className="qte-label">{qte}</span>
49
50
  <div
50
51
  onClick={(e) => incrementQte(e)}
51
52
  className="qte-action qte-action--plus "
52
53
  >
53
- <Icon classIcon="bi bi-plus-square" />
54
+ <Icon size={IconSizeEnum.LARGE} classIcon="bi bi-plus-square" />
54
55
  </div>
55
56
  </div>
56
57
  );
@@ -8,9 +8,12 @@
8
8
  .qte-action {
9
9
  cursor: pointer;
10
10
  margin-right: 1.5rem;
11
-
11
+ .bi {
12
+ color: var(--primary-color);
13
+ }
12
14
  &.qte-action--plus {
13
15
  margin-left: 0.5rem;
16
+ margin-right: 0rem;
14
17
  }
15
18
  &.qte-action--minus {
16
19
  margin-right: 0.5rem;
@@ -4,7 +4,7 @@
4
4
  border: 0px;
5
5
  background-color: #ebe8e8;
6
6
  border-radius: 4px;
7
- padding: 0.25rem 0.75rem;
7
+ padding: 0.75rem;
8
8
  flex-direction: row;
9
9
  align-items: center;
10
10
  .bi {