@northlight/ui 2.33.12 → 2.33.14
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 +10 -8
- package/dist/es/northlight.js +40 -27
- package/dist/es/northlight.js.map +1 -1
- package/dist/umd/northlight.cjs +40 -27
- 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,4 +1,4 @@
|
|
|
1
|
-
import { AccordionProps, AccordionButtonProps, AccordionPanelProps, AccordionItemProps, Icon as Icon$1, StackDirection, AvatarProps as AvatarProps$1, AlertProps as AlertProps$1, AspectRatioProps, StackProps, BadgeProps as BadgeProps$1, ThemingProps, ButtonProps as ButtonProps$1, CheckboxProps as CheckboxProps$1, CheckboxGroupProps, 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,
|
|
1
|
+
import { AccordionProps, AccordionButtonProps, AccordionPanelProps, AccordionItemProps, Icon as Icon$1, StackDirection, AvatarProps as AvatarProps$1, AlertProps as AlertProps$1, AspectRatioProps, StackProps, BadgeProps as BadgeProps$1, ThemingProps, ButtonProps as ButtonProps$1, CheckboxProps as CheckboxProps$1, CheckboxGroupProps, 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, 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, ContainerProps, Divider, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerFooter, DrawerHeader, DrawerOverlay, Editable, EditableInput, EditablePreview, Flex, FormControl, FormErrorMessage, FormHelperText, Grid, GridItem, HStack, Heading, Hide, Highlight, Image, ImageProps, 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';
|
|
@@ -915,6 +915,7 @@ interface DateRangePickerProps extends Omit<AriaDateRangePickerProps<DateValue>,
|
|
|
915
915
|
fiscalStartMonth?: number;
|
|
916
916
|
fiscalStartDay?: number;
|
|
917
917
|
renderInPortal?: boolean;
|
|
918
|
+
buttonLabel?: string;
|
|
918
919
|
}
|
|
919
920
|
interface DatePickerFieldProps extends Omit<InputProps, 'onChange'>, InputFieldProps {
|
|
920
921
|
name: string;
|
|
@@ -933,6 +934,7 @@ interface DatePickerFieldProps extends Omit<InputProps, 'onChange'>, InputFieldP
|
|
|
933
934
|
}
|
|
934
935
|
interface DateRangePickerFieldProps extends Omit<DatePickerFieldProps, 'onChange'> {
|
|
935
936
|
onChange?: (date: null | DateRange) => void;
|
|
937
|
+
buttonLabel?: string;
|
|
936
938
|
}
|
|
937
939
|
type FormBody = Record<string, DateRange>;
|
|
938
940
|
|
|
@@ -1794,7 +1796,7 @@ interface PProps extends TextProps {
|
|
|
1794
1796
|
* ?)
|
|
1795
1797
|
*
|
|
1796
1798
|
*/
|
|
1797
|
-
declare const P: (
|
|
1799
|
+
declare const P: (props: PProps & React__default.RefAttributes<HTMLParagraphElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1798
1800
|
|
|
1799
1801
|
/**
|
|
1800
1802
|
* One of the stylized typography components
|
|
@@ -1814,7 +1816,7 @@ declare const P: ({ children, variant, sx, ...rest }: PProps) => JSX.Element;
|
|
|
1814
1816
|
*
|
|
1815
1817
|
*
|
|
1816
1818
|
*/
|
|
1817
|
-
declare const Blockquote: (
|
|
1819
|
+
declare const Blockquote: (props: TextProps & React__default.RefAttributes<HTMLParagraphElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1818
1820
|
|
|
1819
1821
|
/**
|
|
1820
1822
|
* One of the stylized typography components
|
|
@@ -1832,7 +1834,7 @@ declare const Blockquote: ({ children, sx, ...rest }: TextProps) => JSX.Element;
|
|
|
1832
1834
|
* under the props tab to right should be passed down via **sx**_)
|
|
1833
1835
|
*
|
|
1834
1836
|
*/
|
|
1835
|
-
declare const Capitalized: (
|
|
1837
|
+
declare const Capitalized: (props: TextProps & React__default.RefAttributes<HTMLParagraphElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1836
1838
|
|
|
1837
1839
|
/**
|
|
1838
1840
|
* One of the stylized typography components
|
|
@@ -1850,7 +1852,7 @@ declare const Capitalized: ({ children, sx, ...rest }: TextProps) => JSX.Element
|
|
|
1850
1852
|
* under the props tab to right should be passed down via **sx**_)
|
|
1851
1853
|
*
|
|
1852
1854
|
*/
|
|
1853
|
-
declare const Lead: (
|
|
1855
|
+
declare const Lead: (props: TextProps & React__default.RefAttributes<HTMLParagraphElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1854
1856
|
|
|
1855
1857
|
/**
|
|
1856
1858
|
* One of the stylized typography components
|
|
@@ -1868,7 +1870,7 @@ declare const Lead: ({ children, sx, ...rest }: TextProps) => JSX.Element;
|
|
|
1868
1870
|
* props tab to right should be passed down via **sx**_)
|
|
1869
1871
|
*
|
|
1870
1872
|
*/
|
|
1871
|
-
declare const Small: (
|
|
1873
|
+
declare const Small: (props: TextProps & React__default.RefAttributes<HTMLParagraphElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1872
1874
|
|
|
1873
1875
|
/**
|
|
1874
1876
|
* One of the stylized typography components
|
|
@@ -1886,7 +1888,7 @@ declare const Small: ({ children, sx, ...rest }: TextProps) => JSX.Element;
|
|
|
1886
1888
|
* props tab to right should be passed down via **sx**_)
|
|
1887
1889
|
*
|
|
1888
1890
|
*/
|
|
1889
|
-
declare const Tiny: (
|
|
1891
|
+
declare const Tiny: (props: TextProps & React__default.RefAttributes<HTMLParagraphElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1890
1892
|
|
|
1891
1893
|
type LabelSizes = '2xs' | 'xs' | 'sm' | 'md' | 'lg';
|
|
1892
1894
|
interface LabelProps extends FormLabelProps$1 {
|
|
@@ -1925,7 +1927,7 @@ declare const NumVal: (props: TextProps & React__default.RefAttributes<HTMLLabel
|
|
|
1925
1927
|
|
|
1926
1928
|
type HeadingType = typeof Heading;
|
|
1927
1929
|
type BodyType = typeof P;
|
|
1928
|
-
type StylizedType = typeof
|
|
1930
|
+
type StylizedType = typeof Blockquote;
|
|
1929
1931
|
type LabelType = typeof Label;
|
|
1930
1932
|
type NumValType = typeof NumVal;
|
|
1931
1933
|
|
package/dist/es/northlight.js
CHANGED
|
@@ -4421,7 +4421,7 @@ var __objRest$1F = (source, exclude) => {
|
|
|
4421
4421
|
}
|
|
4422
4422
|
return target;
|
|
4423
4423
|
};
|
|
4424
|
-
const P = (_a) => {
|
|
4424
|
+
const P = forwardRef$1((_a, ref) => {
|
|
4425
4425
|
var _b = _a, {
|
|
4426
4426
|
children,
|
|
4427
4427
|
variant = "16",
|
|
@@ -4436,11 +4436,12 @@ const P = (_a) => {
|
|
|
4436
4436
|
Text,
|
|
4437
4437
|
__spreadValues$23({
|
|
4438
4438
|
variant,
|
|
4439
|
-
sx: styles
|
|
4439
|
+
sx: styles,
|
|
4440
|
+
ref
|
|
4440
4441
|
}, rest),
|
|
4441
4442
|
children
|
|
4442
4443
|
);
|
|
4443
|
-
};
|
|
4444
|
+
});
|
|
4444
4445
|
|
|
4445
4446
|
var __defProp$22 = Object.defineProperty;
|
|
4446
4447
|
var __getOwnPropSymbols$22 = Object.getOwnPropertySymbols;
|
|
@@ -4470,11 +4471,13 @@ var __objRest$1E = (source, exclude) => {
|
|
|
4470
4471
|
}
|
|
4471
4472
|
return target;
|
|
4472
4473
|
};
|
|
4473
|
-
const Blockquote = (
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
};
|
|
4474
|
+
const Blockquote = forwardRef$1(
|
|
4475
|
+
(_a, ref) => {
|
|
4476
|
+
var _b = _a, { children, sx = {} } = _b, rest = __objRest$1E(_b, ["children", "sx"]);
|
|
4477
|
+
const styles = useStyleConfig("Blockquote", { sx });
|
|
4478
|
+
return /* @__PURE__ */ React.createElement(Text, __spreadValues$22({ as: "span", sx: styles, ref }, rest), children);
|
|
4479
|
+
}
|
|
4480
|
+
);
|
|
4478
4481
|
|
|
4479
4482
|
var __defProp$21 = Object.defineProperty;
|
|
4480
4483
|
var __getOwnPropSymbols$21 = Object.getOwnPropertySymbols;
|
|
@@ -4504,7 +4507,7 @@ var __objRest$1D = (source, exclude) => {
|
|
|
4504
4507
|
}
|
|
4505
4508
|
return target;
|
|
4506
4509
|
};
|
|
4507
|
-
const Capitalized = (_a) => {
|
|
4510
|
+
const Capitalized = forwardRef$1((_a, ref) => {
|
|
4508
4511
|
var _b = _a, {
|
|
4509
4512
|
children,
|
|
4510
4513
|
sx = {}
|
|
@@ -4517,11 +4520,12 @@ const Capitalized = (_a) => {
|
|
|
4517
4520
|
Text,
|
|
4518
4521
|
__spreadValues$21({
|
|
4519
4522
|
as: "span",
|
|
4520
|
-
sx: styles
|
|
4523
|
+
sx: styles,
|
|
4524
|
+
ref
|
|
4521
4525
|
}, rest),
|
|
4522
4526
|
children
|
|
4523
4527
|
);
|
|
4524
|
-
};
|
|
4528
|
+
});
|
|
4525
4529
|
|
|
4526
4530
|
var __defProp$20 = Object.defineProperty;
|
|
4527
4531
|
var __getOwnPropSymbols$20 = Object.getOwnPropertySymbols;
|
|
@@ -4551,7 +4555,7 @@ var __objRest$1C = (source, exclude) => {
|
|
|
4551
4555
|
}
|
|
4552
4556
|
return target;
|
|
4553
4557
|
};
|
|
4554
|
-
const Lead = (_a) => {
|
|
4558
|
+
const Lead = forwardRef$1((_a, ref) => {
|
|
4555
4559
|
var _b = _a, {
|
|
4556
4560
|
children,
|
|
4557
4561
|
sx = {}
|
|
@@ -4564,11 +4568,12 @@ const Lead = (_a) => {
|
|
|
4564
4568
|
Text,
|
|
4565
4569
|
__spreadValues$20({
|
|
4566
4570
|
as: "span",
|
|
4567
|
-
sx: styles
|
|
4571
|
+
sx: styles,
|
|
4572
|
+
ref
|
|
4568
4573
|
}, rest),
|
|
4569
4574
|
children
|
|
4570
4575
|
);
|
|
4571
|
-
};
|
|
4576
|
+
});
|
|
4572
4577
|
|
|
4573
4578
|
var __defProp$1$ = Object.defineProperty;
|
|
4574
4579
|
var __getOwnPropSymbols$1$ = Object.getOwnPropertySymbols;
|
|
@@ -4598,7 +4603,7 @@ var __objRest$1B = (source, exclude) => {
|
|
|
4598
4603
|
}
|
|
4599
4604
|
return target;
|
|
4600
4605
|
};
|
|
4601
|
-
const Small = (_a) => {
|
|
4606
|
+
const Small = forwardRef$1((_a, ref) => {
|
|
4602
4607
|
var _b = _a, {
|
|
4603
4608
|
children,
|
|
4604
4609
|
sx = {}
|
|
@@ -4611,11 +4616,12 @@ const Small = (_a) => {
|
|
|
4611
4616
|
Text,
|
|
4612
4617
|
__spreadValues$1$({
|
|
4613
4618
|
as: "small",
|
|
4614
|
-
sx: styles
|
|
4619
|
+
sx: styles,
|
|
4620
|
+
ref
|
|
4615
4621
|
}, rest),
|
|
4616
4622
|
children
|
|
4617
4623
|
);
|
|
4618
|
-
};
|
|
4624
|
+
});
|
|
4619
4625
|
|
|
4620
4626
|
var __defProp$1_ = Object.defineProperty;
|
|
4621
4627
|
var __getOwnPropSymbols$1_ = Object.getOwnPropertySymbols;
|
|
@@ -4645,7 +4651,7 @@ var __objRest$1A = (source, exclude) => {
|
|
|
4645
4651
|
}
|
|
4646
4652
|
return target;
|
|
4647
4653
|
};
|
|
4648
|
-
const Tiny = (_a) => {
|
|
4654
|
+
const Tiny = forwardRef$1((_a, ref) => {
|
|
4649
4655
|
var _b = _a, {
|
|
4650
4656
|
children,
|
|
4651
4657
|
sx = {}
|
|
@@ -4658,11 +4664,12 @@ const Tiny = (_a) => {
|
|
|
4658
4664
|
Text,
|
|
4659
4665
|
__spreadValues$1_({
|
|
4660
4666
|
as: "span",
|
|
4661
|
-
sx: styles
|
|
4667
|
+
sx: styles,
|
|
4668
|
+
ref
|
|
4662
4669
|
}, rest),
|
|
4663
4670
|
children
|
|
4664
4671
|
);
|
|
4665
|
-
};
|
|
4672
|
+
});
|
|
4666
4673
|
|
|
4667
4674
|
var __defProp$1Z = Object.defineProperty;
|
|
4668
4675
|
var __getOwnPropSymbols$1Z = Object.getOwnPropertySymbols;
|
|
@@ -7449,7 +7456,8 @@ const RangeCalendar = (props) => {
|
|
|
7449
7456
|
minValue,
|
|
7450
7457
|
maxValue,
|
|
7451
7458
|
firstDayOfWeek,
|
|
7452
|
-
onSave
|
|
7459
|
+
onSave,
|
|
7460
|
+
buttonLabel = "Save"
|
|
7453
7461
|
} = props;
|
|
7454
7462
|
const { locale } = useLocale();
|
|
7455
7463
|
const ref = useRef(null);
|
|
@@ -7521,7 +7529,7 @@ const RangeCalendar = (props) => {
|
|
|
7521
7529
|
range: value,
|
|
7522
7530
|
firstDayOfWeek
|
|
7523
7531
|
}
|
|
7524
|
-
))), /* @__PURE__ */ React.createElement(HStack, { pt: "2", alignSelf: "end" }, isClearable && /* @__PURE__ */ React.createElement(Button, { onClick: resetDate, variant: "ghost", size: "sm" }, "Clear"), /* @__PURE__ */ React.createElement(Button, { variant: "brand", onClick: handleSave, size: "sm" },
|
|
7532
|
+
))), /* @__PURE__ */ React.createElement(HStack, { pt: "2", alignSelf: "end" }, isClearable && /* @__PURE__ */ React.createElement(Button, { onClick: resetDate, variant: "ghost", size: "sm" }, "Clear"), /* @__PURE__ */ React.createElement(Button, { variant: "brand", onClick: handleSave, size: "sm" }, buttonLabel))))))));
|
|
7525
7533
|
};
|
|
7526
7534
|
|
|
7527
7535
|
const isValidDateRange = (value) => is(Object, value) && has("startDate", value) && has("endDate", value) && is(String, value.startDate) && is(String, value.endDate);
|
|
@@ -7575,7 +7583,8 @@ const DateRangePicker = (props) => {
|
|
|
7575
7583
|
maxValue,
|
|
7576
7584
|
renderInPortal = false,
|
|
7577
7585
|
firstDayOfWeek,
|
|
7578
|
-
onSave
|
|
7586
|
+
onSave,
|
|
7587
|
+
buttonLabel = "Save"
|
|
7579
7588
|
} = props;
|
|
7580
7589
|
const ref = useRef();
|
|
7581
7590
|
const { group } = useMultiStyleConfig("DatePicker");
|
|
@@ -7659,7 +7668,8 @@ const DateRangePicker = (props) => {
|
|
|
7659
7668
|
fiscalStartDay: fiscalStartDay || 0,
|
|
7660
7669
|
isClearable,
|
|
7661
7670
|
firstDayOfWeek,
|
|
7662
|
-
onSave
|
|
7671
|
+
onSave,
|
|
7672
|
+
buttonLabel
|
|
7663
7673
|
})
|
|
7664
7674
|
)))))
|
|
7665
7675
|
);
|
|
@@ -7848,7 +7858,8 @@ const DateRangePickerField = forwardRef$1((_a, ref) => {
|
|
|
7848
7858
|
firstDayOfWeek = "monday",
|
|
7849
7859
|
onChange: onChangeCallback = identity,
|
|
7850
7860
|
isClearable = true,
|
|
7851
|
-
onSave
|
|
7861
|
+
onSave,
|
|
7862
|
+
buttonLabel = "Save"
|
|
7852
7863
|
} = _b, rest = __objRest$19(_b, [
|
|
7853
7864
|
"name",
|
|
7854
7865
|
"minValue",
|
|
@@ -7860,7 +7871,8 @@ const DateRangePickerField = forwardRef$1((_a, ref) => {
|
|
|
7860
7871
|
"firstDayOfWeek",
|
|
7861
7872
|
"onChange",
|
|
7862
7873
|
"isClearable",
|
|
7863
|
-
"onSave"
|
|
7874
|
+
"onSave",
|
|
7875
|
+
"buttonLabel"
|
|
7864
7876
|
]);
|
|
7865
7877
|
const { setValue, setError, trigger } = useFormContext();
|
|
7866
7878
|
const handleChange = (dateRange) => {
|
|
@@ -7898,7 +7910,8 @@ const DateRangePickerField = forwardRef$1((_a, ref) => {
|
|
|
7898
7910
|
minValue,
|
|
7899
7911
|
maxValue,
|
|
7900
7912
|
validationState: errors.name ? "invalid" : "valid",
|
|
7901
|
-
isClearable
|
|
7913
|
+
isClearable,
|
|
7914
|
+
buttonLabel
|
|
7902
7915
|
}, rest)
|
|
7903
7916
|
)
|
|
7904
7917
|
);
|