@hitachivantara/uikit-react-core 5.109.1 → 5.110.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/Calendar/SingleCalendar/SingleCalendar.cjs +31 -24
- package/dist/cjs/Calendar/SingleCalendar/SingleCalendar.styles.cjs +3 -2
- package/dist/cjs/Calendar/utils.cjs +5 -1
- package/dist/cjs/StatusIcon/StatusIcon.styles.cjs +5 -3
- package/dist/cjs/themes/pentahoPlus.cjs +153 -0
- package/dist/esm/Calendar/SingleCalendar/SingleCalendar.js +32 -25
- package/dist/esm/Calendar/SingleCalendar/SingleCalendar.styles.js +3 -2
- package/dist/esm/Calendar/utils.js +5 -1
- package/dist/esm/StatusIcon/StatusIcon.styles.js +5 -3
- package/dist/esm/themes/pentahoPlus.js +153 -0
- package/dist/types/index.d.ts +2 -1
- package/package.json +2 -2
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const React = require("react");
|
|
5
|
+
const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
|
|
5
6
|
const keyboardUtils = require("../../utils/keyboardUtils.cjs");
|
|
6
7
|
const setId = require("../../utils/setId.cjs");
|
|
7
8
|
const CalendarHeader = require("../CalendarHeader/CalendarHeader.cjs");
|
|
@@ -13,25 +14,26 @@ const ComposedNavigation = require("../CalendarNavigation/ComposedNavigation/Com
|
|
|
13
14
|
const MonthSelector = require("../CalendarNavigation/MonthSelector/MonthSelector.cjs");
|
|
14
15
|
const Panel = require("../../Panel/Panel.cjs");
|
|
15
16
|
const Typography = require("../../Typography/Typography.cjs");
|
|
16
|
-
const HvSingleCalendar = ({
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
17
|
+
const HvSingleCalendar = (props) => {
|
|
18
|
+
const {
|
|
19
|
+
classes: classesProp,
|
|
20
|
+
className,
|
|
21
|
+
id,
|
|
22
|
+
locale = utils.DEFAULT_LOCALE,
|
|
23
|
+
value,
|
|
24
|
+
visibleMonth,
|
|
25
|
+
visibleYear,
|
|
26
|
+
minimumDate,
|
|
27
|
+
maximumDate,
|
|
28
|
+
onChange,
|
|
29
|
+
onInputChange,
|
|
30
|
+
onVisibleDateChange,
|
|
31
|
+
showEndDate,
|
|
32
|
+
showDayOfWeek,
|
|
33
|
+
invalidDateLabel,
|
|
34
|
+
children,
|
|
35
|
+
...others
|
|
36
|
+
} = uikitReactUtils.useDefaultProps("HvSingleCalendar", props);
|
|
35
37
|
const { classes, cx } = SingleCalendar_styles.useClasses(classesProp);
|
|
36
38
|
const today = /* @__PURE__ */ new Date();
|
|
37
39
|
const localValue = value ?? today;
|
|
@@ -124,15 +126,20 @@ const HvSingleCalendar = ({
|
|
|
124
126
|
visibleMonth: visibleMonth || today.getMonth() + 1
|
|
125
127
|
}
|
|
126
128
|
),
|
|
127
|
-
/* @__PURE__ */ jsxRuntime.
|
|
129
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
130
|
+
"div",
|
|
131
|
+
{
|
|
132
|
+
className: cx(classes.calendarGrid, classes.weekdays),
|
|
133
|
+
"aria-controls": CalendarHeader.HvCalendarHeader?.[0]?.id,
|
|
134
|
+
children: listWeekdayNames.map(renderWeekLabel)
|
|
135
|
+
}
|
|
136
|
+
),
|
|
137
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
128
138
|
"div",
|
|
129
139
|
{
|
|
130
140
|
className: classes.calendarGrid,
|
|
131
141
|
"aria-controls": CalendarHeader.HvCalendarHeader?.[0]?.id,
|
|
132
|
-
children:
|
|
133
|
-
listWeekdayNames.map(renderWeekLabel),
|
|
134
|
-
calModel.dates.map(renderCalendarDate)
|
|
135
|
-
]
|
|
142
|
+
children: calModel.dates.map(renderCalendarDate)
|
|
136
143
|
}
|
|
137
144
|
)
|
|
138
145
|
] }),
|
|
@@ -29,7 +29,7 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvSingleCal
|
|
|
29
29
|
"& $cellsInRange:hover": {
|
|
30
30
|
backgroundColor: uikitStyles.theme.colors.bgPageSecondary,
|
|
31
31
|
"& $calendarDate": {
|
|
32
|
-
borderRight: `
|
|
32
|
+
borderRight: `2px solid ${uikitStyles.theme.colors.text}`
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"& $cellsInRange:hover ~ $cellsInRange": {
|
|
@@ -63,7 +63,8 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvSingleCal
|
|
|
63
63
|
backgroundColor: uikitStyles.theme.colors.bgPageSecondary
|
|
64
64
|
},
|
|
65
65
|
cellsOutsideRange: {},
|
|
66
|
-
cellContainer: {}
|
|
66
|
+
cellContainer: {},
|
|
67
|
+
weekdays: {}
|
|
67
68
|
});
|
|
68
69
|
exports.staticClasses = staticClasses;
|
|
69
70
|
exports.useClasses = useClasses;
|
|
@@ -17,7 +17,11 @@ const isSameDay = (date1, date2) => {
|
|
|
17
17
|
return date1.getDate() === date2.getDate() && date1.getMonth() === date2.getMonth() && date1.getFullYear() === date2.getFullYear();
|
|
18
18
|
};
|
|
19
19
|
const getDateISO = (date) => {
|
|
20
|
-
|
|
20
|
+
const d = new Date(date);
|
|
21
|
+
const year = d.getFullYear();
|
|
22
|
+
const month = String(d.getMonth() + 1).padStart(2, "0");
|
|
23
|
+
const day = String(d.getDate()).padStart(2, "0");
|
|
24
|
+
return `${year}-${month}-${day}`;
|
|
21
25
|
};
|
|
22
26
|
const getPreviousMonth = (month, year) => {
|
|
23
27
|
const prevMonth = month > 1 ? month - 1 : 12;
|
|
@@ -38,10 +38,12 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvStatusIco
|
|
|
38
38
|
}
|
|
39
39
|
])
|
|
40
40
|
),
|
|
41
|
-
":where([data-variant=default]
|
|
41
|
+
":where([data-variant=default])": {
|
|
42
42
|
color: uikitStyles.theme.colors.text,
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
":where([data-type=full])": {
|
|
44
|
+
backgroundColor: uikitStyles.theme.colors.bgPage,
|
|
45
|
+
outline: `1px solid ${uikitStyles.theme.colors.borderSubtle}`
|
|
46
|
+
}
|
|
45
47
|
}
|
|
46
48
|
},
|
|
47
49
|
icon: {
|
|
@@ -871,6 +871,159 @@ const pentahoPlus = uikitStyles.mergeTheme(uikitStyles.pentahoPlus, {
|
|
|
871
871
|
padding: uikitStyles.theme.spacing("xs", "sm")
|
|
872
872
|
}
|
|
873
873
|
}
|
|
874
|
+
},
|
|
875
|
+
HvCalendarCell: {
|
|
876
|
+
classes: {
|
|
877
|
+
dateWrapper: {
|
|
878
|
+
width: 32,
|
|
879
|
+
height: 32
|
|
880
|
+
},
|
|
881
|
+
calendarDate: {
|
|
882
|
+
width: 32,
|
|
883
|
+
height: 32,
|
|
884
|
+
...uikitStyles.theme.typography.caption1,
|
|
885
|
+
borderRadius: uikitStyles.theme.radii.full,
|
|
886
|
+
":hover": {
|
|
887
|
+
borderRadius: uikitStyles.theme.radii.full
|
|
888
|
+
}
|
|
889
|
+
},
|
|
890
|
+
calendarDateSelected: {
|
|
891
|
+
backgroundColor: uikitStyles.theme.colors.primary,
|
|
892
|
+
color: uikitStyles.theme.colors.dimmer,
|
|
893
|
+
":hover": {
|
|
894
|
+
border: `1px solid ${uikitStyles.theme.colors.primary}`,
|
|
895
|
+
color: uikitStyles.theme.colors.text
|
|
896
|
+
}
|
|
897
|
+
},
|
|
898
|
+
cellContainer: {
|
|
899
|
+
"&:hover": {
|
|
900
|
+
backgroundColor: uikitStyles.theme.colors.primaryDimmed,
|
|
901
|
+
borderRadius: uikitStyles.theme.radii.full
|
|
902
|
+
},
|
|
903
|
+
":has(> span.HvCalendarCell-calendarDateInSelectionRange):has(> span.HvCalendarCell-startBookend)": {
|
|
904
|
+
backgroundColor: uikitStyles.theme.colors.bgPageSecondary,
|
|
905
|
+
borderTopLeftRadius: uikitStyles.theme.radii.full,
|
|
906
|
+
borderBottomLeftRadius: uikitStyles.theme.radii.full
|
|
907
|
+
},
|
|
908
|
+
":has(> span.HvCalendarCell-calendarDateInSelectionRange):has(> span.HvCalendarCell-endBookend)": {
|
|
909
|
+
backgroundColor: uikitStyles.theme.colors.bgPageSecondary,
|
|
910
|
+
borderTopRightRadius: uikitStyles.theme.radii.full,
|
|
911
|
+
borderBottomRightRadius: uikitStyles.theme.radii.full
|
|
912
|
+
}
|
|
913
|
+
},
|
|
914
|
+
calendarDateInSelectionRange: {
|
|
915
|
+
borderRadius: 0
|
|
916
|
+
},
|
|
917
|
+
startBookend: {
|
|
918
|
+
backgroundColor: uikitStyles.theme.colors.primary,
|
|
919
|
+
color: uikitStyles.theme.colors.dimmer,
|
|
920
|
+
borderRadius: uikitStyles.theme.radii.full
|
|
921
|
+
},
|
|
922
|
+
endBookend: {
|
|
923
|
+
backgroundColor: uikitStyles.theme.colors.primary,
|
|
924
|
+
color: uikitStyles.theme.colors.dimmer,
|
|
925
|
+
borderRadius: uikitStyles.theme.radii.full
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
},
|
|
929
|
+
HvSingleCalendar: {
|
|
930
|
+
classes: {
|
|
931
|
+
root: {
|
|
932
|
+
" .HvNavigation-text": {
|
|
933
|
+
...uikitStyles.theme.typography.captionLabel
|
|
934
|
+
},
|
|
935
|
+
" .HvNavigation-root": {
|
|
936
|
+
gap: 0
|
|
937
|
+
},
|
|
938
|
+
" .HvMonthSelector-calendarMonthlyGrid": {
|
|
939
|
+
gridTemplateColumns: "repeat(4, 1fr)"
|
|
940
|
+
},
|
|
941
|
+
" .HvMonthSelector-calendarMonthlyCell": {
|
|
942
|
+
borderRadius: uikitStyles.theme.radii.full,
|
|
943
|
+
width: 48,
|
|
944
|
+
height: 48
|
|
945
|
+
},
|
|
946
|
+
" .HvMonthSelector-calendarMonthlyCellSelected": {
|
|
947
|
+
backgroundColor: uikitStyles.theme.colors.primary,
|
|
948
|
+
color: uikitStyles.theme.colors.dimmer,
|
|
949
|
+
":hover": {
|
|
950
|
+
border: `1px solid ${uikitStyles.theme.colors.primary}`,
|
|
951
|
+
color: uikitStyles.theme.colors.text,
|
|
952
|
+
backgroundColor: uikitStyles.theme.colors.primaryDimmed
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
},
|
|
956
|
+
calendarDay: {
|
|
957
|
+
width: 32,
|
|
958
|
+
height: 32,
|
|
959
|
+
...uikitStyles.theme.typography.caption2
|
|
960
|
+
},
|
|
961
|
+
weekdays: {
|
|
962
|
+
borderBottom: `1px solid ${uikitStyles.theme.colors.borderSubtle}`,
|
|
963
|
+
marginBottom: uikitStyles.theme.space.xs,
|
|
964
|
+
justifyContent: "center"
|
|
965
|
+
},
|
|
966
|
+
calendarGrid: {
|
|
967
|
+
justifyContent: "center",
|
|
968
|
+
gridTemplateColumns: "repeat(7, 32px)",
|
|
969
|
+
"& .HvSingleCalendar-cellsInRange": {
|
|
970
|
+
"& .HvSingleCalendar-startBookend": {
|
|
971
|
+
borderLeft: "none",
|
|
972
|
+
backgroundColor: uikitStyles.theme.colors.primary,
|
|
973
|
+
color: uikitStyles.theme.colors.dimmer
|
|
974
|
+
}
|
|
975
|
+
},
|
|
976
|
+
"&:hover .HvSingleCalendar-cellsInRange": {
|
|
977
|
+
"& .HvSingleCalendar-startBookend": {
|
|
978
|
+
borderLeft: "none",
|
|
979
|
+
backgroundColor: uikitStyles.theme.colors.primary,
|
|
980
|
+
color: uikitStyles.theme.colors.dimmer
|
|
981
|
+
}
|
|
982
|
+
},
|
|
983
|
+
"& .HvSingleCalendar-cellsInRange:hover": {
|
|
984
|
+
borderTopRightRadius: uikitStyles.theme.radii.full,
|
|
985
|
+
borderBottomRightRadius: uikitStyles.theme.radii.full,
|
|
986
|
+
"& .HvSingleCalendar-calendarDate": {
|
|
987
|
+
borderRight: "none",
|
|
988
|
+
backgroundColor: uikitStyles.theme.colors.primary,
|
|
989
|
+
color: uikitStyles.theme.colors.dimmer
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
},
|
|
993
|
+
cellsInRange: {
|
|
994
|
+
":has(span.HvSingleCalendar-startBookend)": {
|
|
995
|
+
borderTopLeftRadius: uikitStyles.theme.radii.full,
|
|
996
|
+
borderBottomLeftRadius: uikitStyles.theme.radii.full
|
|
997
|
+
}
|
|
998
|
+
},
|
|
999
|
+
cellContainer: {
|
|
1000
|
+
"&:hover": {
|
|
1001
|
+
":has(span.HvSingleCalendar-startBookend)": {
|
|
1002
|
+
borderTopRightRadius: 0,
|
|
1003
|
+
borderBottomRightRadius: 0
|
|
1004
|
+
},
|
|
1005
|
+
":has(span.HvSingleCalendar-endBookend)": {
|
|
1006
|
+
borderTopLeftRadius: 0,
|
|
1007
|
+
borderBottomLeftRadius: 0
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
},
|
|
1011
|
+
calendarDateInSelectionRange: {
|
|
1012
|
+
":hover:not( .HvSingleCalendar-endBookend):not( .HvSingleCalendar-startBookend)": {
|
|
1013
|
+
borderRadius: 0
|
|
1014
|
+
}
|
|
1015
|
+
},
|
|
1016
|
+
startBookend: {
|
|
1017
|
+
borderLeft: "none",
|
|
1018
|
+
borderTopLeftRadius: uikitStyles.theme.radii.full,
|
|
1019
|
+
borderBottomLeftRadius: uikitStyles.theme.radii.full
|
|
1020
|
+
},
|
|
1021
|
+
endBookend: {
|
|
1022
|
+
borderRight: "none",
|
|
1023
|
+
borderTopRightRadius: uikitStyles.theme.radii.full,
|
|
1024
|
+
borderBottomRightRadius: uikitStyles.theme.radii.full
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
874
1027
|
}
|
|
875
1028
|
}
|
|
876
1029
|
});
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useMemo } from "react";
|
|
3
|
+
import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
|
|
3
4
|
import { isKey } from "../../utils/keyboardUtils.js";
|
|
4
5
|
import { setId } from "../../utils/setId.js";
|
|
5
6
|
import { HvCalendarHeader } from "../CalendarHeader/CalendarHeader.js";
|
|
6
7
|
import { generateCalendarModel } from "../model.js";
|
|
7
|
-
import { isDate, getWeekdayNamesList,
|
|
8
|
+
import { DEFAULT_LOCALE, isDate, getWeekdayNamesList, isRange } from "../utils.js";
|
|
8
9
|
import { HvCalendarCell } from "./CalendarCell.js";
|
|
9
10
|
import { useClasses } from "./SingleCalendar.styles.js";
|
|
10
11
|
import { staticClasses } from "./SingleCalendar.styles.js";
|
|
@@ -12,25 +13,26 @@ import { HvComposedNavigation } from "../CalendarNavigation/ComposedNavigation/C
|
|
|
12
13
|
import { HvMonthSelector } from "../CalendarNavigation/MonthSelector/MonthSelector.js";
|
|
13
14
|
import { HvPanel } from "../../Panel/Panel.js";
|
|
14
15
|
import { HvTypography } from "../../Typography/Typography.js";
|
|
15
|
-
const HvSingleCalendar = ({
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
16
|
+
const HvSingleCalendar = (props) => {
|
|
17
|
+
const {
|
|
18
|
+
classes: classesProp,
|
|
19
|
+
className,
|
|
20
|
+
id,
|
|
21
|
+
locale = DEFAULT_LOCALE,
|
|
22
|
+
value,
|
|
23
|
+
visibleMonth,
|
|
24
|
+
visibleYear,
|
|
25
|
+
minimumDate,
|
|
26
|
+
maximumDate,
|
|
27
|
+
onChange,
|
|
28
|
+
onInputChange,
|
|
29
|
+
onVisibleDateChange,
|
|
30
|
+
showEndDate,
|
|
31
|
+
showDayOfWeek,
|
|
32
|
+
invalidDateLabel,
|
|
33
|
+
children,
|
|
34
|
+
...others
|
|
35
|
+
} = useDefaultProps("HvSingleCalendar", props);
|
|
34
36
|
const { classes, cx } = useClasses(classesProp);
|
|
35
37
|
const today = /* @__PURE__ */ new Date();
|
|
36
38
|
const localValue = value ?? today;
|
|
@@ -123,15 +125,20 @@ const HvSingleCalendar = ({
|
|
|
123
125
|
visibleMonth: visibleMonth || today.getMonth() + 1
|
|
124
126
|
}
|
|
125
127
|
),
|
|
126
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ jsx(
|
|
129
|
+
"div",
|
|
130
|
+
{
|
|
131
|
+
className: cx(classes.calendarGrid, classes.weekdays),
|
|
132
|
+
"aria-controls": HvCalendarHeader?.[0]?.id,
|
|
133
|
+
children: listWeekdayNames.map(renderWeekLabel)
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
/* @__PURE__ */ jsx(
|
|
127
137
|
"div",
|
|
128
138
|
{
|
|
129
139
|
className: classes.calendarGrid,
|
|
130
140
|
"aria-controls": HvCalendarHeader?.[0]?.id,
|
|
131
|
-
children:
|
|
132
|
-
listWeekdayNames.map(renderWeekLabel),
|
|
133
|
-
calModel.dates.map(renderCalendarDate)
|
|
134
|
-
]
|
|
141
|
+
children: calModel.dates.map(renderCalendarDate)
|
|
135
142
|
}
|
|
136
143
|
)
|
|
137
144
|
] }),
|
|
@@ -27,7 +27,7 @@ const { staticClasses, useClasses } = createClasses("HvSingleCalendar", {
|
|
|
27
27
|
"& $cellsInRange:hover": {
|
|
28
28
|
backgroundColor: theme.colors.bgPageSecondary,
|
|
29
29
|
"& $calendarDate": {
|
|
30
|
-
borderRight: `
|
|
30
|
+
borderRight: `2px solid ${theme.colors.text}`
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"& $cellsInRange:hover ~ $cellsInRange": {
|
|
@@ -61,7 +61,8 @@ const { staticClasses, useClasses } = createClasses("HvSingleCalendar", {
|
|
|
61
61
|
backgroundColor: theme.colors.bgPageSecondary
|
|
62
62
|
},
|
|
63
63
|
cellsOutsideRange: {},
|
|
64
|
-
cellContainer: {}
|
|
64
|
+
cellContainer: {},
|
|
65
|
+
weekdays: {}
|
|
65
66
|
});
|
|
66
67
|
export {
|
|
67
68
|
staticClasses,
|
|
@@ -15,7 +15,11 @@ const isSameDay = (date1, date2) => {
|
|
|
15
15
|
return date1.getDate() === date2.getDate() && date1.getMonth() === date2.getMonth() && date1.getFullYear() === date2.getFullYear();
|
|
16
16
|
};
|
|
17
17
|
const getDateISO = (date) => {
|
|
18
|
-
|
|
18
|
+
const d = new Date(date);
|
|
19
|
+
const year = d.getFullYear();
|
|
20
|
+
const month = String(d.getMonth() + 1).padStart(2, "0");
|
|
21
|
+
const day = String(d.getDate()).padStart(2, "0");
|
|
22
|
+
return `${year}-${month}-${day}`;
|
|
19
23
|
};
|
|
20
24
|
const getPreviousMonth = (month, year) => {
|
|
21
25
|
const prevMonth = month > 1 ? month - 1 : 12;
|
|
@@ -36,10 +36,12 @@ const { staticClasses, useClasses } = createClasses("HvStatusIcon", {
|
|
|
36
36
|
}
|
|
37
37
|
])
|
|
38
38
|
),
|
|
39
|
-
":where([data-variant=default]
|
|
39
|
+
":where([data-variant=default])": {
|
|
40
40
|
color: theme.colors.text,
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
":where([data-type=full])": {
|
|
42
|
+
backgroundColor: theme.colors.bgPage,
|
|
43
|
+
outline: `1px solid ${theme.colors.borderSubtle}`
|
|
44
|
+
}
|
|
43
45
|
}
|
|
44
46
|
},
|
|
45
47
|
icon: {
|
|
@@ -869,6 +869,159 @@ const pentahoPlus = mergeTheme(pentahoPlus$1, {
|
|
|
869
869
|
padding: theme.spacing("xs", "sm")
|
|
870
870
|
}
|
|
871
871
|
}
|
|
872
|
+
},
|
|
873
|
+
HvCalendarCell: {
|
|
874
|
+
classes: {
|
|
875
|
+
dateWrapper: {
|
|
876
|
+
width: 32,
|
|
877
|
+
height: 32
|
|
878
|
+
},
|
|
879
|
+
calendarDate: {
|
|
880
|
+
width: 32,
|
|
881
|
+
height: 32,
|
|
882
|
+
...theme.typography.caption1,
|
|
883
|
+
borderRadius: theme.radii.full,
|
|
884
|
+
":hover": {
|
|
885
|
+
borderRadius: theme.radii.full
|
|
886
|
+
}
|
|
887
|
+
},
|
|
888
|
+
calendarDateSelected: {
|
|
889
|
+
backgroundColor: theme.colors.primary,
|
|
890
|
+
color: theme.colors.dimmer,
|
|
891
|
+
":hover": {
|
|
892
|
+
border: `1px solid ${theme.colors.primary}`,
|
|
893
|
+
color: theme.colors.text
|
|
894
|
+
}
|
|
895
|
+
},
|
|
896
|
+
cellContainer: {
|
|
897
|
+
"&:hover": {
|
|
898
|
+
backgroundColor: theme.colors.primaryDimmed,
|
|
899
|
+
borderRadius: theme.radii.full
|
|
900
|
+
},
|
|
901
|
+
":has(> span.HvCalendarCell-calendarDateInSelectionRange):has(> span.HvCalendarCell-startBookend)": {
|
|
902
|
+
backgroundColor: theme.colors.bgPageSecondary,
|
|
903
|
+
borderTopLeftRadius: theme.radii.full,
|
|
904
|
+
borderBottomLeftRadius: theme.radii.full
|
|
905
|
+
},
|
|
906
|
+
":has(> span.HvCalendarCell-calendarDateInSelectionRange):has(> span.HvCalendarCell-endBookend)": {
|
|
907
|
+
backgroundColor: theme.colors.bgPageSecondary,
|
|
908
|
+
borderTopRightRadius: theme.radii.full,
|
|
909
|
+
borderBottomRightRadius: theme.radii.full
|
|
910
|
+
}
|
|
911
|
+
},
|
|
912
|
+
calendarDateInSelectionRange: {
|
|
913
|
+
borderRadius: 0
|
|
914
|
+
},
|
|
915
|
+
startBookend: {
|
|
916
|
+
backgroundColor: theme.colors.primary,
|
|
917
|
+
color: theme.colors.dimmer,
|
|
918
|
+
borderRadius: theme.radii.full
|
|
919
|
+
},
|
|
920
|
+
endBookend: {
|
|
921
|
+
backgroundColor: theme.colors.primary,
|
|
922
|
+
color: theme.colors.dimmer,
|
|
923
|
+
borderRadius: theme.radii.full
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
},
|
|
927
|
+
HvSingleCalendar: {
|
|
928
|
+
classes: {
|
|
929
|
+
root: {
|
|
930
|
+
" .HvNavigation-text": {
|
|
931
|
+
...theme.typography.captionLabel
|
|
932
|
+
},
|
|
933
|
+
" .HvNavigation-root": {
|
|
934
|
+
gap: 0
|
|
935
|
+
},
|
|
936
|
+
" .HvMonthSelector-calendarMonthlyGrid": {
|
|
937
|
+
gridTemplateColumns: "repeat(4, 1fr)"
|
|
938
|
+
},
|
|
939
|
+
" .HvMonthSelector-calendarMonthlyCell": {
|
|
940
|
+
borderRadius: theme.radii.full,
|
|
941
|
+
width: 48,
|
|
942
|
+
height: 48
|
|
943
|
+
},
|
|
944
|
+
" .HvMonthSelector-calendarMonthlyCellSelected": {
|
|
945
|
+
backgroundColor: theme.colors.primary,
|
|
946
|
+
color: theme.colors.dimmer,
|
|
947
|
+
":hover": {
|
|
948
|
+
border: `1px solid ${theme.colors.primary}`,
|
|
949
|
+
color: theme.colors.text,
|
|
950
|
+
backgroundColor: theme.colors.primaryDimmed
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
},
|
|
954
|
+
calendarDay: {
|
|
955
|
+
width: 32,
|
|
956
|
+
height: 32,
|
|
957
|
+
...theme.typography.caption2
|
|
958
|
+
},
|
|
959
|
+
weekdays: {
|
|
960
|
+
borderBottom: `1px solid ${theme.colors.borderSubtle}`,
|
|
961
|
+
marginBottom: theme.space.xs,
|
|
962
|
+
justifyContent: "center"
|
|
963
|
+
},
|
|
964
|
+
calendarGrid: {
|
|
965
|
+
justifyContent: "center",
|
|
966
|
+
gridTemplateColumns: "repeat(7, 32px)",
|
|
967
|
+
"& .HvSingleCalendar-cellsInRange": {
|
|
968
|
+
"& .HvSingleCalendar-startBookend": {
|
|
969
|
+
borderLeft: "none",
|
|
970
|
+
backgroundColor: theme.colors.primary,
|
|
971
|
+
color: theme.colors.dimmer
|
|
972
|
+
}
|
|
973
|
+
},
|
|
974
|
+
"&:hover .HvSingleCalendar-cellsInRange": {
|
|
975
|
+
"& .HvSingleCalendar-startBookend": {
|
|
976
|
+
borderLeft: "none",
|
|
977
|
+
backgroundColor: theme.colors.primary,
|
|
978
|
+
color: theme.colors.dimmer
|
|
979
|
+
}
|
|
980
|
+
},
|
|
981
|
+
"& .HvSingleCalendar-cellsInRange:hover": {
|
|
982
|
+
borderTopRightRadius: theme.radii.full,
|
|
983
|
+
borderBottomRightRadius: theme.radii.full,
|
|
984
|
+
"& .HvSingleCalendar-calendarDate": {
|
|
985
|
+
borderRight: "none",
|
|
986
|
+
backgroundColor: theme.colors.primary,
|
|
987
|
+
color: theme.colors.dimmer
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
},
|
|
991
|
+
cellsInRange: {
|
|
992
|
+
":has(span.HvSingleCalendar-startBookend)": {
|
|
993
|
+
borderTopLeftRadius: theme.radii.full,
|
|
994
|
+
borderBottomLeftRadius: theme.radii.full
|
|
995
|
+
}
|
|
996
|
+
},
|
|
997
|
+
cellContainer: {
|
|
998
|
+
"&:hover": {
|
|
999
|
+
":has(span.HvSingleCalendar-startBookend)": {
|
|
1000
|
+
borderTopRightRadius: 0,
|
|
1001
|
+
borderBottomRightRadius: 0
|
|
1002
|
+
},
|
|
1003
|
+
":has(span.HvSingleCalendar-endBookend)": {
|
|
1004
|
+
borderTopLeftRadius: 0,
|
|
1005
|
+
borderBottomLeftRadius: 0
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
},
|
|
1009
|
+
calendarDateInSelectionRange: {
|
|
1010
|
+
":hover:not( .HvSingleCalendar-endBookend):not( .HvSingleCalendar-startBookend)": {
|
|
1011
|
+
borderRadius: 0
|
|
1012
|
+
}
|
|
1013
|
+
},
|
|
1014
|
+
startBookend: {
|
|
1015
|
+
borderLeft: "none",
|
|
1016
|
+
borderTopLeftRadius: theme.radii.full,
|
|
1017
|
+
borderBottomLeftRadius: theme.radii.full
|
|
1018
|
+
},
|
|
1019
|
+
endBookend: {
|
|
1020
|
+
borderRight: "none",
|
|
1021
|
+
borderTopRightRadius: theme.radii.full,
|
|
1022
|
+
borderBottomRightRadius: theme.radii.full
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
872
1025
|
}
|
|
873
1026
|
}
|
|
874
1027
|
});
|
package/dist/types/index.d.ts
CHANGED
|
@@ -9444,7 +9444,7 @@ declare const useClasses_4: (classesProp?: Partial<Record<"disabled" | "selected
|
|
|
9444
9444
|
readonly cx: (...args: any) => string;
|
|
9445
9445
|
};
|
|
9446
9446
|
|
|
9447
|
-
declare const useClasses_40: (classesProp?: Partial<Record<"root" | "focusSelection" | "navigationContainer" | "navigationMonth" | "cellContainer" | "calendarDate" | "calendarDateSelected" | "calendarDateNotInMonth" | "calendarDateInSelectionRange" | "startBookend" | "endBookend" | "cellsInRange" | "cellsOutsideRange" | "calendarGrid" | "calendarDay" | "calendarDateInvalid", string>>, addStatic?: boolean) => {
|
|
9447
|
+
declare const useClasses_40: (classesProp?: Partial<Record<"root" | "focusSelection" | "navigationContainer" | "navigationMonth" | "cellContainer" | "calendarDate" | "calendarDateSelected" | "calendarDateNotInMonth" | "calendarDateInSelectionRange" | "startBookend" | "endBookend" | "cellsInRange" | "cellsOutsideRange" | "calendarGrid" | "calendarDay" | "calendarDateInvalid" | "weekdays", string>>, addStatic?: boolean) => {
|
|
9448
9448
|
readonly classes: {
|
|
9449
9449
|
root: string;
|
|
9450
9450
|
calendarGrid: string;
|
|
@@ -9462,6 +9462,7 @@ declare const useClasses_40: (classesProp?: Partial<Record<"root" | "focusSelect
|
|
|
9462
9462
|
cellsInRange: string;
|
|
9463
9463
|
cellsOutsideRange: string;
|
|
9464
9464
|
cellContainer: string;
|
|
9465
|
+
weekdays: string;
|
|
9465
9466
|
};
|
|
9466
9467
|
readonly css: any;
|
|
9467
9468
|
readonly cx: (...args: any) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitachivantara/uikit-react-core",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.110.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Hitachi Vantara UI Kit Team",
|
|
6
6
|
"description": "UI Kit Core React components.",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"access": "public",
|
|
62
62
|
"directory": "package"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "54d397e44ecb236d24bb4a8b9694b71ec98997f1",
|
|
65
65
|
"exports": {
|
|
66
66
|
".": {
|
|
67
67
|
"types": "./dist/types/index.d.ts",
|