@northlight/ui 2.36.5 → 2.36.7

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.
@@ -129,7 +129,7 @@ interface Option<T extends string = string> {
129
129
  interface SelectProps<T, K extends boolean> extends Omit<Props<T, K, GroupBase<T>>, 'onChange' | 'value' | 'isMulti'> {
130
130
  /** Whatever is currently selected by the select will be controlled by value prop, if value is
131
131
  * of type string then it will automatically pair it up with matching object from options list */
132
- value?: K extends true ? T[] | string[] : T | string;
132
+ value?: K extends true ? T[] | string[] : T | string | null;
133
133
  /** Take a look at the second argument, the event,
134
134
  * for info as to which specific element was added */
135
135
  onChange?: (option: K extends true ? MultiValue<T> : SingleValue<T>, event: ActionMeta<T>) => void;
@@ -295,7 +295,7 @@ declare const SelectField: <T extends Option<string>, K extends boolean = false>
295
295
  onChange?: ((option: K extends true ? react_select_dist_declarations_src_types.MultiValue<T> | undefined : react_select_dist_declarations_src_types.SingleValue<T> | undefined, event: react_select.ActionMeta<T>) => void) | undefined;
296
296
  } & React__default.RefAttributes<HTMLDivElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
297
297
 
298
- declare const getMatchingValue: <T extends Option<string>, K extends boolean>(value: (K extends true ? string[] | T[] : string | T) | undefined, options: react_select.OptionsOrGroups<T, react_select.GroupBase<T>> | undefined) => T | T[] | undefined;
298
+ declare const getMatchingValue: <T extends Option<string>, K extends boolean>(value: (K extends true ? string[] | T[] : string | T | null) | undefined, options: react_select.OptionsOrGroups<T, react_select.GroupBase<T>> | undefined) => T | T[] | undefined;
299
299
 
300
300
  interface TagsInputProps<T> extends Omit<SelectProps<T, true>, 'value' | 'formatCreateLabel' | 'isValidNewOption' | 'onAdd' | 'onRemove' | 'leftIcon' | 'icon' | 'customOption'> {
301
301
  value?: MultiValue<T>;
@@ -1,4 +1,4 @@
1
- import { Accordion as Accordion$1, AccordionButton as AccordionButton$1, AccordionPanel as AccordionPanel$1, AccordionItem as AccordionItem$1, useInterval, useMediaQuery, useToken as useToken$1, extendTheme, Box, useMultiStyleConfig, chakra, Alert as Alert$2, AspectRatio as AspectRatio$1, forwardRef, useStyleConfig, Icon as Icon$2, Heading, Text, FormLabel as FormLabel$1, VisuallyHidden, HStack, Badge as Badge$2, Flex, Spinner as Spinner$2, Button as Button$2, Checkbox as Checkbox$2, FormControl, Stack, FormErrorMessage, CheckboxGroup, IconButton as IconButton$1, Popover as Popover$2, Portal, useDisclosure, useBoolean, PopoverTrigger, PopoverContent, PopoverHeader, PopoverBody, SimpleGrid, SlideFade as SlideFade$1, Table as Table$2, Thead, Tr, Tbody, Select as Select$2, PopoverAnchor, InputGroup, InputRightElement, Link as Link$1, Spacer, useOutsideClick, Tooltip as Tooltip$2, VStack, Circle, Center, Fade as Fade$1, ScaleFade as ScaleFade$1, Slide as Slide$1, Collapse as Collapse$1, CloseButton as CloseButton$1, Radio as Radio$2, RadioGroup as RadioGroup$1, Tag as Tag$2, TagLabel, TagRightIcon, useEditableControls, useEditableState, Editable, InputLeftElement, Input as Input$1, EditablePreview, EditableInput, Modal as Modal$2, ModalOverlay, ModalContent, ModalCloseButton, ModalBody as ModalBody$1, ModalHeader, Slider, SliderTrack, SliderFilledTrack, SliderThumb, ModalFooter, Progress, Image as Image$1, ChakraProvider, Menu as Menu$2, NumberInputStepper as NumberInputStepper$1, Divider, NumberIncrementStepper, NumberDecrementStepper, NumberInput as NumberInput$2, NumberInputField as NumberInputField$1, PinInput as PinInput$2, Switch as Switch$2, TabPanel as TabPanel$1, Tabs as Tabs$2, Textarea as Textarea$2, useToast as useToast$1, AlertTitle, AlertDescription, Tab, TabList, useClipboard, Grid, GridItem, theme as theme$1 } from '@chakra-ui/react';
1
+ import { Accordion as Accordion$1, AccordionButton as AccordionButton$1, AccordionPanel as AccordionPanel$1, AccordionItem as AccordionItem$1, useInterval, useMediaQuery, useToken as useToken$1, extendTheme, Box, useMultiStyleConfig, chakra, Alert as Alert$2, AspectRatio as AspectRatio$1, forwardRef, useStyleConfig, Icon as Icon$2, Heading, Text, FormLabel as FormLabel$1, VisuallyHidden, HStack, Badge as Badge$2, Flex, Spinner as Spinner$2, Button as Button$2, Checkbox as Checkbox$2, FormControl, Stack, FormErrorMessage, CheckboxGroup, IconButton as IconButton$1, Popover as Popover$2, Portal, useDisclosure, useBoolean, PopoverTrigger, PopoverContent, PopoverHeader, PopoverBody, SimpleGrid, SlideFade as SlideFade$1, Table as Table$2, Thead, Tr, Tbody, Select as Select$2, PopoverAnchor, InputGroup, InputRightElement, Link as Link$1, Spacer, useOutsideClick, Tooltip as Tooltip$2, VStack, Circle, Center, Fade as Fade$1, ScaleFade as ScaleFade$1, Slide as Slide$1, Collapse as Collapse$1, CloseButton as CloseButton$1, Radio as Radio$2, RadioGroup as RadioGroup$1, Tag as Tag$2, TagLabel, TagRightIcon, useEditableControls, useEditableState, Editable, InputLeftElement, Input as Input$1, EditablePreview, EditableInput, Modal as Modal$2, ModalOverlay, ModalContent, ModalCloseButton, ModalBody as ModalBody$1, ModalHeader, Slider, SliderTrack, SliderFilledTrack, SliderThumb, ModalFooter, Progress as Progress$1, Image as Image$1, ChakraProvider, Menu as Menu$2, NumberInputStepper as NumberInputStepper$1, Divider, NumberIncrementStepper, NumberDecrementStepper, NumberInput as NumberInput$2, NumberInputField as NumberInputField$1, PinInput as PinInput$2, Switch as Switch$2, TabPanel as TabPanel$1, Tabs as Tabs$2, Textarea as Textarea$2, useToast as useToast$1, AlertTitle, AlertDescription, Tab, TabList, useClipboard, Grid, GridItem, theme as theme$1 } from '@chakra-ui/react';
2
2
  export { AbsoluteCenter, AccordionIcon, AlertDescription, AlertDialog, AlertDialogBody, AlertDialogCloseButton, AlertDialogContent, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertIcon, AlertTitle, Box, 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, Stat, StatArrow, StatGroup, StatHelpText, StatLabel, StatNumber, TabIndicator as StepIndicator, TabPanels as StepPanels, Tab, TabIndicator, TabList, TabPanels, TableCaption, TableContainer, TagCloseButton, TagLabel, TagLeftIcon, TagRightIcon, Tbody, Td, Text, Tfoot, Th, Thead, Tr, UnorderedList, VStack, VisuallyHidden, VisuallyHiddenInput, Wrap, WrapItem, 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 React, { useState, useEffect, useRef, isValidElement, cloneElement, Children, createContext, useContext, forwardRef as forwardRef$1, useImperativeHandle, memo, useMemo, useCallback } from 'react';
4
4
  import { CreatableSelect, chakraComponents, AsyncSelect, Select as Select$3 } from 'chakra-react-select';
@@ -671,18 +671,18 @@ const Breadcrumb = {
671
671
  baseStyle: {
672
672
  link: {
673
673
  padding: [0.5, 1],
674
- color: "primary",
675
- fontWeight: "600",
676
- fontSize: "semibold",
674
+ color: "text.default",
675
+ fontWeight: "semibold",
676
+ fontSize: "md",
677
677
  _hover: {
678
- bg: "blue.50",
678
+ bg: "brand-alt",
679
679
  borderRadius: "base",
680
680
  textDecor: "none"
681
681
  }
682
682
  },
683
683
  separator: {
684
- color: "gray.300",
685
- fontSize: "semibold"
684
+ color: "subdued",
685
+ fontSize: "sm"
686
686
  }
687
687
  }
688
688
  };
@@ -2358,7 +2358,7 @@ const Avatar$1 = {
2358
2358
  fontSize: "xs",
2359
2359
  fontWeight: "semibold",
2360
2360
  padding: sizing["0a"],
2361
- bgColor: color.red["500"],
2361
+ bgColor: color.destructive,
2362
2362
  color: color.text.inverted,
2363
2363
  borderRadius: borderRadius.avatar.square,
2364
2364
  border: "none"
@@ -3344,21 +3344,21 @@ const getBgColor = (currentTheme) => {
3344
3344
  }
3345
3345
  };
3346
3346
  const getInvalidColorStyles = (isInvalid, isImage = true, currentTheme = "webappTheme") => ({
3347
- borderColor: isInvalid ? "red.500" : "gray.300",
3348
- bgColor: isInvalid && "red.50",
3347
+ borderColor: isInvalid ? "border.error" : "border.default",
3348
+ bgColor: isInvalid && "bg.error.default",
3349
3349
  animation: isInvalid && `500ms ${shakeAnimation} ease`,
3350
3350
  _hover: isImage && {
3351
- bgColor: isInvalid ? "red.50" : getBgColor(currentTheme),
3352
- borderColor: isInvalid ? "red.500" : "blue.500"
3351
+ bgColor: isInvalid ? "bg.error.default" : getBgColor(currentTheme),
3352
+ borderColor: isInvalid ? "border.error" : "border.brand.default"
3353
3353
  }
3354
3354
  });
3355
3355
  const getAiColorStyles = (isInvalid, isImage = true) => ({
3356
- borderColor: isInvalid ? "red.500" : "gray.300",
3357
- bgColor: isInvalid && "red.50",
3356
+ borderColor: isInvalid ? "border.error" : "border.default",
3357
+ bgColor: isInvalid && "bg.error.default",
3358
3358
  animation: isInvalid && `500ms ${shakeAnimation} ease`,
3359
3359
  _hover: isImage && {
3360
- bgColor: isInvalid ? "red.50" : "bg.filled",
3361
- borderColor: isInvalid ? "red.500" : "border.ai"
3360
+ bgColor: isInvalid ? "bg.error.default" : "bg.filled",
3361
+ borderColor: isInvalid ? "border.error" : "border.ai"
3362
3362
  }
3363
3363
  });
3364
3364
  const FilePicker$1 = {
@@ -3593,6 +3593,17 @@ const Popover$1 = {
3593
3593
  }
3594
3594
  };
3595
3595
 
3596
+ const Progress = {
3597
+ baseStyle: ({ theme: { colors: color } }) => ({
3598
+ track: {
3599
+ bg: color["subdued-alt"]
3600
+ },
3601
+ filledTrack: {
3602
+ bg: color.brand
3603
+ }
3604
+ })
3605
+ };
3606
+
3596
3607
  var components = /*#__PURE__*/Object.freeze({
3597
3608
  __proto__: null,
3598
3609
  Alert: Alert$1,
@@ -3634,6 +3645,7 @@ var components = /*#__PURE__*/Object.freeze({
3634
3645
  PaneDivider: PaneDivider$1,
3635
3646
  PinInput: PinInput$1,
3636
3647
  Popover: Popover$1,
3648
+ Progress: Progress,
3637
3649
  Radio: Radio$1,
3638
3650
  Select: Select$1,
3639
3651
  Small: Small$1,
@@ -4937,7 +4949,7 @@ const AvatarGroup = (_a) => {
4937
4949
  { ml: spacing },
4938
4950
  (_child, idx) => idx > 0
4939
4951
  );
4940
- return /* @__PURE__ */ React.createElement(HStack, __spreadValues$1Y({ bgColor: "background.default" }, rest), /* @__PURE__ */ React.createElement(HStack, { spacing: 0 }, /* @__PURE__ */ React.createElement(OverflowGroup, { max, onChange: setNbrRemainingAvatars }, childrenWithMargin)), nbrRemainingAvatars > 0 && /* @__PURE__ */ React.createElement(Small, { sx: { color: "blue.500" } }, "+", nbrRemainingAvatars));
4952
+ return /* @__PURE__ */ React.createElement(HStack, __spreadValues$1Y({ bgColor: "background.default" }, rest), /* @__PURE__ */ React.createElement(HStack, { spacing: 0 }, /* @__PURE__ */ React.createElement(OverflowGroup, { max, onChange: setNbrRemainingAvatars }, childrenWithMargin)), nbrRemainingAvatars > 0 && /* @__PURE__ */ React.createElement(Small, { sx: { color: "brand" } }, "+", nbrRemainingAvatars));
4941
4953
  };
4942
4954
 
4943
4955
  var __defProp$1X = Object.defineProperty;
@@ -6607,7 +6619,7 @@ const CalendarCell = ({
6607
6619
  fontWeight: "medium",
6608
6620
  variant: isSelected ? "brand" : "ghost",
6609
6621
  ring: isToday && !isSelected ? "1px" : "0px",
6610
- ringColor: "blue.500"
6622
+ ringColor: "brand"
6611
6623
  }),
6612
6624
  formattedDate
6613
6625
  ));
@@ -6924,11 +6936,11 @@ const RangeCell = ({
6924
6936
  type: "button",
6925
6937
  ref,
6926
6938
  borderRadius: "xs",
6927
- bgColor: isHighlighted ? "brand-alt" : isSelected ? "blue.500" : "transparent",
6939
+ bgColor: isHighlighted ? "brand-alt" : isSelected ? "brand" : "transparent",
6928
6940
  color: isSelected ? "text.inverted" : "text.default",
6929
6941
  fontSize: "sm",
6930
6942
  ring: isToday && !isSelected ? "1px" : "0px",
6931
- ringColor: "blue.500",
6943
+ ringColor: "brand",
6932
6944
  mx: "-1px",
6933
6945
  ml: isToday ? "-2px " : void 0,
6934
6946
  my: "0a",
@@ -6943,7 +6955,7 @@ const RangeCell = ({
6943
6955
  ringOffset: "1px"
6944
6956
  },
6945
6957
  _hover: {
6946
- bgColor: isSelected ? "blue.400" : "bg.filled",
6958
+ bgColor: isSelected ? " background.button.brand-hover" : "bg.filled",
6947
6959
  _disabled: {
6948
6960
  bgColor: "transparent"
6949
6961
  }
@@ -10977,7 +10989,7 @@ const ProgressBar = forwardRef$1(
10977
10989
  (_a, ref) => {
10978
10990
  var _b = _a, { animationSlideTimeMs = animationSlideTime, sx } = _b, props = __objRest$B(_b, ["animationSlideTimeMs", "sx"]);
10979
10991
  return /* @__PURE__ */ React.createElement(
10980
- Progress,
10992
+ Progress$1,
10981
10993
  __spreadValues$I({
10982
10994
  ref,
10983
10995
  width: "full",
@@ -11551,7 +11563,7 @@ const FilePicker = (_a) => {
11551
11563
  {
11552
11564
  as: onlyImageAccepted ? Image03Solid : UploadCloudSolid,
11553
11565
  boxSize: "32px",
11554
- color: isInvalid ? "red.500" : editable ? "blue.500" : "gray.300",
11566
+ color: isInvalid ? "destructive" : editable ? "brand" : "text.subdued",
11555
11567
  display: isImage && !hasLoaded ? "inline-block" : "none",
11556
11568
  "aria-label": "file-icon-upload"
11557
11569
  }
@@ -11583,7 +11595,7 @@ const FilePicker = (_a) => {
11583
11595
  {
11584
11596
  sx: {
11585
11597
  textDecoration: "underline",
11586
- color: isInvalid ? "red.500" : "blue.500"
11598
+ color: isInvalid ? "destructive" : "brand"
11587
11599
  },
11588
11600
  display: isLoading || hasLoaded ? "none" : "default"
11589
11601
  },
@@ -11633,7 +11645,7 @@ const FilePicker = (_a) => {
11633
11645
  "aria-label": "delete-file",
11634
11646
  onClick: confirmDelete ? deleteModal.onOpen : clearImage,
11635
11647
  icon: TrashFullDuo,
11636
- color: "red.500"
11648
+ color: "destructive"
11637
11649
  }
11638
11650
  )
11639
11651
  )
@@ -11872,12 +11884,12 @@ function MultiFileUploader(_a) {
11872
11884
  {
11873
11885
  as: onlyImageAccepted ? Image03Solid : UploadCloudSolid,
11874
11886
  boxSize: "32px",
11875
- color: isInvalid ? "red.500 " : active ? "blue.500 " : "gray.300",
11887
+ color: isInvalid ? "destructive" : active ? "brand" : "text.subdued",
11876
11888
  "aria-label": "image-icon-upload",
11877
11889
  mb: onlyImageAccepted ? "0a" : 0
11878
11890
  }
11879
11891
  ),
11880
- /* @__PURE__ */ React.createElement(HStack, { spacing: 1, display: isInvalid ? "none" : "flex" }, /* @__PURE__ */ React.createElement(P, { variant: "14", textAlign: "center", alignSelf: "center" }, "Drag & drop ", onlyImageAccepted ? "images" : "files", " here or"), /* @__PURE__ */ React.createElement(Lead, { sx: { textDecoration: "underline", color: "blue.500" } }, "choose ", onlyImageAccepted ? "image" : "file")),
11892
+ /* @__PURE__ */ React.createElement(HStack, { spacing: 1, display: isInvalid ? "none" : "flex" }, /* @__PURE__ */ React.createElement(P, { variant: "14", textAlign: "center", alignSelf: "center" }, "Drag & drop ", onlyImageAccepted ? "images" : "files", " here or"), /* @__PURE__ */ React.createElement(Lead, { sx: { textDecoration: "underline", color: "brand" } }, "choose ", onlyImageAccepted ? "image" : "file")),
11881
11893
  /* @__PURE__ */ React.createElement(P, { variant: "14", textAlign: "center", alignSelf: "center", display: isInvalid ? "initial" : "none" }, errorMessage),
11882
11894
  /* @__PURE__ */ React.createElement(P, { variant: "14", sx: { color: "gray.400" } }, "Max file size is ", readableFileSize(maxFileSize))
11883
11895
  ), /* @__PURE__ */ React.createElement(
@@ -12459,7 +12471,7 @@ const Menu = (_a) => {
12459
12471
  const NumberInputStepper = ({
12460
12472
  includePercentage = false,
12461
12473
  enableStepperArrows = false
12462
- }) => /* @__PURE__ */ React.createElement(NumberInputStepper$1, null, /* @__PURE__ */ React.createElement(HStack, { alignItems: "center", h: "full" }, includePercentage && /* @__PURE__ */ React.createElement(Center, { bgColor: "gray.50", borderRadius: "md", boxSize: "6" }, /* @__PURE__ */ React.createElement(P, null, "%")), enableStepperArrows && /* @__PURE__ */ React.createElement(HStack, { alignItems: "center", h: "full" }, /* @__PURE__ */ React.createElement(Divider, { orientation: "vertical", h: "50%" }), /* @__PURE__ */ React.createElement(NumberIncrementStepper, { border: "none" }, /* @__PURE__ */ React.createElement(
12474
+ }) => /* @__PURE__ */ React.createElement(NumberInputStepper$1, null, /* @__PURE__ */ React.createElement(HStack, { alignItems: "center", h: "full" }, includePercentage && /* @__PURE__ */ React.createElement(Center, { bgColor: "bg.layer", borderRadius: "md", boxSize: "6" }, /* @__PURE__ */ React.createElement(P, null, "%")), enableStepperArrows && /* @__PURE__ */ React.createElement(HStack, { alignItems: "center", h: "full" }, /* @__PURE__ */ React.createElement(Divider, { orientation: "vertical", h: "50%" }), /* @__PURE__ */ React.createElement(NumberIncrementStepper, { border: "none" }, /* @__PURE__ */ React.createElement(
12463
12475
  Icon,
12464
12476
  {
12465
12477
  as: ChevronUpSolid,
@@ -14324,7 +14336,7 @@ const StepStack = (_a) => {
14324
14336
  Box,
14325
14337
  {
14326
14338
  borderRadius: "full",
14327
- bgColor: "blue.500",
14339
+ bgColor: "brand",
14328
14340
  boxSize: "6",
14329
14341
  minW: "6",
14330
14342
  minH: "6",