@dataloop-ai/components 0.16.43 → 0.16.45
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
CHANGED
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
v-if="hasIcon"
|
|
26
26
|
:size="iconSizePX"
|
|
27
27
|
:color="iconColor || textColor"
|
|
28
|
-
:class="{ 'dl-button-icon': hasContent }"
|
|
29
28
|
:icon="icon"
|
|
30
29
|
:style="cssButtonVars"
|
|
31
30
|
/>
|
|
@@ -33,11 +32,17 @@
|
|
|
33
32
|
v-if="hasLabel"
|
|
34
33
|
ref="buttonLabelRef"
|
|
35
34
|
class="dl-button-label"
|
|
36
|
-
:class="{
|
|
35
|
+
:class="{
|
|
36
|
+
'dl-button-no-wrap': noWrap
|
|
37
|
+
}"
|
|
37
38
|
>
|
|
38
39
|
{{ buttonLabel }}
|
|
39
40
|
</span>
|
|
40
|
-
<slot
|
|
41
|
+
<slot
|
|
42
|
+
:class="{
|
|
43
|
+
'dl-button-label--icon-sibling': hasIcon
|
|
44
|
+
}"
|
|
45
|
+
/>
|
|
41
46
|
</span>
|
|
42
47
|
</button>
|
|
43
48
|
<dl-tooltip
|
|
@@ -293,6 +298,7 @@ export default defineComponent({
|
|
|
293
298
|
overflow: hidden;
|
|
294
299
|
text-overflow: ellipsis;
|
|
295
300
|
}
|
|
301
|
+
|
|
296
302
|
.dl-button {
|
|
297
303
|
padding: var(--dl-button-padding);
|
|
298
304
|
border-radius: var(--dl-button-border-radius);
|
|
@@ -313,25 +319,30 @@ export default defineComponent({
|
|
|
313
319
|
vertical-align: middle;
|
|
314
320
|
transition: all ease-in 0.15s;
|
|
315
321
|
justify-content: center;
|
|
322
|
+
|
|
316
323
|
&:active {
|
|
317
324
|
transition: all ease-in 0.15s;
|
|
318
325
|
color: var(--dl-button-text-color-pressed) !important;
|
|
319
326
|
background-color: var(--dl-button-bg-pressed) !important;
|
|
320
327
|
border-color: var(--dl-button-border-pressed) !important;
|
|
328
|
+
|
|
321
329
|
& > span > i {
|
|
322
330
|
transition: all ease-in 0.15s;
|
|
323
331
|
}
|
|
324
332
|
}
|
|
333
|
+
|
|
325
334
|
&:hover:enabled:not(:active) {
|
|
326
335
|
color: var(--dl-button-text-color-hover);
|
|
327
336
|
background-color: var(--dl-button-bg-hover);
|
|
328
337
|
border-color: var(--dl-button-border-hover);
|
|
338
|
+
|
|
329
339
|
& .dl-button-label {
|
|
330
340
|
transition: all ease-in 0.15s;
|
|
331
341
|
color: var(--dl-button-color-hover);
|
|
332
342
|
}
|
|
333
343
|
}
|
|
334
344
|
}
|
|
345
|
+
|
|
335
346
|
.dl-button-content {
|
|
336
347
|
display: flex;
|
|
337
348
|
text-align: center;
|
|
@@ -344,11 +355,12 @@ export default defineComponent({
|
|
|
344
355
|
z-index: 0;
|
|
345
356
|
user-select: none !important;
|
|
346
357
|
min-width: 1.5em;
|
|
358
|
+
gap: var(--dl-button-gap, 7px);
|
|
347
359
|
}
|
|
348
360
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
}
|
|
361
|
+
//.dl-button-label--icon-sibling {
|
|
362
|
+
// margin: var(--dl-button-icon-margin, 0px 0px 0px 7px);
|
|
363
|
+
//}
|
|
352
364
|
|
|
353
365
|
.dl-button-container {
|
|
354
366
|
display: inline-block;
|
|
@@ -217,13 +217,6 @@ export default defineComponent({
|
|
|
217
217
|
background-color: var(--dl-chip-bg-color);
|
|
218
218
|
border: var(--dl-chip-border);
|
|
219
219
|
|
|
220
|
-
.first-letter-capitalized {
|
|
221
|
-
&::first-letter,
|
|
222
|
-
& > *::first-letter {
|
|
223
|
-
text-transform: capitalize;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
220
|
&--content {
|
|
228
221
|
cursor: default;
|
|
229
222
|
width: auto;
|
|
@@ -237,6 +230,14 @@ export default defineComponent({
|
|
|
237
230
|
overflow: hidden;
|
|
238
231
|
}
|
|
239
232
|
}
|
|
233
|
+
|
|
234
|
+
.dl-chip.first-letter-capitalized {
|
|
235
|
+
&::first-letter,
|
|
236
|
+
& > *::first-letter {
|
|
237
|
+
text-transform: capitalize;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
240
241
|
.dl-chip-remove-icon-container {
|
|
241
242
|
cursor: var(--dl-chip-left-icon-cursor);
|
|
242
243
|
position: absolute;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<DlButton
|
|
11
11
|
:size="buttonSize"
|
|
12
12
|
color="dl-color-negative"
|
|
13
|
-
label="
|
|
13
|
+
label="Contained text filled"
|
|
14
14
|
@click="log"
|
|
15
15
|
/>
|
|
16
16
|
<DlButton
|
|
@@ -230,6 +230,18 @@
|
|
|
230
230
|
/>
|
|
231
231
|
</dl-button>
|
|
232
232
|
</div>
|
|
233
|
+
<div>
|
|
234
|
+
<h3>Button with icon no label and menu</h3>
|
|
235
|
+
<p>should not have extra margin in right</p>
|
|
236
|
+
<dl-button icon="icon-dl-search">
|
|
237
|
+
<dl-menu>
|
|
238
|
+
<dl-list>
|
|
239
|
+
<dl-list-item>item 1</dl-list-item>
|
|
240
|
+
<dl-list-item> item 2</dl-list-item>
|
|
241
|
+
</dl-list>
|
|
242
|
+
</dl-menu>
|
|
243
|
+
</dl-button>
|
|
244
|
+
</div>
|
|
233
245
|
</div>
|
|
234
246
|
</template>
|
|
235
247
|
|
|
@@ -237,9 +249,16 @@
|
|
|
237
249
|
import { defineComponent, reactive } from 'vue-demi'
|
|
238
250
|
import { DlButton, DlBadge, DlIcon } from '../components'
|
|
239
251
|
import { ButtonSizes } from '../components/basic/DlButton/utils'
|
|
252
|
+
import DlMenu from '../components/essential/DlMenu/DlMenu.vue'
|
|
253
|
+
import DlList from '../components/essential/DlList/DlList.vue'
|
|
254
|
+
import DlListItem from '../components/basic/DlListItem/DlListItem.vue'
|
|
255
|
+
|
|
240
256
|
export default defineComponent({
|
|
241
257
|
name: 'DlButtonDemo',
|
|
242
258
|
components: {
|
|
259
|
+
DlListItem,
|
|
260
|
+
DlList,
|
|
261
|
+
DlMenu,
|
|
243
262
|
DlButton,
|
|
244
263
|
DlBadge,
|
|
245
264
|
DlIcon
|
|
@@ -260,6 +279,7 @@ export default defineComponent({
|
|
|
260
279
|
flex-wrap: wrap;
|
|
261
280
|
min-width: 0;
|
|
262
281
|
max-width: 100%;
|
|
282
|
+
|
|
263
283
|
& > button,
|
|
264
284
|
& > div.dl-chip {
|
|
265
285
|
margin: 0 0 0 8px;
|
package/src/demo/DlChipDemo.vue
CHANGED
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
<DlChip
|
|
67
67
|
removable
|
|
68
68
|
icon="icon-dl-search"
|
|
69
|
-
label="
|
|
69
|
+
label="chip filled"
|
|
70
70
|
@remove="log('test')"
|
|
71
71
|
/>
|
|
72
72
|
<DlChip
|
|
@@ -78,19 +78,19 @@
|
|
|
78
78
|
removable
|
|
79
79
|
icon="icon-dl-search"
|
|
80
80
|
outlined
|
|
81
|
-
label="
|
|
81
|
+
label="chip outlined"
|
|
82
82
|
@remove="log('test')"
|
|
83
83
|
/>
|
|
84
84
|
<DlChip
|
|
85
85
|
removable
|
|
86
86
|
icon="icon-dl-search"
|
|
87
87
|
disabled
|
|
88
|
-
label="
|
|
88
|
+
label="chip disabled"
|
|
89
89
|
@remove="log('test')"
|
|
90
90
|
/>
|
|
91
91
|
<DlChip
|
|
92
92
|
removable
|
|
93
|
-
label="
|
|
93
|
+
label="ellipsed Chip with a multiple words"
|
|
94
94
|
icon="icon-dl-search"
|
|
95
95
|
@remove="log('test')"
|
|
96
96
|
/>
|
|
@@ -130,7 +130,17 @@
|
|
|
130
130
|
<DlChip
|
|
131
131
|
ref="removableChip"
|
|
132
132
|
removable
|
|
133
|
-
label="
|
|
133
|
+
label="ellipsed Chip with a multiple words"
|
|
134
|
+
/>
|
|
135
|
+
</div>
|
|
136
|
+
<h4>Chips with no text transform</h4>
|
|
137
|
+
<div
|
|
138
|
+
class="col"
|
|
139
|
+
style="margin-bottom: 30px"
|
|
140
|
+
>
|
|
141
|
+
<DlChip
|
|
142
|
+
label="ellipsed Chip with a multiple words"
|
|
143
|
+
transform="none"
|
|
134
144
|
/>
|
|
135
145
|
</div>
|
|
136
146
|
<div class="col">
|