@kubetail/ui 0.1.5-rc2 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/elements/DropdownMenu.cjs +1 -1
- package/dist/elements/DropdownMenu.cjs.map +1 -1
- package/dist/elements/DropdownMenu.js +18 -18
- package/dist/elements/DropdownMenu.js.map +1 -1
- package/dist/plugin.cjs +1 -1
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.js +2 -2
- package/dist/plugin.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),h=require("@radix-ui/react-dropdown-menu"),c=require("lucide-react"),d=require("react"),s=require("../lib/utils.cjs");function D(o){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const n in o)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(o,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>o[n]})}}return t.default=o,Object.freeze(t)}const e=D(h),M=e.Root,y=e.Trigger,N=e.Group,j=e.Portal,v=e.Sub,S=e.RadioGroup,l=d.forwardRef(({className:o,inset:t,children:n,...r},i)=>a.jsxs(e.SubTrigger,{ref:i,className:s.cn("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),h=require("@radix-ui/react-dropdown-menu"),c=require("lucide-react"),d=require("react"),s=require("../lib/utils.cjs");function D(o){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const n in o)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(o,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>o[n]})}}return t.default=o,Object.freeze(t)}const e=D(h),M=e.Root,y=e.Trigger,N=e.Group,j=e.Portal,v=e.Sub,S=e.RadioGroup,l=d.forwardRef(({className:o,inset:t,children:n,...r},i)=>a.jsxs(e.SubTrigger,{ref:i,className:s.cn("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-chrome-100 data-[state=open]:bg-chrome-100 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",o),...r,children:[n,a.jsx(c.ChevronRight,{className:"ml-auto"})]}));l.displayName=e.SubTrigger.displayName;const p=d.forwardRef(({className:o,...t},n)=>a.jsx(e.SubContent,{ref:n,className:s.cn("z-50 min-w-[8rem] overflow-hidden rounded-md border border-chrome-300 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",o),...t}));p.displayName=e.SubContent.displayName;const u=d.forwardRef(({className:o,sideOffset:t=4,...n},r)=>a.jsx(e.Portal,{children:a.jsx(e.Content,{ref:r,sideOffset:t,className:s.cn("z-50 min-w-[8rem] overflow-hidden rounded-md border border-chrome-300 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",o),...n})}));u.displayName=e.Content.displayName;const m=d.forwardRef(({className:o,inset:t,...n},r)=>a.jsx(e.Item,{ref:r,className:s.cn("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-chrome-100 focus:text-chrome-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",o),...n}));m.displayName=e.Item.displayName;const f=d.forwardRef(({className:o,children:t,checked:n,...r},i)=>a.jsxs(e.CheckboxItem,{ref:i,className:s.cn("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-chrome-100 focus:text-chrome-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o),checked:n,...r,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(e.ItemIndicator,{children:a.jsx(c.Check,{className:"h-4 w-4"})})}),t]}));f.displayName=e.CheckboxItem.displayName;const w=d.forwardRef(({className:o,children:t,...n},r)=>a.jsxs(e.RadioItem,{ref:r,className:s.cn("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-chrome-100 focus:text-chrome-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o),...n,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(e.ItemIndicator,{children:a.jsx(c.Circle,{className:"h-2 w-2 fill-current"})})}),t]}));w.displayName=e.RadioItem.displayName;const b=d.forwardRef(({className:o,inset:t,...n},r)=>a.jsx(e.Label,{ref:r,className:s.cn("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",o),...n}));b.displayName=e.Label.displayName;const g=d.forwardRef(({className:o,...t},n)=>a.jsx(e.Separator,{ref:n,className:s.cn("-mx-1 my-1 h-px bg-chrome-300",o),...t}));g.displayName=e.Separator.displayName;const x=({className:o,...t})=>a.jsx("span",{className:s.cn("ml-auto text-xs tracking-widest opacity-60",o),...t});x.displayName="DropdownMenuShortcut";exports.DropdownMenu=M;exports.DropdownMenuCheckboxItem=f;exports.DropdownMenuContent=u;exports.DropdownMenuGroup=N;exports.DropdownMenuItem=m;exports.DropdownMenuLabel=b;exports.DropdownMenuPortal=j;exports.DropdownMenuRadioGroup=S;exports.DropdownMenuRadioItem=w;exports.DropdownMenuSeparator=g;exports.DropdownMenuShortcut=x;exports.DropdownMenuSub=v;exports.DropdownMenuSubContent=p;exports.DropdownMenuSubTrigger=l;exports.DropdownMenuTrigger=y;
|
|
2
2
|
//# sourceMappingURL=DropdownMenu.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.cjs","sources":["../../src/elements/DropdownMenu.tsx"],"sourcesContent":["'use client';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { Check, ChevronRight, Circle } from 'lucide-react';\nimport { forwardRef } from 'react';\nimport { cn } from '@/lib/utils';\nconst DropdownMenu = DropdownMenuPrimitive.Root;\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\nconst DropdownMenuSubTrigger = forwardRef(({ className, inset, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.SubTrigger, { ref: ref, className: cn('flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-
|
|
1
|
+
{"version":3,"file":"DropdownMenu.cjs","sources":["../../src/elements/DropdownMenu.tsx"],"sourcesContent":["'use client';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { Check, ChevronRight, Circle } from 'lucide-react';\nimport { forwardRef } from 'react';\nimport { cn } from '@/lib/utils';\nconst DropdownMenu = DropdownMenuPrimitive.Root;\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\nconst DropdownMenuSubTrigger = forwardRef(({ className, inset, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.SubTrigger, { ref: ref, className: cn('flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-chrome-100 data-[state=open]:bg-chrome-100 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0', inset && 'pl-8', className), ...props, children: [children, _jsx(ChevronRight, { className: \"ml-auto\" })] })));\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;\nconst DropdownMenuSubContent = forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.SubContent, { ref: ref, className: cn('z-50 min-w-[8rem] overflow-hidden rounded-md border border-chrome-300 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', className), ...props })));\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;\nconst DropdownMenuContent = forwardRef(({ className, sideOffset = 4, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: cn('z-50 min-w-[8rem] overflow-hidden rounded-md border border-chrome-300 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', className), ...props }) })));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\nconst DropdownMenuItem = forwardRef(({ className, inset, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Item, { ref: ref, className: cn('relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-chrome-100 focus:text-chrome-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0', inset && 'pl-8', className), ...props })));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\nconst DropdownMenuCheckboxItem = forwardRef(({ className, children, checked, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.CheckboxItem, { ref: ref, className: cn('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-chrome-100 focus:text-chrome-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className), checked: checked, ...props, children: [_jsx(\"span\", { className: \"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Check, { className: \"h-4 w-4\" }) }) }), children] })));\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;\nconst DropdownMenuRadioItem = forwardRef(({ className, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.RadioItem, { ref: ref, className: cn('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-chrome-100 focus:text-chrome-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className), ...props, children: [_jsx(\"span\", { className: \"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Circle, { className: \"h-2 w-2 fill-current\" }) }) }), children] })));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\nconst DropdownMenuLabel = forwardRef(({ className, inset, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Label, { ref: ref, className: cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className), ...props })));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\nconst DropdownMenuSeparator = forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Separator, { ref: ref, className: cn('-mx-1 my-1 h-px bg-chrome-300', className), ...props })));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\nconst DropdownMenuShortcut = ({ className, ...props }) => (_jsx(\"span\", { className: cn('ml-auto text-xs tracking-widest opacity-60', className), ...props }));\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut';\nexport { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };\n"],"names":["DropdownMenu","DropdownMenuPrimitive","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","forwardRef","className","inset","children","props","ref","_jsxs","cn","_jsx","ChevronRight","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMenuCheckboxItem","checked","Check","DropdownMenuRadioItem","Circle","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut"],"mappings":"qgBAMMA,EAAeC,EAAsB,KACrCC,EAAsBD,EAAsB,QAC5CE,EAAoBF,EAAsB,MAC1CG,EAAqBH,EAAsB,OAC3CI,EAAkBJ,EAAsB,IACxCK,EAAyBL,EAAsB,WAC/CM,EAAyBC,EAAW,WAAA,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAO,SAAAC,EAAU,GAAGC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M4B,EAAuB,CAAC,CAAE,UAAApB,EAAW,GAAGG,KAAaI,EAAAA,IAAK,OAAQ,CAAE,UAAWD,EAAAA,GAAG,6CAA8CN,CAAS,EAAG,GAAGG,CAAO,CAAA,EAC5JiB,EAAqB,YAAc"}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { jsxs as l, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import * as e from "@radix-ui/react-dropdown-menu";
|
|
3
|
-
import { ChevronRight as
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import { cn as
|
|
6
|
-
const S = e.Root, C = e.Trigger, z = e.Group, R = e.Portal, k = e.Sub, T = e.RadioGroup, u =
|
|
3
|
+
import { ChevronRight as m, Check as p, Circle as c } from "lucide-react";
|
|
4
|
+
import { forwardRef as d } from "react";
|
|
5
|
+
import { cn as r } from "../lib/utils.js";
|
|
6
|
+
const S = e.Root, C = e.Trigger, z = e.Group, R = e.Portal, k = e.Sub, T = e.RadioGroup, u = d(({ className: o, inset: t, children: a, ...s }, i) => l(e.SubTrigger, { ref: i, className: r("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-chrome-100 data-[state=open]:bg-chrome-100 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", t && "pl-8", o), ...s, children: [a, n(m, { className: "ml-auto" })] }));
|
|
7
7
|
u.displayName = e.SubTrigger.displayName;
|
|
8
|
-
const f =
|
|
8
|
+
const f = d(({ className: o, ...t }, a) => n(e.SubContent, { ref: a, className: r("z-50 min-w-[8rem] overflow-hidden rounded-md border border-chrome-300 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", o), ...t }));
|
|
9
9
|
f.displayName = e.SubContent.displayName;
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
const N =
|
|
10
|
+
const h = d(({ className: o, sideOffset: t = 4, ...a }, s) => n(e.Portal, { children: n(e.Content, { ref: s, sideOffset: t, className: r("z-50 min-w-[8rem] overflow-hidden rounded-md border border-chrome-300 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", o), ...a }) }));
|
|
11
|
+
h.displayName = e.Content.displayName;
|
|
12
|
+
const b = d(({ className: o, inset: t, ...a }, s) => n(e.Item, { ref: s, className: r("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-chrome-100 focus:text-chrome-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0", t && "pl-8", o), ...a }));
|
|
13
|
+
b.displayName = e.Item.displayName;
|
|
14
|
+
const g = d(({ className: o, children: t, checked: a, ...s }, i) => l(e.CheckboxItem, { ref: i, className: r("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-chrome-100 focus:text-chrome-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", o), checked: a, ...s, children: [n("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: n(e.ItemIndicator, { children: n(p, { className: "h-4 w-4" }) }) }), t] }));
|
|
15
|
+
g.displayName = e.CheckboxItem.displayName;
|
|
16
|
+
const N = d(({ className: o, children: t, ...a }, s) => l(e.RadioItem, { ref: s, className: r("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-chrome-100 focus:text-chrome-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", o), ...a, children: [n("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: n(e.ItemIndicator, { children: n(c, { className: "h-2 w-2 fill-current" }) }) }), t] }));
|
|
17
17
|
N.displayName = e.RadioItem.displayName;
|
|
18
|
-
const w =
|
|
18
|
+
const w = d(({ className: o, inset: t, ...a }, s) => n(e.Label, { ref: s, className: r("px-2 py-1.5 text-sm font-semibold", t && "pl-8", o), ...a }));
|
|
19
19
|
w.displayName = e.Label.displayName;
|
|
20
|
-
const x =
|
|
20
|
+
const x = d(({ className: o, ...t }, a) => n(e.Separator, { ref: a, className: r("-mx-1 my-1 h-px bg-chrome-300", o), ...t }));
|
|
21
21
|
x.displayName = e.Separator.displayName;
|
|
22
|
-
const y = ({ className:
|
|
22
|
+
const y = ({ className: o, ...t }) => n("span", { className: r("ml-auto text-xs tracking-widest opacity-60", o), ...t });
|
|
23
23
|
y.displayName = "DropdownMenuShortcut";
|
|
24
24
|
export {
|
|
25
25
|
S as DropdownMenu,
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
g as DropdownMenuCheckboxItem,
|
|
27
|
+
h as DropdownMenuContent,
|
|
28
28
|
z as DropdownMenuGroup,
|
|
29
|
-
|
|
29
|
+
b as DropdownMenuItem,
|
|
30
30
|
w as DropdownMenuLabel,
|
|
31
31
|
R as DropdownMenuPortal,
|
|
32
32
|
T as DropdownMenuRadioGroup,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.js","sources":["../../src/elements/DropdownMenu.tsx"],"sourcesContent":["'use client';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { Check, ChevronRight, Circle } from 'lucide-react';\nimport { forwardRef } from 'react';\nimport { cn } from '@/lib/utils';\nconst DropdownMenu = DropdownMenuPrimitive.Root;\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\nconst DropdownMenuSubTrigger = forwardRef(({ className, inset, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.SubTrigger, { ref: ref, className: cn('flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-
|
|
1
|
+
{"version":3,"file":"DropdownMenu.js","sources":["../../src/elements/DropdownMenu.tsx"],"sourcesContent":["'use client';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { Check, ChevronRight, Circle } from 'lucide-react';\nimport { forwardRef } from 'react';\nimport { cn } from '@/lib/utils';\nconst DropdownMenu = DropdownMenuPrimitive.Root;\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\nconst DropdownMenuSubTrigger = forwardRef(({ className, inset, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.SubTrigger, { ref: ref, className: cn('flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-chrome-100 data-[state=open]:bg-chrome-100 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0', inset && 'pl-8', className), ...props, children: [children, _jsx(ChevronRight, { className: \"ml-auto\" })] })));\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;\nconst DropdownMenuSubContent = forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.SubContent, { ref: ref, className: cn('z-50 min-w-[8rem] overflow-hidden rounded-md border border-chrome-300 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', className), ...props })));\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;\nconst DropdownMenuContent = forwardRef(({ className, sideOffset = 4, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: cn('z-50 min-w-[8rem] overflow-hidden rounded-md border border-chrome-300 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', className), ...props }) })));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\nconst DropdownMenuItem = forwardRef(({ className, inset, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Item, { ref: ref, className: cn('relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-chrome-100 focus:text-chrome-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0', inset && 'pl-8', className), ...props })));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\nconst DropdownMenuCheckboxItem = forwardRef(({ className, children, checked, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.CheckboxItem, { ref: ref, className: cn('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-chrome-100 focus:text-chrome-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className), checked: checked, ...props, children: [_jsx(\"span\", { className: \"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Check, { className: \"h-4 w-4\" }) }) }), children] })));\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;\nconst DropdownMenuRadioItem = forwardRef(({ className, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.RadioItem, { ref: ref, className: cn('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-chrome-100 focus:text-chrome-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className), ...props, children: [_jsx(\"span\", { className: \"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Circle, { className: \"h-2 w-2 fill-current\" }) }) }), children] })));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\nconst DropdownMenuLabel = forwardRef(({ className, inset, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Label, { ref: ref, className: cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className), ...props })));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\nconst DropdownMenuSeparator = forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Separator, { ref: ref, className: cn('-mx-1 my-1 h-px bg-chrome-300', className), ...props })));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\nconst DropdownMenuShortcut = ({ className, ...props }) => (_jsx(\"span\", { className: cn('ml-auto text-xs tracking-widest opacity-60', className), ...props }));\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut';\nexport { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };\n"],"names":["DropdownMenu","DropdownMenuPrimitive","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","forwardRef","className","inset","children","props","ref","_jsxs","cn","_jsx","ChevronRight","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMenuCheckboxItem","checked","Check","DropdownMenuRadioItem","Circle","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut"],"mappings":";;;;;AAMA,MAAMA,IAAeC,EAAsB,MACrCC,IAAsBD,EAAsB,SAC5CE,IAAoBF,EAAsB,OAC1CG,IAAqBH,EAAsB,QAC3CI,IAAkBJ,EAAsB,KACxCK,IAAyBL,EAAsB,YAC/CM,IAAyBC,EAAW,CAAC,EAAE,WAAAC,GAAW,OAAAC,GAAO,UAAAC,GAAU,GAAGC,EAAM,GAAGC,MAASC,EAAMb,EAAsB,YAAY,EAAE,KAAAY,GAAU,WAAWE,EAAG,kNAAkNL,KAAS,QAAQD,CAAS,GAAG,GAAGG,GAAO,UAAU,CAACD,GAAUK,EAAKC,GAAc,EAAE,WAAW,UAAW,CAAA,CAAC,EAAA,CAAG,CAAE;AAC/dV,EAAuB,cAAcN,EAAsB,WAAW;AAChE,MAAAiB,IAAyBV,EAAW,CAAC,EAAE,WAAAC,GAAW,GAAGG,EAAS,GAAAC,MAASG,EAAKf,EAAsB,YAAY,EAAE,KAAAY,GAAU,WAAWE,EAAG,2cAA2cN,CAAS,GAAG,GAAGG,GAAO,CAAE;AACjnBM,EAAuB,cAAcjB,EAAsB,WAAW;AACtE,MAAMkB,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AAQ,EAAE,WAAW,uBAAA,CAAwB,EAAA,CAAG,EAAG,CAAA,GAAGf,CAAQ,GAAG,CAAE;AACtoBc,EAAsB,cAAcxB,EAAsB,UAAU;AAC9D,MAAA0B,IAAoBnB,EAAW,CAAC,EAAE,WAAAC,GAAW,OAAAC,GAAO,GAAGE,EAAS,GAAAC,MAASG,EAAKf,EAAsB,OAAO,EAAE,KAAAY,GAAU,WAAWE,EAAG,qCAAqCL,KAAS,QAAQD,CAAS,GAAG,GAAGG,GAAO,CAAE;AACzNe,EAAkB,cAAc1B,EAAsB,MAAM;AACtD,MAAA2B,IAAwBpB,EAAW,CAAC,EAAE,WAAAC,GAAW,GAAGG,EAAS,GAAAC,MAASG,EAAKf,EAAsB,WAAW,EAAE,KAAAY,GAAU,WAAWE,EAAG,iCAAiCN,CAAS,GAAG,GAAGG,GAAO,CAAE;AACrMgB,EAAsB,cAAc3B,EAAsB,UAAU;AACpE,MAAM4B,IAAuB,CAAC,EAAE,WAAApB,GAAW,GAAGG,QAAaI,EAAK,QAAQ,EAAE,WAAWD,EAAG,8CAA8CN,CAAS,GAAG,GAAGG,EAAO,CAAA;AAC5JiB,EAAqB,cAAc;"}
|
package/dist/plugin.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const u=require("@tailwindcss/forms"),t=require("tailwindcss/plugin"),e=require("tailwindcss/colors"),y=u();function r(o){const g=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,m=o.replace(g,(b,n,d,c)=>n+n+d+d+c+c),a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(m);return a?`${parseInt(a[1],16)} ${parseInt(a[2],16)} ${parseInt(a[3],16)}`:""}const h=t(o=>{y.handler(o);const{addBase:g}=o;g({":root":{"--accent":r(e.amber[200]),"--accent-foreground":r(e.gray[800]),"--background":r(e.white),"--border":r(e.gray[200]),"--danger":r(e.red[500]),"--danger-foreground":r(e.white),"--foreground":r(e.gray[900]),"--input":r(e.gray[300]),"--muted":r(e.gray[100]),"--muted-foreground":r(e.gray[
|
|
1
|
+
"use strict";const u=require("@tailwindcss/forms"),t=require("tailwindcss/plugin"),e=require("tailwindcss/colors"),y=u();function r(o){const g=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,m=o.replace(g,(b,n,d,c)=>n+n+d+d+c+c),a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(m);return a?`${parseInt(a[1],16)} ${parseInt(a[2],16)} ${parseInt(a[3],16)}`:""}const h=t(o=>{y.handler(o);const{addBase:g}=o;g({":root":{"--accent":r(e.amber[200]),"--accent-foreground":r(e.gray[800]),"--background":r(e.white),"--border":r(e.gray[200]),"--danger":r(e.red[500]),"--danger-foreground":r(e.white),"--foreground":r(e.gray[900]),"--input":r(e.gray[300]),"--muted":r(e.gray[100]),"--muted-foreground":r(e.gray[400]),"--popover":r(e.white),"--popover-foreground":r(e.gray[900]),"--primary":r("#456EDE"),"--primary-foreground":r(e.white),"--ring":r(e.blue[200]),"--secondary":r(e.blue[100]),"--secondary-foreground":r(e.gray[800]),"--chrome-50":r(e.gray[50]),"--chrome-100":r(e.gray[100]),"--chrome-200":r(e.gray[200]),"--chrome-300":r(e.gray[300]),"--chrome-400":r(e.gray[400]),"--chrome-500":r(e.gray[500]),"--chrome-600":r(e.gray[600]),"--chrome-700":r(e.gray[700]),"--chrome-800":r(e.gray[800]),"--chrome-900":r(e.gray[900]),"--chrome-950":r(e.gray[950]),"--chrome-foreground":r(e.gray[800]),"--chrome-foreground-muted":r(e.gray[500]),"--chrome-foreground-subtle":r(e.gray[300]),"--chrome-divider":r(e.gray[300])},".dark":{"--accent":r(e.amber[200]),"--accent-foreground":r(e.gray[800]),"--background":r(e.neutral[800]),"--border":r(e.gray[200]),"--danger":r(e.red[500]),"--danger-foreground":r(e.white),"--foreground":r(e.white),"--input":r(e.gray[300]),"--muted":r(e.gray[100]),"--muted-foreground":r(e.gray[600]),"--popover":r(e.neutral[800]),"--popover-foreground":r(e.white),"--primary":r(e.blue[500]),"--primary-foreground":r(e.white),"--ring":r(e.blue[200]),"--secondary":r(e.blue[100]),"--secondary-foreground":r(e.gray[800]),"--chrome-50":r(e.gray[950]),"--chrome-100":r(e.gray[900]),"--chrome-200":r(e.gray[800]),"--chrome-300":r(e.gray[700]),"--chrome-400":r(e.gray[600]),"--chrome-500":r(e.gray[500]),"--chrome-600":r(e.gray[400]),"--chrome-700":r(e.gray[300]),"--chrome-800":r(e.gray[200]),"--chrome-900":r(e.gray[100]),"--chrome-950":r(e.gray[50]),"--chrome-foreground":r(e.white),"--chrome-divider":r(e.gray[700])},"*":{"@apply border-border":""},body:{"@apply bg-background text-foreground":"","font-feature-settings":'"rlig" 1, "calt" 1',"@apply antialiased":""}})},{darkMode:"selector",theme:{screens:{sm:"576px",md:"768px",lg:"992px",xl:"1200px","2xl":"1400px"},extend:{maxWidth:{"max-w-screen-sm":"540px","max-w-screen-md":"720px","max-w-screen-lg":"960px","max-w-screen-xl":"1140px","max-w-screen-2xl":"1320px"},colors:{accent:{DEFAULT:"rgb(var(--accent))",foreground:"rgb(var(--accent-foreground))"},background:{DEFAULT:"rgb(var(--background))"},border:{DEFAULT:"rgb(var(--border))"},danger:{DEFAULT:"rgb(var(--danger))",foreground:"rgb(var(--danger-foreground))"},foreground:{DEFAULT:"rgb(var(--foreground))"},input:{DEFAULT:"rgb(var(--input))"},muted:{DEFAULT:"rgb(var(--muted))",foreground:"rgb(var(--muted-foreground))"},popover:{DEFAULT:"rgb(var(--popover))",foreground:"rgb(var(--popover-foreground))"},primary:{DEFAULT:"rgb(var(--primary))",foreground:"rgb(var(--primary-foreground))"},ring:{DEFAULT:"rgb(var(--ring))"},secondary:{DEFAULT:"rgb(var(--secondary))",foreground:"rgb(var(--secondary-foreground))"},chrome:{50:"rgb(var(--chrome-50))",100:"rgb(var(--chrome-100))",200:"rgb(var(--chrome-200))",300:"rgb(var(--chrome-300))",400:"rgb(var(--chrome-400))",500:"rgb(var(--chrome-500))",600:"rgb(var(--chrome-600))",700:"rgb(var(--chrome-700))",800:"rgb(var(--chrome-800))",900:"rgb(var(--chrome-900))",950:"rgb(var(--chrome-950))",foreground:"rgb(var(--chrome-foreground))",divider:"rgb(var(--chrome-divider))"}}}}});module.exports=h;
|
|
2
2
|
//# sourceMappingURL=plugin.cjs.map
|
package/dist/plugin.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs","sources":["../src/plugin.ts"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport forms from '@tailwindcss/forms';\nimport plugin from 'tailwindcss/plugin';\nimport colors from 'tailwindcss/colors';\nconst formsPlugin = forms();\n// https://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb\nfunction hexToRgb(hex) {\n // Expand shorthand form (e.g. \"03F\") to full form (e.g. \"0033FF\")\n const shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n const hexFixed = hex.replace(shorthandRegex, (_, r, g, b) => (r + r + g + g + b + b));\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hexFixed);\n return result ? `${parseInt(result[1], 16)} ${parseInt(result[2], 16)} ${parseInt(result[3], 16)}` : '';\n}\n/**\n * Plugin\n */\nexport default plugin((apiArgs) => {\n // initialize forms plugin\n // @ts-expect-error Expected 0 arguments, but got 1.\n formsPlugin.handler(apiArgs);\n // add custom styles\n const { addBase } = apiArgs;\n addBase({\n ':root': {\n '--accent': hexToRgb(colors.amber[200]),\n '--accent-foreground': hexToRgb(colors.gray[800]),\n '--background': hexToRgb(colors.white),\n '--border': hexToRgb(colors.gray[200]),\n '--danger': hexToRgb(colors.red[500]),\n '--danger-foreground': hexToRgb(colors.white),\n '--foreground': hexToRgb(colors.gray[900]),\n '--input': hexToRgb(colors.gray[300]),\n '--muted': hexToRgb(colors.gray[100]),\n '--muted-foreground': hexToRgb(colors.gray[800]),\n '--popover': hexToRgb(colors.white),\n '--popover-foreground': hexToRgb(colors.gray[900]),\n '--primary': hexToRgb('#456EDE'),\n '--primary-foreground': hexToRgb(colors.white),\n '--ring': hexToRgb(colors.blue[200]),\n '--secondary': hexToRgb(colors.blue[100]),\n '--secondary-foreground': hexToRgb(colors.gray[800]),\n '--chrome-50': hexToRgb(colors.gray[50]),\n '--chrome-100': hexToRgb(colors.gray[100]),\n '--chrome-200': hexToRgb(colors.gray[200]),\n '--chrome-300': hexToRgb(colors.gray[300]),\n '--chrome-400': hexToRgb(colors.gray[400]),\n '--chrome-500': hexToRgb(colors.gray[500]),\n '--chrome-600': hexToRgb(colors.gray[600]),\n '--chrome-700': hexToRgb(colors.gray[700]),\n '--chrome-800': hexToRgb(colors.gray[800]),\n '--chrome-900': hexToRgb(colors.gray[900]),\n '--chrome-950': hexToRgb(colors.gray[950]),\n '--chrome-foreground': hexToRgb(colors.gray[800]),\n '--chrome-foreground-muted': hexToRgb(colors.gray[500]),\n '--chrome-foreground-subtle': hexToRgb(colors.gray[300]),\n '--chrome-divider': hexToRgb(colors.gray[300]),\n },\n '.dark': {\n '--accent': hexToRgb(colors.amber[200]),\n '--accent-foreground': hexToRgb(colors.gray[800]),\n '--background': hexToRgb(colors.neutral[800]),\n '--border': hexToRgb(colors.gray[200]),\n '--danger': hexToRgb(colors.red[500]),\n '--danger-foreground': hexToRgb(colors.white),\n '--foreground': hexToRgb(colors.white),\n '--input': hexToRgb(colors.gray[300]),\n '--muted': hexToRgb(colors.gray[100]),\n '--muted-foreground': hexToRgb(colors.gray[800]),\n '--popover': hexToRgb(colors.neutral[800]),\n '--popover-foreground': hexToRgb(colors.white),\n '--primary': hexToRgb(colors.blue[500]),\n '--primary-foreground': hexToRgb(colors.white),\n '--ring': hexToRgb(colors.blue[200]),\n '--secondary': hexToRgb(colors.blue[100]),\n '--secondary-foreground': hexToRgb(colors.gray[800]),\n '--chrome-50': hexToRgb(colors.gray[950]),\n '--chrome-100': hexToRgb(colors.gray[900]),\n '--chrome-200': hexToRgb(colors.gray[800]),\n '--chrome-300': hexToRgb(colors.gray[700]),\n '--chrome-400': hexToRgb(colors.gray[600]),\n '--chrome-500': hexToRgb(colors.gray[500]),\n '--chrome-600': hexToRgb(colors.gray[400]),\n '--chrome-700': hexToRgb(colors.gray[300]),\n '--chrome-800': hexToRgb(colors.gray[200]),\n '--chrome-900': hexToRgb(colors.gray[100]),\n '--chrome-950': hexToRgb(colors.gray[50]),\n '--chrome-foreground': hexToRgb(colors.white),\n '--chrome-divider': hexToRgb(colors.gray[700]),\n },\n '*': {\n '@apply border-border': '',\n },\n body: {\n '@apply bg-background text-foreground': '',\n 'font-feature-settings': '\"rlig\" 1, \"calt\" 1',\n '@apply antialiased': '',\n },\n });\n}, {\n darkMode: 'selector',\n theme: {\n screens: {\n sm: '576px',\n md: '768px',\n lg: '992px',\n xl: '1200px',\n '2xl': '1400px',\n },\n extend: {\n maxWidth: {\n 'max-w-screen-sm': '540px',\n 'max-w-screen-md': '720px',\n 'max-w-screen-lg': '960px',\n 'max-w-screen-xl': '1140px',\n 'max-w-screen-2xl': '1320px',\n },\n colors: {\n accent: {\n DEFAULT: 'rgb(var(--accent))',\n foreground: 'rgb(var(--accent-foreground))',\n },\n background: {\n DEFAULT: 'rgb(var(--background))',\n },\n border: {\n DEFAULT: 'rgb(var(--border))',\n },\n danger: {\n DEFAULT: 'rgb(var(--danger))',\n foreground: 'rgb(var(--danger-foreground))',\n },\n foreground: {\n DEFAULT: 'rgb(var(--foreground))',\n },\n input: {\n DEFAULT: 'rgb(var(--input))',\n },\n muted: {\n DEFAULT: 'rgb(var(--muted))',\n foreground: 'rgb(var(--muted-foreground))',\n },\n popover: {\n DEFAULT: 'rgb(var(--popover))',\n foreground: 'rgb(var(--popover-foreground))',\n },\n primary: {\n DEFAULT: 'rgb(var(--primary))',\n foreground: 'rgb(var(--primary-foreground))',\n },\n ring: {\n DEFAULT: 'rgb(var(--ring))',\n },\n secondary: {\n DEFAULT: 'rgb(var(--secondary))',\n foreground: 'rgb(var(--secondary-foreground))',\n },\n chrome: {\n 50: 'rgb(var(--chrome-50))',\n 100: 'rgb(var(--chrome-100))',\n 200: 'rgb(var(--chrome-200))',\n 300: 'rgb(var(--chrome-300))',\n 400: 'rgb(var(--chrome-400))',\n 500: 'rgb(var(--chrome-500))',\n 600: 'rgb(var(--chrome-600))',\n 700: 'rgb(var(--chrome-700))',\n 800: 'rgb(var(--chrome-800))',\n 900: 'rgb(var(--chrome-900))',\n 950: 'rgb(var(--chrome-950))',\n foreground: 'rgb(var(--chrome-foreground))',\n divider: 'rgb(var(--chrome-divider))',\n },\n },\n },\n },\n});\n"],"names":["formsPlugin","forms","hexToRgb","hex","shorthandRegex","hexFixed","_","r","g","b","result","plugin","apiArgs","addBase","colors"],"mappings":"mHAgBMA,EAAcC,EAAM,EAE1B,SAASC,EAASC,EAAK,CAEnB,MAAMC,EAAiB,mCACjBC,EAAWF,EAAI,QAAQC,EAAgB,CAACE,EAAGC,EAAGC,EAAGC,IAAOF,EAAIA,EAAIC,EAAIA,EAAIC,EAAIA,CAAE,EAC9EC,EAAS,4CAA4C,KAAKL,CAAQ,EACjE,OAAAK,EAAS,GAAG,SAASA,EAAO,CAAC,EAAG,EAAE,CAAC,IAAI,SAASA,EAAO,CAAC,EAAG,EAAE,CAAC,IAAI,SAASA,EAAO,CAAC,EAAG,EAAE,CAAC,GAAK,EACzG,CAIA,MAAAC,EAAeA,EAAQC,GAAY,CAG/BZ,EAAY,QAAQY,CAAO,EAErB,KAAA,CAAE,QAAAC,GAAYD,EACZC,EAAA,CACJ,QAAS,C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ources":["../src/plugin.ts"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport forms from '@tailwindcss/forms';\nimport plugin from 'tailwindcss/plugin';\nimport colors from 'tailwindcss/colors';\nconst formsPlugin = forms();\n// https://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb\nfunction hexToRgb(hex) {\n // Expand shorthand form (e.g. \"03F\") to full form (e.g. \"0033FF\")\n const shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n const hexFixed = hex.replace(shorthandRegex, (_, r, g, b) => (r + r + g + g + b + b));\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hexFixed);\n return result ? `${parseInt(result[1], 16)} ${parseInt(result[2], 16)} ${parseInt(result[3], 16)}` : '';\n}\n/**\n * Plugin\n */\nexport default plugin((apiArgs) => {\n // initialize forms plugin\n // @ts-expect-error Expected 0 arguments, but got 1.\n formsPlugin.handler(apiArgs);\n // add custom styles\n const { addBase } = apiArgs;\n addBase({\n ':root': {\n '--accent': hexToRgb(colors.amber[200]),\n '--accent-foreground': hexToRgb(colors.gray[800]),\n '--background': hexToRgb(colors.white),\n '--border': hexToRgb(colors.gray[200]),\n '--danger': hexToRgb(colors.red[500]),\n '--danger-foreground': hexToRgb(colors.white),\n '--foreground': hexToRgb(colors.gray[900]),\n '--input': hexToRgb(colors.gray[300]),\n '--muted': hexToRgb(colors.gray[100]),\n '--muted-foreground': hexToRgb(colors.gray[400]),\n '--popover': hexToRgb(colors.white),\n '--popover-foreground': hexToRgb(colors.gray[900]),\n '--primary': hexToRgb('#456EDE'),\n '--primary-foreground': hexToRgb(colors.white),\n '--ring': hexToRgb(colors.blue[200]),\n '--secondary': hexToRgb(colors.blue[100]),\n '--secondary-foreground': hexToRgb(colors.gray[800]),\n '--chrome-50': hexToRgb(colors.gray[50]),\n '--chrome-100': hexToRgb(colors.gray[100]),\n '--chrome-200': hexToRgb(colors.gray[200]),\n '--chrome-300': hexToRgb(colors.gray[300]),\n '--chrome-400': hexToRgb(colors.gray[400]),\n '--chrome-500': hexToRgb(colors.gray[500]),\n '--chrome-600': hexToRgb(colors.gray[600]),\n '--chrome-700': hexToRgb(colors.gray[700]),\n '--chrome-800': hexToRgb(colors.gray[800]),\n '--chrome-900': hexToRgb(colors.gray[900]),\n '--chrome-950': hexToRgb(colors.gray[950]),\n '--chrome-foreground': hexToRgb(colors.gray[800]),\n '--chrome-foreground-muted': hexToRgb(colors.gray[500]),\n '--chrome-foreground-subtle': hexToRgb(colors.gray[300]),\n '--chrome-divider': hexToRgb(colors.gray[300]),\n },\n '.dark': {\n '--accent': hexToRgb(colors.amber[200]),\n '--accent-foreground': hexToRgb(colors.gray[800]),\n '--background': hexToRgb(colors.neutral[800]),\n '--border': hexToRgb(colors.gray[200]),\n '--danger': hexToRgb(colors.red[500]),\n '--danger-foreground': hexToRgb(colors.white),\n '--foreground': hexToRgb(colors.white),\n '--input': hexToRgb(colors.gray[300]),\n '--muted': hexToRgb(colors.gray[100]),\n '--muted-foreground': hexToRgb(colors.gray[600]),\n '--popover': hexToRgb(colors.neutral[800]),\n '--popover-foreground': hexToRgb(colors.white),\n '--primary': hexToRgb(colors.blue[500]),\n '--primary-foreground': hexToRgb(colors.white),\n '--ring': hexToRgb(colors.blue[200]),\n '--secondary': hexToRgb(colors.blue[100]),\n '--secondary-foreground': hexToRgb(colors.gray[800]),\n '--chrome-50': hexToRgb(colors.gray[950]),\n '--chrome-100': hexToRgb(colors.gray[900]),\n '--chrome-200': hexToRgb(colors.gray[800]),\n '--chrome-300': hexToRgb(colors.gray[700]),\n '--chrome-400': hexToRgb(colors.gray[600]),\n '--chrome-500': hexToRgb(colors.gray[500]),\n '--chrome-600': hexToRgb(colors.gray[400]),\n '--chrome-700': hexToRgb(colors.gray[300]),\n '--chrome-800': hexToRgb(colors.gray[200]),\n '--chrome-900': hexToRgb(colors.gray[100]),\n '--chrome-950': hexToRgb(colors.gray[50]),\n '--chrome-foreground': hexToRgb(colors.white),\n '--chrome-divider': hexToRgb(colors.gray[700]),\n },\n '*': {\n '@apply border-border': '',\n },\n body: {\n '@apply bg-background text-foreground': '',\n 'font-feature-settings': '\"rlig\" 1, \"calt\" 1',\n '@apply antialiased': '',\n },\n });\n}, {\n darkMode: 'selector',\n theme: {\n screens: {\n sm: '576px',\n md: '768px',\n lg: '992px',\n xl: '1200px',\n '2xl': '1400px',\n },\n extend: {\n maxWidth: {\n 'max-w-screen-sm': '540px',\n 'max-w-screen-md': '720px',\n 'max-w-screen-lg': '960px',\n 'max-w-screen-xl': '1140px',\n 'max-w-screen-2xl': '1320px',\n },\n colors: {\n accent: {\n DEFAULT: 'rgb(var(--accent))',\n foreground: 'rgb(var(--accent-foreground))',\n },\n background: {\n DEFAULT: 'rgb(var(--background))',\n },\n border: {\n DEFAULT: 'rgb(var(--border))',\n },\n danger: {\n DEFAULT: 'rgb(var(--danger))',\n foreground: 'rgb(var(--danger-foreground))',\n },\n foreground: {\n DEFAULT: 'rgb(var(--foreground))',\n },\n input: {\n DEFAULT: 'rgb(var(--input))',\n },\n muted: {\n DEFAULT: 'rgb(var(--muted))',\n foreground: 'rgb(var(--muted-foreground))',\n },\n popover: {\n DEFAULT: 'rgb(var(--popover))',\n foreground: 'rgb(var(--popover-foreground))',\n },\n primary: {\n DEFAULT: 'rgb(var(--primary))',\n foreground: 'rgb(var(--primary-foreground))',\n },\n ring: {\n DEFAULT: 'rgb(var(--ring))',\n },\n secondary: {\n DEFAULT: 'rgb(var(--secondary))',\n foreground: 'rgb(var(--secondary-foreground))',\n },\n chrome: {\n 50: 'rgb(var(--chrome-50))',\n 100: 'rgb(var(--chrome-100))',\n 200: 'rgb(var(--chrome-200))',\n 300: 'rgb(var(--chrome-300))',\n 400: 'rgb(var(--chrome-400))',\n 500: 'rgb(var(--chrome-500))',\n 600: 'rgb(var(--chrome-600))',\n 700: 'rgb(var(--chrome-700))',\n 800: 'rgb(var(--chrome-800))',\n 900: 'rgb(var(--chrome-900))',\n 950: 'rgb(var(--chrome-950))',\n foreground: 'rgb(var(--chrome-foreground))',\n divider: 'rgb(var(--chrome-divider))',\n },\n },\n },\n },\n});\n"],"names":["formsPlugin","forms","hexToRgb","hex","shorthandRegex","hexFixed","_","r","g","b","result","plugin","apiArgs","addBase","colors"],"mappings":"mHAgBMA,EAAcC,EAAM,EAE1B,SAASC,EAASC,EAAK,CAEnB,MAAMC,EAAiB,mCACjBC,EAAWF,EAAI,QAAQC,EAAgB,CAACE,EAAGC,EAAGC,EAAGC,IAAOF,EAAIA,EAAIC,EAAIA,EAAIC,EAAIA,CAAE,EAC9EC,EAAS,4CAA4C,KAAKL,CAAQ,EACjE,OAAAK,EAAS,GAAG,SAASA,EAAO,CAAC,EAAG,EAAE,CAAC,IAAI,SAASA,EAAO,CAAC,EAAG,EAAE,CAAC,IAAI,SAASA,EAAO,CAAC,EAAG,EAAE,CAAC,GAAK,EACzG,CAIA,MAAAC,EAAeA,EAAQC,GAAY,CAG/BZ,EAAY,QAAQY,CAAO,EAErB,KAAA,CAAE,QAAAC,GAAYD,EACZC,EAAA,CACJ,QAAS,CACL,WAAYX,EAASY,EAAO,MAAM,GAAG,CAAC,EACtC,sBAAuBZ,EAASY,EAAO,KAAK,GAAG,CAAC,EAChD,eAAgBZ,EAASY,EAAO,KAAK,EACrC,WAAYZ,EAASY,EAAO,KAAK,GAAG,CAAC,EACrC,WAAYZ,EAASY,EAAO,IAAI,GAAG,CAAC,EACpC,sBAAuBZ,EAASY,EAAO,KAAK,EAC5C,eAAgBZ,EAASY,EAAO,KAAK,GAAG,CAAC,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AwB,EAC5B,EACA,KAAM,CACF,uCAAwC,GACxC,wBAAyB,qBACzB,qBAAsB,EAAA,CAC1B,CACH,CACL,EAAG,CACC,SAAU,WACV,MAAO,CACH,QAAS,CACL,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,SACJ,MAAO,QACX,EACA,OAAQ,CACJ,SAAU,CACN,kBAAmB,QACnB,kBAAmB,QACnB,kBAAmB,QACnB,kBAAmB,SACnB,mBAAoB,QACxB,EACA,OAAQ,CACJ,OAAQ,CACJ,QAAS,qBACT,WAAY,+BAChB,EACA,WAAY,CACR,QAAS,wBACb,EACA,OAAQ,CACJ,QAAS,oBACb,EACA,OAAQ,CACJ,QAAS,qBACT,WAAY,+BAChB,EACA,WAAY,CACR,QAAS,wBACb,EACA,MAAO,CACH,QAAS,mBACb,EACA,MAAO,CACH,QAAS,oBACT,WAAY,8BAChB,EACA,QAAS,CACL,QAAS,sBACT,WAAY,gCAChB,EACA,QAAS,CACL,QAAS,sBACT,WAAY,gCAChB,EACA,KAAM,CACF,QAAS,kBACb,EACA,UAAW,CACP,QAAS,wBACT,WAAY,kCAChB,EACA,OAAQ,CACJ,GAAI,wBACJ,IAAK,yBACL,IAAK,yBACL,IAAK,yBACL,IAAK,yBACL,IAAK,yBACL,IAAK,yBACL,IAAK,yBACL,IAAK,yBACL,IAAK,yBACL,IAAK,yBACL,WAAY,gCACZ,QAAS,4BAAA,CACb,CACJ,CACJ,CAER,CAAC"}
|
package/dist/plugin.js
CHANGED
|
@@ -20,7 +20,7 @@ const i = t((o) => {
|
|
|
20
20
|
"--foreground": r(e.gray[900]),
|
|
21
21
|
"--input": r(e.gray[300]),
|
|
22
22
|
"--muted": r(e.gray[100]),
|
|
23
|
-
"--muted-foreground": r(e.gray[
|
|
23
|
+
"--muted-foreground": r(e.gray[400]),
|
|
24
24
|
"--popover": r(e.white),
|
|
25
25
|
"--popover-foreground": r(e.gray[900]),
|
|
26
26
|
"--primary": r("#456EDE"),
|
|
@@ -54,7 +54,7 @@ const i = t((o) => {
|
|
|
54
54
|
"--foreground": r(e.white),
|
|
55
55
|
"--input": r(e.gray[300]),
|
|
56
56
|
"--muted": r(e.gray[100]),
|
|
57
|
-
"--muted-foreground": r(e.gray[
|
|
57
|
+
"--muted-foreground": r(e.gray[600]),
|
|
58
58
|
"--popover": r(e.neutral[800]),
|
|
59
59
|
"--popover-foreground": r(e.white),
|
|
60
60
|
"--primary": r(e.blue[500]),
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["../src/plugin.ts"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport forms from '@tailwindcss/forms';\nimport plugin from 'tailwindcss/plugin';\nimport colors from 'tailwindcss/colors';\nconst formsPlugin = forms();\n// https://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb\nfunction hexToRgb(hex) {\n // Expand shorthand form (e.g. \"03F\") to full form (e.g. \"0033FF\")\n const shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n const hexFixed = hex.replace(shorthandRegex, (_, r, g, b) => (r + r + g + g + b + b));\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hexFixed);\n return result ? `${parseInt(result[1], 16)} ${parseInt(result[2], 16)} ${parseInt(result[3], 16)}` : '';\n}\n/**\n * Plugin\n */\nexport default plugin((apiArgs) => {\n // initialize forms plugin\n // @ts-expect-error Expected 0 arguments, but got 1.\n formsPlugin.handler(apiArgs);\n // add custom styles\n const { addBase } = apiArgs;\n addBase({\n ':root': {\n '--accent': hexToRgb(colors.amber[200]),\n '--accent-foreground': hexToRgb(colors.gray[800]),\n '--background': hexToRgb(colors.white),\n '--border': hexToRgb(colors.gray[200]),\n '--danger': hexToRgb(colors.red[500]),\n '--danger-foreground': hexToRgb(colors.white),\n '--foreground': hexToRgb(colors.gray[900]),\n '--input': hexToRgb(colors.gray[300]),\n '--muted': hexToRgb(colors.gray[100]),\n '--muted-foreground': hexToRgb(colors.gray[800]),\n '--popover': hexToRgb(colors.white),\n '--popover-foreground': hexToRgb(colors.gray[900]),\n '--primary': hexToRgb('#456EDE'),\n '--primary-foreground': hexToRgb(colors.white),\n '--ring': hexToRgb(colors.blue[200]),\n '--secondary': hexToRgb(colors.blue[100]),\n '--secondary-foreground': hexToRgb(colors.gray[800]),\n '--chrome-50': hexToRgb(colors.gray[50]),\n '--chrome-100': hexToRgb(colors.gray[100]),\n '--chrome-200': hexToRgb(colors.gray[200]),\n '--chrome-300': hexToRgb(colors.gray[300]),\n '--chrome-400': hexToRgb(colors.gray[400]),\n '--chrome-500': hexToRgb(colors.gray[500]),\n '--chrome-600': hexToRgb(colors.gray[600]),\n '--chrome-700': hexToRgb(colors.gray[700]),\n '--chrome-800': hexToRgb(colors.gray[800]),\n '--chrome-900': hexToRgb(colors.gray[900]),\n '--chrome-950': hexToRgb(colors.gray[950]),\n '--chrome-foreground': hexToRgb(colors.gray[800]),\n '--chrome-foreground-muted': hexToRgb(colors.gray[500]),\n '--chrome-foreground-subtle': hexToRgb(colors.gray[300]),\n '--chrome-divider': hexToRgb(colors.gray[300]),\n },\n '.dark': {\n '--accent': hexToRgb(colors.amber[200]),\n '--accent-foreground': hexToRgb(colors.gray[800]),\n '--background': hexToRgb(colors.neutral[800]),\n '--border': hexToRgb(colors.gray[200]),\n '--danger': hexToRgb(colors.red[500]),\n '--danger-foreground': hexToRgb(colors.white),\n '--foreground': hexToRgb(colors.white),\n '--input': hexToRgb(colors.gray[300]),\n '--muted': hexToRgb(colors.gray[100]),\n '--muted-foreground': hexToRgb(colors.gray[800]),\n '--popover': hexToRgb(colors.neutral[800]),\n '--popover-foreground': hexToRgb(colors.white),\n '--primary': hexToRgb(colors.blue[500]),\n '--primary-foreground': hexToRgb(colors.white),\n '--ring': hexToRgb(colors.blue[200]),\n '--secondary': hexToRgb(colors.blue[100]),\n '--secondary-foreground': hexToRgb(colors.gray[800]),\n '--chrome-50': hexToRgb(colors.gray[950]),\n '--chrome-100': hexToRgb(colors.gray[900]),\n '--chrome-200': hexToRgb(colors.gray[800]),\n '--chrome-300': hexToRgb(colors.gray[700]),\n '--chrome-400': hexToRgb(colors.gray[600]),\n '--chrome-500': hexToRgb(colors.gray[500]),\n '--chrome-600': hexToRgb(colors.gray[400]),\n '--chrome-700': hexToRgb(colors.gray[300]),\n '--chrome-800': hexToRgb(colors.gray[200]),\n '--chrome-900': hexToRgb(colors.gray[100]),\n '--chrome-950': hexToRgb(colors.gray[50]),\n '--chrome-foreground': hexToRgb(colors.white),\n '--chrome-divider': hexToRgb(colors.gray[700]),\n },\n '*': {\n '@apply border-border': '',\n },\n body: {\n '@apply bg-background text-foreground': '',\n 'font-feature-settings': '\"rlig\" 1, \"calt\" 1',\n '@apply antialiased': '',\n },\n });\n}, {\n darkMode: 'selector',\n theme: {\n screens: {\n sm: '576px',\n md: '768px',\n lg: '992px',\n xl: '1200px',\n '2xl': '1400px',\n },\n extend: {\n maxWidth: {\n 'max-w-screen-sm': '540px',\n 'max-w-screen-md': '720px',\n 'max-w-screen-lg': '960px',\n 'max-w-screen-xl': '1140px',\n 'max-w-screen-2xl': '1320px',\n },\n colors: {\n accent: {\n DEFAULT: 'rgb(var(--accent))',\n foreground: 'rgb(var(--accent-foreground))',\n },\n background: {\n DEFAULT: 'rgb(var(--background))',\n },\n border: {\n DEFAULT: 'rgb(var(--border))',\n },\n danger: {\n DEFAULT: 'rgb(var(--danger))',\n foreground: 'rgb(var(--danger-foreground))',\n },\n foreground: {\n DEFAULT: 'rgb(var(--foreground))',\n },\n input: {\n DEFAULT: 'rgb(var(--input))',\n },\n muted: {\n DEFAULT: 'rgb(var(--muted))',\n foreground: 'rgb(var(--muted-foreground))',\n },\n popover: {\n DEFAULT: 'rgb(var(--popover))',\n foreground: 'rgb(var(--popover-foreground))',\n },\n primary: {\n DEFAULT: 'rgb(var(--primary))',\n foreground: 'rgb(var(--primary-foreground))',\n },\n ring: {\n DEFAULT: 'rgb(var(--ring))',\n },\n secondary: {\n DEFAULT: 'rgb(var(--secondary))',\n foreground: 'rgb(var(--secondary-foreground))',\n },\n chrome: {\n 50: 'rgb(var(--chrome-50))',\n 100: 'rgb(var(--chrome-100))',\n 200: 'rgb(var(--chrome-200))',\n 300: 'rgb(var(--chrome-300))',\n 400: 'rgb(var(--chrome-400))',\n 500: 'rgb(var(--chrome-500))',\n 600: 'rgb(var(--chrome-600))',\n 700: 'rgb(var(--chrome-700))',\n 800: 'rgb(var(--chrome-800))',\n 900: 'rgb(var(--chrome-900))',\n 950: 'rgb(var(--chrome-950))',\n foreground: 'rgb(var(--chrome-foreground))',\n divider: 'rgb(var(--chrome-divider))',\n },\n },\n },\n },\n});\n"],"names":["formsPlugin","forms","hexToRgb","hex","shorthandRegex","hexFixed","_","r","g","b","result","plugin","apiArgs","addBase","colors"],"mappings":";;;AAgBA,MAAMA,IAAcC,EAAM;AAE1B,SAASC,EAASC,GAAK;AAEnB,QAAMC,IAAiB,oCACjBC,IAAWF,EAAI,QAAQC,GAAgB,CAACE,GAAGC,GAAGC,GAAGC,MAAOF,IAAIA,IAAIC,IAAIA,IAAIC,IAAIA,CAAE,GAC9EC,IAAS,4CAA4C,KAAKL,CAAQ;AACjE,SAAAK,IAAS,GAAG,SAASA,EAAO,CAAC,GAAG,EAAE,CAAC,IAAI,SAASA,EAAO,CAAC,GAAG,EAAE,CAAC,IAAI,SAASA,EAAO,CAAC,GAAG,EAAE,CAAC,KAAK;AACzG;AAIA,MAAAC,IAAeA,EAAO,CAACC,MAAY;AAG/B,EAAA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,oBAAoB;AAAA,MACxB;AAAA,MACA,QAAQ;AAAA,QACJ,QAAQ;AAAA,UACJ,SAAS;AAAA,UACT,YAAY;AAAA,QAChB;AAAA,QACA,YAAY;AAAA,UACR,SAAS;AAAA,QACb;AAAA,QACA,QAAQ;AAAA,UACJ,SAAS;AAAA,QACb;AAAA,QACA,QAAQ;AAAA,UACJ,SAAS;AAAA,UACT,YAAY;AAAA,QAChB;AAAA,QACA,YAAY;AAAA,UACR,SAAS;AAAA,QACb;AAAA,QACA,OAAO;AAAA,UACH,SAAS;AAAA,QACb;AAAA,QACA,OAAO;AAAA,UACH,SAAS;AAAA,UACT,YAAY;AAAA,QAChB;AAAA,QACA,SAAS;AAAA,UACL,SAAS;AAAA,UACT,YAAY;AAAA,QAChB;AAAA,QACA,SAAS;AAAA,UACL,SAAS;AAAA,UACT,YAAY;AAAA,QAChB;AAAA,QACA,MAAM;AAAA,UACF,SAAS;AAAA,QACb;AAAA,QACA,WAAW;AAAA,UACP,SAAS;AAAA,UACT,YAAY;AAAA,QAChB;AAAA,QACA,QAAQ;AAAA,UACJ,IAAI;AAAA,UACJ,KAAK;AAAA,UACL,KAAK;AAAA,UACL,KAAK;AAAA,UACL,KAAK;AAAA,UACL,KAAK;AAAA,UACL,KAAK;AAAA,UACL,KAAK;AAAA,UACL,KAAK;AAAA,UACL,KAAK;AAAA,UACL,KAAK;AAAA,UACL,YAAY;AAAA,UACZ,SAAS;AAAA,QAAA;AAAA,MACb;AAAA,IACJ;AAAA,EACJ;AAER,CAAC;"}
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["../src/plugin.ts"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport forms from '@tailwindcss/forms';\nimport plugin from 'tailwindcss/plugin';\nimport colors from 'tailwindcss/colors';\nconst formsPlugin = forms();\n// https://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb\nfunction hexToRgb(hex) {\n // Expand shorthand form (e.g. \"03F\") to full form (e.g. \"0033FF\")\n const shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n const hexFixed = hex.replace(shorthandRegex, (_, r, g, b) => (r + r + g + g + b + b));\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hexFixed);\n return result ? `${parseInt(result[1], 16)} ${parseInt(result[2], 16)} ${parseInt(result[3], 16)}` : '';\n}\n/**\n * Plugin\n */\nexport default plugin((apiArgs) => {\n // initialize forms plugin\n // @ts-expect-error Expected 0 arguments, but got 1.\n formsPlugin.handler(apiArgs);\n // add custom styles\n const { addBase } = apiArgs;\n addBase({\n ':root': {\n '--accent': hexToRgb(colors.amber[200]),\n '--accent-foreground': hexToRgb(colors.gray[800]),\n '--background': hexToRgb(colors.white),\n '--border': hexToRgb(colors.gray[200]),\n '--danger': hexToRgb(colors.red[500]),\n '--danger-foreground': hexToRgb(colors.white),\n '--foreground': hexToRgb(colors.gray[900]),\n '--input': hexToRgb(colors.gray[300]),\n '--muted': hexToRgb(colors.gray[100]),\n '--muted-foreground': hexToRgb(colors.gray[400]),\n '--popover': hexToRgb(colors.white),\n '--popover-foreground': hexToRgb(colors.gray[900]),\n '--primary': hexToRgb('#456EDE'),\n '--primary-foreground': hexToRgb(colors.white),\n '--ring': hexToRgb(colors.blue[200]),\n '--secondary': hexToRgb(colors.blue[100]),\n '--secondary-foreground': hexToRgb(colors.gray[800]),\n '--chrome-50': hexToRgb(colors.gray[50]),\n '--chrome-100': hexToRgb(colors.gray[100]),\n '--chrome-200': hexToRgb(colors.gray[200]),\n '--chrome-300': hexToRgb(colors.gray[300]),\n '--chrome-400': hexToRgb(colors.gray[400]),\n '--chrome-500': hexToRgb(colors.gray[500]),\n '--chrome-600': hexToRgb(colors.gray[600]),\n '--chrome-700': hexToRgb(colors.gray[700]),\n '--chrome-800': hexToRgb(colors.gray[800]),\n '--chrome-900': hexToRgb(colors.gray[900]),\n '--chrome-950': hexToRgb(colors.gray[950]),\n '--chrome-foreground': hexToRgb(colors.gray[800]),\n '--chrome-foreground-muted': hexToRgb(colors.gray[500]),\n '--chrome-foreground-subtle': hexToRgb(colors.gray[300]),\n '--chrome-divider': hexToRgb(colors.gray[300]),\n },\n '.dark': {\n '--accent': hexToRgb(colors.amber[200]),\n '--accent-foreground': hexToRgb(colors.gray[800]),\n '--background': hexToRgb(colors.neutral[800]),\n '--border': hexToRgb(colors.gray[200]),\n '--danger': hexToRgb(colors.red[500]),\n '--danger-foreground': hexToRgb(colors.white),\n '--foreground': hexToRgb(colors.white),\n '--input': hexToRgb(colors.gray[300]),\n '--muted': hexToRgb(colors.gray[100]),\n '--muted-foreground': hexToRgb(colors.gray[600]),\n '--popover': hexToRgb(colors.neutral[800]),\n '--popover-foreground': hexToRgb(colors.white),\n '--primary': hexToRgb(colors.blue[500]),\n '--primary-foreground': hexToRgb(colors.white),\n '--ring': hexToRgb(colors.blue[200]),\n '--secondary': hexToRgb(colors.blue[100]),\n '--secondary-foreground': hexToRgb(colors.gray[800]),\n '--chrome-50': hexToRgb(colors.gray[950]),\n '--chrome-100': hexToRgb(colors.gray[900]),\n '--chrome-200': hexToRgb(colors.gray[800]),\n '--chrome-300': hexToRgb(colors.gray[700]),\n '--chrome-400': hexToRgb(colors.gray[600]),\n '--chrome-500': hexToRgb(colors.gray[500]),\n '--chrome-600': hexToRgb(colors.gray[400]),\n '--chrome-700': hexToRgb(colors.gray[300]),\n '--chrome-800': hexToRgb(colors.gray[200]),\n '--chrome-900': hexToRgb(colors.gray[100]),\n '--chrome-950': hexToRgb(colors.gray[50]),\n '--chrome-foreground': hexToRgb(colors.white),\n '--chrome-divider': hexToRgb(colors.gray[700]),\n },\n '*': {\n '@apply border-border': '',\n },\n body: {\n '@apply bg-background text-foreground': '',\n 'font-feature-settings': '\"rlig\" 1, \"calt\" 1',\n '@apply antialiased': '',\n },\n });\n}, {\n darkMode: 'selector',\n theme: {\n screens: {\n sm: '576px',\n md: '768px',\n lg: '992px',\n xl: '1200px',\n '2xl': '1400px',\n },\n extend: {\n maxWidth: {\n 'max-w-screen-sm': '540px',\n 'max-w-screen-md': '720px',\n 'max-w-screen-lg': '960px',\n 'max-w-screen-xl': '1140px',\n 'max-w-screen-2xl': '1320px',\n },\n colors: {\n accent: {\n DEFAULT: 'rgb(var(--accent))',\n foreground: 'rgb(var(--accent-foreground))',\n },\n background: {\n DEFAULT: 'rgb(var(--background))',\n },\n border: {\n DEFAULT: 'rgb(var(--border))',\n },\n danger: {\n DEFAULT: 'rgb(var(--danger))',\n foreground: 'rgb(var(--danger-foreground))',\n },\n foreground: {\n DEFAULT: 'rgb(var(--foreground))',\n },\n input: {\n DEFAULT: 'rgb(var(--input))',\n },\n muted: {\n DEFAULT: 'rgb(var(--muted))',\n foreground: 'rgb(var(--muted-foreground))',\n },\n popover: {\n DEFAULT: 'rgb(var(--popover))',\n foreground: 'rgb(var(--popover-foreground))',\n },\n primary: {\n DEFAULT: 'rgb(var(--primary))',\n foreground: 'rgb(var(--primary-foreground))',\n },\n ring: {\n DEFAULT: 'rgb(var(--ring))',\n },\n secondary: {\n DEFAULT: 'rgb(var(--secondary))',\n foreground: 'rgb(var(--secondary-foreground))',\n },\n chrome: {\n 50: 'rgb(var(--chrome-50))',\n 100: 'rgb(var(--chrome-100))',\n 200: 'rgb(var(--chrome-200))',\n 300: 'rgb(var(--chrome-300))',\n 400: 'rgb(var(--chrome-400))',\n 500: 'rgb(var(--chrome-500))',\n 600: 'rgb(var(--chrome-600))',\n 700: 'rgb(var(--chrome-700))',\n 800: 'rgb(var(--chrome-800))',\n 900: 'rgb(var(--chrome-900))',\n 950: 'rgb(var(--chrome-950))',\n foreground: 'rgb(var(--chrome-foreground))',\n divider: 'rgb(var(--chrome-divider))',\n },\n },\n },\n },\n});\n"],"names":["formsPlugin","forms","hexToRgb","hex","shorthandRegex","hexFixed","_","r","g","b","result","plugin","apiArgs","addBase","colors"],"mappings":";;;AAgBA,MAAMA,IAAcC,EAAM;AAE1B,SAASC,EAASC,GAAK;AAEnB,QAAMC,IAAiB,oCACjBC,IAAWF,EAAI,QAAQC,GAAgB,CAACE,GAAGC,GAAGC,GAAGC,MAAOF,IAAIA,IAAIC,IAAIA,IAAIC,IAAIA,CAAE,GAC9EC,IAAS,4CAA4C,KAAKL,CAAQ;AACjE,SAAAK,IAAS,GAAG,SAASA,EAAO,CAAC,GAAG,EAAE,CAAC,IAAI,SAASA,EAAO,CAAC,GAAG,EAAE,CAAC,IAAI,SAASA,EAAO,CAAC,GAAG,EAAE,CAAC,KAAK;AACzG;AAIA,MAAAC,IAAeA,EAAO,CAACC,MAAY;AAG/B,EAAAZ,EAAY,QAAQY,CAAO;AAErB,QAAA,EAAE,SAAAC,MAAYD;AACZ,EAAAC,EAAA;AAAA,IACJ,SAAS;AAAA,MACL,YAAYX,EAASY,EAAO,MAAM,GAAG,CAAC;AAAA,MACtC,uBAAuBZ,EAASY,EAAO,KAAK,GAAG,CAAC;AAAA,MAChD,gBAAgBZ,EAASY,EAAO,KAAK;AAAA,MACrC,YAAYZ,EAASY,EAAO,KAAK,GAAG,CAAC;AAAA,MACrC,YAAYZ,EAASY,EAAO,IAAI,GAAG,CAAC;AAAA,MACpC,uBAAuBZ,EAASY,EAAO,KAAK;AAAA,MAC5C,gBAAgBZ,EAASY,EAAO,KAAK,GAAG,CAAC;AAAA,MACzC,WAAWZ,EAASY,EAAO,KAAK,GAAG,CAAC;AAAA,MACpC,WAAWZ,EAASY,EAAO,KAAK,GAAG,CAAC;AAAA,MACpC,sBAAsBZ,EAASY,EAAO,KAAK,GAAG,CAAC;AAAA,MAC/C,aAAaZ,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