@eml-payments/ui-kit 1.8.0 → 1.8.1
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.
- package/README.md +73 -13
- package/dist/index.d.cts +488 -0
- package/dist/index.d.ts +488 -0
- package/dist/src/components/Table/BaseTable/index.d.ts +1 -0
- package/dist/src/components/Table/BaseTable/index.js +1 -0
- package/dist/src/components/Table/Pagination/Pagination.types.d.ts +1 -0
- package/dist/src/components/Table/Pagination/PaginationFooter.d.ts +1 -1
- package/dist/src/components/Table/Pagination/PaginationFooter.js +2 -2
- package/dist/src/components/Table/StandardTable/StandardTable.js +1 -1
- package/dist/src/components/Table/StandardTable/StandardTable.stories.d.ts +1 -0
- package/dist/src/components/Table/StandardTable/StandardTable.stories.js +3 -0
- package/dist/src/components/Table/Table.js +1 -1
- package/dist/src/components/Table/Table.types.d.ts +2 -0
- package/dist/src/components/Tooltip/Tooltip.stories.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @eml-payments/ui-kit
|
|
2
2
|
|
|
3
|
-
A fully-typed, design token-driven React UI Kit for modern web apps
|
|
3
|
+
A fully-typed, design token-driven React UI Kit for modern web apps.
|
|
4
4
|
Built for fast integration, deep customization, and a great developer experience.
|
|
5
5
|
|
|
6
6
|
---
|
|
@@ -10,13 +10,83 @@ Built for fast integration, deep customization, and a great developer experience
|
|
|
10
10
|
- **Full TypeScript support** — all types exported
|
|
11
11
|
- **Design token based theming** (via context provider)
|
|
12
12
|
- **Easy theme override** (colors, radius, fonts, etc)
|
|
13
|
-
- **Composable, accessible components**
|
|
14
|
-
- **Powered by TailwindCSS, HeadlessUI, Tanstack Table**
|
|
13
|
+
- **Composable, accessible components**
|
|
15
14
|
- **Ready-to-use Storybook with live playground**
|
|
16
15
|
- **Clean API, tree-shakable, zero CSS conflicts**
|
|
17
16
|
|
|
18
17
|
---
|
|
19
18
|
|
|
19
|
+
## 🏗️ Tech Stack & Libraries
|
|
20
|
+
|
|
21
|
+
| Library | What we use it for |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| [TailwindCSS](https://tailwindcss.com/) | Utility-first styling, design tokens, and theming |
|
|
24
|
+
| [Radix UI](https://www.radix-ui.com/) | Accessible, unstyled primitive components (see below) |
|
|
25
|
+
| [Base UI](https://base-ui.com/) | Headless primitive for the Combobox component |
|
|
26
|
+
| [Tanstack Table](https://tanstack.com/table) | Powerful headless table engine with sorting, filtering, and pagination |
|
|
27
|
+
| [Tanstack Virtual](https://tanstack.com/virtual) | Virtualized infinite scrolling for large table datasets |
|
|
28
|
+
| [react-day-picker](https://daypicker.dev/) | Calendar and date picking primitives |
|
|
29
|
+
| [dayjs](https://day.js.org/) | Lightweight date formatting, parsing, and manipulation |
|
|
30
|
+
| [intl-tel-input](https://intl-tel-input.com/) | International phone number input with country flags and validation |
|
|
31
|
+
| [class-variance-authority](https://cva.style/) | Type-safe component variant definitions |
|
|
32
|
+
| [clsx](https://github.com/lukeed/clsx) + [tailwind-merge](https://github.com/dcastil/tailwind-merge) | Conditional and conflict-free class name merging (`cn()` utility) |
|
|
33
|
+
| [lucide-react](https://lucide.dev/) | Icon set used in Calendar, Combobox, and DatePicker |
|
|
34
|
+
| [react-icons](https://react-icons.github.io/react-icons/) | Icon set used across many components |
|
|
35
|
+
| [Storybook](https://storybook.js.org/) | Interactive component documentation and playground |
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## 📦 Components
|
|
40
|
+
|
|
41
|
+
### Radix UI Primitives
|
|
42
|
+
|
|
43
|
+
These components are built on top of [Radix UI](https://www.radix-ui.com/) for accessible, composable behavior:
|
|
44
|
+
|
|
45
|
+
| Component | Radix Primitive |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| `Accordion` | `@radix-ui/react-accordion` |
|
|
48
|
+
| `Avatar` | `@radix-ui/react-avatar` |
|
|
49
|
+
| `Button` | `@radix-ui/react-slot` (for `asChild` composition) |
|
|
50
|
+
| `Checkbox` | `@radix-ui/react-checkbox` |
|
|
51
|
+
| `Dialog` | `@radix-ui/react-dialog` |
|
|
52
|
+
| `Dropdown` | `@radix-ui/react-dropdown-menu` |
|
|
53
|
+
| `Label` | `@radix-ui/react-label` |
|
|
54
|
+
| `Popover` | `@radix-ui/react-popover` |
|
|
55
|
+
| `RadioGroup` | `@radix-ui/react-radio-group` |
|
|
56
|
+
| `Select` / `SelectWrapper` | `@radix-ui/react-select` |
|
|
57
|
+
| `Switch` | `@radix-ui/react-switch` |
|
|
58
|
+
| `Tabs` | `@radix-ui/react-tabs` |
|
|
59
|
+
| `Tooltip` | `@radix-ui/react-tooltip` |
|
|
60
|
+
|
|
61
|
+
### Data Table
|
|
62
|
+
|
|
63
|
+
| Component | Powered by |
|
|
64
|
+
| --- | --- |
|
|
65
|
+
| `Table` | `@tanstack/react-table` for headless table logic (sorting, filtering, pagination) and `@tanstack/react-virtual` for infinite scroll virtualization |
|
|
66
|
+
|
|
67
|
+
### Date & Time
|
|
68
|
+
|
|
69
|
+
| Component | Powered by |
|
|
70
|
+
| --- | --- |
|
|
71
|
+
| `Calendar` | `react-day-picker` + `lucide-react` icons |
|
|
72
|
+
| `DatePicker` | `react-day-picker` + `dayjs` for date formatting |
|
|
73
|
+
|
|
74
|
+
### Specialized Inputs
|
|
75
|
+
|
|
76
|
+
| Component | Powered by |
|
|
77
|
+
| --- | --- |
|
|
78
|
+
| `Combobox` | `@base-ui/react` (headless combobox primitive) + `lucide-react` icons |
|
|
79
|
+
| `PhoneInput` | `intl-tel-input` (international phone input with country flags) |
|
|
80
|
+
| `InputGroup` | `class-variance-authority` for variant styling |
|
|
81
|
+
|
|
82
|
+
### Custom-built Components
|
|
83
|
+
|
|
84
|
+
These components are built from scratch with React and TailwindCSS (no external primitive library):
|
|
85
|
+
|
|
86
|
+
`Alert` · `ButtonGroup` · `Card` · `CopyButton` · `Counter` · `CreditCard` · `Divider` · `DropdownWrapper` · `Ellipsis` · `Input` · `Pills` · `SearchInput` · `Skeleton` · `Spinner` · `Stepper` · `Textarea` · `UICreditCard`
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
20
90
|
## 🚀 Installation
|
|
21
91
|
|
|
22
92
|
```sh
|
|
@@ -101,16 +171,6 @@ Any value not set falls back to a sensible default.
|
|
|
101
171
|
|
|
102
172
|
---
|
|
103
173
|
|
|
104
|
-
## 📦 Components
|
|
105
|
-
|
|
106
|
-
- `Button` — variants: primary, secondary, ghost, destructive, loading
|
|
107
|
-
- `Input` — label, error state
|
|
108
|
-
- `Table` — full Tanstack Table v8 support, any data shape
|
|
109
|
-
|
|
110
|
-
(…and more coming soon!)
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
|
|
114
174
|
## 🧩 Example: Table
|
|
115
175
|
|
|
116
176
|
```tsx
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,488 @@
|
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
import React__default, { PropsWithChildren, InputHTMLAttributes, ComponentProps, ReactNode, JSX } from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
5
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
+
import { ColumnDef, SortingState, Row } from '@tanstack/react-table';
|
|
7
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
8
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
9
|
+
import { SelectTrigger as SelectTrigger$1, SelectContent as SelectContent$1 } from '@radix-ui/react-select';
|
|
10
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
11
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
12
|
+
import { Checkbox as Checkbox$1 } from '@radix-ui/react-checkbox';
|
|
13
|
+
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
14
|
+
import { Switch as Switch$1 } from '@radix-ui/react-switch';
|
|
15
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
16
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
17
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
18
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
19
|
+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
20
|
+
|
|
21
|
+
type ColorVariant = string | {
|
|
22
|
+
light: string;
|
|
23
|
+
dark: string;
|
|
24
|
+
};
|
|
25
|
+
type UIKitColors = {
|
|
26
|
+
primary?: ColorVariant;
|
|
27
|
+
secondary?: ColorVariant;
|
|
28
|
+
accent?: ColorVariant;
|
|
29
|
+
success?: ColorVariant;
|
|
30
|
+
warning?: ColorVariant;
|
|
31
|
+
error?: ColorVariant;
|
|
32
|
+
info?: ColorVariant;
|
|
33
|
+
background?: ColorVariant;
|
|
34
|
+
foreground?: ColorVariant;
|
|
35
|
+
textPrimary?: ColorVariant;
|
|
36
|
+
textSecondary?: ColorVariant;
|
|
37
|
+
[key: string]: ColorVariant | undefined;
|
|
38
|
+
};
|
|
39
|
+
type UIKitConfig = {
|
|
40
|
+
colors?: UIKitColors;
|
|
41
|
+
radius?: string;
|
|
42
|
+
fontFamily?: string;
|
|
43
|
+
[key: string]: unknown;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
declare const UIKitProvider: React__default.FC<PropsWithChildren<{
|
|
47
|
+
config?: UIKitConfig;
|
|
48
|
+
}>>;
|
|
49
|
+
|
|
50
|
+
declare const useUIKitTheme: () => UIKitConfig;
|
|
51
|
+
|
|
52
|
+
declare const buttonVariants: (props?: ({
|
|
53
|
+
variant?: "primary" | "secondary" | "primaryFilled" | "primaryOutlined" | "primaryText" | "secondaryFilled" | "secondaryOutlined" | "secondaryText" | "outlined" | "ghost" | "destructive" | null | undefined;
|
|
54
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
55
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
56
|
+
|
|
57
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
58
|
+
children: React.ReactNode;
|
|
59
|
+
asChild?: boolean;
|
|
60
|
+
loading?: boolean;
|
|
61
|
+
loadingText?: string;
|
|
62
|
+
icon?: React.ReactNode;
|
|
63
|
+
iconPosition?: 'left' | 'right';
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
67
|
+
|
|
68
|
+
interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
69
|
+
label?: string;
|
|
70
|
+
error?: string;
|
|
71
|
+
helperText?: string;
|
|
72
|
+
icon?: React.ReactNode;
|
|
73
|
+
variant?: 'default' | 'search';
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
declare const Input: React__default.ForwardRefExoticComponent<InputProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
77
|
+
|
|
78
|
+
type DropdownStructure = 'default' | 'checkbox' | 'radio' | 'grouped' | 'submenu';
|
|
79
|
+
type DropdownOption = {
|
|
80
|
+
label: string;
|
|
81
|
+
value?: string;
|
|
82
|
+
checked?: boolean;
|
|
83
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
84
|
+
onClick?: () => void;
|
|
85
|
+
disabled?: boolean;
|
|
86
|
+
subOptions?: DropdownOption[];
|
|
87
|
+
groupLabel?: string;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
type FlexColumnDef<T> = ColumnDef<T> & {
|
|
91
|
+
flex?: number;
|
|
92
|
+
};
|
|
93
|
+
type InfiniteScrollOptions = {
|
|
94
|
+
enabled: boolean;
|
|
95
|
+
hasNextPage: boolean;
|
|
96
|
+
isFetchingNextPage?: boolean;
|
|
97
|
+
fetchNextPage: () => void;
|
|
98
|
+
rootMarginPx?: number;
|
|
99
|
+
loadingMoreMessage?: string;
|
|
100
|
+
noMoreDataMessage?: string;
|
|
101
|
+
};
|
|
102
|
+
type PaginationMode = 'client' | 'server' | 'none';
|
|
103
|
+
interface VirtualizationOptions {
|
|
104
|
+
enabled: boolean;
|
|
105
|
+
rowEstimate?: number;
|
|
106
|
+
overscan?: number;
|
|
107
|
+
}
|
|
108
|
+
interface TableProps<T> {
|
|
109
|
+
id: string;
|
|
110
|
+
height?: number | string;
|
|
111
|
+
data: T[];
|
|
112
|
+
columns: FlexColumnDef<T>[];
|
|
113
|
+
rowIdKey?: keyof T | 'id';
|
|
114
|
+
className?: string;
|
|
115
|
+
isLoading?: boolean;
|
|
116
|
+
showSkeletonRows?: boolean;
|
|
117
|
+
checkboxSelection?: boolean;
|
|
118
|
+
checkboxPosition?: 'start' | 'end';
|
|
119
|
+
sorting?: SortingState;
|
|
120
|
+
onSortingChange?: (s: SortingState) => void;
|
|
121
|
+
onSelectionChange?: (selectedIds: string[]) => void;
|
|
122
|
+
enableRowSelection?: (row: Row<T>) => boolean;
|
|
123
|
+
onRefetch?: (pageIndex: number, pageSize: number) => void;
|
|
124
|
+
isMultiRowSelection?: boolean;
|
|
125
|
+
totalServerRows?: number;
|
|
126
|
+
paginationMode?: PaginationMode;
|
|
127
|
+
noRowsMessage?: string;
|
|
128
|
+
rowsPerPage?: number;
|
|
129
|
+
selectedRowIds?: string[];
|
|
130
|
+
tableActionsDropdown?: {
|
|
131
|
+
getOptions: (row: T) => DropdownOption[];
|
|
132
|
+
structure?: DropdownStructure;
|
|
133
|
+
renderCustomTrigger?: (row: T) => React.ReactNode;
|
|
134
|
+
menuAlignment?: 'start' | 'end' | 'center' | undefined;
|
|
135
|
+
isDisabled?: boolean | ((row: T) => boolean);
|
|
136
|
+
};
|
|
137
|
+
onRowClick?: (row: T) => void;
|
|
138
|
+
isRowClickable?: (row: T) => boolean;
|
|
139
|
+
showHeader?: boolean;
|
|
140
|
+
grouping?: string[];
|
|
141
|
+
isSearchActive?: boolean;
|
|
142
|
+
noSearchResultsMessage?: string;
|
|
143
|
+
infiniteScroll?: InfiniteScrollOptions;
|
|
144
|
+
virtualization?: VirtualizationOptions;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
declare function Table<T extends {
|
|
148
|
+
id: string;
|
|
149
|
+
}>(props: Readonly<TableProps<T>>): react_jsx_runtime.JSX.Element;
|
|
150
|
+
|
|
151
|
+
declare const TooltipProvider: React$1.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
152
|
+
declare const Tooltip: React$1.FC<TooltipPrimitive.TooltipProps>;
|
|
153
|
+
declare const TooltipTrigger: React$1.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
154
|
+
declare const TooltipContent: React$1.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
155
|
+
|
|
156
|
+
interface SelectTriggerProps extends ComponentProps<typeof SelectTrigger$1> {
|
|
157
|
+
error?: boolean;
|
|
158
|
+
size?: 'sm' | 'md';
|
|
159
|
+
}
|
|
160
|
+
interface SelectContentProps extends ComponentProps<typeof SelectContent$1> {
|
|
161
|
+
showAlwaysSearch?: boolean;
|
|
162
|
+
searchPlaceholder?: string;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
declare const Select: React$1.FC<SelectPrimitive.SelectProps>;
|
|
166
|
+
declare const SelectGroup: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
167
|
+
declare const SelectValue: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React$1.RefAttributes<HTMLSpanElement>>;
|
|
168
|
+
declare const SelectTrigger: React$1.ForwardRefExoticComponent<Omit<Omit<SelectPrimitive.SelectTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & SelectTriggerProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
169
|
+
declare const SelectScrollUpButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
170
|
+
declare const SelectScrollDownButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
171
|
+
declare const SelectContent: React$1.ForwardRefExoticComponent<Omit<Omit<SelectPrimitive.SelectContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & SelectContentProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
172
|
+
declare const SelectLabel: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
173
|
+
declare const SelectItem: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
174
|
+
declare const SelectSeparator: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
175
|
+
|
|
176
|
+
interface SelectWrapperOptions {
|
|
177
|
+
label: string;
|
|
178
|
+
value: string;
|
|
179
|
+
}
|
|
180
|
+
interface SelectWrapperProps {
|
|
181
|
+
label?: string;
|
|
182
|
+
options: SelectWrapperOptions[];
|
|
183
|
+
value: string;
|
|
184
|
+
onChange: (value: string) => void;
|
|
185
|
+
size?: 'small' | 'default';
|
|
186
|
+
disabled?: boolean;
|
|
187
|
+
error?: boolean;
|
|
188
|
+
placeholder?: string;
|
|
189
|
+
className?: string;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
declare const SelectWrapper: ({ label, options, value, onChange, size, disabled, error, placeholder, className, }: SelectWrapperProps) => react_jsx_runtime.JSX.Element;
|
|
193
|
+
|
|
194
|
+
declare const RadioGroup: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
195
|
+
declare const RadioGroupItem: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
196
|
+
|
|
197
|
+
interface CheckboxProps extends ComponentProps<typeof Checkbox$1> {
|
|
198
|
+
label?: string;
|
|
199
|
+
labelPosition?: 'left' | 'right' | 'top' | 'bottom';
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
declare const Checkbox: React$1.ForwardRefExoticComponent<Omit<Omit<CheckboxPrimitive.CheckboxProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & CheckboxProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
203
|
+
|
|
204
|
+
interface SwitchProps extends ComponentProps<typeof Switch$1> {
|
|
205
|
+
label?: string;
|
|
206
|
+
labelPosition?: 'left' | 'right' | 'top' | 'bottom';
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
declare const Switch: React$1.ForwardRefExoticComponent<Omit<Omit<SwitchPrimitives.SwitchProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & SwitchProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
210
|
+
|
|
211
|
+
declare const Label: React$1.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React$1.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_dist_types.ClassProp | undefined) => string> & React$1.RefAttributes<HTMLLabelElement>>;
|
|
212
|
+
|
|
213
|
+
declare const DropdownWrapper: ({ triggerElement, options, className, structure, selectedValue, onValueChange, menuAlignment, isTriggerElementDisabled, }: {
|
|
214
|
+
triggerElement: React__default.ReactNode;
|
|
215
|
+
options: DropdownOption[];
|
|
216
|
+
className?: string;
|
|
217
|
+
structure?: DropdownStructure;
|
|
218
|
+
selectedValue?: string;
|
|
219
|
+
onValueChange?: (value: string) => void;
|
|
220
|
+
menuAlignment?: "start" | "end" | "center";
|
|
221
|
+
isTriggerElementDisabled?: boolean;
|
|
222
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
223
|
+
|
|
224
|
+
declare function DropdownMenu({ ...props }: Readonly<React$1.ComponentProps<typeof DropdownMenuPrimitive.Root>>): react_jsx_runtime.JSX.Element;
|
|
225
|
+
declare function DropdownMenuPortal({ ...props }: Readonly<React$1.ComponentProps<typeof DropdownMenuPrimitive.Portal>>): react_jsx_runtime.JSX.Element;
|
|
226
|
+
declare function DropdownMenuTrigger({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
227
|
+
declare function DropdownMenuContent({ className, sideOffset, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
228
|
+
declare function DropdownMenuGroup({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Group>): react_jsx_runtime.JSX.Element;
|
|
229
|
+
declare function DropdownMenuItem({ className, inset, variant, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
230
|
+
inset?: boolean;
|
|
231
|
+
variant?: 'default' | 'destructive';
|
|
232
|
+
}): react_jsx_runtime.JSX.Element;
|
|
233
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): react_jsx_runtime.JSX.Element;
|
|
234
|
+
declare function DropdownMenuRadioGroup({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): react_jsx_runtime.JSX.Element;
|
|
235
|
+
declare function DropdownMenuRadioItem({ className, children, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): react_jsx_runtime.JSX.Element;
|
|
236
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
237
|
+
inset?: boolean;
|
|
238
|
+
}): react_jsx_runtime.JSX.Element;
|
|
239
|
+
declare function DropdownMenuSeparator({ className, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Separator>): react_jsx_runtime.JSX.Element;
|
|
240
|
+
declare function DropdownMenuShortcut({ className, ...props }: React$1.ComponentProps<'span'>): react_jsx_runtime.JSX.Element;
|
|
241
|
+
declare function DropdownMenuSub({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Sub>): react_jsx_runtime.JSX.Element;
|
|
242
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
243
|
+
inset?: boolean;
|
|
244
|
+
}): react_jsx_runtime.JSX.Element;
|
|
245
|
+
declare function DropdownMenuSubContent({ className, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): react_jsx_runtime.JSX.Element;
|
|
246
|
+
|
|
247
|
+
declare const Card: ({ className, ...props }: ComponentProps<"div">) => react_jsx_runtime.JSX.Element;
|
|
248
|
+
declare const CardHeader: ({ className, ...props }: ComponentProps<"div">) => react_jsx_runtime.JSX.Element;
|
|
249
|
+
declare const CardTitle: ({ className, ...props }: ComponentProps<"div">) => react_jsx_runtime.JSX.Element;
|
|
250
|
+
declare const CardDescription: ({ className, ...props }: ComponentProps<"div">) => react_jsx_runtime.JSX.Element;
|
|
251
|
+
declare const CardAction: ({ className, ...props }: ComponentProps<"div">) => react_jsx_runtime.JSX.Element;
|
|
252
|
+
declare const CardContent: ({ className, ...props }: ComponentProps<"div">) => react_jsx_runtime.JSX.Element;
|
|
253
|
+
declare const CardFooter: ({ className, ...props }: ComponentProps<"div">) => react_jsx_runtime.JSX.Element;
|
|
254
|
+
|
|
255
|
+
interface CardContainerProps {
|
|
256
|
+
title: string;
|
|
257
|
+
icon: ReactNode;
|
|
258
|
+
children: ReactNode;
|
|
259
|
+
className?: string;
|
|
260
|
+
}
|
|
261
|
+
declare const CardContainer: ({ title, icon, children, className }: CardContainerProps) => react_jsx_runtime.JSX.Element;
|
|
262
|
+
|
|
263
|
+
declare const alertVariants: (props?: ({
|
|
264
|
+
variant?: "success" | "warning" | "error" | "default" | null | undefined;
|
|
265
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
266
|
+
|
|
267
|
+
type AlertProps = React.ComponentProps<'div'> & VariantProps<typeof alertVariants> & {
|
|
268
|
+
onClose?: () => void;
|
|
269
|
+
isVisible?: boolean;
|
|
270
|
+
disableAnimation?: boolean;
|
|
271
|
+
position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
declare function Alert({ className, variant, onClose, isVisible, disableAnimation, position, ...props }: AlertProps): react_jsx_runtime.JSX.Element | null;
|
|
275
|
+
|
|
276
|
+
type AlertContainerProps = AlertProps & {
|
|
277
|
+
title?: string;
|
|
278
|
+
description?: string;
|
|
279
|
+
icon?: React.ReactNode;
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
declare const AlertContainer: ({ variant, isVisible, title, description, onClose, className, disableAnimation, position, icon, }: AlertContainerProps) => react_jsx_runtime.JSX.Element;
|
|
283
|
+
|
|
284
|
+
declare function Dialog({ ...props }: React$1.ComponentProps<typeof DialogPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
285
|
+
declare function DialogTrigger({ ...props }: React$1.ComponentProps<typeof DialogPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
286
|
+
declare function DialogPortal({ ...props }: React$1.ComponentProps<typeof DialogPrimitive.Portal>): react_jsx_runtime.JSX.Element;
|
|
287
|
+
declare function DialogClose({ ...props }: React$1.ComponentProps<typeof DialogPrimitive.Close>): react_jsx_runtime.JSX.Element;
|
|
288
|
+
declare function DialogOverlay({ className, ...props }: React$1.ComponentProps<typeof DialogPrimitive.Overlay>): react_jsx_runtime.JSX.Element;
|
|
289
|
+
declare function DialogContent({ className, children, showCloseButton, ...props }: React$1.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
290
|
+
showCloseButton?: boolean;
|
|
291
|
+
}): react_jsx_runtime.JSX.Element;
|
|
292
|
+
declare function DialogHeader({ className, ...props }: React$1.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
293
|
+
declare function DialogFooter({ className, ...props }: React$1.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
294
|
+
declare function DialogTitle({ className, ...props }: React$1.ComponentProps<typeof DialogPrimitive.Title>): react_jsx_runtime.JSX.Element;
|
|
295
|
+
declare function DialogDescription({ className, ...props }: React$1.ComponentProps<typeof DialogPrimitive.Description>): react_jsx_runtime.JSX.Element;
|
|
296
|
+
|
|
297
|
+
interface DialogContainerProps {
|
|
298
|
+
open?: boolean;
|
|
299
|
+
onOpenChange?: (open: boolean) => void;
|
|
300
|
+
triggerElement: React$1.ReactNode;
|
|
301
|
+
title: string;
|
|
302
|
+
description?: string;
|
|
303
|
+
children?: React$1.ReactNode;
|
|
304
|
+
submitLoader?: boolean;
|
|
305
|
+
submitLabel?: string;
|
|
306
|
+
cancelLabel?: string;
|
|
307
|
+
backLabel?: string;
|
|
308
|
+
onSubmit?: () => void;
|
|
309
|
+
onCancel?: () => void;
|
|
310
|
+
onBack?: () => void;
|
|
311
|
+
isSubmitDisabled?: boolean;
|
|
312
|
+
fullScreen?: boolean;
|
|
313
|
+
showCloseButton?: boolean;
|
|
314
|
+
showCancelButton?: boolean;
|
|
315
|
+
showSubmitButton?: boolean;
|
|
316
|
+
customFooter?: React$1.ReactNode;
|
|
317
|
+
}
|
|
318
|
+
declare function DialogContainer({ open, onOpenChange, triggerElement, title, description, children, submitLoader, submitLabel, cancelLabel, backLabel, onSubmit, onCancel, onBack, isSubmitDisabled, fullScreen, showCloseButton, showCancelButton, showSubmitButton, customFooter, }: Readonly<DialogContainerProps>): react_jsx_runtime.JSX.Element;
|
|
319
|
+
|
|
320
|
+
type Orientation = 'horizontal' | 'vertical';
|
|
321
|
+
interface DividerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
322
|
+
orientation?: Orientation;
|
|
323
|
+
color?: string;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
declare const Divider: React$1.FC<DividerProps>;
|
|
327
|
+
|
|
328
|
+
interface PillsProps {
|
|
329
|
+
label: string;
|
|
330
|
+
size?: 'default' | 'small';
|
|
331
|
+
variant?: 'filled' | 'outlined';
|
|
332
|
+
color?: 'primary' | 'secondary' | 'warning' | 'error' | 'info' | 'success';
|
|
333
|
+
onClick?: () => void;
|
|
334
|
+
disabled?: boolean;
|
|
335
|
+
className?: string;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
declare const Pills: ({ label, size, variant, color, onClick, disabled, className, }: PillsProps) => react_jsx_runtime.JSX.Element;
|
|
339
|
+
|
|
340
|
+
type EllipsisMode = 'end' | 'middle';
|
|
341
|
+
interface EllipsisTextProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
342
|
+
text: string;
|
|
343
|
+
maxLength?: number;
|
|
344
|
+
mode?: EllipsisMode;
|
|
345
|
+
width?: string;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
declare const EllipsisText: React$1.FC<EllipsisTextProps>;
|
|
349
|
+
|
|
350
|
+
declare const tabsTriggerVariants: (props?: ({
|
|
351
|
+
color?: "primary" | "secondary" | null | undefined;
|
|
352
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
353
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
354
|
+
|
|
355
|
+
type TabsTriggerProps = ComponentProps<typeof TabsPrimitive.Trigger> & VariantProps<typeof tabsTriggerVariants> & {
|
|
356
|
+
icon?: ReactNode;
|
|
357
|
+
iconPosition?: 'left' | 'right';
|
|
358
|
+
vertical?: boolean;
|
|
359
|
+
onClick?: () => void;
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
declare function Tabs({ className, ...props }: ComponentProps<typeof TabsPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
363
|
+
declare function TabsList({ className, vertical, ...props }: ComponentProps<typeof TabsPrimitive.List> & {
|
|
364
|
+
vertical?: boolean;
|
|
365
|
+
}): react_jsx_runtime.JSX.Element;
|
|
366
|
+
declare function TabsTrigger({ icon, iconPosition, vertical, color, className, children, ...props }: TabsTriggerProps): react_jsx_runtime.JSX.Element;
|
|
367
|
+
declare function TabsContent({ className, ...props }: ComponentProps<typeof TabsPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
368
|
+
|
|
369
|
+
declare function Avatar({ className, ...props }: React$1.ComponentProps<typeof AvatarPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
370
|
+
declare function AvatarImage({ className, ...props }: React$1.ComponentProps<typeof AvatarPrimitive.Image>): react_jsx_runtime.JSX.Element;
|
|
371
|
+
declare function AvatarFallback({ className, ...props }: React$1.ComponentProps<typeof AvatarPrimitive.Fallback>): react_jsx_runtime.JSX.Element;
|
|
372
|
+
|
|
373
|
+
interface SpinnerProps {
|
|
374
|
+
size?: number;
|
|
375
|
+
color?: string;
|
|
376
|
+
className?: string;
|
|
377
|
+
'aria-label'?: string;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
declare function Spinner({ size, color, className, 'aria-label': ariaLabel, }: SpinnerProps): react_jsx_runtime.JSX.Element;
|
|
381
|
+
|
|
382
|
+
interface UICreditCardProps {
|
|
383
|
+
cardholderName: string;
|
|
384
|
+
cardholderNameLabel?: string;
|
|
385
|
+
cardNumber: string;
|
|
386
|
+
cardNumberLabel?: string;
|
|
387
|
+
frontImageUrl: string;
|
|
388
|
+
backImageUrl: string;
|
|
389
|
+
cvv?: string;
|
|
390
|
+
cvvLabel?: string;
|
|
391
|
+
expiryDate?: string;
|
|
392
|
+
expiryDateLabel?: string;
|
|
393
|
+
aspectRatio?: number;
|
|
394
|
+
classNames?: {
|
|
395
|
+
container?: string;
|
|
396
|
+
front?: string;
|
|
397
|
+
back?: string;
|
|
398
|
+
fieldLabel?: string;
|
|
399
|
+
fieldValue?: string;
|
|
400
|
+
copyIcon?: string;
|
|
401
|
+
};
|
|
402
|
+
customFrontContent?: React.ReactNode;
|
|
403
|
+
customBackContent?: React.ReactNode;
|
|
404
|
+
isFlipped?: boolean;
|
|
405
|
+
enableCopy?: boolean;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
declare const UICreditCard: ({ cvv, cvvLabel, cardNumber, cardNumberLabel, expiryDate, expiryDateLabel, enableCopy, classNames, backImageUrl, frontImageUrl, cardholderName, cardholderNameLabel, isFlipped, customBackContent, customFrontContent, aspectRatio, }: UICreditCardProps) => JSX.Element;
|
|
409
|
+
|
|
410
|
+
interface CopyButtonProps {
|
|
411
|
+
value: string;
|
|
412
|
+
className?: string;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
declare const CopyButton: ({ value, className }: CopyButtonProps) => react_jsx_runtime.JSX.Element;
|
|
416
|
+
|
|
417
|
+
interface Step<T extends string = string, P = unknown> {
|
|
418
|
+
id: T;
|
|
419
|
+
label: string;
|
|
420
|
+
content: React.ReactNode | ((props: P & {
|
|
421
|
+
step: T;
|
|
422
|
+
}) => React.ReactNode);
|
|
423
|
+
}
|
|
424
|
+
interface StepperProps<T extends string, P = unknown> {
|
|
425
|
+
steps: Step<T, P>[];
|
|
426
|
+
currentStep: T;
|
|
427
|
+
onStepChange?: (step: T) => void;
|
|
428
|
+
contentProps?: P;
|
|
429
|
+
className?: string;
|
|
430
|
+
showIndicators?: boolean;
|
|
431
|
+
orientation?: 'horizontal' | 'vertical';
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
declare function Stepper<T extends string>({ steps, currentStep, onStepChange, contentProps, className, showIndicators, orientation, }: Readonly<StepperProps<T>>): react_jsx_runtime.JSX.Element;
|
|
435
|
+
|
|
436
|
+
declare function useStepper<T extends string>(steps: T[], initialStep?: T): {
|
|
437
|
+
currentStep: T;
|
|
438
|
+
currentIndex: number;
|
|
439
|
+
isFirst: boolean;
|
|
440
|
+
isLast: boolean;
|
|
441
|
+
goNext: () => void;
|
|
442
|
+
goBack: () => void;
|
|
443
|
+
goTo: (step: T) => void;
|
|
444
|
+
reset: () => void;
|
|
445
|
+
};
|
|
446
|
+
|
|
447
|
+
interface SkeletonProps {
|
|
448
|
+
variant?: 'text' | 'rectangular' | 'circular' | 'rounded';
|
|
449
|
+
width?: number | string;
|
|
450
|
+
height?: number | string;
|
|
451
|
+
animation?: 'pulse' | 'wave' | false;
|
|
452
|
+
className?: string;
|
|
453
|
+
style?: React.CSSProperties;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
declare function Skeleton({ variant, width, height, animation, className, style }: SkeletonProps): react_jsx_runtime.JSX.Element;
|
|
457
|
+
|
|
458
|
+
interface CounterProps {
|
|
459
|
+
to: number;
|
|
460
|
+
from?: number;
|
|
461
|
+
duration?: number;
|
|
462
|
+
autoStart?: boolean;
|
|
463
|
+
prefix?: string;
|
|
464
|
+
suffix?: string;
|
|
465
|
+
decimals?: number;
|
|
466
|
+
separator?: string;
|
|
467
|
+
className?: string;
|
|
468
|
+
style?: React.CSSProperties;
|
|
469
|
+
onComplete?: () => void;
|
|
470
|
+
triggerOnVisible?: boolean;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
declare function Counter({ to, from, duration, autoStart, prefix, suffix, decimals, separator, className, style, onComplete, triggerOnVisible, }: CounterProps): react_jsx_runtime.JSX.Element;
|
|
474
|
+
|
|
475
|
+
interface SearchInputProps {
|
|
476
|
+
onSearch: (query: string) => void;
|
|
477
|
+
onClear?: () => void;
|
|
478
|
+
debounce?: number;
|
|
479
|
+
minChars?: number;
|
|
480
|
+
maxChars?: number;
|
|
481
|
+
placeholder?: string;
|
|
482
|
+
clearIcon?: React.ReactNode;
|
|
483
|
+
className?: string;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
declare const SearchInput: React__default.FC<SearchInputProps>;
|
|
487
|
+
|
|
488
|
+
export { Alert, AlertContainer, type AlertContainerProps, type AlertProps, Avatar, AvatarFallback, AvatarImage, Button, Card, CardAction, CardContainer, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, type ColorVariant, CopyButton, type CopyButtonProps, Counter, type CounterProps, Dialog, DialogClose, DialogContainer, type DialogContainerProps, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Divider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DropdownWrapper, EllipsisText, type FlexColumnDef, type InfiniteScrollOptions, Input, type InputProps, Label, type PaginationMode, Pills, type PillsProps, RadioGroup, RadioGroupItem, SearchInput, type SearchInputProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectWrapper, type SelectWrapperOptions, type SelectWrapperProps, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, type Step, Stepper, type StepperProps, Switch, Table, type TableProps, Tabs, TabsContent, TabsList, TabsTrigger, type TabsTriggerProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UICreditCard, type UIKitColors, type UIKitConfig, UIKitProvider, type VirtualizationOptions, useStepper, useUIKitTheme };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,488 @@
|
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
import React__default, { PropsWithChildren, InputHTMLAttributes, ComponentProps, ReactNode, JSX } from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
5
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
+
import { ColumnDef, SortingState, Row } from '@tanstack/react-table';
|
|
7
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
8
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
9
|
+
import { SelectTrigger as SelectTrigger$1, SelectContent as SelectContent$1 } from '@radix-ui/react-select';
|
|
10
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
11
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
12
|
+
import { Checkbox as Checkbox$1 } from '@radix-ui/react-checkbox';
|
|
13
|
+
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
14
|
+
import { Switch as Switch$1 } from '@radix-ui/react-switch';
|
|
15
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
16
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
17
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
18
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
19
|
+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
20
|
+
|
|
21
|
+
type ColorVariant = string | {
|
|
22
|
+
light: string;
|
|
23
|
+
dark: string;
|
|
24
|
+
};
|
|
25
|
+
type UIKitColors = {
|
|
26
|
+
primary?: ColorVariant;
|
|
27
|
+
secondary?: ColorVariant;
|
|
28
|
+
accent?: ColorVariant;
|
|
29
|
+
success?: ColorVariant;
|
|
30
|
+
warning?: ColorVariant;
|
|
31
|
+
error?: ColorVariant;
|
|
32
|
+
info?: ColorVariant;
|
|
33
|
+
background?: ColorVariant;
|
|
34
|
+
foreground?: ColorVariant;
|
|
35
|
+
textPrimary?: ColorVariant;
|
|
36
|
+
textSecondary?: ColorVariant;
|
|
37
|
+
[key: string]: ColorVariant | undefined;
|
|
38
|
+
};
|
|
39
|
+
type UIKitConfig = {
|
|
40
|
+
colors?: UIKitColors;
|
|
41
|
+
radius?: string;
|
|
42
|
+
fontFamily?: string;
|
|
43
|
+
[key: string]: unknown;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
declare const UIKitProvider: React__default.FC<PropsWithChildren<{
|
|
47
|
+
config?: UIKitConfig;
|
|
48
|
+
}>>;
|
|
49
|
+
|
|
50
|
+
declare const useUIKitTheme: () => UIKitConfig;
|
|
51
|
+
|
|
52
|
+
declare const buttonVariants: (props?: ({
|
|
53
|
+
variant?: "primary" | "secondary" | "primaryFilled" | "primaryOutlined" | "primaryText" | "secondaryFilled" | "secondaryOutlined" | "secondaryText" | "outlined" | "ghost" | "destructive" | null | undefined;
|
|
54
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
55
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
56
|
+
|
|
57
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
58
|
+
children: React.ReactNode;
|
|
59
|
+
asChild?: boolean;
|
|
60
|
+
loading?: boolean;
|
|
61
|
+
loadingText?: string;
|
|
62
|
+
icon?: React.ReactNode;
|
|
63
|
+
iconPosition?: 'left' | 'right';
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
67
|
+
|
|
68
|
+
interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
69
|
+
label?: string;
|
|
70
|
+
error?: string;
|
|
71
|
+
helperText?: string;
|
|
72
|
+
icon?: React.ReactNode;
|
|
73
|
+
variant?: 'default' | 'search';
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
declare const Input: React__default.ForwardRefExoticComponent<InputProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
77
|
+
|
|
78
|
+
type DropdownStructure = 'default' | 'checkbox' | 'radio' | 'grouped' | 'submenu';
|
|
79
|
+
type DropdownOption = {
|
|
80
|
+
label: string;
|
|
81
|
+
value?: string;
|
|
82
|
+
checked?: boolean;
|
|
83
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
84
|
+
onClick?: () => void;
|
|
85
|
+
disabled?: boolean;
|
|
86
|
+
subOptions?: DropdownOption[];
|
|
87
|
+
groupLabel?: string;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
type FlexColumnDef<T> = ColumnDef<T> & {
|
|
91
|
+
flex?: number;
|
|
92
|
+
};
|
|
93
|
+
type InfiniteScrollOptions = {
|
|
94
|
+
enabled: boolean;
|
|
95
|
+
hasNextPage: boolean;
|
|
96
|
+
isFetchingNextPage?: boolean;
|
|
97
|
+
fetchNextPage: () => void;
|
|
98
|
+
rootMarginPx?: number;
|
|
99
|
+
loadingMoreMessage?: string;
|
|
100
|
+
noMoreDataMessage?: string;
|
|
101
|
+
};
|
|
102
|
+
type PaginationMode = 'client' | 'server' | 'none';
|
|
103
|
+
interface VirtualizationOptions {
|
|
104
|
+
enabled: boolean;
|
|
105
|
+
rowEstimate?: number;
|
|
106
|
+
overscan?: number;
|
|
107
|
+
}
|
|
108
|
+
interface TableProps<T> {
|
|
109
|
+
id: string;
|
|
110
|
+
height?: number | string;
|
|
111
|
+
data: T[];
|
|
112
|
+
columns: FlexColumnDef<T>[];
|
|
113
|
+
rowIdKey?: keyof T | 'id';
|
|
114
|
+
className?: string;
|
|
115
|
+
isLoading?: boolean;
|
|
116
|
+
showSkeletonRows?: boolean;
|
|
117
|
+
checkboxSelection?: boolean;
|
|
118
|
+
checkboxPosition?: 'start' | 'end';
|
|
119
|
+
sorting?: SortingState;
|
|
120
|
+
onSortingChange?: (s: SortingState) => void;
|
|
121
|
+
onSelectionChange?: (selectedIds: string[]) => void;
|
|
122
|
+
enableRowSelection?: (row: Row<T>) => boolean;
|
|
123
|
+
onRefetch?: (pageIndex: number, pageSize: number) => void;
|
|
124
|
+
isMultiRowSelection?: boolean;
|
|
125
|
+
totalServerRows?: number;
|
|
126
|
+
paginationMode?: PaginationMode;
|
|
127
|
+
noRowsMessage?: string;
|
|
128
|
+
rowsPerPage?: number;
|
|
129
|
+
selectedRowIds?: string[];
|
|
130
|
+
tableActionsDropdown?: {
|
|
131
|
+
getOptions: (row: T) => DropdownOption[];
|
|
132
|
+
structure?: DropdownStructure;
|
|
133
|
+
renderCustomTrigger?: (row: T) => React.ReactNode;
|
|
134
|
+
menuAlignment?: 'start' | 'end' | 'center' | undefined;
|
|
135
|
+
isDisabled?: boolean | ((row: T) => boolean);
|
|
136
|
+
};
|
|
137
|
+
onRowClick?: (row: T) => void;
|
|
138
|
+
isRowClickable?: (row: T) => boolean;
|
|
139
|
+
showHeader?: boolean;
|
|
140
|
+
grouping?: string[];
|
|
141
|
+
isSearchActive?: boolean;
|
|
142
|
+
noSearchResultsMessage?: string;
|
|
143
|
+
infiniteScroll?: InfiniteScrollOptions;
|
|
144
|
+
virtualization?: VirtualizationOptions;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
declare function Table<T extends {
|
|
148
|
+
id: string;
|
|
149
|
+
}>(props: Readonly<TableProps<T>>): react_jsx_runtime.JSX.Element;
|
|
150
|
+
|
|
151
|
+
declare const TooltipProvider: React$1.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
152
|
+
declare const Tooltip: React$1.FC<TooltipPrimitive.TooltipProps>;
|
|
153
|
+
declare const TooltipTrigger: React$1.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
154
|
+
declare const TooltipContent: React$1.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
155
|
+
|
|
156
|
+
interface SelectTriggerProps extends ComponentProps<typeof SelectTrigger$1> {
|
|
157
|
+
error?: boolean;
|
|
158
|
+
size?: 'sm' | 'md';
|
|
159
|
+
}
|
|
160
|
+
interface SelectContentProps extends ComponentProps<typeof SelectContent$1> {
|
|
161
|
+
showAlwaysSearch?: boolean;
|
|
162
|
+
searchPlaceholder?: string;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
declare const Select: React$1.FC<SelectPrimitive.SelectProps>;
|
|
166
|
+
declare const SelectGroup: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
167
|
+
declare const SelectValue: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React$1.RefAttributes<HTMLSpanElement>>;
|
|
168
|
+
declare const SelectTrigger: React$1.ForwardRefExoticComponent<Omit<Omit<SelectPrimitive.SelectTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & SelectTriggerProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
169
|
+
declare const SelectScrollUpButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
170
|
+
declare const SelectScrollDownButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
171
|
+
declare const SelectContent: React$1.ForwardRefExoticComponent<Omit<Omit<SelectPrimitive.SelectContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & SelectContentProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
172
|
+
declare const SelectLabel: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
173
|
+
declare const SelectItem: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
174
|
+
declare const SelectSeparator: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
175
|
+
|
|
176
|
+
interface SelectWrapperOptions {
|
|
177
|
+
label: string;
|
|
178
|
+
value: string;
|
|
179
|
+
}
|
|
180
|
+
interface SelectWrapperProps {
|
|
181
|
+
label?: string;
|
|
182
|
+
options: SelectWrapperOptions[];
|
|
183
|
+
value: string;
|
|
184
|
+
onChange: (value: string) => void;
|
|
185
|
+
size?: 'small' | 'default';
|
|
186
|
+
disabled?: boolean;
|
|
187
|
+
error?: boolean;
|
|
188
|
+
placeholder?: string;
|
|
189
|
+
className?: string;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
declare const SelectWrapper: ({ label, options, value, onChange, size, disabled, error, placeholder, className, }: SelectWrapperProps) => react_jsx_runtime.JSX.Element;
|
|
193
|
+
|
|
194
|
+
declare const RadioGroup: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
195
|
+
declare const RadioGroupItem: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
196
|
+
|
|
197
|
+
interface CheckboxProps extends ComponentProps<typeof Checkbox$1> {
|
|
198
|
+
label?: string;
|
|
199
|
+
labelPosition?: 'left' | 'right' | 'top' | 'bottom';
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
declare const Checkbox: React$1.ForwardRefExoticComponent<Omit<Omit<CheckboxPrimitive.CheckboxProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & CheckboxProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
203
|
+
|
|
204
|
+
interface SwitchProps extends ComponentProps<typeof Switch$1> {
|
|
205
|
+
label?: string;
|
|
206
|
+
labelPosition?: 'left' | 'right' | 'top' | 'bottom';
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
declare const Switch: React$1.ForwardRefExoticComponent<Omit<Omit<SwitchPrimitives.SwitchProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & SwitchProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
210
|
+
|
|
211
|
+
declare const Label: React$1.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React$1.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_dist_types.ClassProp | undefined) => string> & React$1.RefAttributes<HTMLLabelElement>>;
|
|
212
|
+
|
|
213
|
+
declare const DropdownWrapper: ({ triggerElement, options, className, structure, selectedValue, onValueChange, menuAlignment, isTriggerElementDisabled, }: {
|
|
214
|
+
triggerElement: React__default.ReactNode;
|
|
215
|
+
options: DropdownOption[];
|
|
216
|
+
className?: string;
|
|
217
|
+
structure?: DropdownStructure;
|
|
218
|
+
selectedValue?: string;
|
|
219
|
+
onValueChange?: (value: string) => void;
|
|
220
|
+
menuAlignment?: "start" | "end" | "center";
|
|
221
|
+
isTriggerElementDisabled?: boolean;
|
|
222
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
223
|
+
|
|
224
|
+
declare function DropdownMenu({ ...props }: Readonly<React$1.ComponentProps<typeof DropdownMenuPrimitive.Root>>): react_jsx_runtime.JSX.Element;
|
|
225
|
+
declare function DropdownMenuPortal({ ...props }: Readonly<React$1.ComponentProps<typeof DropdownMenuPrimitive.Portal>>): react_jsx_runtime.JSX.Element;
|
|
226
|
+
declare function DropdownMenuTrigger({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
227
|
+
declare function DropdownMenuContent({ className, sideOffset, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
228
|
+
declare function DropdownMenuGroup({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Group>): react_jsx_runtime.JSX.Element;
|
|
229
|
+
declare function DropdownMenuItem({ className, inset, variant, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
230
|
+
inset?: boolean;
|
|
231
|
+
variant?: 'default' | 'destructive';
|
|
232
|
+
}): react_jsx_runtime.JSX.Element;
|
|
233
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): react_jsx_runtime.JSX.Element;
|
|
234
|
+
declare function DropdownMenuRadioGroup({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): react_jsx_runtime.JSX.Element;
|
|
235
|
+
declare function DropdownMenuRadioItem({ className, children, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): react_jsx_runtime.JSX.Element;
|
|
236
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
237
|
+
inset?: boolean;
|
|
238
|
+
}): react_jsx_runtime.JSX.Element;
|
|
239
|
+
declare function DropdownMenuSeparator({ className, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Separator>): react_jsx_runtime.JSX.Element;
|
|
240
|
+
declare function DropdownMenuShortcut({ className, ...props }: React$1.ComponentProps<'span'>): react_jsx_runtime.JSX.Element;
|
|
241
|
+
declare function DropdownMenuSub({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Sub>): react_jsx_runtime.JSX.Element;
|
|
242
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
243
|
+
inset?: boolean;
|
|
244
|
+
}): react_jsx_runtime.JSX.Element;
|
|
245
|
+
declare function DropdownMenuSubContent({ className, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): react_jsx_runtime.JSX.Element;
|
|
246
|
+
|
|
247
|
+
declare const Card: ({ className, ...props }: ComponentProps<"div">) => react_jsx_runtime.JSX.Element;
|
|
248
|
+
declare const CardHeader: ({ className, ...props }: ComponentProps<"div">) => react_jsx_runtime.JSX.Element;
|
|
249
|
+
declare const CardTitle: ({ className, ...props }: ComponentProps<"div">) => react_jsx_runtime.JSX.Element;
|
|
250
|
+
declare const CardDescription: ({ className, ...props }: ComponentProps<"div">) => react_jsx_runtime.JSX.Element;
|
|
251
|
+
declare const CardAction: ({ className, ...props }: ComponentProps<"div">) => react_jsx_runtime.JSX.Element;
|
|
252
|
+
declare const CardContent: ({ className, ...props }: ComponentProps<"div">) => react_jsx_runtime.JSX.Element;
|
|
253
|
+
declare const CardFooter: ({ className, ...props }: ComponentProps<"div">) => react_jsx_runtime.JSX.Element;
|
|
254
|
+
|
|
255
|
+
interface CardContainerProps {
|
|
256
|
+
title: string;
|
|
257
|
+
icon: ReactNode;
|
|
258
|
+
children: ReactNode;
|
|
259
|
+
className?: string;
|
|
260
|
+
}
|
|
261
|
+
declare const CardContainer: ({ title, icon, children, className }: CardContainerProps) => react_jsx_runtime.JSX.Element;
|
|
262
|
+
|
|
263
|
+
declare const alertVariants: (props?: ({
|
|
264
|
+
variant?: "success" | "warning" | "error" | "default" | null | undefined;
|
|
265
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
266
|
+
|
|
267
|
+
type AlertProps = React.ComponentProps<'div'> & VariantProps<typeof alertVariants> & {
|
|
268
|
+
onClose?: () => void;
|
|
269
|
+
isVisible?: boolean;
|
|
270
|
+
disableAnimation?: boolean;
|
|
271
|
+
position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
declare function Alert({ className, variant, onClose, isVisible, disableAnimation, position, ...props }: AlertProps): react_jsx_runtime.JSX.Element | null;
|
|
275
|
+
|
|
276
|
+
type AlertContainerProps = AlertProps & {
|
|
277
|
+
title?: string;
|
|
278
|
+
description?: string;
|
|
279
|
+
icon?: React.ReactNode;
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
declare const AlertContainer: ({ variant, isVisible, title, description, onClose, className, disableAnimation, position, icon, }: AlertContainerProps) => react_jsx_runtime.JSX.Element;
|
|
283
|
+
|
|
284
|
+
declare function Dialog({ ...props }: React$1.ComponentProps<typeof DialogPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
285
|
+
declare function DialogTrigger({ ...props }: React$1.ComponentProps<typeof DialogPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
286
|
+
declare function DialogPortal({ ...props }: React$1.ComponentProps<typeof DialogPrimitive.Portal>): react_jsx_runtime.JSX.Element;
|
|
287
|
+
declare function DialogClose({ ...props }: React$1.ComponentProps<typeof DialogPrimitive.Close>): react_jsx_runtime.JSX.Element;
|
|
288
|
+
declare function DialogOverlay({ className, ...props }: React$1.ComponentProps<typeof DialogPrimitive.Overlay>): react_jsx_runtime.JSX.Element;
|
|
289
|
+
declare function DialogContent({ className, children, showCloseButton, ...props }: React$1.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
290
|
+
showCloseButton?: boolean;
|
|
291
|
+
}): react_jsx_runtime.JSX.Element;
|
|
292
|
+
declare function DialogHeader({ className, ...props }: React$1.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
293
|
+
declare function DialogFooter({ className, ...props }: React$1.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
294
|
+
declare function DialogTitle({ className, ...props }: React$1.ComponentProps<typeof DialogPrimitive.Title>): react_jsx_runtime.JSX.Element;
|
|
295
|
+
declare function DialogDescription({ className, ...props }: React$1.ComponentProps<typeof DialogPrimitive.Description>): react_jsx_runtime.JSX.Element;
|
|
296
|
+
|
|
297
|
+
interface DialogContainerProps {
|
|
298
|
+
open?: boolean;
|
|
299
|
+
onOpenChange?: (open: boolean) => void;
|
|
300
|
+
triggerElement: React$1.ReactNode;
|
|
301
|
+
title: string;
|
|
302
|
+
description?: string;
|
|
303
|
+
children?: React$1.ReactNode;
|
|
304
|
+
submitLoader?: boolean;
|
|
305
|
+
submitLabel?: string;
|
|
306
|
+
cancelLabel?: string;
|
|
307
|
+
backLabel?: string;
|
|
308
|
+
onSubmit?: () => void;
|
|
309
|
+
onCancel?: () => void;
|
|
310
|
+
onBack?: () => void;
|
|
311
|
+
isSubmitDisabled?: boolean;
|
|
312
|
+
fullScreen?: boolean;
|
|
313
|
+
showCloseButton?: boolean;
|
|
314
|
+
showCancelButton?: boolean;
|
|
315
|
+
showSubmitButton?: boolean;
|
|
316
|
+
customFooter?: React$1.ReactNode;
|
|
317
|
+
}
|
|
318
|
+
declare function DialogContainer({ open, onOpenChange, triggerElement, title, description, children, submitLoader, submitLabel, cancelLabel, backLabel, onSubmit, onCancel, onBack, isSubmitDisabled, fullScreen, showCloseButton, showCancelButton, showSubmitButton, customFooter, }: Readonly<DialogContainerProps>): react_jsx_runtime.JSX.Element;
|
|
319
|
+
|
|
320
|
+
type Orientation = 'horizontal' | 'vertical';
|
|
321
|
+
interface DividerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
322
|
+
orientation?: Orientation;
|
|
323
|
+
color?: string;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
declare const Divider: React$1.FC<DividerProps>;
|
|
327
|
+
|
|
328
|
+
interface PillsProps {
|
|
329
|
+
label: string;
|
|
330
|
+
size?: 'default' | 'small';
|
|
331
|
+
variant?: 'filled' | 'outlined';
|
|
332
|
+
color?: 'primary' | 'secondary' | 'warning' | 'error' | 'info' | 'success';
|
|
333
|
+
onClick?: () => void;
|
|
334
|
+
disabled?: boolean;
|
|
335
|
+
className?: string;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
declare const Pills: ({ label, size, variant, color, onClick, disabled, className, }: PillsProps) => react_jsx_runtime.JSX.Element;
|
|
339
|
+
|
|
340
|
+
type EllipsisMode = 'end' | 'middle';
|
|
341
|
+
interface EllipsisTextProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
342
|
+
text: string;
|
|
343
|
+
maxLength?: number;
|
|
344
|
+
mode?: EllipsisMode;
|
|
345
|
+
width?: string;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
declare const EllipsisText: React$1.FC<EllipsisTextProps>;
|
|
349
|
+
|
|
350
|
+
declare const tabsTriggerVariants: (props?: ({
|
|
351
|
+
color?: "primary" | "secondary" | null | undefined;
|
|
352
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
353
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
354
|
+
|
|
355
|
+
type TabsTriggerProps = ComponentProps<typeof TabsPrimitive.Trigger> & VariantProps<typeof tabsTriggerVariants> & {
|
|
356
|
+
icon?: ReactNode;
|
|
357
|
+
iconPosition?: 'left' | 'right';
|
|
358
|
+
vertical?: boolean;
|
|
359
|
+
onClick?: () => void;
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
declare function Tabs({ className, ...props }: ComponentProps<typeof TabsPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
363
|
+
declare function TabsList({ className, vertical, ...props }: ComponentProps<typeof TabsPrimitive.List> & {
|
|
364
|
+
vertical?: boolean;
|
|
365
|
+
}): react_jsx_runtime.JSX.Element;
|
|
366
|
+
declare function TabsTrigger({ icon, iconPosition, vertical, color, className, children, ...props }: TabsTriggerProps): react_jsx_runtime.JSX.Element;
|
|
367
|
+
declare function TabsContent({ className, ...props }: ComponentProps<typeof TabsPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
368
|
+
|
|
369
|
+
declare function Avatar({ className, ...props }: React$1.ComponentProps<typeof AvatarPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
370
|
+
declare function AvatarImage({ className, ...props }: React$1.ComponentProps<typeof AvatarPrimitive.Image>): react_jsx_runtime.JSX.Element;
|
|
371
|
+
declare function AvatarFallback({ className, ...props }: React$1.ComponentProps<typeof AvatarPrimitive.Fallback>): react_jsx_runtime.JSX.Element;
|
|
372
|
+
|
|
373
|
+
interface SpinnerProps {
|
|
374
|
+
size?: number;
|
|
375
|
+
color?: string;
|
|
376
|
+
className?: string;
|
|
377
|
+
'aria-label'?: string;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
declare function Spinner({ size, color, className, 'aria-label': ariaLabel, }: SpinnerProps): react_jsx_runtime.JSX.Element;
|
|
381
|
+
|
|
382
|
+
interface UICreditCardProps {
|
|
383
|
+
cardholderName: string;
|
|
384
|
+
cardholderNameLabel?: string;
|
|
385
|
+
cardNumber: string;
|
|
386
|
+
cardNumberLabel?: string;
|
|
387
|
+
frontImageUrl: string;
|
|
388
|
+
backImageUrl: string;
|
|
389
|
+
cvv?: string;
|
|
390
|
+
cvvLabel?: string;
|
|
391
|
+
expiryDate?: string;
|
|
392
|
+
expiryDateLabel?: string;
|
|
393
|
+
aspectRatio?: number;
|
|
394
|
+
classNames?: {
|
|
395
|
+
container?: string;
|
|
396
|
+
front?: string;
|
|
397
|
+
back?: string;
|
|
398
|
+
fieldLabel?: string;
|
|
399
|
+
fieldValue?: string;
|
|
400
|
+
copyIcon?: string;
|
|
401
|
+
};
|
|
402
|
+
customFrontContent?: React.ReactNode;
|
|
403
|
+
customBackContent?: React.ReactNode;
|
|
404
|
+
isFlipped?: boolean;
|
|
405
|
+
enableCopy?: boolean;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
declare const UICreditCard: ({ cvv, cvvLabel, cardNumber, cardNumberLabel, expiryDate, expiryDateLabel, enableCopy, classNames, backImageUrl, frontImageUrl, cardholderName, cardholderNameLabel, isFlipped, customBackContent, customFrontContent, aspectRatio, }: UICreditCardProps) => JSX.Element;
|
|
409
|
+
|
|
410
|
+
interface CopyButtonProps {
|
|
411
|
+
value: string;
|
|
412
|
+
className?: string;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
declare const CopyButton: ({ value, className }: CopyButtonProps) => react_jsx_runtime.JSX.Element;
|
|
416
|
+
|
|
417
|
+
interface Step<T extends string = string, P = unknown> {
|
|
418
|
+
id: T;
|
|
419
|
+
label: string;
|
|
420
|
+
content: React.ReactNode | ((props: P & {
|
|
421
|
+
step: T;
|
|
422
|
+
}) => React.ReactNode);
|
|
423
|
+
}
|
|
424
|
+
interface StepperProps<T extends string, P = unknown> {
|
|
425
|
+
steps: Step<T, P>[];
|
|
426
|
+
currentStep: T;
|
|
427
|
+
onStepChange?: (step: T) => void;
|
|
428
|
+
contentProps?: P;
|
|
429
|
+
className?: string;
|
|
430
|
+
showIndicators?: boolean;
|
|
431
|
+
orientation?: 'horizontal' | 'vertical';
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
declare function Stepper<T extends string>({ steps, currentStep, onStepChange, contentProps, className, showIndicators, orientation, }: Readonly<StepperProps<T>>): react_jsx_runtime.JSX.Element;
|
|
435
|
+
|
|
436
|
+
declare function useStepper<T extends string>(steps: T[], initialStep?: T): {
|
|
437
|
+
currentStep: T;
|
|
438
|
+
currentIndex: number;
|
|
439
|
+
isFirst: boolean;
|
|
440
|
+
isLast: boolean;
|
|
441
|
+
goNext: () => void;
|
|
442
|
+
goBack: () => void;
|
|
443
|
+
goTo: (step: T) => void;
|
|
444
|
+
reset: () => void;
|
|
445
|
+
};
|
|
446
|
+
|
|
447
|
+
interface SkeletonProps {
|
|
448
|
+
variant?: 'text' | 'rectangular' | 'circular' | 'rounded';
|
|
449
|
+
width?: number | string;
|
|
450
|
+
height?: number | string;
|
|
451
|
+
animation?: 'pulse' | 'wave' | false;
|
|
452
|
+
className?: string;
|
|
453
|
+
style?: React.CSSProperties;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
declare function Skeleton({ variant, width, height, animation, className, style }: SkeletonProps): react_jsx_runtime.JSX.Element;
|
|
457
|
+
|
|
458
|
+
interface CounterProps {
|
|
459
|
+
to: number;
|
|
460
|
+
from?: number;
|
|
461
|
+
duration?: number;
|
|
462
|
+
autoStart?: boolean;
|
|
463
|
+
prefix?: string;
|
|
464
|
+
suffix?: string;
|
|
465
|
+
decimals?: number;
|
|
466
|
+
separator?: string;
|
|
467
|
+
className?: string;
|
|
468
|
+
style?: React.CSSProperties;
|
|
469
|
+
onComplete?: () => void;
|
|
470
|
+
triggerOnVisible?: boolean;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
declare function Counter({ to, from, duration, autoStart, prefix, suffix, decimals, separator, className, style, onComplete, triggerOnVisible, }: CounterProps): react_jsx_runtime.JSX.Element;
|
|
474
|
+
|
|
475
|
+
interface SearchInputProps {
|
|
476
|
+
onSearch: (query: string) => void;
|
|
477
|
+
onClear?: () => void;
|
|
478
|
+
debounce?: number;
|
|
479
|
+
minChars?: number;
|
|
480
|
+
maxChars?: number;
|
|
481
|
+
placeholder?: string;
|
|
482
|
+
clearIcon?: React.ReactNode;
|
|
483
|
+
className?: string;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
declare const SearchInput: React__default.FC<SearchInputProps>;
|
|
487
|
+
|
|
488
|
+
export { Alert, AlertContainer, type AlertContainerProps, type AlertProps, Avatar, AvatarFallback, AvatarImage, Button, Card, CardAction, CardContainer, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, type ColorVariant, CopyButton, type CopyButtonProps, Counter, type CounterProps, Dialog, DialogClose, DialogContainer, type DialogContainerProps, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Divider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DropdownWrapper, EllipsisText, type FlexColumnDef, type InfiniteScrollOptions, Input, type InputProps, Label, type PaginationMode, Pills, type PillsProps, RadioGroup, RadioGroupItem, SearchInput, type SearchInputProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectWrapper, type SelectWrapperOptions, type SelectWrapperProps, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, type Step, Stepper, type StepperProps, Switch, Table, type TableProps, Tabs, TabsContent, TabsList, TabsTrigger, type TabsTriggerProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UICreditCard, type UIKitColors, type UIKitConfig, UIKitProvider, type VirtualizationOptions, useStepper, useUIKitTheme };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BaseTable } from './BaseTable';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BaseTable } from './BaseTable';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { PaginationControlsProps } from './Pagination.types';
|
|
2
|
-
export declare const PaginationFooter: ({ tableId, pageIndex, pageSize, totalRows, canNextPage, canPrevPage, onNextPage, onPrevPage, onPageSizeChange, }: PaginationControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const PaginationFooter: ({ tableId, pageIndex, pageSize, totalRows, canNextPage, canPrevPage, onNextPage, onPrevPage, onPageSizeChange, showPageSizeSelector, }: PaginationControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,8 +3,8 @@ import { FaChevronLeft, FaChevronRight } from 'react-icons/fa6';
|
|
|
3
3
|
import { PageSizeSelector } from './PageSizeSelector';
|
|
4
4
|
import { Button } from '../../Button';
|
|
5
5
|
import { cn } from '../../../lib/utils';
|
|
6
|
-
export const PaginationFooter = ({ tableId, pageIndex, pageSize, totalRows, canNextPage, canPrevPage, onNextPage, onPrevPage, onPageSizeChange, }) => {
|
|
6
|
+
export const PaginationFooter = ({ tableId, pageIndex, pageSize, totalRows, canNextPage, canPrevPage, onNextPage, onPrevPage, onPageSizeChange, showPageSizeSelector = true, }) => {
|
|
7
7
|
const startRow = totalRows === 0 ? 0 : pageIndex * pageSize + 1;
|
|
8
8
|
const endRow = totalRows === 0 ? 0 : Math.min((pageIndex + 1) * pageSize, totalRows);
|
|
9
|
-
return (_jsxs("div", { className: "flex justify-end items-center gap-6 px-4 py-2 text-xs text-(--uikit-textSecondary) w-full", children: [_jsx(PageSizeSelector, { id: tableId, value: String(pageSize), onChange: (val) => onPageSizeChange(Number(val)), size: "small", label: "Rows per page" }), totalRows > 0 && _jsx("div", { id: `page-indicator-${tableId}`, children: `${startRow} - ${endRow} of ${totalRows}` }), totalRows > 0 && (_jsxs("div", { className: "flex gap-2", id: `pagination-controls-${tableId}`, children: [_jsx(Button, { variant: "ghost", size: "icon", "aria-label": "Previous page", onClick: onPrevPage, disabled: !canPrevPage, className: cn({ '!bg-transparent': !canPrevPage }), children: _jsx(FaChevronLeft, { className: "!w-3 !h-3" }) }), _jsx(Button, { variant: "ghost", size: "icon", "aria-label": "Next page", onClick: onNextPage, disabled: !canNextPage, className: cn({ '!bg-transparent': !canNextPage }), children: _jsx(FaChevronRight, { className: "!w-3 !h-3" }) })] }))] }));
|
|
9
|
+
return (_jsxs("div", { className: "flex justify-end items-center gap-6 px-4 py-2 text-xs text-(--uikit-textSecondary) w-full", children: [showPageSizeSelector && (_jsx(PageSizeSelector, { id: tableId, value: String(pageSize), onChange: (val) => onPageSizeChange(Number(val)), size: "small", label: "Rows per page" })), totalRows > 0 && _jsx("div", { id: `page-indicator-${tableId}`, children: `${startRow} - ${endRow} of ${totalRows}` }), totalRows > 0 && (_jsxs("div", { className: "flex gap-2", id: `pagination-controls-${tableId}`, children: [_jsx(Button, { variant: "ghost", size: "icon", "aria-label": "Previous page", onClick: onPrevPage, disabled: !canPrevPage, className: cn({ '!bg-transparent': !canPrevPage }), children: _jsx(FaChevronLeft, { className: "!w-3 !h-3" }) }), _jsx(Button, { variant: "ghost", size: "icon", "aria-label": "Next page", onClick: onNextPage, disabled: !canNextPage, className: cn({ '!bg-transparent': !canNextPage }), children: _jsx(FaChevronRight, { className: "!w-3 !h-3" }) })] }))] }));
|
|
10
10
|
};
|
|
@@ -46,5 +46,5 @@ export function StandardTable(props) {
|
|
|
46
46
|
customNoRows: props.customNoRows,
|
|
47
47
|
accordion: enableAccordion,
|
|
48
48
|
showGroupedTotal: props.showGroupedTotal,
|
|
49
|
-
}), footer: props.paginationMode === 'client' || props.paginationMode === 'server' ? (_jsx(PaginationFooter, { tableId: props.id, pageIndex: pagination.pageIndex, pageSize: pagination.pageSize, totalRows: totalRows, canNextPage: pagination.canNextPage, canPrevPage: pagination.canPrevPage, onNextPage: pagination.onNextPage, onPrevPage: pagination.onPrevPage, onPageSizeChange: pagination.setPageSize })) : null }) }));
|
|
49
|
+
}), footer: props.paginationMode === 'client' || props.paginationMode === 'server' ? (_jsx(PaginationFooter, { tableId: props.id, pageIndex: pagination.pageIndex, pageSize: pagination.pageSize, totalRows: totalRows, canNextPage: pagination.canNextPage, canPrevPage: pagination.canPrevPage, onNextPage: pagination.onNextPage, onPrevPage: pagination.onPrevPage, onPageSizeChange: pagination.setPageSize, showPageSizeSelector: props.showPageSizeSelector })) : null }) }));
|
|
50
50
|
}
|
|
@@ -15,6 +15,7 @@ export declare const EmptyState: Story;
|
|
|
15
15
|
export declare const EmptyStateWithIcon: Story;
|
|
16
16
|
export declare const Loading: Story;
|
|
17
17
|
export declare const ClientPagination: Story;
|
|
18
|
+
export declare const HiddenPageSizeSelector: Story;
|
|
18
19
|
export declare const ServerPagination: Story;
|
|
19
20
|
export declare const RowClick: Story;
|
|
20
21
|
export declare const ControlledSorting: Story;
|
|
@@ -68,6 +68,9 @@ export const Loading = {
|
|
|
68
68
|
export const ClientPagination = {
|
|
69
69
|
render: () => (_jsx(StandardTable, { id: "client-pagination", data: data, columns: columns, paginationMode: "client", rowsPerPage: 5 })),
|
|
70
70
|
};
|
|
71
|
+
export const HiddenPageSizeSelector = {
|
|
72
|
+
render: () => (_jsx(StandardTable, { id: "hidden-page-size", data: data, columns: columns, paginationMode: "client", rowsPerPage: 5, showPageSizeSelector: false })),
|
|
73
|
+
};
|
|
71
74
|
function ServerPaginationExample() {
|
|
72
75
|
const [rows, setRows] = useState([]);
|
|
73
76
|
const [isLoading, setIsLoading] = useState(false);
|
|
@@ -59,7 +59,7 @@ export function Table(props) {
|
|
|
59
59
|
const paddingBottom = Math.max(totalSize - end, 0);
|
|
60
60
|
const tableRows = table.getRowModel().rows;
|
|
61
61
|
const isTrulyEmpty = tableRows.length === 0 && !props.isLoading && !hasNextPage;
|
|
62
|
-
return (_jsxs("div", { ref: parentScrollRef, style: { height }, className: "relative w-full overflow-auto", children: [props.isLoading &&
|
|
62
|
+
return (_jsxs("div", { ref: parentScrollRef, style: { height }, className: "relative w-full overflow-auto", children: [props.isLoading && _jsx("div", { className: "mui-loader mt-4" }), _jsx("div", { className: "rounded-t-(--uikit-radius) overflow-y-hidden overflow-x-auto", children: _jsxs("table", { className: classNames('min-w-full text-sm table-fixed bg-[#ffffff]', props.className), role: "table", id: props.id, children: [showHeader && (_jsx("thead", { className: "bg-(--uikit-tertiary)", children: table.getHeaderGroups().map((headerGroup) => (_jsxs("tr", { className: "p-4", children: [headerGroup.headers.map((header) => {
|
|
63
63
|
return (_jsx("th", { scope: "col", style: { width: header.getSize() }, className: classNames('select-none text-[14px] font-bold ', header.id === 'select' ? 'p-0' : ' p-4 text-left cursor-pointer'), onClick: !(infiniteScroll === null || infiniteScroll === void 0 ? void 0 : infiniteScroll.enabled) && header.column.getCanSort()
|
|
64
64
|
? header.column.getToggleSortingHandler()
|
|
65
65
|
: undefined, children: _jsxs("div", { className: classNames('w-full h-full', header.id === 'select'
|
|
@@ -35,12 +35,14 @@ export type VirtualizationOptions = {
|
|
|
35
35
|
export type ClientPaginationProps = {
|
|
36
36
|
paginationMode?: 'client' | 'none';
|
|
37
37
|
rowsPerPage?: number;
|
|
38
|
+
showPageSizeSelector?: boolean;
|
|
38
39
|
onRefetch?: never;
|
|
39
40
|
totalServerRows?: never;
|
|
40
41
|
};
|
|
41
42
|
export type ServerPaginationProps = {
|
|
42
43
|
paginationMode: 'server';
|
|
43
44
|
rowsPerPage?: number;
|
|
45
|
+
showPageSizeSelector?: boolean;
|
|
44
46
|
onRefetch: (pageIndex: number, pageSize: number) => void;
|
|
45
47
|
totalServerRows: number;
|
|
46
48
|
};
|
|
@@ -12,7 +12,7 @@ export const Default = {
|
|
|
12
12
|
render: () => (_jsx(TooltipStoryWrapper, { content: "Simple tooltip", children: _jsx(Button, { children: "Hover me" }) })),
|
|
13
13
|
};
|
|
14
14
|
export const LongTextResponsive = {
|
|
15
|
-
render: () => (_jsx(TooltipStoryWrapper, { content: "This tooltip contains a longer message that wraps gracefully across multiple lines. On smaller\
|
|
15
|
+
render: () => (_jsx(TooltipStoryWrapper, { content: "This tooltip contains a longer message that wraps gracefully across multiple lines. On smaller\n\t\tscreens, it narrows and stacks vertically so it's easier to read\u2014especially useful for\n\t\taccessibility, mobile devices, or multi-language support.", side: "top", children: _jsx(Button, { children: "Hover me" }) })),
|
|
16
16
|
};
|
|
17
17
|
export const OnDifferentSides = {
|
|
18
18
|
render: () => (_jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsx(TooltipStoryWrapper, { content: "Top tooltip", side: "top", children: _jsx(Button, { children: "Top" }) }), _jsx(TooltipStoryWrapper, { content: "Bottom tooltip", side: "bottom", children: _jsx(Button, { children: "Bottom" }) }), _jsx(TooltipStoryWrapper, { content: "Left tooltip", side: "left", children: _jsx(Button, { children: "Left" }) }), _jsx(TooltipStoryWrapper, { content: "Right tooltip", side: "right", children: _jsx(Button, { children: "Right" }) })] })),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eml-payments/ui-kit",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "ARLO UIKit",
|
|
6
6
|
"homepage": "https://github.com/EML-Payments/arlo.npm.uikit#readme",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"lint-staged": "^16.1.2",
|
|
110
110
|
"postcss": "^8.4.21",
|
|
111
111
|
"storybook": "^10.0.6",
|
|
112
|
-
"typescript": "^
|
|
112
|
+
"typescript": "^6.0.3",
|
|
113
113
|
"typescript-eslint": "^8.36.0"
|
|
114
114
|
},
|
|
115
115
|
"peerDependencies": {
|