@dataloop-ai/components 0.20.103 → 0.20.104

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.103",
3
+ "version": "0.20.104",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -195,8 +195,6 @@ import {
195
195
  DlConfusionMatrixLabel,
196
196
  DlConfusionMatrixBrushState
197
197
  } from '../../types'
198
- import { hexToRgbA } from '../../../../../utils/colors'
199
- import { colorNames } from '../../../../../utils/css-color-names'
200
198
  import DlEmptyState from '../../../../basic/DlEmptyState/DlEmptyState.vue'
201
199
  import { DlEmptyStateProps } from '../../../../basic/DlEmptyState/types'
202
200
  import { useThemeVariables } from '../../../../../hooks/use-theme'
@@ -262,7 +260,7 @@ export default defineComponent({
262
260
  },
263
261
  setup(props) {
264
262
  const vm = getCurrentInstance()
265
- const { variables, isDark = { value: false } } = useThemeVariables()
263
+ const { isDark = { value: false } } = useThemeVariables()
266
264
  const currentBrushState = ref<{ min: number; max: number }>({
267
265
  min: 0,
268
266
  max: Math.min(props.matrix.length, props.cellDisplayLimit)
@@ -273,12 +271,10 @@ export default defineComponent({
273
271
  const isDisposed = ref(false)
274
272
 
275
273
  const getCellBackground = (value: number = 1): string => {
276
- const object: { [key: string]: any } = {
277
- ...variables,
278
- ...colorNames
279
- }
280
- const hex = object[props.color]
281
- return hexToRgbA(hex, value)
274
+ return (
275
+ (isDark.value ? '#7c8cff' : '#3452ff') +
276
+ Math.round(value * 255).toString()
277
+ )
282
278
  }
283
279
 
284
280
  const getCellTextColor = (value: number) => {
@@ -321,7 +317,6 @@ export default defineComponent({
321
317
 
322
318
  return {
323
319
  resizeObserver,
324
- variables,
325
320
  getCellBackground,
326
321
  getCellTextColor,
327
322
  cellWidth,