@pantheon-systems/pds-toolkit-react 1.0.0-dev.189 → 1.0.0-dev.190
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/_dist/css/pds-layouts.css +1 -1
- package/_dist/index.css +1 -1
- package/_dist/index.d.ts +1 -0
- package/_dist/index.js +1719 -1683
- package/_dist/index.js.map +1 -1
- package/_dist/layouts/FlexContainer/FlexContainer.d.ts +44 -17
- package/_dist/utilities/hooks/useWindowWidth.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,38 +1,65 @@
|
|
|
1
1
|
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import { GridGapOptions } from '@layouts/layout-types';
|
|
2
3
|
import './flex-container.css';
|
|
4
|
+
type FlexAlignContent = 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'stretch';
|
|
5
|
+
type FlexAlignItems = 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline';
|
|
6
|
+
type FlexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
|
7
|
+
type FlexJustifyContent = 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
|
|
8
|
+
type FlexWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
9
|
+
type FlexGapOptions = GridGapOptions | 'none';
|
|
3
10
|
interface FlexContainerProps extends ComponentPropsWithoutRef<'div'> {
|
|
4
11
|
/**
|
|
5
|
-
*
|
|
12
|
+
* Aligns content when there is extra space in the cross-axis.
|
|
6
13
|
*/
|
|
7
|
-
alignContent?:
|
|
14
|
+
alignContent?: FlexAlignContent;
|
|
8
15
|
/**
|
|
9
|
-
*
|
|
16
|
+
* Aligns items on the cross axis.
|
|
10
17
|
*/
|
|
11
|
-
alignItems?:
|
|
18
|
+
alignItems?: FlexAlignItems;
|
|
12
19
|
/**
|
|
13
|
-
*
|
|
20
|
+
* Establishes the main-axis, thus defining the direction flex items are placed in the flex container.
|
|
14
21
|
*/
|
|
15
|
-
flexDirection?:
|
|
22
|
+
flexDirection?: FlexDirection;
|
|
16
23
|
/**
|
|
17
|
-
*
|
|
24
|
+
* If the items do not fit in one line (row or column, depending on flexDirection), how should they wrap.
|
|
18
25
|
*/
|
|
19
|
-
flexWrap?:
|
|
26
|
+
flexWrap?: FlexWrap;
|
|
20
27
|
/**
|
|
21
|
-
*
|
|
28
|
+
* Gap between items.
|
|
22
29
|
*/
|
|
23
|
-
|
|
30
|
+
gap?: FlexGapOptions;
|
|
24
31
|
/**
|
|
25
|
-
*
|
|
32
|
+
* Alignment along the main axis.
|
|
26
33
|
*/
|
|
27
|
-
|
|
34
|
+
justifyContent?: FlexJustifyContent;
|
|
28
35
|
/**
|
|
29
|
-
*
|
|
36
|
+
* Align content on mobile. If not set, will default to the same value as `alignContent`.
|
|
30
37
|
*/
|
|
31
|
-
|
|
38
|
+
mobileAlignContent?: FlexAlignContent;
|
|
32
39
|
/**
|
|
33
|
-
*
|
|
40
|
+
* Align items on mobile. If not set, will default to the same value as `alignItems`.
|
|
34
41
|
*/
|
|
35
|
-
|
|
42
|
+
mobileAlignItems?: FlexAlignItems;
|
|
43
|
+
/**
|
|
44
|
+
* Flex direction for mobile.
|
|
45
|
+
*/
|
|
46
|
+
mobileFlexDirection?: FlexDirection;
|
|
47
|
+
/**
|
|
48
|
+
* Flex wrap for mobile. If not set, will default to the same value as `flexWrap`.
|
|
49
|
+
*/
|
|
50
|
+
mobileFlexWrap?: FlexWrap;
|
|
51
|
+
/**
|
|
52
|
+
* Gap between items on mobile. If not set, will default to the same value as `gap`.
|
|
53
|
+
*/
|
|
54
|
+
mobileGap?: FlexGapOptions;
|
|
55
|
+
/**
|
|
56
|
+
* Justify content for mobile. If not set, will default to the same value as `justifyContent`.
|
|
57
|
+
*/
|
|
58
|
+
mobileJustifyContent?: FlexJustifyContent;
|
|
59
|
+
/**
|
|
60
|
+
* Container content.
|
|
61
|
+
*/
|
|
62
|
+
children?: ReactNode;
|
|
36
63
|
/**
|
|
37
64
|
* Additional class names
|
|
38
65
|
*/
|
|
@@ -41,5 +68,5 @@ interface FlexContainerProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
41
68
|
/**
|
|
42
69
|
* Flex Container UI component
|
|
43
70
|
*/
|
|
44
|
-
export declare const FlexContainer: ({ alignContent, alignItems, flexDirection, flexWrap, justifyContent,
|
|
71
|
+
export declare const FlexContainer: ({ alignContent, alignItems, flexDirection, flexWrap, gap, justifyContent, mobileAlignItems, mobileAlignContent, mobileFlexDirection, mobileFlexWrap, mobileGap, mobileJustifyContent, children, className, ...props }: FlexContainerProps) => React.JSX.Element;
|
|
45
72
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useWindowWidth: () => number;
|