kelt-ui-kit-react 1.8.2 → 1.8.3
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/.github/workflows/publish.yml +31 -0
- package/dist/_core/type/generiqueType.d.ts +4 -0
- package/dist/badge/Badge.d.ts +3 -1
- package/dist/button/button.interface.d.ts +1 -1
- package/dist/dataTable/DataTable.d.ts +17 -3
- package/dist/dataTable/dataTable.interface.d.ts +21 -3
- package/dist/dataTable/dataTableActions/DataTableAction.d.ts +2 -2
- package/dist/dataTable/dataTableColumn/DataTableColumn.d.ts +13 -7
- package/dist/dataTable/dataTableColumn/dataTableColumnFilter/DataTableColumnFilter.d.ts +10 -0
- package/dist/dataTable/dataTableColumn/dataTableColumnFilter/dataTableColumnFilterDate/DataTableColumnFilterDate.d.ts +9 -0
- package/dist/dataTable/dataTableColumn/dataTableColumnFilter/dataTableColumnFilterDateRange/dataTableColumnFilterDateRange.d.ts +9 -0
- package/dist/dataTable/dataTableColumn/dataTableColumnFilter/dataTableColumnFilterEnum/DataTableColumnFilterEnum.d.ts +13 -0
- package/dist/dataTable/dataTableColumn/dataTableColumnFilter/dataTableColumnFilterString/DataTableColumnFilterString.d.ts +9 -0
- package/dist/dataTable/dataTableColumn/dataTableColumnSort/DataTableColumnSort.d.ts +11 -0
- package/dist/dataTable/dataTableFilters/DataTableFilters.d.ts +7 -0
- package/dist/dataTable/dataTableLoading/DataTableLoading.d.ts +1 -3
- package/dist/dataTable/dataTableRow/DataTableRow.d.ts +5 -3
- package/dist/dataTable/dataTableRow/dataTableRowOverlay/DataTableRowOverlay.d.ts +12 -0
- package/dist/dataTable/dataTableRow/dataTableRowValue/DataTableRowValue.d.ts +11 -0
- package/dist/expands/expand/expand.d.ts +1 -1
- package/dist/form/form.enum.d.ts +1 -0
- package/dist/form/input/Input.d.ts +3 -0
- package/dist/form/inputNumber/InputNumber.d.ts +0 -2
- package/dist/icon/Icon.d.ts +1 -1
- package/dist/icon/icon.interface.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3652 -2836
- package/dist/overlayPanel/OverlayPanel.d.ts +3 -1
- package/dist/select/Select.d.ts +4 -1
- package/dist/select/selectOption.interface.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/tabs/Tabs.d.ts +2 -1
- package/kelt-ui-kit-react-1.6.9.tgz +0 -0
- package/package/README.md +46 -0
- package/package/index.html +20 -0
- package/package/package.json +56 -0
- package/package/public/favicon.ico +0 -0
- package/package/public/index.html +18 -0
- package/package/public/logo192.png +0 -0
- package/package/public/logo512.png +0 -0
- package/package/public/manifest.json +25 -0
- package/package/public/robots.txt +3 -0
- package/package/src/App.css +11 -0
- package/package/src/App.menu.tsx +249 -0
- package/package/src/App.routes.tsx +16 -0
- package/package/src/App.tsx +30 -0
- package/package/src/_core/hooks/HistoryProvider.tsx +25 -0
- package/package/src/_core/hooks/ImageChecker.tsx +26 -0
- package/package/src/_core/hooks/imageExist.tsx +9 -0
- package/package/src/_core/hooks/isEAN13.tsx +16 -0
- package/package/src/_core/hooks/objectToQueryParams.tsx +32 -0
- package/package/src/_core/hooks/useCurrency.tsx +18 -0
- package/package/src/_core/hooks/useDateutils.ts +64 -0
- package/package/src/_core/hooks/useIsMobile.ts +18 -0
- package/package/src/_core/hooks/useToken.tsx +19 -0
- package/package/src/_core/hooks/useValidate.tsx +18 -0
- package/package/src/_core/hooks/widgetSupport.tsx +39 -0
- package/package/src/action/Action.view.tsx +21 -0
- package/package/src/action/ButtonAction.tsx +32 -0
- package/package/src/action/action.css +20 -0
- package/package/src/badge/Badge.tsx +34 -0
- package/package/src/badge/Badge.view.tsx +15 -0
- package/package/src/badge/badge.css +55 -0
- package/package/src/button/Button.tsx +46 -0
- package/package/src/button/Button.view.tsx +85 -0
- package/package/src/button/button.css +53 -0
- package/package/src/button/button.interface.tsx +21 -0
- package/package/src/button/buttonActions/ButtonActions.tsx +104 -0
- package/package/src/button/buttonFile/ButtonFile.tsx +59 -0
- package/package/src/button/buttonFile/ButtonFile.view.tsx +70 -0
- package/package/src/button/buttonFilters/ButtonFilters.tsx +102 -0
- package/package/src/button/buttonFilters/buttonFilters.css +22 -0
- package/package/src/card/Card.tsx +125 -0
- package/package/src/card/Card.view.tsx +73 -0
- package/package/src/card/card.css +145 -0
- package/package/src/card/card.interface.tsx +9 -0
- package/package/src/card/cardAction/CardAction.tsx +135 -0
- package/package/src/card/cardAction/cardAction.css +10 -0
- package/package/src/card/cardAction.interface.tsx +10 -0
- package/package/src/card/hook/useCardInteractions.tsx +30 -0
- package/package/src/carousel/Carousel.css +44 -0
- package/package/src/carousel/Carousel.tsx +115 -0
- package/package/src/carousel/Carousel.view.tsx +13 -0
- package/package/src/damier/Damier.tsx +64 -0
- package/package/src/damier/Damier.view.tsx +31 -0
- package/package/src/damier/damier.css +50 -0
- package/package/src/damier/damierCell/DamierCell.tsx +18 -0
- package/package/src/damier/damierCell/damierCell.interface.tsx +5 -0
- package/package/src/dataTable/DataTable.tsx +259 -0
- package/package/src/dataTable/DataTable.view.tsx +62 -0
- package/package/src/dataTable/dataTable.css +30 -0
- package/package/src/dataTable/dataTable.interface.ts +30 -0
- package/package/src/dataTable/dataTableActions/DataTableAction.tsx +44 -0
- package/package/src/dataTable/dataTableColumn/DataTableColumn.tsx +27 -0
- package/package/src/dataTable/dataTableLoading/DataTableLoading.tsx +21 -0
- package/package/src/dataTable/dataTableRow/DataTableRow.tsx +54 -0
- package/package/src/datePicker/DatePicker.tsx +110 -0
- package/package/src/datePicker/DatePicker.view.tsx +9 -0
- package/package/src/datePicker/datePicker.css +77 -0
- package/package/src/expands/Expands.tsx +42 -0
- package/package/src/expands/Expands.view.tsx +90 -0
- package/package/src/expands/expand/expand.interface.tsx +8 -0
- package/package/src/expands/expand/expand.tsx +75 -0
- package/package/src/expands/expands.css +97 -0
- package/package/src/filAriane/FilAriane.tsx +57 -0
- package/package/src/filAriane/FilAriane.view.tsx +28 -0
- package/package/src/filAriane/filAriane.css +23 -0
- package/package/src/filAriane/filAriane.interface.tsx +6 -0
- package/package/src/form/Form.tsx +279 -0
- package/package/src/form/Form.view.tsx +59 -0
- package/package/src/form/form.css +62 -0
- package/package/src/form/form.enum.ts +13 -0
- package/package/src/form/form.interface.tsx +37 -0
- package/package/src/form/input/Input.tsx +106 -0
- package/package/src/form/input/input.css +26 -0
- package/package/src/form/inputNumber/InputNumber.tsx +132 -0
- package/package/src/form/inputNumber/InputNumber.view.tsx +15 -0
- package/package/src/form/inputPrice/InputPrice.tsx +42 -0
- package/package/src/form/inputPrice/InputPrice.view.tsx +15 -0
- package/package/src/form/textArea/TextArea.tsx +59 -0
- package/package/src/form/textArea/TextArea.view.tsx +34 -0
- package/package/src/form/textArea/textArea.css +9 -0
- package/package/src/grid/Grid.tsx +21 -0
- package/package/src/grid/Grid.view.tsx +24 -0
- package/package/src/grid/col/Col.tsx +15 -0
- package/package/src/grid/col/colStyled/ColStyled.tsx +41 -0
- package/package/src/grid/container/Container.tsx +8 -0
- package/package/src/grid/container/container.css +5 -0
- package/package/src/grid/grid.interface.tsx +7 -0
- package/package/src/grid/row/Row.tsx +12 -0
- package/package/src/grid/row/row.css +18 -0
- package/package/src/header/Header.tsx +62 -0
- package/package/src/header/Header.view.tsx +5 -0
- package/package/src/header/header.css +26 -0
- package/package/src/header/header.interface.tsx +10 -0
- package/package/src/home/Home.tsx +3 -0
- package/package/src/icon/Icon.tsx +6 -0
- package/package/src/icon/Icons.view.tsx +29 -0
- package/package/src/icon/icon.css +20 -0
- package/package/src/icon/icon.interface.tsx +6 -0
- package/package/src/icon/iconSize.enum.ts +7 -0
- package/package/src/index.css +502 -0
- package/package/src/index.ts +58 -0
- package/package/src/loader/Loader.tsx +37 -0
- package/package/src/loader/Loader.view.tsx +20 -0
- package/package/src/loader/loader.css +30 -0
- package/package/src/logo.svg +1 -0
- package/package/src/main.tsx +10 -0
- package/package/src/menus/Menus.tsx +42 -0
- package/package/src/menus/Menus.view.tsx +39 -0
- package/package/src/menus/menu/Menu.tsx +17 -0
- package/package/src/menus/menu/menu.interface.tsx +9 -0
- package/package/src/menus/menus.css +47 -0
- package/package/src/message/Message.tsx +30 -0
- package/package/src/message/Message.view.tsx +22 -0
- package/package/src/message/message.css +29 -0
- package/package/src/modal/Modal.tsx +59 -0
- package/package/src/modal/Modal.view.tsx +26 -0
- package/package/src/modal/modal.css +71 -0
- package/package/src/notFound/NotFound.tsx +3 -0
- package/package/src/overlayPanel/OverlayPanel.tsx +195 -0
- package/package/src/overlayPanel/OverlayPanel.view.tsx +25 -0
- package/package/src/overlayPanel/overlay.context.tsx +28 -0
- package/package/src/overlayPanel/overlayPanel.css +35 -0
- package/package/src/overlayPanel/overlayPanelStyled/OverlayPanelStyled.tsx +18 -0
- package/package/src/pdfViewer/PdfViewer.tsx +73 -0
- package/package/src/pdfViewer/PdfViewer.view.tsx +5 -0
- package/package/src/quantity/Quantity.tsx +103 -0
- package/package/src/quantity/Quantity.view.tsx +0 -0
- package/package/src/quantity/quantity.css +26 -0
- package/package/src/search/Search.tsx +161 -0
- package/package/src/search/Search.view.tsx +14 -0
- package/package/src/search/search.css +59 -0
- package/package/src/select/Select.tsx +103 -0
- package/package/src/select/Select.view.tsx +71 -0
- package/package/src/select/select.css +69 -0
- package/package/src/select/selectOption.interface.ts +4 -0
- package/package/src/sidebar/Sidebar.tsx +208 -0
- package/package/src/sidebar/Sidebar.view.tsx +17 -0
- package/package/src/sidebar/sidebar.css +104 -0
- package/package/src/sidebarData/SidebarData.tsx +19 -0
- package/package/src/sidebarData/SidebarData.view.tsx +19 -0
- package/package/src/sidebarData/sidebarData.css +27 -0
- package/package/src/tabs/Tabs.tsx +90 -0
- package/package/src/tabs/Tabs.view.tsx +20 -0
- package/package/src/tabs/tabs.css +24 -0
- package/package/src/toaster/Toaster.tsx +55 -0
- package/package/src/toaster/Toaster.view.tsx +24 -0
- package/package/src/toaster/store/useToasterStore.tsx +41 -0
- package/package/src/toaster/toaster.css +87 -0
- package/package/tsconfig.json +28 -0
- package/package/vite.config.ts +20 -0
- package/package/vite.config.ts.timestamp-1733262892554-a13dfef6e8a29.mjs +24 -0
- package/package/vite.config.ts.timestamp-1757847121745-e5a5bf54b81b.mjs +28 -0
- package/package/vite.config.ts.timestamp-1759742478362-4ac5c5a7db34b.mjs +28 -0
- package/package.json +1 -1
- package/src/_core/type/generiqueType.tsx +4 -0
- package/src/badge/Badge.tsx +9 -1
- package/src/badge/badge.css +4 -0
- package/src/button/Button.tsx +1 -1
- package/src/button/button.interface.tsx +1 -1
- package/src/card/card.css +23 -3
- package/src/card/cardAction/CardAction.tsx +4 -4
- package/src/dataTable/DataTable.tsx +670 -45
- package/src/dataTable/DataTable.view.tsx +47 -14
- package/src/dataTable/dataTable.css +153 -5
- package/src/dataTable/dataTable.interface.ts +21 -3
- package/src/dataTable/dataTableActions/DataTableAction.tsx +2 -2
- package/src/dataTable/dataTableColumn/DataTableColumn.tsx +64 -14
- package/src/dataTable/dataTableColumn/dataTableColumnFilter/DataTableColumnFilter.tsx +36 -0
- package/src/dataTable/dataTableColumn/dataTableColumnFilter/dataTableColumnFilter.css +0 -0
- package/src/dataTable/dataTableColumn/dataTableColumnFilter/dataTableColumnFilterDate/DataTableColumnFilterDate.tsx +39 -0
- package/src/dataTable/dataTableColumn/dataTableColumnFilter/dataTableColumnFilterDateRange/dataTableColumnFilterDateRange.tsx +80 -0
- package/src/dataTable/dataTableColumn/dataTableColumnFilter/dataTableColumnFilterEnum/DataTableColumnFilterEnum.tsx +89 -0
- package/src/dataTable/dataTableColumn/dataTableColumnFilter/dataTableColumnFilterString/DataTableColumnFilterString.tsx +37 -0
- package/src/dataTable/dataTableColumn/dataTableColumnSort/DataTableColumnSort.tsx +42 -0
- package/src/dataTable/dataTableFilters/DataTableFilters.tsx +91 -0
- package/src/dataTable/dataTableFilters/dataTableFilters.css +16 -0
- package/src/dataTable/dataTableLoading/DataTableLoading.tsx +4 -15
- package/src/dataTable/dataTableRow/DataTableRow.tsx +60 -33
- package/src/dataTable/dataTableRow/dataTableRowOverlay/DataTableRowOverlay.tsx +80 -0
- package/src/dataTable/dataTableRow/dataTableRowValue/DataTableRowValue.tsx +123 -0
- package/src/expands/Expands.tsx +2 -16
- package/src/expands/expand/expand.tsx +6 -18
- package/src/form/Form.tsx +13 -12
- package/src/form/form.css +13 -2
- package/src/form/form.enum.ts +1 -0
- package/src/form/input/Input.tsx +61 -7
- package/src/form/input/input.css +23 -1
- package/src/form/inputNumber/InputNumber.tsx +6 -11
- package/src/form/inputPrice/InputPrice.tsx +2 -4
- package/src/icon/Icon.tsx +6 -2
- package/src/icon/icon.interface.tsx +1 -0
- package/src/index.ts +2 -0
- package/src/overlayPanel/OverlayPanel.tsx +23 -10
- package/src/overlayPanel/overlay.context.tsx +6 -4
- package/src/overlayPanel/overlayPanel.css +10 -1
- package/src/select/Select.tsx +134 -38
- package/src/select/select.css +65 -14
- package/src/select/selectOption.interface.ts +1 -0
- package/src/sidebar/Sidebar.tsx +9 -80
- package/src/sidebar/sidebar.css +1 -18
- package/src/tabs/Tabs.tsx +19 -1
- package/vite.config.ts.timestamp-1757847121745-e5a5bf54b81b.mjs +28 -28
- package/vite.config.ts.timestamp-1759742478362-4ac5c5a7db34b.mjs +28 -28
|
@@ -0,0 +1,502 @@
|
|
|
1
|
+
/* variables couleur */
|
|
2
|
+
:root {
|
|
3
|
+
--primary-color: #004aad;
|
|
4
|
+
--secondary-color: #ff914d;
|
|
5
|
+
--tertiary-color: #00ada1;
|
|
6
|
+
--quaternary-color: #0082ad;
|
|
7
|
+
--success-color: #28a745;
|
|
8
|
+
--info-color: #17a2b8;
|
|
9
|
+
--warning-color: #ec942c;
|
|
10
|
+
--danger-color: #dc3545;
|
|
11
|
+
--light-color: #f8f9fa;
|
|
12
|
+
--dark-color: #343a40;
|
|
13
|
+
--white-color: #fff;
|
|
14
|
+
--black-color: #000;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
html,
|
|
18
|
+
body {
|
|
19
|
+
margin: 0;
|
|
20
|
+
font-family: "Raleway", sans-serif !important;
|
|
21
|
+
-webkit-font-smoothing: antialiased;
|
|
22
|
+
-moz-osx-font-smoothing: grayscale;
|
|
23
|
+
height: 100%;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
#root {
|
|
27
|
+
height: 100%;
|
|
28
|
+
width: 100%;
|
|
29
|
+
background-color: #fff;
|
|
30
|
+
}
|
|
31
|
+
.app {
|
|
32
|
+
container: app-container/ inline-size;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
input[type="number"]::-webkit-outer-spin-button,
|
|
36
|
+
input[type="number"]::-webkit-inner-spin-button {
|
|
37
|
+
-webkit-appearance: none; /* Chrome, Safari, Edge */
|
|
38
|
+
margin: 0;
|
|
39
|
+
}
|
|
40
|
+
/* flex properties */
|
|
41
|
+
|
|
42
|
+
.d-flex {
|
|
43
|
+
display: flex;
|
|
44
|
+
}
|
|
45
|
+
.justify-content-start {
|
|
46
|
+
justify-content: start;
|
|
47
|
+
}
|
|
48
|
+
.justify-content-end {
|
|
49
|
+
justify-content: end;
|
|
50
|
+
}
|
|
51
|
+
.justify-content-center {
|
|
52
|
+
justify-content: center;
|
|
53
|
+
}
|
|
54
|
+
.justify-content-between {
|
|
55
|
+
justify-content: space-between;
|
|
56
|
+
}
|
|
57
|
+
.justify-content-around {
|
|
58
|
+
justify-content: space-around;
|
|
59
|
+
}
|
|
60
|
+
.justify-content-evenly {
|
|
61
|
+
justify-content: space-evenly;
|
|
62
|
+
}
|
|
63
|
+
.align-items-start {
|
|
64
|
+
align-items: start;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.align-items-center {
|
|
68
|
+
align-items: center;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.flex-column {
|
|
72
|
+
flex-direction: column;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.flex-row {
|
|
76
|
+
flex-direction: row;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.flex-wrap {
|
|
80
|
+
flex-wrap: wrap;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.flex-1 {
|
|
84
|
+
flex: 1;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.flex-2 {
|
|
88
|
+
flex: 2;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.flex-3 {
|
|
92
|
+
flex: 3;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.flex-4 {
|
|
96
|
+
flex: 4;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.flex-5 {
|
|
100
|
+
flex: 5;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.flex-6 {
|
|
104
|
+
flex: 6;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.flex-7 {
|
|
108
|
+
flex: 7;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.flex-8 {
|
|
112
|
+
flex: 8;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.flex-9 {
|
|
116
|
+
flex: 9;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.flex-10 {
|
|
120
|
+
flex: 10;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.flex-11 {
|
|
124
|
+
flex: 11;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.flex-12 {
|
|
128
|
+
flex: 12;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* Reset CSS */
|
|
132
|
+
* {
|
|
133
|
+
margin: 0;
|
|
134
|
+
padding: 0;
|
|
135
|
+
box-sizing: border-box;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
p {
|
|
139
|
+
margin: 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
ul {
|
|
143
|
+
list-style: none;
|
|
144
|
+
|
|
145
|
+
& li {
|
|
146
|
+
margin: 0;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
a {
|
|
151
|
+
text-decoration: none;
|
|
152
|
+
color: inherit;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* helper */
|
|
156
|
+
.h-100 {
|
|
157
|
+
height: 100%;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* Text */
|
|
161
|
+
.text-center {
|
|
162
|
+
text-align: center;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.text-left {
|
|
166
|
+
text-align: left;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.text-right {
|
|
170
|
+
text-align: right;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.text-justify {
|
|
174
|
+
text-align: justify;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.text-uppercase {
|
|
178
|
+
text-transform: uppercase;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.text-lowercase {
|
|
182
|
+
text-transform: lowercase;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.text-capitalize {
|
|
186
|
+
text-transform: capitalize;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.text-bold {
|
|
190
|
+
font-weight: bold;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.text-italic {
|
|
194
|
+
font-style: italic;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.text-underline {
|
|
198
|
+
text-decoration: underline;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.text-line-through {
|
|
202
|
+
text-decoration: line-through;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.text-white {
|
|
206
|
+
color: var(--white-color);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.text-black {
|
|
210
|
+
color: var(--black-color);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.text-primary {
|
|
214
|
+
color: var(--primary-color);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.text-secondary {
|
|
218
|
+
color: var(--secondary-color);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.text-success {
|
|
222
|
+
color: var(--success-color);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.text-info {
|
|
226
|
+
color: var(--info-color);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.text-warning {
|
|
230
|
+
color: var(--warning-color);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/* Margin et padding */
|
|
234
|
+
.m-0 {
|
|
235
|
+
margin: 0;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.m-1 {
|
|
239
|
+
margin: 0.25rem;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.m-2 {
|
|
243
|
+
margin: 0.5rem;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.m-3 {
|
|
247
|
+
margin: 1rem;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.mr-0 {
|
|
251
|
+
margin-right: 0;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.mr-1 {
|
|
255
|
+
margin-right: 0.25rem;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.mr-2 {
|
|
259
|
+
margin-right: 0.5rem;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.mr-3 {
|
|
263
|
+
margin-right: 1rem;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.ml-0 {
|
|
267
|
+
margin-left: 0;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.ml-1 {
|
|
271
|
+
margin-left: 0.25rem;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.ml-2 {
|
|
275
|
+
margin-left: 0.5rem;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.ml-3 {
|
|
279
|
+
margin-left: 1rem;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.mt-0 {
|
|
283
|
+
margin-top: 0;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.mt-1 {
|
|
287
|
+
margin-top: 0.25rem;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.mt-2 {
|
|
291
|
+
margin-top: 0.5rem;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.mt-3 {
|
|
295
|
+
margin-top: 1rem;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.mb-0 {
|
|
299
|
+
margin-bottom: 0;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.mb-1 {
|
|
303
|
+
margin-bottom: 0.25rem;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.mb-2 {
|
|
307
|
+
margin-bottom: 0.5rem;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.mb-3 {
|
|
311
|
+
margin-bottom: 1rem;
|
|
312
|
+
}
|
|
313
|
+
.pb-0 {
|
|
314
|
+
padding-bottom: 0;
|
|
315
|
+
}
|
|
316
|
+
.pb-1 {
|
|
317
|
+
padding-bottom: 0.25rem;
|
|
318
|
+
}
|
|
319
|
+
.pb-2 {
|
|
320
|
+
padding-bottom: 0.5rem;
|
|
321
|
+
}
|
|
322
|
+
.pb-3 {
|
|
323
|
+
padding-bottom: 1rem;
|
|
324
|
+
}
|
|
325
|
+
.pt-0 {
|
|
326
|
+
padding-top: 0;
|
|
327
|
+
}
|
|
328
|
+
.pt-1 {
|
|
329
|
+
padding-top: 0.25rem;
|
|
330
|
+
}
|
|
331
|
+
.pt-2 {
|
|
332
|
+
padding-top: 0.5rem;
|
|
333
|
+
}
|
|
334
|
+
.pt-3 {
|
|
335
|
+
padding-top: 1rem;
|
|
336
|
+
}
|
|
337
|
+
.pl-0 {
|
|
338
|
+
padding-left: 0;
|
|
339
|
+
}
|
|
340
|
+
.pl-1 {
|
|
341
|
+
padding-left: 0.25rem;
|
|
342
|
+
}
|
|
343
|
+
.pl-2 {
|
|
344
|
+
padding-left: 0.5rem;
|
|
345
|
+
}
|
|
346
|
+
.pl-3 {
|
|
347
|
+
padding-left: 1rem;
|
|
348
|
+
}
|
|
349
|
+
.pr-0 {
|
|
350
|
+
padding-right: 0;
|
|
351
|
+
}
|
|
352
|
+
.pr-1 {
|
|
353
|
+
padding-right: 0.25rem;
|
|
354
|
+
}
|
|
355
|
+
.pr-2 {
|
|
356
|
+
padding-right: 0.5rem;
|
|
357
|
+
}
|
|
358
|
+
.pr-3 {
|
|
359
|
+
padding-right: 1rem;
|
|
360
|
+
}
|
|
361
|
+
.p-0 {
|
|
362
|
+
padding: 0;
|
|
363
|
+
}
|
|
364
|
+
.p-1 {
|
|
365
|
+
padding: 0.25rem;
|
|
366
|
+
}
|
|
367
|
+
.p-2 {
|
|
368
|
+
padding: 0.5rem;
|
|
369
|
+
}
|
|
370
|
+
.p-3 {
|
|
371
|
+
padding: 1rem;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/* border */
|
|
375
|
+
.border-bottom {
|
|
376
|
+
border-bottom: 1px solid #cfbdbd;
|
|
377
|
+
}
|
|
378
|
+
.border-top {
|
|
379
|
+
border-top: 1px solid #cfbdbd;
|
|
380
|
+
}
|
|
381
|
+
.border-left {
|
|
382
|
+
border-left: 1px solid #cfbdbd;
|
|
383
|
+
}
|
|
384
|
+
.border-right {
|
|
385
|
+
border-right: 1px solid #cfbdbd;
|
|
386
|
+
}
|
|
387
|
+
/* fonts */
|
|
388
|
+
.font-weight-bold {
|
|
389
|
+
font-weight: 600;
|
|
390
|
+
}
|
|
391
|
+
.font-weight-light {
|
|
392
|
+
font-weight: 300;
|
|
393
|
+
}
|
|
394
|
+
.font-weight-normal {
|
|
395
|
+
font-weight: 400;
|
|
396
|
+
}
|
|
397
|
+
.font-weight-italic {
|
|
398
|
+
font-style: italic;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/* class generique*/
|
|
402
|
+
.visible {
|
|
403
|
+
visibility: visible;
|
|
404
|
+
}
|
|
405
|
+
.hidden {
|
|
406
|
+
visibility: hidden;
|
|
407
|
+
}
|
|
408
|
+
.position-relative {
|
|
409
|
+
position: relative;
|
|
410
|
+
}
|
|
411
|
+
.position-absolute {
|
|
412
|
+
position: absolute;
|
|
413
|
+
}
|
|
414
|
+
.cursor-pointer {
|
|
415
|
+
cursor: pointer;
|
|
416
|
+
}
|
|
417
|
+
.w-100 {
|
|
418
|
+
width: 100%;
|
|
419
|
+
}
|
|
420
|
+
.min-width-auto {
|
|
421
|
+
min-width: auto;
|
|
422
|
+
}
|
|
423
|
+
.disabled {
|
|
424
|
+
opacity: 0.5;
|
|
425
|
+
cursor: not-allowed;
|
|
426
|
+
pointer-events: none;
|
|
427
|
+
}
|
|
428
|
+
.overflow-auto {
|
|
429
|
+
overflow: auto;
|
|
430
|
+
}
|
|
431
|
+
.toggle-btn {
|
|
432
|
+
display: flex;
|
|
433
|
+
width: 100%;
|
|
434
|
+
justify-content: flex-end;
|
|
435
|
+
background-color: transparent;
|
|
436
|
+
border: none;
|
|
437
|
+
color: #333;
|
|
438
|
+
cursor: pointer;
|
|
439
|
+
margin: 0;
|
|
440
|
+
min-width: 10px;
|
|
441
|
+
width: auto;
|
|
442
|
+
padding: 0px;
|
|
443
|
+
|
|
444
|
+
&.toggle-btn-round {
|
|
445
|
+
border: 1px solid #cfbdbd;
|
|
446
|
+
border-radius: 50%;
|
|
447
|
+
padding: 0.1rem;
|
|
448
|
+
width: 25px;
|
|
449
|
+
height: 25px;
|
|
450
|
+
display: flex;
|
|
451
|
+
align-items: center;
|
|
452
|
+
justify-content: center;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.bi {
|
|
456
|
+
font-size: 0.8rem;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
&.toggle-btn--absolute {
|
|
460
|
+
position: absolute;
|
|
461
|
+
right: 10px;
|
|
462
|
+
top: 10px;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
/* scrollbar */
|
|
467
|
+
/* Style pour les navigateurs modernes */
|
|
468
|
+
::-webkit-scrollbar {
|
|
469
|
+
width: 2px;
|
|
470
|
+
/* Largeur de la barre verticale */
|
|
471
|
+
height: 2px;
|
|
472
|
+
/* Hauteur de la barre horizontale */
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
::-webkit-scrollbar-thumb {
|
|
476
|
+
background-color: grey;
|
|
477
|
+
/* Couleur de la barre de défilement */
|
|
478
|
+
border-radius: 10px;
|
|
479
|
+
/* Arrondir les bords */
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
::-webkit-scrollbar-track {
|
|
483
|
+
background-color: transparent;
|
|
484
|
+
/* Couleur du fond de la zone de défilement */
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
/* Style pour Firefox */
|
|
488
|
+
* {
|
|
489
|
+
scrollbar-width: thin;
|
|
490
|
+
/* Réduit la largeur */
|
|
491
|
+
scrollbar-color: grey transparent;
|
|
492
|
+
/* Couleurs : gris pour la barre, transparent pour le fond */
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
@media (min-width: 576px) {
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
@media (min-width: 768px) {
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
@media (min-width: 992px) {
|
|
502
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import "bootstrap-icons/font/bootstrap-icons.css";
|
|
2
|
+
import "./index.css";
|
|
3
|
+
export {
|
|
4
|
+
HistoryProvider,
|
|
5
|
+
useHistoryDepth,
|
|
6
|
+
} from "./_core/hooks/HistoryProvider";
|
|
7
|
+
export { ImageChecker } from "./_core/hooks/ImageChecker";
|
|
8
|
+
export { ImageExist } from "./_core/hooks/imageExist";
|
|
9
|
+
export { isValidEAN13 } from "./_core/hooks/isEAN13";
|
|
10
|
+
export { objectToQueryParams } from "./_core/hooks/objectToQueryParams";
|
|
11
|
+
export { useCurrency } from "./_core/hooks/useCurrency";
|
|
12
|
+
export {
|
|
13
|
+
FormatDate,
|
|
14
|
+
localDateEndToUTC,
|
|
15
|
+
localDateStartToUTC,
|
|
16
|
+
LocalDateStringToUTC,
|
|
17
|
+
} from "./_core/hooks/useDateutils";
|
|
18
|
+
export { useIsMobile } from "./_core/hooks/useIsMobile";
|
|
19
|
+
export { useToken } from "./_core/hooks/useToken";
|
|
20
|
+
export { useValidate } from "./_core/hooks/useValidate";
|
|
21
|
+
export { WidgetSupport } from "./_core/hooks/widgetSupport";
|
|
22
|
+
export { ButtonAction } from "./action/ButtonAction";
|
|
23
|
+
export { Badge } from "./badge/Badge";
|
|
24
|
+
export { Button } from "./button/Button";
|
|
25
|
+
export { ButtonActions } from "./button/buttonActions/ButtonActions";
|
|
26
|
+
export { ButtonFile } from "./button/buttonFile/ButtonFile";
|
|
27
|
+
export { Card } from "./card/Card";
|
|
28
|
+
export { Carousel } from "./carousel/Carousel";
|
|
29
|
+
export { Damier } from "./damier/Damier";
|
|
30
|
+
export { DataTable } from "./dataTable/DataTable";
|
|
31
|
+
export { DatePicker } from "./datePicker/DatePicker";
|
|
32
|
+
export { Expands } from "./expands/Expands";
|
|
33
|
+
export { FilAriane } from "./filAriane/FilAriane";
|
|
34
|
+
export { DynamicForm } from "./form/Form";
|
|
35
|
+
export { TypeInputEnum } from "./form/form.enum";
|
|
36
|
+
export { Input } from "./form/input/Input";
|
|
37
|
+
export { InputNumber } from "./form/inputNumber/InputNumber";
|
|
38
|
+
export { InputPrice } from "./form/inputPrice/InputPrice";
|
|
39
|
+
export { TextArea } from "./form/textArea/TextArea";
|
|
40
|
+
export { Grid } from "./grid/Grid";
|
|
41
|
+
export { Header } from "./header/Header";
|
|
42
|
+
export { Icon } from "./icon/Icon";
|
|
43
|
+
export { IconSizeEnum } from "./icon/iconSize.enum";
|
|
44
|
+
export { Loader } from "./loader/Loader";
|
|
45
|
+
export { Menus } from "./menus/Menus";
|
|
46
|
+
export { Message } from "./message/Message";
|
|
47
|
+
export { Modal } from "./modal/Modal";
|
|
48
|
+
export { OverlayProvider } from "./overlayPanel/overlay.context";
|
|
49
|
+
export { OverlayPanel } from "./overlayPanel/OverlayPanel";
|
|
50
|
+
export { PdfViewer } from "./pdfViewer/PdfViewer";
|
|
51
|
+
export { Quantity } from "./quantity/Quantity";
|
|
52
|
+
export { Search } from "./search/Search";
|
|
53
|
+
export { Select } from "./select/Select";
|
|
54
|
+
export { Sidebar } from "./sidebar/Sidebar";
|
|
55
|
+
export { SidebarData } from "./sidebarData/SidebarData";
|
|
56
|
+
export { Tabs } from "./tabs/Tabs";
|
|
57
|
+
export { useToasterStore } from "./toaster/store/useToasterStore";
|
|
58
|
+
export { Toaster } from "./toaster/Toaster";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { createPortal } from "react-dom";
|
|
2
|
+
import { IconSizeEnum } from "../icon/iconSize.enum";
|
|
3
|
+
import "./loader.css";
|
|
4
|
+
export type LoaderProps = {
|
|
5
|
+
display: boolean;
|
|
6
|
+
message?: string;
|
|
7
|
+
size?: IconSizeEnum;
|
|
8
|
+
full?: true;
|
|
9
|
+
};
|
|
10
|
+
export const Loader = ({ display, full, message }: LoaderProps) => (
|
|
11
|
+
<>
|
|
12
|
+
{display && !full && (
|
|
13
|
+
<div className={`d-flex flex-column align-items-center`}>
|
|
14
|
+
{message && <span className="mb-3">{message}</span>}
|
|
15
|
+
<div className="position-relative">
|
|
16
|
+
<span className="loader"></span>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
)}
|
|
20
|
+
|
|
21
|
+
{display &&
|
|
22
|
+
full &&
|
|
23
|
+
createPortal(
|
|
24
|
+
<div className="loader-overlay">
|
|
25
|
+
<div>
|
|
26
|
+
<div className={`d-flex flex-column align-items-center`}>
|
|
27
|
+
{message && <span className="mb-3">{message}</span>}
|
|
28
|
+
<div className="position-relative">
|
|
29
|
+
<span className="loader"></span>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>,
|
|
34
|
+
document.body
|
|
35
|
+
)}
|
|
36
|
+
</>
|
|
37
|
+
);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import { Button } from "../button/Button";
|
|
3
|
+
import { IconSizeEnum } from "../icon/iconSize.enum";
|
|
4
|
+
import { Loader } from "./Loader";
|
|
5
|
+
|
|
6
|
+
export const LoaderView = () => {
|
|
7
|
+
const [display, setDisplay] = useState(false);
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<>
|
|
11
|
+
<Button title={"loader-overlay"} onClick={() => setDisplay(!display)} />
|
|
12
|
+
<Loader
|
|
13
|
+
size={IconSizeEnum.EXTRA_LARGE}
|
|
14
|
+
display={!display}
|
|
15
|
+
message={"Loading..."}
|
|
16
|
+
/>
|
|
17
|
+
<Loader display={display} message={"Loading..."} full={true} />
|
|
18
|
+
</>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.loader {
|
|
2
|
+
width: 48px;
|
|
3
|
+
height: 48px;
|
|
4
|
+
border-radius: 50%;
|
|
5
|
+
display: inline-block;
|
|
6
|
+
border-top: 3px solid var(--primary-color);
|
|
7
|
+
border-right: 3px solid transparent;
|
|
8
|
+
-webkit-animation: rotation 1s linear infinite;
|
|
9
|
+
animation: rotation 1s linear infinite;
|
|
10
|
+
}
|
|
11
|
+
.loader-overlay {
|
|
12
|
+
position: fixed;
|
|
13
|
+
top: 0;
|
|
14
|
+
left: 0;
|
|
15
|
+
right: 0;
|
|
16
|
+
bottom: 0;
|
|
17
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
18
|
+
display: flex;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
align-items: center;
|
|
21
|
+
z-index: 1000;
|
|
22
|
+
}
|
|
23
|
+
@keyframes rotation {
|
|
24
|
+
0% {
|
|
25
|
+
transform: rotate(0deg);
|
|
26
|
+
}
|
|
27
|
+
100% {
|
|
28
|
+
transform: rotate(360deg);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3"><g fill="#61DAFB"><path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/><circle cx="420.9" cy="296.5" r="45.7"/><path d="M520.5 78.1z"/></g></svg>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "bootstrap-icons/font/bootstrap-icons.css";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import ReactDOM from "react-dom/client";
|
|
4
|
+
import App from "./App";
|
|
5
|
+
import "./index.css";
|
|
6
|
+
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
|
|
7
|
+
<React.StrictMode>
|
|
8
|
+
<App />
|
|
9
|
+
</React.StrictMode>
|
|
10
|
+
);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { useCallback, useState } from "react";
|
|
2
|
+
import { Menu } from "./menu/Menu";
|
|
3
|
+
import { MenuInterface } from "./menu/menu.interface";
|
|
4
|
+
import "./menus.css";
|
|
5
|
+
|
|
6
|
+
export type ExpandProps = {
|
|
7
|
+
items: MenuInterface[];
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const Menus = (props: ExpandProps) => {
|
|
12
|
+
const [currentItem, setCurrentItem] = useState<MenuInterface | null>(null);
|
|
13
|
+
|
|
14
|
+
const onChange = useCallback((item: MenuInterface) => {
|
|
15
|
+
setCurrentItem(item);
|
|
16
|
+
}, []);
|
|
17
|
+
|
|
18
|
+
const renderMenuItems = (items: MenuInterface[]) => (
|
|
19
|
+
<ul>
|
|
20
|
+
{items.map((item) => (
|
|
21
|
+
<li key={item.id}>
|
|
22
|
+
<Menu
|
|
23
|
+
item={item}
|
|
24
|
+
onChange={onChange}
|
|
25
|
+
active={currentItem?.id === item.id}
|
|
26
|
+
/>
|
|
27
|
+
{item.subMenu && item.subMenu.length > 0 && (
|
|
28
|
+
<div className="ml-3 mt-1 submenu">
|
|
29
|
+
{renderMenuItems(item.subMenu)}
|
|
30
|
+
</div>
|
|
31
|
+
)}
|
|
32
|
+
</li>
|
|
33
|
+
))}
|
|
34
|
+
</ul>
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<div className={`menu ${props.className || ""}`}>
|
|
39
|
+
{renderMenuItems(props.items)}
|
|
40
|
+
</div>
|
|
41
|
+
);
|
|
42
|
+
};
|