@instructure/ui-view 8.10.3-snapshot.9 → 8.11.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 +4 -0
- package/es/ContextView/index.js +27 -25
- package/es/View/index.js +6 -9
- package/lib/ContextView/index.js +27 -25
- package/lib/View/index.js +6 -9
- package/package.json +14 -15
- package/src/ContextView/index.tsx +7 -5
- package/src/ContextView/props.ts +4 -2
- package/src/View/index.tsx +7 -10
- package/src/View/props.ts +4 -1
- package/types/ContextView/index.d.ts +1 -2
- package/types/ContextView/index.d.ts.map +1 -1
- package/types/ContextView/props.d.ts +2 -2
- package/types/ContextView/props.d.ts.map +1 -1
- package/types/View/index.d.ts +1 -10
- package/types/View/index.d.ts.map +1 -1
- package/types/View/props.d.ts +2 -2
- package/types/View/props.d.ts.map +1 -1
- package/LICENSE.md +0 -27
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
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.11.0](https://github.com/instructure/instructure-ui/compare/v8.10.2...v8.11.0) (2021-10-15)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-view
|
|
9
|
+
|
|
6
10
|
## [8.10.2](https://github.com/instructure/instructure-ui/compare/v8.10.1...v8.10.2) (2021-10-01)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @instructure/ui-view
|
package/es/ContextView/index.js
CHANGED
|
@@ -44,44 +44,46 @@ let ContextView = (_dec = withStyle(generateStyle, generateComponentTheme), _dec
|
|
|
44
44
|
this.ref = null;
|
|
45
45
|
|
|
46
46
|
this.handleRef = el => {
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
const elementRef = this.props.elementRef;
|
|
49
48
|
this.ref = el;
|
|
50
|
-
|
|
49
|
+
|
|
50
|
+
if (typeof elementRef === 'function') {
|
|
51
|
+
elementRef(el);
|
|
52
|
+
}
|
|
51
53
|
};
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
componentDidMount() {
|
|
55
|
-
var _this$props$makeStyle, _this$
|
|
57
|
+
var _this$props$makeStyle, _this$props;
|
|
56
58
|
|
|
57
|
-
(_this$props$makeStyle = (_this$
|
|
59
|
+
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
componentDidUpdate() {
|
|
61
|
-
var _this$props$makeStyle2, _this$
|
|
63
|
+
var _this$props$makeStyle2, _this$props2;
|
|
62
64
|
|
|
63
|
-
(_this$props$makeStyle2 = (_this$
|
|
65
|
+
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
render() {
|
|
67
|
-
const _this$
|
|
68
|
-
as = _this$
|
|
69
|
-
background = _this$
|
|
70
|
-
children = _this$
|
|
71
|
-
debug = _this$
|
|
72
|
-
height = _this$
|
|
73
|
-
width = _this$
|
|
74
|
-
maxHeight = _this$
|
|
75
|
-
maxWidth = _this$
|
|
76
|
-
minHeight = _this$
|
|
77
|
-
minWidth = _this$
|
|
78
|
-
margin = _this$
|
|
79
|
-
padding = _this$
|
|
80
|
-
shadow = _this$
|
|
81
|
-
stacking = _this$
|
|
82
|
-
style = _this$
|
|
83
|
-
textAlign = _this$
|
|
84
|
-
styles = _this$
|
|
69
|
+
const _this$props3 = this.props,
|
|
70
|
+
as = _this$props3.as,
|
|
71
|
+
background = _this$props3.background,
|
|
72
|
+
children = _this$props3.children,
|
|
73
|
+
debug = _this$props3.debug,
|
|
74
|
+
height = _this$props3.height,
|
|
75
|
+
width = _this$props3.width,
|
|
76
|
+
maxHeight = _this$props3.maxHeight,
|
|
77
|
+
maxWidth = _this$props3.maxWidth,
|
|
78
|
+
minHeight = _this$props3.minHeight,
|
|
79
|
+
minWidth = _this$props3.minWidth,
|
|
80
|
+
margin = _this$props3.margin,
|
|
81
|
+
padding = _this$props3.padding,
|
|
82
|
+
shadow = _this$props3.shadow,
|
|
83
|
+
stacking = _this$props3.stacking,
|
|
84
|
+
style = _this$props3.style,
|
|
85
|
+
textAlign = _this$props3.textAlign,
|
|
86
|
+
styles = _this$props3.styles;
|
|
85
87
|
return jsx(View, Object.assign({}, omitProps(this.props, ContextView.allowedProps), {
|
|
86
88
|
css: styles === null || styles === void 0 ? void 0 : styles.contextView,
|
|
87
89
|
style: style,
|
package/es/View/index.js
CHANGED
|
@@ -55,15 +55,12 @@ let View = (_dec = bidirectional(), _dec2 = withStyle(generateStyle, generateCom
|
|
|
55
55
|
// View.allowedProps in the method matches the View.allowedProps that will be called in
|
|
56
56
|
// the consumers. Otherwise the discrepancy could cause unexpected props being
|
|
57
57
|
// allowed through.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
* @param Component The component whose props are processed.
|
|
65
|
-
* Only needed for debug logging in non-production builds.
|
|
66
|
-
*/
|
|
58
|
+
// Removes View's own props from the given object. Automatically excludes the
|
|
59
|
+
// following props: 'theme', 'children', 'className', 'style', 'styles',
|
|
60
|
+
// 'makeStyles', 'themeOverride'
|
|
61
|
+
// @param props the object to process
|
|
62
|
+
// @param Component The component whose props are processed.
|
|
63
|
+
// Only needed for debug logging in non-production builds.
|
|
67
64
|
constructor(props) {
|
|
68
65
|
super(props);
|
|
69
66
|
this.spanMarginVerified = void 0;
|
package/lib/ContextView/index.js
CHANGED
|
@@ -34,44 +34,46 @@ let ContextView = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.defaul
|
|
|
34
34
|
this.ref = null;
|
|
35
35
|
|
|
36
36
|
this.handleRef = el => {
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
const elementRef = this.props.elementRef;
|
|
39
38
|
this.ref = el;
|
|
40
|
-
|
|
39
|
+
|
|
40
|
+
if (typeof elementRef === 'function') {
|
|
41
|
+
elementRef(el);
|
|
42
|
+
}
|
|
41
43
|
};
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
componentDidMount() {
|
|
45
|
-
var _this$props$makeStyle, _this$
|
|
47
|
+
var _this$props$makeStyle, _this$props;
|
|
46
48
|
|
|
47
|
-
(_this$props$makeStyle = (_this$
|
|
49
|
+
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
componentDidUpdate() {
|
|
51
|
-
var _this$props$makeStyle2, _this$
|
|
53
|
+
var _this$props$makeStyle2, _this$props2;
|
|
52
54
|
|
|
53
|
-
(_this$props$makeStyle2 = (_this$
|
|
55
|
+
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
render() {
|
|
57
|
-
const _this$
|
|
58
|
-
as = _this$
|
|
59
|
-
background = _this$
|
|
60
|
-
children = _this$
|
|
61
|
-
debug = _this$
|
|
62
|
-
height = _this$
|
|
63
|
-
width = _this$
|
|
64
|
-
maxHeight = _this$
|
|
65
|
-
maxWidth = _this$
|
|
66
|
-
minHeight = _this$
|
|
67
|
-
minWidth = _this$
|
|
68
|
-
margin = _this$
|
|
69
|
-
padding = _this$
|
|
70
|
-
shadow = _this$
|
|
71
|
-
stacking = _this$
|
|
72
|
-
style = _this$
|
|
73
|
-
textAlign = _this$
|
|
74
|
-
styles = _this$
|
|
59
|
+
const _this$props3 = this.props,
|
|
60
|
+
as = _this$props3.as,
|
|
61
|
+
background = _this$props3.background,
|
|
62
|
+
children = _this$props3.children,
|
|
63
|
+
debug = _this$props3.debug,
|
|
64
|
+
height = _this$props3.height,
|
|
65
|
+
width = _this$props3.width,
|
|
66
|
+
maxHeight = _this$props3.maxHeight,
|
|
67
|
+
maxWidth = _this$props3.maxWidth,
|
|
68
|
+
minHeight = _this$props3.minHeight,
|
|
69
|
+
minWidth = _this$props3.minWidth,
|
|
70
|
+
margin = _this$props3.margin,
|
|
71
|
+
padding = _this$props3.padding,
|
|
72
|
+
shadow = _this$props3.shadow,
|
|
73
|
+
stacking = _this$props3.stacking,
|
|
74
|
+
style = _this$props3.style,
|
|
75
|
+
textAlign = _this$props3.textAlign,
|
|
76
|
+
styles = _this$props3.styles;
|
|
75
77
|
return (0, _emotion.jsx)(_View.View, Object.assign({}, (0, _omitProps.omitProps)(this.props, ContextView.allowedProps), {
|
|
76
78
|
css: styles === null || styles === void 0 ? void 0 : styles.contextView,
|
|
77
79
|
style: style,
|
package/lib/View/index.js
CHANGED
|
@@ -54,15 +54,12 @@ let View = (_dec = (0, _bidirectional.bidirectional)(), _dec2 = (0, _emotion.wit
|
|
|
54
54
|
// View.allowedProps in the method matches the View.allowedProps that will be called in
|
|
55
55
|
// the consumers. Otherwise the discrepancy could cause unexpected props being
|
|
56
56
|
// allowed through.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
* @param Component The component whose props are processed.
|
|
64
|
-
* Only needed for debug logging in non-production builds.
|
|
65
|
-
*/
|
|
57
|
+
// Removes View's own props from the given object. Automatically excludes the
|
|
58
|
+
// following props: 'theme', 'children', 'className', 'style', 'styles',
|
|
59
|
+
// 'makeStyles', 'themeOverride'
|
|
60
|
+
// @param props the object to process
|
|
61
|
+
// @param Component The component whose props are processed.
|
|
62
|
+
// Only needed for debug logging in non-production builds.
|
|
66
63
|
constructor(props) {
|
|
67
64
|
super(props);
|
|
68
65
|
this.spanMarginVerified = void 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-view",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.11.0",
|
|
4
4
|
"description": "A component for basic styles including spacing, sizing, borders, display, positioning, and focus states.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -25,21 +25,21 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@babel/runtime": "^7.13.10",
|
|
28
|
-
"@instructure/console": "8.
|
|
29
|
-
"@instructure/emotion": "8.
|
|
30
|
-
"@instructure/shared-types": "8.
|
|
31
|
-
"@instructure/ui-color-utils": "8.
|
|
32
|
-
"@instructure/ui-dom-utils": "8.
|
|
33
|
-
"@instructure/ui-i18n": "8.
|
|
34
|
-
"@instructure/ui-position": "8.
|
|
35
|
-
"@instructure/ui-prop-types": "8.
|
|
36
|
-
"@instructure/ui-react-utils": "8.
|
|
28
|
+
"@instructure/console": "8.11.0",
|
|
29
|
+
"@instructure/emotion": "8.11.0",
|
|
30
|
+
"@instructure/shared-types": "8.11.0",
|
|
31
|
+
"@instructure/ui-color-utils": "8.11.0",
|
|
32
|
+
"@instructure/ui-dom-utils": "8.11.0",
|
|
33
|
+
"@instructure/ui-i18n": "8.11.0",
|
|
34
|
+
"@instructure/ui-position": "8.11.0",
|
|
35
|
+
"@instructure/ui-prop-types": "8.11.0",
|
|
36
|
+
"@instructure/ui-react-utils": "8.11.0",
|
|
37
37
|
"prop-types": "^15"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@instructure/ui-babel-preset": "8.
|
|
41
|
-
"@instructure/ui-test-utils": "8.
|
|
42
|
-
"@instructure/ui-themes": "8.
|
|
40
|
+
"@instructure/ui-babel-preset": "8.11.0",
|
|
41
|
+
"@instructure/ui-test-utils": "8.11.0",
|
|
42
|
+
"@instructure/ui-themes": "8.11.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": ">=16.8 <=17"
|
|
@@ -47,6 +47,5 @@
|
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
|
-
"sideEffects": false
|
|
51
|
-
"gitHead": "47592ffa9fed565a9df0677c77e6d890d5e964ea"
|
|
50
|
+
"sideEffects": false
|
|
52
51
|
}
|
|
@@ -27,7 +27,6 @@ import { Component } from 'react'
|
|
|
27
27
|
|
|
28
28
|
import { jsx, withStyle } from '@instructure/emotion'
|
|
29
29
|
import { omitProps } from '@instructure/ui-react-utils'
|
|
30
|
-
import { OtherHTMLAttributes } from '@instructure/shared-types'
|
|
31
30
|
|
|
32
31
|
import { View } from '../View'
|
|
33
32
|
|
|
@@ -43,9 +42,7 @@ category: components
|
|
|
43
42
|
**/
|
|
44
43
|
|
|
45
44
|
@withStyle(generateStyle, generateComponentTheme)
|
|
46
|
-
class ContextView extends Component<
|
|
47
|
-
ContextViewProps & OtherHTMLAttributes<ContextViewProps>
|
|
48
|
-
> {
|
|
45
|
+
class ContextView extends Component<ContextViewProps> {
|
|
49
46
|
static readonly componentId = 'ContextView'
|
|
50
47
|
static allowedProps = allowedProps
|
|
51
48
|
static propTypes = propTypes
|
|
@@ -73,8 +70,13 @@ class ContextView extends Component<
|
|
|
73
70
|
ref: Element | null = null
|
|
74
71
|
|
|
75
72
|
handleRef = (el: Element | null) => {
|
|
73
|
+
const { elementRef } = this.props
|
|
74
|
+
|
|
76
75
|
this.ref = el
|
|
77
|
-
|
|
76
|
+
|
|
77
|
+
if (typeof elementRef === 'function') {
|
|
78
|
+
elementRef(el)
|
|
79
|
+
}
|
|
78
80
|
}
|
|
79
81
|
|
|
80
82
|
render() {
|
package/src/ContextView/props.ts
CHANGED
|
@@ -31,7 +31,8 @@ import { PositionPropTypes } from '@instructure/ui-position'
|
|
|
31
31
|
import type {
|
|
32
32
|
AsElementType,
|
|
33
33
|
PropValidators,
|
|
34
|
-
ContextViewTheme
|
|
34
|
+
ContextViewTheme,
|
|
35
|
+
OtherHTMLAttributes
|
|
35
36
|
} from '@instructure/shared-types'
|
|
36
37
|
import type { PlacementPropValues } from '@instructure/ui-position'
|
|
37
38
|
import type {
|
|
@@ -67,7 +68,8 @@ type PropKeys = keyof ContextViewOwnProps
|
|
|
67
68
|
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
68
69
|
|
|
69
70
|
type ContextViewProps = ContextViewOwnProps &
|
|
70
|
-
WithStyleProps<ContextViewTheme, ContextViewStyle>
|
|
71
|
+
WithStyleProps<ContextViewTheme, ContextViewStyle> &
|
|
72
|
+
OtherHTMLAttributes<ContextViewOwnProps>
|
|
71
73
|
|
|
72
74
|
type ContextViewStyle = ComponentStyle<
|
|
73
75
|
| 'contextView'
|
package/src/View/index.tsx
CHANGED
|
@@ -35,7 +35,6 @@ import {
|
|
|
35
35
|
passthroughProps
|
|
36
36
|
} from '@instructure/ui-react-utils'
|
|
37
37
|
import { jsx, withStyle } from '@instructure/emotion'
|
|
38
|
-
import type { OtherHTMLAttributes } from '@instructure/shared-types'
|
|
39
38
|
|
|
40
39
|
import generateStyle from './styles'
|
|
41
40
|
import generateComponentTheme from './theme'
|
|
@@ -55,7 +54,7 @@ API:
|
|
|
55
54
|
**/
|
|
56
55
|
@bidirectional()
|
|
57
56
|
@withStyle(generateStyle, generateComponentTheme)
|
|
58
|
-
class View extends Component<ViewProps
|
|
57
|
+
class View extends Component<ViewProps> {
|
|
59
58
|
static componentId = 'View'
|
|
60
59
|
static allowedProps = allowedProps
|
|
61
60
|
static propTypes = propTypes
|
|
@@ -79,14 +78,12 @@ class View extends Component<ViewProps & OtherHTMLAttributes<ViewProps>> {
|
|
|
79
78
|
// the consumers. Otherwise the discrepancy could cause unexpected props being
|
|
80
79
|
// allowed through.
|
|
81
80
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
* Only needed for debug logging in non-production builds.
|
|
89
|
-
*/
|
|
81
|
+
// Removes View's own props from the given object. Automatically excludes the
|
|
82
|
+
// following props: 'theme', 'children', 'className', 'style', 'styles',
|
|
83
|
+
// 'makeStyles', 'themeOverride'
|
|
84
|
+
// @param props the object to process
|
|
85
|
+
// @param Component The component whose props are processed.
|
|
86
|
+
// Only needed for debug logging in non-production builds.
|
|
90
87
|
static omitViewProps = (
|
|
91
88
|
props: Record<string, any>,
|
|
92
89
|
Component: ComponentType<any>
|
package/src/View/props.ts
CHANGED
|
@@ -31,6 +31,7 @@ import { ThemeablePropTypes } from '@instructure/emotion'
|
|
|
31
31
|
|
|
32
32
|
import type {
|
|
33
33
|
AsElementType,
|
|
34
|
+
OtherHTMLAttributes,
|
|
34
35
|
PropValidators,
|
|
35
36
|
ViewTheme
|
|
36
37
|
} from '@instructure/shared-types'
|
|
@@ -185,7 +186,9 @@ type ViewOwnProps = {
|
|
|
185
186
|
|
|
186
187
|
type PropKeys = keyof ViewOwnProps
|
|
187
188
|
|
|
188
|
-
type ViewProps = ViewOwnProps &
|
|
189
|
+
type ViewProps = ViewOwnProps &
|
|
190
|
+
WithStyleProps<ViewTheme, ViewStyle> &
|
|
191
|
+
OtherHTMLAttributes<ViewOwnProps>
|
|
189
192
|
|
|
190
193
|
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
191
194
|
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { Component } from 'react';
|
|
3
3
|
import { jsx } from '@instructure/emotion';
|
|
4
|
-
import { OtherHTMLAttributes } from '@instructure/shared-types';
|
|
5
4
|
import type { ContextViewProps } from './props';
|
|
6
5
|
/**
|
|
7
6
|
---
|
|
8
7
|
category: components
|
|
9
8
|
---
|
|
10
9
|
**/
|
|
11
|
-
declare class ContextView extends Component<ContextViewProps
|
|
10
|
+
declare class ContextView extends Component<ContextViewProps> {
|
|
12
11
|
static readonly componentId = "ContextView";
|
|
13
12
|
static allowedProps: readonly (keyof {
|
|
14
13
|
as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ContextView/index.tsx"],"names":[],"mappings":"AAuBA,eAAe;AAEf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,GAAG,EAAa,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ContextView/index.tsx"],"names":[],"mappings":"AAuBA,eAAe;AAEf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,GAAG,EAAa,MAAM,sBAAsB,CAAA;AAQrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C;;;;GAIG;AAEH,cACM,WAAY,SAAQ,SAAS,CAAC,gBAAgB,CAAC;IACnD,MAAM,CAAC,QAAQ,CAAC,WAAW,iBAAgB;IAC3C,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;;MAWlB;IAED,iBAAiB;IAIjB,kBAAkB;IAIlB,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,OAAQ,OAAO,GAAG,IAAI,UAQ9B;IAED,MAAM;CA0DP;AAED,eAAe,WAAW,CAAA;AAC1B,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { AsElementType, PropValidators, ContextViewTheme } from '@instructure/shared-types';
|
|
2
|
+
import type { AsElementType, PropValidators, ContextViewTheme, OtherHTMLAttributes } from '@instructure/shared-types';
|
|
3
3
|
import type { PlacementPropValues } from '@instructure/ui-position';
|
|
4
4
|
import type { Shadow, Spacing, Stacking, WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
5
5
|
declare type ContextViewOwnProps = {
|
|
@@ -23,7 +23,7 @@ declare type ContextViewOwnProps = {
|
|
|
23
23
|
};
|
|
24
24
|
declare type PropKeys = keyof ContextViewOwnProps;
|
|
25
25
|
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
26
|
-
declare type ContextViewProps = ContextViewOwnProps & WithStyleProps<ContextViewTheme, ContextViewStyle>;
|
|
26
|
+
declare type ContextViewProps = ContextViewOwnProps & WithStyleProps<ContextViewTheme, ContextViewStyle> & OtherHTMLAttributes<ContextViewOwnProps>;
|
|
27
27
|
declare type ContextViewStyle = ComponentStyle<'contextView' | 'contextView__content' | 'contextView__arrow' | 'arrowSize' | 'arrowBorderWidth'>;
|
|
28
28
|
declare const propTypes: PropValidators<PropKeys>;
|
|
29
29
|
declare const allowedProps: AllowedPropKeys;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/ContextView/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,gBAAgB,
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/ContextView/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,KAAK,EACV,MAAM,EACN,OAAO,EACP,QAAQ,EACR,cAAc,EACd,cAAc,EACf,MAAM,sBAAsB,CAAA;AAE7B,aAAK,mBAAmB,GAAG;IACzB,EAAE,CAAC,EAAE,aAAa,CAAA;IAClB,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,KAAK,IAA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,EAAE,YAAY,EAAE,CAAA"}
|
package/types/View/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { Component, ComponentType } from 'react';
|
|
3
3
|
import { jsx } from '@instructure/emotion';
|
|
4
|
-
import type { OtherHTMLAttributes } from '@instructure/shared-types';
|
|
5
4
|
import type { ViewProps } from './props';
|
|
6
5
|
/**
|
|
7
6
|
---
|
|
@@ -13,7 +12,7 @@ API:
|
|
|
13
12
|
@module View
|
|
14
13
|
|
|
15
14
|
**/
|
|
16
|
-
declare class View extends Component<ViewProps
|
|
15
|
+
declare class View extends Component<ViewProps> {
|
|
17
16
|
static componentId: string;
|
|
18
17
|
static allowedProps: readonly (keyof {
|
|
19
18
|
as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
|
|
@@ -96,14 +95,6 @@ declare class View extends Component<ViewProps & OtherHTMLAttributes<ViewProps>>
|
|
|
96
95
|
readonly focusColor: "info";
|
|
97
96
|
readonly shouldAnimateFocus: true;
|
|
98
97
|
};
|
|
99
|
-
/**
|
|
100
|
-
* Removes View's own props from the given object. Automatically excludes the
|
|
101
|
-
* following props: 'theme', 'children', 'className', 'style', 'styles',
|
|
102
|
-
* 'makeStyles', 'themeOverride'
|
|
103
|
-
* @param props the object to process
|
|
104
|
-
* @param Component The component whose props are processed.
|
|
105
|
-
* Only needed for debug logging in non-production builds.
|
|
106
|
-
*/
|
|
107
98
|
static omitViewProps: (props: Record<string, any>, Component: ComponentType<any>) => Record<string, any>;
|
|
108
99
|
private spanMarginVerified;
|
|
109
100
|
private _element?;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/View/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAWhD,OAAO,EAAE,GAAG,EAAa,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/View/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAWhD,OAAO,EAAE,GAAG,EAAa,MAAM,sBAAsB,CAAA;AAMrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExC;;;;;;;;;GASG;AACH,cAEM,IAAK,SAAQ,SAAS,CAAC,SAAS,CAAC;IACrC,MAAM,CAAC,WAAW,SAAS;IAC3B,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;MAUT;IAgBV,MAAM,CAAC,aAAa,UACX,OAAO,MAAM,EAAE,GAAG,CAAC,aACf,cAAc,GAAG,CAAC,yBAiB9B;IAED,OAAO,CAAC,kBAAkB,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,CAAgB;gBAErB,KAAK,EAAE,SAAS;IAK5B,iBAAiB;IAIjB,kBAAkB;IAoDlB,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,gBAAgB,OAAQ,OAAO,GAAG,IAAI,UAMrC;IAED,MAAM;CA4CP;AAED,eAAe,IAAI,CAAA;AACnB,OAAO,EAAE,IAAI,EAAE,CAAA"}
|
package/types/View/props.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { AsElementType, PropValidators, ViewTheme } from '@instructure/shared-types';
|
|
2
|
+
import type { AsElementType, OtherHTMLAttributes, PropValidators, ViewTheme } from '@instructure/shared-types';
|
|
3
3
|
import type { WithStyleProps, Spacing, BorderWidth, BorderRadii, Shadow, Stacking, ComponentStyle } from '@instructure/emotion';
|
|
4
4
|
declare type ViewOwnProps = {
|
|
5
5
|
/**
|
|
@@ -119,7 +119,7 @@ declare type ViewOwnProps = {
|
|
|
119
119
|
cursor?: any;
|
|
120
120
|
};
|
|
121
121
|
declare type PropKeys = keyof ViewOwnProps;
|
|
122
|
-
declare type ViewProps = ViewOwnProps & WithStyleProps<ViewTheme, ViewStyle>;
|
|
122
|
+
declare type ViewProps = ViewOwnProps & WithStyleProps<ViewTheme, ViewStyle> & OtherHTMLAttributes<ViewOwnProps>;
|
|
123
123
|
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
124
124
|
declare type ViewStyle = ComponentStyle<'view' | 'inlineStyles'>;
|
|
125
125
|
declare const propTypes: PropValidators<PropKeys>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/View/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,SAAS,EACV,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EACV,cAAc,EACd,OAAO,EACP,WAAW,EACX,WAAW,EACX,MAAM,EACN,QAAQ,EACR,cAAc,EACf,MAAM,sBAAsB,CAAA;AAE7B,aAAK,YAAY,GAAG;IAClB;;OAEG;IACH,EAAE,CAAC,EAAE,aAAa,CAAA;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAA;IAC9C;;;OAGG;IACH,OAAO,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,cAAc,GAAG,MAAM,GAAG,aAAa,CAAA;IAC9E,SAAS,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAA;IACxC,SAAS,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAA;IACxC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACv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AA;IACnB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;OAGG;IACH,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB;;;OAGG;IACH,YAAY,CAAC,EAAE,WAAW,CAAA;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,GAAG,CAAA;CACb,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,YAAY,CAAA;AAElC,aAAK,SAAS,GAAG,YAAY,GAC3B,cAAc,CAAC,SAAS,EAAE,SAAS,CAAC,GACpC,mBAAmB,CAAC,YAAY,CAAC,CAAA;AAEnC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,SAAS,GAAG,cAAc,CAAC,MAAM,GAAG,cAAc,CAAC,CAAA;AAExD,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAoEvC,CAAA;AAKD,QAAA,MAAM,YAAY,EAAE,eAkCnB,CAAA;AAED,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA;AAClC,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,CAAA"}
|
package/LICENSE.md
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: The MIT License (MIT)
|
|
3
|
-
category: Getting Started
|
|
4
|
-
order: 9
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# The MIT License (MIT)
|
|
8
|
-
|
|
9
|
-
Copyright (c) 2015 Instructure, Inc.
|
|
10
|
-
|
|
11
|
-
**Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
-
in the Software without restriction, including without limitation the rights
|
|
14
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
-
furnished to do so, subject to the following conditions.**
|
|
17
|
-
|
|
18
|
-
The above copyright notice and this permission notice shall be included in all
|
|
19
|
-
copies or substantial portions of the Software.
|
|
20
|
-
|
|
21
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
-
SOFTWARE.
|