@dataloop-ai/components 0.20.206 → 0.20.207
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
|
@@ -421,6 +421,7 @@ export default defineComponent({
|
|
|
421
421
|
disabled: this.disabled,
|
|
422
422
|
flat: this.flat,
|
|
423
423
|
shaded: this.shaded,
|
|
424
|
+
outlined: this.outlined,
|
|
424
425
|
color: this.color
|
|
425
426
|
}),
|
|
426
427
|
'--dl-button-bg-hover':
|
|
@@ -442,13 +443,21 @@ export default defineComponent({
|
|
|
442
443
|
'--dl-button-bg-pressed':
|
|
443
444
|
this.pressedBgColor ??
|
|
444
445
|
setBgOnPressed({
|
|
446
|
+
disabled: this.disabled,
|
|
447
|
+
flat: this.flat,
|
|
445
448
|
shaded: this.shaded,
|
|
446
|
-
outlined: this.outlined
|
|
449
|
+
outlined: this.outlined,
|
|
450
|
+
filled: this.filled,
|
|
451
|
+
color: this.color
|
|
447
452
|
}),
|
|
448
453
|
|
|
449
454
|
'--dl-button-border-pressed': setBorderOnPressed({
|
|
455
|
+
disabled: this.disabled,
|
|
456
|
+
flat: this.flat,
|
|
450
457
|
shaded: this.shaded,
|
|
451
|
-
outlined: this.outlined
|
|
458
|
+
outlined: this.outlined,
|
|
459
|
+
filled: this.filled,
|
|
460
|
+
color: this.color
|
|
452
461
|
})
|
|
453
462
|
}
|
|
454
463
|
}
|
|
@@ -120,7 +120,7 @@ export const setBgColor = ({
|
|
|
120
120
|
return 'var(--dl-color-fill)'
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
return getColor(color, '
|
|
123
|
+
return getColor(color, 'dell-blue-500')
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
export const setBorder = ({
|
|
@@ -142,7 +142,7 @@ export const setBorder = ({
|
|
|
142
142
|
return 'var(--dl-color-transparent)'
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
return getColor(color, '
|
|
145
|
+
return getColor(color, 'dell-blue-500')
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
export const setColorOnHover = ({
|
|
@@ -151,11 +151,14 @@ export const setColorOnHover = ({
|
|
|
151
151
|
outlined,
|
|
152
152
|
color
|
|
153
153
|
}: Partial<DlButtonProps>) => {
|
|
154
|
-
if (color) return getLighterGradient(color)
|
|
155
154
|
if (disabled) {
|
|
156
155
|
return flat ? 'var(--dl-color-transparent)' : 'var(--dl-color-disabled)'
|
|
157
156
|
}
|
|
158
|
-
if (outlined
|
|
157
|
+
if (outlined) {
|
|
158
|
+
return getColor(color || '', 'dell-blue-500')
|
|
159
|
+
}
|
|
160
|
+
if (color) return getLighterGradient(color)
|
|
161
|
+
if (flat) {
|
|
159
162
|
return 'var(--dl-color-hover)'
|
|
160
163
|
}
|
|
161
164
|
|
|
@@ -166,7 +169,8 @@ export const setBorderOnHover = ({
|
|
|
166
169
|
disabled,
|
|
167
170
|
flat,
|
|
168
171
|
color,
|
|
169
|
-
shaded
|
|
172
|
+
shaded,
|
|
173
|
+
outlined
|
|
170
174
|
}: Partial<DlButtonProps>) => {
|
|
171
175
|
if (disabled) {
|
|
172
176
|
return 'var(--dl-color-separator)'
|
|
@@ -174,10 +178,13 @@ export const setBorderOnHover = ({
|
|
|
174
178
|
if (flat || shaded) {
|
|
175
179
|
return 'var(--dl-color-transparent)'
|
|
176
180
|
}
|
|
181
|
+
if (outlined) {
|
|
182
|
+
return getColor(color || '', 'dell-blue-500')
|
|
183
|
+
}
|
|
177
184
|
if (color) {
|
|
178
185
|
return getLighterGradient(color)
|
|
179
186
|
}
|
|
180
|
-
return 'var(--
|
|
187
|
+
return 'var(--dell-blue-600)'
|
|
181
188
|
}
|
|
182
189
|
|
|
183
190
|
export const setBgOnHover = ({
|
|
@@ -192,6 +199,10 @@ export const setBgOnHover = ({
|
|
|
192
199
|
return 'var(--dl-color-fill)'
|
|
193
200
|
}
|
|
194
201
|
|
|
202
|
+
if (outlined && !disabled) {
|
|
203
|
+
return 'var(--dell-blue-100)'
|
|
204
|
+
}
|
|
205
|
+
|
|
195
206
|
if (disabled || flat || outlined) {
|
|
196
207
|
return 'var(--dl-color-transparent)'
|
|
197
208
|
}
|
|
@@ -199,16 +210,36 @@ export const setBgOnHover = ({
|
|
|
199
210
|
if (color) return getLighterGradient(color)
|
|
200
211
|
|
|
201
212
|
if (filled) {
|
|
202
|
-
return 'var(--
|
|
213
|
+
return 'var(--dell-blue-600)'
|
|
203
214
|
}
|
|
204
215
|
|
|
205
216
|
return 'var(--dl-color-panel-background)'
|
|
206
217
|
}
|
|
207
218
|
|
|
208
|
-
export const setBgOnPressed = ({
|
|
219
|
+
export const setBgOnPressed = ({
|
|
220
|
+
disabled,
|
|
221
|
+
flat,
|
|
222
|
+
shaded,
|
|
223
|
+
outlined,
|
|
224
|
+
filled,
|
|
225
|
+
color
|
|
226
|
+
}: Partial<DlButtonProps>) => {
|
|
209
227
|
if (shaded) {
|
|
210
228
|
return 'var(--dl-color-fill-hover)'
|
|
211
229
|
}
|
|
230
|
+
|
|
231
|
+
if (disabled) {
|
|
232
|
+
return 'var(--dl-button-bg)'
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
if (outlined && !flat) {
|
|
236
|
+
return 'var(--dell-blue-200)'
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
if (filled && !flat && !outlined && !color) {
|
|
240
|
+
return 'var(--dell-blue-700)'
|
|
241
|
+
}
|
|
242
|
+
|
|
212
243
|
return 'var(--dl-button-bg)'
|
|
213
244
|
}
|
|
214
245
|
|
|
@@ -224,9 +255,11 @@ export const setTextOnPressed = ({
|
|
|
224
255
|
}
|
|
225
256
|
|
|
226
257
|
export const setBorderOnPressed = ({
|
|
227
|
-
shaded,
|
|
228
258
|
disabled,
|
|
229
259
|
flat,
|
|
260
|
+
shaded,
|
|
261
|
+
outlined,
|
|
262
|
+
filled,
|
|
230
263
|
color
|
|
231
264
|
}: Partial<DlButtonProps>) => {
|
|
232
265
|
if (disabled) {
|
|
@@ -235,6 +268,13 @@ export const setBorderOnPressed = ({
|
|
|
235
268
|
if (flat || shaded) {
|
|
236
269
|
return 'var(--dl-color-transparent)'
|
|
237
270
|
}
|
|
271
|
+
if (outlined) {
|
|
272
|
+
return getColor(color || '', 'dell-blue-500')
|
|
273
|
+
}
|
|
238
274
|
if (color) return getLighterGradient(color)
|
|
275
|
+
const isFilled = filled !== false
|
|
276
|
+
if (isFilled && !color) {
|
|
277
|
+
return 'var(--dell-blue-700, var(--dl-button-border))'
|
|
278
|
+
}
|
|
239
279
|
return 'var(--dl-button-border)'
|
|
240
280
|
}
|