@northlight/ui 2.38.0 → 2.38.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.d.ts +33 -1
- package/dist/es/northlight.js +180 -175
- package/dist/es/northlight.js.map +1 -1
- package/dist/umd/northlight.cjs +179 -174
- 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/umd/northlight.cjs
CHANGED
|
@@ -7743,8 +7743,7 @@
|
|
|
7743
7743
|
firstDayOfWeek,
|
|
7744
7744
|
onSave,
|
|
7745
7745
|
buttonLabel = "Save",
|
|
7746
|
-
clearButtonLabel = "Clear"
|
|
7747
|
-
onCancel
|
|
7746
|
+
clearButtonLabel = "Clear"
|
|
7748
7747
|
} = props;
|
|
7749
7748
|
const { locale } = i18n.useLocale();
|
|
7750
7749
|
const ref = React.useRef(null);
|
|
@@ -7775,14 +7774,6 @@
|
|
|
7775
7774
|
locale,
|
|
7776
7775
|
createCalendar: () => new date.GregorianCalendar()
|
|
7777
7776
|
});
|
|
7778
|
-
const handleOnReset = () => {
|
|
7779
|
-
if (onCancel) {
|
|
7780
|
-
onCancel();
|
|
7781
|
-
} else {
|
|
7782
|
-
resetDate();
|
|
7783
|
-
}
|
|
7784
|
-
handleClose();
|
|
7785
|
-
};
|
|
7786
7777
|
const focusDateRange = (dateRange) => {
|
|
7787
7778
|
if (dateRange && dateRange.start && dateRange.end) {
|
|
7788
7779
|
calendarOneState.setFocusedDate(dateRange.start);
|
|
@@ -7802,6 +7793,10 @@
|
|
|
7802
7793
|
onSave == null ? void 0 : onSave();
|
|
7803
7794
|
handleClose();
|
|
7804
7795
|
};
|
|
7796
|
+
const handleReset = () => {
|
|
7797
|
+
resetDate();
|
|
7798
|
+
handleClose();
|
|
7799
|
+
};
|
|
7805
7800
|
return /* @__PURE__ */ React.createElement(react.Box, { ref, __css: rangeCalendarContainer }, /* @__PURE__ */ React.createElement(react.Stack, null, /* @__PURE__ */ React.createElement(react.Flex, { gap: 4 }, /* @__PURE__ */ React.createElement(
|
|
7806
7801
|
QuickSelect,
|
|
7807
7802
|
{
|
|
@@ -7824,14 +7819,23 @@
|
|
|
7824
7819
|
range: value,
|
|
7825
7820
|
firstDayOfWeek
|
|
7826
7821
|
}
|
|
7827
|
-
))), /* @__PURE__ */ React.createElement(react.HStack, { pt: "2", alignSelf: "end" }, isClearable && /* @__PURE__ */ React.createElement(Button, { onClick:
|
|
7822
|
+
))), /* @__PURE__ */ React.createElement(react.HStack, { pt: "2", alignSelf: "end" }, isClearable && /* @__PURE__ */ React.createElement(Button, { onClick: handleReset, variant: "ghost", size: "sm" }, clearButtonLabel), /* @__PURE__ */ React.createElement(Button, { variant: "brand", onClick: handleSave, size: "sm" }, buttonLabel))))))));
|
|
7828
7823
|
};
|
|
7829
7824
|
|
|
7830
7825
|
const isValidDateRange = (value) => ramda.is(Object, value) && ramda.has("startDate", value) && ramda.has("endDate", value) && ramda.is(String, value.startDate) && ramda.is(String, value.endDate);
|
|
7831
7826
|
|
|
7827
|
+
const tooltipIconMap = {
|
|
7828
|
+
success: NorthlightIcons.CheckCircleSolid,
|
|
7829
|
+
warning: NorthlightIcons.AlertTriangleSolid,
|
|
7830
|
+
error: NorthlightIcons.AlertCircleSolid,
|
|
7831
|
+
danger: NorthlightIcons.AlertOctagonSolid,
|
|
7832
|
+
info: NorthlightIcons.InfoSolid,
|
|
7833
|
+
ai: NorthlightIcons.BrightnessSolid,
|
|
7834
|
+
default: NorthlightIcons.HelpCircleSolid,
|
|
7835
|
+
ghost: NorthlightIcons.HelpCircleSolid
|
|
7836
|
+
};
|
|
7837
|
+
|
|
7832
7838
|
var __defProp$1p = Object.defineProperty;
|
|
7833
|
-
var __defProps$e = Object.defineProperties;
|
|
7834
|
-
var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
|
|
7835
7839
|
var __getOwnPropSymbols$1p = Object.getOwnPropertySymbols;
|
|
7836
7840
|
var __hasOwnProp$1p = Object.prototype.hasOwnProperty;
|
|
7837
7841
|
var __propIsEnum$1p = Object.prototype.propertyIsEnumerable;
|
|
@@ -7847,6 +7851,73 @@
|
|
|
7847
7851
|
}
|
|
7848
7852
|
return a;
|
|
7849
7853
|
};
|
|
7854
|
+
var __objRest$1b = (source, exclude) => {
|
|
7855
|
+
var target = {};
|
|
7856
|
+
for (var prop in source)
|
|
7857
|
+
if (__hasOwnProp$1p.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
7858
|
+
target[prop] = source[prop];
|
|
7859
|
+
if (source != null && __getOwnPropSymbols$1p)
|
|
7860
|
+
for (var prop of __getOwnPropSymbols$1p(source)) {
|
|
7861
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$1p.call(source, prop))
|
|
7862
|
+
target[prop] = source[prop];
|
|
7863
|
+
}
|
|
7864
|
+
return target;
|
|
7865
|
+
};
|
|
7866
|
+
const Tooltip = (_a) => {
|
|
7867
|
+
var _b = _a, {
|
|
7868
|
+
variant = "default",
|
|
7869
|
+
hasArrow = true,
|
|
7870
|
+
title = "",
|
|
7871
|
+
description = "",
|
|
7872
|
+
hasIcon = false
|
|
7873
|
+
} = _b, rest = __objRest$1b(_b, [
|
|
7874
|
+
"variant",
|
|
7875
|
+
"hasArrow",
|
|
7876
|
+
"title",
|
|
7877
|
+
"description",
|
|
7878
|
+
"hasIcon"
|
|
7879
|
+
]);
|
|
7880
|
+
const iconVariant = variant;
|
|
7881
|
+
const icon = tooltipIconMap[iconVariant];
|
|
7882
|
+
const TooltipContent = /* @__PURE__ */ React.createElement(react.HStack, { alignItems: "flex-start" }, hasIcon && /* @__PURE__ */ React.createElement(Icon, { as: icon, color: `icon.toast.${iconVariant}` }), /* @__PURE__ */ React.createElement(react.VStack, { spacing: 0, alignItems: "flex-start" }, /* @__PURE__ */ React.createElement(Label, { size: "sm" }, title), /* @__PURE__ */ React.createElement(
|
|
7883
|
+
P,
|
|
7884
|
+
{
|
|
7885
|
+
variant: "14",
|
|
7886
|
+
sx: {
|
|
7887
|
+
color: !variant || variant === "ai" ? "text.inverted" : "text.default"
|
|
7888
|
+
}
|
|
7889
|
+
},
|
|
7890
|
+
description
|
|
7891
|
+
)));
|
|
7892
|
+
return /* @__PURE__ */ React.createElement(
|
|
7893
|
+
react.Tooltip,
|
|
7894
|
+
__spreadValues$1p({
|
|
7895
|
+
hasArrow,
|
|
7896
|
+
hasIcon,
|
|
7897
|
+
label: title || description ? TooltipContent : void 0,
|
|
7898
|
+
variant
|
|
7899
|
+
}, rest)
|
|
7900
|
+
);
|
|
7901
|
+
};
|
|
7902
|
+
|
|
7903
|
+
var __defProp$1o = Object.defineProperty;
|
|
7904
|
+
var __defProps$e = Object.defineProperties;
|
|
7905
|
+
var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
|
|
7906
|
+
var __getOwnPropSymbols$1o = Object.getOwnPropertySymbols;
|
|
7907
|
+
var __hasOwnProp$1o = Object.prototype.hasOwnProperty;
|
|
7908
|
+
var __propIsEnum$1o = Object.prototype.propertyIsEnumerable;
|
|
7909
|
+
var __defNormalProp$1o = (obj, key, value) => key in obj ? __defProp$1o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7910
|
+
var __spreadValues$1o = (a, b) => {
|
|
7911
|
+
for (var prop in b || (b = {}))
|
|
7912
|
+
if (__hasOwnProp$1o.call(b, prop))
|
|
7913
|
+
__defNormalProp$1o(a, prop, b[prop]);
|
|
7914
|
+
if (__getOwnPropSymbols$1o)
|
|
7915
|
+
for (var prop of __getOwnPropSymbols$1o(b)) {
|
|
7916
|
+
if (__propIsEnum$1o.call(b, prop))
|
|
7917
|
+
__defNormalProp$1o(a, prop, b[prop]);
|
|
7918
|
+
}
|
|
7919
|
+
return a;
|
|
7920
|
+
};
|
|
7850
7921
|
var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
|
|
7851
7922
|
const parseValue = (value) => {
|
|
7852
7923
|
if (!isValidDateRange(value))
|
|
@@ -7882,11 +7953,10 @@
|
|
|
7882
7953
|
onSave,
|
|
7883
7954
|
buttonLabel = "Save",
|
|
7884
7955
|
clearButtonLabel = "Clear",
|
|
7885
|
-
|
|
7886
|
-
|
|
7887
|
-
|
|
7888
|
-
|
|
7889
|
-
CustomResetButton
|
|
7956
|
+
savedDateRange,
|
|
7957
|
+
defaultDateRange,
|
|
7958
|
+
CustomResetButton,
|
|
7959
|
+
onCancelChanges
|
|
7890
7960
|
} = props;
|
|
7891
7961
|
const ref = React.useRef();
|
|
7892
7962
|
const { group } = react.useMultiStyleConfig("DatePicker");
|
|
@@ -7914,9 +7984,6 @@
|
|
|
7914
7984
|
shouldCloseOnSelect: false,
|
|
7915
7985
|
hideTimeZone: true
|
|
7916
7986
|
});
|
|
7917
|
-
React.useEffect(() => {
|
|
7918
|
-
setIsOpen(state.isOpen);
|
|
7919
|
-
}, [state.isOpen]);
|
|
7920
7987
|
const {
|
|
7921
7988
|
groupProps,
|
|
7922
7989
|
startFieldProps,
|
|
@@ -7941,14 +8008,14 @@
|
|
|
7941
8008
|
isDisabled,
|
|
7942
8009
|
isInvalid,
|
|
7943
8010
|
startName: props.startName,
|
|
7944
|
-
endName: props.endName
|
|
8011
|
+
endName: props.endName,
|
|
8012
|
+
"aria-label": "Date range picker"
|
|
7945
8013
|
},
|
|
7946
8014
|
state,
|
|
7947
8015
|
ref
|
|
7948
8016
|
);
|
|
7949
8017
|
const togglePopup = () => state.setOpen(!state.isOpen);
|
|
7950
8018
|
const handleClose = () => {
|
|
7951
|
-
onChangeCallback(savedDateRange);
|
|
7952
8019
|
state.setOpen(false);
|
|
7953
8020
|
};
|
|
7954
8021
|
react.useOutsideClick({
|
|
@@ -7968,50 +8035,64 @@
|
|
|
7968
8035
|
icon: /* @__PURE__ */ React.createElement(Icon, { as: NorthlightIcons.XCloseSolid })
|
|
7969
8036
|
}
|
|
7970
8037
|
);
|
|
7971
|
-
const
|
|
7972
|
-
|
|
7973
|
-
|
|
7974
|
-
|
|
8038
|
+
const cancelOrResetDateChange = () => {
|
|
8039
|
+
if (onCancelChanges) {
|
|
8040
|
+
if (!ramda.isNil(savedDateRange))
|
|
8041
|
+
onChangeCallback(savedDateRange);
|
|
8042
|
+
onCancelChanges();
|
|
8043
|
+
} else {
|
|
8044
|
+
if (!ramda.isNil(defaultDateRange))
|
|
8045
|
+
onChangeCallback(defaultDateRange);
|
|
8046
|
+
resetDate();
|
|
8047
|
+
}
|
|
7975
8048
|
};
|
|
7976
8049
|
const handleSave = () => {
|
|
7977
8050
|
onSave == null ? void 0 : onSave();
|
|
7978
8051
|
handleClose();
|
|
7979
8052
|
};
|
|
7980
|
-
const
|
|
7981
|
-
|
|
8053
|
+
const handleModalClose = () => {
|
|
8054
|
+
if (!ramda.isNil(savedDateRange))
|
|
8055
|
+
onChangeCallback(savedDateRange);
|
|
8056
|
+
handleClose();
|
|
8057
|
+
};
|
|
8058
|
+
const isCurrentDateSaved = ramda.isNil(savedDateRange) || isDatesEqual(value, savedDateRange);
|
|
8059
|
+
const isDateResettable = ramda.isNil(defaultDateRange) || !isDatesEqual(value, defaultDateRange);
|
|
8060
|
+
const canShowSaveAndCancelButtons = !ramda.isNil(savedDateRange) && !ramda.isNil(defaultDateRange);
|
|
8061
|
+
const shouldShowResetButton = !state.isOpen && isCurrentDateSaved && isDateResettable;
|
|
8062
|
+
const shouldShowSaveAndCancelButtons = canShowSaveAndCancelButtons && !state.isOpen && !isCurrentDateSaved;
|
|
7982
8063
|
return /* @__PURE__ */ React.createElement(
|
|
7983
8064
|
Popover,
|
|
7984
8065
|
{
|
|
7985
8066
|
isOpen: state.isOpen,
|
|
7986
|
-
onClose:
|
|
8067
|
+
onClose: handleModalClose,
|
|
7987
8068
|
placement: "bottom-start"
|
|
7988
8069
|
},
|
|
7989
|
-
/* @__PURE__ */ React.createElement(react.PopoverAnchor, null, /* @__PURE__ */ React.createElement(react.HStack, null, /* @__PURE__ */ React.createElement(react.InputGroup, __spreadProps$e(__spreadValues$
|
|
8070
|
+
/* @__PURE__ */ React.createElement(react.PopoverAnchor, null, /* @__PURE__ */ React.createElement(react.HStack, null, /* @__PURE__ */ React.createElement(react.InputGroup, __spreadProps$e(__spreadValues$1o({}, groupProps), { ref, __css: group }), /* @__PURE__ */ React.createElement(
|
|
7990
8071
|
StyledField,
|
|
7991
8072
|
{
|
|
7992
8073
|
isDisabled,
|
|
7993
8074
|
isInvalid,
|
|
7994
8075
|
variant
|
|
7995
8076
|
},
|
|
7996
|
-
/* @__PURE__ */ React.createElement(react.HStack, { paddingInlineStart: "1a", paddingInlineEnd: 10 }, /* @__PURE__ */ React.createElement(DateField, __spreadProps$e(__spreadValues$
|
|
8077
|
+
/* @__PURE__ */ React.createElement(react.HStack, { paddingInlineStart: "1a", paddingInlineEnd: 10 }, /* @__PURE__ */ React.createElement(DateField, __spreadProps$e(__spreadValues$1o({}, startFieldProps), { dateFormat })), /* @__PURE__ */ React.createElement(P, null, "-"), /* @__PURE__ */ React.createElement(DateField, __spreadProps$e(__spreadValues$1o({}, endFieldProps), { dateFormat })))
|
|
7997
8078
|
), /* @__PURE__ */ React.createElement(react.InputRightElement, { sx: { height: "100%", paddingRight: "1" } }, /* @__PURE__ */ React.createElement(
|
|
7998
8079
|
Trigger,
|
|
7999
|
-
__spreadProps$e(__spreadValues$
|
|
8080
|
+
__spreadProps$e(__spreadValues$1o({}, buttonProps), {
|
|
8000
8081
|
isDisabled,
|
|
8001
8082
|
handleClick: togglePopup
|
|
8002
8083
|
})
|
|
8003
|
-
))), shouldShowResetButton && ResetButton, shouldShowSaveAndCancelButtons && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
8084
|
+
))), shouldShowResetButton && ResetButton, shouldShowSaveAndCancelButtons && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Tooltip, { label: clearButtonLabel }, /* @__PURE__ */ React.createElement(
|
|
8004
8085
|
IconButton,
|
|
8005
8086
|
{
|
|
8006
8087
|
"aria-label": "cancel-date-change",
|
|
8007
8088
|
variant: "ghost",
|
|
8008
8089
|
size: "sm",
|
|
8009
8090
|
fontSize: "xs",
|
|
8010
|
-
onClick:
|
|
8091
|
+
onClick: onCancelChanges,
|
|
8011
8092
|
isDisabled,
|
|
8012
8093
|
icon: /* @__PURE__ */ React.createElement(Icon, { as: NorthlightIcons.XCloseSolid })
|
|
8013
8094
|
}
|
|
8014
|
-
), /* @__PURE__ */ React.createElement(
|
|
8095
|
+
)), /* @__PURE__ */ React.createElement(Tooltip, { label: buttonLabel }, /* @__PURE__ */ React.createElement(
|
|
8015
8096
|
IconButton,
|
|
8016
8097
|
{
|
|
8017
8098
|
"aria-label": "save-date",
|
|
@@ -8019,20 +8100,20 @@
|
|
|
8019
8100
|
size: "sm",
|
|
8020
8101
|
fontSize: "xs",
|
|
8021
8102
|
onClick: handleSave,
|
|
8103
|
+
isDisabled,
|
|
8022
8104
|
icon: /* @__PURE__ */ React.createElement(Icon, { as: NorthlightIcons.CheckSolid })
|
|
8023
8105
|
}
|
|
8024
|
-
)))),
|
|
8025
|
-
/* @__PURE__ */ React.createElement(PortalWrapper, { renderInPortal }, state.isOpen && /* @__PURE__ */ React.createElement(react.PopoverContent, __spreadProps$e(__spreadValues$
|
|
8106
|
+
))))),
|
|
8107
|
+
/* @__PURE__ */ React.createElement(PortalWrapper, { renderInPortal }, state.isOpen && /* @__PURE__ */ React.createElement(react.PopoverContent, __spreadProps$e(__spreadValues$1o({}, dialogProps), { ref, w: "max-content" }), /* @__PURE__ */ React.createElement(focus.FocusScope, { contain: true, restoreFocus: true }, /* @__PURE__ */ React.createElement(DatePickerLocaleWrapper, { firstDayOfWeek }, /* @__PURE__ */ React.createElement(
|
|
8026
8108
|
RangeCalendar,
|
|
8027
|
-
__spreadProps$e(__spreadValues$
|
|
8028
|
-
resetDate,
|
|
8109
|
+
__spreadProps$e(__spreadValues$1o({}, calendarProps), {
|
|
8110
|
+
resetDate: cancelOrResetDateChange,
|
|
8029
8111
|
handleClose,
|
|
8030
8112
|
fiscalStartMonth: fiscalStartMonth || 0,
|
|
8031
8113
|
fiscalStartDay: fiscalStartDay || 0,
|
|
8032
8114
|
isClearable,
|
|
8033
8115
|
firstDayOfWeek,
|
|
8034
8116
|
onSave,
|
|
8035
|
-
onCancel: cancelDateChange,
|
|
8036
8117
|
clearButtonLabel,
|
|
8037
8118
|
buttonLabel
|
|
8038
8119
|
})
|
|
@@ -8040,30 +8121,30 @@
|
|
|
8040
8121
|
);
|
|
8041
8122
|
};
|
|
8042
8123
|
|
|
8043
|
-
var __defProp$
|
|
8044
|
-
var __getOwnPropSymbols$
|
|
8045
|
-
var __hasOwnProp$
|
|
8046
|
-
var __propIsEnum$
|
|
8047
|
-
var __defNormalProp$
|
|
8048
|
-
var __spreadValues$
|
|
8124
|
+
var __defProp$1n = Object.defineProperty;
|
|
8125
|
+
var __getOwnPropSymbols$1n = Object.getOwnPropertySymbols;
|
|
8126
|
+
var __hasOwnProp$1n = Object.prototype.hasOwnProperty;
|
|
8127
|
+
var __propIsEnum$1n = Object.prototype.propertyIsEnumerable;
|
|
8128
|
+
var __defNormalProp$1n = (obj, key, value) => key in obj ? __defProp$1n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8129
|
+
var __spreadValues$1n = (a, b) => {
|
|
8049
8130
|
for (var prop in b || (b = {}))
|
|
8050
|
-
if (__hasOwnProp$
|
|
8051
|
-
__defNormalProp$
|
|
8052
|
-
if (__getOwnPropSymbols$
|
|
8053
|
-
for (var prop of __getOwnPropSymbols$
|
|
8054
|
-
if (__propIsEnum$
|
|
8055
|
-
__defNormalProp$
|
|
8131
|
+
if (__hasOwnProp$1n.call(b, prop))
|
|
8132
|
+
__defNormalProp$1n(a, prop, b[prop]);
|
|
8133
|
+
if (__getOwnPropSymbols$1n)
|
|
8134
|
+
for (var prop of __getOwnPropSymbols$1n(b)) {
|
|
8135
|
+
if (__propIsEnum$1n.call(b, prop))
|
|
8136
|
+
__defNormalProp$1n(a, prop, b[prop]);
|
|
8056
8137
|
}
|
|
8057
8138
|
return a;
|
|
8058
8139
|
};
|
|
8059
|
-
var __objRest$
|
|
8140
|
+
var __objRest$1a = (source, exclude) => {
|
|
8060
8141
|
var target = {};
|
|
8061
8142
|
for (var prop in source)
|
|
8062
|
-
if (__hasOwnProp$
|
|
8143
|
+
if (__hasOwnProp$1n.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
8063
8144
|
target[prop] = source[prop];
|
|
8064
|
-
if (source != null && __getOwnPropSymbols$
|
|
8065
|
-
for (var prop of __getOwnPropSymbols$
|
|
8066
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
8145
|
+
if (source != null && __getOwnPropSymbols$1n)
|
|
8146
|
+
for (var prop of __getOwnPropSymbols$1n(source)) {
|
|
8147
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$1n.call(source, prop))
|
|
8067
8148
|
target[prop] = source[prop];
|
|
8068
8149
|
}
|
|
8069
8150
|
return target;
|
|
@@ -8073,39 +8154,39 @@
|
|
|
8073
8154
|
inputLeftElement,
|
|
8074
8155
|
inputRightElement,
|
|
8075
8156
|
children
|
|
8076
|
-
} = _b, rest = __objRest$
|
|
8157
|
+
} = _b, rest = __objRest$1a(_b, [
|
|
8077
8158
|
"inputLeftElement",
|
|
8078
8159
|
"inputRightElement",
|
|
8079
8160
|
"children"
|
|
8080
8161
|
]);
|
|
8081
8162
|
const containsInputGroupElement = ramda.not(ramda.all(ramda.isNil, [inputLeftElement, inputRightElement]));
|
|
8082
|
-
return containsInputGroupElement ? /* @__PURE__ */ React.createElement(react.InputGroup, __spreadValues$
|
|
8163
|
+
return containsInputGroupElement ? /* @__PURE__ */ React.createElement(react.InputGroup, __spreadValues$1n({}, rest), inputLeftElement, children, inputRightElement) : /* @__PURE__ */ React.createElement(React.Fragment, null, children);
|
|
8083
8164
|
};
|
|
8084
8165
|
|
|
8085
|
-
var __defProp$
|
|
8086
|
-
var __getOwnPropSymbols$
|
|
8087
|
-
var __hasOwnProp$
|
|
8088
|
-
var __propIsEnum$
|
|
8089
|
-
var __defNormalProp$
|
|
8090
|
-
var __spreadValues$
|
|
8166
|
+
var __defProp$1m = Object.defineProperty;
|
|
8167
|
+
var __getOwnPropSymbols$1m = Object.getOwnPropertySymbols;
|
|
8168
|
+
var __hasOwnProp$1m = Object.prototype.hasOwnProperty;
|
|
8169
|
+
var __propIsEnum$1m = Object.prototype.propertyIsEnumerable;
|
|
8170
|
+
var __defNormalProp$1m = (obj, key, value) => key in obj ? __defProp$1m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8171
|
+
var __spreadValues$1m = (a, b) => {
|
|
8091
8172
|
for (var prop in b || (b = {}))
|
|
8092
|
-
if (__hasOwnProp$
|
|
8093
|
-
__defNormalProp$
|
|
8094
|
-
if (__getOwnPropSymbols$
|
|
8095
|
-
for (var prop of __getOwnPropSymbols$
|
|
8096
|
-
if (__propIsEnum$
|
|
8097
|
-
__defNormalProp$
|
|
8173
|
+
if (__hasOwnProp$1m.call(b, prop))
|
|
8174
|
+
__defNormalProp$1m(a, prop, b[prop]);
|
|
8175
|
+
if (__getOwnPropSymbols$1m)
|
|
8176
|
+
for (var prop of __getOwnPropSymbols$1m(b)) {
|
|
8177
|
+
if (__propIsEnum$1m.call(b, prop))
|
|
8178
|
+
__defNormalProp$1m(a, prop, b[prop]);
|
|
8098
8179
|
}
|
|
8099
8180
|
return a;
|
|
8100
8181
|
};
|
|
8101
|
-
var __objRest$
|
|
8182
|
+
var __objRest$19 = (source, exclude) => {
|
|
8102
8183
|
var target = {};
|
|
8103
8184
|
for (var prop in source)
|
|
8104
|
-
if (__hasOwnProp$
|
|
8185
|
+
if (__hasOwnProp$1m.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
8105
8186
|
target[prop] = source[prop];
|
|
8106
|
-
if (source != null && __getOwnPropSymbols$
|
|
8107
|
-
for (var prop of __getOwnPropSymbols$
|
|
8108
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
8187
|
+
if (source != null && __getOwnPropSymbols$1m)
|
|
8188
|
+
for (var prop of __getOwnPropSymbols$1m(source)) {
|
|
8189
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$1m.call(source, prop))
|
|
8109
8190
|
target[prop] = source[prop];
|
|
8110
8191
|
}
|
|
8111
8192
|
return target;
|
|
@@ -8123,7 +8204,7 @@
|
|
|
8123
8204
|
onChange: onChangeCallback = ramda.identity,
|
|
8124
8205
|
inputLeftElement,
|
|
8125
8206
|
inputRightElement
|
|
8126
|
-
} = _b, rest = __objRest$
|
|
8207
|
+
} = _b, rest = __objRest$19(_b, [
|
|
8127
8208
|
"name",
|
|
8128
8209
|
"minValue",
|
|
8129
8210
|
"maxValue",
|
|
@@ -8167,7 +8248,7 @@
|
|
|
8167
8248
|
},
|
|
8168
8249
|
/* @__PURE__ */ React.createElement(
|
|
8169
8250
|
DatePicker,
|
|
8170
|
-
__spreadValues$
|
|
8251
|
+
__spreadValues$1m({
|
|
8171
8252
|
firstDayOfWeek,
|
|
8172
8253
|
"aria-label": label,
|
|
8173
8254
|
isInvalid: !!errors[name],
|
|
@@ -8183,30 +8264,30 @@
|
|
|
8183
8264
|
);
|
|
8184
8265
|
});
|
|
8185
8266
|
|
|
8186
|
-
var __defProp$
|
|
8187
|
-
var __getOwnPropSymbols$
|
|
8188
|
-
var __hasOwnProp$
|
|
8189
|
-
var __propIsEnum$
|
|
8190
|
-
var __defNormalProp$
|
|
8191
|
-
var __spreadValues$
|
|
8267
|
+
var __defProp$1l = Object.defineProperty;
|
|
8268
|
+
var __getOwnPropSymbols$1l = Object.getOwnPropertySymbols;
|
|
8269
|
+
var __hasOwnProp$1l = Object.prototype.hasOwnProperty;
|
|
8270
|
+
var __propIsEnum$1l = Object.prototype.propertyIsEnumerable;
|
|
8271
|
+
var __defNormalProp$1l = (obj, key, value) => key in obj ? __defProp$1l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8272
|
+
var __spreadValues$1l = (a, b) => {
|
|
8192
8273
|
for (var prop in b || (b = {}))
|
|
8193
|
-
if (__hasOwnProp$
|
|
8194
|
-
__defNormalProp$
|
|
8195
|
-
if (__getOwnPropSymbols$
|
|
8196
|
-
for (var prop of __getOwnPropSymbols$
|
|
8197
|
-
if (__propIsEnum$
|
|
8198
|
-
__defNormalProp$
|
|
8274
|
+
if (__hasOwnProp$1l.call(b, prop))
|
|
8275
|
+
__defNormalProp$1l(a, prop, b[prop]);
|
|
8276
|
+
if (__getOwnPropSymbols$1l)
|
|
8277
|
+
for (var prop of __getOwnPropSymbols$1l(b)) {
|
|
8278
|
+
if (__propIsEnum$1l.call(b, prop))
|
|
8279
|
+
__defNormalProp$1l(a, prop, b[prop]);
|
|
8199
8280
|
}
|
|
8200
8281
|
return a;
|
|
8201
8282
|
};
|
|
8202
|
-
var __objRest$
|
|
8283
|
+
var __objRest$18 = (source, exclude) => {
|
|
8203
8284
|
var target = {};
|
|
8204
8285
|
for (var prop in source)
|
|
8205
|
-
if (__hasOwnProp$
|
|
8286
|
+
if (__hasOwnProp$1l.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
8206
8287
|
target[prop] = source[prop];
|
|
8207
|
-
if (source != null && __getOwnPropSymbols$
|
|
8208
|
-
for (var prop of __getOwnPropSymbols$
|
|
8209
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
8288
|
+
if (source != null && __getOwnPropSymbols$1l)
|
|
8289
|
+
for (var prop of __getOwnPropSymbols$1l(source)) {
|
|
8290
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$1l.call(source, prop))
|
|
8210
8291
|
target[prop] = source[prop];
|
|
8211
8292
|
}
|
|
8212
8293
|
return target;
|
|
@@ -8225,7 +8306,7 @@
|
|
|
8225
8306
|
isClearable = true,
|
|
8226
8307
|
onSave,
|
|
8227
8308
|
buttonLabel = "Save"
|
|
8228
|
-
} = _b, rest = __objRest$
|
|
8309
|
+
} = _b, rest = __objRest$18(_b, [
|
|
8229
8310
|
"name",
|
|
8230
8311
|
"minValue",
|
|
8231
8312
|
"maxValue",
|
|
@@ -8264,7 +8345,7 @@
|
|
|
8264
8345
|
},
|
|
8265
8346
|
({ value, onChange }, { formState: { errors } }) => /* @__PURE__ */ React.createElement(
|
|
8266
8347
|
DateRangePicker,
|
|
8267
|
-
__spreadValues$
|
|
8348
|
+
__spreadValues$1l({
|
|
8268
8349
|
firstDayOfWeek,
|
|
8269
8350
|
"aria-label": label,
|
|
8270
8351
|
isInvalid: !!errors[name],
|
|
@@ -8282,82 +8363,6 @@
|
|
|
8282
8363
|
);
|
|
8283
8364
|
});
|
|
8284
8365
|
|
|
8285
|
-
const tooltipIconMap = {
|
|
8286
|
-
success: NorthlightIcons.CheckCircleSolid,
|
|
8287
|
-
warning: NorthlightIcons.AlertTriangleSolid,
|
|
8288
|
-
error: NorthlightIcons.AlertCircleSolid,
|
|
8289
|
-
danger: NorthlightIcons.AlertOctagonSolid,
|
|
8290
|
-
info: NorthlightIcons.InfoSolid,
|
|
8291
|
-
ai: NorthlightIcons.BrightnessSolid,
|
|
8292
|
-
default: NorthlightIcons.HelpCircleSolid,
|
|
8293
|
-
ghost: NorthlightIcons.HelpCircleSolid
|
|
8294
|
-
};
|
|
8295
|
-
|
|
8296
|
-
var __defProp$1l = Object.defineProperty;
|
|
8297
|
-
var __getOwnPropSymbols$1l = Object.getOwnPropertySymbols;
|
|
8298
|
-
var __hasOwnProp$1l = Object.prototype.hasOwnProperty;
|
|
8299
|
-
var __propIsEnum$1l = Object.prototype.propertyIsEnumerable;
|
|
8300
|
-
var __defNormalProp$1l = (obj, key, value) => key in obj ? __defProp$1l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8301
|
-
var __spreadValues$1l = (a, b) => {
|
|
8302
|
-
for (var prop in b || (b = {}))
|
|
8303
|
-
if (__hasOwnProp$1l.call(b, prop))
|
|
8304
|
-
__defNormalProp$1l(a, prop, b[prop]);
|
|
8305
|
-
if (__getOwnPropSymbols$1l)
|
|
8306
|
-
for (var prop of __getOwnPropSymbols$1l(b)) {
|
|
8307
|
-
if (__propIsEnum$1l.call(b, prop))
|
|
8308
|
-
__defNormalProp$1l(a, prop, b[prop]);
|
|
8309
|
-
}
|
|
8310
|
-
return a;
|
|
8311
|
-
};
|
|
8312
|
-
var __objRest$18 = (source, exclude) => {
|
|
8313
|
-
var target = {};
|
|
8314
|
-
for (var prop in source)
|
|
8315
|
-
if (__hasOwnProp$1l.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
8316
|
-
target[prop] = source[prop];
|
|
8317
|
-
if (source != null && __getOwnPropSymbols$1l)
|
|
8318
|
-
for (var prop of __getOwnPropSymbols$1l(source)) {
|
|
8319
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$1l.call(source, prop))
|
|
8320
|
-
target[prop] = source[prop];
|
|
8321
|
-
}
|
|
8322
|
-
return target;
|
|
8323
|
-
};
|
|
8324
|
-
const Tooltip = (_a) => {
|
|
8325
|
-
var _b = _a, {
|
|
8326
|
-
variant = "default",
|
|
8327
|
-
hasArrow = true,
|
|
8328
|
-
title = "",
|
|
8329
|
-
description = "",
|
|
8330
|
-
hasIcon = false
|
|
8331
|
-
} = _b, rest = __objRest$18(_b, [
|
|
8332
|
-
"variant",
|
|
8333
|
-
"hasArrow",
|
|
8334
|
-
"title",
|
|
8335
|
-
"description",
|
|
8336
|
-
"hasIcon"
|
|
8337
|
-
]);
|
|
8338
|
-
const iconVariant = variant;
|
|
8339
|
-
const icon = tooltipIconMap[iconVariant];
|
|
8340
|
-
const TooltipContent = /* @__PURE__ */ React.createElement(react.HStack, { alignItems: "flex-start" }, hasIcon && /* @__PURE__ */ React.createElement(Icon, { as: icon, color: `icon.toast.${iconVariant}` }), /* @__PURE__ */ React.createElement(react.VStack, { spacing: 0, alignItems: "flex-start" }, /* @__PURE__ */ React.createElement(Label, { size: "sm" }, title), /* @__PURE__ */ React.createElement(
|
|
8341
|
-
P,
|
|
8342
|
-
{
|
|
8343
|
-
variant: "14",
|
|
8344
|
-
sx: {
|
|
8345
|
-
color: !variant || variant === "ai" ? "text.inverted" : "text.default"
|
|
8346
|
-
}
|
|
8347
|
-
},
|
|
8348
|
-
description
|
|
8349
|
-
)));
|
|
8350
|
-
return /* @__PURE__ */ React.createElement(
|
|
8351
|
-
react.Tooltip,
|
|
8352
|
-
__spreadValues$1l({
|
|
8353
|
-
hasArrow,
|
|
8354
|
-
hasIcon,
|
|
8355
|
-
label: title || description ? TooltipContent : void 0,
|
|
8356
|
-
variant
|
|
8357
|
-
}, rest)
|
|
8358
|
-
);
|
|
8359
|
-
};
|
|
8360
|
-
|
|
8361
8366
|
var __defProp$1k = Object.defineProperty;
|
|
8362
8367
|
var __getOwnPropSymbols$1k = Object.getOwnPropertySymbols;
|
|
8363
8368
|
var __hasOwnProp$1k = Object.prototype.hasOwnProperty;
|