@mcistudio/unoui-vue 1.2.0 → 1.2.1
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/button/index.js +1 -1
- package/dist/chunks/{ImageEditor-DRoD50TJ.js → ImageEditor-Ci2FptiE.js} +2 -2
- package/dist/chunks/{ImageEditor-DRoD50TJ.js.map → ImageEditor-Ci2FptiE.js.map} +1 -1
- package/dist/chunks/{Table-QvmJFoxl.js → Table-M8DquYXh.js} +2 -2
- package/dist/chunks/{Table-QvmJFoxl.js.map → Table-M8DquYXh.js.map} +1 -1
- package/dist/chunks/{button-BBFPr3FH.js → button-BvxNx3_0.js} +9 -9
- package/dist/chunks/button-BvxNx3_0.js.map +1 -0
- package/dist/chunks/{datepicker-XNgIvgTe.js → datepicker-BTr_F7bB.js} +2 -2
- package/dist/chunks/{datepicker-XNgIvgTe.js.map → datepicker-BTr_F7bB.js.map} +1 -1
- package/dist/chunks/{input-hIYHtcTj.js → input-FN9FbBR8.js} +2 -2
- package/dist/chunks/{input-hIYHtcTj.js.map → input-FN9FbBR8.js.map} +1 -1
- package/dist/chunks/{pagination-xntyuczw.js → pagination-DCJuheFj.js} +3 -3
- package/dist/chunks/{pagination-xntyuczw.js.map → pagination-DCJuheFj.js.map} +1 -1
- package/dist/chunks/{popconfirm-DWmeebIf.js → popconfirm-HqDiwLVr.js} +2 -2
- package/dist/chunks/{popconfirm-DWmeebIf.js.map → popconfirm-HqDiwLVr.js.map} +1 -1
- package/dist/chunks/{timepicker-BU9TRvFI.js → timepicker-DgFpKFxJ.js} +2 -2
- package/dist/chunks/{timepicker-BU9TRvFI.js.map → timepicker-DgFpKFxJ.js.map} +1 -1
- package/dist/datepicker/index.js +1 -1
- package/dist/imageeditor/index.js +1 -1
- package/dist/index.js +8 -8
- package/dist/input/index.js +1 -1
- package/dist/pagination/index.js +1 -1
- package/dist/popconfirm/index.js +1 -1
- package/dist/table/index.js +1 -1
- package/dist/timepicker/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/button-BBFPr3FH.js.map +0 -1
package/dist/datepicker/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../chunks/datepicker-
|
|
1
|
+
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../chunks/datepicker-BTr_F7bB.js";
|
|
2
2
|
export { t as DatePicker, o as RangePicker, s as datePickerCell, r as datePickerPanelCell, a as datePickerRangeCell, n as datePickerTimeOption, e as datePickerValue, i as datePickerWrapper };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../chunks/ImageEditor-
|
|
1
|
+
import { t as e } from "../chunks/ImageEditor-Ci2FptiE.js";
|
|
2
2
|
export { e as ImageEditor };
|
package/dist/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./chunks/alert-CczW_DKs.js";
|
|
2
2
|
import { a as c, c as l, i as u, n as d, o as f, r as p, s as m, t as h } from "./chunks/badge-BHOZeImh.js";
|
|
3
|
-
import { n as g, r as _, t as v } from "./chunks/button-
|
|
3
|
+
import { n as g, r as _, t as v } from "./chunks/button-BvxNx3_0.js";
|
|
4
4
|
import { a as y, i as b, n as x, r as S, t as C } from "./chunks/checkbox-wJpQHCeN.js";
|
|
5
5
|
import { n as w, r as T, t as E } from "./chunks/colorpicker-B-kSQ2Gh.js";
|
|
6
6
|
import { DEFAULT_RTL_LANGUAGES as D, DEFAULT_UNOUI_LANGUAGES as O, DEFAULT_UNOUI_LOCALE as k, configureUnoUI as A, getUnoUILanguageOption as j, normalizeUnoUILanguages as M, normalizeUnoUILocaleKey as N, useUnoUIConfig as P } from "./config.js";
|
|
7
7
|
import { t as F } from "./chunks/dropdown-B4XuqfaI.js";
|
|
8
|
-
import { a as I, c as L, i as R, n as z, o as B, r as V, s as H, t as U } from "./chunks/datepicker-
|
|
8
|
+
import { a as I, c as L, i as R, n as z, o as B, r as V, s as H, t as U } from "./chunks/datepicker-BTr_F7bB.js";
|
|
9
9
|
import { n as W, r as G, t as K } from "./chunks/drawer-C3JZ28Xo.js";
|
|
10
10
|
import { a as q, c as J, d as Y, f as X, g as Z, h as Q, i as $, l as ee, m as te, n as ne, o as re, p as ie, r as ae, s as oe, t as se, u as ce } from "./chunks/form-CVJ4YMWA.js";
|
|
11
11
|
import { n as le, r as ue, t as de } from "./chunks/tooltip-DMhiAqto.js";
|
|
12
|
-
import { a as fe, c as pe, i as me, l as he, n as ge, o as _e, r as ve, s as ye, t as be } from "./chunks/input-
|
|
12
|
+
import { a as fe, c as pe, i as me, l as he, n as ge, o as _e, r as ve, s as ye, t as be } from "./chunks/input-FN9FbBR8.js";
|
|
13
13
|
import { t as xe } from "./chunks/modal-D6l1iIvE.js";
|
|
14
14
|
import { n as Se, t as Ce } from "./chunks/tag-BYmNsrZC.js";
|
|
15
15
|
import { i as we, n as Te, r as Ee, t as De } from "./chunks/inputOtp-Dyxj9lNj.js";
|
|
16
|
-
import { t as Oe } from "./chunks/ImageEditor-
|
|
16
|
+
import { t as Oe } from "./chunks/ImageEditor-Ci2FptiE.js";
|
|
17
17
|
import { n as ke, r as Ae, t as je } from "./chunks/message-xPfuG0EX.js";
|
|
18
18
|
import { a as Me, c as Ne, i as Pe, n as Fe, o as Ie, r as Le, s as Re, t as ze } from "./chunks/millercolumns-Dp3fBrq6.js";
|
|
19
19
|
import { i as Be, n as Ve, r as He, t as Ue } from "./chunks/select-eZ9h_f58.js";
|
|
20
|
-
import { n as We, t as Ge } from "./chunks/pagination-
|
|
21
|
-
import { a as Ke, c as qe, i as Je, n as Ye, o as Xe, r as Ze, s as Qe, t as $e } from "./chunks/popconfirm-
|
|
20
|
+
import { n as We, t as Ge } from "./chunks/pagination-DCJuheFj.js";
|
|
21
|
+
import { a as Ke, c as qe, i as Je, n as Ye, o as Xe, r as Ze, s as Qe, t as $e } from "./chunks/popconfirm-HqDiwLVr.js";
|
|
22
22
|
import { t as et } from "./chunks/Progress-BL4KZ3HE.js";
|
|
23
23
|
import { a as tt, i as nt, n as rt, o as it, r as at, s as ot, t as st } from "./chunks/qrcode-B0t_pZna.js";
|
|
24
24
|
import { a as ct, c as lt, i as ut, n as dt, o as ft, r as pt, s as mt, t as ht } from "./chunks/radio-DGt8o-UL.js";
|
|
@@ -28,6 +28,6 @@ import { a as Ct, i as wt, n as Tt, o as Et, r as Dt, s as Ot, t as kt } from ".
|
|
|
28
28
|
import { a as At, i as jt, n as Mt, o as Nt, r as Pt, s as Ft, t as It } from "./chunks/splitter-CgfiXY65.js";
|
|
29
29
|
import { a as Lt, i as Rt, n as zt, o as Bt, r as Vt, t as Ht } from "./chunks/switch-C6a6ga2G.js";
|
|
30
30
|
import { a as Ut, c as Wt, i as Gt, l as Kt, n as qt, o as Jt, r as Yt, s as Xt, t as Zt, u as Qt } from "./chunks/tab-Dxfg1_To.js";
|
|
31
|
-
import { t as $t } from "./chunks/Table-
|
|
32
|
-
import { a as en, i as tn, n as nn, r as rn, t as an } from "./chunks/timepicker-
|
|
31
|
+
import { t as $t } from "./chunks/Table-M8DquYXh.js";
|
|
32
|
+
import { a as en, i as tn, n as nn, r as rn, t as an } from "./chunks/timepicker-DgFpKFxJ.js";
|
|
33
33
|
export { t as Alert, pe as Autocomplete, l as Badge, m as BadgeRibbon, _ as Button, g as ButtonGroup, y as Checkbox, b as CheckboxGroup, T as ColorPicker, D as DEFAULT_RTL_LANGUAGES, O as DEFAULT_UNOUI_LANGUAGES, k as DEFAULT_UNOUI_LOCALE, L as DatePicker, G as Drawer, F as Dropdown, Z as Form, Q as FormItem, Oe as ImageEditor, he as Input, ye as InputI18n, we as InputOtp, _e as InputTag, je as Message, Ae as MessageContainer, Ne as MillerColumns, xe as Modal, We as Pagination, qe as Popconfirm, et as Progress, ot as QRCode, lt as Radio, mt as RadioGroup, H as RangePicker, yt as Rate, Be as Select, St as Skeleton, Ot as Slider, Nt as Splitter, Ft as SplitterPanel, Bt as Switch, Qt as TabPane, $t as Table, Kt as Tabs, Se as Tag, en as TimePicker, tn as TimeRangePicker, ue as Tooltip, s as alertActions, r as alertCloseButton, a as alertDescription, n as alertIcon, e as alertRoot, i as alertSection, o as alertTitle, h as badgeIndicator, d as badgeRibbonFold, p as badgeRibbonIndicator, u as badgeRibbonRoot, c as badgeRoot, f as badgeStatusText, v as button, C as checkbox, x as checkboxGroup, S as checkboxGroupContextKey, E as colorPickerSwatch, w as colorPickerTrigger, A as configureUnoUI, se as createFormRule, U as datePickerCell, z as datePickerPanelCell, V as datePickerRangeCell, R as datePickerTimeOption, I as datePickerValue, B as datePickerWrapper, ne as defaultFormValidateMessages, K as drawerContextKey, W as drawerPanel, ae as formContextKey, $ as formItem, q as formItemContent, re as formItemLabel, oe as formItemMessage, J as formRoot, ee as formValidatorPatterns, j as getUnoUILanguageOption, ce as getValueByPath, be as inputAddon, ge as inputControl, ve as inputGroup, De as inputOtpCell, Te as inputOtpGroup, Ee as inputOtpRoot, me as inputSizer, fe as inputWrapper, ke as message, ze as millerColumnsColumn, Fe as millerColumnsEmpty, Le as millerColumnsHeader, Pe as millerColumnsInfoPanel, Me as millerColumnsRoot, Ie as millerColumnsRow, Re as millerColumnsRows, Y as normalizeFormProp, X as normalizeRules, M as normalizeUnoUILanguages, N as normalizeUnoUILocaleKey, Ge as paginationPagerButton, $e as popconfirmActions, Ye as popconfirmArrow, Ze as popconfirmContainer, Je as popconfirmContent, Ke as popconfirmIcon, Xe as popconfirmRoot, Qe as popconfirmTitle, st as qrcodeCode, rt as qrcodeMask, at as qrcodeRefreshButton, nt as qrcodeRoot, tt as qrcodeStatus, it as qrcodeStatusIcon, ht as radio, dt as radioButton, pt as radioDot, ut as radioGroup, ct as radioGroupContextKey, ft as radioLabel, xt as rateActiveLayer, vt as rateCharacter, bt as rateCharacterLayer, _t as rateItem, gt as rateRoot, Ue as selectInner, Ve as selectOption, He as selectWrapper, ie as setValueByPath, kt as sliderDot, Tt as sliderHandle, Dt as sliderMarkLabel, wt as sliderRail, Ct as sliderRoot, Et as sliderTrack, It as splitterBar, Mt as splitterDragger, Pt as splitterLine, jt as splitterPanel, At as splitterRoot, Ht as switchAction, zt as switchLabel, Vt as switchPrompt, Rt as switchTrack, Lt as switchWrapper, Zt as tabAddButton, qt as tabPanel, Yt as tabTrigger, Gt as tabsContent, Ut as tabsContextKey, Jt as tabsHeader, Xt as tabsNav, Wt as tabsRoot, Ce as tag, an as timePickerOption, nn as timePickerValue, rn as timePickerWrapper, de as tooltipArrow, le as tooltipRoot, P as useUnoUIConfig, te as validateFormValue };
|
package/dist/input/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "../chunks/input-
|
|
1
|
+
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "../chunks/input-FN9FbBR8.js";
|
|
2
2
|
export { t as Autocomplete, r as Input, s as InputI18n, a as InputTag, c as inputAddon, i as inputControl, o as inputGroup, n as inputSizer, e as inputWrapper };
|
package/dist/pagination/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "../chunks/pagination-
|
|
1
|
+
import { n as e, t } from "../chunks/pagination-DCJuheFj.js";
|
|
2
2
|
export { e as Pagination, t as paginationPagerButton };
|
package/dist/popconfirm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../chunks/popconfirm-
|
|
1
|
+
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../chunks/popconfirm-HqDiwLVr.js";
|
|
2
2
|
export { t as Popconfirm, s as popconfirmActions, r as popconfirmArrow, a as popconfirmContainer, n as popconfirmContent, e as popconfirmIcon, i as popconfirmRoot, o as popconfirmTitle };
|
package/dist/table/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../chunks/Table-
|
|
1
|
+
import { t as e } from "../chunks/Table-M8DquYXh.js";
|
|
2
2
|
export { e as Table };
|
package/dist/timepicker/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, r, t as i } from "../chunks/timepicker-
|
|
1
|
+
import { a as e, i as t, n, r, t as i } from "../chunks/timepicker-DgFpKFxJ.js";
|
|
2
2
|
export { e as TimePicker, t as TimeRangePicker, i as timePickerOption, n as timePickerValue, r as timePickerWrapper };
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button-BBFPr3FH.js","names":[],"sources":["../../src/button/Button.vue","../../src/button/Button.vue","../../src/button/ButtonGroup.vue","../../src/button/index.ts"],"sourcesContent":["<template>\n <button data-ui-button=\"true\" :data-color=\"color\" :data-variant=\"variant\" :type=\"type\" :class=\"button({ color, variant, size, radius, disabled })\" :disabled=\"disabled\">\n <span v-if=\"loading\" class=\"i-lucide:loader-2 animate-spin\" :style=\"`font-size: ${iconSize}px`\"></span>\n <span v-else-if=\"icon\" :class=\"icon\" :style=\"`font-size: ${iconSize}px`\"></span>\n <slot></slot>\n </button>\n</template>\n\n<script setup lang=\"ts\">\nimport { button, type ButtonProps } from '.'\n\n/**\n * Button 是管理端轻量按钮组件,统一颜色、尺寸、圆角、图标和加载态样式。\n */\nwithDefaults(\n defineProps<{\n /** color 是按钮色彩语义,可选,默认 brand。 */\n color?: ButtonProps['color']\n /** variant 是按钮视觉变体,可选,默认 default。 */\n variant?: ButtonProps['variant']\n /** icon 是 UnoCSS/Iconify 图标类名,可选。 */\n icon?: string\n /** iconSize 是图标字号像素值字符串,可选,默认 14。 */\n iconSize?: string\n /** size 是按钮尺寸,可选,默认 md。 */\n size?: ButtonProps['size']\n /** radius 是按钮圆角尺寸,可选,默认 md。 */\n radius?: ButtonProps['radius']\n /** loading 表示是否展示加载图标,可选,默认 false。 */\n loading?: boolean\n /** disabled 表示是否禁用点击和指针事件,可选,默认 false。 */\n disabled?: boolean\n /** type 是原生 button 类型,可选,默认 button,避免表单内误触发提交。 */\n type?: 'button' | 'submit' | 'reset'\n }>(),\n {\n color: 'brand',\n variant: 'default',\n iconSize: '14',\n size: 'md',\n radius: 'md',\n loading: false,\n disabled: false,\n type: 'button'\n }\n)\n</script>\n","<template>\n <button data-ui-button=\"true\" :data-color=\"color\" :data-variant=\"variant\" :type=\"type\" :class=\"button({ color, variant, size, radius, disabled })\" :disabled=\"disabled\">\n <span v-if=\"loading\" class=\"i-lucide:loader-2 animate-spin\" :style=\"`font-size: ${iconSize}px`\"></span>\n <span v-else-if=\"icon\" :class=\"icon\" :style=\"`font-size: ${iconSize}px`\"></span>\n <slot></slot>\n </button>\n</template>\n\n<script setup lang=\"ts\">\nimport { button, type ButtonProps } from '.'\n\n/**\n * Button 是管理端轻量按钮组件,统一颜色、尺寸、圆角、图标和加载态样式。\n */\nwithDefaults(\n defineProps<{\n /** color 是按钮色彩语义,可选,默认 brand。 */\n color?: ButtonProps['color']\n /** variant 是按钮视觉变体,可选,默认 default。 */\n variant?: ButtonProps['variant']\n /** icon 是 UnoCSS/Iconify 图标类名,可选。 */\n icon?: string\n /** iconSize 是图标字号像素值字符串,可选,默认 14。 */\n iconSize?: string\n /** size 是按钮尺寸,可选,默认 md。 */\n size?: ButtonProps['size']\n /** radius 是按钮圆角尺寸,可选,默认 md。 */\n radius?: ButtonProps['radius']\n /** loading 表示是否展示加载图标,可选,默认 false。 */\n loading?: boolean\n /** disabled 表示是否禁用点击和指针事件,可选,默认 false。 */\n disabled?: boolean\n /** type 是原生 button 类型,可选,默认 button,避免表单内误触发提交。 */\n type?: 'button' | 'submit' | 'reset'\n }>(),\n {\n color: 'brand',\n variant: 'default',\n iconSize: '14',\n size: 'md',\n radius: 'md',\n loading: false,\n disabled: false,\n type: 'button'\n }\n)\n</script>\n","<template>\n <div class=\"inline-flex items-center isolate\">\n <slot />\n </div>\n</template>\n\n<style scoped>\n:deep(button),\n:deep(.button) {\n border-radius: 0 !important;\n}\n\n/* 按钮组内部取消中间圆角,仅首尾按钮保留外侧圆角。 */\n:deep(> *:first-child),\n:deep(> *:first-child button) {\n border-top-left-radius: 0.375rem !important;\n border-bottom-left-radius: 0.375rem !important;\n}\n\n:deep(> *:last-child),\n:deep(> *:last-child button) {\n border-top-right-radius: 0.375rem !important;\n border-bottom-right-radius: 0.375rem !important;\n}\n\n/* 相邻按钮边框重叠,避免按钮组中间出现双边框。 */\n:deep(> *:not(:first-child)) {\n margin-left: -1px;\n}\n\n/* 按钮组内的 default 表示已选中,hover 时保持选中态本色。 */\n:deep([data-ui-button='true'][data-variant='default'][data-color='brand']:hover) {\n --at-apply: '!border-brand-500 !bg-brand-500';\n}\n\n:deep([data-ui-button='true'][data-variant='default'][data-color='red']:hover) {\n --at-apply: '!border-red-500 !bg-red-500';\n}\n\n:deep([data-ui-button='true'][data-variant='default'][data-color='gray']:hover) {\n --at-apply: '!border-gray-500 !bg-gray-500';\n}\n\n:deep([data-ui-button='true'][data-variant='default'][data-color='green']:hover) {\n --at-apply: '!border-green-500 !bg-green-500';\n}\n\n:deep([data-ui-button='true'][data-variant='default'][data-color='yellow']:hover) {\n --at-apply: '!border-amber-500 !bg-amber-500';\n}\n\n:deep([data-ui-button='true'][data-variant='default'][data-color='orange']:hover) {\n --at-apply: '!border-orange-500 !bg-orange-500';\n}\n</style>\n","import { cva } from 'class-variance-authority'\nimport type { VariantProps } from 'class-variance-authority'\n\nimport { controlSizeClasses } from '../control'\n\nexport { default as Button } from './Button.vue'\nexport { default as ButtonGroup } from './ButtonGroup.vue'\n\nconst buttonColorOptions = ['brand', 'red', 'gray', 'green', 'yellow', 'orange'] as const\nconst buttonVariantOptions = ['default', 'outline', 'dashed', 'link', 'mono'] as const\ntype ButtonColor = (typeof buttonColorOptions)[number]\ntype ButtonVariant = (typeof buttonVariantOptions)[number]\ntype ButtonColorStyleKey = 'solid' | 'outline' | 'mono' | 'dashed' | 'link'\n\nconst emptyVariantRecord = <T extends readonly string[]>(options: T) => Object.fromEntries(options.map((option) => [option, ''])) as Record<T[number], ''>\n\nconst buttonActiveClasses: Record<ButtonColor, string> = {\n brand: 'active:after:shadow-[0_0_0_0_brand-500]',\n red: 'active:after:shadow-[0_0_0_0_red-500]',\n gray: 'active:after:shadow-[0_0_0_0_gray-500]',\n green: 'active:after:shadow-[0_0_0_0_green-500]',\n yellow: 'active:after:shadow-[0_0_0_0_yellow-500]',\n orange: 'active:after:shadow-[0_0_0_0_orange-500]'\n}\nconst buttonRippleClasses = 'after:content-empty after:absolute after:inset-0 after:opacity-80 after:transition-all after:duration-800 after:shadow-[0_0_0_7px_transparent] after:ease-out active:after:opacity-0 active:after:duration-0'\n\n// 颜色态保留完整 UnoCSS 类字面量,确保构建扫描可以生成对应样式。\nconst buttonColorClasses: Record<ButtonColor, Record<ButtonColorStyleKey, string>> = {\n brand: {\n solid: 'border-brand-500 bg-brand-500 text-brand-50 hover:border-brand-400 hover:bg-brand-400',\n outline: 'border-brand-500 text-brand-500 hover:border-brand-400 hover:bg-brand-400/15 hover:text-brand-400',\n mono: 'hover:border-brand-400 hover:bg-brand-400/15 hover:text-brand-400',\n dashed: 'border-brand-500 text-brand-500 hover:border-brand-400 hover:bg-brand-400/15 hover:text-brand-400',\n link: 'text-brand-500 hover:text-brand-600'\n },\n red: {\n solid: 'border-red-500 bg-red-500 text-red-50 hover:border-red-400 hover:bg-red-400',\n outline: 'border-red-500 text-red-500 hover:border-red-400 hover:bg-red-400/15 hover:text-red-400',\n mono: 'hover:border-red-400 hover:bg-red-400/15 hover:text-red-400',\n dashed: 'border-red-500 text-red-500 hover:border-red-400 hover:bg-red-400/15 hover:text-red-400',\n link: 'text-red-500 hover:text-red-600'\n },\n gray: {\n solid: 'border-gray-500 bg-gray-500 text-gray-50 hover:border-gray-400 hover:bg-gray-400',\n outline: 'border-gray-400 text-gray-500 hover:border-gray-400 hover:bg-gray-400/15 hover:text-gray-400',\n mono: 'hover:border-gray-400 hover:bg-gray-400/15 hover:text-gray-400',\n dashed: 'border-gray-400 text-gray-500 hover:border-gray-400 hover:bg-gray-400/15 hover:text-gray-400',\n link: 'text-gray-500 hover:text-gray-600'\n },\n green: {\n solid: 'border-green-500 bg-green-500 text-green-50 hover:border-green-400 hover:bg-green-400',\n outline: 'border-green-500 text-green-500 hover:border-green-400 hover:bg-green-400/15 hover:text-green-400',\n mono: 'hover:border-green-400 hover:bg-green-400/15 hover:text-green-400',\n dashed: 'border-green-500 text-green-500 hover:border-green-400 hover:bg-green-400/15 hover:text-green-400',\n link: 'text-green-500 hover:text-green-600'\n },\n yellow: {\n solid: 'border-amber-500 bg-amber-500 text-amber-50 hover:border-amber-400 hover:bg-amber-400',\n outline: 'border-amber-500 text-amber-500 hover:border-amber-400 hover:bg-amber-400/15 hover:text-amber-400',\n mono: 'hover:border-amber-400 hover:bg-amber-400/15 hover:text-amber-400',\n dashed: 'border-amber-500 text-amber-500 hover:border-amber-400 hover:bg-amber-400/15 hover:text-amber-400',\n link: 'text-amber-500 hover:text-amber-600'\n },\n orange: {\n solid: 'border-orange-500 bg-orange-500 text-orange-50 hover:border-orange-400 hover:bg-orange-400',\n outline: 'border-orange-500 text-orange-500 hover:border-orange-400 hover:bg-orange-400/15 hover:text-orange-400',\n mono: 'hover:border-orange-400 hover:bg-orange-400/15 hover:text-orange-400',\n dashed: 'border-orange-500 text-orange-500 hover:border-orange-400 hover:bg-orange-400/15 hover:text-orange-400',\n link: 'text-orange-500 hover:text-orange-600'\n }\n} as const\n\nconst buttonVariantColorStyleKeys: Record<ButtonVariant, ButtonColorStyleKey> = {\n default: 'solid',\n outline: 'outline',\n dashed: 'dashed',\n link: 'link',\n mono: 'mono'\n}\n\nconst buttonCompoundVariants = buttonColorOptions.flatMap((color) =>\n buttonVariantOptions.map((variant) => ({\n color,\n variant,\n class: `${buttonColorClasses[color][buttonVariantColorStyleKeys[variant]]} ${variant === 'link' ? '' : `${buttonRippleClasses} ${buttonActiveClasses[color]}`}`\n }))\n)\n\n/** button 定义管理端 Button 组件的样式变体组合。 */\nexport const button = cva('relative flex shrink-0 items-center justify-center whitespace-nowrap font-normal transition-all duration-150', {\n variants: {\n color: emptyVariantRecord(buttonColorOptions),\n variant: {\n default: 'border',\n outline: 'border bg-transparent',\n dashed: 'border border-dashed bg-transparent',\n link: 'bg-transparent hover:bg-transparent hover:underline underline-offset-4 underline-dashed px-2!',\n mono: 'border border-control bg-primary text-zinc-500 dark:text-zinc-400'\n },\n size: {\n sm: `[&_svg]:size-4 px-4 gap-1 ${controlSizeClasses.sm}`,\n md: `[&_svg]:size-5 px-6 gap-1.5 ${controlSizeClasses.md}`,\n lg: `[&_svg]:size-6 px-8 gap-2 ${controlSizeClasses.lg}`,\n icon: '[&_svg]:size-4 px-1.5 py-1.5',\n 'icon-md': '[&_svg]:size-5 px-2 py-2',\n 'icon-lg': '[&_svg]:size-6 px-2.5 py-2.5'\n },\n radius: {\n none: 'rounded-none after:rounded-none',\n sm: 'rounded-sm after:rounded-sm',\n md: 'rounded-md after:rounded-md',\n lg: 'rounded-lg after:rounded-lg',\n full: 'rounded-full after:rounded-full'\n },\n disabled: {\n true: 'opacity-50 cursor-not-allowed pointer-events-none'\n }\n },\n compoundVariants: buttonCompoundVariants,\n defaultVariants: {\n color: 'brand',\n variant: 'default',\n size: 'sm',\n radius: 'md'\n }\n})\n\n/** ButtonProps 是 button 变体推导出的组件属性类型。 */\nexport type ButtonProps = VariantProps<typeof button>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBACE,EAIS,UAAA;GAJD,kBAAe;GAAQ,cAAY,EAAA;GAAQ,gBAAc,EAAA;GAAU,MAAM,EAAA;GAAO,OAAK,EAAE,EAAA,CAAA,CAAM,CAAA;IAAA,OAAG,EAAA;IAAK,SAAE,EAAA;IAAO,MAAE,EAAA;IAAI,QAAE,EAAA;IAAM,UAAE,EAAA;GAAQ,CAAA,CAAA;GAAM,UAAU,EAAA;MAChJ,E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