@simpleapps-com/augur-web 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/breadcrumb.cjs +18 -95
- package/dist/breadcrumb.cjs.map +1 -1
- package/dist/breadcrumb.js +9 -86
- package/dist/breadcrumb.js.map +1 -1
- package/dist/breadcrumbs.cjs +41 -0
- package/dist/breadcrumbs.cjs.map +1 -0
- package/dist/breadcrumbs.d.cts +16 -0
- package/dist/breadcrumbs.d.ts +16 -0
- package/dist/breadcrumbs.js +41 -0
- package/dist/breadcrumbs.js.map +1 -0
- package/dist/chunk-32HMF5CX.cjs +98 -0
- package/dist/chunk-32HMF5CX.cjs.map +1 -0
- package/dist/chunk-3RVGVJDI.cjs +27 -0
- package/dist/chunk-3RVGVJDI.cjs.map +1 -0
- package/dist/chunk-CK53LO3J.cjs +25 -0
- package/dist/chunk-CK53LO3J.cjs.map +1 -0
- package/dist/chunk-DAU3SFHM.js +28 -0
- package/dist/chunk-DAU3SFHM.js.map +1 -0
- package/dist/chunk-DZ6HBEMA.js +27 -0
- package/dist/chunk-DZ6HBEMA.js.map +1 -0
- package/dist/chunk-FHS7SJEQ.js +25 -0
- package/dist/chunk-FHS7SJEQ.js.map +1 -0
- package/dist/chunk-GPDD67CJ.js +27 -0
- package/dist/chunk-GPDD67CJ.js.map +1 -0
- package/dist/chunk-KHJX4Q3S.js +98 -0
- package/dist/chunk-KHJX4Q3S.js.map +1 -0
- package/dist/chunk-ND6U4UQQ.js +134 -0
- package/dist/chunk-ND6U4UQQ.js.map +1 -0
- package/dist/chunk-NWGXDXRV.cjs +28 -0
- package/dist/chunk-NWGXDXRV.cjs.map +1 -0
- package/dist/chunk-Q6H6D3AN.cjs +134 -0
- package/dist/chunk-Q6H6D3AN.cjs.map +1 -0
- package/dist/chunk-VMOQCPK5.cjs +27 -0
- package/dist/chunk-VMOQCPK5.cjs.map +1 -0
- package/dist/form-field.cjs +10 -0
- package/dist/form-field.cjs.map +1 -0
- package/dist/form-field.d.cts +13 -0
- package/dist/form-field.d.ts +13 -0
- package/dist/form-field.js +10 -0
- package/dist/form-field.js.map +1 -0
- package/dist/form-input.cjs +35 -0
- package/dist/form-input.cjs.map +1 -0
- package/dist/form-input.d.cts +11 -0
- package/dist/form-input.d.ts +11 -0
- package/dist/form-input.js +35 -0
- package/dist/form-input.js.map +1 -0
- package/dist/form-select.cjs +61 -0
- package/dist/form-select.cjs.map +1 -0
- package/dist/form-select.d.cts +20 -0
- package/dist/form-select.d.ts +20 -0
- package/dist/form-select.js +61 -0
- package/dist/form-select.js.map +1 -0
- package/dist/form-textarea.cjs +35 -0
- package/dist/form-textarea.cjs.map +1 -0
- package/dist/form-textarea.d.cts +11 -0
- package/dist/form-textarea.d.ts +11 -0
- package/dist/form-textarea.js +35 -0
- package/dist/form-textarea.js.map +1 -0
- package/dist/input.cjs +4 -23
- package/dist/input.cjs.map +1 -1
- package/dist/input.js +3 -22
- package/dist/input.js.map +1 -1
- package/dist/label.cjs +4 -20
- package/dist/label.cjs.map +1 -1
- package/dist/label.js +3 -19
- package/dist/label.js.map +1 -1
- package/dist/select.cjs +24 -131
- package/dist/select.cjs.map +1 -1
- package/dist/select.js +11 -118
- package/dist/select.js.map +1 -1
- package/dist/textarea.cjs +4 -22
- package/dist/textarea.cjs.map +1 -1
- package/dist/textarea.js +3 -21
- package/dist/textarea.js.map +1 -1
- package/package.json +27 -2
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/label.tsx
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
6
|
+
import { cva } from "class-variance-authority";
|
|
7
|
+
import { cn } from "@simpleapps-com/augur-utils/web";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
var labelVariants = cva(
|
|
10
|
+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
11
|
+
);
|
|
12
|
+
var Label = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
13
|
+
LabelPrimitive.Root,
|
|
14
|
+
{
|
|
15
|
+
ref,
|
|
16
|
+
className: cn(labelVariants(), className),
|
|
17
|
+
...props
|
|
18
|
+
}
|
|
19
|
+
));
|
|
20
|
+
Label.displayName = LabelPrimitive.Root.displayName;
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
Label
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=chunk-FHS7SJEQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/label.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"@simpleapps-com/augur-utils/web\";\n\nconst labelVariants = cva(\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\",\n);\n\nconst Label = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\n VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root\n ref={ref}\n className={cn(labelVariants(), className)}\n {...props}\n />\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n"],"mappings":";;;AAEA,YAAY,WAAW;AACvB,YAAY,oBAAoB;AAChC,SAAS,WAA8B;AACvC,SAAS,UAAU;AAWjB;AATF,IAAM,gBAAgB;AAAA,EACpB;AACF;AAEA,IAAM,QAAc,iBAIlB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAgB;AAAA,EAAf;AAAA,IACC;AAAA,IACA,WAAW,GAAG,cAAc,GAAG,SAAS;AAAA,IACvC,GAAG;AAAA;AACN,CACD;AACD,MAAM,cAA6B,oBAAK;","names":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Label
|
|
4
|
+
} from "./chunk-FHS7SJEQ.js";
|
|
5
|
+
|
|
6
|
+
// src/form-field.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { cn } from "@simpleapps-com/augur-utils/web";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var FormField = React.forwardRef(
|
|
11
|
+
({ label, htmlFor, required, error, className, children }, ref) => {
|
|
12
|
+
return /* @__PURE__ */ jsxs("div", { ref, className: cn("space-y-2", className), children: [
|
|
13
|
+
/* @__PURE__ */ jsxs(Label, { htmlFor, children: [
|
|
14
|
+
label,
|
|
15
|
+
required && /* @__PURE__ */ jsx("span", { className: "text-destructive", children: "*" })
|
|
16
|
+
] }),
|
|
17
|
+
children,
|
|
18
|
+
error && /* @__PURE__ */ jsx("p", { className: "text-sm text-destructive", children: error })
|
|
19
|
+
] });
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
FormField.displayName = "FormField";
|
|
23
|
+
|
|
24
|
+
export {
|
|
25
|
+
FormField
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=chunk-GPDD67CJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/form-field.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { cn } from \"@simpleapps-com/augur-utils/web\";\nimport { Label } from \"./label\";\n\nexport interface FormFieldProps {\n label: string;\n htmlFor: string;\n required?: boolean;\n error?: string;\n className?: string;\n children: React.ReactNode;\n}\n\nconst FormField = React.forwardRef<HTMLDivElement, FormFieldProps>(\n ({ label, htmlFor, required, error, className, children }, ref) => {\n return (\n <div ref={ref} className={cn(\"space-y-2\", className)}>\n <Label htmlFor={htmlFor}>\n {label}\n {required && <span className=\"text-destructive\">*</span>}\n </Label>\n {children}\n {error && <p className=\"text-sm text-destructive\">{error}</p>}\n </div>\n );\n },\n);\nFormField.displayName = \"FormField\";\n\nexport { FormField };\n"],"mappings":";;;;;;AAEA,YAAY,WAAW;AACvB,SAAS,UAAU;AAgBX,SAEe,KAFf;AAJR,IAAM,YAAkB;AAAA,EACtB,CAAC,EAAE,OAAO,SAAS,UAAU,OAAO,WAAW,SAAS,GAAG,QAAQ;AACjE,WACE,qBAAC,SAAI,KAAU,WAAW,GAAG,aAAa,SAAS,GACjD;AAAA,2BAAC,SAAM,SACJ;AAAA;AAAA,QACA,YAAY,oBAAC,UAAK,WAAU,oBAAmB,eAAC;AAAA,SACnD;AAAA,MACC;AAAA,MACA,SAAS,oBAAC,OAAE,WAAU,4BAA4B,iBAAM;AAAA,OAC3D;AAAA,EAEJ;AACF;AACA,UAAU,cAAc;","names":[]}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/breadcrumb.tsx
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { LuChevronRight, LuEllipsis } from "react-icons/lu";
|
|
6
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
7
|
+
import { cn } from "@simpleapps-com/augur-utils/web";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
var Breadcrumb = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("nav", { ref, "aria-label": "breadcrumb", ...props }));
|
|
10
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
11
|
+
var BreadcrumbList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
12
|
+
"ol",
|
|
13
|
+
{
|
|
14
|
+
ref,
|
|
15
|
+
className: cn(
|
|
16
|
+
"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",
|
|
17
|
+
className
|
|
18
|
+
),
|
|
19
|
+
...props
|
|
20
|
+
}
|
|
21
|
+
));
|
|
22
|
+
BreadcrumbList.displayName = "BreadcrumbList";
|
|
23
|
+
var BreadcrumbItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
24
|
+
"li",
|
|
25
|
+
{
|
|
26
|
+
ref,
|
|
27
|
+
className: cn("inline-flex items-center gap-1.5", className),
|
|
28
|
+
...props
|
|
29
|
+
}
|
|
30
|
+
));
|
|
31
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
32
|
+
var BreadcrumbLink = React.forwardRef(({ asChild, className, ...props }, ref) => {
|
|
33
|
+
const Comp = asChild ? Slot : "a";
|
|
34
|
+
return /* @__PURE__ */ jsx(
|
|
35
|
+
Comp,
|
|
36
|
+
{
|
|
37
|
+
ref,
|
|
38
|
+
className: cn("transition-colors hover:text-foreground", className),
|
|
39
|
+
...props
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
});
|
|
43
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
44
|
+
var BreadcrumbPage = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
45
|
+
"span",
|
|
46
|
+
{
|
|
47
|
+
ref,
|
|
48
|
+
role: "link",
|
|
49
|
+
"aria-disabled": "true",
|
|
50
|
+
"aria-current": "page",
|
|
51
|
+
className: cn("font-normal text-foreground", className),
|
|
52
|
+
...props
|
|
53
|
+
}
|
|
54
|
+
));
|
|
55
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
56
|
+
var BreadcrumbSeparator = ({
|
|
57
|
+
children,
|
|
58
|
+
className,
|
|
59
|
+
...props
|
|
60
|
+
}) => /* @__PURE__ */ jsx(
|
|
61
|
+
"li",
|
|
62
|
+
{
|
|
63
|
+
role: "presentation",
|
|
64
|
+
"aria-hidden": "true",
|
|
65
|
+
className: cn("[&>svg]:size-3.5", className),
|
|
66
|
+
...props,
|
|
67
|
+
children: children ?? /* @__PURE__ */ jsx(LuChevronRight, {})
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
71
|
+
var BreadcrumbEllipsis = ({
|
|
72
|
+
className,
|
|
73
|
+
...props
|
|
74
|
+
}) => /* @__PURE__ */ jsxs(
|
|
75
|
+
"span",
|
|
76
|
+
{
|
|
77
|
+
role: "presentation",
|
|
78
|
+
"aria-hidden": "true",
|
|
79
|
+
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
80
|
+
...props,
|
|
81
|
+
children: [
|
|
82
|
+
/* @__PURE__ */ jsx(LuEllipsis, { className: "h-4 w-4" }),
|
|
83
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "More" })
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
|
|
88
|
+
|
|
89
|
+
export {
|
|
90
|
+
Breadcrumb,
|
|
91
|
+
BreadcrumbList,
|
|
92
|
+
BreadcrumbItem,
|
|
93
|
+
BreadcrumbLink,
|
|
94
|
+
BreadcrumbPage,
|
|
95
|
+
BreadcrumbSeparator,
|
|
96
|
+
BreadcrumbEllipsis
|
|
97
|
+
};
|
|
98
|
+
//# sourceMappingURL=chunk-KHJX4Q3S.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/breadcrumb.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { LuChevronRight, LuEllipsis } from \"react-icons/lu\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cn } from \"@simpleapps-com/augur-utils/web\";\n\nconst Breadcrumb = React.forwardRef<\n HTMLElement,\n React.ComponentPropsWithoutRef<\"nav\"> & {\n separator?: React.ReactNode;\n }\n>(({ ...props }, ref) => <nav ref={ref} aria-label=\"breadcrumb\" {...props} />);\nBreadcrumb.displayName = \"Breadcrumb\";\n\nconst BreadcrumbList = React.forwardRef<\n HTMLOListElement,\n React.ComponentPropsWithoutRef<\"ol\">\n>(({ className, ...props }, ref) => (\n <ol\n ref={ref}\n className={cn(\n \"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5\",\n className,\n )}\n {...props}\n />\n));\nBreadcrumbList.displayName = \"BreadcrumbList\";\n\nconst BreadcrumbItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentPropsWithoutRef<\"li\">\n>(({ className, ...props }, ref) => (\n <li\n ref={ref}\n className={cn(\"inline-flex items-center gap-1.5\", className)}\n {...props}\n />\n));\nBreadcrumbItem.displayName = \"BreadcrumbItem\";\n\nconst BreadcrumbLink = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentPropsWithoutRef<\"a\"> & {\n asChild?: boolean;\n }\n>(({ asChild, className, ...props }, ref) => {\n const Comp = asChild ? Slot : \"a\";\n return (\n <Comp\n ref={ref}\n className={cn(\"transition-colors hover:text-foreground\", className)}\n {...props}\n />\n );\n});\nBreadcrumbLink.displayName = \"BreadcrumbLink\";\n\nconst BreadcrumbPage = React.forwardRef<\n HTMLSpanElement,\n React.ComponentPropsWithoutRef<\"span\">\n>(({ className, ...props }, ref) => (\n <span\n ref={ref}\n role=\"link\"\n aria-disabled=\"true\"\n aria-current=\"page\"\n className={cn(\"font-normal text-foreground\", className)}\n {...props}\n />\n));\nBreadcrumbPage.displayName = \"BreadcrumbPage\";\n\nconst BreadcrumbSeparator = ({\n children,\n className,\n ...props\n}: React.ComponentProps<\"li\">) => (\n <li\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\"[&>svg]:size-3.5\", className)}\n {...props}\n >\n {children ?? <LuChevronRight />}\n </li>\n);\nBreadcrumbSeparator.displayName = \"BreadcrumbSeparator\";\n\nconst BreadcrumbEllipsis = ({\n className,\n ...props\n}: React.ComponentProps<\"span\">) => (\n <span\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\"flex h-9 w-9 items-center justify-center\", className)}\n {...props}\n >\n <LuEllipsis className=\"h-4 w-4\" />\n <span className=\"sr-only\">More</span>\n </span>\n);\nBreadcrumbEllipsis.displayName = \"BreadcrumbEllipsis\";\n\nexport {\n Bre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D,eAAe,cAAc;AAE7B,IAAM,sBAAsB,CAAC;AAAA,EAC3B;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAAC;AAAA;AAAA,IACC,MAAK;AAAA,IACL,eAAY;AAAA,IACZ,WAAW,GAAG,oBAAoB,SAAS;AAAA,IAC1C,GAAG;AAAA,IAEH,sBAAY,oBAAC,kBAAe;AAAA;AAC/B;AAEF,oBAAoB,cAAc;AAElC,IAAM,qBAAqB,CAAC;AAAA,EAC1B;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAAC;AAAA;AAAA,IACC,MAAK;AAAA,IACL,eAAY;AAAA,IACZ,WAAW,GAAG,4CAA4C,SAAS;AAAA,IAClE,GAAG;AAAA,IAEJ;AAAA,0BAAC,cAAW,WAAU,WAAU;AAAA,MAChC,oBAAC,UAAK,WAAU,WAAU,kBAAI;AAAA;AAAA;AAChC;AAEF,mBAAmB,cAAc;","names":[]}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/select.tsx
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import {
|
|
6
|
+
LuChevronsUpDown,
|
|
7
|
+
LuCheck,
|
|
8
|
+
LuChevronDown,
|
|
9
|
+
LuChevronUp
|
|
10
|
+
} from "react-icons/lu";
|
|
11
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
12
|
+
import { cn } from "@simpleapps-com/augur-utils/web";
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
var Select = SelectPrimitive.Root;
|
|
15
|
+
var SelectGroup = SelectPrimitive.Group;
|
|
16
|
+
var SelectValue = SelectPrimitive.Value;
|
|
17
|
+
var SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
18
|
+
SelectPrimitive.Trigger,
|
|
19
|
+
{
|
|
20
|
+
ref,
|
|
21
|
+
className: cn(
|
|
22
|
+
"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
23
|
+
className
|
|
24
|
+
),
|
|
25
|
+
...props,
|
|
26
|
+
children: [
|
|
27
|
+
children,
|
|
28
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(LuChevronsUpDown, { className: "h-4 w-4 opacity-50" }) })
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
));
|
|
32
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
33
|
+
var SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
34
|
+
SelectPrimitive.ScrollUpButton,
|
|
35
|
+
{
|
|
36
|
+
ref,
|
|
37
|
+
className: cn(
|
|
38
|
+
"flex cursor-default items-center justify-center py-1",
|
|
39
|
+
className
|
|
40
|
+
),
|
|
41
|
+
...props,
|
|
42
|
+
children: /* @__PURE__ */ jsx(LuChevronUp, {})
|
|
43
|
+
}
|
|
44
|
+
));
|
|
45
|
+
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
46
|
+
var SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
47
|
+
SelectPrimitive.ScrollDownButton,
|
|
48
|
+
{
|
|
49
|
+
ref,
|
|
50
|
+
className: cn(
|
|
51
|
+
"flex cursor-default items-center justify-center py-1",
|
|
52
|
+
className
|
|
53
|
+
),
|
|
54
|
+
...props,
|
|
55
|
+
children: /* @__PURE__ */ jsx(LuChevronDown, {})
|
|
56
|
+
}
|
|
57
|
+
));
|
|
58
|
+
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
59
|
+
var SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
60
|
+
SelectPrimitive.Content,
|
|
61
|
+
{
|
|
62
|
+
ref,
|
|
63
|
+
className: cn(
|
|
64
|
+
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
65
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
66
|
+
className
|
|
67
|
+
),
|
|
68
|
+
position,
|
|
69
|
+
...props,
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
72
|
+
/* @__PURE__ */ jsx(
|
|
73
|
+
SelectPrimitive.Viewport,
|
|
74
|
+
{
|
|
75
|
+
className: cn(
|
|
76
|
+
"p-1",
|
|
77
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
78
|
+
),
|
|
79
|
+
children
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
) }));
|
|
86
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
87
|
+
var SelectLabel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
88
|
+
SelectPrimitive.Label,
|
|
89
|
+
{
|
|
90
|
+
ref,
|
|
91
|
+
className: cn("px-2 py-1.5 text-sm font-semibold", className),
|
|
92
|
+
...props
|
|
93
|
+
}
|
|
94
|
+
));
|
|
95
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
96
|
+
var SelectItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
97
|
+
SelectPrimitive.Item,
|
|
98
|
+
{
|
|
99
|
+
ref,
|
|
100
|
+
className: cn(
|
|
101
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
102
|
+
className
|
|
103
|
+
),
|
|
104
|
+
...props,
|
|
105
|
+
children: [
|
|
106
|
+
/* @__PURE__ */ jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(LuCheck, { className: "h-4 w-4" }) }) }),
|
|
107
|
+
/* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
));
|
|
111
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
112
|
+
var SelectSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
113
|
+
SelectPrimitive.Separator,
|
|
114
|
+
{
|
|
115
|
+
ref,
|
|
116
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
117
|
+
...props
|
|
118
|
+
}
|
|
119
|
+
));
|
|
120
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
121
|
+
|
|
122
|
+
export {
|
|
123
|
+
Select,
|
|
124
|
+
SelectGroup,
|
|
125
|
+
SelectValue,
|
|
126
|
+
SelectTrigger,
|
|
127
|
+
SelectScrollUpButton,
|
|
128
|
+
SelectScrollDownButton,
|
|
129
|
+
SelectContent,
|
|
130
|
+
SelectLabel,
|
|
131
|
+
SelectItem,
|
|
132
|
+
SelectSeparator
|
|
133
|
+
};
|
|
134
|
+
//# sourceMappingURL=chunk-ND6U4UQQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/select.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n LuChevronsUpDown,\n LuCheck,\n LuChevronDown,\n LuChevronUp,\n} from \"react-icons/lu\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { cn } from \"@simpleapps-com/augur-utils/web\";\n\nconst Select = SelectPrimitive.Root;\nconst SelectGroup = SelectPrimitive.Group;\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1\",\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <LuChevronsUpDown className=\"h-4 w-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className,\n )}\n {...props}\n >\n <LuChevronUp />\n </SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className,\n )}\n {...props}\n >\n <LuChevronDown />\n </SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName =\n SelectPrimitive.ScrollDownButton.displayName;\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = \"popper\", ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n \"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"p-1\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\",\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n));\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn(\"px-2 py-1.5 text-sm font-semibold\", className)}\n {...props}\n />\n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nconst SelectItem = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <LuCheck className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n));\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n};\n"],"mappings":";;;AAEA,YAAY,WAAW;AACvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,YAAY,qBAAqB;AACjC,SAAS,UAAU;AAUjB,SAUI,KAVJ;AARF,IAAM,SAAyB;AAC/B,IAAM,cAA8B;AACpC,IAAM,cAA8B;AAEpC,IAAM,gBAAsB,iBAG1B,CAAC,EAAE,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;AAC1B,GACF,CACD;AACD,cAAc,cAA8B,wBAAQ;AAEpD,IAAM,cAAoB,iBAGxB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAiB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,qCAAqC,SAAS;AAAA,IAC3D,GAAG;AAAA;AACN,CACD;AACD,YAAY,cAA8B,sBAAM;AAEhD,IAAM,aAAmB,iBAGvB,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QACpC;AAAA,EAAiB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEJ;AAAA,0BAAC,UAAK,WAAU,iEACd,8BAAiB,+BAAhB,EACC,8BAAC,WAAQ,WAAU,WAAU,GAC/B,GACF;AAAA,MACA,oBAAiB,0BAAhB,EAA0B,UAAS;AAAA;AAAA;AACtC,CACD;AACD,WAAW,cAA8B,qBAAK;AAE9C,IAAM,kBAAwB,iBAG5B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAiB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,4BAA4B,SAAS;AAAA,IAClD,GAAG;AAAA;AACN,CACD;AACD,gBAAgB,cAA8B,0BAAU;","names":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";
|
|
2
|
+
|
|
3
|
+
// src/input.tsx
|
|
4
|
+
var _react = require('react'); var React = _interopRequireWildcard(_react);
|
|
5
|
+
var _web = require('@simpleapps-com/augur-utils/web');
|
|
6
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
7
|
+
var Input = React.forwardRef(
|
|
8
|
+
({ className, type, ...props }, ref) => {
|
|
9
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
10
|
+
"input",
|
|
11
|
+
{
|
|
12
|
+
type,
|
|
13
|
+
className: _web.cn.call(void 0,
|
|
14
|
+
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
15
|
+
className
|
|
16
|
+
),
|
|
17
|
+
ref,
|
|
18
|
+
...props
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
Input.displayName = "Input";
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
exports.Input = Input;
|
|
28
|
+
//# sourceMappingURL=chunk-NWGXDXRV.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/augur-packages/augur-packages/packages/augur-web/dist/chunk-NWGXDXRV.cjs","../src/input.tsx"],"names":[],"mappings":"AAAA,uWAAY;AACZ;AACA;ACAA,2EAAuB;AACvB,sDAAmB;AAOb,+CAAA;AAHN,IAAM,MAAA,EAAc,KAAA,CAAA,UAAA;AAAA,EAClB,CAAC,EAAE,SAAA,EAAW,IAAA,EAAM,GAAG,MAAM,CAAA,EAAG,GAAA,EAAA,GAAQ;AACtC,IAAA,uBACE,6BAAA;AAAA,MAAC,OAAA;AAAA,MAAA;AAAA,QACC,IAAA;AAAA,QACA,SAAA,EAAW,qBAAA;AAAA,UACT,uUAAA;AAAA,UACA;AAAA,QACF,CAAA;AAAA,QACA,GAAA;AAAA,QACC,GAAG;AAAA,MAAA;AAAA,IACN,CAAA;AAAA,EAEJ;AACF,CAAA;AACA,KAAA,CAAM,YAAA,EAAc,OAAA;ADCpB;AACA;AACE;AACF,sBAAC","file":"/home/runner/work/augur-packages/augur-packages/packages/augur-web/dist/chunk-NWGXDXRV.cjs","sourcesContent":[null,"\"use client\";\n\nimport * as React from \"react\";\nimport { cn } from \"@simpleapps-com/augur-utils/web\";\n\nexport type InputProps = React.InputHTMLAttributes<HTMLInputElement>;\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n ref={ref}\n {...props}\n />\n );\n },\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n"]}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";
|
|
2
|
+
|
|
3
|
+
// src/select.tsx
|
|
4
|
+
var _react = require('react'); var React = _interopRequireWildcard(_react);
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _lu = require('react-icons/lu');
|
|
11
|
+
var _reactselect = require('@radix-ui/react-select'); var SelectPrimitive = _interopRequireWildcard(_reactselect);
|
|
12
|
+
var _web = require('@simpleapps-com/augur-utils/web');
|
|
13
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
14
|
+
var Select = SelectPrimitive.Root;
|
|
15
|
+
var SelectGroup = SelectPrimitive.Group;
|
|
16
|
+
var SelectValue = SelectPrimitive.Value;
|
|
17
|
+
var SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
18
|
+
SelectPrimitive.Trigger,
|
|
19
|
+
{
|
|
20
|
+
ref,
|
|
21
|
+
className: _web.cn.call(void 0,
|
|
22
|
+
"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
23
|
+
className
|
|
24
|
+
),
|
|
25
|
+
...props,
|
|
26
|
+
children: [
|
|
27
|
+
children,
|
|
28
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lu.LuChevronsUpDown, { className: "h-4 w-4 opacity-50" }) })
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
));
|
|
32
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
33
|
+
var SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
34
|
+
SelectPrimitive.ScrollUpButton,
|
|
35
|
+
{
|
|
36
|
+
ref,
|
|
37
|
+
className: _web.cn.call(void 0,
|
|
38
|
+
"flex cursor-default items-center justify-center py-1",
|
|
39
|
+
className
|
|
40
|
+
),
|
|
41
|
+
...props,
|
|
42
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lu.LuChevronUp, {})
|
|
43
|
+
}
|
|
44
|
+
));
|
|
45
|
+
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
46
|
+
var SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
47
|
+
SelectPrimitive.ScrollDownButton,
|
|
48
|
+
{
|
|
49
|
+
ref,
|
|
50
|
+
className: _web.cn.call(void 0,
|
|
51
|
+
"flex cursor-default items-center justify-center py-1",
|
|
52
|
+
className
|
|
53
|
+
),
|
|
54
|
+
...props,
|
|
55
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lu.LuChevronDown, {})
|
|
56
|
+
}
|
|
57
|
+
));
|
|
58
|
+
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
59
|
+
var SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectPrimitive.Portal, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
60
|
+
SelectPrimitive.Content,
|
|
61
|
+
{
|
|
62
|
+
ref,
|
|
63
|
+
className: _web.cn.call(void 0,
|
|
64
|
+
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
65
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
66
|
+
className
|
|
67
|
+
),
|
|
68
|
+
position,
|
|
69
|
+
...props,
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectScrollUpButton, {}),
|
|
72
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
73
|
+
SelectPrimitive.Viewport,
|
|
74
|
+
{
|
|
75
|
+
className: _web.cn.call(void 0,
|
|
76
|
+
"p-1",
|
|
77
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
78
|
+
),
|
|
79
|
+
children
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectScrollDownButton, {})
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
) }));
|
|
86
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
87
|
+
var SelectLabel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
88
|
+
SelectPrimitive.Label,
|
|
89
|
+
{
|
|
90
|
+
ref,
|
|
91
|
+
className: _web.cn.call(void 0, "px-2 py-1.5 text-sm font-semibold", className),
|
|
92
|
+
...props
|
|
93
|
+
}
|
|
94
|
+
));
|
|
95
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
96
|
+
var SelectItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
97
|
+
SelectPrimitive.Item,
|
|
98
|
+
{
|
|
99
|
+
ref,
|
|
100
|
+
className: _web.cn.call(void 0,
|
|
101
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
102
|
+
className
|
|
103
|
+
),
|
|
104
|
+
...props,
|
|
105
|
+
children: [
|
|
106
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lu.LuCheck, { className: "h-4 w-4" }) }) }),
|
|
107
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectPrimitive.ItemText, { children })
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
));
|
|
111
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
112
|
+
var SelectSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
113
|
+
SelectPrimitive.Separator,
|
|
114
|
+
{
|
|
115
|
+
ref,
|
|
116
|
+
className: _web.cn.call(void 0, "-mx-1 my-1 h-px bg-muted", className),
|
|
117
|
+
...props
|
|
118
|
+
}
|
|
119
|
+
));
|
|
120
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
exports.Select = Select; exports.SelectGroup = SelectGroup; exports.SelectValue = SelectValue; exports.SelectTrigger = SelectTrigger; exports.SelectScrollUpButton = SelectScrollUpButton; exports.SelectScrollDownButton = SelectScrollDownButton; exports.SelectContent = SelectContent; exports.SelectLabel = SelectLabel; exports.SelectItem = SelectItem; exports.SelectSeparator = SelectSeparator;
|
|
134
|
+
//# sourceMappingURL=chunk-Q6H6D3AN.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/augur-packages/augur-packages/packages/augur-web/dist/chunk-Q6H6D3AN.cjs","../src/select.tsx"],"names":[],"mappings":"AAAA,uWAAY;AACZ;AACA;ACAA,2EAAuB;AACvB;AACE;AACA;AACA;AACA;AAAA,oCACK;AACP,kHAAiC;AACjC,sDAAmB;AAUjB,+CAAA;AARF,IAAM,OAAA,EAAyB,eAAA,CAAA,IAAA;AAC/B,IAAM,YAAA,EAA8B,eAAA,CAAA,KAAA;AACpC,IAAM,YAAA,EAA8B,eAAA,CAAA,KAAA;AAEpC,IAAM,cAAA,EAAsB,KAAA,CAAA,UAAA,CAG1B,CAAC,EAAE,SAAA,EAAW,QAAA,EAAU,GAAG,MAAM,CAAA,EAAG,GAAA,EAAA,mBACpC,8BA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/home/runner/work/augur-packages/augur-packages/packages/augur-web/dist/chunk-Q6H6D3AN.cjs","sourcesContent":[null,"\"use client\";\n\nimport * as React from \"react\";\nimport {\n LuChevronsUpDown,\n LuCheck,\n LuChevronDown,\n LuChevronUp,\n} from \"react-icons/lu\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { cn } from \"@simpleapps-com/augur-utils/web\";\n\nconst Select = SelectPrimitive.Root;\nconst SelectGroup = SelectPrimitive.Group;\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1\",\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <LuChevronsUpDown className=\"h-4 w-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className,\n )}\n {...props}\n >\n <LuChevronUp />\n </SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className,\n )}\n {...props}\n >\n <LuChevronDown />\n </SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName =\n SelectPrimitive.ScrollDownButton.displayName;\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = \"popper\", ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n \"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"p-1\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\",\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n));\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn(\"px-2 py-1.5 text-sm font-semibold\", className)}\n {...props}\n />\n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nconst SelectItem = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <LuCheck className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n));\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n};\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkCK53LO3Jcjs = require('./chunk-CK53LO3J.cjs');
|
|
5
|
+
|
|
6
|
+
// src/form-field.tsx
|
|
7
|
+
var _react = require('react'); var React = _interopRequireWildcard(_react);
|
|
8
|
+
var _web = require('@simpleapps-com/augur-utils/web');
|
|
9
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
10
|
+
var FormField = React.forwardRef(
|
|
11
|
+
({ label, htmlFor, required, error, className, children }, ref) => {
|
|
12
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { ref, className: _web.cn.call(void 0, "space-y-2", className), children: [
|
|
13
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkCK53LO3Jcjs.Label, { htmlFor, children: [
|
|
14
|
+
label,
|
|
15
|
+
required && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-destructive", children: "*" })
|
|
16
|
+
] }),
|
|
17
|
+
children,
|
|
18
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-destructive", children: error })
|
|
19
|
+
] });
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
FormField.displayName = "FormField";
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
exports.FormField = FormField;
|
|
27
|
+
//# sourceMappingURL=chunk-VMOQCPK5.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/augur-packages/augur-packages/packages/augur-web/dist/chunk-VMOQCPK5.cjs","../src/form-field.tsx"],"names":[],"mappings":"AAAA,uWAAY;AACZ;AACE;AACF,wDAA6B;AAC7B;AACA;ACHA,2EAAuB;AACvB,sDAAmB;AAgBX,+CAAA;AAJR,IAAM,UAAA,EAAkB,KAAA,CAAA,UAAA;AAAA,EACtB,CAAC,EAAE,KAAA,EAAO,OAAA,EAAS,QAAA,EAAU,KAAA,EAAO,SAAA,EAAW,SAAS,CAAA,EAAG,GAAA,EAAA,GAAQ;AACjE,IAAA,uBACE,8BAAA,KAAC,EAAA,EAAI,GAAA,EAAU,SAAA,EAAW,qBAAA,WAAG,EAAa,SAAS,CAAA,EACjD,QAAA,EAAA;AAAA,sBAAA,8BAAA,uBAAC,EAAA,EAAM,OAAA,EACJ,QAAA,EAAA;AAAA,QAAA,KAAA;AAAA,QACA,SAAA,mBAAY,6BAAA,MAAC,EAAA,EAAK,SAAA,EAAU,kBAAA,EAAmB,QAAA,EAAA,IAAA,CAAC;AAAA,MAAA,EAAA,CACnD,CAAA;AAAA,MACC,QAAA;AAAA,MACA,MAAA,mBAAS,6BAAA,GAAC,EAAA,EAAE,SAAA,EAAU,0BAAA,EAA4B,QAAA,EAAA,MAAA,CAAM;AAAA,IAAA,EAAA,CAC3D,CAAA;AAAA,EAEJ;AACF,CAAA;AACA,SAAA,CAAU,YAAA,EAAc,WAAA;ADPxB;AACA;AACE;AACF,8BAAC","file":"/home/runner/work/augur-packages/augur-packages/packages/augur-web/dist/chunk-VMOQCPK5.cjs","sourcesContent":[null,"\"use client\";\n\nimport * as React from \"react\";\nimport { cn } from \"@simpleapps-com/augur-utils/web\";\nimport { Label } from \"./label\";\n\nexport interface FormFieldProps {\n label: string;\n htmlFor: string;\n required?: boolean;\n error?: string;\n className?: string;\n children: React.ReactNode;\n}\n\nconst FormField = React.forwardRef<HTMLDivElement, FormFieldProps>(\n ({ label, htmlFor, required, error, className, children }, ref) => {\n return (\n <div ref={ref} className={cn(\"space-y-2\", className)}>\n <Label htmlFor={htmlFor}>\n {label}\n {required && <span className=\"text-destructive\">*</span>}\n </Label>\n {children}\n {error && <p className=\"text-sm text-destructive\">{error}</p>}\n </div>\n );\n },\n);\nFormField.displayName = \"FormField\";\n\nexport { FormField };\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkVMOQCPK5cjs = require('./chunk-VMOQCPK5.cjs');
|
|
6
|
+
require('./chunk-CK53LO3J.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
exports.FormField = _chunkVMOQCPK5cjs.FormField;
|
|
10
|
+
//# sourceMappingURL=form-field.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/augur-packages/augur-packages/packages/augur-web/dist/form-field.cjs"],"names":[],"mappings":"AAAA,qFAAY;AACZ,YAAY;AACZ;AACE;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACF,gDAAC","file":"/home/runner/work/augur-packages/augur-packages/packages/augur-web/dist/form-field.cjs"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface FormFieldProps {
|
|
4
|
+
label: string;
|
|
5
|
+
htmlFor: string;
|
|
6
|
+
required?: boolean;
|
|
7
|
+
error?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
declare const FormField: React.ForwardRefExoticComponent<FormFieldProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
|
|
13
|
+
export { FormField, type FormFieldProps };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface FormFieldProps {
|
|
4
|
+
label: string;
|
|
5
|
+
htmlFor: string;
|
|
6
|
+
required?: boolean;
|
|
7
|
+
error?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
declare const FormField: React.ForwardRefExoticComponent<FormFieldProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
|
|
13
|
+
export { FormField, type FormFieldProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|