@dataloop-ai/components 0.20.207 → 0.20.208

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.207",
3
+ "version": "0.20.208",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -90,12 +90,25 @@ export default defineComponent({
90
90
  tooltip: {
91
91
  type: String,
92
92
  default: null
93
+ },
94
+ activeColor: {
95
+ type: String,
96
+ default: null
93
97
  }
94
98
  },
95
99
  emits: ['click', 'mousemove', 'mouseup', 'mousedown'],
96
100
  setup(props) {
97
- const { styles, color, size, icon, svg, inline, svgSource, tooltip } =
98
- toRefs(props)
101
+ const {
102
+ styles,
103
+ color,
104
+ size,
105
+ icon,
106
+ svg,
107
+ inline,
108
+ svgSource,
109
+ tooltip,
110
+ activeColor
111
+ } = toRefs(props)
99
112
 
100
113
  const svgIcon = ref(null)
101
114
  const isDestroyed = ref(false)
@@ -129,6 +142,9 @@ export default defineComponent({
129
142
  : color.value,
130
143
  'dell-gray-800'
131
144
  )
145
+ : 'inherit',
146
+ '--dl-icon-color-active': activeColor.value
147
+ ? getColor(activeColor.value, 'dell-gray-800')
132
148
  : 'inherit'
133
149
  }
134
150
  })
@@ -250,5 +266,9 @@ export default defineComponent({
250
266
  display: inline-flex;
251
267
  color: var(--dl-icon-color);
252
268
  font-size: var(--dl-icon-font-size);
269
+
270
+ &:active {
271
+ color: var(--dl-icon-color-active);
272
+ }
253
273
  }
254
274
  </style>
@@ -36,6 +36,10 @@ export default defineComponent({
36
36
  color: {
37
37
  type: String,
38
38
  default: 'dell-gray-800'
39
+ },
40
+ activeColor: {
41
+ type: String,
42
+ default: null
39
43
  }
40
44
  },
41
45
  data() {
@@ -48,7 +52,10 @@ export default defineComponent({
48
52
  const styles: Record<string, string | number> = {
49
53
  color: getColor(this.color as string, 'dl-color-darker'),
50
54
  textTransform: this.letterClass ? null : this.transform,
51
- fontWeight: this.bold ? 500 : 400
55
+ fontWeight: this.bold ? 500 : 400,
56
+ '--dl-typography-color-active': this.activeColor
57
+ ? getColor(this.activeColor as string, 'dell-gray-800')
58
+ : null
52
59
  }
53
60
 
54
61
  if (this.size && !sizes.includes(this.size)) {
@@ -120,5 +127,9 @@ export default defineComponent({
120
127
  &--small {
121
128
  font-size: var(--dl-font-size-small);
122
129
  }
130
+
131
+ &:active {
132
+ color: var(--dl-typography-color-active);
133
+ }
123
134
  }
124
135
  </style>