@gitlab/ui 108.2.0 → 108.3.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.
Files changed (31) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/components/base/animated_icon/animated_chevron_right_down_icon.js +1 -1
  3. package/dist/components/base/animated_icon/animated_duo_chat_icon.js +1 -1
  4. package/dist/components/base/animated_icon/animated_loader_icon.js +1 -1
  5. package/dist/components/base/animated_icon/animated_notifications_icon.js +1 -1
  6. package/dist/components/base/animated_icon/animated_sidebar_icon.js +1 -1
  7. package/dist/components/base/animated_icon/animated_smile_icon.js +1 -1
  8. package/dist/components/base/animated_icon/animated_sort_icon.js +1 -1
  9. package/dist/components/base/animated_icon/animated_star_icon.js +1 -1
  10. package/dist/components/base/animated_icon/animated_todo_icon.js +1 -1
  11. package/dist/components/base/animated_icon/animated_upload_icon.js +1 -1
  12. package/dist/components/base/animated_icon/base_animated_icon.js +14 -1
  13. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_group.js +1 -1
  14. package/dist/index.css +1 -1
  15. package/dist/index.css.map +1 -1
  16. package/dist/utils/constants.js +13 -1
  17. package/package.json +4 -4
  18. package/src/components/base/animated_icon/animated_chevron_right_down_icon.vue +1 -1
  19. package/src/components/base/animated_icon/animated_duo_chat_icon.vue +1 -1
  20. package/src/components/base/animated_icon/animated_icon.scss +40 -0
  21. package/src/components/base/animated_icon/animated_loader_icon.vue +1 -1
  22. package/src/components/base/animated_icon/animated_notifications_icon.vue +1 -1
  23. package/src/components/base/animated_icon/animated_sidebar_icon.vue +1 -1
  24. package/src/components/base/animated_icon/animated_smile_icon.vue +1 -1
  25. package/src/components/base/animated_icon/animated_sort_icon.vue +1 -1
  26. package/src/components/base/animated_icon/animated_star_icon.vue +1 -1
  27. package/src/components/base/animated_icon/animated_todo_icon.vue +1 -1
  28. package/src/components/base/animated_icon/animated_upload_icon.vue +1 -1
  29. package/src/components/base/animated_icon/base_animated_icon.vue +15 -1
  30. package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown_group.vue +0 -1
  31. package/src/utils/constants.js +13 -0
@@ -159,6 +159,18 @@ const iconVariantOptions = {
159
159
  danger: 'gl-fill-icon-danger',
160
160
  success: 'gl-fill-icon-success'
161
161
  };
162
+ const animatedIconVariantOptions = {
163
+ current: 'gl-animated-icon-current',
164
+ default: 'gl-animated-icon-default',
165
+ subtle: 'gl-animated-icon-subtle',
166
+ strong: 'gl-animated-icon-strong',
167
+ disabled: 'gl-animated-icon-disabled',
168
+ link: 'gl-animated-icon-link',
169
+ info: 'gl-animated-icon-info',
170
+ warning: 'gl-animated-icon-warning',
171
+ danger: 'gl-animated-icon-danger',
172
+ success: 'gl-animated-icon-success'
173
+ };
162
174
  const triggerVariantOptions = {
163
175
  click: 'click',
164
176
  hover: 'hover',
@@ -299,4 +311,4 @@ const loadingIconVariants = {
299
311
  dots: 'dots'
300
312
  };
301
313
 
302
- export { COMMA, CONTRAST_LEVELS, HEX_REGEX, LEFT_MOUSE_BUTTON, alertVariantIconMap, alertVariantOptions, alignOptions, avatarShapeOptions, avatarSizeOptions, avatarsInlineSizeOptions, badgeForButtonOptions, badgeIconSizeOptions, badgeSizeOptions, badgeVariantOptions, bannerVariants, breadCrumbSizeOptions, buttonCategoryOptions, buttonSizeOptions, buttonVariantOptions, colorThemes, columnOptions, datepickerWidthOptionsMap, defaultDateFormat, drawerVariants, dropdownAllowedAutoPlacements, dropdownItemVariantOptions, dropdownPlacements, dropdownVariantOptions, focusableTags, formInputWidths, formStateOptions, iconSizeOptions, iconVariantOptions, keyboard, labelColorOptions, loadingIconSizes, loadingIconVariants, maxZIndex, modalButtonDefaults, modalSizeOptions, popoverPlacements, progressBarVariantOptions, resizeDebounceTime, tabsButtonDefaults, targetOptions, toggleLabelPosition, tokenVariants, tooltipActionEvents, tooltipDelay, tooltipPlacements, triggerVariantOptions, truncateOptions, variantCssColorMap, viewModeOptions };
314
+ export { COMMA, CONTRAST_LEVELS, HEX_REGEX, LEFT_MOUSE_BUTTON, alertVariantIconMap, alertVariantOptions, alignOptions, animatedIconVariantOptions, avatarShapeOptions, avatarSizeOptions, avatarsInlineSizeOptions, badgeForButtonOptions, badgeIconSizeOptions, badgeSizeOptions, badgeVariantOptions, bannerVariants, breadCrumbSizeOptions, buttonCategoryOptions, buttonSizeOptions, buttonVariantOptions, colorThemes, columnOptions, datepickerWidthOptionsMap, defaultDateFormat, drawerVariants, dropdownAllowedAutoPlacements, dropdownItemVariantOptions, dropdownPlacements, dropdownVariantOptions, focusableTags, formInputWidths, formStateOptions, iconSizeOptions, iconVariantOptions, keyboard, labelColorOptions, loadingIconSizes, loadingIconVariants, maxZIndex, modalButtonDefaults, modalSizeOptions, popoverPlacements, progressBarVariantOptions, resizeDebounceTime, tabsButtonDefaults, targetOptions, toggleLabelPosition, tokenVariants, tooltipActionEvents, tooltipDelay, tooltipPlacements, triggerVariantOptions, truncateOptions, variantCssColorMap, viewModeOptions };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "108.2.0",
3
+ "version": "108.3.1",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -100,10 +100,10 @@
100
100
  "jackspeak": "2.1.1"
101
101
  },
102
102
  "devDependencies": {
103
- "@babel/core": "^7.26.7",
103
+ "@babel/core": "^7.26.8",
104
104
  "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
105
105
  "@babel/plugin-proposal-optional-chaining": "^7.21.0",
106
- "@babel/preset-env": "^7.26.7",
106
+ "@babel/preset-env": "^7.26.8",
107
107
  "@babel/preset-react": "^7.26.3",
108
108
  "@cypress/grep": "^4.0.1",
109
109
  "@gitlab/eslint-plugin": "20.7.1",
@@ -155,7 +155,7 @@
155
155
  "eslint-formatter-gitlab": "^5.1.0",
156
156
  "eslint-import-resolver-jest": "3.0.2",
157
157
  "eslint-plugin-cypress": "3.6.0",
158
- "eslint-plugin-storybook": "0.11.1",
158
+ "eslint-plugin-storybook": "0.11.2",
159
159
  "fuse.js": "^7.0.0",
160
160
  "gitlab-api-async-iterator": "^1.3.1",
161
161
  "glob": "10.3.3",
@@ -8,7 +8,7 @@ export default {
8
8
  </script>
9
9
  <template>
10
10
  <svg
11
- :class="iconStateClass"
11
+ :class="[iconStateClass, iconVariantClass]"
12
12
  :aria-label="ariaLabel"
13
13
  width="16"
14
14
  height="16"
@@ -8,7 +8,7 @@ export default {
8
8
  </script>
9
9
  <template>
10
10
  <svg
11
- :class="iconStateClass"
11
+ :class="[iconStateClass, iconVariantClass]"
12
12
  :aria-label="ariaLabel"
13
13
  width="16"
14
14
  height="16"
@@ -13,6 +13,46 @@
13
13
  }
14
14
  }
15
15
 
16
+ /* * * * * * * * * * * * * * * * *
17
+ * Color variants.
18
+ * * * * * * * * * * * * * * * * */
19
+
20
+ .gl-animated-icon-default {
21
+ color: var(--gl-icon-color-default);
22
+ }
23
+
24
+ .gl-animated-icon-subtle {
25
+ color: var(--gl-icon-color-subtle);
26
+ }
27
+
28
+ .gl-animated-icon-strong {
29
+ color: var(--gl-icon-color-strong);
30
+ }
31
+
32
+ .gl-animated-icon-disabled {
33
+ color: var(--gl-icon-color-disabled);
34
+ }
35
+
36
+ .gl-animated-icon-link {
37
+ color: var(--gl-icon-color-link);
38
+ }
39
+
40
+ .gl-animated-icon-info {
41
+ color: var(--gl-icon-color-info);
42
+ }
43
+
44
+ .gl-animated-icon-warning {
45
+ color: var(--gl-icon-color-warning);
46
+ }
47
+
48
+ .gl-animated-icon-danger {
49
+ color: var(--gl-icon-color-danger);
50
+ }
51
+
52
+ .gl-animated-icon-success {
53
+ color: var(--gl-icon-color-success);
54
+ }
55
+
16
56
  /* * * * * * * * * * * * * * * * *
17
57
  * animated_chevron_right_down_icon.vue
18
58
  * * * * * * * * * * * * * * * * */
@@ -8,7 +8,7 @@ export default {
8
8
  </script>
9
9
  <template>
10
10
  <svg
11
- :class="iconStateClass"
11
+ :class="[iconStateClass, iconVariantClass]"
12
12
  :aria-label="ariaLabel"
13
13
  width="16"
14
14
  height="16"
@@ -8,7 +8,7 @@ export default {
8
8
  </script>
9
9
  <template>
10
10
  <svg
11
- :class="iconStateClass"
11
+ :class="[iconStateClass, iconVariantClass]"
12
12
  :aria-label="ariaLabel"
13
13
  width="16"
14
14
  height="16"
@@ -8,7 +8,7 @@ export default {
8
8
  </script>
9
9
  <template>
10
10
  <svg
11
- :class="iconStateClass"
11
+ :class="[iconStateClass, iconVariantClass]"
12
12
  :aria-label="ariaLabel"
13
13
  width="16"
14
14
  height="16"
@@ -8,7 +8,7 @@ export default {
8
8
  </script>
9
9
  <template>
10
10
  <svg
11
- :class="iconStateClass"
11
+ :class="[iconStateClass, iconVariantClass]"
12
12
  :aria-label="ariaLabel"
13
13
  width="16"
14
14
  height="16"
@@ -8,7 +8,7 @@ export default {
8
8
  </script>
9
9
  <template>
10
10
  <svg
11
- :class="iconStateClass"
11
+ :class="[iconStateClass, iconVariantClass]"
12
12
  class="gl-animated-sort-icon"
13
13
  :aria-label="ariaLabel"
14
14
  width="16"
@@ -8,7 +8,7 @@ export default {
8
8
  </script>
9
9
  <template>
10
10
  <svg
11
- :class="iconStateClass"
11
+ :class="[iconStateClass, iconVariantClass]"
12
12
  :aria-label="ariaLabel"
13
13
  width="16"
14
14
  height="16"
@@ -8,7 +8,7 @@ export default {
8
8
  </script>
9
9
  <template>
10
10
  <svg
11
- :class="iconStateClass"
11
+ :class="[iconStateClass, iconVariantClass]"
12
12
  :aria-label="ariaLabel"
13
13
  width="16"
14
14
  height="16"
@@ -8,7 +8,7 @@ export default {
8
8
  </script>
9
9
  <template>
10
10
  <svg
11
- :class="iconStateClass"
11
+ :class="[iconStateClass, iconVariantClass]"
12
12
  :aria-label="ariaLabel"
13
13
  width="16"
14
14
  height="16"
@@ -1,4 +1,6 @@
1
1
  <script>
2
+ import { animatedIconVariantOptions } from '../../../utils/constants';
3
+
2
4
  export default {
3
5
  name: 'GlBaseAnimatedIcon',
4
6
  props: {
@@ -11,6 +13,15 @@ export default {
11
13
  required: false,
12
14
  default: undefined,
13
15
  },
16
+ /**
17
+ * Icon variant
18
+ */
19
+ variant: {
20
+ type: String,
21
+ required: false,
22
+ default: 'current',
23
+ validator: (value) => Object.keys(animatedIconVariantOptions).includes(value),
24
+ },
14
25
  isOn: {
15
26
  type: Boolean,
16
27
  required: false,
@@ -23,12 +34,15 @@ export default {
23
34
  ? 'gl-animated-icon gl-animated-icon-on'
24
35
  : 'gl-animated-icon gl-animated-icon-off';
25
36
  },
37
+ iconVariantClass() {
38
+ return this.variant ? animatedIconVariantOptions[this.variant] : '';
39
+ },
26
40
  },
27
41
  };
28
42
  </script>
29
43
  <template>
30
44
  <svg
31
- :class="iconStateClass"
45
+ :class="[iconStateClass, iconVariantClass]"
32
46
  :aria-label="ariaLabel"
33
47
  width="16"
34
48
  height="16"
@@ -80,7 +80,6 @@ export default {
80
80
  <div
81
81
  v-if="showHeader"
82
82
  :id="nameId"
83
- aria-hidden="true"
84
83
  class="gl-py-2 gl-pl-4 gl-text-sm gl-font-bold gl-text-strong"
85
84
  >
86
85
  <slot name="group-label">{{ group.name }}</slot>
@@ -190,6 +190,19 @@ export const iconVariantOptions = {
190
190
  success: 'gl-fill-icon-success',
191
191
  };
192
192
 
193
+ export const animatedIconVariantOptions = {
194
+ current: 'gl-animated-icon-current',
195
+ default: 'gl-animated-icon-default',
196
+ subtle: 'gl-animated-icon-subtle',
197
+ strong: 'gl-animated-icon-strong',
198
+ disabled: 'gl-animated-icon-disabled',
199
+ link: 'gl-animated-icon-link',
200
+ info: 'gl-animated-icon-info',
201
+ warning: 'gl-animated-icon-warning',
202
+ danger: 'gl-animated-icon-danger',
203
+ success: 'gl-animated-icon-success',
204
+ };
205
+
193
206
  export const triggerVariantOptions = {
194
207
  click: 'click',
195
208
  hover: 'hover',