@dataloop-ai/components 0.18.145 → 0.19.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/package.json +4 -1
- package/src/assets/constants.scss +25 -26
- package/src/assets/globals.scss +58 -56
- package/src/assets/grid.css +1 -1
- package/src/assets/grid.scss +4 -4
- package/src/components/basic/DlAccordion/DlAccordion.vue +10 -3
- package/src/components/basic/DlEmptyState/types.ts +1 -1
- package/src/components/basic/DlGrid/DlGrid.vue +2 -1
- package/src/components/basic/DlPopup/DlPopup.vue +159 -396
- package/src/components/basic/DlWidget/DlWidget.vue +2 -1
- package/src/components/basic/utils.ts +0 -9
- package/src/components/blocks/DlLabelPicker/DlLabelPicker.vue +127 -0
- package/src/components/blocks/DlLabelPicker/index.ts +3 -0
- package/src/components/blocks/DlLabelPicker/types.ts +6 -0
- package/src/components/blocks/index.ts +1 -0
- package/src/components/blocks/types.ts +1 -0
- package/src/components/compound/DlCodeEditor/README.md +5 -4
- package/src/components/compound/DlCodeEditor/styles/themes-base16.css +16934 -11289
- package/src/components/compound/DlCodeEditor/styles/themes.css +5122 -3448
- package/src/components/compound/DlInput/DlInput.vue +609 -178
- package/src/components/compound/DlInput/components/InputFileElement.vue +97 -0
- package/src/components/compound/DlInput/types.ts +12 -0
- package/src/components/compound/DlInput/utils.ts +117 -0
- package/src/components/compound/DlSearches/DlSearch/DlSearch.vue +10 -1
- package/src/components/compound/DlSearches/DlSmartSearch/components/DlSmartSearchInput.vue +3 -3
- package/src/components/compound/DlSearches/DlSmartSearch/utils/highlightSyntax.ts +1 -1
- package/src/components/compound/DlSlider/sliderStyles.scss +92 -92
- package/src/components/compound/DlTable/DlTable.vue +701 -358
- package/src/components/compound/DlTable/components/DlTd.vue +11 -9
- package/src/components/compound/DlTable/components/DlTh.vue +22 -21
- package/src/components/compound/DlTable/components/SortableJS.vue +33 -0
- package/src/components/compound/DlTable/hooks/tableActions.ts +3 -3
- package/src/components/compound/DlTable/hooks/tableColumnSelection.ts +3 -4
- package/src/components/compound/DlTable/hooks/use-sortable.ts +152 -0
- package/src/components/compound/DlTable/styles/dl-table-styles.scss +372 -377
- package/src/components/compound/DlTable/types.ts +6 -0
- package/src/components/compound/DlTable/utils/getCellValue.ts +27 -0
- package/src/components/compound/DlTable/utils/insertAtIndex.ts +22 -0
- package/src/components/compound/DlTable/utils/tableClasses.ts +22 -0
- package/src/components/compound/DlToast/api/useToast.ts +10 -4
- package/src/components/compound/DlToast/components/ToastComponent.vue +26 -21
- package/src/components/compound/DlToast/utils/render.ts +15 -8
- package/src/components/compound/DlTreeTable/DlTreeTable.vue +708 -323
- package/src/components/compound/DlTreeTable/components/DlTdTree.vue +10 -9
- package/src/components/compound/DlTreeTable/components/DlTrTree.vue +13 -0
- package/src/components/compound/DlTreeTable/emits.ts +2 -2
- package/src/components/compound/DlTreeTable/utils/index.ts +6 -0
- package/src/components/compound/DlTreeTable/utils/moveNestedRow.ts +95 -0
- package/src/components/compound/DlTreeTable/utils/trSpacing.ts +12 -1
- package/src/components/compound/DlTreeTable/utils/treeTableRowSelection.ts +10 -7
- package/src/components/compound/DlTreeTable/views/DlTrTreeView.vue +52 -58
- package/src/components/essential/DlMenu/DlMenu.vue +25 -0
- package/src/components/index.ts +1 -0
- package/src/components/shared/DlVirtualScroll/DlVirtualScroll.vue +2 -1
- package/src/components/shared/DlVirtualScroll/styles/dl-virtual-scroll-styles.scss +62 -41
- package/src/components/types.ts +1 -0
- package/src/demos/DlAccordionDemo.vue +32 -0
- package/src/demos/DlButtonDemo.vue +7 -0
- package/src/demos/DlDemoPage.vue +1 -0
- package/src/demos/DlInputDemo.vue +122 -64
- package/src/demos/DlLabelPickerDemo.vue +46 -0
- package/src/demos/DlPopupDemo.vue +94 -4
- package/src/demos/DlSearchDemo.vue +0 -1
- package/src/demos/DlTableDemo.vue +261 -162
- package/src/demos/DlToastDemo.vue +28 -1
- package/src/demos/DlTreeTableDemo.vue +266 -262
- package/src/demos/DlVirtualScrollDemo.vue +1 -4
- package/src/demos/index.ts +3 -1
- package/src/hooks/use-model-toggle.ts +26 -62
- package/src/utils/browse-nested-nodes.ts +26 -0
- package/src/utils/draggable-table.ts +100 -488
- package/src/utils/get-element-above.ts +8 -0
- package/src/utils/getSlotByVersion.ts +11 -0
- package/src/utils/index.ts +4 -0
- package/src/utils/keyCodes.ts +1 -1
- package/src/utils/remove-child-nodes.ts +5 -0
- package/src/utils/render-fn.ts +46 -0
- package/src/utils/resizable-table.ts +110 -0
- package/src/utils/selection.ts +196 -0
- package/src/utils/swap-nodes.ts +11 -0
- package/src/utils/table-columns.ts +209 -0
- package/src/components/compound/DlTable/utils/ResizableManager.ts +0 -236
- package/src/components/compound/DlTable/utils/index.ts +0 -1
- package/src/components/compound/DlTable/utils/props.ts +0 -120
- package/src/components/compound/DlTreeTable/props.ts +0 -134
- package/src/components/compound/DlTreeTable/utils/flatTreeData.ts +0 -19
|
@@ -90,6 +90,38 @@
|
|
|
90
90
|
is-empty
|
|
91
91
|
/>
|
|
92
92
|
</div>
|
|
93
|
+
<div style="width: 100%">
|
|
94
|
+
<dl-accordion default-opened>
|
|
95
|
+
<template #header>
|
|
96
|
+
Custom header content
|
|
97
|
+
<dl-switch
|
|
98
|
+
v-model="switchModel"
|
|
99
|
+
:value="2"
|
|
100
|
+
/>
|
|
101
|
+
</template>
|
|
102
|
+
|
|
103
|
+
<dl-accordion default-opened>
|
|
104
|
+
<template #header>
|
|
105
|
+
Custom header content
|
|
106
|
+
<dl-switch
|
|
107
|
+
v-model="switchModel"
|
|
108
|
+
:value="2"
|
|
109
|
+
/>
|
|
110
|
+
</template>
|
|
111
|
+
<template #default>
|
|
112
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
|
|
113
|
+
sed do eiusmod tempor incididunt ut labore et dolore
|
|
114
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud
|
|
115
|
+
exercitation ullamco laboris nisi ut aliquip ex ea
|
|
116
|
+
commodo consequat. Duis aute irure dolor in
|
|
117
|
+
reprehenderit in voluptate velit esse cillum dolore eu
|
|
118
|
+
fugiat nulla pariatur. Excepteur sint occaecat cupidatat
|
|
119
|
+
non proident, sunt in culpa qui officia deserunt mollit
|
|
120
|
+
anim id est laborum.
|
|
121
|
+
</template>
|
|
122
|
+
</dl-accordion>
|
|
123
|
+
</dl-accordion>
|
|
124
|
+
</div>
|
|
93
125
|
</div>
|
|
94
126
|
</template>
|
|
95
127
|
|
package/src/demos/DlDemoPage.vue
CHANGED
|
@@ -1,45 +1,78 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
+
<dl-input
|
|
4
|
+
placeholder="placeholder input readonly"
|
|
5
|
+
readonly
|
|
6
|
+
/>
|
|
7
|
+
|
|
3
8
|
<dl-input
|
|
4
9
|
v-model="textInputValue"
|
|
10
|
+
max-width="100%"
|
|
5
11
|
style="width: 920px"
|
|
6
|
-
|
|
12
|
+
title="Input with full width"
|
|
13
|
+
placeholder="and suggestions"
|
|
7
14
|
size="l"
|
|
8
15
|
margin="20px"
|
|
9
|
-
title="Input Title"
|
|
10
16
|
required
|
|
11
17
|
tooltip="Quis fugiat et non eu proident sit et amet."
|
|
12
18
|
top-message="Pariatur consequat non sit aliqua labore ad reprehenderit deserunt ullamco incididunt non irure laborum deserunt."
|
|
13
19
|
info-message="Ipsum amet quis velit amet. Anim consectetur nostrud sunt eu non non consequat sint eu amet."
|
|
14
20
|
:auto-suggest-items="[
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
{
|
|
22
|
+
suggestion: 'clickable',
|
|
23
|
+
image: 'https://picsum.photos/100/100',
|
|
24
|
+
click: true
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
suggestion: '@suggestion',
|
|
28
|
+
image: 'https://picsum.photos/100/100',
|
|
29
|
+
click: true
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
suggestion: '@john-doe',
|
|
33
|
+
image: 'https://picsum.photos/100/100',
|
|
34
|
+
click: true
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
suggestion: 'unclickable',
|
|
38
|
+
image: 'https://picsum.photos/100/100'
|
|
39
|
+
}
|
|
20
40
|
]"
|
|
21
41
|
show-counter
|
|
22
42
|
:max-length="20"
|
|
43
|
+
@suggestion-click="log"
|
|
23
44
|
/>
|
|
24
45
|
<dl-input
|
|
25
46
|
v-model="saveInputValue"
|
|
26
47
|
style="width: 220px"
|
|
27
|
-
|
|
48
|
+
title="Expandable input"
|
|
49
|
+
placeholder="with file upload"
|
|
28
50
|
size="l"
|
|
29
|
-
|
|
51
|
+
:files="files"
|
|
52
|
+
expandable
|
|
53
|
+
@file-update="updateFiles"
|
|
30
54
|
>
|
|
31
55
|
<template #append>
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
56
|
+
<label for="file-upload">
|
|
57
|
+
<dl-icon
|
|
58
|
+
:inline="false"
|
|
59
|
+
class="attach-icon"
|
|
60
|
+
icon="icon-dl-attach"
|
|
61
|
+
/>
|
|
62
|
+
</label>
|
|
63
|
+
<input
|
|
64
|
+
id="file-upload"
|
|
65
|
+
style="display: none"
|
|
66
|
+
type="file"
|
|
67
|
+
@change="addFile"
|
|
68
|
+
>
|
|
36
69
|
</template>
|
|
37
70
|
</dl-input>
|
|
38
71
|
<dl-input
|
|
39
72
|
v-model="passFieldValue"
|
|
40
73
|
title="Password"
|
|
41
74
|
style="width: 220px"
|
|
42
|
-
placeholder="
|
|
75
|
+
placeholder="Input type password"
|
|
43
76
|
size="m"
|
|
44
77
|
type="password"
|
|
45
78
|
error
|
|
@@ -48,66 +81,35 @@
|
|
|
48
81
|
/>
|
|
49
82
|
<dl-input
|
|
50
83
|
v-model="warningFieldValue"
|
|
51
|
-
title="
|
|
84
|
+
title="Fixed Height Example"
|
|
52
85
|
style="width: 220px"
|
|
53
|
-
placeholder="
|
|
86
|
+
placeholder="Fixed height"
|
|
87
|
+
height="100px"
|
|
54
88
|
size="m"
|
|
55
|
-
|
|
56
|
-
warning-message="Something isn't right."
|
|
57
|
-
info-message="This won't show, error is true"
|
|
89
|
+
info-message="This input has fixed height"
|
|
58
90
|
optional
|
|
91
|
+
expandable
|
|
59
92
|
/>
|
|
60
93
|
|
|
61
|
-
<
|
|
94
|
+
<span>size S with long text (no max width)</span>
|
|
62
95
|
<dl-input
|
|
63
|
-
v-model="
|
|
96
|
+
v-model="sizeSFieldValue"
|
|
64
97
|
title="Warning Example"
|
|
65
|
-
style="width: 220px"
|
|
66
|
-
placeholder="Select option"
|
|
67
98
|
size="s"
|
|
68
99
|
warning
|
|
69
100
|
warning-message="Something isn't right."
|
|
70
101
|
info-message="This won't show, error is true"
|
|
71
102
|
optional
|
|
72
103
|
/>
|
|
73
|
-
<dl-input
|
|
74
|
-
v-model="errorFieldValue"
|
|
75
|
-
title="Error Example"
|
|
76
|
-
style="width: 220px"
|
|
77
|
-
placeholder="Select option"
|
|
78
|
-
size="m"
|
|
79
|
-
error
|
|
80
|
-
error-message="Error message is the strongest."
|
|
81
|
-
warning
|
|
82
|
-
warning-message="This won't show, error is true"
|
|
83
|
-
info-message="This won't show, error is true"
|
|
84
|
-
/>
|
|
85
|
-
<dl-input
|
|
86
|
-
style="width: 220px"
|
|
87
|
-
placeholder="Select option"
|
|
88
|
-
title="Min"
|
|
89
|
-
required
|
|
90
|
-
size="s"
|
|
91
|
-
error
|
|
92
|
-
error-message="Error message is the strongest."
|
|
93
|
-
/>
|
|
94
|
-
<dl-input
|
|
95
|
-
style="width: 440px"
|
|
96
|
-
placeholder="Select option"
|
|
97
|
-
title="Min"
|
|
98
|
-
size="s"
|
|
99
|
-
error
|
|
100
|
-
error-message="Error message is the strongest."
|
|
101
|
-
/>
|
|
102
104
|
<p>input in a row with button</p>
|
|
103
105
|
<div
|
|
104
106
|
class="row"
|
|
105
107
|
style="align-items: center"
|
|
106
108
|
>
|
|
107
109
|
<dl-input
|
|
110
|
+
max-width="220px"
|
|
108
111
|
class="input-parts"
|
|
109
112
|
style="width: 440px"
|
|
110
|
-
placeholder="Select option"
|
|
111
113
|
title="Min"
|
|
112
114
|
dense
|
|
113
115
|
size="s"
|
|
@@ -119,20 +121,37 @@
|
|
|
119
121
|
size="m"
|
|
120
122
|
/>
|
|
121
123
|
</div>
|
|
124
|
+
<div
|
|
125
|
+
class="row"
|
|
126
|
+
style="align-items: center"
|
|
127
|
+
>
|
|
128
|
+
<dl-input
|
|
129
|
+
max-width="220px"
|
|
130
|
+
class="input-parts"
|
|
131
|
+
style="width: 440px"
|
|
132
|
+
title="Min expandable"
|
|
133
|
+
dense
|
|
134
|
+
expandable
|
|
135
|
+
size="s"
|
|
136
|
+
/>
|
|
137
|
+
<dl-button
|
|
138
|
+
dense
|
|
139
|
+
flat
|
|
140
|
+
icon="icon-dl-add"
|
|
141
|
+
size="m"
|
|
142
|
+
/>
|
|
143
|
+
</div>
|
|
122
144
|
<dl-input
|
|
145
|
+
:model-value="'Readonly text'"
|
|
123
146
|
title="Readonly"
|
|
124
147
|
style="width: 220px"
|
|
125
|
-
placeholder="Readonly state"
|
|
126
148
|
size="m"
|
|
127
149
|
readonly
|
|
128
150
|
/>
|
|
129
151
|
|
|
130
152
|
<p>input in a limited size and action slot size m</p>
|
|
131
|
-
<div style="align-items: center; width: 250px; overflow:
|
|
132
|
-
<dl-input
|
|
133
|
-
class="input-parts"
|
|
134
|
-
placeholder="Select option"
|
|
135
|
-
>
|
|
153
|
+
<div style="align-items: center; width: 250px; overflow: scroll">
|
|
154
|
+
<dl-input class="input-parts">
|
|
136
155
|
<template #action>
|
|
137
156
|
<dl-button
|
|
138
157
|
dense
|
|
@@ -183,30 +202,69 @@
|
|
|
183
202
|
</div>
|
|
184
203
|
</template>
|
|
185
204
|
<script lang="ts">
|
|
205
|
+
import { v4 } from 'uuid'
|
|
186
206
|
import { defineComponent, ref } from 'vue-demi'
|
|
187
|
-
import { DlInput,
|
|
207
|
+
import { DlInput, DlButton, DlIcon } from '../components'
|
|
208
|
+
import { DlInputFile } from '../components/compound/DlInput/types'
|
|
188
209
|
export default defineComponent({
|
|
189
210
|
name: 'DlInputDemo',
|
|
190
211
|
components: {
|
|
191
212
|
DlInput,
|
|
192
|
-
|
|
193
|
-
|
|
213
|
+
DlButton,
|
|
214
|
+
DlIcon
|
|
194
215
|
},
|
|
195
216
|
setup() {
|
|
196
217
|
const textInputValue = ref<string>('')
|
|
197
218
|
const passFieldValue = ref<string>('')
|
|
198
219
|
const warningFieldValue = ref<string>('')
|
|
220
|
+
const sizeSFieldValue = ref<string>('')
|
|
199
221
|
const errorFieldValue = ref<string>('')
|
|
200
222
|
const saveInputValue = ref<string>('')
|
|
201
223
|
|
|
224
|
+
const files = ref<DlInputFile[]>([])
|
|
225
|
+
const addFile = (e: Event) => {
|
|
226
|
+
const input = e.target as HTMLInputElement
|
|
227
|
+
const file = input.files[0]
|
|
228
|
+
if (file) {
|
|
229
|
+
const reader = new FileReader()
|
|
230
|
+
|
|
231
|
+
reader.onload = (e) => {
|
|
232
|
+
const arrayBuffer = e.target.result
|
|
233
|
+
files.value.push({
|
|
234
|
+
id: v4(),
|
|
235
|
+
name: file.name,
|
|
236
|
+
image: null,
|
|
237
|
+
data: arrayBuffer as ArrayBuffer
|
|
238
|
+
})
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
reader.readAsArrayBuffer(file)
|
|
242
|
+
}
|
|
243
|
+
input.value = ''
|
|
244
|
+
}
|
|
245
|
+
const updateFiles = (val: DlInputFile[]) => {
|
|
246
|
+
console.log(val)
|
|
247
|
+
files.value = val
|
|
248
|
+
}
|
|
249
|
+
|
|
202
250
|
return {
|
|
251
|
+
log: console.log,
|
|
203
252
|
textInputValue,
|
|
204
253
|
passFieldValue,
|
|
205
254
|
warningFieldValue,
|
|
206
255
|
errorFieldValue,
|
|
207
|
-
saveInputValue
|
|
256
|
+
saveInputValue,
|
|
257
|
+
sizeSFieldValue,
|
|
258
|
+
files,
|
|
259
|
+
updateFiles,
|
|
260
|
+
addFile
|
|
208
261
|
}
|
|
209
262
|
}
|
|
210
263
|
})
|
|
211
264
|
</script>
|
|
212
|
-
<style
|
|
265
|
+
<style>
|
|
266
|
+
.attach-icon {
|
|
267
|
+
margin-top: 7px;
|
|
268
|
+
cursor: pointer;
|
|
269
|
+
}
|
|
270
|
+
</style>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div>Label picker component</div>
|
|
4
|
+
<DlLabelPicker :items="items" />
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
import { DlLabelPicker } from '../components'
|
|
10
|
+
import { defineComponent, ref } from 'vue-demi'
|
|
11
|
+
const rows = [
|
|
12
|
+
{
|
|
13
|
+
identifier: 'a',
|
|
14
|
+
displayLabel: 'Frozen Yogurt',
|
|
15
|
+
color: '#ff0000',
|
|
16
|
+
children: [
|
|
17
|
+
{
|
|
18
|
+
identifier: 'b',
|
|
19
|
+
displayLabel: 'hello',
|
|
20
|
+
color: '#ffff00'
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
identifier: 'c',
|
|
26
|
+
displayLabel: 'test 2',
|
|
27
|
+
color: '#00ff00',
|
|
28
|
+
children: []
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
identifier: 'd',
|
|
32
|
+
displayLabel: 'test 3',
|
|
33
|
+
color: '#ff00ff',
|
|
34
|
+
children: []
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
export default defineComponent({
|
|
38
|
+
components: {
|
|
39
|
+
DlLabelPicker
|
|
40
|
+
},
|
|
41
|
+
setup() {
|
|
42
|
+
const items = ref(rows)
|
|
43
|
+
return { items }
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
</script>
|
|
@@ -1,14 +1,39 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<dl-button label="
|
|
3
|
+
<dl-button label="Controlled Popup">
|
|
4
4
|
<dl-popup
|
|
5
|
+
:model-value="showing"
|
|
5
6
|
class="TestID"
|
|
6
|
-
:style="{ '--dl-popup-padding': '0px' }"
|
|
7
7
|
title="Edit Item Description"
|
|
8
8
|
additional-info="Some additional information"
|
|
9
9
|
subtitle="Some text for better explanation."
|
|
10
10
|
with-close-button
|
|
11
11
|
draggable
|
|
12
|
+
@update:model-value="handleClose"
|
|
13
|
+
@close-button-click="handleClear"
|
|
14
|
+
>
|
|
15
|
+
<dl-text-area
|
|
16
|
+
v-model="text"
|
|
17
|
+
:max-length="100"
|
|
18
|
+
show-counter
|
|
19
|
+
placeholder="Type your text"
|
|
20
|
+
width="203px"
|
|
21
|
+
/>
|
|
22
|
+
<template #footer>
|
|
23
|
+
<dl-button fluid>
|
|
24
|
+
Save
|
|
25
|
+
</dl-button>
|
|
26
|
+
</template>
|
|
27
|
+
</dl-popup>
|
|
28
|
+
</dl-button>
|
|
29
|
+
<dl-button label="Open Popup">
|
|
30
|
+
<dl-popup
|
|
31
|
+
class="TestID"
|
|
32
|
+
:style="{ '--dl-popup-padding': '0px' }"
|
|
33
|
+
title="Edit Item Description"
|
|
34
|
+
with-close-button
|
|
35
|
+
additional-info="Some additional information"
|
|
36
|
+
subtitle="Some text for better explanation."
|
|
12
37
|
@close-button-click="handleClear"
|
|
13
38
|
>
|
|
14
39
|
<dl-text-area
|
|
@@ -34,7 +59,6 @@
|
|
|
34
59
|
is-empty
|
|
35
60
|
:empty-state-props="{
|
|
36
61
|
responsive: true,
|
|
37
|
-
style: 'min-height: 200px; max-width: 300px;',
|
|
38
62
|
bgSize: '130px',
|
|
39
63
|
bgImage: `url(https://raw.githubusercontent.com/dataloop-ai/icons/main/assets/usage.svg)`,
|
|
40
64
|
title: 'Lorem ipsum',
|
|
@@ -138,6 +162,68 @@
|
|
|
138
162
|
</template>
|
|
139
163
|
</dl-popup>
|
|
140
164
|
</dl-button>
|
|
165
|
+
<dl-button label="Open Popup with offset">
|
|
166
|
+
<dl-popup
|
|
167
|
+
title="Edit Item Description"
|
|
168
|
+
additional-info="Some additional information"
|
|
169
|
+
subtitle="Some text for better explanation."
|
|
170
|
+
with-close-button
|
|
171
|
+
:offset="[-50, 50]"
|
|
172
|
+
>
|
|
173
|
+
<dl-text-area
|
|
174
|
+
v-model="text"
|
|
175
|
+
:max-length="100"
|
|
176
|
+
show-counter
|
|
177
|
+
placeholder="Type your text"
|
|
178
|
+
width="203px"
|
|
179
|
+
/>
|
|
180
|
+
<template #close-button>
|
|
181
|
+
<dl-button
|
|
182
|
+
flat
|
|
183
|
+
style="padding-bottom: 0; padding-top: 0"
|
|
184
|
+
label="clear"
|
|
185
|
+
size="m"
|
|
186
|
+
@click="handleClear"
|
|
187
|
+
/>
|
|
188
|
+
</template>
|
|
189
|
+
<template #footer>
|
|
190
|
+
<dl-button fluid>
|
|
191
|
+
Save
|
|
192
|
+
</dl-button>
|
|
193
|
+
</template>
|
|
194
|
+
</dl-popup>
|
|
195
|
+
</dl-button>
|
|
196
|
+
<dl-button label="Open Popup with no padding">
|
|
197
|
+
<dl-popup
|
|
198
|
+
title="Edit Item Description"
|
|
199
|
+
additional-info="Some additional information"
|
|
200
|
+
subtitle="Some text for better explanation."
|
|
201
|
+
with-close-button
|
|
202
|
+
:style="{ '--dl-popup-padding': '0px' }"
|
|
203
|
+
>
|
|
204
|
+
<dl-text-area
|
|
205
|
+
v-model="text"
|
|
206
|
+
:max-length="100"
|
|
207
|
+
show-counter
|
|
208
|
+
placeholder="Type your text"
|
|
209
|
+
width="203px"
|
|
210
|
+
/>
|
|
211
|
+
<template #close-button>
|
|
212
|
+
<dl-button
|
|
213
|
+
flat
|
|
214
|
+
style="padding-bottom: 0; padding-top: 0"
|
|
215
|
+
label="clear"
|
|
216
|
+
size="m"
|
|
217
|
+
@click="handleClear"
|
|
218
|
+
/>
|
|
219
|
+
</template>
|
|
220
|
+
<template #footer>
|
|
221
|
+
<dl-button fluid>
|
|
222
|
+
Save
|
|
223
|
+
</dl-button>
|
|
224
|
+
</template>
|
|
225
|
+
</dl-popup>
|
|
226
|
+
</dl-button>
|
|
141
227
|
</div>
|
|
142
228
|
</template>
|
|
143
229
|
<script lang="ts">
|
|
@@ -152,12 +238,16 @@ export default defineComponent({
|
|
|
152
238
|
},
|
|
153
239
|
data() {
|
|
154
240
|
return {
|
|
155
|
-
text: ''
|
|
241
|
+
text: '',
|
|
242
|
+
showing: false
|
|
156
243
|
}
|
|
157
244
|
},
|
|
158
245
|
methods: {
|
|
159
246
|
handleClear() {
|
|
160
247
|
this.text = ''
|
|
248
|
+
},
|
|
249
|
+
handleClose(val: boolean) {
|
|
250
|
+
this.showing = val
|
|
161
251
|
}
|
|
162
252
|
}
|
|
163
253
|
})
|