kelt-ui-kit-react 1.7.8 → 1.8.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.
Files changed (125) hide show
  1. package/package.json +1 -1
  2. package/src/sidebar/Sidebar.tsx +49 -4
  3. package/src/sidebar/sidebar.css +12 -1
  4. package/dist/App.d.ts +0 -3
  5. package/dist/App.menu.d.ts +0 -10
  6. package/dist/App.routes.d.ts +0 -1
  7. package/dist/_core/hooks/HistoryProvider.d.ts +0 -5
  8. package/dist/_core/hooks/ImageChecker.d.ts +0 -7
  9. package/dist/_core/hooks/imageExist.d.ts +0 -7
  10. package/dist/_core/hooks/isEAN13.d.ts +0 -1
  11. package/dist/_core/hooks/objectToQueryParams.d.ts +0 -1
  12. package/dist/_core/hooks/useCurrency.d.ts +0 -3
  13. package/dist/_core/hooks/useDateutils.d.ts +0 -4
  14. package/dist/_core/hooks/useIsMobile.d.ts +0 -1
  15. package/dist/_core/hooks/useToken.d.ts +0 -3
  16. package/dist/_core/hooks/useValidate.d.ts +0 -5
  17. package/dist/_core/hooks/widgetSupport.d.ts +0 -1
  18. package/dist/action/Action.view.d.ts +0 -1
  19. package/dist/action/ButtonAction.d.ts +0 -10
  20. package/dist/badge/Badge.d.ts +0 -10
  21. package/dist/badge/Badge.view.d.ts +0 -1
  22. package/dist/button/Button.d.ts +0 -3
  23. package/dist/button/Button.view.d.ts +0 -1
  24. package/dist/button/button.interface.d.ts +0 -21
  25. package/dist/button/buttonActions/ButtonActions.d.ts +0 -14
  26. package/dist/button/buttonFile/ButtonFile.d.ts +0 -9
  27. package/dist/button/buttonFile/ButtonFile.view.d.ts +0 -1
  28. package/dist/button/buttonFilters/ButtonFilters.d.ts +0 -19
  29. package/dist/card/Card.d.ts +0 -16
  30. package/dist/card/Card.view.d.ts +0 -1
  31. package/dist/card/card.interface.d.ts +0 -10
  32. package/dist/card/cardAction/CardAction.d.ts +0 -16
  33. package/dist/card/cardAction.interface.d.ts +0 -10
  34. package/dist/card/hook/useCardInteractions.d.ts +0 -8
  35. package/dist/carousel/Carousel.d.ts +0 -16
  36. package/dist/carousel/Carousel.view.d.ts +0 -1
  37. package/dist/damier/Damier.d.ts +0 -11
  38. package/dist/damier/Damier.view.d.ts +0 -1
  39. package/dist/damier/damierCell/DamierCell.d.ts +0 -8
  40. package/dist/damier/damierCell/damierCell.interface.d.ts +0 -6
  41. package/dist/dataTable/DataTable.d.ts +0 -23
  42. package/dist/dataTable/DataTable.view.d.ts +0 -1
  43. package/dist/dataTable/dataTable.interface.d.ts +0 -33
  44. package/dist/dataTable/dataTableActions/DataTableAction.d.ts +0 -9
  45. package/dist/dataTable/dataTableColumn/DataTableColumn.d.ts +0 -9
  46. package/dist/dataTable/dataTableLoading/DataTableLoading.d.ts +0 -7
  47. package/dist/dataTable/dataTableRow/DataTableRow.d.ts +0 -9
  48. package/dist/datePicker/DatePicker.d.ts +0 -9
  49. package/dist/datePicker/DatePicker.view.d.ts +0 -1
  50. package/dist/expands/Expands.d.ts +0 -11
  51. package/dist/expands/Expands.view.d.ts +0 -1
  52. package/dist/expands/expand/expand.d.ts +0 -10
  53. package/dist/expands/expand/expand.interface.d.ts +0 -9
  54. package/dist/favicon.ico +0 -0
  55. package/dist/filAriane/FilAriane.d.ts +0 -10
  56. package/dist/filAriane/FilAriane.view.d.ts +0 -1
  57. package/dist/filAriane/filAriane.interface.d.ts +0 -6
  58. package/dist/form/Form.d.ts +0 -31
  59. package/dist/form/Form.view.d.ts +0 -1
  60. package/dist/form/form.enum.d.ts +0 -13
  61. package/dist/form/form.interface.d.ts +0 -36
  62. package/dist/form/input/Input.d.ts +0 -26
  63. package/dist/form/inputNumber/InputNumber.d.ts +0 -22
  64. package/dist/form/inputNumber/InputNumber.view.d.ts +0 -1
  65. package/dist/form/inputPrice/InputPrice.d.ts +0 -16
  66. package/dist/form/inputPrice/InputPrice.view.d.ts +0 -1
  67. package/dist/form/textArea/TextArea.d.ts +0 -15
  68. package/dist/form/textArea/TextArea.view.d.ts +0 -1
  69. package/dist/grid/Grid.d.ts +0 -9
  70. package/dist/grid/Grid.view.d.ts +0 -1
  71. package/dist/grid/col/Col.d.ts +0 -10
  72. package/dist/grid/col/colStyled/ColStyled.d.ts +0 -9
  73. package/dist/grid/container/Container.d.ts +0 -7
  74. package/dist/grid/grid.interface.d.ts +0 -8
  75. package/dist/grid/row/Row.d.ts +0 -8
  76. package/dist/header/Header.d.ts +0 -3
  77. package/dist/header/Header.view.d.ts +0 -1
  78. package/dist/header/header.interface.d.ts +0 -11
  79. package/dist/home/Home.d.ts +0 -1
  80. package/dist/icon/Icon.d.ts +0 -3
  81. package/dist/icon/Icons.view.d.ts +0 -1
  82. package/dist/icon/icon.interface.d.ts +0 -6
  83. package/dist/icon/iconSize.enum.d.ts +0 -7
  84. package/dist/index.d.ts +0 -49
  85. package/dist/index.html +0 -18
  86. package/dist/index.js +0 -5313
  87. package/dist/loader/Loader.d.ts +0 -9
  88. package/dist/loader/Loader.view.d.ts +0 -1
  89. package/dist/logo192.png +0 -0
  90. package/dist/logo512.png +0 -0
  91. package/dist/main.d.ts +0 -1
  92. package/dist/manifest.json +0 -25
  93. package/dist/menus/Menus.d.ts +0 -7
  94. package/dist/menus/Menus.view.d.ts +0 -1
  95. package/dist/menus/menu/Menu.d.ts +0 -8
  96. package/dist/menus/menu/menu.interface.d.ts +0 -10
  97. package/dist/message/Message.d.ts +0 -7
  98. package/dist/message/Message.view.d.ts +0 -1
  99. package/dist/modal/Modal.d.ts +0 -15
  100. package/dist/modal/Modal.view.d.ts +0 -1
  101. package/dist/notFound/NotFound.d.ts +0 -1
  102. package/dist/overlayPanel/OverlayPanel.d.ts +0 -21
  103. package/dist/overlayPanel/OverlayPanel.view.d.ts +0 -1
  104. package/dist/overlayPanel/overlay.context.d.ts +0 -11
  105. package/dist/overlayPanel/overlayPanelStyled/OverlayPanelStyled.d.ts +0 -7
  106. package/dist/pdfViewer/PdfViewer.d.ts +0 -12
  107. package/dist/pdfViewer/PdfViewer.view.d.ts +0 -1
  108. package/dist/quantity/Quantity.d.ts +0 -12
  109. package/dist/quantity/Quantity.view.d.ts +0 -0
  110. package/dist/robots.txt +0 -3
  111. package/dist/search/Search.d.ts +0 -23
  112. package/dist/search/Search.view.d.ts +0 -1
  113. package/dist/select/Select.d.ts +0 -19
  114. package/dist/select/Select.view.d.ts +0 -1
  115. package/dist/select/selectOption.interface.d.ts +0 -4
  116. package/dist/sidebar/Sidebar.d.ts +0 -13
  117. package/dist/sidebar/Sidebar.view.d.ts +0 -1
  118. package/dist/sidebarData/SidebarData.d.ts +0 -8
  119. package/dist/sidebarData/SidebarData.view.d.ts +0 -1
  120. package/dist/style.css +0 -5
  121. package/dist/tabs/Tabs.d.ts +0 -18
  122. package/dist/tabs/Tabs.view.d.ts +0 -1
  123. package/dist/toaster/Toaster.d.ts +0 -2
  124. package/dist/toaster/Toaster.view.d.ts +0 -1
  125. package/dist/toaster/store/useToasterStore.d.ts +0 -19
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kelt-ui-kit-react",
3
3
  "type": "module",
4
- "version": "1.7.8",
4
+ "version": "1.8.0",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -29,6 +29,8 @@ export const Sidebar = ({
29
29
  const [isOpen, setIsOpen] = useState(open || false);
30
30
  const sidebarRef = useRef<HTMLDivElement | null>(null);
31
31
  const rootRef = useRef<HTMLDivElement | null>(null);
32
+ const touchStartX = useRef(0);
33
+ const touchStartY = useRef(0);
32
34
 
33
35
  // Créer le conteneur une seule fois
34
36
  useEffect(() => {
@@ -60,7 +62,7 @@ export const Sidebar = ({
60
62
  }, [onClose]);
61
63
 
62
64
  const handleClickOutside = useCallback(
63
- (event: MouseEvent) => {
65
+ (event: MouseEvent | TouchEvent) => {
64
66
  if (!closeOnClickOutside) return;
65
67
  if (
66
68
  sidebarRef.current &&
@@ -69,18 +71,53 @@ export const Sidebar = ({
69
71
  toggleSidebar();
70
72
  }
71
73
  },
72
- [toggleSidebar, closeOnClickOutside]
74
+ [toggleSidebar, closeOnClickOutside],
75
+ );
76
+
77
+ const handleTouchStart = useCallback((event: React.TouchEvent) => {
78
+ const touch = event.touches[0];
79
+ touchStartX.current = touch.clientX;
80
+ touchStartY.current = touch.clientY;
81
+ }, []);
82
+
83
+ const handleTouchEnd = useCallback(
84
+ (event: React.TouchEvent) => {
85
+ if (!isOpen) return;
86
+
87
+ const touch = event.changedTouches[0];
88
+ const deltaX = touch.clientX - touchStartX.current;
89
+ const deltaY = Math.abs(touch.clientY - touchStartY.current);
90
+
91
+ // Ferme seulement sur un vrai swipe horizontal gauche -> droite.
92
+ if (deltaX > 60 && deltaY < 40) {
93
+ toggleSidebar();
94
+ }
95
+ },
96
+ [isOpen, toggleSidebar],
97
+ );
98
+
99
+ const handleOverlayTouchEnd = useCallback(
100
+ (event: React.TouchEvent) => {
101
+ event.preventDefault();
102
+ toggleSidebar();
103
+ },
104
+ [toggleSidebar],
73
105
  );
74
106
 
75
107
  useEffect(() => {
76
108
  if (isOpen) {
77
109
  document.addEventListener("mousedown", handleClickOutside);
110
+ document.addEventListener("touchstart", handleClickOutside, {
111
+ passive: true,
112
+ });
78
113
  } else {
79
114
  document.removeEventListener("mousedown", handleClickOutside);
115
+ document.removeEventListener("touchstart", handleClickOutside);
80
116
  }
81
117
 
82
118
  return () => {
83
119
  document.removeEventListener("mousedown", handleClickOutside);
120
+ document.removeEventListener("touchstart", handleClickOutside);
84
121
  };
85
122
  }, [isOpen, handleClickOutside]);
86
123
 
@@ -90,11 +127,19 @@ export const Sidebar = ({
90
127
 
91
128
  return ReactDOM.createPortal(
92
129
  <>
93
- {isOpen && displayOverlay && <div className="overlay"></div>}
130
+ {isOpen && displayOverlay && (
131
+ <div
132
+ className="overlay"
133
+ onClick={toggleSidebar}
134
+ onTouchEnd={handleOverlayTouchEnd}
135
+ ></div>
136
+ )}
94
137
  <div
95
138
  ref={sidebarRef}
96
139
  style={width ? { width: width } : {}}
97
140
  className={`sidebar ${isOpen ? "open" : "closed"} ${className ?? ""}`}
141
+ onTouchStart={handleTouchStart}
142
+ onTouchEnd={handleTouchEnd}
98
143
  >
99
144
  <div className="sidebar-header">
100
145
  {title && <h2 className="flex-1">{title}</h2>}
@@ -106,6 +151,6 @@ export const Sidebar = ({
106
151
  {children && children}
107
152
  </div>
108
153
  </>,
109
- rootRef.current
154
+ rootRef.current,
110
155
  );
111
156
  };
@@ -1,3 +1,12 @@
1
+ .overlay {
2
+ touch-action: none;
3
+ }
4
+
5
+ .toggle-btn {
6
+ -webkit-tap-highlight-color: transparent;
7
+ touch-action: manipulation;
8
+ }
9
+
1
10
  .sidebar {
2
11
  width: 200px;
3
12
  height: 100vh;
@@ -10,6 +19,8 @@
10
19
  transform: translateX(0);
11
20
  z-index: 2;
12
21
 
22
+
23
+
13
24
  &:not(.full) {
14
25
  inset: 0;
15
26
  }
@@ -84,4 +95,4 @@
84
95
  width: 40vw;
85
96
  }
86
97
  }
87
- }
98
+ }
package/dist/App.d.ts DELETED
@@ -1,3 +0,0 @@
1
-
2
- declare const App: React.FC;
3
- export default App;
@@ -1,10 +0,0 @@
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 +0,0 @@
1
- export declare const AppRoutes: () => JSX.Element;
@@ -1,5 +0,0 @@
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 +0,0 @@
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 {};
@@ -1,7 +0,0 @@
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 {};
@@ -1 +0,0 @@
1
- export declare const isValidEAN13: (value: string) => boolean;
@@ -1 +0,0 @@
1
- export declare const objectToQueryParams: (obj: Record<string, any>, prefix?: string) => string;
@@ -1,3 +0,0 @@
1
- export declare const useCurrency: (locale?: string, currency?: string) => {
2
- formatCurrency: (value: number) => string;
3
- };
@@ -1,4 +0,0 @@
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 +0,0 @@
1
- export declare const useIsMobile: (maxWidth?: number) => boolean;
@@ -1,3 +0,0 @@
1
- export declare const useToken: () => {
2
- getTokenValidate: () => string | null;
3
- };
@@ -1,5 +0,0 @@
1
- export declare const useValidate: () => {
2
- isValidateEmail: (input: string) => boolean;
3
- isValidateTel: (input: string) => boolean;
4
- isValidateCodePostal: (input: string) => boolean;
5
- };
@@ -1 +0,0 @@
1
- export declare const WidgetSupport: () => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare const ActionView: () => JSX.Element;
@@ -1,10 +0,0 @@
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;
@@ -1,10 +0,0 @@
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;
@@ -1 +0,0 @@
1
- export declare const BadgeView: () => JSX.Element;
@@ -1,3 +0,0 @@
1
- import { ButtonInterface } from './button.interface';
2
-
3
- export declare const Button: ({ className, onClick, badge, title, sizeIcon, id, classIcon, positionicon, disabled, }: ButtonInterface) => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare const ButtonView: () => JSX.Element;
@@ -1,21 +0,0 @@
1
- import { BadgeInterface } from '../badge/Badge';
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
- }
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 +0,0 @@
1
- import { PositionOverlay } from '../../overlayPanel/OverlayPanel';
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;
@@ -1,9 +0,0 @@
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 +0,0 @@
1
- export declare const ButtonFileView: () => import("react/jsx-runtime").JSX.Element;
@@ -1,19 +0,0 @@
1
- import { FormInterface, FormValuesInterface } from '../../form/form.interface';
2
- import { IconSizeEnum } from '../../icon/iconSize.enum';
3
-
4
- export type ButtonActionsProps<T extends {
5
- [key: string]: string | number | boolean | Date | string[];
6
- }> = {
7
- className?: string;
8
- onClick?: (e: React.MouseEvent) => void;
9
- title: string;
10
- classIcon?: string;
11
- sizeIcon?: IconSizeEnum;
12
- dataForm: FormInterface[];
13
- onChange?: (values: FormValuesInterface<T>) => void;
14
- disabled?: boolean;
15
- id?: string;
16
- };
17
- export declare const ButtonFilters: <T extends {
18
- [key: string]: string | number | boolean | string[] | Date;
19
- }>({ className, onClick, title, classIcon, sizeIcon, disabled, id, dataForm, onChange, }: ButtonActionsProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -1,16 +0,0 @@
1
- import { PositionOverlay } from '../overlayPanel/OverlayPanel';
2
- import { CardInterface } from './card.interface';
3
- import { CardActionInterface } from './cardAction.interface';
4
-
5
- type CardProps = {
6
- item: CardInterface;
7
- actions?: CardActionInterface[];
8
- className?: string;
9
- handleClick?: (item: CardInterface) => void;
10
- onClose?: (item: CardInterface) => void;
11
- children?: JSX.Element;
12
- customAction?: JSX.Element;
13
- positionOverlay?: PositionOverlay;
14
- };
15
- export declare const Card: ({ item, actions, className, handleClick, onClose, customAction, positionOverlay, children, }: CardProps) => JSX.Element;
16
- export {};
@@ -1 +0,0 @@
1
- export declare const CardView: () => JSX.Element;
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- export interface CardInterface {
3
- id?: number | string;
4
- uuid?: string;
5
- title: string | JSX.Element;
6
- description?: string | JSX.Element;
7
- image?: string;
8
- prix?: string | JSX.Element;
9
- quantity?: number;
10
- }
@@ -1,16 +0,0 @@
1
- import { CardInterface } from '../card.interface';
2
- import { CardActionInterface } from '../cardAction.interface';
3
-
4
- export type PositionOverlay = "left" | "right" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
5
- export type CardActionProps = {
6
- actions: CardActionInterface[];
7
- item?: CardInterface;
8
- openActions?: boolean;
9
- positions?: {
10
- top: number;
11
- left: number;
12
- };
13
- positionOverlay?: PositionOverlay;
14
- setOpenActions?: (open: boolean) => void;
15
- };
16
- export declare const CardAction: ({ actions, openActions, item, positions, positionOverlay, setOpenActions, }: CardActionProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,10 +0,0 @@
1
- import { CardInterface } from './card.interface';
2
-
3
- export interface CardActionInterface {
4
- icon: string;
5
- label?: string;
6
- disabled?: (item: CardInterface) => boolean;
7
- onClick: (item: CardInterface) => void;
8
- setLabel?: (item: CardInterface) => string;
9
- type?: "menu" | "link";
10
- }
@@ -1,8 +0,0 @@
1
- export declare const useCardInteractions: (callback: () => void) => {
2
- ref: import('react').RefObject<HTMLDivElement>;
3
- isHovered: boolean;
4
- mouseHandlers: {
5
- onMouseEnter: () => void;
6
- onMouseLeave: () => void;
7
- };
8
- };
@@ -1,16 +0,0 @@
1
- import { default as React, ReactNode } from 'react';
2
-
3
- interface Breakpoints {
4
- sm?: number;
5
- md?: number;
6
- lg?: number;
7
- xl?: number;
8
- }
9
- interface CarouselProps {
10
- children: ReactNode[];
11
- showControls?: boolean;
12
- itemsToScroll?: number;
13
- breakpoints?: Breakpoints;
14
- }
15
- export declare const Carousel: React.FC<CarouselProps>;
16
- export {};
@@ -1 +0,0 @@
1
- export declare const CarouselView: () => import("react/jsx-runtime").JSX.Element;
@@ -1,11 +0,0 @@
1
- import { DamierCellInterface } from './damierCell/damierCell.interface';
2
-
3
- interface DamierProps {
4
- cols?: number;
5
- rows?: number;
6
- page?: number;
7
- damierCells?: DamierCellInterface[];
8
- onClick?: (cell: DamierCellInterface) => void;
9
- }
10
- export declare const Damier: ({ cols, rows, damierCells, page, onClick, }: DamierProps) => import("react/jsx-runtime").JSX.Element;
11
- export {};
@@ -1 +0,0 @@
1
- export declare const DamierView: () => import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- import { DamierCellInterface } from './damierCell.interface';
2
-
3
- interface DamierCellProps {
4
- cell: DamierCellInterface;
5
- onClick?: (cell: DamierCellInterface) => void;
6
- }
7
- export declare const DamierCell: ({ cell, onClick }: DamierCellProps) => import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- export interface DamierCellInterface {
3
- child?: JSX.Element;
4
- position?: number;
5
- id?: number;
6
- }
@@ -1,23 +0,0 @@
1
- import { dataTableActionsInterface, dataTableColumnsInterface } from './dataTable.interface';
2
-
3
- export type DataTableProps<T> = {
4
- id: string;
5
- name?: string;
6
- className?: string;
7
- children?: JSX.Element;
8
- element?: JSX.Element;
9
- data: T[];
10
- emptyMessage?: string;
11
- actions?: dataTableActionsInterface<T>[];
12
- columns: dataTableColumnsInterface<T>[];
13
- loading?: boolean;
14
- onRowClick?: (row: any) => void;
15
- onColumnClick?: (column: any) => void;
16
- onLoadMore?: () => void;
17
- hasMore?: boolean;
18
- onSelectionChange?: (selectedRows: T[]) => void;
19
- hideToggleAll?: boolean;
20
- limitSelect?: number;
21
- getRowId?: (row: T) => string | number;
22
- };
23
- export declare function DataTable<T>(props: DataTableProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare const DataTableView: () => import("react/jsx-runtime").JSX.Element;
@@ -1,33 +0,0 @@
1
- import { HTMLInputTypeAttribute } from 'react';
2
-
3
- export interface dataTableColumnsInterface<T> {
4
- id: string;
5
- label: string;
6
- minWidth?: number;
7
- maxWidth?: number;
8
- width?: number;
9
- align?: "right" | "left" | "center";
10
- format?: (value: any) => string;
11
- sortable?: boolean;
12
- filterable?: boolean;
13
- filterValue?: string;
14
- editable?: boolean;
15
- options?: {
16
- label: string;
17
- value: string;
18
- }[];
19
- onEdit?: (value: any, row: T) => void;
20
- onRowStyle?: (row: T) => React.CSSProperties;
21
- type: HTMLInputTypeAttribute | "select";
22
- }
23
- export interface dataTableActionsInterface<T> {
24
- id: string;
25
- label: string;
26
- type: "button" | "link" | "icon";
27
- classIcon?: string;
28
- onClick: (row: T) => void;
29
- shouldDisplay?: (row: T) => boolean;
30
- disabled?: boolean;
31
- labelButton?: (row: T) => string;
32
- visible?: boolean;
33
- }
@@ -1,9 +0,0 @@
1
- import { dataTableActionsInterface } from '../dataTable.interface';
2
-
3
- type DataTableActionProps = {
4
- action: dataTableActionsInterface<any>;
5
- row: any;
6
- index?: number;
7
- };
8
- export declare const DataTableAction: ({ action, row, index, }: DataTableActionProps) => import("react/jsx-runtime").JSX.Element | null;
9
- export {};
@@ -1,9 +0,0 @@
1
- import { dataTableColumnsInterface } from '../dataTable.interface';
2
-
3
- type DataTableColumnProps = {
4
- column: dataTableColumnsInterface<any>;
5
- idx: number;
6
- onColumnClick?: (column: dataTableColumnsInterface<any>) => void;
7
- };
8
- export declare const DataTableColumn: ({ column, idx, onColumnClick, }: DataTableColumnProps) => import("react/jsx-runtime").JSX.Element;
9
- export {};
@@ -1,7 +0,0 @@
1
- type DataTableLoadingProps = {
2
- columns: any[];
3
- actions: any[];
4
- emptyMessage?: string;
5
- };
6
- export declare const DataTableLoading: ({ columns, actions, emptyMessage, }: DataTableLoadingProps) => import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,9 +0,0 @@
1
- import { dataTableColumnsInterface } from '../dataTable.interface';
2
-
3
- type DataTableRowProps = {
4
- column: dataTableColumnsInterface<any>;
5
- idx: number;
6
- row: any;
7
- };
8
- export declare const DataTableRow: ({ column, idx, row }: DataTableRowProps) => import("react/jsx-runtime").JSX.Element;
9
- export {};
@@ -1,9 +0,0 @@
1
- import { Value } from 'react-calendar/dist/cjs/shared/types';
2
-
3
- export type DatePickerProps = {
4
- value?: Value;
5
- maxDate?: Date;
6
- onChange?: (date: Value) => void;
7
- children?: React.ReactNode;
8
- };
9
- export declare const DatePicker: ({ value, onChange, maxDate, children, }: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare const DatePickerView: () => import("react/jsx-runtime").JSX.Element;
@@ -1,11 +0,0 @@
1
- import { ExpandInterface } from './expand/expand.interface';
2
-
3
- type ExpandProps = {
4
- items: ExpandInterface[];
5
- className?: string;
6
- onChange?: (item: ExpandInterface) => void;
7
- currentItem?: ExpandInterface;
8
- showArrow?: boolean;
9
- };
10
- export declare const Expands: (props: ExpandProps) => import("react/jsx-runtime").JSX.Element;
11
- export type { ExpandProps };
@@ -1 +0,0 @@
1
- export declare const ExpandsView: () => JSX.Element;
@@ -1,10 +0,0 @@
1
- import { ExpandInterface } from './expand.interface';
2
-
3
- export type ExpandProps = {
4
- currentExpand?: ExpandInterface;
5
- item: ExpandInterface;
6
- className?: string;
7
- showArrow?: boolean;
8
- onChange: (item: ExpandInterface) => void;
9
- };
10
- export declare const Expand: ({ currentExpand, item, className, showArrow, onChange, }: ExpandProps) => JSX.Element;
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- export interface ExpandInterface {
3
- id?: number;
4
- title: string | React.ReactNode;
5
- description?: string | React.ReactNode;
6
- content?: React.ReactNode;
7
- headerContent?: React.ReactNode;
8
- footer?: JSX.Element;
9
- }
package/dist/favicon.ico DELETED
Binary file
@@ -1,10 +0,0 @@
1
- import { FilArianeInterface } from './filAriane.interface';
2
-
3
- type FilArianeProps = {
4
- filArianes?: FilArianeInterface[];
5
- currentFil?: number;
6
- title?: string;
7
- onClick?: (fil?: FilArianeInterface) => void;
8
- };
9
- export declare const FilAriane: ({ filArianes, onClick, currentFil, title, }: FilArianeProps) => import("react/jsx-runtime").JSX.Element;
10
- export {};
@@ -1 +0,0 @@
1
- export declare const FilArianeView: () => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- export interface FilArianeInterface {
2
- id: number;
3
- title?: string;
4
- url?: string;
5
- isLast: boolean;
6
- }