kelt-ui-kit-react 1.4.8 → 1.5.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 (39) hide show
  1. package/dist/_core/hooks/HistoryProvider.d.ts +5 -0
  2. package/dist/_core/hooks/imageExist.d.ts +7 -0
  3. package/dist/_core/hooks/isEAN13.d.ts +1 -0
  4. package/dist/_core/hooks/objectToQueryParams.d.ts +1 -0
  5. package/dist/_core/hooks/useCurrency.d.ts +3 -0
  6. package/dist/_core/hooks/useDateutils.d.ts +1 -0
  7. package/dist/_core/hooks/useToken.d.ts +3 -0
  8. package/dist/_core/hooks/useValidate.d.ts +5 -0
  9. package/dist/_core/hooks/widgetSupport.d.ts +1 -0
  10. package/dist/form/Form.d.ts +1 -1
  11. package/dist/form/form.interface.d.ts +1 -2
  12. package/dist/form/input/Input.d.ts +1 -1
  13. package/dist/form/inputNumber/InputNumber.d.ts +20 -0
  14. package/dist/form/inputNumber/InputNumber.view.d.ts +1 -0
  15. package/dist/form/inputPrice/InputPrice.d.ts +16 -0
  16. package/dist/form/inputPrice/InputPrice.view.d.ts +1 -0
  17. package/dist/index.d.ts +12 -0
  18. package/dist/index.js +2243 -1924
  19. package/dist/style.css +1 -1
  20. package/package.json +2 -1
  21. package/src/App.menu.tsx +16 -0
  22. package/src/_core/hooks/HistoryProvider.tsx +25 -0
  23. package/src/_core/hooks/imageExist.tsx +9 -0
  24. package/src/_core/hooks/isEAN13.tsx +16 -0
  25. package/src/_core/hooks/objectToQueryParams.tsx +32 -0
  26. package/src/_core/hooks/useCurrency.tsx +18 -0
  27. package/src/_core/hooks/useDateutils.ts +47 -0
  28. package/src/_core/hooks/useToken.tsx +19 -0
  29. package/src/_core/hooks/useValidate.tsx +18 -0
  30. package/src/_core/hooks/widgetSupport.tsx +39 -0
  31. package/src/filAriane/filAriane.css +18 -17
  32. package/src/form/Form.tsx +2 -2
  33. package/src/form/form.interface.tsx +2 -2
  34. package/src/form/input/Input.tsx +3 -3
  35. package/src/form/inputNumber/InputNumber.tsx +124 -0
  36. package/src/form/inputNumber/InputNumber.view.tsx +15 -0
  37. package/src/form/inputPrice/InputPrice.tsx +39 -0
  38. package/src/form/inputPrice/InputPrice.view.tsx +15 -0
  39. package/src/index.ts +15 -0
@@ -0,0 +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;
@@ -0,0 +1,7 @@
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 {};
@@ -0,0 +1 @@
1
+ export declare const isValidEAN13: (value: string) => boolean;
@@ -0,0 +1 @@
1
+ export declare const objectToQueryParams: (obj: Record<string, any>, prefix?: string) => string;
@@ -0,0 +1,3 @@
1
+ export declare const useCurrency: (locale?: string, currency?: string) => {
2
+ formatCurrency: (value: number) => string;
3
+ };
@@ -0,0 +1 @@
1
+ export declare function FormatDate(date: Date, format: string): string;
@@ -0,0 +1,3 @@
1
+ export declare const useToken: () => {
2
+ getTokenValidate: () => string | null;
3
+ };
@@ -0,0 +1,5 @@
1
+ export declare const useValidate: () => {
2
+ isValidateEmail: (input: string) => boolean;
3
+ isValidateTel: (input: string) => boolean;
4
+ isValidateCodePostal: (input: string) => boolean;
5
+ };
@@ -0,0 +1 @@
1
+ export declare const WidgetSupport: () => import("react/jsx-runtime").JSX.Element;
@@ -7,7 +7,7 @@ export type FormProps<T extends {
7
7
  className?: string;
8
8
  title?: string;
9
9
  hideSubmit?: boolean;
10
- autoComplete?: "off" | "on";
10
+ autoComplete?: string;
11
11
  initialForm: FormInterface[];
12
12
  onSubmit?: (values: FormValuesInterface<T>) => void;
13
13
  onChange?: (values: FormValuesInterface<T>) => void;
@@ -9,7 +9,6 @@ export interface FormCondition {
9
9
  errorMessage: string;
10
10
  regex: string;
11
11
  }
12
- export type autoCompleteType = "off" | "on";
13
12
  export interface FormInterface {
14
13
  value: string | number | boolean | Date;
15
14
  id?: string;
@@ -28,7 +27,7 @@ export interface FormInterface {
28
27
  label: string;
29
28
  }[];
30
29
  className?: string;
31
- autoComplete?: autoCompleteType;
30
+ autoComplete?: string;
32
31
  step?: string;
33
32
  onChange?: (value: string | number | boolean | Date | string[], name?: string) => void;
34
33
  onRequired?: (value: string | number | boolean | Date) => boolean;
@@ -14,7 +14,7 @@ export interface InputProps {
14
14
  required?: boolean;
15
15
  minLength?: number;
16
16
  maxLength?: number;
17
- autoComplete?: "on" | "off";
17
+ autoComplete?: string;
18
18
  step?: string;
19
19
  tabIndex?: number;
20
20
  checked?: boolean;
@@ -0,0 +1,20 @@
1
+
2
+ export type InputNumberProps = {
3
+ id: string;
4
+ name: string;
5
+ value?: string;
6
+ placeholder?: string;
7
+ className?: string;
8
+ disabled?: boolean;
9
+ required?: boolean;
10
+ autoFocus?: boolean;
11
+ maxLength?: number;
12
+ autoComplete?: string;
13
+ tabIndex?: number;
14
+ onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
15
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
16
+ onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
17
+ onClick?: (e: React.MouseEvent<HTMLInputElement>) => void;
18
+ onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
19
+ };
20
+ export declare const InputNumber: import('react').ForwardRefExoticComponent<InputNumberProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -0,0 +1 @@
1
+ export declare const InputNumberView: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { InputNumberProps } from '../inputNumber/InputNumber';
2
+
3
+ export type InputPriceProps = Omit<InputNumberProps, "onChange"> & {
4
+ locale?: string;
5
+ currency?: string;
6
+ allowDecimals?: boolean;
7
+ onChange?: (value: string) => void;
8
+ value?: string;
9
+ };
10
+ export declare const InputPrice: import('react').ForwardRefExoticComponent<Omit<InputNumberProps, "onChange"> & {
11
+ locale?: string | undefined;
12
+ currency?: string | undefined;
13
+ allowDecimals?: boolean | undefined;
14
+ onChange?: ((value: string) => void) | undefined;
15
+ value?: string | undefined;
16
+ } & import('react').RefAttributes<HTMLInputElement>>;
@@ -0,0 +1 @@
1
+ export declare const InputPriceView: () => import("react/jsx-runtime").JSX.Element;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,15 @@
1
1
 
2
+ export { HistoryProvider, useHistoryDepth, } from './_core/hooks/HistoryProvider';
3
+ export { ImageChecker } from './_core/hooks/ImageChecker';
4
+ export { ImageExist } from './_core/hooks/imageExist';
5
+ export { isValidEAN13 } from './_core/hooks/isEAN13';
6
+ export { objectToQueryParams } from './_core/hooks/objectToQueryParams';
7
+ export { useCurrency } from './_core/hooks/useCurrency';
8
+ export { FormatDate } from './_core/hooks/useDateutils';
2
9
  export { useIsMobile } from './_core/hooks/useIsMobile';
10
+ export { useToken } from './_core/hooks/useToken';
11
+ export { useValidate } from './_core/hooks/useValidate';
12
+ export { WidgetSupport } from './_core/hooks/widgetSupport';
3
13
  export { ButtonAction } from './action/ButtonAction';
4
14
  export { Badge } from './badge/Badge';
5
15
  export { Button } from './button/Button';
@@ -14,6 +24,8 @@ export { FilAriane } from './filAriane/FilAriane';
14
24
  export { DynamicForm } from './form/Form';
15
25
  export { TypeInputEnum } from './form/form.enum';
16
26
  export { Input } from './form/input/Input';
27
+ export { InputNumber } from './form/inputNumber/InputNumber';
28
+ export { InputPrice } from './form/inputPrice/InputPrice';
17
29
  export { TextArea } from './form/textArea/TextArea';
18
30
  export { Grid } from './grid/Grid';
19
31
  export { Header } from './header/Header';