@dataloop-ai/components 0.18.10 → 0.18.11

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.18.10",
3
+ "version": "0.18.11",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -25,7 +25,11 @@
25
25
  <div
26
26
  ref="dlAccordionContent"
27
27
  class="accordion-content"
28
- :class="{ closed: !isOpen, 'right-side': rightSide }"
28
+ :class="{
29
+ closed: !isOpen,
30
+ 'right-side': rightSide,
31
+ 'accordion-content__border': separator
32
+ }"
29
33
  >
30
34
  <slot v-if="isOpen && !isEmpty" />
31
35
  <dl-empty-state
@@ -75,7 +79,8 @@ export default defineComponent({
75
79
  emptyStateProps: {
76
80
  type: Object as PropType<DlEmptyStateProps>,
77
81
  default: null
78
- }
82
+ },
83
+ separator: { type: Boolean, default: false }
79
84
  },
80
85
  emits: ['update:model-value', 'hide', 'show'],
81
86
  data() {
@@ -116,9 +121,11 @@ export default defineComponent({
116
121
  line-height: 16px;
117
122
  padding: 0 16px 15px 38px;
118
123
  color: var(--dl-color-darker);
119
- border-bottom: 1px solid var(--dl-color-separator);
120
124
  max-height: fit-content;
121
125
  overflow: hidden;
126
+ &__border {
127
+ border-bottom: 1px solid var(--dl-color-separator);
128
+ }
122
129
  &.right-side {
123
130
  padding: 0 38px 16px 16px;
124
131
  }
@@ -77,7 +77,7 @@ import { colorNames } from '../../../utils/css-color-names'
77
77
  import { useSizeObserver } from '../../../hooks/use-size-observer'
78
78
  import { v4 } from 'uuid'
79
79
  import { ButtonColors } from './types'
80
- import { transformOptions } from '../../shared/types'
80
+ import { DlTransformOptions } from '../../shared/types'
81
81
  import { stringStyleToRecord } from '../../../utils'
82
82
  import { textTransform } from '../../../utils/string'
83
83
  import { isString } from 'lodash'
@@ -153,7 +153,7 @@ export default defineComponent({
153
153
  type: String,
154
154
  default: 'default',
155
155
  validator: (value: string): boolean =>
156
- transformOptions.includes(value)
156
+ DlTransformOptions.includes(value)
157
157
  },
158
158
  /**
159
159
  * Doesn't allow the button's text to be wrapped along multiple rows
@@ -63,7 +63,7 @@ import {
63
63
  setRemoveIconWidth
64
64
  } from './utils'
65
65
  import { v4 } from 'uuid'
66
- import { transformOptions } from '../../shared/types'
66
+ import { DlTransformOptions } from '../../shared/types'
67
67
 
68
68
  export default defineComponent({
69
69
  name: 'DlChip',
@@ -87,7 +87,7 @@ export default defineComponent({
87
87
  type: String,
88
88
  default: 'default',
89
89
  validator: (value: string): boolean =>
90
- transformOptions.includes(value)
90
+ DlTransformOptions.includes(value)
91
91
  },
92
92
  overflow: { type: Boolean, default: false },
93
93
  fit: { type: Boolean, default: false }
@@ -188,7 +188,7 @@ import {
188
188
  Ref
189
189
  } from 'vue-demi'
190
190
  import { v4 } from 'uuid'
191
- import { transformOptions } from '../../shared/types'
191
+ import { DlTransformOptions } from '../../shared/types'
192
192
 
193
193
  export default defineComponent({
194
194
  name: 'DlDropdownButton',
@@ -242,7 +242,7 @@ export default defineComponent({
242
242
  type: String,
243
243
  default: 'default',
244
244
  validator: (value: string): boolean =>
245
- transformOptions.includes(value)
245
+ DlTransformOptions.includes(value)
246
246
  },
247
247
  outlined: Boolean,
248
248
  padding: { type: String, default: '5px' },
@@ -12,7 +12,7 @@
12
12
  import { v4 } from 'uuid'
13
13
  import { defineComponent, PropType } from 'vue-demi'
14
14
  import { getColor } from '../../../utils'
15
- import { transformOptions } from '../../shared/types'
15
+ import { DlTransformOptions } from '../../shared/types'
16
16
 
17
17
  type Variant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p'
18
18
 
@@ -35,7 +35,7 @@ export default defineComponent({
35
35
  type: String,
36
36
  default: 'default',
37
37
  validator: (value: string): boolean =>
38
- transformOptions.includes(value)
38
+ DlTransformOptions.includes(value)
39
39
  },
40
40
  bold: Boolean,
41
41
  color: {
@@ -1,4 +1,4 @@
1
- export const transformOptions: string[] = [
1
+ export const DlTransformOptions: string[] = [
2
2
  'none',
3
3
  'capitalize',
4
4
  'uppercase',
@@ -89,6 +89,38 @@
89
89
  </template>
90
90
  </dl-accordion>
91
91
  </div>
92
+ <div style="width: 100%">
93
+ <dl-accordion default-opened>
94
+ <template #header>
95
+ Custom header content
96
+ <dl-switch
97
+ v-model="switchModel"
98
+ :value="2"
99
+ />
100
+ </template>
101
+
102
+ <dl-accordion default-opened>
103
+ <template #header>
104
+ Custom header content
105
+ <dl-switch
106
+ v-model="switchModel"
107
+ :value="2"
108
+ />
109
+ </template>
110
+ <template #default>
111
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit,
112
+ sed do eiusmod tempor incididunt ut labore et dolore
113
+ magna aliqua. Ut enim ad minim veniam, quis nostrud
114
+ exercitation ullamco laboris nisi ut aliquip ex ea
115
+ commodo consequat. Duis aute irure dolor in
116
+ reprehenderit in voluptate velit esse cillum dolore eu
117
+ fugiat nulla pariatur. Excepteur sint occaecat cupidatat
118
+ non proident, sunt in culpa qui officia deserunt mollit
119
+ anim id est laborum.
120
+ </template>
121
+ </dl-accordion>
122
+ </dl-accordion>
123
+ </div>
92
124
  </div>
93
125
  </template>
94
126