@snack-uikit/alert 0.14.0 → 0.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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,26 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 0.15.1 (2024-10-31)
|
|
7
|
+
|
|
8
|
+
### Only dependencies have been changed
|
|
9
|
+
* [@snack-uikit/loaders@0.7.1](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/loaders/CHANGELOG.md)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# 0.15.0 (2024-10-28)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* **FF-5782:** sass use/forward approach ([3e53869](https://github.com/cloud-ru-tech/snack-uikit/commit/3e53869ace864a7718e434b7f410c15dbd911cd5))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
6
26
|
# 0.14.0 (2024-10-28)
|
|
7
27
|
|
|
8
28
|
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"title": "Alert",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.15.1",
|
|
8
8
|
"sideEffects": [
|
|
9
9
|
"*.css",
|
|
10
10
|
"*.woff",
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
"license": "Apache-2.0",
|
|
37
37
|
"scripts": {},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@snack-uikit/icons": "0.
|
|
40
|
-
"@snack-uikit/link": "0.
|
|
41
|
-
"@snack-uikit/loaders": "0.
|
|
42
|
-
"@snack-uikit/truncate-string": "0.
|
|
39
|
+
"@snack-uikit/icons": "0.24.0",
|
|
40
|
+
"@snack-uikit/link": "0.15.0",
|
|
41
|
+
"@snack-uikit/loaders": "0.7.1",
|
|
42
|
+
"@snack-uikit/truncate-string": "0.6.0",
|
|
43
43
|
"@snack-uikit/utils": "3.5.0",
|
|
44
44
|
"classnames": "2.3.2"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "b7163c6f939105eb34cabec64c9e983ac7958c26"
|
|
47
47
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
1
|
+
@use '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-alert';
|
|
2
|
+
@use '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-element';
|
|
3
3
|
|
|
4
4
|
$colors: 'neutral', 'primary', 'red', 'yellow', 'green', 'blue';
|
|
5
5
|
$sizes: 's', 'm';
|
|
@@ -16,28 +16,28 @@ $icons: (
|
|
|
16
16
|
|
|
17
17
|
@each $color in $colors {
|
|
18
18
|
&[data-color='#{$color}'] {
|
|
19
|
-
background-color: simple-var(
|
|
19
|
+
background-color: styles-tokens-alert.simple-var(styles-tokens-alert.$theme-variables, 'sys', $color, 'background');
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
@each $size in $sizes {
|
|
24
24
|
&[data-size='#{$size}'] {
|
|
25
|
-
@include composite-var(
|
|
25
|
+
@include styles-tokens-alert.composite-var(styles-tokens-alert.$alert, $size, 'container');
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.alertOutline {
|
|
31
31
|
outline-style: solid;
|
|
32
|
-
outline-width:
|
|
32
|
+
outline-width: styles-tokens-alert.$border-width-accordion-collapse-block-primary;
|
|
33
33
|
|
|
34
34
|
@each $color in $colors {
|
|
35
35
|
&[data-color='#{$color}'] {
|
|
36
|
-
outline-color: simple-var(
|
|
36
|
+
outline-color: styles-tokens-alert.simple-var(styles-tokens-alert.$theme-variables, 'sys', $color, 'decor-default');
|
|
37
37
|
|
|
38
38
|
&:focus-within,
|
|
39
39
|
&:hover {
|
|
40
|
-
outline-color: simple-var(
|
|
40
|
+
outline-color: styles-tokens-alert.simple-var(styles-tokens-alert.$theme-variables, 'sys', $color, 'decor-default');
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -50,7 +50,7 @@ $icons: (
|
|
|
50
50
|
|
|
51
51
|
@each $size in $sizes {
|
|
52
52
|
&[data-size='#{$size}'] {
|
|
53
|
-
@include composite-var(
|
|
53
|
+
@include styles-tokens-alert.composite-var(styles-tokens-alert.$alert, $size, 'body');
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -58,18 +58,18 @@ $icons: (
|
|
|
58
58
|
.icon {
|
|
59
59
|
@each $color in $colors {
|
|
60
60
|
&[data-color='#{$color}'] {
|
|
61
|
-
color: simple-var(
|
|
61
|
+
color: styles-tokens-alert.simple-var(styles-tokens-alert.$theme-variables, 'sys', $color, 'accent-default');
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
@each $name, $glyph in $icons {
|
|
66
66
|
&[data-size='#{$name}'] {
|
|
67
|
-
width: simple-var(
|
|
68
|
-
height: simple-var(
|
|
67
|
+
width: styles-tokens-alert.simple-var(styles-tokens-element.$icon, $glyph);
|
|
68
|
+
height: styles-tokens-alert.simple-var(styles-tokens-element.$icon, $glyph);
|
|
69
69
|
|
|
70
70
|
svg {
|
|
71
|
-
max-width: simple-var(
|
|
72
|
-
max-height: simple-var(
|
|
71
|
+
max-width: styles-tokens-alert.simple-var(styles-tokens-element.$icon, $glyph);
|
|
72
|
+
max-height: styles-tokens-alert.simple-var(styles-tokens-element.$icon, $glyph);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -83,30 +83,30 @@ $icons: (
|
|
|
83
83
|
|
|
84
84
|
@each $size in $sizes {
|
|
85
85
|
&[data-size='#{$size}'] {
|
|
86
|
-
@include composite-var(
|
|
86
|
+
@include styles-tokens-alert.composite-var(styles-tokens-alert.$alert, $size, 'content-layout');
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
.title {
|
|
92
|
-
color:
|
|
92
|
+
color: styles-tokens-alert.$sys-neutral-text-main;
|
|
93
93
|
|
|
94
94
|
&[data-size='s'] {
|
|
95
|
-
@include composite-var(
|
|
95
|
+
@include styles-tokens-alert.composite-var(styles-tokens-alert.$sans-label-m);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
&[data-size='m'] {
|
|
99
|
-
@include composite-var(
|
|
99
|
+
@include styles-tokens-alert.composite-var(styles-tokens-alert.$sans-title-s);
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
.description {
|
|
104
|
-
color:
|
|
104
|
+
color: styles-tokens-alert.$sys-neutral-text-support;
|
|
105
105
|
word-wrap: break-word;
|
|
106
106
|
|
|
107
107
|
@each $size in $sizes {
|
|
108
108
|
&[data-size='#{$size}'] {
|
|
109
|
-
@include composite-var(
|
|
109
|
+
@include styles-tokens-alert.composite-var(styles-tokens-alert.$theme-variables, 'sans', 'body', $size);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
}
|
|
@@ -122,7 +122,7 @@ $icons: (
|
|
|
122
122
|
|
|
123
123
|
@each $size in $sizes {
|
|
124
124
|
&[data-size='#{$size}'] {
|
|
125
|
-
@include composite-var(
|
|
125
|
+
@include styles-tokens-alert.composite-var(styles-tokens-alert.$alert, $size, 'footer');
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
1
|
+
@use '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-alert-alertTop';
|
|
2
|
+
@use '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-element';
|
|
3
3
|
|
|
4
4
|
$colors: 'invert-neutral', 'primary', 'red', 'yellow', 'green', 'blue';
|
|
5
5
|
|
|
6
6
|
.alertTop {
|
|
7
|
-
@include composite-var(
|
|
7
|
+
@include styles-tokens-alert-alertTop.composite-var(styles-tokens-alert-alertTop.$alert-top-container-container);
|
|
8
8
|
|
|
9
9
|
display: flex;
|
|
10
10
|
justify-content: space-between;
|
|
@@ -13,11 +13,11 @@ $colors: 'invert-neutral', 'primary', 'red', 'yellow', 'green', 'blue';
|
|
|
13
13
|
@each $color in $colors {
|
|
14
14
|
&[data-color='#{$color}'] {
|
|
15
15
|
@if $color == 'invert-neutral' {
|
|
16
|
-
background-color:
|
|
16
|
+
background-color: styles-tokens-alert-alertTop.$sys-invert-neutral-background;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
@else {
|
|
20
|
-
background-color: simple-var(
|
|
20
|
+
background-color: styles-tokens-alert-alertTop.simple-var(styles-tokens-alert-alertTop.$theme-variables, 'sys', $color, 'accent-default');
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -31,50 +31,50 @@ $colors: 'invert-neutral', 'primary', 'red', 'yellow', 'green', 'blue';
|
|
|
31
31
|
@each $color in $colors {
|
|
32
32
|
&[data-color='#{$color}'] {
|
|
33
33
|
@if $color == 'invert-neutral' {
|
|
34
|
-
color:
|
|
34
|
+
color: styles-tokens-alert-alertTop.$sys-invert-neutral-text-main;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
@else {
|
|
38
|
-
color: simple-var(
|
|
38
|
+
color: styles-tokens-alert-alertTop.simple-var(styles-tokens-alert-alertTop.$theme-variables, 'sys', $color, 'on-accent');
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
svg {
|
|
44
|
-
width:
|
|
45
|
-
height:
|
|
44
|
+
width: styles-tokens-element.$icon-s !important; /* stylelint-disable-line declaration-no-important */
|
|
45
|
+
height: styles-tokens-element.$icon-s !important; /* stylelint-disable-line declaration-no-important */
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.title {
|
|
50
|
-
@include composite-var(
|
|
50
|
+
@include styles-tokens-alert-alertTop.composite-var(styles-tokens-alert-alertTop.$sans-title-s);
|
|
51
51
|
|
|
52
52
|
@each $color in $colors {
|
|
53
53
|
&[data-color='#{$color}'] {
|
|
54
54
|
@if $color == 'invert-neutral' {
|
|
55
|
-
color:
|
|
55
|
+
color: styles-tokens-alert-alertTop.$sys-invert-neutral-text-main;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
@else {
|
|
59
|
-
color: simple-var(
|
|
59
|
+
color: styles-tokens-alert-alertTop.simple-var(styles-tokens-alert-alertTop.$theme-variables, 'sys', $color, 'on-accent');
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
.description {
|
|
66
|
-
@include composite-var(
|
|
66
|
+
@include styles-tokens-alert-alertTop.composite-var(styles-tokens-alert-alertTop.$sans-body-m);
|
|
67
67
|
|
|
68
68
|
word-wrap: break-word;
|
|
69
69
|
|
|
70
70
|
@each $color in $colors {
|
|
71
71
|
&[data-color='#{$color}'] {
|
|
72
72
|
@if $color == 'invert-neutral' {
|
|
73
|
-
color:
|
|
73
|
+
color: styles-tokens-alert-alertTop.$sys-invert-neutral-text-main;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
@else {
|
|
77
|
-
color: simple-var(
|
|
77
|
+
color: styles-tokens-alert-alertTop.simple-var(styles-tokens-alert-alertTop.$theme-variables, 'sys', $color, 'on-accent');
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
}
|
|
@@ -82,13 +82,13 @@ $colors: 'invert-neutral', 'primary', 'red', 'yellow', 'green', 'blue';
|
|
|
82
82
|
|
|
83
83
|
.contentWrapper {
|
|
84
84
|
display: flex;
|
|
85
|
-
gap:
|
|
85
|
+
gap: styles-tokens-alert-alertTop.$dimension-2m;
|
|
86
86
|
align-items: center;
|
|
87
87
|
min-width: 0;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
.contentLayout {
|
|
91
|
-
@include composite-var(
|
|
91
|
+
@include styles-tokens-alert-alertTop.composite-var(styles-tokens-alert-alertTop.$alert-top-container-content-layout);
|
|
92
92
|
|
|
93
93
|
display: flex;
|
|
94
94
|
flex-direction: column;
|
|
@@ -101,6 +101,6 @@ $colors: 'invert-neutral', 'primary', 'red', 'yellow', 'green', 'blue';
|
|
|
101
101
|
|
|
102
102
|
.actions {
|
|
103
103
|
display: flex;
|
|
104
|
-
gap:
|
|
104
|
+
gap: styles-tokens-alert-alertTop.$dimension-2m;
|
|
105
105
|
align-items: center;
|
|
106
106
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
3
|
-
@
|
|
1
|
+
@use '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-alert';
|
|
2
|
+
@use '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-alert-alertTop';
|
|
3
|
+
@use '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-element';
|
|
4
4
|
|
|
5
5
|
$simpleAppearances: 'neutral', 'primary', 'red', 'yellow', 'green', 'blue';
|
|
6
6
|
$tonalAppearances: 'invert-neutral', 'primary', 'red', 'yellow', 'green', 'blue';
|
|
@@ -26,7 +26,7 @@ $text: ('s': 'm', 'm': 'l');
|
|
|
26
26
|
.text {
|
|
27
27
|
@each $name, $glyph in $text {
|
|
28
28
|
&[data-size='#{$name}'] {
|
|
29
|
-
@include composite-var(
|
|
29
|
+
@include styles-tokens-alert.composite-var(styles-tokens-alert.$theme-variables, 'sans', 'label', $glyph)
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -36,12 +36,12 @@ $text: ('s': 'm', 'm': 'l');
|
|
|
36
36
|
align-items: center;
|
|
37
37
|
justify-content: center;
|
|
38
38
|
|
|
39
|
-
width:
|
|
40
|
-
height:
|
|
39
|
+
width: styles-tokens-element.$icon-s;
|
|
40
|
+
height: styles-tokens-element.$icon-s;
|
|
41
41
|
|
|
42
42
|
svg {
|
|
43
|
-
max-width:
|
|
44
|
-
max-height:
|
|
43
|
+
max-width: styles-tokens-element.$icon-s;
|
|
44
|
+
max-height: styles-tokens-element.$icon-s;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -56,70 +56,70 @@ $text: ('s': 'm', 'm': 'l');
|
|
|
56
56
|
.alertButton[data-variant='simple'] {
|
|
57
57
|
@each $size in $sizes {
|
|
58
58
|
&[data-size='#{$size}'] {
|
|
59
|
-
@include composite-var(
|
|
59
|
+
@include styles-tokens-alert.composite-var(styles-tokens-alert.$alert, $size, 'button', 'button-action');
|
|
60
60
|
|
|
61
61
|
&[data-icon-only] {
|
|
62
|
-
@include composite-var(
|
|
62
|
+
@include styles-tokens-alert.composite-var(styles-tokens-alert.$alert, $size, 'button', 'button-close');
|
|
63
63
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
&:focus-visible {
|
|
69
|
-
outline-color:
|
|
70
|
-
outline-offset:
|
|
69
|
+
outline-color: styles-tokens-alert.$sys-available-complementary;
|
|
70
|
+
outline-offset: styles-tokens-alert.$spacing-state-focus-offset;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
@each $appearance in $simpleAppearances {
|
|
74
74
|
&[data-appearance='#{$appearance}'] {
|
|
75
|
-
color: simple-var(
|
|
75
|
+
color: styles-tokens-alert.simple-var(styles-tokens-alert.$theme-variables, 'sys', $appearance, 'text-support');
|
|
76
76
|
|
|
77
77
|
&:hover,
|
|
78
78
|
&:focus-visible {
|
|
79
|
-
color: simple-var(
|
|
79
|
+
color: styles-tokens-alert.simple-var(styles-tokens-alert.$theme-variables, 'sys', $appearance, 'text-main');
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
&:active {
|
|
83
|
-
color: simple-var(
|
|
83
|
+
color: styles-tokens-alert.simple-var(styles-tokens-alert.$theme-variables, 'sys', $appearance, 'text-main');
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
.alertButton[data-variant='tonal'] {
|
|
90
|
-
@include composite-var(
|
|
90
|
+
@include styles-tokens-alert.composite-var(styles-tokens-alert-alertTop.$alert-top-button-button-action);
|
|
91
91
|
|
|
92
|
-
background:
|
|
92
|
+
background: styles-tokens-alert.$sys-opacity-enabled;
|
|
93
93
|
|
|
94
94
|
&[data-icon-only] {
|
|
95
|
-
@include composite-var(
|
|
95
|
+
@include styles-tokens-alert.composite-var(styles-tokens-alert-alertTop.$alert-top-button-button-close);
|
|
96
96
|
|
|
97
97
|
background: none;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
&:hover {
|
|
101
101
|
opacity: unset;
|
|
102
|
-
background-color:
|
|
102
|
+
background-color: styles-tokens-alert.$sys-opacity-hovered;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
&:focus-visible {
|
|
106
|
-
@include outline-var(
|
|
106
|
+
@include styles-tokens-alert.outline-var(styles-tokens-element.$container-focused-s);
|
|
107
107
|
|
|
108
|
-
background-color:
|
|
109
|
-
outline-color:
|
|
108
|
+
background-color: styles-tokens-alert.$sys-opacity-hovered;
|
|
109
|
+
outline-color: styles-tokens-alert.$sys-available-on-complementary;
|
|
110
110
|
}
|
|
111
111
|
&:active {
|
|
112
|
-
background-color:
|
|
112
|
+
background-color: styles-tokens-alert.$sys-opacity-activated;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
@each $appearance in $tonalAppearances {
|
|
116
116
|
&[data-appearance='#{$appearance}'] {
|
|
117
117
|
@if $appearance == 'invert-neutral' {
|
|
118
|
-
color: simple-var(
|
|
118
|
+
color: styles-tokens-alert.simple-var(styles-tokens-alert.$theme-variables, 'sys', $appearance, 'text-main');
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
@else {
|
|
122
|
-
color: simple-var(
|
|
122
|
+
color: styles-tokens-alert.simple-var(styles-tokens-alert.$theme-variables, 'sys', $appearance, 'on-accent');
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
}
|