@gitlab/ui 67.3.2 → 67.4.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 CHANGED
@@ -1,3 +1,17 @@
1
+ # [67.4.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v67.3.3...v67.4.0) (2023-11-02)
2
+
3
+
4
+ ### Features
5
+
6
+ * **GlColumnChart:** allow setting `stack` series property ([1ec54d9](https://gitlab.com/gitlab-org/gitlab-ui/commit/1ec54d9285bdda447575f31689ccc417389a6a96))
7
+
8
+ ## [67.3.3](https://gitlab.com/gitlab-org/gitlab-ui/compare/v67.3.2...v67.3.3) (2023-11-01)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **GlDuoChat:** 100% height for chat ([bfad98d](https://gitlab.com/gitlab-org/gitlab-ui/commit/bfad98d392b1db6dea00705178dbb3cb6b2d10fe))
14
+
1
15
  ## [67.3.2](https://gitlab.com/gitlab-org/gitlab-ui/compare/v67.3.1...v67.3.2) (2023-11-01)
2
16
 
3
17
 
package/README.md CHANGED
@@ -168,8 +168,8 @@ You have two options to include those stylesheets:
168
168
 
169
169
  ## Releases
170
170
 
171
- Please see [Updating Gitlab UI Packages](doc/updating-gitlab-ui-packages.md) for information on how
172
- updated packages are included in Gitlab and Pajamas.
171
+ See [Updating GitLab UI Packages](doc/updating-gitlab-ui-packages.md) for information on how the
172
+ `@gitlab/ui` package is kept up to date in various projects.
173
173
 
174
174
  ## Contributing guide
175
175
 
@@ -94,12 +94,14 @@ var script = {
94
94
  return this.bars.map((_ref, index) => {
95
95
  let {
96
96
  name,
97
- data
97
+ data,
98
+ stack
98
99
  } = _ref;
99
100
  const color = colorFromDefaultPalette(index);
100
101
  return generateBarSeries({
101
102
  name,
102
103
  data,
104
+ stack,
103
105
  color
104
106
  });
105
107
  });
@@ -215,11 +215,11 @@ var script = {
215
215
  const __vue_script__ = script;
216
216
 
217
217
  /* template */
218
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (!_vm.isHidden)?_c('aside',{ref:"drawer",staticClass:"markdown-code-block gl-drawer gl-drawer-default gl-max-h-full gl-bottom-0 gl-shadow-none gl-border-l gl-border-t duo-chat gl-h-auto",attrs:{"id":"chat-component","role":"complementary","data-testid":"chat-component"},on:{"scroll":_vm.handleScrollingTrottled}},[_c('header',{staticClass:"gl-drawer-header gl-drawer-header-sticky gl-z-index-200 gl-p-0! gl-border-b-0"},[_c('div',{staticClass:"drawer-title gl-display-flex gl-justify-content-start gl-align-items-center gl-p-5"},[_c('h3',{staticClass:"gl-my-0 gl-font-size-h2"},[_vm._v(_vm._s(_vm.title))]),_vm._v(" "),_c('gl-experiment-badge',{attrs:{"experiment-help-page-url":_vm.experimentHelpPageUrl,"container-id":"chat-component"}}),_vm._v(" "),_c('gl-button',{staticClass:"gl-p-0! gl-ml-auto",attrs:{"category":"tertiary","variant":"default","icon":"close","size":"small","data-testid":"chat-close-button","aria-label":_vm.$options.i18n.CHAT_CLOSE_LABEL},on:{"click":_vm.hideChat}})],1),_vm._v(" "),_c('gl-alert',{staticClass:"gl-text-center gl-border-t gl-p-4 gl-text-gray-700 gl-bg-gray-50 legal-warning gl-max-w-full",attrs:{"dismissible":false,"variant":"tip","show-icon":false,"role":"alert","data-testid":"chat-legal-warning"}},[_vm._v(_vm._s(_vm.$options.i18n.CHAT_LEGAL_GENERATED_BY_AI))]),_vm._v(" "),_vm._t("subheader")],2),_vm._v(" "),_c('div',{staticClass:"gl-drawer-body gl-display-flex gl-flex-direction-column"},[_vm._t("hero"),_vm._v(" "),(_vm.error)?_c('gl-alert',{key:"error",staticClass:"gl-mb-0 gl-pl-9!",attrs:{"dismissible":false,"variant":"danger","role":"alert","data-testid":"chat-error"}},[_c('span',{directives:[{name:"safe-html",rawName:"v-safe-html",value:(_vm.error),expression:"error"}]})]):_vm._e(),_vm._v(" "),_c('section',{staticClass:"gl-display-flex gl-flex-direction-column gl-justify-content-end gl-flex-grow-1 gl-border-b-0 gl-bg-gray-10"},[_c('transition-group',{staticClass:"gl-display-flex gl-flex-direction-column gl-justify-content-end",class:[
218
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (!_vm.isHidden)?_c('aside',{ref:"drawer",staticClass:"markdown-code-block gl-drawer gl-drawer-default gl-max-h-full gl-bottom-0 gl-shadow-none gl-border-l gl-border-t duo-chat",attrs:{"id":"chat-component","role":"complementary","data-testid":"chat-component"},on:{"scroll":_vm.handleScrollingTrottled}},[_c('header',{staticClass:"gl-drawer-header gl-drawer-header-sticky gl-z-index-200 gl-p-0! gl-border-b-0"},[_c('div',{staticClass:"drawer-title gl-display-flex gl-justify-content-start gl-align-items-center gl-p-5"},[_c('h3',{staticClass:"gl-my-0 gl-font-size-h2"},[_vm._v(_vm._s(_vm.title))]),_vm._v(" "),_c('gl-experiment-badge',{attrs:{"experiment-help-page-url":_vm.experimentHelpPageUrl,"container-id":"chat-component"}}),_vm._v(" "),_c('gl-button',{staticClass:"gl-p-0! gl-ml-auto",attrs:{"category":"tertiary","variant":"default","icon":"close","size":"small","data-testid":"chat-close-button","aria-label":_vm.$options.i18n.CHAT_CLOSE_LABEL},on:{"click":_vm.hideChat}})],1),_vm._v(" "),_c('gl-alert',{staticClass:"gl-text-center gl-border-t gl-p-4 gl-text-gray-700 gl-bg-gray-50 legal-warning gl-max-w-full",attrs:{"dismissible":false,"variant":"tip","show-icon":false,"role":"alert","data-testid":"chat-legal-warning"}},[_vm._v(_vm._s(_vm.$options.i18n.CHAT_LEGAL_GENERATED_BY_AI))]),_vm._v(" "),_vm._t("subheader")],2),_vm._v(" "),_c('div',{staticClass:"gl-drawer-body gl-display-flex gl-flex-direction-column"},[_vm._t("hero"),_vm._v(" "),(_vm.error)?_c('gl-alert',{key:"error",staticClass:"gl-mb-0 gl-pl-9!",attrs:{"dismissible":false,"variant":"danger","role":"alert","data-testid":"chat-error"}},[_c('span',{directives:[{name:"safe-html",rawName:"v-safe-html",value:(_vm.error),expression:"error"}]})]):_vm._e(),_vm._v(" "),_c('section',{staticClass:"gl-display-flex gl-flex-direction-column gl-justify-content-end gl-flex-grow-1 gl-border-b-0 gl-bg-gray-10"},[_c('transition-group',{staticClass:"gl-display-flex gl-flex-direction-column gl-justify-content-end",class:[
219
219
  {
220
220
  'gl-h-full': !_vm.hasMessages,
221
221
  'gl-h-auto': _vm.hasMessages,
222
- } ],attrs:{"tag":"div","name":"message"}},[_vm._l((_vm.conversations),function(conversation,index){return _c('gl-duo-chat-conversation',{key:("conversation-" + index),attrs:{"messages":conversation,"show-delimiter":index > 0},on:{"track-feedback":_vm.onTrackFeedback}})}),_vm._v(" "),(!_vm.hasMessages && !_vm.isLoading)?[_c('div',{key:"empty-state",staticClass:"gl-display-flex gl-flex-grow-1 gl-mr-auto gl-ml-auto"},[_c('gl-empty-state',{staticClass:"gl-align-self-center",attrs:{"svg-path":_vm.$options.emptySvg,"svg-height":145,"title":_vm.$options.i18n.CHAT_EMPTY_STATE_TITLE,"description":_vm.$options.i18n.CHAT_EMPTY_STATE_DESC}})],1),_vm._v(" "),_c('gl-duo-chat-predefined-prompts',{key:"predefined-prompts",attrs:{"prompts":_vm.predefinedPrompts},on:{"click":_vm.sendPredefinedPrompt}})]:_vm._e()],2),_vm._v(" "),_c('transition',{attrs:{"name":"loader"}},[(_vm.isLoading)?_c('gl-duo-chat-loader',{attrs:{"tool-name":_vm.toolName}}):_vm._e()],1)],1)],2),_vm._v(" "),(_vm.isChatAvailable)?_c('footer',{staticClass:"gl-drawer-footer gl-drawer-footer-sticky gl-p-5 gl-border-t gl-bg-gray-10",class:{ 'gl-drawer-body-scrim-on-footer': !_vm.scrolledToBottom },attrs:{"data-testid":"chat-footer"}},[_c('gl-form',{attrs:{"data-testid":"chat-prompt-form"},on:{"submit":function($event){$event.stopPropagation();$event.preventDefault();return _vm.sendChatPrompt.apply(null, arguments)}}},[_c('gl-form-input-group',{scopedSlots:_vm._u([{key:"append",fn:function(){return [_c('gl-button',{staticClass:"gl-absolute! gl-bottom-2 gl-right-2 gl-rounded-base!",attrs:{"icon":"paper-airplane","category":"primary","variant":"confirm","type":"submit","aria-label":_vm.$options.i18n.CHAT_SUBMIT_LABEL,"disabled":_vm.isLoading}})]},proxy:true}],null,false,2232229068)},[_c('div',{staticClass:"duo-chat-input gl-flex-grow-1 gl-vertical-align-top gl-max-w-full gl-min-h-8 gl-inset-border-1-gray-400 gl-rounded-base gl-bg-white",attrs:{"data-value":_vm.prompt}},[_c('gl-form-textarea',{staticClass:"gl-absolute gl-h-full! gl-py-4! gl-bg-transparent! gl-rounded-top-right-none gl-rounded-bottom-right-none gl-shadow-none!",class:{ 'gl-text-truncate': !_vm.prompt },attrs:{"data-testid":"chat-prompt-input","placeholder":_vm.$options.i18n.CHAT_PROMPT_PLACEHOLDER,"disabled":_vm.isLoading,"autofocus":""},nativeOn:{"keydown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }if($event.ctrlKey||$event.shiftKey||$event.altKey||$event.metaKey){ return null; }$event.preventDefault();return _vm.sendChatPrompt.apply(null, arguments)}},model:{value:(_vm.prompt),callback:function ($$v) {_vm.prompt=$$v;},expression:"prompt"}})],1)]),_vm._v(" "),_c('gl-form-text',{staticClass:"gl-text-gray-400 gl-line-height-20 gl-mt-3",attrs:{"data-testid":"chat-legal-disclaimer"}},[_vm._v(_vm._s(_vm.$options.i18n.CHAT_LEGAL_DISCLAIMER))])],1)],1):_vm._e()]):_vm._e()};
222
+ } ],attrs:{"tag":"div","name":"message"}},[_vm._l((_vm.conversations),function(conversation,index){return _c('gl-duo-chat-conversation',{key:("conversation-" + index),attrs:{"messages":conversation,"show-delimiter":index > 0},on:{"track-feedback":_vm.onTrackFeedback}})}),_vm._v(" "),(!_vm.hasMessages && !_vm.isLoading)?[_c('div',{key:"empty-state",staticClass:"gl-display-flex gl-flex-grow-1 gl-mr-auto gl-ml-auto"},[_c('gl-empty-state',{staticClass:"gl-align-self-center",attrs:{"svg-path":_vm.$options.emptySvg,"svg-height":145,"title":_vm.$options.i18n.CHAT_EMPTY_STATE_TITLE,"description":_vm.$options.i18n.CHAT_EMPTY_STATE_DESC}})],1),_vm._v(" "),_c('gl-duo-chat-predefined-prompts',{key:"predefined-prompts",attrs:{"prompts":_vm.predefinedPrompts},on:{"click":_vm.sendPredefinedPrompt}})]:_vm._e()],2),_vm._v(" "),_c('transition',{attrs:{"name":"loader"}},[(_vm.isLoading)?_c('gl-duo-chat-loader',{staticClass:"gl-px-0!",attrs:{"tool-name":_vm.toolName}}):_vm._e()],1)],1)],2),_vm._v(" "),(_vm.isChatAvailable)?_c('footer',{staticClass:"gl-drawer-footer gl-drawer-footer-sticky gl-p-5 gl-border-t gl-bg-gray-10",class:{ 'gl-drawer-body-scrim-on-footer': !_vm.scrolledToBottom },attrs:{"data-testid":"chat-footer"}},[_c('gl-form',{attrs:{"data-testid":"chat-prompt-form"},on:{"submit":function($event){$event.stopPropagation();$event.preventDefault();return _vm.sendChatPrompt.apply(null, arguments)}}},[_c('gl-form-input-group',{scopedSlots:_vm._u([{key:"append",fn:function(){return [_c('gl-button',{staticClass:"gl-absolute! gl-bottom-2 gl-right-2 gl-rounded-base!",attrs:{"icon":"paper-airplane","category":"primary","variant":"confirm","type":"submit","aria-label":_vm.$options.i18n.CHAT_SUBMIT_LABEL,"disabled":_vm.isLoading}})]},proxy:true}],null,false,2232229068)},[_c('div',{staticClass:"duo-chat-input gl-flex-grow-1 gl-vertical-align-top gl-max-w-full gl-min-h-8 gl-inset-border-1-gray-400 gl-rounded-base gl-bg-white",attrs:{"data-value":_vm.prompt}},[_c('gl-form-textarea',{staticClass:"gl-absolute gl-h-full! gl-py-4! gl-bg-transparent! gl-rounded-top-right-none gl-rounded-bottom-right-none gl-shadow-none!",class:{ 'gl-text-truncate': !_vm.prompt },attrs:{"data-testid":"chat-prompt-input","placeholder":_vm.$options.i18n.CHAT_PROMPT_PLACEHOLDER,"disabled":_vm.isLoading,"autofocus":""},nativeOn:{"keydown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }if($event.ctrlKey||$event.shiftKey||$event.altKey||$event.metaKey){ return null; }$event.preventDefault();return _vm.sendChatPrompt.apply(null, arguments)}},model:{value:(_vm.prompt),callback:function ($$v) {_vm.prompt=$$v;},expression:"prompt"}})],1)]),_vm._v(" "),_c('gl-form-text',{staticClass:"gl-text-gray-400 gl-line-height-20 gl-mt-3",attrs:{"data-testid":"chat-legal-disclaimer"}},[_vm._v(_vm._s(_vm.$options.i18n.CHAT_LEGAL_DISCLAIMER))])],1)],1):_vm._e()]):_vm._e()};
223
223
  var __vue_staticRenderFns__ = [];
224
224
 
225
225
  /* style */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Wed, 01 Nov 2023 01:30:41 GMT
3
+ * Generated on Thu, 02 Nov 2023 13:13:04 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Wed, 01 Nov 2023 01:30:41 GMT
3
+ * Generated on Thu, 02 Nov 2023 13:13:04 GMT
4
4
  */
5
5
 
6
6
  :root.gl-dark {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Wed, 01 Nov 2023 01:30:41 GMT
3
+ * Generated on Thu, 02 Nov 2023 13:13:04 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, 01 Nov 2023 01:30:41 GMT
3
+ * Generated on Thu, 02 Nov 2023 13:13:04 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, 01 Nov 2023 01:30:41 GMT
3
+ // Generated on Thu, 02 Nov 2023 13:13:04 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, 01 Nov 2023 01:30:41 GMT
3
+ // Generated on Thu, 02 Nov 2023 13:13:04 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": "67.3.2",
3
+ "version": "67.4.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -94,22 +94,22 @@
94
94
  "@gitlab/eslint-plugin": "19.2.0",
95
95
  "@gitlab/fonts": "^1.3.0",
96
96
  "@gitlab/stylelint-config": "5.0.1",
97
- "@gitlab/svgs": "3.68.0",
97
+ "@gitlab/svgs": "3.69.0",
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.5.1",
102
- "@storybook/addon-docs": "7.5.1",
103
- "@storybook/addon-essentials": "7.5.1",
104
- "@storybook/addon-storyshots": "7.5.1",
105
- "@storybook/addon-storyshots-puppeteer": "7.5.1",
106
- "@storybook/addon-viewport": "7.5.1",
107
- "@storybook/builder-webpack5": "7.5.1",
108
- "@storybook/theming": "7.5.1",
109
- "@storybook/vue": "7.5.1",
110
- "@storybook/vue-webpack5": "7.5.1",
111
- "@storybook/vue3": "7.5.1",
112
- "@storybook/vue3-webpack5": "7.5.1",
101
+ "@storybook/addon-a11y": "7.5.2",
102
+ "@storybook/addon-docs": "7.5.2",
103
+ "@storybook/addon-essentials": "7.5.2",
104
+ "@storybook/addon-storyshots": "7.5.2",
105
+ "@storybook/addon-storyshots-puppeteer": "7.5.2",
106
+ "@storybook/addon-viewport": "7.5.2",
107
+ "@storybook/builder-webpack5": "7.5.2",
108
+ "@storybook/theming": "7.5.2",
109
+ "@storybook/vue": "7.5.2",
110
+ "@storybook/vue-webpack5": "7.5.2",
111
+ "@storybook/vue3": "7.5.2",
112
+ "@storybook/vue3-webpack5": "7.5.2",
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.5.1",
163
+ "storybook": "7.5.2",
164
164
  "storybook-dark-mode": "3.0.1",
165
165
  "style-dictionary": "^3.8.0",
166
166
  "stylelint": "15.10.2",
@@ -106,9 +106,9 @@ export default {
106
106
  return Boolean(this.secondaryData.length);
107
107
  },
108
108
  barSeries() {
109
- return this.bars.map(({ name, data }, index) => {
109
+ return this.bars.map(({ name, data, stack }, index) => {
110
110
  const color = colorFromDefaultPalette(index);
111
- return generateBarSeries({ name, data, color });
111
+ return generateBarSeries({ name, data, stack, color });
112
112
  });
113
113
  },
114
114
  lineSeries() {
@@ -5,6 +5,7 @@ import {
5
5
  mockDefaultLineData,
6
6
  mockDefaultBarData,
7
7
  mockSecondaryData,
8
+ mockDefaultStackedBarData,
8
9
  } from '../../../utils/charts/mock_data';
9
10
  import Chart from '../chart/chart.vue';
10
11
  import ColumnChart from './column.vue';
@@ -106,6 +107,24 @@ describe('column chart component', () => {
106
107
  });
107
108
  });
108
109
 
110
+ describe('with multiple series data provided', () => {
111
+ it('should pass through custom stack series property', () => {
112
+ factory({
113
+ ...defaultChartProps,
114
+ bars: mockDefaultStackedBarData.map((series) => ({
115
+ ...series,
116
+ stack: 'some-custom-stack',
117
+ })),
118
+ });
119
+
120
+ const hasExpectedStackProperty = findChart()
121
+ .props('options')
122
+ .series.every((series) => series.stack === 'some-custom-stack');
123
+
124
+ expect(hasExpectedStackProperty).toBe(true);
125
+ });
126
+ });
127
+
109
128
  describe('tooltip', () => {
110
129
  it('displays the generic tooltip content', async () => {
111
130
  const params = {
@@ -2,6 +2,6 @@ This is a basic line chart.
2
2
 
3
3
  ### Implementation Details
4
4
 
5
- This component wraps the Gitlab UI `chart` component, which in turn wraps the ECharts component.
5
+ This component wraps the GitLab UI `chart` component, which in turn wraps the ECharts component.
6
6
 
7
7
  See the [chart](./?path=/story/charts-chart--default) component for more info.
@@ -3,6 +3,6 @@ This is a basic sparkline chart.
3
3
 
4
4
  ### Implementation Details
5
5
 
6
- This component wraps the Gitlab UI `chart` component, which in turn wraps the ECharts component.
6
+ This component wraps the GitLab UI `chart` component, which in turn wraps the ECharts component.
7
7
 
8
8
  See the [chart](./?path=/story/charts-chart--default) component for more info.
@@ -225,7 +225,7 @@ export default {
225
225
  v-if="!isHidden"
226
226
  id="chat-component"
227
227
  ref="drawer"
228
- class="markdown-code-block gl-drawer gl-drawer-default gl-max-h-full gl-bottom-0 gl-shadow-none gl-border-l gl-border-t duo-chat gl-h-auto"
228
+ class="markdown-code-block gl-drawer gl-drawer-default gl-max-h-full gl-bottom-0 gl-shadow-none gl-border-l gl-border-t duo-chat"
229
229
  role="complementary"
230
230
  data-testid="chat-component"
231
231
  @scroll="handleScrollingTrottled"
@@ -322,7 +322,7 @@ export default {
322
322
  </template>
323
323
  </transition-group>
324
324
  <transition name="loader">
325
- <gl-duo-chat-loader v-if="isLoading" :tool-name="toolName" />
325
+ <gl-duo-chat-loader v-if="isLoading" :tool-name="toolName" class="gl-px-0!" />
326
326
  </transition>
327
327
  </section>
328
328
  </div>