kelt-ui-kit-react 2.0.2 → 2.0.4

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 (39) hide show
  1. package/dist/card/Card.d.ts +4 -1
  2. package/dist/expands/Expands.d.ts +1 -0
  3. package/dist/expands/expand/expand.d.ts +2 -1
  4. package/dist/form/Form.d.ts +6 -0
  5. package/dist/form/form.interface.d.ts +5 -3
  6. package/dist/grid/Grid.d.ts +5 -2
  7. package/dist/grid/col/colStyled/ColStyled.d.ts +2 -1
  8. package/dist/grid/grid.interface.d.ts +12 -1
  9. package/dist/grid/row/Row.d.ts +7 -0
  10. package/dist/index.js +3043 -2884
  11. package/dist/overlayPanel/OverlayPanel.d.ts +4 -2
  12. package/dist/overlayPanel/overlayPanelStyled/OverlayPanelStyled.d.ts +2 -0
  13. package/dist/select/Select.d.ts +6 -1
  14. package/dist/select/selectOption.interface.d.ts +1 -0
  15. package/dist/style.css +1 -1
  16. package/package.json +1 -1
  17. package/src/card/Card.tsx +37 -11
  18. package/src/card/card.css +2 -3
  19. package/src/expands/Expands.tsx +2 -0
  20. package/src/expands/expand/expand.tsx +7 -1
  21. package/src/form/Form.tsx +42 -12
  22. package/src/form/form.css +15 -2
  23. package/src/form/form.interface.tsx +5 -3
  24. package/src/form/input/input.css +6 -2
  25. package/src/grid/Grid.tsx +34 -21
  26. package/src/grid/col/Col.tsx +24 -13
  27. package/src/grid/col/col.css +3 -0
  28. package/src/grid/col/colStyled/ColStyled.tsx +59 -55
  29. package/src/grid/container/container.css +2 -2
  30. package/src/grid/grid.interface.tsx +15 -1
  31. package/src/grid/row/Row.tsx +49 -12
  32. package/src/grid/row/row.css +9 -1
  33. package/src/overlayPanel/OverlayPanel.tsx +71 -18
  34. package/src/overlayPanel/overlay.context.tsx +6 -4
  35. package/src/overlayPanel/overlayPanel.css +10 -1
  36. package/src/overlayPanel/overlayPanelStyled/OverlayPanelStyled.tsx +7 -2
  37. package/src/select/Select.tsx +178 -39
  38. package/src/select/select.css +94 -13
  39. package/src/select/selectOption.interface.ts +1 -0
@@ -1,6 +1,7 @@
1
1
  import { PositionOverlay } from '../overlayPanel/OverlayPanel';
2
2
  import { CardInterface } from './card.interface';
3
3
  import { CardActionInterface } from './cardAction.interface';
4
+ import { GridResponsive } from '../grid/grid.interface';
4
5
 
5
6
  type CardProps = {
6
7
  item: CardInterface;
@@ -11,6 +12,8 @@ type CardProps = {
11
12
  children?: JSX.Element;
12
13
  customAction?: JSX.Element;
13
14
  positionOverlay?: PositionOverlay;
15
+ /** Largeur sur laquelle se basent les breakpoints du footer, défaut : "app" */
16
+ responsive?: GridResponsive;
14
17
  };
15
- export declare const Card: ({ item, actions, className, handleClick, onClose, customAction, positionOverlay, children, }: CardProps) => JSX.Element;
18
+ export declare const Card: ({ item, actions, className, handleClick, onClose, customAction, positionOverlay, responsive, children, }: CardProps) => JSX.Element;
16
19
  export {};
@@ -6,6 +6,7 @@ type ExpandProps = {
6
6
  onChange?: (item: ExpandInterface) => void;
7
7
  currentItem?: ExpandInterface;
8
8
  showArrow?: boolean;
9
+ catchfocusCapture?: boolean;
9
10
  };
10
11
  export declare const Expands: (props: ExpandProps) => import("react/jsx-runtime").JSX.Element;
11
12
  export type { ExpandProps };
@@ -5,6 +5,7 @@ export type ExpandProps = {
5
5
  item: ExpandInterface;
6
6
  className?: string;
7
7
  showArrow?: boolean;
8
+ catchfocusCapture?: boolean;
8
9
  onChange: (item: ExpandInterface) => void;
9
10
  };
10
- export declare const Expand: ({ currentExpand, item, className, showArrow, onChange, }: ExpandProps) => JSX.Element;
11
+ export declare const Expand: ({ currentExpand, item, className, showArrow, catchfocusCapture, onChange, }: ExpandProps) => JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import { FormInterface, FormMode, FormSection, FormValuesInterface } from './form.interface';
3
+ import { GridBreakpoints, GridResponsive } from '../grid/grid.interface';
3
4
 
4
5
  export type FormProps<T extends {
5
6
  [key: string]: string | number | boolean | Date | string[];
@@ -14,6 +15,11 @@ export type FormProps<T extends {
14
15
  sections?: FormSection[];
15
16
  disabledSubmit?: boolean;
16
17
  mode?: FormMode;
18
+ /** Largeur sur laquelle se basent les breakpoints des champs (col), défaut : "app" */
19
+ responsive?: GridResponsive;
20
+ /** Place le bouton submit dans la grid (dernière ligne) avec ces tailles de col.
21
+ * Ignoré si les champs n'utilisent pas la grid : le bouton reste dans le footer. */
22
+ submitCol?: GridBreakpoints;
17
23
  onSubmit?: (values: FormValuesInterface<T>) => void;
18
24
  onChange?: (values: FormValuesInterface<T>) => void;
19
25
  };
@@ -18,7 +18,7 @@ export interface FormSection {
18
18
  className?: string;
19
19
  }
20
20
  export interface FormInterface {
21
- value: string | number | boolean | Date;
21
+ value: string | number | boolean | Date | string[];
22
22
  id?: string;
23
23
  label?: string;
24
24
  focus?: boolean;
@@ -30,6 +30,8 @@ export interface FormInterface {
30
30
  condition?: FormCondition;
31
31
  icon?: string;
32
32
  multiple?: boolean;
33
+ usePortal?: boolean;
34
+ searchable?: boolean;
33
35
  options?: {
34
36
  value: string;
35
37
  label: string;
@@ -49,7 +51,7 @@ export interface FormInterface {
49
51
  autoComplete?: string;
50
52
  step?: string;
51
53
  onChange?: (value: string | number | boolean | Date | string[], name?: string) => void;
52
- onRequired?: (value: string | number | boolean | Date) => boolean;
53
- onDisabled?: (value: string | number | boolean | Date) => boolean;
54
+ onRequired?: (value: string | number | boolean | Date | string[]) => boolean;
55
+ onDisabled?: (value: string | number | boolean | Date | string[]) => boolean;
54
56
  onInvalid?: (e: React.ChangeEvent<HTMLInputElement>) => void;
55
57
  }
@@ -1,9 +1,12 @@
1
- import { GridInterface } from './grid.interface';
1
+ import { GridInterface, GridResponsive } from './grid.interface';
2
+ import { GridGap } from './row/Row';
2
3
 
3
4
  type GridProps = {
4
5
  items: GridInterface[];
5
6
  className?: string;
6
7
  scroll?: boolean;
8
+ gap?: GridGap;
9
+ responsive?: GridResponsive;
7
10
  };
8
- export declare const Grid: ({ items, className, scroll }: GridProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const Grid: ({ items, className, scroll, gap, responsive, }: GridProps) => import("react/jsx-runtime").JSX.Element;
9
12
  export {};
@@ -1,6 +1,7 @@
1
- import { GridColumnSpan } from '../../grid.interface';
1
+ import { GridColumnSpan, GridResponsive } from '../../grid.interface';
2
2
 
3
3
  type ColStyledProps = {
4
+ $responsive: GridResponsive;
4
5
  $xs?: GridColumnSpan;
5
6
  $sm?: GridColumnSpan;
6
7
  $md?: GridColumnSpan;
@@ -1,5 +1,16 @@
1
1
  /// <reference types="react" />
2
- export type GridColumnSpan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
2
+ /**
3
+ * Largeur de référence pour les breakpoints des Col :
4
+ * - "app" (défaut) : le conteneur app-container
5
+ * - "viewport" : la fenêtre (@media)
6
+ * - "row" : la Row elle-même (utile pour une grid dans une card, un panneau...)
7
+ */
8
+ export type GridResponsive = "app" | "viewport" | "row";
9
+ /**
10
+ * Nombre de colonnes sur 12, ou "auto" : la colonne partage la place restante
11
+ * de la ligne à parts égales avec les autres "auto" (ex. 5 champs sur une ligne).
12
+ */
13
+ export type GridColumnSpan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | "auto";
3
14
  export interface GridBreakpoints {
4
15
  xs?: GridColumnSpan;
5
16
  sm?: GridColumnSpan;
@@ -1,8 +1,15 @@
1
+ import { GridResponsive } from '../grid.interface';
1
2
 
3
+ export type GridGap = boolean | number | string;
4
+ export declare const RowResponsiveContext: import('react').Context<GridResponsive>;
2
5
  type RowProps = {
3
6
  children: React.ReactNode;
4
7
  className?: string;
5
8
  scroll?: boolean;
9
+ /** true (défaut) : gap par défaut, false : pas de gap, number : px, string : valeur CSS ("1rem") */
10
+ gap?: GridGap;
11
+ /** Largeur sur laquelle se basent les breakpoints des Col (défaut : "app") */
12
+ responsive?: GridResponsive;
6
13
  };
7
14
  export declare const Row: React.FC<RowProps>;
8
15
  export {};