@gitlab/ui 41.5.0 → 41.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "41.5.0",
3
+ "version": "41.7.1",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -83,19 +83,19 @@
83
83
  "@babel/preset-env": "^7.10.2",
84
84
  "@gitlab/eslint-plugin": "12.3.0",
85
85
  "@gitlab/stylelint-config": "4.0.0",
86
- "@gitlab/svgs": "2.16.0",
86
+ "@gitlab/svgs": "2.18.0",
87
87
  "@rollup/plugin-commonjs": "^11.1.0",
88
88
  "@rollup/plugin-node-resolve": "^7.1.3",
89
89
  "@rollup/plugin-replace": "^2.3.2",
90
- "@storybook/addon-a11y": "6.5.6",
91
- "@storybook/addon-docs": "6.5.6",
92
- "@storybook/addon-essentials": "6.5.6",
90
+ "@storybook/addon-a11y": "6.5.8",
91
+ "@storybook/addon-docs": "6.5.8",
92
+ "@storybook/addon-essentials": "6.5.8",
93
93
  "@storybook/addon-knobs": "6.4.0",
94
- "@storybook/addon-storyshots": "6.5.6",
95
- "@storybook/addon-storyshots-puppeteer": "6.5.6",
96
- "@storybook/addon-viewport": "6.5.6",
97
- "@storybook/theming": "6.5.6",
98
- "@storybook/vue": "6.5.6",
94
+ "@storybook/addon-storyshots": "6.5.8",
95
+ "@storybook/addon-storyshots-puppeteer": "6.5.8",
96
+ "@storybook/addon-viewport": "6.5.8",
97
+ "@storybook/theming": "6.5.8",
98
+ "@storybook/vue": "6.5.8",
99
99
  "@vue/test-utils": "1.3.0",
100
100
  "autoprefixer": "^9.7.6",
101
101
  "babel-jest": "^26.6.3",
@@ -106,7 +106,7 @@
106
106
  "bootstrap": "4.5.3",
107
107
  "cypress": "^6.6.0",
108
108
  "emoji-regex": "^10.0.0",
109
- "eslint": "8.16.0",
109
+ "eslint": "8.17.0",
110
110
  "eslint-import-resolver-jest": "3.0.2",
111
111
  "eslint-plugin-cypress": "2.12.1",
112
112
  "eslint-plugin-storybook": "0.5.12",
@@ -17,7 +17,9 @@ export const glSpacingScale15 = '7.5rem'
17
17
  export const glSpacingScale20 = '10rem'
18
18
  export const glSpacingScale26 = '13rem'
19
19
  export const glSpacingScale28 = '14rem'
20
+ export const glSpacingScale34 = '17rem'
20
21
  export const glSpacingScale62 = '31rem'
22
+ export const glSpacingScale80 = '40rem'
21
23
  export const breakpointSm = '576px'
22
24
  export const breakpointMd = '768px'
23
25
  export const breakpointLg = '992px'
@@ -95,11 +95,21 @@
95
95
  "value": "28 * $grid-size",
96
96
  "compiledValue": "14rem"
97
97
  },
98
+ {
99
+ "name": "$gl-spacing-scale-34",
100
+ "value": "34 * $grid-size",
101
+ "compiledValue": "17rem"
102
+ },
98
103
  {
99
104
  "name": "$gl-spacing-scale-62",
100
105
  "value": "62 * $grid-size",
101
106
  "compiledValue": "31rem"
102
107
  },
108
+ {
109
+ "name": "$gl-spacing-scale-80",
110
+ "value": "80 * $grid-size",
111
+ "compiledValue": "40rem"
112
+ },
103
113
  {
104
114
  "name": "$breakpoint-sm",
105
115
  "value": "576px",
@@ -60,7 +60,8 @@
60
60
  top: 1px;
61
61
  }
62
62
 
63
- &.btn-default {
63
+ &.btn-default,
64
+ &.btn-dashed {
64
65
  @include gl-bg-white;
65
66
 
66
67
  &.btn-default-tertiary {
@@ -7,7 +7,11 @@ should serve a single purpose dedicated to completing the user’s task.
7
7
  You can use the `v-model` directive to control the modal’s visibility. The `v-model`
8
8
  directive interfaces with the `visible` property and the `@change` event.
9
9
 
10
- ## Modal footer
10
+ ## Deprecation Warning
11
+
12
+ We are deprecating the `modal-ok` and `modal-cancel` slots. We are also changing the way the
13
+ `modal-footer` slot content is populated. This is in order to align this component with the design
14
+ system.
11
15
 
12
16
  The `modal-footer` slot should only be populated via props: `action-primary`, `action-secondary` and
13
17
  `action-cancel`. These props allow you to handle how a primary, secondary and cancel button will
@@ -86,6 +86,22 @@ export default {
86
86
  default: '',
87
87
  },
88
88
  },
89
+ computed: {
90
+ shouldRenderModalOk() {
91
+ return Boolean(this.$slots['modal-ok']);
92
+ },
93
+ shouldRenderModalCancel() {
94
+ return Boolean(this.$slots['modal-cancel']);
95
+ },
96
+ shouldRenderModalFooter() {
97
+ return Boolean(
98
+ this.actionCancel ||
99
+ this.actionSecondary ||
100
+ this.actionPrimary ||
101
+ this.$slots['modal-footer']
102
+ );
103
+ },
104
+ },
89
105
  mounted() {
90
106
  if (!this.ariaLabel && !this.title) {
91
107
  logWarning(
@@ -152,7 +168,7 @@ export default {
152
168
  </script>
153
169
 
154
170
  <template>
155
- <!--
171
+ <!--
156
172
  Emitted when the modal visibility changes
157
173
  @event change
158
174
  -->
@@ -186,8 +202,14 @@ export default {
186
202
  <!-- @slot Content of Modal header close button. If modal-header slot is used, this slot will not be shown. -->
187
203
  <close-button ref="close-button" :label="dismissLabel" @click="close" />
188
204
  </template>
205
+ <template v-if="shouldRenderModalOk" #modal-ok>
206
+ <slot name="modal-ok"></slot>
207
+ </template>
208
+ <template v-if="shouldRenderModalCancel" #modal-cancel>
209
+ <slot name="modal-cancel"></slot>
210
+ </template>
189
211
  <!-- @slot Populated via props: modal-action-primary, modal-action-cancel and modal-action-secondary. -->
190
- <template #modal-footer>
212
+ <template v-if="shouldRenderModalFooter" #modal-footer>
191
213
  <slot name="modal-footer">
192
214
  <!--
193
215
  Emitted when clicked on modal-action-cancel
@@ -80,6 +80,7 @@ const generateProps = ({
80
80
  icon = '',
81
81
  multiple = defaultValue('multiple'),
82
82
  ariaLabelledby,
83
+ startOpened = true,
83
84
  } = {}) => ({
84
85
  items,
85
86
  category,
@@ -94,6 +95,7 @@ const generateProps = ({
94
95
  icon,
95
96
  multiple,
96
97
  ariaLabelledby,
98
+ startOpened,
97
99
  });
98
100
 
99
101
  function openListbox(component) {
@@ -136,7 +138,9 @@ export const Default = (args, { argTypes }) => ({
136
138
  };
137
139
  },
138
140
  mounted() {
139
- openListbox(this);
141
+ if (this.startOpened) {
142
+ openListbox(this);
143
+ }
140
144
  },
141
145
  template: template('', `<span class="gl-my-0" id="listbox-label">Select a department</span>`),
142
146
  });
@@ -157,7 +161,9 @@ export const HeaderAndFooter = (args, { argTypes }) => ({
157
161
  };
158
162
  },
159
163
  mounted() {
160
- openListbox(this);
164
+ if (this.startOpened) {
165
+ openListbox(this);
166
+ }
161
167
  },
162
168
  methods: {
163
169
  selectItem(index) {
@@ -193,7 +199,9 @@ export const CustomListItem = (args, { argTypes }) => ({
193
199
  GlAvatar,
194
200
  },
195
201
  mounted() {
196
- openListbox(this);
202
+ if (this.startOpened) {
203
+ openListbox(this);
204
+ }
197
205
  },
198
206
  computed: {
199
207
  headerText() {
@@ -881,6 +881,14 @@
881
881
  .gl-bg-chevron-down\! {
882
882
  background-image: url($gl-icon-chevron-down) !important
883
883
  }
884
+
885
+ .gl-backdrop-filter-blur-1 {
886
+ backdrop-filter: blur($gl-spacing-scale-1)
887
+ }
888
+
889
+ .gl-backdrop-filter-blur-1\! {
890
+ backdrop-filter: blur($gl-spacing-scale-1) !important
891
+ }
884
892
  .gl-border {
885
893
  border: solid $gl-border-size-1 $border-color;
886
894
  }
@@ -4783,6 +4791,14 @@
4783
4791
  max-width: $gl-spacing-scale-26 !important;
4784
4792
  }
4785
4793
 
4794
+ .gl-max-w-34 {
4795
+ max-width: $gl-spacing-scale-34;
4796
+ }
4797
+
4798
+ .gl-max-w-34\! {
4799
+ max-width: $gl-spacing-scale-34 !important;
4800
+ }
4801
+
4786
4802
  .gl-max-w-62 {
4787
4803
  max-width: $gl-spacing-scale-62;
4788
4804
  }
@@ -4791,6 +4807,14 @@
4791
4807
  max-width: $gl-spacing-scale-62 !important;
4792
4808
  }
4793
4809
 
4810
+ .gl-max-w-80 {
4811
+ max-width: $gl-spacing-scale-80;
4812
+ }
4813
+
4814
+ .gl-max-w-80\! {
4815
+ max-width: $gl-spacing-scale-80 !important;
4816
+ }
4817
+
4794
4818
  .gl-max-w-none {
4795
4819
  max-width: none;
4796
4820
  }
@@ -397,3 +397,13 @@
397
397
  @mixin gl-bg-chevron-down {
398
398
  background-image: url($gl-icon-chevron-down);
399
399
  }
400
+
401
+ /**
402
+ * Backdrop filter utilities
403
+ *
404
+ * naming convention: gl-filter-{filter-type}-{filter-intensity}
405
+ */
406
+
407
+ @mixin gl-backdrop-filter-blur-1 {
408
+ backdrop-filter: blur($gl-spacing-scale-1);
409
+ }
@@ -341,10 +341,18 @@
341
341
  max-width: $gl-spacing-scale-26;
342
342
  }
343
343
 
344
+ @mixin gl-max-w-34 {
345
+ max-width: $gl-spacing-scale-34;
346
+ }
347
+
344
348
  @mixin gl-max-w-62 {
345
349
  max-width: $gl-spacing-scale-62;
346
350
  }
347
351
 
352
+ @mixin gl-max-w-80 {
353
+ max-width: $gl-spacing-scale-80;
354
+ }
355
+
348
356
  @mixin gl-max-w-none {
349
357
  max-width: none;
350
358
  }
@@ -20,7 +20,9 @@ $gl-spacing-scale-15: 15 * $grid-size;
20
20
  $gl-spacing-scale-20: 20 * $grid-size;
21
21
  $gl-spacing-scale-26: 26 * $grid-size;
22
22
  $gl-spacing-scale-28: 28 * $grid-size;
23
+ $gl-spacing-scale-34: 34 * $grid-size;
23
24
  $gl-spacing-scale-62: 62 * $grid-size;
25
+ $gl-spacing-scale-80: 80 * $grid-size;
24
26
 
25
27
  // Responsive breakpoints
26
28