@gitlab/ui 63.4.0 → 64.0.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 (26) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/components/base/new_dropdowns/base_dropdown/base_dropdown.js +76 -25
  3. package/dist/components/base/new_dropdowns/base_dropdown/constants.js +3 -2
  4. package/dist/components/base/new_dropdowns/constants.js +2 -10
  5. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown.js +9 -8
  6. package/dist/components/base/new_dropdowns/listbox/listbox.js +9 -8
  7. package/dist/components/charts/bar/bar.js +8 -5
  8. package/dist/index.css +1 -1
  9. package/dist/index.css.map +1 -1
  10. package/dist/utility_classes.css +1 -1
  11. package/dist/utility_classes.css.map +1 -1
  12. package/package.json +20 -20
  13. package/src/components/base/filtered_search/filtered_search.scss +5 -2
  14. package/src/components/base/new_dropdowns/base_dropdown/base_dropdown.spec.js +97 -58
  15. package/src/components/base/new_dropdowns/base_dropdown/base_dropdown.vue +78 -23
  16. package/src/components/base/new_dropdowns/base_dropdown/constants.js +2 -1
  17. package/src/components/base/new_dropdowns/constants.js +2 -11
  18. package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown.spec.js +10 -4
  19. package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown.vue +9 -7
  20. package/src/components/base/new_dropdowns/dropdown.scss +3 -0
  21. package/src/components/base/new_dropdowns/listbox/listbox.spec.js +10 -4
  22. package/src/components/base/new_dropdowns/listbox/listbox.stories.js +2 -2
  23. package/src/components/base/new_dropdowns/listbox/listbox.vue +8 -6
  24. package/src/components/charts/bar/bar.vue +5 -5
  25. package/src/scss/utilities.scss +10 -0
  26. package/src/scss/utility-mixins/border.scss +6 -0
@@ -11,6 +11,7 @@ import {
11
11
  END,
12
12
  ARROW_DOWN,
13
13
  ARROW_UP,
14
+ GL_DROPDOWN_CONTENTS_CLASS,
14
15
  } from '../constants';
15
16
  import {
16
17
  buttonCategoryOptions,
@@ -300,13 +301,13 @@ export default {
300
301
  default: false,
301
302
  },
302
303
  /**
303
- * Options to be passed to the underlying Popper.js instance.
304
- * Overrides built-in options.
304
+ * Custom offset to be applied to Floating UI's offset middleware.
305
+ * https://floating-ui.com/docs/offset
305
306
  */
306
- popperOptions: {
307
- type: Object,
307
+ dropdownOffset: {
308
+ type: [Number, Object],
308
309
  required: false,
309
- default: () => ({}),
310
+ default: undefined,
310
311
  },
311
312
  /**
312
313
  * Lets the dropdown extend to match its content's width, up to a maximum width
@@ -338,6 +339,7 @@ export default {
338
339
  return {
339
340
  'top-scrim-visible': !this.topBoundaryVisible,
340
341
  'bottom-scrim-visible': !this.bottomBoundaryVisible,
342
+ [GL_DROPDOWN_CONTENTS_CLASS]: true,
341
343
  };
342
344
  },
343
345
  itemTag() {
@@ -705,7 +707,7 @@ export default {
705
707
  :loading="loading"
706
708
  :no-caret="noCaret"
707
709
  :placement="placement"
708
- :popper-options="popperOptions"
710
+ :offset="dropdownOffset"
709
711
  :fluid-width="fluidWidth"
710
712
  @[$options.events.GL_DROPDOWN_SHOWN]="onShow"
711
713
  @[$options.events.GL_DROPDOWN_HIDDEN]="onHide"
@@ -175,12 +175,12 @@ export default {
175
175
  },
176
176
  beforeDestroy() {
177
177
  if (this.chart) {
178
- this.chart.getDom().removeEventListener('mousemove', this.debouncedMoveShowTooltip);
179
- this.chart.getDom().removeEventListener('mouseout', this.debouncedMoveShowTooltip);
178
+ this.chart.getZr().off('mousemove', this.debouncedMoveShowTooltip);
179
+ this.chart.getZr().off('mouseout', this.debouncedMoveShowTooltip);
180
180
  }
181
181
  },
182
182
  methods: {
183
- moveShowTooltip(mouseEvent) {
183
+ moveShowTooltip({ event: mouseEvent }) {
184
184
  this.tooltipPosition = {
185
185
  left: `${mouseEvent.zrX + TOOLTIP_LEFT_OFFSET}px`,
186
186
  top: `${mouseEvent.zrY}px`,
@@ -190,8 +190,8 @@ export default {
190
190
  onCreated(chart) {
191
191
  this.chart = chart;
192
192
  this.$emit('created', chart);
193
- chart.getDom().addEventListener('mousemove', this.debouncedMoveShowTooltip);
194
- chart.getDom().addEventListener('mouseout', this.debouncedMoveShowTooltip);
193
+ chart.getZr().on('mousemove', this.debouncedMoveShowTooltip);
194
+ chart.getZr().on('mouseout', this.debouncedMoveShowTooltip);
195
195
  },
196
196
  onLabelChange(params) {
197
197
  const { yLabels, tooltipContent } = this.getDefaultTooltipContent(params, this.xAxisTitle);
@@ -1693,6 +1693,16 @@
1693
1693
  border-radius: $gl-spacing-scale-4 !important;
1694
1694
  }
1695
1695
 
1696
+ .gl-rounded-left-none {
1697
+ border-top-left-radius: 0;
1698
+ border-bottom-left-radius: 0;
1699
+ }
1700
+
1701
+ .gl-rounded-left-none\! {
1702
+ border-top-left-radius: 0 !important;
1703
+ border-bottom-left-radius: 0 !important;
1704
+ }
1705
+
1696
1706
  .gl-rounded-left-base {
1697
1707
  border-top-left-radius: $gl-border-radius-base;
1698
1708
  border-bottom-left-radius: $gl-border-radius-base;
@@ -383,6 +383,12 @@
383
383
  @mixin gl-rounded-pill {
384
384
  border-radius: $gl-spacing-scale-4;
385
385
  }
386
+
387
+ @mixin gl-rounded-left-none {
388
+ border-top-left-radius: 0;
389
+ border-bottom-left-radius: 0;
390
+ }
391
+
386
392
  @mixin gl-rounded-left-base {
387
393
  border-top-left-radius: $gl-border-radius-base;
388
394
  border-bottom-left-radius: $gl-border-radius-base;