@konoma-development/react-components 0.2.3 → 0.2.5

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.
@@ -1,4 +1,4 @@
1
1
  import { FormFieldProps } from './types.ts';
2
- export default function Checkbox<DataType>({ classesFilled, classesError, classesEmpty, labelClassesFilled, labelClassesError, labelClassesEmpty, iconClassesFilled, value, defaultValue,
2
+ export default function Checkbox<DataType>({ classesFilled, classesError, classesEmpty, labelClassesFilled, labelClassesError, labelClassesEmpty, iconClassesFilled, value, defaultValue, indeterminateIconPath, indeterminateIconName, checkedIconPath, checkedIconName,
3
3
  /** UNUSED, only listed so that the typing for onInput does not clash with the onInput event of the input */
4
4
  onInput, onChange, label, indeterminate, disabled, className, name, error, dataTestId, ...props }: FormFieldProps<DataType>): import("react/jsx-runtime").JSX.Element;
@@ -10,6 +10,6 @@ export default function Form<DataType>({ children, className, validators, data,
10
10
  data: DataType;
11
11
  dataTestId?: string;
12
12
  validators: Record<keyof DataType, ((value: string | number | boolean | null) => string)[]>;
13
- onValidation?: (errors: Record<keyof DataType, string[]>) => void;
13
+ onValidation?: (errors: Record<keyof DataType, string[]>, triggeredBySubmit?: boolean) => void;
14
14
  onSubmit: () => Promise<void>;
15
15
  }): import("react/jsx-runtime").JSX.Element;
@@ -66,11 +66,17 @@ export interface Classes {
66
66
  indicatorClasses?: string;
67
67
  valueContainerClasses?: string;
68
68
  }
69
- export interface FormFieldProps<DataType> extends Classes {
70
- dataTestId?: string;
69
+ export interface Icons {
70
+ indeterminateIconPath?: string;
71
+ indeterminateIconName?: string;
72
+ checkedIconPath?: string;
73
+ checkedIconName?: string;
74
+ }
75
+ export interface FormFieldProps<DataType> extends Classes, Icons {
71
76
  allowCustomValues?: boolean;
72
77
  customValueLabel?: string;
73
78
  autoComplete?: string;
79
+ dataTestId?: string;
74
80
  id?: string;
75
81
  inputMode?: HTMLAttributes<HTMLElement>['inputMode'];
76
82
  arrangement?: 'horizontal' | 'vertical';
@@ -6,7 +6,7 @@ export interface PaginationClasses {
6
6
  resultsTextClasses: string;
7
7
  controlClasses: string;
8
8
  }
9
- export default function Pagination({ wrapperClasses, resultsClasses, resultsTextClasses, activeIconClasses, inactiveIconClasses, controlClasses, xToY, currentPage, totalPages, showButtons, dataTestId, onFirstPage, onPreviousPage, onNextPage, onLastPage, toPage, }: {
9
+ export default function Pagination({ wrapperClasses, resultsClasses, resultsTextClasses, activeIconClasses, inactiveIconClasses, controlClasses, xToY, currentPage, totalPages, showButtons, dataTestId, firstPageIconName, firstPageIconPath, previousPageIconName, previousPageIconPath, nextPageIconName, nextPageIconPath, lastPageIconName, lastPageIconPath, onFirstPage, onPreviousPage, onNextPage, onLastPage, toPage, }: {
10
10
  currentLoaded: number;
11
11
  currentStart: number;
12
12
  currentEnd: number;
@@ -21,6 +21,14 @@ export default function Pagination({ wrapperClasses, resultsClasses, resultsText
21
21
  controlClasses?: string;
22
22
  xToY: string;
23
23
  showButtons: boolean;
24
+ firstPageIconName?: string;
25
+ firstPageIconPath?: string;
26
+ previousPageIconName?: string;
27
+ previousPageIconPath?: string;
28
+ nextPageIconName?: string;
29
+ nextPageIconPath?: string;
30
+ lastPageIconName?: string;
31
+ lastPageIconPath?: string;
24
32
  dataTestId?: string;
25
33
  onFirstPage?: () => void;
26
34
  onPreviousPage?: () => void;
@@ -18,7 +18,7 @@ export interface TableColumn<DataType> {
18
18
  export default function Table<DataType extends {
19
19
  dragRef?: React.RefObject<HTMLDivElement>;
20
20
  index?: number;
21
- }>({ noDataClasses, wrapperClasses, tableClasses, rowClasses, rowLeftWrapperClasses, rowCenterWrapperClasses, rowRightWrapperClasses, headerClasses, paginationClasses, filterComponents, columnsCenter, columnsRight, columnsLeft, cellRenderer, filters, data, pagination, totalRows, totalPagesProp, currentPage, noEntryLabel, allowReorder, showFilters, pagesize, xToY, isInfinite, name, onDragRow, onDropRow, onRowClick, onRowDoubleClick, onScroll, onUpdateFilters, onSort, onFirstPage, onPreviousPage, onNextPage, onLastPage, toPage, }: {
21
+ }>({ noDataClasses, wrapperClasses, tableClasses, rowClasses, rowLeftWrapperClasses, rowCenterWrapperClasses, rowRightWrapperClasses, headerClasses, paginationClasses, filterComponents, columnsCenter, columnsRight, columnsLeft, cellRenderer, filters, data, pagination, totalRows, totalPagesProp, currentPage, noEntryLabel, allowReorder, showFilters, pagesize, xToY, isInfinite, name, firstPageIconName, firstPageIconPath, previousPageIconName, previousPageIconPath, nextPageIconName, nextPageIconPath, lastPageIconName, lastPageIconPath, sortingAscIconName, sortingAscIconPath, sortingDescIconName, sortingDescIconPath, onDragRow, onDropRow, onRowClick, onRowDoubleClick, onScroll, onUpdateFilters, onSort, onFirstPage, onPreviousPage, onNextPage, onLastPage, toPage, }: {
22
22
  wrapperClasses?: string;
23
23
  tableClasses?: string;
24
24
  rowClasses?: string;
@@ -56,6 +56,18 @@ export default function Table<DataType extends {
56
56
  isInfinite?: boolean;
57
57
  pagesize?: number;
58
58
  name?: string;
59
+ firstPageIconName?: string;
60
+ firstPageIconPath?: string;
61
+ previousPageIconName?: string;
62
+ previousPageIconPath?: string;
63
+ nextPageIconName?: string;
64
+ nextPageIconPath?: string;
65
+ lastPageIconName?: string;
66
+ lastPageIconPath?: string;
67
+ sortingAscIconName?: string;
68
+ sortingAscIconPath?: string;
69
+ sortingDescIconName?: string;
70
+ sortingDescIconPath?: string;
59
71
  onDragRow?: (dragIndex: number, hoverIndex: number) => void;
60
72
  onDropRow?: (dragIndex: number, hoverIndex: number) => void;
61
73
  onScroll?: (event: React.UIEvent<HTMLDivElement>) => void;
@@ -1,6 +1,8 @@
1
- export default function TableActions({ children, classes }: {
1
+ export default function TableActions({ children, classes, showActionsIconName, showActionsIconPath, }: {
2
2
  children: React.ReactNode;
3
3
  classes?: string;
4
+ showActionsIconName?: string;
5
+ showActionsIconPath?: string;
4
6
  }): import("react/jsx-runtime").JSX.Element;
5
7
  type TableActionVariant = 'error' | 'success' | 'warning' | 'default';
6
8
  export declare function TableActionEntry({ text, errorClasses, defaultClasses, variant, onClick, }: {
@@ -1,5 +1,5 @@
1
1
  import { default as Button } from './button.tsx';
2
- export default function Modal({ backdropClasses, contentClasses, headerWrapperClasses, footerWrapperClasses, footerLeftClasses, footerRightClasses, titleClasses, closeWrapperClasses, iconClasses, children, headerContent, footerContent, title, dataTestId, footerActions, hasCloseIcon, onClose, }: {
2
+ export default function Modal({ backdropClasses, contentClasses, headerWrapperClasses, footerWrapperClasses, footerLeftClasses, footerRightClasses, titleClasses, closeWrapperClasses, iconClasses, children, headerContent, footerContent, title, dataTestId, footerActions, hasCloseIcon, closeIconName, closeIconPath, onClose, }: {
3
3
  backdropClasses?: string;
4
4
  contentClasses?: string;
5
5
  headerWrapperClasses?: string;
@@ -18,5 +18,7 @@ export default function Modal({ backdropClasses, contentClasses, headerWrapperCl
18
18
  position: 'left' | 'right';
19
19
  })[];
20
20
  hasCloseIcon?: boolean;
21
+ closeIconName?: string;
22
+ closeIconPath?: string;
21
23
  onClose: () => void;
22
24
  }): import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@konoma-development/react-components",
3
- "packageManager": "yarn@4.6.0",
4
- "version": "0.2.3",
3
+ "packageManager": "yarn@4.12.0",
4
+ "version": "0.2.5",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },