@dataloop-ai/components 0.17.82 → 0.17.84

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.17.82",
3
+ "version": "0.17.84",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -26,6 +26,7 @@
26
26
  <span v-show="!!tooltip.length">
27
27
  <dl-icon
28
28
  icon="icon-dl-info"
29
+ :inline="false"
29
30
  class="tooltip-icon"
30
31
  size="12px"
31
32
  />
@@ -82,6 +83,9 @@
82
83
  @focus="handleSearchFocus"
83
84
  @blur="handleSearchBlur"
84
85
  >
86
+ <dl-tooltip v-if="disabled">
87
+ {{ disabledTooltip }}
88
+ </dl-tooltip>
85
89
  <div
86
90
  v-if="hasSelectedSlot"
87
91
  style="width: 100%"
@@ -129,6 +133,7 @@
129
133
  >
130
134
  <dl-icon
131
135
  :icon="dropdownIcon"
136
+ :color="chevronIconColor"
132
137
  class="expand-icon"
133
138
  :inline="false"
134
139
  :size="withoutBorders ? '12px' : '16px'"
@@ -391,7 +396,8 @@ export default defineComponent({
391
396
  withoutDropdownIconPadding: { type: Boolean, default: false },
392
397
  clearButtonTooltip: { type: Boolean, default: false },
393
398
  dropdownMaxHeight: { type: String, default: '30vh' },
394
- preserveSearch: { type: Boolean, default: false }
399
+ preserveSearch: { type: Boolean, default: false },
400
+ disabledTooltip: { type: String, default: 'Disabled' }
395
401
  },
396
402
  emits: [
397
403
  'search-focus',
@@ -613,7 +619,8 @@ export default defineComponent({
613
619
  '--dl-select-width': this.width,
614
620
  '--dl-select-expand-icon-width': this.withoutDropdownIconPadding
615
621
  ? '16px'
616
- : '28px'
622
+ : '28px',
623
+ '--dl-menu-scrollbar-width': '10px'
617
624
  }
618
625
  },
619
626
  asteriskClasses(): string[] {
@@ -637,6 +644,9 @@ export default defineComponent({
637
644
  return !!this.$scopedSlots.prepend && !this.isSmall
638
645
  }
639
646
  return !!this.$slots.prepend && !this.isSmall
647
+ },
648
+ chevronIconColor() {
649
+ return `${this.disabled ? 'dl-color-disabled' : null}`
640
650
  }
641
651
  },
642
652
  watch: {
@@ -452,6 +452,9 @@ export default defineComponent({
452
452
  border-radius: 2px;
453
453
  overflow-y: auto;
454
454
  overflow-x: hidden;
455
+ &::-webkit-scrollbar {
456
+ width: var(--dl-menu-scrollbar-width, 5px);
457
+ }
455
458
  outline: 0;
456
459
  max-height: 65vh;
457
460
  z-index: var(--dl-z-index-menu);
@@ -64,19 +64,23 @@
64
64
  {
65
65
  label: 'Status 1',
66
66
  value: 1,
67
- badgeColor: 'dl-color-disabled'
67
+ badgeColor: 'var(--dl-color-disabled)'
68
68
  },
69
69
  {
70
70
  label: 'Status 2',
71
71
  value: 2,
72
- badgeColor: 'dl-color-secondary'
72
+ badgeColor: 'var(--dl-color-secondary)'
73
73
  },
74
74
  {
75
75
  label: 'Status 3',
76
76
  value: 3,
77
- badgeColor: 'dl-color-positive'
77
+ badgeColor: 'var(--dl-color-positive)'
78
78
  },
79
- { label: 'Status 4', value: 4, badgeColor: 'dl-color-warning' }
79
+ {
80
+ label: 'Status 4',
81
+ value: 4,
82
+ badgeColor: 'var(--dl-color-warning)'
83
+ }
80
84
  ]"
81
85
  required
82
86
  >
@@ -125,7 +129,6 @@
125
129
  :options="searchOptions"
126
130
  size="m"
127
131
  multiselect
128
- style="background-color: beige"
129
132
  placeholder="contributors"
130
133
  search
131
134
  />
@@ -179,34 +182,42 @@
179
182
  subLabel: 'not so high',
180
183
  label: 'High',
181
184
  value: 'high',
182
- bgColor: 'dl-color-negative'
185
+ labelColor: 'var(--dl-color-darker)',
186
+ subLabelColor: 'var(--dl-color-lighter)'
183
187
  },
184
188
  {
185
189
  subLabel: 'not so medium',
186
190
  label: 'Medium',
187
191
  value: 'medium',
188
- bgColor: 'dl-color-warning',
189
- textColor: 'dl-color-darker'
192
+ labelColor: 'var(--dl-color-darker)',
193
+ subLabelColor: 'var(--dl-color-lighter)'
190
194
  },
191
195
  {
192
196
  subLabel: 'not so low',
193
197
  label: 'Low',
194
198
  value: 'low',
195
- bgColor: 'dl-color-positive',
196
- textColor: 'dl-color-darker'
199
+ labelColor: 'var(--dl-color-darker)',
200
+ subLabelColor: 'var(--dl-color-lighter)'
197
201
  }
198
202
  ]"
199
203
  >
200
204
  <template #option="scope">
201
205
  <div style="padding: 5px 0px">
202
- <div>{{ scope.opt.label }}</div>
203
- <div>{{ scope.opt.subLabel }}</div>
206
+ <div :style="`color: ${scope.opt.labelColor}`">
207
+ {{ scope.opt.label }}
208
+ </div>
209
+ <div
210
+ :style="`color: ${scope.opt.subLabelColor}; font-size: 10px`"
211
+ >
212
+ {{ scope.opt.subLabel }}
213
+ </div>
204
214
  </div>
205
215
  </template>
206
216
  </dl-select>
207
217
  With tooltip
208
218
  <dl-select
209
219
  v-model="selectedOption"
220
+ title="With tooltip"
210
221
  :tooltip="'Test Me'"
211
222
  :options="[
212
223
  {
@@ -523,6 +534,9 @@ export default defineComponent({
523
534
  },
524
535
  handleInput(e: Event) {
525
536
  return (e.target as HTMLInputElement).value
537
+ },
538
+ log(e: any) {
539
+ console.log(e)
526
540
  }
527
541
  }
528
542
  })
@@ -59,42 +59,42 @@ export const parseSmartQuery = (query: string) => {
59
59
  case term.includes('>='):
60
60
  [key, value] = term.split('>=').map((x) => x.trim())
61
61
  pureValue = GeneratePureValue(value)
62
- if (pureValue) {
62
+ if (pureValue !== null) {
63
63
  andQuery[key] = { $gte: pureValue }
64
64
  }
65
65
  break
66
66
  case term.includes('<='):
67
67
  [key, value] = term.split('<=').map((x) => x.trim())
68
68
  pureValue = GeneratePureValue(value)
69
- if (pureValue) {
69
+ if (pureValue !== null) {
70
70
  andQuery[key] = { $lte: pureValue }
71
71
  }
72
72
  break
73
73
  case term.includes('>'):
74
74
  [key, value] = term.split('>').map((x) => x.trim())
75
75
  pureValue = GeneratePureValue(value)
76
- if (pureValue) {
76
+ if (pureValue !== null) {
77
77
  andQuery[key] = { $gt: pureValue }
78
78
  }
79
79
  break
80
80
  case term.includes('<'):
81
81
  [key, value] = term.split('<').map((x) => x.trim())
82
82
  pureValue = GeneratePureValue(value)
83
- if (pureValue) {
83
+ if (pureValue !== null) {
84
84
  andQuery[key] = { $lt: pureValue }
85
85
  }
86
86
  break
87
87
  case term.includes('!='):
88
88
  [key, value] = term.split('!=').map((x) => x.trim())
89
89
  pureValue = GeneratePureValue(value)
90
- if (pureValue) {
90
+ if (pureValue !== null) {
91
91
  andQuery[key] = { $ne: pureValue }
92
92
  }
93
93
  break
94
94
  case term.includes('='):
95
95
  [key, value] = term.split('=').map((x) => x.trim())
96
96
  pureValue = GeneratePureValue(value)
97
- if (pureValue) {
97
+ if (pureValue !== null) {
98
98
  andQuery[key] = pureValue
99
99
  }
100
100
  break
@@ -112,7 +112,7 @@ export const parseSmartQuery = (query: string) => {
112
112
  .filter((x) => x)
113
113
 
114
114
  pureValue = GeneratePureValue(queryValue)
115
- if (pureValue && Array.isArray(pureValue)) {
115
+ if (pureValue !== null && Array.isArray(pureValue)) {
116
116
  andQuery[key] = { $nin: pureValue }
117
117
  }
118
118
  } else {
@@ -124,7 +124,7 @@ export const parseSmartQuery = (query: string) => {
124
124
  .filter((x) => x)
125
125
 
126
126
  pureValue = GeneratePureValue(queryValue)
127
- if (pureValue && Array.isArray(pureValue)) {
127
+ if (pureValue !== null && Array.isArray(pureValue)) {
128
128
  andQuery[key] = { $in: pureValue }
129
129
  }
130
130
  }