@dataloop-ai/components 0.20.49 → 0.20.51

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.49",
3
+ "version": "0.20.51",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -7,12 +7,18 @@
7
7
  :data-resizable="resizable"
8
8
  :data-collapsable="collapsable"
9
9
  :data-direction="direction"
10
+ @mouseenter="handleMouseEnter"
11
+ @mouseleave="handleMouseLeave"
10
12
  >
11
13
  <div ref="panel" class="inner-container" style="height: 100%">
12
14
  <div v-if="collapsed" class="inner-container-overlay" />
13
15
  <div v-if="collapsable === true">
14
16
  <div
15
- v-if="direction === 'right' && isFullWidth === true"
17
+ v-if="
18
+ direction === 'right' &&
19
+ isFullWidth === true &&
20
+ hideCollapseButton === false
21
+ "
16
22
  class="collapse-icon collapse-icon--right"
17
23
  @click="handleCollapseButtonClick"
18
24
  >
@@ -36,7 +42,11 @@
36
42
  />
37
43
  </div>
38
44
  <div
39
- v-else-if="direction === 'left' && isFullWidth === true"
45
+ v-else-if="
46
+ direction === 'left' &&
47
+ isFullWidth === true &&
48
+ hideCollapseButton === false
49
+ "
40
50
  class="collapse-icon collapse-icon--left"
41
51
  @click="handleCollapseButtonClick"
42
52
  >
@@ -171,6 +181,10 @@ export default defineComponent({
171
181
  emptyStateProps: {
172
182
  type: Object as PropType<DlEmptyStateProps>,
173
183
  default: null
184
+ },
185
+ showCollapseOnHover: {
186
+ type: Boolean,
187
+ default: false
174
188
  }
175
189
  },
176
190
  emits: ['update:model-value', 'panel-width'],
@@ -181,7 +195,8 @@ export default defineComponent({
181
195
  left: 0,
182
196
  isFullWidth: true,
183
197
  avoidUserSelect: false,
184
- collapsed: false
198
+ collapsed: false,
199
+ hideCollapseButton: false
185
200
  }
186
201
  },
187
202
  computed: {
@@ -288,6 +303,16 @@ export default defineComponent({
288
303
  }
289
304
  },
290
305
  methods: {
306
+ handleMouseEnter() {
307
+ if (this.showCollapseOnHover) {
308
+ this.hideCollapseButton = false
309
+ }
310
+ },
311
+ handleMouseLeave() {
312
+ if (this.showCollapseOnHover) {
313
+ this.hideCollapseButton = true
314
+ }
315
+ },
291
316
  reset() {
292
317
  const element = this.$refs['panel'] as HTMLDivElement
293
318
  element.style.width = this.w + 'px'