@codefast/ui 0.0.19 → 0.0.20
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/accordion.js +1 -8
- package/dist/accordion.js.map +1 -1
- package/dist/accordion.mjs +1 -8
- package/dist/accordion.mjs.map +1 -1
- package/dist/button.d.mts +1 -1
- package/dist/button.d.ts +1 -1
- package/dist/command.d.mts +15 -15
- package/dist/command.d.ts +15 -15
- package/dist/command.js +2 -9
- package/dist/command.js.map +1 -1
- package/dist/command.mjs +2 -9
- package/dist/command.mjs.map +1 -1
- package/dist/data-table.js +5 -5
- package/dist/data-table.js.map +1 -1
- package/dist/data-table.mjs +5 -5
- package/dist/data-table.mjs.map +1 -1
- package/dist/drawer.js +2 -2
- package/dist/drawer.js.map +1 -1
- package/dist/drawer.mjs +2 -2
- package/dist/drawer.mjs.map +1 -1
- package/dist/navigation-menu.js +3 -3
- package/dist/navigation-menu.js.map +1 -1
- package/dist/navigation-menu.mjs +3 -3
- package/dist/navigation-menu.mjs.map +1 -1
- package/dist/progress.js +1 -1
- package/dist/progress.js.map +1 -1
- package/dist/progress.mjs +1 -1
- package/dist/progress.mjs.map +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/radio-group.js.map +1 -1
- package/dist/radio-group.mjs +1 -1
- package/dist/radio-group.mjs.map +1 -1
- package/dist/resizable.js +1 -1
- package/dist/resizable.js.map +1 -1
- package/dist/resizable.mjs +1 -1
- package/dist/resizable.mjs.map +1 -1
- package/dist/sheet.js +1 -1
- package/dist/sheet.js.map +1 -1
- package/dist/sheet.mjs +1 -1
- package/dist/sheet.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +2 -2
- package/src/accordion.tsx +1 -5
- package/src/command.tsx +2 -6
- package/src/data-table.tsx +5 -5
- package/src/drawer.tsx +2 -2
- package/src/navigation-menu.tsx +3 -3
- package/src/progress.tsx +1 -1
- package/src/radio-group.tsx +1 -1
- package/src/resizable.tsx +1 -1
- package/src/sheet.tsx +1 -1
package/dist/data-table.mjs
CHANGED
|
@@ -42,7 +42,7 @@ function DataTableViewOptions({ table }) {
|
|
|
42
42
|
/* @__PURE__ */ jsx(MixerHorizontalIcon, { className: "mr-2 size-4" }),
|
|
43
43
|
"View"
|
|
44
44
|
] }) }),
|
|
45
|
-
/* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", className: "w-
|
|
45
|
+
/* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", className: "w-36", children: [
|
|
46
46
|
/* @__PURE__ */ jsx(DropdownMenuLabel, { children: "Toggle columns" }),
|
|
47
47
|
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
48
48
|
table.getAllColumns().filter((column) => typeof column.accessorFn !== "undefined" && column.getCanHide()).map((column) => {
|
|
@@ -85,13 +85,13 @@ function DataTablePagination({
|
|
|
85
85
|
table.setPageSize(Number(value));
|
|
86
86
|
},
|
|
87
87
|
children: [
|
|
88
|
-
/* @__PURE__ */ jsx(SelectTrigger, { className: "h-8 w-
|
|
89
|
-
/* @__PURE__ */ jsx(SelectContent, { side: "top", children: [10, 20, 30, 40, 50].map((pageSize) => /* @__PURE__ */ jsx(SelectItem, { value:
|
|
88
|
+
/* @__PURE__ */ jsx(SelectTrigger, { className: "h-8 w-16", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: table.getState().pagination.pageSize }) }),
|
|
89
|
+
/* @__PURE__ */ jsx(SelectContent, { side: "top", children: [10, 20, 30, 40, 50].map((pageSize) => /* @__PURE__ */ jsx(SelectItem, { value: String(pageSize), children: pageSize }, pageSize)) })
|
|
90
90
|
]
|
|
91
91
|
}
|
|
92
92
|
)
|
|
93
93
|
] }),
|
|
94
|
-
/* @__PURE__ */ jsxs("div", { className: "flex w-
|
|
94
|
+
/* @__PURE__ */ jsxs("div", { className: "flex w-28 items-center justify-center text-sm font-medium", children: [
|
|
95
95
|
"Page ",
|
|
96
96
|
table.getState().pagination.pageIndex + 1,
|
|
97
97
|
" of ",
|
|
@@ -170,7 +170,7 @@ function DataTableColumnHeader({
|
|
|
170
170
|
className
|
|
171
171
|
}) {
|
|
172
172
|
if (!column.getCanSort()) {
|
|
173
|
-
return /* @__PURE__ */ jsx("div", { className
|
|
173
|
+
return /* @__PURE__ */ jsx("div", { className, children: title });
|
|
174
174
|
}
|
|
175
175
|
return /* @__PURE__ */ jsx("div", { className: cn("flex items-center space-x-2", className), children: /* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
176
176
|
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "ghost", size: "xs", className: "data-[state=open]:bg-accent -ml-3", children: [
|
package/dist/data-table.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/data-table.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport type * as ReactTable from \"@tanstack/react-table\";\nimport { type SortDirection } from \"@tanstack/react-table\";\nimport {\n ArrowDownIcon,\n ArrowUpIcon,\n CaretSortIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n DoubleArrowLeftIcon,\n DoubleArrowRightIcon,\n EyeNoneIcon,\n MixerHorizontalIcon,\n} from \"@radix-ui/react-icons\";\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"./dropdown-menu\";\nimport { Button } from \"./button\";\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"./select\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableViewOptions\n * -------------------------------------------------------------------------- */\n\ninterface DataTableViewOptionsProps<TData> {\n table: ReactTable.Table<TData>;\n}\n\nfunction DataTableViewOptions<TData>({ table }: DataTableViewOptionsProps<TData>): React.JSX.Element {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"outline\" size=\"sm\" className=\"ml-auto hidden h-8 lg:flex\">\n <MixerHorizontalIcon className=\"mr-2 size-4\" />\n View\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-[150px]\">\n <DropdownMenuLabel>Toggle columns</DropdownMenuLabel>\n <DropdownMenuSeparator />\n {table\n .getAllColumns()\n .filter((column) => typeof column.accessorFn !== \"undefined\" && column.getCanHide())\n .map((column) => {\n return (\n <DropdownMenuCheckboxItem\n key={column.id}\n className=\"capitalize\"\n checked={column.getIsVisible()}\n onCheckedChange={(value) => {\n column.toggleVisibility(Boolean(value));\n }}\n >\n {column.id}\n </DropdownMenuCheckboxItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTablePagination\n * -------------------------------------------------------------------------- */\n\ninterface DataTablePaginationProps<TData> extends React.HTMLAttributes<HTMLDivElement> {\n table: ReactTable.Table<TData>;\n}\n\nfunction DataTablePagination<TData>({\n table,\n className,\n ...props\n}: DataTablePaginationProps<TData>): React.JSX.Element {\n return (\n <div className={cn(\"flex items-center justify-between px-2\", className)} {...props}>\n <div className=\"text-muted-foreground flex-1 text-sm\">\n {table.getFilteredSelectedRowModel().rows.length} of {table.getFilteredRowModel().rows.length} row(s) selected.\n </div>\n <div className=\"flex items-center space-x-6 lg:space-x-8\">\n <div className=\"flex items-center space-x-2\">\n <p className=\"text-sm font-medium\">Rows per page</p>\n <Select\n value={String(table.getState().pagination.pageSize)}\n onValueChange={(value) => {\n table.setPageSize(Number(value));\n }}\n >\n <SelectTrigger className=\"h-8 w-[70px]\">\n <SelectValue placeholder={table.getState().pagination.pageSize} />\n </SelectTrigger>\n <SelectContent side=\"top\">\n {[10, 20, 30, 40, 50].map((pageSize) => (\n <SelectItem key={pageSize} value={`${pageSize}`}>\n {pageSize}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div className=\"flex w-[100px] items-center justify-center text-sm font-medium\">\n Page {table.getState().pagination.pageIndex + 1} of {table.getPageCount()}\n </div>\n <div className=\"flex items-center space-x-2\">\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n className=\"hidden lg:flex\"\n onClick={() => {\n table.setPageIndex(0);\n }}\n disabled={!table.getCanPreviousPage()}\n >\n <span className=\"sr-only\">Go to first page</span>\n <DoubleArrowLeftIcon className=\"size-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n onClick={() => {\n table.previousPage();\n }}\n disabled={!table.getCanPreviousPage()}\n >\n <span className=\"sr-only\">Go to previous page</span>\n <ChevronLeftIcon className=\"size-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n onClick={() => {\n table.nextPage();\n }}\n disabled={!table.getCanNextPage()}\n >\n <span className=\"sr-only\">Go to next page</span>\n <ChevronRightIcon className=\"size-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n className=\"hidden lg:flex\"\n onClick={() => {\n table.setPageIndex(table.getPageCount() - 1);\n }}\n disabled={!table.getCanNextPage()}\n >\n <span className=\"sr-only\">Go to last page</span>\n <DoubleArrowRightIcon className=\"size-4\" />\n </Button>\n </div>\n </div>\n </div>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableColumnHeader\n * -------------------------------------------------------------------------- */\n\ninterface DataTableColumnHeaderProps<TData, TValue> extends React.HTMLAttributes<HTMLDivElement> {\n column: ReactTable.Column<TData, TValue>;\n title: string;\n}\n\nfunction DataTableColumnHeader<TData, TValue>({\n column,\n title,\n className,\n}: DataTableColumnHeaderProps<TData, TValue>): React.JSX.Element {\n if (!column.getCanSort()) {\n return <div className={cn(className)}>{title}</div>;\n }\n\n return (\n <div className={cn(\"flex items-center space-x-2\", className)}>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"ghost\" size=\"xs\" className=\"data-[state=open]:bg-accent -ml-3\">\n <span>{title}</span>\n <SortIcon sorted={column.getIsSorted()} />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\">\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(false);\n }}\n >\n <ArrowUpIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Asc\n </DropdownMenuItem>\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(true);\n }}\n >\n <ArrowDownIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Desc\n </DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem\n onClick={() => {\n column.toggleVisibility(false);\n }}\n >\n <EyeNoneIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Hide\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n );\n}\n\nfunction SortIcon({ sorted }: { sorted: false | SortDirection }): React.JSX.Element {\n switch (sorted) {\n case \"desc\":\n return <ArrowDownIcon className=\"ml-2 size-4\" />;\n case \"asc\":\n return <ArrowUpIcon className=\"ml-2 size-4\" />;\n default:\n return <CaretSortIcon className=\"ml-2 size-4\" />;\n }\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n DataTableViewOptions,\n DataTablePagination,\n DataTableColumnHeader,\n type DataTableViewOptionsProps,\n type DataTablePaginationProps,\n type DataTableColumnHeaderProps,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAKA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AA0BC,SACE,KADF;AAJR,SAAS,qBAA4B,EAAE,MAAM,GAAwD;AACnG,SACE,qBAAC,gBACC;AAAA,wBAAC,uBAAoB,SAAO,MAC1B,+BAAC,UAAO,SAAQ,WAAU,MAAK,MAAK,WAAU,8BAC5C;AAAA,0BAAC,uBAAoB,WAAU,eAAc;AAAA,MAAE;AAAA,OAEjD,GAC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;AAAA,OACF;AAAA,KACF,GACF;AAEJ;AAEA,SAAS,SAAS,EAAE,OAAO,GAAyD;AAClF,UAAQ,QAAQ;AAAA,IACd,KAAK;AACH,aAAO,oBAAC,iBAAc,WAAU,eAAc;AAAA,IAChD,KAAK;AACH,aAAO,oBAAC,eAAY,WAAU,eAAc;AAAA,IAC9C;AACE,aAAO,oBAAC,iBAAc,WAAU,eAAc;AAAA,EAClD;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/data-table.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport type * as ReactTable from \"@tanstack/react-table\";\nimport { type SortDirection } from \"@tanstack/react-table\";\nimport {\n ArrowDownIcon,\n ArrowUpIcon,\n CaretSortIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n DoubleArrowLeftIcon,\n DoubleArrowRightIcon,\n EyeNoneIcon,\n MixerHorizontalIcon,\n} from \"@radix-ui/react-icons\";\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"./dropdown-menu\";\nimport { Button } from \"./button\";\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"./select\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableViewOptions\n * -------------------------------------------------------------------------- */\n\ninterface DataTableViewOptionsProps<TData> {\n table: ReactTable.Table<TData>;\n}\n\nfunction DataTableViewOptions<TData>({ table }: DataTableViewOptionsProps<TData>): React.JSX.Element {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"outline\" size=\"sm\" className=\"ml-auto hidden h-8 lg:flex\">\n <MixerHorizontalIcon className=\"mr-2 size-4\" />\n View\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-36\">\n <DropdownMenuLabel>Toggle columns</DropdownMenuLabel>\n <DropdownMenuSeparator />\n {table\n .getAllColumns()\n .filter((column) => typeof column.accessorFn !== \"undefined\" && column.getCanHide())\n .map((column) => {\n return (\n <DropdownMenuCheckboxItem\n key={column.id}\n className=\"capitalize\"\n checked={column.getIsVisible()}\n onCheckedChange={(value) => {\n column.toggleVisibility(Boolean(value));\n }}\n >\n {column.id}\n </DropdownMenuCheckboxItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTablePagination\n * -------------------------------------------------------------------------- */\n\ninterface DataTablePaginationProps<TData> extends React.HTMLAttributes<HTMLDivElement> {\n table: ReactTable.Table<TData>;\n}\n\nfunction DataTablePagination<TData>({\n table,\n className,\n ...props\n}: DataTablePaginationProps<TData>): React.JSX.Element {\n return (\n <div className={cn(\"flex items-center justify-between px-2\", className)} {...props}>\n <div className=\"text-muted-foreground flex-1 text-sm\">\n {table.getFilteredSelectedRowModel().rows.length} of {table.getFilteredRowModel().rows.length} row(s) selected.\n </div>\n <div className=\"flex items-center space-x-6 lg:space-x-8\">\n <div className=\"flex items-center space-x-2\">\n <p className=\"text-sm font-medium\">Rows per page</p>\n <Select\n value={String(table.getState().pagination.pageSize)}\n onValueChange={(value) => {\n table.setPageSize(Number(value));\n }}\n >\n <SelectTrigger className=\"h-8 w-16\">\n <SelectValue placeholder={table.getState().pagination.pageSize} />\n </SelectTrigger>\n <SelectContent side=\"top\">\n {[10, 20, 30, 40, 50].map((pageSize) => (\n <SelectItem key={pageSize} value={String(pageSize)}>\n {pageSize}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div className=\"flex w-28 items-center justify-center text-sm font-medium\">\n Page {table.getState().pagination.pageIndex + 1} of {table.getPageCount()}\n </div>\n <div className=\"flex items-center space-x-2\">\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n className=\"hidden lg:flex\"\n onClick={() => {\n table.setPageIndex(0);\n }}\n disabled={!table.getCanPreviousPage()}\n >\n <span className=\"sr-only\">Go to first page</span>\n <DoubleArrowLeftIcon className=\"size-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n onClick={() => {\n table.previousPage();\n }}\n disabled={!table.getCanPreviousPage()}\n >\n <span className=\"sr-only\">Go to previous page</span>\n <ChevronLeftIcon className=\"size-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n onClick={() => {\n table.nextPage();\n }}\n disabled={!table.getCanNextPage()}\n >\n <span className=\"sr-only\">Go to next page</span>\n <ChevronRightIcon className=\"size-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n className=\"hidden lg:flex\"\n onClick={() => {\n table.setPageIndex(table.getPageCount() - 1);\n }}\n disabled={!table.getCanNextPage()}\n >\n <span className=\"sr-only\">Go to last page</span>\n <DoubleArrowRightIcon className=\"size-4\" />\n </Button>\n </div>\n </div>\n </div>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableColumnHeader\n * -------------------------------------------------------------------------- */\n\ninterface DataTableColumnHeaderProps<TData, TValue> extends React.HTMLAttributes<HTMLDivElement> {\n column: ReactTable.Column<TData, TValue>;\n title: string;\n}\n\nfunction DataTableColumnHeader<TData, TValue>({\n column,\n title,\n className,\n}: DataTableColumnHeaderProps<TData, TValue>): React.JSX.Element {\n if (!column.getCanSort()) {\n return <div className={className}>{title}</div>;\n }\n\n return (\n <div className={cn(\"flex items-center space-x-2\", className)}>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"ghost\" size=\"xs\" className=\"data-[state=open]:bg-accent -ml-3\">\n <span>{title}</span>\n <SortIcon sorted={column.getIsSorted()} />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\">\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(false);\n }}\n >\n <ArrowUpIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Asc\n </DropdownMenuItem>\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(true);\n }}\n >\n <ArrowDownIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Desc\n </DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem\n onClick={() => {\n column.toggleVisibility(false);\n }}\n >\n <EyeNoneIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Hide\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n );\n}\n\nfunction SortIcon({ sorted }: { sorted: false | SortDirection }): React.JSX.Element {\n switch (sorted) {\n case \"desc\":\n return <ArrowDownIcon className=\"ml-2 size-4\" />;\n case \"asc\":\n return <ArrowUpIcon className=\"ml-2 size-4\" />;\n default:\n return <CaretSortIcon className=\"ml-2 size-4\" />;\n }\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n DataTableViewOptions,\n DataTablePagination,\n DataTableColumnHeader,\n type DataTableViewOptionsProps,\n type DataTablePaginationProps,\n type DataTableColumnHeaderProps,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAKA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AA0BC,SACE,KADF;AAJR,SAAS,qBAA4B,EAAE,MAAM,GAAwD;AACnG,SACE,qBAAC,gBACC;AAAA,wBAAC,uBAAoB,SAAO,MAC1B,+BAAC,UAAO,SAAQ,WAAU,MAAK,MAAK,WAAU,8BAC5C;AAAA,0BAAC,uBAAoB,WAAU,eAAc;AAAA,MAAE;AAAA,OAEjD,GACF;AAAA,IACA,qBAAC,uBAAoB,OAAM,OAAM,WAAU,QACzC;AAAA,0BAAC,qBAAkB,4BAAc;AAAA,MACjC,oBAAC,yBAAsB;AAAA,MACtB,MACE,cAAc,EACd,OAAO,CAAC,WAAW,OAAO,OAAO,eAAe,eAAe,OAAO,WAAW,CAAC,EAClF,IAAI,CAAC,WAAW;AACf,eACE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Ac;AAAA,EAClD;AACF;","names":[]}
|
package/dist/drawer.js
CHANGED
|
@@ -20,12 +20,12 @@ var DrawerContent = React.forwardRef(
|
|
|
20
20
|
{
|
|
21
21
|
ref,
|
|
22
22
|
className: _chunkG3NP7M2Njs.cn.call(void 0,
|
|
23
|
-
"bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-
|
|
23
|
+
"bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border",
|
|
24
24
|
className
|
|
25
25
|
),
|
|
26
26
|
...props,
|
|
27
27
|
children: [
|
|
28
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-muted mx-auto mt-4 h-2 w-
|
|
28
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-muted mx-auto mt-4 h-2 w-24 rounded-full" }),
|
|
29
29
|
children
|
|
30
30
|
]
|
|
31
31
|
}
|
package/dist/drawer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/drawer.tsx"],"names":[],"mappings":";;;;;;AAEA,YAAY,WAAW;AACvB,SAAS,UAAU,uBAAuB;AAUjC,cA4BH,YA5BG;AADT,SAAS,OAAO,EAAE,wBAAwB,MAAM,GAAG,MAAM,GAAmC;AAC1F,SAAO,oBAAC,gBAAgB,MAAhB,EAAqB,uBAA+C,GAAG,OAAO;AACxF;AAOA,IAAM,gBAAgB,gBAAgB;AAOtC,IAAM,cAAc,gBAAgB;AASpC,IAAM,gBAAsB;AAAA,EAC1B,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QAClC,qBAAC,gBAAgB,QAAhB,EACC;AAAA,wBAAC,gBAAgB,SAAhB,EAAwB,WAAU,kCAAiC;AAAA,IACpE;AAAA,MAAC,gBAAgB;AAAA,MAAhB;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QACC,GAAG;A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A0B;AAAA,EAC9B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB,oBAAC,gBAAgB,aAAhB,EAA4B,KAAU,WAAW,GAAG,iCAAiC,SAAS,GAAI,GAAG,OAAO;AAEjH;AAEA,kBAAkB,cAAc,gBAAgB,YAAY","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Drawer as DrawerPrimitive } from \"vaul\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Drawer\n * -------------------------------------------------------------------------- */\n\ntype DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root>;\n\nfunction Drawer({ shouldScaleBackground = true, ...props }: DrawerProps): React.JSX.Element {\n return <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTrigger\n * -------------------------------------------------------------------------- */\n\ntype DrawerTriggerProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Trigger>;\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerClose\n * -------------------------------------------------------------------------- */\n\ntype DrawerCloseProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Close>;\nconst DrawerClose = DrawerPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerContent\n * -------------------------------------------------------------------------- */\n\ntype DrawerContentElement = React.ElementRef<typeof DrawerPrimitive.Content>;\ntype DrawerContentProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>;\n\nconst DrawerContent = React.forwardRef<DrawerContentElement, DrawerContentProps>(\n ({ className, children, ...props }, ref) => (\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-black/80\" />\n <DrawerPrimitive.Content\n ref={ref}\n className={cn(\n \"bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border\",\n className,\n )}\n {...props}\n >\n <div className=\"bg-muted mx-auto mt-4 h-2 w-24 rounded-full\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n ),\n);\n\nDrawerContent.displayName = \"DrawerContent\";\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerHeader\n * -------------------------------------------------------------------------- */\n\ntype DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerHeader({ className, ...props }: DrawerHeaderProps): React.JSX.Element {\n return <div className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerFooter\n * -------------------------------------------------------------------------- */\n\ntype DrawerFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerFooter({ className, ...props }: DrawerFooterProps): React.JSX.Element {\n return <div className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTitle\n * -------------------------------------------------------------------------- */\n\ntype DrawerTitleElement = React.ElementRef<typeof DrawerPrimitive.Title>;\ntype DrawerTitleProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>;\n\nconst DrawerTitle = React.forwardRef<DrawerTitleElement, DrawerTitleProps>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n));\n\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerDescription\n * -------------------------------------------------------------------------- */\n\ntype DrawerDescriptionElement = React.ElementRef<typeof DrawerPrimitive.Description>;\ntype DrawerDescriptionProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>;\n\nconst DrawerDescription = React.forwardRef<DrawerDescriptionElement, DrawerDescriptionProps>(\n ({ className, ...props }, ref) => (\n <DrawerPrimitive.Description ref={ref} className={cn(\"text-muted-foreground text-sm\", className)} {...props} />\n ),\n);\n\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Drawer,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n type DrawerProps,\n type DrawerTriggerProps,\n type DrawerCloseProps,\n type DrawerContentProps,\n type DrawerHeaderProps,\n type DrawerFooterProps,\n type DrawerTitleProps,\n type DrawerDescriptionProps,\n};\n"]}
|
package/dist/drawer.mjs
CHANGED
|
@@ -20,12 +20,12 @@ var DrawerContent = React.forwardRef(
|
|
|
20
20
|
{
|
|
21
21
|
ref,
|
|
22
22
|
className: cn(
|
|
23
|
-
"bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-
|
|
23
|
+
"bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border",
|
|
24
24
|
className
|
|
25
25
|
),
|
|
26
26
|
...props,
|
|
27
27
|
children: [
|
|
28
|
-
/* @__PURE__ */ jsx("div", { className: "bg-muted mx-auto mt-4 h-2 w-
|
|
28
|
+
/* @__PURE__ */ jsx("div", { className: "bg-muted mx-auto mt-4 h-2 w-24 rounded-full" }),
|
|
29
29
|
children
|
|
30
30
|
]
|
|
31
31
|
}
|
package/dist/drawer.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/drawer.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Drawer as DrawerPrimitive } from \"vaul\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Drawer\n * -------------------------------------------------------------------------- */\n\ntype DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root>;\n\nfunction Drawer({ shouldScaleBackground = true, ...props }: DrawerProps): React.JSX.Element {\n return <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTrigger\n * -------------------------------------------------------------------------- */\n\ntype DrawerTriggerProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Trigger>;\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerClose\n * -------------------------------------------------------------------------- */\n\ntype DrawerCloseProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Close>;\nconst DrawerClose = DrawerPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerContent\n * -------------------------------------------------------------------------- */\n\ntype DrawerContentElement = React.ElementRef<typeof DrawerPrimitive.Content>;\ntype DrawerContentProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>;\n\nconst DrawerContent = React.forwardRef<DrawerContentElement, DrawerContentProps>(\n ({ className, children, ...props }, ref) => (\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-black/80\" />\n <DrawerPrimitive.Content\n ref={ref}\n className={cn(\n \"bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-
|
|
1
|
+
{"version":3,"sources":["../src/drawer.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Drawer as DrawerPrimitive } from \"vaul\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Drawer\n * -------------------------------------------------------------------------- */\n\ntype DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root>;\n\nfunction Drawer({ shouldScaleBackground = true, ...props }: DrawerProps): React.JSX.Element {\n return <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTrigger\n * -------------------------------------------------------------------------- */\n\ntype DrawerTriggerProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Trigger>;\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerClose\n * -------------------------------------------------------------------------- */\n\ntype DrawerCloseProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Close>;\nconst DrawerClose = DrawerPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerContent\n * -------------------------------------------------------------------------- */\n\ntype DrawerContentElement = React.ElementRef<typeof DrawerPrimitive.Content>;\ntype DrawerContentProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>;\n\nconst DrawerContent = React.forwardRef<DrawerContentElement, DrawerContentProps>(\n ({ className, children, ...props }, ref) => (\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-black/80\" />\n <DrawerPrimitive.Content\n ref={ref}\n className={cn(\n \"bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border\",\n className,\n )}\n {...props}\n >\n <div className=\"bg-muted mx-auto mt-4 h-2 w-24 rounded-full\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n ),\n);\n\nDrawerContent.displayName = \"DrawerContent\";\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerHeader\n * -------------------------------------------------------------------------- */\n\ntype DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerHeader({ className, ...props }: DrawerHeaderProps): React.JSX.Element {\n return <div className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerFooter\n * -------------------------------------------------------------------------- */\n\ntype DrawerFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerFooter({ className, ...props }: DrawerFooterProps): React.JSX.Element {\n return <div className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTitle\n * -------------------------------------------------------------------------- */\n\ntype DrawerTitleElement = React.ElementRef<typeof DrawerPrimitive.Title>;\ntype DrawerTitleProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>;\n\nconst DrawerTitle = React.forwardRef<DrawerTitleElement, DrawerTitleProps>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n));\n\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerDescription\n * -------------------------------------------------------------------------- */\n\ntype DrawerDescriptionElement = React.ElementRef<typeof DrawerPrimitive.Description>;\ntype DrawerDescriptionProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>;\n\nconst DrawerDescription = React.forwardRef<DrawerDescriptionElement, DrawerDescriptionProps>(\n ({ className, ...props }, ref) => (\n <DrawerPrimitive.Description ref={ref} className={cn(\"text-muted-foreground text-sm\", className)} {...props} />\n ),\n);\n\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Drawer,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n type DrawerProps,\n type DrawerTriggerProps,\n type DrawerCloseProps,\n type DrawerContentProps,\n type DrawerHeaderProps,\n type DrawerFooterProps,\n type DrawerTitleProps,\n type DrawerDescriptionProps,\n};\n"],"mappings":";;;;;;AAEA,YAAY,WAAW;AACvB,SAAS,UAAU,uBAAuB;AAUjC,cA4BH,YA5BG;AADT,SAAS,OAAO,EAAE,wBAAwB,MAAM,GAAG,MAAM,GAAmC;AAC1F,SAAO,oBAAC,gBAAgB,MAAhB,EAAqB,uBAA+C,GAAG,OAAO;AACxF;AAOA,IAAM,gBAAgB,gBAAgB;AAOtC,IAAM,cAAc,gBAAgB;AASpC,IAAM,gBAAsB;AAAA,EAC1B,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QAClC,qBAAC,gBAAgB,QAAhB,EACC;AAAA,wBAAC,gBAAgB,SAAhB,EAAwB,WAAU,kCAAiC;AAAA,IACpE;AAAA,MAAC,gBAAgB;AAAA,MAAhB;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QACC,GAAG;AAAA,QAEJ;AAAA,8BAAC,SAAI,WAAU,+CAA8C;AAAA,UAC5D;AAAA;AAAA;AAAA,IACH;AAAA,KACF;AAEJ;AAEA,cAAc,cAAc;AAQ5B,SAAS,aAAa,EAAE,WAAW,GAAG,MAAM,GAAyC;AACnF,SAAO,oBAAC,SAAI,WAAW,GAAG,6CAA6C,SAAS,GAAI,GAAG,OAAO;AAChG;AAQA,SAAS,aAAa,EAAE,WAAW,GAAG,MAAM,GAAyC;AACnF,SAAO,oBAAC,SAAI,WAAW,GAAG,mCAAmC,SAAS,GAAI,GAAG,OAAO;AACtF;AASA,IAAM,cAAoB,iBAAiD,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACnG;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,qDAAqD,SAAS;AAAA,IAC3E,GAAG;AAAA;AACN,CACD;AAED,YAAY,cAAc,gBAAgB,MAAM;AAShD,IAAM,oBAA0B;AAAA,EAC9B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB,oBAAC,gBAAgB,aAAhB,EAA4B,KAAU,WAAW,GAAG,iCAAiC,SAAS,GAAI,GAAG,OAAO;AAEjH;AAEA,kBAAkB,cAAc,gBAAgB,YAAY;","names":[]}
|
package/dist/navigation-menu.js
CHANGED
|
@@ -53,7 +53,7 @@ var NavigationMenuTrigger = React.forwardRef(
|
|
|
53
53
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
54
54
|
_reacticons.ChevronDownIcon,
|
|
55
55
|
{
|
|
56
|
-
className:
|
|
56
|
+
className: "relative top-px ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
57
57
|
"aria-hidden": "true"
|
|
58
58
|
}
|
|
59
59
|
)
|
|
@@ -78,7 +78,7 @@ var NavigationMenuContent = React.forwardRef(
|
|
|
78
78
|
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
|
|
79
79
|
var NavigationMenuLink = NavigationMenuPrimitive.Link;
|
|
80
80
|
var NavigationMenuViewport = React.forwardRef(
|
|
81
|
-
({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className:
|
|
81
|
+
({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "perspective-[125rem] absolute left-0 top-full flex justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
82
82
|
NavigationMenuPrimitive.Viewport,
|
|
83
83
|
{
|
|
84
84
|
className: _chunkG3NP7M2Njs.cn.call(void 0,
|
|
@@ -101,7 +101,7 @@ var NavigationMenuIndicator = React.forwardRef(
|
|
|
101
101
|
className
|
|
102
102
|
),
|
|
103
103
|
...props,
|
|
104
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-border relative top-[60%]
|
|
104
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-border relative top-[60%] size-2 rotate-45 rounded-tl-sm shadow-md" })
|
|
105
105
|
}
|
|
106
106
|
)
|
|
107
107
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/navigation-menu.tsx"],"names":[],"mappings":";;;;;;;AAEA,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAChC,YAAY,6BAA6B;AAoBrC,SAME,KANF;AAbJ,IAAM,gCAAgC,IAAI;AAAA,EACxC,MAAM;AACR,CAAC;AASD,IAAM,iBAAuB;AAAA,EAC3B,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QAClC;AAAA,IAAyB;AAAA,IAAxB;AAAA,MACC;AAAA,MACA,WAAW,GAAG,mEAAmE,SAAS;A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AAAA,EACN,GACF;AAEJ;AAEA,uBAAuB,cAAsC,iCAAS;AAStE,IAAM,0BAAgC;AAAA,EACpC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB;AAAA,IAAyB;AAAA,IAAxB;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEJ,8BAAC,SAAI,WAAU,0EAAyE;AAAA;AAAA,EAC1F;AAEJ;AAEA,wBAAwB,cAAsC,kCAAU","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\";\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\";\nimport { cn, cva } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Variant: NavigationMenu\n * -------------------------------------------------------------------------- */\n\nconst navigationMenuTriggerVariants = cva({\n base: \"bg-background hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent/50 data-[active]:bg-accent/50 group inline-flex h-10 w-max items-center justify-center rounded-md px-3 py-2 text-sm font-medium transition-colors focus:outline-none disabled:pointer-events-none disabled:opacity-50\",\n});\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenu\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuElement = React.ElementRef<typeof NavigationMenuPrimitive.Root>;\ntype NavigationMenuProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>;\n\nconst NavigationMenu = React.forwardRef<NavigationMenuElement, NavigationMenuProps>(\n ({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Root\n ref={ref}\n className={cn(\"relative z-10 flex max-w-max flex-1 items-center justify-center\", className)}\n {...props}\n >\n {children}\n <NavigationMenuViewport />\n </NavigationMenuPrimitive.Root>\n ),\n);\n\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuList\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuListElement = React.ElementRef<typeof NavigationMenuPrimitive.List>;\ntype NavigationMenuListProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>;\n\nconst NavigationMenuList = React.forwardRef<NavigationMenuListElement, NavigationMenuListProps>(\n ({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.List\n ref={ref}\n className={cn(\"group flex flex-1 list-none items-center justify-center space-x-1\", className)}\n {...props}\n />\n ),\n);\n\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuItem\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuItemProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Item>;\n\nconst NavigationMenuItem = NavigationMenuPrimitive.Item;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuContent\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuTriggerElement = React.ElementRef<typeof NavigationMenuPrimitive.Trigger>;\ntype NavigationMenuTriggerProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>;\n\nconst NavigationMenuTrigger = React.forwardRef<NavigationMenuTriggerElement, NavigationMenuTriggerProps>(\n ({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Trigger\n ref={ref}\n className={navigationMenuTriggerVariants({\n className: [\"group\", className],\n })}\n {...props}\n >\n {children}\n <ChevronDownIcon\n className={cn(\"relative top-px ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180\")}\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n ),\n);\n\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuContent\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuContentElement = React.ElementRef<typeof NavigationMenuPrimitive.Content>;\ntype NavigationMenuContentProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>;\n\nconst NavigationMenuContent = React.forwardRef<NavigationMenuContentElement, NavigationMenuContentProps>(\n ({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Content\n ref={ref}\n className={cn(\n \"data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 left-0 top-0 w-full focus:outline-none md:absolute md:w-auto\",\n className,\n )}\n {...props}\n />\n ),\n);\n\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuLink\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuLinkProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Link>;\n\nconst NavigationMenuLink = NavigationMenuPrimitive.Link;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuViewport\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuViewportElement = React.ElementRef<typeof NavigationMenuPrimitive.Viewport>;\ntype NavigationMenuViewportProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>;\n\nconst NavigationMenuViewport = React.forwardRef<NavigationMenuViewportElement, NavigationMenuViewportProps>(\n ({ className, ...props }, ref) => (\n <div className={cn(\"perspective-[2000px] absolute left-0 top-full flex justify-center\")}>\n <NavigationMenuPrimitive.Viewport\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-90 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full origin-[top_center] overflow-hidden rounded-md border shadow transition-[width,height] duration-200 md:w-[var(--radix-navigation-menu-viewport-width)]\",\n className,\n )}\n ref={ref}\n {...props}\n />\n </div>\n ),\n);\n\nNavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuIndicator\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuIndicatorElement = React.ElementRef<typeof NavigationMenuPrimitive.Indicator>;\ntype NavigationMenuIndicatorProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>;\n\nconst NavigationMenuIndicator = React.forwardRef<NavigationMenuIndicatorElement, NavigationMenuIndicatorProps>(\n ({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Indicator\n ref={ref}\n className={cn(\n \"data-[state=visible]:animate-in data-[state=visible]:fade-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden transition\",\n className,\n )}\n {...props}\n >\n <div className=\"bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md\" />\n </NavigationMenuPrimitive.Indicator>\n ),\n);\n\nNavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n navigationMenuTriggerVariants,\n NavigationMenu,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuContent,\n NavigationMenuTrigger,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuViewport,\n type NavigationMenuProps,\n type NavigationMenuListProps,\n type NavigationMenuItemProps,\n type NavigationMenuContentProps,\n type NavigationMenuTriggerProps,\n type NavigationMenuLinkProps,\n type NavigationMenuIndicatorProps,\n type NavigationMenuViewportProps,\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/navigation-menu.tsx"],"names":[],"mappings":";;;;;;;AAEA,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAChC,YAAY,6BAA6B;AAoBrC,SAME,KANF;AAbJ,IAAM,gCAAgC,IAAI;AAAA,EACxC,MAAM;AACR,CAAC;AASD,IAAM,iBAAuB;AAAA,EAC3B,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AA,IAAxB;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACA;AAAA,MACC,GAAG;AAAA;AAAA,EACN,GACF;AAEJ;AAEA,uBAAuB,cAAsC,iCAAS;AAStE,IAAM,0BAAgC;AAAA,EACpC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB;AAAA,IAAyB;AAAA,IAAxB;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEJ,8BAAC,SAAI,WAAU,yEAAwE;AAAA;AAAA,EACzF;AAEJ;AAEA,wBAAwB,cAAsC,kCAAU","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\";\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\";\nimport { cn, cva } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Variant: NavigationMenu\n * -------------------------------------------------------------------------- */\n\nconst navigationMenuTriggerVariants = cva({\n base: \"bg-background hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent/50 data-[active]:bg-accent/50 group inline-flex h-10 w-max items-center justify-center rounded-md px-3 py-2 text-sm font-medium transition-colors focus:outline-none disabled:pointer-events-none disabled:opacity-50\",\n});\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenu\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuElement = React.ElementRef<typeof NavigationMenuPrimitive.Root>;\ntype NavigationMenuProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>;\n\nconst NavigationMenu = React.forwardRef<NavigationMenuElement, NavigationMenuProps>(\n ({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Root\n ref={ref}\n className={cn(\"relative z-10 flex max-w-max flex-1 items-center justify-center\", className)}\n {...props}\n >\n {children}\n <NavigationMenuViewport />\n </NavigationMenuPrimitive.Root>\n ),\n);\n\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuList\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuListElement = React.ElementRef<typeof NavigationMenuPrimitive.List>;\ntype NavigationMenuListProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>;\n\nconst NavigationMenuList = React.forwardRef<NavigationMenuListElement, NavigationMenuListProps>(\n ({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.List\n ref={ref}\n className={cn(\"group flex flex-1 list-none items-center justify-center space-x-1\", className)}\n {...props}\n />\n ),\n);\n\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuItem\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuItemProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Item>;\n\nconst NavigationMenuItem = NavigationMenuPrimitive.Item;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuContent\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuTriggerElement = React.ElementRef<typeof NavigationMenuPrimitive.Trigger>;\ntype NavigationMenuTriggerProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>;\n\nconst NavigationMenuTrigger = React.forwardRef<NavigationMenuTriggerElement, NavigationMenuTriggerProps>(\n ({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Trigger\n ref={ref}\n className={navigationMenuTriggerVariants({\n className: [\"group\", className],\n })}\n {...props}\n >\n {children}\n <ChevronDownIcon\n className=\"relative top-px ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180\"\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n ),\n);\n\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuContent\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuContentElement = React.ElementRef<typeof NavigationMenuPrimitive.Content>;\ntype NavigationMenuContentProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>;\n\nconst NavigationMenuContent = React.forwardRef<NavigationMenuContentElement, NavigationMenuContentProps>(\n ({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Content\n ref={ref}\n className={cn(\n \"data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 left-0 top-0 w-full focus:outline-none md:absolute md:w-auto\",\n className,\n )}\n {...props}\n />\n ),\n);\n\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuLink\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuLinkProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Link>;\n\nconst NavigationMenuLink = NavigationMenuPrimitive.Link;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuViewport\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuViewportElement = React.ElementRef<typeof NavigationMenuPrimitive.Viewport>;\ntype NavigationMenuViewportProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>;\n\nconst NavigationMenuViewport = React.forwardRef<NavigationMenuViewportElement, NavigationMenuViewportProps>(\n ({ className, ...props }, ref) => (\n <div className=\"perspective-[125rem] absolute left-0 top-full flex justify-center\">\n <NavigationMenuPrimitive.Viewport\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-90 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full origin-[top_center] overflow-hidden rounded-md border shadow transition-[width,height] duration-200 md:w-[var(--radix-navigation-menu-viewport-width)]\",\n className,\n )}\n ref={ref}\n {...props}\n />\n </div>\n ),\n);\n\nNavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuIndicator\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuIndicatorElement = React.ElementRef<typeof NavigationMenuPrimitive.Indicator>;\ntype NavigationMenuIndicatorProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>;\n\nconst NavigationMenuIndicator = React.forwardRef<NavigationMenuIndicatorElement, NavigationMenuIndicatorProps>(\n ({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Indicator\n ref={ref}\n className={cn(\n \"data-[state=visible]:animate-in data-[state=visible]:fade-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden transition\",\n className,\n )}\n {...props}\n >\n <div className=\"bg-border relative top-[60%] size-2 rotate-45 rounded-tl-sm shadow-md\" />\n </NavigationMenuPrimitive.Indicator>\n ),\n);\n\nNavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n navigationMenuTriggerVariants,\n NavigationMenu,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuContent,\n NavigationMenuTrigger,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuViewport,\n type NavigationMenuProps,\n type NavigationMenuListProps,\n type NavigationMenuItemProps,\n type NavigationMenuContentProps,\n type NavigationMenuTriggerProps,\n type NavigationMenuLinkProps,\n type NavigationMenuIndicatorProps,\n type NavigationMenuViewportProps,\n};\n"]}
|
package/dist/navigation-menu.mjs
CHANGED
|
@@ -53,7 +53,7 @@ var NavigationMenuTrigger = React.forwardRef(
|
|
|
53
53
|
/* @__PURE__ */ jsx(
|
|
54
54
|
ChevronDownIcon,
|
|
55
55
|
{
|
|
56
|
-
className:
|
|
56
|
+
className: "relative top-px ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
57
57
|
"aria-hidden": "true"
|
|
58
58
|
}
|
|
59
59
|
)
|
|
@@ -78,7 +78,7 @@ var NavigationMenuContent = React.forwardRef(
|
|
|
78
78
|
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
|
|
79
79
|
var NavigationMenuLink = NavigationMenuPrimitive.Link;
|
|
80
80
|
var NavigationMenuViewport = React.forwardRef(
|
|
81
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className:
|
|
81
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "perspective-[125rem] absolute left-0 top-full flex justify-center", children: /* @__PURE__ */ jsx(
|
|
82
82
|
NavigationMenuPrimitive.Viewport,
|
|
83
83
|
{
|
|
84
84
|
className: cn(
|
|
@@ -101,7 +101,7 @@ var NavigationMenuIndicator = React.forwardRef(
|
|
|
101
101
|
className
|
|
102
102
|
),
|
|
103
103
|
...props,
|
|
104
|
-
children: /* @__PURE__ */ jsx("div", { className: "bg-border relative top-[60%]
|
|
104
|
+
children: /* @__PURE__ */ jsx("div", { className: "bg-border relative top-[60%] size-2 rotate-45 rounded-tl-sm shadow-md" })
|
|
105
105
|
}
|
|
106
106
|
)
|
|
107
107
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/navigation-menu.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\";\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\";\nimport { cn, cva } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Variant: NavigationMenu\n * -------------------------------------------------------------------------- */\n\nconst navigationMenuTriggerVariants = cva({\n base: \"bg-background hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent/50 data-[active]:bg-accent/50 group inline-flex h-10 w-max items-center justify-center rounded-md px-3 py-2 text-sm font-medium transition-colors focus:outline-none disabled:pointer-events-none disabled:opacity-50\",\n});\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenu\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuElement = React.ElementRef<typeof NavigationMenuPrimitive.Root>;\ntype NavigationMenuProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>;\n\nconst NavigationMenu = React.forwardRef<NavigationMenuElement, NavigationMenuProps>(\n ({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Root\n ref={ref}\n className={cn(\"relative z-10 flex max-w-max flex-1 items-center justify-center\", className)}\n {...props}\n >\n {children}\n <NavigationMenuViewport />\n </NavigationMenuPrimitive.Root>\n ),\n);\n\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuList\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuListElement = React.ElementRef<typeof NavigationMenuPrimitive.List>;\ntype NavigationMenuListProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>;\n\nconst NavigationMenuList = React.forwardRef<NavigationMenuListElement, NavigationMenuListProps>(\n ({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.List\n ref={ref}\n className={cn(\"group flex flex-1 list-none items-center justify-center space-x-1\", className)}\n {...props}\n />\n ),\n);\n\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuItem\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuItemProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Item>;\n\nconst NavigationMenuItem = NavigationMenuPrimitive.Item;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuContent\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuTriggerElement = React.ElementRef<typeof NavigationMenuPrimitive.Trigger>;\ntype NavigationMenuTriggerProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>;\n\nconst NavigationMenuTrigger = React.forwardRef<NavigationMenuTriggerElement, NavigationMenuTriggerProps>(\n ({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Trigger\n ref={ref}\n className={navigationMenuTriggerVariants({\n className: [\"group\", className],\n })}\n {...props}\n >\n {children}\n <ChevronDownIcon\n className={cn(\"relative top-px ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180\")}\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n ),\n);\n\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuContent\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuContentElement = React.ElementRef<typeof NavigationMenuPrimitive.Content>;\ntype NavigationMenuContentProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>;\n\nconst NavigationMenuContent = React.forwardRef<NavigationMenuContentElement, NavigationMenuContentProps>(\n ({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Content\n ref={ref}\n className={cn(\n \"data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 left-0 top-0 w-full focus:outline-none md:absolute md:w-auto\",\n className,\n )}\n {...props}\n />\n ),\n);\n\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuLink\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuLinkProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Link>;\n\nconst NavigationMenuLink = NavigationMenuPrimitive.Link;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuViewport\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuViewportElement = React.ElementRef<typeof NavigationMenuPrimitive.Viewport>;\ntype NavigationMenuViewportProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>;\n\nconst NavigationMenuViewport = React.forwardRef<NavigationMenuViewportElement, NavigationMenuViewportProps>(\n ({ className, ...props }, ref) => (\n <div className={cn(\"perspective-[2000px] absolute left-0 top-full flex justify-center\")}>\n <NavigationMenuPrimitive.Viewport\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-90 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full origin-[top_center] overflow-hidden rounded-md border shadow transition-[width,height] duration-200 md:w-[var(--radix-navigation-menu-viewport-width)]\",\n className,\n )}\n ref={ref}\n {...props}\n />\n </div>\n ),\n);\n\nNavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuIndicator\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuIndicatorElement = React.ElementRef<typeof NavigationMenuPrimitive.Indicator>;\ntype NavigationMenuIndicatorProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>;\n\nconst NavigationMenuIndicator = React.forwardRef<NavigationMenuIndicatorElement, NavigationMenuIndicatorProps>(\n ({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Indicator\n ref={ref}\n className={cn(\n \"data-[state=visible]:animate-in data-[state=visible]:fade-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden transition\",\n className,\n )}\n {...props}\n >\n <div className=\"bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md\" />\n </NavigationMenuPrimitive.Indicator>\n ),\n);\n\nNavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n navigationMenuTriggerVariants,\n NavigationMenu,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuContent,\n NavigationMenuTrigger,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuViewport,\n type NavigationMenuProps,\n type NavigationMenuListProps,\n type NavigationMenuItemProps,\n type NavigationMenuContentProps,\n type NavigationMenuTriggerProps,\n type NavigationMenuLinkProps,\n type NavigationMenuIndicatorProps,\n type NavigationMenuViewportProps,\n};\n"],"mappings":";;;;;;;AAEA,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAChC,YAAY,6BAA6B;AAoBrC,SAME,KANF;AAbJ,IAAM,gCAAgC,IAAI;AAAA,EACxC,MAAM;AACR,CAAC;AASD,IAAM,iBAAuB;AAAA,EAC3B,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QAClC;AAAA,IAAyB;AAAA,IAAxB;AAAA,MACC;AAAA,MACA,WAAW,GAAG,mEAAmE,SAAS;AAAA,MACzF,GAAG;AAAA,MAEH;AAAA;AAAA,QACD,oBAAC,0BAAuB;AAAA;AAAA;AAAA,EAC1B;AAEJ;AAEA,eAAe,cAAsC,6BAAK;AAS1D,IAAM,qBAA2B;AAAA,EAC/B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB;AAAA,IAAyB;AAAA,IAAxB;AAAA,MACC;AAAA,MACA,WAAW,GAAG,qEAAqE,SAAS;AAAA,MAC3F,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,mBAAmB,cAAsC,6BAAK;AAQ9D,IAAM,qBAA6C;AASnD,IAAM,wBAA8B;AAAA,EAClC,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QAClC;AAAA,IAAyB;AAAA,IAAxB;AAAA,MACC;AAAA,MACA,WAAW,8BAA8B;AAAA,QACvC,WAAW,CAAC,SAAS,SAAS;AAAA,MAChC,CAAC;AAAA,MACA,GAAG;AAAA,MAEH;AAAA;AAAA,QACD;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,GAAG,wFAAwF;AAAA,YACtG,eAAY;AAAA;AAAA,QACd;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,sBAAsB,cAAsC,gCAAQ;AASpE,IAAM,wBAA8B;AAAA,EAClC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB;AAAA,IAAyB;AAAA,IAAxB;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,sBAAsB,cAAsC,gCAAQ;AAQpE,IAAM,qBAA6C;AASnD,IAAM,yBAA+B;AAAA,EACnC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB,oBAAC,SAAI,WAAW,GAAG,mEAAmE,GACpF;AAAA,IAAyB;AAAA,IAAxB;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACA;AAAA,MACC,GAAG;AAAA;AAAA,EACN,GACF;AAEJ;AAEA,uBAAuB,cAAsC,iCAAS;AAStE,IAAM,0BAAgC;AAAA,EACpC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB;AAAA,IAAyB;AAAA,IAAxB;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEJ,8BAAC,SAAI,WAAU,0EAAyE;AAAA;AAAA,EAC1F;AAEJ;AAEA,wBAAwB,cAAsC,kCAAU;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/navigation-menu.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\";\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\";\nimport { cn, cva } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Variant: NavigationMenu\n * -------------------------------------------------------------------------- */\n\nconst navigationMenuTriggerVariants = cva({\n base: \"bg-background hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent/50 data-[active]:bg-accent/50 group inline-flex h-10 w-max items-center justify-center rounded-md px-3 py-2 text-sm font-medium transition-colors focus:outline-none disabled:pointer-events-none disabled:opacity-50\",\n});\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenu\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuElement = React.ElementRef<typeof NavigationMenuPrimitive.Root>;\ntype NavigationMenuProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>;\n\nconst NavigationMenu = React.forwardRef<NavigationMenuElement, NavigationMenuProps>(\n ({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Root\n ref={ref}\n className={cn(\"relative z-10 flex max-w-max flex-1 items-center justify-center\", className)}\n {...props}\n >\n {children}\n <NavigationMenuViewport />\n </NavigationMenuPrimitive.Root>\n ),\n);\n\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuList\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuListElement = React.ElementRef<typeof NavigationMenuPrimitive.List>;\ntype NavigationMenuListProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>;\n\nconst NavigationMenuList = React.forwardRef<NavigationMenuListElement, NavigationMenuListProps>(\n ({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.List\n ref={ref}\n className={cn(\"group flex flex-1 list-none items-center justify-center space-x-1\", className)}\n {...props}\n />\n ),\n);\n\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuItem\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuItemProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Item>;\n\nconst NavigationMenuItem = NavigationMenuPrimitive.Item;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuContent\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuTriggerElement = React.ElementRef<typeof NavigationMenuPrimitive.Trigger>;\ntype NavigationMenuTriggerProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>;\n\nconst NavigationMenuTrigger = React.forwardRef<NavigationMenuTriggerElement, NavigationMenuTriggerProps>(\n ({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Trigger\n ref={ref}\n className={navigationMenuTriggerVariants({\n className: [\"group\", className],\n })}\n {...props}\n >\n {children}\n <ChevronDownIcon\n className=\"relative top-px ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180\"\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n ),\n);\n\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuContent\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuContentElement = React.ElementRef<typeof NavigationMenuPrimitive.Content>;\ntype NavigationMenuContentProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>;\n\nconst NavigationMenuContent = React.forwardRef<NavigationMenuContentElement, NavigationMenuContentProps>(\n ({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Content\n ref={ref}\n className={cn(\n \"data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 left-0 top-0 w-full focus:outline-none md:absolute md:w-auto\",\n className,\n )}\n {...props}\n />\n ),\n);\n\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuLink\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuLinkProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Link>;\n\nconst NavigationMenuLink = NavigationMenuPrimitive.Link;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuViewport\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuViewportElement = React.ElementRef<typeof NavigationMenuPrimitive.Viewport>;\ntype NavigationMenuViewportProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>;\n\nconst NavigationMenuViewport = React.forwardRef<NavigationMenuViewportElement, NavigationMenuViewportProps>(\n ({ className, ...props }, ref) => (\n <div className=\"perspective-[125rem] absolute left-0 top-full flex justify-center\">\n <NavigationMenuPrimitive.Viewport\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-90 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full origin-[top_center] overflow-hidden rounded-md border shadow transition-[width,height] duration-200 md:w-[var(--radix-navigation-menu-viewport-width)]\",\n className,\n )}\n ref={ref}\n {...props}\n />\n </div>\n ),\n);\n\nNavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuIndicator\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuIndicatorElement = React.ElementRef<typeof NavigationMenuPrimitive.Indicator>;\ntype NavigationMenuIndicatorProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>;\n\nconst NavigationMenuIndicator = React.forwardRef<NavigationMenuIndicatorElement, NavigationMenuIndicatorProps>(\n ({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Indicator\n ref={ref}\n className={cn(\n \"data-[state=visible]:animate-in data-[state=visible]:fade-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden transition\",\n className,\n )}\n {...props}\n >\n <div className=\"bg-border relative top-[60%] size-2 rotate-45 rounded-tl-sm shadow-md\" />\n </NavigationMenuPrimitive.Indicator>\n ),\n);\n\nNavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n navigationMenuTriggerVariants,\n NavigationMenu,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuContent,\n NavigationMenuTrigger,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuViewport,\n type NavigationMenuProps,\n type NavigationMenuListProps,\n type NavigationMenuItemProps,\n type NavigationMenuContentProps,\n type NavigationMenuTriggerProps,\n type NavigationMenuLinkProps,\n type NavigationMenuIndicatorProps,\n type NavigationMenuViewportProps,\n};\n"],"mappings":";;;;;;;AAEA,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAChC,YAAY,6BAA6B;AAoBrC,SAME,KANF;AAbJ,IAAM,gCAAgC,IAAI;AAAA,EACxC,MAAM;AACR,CAAC;AASD,IAAM,iBAAuB;AAAA,EAC3B,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QAClC;AAAA,IAAyB;AAAA,IAAxB;AAAA,MACC;AAAA,MACA,WAAW,GAAG,mEAAmE,SAAS;AAAA,MACzF,GAAG;AAAA,MAEH;AAAA;AAAA,QACD,oBAAC,0BAAuB;AAAA;AAAA;AAAA,EAC1B;AAEJ;AAEA,eAAe,cAAsC,6BAAK;AAS1D,IAAM,qBAA2B;AAAA,EAC/B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB;AAAA,IAAyB;AAAA,IAAxB;AAAA,MACC;AAAA,MACA,WAAW,GAAG,qEAAqE,SAAS;AAAA,MAC3F,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,mBAAmB,cAAsC,6BAAK;AAQ9D,IAAM,qBAA6C;AASnD,IAAM,wBAA8B;AAAA,EAClC,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QAClC;AAAA,IAAyB;AAAA,IAAxB;AAAA,MACC;AAAA,MACA,WAAW,8BAA8B;AAAA,QACvC,WAAW,CAAC,SAAS,SAAS;AAAA,MAChC,CAAC;AAAA,MACA,GAAG;AAAA,MAEH;AAAA;AAAA,QACD;AAAA,UAAC;AAAA;AAAA,YACC,WAAU;AAAA,YACV,eAAY;AAAA;AAAA,QACd;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,sBAAsB,cAAsC,gCAAQ;AASpE,IAAM,wBAA8B;AAAA,EAClC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB;AAAA,IAAyB;AAAA,IAAxB;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,sBAAsB,cAAsC,gCAAQ;AAQpE,IAAM,qBAA6C;AASnD,IAAM,yBAA+B;AAAA,EACnC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB,oBAAC,SAAI,WAAU,qEACb;AAAA,IAAyB;AAAA,IAAxB;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACA;AAAA,MACC,GAAG;AAAA;AAAA,EACN,GACF;AAEJ;AAEA,uBAAuB,cAAsC,iCAAS;AAStE,IAAM,0BAAgC;AAAA,EACpC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB;AAAA,IAAyB;AAAA,IAAxB;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEJ,8BAAC,SAAI,WAAU,yEAAwE;AAAA;AAAA,EACzF;AAEJ;AAEA,wBAAwB,cAAsC,kCAAU;","names":[]}
|
package/dist/progress.js
CHANGED
|
@@ -16,7 +16,7 @@ var Progress = React.forwardRef(({ className, value, ...props }, ref) => /* @__P
|
|
|
16
16
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
17
17
|
ProgressPrimitive.Indicator,
|
|
18
18
|
{
|
|
19
|
-
className: "bg-primary
|
|
19
|
+
className: "bg-primary size-full flex-1 transition-all",
|
|
20
20
|
style: {
|
|
21
21
|
transform: `translateX(-${String(100 - (_nullishCoalesce(value, () => ( 0))))}%)`
|
|
22
22
|
}
|
package/dist/progress.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/progress.tsx"],"names":[],"mappings":";;;;;;AAEA,YAAY,WAAW;AACvB,YAAY,uBAAuB;AAgB/B;AANJ,IAAM,WAAiB,iBAA2C,CAAC,EAAE,WAAW,OAAO,GAAG,MAAM,GAAG,QACjG;AAAA,EAAmB;AAAA,EAAlB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,kEAAkE,SAAS;AAAA,IACxF,GAAG;AAAA,IAEJ;AAAA,MAAmB;AAAA,MAAlB;AAAA,QACC,WAAU;AAAA,QACV,OAAO;AAAA,UACL,WAAW,eAAe,OAAO,OAAO,SAAS,EAAE,CAAC;AAAA,QACtD;AAAA;AAAA,IACF;AAAA;AACF,CACD;AAED,SAAS,cAAgC,uBAAK","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Progress\n * -------------------------------------------------------------------------- */\n\ntype ProgressElement = React.ElementRef<typeof ProgressPrimitive.Root>;\ntype ProgressProps = React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>;\n\nconst Progress = React.forwardRef<ProgressElement, ProgressProps>(({ className, value, ...props }, ref) => (\n <ProgressPrimitive.Root\n ref={ref}\n className={cn(\"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full\", className)}\n {...props}\n >\n <ProgressPrimitive.Indicator\n className=\"bg-primary
|
|
1
|
+
{"version":3,"sources":["../src/progress.tsx"],"names":[],"mappings":";;;;;;AAEA,YAAY,WAAW;AACvB,YAAY,uBAAuB;AAgB/B;AANJ,IAAM,WAAiB,iBAA2C,CAAC,EAAE,WAAW,OAAO,GAAG,MAAM,GAAG,QACjG;AAAA,EAAmB;AAAA,EAAlB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,kEAAkE,SAAS;AAAA,IACxF,GAAG;AAAA,IAEJ;AAAA,MAAmB;AAAA,MAAlB;AAAA,QACC,WAAU;AAAA,QACV,OAAO;AAAA,UACL,WAAW,eAAe,OAAO,OAAO,SAAS,EAAE,CAAC;AAAA,QACtD;AAAA;AAAA,IACF;AAAA;AACF,CACD;AAED,SAAS,cAAgC,uBAAK","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Progress\n * -------------------------------------------------------------------------- */\n\ntype ProgressElement = React.ElementRef<typeof ProgressPrimitive.Root>;\ntype ProgressProps = React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>;\n\nconst Progress = React.forwardRef<ProgressElement, ProgressProps>(({ className, value, ...props }, ref) => (\n <ProgressPrimitive.Root\n ref={ref}\n className={cn(\"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full\", className)}\n {...props}\n >\n <ProgressPrimitive.Indicator\n className=\"bg-primary size-full flex-1 transition-all\"\n style={{\n transform: `translateX(-${String(100 - (value ?? 0))}%)`,\n }}\n />\n </ProgressPrimitive.Root>\n));\n\nProgress.displayName = ProgressPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Progress, type ProgressProps };\n"]}
|
package/dist/progress.mjs
CHANGED
|
@@ -16,7 +16,7 @@ var Progress = React.forwardRef(({ className, value, ...props }, ref) => /* @__P
|
|
|
16
16
|
children: /* @__PURE__ */ jsx(
|
|
17
17
|
ProgressPrimitive.Indicator,
|
|
18
18
|
{
|
|
19
|
-
className: "bg-primary
|
|
19
|
+
className: "bg-primary size-full flex-1 transition-all",
|
|
20
20
|
style: {
|
|
21
21
|
transform: `translateX(-${String(100 - (value ?? 0))}%)`
|
|
22
22
|
}
|
package/dist/progress.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/progress.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Progress\n * -------------------------------------------------------------------------- */\n\ntype ProgressElement = React.ElementRef<typeof ProgressPrimitive.Root>;\ntype ProgressProps = React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>;\n\nconst Progress = React.forwardRef<ProgressElement, ProgressProps>(({ className, value, ...props }, ref) => (\n <ProgressPrimitive.Root\n ref={ref}\n className={cn(\"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full\", className)}\n {...props}\n >\n <ProgressPrimitive.Indicator\n className=\"bg-primary
|
|
1
|
+
{"version":3,"sources":["../src/progress.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Progress\n * -------------------------------------------------------------------------- */\n\ntype ProgressElement = React.ElementRef<typeof ProgressPrimitive.Root>;\ntype ProgressProps = React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>;\n\nconst Progress = React.forwardRef<ProgressElement, ProgressProps>(({ className, value, ...props }, ref) => (\n <ProgressPrimitive.Root\n ref={ref}\n className={cn(\"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full\", className)}\n {...props}\n >\n <ProgressPrimitive.Indicator\n className=\"bg-primary size-full flex-1 transition-all\"\n style={{\n transform: `translateX(-${String(100 - (value ?? 0))}%)`,\n }}\n />\n </ProgressPrimitive.Root>\n));\n\nProgress.displayName = ProgressPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Progress, type ProgressProps };\n"],"mappings":";;;;;;AAEA,YAAY,WAAW;AACvB,YAAY,uBAAuB;AAgB/B;AANJ,IAAM,WAAiB,iBAA2C,CAAC,EAAE,WAAW,OAAO,GAAG,MAAM,GAAG,QACjG;AAAA,EAAmB;AAAA,EAAlB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,kEAAkE,SAAS;AAAA,IACxF,GAAG;AAAA,IAEJ;AAAA,MAAmB;AAAA,MAAlB;AAAA,QACC,WAAU;AAAA,QACV,OAAO;AAAA,UACL,WAAW,eAAe,OAAO,OAAO,SAAS,EAAE,CAAC;AAAA,QACtD;AAAA;AAAA,IACF;AAAA;AACF,CACD;AAED,SAAS,cAAgC,uBAAK;","names":[]}
|
package/dist/radio-group.js
CHANGED
|
@@ -21,7 +21,7 @@ var RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => {
|
|
|
21
21
|
className
|
|
22
22
|
),
|
|
23
23
|
...props,
|
|
24
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadioGroupPrimitive.Indicator, { className: "after:bg-primary relative flex
|
|
24
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadioGroupPrimitive.Indicator, { className: "after:bg-primary relative flex size-full items-center justify-center after:block after:size-2.5 after:rounded-full" })
|
|
25
25
|
}
|
|
26
26
|
);
|
|
27
27
|
});
|
package/dist/radio-group.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/radio-group.tsx"],"names":[],"mappings":";;;;;;AAEA,YAAY,WAAW;AACvB,YAAY,yBAAyB;AAW5B;AADT,IAAM,aAAmB,iBAA+C,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ;AACxG,SAAO,oBAAqB,0BAApB,EAAyB,WAAW,GAAG,cAAc,SAAS,GAAI,GAAG,OAAO,KAAU;AAChG,CAAC;AAED,WAAW,cAAkC,yBAAK;AASlD,IAAM,iBAAuB,iBAAuD,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ;AACpH,SACE;AAAA,IAAqB;AAAA,IAApB;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEJ,8BAAqB,+BAApB,EAA8B,WAAU,
|
|
1
|
+
{"version":3,"sources":["../src/radio-group.tsx"],"names":[],"mappings":";;;;;;AAEA,YAAY,WAAW;AACvB,YAAY,yBAAyB;AAW5B;AADT,IAAM,aAAmB,iBAA+C,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ;AACxG,SAAO,oBAAqB,0BAApB,EAAyB,WAAW,GAAG,cAAc,SAAS,GAAI,GAAG,OAAO,KAAU;AAChG,CAAC;AAED,WAAW,cAAkC,yBAAK;AASlD,IAAM,iBAAuB,iBAAuD,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ;AACpH,SACE;AAAA,IAAqB;AAAA,IAApB;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEJ,8BAAqB,+BAApB,EAA8B,WAAU,sHAAqH;AAAA;AAAA,EAChK;AAEJ,CAAC;AAED,eAAe,cAAkC,yBAAK","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: RadioGroup\n * -------------------------------------------------------------------------- */\n\ntype RadioGroupElement = React.ElementRef<typeof RadioGroupPrimitive.Root>;\ntype RadioGroupProps = React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>;\n\nconst RadioGroup = React.forwardRef<RadioGroupElement, RadioGroupProps>(({ className, ...props }, ref) => {\n return <RadioGroupPrimitive.Root className={cn(\"grid gap-2\", className)} {...props} ref={ref} />;\n});\n\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: RadioGroupItem\n * -------------------------------------------------------------------------- */\n\ntype RadioGroupItemElement = React.ElementRef<typeof RadioGroupPrimitive.Item>;\ntype RadioGroupItemProps = React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>;\n\nconst RadioGroupItem = React.forwardRef<RadioGroupItemElement, RadioGroupItemProps>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n \"border-compound/70 hover:border-compound text-compound-foreground aria-checked:border-primary focus-visible:ring-ring group peer aspect-square size-4 rounded-full border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"after:bg-primary relative flex size-full items-center justify-center after:block after:size-2.5 after:rounded-full\" />\n </RadioGroupPrimitive.Item>\n );\n});\n\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { RadioGroup, RadioGroupItem, type RadioGroupProps, type RadioGroupItemProps };\n"]}
|
package/dist/radio-group.mjs
CHANGED
|
@@ -21,7 +21,7 @@ var RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => {
|
|
|
21
21
|
className
|
|
22
22
|
),
|
|
23
23
|
...props,
|
|
24
|
-
children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: "after:bg-primary relative flex
|
|
24
|
+
children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: "after:bg-primary relative flex size-full items-center justify-center after:block after:size-2.5 after:rounded-full" })
|
|
25
25
|
}
|
|
26
26
|
);
|
|
27
27
|
});
|
package/dist/radio-group.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/radio-group.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: RadioGroup\n * -------------------------------------------------------------------------- */\n\ntype RadioGroupElement = React.ElementRef<typeof RadioGroupPrimitive.Root>;\ntype RadioGroupProps = React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>;\n\nconst RadioGroup = React.forwardRef<RadioGroupElement, RadioGroupProps>(({ className, ...props }, ref) => {\n return <RadioGroupPrimitive.Root className={cn(\"grid gap-2\", className)} {...props} ref={ref} />;\n});\n\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: RadioGroupItem\n * -------------------------------------------------------------------------- */\n\ntype RadioGroupItemElement = React.ElementRef<typeof RadioGroupPrimitive.Item>;\ntype RadioGroupItemProps = React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>;\n\nconst RadioGroupItem = React.forwardRef<RadioGroupItemElement, RadioGroupItemProps>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n \"border-compound/70 hover:border-compound text-compound-foreground aria-checked:border-primary focus-visible:ring-ring group peer aspect-square size-4 rounded-full border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"after:bg-primary relative flex
|
|
1
|
+
{"version":3,"sources":["../src/radio-group.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: RadioGroup\n * -------------------------------------------------------------------------- */\n\ntype RadioGroupElement = React.ElementRef<typeof RadioGroupPrimitive.Root>;\ntype RadioGroupProps = React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>;\n\nconst RadioGroup = React.forwardRef<RadioGroupElement, RadioGroupProps>(({ className, ...props }, ref) => {\n return <RadioGroupPrimitive.Root className={cn(\"grid gap-2\", className)} {...props} ref={ref} />;\n});\n\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: RadioGroupItem\n * -------------------------------------------------------------------------- */\n\ntype RadioGroupItemElement = React.ElementRef<typeof RadioGroupPrimitive.Item>;\ntype RadioGroupItemProps = React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>;\n\nconst RadioGroupItem = React.forwardRef<RadioGroupItemElement, RadioGroupItemProps>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n \"border-compound/70 hover:border-compound text-compound-foreground aria-checked:border-primary focus-visible:ring-ring group peer aspect-square size-4 rounded-full border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"after:bg-primary relative flex size-full items-center justify-center after:block after:size-2.5 after:rounded-full\" />\n </RadioGroupPrimitive.Item>\n );\n});\n\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { RadioGroup, RadioGroupItem, type RadioGroupProps, type RadioGroupItemProps };\n"],"mappings":";;;;;;AAEA,YAAY,WAAW;AACvB,YAAY,yBAAyB;AAW5B;AADT,IAAM,aAAmB,iBAA+C,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ;AACxG,SAAO,oBAAqB,0BAApB,EAAyB,WAAW,GAAG,cAAc,SAAS,GAAI,GAAG,OAAO,KAAU;AAChG,CAAC;AAED,WAAW,cAAkC,yBAAK;AASlD,IAAM,iBAAuB,iBAAuD,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ;AACpH,SACE;AAAA,IAAqB;AAAA,IAApB;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEJ,8BAAqB,+BAApB,EAA8B,WAAU,sHAAqH;AAAA;AAAA,EAChK;AAEJ,CAAC;AAED,eAAe,cAAkC,yBAAK;","names":[]}
|
package/dist/resizable.js
CHANGED
|
@@ -14,7 +14,7 @@ function ResizablePanelGroup({
|
|
|
14
14
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15
15
|
ResizablePrimitive.PanelGroup,
|
|
16
16
|
{
|
|
17
|
-
className: _chunkG3NP7M2Njs.cn.call(void 0, "flex
|
|
17
|
+
className: _chunkG3NP7M2Njs.cn.call(void 0, "flex size-full data-[panel-group-direction=vertical]:flex-col", className),
|
|
18
18
|
...props
|
|
19
19
|
}
|
|
20
20
|
);
|
package/dist/resizable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/resizable.tsx"],"names":[],"mappings":";;;;;;AAGA,YAAY,wBAAwB;AACpC,SAAS,2BAA2B;AAYhC;AALJ,SAAS,oBAAoB;AAAA,EAC3B;AAAA,EACA,GAAG;AACL,GAAkF;AAChF,SACE;AAAA,IAAoB;AAAA,IAAnB;AAAA,MACC,WAAW,GAAG,
|
|
1
|
+
{"version":3,"sources":["../src/resizable.tsx"],"names":[],"mappings":";;;;;;AAGA,YAAY,wBAAwB;AACpC,SAAS,2BAA2B;AAYhC;AALJ,SAAS,oBAAoB;AAAA,EAC3B;AAAA,EACA,GAAG;AACL,GAAkF;AAChF,SACE;AAAA,IAAoB;AAAA,IAAnB;AAAA,MACC,WAAW,GAAG,iEAAiE,SAAS;AAAA,MACvF,GAAG;AAAA;AAAA,EACN;AAEJ;AAMA,IAAM,iBAAoC;AAM1C,SAAS,gBAAgB;AAAA,EACvB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAEsB;AACpB,SACE;AAAA,IAAoB;AAAA,IAAnB;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEH,uBACC,oBAAC,SAAI,WAAU,6EACb,8BAAC,uBAAoB,WAAU,YAAW,GAC5C,IACE;AAAA;AAAA,EACN;AAEJ","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as ResizablePrimitive from \"react-resizable-panels\";\nimport { DragHandleDots2Icon } from \"@radix-ui/react-icons\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: ResizablePanelGroup\n * -------------------------------------------------------------------------- */\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>): React.JSX.Element {\n return (\n <ResizablePrimitive.PanelGroup\n className={cn(\"flex size-full data-[panel-group-direction=vertical]:flex-col\", className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ResizablePanel\n * -------------------------------------------------------------------------- */\n\nconst ResizablePanel = ResizablePrimitive.Panel;\n\n/* -----------------------------------------------------------------------------\n * Component: ResizableHandle\n * -------------------------------------------------------------------------- */\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {\n withHandle?: boolean;\n}): React.JSX.Element {\n return (\n <ResizablePrimitive.PanelResizeHandle\n className={cn(\n \"bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90\",\n className,\n )}\n {...props}\n >\n {withHandle ? (\n <div className=\"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-sm border\">\n <DragHandleDots2Icon className=\"size-2.5\" />\n </div>\n ) : null}\n </ResizablePrimitive.PanelResizeHandle>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle };\n"]}
|
package/dist/resizable.mjs
CHANGED
|
@@ -14,7 +14,7 @@ function ResizablePanelGroup({
|
|
|
14
14
|
return /* @__PURE__ */ jsx(
|
|
15
15
|
ResizablePrimitive.PanelGroup,
|
|
16
16
|
{
|
|
17
|
-
className: cn("flex
|
|
17
|
+
className: cn("flex size-full data-[panel-group-direction=vertical]:flex-col", className),
|
|
18
18
|
...props
|
|
19
19
|
}
|
|
20
20
|
);
|
package/dist/resizable.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/resizable.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as ResizablePrimitive from \"react-resizable-panels\";\nimport { DragHandleDots2Icon } from \"@radix-ui/react-icons\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: ResizablePanelGroup\n * -------------------------------------------------------------------------- */\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>): React.JSX.Element {\n return (\n <ResizablePrimitive.PanelGroup\n className={cn(\"flex
|
|
1
|
+
{"version":3,"sources":["../src/resizable.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as ResizablePrimitive from \"react-resizable-panels\";\nimport { DragHandleDots2Icon } from \"@radix-ui/react-icons\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: ResizablePanelGroup\n * -------------------------------------------------------------------------- */\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>): React.JSX.Element {\n return (\n <ResizablePrimitive.PanelGroup\n className={cn(\"flex size-full data-[panel-group-direction=vertical]:flex-col\", className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ResizablePanel\n * -------------------------------------------------------------------------- */\n\nconst ResizablePanel = ResizablePrimitive.Panel;\n\n/* -----------------------------------------------------------------------------\n * Component: ResizableHandle\n * -------------------------------------------------------------------------- */\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {\n withHandle?: boolean;\n}): React.JSX.Element {\n return (\n <ResizablePrimitive.PanelResizeHandle\n className={cn(\n \"bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90\",\n className,\n )}\n {...props}\n >\n {withHandle ? (\n <div className=\"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-sm border\">\n <DragHandleDots2Icon className=\"size-2.5\" />\n </div>\n ) : null}\n </ResizablePrimitive.PanelResizeHandle>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle };\n"],"mappings":";;;;;;AAGA,YAAY,wBAAwB;AACpC,SAAS,2BAA2B;AAYhC;AALJ,SAAS,oBAAoB;AAAA,EAC3B;AAAA,EACA,GAAG;AACL,GAAkF;AAChF,SACE;AAAA,IAAoB;AAAA,IAAnB;AAAA,MACC,WAAW,GAAG,iEAAiE,SAAS;AAAA,MACvF,GAAG;AAAA;AAAA,EACN;AAEJ;AAMA,IAAM,iBAAoC;AAM1C,SAAS,gBAAgB;AAAA,EACvB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAEsB;AACpB,SACE;AAAA,IAAoB;AAAA,IAAnB;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEH,uBACC,oBAAC,SAAI,WAAU,6EACb,8BAAC,uBAAoB,WAAU,YAAW,GAC5C,IACE;AAAA;AAAA,EACN;AAEJ;","names":[]}
|
package/dist/sheet.js
CHANGED
|
@@ -29,7 +29,7 @@ var SheetClose = SheetPrimitive.Close;
|
|
|
29
29
|
var SheetContent = React.forwardRef(
|
|
30
30
|
({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SheetPrimitive.Portal, { children: [
|
|
31
31
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SheetPrimitive.Overlay, { className: "data-[state=open]:animate-in animation-duration-200 data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/80" }),
|
|
32
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SheetPrimitive.Content, { ref, className:
|
|
32
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SheetPrimitive.Content, { ref, className: sheetVariants({ side, className }), ...props, children: [
|
|
33
33
|
children,
|
|
34
34
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SheetPrimitive.Close, { className: "data-[state=open]:bg-secondary focus-visible:ring-ring absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none", children: [
|
|
35
35
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reacticons.Cross2Icon, { className: "size-4" }),
|
package/dist/sheet.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/sheet.tsx"],"names":[],"mappings":";;;;;;;AAEA,YAAY,WAAW;AACvB,YAAY,oBAAoB;AAChC,SAAS,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WAAU,qPAC9B;AAAA,4BAAC,cAAW,WAAU,UAAS;AAAA,QAC/B,oBAAC,UAAK,WAAU,WAAU,mBAAK;AAAA,SACjC;AAAA,OACF;AAAA,KACF;AAEJ;AAEA,aAAa,cAA6B,uBAAQ;AAQlD,SAAS,YAAY,EAAE,WAAW,GAAG,MAAM,GAAwC;AACjF,SAAO,oBAAC,SAAI,WAAW,GAAG,oDAAoD,SAAS,GAAI,GAAG,OAAO;AACvG;AAQA,SAAS,YAAY,EAAE,WAAW,GAAG,MAAM,GAAwC;AACjF,SAAO,oBAAC,SAAI,WAAW,GAAG,iEAAiE,SAAS,GAAI,GAAG,OAAO;AACpH;AAEA,YAAY,cAAc;AAS1B,IAAM,aAAmB,iBAA+C,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAChG,oBAAgB,sBAAf,EAAqB,KAAU,WAAW,GAAG,yCAAyC,SAAS,GAAI,GAAG,OAAO,CAC/G;AAED,WAAW,cAA6B,qBAAM;AAS9C,IAAM,mBAAyB;AAAA,EAC7B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB,oBAAgB,4BAAf,EAA2B,KAAU,WAAW,GAAG,iCAAiC,SAAS,GAAI,GAAG,OAAO;AAEhH;AAEA,iBAAiB,cAA6B,2BAAY","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as SheetPrimitive from \"@radix-ui/react-dialog\";\nimport { Cross2Icon } from \"@radix-ui/react-icons\";\nimport { type VariantProps } from \"cva\";\nimport { cn, cva } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Variant: Sheet\n * -------------------------------------------------------------------------- */\n\nconst sheetVariants = cva({\n base: \"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out animation-ease-in-out data-[state=closed]:animation-duration-300 data-[state=open]:animation-duration-500 fixed z-50 gap-4 p-6 shadow-lg\",\n variants: {\n side: {\n top: \"data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top inset-x-0 top-0 border-b\",\n bottom:\n \"data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom inset-x-0 bottom-0 border-t\",\n left: \"data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm\",\n right:\n \"data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm\",\n },\n },\n defaultVariants: {\n side: \"right\",\n },\n});\n\ntype SheetVariantsProps = VariantProps<typeof sheetVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: Sheet\n * -------------------------------------------------------------------------- */\n\ntype SheetProps = React.ComponentProps<typeof SheetPrimitive.Root>;\nconst Sheet = SheetPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetTrigger\n * -------------------------------------------------------------------------- */\n\ntype SheetTriggerProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Trigger>;\nconst SheetTrigger = SheetPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetClose\n * -------------------------------------------------------------------------- */\n\ntype SheetCloseProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Close>;\nconst SheetClose = SheetPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetContent\n * -------------------------------------------------------------------------- */\n\ntype SheetContentElement = React.ElementRef<typeof SheetPrimitive.Content>;\ntype SheetContentProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content> & SheetVariantsProps;\n\nconst SheetContent = React.forwardRef<SheetContentElement, SheetContentProps>(\n ({ side = \"right\", className, children, ...props }, ref) => (\n <SheetPrimitive.Portal>\n <SheetPrimitive.Overlay className=\"data-[state=open]:animate-in animation-duration-200 data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/80\" />\n <SheetPrimitive.Content ref={ref} className={sheetVariants({ side, className })} {...props}>\n {children}\n <SheetPrimitive.Close className=\"data-[state=open]:bg-secondary focus-visible:ring-ring absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none\">\n <Cross2Icon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPrimitive.Portal>\n ),\n);\n\nSheetContent.displayName = SheetPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetHeader\n * -------------------------------------------------------------------------- */\n\ntype SheetHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction SheetHeader({ className, ...props }: SheetHeaderProps): React.JSX.Element {\n return <div className={cn(\"flex flex-col space-y-2 text-center sm:text-left\", className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SheetFooter\n * -------------------------------------------------------------------------- */\n\ntype SheetFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction SheetFooter({ className, ...props }: SheetFooterProps): React.JSX.Element {\n return <div className={cn(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\", className)} {...props} />;\n}\n\nSheetFooter.displayName = \"SheetFooter\";\n\n/* -----------------------------------------------------------------------------\n * Component: SheetTitle\n * -------------------------------------------------------------------------- */\n\ntype SheetTitleElement = React.ElementRef<typeof SheetPrimitive.Title>;\ntype SheetTitleProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>;\n\nconst SheetTitle = React.forwardRef<SheetTitleElement, SheetTitleProps>(({ className, ...props }, ref) => (\n <SheetPrimitive.Title ref={ref} className={cn(\"text-foreground text-lg font-semibold\", className)} {...props} />\n));\n\nSheetTitle.displayName = SheetPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetDescription\n * -------------------------------------------------------------------------- */\n\ntype SheetDescriptionElement = React.ElementRef<typeof SheetPrimitive.Description>;\ntype SheetDescriptionProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>;\n\nconst SheetDescription = React.forwardRef<SheetDescriptionElement, SheetDescriptionProps>(\n ({ className, ...props }, ref) => (\n <SheetPrimitive.Description ref={ref} className={cn(\"text-muted-foreground text-sm\", className)} {...props} />\n ),\n);\n\nSheetDescription.displayName = SheetPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Sheet,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n type SheetProps,\n type SheetTriggerProps,\n type SheetCloseProps,\n type SheetContentProps,\n type SheetHeaderProps,\n type SheetFooterProps,\n type SheetTitleProps,\n type SheetDescriptionProps,\n};\n"]}
|