@muraldevkit/ui-toolkit 2.4.1 → 2.4.2
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/index.js +1 -1
- package/dist/styles/MrlBlockNotification/global.scss +0 -11
- package/dist/styles/MrlBlockNotification/mixins.scss +0 -28
- package/dist/styles/MrlBlockNotification/module.scss +0 -25
- package/dist/styles/MrlBlockNotification/variables.scss +0 -10
- package/dist/styles/MrlButton/global.scss +0 -20
- package/dist/styles/MrlCheckbox/global.scss +0 -7
- package/dist/styles/MrlCheckbox/module.scss +0 -6
- package/dist/styles/MrlCheckbox/variables.scss +1 -7
- package/dist/styles/MrlCheckboxStandalone/global.scss +0 -13
- package/dist/styles/MrlCheckboxStandalone/module.scss +0 -14
- package/dist/styles/MrlCheckboxStandalone/variables.scss +1 -15
- package/dist/styles/MrlDivider/module.scss +0 -13
- package/dist/styles/MrlFieldset/module.scss +0 -5
- package/dist/styles/MrlLabel/module.scss +0 -11
- package/dist/styles/MrlLabel/variables.scss +0 -9
- package/dist/styles/MrlLabelWithDescription/module.scss +0 -17
- package/dist/styles/MrlLabelWithDescription/variables.scss +0 -7
- package/dist/styles/MrlLink/module.scss +0 -26
- package/dist/styles/MrlModal/global.scss +0 -8
- package/dist/styles/MrlModal/mixins.scss +0 -23
- package/dist/styles/MrlModal/module.scss +0 -17
- package/dist/styles/MrlModal/variables.scss +0 -10
- package/dist/styles/MrlModalContent/module.scss +0 -5
- package/dist/styles/MrlModalFooter/global.scss +0 -2
- package/dist/styles/MrlModalFooter/module.scss +0 -11
- package/dist/styles/MrlModalFooter/variables.scss +0 -5
- package/dist/styles/MrlModalHeader/module.scss +0 -7
- package/dist/styles/MrlModalHeaderNative/module.scss +0 -10
- package/dist/styles/MrlRadioButtonStandalone/global.scss +0 -6
- package/dist/styles/MrlRadioButtonStandalone/module.scss +0 -9
- package/dist/styles/MrlRadioButtonStandalone/variables.scss +0 -8
- package/dist/styles/MrlSelect/module.scss +0 -43
- package/dist/styles/MrlSelect/variables.scss +1 -6
- package/dist/styles/MrlSelectItem/module.scss +0 -23
- package/dist/styles/MrlSelectItem/variables.scss +0 -10
- package/dist/styles/MrlSelectMenu/module.scss +1 -17
- package/dist/styles/MrlSelectMenu/variables.scss +0 -5
- package/dist/styles/MrlSmartTable/module.scss +0 -5
- package/dist/styles/MrlSvg/module.scss +0 -11
- package/dist/styles/MrlSvgAnimate/module.scss +0 -9
- package/dist/styles/MrlTable/module.scss +0 -5
- package/dist/styles/MrlTableBody/module.scss +0 -6
- package/dist/styles/MrlTableCell/module.scss +0 -5
- package/dist/styles/MrlTableColumn/module.scss +0 -8
- package/dist/styles/MrlTableEmptyState/module.scss +0 -5
- package/dist/styles/MrlTableHeader/module.scss +0 -5
- package/dist/styles/MrlTableRow/module.scss +0 -6
- package/dist/styles/MrlText/module.scss +0 -6
- package/dist/styles/MrlText/variables.scss +0 -8
- package/dist/styles/MrlTextHeading/module.scss +0 -14
- package/dist/styles/MrlTextHeading/variables.scss +0 -19
- package/dist/styles/MrlTextInput/module.scss +0 -29
- package/dist/styles/MrlTextInput/variables.scss +0 -1
- package/dist/styles/MrlTextarea/global.scss +1 -8
- package/dist/styles/MrlTextarea/module.scss +1 -8
- package/dist/styles/MrlTooltipContent/global.scss +1 -33
- package/dist/styles/MrlTooltipContent/variables.scss +0 -5
- package/dist/styles/button/global.scss +0 -29
- package/dist/styles/button/mixins.scss +0 -31
- package/dist/styles/button/variables.scss +2 -61
- package/dist/styles/divider/mixins.scss +0 -41
- package/dist/styles/divider/variables.scss +0 -12
- package/dist/styles/form/global.scss +0 -56
- package/dist/styles/form/variables.scss +0 -22
- package/dist/styles/grid/variables.scss +0 -11
- package/dist/styles/modal/variables.scss +0 -14
- package/dist/styles/svg/variables.scss +0 -8
- package/dist/styles/table/global.scss +0 -8
- package/dist/styles/table/variables.scss +0 -5
- package/dist/styles/tooltip/mixins.scss +0 -11
- package/package.json +1 -1
|
@@ -1,21 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
/// Tooltip Content styles
|
|
3
|
-
/// @group Tooltip
|
|
4
|
-
////
|
|
5
|
-
///
|
|
1
|
+
|
|
6
2
|
@use 'sass:math';
|
|
7
3
|
@use '~@muraldevkit/ds-foundation/src/styles/contextual-variables/z-index' as *;
|
|
8
|
-
|
|
9
|
-
// Created a couple Sass variables for things that are reused a lot but don't need theming
|
|
10
4
|
$mrl-tooltip-arrow-horizontal-center: calc(50% - var(--mrl-tooltip-arrow-size) / 2);
|
|
11
5
|
$mrl-tooltip-arrow-vertical-center: calc(var(--mrl-tooltip-arrow-size) * -1 / 2 + 1px);
|
|
12
|
-
|
|
13
|
-
// The first number of this calculation needs to match the value of var(--mrl-tooltip-arrow-size)
|
|
14
6
|
$mrl-tooltip-arrow-size: math.hypot(8px, 5px);
|
|
15
|
-
|
|
16
7
|
@use '../tooltip.mixins.scss' as *;
|
|
17
8
|
@use './MrlTooltipContent.variables.scss';
|
|
18
|
-
|
|
19
9
|
.mrl-tooltip-content {
|
|
20
10
|
background: var(--mrl-tooltip-background-color);
|
|
21
11
|
border-radius: var(--mrl-tooltip-border-radius);
|
|
@@ -36,8 +26,6 @@ $mrl-tooltip-arrow-size: math.hypot(8px, 5px);
|
|
|
36
26
|
width: max-content;
|
|
37
27
|
z-index: $mrl-zIndex-tooltips;
|
|
38
28
|
}
|
|
39
|
-
|
|
40
|
-
// Arrow
|
|
41
29
|
.mrl-tooltip-content::after {
|
|
42
30
|
background: transparent;
|
|
43
31
|
border-bottom: $mrl-tooltip-arrow-size solid var(--mrl-tooltip-background-color);
|
|
@@ -48,21 +36,16 @@ $mrl-tooltip-arrow-size: math.hypot(8px, 5px);
|
|
|
48
36
|
transform: rotate(135deg);
|
|
49
37
|
width: 0;
|
|
50
38
|
}
|
|
51
|
-
|
|
52
|
-
// State: Show (Default is hide)
|
|
53
39
|
.mrl-tooltip-content:hover,
|
|
54
40
|
.mrl-tooltip-trigger--active:hover + .mrl-tooltip-content,
|
|
55
41
|
.mrl-tooltip-trigger--active:focus-visible + .mrl-tooltip-content {
|
|
56
42
|
@include mrl-tooltip-show;
|
|
57
43
|
}
|
|
58
|
-
|
|
59
|
-
// Position: Top
|
|
60
44
|
.mrl-tooltip-content[data-position='top'] {
|
|
61
45
|
bottom: 100%;
|
|
62
46
|
margin-bottom: var(--mrl-tooltip-trigger-offset);
|
|
63
47
|
right: 50%;
|
|
64
48
|
transform: translateX(50%);
|
|
65
|
-
|
|
66
49
|
&::after {
|
|
67
50
|
border-bottom-left-radius: var(--mrl-tooltip-arrow-border-radius);
|
|
68
51
|
bottom: $mrl-tooltip-arrow-vertical-center;
|
|
@@ -70,55 +53,43 @@ $mrl-tooltip-arrow-size: math.hypot(8px, 5px);
|
|
|
70
53
|
transform: rotate(315deg);
|
|
71
54
|
}
|
|
72
55
|
}
|
|
73
|
-
|
|
74
56
|
.mrl-tooltip-content[data-anchor='start'] {
|
|
75
57
|
left: 0;
|
|
76
58
|
right: initial;
|
|
77
59
|
transform: none;
|
|
78
|
-
|
|
79
60
|
&::after {
|
|
80
61
|
left: var(--mrl-tooltip-arrow-spacing);
|
|
81
62
|
}
|
|
82
63
|
}
|
|
83
|
-
|
|
84
64
|
.mrl-tooltip-content[data-anchor='end'] {
|
|
85
65
|
right: 0;
|
|
86
66
|
transform: none;
|
|
87
|
-
|
|
88
67
|
&::after {
|
|
89
68
|
left: auto;
|
|
90
69
|
right: var(--mrl-tooltip-arrow-spacing);
|
|
91
70
|
}
|
|
92
71
|
}
|
|
93
|
-
|
|
94
|
-
// Position: Bottom
|
|
95
72
|
.mrl-tooltip-content[data-position='bottom'] {
|
|
96
73
|
margin-top: var(--mrl-tooltip-trigger-offset);
|
|
97
74
|
top: 100%;
|
|
98
|
-
|
|
99
75
|
&::after {
|
|
100
76
|
border-bottom-left-radius: var(--mrl-tooltip-arrow-border-radius);
|
|
101
77
|
top: $mrl-tooltip-arrow-vertical-center;
|
|
102
78
|
}
|
|
103
79
|
}
|
|
104
|
-
|
|
105
80
|
.mrl-tooltip-content[data-position='bottom'][data-anchor='center'] {
|
|
106
81
|
right: 50%;
|
|
107
82
|
transform: translateX(50%);
|
|
108
|
-
|
|
109
83
|
&::after {
|
|
110
84
|
left: calc(50% - var(--mrl-tooltip-arrow-size) / 2);
|
|
111
85
|
}
|
|
112
86
|
}
|
|
113
|
-
|
|
114
|
-
// Position: Left
|
|
115
87
|
.mrl-tooltip-content[data-position='left'] {
|
|
116
88
|
left: initial;
|
|
117
89
|
margin-right: var(--mrl-tooltip-trigger-offset);
|
|
118
90
|
right: 100%;
|
|
119
91
|
top: 50%;
|
|
120
92
|
transform: translateY(-50%);
|
|
121
|
-
|
|
122
93
|
&::after {
|
|
123
94
|
border-top-right-radius: var(--mrl-tooltip-arrow-border-radius);
|
|
124
95
|
display: var(--mrl-tooltip-arrow-display-left-right);
|
|
@@ -126,14 +97,11 @@ $mrl-tooltip-arrow-size: math.hypot(8px, 5px);
|
|
|
126
97
|
top: $mrl-tooltip-arrow-horizontal-center;
|
|
127
98
|
}
|
|
128
99
|
}
|
|
129
|
-
|
|
130
|
-
// Position: Right
|
|
131
100
|
.mrl-tooltip-content[data-position='right'] {
|
|
132
101
|
left: 100%;
|
|
133
102
|
margin-left: var(--mrl-tooltip-trigger-offset);
|
|
134
103
|
top: 50%;
|
|
135
104
|
transform: translateY(-50%);
|
|
136
|
-
|
|
137
105
|
&::after {
|
|
138
106
|
border-bottom-left-radius: var(--mrl-tooltip-arrow-border-radius);
|
|
139
107
|
display: var(--mrl-tooltip-arrow-display-left-right);
|
|
@@ -5,12 +5,7 @@
|
|
|
5
5
|
--mrl-tooltip-font-size: var(--mrl-type-size-text-xsmall);
|
|
6
6
|
--mrl-tooltip-line-height: var(--mrl-type-line-height-text-xsmall);
|
|
7
7
|
--mrl-tooltip-padding: var(--mrl-spacing-02) var(--mrl-spacing-04);
|
|
8
|
-
|
|
9
|
-
// This is the width of the arrow. The height is 5px;
|
|
10
|
-
// Note: If this is changed, the $mrl-tooltip-arrow-size variable calculation also needs updated
|
|
11
8
|
--mrl-tooltip-arrow-size: 8px;
|
|
12
|
-
|
|
13
|
-
// The arrow has an intentional exception for the border radius
|
|
14
9
|
--mrl-tooltip-arrow-border-radius: 1px;
|
|
15
10
|
--mrl-tooltip-arrow-spacing: var(--mrl-spacing-06);
|
|
16
11
|
--mrl-tooltip-arrow-display-left-right: none;
|
|
@@ -1,65 +1,36 @@
|
|
|
1
|
-
////
|
|
2
|
-
/// Common Button component styles
|
|
3
|
-
/// @group button
|
|
4
|
-
////
|
|
5
1
|
|
|
6
2
|
@use '~@muraldevkit/ds-foundation/src/styles/_mixins' as *;
|
|
7
3
|
@use '~@muraldevkit/ds-foundation/src/styles/skeletons/button' as *;
|
|
8
4
|
@use './button.mixins.scss' as *;
|
|
9
|
-
|
|
10
5
|
$mrl-interaction-scope: ':not(#{$mrl-button-toggle-selector}):not([aria-disabled="true"])';
|
|
11
|
-
|
|
12
|
-
// @todo - move display and visibility to common styles or remove :not selectors from
|
|
13
|
-
// the skeleton definition so it doesn't need to be duplicated with the `mrl-button` component
|
|
14
|
-
// which has a different HTML structure.
|
|
15
6
|
.mrlIconButton,
|
|
16
7
|
.mrlButton {
|
|
17
8
|
@include mrl-button-common;
|
|
18
|
-
|
|
19
9
|
display: inline-flex;
|
|
20
|
-
|
|
21
|
-
// required for focus indicator
|
|
22
10
|
position: relative;
|
|
23
11
|
visibility: inherit;
|
|
24
|
-
|
|
25
|
-
// Focus state
|
|
26
12
|
&:focus-visible::after {
|
|
27
13
|
@include mrl-focus-pseudo-element;
|
|
28
14
|
}
|
|
29
|
-
|
|
30
15
|
&--inverse:focus-visible::after,
|
|
31
16
|
&--ghost-inverse:focus-visible::after {
|
|
32
17
|
@include mrl-focus-pseudo-element($color-token: '-inverse');
|
|
33
18
|
}
|
|
34
|
-
|
|
35
|
-
// Hover state for all buttons
|
|
36
19
|
&:hover {
|
|
37
20
|
cursor: pointer;
|
|
38
21
|
}
|
|
39
|
-
|
|
40
|
-
// Disabled state
|
|
41
22
|
&[aria-disabled='true'] {
|
|
42
23
|
@include mrl-button-common-disabled;
|
|
43
24
|
}
|
|
44
|
-
|
|
45
25
|
&[aria-disabled='true']:hover {
|
|
46
26
|
@include mrl-button-common-disabled;
|
|
47
27
|
}
|
|
48
|
-
|
|
49
|
-
// Hover state for non-selected toggle buttons
|
|
50
28
|
&:hover#{$mrl-interaction-scope} {
|
|
51
29
|
@include mrl-button-common-hover;
|
|
52
30
|
}
|
|
53
|
-
|
|
54
|
-
// Active/Pressed state
|
|
55
|
-
// In order for active to work, it has to have a higher CSS specificity than :hover.
|
|
56
|
-
// Adding :active on selected toggle buttons requires a button selector re-architecture.
|
|
57
31
|
&:active#{$mrl-interaction-scope} {
|
|
58
32
|
@include mrl-button-common-active;
|
|
59
33
|
}
|
|
60
|
-
|
|
61
|
-
// Developer-initiated skeleton state
|
|
62
|
-
// Requires additional weight to overwrite other versions of the component
|
|
63
34
|
&--skeleton,
|
|
64
35
|
&--skeleton[aria-disabled='true'] {
|
|
65
36
|
@include mrl-button-skeleton;
|
|
@@ -1,68 +1,37 @@
|
|
|
1
|
-
////
|
|
2
|
-
/// Shared Button mixins
|
|
3
|
-
/// @group button
|
|
4
|
-
////
|
|
5
1
|
|
|
6
2
|
$mrl-button-toggle-selector: '[aria-pressed="true"],[aria-expanded="true"],[aria-selected="true"],[aria-checked="true"]';
|
|
7
|
-
|
|
8
|
-
/// Default motion styles for button components
|
|
9
|
-
/// @group button
|
|
10
3
|
@mixin mrl-button-common-motion() {
|
|
11
4
|
transition: all var(--mrl-duration-03) var(--mrl-timing-m1);
|
|
12
5
|
transition-property: background-color, border-color, color;
|
|
13
6
|
}
|
|
14
|
-
|
|
15
|
-
/// Common default styles for button components
|
|
16
|
-
/// @group button
|
|
17
7
|
@mixin mrl-button-common() {
|
|
18
8
|
background: var(--mrl-button-background-color);
|
|
19
9
|
border: none;
|
|
20
10
|
border-radius: var(--mrl-button-border-radius);
|
|
21
|
-
|
|
22
|
-
// Due to spacing design specs in Classic, we have to use a shadow to
|
|
23
|
-
// create the border for the button
|
|
24
11
|
box-shadow: inset 0 0 0 var(--mrl-button-border-width) var(--mrl-button-border-color);
|
|
25
12
|
color: var(--mrl-button-text-color);
|
|
26
13
|
justify-content: center;
|
|
27
14
|
outline: none;
|
|
28
|
-
|
|
29
|
-
// This adds transition styles when mousing out
|
|
30
15
|
@include mrl-button-common-motion;
|
|
31
16
|
}
|
|
32
|
-
|
|
33
|
-
/// Default styles for button components on hover
|
|
34
|
-
/// @group button
|
|
35
17
|
@mixin mrl-button-common-hover() {
|
|
36
18
|
background: var(--mrl-button-background-color-hover);
|
|
37
19
|
box-shadow: inset 0 0 0 var(--mrl-button-border-width) var(--mrl-button-border-color-hover);
|
|
38
20
|
color: var(--mrl-button-text-color-hover);
|
|
39
21
|
}
|
|
40
|
-
|
|
41
|
-
/// Default styles for button components on active/press
|
|
42
|
-
/// @group button
|
|
43
22
|
@mixin mrl-button-common-active() {
|
|
44
23
|
background: var(--mrl-button-background-color-active);
|
|
45
24
|
box-shadow: inset 0 0 0 var(--mrl-button-border-width) var(--mrl-button-border-color-active);
|
|
46
25
|
color: var(--mrl-button-text-color-active);
|
|
47
26
|
}
|
|
48
|
-
|
|
49
|
-
/// Default styles for button components when disabled
|
|
50
|
-
/// @group button
|
|
51
27
|
@mixin mrl-button-common-disabled() {
|
|
52
28
|
background: var(--mrl-button-background-color-disabled);
|
|
53
29
|
box-shadow: inset 0 0 0 var(--mrl-button-border-width) var(--mrl-button-border-color-disabled);
|
|
54
30
|
color: var(--mrl-button-text-color-disabled);
|
|
55
31
|
cursor: default;
|
|
56
32
|
}
|
|
57
|
-
|
|
58
|
-
/// Styles for before element when the button has an underline/ bottom border
|
|
59
|
-
/// for the toggle style
|
|
60
|
-
/// @group button
|
|
61
|
-
/// @todo - remove this mixin once we verify no one is using it in the product
|
|
62
33
|
@mixin mrl-button-common-selected-underline {
|
|
63
34
|
background: var(--mrl-color-accent);
|
|
64
|
-
|
|
65
|
-
// This is a specific component overwrite
|
|
66
35
|
border-radius: 1px 1px 0 0;
|
|
67
36
|
bottom: calc((var(--mrl-button-underline-width) + var(--mrl-spacing-02)) * -1);
|
|
68
37
|
content: '';
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
////
|
|
2
|
-
/// Button shared variables
|
|
3
|
-
/// @group button
|
|
4
|
-
////
|
|
5
1
|
|
|
6
2
|
@use '~@muraldevkit/ds-foundation/src/styles/skeletons/button' as *;
|
|
7
|
-
|
|
8
3
|
.mrlIconButton,
|
|
9
4
|
.mrlButton {
|
|
10
|
-
// background-color-skeleton, border-radius, and height are all
|
|
11
|
-
// defined in the foundation package under the button skeleton
|
|
12
5
|
--mrl-button-background-color: var(--mrl-color-background);
|
|
13
6
|
--mrl-button-background-color-active: rgba(var(--mrl-gray-30), 1);
|
|
14
7
|
--mrl-button-background-color-disabled: var(--mrl-color-background);
|
|
@@ -23,49 +16,29 @@
|
|
|
23
16
|
--mrl-button-text-color-active: rgba(var(--mrl-black), 1);
|
|
24
17
|
--mrl-button-text-color-disabled: var(--mrl-color-text-disabled);
|
|
25
18
|
--mrl-button-text-color-hover: rgba(var(--mrl-gray-90), 1);
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
--mrl-button-inset-vertical: var(--mrl-spacing-01);
|
|
29
|
-
--mrl-button-inset-horizontal: calc(var(--mrl-space-inset-control-large) + var(--mrl-spacing-01));
|
|
19
|
+
--mrl-button-inset-vertical: 0;
|
|
20
|
+
--mrl-button-inset-horizontal: var(--mrl-space-inset-control-large);
|
|
30
21
|
--mrl-button-icon-margin-right: var(--mrl-space-inline-related);
|
|
31
|
-
|
|
32
|
-
// Size variants need to be defined first as the ghost variant overwrites
|
|
33
|
-
// some of these rules
|
|
34
|
-
|
|
35
22
|
&--small {
|
|
36
23
|
@include mrl-button-size('small');
|
|
37
|
-
|
|
38
|
-
// Note: button height is defined in the button skeleton within ds-foundation
|
|
39
24
|
--mrl-button-icon-size: var(--mrl-spacing-06);
|
|
40
|
-
|
|
41
|
-
// Used for basic buttons only
|
|
42
25
|
--mrl-button-inset-horizontal: var(--mrl-spacing-04);
|
|
43
26
|
}
|
|
44
|
-
|
|
45
27
|
&.mrlIconButton--small {
|
|
46
28
|
@include mrl-button-size('small', true);
|
|
47
|
-
|
|
48
29
|
+ .mrl-tooltip-content {
|
|
49
30
|
--mrl-tooltip-arrow-spacing: calc(
|
|
50
31
|
(#{$mrl-button-height--small} - var(--mrl-tooltip-arrow-size)) / 2
|
|
51
32
|
);
|
|
52
33
|
}
|
|
53
34
|
}
|
|
54
|
-
|
|
55
35
|
&--large {
|
|
56
36
|
@include mrl-button-size('large');
|
|
57
|
-
|
|
58
|
-
// Note: button height is defined in the button skeleton within ds-foundation
|
|
59
|
-
// Used for basic buttons only
|
|
60
37
|
--mrl-button-inset-horizontal: var(--mrl-spacing-05);
|
|
61
38
|
}
|
|
62
|
-
|
|
63
39
|
&.mrlIconButton--large {
|
|
64
40
|
@include mrl-button-size('large', true);
|
|
65
41
|
}
|
|
66
|
-
|
|
67
|
-
// Secondary (default) buttons are the only ones with a visible border, so
|
|
68
|
-
// we want to overwrite these styles for all other kinds
|
|
69
42
|
&.mrlButton--primary,
|
|
70
43
|
&.mrlButton--ghost,
|
|
71
44
|
&.mrlButton--ghost-inverse,
|
|
@@ -77,16 +50,13 @@
|
|
|
77
50
|
--mrl-button-border-color-hover: transparent;
|
|
78
51
|
--mrl-button-border-color-disabled: transparent;
|
|
79
52
|
}
|
|
80
|
-
|
|
81
53
|
&--secondary-native {
|
|
82
54
|
--mrl-button-border-color: transparent;
|
|
83
55
|
--mrl-button-border-color-active: transparent;
|
|
84
56
|
--mrl-button-border-color-hover: transparent;
|
|
85
57
|
--mrl-button-border-color-disabled: transparent;
|
|
86
58
|
}
|
|
87
|
-
|
|
88
59
|
&--primary {
|
|
89
|
-
// Overrides mrl-button styles
|
|
90
60
|
--mrl-button-background-color: var(--mrl-color-brand);
|
|
91
61
|
--mrl-button-background-color-active: var(--mrl-color-brand-active);
|
|
92
62
|
--mrl-button-background-color-disabled: var(--mrl-color-background-disabled);
|
|
@@ -96,7 +66,6 @@
|
|
|
96
66
|
--mrl-button-text-color-disabled: var(--mrl-color-text-inverse);
|
|
97
67
|
--mrl-button-text-color-hover: var(--mrl-color-text-inverse);
|
|
98
68
|
}
|
|
99
|
-
|
|
100
69
|
&--primary-native {
|
|
101
70
|
--mrl-button-background-color: transparent;
|
|
102
71
|
--mrl-button-background-color-active: var(--mrl-black-opacity-01);
|
|
@@ -111,9 +80,7 @@
|
|
|
111
80
|
--mrl-button-text-color-disabled: var(--mrl-black-opacity-03);
|
|
112
81
|
--mrl-button-text-color-hover: rgba(var(--mrl-blue-70), 1);
|
|
113
82
|
}
|
|
114
|
-
|
|
115
83
|
&--ghost {
|
|
116
|
-
// Overrides mrl-button styles
|
|
117
84
|
--mrl-button-background-color: transparent;
|
|
118
85
|
--mrl-button-background-color-active: var(--mrl-black-opacity-01);
|
|
119
86
|
--mrl-button-background-color-hover: var(--mrl-black-opacity-00);
|
|
@@ -122,13 +89,8 @@
|
|
|
122
89
|
--mrl-button-text-color-active: rgba(var(--mrl-gray-100), 1);
|
|
123
90
|
--mrl-button-text-color-disabled: var(--mrl-black-opacity-03);
|
|
124
91
|
--mrl-button-text-color-hover: rgba(var(--mrl-gray-100), 1);
|
|
125
|
-
|
|
126
|
-
// Used for basic buttons only
|
|
127
92
|
--mrl-button-inset-horizontal: calc(var(--mrl-spacing-01) + var(--mrl-spacing-02));
|
|
128
93
|
--mrl-button-icon-margin-right: var(--mrl-spacing-02);
|
|
129
|
-
|
|
130
|
-
// Toggle Button Styles
|
|
131
|
-
// For ghost buttons the selected state is always the same no matter what the toggle-style is
|
|
132
94
|
&[aria-pressed='true'],
|
|
133
95
|
&[aria-checked='true'],
|
|
134
96
|
&[aria-expanded='true'],
|
|
@@ -137,9 +99,7 @@
|
|
|
137
99
|
--mrl-button-text-color: var(--mrl-color-text-inverse);
|
|
138
100
|
}
|
|
139
101
|
}
|
|
140
|
-
|
|
141
102
|
&--ghost-inverse {
|
|
142
|
-
// Overrides mrl-button styles
|
|
143
103
|
--mrl-button-background-color: transparent;
|
|
144
104
|
--mrl-button-background-color-active: var(--mrl-white-opacity-04);
|
|
145
105
|
--mrl-button-background-color-hover: var(--mrl-white-opacity-02);
|
|
@@ -148,17 +108,11 @@
|
|
|
148
108
|
--mrl-button-text-color-active: var(--mrl-color-text-inverse);
|
|
149
109
|
--mrl-button-text-color-hover: var(--mrl-color-text-inverse);
|
|
150
110
|
--mrl-button-text-color-disabled: var(--mrl-white-opacity-04);
|
|
151
|
-
|
|
152
|
-
// Used for basic buttons only
|
|
153
111
|
--mrl-button-inset-horizontal: calc(var(--mrl-spacing-01) + var(--mrl-spacing-02));
|
|
154
112
|
--mrl-button-icon-margin-right: var(--mrl-spacing-02);
|
|
155
|
-
|
|
156
|
-
// Skeleton state for inverse buttons
|
|
157
113
|
&.mrlButton--skeleton {
|
|
158
114
|
--mrl-button-background-color-skeleton: var(--mrl-color-skeleton-inverse);
|
|
159
115
|
}
|
|
160
|
-
|
|
161
|
-
// Default Toggle Button Styles
|
|
162
116
|
&.toggleStyle--default[aria-pressed='true'],
|
|
163
117
|
&.toggleStyle--default[aria-checked='true'],
|
|
164
118
|
&.toggleStyle--default[aria-expanded='true'],
|
|
@@ -166,8 +120,6 @@
|
|
|
166
120
|
--mrl-button-background-color: var(--mrl-color-background);
|
|
167
121
|
--mrl-button-text-color: var(--mrl-color-text);
|
|
168
122
|
}
|
|
169
|
-
|
|
170
|
-
// Secondary Toggle Button Styles
|
|
171
123
|
&.toggleStyle--secondary[aria-pressed='true'],
|
|
172
124
|
&.toggleStyle--secondary[aria-checked='true'],
|
|
173
125
|
&.toggleStyle--secondary[aria-expanded='true'],
|
|
@@ -175,8 +127,6 @@
|
|
|
175
127
|
--mrl-button-background-color: var(--mrl-color-accent);
|
|
176
128
|
--mrl-button-text-color: var(--mrl-color-text-inverse);
|
|
177
129
|
}
|
|
178
|
-
|
|
179
|
-
// Disabled Toggle Button Styles
|
|
180
130
|
&[aria-disabled='true'][aria-pressed='true'],
|
|
181
131
|
&[aria-disabled='true'][aria-checked='true'],
|
|
182
132
|
&[aria-disabled='true'][aria-expanded='true'],
|
|
@@ -185,11 +135,7 @@
|
|
|
185
135
|
--mrl-button-text-color-disabled: var(--mrl-white-opacity-04);
|
|
186
136
|
}
|
|
187
137
|
}
|
|
188
|
-
|
|
189
138
|
&--inverse {
|
|
190
|
-
// Overrides mrl-button styles
|
|
191
|
-
// Currently the inverse button does not follow any standard pattern of colors and
|
|
192
|
-
// requires component overwrites
|
|
193
139
|
--mrl-button-background-color: var(--mrl-color-background);
|
|
194
140
|
--mrl-button-background-color-active: var(--mrl-white-opacity-06);
|
|
195
141
|
--mrl-button-background-color-hover: var(--mrl-white-opacity-08);
|
|
@@ -201,15 +147,10 @@
|
|
|
201
147
|
--mrl-button-text-color: rgba(var(--mrl-gray-100), 1);
|
|
202
148
|
--mrl-button-text-color-active: rgba(var(--mrl-gray-100), 1);
|
|
203
149
|
--mrl-button-text-color-disabled: var(--mrl-black-opacity-03);
|
|
204
|
-
|
|
205
|
-
// Skeleton state for inverse buttons
|
|
206
150
|
&.mrlButton--skeleton {
|
|
207
151
|
--mrl-button-background-color-skeleton: var(--mrl-color-skeleton-inverse);
|
|
208
152
|
}
|
|
209
153
|
}
|
|
210
|
-
|
|
211
|
-
// Disabled Toggle Button Styles
|
|
212
|
-
// -----------------------------------------------------------------------
|
|
213
154
|
&[aria-disabled='true'][aria-pressed='true'],
|
|
214
155
|
&[aria-disabled='true'][aria-checked='true'],
|
|
215
156
|
&[aria-disabled='true'][aria-expanded='true'],
|
|
@@ -1,35 +1,6 @@
|
|
|
1
|
-
////
|
|
2
|
-
/// Divider component mixins
|
|
3
|
-
/// @group divider
|
|
4
|
-
////
|
|
5
1
|
|
|
6
|
-
/// Used to apply a separation between two elements without adding an additional element to the DOM. This is
|
|
7
|
-
/// typically used for things like menus where we don't want to add the DOM elements for accessibility considerations
|
|
8
|
-
/// for screen reader users.
|
|
9
|
-
/// @group mixins
|
|
10
|
-
/// @param {String} $orientation - Defines the orientation of the divider. Available options are: "horizontal" (default)
|
|
11
|
-
/// @param {String} $max-width - Use when the divider should not span the full-width of the container, for example
|
|
12
|
-
/// dividers between stacked Icon Buttons in a toolbar. Set to any valid CSS width value.
|
|
13
|
-
///
|
|
14
|
-
/// @example @include mrl-divider; // Generates the default horizontal divider that spans the full width of the container
|
|
15
|
-
/// @example @include mrl-divider($max-width: 2rem); // Generates a separation that is only 2rems wide and centers it between
|
|
16
|
-
/// the overall container's width
|
|
17
|
-
/// @todo - since this is no longer used in the component implementation, we need to use this in another component (e.g. menu)
|
|
18
|
-
/// or set up Storybook so we can test Sass mixins to ensure this is not breaking
|
|
19
2
|
@mixin mrl-divider($orientation: 'horizontal', $max-width: '') {
|
|
20
|
-
// Note: if you change this CSS before the @todo comment is addressed, you'll need to run the changes in the product to
|
|
21
|
-
// verify nothing breaks
|
|
22
3
|
position: relative;
|
|
23
|
-
|
|
24
|
-
// We use pseudo elements so we can apply this to non-divider elements
|
|
25
|
-
// for better accessibility support
|
|
26
|
-
|
|
27
|
-
// The :before element is used to ensure the proper spacing as margin-top
|
|
28
|
-
// will push content down but margin-bottom does not reflow the content
|
|
29
|
-
|
|
30
|
-
// The :after element is the actual visual divider we display to the user
|
|
31
|
-
// The element that these pseudo elements are applied to is position relative
|
|
32
|
-
|
|
33
4
|
@if $orientation == 'horizontal' {
|
|
34
5
|
&::before {
|
|
35
6
|
content: '';
|
|
@@ -38,7 +9,6 @@
|
|
|
38
9
|
margin-top: calc(var(--mrl-divider-spacing) * 2);
|
|
39
10
|
width: 100%;
|
|
40
11
|
}
|
|
41
|
-
|
|
42
12
|
&::after {
|
|
43
13
|
background-color: var(--mrl-divider-color);
|
|
44
14
|
content: '';
|
|
@@ -47,26 +17,15 @@
|
|
|
47
17
|
position: absolute;
|
|
48
18
|
top: calc(var(--mrl-divider-spacing) * -1);
|
|
49
19
|
width: 100%;
|
|
50
|
-
|
|
51
|
-
/* stylelint-disable-next-line max-nesting-depth */
|
|
52
20
|
@if $max-width != '' {
|
|
53
21
|
@include mrl-divider-center;
|
|
54
|
-
|
|
55
22
|
max-width: $max-width;
|
|
56
23
|
}
|
|
57
24
|
}
|
|
58
25
|
} @else {
|
|
59
|
-
// @todo - the pseudo elements can't push content to the right
|
|
60
|
-
// in order to get the correct spacing
|
|
61
26
|
@warn 'Vertical dividers are not supported as pseudo elements';
|
|
62
27
|
}
|
|
63
28
|
}
|
|
64
|
-
|
|
65
|
-
/// Used to create DRY code for shared styles between the actual divider component and mixin.
|
|
66
|
-
/// This mixin is not intended for external adoption.
|
|
67
|
-
/// @group mixins
|
|
68
|
-
///
|
|
69
|
-
/// @example @include mrl-divider-center; // Adds shared code to your implementation
|
|
70
29
|
@mixin mrl-divider-center() {
|
|
71
30
|
left: 50%;
|
|
72
31
|
transform: translateX(-50%);
|
|
@@ -1,31 +1,19 @@
|
|
|
1
|
-
////
|
|
2
|
-
/// Divider component variables
|
|
3
|
-
/// @group divider
|
|
4
|
-
////
|
|
5
1
|
|
|
6
|
-
// Need to define on both the class and the :root to support usage outside of the component
|
|
7
2
|
:root,
|
|
8
3
|
.MrlDivider {
|
|
9
4
|
--mrl-divider-size: var(--mrl-spacing-01);
|
|
10
5
|
--mrl-divider-spacing: var(--mrl-space-stack-section-divider);
|
|
11
6
|
--mrl-divider-color: var(--mrl-color-line-divider);
|
|
12
7
|
}
|
|
13
|
-
|
|
14
|
-
// Spacing variants (only applies to horizontal dividers)
|
|
15
8
|
.MrlDivider--small {
|
|
16
9
|
--mrl-divider-spacing: var(--mrl-space-stack-section-divider-small);
|
|
17
10
|
}
|
|
18
|
-
|
|
19
11
|
.MrlDivider--large {
|
|
20
12
|
--mrl-divider-spacing: var(--mrl-space-stack-section-divider-large);
|
|
21
13
|
}
|
|
22
|
-
|
|
23
|
-
// Kind variants
|
|
24
14
|
.MrlDivider--inverse {
|
|
25
15
|
--mrl-divider-color: var(--mrl-color-line-divider-inverse);
|
|
26
16
|
}
|
|
27
|
-
|
|
28
|
-
// Orientation variants
|
|
29
17
|
.MrlDivider--vertical {
|
|
30
18
|
--mrl-divider-spacing: var(--mrl-spacing-02);
|
|
31
19
|
}
|
|
@@ -1,124 +1,68 @@
|
|
|
1
|
-
////
|
|
2
|
-
/// Mural's form elements shared styles
|
|
3
|
-
/// @group form-elements
|
|
4
|
-
////
|
|
5
1
|
|
|
6
2
|
@use '~@muraldevkit/ds-foundation/src/styles/_mixins' as *;
|
|
7
3
|
@use '~@muraldevkit/ds-foundation/src/styles/contextual-variables/z-index' as *;
|
|
8
|
-
|
|
9
|
-
/// Shared styles for text-related inputs such as text-input and textarea
|
|
10
|
-
/// There are no configurations for this mixin
|
|
11
|
-
///
|
|
12
|
-
/// @example @include mrl-text-inputs;
|
|
13
|
-
/// @todo - v2 - this is actually used for non-text inputs too. We should rename
|
|
14
|
-
/// it and it corresponding tokens to just `mrl-inputs`
|
|
15
4
|
@mixin mrl-text-inputs {
|
|
16
5
|
@include mrl-text-static('small');
|
|
17
|
-
|
|
18
6
|
background: var(--mrl-text-input-background);
|
|
19
7
|
border-color: var(--mrl-text-input-border-color);
|
|
20
8
|
border-radius: var(--mrl-text-input-border-radius);
|
|
21
9
|
border-style: solid;
|
|
22
10
|
border-width: var(--mrl-text-input-border-width);
|
|
23
11
|
color: var(--mrl-text-input-color);
|
|
24
|
-
|
|
25
|
-
// We have to reset the margin on this component since
|
|
26
|
-
// Safari automatically applies 2 px
|
|
27
12
|
margin: 0;
|
|
28
13
|
min-height: var(--mrl-text-input-height);
|
|
29
14
|
padding: var(--mrl-text-input-inset-vertical) var(--mrl-text-input-inset-horizontal);
|
|
30
15
|
width: 100%;
|
|
31
|
-
|
|
32
|
-
// Need a z-index above 1 which is the focus indicator's z-index to ensure
|
|
33
|
-
// the user can interact with the input as expected
|
|
34
16
|
z-index: $mrl-zIndex-focus + 1;
|
|
35
|
-
|
|
36
17
|
&::placeholder {
|
|
37
18
|
color: var(--mrl-text-input-placeholder-color);
|
|
38
19
|
}
|
|
39
|
-
|
|
40
20
|
&:hover {
|
|
41
21
|
--mrl-text-input-border-color: var(--mrl-text-input-border-color-hover);
|
|
42
22
|
--mrl-text-input-background: var(--mrl-text-input-background-color-hover);
|
|
43
23
|
}
|
|
44
|
-
|
|
45
|
-
// For text inputs, active and focus are the same state
|
|
46
24
|
&:focus {
|
|
47
25
|
--mrl-text-input-border-color: var(--mrl-text-input-border-color-focus);
|
|
48
|
-
|
|
49
26
|
color: var(--mrl-text-input-color-focus);
|
|
50
27
|
}
|
|
51
|
-
|
|
52
|
-
// Specifically turning off the outline here as we have a custom
|
|
53
|
-
// focus indicator
|
|
54
28
|
&:focus-visible {
|
|
55
29
|
outline: none;
|
|
56
30
|
}
|
|
57
|
-
|
|
58
31
|
&:disabled {
|
|
59
32
|
--mrl-text-input-border-color: var(--mrl-text-input-border-color-disabled);
|
|
60
|
-
|
|
61
33
|
color: var(--mrl-text-input-color-disabled);
|
|
62
34
|
pointer-events: none;
|
|
63
35
|
}
|
|
64
|
-
|
|
65
36
|
&:disabled::placeholder {
|
|
66
37
|
color: var(--mrl-text-input-color-disabled);
|
|
67
38
|
}
|
|
68
|
-
|
|
69
39
|
&[aria-invalid='true'] {
|
|
70
40
|
border-color: var(--mrl-color-background-error);
|
|
71
41
|
}
|
|
72
42
|
}
|
|
73
|
-
|
|
74
|
-
/// Shared styles select item icon when it's displayed in the select trigger
|
|
75
|
-
/// There are no configurations for this mixin
|
|
76
|
-
///
|
|
77
|
-
/// @example @include mrl-selectItem-icon;
|
|
78
43
|
@mixin mrl-selectItem-icon {
|
|
79
44
|
flex-basis: fit-content;
|
|
80
45
|
margin-right: var(--mrl-select-item-icon-spacing);
|
|
81
46
|
max-width: var(--mrl-select-item-icon-size);
|
|
82
47
|
}
|
|
83
|
-
|
|
84
|
-
/// @access private
|
|
85
|
-
/// @todo this needs applied to text inputs and textareas once ready from Design
|
|
86
|
-
///
|
|
87
|
-
/// Shared variables for inline kind inputs (select, text input, textarea)
|
|
88
|
-
/// This needs to be in a mixin so we can control where it's rendered in
|
|
89
|
-
/// the CSS ordering
|
|
90
|
-
///
|
|
91
|
-
/// @example @include mrl-inline-input-vars
|
|
92
48
|
@mixin mrl-inline-input-vars {
|
|
93
49
|
--mrl-text-input-border-color: transparent;
|
|
94
50
|
--mrl-text-input-inset-vertical: var(--mrl-spacing-02);
|
|
95
51
|
--mrl-text-input-inset-horizontal: var(--mrl-spacing-03);
|
|
96
52
|
--mrl-text-input-height: var(--mrl-spacing-08);
|
|
97
|
-
|
|
98
53
|
&:hover {
|
|
99
54
|
--mrl-text-input-background-color-hover: var(--mrl-black-opacity-00);
|
|
100
55
|
--mrl-text-input-border-color: transparent;
|
|
101
56
|
}
|
|
102
|
-
|
|
103
57
|
&:focus-visible {
|
|
104
58
|
--mrl-text-input-border-color: transparent;
|
|
105
59
|
}
|
|
106
60
|
}
|
|
107
|
-
|
|
108
|
-
/// Shared styles for standalone checkbox host and checkbox + label wrapper
|
|
109
|
-
/// There are no configurations for this mixin
|
|
110
|
-
///
|
|
111
|
-
/// @example @include mrl-checkbox-wrapper;
|
|
112
61
|
@mixin mrl-checkbox-wrapper {
|
|
113
62
|
height: var(--mrl-checkbox-input-affordance);
|
|
114
63
|
padding: var(--mrl-checkbox-input-inset);
|
|
115
64
|
width: var(--mrl-checkbox-input-affordance);
|
|
116
65
|
}
|
|
117
|
-
|
|
118
|
-
/// Shared styles for checkbox input element
|
|
119
|
-
/// There are no configurations for this mixin
|
|
120
|
-
///
|
|
121
|
-
/// @example @include mrl-checkbox-input;
|
|
122
66
|
@mixin mrl-checkbox-input {
|
|
123
67
|
cursor: pointer;
|
|
124
68
|
height: var(--mrl-checkbox-input-size);
|