@gitlab/ui 64.21.2 → 64.23.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 Wed, 19 Jul 2023 12:51:04 GMT
3
+ * Generated on Tue, 25 Jul 2023 14:18:39 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Wed, 19 Jul 2023 12:51:04 GMT
3
+ * Generated on Tue, 25 Jul 2023 14:18:39 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Wed, 19 Jul 2023 12:51:04 GMT
3
+ * Generated on Tue, 25 Jul 2023 14:18:39 GMT
4
4
  */
5
5
 
6
6
  export const BLACK = "#fff";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Wed, 19 Jul 2023 12:51:04 GMT
3
+ * Generated on Tue, 25 Jul 2023 14:18:39 GMT
4
4
  */
5
5
 
6
6
  export const BLACK = "#000";
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Wed, 19 Jul 2023 12:51:04 GMT
3
+ // Generated on Tue, 25 Jul 2023 14:18:39 GMT
4
4
 
5
5
  $red-950: #fff4f3;
6
6
  $red-900: #fcf1ef;
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Wed, 19 Jul 2023 12:51:04 GMT
3
+ // Generated on Tue, 25 Jul 2023 14:18:39 GMT
4
4
 
5
5
  $brand-gray-05: #2b2838 !default;
6
6
  $brand-gray-04: #45424d !default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "64.21.2",
3
+ "version": "64.23.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -91,7 +91,7 @@
91
91
  "@gitlab/eslint-plugin": "19.0.0",
92
92
  "@gitlab/fonts": "^1.2.0",
93
93
  "@gitlab/stylelint-config": "4.1.0",
94
- "@gitlab/svgs": "3.55.0",
94
+ "@gitlab/svgs": "3.57.0",
95
95
  "@rollup/plugin-commonjs": "^11.1.0",
96
96
  "@rollup/plugin-node-resolve": "^7.1.3",
97
97
  "@rollup/plugin-replace": "^2.3.2",
@@ -118,9 +118,9 @@
118
118
  "babel-loader": "^8.0.5",
119
119
  "babel-plugin-require-context-hook": "^1.0.0",
120
120
  "bootstrap": "4.6.2",
121
- "cypress": "12.17.1",
121
+ "cypress": "12.17.2",
122
122
  "emoji-regex": "^10.0.0",
123
- "eslint": "8.44.0",
123
+ "eslint": "8.45.0",
124
124
  "eslint-import-resolver-jest": "3.0.2",
125
125
  "eslint-plugin-cypress": "2.13.3",
126
126
  "eslint-plugin-storybook": "0.6.12",
@@ -24,5 +24,8 @@ interface FieldDefinition<TValue> {
24
24
 
25
25
  // Properties that are passed to the actual input for this field.
26
26
  inputAttrs?: {};
27
+
28
+ // Properties that are passed to the group wrapping this field.
29
+ groupAttrs?: {};
27
30
  }
28
31
  ```
@@ -24,6 +24,7 @@ const TEST_FIELDS = {
24
24
  (val) => (val % 2 === 1 ? 'Count must be even' : ''),
25
25
  ],
26
26
  inputAttrs: { size: 'xs', type: 'number' },
27
+ groupAttrs: { class: 'unique-class' },
27
28
  },
28
29
  allCaps: {
29
30
  label: 'All caps (optional)',
@@ -68,6 +69,7 @@ describe('GlFormFields', () => {
68
69
  label: formGroup.attributes('label'),
69
70
  state: formGroup.attributes('state'),
70
71
  invalidFeedback: formGroup.attributes('invalid-feedback'),
72
+ class: formGroup.attributes('class'),
71
73
  input: {
72
74
  // Ensure that "value" is present even if undefined
73
75
  value: input.attributes('value'),
@@ -110,6 +112,7 @@ describe('GlFormFields', () => {
110
112
  label: TEST_FIELDS.username.label,
111
113
  state: undefined,
112
114
  invalidFeedback: '',
115
+ class: undefined,
113
116
  input: {
114
117
  id: 'gl-form-field-testunique',
115
118
  value: undefined,
@@ -119,6 +122,7 @@ describe('GlFormFields', () => {
119
122
  label: TEST_FIELDS.evenCount.label,
120
123
  state: undefined,
121
124
  invalidFeedback: '',
125
+ class: TEST_FIELDS.evenCount.groupAttrs.class,
122
126
  input: {
123
127
  id: 'gl-form-field-testunique',
124
128
  value: '0',
@@ -129,6 +133,7 @@ describe('GlFormFields', () => {
129
133
  label: TEST_FIELDS.allCaps.label,
130
134
  state: undefined,
131
135
  invalidFeedback: '',
136
+ class: undefined,
132
137
  input: {
133
138
  id: 'gl-form-field-testunique',
134
139
  value: undefined,
@@ -222,6 +227,7 @@ describe('GlFormFields', () => {
222
227
  label: TEST_FIELDS.username.label,
223
228
  invalidFeedback: 'User name is required',
224
229
  state: undefined,
230
+ class: undefined,
225
231
  input: {
226
232
  value: undefined,
227
233
  id: 'gl-form-field-testunique',
@@ -231,6 +237,7 @@ describe('GlFormFields', () => {
231
237
  label: TEST_FIELDS.evenCount.label,
232
238
  invalidFeedback: 'Count is required',
233
239
  state: undefined,
240
+ class: TEST_FIELDS.evenCount.groupAttrs.class,
234
241
  input: expect.objectContaining({
235
242
  value: '0',
236
243
  id: 'gl-form-field-testunique',
@@ -240,6 +247,7 @@ describe('GlFormFields', () => {
240
247
  label: TEST_FIELDS.allCaps.label,
241
248
  invalidFeedback: '',
242
249
  state: undefined,
250
+ class: undefined,
243
251
  input: {
244
252
  value: undefined,
245
253
  id: 'gl-form-field-testunique',
@@ -274,6 +282,7 @@ describe('GlFormFields', () => {
274
282
  label: TEST_FIELDS.evenCount.label,
275
283
  invalidFeedback: 'Count must be even',
276
284
  state: undefined,
285
+ class: TEST_FIELDS.evenCount.groupAttrs.class,
277
286
  input: {
278
287
  ...TEST_FIELDS.evenCount.inputAttrs,
279
288
  id: 'gl-form-field-testunique',
@@ -24,8 +24,9 @@ const Template = () => ({
24
24
  validators: [required('NAME IS REQUIRED!!!')],
25
25
  },
26
26
  password: {
27
- label: 'Password',
27
+ label: 'Password with group styling',
28
28
  inputAttrs: { type: 'password' },
29
+ groupAttrs: { class: 'gl-bg-purple-50 gl-w-20' },
29
30
  validators: [required('Password is required')],
30
31
  },
31
32
  confirmPassword: {
@@ -25,6 +25,7 @@ export default {
25
25
  * @typedef {object} FieldDefinition
26
26
  * @template TValue=string
27
27
  * @property {string} label - Label text to show for this field.
28
+ * @property {undefined | Object} groupAttrs - Properties that are passed to the group wrapping this field.
28
29
  * @property {undefined | Object} inputAttrs - Properties that are passed to the actual input for this field.
29
30
  * @property {undefined | function(string): TValue} mapValue - Function that maps the inputted string value to the field's actual value (e.g. a Number).
30
31
  * @property {undefined | Array<function(TValue): string | undefined>=} validators - Collection of validator functions.
@@ -188,6 +189,7 @@ export default {
188
189
  <div>
189
190
  <gl-form-group
190
191
  v-for="(field, fieldName) in fieldsToRender"
192
+ v-bind="field.groupAttrs"
191
193
  :key="fieldName"
192
194
  :label="field.label"
193
195
  :label-for="field.id"
@@ -0,0 +1,6 @@
1
+ .gl-input-group-text {
2
+ @include gl-bg-gray-10;
3
+ @include gl-h-7;
4
+ @include gl-font-base;
5
+ @include gl-text-gray-900;
6
+ }
@@ -6,4 +6,9 @@ describe('GlInputGroupText', () => {
6
6
  const wrapper = shallowMount(GlInputGroupText);
7
7
  expect(wrapper).toBeInstanceOf(Object);
8
8
  });
9
+
10
+ it('applies gl-input-group-text class', () => {
11
+ const wrapper = shallowMount(GlInputGroupText);
12
+ expect(wrapper.classes('gl-input-group-text')).toBe(true);
13
+ });
9
14
  });
@@ -11,7 +11,7 @@ export default {
11
11
  </script>
12
12
 
13
13
  <template>
14
- <b-input-group-text v-bind="$attrs" v-on="$listeners">
14
+ <b-input-group-text v-bind="$attrs" class="gl-input-group-text" v-on="$listeners">
15
15
  <slot></slot>
16
16
  </b-input-group-text>
17
17
  </template>
@@ -44,6 +44,7 @@
44
44
  @import '../components/base/form/form_select/form_select';
45
45
  @import '../components/base/form/form_textarea/form_textarea';
46
46
  @import '../components/base/form/form_combobox/form_combobox';
47
+ @import '../components/base/form/input_group_text/input_group_text';
47
48
  @import '../components/base/icon/icon';
48
49
  @import '../components/base/infinite_scroll/infinite_scroll';
49
50
  @import '../components/base/label/label';