@muraldevkit/ui-toolkit 4.76.1-dev-aD33.1 → 4.76.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/dist/cjs/components/file-upload/MrlFileUpload/MrlFileUpload.js +5 -2
- package/dist/cjs/components/file-upload/MrlFileUpload/MrlFileUpload.js.map +1 -1
- package/dist/cjs/components/grid/MrlCol/MrlCol.js +55 -58
- package/dist/cjs/components/grid/MrlCol/MrlCol.js.map +1 -1
- package/dist/cjs/components/grid/MrlGrid/MrlGrid.js +6 -4
- package/dist/cjs/components/grid/MrlGrid/MrlGrid.js.map +1 -1
- package/dist/cjs/components/grid/MrlRow/MrlRow.js +8 -10
- package/dist/cjs/components/grid/MrlRow/MrlRow.js.map +1 -1
- package/dist/cjs/components/grid/constants.js +9 -47
- package/dist/cjs/components/grid/constants.js.map +1 -1
- package/dist/cjs/components/menu/MrlMenu/MrlMenu.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/components/grid/MrlCol/MrlCol.d.ts +6 -4
- package/dist/components/grid/MrlCol/index.d.ts +1 -1
- package/dist/components/grid/MrlGrid/MrlGrid.d.ts +5 -5
- package/dist/components/grid/MrlGrid/index.d.ts +1 -1
- package/dist/components/grid/MrlRow/MrlRow.d.ts +7 -7
- package/dist/components/grid/MrlRow/index.d.ts +1 -1
- package/dist/components/grid/constants.d.ts +12 -52
- package/dist/components/grid/index.d.ts +0 -1
- package/dist/components/menu/MrlMenu/MrlMenu.d.ts +10 -3
- package/dist/esm/components/file-upload/MrlFileUpload/MrlFileUpload.js +5 -2
- package/dist/esm/components/file-upload/MrlFileUpload/MrlFileUpload.js.map +1 -1
- package/dist/esm/components/grid/MrlCol/MrlCol.js +56 -59
- package/dist/esm/components/grid/MrlCol/MrlCol.js.map +1 -1
- package/dist/esm/components/grid/MrlGrid/MrlGrid.js +6 -4
- package/dist/esm/components/grid/MrlGrid/MrlGrid.js.map +1 -1
- package/dist/esm/components/grid/MrlRow/MrlRow.js +8 -10
- package/dist/esm/components/grid/MrlRow/MrlRow.js.map +1 -1
- package/dist/esm/components/grid/constants.js +9 -46
- package/dist/esm/components/grid/constants.js.map +1 -1
- package/dist/esm/components/menu/MrlMenu/MrlMenu.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/styles/MrlSidebar/module.scss +2 -2
- package/dist/styles/grid/global.scss +2 -97
- package/dist/styles/grid/variables.scss +26 -0
- package/dist/styles.css +7 -1
- package/dist/types/components/grid/MrlCol/MrlCol.d.ts +6 -4
- package/dist/types/components/grid/MrlCol/index.d.ts +1 -1
- package/dist/types/components/grid/MrlGrid/MrlGrid.d.ts +5 -5
- package/dist/types/components/grid/MrlGrid/index.d.ts +1 -1
- package/dist/types/components/grid/MrlRow/MrlRow.d.ts +7 -7
- package/dist/types/components/grid/MrlRow/index.d.ts +1 -1
- package/dist/types/components/grid/constants.d.ts +12 -52
- package/dist/types/components/grid/index.d.ts +0 -1
- package/dist/types/components/menu/MrlMenu/MrlMenu.d.ts +10 -3
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LayoutComponent } from '../../layout/constants';
|
|
2
|
+
import '../grid.variables.scss';
|
|
2
3
|
import '../grid.global.scss';
|
|
3
|
-
export type MrlGridProps = GridBaseProps;
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* MrlCol React component.
|
|
6
6
|
* @param props - component props
|
|
7
|
-
* @returns a
|
|
7
|
+
* @returns a MrlCol React component.
|
|
8
8
|
*/
|
|
9
|
-
export declare function MrlGrid({ children, className, ...rest }:
|
|
9
|
+
export declare function MrlGrid({ children, className, ...rest }: LayoutComponent): JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { MrlGrid } from './MrlGrid';
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { LayoutComponent } from '../../layout/constants';
|
|
2
|
+
import { AlignOptions, GutterSizes, JustifyOptions } from '../constants';
|
|
3
|
+
interface MrlRow extends LayoutComponent {
|
|
3
4
|
/**
|
|
4
5
|
* Flex alignment of the children within the component.
|
|
5
6
|
*/
|
|
6
7
|
align?: AlignOptions;
|
|
7
8
|
/**
|
|
8
|
-
* Gutter size for columns within the row
|
|
9
|
-
*
|
|
10
|
-
* @default 1
|
|
9
|
+
* Gutter size for columns within the row
|
|
11
10
|
*/
|
|
12
11
|
gutter?: GutterSizes;
|
|
13
12
|
/**
|
|
@@ -16,8 +15,9 @@ export interface MrlRowProps extends GridBaseProps {
|
|
|
16
15
|
justify?: JustifyOptions;
|
|
17
16
|
}
|
|
18
17
|
/**
|
|
19
|
-
* MrlRow React component.
|
|
18
|
+
* MrlRow React component.
|
|
20
19
|
* @param props - component props
|
|
21
20
|
* @returns a MrlRow React component.
|
|
22
21
|
*/
|
|
23
|
-
export declare function MrlRow({ align, children, className,
|
|
22
|
+
export declare function MrlRow({ align, children, className, justify, ...rest }: MrlRow): JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { MrlRow } from './MrlRow';
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import { DataQa } from '../../utils/dataQa';
|
|
2
1
|
/**
|
|
3
2
|
* Alignment & justification options for grid containers
|
|
4
3
|
*/
|
|
5
4
|
export type AlignOptions = 'start' | 'center' | 'end';
|
|
6
5
|
export type JustifyOptions = 'start' | 'center' | 'end' | 'between' | 'around';
|
|
7
6
|
/**
|
|
8
|
-
*
|
|
9
|
-
* always occupies at least one of the twelve tracks.
|
|
7
|
+
* Available grid sizes
|
|
10
8
|
*/
|
|
11
|
-
export
|
|
9
|
+
export declare const GridSizes: string[];
|
|
12
10
|
/**
|
|
13
|
-
* Number of columns
|
|
14
|
-
* larger breakpoint cancels an offset inherited from a smaller one.
|
|
11
|
+
* Number of columns that will be span on the grid.
|
|
15
12
|
*/
|
|
16
|
-
export type
|
|
13
|
+
export type NumCols = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
17
14
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
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>""
|
|
20
19
|
*/
|
|
21
|
-
|
|
20
|
+
type GridClass = 'col' | 'offset';
|
|
22
21
|
/**
|
|
23
|
-
* Interface of available class selectors
|
|
22
|
+
* Interface of available class selectors based on GridClass
|
|
24
23
|
*
|
|
25
24
|
* Example interface:
|
|
26
25
|
* {
|
|
@@ -29,13 +28,12 @@ export type NumCols = 0 | ColSpan;
|
|
|
29
28
|
* }
|
|
30
29
|
*/
|
|
31
30
|
type GridClassConfig = {
|
|
32
|
-
|
|
33
|
-
offset?: OffsetSpan;
|
|
31
|
+
[key in GridClass]?: NumCols;
|
|
34
32
|
};
|
|
35
33
|
/**
|
|
36
34
|
* Options to configure the number of columns to span on different screen sizes.
|
|
37
35
|
*/
|
|
38
|
-
type ColumnConfig =
|
|
36
|
+
type ColumnConfig = NumCols | 'auto' | GridClassConfig | undefined;
|
|
39
37
|
export interface GridColumns {
|
|
40
38
|
col?: ColumnConfig;
|
|
41
39
|
xs?: ColumnConfig;
|
|
@@ -45,46 +43,8 @@ export interface GridColumns {
|
|
|
45
43
|
xl?: ColumnConfig;
|
|
46
44
|
xxl?: ColumnConfig;
|
|
47
45
|
}
|
|
48
|
-
/**
|
|
49
|
-
* Breakpoint keys in ascending order. Drives both class generation and the
|
|
50
|
-
* filtering that keeps grid props from reaching the DOM.
|
|
51
|
-
*/
|
|
52
|
-
export declare const GRID_SIZE_KEYS: readonly ["col", "xs", "sm", "md", "lg", "xl", "xxl"];
|
|
53
46
|
/**
|
|
54
47
|
* Available gutter sizes for customizing the grid
|
|
55
48
|
*/
|
|
56
49
|
export type GutterSizes = 0 | 1 | 2;
|
|
57
|
-
/**
|
|
58
|
-
* Gutter size to modifier class. `1` is the default declared on `.row`, so it
|
|
59
|
-
* needs no class.
|
|
60
|
-
*/
|
|
61
|
-
export declare const GUTTER_CLASS: Record<GutterSizes, string | undefined>;
|
|
62
|
-
/**
|
|
63
|
-
* Roles a generic layout wrapper may safely carry.
|
|
64
|
-
*
|
|
65
|
-
* Composite widget roles (`grid`, `row`, `gridcell`, `listbox`, `tablist`, …)
|
|
66
|
-
* are deliberately excluded: they promise an APG keyboard contract — roving
|
|
67
|
-
* tabindex or `aria-activedescendant`, arrow-key navigation, selection state —
|
|
68
|
-
* that these divs do not implement. The roles below are structural only and
|
|
69
|
-
* carry no interaction contract, so they are safe to forward.
|
|
70
|
-
*
|
|
71
|
-
* `list`/`listitem` in particular is how a row of columns is announced as
|
|
72
|
-
* "list, N items", and is the standard workaround for Safari/VoiceOver
|
|
73
|
-
* dropping implicit list semantics. `region` needs an accessible name to be
|
|
74
|
-
* exposed as a landmark; the type cannot enforce that.
|
|
75
|
-
*
|
|
76
|
-
* Page landmarks belong to the layout components (MrlMain, MrlPage).
|
|
77
|
-
*/
|
|
78
|
-
export type SafeLayoutRole = 'group' | 'list' | 'listitem' | 'none' | 'presentation' | 'region';
|
|
79
|
-
/**
|
|
80
|
-
* Shared props for the grid components: every `div` attribute, with `role`
|
|
81
|
-
* narrowed to {@link SafeLayoutRole}.
|
|
82
|
-
*/
|
|
83
|
-
export type GridBaseProps = Omit<React.ComponentPropsWithoutRef<'div'>, 'role'> & DataQa & {
|
|
84
|
-
/**
|
|
85
|
-
* Structural role for the wrapper. Composite widget roles are not
|
|
86
|
-
* accepted — see {@link SafeLayoutRole}.
|
|
87
|
-
*/
|
|
88
|
-
role?: SafeLayoutRole;
|
|
89
|
-
};
|
|
90
50
|
export {};
|
|
@@ -75,12 +75,18 @@ export interface MrlMenuProps {
|
|
|
75
75
|
*/
|
|
76
76
|
position?: MenuPosition;
|
|
77
77
|
/**
|
|
78
|
-
*
|
|
78
|
+
* Opens or closes the menu from outside. Not just an initial value: whenever
|
|
79
|
+
* `isOpen` or `actionType` changes, the menu syncs its internal state to it.
|
|
80
|
+
* The menu can still close itself (item select, click outside, Escape, Tab),
|
|
81
|
+
* so pair this with `onClose` to reset your state. Prefer `triggerRef` when
|
|
82
|
+
* there is a trigger element. Ignored for submenus and `position="static"`.
|
|
79
83
|
* @default { actionType: null, isOpen: false }
|
|
80
84
|
*/
|
|
81
85
|
actionState?: ActionState;
|
|
82
86
|
/**
|
|
83
|
-
* Reference to the DOM element that triggers this menu.
|
|
87
|
+
* Reference to the DOM element that triggers this menu. This alone wires up
|
|
88
|
+
* click and keyboard open/close and the trigger's ARIA attributes; no
|
|
89
|
+
* `actionState` or `onClick` toggle is needed.
|
|
84
90
|
*/
|
|
85
91
|
triggerRef?: React.RefObject<HTMLButtonElement>;
|
|
86
92
|
/**
|
|
@@ -101,7 +107,8 @@ export interface MrlMenuProps {
|
|
|
101
107
|
*/
|
|
102
108
|
alignment?: MenuAlignment;
|
|
103
109
|
/**
|
|
104
|
-
*
|
|
110
|
+
* Called when the menu closes itself: item select, click outside, Escape, Tab,
|
|
111
|
+
* or scroll with `closeOnScroll`. Not called when a trigger click toggles it closed.
|
|
105
112
|
* @param type - type of close event
|
|
106
113
|
*/
|
|
107
114
|
onClose?: (type?: string) => void;
|