@northlight/ui 2.7.1 → 2.8.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.mts +17 -9
- package/dist/es/northlight.mjs +137 -109
- package/dist/es/northlight.mjs.map +1 -1
- package/dist/ts/types.d.ts +17 -9
- package/dist/umd/northlight.js +137 -108
- package/dist/umd/northlight.js.map +1 -1
- package/dist/umd/northlight.min.js +3 -3
- package/dist/umd/northlight.min.js.map +1 -1
- package/package.json +3 -3
package/dist/es/northlight.d.mts
CHANGED
|
@@ -9,9 +9,9 @@ import { RadioGroupState } from '@react-stately/radio';
|
|
|
9
9
|
import { CSSObject } from '@emotion/react';
|
|
10
10
|
import { DateValue } from '@internationalized/date';
|
|
11
11
|
import { AriaDatePickerProps, AriaDateRangePickerProps } from '@react-aria/datepicker';
|
|
12
|
-
import { Props, GroupBase, ActionMeta, ChakraStylesConfig, SelectInstance,
|
|
12
|
+
import { Props, GroupBase, ActionMeta, ChakraStylesConfig, SelectInstance, MultiValue, SingleValue, MenuListProps } from 'chakra-react-select';
|
|
13
13
|
export { AsyncCreatableSelect, AsyncSelect, Select as ChakraReactSelect, CreatableSelect } from 'chakra-react-select';
|
|
14
|
-
import { DndContextProps, UseDroppableArguments, UseDraggableArguments, UniqueIdentifier, CollisionDetection, SensorDescriptor, SensorOptions } from '@dnd-kit/core';
|
|
14
|
+
import { DndContextProps, UseDroppableArguments, UseDraggableArguments, UniqueIdentifier, CollisionDetection, SensorDescriptor, SensorOptions, Modifiers } from '@dnd-kit/core';
|
|
15
15
|
export * from '@dnd-kit/core';
|
|
16
16
|
import { UseSortableArguments, SortingStrategy, SortableContextProps } from '@dnd-kit/sortable';
|
|
17
17
|
export * from '@dnd-kit/sortable';
|
|
@@ -1078,6 +1078,8 @@ interface SortableListProps<T> {
|
|
|
1078
1078
|
disableDrag?: boolean;
|
|
1079
1079
|
/** callback, passes the dragged item and it's old / new index after a drag, */
|
|
1080
1080
|
onMovedItem?: ({ item, oldIndex, newIndex }: MovedItemType<T>) => void;
|
|
1081
|
+
/** Read: https://docs.dndkit.com/api-documentation/modifiers#restricting-motion-to-an-axis */
|
|
1082
|
+
modifiers?: Modifiers;
|
|
1081
1083
|
}
|
|
1082
1084
|
interface MultiSortProps<itemKeys extends string | number | symbol> {
|
|
1083
1085
|
children?: ChildrenType$1;
|
|
@@ -1387,7 +1389,7 @@ the default behaviour of the rendered component instead of the dragging,
|
|
|
1387
1389
|
*
|
|
1388
1390
|
*
|
|
1389
1391
|
*/
|
|
1390
|
-
declare function SortableList<T>({ children, items, collisionDetection, createKey, strategy, onChange, onMovedItem, displayOverlay, sensors, dblClickThreshold, disableDrag, }: SortableListProps<T>): JSX.Element;
|
|
1392
|
+
declare function SortableList<T>({ children, items, collisionDetection, createKey, strategy, onChange, onMovedItem, displayOverlay, sensors, dblClickThreshold, disableDrag, modifiers, }: SortableListProps<T>): JSX.Element;
|
|
1391
1393
|
|
|
1392
1394
|
/**
|
|
1393
1395
|
* Used with multi sort to render a sortable list inside a droppable
|
|
@@ -1779,6 +1781,9 @@ declare const IconButton: (props: IconButtonProps & React__default.RefAttributes
|
|
|
1779
1781
|
type ModalSizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | 'full' | 'huge';
|
|
1780
1782
|
interface ModalProps extends ModalProps$1 {
|
|
1781
1783
|
size?: ModalSizes;
|
|
1784
|
+
/** If true then the modal will never unmount but only hide when closing,
|
|
1785
|
+
* stayMountedOnClose is false by default */
|
|
1786
|
+
stayMountedOnClose?: boolean;
|
|
1782
1787
|
}
|
|
1783
1788
|
|
|
1784
1789
|
interface CompressionType {
|
|
@@ -2438,8 +2443,8 @@ interface SelectProps<T> extends Omit<Props<T, boolean, GroupBase<T>>, 'onChange
|
|
|
2438
2443
|
/** Whatever is currently selected by the select will be controlled by value prop */
|
|
2439
2444
|
value?: Option | Option[];
|
|
2440
2445
|
/** Take a look at the second argument, the event,
|
|
2441
|
-
* for info as to which specific
|
|
2442
|
-
onChange?: (
|
|
2446
|
+
* for info as to which specific element was added */
|
|
2447
|
+
onChange?: (option: MultiValue<T> | SingleValue<T>, event: ActionMeta<T>) => void;
|
|
2443
2448
|
onAdd?: (val: unknown) => void;
|
|
2444
2449
|
onRemove?: (val: unknown) => void;
|
|
2445
2450
|
/** Used for accessibility */
|
|
@@ -2449,6 +2454,8 @@ interface SelectProps<T> extends Omit<Props<T, boolean, GroupBase<T>>, 'onChange
|
|
|
2449
2454
|
loadingList?: ComponentType<MenuListProps<T, boolean, GroupBase<T>>> | undefined;
|
|
2450
2455
|
/** Custom icon that will be put to the faremost right of the component */
|
|
2451
2456
|
icon?: ComponentType<any>;
|
|
2457
|
+
/** Custom icon that will be put to the faremost left of the component */
|
|
2458
|
+
leftIcon?: ComponentType<any>;
|
|
2452
2459
|
customOption?: ((option: T) => JSX.Element) | null;
|
|
2453
2460
|
}
|
|
2454
2461
|
type SelectFieldProps<T, K extends boolean = false> = Omit<SelectProps<T>, 'onChange' | 'isMulti'> & Omit<InputFieldProps, 'isMulti'> & {
|
|
@@ -3076,7 +3083,8 @@ declare const AsyncError: ({ message, ...rest }: AsyncErrorProps) => JSX.Element
|
|
|
3076
3083
|
* @see {@link https://northlight.dev/reference/modal}
|
|
3077
3084
|
*
|
|
3078
3085
|
* */
|
|
3079
|
-
declare const
|
|
3086
|
+
declare const ModalBase: ({ isCentered, children, ...rest }: ModalProps) => JSX.Element;
|
|
3087
|
+
declare const Modal: ({ stayMountedOnClose, isOpen, ...rest }: ModalProps) => JSX.Element;
|
|
3080
3088
|
|
|
3081
3089
|
/**
|
|
3082
3090
|
* The context provider for handling state of components wrapped in field
|
|
@@ -3531,7 +3539,7 @@ declare const useArrowFocus: (columns: number) => {
|
|
|
3531
3539
|
};
|
|
3532
3540
|
|
|
3533
3541
|
interface UseSelectCallbacksProps<T> extends Omit<Props<T, boolean, GroupBase<T>>, 'onChange' | 'value'> {
|
|
3534
|
-
onChange: (val:
|
|
3542
|
+
onChange: (val: MultiValue<T> | SingleValue<T>, event: ActionMeta<T>) => void;
|
|
3535
3543
|
onAdd: (val: unknown) => void;
|
|
3536
3544
|
onRemove: (val: unknown) => void;
|
|
3537
3545
|
isMulti: boolean;
|
|
@@ -3545,9 +3553,9 @@ type SelectActionMeta<T> = ActionMeta<T>;
|
|
|
3545
3553
|
|
|
3546
3554
|
declare const useSelectCallbacks: <T extends BasicOption>({ onChange, onAdd, onRemove, isMulti, value, }: UseSelectCallbacksProps<T>) => (val: MultiValue<T> | SingleValue<T>, event: ActionMeta<T>) => void;
|
|
3547
3555
|
|
|
3548
|
-
declare const useOutsideRectClick: (ref: MutableRefObject<HTMLElement | null>, callback: () => void) => void;
|
|
3556
|
+
declare const useOutsideRectClick: (ref: MutableRefObject<HTMLElement | null>, callback: (event: MouseEvent | TouchEvent) => void) => void;
|
|
3549
3557
|
|
|
3550
3558
|
declare const theme: Record<string, any>;
|
|
3551
3559
|
declare const tottTheme: Record<string, any>;
|
|
3552
3560
|
|
|
3553
|
-
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, Message, 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, useOutsideRectClick, useOverflowGroup, useScrollToBottom, useSelectCallbacks, useSetValueRefreshed, useToast };
|
|
3561
|
+
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, 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, 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, useOutsideRectClick, useOverflowGroup, useScrollToBottom, useSelectCallbacks, useSetValueRefreshed, useToast };
|