@gitlab/ui 66.16.0 → 66.18.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, 27 Sep 2023 08:51:14 GMT
3
+ * Generated on Wed, 27 Sep 2023 16:04:33 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Wed, 27 Sep 2023 08:51:14 GMT
3
+ * Generated on Wed, 27 Sep 2023 16:04:33 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Wed, 27 Sep 2023 08:51:14 GMT
3
+ * Generated on Wed, 27 Sep 2023 16:04:33 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, 27 Sep 2023 08:51:14 GMT
3
+ * Generated on Wed, 27 Sep 2023 16:04:33 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, 27 Sep 2023 08:51:14 GMT
3
+ // Generated on Wed, 27 Sep 2023 16:04:33 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, 27 Sep 2023 08:51:14 GMT
3
+ // Generated on Wed, 27 Sep 2023 16:04:33 GMT
4
4
 
5
5
  $gl-line-height-52: 3.25rem;
6
6
  $gl-line-height-44: 2.75rem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "66.16.0",
3
+ "version": "66.18.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -98,18 +98,18 @@
98
98
  "@rollup/plugin-commonjs": "^11.1.0",
99
99
  "@rollup/plugin-node-resolve": "^7.1.3",
100
100
  "@rollup/plugin-replace": "^2.3.2",
101
- "@storybook/addon-a11y": "7.4.3",
102
- "@storybook/addon-docs": "7.4.3",
103
- "@storybook/addon-essentials": "7.4.3",
104
- "@storybook/addon-storyshots": "7.4.3",
105
- "@storybook/addon-storyshots-puppeteer": "7.4.3",
106
- "@storybook/addon-viewport": "7.4.3",
107
- "@storybook/builder-webpack5": "7.4.3",
108
- "@storybook/theming": "7.4.3",
109
- "@storybook/vue": "7.4.3",
110
- "@storybook/vue-webpack5": "7.4.3",
111
- "@storybook/vue3": "7.4.3",
112
- "@storybook/vue3-webpack5": "7.4.3",
101
+ "@storybook/addon-a11y": "7.4.5",
102
+ "@storybook/addon-docs": "7.4.5",
103
+ "@storybook/addon-essentials": "7.4.5",
104
+ "@storybook/addon-storyshots": "7.4.5",
105
+ "@storybook/addon-storyshots-puppeteer": "7.4.5",
106
+ "@storybook/addon-viewport": "7.4.5",
107
+ "@storybook/builder-webpack5": "7.4.5",
108
+ "@storybook/theming": "7.4.5",
109
+ "@storybook/vue": "7.4.5",
110
+ "@storybook/vue-webpack5": "7.4.5",
111
+ "@storybook/vue3": "7.4.5",
112
+ "@storybook/vue3-webpack5": "7.4.5",
113
113
  "@vue/compat": "^3.2.40",
114
114
  "@vue/compiler-sfc": "^3.2.40",
115
115
  "@vue/test-utils": "1.3.0",
@@ -160,7 +160,7 @@
160
160
  "sass-loader": "^10.2.0",
161
161
  "sass-true": "^6.1.0",
162
162
  "start-server-and-test": "^1.10.6",
163
- "storybook": "7.4.3",
163
+ "storybook": "7.4.5",
164
164
  "storybook-dark-mode": "3.0.1",
165
165
  "style-dictionary": "^3.8.0",
166
166
  "stylelint": "15.10.2",
@@ -57,9 +57,7 @@ body.modal-open {
57
57
  @include gl-border-none;
58
58
 
59
59
  .modal-title {
60
- @include gl-font-lg;
61
- @include gl-font-weight-bold;
62
- @include gl-line-height-24;
60
+ @include gl-heading-scale-500;
63
61
  }
64
62
  }
65
63
 
@@ -85,7 +85,7 @@ describe('Modal component', () => {
85
85
  createComponent({
86
86
  slots: { 'modal-header': slot },
87
87
  });
88
- const defaultHeader = wrapper.find('h4.modal-title');
88
+ const defaultHeader = wrapper.find('h2.modal-title');
89
89
  const customHeader = wrapper.find('h4.custom-title');
90
90
 
91
91
  expect(defaultHeader.exists()).toBe(false);
@@ -98,7 +98,7 @@ describe('Modal component', () => {
98
98
  createComponent({
99
99
  slots: { 'modal-title': slot },
100
100
  });
101
- const defaultHeader = wrapper.find('h4.modal-title');
101
+ const defaultHeader = wrapper.find('h2.modal-title');
102
102
  const customTitle = defaultHeader.find('h4.custom-title');
103
103
 
104
104
  expect(defaultHeader.exists()).toBe(true);
@@ -206,10 +206,10 @@ export default {
206
206
  <template #modal-header>
207
207
  <!-- @slot Entire modal header container contents (including the close button on the top right corner) -->
208
208
  <slot name="modal-header">
209
- <h4 class="modal-title">
209
+ <h2 class="modal-title">
210
210
  <!-- @slot Modal title. If modal-header slot is used, this slot will not be shown. -->
211
211
  <slot name="modal-title">{{ title }}</slot>
212
- </h4>
212
+ </h2>
213
213
  </slot>
214
214
  <!-- @slot Content of Modal header close button. If modal-header slot is used, this slot will not be shown. -->
215
215
  <close-button ref="close-button" :label="dismissLabel" @click="close" />
@@ -0,0 +1,3 @@
1
+ .gl-empty-state-content {
2
+ max-width: 65ch;
3
+ }
@@ -249,8 +249,18 @@ describe('empty state component', () => {
249
249
  describe('with custom content class', () => {
250
250
  const findContentContainer = () => component.find('[data-testid="gl-empty-state-content"]');
251
251
  const customContentClass = 'gl-p-0';
252
- const expectedDefaultContentClasses = ['gl-max-w-88', 'gl-m-auto', customContentClass];
252
+ const expectedDefaultContentClasses = [
253
+ 'gl-empty-state-content',
254
+ 'gl-mx-auto',
255
+ 'gl-my-0',
256
+ 'gl-m-auto',
257
+ 'gl-p-5',
258
+ customContentClass,
259
+ ];
253
260
  const expectedCompactContentClasses = [
261
+ 'gl-empty-state-content',
262
+ 'gl-mx-auto',
263
+ 'gl-my-0',
254
264
  'gl-flex-grow-1',
255
265
  'gl-flex-basis-0',
256
266
  'gl-px-4',
@@ -108,7 +108,7 @@ export default {
108
108
  },
109
109
  contentClasses() {
110
110
  return [
111
- this.compact ? 'gl-flex-grow-1 gl-flex-basis-0 gl-px-4' : 'gl-max-w-88 gl-m-auto',
111
+ this.compact ? 'gl-flex-grow-1 gl-flex-basis-0 gl-px-4' : 'gl-m-auto gl-p-5',
112
112
  this.contentClass,
113
113
  ];
114
114
  },
@@ -127,68 +127,69 @@ export default {
127
127
  <div
128
128
  :class="{ 'gl-display-none gl-sm-display-block gl-px-4': compact, 'gl-max-w-full': !compact }"
129
129
  >
130
- <div v-if="svgPath">
131
- <img
132
- :src="svgPath"
133
- alt=""
134
- role="img"
135
- :class="{ 'gl-dark-invert-keep-hue': invertInDarkMode }"
136
- class="gl-max-w-full"
137
- :height="height"
138
- />
139
- </div>
130
+ <img
131
+ v-if="svgPath"
132
+ :src="svgPath"
133
+ alt=""
134
+ role="img"
135
+ :class="{ 'gl-dark-invert-keep-hue': invertInDarkMode }"
136
+ class="gl-max-w-full"
137
+ :height="height"
138
+ />
140
139
  </div>
141
- <div :class="contentClasses" data-testid="gl-empty-state-content">
142
- <div class="gl-mx-auto gl-my-0" :class="{ 'gl-p-5': !compact }">
140
+ <div
141
+ class="gl-empty-state-content gl-mx-auto gl-my-0"
142
+ :class="contentClasses"
143
+ data-testid="gl-empty-state-content"
144
+ >
145
+ <!--
146
+ @slot Use this slot to customize the empty state's title area.
147
+ Overrides the `title` prop.
148
+ -->
149
+ <slot ref="title" name="title">
150
+ <h1
151
+ class="gl-font-size-h-display gl-line-height-36 gl-mt-0 gl-mb-0"
152
+ :class="compact ? 'h5' : 'h4'"
153
+ >
154
+ {{ title }}
155
+ </h1>
156
+ </slot>
157
+ <p v-if="description || $scopedSlots.description" ref="description" class="gl-mt-4 gl-mb-0">
143
158
  <!--
144
- @slot Use this slot to customize the empty state's title area.
145
- Overrides the `title` prop.
146
- -->
147
- <slot ref="title" name="title">
148
- <h1
149
- class="gl-font-size-h-display gl-line-height-36 gl-mt-0 gl-mb-0"
150
- :class="compact ? 'h5' : 'h4'"
159
+ @slot Use this slot to customize the empty state's description
160
+ area. Overrides the `description` prop.
161
+ -->
162
+ <slot name="description">
163
+ {{ description }}
164
+ </slot>
165
+ </p>
166
+ <div
167
+ class="gl-display-flex gl-flex-wrap gl-mt-5"
168
+ :class="{ 'gl-justify-content-center': !compact }"
169
+ >
170
+ <!--
171
+ @slot Use this slot to customize the empty state's actions area,
172
+ where the buttons are. Overrides button-related props:
173
+ `primaryButtonLink`, `primaryButtonText`, `secondaryButtonLink`,
174
+ `secondaryButtonText`.
175
+ -->
176
+ <slot name="actions">
177
+ <gl-button
178
+ v-if="shouldRenderPrimaryButton"
179
+ variant="confirm"
180
+ :class="compact ? 'gl-mr-3' : 'gl-mx-2'"
181
+ class="gl-mb-3"
182
+ :href="primaryButtonLink"
183
+ >{{ primaryButtonText }}</gl-button
151
184
  >
152
- {{ title }}
153
- </h1>
185
+ <gl-button
186
+ v-if="shouldRenderSecondaryButton"
187
+ class="gl-mb-3 gl-mr-3"
188
+ :class="{ 'gl-mx-2!': !compact }"
189
+ :href="secondaryButtonLink"
190
+ >{{ secondaryButtonText }}
191
+ </gl-button>
154
192
  </slot>
155
- <p v-if="description || $scopedSlots.description" ref="description" class="gl-mt-4 gl-mb-0">
156
- <!--
157
- @slot Use this slot to customize the empty state's description
158
- area. Overrides the `description` prop.
159
- -->
160
- <slot name="description">
161
- {{ description }}
162
- </slot>
163
- </p>
164
- <div
165
- class="gl-display-flex gl-flex-wrap gl-mt-5"
166
- :class="{ 'gl-justify-content-center': !compact }"
167
- >
168
- <!--
169
- @slot Use this slot to customize the empty state's actions area,
170
- where the buttons are. Overrides button-related props:
171
- `primaryButtonLink`, `primaryButtonText`, `secondaryButtonLink`,
172
- `secondaryButtonText`.
173
- -->
174
- <slot name="actions">
175
- <gl-button
176
- v-if="shouldRenderPrimaryButton"
177
- variant="confirm"
178
- :class="compact ? 'gl-mr-3' : 'gl-mx-2'"
179
- class="gl-mb-3"
180
- :href="primaryButtonLink"
181
- >{{ primaryButtonText }}</gl-button
182
- >
183
- <gl-button
184
- v-if="shouldRenderSecondaryButton"
185
- class="gl-mb-3 gl-mr-3"
186
- :class="{ 'gl-mx-2!': !compact }"
187
- :href="secondaryButtonLink"
188
- >{{ secondaryButtonText }}
189
- </gl-button>
190
- </slot>
191
- </div>
192
193
  </div>
193
194
  </div>
194
195
  </section>
@@ -78,3 +78,4 @@
78
78
  @import '../components/base/new_dropdowns/dropdown';
79
79
  @import '../components/base/new_dropdowns/dropdown_item';
80
80
  @import '../components/base/new_dropdowns/listbox/listbox';
81
+ @import '../components/regions/empty_state/empty_state';