@dataloop-ai/components 0.20.50 → 0.20.52

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.20.50",
3
+ "version": "0.20.52",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -16,8 +16,8 @@
16
16
  <div
17
17
  v-if="
18
18
  direction === 'right' &&
19
- isFullWidth === true &&
20
- hideCollapseButton === false
19
+ isFullWidth === true &&
20
+ hideCollapseButton === false
21
21
  "
22
22
  class="collapse-icon collapse-icon--right"
23
23
  @click="handleCollapseButtonClick"
@@ -44,8 +44,8 @@
44
44
  <div
45
45
  v-else-if="
46
46
  direction === 'left' &&
47
- isFullWidth === true &&
48
- hideCollapseButton === false
47
+ isFullWidth === true &&
48
+ hideCollapseButton === false
49
49
  "
50
50
  class="collapse-icon collapse-icon--left"
51
51
  @click="handleCollapseButtonClick"
@@ -181,6 +181,10 @@ export default defineComponent({
181
181
  emptyStateProps: {
182
182
  type: Object as PropType<DlEmptyStateProps>,
183
183
  default: null
184
+ },
185
+ showCollapseOnHover: {
186
+ type: Boolean,
187
+ default: false
184
188
  }
185
189
  },
186
190
  emits: ['update:model-value', 'panel-width'],
@@ -300,10 +304,14 @@ export default defineComponent({
300
304
  },
301
305
  methods: {
302
306
  handleMouseEnter() {
303
- this.hideCollapseButton = false
307
+ if (this.showCollapseOnHover) {
308
+ this.hideCollapseButton = false
309
+ }
304
310
  },
305
311
  handleMouseLeave() {
306
- this.hideCollapseButton = true
312
+ if (this.showCollapseOnHover) {
313
+ this.hideCollapseButton = true
314
+ }
307
315
  },
308
316
  reset() {
309
317
  const element = this.$refs['panel'] as HTMLDivElement
@@ -123,7 +123,7 @@ export default defineComponent({
123
123
  highlightedIndex.value = value
124
124
 
125
125
  const element =
126
- menu.value?.portalEl.querySelectorAll('.dl-list-item')[value]
126
+ menu.value?.portalEl.querySelectorAll?.('.dl-list-item')[value]
127
127
  if (element) {
128
128
  if (element.scrollIntoViewIfNeeded) {
129
129
  element.scrollIntoViewIfNeeded()