@gitlab/ui 55.2.0 → 55.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.
- package/CHANGELOG.md +7 -0
- package/dist/components/base/form/form_group/form_group.js +2 -4
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/package.json +13 -13
- package/src/components/base/form/form_group/form_group.scss +3 -2
- package/src/components/base/form/form_group/form_group.vue +2 -4
- package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown.stories.js +17 -51
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "55.2.
|
|
3
|
+
"version": "55.2.1",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -87,18 +87,18 @@
|
|
|
87
87
|
"@gitlab/eslint-plugin": "18.1.0",
|
|
88
88
|
"@gitlab/fonts": "^1.2.0",
|
|
89
89
|
"@gitlab/stylelint-config": "4.1.0",
|
|
90
|
-
"@gitlab/svgs": "3.
|
|
90
|
+
"@gitlab/svgs": "3.20.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",
|
|
94
|
-
"@storybook/addon-a11y": "6.5.
|
|
95
|
-
"@storybook/addon-docs": "6.5.
|
|
96
|
-
"@storybook/addon-essentials": "6.5.
|
|
97
|
-
"@storybook/addon-storyshots": "6.5.
|
|
98
|
-
"@storybook/addon-storyshots-puppeteer": "6.5.
|
|
99
|
-
"@storybook/addon-viewport": "6.5.
|
|
100
|
-
"@storybook/theming": "6.5.
|
|
101
|
-
"@storybook/vue": "6.5.
|
|
94
|
+
"@storybook/addon-a11y": "6.5.16",
|
|
95
|
+
"@storybook/addon-docs": "6.5.16",
|
|
96
|
+
"@storybook/addon-essentials": "6.5.16",
|
|
97
|
+
"@storybook/addon-storyshots": "6.5.16",
|
|
98
|
+
"@storybook/addon-storyshots-puppeteer": "6.5.16",
|
|
99
|
+
"@storybook/addon-viewport": "6.5.16",
|
|
100
|
+
"@storybook/theming": "6.5.16",
|
|
101
|
+
"@storybook/vue": "6.5.16",
|
|
102
102
|
"@vue/compat": "^3.2.40",
|
|
103
103
|
"@vue/compiler-sfc": "^3.2.40",
|
|
104
104
|
"@vue/test-utils": "1.3.0",
|
|
@@ -123,9 +123,9 @@
|
|
|
123
123
|
"glob": "^7.2.0",
|
|
124
124
|
"identity-obj-proxy": "^3.0.0",
|
|
125
125
|
"inquirer-select-directory": "^1.2.0",
|
|
126
|
-
"jest": "^29.4.
|
|
127
|
-
"jest-circus": "29.4.
|
|
128
|
-
"jest-environment-jsdom": "29.4.
|
|
126
|
+
"jest": "^29.4.2",
|
|
127
|
+
"jest-circus": "29.4.2",
|
|
128
|
+
"jest-environment-jsdom": "29.4.2",
|
|
129
129
|
"markdownlint-cli": "^0.29.0",
|
|
130
130
|
"mockdate": "^2.0.5",
|
|
131
131
|
"npm-run-all": "^4.1.5",
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { BFormGroup } from 'bootstrap-vue';
|
|
3
3
|
import { isString, isArray, isPlainObject } from 'lodash';
|
|
4
|
-
import GlFormText from '../form_text/form_text.vue';
|
|
5
4
|
|
|
6
5
|
export default {
|
|
7
6
|
components: {
|
|
8
7
|
BFormGroup,
|
|
9
|
-
GlFormText,
|
|
10
8
|
},
|
|
11
9
|
inheritAttrs: false,
|
|
12
10
|
props: {
|
|
@@ -63,9 +61,9 @@ export default {
|
|
|
63
61
|
optionalText
|
|
64
62
|
}}</span>
|
|
65
63
|
</slot>
|
|
66
|
-
<
|
|
64
|
+
<div v-if="hasLabelDescription" data-testid="label-description" class="label-description">
|
|
67
65
|
<slot name="label-description">{{ labelDescription }}</slot>
|
|
68
|
-
</
|
|
66
|
+
</div>
|
|
69
67
|
</template>
|
|
70
68
|
|
|
71
69
|
<!-- eslint-disable-next-line @gitlab/vue-prefer-dollar-scopedslots -->
|
|
@@ -25,42 +25,6 @@ import {
|
|
|
25
25
|
mockGroupsCustomItem,
|
|
26
26
|
} from './mock_data';
|
|
27
27
|
|
|
28
|
-
const defaultValue = (prop) => GlDisclosureDropdown.props[prop].default;
|
|
29
|
-
|
|
30
|
-
const generateProps = ({
|
|
31
|
-
items = mockItems,
|
|
32
|
-
category = defaultValue('category'),
|
|
33
|
-
variant = defaultValue('variant'),
|
|
34
|
-
size = defaultValue('size'),
|
|
35
|
-
disabled = defaultValue('disabled'),
|
|
36
|
-
loading = defaultValue('loading'),
|
|
37
|
-
noCaret = defaultValue('noCaret'),
|
|
38
|
-
placement = defaultValue('placement'),
|
|
39
|
-
toggleId = defaultValue('toggleId')(),
|
|
40
|
-
toggleText,
|
|
41
|
-
textSrOnly = defaultValue('textSrOnly'),
|
|
42
|
-
icon = '',
|
|
43
|
-
toggleAriaLabelledBy,
|
|
44
|
-
listAriaLabelledBy,
|
|
45
|
-
startOpened = true,
|
|
46
|
-
} = {}) => ({
|
|
47
|
-
items,
|
|
48
|
-
category,
|
|
49
|
-
variant,
|
|
50
|
-
size,
|
|
51
|
-
disabled,
|
|
52
|
-
loading,
|
|
53
|
-
noCaret,
|
|
54
|
-
placement,
|
|
55
|
-
toggleId,
|
|
56
|
-
toggleText,
|
|
57
|
-
textSrOnly,
|
|
58
|
-
icon,
|
|
59
|
-
toggleAriaLabelledBy,
|
|
60
|
-
listAriaLabelledBy,
|
|
61
|
-
startOpened,
|
|
62
|
-
});
|
|
63
|
-
|
|
64
28
|
const makeBindings = (overrides = {}) =>
|
|
65
29
|
Object.entries({
|
|
66
30
|
':items': 'items',
|
|
@@ -119,13 +83,14 @@ export const Default = (args, { argTypes }) => ({
|
|
|
119
83
|
</div>
|
|
120
84
|
`,
|
|
121
85
|
});
|
|
122
|
-
Default.args =
|
|
86
|
+
Default.args = {
|
|
87
|
+
items: mockItems,
|
|
123
88
|
icon: 'ellipsis_v',
|
|
124
89
|
noCaret: true,
|
|
125
90
|
toggleText: 'Disclosure',
|
|
126
91
|
textSrOnly: true,
|
|
127
92
|
toggleId: TOGGLE_ID,
|
|
128
|
-
}
|
|
93
|
+
};
|
|
129
94
|
Default.decorators = [makeContainer({ height: '200px' })];
|
|
130
95
|
|
|
131
96
|
export const CustomListItem = (args, { argTypes }) => ({
|
|
@@ -162,11 +127,11 @@ export const CustomListItem = (args, { argTypes }) => ({
|
|
|
162
127
|
),
|
|
163
128
|
});
|
|
164
129
|
|
|
165
|
-
CustomListItem.args =
|
|
130
|
+
CustomListItem.args = {
|
|
166
131
|
items: mockItemsCustomItem,
|
|
167
132
|
toggleText: 'Merge requests',
|
|
168
133
|
placement: 'center',
|
|
169
|
-
}
|
|
134
|
+
};
|
|
170
135
|
CustomListItem.decorators = [makeContainer({ height: '200px' })];
|
|
171
136
|
|
|
172
137
|
const makeGroupedExample = (changes) => {
|
|
@@ -190,7 +155,7 @@ const makeGroupedExample = (changes) => {
|
|
|
190
155
|
...changes,
|
|
191
156
|
});
|
|
192
157
|
|
|
193
|
-
story.args =
|
|
158
|
+
story.args = { items: mockGroups };
|
|
194
159
|
story.decorators = [makeContainer({ height: '340px' })];
|
|
195
160
|
|
|
196
161
|
return story;
|
|
@@ -199,12 +164,12 @@ const makeGroupedExample = (changes) => {
|
|
|
199
164
|
export const Groups = makeGroupedExample({
|
|
200
165
|
template: template(''),
|
|
201
166
|
});
|
|
202
|
-
Groups.args =
|
|
167
|
+
Groups.args = {
|
|
203
168
|
icon: 'plus-square',
|
|
204
169
|
items: mockGroups,
|
|
205
170
|
toggleText: 'Create new',
|
|
206
171
|
textSrOnly: true,
|
|
207
|
-
}
|
|
172
|
+
};
|
|
208
173
|
|
|
209
174
|
export const CustomGroupsAndItems = (args, { argTypes }) => ({
|
|
210
175
|
props: Object.keys(argTypes),
|
|
@@ -245,10 +210,10 @@ export const CustomGroupsAndItems = (args, { argTypes }) => ({
|
|
|
245
210
|
),
|
|
246
211
|
});
|
|
247
212
|
|
|
248
|
-
CustomGroupsAndItems.args =
|
|
213
|
+
CustomGroupsAndItems.args = {
|
|
249
214
|
items: mockGroupsCustomItem,
|
|
250
215
|
toggleText: 'Merge requests',
|
|
251
|
-
}
|
|
216
|
+
};
|
|
252
217
|
CustomGroupsAndItems.decorators = [makeContainer({ height: '200px' })];
|
|
253
218
|
|
|
254
219
|
export const CustomGroupsItemsAndToggle = makeGroupedExample({
|
|
@@ -313,12 +278,11 @@ export const CustomGroupsItemsAndToggle = makeGroupedExample({
|
|
|
313
278
|
},
|
|
314
279
|
groups: mockProfileGroups,
|
|
315
280
|
});
|
|
316
|
-
CustomGroupsItemsAndToggle.args =
|
|
281
|
+
CustomGroupsItemsAndToggle.args = {
|
|
317
282
|
icon: 'plus-square',
|
|
318
283
|
toggleText: 'User profile menu',
|
|
319
284
|
textSrOnly: true,
|
|
320
|
-
|
|
321
|
-
});
|
|
285
|
+
};
|
|
322
286
|
CustomGroupsItemsAndToggle.decorators = [makeContainer({ height: '400px' })];
|
|
323
287
|
|
|
324
288
|
export const MiscellaneousContent = (args, { argTypes }) => ({
|
|
@@ -338,12 +302,11 @@ export const MiscellaneousContent = (args, { argTypes }) => ({
|
|
|
338
302
|
),
|
|
339
303
|
});
|
|
340
304
|
|
|
341
|
-
MiscellaneousContent.args =
|
|
305
|
+
MiscellaneousContent.args = {
|
|
342
306
|
icon: 'doc-text',
|
|
343
307
|
toggleText: 'Miscellaneous content',
|
|
344
308
|
textSrOnly: true,
|
|
345
|
-
|
|
346
|
-
});
|
|
309
|
+
};
|
|
347
310
|
MiscellaneousContent.decorators = [makeContainer({ height: '200px' })];
|
|
348
311
|
|
|
349
312
|
export default {
|
|
@@ -382,4 +345,7 @@ export default {
|
|
|
382
345
|
},
|
|
383
346
|
},
|
|
384
347
|
},
|
|
348
|
+
args: {
|
|
349
|
+
startOpened: true,
|
|
350
|
+
},
|
|
385
351
|
};
|