@gitlab/ui 80.0.1 → 80.2.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.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 02 May 2024 10:07:41 GMT
3
+ * Generated on Fri, 03 May 2024 22:13:37 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 02 May 2024 10:07:41 GMT
3
+ * Generated on Fri, 03 May 2024 22:13:37 GMT
4
4
  */
5
5
 
6
6
  :root.gl-dark {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 02 May 2024 10:07:41 GMT
3
+ * Generated on Fri, 03 May 2024 22:13:37 GMT
4
4
  */
5
5
 
6
6
  export const DATA_VIZ_GREEN_50 = "#133a03";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 02 May 2024 10:07:41 GMT
3
+ * Generated on Fri, 03 May 2024 22:13:37 GMT
4
4
  */
5
5
 
6
6
  export const DATA_VIZ_GREEN_50 = "#ddfab7";
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Thu, 02 May 2024 10:07:41 GMT
3
+ // Generated on Fri, 03 May 2024 22:13:37 GMT
4
4
 
5
5
  $gl-text-color-disabled: #89888d !default; // Used for disabled text.
6
6
  $gl-text-color-link: #63a6e9 !default; // Used for default text links.
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Thu, 02 May 2024 10:07:41 GMT
3
+ // Generated on Fri, 03 May 2024 22:13:37 GMT
4
4
 
5
5
  $gl-text-color-disabled: #89888d !default; // Used for disabled text.
6
6
  $gl-text-color-success: #217645 !default; // Used for text indicating success or validity.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "80.0.1",
3
+ "version": "80.2.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -80,7 +80,7 @@
80
80
  "peerDependencies": {
81
81
  "@gitlab/svgs": "^1.116.0 || ^2.0.0 || ^3.0.0",
82
82
  "bootstrap": ">=4.5.3 <=4.6.2",
83
- "dompurify": "^2.4.7 || ^3.0.5",
83
+ "dompurify": ">=2.5.2 <3.0.0 || >=3.1.2",
84
84
  "emoji-regex": ">=10.0.0",
85
85
  "pikaday": "^1.8.0",
86
86
  "tailwindcss": "^3",
@@ -93,10 +93,10 @@
93
93
  },
94
94
  "devDependencies": {
95
95
  "@arkweid/lefthook": "0.7.7",
96
- "@babel/core": "^7.24.4",
96
+ "@babel/core": "^7.24.5",
97
97
  "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
98
98
  "@babel/plugin-proposal-optional-chaining": "^7.21.0",
99
- "@babel/preset-env": "^7.24.4",
99
+ "@babel/preset-env": "^7.24.5",
100
100
  "@babel/preset-react": "^7.24.1",
101
101
  "@cypress/grep": "^4.0.1",
102
102
  "@gitlab/eslint-plugin": "19.5.0",
@@ -134,11 +134,11 @@
134
134
  "cypress": "13.8.1",
135
135
  "cypress-axe": "^1.4.0",
136
136
  "cypress-real-events": "^1.11.0",
137
- "dompurify": "^3.0.0",
137
+ "dompurify": "^3.1.2",
138
138
  "emoji-regex": "^10.0.0",
139
139
  "eslint": "8.57.0",
140
140
  "eslint-import-resolver-jest": "3.0.2",
141
- "eslint-plugin-cypress": "3.0.0",
141
+ "eslint-plugin-cypress": "3.0.3",
142
142
  "eslint-plugin-storybook": "0.8.0",
143
143
  "glob": "10.3.3",
144
144
  "identity-obj-proxy": "^3.0.0",
@@ -100,6 +100,7 @@ $gl-drawer-scrim-gradient: linear-gradient(to bottom, $transparent-rgba, $white)
100
100
  }
101
101
 
102
102
  .gl-drawer-close-button {
103
+ @include gl-align-self-start;
103
104
  @include gl-bg-none;
104
105
  @include gl-border-none;
105
106
  }
@@ -144,7 +144,7 @@ export const WithActions = (_args, { viewMode }) => ({
144
144
  <gl-button @click="toggle">Toggle Drawer</gl-button>
145
145
  ${createSidebarTemplate(`
146
146
  <template #title>
147
- <h3>custom-network-policy</h3>
147
+ <h3>custom-network-policy multiple lines headline</h3>
148
148
  </template>
149
149
  <template #header>
150
150
  <div class="gl-mt-5">
@@ -25,6 +25,11 @@ const FakeToken = avoidReactivity({
25
25
  render: (h) => h('div'),
26
26
  });
27
27
 
28
+ const AppliedTokensTestFakeToken = avoidReactivity({
29
+ props: ['appliedTokens'],
30
+ render: (h) => h('div'),
31
+ });
32
+
28
33
  Vue.directive('GlTooltip', () => {});
29
34
 
30
35
  let wrapper;
@@ -475,6 +480,20 @@ describe('Filtered search', () => {
475
480
  );
476
481
  });
477
482
 
483
+ it('passes appliedTokens prop to the token component', async () => {
484
+ const value = [{ type: 'faketoken', value: 'foo' }];
485
+ const expectedAppliedTokens = [{ type: 'faketoken', value: 'foo', id: expect.anything() }];
486
+ createComponent({
487
+ value,
488
+ availableTokens: [{ type: 'faketoken', token: AppliedTokensTestFakeToken }],
489
+ });
490
+ await nextTick();
491
+
492
+ const fakeTokenInstance = wrapper.findComponent(AppliedTokensTestFakeToken);
493
+ expect(fakeTokenInstance.exists()).toBe(true);
494
+ expect(fakeTokenInstance.props('appliedTokens')).toEqual(expectedAppliedTokens);
495
+ });
496
+
478
497
  it('passes `searchButtonAttributes` prop to `GlSearchBoxByClick`', () => {
479
498
  const searchButtonAttributes = { 'data-prop': 'foo-bar' };
480
499
 
@@ -183,6 +183,9 @@ export default {
183
183
  activeToken() {
184
184
  return this.tokens[this.activeTokenIdx];
185
185
  },
186
+ appliedTokens() {
187
+ return this.tokens.filter((token) => !isEmptyTerm(token));
188
+ },
186
189
  lastTokenIdx() {
187
190
  return this.tokens.length - 1;
188
191
  },
@@ -433,6 +436,7 @@ export default {
433
436
  :is-last-token="isLastToken(idx)"
434
437
  :class="getTokenClassList(idx)"
435
438
  :search-text-option-label="searchTextOptionLabel"
439
+ :applied-tokens="appliedTokens"
436
440
  @activate="activate(idx)"
437
441
  @deactivate="deactivate(token)"
438
442
  @destroy="destroyToken(idx, $event)"