@vacano/ui 1.6.1 → 1.8.0
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 +1 -0
- package/dist/{X-CI1qRJDP.cjs → X-BIgkmQPR.cjs} +4 -4
- package/dist/X-BIgkmQPR.cjs.map +1 -0
- package/dist/{X-Cm-i8Bh7.js → X-Dyq6IJZW.js} +219 -195
- package/dist/X-Dyq6IJZW.js.map +1 -0
- package/dist/icons.cjs +1 -1
- package/dist/icons.cjs.map +1 -1
- package/dist/icons.js +1230 -1253
- package/dist/icons.js.map +1 -1
- package/dist/index.cjs +275 -245
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +32 -18
- package/dist/index.js +1861 -1747
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/X-CI1qRJDP.cjs.map +0 -1
- package/dist/X-Cm-i8Bh7.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ChangeEventHandler } from 'react';
|
|
2
|
-
import { CSSProperties } from 'react';
|
|
3
2
|
import { HTMLAttributes } from 'react';
|
|
4
3
|
import { InputHTMLAttributes } from 'react';
|
|
5
4
|
import { JSX } from '@emotion/react/jsx-runtime';
|
|
@@ -154,26 +153,24 @@ export declare type ChipProps = VacanoComponentProps<HTMLSpanElement, ChipClassN
|
|
|
154
153
|
|
|
155
154
|
export declare type ChipVariant = 'gray' | 'red' | 'blue' | 'black';
|
|
156
155
|
|
|
157
|
-
export declare
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
message?: string;
|
|
161
|
-
actions?: string;
|
|
162
|
-
confirmButton?: string;
|
|
163
|
-
cancelButton?: string;
|
|
156
|
+
export declare type ConfirmationContextValue = {
|
|
157
|
+
show: (message: ReactNode, onConfirm: () => void | Promise<void>, onCancel?: () => void, options?: ConfirmationOptions) => void;
|
|
158
|
+
hide: () => void;
|
|
164
159
|
};
|
|
165
160
|
|
|
166
|
-
export declare type
|
|
167
|
-
cancelBindings?: KeyboardEventKey[];
|
|
168
|
-
cancelLabel?: string;
|
|
161
|
+
export declare type ConfirmationOptions = {
|
|
169
162
|
confirmLabel?: string;
|
|
170
|
-
|
|
163
|
+
cancelLabel?: string;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
export declare const ConfirmationProvider: ({ children }: PropsWithChildren) => JSX.Element;
|
|
167
|
+
|
|
168
|
+
export declare type ConfirmationState = {
|
|
169
|
+
open: boolean;
|
|
171
170
|
message: ReactNode;
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
style?: CSSProperties;
|
|
176
|
-
submitBindings?: KeyboardEventKey[];
|
|
171
|
+
onConfirm: () => void | Promise<void>;
|
|
172
|
+
onCancel: () => void;
|
|
173
|
+
options: ConfirmationOptions;
|
|
177
174
|
};
|
|
178
175
|
|
|
179
176
|
export declare const Container: ({ children, className, ref, ...rest }: PropsWithChildren<ContainerProps>) => JSX.Element;
|
|
@@ -247,7 +244,7 @@ export declare type DrawerProps = VacanoComponentProps<HTMLDivElement> & Omit<HT
|
|
|
247
244
|
size?: string;
|
|
248
245
|
};
|
|
249
246
|
|
|
250
|
-
export declare const Dropdown: ({ align, children, className, classnames, onClose, onOpen, open: controlledOpen, portalRenderNode, ref, trigger, ...rest }: DropdownProps) => JSX.Element;
|
|
247
|
+
export declare const Dropdown: ({ align, autoClose, children, className, classnames, onClose, onOpen, open: controlledOpen, portalRenderNode, ref, trigger, ...rest }: DropdownProps) => JSX.Element;
|
|
251
248
|
|
|
252
249
|
export declare type DropdownAlign = 'left' | 'right';
|
|
253
250
|
|
|
@@ -260,6 +257,7 @@ export declare type DropdownPosition = 'top' | 'bottom';
|
|
|
260
257
|
|
|
261
258
|
export declare type DropdownProps = VacanoComponentProps<HTMLDivElement, DropdownClassNames> & {
|
|
262
259
|
align?: DropdownAlign;
|
|
260
|
+
autoClose?: boolean;
|
|
263
261
|
children?: ReactNode;
|
|
264
262
|
onClose?: () => void;
|
|
265
263
|
onOpen?: () => void;
|
|
@@ -268,6 +266,20 @@ export declare type DropdownProps = VacanoComponentProps<HTMLDivElement, Dropdow
|
|
|
268
266
|
trigger: ReactElement;
|
|
269
267
|
};
|
|
270
268
|
|
|
269
|
+
export declare const EditableText: ({ value, onChange, disabled, placeholder, className, classnames, "data-test-id": dataTestId, }: EditableTextProps) => JSX.Element;
|
|
270
|
+
|
|
271
|
+
export declare type EditableTextClassNames = {
|
|
272
|
+
text?: string;
|
|
273
|
+
button?: string;
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
export declare type EditableTextProps = VacanoComponentProps<HTMLDivElement, EditableTextClassNames> & {
|
|
277
|
+
value: string;
|
|
278
|
+
onChange: (value: string) => void;
|
|
279
|
+
disabled?: boolean;
|
|
280
|
+
placeholder?: string;
|
|
281
|
+
};
|
|
282
|
+
|
|
271
283
|
export declare const FieldLabel: ({ children, className, ref, required, variant, ...rest }: FieldLabelProps) => JSX.Element | null;
|
|
272
284
|
|
|
273
285
|
export declare type FieldLabelProps = VacanoComponentProps<HTMLSpanElement> & {
|
|
@@ -811,6 +823,8 @@ export declare type TooltipProps = VacanoComponentProps<HTMLDivElement, TooltipC
|
|
|
811
823
|
|
|
812
824
|
export declare type TooltipVariant = 'dark' | 'light' | 'success' | 'warning' | 'danger';
|
|
813
825
|
|
|
826
|
+
export declare const useConfirmation: () => ConfirmationContextValue;
|
|
827
|
+
|
|
814
828
|
export declare const useImageCropper: (options?: UseImageCropperOptions) => UseImageCropperReturn;
|
|
815
829
|
|
|
816
830
|
export declare type UseImageCropperOptions = {
|