@northlight/ui 2.28.1 → 2.28.3
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.js
CHANGED
|
@@ -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, 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, Spinner as Spinner$2, Button as Button$2, Checkbox as Checkbox$2, FormControl, Stack, FormErrorMessage, Flex, IconButton as IconButton$1, Popover as Popover$2, useDisclosure, useBoolean, PopoverTrigger, PopoverContent, PopoverHeader, PopoverBody, SimpleGrid, SlideFade as SlideFade$1, keyframes, extendTheme, Table as Table$2, Thead, Tbody, Tr, Select as Select$2, PopoverAnchor, InputGroup, InputRightElement, Link as Link$1, Portal, 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, TagLeftIcon, AlertTitle, AlertDescription, Tab, TabList, useClipboard, Grid, GridItem } 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, 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, Spinner as Spinner$2, Button as Button$2, Checkbox as Checkbox$2, FormControl, Stack, FormErrorMessage, Flex, IconButton as IconButton$1, Popover as Popover$2, useDisclosure, useBoolean, PopoverTrigger, PopoverContent, PopoverHeader, PopoverBody, SimpleGrid, SlideFade as SlideFade$1, keyframes, extendTheme, Table as Table$2, Thead, Tbody, Tr, Select as Select$2, PopoverAnchor, InputGroup, InputRightElement, Link as Link$1, Portal, 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, TagLeftIcon, 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, 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';
|
|
@@ -40,6 +40,7 @@ import AutoSizer from 'react-virtualized-auto-sizer';
|
|
|
40
40
|
import AvatarEditor from 'react-avatar-editor';
|
|
41
41
|
import { NumericFormat } from 'react-number-format';
|
|
42
42
|
import InputMask from 'react-input-mask';
|
|
43
|
+
import { uniqBy } from 'yafu';
|
|
43
44
|
|
|
44
45
|
var __defProp$2q = Object.defineProperty;
|
|
45
46
|
var __getOwnPropSymbols$2q = Object.getOwnPropertySymbols;
|
|
@@ -13969,26 +13970,26 @@ var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
|
13969
13970
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
13970
13971
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13971
13972
|
var __spreadValues = (a, b) => {
|
|
13972
|
-
for (var
|
|
13973
|
-
if (__hasOwnProp.call(b,
|
|
13974
|
-
__defNormalProp(a,
|
|
13973
|
+
for (var prop2 in b || (b = {}))
|
|
13974
|
+
if (__hasOwnProp.call(b, prop2))
|
|
13975
|
+
__defNormalProp(a, prop2, b[prop2]);
|
|
13975
13976
|
if (__getOwnPropSymbols)
|
|
13976
|
-
for (var
|
|
13977
|
-
if (__propIsEnum.call(b,
|
|
13978
|
-
__defNormalProp(a,
|
|
13977
|
+
for (var prop2 of __getOwnPropSymbols(b)) {
|
|
13978
|
+
if (__propIsEnum.call(b, prop2))
|
|
13979
|
+
__defNormalProp(a, prop2, b[prop2]);
|
|
13979
13980
|
}
|
|
13980
13981
|
return a;
|
|
13981
13982
|
};
|
|
13982
13983
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
13983
13984
|
var __objRest = (source, exclude) => {
|
|
13984
13985
|
var target = {};
|
|
13985
|
-
for (var
|
|
13986
|
-
if (__hasOwnProp.call(source,
|
|
13987
|
-
target[
|
|
13986
|
+
for (var prop2 in source)
|
|
13987
|
+
if (__hasOwnProp.call(source, prop2) && exclude.indexOf(prop2) < 0)
|
|
13988
|
+
target[prop2] = source[prop2];
|
|
13988
13989
|
if (source != null && __getOwnPropSymbols)
|
|
13989
|
-
for (var
|
|
13990
|
-
if (exclude.indexOf(
|
|
13991
|
-
target[
|
|
13990
|
+
for (var prop2 of __getOwnPropSymbols(source)) {
|
|
13991
|
+
if (exclude.indexOf(prop2) < 0 && __propIsEnum.call(source, prop2))
|
|
13992
|
+
target[prop2] = source[prop2];
|
|
13992
13993
|
}
|
|
13993
13994
|
return target;
|
|
13994
13995
|
};
|
|
@@ -14077,7 +14078,7 @@ const CreatableSelectDropdown = (_a) => {
|
|
|
14077
14078
|
onOptionChange(option);
|
|
14078
14079
|
};
|
|
14079
14080
|
const combinedOptions = useMemo(
|
|
14080
|
-
() => [...standardOptions, ...createdOptions],
|
|
14081
|
+
() => uniqBy(prop("value"), [...standardOptions, ...createdOptions]),
|
|
14081
14082
|
[standardOptions, createdOptions]
|
|
14082
14083
|
);
|
|
14083
14084
|
const customOptions = [
|
|
@@ -14093,55 +14094,66 @@ const CreatableSelectDropdown = (_a) => {
|
|
|
14093
14094
|
setSelectedOption(newSelectedOption);
|
|
14094
14095
|
}
|
|
14095
14096
|
}, [value, combinedOptions]);
|
|
14096
|
-
return /* @__PURE__ */ React.createElement(
|
|
14097
|
-
|
|
14097
|
+
return /* @__PURE__ */ React.createElement(
|
|
14098
|
+
Box,
|
|
14098
14099
|
{
|
|
14099
|
-
|
|
14100
|
-
|
|
14101
|
-
|
|
14102
|
-
|
|
14103
|
-
|
|
14104
|
-
|
|
14105
|
-
|
|
14106
|
-
|
|
14107
|
-
|
|
14108
|
-
|
|
14109
|
-
|
|
14110
|
-
|
|
14111
|
-
|
|
14112
|
-
|
|
14113
|
-
|
|
14114
|
-
|
|
14115
|
-
|
|
14116
|
-
|
|
14117
|
-
|
|
14118
|
-
|
|
14119
|
-
|
|
14120
|
-
|
|
14121
|
-
|
|
14122
|
-
|
|
14123
|
-
chakraStyles: __spreadProps(__spreadValues({}, customSelectStyles), {
|
|
14124
|
-
container: (provided) => __spreadProps(__spreadValues({}, provided), {
|
|
14100
|
+
ref,
|
|
14101
|
+
w: "full",
|
|
14102
|
+
borderRadius: "none"
|
|
14103
|
+
},
|
|
14104
|
+
createNewOption && /* @__PURE__ */ React.createElement(
|
|
14105
|
+
EditableText,
|
|
14106
|
+
{
|
|
14107
|
+
value: addFieldInputValue,
|
|
14108
|
+
startWithEditView: true,
|
|
14109
|
+
onChange: (v) => {
|
|
14110
|
+
setAddFieldInputValue(v);
|
|
14111
|
+
},
|
|
14112
|
+
submitOnBlur: false,
|
|
14113
|
+
onCancel: () => {
|
|
14114
|
+
setAddFieldInputValue("");
|
|
14115
|
+
setCreateNewOption(false);
|
|
14116
|
+
},
|
|
14117
|
+
onSubmit: (v) => {
|
|
14118
|
+
handleCreateOption(v);
|
|
14119
|
+
setCreateNewOption(false);
|
|
14120
|
+
},
|
|
14121
|
+
variant: "brand",
|
|
14122
|
+
sx: {
|
|
14123
|
+
minWidth: "100%",
|
|
14125
14124
|
width: "100%"
|
|
14125
|
+
}
|
|
14126
|
+
}
|
|
14127
|
+
),
|
|
14128
|
+
!createNewOption && /* @__PURE__ */ React.createElement(
|
|
14129
|
+
CreatableSelect,
|
|
14130
|
+
__spreadValues({
|
|
14131
|
+
menuPlacement,
|
|
14132
|
+
chakraStyles: __spreadProps(__spreadValues({}, customSelectStyles), {
|
|
14133
|
+
container: (provided) => __spreadProps(__spreadValues({}, provided), {
|
|
14134
|
+
width: "100%"
|
|
14135
|
+
}),
|
|
14136
|
+
option: (provided, { isSelected }) => __spreadValues(__spreadValues({}, provided), isSelected && {
|
|
14137
|
+
color: "black"
|
|
14138
|
+
})
|
|
14126
14139
|
}),
|
|
14127
|
-
|
|
14128
|
-
|
|
14129
|
-
|
|
14130
|
-
|
|
14131
|
-
|
|
14132
|
-
|
|
14133
|
-
|
|
14134
|
-
|
|
14135
|
-
|
|
14136
|
-
|
|
14137
|
-
|
|
14138
|
-
|
|
14139
|
-
|
|
14140
|
-
|
|
14141
|
-
|
|
14142
|
-
|
|
14143
|
-
|
|
14144
|
-
));
|
|
14140
|
+
components: getCustomComponents(),
|
|
14141
|
+
options: customOptions,
|
|
14142
|
+
menuPortalTarget: document.body,
|
|
14143
|
+
styles: { menuPortal: (base) => __spreadProps(__spreadValues({}, base), { zIndex: theme$1.zIndices.popover }) },
|
|
14144
|
+
value: selectedOption,
|
|
14145
|
+
onChange: handleChange,
|
|
14146
|
+
isMulti: false,
|
|
14147
|
+
onCreateOption: (v) => {
|
|
14148
|
+
setCreateNewOption(true);
|
|
14149
|
+
setAddFieldInputValue(v);
|
|
14150
|
+
},
|
|
14151
|
+
placeholder: newOptionPlaceholder,
|
|
14152
|
+
useBasicStyles: true,
|
|
14153
|
+
variant
|
|
14154
|
+
}, restProps)
|
|
14155
|
+
)
|
|
14156
|
+
);
|
|
14145
14157
|
};
|
|
14146
14158
|
|
|
14147
14159
|
export { Accordion, AccordionButton, AccordionItem, AccordionPanel, Alert$1 as Alert, AspectRatio, AsyncError, Avatar$1 as Avatar, AvatarGroup, Badge$1 as Badge, Blinker$1 as Blinker, Blockquote$1 as Blockquote, Button$1 as Button, Capitalized$1 as Capitalized, Carousel, Checkbox$1 as Checkbox, CheckboxField, Clickable, ClipboardInput, Collapse, ColorPicker$1 as ColorPicker, ColorPickerField, CreatableSelectDropdown, CustomTheme, DatePicker, DatePickerField, DateRangePicker, DateRangePickerField, DragAndDrop, DragHandle, DragItem, Draggable, DropZone, Droppable, EditableText, Fade, FastGrid, FastList, Field, FilePicker, FilePickerField, FlipButton$1 as FlipButton, FlipButtonGroup, FlipButtonGroupField, Form, FormLabel, FormattedNumberInput, FormattedNumberInputField, H1$1 as H1, H2$1 as H2, H3$1 as H3, H4$1 as H4, H5$1 as H5, H6$1 as H6, Icon$1 as Icon, IconButton, IntentButton, Label$1 as Label, Lead$1 as Lead, LoadingBar, MaskedTextInput, MediatoolThemeProvider, Menu, Modal, ModalBase, ModalBody, MultiFileList, MultiFilePicker, MultiFilePickerField, MultiFileUploader, MultiSort, NotificationIconButton, NumVal$1 as NumVal, NumberInput, NumberInputField, OrganizationLogo, OverflowGroup, P$1 as P, PaneDivider, PaneItem, PinInput, Popover$1 as Popover, ProgressBar, Radio, RadioGroup, RadioGroupField, ResizeHandle, ScaleFade, SearchBar, SearchBarField, Select, SelectField, Slide, SlideFade, Small$1 as Small, Sortable, SortableContainer, SortableItem, SortableList, Spinner$1 as Spinner, SplitPane, StatusBlock, StatusPin, Step, StepList, StepPanel, StepStack, Steps, Switch, SwitchField, TabPanel, Table, Tabs, Tag, TagGroup, TagsInput, TextField, Textarea, TextareaField, Tiny$1 as Tiny, Toast, Toolbox, ToolboxContent, ToolboxFooter, ToolboxHeader, Tooltip, addAlpha, advancedParseFloat, clamp, createDebounceFunctionInstance, getChildrenWithProps, getContrastColor, getFieldError, getInitials, getMatchingValue, getShades, highlight, luminosity, ring, statusIconMap, theme, tottTheme, trimFormValues, useArrowFocus, useCurrentTheme, useDebounce, useDidUpdateEffect, useLoadingMessage, useOutsideRectClick, useOverflowGroup, useResizeWidth, useScreenSize, useScrollToBottom, useSelectCallbacks, useSetValueRefreshed, useToast };
|