@instructure/ui-drilldown 10.26.1-snapshot-0 → 10.26.1-snapshot-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.
Files changed (54) hide show
  1. package/CHANGELOG.md +28 -2
  2. package/es/Drilldown/DrilldownGroup/index.js +2 -2
  3. package/es/Drilldown/DrilldownGroup/props.js +1 -18
  4. package/es/Drilldown/DrilldownOption/index.js +2 -2
  5. package/es/Drilldown/DrilldownOption/props.js +1 -24
  6. package/es/Drilldown/DrilldownPage/index.js +1 -2
  7. package/es/Drilldown/DrilldownPage/props.js +1 -17
  8. package/es/Drilldown/DrilldownSeparator/index.js +2 -2
  9. package/es/Drilldown/DrilldownSeparator/props.js +1 -6
  10. package/es/Drilldown/index.js +44 -25
  11. package/es/Drilldown/props.js +1 -46
  12. package/lib/Drilldown/DrilldownGroup/index.js +1 -1
  13. package/lib/Drilldown/DrilldownGroup/props.js +1 -19
  14. package/lib/Drilldown/DrilldownOption/index.js +1 -1
  15. package/lib/Drilldown/DrilldownOption/props.js +1 -25
  16. package/lib/Drilldown/DrilldownPage/index.js +0 -1
  17. package/lib/Drilldown/DrilldownPage/props.js +1 -18
  18. package/lib/Drilldown/DrilldownSeparator/index.js +1 -1
  19. package/lib/Drilldown/DrilldownSeparator/props.js +1 -7
  20. package/lib/Drilldown/index.js +43 -24
  21. package/lib/Drilldown/props.js +1 -48
  22. package/package.json +20 -23
  23. package/src/Drilldown/DrilldownGroup/index.tsx +1 -2
  24. package/src/Drilldown/DrilldownGroup/props.ts +1 -23
  25. package/src/Drilldown/DrilldownOption/index.tsx +1 -2
  26. package/src/Drilldown/DrilldownOption/props.ts +1 -28
  27. package/src/Drilldown/DrilldownPage/index.tsx +1 -2
  28. package/src/Drilldown/DrilldownPage/props.ts +2 -30
  29. package/src/Drilldown/DrilldownSeparator/index.tsx +1 -2
  30. package/src/Drilldown/DrilldownSeparator/props.ts +1 -10
  31. package/src/Drilldown/index.tsx +40 -24
  32. package/src/Drilldown/props.ts +1 -52
  33. package/tsconfig.build.json +0 -2
  34. package/tsconfig.build.tsbuildinfo +1 -1
  35. package/types/Drilldown/DrilldownGroup/index.d.ts +0 -18
  36. package/types/Drilldown/DrilldownGroup/index.d.ts.map +1 -1
  37. package/types/Drilldown/DrilldownGroup/props.d.ts +2 -3
  38. package/types/Drilldown/DrilldownGroup/props.d.ts.map +1 -1
  39. package/types/Drilldown/DrilldownOption/index.d.ts +0 -44
  40. package/types/Drilldown/DrilldownOption/index.d.ts.map +1 -1
  41. package/types/Drilldown/DrilldownOption/props.d.ts +2 -3
  42. package/types/Drilldown/DrilldownOption/props.d.ts.map +1 -1
  43. package/types/Drilldown/DrilldownPage/index.d.ts +0 -11
  44. package/types/Drilldown/DrilldownPage/index.d.ts.map +1 -1
  45. package/types/Drilldown/DrilldownPage/props.d.ts +2 -3
  46. package/types/Drilldown/DrilldownPage/props.d.ts.map +1 -1
  47. package/types/Drilldown/DrilldownSeparator/index.d.ts +0 -4
  48. package/types/Drilldown/DrilldownSeparator/index.d.ts.map +1 -1
  49. package/types/Drilldown/DrilldownSeparator/props.d.ts +2 -3
  50. package/types/Drilldown/DrilldownSeparator/props.d.ts.map +1 -1
  51. package/types/Drilldown/index.d.ts +0 -58
  52. package/types/Drilldown/index.d.ts.map +1 -1
  53. package/types/Drilldown/props.d.ts +2 -3
  54. package/types/Drilldown/props.d.ts.map +1 -1
@@ -8,7 +8,6 @@ exports.default = exports.Drilldown = void 0;
8
8
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
9
9
  var _react = require("react");
10
10
  var _console = require("@instructure/console");
11
- var _testable = require("@instructure/ui-testable/lib/testable.js");
12
11
  var _contains = require("@instructure/ui-dom-utils/lib/contains.js");
13
12
  var _containsActiveElement = require("@instructure/ui-dom-utils/lib/containsActiveElement.js");
14
13
  var _callRenderProp = require("@instructure/ui-react-utils/lib/callRenderProp.js");
@@ -36,7 +35,7 @@ var _react2 = require("@emotion/react");
36
35
  const _excluded = ["groupProps"],
37
36
  _excluded2 = ["groupProps"],
38
37
  _excluded3 = ["id", "themeOverride"];
39
- var _dec, _dec2, _dec3, _class, _Drilldown, _IconArrowOpenEndSoli, _IconArrowOpenStartSo, _Options$Separator, _Options$Separator2;
38
+ var _dec, _dec2, _class, _Drilldown, _IconArrowOpenEndSoli, _IconArrowOpenStartSo, _Options$Separator, _Options$Separator2;
40
39
  /*
41
40
  * The MIT License (MIT)
42
41
  *
@@ -72,7 +71,7 @@ var _dec, _dec2, _dec3, _class, _Drilldown, _IconArrowOpenEndSoli, _IconArrowOpe
72
71
  category: components
73
72
  ---
74
73
  **/
75
- let Drilldown = exports.Drilldown = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec3 = (0, _testable.testable)(), _dec(_class = _dec2(_class = _dec3(_class = (_Drilldown = class Drilldown extends _react.Component {
74
+ let Drilldown = exports.Drilldown = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = _dec2(_class = (_Drilldown = class Drilldown extends _react.Component {
76
75
  constructor(props) {
77
76
  super(props);
78
77
  this._drilldownRef = null;
@@ -237,11 +236,15 @@ let Drilldown = exports.Drilldown = (_dec = (0, _withDeterministicId.withDetermi
237
236
  this.handleOptionSelect = (event, {
238
237
  id
239
238
  }) => {
239
+ var _this$currentPage, _selectedOption$group;
240
240
  const selectedOption = this.getPageChildById(id);
241
-
242
- // TODO: this line can be removed when React 16 is no longer supported
243
- event.persist();
244
- if (!id || !selectedOption || selectedOption.props.disabled || event.target.getAttribute('disabled') || event.target.getAttribute('aria-disabled')) {
241
+ if (!id || !selectedOption) {
242
+ event.preventDefault();
243
+ event.stopPropagation();
244
+ return;
245
+ }
246
+ const isOptionDisabled = id !== this._headerBackId && (this.props.disabled || ((_this$currentPage = this.currentPage) === null || _this$currentPage === void 0 ? void 0 : _this$currentPage.disabled) || ((_selectedOption$group = selectedOption.groupProps) === null || _selectedOption$group === void 0 ? void 0 : _selectedOption$group.disabled) || selectedOption.props.disabled);
247
+ if (isOptionDisabled) {
245
248
  event.preventDefault();
246
249
  event.stopPropagation();
247
250
  return;
@@ -280,11 +283,19 @@ let Drilldown = exports.Drilldown = (_dec = (0, _withDeterministicId.withDetermi
280
283
  if (groupProps !== null && groupProps !== void 0 && groupProps.selectableType) {
281
284
  this.handleGroupOptionSelected(event, selectedOption);
282
285
  } else {
286
+ // TODO workaround for react 19 default props
287
+ const optionWithDefaultProps = {
288
+ ...selectedOptionChild,
289
+ props: {
290
+ ...selectedOptionChild.props,
291
+ role: 'menuitem'
292
+ }
293
+ };
283
294
  if (typeof onSelect === 'function') {
284
295
  onSelect(event, {
285
296
  value,
286
297
  isSelected: true,
287
- selectedOption: selectedOptionChild,
298
+ selectedOption: optionWithDefaultProps,
288
299
  drilldown: this
289
300
  });
290
301
  }
@@ -366,8 +377,8 @@ let Drilldown = exports.Drilldown = (_dec = (0, _withDeterministicId.withDetermi
366
377
  }
367
378
  };
368
379
  this.getFirstOption = () => {
369
- var _this$currentPage;
370
- const children = _react.Children.toArray((_this$currentPage = this.currentPage) === null || _this$currentPage === void 0 ? void 0 : _this$currentPage.children);
380
+ var _this$currentPage2;
381
+ const children = _react.Children.toArray((_this$currentPage2 = this.currentPage) === null || _this$currentPage2 === void 0 ? void 0 : _this$currentPage2.children);
371
382
  const child = children[0];
372
383
  if (!child) return void 0;
373
384
 
@@ -490,14 +501,14 @@ let Drilldown = exports.Drilldown = (_dec = (0, _withDeterministicId.withDetermi
490
501
  };
491
502
  }
492
503
  get currentPageAriaLabel() {
493
- var _this$currentPage2;
504
+ var _this$currentPage3;
494
505
  // return, if explicitly set
495
506
  if (this.props['aria-labelledby']) {
496
507
  return this.props['aria-labelledby'];
497
508
  }
498
509
 
499
510
  // if it has title, point to the title label content
500
- if ((_this$currentPage2 = this.currentPage) !== null && _this$currentPage2 !== void 0 && _this$currentPage2.renderTitle) {
511
+ if ((_this$currentPage3 = this.currentPage) !== null && _this$currentPage3 !== void 0 && _this$currentPage3.renderTitle) {
501
512
  return this._headerTitleLabelId;
502
513
  }
503
514
 
@@ -811,22 +822,27 @@ let Drilldown = exports.Drilldown = (_dec = (0, _withDeterministicId.withDetermi
811
822
  });
812
823
  }
813
824
  renderOption(option, getOptionProps, getDisabledOptionProps, groupProps) {
814
- var _this$currentPage3, _optionProps$renderBe, _optionProps$renderBe2, _optionProps$renderAf, _optionProps$renderAf2;
825
+ var _this$currentPage4, _optionProps$renderBe, _optionProps$renderBe2, _optionProps$renderAf, _optionProps$renderAf2;
815
826
  const styles = this.props.styles;
816
827
  let isSelected = false;
817
828
  const _option$props = option.props,
818
829
  id = _option$props.id,
819
830
  children = _option$props.children,
820
831
  href = _option$props.href,
821
- as = _option$props.as,
822
- role = _option$props.role,
832
+ _option$props$as = _option$props.as,
833
+ as = _option$props$as === void 0 ? 'li' : _option$props$as,
834
+ _option$props$role = _option$props.role,
835
+ role = _option$props$role === void 0 ? 'menuitem' : _option$props$role,
823
836
  subPageId = _option$props.subPageId,
824
- disabled = _option$props.disabled,
837
+ _option$props$disable = _option$props.disabled,
838
+ disabled = _option$props$disable === void 0 ? false : _option$props$disable,
825
839
  renderLabelInfo = _option$props.renderLabelInfo,
826
840
  renderBeforeLabel = _option$props.renderBeforeLabel,
827
841
  renderAfterLabel = _option$props.renderAfterLabel,
828
- beforeLabelContentVAlign = _option$props.beforeLabelContentVAlign,
829
- afterLabelContentVAlign = _option$props.afterLabelContentVAlign,
842
+ _option$props$beforeL = _option$props.beforeLabelContentVAlign,
843
+ beforeLabelContentVAlign = _option$props$beforeL === void 0 ? 'start' : _option$props$beforeL,
844
+ _option$props$afterLa = _option$props.afterLabelContentVAlign,
845
+ afterLabelContentVAlign = _option$props$afterLa === void 0 ? 'start' : _option$props$afterLa,
830
846
  description = _option$props.description,
831
847
  descriptionRole = _option$props.descriptionRole,
832
848
  elementRef = _option$props.elementRef,
@@ -871,7 +887,7 @@ let Drilldown = exports.Drilldown = (_dec = (0, _withDeterministicId.withDetermi
871
887
  };
872
888
  const isOptionDisabled = id !== this._headerBackId && (
873
889
  // Back nav is never disabled
874
- this.props.disabled || ((_this$currentPage3 = this.currentPage) === null || _this$currentPage3 === void 0 ? void 0 : _this$currentPage3.disabled) || (groupProps === null || groupProps === void 0 ? void 0 : groupProps.disabled) || disabled);
890
+ this.props.disabled || ((_this$currentPage4 = this.currentPage) === null || _this$currentPage4 === void 0 ? void 0 : _this$currentPage4.disabled) || (groupProps === null || groupProps === void 0 ? void 0 : groupProps.disabled) || disabled);
875
891
 
876
892
  // display option as disabled
877
893
  if (isOptionDisabled) {
@@ -1011,7 +1027,8 @@ let Drilldown = exports.Drilldown = (_dec = (0, _withDeterministicId.withDetermi
1011
1027
  children = _group$props.children,
1012
1028
  renderGroupTitle = _group$props.renderGroupTitle,
1013
1029
  themeOverride = _group$props.themeOverride,
1014
- role = _group$props.role,
1030
+ _group$props$role = _group$props.role,
1031
+ role = _group$props$role === void 0 ? 'group' : _group$props$role,
1015
1032
  as = _group$props.as,
1016
1033
  elementRef = _group$props.elementRef;
1017
1034
  if (!children) {
@@ -1021,7 +1038,7 @@ let Drilldown = exports.Drilldown = (_dec = (0, _withDeterministicId.withDetermi
1021
1038
 
1022
1039
  // add a separator above
1023
1040
  if (needsFirstSeparator) {
1024
- groupChildren.push(_Options$Separator || (_Options$Separator = (0, _jsxRuntime.jsx)(_Options.Options.Separator, {})));
1041
+ groupChildren.push(_Options$Separator || (_Options$Separator = (0, _jsxRuntime.jsx)(_Options.Options.Separator, {}, "drilldown-options-separator")));
1025
1042
  }
1026
1043
 
1027
1044
  // create a sublist as a group
@@ -1048,7 +1065,7 @@ let Drilldown = exports.Drilldown = (_dec = (0, _withDeterministicId.withDetermi
1048
1065
 
1049
1066
  // add a separator below
1050
1067
  if (needsLastSeparator) {
1051
- groupChildren.push(_Options$Separator2 || (_Options$Separator2 = (0, _jsxRuntime.jsx)(_Options.Options.Separator, {})));
1068
+ groupChildren.push(_Options$Separator2 || (_Options$Separator2 = (0, _jsxRuntime.jsx)(_Options.Options.Separator, {}, "drilldown-options-separator-2")));
1052
1069
  }
1053
1070
  return groupChildren;
1054
1071
  }
@@ -1108,6 +1125,7 @@ let Drilldown = exports.Drilldown = (_dec = (0, _withDeterministicId.withDetermi
1108
1125
  borderWidth: 'small'
1109
1126
  }),
1110
1127
  as: "div",
1128
+ "data-cid": "Drilldown",
1111
1129
  elementRef: this.handleDrilldownRef,
1112
1130
  tabIndex: 0,
1113
1131
  css: styles === null || styles === void 0 ? void 0 : styles.drilldown,
@@ -1195,6 +1213,7 @@ let Drilldown = exports.Drilldown = (_dec = (0, _withDeterministicId.withDetermi
1195
1213
  styles = _this$props7.styles;
1196
1214
  const borderColor = styles === null || styles === void 0 ? void 0 : (_styles$drilldown = styles.drilldown) === null || _styles$drilldown === void 0 ? void 0 : _styles$drilldown.borderColor;
1197
1215
  return trigger ? (0, _jsxRuntime.jsx)(_Popover.Popover, {
1216
+ "data-cid": "Drilldown",
1198
1217
  themeOverride: {
1199
1218
  // use here own theme's color
1200
1219
  borderColor: borderColor
@@ -1259,7 +1278,7 @@ let Drilldown = exports.Drilldown = (_dec = (0, _withDeterministicId.withDetermi
1259
1278
  children: this.renderPage()
1260
1279
  }) : this.renderPage();
1261
1280
  }
1262
- }, _Drilldown.displayName = "Drilldown", _Drilldown.componentId = 'Drilldown', _Drilldown.propTypes = _props.propTypes, _Drilldown.allowedProps = _props.allowedProps, _Drilldown.defaultProps = {
1281
+ }, _Drilldown.displayName = "Drilldown", _Drilldown.componentId = 'Drilldown', _Drilldown.allowedProps = _props.allowedProps, _Drilldown.defaultProps = {
1263
1282
  disabled: false,
1264
1283
  rotateFocus: true,
1265
1284
  as: 'ul',
@@ -1275,5 +1294,5 @@ let Drilldown = exports.Drilldown = (_dec = (0, _withDeterministicId.withDetermi
1275
1294
  offsetX: 0,
1276
1295
  offsetY: 0,
1277
1296
  shouldSetAriaExpanded: true
1278
- }, _Drilldown.Group = _DrilldownGroup.DrilldownGroup, _Drilldown.Option = _DrilldownOption.DrilldownOption, _Drilldown.Page = _DrilldownPage.DrilldownPage, _Drilldown.Separator = _DrilldownSeparator.DrilldownSeparator, _Drilldown)) || _class) || _class) || _class);
1297
+ }, _Drilldown.Group = _DrilldownGroup.DrilldownGroup, _Drilldown.Option = _DrilldownOption.DrilldownOption, _Drilldown.Page = _DrilldownPage.DrilldownPage, _Drilldown.Separator = _DrilldownSeparator.DrilldownSeparator, _Drilldown)) || _class) || _class);
1279
1298
  var _default = exports.default = Drilldown;
@@ -1,15 +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 _controllable = require("@instructure/ui-prop-types/lib/controllable.js");
11
- var _PositionPropTypes = require("@instructure/ui-position/lib/PositionPropTypes.js");
12
- var _DrilldownPage = require("./DrilldownPage");
6
+ exports.allowedProps = void 0;
13
7
  /*
14
8
  * The MIT License (MIT)
15
9
  *
@@ -34,47 +28,6 @@ var _DrilldownPage = require("./DrilldownPage");
34
28
  * SOFTWARE.
35
29
  */
36
30
 
37
- const propTypes = exports.propTypes = {
38
- rootPageId: _propTypes.default.string.isRequired,
39
- children: _Children.Children.oneOf([_DrilldownPage.DrilldownPage]),
40
- id: _propTypes.default.string,
41
- label: _propTypes.default.string,
42
- disabled: _propTypes.default.bool,
43
- rotateFocus: _propTypes.default.bool,
44
- as: _propTypes.default.elementType,
45
- role: _propTypes.default.string,
46
- elementRef: _propTypes.default.func,
47
- drilldownRef: _propTypes.default.func,
48
- overflowX: _propTypes.default.oneOf(['auto', 'hidden', 'visible']),
49
- overflowY: _propTypes.default.oneOf(['auto', 'hidden', 'visible']),
50
- height: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
51
- width: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
52
- minHeight: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
53
- minWidth: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
54
- maxHeight: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
55
- maxWidth: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
56
- trigger: _propTypes.default.node,
57
- placement: _PositionPropTypes.PositionPropTypes.placement,
58
- defaultShow: _propTypes.default.bool,
59
- show: (0, _controllable.controllable)(_propTypes.default.bool, 'onToggle', 'defaultShow'),
60
- onToggle: _propTypes.default.func,
61
- onSelect: _propTypes.default.func,
62
- onDismiss: _propTypes.default.func,
63
- onFocus: _propTypes.default.func,
64
- onMouseOver: _propTypes.default.func,
65
- popoverRef: _propTypes.default.func,
66
- mountNode: _PositionPropTypes.PositionPropTypes.mountNode,
67
- positionTarget: _PositionPropTypes.PositionPropTypes.mountNode,
68
- positionContainerDisplay: _propTypes.default.oneOf(['inline-block', 'block']),
69
- constrain: _PositionPropTypes.PositionPropTypes.constrain,
70
- shouldHideOnSelect: _propTypes.default.bool,
71
- shouldContainFocus: _propTypes.default.bool,
72
- shouldReturnFocus: _propTypes.default.bool,
73
- withArrow: _propTypes.default.bool,
74
- offsetX: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
75
- offsetY: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
76
- shouldSetAriaExpanded: _propTypes.default.bool
77
- };
78
31
  const allowedProps = exports.allowedProps = ['rootPageId', 'children', 'id', 'label', 'disabled', 'rotateFocus', 'as', 'role', 'overflowX', 'overflowY', 'height', 'width', 'minHeight', 'minWidth', 'maxHeight', 'maxWidth',
79
32
  // Popover version props
80
33
  'trigger', 'placement', 'defaultShow', 'show', 'onToggle', 'onSelect', 'onDismiss', 'onFocus', 'onMouseOver', 'elementRef', 'drilldownRef', 'popoverRef', 'mountNode', 'positionTarget', 'positionContainerDisplay', 'constrain', 'shouldHideOnSelect', 'shouldContainFocus', 'shouldReturnFocus', 'withArrow', 'offsetX', 'offsetY'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-drilldown",
3
- "version": "10.26.1-snapshot-0",
3
+ "version": "10.26.1-snapshot-2",
4
4
  "description": "A drilldown menu component",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -24,35 +24,32 @@
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.27.6",
27
- "@instructure/console": "10.26.1-snapshot-0",
28
- "@instructure/emotion": "10.26.1-snapshot-0",
29
- "@instructure/shared-types": "10.26.1-snapshot-0",
30
- "@instructure/ui-dom-utils": "10.26.1-snapshot-0",
31
- "@instructure/ui-icons": "10.26.1-snapshot-0",
32
- "@instructure/ui-options": "10.26.1-snapshot-0",
33
- "@instructure/ui-popover": "10.26.1-snapshot-0",
34
- "@instructure/ui-position": "10.26.1-snapshot-0",
35
- "@instructure/ui-prop-types": "10.26.1-snapshot-0",
36
- "@instructure/ui-react-utils": "10.26.1-snapshot-0",
37
- "@instructure/ui-selectable": "10.26.1-snapshot-0",
38
- "@instructure/ui-testable": "10.26.1-snapshot-0",
39
- "@instructure/ui-utils": "10.26.1-snapshot-0",
40
- "@instructure/ui-view": "10.26.1-snapshot-0",
41
- "prop-types": "^15.8.1"
27
+ "@instructure/console": "10.26.1-snapshot-2",
28
+ "@instructure/emotion": "10.26.1-snapshot-2",
29
+ "@instructure/shared-types": "10.26.1-snapshot-2",
30
+ "@instructure/ui-dom-utils": "10.26.1-snapshot-2",
31
+ "@instructure/ui-icons": "10.26.1-snapshot-2",
32
+ "@instructure/ui-options": "10.26.1-snapshot-2",
33
+ "@instructure/ui-popover": "10.26.1-snapshot-2",
34
+ "@instructure/ui-position": "10.26.1-snapshot-2",
35
+ "@instructure/ui-react-utils": "10.26.1-snapshot-2",
36
+ "@instructure/ui-selectable": "10.26.1-snapshot-2",
37
+ "@instructure/ui-utils": "10.26.1-snapshot-2",
38
+ "@instructure/ui-view": "10.26.1-snapshot-2"
42
39
  },
43
40
  "devDependencies": {
44
- "@instructure/ui-axe-check": "10.26.1-snapshot-0",
45
- "@instructure/ui-babel-preset": "10.26.1-snapshot-0",
46
- "@instructure/ui-color-utils": "10.26.1-snapshot-0",
47
- "@instructure/ui-scripts": "10.26.1-snapshot-0",
48
- "@instructure/ui-themes": "10.26.1-snapshot-0",
41
+ "@instructure/ui-axe-check": "10.26.1-snapshot-2",
42
+ "@instructure/ui-babel-preset": "10.26.1-snapshot-2",
43
+ "@instructure/ui-color-utils": "10.26.1-snapshot-2",
44
+ "@instructure/ui-scripts": "10.26.1-snapshot-2",
45
+ "@instructure/ui-themes": "10.26.1-snapshot-2",
49
46
  "@testing-library/jest-dom": "^6.6.3",
50
- "@testing-library/react": "^16.0.1",
47
+ "@testing-library/react": "15.0.7",
51
48
  "@testing-library/user-event": "^14.6.1",
52
49
  "vitest": "^3.2.2"
53
50
  },
54
51
  "peerDependencies": {
55
- "react": ">=16.14 <=18"
52
+ "react": ">=18 <=19"
56
53
  },
57
54
  "publishConfig": {
58
55
  "access": "public"
@@ -27,7 +27,7 @@ import { Component } from 'react'
27
27
  import { withStyle } from '@instructure/emotion'
28
28
  import { optionsThemeGenerator } from '@instructure/ui-options'
29
29
 
30
- import { propTypes, allowedProps } from './props'
30
+ import { allowedProps } from './props'
31
31
  import type { DrilldownGroupProps } from './props'
32
32
  import { isMac, isFirefox } from '@instructure/ui-utils'
33
33
 
@@ -44,7 +44,6 @@ id: Drilldown.Group
44
44
  class DrilldownGroup extends Component<DrilldownGroupProps> {
45
45
  static readonly componentId = 'Drilldown.Group'
46
46
 
47
- static propTypes = propTypes
48
47
  static allowedProps = allowedProps
49
48
  static defaultProps = {
50
49
  disabled: false,
@@ -23,16 +23,9 @@
23
23
  */
24
24
 
25
25
  import React from 'react'
26
- import PropTypes from 'prop-types'
27
-
28
- import { Children } from '@instructure/ui-prop-types'
29
-
30
- import DrilldownOption from '../DrilldownOption'
31
- import DrilldownSeparator from '../DrilldownSeparator'
32
26
 
33
27
  import type {
34
28
  OtherHTMLAttributes,
35
- PropValidators,
36
29
  OptionsTheme,
37
30
  AsElementType
38
31
  } from '@instructure/shared-types'
@@ -116,21 +109,6 @@ type AllowedPropKeys = Readonly<Array<PropKeys>>
116
109
  type DrilldownGroupProps = DrilldownGroupOwnProps &
117
110
  WithStyleProps<OptionsTheme, null> &
118
111
  OtherHTMLAttributes<DrilldownGroupOwnProps>
119
-
120
- const propTypes: PropValidators<PropKeys> = {
121
- id: PropTypes.string.isRequired,
122
- children: Children.oneOf([DrilldownOption, DrilldownSeparator]),
123
- renderGroupTitle: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
124
- withoutSeparators: PropTypes.bool,
125
- disabled: PropTypes.bool,
126
- role: PropTypes.string,
127
- as: PropTypes.elementType,
128
- elementRef: PropTypes.func,
129
- selectableType: PropTypes.oneOf(['single', 'multiple']),
130
- defaultSelected: PropTypes.array,
131
- onSelect: PropTypes.func
132
- }
133
-
134
112
  const allowedProps: AllowedPropKeys = [
135
113
  'id',
136
114
  'children',
@@ -146,4 +124,4 @@ const allowedProps: AllowedPropKeys = [
146
124
  ]
147
125
 
148
126
  export type { DrilldownGroupProps, GroupChildren }
149
- export { propTypes, allowedProps }
127
+ export { allowedProps }
@@ -27,7 +27,7 @@ import { Component } from 'react'
27
27
  import { withStyle } from '@instructure/emotion'
28
28
  import { optionsItemThemeGenerator } from '@instructure/ui-options'
29
29
 
30
- import { propTypes, allowedProps } from './props'
30
+ import { allowedProps } from './props'
31
31
  import type { DrilldownOptionProps } from './props'
32
32
 
33
33
  /**
@@ -43,7 +43,6 @@ id: Drilldown.Option
43
43
  class DrilldownOption extends Component<DrilldownOptionProps> {
44
44
  static readonly componentId = 'Drilldown.Option'
45
45
 
46
- static propTypes = propTypes
47
46
  static allowedProps = allowedProps
48
47
 
49
48
  static defaultProps = {
@@ -23,11 +23,8 @@
23
23
  */
24
24
 
25
25
  import React from 'react'
26
- import PropTypes from 'prop-types'
27
-
28
26
  import type {
29
27
  OtherHTMLAttributes,
30
- PropValidators,
31
28
  OptionsItemTheme,
32
29
  AsElementType
33
30
  } from '@instructure/shared-types'
@@ -187,30 +184,6 @@ type AllowedPropKeys = Readonly<Array<PropKeys>>
187
184
  type DrilldownOptionProps = DrilldownOptionOwnProps &
188
185
  WithStyleProps<OptionsItemTheme, null> &
189
186
  OtherHTMLAttributes<DrilldownOptionOwnProps>
190
-
191
- const propTypes: PropValidators<PropKeys> = {
192
- id: PropTypes.string.isRequired,
193
- children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
194
- subPageId: PropTypes.string,
195
- disabled: PropTypes.bool,
196
- selected: PropTypes.bool,
197
- value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
198
- href: PropTypes.string,
199
- as: PropTypes.elementType,
200
- role: PropTypes.string,
201
- renderLabelInfo: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
202
- renderBeforeLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
203
- renderAfterLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
204
- beforeLabelContentVAlign: PropTypes.oneOf(['start', 'center', 'end']),
205
- afterLabelContentVAlign: PropTypes.oneOf(['start', 'center', 'end']),
206
- description: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
207
- descriptionRole: PropTypes.string,
208
- onOptionClick: PropTypes.func,
209
- defaultSelected: PropTypes.bool,
210
- elementRef: PropTypes.func,
211
- shouldCloseOnClick: PropTypes.oneOf(['auto', 'always', 'never'])
212
- }
213
-
214
187
  const allowedProps: AllowedPropKeys = [
215
188
  'id',
216
189
  'children',
@@ -235,4 +208,4 @@ const allowedProps: AllowedPropKeys = [
235
208
  ]
236
209
 
237
210
  export type { DrilldownOptionProps, DrilldownOptionValue }
238
- export { propTypes, allowedProps }
211
+ export { allowedProps }
@@ -24,7 +24,7 @@
24
24
 
25
25
  import { Component } from 'react'
26
26
 
27
- import { propTypes, allowedProps } from './props'
27
+ import { allowedProps } from './props'
28
28
  import type { DrilldownPageProps } from './props'
29
29
 
30
30
  /**
@@ -37,7 +37,6 @@ id: Drilldown.Page
37
37
  class DrilldownPage extends Component<DrilldownPageProps> {
38
38
  static readonly componentId = 'Drilldown.Page'
39
39
 
40
- static propTypes = propTypes
41
40
  static allowedProps = allowedProps
42
41
  static defaultProps = {
43
42
  renderBackButtonLabel: 'Back',
@@ -23,18 +23,7 @@
23
23
  */
24
24
 
25
25
  import React from 'react'
26
- import PropTypes from 'prop-types'
27
-
28
- import { Children } from '@instructure/ui-prop-types'
29
-
30
- import type {
31
- OtherHTMLAttributes,
32
- PropValidators
33
- } from '@instructure/shared-types'
34
-
35
- import DrilldownGroup from '../DrilldownGroup'
36
- import DrilldownOption from '../DrilldownOption'
37
- import DrilldownSeparator from '../DrilldownSeparator'
26
+ import type { OtherHTMLAttributes } from '@instructure/shared-types'
38
27
 
39
28
  import type { OptionChild, SeparatorChild, GroupChild } from '../props'
40
29
  import { Renderable } from '@instructure/shared-types'
@@ -97,23 +86,6 @@ type AllowedPropKeys = Readonly<Array<PropKeys>>
97
86
 
98
87
  type DrilldownPageProps = DrilldownPageOwnProps &
99
88
  OtherHTMLAttributes<DrilldownPageOwnProps>
100
-
101
- const propTypes: PropValidators<PropKeys> = {
102
- id: PropTypes.string.isRequired,
103
- children: Children.oneOf([
104
- DrilldownOption,
105
- DrilldownSeparator,
106
- DrilldownGroup
107
- ]),
108
- renderTitle: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
109
- renderActionLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
110
- renderBackButtonLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
111
- onHeaderActionClicked: PropTypes.func,
112
- onBackButtonClicked: PropTypes.func,
113
- withoutHeaderSeparator: PropTypes.bool,
114
- disabled: PropTypes.bool
115
- }
116
-
117
89
  const allowedProps: AllowedPropKeys = [
118
90
  'id',
119
91
  'children',
@@ -127,4 +99,4 @@ const allowedProps: AllowedPropKeys = [
127
99
  ]
128
100
 
129
101
  export type { DrilldownPageProps, PageChildren }
130
- export { propTypes, allowedProps }
102
+ export { allowedProps }
@@ -27,7 +27,7 @@ import { Component } from 'react'
27
27
  import { withStyle } from '@instructure/emotion'
28
28
  import { optionsSeparatorThemeGenerator } from '@instructure/ui-options'
29
29
 
30
- import { propTypes, allowedProps } from './props'
30
+ import { allowedProps } from './props'
31
31
  import type { DrilldownSeparatorProps } from './props'
32
32
 
33
33
  /**
@@ -43,7 +43,6 @@ id: Drilldown.Separator
43
43
  class DrilldownSeparator extends Component<DrilldownSeparatorProps> {
44
44
  static readonly componentId = 'Drilldown.Separator'
45
45
 
46
- static propTypes = propTypes
47
46
  static allowedProps = allowedProps
48
47
  static defaultProps = {}
49
48
 
@@ -22,12 +22,9 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import PropTypes from 'prop-types'
26
-
27
25
  import type {
28
26
  OtherHTMLAttributes,
29
27
  PickPropsWithExceptions,
30
- PropValidators,
31
28
  AsElementType,
32
29
  OptionsSeparatorTheme
33
30
  } from '@instructure/shared-types'
@@ -53,13 +50,7 @@ type DrilldownSeparatorProps =
53
50
  DrilldownSeparatorOwnProps &
54
51
  WithStyleProps<OptionsSeparatorTheme, null> &
55
52
  OtherHTMLAttributes<DrilldownSeparatorOwnProps>
56
-
57
- const propTypes: PropValidators<PropKeys> = {
58
- id: PropTypes.string.isRequired,
59
- as: PropTypes.elementType
60
- }
61
-
62
53
  const allowedProps: AllowedPropKeys = ['id', 'as']
63
54
 
64
55
  export type { DrilldownSeparatorProps }
65
- export { propTypes, allowedProps }
56
+ export { allowedProps }