@aic-kits/react 0.35.2 → 0.35.3

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 (47) hide show
  1. package/dist/components/Button/StyledButton.d.ts +15 -10
  2. package/dist/components/Grid/StyledGrid.d.ts +13 -4
  3. package/dist/components/Grid/__tests__/index.test.d.ts +1 -0
  4. package/dist/components/Grid/__tests__/utils.test.d.ts +1 -0
  5. package/dist/components/Grid/types.d.ts +2 -1
  6. package/dist/components/Grid/utils.d.ts +2 -1
  7. package/dist/components/Input/StyledInput.d.ts +2 -1
  8. package/dist/components/Input/types.d.ts +6 -1
  9. package/dist/components/Radio/Radio.d.ts +3 -0
  10. package/dist/components/Radio/RadioButton.d.ts +3 -0
  11. package/dist/components/Radio/RadioContext.d.ts +3 -0
  12. package/dist/components/Radio/RadioGroup.d.ts +3 -0
  13. package/dist/components/Radio/index.d.ts +10 -0
  14. package/dist/components/Radio/types.d.ts +147 -0
  15. package/dist/components/Select/Select.d.ts +1 -1
  16. package/dist/components/Select/types.d.ts +10 -1
  17. package/dist/components/Switch/StyledSwitch.d.ts +6 -0
  18. package/dist/components/Switch/Switch.d.ts +3 -0
  19. package/dist/components/Switch/__tests__/index.test.d.ts +1 -0
  20. package/dist/components/Switch/index.d.ts +2 -0
  21. package/dist/components/Switch/types.d.ts +44 -0
  22. package/dist/components/Table/AccordionRow.d.ts +5 -0
  23. package/dist/components/Table/AccordionRowContent.d.ts +20 -0
  24. package/dist/components/Table/AccordionRowHeader.d.ts +16 -0
  25. package/dist/components/Table/AddForm.d.ts +5 -0
  26. package/dist/components/Table/DeleteDialog.d.ts +3 -0
  27. package/dist/components/Table/Filters.d.ts +3 -0
  28. package/dist/components/Table/FormFields.d.ts +24 -0
  29. package/dist/components/Table/InlineMultiSelect.d.ts +3 -0
  30. package/dist/components/Table/InlinePairSelect.d.ts +3 -0
  31. package/dist/components/Table/StyledTable.d.ts +29 -0
  32. package/dist/components/Table/Table.d.ts +5 -0
  33. package/dist/components/Table/TableHeaderRow.d.ts +10 -0
  34. package/dist/components/Table/TablePagination.d.ts +11 -0
  35. package/dist/components/Table/ValidationDialog.d.ts +7 -0
  36. package/dist/components/Table/hooks.d.ts +34 -0
  37. package/dist/components/Table/index.d.ts +12 -0
  38. package/dist/components/Table/types.d.ts +372 -0
  39. package/dist/components/Table/utils.d.ts +83 -0
  40. package/dist/components/index.d.ts +3 -0
  41. package/dist/index.cjs +470 -370
  42. package/dist/index.js +13146 -9568
  43. package/dist/theme/components/index.d.ts +10 -1
  44. package/dist/theme/components/radio.d.ts +42 -0
  45. package/dist/theme/components/switch.d.ts +27 -0
  46. package/dist/theme/components/table.d.ts +34 -0
  47. package/package.json +2 -2
@@ -1,3 +1,4 @@
1
+ import { default as React } from 'react';
1
2
  import { BorderWidth, Color, FontSize, Space, Size, FontWeight, Radius, ButtonSize, ButtonVariant } from '../../theme';
2
3
  type ButtonContainerProps = {
3
4
  $backgroundColor: Color | 'disabled';
@@ -11,10 +12,10 @@ type ButtonContainerProps = {
11
12
  $size: ButtonSize;
12
13
  };
13
14
  declare const StyledButtonContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('..').BoxProps & {
14
- ref?: import('react').ForwardedRef<HTMLDivElement>;
15
+ ref?: React.ForwardedRef<HTMLDivElement>;
15
16
  }, ButtonContainerProps>> & string & Omit<(props: import('..').BoxProps & {
16
- ref?: import('react').ForwardedRef<HTMLDivElement>;
17
- }) => ReturnType<({ children, style, "data-testid": testId, ...otherProps }: import('..').BoxProps, ref: import('react').ForwardedRef<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element>, keyof import('react').Component<any, {}, any>>;
17
+ ref?: React.ForwardedRef<HTMLDivElement>;
18
+ }) => ReturnType<({ children, style, "data-testid": testId, ...otherProps }: import('..').BoxProps, ref: React.ForwardedRef<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element>, keyof React.Component<any, {}, any>>;
18
19
  type ButtonTextProps = {
19
20
  $themeColor: Color;
20
21
  $themeTextColor?: Color;
@@ -22,24 +23,28 @@ type ButtonTextProps = {
22
23
  $variant: 'solid' | 'outlined' | 'text';
23
24
  $themeFontSize: FontSize;
24
25
  $themeFontWeight: FontWeight;
26
+ $overflow?: React.CSSProperties['overflow'];
27
+ $textOverflow?: React.CSSProperties['textOverflow'];
28
+ $maxWidth?: React.CSSProperties['maxWidth'];
29
+ $whiteSpace?: React.CSSProperties['whiteSpace'];
25
30
  };
26
31
  declare const StyledButtonText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('..').TextProps & {
27
32
  useRichText?: boolean;
28
- ref?: import('react').ForwardedRef<HTMLParagraphElement>;
33
+ ref?: React.ForwardedRef<HTMLParagraphElement>;
29
34
  }, ButtonTextProps>> & string & Omit<(props: import('..').TextProps & {
30
35
  useRichText?: boolean;
31
- ref?: import('react').ForwardedRef<HTMLParagraphElement>;
32
- }) => import("react/jsx-runtime").JSX.Element, keyof import('react').Component<any, {}, any>>;
36
+ ref?: React.ForwardedRef<HTMLParagraphElement>;
37
+ }) => import("react/jsx-runtime").JSX.Element, keyof React.Component<any, {}, any>>;
33
38
  type ButtonIconWrapperProps = {
34
39
  $themePosition: 'left' | 'right';
35
40
  $iconSpacing: Space;
36
41
  $hasText?: boolean;
37
42
  };
38
43
  declare const StyledButtonIconWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('..').BoxProps & {
39
- ref?: import('react').ForwardedRef<HTMLDivElement>;
44
+ ref?: React.ForwardedRef<HTMLDivElement>;
40
45
  }, ButtonIconWrapperProps>> & string & Omit<(props: import('..').BoxProps & {
41
- ref?: import('react').ForwardedRef<HTMLDivElement>;
42
- }) => ReturnType<({ children, style, "data-testid": testId, ...otherProps }: import('..').BoxProps, ref: import('react').ForwardedRef<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element>, keyof import('react').Component<any, {}, any>>;
46
+ ref?: React.ForwardedRef<HTMLDivElement>;
47
+ }) => ReturnType<({ children, style, "data-testid": testId, ...otherProps }: import('..').BoxProps, ref: React.ForwardedRef<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element>, keyof React.Component<any, {}, any>>;
43
48
  type ButtonIconProps = {
44
49
  $themeColor: Color;
45
50
  $themeTextColor?: Color;
@@ -47,5 +52,5 @@ type ButtonIconProps = {
47
52
  $variant: 'solid' | 'outlined' | 'text';
48
53
  $iconSize: Size;
49
54
  };
50
- declare const StyledButtonIcon: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('..').IconArtProps | import('..').EmojiArtProps | import('..').SvgArtProps | import('..').ImageArtProps | import('..').BrandArtProps, ButtonIconProps>> & string & Omit<(props: import('..').ArtProps) => React.ReactElement, keyof import('react').Component<any, {}, any>>;
55
+ declare const StyledButtonIcon: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('..').IconArtProps | import('..').EmojiArtProps | import('..').SvgArtProps | import('..').ImageArtProps | import('..').BrandArtProps, ButtonIconProps>> & string & Omit<(props: import('..').ArtProps) => React.ReactElement, keyof React.Component<any, {}, any>>;
51
56
  export { StyledButtonContainer, StyledButtonText, StyledButtonIconWrapper, StyledButtonIcon, };
@@ -1,8 +1,17 @@
1
- import { GridProps, GridColumns } from './types';
1
+ import { GridColumns, GridSpacing, GridSize, GridOffset } from './types';
2
+ interface StyledGridProps {
3
+ $container?: boolean;
4
+ $spacing?: GridSpacing;
5
+ $rowSpacing?: GridSpacing;
6
+ $columnSpacing?: GridSpacing;
7
+ $columns?: GridColumns;
8
+ $size?: GridSize;
9
+ $offset?: GridOffset;
10
+ $columnsContext: GridColumns;
11
+ }
2
12
  export declare const StyledGrid: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('..').BoxProps & {
3
13
  ref?: import('react').ForwardedRef<HTMLDivElement>;
4
- }, GridProps & {
5
- columnsContext: GridColumns;
6
- }>> & string & Omit<(props: import('..').BoxProps & {
14
+ }, StyledGridProps>> & string & Omit<(props: import('..').BoxProps & {
7
15
  ref?: import('react').ForwardedRef<HTMLDivElement>;
8
16
  }) => ReturnType<({ children, style, "data-testid": testId, ...otherProps }: import('..').BoxProps, ref: import('react').ForwardedRef<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element>, keyof import('react').Component<any, {}, any>>;
17
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -10,7 +10,8 @@ export declare const GRID_BREAKPOINTS: {
10
10
  xl: number;
11
11
  };
12
12
  export type BreakpointKey = keyof typeof GRID_BREAKPOINTS;
13
- export type GridSizeValue = number | 'auto' | 'grow';
13
+ export declare const DEFAULT_GRID_COLUMNS = 12;
14
+ export type GridSizeValue = number | 'auto';
14
15
  export type GridSize = GridSizeValue | Partial<Record<BreakpointKey, GridSizeValue>>;
15
16
  export type GridOffsetValue = number | 'auto';
16
17
  export type GridOffset = GridOffsetValue | Partial<Record<BreakpointKey, GridOffsetValue>>;
@@ -1,8 +1,9 @@
1
1
  import { Theme } from '../../theme';
2
2
  import { GridSpacing, ResponsiveProp, GridSize, GridOffset, GridColumns } from './types';
3
+ export declare const generateColumnsStyles: (columns: GridColumns | undefined) => import('styled-components').RuleSet<object>;
4
+ export declare const generateGapStyles: (theme: Theme, spacing?: GridSpacing, rowSpacing?: GridSpacing, columnSpacing?: GridSpacing) => import('styled-components').RuleSet<object>;
3
5
  export declare const resolveSpacing: (theme: Theme, value?: GridSpacing) => ResponsiveProp<string | number> | undefined;
4
6
  export declare const generateItemStyles: ({ size, offset, columnsContext, }: {
5
- theme: Theme;
6
7
  size?: GridSize;
7
8
  offset?: GridOffset;
8
9
  columnsContext: GridColumns;
@@ -1,10 +1,11 @@
1
- import { Color } from '../../theme/common';
1
+ import { Color, Radius } from '../../theme/common';
2
2
  interface StyledInputContainerProps {
3
3
  $isFocused: boolean;
4
4
  $isDisabled: boolean;
5
5
  $error: boolean;
6
6
  $borderColor?: Color;
7
7
  $bgColor?: Color;
8
+ $borderRadius?: Radius;
8
9
  }
9
10
  export declare const StyledInputContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledInputContainerProps>> & string;
10
11
  export declare const StyledInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
@@ -1,6 +1,6 @@
1
1
  import { Icon } from '@phosphor-icons/react';
2
2
  import { default as React } from 'react';
3
- import { Color } from '../../theme';
3
+ import { Color, Radius } from '../../theme';
4
4
  interface BaseInputProps {
5
5
  /**
6
6
  * The value of the input field
@@ -54,6 +54,11 @@ interface BaseInputProps {
54
54
  * Background color
55
55
  */
56
56
  bgColor?: Color;
57
+ /**
58
+ * Border radius
59
+ * @default 'md'
60
+ */
61
+ borderRadius?: Radius;
57
62
  }
58
63
  export type InputProps = BaseInputProps & ((Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'> & {
59
64
  multiline?: false;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { RadioProps } from './types';
3
+ export declare const Radio: React.FC<RadioProps>;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { RadioButtonProps } from './types';
3
+ export declare const RadioButton: React.FC<RadioButtonProps>;
@@ -0,0 +1,3 @@
1
+ import { RadioContextValue } from './types';
2
+ export declare const RadioContext: import('react').Context<RadioContextValue | null>;
3
+ export declare const useRadioContext: () => RadioContextValue | null;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { RadioGroupProps } from './types';
3
+ export declare const RadioGroup: React.FC<RadioGroupProps>;
@@ -0,0 +1,10 @@
1
+ import { Radio as RadioBase } from './Radio';
2
+ import { RadioButton } from './RadioButton';
3
+ import { RadioGroup } from './RadioGroup';
4
+ type RadioType = typeof RadioBase & {
5
+ Group: typeof RadioGroup;
6
+ Button: typeof RadioButton;
7
+ };
8
+ declare const Radio: RadioType;
9
+ export { Radio, RadioGroup, RadioButton };
10
+ export * from './types';
@@ -0,0 +1,147 @@
1
+ import { default as React } from 'react';
2
+ import { Color } from '../../theme';
3
+ import { RadioSize } from '../../theme/components/radio';
4
+ export interface RadioOption {
5
+ /**
6
+ * The label to display for this option.
7
+ */
8
+ label: React.ReactNode;
9
+ /**
10
+ * The value of this option.
11
+ */
12
+ value: string | number;
13
+ /**
14
+ * Whether this option is disabled.
15
+ */
16
+ disabled?: boolean;
17
+ }
18
+ export interface RadioProps {
19
+ /**
20
+ * The value of this radio.
21
+ */
22
+ value: string | number;
23
+ /**
24
+ * Whether the radio is checked.
25
+ */
26
+ checked?: boolean;
27
+ /**
28
+ * Whether the radio is disabled.
29
+ * @default false
30
+ */
31
+ disabled?: boolean;
32
+ /**
33
+ * Callback fired when the radio state changes.
34
+ */
35
+ onChange?: (checked: boolean) => void;
36
+ /**
37
+ * The label text for the radio.
38
+ */
39
+ children?: React.ReactNode;
40
+ /**
41
+ * The color scheme for the checked state.
42
+ * @default 'primary' (from theme)
43
+ */
44
+ color?: Color;
45
+ /**
46
+ * The size of the radio.
47
+ * @default 'md' (from theme)
48
+ */
49
+ size?: RadioSize;
50
+ /**
51
+ * Additional styles to apply.
52
+ */
53
+ style?: React.CSSProperties;
54
+ /**
55
+ * The test ID for targeting in tests.
56
+ */
57
+ 'data-testid'?: string;
58
+ }
59
+ export type RadioButtonStyle = 'outline' | 'solid';
60
+ export interface RadioButtonProps extends Omit<RadioProps, 'children'> {
61
+ /**
62
+ * The label text for the radio button.
63
+ */
64
+ children?: React.ReactNode;
65
+ /**
66
+ * The button style.
67
+ * @default 'outline'
68
+ */
69
+ buttonStyle?: RadioButtonStyle;
70
+ }
71
+ export type RadioGroupDirection = 'horizontal' | 'vertical';
72
+ export type RadioGroupOptionType = 'default' | 'button';
73
+ export interface RadioGroupProps {
74
+ /**
75
+ * The current selected value.
76
+ */
77
+ value?: string | number;
78
+ /**
79
+ * The default selected value (uncontrolled mode).
80
+ */
81
+ defaultValue?: string | number;
82
+ /**
83
+ * Callback fired when the selected value changes.
84
+ */
85
+ onChange?: (value: string | number) => void;
86
+ /**
87
+ * Whether all radios in the group are disabled.
88
+ * @default false
89
+ */
90
+ disabled?: boolean;
91
+ /**
92
+ * Options to render as radios (alternative to children).
93
+ */
94
+ options?: RadioOption[];
95
+ /**
96
+ * The type of radio to render when using options.
97
+ * @default 'default'
98
+ */
99
+ optionType?: RadioGroupOptionType;
100
+ /**
101
+ * The button style when optionType is 'button'.
102
+ * @default 'outline'
103
+ */
104
+ buttonStyle?: RadioButtonStyle;
105
+ /**
106
+ * The layout direction.
107
+ * @default 'horizontal'
108
+ */
109
+ direction?: RadioGroupDirection;
110
+ /**
111
+ * Whether the group should span full width.
112
+ * @default false
113
+ */
114
+ block?: boolean;
115
+ /**
116
+ * The size of all radios in the group.
117
+ * @default 'md' (from theme)
118
+ */
119
+ size?: RadioSize;
120
+ /**
121
+ * The color scheme for checked radios.
122
+ * @default 'primary' (from theme)
123
+ */
124
+ color?: Color;
125
+ /**
126
+ * Radio or Radio.Button children.
127
+ */
128
+ children?: React.ReactNode;
129
+ /**
130
+ * Additional styles to apply.
131
+ */
132
+ style?: React.CSSProperties;
133
+ /**
134
+ * The test ID for targeting in tests.
135
+ */
136
+ 'data-testid'?: string;
137
+ }
138
+ export interface RadioContextValue {
139
+ value?: string | number;
140
+ onChange?: (value: string | number) => void;
141
+ disabled?: boolean;
142
+ size?: RadioSize;
143
+ color?: Color;
144
+ optionType?: RadioGroupOptionType;
145
+ buttonStyle?: RadioButtonStyle;
146
+ block?: boolean;
147
+ }
@@ -1,2 +1,2 @@
1
1
  import { SelectProps } from './types';
2
- export declare const Select: <T extends string | number>({ options, value, onChange, placeholder, label, helperText, error, disabled, variant, color: colorProp, size: sizeProp, corner: cornerProp, style, "data-testid": testId, searchable, }: SelectProps<T>) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const Select: <T extends string | number>({ options, value, onChange, placeholder, label, helperText, error, disabled, variant, color: colorProp, size: sizeProp, corner: cornerProp, borderRadius: borderRadiusProp, bgColor: bgColorProp, style, "data-testid": testId, searchable, }: SelectProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { Color, SelectSize, SelectVariant } from '../../theme';
2
+ import { Color, Radius, SelectSize, SelectVariant } from '../../theme';
3
3
  /**
4
4
  * Represents a single option in the Select component.
5
5
  */
@@ -63,6 +63,15 @@ export interface SelectProps<T extends string | number> {
63
63
  * @default 'circle'
64
64
  */
65
65
  corner?: 'circle' | 'rounded';
66
+ /**
67
+ * Border radius (overrides corner prop when provided).
68
+ * @default 'md'
69
+ */
70
+ borderRadius?: Radius;
71
+ /**
72
+ * Background color override. When provided, overrides the variant-based background.
73
+ */
74
+ bgColor?: Color;
66
75
  /**
67
76
  * Additional styles to apply to the container.
68
77
  */
@@ -0,0 +1,6 @@
1
+ export declare const StyledSwitchHandle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
2
+ $size: number;
3
+ $position: number;
4
+ $duration: number;
5
+ $easing: string;
6
+ }>> & string;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { SwitchProps } from './types';
3
+ export declare const Switch: React.FC<SwitchProps>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './Switch';
2
+ export * from './types';
@@ -0,0 +1,44 @@
1
+ import { default as React } from 'react';
2
+ import { Color } from '../../theme';
3
+ import { SwitchSize } from '../../theme/components/switch';
4
+ export interface SwitchProps {
5
+ /**
6
+ * The label text for the switch.
7
+ */
8
+ label?: string;
9
+ /**
10
+ * The state of the switch.
11
+ */
12
+ checked: boolean;
13
+ /**
14
+ * Callback fired when the switch state changes.
15
+ */
16
+ onChange: (checked: boolean) => void;
17
+ /**
18
+ * Whether the switch is disabled.
19
+ * @default false
20
+ */
21
+ disabled?: boolean;
22
+ /**
23
+ * The base color scheme for the checked state.
24
+ * @default 'primary' (from theme)
25
+ */
26
+ color?: Color;
27
+ /**
28
+ * The size of the switch.
29
+ * @default 'md' (from theme)
30
+ */
31
+ size?: SwitchSize;
32
+ /**
33
+ * Additional styles to apply to the container.
34
+ */
35
+ style?: React.CSSProperties;
36
+ /**
37
+ * The test ID for targeting in tests.
38
+ */
39
+ 'data-testid'?: string;
40
+ /**
41
+ * Accessible label for screen readers when no visible label is provided.
42
+ */
43
+ 'aria-label'?: string;
44
+ }
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ import { AccordionRowProps } from './types';
3
+ export declare function AccordionRow<T extends {
4
+ id: string | number;
5
+ }>({ item, columns, allColumns, expandedRows, editFormData, loadingDetails, isFormLoading, isEditable, isExpandAccordion, isSelected, onToggleExpanded, onEditFormChange, onSave, onDelete, onQuickEdit, }: AccordionRowProps<T>): React.ReactElement;
@@ -0,0 +1,20 @@
1
+ import { default as React } from 'react';
2
+ import { Column } from './types';
3
+ export interface AccordionRowContentProps<T extends {
4
+ id: string | number;
5
+ }> {
6
+ item: T;
7
+ allColumns: Column<T>[];
8
+ editFormData: Record<string | number, Partial<T>>;
9
+ loadingDetails: Set<string | number>;
10
+ isFormLoading: boolean;
11
+ isEditable: boolean;
12
+ hasChanges: boolean;
13
+ onEditFormChange: (id: string | number, key: keyof T, value: unknown) => void;
14
+ onSave: (item: T) => void;
15
+ onToggleExpanded: (item: T) => void;
16
+ onDelete?: (item: T) => void;
17
+ }
18
+ export declare function AccordionRowContent<T extends {
19
+ id: string | number;
20
+ }>({ item, allColumns, editFormData, loadingDetails, isFormLoading, isEditable, hasChanges, onEditFormChange, onSave, onToggleExpanded, onDelete, }: AccordionRowContentProps<T>): React.ReactElement;
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ import { Column } from './types';
3
+ export interface AccordionRowHeaderProps<T extends {
4
+ id: string | number;
5
+ }> {
6
+ item: T;
7
+ columns: Column<T>[];
8
+ isSelected: boolean;
9
+ isEditable: boolean;
10
+ onEditFormChange: (id: string | number, key: keyof T, value: unknown) => void;
11
+ onSave: (item: T) => void;
12
+ onQuickEdit?: (item: T, key: keyof T, value: unknown) => void;
13
+ }
14
+ export declare function AccordionRowHeader<T extends {
15
+ id: string | number;
16
+ }>({ item, columns, isSelected, isEditable, onEditFormChange, onSave, onQuickEdit, }: AccordionRowHeaderProps<T>): React.ReactElement;
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ import { AddFormProps } from './types';
3
+ export declare function AddForm<T extends {
4
+ id: string | number;
5
+ }>({ columns, formData, isLoading, onInputChange, onSubmit, onCancel, }: AddFormProps<T>): React.ReactElement;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { DeleteDialogProps } from './types';
3
+ export declare const DeleteDialog: ({ open, onOpenChange, onConfirm, isLoading, message, deleteButtonText, }: DeleteDialogProps) => React.ReactElement | null;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { FiltersProps } from './types';
3
+ export declare function Filters<T>({ columns, filters, onFiltersChange, borderRadius, }: FiltersProps<T>): React.ReactElement;
@@ -0,0 +1,24 @@
1
+ import { default as React } from 'react';
2
+ import { Radius } from '../../theme';
3
+ import { Column } from './types';
4
+ export interface FormFieldsProps<T extends {
5
+ id: string | number;
6
+ }> {
7
+ columns: Column<T>[];
8
+ getValue: (column: Column<T>) => unknown;
9
+ onChange: (column: Column<T>, value: unknown) => void;
10
+ disabled?: boolean;
11
+ formData?: T;
12
+ /** Filter function for columns */
13
+ filterColumn?: (column: Column<T>) => boolean;
14
+ /** Show non-editable columns as disabled inputs */
15
+ showNonEditable?: boolean;
16
+ /**
17
+ * Border radius for Input and Select components
18
+ * @default 'md'
19
+ */
20
+ borderRadius?: Radius;
21
+ }
22
+ export declare function FormFields<T extends {
23
+ id: string | number;
24
+ }>({ columns, getValue, onChange, disabled, formData, filterColumn, showNonEditable, borderRadius, }: FormFieldsProps<T>): React.ReactElement;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { InlineMultiSelectProps } from './types';
3
+ export declare const InlineMultiSelect: ({ options, groupOptions, value, onChange, placeholder, max, limit, }: InlineMultiSelectProps) => React.ReactElement;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { InlinePairSelectProps } from './types';
3
+ export declare const InlinePairSelect: ({ primaryOptions, secondaryOptions, value, onChange, primaryLabel, secondaryLabel, primaryPlaceholder, secondaryPlaceholder, valueKeys, disabled, borderRadius, }: InlinePairSelectProps) => React.ReactElement;
@@ -0,0 +1,29 @@
1
+ export declare const StyledTable: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, never>> & string;
2
+ export declare const StyledTableHeader: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, never>> & string;
3
+ export declare const StyledTableBody: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, never>> & string;
4
+ export declare const StyledTableFooter: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, never>> & string;
5
+ export interface StyledTableRowProps {
6
+ $isSelected?: boolean;
7
+ $isClickable?: boolean;
8
+ }
9
+ export declare const StyledTableRow: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, StyledTableRowProps>> & string;
10
+ export interface StyledTableHeadProps {
11
+ $sortable?: boolean;
12
+ $width?: string;
13
+ }
14
+ export declare const StyledTableHead: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, StyledTableHeadProps>> & string;
15
+ export interface StyledTableCellProps {
16
+ $width?: string;
17
+ $align?: 'left' | 'center' | 'right';
18
+ }
19
+ export declare const StyledTableCell: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, StyledTableCellProps>> & string;
20
+ export declare const StyledAccordionCell: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, keyof StyledTableCellProps> & StyledTableCellProps, never>> & string;
21
+ export declare const StyledTableCaption: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
22
+ export declare const StyledInlineCellTable: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, never>> & string;
23
+ export interface StyledInlineCellProps {
24
+ $width?: string;
25
+ $isEditing?: boolean;
26
+ }
27
+ export declare const StyledInlineCell: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, StyledInlineCellProps>> & string;
28
+ export declare const StyledCellPreformatted: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLPreElement>, HTMLPreElement>, never>> & string;
29
+ export declare const StyledNoDataCell: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, never>> & string;
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ import { TableProps } from './types';
3
+ export declare function Table<T extends {
4
+ id: string | number;
5
+ }>({ data, columns: allColumns, onAdd, onEdit, onDelete, onView, renderExpandedRow, onSelectedItemChange, title, addButtonText, deleteButtonText, confirmDeleteMessage, noDataMessage, total, currentPage, pageSize, pageSizeOptions, sortBy, sortDirection, onPaginationChange, isLoading, filters, onFiltersChange, showFilterBuilder, onFieldChange, expandable, error, }: TableProps<T>): React.ReactElement;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { Column } from './types';
3
+ export interface TableHeaderRowProps<T> {
4
+ columns: Column<T>[];
5
+ totalFlex: number;
6
+ sortBy?: string;
7
+ sortDirection: 'asc' | 'desc';
8
+ onSort: (key: keyof T) => void;
9
+ }
10
+ export declare function TableHeaderRow<T>({ columns, totalFlex, sortBy, sortDirection, onSort, }: TableHeaderRowProps<T>): React.ReactElement;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ export interface TablePaginationProps {
3
+ currentPage: number;
4
+ pageSize: number;
5
+ total: number;
6
+ totalPages: number;
7
+ pageSizeOptions: number[];
8
+ onPageChange: (page: number) => void;
9
+ onPageSizeChange: (pageSize: number) => void;
10
+ }
11
+ export declare function TablePagination({ currentPage, pageSize, total, totalPages, pageSizeOptions, onPageChange, onPageSizeChange, }: TablePaginationProps): React.ReactElement;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ interface ValidationDialogProps {
3
+ errors: string[];
4
+ onClose: () => void;
5
+ }
6
+ export declare const ValidationDialog: ({ errors, onClose, }: ValidationDialogProps) => React.ReactElement | null;
7
+ export {};
@@ -0,0 +1,34 @@
1
+ import { TableStateAdapter, UseTableReturn, UseLocalStateAdapterConfig, UseTableStateProps, UseTableStateReturn } from './types';
2
+ /**
3
+ * Hook for managing table UI state (pagination, sorting, filtering)
4
+ * Uses adapter pattern to work with different state backends
5
+ *
6
+ * @param adapter - State adapter for reading/writing table state
7
+ * @returns Current state values and handlers
8
+ *
9
+ * @example
10
+ * // With local state adapter
11
+ * const adapter = useLocalStateAdapter({ defaultPageSize: 10 })
12
+ * const table = useTable(adapter)
13
+ *
14
+ * @example
15
+ * // With custom URL state adapter
16
+ * const adapter = useUrlStateAdapter(config)
17
+ * const table = useTable(adapter)
18
+ */
19
+ export declare function useTable<T = unknown>(adapter: TableStateAdapter<T>): UseTableReturn<T>;
20
+ /**
21
+ * Local state adapter for useTable hook
22
+ * Uses React useState for state management (no URL dependency)
23
+ *
24
+ * @param config - Optional configuration for default values
25
+ * @returns TableStateAdapter that uses local state
26
+ *
27
+ * @example
28
+ * const adapter = useLocalStateAdapter({ defaultPageSize: 10 });
29
+ * const { currentPage, filters, onPaginationChange } = useTable(adapter);
30
+ */
31
+ export declare function useLocalStateAdapter<T = unknown>(config?: UseLocalStateAdapterConfig): TableStateAdapter<T>;
32
+ export declare function useTableState<T extends {
33
+ id: string | number;
34
+ }>({ data, columns: allColumns, currentPage, pageSize, total, sortBy, sortDirection, onPaginationChange, onAdd, onEdit, onDelete, onView, onSelectedItemChange, onFieldChange, renderExpandedRow, }: UseTableStateProps<T>): UseTableStateReturn<T>;