@tak-ps/vue-tabler 4.28.0 → 4.29.2

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/CHANGELOG.md CHANGED
@@ -10,6 +10,18 @@
10
10
 
11
11
  ## Version History
12
12
 
13
+ ### v4.29.2
14
+
15
+ - :bug: Upstream styling of label dropdowns
16
+
17
+ ### v4.29.1
18
+
19
+ - :bug: Fix tests
20
+
21
+ ### v4.29.0
22
+
23
+ - :rocket: Introduce additional TablerBadge props including hover
24
+
13
25
  ### v4.27.0
14
26
 
15
27
  - :tada: Introduce `TablerUploadLogo` component
@@ -13,13 +13,25 @@ import { computed } from 'vue';
13
13
  export interface BadgeProps {
14
14
  backgroundColor?: string;
15
15
  borderColor?: string;
16
+ borderStyle?: string;
17
+ borderWidth?: string;
16
18
  textColor?: string;
19
+ hoverBackgroundColor?: string;
20
+ hoverBorderColor?: string;
21
+ hoverBorderStyle?: string;
22
+ hoverTextColor?: string;
17
23
  }
18
24
 
19
25
  const props = withDefaults(defineProps<BadgeProps>(), {
20
26
  backgroundColor: 'rgba(34, 197, 94, 0.2)',
21
27
  borderColor: undefined,
28
+ borderStyle: 'solid',
29
+ borderWidth: '1px',
22
30
  textColor: '#ffffff',
31
+ hoverBackgroundColor: undefined,
32
+ hoverBorderColor: undefined,
33
+ hoverBorderStyle: undefined,
34
+ hoverTextColor: undefined,
23
35
  });
24
36
 
25
37
  type ParsedColor = {
@@ -123,14 +135,26 @@ const badgeStyle = computed(() => {
123
135
  return {
124
136
  backgroundColor: props.backgroundColor,
125
137
  borderColor: resolvedBorderColor.value,
138
+ borderStyle: props.borderStyle,
139
+ borderWidth: props.borderWidth,
126
140
  color: props.textColor,
141
+ '--badge-hover-bg': props.hoverBackgroundColor ?? props.backgroundColor,
142
+ '--badge-hover-border': props.hoverBorderColor ?? resolvedBorderColor.value,
143
+ '--badge-hover-border-style': props.hoverBorderStyle ?? props.borderStyle,
144
+ '--badge-hover-text': props.hoverTextColor ?? props.textColor,
127
145
  };
128
146
  });
129
147
  </script>
130
148
 
131
149
  <style scoped>
132
150
  .tabler-badge {
133
- border-style: solid;
134
- border-width: 1px;
151
+ transition: background-color 0.15s, border-color 0.15s, color 0.15s;
135
152
  }
136
- </style>
153
+
154
+ .tabler-badge:hover {
155
+ background-color: var(--badge-hover-bg) !important;
156
+ border-color: var(--badge-hover-border) !important;
157
+ border-style: var(--badge-hover-border-style) !important;
158
+ color: var(--badge-hover-text) !important;
159
+ }
160
+ </style>
@@ -13,17 +13,16 @@
13
13
  />
14
14
  </template>
15
15
  <template #dropdown>
16
- <div class='card'>
17
- <div class='card-header'>
18
- <div
19
- class='card-title'
20
- v-text='props.label'
21
- />
16
+ <div
17
+ class='py-1'
18
+ style='min-width: 300px;'
19
+ >
20
+ <div class='px-3 pt-2 pb-1 fw-bold'>
21
+ {{props.label}}
22
22
  </div>
23
- <div
24
- class='card-body'
25
- v-text='props.description'
26
- />
23
+ </div>
24
+ <div class='px-3 pb-2'>
25
+ {{props.description}}
27
26
  </div>
28
27
  </template>
29
28
  </dropdown>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tak-ps/vue-tabler",
3
3
  "type": "module",
4
- "version": "4.28.0",
4
+ "version": "4.29.2",
5
5
  "lib": "lib.ts",
6
6
  "main": "lib.ts",
7
7
  "module": "lib.ts",