@gitlab/ui 53.0.0 → 53.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [53.0.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v53.0.0...v53.0.1) (2023-01-23)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **GlDisclosureDropdown:** Always set button type ([595d6a2](https://gitlab.com/gitlab-org/gitlab-ui/commit/595d6a25835a42425f3a3b68080d70dcf24fbd08))
7
+
1
8
  # [53.0.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v52.13.1...v53.0.0) (2023-01-20)
2
9
 
3
10
 
@@ -26,7 +26,8 @@ var script = {
26
26
  if (this.isActionItem) return {
27
27
  is: 'button',
28
28
  attrs: {
29
- ...this.item.extraAttrs
29
+ ...this.item.extraAttrs,
30
+ type: 'button'
30
31
  },
31
32
  listeners: {
32
33
  click: () => this.item.action()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "53.0.0",
3
+ "version": "53.0.1",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -87,7 +87,7 @@
87
87
  "@gitlab/eslint-plugin": "18.1.0",
88
88
  "@gitlab/fonts": "^1.1.0",
89
89
  "@gitlab/stylelint-config": "4.1.0",
90
- "@gitlab/svgs": "3.16.0",
90
+ "@gitlab/svgs": "3.17.0",
91
91
  "@rollup/plugin-commonjs": "^11.1.0",
92
92
  "@rollup/plugin-node-resolve": "^7.1.3",
93
93
  "@rollup/plugin-replace": "^2.3.2",
@@ -45,7 +45,12 @@ After closing, `GlDisclosureDropdown` emits a `hidden` event.
45
45
  ### Setting disclosure dropdown items
46
46
 
47
47
  Use the `items` prop to provide actions/links to the disclosure dropdown. Each item can be
48
- either an item or a group. Below are the expected shapes of these objects:
48
+ either an item or a group. For `Item`s, either the `href` or the `action` may be null, but not both.
49
+ A <!-- markdownlint-disable-next-line line-length -->
50
+ [validation error](https://gitlab.com/gitlab-org/gitlab-ui/-/blob/6cbff4f908b429cc01f17a4cc2868e881db1aa31/src/components/base/new_dropdowns/disclosure/utils.js#L1)
51
+ will be triggered if neither field is set.
52
+
53
+ Below are the expected shapes of these objects:
49
54
 
50
55
  ```typescript
51
56
  type Item = {
@@ -62,7 +62,7 @@ describe('GlDisclosureDropdownItem', () => {
62
62
  action.mockClear();
63
63
  });
64
64
 
65
- const findButton = () => wrapper.find('button.dropdown-item');
65
+ const findButton = () => wrapper.find('button[type="button"].dropdown-item');
66
66
 
67
67
  it('should render a button', () => {
68
68
  expect(findButton().exists()).toBe(true);
@@ -28,6 +28,7 @@ export default {
28
28
  is: 'button',
29
29
  attrs: {
30
30
  ...this.item.extraAttrs,
31
+ type: 'button',
31
32
  },
32
33
  listeners: {
33
34
  click: () => this.item.action(),