@northlight/ui 2.28.1 → 2.28.2
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
|
@@ -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,64 @@ 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
|
-
variant
|
|
14143
|
-
}, restProps)
|
|
14144
|
-
));
|
|
14140
|
+
components: getCustomComponents(),
|
|
14141
|
+
options: customOptions,
|
|
14142
|
+
value: selectedOption,
|
|
14143
|
+
onChange: handleChange,
|
|
14144
|
+
isMulti: false,
|
|
14145
|
+
onCreateOption: (v) => {
|
|
14146
|
+
setCreateNewOption(true);
|
|
14147
|
+
setAddFieldInputValue(v);
|
|
14148
|
+
},
|
|
14149
|
+
placeholder: newOptionPlaceholder,
|
|
14150
|
+
useBasicStyles: true,
|
|
14151
|
+
variant
|
|
14152
|
+
}, restProps)
|
|
14153
|
+
)
|
|
14154
|
+
);
|
|
14145
14155
|
};
|
|
14146
14156
|
|
|
14147
14157
|
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 };
|