@northlight/ui 2.28.6 → 2.28.8
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 +4 -3
- package/dist/es/northlight.js +22 -2
- package/dist/es/northlight.js.map +1 -1
- package/dist/umd/northlight.cjs +22 -2
- 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 +3 -3
package/dist/es/northlight.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
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
|
-
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, Mark, 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';
|
|
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, ContainerProps, 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, Mark, 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
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';
|
|
@@ -599,11 +599,12 @@ declare const CheckboxField: (props: CheckboxFieldProps & React__default.RefAttr
|
|
|
599
599
|
|
|
600
600
|
type ColorPickerSize = 'sm' | 'md' | 'lg';
|
|
601
601
|
interface ColorPickerProps extends Omit<IconButtonProps$1, 'onChange' | 'value' | 'aria-label' | 'variant'> {
|
|
602
|
-
onChange?: (value: string) => void;
|
|
602
|
+
onChange?: (value: string | null) => void;
|
|
603
603
|
/** This are what color options the user can choose */
|
|
604
604
|
colors?: string[];
|
|
605
605
|
/** This are the extended color options displayed when clicking the down caret */
|
|
606
606
|
expandedColors?: string[];
|
|
607
|
+
clearable?: boolean;
|
|
607
608
|
value?: string | null;
|
|
608
609
|
size?: ColorPickerSize;
|
|
609
610
|
name?: string;
|
|
@@ -652,7 +653,7 @@ type ColorPickerFieldProps = ColorPickerProps & {
|
|
|
652
653
|
*
|
|
653
654
|
*
|
|
654
655
|
*/
|
|
655
|
-
declare const ColorPicker: ({ onChange, colors, expandedColors, value, name, size, popoverProps, ...rest }: ColorPickerProps) => JSX.Element;
|
|
656
|
+
declare const ColorPicker: ({ onChange, clearable, colors, expandedColors, value, name, size, popoverProps, ...rest }: ColorPickerProps) => JSX.Element;
|
|
656
657
|
|
|
657
658
|
/**
|
|
658
659
|
* The <ColorPicker /> component wrapped in a <Field />
|
package/dist/es/northlight.js
CHANGED
|
@@ -2503,6 +2503,7 @@ const ColorPicker$1 = (_a) => {
|
|
|
2503
2503
|
var _b = _a, {
|
|
2504
2504
|
onChange = () => {
|
|
2505
2505
|
},
|
|
2506
|
+
clearable = false,
|
|
2506
2507
|
colors = defaultColors,
|
|
2507
2508
|
expandedColors = paletteColors,
|
|
2508
2509
|
value = null,
|
|
@@ -2511,6 +2512,7 @@ const ColorPicker$1 = (_a) => {
|
|
|
2511
2512
|
popoverProps
|
|
2512
2513
|
} = _b, rest = __objRest$1l(_b, [
|
|
2513
2514
|
"onChange",
|
|
2515
|
+
"clearable",
|
|
2514
2516
|
"colors",
|
|
2515
2517
|
"expandedColors",
|
|
2516
2518
|
"value",
|
|
@@ -2566,6 +2568,10 @@ const ColorPicker$1 = (_a) => {
|
|
|
2566
2568
|
setSelectedColor(color);
|
|
2567
2569
|
onChange(color);
|
|
2568
2570
|
};
|
|
2571
|
+
const clearSelection = () => {
|
|
2572
|
+
setSelectedColor(null);
|
|
2573
|
+
onChange(null);
|
|
2574
|
+
};
|
|
2569
2575
|
return /* @__PURE__ */ React.createElement(Box, { "data-testid": "color-picker-test-id" }, /* @__PURE__ */ React.createElement(
|
|
2570
2576
|
Popover$1,
|
|
2571
2577
|
__spreadValues$1O({
|
|
@@ -2588,9 +2594,23 @@ const ColorPicker$1 = (_a) => {
|
|
|
2588
2594
|
PopoverHeader,
|
|
2589
2595
|
{
|
|
2590
2596
|
color: "text.default",
|
|
2591
|
-
sx: heading
|
|
2597
|
+
sx: heading,
|
|
2598
|
+
display: "flex",
|
|
2599
|
+
alignItems: "center",
|
|
2600
|
+
justifyContent: "space-between",
|
|
2601
|
+
width: "full"
|
|
2592
2602
|
},
|
|
2593
|
-
"Pick a color"
|
|
2603
|
+
"Pick a color",
|
|
2604
|
+
clearable && trigger.color !== "unset" && /* @__PURE__ */ React.createElement(
|
|
2605
|
+
Button$1,
|
|
2606
|
+
{
|
|
2607
|
+
size: "sm",
|
|
2608
|
+
h: "5",
|
|
2609
|
+
onClick: clearSelection,
|
|
2610
|
+
variant: "ghost"
|
|
2611
|
+
},
|
|
2612
|
+
"Clear"
|
|
2613
|
+
)
|
|
2594
2614
|
), /* @__PURE__ */ React.createElement(PopoverBody, { p: 0 }, /* @__PURE__ */ React.createElement(Stack, { alignItems: "center", p: 0, spacing: 0 }, /* @__PURE__ */ React.createElement(FocusScope, null, /* @__PURE__ */ React.createElement(
|
|
2595
2615
|
SimpleGrid,
|
|
2596
2616
|
{
|