@muraldevkit/ui-toolkit 2.55.0 → 2.57.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.
- package/dist/components/button/MrlIconButton/MrlIconButton.d.ts +8 -0
- package/dist/components/callout/MrlCallout/MrlCallout.d.ts +35 -0
- package/dist/components/callout/MrlCallout/index.d.ts +1 -0
- package/dist/components/callout/index.d.ts +1 -0
- package/dist/components/focus-trap/MrlFocusTrap/MrlFocusTrap.d.ts +5 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/menu/constants.d.ts +19 -1
- package/dist/components/popover/MrlPopover/MrlPopover.d.ts +67 -19
- package/dist/components/popover/demo/PopoverWithTrigger.d.ts +2 -1
- package/dist/components/portal/MrlPortal.d.ts +3 -1
- package/dist/components/svg/MrlSvg/MrlSvg.d.ts +2 -2
- package/dist/components/table/MrlSmartTable/MrlSmartTable.d.ts +4 -0
- package/dist/components/table/fixtures.d.ts +13 -0
- package/dist/components/text/MrlTextHeading/MrlTextHeading.d.ts +7 -3
- package/dist/components/tooltip/MrlTooltip/MrlTooltip.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/styles/MrlCallout/module.scss +47 -0
- package/dist/styles/MrlPopover/module.scss +24 -7
- package/dist/styles/MrlSmartTable/module.scss +4 -0
- package/dist/styles/layers/layers.d.ts +11 -0
- package/dist/utils/{findInteractiveElement/findInteractiveElement.d.ts → findAdjacentInteractiveElement/findAdjacentInteractiveElement.d.ts} +1 -1
- package/dist/utils/findAdjacentInteractiveElement/index.d.ts +1 -0
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/trapFocus/index.d.ts +2 -1
- package/package.json +1 -1
- package/dist/utils/findInteractiveElement/index.d.ts +0 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
@use '~@muraldevkit/ds-foundation/src/styles/_mixins' as *;
|
|
2
|
+
.MrlCallout {
|
|
3
|
+
&--content {
|
|
4
|
+
max-width: 17.5rem;
|
|
5
|
+
}
|
|
6
|
+
&--title {
|
|
7
|
+
font-size: var(--mrl-font-size-03);
|
|
8
|
+
margin-bottom: var(--mrl-spacing-02);
|
|
9
|
+
padding-right: var(--mrl-spacing-06);
|
|
10
|
+
}
|
|
11
|
+
&--eyebrow {
|
|
12
|
+
font-size: var(--mrl-font-size-01);
|
|
13
|
+
font-weight: var(--mrl-font-weight-04);
|
|
14
|
+
margin-bottom: var(--mrl-spacing-02);
|
|
15
|
+
padding-right: var(--mrl-spacing-06);
|
|
16
|
+
}
|
|
17
|
+
&--description {
|
|
18
|
+
p {
|
|
19
|
+
font-size: var(--mrl-font-size-02);
|
|
20
|
+
padding-right: var(--mrl-spacing-06);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
&--image {
|
|
24
|
+
margin-top: var(--mrl-spacing-05);
|
|
25
|
+
img {
|
|
26
|
+
height: auto;
|
|
27
|
+
width: 100%;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
&--footer {
|
|
31
|
+
display: flex;
|
|
32
|
+
justify-content: flex-start;
|
|
33
|
+
margin-top: var(--mrl-spacing-05);
|
|
34
|
+
:global(.mrlButton:last-child) {
|
|
35
|
+
margin-left: auto;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
:global(.mrlButton:focus-visible) {
|
|
39
|
+
@include mrl-focus($is-inverse: 'true');
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
@media screen and (min-resolution: 384dpi) and (max-resolution: 399dpi),
|
|
43
|
+
(min-resolution: 4dppx) and (max-resolution: 3.99dppx) {
|
|
44
|
+
.MrlCallout > div:first-child {
|
|
45
|
+
min-height: 75px;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
box-shadow: var(--mrl-shadows-raised);
|
|
8
8
|
color: var(--mrl-popover-text-color);
|
|
9
9
|
flex-direction: column;
|
|
10
|
-
max-height: calc(100vh - 2 * var(--mrl-space-inset-large));
|
|
11
10
|
max-width: 600px;
|
|
12
11
|
opacity: 0;
|
|
13
12
|
overflow: visible;
|
|
@@ -28,6 +27,7 @@
|
|
|
28
27
|
position: absolute;
|
|
29
28
|
right: 4px;
|
|
30
29
|
top: 6px;
|
|
30
|
+
transition: none;
|
|
31
31
|
svg {
|
|
32
32
|
color: var(--mrl-popover-text-color);
|
|
33
33
|
}
|
|
@@ -39,13 +39,14 @@
|
|
|
39
39
|
display: flex;
|
|
40
40
|
}
|
|
41
41
|
&--scrolling {
|
|
42
|
-
padding-bottom: var(--mrl-spacing-04);
|
|
43
42
|
padding-right: 0;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
}
|
|
44
|
+
&--scrolling--content {
|
|
45
|
+
overflow-x: hidden;
|
|
46
|
+
overflow-y: auto;
|
|
47
|
+
padding-right: calc(var(--mrl-popover-padding) - 4px);
|
|
48
|
+
.MrlPopover--close {
|
|
49
|
+
right: 8px;
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
&--point {
|
|
@@ -97,3 +98,19 @@
|
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
100
|
}
|
|
101
|
+
.inverse {
|
|
102
|
+
.MrlPopover--scrolling--content {
|
|
103
|
+
&::-webkit-scrollbar {
|
|
104
|
+
background-color: var(--mrl-popover-background-color);
|
|
105
|
+
border-radius: 10px;
|
|
106
|
+
width: 12px;
|
|
107
|
+
}
|
|
108
|
+
&::-webkit-scrollbar-thumb {
|
|
109
|
+
background-clip: content-box;
|
|
110
|
+
background-color: var(--mrl-popover-text-color);
|
|
111
|
+
border: 3px solid transparent;
|
|
112
|
+
border-radius: 10px;
|
|
113
|
+
position: relative;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* References to the different portal layers
|
|
3
|
+
*/
|
|
4
|
+
export declare const PORTAL_LAYERS: {
|
|
5
|
+
readonly ROOT: "mrl-root-portal";
|
|
6
|
+
readonly MENU: "mrl-menu-portal";
|
|
7
|
+
readonly POPOVER: "mrl-popover-portal";
|
|
8
|
+
readonly CALLOUT: "mrl-callout-portal";
|
|
9
|
+
readonly MODAL: "mrl-modal";
|
|
10
|
+
readonly TOOLTIP: "mrl-tooltip-portal";
|
|
11
|
+
};
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* @param direction - The direction to search in
|
|
6
6
|
* @returns The interactive element or null if none is found
|
|
7
7
|
*/
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const findAdjacentInteractiveElement: (ref: React.RefObject<HTMLElement> | undefined, direction?: 'next' | 'previous') => HTMLElement | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './findAdjacentInteractiveElement';
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -17,7 +17,8 @@ export declare const getElementWithAutofocus: (containerElement: HTMLElement) =>
|
|
|
17
17
|
* Adapted from https://hidde.blog/using-javascript-to-trap-focus-in-an-element/
|
|
18
18
|
*
|
|
19
19
|
* @param {HTMLElement} element // Element to trap focus in
|
|
20
|
+
* @param {boolean} disableAutofocus // Whether to disable autofocus
|
|
20
21
|
* @returns {Function} // Cleanup function to be run when component is
|
|
21
22
|
* // removed from the DOM
|
|
22
23
|
*/
|
|
23
|
-
export declare const trapFocus: (element: HTMLElement) => (() => void);
|
|
24
|
+
export declare const trapFocus: (element: HTMLElement, disableAutofocus?: boolean) => (() => void);
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './findInteractiveElement';
|