@dataloop-ai/components 0.16.23 → 0.16.24

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.23",
3
+ "version": "0.16.24",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -67,11 +67,13 @@
67
67
  </span>
68
68
  </label>
69
69
  <div
70
- v-if="subLabel"
70
+ v-if="hasSubLabel"
71
71
  :style="subLabelStyle"
72
72
  class="sub-text"
73
73
  >
74
- <span>{{ subLabel }}</span>
74
+ <slot name="sub-label">
75
+ <span>{{ subLabel }}</span>
76
+ </slot>
75
77
  </div>
76
78
  </div>
77
79
  </template>
@@ -96,7 +98,7 @@ export default defineComponent({
96
98
  id: { type: [String, Number], default: null },
97
99
  modelValue: { type: ValueTypes, required: false, default: null },
98
100
  label: { default: null, type: String },
99
- subLabel: { type: String, default: '' },
101
+ subLabel: { type: String, default: null },
100
102
  toggleIndeterminate: { type: Boolean, default: false },
101
103
  indeterminateValue: { type: ValueTypes, default: null },
102
104
  value: { type: ValueTypes, default: null },
@@ -159,6 +161,9 @@ export default defineComponent({
159
161
  hasLabel(): boolean {
160
162
  return !!this.label || !!this.$slots.default
161
163
  },
164
+ hasSubLabel(): boolean {
165
+ return !!this.subLabel || !!this.$slots['sub-label']
166
+ },
162
167
  subLabelStyle(): Record<string, string> {
163
168
  return {
164
169
  'font-size': this.subLabelSize