@dataloop-ai/components 0.16.28 → 0.16.30

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.28",
3
+ "version": "0.16.30",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -3,13 +3,13 @@
3
3
  :id="uuid"
4
4
  class="dl-button-container"
5
5
  style="pointer-events: none"
6
+ :style="cssButtonVars"
6
7
  >
7
8
  <button
8
9
  v-if="hasContent || hasIcon"
9
10
  :tabindex="tabIndex"
10
11
  :aria-disabled="disabled ? 'true' : 'false'"
11
12
  :disabled="disabled"
12
- :style="cssButtonVars"
13
13
  style="pointer-events: auto"
14
14
  class="dl-button"
15
15
  @click="onClick"
@@ -232,6 +232,7 @@ export default defineComponent({
232
232
  }
233
233
 
234
234
  return {
235
+ '--dl-btn-container-width': this.fluid ? '100%' : 'auto',
235
236
  '--dl-button-padding': this.dense
236
237
  ? '0'
237
238
  : this.padding
@@ -351,5 +352,6 @@ export default defineComponent({
351
352
 
352
353
  .dl-button-container {
353
354
  display: inline-block;
355
+ width: var(--dl-btn-container-width);
354
356
  }
355
357
  </style>
@@ -1,11 +1,6 @@
1
- <template>
2
- <div :id="uuid">
3
- <component :is="activeTab" />
4
- </div>
5
- </template>
6
1
  <script lang="ts">
7
2
  import { v4 } from 'uuid'
8
- import { defineComponent, VNode, isVue2 } from 'vue-demi'
3
+ import { defineComponent, VNode, isVue2, h } from 'vue-demi'
9
4
  import { textSlot } from '../../../utils/render'
10
5
 
11
6
  export default defineComponent({
@@ -30,12 +25,24 @@ export default defineComponent({
30
25
  const tabIndex = this.panels.findIndex(
31
26
  (item) => item?.data?.key === this.modelValue
32
27
  )
33
- return [this.panels[tabIndex]] as any
28
+ return this.panels[tabIndex] as any
34
29
  }
35
30
  return (this.panels as any[])[0].children.find(
36
31
  (panel: any) => panel.key === this.modelValue
37
32
  )
38
33
  }
34
+ },
35
+ render(createElement: Function) {
36
+ const renderFn = isVue2 ? createElement : h
37
+ return renderFn(
38
+ 'div',
39
+ {
40
+ attrs: {
41
+ id: this.uuid
42
+ }
43
+ },
44
+ [this.activeTab]
45
+ )
39
46
  }
40
47
  })
41
48
  </script>
@@ -57,6 +57,7 @@
57
57
  style="
58
58
  display: flex;
59
59
  gap: 10px;
60
+ width: 100%;
60
61
  justify-content: center;
61
62
  margin-top: 50px;
62
63
  "
@@ -155,6 +156,7 @@
155
156
  style="
156
157
  display: flex;
157
158
  gap: 10px;
159
+ width: 100%;
158
160
  justify-content: center;
159
161
  margin-top: 50px;
160
162
  "