@northlight/ui 2.25.1 → 2.26.1

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.
@@ -1,7 +1,7 @@
1
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';
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
3
  import { Props, GroupBase, MultiValue, SingleValue, ActionMeta, MenuListProps, SelectInstance, ChakraStylesConfig } from 'chakra-react-select';
4
- export { AsyncCreatableSelect, AsyncSelect, Select as ChakraReactSelect, CreatableSelect, MultiValue, SingleValue } from 'chakra-react-select';
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
6
  import React__default, { 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';
@@ -4181,7 +4181,11 @@ interface CreatableSelectDropdownProps<T extends string = string> {
4181
4181
  /**
4182
4182
  * Value of the initially selected option.
4183
4183
  */
4184
- initialValue?: T;
4184
+ defaultValue?: T;
4185
+ /**
4186
+ * Selected value.
4187
+ */
4188
+ value?: T;
4185
4189
  /**
4186
4190
  *
4187
4191
  Default placement of the menu in relation to the control. 'auto'
@@ -4220,6 +4224,7 @@ interface CreatableSelectDropdownProps<T extends string = string> {
4220
4224
  * standardOptions={someOptions}
4221
4225
  * onOptionChange={setArtist}
4222
4226
  * width="300px"
4227
+ * value={artist ? artist.value : undefined}
4223
4228
  * />
4224
4229
  * {artist && artist.value !== 'Add option...' && (
4225
4230
  * <H3 py={8}>The best artist is: {artist.label}</H3>
@@ -4232,7 +4237,7 @@ interface CreatableSelectDropdownProps<T extends string = string> {
4232
4237
  * standardOptions={someOtherOptions}
4233
4238
  * onOptionChange={setElement}
4234
4239
  * width="300px"
4235
- * initialValue="technique"
4240
+ * value={element ? element.value : undefined}
4236
4241
  * />
4237
4242
  * {element && element.value !== 'Add option...' && (
4238
4243
  * <H3 py={8}>
@@ -4258,7 +4263,7 @@ interface CreatableSelectDropdownProps<T extends string = string> {
4258
4263
  * }
4259
4264
  * ?)
4260
4265
  */
4261
- declare const CreatableSelectDropdown: <T extends string = string>({ standardOptions, initialPlaceholder, addOptionPlaceholder, creationOption, onOptionChange, width, variant, initialValue, menuPlacement, }: CreatableSelectDropdownProps<T>) => JSX.Element;
4266
+ declare const CreatableSelectDropdown: <T extends string = string>({ standardOptions, initialPlaceholder, addOptionPlaceholder, creationOption, onOptionChange, width, variant, defaultValue, value, menuPlacement, }: CreatableSelectDropdownProps<T>) => JSX.Element;
4262
4267
 
4263
4268
  declare const useDebounce: <T>(value: T, delay: number) => T;
4264
4269
 
@@ -2,7 +2,7 @@ import { Accordion as Accordion$1, AccordionButton as AccordionButton$1, Accordi
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, 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, 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 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';
5
- export { AsyncCreatableSelect, AsyncSelect, Select as ChakraReactSelect, CreatableSelect } from 'chakra-react-select';
5
+ export { AsyncCreatableSelect, AsyncSelect, Select as ChakraReactSelect, CreatableSelect, chakraComponents as selectChakraComponents } from 'chakra-react-select';
6
6
  import { isNil, last, map, prop, difference, replace, split, path, T, identity, any, isEmpty, init, append, ifElse, gt, always, defaultTo, take, inc, dec, forEach, is, trim, keys, values, equals, omit, mergeAll, merge, toLower, find, times, add, has, not, all, filter, test, indexOf, remove, insert, intersection, findIndex, concat, head, match, length, propEq } from 'ramda';
7
7
  import { useFocusManager, FocusScope, useFocusRing } from '@react-aria/focus';
8
8
  import { useForm, FormProvider, useFormContext, Controller } from 'react-hook-form';
@@ -4034,91 +4034,94 @@ const NumberInput$1 = {
4034
4034
  radii: borderRadius,
4035
4035
  borders: borderWidth,
4036
4036
  opacity
4037
- }, isReadOnly }) => ({
4038
- root: {
4039
- borderRadius: borderRadius.input.outline
4040
- },
4041
- field: {
4042
- minWidth: sizing["44"],
4043
- paddingInlineStart: spacing["padding-inline"].input.default,
4044
- paddingInlineEnd: spacing["padding-inline"].input.default,
4045
- WebkitPaddingStart: spacing["padding-inline"].input.default,
4046
- WebkitPaddingEnd: spacing["padding-inline"].input.default,
4047
- color: color.text.default,
4048
- bg: color.background.input["outline-default"],
4049
- borderWidth: borderWidth.input.default,
4050
- borderColor: color.border.input.default,
4051
- paddingRight: spacing.paddingRight["number-input"].field,
4052
- _hover: {
4053
- bg: color.background.input["outline-hover"],
4054
- borderColor: color.border.input["default-hover"]
4055
- },
4056
- _focusVisible: {
4057
- bg: color.background.input["outline-focus"],
4058
- borderColor: color.border.input.focus,
4059
- boxShadow: `0 0 0 1px ${color.border.textarea.focus}`
4060
- },
4061
- _invalid: {
4062
- bg: color.background.input["outline-error"],
4063
- borderColor: color.border.input.error,
4064
- boxShadow: `0 0 0 1px ${color.border.input.error}`
4065
- },
4066
- _disabled: {
4067
- bg: color.background.input["outline-disabled"],
4068
- opacity: opacity.input.disabled,
4069
- borderColor: color.border.input.disabled
4037
+ }, isReadOnly, minWidth, minW }) => {
4038
+ var _a;
4039
+ return {
4040
+ root: {
4041
+ borderRadius: borderRadius.input.outline
4070
4042
  },
4071
- _readOnly: {
4072
- _focusVisible: {
4073
- borderColor: color.border.input.readonly,
4074
- boxShadow: "none"
4075
- },
4076
- _hover: {
4077
- borderColor: color.border.input.readonly
4078
- }
4079
- }
4080
- },
4081
- stepperGroup: {
4082
- width: "auto",
4083
- paddingRight: spacing.paddingRight["number-input"].stepper
4084
- },
4085
- stepper: {
4086
- _first: {
4087
- border: "none",
4088
- borderTopRightRadius: borderRadius["input-stepper"].default,
4089
- borderRadius: borderRadius["input-stepper"].default,
4090
- bg: color.background["input-stepper"].default,
4091
- opacity: isReadOnly ? opacity.input.disabled : "auto",
4043
+ field: {
4044
+ minWidth: (_a = minWidth != null ? minWidth : minW) != null ? _a : sizing["44"],
4045
+ paddingInlineStart: spacing["padding-inline"].input.default,
4046
+ paddingInlineEnd: spacing["padding-inline"].input.default,
4047
+ WebkitPaddingStart: spacing["padding-inline"].input.default,
4048
+ WebkitPaddingEnd: spacing["padding-inline"].input.default,
4049
+ color: color.text.default,
4050
+ bg: color.background.input["outline-default"],
4051
+ borderWidth: borderWidth.input.default,
4052
+ borderColor: color.border.input.default,
4053
+ paddingRight: spacing.paddingRight["number-input"].field,
4092
4054
  _hover: {
4093
- bg: isReadOnly ? "none" : color.background["input-stepper"].hover
4055
+ bg: color.background.input["outline-hover"],
4056
+ borderColor: color.border.input["default-hover"]
4094
4057
  },
4095
- _active: {
4096
- bg: color.background["input-stepper"].active
4058
+ _focusVisible: {
4059
+ bg: color.background.input["outline-focus"],
4060
+ borderColor: color.border.input.focus,
4061
+ boxShadow: `0 0 0 1px ${color.border.textarea.focus}`
4062
+ },
4063
+ _invalid: {
4064
+ bg: color.background.input["outline-error"],
4065
+ borderColor: color.border.input.error,
4066
+ boxShadow: `0 0 0 1px ${color.border.input.error}`
4097
4067
  },
4098
4068
  _disabled: {
4099
- bg: color.background["input-stepper"].disabled,
4100
- color: color.icon["input-stepper"].disabled
4069
+ bg: color.background.input["outline-disabled"],
4070
+ opacity: opacity.input.disabled,
4071
+ borderColor: color.border.input.disabled
4072
+ },
4073
+ _readOnly: {
4074
+ _focusVisible: {
4075
+ borderColor: color.border.input.readonly,
4076
+ boxShadow: "none"
4077
+ },
4078
+ _hover: {
4079
+ borderColor: color.border.input.readonly
4080
+ }
4101
4081
  }
4102
4082
  },
4103
- _last: {
4104
- border: "none",
4105
- bg: color.background["input-stepper"].default,
4106
- borderBottomRightRadius: borderRadius["input-stepper"].default,
4107
- borderRadius: borderRadius["input-stepper"].default,
4108
- opacity: isReadOnly ? opacity.input.disabled : "auto",
4109
- _hover: {
4110
- bg: isReadOnly ? "none" : color.background["input-stepper"].hover
4111
- },
4112
- _active: {
4113
- bg: color.background["input-stepper"].active
4083
+ stepperGroup: {
4084
+ width: "auto",
4085
+ paddingRight: spacing.paddingRight["number-input"].stepper
4086
+ },
4087
+ stepper: {
4088
+ _first: {
4089
+ border: "none",
4090
+ borderTopRightRadius: borderRadius["input-stepper"].default,
4091
+ borderRadius: borderRadius["input-stepper"].default,
4092
+ bg: color.background["input-stepper"].default,
4093
+ opacity: isReadOnly ? opacity.input.disabled : "auto",
4094
+ _hover: {
4095
+ bg: isReadOnly ? "none" : color.background["input-stepper"].hover
4096
+ },
4097
+ _active: {
4098
+ bg: color.background["input-stepper"].active
4099
+ },
4100
+ _disabled: {
4101
+ bg: color.background["input-stepper"].disabled,
4102
+ color: color.icon["input-stepper"].disabled
4103
+ }
4114
4104
  },
4115
- _disabled: {
4116
- bg: color.background["input-stepper"].disabled,
4117
- color: color.icon["input-stepper"].disabled
4105
+ _last: {
4106
+ border: "none",
4107
+ bg: color.background["input-stepper"].default,
4108
+ borderBottomRightRadius: borderRadius["input-stepper"].default,
4109
+ borderRadius: borderRadius["input-stepper"].default,
4110
+ opacity: isReadOnly ? opacity.input.disabled : "auto",
4111
+ _hover: {
4112
+ bg: isReadOnly ? "none" : color.background["input-stepper"].hover
4113
+ },
4114
+ _active: {
4115
+ bg: color.background["input-stepper"].active
4116
+ },
4117
+ _disabled: {
4118
+ bg: color.background["input-stepper"].disabled,
4119
+ color: color.icon["input-stepper"].disabled
4120
+ }
4118
4121
  }
4119
4122
  }
4120
- }
4121
- })
4123
+ };
4124
+ }
4122
4125
  };
4123
4126
 
4124
4127
  const NotificationIconButton$1 = {
@@ -8950,17 +8953,24 @@ var __objRest$R = (source, exclude) => {
8950
8953
  }
8951
8954
  return target;
8952
8955
  };
8953
- function getComponents() {
8954
- return {
8955
- Menu: (props) => /* @__PURE__ */ React.createElement(Box, { "data-testid": "select-menu-wrapper-test-id" }, /* @__PURE__ */ React.createElement(chakraComponents.Menu, __spreadValues$12({}, props), props.children)),
8956
- DropdownIndicator: (props) => props.selectProps.icon ? /* @__PURE__ */ React.createElement(chakraComponents.DropdownIndicator, __spreadValues$12({}, props), /* @__PURE__ */ React.createElement(Icon$1, { as: props.selectProps.icon })) : /* @__PURE__ */ React.createElement(chakraComponents.DropdownIndicator, __spreadValues$12({}, props)),
8957
- Option: (props) => props.selectProps.customOption ? /* @__PURE__ */ React.createElement(chakraComponents.Option, __spreadValues$12({}, props), props.selectProps.customOption(props.data)) : /* @__PURE__ */ React.createElement(chakraComponents.Option, __spreadValues$12({}, props)),
8958
- MultiValueContainer: (props) => props.selectProps.customTag ? /* @__PURE__ */ React.createElement(chakraComponents.MultiValueContainer, __spreadValues$12({}, props), props.selectProps.customTag(props.data)) : /* @__PURE__ */ React.createElement(chakraComponents.MultiValueContainer, __spreadValues$12({}, props)),
8959
- Control: (_a) => {
8960
- var _b = _a, { children } = _b, props = __objRest$R(_b, ["children"]);
8961
- return props.selectProps.leftComponent ? /* @__PURE__ */ React.createElement(chakraComponents.Control, __spreadValues$12({}, props), /* @__PURE__ */ React.createElement(HStack, { w: "full", pl: "2" }, props.selectProps.leftComponent, /* @__PURE__ */ React.createElement(HStack, { w: "full", justify: "space-between" }, children))) : /* @__PURE__ */ React.createElement(chakraComponents.Control, __spreadValues$12({}, props), children);
8962
- }
8963
- };
8956
+ function getComponents(components) {
8957
+ return merge(
8958
+ {
8959
+ Menu: (props) => /* @__PURE__ */ React.createElement(Box, { "data-testid": "select-menu-wrapper-test-id" }, /* @__PURE__ */ React.createElement(chakraComponents.Menu, __spreadValues$12({}, props), props.children)),
8960
+ DropdownIndicator: (props) => props.selectProps.icon ? /* @__PURE__ */ React.createElement(chakraComponents.DropdownIndicator, __spreadValues$12({}, props), /* @__PURE__ */ React.createElement(Icon$1, { as: props.selectProps.icon })) : /* @__PURE__ */ React.createElement(chakraComponents.DropdownIndicator, __spreadValues$12({}, props)),
8961
+ Option: (props) => props.selectProps.customOption ? /* @__PURE__ */ React.createElement(chakraComponents.Option, __spreadValues$12({}, props), props.selectProps.customOption(props.data)) : /* @__PURE__ */ React.createElement(chakraComponents.Option, __spreadValues$12({}, props)),
8962
+ MultiValueContainer: (props) => props.selectProps.customTag ? /* @__PURE__ */ React.createElement(chakraComponents.MultiValueContainer, __spreadValues$12({}, props), props.selectProps.customTag(props.data)) : /* @__PURE__ */ React.createElement(chakraComponents.MultiValueContainer, __spreadValues$12({}, props)),
8963
+ Control: (_a) => {
8964
+ var _b = _a, {
8965
+ children
8966
+ } = _b, props = __objRest$R(_b, [
8967
+ "children"
8968
+ ]);
8969
+ return props.selectProps.leftComponent ? /* @__PURE__ */ React.createElement(chakraComponents.Control, __spreadValues$12({}, props), /* @__PURE__ */ React.createElement(HStack, { w: "full", pl: "2" }, props.selectProps.leftComponent, /* @__PURE__ */ React.createElement(HStack, { w: "full", justify: "space-between" }, children))) : /* @__PURE__ */ React.createElement(chakraComponents.Control, __spreadValues$12({}, props), children);
8970
+ }
8971
+ },
8972
+ components || {}
8973
+ );
8964
8974
  }
8965
8975
 
8966
8976
  var __defProp$11 = Object.defineProperty;
@@ -12289,7 +12299,8 @@ const Select = forwardRef$1((_a, ref) => {
12289
12299
  customTag = null,
12290
12300
  isClearable = false,
12291
12301
  value,
12292
- icon
12302
+ icon,
12303
+ components
12293
12304
  } = _b, rest = __objRest$l(_b, [
12294
12305
  "options",
12295
12306
  "isMulti",
@@ -12303,7 +12314,8 @@ const Select = forwardRef$1((_a, ref) => {
12303
12314
  "customTag",
12304
12315
  "isClearable",
12305
12316
  "value",
12306
- "icon"
12317
+ "icon",
12318
+ "components"
12307
12319
  ]);
12308
12320
  const handleChange = useSelectCallbacks({
12309
12321
  onChange,
@@ -12313,7 +12325,7 @@ const Select = forwardRef$1((_a, ref) => {
12313
12325
  value: is(Array, value) ? value : []
12314
12326
  });
12315
12327
  const customComponents = useMemo(
12316
- () => getComponents(),
12328
+ () => getComponents(components),
12317
12329
  []
12318
12330
  );
12319
12331
  const prevOptions = useRef(
@@ -13903,18 +13915,22 @@ const CreatableSelectDropdown = ({
13903
13915
  onOptionChange,
13904
13916
  width = "100%",
13905
13917
  variant = "outline",
13906
- initialValue,
13918
+ defaultValue,
13919
+ value,
13907
13920
  menuPlacement = "bottom"
13908
13921
  }) => {
13909
13922
  const initialSelectedOption = useMemo(
13910
13923
  () => {
13911
- var _a;
13912
- if (isNil(initialValue)) {
13913
- return null;
13924
+ var _a, _b;
13925
+ if (!isNil(value)) {
13926
+ return (_a = standardOptions.find((option) => option.value === value)) != null ? _a : null;
13914
13927
  }
13915
- return (_a = standardOptions.find((option) => option.value === initialValue)) != null ? _a : null;
13928
+ if (!isNil(defaultValue)) {
13929
+ return (_b = standardOptions.find((option) => option.value === defaultValue)) != null ? _b : null;
13930
+ }
13931
+ return null;
13916
13932
  },
13917
- []
13933
+ [value]
13918
13934
  );
13919
13935
  const [selectedOption, setSelectedOption] = useState(initialSelectedOption);
13920
13936
  const [newOptionText, setNewOptionText] = useState("");