@instructure/ui-flex 8.12.1-snapshot.7 → 8.13.1-snapshot.9
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/Flex/Item/index.js +21 -17
- package/es/Flex/Item/props.js +0 -59
- package/es/Flex/Item/styles.js +1 -1
- package/es/Flex/index.js +24 -20
- package/es/Flex/props.js +0 -62
- package/lib/Flex/Item/index.js +22 -18
- package/lib/Flex/Item/props.js +1 -60
- package/lib/Flex/Item/styles.js +1 -1
- package/lib/Flex/index.js +28 -21
- package/lib/Flex/props.js +1 -63
- package/package.json +10 -10
- package/src/Flex/Item/index.tsx +3 -6
- package/src/Flex/Item/props.ts +54 -41
- package/src/Flex/Item/styles.ts +1 -2
- package/src/Flex/index.tsx +14 -15
- package/src/Flex/props.ts +66 -50
- package/types/Flex/Item/index.d.ts +1 -1
- package/types/Flex/Item/index.d.ts.map +1 -1
- package/types/Flex/Item/props.d.ts +46 -0
- package/types/Flex/Item/props.d.ts.map +1 -1
- package/types/Flex/Item/styles.d.ts +1 -1
- package/types/Flex/Item/styles.d.ts.map +1 -1
- package/types/Flex/index.d.ts +8 -19
- package/types/Flex/index.d.ts.map +1 -1
- package/types/Flex/props.d.ts +53 -2
- package/types/Flex/props.d.ts.map +1 -1
|
@@ -9,6 +9,6 @@ import type { FlexItemProps, FlexItemStyle } from './props';
|
|
|
9
9
|
* @param {Object} state the state of the component, the style is applied to
|
|
10
10
|
* @return {Object} The final style object, which will be used in the component
|
|
11
11
|
*/
|
|
12
|
-
declare const generateStyle: (
|
|
12
|
+
declare const generateStyle: (_componentTheme: null, props: FlexItemProps) => FlexItemStyle;
|
|
13
13
|
export default generateStyle;
|
|
14
14
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Flex/Item/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE3D;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Flex/Item/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE3D;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,oBACA,IAAI,SACd,aAAa,KACnB,aAuBF,CAAA;AAED,eAAe,aAAa,CAAA"}
|
package/types/Flex/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { Component } from 'react';
|
|
2
|
+
import React, { Component } from 'react';
|
|
3
3
|
import { jsx } from '@instructure/emotion';
|
|
4
4
|
import { Item } from './Item';
|
|
5
5
|
import type { FlexProps } from './props';
|
|
@@ -8,22 +8,18 @@ import type { FlexProps } from './props';
|
|
|
8
8
|
category: components
|
|
9
9
|
---
|
|
10
10
|
@module Flex
|
|
11
|
+
@tsProps
|
|
11
12
|
**/
|
|
12
13
|
declare class Flex extends Component<FlexProps> {
|
|
13
14
|
static readonly componentId = "Flex";
|
|
14
|
-
|
|
15
|
+
componentDidMount(): void;
|
|
15
16
|
componentDidUpdate(): void;
|
|
16
17
|
static Item: typeof Item;
|
|
17
18
|
static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
|
|
18
|
-
children?:
|
|
19
|
+
children?: React.ReactNode | (() => React.ReactNode);
|
|
19
20
|
as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
|
|
20
21
|
elementRef?: ((element: Element | null) => void) | undefined;
|
|
21
|
-
height?: string | number | undefined;
|
|
22
|
-
---
|
|
23
|
-
category: components
|
|
24
|
-
---
|
|
25
|
-
@module Flex
|
|
26
|
-
**/
|
|
22
|
+
height?: string | number | undefined;
|
|
27
23
|
width?: string | number | undefined;
|
|
28
24
|
margin?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
|
|
29
25
|
padding?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
|
|
@@ -36,15 +32,10 @@ declare class Flex extends Component<FlexProps> {
|
|
|
36
32
|
withVisualDebug?: boolean | undefined;
|
|
37
33
|
}>;
|
|
38
34
|
static allowedProps: readonly (keyof {
|
|
39
|
-
children?:
|
|
35
|
+
children?: React.ReactNode | (() => React.ReactNode);
|
|
40
36
|
as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
|
|
41
37
|
elementRef?: ((element: Element | null) => void) | undefined;
|
|
42
|
-
height?: string | number | undefined;
|
|
43
|
-
---
|
|
44
|
-
category: components
|
|
45
|
-
---
|
|
46
|
-
@module Flex
|
|
47
|
-
**/
|
|
38
|
+
height?: string | number | undefined;
|
|
48
39
|
width?: string | number | undefined;
|
|
49
40
|
margin?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
|
|
50
41
|
padding?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
|
|
@@ -57,9 +48,7 @@ declare class Flex extends Component<FlexProps> {
|
|
|
57
48
|
withVisualDebug?: boolean | undefined;
|
|
58
49
|
})[];
|
|
59
50
|
static defaultProps: {
|
|
60
|
-
children: null;
|
|
61
51
|
as: string;
|
|
62
|
-
elementRef: (el: any) => void;
|
|
63
52
|
direction: string;
|
|
64
53
|
justifyItems: string;
|
|
65
54
|
display: string;
|
|
@@ -68,7 +57,7 @@ declare class Flex extends Component<FlexProps> {
|
|
|
68
57
|
};
|
|
69
58
|
ref: Element | null;
|
|
70
59
|
handleRef: (el: Element | null) => void;
|
|
71
|
-
renderChildren(children:
|
|
60
|
+
renderChildren(children: FlexProps['children']): {}[] | null | undefined;
|
|
72
61
|
render(): jsx.JSX.Element | null;
|
|
73
62
|
}
|
|
74
63
|
export default Flex;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Flex/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAY,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Flex/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,KAAK,EAAE,EAAY,SAAS,EAAE,MAAM,OAAO,CAAA;AASlD,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAErD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAO7B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExC;;;;;;GAMG;AACH,cACM,IAAK,SAAQ,SAAS,CAAC,SAAS,CAAC;IACrC,MAAM,CAAC,QAAQ,CAAC,WAAW,UAAS;IAEpC,iBAAiB;IAIjB,kBAAkB;IAIlB,MAAM,CAAC,IAAI,cAAO;IAElB,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;;;;MAOlB;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,OAAQ,OAAO,GAAG,IAAI,UAQ9B;IAED,cAAc,CAAC,QAAQ,EAAE,SAAS,CAAC,UAAU,CAAC;IAoB9C,MAAM;CAqCP;AAED,eAAe,IAAI,CAAA;AACnB,OAAO,EAAE,IAAI,EAAE,IAAI,IAAI,QAAQ,EAAE,CAAA"}
|
package/types/Flex/props.d.ts
CHANGED
|
@@ -1,20 +1,71 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { AsElementType, PropValidators, FlexTheme, OtherHTMLAttributes } from '@instructure/shared-types';
|
|
3
3
|
import type { Spacing, WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
4
4
|
declare type FlexOwnProps = {
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* It's recommended that you use `Flex.Item` for children, but you can also
|
|
7
|
+
* pass any markup or a function returning markup.
|
|
8
|
+
*
|
|
9
|
+
* Note that if you do not use `Flex.Item`, the `withVisualDebug` and
|
|
10
|
+
* `direction` props will not automatically be set on the children.
|
|
11
|
+
*/
|
|
12
|
+
children?: React.ReactNode | (() => React.ReactNode);
|
|
13
|
+
/**
|
|
14
|
+
* the element type to render as
|
|
15
|
+
*/
|
|
6
16
|
as?: AsElementType;
|
|
17
|
+
/**
|
|
18
|
+
* provides a reference to the underlying html root element
|
|
19
|
+
*/
|
|
7
20
|
elementRef?: (element: Element | null) => void;
|
|
21
|
+
/**
|
|
22
|
+
* Sets the height of the component's container (optional)
|
|
23
|
+
*/
|
|
8
24
|
height?: string | number;
|
|
25
|
+
/**
|
|
26
|
+
* Sets the width of the component's container (optional)
|
|
27
|
+
*/
|
|
9
28
|
width?: string | number;
|
|
29
|
+
/**
|
|
30
|
+
* Valid values are `0`, `none`, `auto`, `xxx-small`, `xx-small`, `x-small`,
|
|
31
|
+
* `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
|
|
32
|
+
* familiar CSS-like shorthand. For example: `margin="small auto large"`.
|
|
33
|
+
*/
|
|
10
34
|
margin?: Spacing;
|
|
35
|
+
/**
|
|
36
|
+
* Valid values are `0`, `none`, `xxx-small`, `xx-small`, `x-small`,
|
|
37
|
+
* `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
|
|
38
|
+
* familiar CSS-like shorthand. For example: `padding="small x-large large"`.
|
|
39
|
+
*/
|
|
11
40
|
padding?: Spacing;
|
|
41
|
+
/**
|
|
42
|
+
* Sets the CSS display rule for the component's container
|
|
43
|
+
*/
|
|
12
44
|
display?: 'flex' | 'inline-flex';
|
|
45
|
+
/**
|
|
46
|
+
* Designates the text alignment
|
|
47
|
+
*/
|
|
13
48
|
textAlign?: 'start' | 'center' | 'end';
|
|
49
|
+
/**
|
|
50
|
+
* Sets the flex-direction to row (horizontal) or column (vertical)
|
|
51
|
+
*/
|
|
14
52
|
direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
53
|
+
/**
|
|
54
|
+
* Aligns Flex.Items on the vertical axis (horizontal if direction is column)
|
|
55
|
+
*/
|
|
15
56
|
alignItems?: 'center' | 'start' | 'end' | 'stretch';
|
|
57
|
+
/**
|
|
58
|
+
* Aligns Flex.Items on the horizontal axis (vertical if direction is column)
|
|
59
|
+
*/
|
|
16
60
|
justifyItems?: 'center' | 'start' | 'end' | 'space-around' | 'space-between';
|
|
61
|
+
/**
|
|
62
|
+
* Determines if the Flex.Items should wrap when they exceed their container's width
|
|
63
|
+
*/
|
|
17
64
|
wrap?: 'wrap' | 'no-wrap' | 'wrap-reverse';
|
|
65
|
+
/**
|
|
66
|
+
* Activate a dotted outline around the component to make building your
|
|
67
|
+
* layout easier
|
|
68
|
+
*/
|
|
18
69
|
withVisualDebug?: boolean;
|
|
19
70
|
};
|
|
20
71
|
declare type PropKeys = keyof FlexOwnProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Flex/props.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Flex/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,SAAS,EACT,mBAAmB,EACpB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,cAAc,EACf,MAAM,sBAAsB,CAAA;AAE7B,aAAK,YAAY,GAAG;IAClB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,MAAM,KAAK,CAAC,SAAS,CAAC,CAAA;IAEpD;;OAEG;IACH,EAAE,CAAC,EAAE,aAAa,CAAA;IAEl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