@dataloop-ai/components 0.16.44 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataloop-ai/components",
3
- "version": "0.16.44",
3
+ "version": "0.16.45",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -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="{ 'dl-button-no-wrap': noWrap }"
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
- .dl-button-icon {
350
- margin: var(--dl-button-icon-margin, 0px 7px 0px 0px);
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;
@@ -10,7 +10,7 @@
10
10
  <DlButton
11
11
  :size="buttonSize"
12
12
  color="dl-color-negative"
13
- label="COntained text filled"
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;