@instructure/ui-view 8.8.1-snapshot.8 → 8.9.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 +6 -0
- package/es/ContextView/index.js +4 -83
- package/es/ContextView/props.js +96 -0
- package/es/View/index.js +8 -4
- package/es/View/{types.js → props.js} +6 -7
- package/lib/ContextView/index.js +4 -84
- package/lib/ContextView/props.js +109 -0
- package/lib/View/index.js +8 -4
- package/lib/View/{types.js → props.js} +4 -6
- package/package.json +14 -15
- package/src/ContextView/index.tsx +6 -87
- package/src/ContextView/props.ts +156 -0
- package/src/ContextView/styles.ts +4 -4
- package/src/View/__examples__/View.examples.ts +1 -1
- package/src/View/index.tsx +15 -4
- package/src/View/{types.ts → props.ts} +23 -15
- package/src/View/styles.ts +1 -1
- package/src/index.ts +2 -2
- package/types/ContextView/index.d.ts +39 -69
- package/types/ContextView/index.d.ts.map +1 -1
- package/types/ContextView/props.d.ts +31 -0
- package/types/ContextView/props.d.ts.map +1 -0
- package/types/ContextView/styles.d.ts +1 -1
- package/types/View/__examples__/View.examples.d.ts +1 -1
- package/types/View/index.d.ts +72 -40
- package/types/View/index.d.ts.map +1 -1
- package/types/View/{types.d.ts → props.d.ts} +15 -44
- package/types/View/props.d.ts.map +1 -0
- package/types/View/styles.d.ts +1 -1
- package/types/index.d.ts +2 -2
- package/LICENSE.md +0 -27
- package/es/ContextView/types.js +0 -1
- package/lib/ContextView/types.js +0 -1
- package/src/ContextView/types.ts +0 -48
- package/types/ContextView/types.d.ts +0 -24
- package/types/ContextView/types.d.ts.map +0 -1
- package/types/View/types.d.ts.map +0 -1
|
@@ -21,10 +21,15 @@
|
|
|
21
21
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
|
+
|
|
25
|
+
import React from 'react'
|
|
24
26
|
import PropTypes from 'prop-types'
|
|
27
|
+
|
|
25
28
|
import { cursor as cursorPropTypes } from '@instructure/ui-prop-types'
|
|
26
29
|
import { bidirectional } from '@instructure/ui-i18n'
|
|
27
30
|
import { ThemeablePropTypes } from '@instructure/emotion'
|
|
31
|
+
|
|
32
|
+
import type { AsElementType, PropValidators } from '@instructure/shared-types'
|
|
28
33
|
import type {
|
|
29
34
|
WithStyleProps,
|
|
30
35
|
Spacing,
|
|
@@ -33,9 +38,8 @@ import type {
|
|
|
33
38
|
Shadow,
|
|
34
39
|
Stacking
|
|
35
40
|
} from '@instructure/emotion'
|
|
36
|
-
import type { AsElementType } from '@instructure/shared-types'
|
|
37
41
|
|
|
38
|
-
|
|
42
|
+
type ViewOwnProps = {
|
|
39
43
|
/**
|
|
40
44
|
* The element to render as the component root, `span` by default
|
|
41
45
|
*/
|
|
@@ -57,6 +61,10 @@ export type ViewOwnProps = {
|
|
|
57
61
|
maxWidth?: string | number
|
|
58
62
|
minHeight?: string | number
|
|
59
63
|
minWidth?: string | number
|
|
64
|
+
/**
|
|
65
|
+
* The children to render inside the <View />
|
|
66
|
+
*/
|
|
67
|
+
children?: React.ReactNode
|
|
60
68
|
/**
|
|
61
69
|
* Designates the text alignment within the `<View />`
|
|
62
70
|
*/
|
|
@@ -170,13 +178,13 @@ export type ViewOwnProps = {
|
|
|
170
178
|
cursor?: any
|
|
171
179
|
}
|
|
172
180
|
|
|
173
|
-
|
|
181
|
+
type PropKeys = keyof ViewOwnProps
|
|
182
|
+
|
|
183
|
+
type ViewProps = ViewOwnProps & WithStyleProps
|
|
174
184
|
|
|
175
|
-
|
|
176
|
-
Array<keyof (ViewOwnProps & WithStyleProps)>
|
|
177
|
-
>
|
|
185
|
+
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
178
186
|
|
|
179
|
-
|
|
187
|
+
const propTypes: PropValidators<PropKeys> = {
|
|
180
188
|
as: PropTypes.elementType,
|
|
181
189
|
elementRef: PropTypes.func,
|
|
182
190
|
display: PropTypes.oneOf([
|
|
@@ -243,20 +251,19 @@ export const propTypes = {
|
|
|
243
251
|
focusColor: PropTypes.oneOf(['info', 'inverse', 'success', 'danger']),
|
|
244
252
|
shouldAnimateFocus: PropTypes.bool,
|
|
245
253
|
withVisualDebug: PropTypes.bool,
|
|
246
|
-
makeStyles: PropTypes.func,
|
|
247
|
-
styles: PropTypes.object,
|
|
248
254
|
dir: PropTypes.oneOf(Object.values(bidirectional.DIRECTION))
|
|
249
255
|
}
|
|
250
256
|
|
|
251
|
-
//This variable will be attached as static property on the `View` component
|
|
252
|
-
//so we don't rely on the `PropTypes` validators for our internal logic.
|
|
253
|
-
//This means on prod builds the consuming applications can safely delete propTypes.
|
|
254
|
-
|
|
257
|
+
// This variable will be attached as static property on the `View` component
|
|
258
|
+
// so we don't rely on the `PropTypes` validators for our internal logic.
|
|
259
|
+
// This means on prod builds the consuming applications can safely delete propTypes.
|
|
260
|
+
const allowedProps: AllowedPropKeys = [
|
|
255
261
|
'as',
|
|
256
262
|
'background',
|
|
257
263
|
'borderColor',
|
|
258
264
|
'borderRadius',
|
|
259
265
|
'borderWidth',
|
|
266
|
+
'children',
|
|
260
267
|
'cursor',
|
|
261
268
|
'dir',
|
|
262
269
|
'display',
|
|
@@ -268,7 +275,6 @@ export const allowedProps: AllowedPropKeys = [
|
|
|
268
275
|
'insetBlockStart',
|
|
269
276
|
'insetInlineEnd',
|
|
270
277
|
'insetInlineStart',
|
|
271
|
-
'makeStyles',
|
|
272
278
|
'margin',
|
|
273
279
|
'maxHeight',
|
|
274
280
|
'maxWidth',
|
|
@@ -281,9 +287,11 @@ export const allowedProps: AllowedPropKeys = [
|
|
|
281
287
|
'shadow',
|
|
282
288
|
'shouldAnimateFocus',
|
|
283
289
|
'stacking',
|
|
284
|
-
'styles',
|
|
285
290
|
'textAlign',
|
|
286
291
|
'width',
|
|
287
292
|
'withFocusOutline',
|
|
288
293
|
'withVisualDebug'
|
|
289
294
|
]
|
|
295
|
+
|
|
296
|
+
export { propTypes, allowedProps }
|
|
297
|
+
export type { ViewProps }
|
package/src/View/styles.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
export { ContextView } from './ContextView'
|
|
26
26
|
export { View } from './View'
|
|
27
27
|
|
|
28
|
-
export type { ContextViewProps } from './ContextView/
|
|
29
|
-
export type { ViewProps } from './View/
|
|
28
|
+
export type { ContextViewProps } from './ContextView/props'
|
|
29
|
+
export type { ViewProps } from './View/props'
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { Component } from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
3
|
import { jsx } from '@instructure/emotion';
|
|
5
4
|
import { OtherHTMLAttributes } from '@instructure/shared-types';
|
|
6
|
-
import { ContextViewProps } from './
|
|
5
|
+
import type { ContextViewProps } from './props';
|
|
7
6
|
/**
|
|
8
7
|
---
|
|
9
8
|
category: components
|
|
@@ -11,66 +10,44 @@ category: components
|
|
|
11
10
|
**/
|
|
12
11
|
declare class ContextView extends Component<ContextViewProps & OtherHTMLAttributes<ContextViewProps>> {
|
|
13
12
|
static readonly componentId = "ContextView";
|
|
14
|
-
static
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
shadow: PropTypes.Requireable<"none" | "resting" | "above" | "topmost">;
|
|
53
|
-
/**
|
|
54
|
-
* Controls the z-index depth for the `<ContextView />`
|
|
55
|
-
*/
|
|
56
|
-
stacking: PropTypes.Requireable<"resting" | "above" | "topmost" | "deepest" | "below">;
|
|
57
|
-
/**
|
|
58
|
-
* Designates the background style of the `<ContextView />`
|
|
59
|
-
*/
|
|
60
|
-
background: PropTypes.Requireable<string>;
|
|
61
|
-
/**
|
|
62
|
-
* Specifies how the arrow for `<ContextView />` will be rendered.
|
|
63
|
-
* Ex. `placement="top"` will render with an arrow pointing down.
|
|
64
|
-
*/
|
|
65
|
-
placement: PropTypes.Requireable<string>;
|
|
66
|
-
/**
|
|
67
|
-
* Activate an outline around the component to make building your
|
|
68
|
-
* layout easier
|
|
69
|
-
*/
|
|
70
|
-
debug: PropTypes.Requireable<boolean>;
|
|
71
|
-
makeStyles: PropTypes.Requireable<(...args: any[]) => any>;
|
|
72
|
-
styles: PropTypes.Requireable<object>;
|
|
73
|
-
};
|
|
13
|
+
static allowedProps: readonly (keyof {
|
|
14
|
+
as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
|
|
15
|
+
elementRef?: ((...args: any[]) => any) | undefined;
|
|
16
|
+
height?: string | number | undefined;
|
|
17
|
+
width?: string | number | undefined;
|
|
18
|
+
maxHeight?: string | number | undefined;
|
|
19
|
+
maxWidth?: string | number | undefined;
|
|
20
|
+
minHeight?: string | number | undefined;
|
|
21
|
+
minWidth?: string | number | undefined;
|
|
22
|
+
children?: import("react").ReactNode;
|
|
23
|
+
textAlign?: "start" | "center" | "end" | undefined;
|
|
24
|
+
background?: "inverse" | "default" | undefined;
|
|
25
|
+
debug?: boolean | undefined;
|
|
26
|
+
margin?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
|
|
27
|
+
padding?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
|
|
28
|
+
shadow?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Shadow | undefined;
|
|
29
|
+
stacking?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Stacking | undefined;
|
|
30
|
+
placement?: import("@instructure/ui-position").PlacementPropValues | undefined;
|
|
31
|
+
})[];
|
|
32
|
+
static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
|
|
33
|
+
as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
|
|
34
|
+
elementRef?: ((...args: any[]) => any) | undefined;
|
|
35
|
+
height?: string | number | undefined;
|
|
36
|
+
width?: string | number | undefined;
|
|
37
|
+
maxHeight?: string | number | undefined;
|
|
38
|
+
maxWidth?: string | number | undefined;
|
|
39
|
+
minHeight?: string | number | undefined;
|
|
40
|
+
minWidth?: string | number | undefined;
|
|
41
|
+
children?: import("react").ReactNode;
|
|
42
|
+
textAlign?: "start" | "center" | "end" | undefined;
|
|
43
|
+
background?: "inverse" | "default" | undefined;
|
|
44
|
+
debug?: boolean | undefined;
|
|
45
|
+
margin?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
|
|
46
|
+
padding?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
|
|
47
|
+
shadow?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Shadow | undefined;
|
|
48
|
+
stacking?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Stacking | undefined;
|
|
49
|
+
placement?: import("@instructure/ui-position").PlacementPropValues | undefined;
|
|
50
|
+
}>;
|
|
74
51
|
static defaultProps: {
|
|
75
52
|
as: string;
|
|
76
53
|
elementRef: () => void;
|
|
@@ -82,13 +59,6 @@ declare class ContextView extends Component<ContextViewProps & OtherHTMLAttribut
|
|
|
82
59
|
background: string;
|
|
83
60
|
shadow: string;
|
|
84
61
|
placement: string;
|
|
85
|
-
margin: undefined;
|
|
86
|
-
padding: undefined;
|
|
87
|
-
stacking: undefined;
|
|
88
|
-
maxWidth: undefined;
|
|
89
|
-
minWidth: undefined;
|
|
90
|
-
maxHeight: undefined;
|
|
91
|
-
minHeight: undefined;
|
|
92
62
|
};
|
|
93
63
|
componentDidMount(): void;
|
|
94
64
|
componentDidUpdate(): void;
|
|
@@ -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;
|
|
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;AAErD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAO/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C;;;;GAIG;AAEH,cACM,WAAY,SAAQ,SAAS,CACjC,gBAAgB,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CACzD;IACC,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,MAAM;CA2DP;AAED,eAAe,WAAW,CAAA;AAC1B,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AsElementType, PropValidators } from '@instructure/shared-types';
|
|
3
|
+
import type { PlacementPropValues } from '@instructure/ui-position';
|
|
4
|
+
import type { Shadow, Spacing, Stacking, WithStyleProps } from '@instructure/emotion';
|
|
5
|
+
declare type ContextViewOwnProps = {
|
|
6
|
+
as?: AsElementType;
|
|
7
|
+
elementRef?: (...args: any[]) => any;
|
|
8
|
+
height?: string | number;
|
|
9
|
+
width?: string | number;
|
|
10
|
+
maxHeight?: string | number;
|
|
11
|
+
maxWidth?: string | number;
|
|
12
|
+
minHeight?: string | number;
|
|
13
|
+
minWidth?: string | number;
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
textAlign?: 'start' | 'center' | 'end';
|
|
16
|
+
background?: 'default' | 'inverse';
|
|
17
|
+
debug?: boolean;
|
|
18
|
+
margin?: Spacing;
|
|
19
|
+
padding?: Spacing;
|
|
20
|
+
shadow?: Shadow;
|
|
21
|
+
stacking?: Stacking;
|
|
22
|
+
placement?: PlacementPropValues;
|
|
23
|
+
};
|
|
24
|
+
declare type PropKeys = keyof ContextViewOwnProps;
|
|
25
|
+
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
26
|
+
declare type ContextViewProps = ContextViewOwnProps & WithStyleProps;
|
|
27
|
+
declare const propTypes: PropValidators<PropKeys>;
|
|
28
|
+
declare const allowedProps: AllowedPropKeys;
|
|
29
|
+
export type { ContextViewProps };
|
|
30
|
+
export { propTypes, allowedProps };
|
|
31
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -0,0 +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,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,KAAK,EACV,MAAM,EACN,OAAO,EACP,QAAQ,EACR,cAAc,EACf,MAAM,sBAAsB,CAAA;AAE7B,aAAK,mBAAmB,GAAG;IACzB,EAAE,CAAC,EAAE,aAAa,CAAA;IAClB,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACpC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAA;IACtC,UAAU,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IAClC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,SAAS,CAAC,EAAE,mBAAmB,CAAA;CAChC,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,mBAAmB,CAAA;AAEzC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,gBAAgB,GAAG,mBAAmB,GAAG,cAAc,CAAA;AAE5D,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAmEvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAkBnB,CAAA;AAED,YAAY,EAAE,gBAAgB,EAAE,CAAA;AAChC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
package/types/View/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { Component, ComponentType } from 'react';
|
|
3
3
|
import { jsx } from '@instructure/emotion';
|
|
4
|
-
import { OtherHTMLAttributes } from '@instructure/shared-types';
|
|
5
|
-
import { ViewProps } from './
|
|
4
|
+
import type { OtherHTMLAttributes } from '@instructure/shared-types';
|
|
5
|
+
import type { ViewProps } from './props';
|
|
6
6
|
/**
|
|
7
7
|
---
|
|
8
8
|
category: components
|
|
@@ -15,44 +15,76 @@ API:
|
|
|
15
15
|
**/
|
|
16
16
|
declare class View extends Component<ViewProps & OtherHTMLAttributes<ViewProps>> {
|
|
17
17
|
static componentId: string;
|
|
18
|
-
static allowedProps: readonly (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
18
|
+
static allowedProps: readonly (keyof {
|
|
19
|
+
as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
|
|
20
|
+
elementRef?: ((element: HTMLElement | null) => void) | undefined;
|
|
21
|
+
display: "auto" | "inline" | "block" | "inline-block" | "flex" | "inline-flex";
|
|
22
|
+
overflowX: "auto" | "hidden" | "visible";
|
|
23
|
+
overflowY: "auto" | "hidden" | "visible";
|
|
24
|
+
height?: string | number | undefined;
|
|
25
|
+
width?: string | number | undefined;
|
|
26
|
+
maxHeight?: string | number | undefined;
|
|
27
|
+
maxWidth?: string | number | undefined;
|
|
28
|
+
minHeight?: string | number | undefined;
|
|
29
|
+
minWidth?: string | number | undefined;
|
|
30
|
+
children?: import("react").ReactNode;
|
|
31
|
+
textAlign?: "start" | "center" | "end" | undefined;
|
|
32
|
+
borderColor: "transparent" | "primary" | "secondary" | "brand" | "info" | "success" | "warning" | "alert" | "danger";
|
|
33
|
+
background?: "transparent" | "primary" | "secondary" | "brand" | "info" | "success" | "warning" | "alert" | "danger" | "primary-inverse" | undefined;
|
|
34
|
+
position: "static" | "absolute" | "relative" | "sticky" | "fixed";
|
|
35
|
+
insetInlineStart?: string | undefined;
|
|
36
|
+
insetInlineEnd?: string | undefined;
|
|
37
|
+
insetBlockStart?: string | undefined;
|
|
38
|
+
insetBlockEnd?: string | undefined;
|
|
39
|
+
withFocusOutline?: boolean | undefined;
|
|
40
|
+
focusPosition: "offset" | "inset";
|
|
41
|
+
focusColor: "info" | "success" | "danger" | "inverse";
|
|
42
|
+
shouldAnimateFocus: boolean;
|
|
43
|
+
withVisualDebug: boolean;
|
|
44
|
+
dir?: "ltr" | "rtl" | undefined;
|
|
45
|
+
margin?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
|
|
46
|
+
padding?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
|
|
47
|
+
borderWidth?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").BorderWidth | undefined;
|
|
48
|
+
borderRadius?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").BorderRadii | undefined;
|
|
49
|
+
shadow?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Shadow | undefined;
|
|
50
|
+
stacking?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Stacking | undefined;
|
|
51
|
+
cursor?: any;
|
|
52
|
+
})[];
|
|
53
|
+
static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
|
|
54
|
+
as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
|
|
55
|
+
elementRef?: ((element: HTMLElement | null) => void) | undefined;
|
|
56
|
+
display: "auto" | "inline" | "block" | "inline-block" | "flex" | "inline-flex";
|
|
57
|
+
overflowX: "auto" | "hidden" | "visible";
|
|
58
|
+
overflowY: "auto" | "hidden" | "visible";
|
|
59
|
+
height?: string | number | undefined;
|
|
60
|
+
width?: string | number | undefined;
|
|
61
|
+
maxHeight?: string | number | undefined;
|
|
62
|
+
maxWidth?: string | number | undefined;
|
|
63
|
+
minHeight?: string | number | undefined;
|
|
64
|
+
minWidth?: string | number | undefined;
|
|
65
|
+
children?: import("react").ReactNode;
|
|
66
|
+
textAlign?: "start" | "center" | "end" | undefined;
|
|
67
|
+
borderColor: "transparent" | "primary" | "secondary" | "brand" | "info" | "success" | "warning" | "alert" | "danger";
|
|
68
|
+
background?: "transparent" | "primary" | "secondary" | "brand" | "info" | "success" | "warning" | "alert" | "danger" | "primary-inverse" | undefined;
|
|
69
|
+
position: "static" | "absolute" | "relative" | "sticky" | "fixed";
|
|
70
|
+
insetInlineStart?: string | undefined;
|
|
71
|
+
insetInlineEnd?: string | undefined;
|
|
72
|
+
insetBlockStart?: string | undefined;
|
|
73
|
+
insetBlockEnd?: string | undefined;
|
|
74
|
+
withFocusOutline?: boolean | undefined;
|
|
75
|
+
focusPosition: "offset" | "inset";
|
|
76
|
+
focusColor: "info" | "success" | "danger" | "inverse";
|
|
77
|
+
shouldAnimateFocus: boolean;
|
|
78
|
+
withVisualDebug: boolean;
|
|
79
|
+
dir?: "ltr" | "rtl" | undefined;
|
|
80
|
+
margin?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
|
|
81
|
+
padding?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
|
|
82
|
+
borderWidth?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").BorderWidth | undefined;
|
|
83
|
+
borderRadius?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").BorderRadii | undefined;
|
|
84
|
+
shadow?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Shadow | undefined;
|
|
85
|
+
stacking?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Stacking | undefined;
|
|
86
|
+
cursor?: any;
|
|
87
|
+
}>;
|
|
56
88
|
static defaultProps: {
|
|
57
89
|
readonly display: "auto";
|
|
58
90
|
readonly overflowX: "visible";
|
|
@@ -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;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,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;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAMpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExC;;;;;;;;;GASG;AACH,cAEM,IAAK,SAAQ,SAAS,CAAC,SAAS,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACtE,MAAM,CAAC,WAAW,SAAS;IAC3B,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;MAUT;IAUV;;;;;;;OAOG;IACH,MAAM,CAAC,aAAa,UACX,OAAO,MAAM,EAAE,GAAG,CAAC,aACf,cAAc,GAAG,CAAC,yBAiB9B;IAED,OAAO,CAAC,kBAAkB,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,CAAoB;gBAEzB,KAAK,EAAE,SAAS;IAK5B,iBAAiB;IAIjB,kBAAkB;IAoDlB,gBAAgB,OAAQ,WAAW,GAAG,IAAI,UAKzC;IACD,MAAM;CA4CP;AAED,eAAe,IAAI,CAAA;AACnB,OAAO,EAAE,IAAI,EAAE,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AsElementType, PropValidators } from '@instructure/shared-types';
|
|
2
3
|
import type { WithStyleProps, Spacing, BorderWidth, BorderRadii, Shadow, Stacking } from '@instructure/emotion';
|
|
3
|
-
|
|
4
|
-
export declare type ViewOwnProps = {
|
|
4
|
+
declare type ViewOwnProps = {
|
|
5
5
|
/**
|
|
6
6
|
* The element to render as the component root, `span` by default
|
|
7
7
|
*/
|
|
@@ -23,6 +23,10 @@ export declare type ViewOwnProps = {
|
|
|
23
23
|
maxWidth?: string | number;
|
|
24
24
|
minHeight?: string | number;
|
|
25
25
|
minWidth?: string | number;
|
|
26
|
+
/**
|
|
27
|
+
* The children to render inside the <View />
|
|
28
|
+
*/
|
|
29
|
+
children?: React.ReactNode;
|
|
26
30
|
/**
|
|
27
31
|
* Designates the text alignment within the `<View />`
|
|
28
32
|
*/
|
|
@@ -114,44 +118,11 @@ export declare type ViewOwnProps = {
|
|
|
114
118
|
*/
|
|
115
119
|
cursor?: any;
|
|
116
120
|
};
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
margin: (props: any, propName: any, componentName: any, location: any) => any;
|
|
126
|
-
padding: (props: any, propName: any, componentName: any, location: any) => any;
|
|
127
|
-
height: PropTypes.Requireable<string | number>;
|
|
128
|
-
width: PropTypes.Requireable<string | number>;
|
|
129
|
-
maxHeight: PropTypes.Requireable<string | number>;
|
|
130
|
-
maxWidth: PropTypes.Requireable<string | number>;
|
|
131
|
-
minHeight: PropTypes.Requireable<string | number>;
|
|
132
|
-
minWidth: PropTypes.Requireable<string | number>;
|
|
133
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
134
|
-
textAlign: PropTypes.Requireable<string>;
|
|
135
|
-
borderWidth: (props: any, propName: any, componentName: any, location: any) => any;
|
|
136
|
-
borderRadius: (props: any, propName: any, componentName: any, location: any) => any;
|
|
137
|
-
borderColor: PropTypes.Requireable<string>;
|
|
138
|
-
background: PropTypes.Requireable<string>;
|
|
139
|
-
shadow: PropTypes.Requireable<"none" | "resting" | "above" | "topmost">;
|
|
140
|
-
stacking: PropTypes.Requireable<"resting" | "above" | "topmost" | "deepest" | "below">;
|
|
141
|
-
cursor: PropTypes.Requireable<string>;
|
|
142
|
-
position: PropTypes.Requireable<string>;
|
|
143
|
-
insetInlineStart: PropTypes.Requireable<string>;
|
|
144
|
-
insetInlineEnd: PropTypes.Requireable<string>;
|
|
145
|
-
insetBlockStart: PropTypes.Requireable<string>;
|
|
146
|
-
insetBlockEnd: PropTypes.Requireable<string>;
|
|
147
|
-
withFocusOutline: PropTypes.Requireable<boolean>;
|
|
148
|
-
focusPosition: PropTypes.Requireable<string>;
|
|
149
|
-
focusColor: PropTypes.Requireable<string>;
|
|
150
|
-
shouldAnimateFocus: PropTypes.Requireable<boolean>;
|
|
151
|
-
withVisualDebug: PropTypes.Requireable<boolean>;
|
|
152
|
-
makeStyles: PropTypes.Requireable<(...args: any[]) => any>;
|
|
153
|
-
styles: PropTypes.Requireable<object>;
|
|
154
|
-
dir: PropTypes.Requireable<string>;
|
|
155
|
-
};
|
|
156
|
-
export declare const allowedProps: AllowedPropKeys;
|
|
157
|
-
//# sourceMappingURL=types.d.ts.map
|
|
121
|
+
declare type PropKeys = keyof ViewOwnProps;
|
|
122
|
+
declare type ViewProps = ViewOwnProps & WithStyleProps;
|
|
123
|
+
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
124
|
+
declare const propTypes: PropValidators<PropKeys>;
|
|
125
|
+
declare const allowedProps: AllowedPropKeys;
|
|
126
|
+
export { propTypes, allowedProps };
|
|
127
|
+
export type { ViewProps };
|
|
128
|
+
//# sourceMappingURL=props.d.ts.map
|