@kaizen/components 1.77.4 → 1.78.0
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/cjs/src/Calendar/CalendarRange/CalendarRange.cjs +12 -13
- package/dist/cjs/src/Calendar/CalendarRange/CalendarRange.module.scss.cjs +2 -3
- package/dist/cjs/src/Calendar/CalendarSingle/CalendarSingle.cjs +8 -8
- package/dist/cjs/src/Calendar/LegacyCalendarRange/LegacyCalendarRange.cjs +11 -12
- package/dist/cjs/src/Calendar/LegacyCalendarRange/LegacyCalendarRange.module.scss.cjs +0 -1
- package/dist/cjs/src/Calendar/baseCalendarClassNames.cjs +11 -13
- package/dist/cjs/src/Calendar/baseCalendarClassNames.module.scss.cjs +1 -2
- package/dist/cjs/src/Calendar/utils/setFocusInCalendar.cjs +7 -6
- package/dist/esm/src/Calendar/CalendarRange/CalendarRange.mjs +12 -13
- package/dist/esm/src/Calendar/CalendarRange/CalendarRange.module.scss.mjs +2 -3
- package/dist/esm/src/Calendar/CalendarSingle/CalendarSingle.mjs +8 -8
- package/dist/esm/src/Calendar/LegacyCalendarRange/LegacyCalendarRange.mjs +11 -12
- package/dist/esm/src/Calendar/LegacyCalendarRange/LegacyCalendarRange.module.scss.mjs +0 -1
- package/dist/esm/src/Calendar/baseCalendarClassNames.mjs +11 -13
- package/dist/esm/src/Calendar/baseCalendarClassNames.module.scss.mjs +1 -2
- package/dist/esm/src/Calendar/utils/setFocusInCalendar.mjs +7 -6
- package/dist/styles.css +25 -27
- package/dist/types/Calendar/CalendarRange/CalendarRange.d.ts +2 -2
- package/dist/types/Calendar/CalendarSingle/CalendarSingle.d.ts +2 -2
- package/dist/types/Calendar/LegacyCalendarRange/LegacyCalendarRange.d.ts +3 -2
- package/dist/types/Calendar/baseCalendarClassNames.d.ts +2 -2
- package/package.json +7 -7
- package/src/Calendar/CalendarRange/CalendarRange.module.scss +13 -13
- package/src/Calendar/CalendarRange/CalendarRange.tsx +15 -11
- package/src/Calendar/CalendarRange/_docs/CalendarRange.stickersheet.stories.tsx +2 -1
- package/src/Calendar/CalendarSingle/CalendarSingle.module.scss +1 -0
- package/src/Calendar/CalendarSingle/CalendarSingle.tsx +11 -6
- package/src/Calendar/CalendarSingle/_docs/CalendarSingle.stickersheet.stories.tsx +8 -3
- package/src/Calendar/LegacyCalendarRange/LegacyCalendarRange.module.scss +5 -4
- package/src/Calendar/LegacyCalendarRange/LegacyCalendarRange.tsx +15 -11
- package/src/Calendar/baseCalendarClassNames.module.scss +12 -19
- package/src/Calendar/baseCalendarClassNames.ts +13 -15
- package/src/Calendar/utils/isSelectingDayInCalendar.spec.tsx +2 -1
- package/src/Calendar/utils/setFocusInCalendar.spec.tsx +8 -4
- package/src/Calendar/utils/setFocusInCalendar.ts +10 -10
- package/src/DatePicker/DatePicker.spec.tsx +10 -9
- package/src/DatePicker/DatePicker.tsx +2 -2
- package/src/Filter/FilterBar/subcomponents/FilterBarDatePicker/FilterBarDatePicker.spec.tsx +4 -2
- package/src/Filter/FilterBar/subcomponents/FilterBarDateRangePicker/FilterBarDateRangePicker.spec.tsx +6 -2
- package/src/Filter/FilterDatePicker/FilterDatePicker.spec.tsx +3 -2
- package/src/Filter/FilterDatePicker/subcomponents/FilterDatePickerField/FilterDatePickerField.spec.tsx +8 -4
- package/src/Filter/FilterDateRangePicker/_docs/FilterDateRangePicker.stories.tsx +2 -2
- package/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/FilterDateRangePickerField.spec.tsx +14 -8
|
@@ -38,12 +38,11 @@ var CalendarRange = function (_a) {
|
|
|
38
38
|
/* eslint-disable camelcase */
|
|
39
39
|
var classNames = tslib.__assign(tslib.__assign({}, baseCalendarClassNames.baseCalendarClassNames), {
|
|
40
40
|
month: hasDivider ? CalendarRange_module.monthWithDivider : CalendarRange_module.month,
|
|
41
|
-
caption_end: CalendarRange_module.captionEnd,
|
|
42
|
-
caption_start: CalendarRange_module.captionStart,
|
|
43
41
|
nav: CalendarRange_module.nav,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
range_start: CalendarRange_module.dayRangeStart,
|
|
43
|
+
range_end: CalendarRange_module.dayRangeEnd,
|
|
44
|
+
range_middle: CalendarRange_module.dayRangeMiddle,
|
|
45
|
+
hidden: CalendarRange_module.hidden
|
|
47
46
|
});
|
|
48
47
|
/* eslint-enable camelcase */
|
|
49
48
|
return React__default.default.createElement("div", {
|
|
@@ -56,19 +55,19 @@ var CalendarRange = function (_a) {
|
|
|
56
55
|
defaultMonth: selectedMonth,
|
|
57
56
|
classNames: classNames,
|
|
58
57
|
components: {
|
|
59
|
-
|
|
58
|
+
Chevron: function (props) {
|
|
59
|
+
if (props.orientation === 'left') {
|
|
60
|
+
return React__default.default.createElement(Icon.Icon, {
|
|
61
|
+
name: "arrow_back",
|
|
62
|
+
isPresentational: true,
|
|
63
|
+
shouldMirrorInRTL: true
|
|
64
|
+
});
|
|
65
|
+
}
|
|
60
66
|
return React__default.default.createElement(Icon.Icon, {
|
|
61
67
|
name: "arrow_forward",
|
|
62
68
|
isPresentational: true,
|
|
63
69
|
shouldMirrorInRTL: true
|
|
64
70
|
});
|
|
65
|
-
},
|
|
66
|
-
IconLeft: function () {
|
|
67
|
-
return React__default.default.createElement(Icon.Icon, {
|
|
68
|
-
name: "arrow_back",
|
|
69
|
-
isPresentational: true,
|
|
70
|
-
shouldMirrorInRTL: true
|
|
71
|
-
});
|
|
72
71
|
}
|
|
73
72
|
},
|
|
74
73
|
numberOfMonths: numberOfMonths,
|
|
@@ -4,10 +4,9 @@ var styles = {
|
|
|
4
4
|
"month": "CalendarRange-module_month__un61w",
|
|
5
5
|
"monthWithDivider": "CalendarRange-module_monthWithDivider__JY-56",
|
|
6
6
|
"nav": "CalendarRange-module_nav__OtaVb",
|
|
7
|
-
"captionEnd": "CalendarRange-module_captionEnd__GSLQO",
|
|
8
|
-
"captionStart": "CalendarRange-module_captionStart__K5hlF",
|
|
9
7
|
"dayRangeStart": "CalendarRange-module_dayRangeStart__TwdDT",
|
|
10
8
|
"dayRangeEnd": "CalendarRange-module_dayRangeEnd__y6dEB",
|
|
11
|
-
"dayRangeMiddle": "CalendarRange-module_dayRangeMiddle__SybKY"
|
|
9
|
+
"dayRangeMiddle": "CalendarRange-module_dayRangeMiddle__SybKY",
|
|
10
|
+
"hidden": "CalendarRange-module_hidden__D47kb"
|
|
12
11
|
};
|
|
13
12
|
module.exports = styles;
|
|
@@ -49,19 +49,19 @@ var CalendarSingle = function (_a) {
|
|
|
49
49
|
weekStartsOn: isValidWeekStartsOn.isValidWeekStartsOn(weekStartsOn) ? weekStartsOn : undefined,
|
|
50
50
|
classNames: classNames,
|
|
51
51
|
components: {
|
|
52
|
-
|
|
52
|
+
Chevron: function (props) {
|
|
53
|
+
if (props.orientation === 'left') {
|
|
54
|
+
return React__default.default.createElement(Icon.Icon, {
|
|
55
|
+
name: "arrow_back",
|
|
56
|
+
isPresentational: true,
|
|
57
|
+
shouldMirrorInRTL: true
|
|
58
|
+
});
|
|
59
|
+
}
|
|
53
60
|
return React__default.default.createElement(Icon.Icon, {
|
|
54
61
|
name: "arrow_forward",
|
|
55
62
|
isPresentational: true,
|
|
56
63
|
shouldMirrorInRTL: true
|
|
57
64
|
});
|
|
58
|
-
},
|
|
59
|
-
IconLeft: function () {
|
|
60
|
-
return React__default.default.createElement(Icon.Icon, {
|
|
61
|
-
name: "arrow_back",
|
|
62
|
-
isPresentational: true,
|
|
63
|
-
shouldMirrorInRTL: true
|
|
64
|
-
});
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
locale: locale$1
|
|
@@ -31,10 +31,9 @@ var LegacyCalendarRange = function (_a) {
|
|
|
31
31
|
/* eslint-disable camelcase */
|
|
32
32
|
var classNames = tslib.__assign(tslib.__assign({}, baseCalendarClassNames.baseCalendarClassNames), {
|
|
33
33
|
nav: LegacyCalendarRange_module.nav,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
day_range_middle: LegacyCalendarRange_module.dayRangeMiddle
|
|
34
|
+
range_start: LegacyCalendarRange_module.dayRangeStart,
|
|
35
|
+
range_end: LegacyCalendarRange_module.dayRangeEnd,
|
|
36
|
+
range_middle: LegacyCalendarRange_module.dayRangeMiddle
|
|
38
37
|
});
|
|
39
38
|
/* eslint-enable camelcase */
|
|
40
39
|
return React__default.default.createElement("div", {
|
|
@@ -48,19 +47,19 @@ var LegacyCalendarRange = function (_a) {
|
|
|
48
47
|
onDayClick: onDayChange,
|
|
49
48
|
classNames: classNames,
|
|
50
49
|
components: {
|
|
51
|
-
|
|
50
|
+
Chevron: function (props) {
|
|
51
|
+
if (props.orientation === 'left') {
|
|
52
|
+
return React__default.default.createElement(Icon.Icon, {
|
|
53
|
+
name: "arrow_back",
|
|
54
|
+
isPresentational: true,
|
|
55
|
+
shouldMirrorInRTL: true
|
|
56
|
+
});
|
|
57
|
+
}
|
|
52
58
|
return React__default.default.createElement(Icon.Icon, {
|
|
53
59
|
name: "arrow_forward",
|
|
54
60
|
isPresentational: true,
|
|
55
61
|
shouldMirrorInRTL: true
|
|
56
62
|
});
|
|
57
|
-
},
|
|
58
|
-
IconLeft: function () {
|
|
59
|
-
return React__default.default.createElement(Icon.Icon, {
|
|
60
|
-
name: "arrow_back",
|
|
61
|
-
isPresentational: true,
|
|
62
|
-
shouldMirrorInRTL: true
|
|
63
|
-
});
|
|
64
63
|
}
|
|
65
64
|
},
|
|
66
65
|
locale: locale
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var styles = {
|
|
4
4
|
"nav": "LegacyCalendarRange-module_nav__DsZpy",
|
|
5
|
-
"navButtonNext": "LegacyCalendarRange-module_navButtonNext__hwYN9",
|
|
6
5
|
"dayRangeStart": "LegacyCalendarRange-module_dayRangeStart__vRr5P",
|
|
7
6
|
"dayRangeEnd": "LegacyCalendarRange-module_dayRangeEnd__PfuWy",
|
|
8
7
|
"dayRangeMiddle": "LegacyCalendarRange-module_dayRangeMiddle__M27gR"
|
|
@@ -2,21 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
var baseCalendarClassNames_module = require('./baseCalendarClassNames.module.scss.cjs');
|
|
4
4
|
var baseCalendarClassNames = {
|
|
5
|
-
vhidden: baseCalendarClassNames_module.vHidden,
|
|
6
5
|
root: baseCalendarClassNames_module.root,
|
|
7
6
|
months: baseCalendarClassNames_module.months,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
day_button: "".concat(baseCalendarClassNames_module.buttonReset, " ").concat(baseCalendarClassNames_module.button, " ").concat(baseCalendarClassNames_module.day),
|
|
8
|
+
button_next: "".concat(baseCalendarClassNames_module.buttonReset, " ").concat(baseCalendarClassNames_module.button, " ").concat(baseCalendarClassNames_module.navButton),
|
|
9
|
+
button_previous: "".concat(baseCalendarClassNames_module.buttonReset, " ").concat(baseCalendarClassNames_module.button, " ").concat(baseCalendarClassNames_module.navButton),
|
|
10
|
+
day: baseCalendarClassNames_module.cell,
|
|
11
|
+
month_caption: baseCalendarClassNames_module.caption,
|
|
11
12
|
caption_label: baseCalendarClassNames_module.captionLabel,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
day_selected: baseCalendarClassNames_module.daySelected,
|
|
19
|
-
day_today: baseCalendarClassNames_module.dayToday,
|
|
20
|
-
day_disabled: baseCalendarClassNames_module.dayDisabled
|
|
13
|
+
month_grid: baseCalendarClassNames_module.table,
|
|
14
|
+
weekday: baseCalendarClassNames_module.weekday,
|
|
15
|
+
weeks: baseCalendarClassNames_module.tbody,
|
|
16
|
+
selected: baseCalendarClassNames_module.daySelected,
|
|
17
|
+
today: baseCalendarClassNames_module.dayToday,
|
|
18
|
+
disabled: baseCalendarClassNames_module.dayDisabled
|
|
21
19
|
};
|
|
22
20
|
exports.baseCalendarClassNames = baseCalendarClassNames;
|
|
@@ -15,7 +15,6 @@ var calendarStyles = {
|
|
|
15
15
|
"cell": "baseCalendarClassNames-module_cell__FvWK0",
|
|
16
16
|
"dayToday": "baseCalendarClassNames-module_dayToday__-TPUa",
|
|
17
17
|
"daySelected": "baseCalendarClassNames-module_daySelected__R3ujV",
|
|
18
|
-
"dayDisabled": "baseCalendarClassNames-module_dayDisabled__uQzJ-"
|
|
19
|
-
"vHidden": "baseCalendarClassNames-module_vHidden__egm49"
|
|
18
|
+
"dayDisabled": "baseCalendarClassNames-module_dayDisabled__uQzJ-"
|
|
20
19
|
};
|
|
21
20
|
module.exports = calendarStyles;
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
var baseCalendarClassNames_module = require('../baseCalendarClassNames.module.scss.cjs');
|
|
4
4
|
var isInvalidDate = require('./isInvalidDate.cjs');
|
|
5
|
-
var isHTMLElement = function (element) {
|
|
6
|
-
return element instanceof HTMLElement;
|
|
7
|
-
};
|
|
8
5
|
var setFocusInCalendar = function (calendarElement, selectedDay) {
|
|
9
|
-
var
|
|
10
|
-
var dayToFocus =
|
|
11
|
-
|
|
6
|
+
var dayClass = selectedDay && !isInvalidDate.isInvalidDate(selectedDay) ? ".".concat(baseCalendarClassNames_module.daySelected) : ".".concat(baseCalendarClassNames_module.dayToday);
|
|
7
|
+
var dayToFocus = calendarElement.querySelector("".concat(dayClass, " button"));
|
|
8
|
+
// RDP v9 puts the day class on the button inside the table cell whereas today and selected appear on the table cell
|
|
9
|
+
dayToFocus !== null && dayToFocus !== void 0 ? dayToFocus : dayToFocus = calendarElement.querySelector(".".concat(baseCalendarClassNames_module.day));
|
|
10
|
+
if (dayToFocus instanceof HTMLElement) {
|
|
11
|
+
dayToFocus.focus();
|
|
12
|
+
}
|
|
12
13
|
};
|
|
13
14
|
exports.setFocusInCalendar = setFocusInCalendar;
|
|
@@ -31,12 +31,11 @@ const CalendarRange = /*#__PURE__*/function () {
|
|
|
31
31
|
/* eslint-disable camelcase */
|
|
32
32
|
var classNames = __assign(__assign({}, baseCalendarClassNames), {
|
|
33
33
|
month: hasDivider ? styles.monthWithDivider : styles.month,
|
|
34
|
-
caption_end: styles.captionEnd,
|
|
35
|
-
caption_start: styles.captionStart,
|
|
36
34
|
nav: styles.nav,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
range_start: styles.dayRangeStart,
|
|
36
|
+
range_end: styles.dayRangeEnd,
|
|
37
|
+
range_middle: styles.dayRangeMiddle,
|
|
38
|
+
hidden: styles.hidden
|
|
40
39
|
});
|
|
41
40
|
/* eslint-enable camelcase */
|
|
42
41
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -49,19 +48,19 @@ const CalendarRange = /*#__PURE__*/function () {
|
|
|
49
48
|
defaultMonth: selectedMonth,
|
|
50
49
|
classNames: classNames,
|
|
51
50
|
components: {
|
|
52
|
-
|
|
51
|
+
Chevron: function (props) {
|
|
52
|
+
if (props.orientation === 'left') {
|
|
53
|
+
return /*#__PURE__*/React.createElement(Icon, {
|
|
54
|
+
name: "arrow_back",
|
|
55
|
+
isPresentational: true,
|
|
56
|
+
shouldMirrorInRTL: true
|
|
57
|
+
});
|
|
58
|
+
}
|
|
53
59
|
return /*#__PURE__*/React.createElement(Icon, {
|
|
54
60
|
name: "arrow_forward",
|
|
55
61
|
isPresentational: true,
|
|
56
62
|
shouldMirrorInRTL: true
|
|
57
63
|
});
|
|
58
|
-
},
|
|
59
|
-
IconLeft: function () {
|
|
60
|
-
return /*#__PURE__*/React.createElement(Icon, {
|
|
61
|
-
name: "arrow_back",
|
|
62
|
-
isPresentational: true,
|
|
63
|
-
shouldMirrorInRTL: true
|
|
64
|
-
});
|
|
65
64
|
}
|
|
66
65
|
},
|
|
67
66
|
numberOfMonths: numberOfMonths,
|
|
@@ -2,10 +2,9 @@ var styles = {
|
|
|
2
2
|
"month": "CalendarRange-module_month__un61w",
|
|
3
3
|
"monthWithDivider": "CalendarRange-module_monthWithDivider__JY-56",
|
|
4
4
|
"nav": "CalendarRange-module_nav__OtaVb",
|
|
5
|
-
"captionEnd": "CalendarRange-module_captionEnd__GSLQO",
|
|
6
|
-
"captionStart": "CalendarRange-module_captionStart__K5hlF",
|
|
7
5
|
"dayRangeStart": "CalendarRange-module_dayRangeStart__TwdDT",
|
|
8
6
|
"dayRangeEnd": "CalendarRange-module_dayRangeEnd__y6dEB",
|
|
9
|
-
"dayRangeMiddle": "CalendarRange-module_dayRangeMiddle__SybKY"
|
|
7
|
+
"dayRangeMiddle": "CalendarRange-module_dayRangeMiddle__SybKY",
|
|
8
|
+
"hidden": "CalendarRange-module_hidden__D47kb"
|
|
10
9
|
};
|
|
11
10
|
export { styles as default };
|
|
@@ -42,19 +42,19 @@ const CalendarSingle = /*#__PURE__*/function () {
|
|
|
42
42
|
weekStartsOn: isValidWeekStartsOn(weekStartsOn) ? weekStartsOn : undefined,
|
|
43
43
|
classNames: classNames,
|
|
44
44
|
components: {
|
|
45
|
-
|
|
45
|
+
Chevron: function (props) {
|
|
46
|
+
if (props.orientation === 'left') {
|
|
47
|
+
return /*#__PURE__*/React.createElement(Icon, {
|
|
48
|
+
name: "arrow_back",
|
|
49
|
+
isPresentational: true,
|
|
50
|
+
shouldMirrorInRTL: true
|
|
51
|
+
});
|
|
52
|
+
}
|
|
46
53
|
return /*#__PURE__*/React.createElement(Icon, {
|
|
47
54
|
name: "arrow_forward",
|
|
48
55
|
isPresentational: true,
|
|
49
56
|
shouldMirrorInRTL: true
|
|
50
57
|
});
|
|
51
|
-
},
|
|
52
|
-
IconLeft: function () {
|
|
53
|
-
return /*#__PURE__*/React.createElement(Icon, {
|
|
54
|
-
name: "arrow_back",
|
|
55
|
-
isPresentational: true,
|
|
56
|
-
shouldMirrorInRTL: true
|
|
57
|
-
});
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
locale: locale
|
|
@@ -24,10 +24,9 @@ const LegacyCalendarRange = /*#__PURE__*/function () {
|
|
|
24
24
|
/* eslint-disable camelcase */
|
|
25
25
|
var classNames = __assign(__assign({}, baseCalendarClassNames), {
|
|
26
26
|
nav: styles.nav,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
day_range_middle: styles.dayRangeMiddle
|
|
27
|
+
range_start: styles.dayRangeStart,
|
|
28
|
+
range_end: styles.dayRangeEnd,
|
|
29
|
+
range_middle: styles.dayRangeMiddle
|
|
31
30
|
});
|
|
32
31
|
/* eslint-enable camelcase */
|
|
33
32
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -41,19 +40,19 @@ const LegacyCalendarRange = /*#__PURE__*/function () {
|
|
|
41
40
|
onDayClick: onDayChange,
|
|
42
41
|
classNames: classNames,
|
|
43
42
|
components: {
|
|
44
|
-
|
|
43
|
+
Chevron: function (props) {
|
|
44
|
+
if (props.orientation === 'left') {
|
|
45
|
+
return /*#__PURE__*/React.createElement(Icon, {
|
|
46
|
+
name: "arrow_back",
|
|
47
|
+
isPresentational: true,
|
|
48
|
+
shouldMirrorInRTL: true
|
|
49
|
+
});
|
|
50
|
+
}
|
|
45
51
|
return /*#__PURE__*/React.createElement(Icon, {
|
|
46
52
|
name: "arrow_forward",
|
|
47
53
|
isPresentational: true,
|
|
48
54
|
shouldMirrorInRTL: true
|
|
49
55
|
});
|
|
50
|
-
},
|
|
51
|
-
IconLeft: function () {
|
|
52
|
-
return /*#__PURE__*/React.createElement(Icon, {
|
|
53
|
-
name: "arrow_back",
|
|
54
|
-
isPresentational: true,
|
|
55
|
-
shouldMirrorInRTL: true
|
|
56
|
-
});
|
|
57
56
|
}
|
|
58
57
|
},
|
|
59
58
|
locale: locale
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
var styles = {
|
|
2
2
|
"nav": "LegacyCalendarRange-module_nav__DsZpy",
|
|
3
|
-
"navButtonNext": "LegacyCalendarRange-module_navButtonNext__hwYN9",
|
|
4
3
|
"dayRangeStart": "LegacyCalendarRange-module_dayRangeStart__vRr5P",
|
|
5
4
|
"dayRangeEnd": "LegacyCalendarRange-module_dayRangeEnd__PfuWy",
|
|
6
5
|
"dayRangeMiddle": "LegacyCalendarRange-module_dayRangeMiddle__M27gR"
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import calendarStyles from './baseCalendarClassNames.module.scss.mjs';
|
|
2
2
|
var baseCalendarClassNames = {
|
|
3
|
-
vhidden: calendarStyles.vHidden,
|
|
4
3
|
root: calendarStyles.root,
|
|
5
4
|
months: calendarStyles.months,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
day_button: "".concat(calendarStyles.buttonReset, " ").concat(calendarStyles.button, " ").concat(calendarStyles.day),
|
|
6
|
+
button_next: "".concat(calendarStyles.buttonReset, " ").concat(calendarStyles.button, " ").concat(calendarStyles.navButton),
|
|
7
|
+
button_previous: "".concat(calendarStyles.buttonReset, " ").concat(calendarStyles.button, " ").concat(calendarStyles.navButton),
|
|
8
|
+
day: calendarStyles.cell,
|
|
9
|
+
month_caption: calendarStyles.caption,
|
|
9
10
|
caption_label: calendarStyles.captionLabel,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
day_selected: calendarStyles.daySelected,
|
|
17
|
-
day_today: calendarStyles.dayToday,
|
|
18
|
-
day_disabled: calendarStyles.dayDisabled
|
|
11
|
+
month_grid: calendarStyles.table,
|
|
12
|
+
weekday: calendarStyles.weekday,
|
|
13
|
+
weeks: calendarStyles.tbody,
|
|
14
|
+
selected: calendarStyles.daySelected,
|
|
15
|
+
today: calendarStyles.dayToday,
|
|
16
|
+
disabled: calendarStyles.dayDisabled
|
|
19
17
|
};
|
|
20
18
|
export { baseCalendarClassNames };
|
|
@@ -13,7 +13,6 @@ var calendarStyles = {
|
|
|
13
13
|
"cell": "baseCalendarClassNames-module_cell__FvWK0",
|
|
14
14
|
"dayToday": "baseCalendarClassNames-module_dayToday__-TPUa",
|
|
15
15
|
"daySelected": "baseCalendarClassNames-module_daySelected__R3ujV",
|
|
16
|
-
"dayDisabled": "baseCalendarClassNames-module_dayDisabled__uQzJ-"
|
|
17
|
-
"vHidden": "baseCalendarClassNames-module_vHidden__egm49"
|
|
16
|
+
"dayDisabled": "baseCalendarClassNames-module_dayDisabled__uQzJ-"
|
|
18
17
|
};
|
|
19
18
|
export { calendarStyles as default };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import calendarStyles from '../baseCalendarClassNames.module.scss.mjs';
|
|
2
2
|
import { isInvalidDate } from './isInvalidDate.mjs';
|
|
3
|
-
var isHTMLElement = function (element) {
|
|
4
|
-
return element instanceof HTMLElement;
|
|
5
|
-
};
|
|
6
3
|
var setFocusInCalendar = function (calendarElement, selectedDay) {
|
|
7
|
-
var
|
|
8
|
-
var dayToFocus =
|
|
9
|
-
|
|
4
|
+
var dayClass = selectedDay && !isInvalidDate(selectedDay) ? ".".concat(calendarStyles.daySelected) : ".".concat(calendarStyles.dayToday);
|
|
5
|
+
var dayToFocus = calendarElement.querySelector("".concat(dayClass, " button"));
|
|
6
|
+
// RDP v9 puts the day class on the button inside the table cell whereas today and selected appear on the table cell
|
|
7
|
+
dayToFocus !== null && dayToFocus !== void 0 ? dayToFocus : dayToFocus = calendarElement.querySelector(".".concat(calendarStyles.day));
|
|
8
|
+
if (dayToFocus instanceof HTMLElement) {
|
|
9
|
+
dayToFocus.focus();
|
|
10
|
+
}
|
|
10
11
|
};
|
|
11
12
|
export { setFocusInCalendar };
|
package/dist/styles.css
CHANGED
|
@@ -1667,6 +1667,7 @@
|
|
|
1667
1667
|
|
|
1668
1668
|
.baseCalendarClassNames-module_root__ZBdgM {
|
|
1669
1669
|
display: inline-flex;
|
|
1670
|
+
position: relative;
|
|
1670
1671
|
}
|
|
1671
1672
|
|
|
1672
1673
|
.baseCalendarClassNames-module_months__ofItC {
|
|
@@ -1689,7 +1690,6 @@
|
|
|
1689
1690
|
}
|
|
1690
1691
|
|
|
1691
1692
|
.baseCalendarClassNames-module_caption__tzko5 {
|
|
1692
|
-
position: relative;
|
|
1693
1693
|
display: flex;
|
|
1694
1694
|
align-items: center;
|
|
1695
1695
|
justify-content: center;
|
|
@@ -1790,9 +1790,13 @@
|
|
|
1790
1790
|
|
|
1791
1791
|
.baseCalendarClassNames-module_daySelected__R3ujV {
|
|
1792
1792
|
background-color: var(--color-blue-500, #0168b3);
|
|
1793
|
+
border-radius: 3px;
|
|
1794
|
+
color: var(--color-white, #ffffff);
|
|
1795
|
+
}
|
|
1796
|
+
.baseCalendarClassNames-module_daySelected__R3ujV .baseCalendarClassNames-module_button__Jb8RM {
|
|
1793
1797
|
color: var(--color-white, #ffffff);
|
|
1794
1798
|
}
|
|
1795
|
-
.baseCalendarClassNames-module_daySelected__R3ujV:hover, .baseCalendarClassNames-module_daySelected__R3ujV:focus-visible {
|
|
1799
|
+
.baseCalendarClassNames-module_daySelected__R3ujV .baseCalendarClassNames-module_button__Jb8RM:hover, .baseCalendarClassNames-module_daySelected__R3ujV .baseCalendarClassNames-module_button__Jb8RM:focus-visible {
|
|
1796
1800
|
background-color: var(--color-blue-400, #008bd6);
|
|
1797
1801
|
color: var(--color-white, #ffffff);
|
|
1798
1802
|
}
|
|
@@ -1800,17 +1804,9 @@
|
|
|
1800
1804
|
.baseCalendarClassNames-module_dayDisabled__uQzJ- {
|
|
1801
1805
|
background: none;
|
|
1802
1806
|
pointer-events: none;
|
|
1803
|
-
color: rgba(var(--color-purple-800-rgb, 47, 36, 56), 0.3);
|
|
1804
1807
|
}
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
clip: rect(0 0 0 0);
|
|
1808
|
-
clip-path: inset(50%);
|
|
1809
|
-
height: 1px;
|
|
1810
|
-
overflow: hidden;
|
|
1811
|
-
position: absolute;
|
|
1812
|
-
white-space: nowrap;
|
|
1813
|
-
width: 1px;
|
|
1808
|
+
.baseCalendarClassNames-module_dayDisabled__uQzJ- [class*=_button_] {
|
|
1809
|
+
color: rgba(var(--color-purple-800-rgb, 47, 36, 56), 0.3);
|
|
1814
1810
|
}
|
|
1815
1811
|
/** THIS IS AN AUTOGENERATED FILE **/
|
|
1816
1812
|
.CalendarSingle-module_nav__wSVua {
|
|
@@ -1819,6 +1815,7 @@
|
|
|
1819
1815
|
justify-content: space-between;
|
|
1820
1816
|
width: 100%;
|
|
1821
1817
|
color: var(--color-purple-800, #2f2438);
|
|
1818
|
+
top: -0.25rem;
|
|
1822
1819
|
}
|
|
1823
1820
|
|
|
1824
1821
|
.CalendarSingle-module_navButtonNext__-GrZx {
|
|
@@ -1829,7 +1826,7 @@
|
|
|
1829
1826
|
.CalendarRange-module_month__un61w {
|
|
1830
1827
|
padding: 0 var(--spacing-sm, 0.75rem);
|
|
1831
1828
|
}
|
|
1832
|
-
.CalendarRange-module_month__un61w:
|
|
1829
|
+
.CalendarRange-module_month__un61w:nth-of-type(1) {
|
|
1833
1830
|
padding-inline-start: 0;
|
|
1834
1831
|
}
|
|
1835
1832
|
.CalendarRange-module_month__un61w:last-child {
|
|
@@ -1840,13 +1837,13 @@
|
|
|
1840
1837
|
position: relative;
|
|
1841
1838
|
padding: 0 var(--spacing-md, 1.5rem);
|
|
1842
1839
|
}
|
|
1843
|
-
.CalendarRange-module_monthWithDivider__JY-56:not(:
|
|
1840
|
+
.CalendarRange-module_monthWithDivider__JY-56:not(:nth-of-type(1))::before {
|
|
1844
1841
|
position: absolute;
|
|
1845
1842
|
content: "";
|
|
1846
1843
|
inset: calc(-1 * var(--spacing-md, 1.5rem)) 0;
|
|
1847
1844
|
border-inline-start: 1px solid var(--color-gray-300, #eaeaec);
|
|
1848
1845
|
}
|
|
1849
|
-
.CalendarRange-module_monthWithDivider__JY-56:
|
|
1846
|
+
.CalendarRange-module_monthWithDivider__JY-56:nth-of-type(1) {
|
|
1850
1847
|
padding-inline-start: 0;
|
|
1851
1848
|
}
|
|
1852
1849
|
.CalendarRange-module_monthWithDivider__JY-56:last-child {
|
|
@@ -1856,16 +1853,10 @@
|
|
|
1856
1853
|
.CalendarRange-module_nav__OtaVb {
|
|
1857
1854
|
position: absolute;
|
|
1858
1855
|
display: flex;
|
|
1859
|
-
justify-content:
|
|
1856
|
+
justify-content: space-between;
|
|
1860
1857
|
width: 100%;
|
|
1861
1858
|
color: var(--color-purple-800, #2f2438);
|
|
1862
|
-
|
|
1863
|
-
.CalendarRange-module_captionEnd__GSLQO .CalendarRange-module_nav__OtaVb {
|
|
1864
|
-
flex-direction: row-reverse;
|
|
1865
|
-
}
|
|
1866
|
-
.CalendarRange-module_captionStart__K5hlF.CalendarRange-module_captionEnd__GSLQO .CalendarRange-module_nav__OtaVb {
|
|
1867
|
-
justify-content: space-between;
|
|
1868
|
-
flex-direction: row;
|
|
1859
|
+
top: -0.25rem;
|
|
1869
1860
|
}
|
|
1870
1861
|
|
|
1871
1862
|
.CalendarRange-module_dayRangeStart__TwdDT,
|
|
@@ -1878,6 +1869,13 @@
|
|
|
1878
1869
|
background-color: var(--color-blue-100, #e6f6ff);
|
|
1879
1870
|
color: var(--color-blue-500, #0168b3);
|
|
1880
1871
|
}
|
|
1872
|
+
.CalendarRange-module_dayRangeMiddle__SybKY [class*=_button_] {
|
|
1873
|
+
color: var(--color-blue-500, #0168b3);
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
.CalendarRange-module_hidden__D47kb {
|
|
1877
|
+
background-color: transparent;
|
|
1878
|
+
}
|
|
1881
1879
|
@property --gradient-angle {
|
|
1882
1880
|
syntax: '<angle>';
|
|
1883
1881
|
initial-value: 310deg;
|
|
@@ -3323,10 +3321,7 @@ input[type=range].InputRange-module_ratingScaleRange__gI-rs::-ms-thumb:not(:disa
|
|
|
3323
3321
|
justify-content: space-between;
|
|
3324
3322
|
width: 100%;
|
|
3325
3323
|
color: var(--color-purple-800, #2f2438);
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
.LegacyCalendarRange-module_navButtonNext__hwYN9 {
|
|
3329
|
-
inset-inline-end: 0;
|
|
3324
|
+
top: -0.25rem;
|
|
3330
3325
|
}
|
|
3331
3326
|
|
|
3332
3327
|
.LegacyCalendarRange-module_dayRangeStart__vRr5P,
|
|
@@ -3339,6 +3334,9 @@ input[type=range].InputRange-module_ratingScaleRange__gI-rs::-ms-thumb:not(:disa
|
|
|
3339
3334
|
background-color: var(--color-blue-100, #e6f6ff);
|
|
3340
3335
|
color: var(--color-blue-500, #0168b3);
|
|
3341
3336
|
}
|
|
3337
|
+
.LegacyCalendarRange-module_dayRangeMiddle__M27gR [class*=_button_] {
|
|
3338
|
+
color: var(--color-blue-500, #0168b3);
|
|
3339
|
+
}
|
|
3342
3340
|
/** THIS IS AN AUTOGENERATED FILE **/
|
|
3343
3341
|
/** THIS IS AN AUTOGENERATED FILE **/
|
|
3344
3342
|
/** THIS IS AN AUTOGENERATED FILE **/
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type PropsBase, type PropsRange } from 'react-day-picker';
|
|
2
2
|
import { type OverrideClassName } from "../../types/OverrideClassName";
|
|
3
3
|
export type CalendarRangeElement = HTMLDivElement;
|
|
4
4
|
export type CalendarRangeProps = {
|
|
5
5
|
id?: string;
|
|
6
6
|
onMount?: (calendarElement: CalendarRangeElement) => void;
|
|
7
7
|
hasDivider?: boolean;
|
|
8
|
-
} & OverrideClassName<Omit<
|
|
8
|
+
} & OverrideClassName<Omit<PropsRange & Omit<PropsBase, 'mode'>, 'mode'>>;
|
|
9
9
|
export declare const CalendarRange: {
|
|
10
10
|
({ id, onMount, hasDivider, classNameOverride, selected, defaultMonth, numberOfMonths, locale, ...restProps }: CalendarRangeProps): JSX.Element;
|
|
11
11
|
displayName: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type PropsBase, type PropsSingle } from 'react-day-picker';
|
|
2
2
|
import { type OverrideClassName } from "../../types/OverrideClassName";
|
|
3
3
|
export type CalendarSingleElement = HTMLDivElement;
|
|
4
4
|
export type CalendarSingleProps = {
|
|
5
5
|
id?: string;
|
|
6
6
|
onMount?: (calendarElement: CalendarSingleElement) => void;
|
|
7
|
-
} & OverrideClassName<Omit<
|
|
7
|
+
} & OverrideClassName<Omit<PropsSingle & Omit<PropsBase, 'mode'>, 'mode'>>;
|
|
8
8
|
export declare const CalendarSingle: {
|
|
9
9
|
({ id, onMount, classNameOverride, selected, defaultMonth, weekStartsOn, locale, ...restProps }: CalendarSingleProps): JSX.Element;
|
|
10
10
|
displayName: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { Locale } from 'date-fns';
|
|
2
|
-
import { type DateRange, type
|
|
3
|
+
import { type DateRange, type DayEventHandler, type Matcher } from 'react-day-picker';
|
|
3
4
|
import { DayOfWeek } from '../enums';
|
|
4
5
|
export type LegacyCalendarRangeElement = HTMLDivElement;
|
|
5
6
|
export type LegacyCalendarRangeProps = {
|
|
@@ -9,7 +10,7 @@ export type LegacyCalendarRangeProps = {
|
|
|
9
10
|
disabledDays?: Matcher[];
|
|
10
11
|
selectedRange?: DateRange;
|
|
11
12
|
locale: Locale;
|
|
12
|
-
onDayChange:
|
|
13
|
+
onDayChange: DayEventHandler<React.MouseEvent>;
|
|
13
14
|
};
|
|
14
15
|
export declare const LegacyCalendarRange: {
|
|
15
16
|
({ classNameOverride, defaultMonth, weekStartsOn, disabledDays, selectedRange, locale, onDayChange, }: LegacyCalendarRangeProps): JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export declare const baseCalendarClassNames:
|
|
1
|
+
import { type PropsBase } from 'react-day-picker';
|
|
2
|
+
export declare const baseCalendarClassNames: PropsBase['classNames'];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kaizen/components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.78.0",
|
|
4
4
|
"description": "Kaizen component library",
|
|
5
5
|
"author": "Geoffrey Chong <geoff.chong@cultureamp.com>",
|
|
6
6
|
"homepage": "https://cultureamp.design",
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
"react-animate-height": "^3.2.3",
|
|
141
141
|
"react-aria": "^3.39.0",
|
|
142
142
|
"react-aria-components": "^1.8.0",
|
|
143
|
-
"react-day-picker": "
|
|
143
|
+
"react-day-picker": "9.6.7",
|
|
144
144
|
"react-focus-lock": "^2.13.6",
|
|
145
145
|
"react-focus-on": "^3.9.4",
|
|
146
146
|
"react-popper": "^2.3.0",
|
|
@@ -175,8 +175,8 @@
|
|
|
175
175
|
"postcss-preset-env": "^10.1.6",
|
|
176
176
|
"postcss-scss": "^4.0.9",
|
|
177
177
|
"query-string": "^9.1.2",
|
|
178
|
-
"react": "^
|
|
179
|
-
"react-dom": "^
|
|
178
|
+
"react": "^19.0.0",
|
|
179
|
+
"react-dom": "^19.0.0",
|
|
180
180
|
"react-highlight": "^0.15.0",
|
|
181
181
|
"react-intl": "^7.1.11",
|
|
182
182
|
"rollup": "^4.40.2",
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
"tslib": "^2.8.1",
|
|
187
187
|
"ts-patch": "^3.3.0",
|
|
188
188
|
"tsx": "^4.19.4",
|
|
189
|
-
"@kaizen/design-tokens": "10.
|
|
189
|
+
"@kaizen/design-tokens": "10.10.0"
|
|
190
190
|
},
|
|
191
191
|
"devDependenciesComments": {
|
|
192
192
|
"sass": "Prevent deprecation warnings introduced in 1.80 as we plan to move away from sass",
|
|
@@ -194,8 +194,8 @@
|
|
|
194
194
|
},
|
|
195
195
|
"peerDependencies": {
|
|
196
196
|
"@cultureamp/i18n-react-intl": "^2.5.9",
|
|
197
|
-
"react": "^18.3.1",
|
|
198
|
-
"react-dom": "^18.3.1",
|
|
197
|
+
"react": "^18.3.1 || ^19.0.0",
|
|
198
|
+
"react-dom": "^18.3.1 || ^19.0.0",
|
|
199
199
|
"react-intl": "^6.6.8 || ^7.0.0",
|
|
200
200
|
"typescript": "5.x"
|
|
201
201
|
},
|