@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 +14 -0
- package/dist/components/experimental/duo/chat/duo_chat.js +1 -1
- package/dist/tailwind.css +2 -0
- package/dist/tailwind.css.map +1 -0
- package/dist/tokens/css/tokens.css +1 -1
- package/dist/tokens/css/tokens.dark.css +1 -1
- package/dist/tokens/js/tokens.dark.js +1 -1
- package/dist/tokens/js/tokens.js +1 -1
- package/dist/tokens/scss/_tokens.dark.scss +1 -1
- package/dist/tokens/scss/_tokens.scss +1 -1
- package/package.json +5 -5
- package/src/components/base/banner/banner.stories.js +3 -4
- package/src/components/base/drawer/drawer.stories.js +9 -4
- package/src/components/experimental/duo/chat/duo_chat.spec.js +11 -0
- package/src/components/experimental/duo/chat/duo_chat.vue +1 -1
- package/dist/utility_classes.js +0 -1
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
|
|
|
@@ -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"]}
|
package/dist/tokens/js/tokens.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "78.
|
|
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.
|
|
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.
|
|
100
|
-
"@babel/preset-react": "^7.
|
|
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.
|
|
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
|
|
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 =
|
|
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:
|
|
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
|
-
|
|
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]]}
|
package/dist/utility_classes.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|