@muraldevkit/ui-toolkit 2.1.0 → 2.2.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.
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { GridColumns } from '../constants';
3
+ interface MrlCol extends GridColumns {
4
+ /**
5
+ * Children to be rendered within the component.
6
+ */
7
+ children: React.ReactNode;
8
+ className?: string;
9
+ }
10
+ /**
11
+ * MrlCol React component.
12
+ *
13
+ * @param props - component props
14
+ * @returns a MrlCol React component.
15
+ */
16
+ export declare function MrlCol(props: MrlCol): JSX.Element;
17
+ export {};
@@ -0,0 +1 @@
1
+ export { MrlCol } from './MrlCol';
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import '../grid.variables.scss';
3
+ import '../grid.global.scss';
4
+ interface MrlGrid {
5
+ /**
6
+ * Children to be rendered within the component.
7
+ */
8
+ children: React.ReactNode;
9
+ className?: string;
10
+ }
11
+ /**
12
+ * MrlCol React component.
13
+ *
14
+ * @param props - component props
15
+ * @returns a MrlCol React component.
16
+ */
17
+ export declare function MrlGrid({ children, className }: MrlGrid): JSX.Element;
18
+ export {};
@@ -0,0 +1 @@
1
+ export { MrlGrid } from './MrlGrid';
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+ import { AlignOptions, GutterSizes, JustifyOptions } from '../constants';
3
+ interface MrlRow {
4
+ /**
5
+ * Flex alignment of the children within the component.
6
+ */
7
+ align?: AlignOptions;
8
+ /**
9
+ * Children to be rendered within the component.
10
+ */
11
+ children: React.ReactNode;
12
+ className?: string;
13
+ /**
14
+ * Gutter size for columns within the row
15
+ */
16
+ gutter?: GutterSizes;
17
+ /**
18
+ * Justify content of the children within the component.
19
+ */
20
+ justify?: JustifyOptions;
21
+ }
22
+ /**
23
+ * MrlRow React component.
24
+ *
25
+ * @param props - component props
26
+ * @returns a MrlRow React component.
27
+ */
28
+ export declare function MrlRow({ align, children, className, gutter, justify }: MrlRow): JSX.Element;
29
+ export {};
@@ -0,0 +1 @@
1
+ export { MrlRow } from './MrlRow';
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Alignment & justification options for grid containers
3
+ */
4
+ export type AlignOptions = 'start' | 'center' | 'end';
5
+ export type JustifyOptions = 'start' | 'center' | 'end' | 'between' | 'around';
6
+ /**
7
+ * Available grid sizes
8
+ */
9
+ export declare const GridSizes: string[];
10
+ /**
11
+ * Number of columns that will be span on the grid.
12
+ */
13
+ export type NumCols = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
14
+ /**
15
+ * The type of classes that can be configured based on the bootstrap API.
16
+ * Current supported:
17
+ * - columns "col-<size>-<number>"
18
+ * - offsets "offset-<size>-<number>""
19
+ */
20
+ type GridClass = 'col' | 'offset';
21
+ /**
22
+ * Interface of available class selectors based on GridClass
23
+ *
24
+ * Example interface:
25
+ * {
26
+ * col?: number,
27
+ * offset?: number
28
+ * }
29
+ */
30
+ type GridClassConfig = {
31
+ [key in GridClass]?: NumCols;
32
+ };
33
+ /**
34
+ * Options to configure the number of columns to span on different screen sizes.
35
+ */
36
+ type ColumnConfig = NumCols | 'auto' | GridClassConfig | undefined;
37
+ export interface GridColumns {
38
+ xs?: ColumnConfig;
39
+ sm?: ColumnConfig;
40
+ md?: ColumnConfig;
41
+ lg?: ColumnConfig;
42
+ xl?: ColumnConfig;
43
+ xxl?: ColumnConfig;
44
+ }
45
+ /**
46
+ * Available gutter sizes for customizing the grid
47
+ */
48
+ export type GutterSizes = 0 | 1 | 2;
49
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './MrlGrid';
2
+ export * from './MrlRow';
3
+ export * from './MrlCol';
@@ -2,6 +2,7 @@ export * from './button';
2
2
  export * from './divider';
3
3
  export * from './focus-trap';
4
4
  export * from './form';
5
+ export * from './grid';
5
6
  export * from './link';
6
7
  export * from './modal';
7
8
  export * from './notification';