@cryptlex/web-components 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -27
- package/dist/components/ui/accordion.es.js +47 -0
- package/dist/components/ui/accordion.es.js.map +1 -0
- package/dist/components/ui/badge.es.js +13 -12
- package/dist/components/ui/badge.es.js.map +1 -1
- package/dist/components/ui/button.es.js +1 -1
- package/dist/components/ui/button.es.js.map +1 -1
- package/dist/components/ui/card.es.js +26 -26
- package/dist/components/ui/card.es.js.map +1 -1
- package/dist/components/ui/input.es.js +10 -11
- package/dist/components/ui/input.es.js.map +1 -1
- package/dist/components/ui/navigation-menu.es.js +122 -0
- package/dist/components/ui/navigation-menu.es.js.map +1 -0
- package/dist/components/ui/password-input.es.js +8 -8
- package/dist/components/ui/password-input.es.js.map +1 -1
- package/dist/index.es.d.ts +31 -1
- package/dist/index.es.js +99 -83
- package/dist/index.es.js.map +1 -1
- package/lib/index.css +83 -11
- package/lib/tokens.css +170 -139
- package/package.json +18 -15
- package/tailwind.preset.ts +168 -68
package/README.md
CHANGED
|
@@ -1,39 +1,23 @@
|
|
|
1
1
|
# @cryptlex/web-components
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
A React component library for Cryptlex.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
`pnpm storybook` for running Storybook locally
|
|
9
|
-
`pnpn build:storybook` to build a static version of Storybook
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
tailwind.config.js
|
|
5
|
+
# Usage
|
|
6
|
+
In your tailwind.config.ts, add the following code:
|
|
14
7
|
```ts
|
|
15
|
-
import
|
|
8
|
+
import CtlxPreset from '@cryptlex/web-components/tailwind-preset';
|
|
16
9
|
|
|
17
|
-
/** @type {import('tailwindcss').Config} */
|
|
18
10
|
export default {
|
|
19
|
-
|
|
11
|
+
...
|
|
12
|
+
presets:[CtlxPreset],
|
|
20
13
|
content: [
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
'./node_modules/@cryptlex/web-components/**/*.{js,ts,jsx,tsx}',
|
|
14
|
+
...
|
|
15
|
+
"./node_modules/@cryptlex/web-components/**/*.{js,ts,jsx,tsx}",
|
|
24
16
|
],
|
|
25
|
-
|
|
26
|
-
extend: {},
|
|
27
|
-
},
|
|
28
|
-
plugins: [],
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
17
|
+
}
|
|
32
18
|
```
|
|
33
|
-
index.css
|
|
34
19
|
|
|
20
|
+
In your global index.css, import the following CSS:
|
|
35
21
|
```css
|
|
36
|
-
/* Import the index.css from the @cryptlex/web-components library */
|
|
37
22
|
@import url('@cryptlex/web-components/index.css');
|
|
38
|
-
|
|
39
|
-
```
|
|
23
|
+
```
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx as a, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import * as e from "@radix-ui/react-accordion";
|
|
4
|
+
import { cn as s } from "../../utils/index.es.js";
|
|
5
|
+
import { ChevronDownIcon as d } from "@radix-ui/react-icons";
|
|
6
|
+
const g = e.Root, m = i.forwardRef(({ className: o, ...t }, r) => /* @__PURE__ */ a(
|
|
7
|
+
e.Item,
|
|
8
|
+
{
|
|
9
|
+
ref: r,
|
|
10
|
+
className: s("border-b", o),
|
|
11
|
+
...t
|
|
12
|
+
}
|
|
13
|
+
));
|
|
14
|
+
m.displayName = "AccordionItem";
|
|
15
|
+
const l = i.forwardRef(({ className: o, children: t, ...r }, n) => /* @__PURE__ */ a(e.Header, { className: "flex", children: /* @__PURE__ */ c(
|
|
16
|
+
e.Trigger,
|
|
17
|
+
{
|
|
18
|
+
ref: n,
|
|
19
|
+
className: s(
|
|
20
|
+
"flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",
|
|
21
|
+
o
|
|
22
|
+
),
|
|
23
|
+
...r,
|
|
24
|
+
children: [
|
|
25
|
+
t,
|
|
26
|
+
/* @__PURE__ */ a(d, { className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" })
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
) }));
|
|
30
|
+
l.displayName = e.Trigger.displayName;
|
|
31
|
+
const f = i.forwardRef(({ className: o, children: t, ...r }, n) => /* @__PURE__ */ a(
|
|
32
|
+
e.Content,
|
|
33
|
+
{
|
|
34
|
+
ref: n,
|
|
35
|
+
className: "overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
36
|
+
...r,
|
|
37
|
+
children: /* @__PURE__ */ a("div", { className: s("pb-4 pt-0", o), children: t })
|
|
38
|
+
}
|
|
39
|
+
));
|
|
40
|
+
f.displayName = e.Content.displayName;
|
|
41
|
+
export {
|
|
42
|
+
g as Accordion,
|
|
43
|
+
f as AccordionContent,
|
|
44
|
+
m as AccordionItem,
|
|
45
|
+
l as AccordionTrigger
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=accordion.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.es.js","sources":["../../../lib/components/ui/accordion.tsx"],"sourcesContent":["import * as React from \"react\"\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\"\nimport { cn } from \"@/utils\"\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\"\n\nconst Accordion = AccordionPrimitive.Root\n\nconst AccordionItem = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <AccordionPrimitive.Item\n ref={ref}\n className={cn(\"border-b\", className)}\n {...props}\n />\n))\nAccordionItem.displayName = \"AccordionItem\"\n\nconst AccordionTrigger = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronDownIcon className=\"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200\" />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n))\nAccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName\n\nconst AccordionContent = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <AccordionPrimitive.Content\n ref={ref}\n className=\"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down\"\n {...props}\n >\n <div className={cn(\"pb-4 pt-0\", className)}>{children}</div>\n </AccordionPrimitive.Content>\n))\nAccordionContent.displayName = AccordionPrimitive.Content.displayName\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n"],"names":["Accordion","AccordionPrimitive","AccordionItem","React","className","props","ref","jsx","cn","AccordionTrigger","children","jsxs","ChevronDownIcon","AccordionContent"],"mappings":";;;;;AAKA,MAAMA,IAAYC,EAAmB,MAE/BC,IAAgBC,EAAM,WAG1B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1B,gBAAAC;AAAA,EAACN,EAAmB;AAAA,EAAnB;AAAA,IACC,KAAAK;AAAA,IACA,WAAWE,EAAG,YAAYJ,CAAS;AAAA,IAClC,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAc,cAAc;AAE5B,MAAMO,IAAmBN,EAAM,WAG7B,CAAC,EAAE,WAAAC,GAAW,UAAAM,GAAU,GAAGL,EAAM,GAAGC,MACnC,gBAAAC,EAAAN,EAAmB,QAAnB,EAA0B,WAAU,QACnC,UAAA,gBAAAU;AAAA,EAACV,EAAmB;AAAA,EAAnB;AAAA,IACC,KAAAK;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAJ;AAAA,IACF;AAAA,IACC,GAAGC;AAAA,IAEH,UAAA;AAAA,MAAAK;AAAA,MACD,gBAAAH,EAACK,GAAgB,EAAA,WAAU,2EAA2E,CAAA;AAAA,IAAA;AAAA,EAAA;AACxG,GACF,CACD;AACDH,EAAiB,cAAcR,EAAmB,QAAQ;AAEpD,MAAAY,IAAmBV,EAAM,WAG7B,CAAC,EAAE,WAAAC,GAAW,UAAAM,GAAU,GAAGL,KAASC,MACpC,gBAAAC;AAAA,EAACN,EAAmB;AAAA,EAAnB;AAAA,IACC,KAAAK;AAAA,IACA,WAAU;AAAA,IACT,GAAGD;AAAA,IAEJ,4BAAC,OAAI,EAAA,WAAWG,EAAG,aAAaJ,CAAS,GAAI,UAAAM,EAAS,CAAA;AAAA,EAAA;AACxD,CACD;AACDG,EAAiB,cAAcZ,EAAmB,QAAQ;"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cva as
|
|
3
|
-
import { cn as
|
|
4
|
-
const
|
|
5
|
-
"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { cva as o } from "class-variance-authority";
|
|
3
|
+
import { cn as s } from "../../utils/index.es.js";
|
|
4
|
+
const a = o(
|
|
5
|
+
"inline-flex items-center select-none rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
6
6
|
{
|
|
7
7
|
variants: {
|
|
8
8
|
variant: {
|
|
9
|
-
default: "border-transparent bg-primary text-primary-foreground
|
|
10
|
-
secondary: "border-transparent bg-secondary text-secondary-foreground
|
|
11
|
-
destructive: "border-transparent bg-destructive text-destructive-foreground
|
|
9
|
+
default: "border-transparent bg-primary text-primary-foreground",
|
|
10
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground",
|
|
11
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground",
|
|
12
|
+
success: "border-transparent bg-success text-success-foreground",
|
|
12
13
|
outline: "text-foreground"
|
|
13
14
|
}
|
|
14
15
|
},
|
|
@@ -17,11 +18,11 @@ const s = n(
|
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
20
|
);
|
|
20
|
-
function
|
|
21
|
-
return /* @__PURE__ */
|
|
21
|
+
function u({ className: r, variant: e, ...t }) {
|
|
22
|
+
return /* @__PURE__ */ n("div", { className: s(a({ variant: e }), r), ...t });
|
|
22
23
|
}
|
|
23
24
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
u as Badge,
|
|
26
|
+
a as badgeVariants
|
|
26
27
|
};
|
|
27
28
|
//# sourceMappingURL=badge.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.es.js","sources":["../../../lib/components/ui/badge.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/utils\"\n\nconst badgeVariants = cva(\n \"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2\",\n {\n variants: {\n variant: {\n default:\n \"border-transparent bg-primary text-primary-foreground
|
|
1
|
+
{"version":3,"file":"badge.es.js","sources":["../../../lib/components/ui/badge.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/utils\"\n\nconst badgeVariants = cva(\n \"inline-flex items-center select-none rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2\",\n {\n variants: {\n variant: {\n default:\n \"border-transparent bg-primary text-primary-foreground\",\n secondary:\n \"border-transparent bg-secondary text-secondary-foreground\",\n destructive:\n \"border-transparent bg-destructive text-destructive-foreground\",\n success:\n \"border-transparent bg-success text-success-foreground\",\n outline: \"text-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return (\n <div className={cn(badgeVariants({ variant }), className)} {...props} />\n )\n}\n\nexport { Badge, badgeVariants }\n"],"names":["badgeVariants","cva","Badge","className","variant","props","jsx","cn"],"mappings":";;;AAKA,MAAMA,IAAgBC;AAAA,EACpB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SACE;AAAA,QACF,WACE;AAAA,QACF,aACE;AAAA,QACF,SACE;AAAA,QACF,SAAS;AAAA,MAAA;AAAA,IAEb;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,IAAA;AAAA,EACX;AAEJ;AAMA,SAASC,EAAM,EAAE,WAAAC,GAAW,SAAAC,GAAS,GAAGC,KAAqB;AAC3D,SACG,gBAAAC,EAAA,OAAA,EAAI,WAAWC,EAAGP,EAAc,EAAE,SAAAI,EAAS,CAAA,GAAGD,CAAS,GAAI,GAAGE,EAAO,CAAA;AAE1E;"}
|
|
@@ -9,7 +9,7 @@ const x = p(
|
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
12
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/
|
|
12
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
13
13
|
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
14
14
|
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
15
15
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.es.js","sources":["../../../lib/components/ui/button.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/utils\"\nimport { Loader } from \"./loader\";\nimport { LucideIcon } from \"lucide-react\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-lg text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/
|
|
1
|
+
{"version":3,"file":"button.es.js","sources":["../../../lib/components/ui/button.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/utils\"\nimport { Loader } from \"./loader\";\nimport { LucideIcon } from \"lucide-react\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-lg text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/80\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-10 w-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n loading?: boolean;\n icon?: LucideIcon;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant,\n size,\n loading,\n disabled,\n asChild = false,\n icon,\n children,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\";\n const Icon = icon;\n\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n disabled={loading || disabled}\n {...props}\n >\n {/* Shows loading when `loading:true` irrespective of icon present or not; otherwise shows button icon if present */}\n {loading ? <Loader /> : Icon ? <Icon className=\"h-4 w-4\" /> : null}\n {/* Margin left only when both icon and children (button text) are present */}\n {children ? (\n <div className={icon && children ? \"ml-2\" : \"\"}>{children}</div>\n ) : null}\n </Comp>\n );\n }\n);\n\nButton.displayName = \"Button\"; // Set display name for better debugging\n\nexport { Button, buttonVariants };\n"],"names":["buttonVariants","cva","Button","React","className","variant","size","loading","disabled","asChild","icon","children","props","ref","Comp","Slot","Icon","jsxs","cn","jsx","Loader"],"mappings":";;;;;;AAQA,MAAMA,IAAiBC;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,aACE;AAAA,QACF,SACE;AAAA,QACF,WACE;AAAA,QACF,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,MAAM;AAAA,MAAA;AAAA,IAEV;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ,GAUMC,IAASC,EAAM;AAAA,EACnB,CACE;AAAA,IACE,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,MAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,MAAAC;AAAA,IACA,UAAAC;AAAA,IACA,GAAGC;AAAA,KAELC,MACG;AACG,UAAAC,IAAOL,IAAUM,IAAO,UACxBC,IAAON;AAGX,WAAA,gBAAAO;AAAA,MAACH;AAAA,MAAA;AAAA,QACC,WAAWI,EAAGlB,EAAe,EAAE,SAAAK,GAAS,MAAAC,GAAM,WAAAF,EAAA,CAAW,CAAC;AAAA,QAC1D,KAAAS;AAAA,QACA,UAAUN,KAAWC;AAAA,QACpB,GAAGI;AAAA,QAGH,UAAA;AAAA,UAAUL,IAAA,gBAAAY,EAACC,KAAO,IAAKJ,sBAAQA,GAAK,EAAA,WAAU,WAAU,IAAK;AAAA,UAE7DL,sBACE,OAAI,EAAA,WAAWD,KAAQC,IAAW,SAAS,IAAK,UAAAA,EAAA,CAAS,IACxD;AAAA,QAAA;AAAA,MAAA;AAAA,IACN;AAAA,EAAA;AAGN;AAEAT,EAAO,cAAc;"}
|
|
@@ -1,67 +1,67 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
3
|
-
import { cn as
|
|
4
|
-
const s =
|
|
2
|
+
import * as o from "react";
|
|
3
|
+
import { cn as t } from "../../utils/index.es.js";
|
|
4
|
+
const s = o.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ d(
|
|
5
5
|
"div",
|
|
6
6
|
{
|
|
7
7
|
ref: r,
|
|
8
|
-
className:
|
|
9
|
-
"rounded-lg border bg-card text-card-foreground
|
|
10
|
-
|
|
8
|
+
className: t(
|
|
9
|
+
"rounded-lg border border-border bg-card text-card-foreground",
|
|
10
|
+
e
|
|
11
11
|
),
|
|
12
|
-
...
|
|
12
|
+
...a
|
|
13
13
|
}
|
|
14
14
|
));
|
|
15
15
|
s.displayName = "Card";
|
|
16
|
-
const i =
|
|
16
|
+
const i = o.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ d(
|
|
17
17
|
"div",
|
|
18
18
|
{
|
|
19
19
|
ref: r,
|
|
20
|
-
className:
|
|
21
|
-
...
|
|
20
|
+
className: t("flex flex-col space-y-1.5 p-6", e),
|
|
21
|
+
...a
|
|
22
22
|
}
|
|
23
23
|
));
|
|
24
24
|
i.displayName = "CardHeader";
|
|
25
|
-
const l =
|
|
25
|
+
const l = o.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ d(
|
|
26
26
|
"h3",
|
|
27
27
|
{
|
|
28
28
|
ref: r,
|
|
29
|
-
className:
|
|
29
|
+
className: t(
|
|
30
30
|
"text-2xl font-semibold leading-none tracking-tight",
|
|
31
|
-
|
|
31
|
+
e
|
|
32
32
|
),
|
|
33
|
-
...
|
|
33
|
+
...a
|
|
34
34
|
}
|
|
35
35
|
));
|
|
36
36
|
l.displayName = "CardTitle";
|
|
37
|
-
const f =
|
|
37
|
+
const f = o.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ d(
|
|
38
38
|
"p",
|
|
39
39
|
{
|
|
40
40
|
ref: r,
|
|
41
|
-
className:
|
|
42
|
-
...
|
|
41
|
+
className: t("text-sm text-muted-foreground", e),
|
|
42
|
+
...a
|
|
43
43
|
}
|
|
44
44
|
));
|
|
45
45
|
f.displayName = "CardDescription";
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
const
|
|
46
|
+
const n = o.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ d("div", { ref: r, className: t("p-6 pt-0", e), ...a }));
|
|
47
|
+
n.displayName = "CardContent";
|
|
48
|
+
const c = o.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ d(
|
|
49
49
|
"div",
|
|
50
50
|
{
|
|
51
51
|
ref: r,
|
|
52
|
-
className:
|
|
52
|
+
className: t(
|
|
53
53
|
"flex items-center p-6 pt-0 w-full gap-4 justify-end",
|
|
54
|
-
|
|
54
|
+
e
|
|
55
55
|
),
|
|
56
|
-
...
|
|
56
|
+
...a
|
|
57
57
|
}
|
|
58
58
|
));
|
|
59
|
-
|
|
59
|
+
c.displayName = "CardFooter";
|
|
60
60
|
export {
|
|
61
61
|
s as Card,
|
|
62
|
-
|
|
62
|
+
n as CardContent,
|
|
63
63
|
f as CardDescription,
|
|
64
|
-
|
|
64
|
+
c as CardFooter,
|
|
65
65
|
i as CardHeader,
|
|
66
66
|
l as CardTitle
|
|
67
67
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.es.js","sources":["../../../lib/components/ui/card.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { cn } from \"@/utils\";\nconst Card = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"rounded-lg border bg-card text-card-foreground
|
|
1
|
+
{"version":3,"file":"card.es.js","sources":["../../../lib/components/ui/card.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { cn } from \"@/utils\";\nconst Card = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"rounded-lg border border-border bg-card text-card-foreground\",\n className\n )}\n {...props}\n />\n));\nCard.displayName = \"Card\";\n\nconst CardHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex flex-col space-y-1.5 p-6\", className)}\n {...props}\n />\n));\nCardHeader.displayName = \"CardHeader\";\n\nconst CardTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h3\n ref={ref}\n className={cn(\n \"text-2xl font-semibold leading-none tracking-tight\",\n className\n )}\n {...props}\n />\n));\nCardTitle.displayName = \"CardTitle\";\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nCardDescription.displayName = \"CardDescription\";\n\nconst CardContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"p-6 pt-0\", className)} {...props} />\n));\nCardContent.displayName = \"CardContent\";\n\nconst CardFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex items-center p-6 pt-0 w-full gap-4 justify-end\",\n className\n )}\n {...props}\n />\n));\nCardFooter.displayName = \"CardFooter\";\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardDescription,\n CardContent,\n};\n"],"names":["Card","React","className","props","ref","jsx","cn","CardHeader","CardTitle","CardDescription","CardContent","CardFooter"],"mappings":";;;AAGM,MAAAA,IAAOC,EAAM,WAGjB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAJ;AAAA,IACF;AAAA,IACC,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAK,cAAc;AAEb,MAAAO,IAAaN,EAAM,WAGvB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE,EAAG,iCAAiCJ,CAAS;AAAA,IACvD,GAAGC;AAAA,EAAA;AACN,CACD;AACDI,EAAW,cAAc;AAEnB,MAAAC,IAAYP,EAAM,WAGtB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAJ;AAAA,IACF;AAAA,IACC,GAAGC;AAAA,EAAA;AACN,CACD;AACDK,EAAU,cAAc;AAElB,MAAAC,IAAkBR,EAAM,WAG5B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE,EAAG,iCAAiCJ,CAAS;AAAA,IACvD,GAAGC;AAAA,EAAA;AACN,CACD;AACDM,EAAgB,cAAc;AAExB,MAAAC,IAAcT,EAAM,WAGxB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAS,GAAAC,wBACzB,OAAI,EAAA,KAAAA,GAAU,WAAWE,EAAG,YAAYJ,CAAS,GAAI,GAAGC,GAAO,CACjE;AACDO,EAAY,cAAc;AAEpB,MAAAC,IAAaV,EAAM,WAGvB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAJ;AAAA,IACF;AAAA,IACC,GAAGC;AAAA,EAAA;AACN,CACD;AACDQ,EAAW,cAAc;"}
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { cn as
|
|
4
|
-
const
|
|
5
|
-
({ className: e, type: r, ...o },
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import { cn as d } from "../../utils/index.es.js";
|
|
4
|
+
const s = l.forwardRef(
|
|
5
|
+
({ className: e, type: r, ...o }, t) => /* @__PURE__ */ i(
|
|
6
6
|
"input",
|
|
7
7
|
{
|
|
8
8
|
type: r,
|
|
9
|
-
className:
|
|
10
|
-
"flex h-10 w-full rounded-lg border border-input bg-background px-3 py-2 text-sm
|
|
11
|
-
// Change 'ring' class to 'ring-primary'
|
|
9
|
+
className: d(
|
|
10
|
+
"flex h-10 w-full rounded-lg border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:border-2 focus-visible:border-primary disabled:cursor-not-allowed disabled:opacity-50",
|
|
12
11
|
e
|
|
13
12
|
),
|
|
14
|
-
ref:
|
|
13
|
+
ref: t,
|
|
15
14
|
...o
|
|
16
15
|
}
|
|
17
16
|
)
|
|
18
17
|
);
|
|
19
|
-
|
|
18
|
+
s.displayName = "Input";
|
|
20
19
|
export {
|
|
21
|
-
|
|
20
|
+
s as Input
|
|
22
21
|
};
|
|
23
22
|
//# sourceMappingURL=input.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.es.js","sources":["../../../lib/components/ui/input.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { cn } from \"@/utils\"\n\nexport interface InputProps\n extends React.InputHTMLAttributes<HTMLInputElement> {}\n//Input\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-10 w-full rounded-lg border border-input bg-background px-3 py-2 text-sm
|
|
1
|
+
{"version":3,"file":"input.es.js","sources":["../../../lib/components/ui/input.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { cn } from \"@/utils\"\n\nexport interface InputProps\n extends React.InputHTMLAttributes<HTMLInputElement> {}\n//Input\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-10 w-full rounded-lg border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:border-2 focus-visible:border-primary disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n ref={ref}\n {...props}\n />\n );\n }\n);\nInput.displayName = \"Input\";\n\nexport { Input };"],"names":["Input","React","className","type","props","ref","jsx","cn"],"mappings":";;;AAOA,MAAMA,IAAQC,EAAM;AAAA,EAClB,CAAC,EAAE,WAAAC,GAAW,MAAAC,GAAM,GAAGC,EAAA,GAASC,MAE5B,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAAH;AAAA,MACA,WAAWI;AAAA,QACT;AAAA,QACAL;AAAA,MACF;AAAA,MACA,KAAAG;AAAA,MACC,GAAGD;AAAA,IAAA;AAAA,EACN;AAGN;AACAJ,EAAM,cAAc;"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { jsxs as s, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import * as r from "react";
|
|
3
|
+
import * as e from "@radix-ui/react-navigation-menu";
|
|
4
|
+
import { cva as c } from "class-variance-authority";
|
|
5
|
+
import { cn as i } from "../../utils/index.es.js";
|
|
6
|
+
import { ChevronDownIcon as f } from "@radix-ui/react-icons";
|
|
7
|
+
const u = r.forwardRef(({ className: t, children: a, ...o }, d) => /* @__PURE__ */ s(
|
|
8
|
+
e.Root,
|
|
9
|
+
{
|
|
10
|
+
ref: d,
|
|
11
|
+
className: i(
|
|
12
|
+
"relative z-10 flex max-w-max flex-1 items-center justify-center",
|
|
13
|
+
t
|
|
14
|
+
),
|
|
15
|
+
...o,
|
|
16
|
+
children: [
|
|
17
|
+
a,
|
|
18
|
+
/* @__PURE__ */ n(m, {})
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
));
|
|
22
|
+
u.displayName = e.Root.displayName;
|
|
23
|
+
const p = r.forwardRef(({ className: t, ...a }, o) => /* @__PURE__ */ n(
|
|
24
|
+
e.List,
|
|
25
|
+
{
|
|
26
|
+
ref: o,
|
|
27
|
+
className: i(
|
|
28
|
+
"group flex flex-1 list-none items-center justify-center space-x-1 flex-wrap",
|
|
29
|
+
t
|
|
30
|
+
),
|
|
31
|
+
...a
|
|
32
|
+
}
|
|
33
|
+
));
|
|
34
|
+
p.displayName = e.List.displayName;
|
|
35
|
+
const I = e.Item, g = c(
|
|
36
|
+
"group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent data-[state=open]:bg-accent data-[state=open]:text-accent-foreground"
|
|
37
|
+
), v = r.forwardRef(({ className: t, children: a, ...o }, d) => /* @__PURE__ */ s(
|
|
38
|
+
e.Trigger,
|
|
39
|
+
{
|
|
40
|
+
ref: d,
|
|
41
|
+
className: i(g(), "group", t),
|
|
42
|
+
...o,
|
|
43
|
+
children: [
|
|
44
|
+
a,
|
|
45
|
+
" ",
|
|
46
|
+
/* @__PURE__ */ n(
|
|
47
|
+
f,
|
|
48
|
+
{
|
|
49
|
+
className: "relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
50
|
+
"aria-hidden": "true"
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
));
|
|
56
|
+
v.displayName = e.Trigger.displayName;
|
|
57
|
+
const N = r.forwardRef(({ className: t, ...a }, o) => /* @__PURE__ */ n(
|
|
58
|
+
e.Content,
|
|
59
|
+
{
|
|
60
|
+
ref: o,
|
|
61
|
+
className: i(
|
|
62
|
+
"left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",
|
|
63
|
+
t
|
|
64
|
+
),
|
|
65
|
+
...a
|
|
66
|
+
}
|
|
67
|
+
));
|
|
68
|
+
N.displayName = e.Content.displayName;
|
|
69
|
+
const h = e.Link, m = r.forwardRef(({ className: t, ...a }, o) => /* @__PURE__ */ n("div", { className: i("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ n(
|
|
70
|
+
e.Viewport,
|
|
71
|
+
{
|
|
72
|
+
className: i(
|
|
73
|
+
"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",
|
|
74
|
+
t
|
|
75
|
+
),
|
|
76
|
+
ref: o,
|
|
77
|
+
...a
|
|
78
|
+
}
|
|
79
|
+
) }));
|
|
80
|
+
m.displayName = e.Viewport.displayName;
|
|
81
|
+
const x = r.forwardRef(({ className: t, ...a }, o) => /* @__PURE__ */ n(
|
|
82
|
+
e.Indicator,
|
|
83
|
+
{
|
|
84
|
+
ref: o,
|
|
85
|
+
className: i(
|
|
86
|
+
"top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",
|
|
87
|
+
t
|
|
88
|
+
),
|
|
89
|
+
...a,
|
|
90
|
+
children: /* @__PURE__ */ n("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
|
|
91
|
+
}
|
|
92
|
+
));
|
|
93
|
+
x.displayName = e.Indicator.displayName;
|
|
94
|
+
const w = r.forwardRef(({ className: t, title: a, children: o, ...d }, l) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(h, { asChild: !0, children: /* @__PURE__ */ s(
|
|
95
|
+
"a",
|
|
96
|
+
{
|
|
97
|
+
ref: l,
|
|
98
|
+
className: i(
|
|
99
|
+
"block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
|
|
100
|
+
t
|
|
101
|
+
),
|
|
102
|
+
...d,
|
|
103
|
+
children: [
|
|
104
|
+
/* @__PURE__ */ n("div", { className: "text-sm font-medium leading-none", children: a }),
|
|
105
|
+
/* @__PURE__ */ n("p", { className: "line-clamp-2 text-sm leading-snug text-muted-foreground", children: o })
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
) }) }));
|
|
109
|
+
w.displayName = "NavigationItemListItem";
|
|
110
|
+
export {
|
|
111
|
+
u as NavigationMenu,
|
|
112
|
+
N as NavigationMenuContent,
|
|
113
|
+
x as NavigationMenuIndicator,
|
|
114
|
+
I as NavigationMenuItem,
|
|
115
|
+
h as NavigationMenuLink,
|
|
116
|
+
p as NavigationMenuList,
|
|
117
|
+
w as NavigationMenuListItem,
|
|
118
|
+
v as NavigationMenuTrigger,
|
|
119
|
+
m as NavigationMenuViewport,
|
|
120
|
+
g as navigationMenuTriggerStyle
|
|
121
|
+
};
|
|
122
|
+
//# sourceMappingURL=navigation-menu.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-menu.es.js","sources":["../../../lib/components/ui/navigation-menu.tsx"],"sourcesContent":["import * as React from \"react\"\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\"\nimport { cva } from \"class-variance-authority\"\nimport { cn } from \"@/utils\"\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\"\n\nconst NavigationMenu = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Root\n ref={ref}\n className={cn(\n \"relative z-10 flex max-w-max flex-1 items-center justify-center\",\n className\n )}\n {...props}\n >\n {children}\n <NavigationMenuViewport />\n </NavigationMenuPrimitive.Root>\n))\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName\n\nconst NavigationMenuList = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.List\n ref={ref}\n className={cn(\n \"group flex flex-1 list-none items-center justify-center space-x-1 flex-wrap\",\n className\n )}\n {...props}\n />\n))\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName\n\nconst NavigationMenuItem = NavigationMenuPrimitive.Item\n\nconst navigationMenuTriggerStyle = cva(\n \"group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\"\n)\n\nconst NavigationMenuTrigger = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Trigger\n ref={ref}\n className={cn(navigationMenuTriggerStyle(), \"group\", className)}\n {...props}\n >\n {children}{\" \"}\n <ChevronDownIcon\n className=\"relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180\"\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n))\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName\n\nconst NavigationMenuContent = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Content\n ref={ref}\n className={cn(\n \"left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto \",\n className\n )}\n {...props}\n />\n))\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName\n\nconst NavigationMenuLink = NavigationMenuPrimitive.Link\n\nconst NavigationMenuViewport = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>\n>(({ className, ...props }, ref) => (\n <div className={cn(\"absolute left-0 top-full flex justify-center\")}>\n <NavigationMenuPrimitive.Viewport\n className={cn(\n \"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]\",\n className\n )}\n ref={ref}\n {...props}\n />\n </div>\n))\nNavigationMenuViewport.displayName =\n NavigationMenuPrimitive.Viewport.displayName\n\nconst NavigationMenuIndicator = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Indicator\n ref={ref}\n className={cn(\n \"top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in\",\n className\n )}\n {...props}\n >\n <div className=\"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md\" />\n </NavigationMenuPrimitive.Indicator>\n))\nNavigationMenuIndicator.displayName =\n NavigationMenuPrimitive.Indicator.displayName\n\nconst NavigationMenuListItem = React.forwardRef<\n React.ElementRef<\"a\">,\n React.ComponentPropsWithoutRef<\"a\">\n>(({ className, title, children, ...props }, ref) => {\n return (\n <li>\n <NavigationMenuLink asChild>\n <a\n ref={ref}\n className={cn(\n \"block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground\",\n className\n )}\n {...props}\n >\n <div className=\"text-sm font-medium leading-none\">{title}</div>\n <p className=\"line-clamp-2 text-sm leading-snug text-muted-foreground\">\n {children}\n </p>\n </a>\n </NavigationMenuLink>\n </li>\n )\n})\nNavigationMenuListItem.displayName = \"NavigationItemListItem\"\n\nexport {\n navigationMenuTriggerStyle,\n NavigationMenu,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuContent,\n NavigationMenuTrigger,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuViewport,\n NavigationMenuListItem\n}\n"],"names":["NavigationMenu","React","className","children","props","ref","jsxs","NavigationMenuPrimitive","cn","NavigationMenuViewport","NavigationMenuList","jsx","NavigationMenuItem","navigationMenuTriggerStyle","cva","NavigationMenuTrigger","ChevronDownIcon","NavigationMenuContent","NavigationMenuLink","NavigationMenuIndicator","NavigationMenuListItem","title"],"mappings":"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"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
3
|
-
import { EyeIcon as
|
|
2
|
+
import * as o from "react";
|
|
3
|
+
import { EyeIcon as d, EyeOffIcon as m } from "lucide-react";
|
|
4
4
|
import { Input as i } from "./input.es.js";
|
|
5
5
|
import { Button as p } from "./button.es.js";
|
|
6
|
-
const u =
|
|
7
|
-
({ className: c, ...
|
|
8
|
-
const [t, a] =
|
|
6
|
+
const u = o.forwardRef(
|
|
7
|
+
({ className: c, ...r }, s) => {
|
|
8
|
+
const [t, a] = o.useState(!1);
|
|
9
9
|
return /* @__PURE__ */ n("div", { className: "flex flex-row items-center relative", children: [
|
|
10
|
-
/* @__PURE__ */ e(i, { type: t ? "text" : "password", ref: s, ...
|
|
10
|
+
/* @__PURE__ */ e(i, { type: t ? "text" : "password", ref: s, ...r }),
|
|
11
11
|
/* @__PURE__ */ e(
|
|
12
12
|
p,
|
|
13
13
|
{
|
|
14
14
|
type: "button",
|
|
15
|
-
className: "absolute right-0 top-0
|
|
15
|
+
className: "absolute right-0 top-0 rounded-md bg-transparent p-2 text-muted-foreground hover:bg-muted/5 focus:outline-none",
|
|
16
16
|
onClick: () => a(!t),
|
|
17
|
-
children: t ? /* @__PURE__ */ e(
|
|
17
|
+
children: t ? /* @__PURE__ */ e(m, { className: "h-4 w-4", "aria-hidden": "true" }) : /* @__PURE__ */ e(d, { className: "h-4 w-4", "aria-hidden": "true" })
|
|
18
18
|
}
|
|
19
19
|
)
|
|
20
20
|
] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password-input.es.js","sources":["../../../lib/components/ui/password-input.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { EyeIcon, EyeOffIcon } from \"lucide-react\";\nimport { Input, InputProps } from \"./input\";\nimport { Button } from \"./button\";\n\nconst PasswordInput = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, ...props }, ref) => {\n const [showPassword, setShowPassword] = React.useState<boolean>(false);\n return (\n <div className=\"flex flex-row items-center relative\">\n <Input type={showPassword ? \"text\" : \"password\"} ref={ref} {...props} />\n <Button\n type=\"button\"\n className=\"absolute right-0 top-0
|
|
1
|
+
{"version":3,"file":"password-input.es.js","sources":["../../../lib/components/ui/password-input.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { EyeIcon, EyeOffIcon } from \"lucide-react\";\nimport { Input, InputProps } from \"./input\";\nimport { Button } from \"./button\";\n\nconst PasswordInput = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, ...props }, ref) => {\n const [showPassword, setShowPassword] = React.useState<boolean>(false);\n return (\n <div className=\"flex flex-row items-center relative\">\n <Input type={showPassword ? \"text\" : \"password\"} ref={ref} {...props} />\n <Button\n type=\"button\"\n className=\"absolute right-0 top-0 rounded-md bg-transparent p-2 text-muted-foreground hover:bg-muted/5 focus:outline-none\"\n onClick={() => setShowPassword(!showPassword)}\n >\n {!showPassword ? (\n <EyeIcon className=\"h-4 w-4\" aria-hidden=\"true\" />\n ) : (\n <EyeOffIcon className=\"h-4 w-4\" aria-hidden=\"true\" />\n )}\n </Button>\n </div>\n );\n }\n);\nPasswordInput.displayName = \"PasswordInput\";\n\nexport { PasswordInput };\n"],"names":["PasswordInput","React","className","props","ref","showPassword","setShowPassword","jsxs","jsx","Input","Button","EyeOffIcon","EyeIcon"],"mappings":";;;;;AAMA,MAAMA,IAAgBC,EAAM;AAAA,EAC1B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAAQ;AAChC,UAAM,CAACC,GAAcC,CAAe,IAAIL,EAAM,SAAkB,EAAK;AAEnE,WAAA,gBAAAM,EAAC,OAAI,EAAA,WAAU,uCACb,UAAA;AAAA,MAAA,gBAAAC,EAACC,KAAM,MAAMJ,IAAe,SAAS,YAAY,KAAAD,GAAW,GAAGD,GAAO;AAAA,MACtE,gBAAAK;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,WAAU;AAAA,UACV,SAAS,MAAMJ,EAAgB,CAACD,CAAY;AAAA,UAE3C,UAACA,IAGC,gBAAAG,EAAAG,GAAA,EAAW,WAAU,WAAU,eAAY,OAAO,CAAA,IAFlD,gBAAAH,EAAAI,GAAA,EAAQ,WAAU,WAAU,eAAY,OAAO,CAAA;AAAA,QAEG;AAAA,MAAA;AAAA,IAEvD,GACF;AAAA,EAAA;AAGN;AACAZ,EAAc,cAAc;"}
|
package/dist/index.es.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
1
2
|
import { AllowInDimension } from 'recharts/types/util/types';
|
|
2
3
|
import { AnimationDuration } from 'recharts/types/util/types';
|
|
3
4
|
import { AnimationTiming } from 'recharts/types/util/types';
|
|
@@ -22,6 +23,7 @@ import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
|
22
23
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
23
24
|
import { LucideIcon } from 'lucide-react';
|
|
24
25
|
import { NameType } from 'recharts/types/component/DefaultTooltipContent';
|
|
26
|
+
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
|
25
27
|
import { Payload } from 'recharts/types/component/DefaultTooltipContent';
|
|
26
28
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
27
29
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
@@ -37,13 +39,21 @@ import { UniqueOption } from 'recharts/types/util/payload/getUniqPayload';
|
|
|
37
39
|
import { ValueType } from 'recharts/types/component/DefaultTooltipContent';
|
|
38
40
|
import { VariantProps } from 'class-variance-authority';
|
|
39
41
|
|
|
42
|
+
export declare const Accordion: React_2.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React_2.RefAttributes<HTMLDivElement>>;
|
|
43
|
+
|
|
44
|
+
export declare const AccordionContent: React_2.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
45
|
+
|
|
46
|
+
export declare const AccordionItem: React_2.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
47
|
+
|
|
48
|
+
export declare const AccordionTrigger: React_2.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
49
|
+
|
|
40
50
|
export declare function Badge({ className, variant, ...props }: BadgeProps): JSX_2.Element;
|
|
41
51
|
|
|
42
52
|
export declare interface BadgeProps extends React_2.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
43
53
|
}
|
|
44
54
|
|
|
45
55
|
export declare const badgeVariants: (props?: ({
|
|
46
|
-
variant?: "default" | "secondary" | "destructive" | "outline" | null | undefined;
|
|
56
|
+
variant?: "default" | "secondary" | "destructive" | "success" | "outline" | null | undefined;
|
|
47
57
|
} & ClassProp) | undefined) => string;
|
|
48
58
|
|
|
49
59
|
export declare const Breadcrumb: React_2.ForwardRefExoticComponent<Omit<React_2.DetailedHTMLProps<React_2.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
@@ -356,6 +366,26 @@ declare interface LoaderProps {
|
|
|
356
366
|
className?: string;
|
|
357
367
|
}
|
|
358
368
|
|
|
369
|
+
export declare const NavigationMenu: React_2.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuProps & React_2.RefAttributes<HTMLElement>, "ref"> & React_2.RefAttributes<HTMLElement>>;
|
|
370
|
+
|
|
371
|
+
export declare const NavigationMenuContent: React_2.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
372
|
+
|
|
373
|
+
export declare const NavigationMenuIndicator: React_2.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuIndicatorProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
374
|
+
|
|
375
|
+
export declare const NavigationMenuItem: React_2.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuItemProps & React_2.RefAttributes<HTMLLIElement>>;
|
|
376
|
+
|
|
377
|
+
export declare const NavigationMenuLink: React_2.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuLinkProps & React_2.RefAttributes<HTMLAnchorElement>>;
|
|
378
|
+
|
|
379
|
+
export declare const NavigationMenuList: React_2.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuListProps & React_2.RefAttributes<HTMLUListElement>, "ref"> & React_2.RefAttributes<HTMLUListElement>>;
|
|
380
|
+
|
|
381
|
+
export declare const NavigationMenuListItem: React_2.ForwardRefExoticComponent<Omit<React_2.DetailedHTMLProps<React_2.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & React_2.RefAttributes<HTMLAnchorElement>>;
|
|
382
|
+
|
|
383
|
+
export declare const NavigationMenuTrigger: React_2.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuTriggerProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
384
|
+
|
|
385
|
+
export declare const navigationMenuTriggerStyle: (props?: ClassProp | undefined) => string;
|
|
386
|
+
|
|
387
|
+
export declare const NavigationMenuViewport: React_2.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuViewportProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
388
|
+
|
|
359
389
|
export declare const Pagination: {
|
|
360
390
|
({ className, ...props }: React_2.ComponentProps<"nav">): JSX_2.Element;
|
|
361
391
|
displayName: string;
|