sprintify-ui 0.12.20 → 0.12.22
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/dist/sprintify-ui.es.js +23 -16
- package/dist/types/components/BaseAvatarGroup.vue.d.ts +1 -1
- package/dist/types/components/BaseButton.vue.d.ts +1 -1
- package/dist/types/components/BaseTableColumn.vue.d.ts +1 -1
- package/dist/types/components/BaseTableHeader.vue.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/BaseBadge.vue +18 -13
- package/src/components/BaseButton.vue +13 -9
- package/src/components/BaseTooltip.vue +1 -1
package/dist/sprintify-ui.es.js
CHANGED
|
@@ -7543,7 +7543,7 @@ const HC = { class: "relative filter drop-shadow-[0_1px_2px_rgba(0,0,0,0.1)]" },
|
|
|
7543
7543
|
}, {
|
|
7544
7544
|
default: X(() => [
|
|
7545
7545
|
de(d.$slots, "default"),
|
|
7546
|
-
n.visible && n.text ? (k(), oe(or, {
|
|
7546
|
+
n.visible && (n.text || d.$slots.tooltip) ? (k(), oe(or, {
|
|
7547
7547
|
key: 0,
|
|
7548
7548
|
to: "body"
|
|
7549
7549
|
}, [
|
|
@@ -9133,16 +9133,19 @@ const _2 = {
|
|
|
9133
9133
|
const w = ["btn"];
|
|
9134
9134
|
return o.color && (o.color in r ? w.push(r[o.color]) : w.push("hover:enabled:opacity-80")), s.value && w.push((T = on[s.value]) == null ? void 0 : T.buttonClass), l.value && w.push("p-0 aspect-1 justify-center"), Qe(w, o.class);
|
|
9135
9135
|
}), u = S(() => {
|
|
9136
|
-
if (o.color && !(o.color in r))
|
|
9137
|
-
|
|
9138
|
-
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
|
|
9142
|
-
|
|
9143
|
-
|
|
9144
|
-
|
|
9145
|
-
|
|
9136
|
+
if (o.color && !(o.color in r))
|
|
9137
|
+
try {
|
|
9138
|
+
const w = Sl(o.color);
|
|
9139
|
+
return {
|
|
9140
|
+
backgroundColor: w.backgroundColor,
|
|
9141
|
+
color: w.textColor,
|
|
9142
|
+
borderColor: w.borderColor,
|
|
9143
|
+
borderWidth: "1px",
|
|
9144
|
+
borderStyle: "solid"
|
|
9145
|
+
};
|
|
9146
|
+
} catch {
|
|
9147
|
+
console.warn(`[BaseButton] "${o.color}" is not a valid color.`);
|
|
9148
|
+
}
|
|
9146
9149
|
return {};
|
|
9147
9150
|
}), c = S(() => {
|
|
9148
9151
|
const w = ["flex items-center w-full"];
|
|
@@ -11718,11 +11721,15 @@ const YM = ["src"], GM = ["fill"], JM = ["font-size"], XM = { class: "truncate"
|
|
|
11718
11721
|
},
|
|
11719
11722
|
setup(n) {
|
|
11720
11723
|
const t = n, e = S(() => {
|
|
11721
|
-
|
|
11722
|
-
|
|
11723
|
-
|
|
11724
|
-
|
|
11725
|
-
|
|
11724
|
+
try {
|
|
11725
|
+
const a = Sl(t.color, t.contrast == "high"), u = {
|
|
11726
|
+
backgroundColor: a.backgroundColor,
|
|
11727
|
+
color: a.textColor
|
|
11728
|
+
};
|
|
11729
|
+
return t.bordered && (u.borderColor = a.borderColor, u.borderWidth = "1px", u.borderStyle = "solid"), u;
|
|
11730
|
+
} catch {
|
|
11731
|
+
return console.warn(`[BaseBadge] "${t.color}" is not a valid color.`), {};
|
|
11732
|
+
}
|
|
11726
11733
|
}), r = S(() => Object.keys(on).includes(t.size) ? t.size : "md"), o = mf(), i = S(() => !!o.default), s = S(() => {
|
|
11727
11734
|
const a = "inline-flex items-center rounded leading-tight", u = {
|
|
11728
11735
|
xs: "text-[9px]",
|
|
@@ -46,7 +46,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
46
46
|
}>> & Readonly<{}>, {
|
|
47
47
|
to: (user: AvatarUserInput) => RouteLocationRaw;
|
|
48
48
|
size: string;
|
|
49
|
-
max: number;
|
|
50
49
|
tooltip: boolean;
|
|
50
|
+
max: number;
|
|
51
51
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
52
52
|
export default _default;
|
|
@@ -67,11 +67,11 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
|
67
67
|
icon: string;
|
|
68
68
|
disabled: boolean;
|
|
69
69
|
as: string;
|
|
70
|
+
tooltip: string | null;
|
|
70
71
|
loading: boolean;
|
|
71
72
|
iconPosition: "start" | "end";
|
|
72
73
|
sizeBehavior: SizeBehavior;
|
|
73
74
|
align: "center" | "between";
|
|
74
|
-
tooltip: string | null;
|
|
75
75
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
76
76
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
77
77
|
export default _default;
|
|
@@ -204,8 +204,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
204
204
|
meta: Record<string, any> | unknown[];
|
|
205
205
|
width: number;
|
|
206
206
|
padding: string;
|
|
207
|
-
align: "left" | "center" | "right";
|
|
208
207
|
tooltip: string;
|
|
208
|
+
align: "left" | "center" | "right";
|
|
209
209
|
field: string;
|
|
210
210
|
headerClass: string | Record<string, any> | unknown[];
|
|
211
211
|
searchable: boolean;
|
|
@@ -20,8 +20,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}
|
|
|
20
20
|
}>, {
|
|
21
21
|
class: string | false | 0 | 0n | ClassNameValue[] | null;
|
|
22
22
|
style: string | false | import("vue").CSSProperties | StyleValue[] | null;
|
|
23
|
-
align: "left" | "center" | "right";
|
|
24
23
|
tooltip: string;
|
|
24
|
+
align: "left" | "center" | "right";
|
|
25
25
|
colspan: number;
|
|
26
26
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
27
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
package/package.json
CHANGED
|
@@ -43,20 +43,25 @@ const props = withDefaults(
|
|
|
43
43
|
);
|
|
44
44
|
|
|
45
45
|
const colorStyle = computed((): Record<string, string> => {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
46
|
+
try {
|
|
47
|
+
const config = getColorConfig(props.color, props.contrast == 'high');
|
|
48
|
+
|
|
49
|
+
const styles: Record<string, string> = {
|
|
50
|
+
backgroundColor: config.backgroundColor,
|
|
51
|
+
color: config.textColor,
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
if (props.bordered) {
|
|
55
|
+
styles.borderColor = config.borderColor;
|
|
56
|
+
styles.borderWidth = '1px';
|
|
57
|
+
styles.borderStyle = 'solid';
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return styles;
|
|
61
|
+
} catch {
|
|
62
|
+
console.warn(`[BaseBadge] "${props.color}" is not a valid color.`);
|
|
63
|
+
return {};
|
|
57
64
|
}
|
|
58
|
-
|
|
59
|
-
return styles;
|
|
60
65
|
});
|
|
61
66
|
|
|
62
67
|
const sizeInternal = computed(() => {
|
|
@@ -207,15 +207,19 @@ const classes = computed(() => {
|
|
|
207
207
|
|
|
208
208
|
const styles = computed(() => {
|
|
209
209
|
if (props.color && !(props.color in colors)) {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
210
|
+
try {
|
|
211
|
+
const config = getColorConfig(props.color);
|
|
212
|
+
|
|
213
|
+
return {
|
|
214
|
+
backgroundColor: config.backgroundColor,
|
|
215
|
+
color: config.textColor,
|
|
216
|
+
borderColor: config.borderColor,
|
|
217
|
+
borderWidth: '1px',
|
|
218
|
+
borderStyle: 'solid',
|
|
219
|
+
};
|
|
220
|
+
} catch {
|
|
221
|
+
console.warn(`[BaseButton] "${props.color}" is not a valid color.`);
|
|
222
|
+
}
|
|
219
223
|
}
|
|
220
224
|
|
|
221
225
|
return {};
|