@muraldevkit/ui-toolkit 2.59.2 → 2.61.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.
@@ -25,3 +25,4 @@ export * from './skeleton';
25
25
  export * from './empty';
26
26
  export * from './live-region';
27
27
  export * from './callout';
28
+ export * from './panel';
@@ -0,0 +1,39 @@
1
+ import { ComponentPropsWithRef, ReactNode } from 'react';
2
+ /**
3
+ * Props for the MrlPanel component.
4
+ */
5
+ interface MrlPanelProps extends ComponentPropsWithRef<'div'> {
6
+ /**
7
+ * A string value used for data-qa attribute.
8
+ */
9
+ ['data-qa']?: string;
10
+ /**
11
+ * Callback function that is called when the panel is closed.
12
+ */
13
+ onClose?: () => void;
14
+ /**
15
+ * The custom header element to be rendered in the panel.
16
+ * When a custom header is used developers need to provide th aria-label and aria-describedby.
17
+ */
18
+ header?: ReactNode;
19
+ /**
20
+ * The title of the panel.
21
+ */
22
+ title?: string;
23
+ /**
24
+ * The description of the panel.
25
+ */
26
+ description?: string;
27
+ /**
28
+ * Specifies whether to disable autofocus on the panel.
29
+ */
30
+ disableAutofocus?: boolean;
31
+ }
32
+ /**
33
+ * MrlPanel component.
34
+ *
35
+ * @param props The MrlPanel component properties.
36
+ * @returns The MrlPanel component.
37
+ */
38
+ export declare const MrlPanel: (props: MrlPanelProps) => JSX.Element;
39
+ export {};
@@ -0,0 +1 @@
1
+ export { MrlPanel } from './MrlPanel';
@@ -0,0 +1,22 @@
1
+ import { ComponentPropsWithRef, ReactNode } from 'react';
2
+ /**
3
+ * Props for the MrlPanelFooter component.
4
+ */
5
+ interface MrlPanelFooterProps extends ComponentPropsWithRef<'footer'> {
6
+ /**
7
+ * The children of the MrlPanelFooter component.
8
+ */
9
+ children?: ReactNode;
10
+ /**
11
+ * Specifies whether to show the divider.
12
+ */
13
+ hasDivider?: boolean;
14
+ }
15
+ /**
16
+ * MrlPanelFooter component.
17
+ *
18
+ * @param props The MrlPanelFooter component properties.
19
+ * @returns The MrlPanelFooter component.
20
+ */
21
+ export declare const MrlPanelFooter: ({ children, hasDivider, className, ...rest }: MrlPanelFooterProps) => JSX.Element;
22
+ export {};
@@ -0,0 +1 @@
1
+ export { MrlPanelFooter } from './MrlPanelFooter';
@@ -0,0 +1,18 @@
1
+ import { ComponentPropsWithRef, ReactNode } from 'react';
2
+ /**
3
+ * Props for the MrlPanelStickyHeader component.
4
+ */
5
+ interface MrlPanelStickyHeaderProps extends ComponentPropsWithRef<'div'> {
6
+ /**
7
+ * The children of the MrlPanelStickyHeader component.
8
+ */
9
+ children?: ReactNode;
10
+ }
11
+ /**
12
+ * MrlPanelStickyHeader component.
13
+ *
14
+ * @param props The MrlPanelStickyHeader component properties.
15
+ * @returns The MrlPanel component.
16
+ */
17
+ export declare const MrlPanelStickyHeader: ({ children, className, ...rest }: MrlPanelStickyHeaderProps) => JSX.Element;
18
+ export {};
@@ -0,0 +1 @@
1
+ export { MrlPanelStickyHeader } from './MrlPanelStickyHeader';
@@ -0,0 +1,3 @@
1
+ export * from './MrlPanel';
2
+ export * from './MrlPanelFooter';
3
+ export * from './MrlPanelStickyHeader';
@@ -9,7 +9,7 @@ export interface MrlSmartColumnRendererProps {
9
9
  /**
10
10
  * A function to change current sort descriptor.
11
11
  */
12
- setSortDescriptor: ({ column, direction }: {
12
+ handleSortClick: ({ column, direction }: {
13
13
  column: MrlSmartTableColumn['id'];
14
14
  direction: MrlSortDirection;
15
15
  }) => void;
@@ -124,6 +124,16 @@ export interface MrlSmartTableSelectionOptions {
124
124
  */
125
125
  onSelectionChange: (keys: MrlTableSelection) => void;
126
126
  }
127
+ export interface MrlTableColumnSortOptions {
128
+ /**
129
+ * The column to sort by.
130
+ */
131
+ sortColumn: MrlSmartTableColumn;
132
+ /**
133
+ * The details of the sort.
134
+ */
135
+ sortDescriptor: MrlTableColumnSortDescriptor;
136
+ }
127
137
  export interface MrlSmartTableProps extends Partial<Pick<MrlTableProps, 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'aria-details'>> {
128
138
  /**
129
139
  * A list of table columns.
@@ -156,6 +166,10 @@ export interface MrlSmartTableProps extends Partial<Pick<MrlTableProps, 'aria-la
156
166
  * @default ${id}-mrl-smart-table
157
167
  */
158
168
  id?: string;
169
+ /**
170
+ * A function to override the default sort items when a sort descriptor is set.
171
+ */
172
+ customSortItems?: ({ sortColumn, sortDescriptor }: MrlTableColumnSortOptions) => void;
159
173
  }
160
174
  /**
161
175
  * MrlSmartTable Component