@northlight/ui 2.13.0 → 2.14.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.
- package/dist/es/northlight.d.ts +57 -11
- package/dist/es/northlight.js +1144 -994
- package/dist/es/northlight.js.map +1 -1
- package/dist/umd/northlight.cjs +1142 -991
- package/dist/umd/northlight.cjs.map +1 -1
- package/dist/umd/northlight.min.cjs +3 -3
- package/dist/umd/northlight.min.cjs.map +1 -1
- package/package.json +2 -2
package/dist/es/northlight.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { AccordionProps, AccordionButtonProps, AccordionPanelProps, AccordionItemProps, StackDirection, AvatarProps as AvatarProps$1, AlertProps as AlertProps$1, AspectRatioProps, StackProps, BadgeProps, ButtonProps as ButtonProps$1, CheckboxProps as CheckboxProps$1, IconButtonProps as IconButtonProps$1, PopoverProps, 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, TableProps as TableProps$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
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, Hide, Highlight, Image, Input, InputAddon, InputGroup, InputLeftAddon, InputLeftElement, InputRightAddon, InputRightElement, Kbd, Link, LinkBox, 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, Show, SimpleGrid, Skeleton, SkeletonCircle, SkeletonText, Slider, SliderFilledTrack, SliderMark, SliderThumb, SliderTrack, Spacer, Stack, StackDivider, StackProps, Stat, StatArrow, StatGroup, StatHelpText, StatLabel, StatNumber, TabIndicator as StepIndicator, TabPanels as StepPanels, Tab, TabIndicator, TabList, TabPanels, TableBodyProps, TableCaption, TableCaptionProps, TableCellProps, TableColumnHeaderProps, TableContainer, TableContainerProps, TableFooterProps, TableHeadProps, TableRowProps, TagCloseButton, TagLabel, TagLeftIcon, TagRightIcon, Tbody, Td, Text, Tfoot, Th, Thead, Tooltip, Tr, UnorderedList, VStack, VisuallyHidden, VisuallyHiddenInput, Wrap, WrapItem, keyframes, 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 { Props, GroupBase, MultiValue, SingleValue, ActionMeta, MenuListProps, SelectInstance, ChakraStylesConfig } from 'chakra-react-select';
|
|
4
|
-
export { AsyncCreatableSelect, AsyncSelect, Select as ChakraReactSelect, CreatableSelect } from 'chakra-react-select';
|
|
4
|
+
export { AsyncCreatableSelect, AsyncSelect, Select as ChakraReactSelect, CreatableSelect, MultiValue, SingleValue } from 'chakra-react-select';
|
|
5
5
|
import * as React$1 from 'react';
|
|
6
|
-
import React__default, { ComponentType, Ref, RefObject,
|
|
6
|
+
import React__default, { ComponentType, Ref, RefObject, ChangeEvent, InputHTMLAttributes, ReactNode, ReactElement, MutableRefObject, EffectCallback, DependencyList } from 'react';
|
|
7
7
|
import * as react_hook_form from 'react-hook-form';
|
|
8
8
|
import { RegisterOptions, FieldValues, UseFormReturn as UseFormReturn$1, SetValueConfig, FieldPath, Control, ControllerRenderProps, UseFormProps, FieldError, Merge, FieldErrorsImpl } from 'react-hook-form';
|
|
9
9
|
export { useController, useFieldArray, useForm, useFormContext, useFormState, useWatch } from 'react-hook-form';
|
|
10
|
-
import * as _chakra_ui_system_dist_system_types from '@chakra-ui/system/dist/system.types';
|
|
11
10
|
import * as _chakra_ui_button_dist_button from '@chakra-ui/button/dist/button';
|
|
12
11
|
import { CheckboxGroupState } from '@react-stately/checkbox';
|
|
13
12
|
import { RadioGroupState } from '@react-stately/radio';
|
|
@@ -23,6 +22,7 @@ export * from '@dnd-kit/utilities';
|
|
|
23
22
|
export { useInterval as dndUseInterval } from '@dnd-kit/utilities';
|
|
24
23
|
export * from '@dnd-kit/modifiers';
|
|
25
24
|
import { VariableSizeListProps, VariableSizeList, VariableSizeGridProps, VariableSizeGrid } from 'react-window';
|
|
25
|
+
import * as _chakra_ui_system_dist_system_types from '@chakra-ui/system/dist/system.types';
|
|
26
26
|
import * as _chakra_ui_layout_dist_stack_stack_utils from '@chakra-ui/layout/dist/stack/stack.utils';
|
|
27
27
|
import * as _chakra_ui_radio_dist_radio_group from '@chakra-ui/radio/dist/radio-group';
|
|
28
28
|
import * as react_select from 'react-select';
|
|
@@ -475,13 +475,10 @@ interface BlinkerProps {
|
|
|
475
475
|
declare const Blinker: ({ color, size, isBlinking, ...rest }: BlinkerProps) => JSX.Element;
|
|
476
476
|
|
|
477
477
|
type ButtonVariants = 'default' | 'danger' | 'success' | 'brand' | 'brandSubdued' | 'link' | 'ghost';
|
|
478
|
-
type ButtonProps
|
|
478
|
+
type ButtonProps = Omit<ButtonProps$1, 'as' | 'size'> & {
|
|
479
479
|
variant?: ButtonVariants;
|
|
480
480
|
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
481
481
|
};
|
|
482
|
-
type GenericAsProps<As extends React.ElementType> = ({
|
|
483
|
-
as?: As;
|
|
484
|
-
} & ComponentProps<As>);
|
|
485
482
|
|
|
486
483
|
/**
|
|
487
484
|
* @see {@link https://northlight.dev/reference/button}
|
|
@@ -526,11 +523,21 @@ type GenericAsProps<As extends React.ElementType> = ({
|
|
|
526
523
|
*
|
|
527
524
|
* render(<ExampleButton/>)
|
|
528
525
|
* ?)
|
|
526
|
+
*
|
|
527
|
+
* @example (Example)
|
|
528
|
+
* Use LinkOverlay to turn the button into a link
|
|
529
|
+
*
|
|
530
|
+
* (?
|
|
531
|
+
* <LinkBox>
|
|
532
|
+
* <LinkOverlay as={NavLink} to="/" />
|
|
533
|
+
* <Button variant="link">Go to home page</Button>
|
|
534
|
+
* </LinkBox>
|
|
535
|
+
* ?)
|
|
529
536
|
*/
|
|
530
|
-
declare const Button:
|
|
537
|
+
declare const Button: (props: Omit<_chakra_ui_button_dist_button.ButtonProps, "as" | "size"> & {
|
|
531
538
|
variant?: ButtonVariants | undefined;
|
|
532
539
|
size?: "sm" | "md" | "lg" | "xs" | undefined;
|
|
533
|
-
} & React__default.RefAttributes<
|
|
540
|
+
} & React__default.RefAttributes<HTMLButtonElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
534
541
|
|
|
535
542
|
type CheckboxVariants = 'default' | 'rounded';
|
|
536
543
|
interface CheckboxProps extends Omit<CheckboxProps$1, 'value'> {
|
|
@@ -1032,6 +1039,45 @@ declare const DatePickerField: (props: DatePickerFieldProps & React__default.Ref
|
|
|
1032
1039
|
*/
|
|
1033
1040
|
declare const DateRangePickerField: (props: DateRangePickerFieldProps & React__default.RefAttributes<HTMLDivElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1034
1041
|
|
|
1042
|
+
interface IntentButtonProps {
|
|
1043
|
+
icon?: ComponentType<any>;
|
|
1044
|
+
timeout?: number;
|
|
1045
|
+
onTimeout?: () => void;
|
|
1046
|
+
tooltipText?: string;
|
|
1047
|
+
'aria-label'?: string;
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
/**
|
|
1051
|
+
* @see {@link https://northlight.dev/reference/intent-button}
|
|
1052
|
+
*
|
|
1053
|
+
* Hold in to confirm delete
|
|
1054
|
+
*
|
|
1055
|
+
* @example
|
|
1056
|
+
* (?
|
|
1057
|
+
* +
|
|
1058
|
+
*
|
|
1059
|
+
* const Example = () => {
|
|
1060
|
+
* const [isShowing, setIsShowing] = useState(true)
|
|
1061
|
+
*
|
|
1062
|
+
* const handleDelete = () => {
|
|
1063
|
+
* setIsShowing(false)
|
|
1064
|
+
* }
|
|
1065
|
+
*
|
|
1066
|
+
* return (
|
|
1067
|
+
* <>
|
|
1068
|
+
* {isShowing && (
|
|
1069
|
+
* <IntentButton onTimeout={handleDelete} />
|
|
1070
|
+
* )}
|
|
1071
|
+
* </>
|
|
1072
|
+
* )
|
|
1073
|
+
*
|
|
1074
|
+
* }
|
|
1075
|
+
* render(<Example />)
|
|
1076
|
+
*?)
|
|
1077
|
+
*
|
|
1078
|
+
*/
|
|
1079
|
+
declare const IntentButton: ({ icon, timeout, onTimeout, tooltipText, "aria-label": ariaLabel, }: IntentButtonProps) => JSX.Element;
|
|
1080
|
+
|
|
1035
1081
|
interface ToolboxProps extends Omit<FlexProps, 'direction'> {
|
|
1036
1082
|
isResizable?: boolean;
|
|
1037
1083
|
isOpen: boolean;
|
|
@@ -1041,7 +1087,7 @@ interface ToolboxProps extends Omit<FlexProps, 'direction'> {
|
|
|
1041
1087
|
* width, causes layout change. */
|
|
1042
1088
|
shouldPush?: boolean;
|
|
1043
1089
|
children: JSX.Element[] | JSX.Element;
|
|
1044
|
-
size?: 'sm' | 'md' | 'lg';
|
|
1090
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
1045
1091
|
onClose: () => void;
|
|
1046
1092
|
/** if true focuses on the first element in the toolboxcontent. */
|
|
1047
1093
|
autoFocus?: boolean;
|
|
@@ -3770,4 +3816,4 @@ declare const useDidUpdateEffect: (effect: EffectCallback, dependencies: Depende
|
|
|
3770
3816
|
declare const theme: Record<string, any>;
|
|
3771
3817
|
declare const tottTheme: Record<string, any>;
|
|
3772
3818
|
|
|
3773
|
-
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, FormattedNumberInputField, FormattedNumberInputFieldProps, FormattedNumberInputPreset, FormattedNumberInputProps,
|
|
3819
|
+
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, FormattedNumberInputField, FormattedNumberInputFieldProps, FormattedNumberInputPreset, FormattedNumberInputProps, H1, H2, H3, H4, H5, H6, HeadingProps, HeadingType, Icon, IconButton, IconButtonProps, IconProps, InputFieldProps, IntentButton, Label, LabelProps, LabelSizes, LabelType, Lead, ListenersType, MaskedTextInput, MaskedTextInputProps, MediatoolThemeProvider, MediatoolThemeProviderProps, Message, Modal, ModalBase, 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, PresetOptions, 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, Table, TableProps, Tabs, TabsProps, Tag, TagGroup, TagGroupProps, TagProps, TagsInput, TagsInputProps, TextField, TextFieldProps, TextInputFormatter, TextSizeProps, Textarea, TextareaField, TextareaFieldProps, TextareaProps, Tiny, Toast, ToastProps, Toolbox, ToolboxContent, ToolboxContentProps, ToolboxFooter, ToolboxFooterProps, ToolboxHeader, ToolboxHeaderProps, ToolboxProps, TransitionDirection, UseAdaptiveMenuPlacementProps, UseFormReturn, UseSelectCallbacksProps, UseToastOptions, addAlpha, advancedParseFloat, createDebounceFunctionInstance, getChildrenWithProps, getContrastColor, getFieldError, getInitials, getMatchingValue, getShades, highlight, luminosity, ring, statusIconMap, theme, tottTheme, trimFormValues, useArrowFocus, useCurrentTheme, useDebounce, useDidUpdateEffect, useLoadingMessage, useOutsideRectClick, useOverflowGroup, useScreenSize, useScrollToBottom, useSelectCallbacks, useSetValueRefreshed, useToast };
|