@wavy/react-ui 0.0.50 → 0.0.51

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
@@ -6,7 +6,7 @@ import { NoUndefinedField, SafeOmit, FileDetails, Prettify, AddPrefix, TaskResul
6
6
  import { IconType } from 'react-icons';
7
7
  import * as CSS from 'csstype';
8
8
  import CSS__default from 'csstype';
9
- import { AvatarGroupProps as AvatarGroupProps$1, SpinnerProps as SpinnerProps$1, 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
+ import { SwitchRootProps, AvatarGroupProps as AvatarGroupProps$1, SpinnerProps as SpinnerProps$1, 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';
10
10
  export { MenuRootProps, UseStepsProps, useSteps } from '@chakra-ui/react';
11
11
  import { JSX as JSX$1 } from '@emotion/react/jsx-runtime';
12
12
  import { StepsVariant } from 'node_modules/@chakra-ui/react/dist/types/styled-system/generated/recipes.gen';
@@ -1478,6 +1478,24 @@ 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 SwitchProps extends Partial<Record<`${"track" | "thumb"}Indicator`, Partial<Record<"on" | "off", React__default.ReactNode>>>>, Partial<Record<`${"thumb" | "track"}Style`,
1482
+ /** Apply conditional styles based on the `checked` state. */
1483
+ (checked: boolean) => SafeOmit<CSS.Properties, "backgroundColor" | "color" | "borderColor"> & {
1484
+ backgroundColor?: BasicColor$1;
1485
+ color?: BasicColor$1;
1486
+ borderColor?: BasicColor$1;
1487
+ }>> {
1488
+ defaultChecked?: boolean;
1489
+ checked?: boolean;
1490
+ label?: string;
1491
+ disabled?: boolean;
1492
+ size?: SwitchRootProps["size"];
1493
+ /**@default "solid" */
1494
+ variant?: SwitchRootProps["variant"];
1495
+ onChange?: (checked: boolean) => void;
1496
+ }
1497
+ declare function Switch(props: SwitchProps): react_jsx_runtime.JSX.Element;
1498
+
1481
1499
  interface DebounceProps {
1482
1500
  /**@default 300 */
1483
1501
  delay?: number;
@@ -3292,10 +3310,12 @@ declare function usePostRenderEffect(effect: React__default.EffectCallback, deps
3292
3310
  interface ComputedStyleProps extends SafeOmit<BasicStyleProps, "className"> {
3293
3311
  children?: React__default.ReactNode;
3294
3312
  }
3295
- declare function useComputedStyle(elementTag: keyof HTMLElementTagNameMap, props: ComputedStyleProps, options?: Partial<{
3296
- debug: boolean;
3297
- inject: () => CSS.Properties;
3298
- }>): {
3313
+ declare function useComputedStyle(options: {
3314
+ /**@default "div" */
3315
+ tag?: keyof HTMLElementTagNameMap;
3316
+ style: ComputedStyleProps;
3317
+ inject?: () => CSS.Properties;
3318
+ }): {
3299
3319
  style: {
3300
3320
  [key: string]: string;
3301
3321
  };
@@ -3309,6 +3329,7 @@ declare function useStore<T extends NonFunction<any>>(options: {
3309
3329
  * @warning Attempting to store a function will throw an error.
3310
3330
  */
3311
3331
  defaultValue: CastFn<T>;
3332
+ readOnly?: boolean;
3312
3333
  /**Re-renders the component when the value is changed
3313
3334
  * @default false
3314
3335
  */
@@ -3350,6 +3371,7 @@ declare function useStore<T extends NonFunction<any>>(options: {
3350
3371
  skipRender: boolean;
3351
3372
  /** Skips the validate callback */
3352
3373
  skipValidation: boolean;
3374
+ bypassReadOnly: boolean;
3353
3375
  }>) => void;
3354
3376
  read: () => T;
3355
3377
  /** Completely removes all the stored data (including persisted data) */
@@ -3384,6 +3406,7 @@ declare function useRerender(): {
3384
3406
  triggerRerender: () => void;
3385
3407
  };
3386
3408
 
3409
+ /**@deprecated Migrate to useStore (set the reactive option to true, and configure the persist option) */
3387
3410
  declare function useSessionStorage<Value extends NonFunction<any>>(key: string, initialValue: Value): readonly [Value, (update: Value | ((previousValue: Value) => Value)) => void, () => void];
3388
3411
 
3389
3412
  declare function useEvent<EventMapper extends Record<string, any>>(options?: Partial<{
@@ -3401,7 +3424,7 @@ declare function useEvent<EventMapper extends Record<string, any>>(options?: Par
3401
3424
  dettach: (key: keyof EventMapper) => boolean;
3402
3425
  };
3403
3426
 
3404
- /**A hook that allows you to optionally skip re-rendering on state change */
3427
+ /**@deprecated Migrate to useStore */
3405
3428
  declare function useSmartState<T>(value?: CastFn<T>): readonly [T, (value: T | ((previousValue: T) => T), options?: {
3406
3429
  skipRender: boolean;
3407
3430
  }) => void];
@@ -3470,4 +3493,4 @@ declare function remAsPx(rem: number): string;
3470
3493
  declare function isOverflown(element: HTMLElement): boolean;
3471
3494
  declare function computedCssVariable(cssVariable: string): string;
3472
3495
 
3473
- 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, useModalControls, usePageSliderController, usePopoverContext, usePostRenderEffect, useRerender, useSessionStorage, useSmartState, useStore };
3496
+ 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, Switch, type SwitchProps, 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, useModalControls, usePageSliderController, usePopoverContext, usePostRenderEffect, useRerender, useSessionStorage, useSmartState, useStore };