@mireljs/ui-core 3.2.3
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/LICENSE +201 -0
- package/dist/components/Accordion.d.ts +7 -0
- package/dist/components/Alert.d.ts +11 -0
- package/dist/components/Avatar.d.ts +32 -0
- package/dist/components/Badge.d.ts +10 -0
- package/dist/components/Button.d.ts +11 -0
- package/dist/components/Card.d.ts +8 -0
- package/dist/components/DataTable.d.ts +8 -0
- package/dist/components/Dialog.d.ts +22 -0
- package/dist/components/DropdownMenu.d.ts +27 -0
- package/dist/components/Form.d.ts +15 -0
- package/dist/components/Input.d.ts +5 -0
- package/dist/components/Label.d.ts +5 -0
- package/dist/components/Popover.d.ts +6 -0
- package/dist/components/ScrollArea.d.ts +5 -0
- package/dist/components/SectionHeading.d.ts +9 -0
- package/dist/components/Select.d.ts +13 -0
- package/dist/components/Separator.d.ts +4 -0
- package/dist/components/Sheet.d.ts +25 -0
- package/dist/components/Skeleton.d.ts +3 -0
- package/dist/components/Slider.d.ts +4 -0
- package/dist/components/Spinner.d.ts +7 -0
- package/dist/components/StepIndicator.d.ts +13 -0
- package/dist/components/Switch.d.ts +4 -0
- package/dist/components/Table.d.ts +10 -0
- package/dist/components/Tabs.d.ts +7 -0
- package/dist/components/Textarea.d.ts +5 -0
- package/dist/components/ThemeProvider.d.ts +13 -0
- package/dist/components/Toast.d.ts +18 -0
- package/dist/components/Toaster.d.ts +1 -0
- package/dist/components/Tooltip.d.ts +7 -0
- package/dist/components/combobox.d.ts +17 -0
- package/dist/components/use-toast.d.ts +44 -0
- package/dist/index.d.ts +33 -0
- package/dist/lib/styles.d.ts +12 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/mirel-ui-core.js +1584 -0
- package/dist/mirel-ui-core.umd.cjs +1 -0
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/tokens.d.ts +149 -0
- package/package.json +76 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(o,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react/jsx-runtime"),require("react"),require("@radix-ui/react-slot"),require("class-variance-authority"),require("clsx"),require("tailwind-merge"),require("@radix-ui/react-select"),require("@radix-ui/react-dialog"),require("@radix-ui/react-dropdown-menu"),require("lucide-react"),require("@radix-ui/react-toast"),require("@radix-ui/react-tabs"),require("@radix-ui/react-accordion"),require("@radix-ui/react-popover"),require("@radix-ui/react-label"),require("@radix-ui/react-switch"),require("@radix-ui/react-tooltip"),require("@radix-ui/react-scroll-area"),require("@radix-ui/react-separator"),require("@radix-ui/react-slider"),require("@tanstack/react-table")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","@radix-ui/react-slot","class-variance-authority","clsx","tailwind-merge","@radix-ui/react-select","@radix-ui/react-dialog","@radix-ui/react-dropdown-menu","lucide-react","@radix-ui/react-toast","@radix-ui/react-tabs","@radix-ui/react-accordion","@radix-ui/react-popover","@radix-ui/react-label","@radix-ui/react-switch","@radix-ui/react-tooltip","@radix-ui/react-scroll-area","@radix-ui/react-separator","@radix-ui/react-slider","@tanstack/react-table"],a):(o=typeof globalThis<"u"?globalThis:o||self,a(o.MirelUICore={},o.jsxRuntime,o.React,o.reactSlot,o.classVarianceAuthority,o.clsx,o.tailwindMerge,o.SelectPrimitive,o.DialogPrimitive,o.DropdownMenuPrimitive,o.lucideReact,o.ToastPrimitives,o.TabsPrimitive,o.AccordionPrimitive,o.PopoverPrimitive,o.LabelPrimitive,o.SwitchPrimitive,o.TooltipPrimitive,o.ScrollAreaPrimitive,o.SeparatorPrimitive,o.SliderPrimitive,o.reactTable))})(this,(function(o,a,w,Ct,C,Dt,Pt,_t,Mt,It,z,Lt,At,zt,jt,Ft,Et,Bt,Ot,qt,Ht,D){"use strict";function h(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const d=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,d.get?d:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const i=h(w),m=h(_t),f=h(Mt),u=h(It),v=h(Lt),N=h(At),T=h(zt),_=h(jt),ne=h(Ft),V=h(Et),P=h(Bt),S=h(Ot),ce=h(qt),M=h(Ht);function s(...e){return Pt.twMerge(Dt.clsx(e))}const fe=C.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium shadow-sm ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-gray-900 text-gray-50 hover:bg-gray-900/90 dark:bg-gray-700 dark:text-gray-50 dark:hover:bg-gray-600",destructive:"bg-red-500 text-gray-50 hover:bg-red-500/90 dark:bg-red-900 dark:text-gray-50 dark:hover:bg-red-900/90",outline:"border border-gray-200 bg-gray-50 hover:bg-gray-100 hover:text-gray-900 dark:border-gray-700 dark:bg-gray-950 dark:hover:bg-gray-800 dark:hover:text-gray-50",secondary:"bg-gray-100 text-gray-900 hover:bg-gray-100/80 dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-800/80",ghost:"hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-gray-800 dark:hover:text-gray-50",link:"text-gray-900 underline-offset-4 hover:underline dark:text-gray-50",subtle:"bg-gray-100 text-gray-900 shadow-none hover:bg-gray-200 border border-gray-200/50 dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:border-gray-700",soft:"bg-gray-100/50 text-gray-900 hover:bg-gray-100/75 dark:bg-gray-800/50 dark:text-gray-50 dark:hover:bg-gray-800/75",elevated:"bg-white text-gray-900 shadow-md hover:shadow-lg border border-gray-200/60 dark:bg-gray-950 dark:text-gray-50 dark:border-gray-700"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10",pill:"h-10 rounded-full px-6",square:"size-9 rounded-md relative [&_svg]:absolute [&_svg]:top-0 [&_svg]:right-0 [&_svg]:bottom-0 [&_svg]:left-0 [&_svg]:m-auto [&_svg]:size-4"}},defaultVariants:{variant:"default",size:"default"}}),j=i.forwardRef(({className:e,variant:t,size:r,asChild:d=!1,...l},n)=>{const p=d?Ct.Slot:"button";return a.jsx(p,{className:s(fe({variant:t,size:r,className:e})),ref:n,...l})});j.displayName="Button";const G=i.forwardRef(({className:e,type:t,...r},d)=>a.jsx("input",{type:t,className:s("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:d,...r}));G.displayName="Input";const ge=i.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:s("group rounded-2xl border border-outline/60 bg-surface shadow-md transition-shadow hover:shadow-lg",e),...t}));ge.displayName="Card";const ue=i.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:s("space-y-1.5 p-4",e),...t}));ue.displayName="CardHeader";const me=i.forwardRef(({className:e,...t},r)=>a.jsx("h3",{ref:r,className:s("text-lg font-semibold tracking-tight text-foreground",e),...t}));me.displayName="CardTitle";const pe=i.forwardRef(({className:e,...t},r)=>a.jsx("p",{ref:r,className:s("text-sm text-muted-foreground",e),...t}));pe.displayName="CardDescription";const be=i.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:s("p-4 pt-0",e),...t}));be.displayName="CardContent";const he=i.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:s("flex flex-col gap-2 border-t border-outline/40 bg-surface-subtle/60 p-4 pt-4 sm:flex-row sm:items-center sm:justify-between",e),...t}));he.displayName="CardFooter";const ve=C.cva("inline-flex items-center gap-1 rounded-full font-medium tracking-wide uppercase",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",neutral:"bg-surface-subtle text-muted-foreground ring-1 ring-inset ring-outline/60",outline:"border border-dashed border-outline/80 bg-transparent text-muted-foreground shadow-none",info:"bg-info text-info-foreground",success:"bg-success text-success-foreground",warning:"bg-warning text-warning-foreground",destructive:"bg-destructive text-destructive-foreground"},size:{default:"px-3 py-0.5 text-xs",sm:"px-2 py-0.5 text-[10px]",lg:"px-4 py-1 text-sm"}},defaultVariants:{variant:"neutral",size:"default"}}),I=i.forwardRef(({className:e,variant:t,...r},d)=>a.jsx("span",{ref:d,className:s("select-none",ve({variant:t,className:e})),...r}));I.displayName="Badge";const ye=i.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:s("space-y-2",e),...t}));ye.displayName="FormField";const we=i.forwardRef(({className:e,requiredMark:t,children:r,...d},l)=>a.jsxs("label",{ref:l,className:s("flex items-center gap-2 text-sm font-medium text-foreground",e),...d,children:[a.jsx("span",{children:r}),t??null]}));we.displayName="FormLabel";const xe=i.forwardRef(({className:e,...t},r)=>a.jsx("p",{ref:r,className:s("text-xs text-muted-foreground",e),...t}));xe.displayName="FormHelper";const Ne=i.forwardRef(({className:e,...t},r)=>a.jsx("p",{ref:r,className:s("flex items-center gap-1 text-xs text-destructive",e),...t}));Ne.displayName="FormError";const Te=({children:e="*",className:t})=>a.jsx("span",{className:s("text-destructive",t),"aria-hidden":!0,children:e});Te.displayName="FormRequiredMark";function F(e,t){return{...{backgroundColor:e==="dialog"?"hsl(var(--background))":"hsl(var(--popover))",color:e==="dialog"?"hsl(var(--foreground))":"hsl(var(--popover-foreground))"},...t}}const Se=m.Root,Vt=m.Group,ke=m.Value,U=i.forwardRef(({className:e,children:t,...r},d)=>a.jsxs(m.Trigger,{ref:d,className:s("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,a.jsx(m.Icon,{asChild:!0,children:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4 opacity-50",children:a.jsx("polyline",{points:"6 9 12 15 18 9"})})})]}));U.displayName=m.Trigger.displayName;const W=i.forwardRef(({className:e,...t},r)=>a.jsx(m.ScrollUpButton,{ref:r,className:s("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:a.jsx("polyline",{points:"18 15 12 9 6 15"})})}));W.displayName=m.ScrollUpButton.displayName;const Y=i.forwardRef(({className:e,...t},r)=>a.jsx(m.ScrollDownButton,{ref:r,className:s("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:a.jsx("polyline",{points:"6 9 12 15 18 9"})})}));Y.displayName=m.ScrollDownButton.displayName;const X=i.forwardRef(({className:e,children:t,position:r="popper",style:d,...l},n)=>a.jsx(m.Portal,{children:a.jsxs(m.Content,{ref:n,className:s("relative z-[200] max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover/100 backdrop-blur-sm text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,style:F("popover",d),...l,children:[a.jsx(W,{}),a.jsx(m.Viewport,{className:s("p-1 bg-popover/100",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),a.jsx(Y,{})]})}));X.displayName=m.Content.displayName;const Ce=i.forwardRef(({className:e,...t},r)=>a.jsx(m.Label,{ref:r,className:s("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Ce.displayName=m.Label.displayName;const E=i.forwardRef(({className:e,children:t,...r},d)=>a.jsxs(m.Item,{ref:d,className:s("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(m.ItemIndicator,{children:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:a.jsx("polyline",{points:"20 6 9 17 4 12"})})})}),a.jsx(m.ItemText,{children:t})]}));E.displayName=m.Item.displayName;const De=i.forwardRef(({className:e,...t},r)=>a.jsx(m.Separator,{ref:r,className:s("-mx-1 my-1 h-px bg-muted",e),...t}));De.displayName=m.Separator.displayName;const Gt=f.Root,Ut=f.Trigger,Pe=f.Portal,Wt=f.Close,$=i.forwardRef(({className:e,style:t,...r},d)=>a.jsx(f.Overlay,{ref:d,className:s("fixed top-0 right-0 bottom-0 left-0 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),style:{backgroundColor:"rgba(0, 0, 0, 0.8)",zIndex:110,pointerEvents:"auto",...t},...r}));$.displayName=f.Overlay.displayName;const _e=i.forwardRef(({className:e,children:t,overlayClassName:r,style:d,onPointerDownOutside:l,onInteractOutside:n,...p},g)=>a.jsxs(Pe,{children:[a.jsx($,{className:r}),a.jsxs(f.Content,{ref:g,className:s("fixed grid w-full max-w-lg gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",e),style:F("dialog",{left:"50%",top:"50%",transform:"translate(-50%, -50%)",zIndex:120,isolation:"isolate",...d}),onPointerDownOutside:c=>{const b=c.target;(b.closest("[data-radix-select-content]")||b.closest('[role="listbox"]')||b.closest("[data-radix-popper-content-wrapper]"))&&c.preventDefault(),l==null||l(c)},onInteractOutside:c=>{const b=c.target;(b.closest("[data-radix-select-content]")||b.closest('[role="listbox"]')||b.closest("[data-radix-popper-content-wrapper]"))&&c.preventDefault(),n==null||n(c)},...p,children:[t,a.jsx(f.Close,{className:"absolute right-4 top-4 inline-flex h-9 w-9 items-center justify-center rounded-full border border-border/50 bg-background text-foreground/80 shadow-sm transition-all hover:border-destructive hover:bg-destructive hover:text-white focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none","aria-label":"閉じる",children:a.jsx("svg",{width:"18",height:"18",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})})]})]}));_e.displayName=f.Content.displayName;const Me=({className:e,...t})=>a.jsx("div",{className:s("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Me.displayName="DialogHeader";const Ie=({className:e,...t})=>a.jsx("div",{className:s("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ie.displayName="DialogFooter";const Le=i.forwardRef(({className:e,...t},r)=>a.jsx(f.Title,{ref:r,className:s("text-lg font-semibold leading-none tracking-tight",e),...t}));Le.displayName=f.Title.displayName;const Ae=i.forwardRef(({className:e,...t},r)=>a.jsx(f.Description,{ref:r,className:s("text-sm text-muted-foreground",e),...t}));Ae.displayName=f.Description.displayName;const Yt=u.Root,Xt=u.Trigger,$t=u.Group,Qt=u.Portal,Zt=u.Sub,Jt=u.RadioGroup,ze=i.forwardRef(({className:e,inset:t,children:r,...d},l)=>a.jsxs(u.SubTrigger,{ref:l,className:s("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...d,children:[r,a.jsx(z.ChevronRight,{className:"ml-auto h-4 w-4"})]}));ze.displayName=u.SubTrigger.displayName;const je=i.forwardRef(({className:e,style:t,...r},d)=>a.jsx(u.SubContent,{ref:d,className:s("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),style:F("popover",t),...r}));je.displayName=u.SubContent.displayName;const Fe=i.forwardRef(({className:e,sideOffset:t=4,style:r,...d},l)=>a.jsx(u.Portal,{children:a.jsx(u.Content,{ref:l,sideOffset:t,className:s("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),style:F("popover",r),...d})}));Fe.displayName=u.Content.displayName;const Ee=i.forwardRef(({className:e,inset:t,...r},d)=>a.jsx(u.Item,{ref:d,className:s("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...r}));Ee.displayName=u.Item.displayName;const Be=i.forwardRef(({className:e,children:t,checked:r,...d},l)=>a.jsxs(u.CheckboxItem,{ref:l,className:s("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...d,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(u.ItemIndicator,{children:a.jsx(z.Check,{className:"h-4 w-4"})})}),t]}));Be.displayName=u.CheckboxItem.displayName;const Oe=i.forwardRef(({className:e,children:t,...r},d)=>a.jsxs(u.RadioItem,{ref:d,className:s("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(u.ItemIndicator,{children:a.jsx(z.Circle,{className:"h-2 w-2 fill-current"})})}),t]}));Oe.displayName=u.RadioItem.displayName;const qe=i.forwardRef(({className:e,inset:t,...r},d)=>a.jsx(u.Label,{ref:d,className:s("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));qe.displayName=u.Label.displayName;const He=i.forwardRef(({className:e,...t},r)=>a.jsx(u.Separator,{ref:r,className:s("-mx-1 my-1 h-px bg-muted",e),...t}));He.displayName=u.Separator.displayName;const Ve=({className:e,...t})=>a.jsx("span",{className:s("ml-auto text-xs tracking-widest opacity-60",e),...t});Ve.displayName="DropdownMenuShortcut";const Ge=i.forwardRef(({eyebrow:e,title:t,description:r,actions:d,className:l,...n},p)=>a.jsxs("div",{ref:p,className:s("flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between",l),...n,children:[a.jsxs("div",{className:"space-y-2",children:[e?a.jsx("span",{className:"text-xs font-semibold uppercase tracking-[0.2em] text-muted-foreground",children:e}):null,a.jsxs("div",{className:"space-y-2",children:[a.jsx("h2",{className:"text-3xl font-semibold tracking-tight text-foreground sm:text-4xl",children:t}),r?a.jsx("p",{className:"max-w-2xl text-sm text-muted-foreground sm:text-base",children:r}):null]})]}),d?a.jsx("div",{className:"flex items-center gap-3",children:d}):null]}));Ge.displayName="SectionHeading";const Kt={complete:"border-success/40 bg-success/15 text-success-foreground",current:"border-primary/40 bg-primary/10 text-primary",upcoming:"border-outline/60 bg-surface-subtle text-muted-foreground"},Rt={complete:a.jsx(I,{variant:"success",children:"完了"}),current:a.jsx(I,{variant:"info",children:"進行中"}),upcoming:a.jsx(I,{variant:"neutral",children:"準備中"})},Ue=i.forwardRef(({steps:e,className:t,...r},d)=>a.jsx("ol",{ref:d,className:s("grid grid-cols-3 gap-3 rounded-xl border border-outline/60 bg-surface-subtle p-4 shadow-sm",t),...r,children:e.map(l=>{const n=l.state??"upcoming";return a.jsxs("li",{className:s("rounded-lg border p-4 transition-colors",Kt[n]),"data-state":n,children:[a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsx("span",{className:"text-sm font-semibold tracking-wide text-foreground",children:l.title}),Rt[n]]}),l.description?a.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:l.description}):null]},l.id)})}));Ue.displayName="StepIndicator";const We=i.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:s("animate-shimmer rounded-md bg-surface-subtle/80 bg-gradient-to-r from-surface-subtle via-surface-raised/80 to-surface-subtle",e),...t}));We.displayName="Skeleton";const Ye=v.Provider,Q=i.forwardRef(({className:e,...t},r)=>a.jsx(v.Viewport,{ref:r,className:s("fixed left-4 right-4 bottom-4 z-[100] flex max-h-[calc(100vh-2rem)] flex-col gap-3 p-0 sm:left-auto sm:right-6 sm:bottom-6 sm:w-[380px]",e),...t}));Q.displayName=v.Viewport.displayName;const ea=C.cva("group pointer-events-auto relative flex w-full items-start gap-3 overflow-hidden rounded-xl border p-4 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border-gray-200 bg-white text-gray-950 dark:border-gray-800 dark:bg-gray-950 dark:text-gray-50",destructive:"destructive group border-red-500 bg-red-500 text-gray-50 dark:border-red-900 dark:bg-red-900 dark:text-gray-50",info:"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-900 dark:bg-blue-950 dark:text-blue-50",success:"border-green-200 bg-green-50 text-green-900 dark:border-green-900 dark:bg-green-950 dark:text-green-50",warning:"border-yellow-200 bg-yellow-50 text-yellow-900 dark:border-yellow-900 dark:bg-yellow-950 dark:text-yellow-50",loading:"border-gray-200 bg-gray-50 text-gray-900 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-50 shadow-md animate-pulse"}},defaultVariants:{variant:"default"}}),Z=i.forwardRef(({className:e,variant:t,...r},d)=>a.jsx(v.Root,{ref:d,className:s(ea({variant:t}),e),...r}));Z.displayName=v.Root.displayName;const Xe=i.forwardRef(({className:e,...t},r)=>a.jsx(v.Action,{ref:r,className:s("inline-flex h-9 shrink-0 items-center justify-center gap-2 rounded-full border border-outline/60 bg-transparent px-3 text-sm font-medium transition-colors hover:bg-foreground/10 focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-destructive/40 group-[.destructive]:hover:bg-destructive/20 group-[.destructive]:focus:ring-destructive group-[.info]:border-info/50 group-[.success]:border-success/50 group-[.warning]:border-warning/60",e),...t}));Xe.displayName=v.Action.displayName;const J=i.forwardRef(({className:e,...t},r)=>a.jsx(v.Close,{ref:r,className:s("shrink-0 rounded-full p-1.5 text-foreground/60 opacity-70 transition-opacity hover:opacity-100 hover:text-foreground focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2 group-[.destructive]:text-destructive-foreground group-[.destructive]:hover:text-destructive-foreground/80 group-[.info]:text-info-foreground group-[.success]:text-success-foreground group-[.warning]:text-warning-foreground",e),"toast-close":"",...t,children:a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:[a.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),a.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}));J.displayName=v.Close.displayName;const K=i.forwardRef(({className:e,...t},r)=>a.jsx(v.Title,{ref:r,className:s("flex items-center gap-2 text-sm font-semibold",e),...t}));K.displayName=v.Title.displayName;const R=i.forwardRef(({className:e,...t},r)=>a.jsx(v.Description,{ref:r,className:s("text-sm text-foreground/80",e),...t}));R.displayName=v.Description.displayName;const ta=5,aa=5e3;let ee=0;function ra(){return ee=(ee+1)%Number.MAX_VALUE,ee.toString()}const te=new Map,$e=e=>{if(te.has(e))return;const t=setTimeout(()=>{te.delete(e),L({type:"REMOVE_TOAST",toastId:e})},aa);te.set(e,t)},oa=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,ta)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?$e(r):e.toasts.forEach(d=>{$e(d.id)}),{...e,toasts:e.toasts.map(d=>d.id===r||r===void 0?{...d,open:!1}:d)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},B=[];let O={toasts:[]};function L(e){O=oa(O,e),B.forEach(t=>{t(O)})}function Qe({...e}){const t=ra(),r=l=>L({type:"UPDATE_TOAST",toast:{...l,id:t}}),d=()=>L({type:"DISMISS_TOAST",toastId:t});return L({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:l=>{l||d()}}}),{id:t,dismiss:d,update:r}}function Ze(){const[e,t]=i.useState(O);return i.useEffect(()=>(B.push(t),()=>{const r=B.indexOf(t);r>-1&&B.splice(r,1)}),[e]),{...e,toast:Qe,dismiss:r=>L({type:"DISMISS_TOAST",toastId:r})}}function sa(){const{toasts:e}=Ze();return a.jsxs(Ye,{children:[e.map(function({id:t,title:r,description:d,action:l,...n}){return a.jsxs(Z,{...n,children:[a.jsxs("div",{className:"grid gap-1 flex-1 min-w-0",children:[r&&a.jsx(K,{children:r}),d&&a.jsx(R,{children:d})]}),l,a.jsx(J,{})]},t)}),a.jsx(Q,{})]})}const da=C.cva("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",info:"border-blue-500/50 text-blue-700 dark:border-blue-500 [&>svg]:text-blue-700 dark:text-blue-400 dark:[&>svg]:text-blue-400",success:"border-green-500/50 text-green-700 dark:border-green-500 [&>svg]:text-green-700 dark:text-green-400 dark:[&>svg]:text-green-400",warning:"border-yellow-500/50 text-yellow-700 dark:border-yellow-500 [&>svg]:text-yellow-700 dark:text-yellow-400 dark:[&>svg]:text-yellow-400"}},defaultVariants:{variant:"default"}}),Je=w.forwardRef(({className:e,variant:t,...r},d)=>a.jsx("div",{ref:d,role:"alert",className:s(da({variant:t}),e),...r}));Je.displayName="Alert";const Ke=w.forwardRef(({className:e,...t},r)=>a.jsx("h5",{ref:r,className:s("mb-1 font-medium leading-none tracking-tight",e),...t}));Ke.displayName="AlertTitle";const Re=w.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:s("text-sm [&_p]:leading-relaxed",e),...t}));Re.displayName="AlertDescription";const ia=N.Root,et=i.forwardRef(({className:e,...t},r)=>a.jsx(N.List,{ref:r,className:s("inline-flex h-10 items-center justify-center rounded-md bg-surface-raised p-1 text-muted-foreground border border-outline/20",e),...t}));et.displayName=N.List.displayName;const tt=i.forwardRef(({className:e,...t},r)=>a.jsx(N.Trigger,{ref:r,className:s("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50","state-active:bg-background state-active:text-foreground state-active:font-semibold state-active:shadow-sm",e),...t}));tt.displayName=N.Trigger.displayName;const at=i.forwardRef(({className:e,...t},r)=>a.jsx(N.Content,{ref:r,className:s("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));at.displayName=N.Content.displayName;const la=()=>a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4 shrink-0 transition-transform duration-200",children:a.jsx("polyline",{points:"6 9 12 15 18 9"})}),na=T.Root,rt=i.forwardRef(({className:e,...t},r)=>a.jsx(T.Item,{ref:r,className:s("border-b",e),...t}));rt.displayName="AccordionItem";const ot=i.forwardRef(({className:e,children:t,...r},d)=>a.jsx(T.Header,{className:"flex",children:a.jsxs(T.Trigger,{ref:d,className:s("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...r,children:[t,a.jsx(la,{})]})}));ot.displayName=T.Trigger.displayName;const st=i.forwardRef(({className:e,children:t,...r},d)=>a.jsx(T.Content,{ref:d,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:a.jsx("div",{className:s("pb-4 pt-0",e),children:t})}));st.displayName=T.Content.displayName;const ae="__EMPTY__";function ca({value:e="",onValueChange:t,options:r,placeholder:d="選択してください",emptyText:l="該当なし",className:n="",disabled:p=!1,allowCustom:g=!1}){const[c,b]=w.useState(!1),[x,k]=w.useState(e||""),H=r.some(y=>y.value===e),Da=()=>{g&&(c?(b(!1),x&&t&&t(x)):(b(!0),k(e||"")))},Pa=y=>{y==="__custom__"?(b(!0),k("")):y===ae?t==null||t(""):t==null||t(y)},_a=y=>{const kt=y.target.value;k(kt),t==null||t(kt)};if(c||g&&!H&&e)return a.jsxs("div",{className:`flex gap-2 ${n}`,children:[a.jsx(G,{value:x,onChange:_a,placeholder:d,disabled:p,className:"flex-1"}),g&&a.jsx("button",{type:"button",onClick:Da,className:"px-3 py-2 text-sm border border-gray-300 rounded hover:bg-gray-50",disabled:p,title:"プルダウンに戻る",children:"↓"})]});const Ma=e===""?ae:e;return a.jsx("div",{className:n,children:a.jsxs(Se,{value:Ma,onValueChange:Pa,disabled:p,children:[a.jsx(U,{className:"w-full",children:a.jsx(ke,{placeholder:d})}),a.jsx(X,{children:r.length===0?a.jsx("div",{className:"px-2 py-1.5 text-sm text-gray-500",children:l}):a.jsxs(a.Fragment,{children:[r.map(y=>a.jsx(E,{value:y.value===""?ae:y.value,children:y.label},y.value)),g&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"border-t my-1"}),a.jsx(E,{value:"__custom__",children:"✏️ 手動入力..."})]})]})})]})})}const fa={sm:"h-8 w-8 text-xs",md:"h-10 w-10 text-sm",lg:"h-12 w-12 text-base",xl:"h-16 w-16 text-lg"},dt=i.forwardRef(({src:e,alt:t,size:r="md",fallback:d,className:l,...n},p)=>{const[g,c]=i.useState(!1),[b,x]=i.useState(!1);i.useEffect(()=>{c(!1),x(!1)},[e]);const k=e&&!g,H=!e||g||!b;return a.jsxs("div",{ref:p,className:s("relative inline-flex items-center justify-center overflow-hidden rounded-full bg-muted",fa[r],l),...n,children:[k&&a.jsx("img",{src:e,alt:t||"Avatar",className:s("h-full w-full object-cover",b?"opacity-100":"opacity-0"),onLoad:()=>x(!0),onError:()=>c(!0),loading:n.loading}),H&&d&&a.jsx("span",{className:"font-medium text-muted-foreground uppercase",children:d}),H&&!d&&a.jsx("svg",{className:"h-full w-full text-muted-foreground",fill:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{d:"M24 20.993V24H0v-2.996A14.977 14.977 0 0112.004 15c4.904 0 9.26 2.354 11.996 5.993zM16.002 8.999a4 4 0 11-8 0 4 4 0 018 0z"})})]})});dt.displayName="Avatar";const ga=_.Root,ua=_.Trigger,it=i.forwardRef(({className:e,align:t="center",sideOffset:r=4,...d},l)=>a.jsx(_.Portal,{children:a.jsx(_.Content,{ref:l,align:t,sideOffset:r,className:s("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...d})}));it.displayName=_.Content.displayName;const ma=C.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),lt=i.forwardRef(({className:e,...t},r)=>a.jsx(ne.Root,{ref:r,className:s(ma(),e),...t}));lt.displayName=ne.Root.displayName;const nt=i.forwardRef(({className:e,...t},r)=>a.jsx("textarea",{className:s("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));nt.displayName="Textarea";const ct=i.forwardRef(({className:e,...t},r)=>a.jsx(V.Root,{className:s("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-950 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-gray-900 data-[state=unchecked]:bg-gray-200 dark:focus-visible:ring-gray-300 dark:focus-visible:ring-offset-gray-950 dark:data-[state=checked]:bg-gray-50 dark:data-[state=unchecked]:bg-gray-600",e),...t,ref:r,children:a.jsx(V.Thumb,{className:s("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));ct.displayName=V.Root.displayName;const pa=P.Provider,ba=P.Root,ha=P.Trigger,ft=i.forwardRef(({className:e,sideOffset:t=4,...r},d)=>a.jsx(P.Portal,{children:a.jsx(P.Content,{ref:d,sideOffset:t,className:s("z-50 overflow-hidden rounded-md bg-gray-900 px-3 py-1.5 text-xs text-gray-50 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:bg-gray-50 dark:text-gray-900",e),...r})}));ft.displayName=P.Content.displayName;const gt=i.forwardRef(({className:e,children:t,...r},d)=>a.jsxs(S.Root,{ref:d,className:s("relative overflow-hidden",e),...r,children:[a.jsx(S.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),a.jsx(re,{}),a.jsx(S.Corner,{})]}));gt.displayName=S.Root.displayName;const re=i.forwardRef(({className:e,orientation:t="vertical",...r},d)=>a.jsx(S.ScrollAreaScrollbar,{ref:d,orientation:t,className:s("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:a.jsx(S.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));re.displayName=S.ScrollAreaScrollbar.displayName;const va={sm:"h-4 w-4 border-2",md:"h-6 w-6 border-2",lg:"h-8 w-8 border-3",xl:"h-12 w-12 border-4"},ut=i.forwardRef(({size:e="md",className:t,...r},d)=>a.jsx("div",{ref:d,className:s("inline-block animate-spin rounded-full border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]",va[e],t),role:"status",...r,children:a.jsx("span",{className:"sr-only",children:"Loading..."})}));ut.displayName="Spinner";const mt=i.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...d},l)=>a.jsx(ce.Root,{ref:l,decorative:r,orientation:t,className:s("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...d}));mt.displayName=ce.Root.displayName;const pt=i.forwardRef(({className:e,...t},r)=>a.jsxs(M.Root,{ref:r,className:s("relative flex w-full touch-none select-none items-center",e),...t,children:[a.jsx(M.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-gray-200 dark:bg-gray-800",children:a.jsx(M.Range,{className:"absolute h-full bg-gray-900 dark:bg-gray-50"})}),a.jsx(M.Thumb,{className:"block h-5 w-5 rounded-full border-2 border-gray-900 bg-white ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:border-gray-50 dark:bg-gray-950 dark:ring-offset-gray-950 dark:focus-visible:ring-gray-300"})]}));pt.displayName=M.Root.displayName;const oe=i.forwardRef(({className:e,...t},r)=>a.jsx("div",{className:"relative w-full overflow-auto",children:a.jsx("table",{ref:r,className:s("w-full caption-bottom text-sm",e),...t})}));oe.displayName="Table";const se=i.forwardRef(({className:e,...t},r)=>a.jsx("thead",{ref:r,className:s("[&_tr]:border-b",e),...t}));se.displayName="TableHeader";const de=i.forwardRef(({className:e,...t},r)=>a.jsx("tbody",{ref:r,className:s("[&_tr:last-child]:border-0",e),...t}));de.displayName="TableBody";const bt=i.forwardRef(({className:e,...t},r)=>a.jsx("tfoot",{ref:r,className:s("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));bt.displayName="TableFooter";const A=i.forwardRef(({className:e,...t},r)=>a.jsx("tr",{ref:r,className:s("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));A.displayName="TableRow";const ie=i.forwardRef(({className:e,...t},r)=>a.jsx("th",{ref:r,className:s("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));ie.displayName="TableHead";const q=i.forwardRef(({className:e,...t},r)=>a.jsx("td",{ref:r,className:s("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));q.displayName="TableCell";const ht=i.forwardRef(({className:e,...t},r)=>a.jsx("caption",{ref:r,className:s("mt-4 text-sm text-muted-foreground",e),...t}));ht.displayName="TableCaption";function ya({columns:e,data:t,onRowClick:r}){var p;const[d,l]=i.useState([]),n=D.useReactTable({data:t,columns:e,getCoreRowModel:D.getCoreRowModel(),getPaginationRowModel:D.getPaginationRowModel(),onSortingChange:l,getSortedRowModel:D.getSortedRowModel(),state:{sorting:d}});return a.jsxs("div",{children:[a.jsx("div",{className:"rounded-md border",children:a.jsxs(oe,{children:[a.jsx(se,{children:n.getHeaderGroups().map(g=>a.jsx(A,{children:g.headers.map(c=>a.jsx(ie,{children:c.isPlaceholder?null:D.flexRender(c.column.columnDef.header,c.getContext())},c.id))},g.id))}),a.jsx(de,{children:(p=n.getRowModel().rows)!=null&&p.length?n.getRowModel().rows.map(g=>a.jsx(A,{"data-state":g.getIsSelected()&&"selected",onClick:()=>r&&r(g.original),className:r?"cursor-pointer":"",children:g.getVisibleCells().map(c=>a.jsx(q,{children:D.flexRender(c.column.columnDef.cell,c.getContext())},c.id))},g.id)):a.jsx(A,{children:a.jsx(q,{colSpan:e.length,className:"h-24 text-center",children:"No results."})})})]})}),a.jsxs("div",{className:"flex items-center justify-end space-x-2 py-4",children:[a.jsx(j,{variant:"outline",size:"sm",onClick:()=>n.previousPage(),disabled:!n.getCanPreviousPage(),children:"Previous"}),a.jsx(j,{variant:"outline",size:"sm",onClick:()=>n.nextPage(),disabled:!n.getCanNextPage(),children:"Next"})]})]})}const wa=f.Root,xa=f.Trigger,Na=f.Close,vt=f.Portal,le=i.forwardRef(({className:e,...t},r)=>a.jsx(f.Overlay,{className:s("fixed top-0 right-0 bottom-0 left-0 z-50 bg-black/80 state-open:animate-fade-in state-closed:animate-fade-out",e),...t,ref:r}));le.displayName=f.Overlay.displayName;const Ta=C.cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out state-closed:duration-300 state-open:duration-500",{variants:{side:{top:"left-0 right-0 top-0 border-b state-closed:animate-slide-out-left state-open:animate-slide-in-left",bottom:"left-0 right-0 bottom-0 border-t state-closed:animate-slide-out-left state-open:animate-slide-in-left",left:"top-0 bottom-0 left-0 h-full w-3/4 border-r state-closed:animate-slide-out-left state-open:animate-slide-in-left sm:max-w-sm",right:"top-0 bottom-0 right-0 h-full w-3/4 border-l state-closed:animate-slide-out-right state-open:animate-slide-in-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),yt=i.forwardRef(({side:e="right",className:t,children:r,...d},l)=>a.jsxs(vt,{children:[a.jsx(le,{}),a.jsxs(f.Content,{ref:l,className:s(Ta({side:e}),t),...d,children:[a.jsxs(f.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[a.jsx(z.X,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));yt.displayName=f.Content.displayName;const wt=({className:e,...t})=>a.jsx("div",{className:s("flex flex-col space-y-2 text-center sm:text-left",e),...t});wt.displayName="SheetHeader";const xt=({className:e,...t})=>a.jsx("div",{className:s("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});xt.displayName="SheetFooter";const Nt=i.forwardRef(({className:e,...t},r)=>a.jsx(f.Title,{ref:r,className:s("text-lg font-semibold text-foreground",e),...t}));Nt.displayName=f.Title.displayName;const Tt=i.forwardRef(({className:e,...t},r)=>a.jsx(f.Description,{ref:r,className:s("text-sm text-muted-foreground",e),...t}));Tt.displayName=f.Description.displayName;const Sa={theme:"system",setTheme:()=>null},St=w.createContext(Sa);function ka({children:e,defaultTheme:t="system",storageKey:r="mirel-ui-theme",...d}){const[l,n]=w.useState(()=>localStorage.getItem(r)||t);w.useEffect(()=>{const g=window.document.documentElement;if(g.classList.remove("light","dark"),l==="system"){const c=window.matchMedia("(prefers-color-scheme: dark)"),b=c.matches?"dark":"light";g.classList.add(b);const x=()=>{g.classList.remove("light","dark");const k=c.matches?"dark":"light";g.classList.add(k)};return c.addEventListener("change",x),()=>c.removeEventListener("change",x)}g.classList.add(l)},[l]);const p={theme:l,setTheme:g=>{localStorage.setItem(r,g),n(g)}};return a.jsx(St.Provider,{...d,value:p,children:e})}const Ca=()=>{const e=w.useContext(St);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};o.Accordion=na,o.AccordionContent=st,o.AccordionItem=rt,o.AccordionTrigger=ot,o.Alert=Je,o.AlertDescription=Re,o.AlertTitle=Ke,o.Avatar=dt,o.Badge=I,o.Button=j,o.Card=ge,o.CardContent=be,o.CardDescription=pe,o.CardFooter=he,o.CardHeader=ue,o.CardTitle=me,o.Combobox=ca,o.DataTable=ya,o.Dialog=Gt,o.DialogClose=Wt,o.DialogContent=_e,o.DialogDescription=Ae,o.DialogFooter=Ie,o.DialogHeader=Me,o.DialogOverlay=$,o.DialogPortal=Pe,o.DialogTitle=Le,o.DialogTrigger=Ut,o.DropdownMenu=Yt,o.DropdownMenuCheckboxItem=Be,o.DropdownMenuContent=Fe,o.DropdownMenuGroup=$t,o.DropdownMenuItem=Ee,o.DropdownMenuLabel=qe,o.DropdownMenuPortal=Qt,o.DropdownMenuRadioGroup=Jt,o.DropdownMenuRadioItem=Oe,o.DropdownMenuSeparator=He,o.DropdownMenuShortcut=Ve,o.DropdownMenuSub=Zt,o.DropdownMenuSubContent=je,o.DropdownMenuSubTrigger=ze,o.DropdownMenuTrigger=Xt,o.FormError=Ne,o.FormField=ye,o.FormHelper=xe,o.FormLabel=we,o.FormRequiredMark=Te,o.Input=G,o.Label=lt,o.Popover=ga,o.PopoverContent=it,o.PopoverTrigger=ua,o.ScrollArea=gt,o.ScrollBar=re,o.SectionHeading=Ge,o.Select=Se,o.SelectContent=X,o.SelectGroup=Vt,o.SelectItem=E,o.SelectLabel=Ce,o.SelectScrollDownButton=Y,o.SelectScrollUpButton=W,o.SelectSeparator=De,o.SelectTrigger=U,o.SelectValue=ke,o.Separator=mt,o.Sheet=wa,o.SheetClose=Na,o.SheetContent=yt,o.SheetDescription=Tt,o.SheetFooter=xt,o.SheetHeader=wt,o.SheetOverlay=le,o.SheetPortal=vt,o.SheetTitle=Nt,o.SheetTrigger=xa,o.Skeleton=We,o.Slider=pt,o.Spinner=ut,o.StepIndicator=Ue,o.Switch=ct,o.Table=oe,o.TableBody=de,o.TableCaption=ht,o.TableCell=q,o.TableFooter=bt,o.TableHead=ie,o.TableHeader=se,o.TableRow=A,o.Tabs=ia,o.TabsContent=at,o.TabsList=et,o.TabsTrigger=tt,o.Textarea=nt,o.ThemeProvider=ka,o.Toast=Z,o.ToastAction=Xe,o.ToastClose=J,o.ToastDescription=R,o.ToastProvider=Ye,o.ToastTitle=K,o.ToastViewport=Q,o.Toaster=sa,o.Tooltip=ba,o.TooltipContent=ft,o.TooltipProvider=pa,o.TooltipTrigger=ha,o.badgeVariants=ve,o.buttonVariants=fe,o.cn=s,o.toast=Qe,o.useTheme=Ca,o.useToast=Ze,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { colors, surfaces, borderRadius, spacing, typography, shadows, motion } from './tokens';
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Design tokens for @mirel/ui
|
|
3
|
+
* Aligned with shadcn/ui CSS variable conventions
|
|
4
|
+
*/
|
|
5
|
+
export declare const colors: {
|
|
6
|
+
readonly border: "hsl(var(--border))";
|
|
7
|
+
readonly input: "hsl(var(--input))";
|
|
8
|
+
readonly ring: "hsl(var(--ring))";
|
|
9
|
+
readonly outline: "hsl(var(--outline))";
|
|
10
|
+
readonly background: "hsl(var(--background))";
|
|
11
|
+
readonly foreground: "hsl(var(--foreground))";
|
|
12
|
+
readonly primary: {
|
|
13
|
+
readonly DEFAULT: "hsl(var(--primary))";
|
|
14
|
+
readonly foreground: "hsl(var(--primary-foreground))";
|
|
15
|
+
};
|
|
16
|
+
readonly secondary: {
|
|
17
|
+
readonly DEFAULT: "hsl(var(--secondary))";
|
|
18
|
+
readonly foreground: "hsl(var(--secondary-foreground))";
|
|
19
|
+
};
|
|
20
|
+
readonly destructive: {
|
|
21
|
+
readonly DEFAULT: "hsl(var(--destructive))";
|
|
22
|
+
readonly foreground: "hsl(var(--destructive-foreground))";
|
|
23
|
+
};
|
|
24
|
+
readonly info: {
|
|
25
|
+
readonly DEFAULT: "hsl(var(--info))";
|
|
26
|
+
readonly foreground: "hsl(var(--info-foreground))";
|
|
27
|
+
};
|
|
28
|
+
readonly success: {
|
|
29
|
+
readonly DEFAULT: "hsl(var(--success))";
|
|
30
|
+
readonly foreground: "hsl(var(--success-foreground))";
|
|
31
|
+
};
|
|
32
|
+
readonly warning: {
|
|
33
|
+
readonly DEFAULT: "hsl(var(--warning))";
|
|
34
|
+
readonly foreground: "hsl(var(--warning-foreground))";
|
|
35
|
+
};
|
|
36
|
+
readonly muted: {
|
|
37
|
+
readonly DEFAULT: "hsl(var(--muted))";
|
|
38
|
+
readonly foreground: "hsl(var(--muted-foreground))";
|
|
39
|
+
};
|
|
40
|
+
readonly accent: {
|
|
41
|
+
readonly DEFAULT: "hsl(var(--accent))";
|
|
42
|
+
readonly foreground: "hsl(var(--accent-foreground))";
|
|
43
|
+
};
|
|
44
|
+
readonly popover: {
|
|
45
|
+
readonly DEFAULT: "hsl(var(--popover))";
|
|
46
|
+
readonly foreground: "hsl(var(--popover-foreground))";
|
|
47
|
+
};
|
|
48
|
+
readonly card: {
|
|
49
|
+
readonly DEFAULT: "hsl(var(--card))";
|
|
50
|
+
readonly foreground: "hsl(var(--card-foreground))";
|
|
51
|
+
};
|
|
52
|
+
readonly focus: {
|
|
53
|
+
readonly ring: "hsl(var(--focus-ring))";
|
|
54
|
+
readonly inner: "hsl(var(--focus-inner))";
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
export declare const surfaces: {
|
|
58
|
+
readonly base: "hsl(var(--surface))";
|
|
59
|
+
readonly subtle: "hsl(var(--surface-subtle))";
|
|
60
|
+
readonly raised: "hsl(var(--surface-raised))";
|
|
61
|
+
readonly overlay: "hsl(var(--surface-overlay))";
|
|
62
|
+
};
|
|
63
|
+
export declare const borderRadius: {
|
|
64
|
+
readonly lg: "var(--radius)";
|
|
65
|
+
readonly md: "calc(var(--radius) - 2px)";
|
|
66
|
+
readonly sm: "calc(var(--radius) - 4px)";
|
|
67
|
+
};
|
|
68
|
+
export declare const spacing: {
|
|
69
|
+
readonly xxs: "0.125rem";
|
|
70
|
+
readonly xs: "0.25rem";
|
|
71
|
+
readonly sm: "0.5rem";
|
|
72
|
+
readonly md: "1rem";
|
|
73
|
+
readonly lg: "1.5rem";
|
|
74
|
+
readonly xl: "2rem";
|
|
75
|
+
readonly '2xl': "3rem";
|
|
76
|
+
};
|
|
77
|
+
export declare const typography: {
|
|
78
|
+
readonly fontFamily: {
|
|
79
|
+
readonly sans: "'Inter', 'Noto Sans JP', 'Helvetica Neue', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif";
|
|
80
|
+
readonly mono: "'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace";
|
|
81
|
+
};
|
|
82
|
+
readonly text: {
|
|
83
|
+
readonly xs: {
|
|
84
|
+
readonly size: "0.75rem";
|
|
85
|
+
readonly lineHeight: "1.125rem";
|
|
86
|
+
readonly tracking: "0.02em";
|
|
87
|
+
};
|
|
88
|
+
readonly sm: {
|
|
89
|
+
readonly size: "0.875rem";
|
|
90
|
+
readonly lineHeight: "1.25rem";
|
|
91
|
+
readonly tracking: "0.01em";
|
|
92
|
+
};
|
|
93
|
+
readonly md: {
|
|
94
|
+
readonly size: "1rem";
|
|
95
|
+
readonly lineHeight: "1.5rem";
|
|
96
|
+
readonly tracking: "0";
|
|
97
|
+
};
|
|
98
|
+
readonly lg: {
|
|
99
|
+
readonly size: "1.125rem";
|
|
100
|
+
readonly lineHeight: "1.75rem";
|
|
101
|
+
readonly tracking: "-0.005em";
|
|
102
|
+
};
|
|
103
|
+
readonly xl: {
|
|
104
|
+
readonly size: "1.25rem";
|
|
105
|
+
readonly lineHeight: "1.85rem";
|
|
106
|
+
readonly tracking: "-0.01em";
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
readonly heading: {
|
|
110
|
+
readonly sm: {
|
|
111
|
+
readonly size: "1.5rem";
|
|
112
|
+
readonly lineHeight: "2.1rem";
|
|
113
|
+
readonly weight: 600;
|
|
114
|
+
readonly tracking: "-0.02em";
|
|
115
|
+
};
|
|
116
|
+
readonly md: {
|
|
117
|
+
readonly size: "1.875rem";
|
|
118
|
+
readonly lineHeight: "2.35rem";
|
|
119
|
+
readonly weight: 600;
|
|
120
|
+
readonly tracking: "-0.025em";
|
|
121
|
+
};
|
|
122
|
+
readonly lg: {
|
|
123
|
+
readonly size: "2.25rem";
|
|
124
|
+
readonly lineHeight: "2.6rem";
|
|
125
|
+
readonly weight: 600;
|
|
126
|
+
readonly tracking: "-0.03em";
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
export declare const shadows: {
|
|
131
|
+
readonly sm: "0 1px 2px rgba(15, 23, 42, 0.08)";
|
|
132
|
+
readonly md: "0 8px 16px rgba(15, 23, 42, 0.08)";
|
|
133
|
+
readonly lg: "0 12px 32px rgba(15, 23, 42, 0.12)";
|
|
134
|
+
readonly xl: "0 20px 45px rgba(15, 23, 42, 0.16)";
|
|
135
|
+
};
|
|
136
|
+
export declare const motion: {
|
|
137
|
+
readonly duration: {
|
|
138
|
+
readonly instant: "80ms";
|
|
139
|
+
readonly fast: "160ms";
|
|
140
|
+
readonly normal: "240ms";
|
|
141
|
+
readonly slow: "320ms";
|
|
142
|
+
};
|
|
143
|
+
readonly easing: {
|
|
144
|
+
readonly standard: "cubic-bezier(0.2, 0, 0, 1)";
|
|
145
|
+
readonly emphasized: "cubic-bezier(0.32, 0.72, 0, 1)";
|
|
146
|
+
readonly entrance: "cubic-bezier(0, 0, 0.2, 1)";
|
|
147
|
+
readonly exit: "cubic-bezier(0.4, 0, 1, 1)";
|
|
148
|
+
};
|
|
149
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mireljs/ui-core",
|
|
3
|
+
"version": "3.2.3",
|
|
4
|
+
"description": "mirel Design System - shadcn/ui + Radix UI wrapper",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/mirel-ui-core.umd.cjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/mirel-ui-core.js",
|
|
11
|
+
"require": "./dist/mirel-ui-core.umd.cjs",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
},
|
|
14
|
+
"./theme/index.css": "./dist/style.css"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"design-system",
|
|
24
|
+
"shadcn",
|
|
25
|
+
"radix-ui",
|
|
26
|
+
"react"
|
|
27
|
+
],
|
|
28
|
+
"author": "mirelplatform",
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"react": "^19.2.3",
|
|
32
|
+
"react-dom": "^19.2.3"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@radix-ui/react-accordion": "^1.2.12",
|
|
36
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
37
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
38
|
+
"@radix-ui/react-label": "^2.1.8",
|
|
39
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
40
|
+
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
41
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
42
|
+
"@radix-ui/react-separator": "^1.1.8",
|
|
43
|
+
"@radix-ui/react-slider": "^1.3.6",
|
|
44
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
45
|
+
"@radix-ui/react-switch": "^1.2.6",
|
|
46
|
+
"@radix-ui/react-tabs": "^1.1.13",
|
|
47
|
+
"@radix-ui/react-toast": "^1.2.15",
|
|
48
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
49
|
+
"@tanstack/react-table": "^8.21.3",
|
|
50
|
+
"@uiw/codemirror-theme-vscode": "^4.25.4",
|
|
51
|
+
"class-variance-authority": "^0.7.1",
|
|
52
|
+
"clsx": "^2.1.1",
|
|
53
|
+
"lucide-react": "^0.562.0",
|
|
54
|
+
"tailwind-merge": "^3.4.0"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
58
|
+
"@testing-library/react": "^16.3.1",
|
|
59
|
+
"@types/node": "^22.10.2",
|
|
60
|
+
"@types/react": "^19.2.7",
|
|
61
|
+
"@types/react-dom": "^19.2.3",
|
|
62
|
+
"happy-dom": "^20.0.11",
|
|
63
|
+
"postcss": "^8.5.6",
|
|
64
|
+
"typescript": "^5.9.3",
|
|
65
|
+
"vite": "^6.0.3",
|
|
66
|
+
"vite-plugin-dts": "^4.3.0",
|
|
67
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
68
|
+
"vitest": "^4.0.16"
|
|
69
|
+
},
|
|
70
|
+
"scripts": {
|
|
71
|
+
"typecheck": "tsc --noEmit",
|
|
72
|
+
"test": "vitest run",
|
|
73
|
+
"build": "tsc --noEmit && vite build"
|
|
74
|
+
},
|
|
75
|
+
"module": "./dist/mirel-ui-core.js"
|
|
76
|
+
}
|