@instructure/ui-drilldown 8.27.1-snapshot-7 → 8.27.1-snapshot-15
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 +2 -1
- package/es/Drilldown/__examples__/Drilldown.examples.js +14 -0
- package/es/Drilldown/index.js +2 -0
- package/es/Drilldown/props.js +2 -1
- package/lib/Drilldown/__examples__/Drilldown.examples.js +14 -0
- package/lib/Drilldown/index.js +2 -0
- package/lib/Drilldown/props.js +2 -1
- package/package.json +20 -20
- package/src/Drilldown/__examples__/Drilldown.examples.tsx +13 -0
- package/src/Drilldown/index.tsx +2 -0
- package/src/Drilldown/props.ts +7 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Drilldown/__examples__/Drilldown.examples.d.ts.map +1 -1
- package/types/Drilldown/index.d.ts +2 -0
- package/types/Drilldown/index.d.ts.map +1 -1
- package/types/Drilldown/props.d.ts +4 -0
- package/types/Drilldown/props.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,12 +3,13 @@
|
|
|
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-
|
|
6
|
+
## [8.27.1-snapshot-15](https://github.com/instructure/instructure-ui/compare/v8.27.0...v8.27.1-snapshot-15) (2022-08-29)
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
### Features
|
|
10
10
|
|
|
11
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))
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
|
|
@@ -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
|
@@ -1167,6 +1167,7 @@ let Drilldown = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
|
|
|
1167
1167
|
mountNode = _this$props6.mountNode,
|
|
1168
1168
|
constrain = _this$props6.constrain,
|
|
1169
1169
|
positionTarget = _this$props6.positionTarget,
|
|
1170
|
+
positionContainerDisplay = _this$props6.positionContainerDisplay,
|
|
1170
1171
|
popoverRef = _this$props6.popoverRef,
|
|
1171
1172
|
disabled = _this$props6.disabled,
|
|
1172
1173
|
onDismiss = _this$props6.onDismiss,
|
|
@@ -1193,6 +1194,7 @@ let Drilldown = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
|
|
|
1193
1194
|
placement: placement,
|
|
1194
1195
|
withArrow: withArrow,
|
|
1195
1196
|
positionTarget: positionTarget,
|
|
1197
|
+
positionContainerDisplay: positionContainerDisplay,
|
|
1196
1198
|
constrain: constrain,
|
|
1197
1199
|
shouldContainFocus: shouldContainFocus,
|
|
1198
1200
|
shouldReturnFocus: shouldReturnFocus,
|
package/es/Drilldown/props.js
CHANGED
|
@@ -56,6 +56,7 @@ const propTypes = {
|
|
|
56
56
|
popoverRef: PropTypes.func,
|
|
57
57
|
mountNode: PositionPropTypes.mountNode,
|
|
58
58
|
positionTarget: PositionPropTypes.mountNode,
|
|
59
|
+
positionContainerDisplay: PropTypes.oneOf(['inline-block', 'block']),
|
|
59
60
|
constrain: PositionPropTypes.constrain,
|
|
60
61
|
shouldHideOnSelect: PropTypes.bool,
|
|
61
62
|
shouldContainFocus: PropTypes.bool,
|
|
@@ -65,5 +66,5 @@ const propTypes = {
|
|
|
65
66
|
offsetY: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
66
67
|
};
|
|
67
68
|
const allowedProps = ['rootPageId', 'children', 'id', 'label', 'disabled', 'rotateFocus', 'as', 'role', 'overflowX', 'overflowY', 'height', 'width', 'minHeight', 'minWidth', 'maxHeight', 'maxWidth', // Popover version props
|
|
68
|
-
'trigger', 'placement', 'defaultShow', 'show', 'onToggle', 'onSelect', 'onDismiss', 'onFocus', 'onMouseOver', 'elementRef', 'drilldownRef', 'popoverRef', 'mountNode', 'positionTarget', 'constrain', 'shouldHideOnSelect', 'shouldContainFocus', 'shouldReturnFocus', 'withArrow', 'offsetX', 'offsetY'];
|
|
69
|
+
'trigger', 'placement', 'defaultShow', 'show', 'onToggle', 'onSelect', 'onDismiss', 'onFocus', 'onMouseOver', 'elementRef', 'drilldownRef', 'popoverRef', 'mountNode', 'positionTarget', 'positionContainerDisplay', 'constrain', 'shouldHideOnSelect', 'shouldContainFocus', 'shouldReturnFocus', 'withArrow', 'offsetX', 'offsetY'];
|
|
69
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
|
@@ -1178,6 +1178,7 @@ let Drilldown = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 =
|
|
|
1178
1178
|
mountNode = _this$props6.mountNode,
|
|
1179
1179
|
constrain = _this$props6.constrain,
|
|
1180
1180
|
positionTarget = _this$props6.positionTarget,
|
|
1181
|
+
positionContainerDisplay = _this$props6.positionContainerDisplay,
|
|
1181
1182
|
popoverRef = _this$props6.popoverRef,
|
|
1182
1183
|
disabled = _this$props6.disabled,
|
|
1183
1184
|
onDismiss = _this$props6.onDismiss,
|
|
@@ -1204,6 +1205,7 @@ let Drilldown = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 =
|
|
|
1204
1205
|
placement: placement,
|
|
1205
1206
|
withArrow: withArrow,
|
|
1206
1207
|
positionTarget: positionTarget,
|
|
1208
|
+
positionContainerDisplay: positionContainerDisplay,
|
|
1207
1209
|
constrain: constrain,
|
|
1208
1210
|
shouldContainFocus: shouldContainFocus,
|
|
1209
1211
|
shouldReturnFocus: shouldReturnFocus,
|
package/lib/Drilldown/props.js
CHANGED
|
@@ -71,6 +71,7 @@ const propTypes = {
|
|
|
71
71
|
popoverRef: _propTypes.default.func,
|
|
72
72
|
mountNode: _PositionPropTypes.PositionPropTypes.mountNode,
|
|
73
73
|
positionTarget: _PositionPropTypes.PositionPropTypes.mountNode,
|
|
74
|
+
positionContainerDisplay: _propTypes.default.oneOf(['inline-block', 'block']),
|
|
74
75
|
constrain: _PositionPropTypes.PositionPropTypes.constrain,
|
|
75
76
|
shouldHideOnSelect: _propTypes.default.bool,
|
|
76
77
|
shouldContainFocus: _propTypes.default.bool,
|
|
@@ -81,5 +82,5 @@ const propTypes = {
|
|
|
81
82
|
};
|
|
82
83
|
exports.propTypes = propTypes;
|
|
83
84
|
const allowedProps = ['rootPageId', 'children', 'id', 'label', 'disabled', 'rotateFocus', 'as', 'role', 'overflowX', 'overflowY', 'height', 'width', 'minHeight', 'minWidth', 'maxHeight', 'maxWidth', // Popover version props
|
|
84
|
-
'trigger', 'placement', 'defaultShow', 'show', 'onToggle', 'onSelect', 'onDismiss', 'onFocus', 'onMouseOver', 'elementRef', 'drilldownRef', 'popoverRef', 'mountNode', 'positionTarget', 'constrain', 'shouldHideOnSelect', 'shouldContainFocus', 'shouldReturnFocus', 'withArrow', 'offsetX', 'offsetY'];
|
|
85
|
+
'trigger', 'placement', 'defaultShow', 'show', 'onToggle', 'onSelect', 'onDismiss', 'onFocus', 'onMouseOver', 'elementRef', 'drilldownRef', 'popoverRef', 'mountNode', 'positionTarget', 'positionContainerDisplay', 'constrain', 'shouldHideOnSelect', 'shouldContainFocus', 'shouldReturnFocus', 'withArrow', 'offsetX', 'offsetY'];
|
|
85
86
|
exports.allowedProps = allowedProps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-drilldown",
|
|
3
|
-
"version": "8.27.1-snapshot-
|
|
3
|
+
"version": "8.27.1-snapshot-15",
|
|
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.1-snapshot-
|
|
28
|
-
"@instructure/emotion": "8.27.1-snapshot-
|
|
29
|
-
"@instructure/shared-types": "8.27.1-snapshot-
|
|
30
|
-
"@instructure/ui-dom-utils": "8.27.1-snapshot-
|
|
31
|
-
"@instructure/ui-icons": "8.27.1-snapshot-
|
|
32
|
-
"@instructure/ui-options": "8.27.1-snapshot-
|
|
33
|
-
"@instructure/ui-popover": "8.27.1-snapshot-
|
|
34
|
-
"@instructure/ui-position": "8.27.1-snapshot-
|
|
35
|
-
"@instructure/ui-prop-types": "8.27.1-snapshot-
|
|
36
|
-
"@instructure/ui-react-utils": "8.27.1-snapshot-
|
|
37
|
-
"@instructure/ui-selectable": "8.27.1-snapshot-
|
|
38
|
-
"@instructure/ui-testable": "8.27.1-snapshot-
|
|
39
|
-
"@instructure/ui-utils": "8.27.1-snapshot-
|
|
40
|
-
"@instructure/ui-view": "8.27.1-snapshot-
|
|
27
|
+
"@instructure/console": "8.27.1-snapshot-15",
|
|
28
|
+
"@instructure/emotion": "8.27.1-snapshot-15",
|
|
29
|
+
"@instructure/shared-types": "8.27.1-snapshot-15",
|
|
30
|
+
"@instructure/ui-dom-utils": "8.27.1-snapshot-15",
|
|
31
|
+
"@instructure/ui-icons": "8.27.1-snapshot-15",
|
|
32
|
+
"@instructure/ui-options": "8.27.1-snapshot-15",
|
|
33
|
+
"@instructure/ui-popover": "8.27.1-snapshot-15",
|
|
34
|
+
"@instructure/ui-position": "8.27.1-snapshot-15",
|
|
35
|
+
"@instructure/ui-prop-types": "8.27.1-snapshot-15",
|
|
36
|
+
"@instructure/ui-react-utils": "8.27.1-snapshot-15",
|
|
37
|
+
"@instructure/ui-selectable": "8.27.1-snapshot-15",
|
|
38
|
+
"@instructure/ui-testable": "8.27.1-snapshot-15",
|
|
39
|
+
"@instructure/ui-utils": "8.27.1-snapshot-15",
|
|
40
|
+
"@instructure/ui-view": "8.27.1-snapshot-15",
|
|
41
41
|
"prop-types": "^15"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@instructure/ui-babel-preset": "8.27.1-snapshot-
|
|
45
|
-
"@instructure/ui-color-utils": "8.27.1-snapshot-
|
|
46
|
-
"@instructure/ui-test-locator": "8.27.1-snapshot-
|
|
47
|
-
"@instructure/ui-test-utils": "8.27.1-snapshot-
|
|
48
|
-
"@instructure/ui-themes": "8.27.1-snapshot-
|
|
44
|
+
"@instructure/ui-babel-preset": "8.27.1-snapshot-15",
|
|
45
|
+
"@instructure/ui-color-utils": "8.27.1-snapshot-15",
|
|
46
|
+
"@instructure/ui-test-locator": "8.27.1-snapshot-15",
|
|
47
|
+
"@instructure/ui-test-utils": "8.27.1-snapshot-15",
|
|
48
|
+
"@instructure/ui-themes": "8.27.1-snapshot-15"
|
|
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
|
@@ -1430,6 +1430,7 @@ class Drilldown extends Component<DrilldownProps, DrilldownState> {
|
|
|
1430
1430
|
mountNode,
|
|
1431
1431
|
constrain,
|
|
1432
1432
|
positionTarget,
|
|
1433
|
+
positionContainerDisplay,
|
|
1433
1434
|
popoverRef,
|
|
1434
1435
|
disabled,
|
|
1435
1436
|
onDismiss,
|
|
@@ -1456,6 +1457,7 @@ class Drilldown extends Component<DrilldownProps, DrilldownState> {
|
|
|
1456
1457
|
placement={placement}
|
|
1457
1458
|
withArrow={withArrow}
|
|
1458
1459
|
positionTarget={positionTarget}
|
|
1460
|
+
positionContainerDisplay={positionContainerDisplay}
|
|
1459
1461
|
constrain={constrain}
|
|
1460
1462
|
shouldContainFocus={shouldContainFocus}
|
|
1461
1463
|
shouldReturnFocus={shouldReturnFocus}
|
package/src/Drilldown/props.ts
CHANGED
|
@@ -216,6 +216,11 @@ type DrilldownOwnProps = {
|
|
|
216
216
|
*/
|
|
217
217
|
positionTarget?: PositionMountNode
|
|
218
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
|
+
|
|
219
224
|
/**
|
|
220
225
|
* The parent in which to constrain the placement.
|
|
221
226
|
*/
|
|
@@ -321,6 +326,7 @@ const propTypes: PropValidators<PropKeys> = {
|
|
|
321
326
|
popoverRef: PropTypes.func,
|
|
322
327
|
mountNode: PositionPropTypes.mountNode,
|
|
323
328
|
positionTarget: PositionPropTypes.mountNode,
|
|
329
|
+
positionContainerDisplay: PropTypes.oneOf(['inline-block', 'block']),
|
|
324
330
|
constrain: PositionPropTypes.constrain,
|
|
325
331
|
shouldHideOnSelect: PropTypes.bool,
|
|
326
332
|
shouldContainFocus: PropTypes.bool,
|
|
@@ -363,6 +369,7 @@ const allowedProps: AllowedPropKeys = [
|
|
|
363
369
|
'popoverRef',
|
|
364
370
|
'mountNode',
|
|
365
371
|
'positionTarget',
|
|
372
|
+
'positionContainerDisplay',
|
|
366
373
|
'constrain',
|
|
367
374
|
'shouldHideOnSelect',
|
|
368
375
|
'shouldContainFocus',
|