@mcistudio/unoui-vue 1.0.0
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/README.md +95 -0
- package/dist/alert/Alert.vue.d.ts +67 -0
- package/dist/alert/index.d.ts +40 -0
- package/dist/alert/index.js +2 -0
- package/dist/attrs.d.ts +11 -0
- package/dist/attrs.js +16 -0
- package/dist/attrs.js.map +1 -0
- package/dist/badge/Badge.vue.d.ts +57 -0
- package/dist/badge/BadgeRibbon.vue.d.ts +34 -0
- package/dist/badge/index.d.ts +42 -0
- package/dist/badge/index.js +2 -0
- package/dist/build.d.ts +2 -0
- package/dist/button/Button.vue.d.ts +46 -0
- package/dist/button/ButtonGroup.vue.d.ts +13 -0
- package/dist/button/index.d.ts +13 -0
- package/dist/button/index.js +2 -0
- package/dist/checkbox/Checkbox.vue.d.ts +47 -0
- package/dist/checkbox/CheckboxGroup.vue.d.ts +38 -0
- package/dist/checkbox/index.d.ts +30 -0
- package/dist/checkbox/index.js +2 -0
- package/dist/chunks/Progress-BL4KZ3HE.js +271 -0
- package/dist/chunks/Progress-BL4KZ3HE.js.map +1 -0
- package/dist/chunks/Skeleton-ohStUD4M.js +153 -0
- package/dist/chunks/Skeleton-ohStUD4M.js.map +1 -0
- package/dist/chunks/Table-DhXmuKQd.js +330 -0
- package/dist/chunks/Table-DhXmuKQd.js.map +1 -0
- package/dist/chunks/_plugin-vue_export-helper-B3ysoDQm.js +8 -0
- package/dist/chunks/alert-CczW_DKs.js +190 -0
- package/dist/chunks/alert-CczW_DKs.js.map +1 -0
- package/dist/chunks/badge-BHOZeImh.js +287 -0
- package/dist/chunks/badge-BHOZeImh.js.map +1 -0
- package/dist/chunks/button-pDObrN_X.js +168 -0
- package/dist/chunks/button-pDObrN_X.js.map +1 -0
- package/dist/chunks/checkbox-9_0oR4kg.js +260 -0
- package/dist/chunks/checkbox-9_0oR4kg.js.map +1 -0
- package/dist/chunks/colorpicker-CcizUCQv.js +594 -0
- package/dist/chunks/colorpicker-CcizUCQv.js.map +1 -0
- package/dist/chunks/datepicker-Cy808x7X.js +1414 -0
- package/dist/chunks/datepicker-Cy808x7X.js.map +1 -0
- package/dist/chunks/drawer-C3JZ28Xo.js +193 -0
- package/dist/chunks/drawer-C3JZ28Xo.js.map +1 -0
- package/dist/chunks/dropdown-0l967g7D.js +329 -0
- package/dist/chunks/dropdown-0l967g7D.js.map +1 -0
- package/dist/chunks/form-Qeqkd-HH.js +642 -0
- package/dist/chunks/form-Qeqkd-HH.js.map +1 -0
- package/dist/chunks/input-BDOXVCrK.js +1281 -0
- package/dist/chunks/input-BDOXVCrK.js.map +1 -0
- package/dist/chunks/inputOtp-Dyxj9lNj.js +261 -0
- package/dist/chunks/inputOtp-Dyxj9lNj.js.map +1 -0
- package/dist/chunks/message-xPfuG0EX.js +107 -0
- package/dist/chunks/message-xPfuG0EX.js.map +1 -0
- package/dist/chunks/millercolumns-Dp3fBrq6.js +426 -0
- package/dist/chunks/millercolumns-Dp3fBrq6.js.map +1 -0
- package/dist/chunks/modal-D6l1iIvE.js +81 -0
- package/dist/chunks/modal-D6l1iIvE.js.map +1 -0
- package/dist/chunks/pagination-Bc583AQX.js +265 -0
- package/dist/chunks/pagination-Bc583AQX.js.map +1 -0
- package/dist/chunks/popconfirm-D6lUfSxG.js +343 -0
- package/dist/chunks/popconfirm-D6lUfSxG.js.map +1 -0
- package/dist/chunks/qrcode-B0t_pZna.js +1099 -0
- package/dist/chunks/qrcode-B0t_pZna.js.map +1 -0
- package/dist/chunks/radio-DnYm59xH.js +477 -0
- package/dist/chunks/radio-DnYm59xH.js.map +1 -0
- package/dist/chunks/rate-0sme__Kb.js +309 -0
- package/dist/chunks/rate-0sme__Kb.js.map +1 -0
- package/dist/chunks/select-ChTfQM5u.js +417 -0
- package/dist/chunks/select-ChTfQM5u.js.map +1 -0
- package/dist/chunks/slider-C-W5GzTP.js +724 -0
- package/dist/chunks/slider-C-W5GzTP.js.map +1 -0
- package/dist/chunks/splitter-CgfiXY65.js +524 -0
- package/dist/chunks/splitter-CgfiXY65.js.map +1 -0
- package/dist/chunks/switch-BULGbODP.js +327 -0
- package/dist/chunks/switch-BULGbODP.js.map +1 -0
- package/dist/chunks/tab-Dxfg1_To.js +663 -0
- package/dist/chunks/tab-Dxfg1_To.js.map +1 -0
- package/dist/chunks/tag-BYmNsrZC.js +167 -0
- package/dist/chunks/tag-BYmNsrZC.js.map +1 -0
- package/dist/chunks/timepicker-DsGIdcf8.js +1059 -0
- package/dist/chunks/timepicker-DsGIdcf8.js.map +1 -0
- package/dist/chunks/tooltip-DMhiAqto.js +242 -0
- package/dist/chunks/tooltip-DMhiAqto.js.map +1 -0
- package/dist/colorpicker/ColorPicker.vue.d.ts +30 -0
- package/dist/colorpicker/color.d.ts +56 -0
- package/dist/colorpicker/color.js +99 -0
- package/dist/colorpicker/color.js.map +1 -0
- package/dist/colorpicker/index.d.ts +12 -0
- package/dist/colorpicker/index.js +2 -0
- package/dist/config.d.ts +55 -0
- package/dist/config.js +260 -0
- package/dist/config.js.map +1 -0
- package/dist/datepicker/DatePicker.vue.d.ts +82 -0
- package/dist/datepicker/RangePicker.vue.d.ts +87 -0
- package/dist/datepicker/index.d.ts +59 -0
- package/dist/datepicker/index.js +2 -0
- package/dist/drawer/Drawer.vue.d.ts +86 -0
- package/dist/drawer/index.d.ts +23 -0
- package/dist/drawer/index.js +2 -0
- package/dist/dropdown/Dropdown.vue.d.ts +118 -0
- package/dist/dropdown/index.d.ts +2 -0
- package/dist/dropdown/index.js +2 -0
- package/dist/form/Form.vue.d.ts +170 -0
- package/dist/form/FormItem.vue.d.ts +83 -0
- package/dist/form/index.d.ts +176 -0
- package/dist/form/index.js +2 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +32 -0
- package/dist/input/Autocomplete.vue.d.ts +121 -0
- package/dist/input/Input.vue.d.ts +142 -0
- package/dist/input/InputI18n.vue.d.ts +80 -0
- package/dist/input/InputTag.vue.d.ts +114 -0
- package/dist/input/index.d.ts +41 -0
- package/dist/input/index.js +2 -0
- package/dist/inputOtp/InputOtp.vue.d.ts +60 -0
- package/dist/inputOtp/index.d.ts +21 -0
- package/dist/inputOtp/index.js +2 -0
- package/dist/message/MessageContainer.vue.d.ts +11 -0
- package/dist/message/index.d.ts +20 -0
- package/dist/message/index.js +2 -0
- package/dist/message/types.d.ts +25 -0
- package/dist/millercolumns/MillerColumns.vue.d.ts +88 -0
- package/dist/millercolumns/index.d.ts +39 -0
- package/dist/millercolumns/index.js +2 -0
- package/dist/modal/Modal.vue.d.ts +54 -0
- package/dist/modal/index.d.ts +2 -0
- package/dist/modal/index.js +2 -0
- package/dist/pagination/Pagination.vue.d.ts +70 -0
- package/dist/pagination/index.d.ts +12 -0
- package/dist/pagination/index.js +2 -0
- package/dist/popconfirm/Popconfirm.vue.d.ts +104 -0
- package/dist/popconfirm/index.d.ts +36 -0
- package/dist/popconfirm/index.js +2 -0
- package/dist/progress/Progress.vue.d.ts +64 -0
- package/dist/progress/index.d.ts +26 -0
- package/dist/progress/index.js +2 -0
- package/dist/qrcode/QRCode.vue.d.ts +87 -0
- package/dist/qrcode/index.d.ts +43 -0
- package/dist/qrcode/index.js +2 -0
- package/dist/qrcode/qr.d.ts +51 -0
- package/dist/qrcode/qrcodegen.d.ts +94 -0
- package/dist/radio/Radio.vue.d.ts +52 -0
- package/dist/radio/RadioGroup.vue.d.ts +44 -0
- package/dist/radio/index.d.ts +55 -0
- package/dist/radio/index.js +2 -0
- package/dist/rate/Rate.vue.d.ts +100 -0
- package/dist/rate/index.d.ts +38 -0
- package/dist/rate/index.js +2 -0
- package/dist/select/Select.vue.d.ts +129 -0
- package/dist/select/index.d.ts +33 -0
- package/dist/select/index.js +2 -0
- package/dist/skeleton/Skeleton.vue.d.ts +31 -0
- package/dist/skeleton/index.d.ts +2 -0
- package/dist/skeleton/index.js +2 -0
- package/dist/slider/Slider.vue.d.ts +81 -0
- package/dist/slider/index.d.ts +61 -0
- package/dist/slider/index.js +2 -0
- package/dist/splitter/Splitter.vue.d.ts +63 -0
- package/dist/splitter/SplitterPanel.vue.d.ts +53 -0
- package/dist/splitter/index.d.ts +39 -0
- package/dist/splitter/index.js +2 -0
- package/dist/style.css +2 -0
- package/dist/switch/Switch.vue.d.ts +97 -0
- package/dist/switch/index.d.ts +31 -0
- package/dist/switch/index.js +2 -0
- package/dist/tab/TabPane.vue.d.ts +32 -0
- package/dist/tab/Tabs.vue.d.ts +87 -0
- package/dist/tab/index.d.ts +78 -0
- package/dist/tab/index.js +2 -0
- package/dist/table/Table.vue.d.ts +96 -0
- package/dist/table/index.d.ts +3 -0
- package/dist/table/index.js +2 -0
- package/dist/table/types.d.ts +35 -0
- package/dist/table/types.js +0 -0
- package/dist/tag/Tag.vue.d.ts +46 -0
- package/dist/tag/index.d.ts +11 -0
- package/dist/tag/index.js +2 -0
- package/dist/timepicker/TimePicker.vue.d.ts +92 -0
- package/dist/timepicker/TimeRangePicker.vue.d.ts +90 -0
- package/dist/timepicker/index.d.ts +39 -0
- package/dist/timepicker/index.js +2 -0
- package/dist/tooltip/Tooltip.vue.d.ts +79 -0
- package/dist/tooltip/index.d.ts +14 -0
- package/dist/tooltip/index.js +2 -0
- package/dist/uno.d.ts +32 -0
- package/dist/uno.js +83 -0
- package/dist/uno.js.map +1 -0
- package/dist/utils/DnD.d.ts +38 -0
- package/package.json +115 -0
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { cva as e } from "class-variance-authority";
|
|
2
|
+
import { computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, defineComponent as o, normalizeClass as s, normalizeStyle as c, onBeforeUnmount as l, openBlock as u, ref as d, renderSlot as f, toDisplayString as p, useSlots as m } from "vue";
|
|
3
|
+
import { clsx as h } from "clsx";
|
|
4
|
+
//#region src/alert/Alert.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var g = ["data-type"], _ = ["aria-label"], v = /* @__PURE__ */ o({
|
|
6
|
+
__name: "Alert",
|
|
7
|
+
props: {
|
|
8
|
+
title: { default: void 0 },
|
|
9
|
+
description: { default: void 0 },
|
|
10
|
+
type: { default: void 0 },
|
|
11
|
+
variant: { default: "outlined" },
|
|
12
|
+
banner: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: !1
|
|
15
|
+
},
|
|
16
|
+
showIcon: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: void 0
|
|
19
|
+
},
|
|
20
|
+
icon: { default: "" },
|
|
21
|
+
action: { default: void 0 },
|
|
22
|
+
closable: {
|
|
23
|
+
type: [Boolean, Object],
|
|
24
|
+
default: !1
|
|
25
|
+
},
|
|
26
|
+
closeAriaLabel: { default: "关闭" },
|
|
27
|
+
classNames: { default: void 0 },
|
|
28
|
+
styles: { default: void 0 }
|
|
29
|
+
},
|
|
30
|
+
emits: ["close", "afterClose"],
|
|
31
|
+
setup(e, { emit: o }) {
|
|
32
|
+
let v = e, y = o, b = m(), x = d(!0), S = d(!1), A, j = t(() => v.type ?? (v.banner ? "warning" : "info")), M = t(() => v.showIcon ?? v.banner), N = t(() => !!b.description || v.description !== void 0 && v.description !== null && String(v.description) !== ""), P = t(() => !!b.action || v.action !== void 0 && v.action !== null && String(v.action) !== ""), F = t(() => typeof v.closable == "object" ? v.closable : void 0), I = t(() => !!v.closable), L = t(() => F.value?.closeIcon || "i-lucide:x"), R = t(() => F.value?.closeAriaLabel || v.closeAriaLabel), z = t(() => v.icon || {
|
|
33
|
+
success: "i-lucide:circle-check",
|
|
34
|
+
info: "i-lucide:info",
|
|
35
|
+
warning: "i-lucide:triangle-alert",
|
|
36
|
+
error: "i-lucide:circle-x"
|
|
37
|
+
}[j.value]), B = (e) => e, V = t(() => h(C({
|
|
38
|
+
type: j.value,
|
|
39
|
+
variant: v.variant,
|
|
40
|
+
banner: v.banner,
|
|
41
|
+
withDescription: N.value,
|
|
42
|
+
closing: S.value
|
|
43
|
+
}), v.classNames?.root)), H = t(() => h(w({
|
|
44
|
+
type: j.value,
|
|
45
|
+
withDescription: N.value
|
|
46
|
+
}), v.classNames?.icon)), U = t(() => h(T(), v.classNames?.section)), W = t(() => h(E({ withDescription: N.value }), v.classNames?.title)), G = t(() => h(D(), v.classNames?.description)), K = t(() => h(O(), v.classNames?.actions)), q = t(() => h(k(), v.classNames?.close));
|
|
47
|
+
function J(e) {
|
|
48
|
+
S.value || (F.value?.onClose?.(e), y("close", e), S.value = !0, A = window.setTimeout(() => {
|
|
49
|
+
x.value = !1, F.value?.afterClose?.(), y("afterClose");
|
|
50
|
+
}, 200));
|
|
51
|
+
}
|
|
52
|
+
return l(() => {
|
|
53
|
+
A && window.clearTimeout(A);
|
|
54
|
+
}), (t, o) => x.value ? (u(), r("div", {
|
|
55
|
+
key: 0,
|
|
56
|
+
"data-ui-alert": "true",
|
|
57
|
+
role: "alert",
|
|
58
|
+
"data-type": j.value,
|
|
59
|
+
class: s(V.value),
|
|
60
|
+
style: c(B(e.styles?.root))
|
|
61
|
+
}, [
|
|
62
|
+
M.value ? (u(), r("span", {
|
|
63
|
+
key: 0,
|
|
64
|
+
class: s(H.value),
|
|
65
|
+
style: c(B(e.styles?.icon)),
|
|
66
|
+
"data-ui-alert-icon": "true",
|
|
67
|
+
"aria-hidden": "true"
|
|
68
|
+
}, [f(t.$slots, "icon", {}, () => [i("span", { class: s([z.value, "size-[1em]"]) }, null, 2)])], 6)) : n("", !0),
|
|
69
|
+
i("div", {
|
|
70
|
+
class: s(U.value),
|
|
71
|
+
style: c(B(e.styles?.section))
|
|
72
|
+
}, [i("div", {
|
|
73
|
+
class: s(W.value),
|
|
74
|
+
style: c(B(e.styles?.title)),
|
|
75
|
+
"data-ui-alert-title": "true"
|
|
76
|
+
}, [f(t.$slots, "title", {}, () => [a(p(e.title), 1)])], 6), N.value ? (u(), r("div", {
|
|
77
|
+
key: 0,
|
|
78
|
+
class: s(G.value),
|
|
79
|
+
style: c(B(e.styles?.description)),
|
|
80
|
+
"data-ui-alert-description": "true"
|
|
81
|
+
}, [f(t.$slots, "description", {}, () => [a(p(e.description), 1)])], 6)) : n("", !0)], 6),
|
|
82
|
+
P.value ? (u(), r("div", {
|
|
83
|
+
key: 1,
|
|
84
|
+
class: s(K.value),
|
|
85
|
+
style: c(B(e.styles?.actions)),
|
|
86
|
+
"data-ui-alert-actions": "true"
|
|
87
|
+
}, [f(t.$slots, "action", {}, () => [a(p(e.action), 1)])], 6)) : n("", !0),
|
|
88
|
+
I.value ? (u(), r("button", {
|
|
89
|
+
key: 2,
|
|
90
|
+
type: "button",
|
|
91
|
+
"aria-label": R.value,
|
|
92
|
+
class: s(q.value),
|
|
93
|
+
style: c(B(e.styles?.close)),
|
|
94
|
+
"data-ui-alert-close": "true",
|
|
95
|
+
onClick: J
|
|
96
|
+
}, [f(t.$slots, "closeIcon", {}, () => [i("span", { class: s([L.value, "size-3.5"]) }, null, 2)])], 14, _)) : n("", !0)
|
|
97
|
+
], 14, g)) : n("", !0);
|
|
98
|
+
}
|
|
99
|
+
}), y = [
|
|
100
|
+
"success",
|
|
101
|
+
"info",
|
|
102
|
+
"warning",
|
|
103
|
+
"error"
|
|
104
|
+
], b = ["outlined", "filled"], x = {
|
|
105
|
+
success: {
|
|
106
|
+
outlined: "border-green-300/70 bg-green-50/80 text-green-900 dark:border-green-500/35 dark:bg-green-500/12 dark:text-green-100",
|
|
107
|
+
filled: "border-transparent bg-green-500/12 text-green-900 dark:bg-green-500/18 dark:text-green-100"
|
|
108
|
+
},
|
|
109
|
+
info: {
|
|
110
|
+
outlined: "border-brand-300/70 bg-brand-50/80 text-brand-900 dark:border-brand-500/35 dark:bg-brand-500/12 dark:text-brand-100",
|
|
111
|
+
filled: "border-transparent bg-brand-500/12 text-brand-900 dark:bg-brand-500/18 dark:text-brand-100"
|
|
112
|
+
},
|
|
113
|
+
warning: {
|
|
114
|
+
outlined: "border-amber-300/75 bg-amber-50/85 text-amber-950 dark:border-amber-500/40 dark:bg-amber-500/14 dark:text-amber-100",
|
|
115
|
+
filled: "border-transparent bg-amber-500/14 text-amber-950 dark:bg-amber-500/20 dark:text-amber-100"
|
|
116
|
+
},
|
|
117
|
+
error: {
|
|
118
|
+
outlined: "border-red-300/75 bg-red-50/85 text-red-950 dark:border-red-500/40 dark:bg-red-500/14 dark:text-red-100",
|
|
119
|
+
filled: "border-transparent bg-red-500/14 text-red-950 dark:bg-red-500/20 dark:text-red-100"
|
|
120
|
+
}
|
|
121
|
+
}, S = {
|
|
122
|
+
success: "text-green-500 dark:text-green-300",
|
|
123
|
+
info: "text-brand-500 dark:text-brand-300",
|
|
124
|
+
warning: "text-amber-500 dark:text-amber-300",
|
|
125
|
+
error: "text-red-500 dark:text-red-300"
|
|
126
|
+
}, C = e("relative flex w-full overflow-hidden border px-3 py-2 text-sm transition-all duration-200 ease-out", {
|
|
127
|
+
variants: {
|
|
128
|
+
type: {
|
|
129
|
+
success: "",
|
|
130
|
+
info: "",
|
|
131
|
+
warning: "",
|
|
132
|
+
error: ""
|
|
133
|
+
},
|
|
134
|
+
variant: {
|
|
135
|
+
outlined: "",
|
|
136
|
+
filled: ""
|
|
137
|
+
},
|
|
138
|
+
banner: {
|
|
139
|
+
true: "rounded-none border-x-0 border-t-0",
|
|
140
|
+
false: "rounded-md"
|
|
141
|
+
},
|
|
142
|
+
withDescription: {
|
|
143
|
+
true: "items-start gap-3 px-4 py-4",
|
|
144
|
+
false: "items-center gap-2"
|
|
145
|
+
},
|
|
146
|
+
closing: {
|
|
147
|
+
true: "max-h-0 scale-y-95 px-0 py-0 opacity-0",
|
|
148
|
+
false: "max-h-80 opacity-100"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
compoundVariants: y.flatMap((e) => b.map((t) => ({
|
|
152
|
+
type: e,
|
|
153
|
+
variant: t,
|
|
154
|
+
class: x[e][t]
|
|
155
|
+
}))),
|
|
156
|
+
defaultVariants: {
|
|
157
|
+
type: "info",
|
|
158
|
+
variant: "outlined",
|
|
159
|
+
banner: !1,
|
|
160
|
+
withDescription: !1,
|
|
161
|
+
closing: !1
|
|
162
|
+
}
|
|
163
|
+
}), w = e("mt-0.5 inline-flex shrink-0 items-center justify-center", {
|
|
164
|
+
variants: {
|
|
165
|
+
type: {
|
|
166
|
+
success: S.success,
|
|
167
|
+
info: S.info,
|
|
168
|
+
warning: S.warning,
|
|
169
|
+
error: S.error
|
|
170
|
+
},
|
|
171
|
+
withDescription: {
|
|
172
|
+
true: "size-6 text-2xl",
|
|
173
|
+
false: "size-4 text-base"
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
defaultVariants: {
|
|
177
|
+
type: "info",
|
|
178
|
+
withDescription: !1
|
|
179
|
+
}
|
|
180
|
+
}), T = e("min-w-0 flex-1"), E = e("min-w-0 font-medium text-current", {
|
|
181
|
+
variants: { withDescription: {
|
|
182
|
+
true: "text-sm/5",
|
|
183
|
+
false: "text-sm/5"
|
|
184
|
+
} },
|
|
185
|
+
defaultVariants: { withDescription: !1 }
|
|
186
|
+
}), D = e("mt-1 text-xs/5 text-current/75"), O = e("ml-auto flex shrink-0 items-center gap-2"), k = e("inline-flex size-6 shrink-0 items-center justify-center rounded text-current/65 transition-colors hover:bg-current/10 hover:text-current focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-current/30");
|
|
187
|
+
//#endregion
|
|
188
|
+
export { C as a, v as c, w as i, k as n, T as o, D as r, E as s, O as t };
|
|
189
|
+
|
|
190
|
+
//# sourceMappingURL=alert-CczW_DKs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-CczW_DKs.js","names":[],"sources":["../../src/alert/Alert.vue","../../src/alert/Alert.vue","../../src/alert/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport { clsx } from 'clsx'\nimport { computed, onBeforeUnmount, ref, useSlots } from 'vue'\nimport type { CSSProperties } from 'vue'\n\nimport {\n alertActions,\n alertCloseButton,\n alertDescription,\n alertIcon,\n alertRoot,\n alertSection,\n alertTitle,\n type AlertClosableOptions,\n type AlertSemanticClassNames,\n type AlertSemanticStyles,\n type AlertType,\n type AlertVariant\n} from '.'\n\nconst props = withDefaults(\n defineProps<{\n /** title 是警告提示主内容。 */\n title?: string | number\n /** description 是警告提示辅助说明。 */\n description?: string | number\n /** type 指定 success、info、warning、error 四种语义状态。 */\n type?: AlertType\n /** variant 指定边框样式或填充样式。 */\n variant?: AlertVariant\n /** banner 表示顶部公告形态,默认展示图标且类型为 warning。 */\n banner?: boolean\n /** showIcon 控制是否展示状态图标,banner 模式默认展示。 */\n showIcon?: boolean\n /** icon 是自定义 UnoCSS/Iconify 图标类名,仅 showIcon 生效。 */\n icon?: string\n /** action 是简短操作文本;复杂操作建议使用 action 插槽。 */\n action?: string | number\n /** closable 控制关闭按钮;对象形式可配置关闭图标和回调。 */\n closable?: boolean | AlertClosableOptions\n /** closeAriaLabel 是关闭按钮无障碍文案。 */\n closeAriaLabel?: string\n /** classNames 定义 root/icon/section/title/description/actions/close 语义结构类名。 */\n classNames?: AlertSemanticClassNames\n /** styles 定义 root/icon/section/title/description/actions/close 语义结构样式。 */\n styles?: AlertSemanticStyles\n }>(),\n {\n title: undefined,\n description: undefined,\n type: undefined,\n variant: 'outlined',\n banner: false,\n showIcon: undefined,\n icon: '',\n action: undefined,\n closable: false,\n closeAriaLabel: '关闭',\n classNames: undefined,\n styles: undefined\n }\n)\n\nconst emit = defineEmits<{\n (e: 'close', event: MouseEvent): void\n (e: 'afterClose'): void\n}>()\n\nconst slots = useSlots()\nconst rendered = ref(true)\nconst closing = ref(false)\nlet closeTimer: number | undefined\n\nconst resolvedType = computed<AlertType>(() => props.type ?? (props.banner ? 'warning' : 'info'))\nconst resolvedShowIcon = computed(() => props.showIcon ?? props.banner)\nconst hasDescription = computed(() => !!slots.description || props.description !== undefined && props.description !== null && String(props.description) !== '')\nconst hasAction = computed(() => !!slots.action || props.action !== undefined && props.action !== null && String(props.action) !== '')\nconst closableOptions = computed(() => (typeof props.closable === 'object' ? props.closable : undefined))\nconst isClosable = computed(() => !!props.closable)\nconst resolvedCloseIcon = computed(() => closableOptions.value?.closeIcon || 'i-lucide:x')\nconst resolvedCloseAriaLabel = computed(() => closableOptions.value?.closeAriaLabel || props.closeAriaLabel)\nconst defaultIcon = computed(() => {\n const iconMap: Record<AlertType, string> = {\n success: 'i-lucide:circle-check',\n info: 'i-lucide:info',\n warning: 'i-lucide:triangle-alert',\n error: 'i-lucide:circle-x'\n }\n return props.icon || iconMap[resolvedType.value]\n})\n\nconst normalizeStyle = (value: CSSProperties | string | undefined) => value\nconst rootClass = computed(() =>\n clsx(\n alertRoot({\n type: resolvedType.value,\n variant: props.variant,\n banner: props.banner,\n withDescription: hasDescription.value,\n closing: closing.value\n }),\n props.classNames?.root\n )\n)\nconst iconClass = computed(() => clsx(alertIcon({ type: resolvedType.value, withDescription: hasDescription.value }), props.classNames?.icon))\nconst sectionClass = computed(() => clsx(alertSection(), props.classNames?.section))\nconst titleClass = computed(() => clsx(alertTitle({ withDescription: hasDescription.value }), props.classNames?.title))\nconst descriptionClass = computed(() => clsx(alertDescription(), props.classNames?.description))\nconst actionsClass = computed(() => clsx(alertActions(), props.classNames?.actions))\nconst closeClass = computed(() => clsx(alertCloseButton(), props.classNames?.close))\n\n/** close 执行关闭动画并派发结束事件。 */\nfunction close(event: MouseEvent) {\n if (closing.value) return\n closableOptions.value?.onClose?.(event)\n emit('close', event)\n closing.value = true\n closeTimer = window.setTimeout(() => {\n rendered.value = false\n closableOptions.value?.afterClose?.()\n emit('afterClose')\n }, 200)\n}\n\nonBeforeUnmount(() => {\n if (closeTimer) window.clearTimeout(closeTimer)\n})\n</script>\n\n<template>\n <div v-if=\"rendered\" data-ui-alert=\"true\" role=\"alert\" :data-type=\"resolvedType\" :class=\"rootClass\" :style=\"normalizeStyle(styles?.root)\">\n <span v-if=\"resolvedShowIcon\" :class=\"iconClass\" :style=\"normalizeStyle(styles?.icon)\" data-ui-alert-icon=\"true\" aria-hidden=\"true\">\n <slot name=\"icon\">\n <span :class=\"defaultIcon\" class=\"size-[1em]\"></span>\n </slot>\n </span>\n\n <div :class=\"sectionClass\" :style=\"normalizeStyle(styles?.section)\">\n <div :class=\"titleClass\" :style=\"normalizeStyle(styles?.title)\" data-ui-alert-title=\"true\">\n <slot name=\"title\">{{ title }}</slot>\n </div>\n <div v-if=\"hasDescription\" :class=\"descriptionClass\" :style=\"normalizeStyle(styles?.description)\" data-ui-alert-description=\"true\">\n <slot name=\"description\">{{ description }}</slot>\n </div>\n </div>\n\n <div v-if=\"hasAction\" :class=\"actionsClass\" :style=\"normalizeStyle(styles?.actions)\" data-ui-alert-actions=\"true\">\n <slot name=\"action\">{{ action }}</slot>\n </div>\n\n <button v-if=\"isClosable\" type=\"button\" :aria-label=\"resolvedCloseAriaLabel\" :class=\"closeClass\" :style=\"normalizeStyle(styles?.close)\" data-ui-alert-close=\"true\" @click=\"close\">\n <slot name=\"closeIcon\">\n <span :class=\"resolvedCloseIcon\" class=\"size-3.5\"></span>\n </slot>\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { clsx } from 'clsx'\nimport { computed, onBeforeUnmount, ref, useSlots } from 'vue'\nimport type { CSSProperties } from 'vue'\n\nimport {\n alertActions,\n alertCloseButton,\n alertDescription,\n alertIcon,\n alertRoot,\n alertSection,\n alertTitle,\n type AlertClosableOptions,\n type AlertSemanticClassNames,\n type AlertSemanticStyles,\n type AlertType,\n type AlertVariant\n} from '.'\n\nconst props = withDefaults(\n defineProps<{\n /** title 是警告提示主内容。 */\n title?: string | number\n /** description 是警告提示辅助说明。 */\n description?: string | number\n /** type 指定 success、info、warning、error 四种语义状态。 */\n type?: AlertType\n /** variant 指定边框样式或填充样式。 */\n variant?: AlertVariant\n /** banner 表示顶部公告形态,默认展示图标且类型为 warning。 */\n banner?: boolean\n /** showIcon 控制是否展示状态图标,banner 模式默认展示。 */\n showIcon?: boolean\n /** icon 是自定义 UnoCSS/Iconify 图标类名,仅 showIcon 生效。 */\n icon?: string\n /** action 是简短操作文本;复杂操作建议使用 action 插槽。 */\n action?: string | number\n /** closable 控制关闭按钮;对象形式可配置关闭图标和回调。 */\n closable?: boolean | AlertClosableOptions\n /** closeAriaLabel 是关闭按钮无障碍文案。 */\n closeAriaLabel?: string\n /** classNames 定义 root/icon/section/title/description/actions/close 语义结构类名。 */\n classNames?: AlertSemanticClassNames\n /** styles 定义 root/icon/section/title/description/actions/close 语义结构样式。 */\n styles?: AlertSemanticStyles\n }>(),\n {\n title: undefined,\n description: undefined,\n type: undefined,\n variant: 'outlined',\n banner: false,\n showIcon: undefined,\n icon: '',\n action: undefined,\n closable: false,\n closeAriaLabel: '关闭',\n classNames: undefined,\n styles: undefined\n }\n)\n\nconst emit = defineEmits<{\n (e: 'close', event: MouseEvent): void\n (e: 'afterClose'): void\n}>()\n\nconst slots = useSlots()\nconst rendered = ref(true)\nconst closing = ref(false)\nlet closeTimer: number | undefined\n\nconst resolvedType = computed<AlertType>(() => props.type ?? (props.banner ? 'warning' : 'info'))\nconst resolvedShowIcon = computed(() => props.showIcon ?? props.banner)\nconst hasDescription = computed(() => !!slots.description || props.description !== undefined && props.description !== null && String(props.description) !== '')\nconst hasAction = computed(() => !!slots.action || props.action !== undefined && props.action !== null && String(props.action) !== '')\nconst closableOptions = computed(() => (typeof props.closable === 'object' ? props.closable : undefined))\nconst isClosable = computed(() => !!props.closable)\nconst resolvedCloseIcon = computed(() => closableOptions.value?.closeIcon || 'i-lucide:x')\nconst resolvedCloseAriaLabel = computed(() => closableOptions.value?.closeAriaLabel || props.closeAriaLabel)\nconst defaultIcon = computed(() => {\n const iconMap: Record<AlertType, string> = {\n success: 'i-lucide:circle-check',\n info: 'i-lucide:info',\n warning: 'i-lucide:triangle-alert',\n error: 'i-lucide:circle-x'\n }\n return props.icon || iconMap[resolvedType.value]\n})\n\nconst normalizeStyle = (value: CSSProperties | string | undefined) => value\nconst rootClass = computed(() =>\n clsx(\n alertRoot({\n type: resolvedType.value,\n variant: props.variant,\n banner: props.banner,\n withDescription: hasDescription.value,\n closing: closing.value\n }),\n props.classNames?.root\n )\n)\nconst iconClass = computed(() => clsx(alertIcon({ type: resolvedType.value, withDescription: hasDescription.value }), props.classNames?.icon))\nconst sectionClass = computed(() => clsx(alertSection(), props.classNames?.section))\nconst titleClass = computed(() => clsx(alertTitle({ withDescription: hasDescription.value }), props.classNames?.title))\nconst descriptionClass = computed(() => clsx(alertDescription(), props.classNames?.description))\nconst actionsClass = computed(() => clsx(alertActions(), props.classNames?.actions))\nconst closeClass = computed(() => clsx(alertCloseButton(), props.classNames?.close))\n\n/** close 执行关闭动画并派发结束事件。 */\nfunction close(event: MouseEvent) {\n if (closing.value) return\n closableOptions.value?.onClose?.(event)\n emit('close', event)\n closing.value = true\n closeTimer = window.setTimeout(() => {\n rendered.value = false\n closableOptions.value?.afterClose?.()\n emit('afterClose')\n }, 200)\n}\n\nonBeforeUnmount(() => {\n if (closeTimer) window.clearTimeout(closeTimer)\n})\n</script>\n\n<template>\n <div v-if=\"rendered\" data-ui-alert=\"true\" role=\"alert\" :data-type=\"resolvedType\" :class=\"rootClass\" :style=\"normalizeStyle(styles?.root)\">\n <span v-if=\"resolvedShowIcon\" :class=\"iconClass\" :style=\"normalizeStyle(styles?.icon)\" data-ui-alert-icon=\"true\" aria-hidden=\"true\">\n <slot name=\"icon\">\n <span :class=\"defaultIcon\" class=\"size-[1em]\"></span>\n </slot>\n </span>\n\n <div :class=\"sectionClass\" :style=\"normalizeStyle(styles?.section)\">\n <div :class=\"titleClass\" :style=\"normalizeStyle(styles?.title)\" data-ui-alert-title=\"true\">\n <slot name=\"title\">{{ title }}</slot>\n </div>\n <div v-if=\"hasDescription\" :class=\"descriptionClass\" :style=\"normalizeStyle(styles?.description)\" data-ui-alert-description=\"true\">\n <slot name=\"description\">{{ description }}</slot>\n </div>\n </div>\n\n <div v-if=\"hasAction\" :class=\"actionsClass\" :style=\"normalizeStyle(styles?.actions)\" data-ui-alert-actions=\"true\">\n <slot name=\"action\">{{ action }}</slot>\n </div>\n\n <button v-if=\"isClosable\" type=\"button\" :aria-label=\"resolvedCloseAriaLabel\" :class=\"closeClass\" :style=\"normalizeStyle(styles?.close)\" data-ui-alert-close=\"true\" @click=\"close\">\n <slot name=\"closeIcon\">\n <span :class=\"resolvedCloseIcon\" class=\"size-3.5\"></span>\n </slot>\n </button>\n </div>\n</template>\n","import { cva } from 'class-variance-authority'\nimport type { VariantProps } from 'class-variance-authority'\nimport type { CSSProperties } from 'vue'\n\nexport { default as Alert } from './Alert.vue'\n\nexport type AlertType = 'success' | 'info' | 'warning' | 'error'\nexport type AlertVariant = 'outlined' | 'filled'\nexport type AlertSemanticName = 'root' | 'icon' | 'section' | 'title' | 'description' | 'actions' | 'close'\nexport type AlertSemanticClassNames = Partial<Record<AlertSemanticName, string>>\nexport type AlertSemanticStyles = Partial<Record<AlertSemanticName, CSSProperties | string>>\n\nexport interface AlertClosableOptions {\n closeIcon?: string\n closeAriaLabel?: string\n afterClose?: () => void\n onClose?: (event: MouseEvent) => void\n}\n\nconst alertTypes = ['success', 'info', 'warning', 'error'] as const\nconst alertVariants = ['outlined', 'filled'] as const\n\nconst alertTypeClasses: Record<AlertType, Record<AlertVariant, string>> = {\n success: {\n outlined: 'border-green-300/70 bg-green-50/80 text-green-900 dark:border-green-500/35 dark:bg-green-500/12 dark:text-green-100',\n filled: 'border-transparent bg-green-500/12 text-green-900 dark:bg-green-500/18 dark:text-green-100'\n },\n info: {\n outlined: 'border-brand-300/70 bg-brand-50/80 text-brand-900 dark:border-brand-500/35 dark:bg-brand-500/12 dark:text-brand-100',\n filled: 'border-transparent bg-brand-500/12 text-brand-900 dark:bg-brand-500/18 dark:text-brand-100'\n },\n warning: {\n outlined: 'border-amber-300/75 bg-amber-50/85 text-amber-950 dark:border-amber-500/40 dark:bg-amber-500/14 dark:text-amber-100',\n filled: 'border-transparent bg-amber-500/14 text-amber-950 dark:bg-amber-500/20 dark:text-amber-100'\n },\n error: {\n outlined: 'border-red-300/75 bg-red-50/85 text-red-950 dark:border-red-500/40 dark:bg-red-500/14 dark:text-red-100',\n filled: 'border-transparent bg-red-500/14 text-red-950 dark:bg-red-500/20 dark:text-red-100'\n }\n}\n\nconst alertIconClasses: Record<AlertType, string> = {\n success: 'text-green-500 dark:text-green-300',\n info: 'text-brand-500 dark:text-brand-300',\n warning: 'text-amber-500 dark:text-amber-300',\n error: 'text-red-500 dark:text-red-300'\n}\n\nconst alertCompoundVariants = alertTypes.flatMap((type) =>\n alertVariants.map((variant) => ({\n type,\n variant,\n class: alertTypeClasses[type][variant]\n }))\n)\n\n/** alertRoot 定义 Alert 根节点的状态色、边框和关闭动画。 */\nexport const alertRoot = cva('relative flex w-full overflow-hidden border px-3 py-2 text-sm transition-all duration-200 ease-out', {\n variants: {\n type: {\n success: '',\n info: '',\n warning: '',\n error: ''\n },\n variant: {\n outlined: '',\n filled: ''\n },\n banner: {\n true: 'rounded-none border-x-0 border-t-0',\n false: 'rounded-md'\n },\n withDescription: {\n true: 'items-start gap-3 px-4 py-4',\n false: 'items-center gap-2'\n },\n closing: {\n true: 'max-h-0 scale-y-95 px-0 py-0 opacity-0',\n false: 'max-h-80 opacity-100'\n }\n },\n compoundVariants: alertCompoundVariants,\n defaultVariants: {\n type: 'info',\n variant: 'outlined',\n banner: false,\n withDescription: false,\n closing: false\n }\n})\n\n/** alertIcon 定义 Alert 状态图标尺寸和颜色。 */\nexport const alertIcon = cva('mt-0.5 inline-flex shrink-0 items-center justify-center', {\n variants: {\n type: {\n success: alertIconClasses.success,\n info: alertIconClasses.info,\n warning: alertIconClasses.warning,\n error: alertIconClasses.error\n },\n withDescription: {\n true: 'size-6 text-2xl',\n false: 'size-4 text-base'\n }\n },\n defaultVariants: {\n type: 'info',\n withDescription: false\n }\n})\n\n/** alertSection 定义 Alert 文案区布局。 */\nexport const alertSection = cva('min-w-0 flex-1')\n\n/** alertTitle 定义 Alert 标题文本样式。 */\nexport const alertTitle = cva('min-w-0 font-medium text-current', {\n variants: {\n withDescription: {\n true: 'text-sm/5',\n false: 'text-sm/5'\n }\n },\n defaultVariants: {\n withDescription: false\n }\n})\n\n/** alertDescription 定义 Alert 辅助描述文本样式。 */\nexport const alertDescription = cva('mt-1 text-xs/5 text-current/75')\n\n/** alertActions 定义 Alert 操作区布局。 */\nexport const alertActions = cva('ml-auto flex shrink-0 items-center gap-2')\n\n/** alertCloseButton 定义 Alert 关闭按钮交互样式。 */\nexport const alertCloseButton = cva('inline-flex size-6 shrink-0 items-center justify-center rounded text-current/65 transition-colors hover:bg-current/10 hover:text-current focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-current/30')\n\nexport type AlertRootProps = VariantProps<typeof alertRoot>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBA,IAAM,IAAQ,GA2CR,IAAO,GAKP,IAAQ,EAAS,GACjB,IAAW,EAAI,EAAI,GACnB,IAAU,EAAI,EAAK,GACrB,GAEE,IAAe,QAA0B,EAAM,SAAS,EAAM,SAAS,YAAY,OAAO,GAC1F,IAAmB,QAAe,EAAM,YAAY,EAAM,MAAM,GAChE,IAAiB,QAAe,CAAC,CAAC,EAAM,eAAe,EAAM,gBAAgB,KAAA,KAAa,EAAM,gBAAgB,QAAQ,OAAO,EAAM,WAAW,MAAM,EAAE,GACxJ,IAAY,QAAe,CAAC,CAAC,EAAM,UAAU,EAAM,WAAW,KAAA,KAAa,EAAM,WAAW,QAAQ,OAAO,EAAM,MAAM,MAAM,EAAE,GAC/H,IAAkB,QAAgB,OAAO,EAAM,YAAa,WAAW,EAAM,WAAW,KAAA,CAAU,GAClG,IAAa,QAAe,CAAC,CAAC,EAAM,QAAQ,GAC5C,IAAoB,QAAe,EAAgB,OAAO,aAAa,YAAY,GACnF,IAAyB,QAAe,EAAgB,OAAO,kBAAkB,EAAM,cAAc,GACrG,IAAc,QAOX,EAAM,QAAQ;GALnB,SAAS;GACT,MAAM;GACN,SAAS;GACT,OAAO;EAEY,EAAQ,EAAa,MAC3C,GAEK,KAAkB,MAA8C,GAChE,IAAY,QAChB,EACE,E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Ae,EAAI,gBAAgB,GAGnC,IAAa,EAAI,oCAAoC;CAChE,UAAU,EACR,iBAAiB;EACf,MAAM;EACN,OAAO;CACT,EACF;CACA,iBAAiB,EACf,iBAAiB,GACnB;AACF,CAAC,GAGY,IAAmB,EAAI,gCAAgC,GAGvD,IAAe,EAAI,0CAA0C,GAG7D,IAAmB,EAAI,wNAA0L"}
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import { cva as e } from "class-variance-authority";
|
|
2
|
+
import { Fragment as t, Transition as n, computed as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, normalizeClass as u, normalizeStyle as d, openBlock as f, renderSlot as p, toDisplayString as m, useSlots as h, withCtx as g } from "vue";
|
|
3
|
+
import { clsx as _ } from "clsx";
|
|
4
|
+
//#region src/badge/Badge.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var v = ["title"], y = ["title"], b = { key: 0 }, x = /* @__PURE__ */ l({
|
|
6
|
+
__name: "Badge",
|
|
7
|
+
props: {
|
|
8
|
+
count: { default: void 0 },
|
|
9
|
+
dot: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: !1
|
|
12
|
+
},
|
|
13
|
+
overflowCount: { default: 99 },
|
|
14
|
+
showZero: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: !1
|
|
17
|
+
},
|
|
18
|
+
status: { default: void 0 },
|
|
19
|
+
text: { default: void 0 },
|
|
20
|
+
color: { default: "" },
|
|
21
|
+
size: { default: "medium" },
|
|
22
|
+
offset: { default: void 0 },
|
|
23
|
+
title: { default: void 0 },
|
|
24
|
+
classNames: { default: void 0 },
|
|
25
|
+
styles: { default: void 0 }
|
|
26
|
+
},
|
|
27
|
+
setup(e) {
|
|
28
|
+
let l = e, x = h(), S = r(() => !!x.default), C = r(() => !!x.count), w = r(() => !!l.status || !S.value && l.text !== void 0 && l.count === void 0 && !l.dot), T = r(() => l.count === 0 || l.count === "0"), k = r(() => w.value ? !1 : l.dot || C.value ? !0 : !(l.count === void 0 || l.count === null || l.count === "" || T.value && !l.showZero)), A = r(() => typeof l.count == "number" && Number.isFinite(l.count) && l.count > l.overflowCount ? `${l.overflowCount}+` : l.count), j = r(() => l.title ?? (l.dot ? "" : String(A.value ?? ""))), M = r(() => _(E({
|
|
29
|
+
statusMode: w.value,
|
|
30
|
+
standalone: !S.value
|
|
31
|
+
}), l.classNames?.root)), N = r(() => w.value ? "status" : l.dot ? "dot" : "count"), P = r(() => _(D({
|
|
32
|
+
mode: N.value,
|
|
33
|
+
size: l.size,
|
|
34
|
+
anchored: S.value && !w.value,
|
|
35
|
+
status: w.value ? l.status ?? "default" : "error"
|
|
36
|
+
}), l.classNames?.indicator)), F = r(() => _(O(), l.classNames?.text)), I = (e) => e, L = r(() => l.color ? { backgroundColor: l.color } : {}), R = r(() => {
|
|
37
|
+
let e = { ...L.value };
|
|
38
|
+
if (S.value && !w.value) {
|
|
39
|
+
let [t = 0, n = 0] = l.offset ?? [];
|
|
40
|
+
e.transform = `translate(calc(50% + ${t}px), calc(-50% + ${n}px))`;
|
|
41
|
+
}
|
|
42
|
+
return typeof l.styles?.indicator == "string" ? l.styles.indicator : {
|
|
43
|
+
...e,
|
|
44
|
+
...l.styles?.indicator
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
return (r, l) => (f(), a("span", {
|
|
48
|
+
"data-ui-badge": "true",
|
|
49
|
+
class: u(M.value),
|
|
50
|
+
style: d(I(e.styles?.root))
|
|
51
|
+
}, [w.value ? (f(), a(t, { key: 0 }, [o("span", {
|
|
52
|
+
class: u(P.value),
|
|
53
|
+
style: d(R.value),
|
|
54
|
+
"data-ui-badge-indicator": "true",
|
|
55
|
+
title: e.title,
|
|
56
|
+
"aria-hidden": "true"
|
|
57
|
+
}, null, 14, v), r.$slots.text || e.text !== void 0 ? (f(), a("span", {
|
|
58
|
+
key: 0,
|
|
59
|
+
class: u(F.value),
|
|
60
|
+
style: d(I(e.styles?.text)),
|
|
61
|
+
"data-ui-badge-text": "true"
|
|
62
|
+
}, [p(r.$slots, "text", {}, () => [s(m(e.text), 1)])], 6)) : i("", !0)], 64)) : (f(), a(t, { key: 1 }, [p(r.$slots, "default"), c(n, {
|
|
63
|
+
"enter-active-class": "transition duration-200 ease-out",
|
|
64
|
+
"enter-from-class": "scale-50 opacity-0",
|
|
65
|
+
"enter-to-class": "scale-100 opacity-100",
|
|
66
|
+
"leave-active-class": "transition duration-150 ease-in",
|
|
67
|
+
"leave-from-class": "scale-100 opacity-100",
|
|
68
|
+
"leave-to-class": "scale-50 opacity-0"
|
|
69
|
+
}, {
|
|
70
|
+
default: g(() => [k.value ? (f(), a("sup", {
|
|
71
|
+
key: 0,
|
|
72
|
+
class: u(P.value),
|
|
73
|
+
style: d(R.value),
|
|
74
|
+
"data-ui-badge-indicator": "true",
|
|
75
|
+
title: j.value
|
|
76
|
+
}, [e.dot ? i("", !0) : (f(), a("span", b, [p(r.$slots, "count", {}, () => [s(m(A.value), 1)])]))], 14, y)) : i("", !0)]),
|
|
77
|
+
_: 3
|
|
78
|
+
})], 64))], 6));
|
|
79
|
+
}
|
|
80
|
+
}), S = /* @__PURE__ */ l({
|
|
81
|
+
__name: "BadgeRibbon",
|
|
82
|
+
props: {
|
|
83
|
+
text: { default: void 0 },
|
|
84
|
+
color: { default: "brand" },
|
|
85
|
+
placement: { default: "end" },
|
|
86
|
+
classNames: { default: void 0 },
|
|
87
|
+
styles: { default: void 0 }
|
|
88
|
+
},
|
|
89
|
+
setup(e) {
|
|
90
|
+
let t = e, n = [
|
|
91
|
+
"brand",
|
|
92
|
+
"blue",
|
|
93
|
+
"red",
|
|
94
|
+
"green",
|
|
95
|
+
"yellow",
|
|
96
|
+
"orange",
|
|
97
|
+
"gray"
|
|
98
|
+
], i = r(() => n.includes(t.color) ? t.color : "custom"), c = r(() => i.value === "custom" && t.color ? { backgroundColor: t.color } : {}), l = r(() => _(k(), t.classNames?.root)), h = r(() => _(A({
|
|
99
|
+
color: i.value,
|
|
100
|
+
placement: t.placement
|
|
101
|
+
}), t.classNames?.indicator)), g = r(() => j({
|
|
102
|
+
placement: t.placement,
|
|
103
|
+
color: i.value
|
|
104
|
+
})), v = (e) => e, y = (e, t = .78) => {
|
|
105
|
+
let n = e.trim().replace("#", "");
|
|
106
|
+
return /^[0-9a-fA-F]{6}$/.test(n) ? `#${[
|
|
107
|
+
n.slice(0, 2),
|
|
108
|
+
n.slice(2, 4),
|
|
109
|
+
n.slice(4, 6)
|
|
110
|
+
].map((e) => Math.max(0, Math.round(Number.parseInt(e, 16) * t))).map((e) => e.toString(16).padStart(2, "0")).join("")}` : "";
|
|
111
|
+
}, b = r(() => typeof t.styles?.indicator == "string" ? t.styles.indicator : {
|
|
112
|
+
...c.value,
|
|
113
|
+
...t.styles?.indicator
|
|
114
|
+
}), x = r(() => {
|
|
115
|
+
if (typeof t.styles?.indicator == "string" || i.value !== "custom" || !t.color) return;
|
|
116
|
+
let e = y(t.color);
|
|
117
|
+
return e ? { backgroundColor: e } : {
|
|
118
|
+
backgroundColor: t.color,
|
|
119
|
+
filter: "brightness(0.78)"
|
|
120
|
+
};
|
|
121
|
+
});
|
|
122
|
+
return (t, n) => (f(), a("div", {
|
|
123
|
+
"data-ui-badge-ribbon": "true",
|
|
124
|
+
class: u(l.value),
|
|
125
|
+
style: d(v(e.styles?.root))
|
|
126
|
+
}, [
|
|
127
|
+
p(t.$slots, "default"),
|
|
128
|
+
o("div", {
|
|
129
|
+
class: u(h.value),
|
|
130
|
+
style: d(b.value),
|
|
131
|
+
"data-ui-badge-ribbon-indicator": "true"
|
|
132
|
+
}, [o("span", {
|
|
133
|
+
class: u(e.classNames?.content),
|
|
134
|
+
style: d(v(e.styles?.content)),
|
|
135
|
+
"data-ui-badge-ribbon-content": "true"
|
|
136
|
+
}, [p(t.$slots, "text", {}, () => [s(m(e.text), 1)])], 6)], 6),
|
|
137
|
+
o("span", {
|
|
138
|
+
class: u(g.value),
|
|
139
|
+
style: d(x.value),
|
|
140
|
+
"aria-hidden": "true"
|
|
141
|
+
}, null, 6)
|
|
142
|
+
], 6));
|
|
143
|
+
}
|
|
144
|
+
}), C = {
|
|
145
|
+
success: "bg-green-500",
|
|
146
|
+
processing: "bg-brand-500",
|
|
147
|
+
default: "bg-zinc-400 dark:bg-zinc-500",
|
|
148
|
+
error: "bg-red-500",
|
|
149
|
+
warning: "bg-amber-500"
|
|
150
|
+
}, w = {
|
|
151
|
+
brand: "bg-brand-500 text-white",
|
|
152
|
+
blue: "bg-blue-500 text-white",
|
|
153
|
+
red: "bg-red-500 text-white",
|
|
154
|
+
green: "bg-green-500 text-white",
|
|
155
|
+
yellow: "bg-amber-500 text-white",
|
|
156
|
+
orange: "bg-orange-500 text-white",
|
|
157
|
+
gray: "bg-zinc-500 text-white"
|
|
158
|
+
}, T = {
|
|
159
|
+
brand: "bg-brand-700",
|
|
160
|
+
blue: "bg-blue-700",
|
|
161
|
+
red: "bg-red-700",
|
|
162
|
+
green: "bg-green-700",
|
|
163
|
+
yellow: "bg-amber-700",
|
|
164
|
+
orange: "bg-orange-700",
|
|
165
|
+
gray: "bg-zinc-700"
|
|
166
|
+
}, E = e("relative inline-flex w-fit align-middle", {
|
|
167
|
+
variants: {
|
|
168
|
+
statusMode: {
|
|
169
|
+
true: "items-center gap-2",
|
|
170
|
+
false: "items-start"
|
|
171
|
+
},
|
|
172
|
+
standalone: {
|
|
173
|
+
true: "leading-none",
|
|
174
|
+
false: ""
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
defaultVariants: {
|
|
178
|
+
statusMode: !1,
|
|
179
|
+
standalone: !1
|
|
180
|
+
}
|
|
181
|
+
}), D = e("z-1 inline-flex origin-center items-center justify-center whitespace-nowrap rounded-full font-normal shadow-[0_0_0_1px_rgba(255,255,255,0.95)] transition-all duration-200 dark:shadow-[0_0_0_1px_rgba(24,24,27,0.95)]", {
|
|
182
|
+
variants: {
|
|
183
|
+
mode: {
|
|
184
|
+
count: "bg-red-500 text-white",
|
|
185
|
+
dot: "bg-red-500 p-0 text-transparent",
|
|
186
|
+
status: "p-0 text-transparent shadow-none"
|
|
187
|
+
},
|
|
188
|
+
size: {
|
|
189
|
+
medium: "",
|
|
190
|
+
small: ""
|
|
191
|
+
},
|
|
192
|
+
anchored: {
|
|
193
|
+
true: "absolute right-0 top-0",
|
|
194
|
+
false: "relative"
|
|
195
|
+
},
|
|
196
|
+
status: {
|
|
197
|
+
success: C.success,
|
|
198
|
+
processing: C.processing,
|
|
199
|
+
default: C.default,
|
|
200
|
+
error: C.error,
|
|
201
|
+
warning: C.warning
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
compoundVariants: [
|
|
205
|
+
{
|
|
206
|
+
mode: "count",
|
|
207
|
+
size: "medium",
|
|
208
|
+
class: "h-5 min-w-5 px-1.5 text-xs/5"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
mode: "count",
|
|
212
|
+
size: "small",
|
|
213
|
+
class: "h-3.5 min-w-3.5 px-1 text-[10px]/3.5"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
mode: "dot",
|
|
217
|
+
size: "medium",
|
|
218
|
+
class: "size-2"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
mode: "dot",
|
|
222
|
+
size: "small",
|
|
223
|
+
class: "size-1.5"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
mode: "status",
|
|
227
|
+
class: "size-1.5"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
status: "processing",
|
|
231
|
+
mode: "status",
|
|
232
|
+
class: "after:absolute after:inset-0 after:animate-ping after:rounded-full after:bg-brand-500/40 after:content-empty"
|
|
233
|
+
}
|
|
234
|
+
],
|
|
235
|
+
defaultVariants: {
|
|
236
|
+
mode: "count",
|
|
237
|
+
size: "medium",
|
|
238
|
+
anchored: !0,
|
|
239
|
+
status: "error"
|
|
240
|
+
}
|
|
241
|
+
}), O = e("text-sm/5 text-secondary"), k = e("relative rounded-md"), A = e("absolute top-3 z-1 inline-flex h-8 min-w-12 items-center justify-center px-4 text-sm/8 font-medium shadow-sm", {
|
|
242
|
+
variants: {
|
|
243
|
+
placement: {
|
|
244
|
+
start: "left-0 -translate-x-3 rounded-md rounded-bl-none",
|
|
245
|
+
end: "right-0 translate-x-3 rounded-md rounded-br-none"
|
|
246
|
+
},
|
|
247
|
+
color: {
|
|
248
|
+
brand: w.brand,
|
|
249
|
+
blue: w.blue,
|
|
250
|
+
red: w.red,
|
|
251
|
+
green: w.green,
|
|
252
|
+
yellow: w.yellow,
|
|
253
|
+
orange: w.orange,
|
|
254
|
+
gray: w.gray,
|
|
255
|
+
custom: "text-white"
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
defaultVariants: {
|
|
259
|
+
placement: "end",
|
|
260
|
+
color: "brand"
|
|
261
|
+
}
|
|
262
|
+
}), j = e("absolute top-11 z-0 size-3", {
|
|
263
|
+
variants: {
|
|
264
|
+
placement: {
|
|
265
|
+
start: "left-0 -translate-x-3 [clip-path:polygon(0_0,100%_0,100%_65%)]",
|
|
266
|
+
end: "right-0 translate-x-3 [clip-path:polygon(0_0,100%_0,0_65%)]"
|
|
267
|
+
},
|
|
268
|
+
color: {
|
|
269
|
+
brand: T.brand,
|
|
270
|
+
blue: T.blue,
|
|
271
|
+
red: T.red,
|
|
272
|
+
green: T.green,
|
|
273
|
+
yellow: T.yellow,
|
|
274
|
+
orange: T.orange,
|
|
275
|
+
gray: T.gray,
|
|
276
|
+
custom: ""
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
defaultVariants: {
|
|
280
|
+
placement: "end",
|
|
281
|
+
color: "brand"
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
//#endregion
|
|
285
|
+
export { E as a, x as c, k as i, j as n, O as o, A as r, S as s, D as t };
|
|
286
|
+
|
|
287
|
+
//# sourceMappingURL=badge-BHOZeImh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge-BHOZeImh.js","names":["$slots"],"sources":["../../src/badge/Badge.vue","../../src/badge/Badge.vue","../../src/badge/BadgeRibbon.vue","../../src/badge/BadgeRibbon.vue","../../src/badge/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport { clsx } from 'clsx'\nimport { computed, useSlots } from 'vue'\nimport type { CSSProperties } from 'vue'\n\nimport { badgeIndicator, badgeRoot, badgeStatusText, type BadgeSemanticClassNames, type BadgeSemanticStyles, type BadgeSize, type BadgeStatus } from '.'\n\nconst props = withDefaults(\n defineProps<{\n /** count 是展示的数字或文本,大于 overflowCount 时显示为 overflowCount+。 */\n count?: number | string\n /** dot 表示只展示小圆点,不展示数字。 */\n dot?: boolean\n /** overflowCount 是数字封顶值。 */\n overflowCount?: number\n /** showZero 控制 count 为 0 时是否仍展示徽标。 */\n showZero?: boolean\n /** status 将 Badge 切换为状态点模式。 */\n status?: BadgeStatus\n /** text 是状态点旁边的说明文本。 */\n text?: string | number\n /** color 自定义徽标或状态点背景色。 */\n color?: string\n /** size 在数字徽标模式下控制大小。 */\n size?: BadgeSize\n /** offset 设置徽标相对默认位置的 [x, y] 偏移,单位 px。 */\n offset?: [number, number]\n /** title 是徽标的原生 title。 */\n title?: string\n /** classNames 定义 root/indicator/text 语义结构类名。 */\n classNames?: BadgeSemanticClassNames\n /** styles 定义 root/indicator/text 语义结构样式。 */\n styles?: BadgeSemanticStyles\n }>(),\n {\n count: undefined,\n dot: false,\n overflowCount: 99,\n showZero: false,\n status: undefined,\n text: undefined,\n color: '',\n size: 'medium',\n offset: undefined,\n title: undefined,\n classNames: undefined,\n styles: undefined\n }\n)\n\nconst slots = useSlots()\nconst hasDefaultSlot = computed(() => !!slots.default)\nconst hasCountSlot = computed(() => !!slots.count)\nconst isStatusMode = computed(() => !!props.status || !hasDefaultSlot.value && props.text !== undefined && props.count === undefined && !props.dot)\nconst isZeroCount = computed(() => props.count === 0 || props.count === '0')\nconst shouldRenderCount = computed(() => {\n if (isStatusMode.value) return false\n if (props.dot) return true\n if (hasCountSlot.value) return true\n if (props.count === undefined || props.count === null || props.count === '') return false\n if (isZeroCount.value && !props.showZero) return false\n return true\n})\nconst displayCount = computed(() => {\n if (typeof props.count === 'number' && Number.isFinite(props.count) && props.count > props.overflowCount) return `${props.overflowCount}+`\n return props.count\n})\nconst indicatorTitle = computed(() => props.title ?? (props.dot ? '' : String(displayCount.value ?? '')))\nconst rootClass = computed(() => clsx(badgeRoot({ statusMode: isStatusMode.value, standalone: !hasDefaultSlot.value }), props.classNames?.root))\nconst indicatorMode = computed(() => (isStatusMode.value ? 'status' : props.dot ? 'dot' : 'count'))\nconst indicatorClass = computed(() =>\n clsx(\n badgeIndicator({\n mode: indicatorMode.value,\n size: props.size,\n anchored: hasDefaultSlot.value && !isStatusMode.value,\n status: isStatusMode.value ? props.status ?? 'default' : 'error'\n }),\n props.classNames?.indicator\n )\n)\nconst textClass = computed(() => clsx(badgeStatusText(), props.classNames?.text))\n\nconst normalizeStyle = (value: CSSProperties | string | undefined) => value\nconst customColorStyle = computed<CSSProperties>(() => (props.color ? { backgroundColor: props.color } : {}))\nconst indicatorStyle = computed<CSSProperties | string | undefined>(() => {\n const base: CSSProperties = {\n ...customColorStyle.value\n }\n if (hasDefaultSlot.value && !isStatusMode.value) {\n const [x = 0, y = 0] = props.offset ?? []\n base.transform = `translate(calc(50% + ${x}px), calc(-50% + ${y}px))`\n }\n if (typeof props.styles?.indicator === 'string') return props.styles.indicator\n return {\n ...base,\n ...props.styles?.indicator\n }\n})\n</script>\n\n<template>\n <span data-ui-badge=\"true\" :class=\"rootClass\" :style=\"normalizeStyle(styles?.root)\">\n <template v-if=\"isStatusMode\">\n <span :class=\"indicatorClass\" :style=\"indicatorStyle\" data-ui-badge-indicator=\"true\" :title=\"title\" aria-hidden=\"true\"></span>\n <span v-if=\"$slots.text || text !== undefined\" :class=\"textClass\" :style=\"normalizeStyle(styles?.text)\" data-ui-badge-text=\"true\">\n <slot name=\"text\">{{ text }}</slot>\n </span>\n </template>\n\n <template v-else>\n <slot></slot>\n <Transition enter-active-class=\"transition duration-200 ease-out\" enter-from-class=\"scale-50 opacity-0\" enter-to-class=\"scale-100 opacity-100\" leave-active-class=\"transition duration-150 ease-in\" leave-from-class=\"scale-100 opacity-100\" leave-to-class=\"scale-50 opacity-0\">\n <sup v-if=\"shouldRenderCount\" :class=\"indicatorClass\" :style=\"indicatorStyle\" data-ui-badge-indicator=\"true\" :title=\"indicatorTitle\">\n <span v-if=\"!dot\">\n <slot name=\"count\">{{ displayCount }}</slot>\n </span>\n </sup>\n </Transition>\n </template>\n </span>\n</template>\n","<script setup lang=\"ts\">\nimport { clsx } from 'clsx'\nimport { computed, useSlots } from 'vue'\nimport type { CSSProperties } from 'vue'\n\nimport { badgeIndicator, badgeRoot, badgeStatusText, type BadgeSemanticClassNames, type BadgeSemanticStyles, type BadgeSize, type BadgeStatus } from '.'\n\nconst props = withDefaults(\n defineProps<{\n /** count 是展示的数字或文本,大于 overflowCount 时显示为 overflowCount+。 */\n count?: number | string\n /** dot 表示只展示小圆点,不展示数字。 */\n dot?: boolean\n /** overflowCount 是数字封顶值。 */\n overflowCount?: number\n /** showZero 控制 count 为 0 时是否仍展示徽标。 */\n showZero?: boolean\n /** status 将 Badge 切换为状态点模式。 */\n status?: BadgeStatus\n /** text 是状态点旁边的说明文本。 */\n text?: string | number\n /** color 自定义徽标或状态点背景色。 */\n color?: string\n /** size 在数字徽标模式下控制大小。 */\n size?: BadgeSize\n /** offset 设置徽标相对默认位置的 [x, y] 偏移,单位 px。 */\n offset?: [number, number]\n /** title 是徽标的原生 title。 */\n title?: string\n /** classNames 定义 root/indicator/text 语义结构类名。 */\n classNames?: BadgeSemanticClassNames\n /** styles 定义 root/indicator/text 语义结构样式。 */\n styles?: BadgeSemanticStyles\n }>(),\n {\n count: undefined,\n dot: false,\n overflowCount: 99,\n showZero: false,\n status: undefined,\n text: undefined,\n color: '',\n size: 'medium',\n offset: undefined,\n title: undefined,\n classNames: undefined,\n styles: undefined\n }\n)\n\nconst slots = useSlots()\nconst hasDefaultSlot = computed(() => !!slots.default)\nconst hasCountSlot = computed(() => !!slots.count)\nconst isStatusMode = computed(() => !!props.status || !hasDefaultSlot.value && props.text !== undefined && props.count === undefined && !props.dot)\nconst isZeroCount = computed(() => props.count === 0 || props.count === '0')\nconst shouldRenderCount = computed(() => {\n if (isStatusMode.value) return false\n if (props.dot) return true\n if (hasCountSlot.value) return true\n if (props.count === undefined || props.count === null || props.count === '') return false\n if (isZeroCount.value && !props.showZero) return false\n return true\n})\nconst displayCount = computed(() => {\n if (typeof props.count === 'number' && Number.isFinite(props.count) && props.count > props.overflowCount) return `${props.overflowCount}+`\n return props.count\n})\nconst indicatorTitle = computed(() => props.title ?? (props.dot ? '' : String(displayCount.value ?? '')))\nconst rootClass = computed(() => clsx(badgeRoot({ statusMode: isStatusMode.value, standalone: !hasDefaultSlot.value }), props.classNames?.root))\nconst indicatorMode = computed(() => (isStatusMode.value ? 'status' : props.dot ? 'dot' : 'count'))\nconst indicatorClass = computed(() =>\n clsx(\n badgeIndicator({\n mode: indicatorMode.value,\n size: props.size,\n anchored: hasDefaultSlot.value && !isStatusMode.value,\n status: isStatusMode.value ? props.status ?? 'default' : 'error'\n }),\n props.classNames?.indicator\n )\n)\nconst textClass = computed(() => clsx(badgeStatusText(), props.classNames?.text))\n\nconst normalizeStyle = (value: CSSProperties | string | undefined) => value\nconst customColorStyle = computed<CSSProperties>(() => (props.color ? { backgroundColor: props.color } : {}))\nconst indicatorStyle = computed<CSSProperties | string | undefined>(() => {\n const base: CSSProperties = {\n ...customColorStyle.value\n }\n if (hasDefaultSlot.value && !isStatusMode.value) {\n const [x = 0, y = 0] = props.offset ?? []\n base.transform = `translate(calc(50% + ${x}px), calc(-50% + ${y}px))`\n }\n if (typeof props.styles?.indicator === 'string') return props.styles.indicator\n return {\n ...base,\n ...props.styles?.indicator\n }\n})\n</script>\n\n<template>\n <span data-ui-badge=\"true\" :class=\"rootClass\" :style=\"normalizeStyle(styles?.root)\">\n <template v-if=\"isStatusMode\">\n <span :class=\"indicatorClass\" :style=\"indicatorStyle\" data-ui-badge-indicator=\"true\" :title=\"title\" aria-hidden=\"true\"></span>\n <span v-if=\"$slots.text || text !== undefined\" :class=\"textClass\" :style=\"normalizeStyle(styles?.text)\" data-ui-badge-text=\"true\">\n <slot name=\"text\">{{ text }}</slot>\n </span>\n </template>\n\n <template v-else>\n <slot></slot>\n <Transition enter-active-class=\"transition duration-200 ease-out\" enter-from-class=\"scale-50 opacity-0\" enter-to-class=\"scale-100 opacity-100\" leave-active-class=\"transition duration-150 ease-in\" leave-from-class=\"scale-100 opacity-100\" leave-to-class=\"scale-50 opacity-0\">\n <sup v-if=\"shouldRenderCount\" :class=\"indicatorClass\" :style=\"indicatorStyle\" data-ui-badge-indicator=\"true\" :title=\"indicatorTitle\">\n <span v-if=\"!dot\">\n <slot name=\"count\">{{ displayCount }}</slot>\n </span>\n </sup>\n </Transition>\n </template>\n </span>\n</template>\n","<script setup lang=\"ts\">\nimport { clsx } from 'clsx'\nimport { computed } from 'vue'\nimport type { CSSProperties } from 'vue'\n\nimport { badgeRibbonFold, badgeRibbonIndicator, badgeRibbonRoot, type BadgeRibbonColor, type BadgeRibbonPlacement, type BadgeRibbonSemanticClassNames, type BadgeRibbonSemanticStyles } from '.'\n\nconst props = withDefaults(\n defineProps<{\n /** text 是缎带中展示的内容;复杂内容可使用 text 插槽。 */\n text?: string | number\n /** color 支持内置颜色名或 CSS 颜色值。 */\n color?: BadgeRibbonColor | string\n /** placement 控制缎带贴在起始侧或结束侧。 */\n placement?: BadgeRibbonPlacement\n /** classNames 定义 root/indicator/content 语义结构类名。 */\n classNames?: BadgeRibbonSemanticClassNames\n /** styles 定义 root/indicator/content 语义结构样式。 */\n styles?: BadgeRibbonSemanticStyles\n }>(),\n {\n text: undefined,\n color: 'brand',\n placement: 'end',\n classNames: undefined,\n styles: undefined\n }\n)\n\nconst namedColors: BadgeRibbonColor[] = ['brand', 'blue', 'red', 'green', 'yellow', 'orange', 'gray']\nconst resolvedColor = computed<BadgeRibbonColor>(() => (namedColors.includes(props.color as BadgeRibbonColor) ? (props.color as BadgeRibbonColor) : 'custom'))\nconst customColorStyle = computed<CSSProperties>(() => (resolvedColor.value === 'custom' && props.color ? { backgroundColor: props.color } : {}))\nconst rootClass = computed(() => clsx(badgeRibbonRoot(), props.classNames?.root))\nconst indicatorClass = computed(() => clsx(badgeRibbonIndicator({ color: resolvedColor.value, placement: props.placement }), props.classNames?.indicator))\nconst foldClass = computed(() => badgeRibbonFold({ placement: props.placement, color: resolvedColor.value }))\nconst normalizeStyle = (value: CSSProperties | string | undefined) => value\nconst darkenHexColor = (color: string, ratio = 0.78) => {\n const hex = color.trim().replace('#', '')\n if (!/^[0-9a-fA-F]{6}$/.test(hex)) return ''\n const channels = [hex.slice(0, 2), hex.slice(2, 4), hex.slice(4, 6)].map((value) => Math.max(0, Math.round(Number.parseInt(value, 16) * ratio)))\n return `#${channels.map((value) => value.toString(16).padStart(2, '0')).join('')}`\n}\nconst indicatorStyle = computed<CSSProperties | string | undefined>(() => {\n if (typeof props.styles?.indicator === 'string') return props.styles.indicator\n return {\n ...customColorStyle.value,\n ...props.styles?.indicator\n }\n})\nconst foldStyle = computed<CSSProperties | string | undefined>(() => {\n if (typeof props.styles?.indicator === 'string') return undefined\n if (resolvedColor.value !== 'custom' || !props.color) return undefined\n const foldColor = darkenHexColor(props.color)\n if (foldColor) return { backgroundColor: foldColor }\n return {\n backgroundColor: props.color,\n filter: 'brightness(0.78)'\n }\n})\n</script>\n\n<template>\n <div data-ui-badge-ribbon=\"true\" :class=\"rootClass\" :style=\"normalizeStyle(styles?.root)\">\n <slot></slot>\n <div :class=\"indicatorClass\" :style=\"indicatorStyle\" data-ui-badge-ribbon-indicator=\"true\">\n <span :class=\"classNames?.content\" :style=\"normalizeStyle(styles?.content)\" data-ui-badge-ribbon-content=\"true\">\n <slot name=\"text\">{{ text }}</slot>\n </span>\n </div>\n <span :class=\"foldClass\" :style=\"foldStyle\" aria-hidden=\"true\"></span>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { clsx } from 'clsx'\nimport { computed } from 'vue'\nimport type { CSSProperties } from 'vue'\n\nimport { badgeRibbonFold, badgeRibbonIndicator, badgeRibbonRoot, type BadgeRibbonColor, type BadgeRibbonPlacement, type BadgeRibbonSemanticClassNames, type BadgeRibbonSemanticStyles } from '.'\n\nconst props = withDefaults(\n defineProps<{\n /** text 是缎带中展示的内容;复杂内容可使用 text 插槽。 */\n text?: string | number\n /** color 支持内置颜色名或 CSS 颜色值。 */\n color?: BadgeRibbonColor | string\n /** placement 控制缎带贴在起始侧或结束侧。 */\n placement?: BadgeRibbonPlacement\n /** classNames 定义 root/indicator/content 语义结构类名。 */\n classNames?: BadgeRibbonSemanticClassNames\n /** styles 定义 root/indicator/content 语义结构样式。 */\n styles?: BadgeRibbonSemanticStyles\n }>(),\n {\n text: undefined,\n color: 'brand',\n placement: 'end',\n classNames: undefined,\n styles: undefined\n }\n)\n\nconst namedColors: BadgeRibbonColor[] = ['brand', 'blue', 'red', 'green', 'yellow', 'orange', 'gray']\nconst resolvedColor = computed<BadgeRibbonColor>(() => (namedColors.includes(props.color as BadgeRibbonColor) ? (props.color as BadgeRibbonColor) : 'custom'))\nconst customColorStyle = computed<CSSProperties>(() => (resolvedColor.value === 'custom' && props.color ? { backgroundColor: props.color } : {}))\nconst rootClass = computed(() => clsx(badgeRibbonRoot(), props.classNames?.root))\nconst indicatorClass = computed(() => clsx(badgeRibbonIndicator({ color: resolvedColor.value, placement: props.placement }), props.classNames?.indicator))\nconst foldClass = computed(() => badgeRibbonFold({ placement: props.placement, color: resolvedColor.value }))\nconst normalizeStyle = (value: CSSProperties | string | undefined) => value\nconst darkenHexColor = (color: string, ratio = 0.78) => {\n const hex = color.trim().replace('#', '')\n if (!/^[0-9a-fA-F]{6}$/.test(hex)) return ''\n const channels = [hex.slice(0, 2), hex.slice(2, 4), hex.slice(4, 6)].map((value) => Math.max(0, Math.round(Number.parseInt(value, 16) * ratio)))\n return `#${channels.map((value) => value.toString(16).padStart(2, '0')).join('')}`\n}\nconst indicatorStyle = computed<CSSProperties | string | undefined>(() => {\n if (typeof props.styles?.indicator === 'string') return props.styles.indicator\n return {\n ...customColorStyle.value,\n ...props.styles?.indicator\n }\n})\nconst foldStyle = computed<CSSProperties | string | undefined>(() => {\n if (typeof props.styles?.indicator === 'string') return undefined\n if (resolvedColor.value !== 'custom' || !props.color) return undefined\n const foldColor = darkenHexColor(props.color)\n if (foldColor) return { backgroundColor: foldColor }\n return {\n backgroundColor: props.color,\n filter: 'brightness(0.78)'\n }\n})\n</script>\n\n<template>\n <div data-ui-badge-ribbon=\"true\" :class=\"rootClass\" :style=\"normalizeStyle(styles?.root)\">\n <slot></slot>\n <div :class=\"indicatorClass\" :style=\"indicatorStyle\" data-ui-badge-ribbon-indicator=\"true\">\n <span :class=\"classNames?.content\" :style=\"normalizeStyle(styles?.content)\" data-ui-badge-ribbon-content=\"true\">\n <slot name=\"text\">{{ text }}</slot>\n </span>\n </div>\n <span :class=\"foldClass\" :style=\"foldStyle\" aria-hidden=\"true\"></span>\n </div>\n</template>\n","import { cva } from 'class-variance-authority'\nimport type { VariantProps } from 'class-variance-authority'\nimport type { CSSProperties } from 'vue'\n\nexport { default as Badge } from './Badge.vue'\nexport { default as BadgeRibbon } from './BadgeRibbon.vue'\n\nexport type BadgeStatus = 'success' | 'processing' | 'default' | 'error' | 'warning'\nexport type BadgeSize = 'medium' | 'small'\nexport type BadgeRibbonPlacement = 'start' | 'end'\nexport type BadgeSemanticName = 'root' | 'indicator' | 'text'\nexport type BadgeRibbonSemanticName = 'root' | 'indicator' | 'content'\nexport type BadgeSemanticClassNames = Partial<Record<BadgeSemanticName, string>>\nexport type BadgeRibbonSemanticClassNames = Partial<Record<BadgeRibbonSemanticName, string>>\nexport type BadgeSemanticStyles = Partial<Record<BadgeSemanticName, CSSProperties | string>>\nexport type BadgeRibbonSemanticStyles = Partial<Record<BadgeRibbonSemanticName, CSSProperties | string>>\n\nconst badgeStatusColors: Record<BadgeStatus, string> = {\n success: 'bg-green-500',\n processing: 'bg-brand-500',\n default: 'bg-zinc-400 dark:bg-zinc-500',\n error: 'bg-red-500',\n warning: 'bg-amber-500'\n}\n\nconst badgeRibbonColors = {\n brand: 'bg-brand-500 text-white',\n blue: 'bg-blue-500 text-white',\n red: 'bg-red-500 text-white',\n green: 'bg-green-500 text-white',\n yellow: 'bg-amber-500 text-white',\n orange: 'bg-orange-500 text-white',\n gray: 'bg-zinc-500 text-white'\n} as const\n\nconst badgeRibbonFoldColors = {\n brand: 'bg-brand-700',\n blue: 'bg-blue-700',\n red: 'bg-red-700',\n green: 'bg-green-700',\n yellow: 'bg-amber-700',\n orange: 'bg-orange-700',\n gray: 'bg-zinc-700'\n} as const\n\n/** badgeRoot 定义 Badge 包裹节点或状态点节点布局。 */\nexport const badgeRoot = cva('relative inline-flex w-fit align-middle', {\n variants: {\n statusMode: {\n true: 'items-center gap-2',\n false: 'items-start'\n },\n standalone: {\n true: 'leading-none',\n false: ''\n }\n },\n defaultVariants: {\n statusMode: false,\n standalone: false\n }\n})\n\n/** badgeIndicator 定义数字徽标和小红点的核心样式。 */\nexport const badgeIndicator = cva('z-1 inline-flex origin-center items-center justify-center whitespace-nowrap rounded-full font-normal shadow-[0_0_0_1px_rgba(255,255,255,0.95)] transition-all duration-200 dark:shadow-[0_0_0_1px_rgba(24,24,27,0.95)]', {\n variants: {\n mode: {\n count: 'bg-red-500 text-white',\n dot: 'bg-red-500 p-0 text-transparent',\n status: 'p-0 text-transparent shadow-none'\n },\n size: {\n medium: '',\n small: ''\n },\n anchored: {\n true: 'absolute right-0 top-0',\n false: 'relative'\n },\n status: {\n success: badgeStatusColors.success,\n processing: badgeStatusColors.processing,\n default: badgeStatusColors.default,\n error: badgeStatusColors.error,\n warning: badgeStatusColors.warning\n }\n },\n compoundVariants: [\n { mode: 'count', size: 'medium', class: 'h-5 min-w-5 px-1.5 text-xs/5' },\n { mode: 'count', size: 'small', class: 'h-3.5 min-w-3.5 px-1 text-[10px]/3.5' },\n { mode: 'dot', size: 'medium', class: 'size-2' },\n { mode: 'dot', size: 'small', class: 'size-1.5' },\n { mode: 'status', class: 'size-1.5' },\n { status: 'processing', mode: 'status', class: 'after:absolute after:inset-0 after:animate-ping after:rounded-full after:bg-brand-500/40 after:content-empty' }\n ],\n defaultVariants: {\n mode: 'count',\n size: 'medium',\n anchored: true,\n status: 'error'\n }\n})\n\n/** badgeStatusText 定义状态点旁文本。 */\nexport const badgeStatusText = cva('text-sm/5 text-secondary')\n\n/** badgeRibbonRoot 定义缎带徽标包裹容器,允许折角伸出内容边界。 */\nexport const badgeRibbonRoot = cva('relative rounded-md')\n\n/** badgeRibbonIndicator 定义缎带徽标位置、颜色和阴影。 */\nexport const badgeRibbonIndicator = cva('absolute top-3 z-1 inline-flex h-8 min-w-12 items-center justify-center px-4 text-sm/8 font-medium shadow-sm', {\n variants: {\n placement: {\n start: 'left-0 -translate-x-3 rounded-md rounded-bl-none',\n end: 'right-0 translate-x-3 rounded-md rounded-br-none'\n },\n color: {\n brand: badgeRibbonColors.brand,\n blue: badgeRibbonColors.blue,\n red: badgeRibbonColors.red,\n green: badgeRibbonColors.green,\n yellow: badgeRibbonColors.yellow,\n orange: badgeRibbonColors.orange,\n gray: badgeRibbonColors.gray,\n custom: 'text-white'\n }\n },\n defaultVariants: {\n placement: 'end',\n color: 'brand'\n }\n})\n\n/** badgeRibbonFold 定义缎带折角阴影。 */\nexport const badgeRibbonFold = cva('absolute top-11 z-0 size-3', {\n variants: {\n placement: {\n start: 'left-0 -translate-x-3 [clip-path:polygon(0_0,100%_0,100%_65%)]',\n end: 'right-0 translate-x-3 [clip-path:polygon(0_0,100%_0,0_65%)]'\n },\n color: {\n brand: badgeRibbonFoldColors.brand,\n blue: badgeRibbonFoldColors.blue,\n red: badgeRibbonFoldColors.red,\n green: badgeRibbonFoldColors.green,\n yellow: badgeRibbonFoldColors.yellow,\n orange: badgeRibbonFoldColors.orange,\n gray: badgeRibbonFoldColors.gray,\n custom: ''\n }\n },\n defaultVariants: {\n placement: 'end',\n color: 'brand'\n }\n})\n\nexport type BadgeIndicatorProps = VariantProps<typeof badgeIndicator>\nexport type BadgeRibbonIndicatorProps = VariantProps<typeof badgeRibbonIndicator>\nexport type BadgeRibbonColor = NonNullable<BadgeRibbonIndicatorProps['color']>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EAOA,IAAM,IAAQ,GA2CR,IAAQ,EAAS,GACjB,IAAiB,QAAe,CAAC,CAAC,EAAM,OAAO,GAC/C,IAAe,QAAe,CAAC,CAAC,EAAM,KAAK,GAC3C,IAAe,QAAe,CAAC,CAAC,EAAM,UAAU,CAAC,EAAe,SAAS,EAAM,SAAS,KAAA,KAAa,EAAM,UAAU,KAAA,KAAa,CAAC,EAAM,GAAG,GAC5I,IAAc,QAAe,EAAM,UAAU,KAAK,EAAM,UAAU,GAAG,GACrE,IAAoB,QACpB,EAAa,QAAc,KAC3B,EAAM,OACN,EAAa,QAAc,KAE/B,EADI,EAAM,UAAU,KAAA,KAAa,EAAM,UAAU,QAAQ,EAAM,UAAU,MACrE,EAAY,SAAS,CAAC,EAAM,SAEjC,GACK,IAAe,QACf,OAAO,EAAM,SAAU,YAAY,OAAO,SAAS,EAAM,KAAK,KAAK,EAAM,QAAQ,EAAM,gBAAsB,GAAG,EAAM,cAAc,KACjI,EAAM,KACd,GACK,IAAiB,QAAe,EAAM,UAAU,EAAM,MAAM,KAAK,OAAO,EAAa,SAAS,EAAE,EAAE,GAClG,IAAY,QAAe,EAAK,EAAU;GAAE,YAAY,EAAa;GAAO,YAAY,CAAC,EAAe;EAAM,CAAC,GAAG,EAAM,YAAY,IAAI,CAAC,GACzI,IAAgB,QAAgB,EAAa,QAAQ,WAAW,EAAM,MAAM,QAAQ,OAAQ,GAC5F,IAAiB,QACrB,EACE,EAAe;GACb,MAAM,EAAc;GACpB,MAAM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