kelt-ui-kit-react 1.9.9 → 2.0.1
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/dist/dataTable/DataTable.d.ts +1 -0
- package/dist/dataTable/dataTableRow/DataTableRow.d.ts +2 -1
- package/dist/form/Form.d.ts +2 -1
- package/dist/form/form.enum.d.ts +2 -1
- package/dist/form/form.interface.d.ts +4 -0
- package/dist/grid/col/Col.d.ts +3 -6
- package/dist/grid/col/colStyled/ColStyled.d.ts +7 -5
- package/dist/grid/grid.interface.d.ts +9 -5
- package/dist/header/header.interface.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2926 -2766
- package/dist/menus/menu/Menu.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/toaster/store/useToasterStore.d.ts +1 -0
- package/index.html +1 -2
- package/package.json +2 -2
- package/src/button/button.css +2 -2
- package/src/card/card.css +2 -2
- package/src/dataTable/DataTable.tsx +114 -6
- package/src/dataTable/DataTable.view.tsx +1 -0
- package/src/dataTable/dataTable.css +51 -3
- package/src/dataTable/dataTableRow/DataTableRow.tsx +85 -81
- package/src/expands/expands.css +8 -3
- package/src/form/Form.tsx +113 -10
- package/src/form/Form.view.tsx +9 -1
- package/src/form/form.css +49 -1
- package/src/form/form.enum.ts +1 -0
- package/src/form/form.interface.tsx +7 -0
- package/src/grid/col/Col.tsx +5 -7
- package/src/grid/col/colStyled/ColStyled.tsx +21 -7
- package/src/grid/grid.interface.tsx +11 -5
- package/src/header/Header.tsx +1 -1
- package/src/header/header.interface.tsx +1 -1
- package/src/index.css +58 -12
- package/src/index.ts +1 -0
- package/src/menus/Menus.tsx +1 -0
- package/src/menus/menu/Menu.tsx +2 -1
- package/src/sidebar/Sidebar.tsx +1 -0
- package/src/tabs/tabs.css +9 -3
- package/src/toaster/Toaster.tsx +7 -2
- package/src/toaster/Toaster.view.tsx +1 -0
- package/src/toaster/store/useToasterStore.tsx +2 -0
- package/src/toaster/toaster.css +7 -2
package/src/index.ts
CHANGED
|
@@ -33,6 +33,7 @@ export { Expands } from "./expands/Expands";
|
|
|
33
33
|
export { FilAriane } from "./filAriane/FilAriane";
|
|
34
34
|
export { DynamicForm } from "./form/Form";
|
|
35
35
|
export { TypeInputEnum } from "./form/form.enum";
|
|
36
|
+
export type { FormMode } from "./form/form.interface";
|
|
36
37
|
export { Input } from "./form/input/Input";
|
|
37
38
|
export { InputNumber } from "./form/inputNumber/InputNumber";
|
|
38
39
|
export { InputPrice } from "./form/inputPrice/InputPrice";
|
package/src/menus/Menus.tsx
CHANGED
|
@@ -22,6 +22,7 @@ export const Menus = (props: ExpandProps) => {
|
|
|
22
22
|
<Menu
|
|
23
23
|
item={item}
|
|
24
24
|
onChange={onChange}
|
|
25
|
+
className={item.subMenu && item.subMenu.length > 0 ? "has-submenu" : ""}
|
|
25
26
|
active={currentItem?.id === item.id}
|
|
26
27
|
/>
|
|
27
28
|
{item.subMenu && item.subMenu.length > 0 && (
|
package/src/menus/menu/Menu.tsx
CHANGED
|
@@ -4,12 +4,13 @@ export type MenuProps = {
|
|
|
4
4
|
active: boolean;
|
|
5
5
|
item: MenuInterface;
|
|
6
6
|
onChange: (item: MenuInterface) => void;
|
|
7
|
+
className?: string;
|
|
7
8
|
};
|
|
8
9
|
export const Menu = (props: MenuProps): JSX.Element => {
|
|
9
10
|
return (
|
|
10
11
|
<div
|
|
11
12
|
onClick={() => props.onChange(props.item)}
|
|
12
|
-
className={props.active ? "expand
|
|
13
|
+
className={`expand ${props.active ? "expand--active" : ""} ${props.className || ""}`}
|
|
13
14
|
>
|
|
14
15
|
{props.item.children}
|
|
15
16
|
</div>
|
package/src/sidebar/Sidebar.tsx
CHANGED
|
@@ -193,6 +193,7 @@ export const Sidebar = ({
|
|
|
193
193
|
transition: isDragging ? "none" : undefined,
|
|
194
194
|
}}
|
|
195
195
|
className={`sidebar ${isOpen ? "open" : "closed"} ${className ?? ""}`}
|
|
196
|
+
onClick={(event) => event.stopPropagation()}
|
|
196
197
|
onTouchStart={handleTouchStart}
|
|
197
198
|
onTouchMove={handleTouchMove}
|
|
198
199
|
onTouchEnd={handleTouchEnd}
|
package/src/tabs/tabs.css
CHANGED
|
@@ -1,24 +1,30 @@
|
|
|
1
1
|
.tabs-root {
|
|
2
2
|
height: 100%;
|
|
3
|
+
|
|
3
4
|
.tabs-header {
|
|
4
5
|
display: flex;
|
|
5
6
|
border-bottom: 1px solid #b2a1a1;
|
|
7
|
+
|
|
6
8
|
.tab-button {
|
|
7
9
|
padding: 0.5rem 0.75rem;
|
|
8
10
|
border: 0px;
|
|
9
11
|
outline: none;
|
|
10
12
|
background-color: transparent;
|
|
11
|
-
color: #1e293b;
|
|
13
|
+
color: #1e293b;
|
|
14
|
+
/* slate-800 */
|
|
12
15
|
cursor: pointer;
|
|
13
16
|
|
|
14
17
|
&.tab-button--active {
|
|
15
|
-
border-bottom: 2px solid var(--primary-color);
|
|
18
|
+
border-bottom: 2px solid var(--primary-color);
|
|
19
|
+
/* slate-800 */
|
|
16
20
|
border-radius: 0px;
|
|
21
|
+
font-weight: bold;
|
|
17
22
|
}
|
|
23
|
+
|
|
18
24
|
&.tab-button--disabled {
|
|
19
25
|
opacity: 0.5;
|
|
20
26
|
cursor: not-allowed;
|
|
21
27
|
}
|
|
22
28
|
}
|
|
23
29
|
}
|
|
24
|
-
}
|
|
30
|
+
}
|
package/src/toaster/Toaster.tsx
CHANGED
|
@@ -34,9 +34,14 @@ export const Toaster = () => {
|
|
|
34
34
|
return ReactDOM.createPortal(
|
|
35
35
|
<div className={`toaster toaster-${severity}`}>
|
|
36
36
|
{close && (
|
|
37
|
-
<
|
|
37
|
+
<button
|
|
38
|
+
type="button"
|
|
39
|
+
className="toaster--close"
|
|
40
|
+
onClick={onClose}
|
|
41
|
+
aria-label="Fermer la notification"
|
|
42
|
+
>
|
|
38
43
|
<Icon classIcon="bi-x" />
|
|
39
|
-
</
|
|
44
|
+
</button>
|
|
40
45
|
)}
|
|
41
46
|
<div>
|
|
42
47
|
{severity === "info" && <Icon classIcon="bi-info-circle" />}
|
|
@@ -15,6 +15,7 @@ type ToasterState = {
|
|
|
15
15
|
severity?: "info" | "success" | "error" | "warning";
|
|
16
16
|
duration?: number;
|
|
17
17
|
children?: React.ReactNode;
|
|
18
|
+
close?: boolean;
|
|
18
19
|
}
|
|
19
20
|
) => void;
|
|
20
21
|
hideToast: () => void;
|
|
@@ -36,6 +37,7 @@ export const useToasterStore = create<ToasterState>((set) => ({
|
|
|
36
37
|
duration: options.duration || 2500,
|
|
37
38
|
visible: true,
|
|
38
39
|
children: options.children || null,
|
|
40
|
+
close: options.close ?? true,
|
|
39
41
|
})),
|
|
40
42
|
hideToast: () => set(() => ({ visible: false })),
|
|
41
43
|
}));
|
package/src/toaster/toaster.css
CHANGED
|
@@ -15,7 +15,12 @@
|
|
|
15
15
|
position: absolute;
|
|
16
16
|
top: 2px;
|
|
17
17
|
right: 2px;
|
|
18
|
+
margin: 0;
|
|
19
|
+
padding: 0;
|
|
20
|
+
border: 0;
|
|
21
|
+
background: transparent;
|
|
18
22
|
color: #333;
|
|
23
|
+
min-width: auto;
|
|
19
24
|
cursor: pointer;
|
|
20
25
|
.bi {
|
|
21
26
|
font-size: 1.2rem;
|
|
@@ -55,7 +60,7 @@
|
|
|
55
60
|
}
|
|
56
61
|
.title {
|
|
57
62
|
font-weight: 500;
|
|
58
|
-
font-size:
|
|
63
|
+
font-size: 18px;
|
|
59
64
|
&.title-info {
|
|
60
65
|
color: var(--primary-color);
|
|
61
66
|
}
|
|
@@ -70,7 +75,7 @@
|
|
|
70
75
|
}
|
|
71
76
|
}
|
|
72
77
|
.subtitle {
|
|
73
|
-
font-size:
|
|
78
|
+
font-size: 16px;
|
|
74
79
|
}
|
|
75
80
|
.bi-info-circle {
|
|
76
81
|
color: var(--primary-color);
|