@2urgseui/core 0.1.4 → 0.1.6
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/index.cjs +381 -319
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +374 -312
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -549,9 +549,9 @@ function AsyncSelectInner(props) {
|
|
|
549
549
|
setSelectedItem(null);
|
|
550
550
|
};
|
|
551
551
|
const triggerLabel = selectedItem ? resolveLabel(selectedItem, labelKey) : value?.label ? value.label : null;
|
|
552
|
-
return /* @__PURE__ */ jsxs5(Popover, { open, onOpenChange: setOpen, children: [
|
|
552
|
+
return /* @__PURE__ */ jsx6("div", { className: "w-full min-w-0", children: /* @__PURE__ */ jsxs5(Popover, { open, onOpenChange: setOpen, children: [
|
|
553
553
|
name && /* @__PURE__ */ jsx6("input", { type: "hidden", name, value: value?.value ?? "" }),
|
|
554
|
-
/* @__PURE__ */ jsx6(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs5(
|
|
554
|
+
/* @__PURE__ */ jsx6(PopoverTrigger, { asChild: true, className: "w-full", children: /* @__PURE__ */ jsxs5(
|
|
555
555
|
"button",
|
|
556
556
|
{
|
|
557
557
|
ref: innerRef,
|
|
@@ -561,10 +561,9 @@ function AsyncSelectInner(props) {
|
|
|
561
561
|
"aria-expanded": open,
|
|
562
562
|
disabled,
|
|
563
563
|
className: cn(
|
|
564
|
-
"flex min-h-11 w-full appearance-none items-center justify-between gap-2 px-4 py-2 text-base md:text-sm",
|
|
564
|
+
"flex min-h-11 w-full min-w-0 appearance-none items-center justify-between gap-2 px-4 py-2 text-base md:text-sm",
|
|
565
565
|
inputSurfaceField,
|
|
566
566
|
inputSurfaceFieldDisabled,
|
|
567
|
-
"[&>span]:min-w-0 [&>span]:flex-1 [&>span]:text-left [&>span]:whitespace-normal [&>span]:break-words [&>span]:text-inherit [&_svg]:text-slate-500 dark:[&_svg]:text-slate-400",
|
|
568
567
|
error && inputSurfaceFieldInvalid,
|
|
569
568
|
className
|
|
570
569
|
),
|
|
@@ -579,7 +578,7 @@ function AsyncSelectInner(props) {
|
|
|
579
578
|
children: triggerLabel ?? placeholder
|
|
580
579
|
}
|
|
581
580
|
),
|
|
582
|
-
/* @__PURE__ */ jsxs5("span", { className: "flex shrink-0 items-center gap-1", children: [
|
|
581
|
+
/* @__PURE__ */ jsxs5("span", { className: "ml-auto flex shrink-0 items-center gap-1", children: [
|
|
583
582
|
clearable && value?.value && !disabled && /* @__PURE__ */ jsx6(
|
|
584
583
|
"span",
|
|
585
584
|
{
|
|
@@ -603,7 +602,7 @@ function AsyncSelectInner(props) {
|
|
|
603
602
|
PopoverContent,
|
|
604
603
|
{
|
|
605
604
|
align: "start",
|
|
606
|
-
className: "w-[--radix-popover-trigger-width] p-0",
|
|
605
|
+
className: "w-[var(--radix-popover-trigger-width)] min-w-[var(--radix-popover-trigger-width)] max-w-[var(--radix-popover-content-available-width)] p-0",
|
|
607
606
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
608
607
|
children: [
|
|
609
608
|
searchable && /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-2 border-b px-3 py-2", children: [
|
|
@@ -661,7 +660,7 @@ function AsyncSelectInner(props) {
|
|
|
661
660
|
]
|
|
662
661
|
}
|
|
663
662
|
)
|
|
664
|
-
] });
|
|
663
|
+
] }) });
|
|
665
664
|
}
|
|
666
665
|
var AsyncSelect = React6.forwardRef(
|
|
667
666
|
(props, ref) => /* @__PURE__ */ jsx6(AsyncSelectInner, { ...props, innerRef: ref })
|
|
@@ -1918,7 +1917,7 @@ var FileDropzone = React20.forwardRef(
|
|
|
1918
1917
|
FileDropzone.displayName = "FileDropzone";
|
|
1919
1918
|
|
|
1920
1919
|
// source/components/primitive/FormField/form-field.tsx
|
|
1921
|
-
import * as
|
|
1920
|
+
import * as React32 from "react";
|
|
1922
1921
|
import {
|
|
1923
1922
|
Controller
|
|
1924
1923
|
} from "react-hook-form";
|
|
@@ -2034,10 +2033,119 @@ var Input = React22.forwardRef(
|
|
|
2034
2033
|
Input.displayName = "Input";
|
|
2035
2034
|
|
|
2036
2035
|
// source/components/primitive/Label/label.tsx
|
|
2037
|
-
import * as
|
|
2036
|
+
import * as React25 from "react";
|
|
2038
2037
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
2039
2038
|
import { cva as cva8 } from "class-variance-authority";
|
|
2040
|
-
import {
|
|
2039
|
+
import { CircleHelp } from "lucide-react";
|
|
2040
|
+
|
|
2041
|
+
// source/components/primitive/RichHtml/rich-html.tsx
|
|
2042
|
+
import * as React23 from "react";
|
|
2043
|
+
import DOMPurify from "dompurify";
|
|
2044
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
2045
|
+
var defaultSanitizeConfig = {
|
|
2046
|
+
USE_PROFILES: { html: true }
|
|
2047
|
+
};
|
|
2048
|
+
var richHtmlChrome = cn(
|
|
2049
|
+
"max-w-none text-base leading-relaxed text-foreground",
|
|
2050
|
+
// Block flow
|
|
2051
|
+
"[&_p]:mb-3 [&_p:last-child]:mb-0 [&_blockquote]:my-4 [&_blockquote]:border-l-2 [&_blockquote]:border-muted [&_blockquote]:pl-4 [&_blockquote]:italic",
|
|
2052
|
+
// Lists
|
|
2053
|
+
"[&_ul]:my-3 [&_ul]:list-disc [&_ul]:pl-6 [&_ol]:my-3 [&_ol]:list-decimal [&_ol]:pl-6 [&_li]:my-1 [&_li]:pl-1",
|
|
2054
|
+
// Headings (common for TipTap / CMS output)
|
|
2055
|
+
"[&_h1]:mb-3 [&_h1]:mt-8 [&_h1]:text-3xl [&_h1]:font-semibold [&_h1]:first:mt-0",
|
|
2056
|
+
"[&_h2]:mb-2 [&_h2]:mt-6 [&_h2]:text-2xl [&_h2]:font-semibold [&_h2]:first:mt-0",
|
|
2057
|
+
"[&_h3]:mb-2 [&_h3]:mt-5 [&_h3]:text-xl [&_h3]:font-semibold [&_h3]:first:mt-0",
|
|
2058
|
+
"[&_h4]:mb-2 [&_h4]:mt-4 [&_h4]:text-lg [&_h4]:font-semibold [&_h4]:first:mt-0",
|
|
2059
|
+
// Links & media
|
|
2060
|
+
"[&_a]:text-primary [&_a]:underline [&_a]:underline-offset-2 [&_a]:outline-none [&_a]:focus-visible:ring-2 [&_a]:focus-visible:ring-ring [&_a]:focus-visible:ring-offset-2",
|
|
2061
|
+
"[&_img]:my-4 [&_img]:max-h-[min(480px,70vh)] [&_img]:max-w-full [&_img]:rounded-md [&_img]:object-contain",
|
|
2062
|
+
"[&_hr]:my-6 [&_hr]:border-border",
|
|
2063
|
+
// Code
|
|
2064
|
+
"[&_code]:rounded [&_code]:bg-muted [&_code]:px-1 [&_code]:py-0.5 [&_code]:text-[0.9em]",
|
|
2065
|
+
"[&_pre]:my-4 [&_pre]:overflow-x-auto [&_pre]:rounded-md [&_pre]:bg-muted [&_pre]:p-3 [&_pre]:font-mono [&_pre]:text-sm"
|
|
2066
|
+
);
|
|
2067
|
+
var RichHtml = React23.forwardRef(
|
|
2068
|
+
({
|
|
2069
|
+
html,
|
|
2070
|
+
sanitize = true,
|
|
2071
|
+
sanitizeConfig,
|
|
2072
|
+
className,
|
|
2073
|
+
suppressHydrationWarning,
|
|
2074
|
+
...props
|
|
2075
|
+
}, ref) => {
|
|
2076
|
+
const markup = React23.useMemo(() => {
|
|
2077
|
+
if (html === void 0 || html === null || html === "") {
|
|
2078
|
+
return "";
|
|
2079
|
+
}
|
|
2080
|
+
if (!sanitize) {
|
|
2081
|
+
return html;
|
|
2082
|
+
}
|
|
2083
|
+
if (typeof window === "undefined") {
|
|
2084
|
+
return "";
|
|
2085
|
+
}
|
|
2086
|
+
const config = {
|
|
2087
|
+
...defaultSanitizeConfig,
|
|
2088
|
+
...sanitizeConfig
|
|
2089
|
+
};
|
|
2090
|
+
return DOMPurify.sanitize(html, config);
|
|
2091
|
+
}, [html, sanitize, sanitizeConfig]);
|
|
2092
|
+
const resolvedSuppressHydration = suppressHydrationWarning ?? sanitize;
|
|
2093
|
+
if (html === void 0 || html === null || html === "") {
|
|
2094
|
+
return null;
|
|
2095
|
+
}
|
|
2096
|
+
return /* @__PURE__ */ jsx24(
|
|
2097
|
+
"div",
|
|
2098
|
+
{
|
|
2099
|
+
ref,
|
|
2100
|
+
suppressHydrationWarning: resolvedSuppressHydration,
|
|
2101
|
+
className: cn(richHtmlChrome, className),
|
|
2102
|
+
...props,
|
|
2103
|
+
dangerouslySetInnerHTML: { __html: markup }
|
|
2104
|
+
}
|
|
2105
|
+
);
|
|
2106
|
+
}
|
|
2107
|
+
);
|
|
2108
|
+
RichHtml.displayName = "RichHtml";
|
|
2109
|
+
|
|
2110
|
+
// source/components/primitive/ToolTip/tooltip.tsx
|
|
2111
|
+
import * as React24 from "react";
|
|
2112
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
2113
|
+
import { jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2114
|
+
var TooltipProvider = TooltipPrimitive.Provider;
|
|
2115
|
+
var Tooltip = ({ ...props }) => {
|
|
2116
|
+
return /* @__PURE__ */ jsx25(TooltipPrimitive.Root, { ...props });
|
|
2117
|
+
};
|
|
2118
|
+
Tooltip.displayName = "Tooltip";
|
|
2119
|
+
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
2120
|
+
TooltipTrigger.displayName = "TooltipTrigger";
|
|
2121
|
+
var TooltipContent = React24.forwardRef(({ className, sideOffset = 4, arrow = false, children, ...props }, ref) => {
|
|
2122
|
+
return /* @__PURE__ */ jsx25(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs15(
|
|
2123
|
+
TooltipPrimitive.Content,
|
|
2124
|
+
{
|
|
2125
|
+
ref,
|
|
2126
|
+
sideOffset,
|
|
2127
|
+
className: cn(
|
|
2128
|
+
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md",
|
|
2129
|
+
"animate-in fade-in-0 zoom-in-95",
|
|
2130
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
2131
|
+
"data-[side=bottom]:slide-in-from-top-2",
|
|
2132
|
+
"data-[side=left]:slide-in-from-right-2",
|
|
2133
|
+
"data-[side=right]:slide-in-from-left-2",
|
|
2134
|
+
"data-[side=top]:slide-in-from-bottom-2",
|
|
2135
|
+
className
|
|
2136
|
+
),
|
|
2137
|
+
...props,
|
|
2138
|
+
children: [
|
|
2139
|
+
children,
|
|
2140
|
+
arrow && /* @__PURE__ */ jsx25(TooltipPrimitive.Arrow, { className: "fill-popover" })
|
|
2141
|
+
]
|
|
2142
|
+
}
|
|
2143
|
+
) });
|
|
2144
|
+
});
|
|
2145
|
+
TooltipContent.displayName = "TooltipContent";
|
|
2146
|
+
|
|
2147
|
+
// source/components/primitive/Label/label.tsx
|
|
2148
|
+
import { jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2041
2149
|
var labelVariants = cva8(
|
|
2042
2150
|
"font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
2043
2151
|
{
|
|
@@ -2058,27 +2166,75 @@ var labelVariants = cva8(
|
|
|
2058
2166
|
}
|
|
2059
2167
|
}
|
|
2060
2168
|
);
|
|
2061
|
-
var
|
|
2169
|
+
var labelTooltipHtmlClassName = cn(
|
|
2170
|
+
"max-w-xs text-sm leading-snug",
|
|
2171
|
+
"[&_p]:mb-1 [&_p:last-child]:mb-0",
|
|
2172
|
+
"[&_a]:text-inherit [&_a]:underline [&_a]:underline-offset-2"
|
|
2173
|
+
);
|
|
2174
|
+
function looksLikeHtml(value) {
|
|
2175
|
+
return /<[a-z][\s\S]*>/i.test(value);
|
|
2176
|
+
}
|
|
2177
|
+
function LabelTooltipContent({ content }) {
|
|
2178
|
+
if (typeof content === "string") {
|
|
2179
|
+
if (looksLikeHtml(content)) {
|
|
2180
|
+
return /* @__PURE__ */ jsx26(
|
|
2181
|
+
RichHtml,
|
|
2182
|
+
{
|
|
2183
|
+
html: content,
|
|
2184
|
+
className: labelTooltipHtmlClassName
|
|
2185
|
+
}
|
|
2186
|
+
);
|
|
2187
|
+
}
|
|
2188
|
+
return content;
|
|
2189
|
+
}
|
|
2190
|
+
return content;
|
|
2191
|
+
}
|
|
2192
|
+
function LabelTooltip({ content }) {
|
|
2193
|
+
return /* @__PURE__ */ jsx26(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ jsxs16(Tooltip, { children: [
|
|
2194
|
+
/* @__PURE__ */ jsx26(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx26(
|
|
2195
|
+
"button",
|
|
2196
|
+
{
|
|
2197
|
+
type: "button",
|
|
2198
|
+
className: "inline-flex shrink-0 rounded-sm text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
2199
|
+
"aria-label": "More information",
|
|
2200
|
+
onClick: (e) => e.preventDefault(),
|
|
2201
|
+
children: /* @__PURE__ */ jsx26(CircleHelp, { className: "h-3.5 w-3.5", "aria-hidden": true })
|
|
2202
|
+
}
|
|
2203
|
+
) }),
|
|
2204
|
+
/* @__PURE__ */ jsx26(TooltipContent, { side: "top", children: /* @__PURE__ */ jsx26(LabelTooltipContent, { content }) })
|
|
2205
|
+
] }) });
|
|
2206
|
+
}
|
|
2207
|
+
function hasLabelTooltip(tooltip) {
|
|
2208
|
+
if (tooltip == null) return false;
|
|
2209
|
+
if (typeof tooltip === "string" && tooltip.trim() === "") return false;
|
|
2210
|
+
return true;
|
|
2211
|
+
}
|
|
2212
|
+
var Label2 = React25.forwardRef(({ className, tone, size, required, tooltip, children, ...props }, ref) => /* @__PURE__ */ jsxs16(
|
|
2062
2213
|
LabelPrimitive.Root,
|
|
2063
2214
|
{
|
|
2064
2215
|
ref,
|
|
2065
|
-
className: cn(
|
|
2216
|
+
className: cn(
|
|
2217
|
+
labelVariants({ tone, size }),
|
|
2218
|
+
"inline-flex items-center gap-1",
|
|
2219
|
+
className
|
|
2220
|
+
),
|
|
2066
2221
|
...props,
|
|
2067
2222
|
children: [
|
|
2068
2223
|
children,
|
|
2069
|
-
|
|
2224
|
+
hasLabelTooltip(tooltip) && /* @__PURE__ */ jsx26(LabelTooltip, { content: tooltip }),
|
|
2225
|
+
required && /* @__PURE__ */ jsx26("span", { className: "text-destructive", children: "*" })
|
|
2070
2226
|
]
|
|
2071
2227
|
}
|
|
2072
2228
|
));
|
|
2073
2229
|
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
2074
2230
|
|
|
2075
2231
|
// source/components/primitive/RadioGroup/radiogroup.tsx
|
|
2076
|
-
import * as
|
|
2232
|
+
import * as React26 from "react";
|
|
2077
2233
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
2078
2234
|
import { Circle as Circle2 } from "lucide-react";
|
|
2079
|
-
import { jsx as
|
|
2080
|
-
var RadioGroup2 =
|
|
2081
|
-
return /* @__PURE__ */
|
|
2235
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
2236
|
+
var RadioGroup2 = React26.forwardRef(({ className, ...props }, ref) => {
|
|
2237
|
+
return /* @__PURE__ */ jsx27(
|
|
2082
2238
|
RadioGroupPrimitive.Root,
|
|
2083
2239
|
{
|
|
2084
2240
|
ref,
|
|
@@ -2088,8 +2244,8 @@ var RadioGroup2 = React24.forwardRef(({ className, ...props }, ref) => {
|
|
|
2088
2244
|
);
|
|
2089
2245
|
});
|
|
2090
2246
|
RadioGroup2.displayName = "RadioGroup";
|
|
2091
|
-
var RadioGroupItem =
|
|
2092
|
-
return /* @__PURE__ */
|
|
2247
|
+
var RadioGroupItem = React26.forwardRef(({ className, ...props }, ref) => {
|
|
2248
|
+
return /* @__PURE__ */ jsx27(
|
|
2093
2249
|
RadioGroupPrimitive.Item,
|
|
2094
2250
|
{
|
|
2095
2251
|
ref,
|
|
@@ -2101,7 +2257,7 @@ var RadioGroupItem = React24.forwardRef(({ className, ...props }, ref) => {
|
|
|
2101
2257
|
className
|
|
2102
2258
|
),
|
|
2103
2259
|
...props,
|
|
2104
|
-
children: /* @__PURE__ */
|
|
2260
|
+
children: /* @__PURE__ */ jsx27(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx27(Circle2, { className: "h-2.5 w-2.5 shrink-0 fill-current text-current" }) })
|
|
2105
2261
|
}
|
|
2106
2262
|
);
|
|
2107
2263
|
});
|
|
@@ -2115,20 +2271,20 @@ import Image2 from "@tiptap/extension-image";
|
|
|
2115
2271
|
import Link from "@tiptap/extension-link";
|
|
2116
2272
|
|
|
2117
2273
|
// source/components/primitive/RichTextArea/richtext-toolbar.tsx
|
|
2118
|
-
import { jsx as
|
|
2274
|
+
import { jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2119
2275
|
function RichTextToolbar({ editor }) {
|
|
2120
2276
|
if (!editor) return null;
|
|
2121
|
-
return /* @__PURE__ */
|
|
2122
|
-
/* @__PURE__ */
|
|
2123
|
-
/* @__PURE__ */
|
|
2124
|
-
/* @__PURE__ */
|
|
2125
|
-
/* @__PURE__ */
|
|
2126
|
-
/* @__PURE__ */
|
|
2277
|
+
return /* @__PURE__ */ jsxs17("div", { className: "flex flex-wrap gap-2 border-b p-2", children: [
|
|
2278
|
+
/* @__PURE__ */ jsx28("button", { onClick: () => editor.chain().focus().toggleBold().run(), children: "Bold" }),
|
|
2279
|
+
/* @__PURE__ */ jsx28("button", { onClick: () => editor.chain().focus().toggleItalic().run(), children: "Italic" }),
|
|
2280
|
+
/* @__PURE__ */ jsx28("button", { onClick: () => editor.chain().focus().toggleHeading({ level: 2 }).run(), children: "H2" }),
|
|
2281
|
+
/* @__PURE__ */ jsx28("button", { onClick: () => editor.chain().focus().toggleBulletList().run(), children: "List" }),
|
|
2282
|
+
/* @__PURE__ */ jsx28("button", { onClick: () => editor.chain().focus().toggleCodeBlock().run(), children: "Code" })
|
|
2127
2283
|
] });
|
|
2128
2284
|
}
|
|
2129
2285
|
|
|
2130
2286
|
// source/components/primitive/RichTextArea/richtext-editor.tsx
|
|
2131
|
-
import { jsx as
|
|
2287
|
+
import { jsx as jsx29, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2132
2288
|
var RichTextEditor = ({
|
|
2133
2289
|
value,
|
|
2134
2290
|
onChange,
|
|
@@ -2152,7 +2308,7 @@ var RichTextEditor = ({
|
|
|
2152
2308
|
}
|
|
2153
2309
|
});
|
|
2154
2310
|
if (!editor) return null;
|
|
2155
|
-
return /* @__PURE__ */
|
|
2311
|
+
return /* @__PURE__ */ jsxs18(
|
|
2156
2312
|
"div",
|
|
2157
2313
|
{
|
|
2158
2314
|
className: cn(
|
|
@@ -2162,8 +2318,8 @@ var RichTextEditor = ({
|
|
|
2162
2318
|
className
|
|
2163
2319
|
),
|
|
2164
2320
|
children: [
|
|
2165
|
-
/* @__PURE__ */
|
|
2166
|
-
/* @__PURE__ */
|
|
2321
|
+
/* @__PURE__ */ jsx29(RichTextToolbar, { editor }),
|
|
2322
|
+
/* @__PURE__ */ jsx29(
|
|
2167
2323
|
EditorContent,
|
|
2168
2324
|
{
|
|
2169
2325
|
editor,
|
|
@@ -2176,9 +2332,9 @@ var RichTextEditor = ({
|
|
|
2176
2332
|
};
|
|
2177
2333
|
|
|
2178
2334
|
// source/components/primitive/SearchableSelect/searchable-select.tsx
|
|
2179
|
-
import * as
|
|
2335
|
+
import * as React27 from "react";
|
|
2180
2336
|
import { Check as Check4, ChevronDown as ChevronDown3, Search as Search2 } from "lucide-react";
|
|
2181
|
-
import { jsx as
|
|
2337
|
+
import { jsx as jsx30, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2182
2338
|
function reactNodeToLabelString2(node) {
|
|
2183
2339
|
if (node == null || typeof node === "boolean") return "";
|
|
2184
2340
|
if (typeof node === "string" || typeof node === "number") return String(node);
|
|
@@ -2208,12 +2364,12 @@ function SearchableSelectInner({
|
|
|
2208
2364
|
"aria-invalid": ariaInvalid,
|
|
2209
2365
|
innerRef
|
|
2210
2366
|
}) {
|
|
2211
|
-
const [open, setOpen] =
|
|
2212
|
-
const [search, setSearch] =
|
|
2213
|
-
const searchInputRef =
|
|
2367
|
+
const [open, setOpen] = React27.useState(false);
|
|
2368
|
+
const [search, setSearch] = React27.useState("");
|
|
2369
|
+
const searchInputRef = React27.useRef(null);
|
|
2214
2370
|
const filteredItems = items.filter((item) => filterItem(item, search));
|
|
2215
2371
|
const selectedItem = items.find((item) => item.value === value);
|
|
2216
|
-
|
|
2372
|
+
React27.useEffect(() => {
|
|
2217
2373
|
if (open) {
|
|
2218
2374
|
setTimeout(() => searchInputRef.current?.focus(), 0);
|
|
2219
2375
|
} else {
|
|
@@ -2233,9 +2389,9 @@ function SearchableSelectInner({
|
|
|
2233
2389
|
e.stopPropagation();
|
|
2234
2390
|
onValueChange?.("");
|
|
2235
2391
|
};
|
|
2236
|
-
return /* @__PURE__ */
|
|
2237
|
-
name && /* @__PURE__ */
|
|
2238
|
-
/* @__PURE__ */
|
|
2392
|
+
return /* @__PURE__ */ jsx30("div", { className: "w-full min-w-0", children: /* @__PURE__ */ jsxs19(Popover, { open, onOpenChange: setOpen, children: [
|
|
2393
|
+
name && /* @__PURE__ */ jsx30("input", { type: "hidden", name, value: value ?? "" }),
|
|
2394
|
+
/* @__PURE__ */ jsx30(PopoverTrigger, { asChild: true, className: "w-full", children: /* @__PURE__ */ jsxs19(
|
|
2239
2395
|
"button",
|
|
2240
2396
|
{
|
|
2241
2397
|
ref: innerRef,
|
|
@@ -2248,14 +2404,14 @@ function SearchableSelectInner({
|
|
|
2248
2404
|
disabled,
|
|
2249
2405
|
onBlur,
|
|
2250
2406
|
className: cn(
|
|
2251
|
-
"flex min-h-11 w-full appearance-none items-center justify-between gap-2 px-4 py-2 text-base md:text-sm",
|
|
2407
|
+
"flex min-h-11 w-full min-w-0 appearance-none items-center justify-between gap-2 px-4 py-2 text-base md:text-sm",
|
|
2252
2408
|
inputSurfaceField,
|
|
2253
2409
|
inputSurfaceFieldDisabled,
|
|
2254
2410
|
error && inputSurfaceFieldInvalid,
|
|
2255
2411
|
className
|
|
2256
2412
|
),
|
|
2257
2413
|
children: [
|
|
2258
|
-
/* @__PURE__ */
|
|
2414
|
+
/* @__PURE__ */ jsx30(
|
|
2259
2415
|
"span",
|
|
2260
2416
|
{
|
|
2261
2417
|
className: cn(
|
|
@@ -2265,8 +2421,8 @@ function SearchableSelectInner({
|
|
|
2265
2421
|
children: selectedItem?.label ?? placeholder
|
|
2266
2422
|
}
|
|
2267
2423
|
),
|
|
2268
|
-
/* @__PURE__ */
|
|
2269
|
-
clearable && value && !disabled && /* @__PURE__ */
|
|
2424
|
+
/* @__PURE__ */ jsxs19("span", { className: "ml-auto flex shrink-0 items-center gap-1", children: [
|
|
2425
|
+
clearable && value && !disabled && /* @__PURE__ */ jsx30(
|
|
2270
2426
|
"span",
|
|
2271
2427
|
{
|
|
2272
2428
|
role: "button",
|
|
@@ -2282,21 +2438,21 @@ function SearchableSelectInner({
|
|
|
2282
2438
|
children: "\xD7"
|
|
2283
2439
|
}
|
|
2284
2440
|
),
|
|
2285
|
-
/* @__PURE__ */
|
|
2441
|
+
/* @__PURE__ */ jsx30(ChevronDown3, { "aria-hidden": true, className: "h-4 w-4 shrink-0 text-slate-500 dark:text-slate-400" })
|
|
2286
2442
|
] })
|
|
2287
2443
|
]
|
|
2288
2444
|
}
|
|
2289
2445
|
) }),
|
|
2290
|
-
/* @__PURE__ */
|
|
2446
|
+
/* @__PURE__ */ jsxs19(
|
|
2291
2447
|
PopoverContent,
|
|
2292
2448
|
{
|
|
2293
2449
|
align: "start",
|
|
2294
2450
|
className: "w-[--radix-popover-trigger-width] min-w-[var(--radix-popover-trigger-width)] max-w-[var(--radix-popover-content-available-width)] p-0",
|
|
2295
2451
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
2296
2452
|
children: [
|
|
2297
|
-
/* @__PURE__ */
|
|
2298
|
-
/* @__PURE__ */
|
|
2299
|
-
/* @__PURE__ */
|
|
2453
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2 border-b px-3 py-2", children: [
|
|
2454
|
+
/* @__PURE__ */ jsx30(Search2, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
|
|
2455
|
+
/* @__PURE__ */ jsx30(
|
|
2300
2456
|
"input",
|
|
2301
2457
|
{
|
|
2302
2458
|
ref: searchInputRef,
|
|
@@ -2307,9 +2463,9 @@ function SearchableSelectInner({
|
|
|
2307
2463
|
}
|
|
2308
2464
|
)
|
|
2309
2465
|
] }),
|
|
2310
|
-
/* @__PURE__ */
|
|
2466
|
+
/* @__PURE__ */ jsx30("div", { className: "max-h-60 overflow-y-auto p-1", children: filteredItems.length === 0 ? /* @__PURE__ */ jsx30("div", { className: "px-3 py-6 text-center text-sm text-muted-foreground", children: "No results found." }) : filteredItems.map((item) => {
|
|
2311
2467
|
const isSelected = item.value === value;
|
|
2312
|
-
return /* @__PURE__ */
|
|
2468
|
+
return /* @__PURE__ */ jsxs19(
|
|
2313
2469
|
"button",
|
|
2314
2470
|
{
|
|
2315
2471
|
type: "button",
|
|
@@ -2325,8 +2481,8 @@ function SearchableSelectInner({
|
|
|
2325
2481
|
isSelected && "bg-accent/50"
|
|
2326
2482
|
),
|
|
2327
2483
|
children: [
|
|
2328
|
-
/* @__PURE__ */
|
|
2329
|
-
/* @__PURE__ */
|
|
2484
|
+
/* @__PURE__ */ jsx30("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: isSelected && /* @__PURE__ */ jsx30(Check4, { className: "h-4 w-4" }) }),
|
|
2485
|
+
/* @__PURE__ */ jsx30("span", { className: "min-w-0 flex-1 whitespace-normal break-words", children: item.label })
|
|
2330
2486
|
]
|
|
2331
2487
|
},
|
|
2332
2488
|
item.value
|
|
@@ -2335,20 +2491,20 @@ function SearchableSelectInner({
|
|
|
2335
2491
|
]
|
|
2336
2492
|
}
|
|
2337
2493
|
)
|
|
2338
|
-
] });
|
|
2494
|
+
] }) });
|
|
2339
2495
|
}
|
|
2340
|
-
var SearchableSelect =
|
|
2496
|
+
var SearchableSelect = React27.forwardRef((props, ref) => /* @__PURE__ */ jsx30(SearchableSelectInner, { ...props, innerRef: ref }));
|
|
2341
2497
|
SearchableSelect.displayName = "SearchableSelect";
|
|
2342
2498
|
|
|
2343
2499
|
// source/components/primitive/Select/select.tsx
|
|
2344
|
-
import * as
|
|
2500
|
+
import * as React28 from "react";
|
|
2345
2501
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
2346
2502
|
import { Check as Check5, ChevronDown as ChevronDown4, ChevronUp } from "lucide-react";
|
|
2347
|
-
import { jsx as
|
|
2503
|
+
import { jsx as jsx31, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2348
2504
|
var Select = SelectPrimitive.Root;
|
|
2349
2505
|
var SelectGroup = SelectPrimitive.Group;
|
|
2350
2506
|
var SelectValue = SelectPrimitive.Value;
|
|
2351
|
-
var SelectTrigger =
|
|
2507
|
+
var SelectTrigger = React28.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs20(
|
|
2352
2508
|
SelectPrimitive.Trigger,
|
|
2353
2509
|
{
|
|
2354
2510
|
ref,
|
|
@@ -2362,7 +2518,7 @@ var SelectTrigger = React26.forwardRef(({ className, children, ...props }, ref)
|
|
|
2362
2518
|
...props,
|
|
2363
2519
|
children: [
|
|
2364
2520
|
children,
|
|
2365
|
-
/* @__PURE__ */
|
|
2521
|
+
/* @__PURE__ */ jsx31(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx31(
|
|
2366
2522
|
ChevronDown4,
|
|
2367
2523
|
{
|
|
2368
2524
|
"aria-hidden": "true",
|
|
@@ -2373,7 +2529,7 @@ var SelectTrigger = React26.forwardRef(({ className, children, ...props }, ref)
|
|
|
2373
2529
|
}
|
|
2374
2530
|
));
|
|
2375
2531
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
2376
|
-
var SelectScrollUpButton =
|
|
2532
|
+
var SelectScrollUpButton = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(
|
|
2377
2533
|
SelectPrimitive.ScrollUpButton,
|
|
2378
2534
|
{
|
|
2379
2535
|
ref,
|
|
@@ -2382,11 +2538,11 @@ var SelectScrollUpButton = React26.forwardRef(({ className, ...props }, ref) =>
|
|
|
2382
2538
|
className
|
|
2383
2539
|
),
|
|
2384
2540
|
...props,
|
|
2385
|
-
children: /* @__PURE__ */
|
|
2541
|
+
children: /* @__PURE__ */ jsx31(ChevronUp, { className: "h-4 w-4" })
|
|
2386
2542
|
}
|
|
2387
2543
|
));
|
|
2388
2544
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
2389
|
-
var SelectScrollDownButton =
|
|
2545
|
+
var SelectScrollDownButton = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(
|
|
2390
2546
|
SelectPrimitive.ScrollDownButton,
|
|
2391
2547
|
{
|
|
2392
2548
|
ref,
|
|
@@ -2395,11 +2551,11 @@ var SelectScrollDownButton = React26.forwardRef(({ className, ...props }, ref) =
|
|
|
2395
2551
|
className
|
|
2396
2552
|
),
|
|
2397
2553
|
...props,
|
|
2398
|
-
children: /* @__PURE__ */
|
|
2554
|
+
children: /* @__PURE__ */ jsx31(ChevronDown4, { className: "h-4 w-4" })
|
|
2399
2555
|
}
|
|
2400
2556
|
));
|
|
2401
2557
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
2402
|
-
var SelectContent =
|
|
2558
|
+
var SelectContent = React28.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx31(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs20(
|
|
2403
2559
|
SelectPrimitive.Content,
|
|
2404
2560
|
{
|
|
2405
2561
|
ref,
|
|
@@ -2411,8 +2567,8 @@ var SelectContent = React26.forwardRef(({ className, children, position = "poppe
|
|
|
2411
2567
|
position,
|
|
2412
2568
|
...props,
|
|
2413
2569
|
children: [
|
|
2414
|
-
/* @__PURE__ */
|
|
2415
|
-
/* @__PURE__ */
|
|
2570
|
+
/* @__PURE__ */ jsx31(SelectScrollUpButton, {}),
|
|
2571
|
+
/* @__PURE__ */ jsx31(
|
|
2416
2572
|
SelectPrimitive.Viewport,
|
|
2417
2573
|
{
|
|
2418
2574
|
className: cn(
|
|
@@ -2422,12 +2578,12 @@ var SelectContent = React26.forwardRef(({ className, children, position = "poppe
|
|
|
2422
2578
|
children
|
|
2423
2579
|
}
|
|
2424
2580
|
),
|
|
2425
|
-
/* @__PURE__ */
|
|
2581
|
+
/* @__PURE__ */ jsx31(SelectScrollDownButton, {})
|
|
2426
2582
|
]
|
|
2427
2583
|
}
|
|
2428
2584
|
) }));
|
|
2429
2585
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
2430
|
-
var SelectLabel =
|
|
2586
|
+
var SelectLabel = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(
|
|
2431
2587
|
SelectPrimitive.Label,
|
|
2432
2588
|
{
|
|
2433
2589
|
ref,
|
|
@@ -2436,13 +2592,13 @@ var SelectLabel = React26.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2436
2592
|
}
|
|
2437
2593
|
));
|
|
2438
2594
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
2439
|
-
var SelectItem =
|
|
2595
|
+
var SelectItem = React28.forwardRef(({ value, className, children, ...props }, ref) => {
|
|
2440
2596
|
if (value === "") {
|
|
2441
2597
|
throw new Error(
|
|
2442
2598
|
'SelectItem: `value` must not be an empty string \u2014 Radix uses "" to reset the Select and show the placeholder. Omit that option and use `<SelectValue placeholder="\u2026">`, or assign a sentinel value such as `"none"`.'
|
|
2443
2599
|
);
|
|
2444
2600
|
}
|
|
2445
|
-
return /* @__PURE__ */
|
|
2601
|
+
return /* @__PURE__ */ jsxs20(
|
|
2446
2602
|
SelectPrimitive.Item,
|
|
2447
2603
|
{
|
|
2448
2604
|
ref,
|
|
@@ -2453,14 +2609,14 @@ var SelectItem = React26.forwardRef(({ value, className, children, ...props }, r
|
|
|
2453
2609
|
),
|
|
2454
2610
|
...props,
|
|
2455
2611
|
children: [
|
|
2456
|
-
/* @__PURE__ */
|
|
2457
|
-
/* @__PURE__ */
|
|
2612
|
+
/* @__PURE__ */ jsx31("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx31(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx31(Check5, { className: "h-4 w-4" }) }) }),
|
|
2613
|
+
/* @__PURE__ */ jsx31(SelectPrimitive.ItemText, { className: "whitespace-normal break-words", children })
|
|
2458
2614
|
]
|
|
2459
2615
|
}
|
|
2460
2616
|
);
|
|
2461
2617
|
});
|
|
2462
2618
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
2463
|
-
var SelectSeparator =
|
|
2619
|
+
var SelectSeparator = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(
|
|
2464
2620
|
SelectPrimitive.Separator,
|
|
2465
2621
|
{
|
|
2466
2622
|
ref,
|
|
@@ -2471,10 +2627,10 @@ var SelectSeparator = React26.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
2471
2627
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
2472
2628
|
|
|
2473
2629
|
// source/components/primitive/Switch/switch.tsx
|
|
2474
|
-
import * as
|
|
2630
|
+
import * as React29 from "react";
|
|
2475
2631
|
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
2476
2632
|
import { cva as cva9 } from "class-variance-authority";
|
|
2477
|
-
import { jsx as
|
|
2633
|
+
import { jsx as jsx32, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2478
2634
|
var switchRootVariants = cva9(
|
|
2479
2635
|
[
|
|
2480
2636
|
"peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors",
|
|
@@ -2508,14 +2664,14 @@ var switchThumbVariants = cva9(
|
|
|
2508
2664
|
}
|
|
2509
2665
|
}
|
|
2510
2666
|
);
|
|
2511
|
-
var Switch =
|
|
2667
|
+
var Switch = React29.forwardRef(
|
|
2512
2668
|
({ className, label, description, error, size, id: idProp, ...props }, ref) => {
|
|
2513
|
-
const generatedId =
|
|
2669
|
+
const generatedId = React29.useId();
|
|
2514
2670
|
const id = idProp ?? generatedId;
|
|
2515
2671
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
2516
2672
|
const errorId = error ? `${id}-error` : void 0;
|
|
2517
|
-
return /* @__PURE__ */
|
|
2518
|
-
/* @__PURE__ */
|
|
2673
|
+
return /* @__PURE__ */ jsxs21("div", { className: "flex items-start gap-3", children: [
|
|
2674
|
+
/* @__PURE__ */ jsx32(
|
|
2519
2675
|
SwitchPrimitives.Root,
|
|
2520
2676
|
{
|
|
2521
2677
|
ref,
|
|
@@ -2528,7 +2684,7 @@ var Switch = React27.forwardRef(
|
|
|
2528
2684
|
className
|
|
2529
2685
|
),
|
|
2530
2686
|
...props,
|
|
2531
|
-
children: /* @__PURE__ */
|
|
2687
|
+
children: /* @__PURE__ */ jsx32(
|
|
2532
2688
|
SwitchPrimitives.Thumb,
|
|
2533
2689
|
{
|
|
2534
2690
|
className: cn(switchThumbVariants({ size }))
|
|
@@ -2536,8 +2692,8 @@ var Switch = React27.forwardRef(
|
|
|
2536
2692
|
)
|
|
2537
2693
|
}
|
|
2538
2694
|
),
|
|
2539
|
-
(label || description || error) && /* @__PURE__ */
|
|
2540
|
-
label && /* @__PURE__ */
|
|
2695
|
+
(label || description || error) && /* @__PURE__ */ jsxs21("div", { className: "flex flex-col leading-tight", children: [
|
|
2696
|
+
label && /* @__PURE__ */ jsx32(
|
|
2541
2697
|
"label",
|
|
2542
2698
|
{
|
|
2543
2699
|
htmlFor: id,
|
|
@@ -2545,7 +2701,7 @@ var Switch = React27.forwardRef(
|
|
|
2545
2701
|
children: label
|
|
2546
2702
|
}
|
|
2547
2703
|
),
|
|
2548
|
-
description && /* @__PURE__ */
|
|
2704
|
+
description && /* @__PURE__ */ jsx32(
|
|
2549
2705
|
"p",
|
|
2550
2706
|
{
|
|
2551
2707
|
id: descriptionId,
|
|
@@ -2553,7 +2709,7 @@ var Switch = React27.forwardRef(
|
|
|
2553
2709
|
children: description
|
|
2554
2710
|
}
|
|
2555
2711
|
),
|
|
2556
|
-
error && /* @__PURE__ */
|
|
2712
|
+
error && /* @__PURE__ */ jsx32(
|
|
2557
2713
|
"p",
|
|
2558
2714
|
{
|
|
2559
2715
|
id: errorId,
|
|
@@ -2568,9 +2724,9 @@ var Switch = React27.forwardRef(
|
|
|
2568
2724
|
Switch.displayName = "Switch";
|
|
2569
2725
|
|
|
2570
2726
|
// source/components/primitive/Text/text.tsx
|
|
2571
|
-
import * as
|
|
2727
|
+
import * as React30 from "react";
|
|
2572
2728
|
import { cva as cva10 } from "class-variance-authority";
|
|
2573
|
-
import { jsx as
|
|
2729
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
2574
2730
|
var textVariants = cva10("text-foreground", {
|
|
2575
2731
|
variants: {
|
|
2576
2732
|
element: {
|
|
@@ -2619,7 +2775,7 @@ var textVariants = cva10("text-foreground", {
|
|
|
2619
2775
|
tone: "default"
|
|
2620
2776
|
}
|
|
2621
2777
|
});
|
|
2622
|
-
var Text =
|
|
2778
|
+
var Text = React30.forwardRef(
|
|
2623
2779
|
({
|
|
2624
2780
|
element = "p",
|
|
2625
2781
|
size,
|
|
@@ -2632,7 +2788,7 @@ var Text = React28.forwardRef(
|
|
|
2632
2788
|
}, ref) => {
|
|
2633
2789
|
const Comp = element;
|
|
2634
2790
|
const variantElement = element === "div" ? "p" : element;
|
|
2635
|
-
return /* @__PURE__ */
|
|
2791
|
+
return /* @__PURE__ */ jsx33(
|
|
2636
2792
|
Comp,
|
|
2637
2793
|
{
|
|
2638
2794
|
ref,
|
|
@@ -2655,8 +2811,8 @@ var Text = React28.forwardRef(
|
|
|
2655
2811
|
Text.displayName = "Text";
|
|
2656
2812
|
|
|
2657
2813
|
// source/components/primitive/TextArea/textarea.tsx
|
|
2658
|
-
import * as
|
|
2659
|
-
import { jsx as
|
|
2814
|
+
import * as React31 from "react";
|
|
2815
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
2660
2816
|
var resizeClasses = {
|
|
2661
2817
|
none: "resize-none",
|
|
2662
2818
|
vertical: "resize-y",
|
|
@@ -2664,9 +2820,9 @@ var resizeClasses = {
|
|
|
2664
2820
|
both: "resize"
|
|
2665
2821
|
};
|
|
2666
2822
|
var layout = "block min-h-[120px] w-full min-w-0 px-4 py-2 text-sm md:text-base";
|
|
2667
|
-
var Textarea =
|
|
2823
|
+
var Textarea = React31.forwardRef(
|
|
2668
2824
|
({ className, error, resize = "vertical", ...props }, ref) => {
|
|
2669
|
-
return /* @__PURE__ */
|
|
2825
|
+
return /* @__PURE__ */ jsx34(
|
|
2670
2826
|
"textarea",
|
|
2671
2827
|
{
|
|
2672
2828
|
ref,
|
|
@@ -2688,7 +2844,7 @@ var Textarea = React29.forwardRef(
|
|
|
2688
2844
|
Textarea.displayName = "Textarea";
|
|
2689
2845
|
|
|
2690
2846
|
// source/components/primitive/FormField/form-field.tsx
|
|
2691
|
-
import { jsx as
|
|
2847
|
+
import { jsx as jsx35, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2692
2848
|
function stripThousands(s) {
|
|
2693
2849
|
return s.replace(/,/g, "");
|
|
2694
2850
|
}
|
|
@@ -2810,6 +2966,7 @@ function formFieldHasLabel(label) {
|
|
|
2810
2966
|
function FormField({
|
|
2811
2967
|
name,
|
|
2812
2968
|
label,
|
|
2969
|
+
labelTooltip,
|
|
2813
2970
|
register,
|
|
2814
2971
|
control,
|
|
2815
2972
|
rules,
|
|
@@ -2832,7 +2989,7 @@ function FormField({
|
|
|
2832
2989
|
className,
|
|
2833
2990
|
renderInput
|
|
2834
2991
|
}) {
|
|
2835
|
-
const generatedId =
|
|
2992
|
+
const generatedId = React32.useId();
|
|
2836
2993
|
const inputId = `field-${generatedId}`;
|
|
2837
2994
|
const descriptionId = description ? `${inputId}-description` : void 0;
|
|
2838
2995
|
const externalError = error ? String(error) : void 0;
|
|
@@ -2875,7 +3032,7 @@ function FormField({
|
|
|
2875
3032
|
);
|
|
2876
3033
|
}
|
|
2877
3034
|
if (control) {
|
|
2878
|
-
return /* @__PURE__ */
|
|
3035
|
+
return /* @__PURE__ */ jsx35(
|
|
2879
3036
|
Controller,
|
|
2880
3037
|
{
|
|
2881
3038
|
name,
|
|
@@ -2902,7 +3059,7 @@ function FormField({
|
|
|
2902
3059
|
onChange: field.onChange,
|
|
2903
3060
|
onBlur: field.onBlur,
|
|
2904
3061
|
ref: field.ref
|
|
2905
|
-
}) : /* @__PURE__ */
|
|
3062
|
+
}) : /* @__PURE__ */ jsx35(
|
|
2906
3063
|
FormFieldVariantControl,
|
|
2907
3064
|
{
|
|
2908
3065
|
variant,
|
|
@@ -2927,18 +3084,19 @@ function FormField({
|
|
|
2927
3084
|
maskInput: renderInput ? void 0 : maskInput
|
|
2928
3085
|
}
|
|
2929
3086
|
);
|
|
2930
|
-
const labelBlock = isCheckboxInline || !hasFieldLabel2 ? null : /* @__PURE__ */
|
|
3087
|
+
const labelBlock = isCheckboxInline || !hasFieldLabel2 ? null : /* @__PURE__ */ jsx35(
|
|
2931
3088
|
Label2,
|
|
2932
3089
|
{
|
|
2933
3090
|
id: variant === "radio" || variant === "richtext" ? legendId : void 0,
|
|
2934
3091
|
htmlFor: variant === "radio" || variant === "richtext" ? void 0 : inputId,
|
|
2935
3092
|
size: "sm",
|
|
2936
3093
|
required,
|
|
3094
|
+
tooltip: labelTooltip,
|
|
2937
3095
|
children: label
|
|
2938
3096
|
}
|
|
2939
3097
|
);
|
|
2940
|
-
const checkboxInline = isCheckboxInline ? hasFieldLabel2 ? /* @__PURE__ */
|
|
2941
|
-
/* @__PURE__ */
|
|
3098
|
+
const checkboxInline = isCheckboxInline ? hasFieldLabel2 ? /* @__PURE__ */ jsxs22("div", { className: "flex w-full min-w-0 items-start gap-2", children: [
|
|
3099
|
+
/* @__PURE__ */ jsx35(
|
|
2942
3100
|
Checkbox,
|
|
2943
3101
|
{
|
|
2944
3102
|
...checkboxProps,
|
|
@@ -2953,17 +3111,18 @@ function FormField({
|
|
|
2953
3111
|
"aria-invalid": hasError || void 0
|
|
2954
3112
|
}
|
|
2955
3113
|
),
|
|
2956
|
-
/* @__PURE__ */
|
|
3114
|
+
/* @__PURE__ */ jsx35(
|
|
2957
3115
|
Label2,
|
|
2958
3116
|
{
|
|
2959
3117
|
htmlFor: inputId,
|
|
2960
3118
|
required,
|
|
2961
3119
|
size: "sm",
|
|
3120
|
+
tooltip: labelTooltip,
|
|
2962
3121
|
className: "font-normal leading-snug",
|
|
2963
3122
|
children: label
|
|
2964
3123
|
}
|
|
2965
3124
|
)
|
|
2966
|
-
] }) : /* @__PURE__ */
|
|
3125
|
+
] }) : /* @__PURE__ */ jsx35(
|
|
2967
3126
|
Checkbox,
|
|
2968
3127
|
{
|
|
2969
3128
|
...checkboxProps,
|
|
@@ -2978,7 +3137,7 @@ function FormField({
|
|
|
2978
3137
|
"aria-invalid": hasError || void 0
|
|
2979
3138
|
}
|
|
2980
3139
|
) : null;
|
|
2981
|
-
return /* @__PURE__ */
|
|
3140
|
+
return /* @__PURE__ */ jsxs22(
|
|
2982
3141
|
"div",
|
|
2983
3142
|
{
|
|
2984
3143
|
className: cn(
|
|
@@ -2986,12 +3145,12 @@ function FormField({
|
|
|
2986
3145
|
className
|
|
2987
3146
|
),
|
|
2988
3147
|
children: [
|
|
2989
|
-
isCheckboxInline ? checkboxInline : /* @__PURE__ */
|
|
3148
|
+
isCheckboxInline ? checkboxInline : /* @__PURE__ */ jsxs22("div", { className: "flex w-full min-w-0 flex-col gap-1.5", children: [
|
|
2990
3149
|
labelBlock,
|
|
2991
3150
|
controlNode
|
|
2992
3151
|
] }),
|
|
2993
|
-
description && /* @__PURE__ */
|
|
2994
|
-
message && /* @__PURE__ */
|
|
3152
|
+
description && /* @__PURE__ */ jsx35(Text, { id: descriptionId, size: "sm", tone: "muted", children: description }),
|
|
3153
|
+
message && /* @__PURE__ */ jsx35(Text, { id: errorId, size: "sm", tone: "destructive", children: message })
|
|
2995
3154
|
]
|
|
2996
3155
|
}
|
|
2997
3156
|
);
|
|
@@ -3016,7 +3175,7 @@ function FormField({
|
|
|
3016
3175
|
"aria-describedby": describedBy,
|
|
3017
3176
|
error: Boolean(externalError),
|
|
3018
3177
|
...registered
|
|
3019
|
-
}) : variant === "textarea" ? /* @__PURE__ */
|
|
3178
|
+
}) : variant === "textarea" ? /* @__PURE__ */ jsx35(
|
|
3020
3179
|
Textarea,
|
|
3021
3180
|
{
|
|
3022
3181
|
id: inputId,
|
|
@@ -3025,7 +3184,7 @@ function FormField({
|
|
|
3025
3184
|
...textareaProps,
|
|
3026
3185
|
...registered
|
|
3027
3186
|
}
|
|
3028
|
-
) : /* @__PURE__ */
|
|
3187
|
+
) : /* @__PURE__ */ jsx35(
|
|
3029
3188
|
Input,
|
|
3030
3189
|
{
|
|
3031
3190
|
id: inputId,
|
|
@@ -3035,13 +3194,22 @@ function FormField({
|
|
|
3035
3194
|
...registered
|
|
3036
3195
|
}
|
|
3037
3196
|
);
|
|
3038
|
-
return /* @__PURE__ */
|
|
3039
|
-
hasFieldLabel ? /* @__PURE__ */
|
|
3040
|
-
/* @__PURE__ */
|
|
3197
|
+
return /* @__PURE__ */ jsxs22("div", { className: cn("mt-4 flex w-full min-w-0 flex-col gap-2", className), children: [
|
|
3198
|
+
hasFieldLabel ? /* @__PURE__ */ jsxs22("div", { className: "flex w-full min-w-0 flex-col gap-1.5", children: [
|
|
3199
|
+
/* @__PURE__ */ jsx35(
|
|
3200
|
+
Label2,
|
|
3201
|
+
{
|
|
3202
|
+
htmlFor: inputId,
|
|
3203
|
+
required,
|
|
3204
|
+
size: "sm",
|
|
3205
|
+
tooltip: labelTooltip,
|
|
3206
|
+
children: label
|
|
3207
|
+
}
|
|
3208
|
+
),
|
|
3041
3209
|
registeredControl
|
|
3042
|
-
] }) : /* @__PURE__ */
|
|
3043
|
-
description && /* @__PURE__ */
|
|
3044
|
-
externalError && /* @__PURE__ */
|
|
3210
|
+
] }) : /* @__PURE__ */ jsx35("div", { className: "w-full min-w-0", children: registeredControl }),
|
|
3211
|
+
description && /* @__PURE__ */ jsx35(Text, { id: descriptionId, size: "sm", tone: "muted", children: description }),
|
|
3212
|
+
externalError && /* @__PURE__ */ jsx35(Text, { id: `${inputId}-error`, size: "sm", tone: "destructive", children: externalError })
|
|
3045
3213
|
] });
|
|
3046
3214
|
}
|
|
3047
3215
|
function formValueToAsyncSelectOption(v) {
|
|
@@ -3079,7 +3247,7 @@ function FormFieldVariantControl({
|
|
|
3079
3247
|
}) {
|
|
3080
3248
|
switch (variant) {
|
|
3081
3249
|
case "textarea":
|
|
3082
|
-
return /* @__PURE__ */
|
|
3250
|
+
return /* @__PURE__ */ jsx35("div", { className: "w-full min-w-0", children: /* @__PURE__ */ jsx35(
|
|
3083
3251
|
Textarea,
|
|
3084
3252
|
{
|
|
3085
3253
|
...textareaProps,
|
|
@@ -3097,7 +3265,7 @@ function FormFieldVariantControl({
|
|
|
3097
3265
|
case "checkbox":
|
|
3098
3266
|
return null;
|
|
3099
3267
|
case "switch":
|
|
3100
|
-
return /* @__PURE__ */
|
|
3268
|
+
return /* @__PURE__ */ jsx35("div", { className: "w-full min-w-0", children: /* @__PURE__ */ jsx35(
|
|
3101
3269
|
Switch,
|
|
3102
3270
|
{
|
|
3103
3271
|
...switchProps,
|
|
@@ -3135,7 +3303,7 @@ function FormFieldVariantControl({
|
|
|
3135
3303
|
}
|
|
3136
3304
|
const value = field.value == null || field.value === "" ? void 0 : String(field.value);
|
|
3137
3305
|
if (searchable) {
|
|
3138
|
-
return /* @__PURE__ */
|
|
3306
|
+
return /* @__PURE__ */ jsx35("div", { className: "w-full min-w-0", children: /* @__PURE__ */ jsx35(
|
|
3139
3307
|
SearchableSelect,
|
|
3140
3308
|
{
|
|
3141
3309
|
items,
|
|
@@ -3160,7 +3328,7 @@ function FormFieldVariantControl({
|
|
|
3160
3328
|
}
|
|
3161
3329
|
) });
|
|
3162
3330
|
}
|
|
3163
|
-
return /* @__PURE__ */
|
|
3331
|
+
return /* @__PURE__ */ jsx35("div", { className: "w-full min-w-0", children: /* @__PURE__ */ jsxs22(
|
|
3164
3332
|
Select,
|
|
3165
3333
|
{
|
|
3166
3334
|
...selectRootRest,
|
|
@@ -3169,7 +3337,7 @@ function FormFieldVariantControl({
|
|
|
3169
3337
|
disabled: field.disabled,
|
|
3170
3338
|
name: field.name,
|
|
3171
3339
|
children: [
|
|
3172
|
-
/* @__PURE__ */
|
|
3340
|
+
/* @__PURE__ */ jsx35(
|
|
3173
3341
|
SelectTrigger,
|
|
3174
3342
|
{
|
|
3175
3343
|
id: inputId,
|
|
@@ -3181,10 +3349,10 @@ function FormFieldVariantControl({
|
|
|
3181
3349
|
triggerClassName
|
|
3182
3350
|
),
|
|
3183
3351
|
onBlur: field.onBlur,
|
|
3184
|
-
children: /* @__PURE__ */
|
|
3352
|
+
children: /* @__PURE__ */ jsx35(SelectValue, { placeholder })
|
|
3185
3353
|
}
|
|
3186
3354
|
),
|
|
3187
|
-
/* @__PURE__ */
|
|
3355
|
+
/* @__PURE__ */ jsx35(SelectContent, { className: contentClassName, children: items.map((item) => /* @__PURE__ */ jsx35(
|
|
3188
3356
|
SelectItem,
|
|
3189
3357
|
{
|
|
3190
3358
|
value: item.value,
|
|
@@ -3207,7 +3375,7 @@ function FormFieldVariantControl({
|
|
|
3207
3375
|
if (!asyncSelectProps?.labelKey) {
|
|
3208
3376
|
throw new Error('FormField variant "async-select" requires asyncSelectProps.labelKey.');
|
|
3209
3377
|
}
|
|
3210
|
-
return /* @__PURE__ */
|
|
3378
|
+
return /* @__PURE__ */ jsx35("div", { className: "w-full min-w-0", children: /* @__PURE__ */ jsx35(
|
|
3211
3379
|
AsyncSelect,
|
|
3212
3380
|
{
|
|
3213
3381
|
...asyncSelectProps,
|
|
@@ -3231,7 +3399,7 @@ function FormFieldVariantControl({
|
|
|
3231
3399
|
className: radioClassName,
|
|
3232
3400
|
...radioGroupRest
|
|
3233
3401
|
} = radioProps;
|
|
3234
|
-
return /* @__PURE__ */
|
|
3402
|
+
return /* @__PURE__ */ jsx35(
|
|
3235
3403
|
RadioGroup2,
|
|
3236
3404
|
{
|
|
3237
3405
|
...radioGroupRest,
|
|
@@ -3246,8 +3414,8 @@ function FormFieldVariantControl({
|
|
|
3246
3414
|
"aria-describedby": describedBy,
|
|
3247
3415
|
"aria-invalid": hasError || void 0,
|
|
3248
3416
|
ref: field.ref,
|
|
3249
|
-
children: options.map((opt) => /* @__PURE__ */
|
|
3250
|
-
/* @__PURE__ */
|
|
3417
|
+
children: options.map((opt) => /* @__PURE__ */ jsxs22("div", { className: "flex items-center gap-2", children: [
|
|
3418
|
+
/* @__PURE__ */ jsx35(
|
|
3251
3419
|
RadioGroupItem,
|
|
3252
3420
|
{
|
|
3253
3421
|
value: opt.value,
|
|
@@ -3255,7 +3423,7 @@ function FormFieldVariantControl({
|
|
|
3255
3423
|
disabled: opt.disabled
|
|
3256
3424
|
}
|
|
3257
3425
|
),
|
|
3258
|
-
/* @__PURE__ */
|
|
3426
|
+
/* @__PURE__ */ jsx35(
|
|
3259
3427
|
Label2,
|
|
3260
3428
|
{
|
|
3261
3429
|
htmlFor: opt.id ?? `${inputId}-${opt.value}`,
|
|
@@ -3274,7 +3442,7 @@ function FormFieldVariantControl({
|
|
|
3274
3442
|
}
|
|
3275
3443
|
const { maxLength, groups, containerClassName, ...otpRest } = otpProps;
|
|
3276
3444
|
const slotGroups = groups?.length ? groups : defaultOtpGroups(maxLength);
|
|
3277
|
-
return /* @__PURE__ */
|
|
3445
|
+
return /* @__PURE__ */ jsx35("div", { className: "w-full min-w-0", children: /* @__PURE__ */ jsx35(
|
|
3278
3446
|
InputOTP,
|
|
3279
3447
|
{
|
|
3280
3448
|
...otpRest,
|
|
@@ -3293,15 +3461,15 @@ function FormFieldVariantControl({
|
|
|
3293
3461
|
hasError && inputOtpContainerInvalid,
|
|
3294
3462
|
containerClassName
|
|
3295
3463
|
),
|
|
3296
|
-
children: slotGroups.map((indices, gi) => /* @__PURE__ */
|
|
3297
|
-
gi > 0 ? /* @__PURE__ */
|
|
3298
|
-
/* @__PURE__ */
|
|
3464
|
+
children: slotGroups.map((indices, gi) => /* @__PURE__ */ jsxs22(React32.Fragment, { children: [
|
|
3465
|
+
gi > 0 ? /* @__PURE__ */ jsx35(InputOTPSeparator, {}) : null,
|
|
3466
|
+
/* @__PURE__ */ jsx35(InputOTPGroup, { children: indices.map((index) => /* @__PURE__ */ jsx35(InputOTPSlot, { index }, index)) })
|
|
3299
3467
|
] }, gi))
|
|
3300
3468
|
}
|
|
3301
3469
|
) });
|
|
3302
3470
|
}
|
|
3303
3471
|
case "richtext":
|
|
3304
|
-
return /* @__PURE__ */
|
|
3472
|
+
return /* @__PURE__ */ jsx35(
|
|
3305
3473
|
"div",
|
|
3306
3474
|
{
|
|
3307
3475
|
className: "w-full min-w-0",
|
|
@@ -3311,7 +3479,7 @@ function FormFieldVariantControl({
|
|
|
3311
3479
|
"aria-describedby": describedBy,
|
|
3312
3480
|
"aria-invalid": hasError || void 0,
|
|
3313
3481
|
onBlur: field.onBlur,
|
|
3314
|
-
children: /* @__PURE__ */
|
|
3482
|
+
children: /* @__PURE__ */ jsx35(
|
|
3315
3483
|
RichTextEditor,
|
|
3316
3484
|
{
|
|
3317
3485
|
value: field.value ?? "",
|
|
@@ -3323,7 +3491,7 @@ function FormFieldVariantControl({
|
|
|
3323
3491
|
}
|
|
3324
3492
|
);
|
|
3325
3493
|
case "dropzone":
|
|
3326
|
-
return /* @__PURE__ */
|
|
3494
|
+
return /* @__PURE__ */ jsx35("div", { className: "w-full min-w-0", children: /* @__PURE__ */ jsx35(
|
|
3327
3495
|
FileDropzone,
|
|
3328
3496
|
{
|
|
3329
3497
|
...dropzoneProps,
|
|
@@ -3357,7 +3525,7 @@ function FormFieldVariantControl({
|
|
|
3357
3525
|
const pattern = maskInput.pattern;
|
|
3358
3526
|
const rawStored = field.value == null || field.value === "" ? "" : String(field.value);
|
|
3359
3527
|
const displayValue = formFieldMaskFormatDisplay(pattern, rawStored);
|
|
3360
|
-
return /* @__PURE__ */
|
|
3528
|
+
return /* @__PURE__ */ jsx35("div", { className: "w-full min-w-0", children: /* @__PURE__ */ jsx35(
|
|
3361
3529
|
Input,
|
|
3362
3530
|
{
|
|
3363
3531
|
...restInputProps,
|
|
@@ -3394,7 +3562,7 @@ function FormFieldVariantControl({
|
|
|
3394
3562
|
useGrouping
|
|
3395
3563
|
);
|
|
3396
3564
|
const defaultInputMode = allowDecimal ? "decimal" : "numeric";
|
|
3397
|
-
return /* @__PURE__ */
|
|
3565
|
+
return /* @__PURE__ */ jsx35("div", { className: "w-full min-w-0", children: /* @__PURE__ */ jsx35(
|
|
3398
3566
|
Input,
|
|
3399
3567
|
{
|
|
3400
3568
|
...restInputProps,
|
|
@@ -3418,7 +3586,7 @@ function FormFieldVariantControl({
|
|
|
3418
3586
|
}
|
|
3419
3587
|
) });
|
|
3420
3588
|
}
|
|
3421
|
-
return /* @__PURE__ */
|
|
3589
|
+
return /* @__PURE__ */ jsx35("div", { className: "w-full min-w-0", children: /* @__PURE__ */ jsx35(
|
|
3422
3590
|
Input,
|
|
3423
3591
|
{
|
|
3424
3592
|
...restInputProps,
|
|
@@ -3443,9 +3611,9 @@ function FormFieldVariantControl({
|
|
|
3443
3611
|
}
|
|
3444
3612
|
|
|
3445
3613
|
// source/components/primitive/Heading/heading.tsx
|
|
3446
|
-
import * as
|
|
3614
|
+
import * as React33 from "react";
|
|
3447
3615
|
import { cva as cva11 } from "class-variance-authority";
|
|
3448
|
-
import { jsx as
|
|
3616
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
3449
3617
|
var headingVariants = cva11(
|
|
3450
3618
|
"text-foreground tracking-tight",
|
|
3451
3619
|
{
|
|
@@ -3511,7 +3679,7 @@ var headingVariants = cva11(
|
|
|
3511
3679
|
}
|
|
3512
3680
|
}
|
|
3513
3681
|
);
|
|
3514
|
-
var Heading =
|
|
3682
|
+
var Heading = React33.forwardRef(
|
|
3515
3683
|
({
|
|
3516
3684
|
level = 1,
|
|
3517
3685
|
size,
|
|
@@ -3524,7 +3692,7 @@ var Heading = React31.forwardRef(
|
|
|
3524
3692
|
...props
|
|
3525
3693
|
}, ref) => {
|
|
3526
3694
|
const Tag = `h${level}`;
|
|
3527
|
-
return /* @__PURE__ */
|
|
3695
|
+
return /* @__PURE__ */ jsx36(
|
|
3528
3696
|
Tag,
|
|
3529
3697
|
{
|
|
3530
3698
|
ref,
|
|
@@ -3540,10 +3708,10 @@ var Heading = React31.forwardRef(
|
|
|
3540
3708
|
Heading.displayName = "Heading";
|
|
3541
3709
|
|
|
3542
3710
|
// source/components/primitive/InputGroup/input-group.tsx
|
|
3543
|
-
import * as
|
|
3544
|
-
import { jsx as
|
|
3545
|
-
var InputGroup =
|
|
3546
|
-
({ className, error, children, ...props }, ref) => /* @__PURE__ */
|
|
3711
|
+
import * as React34 from "react";
|
|
3712
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
3713
|
+
var InputGroup = React34.forwardRef(
|
|
3714
|
+
({ className, error, children, ...props }, ref) => /* @__PURE__ */ jsx37(
|
|
3547
3715
|
"div",
|
|
3548
3716
|
{
|
|
3549
3717
|
ref,
|
|
@@ -3561,7 +3729,7 @@ var InputGroup = React32.forwardRef(
|
|
|
3561
3729
|
)
|
|
3562
3730
|
);
|
|
3563
3731
|
InputGroup.displayName = "InputGroup";
|
|
3564
|
-
var InputGroupIcon =
|
|
3732
|
+
var InputGroupIcon = React34.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx37(
|
|
3565
3733
|
"span",
|
|
3566
3734
|
{
|
|
3567
3735
|
ref,
|
|
@@ -3574,8 +3742,8 @@ var InputGroupIcon = React32.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
3574
3742
|
}
|
|
3575
3743
|
));
|
|
3576
3744
|
InputGroupIcon.displayName = "InputGroupIcon";
|
|
3577
|
-
var InputGroupInput =
|
|
3578
|
-
({ className, type, ...props }, ref) => /* @__PURE__ */
|
|
3745
|
+
var InputGroupInput = React34.forwardRef(
|
|
3746
|
+
({ className, type, ...props }, ref) => /* @__PURE__ */ jsx37(
|
|
3579
3747
|
"input",
|
|
3580
3748
|
{
|
|
3581
3749
|
ref,
|
|
@@ -3594,10 +3762,10 @@ InputGroupInput.displayName = "InputGroupInput";
|
|
|
3594
3762
|
var inputGroupSelectTriggerTextAlignClass = "pl-12";
|
|
3595
3763
|
|
|
3596
3764
|
// source/components/primitive/Pagination/pagination.tsx
|
|
3597
|
-
import * as
|
|
3765
|
+
import * as React35 from "react";
|
|
3598
3766
|
import { ChevronLeft, ChevronRight as ChevronRight2, MoreHorizontal } from "lucide-react";
|
|
3599
|
-
import { jsx as
|
|
3600
|
-
var Pagination = ({ className, ...props }) => /* @__PURE__ */
|
|
3767
|
+
import { jsx as jsx38, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3768
|
+
var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsx38(
|
|
3601
3769
|
"nav",
|
|
3602
3770
|
{
|
|
3603
3771
|
role: "navigation",
|
|
@@ -3607,7 +3775,7 @@ var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsx36(
|
|
|
3607
3775
|
}
|
|
3608
3776
|
);
|
|
3609
3777
|
Pagination.displayName = "Pagination";
|
|
3610
|
-
var PaginationContent =
|
|
3778
|
+
var PaginationContent = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
|
|
3611
3779
|
"ul",
|
|
3612
3780
|
{
|
|
3613
3781
|
ref,
|
|
@@ -3616,14 +3784,14 @@ var PaginationContent = React33.forwardRef(({ className, ...props }, ref) => /*
|
|
|
3616
3784
|
}
|
|
3617
3785
|
));
|
|
3618
3786
|
PaginationContent.displayName = "PaginationContent";
|
|
3619
|
-
var PaginationItem =
|
|
3787
|
+
var PaginationItem = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx38("li", { ref, className: cn("", className), ...props }));
|
|
3620
3788
|
PaginationItem.displayName = "PaginationItem";
|
|
3621
3789
|
var PaginationLink = ({
|
|
3622
3790
|
className,
|
|
3623
3791
|
isActive,
|
|
3624
3792
|
size = "icon",
|
|
3625
3793
|
...props
|
|
3626
|
-
}) => /* @__PURE__ */
|
|
3794
|
+
}) => /* @__PURE__ */ jsx38(
|
|
3627
3795
|
"a",
|
|
3628
3796
|
{
|
|
3629
3797
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -3641,7 +3809,7 @@ PaginationLink.displayName = "PaginationLink";
|
|
|
3641
3809
|
var PaginationPrevious = ({
|
|
3642
3810
|
className,
|
|
3643
3811
|
...props
|
|
3644
|
-
}) => /* @__PURE__ */
|
|
3812
|
+
}) => /* @__PURE__ */ jsxs23(
|
|
3645
3813
|
PaginationLink,
|
|
3646
3814
|
{
|
|
3647
3815
|
"aria-label": "Go to previous page",
|
|
@@ -3649,8 +3817,8 @@ var PaginationPrevious = ({
|
|
|
3649
3817
|
size: "default",
|
|
3650
3818
|
...props,
|
|
3651
3819
|
children: [
|
|
3652
|
-
/* @__PURE__ */
|
|
3653
|
-
/* @__PURE__ */
|
|
3820
|
+
/* @__PURE__ */ jsx38(ChevronLeft, { className: "h-4 w-4" }),
|
|
3821
|
+
/* @__PURE__ */ jsx38("span", { children: "Previous" })
|
|
3654
3822
|
]
|
|
3655
3823
|
}
|
|
3656
3824
|
);
|
|
@@ -3658,7 +3826,7 @@ PaginationPrevious.displayName = "PaginationPrevious";
|
|
|
3658
3826
|
var PaginationNext = ({
|
|
3659
3827
|
className,
|
|
3660
3828
|
...props
|
|
3661
|
-
}) => /* @__PURE__ */
|
|
3829
|
+
}) => /* @__PURE__ */ jsxs23(
|
|
3662
3830
|
PaginationLink,
|
|
3663
3831
|
{
|
|
3664
3832
|
"aria-label": "Go to next page",
|
|
@@ -3666,8 +3834,8 @@ var PaginationNext = ({
|
|
|
3666
3834
|
size: "default",
|
|
3667
3835
|
...props,
|
|
3668
3836
|
children: [
|
|
3669
|
-
/* @__PURE__ */
|
|
3670
|
-
/* @__PURE__ */
|
|
3837
|
+
/* @__PURE__ */ jsx38("span", { children: "Next" }),
|
|
3838
|
+
/* @__PURE__ */ jsx38(ChevronRight2, { className: "h-4 w-4" })
|
|
3671
3839
|
]
|
|
3672
3840
|
}
|
|
3673
3841
|
);
|
|
@@ -3675,31 +3843,31 @@ PaginationNext.displayName = "PaginationNext";
|
|
|
3675
3843
|
var PaginationEllipsis = ({
|
|
3676
3844
|
className,
|
|
3677
3845
|
...props
|
|
3678
|
-
}) => /* @__PURE__ */
|
|
3846
|
+
}) => /* @__PURE__ */ jsxs23(
|
|
3679
3847
|
"span",
|
|
3680
3848
|
{
|
|
3681
3849
|
"aria-hidden": true,
|
|
3682
3850
|
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
3683
3851
|
...props,
|
|
3684
3852
|
children: [
|
|
3685
|
-
/* @__PURE__ */
|
|
3686
|
-
/* @__PURE__ */
|
|
3853
|
+
/* @__PURE__ */ jsx38(MoreHorizontal, { className: "h-4 w-4" }),
|
|
3854
|
+
/* @__PURE__ */ jsx38("span", { className: "sr-only", children: "More pages" })
|
|
3687
3855
|
]
|
|
3688
3856
|
}
|
|
3689
3857
|
);
|
|
3690
3858
|
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
3691
3859
|
|
|
3692
3860
|
// source/components/primitive/Progress/progress.tsx
|
|
3693
|
-
import * as
|
|
3861
|
+
import * as React36 from "react";
|
|
3694
3862
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
3695
|
-
import { jsx as
|
|
3863
|
+
import { jsx as jsx39, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3696
3864
|
var variantStyles = {
|
|
3697
3865
|
default: "bg-primary",
|
|
3698
3866
|
success: "bg-green-500",
|
|
3699
3867
|
warning: "bg-yellow-500",
|
|
3700
3868
|
error: "bg-red-500"
|
|
3701
3869
|
};
|
|
3702
|
-
var Progress =
|
|
3870
|
+
var Progress = React36.forwardRef(
|
|
3703
3871
|
({
|
|
3704
3872
|
className,
|
|
3705
3873
|
value = 0,
|
|
@@ -3713,15 +3881,15 @@ var Progress = React34.forwardRef(
|
|
|
3713
3881
|
const safeMax = max > 0 ? max : 100;
|
|
3714
3882
|
const safeValue = Math.min(Math.max(value, 0), safeMax);
|
|
3715
3883
|
const percentage = Math.min(safeValue / safeMax * 100, 100);
|
|
3716
|
-
return /* @__PURE__ */
|
|
3717
|
-
(label || showValue) && /* @__PURE__ */
|
|
3718
|
-
label && /* @__PURE__ */
|
|
3719
|
-
showValue && !indeterminate && /* @__PURE__ */
|
|
3884
|
+
return /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-1", children: [
|
|
3885
|
+
(label || showValue) && /* @__PURE__ */ jsxs24("div", { className: "flex items-center justify-between", children: [
|
|
3886
|
+
label && /* @__PURE__ */ jsx39("span", { className: "text-sm font-medium", children: label }),
|
|
3887
|
+
showValue && !indeterminate && /* @__PURE__ */ jsxs24("span", { className: "text-xs text-muted-foreground", children: [
|
|
3720
3888
|
Math.round(percentage),
|
|
3721
3889
|
"%"
|
|
3722
3890
|
] })
|
|
3723
3891
|
] }),
|
|
3724
|
-
/* @__PURE__ */
|
|
3892
|
+
/* @__PURE__ */ jsx39(
|
|
3725
3893
|
ProgressPrimitive.Root,
|
|
3726
3894
|
{
|
|
3727
3895
|
ref,
|
|
@@ -3734,7 +3902,7 @@ var Progress = React34.forwardRef(
|
|
|
3734
3902
|
"aria-valuemax": safeMax,
|
|
3735
3903
|
"aria-valuenow": indeterminate ? void 0 : safeValue,
|
|
3736
3904
|
...props,
|
|
3737
|
-
children: /* @__PURE__ */
|
|
3905
|
+
children: /* @__PURE__ */ jsx39(
|
|
3738
3906
|
ProgressPrimitive.Indicator,
|
|
3739
3907
|
{
|
|
3740
3908
|
className: cn(
|
|
@@ -3754,94 +3922,25 @@ var Progress = React34.forwardRef(
|
|
|
3754
3922
|
);
|
|
3755
3923
|
Progress.displayName = "Progress";
|
|
3756
3924
|
|
|
3757
|
-
// source/components/primitive/RichHtml/rich-html.tsx
|
|
3758
|
-
import * as React35 from "react";
|
|
3759
|
-
import DOMPurify from "dompurify";
|
|
3760
|
-
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
3761
|
-
var defaultSanitizeConfig = {
|
|
3762
|
-
USE_PROFILES: { html: true }
|
|
3763
|
-
};
|
|
3764
|
-
var richHtmlChrome = cn(
|
|
3765
|
-
"max-w-none text-base leading-relaxed text-foreground",
|
|
3766
|
-
// Block flow
|
|
3767
|
-
"[&_p]:mb-3 [&_p:last-child]:mb-0 [&_blockquote]:my-4 [&_blockquote]:border-l-2 [&_blockquote]:border-muted [&_blockquote]:pl-4 [&_blockquote]:italic",
|
|
3768
|
-
// Lists
|
|
3769
|
-
"[&_ul]:my-3 [&_ul]:list-disc [&_ul]:pl-6 [&_ol]:my-3 [&_ol]:list-decimal [&_ol]:pl-6 [&_li]:my-1 [&_li]:pl-1",
|
|
3770
|
-
// Headings (common for TipTap / CMS output)
|
|
3771
|
-
"[&_h1]:mb-3 [&_h1]:mt-8 [&_h1]:text-3xl [&_h1]:font-semibold [&_h1]:first:mt-0",
|
|
3772
|
-
"[&_h2]:mb-2 [&_h2]:mt-6 [&_h2]:text-2xl [&_h2]:font-semibold [&_h2]:first:mt-0",
|
|
3773
|
-
"[&_h3]:mb-2 [&_h3]:mt-5 [&_h3]:text-xl [&_h3]:font-semibold [&_h3]:first:mt-0",
|
|
3774
|
-
"[&_h4]:mb-2 [&_h4]:mt-4 [&_h4]:text-lg [&_h4]:font-semibold [&_h4]:first:mt-0",
|
|
3775
|
-
// Links & media
|
|
3776
|
-
"[&_a]:text-primary [&_a]:underline [&_a]:underline-offset-2 [&_a]:outline-none [&_a]:focus-visible:ring-2 [&_a]:focus-visible:ring-ring [&_a]:focus-visible:ring-offset-2",
|
|
3777
|
-
"[&_img]:my-4 [&_img]:max-h-[min(480px,70vh)] [&_img]:max-w-full [&_img]:rounded-md [&_img]:object-contain",
|
|
3778
|
-
"[&_hr]:my-6 [&_hr]:border-border",
|
|
3779
|
-
// Code
|
|
3780
|
-
"[&_code]:rounded [&_code]:bg-muted [&_code]:px-1 [&_code]:py-0.5 [&_code]:text-[0.9em]",
|
|
3781
|
-
"[&_pre]:my-4 [&_pre]:overflow-x-auto [&_pre]:rounded-md [&_pre]:bg-muted [&_pre]:p-3 [&_pre]:font-mono [&_pre]:text-sm"
|
|
3782
|
-
);
|
|
3783
|
-
var RichHtml = React35.forwardRef(
|
|
3784
|
-
({
|
|
3785
|
-
html,
|
|
3786
|
-
sanitize = true,
|
|
3787
|
-
sanitizeConfig,
|
|
3788
|
-
className,
|
|
3789
|
-
suppressHydrationWarning,
|
|
3790
|
-
...props
|
|
3791
|
-
}, ref) => {
|
|
3792
|
-
const markup = React35.useMemo(() => {
|
|
3793
|
-
if (html === void 0 || html === null || html === "") {
|
|
3794
|
-
return "";
|
|
3795
|
-
}
|
|
3796
|
-
if (!sanitize) {
|
|
3797
|
-
return html;
|
|
3798
|
-
}
|
|
3799
|
-
if (typeof window === "undefined") {
|
|
3800
|
-
return "";
|
|
3801
|
-
}
|
|
3802
|
-
const config = {
|
|
3803
|
-
...defaultSanitizeConfig,
|
|
3804
|
-
...sanitizeConfig
|
|
3805
|
-
};
|
|
3806
|
-
return DOMPurify.sanitize(html, config);
|
|
3807
|
-
}, [html, sanitize, sanitizeConfig]);
|
|
3808
|
-
const resolvedSuppressHydration = suppressHydrationWarning ?? sanitize;
|
|
3809
|
-
if (html === void 0 || html === null || html === "") {
|
|
3810
|
-
return null;
|
|
3811
|
-
}
|
|
3812
|
-
return /* @__PURE__ */ jsx38(
|
|
3813
|
-
"div",
|
|
3814
|
-
{
|
|
3815
|
-
ref,
|
|
3816
|
-
suppressHydrationWarning: resolvedSuppressHydration,
|
|
3817
|
-
className: cn(richHtmlChrome, className),
|
|
3818
|
-
...props,
|
|
3819
|
-
dangerouslySetInnerHTML: { __html: markup }
|
|
3820
|
-
}
|
|
3821
|
-
);
|
|
3822
|
-
}
|
|
3823
|
-
);
|
|
3824
|
-
RichHtml.displayName = "RichHtml";
|
|
3825
|
-
|
|
3826
3925
|
// source/components/primitive/ScrollArea/scroll-area.tsx
|
|
3827
|
-
import * as
|
|
3926
|
+
import * as React37 from "react";
|
|
3828
3927
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
3829
|
-
import { jsx as
|
|
3830
|
-
var ScrollArea =
|
|
3928
|
+
import { jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3929
|
+
var ScrollArea = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs25(
|
|
3831
3930
|
ScrollAreaPrimitive.Root,
|
|
3832
3931
|
{
|
|
3833
3932
|
ref,
|
|
3834
3933
|
className: cn("relative overflow-hidden", className),
|
|
3835
3934
|
...props,
|
|
3836
3935
|
children: [
|
|
3837
|
-
/* @__PURE__ */
|
|
3838
|
-
/* @__PURE__ */
|
|
3839
|
-
/* @__PURE__ */
|
|
3936
|
+
/* @__PURE__ */ jsx40(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
|
|
3937
|
+
/* @__PURE__ */ jsx40(ScrollBar, {}),
|
|
3938
|
+
/* @__PURE__ */ jsx40(ScrollAreaPrimitive.Corner, {})
|
|
3840
3939
|
]
|
|
3841
3940
|
}
|
|
3842
3941
|
));
|
|
3843
3942
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
3844
|
-
var ScrollBar =
|
|
3943
|
+
var ScrollBar = React37.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx40(
|
|
3845
3944
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
3846
3945
|
{
|
|
3847
3946
|
ref,
|
|
@@ -3853,16 +3952,16 @@ var ScrollBar = React36.forwardRef(({ className, orientation = "vertical", ...pr
|
|
|
3853
3952
|
className
|
|
3854
3953
|
),
|
|
3855
3954
|
...props,
|
|
3856
|
-
children: /* @__PURE__ */
|
|
3955
|
+
children: /* @__PURE__ */ jsx40(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
3857
3956
|
}
|
|
3858
3957
|
));
|
|
3859
3958
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
3860
3959
|
|
|
3861
3960
|
// source/components/primitive/Separator/separator.tsx
|
|
3862
|
-
import * as
|
|
3961
|
+
import * as React38 from "react";
|
|
3863
3962
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
3864
3963
|
import { cva as cva12 } from "class-variance-authority";
|
|
3865
|
-
import { jsx as
|
|
3964
|
+
import { jsx as jsx41, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3866
3965
|
var separatorVariants = cva12("shrink-0", {
|
|
3867
3966
|
variants: {
|
|
3868
3967
|
orientation: {
|
|
@@ -3880,7 +3979,7 @@ var separatorVariants = cva12("shrink-0", {
|
|
|
3880
3979
|
line: "solid"
|
|
3881
3980
|
}
|
|
3882
3981
|
});
|
|
3883
|
-
var Separator3 =
|
|
3982
|
+
var Separator3 = React38.forwardRef(
|
|
3884
3983
|
({
|
|
3885
3984
|
className,
|
|
3886
3985
|
orientation = "horizontal",
|
|
@@ -3892,13 +3991,13 @@ var Separator3 = React37.forwardRef(
|
|
|
3892
3991
|
}, ref) => {
|
|
3893
3992
|
const line = lineProp ?? variant ?? "solid";
|
|
3894
3993
|
if (label && orientation === "horizontal") {
|
|
3895
|
-
return /* @__PURE__ */
|
|
3994
|
+
return /* @__PURE__ */ jsxs26(
|
|
3896
3995
|
"div",
|
|
3897
3996
|
{
|
|
3898
3997
|
role: "separator",
|
|
3899
3998
|
className: "flex items-center gap-3",
|
|
3900
3999
|
children: [
|
|
3901
|
-
/* @__PURE__ */
|
|
4000
|
+
/* @__PURE__ */ jsx41(
|
|
3902
4001
|
"div",
|
|
3903
4002
|
{
|
|
3904
4003
|
className: cn(
|
|
@@ -3907,8 +4006,8 @@ var Separator3 = React37.forwardRef(
|
|
|
3907
4006
|
)
|
|
3908
4007
|
}
|
|
3909
4008
|
),
|
|
3910
|
-
/* @__PURE__ */
|
|
3911
|
-
/* @__PURE__ */
|
|
4009
|
+
/* @__PURE__ */ jsx41("span", { className: "text-xs text-muted-foreground whitespace-nowrap", children: label }),
|
|
4010
|
+
/* @__PURE__ */ jsx41(
|
|
3912
4011
|
"div",
|
|
3913
4012
|
{
|
|
3914
4013
|
className: cn(
|
|
@@ -3921,7 +4020,7 @@ var Separator3 = React37.forwardRef(
|
|
|
3921
4020
|
}
|
|
3922
4021
|
);
|
|
3923
4022
|
}
|
|
3924
|
-
return /* @__PURE__ */
|
|
4023
|
+
return /* @__PURE__ */ jsx41(
|
|
3925
4024
|
SeparatorPrimitive.Root,
|
|
3926
4025
|
{
|
|
3927
4026
|
ref,
|
|
@@ -3939,16 +4038,16 @@ var Separator3 = React37.forwardRef(
|
|
|
3939
4038
|
Separator3.displayName = "Separator";
|
|
3940
4039
|
|
|
3941
4040
|
// source/components/primitive/Sheet/sheet.tsx
|
|
3942
|
-
import * as
|
|
4041
|
+
import * as React39 from "react";
|
|
3943
4042
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
3944
4043
|
import { cva as cva13 } from "class-variance-authority";
|
|
3945
4044
|
import { X as X2 } from "lucide-react";
|
|
3946
|
-
import { jsx as
|
|
4045
|
+
import { jsx as jsx42, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3947
4046
|
var Sheet = SheetPrimitive.Root;
|
|
3948
4047
|
var SheetTrigger = SheetPrimitive.Trigger;
|
|
3949
4048
|
var SheetClose = SheetPrimitive.Close;
|
|
3950
4049
|
var SheetPortal = SheetPrimitive.Portal;
|
|
3951
|
-
var SheetOverlay =
|
|
4050
|
+
var SheetOverlay = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx42(
|
|
3952
4051
|
SheetPrimitive.Overlay,
|
|
3953
4052
|
{
|
|
3954
4053
|
className: cn(
|
|
@@ -3976,9 +4075,9 @@ var sheetVariants = cva13(
|
|
|
3976
4075
|
}
|
|
3977
4076
|
}
|
|
3978
4077
|
);
|
|
3979
|
-
var SheetContent =
|
|
3980
|
-
/* @__PURE__ */
|
|
3981
|
-
/* @__PURE__ */
|
|
4078
|
+
var SheetContent = React39.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs27(SheetPortal, { children: [
|
|
4079
|
+
/* @__PURE__ */ jsx42(SheetOverlay, {}),
|
|
4080
|
+
/* @__PURE__ */ jsxs27(
|
|
3982
4081
|
SheetPrimitive.Content,
|
|
3983
4082
|
{
|
|
3984
4083
|
ref,
|
|
@@ -3986,9 +4085,9 @@ var SheetContent = React38.forwardRef(({ side = "right", className, children, ..
|
|
|
3986
4085
|
...props,
|
|
3987
4086
|
children: [
|
|
3988
4087
|
children,
|
|
3989
|
-
/* @__PURE__ */
|
|
3990
|
-
/* @__PURE__ */
|
|
3991
|
-
/* @__PURE__ */
|
|
4088
|
+
/* @__PURE__ */ jsxs27(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
4089
|
+
/* @__PURE__ */ jsx42(X2, { className: "h-4 w-4" }),
|
|
4090
|
+
/* @__PURE__ */ jsx42("span", { className: "sr-only", children: "Close" })
|
|
3992
4091
|
] })
|
|
3993
4092
|
]
|
|
3994
4093
|
}
|
|
@@ -3998,7 +4097,7 @@ SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
|
3998
4097
|
var SheetHeader = ({
|
|
3999
4098
|
className,
|
|
4000
4099
|
...props
|
|
4001
|
-
}) => /* @__PURE__ */
|
|
4100
|
+
}) => /* @__PURE__ */ jsx42(
|
|
4002
4101
|
"div",
|
|
4003
4102
|
{
|
|
4004
4103
|
className: cn(
|
|
@@ -4012,7 +4111,7 @@ SheetHeader.displayName = "SheetHeader";
|
|
|
4012
4111
|
var SheetFooter = ({
|
|
4013
4112
|
className,
|
|
4014
4113
|
...props
|
|
4015
|
-
}) => /* @__PURE__ */
|
|
4114
|
+
}) => /* @__PURE__ */ jsx42(
|
|
4016
4115
|
"div",
|
|
4017
4116
|
{
|
|
4018
4117
|
className: cn(
|
|
@@ -4023,7 +4122,7 @@ var SheetFooter = ({
|
|
|
4023
4122
|
}
|
|
4024
4123
|
);
|
|
4025
4124
|
SheetFooter.displayName = "SheetFooter";
|
|
4026
|
-
var SheetTitle =
|
|
4125
|
+
var SheetTitle = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx42(
|
|
4027
4126
|
SheetPrimitive.Title,
|
|
4028
4127
|
{
|
|
4029
4128
|
ref,
|
|
@@ -4032,7 +4131,7 @@ var SheetTitle = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
4032
4131
|
}
|
|
4033
4132
|
));
|
|
4034
4133
|
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
4035
|
-
var SheetDescription =
|
|
4134
|
+
var SheetDescription = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx42(
|
|
4036
4135
|
SheetPrimitive.Description,
|
|
4037
4136
|
{
|
|
4038
4137
|
ref,
|
|
@@ -4049,13 +4148,13 @@ import { cva as cva15 } from "class-variance-authority";
|
|
|
4049
4148
|
import { PanelLeft } from "lucide-react";
|
|
4050
4149
|
|
|
4051
4150
|
// source/hooks/use-mobile.ts
|
|
4052
|
-
import * as
|
|
4151
|
+
import * as React40 from "react";
|
|
4053
4152
|
var MOBILE_MAX = 768;
|
|
4054
4153
|
function useIsMobile(breakpoint = MOBILE_MAX) {
|
|
4055
|
-
const [isMobile, setIsMobile] =
|
|
4154
|
+
const [isMobile, setIsMobile] = React40.useState(
|
|
4056
4155
|
() => typeof window !== "undefined" ? window.innerWidth < breakpoint : false
|
|
4057
4156
|
);
|
|
4058
|
-
|
|
4157
|
+
React40.useEffect(() => {
|
|
4059
4158
|
const mq = window.matchMedia(`(max-width: ${breakpoint - 1}px)`);
|
|
4060
4159
|
const onChange = () => setIsMobile(mq.matches);
|
|
4061
4160
|
onChange();
|
|
@@ -4066,9 +4165,9 @@ function useIsMobile(breakpoint = MOBILE_MAX) {
|
|
|
4066
4165
|
}
|
|
4067
4166
|
|
|
4068
4167
|
// source/components/primitive/Skeleton/skeleton.tsx
|
|
4069
|
-
import * as
|
|
4168
|
+
import * as React41 from "react";
|
|
4070
4169
|
import { cva as cva14 } from "class-variance-authority";
|
|
4071
|
-
import { jsx as
|
|
4170
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
4072
4171
|
var skeletonVariants = cva14(
|
|
4073
4172
|
"animate-pulse bg-muted",
|
|
4074
4173
|
{
|
|
@@ -4085,9 +4184,9 @@ var skeletonVariants = cva14(
|
|
|
4085
4184
|
}
|
|
4086
4185
|
}
|
|
4087
4186
|
);
|
|
4088
|
-
var Skeleton =
|
|
4187
|
+
var Skeleton = React41.forwardRef(
|
|
4089
4188
|
({ className, rounded, ...props }, ref) => {
|
|
4090
|
-
return /* @__PURE__ */
|
|
4189
|
+
return /* @__PURE__ */ jsx43(
|
|
4091
4190
|
"div",
|
|
4092
4191
|
{
|
|
4093
4192
|
ref,
|
|
@@ -4101,43 +4200,6 @@ var Skeleton = React40.forwardRef(
|
|
|
4101
4200
|
);
|
|
4102
4201
|
Skeleton.displayName = "Skeleton";
|
|
4103
4202
|
|
|
4104
|
-
// source/components/primitive/ToolTip/tooltip.tsx
|
|
4105
|
-
import * as React41 from "react";
|
|
4106
|
-
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
4107
|
-
import { jsx as jsx43, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
4108
|
-
var TooltipProvider = TooltipPrimitive.Provider;
|
|
4109
|
-
var Tooltip = ({ ...props }) => {
|
|
4110
|
-
return /* @__PURE__ */ jsx43(TooltipPrimitive.Root, { ...props });
|
|
4111
|
-
};
|
|
4112
|
-
Tooltip.displayName = "Tooltip";
|
|
4113
|
-
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
4114
|
-
TooltipTrigger.displayName = "TooltipTrigger";
|
|
4115
|
-
var TooltipContent = React41.forwardRef(({ className, sideOffset = 4, arrow = false, children, ...props }, ref) => {
|
|
4116
|
-
return /* @__PURE__ */ jsx43(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs27(
|
|
4117
|
-
TooltipPrimitive.Content,
|
|
4118
|
-
{
|
|
4119
|
-
ref,
|
|
4120
|
-
sideOffset,
|
|
4121
|
-
className: cn(
|
|
4122
|
-
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md",
|
|
4123
|
-
"animate-in fade-in-0 zoom-in-95",
|
|
4124
|
-
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
4125
|
-
"data-[side=bottom]:slide-in-from-top-2",
|
|
4126
|
-
"data-[side=left]:slide-in-from-right-2",
|
|
4127
|
-
"data-[side=right]:slide-in-from-left-2",
|
|
4128
|
-
"data-[side=top]:slide-in-from-bottom-2",
|
|
4129
|
-
className
|
|
4130
|
-
),
|
|
4131
|
-
...props,
|
|
4132
|
-
children: [
|
|
4133
|
-
children,
|
|
4134
|
-
arrow && /* @__PURE__ */ jsx43(TooltipPrimitive.Arrow, { className: "fill-popover" })
|
|
4135
|
-
]
|
|
4136
|
-
}
|
|
4137
|
-
) });
|
|
4138
|
-
});
|
|
4139
|
-
TooltipContent.displayName = "TooltipContent";
|
|
4140
|
-
|
|
4141
4203
|
// source/components/primitive/Sidebar/sidebar.tsx
|
|
4142
4204
|
import { jsx as jsx44, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
4143
4205
|
var SIDEBAR_COOKIE_NAME = "sidebar:state";
|