@gitlab/ui 89.6.0 → 89.7.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.
@@ -7,6 +7,35 @@
7
7
  */
8
8
  // stylelint-disable length-zero-no-unit
9
9
  $gl-alert-padding-x: var(--gl-alert-padding-x, 0px);
10
+ $gl-alert-top-border-size: 2px;
11
+
12
+ @mixin gl-alert-variant(
13
+ $variant,
14
+ $background-color,
15
+ $title-color,
16
+ $border-top-color,
17
+ $border-bottom-color,
18
+ $icon-color
19
+ ) {
20
+ .gl-alert-#{$variant} {
21
+ background-color: $background-color;
22
+ border-bottom: 1px solid $border-bottom-color;
23
+
24
+ &::before {
25
+ background: linear-gradient(to right, transparent 0%, $border-top-color 50%, transparent 100%);
26
+ }
27
+
28
+ .gl-alert-title {
29
+ color: $title-color;
30
+ }
31
+
32
+ @media (forced-colors: none) {
33
+ .gl-alert-icon {
34
+ color: $icon-color;
35
+ }
36
+ }
37
+ }
38
+ }
10
39
 
11
40
  .gl-alert {
12
41
  @include gl-font-base;
@@ -15,7 +44,17 @@ $gl-alert-padding-x: var(--gl-alert-padding-x, 0px);
15
44
  @include gl-py-5;
16
45
 
17
46
  @media (forced-colors: active) {
18
- border: 1px solid;
47
+ border: 1px solid transparent;
48
+ }
49
+
50
+ &::before {
51
+ content: "";
52
+ display: block;
53
+ width: 100%;
54
+ height: $gl-alert-top-border-size;
55
+ position: absolute;
56
+ top: -1px; // To accumilate for the border width
57
+ left: 0;
19
58
  }
20
59
 
21
60
  &-not-dismissible {
@@ -80,46 +119,53 @@ $gl-alert-padding-x: var(--gl-alert-padding-x, 0px);
80
119
  // This is the replacement for .gl-alert-dismiss
81
120
  .gl-dismiss-btn {
82
121
  position: absolute;
83
- top: $gl-spacing-scale-4;
122
+ top: calc(#{$gl-spacing-scale-4} + #{$gl-alert-top-border-size});
84
123
  right: calc(#{$gl-spacing-scale-4} + #{$gl-alert-padding-x});
85
124
  }
86
125
 
87
- .gl-alert-danger {
88
- background-color: var(--gl-feedback-danger-background-color);
89
-
90
- .gl-alert-icon {
91
- color: var(--gl-feedback-danger-icon-color);
92
- }
93
- }
94
-
95
- .gl-alert-warning {
96
- background-color: var(--gl-feedback-warning-background-color);
97
-
98
- .gl-alert-icon {
99
- color: var(--gl-feedback-warning-icon-color);
100
- }
101
- }
102
-
103
- .gl-alert-tip {
104
- background-color: var(--gl-feedback-neutral-background-color);
105
-
106
- .gl-alert-icon {
107
- color: var(--gl-feedback-neutral-icon-color);
108
- }
109
- }
110
-
111
- .gl-alert-info {
112
- background-color: var(--gl-feedback-info-background-color);
113
-
114
- .gl-alert-icon {
115
- color: var(--gl-feedback-info-icon-color);
116
- }
117
- }
118
-
119
- .gl-alert-success {
120
- background-color: var(--gl-feedback-success-background-color);
121
-
122
- .gl-alert-icon {
123
- color: var(--gl-feedback-success-icon-color);
124
- }
125
- }
126
+ /* Variants */
127
+
128
+ @include gl-alert-variant(
129
+ $variant: danger,
130
+ $background-color: var(--gl-alert-danger-background-color),
131
+ $title-color: var(--gl-alert-danger-title-color),
132
+ $border-top-color: var(--gl-alert-danger-border-top-color),
133
+ $border-bottom-color: var(--gl-alert-danger-border-bottom-color),
134
+ $icon-color: var(--gl-feedback-danger-icon-color),
135
+ );
136
+
137
+ @include gl-alert-variant(
138
+ $variant: warning,
139
+ $background-color: var(--gl-alert-warning-background-color),
140
+ $title-color: var(--gl-alert-warning-title-color),
141
+ $border-top-color: var(--gl-alert-warning-border-top-color),
142
+ $border-bottom-color: var(--gl-alert-warning-border-bottom-color),
143
+ $icon-color: var(--gl-feedback-warning-icon-color),
144
+ );
145
+
146
+ @include gl-alert-variant(
147
+ $variant: tip,
148
+ $background-color: var(--gl-alert-neutral-background-color),
149
+ $title-color: var(--gl-alert-neutral-title-color),
150
+ $border-top-color: var(--gl-alert-neutral-border-top-color),
151
+ $border-bottom-color: var(--gl-alert-neutral-border-bottom-color),
152
+ $icon-color: var(--gl-feedback-neutral-icon-color),
153
+ );
154
+
155
+ @include gl-alert-variant(
156
+ $variant: info,
157
+ $background-color: var(--gl-alert-info-background-color),
158
+ $title-color: var(--gl-alert-info-title-color),
159
+ $border-top-color: var(--gl-alert-info-border-top-color),
160
+ $border-bottom-color: var(--gl-alert-info-border-bottom-color),
161
+ $icon-color: var(--gl-feedback-info-icon-color),
162
+ );
163
+
164
+ @include gl-alert-variant(
165
+ $variant: success,
166
+ $background-color: var(--gl-alert-success-background-color),
167
+ $title-color: var(--gl-alert-success-title-color),
168
+ $border-top-color: var(--gl-alert-success-border-top-color),
169
+ $border-bottom-color: var(--gl-alert-success-border-bottom-color),
170
+ $icon-color: var(--gl-feedback-success-icon-color),
171
+ );
@@ -9,7 +9,6 @@ import GlAlert from '../../../base/alert/alert.vue';
9
9
  import GlFormInputGroup from '../../../base/form/form_input_group/form_input_group.vue';
10
10
  import GlFormTextarea from '../../../base/form/form_textarea/form_textarea.vue';
11
11
  import GlForm from '../../../base/form/form.vue';
12
- import GlFormText from '../../../base/form/form_text/form_text.vue';
13
12
  import GlExperimentBadge from '../../experiment_badge/experiment_badge.vue';
14
13
  import { badgeTypes, badgeTypeValidator } from '../../experiment_badge/constants';
15
14
  import { SafeHtmlDirective as SafeHtml } from '../../../../directives/safe_html/safe_html';
@@ -55,7 +54,6 @@ export default {
55
54
  GlFormInputGroup,
56
55
  GlFormTextarea,
57
56
  GlForm,
58
- GlFormText,
59
57
  GlExperimentBadge,
60
58
  GlDuoChatLoader,
61
59
  GlDuoChatPredefinedPrompts,
@@ -602,11 +600,12 @@ export default {
602
600
  />
603
601
  </template>
604
602
  </gl-form-input-group>
605
- <gl-form-text
606
- class="gl-mt-3 gl-leading-20 gl-text-gray-400"
603
+ <p
604
+ class="gl-mb-0 gl-mt-3 gl-text-sm gl-leading-20 gl-text-subtle"
607
605
  data-testid="chat-legal-disclaimer"
608
- >{{ $options.i18n.CHAT_LEGAL_DISCLAIMER }}</gl-form-text
609
606
  >
607
+ {{ $options.i18n.CHAT_LEGAL_DISCLAIMER }}
608
+ </p>
610
609
  </gl-form>
611
610
  </footer>
612
611
  </aside>
@@ -664,6 +664,16 @@
664
664
  --gl-avatar-fallback-text-color-red: var(--gl-color-red-800); /* Red text color for avatar fallback with no particular meaning. */
665
665
  --gl-avatar-border-color-hover: var(--gl-color-alpha-dark-24); /* Used to increase the edge definition of an avatar in the hover state. */
666
666
  --gl-avatar-border-color-default: var(--gl-color-alpha-dark-8); /* Used to define the edge of an avatar. */
667
+ --gl-alert-danger-border-bottom-color: var(--gl-color-alpha-0); /* Used for the border bottom color of a danger alert. */
668
+ --gl-alert-danger-border-top-color: var(--gl-color-alpha-0); /* Used for the border color of a danger alert. */
669
+ --gl-alert-warning-border-bottom-color: var(--gl-color-alpha-0); /* Used for the border bottom color of a warning alert. */
670
+ --gl-alert-warning-border-top-color: var(--gl-color-alpha-0); /* Used for the border color of a warning alert. */
671
+ --gl-alert-success-border-bottom-color: var(--gl-color-alpha-0); /* Used for the border bottom color of a success alert. */
672
+ --gl-alert-success-border-top-color: var(--gl-color-alpha-0); /* Used for the border color of a success alert. */
673
+ --gl-alert-info-border-bottom-color: var(--gl-color-alpha-0); /* Used for the border bottom color of an info alert. */
674
+ --gl-alert-info-border-top-color: var(--gl-color-alpha-0); /* Used for the border color of an info alert. */
675
+ --gl-alert-neutral-border-bottom-color: var(--gl-color-alpha-0); /* Used for the border bottom color of a neutral alert. */
676
+ --gl-alert-neutral-border-top-color: var(--gl-color-alpha-0); /* Used for the border center color of a neutral alert. */
667
677
  --gl-border-color-transparent: var(--gl-color-alpha-0); /* Used when a border needs to be present, but not visibly perceived. */
668
678
  --gl-border-color-strong: var(--gl-color-neutral-400); /* Used for a distinct border that emphasizes an edge or boundaries. */
669
679
  --gl-border-color-subtle: var(--gl-color-neutral-50); /* Used for a subtle border in combination with the default background. */
@@ -768,6 +778,16 @@
768
778
  --gl-badge-muted-icon-color-focus: var(--gl-badge-muted-icon-color-hover); /* Used for the icon of a muted badge in the focus state. */
769
779
  --gl-badge-muted-text-color-focus: var(--gl-badge-muted-text-color-hover); /* Used for the text of a muted badge in the focus state. */
770
780
  --gl-badge-muted-background-color-hover: var(--gl-badge-muted-background-color-default); /* Used for the background of a muted badge in the hover state. */
781
+ --gl-alert-danger-background-color: var(--gl-feedback-danger-background-color); /* Used for the background color of a danger alert. */
782
+ --gl-alert-danger-title-color: var(--gl-text-color-heading); /* Used for the title color of a danger alert. */
783
+ --gl-alert-warning-background-color: var(--gl-feedback-warning-background-color); /* Used for the background color of a warning alert. */
784
+ --gl-alert-warning-title-color: var(--gl-text-color-heading); /* Used for the title color of a warning alert. */
785
+ --gl-alert-success-background-color: var(--gl-feedback-success-background-color); /* Used for the background color of a success alert. */
786
+ --gl-alert-success-title-color: var(--gl-text-color-heading); /* Used for the title color of a success alert. */
787
+ --gl-alert-info-background-color: var(--gl-feedback-info-background-color); /* Used for the background color of an info alert. */
788
+ --gl-alert-info-title-color: var(--gl-text-color-heading); /* Used for the title color of an info alert. */
789
+ --gl-alert-neutral-background-color: var(--gl-feedback-neutral-background-color); /* Used for the background color of a neutral alert. */
790
+ --gl-alert-neutral-title-color: var(--gl-text-color-heading); /* Used for the title color of a neutral alert. */
771
791
  --gl-action-strong-neutral-border-color-hover: var(--gl-action-strong-neutral-border-color-default); /* Used for the border of a strong neutral action in the hover state. */
772
792
  --gl-action-strong-neutral-foreground-color-hover: var(--gl-action-strong-neutral-foreground-color-default); /* Used for the foreground of a strong neutral action in the hover state. */
773
793
  --gl-action-strong-neutral-background-color-focus: var(--gl-action-strong-neutral-background-color-hover); /* Used for the background of a strong neutral action in the focus state. */
@@ -664,6 +664,16 @@
664
664
  --gl-avatar-fallback-text-color-red: var(--gl-color-red-200); /* Red text color for avatar fallback with no particular meaning. */
665
665
  --gl-avatar-border-color-hover: var(--gl-color-alpha-light-24); /* Used to increase the edge definition of an avatar in the hover state. */
666
666
  --gl-avatar-border-color-default: var(--gl-color-alpha-light-8); /* Used to define the edge of an avatar. */
667
+ --gl-alert-danger-border-bottom-color: var(--gl-color-neutral-800); /* Used for the border bottom color of a danger alert. */
668
+ --gl-alert-danger-border-top-color: var(--gl-color-red-400); /* Used for the border color of a danger alert. */
669
+ --gl-alert-warning-border-bottom-color: var(--gl-color-neutral-800); /* Used for the border bottom color of a warning alert. */
670
+ --gl-alert-warning-border-top-color: var(--gl-color-orange-400); /* Used for the border color of a warning alert. */
671
+ --gl-alert-success-border-bottom-color: var(--gl-color-neutral-800); /* Used for the border bottom color of a success alert. */
672
+ --gl-alert-success-border-top-color: var(--gl-color-green-400); /* Used for the border color of a success alert. */
673
+ --gl-alert-info-border-bottom-color: var(--gl-color-neutral-800); /* Used for the border bottom color of an info alert. */
674
+ --gl-alert-info-border-top-color: var(--gl-color-blue-400); /* Used for the border color of an info alert. */
675
+ --gl-alert-neutral-border-bottom-color: var(--gl-color-neutral-800); /* Used for the border bottom color of a neutral alert. */
676
+ --gl-alert-neutral-border-top-color: var(--gl-color-neutral-400); /* Used for the border center color of a neutral alert. */
667
677
  --gl-border-color-transparent: var(--gl-color-alpha-0); /* Used when a border needs to be present, but not visibly perceived. */
668
678
  --gl-border-color-strong: var(--gl-color-neutral-400); /* Used for a distinct border that emphasizes an edge or boundaries. */
669
679
  --gl-border-color-subtle: var(--gl-color-neutral-900); /* Used for a subtle border in combination with the default background. */
@@ -768,6 +778,16 @@
768
778
  --gl-badge-muted-icon-color-focus: var(--gl-badge-muted-icon-color-hover); /* Used for the icon of a muted badge in the focus state. */
769
779
  --gl-badge-muted-text-color-focus: var(--gl-badge-muted-text-color-hover); /* Used for the text of a muted badge in the focus state. */
770
780
  --gl-badge-muted-background-color-hover: var(--gl-badge-muted-background-color-default); /* Used for the background of a muted badge in the hover state. */
781
+ --gl-alert-danger-background-color: var(--gl-background-color-subtle); /* Used for the background color of a danger alert. */
782
+ --gl-alert-danger-title-color: var(--gl-color-red-300); /* Used for the title color of a danger alert. */
783
+ --gl-alert-warning-background-color: var(--gl-background-color-subtle); /* Used for the background color of a warning alert. */
784
+ --gl-alert-warning-title-color: var(--gl-color-orange-300); /* Used for the title color of a warning alert. */
785
+ --gl-alert-success-background-color: var(--gl-background-color-subtle); /* Used for the background color of a success alert. */
786
+ --gl-alert-success-title-color: var(--gl-color-green-300); /* Used for the title color of a success alert. */
787
+ --gl-alert-info-background-color: var(--gl-background-color-subtle); /* Used for the background color of an info alert. */
788
+ --gl-alert-info-title-color: var(--gl-color-blue-300); /* Used for the title color of an info alert. */
789
+ --gl-alert-neutral-background-color: var(--gl-feedback-neutral-background-color); /* Used for the background color of a neutral alert. */
790
+ --gl-alert-neutral-title-color: var(--gl-text-color-heading); /* Used for the title color of a neutral alert. */
771
791
  --gl-action-strong-neutral-border-color-hover: var(--gl-action-strong-neutral-border-color-default); /* Used for the border of a strong neutral action in the hover state. */
772
792
  --gl-action-strong-neutral-foreground-color-hover: var(--gl-action-strong-neutral-foreground-color-default); /* Used for the foreground of a strong neutral action in the hover state. */
773
793
  --gl-action-strong-neutral-background-color-focus: var(--gl-action-strong-neutral-background-color-hover); /* Used for the background of a strong neutral action in the focus state. */
@@ -301,6 +301,26 @@ export const DATA_VIZ_ORANGE_700 = '#e99b60';
301
301
  export const DATA_VIZ_ORANGE_800 = '#eebd8c';
302
302
  export const DATA_VIZ_ORANGE_900 = '#f5d6b3';
303
303
  export const DATA_VIZ_ORANGE_950 = '#fae8d1';
304
+ export const GL_ALERT_NEUTRAL_TITLE_COLOR = '#fff'; // Used for the title color of a neutral alert.
305
+ export const GL_ALERT_NEUTRAL_BACKGROUND_COLOR = '#28272d'; // Used for the background color of a neutral alert.
306
+ export const GL_ALERT_NEUTRAL_BORDER_TOP_COLOR = '#89888d'; // Used for the border center color of a neutral alert.
307
+ export const GL_ALERT_NEUTRAL_BORDER_BOTTOM_COLOR = '#3a383f'; // Used for the border bottom color of a neutral alert.
308
+ export const GL_ALERT_INFO_TITLE_COLOR = '#63a6e9'; // Used for the title color of an info alert.
309
+ export const GL_ALERT_INFO_BACKGROUND_COLOR = '#28272d'; // Used for the background color of an info alert.
310
+ export const GL_ALERT_INFO_BORDER_TOP_COLOR = '#428fdc'; // Used for the border color of an info alert.
311
+ export const GL_ALERT_INFO_BORDER_BOTTOM_COLOR = '#3a383f'; // Used for the border bottom color of an info alert.
312
+ export const GL_ALERT_SUCCESS_TITLE_COLOR = '#52b87a'; // Used for the title color of a success alert.
313
+ export const GL_ALERT_SUCCESS_BACKGROUND_COLOR = '#28272d'; // Used for the background color of a success alert.
314
+ export const GL_ALERT_SUCCESS_BORDER_TOP_COLOR = '#2da160'; // Used for the border color of a success alert.
315
+ export const GL_ALERT_SUCCESS_BORDER_BOTTOM_COLOR = '#3a383f'; // Used for the border bottom color of a success alert.
316
+ export const GL_ALERT_WARNING_TITLE_COLOR = '#d99530'; // Used for the title color of a warning alert.
317
+ export const GL_ALERT_WARNING_BACKGROUND_COLOR = '#28272d'; // Used for the background color of a warning alert.
318
+ export const GL_ALERT_WARNING_BORDER_TOP_COLOR = '#c17d10'; // Used for the border color of a warning alert.
319
+ export const GL_ALERT_WARNING_BORDER_BOTTOM_COLOR = '#3a383f'; // Used for the border bottom color of a warning alert.
320
+ export const GL_ALERT_DANGER_TITLE_COLOR = '#f57f6c'; // Used for the title color of a danger alert.
321
+ export const GL_ALERT_DANGER_BACKGROUND_COLOR = '#28272d'; // Used for the background color of a danger alert.
322
+ export const GL_ALERT_DANGER_BORDER_TOP_COLOR = '#ec5941'; // Used for the border color of a danger alert.
323
+ export const GL_ALERT_DANGER_BORDER_BOTTOM_COLOR = '#3a383f'; // Used for the border bottom color of a danger alert.
304
324
  export const GL_AVATAR_BORDER_COLOR_DEFAULT = 'rgba(255, 255, 255, 0.08)'; // Used to define the edge of an avatar.
305
325
  export const GL_AVATAR_BORDER_COLOR_HOVER = 'rgba(255, 255, 255, 0.24)'; // Used to increase the edge definition of an avatar in the hover state.
306
326
  export const GL_AVATAR_FALLBACK_TEXT_COLOR_RED = '#fcb5aa'; // Red text color for avatar fallback with no particular meaning.
@@ -301,6 +301,26 @@ export const DATA_VIZ_ORANGE_700 = '#92430a';
301
301
  export const DATA_VIZ_ORANGE_800 = '#6f3500';
302
302
  export const DATA_VIZ_ORANGE_900 = '#5e2f05';
303
303
  export const DATA_VIZ_ORANGE_950 = '#4b2707';
304
+ export const GL_ALERT_NEUTRAL_TITLE_COLOR = '#18171d'; // Used for the title color of a neutral alert.
305
+ export const GL_ALERT_NEUTRAL_BACKGROUND_COLOR = '#ececef'; // Used for the background color of a neutral alert.
306
+ export const GL_ALERT_NEUTRAL_BORDER_TOP_COLOR = 'transparent'; // Used for the border center color of a neutral alert.
307
+ export const GL_ALERT_NEUTRAL_BORDER_BOTTOM_COLOR = 'transparent'; // Used for the border bottom color of a neutral alert.
308
+ export const GL_ALERT_INFO_TITLE_COLOR = '#18171d'; // Used for the title color of an info alert.
309
+ export const GL_ALERT_INFO_BACKGROUND_COLOR = '#e9f3fc'; // Used for the background color of an info alert.
310
+ export const GL_ALERT_INFO_BORDER_TOP_COLOR = 'transparent'; // Used for the border color of an info alert.
311
+ export const GL_ALERT_INFO_BORDER_BOTTOM_COLOR = 'transparent'; // Used for the border bottom color of an info alert.
312
+ export const GL_ALERT_SUCCESS_TITLE_COLOR = '#18171d'; // Used for the title color of a success alert.
313
+ export const GL_ALERT_SUCCESS_BACKGROUND_COLOR = '#ecf4ee'; // Used for the background color of a success alert.
314
+ export const GL_ALERT_SUCCESS_BORDER_TOP_COLOR = 'transparent'; // Used for the border color of a success alert.
315
+ export const GL_ALERT_SUCCESS_BORDER_BOTTOM_COLOR = 'transparent'; // Used for the border bottom color of a success alert.
316
+ export const GL_ALERT_WARNING_TITLE_COLOR = '#18171d'; // Used for the title color of a warning alert.
317
+ export const GL_ALERT_WARNING_BACKGROUND_COLOR = '#fdf1dd'; // Used for the background color of a warning alert.
318
+ export const GL_ALERT_WARNING_BORDER_TOP_COLOR = 'transparent'; // Used for the border color of a warning alert.
319
+ export const GL_ALERT_WARNING_BORDER_BOTTOM_COLOR = 'transparent'; // Used for the border bottom color of a warning alert.
320
+ export const GL_ALERT_DANGER_TITLE_COLOR = '#18171d'; // Used for the title color of a danger alert.
321
+ export const GL_ALERT_DANGER_BACKGROUND_COLOR = '#fcf1ef'; // Used for the background color of a danger alert.
322
+ export const GL_ALERT_DANGER_BORDER_TOP_COLOR = 'transparent'; // Used for the border color of a danger alert.
323
+ export const GL_ALERT_DANGER_BORDER_BOTTOM_COLOR = 'transparent'; // Used for the border bottom color of a danger alert.
304
324
  export const GL_AVATAR_BORDER_COLOR_DEFAULT = 'rgba(05, 05, 06, 0.08)'; // Used to define the edge of an avatar.
305
325
  export const GL_AVATAR_BORDER_COLOR_HOVER = 'rgba(05, 05, 06, 0.24)'; // Used to increase the edge definition of an avatar in the hover state.
306
326
  export const GL_AVATAR_FALLBACK_TEXT_COLOR_RED = '#8d1300'; // Red text color for avatar fallback with no particular meaning.