@vitus-labs/coolgrid 0.65.0 → 0.67.0

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 (47) hide show
  1. package/LICENSE +1 -1
  2. package/lib/analysis/vitus-labs-coolgrid.js.html +5095 -4901
  3. package/lib/analysis/vitus-labs-coolgrid.module.js.html +5095 -4901
  4. package/lib/index.d.ts +57 -44
  5. package/lib/types/Col/component.d.ts +1 -0
  6. package/lib/types/Col/component.d.ts.map +1 -0
  7. package/lib/types/Col/index.d.ts +1 -0
  8. package/lib/types/Col/index.d.ts.map +1 -0
  9. package/lib/types/Col/styled.d.ts +1 -0
  10. package/lib/types/Col/styled.d.ts.map +1 -0
  11. package/lib/types/Container/component.d.ts +1 -0
  12. package/lib/types/Container/component.d.ts.map +1 -0
  13. package/lib/types/Container/index.d.ts +1 -0
  14. package/lib/types/Container/index.d.ts.map +1 -0
  15. package/lib/types/Container/styled.d.ts +1 -0
  16. package/lib/types/Container/styled.d.ts.map +1 -0
  17. package/lib/types/Container/utils.d.ts +3 -1
  18. package/lib/types/Container/utils.d.ts.map +1 -0
  19. package/lib/types/Row/component.d.ts +1 -0
  20. package/lib/types/Row/component.d.ts.map +1 -0
  21. package/lib/types/Row/index.d.ts +1 -0
  22. package/lib/types/Row/index.d.ts.map +1 -0
  23. package/lib/types/Row/styled.d.ts +1 -0
  24. package/lib/types/Row/styled.d.ts.map +1 -0
  25. package/lib/types/constants.d.ts +1 -0
  26. package/lib/types/constants.d.ts.map +1 -0
  27. package/lib/types/context/ContainerContext.d.ts +1 -0
  28. package/lib/types/context/ContainerContext.d.ts.map +1 -0
  29. package/lib/types/context/RowContext.d.ts +1 -0
  30. package/lib/types/context/RowContext.d.ts.map +1 -0
  31. package/lib/types/context/index.d.ts +1 -0
  32. package/lib/types/context/index.d.ts.map +1 -0
  33. package/lib/types/index.d.ts +1 -0
  34. package/lib/types/index.d.ts.map +1 -0
  35. package/lib/types/theme.d.ts +1 -0
  36. package/lib/types/theme.d.ts.map +1 -0
  37. package/lib/types/types.d.ts +15 -14
  38. package/lib/types/types.d.ts.map +1 -0
  39. package/lib/types/useContext.d.ts +4 -3
  40. package/lib/types/useContext.d.ts.map +1 -0
  41. package/lib/types/utils.d.ts +4 -3
  42. package/lib/types/utils.d.ts.map +1 -0
  43. package/lib/vitus-labs-coolgrid.js +6 -12
  44. package/lib/vitus-labs-coolgrid.js.map +1 -1
  45. package/lib/vitus-labs-coolgrid.module.js +1 -1
  46. package/lib/vitus-labs-coolgrid.module.js.map +1 -1
  47. package/package.json +9 -9
package/lib/index.d.ts CHANGED
@@ -1,15 +1,28 @@
1
- import { extendCss } from '@vitus-labs/unistyle';
2
- export { Provider } from '@vitus-labs/unistyle';
3
- import { FC, ReactNode, ComponentType } from 'react';
4
- import { BreakpointKeys } from '@vitus-labs/core';
5
-
6
- declare type CreateValueType<T> = T | Array<T> | Partial<Record<BreakpointKeys, T>>;
7
- declare type Value = string | number;
8
- declare type Css = Parameters<typeof extendCss>[0];
9
- declare type ExtraStyles = CreateValueType<Css>;
10
- declare type ValueType = CreateValueType<number>;
11
- declare type ContainerWidth = CreateValueType<Value>;
12
- declare type ContentAlignX = 'center' | 'left' | 'right' | 'spaceAround' | 'spaceBetween' | 'spaceEvenly';
1
+ import { BreakpointKeys } from '@vitus-labs/core';
2
+ import { ComponentType } from 'react';
3
+ import { extendCss } from '@vitus-labs/unistyle';
4
+ import { FC } from 'react';
5
+ import { Provider } from '@vitus-labs/unistyle';
6
+ import { ReactNode } from 'react';
7
+
8
+ export declare const Col: ElementType<[
9
+ 'containerWidth',
10
+ 'width',
11
+ 'rowComponent',
12
+ 'rowCss',
13
+ 'colCss',
14
+ 'colComponent',
15
+ 'columns',
16
+ 'gap',
17
+ 'gutter',
18
+ 'contentAlignX'
19
+ ]>;
20
+
21
+ declare type ComponentProps = ConfigurationProps & Partial<{
22
+ component: ComponentType;
23
+ css: ExtraStyles;
24
+ }>;
25
+
13
26
  declare type ConfigurationProps = Partial<{
14
27
  size: ValueType;
15
28
  padding: ValueType;
@@ -24,40 +37,36 @@ declare type ConfigurationProps = Partial<{
24
37
  containerWidth: ContainerWidth;
25
38
  width: ContainerWidth | ((widths: Record<string, Value>) => Record<string, Value>);
26
39
  }>;
27
- declare type ComponentProps = ConfigurationProps & Partial<{
28
- component: ComponentType;
29
- css: ExtraStyles;
30
- }>;
40
+
41
+ export declare const Container: ElementType<['containerWidth']>;
42
+
43
+ declare type ContainerWidth = CreateValueType<Value>;
44
+
45
+ declare type ContentAlignX = 'center' | 'left' | 'right' | 'spaceAround' | 'spaceBetween' | 'spaceEvenly';
46
+
47
+ declare type CreateValueType<T> = T | Array<T> | Partial<Record<BreakpointKeys, T>>;
48
+
49
+ declare type Css = Parameters<typeof extendCss>[0];
50
+
31
51
  declare type ElementType<O extends Array<string>> = FC<Omit<ComponentProps, O[number]> & Record<string, unknown> & {
32
52
  children?: ReactNode;
33
53
  }> & {
34
54
  pkgName: string;
35
55
  VITUS_LABS__COMPONENT: string;
36
- };
37
-
38
- declare const Component$2: ElementType<['containerWidth']>;
39
-
40
- declare const Component$1: ElementType<[
41
- 'containerWidth',
42
- 'width',
43
- 'rowComponent',
44
- 'rowCss'
45
- ]>;
46
-
47
- declare const Component: ElementType<[
48
- 'containerWidth',
49
- 'width',
50
- 'rowComponent',
51
- 'rowCss',
52
- 'colCss',
53
- 'colComponent',
54
- 'columns',
55
- 'gap',
56
- 'gutter',
57
- 'contentAlignX'
58
- ]>;
59
-
60
- declare const _default: {
56
+ };
57
+
58
+ declare type ExtraStyles = CreateValueType<Css>;
59
+
60
+ export { Provider }
61
+
62
+ export declare const Row: ElementType<[
63
+ 'containerWidth',
64
+ 'width',
65
+ 'rowComponent',
66
+ 'rowCss'
67
+ ]>;
68
+
69
+ export declare const theme: {
61
70
  readonly rootSize: 16;
62
71
  readonly breakpoints: {
63
72
  readonly xs: 0;
@@ -76,6 +85,10 @@ declare const _default: {
76
85
  readonly xl: 1140;
77
86
  };
78
87
  };
79
- };
80
-
81
- export { Component as Col, Component$2 as Container, Component$1 as Row, _default as theme };
88
+ };
89
+
90
+ declare type Value = string | number;
91
+
92
+ declare type ValueType = CreateValueType<number>;
93
+
94
+ export { }
@@ -12,3 +12,4 @@ declare const Component: ElementType<[
12
12
  'contentAlignX'
13
13
  ]>;
14
14
  export default Component;
15
+ //# sourceMappingURL=component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/Col/component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAe;AAG1C,QAAA,MAAM,SAAS,EAAE,WAAW,CAC1B;IACE,gBAAgB;IAChB,OAAO;IACP,cAAc;IACd,QAAQ;IACR,QAAQ;IACR,cAAc;IACd,SAAS;IACT,KAAK;IACL,QAAQ;IACR,eAAe;CAChB,CAuBF,CAAA;AAQD,eAAe,SAAS,CAAA"}
@@ -1,2 +1,3 @@
1
1
  import component from './component';
2
2
  export default component;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Col/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAA;AAEnC,eAAe,SAAS,CAAA"}
@@ -1,2 +1,3 @@
1
1
  declare const _default: import("styled-components").StyledComponent<any, any, object, string | number | symbol>;
2
2
  export default _default;
3
+ //# sourceMappingURL=styled.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/Col/styled.ts"],"names":[],"mappings":";AAiGA,wBAqBC"}
@@ -1,3 +1,4 @@
1
1
  import type { ElementType } from "../types";
2
2
  declare const Component: ElementType<['containerWidth']>;
3
3
  export default Component;
4
+ //# sourceMappingURL=component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/Container/component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAe;AAG1C,QAAA,MAAM,SAAS,EAAE,WAAW,CAAC,CAAC,gBAAgB,CAAC,CA4B9C,CAAA;AAQD,eAAe,SAAS,CAAA"}
@@ -1,2 +1,3 @@
1
1
  import component from './component';
2
2
  export default component;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Container/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAA;AAEnC,eAAe,SAAS,CAAA"}
@@ -1,2 +1,3 @@
1
1
  declare const _default: import("styled-components").StyledComponent<any, any, object, string | number | symbol>;
2
2
  export default _default;
3
+ //# sourceMappingURL=styled.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/Container/styled.ts"],"names":[],"mappings":";AAgBA,wBAoBC"}
@@ -1,3 +1,5 @@
1
- declare type GetContainerWidth = (props?: Record<string, unknown> | unknown, theme?: Record<string, unknown> | unknown) => Record<string, unknown>;
1
+ import { get } from '@vitus-labs/core';
2
+ type GetContainerWidth = (props?: Record<string, unknown> | unknown, theme?: Record<string, unknown> | unknown) => ReturnType<typeof get>;
2
3
  export declare const getContainerWidth: GetContainerWidth;
3
4
  export {};
5
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/Container/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAKtC,KAAK,iBAAiB,GAAG,CACvB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,EACzC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,KACtC,UAAU,CAAC,OAAO,GAAG,CAAC,CAAA;AAE3B,eAAO,MAAM,iBAAiB,EAAE,iBAGE,CAAA"}
@@ -6,3 +6,4 @@ declare const Component: ElementType<[
6
6
  'rowCss'
7
7
  ]>;
8
8
  export default Component;
9
+ //# sourceMappingURL=component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/Row/component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAe;AAG1C,QAAA,MAAM,SAAS,EAAE,WAAW,CAC1B;IAAC,gBAAgB;IAAE,OAAO;IAAE,cAAc;IAAE,QAAQ;CAAC,CA4BtD,CAAA;AAQD,eAAe,SAAS,CAAA"}
@@ -1,2 +1,3 @@
1
1
  import component from './component';
2
2
  export default component;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Row/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAA;AAEnC,eAAe,SAAS,CAAA"}
@@ -1,2 +1,3 @@
1
1
  declare const _default: import("styled-components").StyledComponent<any, any, object, string | number | symbol>;
2
2
  export default _default;
3
+ //# sourceMappingURL=styled.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/Row/styled.ts"],"names":[],"mappings":";AAkDA,wBAmBC"}
@@ -1,2 +1,3 @@
1
1
  export declare const PKG_NAME = "@vitus-labs/coolgrid";
2
2
  export declare const CONTEXT_KEYS: string[];
3
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,yBAAyB,CAAA;AAG9C,eAAO,MAAM,YAAY,UAaxB,CAAA"}
@@ -13,3 +13,4 @@ declare const _default: import("react").Context<Partial<Partial<{
13
13
  width: import("../types").ContainerWidth | ((widths: Record<string, import("../types").Value>) => Record<string, import("../types").Value>);
14
14
  }>>>;
15
15
  export default _default;
16
+ //# sourceMappingURL=ContainerContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContainerContext.d.ts","sourceRoot":"","sources":["../../../src/context/ContainerContext.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAGA,wBAAyC"}
@@ -13,3 +13,4 @@ declare const _default: import("react").Context<Partial<Partial<{
13
13
  width: import("../types").ContainerWidth | ((widths: Record<string, import("../types").Value>) => Record<string, import("../types").Value>);
14
14
  }>>>;
15
15
  export default _default;
16
+ //# sourceMappingURL=RowContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RowContext.d.ts","sourceRoot":"","sources":["../../../src/context/RowContext.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAGA,wBAAyC"}
@@ -1,3 +1,4 @@
1
1
  import ContainerContext from './ContainerContext';
2
2
  import RowContext from './RowContext';
3
3
  export { ContainerContext, RowContext };
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/context/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,oBAAoB,CAAA;AACjD,OAAO,UAAU,MAAM,cAAc,CAAA;AAErC,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,CAAA"}
@@ -4,3 +4,4 @@ import Row from './Row';
4
4
  import Col from './Col';
5
5
  import theme from './theme';
6
6
  export { Container, Row, Col, Provider, theme };
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,SAAS,MAAM,aAAa,CAAA;AACnC,OAAO,GAAG,MAAM,OAAO,CAAA;AACvB,OAAO,GAAG,MAAM,OAAO,CAAA;AACvB,OAAO,KAAK,MAAM,SAAS,CAAA;AAE3B,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAA"}
@@ -19,3 +19,4 @@ declare const _default: {
19
19
  };
20
20
  };
21
21
  export default _default;
22
+ //# sourceMappingURL=theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/theme.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,wBAmBU"}
@@ -1,16 +1,16 @@
1
1
  import { FC, ReactNode, ComponentType } from 'react';
2
2
  import { config, BreakpointKeys } from '@vitus-labs/core';
3
3
  import { extendCss, AlignContentAlignXKeys } from '@vitus-labs/unistyle';
4
- declare type CreateValueType<T> = T | Array<T> | Partial<Record<BreakpointKeys, T>>;
5
- export declare type Obj = Record<string, unknown>;
6
- export declare type Value = string | number;
7
- export declare type Css = Parameters<typeof extendCss>[0];
8
- export declare type ExtraStyles = CreateValueType<Css>;
9
- export declare type CssOutput = ReturnType<typeof config.css> | string | any;
10
- export declare type ValueType = CreateValueType<number>;
11
- export declare type ContainerWidth = CreateValueType<Value>;
12
- export declare type ContentAlignX = 'center' | 'left' | 'right' | 'spaceAround' | 'spaceBetween' | 'spaceEvenly';
13
- export declare type ConfigurationProps = Partial<{
4
+ type CreateValueType<T> = T | Array<T> | Partial<Record<BreakpointKeys, T>>;
5
+ export type Obj = Record<string, unknown>;
6
+ export type Value = string | number;
7
+ export type Css = Parameters<typeof extendCss>[0];
8
+ export type ExtraStyles = CreateValueType<Css>;
9
+ export type CssOutput = ReturnType<typeof config.css> | string | any;
10
+ export type ValueType = CreateValueType<number>;
11
+ export type ContainerWidth = CreateValueType<Value>;
12
+ export type ContentAlignX = 'center' | 'left' | 'right' | 'spaceAround' | 'spaceBetween' | 'spaceEvenly';
13
+ export type ConfigurationProps = Partial<{
14
14
  size: ValueType;
15
15
  padding: ValueType;
16
16
  gap: ValueType;
@@ -24,11 +24,11 @@ export declare type ConfigurationProps = Partial<{
24
24
  containerWidth: ContainerWidth;
25
25
  width: ContainerWidth | ((widths: Record<string, Value>) => Record<string, Value>);
26
26
  }>;
27
- export declare type ComponentProps = ConfigurationProps & Partial<{
27
+ export type ComponentProps = ConfigurationProps & Partial<{
28
28
  component: ComponentType;
29
29
  css: ExtraStyles;
30
30
  }>;
31
- export declare type StyledTypes = Partial<{
31
+ export type StyledTypes = Partial<{
32
32
  size: number;
33
33
  padding: number;
34
34
  gap: number;
@@ -39,11 +39,12 @@ export declare type StyledTypes = Partial<{
39
39
  contentAlignX: AlignContentAlignXKeys;
40
40
  width: Value;
41
41
  }>;
42
- export declare type ElementType<O extends Array<string>> = FC<Omit<ComponentProps, O[number]> & Record<string, unknown> & {
42
+ export type ElementType<O extends Array<string>> = FC<Omit<ComponentProps, O[number]> & Record<string, unknown> & {
43
43
  children?: ReactNode;
44
44
  }> & {
45
45
  pkgName: string;
46
46
  VITUS_LABS__COMPONENT: string;
47
47
  };
48
- export declare type Context = Partial<ConfigurationProps>;
48
+ export type Context = Partial<ConfigurationProps>;
49
49
  export {};
50
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AACpD,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACzD,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAExE,KAAK,eAAe,CAAC,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,CAAA;AAE3E,MAAM,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAA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OAAO,CAAC;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,GAAG,CAAA;IAChB,aAAa,EAAE,GAAG,CAAA;IAClB,aAAa,EAAE,sBAAsB,CAAA;IACrC,KAAK,EAAE,KAAK,CAAA;CACb,CAAC,CAAA;AAQF,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CACnD,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,GAC7B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,CACrD,GAAG;IACF,OAAO,EAAE,MAAM,CAAA;IACf,qBAAqB,EAAE,MAAM,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,OAAO,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA"}
@@ -1,11 +1,12 @@
1
1
  import { pick } from '@vitus-labs/core';
2
2
  import { Obj, ValueType, Context } from "./types";
3
- export declare type PickThemeProps = <T extends Record<string, unknown>>(props: T, keywords: Array<keyof T>) => ReturnType<typeof pick>;
4
- declare type GetGridContext = (props: Obj, theme: Obj) => {
3
+ export type PickThemeProps = <T extends Record<string, unknown>>(props: T, keywords: Array<keyof T>) => ReturnType<typeof pick>;
4
+ type GetGridContext = (props: Obj, theme: Obj) => {
5
5
  columns?: ValueType;
6
6
  containerWidth?: Record<string, number>;
7
7
  };
8
8
  export declare const getGridContext: GetGridContext;
9
- declare type UseGridContext = (props: Obj) => Context;
9
+ type UseGridContext = (props: Obj) => Context;
10
10
  declare const useGridContext: UseGridContext;
11
11
  export default useGridContext;
12
+ //# sourceMappingURL=useContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useContext.d.ts","sourceRoot":"","sources":["../../src/useContext.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAG5C,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAe;AAKjD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7D,KAAK,EAAE,CAAC,EACR,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,KACrB,UAAU,CAAC,OAAO,IAAI,CAAC,CAAA;AAO5B,KAAK,cAAc,GAAG,CACpB,KAAK,EAAE,GAAG,EACV,KAAK,EAAE,GAAG,KACP;IACH,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACxC,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,cAO3B,CAAA;AAEF,KAAK,cAAc,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,OAAO,CAAA;AAC7C,QAAA,MAAM,cAAc,EAAE,cAMrB,CAAA;AAED,eAAe,cAAc,CAAA"}
@@ -1,10 +1,11 @@
1
1
  import { omit } from '@vitus-labs/core';
2
- declare type BoolFunc = (value: any) => boolean;
2
+ type BoolFunc = (value: any) => boolean;
3
3
  export declare const isNumber: BoolFunc;
4
4
  export declare const hasValue: BoolFunc;
5
5
  export declare const isVisible: BoolFunc;
6
- declare type HasWidth = (size: any, columns: any) => boolean;
6
+ type HasWidth = (size: any, columns: any) => boolean;
7
7
  export declare const hasWidth: HasWidth;
8
- declare type OmitCtxKeys = (props?: Record<string, any>) => ReturnType<typeof omit>;
8
+ type OmitCtxKeys = (props?: Record<string, any>) => ReturnType<typeof omit>;
9
9
  export declare const omitCtxKeys: OmitCtxKeys;
10
10
  export {};
11
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAGvC,KAAK,QAAQ,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,OAAO,CAAA;AAEvC,eAAO,MAAM,QAAQ,EAAE,QAA4C,CAAA;AACnE,eAAO,MAAM,QAAQ,EAAE,QAAkD,CAAA;AACzE,eAAO,MAAM,SAAS,EAAE,QACiC,CAAA;AAEzD,KAAK,QAAQ,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,KAAK,OAAO,CAAA;AACpD,eAAO,MAAM,QAAQ,EAAE,QACkB,CAAA;AAEzC,KAAK,WAAW,GAAG,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,UAAU,CAAC,OAAO,IAAI,CAAC,CAAA;AAC3E,eAAO,MAAM,WAAW,EAAE,WAAkD,CAAA"}
@@ -1,15 +1,9 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var unistyle = require('@vitus-labs/unistyle');
6
4
  var React = require('react');
7
5
  var core = require('@vitus-labs/core');
8
6
 
9
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
-
11
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
12
-
13
7
  const PKG_NAME = '@vitus-labs/coolgrid';
14
8
  /* eslint-disable import/prefer-default-export */
15
9
  const CONTEXT_KEYS = [
@@ -81,11 +75,11 @@ const Component$2 = ({ children, component, css, width, ...props }) => {
81
75
  // @ts-ignore
82
76
  finalWidth = typeof width === 'function' ? width(containerWidth) : width;
83
77
  }
84
- return (React__default["default"].createElement(Styled$2, { ...omitCtxKeys(props), as: component, "$coolgrid": {
78
+ return (React.createElement(Styled$2, { ...omitCtxKeys(props), as: component, "$coolgrid": {
85
79
  width: finalWidth,
86
80
  extraStyles: css,
87
81
  } },
88
- React__default["default"].createElement(ContainerContext.Provider, { value: ctx }, children)));
82
+ React.createElement(ContainerContext.Provider, { value: ctx }, children)));
89
83
  };
90
84
  const name$2 = `${PKG_NAME}/Container`;
91
85
  Component$2.displayName = name$2;
@@ -153,8 +147,8 @@ const Component$1 = ({ children, component, css, contentAlignX: rowAlignX, ...pr
153
147
  extraStyles: css || rowCss,
154
148
  },
155
149
  };
156
- return (React__default["default"].createElement(Styled$1, { ...finalProps },
157
- React__default["default"].createElement(RowContext.Provider, { value: context }, children)));
150
+ return (React.createElement(Styled$1, { ...finalProps },
151
+ React.createElement(RowContext.Provider, { value: context }, children)));
158
152
  };
159
153
  const name$1 = `${PKG_NAME}/Row`;
160
154
  Component$1.displayName = name$1;
@@ -184,7 +178,7 @@ const widthStyles = ({ size, columns, gap, RNparentWidth }, { rootSize }) => {
184
178
  `;
185
179
  };
186
180
  const spacingStyles = (type, param, rootSize) => {
187
- if (!param || !isNumber(param)) {
181
+ if (!isNumber(param)) {
188
182
  return '';
189
183
  }
190
184
  const finalStyle = `${type}: ${unistyle.value(param / 2, rootSize)}`;
@@ -238,7 +232,7 @@ const Component = ({ children, component, css, ...props }) => {
238
232
  ...parentCtx,
239
233
  ...props,
240
234
  });
241
- return (React__default["default"].createElement(Styled, { ...omitCtxKeys(props), as: component || colComponent, "$coolgrid": {
235
+ return (React.createElement(Styled, { ...omitCtxKeys(props), as: component || colComponent, "$coolgrid": {
242
236
  columns,
243
237
  gap,
244
238
  size,
@@ -1 +1 @@
1
- {"version":3,"file":"vitus-labs-coolgrid.js","sources":["../src/constants.ts","../src/utils.ts","../src/context/ContainerContext.ts","../src/useContext.tsx","../src/Container/styled.ts","../src/Container/component.tsx","../src/context/RowContext.ts","../src/Row/styled.ts","../src/Row/component.tsx","../src/Col/styled.ts","../src/Col/component.tsx","../src/theme.ts"],"sourcesContent":["export const PKG_NAME = '@vitus-labs/coolgrid'\n\n/* eslint-disable import/prefer-default-export */\nexport const CONTEXT_KEYS = [\n // 'breakpoints',\n // 'rootSize',\n 'columns',\n 'size',\n 'gap',\n 'padding',\n 'gutter',\n 'colCss',\n 'colComponent',\n 'rowCss',\n 'rowComponent',\n 'contentAlignX',\n]\n","import { omit } from '@vitus-labs/core'\nimport { CONTEXT_KEYS } from '~/constants'\n\ntype BoolFunc = (value: any) => boolean\n\nexport const isNumber: BoolFunc = (value) => Number.isFinite(value)\nexport const hasValue: BoolFunc = (value) => isNumber(value) && value > 0\nexport const isVisible: BoolFunc = (value) =>\n (isNumber(value) && value !== 0) || value === undefined\n\ntype HasWidth = (size: any, columns: any) => boolean\nexport const hasWidth: HasWidth = (size, columns) =>\n !!(hasValue(size) && hasValue(columns))\n\ntype OmitCtxKeys = (props?: Record<string, any>) => ReturnType<typeof omit>\nexport const omitCtxKeys: OmitCtxKeys = (props) => omit(props, CONTEXT_KEYS)\n","import { createContext } from 'react'\nimport type { Context } from '~/types'\n\nexport default createContext<Context>({})\n","import { useContext } from 'react'\nimport { get, pick } from '@vitus-labs/core'\nimport { context } from '@vitus-labs/unistyle'\nimport { CONTEXT_KEYS } from '~/constants'\nimport { Obj, ValueType, Context } from '~/types'\n\n// ------------------------------------------\n// pickTheme props\n// ------------------------------------------\nexport type PickThemeProps = <T extends Record<string, unknown>>(\n props: T,\n keywords: Array<keyof T>\n) => ReturnType<typeof pick>\nconst pickThemeProps: PickThemeProps = (props, keywords) =>\n pick(props, keywords)\n\n// ------------------------------------------\n// create grid settings\n// ------------------------------------------\ntype GetGridContext = (\n props: Obj,\n theme: Obj\n) => {\n columns?: ValueType\n containerWidth?: Record<string, number>\n}\n\nexport const getGridContext: GetGridContext = (props = {}, theme = {}) => ({\n columns: (get(props, 'columns') ||\n get(theme, 'grid.columns') ||\n get(theme, 'coolgrid.columns')) as ValueType,\n containerWidth: (get(props, 'width') ||\n get(theme, 'grid.container') ||\n get(theme, 'coolgrid.container')) as Record<string, number>,\n})\n\ntype UseGridContext = (props: Obj) => Context\nconst useGridContext: UseGridContext = (props) => {\n const { theme } = useContext(context)\n const ctxProps = pickThemeProps(props, CONTEXT_KEYS)\n const gridContext = getGridContext(ctxProps, theme as Record<string, unknown>)\n\n return { ...gridContext, ...ctxProps }\n}\n\nexport default useGridContext\n","import { config } from '@vitus-labs/core'\nimport {\n makeItResponsive,\n value,\n extendCss,\n MakeItResponsiveStyles,\n} from '@vitus-labs/unistyle'\nimport { StyledTypes } from '~/types'\n\nconst styles: MakeItResponsiveStyles<\n Pick<StyledTypes, 'width' | 'extraStyles'>\n> = ({ theme: t, css, rootSize }) => css`\n max-width: ${value(t.width, rootSize)};\n ${extendCss(t.extraStyles)};\n`\n\nexport default config.styled<any>(config.component)`\n ${\n __WEB__ &&\n config.css`\n box-sizing: border-box;\n `\n };\n\n display: flex;\n width: 100%;\n flex-direction: column;\n margin-right: auto;\n margin-left: auto;\n\n ${makeItResponsive({\n key: '$coolgrid',\n styles,\n css: config.css,\n normalize: true,\n })};\n`\n","import React from 'react'\nimport { PKG_NAME } from '~/constants'\nimport { omitCtxKeys } from '~/utils'\nimport Context from '~/context/ContainerContext'\nimport useGridContext from '~/useContext'\nimport type { ElementType } from '~/types'\nimport Styled from './styled'\n\nconst Component: ElementType<['containerWidth']> = ({\n children,\n component,\n css,\n width,\n ...props\n}) => {\n const { containerWidth = {}, ...ctx } = useGridContext(props)\n\n let finalWidth = containerWidth\n if (width) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n finalWidth = typeof width === 'function' ? width(containerWidth) : width\n }\n\n return (\n <Styled\n {...omitCtxKeys(props)}\n as={component}\n $coolgrid={{\n width: finalWidth,\n extraStyles: css,\n }}\n >\n <Context.Provider value={ctx}>{children}</Context.Provider>\n </Styled>\n )\n}\n\nconst name = `${PKG_NAME}/Container`\n\nComponent.displayName = name\nComponent.pkgName = PKG_NAME\nComponent.VITUS_LABS__COMPONENT = name\n\nexport default Component\n","import { createContext } from 'react'\nimport type { Context } from '~/types'\n\nexport default createContext<Context>({})\n","/* eslint-disable @typescript-eslint/no-non-null-assertion */\nimport { config } from '@vitus-labs/core'\nimport {\n makeItResponsive,\n value,\n extendCss,\n ALIGN_CONTENT_MAP_X,\n MakeItResponsiveStyles,\n} from '@vitus-labs/unistyle'\nimport { isNumber } from '~/utils'\nimport { CssOutput, StyledTypes } from '~/types'\n\ntype SpacingStyles = (\n props: Pick<StyledTypes, 'gap' | 'gutter'>,\n { rootSize }: { rootSize?: number }\n) => CssOutput\n\nconst spacingStyles: SpacingStyles = ({ gap, gutter }, { rootSize }) => {\n if (!isNumber(gap)) return ''\n\n const getValue = (param) => value(param, rootSize)\n\n const spacingX = (gap! / 2) * -1\n const spacingY = isNumber(gutter) ? gutter! - gap! / 2 : gap! / 2\n\n return config.css`\n margin: ${getValue(spacingY)} ${getValue(spacingX)};\n `\n}\n\nconst contentAlign = (align?: StyledTypes['contentAlignX']) => {\n if (!align) return ''\n\n return config.css`\n justify-content: ${ALIGN_CONTENT_MAP_X[align]};\n `\n}\n\nconst styles: MakeItResponsiveStyles<\n Pick<StyledTypes, 'gap' | 'gutter' | 'contentAlignX' | 'extraStyles'>\n> = ({ theme, css, rootSize }) => {\n const { gap, gutter, contentAlignX, extraStyles } = theme\n\n return css`\n ${spacingStyles({ gap, gutter }, { rootSize })};\n ${contentAlign(contentAlignX)};\n ${extendCss(extraStyles)};\n `\n}\n\nexport default config.styled<any>(config.component)`\n ${\n __WEB__ &&\n config.css`\n box-sizing: border-box;\n `\n };\n\n display: flex;\n flex-wrap: wrap;\n align-self: stretch;\n flex-direction: row;\n\n ${makeItResponsive({\n key: '$coolgrid',\n styles,\n css: config.css,\n normalize: true,\n })};\n`\n","import React, { useContext, useMemo } from 'react'\nimport { PKG_NAME } from '~/constants'\nimport { omitCtxKeys } from '~/utils'\nimport useGridContext from '~/useContext'\nimport { ContainerContext, RowContext } from '~/context'\nimport type { ElementType } from '~/types'\nimport Styled from './styled'\n\nconst Component: ElementType<\n ['containerWidth', 'width', 'rowComponent', 'rowCss']\n> = ({ children, component, css, contentAlignX: rowAlignX, ...props }) => {\n const parentCtx = useContext(ContainerContext)\n const { columns, gap, gutter, rowComponent, rowCss, contentAlignX, ...ctx } =\n useGridContext({ ...parentCtx, ...props })\n\n const context = useMemo(\n () => ({ ...ctx, columns, gap, gutter }),\n [ctx, columns, gap, gutter]\n )\n\n const finalProps = {\n ...omitCtxKeys(props),\n as: component || rowComponent,\n $coolgrid: {\n contentAlignX: rowAlignX || contentAlignX,\n columns,\n gap,\n gutter,\n extraStyles: css || rowCss,\n },\n }\n\n return (\n <Styled {...finalProps}>\n <RowContext.Provider value={context}>{children}</RowContext.Provider>\n </Styled>\n )\n}\n\nconst name = `${PKG_NAME}/Row`\n\nComponent.displayName = name\nComponent.pkgName = PKG_NAME\nComponent.VITUS_LABS__COMPONENT = name\n\nexport default Component\n","/* eslint-disable @typescript-eslint/no-non-null-assertion */\nimport { config } from '@vitus-labs/core'\nimport {\n makeItResponsive,\n value,\n extendCss,\n MakeItResponsiveStyles,\n} from '@vitus-labs/unistyle'\nimport { hasValue, isVisible, isNumber } from '~/utils'\nimport { CssOutput, StyledTypes } from '~/types'\n\ntype HasWidth = (size?: number, columns?: number) => boolean\n\nconst hasWidth: HasWidth = (size, columns) =>\n hasValue(size) && hasValue(columns)\n\ntype WidthStyles = (\n props: Pick<StyledTypes, 'size' | 'columns' | 'gap' | 'RNparentWidth'>,\n defaults: { rootSize?: number }\n) => CssOutput\n\nconst widthStyles: WidthStyles = (\n { size, columns, gap, RNparentWidth },\n { rootSize }\n) => {\n if (!hasWidth(size, columns)) {\n return ''\n }\n\n // calculate % of width\n const width = __WEB__\n ? (size! / columns!) * 100\n : (RNparentWidth / columns!) * size!\n\n const hasGap = hasValue(gap)\n\n // eslint-disable-next-line no-nested-ternary\n const val = __WEB__\n ? hasGap\n ? `calc(${width}% - ${gap}px)`\n : `${width}%`\n : hasGap\n ? width - gap!\n : width\n\n return config.css`\n flex-grow: 0;\n flex-shrink: 0;\n max-width: ${value(val, rootSize)};\n flex-basis: ${value(val, rootSize)};\n `\n}\n\ntype SpacingStyles = (\n type: 'margin' | 'padding',\n param?: number,\n rootSize?: number\n) => CssOutput\nconst spacingStyles: SpacingStyles = (type, param, rootSize) => {\n if (!param || !isNumber(param)) {\n return ''\n }\n\n const finalStyle = `${type}: ${value(param / 2, rootSize)}`\n\n return config.css`\n ${finalStyle};\n `\n}\n\nconst styles: MakeItResponsiveStyles<StyledTypes> = ({\n theme,\n css,\n rootSize,\n}) => {\n const { size, columns, gap, padding, extraStyles, RNparentWidth } = theme\n const renderStyles = isVisible(size)\n\n if (renderStyles) {\n return css`\n left: initial;\n position: relative;\n ${widthStyles({ size, columns, gap, RNparentWidth }, { rootSize })};\n ${spacingStyles('padding', padding, rootSize)};\n ${spacingStyles('margin', gap, rootSize)};\n ${extendCss(extraStyles)};\n `\n }\n\n return css`\n left: -9999px;\n position: fixed;\n margin: 0;\n padding: 0;\n `\n}\n\nexport default config.styled<any>(config.component)`\n ${\n __WEB__ &&\n config.css`\n box-sizing: border-box;\n `\n };\n\n position: relative;\n display: flex;\n flex-basis: 0;\n flex-grow: 1;\n flex-direction: column;\n justify-content: stretch;\n\n ${makeItResponsive({\n key: '$coolgrid',\n styles,\n css: config.css,\n normalize: true,\n })};\n`\n","import React, { useContext } from 'react'\nimport { PKG_NAME } from '~/constants'\nimport { omitCtxKeys } from '~/utils'\nimport useGridContext from '~/useContext'\nimport { RowContext } from '~/context'\nimport type { ElementType } from '~/types'\nimport Styled from './styled'\n\nconst Component: ElementType<\n [\n 'containerWidth',\n 'width',\n 'rowComponent',\n 'rowCss',\n 'colCss',\n 'colComponent',\n 'columns',\n 'gap',\n 'gutter',\n 'contentAlignX'\n ]\n> = ({ children, component, css, ...props }) => {\n const parentCtx = useContext(RowContext)\n const { colCss, colComponent, columns, gap, size, padding } = useGridContext({\n ...parentCtx,\n ...props,\n })\n\n return (\n <Styled\n {...omitCtxKeys(props)}\n as={component || colComponent}\n $coolgrid={{\n columns,\n gap,\n size,\n padding,\n extraStyles: css || colCss,\n }}\n >\n {children}\n </Styled>\n )\n}\n\nconst name = `${PKG_NAME}/Col`\n\nComponent.displayName = name\nComponent.pkgName = PKG_NAME\nComponent.VITUS_LABS__COMPONENT = name\n\nexport default Component\n","export default {\n rootSize: 16,\n breakpoints: {\n xs: 0,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n },\n grid: {\n columns: 12,\n container: {\n xs: '100%',\n sm: 540,\n md: 720,\n lg: 960,\n xl: 1140,\n },\n },\n} as const\n"],"names":["omit","createContext","pick","get","useContext","context","styles","value","extendCss","config","makeItResponsive","Component","React","Styled","Context","name","spacingStyles","ALIGN_CONTENT_MAP_X","useMemo"],"mappings":";;;;;;;;;;;;AAAO,MAAM,QAAQ,GAAG,sBAAsB,CAAA;AAE9C;AACO,MAAM,YAAY,GAAG;;;IAG1B,SAAS;IACT,MAAM;IACN,KAAK;IACL,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,cAAc;IACd,QAAQ;IACR,cAAc;IACd,eAAe;CAChB;;ACXM,MAAM,QAAQ,GAAa,CAAC,KAAK,KAAK,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAC5D,MAAM,QAAQ,GAAa,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAA;AAClE,MAAM,SAAS,GAAa,CAAC,KAAK,KACvC,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,KAAK,KAAK,KAAK,SAAS,CAAA;AAOlD,MAAM,WAAW,GAAgB,CAAC,KAAK,KAAKA,SAAI,CAAC,KAAK,EAAE,YAAY,CAAC;;ACZ5E,uBAAeC,mBAAa,CAAU,EAAE,CAAC;;ACUzC,MAAM,cAAc,GAAmB,CAAC,KAAK,EAAE,QAAQ,KACrDC,SAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;AAahB,MAAM,cAAc,GAAmB,CAAC,KAAK,GAAG,EAAE,EAA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.js","sources":["../src/constants.ts","../src/utils.ts","../src/context/ContainerContext.ts","../src/useContext.tsx","../src/Container/styled.ts","../src/Container/component.tsx","../src/context/RowContext.ts","../src/Row/styled.ts","../src/Row/component.tsx","../src/Col/styled.ts","../src/Col/component.tsx","../src/theme.ts"],"sourcesContent":["export const PKG_NAME = '@vitus-labs/coolgrid'\n\n/* eslint-disable import/prefer-default-export */\nexport const CONTEXT_KEYS = [\n // 'breakpoints',\n // 'rootSize',\n 'columns',\n 'size',\n 'gap',\n 'padding',\n 'gutter',\n 'colCss',\n 'colComponent',\n 'rowCss',\n 'rowComponent',\n 'contentAlignX',\n]\n","import { omit } from '@vitus-labs/core'\nimport { CONTEXT_KEYS } from '~/constants'\n\ntype BoolFunc = (value: any) => boolean\n\nexport const isNumber: BoolFunc = (value) => Number.isFinite(value)\nexport const hasValue: BoolFunc = (value) => isNumber(value) && value > 0\nexport const isVisible: BoolFunc = (value) =>\n (isNumber(value) && value !== 0) || value === undefined\n\ntype HasWidth = (size: any, columns: any) => boolean\nexport const hasWidth: HasWidth = (size, columns) =>\n !!(hasValue(size) && hasValue(columns))\n\ntype OmitCtxKeys = (props?: Record<string, any>) => ReturnType<typeof omit>\nexport const omitCtxKeys: OmitCtxKeys = (props) => omit(props, CONTEXT_KEYS)\n","import { createContext } from 'react'\nimport type { Context } from '~/types'\n\nexport default createContext<Context>({})\n","import { useContext } from 'react'\nimport { get, pick } from '@vitus-labs/core'\nimport { context } from '@vitus-labs/unistyle'\nimport { CONTEXT_KEYS } from '~/constants'\nimport { Obj, ValueType, Context } from '~/types'\n\n// ------------------------------------------\n// pickTheme props\n// ------------------------------------------\nexport type PickThemeProps = <T extends Record<string, unknown>>(\n props: T,\n keywords: Array<keyof T>\n) => ReturnType<typeof pick>\nconst pickThemeProps: PickThemeProps = (props, keywords) =>\n pick(props, keywords)\n\n// ------------------------------------------\n// create grid settings\n// ------------------------------------------\ntype GetGridContext = (\n props: Obj,\n theme: Obj\n) => {\n columns?: ValueType\n containerWidth?: Record<string, number>\n}\n\nexport const getGridContext: GetGridContext = (props = {}, theme = {}) => ({\n columns: (get(props, 'columns') ||\n get(theme, 'grid.columns') ||\n get(theme, 'coolgrid.columns')) as ValueType,\n containerWidth: (get(props, 'width') ||\n get(theme, 'grid.container') ||\n get(theme, 'coolgrid.container')) as Record<string, number>,\n})\n\ntype UseGridContext = (props: Obj) => Context\nconst useGridContext: UseGridContext = (props) => {\n const { theme } = useContext(context)\n const ctxProps = pickThemeProps(props, CONTEXT_KEYS)\n const gridContext = getGridContext(ctxProps, theme as Record<string, unknown>)\n\n return { ...gridContext, ...ctxProps }\n}\n\nexport default useGridContext\n","import { config } from '@vitus-labs/core'\nimport {\n makeItResponsive,\n value,\n extendCss,\n MakeItResponsiveStyles,\n} from '@vitus-labs/unistyle'\nimport { StyledTypes } from '~/types'\n\nconst styles: MakeItResponsiveStyles<\n Pick<StyledTypes, 'width' | 'extraStyles'>\n> = ({ theme: t, css, rootSize }) => css`\n max-width: ${value(t.width, rootSize)};\n ${extendCss(t.extraStyles)};\n`\n\nexport default config.styled<any>(config.component)`\n ${\n __WEB__ &&\n config.css`\n box-sizing: border-box;\n `\n };\n\n display: flex;\n width: 100%;\n flex-direction: column;\n margin-right: auto;\n margin-left: auto;\n\n ${makeItResponsive({\n key: '$coolgrid',\n styles,\n css: config.css,\n normalize: true,\n })};\n`\n","import React from 'react'\nimport { PKG_NAME } from '~/constants'\nimport { omitCtxKeys } from '~/utils'\nimport Context from '~/context/ContainerContext'\nimport useGridContext from '~/useContext'\nimport type { ElementType } from '~/types'\nimport Styled from './styled'\n\nconst Component: ElementType<['containerWidth']> = ({\n children,\n component,\n css,\n width,\n ...props\n}) => {\n const { containerWidth = {}, ...ctx } = useGridContext(props)\n\n let finalWidth = containerWidth\n if (width) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n finalWidth = typeof width === 'function' ? width(containerWidth) : width\n }\n\n return (\n <Styled\n {...omitCtxKeys(props)}\n as={component}\n $coolgrid={{\n width: finalWidth,\n extraStyles: css,\n }}\n >\n <Context.Provider value={ctx}>{children}</Context.Provider>\n </Styled>\n )\n}\n\nconst name = `${PKG_NAME}/Container`\n\nComponent.displayName = name\nComponent.pkgName = PKG_NAME\nComponent.VITUS_LABS__COMPONENT = name\n\nexport default Component\n","import { createContext } from 'react'\nimport type { Context } from '~/types'\n\nexport default createContext<Context>({})\n","/* eslint-disable @typescript-eslint/no-non-null-assertion */\nimport { config } from '@vitus-labs/core'\nimport {\n makeItResponsive,\n value,\n extendCss,\n ALIGN_CONTENT_MAP_X,\n MakeItResponsiveStyles,\n} from '@vitus-labs/unistyle'\nimport { isNumber } from '~/utils'\nimport { CssOutput, StyledTypes } from '~/types'\n\ntype SpacingStyles = (\n props: Pick<StyledTypes, 'gap' | 'gutter'>,\n { rootSize }: { rootSize?: number }\n) => CssOutput\n\nconst spacingStyles: SpacingStyles = ({ gap, gutter }, { rootSize }) => {\n if (!isNumber(gap)) return ''\n\n const getValue = (param) => value(param, rootSize)\n\n const spacingX = (gap! / 2) * -1\n const spacingY = isNumber(gutter) ? gutter! - gap! / 2 : gap! / 2\n\n return config.css`\n margin: ${getValue(spacingY)} ${getValue(spacingX)};\n `\n}\n\nconst contentAlign = (align?: StyledTypes['contentAlignX']) => {\n if (!align) return ''\n\n return config.css`\n justify-content: ${ALIGN_CONTENT_MAP_X[align]};\n `\n}\n\nconst styles: MakeItResponsiveStyles<\n Pick<StyledTypes, 'gap' | 'gutter' | 'contentAlignX' | 'extraStyles'>\n> = ({ theme, css, rootSize }) => {\n const { gap, gutter, contentAlignX, extraStyles } = theme\n\n return css`\n ${spacingStyles({ gap, gutter }, { rootSize })};\n ${contentAlign(contentAlignX)};\n ${extendCss(extraStyles)};\n `\n}\n\nexport default config.styled<any>(config.component)`\n ${\n __WEB__ &&\n config.css`\n box-sizing: border-box;\n `\n };\n\n display: flex;\n flex-wrap: wrap;\n align-self: stretch;\n flex-direction: row;\n\n ${makeItResponsive({\n key: '$coolgrid',\n styles,\n css: config.css,\n normalize: true,\n })};\n`\n","import React, { useContext, useMemo } from 'react'\nimport { PKG_NAME } from '~/constants'\nimport { omitCtxKeys } from '~/utils'\nimport useGridContext from '~/useContext'\nimport { ContainerContext, RowContext } from '~/context'\nimport type { ElementType } from '~/types'\nimport Styled from './styled'\n\nconst Component: ElementType<\n ['containerWidth', 'width', 'rowComponent', 'rowCss']\n> = ({ children, component, css, contentAlignX: rowAlignX, ...props }) => {\n const parentCtx = useContext(ContainerContext)\n const { columns, gap, gutter, rowComponent, rowCss, contentAlignX, ...ctx } =\n useGridContext({ ...parentCtx, ...props })\n\n const context = useMemo(\n () => ({ ...ctx, columns, gap, gutter }),\n [ctx, columns, gap, gutter]\n )\n\n const finalProps = {\n ...omitCtxKeys(props),\n as: component || rowComponent,\n $coolgrid: {\n contentAlignX: rowAlignX || contentAlignX,\n columns,\n gap,\n gutter,\n extraStyles: css || rowCss,\n },\n }\n\n return (\n <Styled {...finalProps}>\n <RowContext.Provider value={context}>{children}</RowContext.Provider>\n </Styled>\n )\n}\n\nconst name = `${PKG_NAME}/Row`\n\nComponent.displayName = name\nComponent.pkgName = PKG_NAME\nComponent.VITUS_LABS__COMPONENT = name\n\nexport default Component\n","/* eslint-disable @typescript-eslint/no-non-null-assertion */\nimport { config } from '@vitus-labs/core'\nimport {\n makeItResponsive,\n value,\n extendCss,\n MakeItResponsiveStyles,\n} from '@vitus-labs/unistyle'\nimport { hasValue, isVisible, isNumber } from '~/utils'\nimport { CssOutput, StyledTypes } from '~/types'\n\ntype HasWidth = (size?: number, columns?: number) => boolean\n\nconst hasWidth: HasWidth = (size, columns) =>\n hasValue(size) && hasValue(columns)\n\ntype WidthStyles = (\n props: Pick<StyledTypes, 'size' | 'columns' | 'gap' | 'RNparentWidth'>,\n defaults: { rootSize?: number }\n) => CssOutput\n\nconst widthStyles: WidthStyles = (\n { size, columns, gap, RNparentWidth },\n { rootSize }\n) => {\n if (!hasWidth(size, columns)) {\n return ''\n }\n\n // calculate % of width\n const width = __WEB__\n ? (size! / columns!) * 100\n : (RNparentWidth / columns!) * size!\n\n const hasGap = hasValue(gap)\n\n // eslint-disable-next-line no-nested-ternary\n const val = __WEB__\n ? hasGap\n ? `calc(${width}% - ${gap}px)`\n : `${width}%`\n : hasGap\n ? width - gap!\n : width\n\n return config.css`\n flex-grow: 0;\n flex-shrink: 0;\n max-width: ${value(val, rootSize)};\n flex-basis: ${value(val, rootSize)};\n `\n}\n\ntype SpacingStyles = (\n type: 'margin' | 'padding',\n param?: number,\n rootSize?: number\n) => CssOutput\nconst spacingStyles: SpacingStyles = (type, param, rootSize) => {\n if (!isNumber(param)) {\n return ''\n }\n\n const finalStyle = `${type}: ${value(param! / 2, rootSize)}`\n\n return config.css`\n ${finalStyle};\n `\n}\n\nconst styles: MakeItResponsiveStyles<StyledTypes> = ({\n theme,\n css,\n rootSize,\n}) => {\n const { size, columns, gap, padding, extraStyles, RNparentWidth } = theme\n const renderStyles = isVisible(size)\n\n if (renderStyles) {\n return css`\n left: initial;\n position: relative;\n ${widthStyles({ size, columns, gap, RNparentWidth }, { rootSize })};\n ${spacingStyles('padding', padding, rootSize)};\n ${spacingStyles('margin', gap, rootSize)};\n ${extendCss(extraStyles)};\n `\n }\n\n return css`\n left: -9999px;\n position: fixed;\n margin: 0;\n padding: 0;\n `\n}\n\nexport default config.styled<any>(config.component)`\n ${\n __WEB__ &&\n config.css`\n box-sizing: border-box;\n `\n };\n\n position: relative;\n display: flex;\n flex-basis: 0;\n flex-grow: 1;\n flex-direction: column;\n justify-content: stretch;\n\n ${makeItResponsive({\n key: '$coolgrid',\n styles,\n css: config.css,\n normalize: true,\n })};\n`\n","import React, { useContext } from 'react'\nimport { PKG_NAME } from '~/constants'\nimport { omitCtxKeys } from '~/utils'\nimport useGridContext from '~/useContext'\nimport { RowContext } from '~/context'\nimport type { ElementType } from '~/types'\nimport Styled from './styled'\n\nconst Component: ElementType<\n [\n 'containerWidth',\n 'width',\n 'rowComponent',\n 'rowCss',\n 'colCss',\n 'colComponent',\n 'columns',\n 'gap',\n 'gutter',\n 'contentAlignX'\n ]\n> = ({ children, component, css, ...props }) => {\n const parentCtx = useContext(RowContext)\n const { colCss, colComponent, columns, gap, size, padding } = useGridContext({\n ...parentCtx,\n ...props,\n })\n\n return (\n <Styled\n {...omitCtxKeys(props)}\n as={component || colComponent}\n $coolgrid={{\n columns,\n gap,\n size,\n padding,\n extraStyles: css || colCss,\n }}\n >\n {children}\n </Styled>\n )\n}\n\nconst name = `${PKG_NAME}/Col`\n\nComponent.displayName = name\nComponent.pkgName = PKG_NAME\nComponent.VITUS_LABS__COMPONENT = name\n\nexport default Component\n","export default {\n rootSize: 16,\n breakpoints: {\n xs: 0,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n },\n grid: {\n columns: 12,\n container: {\n xs: '100%',\n sm: 540,\n md: 720,\n lg: 960,\n xl: 1140,\n },\n },\n} as const\n"],"names":["omit","createContext","pick","get","useContext","context","styles","value","extendCss","config","makeItResponsive","Component","Styled","Context","name","spacingStyles","ALIGN_CONTENT_MAP_X","useMemo"],"mappings":";;;;;;AAAO,MAAM,QAAQ,GAAG,sBAAsB,CAAA;AAE9C;AACO,MAAM,YAAY,GAAG;;;IAG1B,SAAS;IACT,MAAM;IACN,KAAK;IACL,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,cAAc;IACd,QAAQ;IACR,cAAc;IACd,eAAe;CAChB;;ACXM,MAAM,QAAQ,GAAa,CAAC,KAAK,KAAK,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAC5D,MAAM,QAAQ,GAAa,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAA;AAClE,MAAM,SAAS,GAAa,CAAC,KAAK,KACvC,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,KAAK,KAAK,KAAK,SAAS,CAAA;AAOlD,MAAM,WAAW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A,SAAS,EAAE;AACT,YAAA,EAAE,EAAE,MAAM;AACV,YAAA,EAAE,EAAE,GAAG;AACP,YAAA,EAAE,EAAE,GAAG;AACP,YAAA,EAAE,EAAE,GAAG;AACP,YAAA,EAAE,EAAE,IAAI;AACT,SAAA;AACF,KAAA;CACO;;;;;;;;;;;"}
@@ -177,7 +177,7 @@ const widthStyles = ({ size, columns, gap, RNparentWidth }, { rootSize }) => {
177
177
  `;
178
178
  };
179
179
  const spacingStyles = (type, param, rootSize) => {
180
- if (!param || !isNumber(param)) {
180
+ if (!isNumber(param)) {
181
181
  return '';
182
182
  }
183
183
  const finalStyle = `${type}: ${value(param / 2, rootSize)}`;