@wavy/react-ui 0.0.14 → 0.0.16

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 CHANGED
@@ -5,7 +5,7 @@ import { NoUndefinedField, SafeOmit, LocalFile, Prettify, AddPrefix, TaskResult,
5
5
  import { IconType } from 'react-icons';
6
6
  import * as CSS from 'csstype';
7
7
  import CSS__default from 'csstype';
8
- import { FileUpload, InputProps, InputAddonProps, InputElementProps, AvatarRootProps, FloatProps, CloseButtonProps, Dialog as Dialog$1, MenuRootProps, SegmentGroupRootProps, Steps, Tooltip as Tooltip$1, SeparatorProps as SeparatorProps$1 } from '@chakra-ui/react';
8
+ import { Drawer as Drawer$1, FileUpload, InputProps, InputAddonProps, InputElementProps, AvatarRootProps, FloatProps, CloseButtonProps, Dialog as Dialog$1, MenuRootProps, SegmentGroupRootProps, Steps, Tooltip as Tooltip$1, SeparatorProps as SeparatorProps$1 } from '@chakra-ui/react';
9
9
  export { MenuRootProps, UseStepsProps, useSteps } from '@chakra-ui/react';
10
10
  import { JSX as JSX$1 } from '@emotion/react/jsx-runtime';
11
11
  import { StepsVariant } from 'node_modules/@chakra-ui/react/dist/types/styled-system/generated/recipes.gen';
@@ -1289,11 +1289,11 @@ type RootStyles = {
1289
1289
  }>;
1290
1290
  }>;
1291
1291
  };
1292
- declare function Root$7<T extends string>(props: BasicTableProps.RootProps<T>): react_jsx_runtime.JSX.Element;
1292
+ declare function Root$8<T extends string>(props: BasicTableProps.RootProps<T>): react_jsx_runtime.JSX.Element;
1293
1293
  declare function Header(props: BasicTableProps.HeaderProps): react_jsx_runtime.JSX.Element;
1294
1294
  declare function Body<T extends string>(props: BasicTableProps.BodyProps<T>): react_jsx_runtime.JSX.Element;
1295
1295
  declare const BasicTable: {
1296
- Root: typeof Root$7;
1296
+ Root: typeof Root$8;
1297
1297
  Header: typeof Header;
1298
1298
  Body: typeof Body;
1299
1299
  };
@@ -1362,12 +1362,12 @@ interface PopoverProps extends Partial<Record<`${"min" | "max"}Width`, FloaterWi
1362
1362
  * @default false
1363
1363
  */
1364
1364
  wrap?: boolean;
1365
- defaultOpen?: boolean;
1365
+ open?: boolean;
1366
1366
  /**The delay between opening and closing the popover in milliseconds
1367
1367
  * @default 200 */
1368
1368
  delay?: number | Record<"open" | "close", number>;
1369
1369
  /**@default "click" */
1370
- displayAction?: "click" | "hover";
1370
+ displayAction?: "click" | "hover" | "script";
1371
1371
  visibleOnScroll?: boolean;
1372
1372
  rerenderOnClose?: boolean;
1373
1373
  /**@description This stops the popover from closing while attempting to interact with it
@@ -1404,6 +1404,7 @@ interface PopoverProps extends Partial<Record<`${"min" | "max"}Width`, FloaterWi
1404
1404
  borderColor?: BasicColor$1;
1405
1405
  /**@default "surfaceContainer" */
1406
1406
  backgroundColor?: BasicColor$1;
1407
+ boxShadow?: string;
1407
1408
  /**@default "max-content" */
1408
1409
  width?: FloaterWidth;
1409
1410
  /**@default "md" */
@@ -1461,6 +1462,40 @@ interface BasicOptionProps {
1461
1462
  }
1462
1463
  declare function BasicOption(props: BasicOptionProps): react_jsx_runtime.JSX.Element;
1463
1464
 
1465
+ declare function Root$7<T>(props: DrawerProps.RootProps<T>): react_jsx_runtime.JSX.Element;
1466
+ declare function Sep$1(): react_jsx_runtime.JSX.Element;
1467
+ declare const Drawer: {
1468
+ Root: typeof Root$7;
1469
+ Header: (props: DrawerProps.HeaderProps) => react_jsx_runtime.JSX.Element;
1470
+ Body: (props: DrawerProps.BodyProps) => react_jsx_runtime.JSX.Element;
1471
+ Footer: (props: DrawerProps.FooterProps) => react_jsx_runtime.JSX.Element;
1472
+ Sep: typeof Sep$1;
1473
+ ActionTrigger: React__default.ForwardRefExoticComponent<Drawer$1.ActionTriggerProps & React__default.RefAttributes<HTMLButtonElement>>;
1474
+ CloseTrigger: React__default.ForwardRefExoticComponent<Drawer$1.CloseTriggerProps & React__default.RefAttributes<HTMLButtonElement>>;
1475
+ };
1476
+ declare namespace DrawerProps {
1477
+ interface RootProps<T> extends BasicStyleProps {
1478
+ /**@default "onSurface[0.1]" */
1479
+ sepColor?: BasicColor$1;
1480
+ triggerElement?: JSX$1.Element;
1481
+ controller?: UseModalControlsReturn<T>;
1482
+ children: JSX$1.Element | JSX$1.Element[];
1483
+ /**@default "hidden" */
1484
+ spill?: BasicStyleProps["spill"];
1485
+ container?: React__default.RefObject<HTMLDivElement>;
1486
+ onClose?: () => void;
1487
+ }
1488
+ interface HeaderProps extends BasicStyleProps {
1489
+ children: React__default.ReactNode;
1490
+ /**@default "full" */
1491
+ width?: BasicStyleProps["width"];
1492
+ }
1493
+ interface BodyProps extends HeaderProps {
1494
+ }
1495
+ interface FooterProps extends HeaderProps {
1496
+ }
1497
+ }
1498
+
1464
1499
  interface FileUploadRootProps {
1465
1500
  maxFiles?: number;
1466
1501
  multiple?: boolean;
@@ -1516,6 +1551,7 @@ interface TextFieldProps extends AdditionalElements {
1516
1551
  placeholder?: string;
1517
1552
  defaultValue?: string;
1518
1553
  value?: string;
1554
+ validateInput?: (value: string) => boolean;
1519
1555
  allowPasteText?: boolean;
1520
1556
  allowCopyText?: boolean;
1521
1557
  label?: string;
@@ -1617,6 +1653,7 @@ interface EditableProps extends Partial<Pick<TextFieldProps, "focusColor">> {
1617
1653
  onEditClick?: () => void;
1618
1654
  onContentClick?: () => void;
1619
1655
  onCancelClick?: () => void;
1656
+ validateInput?: (value: string) => boolean;
1620
1657
  onSaveClick?: (value: string) => void;
1621
1658
  /** Formats the content when at rest */
1622
1659
  formatContent?: (value: string) => string;
@@ -1871,7 +1908,7 @@ interface ConfirmationDialogProps extends Partial<Record<"width" | "height" | `$
1871
1908
  message: string;
1872
1909
  hideDisclaimerLabel?: boolean;
1873
1910
  disclaimer?: string;
1874
- controller?: UseDialogControllerReturn;
1911
+ controller?: UseModalControlsReturn;
1875
1912
  triggerElement?: JSX$1.Element;
1876
1913
  /**
1877
1914
  * @default "error"
@@ -1889,13 +1926,13 @@ interface ConfirmationDialogProps extends Partial<Record<"width" | "height" | `$
1889
1926
  }
1890
1927
  declare function ConfirmationDialog(props: ConfirmationDialogProps): react_jsx_runtime.JSX.Element;
1891
1928
 
1892
- declare function useDialogController<Value>(defaultValue?: Value): {
1929
+ declare function useModalControls<Value>(defaultValue?: Value): {
1893
1930
  value: Value;
1894
1931
  isOpen: boolean;
1895
1932
  show: (...args: Value extends boolean ? [] : [value: Value]) => void;
1896
1933
  hide: () => void;
1897
1934
  };
1898
- type UseDialogControllerReturn<T = {}> = ReturnType<typeof useDialogController<T>>;
1935
+ type UseModalControlsReturn<T = {}> = ReturnType<typeof useModalControls<T>>;
1899
1936
 
1900
1937
  declare function Root$2<T>(props: DialogProps.RootProps<T>): react_jsx_runtime.JSX.Element;
1901
1938
  interface ElementProps extends SafeOmit<BasicDivProps, "ref" | "onClick" | "onBlur" | "onFocus" | "onScroll" | "clickable"> {
@@ -1940,7 +1977,7 @@ declare namespace DialogProps {
1940
1977
  * @default "outside"
1941
1978
  */
1942
1979
  scrollBehavior?: Dialog$1.RootProps["scrollBehavior"];
1943
- controller?: UseDialogControllerReturn<T>;
1980
+ controller?: UseModalControlsReturn<T>;
1944
1981
  /**
1945
1982
  * Whether to close the dialog when the escape key is pressed
1946
1983
  * @default true
@@ -1959,7 +1996,7 @@ declare namespace DialogProps {
1959
1996
 
1960
1997
  interface FancyFormDialogProps<Section extends string> {
1961
1998
  triggerElement?: JSX$1.Element;
1962
- controller?: UseDialogControllerReturn;
1999
+ controller?: UseModalControlsReturn;
1963
2000
  title?: React.ReactNode;
1964
2001
  defaultSection?: Section;
1965
2002
  sections: BasicOlProps<Section>["items"];
@@ -1985,7 +2022,7 @@ interface FancyFormDialogProps<Section extends string> {
1985
2022
  declare function FancyFormDialog<Sections extends string>(props: FancyFormDialogProps<Sections>): react_jsx_runtime.JSX.Element;
1986
2023
 
1987
2024
  interface SimpleFormDialogProps<T extends string> {
1988
- controller?: UseDialogControllerReturn;
2025
+ controller?: UseModalControlsReturn;
1989
2026
  title?: string;
1990
2027
  triggerElement?: JSX$1.Element;
1991
2028
  /**@default "md" */
@@ -2390,13 +2427,11 @@ declare namespace TimelineProps {
2390
2427
  children: JSX$1.Element | JSX$1.Element[];
2391
2428
  }
2392
2429
  interface ItemProps {
2393
- indicator?: React.ReactNode;
2394
- /**The node that should be placed `before` (to the left of) the separator */
2395
- before?: React.ReactNode;
2396
- /**The node that should be placed `after` (to the right of) the separator */
2397
- after?: React.ReactNode;
2430
+ indicator?: React__default.ReactNode;
2431
+ children: React__default.ReactElement | [React__default.ReactElement, React__default.ReactElement];
2398
2432
  disabled?: boolean;
2399
- styles?: Partial<Record<"before" | "after", BasicStyleProps> & {
2433
+ reverse?: boolean;
2434
+ styles?: Partial<Record<"leadingEl" | "trailingEl", BasicStyleProps> & {
2400
2435
  indicator: Partial<BasicStyleProps & {
2401
2436
  /**@default ".6rem" */
2402
2437
  size: BasicStyleProps["size"];
@@ -2480,7 +2515,7 @@ interface AttachmentsDialogProps extends ContextType {
2480
2515
  triggerElement?: JSX.Element;
2481
2516
  unmountOnExit?: boolean;
2482
2517
  rerenderOnClose?: boolean;
2483
- controller?: UseDialogControllerReturn;
2518
+ controller?: UseModalControlsReturn;
2484
2519
  onAttachmentsChange?: (attachments: Email["attachments"]) => void;
2485
2520
  onClose?: () => void;
2486
2521
  }
@@ -2731,7 +2766,7 @@ declare const _default: React$1.MemoExoticComponent<typeof Calendar>;
2731
2766
  interface CalendarDialogProps extends CalendarProps {
2732
2767
  title?: string;
2733
2768
  titleFontSize?: BasicSpanProps["fontSize"];
2734
- controller?: UseDialogControllerReturn;
2769
+ controller?: UseModalControlsReturn;
2735
2770
  triggerElement?: JSX$1.Element;
2736
2771
  /**@default "onSurface[0.1]" */
2737
2772
  backgroundColor?: BasicColor$1;
@@ -2746,7 +2781,7 @@ declare function CalendarDialog(props: CalendarDialogProps): react_jsx_runtime.J
2746
2781
 
2747
2782
  interface PaymentOptionsDialogProps<Variables extends Record<string, any>> {
2748
2783
  triggerElement?: JSX$1.Element;
2749
- controller?: UseDialogControllerReturn;
2784
+ controller?: UseModalControlsReturn;
2750
2785
  options: {
2751
2786
  icon: IconType;
2752
2787
  label: string;
@@ -2793,7 +2828,7 @@ declare const inAppPaymentOption: () => {
2793
2828
  };
2794
2829
 
2795
2830
  interface TaskResultDialogProps {
2796
- controller: UseDialogControllerReturn<TaskResult<SuccessMessage>>;
2831
+ controller: UseModalControlsReturn<TaskResult<SuccessMessage>>;
2797
2832
  unmountOnExit?: boolean;
2798
2833
  /**@default "2.75rem" */
2799
2834
  indicatorSize?: ElementDim | ((status: "success" | "error") => ElementDim);
@@ -3219,4 +3254,4 @@ declare function remAsPx(rem: number): string;
3219
3254
  declare function isOverflown(element: HTMLElement): boolean;
3220
3255
  declare function computedCssVariable(cssVariable: string): string;
3221
3256
 
3222
- export { AttachmentsButton, AttachmentsDialog, Avatar, 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, EditButton, Editable, type EditableProps, EmailComposer, EmptyState, EmptyStateProps, ErrorTooltip, 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, 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, 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 UseDialogControllerReturn, 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, remAsPx, remToPx, resolveBasicColor, restrictLineCount, rgbToRgba, screenHasMaxWidth, screenHasMinWidth, solidBorder, tiledBackground, useAsyncEffect, useComputedStyle, useDialogController, useEventEmitter, useManagedRef, usePageSliderController, usePopoverContext, usePostRenderEffect, useRerender, useSessionStorage };
3257
+ export { AttachmentsButton, AttachmentsDialog, Avatar, 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, 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, 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, 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, remAsPx, remToPx, resolveBasicColor, restrictLineCount, rgbToRgba, screenHasMaxWidth, screenHasMinWidth, solidBorder, tiledBackground, useAsyncEffect, useComputedStyle, useEventEmitter, useManagedRef, useModalControls, usePageSliderController, usePopoverContext, usePostRenderEffect, useRerender, useSessionStorage };