colibri-ui 0.8.37 → 0.8.40
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/Calendar/components/Month/index.module.css +15 -20
- package/Calendar/index.js +2 -2
- package/Calendar/index.module.css +3 -2
- package/Calendar/utils/getPresets.d.ts +7 -5
- package/esm/Calendar/components/Month/index.module.css +15 -20
- package/esm/Calendar/index.js +2 -2
- package/esm/Calendar/index.module.css +3 -2
- package/esm/Calendar/utils/getPresets.d.ts +7 -5
- package/package.json +1 -1
|
@@ -13,38 +13,33 @@
|
|
|
13
13
|
display: flex;
|
|
14
14
|
flex-direction: column;
|
|
15
15
|
width: 100%;
|
|
16
|
+
height: auto;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
.week {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
justify-content:
|
|
23
|
-
list-style: none;
|
|
24
|
-
margin: 0;
|
|
20
|
+
display: grid;
|
|
21
|
+
grid-template-columns: repeat(7, 1fr);
|
|
22
|
+
gap: 4px;
|
|
23
|
+
justify-content: center;
|
|
25
24
|
padding: 0;
|
|
25
|
+
margin: 2px 0;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.day {
|
|
29
29
|
display: block;
|
|
30
|
-
height: 32px;
|
|
30
|
+
min-height: 32px;
|
|
31
31
|
position: relative;
|
|
32
32
|
text-align: center;
|
|
33
33
|
width: 32px;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.legend {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
font-size: 14px;
|
|
41
|
-
justify-content: space-between;
|
|
42
|
-
line-height: 20px;
|
|
43
|
-
list-style: none;
|
|
44
|
-
margin: 0;
|
|
45
|
-
padding: 0;
|
|
37
|
+
display: grid;
|
|
38
|
+
grid-template-columns: repeat(7, 1fr);
|
|
39
|
+
gap: 4px;
|
|
46
40
|
text-align: center;
|
|
47
|
-
|
|
41
|
+
padding: 0;
|
|
42
|
+
margin: 2px 0;
|
|
48
43
|
}
|
|
49
44
|
|
|
50
45
|
.selected-range-day {
|
|
@@ -85,17 +80,17 @@
|
|
|
85
80
|
display: block;
|
|
86
81
|
left: auto;
|
|
87
82
|
right: auto;
|
|
88
|
-
width:
|
|
83
|
+
width: 100%;
|
|
89
84
|
}
|
|
90
85
|
.selected-day:first-child::before {
|
|
91
86
|
display: block;
|
|
92
87
|
left: 50%;
|
|
93
|
-
width:
|
|
88
|
+
width: 100%;
|
|
94
89
|
}
|
|
95
90
|
.selected-day:last-child::before {
|
|
96
91
|
display: block;
|
|
97
92
|
right: 50%;
|
|
98
|
-
width:
|
|
93
|
+
width: 100%;
|
|
99
94
|
}
|
|
100
95
|
.selected-day + .selected-day, .selected-day + .selected-day:hover {
|
|
101
96
|
z-index: 4 !important;
|
package/Calendar/index.js
CHANGED
|
@@ -38,7 +38,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
38
38
|
onChange = _ref.onChange,
|
|
39
39
|
onCancel = _ref.onCancel,
|
|
40
40
|
_ref$minWidth = _ref.minWidth,
|
|
41
|
-
minWidth = _ref$minWidth === void 0 ?
|
|
41
|
+
minWidth = _ref$minWidth === void 0 ? 320 : _ref$minWidth,
|
|
42
42
|
_ref$withContinueButt = _ref.withContinueButton,
|
|
43
43
|
withContinueButton = _ref$withContinueButt === void 0 ? false : _ref$withContinueButt,
|
|
44
44
|
className = _ref.className,
|
|
@@ -185,7 +185,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
185
185
|
},
|
|
186
186
|
"data-testid": "calendar",
|
|
187
187
|
ref: $root
|
|
188
|
-
}, /*#__PURE__*/React__default.default.createElement(
|
|
188
|
+
}, /*#__PURE__*/React__default.default.createElement(React__default.default.Fragment, null, contentWidth ? (/*#__PURE__*/React__default.default.createElement("div", {
|
|
189
189
|
"data-component": "Months",
|
|
190
190
|
className: clx(styles__default.default.months),
|
|
191
191
|
style: {
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
-moz-osx-font-smoothing: grayscale;
|
|
5
5
|
-webkit-font-smoothing: antialiased;
|
|
6
6
|
gap: 1rem;
|
|
7
|
-
min-width:
|
|
7
|
+
min-width: 320px;
|
|
8
|
+
min-height: 360px;
|
|
8
9
|
overflow: hidden;
|
|
9
10
|
position: relative;
|
|
10
11
|
text-rendering: optimizelegibility;
|
|
@@ -33,7 +34,7 @@
|
|
|
33
34
|
padding: 0 16px;
|
|
34
35
|
position: absolute;
|
|
35
36
|
top: 0;
|
|
36
|
-
width:
|
|
37
|
+
width: 60px;
|
|
37
38
|
}
|
|
38
39
|
.month-control[disabled] {
|
|
39
40
|
cursor: default;
|
|
@@ -3,8 +3,10 @@ export type DatePreset = {
|
|
|
3
3
|
date: string;
|
|
4
4
|
period: number;
|
|
5
5
|
};
|
|
6
|
-
export declare
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
export declare const addDays: (date: Date, days?: number) => Date;
|
|
7
|
+
export declare const getToday: () => DatePreset;
|
|
8
|
+
export declare const getTomorrow: () => DatePreset;
|
|
9
|
+
export declare const getWeekends: () => DatePreset;
|
|
10
|
+
export declare const getCurrWeek: () => DatePreset;
|
|
11
|
+
export declare const getNextWeek: () => DatePreset;
|
|
12
|
+
export declare function getPresets(presets: string[]): DatePreset[];
|
|
@@ -13,38 +13,33 @@
|
|
|
13
13
|
display: flex;
|
|
14
14
|
flex-direction: column;
|
|
15
15
|
width: 100%;
|
|
16
|
+
height: auto;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
.week {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
justify-content:
|
|
23
|
-
list-style: none;
|
|
24
|
-
margin: 0;
|
|
20
|
+
display: grid;
|
|
21
|
+
grid-template-columns: repeat(7, 1fr);
|
|
22
|
+
gap: 4px;
|
|
23
|
+
justify-content: center;
|
|
25
24
|
padding: 0;
|
|
25
|
+
margin: 2px 0;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.day {
|
|
29
29
|
display: block;
|
|
30
|
-
height: 32px;
|
|
30
|
+
min-height: 32px;
|
|
31
31
|
position: relative;
|
|
32
32
|
text-align: center;
|
|
33
33
|
width: 32px;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.legend {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
font-size: 14px;
|
|
41
|
-
justify-content: space-between;
|
|
42
|
-
line-height: 20px;
|
|
43
|
-
list-style: none;
|
|
44
|
-
margin: 0;
|
|
45
|
-
padding: 0;
|
|
37
|
+
display: grid;
|
|
38
|
+
grid-template-columns: repeat(7, 1fr);
|
|
39
|
+
gap: 4px;
|
|
46
40
|
text-align: center;
|
|
47
|
-
|
|
41
|
+
padding: 0;
|
|
42
|
+
margin: 2px 0;
|
|
48
43
|
}
|
|
49
44
|
|
|
50
45
|
.selected-range-day {
|
|
@@ -85,17 +80,17 @@
|
|
|
85
80
|
display: block;
|
|
86
81
|
left: auto;
|
|
87
82
|
right: auto;
|
|
88
|
-
width:
|
|
83
|
+
width: 100%;
|
|
89
84
|
}
|
|
90
85
|
.selected-day:first-child::before {
|
|
91
86
|
display: block;
|
|
92
87
|
left: 50%;
|
|
93
|
-
width:
|
|
88
|
+
width: 100%;
|
|
94
89
|
}
|
|
95
90
|
.selected-day:last-child::before {
|
|
96
91
|
display: block;
|
|
97
92
|
right: 50%;
|
|
98
|
-
width:
|
|
93
|
+
width: 100%;
|
|
99
94
|
}
|
|
100
95
|
.selected-day + .selected-day, .selected-day + .selected-day:hover {
|
|
101
96
|
z-index: 4 !important;
|
package/esm/Calendar/index.js
CHANGED
|
@@ -27,7 +27,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
27
27
|
onChange = _ref.onChange,
|
|
28
28
|
onCancel = _ref.onCancel,
|
|
29
29
|
_ref$minWidth = _ref.minWidth,
|
|
30
|
-
minWidth = _ref$minWidth === void 0 ?
|
|
30
|
+
minWidth = _ref$minWidth === void 0 ? 320 : _ref$minWidth,
|
|
31
31
|
_ref$withContinueButt = _ref.withContinueButton,
|
|
32
32
|
withContinueButton = _ref$withContinueButt === void 0 ? false : _ref$withContinueButt,
|
|
33
33
|
className = _ref.className,
|
|
@@ -174,7 +174,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
174
174
|
},
|
|
175
175
|
"data-testid": "calendar",
|
|
176
176
|
ref: $root
|
|
177
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
177
|
+
}, /*#__PURE__*/React__default.createElement(React__default.Fragment, null, contentWidth ? (/*#__PURE__*/React__default.createElement("div", {
|
|
178
178
|
"data-component": "Months",
|
|
179
179
|
className: clx(styles.months),
|
|
180
180
|
style: {
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
-moz-osx-font-smoothing: grayscale;
|
|
5
5
|
-webkit-font-smoothing: antialiased;
|
|
6
6
|
gap: 1rem;
|
|
7
|
-
min-width:
|
|
7
|
+
min-width: 320px;
|
|
8
|
+
min-height: 360px;
|
|
8
9
|
overflow: hidden;
|
|
9
10
|
position: relative;
|
|
10
11
|
text-rendering: optimizelegibility;
|
|
@@ -33,7 +34,7 @@
|
|
|
33
34
|
padding: 0 16px;
|
|
34
35
|
position: absolute;
|
|
35
36
|
top: 0;
|
|
36
|
-
width:
|
|
37
|
+
width: 60px;
|
|
37
38
|
}
|
|
38
39
|
.month-control[disabled] {
|
|
39
40
|
cursor: default;
|
|
@@ -3,8 +3,10 @@ export type DatePreset = {
|
|
|
3
3
|
date: string;
|
|
4
4
|
period: number;
|
|
5
5
|
};
|
|
6
|
-
export declare
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
export declare const addDays: (date: Date, days?: number) => Date;
|
|
7
|
+
export declare const getToday: () => DatePreset;
|
|
8
|
+
export declare const getTomorrow: () => DatePreset;
|
|
9
|
+
export declare const getWeekends: () => DatePreset;
|
|
10
|
+
export declare const getCurrWeek: () => DatePreset;
|
|
11
|
+
export declare const getNextWeek: () => DatePreset;
|
|
12
|
+
export declare function getPresets(presets: string[]): DatePreset[];
|