@northlight/ui 2.27.1 → 2.27.2
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 +12 -8
- package/dist/es/northlight.js +8 -6
- package/dist/es/northlight.js.map +1 -1
- package/dist/umd/northlight.cjs +8 -6
- package/dist/umd/northlight.cjs.map +1 -1
- package/dist/umd/northlight.min.cjs +2 -2
- package/dist/umd/northlight.min.cjs.map +1 -1
- package/package.json +2 -2
package/dist/es/northlight.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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, BoxProps, InputProps, CenterProps, FlexProps, TagProps as TagProps$1, IconProps as IconProps$1, SystemStyleObject, HeadingProps as HeadingProps$1, TextProps, FormLabelProps as FormLabelProps$1, Heading, Text, ModalProps as ModalProps$1, ResponsiveValue, MenuProps as MenuProps$1, NumberInputProps as NumberInputProps$1, PinInputProps as PinInputProps$1, ProgressProps, 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, TooltipProps, FadeProps as FadeProps$1, ScaleFadeProps as ScaleFadeProps$1, SlideProps as SlideProps$1, SlideFadeProps as SlideFadeProps$1, CollapseProps as CollapseProps$1, ModalBodyProps, TabListProps, TabProps, LinkProps, GridProps, GridItemProps, EditableProps as EditableProps$1 } from '@chakra-ui/react';
|
|
1
|
+
import { AccordionProps, AccordionButtonProps, AccordionPanelProps, AccordionItemProps, Icon as Icon$1, 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, BoxProps, InputProps, CenterProps, FlexProps, TagProps as TagProps$1, IconProps as IconProps$1, SystemStyleObject, HeadingProps as HeadingProps$1, TextProps, FormLabelProps as FormLabelProps$1, Heading, Text, ModalProps as ModalProps$1, ResponsiveValue, MenuProps as MenuProps$1, NumberInputProps as NumberInputProps$1, PinInputProps as PinInputProps$1, ProgressProps, 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, TooltipProps, FadeProps as FadeProps$1, ScaleFadeProps as ScaleFadeProps$1, SlideProps as SlideProps$1, SlideFadeProps as SlideFadeProps$1, CollapseProps as CollapseProps$1, ModalBodyProps, 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, MenuButton, MenuCommand, MenuDivider, MenuGroup, MenuIcon, MenuItem, MenuItemOption, MenuList, MenuOptionGroup, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, NumberDecrementStepper, NumberIncrementStepper, OrderedList, PinInputField, 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, 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
|
-
import { Props, GroupBase, MultiValue, SingleValue, ActionMeta, MenuListProps, SelectInstance, ChakraStylesConfig } from 'chakra-react-select';
|
|
3
|
+
import { Props, GroupBase, MultiValue, SingleValue, ActionMeta, MenuListProps, SelectInstance, ChakraStylesConfig, CreatableSelectComponent } from 'chakra-react-select';
|
|
4
4
|
export { AsyncCreatableSelect, AsyncSelect, Select as ChakraReactSelect, CreatableSelect, MultiValue, SingleValue, chakraComponents as selectChakraComponents } from 'chakra-react-select';
|
|
5
5
|
import * as React$1 from 'react';
|
|
6
|
-
import React__default, { ComponentType, Ref, ChangeEvent, InputHTMLAttributes, ReactNode, ReactElement, RefObject, MutableRefObject, EffectCallback, DependencyList, MouseEvent as MouseEvent$1 } from 'react';
|
|
6
|
+
import React__default, { ComponentProps, ComponentType, Ref, ChangeEvent, InputHTMLAttributes, ReactNode, ReactElement, RefObject, MutableRefObject, EffectCallback, DependencyList, MouseEvent as MouseEvent$1 } 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';
|
|
@@ -122,6 +122,7 @@ interface Option<T extends string = string> {
|
|
|
122
122
|
label: string;
|
|
123
123
|
value: T;
|
|
124
124
|
isCreation?: boolean;
|
|
125
|
+
icon?: ComponentProps<typeof Icon$1>;
|
|
125
126
|
}
|
|
126
127
|
interface SelectProps<T, K extends boolean> extends Omit<Props<T, K, GroupBase<T>>, 'onChange' | 'value' | 'isMulti'> {
|
|
127
128
|
/** Whatever is currently selected by the select will be controlled by value prop, if value is
|
|
@@ -1132,7 +1133,9 @@ interface ToolboxFooterProps extends FlexProps {
|
|
|
1132
1133
|
}
|
|
1133
1134
|
* ?)
|
|
1134
1135
|
*/
|
|
1135
|
-
declare const Toolbox: ({ isResizable, isOpen, children, direction, shouldPush, size, onClose, autoFocus, resizeLimit, ...rest }: ToolboxProps
|
|
1136
|
+
declare const Toolbox: ({ isResizable, isOpen, children, direction, shouldPush, size, onClose, autoFocus, resizeLimit, zIndex, ...rest }: Omit<ToolboxProps, "zIndex"> & {
|
|
1137
|
+
zIndex: number;
|
|
1138
|
+
}) => JSX.Element;
|
|
1136
1139
|
|
|
1137
1140
|
/**
|
|
1138
1141
|
* @see Toolbox
|
|
@@ -4139,10 +4142,11 @@ interface StepStackProps extends StackProps {
|
|
|
4139
4142
|
*/
|
|
4140
4143
|
declare const StepStack: ({ children, spacing, rowHeight, stepCircleAlignment, stepCircleMarginTopPx, ...rest }: StepStackProps) => JSX.Element;
|
|
4141
4144
|
|
|
4142
|
-
interface CreationOption extends Option {
|
|
4145
|
+
interface CreationOption<T extends string = string> extends Option<T> {
|
|
4143
4146
|
isCreation: boolean;
|
|
4144
4147
|
}
|
|
4145
|
-
|
|
4148
|
+
type CreationOptionValue = 'add_field';
|
|
4149
|
+
interface CreatableSelectDropdownProps<T extends string = string> extends ComponentProps<CreatableSelectComponent> {
|
|
4146
4150
|
/**
|
|
4147
4151
|
* An array of "Option" objects that represents the initial options available in the dropdown.
|
|
4148
4152
|
* Each "Option" object must have a "label" and a "value" property (both strings).
|
|
@@ -4152,7 +4156,7 @@ interface CreatableSelectDropdownProps<T extends string = string> {
|
|
|
4152
4156
|
* A callback function that is called whenever the selected option changes.
|
|
4153
4157
|
* This function receives the newly selected "Option" object as its only argument.
|
|
4154
4158
|
*/
|
|
4155
|
-
onOptionChange: (option: Option) => void;
|
|
4159
|
+
onOptionChange: (option: Option<T | CreationOptionValue>) => void;
|
|
4156
4160
|
/**
|
|
4157
4161
|
* Optional placeholder text displayed when no option is selected and the dropdown is not focused.
|
|
4158
4162
|
* Defaults to 'Select or create...' if not provided.
|
|
@@ -4169,7 +4173,7 @@ interface CreatableSelectDropdownProps<T extends string = string> {
|
|
|
4169
4173
|
* This option is typically displayed at the top of the dropdown list.
|
|
4170
4174
|
* Defaults to "{ label: 'Add option...', value: 'Add option...' }" if not provided.
|
|
4171
4175
|
*/
|
|
4172
|
-
creationOption?: CreationOption
|
|
4176
|
+
creationOption?: CreationOption<CreationOptionValue>;
|
|
4173
4177
|
/**
|
|
4174
4178
|
* Optional CSS width property value for the dropdown container.
|
|
4175
4179
|
* Specify the width of the dropdown. Defaults to '100%' if not provided.
|
package/dist/es/northlight.js
CHANGED
|
@@ -8295,7 +8295,8 @@ const Toolbox = (_a) => {
|
|
|
8295
8295
|
size = "sm",
|
|
8296
8296
|
onClose,
|
|
8297
8297
|
autoFocus = true,
|
|
8298
|
-
resizeLimit = "full"
|
|
8298
|
+
resizeLimit = "full",
|
|
8299
|
+
zIndex = coreZIndex.overlay
|
|
8299
8300
|
} = _b, rest = __objRest$$(_b, [
|
|
8300
8301
|
"isResizable",
|
|
8301
8302
|
"isOpen",
|
|
@@ -8305,7 +8306,8 @@ const Toolbox = (_a) => {
|
|
|
8305
8306
|
"size",
|
|
8306
8307
|
"onClose",
|
|
8307
8308
|
"autoFocus",
|
|
8308
|
-
"resizeLimit"
|
|
8309
|
+
"resizeLimit",
|
|
8310
|
+
"zIndex"
|
|
8309
8311
|
]);
|
|
8310
8312
|
const { container } = useMultiStyleConfig$1("Toolbox", { size });
|
|
8311
8313
|
const newChildren = getChildrenWithProps(
|
|
@@ -8346,7 +8348,7 @@ const Toolbox = (_a) => {
|
|
|
8346
8348
|
style: {
|
|
8347
8349
|
height: container.h,
|
|
8348
8350
|
width: adjustableWidth,
|
|
8349
|
-
zIndex
|
|
8351
|
+
zIndex
|
|
8350
8352
|
}
|
|
8351
8353
|
},
|
|
8352
8354
|
/* @__PURE__ */ React.createElement(
|
|
@@ -13888,7 +13890,7 @@ var __objRest$1 = (source, exclude) => {
|
|
|
13888
13890
|
return target;
|
|
13889
13891
|
};
|
|
13890
13892
|
const { Option: ChakraOption } = chakraComponents;
|
|
13891
|
-
const
|
|
13893
|
+
const getCustomComponents = () => ({
|
|
13892
13894
|
Option: (_a) => {
|
|
13893
13895
|
var _b = _a, { children } = _b, props = __objRest$1(_b, ["children"]);
|
|
13894
13896
|
return /* @__PURE__ */ React.createElement(ChakraOption, __spreadValues$1({}, props), props.data.isCreation && /* @__PURE__ */ React.createElement(
|
|
@@ -13910,7 +13912,7 @@ const customComponents = {
|
|
|
13910
13912
|
children
|
|
13911
13913
|
));
|
|
13912
13914
|
}
|
|
13913
|
-
};
|
|
13915
|
+
});
|
|
13914
13916
|
|
|
13915
13917
|
var __defProp = Object.defineProperty;
|
|
13916
13918
|
var __defProps = Object.defineProperties;
|
|
@@ -14079,7 +14081,7 @@ const CreatableSelectDropdown = (_a) => {
|
|
|
14079
14081
|
color: "black"
|
|
14080
14082
|
})
|
|
14081
14083
|
}),
|
|
14082
|
-
components:
|
|
14084
|
+
components: getCustomComponents(),
|
|
14083
14085
|
options: customOptions,
|
|
14084
14086
|
value: selectedOption,
|
|
14085
14087
|
onChange: handleChange,
|