@northlight/ui 2.0.0 → 2.1.0

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.
@@ -1,5 +1,5 @@
1
1
  import { AccordionProps, AccordionButtonProps, AccordionPanelProps, AccordionItemProps, AvatarProps as AvatarProps$1, AlertProps as AlertProps$1, AspectRatioProps, StackProps, BadgeProps, ButtonProps as ButtonProps$1, CheckboxProps as CheckboxProps$1, StackDirection, IconButtonProps as IconButtonProps$1, InputProps, FlexProps, BoxProps, TagProps as TagProps$1, IconProps as IconProps$1, SystemStyleObject, HeadingProps as HeadingProps$1, TextProps, FormLabelProps as FormLabelProps$1, Heading, Text, ModalProps as ModalProps$1, NumberInputProps as NumberInputProps$1, PinInputProps as PinInputProps$1, RadioProps as RadioProps$1, RadioGroupProps as RadioGroupProps$1, SpinnerProps as SpinnerProps$1, SwitchProps as SwitchProps$1, TabsProps as TabsProps$1, TabPanelProps as TabPanelProps$1, TextareaProps as TextareaProps$1, UseToastOptions as UseToastOptions$1, FadeProps as FadeProps$1, ScaleFadeProps as ScaleFadeProps$1, SlideProps as SlideProps$1, SlideFadeProps as SlideFadeProps$1, CollapseProps as CollapseProps$1, TabListProps, TabProps, LinkProps, GridProps, GridItemProps, EditableProps as EditableProps$1 } from '@chakra-ui/react';
2
- export { AbsoluteCenter, AccordionButtonProps, AccordionIcon, AccordionIconProps, AccordionItemProps, AccordionPanelProps, AccordionProps, AlertDescription, AlertDialog, AlertDialogBody, AlertDialogCloseButton, AlertDialogContent, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertIcon, AlertTitle, AspectRatioProps, BadgeProps, Box, BoxProps, BreadcrumbItem as Breadcrumb, BreadcrumbLink, BreadcrumbSeparator, Breadcrumb as Breadcrumbs, ButtonGroup, Card, CardBody, CardFooter, CardHeader, Center, Modal as ChakraModal, CheckboxGroup, Circle, CircularProgress, CircularProgressLabel, CloseButton, Code, Container, Divider, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerFooter, DrawerHeader, DrawerOverlay, Editable, EditableInput, EditablePreview, Flex, FormControl, FormErrorMessage, FormHelperText, Grid, GridItem, HStack, Heading, Highlight, Image, Input, InputAddon, InputGroup, InputLeftAddon, InputLeftElement, InputRightAddon, InputRightElement, Kbd, Link, LinkOverlay, List, ListIcon, ListItem, Menu, MenuButton, MenuCommand, MenuDivider, MenuGroup, MenuIcon, MenuItem, MenuItemOption, MenuList, MenuOptionGroup, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, NumberDecrementStepper, NumberIncrementStepper, OrderedList, PinInputField, Popover, PopoverAnchor, PopoverArrow, PopoverBody, PopoverCloseButton, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, Portal, RangeSlider, RangeSliderFilledTrack, RangeSliderMark, RangeSliderThumb, RangeSliderTrack, SimpleGrid, Skeleton, SkeletonCircle, SkeletonText, Slider, SliderFilledTrack, SliderMark, SliderThumb, SliderTrack, Spacer, Stack, StackDivider, Stat, StatArrow, StatGroup, StatHelpText, StatLabel, StatNumber, TabIndicator as StepIndicator, TabPanels as StepPanels, Tab, TabIndicator, TabList, TabPanels, Table, TableCaption, TableContainer, TagCloseButton, TagLabel, TagLeftIcon, TagRightIcon, Tbody, Td, Text, Tfoot, Th, Thead, Tooltip, Tr, UnorderedList, VStack, VisuallyHidden, VisuallyHiddenInput, Wrap, WrapItem, useBoolean, useBreakpoint, useBreakpointValue, useClipboard, useControllableProp, useControllableState, useDisclosure, useEditable, useEditableControls, useEditableState, useMediaQuery, useMergeRefs, useNumberInput, useOutsideClick, usePrefersReducedMotion, useRadio, useRadioGroup, useTab, useTabs, useTheme, useToken } from '@chakra-ui/react';
2
+ export { AbsoluteCenter, AccordionButtonProps, AccordionIcon, AccordionIconProps, AccordionItemProps, AccordionPanelProps, AccordionProps, AlertDescription, AlertDialog, AlertDialogBody, AlertDialogCloseButton, AlertDialogContent, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertIcon, AlertTitle, AspectRatioProps, BadgeProps, Box, BoxProps, BreadcrumbItem as Breadcrumb, BreadcrumbLink, BreadcrumbSeparator, Breadcrumb as Breadcrumbs, ButtonGroup, Card, CardBody, CardFooter, CardHeader, Center, Modal as ChakraModal, CheckboxGroup, Circle, CircularProgress, CircularProgressLabel, CloseButton, Code, Container, Divider, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerFooter, DrawerHeader, DrawerOverlay, Editable, EditableInput, EditablePreview, Flex, FormControl, FormErrorMessage, FormHelperText, Grid, GridItem, HStack, Heading, Highlight, Image, Input, InputAddon, InputGroup, InputLeftAddon, InputLeftElement, InputRightAddon, InputRightElement, Kbd, Link, LinkOverlay, List, ListIcon, ListItem, Menu, MenuButton, MenuCommand, MenuDivider, MenuGroup, MenuIcon, MenuItem, MenuItemOption, MenuList, MenuOptionGroup, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, NumberDecrementStepper, NumberIncrementStepper, OrderedList, PinInputField, Popover, PopoverAnchor, PopoverArrow, PopoverBody, PopoverCloseButton, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, Portal, RangeSlider, RangeSliderFilledTrack, RangeSliderMark, RangeSliderThumb, RangeSliderTrack, SimpleGrid, Skeleton, SkeletonCircle, SkeletonText, Slider, SliderFilledTrack, SliderMark, SliderThumb, SliderTrack, Spacer, Stack, StackDivider, Stat, StatArrow, StatGroup, StatHelpText, StatLabel, StatNumber, TabIndicator as StepIndicator, TabPanels as StepPanels, Tab, TabIndicator, TabList, TabPanels, Table, TableCaption, TableContainer, TagCloseButton, TagLabel, TagLeftIcon, TagRightIcon, Tbody, Td, Text, Tfoot, Th, Thead, Tooltip, Tr, UnorderedList, VStack, VisuallyHidden, VisuallyHiddenInput, Wrap, WrapItem, useBoolean, useBreakpoint, useBreakpointValue, useClipboard, useControllableProp, useControllableState, useDisclosure, useEditable, useEditableControls, useEditableState, useInterval, useMediaQuery, useMergeRefs, useNumberInput, useOutsideClick, usePrefersReducedMotion, useRadio, useRadioGroup, useTab, useTabs, useTheme, useToken } from '@chakra-ui/react';
3
3
  import * as React$1 from 'react';
4
4
  import React__default, { ChangeEvent, ComponentType, InputHTMLAttributes, ReactNode, ReactElement } from 'react';
5
5
  import { RegisterOptions, FieldValues, UseFormReturn as UseFormReturn$1, SetValueConfig, ControllerRenderProps, UseFormProps, FieldError, Merge, FieldErrorsImpl } from 'react-hook-form';
@@ -13,6 +13,7 @@ import { Props, GroupBase, ActionMeta, ChakraStylesConfig, SelectInstance, MenuL
13
13
  export { AsyncCreatableSelect, AsyncSelect, Select as ChakraReactSelect, CreatableSelect } from 'chakra-react-select';
14
14
  import { DndContextProps, UseDroppableArguments, UseDraggableArguments, UniqueIdentifier, CollisionDetection, SensorDescriptor, SensorOptions } from '@dnd-kit/core';
15
15
  export * from '@dnd-kit/core';
16
+ export { useInterval as dndUseInterval } from '@dnd-kit/core';
16
17
  import { UseSortableArguments, SortingStrategy, SortableContextProps } from '@dnd-kit/sortable';
17
18
  export * from '@dnd-kit/sortable';
18
19
  import { SyntheticListenerMap } from '@dnd-kit/core/dist/hooks/utilities';
@@ -310,6 +311,8 @@ interface CheckboxFieldProps extends CheckboxProps$1 {
310
311
  isRequired?: boolean;
311
312
  variant?: CheckboxVariants;
312
313
  direction?: StackDirection;
314
+ labelPlacement?: 'left' | 'right';
315
+ labelSize?: '2xs' | 'xs' | 'md' | 'lg';
313
316
  }
314
317
 
315
318
  /**
@@ -346,9 +349,21 @@ declare const Checkbox: ({ value, onChange, name, size, variant, ...rest }: Chec
346
349
  * meant to be used only inside <Form />
347
350
  * @see Checkbox
348
351
  * @see {@link https://northlight.dev/reference/checkbox-field}
352
+ * @example (Example)
353
+ * ## Basic
354
+ * (?
355
+ * <Form initialValues={{name: ''}}>
356
+ * <CheckboxField
357
+ * name="terms"
358
+ * label="I agree to the Terms & Conditions"
359
+ * labelPlacement="left"
360
+ * labelSize="md"
361
+ * />
362
+ * </Form>
363
+ * ?)
349
364
  *
350
365
  */
351
- declare const CheckboxField: ({ name, label, variant, isRequired, validate, direction, ...rest }: CheckboxFieldProps) => JSX.Element;
366
+ declare const CheckboxField: ({ name, label, variant, isRequired, validate, onChange: onChangeCallback, direction, labelPlacement, labelSize, ...rest }: CheckboxFieldProps) => JSX.Element;
352
367
 
353
368
  type ColorPickerSize = 'sm' | 'md' | 'lg';
354
369
  interface ColorPickerProps extends Omit<IconButtonProps$1, 'onChange' | 'value' | 'aria-label' | 'variant'> {
@@ -469,6 +484,7 @@ interface FlipButtonProps {
469
484
  icon?: ComponentType<any>;
470
485
  value: string;
471
486
  label?: string;
487
+ iconPlacement?: 'left' | 'right' | 'none';
472
488
  children?: ((props: CustomFlipButtonProps) => JSX.Element) | string;
473
489
  }
474
490
  interface FlipButtonGroupProps extends Omit<FlipButtonProps, 'value' | 'children' | 'label'> {
@@ -477,6 +493,7 @@ interface FlipButtonGroupProps extends Omit<FlipButtonProps, 'value' | 'children
477
493
  children?: React__default.ReactNode[] | React__default.ReactNode;
478
494
  name?: string;
479
495
  value?: string | string[];
496
+ iconPlacement?: 'left' | 'right' | 'none';
480
497
  /** This enables passing styles directly to the div closes to the flip buttons */
481
498
  sx?: CSSObject;
482
499
  }
@@ -486,6 +503,7 @@ interface FlipButtonGroupFieldProps extends FlipButtonGroupProps {
486
503
  isRequired?: boolean;
487
504
  validate?: RegisterOptions;
488
505
  value?: string;
506
+ iconPlacement?: 'left' | 'right' | 'none';
489
507
  }
490
508
 
491
509
  /**
@@ -601,7 +619,7 @@ declare const FlipButtonGroup: (props: FlipButtonGroupProps) => JSX.Element;
601
619
  * ?)
602
620
  *
603
621
  */
604
- declare const FlipButtonGroupField: ({ name, label, children, direction, isRequired, onChange: onChangeCallback, validate, ...rest }: FlipButtonGroupFieldProps) => JSX.Element;
622
+ declare const FlipButtonGroupField: ({ name, label, children, direction, isRequired, iconPlacement, onChange: onChangeCallback, validate, ...rest }: FlipButtonGroupFieldProps) => JSX.Element;
605
623
 
606
624
  type Color = 'blue' | 'gray' | 'red' | 'pink' | 'green' | 'orange' | 'purple' | 'yellow' | 'mediatoolBlue';
607
625
  type ColorGrade = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
@@ -2570,6 +2588,7 @@ type SwitchFieldProps = SwitchProps$1 & {
2570
2588
  validate?: RegisterOptions;
2571
2589
  isRequired?: boolean;
2572
2590
  direction?: StackDirection;
2591
+ labelPosition?: 'left' | 'right';
2573
2592
  };
2574
2593
 
2575
2594
  /**
@@ -2601,9 +2620,20 @@ declare const Switch: ({ value, onChange, name, size, ...rest }: SwitchProps) =>
2601
2620
  * meant to be used only inside <Form />
2602
2621
  * @see switch
2603
2622
  * @see {@link https://northlight.dev/reference/switch-field}
2623
+ * @example (Example)
2624
+ * ## Basic
2625
+ * (?
2626
+ * <Form initialValues={{name: ''}}>
2627
+ * <SwitchField
2628
+ * name="terms"
2629
+ * label="I agree to the Terms & Conditions"
2630
+ * labelPosition="left"
2631
+ * />
2632
+ * </Form>
2633
+ * ?)
2604
2634
  *
2605
2635
  */
2606
- declare const SwitchField: ({ name, label, isRequired, validate, onChange: onChangeCallback, direction, ...rest }: SwitchFieldProps) => JSX.Element;
2636
+ declare const SwitchField: ({ name, label, isRequired, validate, onChange: onChangeCallback, direction, labelPosition, ...rest }: SwitchFieldProps) => JSX.Element;
2607
2637
 
2608
2638
  interface TabsProps extends TabsProps$1 {
2609
2639
  }
@@ -3420,6 +3450,10 @@ It takes all the props that a normal stack takes, with the addition of a
3420
3450
  */
3421
3451
  declare const StepStack: ({ children, spacing, rowHeight, ...rest }: StepStackProps) => JSX.Element;
3422
3452
 
3453
+ declare const useDebounce: <T>(value: T, delay: number) => T;
3454
+
3455
+ declare const useLoadingMessage: (prefix?: string, delay?: number) => string;
3456
+
3423
3457
  declare const useArrowFocus: (columns: number) => {
3424
3458
  defaultArrows: (e: any) => void;
3425
3459
  focusPrevious: ({ repeat, wrap, }?: {
@@ -3452,4 +3486,4 @@ declare const useSelectCallbacks: <T extends BasicOption>({ onChange, onAdd, onR
3452
3486
  declare const theme: Record<string, any>;
3453
3487
  declare const tottTheme: Record<string, any>;
3454
3488
 
3455
- export { Accordion, AccordionButton, AccordionItem, AccordionPanel, Alert, AlertProps, AlertVariants, AspectRatio, AsyncError, AsyncErrorProps, Avatar, AvatarBadgeProps, AvatarGroup, AvatarGroupProps, AvatarProps, Badge, BasicOption, Blinker, BlinkerProps, BlockVariant, BlockVariantColorTuple, Blockquote, BodyType, Button, ButtonProps, ButtonVariants, Capitalized, Carousel, Checkbox, CheckboxField, CheckboxFieldProps, CheckboxProps, CheckboxVariants, ChildrenType, Clickable, ClickableProps, ClipboardInput, ClipboardInputProps, Collapse, CollapseProps, Color, ColorButtonProps, ColorGrade, ColorPicker, ColorPickerField, ColorPickerFieldProps, ColorPickerProps, ColorShades, ColorsExpandButtonProps, ConfirmDeleteModalProps, CurrentTheme, CustomContainerPropsType, CustomElementType, CustomFlipButtonProps, CustomFlipButtonPropsType, CustomTheme, DatePicker, DatePickerField, DatePickerFieldProps, DatePickerProps, DateRange, DateRangePicker, DateRangePickerField, DateRangePickerFieldProps, DateRangePickerProps, DragAndDrop, DragHandle, DragHandleProps, DragItem, DragItemProps, Draggable, DraggableProps, DropZone, DropZoneProps, Droppable, DroppableProps, DurationType, EditableControlsProps, EditableProps, EditableSizes, EditableText, Fade, FadeProps, FastGrid, FastGridProps, FastList, FastListProps, Field, FieldErrorType, FieldProps, FileEditorModalProps, FileFormat, FileIconButtonProps, FileItemProps, FilePicker, FilePickerField, FilePickerFieldProps, FilePickerProps, FileWithSizeAndType, FileWithSrcNameType, FileWithType, FlipButton, FlipButtonGroup, FlipButtonGroupField, FlipButtonGroupFieldProps, FlipButtonGroupProps, FlipButtonProps, Form, FormBody, FormLabel, FormLabelProps, FormProps, FormattedNumberInput, FormattedNumberInputProps, H1, H2, H3, H4, H5, H6, HeadingProps, HeadingType, Icon, IconButton, IconButtonProps, IconProps, InputFieldProps, Label, LabelProps, LabelSizes, LabelType, Lead, ListenersType, MaskedTextInput, MaskedTextInputProps, MediatoolThemeProvider, MediatoolThemeProviderProps, Modal, ModalBooleans, ModalProps, ModalSizes, MultiFileList, MultiFileListProps, MultiFilePicker, MultiFilePickerField, MultiFilePickerFieldProps, MultiFilePickerProps, MultiFileUploader, MultiFileUploaderProps, MultiItemType, MultiSort, MultiSortProps, NotificationIconButton, NotificationIconButtonProps, NumberInput, NumberInputField, NumberInputFieldProps, NumberInputProps, NumberInputSizeProps, NumberInputStepperProps, OffsetType, Option, OrganizationLogo, OrganizationLogoProps, OverflowGroup, OverflowGroupProps, OverflowIndicatorProps, P, PProps, PaneDivider, PaneItem, PinInput, PinInputProps, PinSize, PinSizeTuple, PinVariant, ProgressBar, Radio, RadioFieldGroupProps, RadioFieldProps, RadioGroup, RadioGroupField, RadioGroupProps, RadioProps, ScaleFade, ScaleFadeProps, SearchBar, SearchBarField, SearchBarFieldProps, SearchBarOptionType, SearchBarProps, Select, SelectActionMeta, SelectField, SelectFieldProps, SelectProps, SetValueOptionsType, Slide, SlideFade, SlideFadeProps, SlideProps, Small, Sortable, SortableContainer, SortableContainerProps, SortableItem, SortableItemProps, SortableList, SortableListProps, Spinner, SpinnerProps, SplitPane, SplitPaneProps, StatusBlock, StatusBlockProps, StatusPin, StatusPinProps, Step, StepList, StepListProps, StepPanel, StepPanelProps, StepProps, StepStack, Steps, StepsProps, StylizedType, Switch, SwitchField, SwitchFieldProps, SwitchProps, TabPanel, TabPanelProps, Tabs, TabsProps, Tag, TagGroup, TagGroupProps, TagProps, TextField, TextFieldProps, TextInputFormatter, TextSizeProps, Textarea, TextareaField, TextareaFieldProps, TextareaProps, Tiny, Toast, ToastProps, Toolbox, ToolboxContent, ToolboxContentProps, ToolboxFooter, ToolboxFooterProps, ToolboxHeader, ToolboxHeaderProps, ToolboxProps, TransitionDirection, UseFormReturn, UseSelectCallbacksProps, UseToastOptions, addAlpha, advancedParseFloat, createDebounceFunctionInstance, getChildrenWithProps, getContrastColor, getFieldError, getInitials, getShades, highlight, luminosity, ring, statusIconMap, theme, tottTheme, trimFormValues, useArrowFocus, useCurrentTheme, useOverflowGroup, useSelectCallbacks, useSetValueRefreshed, useToast };
3489
+ export { Accordion, AccordionButton, AccordionItem, AccordionPanel, Alert, AlertProps, AlertVariants, AspectRatio, AsyncError, AsyncErrorProps, Avatar, AvatarBadgeProps, AvatarGroup, AvatarGroupProps, AvatarProps, Badge, BasicOption, Blinker, BlinkerProps, BlockVariant, BlockVariantColorTuple, Blockquote, BodyType, Button, ButtonProps, ButtonVariants, Capitalized, Carousel, Checkbox, CheckboxField, CheckboxFieldProps, CheckboxProps, CheckboxVariants, ChildrenType, Clickable, ClickableProps, ClipboardInput, ClipboardInputProps, Collapse, CollapseProps, Color, ColorButtonProps, ColorGrade, ColorPicker, ColorPickerField, ColorPickerFieldProps, ColorPickerProps, ColorShades, ColorsExpandButtonProps, ConfirmDeleteModalProps, CurrentTheme, CustomContainerPropsType, CustomElementType, CustomFlipButtonProps, CustomFlipButtonPropsType, CustomTheme, DatePicker, DatePickerField, DatePickerFieldProps, DatePickerProps, DateRange, DateRangePicker, DateRangePickerField, DateRangePickerFieldProps, DateRangePickerProps, DragAndDrop, DragHandle, DragHandleProps, DragItem, DragItemProps, Draggable, DraggableProps, DropZone, DropZoneProps, Droppable, DroppableProps, DurationType, EditableControlsProps, EditableProps, EditableSizes, EditableText, Fade, FadeProps, FastGrid, FastGridProps, FastList, FastListProps, Field, FieldErrorType, FieldProps, FileEditorModalProps, FileFormat, FileIconButtonProps, FileItemProps, FilePicker, FilePickerField, FilePickerFieldProps, FilePickerProps, FileWithSizeAndType, FileWithSrcNameType, FileWithType, FlipButton, FlipButtonGroup, FlipButtonGroupField, FlipButtonGroupFieldProps, FlipButtonGroupProps, FlipButtonProps, Form, FormBody, FormLabel, FormLabelProps, FormProps, FormattedNumberInput, FormattedNumberInputProps, H1, H2, H3, H4, H5, H6, HeadingProps, HeadingType, Icon, IconButton, IconButtonProps, IconProps, InputFieldProps, Label, LabelProps, LabelSizes, LabelType, Lead, ListenersType, MaskedTextInput, MaskedTextInputProps, MediatoolThemeProvider, MediatoolThemeProviderProps, Modal, ModalBooleans, ModalProps, ModalSizes, MultiFileList, MultiFileListProps, MultiFilePicker, MultiFilePickerField, MultiFilePickerFieldProps, MultiFilePickerProps, MultiFileUploader, MultiFileUploaderProps, MultiItemType, MultiSort, MultiSortProps, NotificationIconButton, NotificationIconButtonProps, NumberInput, NumberInputField, NumberInputFieldProps, NumberInputProps, NumberInputSizeProps, NumberInputStepperProps, OffsetType, Option, OrganizationLogo, OrganizationLogoProps, OverflowGroup, OverflowGroupProps, OverflowIndicatorProps, P, PProps, PaneDivider, PaneItem, PinInput, PinInputProps, PinSize, PinSizeTuple, PinVariant, ProgressBar, Radio, RadioFieldGroupProps, RadioFieldProps, RadioGroup, RadioGroupField, RadioGroupProps, RadioProps, ScaleFade, ScaleFadeProps, SearchBar, SearchBarField, SearchBarFieldProps, SearchBarOptionType, SearchBarProps, Select, SelectActionMeta, SelectField, SelectFieldProps, SelectProps, SetValueOptionsType, Slide, SlideFade, SlideFadeProps, SlideProps, Small, Sortable, SortableContainer, SortableContainerProps, SortableItem, SortableItemProps, SortableList, SortableListProps, Spinner, SpinnerProps, SplitPane, SplitPaneProps, StatusBlock, StatusBlockProps, StatusPin, StatusPinProps, Step, StepList, StepListProps, StepPanel, StepPanelProps, StepProps, StepStack, Steps, StepsProps, StylizedType, Switch, SwitchField, SwitchFieldProps, SwitchProps, TabPanel, TabPanelProps, Tabs, TabsProps, Tag, TagGroup, TagGroupProps, TagProps, TextField, TextFieldProps, TextInputFormatter, TextSizeProps, Textarea, TextareaField, TextareaFieldProps, TextareaProps, Tiny, Toast, ToastProps, Toolbox, ToolboxContent, ToolboxContentProps, ToolboxFooter, ToolboxFooterProps, ToolboxHeader, ToolboxHeaderProps, ToolboxProps, TransitionDirection, UseFormReturn, UseSelectCallbacksProps, UseToastOptions, addAlpha, advancedParseFloat, createDebounceFunctionInstance, getChildrenWithProps, getContrastColor, getFieldError, getInitials, getShades, highlight, luminosity, ring, statusIconMap, theme, tottTheme, trimFormValues, useArrowFocus, useCurrentTheme, useDebounce, useLoadingMessage, useOverflowGroup, useSelectCallbacks, useSetValueRefreshed, useToast };
@@ -1480,6 +1480,31 @@
1480
1480
  );
1481
1481
  };
1482
1482
 
1483
+ const useDebounce = (value, delay) => {
1484
+ const [debouncedValue, setDebouncedValue] = React.useState(value);
1485
+ React.useEffect(() => {
1486
+ const handler = setTimeout(() => {
1487
+ setDebouncedValue(value);
1488
+ }, delay);
1489
+ return () => {
1490
+ clearTimeout(handler);
1491
+ };
1492
+ }, [value, delay]);
1493
+ return debouncedValue;
1494
+ };
1495
+
1496
+ const useLoadingMessage = (prefix = "", delay = 300) => {
1497
+ const [dots, setDots] = React.useState(".");
1498
+ react.useInterval(() => {
1499
+ if (dots.length === 3) {
1500
+ setDots(".");
1501
+ } else {
1502
+ setDots(`${dots}.`);
1503
+ }
1504
+ }, delay);
1505
+ return `${prefix}${dots}`;
1506
+ };
1507
+
1483
1508
  const useArrowFocus = (columns) => {
1484
1509
  const {
1485
1510
  focusNext: next,
@@ -1654,35 +1679,59 @@
1654
1679
  variant,
1655
1680
  isRequired,
1656
1681
  validate,
1657
- direction = "row"
1682
+ onChange: onChangeCallback = ramda.identity,
1683
+ direction = "row",
1684
+ labelPlacement = "left",
1685
+ labelSize = "md"
1658
1686
  } = _b, rest = __objRest$15(_b, [
1659
1687
  "name",
1660
1688
  "label",
1661
1689
  "variant",
1662
1690
  "isRequired",
1663
1691
  "validate",
1664
- "direction"
1692
+ "onChange",
1693
+ "direction",
1694
+ "labelPlacement",
1695
+ "labelSize"
1665
1696
  ]);
1666
- return /* @__PURE__ */ React.createElement(react.Box, { w: label ? "full" : "fit-content" }, /* @__PURE__ */ React.createElement(
1667
- Field,
1697
+ return /* @__PURE__ */ React.createElement(
1698
+ react.Box,
1668
1699
  {
1669
- name,
1670
- label,
1671
- direction,
1672
- isRequired,
1673
- validate
1700
+ w: label ? "full" : "fit-content",
1701
+ display: "inline-flex"
1674
1702
  },
1675
- (field) => /* @__PURE__ */ React.createElement(
1676
- Checkbox$1,
1677
- __spreadValues$1B({
1703
+ /* @__PURE__ */ React.createElement(
1704
+ Field,
1705
+ {
1678
1706
  name,
1679
- "data-testid": "checkbox-field-test-id",
1680
- onChange: field.onChange,
1681
- value: field.value,
1682
- variant
1683
- }, rest)
1707
+ label: "",
1708
+ isRequired,
1709
+ direction,
1710
+ validate
1711
+ },
1712
+ ({ onChange, value }) => /* @__PURE__ */ React.createElement(
1713
+ react.Flex,
1714
+ {
1715
+ gap: 2,
1716
+ direction: labelPlacement === "left" ? "row-reverse" : "row"
1717
+ },
1718
+ /* @__PURE__ */ React.createElement(
1719
+ Checkbox$1,
1720
+ __spreadValues$1B({
1721
+ name,
1722
+ onChange: (e) => {
1723
+ onChange(e);
1724
+ onChangeCallback(e);
1725
+ },
1726
+ value,
1727
+ variant,
1728
+ "data-testid": "checkbox-field-test-id"
1729
+ }, rest)
1730
+ ),
1731
+ /* @__PURE__ */ React.createElement(Label$1, { htmlFor: name, sx: { fontWeight: "normal" }, size: labelSize }, label)
1732
+ )
1684
1733
  )
1685
- ));
1734
+ );
1686
1735
  };
1687
1736
 
1688
1737
  var __defProp$1A = Object.defineProperty;
@@ -2111,7 +2160,8 @@
2111
2160
  isMulti,
2112
2161
  isDisabled = false,
2113
2162
  icon,
2114
- value
2163
+ value,
2164
+ iconPlacement = "left"
2115
2165
  } = _a, rest = __objRest$11(_a, [
2116
2166
  "children",
2117
2167
  "size",
@@ -2119,7 +2169,8 @@
2119
2169
  "isMulti",
2120
2170
  "isDisabled",
2121
2171
  "icon",
2122
- "value"
2172
+ "value",
2173
+ "iconPlacement"
2123
2174
  ]);
2124
2175
  const state = React.useContext(FlipButtonContext);
2125
2176
  const ref = React.useRef(null);
@@ -2161,13 +2212,13 @@
2161
2212
  react.HStack,
2162
2213
  {
2163
2214
  spacing: isSelected || icon ? 2 : 0,
2164
- sx: ramda.merge(button, isFocused ? focusStyles : {}),
2215
+ sx: ramda.mergeAll([button, isFocused ? focusStyles : {}, { flexDirection: iconPlacement === "left" ? "row" : "row-reverse" }]),
2165
2216
  "aria-checked": isSelected,
2166
2217
  "aria-disabled": isDisabled,
2167
2218
  as: "label"
2168
2219
  },
2169
2220
  /* @__PURE__ */ React.createElement("input", __spreadValues$1w({}, flipButtonProps)),
2170
- icon ? /* @__PURE__ */ React.createElement(Icon$1, { as: icon || icons.CheckSolid, sx: buttonIcon }) : isSelected && /* @__PURE__ */ React.createElement(react.SlideFade, { in: isSelected }, /* @__PURE__ */ React.createElement(Icon$1, { as: icon || icons.CheckSolid, sx: buttonIcon })),
2221
+ icon && iconPlacement !== "none" ? /* @__PURE__ */ React.createElement(Icon$1, { as: icon || icons.CheckSolid, sx: buttonIcon }) : isSelected && iconPlacement !== "none" && /* @__PURE__ */ React.createElement(react.SlideFade, { in: isSelected }, /* @__PURE__ */ React.createElement(Icon$1, { as: icon || icons.CheckSolid, sx: buttonIcon })),
2171
2222
  /* @__PURE__ */ React.createElement(react.Text, { textAlign: "center" }, children)
2172
2223
  );
2173
2224
  };
@@ -2210,6 +2261,7 @@
2210
2261
  children,
2211
2262
  direction = "row",
2212
2263
  isDisabled = false,
2264
+ iconPlacement = "left",
2213
2265
  size,
2214
2266
  variant,
2215
2267
  icon,
@@ -2220,6 +2272,7 @@
2220
2272
  "children",
2221
2273
  "direction",
2222
2274
  "isDisabled",
2275
+ "iconPlacement",
2223
2276
  "size",
2224
2277
  "variant",
2225
2278
  "icon",
@@ -2233,6 +2286,7 @@
2233
2286
  isMulti,
2234
2287
  variant,
2235
2288
  isDisabled,
2289
+ iconPlacement,
2236
2290
  icon,
2237
2291
  size
2238
2292
  }, child.props)) : child
@@ -2291,6 +2345,7 @@
2291
2345
  children,
2292
2346
  direction,
2293
2347
  isRequired,
2348
+ iconPlacement = "left",
2294
2349
  onChange: onChangeCallback = ramda.identity,
2295
2350
  validate
2296
2351
  } = _b, rest = __objRest$$(_b, [
@@ -2299,6 +2354,7 @@
2299
2354
  "children",
2300
2355
  "direction",
2301
2356
  "isRequired",
2357
+ "iconPlacement",
2302
2358
  "onChange",
2303
2359
  "validate"
2304
2360
  ]);
@@ -2320,7 +2376,8 @@
2320
2376
  onChangeCallback(e);
2321
2377
  },
2322
2378
  direction,
2323
- value
2379
+ value,
2380
+ iconPlacement
2324
2381
  }, rest),
2325
2382
  children
2326
2383
  )
@@ -10873,35 +10930,45 @@
10873
10930
  isRequired,
10874
10931
  validate,
10875
10932
  onChange: onChangeCallback = ramda.identity,
10876
- direction = "row"
10933
+ direction = "row",
10934
+ labelPosition = "right"
10877
10935
  } = _b, rest = __objRest$d(_b, [
10878
10936
  "name",
10879
10937
  "label",
10880
10938
  "isRequired",
10881
10939
  "validate",
10882
10940
  "onChange",
10883
- "direction"
10941
+ "direction",
10942
+ "labelPosition"
10884
10943
  ]);
10885
10944
  return /* @__PURE__ */ React.createElement(react.Box, { w: label ? "full" : "fit-content" }, /* @__PURE__ */ React.createElement(
10886
10945
  Field,
10887
10946
  {
10888
10947
  name,
10889
- label,
10948
+ label: "",
10890
10949
  isRequired,
10891
10950
  direction,
10892
10951
  validate
10893
10952
  },
10894
10953
  ({ onChange, value }) => /* @__PURE__ */ React.createElement(
10895
- Switch,
10896
- __spreadValues$i({
10897
- name,
10898
- onChange: (e) => {
10899
- onChange(e);
10900
- onChangeCallback(e);
10901
- },
10902
- value,
10903
- "data-testid": "switch-field-test-id"
10904
- }, rest)
10954
+ react.Flex,
10955
+ {
10956
+ gap: 2,
10957
+ direction: labelPosition === "left" ? "row-reverse" : "row"
10958
+ },
10959
+ /* @__PURE__ */ React.createElement(
10960
+ Switch,
10961
+ __spreadValues$i({
10962
+ name,
10963
+ onChange: (e) => {
10964
+ onChange(e);
10965
+ onChangeCallback(e);
10966
+ },
10967
+ value,
10968
+ "data-testid": "switch-field-test-id"
10969
+ }, rest)
10970
+ ),
10971
+ label && /* @__PURE__ */ React.createElement(Label$1, { htmlFor: name }, label)
10905
10972
  )
10906
10973
  ));
10907
10974
  };
@@ -12522,6 +12589,10 @@
12522
12589
  enumerable: true,
12523
12590
  get: function () { return react.useEditableState; }
12524
12591
  });
12592
+ Object.defineProperty(exports, 'useInterval', {
12593
+ enumerable: true,
12594
+ get: function () { return react.useInterval; }
12595
+ });
12525
12596
  Object.defineProperty(exports, 'useMediaQuery', {
12526
12597
  enumerable: true,
12527
12598
  get: function () { return react.useMediaQuery; }
@@ -12606,6 +12677,10 @@
12606
12677
  enumerable: true,
12607
12678
  get: function () { return chakraReactSelect.CreatableSelect; }
12608
12679
  });
12680
+ Object.defineProperty(exports, 'dndUseInterval', {
12681
+ enumerable: true,
12682
+ get: function () { return core.useInterval; }
12683
+ });
12609
12684
  exports.Accordion = Accordion;
12610
12685
  exports.AccordionButton = AccordionButton;
12611
12686
  exports.AccordionItem = AccordionItem;
@@ -12736,6 +12811,8 @@
12736
12811
  exports.trimFormValues = trimFormValues;
12737
12812
  exports.useArrowFocus = useArrowFocus;
12738
12813
  exports.useCurrentTheme = useCurrentTheme;
12814
+ exports.useDebounce = useDebounce;
12815
+ exports.useLoadingMessage = useLoadingMessage;
12739
12816
  exports.useOverflowGroup = useOverflowGroup;
12740
12817
  exports.useSelectCallbacks = useSelectCallbacks;
12741
12818
  exports.useSetValueRefreshed = useSetValueRefreshed;