@goncharovv/layout 0.0.1 → 0.0.3
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/components/Stacks/HStack.d.ts +19 -0
- package/dist/{esm/components → components}/Stacks/HStack.js +1 -0
- package/dist/components/Stacks/HStack.js.map +1 -0
- package/dist/components/Stacks/Stack.d.ts +25 -0
- package/dist/{esm/components → components}/Stacks/Stack.js +1 -0
- package/dist/components/Stacks/Stack.js.map +1 -0
- package/dist/components/Stacks/VStack.d.ts +19 -0
- package/dist/{esm/components → components}/Stacks/VStack.js +1 -0
- package/dist/components/Stacks/VStack.js.map +1 -0
- package/dist/{esm/components → components}/Stacks/factory.d.ts +1 -2
- package/dist/{esm/components → components}/Stacks/factory.js +1 -0
- package/dist/components/Stacks/factory.js.map +1 -0
- package/dist/{esm/components → components}/Stacks/index.js +1 -0
- package/dist/components/Stacks/index.js.map +1 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/{esm/shared → shared}/spacings/config.js +1 -0
- package/dist/shared/spacings/config.js.map +1 -0
- package/dist/shared/spacings/index.js +2 -0
- package/dist/shared/spacings/index.js.map +1 -0
- package/dist/shared/types/index.js +2 -0
- package/dist/shared/types/index.js.map +1 -0
- package/package.json +1 -1
- package/dist/esm/components/Stacks/HStack.d.ts +0 -7
- package/dist/esm/components/Stacks/Stack.d.ts +0 -11
- package/dist/esm/components/Stacks/VStack.d.ts +0 -7
- package/dist/esm/components/index.js +0 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/shared/spacings/index.js +0 -1
- package/dist/esm/shared/types/index.js +0 -1
- package/dist/esm/ui-kit/Stacks/Stack.module.css +0 -22
- package/dist/styles/index.css +0 -1
- package/dist/styles/spacings.css +0 -20
- /package/dist/{esm/components → components}/Stacks/index.d.ts +0 -0
- /package/dist/{esm/components → components}/index.d.ts +0 -0
- /package/dist/{esm/index.d.ts → index.d.ts} +0 -0
- /package/dist/{esm/shared → shared}/spacings/config.d.ts +0 -0
- /package/dist/{esm/shared → shared}/spacings/index.d.ts +0 -0
- /package/dist/{esm/shared → shared}/types/index.d.ts +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseStackProps } from './factory';
|
|
2
|
+
export interface HStackProps extends BaseStackProps {
|
|
3
|
+
reverse?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare const HStack: <TElementType extends import("react").ElementType = "div">(props: import("./factory").StackPropsBuilder<TElementType, HStackProps, {
|
|
6
|
+
reverse?: boolean | undefined;
|
|
7
|
+
as?: "div" | undefined;
|
|
8
|
+
alignItems?: import("csstype").Property.AlignItems | undefined;
|
|
9
|
+
align?: import("csstype").Property.AlignItems | undefined;
|
|
10
|
+
justifyContent?: import("csstype").Property.JustifyContent | undefined;
|
|
11
|
+
justify?: import("csstype").Property.JustifyContent | undefined;
|
|
12
|
+
wrap?: true | import("csstype").Property.FlexWrap | undefined;
|
|
13
|
+
gap?: number | undefined;
|
|
14
|
+
centered?: boolean | undefined;
|
|
15
|
+
style?: import("react").CSSProperties | undefined;
|
|
16
|
+
className?: string | undefined;
|
|
17
|
+
children?: import("react").ReactNode;
|
|
18
|
+
spacing?: import("../../shared/spacings").Spacing | undefined;
|
|
19
|
+
}>) => import("react").ReactNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HStack.js","sourceRoot":"","sources":["../../../lib/components/Stacks/HStack.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,OAAO,EAAkB,WAAW,EAAE,MAAM,WAAW,CAAC;AAExD,OAAO,MAAM,MAAM,oBAAoB,CAAC;AAOxC,MAAM,CAAC,MAAM,MAAM,GAAG,WAAW,CAAc,QAAQ,EAAE;IACvD,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE;QACvB,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;QAE9C,OAAO;YACL,GAAG,IAAI;YACP,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,EAAE;gBAC/B,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,OAAO;aAC3B,EAAE,SAAS,CAAC;SACd,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { BaseStackProps } from './factory';
|
|
3
|
+
export type StackDirection = 'vertical' | 'horizontal';
|
|
4
|
+
export interface StackProps extends BaseStackProps {
|
|
5
|
+
vertical?: boolean;
|
|
6
|
+
horizontal?: boolean;
|
|
7
|
+
direction?: CSSProperties['flexDirection'];
|
|
8
|
+
}
|
|
9
|
+
export declare const Stack: <TElementType extends import("react").ElementType = "div">(props: import("./factory").StackPropsBuilder<TElementType, StackProps, {
|
|
10
|
+
vertical?: boolean | undefined;
|
|
11
|
+
horizontal?: boolean | undefined;
|
|
12
|
+
direction?: import("csstype").Property.FlexDirection | undefined;
|
|
13
|
+
as?: "div" | undefined;
|
|
14
|
+
alignItems?: import("csstype").Property.AlignItems | undefined;
|
|
15
|
+
align?: import("csstype").Property.AlignItems | undefined;
|
|
16
|
+
justifyContent?: import("csstype").Property.JustifyContent | undefined;
|
|
17
|
+
justify?: import("csstype").Property.JustifyContent | undefined;
|
|
18
|
+
wrap?: true | import("csstype").Property.FlexWrap | undefined;
|
|
19
|
+
gap?: number | undefined;
|
|
20
|
+
centered?: boolean | undefined;
|
|
21
|
+
style?: CSSProperties | undefined;
|
|
22
|
+
className?: string | undefined;
|
|
23
|
+
children?: import("react").ReactNode;
|
|
24
|
+
spacing?: import("../../shared/spacings").Spacing | undefined;
|
|
25
|
+
}>) => import("react").ReactNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stack.js","sourceRoot":"","sources":["../../../lib/components/Stacks/Stack.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,OAAO,EAAkB,WAAW,EAAE,MAAM,WAAW,CAAC;AAExD,OAAO,MAAM,MAAM,oBAAoB,CAAC;AAYxC,MAAM,CAAC,MAAM,KAAK,GAAG,WAAW,CAAa,OAAO,EAAE;IACpD,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE;QACvB,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;QAEtE,OAAO;YACL,GAAG,IAAI;YACP,SAAS,EAAE,EAAE,CACX;gBACE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,QAAQ;gBAC3B,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,UAAU;aAChC,EACD,SAAS,CACV;YACD,MAAM,EAAE;gBACN,aAAa,EAAE,SAAS;aACzB;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseStackProps } from './factory';
|
|
2
|
+
export interface VStackProps extends BaseStackProps {
|
|
3
|
+
reverse?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare const VStack: <TElementType extends import("react").ElementType = "div">(props: import("./factory").StackPropsBuilder<TElementType, VStackProps, {
|
|
6
|
+
reverse?: boolean | undefined;
|
|
7
|
+
as?: "div" | undefined;
|
|
8
|
+
alignItems?: import("csstype").Property.AlignItems | undefined;
|
|
9
|
+
align?: import("csstype").Property.AlignItems | undefined;
|
|
10
|
+
justifyContent?: import("csstype").Property.JustifyContent | undefined;
|
|
11
|
+
justify?: import("csstype").Property.JustifyContent | undefined;
|
|
12
|
+
wrap?: true | import("csstype").Property.FlexWrap | undefined;
|
|
13
|
+
gap?: number | undefined;
|
|
14
|
+
centered?: boolean | undefined;
|
|
15
|
+
style?: import("react").CSSProperties | undefined;
|
|
16
|
+
className?: string | undefined;
|
|
17
|
+
children?: import("react").ReactNode;
|
|
18
|
+
spacing?: import("../../shared/spacings").Spacing | undefined;
|
|
19
|
+
}>) => import("react").ReactNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VStack.js","sourceRoot":"","sources":["../../../lib/components/Stacks/VStack.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,OAAO,EAAkB,WAAW,EAAE,MAAM,WAAW,CAAC;AAExD,OAAO,MAAM,MAAM,oBAAoB,CAAC;AAQxC,MAAM,CAAC,MAAM,MAAM,GAAG,WAAW,CAAc,QAAQ,EAAE;IACvD,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE;QACvB,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;QAE9C,OAAO;YACL,GAAG,IAAI;YACP,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE;gBAC7B,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,OAAO;aAC3B,EAAE,SAAS,CAAC;SACd,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -37,10 +37,9 @@ export interface BaseStackProps<TElementType extends ElementType = 'div'> extend
|
|
|
37
37
|
/**
|
|
38
38
|
* `_TPropsHint` is used only to show in IDE list of own Stack props
|
|
39
39
|
*/
|
|
40
|
-
type StackPropsBuilder<TElementType extends ElementType, TProps, _TPropsHint = Prettify<TProps>> = {
|
|
40
|
+
export type StackPropsBuilder<TElementType extends ElementType, TProps, _TPropsHint = Prettify<TProps>> = {
|
|
41
41
|
as?: TElementType;
|
|
42
42
|
} & Omit<TProps, 'as'> & Omit<React.ComponentPropsWithoutRef<TElementType>, keyof Omit<TProps, 'as'>>;
|
|
43
43
|
export declare function createStack<TProps extends BaseStackProps>(name: string, options: {
|
|
44
44
|
overrideProps?: (props: TProps) => BaseStackProps;
|
|
45
45
|
}): <TElementType extends ElementType = "div">(props: StackPropsBuilder<TElementType, TProps>) => ReactNode;
|
|
46
|
-
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../lib/components/Stacks/factory.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,OAAO,EAAE,gBAAgB,EAAoB,MAAM,uBAAuB,CAAC;AAG3E,OAAO,MAAM,MAAM,oBAAoB,CAAC;AAoDxC,MAAM,UAAU,WAAW,CACzB,IAAY,EACZ,OAA+D;IAE/D,MAAM,SAAS,GAAG,SAAS,YAAY,CACrC,MAAwC;QAExC,MAAM,KAAK,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,MAAgB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QAEvF,wDAAwD;QACxD,MAAM,EACJ,EAAE,EAAE,OAAO,GAAG,KAAK,EACnB,KAAK,EACL,UAAU,EACV,QAAQ,EACR,GAAG,EACH,OAAO,EACP,cAAc,EACd,OAAO,EACP,KAAK,EACL,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACR,GAAG,KAAK,CAAC;QAEV,OAAO,CACL,KAAC,OAAO,OACF,IAAI,EACR,SAAS,EAAE,EAAE,CACX,MAAM,CAAC,KAAK,EACZ;gBACE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,QAAQ;aAC5B,EACD,SAAS,CACV,EACD,KAAK,EAAE;gBACL,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG;gBAClD,QAAQ,EAAE,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI;gBACvC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,UAAU,IAAI,KAAK,CAAC;gBACxD,cAAc,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,cAAc,IAAI,OAAO,CAAC;gBAClE,GAAG,KAAK;aACT,YAEA,QAAQ,GACD,CACX,CAAC;IACJ,CAAC,CAAC;IAEF,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC;IAE7B;;OAEG;IACH,OAAO,SAEO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/components/Stacks/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../lib/shared/spacings/config.ts"],"names":[],"mappings":"AAGA,EAAE;AACF,4CAA4C;AAC5C,EAAE;AACF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,MAAM,EAAE,CAAC;IACT,UAAU,EAAE,CAAC;IACb,SAAS,EAAE,CAAC;IACZ,SAAS,EAAE,CAAC;IACZ,SAAS,EAAE,CAAC;IACZ,WAAW,EAAE,EAAE;IACf,UAAU,EAAE,EAAE;IACd,UAAU,EAAE,EAAE;IACd,UAAU,EAAE,EAAE;IACd,WAAW,EAAE,EAAE;IACf,UAAU,EAAE,EAAE;IACd,SAAS,EAAE,EAAE;IACb,SAAS,EAAE,EAAE;IACb,SAAS,EAAE,EAAE;CACd,CAAC;AA4BF,MAAM,UAAU,UAAU,CAAC,OAA4B;IACrD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,OAA4B;IAC3D,OAAO;QACL,GAAG,EAAE,iBAAiB,OAAO,GAAG;KACjC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/shared/spacings/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/shared/types/index.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { BaseStackProps } from './factory';
|
|
2
|
-
export interface HStackProps extends BaseStackProps {
|
|
3
|
-
reverse?: boolean;
|
|
4
|
-
}
|
|
5
|
-
export declare const HStack: <TElementType extends import("react").ElementType = "div">(props: {
|
|
6
|
-
as?: TElementType | undefined;
|
|
7
|
-
} & Omit<HStackProps, "as"> & Omit<import("react").PropsWithoutRef<import("react").ComponentProps<TElementType>>, "style" | "alignItems" | "align" | "justifyContent" | "justify" | "wrap" | "gap" | "centered" | "className" | "children" | "spacing" | "reverse">) => import("react").ReactNode;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
import { BaseStackProps } from './factory';
|
|
3
|
-
export type StackDirection = 'vertical' | 'horizontal';
|
|
4
|
-
export interface StackProps extends BaseStackProps {
|
|
5
|
-
vertical?: boolean;
|
|
6
|
-
horizontal?: boolean;
|
|
7
|
-
direction?: CSSProperties['flexDirection'];
|
|
8
|
-
}
|
|
9
|
-
export declare const Stack: <TElementType extends import("react").ElementType = "div">(props: {
|
|
10
|
-
as?: TElementType | undefined;
|
|
11
|
-
} & Omit<StackProps, "as"> & Omit<import("react").PropsWithoutRef<import("react").ComponentProps<TElementType>>, "style" | "alignItems" | "align" | "justifyContent" | "justify" | "wrap" | "gap" | "centered" | "className" | "children" | "spacing" | "horizontal" | "vertical" | "direction">) => import("react").ReactNode;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { BaseStackProps } from './factory';
|
|
2
|
-
export interface VStackProps extends BaseStackProps {
|
|
3
|
-
reverse?: boolean;
|
|
4
|
-
}
|
|
5
|
-
export declare const VStack: <TElementType extends import("react").ElementType = "div">(props: {
|
|
6
|
-
as?: TElementType | undefined;
|
|
7
|
-
} & Omit<VStackProps, "as"> & Omit<import("react").PropsWithoutRef<import("react").ComponentProps<TElementType>>, "style" | "alignItems" | "align" | "justifyContent" | "justify" | "wrap" | "gap" | "centered" | "className" | "children" | "spacing" | "reverse">) => import("react").ReactNode;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Stacks';
|
package/dist/esm/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './components';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './config';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
.stack {
|
|
2
|
-
display: flex;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.vertical {
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
}
|
|
8
|
-
.vertical.reversed {
|
|
9
|
-
flex-direction: column-reverse;;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.horizontal {
|
|
13
|
-
flex-direction: row;
|
|
14
|
-
}
|
|
15
|
-
.horizontal.reversed {
|
|
16
|
-
flex-direction: row-reverse;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.centered {
|
|
20
|
-
align-items: center;
|
|
21
|
-
justify-content: center;
|
|
22
|
-
}
|
package/dist/styles/index.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import './spacings.css';
|
package/dist/styles/spacings.css
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* MUST keep in sync with the `shared/spacings/config.ts`
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
:root {
|
|
6
|
-
--spacing-small-xxs: 0px;
|
|
7
|
-
--spacing-small-xs: 2px;
|
|
8
|
-
--spacing-small-s: 4px;
|
|
9
|
-
--spacing-small-m: 6px;
|
|
10
|
-
--spacing-small-l: 8px;
|
|
11
|
-
--spacing-medium-xs: 12px;
|
|
12
|
-
--spacing-medium-s: 16px;
|
|
13
|
-
--spacing-medium-m: 20px;
|
|
14
|
-
--spacing-medium-l: 24px;
|
|
15
|
-
--spacing-large-xxs: 32px;
|
|
16
|
-
--spacing-large-xs: 40px;
|
|
17
|
-
--spacing-large-s: 48px;
|
|
18
|
-
--spacing-large-m: 64px;
|
|
19
|
-
--spacing-large-l: 80px;
|
|
20
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|