@waveso/ui 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +1 -1
- package/dist/accordion.d.ts +14 -0
- package/dist/accordion.js +81 -0
- package/dist/accordion.js.map +1 -0
- package/dist/alert.d.ts +8 -4
- package/dist/alert.js.map +1 -1
- package/dist/aspect-ratio.d.ts +10 -0
- package/dist/aspect-ratio.js +18 -0
- package/dist/aspect-ratio.js.map +1 -0
- package/dist/autocomplete.d.ts +48 -0
- package/dist/autocomplete.js +222 -0
- package/dist/autocomplete.js.map +1 -0
- package/dist/avatar.d.ts +13 -7
- package/dist/avatar.js.map +1 -1
- package/dist/badge.d.ts +3 -2
- package/dist/badge.js +1 -1
- package/dist/badge.js.map +1 -1
- package/dist/breadcrumb.d.ts +20 -0
- package/dist/breadcrumb.js +123 -0
- package/dist/breadcrumb.js.map +1 -0
- package/dist/button-group.d.ts +19 -0
- package/dist/button-group.js +81 -0
- package/dist/button-group.js.map +1 -0
- package/dist/button.d.ts +1 -1
- package/dist/card.d.ts +15 -8
- package/dist/card.js.map +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/chunk-D5XPEJ6T.js +36 -0
- package/dist/chunk-D5XPEJ6T.js.map +1 -0
- package/dist/chunk-IQ7YQ5XA.js +141 -0
- package/dist/chunk-IQ7YQ5XA.js.map +1 -0
- package/dist/chunk-NCHHHWTB.js +85 -0
- package/dist/chunk-NCHHHWTB.js.map +1 -0
- package/dist/chunk-PGXELRT4.js +228 -0
- package/dist/chunk-PGXELRT4.js.map +1 -0
- package/dist/chunk-QFSEK4M6.js +22 -0
- package/dist/chunk-QFSEK4M6.js.map +1 -0
- package/dist/chunk-QRW37LRP.js +25 -0
- package/dist/chunk-QRW37LRP.js.map +1 -0
- package/dist/chunk-RPQHL6C5.js +26 -0
- package/dist/chunk-RPQHL6C5.js.map +1 -0
- package/dist/chunk-WJDWQFO3.js +99 -0
- package/dist/chunk-WJDWQFO3.js.map +1 -0
- package/dist/chunk-YTSQQTSF.js +44 -0
- package/dist/chunk-YTSQQTSF.js.map +1 -0
- package/dist/chunk-ZOKFCJWM.js +11 -0
- package/dist/chunk-ZOKFCJWM.js.map +1 -0
- package/dist/collapsible.d.ts +12 -0
- package/dist/collapsible.js +16 -0
- package/dist/collapsible.js.map +1 -0
- package/dist/combobox.d.ts +48 -0
- package/dist/combobox.js +281 -0
- package/dist/combobox.js.map +1 -0
- package/dist/context-menu.d.ts +47 -0
- package/dist/context-menu.js +193 -0
- package/dist/context-menu.js.map +1 -0
- package/dist/dialog.js +1 -1
- package/dist/direction.d.ts +1 -0
- package/dist/direction.js +3 -0
- package/dist/direction.js.map +1 -0
- package/dist/drawer.d.ts +29 -0
- package/dist/drawer.js +143 -0
- package/dist/drawer.js.map +1 -0
- package/dist/encrypted-text.d.ts +16 -0
- package/dist/encrypted-text.js +141 -0
- package/dist/encrypted-text.js.map +1 -0
- package/dist/field.d.ts +22 -0
- package/dist/field.js +4 -0
- package/dist/field.js.map +1 -0
- package/dist/form.d.ts +80 -0
- package/dist/form.js +108 -0
- package/dist/form.js.map +1 -0
- package/dist/infinite-scroll.d.ts +19 -0
- package/dist/infinite-scroll.js +102 -0
- package/dist/infinite-scroll.js.map +1 -0
- package/dist/input-group.d.ts +29 -0
- package/dist/input-group.js +7 -0
- package/dist/input-group.js.map +1 -0
- package/dist/input-otp.d.ts +18 -0
- package/dist/input-otp.js +79 -0
- package/dist/input-otp.js.map +1 -0
- package/dist/input.d.ts +2 -1
- package/dist/input.js +2 -20
- package/dist/input.js.map +1 -1
- package/dist/item.d.ts +37 -0
- package/dist/item.js +181 -0
- package/dist/item.js.map +1 -0
- package/dist/kbd.d.ts +8 -0
- package/dist/kbd.js +30 -0
- package/dist/kbd.js.map +1 -0
- package/dist/label.d.ts +2 -1
- package/dist/label.js.map +1 -1
- package/dist/masonry.d.ts +17 -0
- package/dist/masonry.js +235 -0
- package/dist/masonry.js.map +1 -0
- package/dist/menu.d.ts +47 -0
- package/dist/menu.js +5 -0
- package/dist/menu.js.map +1 -0
- package/dist/menubar.d.ts +40 -0
- package/dist/menubar.js +84 -0
- package/dist/menubar.js.map +1 -0
- package/dist/pagination.d.ts +29 -0
- package/dist/pagination.js +120 -0
- package/dist/pagination.js.map +1 -0
- package/dist/popover.d.ts +24 -0
- package/dist/popover.js +105 -0
- package/dist/popover.js.map +1 -0
- package/dist/preview-card.d.ts +17 -0
- package/dist/preview-card.js +70 -0
- package/dist/preview-card.js.map +1 -0
- package/dist/radio-group.d.ts +12 -0
- package/dist/radio-group.js +28 -0
- package/dist/radio-group.js.map +1 -0
- package/dist/radio.d.ts +10 -0
- package/dist/radio.js +4 -0
- package/dist/radio.js.map +1 -0
- package/dist/scroll-area.d.ts +10 -0
- package/dist/scroll-area.js +59 -0
- package/dist/scroll-area.js.map +1 -0
- package/dist/select.d.ts +36 -0
- package/dist/select.js +208 -0
- package/dist/select.js.map +1 -0
- package/dist/separator.js +2 -24
- package/dist/separator.js.map +1 -1
- package/dist/skeleton.d.ts +2 -1
- package/dist/skeleton.js.map +1 -1
- package/dist/slider.d.ts +10 -0
- package/dist/slider.js +70 -0
- package/dist/slider.js.map +1 -0
- package/dist/spinner.d.ts +2 -1
- package/dist/spinner.js +3 -9
- package/dist/spinner.js.map +1 -1
- package/dist/table.d.ts +21 -0
- package/dist/table.js +106 -0
- package/dist/table.js.map +1 -0
- package/dist/tabs.d.ts +20 -0
- package/dist/tabs.js +82 -0
- package/dist/tabs.js.map +1 -0
- package/dist/textarea.js +2 -23
- package/dist/textarea.js.map +1 -1
- package/dist/toast.d.ts +57 -0
- package/dist/toast.js +239 -0
- package/dist/toast.js.map +1 -0
- package/dist/toggle-group.d.ts +17 -0
- package/dist/toggle-group.js +78 -0
- package/dist/toggle-group.js.map +1 -0
- package/dist/toggle.d.ts +14 -0
- package/dist/toggle.js +4 -0
- package/dist/toggle.js.map +1 -0
- package/dist/tooltip.d.ts +21 -0
- package/dist/tooltip.js +66 -0
- package/dist/tooltip.js.map +1 -0
- package/package.json +5 -1
- package/dist/chunk-L3UIJEIQ.js +0 -41
- package/dist/chunk-L3UIJEIQ.js.map +0 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
4
|
+
|
|
5
|
+
type BreadcrumbProps = React.ComponentProps<"nav">;
|
|
6
|
+
type BreadcrumbListProps = React.ComponentProps<"ol">;
|
|
7
|
+
type BreadcrumbItemProps = React.ComponentProps<"li">;
|
|
8
|
+
type BreadcrumbLinkProps = useRender.ComponentProps<"a">;
|
|
9
|
+
type BreadcrumbPageProps = React.ComponentProps<"span">;
|
|
10
|
+
type BreadcrumbSeparatorProps = React.ComponentProps<"li">;
|
|
11
|
+
type BreadcrumbEllipsisProps = React.ComponentProps<"span">;
|
|
12
|
+
declare function Breadcrumb({ ...props }: BreadcrumbProps): react_jsx_runtime.JSX.Element;
|
|
13
|
+
declare function BreadcrumbList({ className, ...props }: BreadcrumbListProps): react_jsx_runtime.JSX.Element;
|
|
14
|
+
declare function BreadcrumbItem({ className, ...props }: BreadcrumbItemProps): react_jsx_runtime.JSX.Element;
|
|
15
|
+
declare function BreadcrumbLink({ className, render, ...props }: BreadcrumbLinkProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
16
|
+
declare function BreadcrumbPage({ className, ...props }: BreadcrumbPageProps): react_jsx_runtime.JSX.Element;
|
|
17
|
+
declare function BreadcrumbSeparator({ children, className, ...props }: BreadcrumbSeparatorProps): react_jsx_runtime.JSX.Element;
|
|
18
|
+
declare function BreadcrumbEllipsis({ className, ...props }: BreadcrumbEllipsisProps): react_jsx_runtime.JSX.Element;
|
|
19
|
+
|
|
20
|
+
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { ChevronRightIcon, EllipsisIcon } from './chunk-WJDWQFO3.js';
|
|
2
|
+
import { cn } from './chunk-76UQO56T.js';
|
|
3
|
+
import { mergeProps } from '@base-ui/react/merge-props';
|
|
4
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function Breadcrumb({ ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
9
|
+
"nav",
|
|
10
|
+
{
|
|
11
|
+
"aria-label": "breadcrumb",
|
|
12
|
+
"data-slot": "breadcrumb",
|
|
13
|
+
...props
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
function BreadcrumbList({ className, ...props }) {
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
19
|
+
"ol",
|
|
20
|
+
{
|
|
21
|
+
"data-slot": "breadcrumb-list",
|
|
22
|
+
className: cn(
|
|
23
|
+
"text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm wrap-break-word",
|
|
24
|
+
className
|
|
25
|
+
),
|
|
26
|
+
...props
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
function BreadcrumbItem({ className, ...props }) {
|
|
31
|
+
return /* @__PURE__ */ jsx(
|
|
32
|
+
"li",
|
|
33
|
+
{
|
|
34
|
+
"data-slot": "breadcrumb-item",
|
|
35
|
+
className: cn(
|
|
36
|
+
"inline-flex items-center gap-1",
|
|
37
|
+
className
|
|
38
|
+
),
|
|
39
|
+
...props
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
function BreadcrumbLink({
|
|
44
|
+
className,
|
|
45
|
+
render,
|
|
46
|
+
...props
|
|
47
|
+
}) {
|
|
48
|
+
return useRender({
|
|
49
|
+
defaultTagName: "a",
|
|
50
|
+
props: mergeProps(
|
|
51
|
+
{
|
|
52
|
+
className: cn(
|
|
53
|
+
"hover:text-foreground transition-colors",
|
|
54
|
+
className
|
|
55
|
+
)
|
|
56
|
+
},
|
|
57
|
+
props
|
|
58
|
+
),
|
|
59
|
+
render,
|
|
60
|
+
state: {
|
|
61
|
+
slot: "breadcrumb-link"
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function BreadcrumbPage({ className, ...props }) {
|
|
66
|
+
return /* @__PURE__ */ jsx(
|
|
67
|
+
"span",
|
|
68
|
+
{
|
|
69
|
+
"data-slot": "breadcrumb-page",
|
|
70
|
+
role: "link",
|
|
71
|
+
"aria-disabled": "true",
|
|
72
|
+
"aria-current": "page",
|
|
73
|
+
className: cn(
|
|
74
|
+
"text-foreground font-normal",
|
|
75
|
+
className
|
|
76
|
+
),
|
|
77
|
+
...props
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
function BreadcrumbSeparator({
|
|
82
|
+
children,
|
|
83
|
+
className,
|
|
84
|
+
...props
|
|
85
|
+
}) {
|
|
86
|
+
return /* @__PURE__ */ jsx(
|
|
87
|
+
"li",
|
|
88
|
+
{
|
|
89
|
+
"data-slot": "breadcrumb-separator",
|
|
90
|
+
role: "presentation",
|
|
91
|
+
"aria-hidden": "true",
|
|
92
|
+
className: cn("[&>svg]:size-3.5", className),
|
|
93
|
+
...props,
|
|
94
|
+
children: children ?? /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
function BreadcrumbEllipsis({
|
|
99
|
+
className,
|
|
100
|
+
...props
|
|
101
|
+
}) {
|
|
102
|
+
return /* @__PURE__ */ jsxs(
|
|
103
|
+
"span",
|
|
104
|
+
{
|
|
105
|
+
"data-slot": "breadcrumb-ellipsis",
|
|
106
|
+
role: "presentation",
|
|
107
|
+
"aria-hidden": "true",
|
|
108
|
+
className: cn(
|
|
109
|
+
"flex size-5 items-center justify-center [&>svg]:size-4",
|
|
110
|
+
className
|
|
111
|
+
),
|
|
112
|
+
...props,
|
|
113
|
+
children: [
|
|
114
|
+
/* @__PURE__ */ jsx(EllipsisIcon, {}),
|
|
115
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "More" })
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
|
|
122
|
+
//# sourceMappingURL=breadcrumb.js.map
|
|
123
|
+
//# sourceMappingURL=breadcrumb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/breadcrumb.tsx"],"names":[],"mappings":"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","file":"breadcrumb.js","sourcesContent":["import * as React from \"react\"\nimport { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\n\nimport { cn } from \"./lib/utils\"\nimport { ChevronRightIcon, EllipsisIcon } from \"./lib/internal-icons\"\n\ntype BreadcrumbProps = React.ComponentProps<\"nav\">\ntype BreadcrumbListProps = React.ComponentProps<\"ol\">\ntype BreadcrumbItemProps = React.ComponentProps<\"li\">\ntype BreadcrumbLinkProps = useRender.ComponentProps<\"a\">\ntype BreadcrumbPageProps = React.ComponentProps<\"span\">\ntype BreadcrumbSeparatorProps = React.ComponentProps<\"li\">\ntype BreadcrumbEllipsisProps = React.ComponentProps<\"span\">\n\nfunction Breadcrumb({ ...props }: BreadcrumbProps) {\n return (\n <nav\n aria-label=\"breadcrumb\"\n data-slot=\"breadcrumb\"\n {...props}\n />\n )\n}\n\nfunction BreadcrumbList({ className, ...props }: BreadcrumbListProps) {\n return (\n <ol\n data-slot=\"breadcrumb-list\"\n className={cn(\n \"text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm wrap-break-word\",\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction BreadcrumbItem({ className, ...props }: BreadcrumbItemProps) {\n return (\n <li\n data-slot=\"breadcrumb-item\"\n className={cn(\n \"inline-flex items-center gap-1\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction BreadcrumbLink({\n className,\n render,\n ...props\n}: BreadcrumbLinkProps) {\n return useRender({\n defaultTagName: \"a\",\n props: mergeProps<\"a\">(\n {\n className: cn(\n \"hover:text-foreground transition-colors\",\n className\n ),\n },\n props,\n ),\n render,\n state: {\n slot: \"breadcrumb-link\",\n },\n })\n}\n\nfunction BreadcrumbPage({ className, ...props }: BreadcrumbPageProps) {\n return (\n <span\n data-slot=\"breadcrumb-page\"\n role=\"link\"\n aria-disabled=\"true\"\n aria-current=\"page\"\n className={cn(\n \"text-foreground font-normal\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction BreadcrumbSeparator({\n children,\n className,\n ...props\n}: BreadcrumbSeparatorProps) {\n return (\n <li\n data-slot=\"breadcrumb-separator\"\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\"[&>svg]:size-3.5\", className)}\n {...props}\n >\n {children ?? <ChevronRightIcon />}\n </li>\n )\n}\n\nfunction BreadcrumbEllipsis({\n className,\n ...props\n}: BreadcrumbEllipsisProps) {\n return (\n <span\n data-slot=\"breadcrumb-ellipsis\"\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\n \"flex size-5 items-center justify-center [&>svg]:size-4\",\n className,\n )}\n {...props}\n >\n <EllipsisIcon />\n <span className=\"sr-only\">More</span>\n </span>\n )\n}\n\nexport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbPage,\n BreadcrumbSeparator,\n BreadcrumbEllipsis,\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
5
|
+
import { VariantProps } from 'class-variance-authority';
|
|
6
|
+
import { Separator } from './separator.js';
|
|
7
|
+
import '@base-ui/react/separator';
|
|
8
|
+
|
|
9
|
+
declare const buttonGroupVariants: (props?: ({
|
|
10
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
11
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
12
|
+
type ButtonGroupProps = React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>;
|
|
13
|
+
type ButtonGroupTextProps = useRender.ComponentProps<"div">;
|
|
14
|
+
type ButtonGroupSeparatorProps = React.ComponentProps<typeof Separator>;
|
|
15
|
+
declare function ButtonGroup({ className, orientation, ...props }: ButtonGroupProps): react_jsx_runtime.JSX.Element;
|
|
16
|
+
declare function ButtonGroupText({ className, render, ...props }: ButtonGroupTextProps): React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>>;
|
|
17
|
+
declare function ButtonGroupSeparator({ className, orientation, ...props }: ButtonGroupSeparatorProps): react_jsx_runtime.JSX.Element;
|
|
18
|
+
|
|
19
|
+
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Separator } from './chunk-RPQHL6C5.js';
|
|
2
|
+
import { cn } from './chunk-76UQO56T.js';
|
|
3
|
+
import { mergeProps } from '@base-ui/react/merge-props';
|
|
4
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
5
|
+
import { cva } from 'class-variance-authority';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var buttonGroupVariants = cva(
|
|
9
|
+
"has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg flex w-fit items-stretch *:focus-visible:z-10 *:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
orientation: {
|
|
13
|
+
horizontal: "[&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg! [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0 *:data-slot:rounded-r-none",
|
|
14
|
+
vertical: "[&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg! flex-col [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0 *:data-slot:rounded-b-none"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: {
|
|
18
|
+
orientation: "horizontal"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
function ButtonGroup({
|
|
23
|
+
className,
|
|
24
|
+
orientation,
|
|
25
|
+
...props
|
|
26
|
+
}) {
|
|
27
|
+
return /* @__PURE__ */ jsx(
|
|
28
|
+
"div",
|
|
29
|
+
{
|
|
30
|
+
role: "group",
|
|
31
|
+
"data-slot": "button-group",
|
|
32
|
+
"data-orientation": orientation,
|
|
33
|
+
className: cn(buttonGroupVariants({ orientation }), className),
|
|
34
|
+
...props
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
function ButtonGroupText({
|
|
39
|
+
className,
|
|
40
|
+
render,
|
|
41
|
+
...props
|
|
42
|
+
}) {
|
|
43
|
+
return useRender({
|
|
44
|
+
defaultTagName: "div",
|
|
45
|
+
props: mergeProps(
|
|
46
|
+
{
|
|
47
|
+
className: cn(
|
|
48
|
+
"bg-muted gap-2 rounded-lg border px-2.5 text-sm font-medium [&_svg:not([class*='size-'])]:size-4 flex items-center [&_svg]:pointer-events-none",
|
|
49
|
+
className
|
|
50
|
+
)
|
|
51
|
+
},
|
|
52
|
+
props
|
|
53
|
+
),
|
|
54
|
+
render,
|
|
55
|
+
state: {
|
|
56
|
+
slot: "button-group-text"
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function ButtonGroupSeparator({
|
|
61
|
+
className,
|
|
62
|
+
orientation = "vertical",
|
|
63
|
+
...props
|
|
64
|
+
}) {
|
|
65
|
+
return /* @__PURE__ */ jsx(
|
|
66
|
+
Separator,
|
|
67
|
+
{
|
|
68
|
+
"data-slot": "button-group-separator",
|
|
69
|
+
orientation,
|
|
70
|
+
className: cn(
|
|
71
|
+
"bg-input relative self-stretch data-[orientation=horizontal]:mx-px data-[orientation=horizontal]:w-auto data-[orientation=vertical]:my-px data-[orientation=vertical]:h-auto",
|
|
72
|
+
className
|
|
73
|
+
),
|
|
74
|
+
...props
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };
|
|
80
|
+
//# sourceMappingURL=button-group.js.map
|
|
81
|
+
//# sourceMappingURL=button-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/button-group.tsx"],"names":[],"mappings":";;;;;;;AAOA,IAAM,mBAAA,GAAsB,GAAA;AAAA,EAC1B,0RAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,WAAA,EAAa;AAAA,QACX,UAAA,EACE,oKAAA;AAAA,QACF,QAAA,EACE;AAAA;AACJ,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,WAAA,EAAa;AAAA;AACf;AAEJ;AAMA,SAAS,WAAA,CAAY;AAAA,EACnB,SAAA;AAAA,EACA,WAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAqB;AACnB,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,IAAA,EAAK,OAAA;AAAA,MACL,WAAA,EAAU,cAAA;AAAA,MACV,kBAAA,EAAkB,WAAA;AAAA,MAClB,WAAW,EAAA,CAAG,mBAAA,CAAoB,EAAE,WAAA,EAAa,GAAG,SAAS,CAAA;AAAA,MAC5D,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,eAAA,CAAgB;AAAA,EACvB,SAAA;AAAA,EACA,MAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAyB;AACvB,EAAA,OAAO,SAAA,CAAU;AAAA,IACf,cAAA,EAAgB,KAAA;AAAA,IAChB,KAAA,EAAO,UAAA;AAAA,MACL;AAAA,QACE,SAAA,EAAW,EAAA;AAAA,UACT,gJAAA;AAAA,UACA;AAAA;AACF,OACF;AAAA,MACA;AAAA,KACF;AAAA,IACA,MAAA;AAAA,IACA,KAAA,EAAO;AAAA,MACL,IAAA,EAAM;AAAA;AACR,GACD,CAAA;AACH;AAEA,SAAS,oBAAA,CAAqB;AAAA,EAC5B,SAAA;AAAA,EACA,WAAA,GAAc,UAAA;AAAA,EACd,GAAG;AACL,CAAA,EAA8B;AAC5B,EAAA,uBACE,GAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,wBAAA;AAAA,MACV,WAAA;AAAA,MACA,SAAA,EAAW,EAAA;AAAA,QACT,8KAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ","file":"button-group.js","sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"./lib/utils\"\nimport { Separator } from \"./separator\"\n\nconst buttonGroupVariants = cva(\n \"has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg flex w-fit items-stretch *:focus-visible:z-10 *:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1\",\n {\n variants: {\n orientation: {\n horizontal:\n \"[&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg! [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0 *:data-slot:rounded-r-none\",\n vertical:\n \"[&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg! flex-col [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0 *:data-slot:rounded-b-none\",\n },\n },\n defaultVariants: {\n orientation: \"horizontal\",\n },\n }\n)\n\ntype ButtonGroupProps = React.ComponentProps<\"div\"> & VariantProps<typeof buttonGroupVariants>\ntype ButtonGroupTextProps = useRender.ComponentProps<\"div\">\ntype ButtonGroupSeparatorProps = React.ComponentProps<typeof Separator>\n\nfunction ButtonGroup({\n className,\n orientation,\n ...props\n}: ButtonGroupProps) {\n return (\n <div\n role=\"group\"\n data-slot=\"button-group\"\n data-orientation={orientation}\n className={cn(buttonGroupVariants({ orientation }), className)}\n {...props}\n />\n )\n}\n\nfunction ButtonGroupText({\n className,\n render,\n ...props\n}: ButtonGroupTextProps) {\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(\n {\n className: cn(\n \"bg-muted gap-2 rounded-lg border px-2.5 text-sm font-medium [&_svg:not([class*='size-'])]:size-4 flex items-center [&_svg]:pointer-events-none\",\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"button-group-text\",\n },\n })\n}\n\nfunction ButtonGroupSeparator({\n className,\n orientation = \"vertical\",\n ...props\n}: ButtonGroupSeparatorProps) {\n return (\n <Separator\n data-slot=\"button-group-separator\"\n orientation={orientation}\n className={cn(\n \"bg-input relative self-stretch data-[orientation=horizontal]:mx-px data-[orientation=horizontal]:w-auto data-[orientation=vertical]:my-px data-[orientation=vertical]:h-auto\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n ButtonGroup,\n ButtonGroupSeparator,\n ButtonGroupText,\n buttonGroupVariants,\n}\n"]}
|
package/dist/button.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
6
6
|
|
|
7
7
|
declare const buttonVariants: (props?: ({
|
|
8
8
|
variant?: "link" | "default" | "solid" | "outline" | "secondary" | "ghost" | "success" | "destructive" | null | undefined;
|
|
9
|
-
size?: "default" | "
|
|
9
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
10
10
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
11
|
type ButtonProps = React.ComponentProps<typeof Button$1> & VariantProps<typeof buttonVariants>;
|
|
12
12
|
declare function Button({ className, variant, size, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
package/dist/card.d.ts
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
type CardProps = React.ComponentProps<"div"> & {
|
|
5
5
|
size?: "default" | "sm";
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
};
|
|
7
|
+
type CardHeaderProps = React.ComponentProps<"div">;
|
|
8
|
+
type CardTitleProps = React.ComponentProps<"div">;
|
|
9
|
+
type CardDescriptionProps = React.ComponentProps<"div">;
|
|
10
|
+
type CardActionProps = React.ComponentProps<"div">;
|
|
11
|
+
type CardContentProps = React.ComponentProps<"div">;
|
|
12
|
+
type CardFooterProps = React.ComponentProps<"div">;
|
|
13
|
+
declare function Card({ className, size, ...props }: CardProps): react_jsx_runtime.JSX.Element;
|
|
14
|
+
declare function CardHeader({ className, ...props }: CardHeaderProps): react_jsx_runtime.JSX.Element;
|
|
15
|
+
declare function CardTitle({ className, ...props }: CardTitleProps): react_jsx_runtime.JSX.Element;
|
|
16
|
+
declare function CardDescription({ className, ...props }: CardDescriptionProps): react_jsx_runtime.JSX.Element;
|
|
17
|
+
declare function CardAction({ className, ...props }: CardActionProps): react_jsx_runtime.JSX.Element;
|
|
18
|
+
declare function CardContent({ className, ...props }: CardContentProps): react_jsx_runtime.JSX.Element;
|
|
19
|
+
declare function CardFooter({ className, ...props }: CardFooterProps): react_jsx_runtime.JSX.Element;
|
|
13
20
|
|
|
14
21
|
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
package/dist/card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/card.tsx"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"sources":["../src/card.tsx"],"names":[],"mappings":";;;AAYA,SAAS,IAAA,CAAK;AAAA,EACZ,SAAA;AAAA,EACA,IAAA,GAAO,SAAA;AAAA,EACP,GAAG;AACL,CAAA,EAAc;AACZ,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,MAAA;AAAA,MACV,WAAA,EAAW,IAAA;AAAA,MACX,SAAA,EAAW,EAAA;AAAA,QACT,sVAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,UAAA,CAAW,EAAE,SAAA,EAAW,GAAG,OAAM,EAAoB;AAC5D,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,aAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,oSAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,SAAA,CAAU,EAAE,SAAA,EAAW,GAAG,OAAM,EAAmB;AAC1D,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,YAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,sEAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,eAAA,CAAgB,EAAE,SAAA,EAAW,GAAG,OAAM,EAAyB;AACtE,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,kBAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,+BAAA,EAAiC,SAAS,CAAA;AAAA,MACvD,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,UAAA,CAAW,EAAE,SAAA,EAAW,GAAG,OAAM,EAAoB;AAC5D,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,aAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,gEAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,WAAA,CAAY,EAAE,SAAA,EAAW,GAAG,OAAM,EAAqB;AAC9D,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,cAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,qCAAA,EAAuC,SAAS,CAAA;AAAA,MAC7D,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,UAAA,CAAW,EAAE,SAAA,EAAW,GAAG,OAAM,EAAoB;AAC5D,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,aAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,uFAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ","file":"card.js","sourcesContent":["import * as React from \"react\"\n\nimport { cn } from \"./lib/utils\"\n\ntype CardProps = React.ComponentProps<\"div\"> & { size?: \"default\" | \"sm\" }\ntype CardHeaderProps = React.ComponentProps<\"div\">\ntype CardTitleProps = React.ComponentProps<\"div\">\ntype CardDescriptionProps = React.ComponentProps<\"div\">\ntype CardActionProps = React.ComponentProps<\"div\">\ntype CardContentProps = React.ComponentProps<\"div\">\ntype CardFooterProps = React.ComponentProps<\"div\">\n\nfunction Card({\n className,\n size = \"default\",\n ...props\n}: CardProps) {\n return (\n <div\n data-slot=\"card\"\n data-size={size}\n className={cn(\n \"ring-foreground/10 bg-card text-card-foreground group/card flex flex-col gap-4 overflow-hidden rounded-xl py-4 text-sm ring-1 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardHeader({ className, ...props }: CardHeaderProps) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n \"group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardTitle({ className, ...props }: CardTitleProps) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn(\n \"text-base leading-snug font-medium group-data-[size=sm]/card:text-sm\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardDescription({ className, ...props }: CardDescriptionProps) {\n return (\n <div\n data-slot=\"card-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n )\n}\n\nfunction CardAction({ className, ...props }: CardActionProps) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn(\n \"col-start-2 row-span-2 row-start-1 self-start justify-self-end\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardContent({ className, ...props }: CardContentProps) {\n return (\n <div\n data-slot=\"card-content\"\n className={cn(\"px-4 group-data-[size=sm]/card:px-3\", className)}\n {...props}\n />\n )\n}\n\nfunction CardFooter({ className, ...props }: CardFooterProps) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn(\n \"bg-muted/50 flex items-center rounded-b-xl border-t p-4 group-data-[size=sm]/card:p-3\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardAction,\n CardDescription,\n CardContent,\n}\n"]}
|
package/dist/checkbox.js
CHANGED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { cn } from './chunk-76UQO56T.js';
|
|
2
|
+
import { Radio as Radio$1 } from '@base-ui/react/radio';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function Radio({ className, ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(
|
|
7
|
+
Radio$1.Root,
|
|
8
|
+
{
|
|
9
|
+
"data-slot": "radio",
|
|
10
|
+
className: cn(
|
|
11
|
+
"border-input dark:bg-input/30 data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-checked:border-primary aria-invalid:aria-checked:border-primary aria-invalid:border-destructive focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 dark:aria-invalid:border-destructive/50 group/radio peer relative flex aspect-square size-4 shrink-0 rounded-full border outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3",
|
|
12
|
+
className
|
|
13
|
+
),
|
|
14
|
+
...props,
|
|
15
|
+
children: /* @__PURE__ */ jsx(RadioIndicator, {})
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
function RadioIndicator({ className, ...props }) {
|
|
20
|
+
return /* @__PURE__ */ jsx(
|
|
21
|
+
Radio$1.Indicator,
|
|
22
|
+
{
|
|
23
|
+
"data-slot": "radio-indicator",
|
|
24
|
+
className: cn(
|
|
25
|
+
"group-aria-invalid/radio:text-destructive text-primary-foreground absolute inset-0 flex items-center justify-center data-unchecked:opacity-0",
|
|
26
|
+
"after:block after:size-2 after:rounded-full after:bg-current",
|
|
27
|
+
className
|
|
28
|
+
),
|
|
29
|
+
...props
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { Radio, RadioIndicator };
|
|
35
|
+
//# sourceMappingURL=chunk-D5XPEJ6T.js.map
|
|
36
|
+
//# sourceMappingURL=chunk-D5XPEJ6T.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/radio.tsx"],"names":["RadioPrimitive"],"mappings":";;;;AAWA,SAAS,KAAA,CAAM,EAAE,SAAA,EAAW,GAAG,OAAM,EAAe;AAClD,EAAA,uBACE,GAAA;AAAA,IAACA,OAAA,CAAe,IAAA;AAAA,IAAf;AAAA,MACC,WAAA,EAAU,OAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,0mBAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MAEJ,8BAAC,cAAA,EAAA,EAAe;AAAA;AAAA,GAClB;AAEJ;AAEA,SAAS,cAAA,CAAe,EAAE,SAAA,EAAW,GAAG,OAAM,EAAwB;AACpE,EAAA,uBACE,GAAA;AAAA,IAACA,OAAA,CAAe,SAAA;AAAA,IAAf;AAAA,MACC,WAAA,EAAU,iBAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,8IAAA;AAAA,QACA,8DAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ","file":"chunk-D5XPEJ6T.js","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\n\nimport { Radio as RadioPrimitive } from \"@base-ui/react/radio\"\n\nimport { cn } from \"./lib/utils\"\n\ntype RadioProps = React.ComponentProps<typeof RadioPrimitive.Root>\ntype RadioIndicatorProps = React.ComponentProps<typeof RadioPrimitive.Indicator>\n\nfunction Radio({ className, ...props }: RadioProps) {\n return (\n <RadioPrimitive.Root\n data-slot=\"radio\"\n className={cn(\n \"border-input dark:bg-input/30 data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-checked:border-primary aria-invalid:aria-checked:border-primary aria-invalid:border-destructive focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 dark:aria-invalid:border-destructive/50 group/radio peer relative flex aspect-square size-4 shrink-0 rounded-full border outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3\",\n className,\n )}\n {...props}\n >\n <RadioIndicator />\n </RadioPrimitive.Root>\n )\n}\n\nfunction RadioIndicator({ className, ...props }: RadioIndicatorProps) {\n return (\n <RadioPrimitive.Indicator\n data-slot=\"radio-indicator\"\n className={cn(\n \"group-aria-invalid/radio:text-destructive text-primary-foreground absolute inset-0 flex items-center justify-center data-unchecked:opacity-0\",\n \"after:block after:size-2 after:rounded-full after:bg-current\",\n className,\n )}\n {...props}\n />\n )\n}\n\nexport { Radio, RadioIndicator }\n"]}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { Textarea } from './chunk-QRW37LRP.js';
|
|
2
|
+
import { Input } from './chunk-QFSEK4M6.js';
|
|
3
|
+
import { Button } from './chunk-OUFYQLVN.js';
|
|
4
|
+
import { cn } from './chunk-76UQO56T.js';
|
|
5
|
+
import { cva } from 'class-variance-authority';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
function InputGroup({ className, ...props }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
"div",
|
|
11
|
+
{
|
|
12
|
+
"data-slot": "input-group",
|
|
13
|
+
role: "group",
|
|
14
|
+
className: cn(
|
|
15
|
+
"border-input dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-disabled:bg-input/50 dark:has-disabled:bg-input/80 group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 not-has-disabled:has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-3 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",
|
|
16
|
+
className
|
|
17
|
+
),
|
|
18
|
+
...props
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
var inputGroupAddonVariants = cva(
|
|
23
|
+
"text-muted-foreground h-auto gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4 flex cursor-text items-center justify-center select-none",
|
|
24
|
+
{
|
|
25
|
+
variants: {
|
|
26
|
+
align: {
|
|
27
|
+
"inline-start": "pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem] order-first",
|
|
28
|
+
"inline-end": "pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem] order-last",
|
|
29
|
+
"block-start": "px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start",
|
|
30
|
+
"block-end": "px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
defaultVariants: {
|
|
34
|
+
align: "inline-start"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
function InputGroupAddon({
|
|
39
|
+
className,
|
|
40
|
+
align = "inline-start",
|
|
41
|
+
...props
|
|
42
|
+
}) {
|
|
43
|
+
return /* @__PURE__ */ jsx(
|
|
44
|
+
"div",
|
|
45
|
+
{
|
|
46
|
+
role: "group",
|
|
47
|
+
"data-slot": "input-group-addon",
|
|
48
|
+
"data-align": align,
|
|
49
|
+
className: cn(inputGroupAddonVariants({ align }), className),
|
|
50
|
+
onClick: (e) => {
|
|
51
|
+
if (e.target.closest("button")) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
55
|
+
},
|
|
56
|
+
...props
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
var inputGroupButtonVariants = cva(
|
|
61
|
+
"gap-2 text-sm shadow-none flex items-center",
|
|
62
|
+
{
|
|
63
|
+
variants: {
|
|
64
|
+
size: {
|
|
65
|
+
xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
66
|
+
sm: "",
|
|
67
|
+
"icon-xs": "size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0",
|
|
68
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
defaultVariants: {
|
|
72
|
+
size: "xs"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
function InputGroupButton({
|
|
77
|
+
className,
|
|
78
|
+
type = "button",
|
|
79
|
+
variant = "ghost",
|
|
80
|
+
size = "xs",
|
|
81
|
+
...props
|
|
82
|
+
}) {
|
|
83
|
+
return /* @__PURE__ */ jsx(
|
|
84
|
+
Button,
|
|
85
|
+
{
|
|
86
|
+
type,
|
|
87
|
+
"data-size": size,
|
|
88
|
+
variant,
|
|
89
|
+
className: cn(inputGroupButtonVariants({ size }), className),
|
|
90
|
+
...props
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
function InputGroupText({ className, ...props }) {
|
|
95
|
+
return /* @__PURE__ */ jsx(
|
|
96
|
+
"span",
|
|
97
|
+
{
|
|
98
|
+
className: cn(
|
|
99
|
+
"text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
100
|
+
className
|
|
101
|
+
),
|
|
102
|
+
...props
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
function InputGroupInput({
|
|
107
|
+
className,
|
|
108
|
+
...props
|
|
109
|
+
}) {
|
|
110
|
+
return /* @__PURE__ */ jsx(
|
|
111
|
+
Input,
|
|
112
|
+
{
|
|
113
|
+
"data-slot": "input-group-control",
|
|
114
|
+
className: cn(
|
|
115
|
+
"flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",
|
|
116
|
+
className
|
|
117
|
+
),
|
|
118
|
+
...props
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
function InputGroupTextarea({
|
|
123
|
+
className,
|
|
124
|
+
...props
|
|
125
|
+
}) {
|
|
126
|
+
return /* @__PURE__ */ jsx(
|
|
127
|
+
Textarea,
|
|
128
|
+
{
|
|
129
|
+
"data-slot": "input-group-control",
|
|
130
|
+
className: cn(
|
|
131
|
+
"flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",
|
|
132
|
+
className
|
|
133
|
+
),
|
|
134
|
+
...props
|
|
135
|
+
}
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
|
|
140
|
+
//# sourceMappingURL=chunk-IQ7YQ5XA.js.map
|
|
141
|
+
//# sourceMappingURL=chunk-IQ7YQ5XA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/input-group.tsx"],"names":[],"mappings":"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","file":"chunk-IQ7YQ5XA.js","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"./lib/utils\"\nimport { Button } from \"./button\"\nimport { Input } from \"./input\"\nimport { Textarea } from \"./textarea\"\n\ntype InputGroupProps = React.ComponentProps<\"div\">\n\ntype InputGroupAddonProps = React.ComponentProps<\"div\"> &\n VariantProps<typeof inputGroupAddonVariants>\n\ntype InputGroupButtonProps = Omit<React.ComponentProps<typeof Button>, \"size\" | \"type\"> &\n VariantProps<typeof inputGroupButtonVariants> & {\n type?: \"button\" | \"submit\" | \"reset\"\n }\n\ntype InputGroupTextProps = React.ComponentProps<\"span\">\n\ntype InputGroupInputProps = React.ComponentProps<\"input\">\n\ntype InputGroupTextareaProps = React.ComponentProps<\"textarea\">\n\nfunction InputGroup({ className, ...props }: InputGroupProps) {\n return (\n <div\n data-slot=\"input-group\"\n role=\"group\"\n className={cn(\n \"border-input dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-disabled:bg-input/50 dark:has-disabled:bg-input/80 group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 not-has-disabled:has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-3 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5\",\n className\n )}\n {...props}\n />\n )\n}\n\nconst inputGroupAddonVariants = cva(\n \"text-muted-foreground h-auto gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4 flex cursor-text items-center justify-center select-none\",\n {\n variants: {\n align: {\n \"inline-start\":\n \"pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem] order-first\",\n \"inline-end\":\n \"pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem] order-last\",\n \"block-start\":\n \"px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start\",\n \"block-end\":\n \"px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start\",\n },\n },\n defaultVariants: {\n align: \"inline-start\",\n },\n }\n)\n\nfunction InputGroupAddon({\n className,\n align = \"inline-start\",\n ...props\n}: InputGroupAddonProps) {\n return (\n <div\n role=\"group\"\n data-slot=\"input-group-addon\"\n data-align={align}\n className={cn(inputGroupAddonVariants({ align }), className)}\n onClick={(e) => {\n if ((e.target as HTMLElement).closest(\"button\")) {\n return\n }\n e.currentTarget.parentElement?.querySelector(\"input\")?.focus()\n }}\n {...props}\n />\n )\n}\n\nconst inputGroupButtonVariants = cva(\n \"gap-2 text-sm shadow-none flex items-center\",\n {\n variants: {\n size: {\n xs: \"h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5\",\n sm: \"\",\n \"icon-xs\":\n \"size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0\",\n \"icon-sm\": \"size-8 p-0 has-[>svg]:p-0\",\n },\n },\n defaultVariants: {\n size: \"xs\",\n },\n }\n)\n\nfunction InputGroupButton({\n className,\n type = \"button\",\n variant = \"ghost\",\n size = \"xs\",\n ...props\n}: InputGroupButtonProps) {\n return (\n <Button\n type={type}\n data-size={size}\n variant={variant}\n className={cn(inputGroupButtonVariants({ size }), className)}\n {...props}\n />\n )\n}\n\nfunction InputGroupText({ className, ...props }: InputGroupTextProps) {\n return (\n <span\n className={cn(\n \"text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction InputGroupInput({\n className,\n ...props\n}: InputGroupInputProps) {\n return (\n <Input\n data-slot=\"input-group-control\"\n className={cn(\n \"flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction InputGroupTextarea({\n className,\n ...props\n}: InputGroupTextareaProps) {\n return (\n <Textarea\n data-slot=\"input-group-control\"\n className={cn(\n \"flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupText,\n InputGroupInput,\n InputGroupTextarea,\n}\n"]}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { cn } from './chunk-76UQO56T.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Field as Field$1 } from '@base-ui/react/field';
|
|
4
|
+
export { Field as FieldPrimitive } from '@base-ui/react/field';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function Field({ className, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
9
|
+
Field$1.Root,
|
|
10
|
+
{
|
|
11
|
+
"data-slot": "field",
|
|
12
|
+
className: cn(
|
|
13
|
+
"grid w-full gap-2 data-[invalid]:text-destructive",
|
|
14
|
+
className
|
|
15
|
+
),
|
|
16
|
+
...props
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
function FieldLabel({ className, ...props }) {
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
Field$1.Label,
|
|
23
|
+
{
|
|
24
|
+
"data-slot": "field-label",
|
|
25
|
+
className: cn(
|
|
26
|
+
"text-sm font-medium leading-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-70",
|
|
27
|
+
className
|
|
28
|
+
),
|
|
29
|
+
...props
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
var FieldControl = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
34
|
+
Field$1.Control,
|
|
35
|
+
{
|
|
36
|
+
ref,
|
|
37
|
+
"data-slot": "field-control",
|
|
38
|
+
className: cn(
|
|
39
|
+
"rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
|
|
40
|
+
className
|
|
41
|
+
),
|
|
42
|
+
...props
|
|
43
|
+
}
|
|
44
|
+
));
|
|
45
|
+
FieldControl.displayName = "FieldControl";
|
|
46
|
+
function FieldDescription({ className, ...props }) {
|
|
47
|
+
return /* @__PURE__ */ jsx(
|
|
48
|
+
Field$1.Description,
|
|
49
|
+
{
|
|
50
|
+
"data-slot": "field-description",
|
|
51
|
+
className: cn(
|
|
52
|
+
"text-muted-foreground text-left text-sm leading-normal font-normal group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5",
|
|
53
|
+
"last:mt-0 nth-last-2:-mt-1",
|
|
54
|
+
"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
|
|
55
|
+
className
|
|
56
|
+
),
|
|
57
|
+
...props
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
function FieldItem({ className, ...props }) {
|
|
62
|
+
return /* @__PURE__ */ jsx(
|
|
63
|
+
Field$1.Item,
|
|
64
|
+
{
|
|
65
|
+
"data-slot": "field-item",
|
|
66
|
+
className: cn("flex items-center gap-2", className),
|
|
67
|
+
...props
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
function FieldError({ className, ...props }) {
|
|
72
|
+
return /* @__PURE__ */ jsx(
|
|
73
|
+
Field$1.Error,
|
|
74
|
+
{
|
|
75
|
+
"data-slot": "field-error",
|
|
76
|
+
className: cn("text-destructive text-sm font-normal", className),
|
|
77
|
+
...props
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
var FieldValidity = Field$1.Validity;
|
|
82
|
+
|
|
83
|
+
export { Field, FieldControl, FieldDescription, FieldError, FieldItem, FieldLabel, FieldValidity };
|
|
84
|
+
//# sourceMappingURL=chunk-NCHHHWTB.js.map
|
|
85
|
+
//# sourceMappingURL=chunk-NCHHHWTB.js.map
|