smartsell-ui-kit 0.0.6 → 0.1.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/LICENSE +16 -15
- package/README.md +170 -84
- package/dist/img/index.cjs +373 -0
- package/dist/img/index.cjs.map +1 -0
- package/dist/img/index.d.cts +170 -0
- package/dist/img/index.d.ts +170 -0
- package/dist/img/index.js +328 -0
- package/dist/img/index.js.map +1 -0
- package/dist/index.cjs +4608 -1201
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +306 -25
- package/dist/index.d.ts +306 -25
- package/dist/index.js +4952 -1094
- package/dist/index.js.map +1 -1
- package/dist/types.cjs +19 -0
- package/dist/types.cjs.map +1 -0
- package/dist/types.d.cts +4 -0
- package/dist/types.d.ts +4 -0
- package/dist/types.js +1 -0
- package/package.json +30 -19
- package/dist/chunk-UIFTQDYM.js +0 -460
- package/dist/chunk-UIFTQDYM.js.map +0 -1
- package/dist/modal-CS9SuYSC.d.cts +0 -97
- package/dist/modal-CS9SuYSC.d.ts +0 -97
- package/dist/modal.cjs +0 -486
- package/dist/modal.cjs.map +0 -1
- package/dist/modal.d.cts +0 -4
- package/dist/modal.d.ts +0 -4
- package/dist/modal.js +0 -7
- /package/dist/{modal.js.map → types.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,31 +1,66 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ButtonHTMLAttributes, ReactNode, HTMLAttributes, InputHTMLAttributes, SelectHTMLAttributes, TextareaHTMLAttributes } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
export { L as LegacyModalAction, a as LegacyModalCompatProps, b as LegacyModalProps, M as Modal, c as ModalAction, d as ModalProps, e as ModalTheme, f as ModalThemeSource, S as StandardModalProps, U as UiKitThemeTokens, u as useUiKitTheme } from './modal-CS9SuYSC.cjs';
|
|
2
|
+
import { ButtonHTMLAttributes, ReactNode, HTMLAttributes, CSSProperties, InputHTMLAttributes, SelectHTMLAttributes, TextareaHTMLAttributes } from 'react';
|
|
3
|
+
import { SmartSellTheme, ThemeColors } from 'smartsell-theme';
|
|
5
4
|
|
|
6
|
-
type ControlSize
|
|
5
|
+
type ControlSize = 'sm' | 'md' | 'lg';
|
|
6
|
+
|
|
7
|
+
declare const UI_KIT_THEME_COLOR_NAMES: readonly ["primary", "primaryLight", "primaryDark", "shadow", "secondary", "background", "surface", "text", "textLight", "positive", "negative", "warning", "info", "onPrimary", "onSecondary"];
|
|
8
|
+
type UiKitThemeColorName = (typeof UI_KIT_THEME_COLOR_NAMES)[number];
|
|
9
|
+
type UiKitThemeColors = {
|
|
10
|
+
[key in UiKitThemeColorName]: ThemeColors[key];
|
|
11
|
+
};
|
|
12
|
+
interface UiKitTheme extends Omit<SmartSellTheme, 'title' | 'colors' | 'color'> {
|
|
13
|
+
title: SmartSellTheme['title'];
|
|
14
|
+
colors: UiKitThemeColors;
|
|
15
|
+
color: UiKitThemeColors;
|
|
16
|
+
}
|
|
17
|
+
interface UiKitThemeTokens {
|
|
18
|
+
theme: UiKitTheme;
|
|
19
|
+
borderSoft: string;
|
|
20
|
+
borderStrong: string;
|
|
21
|
+
surfaceMuted: string;
|
|
22
|
+
surfaceRaised: string;
|
|
23
|
+
overlay: string;
|
|
24
|
+
focusRing: string;
|
|
25
|
+
mutedText: string;
|
|
26
|
+
}
|
|
27
|
+
declare function useUiKitTheme(): UiKitThemeTokens;
|
|
7
28
|
|
|
8
29
|
type ButtonVariant = 'solid' | 'outline' | 'ghost';
|
|
9
|
-
type ButtonSize = ControlSize
|
|
30
|
+
type ButtonSize = ControlSize;
|
|
10
31
|
interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'dangerouslySetInnerHTML'> {
|
|
11
|
-
sdk: SmartSellSDK;
|
|
12
32
|
variant?: ButtonVariant;
|
|
13
33
|
size?: ButtonSize;
|
|
14
|
-
fullWidth?: boolean;
|
|
15
34
|
leadingIcon?: ReactNode;
|
|
16
35
|
trailingIcon?: ReactNode;
|
|
17
36
|
}
|
|
18
|
-
declare function Button({
|
|
37
|
+
declare function Button({ variant, size, leadingIcon, trailingIcon, children, disabled, style, type, onMouseEnter, onMouseLeave, onMouseDown, onMouseUp, onBlur, onKeyDown, onKeyUp, onTouchStart, onTouchEnd, onTouchCancel, ...rest }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
19
38
|
|
|
20
39
|
interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'dangerouslySetInnerHTML' | 'title'> {
|
|
21
|
-
sdk: SmartSellSDK;
|
|
22
40
|
children: ReactNode;
|
|
23
41
|
eyebrow?: ReactNode;
|
|
24
42
|
title?: ReactNode;
|
|
25
43
|
action?: ReactNode;
|
|
26
44
|
padded?: boolean;
|
|
27
45
|
}
|
|
28
|
-
declare function Card({
|
|
46
|
+
declare function Card({ children, eyebrow, title, action, padded, style, ...rest }: CardProps): react_jsx_runtime.JSX.Element;
|
|
47
|
+
|
|
48
|
+
interface CardSmallProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'dangerouslySetInnerHTML' | 'title' | 'color'> {
|
|
49
|
+
title?: ReactNode;
|
|
50
|
+
value?: ReactNode;
|
|
51
|
+
icon?: ReactNode;
|
|
52
|
+
color?: CSSProperties['color'];
|
|
53
|
+
}
|
|
54
|
+
declare function CardSmall({ title, value, icon, color, style, ...rest }: CardSmallProps): react_jsx_runtime.JSX.Element;
|
|
55
|
+
|
|
56
|
+
interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'dangerouslySetInnerHTML' | 'size' | 'type'> {
|
|
57
|
+
label?: ReactNode;
|
|
58
|
+
hint?: ReactNode;
|
|
59
|
+
error?: ReactNode;
|
|
60
|
+
controlSize?: ControlSize;
|
|
61
|
+
indeterminate?: boolean;
|
|
62
|
+
}
|
|
63
|
+
declare function Checkbox({ label, hint, error, controlSize, id, checked, defaultChecked, disabled, indeterminate, required, className, style, onChange, onFocus, onBlur, ...rest }: CheckboxProps): react_jsx_runtime.JSX.Element;
|
|
29
64
|
|
|
30
65
|
interface ModalSlotIds {
|
|
31
66
|
header: string;
|
|
@@ -34,7 +69,6 @@ interface ModalSlotIds {
|
|
|
34
69
|
}
|
|
35
70
|
interface ModalSlotContext<TPayload = unknown> {
|
|
36
71
|
title: string;
|
|
37
|
-
description?: string;
|
|
38
72
|
payload?: TPayload;
|
|
39
73
|
close: () => void;
|
|
40
74
|
confirm?: () => void;
|
|
@@ -43,13 +77,18 @@ interface ModalSlotContext<TPayload = unknown> {
|
|
|
43
77
|
isOpen: boolean;
|
|
44
78
|
isBusy: boolean;
|
|
45
79
|
}
|
|
80
|
+
interface ComposableModalSlotRenderProps<TPayload = unknown> {
|
|
81
|
+
id: string;
|
|
82
|
+
context: ModalSlotContext<TPayload>;
|
|
83
|
+
children?: ReactNode;
|
|
84
|
+
}
|
|
85
|
+
type ComposableModalSlotRenderer<TPayload = unknown> = (props: ComposableModalSlotRenderProps<TPayload>) => ReactNode;
|
|
46
86
|
interface ComposableModalProps<TPayload = unknown> {
|
|
47
|
-
sdk: SmartSellSDK;
|
|
48
87
|
isOpen: boolean;
|
|
49
88
|
onClose: () => void;
|
|
50
89
|
title: string;
|
|
51
|
-
description?: string;
|
|
52
90
|
slotBaseId: string;
|
|
91
|
+
renderSlot?: ComposableModalSlotRenderer<TPayload>;
|
|
53
92
|
payload?: TPayload;
|
|
54
93
|
onConfirm?: () => void;
|
|
55
94
|
confirmLabel?: string;
|
|
@@ -66,37 +105,279 @@ interface ComposableModalProps<TPayload = unknown> {
|
|
|
66
105
|
children?: ReactNode;
|
|
67
106
|
}
|
|
68
107
|
declare const createModalSlotIds: (slotBaseId: string) => ModalSlotIds;
|
|
69
|
-
declare function ComposableModal<TPayload = unknown>({
|
|
108
|
+
declare function ComposableModal<TPayload = unknown>({ isOpen, onClose, title, slotBaseId, renderSlot, payload, onConfirm, confirmLabel, cancelLabel, isBusy, closeOnBackdrop, closeOnEscape, hideExpandButton, maximized, hideDefaultFooter, maxWidth, headerFallback, footerFallback, children, }: ComposableModalProps<TPayload>): react_jsx_runtime.JSX.Element;
|
|
109
|
+
|
|
110
|
+
type DatePickerMode = 'date' | 'datetime';
|
|
111
|
+
type DatePickerValue = string | Date | null;
|
|
112
|
+
type DatePickerChangeReason = 'input' | 'picker' | 'clear';
|
|
113
|
+
interface DatePickerChangeContext {
|
|
114
|
+
reason: DatePickerChangeReason;
|
|
115
|
+
date: Date | null;
|
|
116
|
+
nativeValue: string;
|
|
117
|
+
displayValue: string;
|
|
118
|
+
}
|
|
119
|
+
interface DatePickerProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'dangerouslySetInnerHTML' | 'size' | 'type' | 'value' | 'defaultValue' | 'onChange' | 'min' | 'max' | 'step'> {
|
|
120
|
+
label?: ReactNode;
|
|
121
|
+
hint?: ReactNode;
|
|
122
|
+
error?: ReactNode;
|
|
123
|
+
controlSize?: ControlSize;
|
|
124
|
+
value?: DatePickerValue;
|
|
125
|
+
defaultValue?: DatePickerValue;
|
|
126
|
+
onChange?: (value: string | null, context: DatePickerChangeContext) => void;
|
|
127
|
+
mode?: DatePickerMode;
|
|
128
|
+
format?: string;
|
|
129
|
+
allowPastDates?: boolean;
|
|
130
|
+
allowFutureDates?: boolean;
|
|
131
|
+
minDate?: DatePickerValue;
|
|
132
|
+
maxDate?: DatePickerValue;
|
|
133
|
+
minuteStep?: number;
|
|
134
|
+
clearable?: boolean;
|
|
135
|
+
showPickerButton?: boolean;
|
|
136
|
+
isDateUnavailable?: (date: Date) => boolean;
|
|
137
|
+
invalidDateMessage?: ReactNode;
|
|
138
|
+
unavailableDateMessage?: ReactNode;
|
|
139
|
+
pickerButtonLabel?: string;
|
|
140
|
+
clearButtonLabel?: string;
|
|
141
|
+
}
|
|
142
|
+
declare function DatePicker({ label, hint, error, controlSize, value, defaultValue, onChange, mode, format, allowPastDates, allowFutureDates, minDate, maxDate, minuteStep, clearable, showPickerButton, isDateUnavailable, invalidDateMessage, unavailableDateMessage, pickerButtonLabel, clearButtonLabel, id, name, disabled, readOnly, required, style, className, placeholder, onBlur, onClick, onFocus, onKeyDown, ...rest }: DatePickerProps): react_jsx_runtime.JSX.Element;
|
|
70
143
|
|
|
71
144
|
interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'dangerouslySetInnerHTML' | 'size'> {
|
|
72
|
-
sdk: SmartSellSDK;
|
|
73
145
|
label?: ReactNode;
|
|
74
146
|
hint?: ReactNode;
|
|
75
147
|
error?: ReactNode;
|
|
76
|
-
controlSize?: ControlSize
|
|
148
|
+
controlSize?: ControlSize;
|
|
77
149
|
showPasswordToggle?: boolean;
|
|
150
|
+
fileButtonLabel?: ReactNode;
|
|
78
151
|
}
|
|
79
|
-
declare function Input({
|
|
152
|
+
declare function Input({ label, hint, error, controlSize, showPasswordToggle, fileButtonLabel, id, disabled, placeholder, onChange, style, type, ...rest }: InputProps): react_jsx_runtime.JSX.Element;
|
|
80
153
|
|
|
81
|
-
|
|
82
|
-
|
|
154
|
+
type ModalActionAppearance = 'text' | 'outlined' | 'contained' | 'link';
|
|
155
|
+
type ModalThemeColors = {
|
|
156
|
+
background: string;
|
|
157
|
+
surface: string;
|
|
158
|
+
text: string;
|
|
159
|
+
textLight: string;
|
|
160
|
+
primary: string;
|
|
161
|
+
onPrimary: string;
|
|
162
|
+
secondary: string;
|
|
163
|
+
onSecondary: string;
|
|
164
|
+
negative: string;
|
|
165
|
+
warning: string;
|
|
166
|
+
};
|
|
167
|
+
interface ModalTheme {
|
|
168
|
+
colors?: Partial<ModalThemeColors>;
|
|
169
|
+
}
|
|
170
|
+
type ModalThemeSource = ModalTheme | UiKitThemeTokens;
|
|
171
|
+
interface ModalAction {
|
|
172
|
+
label: ReactNode;
|
|
173
|
+
onClick: () => void;
|
|
174
|
+
appearance?: ModalActionAppearance;
|
|
175
|
+
style?: CSSProperties;
|
|
176
|
+
disabled?: boolean;
|
|
177
|
+
hidden?: boolean;
|
|
178
|
+
}
|
|
179
|
+
interface BaseModalProps {
|
|
180
|
+
children?: ReactNode;
|
|
181
|
+
theme?: ModalThemeSource;
|
|
182
|
+
}
|
|
183
|
+
interface ModalProps extends BaseModalProps {
|
|
184
|
+
isOpen: boolean;
|
|
185
|
+
onClose: () => void;
|
|
186
|
+
title?: ReactNode;
|
|
187
|
+
headerContent?: ReactNode;
|
|
188
|
+
footer?: ReactNode;
|
|
189
|
+
confirmAction?: ModalAction;
|
|
190
|
+
cancelAction?: ModalAction;
|
|
191
|
+
closeAction?: ModalAction;
|
|
192
|
+
extraActions?: ModalAction[];
|
|
193
|
+
maxWidth?: number | string;
|
|
194
|
+
closeOnBackdrop?: boolean;
|
|
195
|
+
closeOnEscape?: boolean;
|
|
196
|
+
hideCloseButton?: boolean;
|
|
197
|
+
hideExpandButton?: boolean;
|
|
198
|
+
disableDismiss?: boolean;
|
|
199
|
+
maximized?: boolean;
|
|
200
|
+
contentStyle?: CSSProperties;
|
|
201
|
+
bodyStyle?: CSSProperties;
|
|
202
|
+
isBusy?: boolean;
|
|
203
|
+
}
|
|
204
|
+
type StandardModalProps = ModalProps;
|
|
205
|
+
declare function Modal(props: ModalProps): react_jsx_runtime.JSX.Element;
|
|
206
|
+
|
|
207
|
+
type SeparatorOrientation = 'vertical' | 'horizontal';
|
|
208
|
+
interface SeparatorProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'dangerouslySetInnerHTML' | 'color'> {
|
|
209
|
+
orientation?: SeparatorOrientation;
|
|
210
|
+
color?: CSSProperties['backgroundColor'];
|
|
211
|
+
size?: CSSProperties['width'];
|
|
212
|
+
}
|
|
213
|
+
declare function Separator({ orientation, color, size, style, ...rest }: SeparatorProps): react_jsx_runtime.JSX.Element;
|
|
214
|
+
|
|
215
|
+
interface SharedSelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'dangerouslySetInnerHTML' | 'size'> {
|
|
83
216
|
label?: ReactNode;
|
|
84
217
|
hint?: ReactNode;
|
|
85
218
|
error?: ReactNode;
|
|
86
|
-
|
|
219
|
+
placeholder?: ReactNode;
|
|
220
|
+
controlSize?: ControlSize;
|
|
87
221
|
isMulti?: boolean;
|
|
88
222
|
isFilterable?: boolean;
|
|
89
223
|
}
|
|
90
|
-
declare function Select({ sdk, label, hint, error, controlSize, id, disabled, style, children, value, defaultValue, onChange, onFocus, onBlur, onKeyDown, onClick, autoFocus, className, isMulti, isFilterable, multiple, ...rest }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
91
224
|
|
|
92
|
-
|
|
225
|
+
interface SelectProps extends SharedSelectProps {
|
|
226
|
+
children?: ReactNode;
|
|
227
|
+
}
|
|
228
|
+
declare function Select({ children, ...props }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
229
|
+
|
|
230
|
+
type SelectObjectOptionValue = string | number;
|
|
231
|
+
interface SelectObjectOption<TValue extends SelectObjectOptionValue = SelectObjectOptionValue> {
|
|
232
|
+
value: TValue;
|
|
233
|
+
label: ReactNode;
|
|
234
|
+
disabled?: boolean;
|
|
235
|
+
group?: ReactNode;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
type SelectAsyncOptionValue = SelectObjectOptionValue;
|
|
239
|
+
type SelectAsyncOption<TValue extends SelectAsyncOptionValue = SelectAsyncOptionValue> = SelectObjectOption<TValue>;
|
|
240
|
+
interface SelectAsyncLoadContext {
|
|
241
|
+
page: number;
|
|
242
|
+
signal: AbortSignal;
|
|
243
|
+
}
|
|
244
|
+
interface SelectAsyncLoadResult<TValue extends SelectAsyncOptionValue = SelectAsyncOptionValue> {
|
|
245
|
+
options: Array<SelectAsyncOption<TValue>>;
|
|
246
|
+
hasMore?: boolean;
|
|
247
|
+
}
|
|
248
|
+
type SelectAsyncSingleValue<TValue extends SelectAsyncOptionValue> = SelectAsyncOption<TValue> | null;
|
|
249
|
+
type SelectAsyncMultiValue<TValue extends SelectAsyncOptionValue> = Array<SelectAsyncOption<TValue>>;
|
|
250
|
+
type SelectAsyncValue<TValue extends SelectAsyncOptionValue> = SelectAsyncSingleValue<TValue> | SelectAsyncMultiValue<TValue>;
|
|
251
|
+
interface SelectAsyncProps<TValue extends SelectAsyncOptionValue = SelectAsyncOptionValue> extends Omit<SharedSelectProps, 'children' | 'value' | 'defaultValue' | 'onChange' | 'multiple'> {
|
|
252
|
+
value?: SelectAsyncValue<TValue>;
|
|
253
|
+
defaultValue?: SelectAsyncValue<TValue>;
|
|
254
|
+
onChange?: (value: SelectAsyncValue<TValue>) => void;
|
|
255
|
+
loadOptions: (query: string, loadedOptions: Array<SelectAsyncOption<TValue>>, context: SelectAsyncLoadContext) => Promise<SelectAsyncLoadResult<TValue>>;
|
|
256
|
+
defaultOptions?: Array<SelectAsyncOption<TValue>>;
|
|
257
|
+
fixedOptions?: Array<SelectAsyncOption<TValue>>;
|
|
258
|
+
cacheUniqs?: ReadonlyArray<unknown>;
|
|
259
|
+
searchDebounceMs?: number;
|
|
260
|
+
loadingMessage?: ReactNode;
|
|
261
|
+
loadErrorMessage?: ReactNode;
|
|
262
|
+
emptyMessage?: ReactNode;
|
|
263
|
+
loadingMoreMessage?: ReactNode;
|
|
264
|
+
loadMoreHintMessage?: ReactNode;
|
|
265
|
+
loadMoreThreshold?: number;
|
|
266
|
+
searchPlaceholder?: string;
|
|
267
|
+
}
|
|
268
|
+
declare function SelectAsync<TValue extends SelectAsyncOptionValue = SelectAsyncOptionValue>({ value, defaultValue, onChange, loadOptions, defaultOptions, fixedOptions, cacheUniqs, searchDebounceMs, loadingMessage, loadErrorMessage, emptyMessage, loadingMoreMessage, loadMoreHintMessage, loadMoreThreshold, isMulti, isFilterable, searchPlaceholder, ...props }: SelectAsyncProps<TValue>): react_jsx_runtime.JSX.Element;
|
|
269
|
+
|
|
270
|
+
type TableColumnAlign = 'left' | 'center' | 'right';
|
|
271
|
+
type TableColumnType = 'data' | 'actions';
|
|
272
|
+
type TableActionTone = 'default' | 'danger';
|
|
273
|
+
interface TableColumn<TItem> {
|
|
274
|
+
id?: string;
|
|
275
|
+
label?: ReactNode;
|
|
276
|
+
accessor?: keyof TItem;
|
|
277
|
+
Cell?: (item: TItem, index: number) => ReactNode;
|
|
278
|
+
getSearchValue?: (item: TItem, index: number) => string;
|
|
279
|
+
type?: TableColumnType;
|
|
280
|
+
align?: TableColumnAlign;
|
|
281
|
+
width?: CSSProperties['width'];
|
|
282
|
+
minWidth?: CSSProperties['minWidth'];
|
|
283
|
+
colSpan?: number;
|
|
284
|
+
headerColSpan?: number;
|
|
285
|
+
hideLabel?: boolean;
|
|
286
|
+
}
|
|
287
|
+
interface TableAction<TItem> {
|
|
288
|
+
id?: string;
|
|
289
|
+
label: string;
|
|
290
|
+
icon?: ReactNode;
|
|
291
|
+
onClick: (item: TItem, index: number) => void;
|
|
292
|
+
disabled?: boolean | ((item: TItem, index: number) => boolean);
|
|
293
|
+
hidden?: boolean | ((item: TItem, index: number) => boolean);
|
|
294
|
+
tone?: TableActionTone;
|
|
295
|
+
}
|
|
296
|
+
type TableActionSource<TItem> = Array<TableAction<TItem>> | ((item: TItem, index: number) => Array<TableAction<TItem>>);
|
|
297
|
+
interface TableLabels {
|
|
298
|
+
searchPlaceholder?: string;
|
|
299
|
+
emptyMessage?: ReactNode;
|
|
300
|
+
noResultsMessage?: ReactNode;
|
|
301
|
+
loadingMessage?: ReactNode;
|
|
302
|
+
errorMessage?: ReactNode;
|
|
303
|
+
firstPageLabel?: string;
|
|
304
|
+
previousPageLabel?: string;
|
|
305
|
+
nextPageLabel?: string;
|
|
306
|
+
lastPageLabel?: string;
|
|
307
|
+
rowsPerPageLabel?: string;
|
|
308
|
+
actionsMenuLabel?: string;
|
|
309
|
+
moreActionsLabel?: string;
|
|
310
|
+
retryLabel?: string;
|
|
311
|
+
settingsButtonLabel?: string;
|
|
312
|
+
settingsModalTitle?: ReactNode;
|
|
313
|
+
tableInfoSectionTitle?: ReactNode;
|
|
314
|
+
totalPagesInfoLabel?: string;
|
|
315
|
+
totalItemsInfoLabel?: string;
|
|
316
|
+
currentPageInfoLabel?: string;
|
|
317
|
+
currentPageItemsInfoLabel?: string;
|
|
318
|
+
downloadSectionTitle?: ReactNode;
|
|
319
|
+
downloadCsvLabel?: string;
|
|
320
|
+
downloadXlsLabel?: string;
|
|
321
|
+
downloadPdfLabel?: string;
|
|
322
|
+
pageLabel?: (page: number, totalPages: number) => ReactNode;
|
|
323
|
+
resultCountLabel?: (start: number, end: number, totalItems: number) => ReactNode;
|
|
324
|
+
}
|
|
325
|
+
interface SharedTableProps<TItem> {
|
|
326
|
+
desktopColumns: Array<TableColumn<TItem>>;
|
|
327
|
+
mobileColumns: Array<TableColumn<TItem>>;
|
|
328
|
+
getRowId?: (item: TItem, index: number) => string;
|
|
329
|
+
actions?: TableActionSource<TItem>;
|
|
330
|
+
stickyActionsColumn?: boolean;
|
|
331
|
+
maxInlineActions?: number;
|
|
332
|
+
collapseBelow?: number;
|
|
333
|
+
searchable?: boolean;
|
|
334
|
+
showSearch?: boolean;
|
|
335
|
+
showPagination?: boolean;
|
|
336
|
+
showRowsPerPage?: boolean;
|
|
337
|
+
showSettingsButton?: boolean;
|
|
338
|
+
defaultSearchValue?: string;
|
|
339
|
+
defaultPage?: number;
|
|
340
|
+
defaultPageSize?: number;
|
|
341
|
+
pageSizeOptions?: number[];
|
|
342
|
+
labels?: TableLabels;
|
|
343
|
+
translations?: TableLabels;
|
|
344
|
+
className?: string;
|
|
345
|
+
style?: CSSProperties;
|
|
346
|
+
onSearchValueChange?: (value: string) => void;
|
|
347
|
+
onPageChange?: (page: number) => void;
|
|
348
|
+
onPageSizeChange?: (pageSize: number) => void;
|
|
349
|
+
ariaLabel?: string;
|
|
350
|
+
}
|
|
351
|
+
interface TableAsyncLoadContext {
|
|
352
|
+
page: number;
|
|
353
|
+
pageSize: number;
|
|
354
|
+
signal: AbortSignal;
|
|
355
|
+
}
|
|
356
|
+
interface TableAsyncLoadResult<TItem> {
|
|
357
|
+
items: Array<TItem>;
|
|
358
|
+
totalPages: number;
|
|
359
|
+
totalItems?: number;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
interface TableProps<TItem> extends SharedTableProps<TItem> {
|
|
363
|
+
items: Array<TItem>;
|
|
364
|
+
}
|
|
365
|
+
declare function Table<TItem>({ items, desktopColumns, mobileColumns, defaultSearchValue, defaultPage, defaultPageSize, pageSizeOptions, searchable, onSearchValueChange, onPageChange, onPageSizeChange, ...props }: TableProps<TItem>): react_jsx_runtime.JSX.Element;
|
|
366
|
+
|
|
367
|
+
interface TableAsyncProps<TItem> extends SharedTableProps<TItem> {
|
|
368
|
+
loadItems: (query: string, context: TableAsyncLoadContext) => Promise<TableAsyncLoadResult<TItem>>;
|
|
369
|
+
cacheUniqs?: ReadonlyArray<unknown>;
|
|
370
|
+
searchDebounceMs?: number;
|
|
371
|
+
keepPreviousData?: boolean;
|
|
372
|
+
}
|
|
373
|
+
declare function TableAsync<TItem>({ loadItems, desktopColumns, mobileColumns, defaultSearchValue, defaultPage, defaultPageSize, pageSizeOptions, searchable, cacheUniqs, searchDebounceMs, keepPreviousData, onSearchValueChange, onPageChange, onPageSizeChange, ...props }: TableAsyncProps<TItem>): react_jsx_runtime.JSX.Element;
|
|
374
|
+
|
|
93
375
|
interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'dangerouslySetInnerHTML'> {
|
|
94
|
-
sdk: SmartSellSDK;
|
|
95
376
|
label?: ReactNode;
|
|
96
377
|
hint?: ReactNode;
|
|
97
378
|
error?: ReactNode;
|
|
98
379
|
controlSize?: ControlSize;
|
|
99
380
|
}
|
|
100
|
-
declare function Textarea({
|
|
381
|
+
declare function Textarea({ label, hint, error, controlSize, id, disabled, style, rows, ...rest }: TextareaProps): react_jsx_runtime.JSX.Element;
|
|
101
382
|
|
|
102
|
-
export { Button, type ButtonProps, Card, type CardProps, ComposableModal, type ComposableModalProps, Input, type InputProps, type ModalSlotContext, type ModalSlotIds, Select, type SelectProps, Textarea, type TextareaProps, createModalSlotIds };
|
|
383
|
+
export { Button, type ButtonProps, Card, type CardProps, CardSmall, type CardSmallProps, Checkbox, type CheckboxProps, ComposableModal, type ComposableModalProps, type ComposableModalSlotRenderProps, type ComposableModalSlotRenderer, type ControlSize, DatePicker, type DatePickerChangeContext, type DatePickerChangeReason, type DatePickerMode, type DatePickerProps, type DatePickerValue, Input, type InputProps, Modal, type ModalAction, type ModalProps, type ModalSlotContext, type ModalSlotIds, type ModalTheme, type ModalThemeSource, Select, SelectAsync, type SelectAsyncLoadContext, type SelectAsyncLoadResult, type SelectAsyncOption, type SelectAsyncOptionValue, type SelectAsyncProps, type SelectProps, Separator, type SeparatorOrientation, type SeparatorProps, type SharedTableProps, type StandardModalProps, Table, type TableAction, type TableActionSource, type TableActionTone, TableAsync, type TableAsyncLoadContext, type TableAsyncLoadResult, type TableAsyncProps, type TableColumn, type TableColumnAlign, type TableColumnType, type TableLabels, type TableProps, Textarea, type TextareaProps, type UiKitThemeTokens, createModalSlotIds, useUiKitTheme };
|