smartsell-ui-kit 0.1.7 → 0.1.8
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/dist/index.cjs +1879 -1896
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -18
- package/dist/index.d.ts +25 -18
- package/dist/index.js +1891 -1902
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ButtonHTMLAttributes, ReactNode, HTMLAttributes, CSSProperties, InputHTMLAttributes, SelectHTMLAttributes, TextareaHTMLAttributes } from 'react';
|
|
2
|
+
import { ButtonHTMLAttributes, ReactNode, HTMLAttributes, CSSProperties, InputHTMLAttributes, Ref, SelectHTMLAttributes, TextareaHTMLAttributes } from 'react';
|
|
3
3
|
import { SmartSellTheme, ThemeColors } from 'smartsell-theme';
|
|
4
4
|
|
|
5
5
|
type ControlSize = 'sm' | 'md' | 'lg';
|
|
@@ -16,7 +16,8 @@ interface UiKitTheme extends Omit<SmartSellTheme, 'title' | 'colors' | 'color'>
|
|
|
16
16
|
}
|
|
17
17
|
declare function useUiKitTheme(): UiKitTheme;
|
|
18
18
|
|
|
19
|
-
type
|
|
19
|
+
type LegacyVariant = 'primary';
|
|
20
|
+
type ButtonVariant = 'solid' | 'secondary' | 'outline' | 'ghost' | 'negative' | LegacyVariant;
|
|
20
21
|
type ButtonSize = ControlSize;
|
|
21
22
|
interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'dangerouslySetInnerHTML'> {
|
|
22
23
|
variant?: ButtonVariant;
|
|
@@ -97,6 +98,19 @@ interface ComposableModalProps<TPayload = unknown> {
|
|
|
97
98
|
declare const createModalSlotIds: (slotBaseId: string) => ModalSlotIds;
|
|
98
99
|
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;
|
|
99
100
|
|
|
101
|
+
interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'dangerouslySetInnerHTML' | 'size'> {
|
|
102
|
+
label?: ReactNode;
|
|
103
|
+
hint?: ReactNode;
|
|
104
|
+
error?: ReactNode;
|
|
105
|
+
size?: ControlSize;
|
|
106
|
+
showPasswordToggle?: boolean;
|
|
107
|
+
fileButtonLabel?: ReactNode;
|
|
108
|
+
icon?: ReactNode;
|
|
109
|
+
disableFloatingLabel?: boolean;
|
|
110
|
+
ref?: Ref<HTMLInputElement>;
|
|
111
|
+
}
|
|
112
|
+
declare function Input({ label, hint, error, size, className, showPasswordToggle, fileButtonLabel, icon, id, disabled, placeholder, onChange, style, type, disableFloatingLabel, ...rest }: InputProps): react_jsx_runtime.JSX.Element;
|
|
113
|
+
|
|
100
114
|
type DatePickerMode = 'date' | 'datetime';
|
|
101
115
|
type DatePickerValue = string | Date | null;
|
|
102
116
|
type DatePickerChangeReason = 'input' | 'picker' | 'clear';
|
|
@@ -106,11 +120,10 @@ interface DatePickerChangeContext {
|
|
|
106
120
|
nativeValue: string;
|
|
107
121
|
displayValue: string;
|
|
108
122
|
}
|
|
109
|
-
interface DatePickerProps extends Omit<
|
|
123
|
+
interface DatePickerProps extends Omit<InputProps, 'type' | 'value' | 'defaultValue' | 'onChange' | 'min' | 'max' | 'step'> {
|
|
110
124
|
label?: ReactNode;
|
|
111
125
|
hint?: ReactNode;
|
|
112
126
|
error?: ReactNode;
|
|
113
|
-
size?: ControlSize;
|
|
114
127
|
value?: DatePickerValue;
|
|
115
128
|
defaultValue?: DatePickerValue;
|
|
116
129
|
onChange?: (value: string | null, context: DatePickerChangeContext) => void;
|
|
@@ -129,18 +142,7 @@ interface DatePickerProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'd
|
|
|
129
142
|
pickerButtonLabel?: string;
|
|
130
143
|
clearButtonLabel?: string;
|
|
131
144
|
}
|
|
132
|
-
declare function DatePicker({
|
|
133
|
-
|
|
134
|
-
interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'dangerouslySetInnerHTML' | 'size'> {
|
|
135
|
-
label?: ReactNode;
|
|
136
|
-
hint?: ReactNode;
|
|
137
|
-
error?: ReactNode;
|
|
138
|
-
size?: ControlSize;
|
|
139
|
-
showPasswordToggle?: boolean;
|
|
140
|
-
fileButtonLabel?: ReactNode;
|
|
141
|
-
icon?: ReactNode;
|
|
142
|
-
}
|
|
143
|
-
declare function Input({ label, hint, error, size, className, showPasswordToggle, fileButtonLabel, icon, id, disabled, placeholder, onChange, style, type, ...rest }: InputProps): react_jsx_runtime.JSX.Element;
|
|
145
|
+
declare function DatePicker({ value, defaultValue, onChange, mode, minDate, maxDate, minuteStep, placeholder, ...props }: DatePickerProps): react_jsx_runtime.JSX.Element;
|
|
144
146
|
|
|
145
147
|
type ModalActionAppearance = 'text' | 'outlined' | 'contained' | 'link';
|
|
146
148
|
type ModalThemeColors = {
|
|
@@ -213,10 +215,15 @@ interface SharedSelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>
|
|
|
213
215
|
isFilterable?: boolean;
|
|
214
216
|
}
|
|
215
217
|
|
|
218
|
+
type SelectOption = {
|
|
219
|
+
label: string;
|
|
220
|
+
value: string;
|
|
221
|
+
};
|
|
216
222
|
interface SelectProps extends SharedSelectProps {
|
|
217
223
|
children?: ReactNode;
|
|
224
|
+
options?: SelectOption[];
|
|
218
225
|
}
|
|
219
|
-
declare function Select({ children, ...props }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
226
|
+
declare function Select({ children, options, ...props }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
220
227
|
|
|
221
228
|
type SelectObjectOptionValue = string | number;
|
|
222
229
|
interface SelectObjectOption<TValue extends SelectObjectOptionValue = SelectObjectOptionValue> {
|
|
@@ -374,6 +381,6 @@ interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>
|
|
|
374
381
|
error?: ReactNode;
|
|
375
382
|
size?: ControlSize;
|
|
376
383
|
}
|
|
377
|
-
declare function Textarea({ label, hint, error, size, id, disabled, style, rows, ...rest }: TextareaProps): react_jsx_runtime.JSX.Element;
|
|
384
|
+
declare function Textarea({ label, hint, error, size, id, disabled, style, rows, placeholder, ...rest }: TextareaProps): react_jsx_runtime.JSX.Element;
|
|
378
385
|
|
|
379
386
|
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 UiKitTheme, createModalSlotIds, useUiKitTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ButtonHTMLAttributes, ReactNode, HTMLAttributes, CSSProperties, InputHTMLAttributes, SelectHTMLAttributes, TextareaHTMLAttributes } from 'react';
|
|
2
|
+
import { ButtonHTMLAttributes, ReactNode, HTMLAttributes, CSSProperties, InputHTMLAttributes, Ref, SelectHTMLAttributes, TextareaHTMLAttributes } from 'react';
|
|
3
3
|
import { SmartSellTheme, ThemeColors } from 'smartsell-theme';
|
|
4
4
|
|
|
5
5
|
type ControlSize = 'sm' | 'md' | 'lg';
|
|
@@ -16,7 +16,8 @@ interface UiKitTheme extends Omit<SmartSellTheme, 'title' | 'colors' | 'color'>
|
|
|
16
16
|
}
|
|
17
17
|
declare function useUiKitTheme(): UiKitTheme;
|
|
18
18
|
|
|
19
|
-
type
|
|
19
|
+
type LegacyVariant = 'primary';
|
|
20
|
+
type ButtonVariant = 'solid' | 'secondary' | 'outline' | 'ghost' | 'negative' | LegacyVariant;
|
|
20
21
|
type ButtonSize = ControlSize;
|
|
21
22
|
interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'dangerouslySetInnerHTML'> {
|
|
22
23
|
variant?: ButtonVariant;
|
|
@@ -97,6 +98,19 @@ interface ComposableModalProps<TPayload = unknown> {
|
|
|
97
98
|
declare const createModalSlotIds: (slotBaseId: string) => ModalSlotIds;
|
|
98
99
|
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;
|
|
99
100
|
|
|
101
|
+
interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'dangerouslySetInnerHTML' | 'size'> {
|
|
102
|
+
label?: ReactNode;
|
|
103
|
+
hint?: ReactNode;
|
|
104
|
+
error?: ReactNode;
|
|
105
|
+
size?: ControlSize;
|
|
106
|
+
showPasswordToggle?: boolean;
|
|
107
|
+
fileButtonLabel?: ReactNode;
|
|
108
|
+
icon?: ReactNode;
|
|
109
|
+
disableFloatingLabel?: boolean;
|
|
110
|
+
ref?: Ref<HTMLInputElement>;
|
|
111
|
+
}
|
|
112
|
+
declare function Input({ label, hint, error, size, className, showPasswordToggle, fileButtonLabel, icon, id, disabled, placeholder, onChange, style, type, disableFloatingLabel, ...rest }: InputProps): react_jsx_runtime.JSX.Element;
|
|
113
|
+
|
|
100
114
|
type DatePickerMode = 'date' | 'datetime';
|
|
101
115
|
type DatePickerValue = string | Date | null;
|
|
102
116
|
type DatePickerChangeReason = 'input' | 'picker' | 'clear';
|
|
@@ -106,11 +120,10 @@ interface DatePickerChangeContext {
|
|
|
106
120
|
nativeValue: string;
|
|
107
121
|
displayValue: string;
|
|
108
122
|
}
|
|
109
|
-
interface DatePickerProps extends Omit<
|
|
123
|
+
interface DatePickerProps extends Omit<InputProps, 'type' | 'value' | 'defaultValue' | 'onChange' | 'min' | 'max' | 'step'> {
|
|
110
124
|
label?: ReactNode;
|
|
111
125
|
hint?: ReactNode;
|
|
112
126
|
error?: ReactNode;
|
|
113
|
-
size?: ControlSize;
|
|
114
127
|
value?: DatePickerValue;
|
|
115
128
|
defaultValue?: DatePickerValue;
|
|
116
129
|
onChange?: (value: string | null, context: DatePickerChangeContext) => void;
|
|
@@ -129,18 +142,7 @@ interface DatePickerProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'd
|
|
|
129
142
|
pickerButtonLabel?: string;
|
|
130
143
|
clearButtonLabel?: string;
|
|
131
144
|
}
|
|
132
|
-
declare function DatePicker({
|
|
133
|
-
|
|
134
|
-
interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'dangerouslySetInnerHTML' | 'size'> {
|
|
135
|
-
label?: ReactNode;
|
|
136
|
-
hint?: ReactNode;
|
|
137
|
-
error?: ReactNode;
|
|
138
|
-
size?: ControlSize;
|
|
139
|
-
showPasswordToggle?: boolean;
|
|
140
|
-
fileButtonLabel?: ReactNode;
|
|
141
|
-
icon?: ReactNode;
|
|
142
|
-
}
|
|
143
|
-
declare function Input({ label, hint, error, size, className, showPasswordToggle, fileButtonLabel, icon, id, disabled, placeholder, onChange, style, type, ...rest }: InputProps): react_jsx_runtime.JSX.Element;
|
|
145
|
+
declare function DatePicker({ value, defaultValue, onChange, mode, minDate, maxDate, minuteStep, placeholder, ...props }: DatePickerProps): react_jsx_runtime.JSX.Element;
|
|
144
146
|
|
|
145
147
|
type ModalActionAppearance = 'text' | 'outlined' | 'contained' | 'link';
|
|
146
148
|
type ModalThemeColors = {
|
|
@@ -213,10 +215,15 @@ interface SharedSelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>
|
|
|
213
215
|
isFilterable?: boolean;
|
|
214
216
|
}
|
|
215
217
|
|
|
218
|
+
type SelectOption = {
|
|
219
|
+
label: string;
|
|
220
|
+
value: string;
|
|
221
|
+
};
|
|
216
222
|
interface SelectProps extends SharedSelectProps {
|
|
217
223
|
children?: ReactNode;
|
|
224
|
+
options?: SelectOption[];
|
|
218
225
|
}
|
|
219
|
-
declare function Select({ children, ...props }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
226
|
+
declare function Select({ children, options, ...props }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
220
227
|
|
|
221
228
|
type SelectObjectOptionValue = string | number;
|
|
222
229
|
interface SelectObjectOption<TValue extends SelectObjectOptionValue = SelectObjectOptionValue> {
|
|
@@ -374,6 +381,6 @@ interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>
|
|
|
374
381
|
error?: ReactNode;
|
|
375
382
|
size?: ControlSize;
|
|
376
383
|
}
|
|
377
|
-
declare function Textarea({ label, hint, error, size, id, disabled, style, rows, ...rest }: TextareaProps): react_jsx_runtime.JSX.Element;
|
|
384
|
+
declare function Textarea({ label, hint, error, size, id, disabled, style, rows, placeholder, ...rest }: TextareaProps): react_jsx_runtime.JSX.Element;
|
|
378
385
|
|
|
379
386
|
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 UiKitTheme, createModalSlotIds, useUiKitTheme };
|