@wavy/react-ui 0.0.44 → 0.0.46
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/main.d.ts +30 -16
- package/dist/main.js +30 -9
- package/package.json +6 -5
- package/types.d.ts +0 -1
package/dist/main.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
3
|
import React__default, { PropsWithChildren, JSX } from 'react';
|
|
4
|
-
import * as
|
|
5
|
-
import { NoUndefinedField, SafeOmit,
|
|
4
|
+
import * as _wavy_util from '@wavy/util';
|
|
5
|
+
import { NoUndefinedField, SafeOmit, FileDetails, Prettify, AddPrefix, TaskResult, TaskStatus, Email, KnownFileAlias, SuccessMessage, AuthProvider, TaskLog, UnsubscribeFunction, ErrorMessage, Name, NonFunction, CastFn } from '@wavy/util';
|
|
6
6
|
import { IconType } from 'react-icons';
|
|
7
7
|
import * as CSS from 'csstype';
|
|
8
8
|
import CSS__default from 'csstype';
|
|
@@ -1487,6 +1487,20 @@ interface DebounceProps {
|
|
|
1487
1487
|
}
|
|
1488
1488
|
declare function Debounce(props: DebounceProps): react_jsx_runtime.JSX.Element;
|
|
1489
1489
|
|
|
1490
|
+
interface ProgressBarProps extends BasicDivProps {
|
|
1491
|
+
/** The percent of the progress, coerced between 0 and 1 */
|
|
1492
|
+
value: number;
|
|
1493
|
+
/**@default "full" */
|
|
1494
|
+
width?: BasicDivProps["width"];
|
|
1495
|
+
/**@default ".7rem" */
|
|
1496
|
+
height?: BasicDivProps["height"];
|
|
1497
|
+
/**@default "md" */
|
|
1498
|
+
corners?: BasicDivProps["corners"];
|
|
1499
|
+
/**@default "seed" */
|
|
1500
|
+
accentColor?: BasicColor$1;
|
|
1501
|
+
}
|
|
1502
|
+
declare function ProgressBar(props: ProgressBarProps): react_jsx_runtime.JSX.Element;
|
|
1503
|
+
|
|
1490
1504
|
interface AvatarGroupProps {
|
|
1491
1505
|
stacking?: AvatarGroupProps$1["stacking"];
|
|
1492
1506
|
children: JSX$1.Element | JSX$1.Element[];
|
|
@@ -1578,7 +1592,7 @@ interface FileUploadRootProps {
|
|
|
1578
1592
|
maxWidth?: FileUpload.RootProps["maxW"];
|
|
1579
1593
|
height?: FileUpload.RootProps["height"];
|
|
1580
1594
|
width?: FileUpload.RootProps["width"];
|
|
1581
|
-
accepts:
|
|
1595
|
+
accepts: FileDetails["alias"][];
|
|
1582
1596
|
children: JSX$1.Element;
|
|
1583
1597
|
slotProps?: Partial<{
|
|
1584
1598
|
fileList: FileUpload.ListProps;
|
|
@@ -2215,7 +2229,7 @@ declare namespace FileViewerProps {
|
|
|
2215
2229
|
centerContent?: boolean;
|
|
2216
2230
|
}
|
|
2217
2231
|
interface IndicatorProps extends BasicStyleProps {
|
|
2218
|
-
file:
|
|
2232
|
+
file: FileDetails;
|
|
2219
2233
|
hideFileMetadata?: boolean;
|
|
2220
2234
|
/** @default "45%" */
|
|
2221
2235
|
maxWidth?: BasicStyleProps["maxWidth"];
|
|
@@ -2456,7 +2470,7 @@ declare const paperStyle: (options: {
|
|
|
2456
2470
|
}) => CSS.Properties;
|
|
2457
2471
|
|
|
2458
2472
|
interface StatusProps {
|
|
2459
|
-
status:
|
|
2473
|
+
status: TaskStatus;
|
|
2460
2474
|
indicatorSize?: ElementDim;
|
|
2461
2475
|
indicatorOnly?: boolean;
|
|
2462
2476
|
}
|
|
@@ -2608,7 +2622,7 @@ interface DisclaimerProps extends Partial<Record<"top" | "left" | "bottom" | "ri
|
|
|
2608
2622
|
declare function Disclaimer(props: DisclaimerProps): react_jsx_runtime.JSX.Element;
|
|
2609
2623
|
|
|
2610
2624
|
type ContextType = Prettify<Partial<Record<`onAttachment${"Added" | "Deleted"}`, (attachement: Attachment) => void>> & Partial<Record<`${"delete" | "open"}Disabled`, boolean | ((attachment: Attachment) => boolean)>> & {
|
|
2611
|
-
attachments:
|
|
2625
|
+
attachments: FileDetails[];
|
|
2612
2626
|
onOpenAttachment?: (attachment: Attachment) => void;
|
|
2613
2627
|
attachmentsEventListener?: (event: "open" | "delete" | "add", attachement: Attachment) => void;
|
|
2614
2628
|
uploadDisabled?: boolean;
|
|
@@ -2616,7 +2630,7 @@ type ContextType = Prettify<Partial<Record<`onAttachment${"Added" | "Deleted"}`,
|
|
|
2616
2630
|
hideOpenAttachmentButton?: boolean;
|
|
2617
2631
|
hideUploadButton?: boolean;
|
|
2618
2632
|
getFilePath?: (file: File) => string;
|
|
2619
|
-
accepts?:
|
|
2633
|
+
accepts?: KnownFileAlias | KnownFileAlias[];
|
|
2620
2634
|
}>;
|
|
2621
2635
|
interface AttachmentsDialogProps extends ContextType {
|
|
2622
2636
|
readOnly?: boolean;
|
|
@@ -3028,7 +3042,7 @@ declare function JsonViewer(props: JsonViewerProps): react_jsx_runtime.JSX.Eleme
|
|
|
3028
3042
|
|
|
3029
3043
|
interface PictureUploaderProps {
|
|
3030
3044
|
fallback?: IconType;
|
|
3031
|
-
defaultPicture?:
|
|
3045
|
+
defaultPicture?: FileDetails;
|
|
3032
3046
|
label?: string;
|
|
3033
3047
|
columnGap?: BasicDivProps["gap"];
|
|
3034
3048
|
rowGap?: BasicDivProps["gap"];
|
|
@@ -3040,7 +3054,7 @@ interface PictureUploaderProps {
|
|
|
3040
3054
|
}>;
|
|
3041
3055
|
}>;
|
|
3042
3056
|
getFilePath?: (file: File) => string;
|
|
3043
|
-
onChange?: (picture:
|
|
3057
|
+
onChange?: (picture: FileDetails) => void;
|
|
3044
3058
|
}
|
|
3045
3059
|
declare function PictureUploader(props: PictureUploaderProps): react_jsx_runtime.JSX.Element;
|
|
3046
3060
|
|
|
@@ -3088,7 +3102,7 @@ interface SearchTextFieldProps extends SafeOmit<TextFieldProps, "leadingContent"
|
|
|
3088
3102
|
declare function SearchTextField(props: SearchTextFieldProps): react_jsx_runtime.JSX.Element;
|
|
3089
3103
|
|
|
3090
3104
|
declare function VerifyTextField(props: SafeOmit<TextFieldProps, "leadingAdornment" | "leadingContent" | "trailingAdornment" | "trailingContent"> & {
|
|
3091
|
-
defaultStatus?:
|
|
3105
|
+
defaultStatus?: TaskStatus;
|
|
3092
3106
|
verifyError?: ErrorMessage;
|
|
3093
3107
|
onVerifyClick: () => Promise<TaskResult>;
|
|
3094
3108
|
}): react_jsx_runtime.JSX.Element;
|
|
@@ -3195,12 +3209,12 @@ interface BasicFileInputProps extends BasicStyleProps {
|
|
|
3195
3209
|
* Sets the 'maxFiles' property to Infinity
|
|
3196
3210
|
*/
|
|
3197
3211
|
multiple?: boolean;
|
|
3198
|
-
accepts?:
|
|
3212
|
+
accepts?: KnownFileAlias[] | KnownFileAlias;
|
|
3199
3213
|
children?: JSX$1.Element;
|
|
3200
3214
|
disabled?: boolean;
|
|
3201
3215
|
getFilePath?: (file: File) => string;
|
|
3202
|
-
onAccept?: (files: File[], localFiles:
|
|
3203
|
-
onReject?: (files: File[], localFiles:
|
|
3216
|
+
onAccept?: (files: File[], localFiles: FileDetails[]) => void;
|
|
3217
|
+
onReject?: (files: File[], localFiles: FileDetails[]) => void;
|
|
3204
3218
|
}
|
|
3205
3219
|
|
|
3206
3220
|
interface UploadFileButtonProps extends SafeOmit<BasicFileInputProps, "children" | keyof BasicStyleProps | "allowDrop"> {
|
|
@@ -3255,7 +3269,7 @@ interface YesNoButtonGroupProps {
|
|
|
3255
3269
|
}
|
|
3256
3270
|
declare function YesNoButtonGroup(props: YesNoButtonGroupProps): react_jsx_runtime.JSX.Element;
|
|
3257
3271
|
|
|
3258
|
-
declare function getFileIcon(alias:
|
|
3272
|
+
declare function getFileIcon(alias: FileDetails["alias"]): {
|
|
3259
3273
|
filled: IconType;
|
|
3260
3274
|
outlined: IconType;
|
|
3261
3275
|
};
|
|
@@ -3328,7 +3342,7 @@ declare function useEvent<EventMapper extends Record<string, any>>(options?: Par
|
|
|
3328
3342
|
/**Subscribes to an event in the closest EventContainer (defaults to the one in `WavyUi`) */
|
|
3329
3343
|
on: <Key extends keyof EventMapper>(key: Key, cb: (...args: EventMapper[Key] extends null ? [] : [payload: EventMapper[Key]]) => void, options?: Partial<{
|
|
3330
3344
|
rerender: boolean;
|
|
3331
|
-
}>) =>
|
|
3345
|
+
}>) => _wavy_util.UnsubscribeFunction;
|
|
3332
3346
|
/**Gets the total amount of listeners on an event */
|
|
3333
3347
|
listeners: (key: keyof EventMapper) => number;
|
|
3334
3348
|
/**Removes an event from the registry in the closest EventContainer (unsubscribing all listeners in the process) */
|
|
@@ -3404,4 +3418,4 @@ declare function remAsPx(rem: number): string;
|
|
|
3404
3418
|
declare function isOverflown(element: HTMLElement): boolean;
|
|
3405
3419
|
declare function computedCssVariable(cssVariable: string): string;
|
|
3406
3420
|
|
|
3407
|
-
export { AttachmentsButton, AttachmentsDialog, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Badge, type BadgeProps, BasicButton, type BasicColor$1 as BasicColor, BasicDiv, BasicImg, BasicOl, BasicOption, BasicSelect, BasicSpan, type BasicStyleProps, BasicTable, BasicTableProps, _default as Calendar, CalendarDialog, CancelButton, Card, CardProps, Checkbox, type CheckboxProps, ColorResources, type ComputedStyleProps, ConfirmationDialog, type ConfirmationDialogProps, CopyButton, CssColors, type CssProperties, CssShapes, CssSpacing, Debounce, type DebounceProps, DeleteButton, Dialog, DialogProps, Disclaimer, type DisclaimerProps, DownloadButton, Drawer, DrawerProps, EditButton, Editable, type EditableProps, EmailComposer, EmptyState, EmptyStateProps, ErrorTooltip, EventContainer, type EventContainerProps, ExpandableButton, FancyFormDialog, type FancyFormDialogProps, FileDropzone, type FileDropzoneProps, FileViewer, FileViewerProps, FontSize, Indicator, type IndicatorProps, type InlineCss, ItemInfo, type ItemInfoProps, JsonViewer, type JwtVerificationStatus, JwtVerifier, type JwtVerifierProps, MediaCard, MediaCardProps, Menu, type MenuPlacement, MoneyDisplayCard, NegativeButton, NextButton, NoButton, OpenButton, OptionsButton, PageIndicator, type PageIndicatorProps, PageSlider, type PageSliderProps, Paper, type PaperProps, PasteButton, PaymentOptionsButton, PaymentOptionsDialog, PictureUploader, Popover, type PopoverProps, PositiveButton, PreviousButton, ProfileCard, ProfileCardProps, ReceiptCard, SaveButton, SearchTextField, SegmentedControls, type SegmentedControlsProps, SendButton, Separator, type SeparatorProps, SignInWidget, SimpleFormDialog, type SimpleFormDialogProps, Spinner, type SpinnerProps, Status, type StatusProps, Stepper, type StepperProps, SubmitButton, Tag, type TagProps, TaskLogger, TaskResultDialog, Terminal, TextField, type TextFieldProps, Timeline, TimelineProps, Tooltip, type TooltipPlacement, type TooltipProps, UploadButton, UploadReceiptButton, type UseModalControlsReturn, type UsePageSliderControllerReturn, UserProfile, VerifyButton, VerifyTextField, UiProvider as WavyUi, YesButton, YesNoButtonGroup, YesOrNoForm, applyBasicStyle, bankTransferPaymentOption, borderRadius, buildCSS, computedCssVariable, convertHexUnitTo256, cssTransition, definePaymentOption, disabledBorderRadius, dragElement, ellipsis, flexCenter, getFileIcon, getPaperDim, getScrollParent, hexToRgba, inAppPaymentOption, isOverflown, isSpanMultiLine, isValidHex, nativeEllipsis, noSpaceStyle, paperStyle, remAsPx, remToPx, resolveBasicColor, restrictLineCount, rgbToRgba, screenHasMaxWidth, screenHasMinWidth, solidBorder, stripHtml, tiledBackground, useAsyncEffect, useComputedStyle, useEvent, useManagedRef, useModalControls, usePageSliderController, usePopoverContext, usePostRenderEffect, useRerender, useSessionStorage, useSmartState };
|
|
3421
|
+
export { AttachmentsButton, AttachmentsDialog, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Badge, type BadgeProps, BasicButton, type BasicColor$1 as BasicColor, BasicDiv, BasicImg, BasicOl, BasicOption, BasicSelect, BasicSpan, type BasicStyleProps, BasicTable, BasicTableProps, _default as Calendar, CalendarDialog, CancelButton, Card, CardProps, Checkbox, type CheckboxProps, ColorResources, type ComputedStyleProps, ConfirmationDialog, type ConfirmationDialogProps, CopyButton, CssColors, type CssProperties, CssShapes, CssSpacing, Debounce, type DebounceProps, DeleteButton, Dialog, DialogProps, Disclaimer, type DisclaimerProps, DownloadButton, Drawer, DrawerProps, EditButton, Editable, type EditableProps, EmailComposer, EmptyState, EmptyStateProps, ErrorTooltip, EventContainer, type EventContainerProps, ExpandableButton, FancyFormDialog, type FancyFormDialogProps, FileDropzone, type FileDropzoneProps, FileViewer, FileViewerProps, FontSize, Indicator, type IndicatorProps, type InlineCss, ItemInfo, type ItemInfoProps, JsonViewer, type JwtVerificationStatus, JwtVerifier, type JwtVerifierProps, MediaCard, MediaCardProps, Menu, type MenuPlacement, MoneyDisplayCard, NegativeButton, NextButton, NoButton, OpenButton, OptionsButton, PageIndicator, type PageIndicatorProps, PageSlider, type PageSliderProps, Paper, type PaperProps, PasteButton, PaymentOptionsButton, PaymentOptionsDialog, PictureUploader, Popover, type PopoverProps, PositiveButton, PreviousButton, ProfileCard, ProfileCardProps, ProgressBar, type ProgressBarProps, ReceiptCard, SaveButton, SearchTextField, SegmentedControls, type SegmentedControlsProps, SendButton, Separator, type SeparatorProps, SignInWidget, SimpleFormDialog, type SimpleFormDialogProps, Spinner, type SpinnerProps, Status, type StatusProps, Stepper, type StepperProps, SubmitButton, Tag, type TagProps, TaskLogger, TaskResultDialog, Terminal, TextField, type TextFieldProps, Timeline, TimelineProps, Tooltip, type TooltipPlacement, type TooltipProps, UploadButton, UploadReceiptButton, type UseModalControlsReturn, type UsePageSliderControllerReturn, UserProfile, VerifyButton, VerifyTextField, UiProvider as WavyUi, YesButton, YesNoButtonGroup, YesOrNoForm, applyBasicStyle, bankTransferPaymentOption, borderRadius, buildCSS, computedCssVariable, convertHexUnitTo256, cssTransition, definePaymentOption, disabledBorderRadius, dragElement, ellipsis, flexCenter, getFileIcon, getPaperDim, getScrollParent, hexToRgba, inAppPaymentOption, isOverflown, isSpanMultiLine, isValidHex, nativeEllipsis, noSpaceStyle, paperStyle, remAsPx, remToPx, resolveBasicColor, restrictLineCount, rgbToRgba, screenHasMaxWidth, screenHasMinWidth, solidBorder, stripHtml, tiledBackground, useAsyncEffect, useComputedStyle, useEvent, useManagedRef, useModalControls, usePageSliderController, usePopoverContext, usePostRenderEffect, useRerender, useSessionStorage, useSmartState };
|