@pos-360/horizon 0.27.0 → 0.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/utils/cn.ts","../src/utils/merge-refs.ts","../src/components/primitives/badge/badge.tsx","../src/components/primitives/typography/label.tsx","../src/components/primitives/tooltip/tooltip.tsx","../src/components/primitives/typography/heading.tsx","../src/components/primitives/typography/text.tsx","../src/components/primitives/typography/caption.tsx","../src/components/primitives/typography/code.tsx"],"names":["cva","React2","jsx","React3","React4","React5","React6","React7"],"mappings":";;;;;;;;;;AAGA,IAAM,UAAU,mBAAA,CAAoB;AAAA,EAClC,MAAA,EAAQ;AAAA,IACN,WAAA,EAAa;AAAA,MACX,OAAA,EAAS,CAAC,EAAE,YAAA,EAAc,CAAC,MAAM,IAAA,EAAM,IAAA,EAAM,MAAM,CAAA,EAAG;AAAA;AACxD;AAEJ,CAAC,CAAA;AAEM,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;;;ACXO,SAAS,aACX,IAAA,EACmB;AACtB,EAAA,OAAO,CAAC,IAAA,KAAmB;AACzB,IAAA,KAAA,MAAW,OAAO,IAAA,EAAM;AACtB,MAAA,IAAI,OAAO,GAAA,KAAQ,UAAA,EAAY,GAAA,CAAI,IAAI,CAAA;AAAA,WAAA,IAC9B,GAAA,IAAO,OAAO,GAAA,KAAQ,QAAA;AAC7B,QAAC,IAAyC,OAAA,GAAU,IAAA;AAAA,IACxD;AAAA,EACF,CAAA;AACF;ACPA,IAAM,aAAA,GAAgB,GAAA;AAAA,EACpB,+KAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,OAAA,EACE,6DAAA;AAAA,QACF,SAAA,EACE,iIAAA;AAAA,QACF,WAAA,EACE,qFAAA;AAAA,QACF,OAAA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AA,KACH;AAAA,EAEJ;AACF;AAEA,IAAA,CAAK,WAAA,GAAc,MAAA","file":"chunk-EZDGMHS7.mjs","sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { extendTailwindMerge } from \"tailwind-merge\";\n\nconst twMerge = extendTailwindMerge({\n extend: {\n classGroups: {\n rounded: [{ \"rounded-hz\": [\"sm\", \"md\", \"lg\", \"full\"] }],\n },\n },\n});\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import * as React from \"react\";\n\nexport function mergeRefs<T>(\n ...refs: (React.Ref<T> | undefined)[]\n): React.RefCallback<T> {\n return (node: T | null) => {\n for (const ref of refs) {\n if (typeof ref === \"function\") ref(node);\n else if (ref && typeof ref === \"object\")\n (ref as React.MutableRefObject<T | null>).current = node;\n }\n };\n}\n","import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/utils\";\n\nconst badgeVariants = cva(\n \"inline-flex items-center rounded-hz-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2\",\n {\n variants: {\n variant: {\n default:\n \"border-transparent bg-blue-600 text-white hover:bg-blue-700\",\n secondary:\n \"border-transparent bg-gray-100 text-gray-900 hover:bg-gray-200 dark:bg-neutral-700 dark:text-gray-100 dark:hover:bg-neutral-600\",\n destructive:\n \"border-transparent bg-rose-100 text-rose-800 dark:bg-rose-900/30 dark:text-rose-400\",\n outline:\n \"border-gray-300 text-gray-700 dark:border-neutral-600 dark:text-gray-300\",\n success:\n \"border-transparent bg-emerald-100 text-emerald-800 dark:bg-emerald-900/30 dark:text-emerald-400\",\n warning:\n \"border-transparent bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-400\",\n info: \"border-transparent bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400\",\n purple:\n \"border-transparent bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-400\",\n purpleOutline:\n \"border-purple-300 dark:border-purple-600 bg-transparent text-purple-700 dark:text-purple-300 hover:bg-purple-50 dark:hover:bg-purple-900/20\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof badgeVariants> {}\n\nconst Badge = React.forwardRef<HTMLDivElement, BadgeProps>(\n ({ className, variant, ...props }, ref) => (\n <div ref={ref} className={cn(badgeVariants({ variant }), className)} {...props} />\n )\n);\nBadge.displayName = \"Badge\";\n\nexport { Badge, badgeVariants };\n","\"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 \"@/utils\";\n\nconst labelVariants = cva(\n \"font-bricolage font-medium text-neutral-900 dark:text-neutral-100 peer-disabled:cursor-not-allowed peer-disabled:opacity-70\",\n {\n variants: {\n variant: {\n default: \"\",\n eyebrow: \"uppercase tracking-[0.2em]\",\n },\n size: {\n xs: \"text-[10px] leading-3\",\n sm: \"text-xs leading-4\",\n base: \"text-sm leading-5\",\n lg: \"text-base leading-6\",\n xl: \"text-lg leading-7\",\n },\n weight: {\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n },\n required: {\n true: \"after:content-['*'] after:ml-0.5 after:text-rose-500\",\n false: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"base\",\n weight: \"medium\",\n required: false,\n },\n }\n);\n\nexport interface LabelProps\n extends React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>,\n VariantProps<typeof labelVariants> {}\n\nconst Label = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n LabelProps\n>(({ className, variant, size, weight, required, ...props }, ref) => (\n <LabelPrimitive.Root\n ref={ref}\n className={cn(labelVariants({ variant, size, weight, required, className }))}\n {...props}\n />\n));\n\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label, labelVariants };\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { motion, AnimatePresence } from \"framer-motion\";\nimport { cn } from \"@/utils\";\n\nexport type TooltipVariant = \"default\" | \"info\" | \"warning\" | \"destructive\" | \"success\";\n\nconst variantStyles: Record<TooltipVariant, string> = {\n default: \"bg-neutral-900 text-white dark:bg-white dark:text-neutral-900\",\n info: \"bg-blue-500 text-white\",\n warning: \"bg-amber-500 text-white\",\n destructive: \"bg-rose-500 text-white\",\n success: \"bg-emerald-500 text-white\",\n};\n\nexport interface TooltipProps {\n /** The tooltip text or content to display. */\n content: React.ReactNode;\n /** The element that triggers the tooltip. */\n children: React.ReactNode;\n /** Visual style variant. */\n variant?: TooltipVariant;\n /** Which side of the trigger to render the tooltip. */\n side?: \"top\" | \"bottom\" | \"left\" | \"right\";\n /** Distance in px between the tooltip and the trigger. */\n sideOffset?: number;\n /** Delay in ms before the tooltip opens. Default: 200. */\n delayDuration?: number;\n /** Extra class names applied to the tooltip bubble. */\n className?: string;\n /** When true, renders children without any tooltip wrapper. */\n disabled?: boolean;\n}\n\nfunction Tooltip({\n content,\n children,\n variant = \"default\",\n side = \"top\",\n sideOffset = 6,\n delayDuration = 200,\n className,\n disabled = false,\n}: TooltipProps) {\n if (disabled) return <>{children}</>;\n\n const [open, setOpen] = React.useState(false);\n\n return (\n <TooltipPrimitive.Provider delayDuration={delayDuration}>\n <TooltipPrimitive.Root open={open} onOpenChange={setOpen}>\n <TooltipPrimitive.Trigger asChild>{children}</TooltipPrimitive.Trigger>\n <AnimatePresence>\n {open && (\n <TooltipPrimitive.Portal forceMount>\n <TooltipPrimitive.Content\n side={side}\n sideOffset={sideOffset}\n forceMount\n className=\"z-50\"\n >\n <motion.div\n initial={{ opacity: 0, scale: 0.95 }}\n animate={{ opacity: 1, scale: 1 }}\n exit={{ opacity: 0, scale: 0.95 }}\n transition={{\n type: \"spring\",\n stiffness: 400,\n damping: 25,\n mass: 0.8,\n }}\n className={cn(\n \"max-w-[20rem] overflow-hidden whitespace-normal break-words rounded-md px-3 py-1.5 text-xs shadow-md origin-[--radix-tooltip-content-transform-origin]\",\n variantStyles[variant],\n className\n )}\n >\n {content}\n </motion.div>\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n )}\n </AnimatePresence>\n </TooltipPrimitive.Root>\n </TooltipPrimitive.Provider>\n );\n}\n\nexport { Tooltip };\n","\"use client\";\n\nimport * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"@/utils\";\n\nconst headingVariants = cva(\n \"font-bricolage tracking-tight text-neutral-900 dark:text-neutral-50\",\n {\n variants: {\n level: {\n 1: \"text-4xl sm:text-5xl lg:text-6xl\",\n 2: \"text-3xl sm:text-4xl lg:text-5xl\",\n 3: \"text-2xl sm:text-3xl lg:text-4xl\",\n 4: \"text-xl sm:text-2xl lg:text-3xl\",\n 5: \"text-lg sm:text-xl lg:text-2xl\",\n 6: \"text-base sm:text-lg lg:text-xl\",\n },\n weight: {\n regular: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n },\n align: {\n left: \"text-left\",\n center: \"text-center\",\n right: \"text-right\",\n },\n },\n defaultVariants: {\n level: 1,\n weight: \"bold\",\n align: \"left\",\n },\n }\n);\n\ntype HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;\n\nexport interface HeadingProps\n extends React.HTMLAttributes<HTMLHeadingElement>,\n Omit<VariantProps<typeof headingVariants>, \"level\"> {\n level?: HeadingLevel;\n as?: `h${HeadingLevel}`;\n}\n\nconst Heading = React.forwardRef<HTMLHeadingElement, HeadingProps>(\n ({ className, level = 1, weight, align, as, children, ...props }, ref) => {\n // Use `as` prop if provided, otherwise derive from level\n const Tag = as || (`h${level}` as `h${HeadingLevel}`);\n\n return (\n <Tag\n ref={ref}\n className={cn(headingVariants({ level, weight, align, className }))}\n {...props}\n >\n {children}\n </Tag>\n );\n }\n);\n\nHeading.displayName = \"Heading\";\n\nexport { Heading, headingVariants };\n","\"use client\";\n\nimport * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"@/utils\";\n\nconst textVariants = cva(\"font-bricolage text-neutral-700 dark:text-neutral-300\", {\n variants: {\n size: {\n xs: \"text-xs leading-4\",\n sm: \"text-sm leading-5\",\n base: \"text-base leading-6\",\n lg: \"text-lg leading-7\",\n xl: \"text-xl leading-8\",\n \"2xl\": \"text-2xl leading-9\",\n \"3xl\": \"text-3xl leading-10\",\n \"4xl\": \"text-4xl leading-[2.75rem]\",\n },\n weight: {\n regular: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n },\n align: {\n left: \"text-left\",\n center: \"text-center\",\n right: \"text-right\",\n justify: \"text-justify\",\n },\n color: {\n default: \"text-neutral-700 dark:text-neutral-300\",\n muted: \"text-neutral-500 dark:text-neutral-400\",\n accent: \"text-blue-600 dark:text-blue-400\",\n success: \"text-emerald-600 dark:text-emerald-400\",\n warning: \"text-amber-600 dark:text-amber-400\",\n error: \"text-rose-600 dark:text-rose-400\",\n },\n },\n defaultVariants: {\n size: \"base\",\n weight: \"regular\",\n align: \"left\",\n color: \"default\",\n },\n});\n\nexport interface TextProps\n extends Omit<React.HTMLAttributes<HTMLParagraphElement>, \"color\">,\n VariantProps<typeof textVariants> {\n asChild?: boolean;\n as?: \"p\" | \"span\" | \"div\";\n}\n\nconst Text = React.forwardRef<HTMLParagraphElement, TextProps>(\n (\n { className, size, weight, align, color, asChild = false, as = \"p\", children, ...props },\n ref\n ) => {\n const Comp = asChild ? Slot : as;\n\n return (\n <Comp\n ref={ref}\n className={cn(textVariants({ size, weight, align, color, className }))}\n {...props}\n >\n {children}\n </Comp>\n );\n }\n);\n\nText.displayName = \"Text\";\n\nexport { Text, textVariants };\n","\"use client\";\n\nimport * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"@/utils\";\n\nconst captionVariants = cva(\n \"font-bricolage text-xs leading-4 text-neutral-500 dark:text-neutral-400\",\n {\n variants: {\n weight: {\n regular: \"font-normal\",\n medium: \"font-medium\",\n },\n align: {\n left: \"text-left\",\n center: \"text-center\",\n right: \"text-right\",\n },\n color: {\n default: \"text-neutral-500 dark:text-neutral-400\",\n muted: \"text-neutral-400 dark:text-neutral-500\",\n accent: \"text-blue-500 dark:text-blue-400\",\n success: \"text-emerald-500 dark:text-emerald-400\",\n warning: \"text-amber-500 dark:text-amber-400\",\n error: \"text-rose-500 dark:text-rose-400\",\n },\n },\n defaultVariants: {\n weight: \"regular\",\n align: \"left\",\n color: \"default\",\n },\n }\n);\n\nexport interface CaptionProps\n extends Omit<React.HTMLAttributes<HTMLSpanElement>, \"color\">,\n VariantProps<typeof captionVariants> {}\n\nconst Caption = React.forwardRef<HTMLSpanElement, CaptionProps>(\n ({ className, weight, align, color, children, ...props }, ref) => {\n return (\n <span\n ref={ref}\n className={cn(captionVariants({ weight, align, color, className }))}\n {...props}\n >\n {children}\n </span>\n );\n }\n);\n\nCaption.displayName = \"Caption\";\n\nexport { Caption, captionVariants };\n","\"use client\";\n\nimport * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"@/utils\";\n\nconst codeVariants = cva(\"font-mono\", {\n variants: {\n variant: {\n inline:\n \"px-1.5 py-0.5 text-sm rounded-hz-md bg-neutral-100 dark:bg-neutral-800 text-neutral-800 dark:text-neutral-200 border border-neutral-200 dark:border-neutral-700\",\n block:\n \"block p-4 text-sm rounded-hz-lg bg-neutral-900 dark:bg-neutral-950 text-neutral-100 overflow-x-auto\",\n },\n color: {\n default: \"\",\n accent:\n \"bg-blue-50 dark:bg-blue-950/30 text-blue-700 dark:text-blue-300 border-blue-200 dark:border-blue-800\",\n success:\n \"bg-emerald-50 dark:bg-emerald-950/30 text-emerald-700 dark:text-emerald-300 border-emerald-200 dark:border-emerald-800\",\n warning:\n \"bg-amber-50 dark:bg-amber-950/30 text-amber-700 dark:text-amber-300 border-amber-200 dark:border-amber-800\",\n error:\n \"bg-rose-50 dark:bg-rose-950/30 text-rose-700 dark:text-rose-300 border-rose-200 dark:border-rose-800\",\n },\n },\n compoundVariants: [\n {\n variant: \"block\",\n color: [\"accent\", \"success\", \"warning\", \"error\"],\n className: \"border\",\n },\n ],\n defaultVariants: {\n variant: \"inline\",\n color: \"default\",\n },\n});\n\nexport interface CodeProps\n extends Omit<React.HTMLAttributes<HTMLElement>, \"color\">,\n VariantProps<typeof codeVariants> {}\n\nconst Code = React.forwardRef<HTMLElement, CodeProps>(\n ({ className, variant, color, children, ...props }, ref) => {\n const isBlock = variant === \"block\";\n\n if (isBlock) {\n return (\n <pre\n ref={ref as React.Ref<HTMLPreElement>}\n className={cn(codeVariants({ variant, color, className }))}\n {...props}\n >\n <code>{children}</code>\n </pre>\n );\n }\n\n return (\n <code\n ref={ref}\n className={cn(codeVariants({ variant, color, className }))}\n {...props}\n >\n {children}\n </code>\n );\n }\n);\n\nCode.displayName = \"Code\";\n\nexport { Code, codeVariants };\n"]}
@@ -1,11 +1,11 @@
1
- import { cn, Label, Tooltip } from './chunk-UQ66UPWH.mjs';
1
+ import { cn, Label, Tooltip, mergeRefs } from './chunk-EZDGMHS7.mjs';
2
2
  import * as React10 from 'react';
3
3
  import { useState, useEffect, useCallback } from 'react';
4
4
  import { Slot } from '@radix-ui/react-slot';
5
5
  import { cva } from 'class-variance-authority';
6
6
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
7
7
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
8
- import { Check, X, ChevronRight, Circle, ChevronDown, ChevronUp, Search, Minus, PenLine, SlidersHorizontal, CalendarIcon, ChevronLeft } from 'lucide-react';
8
+ import { Check, X, ChevronRight, Circle, ChevronDown, ChevronUp, Search, Minus, PenLine, SlidersHorizontal, CalendarIcon, ChevronLeft, Clock } from 'lucide-react';
9
9
  import * as DialogPrimitive from '@radix-ui/react-dialog';
10
10
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
11
11
  import * as PopoverPrimitive from '@radix-ui/react-popover';
@@ -2079,6 +2079,311 @@ var Switch = React10.forwardRef(({ className, size, label, labelPosition = "righ
2079
2079
  );
2080
2080
  });
2081
2081
  Switch.displayName = "Switch";
2082
+ var DEFAULT_TIME_RANGE = {
2083
+ from: { hour: null, minute: null },
2084
+ to: { hour: null, minute: null }
2085
+ };
2086
+ function isTimeSet(tv) {
2087
+ return tv.hour !== null && tv.minute !== null;
2088
+ }
2089
+ function to12Hour(hour24) {
2090
+ if (hour24 === null) return { hour12: null, period: "AM" };
2091
+ const period = hour24 >= 12 ? "PM" : "AM";
2092
+ const hour12 = hour24 % 12 || 12;
2093
+ return { hour12, period };
2094
+ }
2095
+ function to24Hour(hour12, period) {
2096
+ if (period === "AM") return hour12 === 12 ? 0 : hour12;
2097
+ return hour12 === 12 ? 12 : hour12 + 12;
2098
+ }
2099
+ function pad(n) {
2100
+ return n.toString().padStart(2, "0");
2101
+ }
2102
+ function clamp(val, min, max) {
2103
+ return Math.max(min, Math.min(max, val));
2104
+ }
2105
+ function TimeInput({
2106
+ value,
2107
+ min,
2108
+ max,
2109
+ onChange,
2110
+ onComplete,
2111
+ inputRef,
2112
+ disabled = false,
2113
+ "aria-label": ariaLabel
2114
+ }) {
2115
+ const [editValue, setEditValue] = React10.useState(null);
2116
+ const internalRef = React10.useRef(null);
2117
+ const committedRef = React10.useRef(false);
2118
+ const setRefs = React10.useCallback(mergeRefs(internalRef, inputRef), [inputRef]);
2119
+ const handleChange = (e) => {
2120
+ const raw = e.target.value.replace(/\D/g, "").slice(0, 2);
2121
+ if (raw === "") {
2122
+ setEditValue(raw);
2123
+ return;
2124
+ }
2125
+ const parsed = parseInt(raw, 10);
2126
+ const clamped = clamp(parsed, min, max);
2127
+ const display = parsed !== clamped ? pad(clamped) : raw;
2128
+ setEditValue(display);
2129
+ if (raw.length === 2) {
2130
+ committedRef.current = true;
2131
+ onChange(clamped);
2132
+ setEditValue(null);
2133
+ onComplete?.();
2134
+ }
2135
+ };
2136
+ const commit = () => {
2137
+ if (committedRef.current) {
2138
+ committedRef.current = false;
2139
+ setEditValue(null);
2140
+ return;
2141
+ }
2142
+ if (editValue === null) return;
2143
+ if (editValue === "") {
2144
+ setEditValue(null);
2145
+ return;
2146
+ }
2147
+ const parsed = parseInt(editValue, 10);
2148
+ if (!isNaN(parsed)) {
2149
+ onChange(clamp(parsed, min, max));
2150
+ }
2151
+ setEditValue(null);
2152
+ };
2153
+ const handleKeyDown = (e) => {
2154
+ if (e.key === "Enter") {
2155
+ commit();
2156
+ internalRef.current?.blur();
2157
+ } else if (e.key === "Escape") {
2158
+ setEditValue(null);
2159
+ internalRef.current?.blur();
2160
+ } else if (e.key === "ArrowUp") {
2161
+ e.preventDefault();
2162
+ const curr = value ?? min;
2163
+ const next = curr >= max ? min : curr + 1;
2164
+ onChange(next);
2165
+ setEditValue(pad(next));
2166
+ } else if (e.key === "ArrowDown") {
2167
+ e.preventDefault();
2168
+ const curr = value ?? max;
2169
+ const next = curr <= min ? max : curr - 1;
2170
+ onChange(next);
2171
+ setEditValue(pad(next));
2172
+ }
2173
+ };
2174
+ return /* @__PURE__ */ jsx(
2175
+ "input",
2176
+ {
2177
+ ref: setRefs,
2178
+ type: "text",
2179
+ inputMode: "numeric",
2180
+ "aria-label": ariaLabel,
2181
+ disabled,
2182
+ value: editValue ?? (value === null ? "--" : pad(value)),
2183
+ onChange: handleChange,
2184
+ onFocus: (e) => {
2185
+ setEditValue("");
2186
+ requestAnimationFrame(() => e.target.select());
2187
+ },
2188
+ onBlur: () => commit(),
2189
+ onKeyDown: handleKeyDown,
2190
+ className: cn(
2191
+ "w-9 h-8 rounded-md border text-center text-sm tabular-nums font-medium outline-none transition-colors",
2192
+ "bg-white border-gray-200 text-gray-600",
2193
+ "focus:border-blue-500 focus:ring-1 focus:ring-blue-500/30 focus:text-gray-700",
2194
+ "dark:bg-neutral-800 dark:border-neutral-600 dark:text-gray-100",
2195
+ "dark:focus:border-blue-400 dark:focus:ring-blue-400/30",
2196
+ disabled && "opacity-40 cursor-not-allowed bg-gray-50 dark:bg-neutral-900"
2197
+ )
2198
+ }
2199
+ );
2200
+ }
2201
+ function PeriodToggle({ value, onChange, disabled = false }) {
2202
+ return /* @__PURE__ */ jsx(
2203
+ "div",
2204
+ {
2205
+ className: cn(
2206
+ "inline-flex rounded-md border overflow-hidden",
2207
+ disabled && "opacity-40 cursor-not-allowed",
2208
+ "border-gray-200 dark:border-neutral-600"
2209
+ ),
2210
+ children: ["AM", "PM"].map((p) => /* @__PURE__ */ jsx(
2211
+ "button",
2212
+ {
2213
+ type: "button",
2214
+ disabled,
2215
+ onClick: () => onChange(p),
2216
+ className: cn(
2217
+ "px-2 h-8 text-xs font-semibold tracking-wide transition-colors",
2218
+ "disabled:pointer-events-none",
2219
+ value === p ? "!bg-blue-600 !text-white dark:!bg-blue-500" : "bg-white text-gray-500 hover:bg-gray-50 hover:text-gray-600 dark:bg-neutral-800 dark:text-gray-400 dark:hover:bg-neutral-700"
2220
+ ),
2221
+ children: p
2222
+ },
2223
+ p
2224
+ ))
2225
+ }
2226
+ );
2227
+ }
2228
+ function TimeField({
2229
+ label,
2230
+ value,
2231
+ onChange,
2232
+ hourRef,
2233
+ minuteRef,
2234
+ onMinuteComplete,
2235
+ disabled = false
2236
+ }) {
2237
+ const { hour12, period } = to12Hour(value.hour);
2238
+ const minuteInputRef = React10.useRef(null);
2239
+ const mergedMinuteRef = React10.useCallback(mergeRefs(minuteInputRef, minuteRef), [minuteRef]);
2240
+ const handleHourChange = (newHour12) => {
2241
+ onChange({ ...value, hour: to24Hour(newHour12, period) });
2242
+ };
2243
+ const handleMinuteChange = (newMinute) => {
2244
+ onChange({ ...value, minute: newMinute });
2245
+ };
2246
+ const handlePeriodChange = (newPeriod) => {
2247
+ if (hour12 === null) return;
2248
+ onChange({ ...value, hour: to24Hour(hour12, newPeriod) });
2249
+ };
2250
+ const focusMinute = () => {
2251
+ minuteInputRef.current?.focus();
2252
+ };
2253
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
2254
+ /* @__PURE__ */ jsx(
2255
+ "span",
2256
+ {
2257
+ className: cn(
2258
+ "text-xs font-semibold uppercase tracking-wider",
2259
+ disabled ? "text-gray-300 dark:text-gray-600" : "text-gray-400 dark:text-gray-500"
2260
+ ),
2261
+ children: label
2262
+ }
2263
+ ),
2264
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
2265
+ /* @__PURE__ */ jsx(
2266
+ TimeInput,
2267
+ {
2268
+ value: hour12,
2269
+ min: 1,
2270
+ max: 12,
2271
+ onChange: handleHourChange,
2272
+ onComplete: focusMinute,
2273
+ inputRef: hourRef,
2274
+ disabled,
2275
+ "aria-label": `${label} hour`
2276
+ }
2277
+ ),
2278
+ /* @__PURE__ */ jsx(
2279
+ "span",
2280
+ {
2281
+ className: cn(
2282
+ "text-sm font-bold select-none",
2283
+ disabled ? "text-gray-300 dark:text-gray-600" : "text-gray-400 dark:text-gray-500"
2284
+ ),
2285
+ children: ":"
2286
+ }
2287
+ ),
2288
+ /* @__PURE__ */ jsx(
2289
+ TimeInput,
2290
+ {
2291
+ value: value.minute,
2292
+ min: 0,
2293
+ max: 59,
2294
+ onChange: handleMinuteChange,
2295
+ onComplete: onMinuteComplete,
2296
+ inputRef: mergedMinuteRef,
2297
+ disabled,
2298
+ "aria-label": `${label} minute`
2299
+ }
2300
+ ),
2301
+ /* @__PURE__ */ jsx(
2302
+ PeriodToggle,
2303
+ {
2304
+ value: period,
2305
+ onChange: handlePeriodChange,
2306
+ disabled
2307
+ }
2308
+ )
2309
+ ] })
2310
+ ] });
2311
+ }
2312
+ function TimePickerRow({ value, onChange, disabled = false }) {
2313
+ const toHourRef = React10.useRef(null);
2314
+ const fromSet = isTimeSet(value.from);
2315
+ const toSet = isTimeSet(value.to);
2316
+ const bothSet = fromSet && toSet;
2317
+ const fromMinutes = (value.from.hour ?? 0) * 60 + (value.from.minute ?? 0);
2318
+ const toMinutes = (value.to.hour ?? 0) * 60 + (value.to.minute ?? 0);
2319
+ const bothEqual = fromMinutes === toMinutes;
2320
+ const isOvernight = bothSet && toMinutes < fromMinutes;
2321
+ const durationMinutes = bothSet && !bothEqual ? isOvernight ? 24 * 60 - fromMinutes + toMinutes : toMinutes - fromMinutes : 0;
2322
+ const durationHours = Math.floor(durationMinutes / 60);
2323
+ const durationRemaining = durationMinutes % 60;
2324
+ const showDuration = bothSet && !bothEqual;
2325
+ const durationLabel = durationRemaining > 0 ? `${durationHours}h ${durationRemaining}m window${isOvernight ? " (overnight)" : ""}` : `${durationHours}h window${isOvernight ? " (overnight)" : ""}`;
2326
+ return /* @__PURE__ */ jsx(
2327
+ "div",
2328
+ {
2329
+ className: cn(
2330
+ "flex flex-col px-4 pt-2 pb-3 gap-1",
2331
+ "border-t border-gray-100 dark:border-neutral-700"
2332
+ ),
2333
+ children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
2334
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-1", children: [
2335
+ /* @__PURE__ */ jsx(
2336
+ Clock,
2337
+ {
2338
+ className: cn(
2339
+ "w-4 h-4 shrink-0",
2340
+ disabled ? "text-gray-300 dark:text-gray-600" : "text-gray-400 dark:text-gray-500"
2341
+ )
2342
+ }
2343
+ ),
2344
+ /* @__PURE__ */ jsx("span", { className: "text-[9px] font-medium text-gray-300 dark:text-gray-600 tracking-wide", children: "OPT" })
2345
+ ] }),
2346
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1 flex-1", children: [
2347
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-5", children: [
2348
+ /* @__PURE__ */ jsx(
2349
+ TimeField,
2350
+ {
2351
+ label: "From",
2352
+ value: value.from,
2353
+ onChange: (from) => onChange({ ...value, from }),
2354
+ onMinuteComplete: () => toHourRef.current?.focus(),
2355
+ disabled
2356
+ }
2357
+ ),
2358
+ /* @__PURE__ */ jsx(
2359
+ "div",
2360
+ {
2361
+ className: cn(
2362
+ "w-4 h-px",
2363
+ disabled ? "bg-gray-200 dark:bg-neutral-700" : "bg-gray-300 dark:bg-neutral-600"
2364
+ )
2365
+ }
2366
+ ),
2367
+ /* @__PURE__ */ jsx(
2368
+ TimeField,
2369
+ {
2370
+ label: "To",
2371
+ value: value.to,
2372
+ onChange: (to) => onChange({ ...value, to }),
2373
+ hourRef: toHourRef,
2374
+ disabled
2375
+ }
2376
+ )
2377
+ ] }),
2378
+ showDuration && /* @__PURE__ */ jsx("span", { className: cn(
2379
+ "text-[10px] font-medium pl-0.5",
2380
+ isOvernight ? "text-amber-500 dark:text-amber-400" : "text-gray-400 dark:text-gray-500"
2381
+ ), children: durationLabel })
2382
+ ] })
2383
+ ] })
2384
+ }
2385
+ );
2386
+ }
2082
2387
  var WEEKDAYS = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
2083
2388
  function getCalendarDays(month) {
2084
2389
  const start = startOfWeek(startOfMonth(month), { weekStartsOn: 0 });
@@ -2246,16 +2551,25 @@ var DEFAULT_PRESETS = [
2246
2551
  }
2247
2552
  }
2248
2553
  ];
2249
- function formatDateRange(range, placeholder) {
2554
+ function formatTime(tv) {
2555
+ if (tv.hour === null || tv.minute === null) return "--:--";
2556
+ const period = tv.hour >= 12 ? "PM" : "AM";
2557
+ const h = tv.hour % 12 || 12;
2558
+ const m = tv.minute.toString().padStart(2, "0");
2559
+ return `${h}:${m} ${period}`;
2560
+ }
2561
+ function formatDateRange(range, placeholder, time) {
2250
2562
  if (!range?.from) return placeholder;
2563
+ const timeActive = time && time.from.hour !== null && time.to.hour !== null;
2564
+ const timeSuffix = timeActive ? ` ${formatTime(time.from)} \u2013 ${formatTime(time.to)}` : "";
2251
2565
  if (!range.to || isSameDay(range.from, range.to)) {
2252
- return format(range.from, "MMM d, yyyy");
2566
+ return format(range.from, "MMM d, yyyy") + timeSuffix;
2253
2567
  }
2254
2568
  const sameYear = range.from.getFullYear() === range.to.getFullYear();
2255
2569
  if (sameYear) {
2256
- return `${format(range.from, "MMM d")} \u2013 ${format(range.to, "MMM d, yyyy")}`;
2570
+ return `${format(range.from, "MMM d")} \u2013 ${format(range.to, "MMM d, yyyy")}${timeSuffix}`;
2257
2571
  }
2258
- return `${format(range.from, "MMM d, yyyy")} \u2013 ${format(range.to, "MMM d, yyyy")}`;
2572
+ return `${format(range.from, "MMM d, yyyy")} \u2013 ${format(range.to, "MMM d, yyyy")}${timeSuffix}`;
2259
2573
  }
2260
2574
  function DateRangePicker({
2261
2575
  value,
@@ -2265,34 +2579,51 @@ function DateRangePicker({
2265
2579
  placeholder = "Select date range",
2266
2580
  disabled = false,
2267
2581
  align = "start",
2268
- className
2582
+ className,
2583
+ showTimePicker = false,
2584
+ timeValue,
2585
+ onTimeChange
2269
2586
  }) {
2270
2587
  const [open, setOpen] = React10.useState(false);
2271
2588
  const [internalRange, setInternalRange] = React10.useState({
2272
2589
  from: void 0,
2273
2590
  to: void 0
2274
2591
  });
2592
+ const [draft, setDraft] = React10.useState({
2593
+ from: void 0,
2594
+ to: void 0
2595
+ });
2275
2596
  const [hoverDate, setHoverDate] = React10.useState();
2276
2597
  const [leftMonth, setLeftMonth] = React10.useState(
2277
2598
  () => startOfMonth(value?.from ?? /* @__PURE__ */ new Date())
2278
2599
  );
2279
2600
  const [activePreset, setActivePreset] = React10.useState();
2280
- const range = value ?? internalRange;
2601
+ const [internalTime, setInternalTime] = React10.useState(DEFAULT_TIME_RANGE);
2602
+ const committedRange = value ?? internalRange;
2603
+ const currentTime = timeValue ?? internalTime;
2604
+ const handleTimeChange = (newTime) => {
2605
+ if (onTimeChange) onTimeChange(newTime);
2606
+ else setInternalTime(newTime);
2607
+ };
2608
+ const timeVisible = !!(draft.from && draft.to);
2609
+ const handleOpenChange = (newOpen) => {
2610
+ if (newOpen) {
2611
+ setDraft(committedRange);
2612
+ if (committedRange.from) setLeftMonth(startOfMonth(committedRange.from));
2613
+ if (!onTimeChange) setInternalTime(currentTime);
2614
+ }
2615
+ setOpen(newOpen);
2616
+ };
2281
2617
  const handleDayClick = (date) => {
2282
- const { from, to } = range;
2618
+ const { from, to } = draft;
2283
2619
  if (!from || from && to) {
2284
- const newRange2 = { from: date, to: void 0 };
2620
+ setDraft({ from: date, to: void 0 });
2285
2621
  setActivePreset(void 0);
2286
- if (onChange) onChange(newRange2);
2287
- else setInternalRange(newRange2);
2288
2622
  return;
2289
2623
  }
2290
2624
  const [start, end] = isBefore(from, date) ? [from, date] : [date, from];
2291
- const newRange = { from: start, to: end };
2292
- if (onChange) onChange(newRange);
2293
- else setInternalRange(newRange);
2625
+ setDraft({ from: start, to: end });
2294
2626
  setHoverDate(void 0);
2295
- setOpen(false);
2296
2627
  };
2297
2628
  const handlePreset = (preset) => {
2298
2629
  const newRange = preset.getRange();
@@ -2302,8 +2633,22 @@ function DateRangePicker({
2302
2633
  if (newRange.from) setLeftMonth(startOfMonth(newRange.from));
2303
2634
  setOpen(false);
2304
2635
  };
2636
+ const handleApply = () => {
2637
+ if (draft.from && !draft.to) return;
2638
+ const newRange = draft.from && draft.to ? draft : void 0;
2639
+ if (onChange) onChange(newRange);
2640
+ else setInternalRange(newRange ?? { from: void 0, to: void 0 });
2641
+ setOpen(false);
2642
+ };
2643
+ const handleClear = () => {
2644
+ setDraft({ from: void 0, to: void 0 });
2645
+ setActivePreset(void 0);
2646
+ if (showTimePicker) handleTimeChange(DEFAULT_TIME_RANGE);
2647
+ };
2648
+ const canClear = !!(draft.from || committedRange.from);
2649
+ const canApply = !(draft.from && !draft.to) && !!(draft.from || committedRange.from);
2305
2650
  const rightMonth = addMonths(leftMonth, 1);
2306
- return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
2651
+ return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: handleOpenChange, children: [
2307
2652
  /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
2308
2653
  "button",
2309
2654
  {
@@ -2313,12 +2658,16 @@ function DateRangePicker({
2313
2658
  "hover:bg-gray-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2",
2314
2659
  "dark:border-neutral-600 dark:bg-neutral-800 dark:hover:bg-neutral-700",
2315
2660
  "disabled:pointer-events-none disabled:opacity-50",
2316
- range.from ? "text-gray-900 dark:text-gray-100" : "text-gray-400 dark:text-gray-500",
2661
+ committedRange.from ? "text-gray-900 dark:text-gray-100" : "text-gray-400 dark:text-gray-500",
2317
2662
  className
2318
2663
  ),
2319
2664
  children: [
2320
2665
  /* @__PURE__ */ jsx(CalendarIcon, { className: "w-4 h-4 shrink-0 text-gray-400 dark:text-gray-500" }),
2321
- /* @__PURE__ */ jsx("span", { children: formatDateRange(range, placeholder) })
2666
+ /* @__PURE__ */ jsx("span", { children: formatDateRange(
2667
+ committedRange,
2668
+ placeholder,
2669
+ showTimePicker ? currentTime : void 0
2670
+ ) })
2322
2671
  ]
2323
2672
  }
2324
2673
  ) }),
@@ -2339,34 +2688,83 @@ function DateRangePicker({
2339
2688
  preset.label
2340
2689
  ))
2341
2690
  ] }, section.title)) }),
2342
- /* @__PURE__ */ jsxs("div", { className: "flex gap-4 p-4", children: [
2343
- /* @__PURE__ */ jsx(
2344
- CalendarMonth,
2345
- {
2346
- month: leftMonth,
2347
- range,
2348
- hoverDate,
2349
- onDayClick: handleDayClick,
2350
- onDayHover: setHoverDate,
2351
- onPrevMonth: () => setLeftMonth(subMonths(leftMonth, 1)),
2352
- showPrevNav: true,
2353
- showNextNav: false
2354
- }
2355
- ),
2356
- /* @__PURE__ */ jsx("div", { className: "w-px bg-gray-100 dark:bg-neutral-700 self-stretch" }),
2357
- /* @__PURE__ */ jsx(
2358
- CalendarMonth,
2691
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
2692
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-4 p-4", children: [
2693
+ /* @__PURE__ */ jsx(
2694
+ CalendarMonth,
2695
+ {
2696
+ month: leftMonth,
2697
+ range: draft,
2698
+ hoverDate,
2699
+ onDayClick: handleDayClick,
2700
+ onDayHover: setHoverDate,
2701
+ onPrevMonth: () => setLeftMonth(subMonths(leftMonth, 1)),
2702
+ showPrevNav: true,
2703
+ showNextNav: false
2704
+ }
2705
+ ),
2706
+ /* @__PURE__ */ jsx("div", { className: "w-px bg-gray-100 dark:bg-neutral-700 self-stretch" }),
2707
+ /* @__PURE__ */ jsx(
2708
+ CalendarMonth,
2709
+ {
2710
+ month: rightMonth,
2711
+ range: draft,
2712
+ hoverDate,
2713
+ onDayClick: handleDayClick,
2714
+ onDayHover: setHoverDate,
2715
+ onNextMonth: () => setLeftMonth(addMonths(leftMonth, 1)),
2716
+ showPrevNav: false,
2717
+ showNextNav: true
2718
+ }
2719
+ )
2720
+ ] }),
2721
+ showTimePicker && /* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: timeVisible && /* @__PURE__ */ jsx(
2722
+ motion.div,
2359
2723
  {
2360
- month: rightMonth,
2361
- range,
2362
- hoverDate,
2363
- onDayClick: handleDayClick,
2364
- onDayHover: setHoverDate,
2365
- onNextMonth: () => setLeftMonth(addMonths(leftMonth, 1)),
2366
- showPrevNav: false,
2367
- showNextNav: true
2368
- }
2369
- )
2724
+ initial: { height: 0, opacity: 0 },
2725
+ animate: { height: "auto", opacity: 1 },
2726
+ exit: { height: 0, opacity: 0 },
2727
+ transition: {
2728
+ height: { type: "spring", stiffness: 400, damping: 30, mass: 0.8 },
2729
+ opacity: { duration: 0.2 }
2730
+ },
2731
+ className: "overflow-hidden",
2732
+ children: /* @__PURE__ */ jsx(
2733
+ TimePickerRow,
2734
+ {
2735
+ value: currentTime,
2736
+ onChange: handleTimeChange
2737
+ }
2738
+ )
2739
+ },
2740
+ "time-picker"
2741
+ ) }),
2742
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-2 px-4 py-3 border-t border-gray-100 dark:border-neutral-700", children: [
2743
+ /* @__PURE__ */ jsx(
2744
+ "button",
2745
+ {
2746
+ onClick: handleClear,
2747
+ disabled: !canClear,
2748
+ className: cn(
2749
+ "px-3 py-1.5 rounded-md text-sm transition-colors",
2750
+ canClear ? "text-gray-600 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-neutral-700" : "text-gray-300 dark:text-gray-600 cursor-not-allowed"
2751
+ ),
2752
+ children: "Clear"
2753
+ }
2754
+ ),
2755
+ /* @__PURE__ */ jsx(
2756
+ "button",
2757
+ {
2758
+ onClick: handleApply,
2759
+ disabled: !canApply,
2760
+ className: cn(
2761
+ "px-3 py-1.5 rounded-md text-sm font-medium transition-colors",
2762
+ canApply ? "bg-blue-600 text-white hover:bg-blue-700 dark:hover:bg-blue-500" : "bg-blue-100 text-blue-300 cursor-not-allowed dark:bg-blue-950/30 dark:text-blue-800"
2763
+ ),
2764
+ children: "Apply"
2765
+ }
2766
+ )
2767
+ ] })
2370
2768
  ] })
2371
2769
  ] }) })
2372
2770
  ] });
@@ -2447,6 +2845,6 @@ function PeriodComparisonSelector({
2447
2845
  ] });
2448
2846
  }
2449
2847
 
2450
- export { Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, ColumnSelection, DEFAULT_COMPARISON_PERIODS, DEFAULT_PRESETS, DateRangePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Form, FormControl, FormDescription, FormField, FormLabel, FormMessage, PeriodComparisonSelector, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, SegmentedControl, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Skeleton, SkeletonAvatar, SkeletonBadge, SkeletonButton, SkeletonCard, SkeletonIcon, SkeletonInput, SkeletonSubtitle, SkeletonTableRow, SkeletonTableRows, SkeletonText, SkeletonTitle, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, TableRowCheckbox, TableSelectAll, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toggle, buttonVariants, segmentedControlItemVariants, segmentedControlVariants, separatorVariants, switchLabelVariants, switchThumbVariants, switchTrackVariants, toggleGroupVariants, toggleItemVariants, useColumnVisibility, useFormContext, useFormFieldContext, useTableSelection };
2451
- //# sourceMappingURL=chunk-HM5GFDXY.mjs.map
2452
- //# sourceMappingURL=chunk-HM5GFDXY.mjs.map
2848
+ export { Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, ColumnSelection, DEFAULT_COMPARISON_PERIODS, DEFAULT_PRESETS, DEFAULT_TIME_RANGE, DateRangePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Form, FormControl, FormDescription, FormField, FormLabel, FormMessage, PeriodComparisonSelector, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, SegmentedControl, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Skeleton, SkeletonAvatar, SkeletonBadge, SkeletonButton, SkeletonCard, SkeletonIcon, SkeletonInput, SkeletonSubtitle, SkeletonTableRow, SkeletonTableRows, SkeletonText, SkeletonTitle, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, TableRowCheckbox, TableSelectAll, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toggle, buttonVariants, segmentedControlItemVariants, segmentedControlVariants, separatorVariants, switchLabelVariants, switchThumbVariants, switchTrackVariants, toggleGroupVariants, toggleItemVariants, useColumnVisibility, useFormContext, useFormFieldContext, useTableSelection };
2849
+ //# sourceMappingURL=chunk-SJJ6KXCU.mjs.map
2850
+ //# sourceMappingURL=chunk-SJJ6KXCU.mjs.map