@muraldevkit/ui-toolkit 1.14.0 → 1.15.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.
- package/dist/components/button/MrlAnimatedIconButton/MrlAnimatedIconButton.d.ts +1 -1
- package/dist/components/button/MrlButton/MrlButton.d.ts +1 -1
- package/dist/components/button/MrlIconButton/MrlIconButton.d.ts +1 -1
- package/dist/components/form/MrlSelectItem/index.d.ts +5 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/modal/MrlModalFooter/index.d.ts +3 -12
- package/dist/components/notification/MrlBlockNotification/index.d.ts +66 -0
- package/dist/components/notification/constants.d.ts +36 -0
- package/dist/components/notification/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/styles/MrlBlockNotification/global.scss +24 -0
- package/dist/styles/MrlBlockNotification/mixins.scss +48 -0
- package/dist/styles/MrlBlockNotification/module.scss +78 -0
- package/dist/styles/MrlBlockNotification/variables.scss +37 -0
- package/dist/styles/MrlModalFooter/global.scss +18 -0
- package/dist/styles/MrlModalFooter/module.scss +0 -4
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/noop/index.d.ts +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// Block Notification component styles
|
|
3
|
+
/// @group block-notification
|
|
4
|
+
////
|
|
5
|
+
|
|
6
|
+
@use '~@muraldevkit/ds-foundation/src/styles/_mixins' as *;
|
|
7
|
+
@use '~@muraldevkit/ds-foundation/src/styles/contextual-variables/z-index' as *;
|
|
8
|
+
@use './styles.mixins.scss' as *;
|
|
9
|
+
|
|
10
|
+
// Transition states were not working as expected when migrated to
|
|
11
|
+
// modules, so we are using global styles for now.
|
|
12
|
+
.mrl-blockNotification.mrl-is--transitioning {
|
|
13
|
+
@include mrl-block-notification-fade-out;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
17
|
+
.mrl-blockNotification.mrl-is--transitioning {
|
|
18
|
+
@include mrl-block-notification-slide-out;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.mrl-blockNotification .mrl-is--closed {
|
|
23
|
+
display: none;
|
|
24
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// Block notification component mixins
|
|
3
|
+
/// @group block-notification
|
|
4
|
+
////
|
|
5
|
+
|
|
6
|
+
/// CSS transition setup for block notification animations.
|
|
7
|
+
/// There are no configurations for this mixin
|
|
8
|
+
///
|
|
9
|
+
/// @example @include mrl-block-notification-animate-in;
|
|
10
|
+
@mixin mrl-block-notification-animate-in() {
|
|
11
|
+
margin-top: 0;
|
|
12
|
+
opacity: 1;
|
|
13
|
+
transition-duration: var(--mrl-duration-03);
|
|
14
|
+
transition-property: margin opacity;
|
|
15
|
+
transition-timing-function: var(--mrl-timing-m1);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/// CSS to fade the block notification out.
|
|
19
|
+
/// There are no configurations for this mixin
|
|
20
|
+
///
|
|
21
|
+
/// @example @include mrl-block-notification-fade-out;
|
|
22
|
+
@mixin mrl-block-notification-fade-in() {
|
|
23
|
+
opacity: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/// CSS to slide block notification out
|
|
27
|
+
/// There are no configurations for this mixin
|
|
28
|
+
///
|
|
29
|
+
/// @example @include mrl-block-notification-slide-out;
|
|
30
|
+
@mixin mrl-block-notification-slide-in() {
|
|
31
|
+
margin-top: calc(var(--mrl-blockNotification-height));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/// CSS to fade the block notification out.
|
|
35
|
+
/// There are no configurations for this mixin
|
|
36
|
+
///
|
|
37
|
+
/// @example @include mrl-block-notification-fade-out;
|
|
38
|
+
@mixin mrl-block-notification-fade-out() {
|
|
39
|
+
opacity: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/// CSS to slide block notification out
|
|
43
|
+
/// There are no configurations for this mixin
|
|
44
|
+
///
|
|
45
|
+
/// @example @include mrl-block-notification-slide-out;
|
|
46
|
+
@mixin mrl-block-notification-slide-out() {
|
|
47
|
+
margin-top: calc(var(--mrl-blockNotification-height) * -1);
|
|
48
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// Block Notification component styles
|
|
3
|
+
/// @group block-notification
|
|
4
|
+
////
|
|
5
|
+
|
|
6
|
+
@use '~@muraldevkit/ds-foundation/src/styles/_mixins' as *;
|
|
7
|
+
@use '~@muraldevkit/ds-foundation/src/styles/contextual-variables/z-index' as *;
|
|
8
|
+
@use '~@muraldevkit/ds-foundation/src/styles/skeletons/button' as *;
|
|
9
|
+
@use './styles.variables.scss';
|
|
10
|
+
@use './styles.mixins.scss' as *;
|
|
11
|
+
|
|
12
|
+
$mrl-notification-close-inset: var(--mrl-spacing-02);
|
|
13
|
+
|
|
14
|
+
.mrl-blockNotification {
|
|
15
|
+
@include mrl-block-notification-animate-in;
|
|
16
|
+
|
|
17
|
+
align-items: center;
|
|
18
|
+
background: var(--mrl-blockNotification-background);
|
|
19
|
+
border-radius: var(--mrl-blockNotification-radius);
|
|
20
|
+
color: var(--mrl-blockNotification-color);
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: row;
|
|
23
|
+
gap: var(--mrl-blockNotification-inline-spacing);
|
|
24
|
+
justify-content: center;
|
|
25
|
+
min-height: var(--mrl-blockNotification-height);
|
|
26
|
+
padding: var(--mrl-blockNotification-inset-spacing);
|
|
27
|
+
position: relative;
|
|
28
|
+
width: 100%;
|
|
29
|
+
|
|
30
|
+
svg {
|
|
31
|
+
color: var(--mrl-blockNotification-color);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.mrl-blockNotification--dismissible {
|
|
36
|
+
padding-right: calc(
|
|
37
|
+
#{$mrl-notification-close-inset} + var(--mrl-blockNotification-inline-spacing) + #{$mrl-button-height--small}
|
|
38
|
+
);
|
|
39
|
+
position: relative;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.mrl-blockNotification-close {
|
|
43
|
+
position: absolute;
|
|
44
|
+
right: $mrl-notification-close-inset;
|
|
45
|
+
top: 50%;
|
|
46
|
+
transform: translateY(-50%);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.mrl-blockNotification-message {
|
|
50
|
+
align-items: center;
|
|
51
|
+
display: flex;
|
|
52
|
+
|
|
53
|
+
:global(.message) {
|
|
54
|
+
@include mrl-text-static('small');
|
|
55
|
+
|
|
56
|
+
display: inline;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.mrl-blockNotification-heading {
|
|
61
|
+
color: var(--mrl-blockNotification-heading-color);
|
|
62
|
+
display: inline;
|
|
63
|
+
margin-right: var(--mrl-blockNotification-inline-spacing-message);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @todo v2 - we should apply a class to the mrl-svg element instead
|
|
68
|
+
* of targeting the element. However, the class should be `mrl-blockNotification-icon`
|
|
69
|
+
* so we would want to rename the existing class to `mrl-blockNotification-iconWrapper`
|
|
70
|
+
* which is a breaking change. Also we could explore if we need this div at all?
|
|
71
|
+
**/
|
|
72
|
+
.mrl-blockNotification-icon {
|
|
73
|
+
min-width: fit-content;
|
|
74
|
+
|
|
75
|
+
> svg {
|
|
76
|
+
display: flex;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// Block Notification component styles
|
|
3
|
+
/// @group block-notification
|
|
4
|
+
////
|
|
5
|
+
|
|
6
|
+
.mrl-blockNotification {
|
|
7
|
+
--mrl-blockNotification-background: var(--mrl-color-background-info);
|
|
8
|
+
--mrl-blockNotification-background-general: rgba(var(--mrl-gray-100), 1);
|
|
9
|
+
--mrl-blockNotification-color: rgba(var(--mrl-gray-10), 1);
|
|
10
|
+
--mrl-blockNotification-heading-color: var(--mrl-color-text-inverse);
|
|
11
|
+
--mrl-blockNotification-height: var(--mrl-spacing-09);
|
|
12
|
+
--mrl-blockNotification-inline-spacing: var(--mrl-spacing-03);
|
|
13
|
+
--mrl-blockNotification-inline-spacing-message: var(--mrl-spacing-02);
|
|
14
|
+
--mrl-blockNotification-inset-spacing: var(--mrl-spacing-03) var(--mrl-spacing-07);
|
|
15
|
+
--mrl-blockNotification-radius: 0;
|
|
16
|
+
--mrl-blockNotification-svg-color: var(--mrl-color-text-inverse);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Kind variants
|
|
20
|
+
.mrl-blockNotification[data-kind='error'] {
|
|
21
|
+
--mrl-blockNotification-background: var(--mrl-color-background-error);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.mrl-blockNotification[data-kind='success'] {
|
|
25
|
+
--mrl-blockNotification-background: var(--mrl-color-background-success);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.mrl-blockNotification[data-kind='warning'] {
|
|
29
|
+
--mrl-blockNotification-background: var(--mrl-color-background-warning);
|
|
30
|
+
--mrl-blockNotification-color: rgba(var(--mrl-gray-90), 1);
|
|
31
|
+
--mrl-blockNotification-heading-color: rgba(var(--mrl-black), 1);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.mrl-blockNotification[data-kind='general'],
|
|
35
|
+
.mrl-blockNotification[data-kind='private'] {
|
|
36
|
+
--mrl-blockNotification-background: var(--mrl-blockNotification-background-general);
|
|
37
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.mrl-modal-footer {
|
|
2
|
+
.mrlButton,
|
|
3
|
+
.modal-tertiary,
|
|
4
|
+
button {
|
|
5
|
+
align-self: flex-start;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.modal-secondary,
|
|
9
|
+
.modal-primary,
|
|
10
|
+
.mrlButton--primary,
|
|
11
|
+
.mrlButton--secondary {
|
|
12
|
+
margin-left: auto;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.mrlButton--primary {
|
|
16
|
+
margin: 0;
|
|
17
|
+
}
|
|
18
|
+
}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* No operation function to be used as a default callback.
|
|
3
|
+
*
|
|
4
|
+
* Example usage: in tests where there is a required handler, but we do not want to do anything.
|
|
5
|
+
* Better than passing a console log which clutters up our test output.
|
|
6
|
+
*/
|
|
7
|
+
export declare const noop: () => void;
|