@muraldevkit/ui-toolkit 4.77.0-dev-yOaq.1 → 4.77.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/button/MrlButton/MrlButton.js +16 -8
- package/dist/cjs/components/button/MrlButton/MrlButton.js.map +1 -1
- 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/filter/MrlFilterItem/MrlFilterItem.js +2 -1
- package/dist/cjs/components/filter/MrlFilterItem/MrlFilterItem.js.map +1 -1
- package/dist/cjs/components/form/checkbox/MrlCheckboxStandalone/MrlCheckboxStandalone.js.map +1 -1
- package/dist/cjs/components/form/label/MrlLabel/MrlLabel.js.map +1 -1
- package/dist/cjs/components/form/legacy-select/MrlLegacySelect/MrlLegacySelect.js.map +1 -1
- package/dist/cjs/components/form/text-input/MrlTextInput/MrlTextInput.js.map +1 -1
- package/dist/cjs/components/grid/MrlCol/MrlCol.js +49 -42
- 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 +8 -27
- package/dist/cjs/components/grid/constants.js.map +1 -1
- package/dist/cjs/components/link/MrlLink/MrlLink.js.map +1 -1
- package/dist/cjs/components/menu/MrlMenu/MrlMenu.js.map +1 -1
- package/dist/cjs/components/menu/MrlMenuGroup/MrlMenuGroup.js +4 -1
- package/dist/cjs/components/menu/MrlMenuGroup/MrlMenuGroup.js.map +1 -1
- package/dist/cjs/components/menu/MrlMenuItem/MrlMenuItem.js +2 -1
- package/dist/cjs/components/menu/MrlMenuItem/MrlMenuItem.js.map +1 -1
- package/dist/cjs/components/menu/MrlMenuItemLink/MrlMenuItemLink.js +8 -4
- package/dist/cjs/components/menu/MrlMenuItemLink/MrlMenuItemLink.js.map +1 -1
- package/dist/cjs/components/modal/MrlModalContent/MrlModalContent.js +1 -1
- package/dist/cjs/components/modal/MrlModalContent/MrlModalContent.js.map +1 -1
- package/dist/cjs/components/modal/MrlModalFooter/MrlModalFooter.js +2 -1
- package/dist/cjs/components/modal/MrlModalFooter/MrlModalFooter.js.map +1 -1
- package/dist/cjs/components/modal/MrlModalHeader/MrlModalHeader.js +1 -1
- package/dist/cjs/components/modal/MrlModalHeader/MrlModalHeader.js.map +1 -1
- package/dist/cjs/components/panel/MrlPanel/MrlPanel.js.map +1 -1
- package/dist/cjs/components/panel/MrlPanelFooter/MrlPanelFooter.js +2 -1
- package/dist/cjs/components/panel/MrlPanelFooter/MrlPanelFooter.js.map +1 -1
- package/dist/cjs/components/panel/MrlPanelStickyHeader/MrlPanelStickyHeader.js +2 -1
- package/dist/cjs/components/panel/MrlPanelStickyHeader/MrlPanelStickyHeader.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/components/button/MrlButton/MrlButton.d.ts +6 -0
- package/dist/components/filter/MrlFilterItem/MrlFilterItem.d.ts +6 -3
- package/dist/components/form/checkbox/MrlCheckboxStandalone/MrlCheckboxStandalone.d.ts +10 -2
- package/dist/components/form/label/MrlLabel/MrlLabel.d.ts +5 -1
- package/dist/components/form/legacy-select/MrlLegacySelect/MrlLegacySelect.d.ts +2 -0
- package/dist/components/form/text-input/MrlTextInput/MrlTextInput.d.ts +5 -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 +4 -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 +6 -20
- package/dist/components/link/MrlLink/MrlLink.d.ts +2 -0
- package/dist/components/menu/MrlMenu/MrlMenu.d.ts +10 -3
- package/dist/components/menu/MrlMenuGroup/MrlMenuGroup.d.ts +15 -1
- package/dist/components/menu/MrlMenuItem/MrlMenuItem.d.ts +14 -6
- package/dist/components/menu/MrlMenuItemLink/MrlMenuItemLink.d.ts +16 -7
- package/dist/components/modal/MrlModalContent/MrlModalContent.d.ts +5 -2
- package/dist/components/modal/MrlModalFooter/MrlModalFooter.d.ts +4 -2
- package/dist/components/modal/MrlModalHeader/MrlModalHeader.d.ts +4 -3
- package/dist/components/panel/MrlPanel/MrlPanel.d.ts +2 -1
- package/dist/components/panel/MrlPanelFooter/MrlPanelFooter.d.ts +6 -3
- package/dist/components/panel/MrlPanelStickyHeader/MrlPanelStickyHeader.d.ts +4 -2
- package/dist/esm/components/button/MrlButton/MrlButton.js +16 -8
- package/dist/esm/components/button/MrlButton/MrlButton.js.map +1 -1
- 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/filter/MrlFilterItem/MrlFilterItem.js +2 -1
- package/dist/esm/components/filter/MrlFilterItem/MrlFilterItem.js.map +1 -1
- package/dist/esm/components/form/checkbox/MrlCheckboxStandalone/MrlCheckboxStandalone.js.map +1 -1
- package/dist/esm/components/form/label/MrlLabel/MrlLabel.js.map +1 -1
- package/dist/esm/components/form/legacy-select/MrlLegacySelect/MrlLegacySelect.js.map +1 -1
- package/dist/esm/components/form/text-input/MrlTextInput/MrlTextInput.js.map +1 -1
- package/dist/esm/components/grid/MrlCol/MrlCol.js +50 -43
- 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 +8 -26
- package/dist/esm/components/grid/constants.js.map +1 -1
- package/dist/esm/components/link/MrlLink/MrlLink.js.map +1 -1
- package/dist/esm/components/menu/MrlMenu/MrlMenu.js.map +1 -1
- package/dist/esm/components/menu/MrlMenuGroup/MrlMenuGroup.js +4 -1
- package/dist/esm/components/menu/MrlMenuGroup/MrlMenuGroup.js.map +1 -1
- package/dist/esm/components/menu/MrlMenuItem/MrlMenuItem.js +2 -1
- package/dist/esm/components/menu/MrlMenuItem/MrlMenuItem.js.map +1 -1
- package/dist/esm/components/menu/MrlMenuItemLink/MrlMenuItemLink.js +8 -4
- package/dist/esm/components/menu/MrlMenuItemLink/MrlMenuItemLink.js.map +1 -1
- package/dist/esm/components/modal/MrlModalContent/MrlModalContent.js +1 -1
- package/dist/esm/components/modal/MrlModalContent/MrlModalContent.js.map +1 -1
- package/dist/esm/components/modal/MrlModalFooter/MrlModalFooter.js +2 -1
- package/dist/esm/components/modal/MrlModalFooter/MrlModalFooter.js.map +1 -1
- package/dist/esm/components/modal/MrlModalHeader/MrlModalHeader.js +1 -1
- package/dist/esm/components/modal/MrlModalHeader/MrlModalHeader.js.map +1 -1
- package/dist/esm/components/panel/MrlPanel/MrlPanel.js.map +1 -1
- package/dist/esm/components/panel/MrlPanelFooter/MrlPanelFooter.js +2 -1
- package/dist/esm/components/panel/MrlPanelFooter/MrlPanelFooter.js.map +1 -1
- package/dist/esm/components/panel/MrlPanelStickyHeader/MrlPanelStickyHeader.js +2 -1
- package/dist/esm/components/panel/MrlPanelStickyHeader/MrlPanelStickyHeader.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 -98
- package/dist/styles/grid/variables.scss +18 -2
- package/dist/styles.css +6 -1
- package/dist/types/components/button/MrlButton/MrlButton.d.ts +6 -0
- package/dist/types/components/filter/MrlFilterItem/MrlFilterItem.d.ts +6 -3
- package/dist/types/components/form/checkbox/MrlCheckboxStandalone/MrlCheckboxStandalone.d.ts +10 -2
- package/dist/types/components/form/label/MrlLabel/MrlLabel.d.ts +5 -1
- package/dist/types/components/form/legacy-select/MrlLegacySelect/MrlLegacySelect.d.ts +2 -0
- package/dist/types/components/form/text-input/MrlTextInput/MrlTextInput.d.ts +5 -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 +4 -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 +6 -20
- package/dist/types/components/link/MrlLink/MrlLink.d.ts +2 -0
- package/dist/types/components/menu/MrlMenu/MrlMenu.d.ts +10 -3
- package/dist/types/components/menu/MrlMenuGroup/MrlMenuGroup.d.ts +15 -1
- package/dist/types/components/menu/MrlMenuItem/MrlMenuItem.d.ts +14 -6
- package/dist/types/components/menu/MrlMenuItemLink/MrlMenuItemLink.d.ts +16 -7
- package/dist/types/components/modal/MrlModalContent/MrlModalContent.d.ts +5 -2
- package/dist/types/components/modal/MrlModalFooter/MrlModalFooter.d.ts +4 -2
- package/dist/types/components/modal/MrlModalHeader/MrlModalHeader.d.ts +4 -3
- package/dist/types/components/panel/MrlPanel/MrlPanel.d.ts +2 -1
- package/dist/types/components/panel/MrlPanelFooter/MrlPanelFooter.d.ts +6 -3
- package/dist/types/components/panel/MrlPanelStickyHeader/MrlPanelStickyHeader.d.ts +4 -2
- package/package.json +1 -1
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LayoutComponent } from '../../layout/constants';
|
|
2
2
|
import '../grid.variables.scss';
|
|
3
3
|
import '../grid.global.scss';
|
|
4
|
-
export type MrlGridProps = GridBaseProps;
|
|
5
4
|
/**
|
|
6
|
-
*
|
|
5
|
+
* MrlCol React component.
|
|
7
6
|
* @param props - component props
|
|
8
|
-
* @returns a
|
|
7
|
+
* @returns a MrlCol React component.
|
|
9
8
|
*/
|
|
10
|
-
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,18 +1,21 @@
|
|
|
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';
|
|
6
|
+
/**
|
|
7
|
+
* Available grid sizes
|
|
8
|
+
*/
|
|
9
|
+
export declare const GridSizes: string[];
|
|
7
10
|
/**
|
|
8
11
|
* Number of columns that will be span on the grid.
|
|
9
12
|
*/
|
|
10
13
|
export type NumCols = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
11
14
|
/**
|
|
12
|
-
* The
|
|
15
|
+
* The type of classes that can be configured based on the bootstrap API.
|
|
13
16
|
* Current supported:
|
|
14
17
|
* - columns "col-<size>-<number>"
|
|
15
|
-
* - offsets "offset-<size>-<number>"
|
|
18
|
+
* - offsets "offset-<size>-<number>""
|
|
16
19
|
*/
|
|
17
20
|
type GridClass = 'col' | 'offset';
|
|
18
21
|
/**
|
|
@@ -40,25 +43,8 @@ export interface GridColumns {
|
|
|
40
43
|
xl?: ColumnConfig;
|
|
41
44
|
xxl?: ColumnConfig;
|
|
42
45
|
}
|
|
43
|
-
/**
|
|
44
|
-
* Breakpoint keys in ascending order. Drives both class generation and the
|
|
45
|
-
* filtering that keeps grid props from reaching the DOM.
|
|
46
|
-
*/
|
|
47
|
-
export declare const GRID_SIZE_KEYS: readonly ["col", "xs", "sm", "md", "lg", "xl", "xxl"];
|
|
48
46
|
/**
|
|
49
47
|
* Available gutter sizes for customizing the grid
|
|
50
48
|
*/
|
|
51
49
|
export type GutterSizes = 0 | 1 | 2;
|
|
52
|
-
/**
|
|
53
|
-
* Gutter size to modifier class. `1` is the default gutter declared on `:root`,
|
|
54
|
-
* so it needs no class.
|
|
55
|
-
*/
|
|
56
|
-
export declare const GUTTER_CLASS: Record<GutterSizes, string | undefined>;
|
|
57
|
-
/**
|
|
58
|
-
* Shared props for the grid components. `role` is intentionally omitted: these
|
|
59
|
-
* are generic layout wrappers, and a `role="grid"` would promise interactive
|
|
60
|
-
* grid keyboard semantics that they do not implement. Page landmarks belong to
|
|
61
|
-
* the layout components (MrlMain, MrlPage).
|
|
62
|
-
*/
|
|
63
|
-
export type GridBaseProps = Omit<React.ComponentPropsWithoutRef<'div'>, 'role'> & DataQa;
|
|
64
50
|
export {};
|
|
@@ -35,6 +35,8 @@ export interface MrlLinkProptypes extends React.ComponentProps<'a'> {
|
|
|
35
35
|
/**
|
|
36
36
|
* Applies additional HTML attributes to the nested anchor (`a`) element.
|
|
37
37
|
* Example: `attrs='{ "aria-label": "Special message for screen reader users" }'`
|
|
38
|
+
*
|
|
39
|
+
* @deprecated - use the regular HTML attributes instead.
|
|
38
40
|
*/
|
|
39
41
|
attrs?: AttrsObject;
|
|
40
42
|
/**
|
|
@@ -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;
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export interface MrlMenuGroupPropTypes {
|
|
3
|
+
/**
|
|
4
|
+
* The `MrlMenuItem`s (or `MrlMenuItemLink`s) that belong to the group. They stay part of the
|
|
5
|
+
* parent menu's keyboard navigation and close the menu exactly as ungrouped items do.
|
|
6
|
+
*/
|
|
3
7
|
children: React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Renders a divider after the group's items. Set it to `false` on the last group so the menu
|
|
10
|
+
* does not end with a divider.
|
|
11
|
+
*
|
|
12
|
+
* @default true
|
|
13
|
+
*/
|
|
4
14
|
divider?: boolean;
|
|
15
|
+
/** Visible heading rendered above the group's items. Omit it to separate items with the divider only */
|
|
5
16
|
groupLabel?: string;
|
|
6
17
|
}
|
|
7
18
|
/**
|
|
8
|
-
* MrlMenuGroup
|
|
19
|
+
* MrlMenuGroup component
|
|
20
|
+
*
|
|
21
|
+
* Groups related menu items within an MrlMenu, with an optional label and a trailing divider.
|
|
22
|
+
* Must be a direct child of `MrlMenu`.
|
|
9
23
|
* @param props - component properties
|
|
10
24
|
* @returns JSX.Element
|
|
11
25
|
*/
|
|
@@ -7,18 +7,23 @@ export interface MrlMenuItemProps {
|
|
|
7
7
|
/** Indicates whether the menu item has a popup menu using aria-haspopup attribute */
|
|
8
8
|
ariaHasPopup?: AriaHasPopup;
|
|
9
9
|
/**
|
|
10
|
-
|
|
10
|
+
* Label of the item. Nesting an `MrlMenu` or `MrlPopover` here turns the item into a
|
|
11
|
+
* submenu trigger: it gets `aria-haspopup="menu"` and a trailing chevron, opens the submenu
|
|
12
|
+
* on hover, `ArrowRight`, `Enter` or `Space`, and does not close its own menu when activated.
|
|
11
13
|
*/
|
|
12
14
|
children: React.ReactNode | string;
|
|
13
15
|
/** Classname for the menu item */
|
|
14
16
|
className?: string;
|
|
15
|
-
/**
|
|
17
|
+
/** Disables the item: it stays focusable (`aria-disabled`) but ignores clicks and key presses */
|
|
16
18
|
disabled?: boolean;
|
|
17
19
|
/** Icon for menu item */
|
|
18
20
|
icon?: DSIconType;
|
|
19
21
|
/** Unique ID for the menu item */
|
|
20
22
|
id?: string;
|
|
21
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* Called on click, `Enter` or `Space`. The menu then closes, unless the item wraps a submenu
|
|
25
|
+
* or is a `menuitemcheckbox`/`menuitemradio` toggled with `Space`.
|
|
26
|
+
*/
|
|
22
27
|
onClick?: (e?: React.MouseEvent<HTMLButtonElement>) => void;
|
|
23
28
|
/** Callback to be called when the menu item is hovered */
|
|
24
29
|
onMouseOver?: (e?: React.MouseEvent) => void;
|
|
@@ -30,14 +35,16 @@ export interface MrlMenuItemProps {
|
|
|
30
35
|
* Role for the menu item
|
|
31
36
|
*
|
|
32
37
|
* When using `menuitemcheckbox` or `menuitemradio`, the menu item will be treated as a selectable item,
|
|
33
|
-
* aria-checked will be set to 'true' or 'false' based on the selected state.
|
|
38
|
+
* aria-checked will be set to 'true' or 'false' based on the selected state. `Space` toggles
|
|
39
|
+
* such an item and keeps the menu open; `Enter` or a click toggles it and closes the menu.
|
|
40
|
+
* The consumer owns `selected`.
|
|
34
41
|
*
|
|
35
42
|
* @default 'menuitem' - for regular menu items
|
|
36
43
|
* @example 'menuitemcheckbox' - for checkbox menu items
|
|
37
44
|
* @example 'menuitemradio' - for radio menu items
|
|
38
45
|
*/
|
|
39
46
|
role?: MenuItemRole;
|
|
40
|
-
/**
|
|
47
|
+
/** Marks the item as selected: shows a trailing check and, for checkbox/radio roles, sets `aria-checked` */
|
|
41
48
|
selected?: boolean;
|
|
42
49
|
/**
|
|
43
50
|
* Enables interaction tracking for this menu item. Provide a stable, non-PII id
|
|
@@ -48,7 +55,8 @@ export interface MrlMenuItemProps {
|
|
|
48
55
|
/**
|
|
49
56
|
* MrlMenuItem component
|
|
50
57
|
*
|
|
51
|
-
* Renders a menu
|
|
58
|
+
* Renders one actionable row of a menu: an `li` wrapping a `button` with the given `role`.
|
|
59
|
+
* Must be a child of `MrlMenu` or `MrlMenuGroup`.
|
|
52
60
|
* @param {MrlMenuItemProps} props - The props for the MrlMenuItem component
|
|
53
61
|
* @returns {Element} - rendered MrlMenuItem component
|
|
54
62
|
*/
|
|
@@ -9,13 +9,18 @@ export interface MrlMenuItemLinkProps {
|
|
|
9
9
|
children: React.ReactNode | string;
|
|
10
10
|
/** Class names for the menu item */
|
|
11
11
|
className?: string;
|
|
12
|
-
/**
|
|
12
|
+
/** Disables the link: it stays focusable (`aria-disabled`) but does not navigate */
|
|
13
13
|
disabled?: boolean;
|
|
14
14
|
/** Href for the menu item */
|
|
15
15
|
href: string;
|
|
16
16
|
/** Icon for menu item */
|
|
17
17
|
icon?: DSIconType;
|
|
18
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* Anchor target. `_blank` marks the link as external: `rel` becomes `noopener noreferrer`
|
|
20
|
+
* and a trailing external-link icon is shown.
|
|
21
|
+
*
|
|
22
|
+
* @default '_self'
|
|
23
|
+
*/
|
|
19
24
|
target?: string;
|
|
20
25
|
/** Unique ID for the menu item */
|
|
21
26
|
id?: string;
|
|
@@ -25,7 +30,7 @@ export interface MrlMenuItemLinkProps {
|
|
|
25
30
|
dataQa?: string;
|
|
26
31
|
/** If the menu item is selected */
|
|
27
32
|
selected?: boolean;
|
|
28
|
-
/** Rel
|
|
33
|
+
/** Rel attribute of the anchor; replaced by `noopener noreferrer` when `target` is `_blank` */
|
|
29
34
|
rel?: string;
|
|
30
35
|
/**
|
|
31
36
|
* Enables interaction tracking for this menu item. Provide a stable, non-PII id
|
|
@@ -34,10 +39,14 @@ export interface MrlMenuItemLinkProps {
|
|
|
34
39
|
eventId?: string;
|
|
35
40
|
}
|
|
36
41
|
/**
|
|
37
|
-
*
|
|
42
|
+
* MrlMenuItemLink component
|
|
38
43
|
*
|
|
39
|
-
* Renders a menu item to
|
|
40
|
-
*
|
|
41
|
-
*
|
|
44
|
+
* Renders a menu item that navigates to a URL (an anchor with `role="menuitem"`), to be used
|
|
45
|
+
* within the MrlMenu component. Links opened with `target="_blank"` get
|
|
46
|
+
* `rel="noopener noreferrer"` and a trailing external-link icon.
|
|
47
|
+
* Unlike `MrlMenuItem`, it does not close the menu on activation; close it from `onClick`
|
|
48
|
+
* when the navigation keeps the page alive (same-page `#hash` links, `target="_blank"`).
|
|
49
|
+
* @param {MrlMenuItemLinkProps} props - The props for the MrlMenuItemLink component
|
|
50
|
+
* @returns {Element} - rendered MrlMenuItemLink component
|
|
42
51
|
*/
|
|
43
52
|
export declare function MrlMenuItemLink({ ariaDescribedBy, children, className, dataQa, disabled, href, icon, id, onClick, selected, target, eventId, ...rest }: MrlMenuItemLinkProps): JSX.Element;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
interface MrlModalContentProps {
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Body of the modal, rendered between `MrlModalHeader` and `MrlModalFooter`. When it
|
|
5
|
+
* overflows, this is the modal's only scrolling area: it is exposed as a `region` labelled
|
|
6
|
+
* from the header text, and is focusable (`tabindex="0"`) only when it contains no focusable
|
|
7
|
+
* elements, so keyboard users can still scroll it.
|
|
5
8
|
*/
|
|
6
9
|
children: React.ReactElement | React.ReactElement[];
|
|
7
10
|
/**
|
|
@@ -10,7 +13,7 @@ interface MrlModalContentProps {
|
|
|
10
13
|
className?: string;
|
|
11
14
|
}
|
|
12
15
|
/**
|
|
13
|
-
* Modal Content component for the MrlModal
|
|
16
|
+
* Modal Content component for the MrlModal. Must be rendered inside `MrlModal`.
|
|
14
17
|
* @param {object} props - The props object
|
|
15
18
|
* @param {React.ReactElement} props.children - The children to be rendered within the component
|
|
16
19
|
* @returns {React.ReactElement}} The rendered MrlModalContent component
|
|
@@ -3,7 +3,8 @@ import { MrlComponentProps } from '../../../utils';
|
|
|
3
3
|
import './MrlModalFooter.global.scss';
|
|
4
4
|
interface MrlModalFooterProps extends MrlComponentProps {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Actions of the modal, laid out in a row and stacked at full width on the `xs` breakpoint.
|
|
7
|
+
* Order them from least to most prominent, ending with the primary action.
|
|
7
8
|
*/
|
|
8
9
|
children?: React.ReactElement | React.ReactElement[];
|
|
9
10
|
/**
|
|
@@ -12,7 +13,8 @@ interface MrlModalFooterProps extends MrlComponentProps {
|
|
|
12
13
|
className?: string;
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
15
|
-
* Modal Footer component for the MrlModal
|
|
16
|
+
* Modal Footer component for the MrlModal. Must be rendered inside `MrlModal`, after
|
|
17
|
+
* `MrlModalContent`.
|
|
16
18
|
* @param {AttrsObject} attrs - Additional HTML attributes for the `mrl-modal` element
|
|
17
19
|
* @returns {React.ReactElement} The rendered MrlModalFooter component
|
|
18
20
|
*/
|
|
@@ -2,7 +2,8 @@ import * as React from 'react';
|
|
|
2
2
|
import { MrlComponentProps } from '../../../utils';
|
|
3
3
|
export interface MrlModalHeaderProps extends MrlComponentProps {
|
|
4
4
|
/**
|
|
5
|
-
* Content
|
|
5
|
+
* Content rendered after the heading, inside the header row. The close button is not part of
|
|
6
|
+
* the header; `MrlModal` renders it.
|
|
6
7
|
*/
|
|
7
8
|
children?: React.ReactNode;
|
|
8
9
|
/**
|
|
@@ -10,12 +11,12 @@ export interface MrlModalHeaderProps extends MrlComponentProps {
|
|
|
10
11
|
*/
|
|
11
12
|
className?: string;
|
|
12
13
|
/**
|
|
13
|
-
* Text the
|
|
14
|
+
* Text of the modal header `h2` element. It also labels the modal's scrollable content region.
|
|
14
15
|
*/
|
|
15
16
|
text: string;
|
|
16
17
|
}
|
|
17
18
|
/**
|
|
18
|
-
* Modal Header component for the MrlModal.
|
|
19
|
+
* Modal Header component for the MrlModal. Must be rendered inside `MrlModal`.
|
|
19
20
|
* @param {MrlModalHeaderProps} props - The props for the MrlModalFooter component
|
|
20
21
|
* @param {AttrsObject} props.attrs - Additional HTML attributes for the `mrl-modal` element
|
|
21
22
|
* @returns {React.ReactElement} The rendered MrlModalFooter component
|
|
@@ -35,7 +35,8 @@ interface MrlPanelProps extends React.ComponentPropsWithRef<'div'> {
|
|
|
35
35
|
*/
|
|
36
36
|
disableAutofocus?: boolean;
|
|
37
37
|
/**
|
|
38
|
-
* Specifies whether the panel has a sticky header to adjust styles.
|
|
38
|
+
* Specifies whether the panel has a sticky header to adjust styles. Set it when the first child
|
|
39
|
+
* is an `MrlPanelStickyHeader`, so the scroll area leaves room for it.
|
|
39
40
|
*/
|
|
40
41
|
hasStickyHeader?: boolean;
|
|
41
42
|
/**
|
|
@@ -4,16 +4,19 @@ import * as React from 'react';
|
|
|
4
4
|
*/
|
|
5
5
|
interface MrlPanelFooterProps extends React.ComponentPropsWithRef<'footer'> {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Footer content, pinned to the bottom of the panel; render the footer as the last child of
|
|
8
|
+
* `MrlPanel`. A string is rendered as extra-small text; pass elements for richer content such
|
|
9
|
+
* as links.
|
|
8
10
|
*/
|
|
9
11
|
children?: React.ReactNode;
|
|
10
12
|
/**
|
|
11
|
-
*
|
|
13
|
+
* Renders a divider above the footer content.
|
|
12
14
|
*/
|
|
13
15
|
hasDivider?: boolean;
|
|
14
16
|
}
|
|
15
17
|
/**
|
|
16
|
-
* MrlPanelFooter component.
|
|
18
|
+
* MrlPanelFooter component. Pins a short note, such as an attribution, to the bottom of an
|
|
19
|
+
* `MrlPanel`; render it as the panel's last child.
|
|
17
20
|
*
|
|
18
21
|
* @param props The MrlPanelFooter component properties.
|
|
19
22
|
* @returns The MrlPanelFooter component.
|
|
@@ -4,12 +4,14 @@ import * as React from 'react';
|
|
|
4
4
|
*/
|
|
5
5
|
interface MrlPanelStickyHeaderProps extends React.ComponentPropsWithRef<'div'> {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Controls to keep pinned to the top of the panel while its content scrolls, such as a search
|
|
8
|
+
* input and tabs.
|
|
8
9
|
*/
|
|
9
10
|
children?: React.ReactNode;
|
|
10
11
|
}
|
|
11
12
|
/**
|
|
12
|
-
* MrlPanelStickyHeader component.
|
|
13
|
+
* MrlPanelStickyHeader component. Keeps controls pinned to the top of an `MrlPanel` while its
|
|
14
|
+
* content scrolls. Render it as the panel's first child and set `hasStickyHeader` on the panel.
|
|
13
15
|
*
|
|
14
16
|
* @param props The MrlPanelStickyHeader component properties.
|
|
15
17
|
* @returns The MrlPanel component.
|