@northlight/ui 2.33.8 → 2.33.10
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 +2 -0
- package/dist/es/northlight.js +16 -6
- package/dist/es/northlight.js.map +1 -1
- package/dist/umd/northlight.cjs +16 -6
- package/dist/umd/northlight.cjs.map +1 -1
- package/dist/umd/northlight.min.cjs +2 -2
- package/dist/umd/northlight.min.cjs.map +1 -1
- package/package.json +3 -3
package/dist/umd/northlight.cjs
CHANGED
|
@@ -7410,7 +7410,8 @@
|
|
|
7410
7410
|
fiscalStartDay,
|
|
7411
7411
|
minValue,
|
|
7412
7412
|
maxValue,
|
|
7413
|
-
firstDayOfWeek
|
|
7413
|
+
firstDayOfWeek,
|
|
7414
|
+
onSave
|
|
7414
7415
|
} = props;
|
|
7415
7416
|
const { locale } = i18n.useLocale();
|
|
7416
7417
|
const ref = React.useRef(null);
|
|
@@ -7456,6 +7457,10 @@
|
|
|
7456
7457
|
maxValue
|
|
7457
7458
|
};
|
|
7458
7459
|
const focusedStartMonthProps = value && value.start ? {} : focusRing;
|
|
7460
|
+
const handleSave = () => {
|
|
7461
|
+
onSave == null ? void 0 : onSave();
|
|
7462
|
+
handleClose();
|
|
7463
|
+
};
|
|
7459
7464
|
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(
|
|
7460
7465
|
QuickSelect,
|
|
7461
7466
|
{
|
|
@@ -7478,7 +7483,7 @@
|
|
|
7478
7483
|
range: value,
|
|
7479
7484
|
firstDayOfWeek
|
|
7480
7485
|
}
|
|
7481
|
-
))), /* @__PURE__ */ React.createElement(react.HStack, { pt: "2", alignSelf: "end" }, isClearable && /* @__PURE__ */ React.createElement(Button, { onClick: resetDate, variant: "ghost", size: "sm" }, "Clear"), /* @__PURE__ */ React.createElement(Button, { variant: "brand", onClick:
|
|
7486
|
+
))), /* @__PURE__ */ React.createElement(react.HStack, { pt: "2", alignSelf: "end" }, isClearable && /* @__PURE__ */ React.createElement(Button, { onClick: resetDate, variant: "ghost", size: "sm" }, "Clear"), /* @__PURE__ */ React.createElement(Button, { variant: "brand", onClick: handleSave, size: "sm" }, "Save"))))))));
|
|
7482
7487
|
};
|
|
7483
7488
|
|
|
7484
7489
|
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);
|
|
@@ -7531,7 +7536,8 @@
|
|
|
7531
7536
|
minValue = "1994-03-08",
|
|
7532
7537
|
maxValue,
|
|
7533
7538
|
renderInPortal = false,
|
|
7534
|
-
firstDayOfWeek
|
|
7539
|
+
firstDayOfWeek,
|
|
7540
|
+
onSave
|
|
7535
7541
|
} = props;
|
|
7536
7542
|
const ref = React.useRef();
|
|
7537
7543
|
const { group } = react.useMultiStyleConfig("DatePicker");
|
|
@@ -7614,7 +7620,8 @@
|
|
|
7614
7620
|
fiscalStartMonth: fiscalStartMonth || 0,
|
|
7615
7621
|
fiscalStartDay: fiscalStartDay || 0,
|
|
7616
7622
|
isClearable,
|
|
7617
|
-
firstDayOfWeek
|
|
7623
|
+
firstDayOfWeek,
|
|
7624
|
+
onSave
|
|
7618
7625
|
})
|
|
7619
7626
|
)))))
|
|
7620
7627
|
);
|
|
@@ -7802,7 +7809,8 @@
|
|
|
7802
7809
|
validate,
|
|
7803
7810
|
firstDayOfWeek = "monday",
|
|
7804
7811
|
onChange: onChangeCallback = ramda.identity,
|
|
7805
|
-
isClearable = true
|
|
7812
|
+
isClearable = true,
|
|
7813
|
+
onSave
|
|
7806
7814
|
} = _b, rest = __objRest$19(_b, [
|
|
7807
7815
|
"name",
|
|
7808
7816
|
"minValue",
|
|
@@ -7813,7 +7821,8 @@
|
|
|
7813
7821
|
"validate",
|
|
7814
7822
|
"firstDayOfWeek",
|
|
7815
7823
|
"onChange",
|
|
7816
|
-
"isClearable"
|
|
7824
|
+
"isClearable",
|
|
7825
|
+
"onSave"
|
|
7817
7826
|
]);
|
|
7818
7827
|
const { setValue, setError, trigger } = reactHookForm.useFormContext();
|
|
7819
7828
|
const handleChange = (dateRange) => {
|
|
@@ -7845,6 +7854,7 @@
|
|
|
7845
7854
|
"aria-label": label,
|
|
7846
7855
|
isInvalid: !!errors[name],
|
|
7847
7856
|
onChange: handleChange,
|
|
7857
|
+
onSave,
|
|
7848
7858
|
resetDate: () => onChange(null),
|
|
7849
7859
|
value,
|
|
7850
7860
|
minValue,
|