@adamjanicki/ui 1.5.9 → 1.6.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.
- package/README.md +2 -2
- package/components/Accordion/Accordion.js +3 -3
- package/components/Box/Box.js +3 -38
- package/components/Button/Button.d.ts +7 -2
- package/components/Button/Button.js +3 -2
- package/components/Carousel/Carousel.js +5 -1
- package/components/Icon/Icon.d.ts +3 -2
- package/components/Icon/Icon.js +2 -4
- package/components/Icon/icons.d.ts +2 -7
- package/components/Icon/icons.js +174 -23
- package/components/Layer/Layer.js +2 -2
- package/components/Link/Link.d.ts +11 -2
- package/components/Link/Link.js +3 -2
- package/components/Select/Select.js +1 -1
- package/functions/classNames.js +4 -1
- package/package.json +5 -3
- package/style.css +1 -564
- package/utils/transformLayout.d.ts +2 -0
- package/utils/transformLayout.js +76 -0
- package/utils/types.d.ts +51 -34
package/utils/types.d.ts
CHANGED
|
@@ -16,47 +16,64 @@ export type ContentType = "success" | "warning" | "error" | "info" | "static";
|
|
|
16
16
|
*/
|
|
17
17
|
export type Style = React.CSSProperties;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Used for width and height
|
|
20
20
|
*/
|
|
21
|
-
type
|
|
21
|
+
export type SizeDimension = "full" | "fit" | "min" | "max";
|
|
22
22
|
/**
|
|
23
|
-
* Size
|
|
23
|
+
* Size variants used for CSS.
|
|
24
24
|
*/
|
|
25
|
-
type
|
|
25
|
+
type SizeToken = "none" | "xxs" | "xs" | "s" | "m" | "l" | "xl" | "xxl";
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Used for margin
|
|
28
28
|
*/
|
|
29
|
+
type AutoSize = SizeToken | "auto";
|
|
30
|
+
/** Layout props for a component */
|
|
29
31
|
export type Layout = {
|
|
30
|
-
/**
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
axis
|
|
35
|
-
/**
|
|
36
|
-
* Spacing between children of the box
|
|
37
|
-
*/
|
|
38
|
-
gap?: Size;
|
|
39
|
-
/**
|
|
40
|
-
* Alignment orthogonal to the selected axis
|
|
41
|
-
* (Equivalent to align-items)
|
|
42
|
-
*/
|
|
32
|
+
/** Direction the layout spans; along the x-axis or y-axis (Equivalent to flex-direction) */
|
|
33
|
+
axis?: "x" | "y" | "-x" | "-y";
|
|
34
|
+
/** Spacing between children of the layout */
|
|
35
|
+
gap?: SizeToken;
|
|
36
|
+
/** Alignment orthogonal to the selected axis (Equivalent to align-items) */
|
|
43
37
|
align?: "start" | "center" | "end";
|
|
44
|
-
/**
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
*/
|
|
48
|
-
justify?: "start" | "center" | "between" | "end";
|
|
49
|
-
/**
|
|
50
|
-
* Padding on the inside of the box
|
|
51
|
-
*/
|
|
52
|
-
padding?: Size;
|
|
53
|
-
/**
|
|
54
|
-
* Margin on the outside of the box
|
|
55
|
-
*/
|
|
56
|
-
margin?: Size;
|
|
57
|
-
/**
|
|
58
|
-
* Whether to allow wrapping of box children
|
|
59
|
-
*/
|
|
38
|
+
/** How to layout the children (Equivalent to justify-content) */
|
|
39
|
+
justify?: "start" | "center" | "between" | "around" | "end";
|
|
40
|
+
/** Whether to allow wrapping of layout children */
|
|
60
41
|
wrap?: boolean;
|
|
42
|
+
/** Padding inside the layout */
|
|
43
|
+
padding?: SizeToken;
|
|
44
|
+
/** Horizontal padding inside the layout */
|
|
45
|
+
paddingX?: SizeToken;
|
|
46
|
+
/** Vertical padding inside the layout */
|
|
47
|
+
paddingY?: SizeToken;
|
|
48
|
+
/** Top padding inside the layout */
|
|
49
|
+
paddingTop?: SizeToken;
|
|
50
|
+
/** Bottom padding inside the layout */
|
|
51
|
+
paddingBottom?: SizeToken;
|
|
52
|
+
/** Left padding inside the layout */
|
|
53
|
+
paddingLeft?: SizeToken;
|
|
54
|
+
/** Right padding inside the layout */
|
|
55
|
+
paddingRight?: SizeToken;
|
|
56
|
+
/** Margin outside the layout */
|
|
57
|
+
margin?: AutoSize;
|
|
58
|
+
/** Horizontal margin outside the layout */
|
|
59
|
+
marginX?: AutoSize;
|
|
60
|
+
/** Vertical margin outside the layout */
|
|
61
|
+
marginY?: AutoSize;
|
|
62
|
+
/** Top margin outside the layout */
|
|
63
|
+
marginTop?: AutoSize;
|
|
64
|
+
/** Bottom margin outside the layout */
|
|
65
|
+
marginBottom?: AutoSize;
|
|
66
|
+
/** Left margin outside the layout */
|
|
67
|
+
marginLeft?: AutoSize;
|
|
68
|
+
/** Right margin outside the layout */
|
|
69
|
+
marginRight?: AutoSize;
|
|
70
|
+
/** Width of the layout */
|
|
71
|
+
width?: SizeDimension;
|
|
72
|
+
/** Maximum width of the layout */
|
|
73
|
+
maxWidth?: SizeDimension;
|
|
74
|
+
/** Height of the laout */
|
|
75
|
+
height?: SizeDimension;
|
|
76
|
+
/** Maximum of the layout */
|
|
77
|
+
maxHeight?: SizeDimension;
|
|
61
78
|
};
|
|
62
79
|
export {};
|