@instructure/ui-drilldown 10.24.1-snapshot-5 → 10.24.1-snapshot-7

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,9 +3,12 @@
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.24.1-snapshot-5](https://github.com/instructure/instructure-ui/compare/v10.24.0...v10.24.1-snapshot-5) (2025-07-30)
6
+ ## [10.24.1-snapshot-7](https://github.com/instructure/instructure-ui/compare/v10.24.0...v10.24.1-snapshot-7) (2025-07-30)
7
7
 
8
- **Note:** Version bump only for package @instructure/ui-drilldown
8
+
9
+ ### Bug Fixes
10
+
11
+ * **ui-view,ui-position,ui-popover:** fix 'stretch' placement in Popover/ContextView ([f65acd5](https://github.com/instructure/instructure-ui/commit/f65acd5da879fb814c2e5a0d22319a502851fff3))
9
12
 
10
13
 
11
14
 
@@ -1053,7 +1053,8 @@ let Drilldown = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
1053
1053
  maxWidth = _this$props6.maxWidth,
1054
1054
  role = _this$props6.role,
1055
1055
  as = _this$props6.as,
1056
- label = _this$props6.label;
1056
+ label = _this$props6.label,
1057
+ trigger = _this$props6.trigger;
1057
1058
  if (!this.currentPage) {
1058
1059
  return null;
1059
1060
  }
@@ -1087,8 +1088,13 @@ let Drilldown = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
1087
1088
  getListProps,
1088
1089
  getOptionProps,
1089
1090
  getDisabledOptionProps
1090
- }) => _jsx(View, {
1091
- borderWidth: "small",
1091
+ }) => _jsx(View
1092
+ // if there is a trigger the border needs to be rendered by the <Popover>
1093
+ // (because it has an arrow)
1094
+ , {
1095
+ ...(trigger ? {} : {
1096
+ borderWidth: 'small'
1097
+ }),
1092
1098
  as: "div",
1093
1099
  elementRef: this.handleDrilldownRef,
1094
1100
  tabIndex: 0,
@@ -1151,6 +1157,7 @@ let Drilldown = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
1151
1157
  });
1152
1158
  }
1153
1159
  render() {
1160
+ var _styles$drilldown;
1154
1161
  // clear temporary option store
1155
1162
  this._activeOptionsMap = {};
1156
1163
  const _this$props7 = this.props,
@@ -1172,8 +1179,14 @@ let Drilldown = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
1172
1179
  onMouseOver = _this$props7.onMouseOver,
1173
1180
  offsetX = _this$props7.offsetX,
1174
1181
  offsetY = _this$props7.offsetY,
1175
- shouldSetAriaExpanded = _this$props7.shouldSetAriaExpanded;
1182
+ shouldSetAriaExpanded = _this$props7.shouldSetAriaExpanded,
1183
+ styles = _this$props7.styles;
1184
+ const borderColor = styles === null || styles === void 0 ? void 0 : (_styles$drilldown = styles.drilldown) === null || _styles$drilldown === void 0 ? void 0 : _styles$drilldown.borderColor;
1176
1185
  return trigger ? _jsx(Popover, {
1186
+ themeOverride: {
1187
+ // use here own theme's color
1188
+ borderColor: borderColor
1189
+ },
1177
1190
  shouldSetAriaExpanded: shouldSetAriaExpanded,
1178
1191
  isShowingContent: show,
1179
1192
  defaultIsShowingContent: defaultShow,
@@ -1062,7 +1062,8 @@ let Drilldown = exports.Drilldown = (_dec = (0, _withDeterministicId.withDetermi
1062
1062
  maxWidth = _this$props6.maxWidth,
1063
1063
  role = _this$props6.role,
1064
1064
  as = _this$props6.as,
1065
- label = _this$props6.label;
1065
+ label = _this$props6.label,
1066
+ trigger = _this$props6.trigger;
1066
1067
  if (!this.currentPage) {
1067
1068
  return null;
1068
1069
  }
@@ -1096,8 +1097,13 @@ let Drilldown = exports.Drilldown = (_dec = (0, _withDeterministicId.withDetermi
1096
1097
  getListProps,
1097
1098
  getOptionProps,
1098
1099
  getDisabledOptionProps
1099
- }) => (0, _jsxRuntime.jsx)(_View.View, {
1100
- borderWidth: "small",
1100
+ }) => (0, _jsxRuntime.jsx)(_View.View
1101
+ // if there is a trigger the border needs to be rendered by the <Popover>
1102
+ // (because it has an arrow)
1103
+ , {
1104
+ ...(trigger ? {} : {
1105
+ borderWidth: 'small'
1106
+ }),
1101
1107
  as: "div",
1102
1108
  elementRef: this.handleDrilldownRef,
1103
1109
  tabIndex: 0,
@@ -1160,6 +1166,7 @@ let Drilldown = exports.Drilldown = (_dec = (0, _withDeterministicId.withDetermi
1160
1166
  });
1161
1167
  }
1162
1168
  render() {
1169
+ var _styles$drilldown;
1163
1170
  // clear temporary option store
1164
1171
  this._activeOptionsMap = {};
1165
1172
  const _this$props7 = this.props,
@@ -1181,8 +1188,14 @@ let Drilldown = exports.Drilldown = (_dec = (0, _withDeterministicId.withDetermi
1181
1188
  onMouseOver = _this$props7.onMouseOver,
1182
1189
  offsetX = _this$props7.offsetX,
1183
1190
  offsetY = _this$props7.offsetY,
1184
- shouldSetAriaExpanded = _this$props7.shouldSetAriaExpanded;
1191
+ shouldSetAriaExpanded = _this$props7.shouldSetAriaExpanded,
1192
+ styles = _this$props7.styles;
1193
+ const borderColor = styles === null || styles === void 0 ? void 0 : (_styles$drilldown = styles.drilldown) === null || _styles$drilldown === void 0 ? void 0 : _styles$drilldown.borderColor;
1185
1194
  return trigger ? (0, _jsxRuntime.jsx)(_Popover.Popover, {
1195
+ themeOverride: {
1196
+ // use here own theme's color
1197
+ borderColor: borderColor
1198
+ },
1186
1199
  shouldSetAriaExpanded: shouldSetAriaExpanded,
1187
1200
  isShowingContent: show,
1188
1201
  defaultIsShowingContent: defaultShow,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-drilldown",
3
- "version": "10.24.1-snapshot-5",
3
+ "version": "10.24.1-snapshot-7",
4
4
  "description": "A drilldown menu component",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -24,28 +24,28 @@
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.27.6",
27
- "@instructure/console": "10.24.1-snapshot-5",
28
- "@instructure/emotion": "10.24.1-snapshot-5",
29
- "@instructure/shared-types": "10.24.1-snapshot-5",
30
- "@instructure/ui-dom-utils": "10.24.1-snapshot-5",
31
- "@instructure/ui-icons": "10.24.1-snapshot-5",
32
- "@instructure/ui-options": "10.24.1-snapshot-5",
33
- "@instructure/ui-popover": "10.24.1-snapshot-5",
34
- "@instructure/ui-position": "10.24.1-snapshot-5",
35
- "@instructure/ui-prop-types": "10.24.1-snapshot-5",
36
- "@instructure/ui-react-utils": "10.24.1-snapshot-5",
37
- "@instructure/ui-selectable": "10.24.1-snapshot-5",
38
- "@instructure/ui-testable": "10.24.1-snapshot-5",
39
- "@instructure/ui-utils": "10.24.1-snapshot-5",
40
- "@instructure/ui-view": "10.24.1-snapshot-5",
27
+ "@instructure/console": "10.24.1-snapshot-7",
28
+ "@instructure/emotion": "10.24.1-snapshot-7",
29
+ "@instructure/shared-types": "10.24.1-snapshot-7",
30
+ "@instructure/ui-dom-utils": "10.24.1-snapshot-7",
31
+ "@instructure/ui-icons": "10.24.1-snapshot-7",
32
+ "@instructure/ui-options": "10.24.1-snapshot-7",
33
+ "@instructure/ui-popover": "10.24.1-snapshot-7",
34
+ "@instructure/ui-position": "10.24.1-snapshot-7",
35
+ "@instructure/ui-prop-types": "10.24.1-snapshot-7",
36
+ "@instructure/ui-react-utils": "10.24.1-snapshot-7",
37
+ "@instructure/ui-selectable": "10.24.1-snapshot-7",
38
+ "@instructure/ui-testable": "10.24.1-snapshot-7",
39
+ "@instructure/ui-utils": "10.24.1-snapshot-7",
40
+ "@instructure/ui-view": "10.24.1-snapshot-7",
41
41
  "prop-types": "^15.8.1"
42
42
  },
43
43
  "devDependencies": {
44
- "@instructure/ui-axe-check": "10.24.1-snapshot-5",
45
- "@instructure/ui-babel-preset": "10.24.1-snapshot-5",
46
- "@instructure/ui-color-utils": "10.24.1-snapshot-5",
47
- "@instructure/ui-scripts": "10.24.1-snapshot-5",
48
- "@instructure/ui-themes": "10.24.1-snapshot-5",
44
+ "@instructure/ui-axe-check": "10.24.1-snapshot-7",
45
+ "@instructure/ui-babel-preset": "10.24.1-snapshot-7",
46
+ "@instructure/ui-color-utils": "10.24.1-snapshot-7",
47
+ "@instructure/ui-scripts": "10.24.1-snapshot-7",
48
+ "@instructure/ui-themes": "10.24.1-snapshot-7",
49
49
  "@testing-library/jest-dom": "^6.6.3",
50
50
  "@testing-library/react": "^16.0.1",
51
51
  "@testing-library/user-event": "^14.6.1",
@@ -1367,7 +1367,8 @@ class Drilldown extends Component<DrilldownProps, DrilldownState> {
1367
1367
  maxWidth,
1368
1368
  role,
1369
1369
  as,
1370
- label
1370
+ label,
1371
+ trigger
1371
1372
  } = this.props
1372
1373
 
1373
1374
  if (!this.currentPage) {
@@ -1405,7 +1406,9 @@ class Drilldown extends Component<DrilldownProps, DrilldownState> {
1405
1406
  getDisabledOptionProps
1406
1407
  }) => (
1407
1408
  <View
1408
- borderWidth="small"
1409
+ // if there is a trigger the border needs to be rendered by the <Popover>
1410
+ // (because it has an arrow)
1411
+ {...(trigger ? {} : { borderWidth: 'small' })}
1409
1412
  as="div"
1410
1413
  elementRef={this.handleDrilldownRef}
1411
1414
  tabIndex={0}
@@ -1496,11 +1499,17 @@ class Drilldown extends Component<DrilldownProps, DrilldownState> {
1496
1499
  onMouseOver,
1497
1500
  offsetX,
1498
1501
  offsetY,
1499
- shouldSetAriaExpanded
1502
+ shouldSetAriaExpanded,
1503
+ styles
1500
1504
  } = this.props
1501
-
1505
+ const borderColor = (styles?.drilldown as { borderColor: string })
1506
+ ?.borderColor
1502
1507
  return trigger ? (
1503
1508
  <Popover
1509
+ themeOverride={{
1510
+ // use here own theme's color
1511
+ borderColor: borderColor
1512
+ }}
1504
1513
  shouldSetAriaExpanded={shouldSetAriaExpanded}
1505
1514
  isShowingContent={show}
1506
1515
  defaultIsShowingContent={defaultShow}
@@ -136,7 +136,13 @@ type DrilldownOwnProps = {
136
136
  trigger?: React.ReactNode
137
137
 
138
138
  /**
139
- * If a trigger is supplied, where should the `<Drilldown />` be placed (relative to the trigger)
139
+ * If a trigger is supplied, where should the `<Drilldown />` be placed
140
+ * (relative to the trigger)
141
+ *
142
+ * `stretch` will stretch the `Drilldown` to the same size as its `trigger`
143
+ * (provided that the `trigger` is at least as large as the `Drilldown`).
144
+ * In this case you should not set `width`/`maxHeight`, it will be set
145
+ * automatically.
140
146
  */
141
147
  placement?: PlacementPropValues
142
148
 
@@ -51,7 +51,6 @@ const generateStyle = (
51
51
  label: 'drilldown',
52
52
  overflow: 'visible', // needed for focus ring!
53
53
  borderColor: componentTheme.borderColor,
54
-
55
54
  ...(hasHighlightedOption && {
56
55
  '&:focus::before': {
57
56
  display: 'none'