@gitlab/ui 78.3.0 → 78.5.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
+ # [78.5.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v78.4.0...v78.5.0) (2024-03-25)
2
+
3
+
4
+ ### Features
5
+
6
+ * publish internal Tailwind utils ([069353a](https://gitlab.com/gitlab-org/gitlab-ui/commit/069353a3c64e1add589db9dd776570e874d80067))
7
+
8
+ # [78.4.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v78.3.0...v78.4.0) (2024-03-25)
9
+
10
+
11
+ ### Features
12
+
13
+ * **GlDuoChat:** trim the prompt ([89b1253](https://gitlab.com/gitlab-org/gitlab-ui/commit/89b125332b9674d97848cdb8586338147fa10b20))
14
+
1
15
  # [78.3.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v78.2.3...v78.3.0) (2024-03-22)
2
16
 
3
17
 
@@ -269,7 +269,7 @@ var script = {
269
269
  *
270
270
  * @param {String} prompt The user prompt to send.
271
271
  */
272
- this.$emit('send-chat-prompt', this.prompt);
272
+ this.$emit('send-chat-prompt', this.prompt.trim());
273
273
  this.setPromptAndFocus();
274
274
  }
275
275
  },
@@ -0,0 +1,2 @@
1
+ .gl-fixed{position:fixed}.\!gl-absolute{position:absolute!important}.gl-absolute{position:absolute}.gl-relative{position:relative}.gl-bottom-0{bottom:0}.gl-bottom-2{bottom:.25rem}.gl-left-0{left:0}.gl-right-2{right:.25rem}.gl-float-right{float:right}
2
+ /*# sourceMappingURL=tailwind.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["tailwind.css"],"names":[],"mappings":"AAAA,UAAA,cAAmB,CAAnB,eAAA,2BAAmB,CAAnB,aAAA,iBAAmB,CAAnB,aAAA,iBAAmB,CAAnB,aAAA,QAAmB,CAAnB,aAAA,aAAmB,CAAnB,WAAA,MAAmB,CAAnB,YAAA,YAAmB,CAAnB,gBAAA,WAAmB","file":"tailwind.css","sourcesContent":["@tailwind utilities;\n"]}
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 22 Mar 2024 12:26:32 GMT
3
+ * Generated on Mon, 25 Mar 2024 16:59:13 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 22 Mar 2024 12:26:32 GMT
3
+ * Generated on Mon, 25 Mar 2024 16:59:13 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 Fri, 22 Mar 2024 12:26:32 GMT
3
+ * Generated on Mon, 25 Mar 2024 16:59:13 GMT
4
4
  */
5
5
 
6
6
  export const DATA_VIZ_GREEN_50 = "#133a03";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 22 Mar 2024 12:26:32 GMT
3
+ * Generated on Mon, 25 Mar 2024 16:59:13 GMT
4
4
  */
5
5
 
6
6
  export const DATA_VIZ_GREEN_50 = "#ddfab7";
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Fri, 22 Mar 2024 12:26:32 GMT
3
+ // Generated on Mon, 25 Mar 2024 16:59:13 GMT
4
4
 
5
5
  $gl-text-tertiary: #737278 !default;
6
6
  $gl-text-secondary: #89888d !default;
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Fri, 22 Mar 2024 12:26:32 GMT
3
+ // Generated on Mon, 25 Mar 2024 16:59:13 GMT
4
4
 
5
5
  $gl-text-tertiary: #89888d !default;
6
6
  $gl-text-secondary: #737278 !default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "78.3.0",
3
+ "version": "78.5.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -93,16 +93,16 @@
93
93
  },
94
94
  "devDependencies": {
95
95
  "@arkweid/lefthook": "0.7.7",
96
- "@babel/core": "^7.24.0",
96
+ "@babel/core": "^7.24.3",
97
97
  "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
98
98
  "@babel/plugin-proposal-optional-chaining": "^7.21.0",
99
- "@babel/preset-env": "^7.24.0",
100
- "@babel/preset-react": "^7.23.3",
99
+ "@babel/preset-env": "^7.24.3",
100
+ "@babel/preset-react": "^7.24.1",
101
101
  "@cypress/grep": "^4.0.1",
102
102
  "@gitlab/eslint-plugin": "19.4.0",
103
103
  "@gitlab/fonts": "^1.3.0",
104
104
  "@gitlab/stylelint-config": "6.1.0",
105
- "@gitlab/svgs": "3.90.0",
105
+ "@gitlab/svgs": "3.91.0",
106
106
  "@rollup/plugin-commonjs": "^11.1.0",
107
107
  "@rollup/plugin-node-resolve": "^7.1.3",
108
108
  "@rollup/plugin-replace": "^2.3.2",
@@ -1,5 +1,4 @@
1
- import clusterPopoverSvg from '@gitlab/svgs/dist/illustrations/cluster_popover.svg';
2
- import serviceDeskCalloutSvg from '@gitlab/svgs/dist/illustrations/service_desk_callout.svg';
1
+ import emptyServiceDeskCallout from '@gitlab/svgs/dist/illustrations/empty-state/empty-service-desk-md.svg';
3
2
  import GlButton from '../button/button.vue';
4
3
  import { bannerVariants } from '../../../utils/constants';
5
4
  import GlBanner from './banner.vue';
@@ -23,7 +22,7 @@ const generateProps = ({
23
22
  buttonAttributes = { target: '_blank' },
24
23
  buttonText = 'Upgrade your plan',
25
24
  buttonLink = 'https://gitlab.com',
26
- svgPath = serviceDeskCalloutSvg,
25
+ svgPath = emptyServiceDeskCallout,
27
26
  variant = GlBanner.props.variant.default,
28
27
  } = {}) => ({
29
28
  title,
@@ -51,7 +50,7 @@ NoImage.args = generateProps({
51
50
 
52
51
  export const Introduction = Template.bind({});
53
52
  Introduction.args = generateProps({
54
- svgPath: clusterPopoverSvg,
53
+ svgPath: emptyServiceDeskCallout,
55
54
  variant: bannerVariants[1],
56
55
  });
57
56
 
@@ -62,14 +62,16 @@ const drawerContent = generateDrawerContent([
62
62
 
63
63
  const drawerContentShortList = generateDrawerContent(['One', 'Two', 'Three']);
64
64
 
65
- const createSidebarTemplate = (content) => `
65
+ const createSidebarTemplate = (content, { extraBindings = {} } = {}) => `
66
66
  <gl-drawer
67
67
  :open="open"
68
68
  :header-height="headerHeight"
69
69
  :header-sticky="headerSticky"
70
70
  :z-index="zIndex"
71
71
  :variant="variant"
72
- @opened="opened"
72
+ ${Object.entries(extraBindings)
73
+ .map(([key, value]) => `${key}="${value}"`)
74
+ .join('\n')}
73
75
  @close="close">${content}</gl-drawer>
74
76
  `;
75
77
 
@@ -124,10 +126,13 @@ export const Default = (_args, { viewMode }) => ({
124
126
  template: `
125
127
  <div :data-opened-count="timesOpened">
126
128
  <gl-button @click="toggle">Toggle Drawer</gl-button>
127
- ${createSidebarTemplate(`
129
+ ${createSidebarTemplate(
130
+ `
128
131
  <template #title>List Settings</template>
129
132
  ${drawerContent}
130
- `)}
133
+ `,
134
+ { extraBindings: { '@opened': 'opened' } }
135
+ )}
131
136
  </div>`,
132
137
  });
133
138
  Default.args = generateProps();
@@ -307,6 +307,17 @@ describe('GlDuoChat', () => {
307
307
  describe('submit', () => {
308
308
  const ENTER = 'Enter';
309
309
 
310
+ it('trims the prompt', () => {
311
+ const question = ' foo bar ';
312
+ const expectedPrompt = 'foo bar';
313
+ createComponent({
314
+ propsData: { isChatAvailable: true, messages: [] },
315
+ });
316
+ setPromptInput(question);
317
+ clickSubmit();
318
+ expect(wrapper.emitted('send-chat-prompt')).toEqual([[expectedPrompt]]);
319
+ });
320
+
310
321
  it.each`
311
322
  trigger | event | action | expectEmitted
312
323
  ${() => clickSubmit()} | ${'Submit button click'} | ${'submit'} | ${[[promptStr]]}
@@ -285,7 +285,7 @@ export default {
285
285
  *
286
286
  * @param {String} prompt The user prompt to send.
287
287
  */
288
- this.$emit('send-chat-prompt', this.prompt);
288
+ this.$emit('send-chat-prompt', this.prompt.trim());
289
289
  this.setPromptAndFocus();
290
290
  }
291
291
  },
@@ -1 +0,0 @@
1
-