kelt-ui-kit-react 2.0.8 → 2.0.9

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.
Files changed (319) hide show
  1. package/.github/workflows/publish.yml +40 -31
  2. package/README.md +124 -72
  3. package/dist/App.d.ts +2 -3
  4. package/dist/App.menu.d.ts +10 -10
  5. package/dist/App.routes.d.ts +1 -1
  6. package/dist/_core/hooks/HistoryProvider.d.ts +5 -5
  7. package/dist/_core/hooks/ImageChecker.d.ts +5 -6
  8. package/dist/_core/hooks/imageExist.d.ts +5 -6
  9. package/dist/_core/hooks/isEAN13.d.ts +1 -1
  10. package/dist/_core/hooks/objectToQueryParams.d.ts +1 -1
  11. package/dist/_core/hooks/useCurrency.d.ts +3 -3
  12. package/dist/_core/hooks/useDateutils.d.ts +4 -4
  13. package/dist/_core/hooks/useIsMobile.d.ts +1 -1
  14. package/dist/_core/hooks/useToken.d.ts +3 -3
  15. package/dist/_core/hooks/useValidate.d.ts +5 -5
  16. package/dist/_core/hooks/widgetSupport.d.ts +1 -1
  17. package/dist/_core/type/generiqueType.d.ts +4 -0
  18. package/dist/action/Action.view.d.ts +1 -1
  19. package/dist/action/ButtonAction.d.ts +8 -9
  20. package/dist/addressSearch/AddressSearch.d.ts +18 -19
  21. package/dist/addressSearch/AddressSearch.view.d.ts +1 -1
  22. package/dist/badge/Badge.d.ts +10 -9
  23. package/dist/badge/Badge.view.d.ts +1 -1
  24. package/dist/button/Button.d.ts +1 -2
  25. package/dist/button/Button.view.d.ts +1 -1
  26. package/dist/button/button.interface.d.ts +19 -20
  27. package/dist/button/buttonActions/ButtonActions.d.ts +11 -12
  28. package/dist/button/buttonFile/ButtonFile.d.ts +9 -9
  29. package/dist/button/buttonFile/ButtonFile.view.d.ts +1 -1
  30. package/dist/button/buttonFilters/ButtonFilters.d.ts +16 -17
  31. package/dist/card/Card.d.ts +14 -15
  32. package/dist/card/Card.view.d.ts +1 -1
  33. package/dist/card/card.interface.d.ts +10 -10
  34. package/dist/card/cardAction/CardAction.d.ts +13 -14
  35. package/dist/card/cardAction.interface.d.ts +8 -9
  36. package/dist/card/hook/useCardInteractions.d.ts +8 -8
  37. package/dist/carousel/Carousel.d.ts +14 -15
  38. package/dist/carousel/Carousel.view.d.ts +1 -1
  39. package/dist/damier/Damier.d.ts +9 -10
  40. package/dist/damier/Damier.view.d.ts +1 -1
  41. package/dist/damier/damierCell/DamierCell.d.ts +6 -7
  42. package/dist/damier/damierCell/damierCell.interface.d.ts +6 -6
  43. package/dist/dataTable/DataTable.d.ts +37 -33
  44. package/dist/dataTable/DataTable.view.d.ts +1 -1
  45. package/dist/dataTable/dataTable.interface.d.ts +70 -47
  46. package/dist/dataTable/dataTable.utils.d.ts +17 -0
  47. package/dist/dataTable/dataTableActions/DataTableAction.d.ts +9 -10
  48. package/dist/dataTable/dataTableColumn/DataTableColumn.d.ts +14 -8
  49. package/dist/dataTable/dataTableColumn/dataTableColumnFilter/DataTableColumnFilter.d.ts +9 -0
  50. package/dist/dataTable/dataTableColumn/dataTableColumnFilter/dataTableColumnFilterDate/DataTableColumnFilterDate.d.ts +9 -0
  51. package/dist/dataTable/dataTableColumn/dataTableColumnFilter/dataTableColumnFilterDateRange/dataTableColumnFilterDateRange.d.ts +9 -0
  52. package/dist/dataTable/dataTableColumn/dataTableColumnFilter/dataTableColumnFilterEnum/DataTableColumnFilterEnum.d.ts +12 -0
  53. package/dist/dataTable/dataTableColumn/dataTableColumnFilter/dataTableColumnFilterString/DataTableColumnFilterString.d.ts +9 -0
  54. package/dist/dataTable/dataTableColumn/dataTableColumnSort/DataTableColumnSort.d.ts +10 -0
  55. package/dist/dataTable/dataTableFilters/DataTableFilters.d.ts +6 -0
  56. package/dist/dataTable/dataTableLoading/DataTableLoading.d.ts +8 -7
  57. package/dist/dataTable/dataTableRow/DataTableRow.d.ts +12 -11
  58. package/dist/dataTable/useDataTableState.d.ts +13 -0
  59. package/dist/datePicker/DatePicker.d.ts +7 -8
  60. package/dist/datePicker/DatePicker.view.d.ts +1 -1
  61. package/dist/docs/ComponentDocs.d.ts +6 -0
  62. package/dist/docs/catalog.d.ts +8 -0
  63. package/dist/docs/documentation.types.d.ts +21 -0
  64. package/dist/expands/Expands.d.ts +11 -12
  65. package/dist/expands/Expands.view.d.ts +1 -1
  66. package/dist/expands/expand/expand.d.ts +10 -11
  67. package/dist/expands/expand/expand.interface.d.ts +9 -9
  68. package/dist/filAriane/FilAriane.d.ts +8 -9
  69. package/dist/filAriane/FilAriane.view.d.ts +1 -1
  70. package/dist/filAriane/filAriane.interface.d.ts +6 -6
  71. package/dist/form/Form.d.ts +35 -36
  72. package/dist/form/Form.view.d.ts +1 -1
  73. package/dist/form/form.enum.d.ts +16 -15
  74. package/dist/form/form.interface.d.ts +53 -54
  75. package/dist/form/input/Input.d.ts +27 -25
  76. package/dist/form/inputNumber/InputNumber.d.ts +21 -22
  77. package/dist/form/inputNumber/InputNumber.view.d.ts +1 -1
  78. package/dist/form/inputPrice/InputPrice.d.ts +14 -15
  79. package/dist/form/inputPrice/InputPrice.view.d.ts +1 -1
  80. package/dist/form/textArea/TextArea.d.ts +14 -15
  81. package/dist/form/textArea/TextArea.view.d.ts +1 -1
  82. package/dist/geocoding/GeocodingService.d.ts +11 -12
  83. package/dist/geocoding/geocoding.interface.d.ts +20 -20
  84. package/dist/grid/Grid.d.ts +9 -10
  85. package/dist/grid/Grid.view.d.ts +1 -1
  86. package/dist/grid/col/Col.d.ts +5 -6
  87. package/dist/grid/col/colStyled/ColStyled.d.ts +10 -11
  88. package/dist/grid/container/Container.d.ts +5 -6
  89. package/dist/grid/grid.interface.d.ts +23 -23
  90. package/dist/grid/row/Row.d.ts +13 -14
  91. package/dist/header/Header.d.ts +1 -2
  92. package/dist/header/Header.view.d.ts +1 -1
  93. package/dist/header/header.interface.d.ts +12 -12
  94. package/dist/home/Home.d.ts +1 -1
  95. package/dist/icon/Icon.d.ts +1 -2
  96. package/dist/icon/Icons.view.d.ts +1 -1
  97. package/dist/icon/icon.interface.d.ts +5 -5
  98. package/dist/icon/iconSize.enum.d.ts +7 -7
  99. package/dist/index.d.ts +56 -54
  100. package/dist/index.html +18 -18
  101. package/dist/index.js +4001 -3510
  102. package/dist/loader/Loader.d.ts +7 -8
  103. package/dist/loader/Loader.view.d.ts +1 -1
  104. package/dist/main.d.ts +0 -1
  105. package/dist/manifest.json +25 -25
  106. package/dist/menus/Menus.d.ts +5 -6
  107. package/dist/menus/Menus.view.d.ts +1 -1
  108. package/dist/menus/menu/Menu.d.ts +7 -8
  109. package/dist/menus/menu/menu.interface.d.ts +10 -10
  110. package/dist/message/Message.d.ts +6 -7
  111. package/dist/message/Message.view.d.ts +1 -1
  112. package/dist/modal/Modal.d.ts +13 -14
  113. package/dist/modal/Modal.view.d.ts +1 -1
  114. package/dist/notFound/NotFound.d.ts +1 -1
  115. package/dist/overlayPanel/OverlayPanel.d.ts +22 -23
  116. package/dist/overlayPanel/OverlayPanel.view.d.ts +1 -1
  117. package/dist/overlayPanel/overlay.context.d.ts +9 -10
  118. package/dist/overlayPanel/overlayPanelStyled/OverlayPanelStyled.d.ts +9 -9
  119. package/dist/pdfViewer/PdfViewer.d.ts +12 -12
  120. package/dist/pdfViewer/PdfViewer.view.d.ts +1 -1
  121. package/dist/quantity/Quantity.d.ts +10 -11
  122. package/dist/robots.txt +3 -3
  123. package/dist/search/Search.d.ts +21 -22
  124. package/dist/search/Search.view.d.ts +1 -1
  125. package/dist/select/Select.d.ts +23 -24
  126. package/dist/select/Select.view.d.ts +1 -1
  127. package/dist/select/selectOption.interface.d.ts +5 -5
  128. package/dist/sidebar/Sidebar.d.ts +12 -13
  129. package/dist/sidebar/Sidebar.view.d.ts +1 -1
  130. package/dist/sidebarData/SidebarData.d.ts +6 -7
  131. package/dist/sidebarData/SidebarData.view.d.ts +1 -1
  132. package/dist/style.css +1 -1
  133. package/dist/tabs/Tabs.d.ts +17 -17
  134. package/dist/tabs/Tabs.view.d.ts +1 -1
  135. package/dist/toaster/Toaster.d.ts +1 -2
  136. package/dist/toaster/Toaster.view.d.ts +1 -1
  137. package/dist/toaster/store/useToasterStore.d.ts +24 -24
  138. package/docs.plugin.ts +223 -0
  139. package/index.html +20 -18
  140. package/package.json +64 -56
  141. package/public/index.html +18 -18
  142. package/public/manifest.json +25 -25
  143. package/public/robots.txt +3 -3
  144. package/src/App.css +178 -11
  145. package/src/App.menu.tsx +277 -257
  146. package/src/App.routes.tsx +21 -16
  147. package/src/App.tsx +31 -30
  148. package/src/_core/hooks/HistoryProvider.tsx +25 -25
  149. package/src/_core/hooks/ImageChecker.tsx +26 -26
  150. package/src/_core/hooks/imageExist.tsx +9 -9
  151. package/src/_core/hooks/isEAN13.tsx +16 -16
  152. package/src/_core/hooks/objectToQueryParams.tsx +32 -32
  153. package/src/_core/hooks/useCurrency.tsx +18 -18
  154. package/src/_core/hooks/useDateutils.ts +64 -64
  155. package/src/_core/hooks/useIsMobile.ts +18 -18
  156. package/src/_core/hooks/useToken.tsx +19 -19
  157. package/src/_core/hooks/useValidate.tsx +18 -18
  158. package/src/_core/hooks/widgetSupport.tsx +39 -39
  159. package/src/_core/type/generiqueType.tsx +4 -0
  160. package/src/action/Action.view.tsx +21 -21
  161. package/src/action/ButtonAction.tsx +32 -32
  162. package/src/action/action.css +20 -20
  163. package/src/addressSearch/AddressSearch.tsx +246 -246
  164. package/src/addressSearch/AddressSearch.view.tsx +52 -52
  165. package/src/addressSearch/addressSearch.css +132 -132
  166. package/src/badge/Badge.tsx +41 -34
  167. package/src/badge/Badge.view.tsx +15 -15
  168. package/src/badge/badge.css +63 -55
  169. package/src/button/Button.tsx +48 -48
  170. package/src/button/Button.view.tsx +85 -85
  171. package/src/button/button.css +53 -53
  172. package/src/button/button.interface.tsx +22 -22
  173. package/src/button/buttonActions/ButtonActions.tsx +104 -104
  174. package/src/button/buttonFile/ButtonFile.tsx +59 -59
  175. package/src/button/buttonFile/ButtonFile.view.tsx +70 -70
  176. package/src/button/buttonFilters/ButtonFilters.tsx +102 -102
  177. package/src/button/buttonFilters/buttonFilters.css +22 -22
  178. package/src/card/Card.tsx +151 -151
  179. package/src/card/Card.view.tsx +73 -73
  180. package/src/card/card.css +144 -144
  181. package/src/card/card.interface.tsx +9 -9
  182. package/src/card/cardAction/CardAction.tsx +135 -135
  183. package/src/card/cardAction/cardAction.css +10 -10
  184. package/src/card/cardAction.interface.tsx +10 -10
  185. package/src/card/hook/useCardInteractions.tsx +30 -30
  186. package/src/carousel/Carousel.css +44 -44
  187. package/src/carousel/Carousel.tsx +115 -115
  188. package/src/carousel/Carousel.view.tsx +13 -13
  189. package/src/damier/Damier.tsx +64 -64
  190. package/src/damier/Damier.view.tsx +31 -31
  191. package/src/damier/damier.css +50 -50
  192. package/src/damier/damierCell/DamierCell.tsx +18 -18
  193. package/src/damier/damierCell/damierCell.interface.tsx +5 -5
  194. package/src/dataTable/DataTable.tsx +840 -746
  195. package/src/dataTable/DataTable.view.tsx +105 -71
  196. package/src/dataTable/dataTable.css +233 -208
  197. package/src/dataTable/dataTable.interface.ts +66 -45
  198. package/src/dataTable/dataTable.utils.ts +45 -0
  199. package/src/dataTable/dataTableActions/DataTableAction.tsx +82 -65
  200. package/src/dataTable/dataTableColumn/DataTableColumn.tsx +48 -27
  201. package/src/dataTable/dataTableColumn/dataTableColumnFilter/DataTableColumnFilter.tsx +36 -0
  202. package/src/dataTable/dataTableColumn/dataTableColumnFilter/dataTableColumnFilter.css +0 -0
  203. package/src/dataTable/dataTableColumn/dataTableColumnFilter/dataTableColumnFilterDate/DataTableColumnFilterDate.tsx +39 -0
  204. package/src/dataTable/dataTableColumn/dataTableColumnFilter/dataTableColumnFilterDateRange/dataTableColumnFilterDateRange.tsx +80 -0
  205. package/src/dataTable/dataTableColumn/dataTableColumnFilter/dataTableColumnFilterEnum/DataTableColumnFilterEnum.tsx +89 -0
  206. package/src/dataTable/dataTableColumn/dataTableColumnFilter/dataTableColumnFilterString/DataTableColumnFilterString.tsx +37 -0
  207. package/src/dataTable/dataTableColumn/dataTableColumnSort/DataTableColumnSort.tsx +42 -0
  208. package/src/dataTable/dataTableFilters/DataTableFilters.tsx +91 -0
  209. package/src/dataTable/dataTableFilters/dataTableFilters.css +16 -0
  210. package/src/dataTable/dataTableLoading/DataTableLoading.tsx +23 -21
  211. package/src/dataTable/dataTableRow/DataTableRow.tsx +155 -208
  212. package/src/dataTable/useDataTableState.tsx +89 -0
  213. package/src/datePicker/DatePicker.tsx +110 -110
  214. package/src/datePicker/DatePicker.view.tsx +9 -9
  215. package/src/datePicker/datePicker.css +77 -77
  216. package/src/docs/ComponentDocs.tsx +156 -0
  217. package/src/docs/catalog.ts +40 -0
  218. package/src/docs/documentation.types.ts +20 -0
  219. package/src/docs/virtual.d.ts +7 -0
  220. package/src/expands/Expands.tsx +46 -46
  221. package/src/expands/Expands.view.tsx +90 -90
  222. package/src/expands/expand/expand.interface.tsx +8 -8
  223. package/src/expands/expand/expand.tsx +191 -191
  224. package/src/expands/expands.css +101 -101
  225. package/src/filAriane/FilAriane.tsx +57 -57
  226. package/src/filAriane/FilAriane.view.tsx +28 -28
  227. package/src/filAriane/filAriane.css +23 -23
  228. package/src/filAriane/filAriane.interface.tsx +6 -6
  229. package/src/form/Form.tsx +477 -477
  230. package/src/form/Form.view.tsx +67 -67
  231. package/src/form/form.css +135 -135
  232. package/src/form/form.enum.ts +16 -15
  233. package/src/form/form.interface.tsx +67 -67
  234. package/src/form/input/Input.tsx +146 -106
  235. package/src/form/input/input.css +39 -29
  236. package/src/form/inputNumber/InputNumber.tsx +132 -132
  237. package/src/form/inputNumber/InputNumber.view.tsx +15 -15
  238. package/src/form/inputPrice/InputPrice.tsx +42 -42
  239. package/src/form/inputPrice/InputPrice.view.tsx +15 -15
  240. package/src/form/textArea/TextArea.tsx +59 -59
  241. package/src/form/textArea/TextArea.view.tsx +34 -34
  242. package/src/form/textArea/textArea.css +9 -9
  243. package/src/geocoding/GeocodingService.ts +89 -89
  244. package/src/geocoding/geocoding.interface.ts +25 -25
  245. package/src/grid/Grid.tsx +34 -34
  246. package/src/grid/Grid.view.tsx +24 -24
  247. package/src/grid/col/Col.tsx +24 -24
  248. package/src/grid/col/col.css +3 -3
  249. package/src/grid/col/colStyled/ColStyled.tsx +59 -59
  250. package/src/grid/container/Container.tsx +8 -8
  251. package/src/grid/container/container.css +4 -4
  252. package/src/grid/grid.interface.tsx +27 -27
  253. package/src/grid/row/Row.tsx +49 -49
  254. package/src/grid/row/row.css +25 -25
  255. package/src/header/Header.tsx +64 -64
  256. package/src/header/Header.view.tsx +5 -5
  257. package/src/header/header.css +43 -43
  258. package/src/header/header.interface.tsx +11 -11
  259. package/src/home/Home.tsx +40 -3
  260. package/src/icon/Icon.tsx +6 -6
  261. package/src/icon/Icons.view.tsx +29 -29
  262. package/src/icon/icon.css +20 -20
  263. package/src/icon/icon.interface.tsx +7 -6
  264. package/src/icon/iconSize.enum.ts +7 -7
  265. package/src/index.css +547 -547
  266. package/src/index.ts +76 -70
  267. package/src/loader/Loader.tsx +37 -37
  268. package/src/loader/Loader.view.tsx +20 -20
  269. package/src/loader/loader.css +30 -30
  270. package/src/main.tsx +10 -10
  271. package/src/menus/Menus.tsx +43 -43
  272. package/src/menus/Menus.view.tsx +39 -39
  273. package/src/menus/menu/Menu.tsx +18 -18
  274. package/src/menus/menu/menu.interface.tsx +9 -9
  275. package/src/menus/menus.css +47 -47
  276. package/src/message/Message.tsx +30 -30
  277. package/src/message/Message.view.tsx +22 -22
  278. package/src/message/message.css +29 -29
  279. package/src/modal/Modal.tsx +59 -59
  280. package/src/modal/Modal.view.tsx +26 -26
  281. package/src/modal/modal.css +71 -71
  282. package/src/notFound/NotFound.tsx +3 -3
  283. package/src/overlayPanel/OverlayPanel.tsx +260 -255
  284. package/src/overlayPanel/OverlayPanel.view.tsx +25 -25
  285. package/src/overlayPanel/overlay.context.tsx +30 -30
  286. package/src/overlayPanel/overlayPanel.css +43 -43
  287. package/src/overlayPanel/overlayPanelStyled/OverlayPanelStyled.tsx +23 -23
  288. package/src/pdfViewer/PdfViewer.tsx +73 -73
  289. package/src/pdfViewer/PdfViewer.view.tsx +5 -5
  290. package/src/quantity/Quantity.tsx +103 -103
  291. package/src/quantity/quantity.css +26 -26
  292. package/src/search/Search.tsx +161 -161
  293. package/src/search/Search.view.tsx +14 -14
  294. package/src/search/search.css +59 -59
  295. package/src/select/Select.tsx +245 -245
  296. package/src/select/Select.view.tsx +71 -71
  297. package/src/select/select.css +150 -150
  298. package/src/select/selectOption.interface.ts +5 -5
  299. package/src/sidebar/Sidebar.tsx +213 -213
  300. package/src/sidebar/Sidebar.view.tsx +17 -17
  301. package/src/sidebar/sidebar.css +103 -103
  302. package/src/sidebarData/SidebarData.tsx +19 -19
  303. package/src/sidebarData/SidebarData.view.tsx +19 -19
  304. package/src/sidebarData/sidebarData.css +27 -27
  305. package/src/tabs/Tabs.tsx +101 -90
  306. package/src/tabs/Tabs.view.tsx +20 -20
  307. package/src/tabs/tabs.css +29 -29
  308. package/src/toaster/Toaster.tsx +61 -61
  309. package/src/toaster/Toaster.view.tsx +25 -25
  310. package/src/toaster/store/useToasterStore.tsx +54 -54
  311. package/src/toaster/toaster.css +105 -105
  312. package/tests/dataTable.test.mjs +93 -0
  313. package/tests/documentation.test.mjs +75 -0
  314. package/tsconfig.docs.json +10 -0
  315. package/tsconfig.json +28 -28
  316. package/vite.config.ts +26 -20
  317. package/vite.config.ts.timestamp-1733262892554-a13dfef6e8a29.mjs +24 -24
  318. package/vite.config.ts.timestamp-1757847121745-e5a5bf54b81b.mjs +28 -28
  319. package/vite.config.ts.timestamp-1759742478362-4ac5c5a7db34b.mjs +28 -28
@@ -1,31 +1,40 @@
1
- name: Build & Publish npm Package
2
-
3
- on:
4
- push:
5
- branches:
6
- - develop
7
-
8
- jobs:
9
- publish:
10
- runs-on: ubuntu-latest
11
-
12
- steps:
13
- - name: Checkout code
14
- uses: actions/checkout@v4
15
-
16
- - name: Setup Node.js
17
- uses: actions/setup-node@v4
18
- with:
19
- node-version: "20"
20
- registry-url: "https://registry.npmjs.org"
21
-
22
- - name: Install dependencies
23
- run: npm ci
24
-
25
- - name: Build package
26
- run: npm run build
27
-
28
- - name: Publish to npm
29
- run: npm publish --access public
30
- env:
31
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1
+ name: Build & Publish npm Package
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - develop
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: read
13
+ id-token: write
14
+
15
+ steps:
16
+ - name: Checkout code
17
+ uses: actions/checkout@v4
18
+
19
+ - name: Setup Node.js
20
+ uses: actions/setup-node@v4
21
+ with:
22
+ node-version: "24"
23
+ registry-url: "https://registry.npmjs.org"
24
+
25
+ - name: Setup npm for trusted publishing
26
+ run: npm install --global npm@11
27
+
28
+ - name: Install dependencies
29
+ run: npm ci
30
+
31
+ - name: Validate compatibility
32
+ run: |
33
+ npm test
34
+ npm run docs:test
35
+
36
+ - name: Build package
37
+ run: npm run build
38
+
39
+ - name: Publish to npm
40
+ run: npm publish --access public
package/README.md CHANGED
@@ -1,72 +1,124 @@
1
- # Getting Started with Create React App
2
-
3
- ## Address search
4
-
5
- Use the `ADDRESS` field type to add geocoding directly to an address field.
6
- The user can keep any manually entered value, while selecting a suggestion can
7
- populate the rest of the form:
8
-
9
- ```tsx
10
- {
11
- name: "adresse1",
12
- label: "Adresse",
13
- type: TypeInputEnum.ADDRESS,
14
- value: "",
15
- addressSearch: {
16
- mapAddress: (address) => ({
17
- adresse1: address.addressLine,
18
- codePostal: address.postalCode,
19
- ville: address.city,
20
- paysIso2: address.countryCode,
21
- }),
22
- },
23
- };
24
- ```
25
-
26
- Use `addressSearch.provider` to inject another service implementing
27
- `GeocodingProvider`. The default provider does not require an API key.
28
-
29
- This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
30
-
31
- ## Available Scripts
32
-
33
- In the project directory, you can run:
34
-
35
- ### `npm start`
36
-
37
- Runs the app in the development mode.\
38
- Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
39
-
40
- The page will reload if you make edits.\
41
- You will also see any lint errors in the console.
42
-
43
- ### `npm test`
44
-
45
- Launches the test runner in the interactive watch mode.\
46
- See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
47
-
48
- ### `npm run build`
49
-
50
- Builds the app for production to the `build` folder.\
51
- It correctly bundles React in production mode and optimizes the build for the best performance.
52
-
53
- The build is minified and the filenames include the hashes.\
54
- Your app is ready to be deployed!
55
-
56
- See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
57
-
58
- ### `npm run eject`
59
-
60
- **Note: this is a one-way operation. Once you `eject`, you can’t go back!**
61
-
62
- If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
63
-
64
- Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
65
-
66
- You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
67
-
68
- ## Learn More
69
-
70
- You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
71
-
72
- To learn React, check out the [React documentation](https://reactjs.org/).
1
+ # Kelt UI Kit React
2
+
3
+ ## Component explorer
4
+
5
+ Run `npm run dev` and open http://localhost:2552 to explore the kit.
6
+ The documentation includes a searchable component catalogue and three tabs:
7
+
8
+ - **Apercu**: existing interactive demos, background grid, a 375px preview
9
+ container and a reset action. The narrow container is not a device emulator;
10
+ components using viewport media queries or portals still use the browser viewport.
11
+ - **API & types**: parameter names, exact TypeScript types, required/optional
12
+ status, defaults declared in destructured arguments, JSDoc descriptions and
13
+ expandable related interfaces, type aliases and enums.
14
+ - **Code**: the complete demo source, with a copy action. Replace relative
15
+ imports with public exports from `kelt-ui-kit-react` when integrating examples.
16
+
17
+ API metadata is generated by `docs.plugin.ts` from component imports in the
18
+ views registered in `src/App.menu.tsx`. It is refreshed when TypeScript sources
19
+ change. The Toaster page also documents `showToast(title, options)`.
20
+ Components without arguments explicitly indicate that they accept no props.
21
+ An absent documented default does not imply that there is no runtime fallback.
22
+
23
+ To add a page, register its view in `src/App.menu.tsx` and its category,
24
+ description and icon in `src/docs/catalog.ts`.
25
+
26
+ ### Build commands
27
+
28
+ - `npm run build`: type-check and build the distributable library in `dist`.
29
+ - `npm run docs:build`: type-check and build the standalone explorer in `dist-docs`.
30
+ - `npm run docs:preview`: preview the built explorer.
31
+ - `npm run docs:test`: type-check the documentation tooling and test route
32
+ coverage, prop types/defaults, nested form types and notification options.
33
+
34
+ For production hosting, configure an SPA fallback to `index.html` for component
35
+ routes such as `/buttons`. The explorer is not exported by the library entrypoint.
36
+
37
+ ### Notifications
38
+
39
+ Mount `<Toaster />` once and add `<div id="toaster-root"></div>` to the hosting
40
+ HTML. Trigger notifications using `useToasterStore().showToast(title, options)`.
41
+ The explorer already provides this portal root.
42
+
43
+ ## npm publication
44
+
45
+ Pushes to `develop` run `.github/workflows/publish.yml` and use npm trusted
46
+ publishing with GitHub OIDC rather than an `NPM_TOKEN`.
47
+
48
+ For OIDC authorization, the package metadata must contain the exact GitHub
49
+ repository URL. This is required in `package.json` and is included in each
50
+ published package version:
51
+
52
+ ```json
53
+ {
54
+ "repository": {
55
+ "type": "git",
56
+ "url": "git+https://github.com/funeste29200/ui-kit-react.git"
57
+ }
58
+ }
59
+ ```
60
+
61
+ The matching trusted publisher entry is configured in the npm package settings
62
+ for `kelt-ui-kit-react` → **Settings** → **Trusted Publisher**:
63
+
64
+ - Provider: GitHub Actions
65
+ - Organization or user: `funeste29200`
66
+ - Repository: `ui-kit-react`
67
+ - Workflow filename: `publish.yml`
68
+ - Environment: empty
69
+
70
+ After confirming an OIDC publication, the legacy publish token can be revoked.
71
+ If a publication failed and its version is not present in npm, the same version
72
+ can be published again after fixing its repository or trusted-publisher settings.
73
+
74
+ ## Kelt / Hub compatibility
75
+
76
+ The shared `DataTable` supports both applications with one rendering engine:
77
+
78
+ - Kelt: direct editing, Enter navigation, step controls, mobile cards, selection
79
+ footer actions and explicit `actionsColumnWidth`.
80
+ - Hub: grouped columns, sticky columns, custom cell rendering, conditional editing,
81
+ commit-on-Enter or blur (`onEditTrigger`), typed filters and local sorting.
82
+ - `DataTableColumnsInterface` / `DataTableActionsInterface` remain available,
83
+ including existing deep import paths, as aliases of the shared column/action types.
84
+ - `onFiltersChange` emits the legacy filter shape (comma-separated enum values,
85
+ `{ startDate, endDate }` date ranges). Filtering remains the consumer's responsibility.
86
+ Sorting uses a copy of the supplied rows; original data is never reordered.
87
+ - Numeric action widths are summed when no explicit column width is provided.
88
+ - `Tabs.keepMountedVisited` retains visited panels for Hub; the default remains
89
+ unmounting inactive panels for Kelt. Controlled tabs track the actual active index.
90
+ - `Select` keeps searchable portal menus and empty-string options. Dynamic forms
91
+ forward `usePortal` and `searchable`, alongside Kelt sections, grid and address fields.
92
+ - `Input` keeps immediate change events by default. Set `disabledDebounce={false}`
93
+ for the optional 300ms debounce. `showClearButton` and `width` remain supported.
94
+ - `Badge.color` / `onRemove`, `Icon.onClick`, `ButtonFilters`, and string image logos
95
+ in `Header` remain supported.
96
+
97
+ `npm test` validates table grouping, sorting and action widths. The table explorer
98
+ includes both Kelt and Hub examples using the same component.
99
+
100
+ ## Address search
101
+
102
+ Use the `ADDRESS` field type to add geocoding directly to an address field.
103
+ The user can keep any manually entered value, while selecting a suggestion can
104
+ populate the rest of the form:
105
+
106
+ ```tsx
107
+ {
108
+ name: "adresse1",
109
+ label: "Adresse",
110
+ type: TypeInputEnum.ADDRESS,
111
+ value: "",
112
+ addressSearch: {
113
+ mapAddress: (address) => ({
114
+ adresse1: address.addressLine,
115
+ codePostal: address.postalCode,
116
+ ville: address.city,
117
+ paysIso2: address.countryCode,
118
+ }),
119
+ },
120
+ };
121
+ ```
122
+
123
+ Use `addressSearch.provider` to inject another service implementing
124
+ `GeocodingProvider`. The default provider does not require an API key.
package/dist/App.d.ts CHANGED
@@ -1,3 +1,2 @@
1
-
2
- declare const App: React.FC;
3
- export default App;
1
+ declare const App: React.FC;
2
+ export default App;
@@ -1,10 +1,10 @@
1
- /// <reference types="react" />
2
- export type MenuProps = {
3
- id: number;
4
- name: string;
5
- children: JSX.Element;
6
- link: string;
7
- element: JSX.Element;
8
- };
9
- export declare const MenuList: MenuProps[];
10
- export declare const AppMenu: () => JSX.Element;
1
+ /// <reference types="react" />
2
+ export type MenuProps = {
3
+ id: number;
4
+ name: string;
5
+ children: JSX.Element;
6
+ link: string;
7
+ element: JSX.Element;
8
+ };
9
+ export declare const MenuList: MenuProps[];
10
+ export declare const AppMenu: () => JSX.Element;
@@ -1 +1 @@
1
- export declare const AppRoutes: () => JSX.Element;
1
+ export declare const AppRoutes: () => JSX.Element;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
- export declare function HistoryProvider({ children }: {
3
- children: React.ReactNode;
4
- }): import("react/jsx-runtime").JSX.Element;
5
- export declare function useHistoryDepth(): number;
1
+ /// <reference types="react" />
2
+ export declare function HistoryProvider({ children }: {
3
+ children: React.ReactNode;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ export declare function useHistoryDepth(): number;
@@ -1,7 +1,6 @@
1
1
  import { default as React } from 'react';
2
-
3
- interface ImageCheckerProps {
4
- imageUrl: string;
5
- }
6
- export declare const ImageChecker: React.FC<ImageCheckerProps>;
7
- export {};
2
+ interface ImageCheckerProps {
3
+ imageUrl: string;
4
+ }
5
+ export declare const ImageChecker: React.FC<ImageCheckerProps>;
6
+ export {};
@@ -1,7 +1,6 @@
1
1
  import { default as React } from 'react';
2
-
3
- interface ImageCheckerProps {
4
- imageUrl: string;
5
- }
6
- export declare const ImageExist: React.FC<ImageCheckerProps>;
7
- export {};
2
+ interface ImageCheckerProps {
3
+ imageUrl: string;
4
+ }
5
+ export declare const ImageExist: React.FC<ImageCheckerProps>;
6
+ export {};
@@ -1 +1 @@
1
- export declare const isValidEAN13: (value: string) => boolean;
1
+ export declare const isValidEAN13: (value: string) => boolean;
@@ -1 +1 @@
1
- export declare const objectToQueryParams: (obj: Record<string, any>, prefix?: string) => string;
1
+ export declare const objectToQueryParams: (obj: Record<string, any>, prefix?: string) => string;
@@ -1,3 +1,3 @@
1
- export declare const useCurrency: (locale?: string, currency?: string) => {
2
- formatCurrency: (value: number) => string;
3
- };
1
+ export declare const useCurrency: (locale?: string, currency?: string) => {
2
+ formatCurrency: (value: number) => string;
3
+ };
@@ -1,4 +1,4 @@
1
- export declare function FormatDate(date: Date, format: string): string;
2
- export declare function LocalDateStringToUTC(dateStr: string): string;
3
- export declare function localDateStartToUTC(dateStr: string): Date;
4
- export declare function localDateEndToUTC(dateStr: string): Date;
1
+ export declare function FormatDate(date: Date, format: string): string;
2
+ export declare function LocalDateStringToUTC(dateStr: string): string;
3
+ export declare function localDateStartToUTC(dateStr: string): Date;
4
+ export declare function localDateEndToUTC(dateStr: string): Date;
@@ -1 +1 @@
1
- export declare const useIsMobile: (maxWidth?: number) => boolean;
1
+ export declare const useIsMobile: (maxWidth?: number) => boolean;
@@ -1,3 +1,3 @@
1
- export declare const useToken: () => {
2
- getTokenValidate: () => string | null;
3
- };
1
+ export declare const useToken: () => {
2
+ getTokenValidate: () => string | null;
3
+ };
@@ -1,5 +1,5 @@
1
- export declare const useValidate: () => {
2
- isValidateEmail: (input: string) => boolean;
3
- isValidateTel: (input: string) => boolean;
4
- isValidateCodePostal: (input: string) => boolean;
5
- };
1
+ export declare const useValidate: () => {
2
+ isValidateEmail: (input: string) => boolean;
3
+ isValidateTel: (input: string) => boolean;
4
+ isValidateCodePostal: (input: string) => boolean;
5
+ };
@@ -1 +1 @@
1
- export declare const WidgetSupport: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const WidgetSupport: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export interface EnumerableType {
2
+ label: string;
3
+ value: string;
4
+ }
@@ -1 +1 @@
1
- export declare const ActionView: () => JSX.Element;
1
+ export declare const ActionView: () => JSX.Element;
@@ -1,10 +1,9 @@
1
1
  import { BadgeInterface } from '../badge/Badge';
2
-
3
- export type ButtonActionProps = {
4
- className?: string;
5
- onClick?: (e: React.MouseEvent) => void;
6
- title?: string;
7
- classIcon?: string;
8
- badge?: BadgeInterface;
9
- };
10
- export declare const ButtonAction: ({ className, onClick, title, classIcon, badge, }: ButtonActionProps) => import("react/jsx-runtime").JSX.Element;
2
+ export type ButtonActionProps = {
3
+ className?: string;
4
+ onClick?: (e: React.MouseEvent) => void;
5
+ title?: string;
6
+ classIcon?: string;
7
+ badge?: BadgeInterface;
8
+ };
9
+ export declare const ButtonAction: ({ className, onClick, title, classIcon, badge, }: ButtonActionProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,20 +1,19 @@
1
1
  import { GeocodedAddress, GeocodingProvider } from '../geocoding/geocoding.interface';
2
-
3
- export interface AddressSearchProps {
4
- id?: string;
5
- className?: string;
6
- label?: string;
7
- placeholder?: string;
8
- value?: string;
9
- disabled?: boolean;
10
- minimumQueryLength?: number;
11
- debounceTime?: number;
12
- limit?: number;
13
- provider?: GeocodingProvider;
14
- allowManualEntry?: boolean;
15
- manualEntryLabel?: string;
16
- onChange?: (value: string) => void;
17
- onManualEntry?: (addressLine: string) => void;
18
- onSelect: (address: GeocodedAddress) => void;
19
- }
20
- export declare const AddressSearch: ({ id, className, label, placeholder, value, disabled, minimumQueryLength, debounceTime, limit, provider, allowManualEntry, manualEntryLabel, onChange, onManualEntry, onSelect, }: AddressSearchProps) => import("react/jsx-runtime").JSX.Element;
2
+ export interface AddressSearchProps {
3
+ id?: string;
4
+ className?: string;
5
+ label?: string;
6
+ placeholder?: string;
7
+ value?: string;
8
+ disabled?: boolean;
9
+ minimumQueryLength?: number;
10
+ debounceTime?: number;
11
+ limit?: number;
12
+ provider?: GeocodingProvider;
13
+ allowManualEntry?: boolean;
14
+ manualEntryLabel?: string;
15
+ onChange?: (value: string) => void;
16
+ onManualEntry?: (addressLine: string) => void;
17
+ onSelect: (address: GeocodedAddress) => void;
18
+ }
19
+ export declare const AddressSearch: ({ id, className, label, placeholder, value, disabled, minimumQueryLength, debounceTime, limit, provider, allowManualEntry, manualEntryLabel, onChange, onManualEntry, onSelect, }: AddressSearchProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- export declare const AddressSearchView: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const AddressSearchView: () => import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,11 @@
1
1
  import { IconSizeEnum } from '../icon/iconSize.enum';
2
-
3
- export type BadgeInterface = {
4
- className?: string;
5
- onClick?: (e: React.MouseEvent) => void;
6
- title?: string;
7
- sizeIcon?: IconSizeEnum;
8
- classIcon?: string;
9
- };
10
- export declare const Badge: ({ className, onClick, title, sizeIcon, classIcon, }: BadgeInterface) => import("react/jsx-runtime").JSX.Element;
2
+ export type BadgeInterface = {
3
+ className?: string;
4
+ onClick?: (e: React.MouseEvent) => void;
5
+ title?: string;
6
+ sizeIcon?: IconSizeEnum;
7
+ classIcon?: string;
8
+ color?: string;
9
+ onRemove?: (event: React.MouseEvent) => void;
10
+ };
11
+ export declare const Badge: ({ className, onClick, title, sizeIcon, classIcon, color, onRemove, }: BadgeInterface) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- export declare const BadgeView: () => JSX.Element;
1
+ export declare const BadgeView: () => JSX.Element;
@@ -1,3 +1,2 @@
1
1
  import { ButtonInterface } from './button.interface';
2
-
3
- export declare const Button: ({ className, onClick, badge, title, sizeIcon, id, classIcon, positionicon, disabled, style, }: ButtonInterface) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const Button: ({ className, onClick, badge, title, sizeIcon, id, classIcon, positionicon, disabled, style, }: ButtonInterface) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- export declare const ButtonView: () => JSX.Element;
1
+ export declare const ButtonView: () => JSX.Element;
@@ -1,22 +1,21 @@
1
1
  import { BadgeInterface } from '../badge/Badge';
2
2
  import { IconSizeEnum } from '../icon/iconSize.enum';
3
-
4
- export interface ButtonInterface {
5
- className?: string;
6
- badge?: BadgeInterface;
7
- id?: string;
8
- onClick?: (e: React.MouseEvent) => void;
9
- title: string;
10
- classIcon?: string;
11
- positionicon?: number;
12
- disabled?: boolean;
13
- sizeIcon?: IconSizeEnum;
14
- style?: React.CSSProperties;
15
- }
16
- export interface buttonActionInterface {
17
- icon?: string;
18
- id?: number | string;
19
- label: string;
20
- disabled?: boolean;
21
- onClick: (a: buttonActionInterface) => void;
22
- }
3
+ export interface ButtonInterface {
4
+ className?: string;
5
+ badge?: BadgeInterface;
6
+ id?: string;
7
+ onClick?: (e: React.MouseEvent) => void;
8
+ title: string;
9
+ classIcon?: string;
10
+ positionicon?: number;
11
+ disabled?: boolean;
12
+ sizeIcon?: IconSizeEnum;
13
+ style?: React.CSSProperties;
14
+ }
15
+ export interface buttonActionInterface {
16
+ icon?: string;
17
+ id?: number | string;
18
+ label: string;
19
+ disabled?: boolean;
20
+ onClick: (a: buttonActionInterface) => void;
21
+ }
@@ -1,14 +1,13 @@
1
1
  import { PositionOverlay } from '../../overlayPanel/OverlayPanel';
2
2
  import { buttonActionInterface } from '../button.interface';
3
-
4
- export type ButtonActionsProps = {
5
- className?: string;
6
- onClick?: (e: React.MouseEvent) => void;
7
- title: string;
8
- actions?: buttonActionInterface[];
9
- classIcon?: string;
10
- positionActions?: PositionOverlay;
11
- disabled?: boolean;
12
- id?: string;
13
- };
14
- export declare const ButtonActions: ({ className, onClick, title, actions, positionActions, disabled, id, }: ButtonActionsProps) => import("react/jsx-runtime").JSX.Element;
3
+ export type ButtonActionsProps = {
4
+ className?: string;
5
+ onClick?: (e: React.MouseEvent) => void;
6
+ title: string;
7
+ actions?: buttonActionInterface[];
8
+ classIcon?: string;
9
+ positionActions?: PositionOverlay;
10
+ disabled?: boolean;
11
+ id?: string;
12
+ };
13
+ export declare const ButtonActions: ({ className, onClick, title, actions, positionActions, disabled, id, }: ButtonActionsProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,9 @@
1
- interface ButtonFileProps {
2
- onFileSelected?: (file: File, buffer: ArrayBuffer) => void;
3
- accept?: string;
4
- buttonText?: string;
5
- buttonClassName?: string;
6
- containerClassName?: string;
7
- }
8
- export declare const ButtonFile: ({ onFileSelected, accept, buttonText, buttonClassName, containerClassName, }: ButtonFileProps) => import("react/jsx-runtime").JSX.Element;
9
- export {};
1
+ interface ButtonFileProps {
2
+ onFileSelected?: (file: File, buffer: ArrayBuffer) => void;
3
+ accept?: string;
4
+ buttonText?: string;
5
+ buttonClassName?: string;
6
+ containerClassName?: string;
7
+ }
8
+ export declare const ButtonFile: ({ onFileSelected, accept, buttonText, buttonClassName, containerClassName, }: ButtonFileProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -1 +1 @@
1
- export declare const ButtonFileView: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const ButtonFileView: () => import("react/jsx-runtime").JSX.Element;