@muraldevkit/ui-toolkit 4.79.1 → 4.81.0-dev-Rwvu.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.
Files changed (165) hide show
  1. package/dist/cjs/components/avatar/MrlAvatar/MrlAvatar.js.map +1 -1
  2. package/dist/cjs/components/badge/MrlBadge/MrlBadge.js.map +1 -1
  3. package/dist/cjs/components/badge/MrlBadgeNotification/MrlBadgeNotification.js.map +1 -1
  4. package/dist/cjs/components/button/MrlAnimatedIconButton/MrlAnimatedIconButton.js.map +1 -1
  5. package/dist/cjs/components/callout/MrlCallout/MrlCallout.js.map +1 -1
  6. package/dist/cjs/components/empty/default/MrlEmpty.js.map +1 -1
  7. package/dist/cjs/components/empty/large/MrlEmptyLarge.js.map +1 -1
  8. package/dist/cjs/components/form/date-picker/MrlDatePicker.js.map +1 -1
  9. package/dist/cjs/components/form/select/MrlCreatableSelect/MrlCreatableSelect.js.map +1 -1
  10. package/dist/cjs/components/form/select/MrlMultiCreatableSelect/MrlMultiCreatableSelect.js.map +1 -1
  11. package/dist/cjs/components/form/select/MrlMultiSelect/MrlMultiSelect.js.map +1 -1
  12. package/dist/cjs/components/form/select/MrlSelect/MrlSelect.js.map +1 -1
  13. package/dist/cjs/components/form/switch/MrlSwitch/MrlSwitch.js.map +1 -1
  14. package/dist/cjs/components/form/text-input/MrlEditableTextInput/MrlEditableTextInput.js.map +1 -1
  15. package/dist/cjs/components/form/textarea/MrlEditableTextarea/MrlEditableTextarea.js.map +1 -1
  16. package/dist/cjs/components/grid/MrlCol/MrlCol.js +58 -55
  17. package/dist/cjs/components/grid/MrlCol/MrlCol.js.map +1 -1
  18. package/dist/cjs/components/grid/MrlGrid/MrlGrid.js +3 -5
  19. package/dist/cjs/components/grid/MrlGrid/MrlGrid.js.map +1 -1
  20. package/dist/cjs/components/grid/MrlRow/MrlRow.js +10 -8
  21. package/dist/cjs/components/grid/MrlRow/MrlRow.js.map +1 -1
  22. package/dist/cjs/components/grid/constants.js +47 -9
  23. package/dist/cjs/components/grid/constants.js.map +1 -1
  24. package/dist/cjs/components/layout/MrlSidebar/MrlSidebar.js.map +1 -1
  25. package/dist/cjs/components/live-region/MrlLiveRegion/MrlLiveRegion.js.map +1 -1
  26. package/dist/cjs/components/notification/MrlToast/MrlToast.js.map +1 -1
  27. package/dist/cjs/components/pagination/MrlPaginationButton/MrlPaginationButton.js.map +1 -1
  28. package/dist/cjs/components/portal/MrlPortal.js.map +1 -1
  29. package/dist/cjs/components/rovingTabindex/MrlRovingTabindex/MrlRovingTabindex.js.map +1 -1
  30. package/dist/cjs/components/svg/MrlSvg/MrlSvg.js.map +1 -1
  31. package/dist/cjs/components/table/MrlTableCell/MrlTableCell.js.map +1 -1
  32. package/dist/cjs/components/table/MrlTableColumn/MrlTableColumn.js.map +1 -1
  33. package/dist/cjs/components/tabs/MrlTab/MrlTab.js.map +1 -1
  34. package/dist/cjs/components/tabs/MrlTabGroup/MrlTabGroup.js.map +1 -1
  35. package/dist/cjs/components/tabs/MrlTabLink/MrlTabLink.js.map +1 -1
  36. package/dist/cjs/components/tabs/MrlTabs/MrlTabs.js.map +1 -1
  37. package/dist/cjs/components/text/MrlTextHeading/MrlTextHeading.js.map +1 -1
  38. package/dist/cjs/components/toolbar/MrlToolbar/MrlToolbar.js.map +1 -1
  39. package/dist/cjs/components/toolbar/MrlToolbarButton/MrlToolbarButton.js.map +1 -1
  40. package/dist/cjs/version.js +1 -1
  41. package/dist/cjs/version.js.map +1 -1
  42. package/dist/components/avatar/MrlAvatar/MrlAvatar.d.ts +8 -0
  43. package/dist/components/badge/MrlBadge/MrlBadge.d.ts +2 -0
  44. package/dist/components/badge/MrlBadgeNotification/MrlBadgeNotification.d.ts +1 -0
  45. package/dist/components/button/MrlAnimatedIconButton/MrlAnimatedIconButton.d.ts +1 -0
  46. package/dist/components/callout/MrlCallout/MrlCallout.d.ts +9 -0
  47. package/dist/components/empty/default/MrlEmpty.d.ts +4 -0
  48. package/dist/components/empty/large/MrlEmptyLarge.d.ts +4 -0
  49. package/dist/components/form/date-picker/MrlDatePicker.d.ts +2 -0
  50. package/dist/components/form/select/MrlCreatableSelect/MrlCreatableSelect.d.ts +4 -0
  51. package/dist/components/form/select/MrlMultiCreatableSelect/MrlMultiCreatableSelect.d.ts +4 -0
  52. package/dist/components/form/select/MrlMultiSelect/MrlMultiSelect.d.ts +3 -0
  53. package/dist/components/form/select/MrlSelect/MrlSelect.d.ts +3 -0
  54. package/dist/components/form/switch/MrlSwitch/MrlSwitch.d.ts +3 -0
  55. package/dist/components/form/text-input/MrlEditableTextInput/MrlEditableTextInput.d.ts +3 -0
  56. package/dist/components/form/textarea/MrlEditableTextarea/MrlEditableTextarea.d.ts +3 -0
  57. package/dist/components/grid/MrlCol/MrlCol.d.ts +4 -6
  58. package/dist/components/grid/MrlCol/index.d.ts +1 -1
  59. package/dist/components/grid/MrlGrid/MrlGrid.d.ts +4 -4
  60. package/dist/components/grid/MrlGrid/index.d.ts +1 -1
  61. package/dist/components/grid/MrlRow/MrlRow.d.ts +7 -7
  62. package/dist/components/grid/MrlRow/index.d.ts +1 -1
  63. package/dist/components/grid/constants.d.ts +76 -12
  64. package/dist/components/grid/index.d.ts +1 -0
  65. package/dist/components/layout/MrlSidebar/MrlSidebar.d.ts +2 -0
  66. package/dist/components/live-region/MrlLiveRegion/MrlLiveRegion.d.ts +6 -0
  67. package/dist/components/notification/MrlToast/MrlToast.d.ts +8 -0
  68. package/dist/components/pagination/MrlPaginationButton/MrlPaginationButton.d.ts +1 -0
  69. package/dist/components/portal/MrlPortal.d.ts +1 -0
  70. package/dist/components/rovingTabindex/MrlRovingTabindex/MrlRovingTabindex.d.ts +10 -0
  71. package/dist/components/svg/MrlSvg/MrlSvg.d.ts +1 -0
  72. package/dist/components/table/MrlTableCell/MrlTableCell.d.ts +3 -0
  73. package/dist/components/table/MrlTableColumn/MrlTableColumn.d.ts +3 -0
  74. package/dist/components/tabs/MrlTab/MrlTab.d.ts +2 -0
  75. package/dist/components/tabs/MrlTabGroup/MrlTabGroup.d.ts +1 -0
  76. package/dist/components/tabs/MrlTabLink/MrlTabLink.d.ts +1 -0
  77. package/dist/components/tabs/MrlTabs/MrlTabs.d.ts +2 -0
  78. package/dist/components/text/MrlTextHeading/MrlTextHeading.d.ts +1 -0
  79. package/dist/components/toolbar/MrlToolbar/MrlToolbar.d.ts +12 -0
  80. package/dist/components/toolbar/MrlToolbarButton/MrlToolbarButton.d.ts +2 -0
  81. package/dist/esm/components/avatar/MrlAvatar/MrlAvatar.js.map +1 -1
  82. package/dist/esm/components/badge/MrlBadge/MrlBadge.js.map +1 -1
  83. package/dist/esm/components/badge/MrlBadgeNotification/MrlBadgeNotification.js.map +1 -1
  84. package/dist/esm/components/button/MrlAnimatedIconButton/MrlAnimatedIconButton.js.map +1 -1
  85. package/dist/esm/components/callout/MrlCallout/MrlCallout.js.map +1 -1
  86. package/dist/esm/components/empty/default/MrlEmpty.js.map +1 -1
  87. package/dist/esm/components/empty/large/MrlEmptyLarge.js.map +1 -1
  88. package/dist/esm/components/form/date-picker/MrlDatePicker.js.map +1 -1
  89. package/dist/esm/components/form/select/MrlCreatableSelect/MrlCreatableSelect.js.map +1 -1
  90. package/dist/esm/components/form/select/MrlMultiCreatableSelect/MrlMultiCreatableSelect.js.map +1 -1
  91. package/dist/esm/components/form/select/MrlMultiSelect/MrlMultiSelect.js.map +1 -1
  92. package/dist/esm/components/form/select/MrlSelect/MrlSelect.js.map +1 -1
  93. package/dist/esm/components/form/switch/MrlSwitch/MrlSwitch.js.map +1 -1
  94. package/dist/esm/components/form/text-input/MrlEditableTextInput/MrlEditableTextInput.js.map +1 -1
  95. package/dist/esm/components/form/textarea/MrlEditableTextarea/MrlEditableTextarea.js.map +1 -1
  96. package/dist/esm/components/grid/MrlCol/MrlCol.js +59 -56
  97. package/dist/esm/components/grid/MrlCol/MrlCol.js.map +1 -1
  98. package/dist/esm/components/grid/MrlGrid/MrlGrid.js +3 -5
  99. package/dist/esm/components/grid/MrlGrid/MrlGrid.js.map +1 -1
  100. package/dist/esm/components/grid/MrlRow/MrlRow.js +10 -8
  101. package/dist/esm/components/grid/MrlRow/MrlRow.js.map +1 -1
  102. package/dist/esm/components/grid/constants.js +46 -9
  103. package/dist/esm/components/grid/constants.js.map +1 -1
  104. package/dist/esm/components/layout/MrlSidebar/MrlSidebar.js.map +1 -1
  105. package/dist/esm/components/live-region/MrlLiveRegion/MrlLiveRegion.js.map +1 -1
  106. package/dist/esm/components/notification/MrlToast/MrlToast.js.map +1 -1
  107. package/dist/esm/components/pagination/MrlPaginationButton/MrlPaginationButton.js.map +1 -1
  108. package/dist/esm/components/portal/MrlPortal.js.map +1 -1
  109. package/dist/esm/components/rovingTabindex/MrlRovingTabindex/MrlRovingTabindex.js.map +1 -1
  110. package/dist/esm/components/svg/MrlSvg/MrlSvg.js.map +1 -1
  111. package/dist/esm/components/table/MrlTableCell/MrlTableCell.js.map +1 -1
  112. package/dist/esm/components/table/MrlTableColumn/MrlTableColumn.js.map +1 -1
  113. package/dist/esm/components/tabs/MrlTab/MrlTab.js.map +1 -1
  114. package/dist/esm/components/tabs/MrlTabGroup/MrlTabGroup.js.map +1 -1
  115. package/dist/esm/components/tabs/MrlTabLink/MrlTabLink.js.map +1 -1
  116. package/dist/esm/components/tabs/MrlTabs/MrlTabs.js.map +1 -1
  117. package/dist/esm/components/text/MrlTextHeading/MrlTextHeading.js.map +1 -1
  118. package/dist/esm/components/toolbar/MrlToolbar/MrlToolbar.js.map +1 -1
  119. package/dist/esm/components/toolbar/MrlToolbarButton/MrlToolbarButton.js.map +1 -1
  120. package/dist/esm/version.js +1 -1
  121. package/dist/esm/version.js.map +1 -1
  122. package/dist/styles/MrlSidebar/module.scss +2 -2
  123. package/dist/styles/grid/global.scss +97 -2
  124. package/dist/styles.css +1 -7
  125. package/dist/types/components/avatar/MrlAvatar/MrlAvatar.d.ts +8 -0
  126. package/dist/types/components/badge/MrlBadge/MrlBadge.d.ts +2 -0
  127. package/dist/types/components/badge/MrlBadgeNotification/MrlBadgeNotification.d.ts +1 -0
  128. package/dist/types/components/button/MrlAnimatedIconButton/MrlAnimatedIconButton.d.ts +1 -0
  129. package/dist/types/components/callout/MrlCallout/MrlCallout.d.ts +9 -0
  130. package/dist/types/components/empty/default/MrlEmpty.d.ts +4 -0
  131. package/dist/types/components/empty/large/MrlEmptyLarge.d.ts +4 -0
  132. package/dist/types/components/form/date-picker/MrlDatePicker.d.ts +2 -0
  133. package/dist/types/components/form/select/MrlCreatableSelect/MrlCreatableSelect.d.ts +4 -0
  134. package/dist/types/components/form/select/MrlMultiCreatableSelect/MrlMultiCreatableSelect.d.ts +4 -0
  135. package/dist/types/components/form/select/MrlMultiSelect/MrlMultiSelect.d.ts +3 -0
  136. package/dist/types/components/form/select/MrlSelect/MrlSelect.d.ts +3 -0
  137. package/dist/types/components/form/switch/MrlSwitch/MrlSwitch.d.ts +3 -0
  138. package/dist/types/components/form/text-input/MrlEditableTextInput/MrlEditableTextInput.d.ts +3 -0
  139. package/dist/types/components/form/textarea/MrlEditableTextarea/MrlEditableTextarea.d.ts +3 -0
  140. package/dist/types/components/grid/MrlCol/MrlCol.d.ts +4 -6
  141. package/dist/types/components/grid/MrlCol/index.d.ts +1 -1
  142. package/dist/types/components/grid/MrlGrid/MrlGrid.d.ts +4 -4
  143. package/dist/types/components/grid/MrlGrid/index.d.ts +1 -1
  144. package/dist/types/components/grid/MrlRow/MrlRow.d.ts +7 -7
  145. package/dist/types/components/grid/MrlRow/index.d.ts +1 -1
  146. package/dist/types/components/grid/constants.d.ts +76 -12
  147. package/dist/types/components/grid/index.d.ts +1 -0
  148. package/dist/types/components/layout/MrlSidebar/MrlSidebar.d.ts +2 -0
  149. package/dist/types/components/live-region/MrlLiveRegion/MrlLiveRegion.d.ts +6 -0
  150. package/dist/types/components/notification/MrlToast/MrlToast.d.ts +8 -0
  151. package/dist/types/components/pagination/MrlPaginationButton/MrlPaginationButton.d.ts +1 -0
  152. package/dist/types/components/portal/MrlPortal.d.ts +1 -0
  153. package/dist/types/components/rovingTabindex/MrlRovingTabindex/MrlRovingTabindex.d.ts +10 -0
  154. package/dist/types/components/svg/MrlSvg/MrlSvg.d.ts +1 -0
  155. package/dist/types/components/table/MrlTableCell/MrlTableCell.d.ts +3 -0
  156. package/dist/types/components/table/MrlTableColumn/MrlTableColumn.d.ts +3 -0
  157. package/dist/types/components/tabs/MrlTab/MrlTab.d.ts +2 -0
  158. package/dist/types/components/tabs/MrlTabGroup/MrlTabGroup.d.ts +1 -0
  159. package/dist/types/components/tabs/MrlTabLink/MrlTabLink.d.ts +1 -0
  160. package/dist/types/components/tabs/MrlTabs/MrlTabs.d.ts +2 -0
  161. package/dist/types/components/text/MrlTextHeading/MrlTextHeading.d.ts +1 -0
  162. package/dist/types/components/toolbar/MrlToolbar/MrlToolbar.d.ts +12 -0
  163. package/dist/types/components/toolbar/MrlToolbarButton/MrlToolbarButton.d.ts +2 -0
  164. package/package.json +1 -1
  165. package/dist/styles/grid/variables.scss +0 -26
@@ -9,17 +9,26 @@ interface MrlCalloutCTA {
9
9
  export interface MrlCalloutProps extends MrlCalloutPopoverProps {
10
10
  /** a unique id that binds the callout content and the trigger for assistive technologies */
11
11
  ariaControls?: string;
12
+ /** Has no effect (passed to the popover container, which ignores it). Focus on open is handled by the popover; see `disableFocusTrap`. Kept for backwards compatibility. */
12
13
  autoFocus?: boolean;
13
14
  children: React.ReactElement;
14
15
  disableClickOutside?: boolean;
16
+ /** Body text of the callout. A string renders as MrlText; pass an element for rich content. */
15
17
  description?: string | JSX.Element;
18
+ /** Short label rendered above the title. */
16
19
  eyebrow?: string;
17
20
  id?: string;
21
+ /** Illustration rendered between the description and the actions. */
18
22
  image?: JSX.Element;
23
+ /** Has no effect. Kept for backwards compatibility. The callout renders in the callout portal layer unless `portalProps` is overridden. */
19
24
  renderWithPortal?: boolean;
25
+ /** Whether the callout is open. The consumer controls visibility; the trigger child gets `aria-expanded` from it. */
20
26
  show: boolean;
27
+ /** Heading of the callout, rendered as a level 2 heading. */
21
28
  title?: string;
29
+ /** Primary action button rendered at the bottom of the callout. */
22
30
  primaryCta?: MrlCalloutCTA;
31
+ /** Secondary action button rendered before the primary one. */
23
32
  secondaryCta?: MrlCalloutCTA;
24
33
  /**
25
34
  * Enables interaction tracking for this callout. Provide a stable, non-PII id
@@ -1,7 +1,11 @@
1
1
  interface MrlEmptyProps {
2
+ /** Icon or illustration shown above the heading. */
2
3
  graphic?: JSX.Element;
4
+ /** Heading of the empty state. */
3
5
  heading: string;
6
+ /** Text shown under the heading. */
4
7
  description: string;
8
+ /** Call to action, usually a button, shown below the description. */
5
9
  action?: JSX.Element;
6
10
  }
7
11
  /**
@@ -1,7 +1,11 @@
1
1
  interface MrlEmptyLargeProps {
2
+ /** Icon or illustration shown above the heading. */
2
3
  graphic?: JSX.Element;
4
+ /** Heading of the empty state. */
3
5
  heading: string;
6
+ /** Text shown under the heading. */
4
7
  description: string;
8
+ /** Call to action, usually a button, shown below the description. */
5
9
  action?: JSX.Element;
6
10
  }
7
11
  /**
@@ -4,6 +4,7 @@ import { DataQa } from '../../../utils/dataQa';
4
4
  export interface MrlDatePickerProps extends React.ComponentPropsWithRef<'input'>, DataQa {
5
5
  /** Id of the text input */
6
6
  inputId: string;
7
+ /** Visual variant. 'borderless' hides the border and uses a subtle filled background. */
7
8
  kind?: 'default' | 'borderless';
8
9
  /** The value of the text input used to make it a controlled input */
9
10
  value?: string;
@@ -11,6 +12,7 @@ export interface MrlDatePickerProps extends React.ComponentPropsWithRef<'input'>
11
12
  * Changes the state of the input based on user permissions or actions.
12
13
  */
13
14
  state?: InputStates;
15
+ /** Focuses the input when it mounts. */
14
16
  autofocus?: boolean;
15
17
  /**
16
18
  * Event handler for onChange Events
@@ -2,8 +2,11 @@ import { CreatableProps } from 'react-select/creatable';
2
2
  import { GroupBase } from 'react-select';
3
3
  import { SelectKind } from '../types';
4
4
  export interface MrlCreatableSelectProps<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> extends CreatableProps<Option, IsMulti, Group> {
5
+ /** Applies the error styling and sets `aria-invalid`. Render the error message outside the select. */
5
6
  hasError?: boolean;
7
+ /** Makes the select read-only: the menu never opens and values cannot be removed. */
6
8
  isReadOnly?: boolean;
9
+ /** Visual variant. The inline kinds have no border unless `hasError` is set. */
7
10
  kind?: SelectKind;
8
11
  /**
9
12
  * The data-qa prefix, it will be used to add data-qa attributes to different sub components of the MrlCreatableSelect component.
@@ -13,6 +16,7 @@ export interface MrlCreatableSelectProps<Option, IsMulti extends boolean = false
13
16
  * - value-container, <data-qa-prefix>-value-container
14
17
  */
15
18
  ['data-qa']?: string;
19
+ /** Shows the clear indicator of a clearable select. Hidden by default. */
16
20
  showClearIndicatorIcon?: boolean;
17
21
  /**
18
22
  * Enables interaction tracking for this select. Provide a stable, non-PII id
@@ -2,8 +2,11 @@ import { CreatableProps } from 'react-select/creatable';
2
2
  import { GroupBase } from 'react-select';
3
3
  import { DefaultOption, SelectKind } from '../types';
4
4
  export interface MrlMultiCreatableSelectProps<Option, IsMulti extends boolean = true, Group extends GroupBase<Option> = GroupBase<Option>> extends CreatableProps<Option, IsMulti, Group> {
5
+ /** Applies the error styling and sets `aria-invalid`. Render the error message outside the select. */
5
6
  hasError?: boolean;
7
+ /** Keeps the menu closed and turns off Backspace removal. Values can still be removed with their remove buttons. */
6
8
  isReadOnly?: boolean;
9
+ /** Visual variant. The inline kinds have no border unless `hasError` is set. */
7
10
  kind?: SelectKind;
8
11
  /**
9
12
  * The data-qa prefix, it will be used to add data-qa attributes to different sub components of the MrlMultiCreatableSelect component.
@@ -13,6 +16,7 @@ export interface MrlMultiCreatableSelectProps<Option, IsMulti extends boolean =
13
16
  * - value-container, <data-qa-prefix>-value-container
14
17
  */
15
18
  ['data-qa']?: string;
19
+ /** Shows the clear indicator of a clearable select. Hidden by default. */
16
20
  showClearIndicatorIcon?: boolean;
17
21
  /**
18
22
  * Enables interaction tracking for this select. Provide a stable, non-PII id
@@ -1,8 +1,11 @@
1
1
  import { GroupBase, Props } from 'react-select';
2
2
  import { DefaultOption, SelectKind } from '../types';
3
3
  export interface MrlMultiSelectProps<T, IsMulti extends boolean = false, Group extends GroupBase<T> = GroupBase<T>> extends Omit<Props<T, IsMulti, Group>, 'isMulti' | 'hideSelectedOptions'> {
4
+ /** Applies the error styling and sets `aria-invalid`. Render the error message outside the select. */
4
5
  hasError?: boolean;
6
+ /** Keeps the menu closed and renders values as text without remove buttons. */
5
7
  isReadOnly?: boolean;
8
+ /** Visual variant. The inline kinds have no border unless `hasError` is set. */
6
9
  kind?: SelectKind;
7
10
  /**
8
11
  * The data-qa prefix, it will be used to add data-qa attributes to different sub components of the MrlMultiSelect component.
@@ -1,8 +1,11 @@
1
1
  import { GroupBase, Props } from 'react-select';
2
2
  import { SelectKind } from '../types';
3
3
  export interface MrlSelectProps<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> extends Props<Option, IsMulti, Group> {
4
+ /** Applies the error styling and sets `aria-invalid`. Render the error message outside the select. */
4
5
  hasError?: boolean;
6
+ /** Makes the select read-only: the menu never opens and values cannot be removed. */
5
7
  isReadOnly?: boolean;
8
+ /** Visual variant. The inline kinds have no border unless `hasError` is set. */
6
9
  kind?: SelectKind;
7
10
  /**
8
11
  * The data-qa prefix, it will be used to add data-qa attributes to different sub components of the MrlSelect component.
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  interface MrlSwitchProps extends React.ComponentPropsWithoutRef<'input'> {
3
3
  className?: string;
4
+ /** Disables the switch. */
4
5
  disabled?: boolean;
5
6
  id?: string;
6
7
  /**
@@ -13,7 +14,9 @@ interface MrlSwitchProps extends React.ComponentPropsWithoutRef<'input'> {
13
14
  * If you need custom styles, you can use `className` or use a span that you style as `label`
14
15
  */
15
16
  label: string | React.ReactNode;
17
+ /** Called with the change event when the switch is toggled. */
16
18
  onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
19
+ /** Whether the switch is on. Syncs when this value changes; the switch also toggles itself on click. */
17
20
  selected?: boolean;
18
21
  }
19
22
  export declare const MrlSwitch: React.MemoExoticComponent<({ className, disabled, id, label, onChange, selected, eventId, ...rest }: MrlSwitchProps) => React.JSX.Element>;
@@ -22,9 +22,12 @@ interface MrlEditableTextInputProps extends React.InputHTMLAttributes<HTMLInputE
22
22
  * Changes the state of the input based on user permissions or actions.
23
23
  */
24
24
  state?: InputStates;
25
+ /** Error shown under the field when `state` is 'error'. */
25
26
  error?: MrlFormInputError;
26
27
  'data-qa': string;
28
+ /** Whether the field is in edit mode. Omit to let the component manage it; pair with `setIsEditable` to control it. */
27
29
  isEditable?: boolean;
30
+ /** Called when the field wants to enter or leave edit mode. Required when `isEditable` is controlled. */
28
31
  setIsEditable?: (isEditableUpdate: boolean) => void;
29
32
  /**
30
33
  * Show icon on hover, if true the icon will be hidden and show on hover and focus
@@ -29,8 +29,11 @@ interface MrlEditableTextareaProps extends React.TextareaHTMLAttributes<HTMLText
29
29
  /** Additional class to add to the textarea */
30
30
  className?: string;
31
31
  'data-qa': string;
32
+ /** Error shown under the field when `state` is 'error'. */
32
33
  error?: MrlFormInputError;
34
+ /** Whether the field is in edit mode. Omit to let the component manage it; pair with `setIsEditable` to control it. */
33
35
  isEditable?: boolean;
36
+ /** Called when the field wants to enter or leave edit mode. Required when `isEditable` is controlled. */
34
37
  setIsEditable?: (isEditableUpdate: boolean) => void;
35
38
  /** Autoexpand will automatically adjust the height of the textarea based on the amount of text within it */
36
39
  autoExpand?: boolean;
@@ -1,10 +1,8 @@
1
- import { LayoutComponent } from '../../layout/constants';
2
- import { GridColumns } from '../constants';
3
- type MrlCol = LayoutComponent & GridColumns;
1
+ import { GridBaseProps, GridColumns } from '../constants';
2
+ export type MrlColProps = GridColumns & GridBaseProps;
4
3
  /**
5
- * MrlCol React component.
4
+ * MrlCol React component. Creates a grid column.
6
5
  * @param props - component props
7
6
  * @returns a MrlCol React component.
8
7
  */
9
- export declare function MrlCol(props: MrlCol): JSX.Element;
10
- export {};
8
+ export declare function MrlCol({ children, className, col, lg, md, sm, xl, xs, xxl, ...rest }: MrlColProps): JSX.Element;
@@ -1 +1 @@
1
- export { MrlCol } from './MrlCol';
1
+ export * from './MrlCol';
@@ -1,9 +1,9 @@
1
- import { LayoutComponent } from '../../layout/constants';
2
- import '../grid.variables.scss';
1
+ import { GridBaseProps } from '../constants';
3
2
  import '../grid.global.scss';
3
+ export type MrlGridProps = GridBaseProps;
4
4
  /**
5
- * MrlGrid React component.
5
+ * MrlGrid React component. Primary container of a grid.
6
6
  * @param props - component props
7
7
  * @returns a MrlGrid React component.
8
8
  */
9
- export declare function MrlGrid({ children, className, ...rest }: LayoutComponent): JSX.Element;
9
+ export declare function MrlGrid({ children, className, ...rest }: MrlGridProps): JSX.Element;
@@ -1 +1 @@
1
- export { MrlGrid } from './MrlGrid';
1
+ export * from './MrlGrid';
@@ -1,12 +1,13 @@
1
- import { LayoutComponent } from '../../layout/constants';
2
- import { AlignOptions, GutterSizes, JustifyOptions } from '../constants';
3
- interface MrlRow extends LayoutComponent {
1
+ import { AlignOptions, GridBaseProps, GutterSizes, JustifyOptions } from '../constants';
2
+ export interface MrlRowProps extends GridBaseProps {
4
3
  /**
5
4
  * Flex alignment of the children within the component.
6
5
  */
7
6
  align?: AlignOptions;
8
7
  /**
9
- * Gutter size for columns within the row
8
+ * Gutter size for columns within the row.
9
+ *
10
+ * @default 1
10
11
  */
11
12
  gutter?: GutterSizes;
12
13
  /**
@@ -15,9 +16,8 @@ interface MrlRow extends LayoutComponent {
15
16
  justify?: JustifyOptions;
16
17
  }
17
18
  /**
18
- * MrlRow React component.
19
+ * MrlRow React component. Creates a grid row.
19
20
  * @param props - component props
20
21
  * @returns a MrlRow React component.
21
22
  */
22
- export declare function MrlRow({ align, children, className, justify, ...rest }: MrlRow): JSX.Element;
23
- export {};
23
+ export declare function MrlRow({ align, children, className, gutter, justify, ...rest }: MrlRowProps): JSX.Element;
@@ -1 +1 @@
1
- export { MrlRow } from './MrlRow';
1
+ export * from './MrlRow';
@@ -1,25 +1,26 @@
1
+ import { DataQa } from '../../utils/dataQa';
1
2
  /**
2
3
  * Alignment & justification options for grid containers
3
4
  */
4
5
  export type AlignOptions = 'start' | 'center' | 'end';
5
6
  export type JustifyOptions = 'start' | 'center' | 'end' | 'between' | 'around';
6
7
  /**
7
- * Available grid sizes
8
+ * Number of columns a `col` can span. There is no `col-0` class — a column
9
+ * always occupies at least one of the twelve tracks.
8
10
  */
9
- export declare const GridSizes: string[];
11
+ export type ColSpan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
10
12
  /**
11
- * Number of columns that will be span on the grid.
13
+ * Number of columns an `offset` can skip. `0` is meaningful here: it is how a
14
+ * larger breakpoint cancels an offset inherited from a smaller one.
12
15
  */
13
- export type NumCols = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
16
+ export type OffsetSpan = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
14
17
  /**
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>""
18
+ * @deprecated Use `ColSpan` for spans or `OffsetSpan` for offsets. This union
19
+ * allowed `col={0}`, which never produced a class.
19
20
  */
20
- type GridClass = 'col' | 'offset';
21
+ export type NumCols = 0 | ColSpan;
21
22
  /**
22
- * Interface of available class selectors based on GridClass
23
+ * Interface of available class selectors per breakpoint.
23
24
  *
24
25
  * Example interface:
25
26
  * {
@@ -28,23 +29,86 @@ type GridClass = 'col' | 'offset';
28
29
  * }
29
30
  */
30
31
  type GridClassConfig = {
31
- [key in GridClass]?: NumCols;
32
+ col?: ColSpan;
33
+ offset?: OffsetSpan;
32
34
  };
33
35
  /**
34
36
  * Options to configure the number of columns to span on different screen sizes.
35
37
  */
36
- type ColumnConfig = NumCols | 'auto' | GridClassConfig | undefined;
38
+ type ColumnConfig = ColSpan | 'auto' | GridClassConfig | undefined;
37
39
  export interface GridColumns {
40
+ /**
41
+ * Columns that are the same from the smallest of devices to the largest.
42
+ */
38
43
  col?: ColumnConfig;
44
+ /**
45
+ * @deprecated Alias of `col`, kept for backwards compatibility. It resolves
46
+ * to the same un-prefixed tier, so passing both `col` and `xs` emits two
47
+ * competing classes and the larger span wins on CSS source order rather
48
+ * than the one you wrote last. Pass only one.
49
+ */
39
50
  xs?: ColumnConfig;
51
+ /**
52
+ * The number of columns to span on small devices.
53
+ */
40
54
  sm?: ColumnConfig;
55
+ /**
56
+ * The number of columns to span on medium devices.
57
+ */
41
58
  md?: ColumnConfig;
59
+ /**
60
+ * The number of columns to span on large devices.
61
+ */
42
62
  lg?: ColumnConfig;
63
+ /**
64
+ * The number of columns to span on extra large devices.
65
+ */
43
66
  xl?: ColumnConfig;
67
+ /**
68
+ * The number of columns to span on extra extra large devices.
69
+ */
44
70
  xxl?: ColumnConfig;
45
71
  }
72
+ /**
73
+ * Breakpoint keys in ascending order. Drives both class generation and the
74
+ * filtering that keeps grid props from reaching the DOM.
75
+ */
76
+ export declare const GRID_SIZE_KEYS: readonly ["col", "xs", "sm", "md", "lg", "xl", "xxl"];
46
77
  /**
47
78
  * Available gutter sizes for customizing the grid
48
79
  */
49
80
  export type GutterSizes = 0 | 1 | 2;
81
+ /**
82
+ * Gutter size to modifier class. `1` is the default declared on `.row`, so it
83
+ * needs no class.
84
+ */
85
+ export declare const GUTTER_CLASS: Record<GutterSizes, string | undefined>;
86
+ /**
87
+ * Roles a generic layout wrapper may safely carry.
88
+ *
89
+ * Composite widget roles (`grid`, `row`, `gridcell`, `listbox`, `tablist`, …)
90
+ * are deliberately excluded: they promise an APG keyboard contract — roving
91
+ * tabindex or `aria-activedescendant`, arrow-key navigation, selection state —
92
+ * that these divs do not implement. The roles below are structural only and
93
+ * carry no interaction contract, so they are safe to forward.
94
+ *
95
+ * `list`/`listitem` in particular is how a row of columns is announced as
96
+ * "list, N items", and is the standard workaround for Safari/VoiceOver
97
+ * dropping implicit list semantics. `region` needs an accessible name to be
98
+ * exposed as a landmark; the type cannot enforce that.
99
+ *
100
+ * Page landmarks belong to the layout components (MrlMain, MrlPage).
101
+ */
102
+ export type SafeLayoutRole = 'group' | 'list' | 'listitem' | 'none' | 'presentation' | 'region';
103
+ /**
104
+ * Shared props for the grid components: every `div` attribute, with `role`
105
+ * narrowed to {@link SafeLayoutRole}.
106
+ */
107
+ export type GridBaseProps = Omit<React.ComponentPropsWithoutRef<'div'>, 'role'> & DataQa & {
108
+ /**
109
+ * Structural role for the wrapper. Composite widget roles are not
110
+ * accepted — see {@link SafeLayoutRole}.
111
+ */
112
+ role?: SafeLayoutRole;
113
+ };
50
114
  export {};
@@ -1,3 +1,4 @@
1
1
  export * from './MrlGrid';
2
2
  export * from './MrlRow';
3
3
  export * from './MrlCol';
4
+ export type { AlignOptions, ColSpan, GridColumns, GutterSizes, JustifyOptions, NumCols, OffsetSpan, SafeLayoutRole } from './constants';
@@ -4,7 +4,9 @@ export type MrlSidebarHookInfo = {
4
4
  source: 'userInteraction' | 'imperativeHandler';
5
5
  };
6
6
  interface MrlSidebarHook {
7
+ /** Called on every close request, even if the sidebar is already closed. `info.source` tells whether a user or the imperative handle made it. */
7
8
  hookClose?: (info: MrlSidebarHookInfo) => void;
9
+ /** Called on every open request, even if the sidebar is already open. `info.source` tells whether a user or the imperative handle made it. */
8
10
  hookOpen?: (info: MrlSidebarHookInfo) => void;
9
11
  }
10
12
  interface MrlSidebarAnalytics {
@@ -1,12 +1,18 @@
1
1
  import * as React from 'react';
2
2
  type AriaRelevant = 'additions' | 'all' | 'removals' | 'text' | 'additions text' | undefined;
3
3
  export interface MrlLiveRegionProps extends React.HTMLAttributes<HTMLParagraphElement> {
4
+ /** Sets `aria-atomic`: announce the whole region on every change instead of only the changed part. */
4
5
  ariaAtomic?: boolean;
6
+ /** Sets `aria-live`: how urgently screen readers announce changes. */
5
7
  ariaLive: 'polite' | 'assertive' | 'off';
8
+ /** Sets `aria-relevant`: which kinds of change are announced. */
6
9
  ariaRelevant?: AriaRelevant;
7
10
  id?: string;
11
+ /** Empties the region one second after `srContent` changes. */
8
12
  shouldClearContent?: boolean;
13
+ /** Text announced by the live region. */
9
14
  srContent: string;
15
+ /** Shows the text on screen. By default the region is visually hidden. */
10
16
  visible?: boolean;
11
17
  }
12
18
  /**
@@ -47,15 +47,23 @@ export interface MrlToastProps {
47
47
  * The time in milliseconds after which the toast notification should automatically close.
48
48
  */
49
49
  closeAfterMs?: number;
50
+ /** Visual variant of the toast. Also picks its default icon. */
50
51
  kind?: MrlToastKind;
52
+ /** Link rendered after the messages. */
51
53
  link?: MrlToastLink;
54
+ /** Called when the toast closes, through the close button or auto-close. */
52
55
  onClose?: () => void;
56
+ /** Primary action button. */
53
57
  primaryCTA?: MrlToastCTA;
58
+ /** Main message of the toast. */
54
59
  primaryMessage: string | JSX.Element;
60
+ /** Secondary action button, rendered before the primary one. */
55
61
  secondaryCTA?: MrlToastCTA;
62
+ /** Supporting message rendered after the primary one. */
56
63
  secondaryMessage?: string | JSX.Element;
57
64
  /** Determines whether the close icon button should be shown. */
58
65
  showCloseButton?: boolean;
66
+ /** Shows the icon of the `kind` before the message. Ignored when an `avatar` is shown. */
59
67
  showIcon?: boolean;
60
68
  /**
61
69
  * Enables interaction tracking for this toast. Provide a stable, non-PII id
@@ -7,6 +7,7 @@ interface MrlPaginationButtonProps {
7
7
  buttonClass?: string;
8
8
  /** Additional class to add to the container element */
9
9
  className?: string;
10
+ /** Disables the button. */
10
11
  disabled?: boolean;
11
12
  /**
12
13
  * The type of pagination item.
@@ -6,6 +6,7 @@ export interface PortalProps extends React.HTMLAttributes<HTMLDivElement> {
6
6
  className?: string;
7
7
  ['data-qa']?: string;
8
8
  id?: string;
9
+ /** Stacking layer from `PORTAL_LAYERS`. Its name is used as the container id (over `id`) and its z-index is applied to the container's first child. Without it, the container is `id` or the root portal, with the root z-index. */
9
10
  layer?: PortalLayer;
10
11
  }
11
12
  export declare const MRL_PORTAL_ID: "mrl-root-portal";
@@ -9,6 +9,7 @@ type RefType = HTMLElement | HTMLDivElement | null;
9
9
  export declare const getTabbableElements: (ref: RefType, selector: string) => HTMLElement[];
10
10
  export type FocusOnInitPosition = 'first' | 'last';
11
11
  export interface RovingPropTypes {
12
+ /** CSS selector of the element that starts as the tab stop, for example a checked custom radio. Falls back to `[data-roving-active]`, then to the first `[data-roving]` element. */
12
13
  activeSelector?: string;
13
14
  /**
14
15
  * If true, disabled elements (with disabled attribute or aria-disabled="true")
@@ -23,14 +24,23 @@ export interface RovingPropTypes {
23
24
  * rendered by the time the componentDidMount function is triggered
24
25
  */
25
26
  delayMount?: number;
27
+ /** Moves focus to the first or last element when the component mounts (after `delayMount`, if set). */
26
28
  focusOnInit?: FocusOnInitPosition;
29
+ /** Keeps every element out of the tab order until `isFocused` becomes true. For groups reached through a keyboard shortcut instead of Tab. */
27
30
  focusWithShortcut?: boolean;
31
+ /** Has no effect. Kept for backwards compatibility. */
28
32
  forceUpdate?: boolean;
33
+ /** Set when another roving tabindex is nested inside this one, so its elements are left to the inner instance. */
29
34
  hasChildRoving?: boolean;
35
+ /** CSS selector. Keyboard navigation is ignored while focus is inside a matching element, for example a text input. */
30
36
  ignoreElements?: string;
37
+ /** With `focusWithShortcut`, whether the group holds focus. Turning it on focuses the active element; turning it off removes the group from the tab order. */
31
38
  isFocused?: boolean;
39
+ /** Called when focus moves from the group to another element outside it. With `focusWithShortcut`, also called when `isFocused` turns off while focus is outside the group. */
32
40
  onBlur?: () => void;
41
+ /** Pass it after moving focus into the group programmatically. On the next update the focused element becomes the tab stop and the callback receives `false`, so the consumer can drop it. */
33
42
  onRefocus?: (shouldRefocus: boolean) => void;
43
+ /** Axis of the group, read once at mount. Every arrow key moves focus, but the keys across the axis are left to a focused element with `aria-haspopup="true"` or role combobox, listbox or option. Defaults to horizontal. */
34
44
  orientation?: RovingOrientation;
35
45
  qa?: string;
36
46
  }
@@ -13,6 +13,7 @@ export interface SvgPropTypes extends Omit<MrlComponentProps, 'style'>, Omit<Rea
13
13
  path?: string;
14
14
  /** Enable lazy loading when a path is provided. */
15
15
  lazyLoad?: boolean;
16
+ /** Renders an empty span instead of the SVG. */
16
17
  isClone?: boolean;
17
18
  /** The size of an SVG Component */
18
19
  size?: SVGSize;
@@ -13,8 +13,11 @@ export interface MrlTableCellProps extends React.ComponentPropsWithoutRef<'td'>
13
13
  * Whether this cell is sticky 'left' or sticky 'right' or not sticky at all
14
14
  */
15
15
  sticky?: MrlTableColumnSticky;
16
+ /** Draws the scroll shadow on a cell that is sticky 'left'. Set it while the content is scrolled away from the left edge. */
16
17
  hasScrollShadowLeft?: boolean;
18
+ /** Draws the scroll shadow on a cell that is sticky 'right'. Set it while more columns remain to the right. */
17
19
  hasScrollShadowRight?: boolean;
20
+ /** Horizontal alignment of the cell content. */
18
21
  horizontalAlign?: MrlTableCellHorizontalAlign;
19
22
  }
20
23
  /**
@@ -13,8 +13,11 @@ export interface MrlTableColumnProps extends React.ComponentPropsWithoutRef<'th'
13
13
  * Whether this column is sticky 'left' or sticky 'right' or not sticky at all
14
14
  */
15
15
  sticky?: MrlTableColumnSticky;
16
+ /** Draws the scroll shadow on a header cell that is sticky 'left'. Set it while the content is scrolled away from the left edge. */
16
17
  hasScrollShadowLeft?: boolean;
18
+ /** Draws the scroll shadow on a header cell that is sticky 'right'. Set it while more columns remain to the right. */
17
19
  hasScrollShadowRight?: boolean;
20
+ /** Horizontal alignment of the header cell content. */
18
21
  horizontalAlign?: MrlTableCellHorizontalAlign;
19
22
  }
20
23
  /**
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  export interface MrlTabProps extends React.ComponentProps<'button'> {
3
3
  /** Class to be applied to the button element of the MrlTab */
4
4
  className?: string;
5
+ /** Icon rendered before the tab text. */
5
6
  icon?: React.ReactElement;
6
7
  /**
7
8
  * The id that will be passed to the MrlTabContext to set the active state.
@@ -10,6 +11,7 @@ export interface MrlTabProps extends React.ComponentProps<'button'> {
10
11
  id: string;
11
12
  /** An addition function to call when clicking on a tab */
12
13
  hookClick?: () => void;
14
+ /** Label of the tab. */
13
15
  text: string;
14
16
  /**
15
17
  * Enables interaction tracking for this tab. Provide a stable, non-PII id
@@ -3,6 +3,7 @@ export interface MrlTabGroupPropTypes {
3
3
  children: React.ReactNode;
4
4
  /** Class to be applied to the container element of the MrlTabGroup */
5
5
  className?: string;
6
+ /** Hides the previous and next buttons that page through tabs overflowing the container. */
6
7
  disablePageControls?: boolean;
7
8
  /** A hidden label for the tab group for accessiblity purposes */
8
9
  label?: string;
@@ -5,6 +5,7 @@ export interface MrlTabLinkProps extends NavLinkProps {
5
5
  className?: string;
6
6
  /** Children to be rendered within the text component */
7
7
  children?: React.ReactNode;
8
+ /** Icon rendered before the tab text. */
8
9
  icon?: React.ReactElement;
9
10
  /**
10
11
  * The id that will be passed to the MrlTabContext to set the active state.
@@ -9,7 +9,9 @@ export interface MrlTabsPropTypes {
9
9
  className?: string;
10
10
  /** Sets the default active tab by id */
11
11
  selectedTab?: string;
12
+ /** Size of the tabs. */
12
13
  size?: MrlTabSize;
14
+ /** Stretches the tabs so they share the row width equally. */
13
15
  spaceTabsEvenly?: boolean;
14
16
  }
15
17
  export declare const MrlTabs: React.FC<MrlTabsPropTypes>;
@@ -26,6 +26,7 @@ interface MrlTextHeadingProps extends React.ComponentPropsWithRef<'h1'>, DataQa
26
26
  * Note: hierarchy only impacts MrlTextHeading components with `kind="title"`
27
27
  */
28
28
  hierarchy?: HeadingHierarchies;
29
+ /** Text of the heading. Takes precedence over `children`. */
29
30
  text?: string;
30
31
  }
31
32
  /**
@@ -6,19 +6,24 @@ import { MrlMenuProps } from '../../menu/MrlMenu/MrlMenu';
6
6
  */
7
7
  export interface MrlToolbarProps extends React.ComponentPropsWithRef<'div'> {
8
8
  children?: React.ReactNode;
9
+ /** Visual variant. 'inverse' uses the dark inverse background; 'skeleton' renders a blank placeholder whose length is estimated from the number of items. */
9
10
  kind?: 'default' | 'inverse' | 'skeleton';
10
11
  /**
11
12
  * An optional prop to apply an aria-label to the MrlToobar
12
13
  */
13
14
  label?: string;
15
+ /** Has no effect. Kept for backwards compatibility. */
14
16
  lastToolbarInRow?: boolean;
15
17
  /**
16
18
  * An optional prop to set the maximum number of visible items in a toolbar.
17
19
  * Additional items will appear in a menu.
18
20
  */
19
21
  maxVisibleItems?: number;
22
+ /** Props of the icon button that opens the overflow menu. Replaces the defaults (text "More tools", ghost, small) entirely, so include `text`. */
20
23
  menuButtonProps?: MrlIconButtonProps;
24
+ /** Props of the overflow menu that holds the items beyond `maxVisibleItems`. Replaces the default menu props entirely. */
21
25
  menuProps?: MrlMenuProps;
26
+ /** Direction in which the items are laid out. Defaults to horizontal. */
22
27
  orientation?: 'horizontal' | 'vertical';
23
28
  /**
24
29
  * A boolean prop that sets RovingTabindex in the MrlToolbar
@@ -28,6 +33,13 @@ export interface MrlToolbarProps extends React.ComponentPropsWithRef<'div'> {
28
33
  * Sets the size of the toolbar - defaults to 'small'
29
34
  */
30
35
  size?: 'xsmall' | 'small' | 'medium';
36
+ /**
37
+ * Spaced toolbars provide more space between elements. This is
38
+ * meant to be used for toolbars that have "bigger" elements inside
39
+ * (i.e. long title, ToolbarButtonAdapters, etc).
40
+ *
41
+ * Currently used for all secondary toolbars.
42
+ */
31
43
  spaced?: boolean;
32
44
  }
33
45
  /**