@gitlab/ui 89.0.1 → 89.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "89.0.1",
3
+ "version": "89.1.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -11,46 +11,87 @@ See: https://gitlab.com/gitlab-org/gitlab/issues/30055
11
11
  .gl-form-select {
12
12
  @include gl-font-base;
13
13
  @include gl-font-regular;
14
- @include gl-text-gray-900;
15
14
  @include gl-opacity-10;
16
15
  @include gl-line-height-normal;
17
16
  @include gl-py-3;
18
17
  @include gl-pl-4;
19
- padding-right: $gl-spacing-scale-2 + $gl-spacing-scale-6;
20
18
  @include gl-h-auto;
21
- @include gl-inset-border-1-gray-400;
22
- @apply gl-border-none;
23
- appearance: none;
24
19
  @include gl-text-truncate;
25
20
  @include gl-bg-no-repeat;
26
- background-image: url($gl-icon-select-chevron-down);
21
+ @apply gl-border-none;
22
+ appearance: none;
23
+ background-color: var(--gl-control-background-color-default);
24
+ background-image: none;
25
+ box-shadow: inset 0 0 0 $gl-border-size-1 var(--gl-control-border-color-default);
26
+ color: var(--gl-text-color-default);
27
+ padding-right: $gl-spacing-scale-2 + $gl-spacing-scale-6;
28
+ position: relative;
27
29
 
28
30
  @media (forced-colors: active) {
29
31
  box-shadow: none;
30
32
  border: 1px solid;
31
33
  }
32
34
 
35
+ &:hover {
36
+ box-shadow: inset 0 0 0 $gl-border-size-1 var(--gl-control-border-color-hover);
37
+ }
38
+
33
39
  &:focus,
34
40
  &:focus:active {
35
- @include gl-focus($color: $gray-900, $important: true);
41
+ @include gl-focus($color: var(--gl-control-border-color-focus), $important: true);
36
42
  }
37
43
 
38
44
  &:disabled {
39
- @include gl-bg-gray-10;
40
- @include gl-inset-border-1-gray-100;
41
- @include gl-text-gray-500;
42
45
  @include gl-cursor-not-allowed;
46
+ color: var(--gl-text-color-disabled);
47
+ background-color: var(--gl-control-background-color-disabled);
48
+ box-shadow: inset 0 0 0 $gl-border-size-1 var(--gl-control-border-color-disabled);
43
49
  }
44
50
 
45
51
  &.is-invalid:not(:disabled) {
46
- @include gl-inset-border-1-red-400;
52
+ box-shadow: inset 0 0 0 $gl-border-size-1 var(--gl-control-border-color-error);
53
+
54
+ &:hover {
55
+ box-shadow: inset 0 0 0 $gl-border-size-1 var(--gl-control-border-color-error);
56
+ }
47
57
 
48
58
  &:focus {
49
- @include gl-focus($color: $red-500, $important: true);
59
+ @include gl-focus($color: var(--gl-control-border-color-error), $important: true);
50
60
  }
61
+ }
62
+ }
51
63
 
52
- &:hover {
53
- @include gl-inset-border-1-red-500;
64
+ // Chevron dropdown icon
65
+ // References wrapping div because select can't have pseudo elements reliably
66
+ .gl-form-select-wrapper {
67
+ position: relative;
68
+
69
+ &::after {
70
+ content: "";
71
+ background-color: var(--gl-icon-color-default);
72
+ mask-image: url('#{$gl-icon-select-chevron-down}');
73
+ mask-repeat: no-repeat;
74
+ mask-position: center center;
75
+ pointer-events: none;
76
+ position: absolute;
77
+ top: 50%;
78
+ right: $gl-spacing-scale-4;
79
+ transform: translateY(-50%);
80
+ height: 5px;
81
+ width: 8px;
82
+
83
+ @media (forced-colors: active) {
84
+ background-color: CanvasText; // stylelint-disable-line scale-unlimited/declaration-strict-value
85
+ }
86
+ }
87
+
88
+ &:has(>.gl-form-select:disabled) {
89
+ &::after {
90
+ background-color: var(--gl-icon-color-disabled);
91
+
92
+ @media (forced-colors: active) {
93
+ background-color: GrayText; // stylelint-disable-line scale-unlimited/declaration-strict-value
94
+ }
54
95
  }
55
96
  }
56
97
  }
@@ -47,10 +47,12 @@ export default {
47
47
  };
48
48
  </script>
49
49
  <template>
50
- <b-form-select class="gl-form-select" v-bind="$attrs" :class="cssClasses" v-on="$listeners">
51
- <!-- eslint-disable-next-line @gitlab/vue-prefer-dollar-scopedslots -->
52
- <template v-for="slot in Object.keys($slots)" #[slot]>
53
- <slot :name="slot"></slot>
54
- </template>
55
- </b-form-select>
50
+ <div class="gl-form-select-wrapper" :class="cssClasses">
51
+ <b-form-select class="gl-form-select" v-bind="$attrs" v-on="$listeners">
52
+ <!-- eslint-disable-next-line @gitlab/vue-prefer-dollar-scopedslots -->
53
+ <template v-for="slot in Object.keys($slots)" #[slot]>
54
+ <slot :name="slot"></slot>
55
+ </template>
56
+ </b-form-select>
57
+ </div>
56
58
  </template>
@@ -126,12 +126,12 @@
126
126
  top: $gl-spacing-scale-1;
127
127
  @include gl-transition-medium;
128
128
  @include gl-justify-content-center;
129
- @include gl-p-1;
129
+ @include gl-p-2;
130
130
 
131
131
  > svg {
132
- @include gl-w-5;
133
- @include gl-h-5;
134
- @include gl-fill-gray-400;
132
+ @include gl-w-4;
133
+ @include gl-h-4;
134
+ @include gl-fill-gray-600;
135
135
  @include gl-vertical-align-baseline;
136
136
  }
137
137
  }
@@ -105,7 +105,7 @@ export default {
105
105
  ];
106
106
  },
107
107
  icon() {
108
- return this.value ? 'mobile-issue-close' : 'close';
108
+ return this.value ? 'check-xs' : 'close-xs';
109
109
  },
110
110
  helpId() {
111
111
  return this.shouldRenderHelp ? `toggle-help-${this.uuid}` : undefined;
@@ -184,7 +184,7 @@ export default {
184
184
  >
185
185
  <gl-loading-icon v-if="isLoading" color="light" class="toggle-loading" />
186
186
  <span v-else :class="{ 'toggle-icon': true, disabled: disabled }">
187
- <gl-icon :name="icon" :size="16" />
187
+ <gl-icon :name="icon" :size="12" />
188
188
  </span>
189
189
  </button>
190
190
  <span v-if="shouldRenderHelp" :id="helpId" class="gl-help-label" data-testid="toggle-help">