@instructure/ui-drilldown 8.27.0 → 8.27.1-snapshot-13
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 +12 -0
- package/es/Drilldown/__examples__/Drilldown.examples.js +14 -0
- package/es/Drilldown/index.js +7 -0
- package/es/Drilldown/props.js +5 -2
- package/lib/Drilldown/__examples__/Drilldown.examples.js +14 -0
- package/lib/Drilldown/index.js +7 -0
- package/lib/Drilldown/props.js +5 -2
- package/package.json +20 -20
- package/src/Drilldown/__examples__/Drilldown.examples.tsx +13 -0
- package/src/Drilldown/index.tsx +7 -0
- package/src/Drilldown/props.ts +16 -1
- package/src/index.ts +15 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Drilldown/__examples__/Drilldown.examples.d.ts.map +1 -1
- package/types/Drilldown/index.d.ts +6 -0
- package/types/Drilldown/index.d.ts.map +1 -1
- package/types/Drilldown/props.d.ts +7 -1
- package/types/Drilldown/props.d.ts.map +1 -1
- package/types/index.d.ts +5 -1
- package/types/index.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
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.27.1-snapshot-13](https://github.com/instructure/instructure-ui/compare/v8.27.0...v8.27.1-snapshot-13) (2022-08-17)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **ui-drilldown:** add `minHeight` and `minWidth` props to Drilldown ([7e10b29](https://github.com/instructure/instructure-ui/commit/7e10b2966f4dfb79dfdecca62f12c3f9ba5b62b4))
|
|
12
|
+
* **ui-drilldown:** add `positionContainerDisplay` prop to Drilldown ([834302c](https://github.com/instructure/instructure-ui/commit/834302c1510c96bde8436307465fa480957719bc))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
6
18
|
# [8.27.0](https://github.com/instructure/instructure-ui/compare/v8.26.3...v8.27.0) (2022-07-25)
|
|
7
19
|
|
|
8
20
|
### Features
|
|
@@ -163,6 +163,19 @@ export default {
|
|
|
163
163
|
defaultShow: true,
|
|
164
164
|
width: '20rem',
|
|
165
165
|
height: '20rem'
|
|
166
|
+
}, {
|
|
167
|
+
text: 'with display="block" container',
|
|
168
|
+
trigger: /*#__PURE__*/React.createElement("button", {
|
|
169
|
+
key: 1,
|
|
170
|
+
style: {
|
|
171
|
+
margin: '30px auto',
|
|
172
|
+
width: '100%'
|
|
173
|
+
}
|
|
174
|
+
}, "a drilldown trigger"),
|
|
175
|
+
defaultShow: false,
|
|
176
|
+
width: '20rem',
|
|
177
|
+
height: '20rem',
|
|
178
|
+
positionContainerDisplay: 'block'
|
|
166
179
|
}]
|
|
167
180
|
},
|
|
168
181
|
|
|
@@ -191,6 +204,7 @@ export default {
|
|
|
191
204
|
height: props.customProps.height,
|
|
192
205
|
disabled: props.customProps.disabled,
|
|
193
206
|
trigger: props.customProps.trigger,
|
|
207
|
+
positionContainerDisplay: props.customProps.positionContainerDisplay,
|
|
194
208
|
...(props.customProps.trigger ? {
|
|
195
209
|
defaultShow: props.customProps.defaultShow,
|
|
196
210
|
withArrow: props.customProps.withArrow,
|
package/es/Drilldown/index.js
CHANGED
|
@@ -1057,6 +1057,8 @@ let Drilldown = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
|
|
|
1057
1057
|
overflowX = _this$props5.overflowX,
|
|
1058
1058
|
height = _this$props5.height,
|
|
1059
1059
|
width = _this$props5.width,
|
|
1060
|
+
minHeight = _this$props5.minHeight,
|
|
1061
|
+
minWidth = _this$props5.minWidth,
|
|
1060
1062
|
maxHeight = _this$props5.maxHeight,
|
|
1061
1063
|
maxWidth = _this$props5.maxWidth,
|
|
1062
1064
|
role = _this$props5.role,
|
|
@@ -1100,6 +1102,7 @@ let Drilldown = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
|
|
|
1100
1102
|
position: "relative",
|
|
1101
1103
|
borderRadius: "small",
|
|
1102
1104
|
width: width,
|
|
1105
|
+
minWidth: maxWidth,
|
|
1103
1106
|
maxWidth: maxWidth,
|
|
1104
1107
|
role: role,
|
|
1105
1108
|
"aria-label": label,
|
|
@@ -1133,6 +1136,8 @@ let Drilldown = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
|
|
|
1133
1136
|
overflowX: overflowX,
|
|
1134
1137
|
height: height,
|
|
1135
1138
|
width: width,
|
|
1139
|
+
minHeight: minHeight,
|
|
1140
|
+
minWidth: minWidth,
|
|
1136
1141
|
maxHeight: maxHeight,
|
|
1137
1142
|
maxWidth: maxWidth,
|
|
1138
1143
|
css: styles === null || styles === void 0 ? void 0 : styles.container,
|
|
@@ -1162,6 +1167,7 @@ let Drilldown = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
|
|
|
1162
1167
|
mountNode = _this$props6.mountNode,
|
|
1163
1168
|
constrain = _this$props6.constrain,
|
|
1164
1169
|
positionTarget = _this$props6.positionTarget,
|
|
1170
|
+
positionContainerDisplay = _this$props6.positionContainerDisplay,
|
|
1165
1171
|
popoverRef = _this$props6.popoverRef,
|
|
1166
1172
|
disabled = _this$props6.disabled,
|
|
1167
1173
|
onDismiss = _this$props6.onDismiss,
|
|
@@ -1188,6 +1194,7 @@ let Drilldown = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
|
|
|
1188
1194
|
placement: placement,
|
|
1189
1195
|
withArrow: withArrow,
|
|
1190
1196
|
positionTarget: positionTarget,
|
|
1197
|
+
positionContainerDisplay: positionContainerDisplay,
|
|
1191
1198
|
constrain: constrain,
|
|
1192
1199
|
shouldContainFocus: shouldContainFocus,
|
|
1193
1200
|
shouldReturnFocus: shouldReturnFocus,
|
package/es/Drilldown/props.js
CHANGED
|
@@ -40,6 +40,8 @@ const propTypes = {
|
|
|
40
40
|
overflowY: PropTypes.oneOf(['auto', 'hidden', 'visible']),
|
|
41
41
|
height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
42
42
|
width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
43
|
+
minHeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
44
|
+
minWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
43
45
|
maxHeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
44
46
|
maxWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
45
47
|
trigger: PropTypes.node,
|
|
@@ -54,6 +56,7 @@ const propTypes = {
|
|
|
54
56
|
popoverRef: PropTypes.func,
|
|
55
57
|
mountNode: PositionPropTypes.mountNode,
|
|
56
58
|
positionTarget: PositionPropTypes.mountNode,
|
|
59
|
+
positionContainerDisplay: PropTypes.oneOf(['inline-block', 'block']),
|
|
57
60
|
constrain: PositionPropTypes.constrain,
|
|
58
61
|
shouldHideOnSelect: PropTypes.bool,
|
|
59
62
|
shouldContainFocus: PropTypes.bool,
|
|
@@ -62,6 +65,6 @@ const propTypes = {
|
|
|
62
65
|
offsetX: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
63
66
|
offsetY: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
64
67
|
};
|
|
65
|
-
const allowedProps = ['rootPageId', 'children', 'id', 'label', 'disabled', 'rotateFocus', 'as', 'role', 'overflowX', 'overflowY', 'height', 'width', 'maxHeight', 'maxWidth', // Popover version props
|
|
66
|
-
'trigger', 'placement', 'defaultShow', 'show', 'onToggle', 'onSelect', 'onDismiss', 'onFocus', 'onMouseOver', 'elementRef', 'drilldownRef', 'popoverRef', 'mountNode', 'positionTarget', 'constrain', 'shouldHideOnSelect', 'shouldContainFocus', 'shouldReturnFocus', 'withArrow', 'offsetX', 'offsetY'];
|
|
68
|
+
const allowedProps = ['rootPageId', 'children', 'id', 'label', 'disabled', 'rotateFocus', 'as', 'role', 'overflowX', 'overflowY', 'height', 'width', 'minHeight', 'minWidth', 'maxHeight', 'maxWidth', // Popover version props
|
|
69
|
+
'trigger', 'placement', 'defaultShow', 'show', 'onToggle', 'onSelect', 'onDismiss', 'onFocus', 'onMouseOver', 'elementRef', 'drilldownRef', 'popoverRef', 'mountNode', 'positionTarget', 'positionContainerDisplay', 'constrain', 'shouldHideOnSelect', 'shouldContainFocus', 'shouldReturnFocus', 'withArrow', 'offsetX', 'offsetY'];
|
|
67
70
|
export { propTypes, allowedProps };
|
|
@@ -152,6 +152,19 @@ var _default = {
|
|
|
152
152
|
defaultShow: true,
|
|
153
153
|
width: '20rem',
|
|
154
154
|
height: '20rem'
|
|
155
|
+
}, {
|
|
156
|
+
text: 'with display="block" container',
|
|
157
|
+
trigger: /*#__PURE__*/_react.default.createElement("button", {
|
|
158
|
+
key: 1,
|
|
159
|
+
style: {
|
|
160
|
+
margin: '30px auto',
|
|
161
|
+
width: '100%'
|
|
162
|
+
}
|
|
163
|
+
}, "a drilldown trigger"),
|
|
164
|
+
defaultShow: false,
|
|
165
|
+
width: '20rem',
|
|
166
|
+
height: '20rem',
|
|
167
|
+
positionContainerDisplay: 'block'
|
|
155
168
|
}]
|
|
156
169
|
},
|
|
157
170
|
|
|
@@ -180,6 +193,7 @@ var _default = {
|
|
|
180
193
|
height: props.customProps.height,
|
|
181
194
|
disabled: props.customProps.disabled,
|
|
182
195
|
trigger: props.customProps.trigger,
|
|
196
|
+
positionContainerDisplay: props.customProps.positionContainerDisplay,
|
|
183
197
|
...(props.customProps.trigger ? {
|
|
184
198
|
defaultShow: props.customProps.defaultShow,
|
|
185
199
|
withArrow: props.customProps.withArrow,
|
package/lib/Drilldown/index.js
CHANGED
|
@@ -1068,6 +1068,8 @@ let Drilldown = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 =
|
|
|
1068
1068
|
overflowX = _this$props5.overflowX,
|
|
1069
1069
|
height = _this$props5.height,
|
|
1070
1070
|
width = _this$props5.width,
|
|
1071
|
+
minHeight = _this$props5.minHeight,
|
|
1072
|
+
minWidth = _this$props5.minWidth,
|
|
1071
1073
|
maxHeight = _this$props5.maxHeight,
|
|
1072
1074
|
maxWidth = _this$props5.maxWidth,
|
|
1073
1075
|
role = _this$props5.role,
|
|
@@ -1111,6 +1113,7 @@ let Drilldown = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 =
|
|
|
1111
1113
|
position: "relative",
|
|
1112
1114
|
borderRadius: "small",
|
|
1113
1115
|
width: width,
|
|
1116
|
+
minWidth: maxWidth,
|
|
1114
1117
|
maxWidth: maxWidth,
|
|
1115
1118
|
role: role,
|
|
1116
1119
|
"aria-label": label,
|
|
@@ -1144,6 +1147,8 @@ let Drilldown = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 =
|
|
|
1144
1147
|
overflowX: overflowX,
|
|
1145
1148
|
height: height,
|
|
1146
1149
|
width: width,
|
|
1150
|
+
minHeight: minHeight,
|
|
1151
|
+
minWidth: minWidth,
|
|
1147
1152
|
maxHeight: maxHeight,
|
|
1148
1153
|
maxWidth: maxWidth,
|
|
1149
1154
|
css: styles === null || styles === void 0 ? void 0 : styles.container,
|
|
@@ -1173,6 +1178,7 @@ let Drilldown = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 =
|
|
|
1173
1178
|
mountNode = _this$props6.mountNode,
|
|
1174
1179
|
constrain = _this$props6.constrain,
|
|
1175
1180
|
positionTarget = _this$props6.positionTarget,
|
|
1181
|
+
positionContainerDisplay = _this$props6.positionContainerDisplay,
|
|
1176
1182
|
popoverRef = _this$props6.popoverRef,
|
|
1177
1183
|
disabled = _this$props6.disabled,
|
|
1178
1184
|
onDismiss = _this$props6.onDismiss,
|
|
@@ -1199,6 +1205,7 @@ let Drilldown = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 =
|
|
|
1199
1205
|
placement: placement,
|
|
1200
1206
|
withArrow: withArrow,
|
|
1201
1207
|
positionTarget: positionTarget,
|
|
1208
|
+
positionContainerDisplay: positionContainerDisplay,
|
|
1202
1209
|
constrain: constrain,
|
|
1203
1210
|
shouldContainFocus: shouldContainFocus,
|
|
1204
1211
|
shouldReturnFocus: shouldReturnFocus,
|
package/lib/Drilldown/props.js
CHANGED
|
@@ -55,6 +55,8 @@ const propTypes = {
|
|
|
55
55
|
overflowY: _propTypes.default.oneOf(['auto', 'hidden', 'visible']),
|
|
56
56
|
height: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
57
57
|
width: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
58
|
+
minHeight: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
59
|
+
minWidth: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
58
60
|
maxHeight: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
59
61
|
maxWidth: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
60
62
|
trigger: _propTypes.default.node,
|
|
@@ -69,6 +71,7 @@ const propTypes = {
|
|
|
69
71
|
popoverRef: _propTypes.default.func,
|
|
70
72
|
mountNode: _PositionPropTypes.PositionPropTypes.mountNode,
|
|
71
73
|
positionTarget: _PositionPropTypes.PositionPropTypes.mountNode,
|
|
74
|
+
positionContainerDisplay: _propTypes.default.oneOf(['inline-block', 'block']),
|
|
72
75
|
constrain: _PositionPropTypes.PositionPropTypes.constrain,
|
|
73
76
|
shouldHideOnSelect: _propTypes.default.bool,
|
|
74
77
|
shouldContainFocus: _propTypes.default.bool,
|
|
@@ -78,6 +81,6 @@ const propTypes = {
|
|
|
78
81
|
offsetY: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number])
|
|
79
82
|
};
|
|
80
83
|
exports.propTypes = propTypes;
|
|
81
|
-
const allowedProps = ['rootPageId', 'children', 'id', 'label', 'disabled', 'rotateFocus', 'as', 'role', 'overflowX', 'overflowY', 'height', 'width', 'maxHeight', 'maxWidth', // Popover version props
|
|
82
|
-
'trigger', 'placement', 'defaultShow', 'show', 'onToggle', 'onSelect', 'onDismiss', 'onFocus', 'onMouseOver', 'elementRef', 'drilldownRef', 'popoverRef', 'mountNode', 'positionTarget', 'constrain', 'shouldHideOnSelect', 'shouldContainFocus', 'shouldReturnFocus', 'withArrow', 'offsetX', 'offsetY'];
|
|
84
|
+
const allowedProps = ['rootPageId', 'children', 'id', 'label', 'disabled', 'rotateFocus', 'as', 'role', 'overflowX', 'overflowY', 'height', 'width', 'minHeight', 'minWidth', 'maxHeight', 'maxWidth', // Popover version props
|
|
85
|
+
'trigger', 'placement', 'defaultShow', 'show', 'onToggle', 'onSelect', 'onDismiss', 'onFocus', 'onMouseOver', 'elementRef', 'drilldownRef', 'popoverRef', 'mountNode', 'positionTarget', 'positionContainerDisplay', 'constrain', 'shouldHideOnSelect', 'shouldContainFocus', 'shouldReturnFocus', 'withArrow', 'offsetX', 'offsetY'];
|
|
83
86
|
exports.allowedProps = allowedProps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-drilldown",
|
|
3
|
-
"version": "8.27.
|
|
3
|
+
"version": "8.27.1-snapshot-13",
|
|
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.13.10",
|
|
27
|
-
"@instructure/console": "8.27.
|
|
28
|
-
"@instructure/emotion": "8.27.
|
|
29
|
-
"@instructure/shared-types": "8.27.
|
|
30
|
-
"@instructure/ui-dom-utils": "8.27.
|
|
31
|
-
"@instructure/ui-icons": "8.27.
|
|
32
|
-
"@instructure/ui-options": "8.27.
|
|
33
|
-
"@instructure/ui-popover": "8.27.
|
|
34
|
-
"@instructure/ui-position": "8.27.
|
|
35
|
-
"@instructure/ui-prop-types": "8.27.
|
|
36
|
-
"@instructure/ui-react-utils": "8.27.
|
|
37
|
-
"@instructure/ui-selectable": "8.27.
|
|
38
|
-
"@instructure/ui-testable": "8.27.
|
|
39
|
-
"@instructure/ui-utils": "8.27.
|
|
40
|
-
"@instructure/ui-view": "8.27.
|
|
27
|
+
"@instructure/console": "8.27.1-snapshot-13",
|
|
28
|
+
"@instructure/emotion": "8.27.1-snapshot-13",
|
|
29
|
+
"@instructure/shared-types": "8.27.1-snapshot-13",
|
|
30
|
+
"@instructure/ui-dom-utils": "8.27.1-snapshot-13",
|
|
31
|
+
"@instructure/ui-icons": "8.27.1-snapshot-13",
|
|
32
|
+
"@instructure/ui-options": "8.27.1-snapshot-13",
|
|
33
|
+
"@instructure/ui-popover": "8.27.1-snapshot-13",
|
|
34
|
+
"@instructure/ui-position": "8.27.1-snapshot-13",
|
|
35
|
+
"@instructure/ui-prop-types": "8.27.1-snapshot-13",
|
|
36
|
+
"@instructure/ui-react-utils": "8.27.1-snapshot-13",
|
|
37
|
+
"@instructure/ui-selectable": "8.27.1-snapshot-13",
|
|
38
|
+
"@instructure/ui-testable": "8.27.1-snapshot-13",
|
|
39
|
+
"@instructure/ui-utils": "8.27.1-snapshot-13",
|
|
40
|
+
"@instructure/ui-view": "8.27.1-snapshot-13",
|
|
41
41
|
"prop-types": "^15"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@instructure/ui-babel-preset": "8.27.
|
|
45
|
-
"@instructure/ui-color-utils": "8.27.
|
|
46
|
-
"@instructure/ui-test-locator": "8.27.
|
|
47
|
-
"@instructure/ui-test-utils": "8.27.
|
|
48
|
-
"@instructure/ui-themes": "8.27.
|
|
44
|
+
"@instructure/ui-babel-preset": "8.27.1-snapshot-13",
|
|
45
|
+
"@instructure/ui-color-utils": "8.27.1-snapshot-13",
|
|
46
|
+
"@instructure/ui-test-locator": "8.27.1-snapshot-13",
|
|
47
|
+
"@instructure/ui-test-utils": "8.27.1-snapshot-13",
|
|
48
|
+
"@instructure/ui-themes": "8.27.1-snapshot-13"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"react": ">=16.8 <=18"
|
|
@@ -177,6 +177,18 @@ export default {
|
|
|
177
177
|
defaultShow: true,
|
|
178
178
|
width: '20rem',
|
|
179
179
|
height: '20rem'
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
text: 'with display="block" container',
|
|
183
|
+
trigger: (
|
|
184
|
+
<button key={1} style={{ margin: '30px auto', width: '100%' }}>
|
|
185
|
+
a drilldown trigger
|
|
186
|
+
</button>
|
|
187
|
+
),
|
|
188
|
+
defaultShow: false,
|
|
189
|
+
width: '20rem',
|
|
190
|
+
height: '20rem',
|
|
191
|
+
positionContainerDisplay: 'block'
|
|
180
192
|
}
|
|
181
193
|
]
|
|
182
194
|
},
|
|
@@ -207,6 +219,7 @@ export default {
|
|
|
207
219
|
height: props.customProps.height,
|
|
208
220
|
disabled: props.customProps.disabled,
|
|
209
221
|
trigger: props.customProps.trigger,
|
|
222
|
+
positionContainerDisplay: props.customProps.positionContainerDisplay,
|
|
210
223
|
...(props.customProps.trigger
|
|
211
224
|
? {
|
|
212
225
|
defaultShow: props.customProps.defaultShow,
|
package/src/Drilldown/index.tsx
CHANGED
|
@@ -1304,6 +1304,8 @@ class Drilldown extends Component<DrilldownProps, DrilldownState> {
|
|
|
1304
1304
|
overflowX,
|
|
1305
1305
|
height,
|
|
1306
1306
|
width,
|
|
1307
|
+
minHeight,
|
|
1308
|
+
minWidth,
|
|
1307
1309
|
maxHeight,
|
|
1308
1310
|
maxWidth,
|
|
1309
1311
|
role,
|
|
@@ -1353,6 +1355,7 @@ class Drilldown extends Component<DrilldownProps, DrilldownState> {
|
|
|
1353
1355
|
position="relative"
|
|
1354
1356
|
borderRadius="small"
|
|
1355
1357
|
width={width}
|
|
1358
|
+
minWidth={maxWidth}
|
|
1356
1359
|
maxWidth={maxWidth}
|
|
1357
1360
|
role={role}
|
|
1358
1361
|
aria-label={label}
|
|
@@ -1391,6 +1394,8 @@ class Drilldown extends Component<DrilldownProps, DrilldownState> {
|
|
|
1391
1394
|
overflowX={overflowX}
|
|
1392
1395
|
height={height}
|
|
1393
1396
|
width={width}
|
|
1397
|
+
minHeight={minHeight}
|
|
1398
|
+
minWidth={minWidth}
|
|
1394
1399
|
maxHeight={maxHeight}
|
|
1395
1400
|
maxWidth={maxWidth}
|
|
1396
1401
|
css={styles?.container}
|
|
@@ -1425,6 +1430,7 @@ class Drilldown extends Component<DrilldownProps, DrilldownState> {
|
|
|
1425
1430
|
mountNode,
|
|
1426
1431
|
constrain,
|
|
1427
1432
|
positionTarget,
|
|
1433
|
+
positionContainerDisplay,
|
|
1428
1434
|
popoverRef,
|
|
1429
1435
|
disabled,
|
|
1430
1436
|
onDismiss,
|
|
@@ -1451,6 +1457,7 @@ class Drilldown extends Component<DrilldownProps, DrilldownState> {
|
|
|
1451
1457
|
placement={placement}
|
|
1452
1458
|
withArrow={withArrow}
|
|
1453
1459
|
positionTarget={positionTarget}
|
|
1460
|
+
positionContainerDisplay={positionContainerDisplay}
|
|
1454
1461
|
constrain={constrain}
|
|
1455
1462
|
shouldContainFocus={shouldContainFocus}
|
|
1456
1463
|
shouldReturnFocus={shouldReturnFocus}
|
package/src/Drilldown/props.ts
CHANGED
|
@@ -27,10 +27,12 @@ import PropTypes from 'prop-types'
|
|
|
27
27
|
|
|
28
28
|
import { Children, controllable } from '@instructure/ui-prop-types'
|
|
29
29
|
import { PositionPropTypes } from '@instructure/ui-position'
|
|
30
|
+
|
|
30
31
|
import { Popover } from '@instructure/ui-popover'
|
|
31
|
-
import type { WithDeterministicIdProps } from '@instructure/ui-react-utils'
|
|
32
32
|
|
|
33
33
|
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
|
|
34
|
+
|
|
35
|
+
import type { WithDeterministicIdProps } from '@instructure/ui-react-utils'
|
|
34
36
|
import type {
|
|
35
37
|
PlacementPropValues,
|
|
36
38
|
PositionConstraint,
|
|
@@ -122,6 +124,8 @@ type DrilldownOwnProps = {
|
|
|
122
124
|
overflowY?: 'auto' | 'hidden' | 'visible'
|
|
123
125
|
height?: string | number
|
|
124
126
|
width?: string | number
|
|
127
|
+
minHeight?: string | number
|
|
128
|
+
minWidth?: string | number
|
|
125
129
|
maxHeight?: string | number
|
|
126
130
|
maxWidth?: string | number
|
|
127
131
|
|
|
@@ -212,6 +216,11 @@ type DrilldownOwnProps = {
|
|
|
212
216
|
*/
|
|
213
217
|
positionTarget?: PositionMountNode
|
|
214
218
|
|
|
219
|
+
/**
|
|
220
|
+
* If a trigger is supplied, this prop can set the CSS `display` property on the `<span>` container element of the underlying Position component
|
|
221
|
+
*/
|
|
222
|
+
positionContainerDisplay?: 'inline-block' | 'block'
|
|
223
|
+
|
|
215
224
|
/**
|
|
216
225
|
* The parent in which to constrain the placement.
|
|
217
226
|
*/
|
|
@@ -300,6 +309,8 @@ const propTypes: PropValidators<PropKeys> = {
|
|
|
300
309
|
overflowY: PropTypes.oneOf(['auto', 'hidden', 'visible']),
|
|
301
310
|
height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
302
311
|
width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
312
|
+
minHeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
313
|
+
minWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
303
314
|
maxHeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
304
315
|
maxWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
305
316
|
|
|
@@ -315,6 +326,7 @@ const propTypes: PropValidators<PropKeys> = {
|
|
|
315
326
|
popoverRef: PropTypes.func,
|
|
316
327
|
mountNode: PositionPropTypes.mountNode,
|
|
317
328
|
positionTarget: PositionPropTypes.mountNode,
|
|
329
|
+
positionContainerDisplay: PropTypes.oneOf(['inline-block', 'block']),
|
|
318
330
|
constrain: PositionPropTypes.constrain,
|
|
319
331
|
shouldHideOnSelect: PropTypes.bool,
|
|
320
332
|
shouldContainFocus: PropTypes.bool,
|
|
@@ -337,6 +349,8 @@ const allowedProps: AllowedPropKeys = [
|
|
|
337
349
|
'overflowY',
|
|
338
350
|
'height',
|
|
339
351
|
'width',
|
|
352
|
+
'minHeight',
|
|
353
|
+
'minWidth',
|
|
340
354
|
'maxHeight',
|
|
341
355
|
'maxWidth',
|
|
342
356
|
|
|
@@ -355,6 +369,7 @@ const allowedProps: AllowedPropKeys = [
|
|
|
355
369
|
'popoverRef',
|
|
356
370
|
'mountNode',
|
|
357
371
|
'positionTarget',
|
|
372
|
+
'positionContainerDisplay',
|
|
358
373
|
'constrain',
|
|
359
374
|
'shouldHideOnSelect',
|
|
360
375
|
'shouldContainFocus',
|
package/src/index.ts
CHANGED
|
@@ -23,4 +23,18 @@
|
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
export { Drilldown } from './Drilldown'
|
|
26
|
-
|
|
26
|
+
|
|
27
|
+
export type {
|
|
28
|
+
DrilldownProps,
|
|
29
|
+
PageChild as DrilldownPageChild,
|
|
30
|
+
GroupChild as DrilldownGroupChild,
|
|
31
|
+
OptionChild as DrilldownOptionChild,
|
|
32
|
+
SeparatorChild as DrilldownSeparatorChild
|
|
33
|
+
} from './Drilldown/props'
|
|
34
|
+
export type { DrilldownGroupProps } from './Drilldown/DrilldownGroup/props'
|
|
35
|
+
export type { DrilldownOptionProps } from './Drilldown/DrilldownOption/props'
|
|
36
|
+
export type {
|
|
37
|
+
DrilldownPageProps,
|
|
38
|
+
PageChildren as DrilldownPageChildren
|
|
39
|
+
} from './Drilldown/DrilldownPage/props'
|
|
40
|
+
export type { DrilldownSeparatorProps } from './Drilldown/DrilldownSeparator/props'
|