@instructure/ui-flex 8.8.1-snapshot.8 → 8.9.1

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.
Files changed (41) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/es/Flex/Item/index.js +4 -85
  3. package/es/Flex/Item/props.js +102 -0
  4. package/es/Flex/index.js +5 -92
  5. package/es/Flex/props.js +105 -0
  6. package/lib/Flex/Item/index.js +4 -85
  7. package/lib/Flex/Item/props.js +114 -0
  8. package/lib/Flex/index.js +5 -92
  9. package/lib/Flex/props.js +117 -0
  10. package/package.json +10 -11
  11. package/src/Flex/Item/index.tsx +7 -73
  12. package/src/Flex/Item/props.ts +137 -0
  13. package/src/Flex/Item/styles.ts +1 -1
  14. package/src/Flex/__examples__/Flex.examples.tsx +1 -1
  15. package/src/Flex/index.tsx +8 -93
  16. package/src/Flex/props.ts +150 -0
  17. package/src/Flex/styles.ts +1 -1
  18. package/src/index.ts +2 -2
  19. package/types/Flex/Item/index.d.ts +33 -66
  20. package/types/Flex/Item/index.d.ts.map +1 -1
  21. package/types/Flex/Item/props.d.ts +27 -0
  22. package/types/Flex/Item/props.d.ts.map +1 -0
  23. package/types/Flex/Item/styles.d.ts +1 -1
  24. package/types/Flex/__examples__/Flex.examples.d.ts +1 -1
  25. package/types/Flex/index.d.ts +33 -75
  26. package/types/Flex/index.d.ts.map +1 -1
  27. package/types/Flex/props.d.ts +27 -0
  28. package/types/Flex/props.d.ts.map +1 -0
  29. package/types/Flex/styles.d.ts +1 -1
  30. package/types/index.d.ts +2 -2
  31. package/LICENSE.md +0 -27
  32. package/es/Flex/Item/types.js +0 -1
  33. package/es/Flex/types.js +0 -1
  34. package/lib/Flex/Item/types.js +0 -1
  35. package/lib/Flex/types.js +0 -1
  36. package/src/Flex/Item/types.ts +0 -44
  37. package/src/Flex/types.ts +0 -45
  38. package/types/Flex/Item/types.d.ts +0 -20
  39. package/types/Flex/Item/types.d.ts.map +0 -1
  40. package/types/Flex/types.d.ts +0 -21
  41. package/types/Flex/types.d.ts.map +0 -1
@@ -23,7 +23,7 @@
23
23
  */
24
24
 
25
25
  import { FlexTheme } from '@instructure/shared-types'
26
- import { FlexProps } from './types'
26
+ import { FlexProps } from './props'
27
27
 
28
28
  /**
29
29
  * ---
package/src/index.ts CHANGED
@@ -24,5 +24,5 @@
24
24
 
25
25
  export { Flex, FlexItem } from './Flex'
26
26
 
27
- export type { FlexProps } from './Flex/types'
28
- export type { FlexItemProps } from './Flex/Item/types'
27
+ export type { FlexProps } from './Flex/props'
28
+ export type { FlexItemProps } from './Flex/Item/props'
@@ -1,8 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import { Component } from 'react';
3
- import PropTypes from 'prop-types';
4
3
  import { jsx } from '@instructure/emotion';
5
- import { FlexItemProps } from './types';
4
+ import type { FlexItemProps } from './props';
6
5
  /**
7
6
  ---
8
7
  parent: Flex
@@ -13,70 +12,38 @@ declare class Item extends Component<FlexItemProps> {
13
12
  static readonly componentId = "Flex.Item";
14
13
  componentDidMount(): void;
15
14
  componentDidUpdate(): void;
16
- static propTypes: {
17
- makeStyles: PropTypes.Requireable<(...args: any[]) => any>;
18
- styles: PropTypes.Requireable<object>;
19
- /**
20
- * The children to render inside the Item`
21
- */
22
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
23
- /**
24
- * the element type to render as
25
- */
26
- as: PropTypes.Requireable<PropTypes.ReactComponentLike>;
27
- /**
28
- * provides a reference to the underlying html root element
29
- */
30
- elementRef: PropTypes.Requireable<(...args: any[]) => any>;
31
- /**
32
- * Valid values are `0`, `none`, `auto`, `xxx-small`, `xx-small`, `x-small`,
33
- * `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
34
- * familiar CSS-like shorthand. For example: `margin="small auto large"`.
35
- */
36
- margin: (props: any, propName: any, componentName: any, location: any) => any;
37
- /**
38
- * Valid values are `0`, `none`, `xxx-small`, `xx-small`, `x-small`,
39
- * `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
40
- * familiar CSS-like shorthand. For example: `padding="small x-large large"`.
41
- */
42
- padding: (props: any, propName: any, componentName: any, location: any) => any;
43
- /**
44
- * overrides the parent Flex's alignItems prop, if needed
45
- */
46
- align: PropTypes.Requireable<string>;
47
- /**
48
- * Inherits from the parent Flex component
49
- */
50
- direction: PropTypes.Requireable<string>;
51
- /**
52
- * Designates the text alignment inside the Item
53
- */
54
- textAlign: PropTypes.Requireable<string>;
55
- /**
56
- * Handles horizontal overflow
57
- */
58
- overflowX: PropTypes.Requireable<string>;
59
- /**
60
- * Handles vertical overflow
61
- */
62
- overflowY: PropTypes.Requireable<string>;
63
- /**
64
- * Should the FlexItem grow to fill any available space?
65
- */
66
- shouldGrow: PropTypes.Requireable<boolean>;
67
- /**
68
- * Should the FlexItem shrink (stopping at its `size`)?
69
- */
70
- shouldShrink: PropTypes.Requireable<boolean>;
71
- /**
72
- * Sets the base size of the FlexItem (width if direction is `row`; height if direction is `column`)
73
- */
74
- size: PropTypes.Requireable<string>;
75
- /**
76
- * Places dashed lines around the component's borders to help debug your layout
77
- */
78
- withVisualDebug: PropTypes.Requireable<boolean>;
79
- };
15
+ static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
16
+ children?: import("react").ReactNode;
17
+ as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
18
+ elementRef?: ((...args: any[]) => any) | undefined;
19
+ margin?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
20
+ padding?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
21
+ align?: "center" | "start" | "end" | "stretch" | undefined;
22
+ direction?: "row" | "column" | undefined;
23
+ textAlign?: "center" | "start" | "end" | undefined;
24
+ overflowX?: "auto" | "hidden" | "visible" | undefined;
25
+ overflowY?: "auto" | "hidden" | "visible" | undefined;
26
+ shouldGrow?: boolean | undefined;
27
+ shouldShrink?: boolean | undefined;
28
+ size?: string | undefined;
29
+ withVisualDebug?: boolean | undefined;
30
+ }>;
31
+ static allowedProps: readonly (keyof {
32
+ children?: import("react").ReactNode;
33
+ as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
34
+ elementRef?: ((...args: any[]) => any) | undefined;
35
+ margin?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
36
+ padding?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
37
+ align?: "center" | "start" | "end" | "stretch" | undefined;
38
+ direction?: "row" | "column" | undefined;
39
+ textAlign?: "center" | "start" | "end" | undefined;
40
+ overflowX?: "auto" | "hidden" | "visible" | undefined;
41
+ overflowY?: "auto" | "hidden" | "visible" | undefined;
42
+ shouldGrow?: boolean | undefined;
43
+ shouldShrink?: boolean | undefined;
44
+ size?: string | undefined;
45
+ withVisualDebug?: boolean | undefined;
46
+ })[];
80
47
  static defaultProps: {
81
48
  as: string;
82
49
  elementRef: (el: any) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Flex/Item/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,SAAS,MAAM,YAAY,CAAA;AAIlC,OAAO,EAAa,GAAG,EAAsB,MAAM,sBAAsB,CAAA;AAGzE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAEvC;;;;;GAKG;AACH,cACM,IAAK,SAAQ,SAAS,CAAC,aAAa,CAAC;IACzC,MAAM,CAAC,QAAQ,CAAC,WAAW,eAAc;IAEzC,iBAAiB;IAKjB,kBAAkB;IAMlB,MAAM,CAAC,SAAS;;;QAKd;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;;;WAIG;;QAEH;;;;WAIG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;MAEJ;IAGD,MAAM,CAAC,YAAY;;yBAGA,GAAG;;;MAGrB;IAED,MAAM;CAwCP;AAED,eAAe,IAAI,CAAA;AACnB,OAAO,EAAE,IAAI,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Flex/Item/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAIjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAKrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5C;;;;;GAKG;AACH,cACM,IAAK,SAAQ,SAAS,CAAC,aAAa,CAAC;IACzC,MAAM,CAAC,QAAQ,CAAC,WAAW,eAAc;IAEzC,iBAAiB;IAKjB,kBAAkB;IAKlB,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;yBAGA,GAAG;;;MAGrB;IAED,MAAM;CAwCP;AAED,eAAe,IAAI,CAAA;AACnB,OAAO,EAAE,IAAI,EAAE,CAAA"}
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import type { AsElementType, PropValidators } from '@instructure/shared-types';
3
+ import type { Spacing, WithStyleProps } from '@instructure/emotion';
4
+ declare type FlexItemOwnProps = {
5
+ children?: React.ReactNode;
6
+ as?: AsElementType;
7
+ elementRef?: (...args: any[]) => any;
8
+ margin?: Spacing;
9
+ padding?: Spacing;
10
+ align?: 'center' | 'start' | 'end' | 'stretch';
11
+ direction?: 'row' | 'column';
12
+ textAlign?: 'start' | 'center' | 'end';
13
+ overflowX?: 'auto' | 'hidden' | 'visible';
14
+ overflowY?: 'auto' | 'hidden' | 'visible';
15
+ shouldGrow?: boolean;
16
+ shouldShrink?: boolean;
17
+ size?: string;
18
+ withVisualDebug?: boolean;
19
+ };
20
+ declare type PropKeys = keyof FlexItemOwnProps;
21
+ declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
22
+ declare type FlexItemProps = FlexItemOwnProps & WithStyleProps;
23
+ declare const propTypes: PropValidators<PropKeys>;
24
+ declare const allowedProps: AllowedPropKeys;
25
+ export type { FlexItemProps };
26
+ export { propTypes, allowedProps };
27
+ //# sourceMappingURL=props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/Flex/Item/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC9E,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAEnE,aAAK,gBAAgB,GAAG;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,EAAE,CAAC,EAAE,aAAa,CAAA;IAClB,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACpC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,CAAA;IAC9C,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAA;IAC5B,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAA;IACtC,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAA;IACzC,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAA;IACzC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,gBAAgB,CAAA;AAEtC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,aAAa,GAAG,gBAAgB,GAAG,cAAc,CAAA;AAEtD,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CA6DvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAenB,CAAA;AAED,YAAY,EAAE,aAAa,EAAE,CAAA;AAC7B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
@@ -1,4 +1,4 @@
1
- import { FlexItemProps } from './types';
1
+ import { FlexItemProps } from './props';
2
2
  /**
3
3
  * ---
4
4
  * private: true
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { FlexProps } from '../types';
2
+ import { FlexProps } from '../props';
3
3
  declare const _default: {
4
4
  maxExamplesPerPage: number;
5
5
  propValues: {
@@ -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 { Item } from './Item';
6
- import { FlexProps } from './types';
5
+ import type { FlexProps } from './props';
7
6
  /**
8
7
  ---
9
8
  category: components
@@ -15,73 +14,38 @@ declare class Flex extends Component<FlexProps> {
15
14
  constructor(props: FlexProps);
16
15
  componentDidUpdate(): void;
17
16
  static Item: typeof Item;
18
- static propTypes: {
19
- /**
20
- * It's recommended that you use `Flex.Item` for children, but you can also pass any markup or a function
21
- * returning markup. Note that if you do not use `Flex.Item`, the `withVisualDebug` and `direction` props
22
- * will not automatically be set on the children.
23
- */
24
- children: PropTypes.Requireable<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
25
- /**
26
- * the element type to render as
27
- */
28
- as: PropTypes.Requireable<PropTypes.ReactComponentLike>;
29
- /**
30
- * provides a reference to the underlying html root element
31
- */
32
- elementRef: PropTypes.Requireable<(...args: any[]) => any>;
33
- /**
34
- * Sets the height of the component's container (optional)
35
- */
36
- height: PropTypes.Requireable<string | number>;
37
- /**
38
- * Sets the width of the component's container (optional)
39
- */
40
- width: PropTypes.Requireable<string | number>;
41
- /**
42
- * Valid values are `0`, `none`, `auto`, `xxx-small`, `xx-small`, `x-small`,
43
- * `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
44
- * familiar CSS-like shorthand. For example: `margin="small auto large"`.
45
- */
46
- margin: (props: any, propName: any, componentName: any, location: any) => any;
47
- /**
48
- * Valid values are `0`, `none`, `xxx-small`, `xx-small`, `x-small`,
49
- * `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
50
- * familiar CSS-like shorthand. For example: `padding="small x-large large"`.
51
- */
52
- padding: (props: any, propName: any, componentName: any, location: any) => any;
53
- /**
54
- * Sets the CSS display rule for the component's container
55
- */
56
- display: PropTypes.Requireable<string>;
57
- /**
58
- * Designates the text alignment
59
- */
60
- textAlign: PropTypes.Requireable<string>;
61
- /**
62
- * Sets the flex-direction to row (horizontal) or column (vertical)
63
- */
64
- direction: PropTypes.Requireable<string>;
65
- /**
66
- * Aligns Flex.Items on the vertical axis (horizontal if direction is column)
67
- */
68
- alignItems: PropTypes.Requireable<string>;
69
- /**
70
- * Aligns Flex.Items on the horizontal axis (vertical if direction is column)
71
- */
72
- justifyItems: PropTypes.Requireable<string>;
73
- /**
74
- * Determines if the Flex.Items should wrap when they exceed their container's width
75
- */
76
- wrap: PropTypes.Requireable<string>;
77
- /**
78
- * Activate a dotted outline around the component to make building your
79
- * layout easier
80
- */
81
- withVisualDebug: PropTypes.Requireable<boolean>;
82
- makeStyles: PropTypes.Requireable<(...args: any[]) => any>;
83
- styles: PropTypes.Requireable<object>;
84
- };
17
+ static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
18
+ children?: import("react").ReactNode | ((...args: any[]) => import("react").ReactNode);
19
+ as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
20
+ elementRef?: ((...args: any[]) => any) | undefined;
21
+ height?: string | number | undefined;
22
+ width?: string | number | undefined;
23
+ margin?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
24
+ padding?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
25
+ display?: "flex" | "inline-flex" | undefined;
26
+ textAlign?: "center" | "start" | "end" | undefined;
27
+ direction?: "row" | "column" | "row-reverse" | "column-reverse" | undefined;
28
+ alignItems?: "center" | "start" | "end" | "stretch" | undefined;
29
+ justifyItems?: "center" | "start" | "end" | "space-around" | "space-between" | undefined;
30
+ wrap?: "wrap" | "no-wrap" | "wrap-reverse" | undefined;
31
+ withVisualDebug?: boolean | undefined;
32
+ }>;
33
+ static allowedProps: readonly (keyof {
34
+ children?: import("react").ReactNode | ((...args: any[]) => import("react").ReactNode);
35
+ as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
36
+ elementRef?: ((...args: any[]) => any) | undefined;
37
+ height?: string | number | undefined;
38
+ width?: string | number | undefined;
39
+ margin?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
40
+ padding?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
41
+ display?: "flex" | "inline-flex" | undefined;
42
+ textAlign?: "center" | "start" | "end" | undefined;
43
+ direction?: "row" | "column" | "row-reverse" | "column-reverse" | undefined;
44
+ alignItems?: "center" | "start" | "end" | "stretch" | undefined;
45
+ justifyItems?: "center" | "start" | "end" | "space-around" | "space-between" | undefined;
46
+ wrap?: "wrap" | "no-wrap" | "wrap-reverse" | undefined;
47
+ withVisualDebug?: boolean | undefined;
48
+ })[];
85
49
  static defaultProps: {
86
50
  children: null;
87
51
  as: string;
@@ -91,12 +55,6 @@ declare class Flex extends Component<FlexProps> {
91
55
  display: string;
92
56
  withVisualDebug: boolean;
93
57
  wrap: string;
94
- width: undefined;
95
- height: undefined;
96
- padding: undefined;
97
- margin: undefined;
98
- alignItems: undefined;
99
- textAlign: undefined;
100
58
  };
101
59
  renderChildren(children: any): any;
102
60
  render(): jsx.JSX.Element | null;
@@ -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;AAC3C,OAAO,SAAS,MAAM,YAAY,CAAA;AASlC,OAAO,EAAa,GAAG,EAAsB,MAAM,sBAAsB,CAAA;AAEzE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAI7B,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnC;;;;;GAKG;AACH,cACM,IAAK,SAAQ,SAAS,CAAC,SAAS,CAAC;IACrC,MAAM,CAAC,QAAQ,CAAC,WAAW,UAAS;gBAExB,KAAK,EAAE,SAAS;IAM5B,kBAAkB;IAKlB,MAAM,CAAC,IAAI,cAAO;IAElB,MAAM,CAAC,SAAS;QACd;;;;WAIG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;;;WAIG;;QAEH;;;;WAIG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAOH;;WAEG;;QAEH;;WAEG;;QAQH;;WAEG;;QAEH;;;WAGG;;;;MAOJ;IAED,MAAM,CAAC,YAAY;;;yBAIA,GAAG;;;;;;;;;;;;MAYrB;IAED,cAAc,CAAC,QAAQ,EAAE,GAAG;IAiB5B,MAAM;CAsCP;AAED,eAAe,IAAI,CAAA;AACnB,OAAO,EAAE,IAAI,EAAE,IAAI,IAAI,QAAQ,EAAE,CAAA"}
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;AAS3C,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAErD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAM7B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExC;;;;;GAKG;AACH,cACM,IAAK,SAAQ,SAAS,CAAC,SAAS,CAAC;IACrC,MAAM,CAAC,QAAQ,CAAC,WAAW,UAAS;gBAExB,KAAK,EAAE,SAAS;IAM5B,kBAAkB;IAKlB,MAAM,CAAC,IAAI,cAAO;IAElB,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;yBAIA,GAAG;;;;;;MAMrB;IAED,cAAc,CAAC,QAAQ,EAAE,GAAG;IAiB5B,MAAM;CAsCP;AAED,eAAe,IAAI,CAAA;AACnB,OAAO,EAAE,IAAI,EAAE,IAAI,IAAI,QAAQ,EAAE,CAAA"}
@@ -0,0 +1,27 @@
1
+ /// <reference types="react" />
2
+ import type { AsElementType, PropValidators } from '@instructure/shared-types';
3
+ import type { Spacing, WithStyleProps } from '@instructure/emotion';
4
+ declare type FlexOwnProps = {
5
+ children?: React.ReactNode | ((...args: any[]) => React.ReactNode);
6
+ as?: AsElementType;
7
+ elementRef?: (...args: any[]) => any;
8
+ height?: string | number;
9
+ width?: string | number;
10
+ margin?: Spacing;
11
+ padding?: Spacing;
12
+ display?: 'flex' | 'inline-flex';
13
+ textAlign?: 'start' | 'center' | 'end';
14
+ direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
15
+ alignItems?: 'center' | 'start' | 'end' | 'stretch';
16
+ justifyItems?: 'center' | 'start' | 'end' | 'space-around' | 'space-between';
17
+ wrap?: 'wrap' | 'no-wrap' | 'wrap-reverse';
18
+ withVisualDebug?: boolean;
19
+ };
20
+ declare type PropKeys = keyof FlexOwnProps;
21
+ declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
22
+ declare type FlexProps = FlexOwnProps & WithStyleProps;
23
+ declare const propTypes: PropValidators<PropKeys>;
24
+ declare const allowedProps: AllowedPropKeys;
25
+ export type { FlexProps };
26
+ export { propTypes, allowedProps };
27
+ //# sourceMappingURL=props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Flex/props.ts"],"names":[],"mappings":";AA4BA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC9E,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAEnE,aAAK,YAAY,GAAG;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,KAAK,CAAC,SAAS,CAAC,CAAA;IAClE,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,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,GAAG,aAAa,CAAA;IAChC,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAA;IACtC,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,aAAa,GAAG,gBAAgB,CAAA;IAC/D,UAAU,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,CAAA;IACnD,YAAY,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,cAAc,GAAG,eAAe,CAAA;IAC5E,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,cAAc,CAAA;IAC1C,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,YAAY,CAAA;AAElC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,SAAS,GAAG,YAAY,GAAG,cAAc,CAAA;AAE9C,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CA2EvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAenB,CAAA;AAED,YAAY,EAAE,SAAS,EAAE,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { FlexTheme } from '@instructure/shared-types';
2
- import { FlexProps } from './types';
2
+ import { FlexProps } from './props';
3
3
  /**
4
4
  * ---
5
5
  * private: true
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { Flex, FlexItem } from './Flex';
2
- export type { FlexProps } from './Flex/types';
3
- export type { FlexItemProps } from './Flex/Item/types';
2
+ export type { FlexProps } from './Flex/props';
3
+ export type { FlexItemProps } from './Flex/Item/props';
4
4
  //# sourceMappingURL=index.d.ts.map
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.
@@ -1 +0,0 @@
1
- export {};
package/es/Flex/types.js DELETED
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- "use strict";
package/lib/Flex/types.js DELETED
@@ -1 +0,0 @@
1
- "use strict";
@@ -1,44 +0,0 @@
1
- /*
2
- * The MIT License (MIT)
3
- *
4
- * Copyright (c) 2015 - present Instructure, Inc.
5
- *
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in all
14
- * copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- */
24
-
25
- import { AsElementType } from '@instructure/shared-types'
26
- import type { Spacing } from '@instructure/emotion'
27
-
28
- export type FlexItemProps = {
29
- makeStyles?: (...args: any[]) => any
30
- styles?: any
31
- as?: AsElementType
32
- elementRef?: (...args: any[]) => any
33
- margin?: Spacing
34
- padding?: Spacing
35
- align?: 'center' | 'start' | 'end' | 'stretch'
36
- direction?: 'row' | 'column'
37
- textAlign?: 'start' | 'center' | 'end'
38
- overflowX?: 'auto' | 'hidden' | 'visible'
39
- overflowY?: 'auto' | 'hidden' | 'visible'
40
- shouldGrow?: boolean
41
- shouldShrink?: boolean
42
- size?: string
43
- withVisualDebug?: boolean
44
- }