@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.
- package/CHANGELOG.md +14 -0
- package/dist/components/base/filtered_search/filtered_search.js +5 -2
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/tokens/css/tokens.css +1 -1
- package/dist/tokens/css/tokens.dark.css +1 -1
- package/dist/tokens/js/tokens.dark.js +1 -1
- package/dist/tokens/js/tokens.js +1 -1
- package/dist/tokens/scss/_tokens.dark.scss +1 -1
- package/dist/tokens/scss/_tokens.scss +1 -1
- package/package.json +6 -6
- package/src/components/base/drawer/drawer.scss +1 -0
- package/src/components/base/drawer/drawer.stories.js +1 -1
- package/src/components/base/filtered_search/filtered_search.spec.js +19 -0
- package/src/components/base/filtered_search/filtered_search.vue +4 -0
package/dist/tokens/js/tokens.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
// Do not edit directly
|
|
3
|
-
// Generated on
|
|
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
|
|
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
|
|
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": "
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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",
|
|
@@ -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)"
|