@gitlab/duo-ui 10.23.0 → 10.23.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.
@@ -1,100 +0,0 @@
1
- import VueResizable from 'vue-resizable';
2
- import SideRail from '../side_rail/side_rail';
3
- import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
4
-
5
- var script = {
6
- name: 'DuoLayout',
7
- components: {
8
- VueResizable,
9
- SideRail
10
- },
11
- props: {
12
- /**
13
- * Determines if the component should be resizable. When true, it renders inside
14
- * a `vue-resizable` wrapper; otherwise, a standard `div` is used.
15
- */
16
- shouldRenderResizable: {
17
- type: Boolean,
18
- required: false,
19
- default: false
20
- },
21
- /**
22
- * Defines the dimensions of the layout container when resizable.
23
- * By default, the height is set to match the height of the browser window,
24
- * and the width is fixed at 400px. The `top` position is left undefined,
25
- * allowing it to be dynamically adjusted if needed.
26
- */
27
- dimensions: {
28
- type: Object,
29
- required: false,
30
- default: () => ({
31
- width: undefined,
32
- height: undefined,
33
- top: undefined,
34
- left: undefined,
35
- maxWidth: undefined,
36
- minWidth: 400,
37
- maxHeight: undefined,
38
- minHeight: 400
39
- })
40
- },
41
- /**
42
- * Whether the layout is hidden
43
- */
44
- isHidden: {
45
- type: Boolean,
46
- required: false,
47
- default: false
48
- }
49
- },
50
- methods: {
51
- updateSize(e) {
52
- /**
53
- * Emitted when the layout is resized
54
- * @param {Object} e The resize event data
55
- */
56
- this.$emit('resize', e);
57
- }
58
- }
59
- };
60
-
61
- /* script */
62
- const __vue_script__ = script;
63
-
64
- /* template */
65
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (!_vm.isHidden)?_c(_vm.shouldRenderResizable ? 'vue-resizable' : 'div',{tag:"component",class:{
66
- 'duo-chat-resizable': _vm.shouldRenderResizable,
67
- 'non-resizable-wrapper': !_vm.shouldRenderResizable,
68
- },attrs:{"width":_vm.shouldRenderResizable ? _vm.dimensions.width : null,"height":_vm.shouldRenderResizable ? _vm.dimensions.height : null,"max-width":_vm.shouldRenderResizable ? _vm.dimensions.maxWidth : null,"max-height":_vm.shouldRenderResizable ? _vm.dimensions.maxHeight : null,"min-width":_vm.shouldRenderResizable ? _vm.dimensions.minWidth : null,"left":_vm.shouldRenderResizable ? _vm.dimensions.left : null,"top":_vm.shouldRenderResizable ? _vm.dimensions.top : null,"fit-parent":true,"min-height":_vm.shouldRenderResizable ? _vm.dimensions.minHeight : null,"active":_vm.shouldRenderResizable ? ['l', 't', 'lt'] : null,"data-testid":"duo-layout-component"},on:{"resize:end":_vm.updateSize}},[_c('aside',{staticClass:"markdown-code-block duo-chat gl-align-items gl-bottom-0 gl-flex gl-h-full gl-max-h-full gl-flex-row gl-bg-strong gl-py-3 gl-pl-3"},[_c('main',{staticClass:"content flex-none gl-flex gl-h-full gl-min-w-0 gl-grow gl-overflow-y-auto gl-rounded-[1rem] gl-bg-neutral-0"},[_vm._t("mainview")],2),_vm._v(" "),_c('aside',{staticClass:"gl-h-full gl-min-h-full gl-bg-strong gl-px-3 gl-py-2"},[_vm._t("siderail")],2)])]):_vm._e()};
69
- var __vue_staticRenderFns__ = [];
70
-
71
- /* style */
72
- const __vue_inject_styles__ = undefined;
73
- /* scoped */
74
- const __vue_scope_id__ = undefined;
75
- /* module identifier */
76
- const __vue_module_identifier__ = undefined;
77
- /* functional template */
78
- const __vue_is_functional_template__ = false;
79
- /* style inject */
80
-
81
- /* style inject SSR */
82
-
83
- /* style inject shadow dom */
84
-
85
-
86
-
87
- const __vue_component__ = __vue_normalize__(
88
- { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
89
- __vue_inject_styles__,
90
- __vue_script__,
91
- __vue_scope_id__,
92
- __vue_is_functional_template__,
93
- __vue_module_identifier__,
94
- false,
95
- undefined,
96
- undefined,
97
- undefined
98
- );
99
-
100
- export default __vue_component__;
@@ -1,67 +0,0 @@
1
- import { GlTooltipDirective, GlButtonGroup, GlButton, GlAvatar } from '@gitlab/ui';
2
- import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
3
-
4
- var script = {
5
- name: 'SideRail',
6
- directives: {
7
- GlTooltip: GlTooltipDirective
8
- },
9
- components: {
10
- GlButtonGroup,
11
- GlButton,
12
- GlAvatar
13
- },
14
- props: {
15
- /**
16
- * String to display the empty state of recent content
17
- */
18
- buttons: {
19
- type: Object,
20
- required: false,
21
- default: () => ({})
22
- }
23
- },
24
- methods: {
25
- onClick(buttonName) {
26
- this.$emit('click', buttonName);
27
- }
28
- }
29
- };
30
-
31
- /* script */
32
- const __vue_script__ = script;
33
-
34
- /* template */
35
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-button-group',{attrs:{"vertical":true}},[_vm._l((_vm.buttons),function(button,buttonName){return [(button.dividerBefore)?_c('div',{key:(buttonName + "-divider"),staticClass:"gl-mx-auto gl-my-3 gl-h-1 gl-w-5 gl-border-0 gl-border-t-1 gl-border-solid gl-border-[#7759C233]",attrs:{"name":"divider"}}):_vm._e(),_vm._v(" "),(button.render)?_c('gl-button',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip"}],key:(buttonName + "-button"),attrs:{"title":button.title,"category":"tertiary","variant":"default","size":"medium","icon":button.icon,"active-class":"gl-active"},on:{"click":function($event){return _vm.onClick(buttonName)}}},[(button.avatar)?_c('gl-avatar',{attrs:{"size":32,"entity-name":button.avatar,"shape":"circle"}}):_vm._e()],1):_vm._e()]})],2)};
36
- var __vue_staticRenderFns__ = [];
37
-
38
- /* style */
39
- const __vue_inject_styles__ = undefined;
40
- /* scoped */
41
- const __vue_scope_id__ = undefined;
42
- /* module identifier */
43
- const __vue_module_identifier__ = undefined;
44
- /* functional template */
45
- const __vue_is_functional_template__ = false;
46
- /* style inject */
47
-
48
- /* style inject SSR */
49
-
50
- /* style inject shadow dom */
51
-
52
-
53
-
54
- const __vue_component__ = __vue_normalize__(
55
- { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
56
- __vue_inject_styles__,
57
- __vue_script__,
58
- __vue_scope_id__,
59
- __vue_is_functional_template__,
60
- __vue_module_identifier__,
61
- false,
62
- undefined,
63
- undefined,
64
- undefined
65
- );
66
-
67
- export default __vue_component__;
File without changes
@@ -1,95 +0,0 @@
1
- <script>
2
- import VueResizable from 'vue-resizable';
3
- import SideRail from '../side_rail/side_rail.vue';
4
-
5
- export default {
6
- name: 'DuoLayout',
7
- components: {
8
- VueResizable,
9
- SideRail,
10
- },
11
- props: {
12
- /**
13
- * Determines if the component should be resizable. When true, it renders inside
14
- * a `vue-resizable` wrapper; otherwise, a standard `div` is used.
15
- */
16
- shouldRenderResizable: {
17
- type: Boolean,
18
- required: false,
19
- default: false,
20
- },
21
- /**
22
- * Defines the dimensions of the layout container when resizable.
23
- * By default, the height is set to match the height of the browser window,
24
- * and the width is fixed at 400px. The `top` position is left undefined,
25
- * allowing it to be dynamically adjusted if needed.
26
- */
27
- dimensions: {
28
- type: Object,
29
- required: false,
30
- default: () => ({
31
- width: undefined,
32
- height: undefined,
33
- top: undefined,
34
- left: undefined,
35
- maxWidth: undefined,
36
- minWidth: 400,
37
- maxHeight: undefined,
38
- minHeight: 400,
39
- }),
40
- },
41
- /**
42
- * Whether the layout is hidden
43
- */
44
- isHidden: {
45
- type: Boolean,
46
- required: false,
47
- default: false,
48
- },
49
- },
50
- methods: {
51
- updateSize(e) {
52
- /**
53
- * Emitted when the layout is resized
54
- * @param {Object} e The resize event data
55
- */
56
- this.$emit('resize', e);
57
- },
58
- },
59
- };
60
- </script>
61
- <template>
62
- <component
63
- :is="shouldRenderResizable ? 'vue-resizable' : 'div'"
64
- v-if="!isHidden"
65
- :width="shouldRenderResizable ? dimensions.width : null"
66
- :height="shouldRenderResizable ? dimensions.height : null"
67
- :max-width="shouldRenderResizable ? dimensions.maxWidth : null"
68
- :max-height="shouldRenderResizable ? dimensions.maxHeight : null"
69
- :min-width="shouldRenderResizable ? dimensions.minWidth : null"
70
- :left="shouldRenderResizable ? dimensions.left : null"
71
- :top="shouldRenderResizable ? dimensions.top : null"
72
- :fit-parent="true"
73
- :min-height="shouldRenderResizable ? dimensions.minHeight : null"
74
- :class="{
75
- 'duo-chat-resizable': shouldRenderResizable,
76
- 'non-resizable-wrapper': !shouldRenderResizable,
77
- }"
78
- :active="shouldRenderResizable ? ['l', 't', 'lt'] : null"
79
- data-testid="duo-layout-component"
80
- @resize:end="updateSize"
81
- >
82
- <aside
83
- class="markdown-code-block duo-chat gl-align-items gl-bottom-0 gl-flex gl-h-full gl-max-h-full gl-flex-row gl-bg-strong gl-py-3 gl-pl-3"
84
- >
85
- <main
86
- class="content flex-none gl-flex gl-h-full gl-min-w-0 gl-grow gl-overflow-y-auto gl-rounded-[1rem] gl-bg-neutral-0"
87
- >
88
- <slot name="mainview"></slot>
89
- </main>
90
- <aside class="gl-h-full gl-min-h-full gl-bg-strong gl-px-3 gl-py-2">
91
- <slot name="siderail"></slot>
92
- </aside>
93
- </aside>
94
- </component>
95
- </template>
@@ -1,56 +0,0 @@
1
- <script>
2
- import { GlButtonGroup, GlButton, GlAvatar, GlTooltipDirective } from '@gitlab/ui';
3
-
4
- export default {
5
- name: 'SideRail',
6
- directives: {
7
- GlTooltip: GlTooltipDirective,
8
- },
9
- components: {
10
- GlButtonGroup,
11
- GlButton,
12
- GlAvatar,
13
- },
14
- props: {
15
- /**
16
- * String to display the empty state of recent content
17
- */
18
- buttons: {
19
- type: Object,
20
- required: false,
21
- default: () => ({}),
22
- },
23
- },
24
- methods: {
25
- onClick(buttonName) {
26
- this.$emit('click', buttonName);
27
- },
28
- },
29
- };
30
- </script>
31
- <template>
32
- <gl-button-group :vertical="true">
33
- <template v-for="(button, buttonName) in buttons">
34
- <div
35
- v-if="button.dividerBefore"
36
- :key="`${buttonName}-divider`"
37
- class="gl-mx-auto gl-my-3 gl-h-1 gl-w-5 gl-border-0 gl-border-t-1 gl-border-solid gl-border-[#7759C233]"
38
- name="divider"
39
- ></div>
40
- <gl-button
41
- v-if="button.render"
42
- :key="`${buttonName}-button`"
43
- v-gl-tooltip
44
- :title="button.title"
45
- category="tertiary"
46
- variant="default"
47
- size="medium"
48
- :icon="button.icon"
49
- active-class="gl-active"
50
- @click="onClick(buttonName)"
51
- >
52
- <gl-avatar v-if="button.avatar" :size="32" :entity-name="button.avatar" shape="circle" />
53
- </gl-button>
54
- </template>
55
- </gl-button-group>
56
- </template>