@wavy/react-ui 0.0.43 → 0.0.45
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 +34 -26
- 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';
|
|
@@ -1478,6 +1478,15 @@ interface BasicOptionProps extends Partial<Record<"leadingEl" | "trailingEl", Re
|
|
|
1478
1478
|
}
|
|
1479
1479
|
declare function BasicOption(props: BasicOptionProps): react_jsx_runtime.JSX.Element;
|
|
1480
1480
|
|
|
1481
|
+
interface DebounceProps {
|
|
1482
|
+
/**@default 300 */
|
|
1483
|
+
delay?: number;
|
|
1484
|
+
isDataLoaded?: () => boolean;
|
|
1485
|
+
children: () => React__default.ReactNode;
|
|
1486
|
+
LoadingScreen?: () => React__default.ReactElement;
|
|
1487
|
+
}
|
|
1488
|
+
declare function Debounce(props: DebounceProps): react_jsx_runtime.JSX.Element;
|
|
1489
|
+
|
|
1481
1490
|
interface AvatarGroupProps {
|
|
1482
1491
|
stacking?: AvatarGroupProps$1["stacking"];
|
|
1483
1492
|
children: JSX$1.Element | JSX$1.Element[];
|
|
@@ -1569,7 +1578,7 @@ interface FileUploadRootProps {
|
|
|
1569
1578
|
maxWidth?: FileUpload.RootProps["maxW"];
|
|
1570
1579
|
height?: FileUpload.RootProps["height"];
|
|
1571
1580
|
width?: FileUpload.RootProps["width"];
|
|
1572
|
-
accepts:
|
|
1581
|
+
accepts: FileDetails["alias"][];
|
|
1573
1582
|
children: JSX$1.Element;
|
|
1574
1583
|
slotProps?: Partial<{
|
|
1575
1584
|
fileList: FileUpload.ListProps;
|
|
@@ -1970,7 +1979,7 @@ interface CheckboxProps {
|
|
|
1970
1979
|
/**@default "onPrimaryContainer" */
|
|
1971
1980
|
iconColor?: BasicColor$1;
|
|
1972
1981
|
disableShadow?: boolean;
|
|
1973
|
-
iconSize?: `${number}${"rem" | "em" | "px"}`;
|
|
1982
|
+
iconSize?: `${number}${"rem" | "em" | "px" | "%"}`;
|
|
1974
1983
|
onChange?: (checked: boolean) => void;
|
|
1975
1984
|
onClick?: () => void;
|
|
1976
1985
|
}
|
|
@@ -2206,7 +2215,7 @@ declare namespace FileViewerProps {
|
|
|
2206
2215
|
centerContent?: boolean;
|
|
2207
2216
|
}
|
|
2208
2217
|
interface IndicatorProps extends BasicStyleProps {
|
|
2209
|
-
file:
|
|
2218
|
+
file: FileDetails;
|
|
2210
2219
|
hideFileMetadata?: boolean;
|
|
2211
2220
|
/** @default "45%" */
|
|
2212
2221
|
maxWidth?: BasicStyleProps["maxWidth"];
|
|
@@ -2447,7 +2456,7 @@ declare const paperStyle: (options: {
|
|
|
2447
2456
|
}) => CSS.Properties;
|
|
2448
2457
|
|
|
2449
2458
|
interface StatusProps {
|
|
2450
|
-
status:
|
|
2459
|
+
status: TaskStatus;
|
|
2451
2460
|
indicatorSize?: ElementDim;
|
|
2452
2461
|
indicatorOnly?: boolean;
|
|
2453
2462
|
}
|
|
@@ -2599,7 +2608,7 @@ interface DisclaimerProps extends Partial<Record<"top" | "left" | "bottom" | "ri
|
|
|
2599
2608
|
declare function Disclaimer(props: DisclaimerProps): react_jsx_runtime.JSX.Element;
|
|
2600
2609
|
|
|
2601
2610
|
type ContextType = Prettify<Partial<Record<`onAttachment${"Added" | "Deleted"}`, (attachement: Attachment) => void>> & Partial<Record<`${"delete" | "open"}Disabled`, boolean | ((attachment: Attachment) => boolean)>> & {
|
|
2602
|
-
attachments:
|
|
2611
|
+
attachments: FileDetails[];
|
|
2603
2612
|
onOpenAttachment?: (attachment: Attachment) => void;
|
|
2604
2613
|
attachmentsEventListener?: (event: "open" | "delete" | "add", attachement: Attachment) => void;
|
|
2605
2614
|
uploadDisabled?: boolean;
|
|
@@ -2607,7 +2616,7 @@ type ContextType = Prettify<Partial<Record<`onAttachment${"Added" | "Deleted"}`,
|
|
|
2607
2616
|
hideOpenAttachmentButton?: boolean;
|
|
2608
2617
|
hideUploadButton?: boolean;
|
|
2609
2618
|
getFilePath?: (file: File) => string;
|
|
2610
|
-
accepts?:
|
|
2619
|
+
accepts?: KnownFileAlias | KnownFileAlias[];
|
|
2611
2620
|
}>;
|
|
2612
2621
|
interface AttachmentsDialogProps extends ContextType {
|
|
2613
2622
|
readOnly?: boolean;
|
|
@@ -3019,7 +3028,7 @@ declare function JsonViewer(props: JsonViewerProps): react_jsx_runtime.JSX.Eleme
|
|
|
3019
3028
|
|
|
3020
3029
|
interface PictureUploaderProps {
|
|
3021
3030
|
fallback?: IconType;
|
|
3022
|
-
defaultPicture?:
|
|
3031
|
+
defaultPicture?: FileDetails;
|
|
3023
3032
|
label?: string;
|
|
3024
3033
|
columnGap?: BasicDivProps["gap"];
|
|
3025
3034
|
rowGap?: BasicDivProps["gap"];
|
|
@@ -3031,7 +3040,7 @@ interface PictureUploaderProps {
|
|
|
3031
3040
|
}>;
|
|
3032
3041
|
}>;
|
|
3033
3042
|
getFilePath?: (file: File) => string;
|
|
3034
|
-
onChange?: (picture:
|
|
3043
|
+
onChange?: (picture: FileDetails) => void;
|
|
3035
3044
|
}
|
|
3036
3045
|
declare function PictureUploader(props: PictureUploaderProps): react_jsx_runtime.JSX.Element;
|
|
3037
3046
|
|
|
@@ -3066,21 +3075,20 @@ interface TerminalProps {
|
|
|
3066
3075
|
}
|
|
3067
3076
|
declare function Terminal(props: TerminalProps): react_jsx_runtime.JSX.Element;
|
|
3068
3077
|
|
|
3069
|
-
interface SearchTextFieldProps {
|
|
3070
|
-
|
|
3071
|
-
placeholder?: string;
|
|
3078
|
+
interface SearchTextFieldProps extends SafeOmit<TextFieldProps, "leadingContent" | "leadingAdornment"> {
|
|
3079
|
+
/**@default "20rem" */
|
|
3072
3080
|
width?: BasicDivProps["width"];
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3081
|
+
/**@default "onSurface[0.1]" */
|
|
3082
|
+
backgroundColor?: TextFieldProps["backgroundColor"];
|
|
3083
|
+
/**@default "Search..." */
|
|
3084
|
+
placeholder?: string;
|
|
3085
|
+
/**@default "1.15rem" */
|
|
3086
|
+
searchIconSize?: string;
|
|
3079
3087
|
}
|
|
3080
3088
|
declare function SearchTextField(props: SearchTextFieldProps): react_jsx_runtime.JSX.Element;
|
|
3081
3089
|
|
|
3082
3090
|
declare function VerifyTextField(props: SafeOmit<TextFieldProps, "leadingAdornment" | "leadingContent" | "trailingAdornment" | "trailingContent"> & {
|
|
3083
|
-
defaultStatus?:
|
|
3091
|
+
defaultStatus?: TaskStatus;
|
|
3084
3092
|
verifyError?: ErrorMessage;
|
|
3085
3093
|
onVerifyClick: () => Promise<TaskResult>;
|
|
3086
3094
|
}): react_jsx_runtime.JSX.Element;
|
|
@@ -3187,12 +3195,12 @@ interface BasicFileInputProps extends BasicStyleProps {
|
|
|
3187
3195
|
* Sets the 'maxFiles' property to Infinity
|
|
3188
3196
|
*/
|
|
3189
3197
|
multiple?: boolean;
|
|
3190
|
-
accepts?:
|
|
3198
|
+
accepts?: KnownFileAlias[] | KnownFileAlias;
|
|
3191
3199
|
children?: JSX$1.Element;
|
|
3192
3200
|
disabled?: boolean;
|
|
3193
3201
|
getFilePath?: (file: File) => string;
|
|
3194
|
-
onAccept?: (files: File[], localFiles:
|
|
3195
|
-
onReject?: (files: File[], localFiles:
|
|
3202
|
+
onAccept?: (files: File[], localFiles: FileDetails[]) => void;
|
|
3203
|
+
onReject?: (files: File[], localFiles: FileDetails[]) => void;
|
|
3196
3204
|
}
|
|
3197
3205
|
|
|
3198
3206
|
interface UploadFileButtonProps extends SafeOmit<BasicFileInputProps, "children" | keyof BasicStyleProps | "allowDrop"> {
|
|
@@ -3247,7 +3255,7 @@ interface YesNoButtonGroupProps {
|
|
|
3247
3255
|
}
|
|
3248
3256
|
declare function YesNoButtonGroup(props: YesNoButtonGroupProps): react_jsx_runtime.JSX.Element;
|
|
3249
3257
|
|
|
3250
|
-
declare function getFileIcon(alias:
|
|
3258
|
+
declare function getFileIcon(alias: FileDetails["alias"]): {
|
|
3251
3259
|
filled: IconType;
|
|
3252
3260
|
outlined: IconType;
|
|
3253
3261
|
};
|
|
@@ -3320,7 +3328,7 @@ declare function useEvent<EventMapper extends Record<string, any>>(options?: Par
|
|
|
3320
3328
|
/**Subscribes to an event in the closest EventContainer (defaults to the one in `WavyUi`) */
|
|
3321
3329
|
on: <Key extends keyof EventMapper>(key: Key, cb: (...args: EventMapper[Key] extends null ? [] : [payload: EventMapper[Key]]) => void, options?: Partial<{
|
|
3322
3330
|
rerender: boolean;
|
|
3323
|
-
}>) =>
|
|
3331
|
+
}>) => _wavy_util.UnsubscribeFunction;
|
|
3324
3332
|
/**Gets the total amount of listeners on an event */
|
|
3325
3333
|
listeners: (key: keyof EventMapper) => number;
|
|
3326
3334
|
/**Removes an event from the registry in the closest EventContainer (unsubscribing all listeners in the process) */
|
|
@@ -3396,4 +3404,4 @@ declare function remAsPx(rem: number): string;
|
|
|
3396
3404
|
declare function isOverflown(element: HTMLElement): boolean;
|
|
3397
3405
|
declare function computedCssVariable(cssVariable: string): string;
|
|
3398
3406
|
|
|
3399
|
-
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, 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 };
|
|
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 };
|