@muraldevkit/ui-toolkit 4.25.1 → 4.27.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 (44) hide show
  1. package/dist/components/form/index.d.ts +4 -4
  2. package/dist/components/form/legacy-select/MrlLegacySelect/MrlLegacySelect.d.ts +58 -0
  3. package/dist/components/form/legacy-select/MrlLegacySelect/index.d.ts +1 -0
  4. package/dist/components/form/{select/MrlSelectItem/MrlSelectItem.d.ts → legacy-select/MrlLegacySelectItem/MrlLegacySelectItem.d.ts} +3 -3
  5. package/dist/components/form/legacy-select/MrlLegacySelectItem/index.d.ts +1 -0
  6. package/dist/components/form/{select/MrlSelectMenu/MrlSelectMenu.d.ts → legacy-select/MrlLegacySelectMenu/MrlLegacySelectMenu.d.ts} +5 -5
  7. package/dist/components/form/legacy-select/MrlLegacySelectMenu/index.d.ts +1 -0
  8. package/dist/components/form/legacy-select/index.d.ts +9 -0
  9. package/dist/components/form/{new-select → select}/MrlMultiSelect/MrlMultiSelect.d.ts +2 -2
  10. package/dist/components/form/select/MrlSelect/MrlSelect.d.ts +13 -54
  11. package/dist/components/form/select/MrlSelect/index.d.ts +1 -1
  12. package/dist/components/form/select/index.d.ts +2 -9
  13. package/dist/components/tabs/MrlTabLink/MrlTabLink.d.ts +22 -0
  14. package/dist/components/tabs/MrlTabLink/index.d.ts +1 -0
  15. package/dist/components/tabs/index.d.ts +1 -0
  16. package/dist/index.js +1 -1
  17. package/dist/styles/{MrlSelect → MrlLegacySelect}/module.scss +1 -1
  18. package/dist/styles/{MrlSelectItem → MrlLegacySelectItem}/module.scss +1 -1
  19. package/dist/styles/{MrlSelectMenu → MrlLegacySelectMenu}/module.scss +1 -1
  20. package/dist/styles/MrlTab/module.scss +1 -0
  21. package/dist/styles.css +5 -5
  22. package/package.json +3 -1
  23. package/dist/components/form/new-select/MrlSelect/MrlSelect.d.ts +0 -17
  24. package/dist/components/form/new-select/MrlSelect/index.d.ts +0 -1
  25. package/dist/components/form/new-select/index.d.ts +0 -2
  26. package/dist/components/form/select/MrlSelectItem/index.d.ts +0 -1
  27. package/dist/components/form/select/MrlSelectMenu/index.d.ts +0 -1
  28. /package/dist/components/form/{select → legacy-select}/context/SelectContext.d.ts +0 -0
  29. /package/dist/components/form/{select → legacy-select}/stories.data.d.ts +0 -0
  30. /package/dist/components/form/{new-select → select}/MrlMultiSelect/index.d.ts +0 -0
  31. /package/dist/components/form/{new-select → select}/components/MrlSelectDropdownIndicator.d.ts +0 -0
  32. /package/dist/components/form/{new-select → select}/components/MrlSelectMultiValue.d.ts +0 -0
  33. /package/dist/components/form/{new-select → select}/components/MrlSelectMultiValueRemove.d.ts +0 -0
  34. /package/dist/components/form/{new-select → select}/components/MrlSelectOption.d.ts +0 -0
  35. /package/dist/components/form/{new-select → select}/components/index.d.ts +0 -0
  36. /package/dist/components/form/{new-select → select}/styles/default.d.ts +0 -0
  37. /package/dist/components/form/{new-select → select}/styles/index.d.ts +0 -0
  38. /package/dist/components/form/{new-select → select}/styles/inline.d.ts +0 -0
  39. /package/dist/components/form/{new-select → select}/styles/inlineNoLabel.d.ts +0 -0
  40. /package/dist/components/form/{new-select → select}/styles/inlineStacked.d.ts +0 -0
  41. /package/dist/components/form/{new-select → select}/types.d.ts +0 -0
  42. /package/dist/styles/{MrlSelect → MrlLegacySelect}/variables.scss +0 -0
  43. /package/dist/styles/{MrlSelectItem → MrlLegacySelectItem}/variables.scss +0 -0
  44. /package/dist/styles/{MrlSelectMenu → MrlLegacySelectMenu}/variables.scss +0 -0
@@ -1,6 +1,6 @@
1
- export * from './select';
2
- export * from './select/MrlSelectItem';
3
- export * from './select/MrlSelectMenu';
1
+ export * from './legacy-select';
2
+ export * from './legacy-select/MrlLegacySelectItem';
3
+ export * from './legacy-select/MrlLegacySelectMenu';
4
4
  export * from './text-input/MrlTextInput';
5
5
  export * from './text-input/MrlEditableTextInput';
6
6
  export * from './label/MrlLabel';
@@ -15,4 +15,4 @@ export * from './radio/MrlRadioButton';
15
15
  export * from './radio/MrlRadioButtonStandalone';
16
16
  export * from './switch';
17
17
  export * from './date-picker';
18
- export * from './new-select';
18
+ export * from './select';
@@ -0,0 +1,58 @@
1
+ import * as React from 'react';
2
+ import { SelectStates, InputKinds, InputSizes } from '../../constants';
3
+ import { AttrsObject } from '../../../../utils';
4
+ export interface MrlLegacySelectProptypes extends React.HTMLAttributes<HTMLDivElement> {
5
+ /** Additional function to be run when the value of the select changes */
6
+ hookChange?: (newValue?: string) => void | undefined;
7
+ /** State of the select element based on user actions or permissions */
8
+ state?: SelectStates;
9
+ /**
10
+ * By default, we will select the first item in the list.
11
+ * To select a different option by default, pass that item’s value as the defaultValue to the mrlSelect element.
12
+ */
13
+ defaultValue?: string;
14
+ /**
15
+ * Because this is a custom element, we can't use a standard "for" attribute setup. The label
16
+ * element needs to have an id and then we reference via the select with aria
17
+ */
18
+ labelId: string;
19
+ /**
20
+ * Changes the visual style of the select trigger; Use 'inline when your select is inline
21
+ * with other content
22
+ */
23
+ kind?: InputKinds;
24
+ /**
25
+ * Changes the visual size of the select trigger; Currently only supported when kind="inline"
26
+ */
27
+ size?: InputSizes;
28
+ /**
29
+ * Applies additional HTML attributes to the `mrl-select` element after the
30
+ * hydration process. It is recommended only to use when overwriting an attribute
31
+ * assigned internally by the design system.
32
+ * When using in a framework wrapper (e.g., React), treat it as an object and don't stringify.
33
+ * Otherwise, the value object needs to be stringified to not receive `"[Object object]"`.
34
+ * Example: `attrs='{ "tabindex": "1" }'`
35
+ */
36
+ attrs?: AttrsObject;
37
+ /**
38
+ * menu - list of options for the user to chose from; expects an `MrlLegacySelectMenu` component
39
+ */
40
+ children?: React.ReactNode;
41
+ /**
42
+ * optional id - we will generate a unique one if it isn't given.
43
+ * ID will be decorated with `${id}-mrl-select` to not conflict with aria controls.
44
+ */
45
+ id?: string;
46
+ /**
47
+ * optional value - control which item is selected by passing an `MrlLegacySelectItem` value (overrides `defaultValue`)
48
+ * Can be used in conjunction with `hookChange` to create a controlled component.
49
+ */
50
+ value?: string;
51
+ }
52
+ /**
53
+ * Creates and exports component class for Mural Select
54
+ *
55
+ * @param {MrlLegacySelectProptypes} props the props for your MrlLink
56
+ * @returns {React.ReactElement} an a element containing the text you pass
57
+ */
58
+ export declare const MrlLegacySelect: ({ attrs, children, kind, labelId, size, ...theRest }: MrlLegacySelectProptypes) => React.ReactElement;
@@ -0,0 +1 @@
1
+ export { MrlLegacySelect, type MrlLegacySelectProptypes } from './MrlLegacySelect';
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { AttrsObject } from '../../../../utils';
3
- export interface MrlSelectItemProptypes extends React.HTMLAttributes<HTMLDivElement> {
3
+ export interface MrlLegacySelectItemProptypes extends React.HTMLAttributes<HTMLDivElement> {
4
4
  /**
5
5
  * value of the select item that is stored as the selected value of the select input
6
6
  */
@@ -30,7 +30,7 @@ export interface MrlSelectItemProptypes extends React.HTMLAttributes<HTMLDivElem
30
30
  /**
31
31
  * Renders a select component
32
32
  *
33
- * @param {MrlSelectItemProptypes} props the props for your MrlLink
33
+ * @param {MrlLegacySelectItemProptypes} props the props for your MrlLink
34
34
  * @returns {React.ReactElement} an a element containing the text you pass
35
35
  */
36
- export declare const MrlSelectItem: ({ attrs, children, index, value, isDisabled, ...theRest }: MrlSelectItemProptypes) => React.ReactElement;
36
+ export declare const MrlLegacySelectItem: ({ attrs, children, index, value, isDisabled, ...theRest }: MrlLegacySelectItemProptypes) => React.ReactElement;
@@ -0,0 +1 @@
1
+ export { MrlLegacySelectItem } from './MrlLegacySelectItem';
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { ReactElement } from 'react';
3
3
  import { SelectMenuPositions } from '../../constants';
4
4
  import { AttrsObject } from '../../../../utils';
5
- export interface MrlSelectMenuProptypes extends React.HTMLAttributes<HTMLDivElement> {
5
+ export interface MrlLegacySelectMenuProptypes extends React.HTMLAttributes<HTMLDivElement> {
6
6
  /** The placement of the menu in relation to its trigger */
7
7
  position?: SelectMenuPositions;
8
8
  /** Current value of the select input */
@@ -22,7 +22,7 @@ export interface MrlSelectMenuProptypes extends React.HTMLAttributes<HTMLDivElem
22
22
  */
23
23
  attrs?: AttrsObject;
24
24
  /**
25
- * menu - list of options for the user to chose from; expects an `MrlSelectMenu` component
25
+ * menu - list of options for the user to chose from; expects an `MrlLegacySelectMenu` component
26
26
  */
27
27
  children?: React.ReactNode;
28
28
  /**
@@ -37,7 +37,7 @@ export interface MrlSelectMenuProptypes extends React.HTMLAttributes<HTMLDivElem
37
37
  * controlled by the wrapping mrl-select but we need this component
38
38
  * within our HTML structure for valid aria usage.
39
39
  *
40
- * @param {MrlSelectMenuProptypes} props MrlSelectMenuProptypes
41
- * @returns {React.ReactElement} returns a MrlSelectMenu
40
+ * @param {MrlLegacySelectMenuProptypes} props MrlLegacySelectMenuProptypes
41
+ * @returns {React.ReactElement} returns a MrlLegacySelectMenu
42
42
  */
43
- export declare const MrlSelectMenu: ({ attrs, children, labelId, position, ...theRest }: MrlSelectMenuProptypes) => React.ReactElement;
43
+ export declare const MrlLegacySelectMenu: ({ attrs, children, labelId, position, ...theRest }: MrlLegacySelectMenuProptypes) => React.ReactElement;
@@ -0,0 +1 @@
1
+ export { MrlLegacySelectMenu } from './MrlLegacySelectMenu';
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import { MrlLegacySelectProptypes } from './MrlLegacySelect';
3
+ /**
4
+ * Creates and exports component class for Mural Select
5
+ *
6
+ * @param {MrlLegacySelectProptypes} props MrlLegacySelectProptypes
7
+ * @returns {React.ReactElement} returns a MrlLegacySelect wrapped in a select provider.
8
+ */
9
+ export declare const MrlLegacySelect: ({ hookChange, id, defaultValue, state, children, value, ...rest }: MrlLegacySelectProptypes) => React.ReactElement;
@@ -5,8 +5,8 @@ export interface MrlMultiSelectProps<T, IsMulti extends boolean = false, Group e
5
5
  hasError?: boolean;
6
6
  isReadOnly?: boolean;
7
7
  }
8
- export declare const CLASS_NAME_PREFIX = "MrlMultiSelect";
9
- export declare const MENU_LIST_CLASS_NAME: string;
8
+ export declare const MULTI_SELECT_CLASS_NAME_PREFIX = "MrlMultiSelect";
9
+ export declare const MULTI_SELECT_MENU_LIST_CLASS_NAME: string;
10
10
  /**
11
11
  * MrlSelect component
12
12
  *
@@ -1,58 +1,17 @@
1
- import * as React from 'react';
2
- import { SelectStates, InputKinds, InputSizes } from '../../constants';
3
- import { AttrsObject } from '../../../../utils';
4
- export interface MrlSelectProptypes extends React.HTMLAttributes<HTMLDivElement> {
5
- /** Additional function to be run when the value of the select changes */
6
- hookChange?: (newValue?: string) => void | undefined;
7
- /** State of the select element based on user actions or permissions */
8
- state?: SelectStates;
9
- /**
10
- * By default, we will select the first item in the list.
11
- * To select a different option by default, pass that item’s value as the defaultValue to the mrlSelect element.
12
- */
13
- defaultValue?: string;
14
- /**
15
- * Because this is a custom element, we can't use a standard "for" attribute setup. The label
16
- * element needs to have an id and then we reference via the select with aria
17
- */
18
- labelId: string;
19
- /**
20
- * Changes the visual style of the select trigger; Use 'inline when your select is inline
21
- * with other content
22
- */
23
- kind?: InputKinds;
24
- /**
25
- * Changes the visual size of the select trigger; Currently only supported when kind="inline"
26
- */
27
- size?: InputSizes;
28
- /**
29
- * Applies additional HTML attributes to the `mrl-select` element after the
30
- * hydration process. It is recommended only to use when overwriting an attribute
31
- * assigned internally by the design system.
32
- * When using in a framework wrapper (e.g., React), treat it as an object and don't stringify.
33
- * Otherwise, the value object needs to be stringified to not receive `"[Object object]"`.
34
- * Example: `attrs='{ "tabindex": "1" }'`
35
- */
36
- attrs?: AttrsObject;
37
- /**
38
- * menu - list of options for the user to chose from; expects an `MrlSelectMenu` component
39
- */
40
- children?: React.ReactNode;
41
- /**
42
- * optional id - we will generate a unique one if it isn't given.
43
- * ID will be decorated with `${id}-mrl-select` to not conflict with aria controls.
44
- */
45
- id?: string;
46
- /**
47
- * optional value - control which item is selected by passing an `MrlSelectItem` value (overrides `defaultValue`)
48
- * Can be used in conjunction with `hookChange` to create a controlled component.
49
- */
50
- value?: string;
1
+ /// <reference types="react" />
2
+ import { GroupBase, Props } from 'react-select';
3
+ import { SelectKind } from '../types';
4
+ export interface MrlSelectProps<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> extends Props<Option, IsMulti, Group> {
5
+ hasError?: boolean;
6
+ isReadOnly?: boolean;
7
+ kind?: SelectKind;
51
8
  }
9
+ export declare const SELECT_CLASS_NAME_PREFIX = "MrlSelect";
10
+ export declare const SELECT_MENU_LIST_CLASS_NAME: string;
52
11
  /**
53
- * Creates and exports component class for Mural Select
12
+ * MrlSelect component
54
13
  *
55
- * @param {MrlSelectProptypes} props the props for your MrlLink
56
- * @returns {React.ReactElement} an a element containing the text you pass
14
+ * @param props - the component props
15
+ * @returns the select component
57
16
  */
58
- export declare const MrlSelect: ({ attrs, children, kind, labelId, size, ...theRest }: MrlSelectProptypes) => React.ReactElement;
17
+ export declare function MrlSelect<T>(props: MrlSelectProps<T>): JSX.Element;
@@ -1 +1 @@
1
- export { MrlSelect, type MrlSelectProptypes } from './MrlSelect';
1
+ export * from './MrlSelect';
@@ -1,9 +1,2 @@
1
- import * as React from 'react';
2
- import { MrlSelectProptypes } from './MrlSelect';
3
- /**
4
- * Creates and exports component class for Mural Select
5
- *
6
- * @param {MrlSelectProptypes} props MrlSelectProptypes
7
- * @returns {React.ReactElement} returns a MrlSelect wrapped in a select provider.
8
- */
9
- export declare const MrlSelect: ({ hookChange, id, defaultValue, state, children, value, ...rest }: MrlSelectProptypes) => React.ReactElement;
1
+ export * from './MrlSelect';
2
+ export * from './MrlMultiSelect';
@@ -0,0 +1,22 @@
1
+ import * as React from 'react';
2
+ import { NavLinkProps } from 'react-router-dom';
3
+ export interface MrlTabLinkProps extends NavLinkProps {
4
+ /** Class to be applied to the NavLink element of the MrlTabLink */
5
+ className?: string;
6
+ icon?: React.ReactElement;
7
+ /**
8
+ * The id that will be passed to the MrlTabContext to set the active state.
9
+ * NOTE: This must match the `tabId` set on `MrlTabContent`!
10
+ */
11
+ id: string;
12
+ /** An addition function to call when clicking on a tab */
13
+ hookClick?: () => void;
14
+ text: string;
15
+ }
16
+ /**
17
+ * Renders a tab component
18
+ *
19
+ * @param {MrlTabLinkProps} props the props for your MrlTabLink
20
+ * @returns {React.ReactElement} an a element containing the text you pass
21
+ */
22
+ export declare const MrlTabLink: ({ className, icon, id, hookClick, text, to, ...remainingProps }: MrlTabLinkProps) => React.ReactElement;
@@ -0,0 +1 @@
1
+ export * from './MrlTabLink';
@@ -1,4 +1,5 @@
1
1
  export * from './MrlTab';
2
2
  export * from './MrlTabContent';
3
3
  export * from './MrlTabGroup';
4
+ export * from './MrlTabLink';
4
5
  export * from './MrlTabs';