@muraldevkit/ui-toolkit 1.8.1 → 1.9.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.
@@ -0,0 +1,44 @@
1
+ /// <reference types="react" />
2
+ import { AttrsObject } from '../../utils';
3
+ import { Kind, Orientation, Spacing } from './constants';
4
+ interface MrlDividerProps {
5
+ /**
6
+ * Applies additional HTML attributes to the divider element.
7
+ */
8
+ attrs?: AttrsObject;
9
+ /**
10
+ * Defines which color scheme to used based on the background color of the container.
11
+ * White/light backgrounds should use "default" and dark/saturated color backgrounds
12
+ * should use "inverse".
13
+ */
14
+ kind: Kind;
15
+ /**
16
+ * Use to set a width/height of a divider to create an offset from surrounding content.
17
+ * This is commonly found in toolbars. Value can be any valid CSS `width/height` value, such as
18
+ * a CSS variable or rem value. Warning, vertical dividers may not work if set to a percentage,
19
+ * due to browser limitations with calculating dynamic heights. You should not set the parent to
20
+ * a static height to make this work as that poses accessibility issues.
21
+ */
22
+ length?: string;
23
+ /**
24
+ * Determines the orientation of the divider based on the sibling elements' orientation.
25
+ * Stacked elements should use "horizontal" and elements displayed in a row should use
26
+ * "vertical". Note for the "vertical" orientation, only usage between a row of Icon Buttons
27
+ * is currently supported.
28
+ */
29
+ orientation: Orientation;
30
+ /**
31
+ * Determines how much space to provide between the elements that the divider is separating.
32
+ * This option only applies to horizontal orientation.
33
+ */
34
+ spacing?: Spacing;
35
+ }
36
+ /**
37
+ * Used to visually and semantically separate two elements.
38
+ * For visual separation only view this package's mixins
39
+ *
40
+ * @param props - component props
41
+ * @returns a MrlDivider React component.
42
+ */
43
+ export declare function MrlDivider({ attrs, kind, length, orientation, spacing }: MrlDividerProps): JSX.Element;
44
+ export {};
@@ -0,0 +1,18 @@
1
+ export declare const allowedValues: {
2
+ kinds: readonly ["default", "inverse"];
3
+ orientations: readonly ["horizontal", "vertical"];
4
+ spacings: readonly ["small", "medium", "large"];
5
+ };
6
+ export type Kind = (typeof allowedValues.kinds)[number];
7
+ export type Orientation = (typeof allowedValues.orientations)[number];
8
+ export type Spacing = (typeof allowedValues.spacings)[number];
9
+ export interface DividerDefaults {
10
+ kind: Kind;
11
+ orientation: Orientation;
12
+ spacing: Spacing;
13
+ }
14
+ /**
15
+ * Default values for props on the Divider component;
16
+ * Shared between the component and Storybook
17
+ */
18
+ export declare const defaults: DividerDefaults;