@instructure/ui-calendar 10.26.1 → 11.0.1-snapshot-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/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
- ## [10.26.1](https://github.com/instructure/instructure-ui/compare/v10.26.0...v10.26.1) (2025-10-06)
6
+ ## [11.0.1-snapshot-0](https://github.com/instructure/instructure-ui/compare/v11.0.0...v11.0.1-snapshot-0) (2025-10-07)
7
7
 
8
8
  **Note:** Version bump only for package @instructure/ui-calendar
9
9
 
@@ -11,6 +11,35 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
11
 
12
12
 
13
13
 
14
+ # [11.0.0](https://github.com/instructure/instructure-ui/compare/v10.26.0...v11.0.0) (2025-10-06)
15
+
16
+
17
+ ### Features
18
+
19
+ * **many:** instUI v11 release ([36f5438](https://github.com/instructure/instructure-ui/commit/36f54382669186227ba24798bbf7201ef2f5cd4c))
20
+
21
+
22
+ ### BREAKING CHANGES
23
+
24
+ * **many:** InstUI v11 contains the following breaking changes:
25
+ - React 16 and 17 are no longer supported
26
+ - remove `PropTypes` from all packages
27
+ - remove `CodeEditor` component
28
+ - remove `@instui/theme-registry` package
29
+ - remove `@testable`, `@experimental`, `@hack` decorators
30
+ - InstUISettingsProvider's `as` prop is removed
31
+ - `canvas.use()`, `canvasHighContrast.use()` functions are removed
32
+ - `canvasThemeLocal`, `canvasHighContrastThemeLocal` are removed
33
+ - `variables` field on theme objects are removed
34
+ - remove deprecated props from Table: Row's `isStacked`, Body's
35
+ `isStacked`, `hover`, and `headers`
36
+ - `Table`'s `caption` prop is now required
37
+ - `ui-dom-utils`'s `getComputedStyle` can now return `undefined`
38
+
39
+
40
+
41
+
42
+
14
43
  # [10.26.0](https://github.com/instructure/instructure-ui/compare/v10.25.0...v10.26.0) (2025-10-01)
15
44
 
16
45
  **Note:** Version bump only for package @instructure/ui-calendar
@@ -1,6 +1,6 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
2
  const _excluded = ["children", "label", "interaction", "isOutsideMonth", "isSelected", "isToday", "onClick", "onKeyDown", "as", "styles"];
3
- var _dec, _dec2, _class, _Day;
3
+ var _dec, _class, _Day;
4
4
  /*
5
5
  * The MIT License (MIT)
6
6
  *
@@ -29,11 +29,10 @@ import { Component } from 'react';
29
29
  import { View } from '@instructure/ui-view';
30
30
  import { AccessibleContent } from '@instructure/ui-a11y-content';
31
31
  import { omitProps, callRenderProp, getElementType } from '@instructure/ui-react-utils';
32
- import { testable } from '@instructure/ui-testable';
33
32
  import { withStyle } from '@instructure/emotion';
34
33
  import generateStyle from './styles';
35
34
  import generateComponentTheme from './theme';
36
- import { propTypes, allowedProps } from './props';
35
+ import { allowedProps } from './props';
37
36
  import { jsx as _jsx } from "@emotion/react/jsx-runtime";
38
37
  /**
39
38
  ---
@@ -41,7 +40,7 @@ parent: Calendar
41
40
  id: Calendar.Day
42
41
  ---
43
42
  **/
44
- let Day = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_Day = class Day extends Component {
43
+ let Day = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_Day = class Day extends Component {
45
44
  constructor(...args) {
46
45
  super(...args);
47
46
  this.ref = null;
@@ -130,6 +129,7 @@ let Day = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = test
130
129
  onClick: onClick && this.handleClick,
131
130
  onKeyDown: onKeyDown && this.handleKeyDown,
132
131
  elementRef: this.handleElementRef,
132
+ "data-cid": "Calendar.Day",
133
133
  children: _jsx("span", {
134
134
  css: styles === null || styles === void 0 ? void 0 : styles.day,
135
135
  children: _jsx(AccessibleContent, {
@@ -139,11 +139,11 @@ let Day = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = test
139
139
  })
140
140
  });
141
141
  }
142
- }, _Day.displayName = "Day", _Day.componentId = 'Calendar.Day', _Day.propTypes = propTypes, _Day.allowedProps = allowedProps, _Day.defaultProps = {
142
+ }, _Day.displayName = "Day", _Day.componentId = 'Calendar.Day', _Day.allowedProps = allowedProps, _Day.defaultProps = {
143
143
  interaction: 'enabled',
144
144
  isSelected: false,
145
145
  isToday: false,
146
146
  isOutsideMonth: false
147
- }, _Day)) || _class) || _class);
147
+ }, _Day)) || _class);
148
148
  export default Day;
149
149
  export { Day };
@@ -22,20 +22,5 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import PropTypes from 'prop-types';
26
- import { I18nPropTypes } from '@instructure/ui-i18n';
27
- const propTypes = {
28
- children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
29
- date: I18nPropTypes.iso8601.isRequired,
30
- label: PropTypes.string.isRequired,
31
- interaction: PropTypes.oneOf(['enabled', 'disabled']),
32
- isSelected: PropTypes.bool,
33
- isToday: PropTypes.bool,
34
- isOutsideMonth: PropTypes.bool,
35
- onClick: PropTypes.func,
36
- onKeyDown: PropTypes.func,
37
- elementRef: PropTypes.func,
38
- as: PropTypes.elementType
39
- };
40
25
  const allowedProps = ['children', 'date', 'label', 'interaction', 'isSelected', 'isToday', 'isOutsideMonth', 'onClick', 'onKeyDown', 'elementRef', 'as'];
41
- export { propTypes, allowedProps };
26
+ export { allowedProps };
@@ -1,4 +1,4 @@
1
- var _dec, _dec2, _dec3, _class, _Calendar, _IconButton, _IconButton2;
1
+ var _dec, _dec2, _class, _Calendar, _IconButton, _IconButton2;
2
2
  /*
3
3
  * The MIT License (MIT)
4
4
  *
@@ -29,13 +29,12 @@ import { safeCloneElement, callRenderProp, omitProps, withDeterministicId } from
29
29
  import { createChainedFunction } from '@instructure/ui-utils';
30
30
  import { logError as error } from '@instructure/console';
31
31
  import { AccessibleContent } from '@instructure/ui-a11y-content';
32
- import { testable } from '@instructure/ui-testable';
33
32
  import { withStyle } from '@instructure/emotion';
34
33
  import { Locale, DateTime, ApplyLocaleContext } from '@instructure/ui-i18n';
35
34
  import generateStyle from './styles';
36
35
  import generateComponentTheme from './theme';
37
36
  import { Day } from './Day';
38
- import { propTypes, allowedProps } from './props';
37
+ import { allowedProps } from './props';
39
38
  import { IconButton } from '@instructure/ui-buttons';
40
39
  import { IconArrowOpenStartSolid, IconArrowOpenEndSolid } from '@instructure/ui-icons';
41
40
  import { SimpleSelect } from '@instructure/ui-simple-select';
@@ -46,7 +45,7 @@ category: components
46
45
  ---
47
46
  **/
48
47
  import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
49
- let Calendar = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec3 = testable(), _dec(_class = _dec2(_class = _dec3(_class = (_Calendar = class Calendar extends Component {
48
+ let Calendar = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec(_class = _dec2(_class = (_Calendar = class Calendar extends Component {
50
49
  constructor(props) {
51
50
  super(props);
52
51
  this.ref = null;
@@ -397,12 +396,13 @@ let Calendar = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, g
397
396
  padding: "small",
398
397
  background: "primary",
399
398
  elementRef: this.handleRef,
399
+ "data-cid": "Calendar",
400
400
  children: [this.renderHeader(), this.renderBody()]
401
401
  });
402
402
  }
403
- }, _Calendar.displayName = "Calendar", _Calendar.componentId = 'Calendar', _Calendar.contextType = ApplyLocaleContext, _Calendar.Day = Day, _Calendar.DAY_COUNT = 42, _Calendar.propTypes = propTypes, _Calendar.allowedProps = allowedProps, _Calendar.defaultProps = {
403
+ }, _Calendar.displayName = "Calendar", _Calendar.componentId = 'Calendar', _Calendar.contextType = ApplyLocaleContext, _Calendar.Day = Day, _Calendar.DAY_COUNT = 42, _Calendar.allowedProps = allowedProps, _Calendar.defaultProps = {
404
404
  as: 'span',
405
405
  role: 'table'
406
- }, _Calendar)) || _class) || _class) || _class);
406
+ }, _Calendar)) || _class) || _class);
407
407
  export default Calendar;
408
408
  export { Calendar };
@@ -22,27 +22,5 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import PropTypes from 'prop-types';
26
- import { Children as ChildrenPropTypes } from '@instructure/ui-prop-types';
27
- import { Day } from './Day';
28
- const propTypes = {
29
- as: PropTypes.elementType,
30
- children: ChildrenPropTypes.oneOf([Day]),
31
- currentDate: PropTypes.string,
32
- disabledDates: PropTypes.oneOfType([PropTypes.array, PropTypes.func]),
33
- locale: PropTypes.string,
34
- onDateSelected: PropTypes.func,
35
- onRequestRenderNextMonth: PropTypes.func,
36
- onRequestRenderPrevMonth: PropTypes.func,
37
- renderNavigationLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
38
- renderNextMonthButton: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
39
- renderPrevMonthButton: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
40
- renderWeekdayLabels: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.node, PropTypes.func])),
41
- role: PropTypes.oneOf(['table', 'listbox']),
42
- selectedDate: PropTypes.string,
43
- timezone: PropTypes.string,
44
- visibleMonth: PropTypes.string,
45
- withYearPicker: PropTypes.object
46
- };
47
25
  const allowedProps = ['as', 'children', 'currentDate', 'disabledDates', 'locale', 'onDateSelected', 'onRequestRenderNextMonth', 'onRequestRenderPrevMonth', 'renderNavigationLabel', 'renderNextMonthButton', 'renderPrevMonthButton', 'renderWeekdayLabels', 'role', 'selectedDate', 'timezone', 'visibleMonth'];
48
- export { propTypes, allowedProps };
26
+ export { allowedProps };
@@ -12,14 +12,13 @@ var _AccessibleContent = require("@instructure/ui-a11y-content/lib/AccessibleCon
12
12
  var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
13
13
  var _callRenderProp = require("@instructure/ui-react-utils/lib/callRenderProp.js");
14
14
  var _getElementType = require("@instructure/ui-react-utils/lib/getElementType.js");
15
- var _testable = require("@instructure/ui-testable/lib/testable.js");
16
15
  var _emotion = require("@instructure/emotion");
17
16
  var _styles = _interopRequireDefault(require("./styles"));
18
17
  var _theme = _interopRequireDefault(require("./theme"));
19
18
  var _props = require("./props");
20
19
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
21
20
  const _excluded = ["children", "label", "interaction", "isOutsideMonth", "isSelected", "isToday", "onClick", "onKeyDown", "as", "styles"];
22
- var _dec, _dec2, _class, _Day;
21
+ var _dec, _class, _Day;
23
22
  /*
24
23
  * The MIT License (MIT)
25
24
  *
@@ -49,7 +48,7 @@ parent: Calendar
49
48
  id: Calendar.Day
50
49
  ---
51
50
  **/
52
- let Day = exports.Day = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_Day = class Day extends _react.Component {
51
+ let Day = exports.Day = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_Day = class Day extends _react.Component {
53
52
  constructor(...args) {
54
53
  super(...args);
55
54
  this.ref = null;
@@ -138,6 +137,7 @@ let Day = exports.Day = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.
138
137
  onClick: onClick && this.handleClick,
139
138
  onKeyDown: onKeyDown && this.handleKeyDown,
140
139
  elementRef: this.handleElementRef,
140
+ "data-cid": "Calendar.Day",
141
141
  children: (0, _jsxRuntime.jsx)("span", {
142
142
  css: styles === null || styles === void 0 ? void 0 : styles.day,
143
143
  children: (0, _jsxRuntime.jsx)(_AccessibleContent.AccessibleContent, {
@@ -147,10 +147,10 @@ let Day = exports.Day = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.
147
147
  })
148
148
  });
149
149
  }
150
- }, _Day.displayName = "Day", _Day.componentId = 'Calendar.Day', _Day.propTypes = _props.propTypes, _Day.allowedProps = _props.allowedProps, _Day.defaultProps = {
150
+ }, _Day.displayName = "Day", _Day.componentId = 'Calendar.Day', _Day.allowedProps = _props.allowedProps, _Day.defaultProps = {
151
151
  interaction: 'enabled',
152
152
  isSelected: false,
153
153
  isToday: false,
154
154
  isOutsideMonth: false
155
- }, _Day)) || _class) || _class);
155
+ }, _Day)) || _class);
156
156
  var _default = exports.default = Day;
@@ -1,12 +1,9 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
- exports.propTypes = exports.allowedProps = void 0;
8
- var _propTypes = _interopRequireDefault(require("prop-types"));
9
- var _I18nPropTypes = require("@instructure/ui-i18n/lib/I18nPropTypes.js");
6
+ exports.allowedProps = void 0;
10
7
  /*
11
8
  * The MIT License (MIT)
12
9
  *
@@ -31,17 +28,4 @@ var _I18nPropTypes = require("@instructure/ui-i18n/lib/I18nPropTypes.js");
31
28
  * SOFTWARE.
32
29
  */
33
30
 
34
- const propTypes = exports.propTypes = {
35
- children: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]),
36
- date: _I18nPropTypes.I18nPropTypes.iso8601.isRequired,
37
- label: _propTypes.default.string.isRequired,
38
- interaction: _propTypes.default.oneOf(['enabled', 'disabled']),
39
- isSelected: _propTypes.default.bool,
40
- isToday: _propTypes.default.bool,
41
- isOutsideMonth: _propTypes.default.bool,
42
- onClick: _propTypes.default.func,
43
- onKeyDown: _propTypes.default.func,
44
- elementRef: _propTypes.default.func,
45
- as: _propTypes.default.elementType
46
- };
47
31
  const allowedProps = exports.allowedProps = ['children', 'date', 'label', 'interaction', 'isSelected', 'isToday', 'isOutsideMonth', 'onClick', 'onKeyDown', 'elementRef', 'as'];
@@ -14,7 +14,6 @@ var _withDeterministicId = require("@instructure/ui-react-utils/lib/Deterministi
14
14
  var _createChainedFunction = require("@instructure/ui-utils/lib/createChainedFunction.js");
15
15
  var _console = require("@instructure/console");
16
16
  var _AccessibleContent = require("@instructure/ui-a11y-content/lib/AccessibleContent");
17
- var _testable = require("@instructure/ui-testable/lib/testable.js");
18
17
  var _emotion = require("@instructure/emotion");
19
18
  var _Locale = require("@instructure/ui-i18n/lib/Locale.js");
20
19
  var _DateTime = require("@instructure/ui-i18n/lib/DateTime.js");
@@ -28,7 +27,7 @@ var _IconArrowOpenStartSolid = require("@instructure/ui-icons/lib/IconArrowOpenS
28
27
  var _IconArrowOpenEndSolid = require("@instructure/ui-icons/lib/IconArrowOpenEndSolid.js");
29
28
  var _SimpleSelect = require("@instructure/ui-simple-select/lib/SimpleSelect");
30
29
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
31
- var _dec, _dec2, _dec3, _class, _Calendar, _IconButton, _IconButton2;
30
+ var _dec, _dec2, _class, _Calendar, _IconButton, _IconButton2;
32
31
  /*
33
32
  * The MIT License (MIT)
34
33
  *
@@ -57,7 +56,7 @@ var _dec, _dec2, _dec3, _class, _Calendar, _IconButton, _IconButton2;
57
56
  category: components
58
57
  ---
59
58
  **/
60
- let Calendar = exports.Calendar = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec3 = (0, _testable.testable)(), _dec(_class = _dec2(_class = _dec3(_class = (_Calendar = class Calendar extends _react.Component {
59
+ let Calendar = exports.Calendar = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = _dec2(_class = (_Calendar = class Calendar extends _react.Component {
61
60
  constructor(props) {
62
61
  super(props);
63
62
  this.ref = null;
@@ -408,11 +407,12 @@ let Calendar = exports.Calendar = (_dec = (0, _withDeterministicId.withDetermini
408
407
  padding: "small",
409
408
  background: "primary",
410
409
  elementRef: this.handleRef,
410
+ "data-cid": "Calendar",
411
411
  children: [this.renderHeader(), this.renderBody()]
412
412
  });
413
413
  }
414
- }, _Calendar.displayName = "Calendar", _Calendar.componentId = 'Calendar', _Calendar.contextType = _ApplyLocaleContext.ApplyLocaleContext, _Calendar.Day = _Day.Day, _Calendar.DAY_COUNT = 42, _Calendar.propTypes = _props.propTypes, _Calendar.allowedProps = _props.allowedProps, _Calendar.defaultProps = {
414
+ }, _Calendar.displayName = "Calendar", _Calendar.componentId = 'Calendar', _Calendar.contextType = _ApplyLocaleContext.ApplyLocaleContext, _Calendar.Day = _Day.Day, _Calendar.DAY_COUNT = 42, _Calendar.allowedProps = _props.allowedProps, _Calendar.defaultProps = {
415
415
  as: 'span',
416
416
  role: 'table'
417
- }, _Calendar)) || _class) || _class) || _class);
417
+ }, _Calendar)) || _class) || _class);
418
418
  var _default = exports.default = Calendar;
@@ -1,13 +1,9 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
- exports.propTypes = exports.allowedProps = void 0;
8
- var _propTypes = _interopRequireDefault(require("prop-types"));
9
- var _Children = require("@instructure/ui-prop-types/lib/Children.js");
10
- var _Day = require("./Day");
6
+ exports.allowedProps = void 0;
11
7
  /*
12
8
  * The MIT License (MIT)
13
9
  *
@@ -32,23 +28,4 @@ var _Day = require("./Day");
32
28
  * SOFTWARE.
33
29
  */
34
30
 
35
- const propTypes = exports.propTypes = {
36
- as: _propTypes.default.elementType,
37
- children: _Children.Children.oneOf([_Day.Day]),
38
- currentDate: _propTypes.default.string,
39
- disabledDates: _propTypes.default.oneOfType([_propTypes.default.array, _propTypes.default.func]),
40
- locale: _propTypes.default.string,
41
- onDateSelected: _propTypes.default.func,
42
- onRequestRenderNextMonth: _propTypes.default.func,
43
- onRequestRenderPrevMonth: _propTypes.default.func,
44
- renderNavigationLabel: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]),
45
- renderNextMonthButton: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]),
46
- renderPrevMonthButton: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]),
47
- renderWeekdayLabels: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func])),
48
- role: _propTypes.default.oneOf(['table', 'listbox']),
49
- selectedDate: _propTypes.default.string,
50
- timezone: _propTypes.default.string,
51
- visibleMonth: _propTypes.default.string,
52
- withYearPicker: _propTypes.default.object
53
- };
54
31
  const allowedProps = exports.allowedProps = ['as', 'children', 'currentDate', 'disabledDates', 'locale', 'onDateSelected', 'onRequestRenderNextMonth', 'onRequestRenderPrevMonth', 'renderNavigationLabel', 'renderNextMonthButton', 'renderPrevMonthButton', 'renderWeekdayLabels', 'role', 'selectedDate', 'timezone', 'visibleMonth'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-calendar",
3
- "version": "10.26.1",
3
+ "version": "11.0.1-snapshot-0",
4
4
  "description": "A calendar component.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -23,34 +23,31 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@instructure/ui-babel-preset": "10.26.1",
27
- "@instructure/ui-color-utils": "10.26.1",
28
- "@instructure/ui-themes": "10.26.1",
26
+ "@instructure/ui-babel-preset": "11.0.1-snapshot-0",
27
+ "@instructure/ui-color-utils": "11.0.1-snapshot-0",
28
+ "@instructure/ui-themes": "11.0.1-snapshot-0",
29
29
  "@testing-library/jest-dom": "^6.6.3",
30
- "@testing-library/react": "^16.0.1",
30
+ "@testing-library/react": "15.0.7",
31
31
  "@testing-library/user-event": "^14.6.1",
32
32
  "vitest": "^3.2.2"
33
33
  },
34
34
  "dependencies": {
35
35
  "@babel/runtime": "^7.27.6",
36
- "@instructure/console": "10.26.1",
37
- "@instructure/emotion": "10.26.1",
38
- "@instructure/shared-types": "10.26.1",
39
- "@instructure/ui-a11y-content": "10.26.1",
40
- "@instructure/ui-buttons": "10.26.1",
41
- "@instructure/ui-i18n": "10.26.1",
42
- "@instructure/ui-icons": "10.26.1",
43
- "@instructure/ui-prop-types": "10.26.1",
44
- "@instructure/ui-react-utils": "10.26.1",
45
- "@instructure/ui-simple-select": "10.26.1",
46
- "@instructure/ui-testable": "10.26.1",
47
- "@instructure/ui-utils": "10.26.1",
48
- "@instructure/ui-view": "10.26.1",
49
- "@instructure/uid": "10.26.1",
50
- "prop-types": "^15.8.1"
36
+ "@instructure/console": "11.0.1-snapshot-0",
37
+ "@instructure/emotion": "11.0.1-snapshot-0",
38
+ "@instructure/shared-types": "11.0.1-snapshot-0",
39
+ "@instructure/ui-a11y-content": "11.0.1-snapshot-0",
40
+ "@instructure/ui-buttons": "11.0.1-snapshot-0",
41
+ "@instructure/ui-i18n": "11.0.1-snapshot-0",
42
+ "@instructure/ui-icons": "11.0.1-snapshot-0",
43
+ "@instructure/ui-react-utils": "11.0.1-snapshot-0",
44
+ "@instructure/ui-simple-select": "11.0.1-snapshot-0",
45
+ "@instructure/ui-utils": "11.0.1-snapshot-0",
46
+ "@instructure/ui-view": "11.0.1-snapshot-0",
47
+ "@instructure/uid": "11.0.1-snapshot-0"
51
48
  },
52
49
  "peerDependencies": {
53
- "react": ">=16.14 <=18"
50
+ "react": ">=18 <=19"
54
51
  },
55
52
  "publishConfig": {
56
53
  "access": "public"
@@ -33,14 +33,12 @@ import {
33
33
  getElementType
34
34
  } from '@instructure/ui-react-utils'
35
35
 
36
- import { testable } from '@instructure/ui-testable'
37
-
38
36
  import { withStyle } from '@instructure/emotion'
39
37
 
40
38
  import generateStyle from './styles'
41
39
  import generateComponentTheme from './theme'
42
40
 
43
- import { propTypes, allowedProps } from './props'
41
+ import { allowedProps } from './props'
44
42
  import type { CalendarDayProps, CalendarDayStyleProps } from './props'
45
43
 
46
44
  /**
@@ -50,11 +48,9 @@ id: Calendar.Day
50
48
  ---
51
49
  **/
52
50
  @withStyle(generateStyle, generateComponentTheme)
53
- @testable()
54
51
  class Day extends Component<CalendarDayProps> {
55
52
  static readonly componentId = 'Calendar.Day'
56
53
 
57
- static propTypes = propTypes
58
54
  static allowedProps = allowedProps
59
55
  static defaultProps = {
60
56
  interaction: 'enabled',
@@ -165,6 +161,7 @@ class Day extends Component<CalendarDayProps> {
165
161
  onClick={onClick && this.handleClick}
166
162
  onKeyDown={onKeyDown && this.handleKeyDown}
167
163
  elementRef={this.handleElementRef}
164
+ data-cid="Calendar.Day"
168
165
  >
169
166
  <span css={styles?.day}>
170
167
  <AccessibleContent alt={label}>
@@ -22,12 +22,8 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import PropTypes from 'prop-types'
26
- import { I18nPropTypes } from '@instructure/ui-i18n'
27
-
28
25
  import type {
29
26
  AsElementType,
30
- PropValidators,
31
27
  CalendarDayTheme,
32
28
  OtherHTMLAttributes
33
29
  } from '@instructure/shared-types'
@@ -112,21 +108,6 @@ type CalendarDayProps = CalendarDayOwnProps &
112
108
  OtherHTMLAttributes<CalendarDayOwnProps>
113
109
 
114
110
  type CalendarDayStyle = ComponentStyle<'calendarDay' | 'day'>
115
-
116
- const propTypes: PropValidators<PropKeys> = {
117
- children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
118
- date: I18nPropTypes.iso8601.isRequired,
119
- label: PropTypes.string.isRequired,
120
- interaction: PropTypes.oneOf(['enabled', 'disabled']),
121
- isSelected: PropTypes.bool,
122
- isToday: PropTypes.bool,
123
- isOutsideMonth: PropTypes.bool,
124
- onClick: PropTypes.func,
125
- onKeyDown: PropTypes.func,
126
- elementRef: PropTypes.func,
127
- as: PropTypes.elementType
128
- }
129
-
130
111
  const allowedProps: AllowedPropKeys = [
131
112
  'children',
132
113
  'date',
@@ -142,4 +123,4 @@ const allowedProps: AllowedPropKeys = [
142
123
  ]
143
124
 
144
125
  export type { CalendarDayProps, CalendarDayStyleProps, CalendarDayStyle }
145
- export { propTypes, allowedProps }
126
+ export { allowedProps }
@@ -35,8 +35,6 @@ import { createChainedFunction } from '@instructure/ui-utils'
35
35
  import { logError as error } from '@instructure/console'
36
36
  import { AccessibleContent } from '@instructure/ui-a11y-content'
37
37
 
38
- import { testable } from '@instructure/ui-testable'
39
-
40
38
  import { withStyle } from '@instructure/emotion'
41
39
 
42
40
  import { Locale, DateTime, ApplyLocaleContext } from '@instructure/ui-i18n'
@@ -47,7 +45,7 @@ import generateComponentTheme from './theme'
47
45
 
48
46
  import { Day } from './Day'
49
47
 
50
- import { propTypes, allowedProps } from './props'
48
+ import { allowedProps } from './props'
51
49
  import type { CalendarProps, CalendarState } from './props'
52
50
  import { Renderable } from '@instructure/shared-types'
53
51
 
@@ -66,7 +64,6 @@ category: components
66
64
  **/
67
65
  @withDeterministicId()
68
66
  @withStyle(generateStyle, generateComponentTheme)
69
- @testable()
70
67
  class Calendar extends Component<CalendarProps, CalendarState> {
71
68
  static readonly componentId = 'Calendar'
72
69
 
@@ -75,7 +72,6 @@ class Calendar extends Component<CalendarProps, CalendarState> {
75
72
  static Day = Day
76
73
  static DAY_COUNT = 42 // 6 weeks visible
77
74
 
78
- static propTypes = propTypes
79
75
  static allowedProps = allowedProps
80
76
  static defaultProps = {
81
77
  as: 'span',
@@ -264,7 +260,7 @@ class Calendar extends Component<CalendarProps, CalendarState> {
264
260
  const { prevButton, nextButton } = this.renderMonthNavigationButtons()
265
261
 
266
262
  const cloneButton = (
267
- button: ReactElement,
263
+ button: ReactElement<any>,
268
264
  onClick?: (e: React.MouseEvent) => void
269
265
  ) =>
270
266
  safeCloneElement(button, {
@@ -428,7 +424,7 @@ class Calendar extends Component<CalendarProps, CalendarState> {
428
424
  )
429
425
 
430
426
  return childrenArr
431
- .reduce((days: ReactElement[][], day, i) => {
427
+ .reduce((days: ReactElement<any>[][], day, i) => {
432
428
  const index = Math.floor(i / 7)
433
429
  if (!days[index]) days.push([])
434
430
  days[index].push(day)
@@ -552,6 +548,7 @@ class Calendar extends Component<CalendarProps, CalendarState> {
552
548
  padding="small"
553
549
  background="primary"
554
550
  elementRef={this.handleRef}
551
+ data-cid="Calendar"
555
552
  >
556
553
  {this.renderHeader()}
557
554
  {this.renderBody()}
@@ -22,14 +22,8 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import PropTypes from 'prop-types'
26
-
27
- import { Children as ChildrenPropTypes } from '@instructure/ui-prop-types'
28
- import { Day } from './Day'
29
-
30
25
  import type {
31
26
  AsElementType,
32
- PropValidators,
33
27
  CalendarTheme,
34
28
  OtherHTMLAttributes
35
29
  } from '@instructure/shared-types'
@@ -185,29 +179,6 @@ type CalendarProps = CalendarOwnProps &
185
179
  type CalendarStyle = ComponentStyle<
186
180
  'navigation' | 'navigationWithButtons' | 'weekdayHeader' | 'yearPicker'
187
181
  >
188
-
189
- const propTypes: PropValidators<PropKeys> = {
190
- as: PropTypes.elementType,
191
- children: ChildrenPropTypes.oneOf([Day]),
192
- currentDate: PropTypes.string,
193
- disabledDates: PropTypes.oneOfType([PropTypes.array, PropTypes.func]),
194
- locale: PropTypes.string,
195
- onDateSelected: PropTypes.func,
196
- onRequestRenderNextMonth: PropTypes.func,
197
- onRequestRenderPrevMonth: PropTypes.func,
198
- renderNavigationLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
199
- renderNextMonthButton: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
200
- renderPrevMonthButton: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
201
- renderWeekdayLabels: PropTypes.arrayOf(
202
- PropTypes.oneOfType([PropTypes.node, PropTypes.func])
203
- ),
204
- role: PropTypes.oneOf(['table', 'listbox']),
205
- selectedDate: PropTypes.string,
206
- timezone: PropTypes.string,
207
- visibleMonth: PropTypes.string,
208
- withYearPicker: PropTypes.object
209
- }
210
-
211
182
  const allowedProps: AllowedPropKeys = [
212
183
  'as',
213
184
  'children',
@@ -233,4 +204,4 @@ type CalendarState = {
233
204
  }
234
205
 
235
206
  export type { CalendarProps, CalendarStyle, CalendarState }
236
- export { propTypes, allowedProps }
207
+ export { allowedProps }
@@ -15,9 +15,7 @@
15
15
  { "path": "../shared-types/tsconfig.build.json" },
16
16
  { "path": "../ui-a11y-content/tsconfig.build.json" },
17
17
  { "path": "../ui-i18n/tsconfig.build.json" },
18
- { "path": "../ui-prop-types/tsconfig.build.json" },
19
18
  { "path": "../ui-react-utils/tsconfig.build.json" },
20
- { "path": "../ui-testable/tsconfig.build.json" },
21
19
  { "path": "../ui-utils/tsconfig.build.json" },
22
20
  { "path": "../ui-view/tsconfig.build.json" },
23
21
  { "path": "../uid/tsconfig.build.json" },