@northlight/ui 2.28.5 → 2.28.7
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 +5 -5
- package/dist/es/northlight.js +136 -66
- package/dist/es/northlight.js.map +1 -1
- package/dist/umd/northlight.cjs +134 -64
- 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 +3 -3
package/dist/umd/northlight.cjs
CHANGED
|
@@ -5644,7 +5644,16 @@
|
|
|
5644
5644
|
};
|
|
5645
5645
|
|
|
5646
5646
|
const Table$1 = {
|
|
5647
|
-
parts: [
|
|
5647
|
+
parts: [
|
|
5648
|
+
"table",
|
|
5649
|
+
"th",
|
|
5650
|
+
"td",
|
|
5651
|
+
"columnHeader",
|
|
5652
|
+
"cell",
|
|
5653
|
+
"caption",
|
|
5654
|
+
"footer",
|
|
5655
|
+
"tr"
|
|
5656
|
+
],
|
|
5648
5657
|
variants: {
|
|
5649
5658
|
rounded: () => ({
|
|
5650
5659
|
table: {
|
|
@@ -5665,7 +5674,48 @@
|
|
|
5665
5674
|
borderColor: "border.default",
|
|
5666
5675
|
borderTopWidth: "xs"
|
|
5667
5676
|
}
|
|
5668
|
-
})
|
|
5677
|
+
}),
|
|
5678
|
+
striped: (props) => {
|
|
5679
|
+
const { colorScheme: c = "gray" } = props;
|
|
5680
|
+
return {
|
|
5681
|
+
table: {
|
|
5682
|
+
borderSpacing: "0",
|
|
5683
|
+
borderCollapse: "separate",
|
|
5684
|
+
borderRadius: "md",
|
|
5685
|
+
borderColor: "border.default",
|
|
5686
|
+
borderWidth: "xs",
|
|
5687
|
+
p: "2"
|
|
5688
|
+
},
|
|
5689
|
+
columnHeader: {
|
|
5690
|
+
color: "text.subdued",
|
|
5691
|
+
bgColor: themeTools.mode(`${c}.100`, `${c}.700`)(props),
|
|
5692
|
+
fontWeight: "bold",
|
|
5693
|
+
textTransform: "none",
|
|
5694
|
+
fontSize: "sm"
|
|
5695
|
+
},
|
|
5696
|
+
cell: {
|
|
5697
|
+
bgColor: themeTools.mode(`${c}.100`, `${c}.700`)(props)
|
|
5698
|
+
},
|
|
5699
|
+
caption: {
|
|
5700
|
+
color: themeTools.mode("gray.600", "gray.100")(props)
|
|
5701
|
+
},
|
|
5702
|
+
th: {
|
|
5703
|
+
borderBottomWidth: "0"
|
|
5704
|
+
},
|
|
5705
|
+
tr: {
|
|
5706
|
+
"&:nth-of-type(odd)": {
|
|
5707
|
+
td: {
|
|
5708
|
+
background: themeTools.mode(`${c}.100`, `${c}.700`)(props)
|
|
5709
|
+
}
|
|
5710
|
+
}
|
|
5711
|
+
},
|
|
5712
|
+
footer: {
|
|
5713
|
+
tr: {
|
|
5714
|
+
th: { borderBottomWidth: 0 }
|
|
5715
|
+
}
|
|
5716
|
+
}
|
|
5717
|
+
};
|
|
5718
|
+
}
|
|
5669
5719
|
}
|
|
5670
5720
|
};
|
|
5671
5721
|
|
|
@@ -6246,14 +6296,16 @@
|
|
|
6246
6296
|
));
|
|
6247
6297
|
};
|
|
6248
6298
|
|
|
6249
|
-
const DayLabels = React.memo(({
|
|
6250
|
-
weekDays
|
|
6251
|
-
}) => {
|
|
6299
|
+
const DayLabels = React.memo(({ weekDays }) => {
|
|
6252
6300
|
const { dayLabel } = system.useMultiStyleConfig("Calendar");
|
|
6253
6301
|
const weekDaysWithIds = weekDays.map((day, i) => ({ label: day, _id: i }));
|
|
6254
|
-
return /* @__PURE__ */ React.createElement(
|
|
6302
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, weekDaysWithIds.map(({ label, _id }) => /* @__PURE__ */ React.createElement(system.chakra.th, { key: _id, __css: dayLabel }, label)));
|
|
6255
6303
|
});
|
|
6256
6304
|
|
|
6305
|
+
const mondayFirstWeekDays = ["M", "T", "W", "T", "F", "S", "S"];
|
|
6306
|
+
const sundayFirstWeekDays = ["S", "M", "T", "W", "T", "F", "S"];
|
|
6307
|
+
const getWeekdays = (firstDayOfWeek) => firstDayOfWeek === "monday" ? mondayFirstWeekDays : sundayFirstWeekDays;
|
|
6308
|
+
|
|
6257
6309
|
var __defProp$1w = Object.defineProperty;
|
|
6258
6310
|
var __getOwnPropSymbols$1w = Object.getOwnPropertySymbols;
|
|
6259
6311
|
var __hasOwnProp$1w = Object.prototype.hasOwnProperty;
|
|
@@ -6284,21 +6336,25 @@
|
|
|
6284
6336
|
};
|
|
6285
6337
|
const CalendarGrid = React.memo(
|
|
6286
6338
|
(_a) => {
|
|
6287
|
-
var _b = _a, { state, locale } = _b, rest = __objRest$1e(_b, ["state", "locale"]);
|
|
6339
|
+
var _b = _a, { state, locale, firstDayOfWeek } = _b, rest = __objRest$1e(_b, ["state", "locale", "firstDayOfWeek"]);
|
|
6288
6340
|
const startDate = state.visibleRange.start;
|
|
6289
|
-
const { gridProps, headerProps
|
|
6341
|
+
const { gridProps, headerProps } = calendar.useCalendarGrid(rest, state);
|
|
6290
6342
|
const weeksInMonth = date.getWeeksInMonth(startDate, locale);
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6343
|
+
const weekDays = getWeekdays(firstDayOfWeek);
|
|
6344
|
+
return /* @__PURE__ */ React.createElement(Table, __spreadValues$1w({ variant: "unstyled" }, gridProps), /* @__PURE__ */ React.createElement(react.Thead, __spreadValues$1w({}, headerProps), /* @__PURE__ */ React.createElement(react.Tr, null, /* @__PURE__ */ React.createElement(DayLabels, { weekDays }))), /* @__PURE__ */ React.createElement(react.Tbody, null, ramda.times(
|
|
6345
|
+
(weekIndex) => /* @__PURE__ */ React.createElement(react.Tr, { key: weekIndex }, state.getDatesInWeek(weekIndex, startDate).map(
|
|
6346
|
+
(date) => date ? /* @__PURE__ */ React.createElement(
|
|
6347
|
+
CalendarCell,
|
|
6348
|
+
{
|
|
6349
|
+
key: date.day,
|
|
6350
|
+
state,
|
|
6351
|
+
date,
|
|
6352
|
+
currentMonth: startDate
|
|
6353
|
+
}
|
|
6354
|
+
) : /* @__PURE__ */ React.createElement(react.chakra.td, null)
|
|
6355
|
+
)),
|
|
6356
|
+
weeksInMonth
|
|
6357
|
+
)));
|
|
6302
6358
|
}
|
|
6303
6359
|
);
|
|
6304
6360
|
|
|
@@ -6387,7 +6443,7 @@
|
|
|
6387
6443
|
w: "max-content",
|
|
6388
6444
|
textAlign: "center"
|
|
6389
6445
|
},
|
|
6390
|
-
months.map((month, i) => /* @__PURE__ */ React.createElement("option", { value: i }, month))
|
|
6446
|
+
months.map((month, i) => /* @__PURE__ */ React.createElement("option", { value: i, key: `month-${i}` }, month))
|
|
6391
6447
|
);
|
|
6392
6448
|
};
|
|
6393
6449
|
|
|
@@ -6538,6 +6594,7 @@
|
|
|
6538
6594
|
ring: isToday && !isSelected ? "1px" : "0px",
|
|
6539
6595
|
ringColor: "blue.500",
|
|
6540
6596
|
mx: "-1px",
|
|
6597
|
+
ml: isToday ? "-2px " : void 0,
|
|
6541
6598
|
my: "0a",
|
|
6542
6599
|
w: "8",
|
|
6543
6600
|
h: "8",
|
|
@@ -6597,10 +6654,12 @@
|
|
|
6597
6654
|
const StandaloneCalendarGrid = (_a) => {
|
|
6598
6655
|
var _b = _a, {
|
|
6599
6656
|
state,
|
|
6600
|
-
range
|
|
6657
|
+
range,
|
|
6658
|
+
firstDayOfWeek
|
|
6601
6659
|
} = _b, rest = __objRest$1c(_b, [
|
|
6602
6660
|
"state",
|
|
6603
|
-
"range"
|
|
6661
|
+
"range",
|
|
6662
|
+
"firstDayOfWeek"
|
|
6604
6663
|
]);
|
|
6605
6664
|
const { locale } = i18n.useLocale();
|
|
6606
6665
|
const { calendarProps, prevButtonProps, nextButtonProps } = calendar.useCalendar(
|
|
@@ -6608,7 +6667,8 @@
|
|
|
6608
6667
|
state
|
|
6609
6668
|
);
|
|
6610
6669
|
const startDate = state.visibleRange.start;
|
|
6611
|
-
const { gridProps, headerProps
|
|
6670
|
+
const { gridProps, headerProps } = calendar.useCalendarGrid(rest, state);
|
|
6671
|
+
const weekDays = getWeekdays(firstDayOfWeek);
|
|
6612
6672
|
const weeksInMonth = date.getWeeksInMonth(startDate, locale);
|
|
6613
6673
|
const weekNumberStart = React.useMemo(
|
|
6614
6674
|
() => getWeekNumberAtStartOfMonth(
|
|
@@ -6618,24 +6678,21 @@
|
|
|
6618
6678
|
),
|
|
6619
6679
|
[startDate.year, startDate.month]
|
|
6620
6680
|
);
|
|
6621
|
-
return /* @__PURE__ */ React.createElement(react.Box, __spreadProps$g(__spreadValues$1t({}, calendarProps), { h: "265px", p: "0" }), /* @__PURE__ */ React.createElement(react.Stack, null, /* @__PURE__ */ React.createElement(react.Flex, { justify: "space-between", w: "full", p: "1", alignItems: "center" }, /* @__PURE__ */ React.createElement(MonthButton, __spreadValues$1t({}, prevButtonProps), /* @__PURE__ */ React.createElement(Icon$1, { as: icons.ChevronLeftSolid, boxSize: 4 })), /* @__PURE__ */ React.createElement(react.HStack, { spacing: "0" }, /* @__PURE__ */ React.createElement(MonthSelect, { state }), /* @__PURE__ */ React.createElement(YearSelectRangeCalendar, { state })), /* @__PURE__ */ React.createElement(MonthButton, __spreadValues$1t({}, nextButtonProps), /* @__PURE__ */ React.createElement(Icon$1, { as: icons.ChevronRightSolid, boxSize: 4 }))), /* @__PURE__ */ React.createElement(react.chakra.table, __spreadProps$g(__spreadValues$1t({}, gridProps), { sx: { borderSpacing: "0" } }), /* @__PURE__ */ React.createElement(react.chakra.thead, __spreadValues$1t({}, headerProps), /* @__PURE__ */ React.createElement(DayLabels, { weekDays })), /* @__PURE__ */ React.createElement(react.chakra.tbody, null, ramda.times(
|
|
6622
|
-
|
|
6623
|
-
|
|
6624
|
-
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
|
|
6628
|
-
|
|
6629
|
-
|
|
6630
|
-
|
|
6631
|
-
|
|
6632
|
-
|
|
6633
|
-
|
|
6634
|
-
|
|
6635
|
-
|
|
6636
|
-
},
|
|
6637
|
-
weeksInMonth
|
|
6638
|
-
)))));
|
|
6681
|
+
return /* @__PURE__ */ React.createElement(react.Box, __spreadProps$g(__spreadValues$1t({}, calendarProps), { h: "265px", p: "0" }), /* @__PURE__ */ React.createElement(react.Stack, null, /* @__PURE__ */ React.createElement(react.Flex, { justify: "space-between", w: "full", p: "1", alignItems: "center" }, /* @__PURE__ */ React.createElement(MonthButton, __spreadValues$1t({}, prevButtonProps), /* @__PURE__ */ React.createElement(Icon$1, { as: icons.ChevronLeftSolid, boxSize: 4 })), /* @__PURE__ */ React.createElement(react.HStack, { spacing: "0" }, /* @__PURE__ */ React.createElement(MonthSelect, { state }), /* @__PURE__ */ React.createElement(YearSelectRangeCalendar, { state })), /* @__PURE__ */ React.createElement(MonthButton, __spreadValues$1t({}, nextButtonProps), /* @__PURE__ */ React.createElement(Icon$1, { as: icons.ChevronRightSolid, boxSize: 4 }))), /* @__PURE__ */ React.createElement(react.chakra.table, __spreadProps$g(__spreadValues$1t({}, gridProps), { sx: { borderSpacing: "0" } }), /* @__PURE__ */ React.createElement(react.chakra.thead, __spreadValues$1t({}, headerProps), /* @__PURE__ */ React.createElement(react.chakra.tr, null, /* @__PURE__ */ React.createElement(react.chakra.th, null), /* @__PURE__ */ React.createElement(DayLabels, { weekDays }))), /* @__PURE__ */ React.createElement(react.chakra.tbody, null, ramda.times((weekIndex) => {
|
|
6682
|
+
const weekNumber = weekNumberStart + weekIndex;
|
|
6683
|
+
return /* @__PURE__ */ React.createElement(react.chakra.tr, { key: weekIndex }, /* @__PURE__ */ React.createElement(react.chakra.td, null, /* @__PURE__ */ React.createElement(Small$1, { sx: { color: "text.subdued" }, pr: "2" }, "w.", weekNumber > 52 ? weekNumber - 52 : weekNumber)), state.getDatesInWeek(weekIndex, startDate).map(
|
|
6684
|
+
(date) => date ? /* @__PURE__ */ React.createElement(
|
|
6685
|
+
RangeCell,
|
|
6686
|
+
{
|
|
6687
|
+
key: date.day,
|
|
6688
|
+
state,
|
|
6689
|
+
range,
|
|
6690
|
+
date,
|
|
6691
|
+
currentMonth: startDate
|
|
6692
|
+
}
|
|
6693
|
+
) : /* @__PURE__ */ React.createElement(react.chakra.td, null)
|
|
6694
|
+
));
|
|
6695
|
+
}, weeksInMonth)))));
|
|
6639
6696
|
};
|
|
6640
6697
|
|
|
6641
6698
|
var __defProp$1s = Object.defineProperty;
|
|
@@ -6658,6 +6715,7 @@
|
|
|
6658
6715
|
};
|
|
6659
6716
|
var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
|
|
6660
6717
|
const Calendar = (props) => {
|
|
6718
|
+
const { firstDayOfWeek } = props;
|
|
6661
6719
|
const { locale } = i18n.useLocale();
|
|
6662
6720
|
const { container } = react.useMultiStyleConfig("Calendar");
|
|
6663
6721
|
const state = calendar$1.useCalendarState(__spreadProps$f(__spreadValues$1s({}, props), {
|
|
@@ -6668,7 +6726,14 @@
|
|
|
6668
6726
|
props,
|
|
6669
6727
|
state
|
|
6670
6728
|
);
|
|
6671
|
-
return /* @__PURE__ */ React.createElement(react.Box, __spreadProps$f(__spreadValues$1s({}, calendarProps), { __css: container }), /* @__PURE__ */ React.createElement(react.Stack, null, /* @__PURE__ */ React.createElement(react.Flex, { justifyContent: "space-between" }, /* @__PURE__ */ React.createElement(react.Box, { paddingInlineStart: "2" }, /* @__PURE__ */ React.createElement(YearSelectCalendar, { state })), /* @__PURE__ */ React.createElement(react.HStack, { spacing: 2 }, /* @__PURE__ */ React.createElement(MonthButton, __spreadValues$1s({}, prevButtonProps), /* @__PURE__ */ React.createElement(Icon$1, { as: icons.ChevronLeftSolid, boxSize: 4 })), /* @__PURE__ */ React.createElement(MonthButton, __spreadValues$1s({}, nextButtonProps), /* @__PURE__ */ React.createElement(Icon$1, { as: icons.ChevronRightSolid, boxSize: 4 })))), /* @__PURE__ */ React.createElement(
|
|
6729
|
+
return /* @__PURE__ */ React.createElement(react.Box, __spreadProps$f(__spreadValues$1s({}, calendarProps), { __css: container }), /* @__PURE__ */ React.createElement(react.Stack, null, /* @__PURE__ */ React.createElement(react.Flex, { justifyContent: "space-between" }, /* @__PURE__ */ React.createElement(react.Box, { paddingInlineStart: "2" }, /* @__PURE__ */ React.createElement(YearSelectCalendar, { state })), /* @__PURE__ */ React.createElement(react.HStack, { spacing: 2 }, /* @__PURE__ */ React.createElement(MonthButton, __spreadValues$1s({}, prevButtonProps), /* @__PURE__ */ React.createElement(Icon$1, { as: icons.ChevronLeftSolid, boxSize: 4 })), /* @__PURE__ */ React.createElement(MonthButton, __spreadValues$1s({}, nextButtonProps), /* @__PURE__ */ React.createElement(Icon$1, { as: icons.ChevronRightSolid, boxSize: 4 })))), /* @__PURE__ */ React.createElement(
|
|
6730
|
+
CalendarGrid,
|
|
6731
|
+
{
|
|
6732
|
+
state,
|
|
6733
|
+
locale,
|
|
6734
|
+
firstDayOfWeek
|
|
6735
|
+
}
|
|
6736
|
+
)));
|
|
6672
6737
|
};
|
|
6673
6738
|
|
|
6674
6739
|
var __defProp$1r = Object.defineProperty;
|
|
@@ -6698,7 +6763,8 @@
|
|
|
6698
6763
|
isInvalid = false,
|
|
6699
6764
|
dateFormat,
|
|
6700
6765
|
minValue,
|
|
6701
|
-
variant = "outline"
|
|
6766
|
+
variant = "outline",
|
|
6767
|
+
firstDayOfWeek = "monday"
|
|
6702
6768
|
} = props;
|
|
6703
6769
|
const ref = React.useRef();
|
|
6704
6770
|
const { group } = react.useMultiStyleConfig("DatePicker");
|
|
@@ -6719,19 +6785,15 @@
|
|
|
6719
6785
|
onClose: () => state.setOpen(false),
|
|
6720
6786
|
placement: "bottom-end"
|
|
6721
6787
|
},
|
|
6722
|
-
/* @__PURE__ */ React.createElement(react.PopoverAnchor, null, /* @__PURE__ */ React.createElement(react.HStack, { minW: 56 }, /* @__PURE__ */ React.createElement(react.InputGroup, __spreadProps$e(__spreadValues$1r({}, groupProps), { ref, __css: group }), /* @__PURE__ */ React.createElement(
|
|
6723
|
-
|
|
6788
|
+
/* @__PURE__ */ React.createElement(react.PopoverAnchor, null, /* @__PURE__ */ React.createElement(react.HStack, { minW: 56 }, /* @__PURE__ */ React.createElement(react.InputGroup, __spreadProps$e(__spreadValues$1r({}, groupProps), { ref, __css: group }), /* @__PURE__ */ React.createElement(
|
|
6789
|
+
StyledField,
|
|
6724
6790
|
{
|
|
6725
|
-
|
|
6726
|
-
|
|
6791
|
+
isDisabled,
|
|
6792
|
+
isInvalid,
|
|
6793
|
+
variant
|
|
6727
6794
|
},
|
|
6728
|
-
/* @__PURE__ */ React.createElement(
|
|
6729
|
-
|
|
6730
|
-
__spreadProps$e(__spreadValues$1r({}, fieldProps), {
|
|
6731
|
-
dateFormat
|
|
6732
|
-
})
|
|
6733
|
-
)
|
|
6734
|
-
)), /* @__PURE__ */ React.createElement(
|
|
6795
|
+
/* @__PURE__ */ React.createElement(react.Box, { paddingInlineStart: "1a", paddingInlineEnd: 10 }, /* @__PURE__ */ React.createElement(DateField, __spreadProps$e(__spreadValues$1r({}, fieldProps), { dateFormat })))
|
|
6796
|
+
), /* @__PURE__ */ React.createElement(
|
|
6735
6797
|
react.InputRightElement,
|
|
6736
6798
|
{
|
|
6737
6799
|
sx: { height: "100%", paddingRight: "1" },
|
|
@@ -6757,7 +6819,7 @@
|
|
|
6757
6819
|
icon: /* @__PURE__ */ React.createElement(Icon$1, { as: icons.XCloseSolid })
|
|
6758
6820
|
}
|
|
6759
6821
|
))),
|
|
6760
|
-
state.isOpen && /* @__PURE__ */ React.createElement(react.PopoverContent, __spreadProps$e(__spreadValues$1r({}, dialogProps), { ref, w: 64, border: "none" }), /* @__PURE__ */ React.createElement(focus.FocusScope, { contain: true, restoreFocus: true }, /* @__PURE__ */ React.createElement(Calendar, __spreadValues$1r({}, calendarProps))))
|
|
6822
|
+
state.isOpen && /* @__PURE__ */ React.createElement(react.PopoverContent, __spreadProps$e(__spreadValues$1r({}, dialogProps), { ref, w: 64, border: "none" }), /* @__PURE__ */ React.createElement(focus.FocusScope, { contain: true, restoreFocus: true }, /* @__PURE__ */ React.createElement(Calendar, __spreadProps$e(__spreadValues$1r({}, calendarProps), { firstDayOfWeek }))))
|
|
6761
6823
|
);
|
|
6762
6824
|
};
|
|
6763
6825
|
|
|
@@ -7052,7 +7114,7 @@
|
|
|
7052
7114
|
fiscalStartMonth = 0,
|
|
7053
7115
|
fiscalStartDay = 0,
|
|
7054
7116
|
locale = "",
|
|
7055
|
-
height = "
|
|
7117
|
+
height = "17.5rem"
|
|
7056
7118
|
}) => {
|
|
7057
7119
|
const { quickDates, fiscalQuarters } = React.useMemo(
|
|
7058
7120
|
() => getQuickSelectOptions(state, locale, fiscalStartMonth, fiscalStartDay),
|
|
@@ -7074,8 +7136,7 @@
|
|
|
7074
7136
|
pr: "4",
|
|
7075
7137
|
_hover: { overflowY: "scroll" },
|
|
7076
7138
|
w: "36",
|
|
7077
|
-
display: shouldShow(quickDates) ? "initial" : "none"
|
|
7078
|
-
mb: "4"
|
|
7139
|
+
display: shouldShow(quickDates) ? "initial" : "none"
|
|
7079
7140
|
},
|
|
7080
7141
|
ramda.map(
|
|
7081
7142
|
(quickDate) => validRange(quickDate.value, state) && /* @__PURE__ */ React.createElement(react.Box, { minH: "20px", key: `quick-select-${quickDate.label}` }, /* @__PURE__ */ React.createElement(
|
|
@@ -7095,7 +7156,7 @@
|
|
|
7095
7156
|
borderTop: seperator,
|
|
7096
7157
|
display: shouldShow(fiscalQuarters) ? "initial" : "none"
|
|
7097
7158
|
}
|
|
7098
|
-
), /* @__PURE__ */ React.createElement(
|
|
7159
|
+
), /* @__PURE__ */ React.createElement(react.Spacer, null), /* @__PURE__ */ React.createElement(
|
|
7099
7160
|
react.Flex,
|
|
7100
7161
|
{
|
|
7101
7162
|
justifyContent: "space-between",
|
|
@@ -7151,7 +7212,8 @@
|
|
|
7151
7212
|
fiscalStartMonth,
|
|
7152
7213
|
fiscalStartDay,
|
|
7153
7214
|
minValue,
|
|
7154
|
-
maxValue
|
|
7215
|
+
maxValue,
|
|
7216
|
+
firstDayOfWeek
|
|
7155
7217
|
} = props;
|
|
7156
7218
|
const { locale } = i18n.useLocale();
|
|
7157
7219
|
const ref = React.useRef(null);
|
|
@@ -7209,13 +7271,15 @@
|
|
|
7209
7271
|
StandaloneCalendarGrid,
|
|
7210
7272
|
{
|
|
7211
7273
|
state: calendarOneState,
|
|
7212
|
-
range: value
|
|
7274
|
+
range: value,
|
|
7275
|
+
firstDayOfWeek
|
|
7213
7276
|
}
|
|
7214
7277
|
))), /* @__PURE__ */ React.createElement(react.Stack, { h: "full", justify: "space-between" }, /* @__PURE__ */ React.createElement(react.Stack, { opacity: value && value.start ? "1" : "0.4" }, /* @__PURE__ */ React.createElement(react.Box, { p: "2" }, /* @__PURE__ */ React.createElement(Label$1, { size: "xs" }, "End date:"), /* @__PURE__ */ React.createElement(
|
|
7215
7278
|
StandaloneCalendarGrid,
|
|
7216
7279
|
{
|
|
7217
7280
|
state: calendarTwoState,
|
|
7218
|
-
range: value
|
|
7281
|
+
range: value,
|
|
7282
|
+
firstDayOfWeek
|
|
7219
7283
|
}
|
|
7220
7284
|
))), /* @__PURE__ */ React.createElement(react.HStack, { pt: "2", alignSelf: "end" }, isClearable && /* @__PURE__ */ React.createElement(Button$1, { onClick: resetDate, variant: "ghost", size: "sm" }, "Clear"), /* @__PURE__ */ React.createElement(Button$1, { variant: "brand", onClick: handleClose, size: "sm" }, "Save"))))))));
|
|
7221
7285
|
};
|
|
@@ -7269,7 +7333,8 @@
|
|
|
7269
7333
|
value,
|
|
7270
7334
|
minValue = "1994-03-08",
|
|
7271
7335
|
maxValue,
|
|
7272
|
-
renderInPortal = false
|
|
7336
|
+
renderInPortal = false,
|
|
7337
|
+
firstDayOfWeek
|
|
7273
7338
|
} = props;
|
|
7274
7339
|
const ref = React.useRef();
|
|
7275
7340
|
const { group } = react.useMultiStyleConfig("DatePicker");
|
|
@@ -7306,6 +7371,10 @@
|
|
|
7306
7371
|
const handleClose = () => {
|
|
7307
7372
|
state.setOpen(false);
|
|
7308
7373
|
};
|
|
7374
|
+
react.useOutsideClick({
|
|
7375
|
+
ref,
|
|
7376
|
+
handler: () => state.setOpen(false)
|
|
7377
|
+
});
|
|
7309
7378
|
return /* @__PURE__ */ React.createElement(
|
|
7310
7379
|
Popover$1,
|
|
7311
7380
|
{
|
|
@@ -7347,7 +7416,8 @@
|
|
|
7347
7416
|
handleClose,
|
|
7348
7417
|
fiscalStartMonth: fiscalStartMonth || 0,
|
|
7349
7418
|
fiscalStartDay: fiscalStartDay || 0,
|
|
7350
|
-
isClearable
|
|
7419
|
+
isClearable,
|
|
7420
|
+
firstDayOfWeek
|
|
7351
7421
|
})
|
|
7352
7422
|
))))
|
|
7353
7423
|
);
|