@gitlab/ui 95.1.1 → 95.2.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 (32) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/components/base/datepicker/datepicker.js +24 -1
  3. package/dist/index.css +1 -1
  4. package/dist/index.css.map +1 -1
  5. package/dist/tailwind.css +1 -1
  6. package/dist/tailwind.css.map +1 -1
  7. package/dist/utility_classes.css +1 -1
  8. package/dist/utility_classes.css.map +1 -1
  9. package/package.json +5 -5
  10. package/src/components/base/avatar/avatar.scss +1 -1
  11. package/src/components/base/avatar_link/avatar_link.scss +1 -1
  12. package/src/components/base/banner/banner.scss +1 -1
  13. package/src/components/base/broadcast_message/broadcast_message.scss +1 -1
  14. package/src/components/base/button/button.scss +5 -5
  15. package/src/components/base/datepicker/datepicker.vue +26 -1
  16. package/src/components/base/drawer/drawer.scss +2 -2
  17. package/src/components/base/filtered_search/filtered_search_term.scss +1 -1
  18. package/src/components/base/filtered_search/filtered_search_token_segment.scss +1 -1
  19. package/src/components/base/label/label.scss +1 -1
  20. package/src/components/base/markdown/markdown.scss +12 -12
  21. package/src/components/base/modal/modal.scss +1 -1
  22. package/src/components/base/pagination/pagination.scss +2 -2
  23. package/src/components/base/path/path.scss +1 -1
  24. package/src/components/base/popover/popover.scss +2 -2
  25. package/src/components/base/segmented_control/segmented_control.scss +28 -28
  26. package/src/components/base/toggle/toggle.scss +7 -7
  27. package/src/scss/mixins.scss +16 -1
  28. package/src/scss/storybook.scss +5 -0
  29. package/src/scss/utilities.scss +0 -30
  30. package/src/scss/utility-mixins/animation.scss +0 -15
  31. package/tailwind.defaults.js +1 -0
  32. package/translations.js +2 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## [95.2.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v95.2.0...v95.2.1) (2024-10-08)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **GlDatepicker:** adds tests ([21a6964](https://gitlab.com/gitlab-org/gitlab-ui/commit/21a69648b077fc93f614a89bcf1432717f2e8945))
7
+ * **GlDatepicker:** Bind correct this ([392a6cd](https://gitlab.com/gitlab-org/gitlab-ui/commit/392a6cd192d443e6ca2be6e5cccb409894492126))
8
+ * **GlDatepicker:** Fix accessibility violations ([c753967](https://gitlab.com/gitlab-org/gitlab-ui/commit/c753967ea5a0dc113182f051500983881d579c6e))
9
+ * **GlDatepicker:** format with prettier ([0af6cff](https://gitlab.com/gitlab-org/gitlab-ui/commit/0af6cfff35a997925ee830ce2a0e44b52ea1bac0))
10
+ * **GlDatepicker:** Use translate function for aria-label ([ae13b84](https://gitlab.com/gitlab-org/gitlab-ui/commit/ae13b8412a40ecedf2fbc52247f9ed7a6962b4db))
11
+
12
+ # [95.2.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v95.1.1...v95.2.0) (2024-10-07)
13
+
14
+
15
+ ### Features
16
+
17
+ * **tailwind:** add support for border-color transition ([d1b38c3](https://gitlab.com/gitlab-org/gitlab-ui/commit/d1b38c3175216046901ada5b2b2162c647202b3f))
18
+
1
19
  ## [95.1.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v95.1.0...v95.1.1) (2024-10-05)
2
20
 
3
21
 
@@ -97,6 +115,7 @@ folder.
97
115
 
98
116
  ### Features
99
117
 
118
+
100
119
  * **DesignTokens:** update overlap background color to color.neutral.900 ([e0a8b98](https://gitlab.com/gitlab-org/gitlab-ui/commit/e0a8b98acf0760062495f25b16367c2755d89f62))
101
120
 
102
121
  # [94.5.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v94.4.2...v94.5.0) (2024-10-01)
@@ -5,6 +5,7 @@ import { areDatesEqual } from '../../../utils/datetime_utility';
5
5
  import GlButton from '../button/button';
6
6
  import GlFormInput from '../form/form_input/form_input';
7
7
  import GlIcon from '../icon/icon';
8
+ import { translate } from '../../../utils/i18n';
8
9
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
9
10
 
10
11
  //
@@ -40,6 +41,24 @@ const highlightPastDates = pikaday => {
40
41
  }
41
42
  });
42
43
  };
44
+ const addAccessibleLabels = element => {
45
+ // Pikaday sets `role="heading"`, which requires a corresponding
46
+ // `aria-level`. Ensure we have one.
47
+ const titleEl = element.querySelector('.pika-title[role="heading"]');
48
+ if (titleEl) {
49
+ titleEl.setAttribute('aria-level', 3);
50
+ }
51
+
52
+ // Add aria-label to month & year select dropdowns
53
+ const monthEl = element.querySelector('select.pika-select-month');
54
+ if (monthEl) {
55
+ monthEl.setAttribute('aria-label', translate('GlDatepicker.monthLabel', 'Month'));
56
+ }
57
+ const yearEl = element.querySelector('select.pika-select-year');
58
+ if (yearEl) {
59
+ yearEl.setAttribute('aria-label', translate('GlDatepicker.yearLabel', 'Year'));
60
+ }
61
+ };
43
62
  var script = {
44
63
  name: 'GlDatepicker',
45
64
  components: {
@@ -251,6 +270,7 @@ var script = {
251
270
  },
252
271
  mounted() {
253
272
  const $parentEl = this.$parent.$el;
273
+ const openedEvent = this.opened.bind(this);
254
274
  const drawEvent = this.draw.bind(this);
255
275
  const pikadayConfig = {
256
276
  field: this.$el.querySelector('input[type="text"]'),
@@ -272,7 +292,10 @@ var script = {
272
292
  toString: date => defaultDateFormatter(date),
273
293
  onSelect: this.selected.bind(this),
274
294
  onClose: this.closed.bind(this),
275
- onOpen: this.opened.bind(this),
295
+ onOpen: () => {
296
+ addAccessibleLabels(this.$el);
297
+ openedEvent();
298
+ },
276
299
  onDraw: pikaday => {
277
300
  highlightPastDates(pikaday);
278
301
  drawEvent();