@wavy/react-ui 0.0.13 → 0.0.15

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,9 +5,9 @@ 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 { JSX as JSX$1 } from '@emotion/react/jsx-runtime';
8
9
  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';
9
10
  export { MenuRootProps, UseStepsProps, useSteps } from '@chakra-ui/react';
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';
12
12
 
13
13
  declare function UiProvider(props: {
@@ -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,38 @@ 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
+ };
1474
+ declare namespace DrawerProps {
1475
+ interface RootProps<T> extends BasicStyleProps {
1476
+ /**@default "onSurface[0.1]" */
1477
+ sepColor?: BasicColor$1;
1478
+ triggerElement?: JSX$1.Element;
1479
+ controller?: UseModalControlsReturn<T>;
1480
+ children: JSX$1.Element | JSX$1.Element[];
1481
+ /**@default "hidden" */
1482
+ spill?: BasicStyleProps["spill"];
1483
+ container?: React__default.RefObject<HTMLDivElement>;
1484
+ onClose?: () => void;
1485
+ }
1486
+ interface HeaderProps extends BasicStyleProps {
1487
+ children: React__default.ReactNode;
1488
+ /**@default "full" */
1489
+ width?: BasicStyleProps["width"];
1490
+ }
1491
+ interface BodyProps extends HeaderProps {
1492
+ }
1493
+ interface FooterProps extends HeaderProps {
1494
+ }
1495
+ }
1496
+
1464
1497
  interface FileUploadRootProps {
1465
1498
  maxFiles?: number;
1466
1499
  multiple?: boolean;
@@ -1618,6 +1651,8 @@ interface EditableProps extends Partial<Pick<TextFieldProps, "focusColor">> {
1618
1651
  onContentClick?: () => void;
1619
1652
  onCancelClick?: () => void;
1620
1653
  onSaveClick?: (value: string) => void;
1654
+ /** Formats the content when at rest */
1655
+ formatContent?: (value: string) => string;
1621
1656
  onSave?: (value: string) => void;
1622
1657
  /** @param value The content after it was changed (includes reversions)*/
1623
1658
  onChange?: (value: string) => void;
@@ -1842,6 +1877,7 @@ declare namespace ProfileCardProps {
1842
1877
  }
1843
1878
 
1844
1879
  interface CheckboxProps {
1880
+ disabled?: boolean;
1845
1881
  defaultChecked?: boolean;
1846
1882
  checked?: boolean;
1847
1883
  size?: BasicDivProps["size"];
@@ -1868,7 +1904,7 @@ interface ConfirmationDialogProps extends Partial<Record<"width" | "height" | `$
1868
1904
  message: string;
1869
1905
  hideDisclaimerLabel?: boolean;
1870
1906
  disclaimer?: string;
1871
- controller?: UseDialogControllerReturn;
1907
+ controller?: UseModalControlsReturn;
1872
1908
  triggerElement?: JSX$1.Element;
1873
1909
  /**
1874
1910
  * @default "error"
@@ -1886,13 +1922,13 @@ interface ConfirmationDialogProps extends Partial<Record<"width" | "height" | `$
1886
1922
  }
1887
1923
  declare function ConfirmationDialog(props: ConfirmationDialogProps): react_jsx_runtime.JSX.Element;
1888
1924
 
1889
- declare function useDialogController<Value>(defaultValue?: Value): {
1925
+ declare function useModalControls<Value>(defaultValue?: Value): {
1890
1926
  value: Value;
1891
1927
  isOpen: boolean;
1892
1928
  show: (...args: Value extends boolean ? [] : [value: Value]) => void;
1893
1929
  hide: () => void;
1894
1930
  };
1895
- type UseDialogControllerReturn<T = {}> = ReturnType<typeof useDialogController<T>>;
1931
+ type UseModalControlsReturn<T = {}> = ReturnType<typeof useModalControls<T>>;
1896
1932
 
1897
1933
  declare function Root$2<T>(props: DialogProps.RootProps<T>): react_jsx_runtime.JSX.Element;
1898
1934
  interface ElementProps extends SafeOmit<BasicDivProps, "ref" | "onClick" | "onBlur" | "onFocus" | "onScroll" | "clickable"> {
@@ -1937,7 +1973,7 @@ declare namespace DialogProps {
1937
1973
  * @default "outside"
1938
1974
  */
1939
1975
  scrollBehavior?: Dialog$1.RootProps["scrollBehavior"];
1940
- controller?: UseDialogControllerReturn<T>;
1976
+ controller?: UseModalControlsReturn<T>;
1941
1977
  /**
1942
1978
  * Whether to close the dialog when the escape key is pressed
1943
1979
  * @default true
@@ -1956,7 +1992,7 @@ declare namespace DialogProps {
1956
1992
 
1957
1993
  interface FancyFormDialogProps<Section extends string> {
1958
1994
  triggerElement?: JSX$1.Element;
1959
- controller?: UseDialogControllerReturn;
1995
+ controller?: UseModalControlsReturn;
1960
1996
  title?: React.ReactNode;
1961
1997
  defaultSection?: Section;
1962
1998
  sections: BasicOlProps<Section>["items"];
@@ -1982,7 +2018,7 @@ interface FancyFormDialogProps<Section extends string> {
1982
2018
  declare function FancyFormDialog<Sections extends string>(props: FancyFormDialogProps<Sections>): react_jsx_runtime.JSX.Element;
1983
2019
 
1984
2020
  interface SimpleFormDialogProps<T extends string> {
1985
- controller?: UseDialogControllerReturn;
2021
+ controller?: UseModalControlsReturn;
1986
2022
  title?: string;
1987
2023
  triggerElement?: JSX$1.Element;
1988
2024
  /**@default "md" */
@@ -2387,13 +2423,11 @@ declare namespace TimelineProps {
2387
2423
  children: JSX$1.Element | JSX$1.Element[];
2388
2424
  }
2389
2425
  interface ItemProps {
2390
- indicator?: React.ReactNode;
2391
- /**The node that should be placed `before` (to the left of) the separator */
2392
- before?: React.ReactNode;
2393
- /**The node that should be placed `after` (to the right of) the separator */
2394
- after?: React.ReactNode;
2426
+ indicator?: React__default.ReactNode;
2427
+ children: React__default.ReactElement | [React__default.ReactElement, React__default.ReactElement];
2395
2428
  disabled?: boolean;
2396
- styles?: Partial<Record<"before" | "after", BasicStyleProps> & {
2429
+ reverse?: boolean;
2430
+ styles?: Partial<Record<"leadingEl" | "trailingEl", BasicStyleProps> & {
2397
2431
  indicator: Partial<BasicStyleProps & {
2398
2432
  /**@default ".6rem" */
2399
2433
  size: BasicStyleProps["size"];
@@ -2477,7 +2511,7 @@ interface AttachmentsDialogProps extends ContextType {
2477
2511
  triggerElement?: JSX.Element;
2478
2512
  unmountOnExit?: boolean;
2479
2513
  rerenderOnClose?: boolean;
2480
- controller?: UseDialogControllerReturn;
2514
+ controller?: UseModalControlsReturn;
2481
2515
  onAttachmentsChange?: (attachments: Email["attachments"]) => void;
2482
2516
  onClose?: () => void;
2483
2517
  }
@@ -2728,7 +2762,7 @@ declare const _default: React$1.MemoExoticComponent<typeof Calendar>;
2728
2762
  interface CalendarDialogProps extends CalendarProps {
2729
2763
  title?: string;
2730
2764
  titleFontSize?: BasicSpanProps["fontSize"];
2731
- controller?: UseDialogControllerReturn;
2765
+ controller?: UseModalControlsReturn;
2732
2766
  triggerElement?: JSX$1.Element;
2733
2767
  /**@default "onSurface[0.1]" */
2734
2768
  backgroundColor?: BasicColor$1;
@@ -2743,7 +2777,7 @@ declare function CalendarDialog(props: CalendarDialogProps): react_jsx_runtime.J
2743
2777
 
2744
2778
  interface PaymentOptionsDialogProps<Variables extends Record<string, any>> {
2745
2779
  triggerElement?: JSX$1.Element;
2746
- controller?: UseDialogControllerReturn;
2780
+ controller?: UseModalControlsReturn;
2747
2781
  options: {
2748
2782
  icon: IconType;
2749
2783
  label: string;
@@ -2790,7 +2824,7 @@ declare const inAppPaymentOption: () => {
2790
2824
  };
2791
2825
 
2792
2826
  interface TaskResultDialogProps {
2793
- controller: UseDialogControllerReturn<TaskResult<SuccessMessage>>;
2827
+ controller: UseModalControlsReturn<TaskResult<SuccessMessage>>;
2794
2828
  unmountOnExit?: boolean;
2795
2829
  /**@default "2.75rem" */
2796
2830
  indicatorSize?: ElementDim | ((status: "success" | "error") => ElementDim);
@@ -3216,4 +3250,4 @@ declare function remAsPx(rem: number): string;
3216
3250
  declare function isOverflown(element: HTMLElement): boolean;
3217
3251
  declare function computedCssVariable(cssVariable: string): string;
3218
3252
 
3219
- 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 };
3253
+ 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 };