@turinhub/atomix-common-ui 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -102,6 +102,8 @@ import { dataTableUI } from '@/lib/ui-adapter';
102
102
  - **DeleteConfirmDialog** - 删除确认对话框
103
103
  - **TableHeader** - 表格头部(支持搜索和操作按钮)
104
104
  - **TablePagination** - 分页组件
105
+ - **ThemeSwitcher** - 主题切换组件(完整版,支持下拉菜单)
106
+ - **ThemeSwitcherContent** - 主题切换内容组件(轻量版,可嵌入)
105
107
 
106
108
  ## 📁 项目结构
107
109
 
@@ -163,6 +165,11 @@ import type {
163
165
  HeaderUIComponents,
164
166
  TablePaginationProps,
165
167
  PaginationUIComponents,
168
+ ThemeSwitcherProps,
169
+ ThemeSwitcherUIComponents,
170
+ ThemeSwitcherContentProps,
171
+ ThemeSwitcherContentUIComponents,
172
+ ThemeOption,
166
173
  } from '@turinhub/atomix-common-ui';
167
174
  ```
168
175
 
@@ -0,0 +1,40 @@
1
+ import { ButtonComponent, DropdownMenuComponent, DropdownMenuTriggerComponent, DropdownMenuContentComponent, DropdownMenuRadioGroupComponent, DropdownMenuRadioItemComponent } from '../types/component-types';
2
+ /**
3
+ * 主题选项
4
+ */
5
+ export interface ThemeOption {
6
+ value: string;
7
+ label: string;
8
+ icon: React.ReactNode;
9
+ }
10
+ /**
11
+ * UI 组件适配器接口
12
+ */
13
+ export interface ThemeSwitcherUIComponents {
14
+ DropdownMenu: DropdownMenuComponent;
15
+ DropdownMenuTrigger: DropdownMenuTriggerComponent;
16
+ DropdownMenuContent: DropdownMenuContentComponent;
17
+ DropdownMenuRadioGroup: DropdownMenuRadioGroupComponent;
18
+ DropdownMenuRadioItem: DropdownMenuRadioItemComponent;
19
+ Button: ButtonComponent;
20
+ }
21
+ export interface ThemeSwitcherProps {
22
+ value: string;
23
+ onValueChange: (value: string) => void;
24
+ themes?: ThemeOption[];
25
+ triggerVariant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link';
26
+ triggerSize?: 'default' | 'sm' | 'lg' | 'icon';
27
+ triggerClassName?: string;
28
+ iconSize?: number;
29
+ showCurrentIcon?: boolean;
30
+ enableSSRHandling?: boolean;
31
+ triggerContent?: React.ReactNode;
32
+ components?: ThemeSwitcherUIComponents;
33
+ themeIcons?: Partial<Record<string, React.ReactNode>>;
34
+ }
35
+ /**
36
+ * 主题切换组件
37
+ * 需要通过 components prop 注入 UI 组件
38
+ */
39
+ export declare function ThemeSwitcher({ value, onValueChange, themes, triggerVariant, triggerSize, triggerClassName, iconSize, showCurrentIcon, enableSSRHandling, triggerContent, components, themeIcons, }: ThemeSwitcherProps): import("react/jsx-runtime").JSX.Element | null;
40
+ //# sourceMappingURL=ThemeSwitcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeSwitcher.d.ts","sourceRoot":"","sources":["../../src/components/ThemeSwitcher.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACrB,4BAA4B,EAC5B,4BAA4B,EAC5B,+BAA+B,EAC/B,8BAA8B,EAC/B,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,YAAY,EAAE,qBAAqB,CAAC;IACpC,mBAAmB,EAAE,4BAA4B,CAAC;IAClD,mBAAmB,EAAE,4BAA4B,CAAC;IAClD,sBAAsB,EAAE,+BAA+B,CAAC;IACxD,qBAAqB,EAAE,8BAA8B,CAAC;IACtD,MAAM,EAAE,eAAe,CAAC;CACzB;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;IACvB,cAAc,CAAC,EACX,SAAS,GACT,aAAa,GACb,SAAS,GACT,WAAW,GACX,OAAO,GACP,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;IAC/C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,UAAU,CAAC,EAAE,yBAAyB,CAAC;IAEvC,UAAU,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;CACvD;AAsED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,aAAa,EACb,MAAsB,EACtB,cAAwB,EACxB,WAAoB,EACpB,gBAAgB,EAChB,QAAa,EACb,eAAsB,EACtB,iBAAwB,EACxB,cAAc,EACd,UAAU,EACV,UAAU,GACX,EAAE,kBAAkB,kDA6EpB"}
@@ -0,0 +1,30 @@
1
+ import { DropdownMenuRadioGroupComponent, DropdownMenuRadioItemComponent } from '../types/component-types';
2
+ /**
3
+ * 主题选项
4
+ */
5
+ export interface ThemeOption {
6
+ value: string;
7
+ label: string;
8
+ icon: React.ReactNode;
9
+ }
10
+ export interface ThemeSwitcherContentProps {
11
+ value: string;
12
+ onValueChange: (value: string) => void;
13
+ themes?: ThemeOption[];
14
+ iconSize?: number;
15
+ components?: Pick<ThemeSwitcherContentUIComponents, 'DropdownMenuRadioGroup' | 'DropdownMenuRadioItem'>;
16
+ themeIcons?: Partial<Record<string, React.ReactNode>>;
17
+ }
18
+ /**
19
+ * UI 组件适配器接口(轻量版)
20
+ */
21
+ export interface ThemeSwitcherContentUIComponents {
22
+ DropdownMenuRadioGroup: DropdownMenuRadioGroupComponent;
23
+ DropdownMenuRadioItem: DropdownMenuRadioItemComponent;
24
+ }
25
+ /**
26
+ * 主题切换内容组件(轻量版)
27
+ * 可嵌入到其他 DropdownMenu 中使用
28
+ */
29
+ export declare function ThemeSwitcherContent({ value, onValueChange, themes, iconSize, components, themeIcons, }: ThemeSwitcherContentProps): import("react/jsx-runtime").JSX.Element;
30
+ //# sourceMappingURL=ThemeSwitcherContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeSwitcherContent.d.ts","sourceRoot":"","sources":["../../src/components/ThemeSwitcherContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,+BAA+B,EAC/B,8BAA8B,EAC/B,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;CACvB;AAED,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,IAAI,CACf,gCAAgC,EAChC,wBAAwB,GAAG,uBAAuB,CACnD,CAAC;IAEF,UAAU,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;CACvD;AAED;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C,sBAAsB,EAAE,+BAA+B,CAAC;IACxD,qBAAqB,EAAE,8BAA8B,CAAC;CACvD;AAsED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EACL,aAAa,EACb,MAAsB,EACtB,QAAa,EACb,UAAU,EACV,UAAU,GACX,EAAE,yBAAyB,2CAqC3B"}
package/dist/index.c.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const oe=require("clsx"),ie=require("tailwind-merge"),re=require("react"),L=require("lucide-react");function ue(...a){return ie.twMerge(oe.clsx(a))}var Q={exports:{}},B={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ce=require("clsx"),ie=require("tailwind-merge"),q=require("react"),H=require("lucide-react");function ue(...n){return ie.twMerge(ce.clsx(n))}var ee={exports:{}},U={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var se;function de(){if(se)return B;se=1;var a=Symbol.for("react.transitional.element"),h=Symbol.for("react.fragment");function d(j,o,f){var x=null;if(f!==void 0&&(x=""+f),o.key!==void 0&&(x=""+o.key),"key"in o){f={};for(var c in o)c!=="key"&&(f[c]=o[c])}else f=o;return o=f.ref,{$$typeof:a,type:j,key:x,ref:o!==void 0?o:null,props:f}}return B.Fragment=h,B.jsx=d,B.jsxs=d,B}var q={};/**
9
+ */var se;function de(){if(se)return U;se=1;var n=Symbol.for("react.transitional.element"),m=Symbol.for("react.fragment");function c(x,a,i){var d=null;if(i!==void 0&&(d=""+i),a.key!==void 0&&(d=""+a.key),"key"in a){i={};for(var o in a)o!=="key"&&(i[o]=a[o])}else i=a;return a=i.ref,{$$typeof:n,type:x,key:d,ref:a!==void 0?a:null,props:i}}return U.Fragment=m,U.jsx=c,U.jsxs=c,U}var V={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,10 +14,10 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var le;function fe(){return le||(le=1,process.env.NODE_ENV!=="production"&&(function(){function a(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ee?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case D:return"Profiler";case y:return"StrictMode";case E:return"Suspense";case g:return"SuspenseList";case K:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case O:return"Portal";case R:return e.displayName||"Context";case S:return(e._context.displayName||"Context")+".Consumer";case C:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case V:return t=e.displayName||null,t!==null?t:a(e.type)||"Memo";case I:t=e._payload,e=e._init;try{return a(e(t))}catch{}}return null}function h(e){return""+e}function d(e){try{h(e);var t=!1}catch{t=!0}if(t){t=console;var n=t.error,i=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n.call(t,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",i),h(e)}}function j(e){if(e===w)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===I)return"<...>";try{var t=a(e);return t?"<"+t+">":"<...>"}catch{return"<...>"}}function o(){var e=z.A;return e===null?null:e.getOwner()}function f(){return Error("react-stack-top-frame")}function x(e){if(W.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function c(e,t){function n(){J||(J=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}function _(){var e=a(this.type);return G[e]||(G[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function m(e,t,n,i,$,M){var u=n.ref;return e={$$typeof:T,type:e,key:t,props:n,_owner:i},(u!==void 0?u:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:_}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:$}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:M}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function s(e,t,n,i,$,M){var u=t.children;if(u!==void 0)if(i)if(H(u)){for(i=0;i<u.length;i++)k(u[i]);Object.freeze&&Object.freeze(u)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else k(u);if(W.call(t,"key")){u=a(e);var P=Object.keys(t).filter(function(p){return p!=="key"});i=0<P.length?"{key: someKey, "+P.join(": ..., ")+": ...}":"{key: someKey}",X[u+i]||(P=0<P.length?"{"+P.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var ne;function fe(){return ne||(ne=1,process.env.NODE_ENV!=="production"&&(function(){function n(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===re?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case S:return"Fragment";case O:return"Profiler";case R:return"StrictMode";case E:return"Suspense";case g:return"SuspenseList";case L:return"Activity"}if(typeof r=="object")switch(typeof r.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),r.$$typeof){case M:return"Portal";case y:return r.displayName||"Context";case C:return(r._context.displayName||"Context")+".Consumer";case A:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case _:return s=r.displayName||null,s!==null?s:n(r.type)||"Memo";case P:s=r._payload,r=r._init;try{return n(r(s))}catch{}}return null}function m(r){return""+r}function c(r){try{m(r);var s=!1}catch{s=!0}if(s){s=console;var u=s.error,h=typeof Symbol=="function"&&Symbol.toStringTag&&r[Symbol.toStringTag]||r.constructor.name||"Object";return u.call(s,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",h),m(r)}}function x(r){if(r===S)return"<>";if(typeof r=="object"&&r!==null&&r.$$typeof===P)return"<...>";try{var s=n(r);return s?"<"+s+">":"<...>"}catch{return"<...>"}}function a(){var r=Y.A;return r===null?null:r.getOwner()}function i(){return Error("react-stack-top-frame")}function d(r){if(G.call(r,"key")){var s=Object.getOwnPropertyDescriptor(r,"key").get;if(s&&s.isReactWarning)return!1}return r.key!==void 0}function o(r,s){function u(){X||(X=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",s))}u.isReactWarning=!0,Object.defineProperty(r,"key",{get:u,configurable:!0})}function w(){var r=n(this.type);return Z[r]||(Z[r]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),r=this.props.ref,r!==void 0?r:null}function f(r,s,u,h,$,W){var p=u.ref;return r={$$typeof:T,type:r,key:s,props:u,_owner:h},(p!==void 0?p:null)!==null?Object.defineProperty(r,"ref",{enumerable:!1,get:w}):Object.defineProperty(r,"ref",{enumerable:!1,value:null}),r._store={},Object.defineProperty(r._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(r,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(r,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:$}),Object.defineProperty(r,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:W}),Object.freeze&&(Object.freeze(r.props),Object.freeze(r)),r}function t(r,s,u,h,$,W){var p=s.children;if(p!==void 0)if(h)if(J(p)){for(h=0;h<p.length;h++)j(p[h]);Object.freeze&&Object.freeze(p)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else j(p);if(G.call(s,"key")){p=n(r);var D=Object.keys(s).filter(function(N){return N!=="key"});h=0<D.length?"{key: someKey, "+D.join(": ..., ")+": ...}":"{key: someKey}",Q[p+h]||(D=0<D.length?"{"+D.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
18
  let props = %s;
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,i,u,P,u),X[u+i]=!0)}if(u=null,n!==void 0&&(d(n),u=""+n),x(t)&&(d(t.key),u=""+t.key),"key"in t){n={};for(var l in t)l!=="key"&&(n[l]=t[l])}else n=t;return u&&c(n,typeof e=="function"?e.displayName||e.name||"Unknown":e),m(e,u,n,o(),$,M)}function k(e){N(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===I&&(e._payload.status==="fulfilled"?N(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function N(e){return typeof e=="object"&&e!==null&&e.$$typeof===T}var v=re,T=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),S=Symbol.for("react.consumer"),R=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),K=Symbol.for("react.activity"),ee=Symbol.for("react.client.reference"),z=v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=Object.prototype.hasOwnProperty,H=Array.isArray,F=console.createTask?console.createTask:function(){return null};v={react_stack_bottom_frame:function(e){return e()}};var J,G={},U=v.react_stack_bottom_frame.bind(v,f)(),A=F(j(f)),X={};q.Fragment=w,q.jsx=function(e,t,n){var i=1e4>z.recentlyCreatedOwnerStacks++;return s(e,t,n,!1,i?Error("react-stack-top-frame"):U,i?F(j(e)):A)},q.jsxs=function(e,t,n){var i=1e4>z.recentlyCreatedOwnerStacks++;return s(e,t,n,!0,i?Error("react-stack-top-frame"):U,i?F(j(e)):A)}})()),q}var ne;function me(){return ne||(ne=1,process.env.NODE_ENV==="production"?Q.exports=de():Q.exports=fe()),Q.exports}var r=me();function xe({data:a,loading:h=!1,columns:d,rowKey:j,emptyText:o="暂无数据",searchActiveEmptyText:f="未找到匹配的记录",header:x,pagination:c,rowClassName:_,onRow:m,actions:s,components:k,renderCard:N,renderTable:v,renderActions:T}){var u,P;if(!k)return r.jsxs("div",{className:"p-4 text-center text-destructive",children:["错误:请通过 components prop 注入 UI 组件",r.jsx("br",{}),r.jsx("code",{className:"text-sm",children:'import { Card, Table, Button, ... } from "@/components/ui"'})]});const{Card:O,CardContent:w,CardFooter:y,Table:D,TableBody:S,TableCell:R,TableHead:C,TableHeader:E,TableRow:g,Button:V,DropdownMenu:I,DropdownMenuTrigger:K,DropdownMenuContent:ee,DropdownMenuItem:z,DropdownMenuSeparator:W,Skeleton:H,TableHeaderComponent:F,TablePaginationComponent:J}=k,G=(l,p)=>{if(typeof j=="function")return j(l);const b=l[j];return b!=null?String(b):`row-${p}`},U=!!(x!=null&&x.searchValue&&x.searchValue.trim().length>0),A=!!(s!=null&&s.render||(u=s==null?void 0:s.items)!=null&&u.length),X=(s==null?void 0:s.mode)??((P=s==null?void 0:s.items)!=null&&P.length?"collapsed":"expanded"),e=l=>l.separator===!0,t=(l,p)=>!s||!A?null:X==="collapsed"&&s.items&&s.items.length>0?r.jsxs(I,{children:[r.jsx(K,{asChild:!0,children:r.jsx(V,{variant:"ghost",className:"h-8 w-8 p-0","aria-label":"打开行操作菜单",children:r.jsx(L.MoreVertical,{className:"h-4 w-4"})})}),r.jsx(ee,{align:"end",children:s.items.map((b,Z)=>e(b)?r.jsx(W,{},`separator-${Z}`):r.jsxs(z,{onClick:()=>b.onClick(l,p),className:b.className,children:[b.icon&&r.jsx("span",{className:"mr-2 h-4 w-4",children:b.icon}),b.label]},`action-${Z}`))})]}):s.render?s.render(l,p):null,n=()=>r.jsx(E,{children:r.jsxs(g,{className:"bg-muted/50 hover:bg-muted/50",children:[d.map(l=>r.jsx(C,{className:`font-semibold text-foreground ${l.align==="center"?"text-center":l.align==="right"?"text-right":"text-left"}`,style:{width:l.width},children:l.title},String(l.key))),A&&r.jsx(C,{className:"text-right font-semibold text-foreground",children:(s==null?void 0:s.title)||"操作"})]})}),i=()=>h?r.jsx(S,{children:Array.from({length:5}).map((l,p)=>r.jsxs(g,{children:[d.map(b=>r.jsx(R,{style:{width:b.width},className:b.align==="center"?"text-center":b.align==="right"?"text-right":"",children:r.jsx(H,{className:"h-4 w-full"})},String(b.key))),A&&r.jsx(R,{children:r.jsx(H,{className:"ml-auto h-4 w-8"})})]},p))}):a.length===0?r.jsx(S,{children:r.jsx(g,{children:r.jsx(R,{colSpan:d.length+(A?1:0),className:"py-8 text-center text-muted-foreground",children:U?f:o})})}):r.jsx(S,{children:a.map((l,p)=>{const b=G(l,p),Z=m==null?void 0:m(l,p),ae=_==null?void 0:_(l,p);return r.jsxs(g,{className:`${ae||""} hover:bg-muted/50`,...Z,children:[d.map(Y=>{const te=l[Y.key],ce=Y.render?Y.render(te,l,p):te;return r.jsx(R,{className:Y.align==="center"?"text-center":Y.align==="right"?"text-right":"",children:ce},String(Y.key))}),A&&r.jsx(R,{className:"text-right",children:T?T(l,p):t(l,p)})]},b)})}),$=l=>r.jsxs(O,{children:[x&&r.jsx("div",{className:"p-6 pb-0",children:r.jsx(F,{...x})}),r.jsx(w,{className:"p-0",children:l}),(c==null?void 0:c.show)!==!1&&c&&r.jsx(y,{className:"border-t py-4",children:r.jsx(J,{currentPage:c.currentPage,pageSize:c.pageSize,total:c.total,onPageChange:c.onPageChange,onPageSizeChange:c.onPageSizeChange,pageSizeOptions:c.pageSizeOptions,showPageSizeSelector:c.showPageSizeSelector,showTotal:c.showTotal,searchActive:U})})]}),M=(l,p)=>r.jsxs(D,{children:[l,p]});return N?N(v?v(n(),i()):M(n(),i())):$(v?v(n(),i()):M(n(),i()))}function he({open:a,onOpenChange:h,title:d,description:j,onConfirm:o,loading:f=!1,confirmText:x="确认删除",cancelText:c="取消",confirmButtonVariant:_="destructive",verification:m,components:s,loadingIcon:k}){const[N,v]=re.useState("");if(re.useEffect(()=>{a&&v("")},[a,m==null?void 0:m.targetValue]),!s)return r.jsx("div",{className:"p-4 text-center text-destructive",children:"错误:请通过 components prop 注入 UI 组件"});const{Dialog:T,DialogContent:O,DialogHeader:w,DialogFooter:y,DialogTitle:D,DialogDescription:S,Button:R,Input:C,Label:E}=s,g=m?N!==m.targetValue:!1,V=()=>{g||o()};return r.jsx(T,{open:a,onOpenChange:h,children:r.jsxs(O,{children:[r.jsxs(w,{children:[r.jsx(D,{asChild:!0,children:r.jsx("div",{className:"flex items-center gap-2",children:d})}),r.jsx(S,{asChild:!0,children:r.jsx("div",{children:j})})]}),m&&r.jsx("div",{className:"space-y-4 py-2",children:r.jsxs("div",{className:"space-y-2",children:[r.jsx(E,{htmlFor:"confirm-input",children:m.label||"请输入以确认"}),r.jsx(C,{id:"confirm-input",value:N,onChange:I=>v(I.target.value),placeholder:m.placeholder,disabled:f})]})}),r.jsxs(y,{children:[r.jsx(R,{variant:"outline",onClick:()=>h(!1),disabled:f,children:c}),r.jsxs(R,{variant:_,onClick:V,disabled:g||f,children:[f&&r.jsx("span",{className:"mr-2",children:k||r.jsxs("svg",{className:"h-4 w-4 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[r.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),r.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}),x]})]})]})})}function je({title:a,searchPlaceholder:h="搜索...",searchValue:d="",onSearchChange:j,onSearch:o,showSearch:f=!0,action:x,actionLabel:c,onActionClick:_,loading:m=!1,components:s}){if(!s)return r.jsx("div",{className:"p-4 text-center text-destructive",children:"错误:请通过 components prop 注入 UI 组件"});const{Input:k,Button:N}=s,v=T=>{T.key==="Enter"&&o&&o()};return r.jsxs("div",{className:"flex flex-col gap-4 p-1",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("div",{className:"text-lg font-semibold leading-none tracking-tight",children:a}),r.jsxs("div",{className:"flex items-center gap-2",children:[x&&r.jsx("div",{className:"flex items-center gap-2",children:x}),!x&&c&&_&&r.jsxs(N,{onClick:_,disabled:m,size:"sm",children:[r.jsx(L.Plus,{className:"mr-2 h-4 w-4"}),c]})]})]}),f&&r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs("div",{className:"relative max-w-sm flex-1",children:[r.jsx(L.Search,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),r.jsx(k,{placeholder:h,value:d,onChange:T=>j==null?void 0:j(T.target.value),onKeyPress:v,className:"h-9 pl-8",disabled:m})]}),o&&r.jsx(N,{onClick:o,disabled:m,variant:"secondary",size:"sm",children:"搜索"})]})]})}function pe({currentPage:a,pageSize:h,total:d,onPageChange:j,onPageSizeChange:o,pageSizeOptions:f=[10,20,50],showPageSizeSelector:x=!0,showTotal:c=!0,searchActive:_=!1,components:m}){if(!m)return r.jsx("div",{className:"p-4 text-center text-destructive",children:"错误:请通过 components prop 注入 UI 组件"});const{Button:s,Select:k,SelectTrigger:N,SelectContent:v,SelectItem:T,SelectValue:O}=m,w=Math.ceil(d/h),y=Math.max(w,1),D=a*h+1,S=Math.min((a+1)*h,d),R=Array.from(new Set([...f,h])).sort((E,g)=>E-g),C=x&&!!o;return d===0?null:r.jsxs("div",{className:"flex w-full items-center justify-between",children:[c&&r.jsx("div",{className:"text-sm text-muted-foreground",children:_?`找到 ${d} 条匹配记录`:d>0?`显示 ${D} - ${S} 条,共 ${d} 条记录`:"暂无数据"}),r.jsxs("div",{className:"flex items-center space-x-2",children:[C&&r.jsxs("div",{className:"mr-2 flex items-center gap-2",children:[r.jsx("span",{className:"text-sm text-muted-foreground",children:"每页"}),r.jsxs(k,{value:String(h),onValueChange:E=>{const g=Number(E);Number.isNaN(g)||g===h||!o||o(g)},children:[r.jsx(N,{className:"h-8 w-[90px]",children:r.jsx(O,{})}),r.jsx(v,{children:R.map(E=>r.jsx(T,{value:String(E),children:E},E))})]}),r.jsx("span",{className:"text-sm text-muted-foreground",children:"条"})]}),r.jsxs("div",{className:"mr-4 text-sm text-muted-foreground",children:["第 ",a+1," 页,共 ",y," 页"]}),r.jsxs(s,{variant:"outline",size:"sm",onClick:()=>j(a-1),disabled:a===0||y<=1,children:[r.jsx(L.ChevronLeft,{className:"h-4 w-4"}),"上一页"]}),r.jsxs(s,{variant:"outline",size:"sm",onClick:()=>j(a+1),disabled:a>=y-1||y<=1,children:["下一页",r.jsx(L.ChevronRight,{className:"h-4 w-4"})]})]})]})}exports.DataTable=xe;exports.DeleteConfirmDialog=he;exports.TableHeader=je;exports.TablePagination=pe;exports.cn=ue;
22
+ <%s key={someKey} {...props} />`,h,p,D,p),Q[p+h]=!0)}if(p=null,u!==void 0&&(c(u),p=""+u),d(s)&&(c(s.key),p=""+s.key),"key"in s){u={};for(var l in s)l!=="key"&&(u[l]=s[l])}else u=s;return p&&o(u,typeof r=="function"?r.displayName||r.name||"Unknown":r),f(r,p,u,a(),$,W)}function j(r){b(r)?r._store&&(r._store.validated=1):typeof r=="object"&&r!==null&&r.$$typeof===P&&(r._payload.status==="fulfilled"?b(r._payload.value)&&r._payload.value._store&&(r._payload.value._store.validated=1):r._store&&(r._store.validated=1))}function b(r){return typeof r=="object"&&r!==null&&r.$$typeof===T}var v=q,T=Symbol.for("react.transitional.element"),M=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),y=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),re=Symbol.for("react.client.reference"),Y=v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=Object.prototype.hasOwnProperty,J=Array.isArray,F=console.createTask?console.createTask:function(){return null};v={react_stack_bottom_frame:function(r){return r()}};var X,Z={},z=v.react_stack_bottom_frame.bind(v,i)(),I=F(x(i)),Q={};V.Fragment=S,V.jsx=function(r,s,u){var h=1e4>Y.recentlyCreatedOwnerStacks++;return t(r,s,u,!1,h?Error("react-stack-top-frame"):z,h?F(x(r)):I)},V.jsxs=function(r,s,u){var h=1e4>Y.recentlyCreatedOwnerStacks++;return t(r,s,u,!0,h?Error("react-stack-top-frame"):z,h?F(x(r)):I)}})()),V}var le;function xe(){return le||(le=1,process.env.NODE_ENV==="production"?ee.exports=de():ee.exports=fe()),ee.exports}var e=xe();function he({data:n,loading:m=!1,columns:c,rowKey:x,emptyText:a="暂无数据",searchActiveEmptyText:i="未找到匹配的记录",header:d,pagination:o,rowClassName:w,onRow:f,actions:t,components:j,renderCard:b,renderTable:v,renderActions:T}){var p,D;if(!j)return e.jsxs("div",{className:"p-4 text-center text-destructive",children:["错误:请通过 components prop 注入 UI 组件",e.jsx("br",{}),e.jsx("code",{className:"text-sm",children:'import { Card, Table, Button, ... } from "@/components/ui"'})]});const{Card:M,CardContent:S,CardFooter:R,Table:O,TableBody:C,TableCell:y,TableHead:A,TableHeader:E,TableRow:g,Button:_,DropdownMenu:P,DropdownMenuTrigger:L,DropdownMenuContent:re,DropdownMenuItem:Y,DropdownMenuSeparator:G,Skeleton:J,TableHeaderComponent:F,TablePaginationComponent:X}=j,Z=(l,N)=>{if(typeof x=="function")return x(l);const k=l[x];return k!=null?String(k):`row-${N}`},z=!!(d!=null&&d.searchValue&&d.searchValue.trim().length>0),I=!!(t!=null&&t.render||(p=t==null?void 0:t.items)!=null&&p.length),Q=(t==null?void 0:t.mode)??((D=t==null?void 0:t.items)!=null&&D.length?"collapsed":"expanded"),r=l=>l.separator===!0,s=(l,N)=>!t||!I?null:Q==="collapsed"&&t.items&&t.items.length>0?e.jsxs(P,{children:[e.jsx(L,{asChild:!0,children:e.jsx(_,{variant:"ghost",className:"h-8 w-8 p-0","aria-label":"打开行操作菜单",children:e.jsx(H.MoreVertical,{className:"h-4 w-4"})})}),e.jsx(re,{align:"end",children:t.items.map((k,K)=>r(k)?e.jsx(G,{},`separator-${K}`):e.jsxs(Y,{onClick:()=>k.onClick(l,N),className:k.className,children:[k.icon&&e.jsx("span",{className:"mr-2 h-4 w-4",children:k.icon}),k.label]},`action-${K}`))})]}):t.render?t.render(l,N):null,u=()=>e.jsx(E,{children:e.jsxs(g,{className:"bg-muted/50 hover:bg-muted/50",children:[c.map(l=>e.jsx(A,{className:`font-semibold text-foreground ${l.align==="center"?"text-center":l.align==="right"?"text-right":"text-left"}`,style:{width:l.width},children:l.title},String(l.key))),I&&e.jsx(A,{className:"text-right font-semibold text-foreground",children:(t==null?void 0:t.title)||"操作"})]})}),h=()=>m?e.jsx(C,{children:Array.from({length:5}).map((l,N)=>e.jsxs(g,{children:[c.map(k=>e.jsx(y,{style:{width:k.width},className:k.align==="center"?"text-center":k.align==="right"?"text-right":"",children:e.jsx(J,{className:"h-4 w-full"})},String(k.key))),I&&e.jsx(y,{children:e.jsx(J,{className:"ml-auto h-4 w-8"})})]},N))}):n.length===0?e.jsx(C,{children:e.jsx(g,{children:e.jsx(y,{colSpan:c.length+(I?1:0),className:"py-8 text-center text-muted-foreground",children:z?i:a})})}):e.jsx(C,{children:n.map((l,N)=>{const k=Z(l,N),K=f==null?void 0:f(l,N),ae=w==null?void 0:w(l,N);return e.jsxs(g,{className:`${ae||""} hover:bg-muted/50`,...K,children:[c.map(B=>{const te=l[B.key],oe=B.render?B.render(te,l,N):te;return e.jsx(y,{className:B.align==="center"?"text-center":B.align==="right"?"text-right":"",children:oe},String(B.key))}),I&&e.jsx(y,{className:"text-right",children:T?T(l,N):s(l,N)})]},k)})}),$=l=>e.jsxs(M,{children:[d&&e.jsx("div",{className:"p-6 pb-0",children:e.jsx(F,{...d})}),e.jsx(S,{className:"p-0",children:l}),(o==null?void 0:o.show)!==!1&&o&&e.jsx(R,{className:"border-t py-4",children:e.jsx(X,{currentPage:o.currentPage,pageSize:o.pageSize,total:o.total,onPageChange:o.onPageChange,onPageSizeChange:o.onPageSizeChange,pageSizeOptions:o.pageSizeOptions,showPageSizeSelector:o.showPageSizeSelector,showTotal:o.showTotal,searchActive:z})})]}),W=(l,N)=>e.jsxs(O,{children:[l,N]});return b?b(v?v(u(),h()):W(u(),h())):$(v?v(u(),h()):W(u(),h()))}function me({open:n,onOpenChange:m,title:c,description:x,onConfirm:a,loading:i=!1,confirmText:d="确认删除",cancelText:o="取消",confirmButtonVariant:w="destructive",verification:f,components:t,loadingIcon:j}){const[b,v]=q.useState("");if(q.useEffect(()=>{n&&v("")},[n,f==null?void 0:f.targetValue]),!t)return e.jsx("div",{className:"p-4 text-center text-destructive",children:"错误:请通过 components prop 注入 UI 组件"});const{Dialog:T,DialogContent:M,DialogHeader:S,DialogFooter:R,DialogTitle:O,DialogDescription:C,Button:y,Input:A,Label:E}=t,g=f?b!==f.targetValue:!1,_=()=>{g||a()};return e.jsx(T,{open:n,onOpenChange:m,children:e.jsxs(M,{children:[e.jsxs(S,{children:[e.jsx(O,{asChild:!0,children:e.jsx("div",{className:"flex items-center gap-2",children:c})}),e.jsx(C,{asChild:!0,children:e.jsx("div",{children:x})})]}),f&&e.jsx("div",{className:"space-y-4 py-2",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx(E,{htmlFor:"confirm-input",children:f.label||"请输入以确认"}),e.jsx(A,{id:"confirm-input",value:b,onChange:P=>v(P.target.value),placeholder:f.placeholder,disabled:i})]})}),e.jsxs(R,{children:[e.jsx(y,{variant:"outline",onClick:()=>m(!1),disabled:i,children:o}),e.jsxs(y,{variant:w,onClick:_,disabled:g||i,children:[i&&e.jsx("span",{className:"mr-2",children:j||e.jsxs("svg",{className:"h-4 w-4 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}),d]})]})]})})}function pe({title:n,searchPlaceholder:m="搜索...",searchValue:c="",onSearchChange:x,onSearch:a,showSearch:i=!0,action:d,actionLabel:o,onActionClick:w,loading:f=!1,components:t}){if(!t)return e.jsx("div",{className:"p-4 text-center text-destructive",children:"错误:请通过 components prop 注入 UI 组件"});const{Input:j,Button:b}=t,v=T=>{T.key==="Enter"&&a&&a()};return e.jsxs("div",{className:"flex flex-col gap-4 p-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"text-lg font-semibold leading-none tracking-tight",children:n}),e.jsxs("div",{className:"flex items-center gap-2",children:[d&&e.jsx("div",{className:"flex items-center gap-2",children:d}),!d&&o&&w&&e.jsxs(b,{onClick:w,disabled:f,size:"sm",children:[e.jsx(H.Plus,{className:"mr-2 h-4 w-4"}),o]})]})]}),i&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"relative max-w-sm flex-1",children:[e.jsx(H.Search,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),e.jsx(j,{placeholder:m,value:c,onChange:T=>x==null?void 0:x(T.target.value),onKeyPress:v,className:"h-9 pl-8",disabled:f})]}),a&&e.jsx(b,{onClick:a,disabled:f,variant:"secondary",size:"sm",children:"搜索"})]})]})}function je({currentPage:n,pageSize:m,total:c,onPageChange:x,onPageSizeChange:a,pageSizeOptions:i=[10,20,50],showPageSizeSelector:d=!0,showTotal:o=!0,searchActive:w=!1,components:f}){if(!f)return e.jsx("div",{className:"p-4 text-center text-destructive",children:"错误:请通过 components prop 注入 UI 组件"});const{Button:t,Select:j,SelectTrigger:b,SelectContent:v,SelectItem:T,SelectValue:M}=f,S=Math.ceil(c/m),R=Math.max(S,1),O=n*m+1,C=Math.min((n+1)*m,c),y=Array.from(new Set([...i,m])).sort((E,g)=>E-g),A=d&&!!a;return c===0?null:e.jsxs("div",{className:"flex w-full items-center justify-between",children:[o&&e.jsx("div",{className:"text-sm text-muted-foreground",children:w?`找到 ${c} 条匹配记录`:c>0?`显示 ${O} - ${C} 条,共 ${c} 条记录`:"暂无数据"}),e.jsxs("div",{className:"flex items-center space-x-2",children:[A&&e.jsxs("div",{className:"mr-2 flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"每页"}),e.jsxs(j,{value:String(m),onValueChange:E=>{const g=Number(E);Number.isNaN(g)||g===m||!a||a(g)},children:[e.jsx(b,{className:"h-8 w-[90px]",children:e.jsx(M,{})}),e.jsx(v,{children:y.map(E=>e.jsx(T,{value:String(E),children:E},E))})]}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"条"})]}),e.jsxs("div",{className:"mr-4 text-sm text-muted-foreground",children:["第 ",n+1," 页,共 ",R," 页"]}),e.jsxs(t,{variant:"outline",size:"sm",onClick:()=>x(n-1),disabled:n===0||R<=1,children:[e.jsx(H.ChevronLeft,{className:"h-4 w-4"}),"上一页"]}),e.jsxs(t,{variant:"outline",size:"sm",onClick:()=>x(n+1),disabled:n>=R-1||R<=1,children:["下一页",e.jsx(H.ChevronRight,{className:"h-4 w-4"})]})]})]})}const ve=[{value:"light",label:"浅色",icon:e.jsxs("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",strokeWidth:"2"}),e.jsx("path",{className:"opacity-75",d:"M12 2v2m0 16v2M4.93 4.93l1.41 1.41m11.32 11.32l1.41 1.41M2 12h2m16 0h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41",strokeWidth:"2",strokeLinecap:"round"})]})},{value:"dark",label:"深色",icon:e.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})},{value:"system",label:"跟随系统",icon:e.jsxs("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[e.jsx("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",ry:"2",strokeWidth:"2"}),e.jsx("path",{d:"M8 21h8m-4-4v4",strokeWidth:"2",strokeLinecap:"round"})]})}];function be({value:n,onValueChange:m,themes:c=ve,triggerVariant:x="ghost",triggerSize:a="icon",triggerClassName:i,iconSize:d=16,showCurrentIcon:o=!0,enableSSRHandling:w=!0,triggerContent:f,components:t,themeIcons:j}){const[b,v]=q.useState(!1);if(q.useEffect(()=>{v(!0)},[]),w&&!b)return null;if(!t)return e.jsx("div",{className:"p-4 text-center text-destructive",children:"错误:请通过 components prop 注入 UI 组件"});const{DropdownMenu:T,DropdownMenuTrigger:M,DropdownMenuContent:S,DropdownMenuRadioGroup:R,DropdownMenuRadioItem:O,Button:C}=t,y=_=>{if(j&&j[_])return j[_];const P=c.find(L=>L.value===_);return P==null?void 0:P.icon},A=y(n),E=o?A:null,g=d?{width:d,height:d}:{};return e.jsxs(T,{children:[e.jsx(M,{asChild:!0,children:e.jsx(C,{variant:x,size:a,className:i,children:f||e.jsx("span",{style:g,className:"inline-flex items-center justify-center",children:E})})}),e.jsx(S,{children:e.jsx(R,{value:n,onValueChange:m,children:c.map(_=>e.jsxs(O,{value:_.value,children:[e.jsx("span",{className:"mr-2 inline-flex items-center",children:y(_.value)}),e.jsx("span",{children:_.label})]},_.value))})})]})}const ge=[{value:"light",label:"浅色",icon:e.jsxs("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",strokeWidth:"2"}),e.jsx("path",{className:"opacity-75",d:"M12 2v2m0 16v2M4.93 4.93l1.41 1.41m11.32 11.32l1.41 1.41M2 12h2m16 0h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41",strokeWidth:"2",strokeLinecap:"round"})]})},{value:"dark",label:"深色",icon:e.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})},{value:"system",label:"跟随系统",icon:e.jsxs("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[e.jsx("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",ry:"2",strokeWidth:"2"}),e.jsx("path",{d:"M8 21h8m-4-4v4",strokeWidth:"2",strokeLinecap:"round"})]})}];function Ne({value:n,onValueChange:m,themes:c=ge,iconSize:x=16,components:a,themeIcons:i}){if(!a)return e.jsx("div",{className:"p-4 text-center text-destructive",children:"错误:请通过 components prop 注入 UI 组件"});const{DropdownMenuRadioGroup:d,DropdownMenuRadioItem:o}=a,w=t=>{if(i&&i[t])return i[t];const j=c.find(b=>b.value===t);return j==null?void 0:j.icon},f=x?{width:x,height:x}:{};return e.jsx(d,{value:n,onValueChange:m,children:c.map(t=>e.jsxs(o,{value:t.value,children:[e.jsx("span",{className:"mr-2 inline-flex items-center",style:f,children:w(t.value)}),e.jsx("span",{children:t.label})]},t.value))})}exports.DataTable=he;exports.DeleteConfirmDialog=me;exports.TableHeader=pe;exports.TablePagination=je;exports.ThemeSwitcher=be;exports.ThemeSwitcherContent=Ne;exports.cn=ue;
23
23
  //# sourceMappingURL=index.c.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.c.js","sources":["../src/lib/utils.ts","../node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react-jsx-runtime.production.js","../node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react-jsx-runtime.development.js","../node_modules/.pnpm/react@19.2.4/node_modules/react/jsx-runtime.js","../src/components/DataTable.tsx","../src/components/DeleteConfirmDialog.tsx","../src/components/TableHeader.tsx","../src/components/TablePagination.tsx"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n maybeKey,\n getOwner(),\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import { MoreVertical } from 'lucide-react';\nimport { ReactNode } from 'react';\nimport type { HTMLAttributes, ButtonHTMLAttributes } from 'react';\n\nimport type {\n UIComponent,\n ButtonComponent,\n CardComponent,\n TableComponent,\n TableRowComponent,\n TableCellComponent,\n} from '../types/component-types';\n\nimport type { TableHeaderProps } from './TableHeader';\nimport type { TablePaginationProps } from './TablePagination';\n\ntype ColumnKey<T> = Extract<keyof T, string>;\n\ntype ActionMenuItem<T> = {\n label: ReactNode;\n icon?: ReactNode;\n onClick: (record: T, index: number) => void;\n className?: string;\n separator?: never;\n};\n\ntype ActionSeparatorItem = {\n separator: true;\n className?: string;\n label?: never;\n icon?: never;\n onClick?: never;\n};\n\ntype ActionItem<T> = ActionMenuItem<T> | ActionSeparatorItem;\n\nexport interface Column<T = unknown> {\n key: ColumnKey<T>;\n title: ReactNode;\n render?: (value: T[ColumnKey<T>], record: T, index: number) => ReactNode;\n width?: string;\n align?: 'left' | 'center' | 'right';\n}\n\n/**\n * UI 组件适配器接口\n * 业务项目应该传入自己项目中的 shadcn/ui 组件\n */\nexport interface UIComponents {\n Card: CardComponent;\n CardContent: UIComponent<HTMLAttributes<HTMLDivElement>>;\n CardFooter: UIComponent<HTMLAttributes<HTMLDivElement>>;\n Table: TableComponent;\n TableBody: UIComponent<HTMLAttributes<HTMLTableSectionElement>>;\n TableCell: TableCellComponent;\n TableHead: TableCellComponent;\n TableHeader: UIComponent<HTMLAttributes<HTMLTableSectionElement>>;\n TableRow: TableRowComponent;\n Button: ButtonComponent;\n DropdownMenu: UIComponent<HTMLAttributes<HTMLDivElement>>;\n DropdownMenuTrigger: ButtonComponent;\n DropdownMenuContent: UIComponent<\n HTMLAttributes<HTMLDivElement> & { align?: 'start' | 'end' | 'center' }\n >;\n DropdownMenuItem: UIComponent<\n ButtonHTMLAttributes<HTMLDivElement> & {\n onClick?: (e: React.MouseEvent) => void;\n }\n >;\n DropdownMenuSeparator: UIComponent;\n Skeleton: UIComponent<HTMLAttributes<HTMLDivElement>>;\n TableHeaderComponent: React.ComponentType<TableHeaderProps>;\n TablePaginationComponent: React.ComponentType<TablePaginationProps>;\n}\n\nexport interface DataTableProps<T = unknown> {\n // 数据相关\n data: T[];\n loading?: boolean;\n columns: Column<T>[];\n rowKey: keyof T | ((record: T) => string);\n\n // 空状态\n emptyText?: string;\n searchActiveEmptyText?: string;\n\n // 头部配置\n header?: TableHeaderProps;\n\n // 分页配置\n pagination?: TablePaginationProps & {\n show?: boolean;\n };\n\n // 表格行样式\n rowClassName?: (record: T, index: number) => string;\n onRow?: (\n record: T,\n index: number\n ) => {\n onClick?: () => void;\n onDoubleClick?: () => void;\n };\n\n // 操作列\n actions?: {\n title?: string;\n mode?: 'expanded' | 'collapsed';\n render?: (record: T, index: number) => ReactNode;\n items?: ActionItem<T>[];\n };\n\n // UI 组件注入(可选)\n components?: UIComponents;\n\n // 自定义渲染函数(更灵活)\n renderCard?: (content: ReactNode) => ReactNode;\n renderTable?: (header: ReactNode, body: ReactNode) => ReactNode;\n renderActions?: (record: T, index: number) => ReactNode;\n}\n\n/**\n * 默认的 DataTable 实现\n * 需要通过 components prop 注入 UI 组件\n */\nexport function DataTable<T extends Record<string, any>>({\n data,\n loading = false,\n columns,\n rowKey,\n emptyText = '暂无数据',\n searchActiveEmptyText = '未找到匹配的记录',\n header,\n pagination,\n rowClassName,\n onRow,\n actions,\n components,\n renderCard,\n renderTable,\n renderActions,\n}: DataTableProps<T>) {\n if (!components) {\n return (\n <div className=\"p-4 text-center text-destructive\">\n 错误:请通过 components prop 注入 UI 组件\n <br />\n <code className=\"text-sm\">\n {'import { Card, Table, Button, ... } from \"@/components/ui\"'}\n </code>\n </div>\n );\n }\n\n const {\n Card,\n CardContent,\n CardFooter,\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n Button,\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n Skeleton,\n TableHeaderComponent,\n TablePaginationComponent,\n } = components;\n\n // 获取行的唯一标识\n const getRowKey = (record: T, index: number): string => {\n if (typeof rowKey === 'function') {\n return rowKey(record);\n }\n const keyVal = record[rowKey];\n return keyVal !== undefined && keyVal !== null\n ? String(keyVal)\n : `row-${index}`;\n };\n\n // 检查是否有搜索活动\n const isSearchActive = Boolean(\n header?.searchValue && header.searchValue.trim().length > 0\n );\n const hasActions = Boolean(actions?.render || actions?.items?.length);\n const actionMode: 'expanded' | 'collapsed' =\n actions?.mode ?? (actions?.items?.length ? 'collapsed' : 'expanded');\n const isSeparatorItem = (item: ActionItem<T>): item is ActionSeparatorItem =>\n item.separator === true;\n\n // 渲染操作列\n const defaultRenderActions = (record: T, index: number) => {\n if (!actions || !hasActions) return null;\n\n // 折叠模式:使用 DropdownMenu\n if (\n actionMode === 'collapsed' &&\n actions.items &&\n actions.items.length > 0\n ) {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n variant=\"ghost\"\n className=\"h-8 w-8 p-0\"\n aria-label=\"打开行操作菜单\"\n >\n <MoreVertical className=\"h-4 w-4\" />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\">\n {actions.items.map((item, itemIndex) =>\n isSeparatorItem(item) ? (\n <DropdownMenuSeparator key={`separator-${itemIndex}`} />\n ) : (\n <DropdownMenuItem\n key={`action-${itemIndex}`}\n onClick={() => item.onClick(record, index)}\n className={item.className}\n >\n {item.icon && (\n <span className=\"mr-2 h-4 w-4\">{item.icon}</span>\n )}\n {item.label}\n </DropdownMenuItem>\n )\n )}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n }\n\n // 展开模式:使用自定义 render\n return actions.render ? actions.render(record, index) : null;\n };\n\n // 渲染表头\n const renderTableHeader = () => {\n return (\n <TableHeader>\n <TableRow className=\"bg-muted/50 hover:bg-muted/50\">\n {columns.map((column) => (\n <TableHead\n key={String(column.key)}\n className={`font-semibold text-foreground ${\n column.align === 'center'\n ? 'text-center'\n : column.align === 'right'\n ? 'text-right'\n : 'text-left'\n }`}\n style={{ width: column.width }}\n >\n {column.title}\n </TableHead>\n ))}\n {hasActions && (\n <TableHead className=\"text-right font-semibold text-foreground\">\n {actions?.title || '操作'}\n </TableHead>\n )}\n </TableRow>\n </TableHeader>\n );\n };\n\n // 渲染表体\n const renderTableBody = () => {\n // Loading 状态\n if (loading) {\n return (\n <TableBody>\n {Array.from({ length: 5 }).map((_, index) => (\n <TableRow key={index}>\n {columns.map((column) => (\n <TableCell\n key={String(column.key)}\n style={{ width: column.width }}\n className={\n column.align === 'center'\n ? 'text-center'\n : column.align === 'right'\n ? 'text-right'\n : ''\n }\n >\n <Skeleton className=\"h-4 w-full\" />\n </TableCell>\n ))}\n {hasActions && (\n <TableCell>\n <Skeleton className=\"ml-auto h-4 w-8\" />\n </TableCell>\n )}\n </TableRow>\n ))}\n </TableBody>\n );\n }\n\n // 空数据状态\n if (data.length === 0) {\n return (\n <TableBody>\n <TableRow>\n <TableCell\n colSpan={columns.length + (hasActions ? 1 : 0)}\n className=\"py-8 text-center text-muted-foreground\"\n >\n {isSearchActive ? searchActiveEmptyText : emptyText}\n </TableCell>\n </TableRow>\n </TableBody>\n );\n }\n\n // 数据行\n return (\n <TableBody>\n {data.map((record, index) => {\n const key = getRowKey(record, index);\n const rowProps = onRow?.(record, index);\n const className = rowClassName?.(record, index);\n\n return (\n <TableRow\n key={key}\n className={`${className || ''} hover:bg-muted/50`}\n {...rowProps}\n >\n {columns.map((column) => {\n const value = record[column.key as keyof T];\n const content = column.render\n ? column.render(value as T[ColumnKey<T>], record, index)\n : value;\n\n return (\n <TableCell\n key={String(column.key)}\n className={\n column.align === 'center'\n ? 'text-center'\n : column.align === 'right'\n ? 'text-right'\n : ''\n }\n >\n {content}\n </TableCell>\n );\n })}\n {hasActions && (\n <TableCell className=\"text-right\">\n {renderActions\n ? renderActions(record, index)\n : defaultRenderActions(record, index)}\n </TableCell>\n )}\n </TableRow>\n );\n })}\n </TableBody>\n );\n };\n\n // 默认的卡片渲染\n const defaultRenderCard = (content: ReactNode) => (\n <Card>\n {header && (\n <div className=\"p-6 pb-0\">\n <TableHeaderComponent {...header} />\n </div>\n )}\n <CardContent className=\"p-0\">{content}</CardContent>\n {pagination?.show !== false && pagination && (\n <CardFooter className=\"border-t py-4\">\n <TablePaginationComponent\n currentPage={pagination.currentPage}\n pageSize={pagination.pageSize}\n total={pagination.total}\n onPageChange={pagination.onPageChange}\n onPageSizeChange={pagination.onPageSizeChange}\n pageSizeOptions={pagination.pageSizeOptions}\n showPageSizeSelector={pagination.showPageSizeSelector}\n showTotal={pagination.showTotal}\n searchActive={isSearchActive}\n />\n </CardFooter>\n )}\n </Card>\n );\n\n // 默认的表格渲染\n const defaultRenderTable = (tableHeader: ReactNode, tableBody: ReactNode) => (\n <Table>\n {tableHeader}\n {tableBody}\n </Table>\n );\n\n return renderCard\n ? renderCard(\n renderTable\n ? renderTable(renderTableHeader(), renderTableBody())\n : defaultRenderTable(renderTableHeader(), renderTableBody())\n )\n : defaultRenderCard(\n renderTable\n ? renderTable(renderTableHeader(), renderTableBody())\n : defaultRenderTable(renderTableHeader(), renderTableBody())\n );\n}\n","import { useState, useEffect } from 'react';\n\nimport type {\n ButtonComponent,\n InputComponent,\n LabelComponent,\n DialogComponent,\n DialogContentComponent,\n DialogHeaderComponent,\n DialogFooterComponent,\n DialogTitleComponent,\n DialogDescriptionComponent,\n} from '../types/component-types';\n\n/**\n * UI 组件适配器接口\n */\nexport interface DialogUIComponents {\n Dialog: DialogComponent;\n DialogContent: DialogContentComponent;\n DialogHeader: DialogHeaderComponent;\n DialogFooter: DialogFooterComponent;\n DialogTitle: DialogTitleComponent;\n DialogDescription: DialogDescriptionComponent;\n Button: ButtonComponent;\n Input: InputComponent;\n Label: LabelComponent;\n}\n\nexport interface DeleteConfirmDialogProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n title: React.ReactNode;\n description: React.ReactNode;\n onConfirm: () => void;\n loading?: boolean;\n confirmText?: string;\n cancelText?: string;\n confirmButtonVariant?:\n | 'default'\n | 'destructive'\n | 'outline'\n | 'secondary'\n | 'ghost'\n | 'link';\n verification?: {\n targetValue: string;\n label?: string;\n placeholder?: string;\n };\n\n // UI 组件注入\n components?: DialogUIComponents;\n\n // 自定义加载图标(可选)\n loadingIcon?: React.ReactNode;\n}\n\n/**\n * 删除确认对话框\n * 需要通过 components prop 注入 UI 组件\n */\nexport function DeleteConfirmDialog({\n open,\n onOpenChange,\n title,\n description,\n onConfirm,\n loading = false,\n confirmText = '确认删除',\n cancelText = '取消',\n confirmButtonVariant = 'destructive',\n verification,\n components,\n loadingIcon,\n}: DeleteConfirmDialogProps) {\n const [inputValue, setInputValue] = useState('');\n\n // Reset input when dialog opens/closes or target value changes\n useEffect(() => {\n if (open) {\n setInputValue('');\n }\n }, [open, verification?.targetValue]);\n\n if (!components) {\n return (\n <div className=\"p-4 text-center text-destructive\">\n 错误:请通过 components prop 注入 UI 组件\n </div>\n );\n }\n\n const {\n Dialog,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n Button,\n Input,\n Label,\n } = components;\n\n const isConfirmDisabled = verification\n ? inputValue !== verification.targetValue\n : false;\n\n const handleConfirm = () => {\n if (isConfirmDisabled) return;\n onConfirm();\n };\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent>\n <DialogHeader>\n <DialogTitle asChild>\n <div className=\"flex items-center gap-2\">{title}</div>\n </DialogTitle>\n <DialogDescription asChild>\n <div>{description}</div>\n </DialogDescription>\n </DialogHeader>\n\n {verification && (\n <div className=\"space-y-4 py-2\">\n <div className=\"space-y-2\">\n <Label htmlFor=\"confirm-input\">\n {verification.label || '请输入以确认'}\n </Label>\n <Input\n id=\"confirm-input\"\n value={inputValue}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n setInputValue(e.target.value)\n }\n placeholder={verification.placeholder}\n disabled={loading}\n />\n </div>\n </div>\n )}\n\n <DialogFooter>\n <Button\n variant=\"outline\"\n onClick={() => onOpenChange(false)}\n disabled={loading}\n >\n {cancelText}\n </Button>\n <Button\n variant={confirmButtonVariant}\n onClick={handleConfirm}\n disabled={isConfirmDisabled || loading}\n >\n {loading && (\n <span className=\"mr-2\">\n {loadingIcon || (\n <svg\n className=\"h-4 w-4 animate-spin\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n />\n </svg>\n )}\n </span>\n )}\n {confirmText}\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n}\n","import { Plus, Search } from 'lucide-react';\nimport { ReactNode } from 'react';\n\nimport type { InputComponent, ButtonComponent } from '../types/component-types';\n\n/**\n * UI 组件适配器接口\n */\nexport interface HeaderUIComponents {\n Input: InputComponent;\n Button: ButtonComponent;\n}\n\nexport interface TableHeaderProps {\n title: ReactNode;\n searchPlaceholder?: string;\n searchValue?: string;\n onSearchChange?: (value: string) => void;\n onSearch?: () => void;\n showSearch?: boolean;\n action?: ReactNode;\n actionLabel?: string;\n onActionClick?: () => void;\n loading?: boolean;\n\n // UI 组件注入\n components?: HeaderUIComponents;\n}\n\n/**\n * 表格头部组件\n * 支持搜索框和操作按钮\n */\nexport function TableHeader({\n title,\n searchPlaceholder = '搜索...',\n searchValue = '',\n onSearchChange,\n onSearch,\n showSearch = true,\n action,\n actionLabel,\n onActionClick,\n loading = false,\n components,\n}: TableHeaderProps) {\n if (!components) {\n return (\n <div className=\"p-4 text-center text-destructive\">\n 错误:请通过 components prop 注入 UI 组件\n </div>\n );\n }\n\n const { Input, Button } = components;\n\n const handleKeyPress = (e: React.KeyboardEvent) => {\n if (e.key === 'Enter' && onSearch) {\n onSearch();\n }\n };\n\n return (\n <div className=\"flex flex-col gap-4 p-1\">\n <div className=\"flex items-center justify-between\">\n <div className=\"text-lg font-semibold leading-none tracking-tight\">\n {title}\n </div>\n <div className=\"flex items-center gap-2\">\n {action && <div className=\"flex items-center gap-2\">{action}</div>}\n {!action && actionLabel && onActionClick && (\n <Button onClick={onActionClick} disabled={loading} size=\"sm\">\n <Plus className=\"mr-2 h-4 w-4\" />\n {actionLabel}\n </Button>\n )}\n </div>\n </div>\n {showSearch && (\n <div className=\"flex items-center gap-2\">\n <div className=\"relative max-w-sm flex-1\">\n <Search className=\"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground\" />\n <Input\n placeholder={searchPlaceholder}\n value={searchValue}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n onSearchChange?.(e.target.value)\n }\n onKeyPress={handleKeyPress}\n className=\"h-9 pl-8\"\n disabled={loading}\n />\n </div>\n {onSearch && (\n <Button\n onClick={onSearch}\n disabled={loading}\n variant=\"secondary\"\n size=\"sm\"\n >\n 搜索\n </Button>\n )}\n </div>\n )}\n </div>\n );\n}\n","import { ChevronLeft, ChevronRight } from 'lucide-react';\n\nimport type {\n ButtonComponent,\n SelectComponent,\n SelectTriggerComponent,\n SelectContentComponent,\n SelectItemComponent,\n SelectValueComponent,\n} from '../types/component-types';\n\n/**\n * UI 组件适配器接口\n */\nexport interface PaginationUIComponents {\n Button: ButtonComponent;\n Select: SelectComponent;\n SelectTrigger: SelectTriggerComponent;\n SelectContent: SelectContentComponent;\n SelectItem: SelectItemComponent;\n SelectValue: SelectValueComponent;\n}\n\nexport interface TablePaginationProps {\n currentPage: number;\n pageSize: number;\n total: number;\n onPageChange: (page: number) => void;\n onPageSizeChange?: (pageSize: number) => void;\n pageSizeOptions?: number[];\n showPageSizeSelector?: boolean;\n showTotal?: boolean;\n searchActive?: boolean;\n\n // UI 组件注入\n components?: PaginationUIComponents;\n}\n\n/**\n * 表格分页组件\n * 支持页码切换和每页条数选择\n */\nexport function TablePagination({\n currentPage,\n pageSize,\n total,\n onPageChange,\n onPageSizeChange,\n pageSizeOptions = [10, 20, 50],\n showPageSizeSelector = true,\n showTotal = true,\n searchActive = false,\n components,\n}: TablePaginationProps) {\n if (!components) {\n return (\n <div className=\"p-4 text-center text-destructive\">\n 错误:请通过 components prop 注入 UI 组件\n </div>\n );\n }\n\n const {\n Button,\n Select,\n SelectTrigger,\n SelectContent,\n SelectItem,\n SelectValue,\n } = components;\n\n const totalPages = Math.ceil(total / pageSize);\n const safeTotalPages = Math.max(totalPages, 1);\n const startItem = currentPage * pageSize + 1;\n const endItem = Math.min((currentPage + 1) * pageSize, total);\n const availablePageSizeOptions = Array.from(\n new Set([...pageSizeOptions, pageSize])\n ).sort((a, b) => a - b);\n const canChangePageSize = showPageSizeSelector && Boolean(onPageSizeChange);\n\n // 如果没有数据,不显示分页\n if (total === 0) return null;\n\n return (\n <div className=\"flex w-full items-center justify-between\">\n {showTotal && (\n <div className=\"text-sm text-muted-foreground\">\n {searchActive\n ? `找到 ${total} 条匹配记录`\n : total > 0\n ? `显示 ${startItem} - ${endItem} 条,共 ${total} 条记录`\n : '暂无数据'}\n </div>\n )}\n <div className=\"flex items-center space-x-2\">\n {canChangePageSize && (\n <div className=\"mr-2 flex items-center gap-2\">\n <span className=\"text-sm text-muted-foreground\">每页</span>\n <Select\n value={String(pageSize)}\n onValueChange={(value: string) => {\n const nextPageSize = Number(value);\n if (\n Number.isNaN(nextPageSize) ||\n nextPageSize === pageSize ||\n !onPageSizeChange\n ) {\n return;\n }\n onPageSizeChange(nextPageSize);\n }}\n >\n <SelectTrigger className=\"h-8 w-[90px]\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {availablePageSizeOptions.map((option) => (\n <SelectItem key={option} value={String(option)}>\n {option}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n <span className=\"text-sm text-muted-foreground\">条</span>\n </div>\n )}\n <div className=\"mr-4 text-sm text-muted-foreground\">\n 第 {currentPage + 1} 页,共 {safeTotalPages} 页\n </div>\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => onPageChange(currentPage - 1)}\n disabled={currentPage === 0 || safeTotalPages <= 1}\n >\n <ChevronLeft className=\"h-4 w-4\" />\n 上一页\n </Button>\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => onPageChange(currentPage + 1)}\n disabled={currentPage >= safeTotalPages - 1 || safeTotalPages <= 1}\n >\n 下一页\n <ChevronRight className=\"h-4 w-4\" />\n </Button>\n </div>\n </div>\n );\n}\n"],"names":["cn","inputs","twMerge","clsx","REACT_ELEMENT_TYPE","REACT_FRAGMENT_TYPE","jsxProd","type","config","maybeKey","key","propName","reactJsxRuntime_production","getComponentNameFromType","REACT_CLIENT_REFERENCE","REACT_PROFILER_TYPE","REACT_STRICT_MODE_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_ACTIVITY_TYPE","REACT_PORTAL_TYPE","REACT_CONTEXT_TYPE","REACT_CONSUMER_TYPE","REACT_FORWARD_REF_TYPE","innerType","REACT_MEMO_TYPE","REACT_LAZY_TYPE","testStringCoercion","value","checkKeyStringCoercion","JSCompiler_inline_result","JSCompiler_temp_const","JSCompiler_inline_result$jscomp$0","getTaskName","name","getOwner","dispatcher","ReactSharedInternals","UnknownOwner","hasValidKey","hasOwnProperty","getter","defineKeyPropWarningGetter","props","displayName","warnAboutAccessingKey","specialPropKeyWarningShown","elementRefGetterWithDeprecationWarning","componentName","didWarnAboutElementRef","ReactElement","owner","debugStack","debugTask","refProp","jsxDEVImpl","isStaticChildren","children","isArrayImpl","validateChildKeys","keys","k","didWarnAboutKeySpread","node","isValidElement","object","React","require$$0","createTask","callStackForError","unknownOwnerDebugStack","unknownOwnerDebugTask","reactJsxRuntime_development","trackActualOwner","jsxRuntimeModule","require$$1","DataTable","data","loading","columns","rowKey","emptyText","searchActiveEmptyText","header","pagination","rowClassName","onRow","actions","components","renderCard","renderTable","renderActions","jsxs","jsx","Card","CardContent","CardFooter","Table","TableBody","TableCell","TableHead","TableHeader","TableRow","Button","DropdownMenu","DropdownMenuTrigger","DropdownMenuContent","DropdownMenuItem","DropdownMenuSeparator","Skeleton","TableHeaderComponent","TablePaginationComponent","getRowKey","record","index","keyVal","isSearchActive","hasActions","_a","actionMode","_b","isSeparatorItem","item","defaultRenderActions","MoreVertical","itemIndex","renderTableHeader","column","renderTableBody","_","rowProps","className","content","defaultRenderCard","defaultRenderTable","tableHeader","tableBody","DeleteConfirmDialog","open","onOpenChange","title","description","onConfirm","confirmText","cancelText","confirmButtonVariant","verification","loadingIcon","inputValue","setInputValue","useState","useEffect","Dialog","DialogContent","DialogHeader","DialogFooter","DialogTitle","DialogDescription","Input","Label","isConfirmDisabled","handleConfirm","e","searchPlaceholder","searchValue","onSearchChange","onSearch","showSearch","action","actionLabel","onActionClick","handleKeyPress","Plus","Search","TablePagination","currentPage","pageSize","total","onPageChange","onPageSizeChange","pageSizeOptions","showPageSizeSelector","showTotal","searchActive","Select","SelectTrigger","SelectContent","SelectItem","SelectValue","totalPages","safeTotalPages","startItem","endItem","availablePageSizeOptions","a","b","canChangePageSize","nextPageSize","option","ChevronLeft","ChevronRight"],"mappings":"oLAGO,SAASA,MAAMC,EAAsB,CAC1C,OAAOC,GAAAA,QAAQC,QAAKF,CAAM,CAAC,CAC7B;;;;;;;;4CCMA,IAAIG,EAAqB,OAAO,IAAI,4BAA4B,EAC9DC,EAAsB,OAAO,IAAI,gBAAgB,EACnD,SAASC,EAAQC,EAAMC,EAAQC,EAAU,CACvC,IAAIC,EAAM,KAGV,GAFWD,IAAX,SAAwBC,EAAM,GAAKD,GACxBD,EAAO,MAAlB,SAA0BE,EAAM,GAAKF,EAAO,KACxC,QAASA,EAAQ,CACnBC,EAAW,CAAA,EACX,QAASE,KAAYH,EACTG,IAAV,QAAuBF,EAASE,CAAQ,EAAIH,EAAOG,CAAQ,EACjE,MAASF,EAAWD,EAClB,OAAAA,EAASC,EAAS,IACX,CACL,SAAUL,EACV,KAAMG,EACN,IAAKG,EACL,IAAgBF,IAAX,OAAoBA,EAAS,KAClC,MAAOC,EAEX,CACA,OAAAG,EAAA,SAAmBP,EACnBO,EAAA,IAAcN,EACdM,EAAA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CAAK,UAAU,gCAAgC,SAAA,GAAA,CAAC,CAAA,EACnD,EAEFD,EAAAA,KAAC,MAAA,CAAI,UAAU,qCAAqC,SAAA,CAAA,KAC/CmF,EAAc,EAAE,QAAMe,EAAe,IAAA,EAC1C,EACAlG,EAAAA,KAACW,EAAA,CACC,QAAQ,UACR,KAAK,KACL,QAAS,IAAM2E,EAAaH,EAAc,CAAC,EAC3C,SAAUA,IAAgB,GAAKe,GAAkB,EAEjD,SAAA,CAAAjG,EAAAA,IAAC0G,EAAAA,YAAA,CAAY,UAAU,SAAA,CAAU,EAAE,KAAA,CAAA,CAAA,EAGrC3G,EAAAA,KAACW,EAAA,CACC,QAAQ,UACR,KAAK,KACL,QAAS,IAAM2E,EAAaH,EAAc,CAAC,EAC3C,SAAUA,GAAee,EAAiB,GAAKA,GAAkB,EAClE,SAAA,CAAA,MAECjG,EAAAA,IAAC2G,EAAAA,aAAA,CAAa,UAAU,SAAA,CAAU,CAAA,CAAA,CAAA,CACpC,CAAA,CACF,CAAA,EACF,CAEJ","x_google_ignoreList":[1,2,3]}
1
+ {"version":3,"file":"index.c.js","sources":["../src/lib/utils.ts","../node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react-jsx-runtime.production.js","../node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react-jsx-runtime.development.js","../node_modules/.pnpm/react@19.2.4/node_modules/react/jsx-runtime.js","../src/components/DataTable.tsx","../src/components/DeleteConfirmDialog.tsx","../src/components/TableHeader.tsx","../src/components/TablePagination.tsx","../src/components/ThemeSwitcher.tsx","../src/components/ThemeSwitcherContent.tsx"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n maybeKey,\n getOwner(),\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import { MoreVertical } from 'lucide-react';\nimport { ReactNode } from 'react';\nimport type { HTMLAttributes, ButtonHTMLAttributes } from 'react';\n\nimport type {\n UIComponent,\n ButtonComponent,\n CardComponent,\n TableComponent,\n TableRowComponent,\n TableCellComponent,\n} from '../types/component-types';\n\nimport type { TableHeaderProps } from './TableHeader';\nimport type { TablePaginationProps } from './TablePagination';\n\ntype ColumnKey<T> = Extract<keyof T, string>;\n\ntype ActionMenuItem<T> = {\n label: ReactNode;\n icon?: ReactNode;\n onClick: (record: T, index: number) => void;\n className?: string;\n separator?: never;\n};\n\ntype ActionSeparatorItem = {\n separator: true;\n className?: string;\n label?: never;\n icon?: never;\n onClick?: never;\n};\n\ntype ActionItem<T> = ActionMenuItem<T> | ActionSeparatorItem;\n\nexport interface Column<T = unknown> {\n key: ColumnKey<T>;\n title: ReactNode;\n render?: (value: T[ColumnKey<T>], record: T, index: number) => ReactNode;\n width?: string;\n align?: 'left' | 'center' | 'right';\n}\n\n/**\n * UI 组件适配器接口\n * 业务项目应该传入自己项目中的 shadcn/ui 组件\n */\nexport interface UIComponents {\n Card: CardComponent;\n CardContent: UIComponent<HTMLAttributes<HTMLDivElement>>;\n CardFooter: UIComponent<HTMLAttributes<HTMLDivElement>>;\n Table: TableComponent;\n TableBody: UIComponent<HTMLAttributes<HTMLTableSectionElement>>;\n TableCell: TableCellComponent;\n TableHead: TableCellComponent;\n TableHeader: UIComponent<HTMLAttributes<HTMLTableSectionElement>>;\n TableRow: TableRowComponent;\n Button: ButtonComponent;\n DropdownMenu: UIComponent<HTMLAttributes<HTMLDivElement>>;\n DropdownMenuTrigger: ButtonComponent;\n DropdownMenuContent: UIComponent<\n HTMLAttributes<HTMLDivElement> & { align?: 'start' | 'end' | 'center' }\n >;\n DropdownMenuItem: UIComponent<\n ButtonHTMLAttributes<HTMLDivElement> & {\n onClick?: (e: React.MouseEvent) => void;\n }\n >;\n DropdownMenuSeparator: UIComponent;\n Skeleton: UIComponent<HTMLAttributes<HTMLDivElement>>;\n TableHeaderComponent: React.ComponentType<TableHeaderProps>;\n TablePaginationComponent: React.ComponentType<TablePaginationProps>;\n}\n\nexport interface DataTableProps<T = unknown> {\n // 数据相关\n data: T[];\n loading?: boolean;\n columns: Column<T>[];\n rowKey: keyof T | ((record: T) => string);\n\n // 空状态\n emptyText?: string;\n searchActiveEmptyText?: string;\n\n // 头部配置\n header?: TableHeaderProps;\n\n // 分页配置\n pagination?: TablePaginationProps & {\n show?: boolean;\n };\n\n // 表格行样式\n rowClassName?: (record: T, index: number) => string;\n onRow?: (\n record: T,\n index: number\n ) => {\n onClick?: () => void;\n onDoubleClick?: () => void;\n };\n\n // 操作列\n actions?: {\n title?: string;\n mode?: 'expanded' | 'collapsed';\n render?: (record: T, index: number) => ReactNode;\n items?: ActionItem<T>[];\n };\n\n // UI 组件注入(可选)\n components?: UIComponents;\n\n // 自定义渲染函数(更灵活)\n renderCard?: (content: ReactNode) => ReactNode;\n renderTable?: (header: ReactNode, body: ReactNode) => ReactNode;\n renderActions?: (record: T, index: number) => ReactNode;\n}\n\n/**\n * 默认的 DataTable 实现\n * 需要通过 components prop 注入 UI 组件\n */\nexport function DataTable<T extends Record<string, any>>({\n data,\n loading = false,\n columns,\n rowKey,\n emptyText = '暂无数据',\n searchActiveEmptyText = '未找到匹配的记录',\n header,\n pagination,\n rowClassName,\n onRow,\n actions,\n components,\n renderCard,\n renderTable,\n renderActions,\n}: DataTableProps<T>) {\n if (!components) {\n return (\n <div className=\"p-4 text-center text-destructive\">\n 错误:请通过 components prop 注入 UI 组件\n <br />\n <code className=\"text-sm\">\n {'import { Card, Table, Button, ... } from \"@/components/ui\"'}\n </code>\n </div>\n );\n }\n\n const {\n Card,\n CardContent,\n CardFooter,\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n Button,\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n Skeleton,\n TableHeaderComponent,\n TablePaginationComponent,\n } = components;\n\n // 获取行的唯一标识\n const getRowKey = (record: T, index: number): string => {\n if (typeof rowKey === 'function') {\n return rowKey(record);\n }\n const keyVal = record[rowKey];\n return keyVal !== undefined && keyVal !== null\n ? String(keyVal)\n : `row-${index}`;\n };\n\n // 检查是否有搜索活动\n const isSearchActive = Boolean(\n header?.searchValue && header.searchValue.trim().length > 0\n );\n const hasActions = Boolean(actions?.render || actions?.items?.length);\n const actionMode: 'expanded' | 'collapsed' =\n actions?.mode ?? (actions?.items?.length ? 'collapsed' : 'expanded');\n const isSeparatorItem = (item: ActionItem<T>): item is ActionSeparatorItem =>\n item.separator === true;\n\n // 渲染操作列\n const defaultRenderActions = (record: T, index: number) => {\n if (!actions || !hasActions) return null;\n\n // 折叠模式:使用 DropdownMenu\n if (\n actionMode === 'collapsed' &&\n actions.items &&\n actions.items.length > 0\n ) {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n variant=\"ghost\"\n className=\"h-8 w-8 p-0\"\n aria-label=\"打开行操作菜单\"\n >\n <MoreVertical className=\"h-4 w-4\" />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\">\n {actions.items.map((item, itemIndex) =>\n isSeparatorItem(item) ? (\n <DropdownMenuSeparator key={`separator-${itemIndex}`} />\n ) : (\n <DropdownMenuItem\n key={`action-${itemIndex}`}\n onClick={() => item.onClick(record, index)}\n className={item.className}\n >\n {item.icon && (\n <span className=\"mr-2 h-4 w-4\">{item.icon}</span>\n )}\n {item.label}\n </DropdownMenuItem>\n )\n )}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n }\n\n // 展开模式:使用自定义 render\n return actions.render ? actions.render(record, index) : null;\n };\n\n // 渲染表头\n const renderTableHeader = () => {\n return (\n <TableHeader>\n <TableRow className=\"bg-muted/50 hover:bg-muted/50\">\n {columns.map((column) => (\n <TableHead\n key={String(column.key)}\n className={`font-semibold text-foreground ${\n column.align === 'center'\n ? 'text-center'\n : column.align === 'right'\n ? 'text-right'\n : 'text-left'\n }`}\n style={{ width: column.width }}\n >\n {column.title}\n </TableHead>\n ))}\n {hasActions && (\n <TableHead className=\"text-right font-semibold text-foreground\">\n {actions?.title || '操作'}\n </TableHead>\n )}\n </TableRow>\n </TableHeader>\n );\n };\n\n // 渲染表体\n const renderTableBody = () => {\n // Loading 状态\n if (loading) {\n return (\n <TableBody>\n {Array.from({ length: 5 }).map((_, index) => (\n <TableRow key={index}>\n {columns.map((column) => (\n <TableCell\n key={String(column.key)}\n style={{ width: column.width }}\n className={\n column.align === 'center'\n ? 'text-center'\n : column.align === 'right'\n ? 'text-right'\n : ''\n }\n >\n <Skeleton className=\"h-4 w-full\" />\n </TableCell>\n ))}\n {hasActions && (\n <TableCell>\n <Skeleton className=\"ml-auto h-4 w-8\" />\n </TableCell>\n )}\n </TableRow>\n ))}\n </TableBody>\n );\n }\n\n // 空数据状态\n if (data.length === 0) {\n return (\n <TableBody>\n <TableRow>\n <TableCell\n colSpan={columns.length + (hasActions ? 1 : 0)}\n className=\"py-8 text-center text-muted-foreground\"\n >\n {isSearchActive ? searchActiveEmptyText : emptyText}\n </TableCell>\n </TableRow>\n </TableBody>\n );\n }\n\n // 数据行\n return (\n <TableBody>\n {data.map((record, index) => {\n const key = getRowKey(record, index);\n const rowProps = onRow?.(record, index);\n const className = rowClassName?.(record, index);\n\n return (\n <TableRow\n key={key}\n className={`${className || ''} hover:bg-muted/50`}\n {...rowProps}\n >\n {columns.map((column) => {\n const value = record[column.key as keyof T];\n const content = column.render\n ? column.render(value as T[ColumnKey<T>], record, index)\n : value;\n\n return (\n <TableCell\n key={String(column.key)}\n className={\n column.align === 'center'\n ? 'text-center'\n : column.align === 'right'\n ? 'text-right'\n : ''\n }\n >\n {content}\n </TableCell>\n );\n })}\n {hasActions && (\n <TableCell className=\"text-right\">\n {renderActions\n ? renderActions(record, index)\n : defaultRenderActions(record, index)}\n </TableCell>\n )}\n </TableRow>\n );\n })}\n </TableBody>\n );\n };\n\n // 默认的卡片渲染\n const defaultRenderCard = (content: ReactNode) => (\n <Card>\n {header && (\n <div className=\"p-6 pb-0\">\n <TableHeaderComponent {...header} />\n </div>\n )}\n <CardContent className=\"p-0\">{content}</CardContent>\n {pagination?.show !== false && pagination && (\n <CardFooter className=\"border-t py-4\">\n <TablePaginationComponent\n currentPage={pagination.currentPage}\n pageSize={pagination.pageSize}\n total={pagination.total}\n onPageChange={pagination.onPageChange}\n onPageSizeChange={pagination.onPageSizeChange}\n pageSizeOptions={pagination.pageSizeOptions}\n showPageSizeSelector={pagination.showPageSizeSelector}\n showTotal={pagination.showTotal}\n searchActive={isSearchActive}\n />\n </CardFooter>\n )}\n </Card>\n );\n\n // 默认的表格渲染\n const defaultRenderTable = (tableHeader: ReactNode, tableBody: ReactNode) => (\n <Table>\n {tableHeader}\n {tableBody}\n </Table>\n );\n\n return renderCard\n ? renderCard(\n renderTable\n ? renderTable(renderTableHeader(), renderTableBody())\n : defaultRenderTable(renderTableHeader(), renderTableBody())\n )\n : defaultRenderCard(\n renderTable\n ? renderTable(renderTableHeader(), renderTableBody())\n : defaultRenderTable(renderTableHeader(), renderTableBody())\n );\n}\n","import { useState, useEffect } from 'react';\n\nimport type {\n ButtonComponent,\n InputComponent,\n LabelComponent,\n DialogComponent,\n DialogContentComponent,\n DialogHeaderComponent,\n DialogFooterComponent,\n DialogTitleComponent,\n DialogDescriptionComponent,\n} from '../types/component-types';\n\n/**\n * UI 组件适配器接口\n */\nexport interface DialogUIComponents {\n Dialog: DialogComponent;\n DialogContent: DialogContentComponent;\n DialogHeader: DialogHeaderComponent;\n DialogFooter: DialogFooterComponent;\n DialogTitle: DialogTitleComponent;\n DialogDescription: DialogDescriptionComponent;\n Button: ButtonComponent;\n Input: InputComponent;\n Label: LabelComponent;\n}\n\nexport interface DeleteConfirmDialogProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n title: React.ReactNode;\n description: React.ReactNode;\n onConfirm: () => void;\n loading?: boolean;\n confirmText?: string;\n cancelText?: string;\n confirmButtonVariant?:\n | 'default'\n | 'destructive'\n | 'outline'\n | 'secondary'\n | 'ghost'\n | 'link';\n verification?: {\n targetValue: string;\n label?: string;\n placeholder?: string;\n };\n\n // UI 组件注入\n components?: DialogUIComponents;\n\n // 自定义加载图标(可选)\n loadingIcon?: React.ReactNode;\n}\n\n/**\n * 删除确认对话框\n * 需要通过 components prop 注入 UI 组件\n */\nexport function DeleteConfirmDialog({\n open,\n onOpenChange,\n title,\n description,\n onConfirm,\n loading = false,\n confirmText = '确认删除',\n cancelText = '取消',\n confirmButtonVariant = 'destructive',\n verification,\n components,\n loadingIcon,\n}: DeleteConfirmDialogProps) {\n const [inputValue, setInputValue] = useState('');\n\n // Reset input when dialog opens/closes or target value changes\n useEffect(() => {\n if (open) {\n setInputValue('');\n }\n }, [open, verification?.targetValue]);\n\n if (!components) {\n return (\n <div className=\"p-4 text-center text-destructive\">\n 错误:请通过 components prop 注入 UI 组件\n </div>\n );\n }\n\n const {\n Dialog,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n Button,\n Input,\n Label,\n } = components;\n\n const isConfirmDisabled = verification\n ? inputValue !== verification.targetValue\n : false;\n\n const handleConfirm = () => {\n if (isConfirmDisabled) return;\n onConfirm();\n };\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent>\n <DialogHeader>\n <DialogTitle asChild>\n <div className=\"flex items-center gap-2\">{title}</div>\n </DialogTitle>\n <DialogDescription asChild>\n <div>{description}</div>\n </DialogDescription>\n </DialogHeader>\n\n {verification && (\n <div className=\"space-y-4 py-2\">\n <div className=\"space-y-2\">\n <Label htmlFor=\"confirm-input\">\n {verification.label || '请输入以确认'}\n </Label>\n <Input\n id=\"confirm-input\"\n value={inputValue}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n setInputValue(e.target.value)\n }\n placeholder={verification.placeholder}\n disabled={loading}\n />\n </div>\n </div>\n )}\n\n <DialogFooter>\n <Button\n variant=\"outline\"\n onClick={() => onOpenChange(false)}\n disabled={loading}\n >\n {cancelText}\n </Button>\n <Button\n variant={confirmButtonVariant}\n onClick={handleConfirm}\n disabled={isConfirmDisabled || loading}\n >\n {loading && (\n <span className=\"mr-2\">\n {loadingIcon || (\n <svg\n className=\"h-4 w-4 animate-spin\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n />\n </svg>\n )}\n </span>\n )}\n {confirmText}\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n}\n","import { Plus, Search } from 'lucide-react';\nimport { ReactNode } from 'react';\n\nimport type { InputComponent, ButtonComponent } from '../types/component-types';\n\n/**\n * UI 组件适配器接口\n */\nexport interface HeaderUIComponents {\n Input: InputComponent;\n Button: ButtonComponent;\n}\n\nexport interface TableHeaderProps {\n title: ReactNode;\n searchPlaceholder?: string;\n searchValue?: string;\n onSearchChange?: (value: string) => void;\n onSearch?: () => void;\n showSearch?: boolean;\n action?: ReactNode;\n actionLabel?: string;\n onActionClick?: () => void;\n loading?: boolean;\n\n // UI 组件注入\n components?: HeaderUIComponents;\n}\n\n/**\n * 表格头部组件\n * 支持搜索框和操作按钮\n */\nexport function TableHeader({\n title,\n searchPlaceholder = '搜索...',\n searchValue = '',\n onSearchChange,\n onSearch,\n showSearch = true,\n action,\n actionLabel,\n onActionClick,\n loading = false,\n components,\n}: TableHeaderProps) {\n if (!components) {\n return (\n <div className=\"p-4 text-center text-destructive\">\n 错误:请通过 components prop 注入 UI 组件\n </div>\n );\n }\n\n const { Input, Button } = components;\n\n const handleKeyPress = (e: React.KeyboardEvent) => {\n if (e.key === 'Enter' && onSearch) {\n onSearch();\n }\n };\n\n return (\n <div className=\"flex flex-col gap-4 p-1\">\n <div className=\"flex items-center justify-between\">\n <div className=\"text-lg font-semibold leading-none tracking-tight\">\n {title}\n </div>\n <div className=\"flex items-center gap-2\">\n {action && <div className=\"flex items-center gap-2\">{action}</div>}\n {!action && actionLabel && onActionClick && (\n <Button onClick={onActionClick} disabled={loading} size=\"sm\">\n <Plus className=\"mr-2 h-4 w-4\" />\n {actionLabel}\n </Button>\n )}\n </div>\n </div>\n {showSearch && (\n <div className=\"flex items-center gap-2\">\n <div className=\"relative max-w-sm flex-1\">\n <Search className=\"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground\" />\n <Input\n placeholder={searchPlaceholder}\n value={searchValue}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n onSearchChange?.(e.target.value)\n }\n onKeyPress={handleKeyPress}\n className=\"h-9 pl-8\"\n disabled={loading}\n />\n </div>\n {onSearch && (\n <Button\n onClick={onSearch}\n disabled={loading}\n variant=\"secondary\"\n size=\"sm\"\n >\n 搜索\n </Button>\n )}\n </div>\n )}\n </div>\n );\n}\n","import { ChevronLeft, ChevronRight } from 'lucide-react';\n\nimport type {\n ButtonComponent,\n SelectComponent,\n SelectTriggerComponent,\n SelectContentComponent,\n SelectItemComponent,\n SelectValueComponent,\n} from '../types/component-types';\n\n/**\n * UI 组件适配器接口\n */\nexport interface PaginationUIComponents {\n Button: ButtonComponent;\n Select: SelectComponent;\n SelectTrigger: SelectTriggerComponent;\n SelectContent: SelectContentComponent;\n SelectItem: SelectItemComponent;\n SelectValue: SelectValueComponent;\n}\n\nexport interface TablePaginationProps {\n currentPage: number;\n pageSize: number;\n total: number;\n onPageChange: (page: number) => void;\n onPageSizeChange?: (pageSize: number) => void;\n pageSizeOptions?: number[];\n showPageSizeSelector?: boolean;\n showTotal?: boolean;\n searchActive?: boolean;\n\n // UI 组件注入\n components?: PaginationUIComponents;\n}\n\n/**\n * 表格分页组件\n * 支持页码切换和每页条数选择\n */\nexport function TablePagination({\n currentPage,\n pageSize,\n total,\n onPageChange,\n onPageSizeChange,\n pageSizeOptions = [10, 20, 50],\n showPageSizeSelector = true,\n showTotal = true,\n searchActive = false,\n components,\n}: TablePaginationProps) {\n if (!components) {\n return (\n <div className=\"p-4 text-center text-destructive\">\n 错误:请通过 components prop 注入 UI 组件\n </div>\n );\n }\n\n const {\n Button,\n Select,\n SelectTrigger,\n SelectContent,\n SelectItem,\n SelectValue,\n } = components;\n\n const totalPages = Math.ceil(total / pageSize);\n const safeTotalPages = Math.max(totalPages, 1);\n const startItem = currentPage * pageSize + 1;\n const endItem = Math.min((currentPage + 1) * pageSize, total);\n const availablePageSizeOptions = Array.from(\n new Set([...pageSizeOptions, pageSize])\n ).sort((a, b) => a - b);\n const canChangePageSize = showPageSizeSelector && Boolean(onPageSizeChange);\n\n // 如果没有数据,不显示分页\n if (total === 0) return null;\n\n return (\n <div className=\"flex w-full items-center justify-between\">\n {showTotal && (\n <div className=\"text-sm text-muted-foreground\">\n {searchActive\n ? `找到 ${total} 条匹配记录`\n : total > 0\n ? `显示 ${startItem} - ${endItem} 条,共 ${total} 条记录`\n : '暂无数据'}\n </div>\n )}\n <div className=\"flex items-center space-x-2\">\n {canChangePageSize && (\n <div className=\"mr-2 flex items-center gap-2\">\n <span className=\"text-sm text-muted-foreground\">每页</span>\n <Select\n value={String(pageSize)}\n onValueChange={(value: string) => {\n const nextPageSize = Number(value);\n if (\n Number.isNaN(nextPageSize) ||\n nextPageSize === pageSize ||\n !onPageSizeChange\n ) {\n return;\n }\n onPageSizeChange(nextPageSize);\n }}\n >\n <SelectTrigger className=\"h-8 w-[90px]\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {availablePageSizeOptions.map((option) => (\n <SelectItem key={option} value={String(option)}>\n {option}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n <span className=\"text-sm text-muted-foreground\">条</span>\n </div>\n )}\n <div className=\"mr-4 text-sm text-muted-foreground\">\n 第 {currentPage + 1} 页,共 {safeTotalPages} 页\n </div>\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => onPageChange(currentPage - 1)}\n disabled={currentPage === 0 || safeTotalPages <= 1}\n >\n <ChevronLeft className=\"h-4 w-4\" />\n 上一页\n </Button>\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => onPageChange(currentPage + 1)}\n disabled={currentPage >= safeTotalPages - 1 || safeTotalPages <= 1}\n >\n 下一页\n <ChevronRight className=\"h-4 w-4\" />\n </Button>\n </div>\n </div>\n );\n}\n","import { useState, useEffect } from 'react';\n\nimport type {\n ButtonComponent,\n DropdownMenuComponent,\n DropdownMenuTriggerComponent,\n DropdownMenuContentComponent,\n DropdownMenuRadioGroupComponent,\n DropdownMenuRadioItemComponent,\n} from '../types/component-types';\n\n/**\n * 主题选项\n */\nexport interface ThemeOption {\n value: string;\n label: string;\n icon: React.ReactNode;\n}\n\n/**\n * UI 组件适配器接口\n */\nexport interface ThemeSwitcherUIComponents {\n DropdownMenu: DropdownMenuComponent;\n DropdownMenuTrigger: DropdownMenuTriggerComponent;\n DropdownMenuContent: DropdownMenuContentComponent;\n DropdownMenuRadioGroup: DropdownMenuRadioGroupComponent;\n DropdownMenuRadioItem: DropdownMenuRadioItemComponent;\n Button: ButtonComponent;\n}\n\nexport interface ThemeSwitcherProps {\n value: string;\n onValueChange: (value: string) => void;\n themes?: ThemeOption[];\n triggerVariant?:\n | 'default'\n | 'destructive'\n | 'outline'\n | 'secondary'\n | 'ghost'\n | 'link';\n triggerSize?: 'default' | 'sm' | 'lg' | 'icon';\n triggerClassName?: string;\n iconSize?: number;\n showCurrentIcon?: boolean;\n enableSSRHandling?: boolean;\n triggerContent?: React.ReactNode;\n components?: ThemeSwitcherUIComponents;\n // 自定义主题图标(可选)\n themeIcons?: Partial<Record<string, React.ReactNode>>;\n}\n\n/**\n * 默认主题配置\n */\nconst defaultThemes: ThemeOption[] = [\n {\n value: 'light',\n label: '浅色',\n icon: (\n <svg\n className=\"h-4 w-4\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <circle className=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" strokeWidth=\"2\" />\n <path\n className=\"opacity-75\"\n d=\"M12 2v2m0 16v2M4.93 4.93l1.41 1.41m11.32 11.32l1.41 1.41M2 12h2m16 0h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n />\n </svg>\n ),\n },\n {\n value: 'dark',\n label: '深色',\n icon: (\n <svg\n className=\"h-4 w-4\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n d=\"M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n ),\n },\n {\n value: 'system',\n label: '跟随系统',\n icon: (\n <svg\n className=\"h-4 w-4\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <rect\n x=\"2\"\n y=\"3\"\n width=\"20\"\n height=\"14\"\n rx=\"2\"\n ry=\"2\"\n strokeWidth=\"2\"\n />\n <path d=\"M8 21h8m-4-4v4\" strokeWidth=\"2\" strokeLinecap=\"round\" />\n </svg>\n ),\n },\n];\n\n/**\n * 主题切换组件\n * 需要通过 components prop 注入 UI 组件\n */\nexport function ThemeSwitcher({\n value,\n onValueChange,\n themes = defaultThemes,\n triggerVariant = 'ghost',\n triggerSize = 'icon',\n triggerClassName,\n iconSize = 16,\n showCurrentIcon = true,\n enableSSRHandling = true,\n triggerContent,\n components,\n themeIcons,\n}: ThemeSwitcherProps) {\n const [mounted, setMounted] = useState(false);\n\n useEffect(() => {\n setMounted(true);\n }, []);\n\n if (enableSSRHandling && !mounted) {\n return null;\n }\n\n if (!components) {\n return (\n <div className=\"p-4 text-center text-destructive\">\n 错误:请通过 components prop 注入 UI 组件\n </div>\n );\n }\n\n const {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n Button,\n } = components;\n\n /**\n * 获取主题图标\n * 优先使用 themeIcons 中的自定义图标,如果没有则使用主题配置中的默认图标\n */\n const getThemeIcon = (themeValue: string): React.ReactNode => {\n if (themeIcons && themeIcons[themeValue]) {\n return themeIcons[themeValue];\n }\n const theme = themes.find((t) => t.value === themeValue);\n return theme?.icon;\n };\n\n const currentIcon = getThemeIcon(value);\n\n const triggerIcon = showCurrentIcon ? currentIcon : null;\n const iconStyle = iconSize ? { width: iconSize, height: iconSize } : {};\n\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n variant={triggerVariant}\n size={triggerSize}\n className={triggerClassName}\n >\n {triggerContent || (\n <span\n style={iconStyle}\n className=\"inline-flex items-center justify-center\"\n >\n {triggerIcon}\n </span>\n )}\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent>\n <DropdownMenuRadioGroup value={value} onValueChange={onValueChange}>\n {themes.map((theme) => (\n <DropdownMenuRadioItem key={theme.value} value={theme.value}>\n <span className=\"mr-2 inline-flex items-center\">\n {getThemeIcon(theme.value)}\n </span>\n <span>{theme.label}</span>\n </DropdownMenuRadioItem>\n ))}\n </DropdownMenuRadioGroup>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n","import type {\n DropdownMenuRadioGroupComponent,\n DropdownMenuRadioItemComponent,\n} from '../types/component-types';\n\n/**\n * 主题选项\n */\nexport interface ThemeOption {\n value: string;\n label: string;\n icon: React.ReactNode;\n}\n\nexport interface ThemeSwitcherContentProps {\n value: string;\n onValueChange: (value: string) => void;\n themes?: ThemeOption[];\n iconSize?: number;\n components?: Pick<\n ThemeSwitcherContentUIComponents,\n 'DropdownMenuRadioGroup' | 'DropdownMenuRadioItem'\n >;\n // 自定义主题图标(可选)\n themeIcons?: Partial<Record<string, React.ReactNode>>;\n}\n\n/**\n * UI 组件适配器接口(轻量版)\n */\nexport interface ThemeSwitcherContentUIComponents {\n DropdownMenuRadioGroup: DropdownMenuRadioGroupComponent;\n DropdownMenuRadioItem: DropdownMenuRadioItemComponent;\n}\n\n/**\n * 默认主题配置\n */\nconst defaultThemes: ThemeOption[] = [\n {\n value: 'light',\n label: '浅色',\n icon: (\n <svg\n className=\"h-4 w-4\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <circle className=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" strokeWidth=\"2\" />\n <path\n className=\"opacity-75\"\n d=\"M12 2v2m0 16v2M4.93 4.93l1.41 1.41m11.32 11.32l1.41 1.41M2 12h2m16 0h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n />\n </svg>\n ),\n },\n {\n value: 'dark',\n label: '深色',\n icon: (\n <svg\n className=\"h-4 w-4\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n d=\"M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n ),\n },\n {\n value: 'system',\n label: '跟随系统',\n icon: (\n <svg\n className=\"h-4 w-4\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <rect\n x=\"2\"\n y=\"3\"\n width=\"20\"\n height=\"14\"\n rx=\"2\"\n ry=\"2\"\n strokeWidth=\"2\"\n />\n <path d=\"M8 21h8m-4-4v4\" strokeWidth=\"2\" strokeLinecap=\"round\" />\n </svg>\n ),\n },\n];\n\n/**\n * 主题切换内容组件(轻量版)\n * 可嵌入到其他 DropdownMenu 中使用\n */\nexport function ThemeSwitcherContent({\n value,\n onValueChange,\n themes = defaultThemes,\n iconSize = 16,\n components,\n themeIcons,\n}: ThemeSwitcherContentProps) {\n if (!components) {\n return (\n <div className=\"p-4 text-center text-destructive\">\n 错误:请通过 components prop 注入 UI 组件\n </div>\n );\n }\n\n const { DropdownMenuRadioGroup, DropdownMenuRadioItem } = components;\n\n /**\n * 获取主题图标\n * 优先使用 themeIcons 中的自定义图标,如果没有则使用主题配置中的默认图标\n */\n const getThemeIcon = (themeValue: string): React.ReactNode => {\n if (themeIcons && themeIcons[themeValue]) {\n return themeIcons[themeValue];\n }\n const theme = themes.find((t) => t.value === themeValue);\n return theme?.icon;\n };\n\n const iconStyle = iconSize ? { width: iconSize, height: iconSize } : {};\n\n return (\n <DropdownMenuRadioGroup value={value} onValueChange={onValueChange}>\n {themes.map((theme) => (\n <DropdownMenuRadioItem key={theme.value} value={theme.value}>\n <span className=\"mr-2 inline-flex items-center\" style={iconStyle}>\n {getThemeIcon(theme.value)}\n </span>\n <span>{theme.label}</span>\n </DropdownMenuRadioItem>\n ))}\n </DropdownMenuRadioGroup>\n );\n}\n"],"names":["cn","inputs","twMerge","clsx","REACT_ELEMENT_TYPE","REACT_FRAGMENT_TYPE","jsxProd","type","config","maybeKey","key","propName","reactJsxRuntime_production","getComponentNameFromType","REACT_CLIENT_REFERENCE","REACT_PROFILER_TYPE","REACT_STRICT_MODE_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_ACTIVITY_TYPE","REACT_PORTAL_TYPE","REACT_CONTEXT_TYPE","REACT_CONSUMER_TYPE","REACT_FORWARD_REF_TYPE","innerType","REACT_MEMO_TYPE","REACT_LAZY_TYPE","testStringCoercion","value","checkKeyStringCoercion","JSCompiler_inline_result","JSCompiler_temp_const","JSCompiler_inline_result$jscomp$0","getTaskName","name","getOwner","dispatcher","ReactSharedInternals","UnknownOwner","hasValidKey","hasOwnProperty","getter","defineKeyPropWarningGetter","props","displayName","warnAboutAccessingKey","specialPropKeyWarningShown","elementRefGetterWithDeprecationWarning","componentName","didWarnAboutElementRef","ReactElement","owner","debugStack","debugTask","refProp","jsxDEVImpl","isStaticChildren","children","isArrayImpl","validateChildKeys","keys","k","didWarnAboutKeySpread","node","isValidElement","object","React","require$$0","createTask","callStackForError","unknownOwnerDebugStack","unknownOwnerDebugTask","reactJsxRuntime_development","trackActualOwner","jsxRuntimeModule","require$$1","DataTable","data","loading","columns","rowKey","emptyText","searchActiveEmptyText","header","pagination","rowClassName","onRow","actions","components","renderCard","renderTable","renderActions","jsxs","jsx","Card","CardContent","CardFooter","Table","TableBody","TableCell","TableHead","TableHeader","TableRow","Button","DropdownMenu","DropdownMenuTrigger","DropdownMenuContent","DropdownMenuItem","DropdownMenuSeparator","Skeleton","TableHeaderComponent","TablePaginationComponent","getRowKey","record","index","keyVal","isSearchActive","hasActions","_a","actionMode","_b","isSeparatorItem","item","defaultRenderActions","MoreVertical","itemIndex","renderTableHeader","column","renderTableBody","_","rowProps","className","content","defaultRenderCard","defaultRenderTable","tableHeader","tableBody","DeleteConfirmDialog","open","onOpenChange","title","description","onConfirm","confirmText","cancelText","confirmButtonVariant","verification","loadingIcon","inputValue","setInputValue","useState","useEffect","Dialog","DialogContent","DialogHeader","DialogFooter","DialogTitle","DialogDescription","Input","Label","isConfirmDisabled","handleConfirm","e","searchPlaceholder","searchValue","onSearchChange","onSearch","showSearch","action","actionLabel","onActionClick","handleKeyPress","Plus","Search","TablePagination","currentPage","pageSize","total","onPageChange","onPageSizeChange","pageSizeOptions","showPageSizeSelector","showTotal","searchActive","Select","SelectTrigger","SelectContent","SelectItem","SelectValue","totalPages","safeTotalPages","startItem","endItem","availablePageSizeOptions","a","b","canChangePageSize","nextPageSize","option","ChevronLeft","ChevronRight","defaultThemes","ThemeSwitcher","onValueChange","themes","triggerVariant","triggerSize","triggerClassName","iconSize","showCurrentIcon","enableSSRHandling","triggerContent","themeIcons","mounted","setMounted","DropdownMenuRadioGroup","DropdownMenuRadioItem","getThemeIcon","themeValue","theme","t","currentIcon","triggerIcon","iconStyle","ThemeSwitcherContent"],"mappings":"mLAGO,SAASA,MAAMC,EAAsB,CAC1C,OAAOC,GAAAA,QAAQC,QAAKF,CAAM,CAAC,CAC7B;;;;;;;;4CCMA,IAAIG,EAAqB,OAAO,IAAI,4BAA4B,EAC9DC,EAAsB,OAAO,IAAI,gBAAgB,EACnD,SAASC,EAAQC,EAAMC,EAAQC,EAAU,CACvC,IAAIC,EAAM,KAGV,GAFWD,IAAX,SAAwBC,EAAM,GAAKD,GACxBD,EAAO,MAAlB,SAA0BE,EAAM,GAAKF,EAAO,KACxC,QAASA,EAAQ,CACnBC,EAAW,CAAA,EACX,QAASE,KAAYH,EACTG,IAAV,QAAuBF,EAASE,CAAQ,EAAIH,EAAOG,CAAQ,EACjE,MAASF,EAAWD,EAClB,OAAAA,EAASC,EAAS,IACX,CACL,SAAUL,EACV,KAAMG,EACN,IAAKG,EACL,IAAgBF,IAAX,OAAoBA,EAAS,KAClC,MAAOC,EAEX,CACA,OAAAG,EAAA,SAAmBP,EACnBO,EAAA,IAAcN,EACdM,EAAA,KAAeN;;;;;;;;yCCtBE,QAAQ,IAAI,WAA7B,eACG,UAAY,CACX,SAASO,EAAyBN,EAAM,CACtC,GAAYA,GAAR,KAAc,OAAO,KAC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AAA,QAEb,OAAA,CAAK,EAAE,iBAAiB,YAAY,IAAI,cAAc,OAAA,CAAQ,CAAA,CAAA,CAAA,CACjE,CAGN,EAMO,SAASmI,GAAqB,CACnC,MAAApM,EACA,cAAA+K,EACA,OAAAC,EAASH,GACT,SAAAO,EAAW,GACX,WAAAxH,EACA,WAAA4H,CACF,EAA8B,CAC5B,GAAI,CAAC5H,EACH,OACEK,EAAAA,IAAC,MAAA,CAAI,UAAU,mCAAmC,SAAA,kCAElD,EAIJ,KAAM,CAAE,uBAAA0H,EAAwB,sBAAAC,CAAA,EAA0BhI,EAMpDiI,EAAgBC,GAAwC,CAC5D,GAAIN,GAAcA,EAAWM,CAAU,EACrC,OAAON,EAAWM,CAAU,EAE9B,MAAMC,EAAQf,EAAO,KAAMgB,GAAMA,EAAE,QAAUF,CAAU,EACvD,OAAOC,GAAA,YAAAA,EAAO,IAChB,EAEMI,EAAYf,EAAW,CAAE,MAAOA,EAAU,OAAQA,CAAA,EAAa,CAAA,EAErE,OACEnH,EAAAA,IAAC0H,EAAA,CAAuB,MAAA3L,EAAc,cAAA+K,EACnC,SAAAC,EAAO,IAAKe,GACX/H,EAAAA,KAAC4H,EAAA,CAAwC,MAAOG,EAAM,MACpD,SAAA,CAAA9H,EAAAA,IAAC,OAAA,CAAK,UAAU,gCAAgC,MAAOkI,EACpD,SAAAN,EAAaE,EAAM,KAAK,CAAA,CAC3B,EACA9H,EAAAA,IAAC,OAAA,CAAM,SAAA8H,EAAM,KAAA,CAAM,CAAA,CAAA,EAJOA,EAAM,KAKlC,CACD,EACH,CAEJ","x_google_ignoreList":[1,2,3]}
package/dist/index.d.ts CHANGED
@@ -3,9 +3,13 @@ export { DataTable } from './components/DataTable';
3
3
  export { DeleteConfirmDialog } from './components/DeleteConfirmDialog';
4
4
  export { TableHeader } from './components/TableHeader';
5
5
  export { TablePagination } from './components/TablePagination';
6
+ export { ThemeSwitcher } from './components/ThemeSwitcher';
7
+ export { ThemeSwitcherContent } from './components/ThemeSwitcherContent';
6
8
  export type { Column, DataTableProps, UIComponents, } from './components/DataTable';
7
9
  export type { DeleteConfirmDialogProps, DialogUIComponents, } from './components/DeleteConfirmDialog';
8
10
  export type { TableHeaderProps, HeaderUIComponents, } from './components/TableHeader';
9
11
  export type { TablePaginationProps, PaginationUIComponents, } from './components/TablePagination';
10
- export type { UIComponent, ButtonComponent, InputComponent, CardComponent, TableComponent, DialogComponent, LabelComponent, } from './types/component-types';
12
+ export type { ThemeSwitcherProps, ThemeSwitcherUIComponents, ThemeOption, } from './components/ThemeSwitcher';
13
+ export type { ThemeSwitcherContentProps, ThemeSwitcherContentUIComponents, } from './components/ThemeSwitcherContent';
14
+ export type { UIComponent, ButtonComponent, InputComponent, CardComponent, TableComponent, TableRowComponent, TableCellComponent, SelectComponent, SelectTriggerComponent, SelectContentComponent, SelectItemComponent, SelectValueComponent, DialogComponent, DialogContentComponent, DialogHeaderComponent, DialogFooterComponent, DialogTitleComponent, DialogDescriptionComponent, LabelComponent, DropdownMenuComponent, DropdownMenuTriggerComponent, DropdownMenuContentComponent, DropdownMenuRadioGroupComponent, DropdownMenuRadioItemComponent, } from './types/component-types';
11
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAGjC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAG/D,YAAY,EACV,MAAM,EACN,cAAc,EACd,YAAY,GACb,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,kCAAkC,CAAC;AAC1C,YAAY,EACV,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,8BAA8B,CAAC;AAGtC,YAAY,EACV,WAAW,EACX,eAAe,EACf,cAAc,EACd,aAAa,EACb,cAAc,EACd,eAAe,EACf,cAAc,GACf,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAGjC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAGzE,YAAY,EACV,MAAM,EACN,cAAc,EACd,YAAY,GACb,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,kCAAkC,CAAC;AAC1C,YAAY,EACV,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,kBAAkB,EAClB,yBAAyB,EACzB,WAAW,GACZ,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,yBAAyB,EACzB,gCAAgC,GACjC,MAAM,mCAAmC,CAAC;AAG3C,YAAY,EACV,WAAW,EACX,eAAe,EACf,cAAc,EACd,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,oBAAo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