@instructure/ui-calendar 8.56.2-pr-snapshot-1721749364069 → 8.56.2
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/CHANGELOG.md +1 -1
- package/lib/Calendar/CalendarLocator.js +2 -2
- package/lib/Calendar/Day/DayLocator.js +2 -2
- package/lib/Calendar/Day/index.js +12 -10
- package/lib/Calendar/Day/props.js +2 -2
- package/lib/Calendar/index.js +41 -36
- package/lib/Calendar/props.js +2 -2
- package/package.json +19 -19
- package/tsconfig.build.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [8.56.2
|
|
6
|
+
## [8.56.2](https://github.com/instructure/instructure-ui/compare/v8.56.1...v8.56.2) (2024-08-06)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @instructure/ui-calendar
|
|
9
9
|
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "DayLocator", {
|
|
|
10
10
|
return _DayLocator.DayLocator;
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
|
-
var
|
|
13
|
+
var _locator = require("@instructure/ui-test-locator/lib/utils/locator.js");
|
|
14
14
|
var _index = require("./index");
|
|
15
15
|
var _DayLocator = require("./Day/DayLocator");
|
|
16
16
|
/*
|
|
@@ -38,7 +38,7 @@ var _DayLocator = require("./Day/DayLocator");
|
|
|
38
38
|
*/
|
|
39
39
|
|
|
40
40
|
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
41
|
-
const CalendarLocator = exports.CalendarLocator = (0,
|
|
41
|
+
const CalendarLocator = exports.CalendarLocator = (0, _locator.locator)(_index.Calendar.selector, {
|
|
42
42
|
findAllDays: (...args) => {
|
|
43
43
|
return _DayLocator.DayLocator.findAll(...args);
|
|
44
44
|
},
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.DayLocator = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _locator = require("@instructure/ui-test-locator/lib/utils/locator.js");
|
|
8
8
|
var _index = require("./index");
|
|
9
9
|
/*
|
|
10
10
|
* The MIT License (MIT)
|
|
@@ -31,4 +31,4 @@ var _index = require("./index");
|
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
33
|
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
34
|
-
const DayLocator = exports.DayLocator = (0,
|
|
34
|
+
const DayLocator = exports.DayLocator = (0, _locator.locator)(_index.Day.selector);
|
|
@@ -7,10 +7,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = exports.Day = void 0;
|
|
8
8
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
9
|
var _react = require("react");
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
10
|
+
var _View = require("@instructure/ui-view/lib/View");
|
|
11
|
+
var _AccessibleContent = require("@instructure/ui-a11y-content/lib/AccessibleContent");
|
|
12
|
+
var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
|
|
13
|
+
var _callRenderProp = require("@instructure/ui-react-utils/lib/callRenderProp.js");
|
|
14
|
+
var _getElementType = require("@instructure/ui-react-utils/lib/getElementType.js");
|
|
15
|
+
var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
14
16
|
var _emotion = require("@instructure/emotion");
|
|
15
17
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
16
18
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
@@ -47,7 +49,7 @@ parent: Calendar
|
|
|
47
49
|
id: Calendar.Day
|
|
48
50
|
---
|
|
49
51
|
**/
|
|
50
|
-
let Day = exports.Day = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0,
|
|
52
|
+
let Day = exports.Day = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_class2 = class Day extends _react.Component {
|
|
51
53
|
constructor(...args) {
|
|
52
54
|
super(...args);
|
|
53
55
|
this.ref = null;
|
|
@@ -98,7 +100,7 @@ let Day = exports.Day = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.
|
|
|
98
100
|
}
|
|
99
101
|
get elementType() {
|
|
100
102
|
const as = this.props.as;
|
|
101
|
-
return as || (0,
|
|
103
|
+
return as || (0, _getElementType.getElementType)(Day, this.props);
|
|
102
104
|
}
|
|
103
105
|
shouldApplyAriaSelected() {
|
|
104
106
|
const role = this.props.role; // eslint-disable-line react/prop-types
|
|
@@ -119,8 +121,8 @@ let Day = exports.Day = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.
|
|
|
119
121
|
props = (0, _objectWithoutProperties2.default)(_this$props5, _excluded);
|
|
120
122
|
const elementType = this.elementType,
|
|
121
123
|
isDisabled = this.isDisabled;
|
|
122
|
-
const passthroughProps =
|
|
123
|
-
return (0, _emotion.jsx)(
|
|
124
|
+
const passthroughProps = _View.View.omitViewProps((0, _omitProps.omitProps)(props, Day.allowedProps), Day);
|
|
125
|
+
return (0, _emotion.jsx)(_View.View, Object.assign({}, passthroughProps, {
|
|
124
126
|
as: elementType,
|
|
125
127
|
css: styles === null || styles === void 0 ? void 0 : styles.calendarDay,
|
|
126
128
|
display: "inline-block",
|
|
@@ -137,9 +139,9 @@ let Day = exports.Day = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.
|
|
|
137
139
|
elementRef: this.handleElementRef
|
|
138
140
|
}), (0, _emotion.jsx)("span", {
|
|
139
141
|
css: styles === null || styles === void 0 ? void 0 : styles.day
|
|
140
|
-
}, (0, _emotion.jsx)(
|
|
142
|
+
}, (0, _emotion.jsx)(_AccessibleContent.AccessibleContent, {
|
|
141
143
|
alt: label
|
|
142
|
-
}, (0,
|
|
144
|
+
}, (0, _callRenderProp.callRenderProp)(children))));
|
|
143
145
|
}
|
|
144
146
|
}, _class2.displayName = "Day", _class2.componentId = 'Calendar.Day', _class2.propTypes = _props.propTypes, _class2.allowedProps = _props.allowedProps, _class2.defaultProps = {
|
|
145
147
|
interaction: 'enabled',
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.propTypes = exports.allowedProps = void 0;
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
var
|
|
9
|
+
var _I18nPropTypes = require("@instructure/ui-i18n/lib/I18nPropTypes.js");
|
|
10
10
|
/*
|
|
11
11
|
* The MIT License (MIT)
|
|
12
12
|
*
|
|
@@ -33,7 +33,7 @@ var _uiI18n = require("@instructure/ui-i18n");
|
|
|
33
33
|
|
|
34
34
|
const propTypes = exports.propTypes = {
|
|
35
35
|
children: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]),
|
|
36
|
-
date:
|
|
36
|
+
date: _I18nPropTypes.I18nPropTypes.iso8601.isRequired,
|
|
37
37
|
label: _propTypes.default.string.isRequired,
|
|
38
38
|
interaction: _propTypes.default.oneOf(['enabled', 'disabled']),
|
|
39
39
|
isSelected: _propTypes.default.bool,
|
package/lib/Calendar/index.js
CHANGED
|
@@ -7,21 +7,26 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = exports.Calendar = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
10
|
+
var _View = require("@instructure/ui-view/lib/View");
|
|
11
|
+
var _safeCloneElement = require("@instructure/ui-react-utils/lib/safeCloneElement.js");
|
|
12
|
+
var _callRenderProp = require("@instructure/ui-react-utils/lib/callRenderProp.js");
|
|
13
|
+
var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
|
|
14
|
+
var _createChainedFunction = require("@instructure/ui-utils/lib/createChainedFunction.js");
|
|
13
15
|
var _console = require("@instructure/console");
|
|
14
16
|
var _uid = require("@instructure/uid");
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
+
var _AccessibleContent = require("@instructure/ui-a11y-content/lib/AccessibleContent");
|
|
18
|
+
var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
17
19
|
var _emotion = require("@instructure/emotion");
|
|
18
|
-
var
|
|
20
|
+
var _Locale = require("@instructure/ui-i18n/lib/Locale.js");
|
|
21
|
+
var _DateTime = require("@instructure/ui-i18n/lib/DateTime.js");
|
|
22
|
+
var _ApplyLocaleContext = require("@instructure/ui-i18n/lib/ApplyLocale/ApplyLocaleContext.js");
|
|
19
23
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
20
24
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
21
25
|
var _Day = require("./Day");
|
|
22
26
|
var _props = require("./props");
|
|
23
|
-
var
|
|
24
|
-
var
|
|
27
|
+
var _IconButton3 = require("@instructure/ui-buttons/lib/IconButton");
|
|
28
|
+
var _IconArrowOpenStartSolid = require("@instructure/ui-icons/lib/IconArrowOpenStartSolid.js");
|
|
29
|
+
var _IconArrowOpenEndSolid = require("@instructure/ui-icons/lib/IconArrowOpenEndSolid.js");
|
|
25
30
|
var _dec, _dec2, _class, _class2, _IconButton, _IconButton2;
|
|
26
31
|
/*
|
|
27
32
|
* The MIT License (MIT)
|
|
@@ -52,7 +57,7 @@ var _dec, _dec2, _class, _class2, _IconButton, _IconButton2;
|
|
|
52
57
|
category: components
|
|
53
58
|
---
|
|
54
59
|
**/
|
|
55
|
-
let Calendar = exports.Calendar = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0,
|
|
60
|
+
let Calendar = exports.Calendar = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_class2 = class Calendar extends _react.Component {
|
|
56
61
|
constructor(props) {
|
|
57
62
|
super(props);
|
|
58
63
|
this.ref = null;
|
|
@@ -68,8 +73,8 @@ let Calendar = exports.Calendar = (_dec = (0, _emotion.withStyle)(_styles.defaul
|
|
|
68
73
|
this.calculateState = (locale, timezone, currentDate) => {
|
|
69
74
|
const visibleMonth = this.props.visibleMonth || currentDate;
|
|
70
75
|
return {
|
|
71
|
-
visibleMonth: visibleMonth ?
|
|
72
|
-
today: currentDate ?
|
|
76
|
+
visibleMonth: visibleMonth ? _DateTime.DateTime.parse(visibleMonth, locale, timezone) : _DateTime.DateTime.now(locale, timezone),
|
|
77
|
+
today: currentDate ? _DateTime.DateTime.parse(currentDate, locale, timezone) : _DateTime.DateTime.now(locale, timezone)
|
|
73
78
|
};
|
|
74
79
|
};
|
|
75
80
|
this.renderMonthNavigationButtons = () => {
|
|
@@ -77,20 +82,20 @@ let Calendar = exports.Calendar = (_dec = (0, _emotion.withStyle)(_styles.defaul
|
|
|
77
82
|
renderNextMonthButton = _this$props.renderNextMonthButton,
|
|
78
83
|
renderPrevMonthButton = _this$props.renderPrevMonthButton;
|
|
79
84
|
return {
|
|
80
|
-
prevButton: renderPrevMonthButton ? (0,
|
|
85
|
+
prevButton: renderPrevMonthButton ? (0, _callRenderProp.callRenderProp)(renderPrevMonthButton) : _IconButton || (_IconButton = (0, _emotion.jsx)(_IconButton3.IconButton, {
|
|
81
86
|
size: "small",
|
|
82
87
|
withBackground: false,
|
|
83
88
|
withBorder: false,
|
|
84
|
-
renderIcon: (0, _emotion.jsx)(
|
|
89
|
+
renderIcon: (0, _emotion.jsx)(_IconArrowOpenStartSolid.IconArrowOpenStartSolid, {
|
|
85
90
|
color: "primary"
|
|
86
91
|
}),
|
|
87
92
|
screenReaderLabel: "Previous month"
|
|
88
93
|
})),
|
|
89
|
-
nextButton: renderNextMonthButton ? (0,
|
|
94
|
+
nextButton: renderNextMonthButton ? (0, _callRenderProp.callRenderProp)(renderNextMonthButton) : _IconButton2 || (_IconButton2 = (0, _emotion.jsx)(_IconButton3.IconButton, {
|
|
90
95
|
size: "small",
|
|
91
96
|
withBackground: false,
|
|
92
97
|
withBorder: false,
|
|
93
|
-
renderIcon: (0, _emotion.jsx)(
|
|
98
|
+
renderIcon: (0, _emotion.jsx)(_IconArrowOpenEndSolid.IconArrowOpenEndSolid, {
|
|
94
99
|
color: "primary"
|
|
95
100
|
}),
|
|
96
101
|
screenReaderLabel: "Next month"
|
|
@@ -133,7 +138,7 @@ let Calendar = exports.Calendar = (_dec = (0, _emotion.withStyle)(_styles.defaul
|
|
|
133
138
|
date
|
|
134
139
|
}) => {
|
|
135
140
|
if (this.props.onDateSelected) {
|
|
136
|
-
const parsedDate =
|
|
141
|
+
const parsedDate = _DateTime.DateTime.parse(date, this.locale(), this.timezone());
|
|
137
142
|
this.props.onDateSelected(parsedDate.toISOString(), parsedDate, event);
|
|
138
143
|
}
|
|
139
144
|
};
|
|
@@ -166,13 +171,13 @@ let Calendar = exports.Calendar = (_dec = (0, _emotion.withStyle)(_styles.defaul
|
|
|
166
171
|
const _this$renderMonthNavi = this.renderMonthNavigationButtons(),
|
|
167
172
|
prevButton = _this$renderMonthNavi.prevButton,
|
|
168
173
|
nextButton = _this$renderMonthNavi.nextButton;
|
|
169
|
-
const cloneButton = (button, onClick) => (0,
|
|
170
|
-
onClick: (0,
|
|
174
|
+
const cloneButton = (button, onClick) => (0, _safeCloneElement.safeCloneElement)(button, {
|
|
175
|
+
onClick: (0, _createChainedFunction.createChainedFunction)(button.props.onClick, onClick)
|
|
171
176
|
});
|
|
172
177
|
const style = [styles === null || styles === void 0 ? void 0 : styles.navigation, ...(prevButton || nextButton ? [styles === null || styles === void 0 ? void 0 : styles.navigationWithButtons] : [])];
|
|
173
178
|
return (0, _emotion.jsx)("div", {
|
|
174
179
|
css: style
|
|
175
|
-
}, prevButton && cloneButton(prevButton, this.handleMonthChange('prev')), renderNavigationLabel ? (0,
|
|
180
|
+
}, prevButton && cloneButton(prevButton, this.handleMonthChange('prev')), renderNavigationLabel ? (0, _callRenderProp.callRenderProp)(renderNavigationLabel) : (0, _emotion.jsx)("span", null, (0, _emotion.jsx)("div", null, visibleMonth.format('MMMM')), (0, _emotion.jsx)("div", null, visibleMonth.format('YYYY'))), nextButton && cloneButton(nextButton, this.handleMonthChange('next')));
|
|
176
181
|
}
|
|
177
182
|
renderBody() {
|
|
178
183
|
return (0, _emotion.jsx)("table", {
|
|
@@ -190,31 +195,31 @@ let Calendar = exports.Calendar = (_dec = (0, _emotion.withStyle)(_styles.defaul
|
|
|
190
195
|
scope: "col",
|
|
191
196
|
css: styles === null || styles === void 0 ? void 0 : styles.weekdayHeader,
|
|
192
197
|
id: this._weekdayHeaderIds[i]
|
|
193
|
-
}, (0,
|
|
198
|
+
}, (0, _callRenderProp.callRenderProp)(label));
|
|
194
199
|
}));
|
|
195
200
|
}
|
|
196
201
|
get defaultWeekdays() {
|
|
197
|
-
const shortDayNames =
|
|
198
|
-
const longDayNames =
|
|
199
|
-
return [(0, _emotion.jsx)(
|
|
202
|
+
const shortDayNames = _DateTime.DateTime.getLocalDayNamesOfTheWeek(this.locale(), 'short');
|
|
203
|
+
const longDayNames = _DateTime.DateTime.getLocalDayNamesOfTheWeek(this.locale(), 'long');
|
|
204
|
+
return [(0, _emotion.jsx)(_AccessibleContent.AccessibleContent, {
|
|
200
205
|
key: 1,
|
|
201
206
|
alt: longDayNames[0]
|
|
202
|
-
}, shortDayNames[0]), (0, _emotion.jsx)(
|
|
207
|
+
}, shortDayNames[0]), (0, _emotion.jsx)(_AccessibleContent.AccessibleContent, {
|
|
203
208
|
key: 2,
|
|
204
209
|
alt: longDayNames[1]
|
|
205
|
-
}, shortDayNames[1]), (0, _emotion.jsx)(
|
|
210
|
+
}, shortDayNames[1]), (0, _emotion.jsx)(_AccessibleContent.AccessibleContent, {
|
|
206
211
|
key: 3,
|
|
207
212
|
alt: longDayNames[2]
|
|
208
|
-
}, shortDayNames[2]), (0, _emotion.jsx)(
|
|
213
|
+
}, shortDayNames[2]), (0, _emotion.jsx)(_AccessibleContent.AccessibleContent, {
|
|
209
214
|
key: 4,
|
|
210
215
|
alt: longDayNames[3]
|
|
211
|
-
}, shortDayNames[3]), (0, _emotion.jsx)(
|
|
216
|
+
}, shortDayNames[3]), (0, _emotion.jsx)(_AccessibleContent.AccessibleContent, {
|
|
212
217
|
key: 5,
|
|
213
218
|
alt: longDayNames[4]
|
|
214
|
-
}, shortDayNames[4]), (0, _emotion.jsx)(
|
|
219
|
+
}, shortDayNames[4]), (0, _emotion.jsx)(_AccessibleContent.AccessibleContent, {
|
|
215
220
|
key: 6,
|
|
216
221
|
alt: longDayNames[5]
|
|
217
|
-
}, shortDayNames[5]), (0, _emotion.jsx)(
|
|
222
|
+
}, shortDayNames[5]), (0, _emotion.jsx)(_AccessibleContent.AccessibleContent, {
|
|
218
223
|
key: 7,
|
|
219
224
|
alt: longDayNames[6]
|
|
220
225
|
}, shortDayNames[6])];
|
|
@@ -236,7 +241,7 @@ let Calendar = exports.Calendar = (_dec = (0, _emotion.withStyle)(_styles.defaul
|
|
|
236
241
|
}, row.map((day, i) => (0, _emotion.jsx)("td", {
|
|
237
242
|
key: day.props.date,
|
|
238
243
|
role: role
|
|
239
|
-
}, role === 'presentation' ? (0,
|
|
244
|
+
}, role === 'presentation' ? (0, _safeCloneElement.safeCloneElement)(day, {
|
|
240
245
|
'aria-describedby': this._weekdayHeaderIds[i]
|
|
241
246
|
}) : day))));
|
|
242
247
|
}
|
|
@@ -246,7 +251,7 @@ let Calendar = exports.Calendar = (_dec = (0, _emotion.withStyle)(_styles.defaul
|
|
|
246
251
|
} else if (this.context && this.context.locale) {
|
|
247
252
|
return this.context.locale;
|
|
248
253
|
}
|
|
249
|
-
return
|
|
254
|
+
return _Locale.Locale.browserLocale();
|
|
250
255
|
}
|
|
251
256
|
timezone() {
|
|
252
257
|
if (this.props.timezone) {
|
|
@@ -254,7 +259,7 @@ let Calendar = exports.Calendar = (_dec = (0, _emotion.withStyle)(_styles.defaul
|
|
|
254
259
|
} else if (this.context && this.context.timezone) {
|
|
255
260
|
return this.context.timezone;
|
|
256
261
|
}
|
|
257
|
-
return
|
|
262
|
+
return _DateTime.DateTime.browserTimeZone();
|
|
258
263
|
}
|
|
259
264
|
isDisabledDate(date) {
|
|
260
265
|
const disabledDates = this.props.disabledDates;
|
|
@@ -279,7 +284,7 @@ let Calendar = exports.Calendar = (_dec = (0, _emotion.withStyle)(_styles.defaul
|
|
|
279
284
|
// Sets it to the first local day of the week counting back from the start of the month.
|
|
280
285
|
// Note that first day depends on the locale, e.g. it's Sunday in the US and
|
|
281
286
|
// Monday in most of the EU.
|
|
282
|
-
const currDate =
|
|
287
|
+
const currDate = _DateTime.DateTime.getFirstDayOfWeek(visibleMonth.clone().startOf('month'));
|
|
283
288
|
const arr = [];
|
|
284
289
|
for (let i = 0; i < Calendar.DAY_COUNT; i++) {
|
|
285
290
|
arr.push(currDate.clone());
|
|
@@ -303,8 +308,8 @@ let Calendar = exports.Calendar = (_dec = (0, _emotion.withStyle)(_styles.defaul
|
|
|
303
308
|
});
|
|
304
309
|
}
|
|
305
310
|
render() {
|
|
306
|
-
const passthroughProps =
|
|
307
|
-
return (0, _emotion.jsx)(
|
|
311
|
+
const passthroughProps = _View.View.omitViewProps((0, _omitProps.omitProps)(this.props, Calendar.allowedProps), Calendar);
|
|
312
|
+
return (0, _emotion.jsx)(_View.View, Object.assign({}, passthroughProps, {
|
|
308
313
|
as: this.props.as,
|
|
309
314
|
display: "inline-block",
|
|
310
315
|
padding: "small",
|
|
@@ -312,7 +317,7 @@ let Calendar = exports.Calendar = (_dec = (0, _emotion.withStyle)(_styles.defaul
|
|
|
312
317
|
elementRef: this.handleRef
|
|
313
318
|
}), this.renderHeader(), this.renderBody());
|
|
314
319
|
}
|
|
315
|
-
}, _class2.displayName = "Calendar", _class2.componentId = 'Calendar', _class2.contextType =
|
|
320
|
+
}, _class2.displayName = "Calendar", _class2.componentId = 'Calendar', _class2.contextType = _ApplyLocaleContext.ApplyLocaleContext, _class2.Day = _Day.Day, _class2.DAY_COUNT = 42, _class2.propTypes = _props.propTypes, _class2.allowedProps = _props.allowedProps, _class2.defaultProps = {
|
|
316
321
|
as: 'span',
|
|
317
322
|
role: 'table'
|
|
318
323
|
}, _class2)) || _class) || _class);
|
package/lib/Calendar/props.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.propTypes = exports.allowedProps = void 0;
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
var
|
|
9
|
+
var _Children = require("@instructure/ui-prop-types/lib/Children.js");
|
|
10
10
|
var _Day = require("./Day");
|
|
11
11
|
/*
|
|
12
12
|
* The MIT License (MIT)
|
|
@@ -34,7 +34,7 @@ var _Day = require("./Day");
|
|
|
34
34
|
|
|
35
35
|
const propTypes = exports.propTypes = {
|
|
36
36
|
as: _propTypes.default.elementType,
|
|
37
|
-
children:
|
|
37
|
+
children: _Children.Children.oneOf([_Day.Day]),
|
|
38
38
|
currentDate: _propTypes.default.string,
|
|
39
39
|
disabledDates: _propTypes.default.oneOfType([_propTypes.default.array, _propTypes.default.func]),
|
|
40
40
|
locale: _propTypes.default.string,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-calendar",
|
|
3
|
-
"version": "8.56.2
|
|
3
|
+
"version": "8.56.2",
|
|
4
4
|
"description": "A calendar component.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -23,29 +23,29 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-babel-preset": "8.56.2
|
|
27
|
-
"@instructure/ui-color-utils": "8.56.2
|
|
28
|
-
"@instructure/ui-test-locator": "8.56.2
|
|
29
|
-
"@instructure/ui-test-utils": "8.56.2
|
|
30
|
-
"@instructure/ui-themes": "8.56.2
|
|
26
|
+
"@instructure/ui-babel-preset": "8.56.2",
|
|
27
|
+
"@instructure/ui-color-utils": "8.56.2",
|
|
28
|
+
"@instructure/ui-test-locator": "8.56.2",
|
|
29
|
+
"@instructure/ui-test-utils": "8.56.2",
|
|
30
|
+
"@instructure/ui-themes": "8.56.2",
|
|
31
31
|
"@testing-library/jest-dom": "^6.1.4",
|
|
32
32
|
"@testing-library/react": "^14.1.2"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@babel/runtime": "^7.23.2",
|
|
36
|
-
"@instructure/console": "8.56.2
|
|
37
|
-
"@instructure/emotion": "8.56.2
|
|
38
|
-
"@instructure/shared-types": "8.56.2
|
|
39
|
-
"@instructure/ui-a11y-content": "8.56.2
|
|
40
|
-
"@instructure/ui-buttons": "8.56.2
|
|
41
|
-
"@instructure/ui-i18n": "8.56.2
|
|
42
|
-
"@instructure/ui-icons": "8.56.2
|
|
43
|
-
"@instructure/ui-prop-types": "8.56.2
|
|
44
|
-
"@instructure/ui-react-utils": "8.56.2
|
|
45
|
-
"@instructure/ui-testable": "8.56.2
|
|
46
|
-
"@instructure/ui-utils": "8.56.2
|
|
47
|
-
"@instructure/ui-view": "8.56.2
|
|
48
|
-
"@instructure/uid": "8.56.2
|
|
36
|
+
"@instructure/console": "8.56.2",
|
|
37
|
+
"@instructure/emotion": "8.56.2",
|
|
38
|
+
"@instructure/shared-types": "8.56.2",
|
|
39
|
+
"@instructure/ui-a11y-content": "8.56.2",
|
|
40
|
+
"@instructure/ui-buttons": "8.56.2",
|
|
41
|
+
"@instructure/ui-i18n": "8.56.2",
|
|
42
|
+
"@instructure/ui-icons": "8.56.2",
|
|
43
|
+
"@instructure/ui-prop-types": "8.56.2",
|
|
44
|
+
"@instructure/ui-react-utils": "8.56.2",
|
|
45
|
+
"@instructure/ui-testable": "8.56.2",
|
|
46
|
+
"@instructure/ui-utils": "8.56.2",
|
|
47
|
+
"@instructure/ui-view": "8.56.2",
|
|
48
|
+
"@instructure/uid": "8.56.2",
|
|
49
49
|
"prop-types": "^15.8.1"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|