@uselets/ui 0.5.0 → 0.6.1
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/README.md +73 -6
- package/dist/chunk-CHh1Zzun.js +1 -0
- package/dist/cli/uselets.mjs +7 -0
- package/dist/cli/uselets.mjs.map +1 -0
- package/dist/components/accordion.d.ts +6 -6
- package/dist/components/accordion.js +1 -1
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/alert-dialog.d.ts +14 -14
- package/dist/components/alert-dialog.js +1 -1
- package/dist/components/alert.d.ts +8 -8
- package/dist/components/alert.js +1 -1
- package/dist/components/anchor.d.ts +5 -5
- package/dist/components/anchor.js +1 -1
- package/dist/components/avatar.d.ts +8 -8
- package/dist/components/avatar.js +1 -1
- package/dist/components/badge.d.ts +5 -5
- package/dist/components/badge.js +1 -1
- package/dist/components/breadcrumb.d.ts +9 -9
- package/dist/components/breadcrumb.js +1 -1
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/button-group.d.ts +7 -7
- package/dist/components/button-group.js +1 -1
- package/dist/components/button.d.ts +5 -5
- package/dist/components/button.js +1 -1
- package/dist/components/calendar.d.ts +6 -5
- package/dist/components/calendar.js +1 -1
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/card.d.ts +9 -9
- package/dist/components/card.js +1 -1
- package/dist/components/carousel.d.ts +7 -7
- package/dist/components/carousel.js +1 -1
- package/dist/components/center.d.ts +5 -5
- package/dist/components/center.js +1 -1
- package/dist/components/chart.d.ts +90 -90
- package/dist/components/chart.js +1 -1
- package/dist/components/chart.js.map +1 -1
- package/dist/components/checkbox.d.ts +5 -5
- package/dist/components/checkbox.js +1 -1
- package/dist/components/code.d.ts +3 -3
- package/dist/components/code.js +1 -1
- package/dist/components/collapsible.d.ts +5 -5
- package/dist/components/collapsible.js +1 -1
- package/dist/components/collapsible.js.map +1 -1
- package/dist/components/combobox.d.ts +17 -17
- package/dist/components/combobox.js +1 -1
- package/dist/components/command.d.ts +11 -11
- package/dist/components/command.js +1 -1
- package/dist/components/command.js.map +1 -1
- package/dist/components/container.d.ts +5 -5
- package/dist/components/container.js +1 -1
- package/dist/components/dialog.d.ts +14 -14
- package/dist/components/dialog.js +1 -1
- package/dist/components/drawer.d.ts +14 -14
- package/dist/components/drawer.js +1 -1
- package/dist/components/dropdown-menu.d.ts +17 -17
- package/dist/components/dropdown-menu.js +1 -1
- package/dist/components/dropzone.d.ts +3 -3
- package/dist/components/dropzone.js +1 -1
- package/dist/components/dropzone.js.map +1 -1
- package/dist/components/empty.d.ts +10 -10
- package/dist/components/empty.js +1 -1
- package/dist/components/field.d.ts +14 -14
- package/dist/components/field.js +1 -1
- package/dist/components/group.d.ts +5 -5
- package/dist/components/group.js +1 -1
- package/dist/components/heading.d.ts +5 -5
- package/dist/components/heading.js +1 -1
- package/dist/components/hover-card.d.ts +5 -5
- package/dist/components/hover-card.js +1 -1
- package/dist/components/hover-card.js.map +1 -1
- package/dist/components/input-group.d.ts +11 -11
- package/dist/components/input-group.js +1 -1
- package/dist/components/input-otp.d.ts +6 -6
- package/dist/components/input-otp.js +1 -1
- package/dist/components/input-otp.js.map +1 -1
- package/dist/components/input.d.ts +3 -3
- package/dist/components/input.js +1 -1
- package/dist/components/kbd.d.ts +4 -4
- package/dist/components/kbd.js +1 -1
- package/dist/components/label.d.ts +3 -3
- package/dist/components/label.js +1 -1
- package/dist/components/list.d.ts +7 -7
- package/dist/components/list.js +1 -1
- package/dist/components/list.js.map +1 -1
- package/dist/components/native-select.d.ts +5 -5
- package/dist/components/native-select.js +1 -1
- package/dist/components/navigation-menu.d.ts +12 -12
- package/dist/components/navigation-menu.js +1 -1
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/pagination.d.ts +9 -9
- package/dist/components/pagination.js +1 -1
- package/dist/components/popover.d.ts +9 -9
- package/dist/components/popover.js +1 -1
- package/dist/components/progress.d.ts +3 -3
- package/dist/components/progress.js +1 -1
- package/dist/components/radio-group.d.ts +4 -4
- package/dist/components/radio-group.js +1 -1
- package/dist/components/resizable.d.ts +5 -5
- package/dist/components/resizable.js +1 -1
- package/dist/components/scroll-area.d.ts +4 -4
- package/dist/components/scroll-area.js +1 -1
- package/dist/components/select.d.ts +12 -12
- package/dist/components/select.js +1 -1
- package/dist/components/separator.d.ts +3 -3
- package/dist/components/separator.js +1 -1
- package/dist/components/sheet.d.ts +12 -12
- package/dist/components/sheet.js +1 -1
- package/dist/components/sheet.js.map +1 -1
- package/dist/components/sidebar.d.ts +27 -27
- package/dist/components/sidebar.js +1 -1
- package/dist/components/skeleton.d.ts +3 -3
- package/dist/components/skeleton.js +1 -1
- package/dist/components/slider.d.ts +3 -3
- package/dist/components/slider.js +1 -1
- package/dist/components/sonner.d.ts +3 -3
- package/dist/components/sonner.js +1 -1
- package/dist/components/sonner.js.map +1 -1
- package/dist/components/spinner.d.ts +5 -5
- package/dist/components/spinner.js +1 -1
- package/dist/components/stack.d.ts +5 -5
- package/dist/components/stack.js +1 -1
- package/dist/components/switch.d.ts +3 -3
- package/dist/components/switch.js +1 -1
- package/dist/components/table.d.ts +10 -10
- package/dist/components/table.js +1 -1
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.d.ts +8 -8
- package/dist/components/tabs.js +1 -1
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/text.d.ts +5 -5
- package/dist/components/text.js +1 -1
- package/dist/components/textarea.d.ts +3 -3
- package/dist/components/textarea.js +1 -1
- package/dist/components/theme.d.ts +4 -4
- package/dist/components/theme.js +1 -1
- package/dist/components/timeline.d.ts +5 -5
- package/dist/components/timeline.js +1 -1
- package/dist/components/timeline.js.map +1 -1
- package/dist/components/toggle-group.d.ts +4 -4
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/toggle.d.ts +5 -5
- package/dist/components/toggle.js +1 -1
- package/dist/components/tooltip.d.ts +6 -6
- package/dist/components/tooltip.js +1 -1
- package/dist/hooks/use-disclosure.d.ts +23 -0
- package/dist/hooks/use-disclosure.js +2 -0
- package/dist/hooks/use-disclosure.js.map +1 -0
- package/dist/hooks/use-disclosure.spec.d.ts +1 -0
- package/dist/hooks/use-disclosure.spec.js +2 -0
- package/dist/hooks/use-disclosure.spec.js.map +1 -0
- package/dist/hooks/use-document-visibility.d.ts +7 -0
- package/dist/hooks/use-document-visibility.js +2 -0
- package/dist/hooks/use-document-visibility.js.map +1 -0
- package/dist/hooks/use-document-visibility.spec.d.ts +1 -0
- package/dist/hooks/use-document-visibility.spec.js +2 -0
- package/dist/hooks/use-document-visibility.spec.js.map +1 -0
- package/dist/hooks/use-idle.d.ts +14 -0
- package/dist/hooks/use-idle.js +2 -0
- package/dist/hooks/use-idle.js.map +1 -0
- package/dist/hooks/use-idle.spec.d.ts +1 -0
- package/dist/hooks/use-idle.spec.js +2 -0
- package/dist/hooks/use-idle.spec.js.map +1 -0
- package/dist/hooks/use-interval.d.ts +22 -0
- package/dist/hooks/use-interval.js +2 -0
- package/dist/hooks/use-interval.js.map +1 -0
- package/dist/hooks/use-interval.spec.d.ts +1 -0
- package/dist/hooks/use-interval.spec.js +2 -0
- package/dist/hooks/use-interval.spec.js.map +1 -0
- package/dist/hooks/use-local-storage.d.ts +17 -0
- package/dist/hooks/use-local-storage.js +2 -0
- package/dist/hooks/use-local-storage.js.map +1 -0
- package/dist/hooks/use-local-storage.spec.d.ts +1 -0
- package/dist/hooks/use-local-storage.spec.js +2 -0
- package/dist/hooks/use-local-storage.spec.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +1 -1
- package/dist/hooks/use-mobile.js +1 -1
- package/dist/hooks/use-mobile.spec.d.ts +1 -0
- package/dist/hooks/use-mobile.spec.js +2 -0
- package/dist/hooks/use-mobile.spec.js.map +1 -0
- package/dist/index.d.ts +8 -3
- package/dist/index.js +1 -1
- package/dist/lib/button.d.ts +1 -1
- package/dist/lib/utils.d.ts +3 -2
- package/dist/lib/utils.js +1 -1
- package/dist/lib/utils.js.map +1 -1
- package/dist/react.esm-BuxkFT_p.js +59 -0
- package/dist/react.esm-BuxkFT_p.js.map +1 -0
- package/dist/skills/uselets-ui/SKILL.md +72 -0
- package/dist/skills/uselets-ui/agents/openai.yaml +4 -0
- package/dist/skills/uselets-ui/references/component-catalog.md +202 -0
- package/dist/skills/uselets-ui/references/package-guide.md +264 -0
- package/dist/skills/uselets-ui/scripts/print-public-api.mjs +174 -0
- package/dist/styles.css +2 -1437
- package/dist/themes/gomax.css +2 -0
- package/dist/themes/max.css +2 -0
- package/package.json +42 -27
- package/skills/uselets-ui/SKILL.md +72 -0
- package/skills/uselets-ui/agents/openai.yaml +4 -0
- package/skills/uselets-ui/references/component-catalog.md +202 -0
- package/skills/uselets-ui/references/package-guide.md +264 -0
- package/skills/uselets-ui/scripts/print-public-api.mjs +174 -0
- package/dist/chunk-IpJEthwI.js +0 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as __name } from "../chunk-CHh1Zzun.js";
|
|
2
2
|
import { Toggle as Toggle$1 } from "radix-ui";
|
|
3
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
import { VariantProps } from "class-variance-authority";
|
|
5
5
|
import * as React from "react";
|
|
6
|
-
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
6
|
+
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
7
7
|
|
|
8
8
|
//#region src/components/toggle.d.ts
|
|
9
9
|
declare const toggleVariants: (props?: ({
|
|
10
10
|
variant?: "default" | "outline" | null | undefined;
|
|
11
11
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
12
|
-
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
12
|
+
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
13
13
|
type ToggleProps = React.ComponentProps<typeof Toggle$1.Root> & VariantProps<typeof toggleVariants>;
|
|
14
14
|
declare function Toggle({
|
|
15
15
|
className,
|
|
16
16
|
variant,
|
|
17
17
|
size,
|
|
18
18
|
...props
|
|
19
|
-
}: ToggleProps): react_jsx_runtime0.JSX.Element;
|
|
19
|
+
}: ToggleProps): _$react_jsx_runtime0.JSX.Element;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { Toggle, ToggleProps, toggleVariants };
|
|
22
22
|
//# sourceMappingURL=toggle.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-
|
|
1
|
+
import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{Toggle as t}from"radix-ui";import{jsx as n}from"react/jsx-runtime";import{cva as r}from"class-variance-authority";const i=r(`group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent hover:bg-muted`},size:{default:`h-8 min-w-8 px-2`,sm:`h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-1.5 text-[0.8rem]`,lg:`h-9 min-w-9 px-2.5`}},defaultVariants:{variant:`default`,size:`default`}});function Toggle({className:r,variant:a=`default`,size:o=`default`,...s}){return n(t.Root,{"data-slot":`toggle`,className:e(i({variant:a,size:o,className:r})),...s})}export{Toggle,i as toggleVariants};
|
|
2
2
|
//# sourceMappingURL=toggle.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as __name } from "../chunk-CHh1Zzun.js";
|
|
2
2
|
import { Tooltip as Tooltip$1 } from "radix-ui";
|
|
3
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/components/tooltip.d.ts
|
|
@@ -11,19 +11,19 @@ type TooltipContentProps = React.ComponentProps<typeof Tooltip$1.Content>;
|
|
|
11
11
|
declare function TooltipProvider({
|
|
12
12
|
delayDuration,
|
|
13
13
|
...props
|
|
14
|
-
}: TooltipProviderProps): react_jsx_runtime0.JSX.Element;
|
|
14
|
+
}: TooltipProviderProps): _$react_jsx_runtime0.JSX.Element;
|
|
15
15
|
declare function Tooltip({
|
|
16
16
|
...props
|
|
17
|
-
}: TooltipProps): react_jsx_runtime0.JSX.Element;
|
|
17
|
+
}: TooltipProps): _$react_jsx_runtime0.JSX.Element;
|
|
18
18
|
declare function TooltipTrigger({
|
|
19
19
|
...props
|
|
20
|
-
}: TooltipTriggerProps): react_jsx_runtime0.JSX.Element;
|
|
20
|
+
}: TooltipTriggerProps): _$react_jsx_runtime0.JSX.Element;
|
|
21
21
|
declare function TooltipContent({
|
|
22
22
|
className,
|
|
23
23
|
sideOffset,
|
|
24
24
|
children,
|
|
25
25
|
...props
|
|
26
|
-
}: TooltipContentProps): react_jsx_runtime0.JSX.Element;
|
|
26
|
+
}: TooltipContentProps): _$react_jsx_runtime0.JSX.Element;
|
|
27
27
|
//#endregion
|
|
28
28
|
export { Tooltip, TooltipContent, TooltipContentProps, TooltipProps, TooltipProvider, TooltipProviderProps, TooltipTrigger, TooltipTriggerProps };
|
|
29
29
|
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-
|
|
1
|
+
import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{Tooltip as t}from"radix-ui";import{jsx as n,jsxs as r}from"react/jsx-runtime";function TooltipProvider({delayDuration:e=0,...r}){return n(t.Provider,{"data-slot":`tooltip-provider`,delayDuration:e,...r})}function Tooltip({...e}){return n(t.Root,{"data-slot":`tooltip`,...e})}function TooltipTrigger({...e}){return n(t.Trigger,{"data-slot":`tooltip-trigger`,...e})}function TooltipContent({className:i,sideOffset:a=0,children:o,...s}){return n(t.Portal,{children:r(t.Content,{"data-slot":`tooltip-content`,sideOffset:a,className:e(`bg-foreground text-background z-50 w-fit max-w-xs rounded-md px-3 py-1.5 text-xs origin-(--radix-tooltip-content-transform-origin)`,`data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95`,`data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,`data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,i),...s,children:[o,n(t.Arrow,{className:`size-2.5 rotate-45 rounded-[2px] bg-foreground fill-foreground z-50 translate-y-[calc(-50%-2px)]`})]})})}export{Tooltip,TooltipContent,TooltipProvider,TooltipTrigger};
|
|
2
2
|
//# sourceMappingURL=tooltip.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { n as __name } from "../chunk-CHh1Zzun.js";
|
|
2
|
+
|
|
3
|
+
//#region src/hooks/use-disclosure.d.ts
|
|
4
|
+
type UseDisclosureOptions = {
|
|
5
|
+
onOpen?: () => void;
|
|
6
|
+
onClose?: () => void;
|
|
7
|
+
};
|
|
8
|
+
type UseDisclosureHandlers = {
|
|
9
|
+
set: (value: boolean) => void;
|
|
10
|
+
open: () => void;
|
|
11
|
+
close: () => void;
|
|
12
|
+
toggle: () => void;
|
|
13
|
+
};
|
|
14
|
+
type UseDisclosureReturnValue = [boolean, UseDisclosureHandlers];
|
|
15
|
+
declare function useDisclosure(initialState?: boolean, options?: UseDisclosureOptions): UseDisclosureReturnValue;
|
|
16
|
+
declare namespace useDisclosure {
|
|
17
|
+
type Options = UseDisclosureOptions;
|
|
18
|
+
type Handlers = UseDisclosureHandlers;
|
|
19
|
+
type ReturnValue = UseDisclosureReturnValue;
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { UseDisclosureHandlers, UseDisclosureOptions, UseDisclosureReturnValue, useDisclosure };
|
|
23
|
+
//# sourceMappingURL=use-disclosure.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"../chunk-CHh1Zzun.js";import{useCallback as e,useState as t}from"react";function useDisclosure(n=!1,r={}){let[i,a]=t(n),o=e(()=>{a(e=>e||(r.onOpen?.(),!0))},[r.onOpen]),s=e(()=>{a(e=>e&&(r.onClose?.(),!1))},[r.onClose]);return[i,{open:o,close:s,toggle:e(()=>{i?s():o()},[s,o,i]),set:a}]}export{useDisclosure};
|
|
2
|
+
//# sourceMappingURL=use-disclosure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-disclosure.js","names":[],"sources":["../../src/hooks/use-disclosure.ts"],"sourcesContent":["import { useCallback, useState } from 'react'\n\nexport type UseDisclosureOptions = {\n onOpen?: () => void\n onClose?: () => void\n}\n\nexport type UseDisclosureHandlers = {\n set: (value: boolean) => void\n open: () => void\n close: () => void\n toggle: () => void\n}\n\nexport type UseDisclosureReturnValue = [boolean, UseDisclosureHandlers]\n\nexport function useDisclosure(initialState = false, options: UseDisclosureOptions = {}): UseDisclosureReturnValue {\n const [opened, setOpened] = useState(initialState)\n\n const open = useCallback(() => {\n setOpened((isOpened) => {\n if (!isOpened) {\n options.onOpen?.()\n return true\n }\n return isOpened\n })\n }, [options.onOpen])\n\n const close = useCallback(() => {\n setOpened((isOpened) => {\n if (isOpened) {\n options.onClose?.()\n return false\n }\n return isOpened\n })\n }, [options.onClose])\n\n const toggle = useCallback(() => {\n opened ? close() : open()\n }, [close, open, opened])\n\n return [opened, { open, close, toggle, set: setOpened }]\n}\n\nexport namespace useDisclosure {\n export type Options = UseDisclosureOptions\n export type Handlers = UseDisclosureHandlers\n export type ReturnValue = UseDisclosureReturnValue\n}\n"],"mappings":"+EAgBA,SAAgB,cAAc,EAAe,GAAO,EAAgC,EAAE,CAA4B,CAChH,GAAM,CAAC,EAAQ,GAAa,EAAS,EAAa,CAE5C,EAAO,MAAkB,CAC7B,EAAW,GACJ,IACH,EAAQ,UAAU,CACX,IAGT,EACD,CAAC,EAAQ,OAAO,CAAC,CAEd,EAAQ,MAAkB,CAC9B,EAAW,GACL,IACF,EAAQ,WAAW,CACZ,IAGT,EACD,CAAC,EAAQ,QAAQ,CAAC,CAMrB,MAAO,CAAC,EAAQ,CAAE,OAAM,QAAO,OAJhB,MAAkB,CAC/B,EAAS,GAAO,CAAG,GAAM,EACxB,CAAC,EAAO,EAAM,EAAO,CAEa,CAAE,IAAK,EAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"../chunk-CHh1Zzun.js";import{useDisclosure as e}from"./use-disclosure.js";import{n as t,t as n}from"../react.esm-BuxkFT_p.js";describe(`useDisclosure`,()=>{it(`uses false as the default initial state`,()=>{let{result:n}=t(()=>e());expect(n.current[0]).toBe(!1)}),it(`uses the provided initial state`,()=>{let{result:n}=t(()=>e(!0));expect(n.current[0]).toBe(!0)}),it(`opens, closes, toggles, and sets the state`,()=>{let{result:r}=t(()=>e());n(()=>r.current[1].open()),expect(r.current[0]).toBe(!0),n(()=>r.current[1].close()),expect(r.current[0]).toBe(!1),n(()=>r.current[1].toggle()),expect(r.current[0]).toBe(!0),n(()=>r.current[1].set(!1)),expect(r.current[0]).toBe(!1)}),it(`calls callbacks only when state transitions happen`,()=>{let r=vi.fn(),i=vi.fn(),{result:a}=t(()=>e(!1,{onOpen:r,onClose:i}));n(()=>a.current[1].close()),expect(i).not.toHaveBeenCalled(),n(()=>a.current[1].open()),n(()=>a.current[1].open()),expect(r).toHaveBeenCalledTimes(1),n(()=>a.current[1].close()),n(()=>a.current[1].close()),expect(i).toHaveBeenCalledTimes(1)})});
|
|
2
|
+
//# sourceMappingURL=use-disclosure.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-disclosure.spec.js","names":[],"sources":["../../src/hooks/use-disclosure.spec.ts"],"sourcesContent":["import { act, renderHook } from '@testing-library/react'\n\nimport { useDisclosure } from './use-disclosure'\n\ndescribe('useDisclosure', () => {\n it('uses false as the default initial state', () => {\n const { result } = renderHook(() => useDisclosure())\n\n expect(result.current[0]).toBe(false)\n })\n\n it('uses the provided initial state', () => {\n const { result } = renderHook(() => useDisclosure(true))\n\n expect(result.current[0]).toBe(true)\n })\n\n it('opens, closes, toggles, and sets the state', () => {\n const { result } = renderHook(() => useDisclosure())\n\n act(() => result.current[1].open())\n expect(result.current[0]).toBe(true)\n\n act(() => result.current[1].close())\n expect(result.current[0]).toBe(false)\n\n act(() => result.current[1].toggle())\n expect(result.current[0]).toBe(true)\n\n act(() => result.current[1].set(false))\n expect(result.current[0]).toBe(false)\n })\n\n it('calls callbacks only when state transitions happen', () => {\n const onOpen = vi.fn()\n const onClose = vi.fn()\n const { result } = renderHook(() => useDisclosure(false, { onOpen, onClose }))\n\n act(() => result.current[1].close())\n expect(onClose).not.toHaveBeenCalled()\n\n act(() => result.current[1].open())\n act(() => result.current[1].open())\n expect(onOpen).toHaveBeenCalledTimes(1)\n\n act(() => result.current[1].close())\n act(() => result.current[1].close())\n expect(onClose).toHaveBeenCalledTimes(1)\n })\n})\n"],"mappings":"qIAIA,SAAS,oBAAuB,CAC9B,GAAG,8CAAiD,CAClD,GAAM,CAAE,UAAW,MAAiB,GAAe,CAAC,CAEpD,OAAO,EAAO,QAAQ,GAAG,CAAC,KAAK,GAAM,EACrC,CAEF,GAAG,sCAAyC,CAC1C,GAAM,CAAE,UAAW,MAAiB,EAAc,GAAK,CAAC,CAExD,OAAO,EAAO,QAAQ,GAAG,CAAC,KAAK,GAAK,EACpC,CAEF,GAAG,iDAAoD,CACrD,GAAM,CAAE,UAAW,MAAiB,GAAe,CAAC,CAEpD,MAAU,EAAO,QAAQ,GAAG,MAAM,CAAC,CACnC,OAAO,EAAO,QAAQ,GAAG,CAAC,KAAK,GAAK,CAEpC,MAAU,EAAO,QAAQ,GAAG,OAAO,CAAC,CACpC,OAAO,EAAO,QAAQ,GAAG,CAAC,KAAK,GAAM,CAErC,MAAU,EAAO,QAAQ,GAAG,QAAQ,CAAC,CACrC,OAAO,EAAO,QAAQ,GAAG,CAAC,KAAK,GAAK,CAEpC,MAAU,EAAO,QAAQ,GAAG,IAAI,GAAM,CAAC,CACvC,OAAO,EAAO,QAAQ,GAAG,CAAC,KAAK,GAAM,EACrC,CAEF,GAAG,yDAA4D,CAC7D,IAAM,EAAS,GAAG,IAAI,CAChB,EAAU,GAAG,IAAI,CACjB,CAAE,UAAW,MAAiB,EAAc,GAAO,CAAE,SAAQ,UAAS,CAAC,CAAC,CAE9E,MAAU,EAAO,QAAQ,GAAG,OAAO,CAAC,CACpC,OAAO,EAAQ,CAAC,IAAI,kBAAkB,CAEtC,MAAU,EAAO,QAAQ,GAAG,MAAM,CAAC,CACnC,MAAU,EAAO,QAAQ,GAAG,MAAM,CAAC,CACnC,OAAO,EAAO,CAAC,sBAAsB,EAAE,CAEvC,MAAU,EAAO,QAAQ,GAAG,OAAO,CAAC,CACpC,MAAU,EAAO,QAAQ,GAAG,OAAO,CAAC,CACpC,OAAO,EAAQ,CAAC,sBAAsB,EAAE,EACxC,EACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { n as __name } from "../chunk-CHh1Zzun.js";
|
|
2
|
+
|
|
3
|
+
//#region src/hooks/use-document-visibility.d.ts
|
|
4
|
+
declare function useDocumentVisibility(): DocumentVisibilityState;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { useDocumentVisibility };
|
|
7
|
+
//# sourceMappingURL=use-document-visibility.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"../chunk-CHh1Zzun.js";import{useEffect as e,useState as t}from"react";function useDocumentVisibility(){let[n,r]=t(`visible`);return e(()=>{r(document.visibilityState);let listener=()=>r(document.visibilityState);return document.addEventListener(`visibilitychange`,listener),()=>document.removeEventListener(`visibilitychange`,listener)},[]),n}export{useDocumentVisibility};
|
|
2
|
+
//# sourceMappingURL=use-document-visibility.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-document-visibility.js","names":[],"sources":["../../src/hooks/use-document-visibility.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n\nexport function useDocumentVisibility(): DocumentVisibilityState {\n const [documentVisibility, setDocumentVisibility] = useState<DocumentVisibilityState>('visible')\n\n useEffect(() => {\n setDocumentVisibility(document.visibilityState)\n const listener = () => setDocumentVisibility(document.visibilityState)\n document.addEventListener('visibilitychange', listener)\n return () => document.removeEventListener('visibilitychange', listener)\n }, [])\n\n return documentVisibility\n}\n"],"mappings":"6EAEA,SAAgB,uBAAiD,CAC/D,GAAM,CAAC,EAAoB,GAAyB,EAAkC,UAAU,CAShG,OAPA,MAAgB,CACd,EAAsB,SAAS,gBAAgB,CAC/C,IAAM,aAAiB,EAAsB,SAAS,gBAAgB,CAEtE,OADA,SAAS,iBAAiB,mBAAoB,SAAS,KAC1C,SAAS,oBAAoB,mBAAoB,SAAS,EACtE,EAAE,CAAC,CAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"../chunk-CHh1Zzun.js";import{useDocumentVisibility as e}from"./use-document-visibility.js";import{n as t,t as n}from"../react.esm-BuxkFT_p.js";function setDocumentVisibility(e){Object.defineProperty(document,`visibilityState`,{configurable:!0,get:()=>e})}describe(`useDocumentVisibility`,()=>{it(`uses the current document visibility on mount`,()=>{setDocumentVisibility(`hidden`);let{result:n}=t(()=>e());expect(n.current).toBe(`hidden`)}),it(`updates when the document visibility changes`,()=>{setDocumentVisibility(`visible`);let{result:r}=t(()=>e());n(()=>{setDocumentVisibility(`hidden`),document.dispatchEvent(new Event(`visibilitychange`))}),expect(r.current).toBe(`hidden`)}),it(`removes the visibility listener on unmount`,()=>{let n=vi.spyOn(document,`removeEventListener`),{unmount:r}=t(()=>e());r(),expect(n).toHaveBeenCalledWith(`visibilitychange`,expect.any(Function))})});
|
|
2
|
+
//# sourceMappingURL=use-document-visibility.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-document-visibility.spec.js","names":[],"sources":["../../src/hooks/use-document-visibility.spec.ts"],"sourcesContent":["import { act, renderHook } from '@testing-library/react'\n\nimport { useDocumentVisibility } from './use-document-visibility'\n\nfunction setDocumentVisibility(visibilityState: DocumentVisibilityState) {\n Object.defineProperty(document, 'visibilityState', {\n configurable: true,\n get: () => visibilityState\n })\n}\n\ndescribe('useDocumentVisibility', () => {\n it('uses the current document visibility on mount', () => {\n setDocumentVisibility('hidden')\n\n const { result } = renderHook(() => useDocumentVisibility())\n\n expect(result.current).toBe('hidden')\n })\n\n it('updates when the document visibility changes', () => {\n setDocumentVisibility('visible')\n const { result } = renderHook(() => useDocumentVisibility())\n\n act(() => {\n setDocumentVisibility('hidden')\n document.dispatchEvent(new Event('visibilitychange'))\n })\n\n expect(result.current).toBe('hidden')\n })\n\n it('removes the visibility listener on unmount', () => {\n const removeEventListener = vi.spyOn(document, 'removeEventListener')\n const { unmount } = renderHook(() => useDocumentVisibility())\n\n unmount()\n\n expect(removeEventListener).toHaveBeenCalledWith('visibilitychange', expect.any(Function))\n })\n})\n"],"mappings":"sJAIA,SAAS,sBAAsB,EAA0C,CACvE,OAAO,eAAe,SAAU,kBAAmB,CACjD,aAAc,GACd,QAAW,EACZ,CAAC,CAGJ,SAAS,4BAA+B,CACtC,GAAG,oDAAuD,CACxD,sBAAsB,SAAS,CAE/B,GAAM,CAAE,UAAW,MAAiB,GAAuB,CAAC,CAE5D,OAAO,EAAO,QAAQ,CAAC,KAAK,SAAS,EACrC,CAEF,GAAG,mDAAsD,CACvD,sBAAsB,UAAU,CAChC,GAAM,CAAE,UAAW,MAAiB,GAAuB,CAAC,CAE5D,MAAU,CACR,sBAAsB,SAAS,CAC/B,SAAS,cAAc,IAAI,MAAM,mBAAmB,CAAC,EACrD,CAEF,OAAO,EAAO,QAAQ,CAAC,KAAK,SAAS,EACrC,CAEF,GAAG,iDAAoD,CACrD,IAAM,EAAsB,GAAG,MAAM,SAAU,sBAAsB,CAC/D,CAAE,WAAY,MAAiB,GAAuB,CAAC,CAE7D,GAAS,CAET,OAAO,EAAoB,CAAC,qBAAqB,mBAAoB,OAAO,IAAI,SAAS,CAAC,EAC1F,EACF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { n as __name } from "../chunk-CHh1Zzun.js";
|
|
2
|
+
|
|
3
|
+
//#region src/hooks/use-idle.d.ts
|
|
4
|
+
type UseIdleOptions = {
|
|
5
|
+
events?: (keyof DocumentEventMap)[];
|
|
6
|
+
initialState?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare function useIdle(timeout: number, options?: UseIdleOptions): boolean;
|
|
9
|
+
declare namespace useIdle {
|
|
10
|
+
type Options = UseIdleOptions;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { UseIdleOptions, useIdle };
|
|
14
|
+
//# sourceMappingURL=use-idle.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"../chunk-CHh1Zzun.js";import{useEffect as e,useRef as t,useState as n}from"react";const r={events:[`keydown`,`mousemove`,`touchmove`,`click`,`scroll`,`wheel`],initialState:!0};function useIdle(i,a){let{events:o,initialState:s}={...r,...a},[c,l]=n(s),u=t(-1);return e(()=>{let handleEvents=()=>{l(!1),u.current&&window.clearTimeout(u.current),u.current=window.setTimeout(()=>{l(!0)},i)};for(let e of o)document.addEventListener(e,handleEvents);return u.current=window.setTimeout(()=>{l(!0)},i),()=>{for(let e of o)document.removeEventListener(e,handleEvents);window.clearTimeout(u.current),u.current=-1}},[i]),c}export{useIdle};
|
|
2
|
+
//# sourceMappingURL=use-idle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-idle.js","names":[],"sources":["../../src/hooks/use-idle.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react'\n\nexport type UseIdleOptions = {\n events?: (keyof DocumentEventMap)[]\n initialState?: boolean\n}\n\nconst DEFAULT_OPTIONS: Required<UseIdleOptions> = {\n events: ['keydown', 'mousemove', 'touchmove', 'click', 'scroll', 'wheel'],\n initialState: true\n}\n\nexport function useIdle(timeout: number, options?: UseIdleOptions) {\n const { events, initialState } = { ...DEFAULT_OPTIONS, ...options }\n const [idle, setIdle] = useState(initialState)\n const timer = useRef(-1)\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: should not re-execute the effect when `events` changes\n useEffect(() => {\n const handleEvents = () => {\n setIdle(false)\n\n if (timer.current) {\n window.clearTimeout(timer.current)\n }\n\n timer.current = window.setTimeout(() => {\n setIdle(true)\n }, timeout)\n }\n\n for (const event of events) {\n document.addEventListener(event, handleEvents)\n }\n\n // Start the timer immediately instead of waiting for the first event to happen\n timer.current = window.setTimeout(() => {\n setIdle(true)\n }, timeout)\n\n return () => {\n for (const event of events) {\n document.removeEventListener(event, handleEvents)\n }\n\n window.clearTimeout(timer.current)\n timer.current = -1\n }\n }, [timeout])\n\n return idle\n}\n\nexport namespace useIdle {\n export type Options = UseIdleOptions\n}\n"],"mappings":"yFAOA,MAAM,EAA4C,CAChD,OAAQ,CAAC,UAAW,YAAa,YAAa,QAAS,SAAU,QAAQ,CACzE,aAAc,GACf,CAED,SAAgB,QAAQ,EAAiB,EAA0B,CACjE,GAAM,CAAE,SAAQ,gBAAiB,CAAE,GAAG,EAAiB,GAAG,EAAS,CAC7D,CAAC,EAAM,GAAW,EAAS,EAAa,CACxC,EAAQ,EAAO,GAAG,CAmCxB,OAhCA,MAAgB,CACd,IAAM,iBAAqB,CACzB,EAAQ,GAAM,CAEV,EAAM,SACR,OAAO,aAAa,EAAM,QAAQ,CAGpC,EAAM,QAAU,OAAO,eAAiB,CACtC,EAAQ,GAAK,EACZ,EAAQ,EAGb,IAAK,IAAM,KAAS,EAClB,SAAS,iBAAiB,EAAO,aAAa,CAQhD,MAJA,GAAM,QAAU,OAAO,eAAiB,CACtC,EAAQ,GAAK,EACZ,EAAQ,KAEE,CACX,IAAK,IAAM,KAAS,EAClB,SAAS,oBAAoB,EAAO,aAAa,CAGnD,OAAO,aAAa,EAAM,QAAQ,CAClC,EAAM,QAAU,KAEjB,CAAC,EAAQ,CAAC,CAEN"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"../chunk-CHh1Zzun.js";import{useIdle as e}from"./use-idle.js";import{n as t,t as n}from"../react.esm-BuxkFT_p.js";describe(`useIdle`,()=>{it(`starts idle by default`,()=>{vi.useFakeTimers();let{result:n}=t(()=>e(1e3));expect(n.current).toBe(!0)}),it(`supports a custom initial state and becomes idle after the timeout`,()=>{vi.useFakeTimers();let{result:r}=t(()=>e(1e3,{initialState:!1}));expect(r.current).toBe(!1),n(()=>{vi.advanceTimersByTime(1e3)}),expect(r.current).toBe(!0)}),it(`becomes active on configured events and returns to idle after the timeout`,()=>{vi.useFakeTimers();let{result:r}=t(()=>e(1e3,{events:[`click`]}));n(()=>{document.dispatchEvent(new Event(`click`))}),expect(r.current).toBe(!1),n(()=>{vi.advanceTimersByTime(999)}),expect(r.current).toBe(!1),n(()=>{vi.advanceTimersByTime(1)}),expect(r.current).toBe(!0)}),it(`registers and removes only the configured event listeners`,()=>{vi.useFakeTimers();let n=vi.spyOn(document,`addEventListener`),r=vi.spyOn(document,`removeEventListener`),{unmount:i}=t(()=>e(1e3,{events:[`click`,`keydown`]}));expect(n).toHaveBeenCalledWith(`click`,expect.any(Function)),expect(n).toHaveBeenCalledWith(`keydown`,expect.any(Function)),expect(n).not.toHaveBeenCalledWith(`mousemove`,expect.any(Function)),i(),expect(r).toHaveBeenCalledWith(`click`,expect.any(Function)),expect(r).toHaveBeenCalledWith(`keydown`,expect.any(Function))}),it(`clears pending timers on unmount`,()=>{vi.useFakeTimers();let n=vi.spyOn(window,`clearTimeout`),{unmount:r}=t(()=>e(1e3));r(),expect(n).toHaveBeenCalled()})});
|
|
2
|
+
//# sourceMappingURL=use-idle.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-idle.spec.js","names":[],"sources":["../../src/hooks/use-idle.spec.ts"],"sourcesContent":["import { act, renderHook } from '@testing-library/react'\n\nimport { useIdle } from './use-idle'\n\ndescribe('useIdle', () => {\n it('starts idle by default', () => {\n vi.useFakeTimers()\n\n const { result } = renderHook(() => useIdle(1000))\n\n expect(result.current).toBe(true)\n })\n\n it('supports a custom initial state and becomes idle after the timeout', () => {\n vi.useFakeTimers()\n\n const { result } = renderHook(() => useIdle(1000, { initialState: false }))\n\n expect(result.current).toBe(false)\n\n act(() => {\n vi.advanceTimersByTime(1000)\n })\n\n expect(result.current).toBe(true)\n })\n\n it('becomes active on configured events and returns to idle after the timeout', () => {\n vi.useFakeTimers()\n\n const { result } = renderHook(() => useIdle(1000, { events: ['click'] }))\n\n act(() => {\n document.dispatchEvent(new Event('click'))\n })\n\n expect(result.current).toBe(false)\n\n act(() => {\n vi.advanceTimersByTime(999)\n })\n\n expect(result.current).toBe(false)\n\n act(() => {\n vi.advanceTimersByTime(1)\n })\n\n expect(result.current).toBe(true)\n })\n\n it('registers and removes only the configured event listeners', () => {\n vi.useFakeTimers()\n const addEventListener = vi.spyOn(document, 'addEventListener')\n const removeEventListener = vi.spyOn(document, 'removeEventListener')\n\n const { unmount } = renderHook(() => useIdle(1000, { events: ['click', 'keydown'] }))\n\n expect(addEventListener).toHaveBeenCalledWith('click', expect.any(Function))\n expect(addEventListener).toHaveBeenCalledWith('keydown', expect.any(Function))\n expect(addEventListener).not.toHaveBeenCalledWith('mousemove', expect.any(Function))\n\n unmount()\n\n expect(removeEventListener).toHaveBeenCalledWith('click', expect.any(Function))\n expect(removeEventListener).toHaveBeenCalledWith('keydown', expect.any(Function))\n })\n\n it('clears pending timers on unmount', () => {\n vi.useFakeTimers()\n const clearTimeout = vi.spyOn(window, 'clearTimeout')\n const { unmount } = renderHook(() => useIdle(1000))\n\n unmount()\n\n expect(clearTimeout).toHaveBeenCalled()\n })\n})\n"],"mappings":"yHAIA,SAAS,cAAiB,CACxB,GAAG,6BAAgC,CACjC,GAAG,eAAe,CAElB,GAAM,CAAE,UAAW,MAAiB,EAAQ,IAAK,CAAC,CAElD,OAAO,EAAO,QAAQ,CAAC,KAAK,GAAK,EACjC,CAEF,GAAG,yEAA4E,CAC7E,GAAG,eAAe,CAElB,GAAM,CAAE,UAAW,MAAiB,EAAQ,IAAM,CAAE,aAAc,GAAO,CAAC,CAAC,CAE3E,OAAO,EAAO,QAAQ,CAAC,KAAK,GAAM,CAElC,MAAU,CACR,GAAG,oBAAoB,IAAK,EAC5B,CAEF,OAAO,EAAO,QAAQ,CAAC,KAAK,GAAK,EACjC,CAEF,GAAG,gFAAmF,CACpF,GAAG,eAAe,CAElB,GAAM,CAAE,UAAW,MAAiB,EAAQ,IAAM,CAAE,OAAQ,CAAC,QAAQ,CAAE,CAAC,CAAC,CAEzE,MAAU,CACR,SAAS,cAAc,IAAI,MAAM,QAAQ,CAAC,EAC1C,CAEF,OAAO,EAAO,QAAQ,CAAC,KAAK,GAAM,CAElC,MAAU,CACR,GAAG,oBAAoB,IAAI,EAC3B,CAEF,OAAO,EAAO,QAAQ,CAAC,KAAK,GAAM,CAElC,MAAU,CACR,GAAG,oBAAoB,EAAE,EACzB,CAEF,OAAO,EAAO,QAAQ,CAAC,KAAK,GAAK,EACjC,CAEF,GAAG,gEAAmE,CACpE,GAAG,eAAe,CAClB,IAAM,EAAmB,GAAG,MAAM,SAAU,mBAAmB,CACzD,EAAsB,GAAG,MAAM,SAAU,sBAAsB,CAE/D,CAAE,WAAY,MAAiB,EAAQ,IAAM,CAAE,OAAQ,CAAC,QAAS,UAAU,CAAE,CAAC,CAAC,CAErF,OAAO,EAAiB,CAAC,qBAAqB,QAAS,OAAO,IAAI,SAAS,CAAC,CAC5E,OAAO,EAAiB,CAAC,qBAAqB,UAAW,OAAO,IAAI,SAAS,CAAC,CAC9E,OAAO,EAAiB,CAAC,IAAI,qBAAqB,YAAa,OAAO,IAAI,SAAS,CAAC,CAEpF,GAAS,CAET,OAAO,EAAoB,CAAC,qBAAqB,QAAS,OAAO,IAAI,SAAS,CAAC,CAC/E,OAAO,EAAoB,CAAC,qBAAqB,UAAW,OAAO,IAAI,SAAS,CAAC,EACjF,CAEF,GAAG,uCAA0C,CAC3C,GAAG,eAAe,CAClB,IAAM,EAAe,GAAG,MAAM,OAAQ,eAAe,CAC/C,CAAE,WAAY,MAAiB,EAAQ,IAAK,CAAC,CAEnD,GAAS,CAET,OAAO,EAAa,CAAC,kBAAkB,EACvC,EACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { n as __name } from "../chunk-CHh1Zzun.js";
|
|
2
|
+
|
|
3
|
+
//#region src/hooks/use-interval.d.ts
|
|
4
|
+
type UseIntervalOptions = {
|
|
5
|
+
/** If set, the interval will start automatically when the component is mounted, `false` by default */autoInvoke?: boolean;
|
|
6
|
+
};
|
|
7
|
+
type UseIntervalReturnValue = {
|
|
8
|
+
/** Starts the interval */start: () => void; /** Stops the interval */
|
|
9
|
+
stop: () => void; /** Toggles the interval */
|
|
10
|
+
toggle: () => void; /** Indicates if the interval is active */
|
|
11
|
+
active: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare function useInterval(fn: () => void, interval: number, {
|
|
14
|
+
autoInvoke
|
|
15
|
+
}?: UseIntervalOptions): UseIntervalReturnValue;
|
|
16
|
+
declare namespace useInterval {
|
|
17
|
+
type Options = UseIntervalOptions;
|
|
18
|
+
type ReturnValue = UseIntervalReturnValue;
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { UseIntervalOptions, UseIntervalReturnValue, useInterval };
|
|
22
|
+
//# sourceMappingURL=use-interval.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"../chunk-CHh1Zzun.js";import{useCallback as e,useEffect as t,useRef as n,useState as r}from"react";function useInterval(i,a,{autoInvoke:o=!1}={}){let s=n(null),c=n(null),l=n(a),[u,d]=r(!1);l.current=a;let f=e(()=>{d(e=>(!e&&!s.current&&(s.current=window.setInterval(c.current,l.current)),!0))},[]),p=e(()=>{d(!1),s.current&&window.clearInterval(s.current),s.current=null},[]),m=e(()=>{d(e=>e?(s.current&&window.clearInterval(s.current),s.current=null,!1):(s.current||=window.setInterval(c.current,l.current),!0))},[]);return t(()=>(c.current=i,u&&f(),p),[i,u,a,f,p]),t(()=>{o&&f()},[f]),{start:f,stop:p,toggle:m,active:u}}export{useInterval};
|
|
2
|
+
//# sourceMappingURL=use-interval.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-interval.js","names":[],"sources":["../../src/hooks/use-interval.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react'\n\nexport type UseIntervalOptions = {\n /** If set, the interval will start automatically when the component is mounted, `false` by default */\n autoInvoke?: boolean\n}\n\nexport type UseIntervalReturnValue = {\n /** Starts the interval */\n start: () => void\n\n /** Stops the interval */\n stop: () => void\n\n /** Toggles the interval */\n toggle: () => void\n\n /** Indicates if the interval is active */\n active: boolean\n}\n\nexport function useInterval(\n fn: () => void,\n interval: number,\n { autoInvoke = false }: UseIntervalOptions = {}\n): UseIntervalReturnValue {\n const intervalRef = useRef<number | null>(null)\n const fnRef = useRef<() => void>(null)\n const intervalValueRef = useRef(interval)\n\n const [active, setActive] = useState(false)\n\n intervalValueRef.current = interval\n\n const start = useCallback(() => {\n setActive((old) => {\n if (!old && !intervalRef.current) {\n intervalRef.current = window.setInterval(fnRef.current!, intervalValueRef.current)\n }\n return true\n })\n }, [])\n\n const stop = useCallback(() => {\n setActive(false)\n if (intervalRef.current) {\n window.clearInterval(intervalRef.current)\n }\n intervalRef.current = null\n }, [])\n\n const toggle = useCallback(() => {\n setActive((current) => {\n if (current) {\n if (intervalRef.current) {\n window.clearInterval(intervalRef.current)\n }\n intervalRef.current = null\n return false\n }\n if (!intervalRef.current) {\n intervalRef.current = window.setInterval(fnRef.current!, intervalValueRef.current)\n }\n return true\n })\n }, [])\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: should includes the 'interval'\n useEffect(() => {\n fnRef.current = fn\n active && start()\n return stop\n }, [fn, active, interval, start, stop])\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: should execute only once\n useEffect(() => {\n if (autoInvoke) {\n start()\n }\n }, [start])\n\n return { start, stop, toggle, active }\n}\n\nexport namespace useInterval {\n export type Options = UseIntervalOptions\n export type ReturnValue = UseIntervalReturnValue\n}\n"],"mappings":"0GAqBA,SAAgB,YACd,EACA,EACA,CAAE,aAAa,IAA8B,EAAE,CACvB,CACxB,IAAM,EAAc,EAAsB,KAAK,CACzC,EAAQ,EAAmB,KAAK,CAChC,EAAmB,EAAO,EAAS,CAEnC,CAAC,EAAQ,GAAa,EAAS,GAAM,CAE3C,EAAiB,QAAU,EAE3B,IAAM,EAAQ,MAAkB,CAC9B,EAAW,IACL,CAAC,GAAO,CAAC,EAAY,UACvB,EAAY,QAAU,OAAO,YAAY,EAAM,QAAU,EAAiB,QAAQ,EAE7E,IACP,EACD,EAAE,CAAC,CAEA,EAAO,MAAkB,CAC7B,EAAU,GAAM,CACZ,EAAY,SACd,OAAO,cAAc,EAAY,QAAQ,CAE3C,EAAY,QAAU,MACrB,EAAE,CAAC,CAEA,EAAS,MAAkB,CAC/B,EAAW,GACL,GACE,EAAY,SACd,OAAO,cAAc,EAAY,QAAQ,CAE3C,EAAY,QAAU,KACf,KAET,AACE,EAAY,UAAU,OAAO,YAAY,EAAM,QAAU,EAAiB,QAAQ,CAE7E,IACP,EACD,EAAE,CAAC,CAgBN,OAbA,OACE,EAAM,QAAU,EAChB,GAAU,GAAO,CACV,GACN,CAAC,EAAI,EAAQ,EAAU,EAAO,EAAK,CAAC,CAGvC,MAAgB,CACV,GACF,GAAO,EAER,CAAC,EAAM,CAAC,CAEJ,CAAE,QAAO,OAAM,SAAQ,SAAQ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"../chunk-CHh1Zzun.js";import{useInterval as e}from"./use-interval.js";import{n as t,t as n}from"../react.esm-BuxkFT_p.js";describe(`useInterval`,()=>{it(`does not start by default`,()=>{vi.useFakeTimers();let r=vi.fn(),{result:i}=t(()=>e(r,1e3));expect(i.current.active).toBe(!1),n(()=>{vi.advanceTimersByTime(1e3)}),expect(r).not.toHaveBeenCalled()}),it(`starts and stops the interval`,()=>{vi.useFakeTimers();let r=vi.fn(),{result:i}=t(()=>e(r,1e3));n(()=>i.current.start()),expect(i.current.active).toBe(!0),n(()=>{vi.advanceTimersByTime(3e3)}),expect(r).toHaveBeenCalledTimes(3),n(()=>i.current.stop()),expect(i.current.active).toBe(!1),n(()=>{vi.advanceTimersByTime(1e3)}),expect(r).toHaveBeenCalledTimes(3)}),it(`toggles the interval`,()=>{vi.useFakeTimers();let r=vi.fn(),{result:i}=t(()=>e(r,1e3));n(()=>i.current.toggle()),expect(i.current.active).toBe(!0),n(()=>{vi.advanceTimersByTime(1e3)}),expect(r).toHaveBeenCalledTimes(1),n(()=>i.current.toggle()),expect(i.current.active).toBe(!1),n(()=>{vi.advanceTimersByTime(1e3)}),expect(r).toHaveBeenCalledTimes(1)}),it(`starts automatically when autoInvoke is enabled`,()=>{vi.useFakeTimers();let r=vi.fn(),{result:i}=t(()=>e(r,1e3,{autoInvoke:!0}));expect(i.current.active).toBe(!0),n(()=>{vi.advanceTimersByTime(1e3)}),expect(r).toHaveBeenCalledTimes(1)}),it(`uses the latest callback after rerendering`,()=>{vi.useFakeTimers();let r=vi.fn(),i=vi.fn(),{result:a,rerender:o}=t(({callback:t})=>e(t,1e3),{initialProps:{callback:r}});n(()=>a.current.start()),n(()=>{vi.advanceTimersByTime(1e3)}),o({callback:i}),n(()=>{vi.advanceTimersByTime(1e3)}),expect(r).toHaveBeenCalledTimes(1),expect(i).toHaveBeenCalledTimes(1)}),it(`cleans the interval on unmount`,()=>{vi.useFakeTimers();let r=vi.fn(),{result:i,unmount:a}=t(()=>e(r,1e3));n(()=>i.current.start()),a(),n(()=>{vi.advanceTimersByTime(1e3)}),expect(r).not.toHaveBeenCalled()})});
|
|
2
|
+
//# sourceMappingURL=use-interval.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-interval.spec.js","names":[],"sources":["../../src/hooks/use-interval.spec.ts"],"sourcesContent":["import { act, renderHook } from '@testing-library/react'\n\nimport { useInterval } from './use-interval'\n\ndescribe('useInterval', () => {\n it('does not start by default', () => {\n vi.useFakeTimers()\n const callback = vi.fn()\n\n const { result } = renderHook(() => useInterval(callback, 1000))\n\n expect(result.current.active).toBe(false)\n\n act(() => {\n vi.advanceTimersByTime(1000)\n })\n\n expect(callback).not.toHaveBeenCalled()\n })\n\n it('starts and stops the interval', () => {\n vi.useFakeTimers()\n const callback = vi.fn()\n const { result } = renderHook(() => useInterval(callback, 1000))\n\n act(() => result.current.start())\n expect(result.current.active).toBe(true)\n\n act(() => {\n vi.advanceTimersByTime(3000)\n })\n\n expect(callback).toHaveBeenCalledTimes(3)\n\n act(() => result.current.stop())\n expect(result.current.active).toBe(false)\n\n act(() => {\n vi.advanceTimersByTime(1000)\n })\n\n expect(callback).toHaveBeenCalledTimes(3)\n })\n\n it('toggles the interval', () => {\n vi.useFakeTimers()\n const callback = vi.fn()\n const { result } = renderHook(() => useInterval(callback, 1000))\n\n act(() => result.current.toggle())\n expect(result.current.active).toBe(true)\n\n act(() => {\n vi.advanceTimersByTime(1000)\n })\n\n expect(callback).toHaveBeenCalledTimes(1)\n\n act(() => result.current.toggle())\n expect(result.current.active).toBe(false)\n\n act(() => {\n vi.advanceTimersByTime(1000)\n })\n\n expect(callback).toHaveBeenCalledTimes(1)\n })\n\n it('starts automatically when autoInvoke is enabled', () => {\n vi.useFakeTimers()\n const callback = vi.fn()\n\n const { result } = renderHook(() => useInterval(callback, 1000, { autoInvoke: true }))\n\n expect(result.current.active).toBe(true)\n\n act(() => {\n vi.advanceTimersByTime(1000)\n })\n\n expect(callback).toHaveBeenCalledTimes(1)\n })\n\n it('uses the latest callback after rerendering', () => {\n vi.useFakeTimers()\n const firstCallback = vi.fn()\n const secondCallback = vi.fn()\n const { result, rerender } = renderHook(({ callback }) => useInterval(callback, 1000), {\n initialProps: { callback: firstCallback }\n })\n\n act(() => result.current.start())\n act(() => {\n vi.advanceTimersByTime(1000)\n })\n\n rerender({ callback: secondCallback })\n\n act(() => {\n vi.advanceTimersByTime(1000)\n })\n\n expect(firstCallback).toHaveBeenCalledTimes(1)\n expect(secondCallback).toHaveBeenCalledTimes(1)\n })\n\n it('cleans the interval on unmount', () => {\n vi.useFakeTimers()\n const callback = vi.fn()\n const { result, unmount } = renderHook(() => useInterval(callback, 1000))\n\n act(() => result.current.start())\n unmount()\n\n act(() => {\n vi.advanceTimersByTime(1000)\n })\n\n expect(callback).not.toHaveBeenCalled()\n })\n})\n"],"mappings":"iIAIA,SAAS,kBAAqB,CAC5B,GAAG,gCAAmC,CACpC,GAAG,eAAe,CAClB,IAAM,EAAW,GAAG,IAAI,CAElB,CAAE,UAAW,MAAiB,EAAY,EAAU,IAAK,CAAC,CAEhE,OAAO,EAAO,QAAQ,OAAO,CAAC,KAAK,GAAM,CAEzC,MAAU,CACR,GAAG,oBAAoB,IAAK,EAC5B,CAEF,OAAO,EAAS,CAAC,IAAI,kBAAkB,EACvC,CAEF,GAAG,oCAAuC,CACxC,GAAG,eAAe,CAClB,IAAM,EAAW,GAAG,IAAI,CAClB,CAAE,UAAW,MAAiB,EAAY,EAAU,IAAK,CAAC,CAEhE,MAAU,EAAO,QAAQ,OAAO,CAAC,CACjC,OAAO,EAAO,QAAQ,OAAO,CAAC,KAAK,GAAK,CAExC,MAAU,CACR,GAAG,oBAAoB,IAAK,EAC5B,CAEF,OAAO,EAAS,CAAC,sBAAsB,EAAE,CAEzC,MAAU,EAAO,QAAQ,MAAM,CAAC,CAChC,OAAO,EAAO,QAAQ,OAAO,CAAC,KAAK,GAAM,CAEzC,MAAU,CACR,GAAG,oBAAoB,IAAK,EAC5B,CAEF,OAAO,EAAS,CAAC,sBAAsB,EAAE,EACzC,CAEF,GAAG,2BAA8B,CAC/B,GAAG,eAAe,CAClB,IAAM,EAAW,GAAG,IAAI,CAClB,CAAE,UAAW,MAAiB,EAAY,EAAU,IAAK,CAAC,CAEhE,MAAU,EAAO,QAAQ,QAAQ,CAAC,CAClC,OAAO,EAAO,QAAQ,OAAO,CAAC,KAAK,GAAK,CAExC,MAAU,CACR,GAAG,oBAAoB,IAAK,EAC5B,CAEF,OAAO,EAAS,CAAC,sBAAsB,EAAE,CAEzC,MAAU,EAAO,QAAQ,QAAQ,CAAC,CAClC,OAAO,EAAO,QAAQ,OAAO,CAAC,KAAK,GAAM,CAEzC,MAAU,CACR,GAAG,oBAAoB,IAAK,EAC5B,CAEF,OAAO,EAAS,CAAC,sBAAsB,EAAE,EACzC,CAEF,GAAG,sDAAyD,CAC1D,GAAG,eAAe,CAClB,IAAM,EAAW,GAAG,IAAI,CAElB,CAAE,UAAW,MAAiB,EAAY,EAAU,IAAM,CAAE,WAAY,GAAM,CAAC,CAAC,CAEtF,OAAO,EAAO,QAAQ,OAAO,CAAC,KAAK,GAAK,CAExC,MAAU,CACR,GAAG,oBAAoB,IAAK,EAC5B,CAEF,OAAO,EAAS,CAAC,sBAAsB,EAAE,EACzC,CAEF,GAAG,iDAAoD,CACrD,GAAG,eAAe,CAClB,IAAM,EAAgB,GAAG,IAAI,CACvB,EAAiB,GAAG,IAAI,CACxB,CAAE,SAAQ,YAAa,GAAY,CAAE,cAAe,EAAY,EAAU,IAAK,CAAE,CACrF,aAAc,CAAE,SAAU,EAAe,CAC1C,CAAC,CAEF,MAAU,EAAO,QAAQ,OAAO,CAAC,CACjC,MAAU,CACR,GAAG,oBAAoB,IAAK,EAC5B,CAEF,EAAS,CAAE,SAAU,EAAgB,CAAC,CAEtC,MAAU,CACR,GAAG,oBAAoB,IAAK,EAC5B,CAEF,OAAO,EAAc,CAAC,sBAAsB,EAAE,CAC9C,OAAO,EAAe,CAAC,sBAAsB,EAAE,EAC/C,CAEF,GAAG,qCAAwC,CACzC,GAAG,eAAe,CAClB,IAAM,EAAW,GAAG,IAAI,CAClB,CAAE,SAAQ,WAAY,MAAiB,EAAY,EAAU,IAAK,CAAC,CAEzE,MAAU,EAAO,QAAQ,OAAO,CAAC,CACjC,GAAS,CAET,MAAU,CACR,GAAG,oBAAoB,IAAK,EAC5B,CAEF,OAAO,EAAS,CAAC,IAAI,kBAAkB,EACvC,EACF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { n as __name } from "../chunk-CHh1Zzun.js";
|
|
2
|
+
|
|
3
|
+
//#region src/hooks/use-local-storage.d.ts
|
|
4
|
+
type UseLocalStorageOptions<T> = {
|
|
5
|
+
defaultValue?: T;
|
|
6
|
+
sync?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare function useLocalStorage<T>(key: string, options: UseLocalStorageOptions<T> & {
|
|
9
|
+
defaultValue: T;
|
|
10
|
+
}): [T, React.Dispatch<React.SetStateAction<T>>];
|
|
11
|
+
declare function useLocalStorage<T = undefined>(key: string, options?: UseLocalStorageOptions<T>): [T | undefined, React.Dispatch<React.SetStateAction<T | undefined>>];
|
|
12
|
+
declare namespace useLocalStorage {
|
|
13
|
+
type Options<T> = UseLocalStorageOptions<T>;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { UseLocalStorageOptions, useLocalStorage };
|
|
17
|
+
//# sourceMappingURL=use-local-storage.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"../chunk-CHh1Zzun.js";import{useCallback as e,useEffect as t,useRef as n,useState as r}from"react";function parseStorageValue(e){try{return JSON.parse(e)}catch{return e}}function readStorageValue(e,t){if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return n===null?t:parseStorageValue(n)}catch{return t}}function writeStorageValue(e,t){if(!(typeof window>`u`))try{window.localStorage.setItem(e,String(JSON.stringify(t)))}catch{}}function useLocalStorage(i,a={}){let{defaultValue:o,sync:s=!0}=a,c=n(o),[l,u]=r(()=>readStorageValue(i,o)),d=n(l);c.current=o,d.current=l;let f=e(e=>{let t=typeof e==`function`?e(d.current):e;d.current=t,writeStorageValue(i,t),u(t)},[i]);return t(()=>{if(!s||typeof window>`u`)return;let handleStorage=e=>{if(e.storageArea!==window.localStorage||e.key!==i)return;let t=e.newValue===null?c.current:parseStorageValue(e.newValue);d.current=t,u(t)};return window.addEventListener(`storage`,handleStorage),()=>window.removeEventListener(`storage`,handleStorage)},[i,s]),[l,f]}export{useLocalStorage};
|
|
2
|
+
//# sourceMappingURL=use-local-storage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-local-storage.js","names":[],"sources":["../../src/hooks/use-local-storage.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react'\n\nexport type UseLocalStorageOptions<T> = {\n defaultValue?: T\n sync?: boolean\n}\n\nfunction parseStorageValue<T>(value: string) {\n try {\n return JSON.parse(value) as T\n } catch {\n return value as T\n }\n}\n\nfunction readStorageValue<T>(key: string, defaultValue: T | undefined) {\n if (typeof window === 'undefined') {\n return defaultValue\n }\n\n try {\n const item = window.localStorage.getItem(key)\n\n if (item === null) {\n return defaultValue\n }\n\n return parseStorageValue<T>(item)\n } catch {\n return defaultValue\n }\n}\n\nfunction writeStorageValue<T>(key: string, value: T) {\n if (typeof window === 'undefined') {\n return\n }\n\n try {\n window.localStorage.setItem(key, String(JSON.stringify(value)))\n } catch {}\n}\n\nexport function useLocalStorage<T>(\n key: string,\n options: UseLocalStorageOptions<T> & { defaultValue: T }\n): [T, React.Dispatch<React.SetStateAction<T>>]\n\nexport function useLocalStorage<T = undefined>(\n key: string,\n options?: UseLocalStorageOptions<T>\n): [T | undefined, React.Dispatch<React.SetStateAction<T | undefined>>]\n\nexport function useLocalStorage<T>(key: string, options: UseLocalStorageOptions<T> = {}) {\n const { defaultValue, sync = true } = options\n const defaultValueRef = useRef(defaultValue)\n const [storedValue, setStoredValue] = useState<T | undefined>(() => readStorageValue<T>(key, defaultValue))\n const storedValueRef = useRef(storedValue)\n\n defaultValueRef.current = defaultValue\n storedValueRef.current = storedValue\n\n const setValue = useCallback<React.Dispatch<React.SetStateAction<T | undefined>>>(\n (value) => {\n const nextValue =\n typeof value === 'function'\n ? (value as (previousValue: T | undefined) => T | undefined)(storedValueRef.current)\n : value\n\n storedValueRef.current = nextValue\n writeStorageValue(key, nextValue)\n setStoredValue(nextValue)\n },\n [key]\n )\n\n useEffect(() => {\n if (!sync || typeof window === 'undefined') {\n return\n }\n\n const handleStorage = (event: StorageEvent) => {\n if (event.storageArea !== window.localStorage || event.key !== key) {\n return\n }\n\n const nextValue = event.newValue === null ? defaultValueRef.current : parseStorageValue<T>(event.newValue)\n\n storedValueRef.current = nextValue\n setStoredValue(nextValue)\n }\n\n window.addEventListener('storage', handleStorage)\n\n return () => window.removeEventListener('storage', handleStorage)\n }, [key, sync])\n\n return [storedValue, setValue]\n}\n\nexport namespace useLocalStorage {\n export type Options<T> = UseLocalStorageOptions<T>\n}\n"],"mappings":"0GAOA,SAAS,kBAAqB,EAAe,CAC3C,GAAI,CACF,OAAO,KAAK,MAAM,EAAM,MAClB,CACN,OAAO,GAIX,SAAS,iBAAoB,EAAa,EAA6B,CACrE,GAAI,OAAO,OAAW,IACpB,OAAO,EAGT,GAAI,CACF,IAAM,EAAO,OAAO,aAAa,QAAQ,EAAI,CAM7C,OAJI,IAAS,KACJ,EAGF,kBAAqB,EAAK,MAC3B,CACN,OAAO,GAIX,SAAS,kBAAqB,EAAa,EAAU,CAC/C,YAAO,OAAW,KAItB,GAAI,CACF,OAAO,aAAa,QAAQ,EAAK,OAAO,KAAK,UAAU,EAAM,CAAC,CAAC,MACzD,GAaV,SAAgB,gBAAmB,EAAa,EAAqC,EAAE,CAAE,CACvF,GAAM,CAAE,eAAc,OAAO,IAAS,EAChC,EAAkB,EAAO,EAAa,CACtC,CAAC,EAAa,GAAkB,MAA8B,iBAAoB,EAAK,EAAa,CAAC,CACrG,EAAiB,EAAO,EAAY,CAE1C,EAAgB,QAAU,EAC1B,EAAe,QAAU,EAEzB,IAAM,EAAW,EACd,GAAU,CACT,IAAM,EACJ,OAAO,GAAU,WACZ,EAA0D,EAAe,QAAQ,CAClF,EAEN,EAAe,QAAU,EACzB,kBAAkB,EAAK,EAAU,CACjC,EAAe,EAAU,EAE3B,CAAC,EAAI,CACN,CAuBD,OArBA,MAAgB,CACd,GAAI,CAAC,GAAQ,OAAO,OAAW,IAC7B,OAGF,IAAM,cAAiB,GAAwB,CAC7C,GAAI,EAAM,cAAgB,OAAO,cAAgB,EAAM,MAAQ,EAC7D,OAGF,IAAM,EAAY,EAAM,WAAa,KAAO,EAAgB,QAAU,kBAAqB,EAAM,SAAS,CAE1G,EAAe,QAAU,EACzB,EAAe,EAAU,EAK3B,OAFA,OAAO,iBAAiB,UAAW,cAAc,KAEpC,OAAO,oBAAoB,UAAW,cAAc,EAChE,CAAC,EAAK,EAAK,CAAC,CAER,CAAC,EAAa,EAAS"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"../chunk-CHh1Zzun.js";import{useLocalStorage as e}from"./use-local-storage.js";import{n as t,t as n}from"../react.esm-BuxkFT_p.js";describe(`useLocalStorage`,()=>{it(`returns the default value when storage is empty`,()=>{let{result:n}=t(()=>e(`settings`,{defaultValue:{compact:!1}}));expect(n.current[0]).toEqual({compact:!1})}),it(`reads an existing JSON value from localStorage`,()=>{window.localStorage.setItem(`settings`,JSON.stringify({compact:!0}));let{result:n}=t(()=>e(`settings`,{defaultValue:{compact:!1}}));expect(n.current[0]).toEqual({compact:!0})}),it(`writes serialized values to localStorage`,()=>{let{result:r}=t(()=>e(`settings`,{defaultValue:{compact:!1}}));n(()=>r.current[1]({compact:!0})),expect(r.current[0]).toEqual({compact:!0}),expect(window.localStorage.getItem(`settings`)).toBe(JSON.stringify({compact:!0}))}),it(`supports functional updates`,()=>{let{result:r}=t(()=>e(`count`,{defaultValue:1}));n(()=>r.current[1](e=>e+1)),expect(r.current[0]).toBe(2),expect(window.localStorage.getItem(`count`)).toBe(`2`)}),it(`syncs updates from storage events for the same key`,()=>{let{result:r}=t(()=>e(`settings`,{defaultValue:{compact:!1}}));n(()=>{window.dispatchEvent(new StorageEvent(`storage`,{key:`settings`,newValue:JSON.stringify({compact:!0}),storageArea:window.localStorage}))}),expect(r.current[0]).toEqual({compact:!0})}),it(`ignores storage events for other keys`,()=>{let{result:r}=t(()=>e(`settings`,{defaultValue:{compact:!1}}));n(()=>{window.dispatchEvent(new StorageEvent(`storage`,{key:`profile`,newValue:JSON.stringify({compact:!0}),storageArea:window.localStorage}))}),expect(r.current[0]).toEqual({compact:!1})}),it(`does not subscribe to storage events when sync is disabled`,()=>{let{result:r}=t(()=>e(`settings`,{defaultValue:{compact:!1},sync:!1}));n(()=>{window.dispatchEvent(new StorageEvent(`storage`,{key:`settings`,newValue:JSON.stringify({compact:!0}),storageArea:window.localStorage}))}),expect(r.current[0]).toEqual({compact:!1})})});
|
|
2
|
+
//# sourceMappingURL=use-local-storage.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-local-storage.spec.js","names":[],"sources":["../../src/hooks/use-local-storage.spec.ts"],"sourcesContent":["import { act, renderHook } from '@testing-library/react'\n\nimport { useLocalStorage } from './use-local-storage'\n\ndescribe('useLocalStorage', () => {\n it('returns the default value when storage is empty', () => {\n const { result } = renderHook(() => useLocalStorage('settings', { defaultValue: { compact: false } }))\n\n expect(result.current[0]).toEqual({ compact: false })\n })\n\n it('reads an existing JSON value from localStorage', () => {\n window.localStorage.setItem('settings', JSON.stringify({ compact: true }))\n\n const { result } = renderHook(() => useLocalStorage('settings', { defaultValue: { compact: false } }))\n\n expect(result.current[0]).toEqual({ compact: true })\n })\n\n it('writes serialized values to localStorage', () => {\n const { result } = renderHook(() => useLocalStorage('settings', { defaultValue: { compact: false } }))\n\n act(() => result.current[1]({ compact: true }))\n\n expect(result.current[0]).toEqual({ compact: true })\n expect(window.localStorage.getItem('settings')).toBe(JSON.stringify({ compact: true }))\n })\n\n it('supports functional updates', () => {\n const { result } = renderHook(() => useLocalStorage('count', { defaultValue: 1 }))\n\n act(() => result.current[1]((current) => current + 1))\n\n expect(result.current[0]).toBe(2)\n expect(window.localStorage.getItem('count')).toBe('2')\n })\n\n it('syncs updates from storage events for the same key', () => {\n const { result } = renderHook(() => useLocalStorage('settings', { defaultValue: { compact: false } }))\n\n act(() => {\n window.dispatchEvent(\n new StorageEvent('storage', {\n key: 'settings',\n newValue: JSON.stringify({ compact: true }),\n storageArea: window.localStorage\n })\n )\n })\n\n expect(result.current[0]).toEqual({ compact: true })\n })\n\n it('ignores storage events for other keys', () => {\n const { result } = renderHook(() => useLocalStorage('settings', { defaultValue: { compact: false } }))\n\n act(() => {\n window.dispatchEvent(\n new StorageEvent('storage', {\n key: 'profile',\n newValue: JSON.stringify({ compact: true }),\n storageArea: window.localStorage\n })\n )\n })\n\n expect(result.current[0]).toEqual({ compact: false })\n })\n\n it('does not subscribe to storage events when sync is disabled', () => {\n const { result } = renderHook(() =>\n useLocalStorage('settings', {\n defaultValue: { compact: false },\n sync: false\n })\n )\n\n act(() => {\n window.dispatchEvent(\n new StorageEvent('storage', {\n key: 'settings',\n newValue: JSON.stringify({ compact: true }),\n storageArea: window.localStorage\n })\n )\n })\n\n expect(result.current[0]).toEqual({ compact: false })\n })\n})\n"],"mappings":"0IAIA,SAAS,sBAAyB,CAChC,GAAG,sDAAyD,CAC1D,GAAM,CAAE,UAAW,MAAiB,EAAgB,WAAY,CAAE,aAAc,CAAE,QAAS,GAAO,CAAE,CAAC,CAAC,CAEtG,OAAO,EAAO,QAAQ,GAAG,CAAC,QAAQ,CAAE,QAAS,GAAO,CAAC,EACrD,CAEF,GAAG,qDAAwD,CACzD,OAAO,aAAa,QAAQ,WAAY,KAAK,UAAU,CAAE,QAAS,GAAM,CAAC,CAAC,CAE1E,GAAM,CAAE,UAAW,MAAiB,EAAgB,WAAY,CAAE,aAAc,CAAE,QAAS,GAAO,CAAE,CAAC,CAAC,CAEtG,OAAO,EAAO,QAAQ,GAAG,CAAC,QAAQ,CAAE,QAAS,GAAM,CAAC,EACpD,CAEF,GAAG,+CAAkD,CACnD,GAAM,CAAE,UAAW,MAAiB,EAAgB,WAAY,CAAE,aAAc,CAAE,QAAS,GAAO,CAAE,CAAC,CAAC,CAEtG,MAAU,EAAO,QAAQ,GAAG,CAAE,QAAS,GAAM,CAAC,CAAC,CAE/C,OAAO,EAAO,QAAQ,GAAG,CAAC,QAAQ,CAAE,QAAS,GAAM,CAAC,CACpD,OAAO,OAAO,aAAa,QAAQ,WAAW,CAAC,CAAC,KAAK,KAAK,UAAU,CAAE,QAAS,GAAM,CAAC,CAAC,EACvF,CAEF,GAAG,kCAAqC,CACtC,GAAM,CAAE,UAAW,MAAiB,EAAgB,QAAS,CAAE,aAAc,EAAG,CAAC,CAAC,CAElF,MAAU,EAAO,QAAQ,GAAI,GAAY,EAAU,EAAE,CAAC,CAEtD,OAAO,EAAO,QAAQ,GAAG,CAAC,KAAK,EAAE,CACjC,OAAO,OAAO,aAAa,QAAQ,QAAQ,CAAC,CAAC,KAAK,IAAI,EACtD,CAEF,GAAG,yDAA4D,CAC7D,GAAM,CAAE,UAAW,MAAiB,EAAgB,WAAY,CAAE,aAAc,CAAE,QAAS,GAAO,CAAE,CAAC,CAAC,CAEtG,MAAU,CACR,OAAO,cACL,IAAI,aAAa,UAAW,CAC1B,IAAK,WACL,SAAU,KAAK,UAAU,CAAE,QAAS,GAAM,CAAC,CAC3C,YAAa,OAAO,aACrB,CAAC,CACH,EACD,CAEF,OAAO,EAAO,QAAQ,GAAG,CAAC,QAAQ,CAAE,QAAS,GAAM,CAAC,EACpD,CAEF,GAAG,4CAA+C,CAChD,GAAM,CAAE,UAAW,MAAiB,EAAgB,WAAY,CAAE,aAAc,CAAE,QAAS,GAAO,CAAE,CAAC,CAAC,CAEtG,MAAU,CACR,OAAO,cACL,IAAI,aAAa,UAAW,CAC1B,IAAK,UACL,SAAU,KAAK,UAAU,CAAE,QAAS,GAAM,CAAC,CAC3C,YAAa,OAAO,aACrB,CAAC,CACH,EACD,CAEF,OAAO,EAAO,QAAQ,GAAG,CAAC,QAAQ,CAAE,QAAS,GAAO,CAAC,EACrD,CAEF,GAAG,iEAAoE,CACrE,GAAM,CAAE,UAAW,MACjB,EAAgB,WAAY,CAC1B,aAAc,CAAE,QAAS,GAAO,CAChC,KAAM,GACP,CAAC,CACH,CAED,MAAU,CACR,OAAO,cACL,IAAI,aAAa,UAAW,CAC1B,IAAK,WACL,SAAU,KAAK,UAAU,CAAE,QAAS,GAAM,CAAC,CAC3C,YAAa,OAAO,aACrB,CAAC,CACH,EACD,CAEF,OAAO,EAAO,QAAQ,GAAG,CAAC,QAAQ,CAAE,QAAS,GAAO,CAAC,EACrD,EACF"}
|
package/dist/hooks/use-mobile.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-
|
|
1
|
+
import"../chunk-CHh1Zzun.js";import*as e from"react";function useIsMobile(){let[t,n]=e.useState(void 0);return e.useEffect(()=>{let e=window.matchMedia(`(max-width: 767px)`),onChange=()=>{n(window.innerWidth<768)};return e.addEventListener(`change`,onChange),n(window.innerWidth<768),()=>e.removeEventListener(`change`,onChange)},[]),!!t}export{useIsMobile};
|
|
2
2
|
//# sourceMappingURL=use-mobile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"../chunk-CHh1Zzun.js";import{useIsMobile as e}from"./use-mobile.js";import{n as t,t as n}from"../react.esm-BuxkFT_p.js";describe(`useIsMobile`,()=>{it(`returns true below the mobile breakpoint`,()=>{globalThis.setTestViewportWidth(767);let{result:n}=t(()=>e());expect(n.current).toBe(!0)}),it(`returns false at the mobile breakpoint`,()=>{globalThis.setTestViewportWidth(768);let{result:n}=t(()=>e());expect(n.current).toBe(!1)}),it(`updates when the media query changes`,()=>{globalThis.setTestViewportWidth(1024);let{result:r}=t(()=>e());expect(r.current).toBe(!1),n(()=>{globalThis.setTestViewportWidth(500)}),expect(r.current).toBe(!0),n(()=>{globalThis.setTestViewportWidth(900)}),expect(r.current).toBe(!1)}),it(`removes the media query listener on unmount`,()=>{let n=vi.fn();vi.spyOn(window,`matchMedia`).mockReturnValue({matches:!1,media:`(max-width: 767px)`,onchange:null,addEventListener:vi.fn(),removeEventListener:n,dispatchEvent:vi.fn(),addListener:vi.fn(),removeListener:vi.fn()});let{unmount:r}=t(()=>e());r(),expect(n).toHaveBeenCalledWith(`change`,expect.any(Function))})});
|
|
2
|
+
//# sourceMappingURL=use-mobile.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-mobile.spec.js","names":[],"sources":["../../src/hooks/use-mobile.spec.ts"],"sourcesContent":["import { act, renderHook } from '@testing-library/react'\n\nimport { useIsMobile } from './use-mobile'\n\ndescribe('useIsMobile', () => {\n it('returns true below the mobile breakpoint', () => {\n globalThis.setTestViewportWidth(767)\n\n const { result } = renderHook(() => useIsMobile())\n\n expect(result.current).toBe(true)\n })\n\n it('returns false at the mobile breakpoint', () => {\n globalThis.setTestViewportWidth(768)\n\n const { result } = renderHook(() => useIsMobile())\n\n expect(result.current).toBe(false)\n })\n\n it('updates when the media query changes', () => {\n globalThis.setTestViewportWidth(1024)\n const { result } = renderHook(() => useIsMobile())\n\n expect(result.current).toBe(false)\n\n act(() => {\n globalThis.setTestViewportWidth(500)\n })\n expect(result.current).toBe(true)\n\n act(() => {\n globalThis.setTestViewportWidth(900)\n })\n expect(result.current).toBe(false)\n })\n\n it('removes the media query listener on unmount', () => {\n const removeEventListener = vi.fn()\n\n vi.spyOn(window, 'matchMedia').mockReturnValue({\n matches: false,\n media: '(max-width: 767px)',\n onchange: null,\n addEventListener: vi.fn(),\n removeEventListener,\n dispatchEvent: vi.fn(),\n addListener: vi.fn(),\n removeListener: vi.fn()\n })\n\n const { unmount } = renderHook(() => useIsMobile())\n\n unmount()\n\n expect(removeEventListener).toHaveBeenCalledWith('change', expect.any(Function))\n })\n})\n"],"mappings":"+HAIA,SAAS,kBAAqB,CAC5B,GAAG,+CAAkD,CACnD,WAAW,qBAAqB,IAAI,CAEpC,GAAM,CAAE,UAAW,MAAiB,GAAa,CAAC,CAElD,OAAO,EAAO,QAAQ,CAAC,KAAK,GAAK,EACjC,CAEF,GAAG,6CAAgD,CACjD,WAAW,qBAAqB,IAAI,CAEpC,GAAM,CAAE,UAAW,MAAiB,GAAa,CAAC,CAElD,OAAO,EAAO,QAAQ,CAAC,KAAK,GAAM,EAClC,CAEF,GAAG,2CAA8C,CAC/C,WAAW,qBAAqB,KAAK,CACrC,GAAM,CAAE,UAAW,MAAiB,GAAa,CAAC,CAElD,OAAO,EAAO,QAAQ,CAAC,KAAK,GAAM,CAElC,MAAU,CACR,WAAW,qBAAqB,IAAI,EACpC,CACF,OAAO,EAAO,QAAQ,CAAC,KAAK,GAAK,CAEjC,MAAU,CACR,WAAW,qBAAqB,IAAI,EACpC,CACF,OAAO,EAAO,QAAQ,CAAC,KAAK,GAAM,EAClC,CAEF,GAAG,kDAAqD,CACtD,IAAM,EAAsB,GAAG,IAAI,CAEnC,GAAG,MAAM,OAAQ,aAAa,CAAC,gBAAgB,CAC7C,QAAS,GACT,MAAO,qBACP,SAAU,KACV,iBAAkB,GAAG,IAAI,CACzB,sBACA,cAAe,GAAG,IAAI,CACtB,YAAa,GAAG,IAAI,CACpB,eAAgB,GAAG,IAAI,CACxB,CAAC,CAEF,GAAM,CAAE,WAAY,MAAiB,GAAa,CAAC,CAEnD,GAAS,CAET,OAAO,EAAoB,CAAC,qBAAqB,SAAU,OAAO,IAAI,SAAS,CAAC,EAChF,EACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { Badge, BadgeProps, badgeVariants } from "./components/badge.js";
|
|
|
8
8
|
import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbEllipsisProps, BreadcrumbItem, BreadcrumbItemProps, BreadcrumbLink, BreadcrumbLinkProps, BreadcrumbList, BreadcrumbListProps, BreadcrumbPage, BreadcrumbPageProps, BreadcrumbProps, BreadcrumbSeparator, BreadcrumbSeparatorProps } from "./components/breadcrumb.js";
|
|
9
9
|
import { Separator, SeparatorProps } from "./components/separator.js";
|
|
10
10
|
import { ButtonGroup, ButtonGroupProps, ButtonGroupSeparator, ButtonGroupSeparatorProps, ButtonGroupText, ButtonGroupTextProps, buttonGroupVariants } from "./components/button-group.js";
|
|
11
|
-
import { Calendar, CalendarDayButton, CalendarDayButtonProps, CalendarProps, DateRange } from "./components/calendar.js";
|
|
11
|
+
import { Calendar, CalendarDayButton, CalendarDayButtonProps, CalendarProps, DateRange, locale } from "./components/calendar.js";
|
|
12
12
|
import { Card, CardAction, CardActionProps, CardContent, CardContentProps, CardDescription, CardDescriptionProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardProps, CardTitle, CardTitleProps } from "./components/card.js";
|
|
13
13
|
import { Carousel, CarouselApi, CarouselContent, CarouselContentProps, CarouselItem, CarouselItemProps, CarouselNext, CarouselNextProps, CarouselPrevious, CarouselPreviousProps, CarouselProps, useCarousel } from "./components/carousel.js";
|
|
14
14
|
import { Center, CenterProps, centerVariants } from "./components/center.js";
|
|
@@ -60,7 +60,12 @@ import { ModeToggle, ModeToggleProps, Theme, ThemeProvider, ThemeProviderProps,
|
|
|
60
60
|
import { Timeline, TimelineConnector, TimelineConnectorColor, TimelineConnectorProps, TimelineContent, TimelineContentProps, TimelineDescription, TimelineDescriptionProps, TimelineEmpty, TimelineEmptyProps, TimelineHeader, TimelineHeaderProps, TimelineIcon, TimelineIconColor, TimelineIconProps, TimelineIconSize, TimelineItem, TimelineItemProps, TimelineProps, TimelineStatus, TimelineTime, TimelineTimeProps, TimelineTitle, TimelineTitleProps, timelineVariants } from "./components/timeline.js";
|
|
61
61
|
import { Toggle, ToggleProps, toggleVariants } from "./components/toggle.js";
|
|
62
62
|
import { ToggleGroup, ToggleGroupItem, ToggleGroupItemProps, ToggleGroupProps } from "./components/toggle-group.js";
|
|
63
|
+
import { UseDisclosureHandlers, UseDisclosureOptions, UseDisclosureReturnValue, useDisclosure } from "./hooks/use-disclosure.js";
|
|
64
|
+
import { useDocumentVisibility } from "./hooks/use-document-visibility.js";
|
|
65
|
+
import { UseIdleOptions, useIdle } from "./hooks/use-idle.js";
|
|
66
|
+
import { UseIntervalOptions, UseIntervalReturnValue, useInterval } from "./hooks/use-interval.js";
|
|
67
|
+
import { UseLocalStorageOptions, useLocalStorage } from "./hooks/use-local-storage.js";
|
|
63
68
|
import { useIsMobile } from "./hooks/use-mobile.js";
|
|
64
69
|
import { ButtonColor, buttonColorVariants } from "./lib/button.js";
|
|
65
|
-
import { cn } from "./lib/utils.js";
|
|
66
|
-
export { Accordion, AccordionContent, AccordionContentProps, AccordionItem, AccordionItemProps, AccordionProps, AccordionTrigger, AccordionTriggerProps, Alert, AlertAction, AlertActionProps, AlertDescription, AlertDescriptionProps, AlertDialog, AlertDialogAction, AlertDialogActionProps, AlertDialogCancel, AlertDialogCancelProps, AlertDialogContent, AlertDialogContentProps, AlertDialogDescription, AlertDialogDescriptionProps, AlertDialogFooter, AlertDialogFooterProps, AlertDialogHeader, AlertDialogHeaderProps, AlertDialogMedia, AlertDialogMediaProps, AlertDialogOverlay, AlertDialogOverlayProps, AlertDialogPortal, AlertDialogPortalProps, AlertDialogProps, AlertDialogTitle, AlertDialogTitleProps, AlertDialogTrigger, AlertDialogTriggerProps, AlertProps, AlertTitle, AlertTitleProps, Anchor, AnchorProps, Avatar, AvatarBadge, AvatarBadgeProps, AvatarFallback, AvatarFallbackProps, AvatarGroup, AvatarGroupCount, AvatarGroupCountProps, AvatarGroupProps, AvatarImage, AvatarImageProps, AvatarProps, Badge, BadgeProps, Bar, BarChart, Breadcrumb, BreadcrumbEllipsis, BreadcrumbEllipsisProps, BreadcrumbItem, BreadcrumbItemProps, BreadcrumbLink, BreadcrumbLinkProps, BreadcrumbList, BreadcrumbListProps, BreadcrumbPage, BreadcrumbPageProps, BreadcrumbProps, BreadcrumbSeparator, BreadcrumbSeparatorProps, Button, ButtonColor, ButtonGroup, ButtonGroupProps, ButtonGroupSeparator, ButtonGroupSeparatorProps, ButtonGroupText, ButtonGroupTextProps, ButtonProps, Calendar, CalendarDayButton, CalendarDayButtonProps, CalendarProps, Card, CardAction, CardActionProps, CardContent, CardContentProps, CardDescription, CardDescriptionProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardProps, CardTitle, CardTitleProps, Carousel, CarouselApi, CarouselContent, CarouselContentProps, CarouselItem, CarouselItemProps, CarouselNext, CarouselNextProps, CarouselPrevious, CarouselPreviousProps, CarouselProps, CartesianGrid, Center, CenterProps, ChartConfig, ChartContainer, ChartContainerProps, ChartLegend, ChartLegendContent, ChartLegendContentProps, ChartLegendProps, ChartStyle, ChartStyleProps, ChartTooltip, ChartTooltipContent, ChartTooltipContentProps, ChartTooltipProps, Checkbox, CheckboxProps, Code, CodeProps, Collapsible, CollapsibleContent, CollapsibleContentProps, CollapsibleProps, CollapsibleTrigger, CollapsibleTriggerProps, Combobox, ComboboxChip, ComboboxChipProps, ComboboxChips, ComboboxChipsInput, ComboboxChipsInputProps, ComboboxChipsProps, ComboboxClear, ComboboxClearProps, ComboboxCollection, ComboboxCollectionProps, ComboboxContent, ComboboxContentProps, ComboboxEmpty, ComboboxEmptyProps, ComboboxGroup, ComboboxGroupProps, ComboboxInput, ComboboxInputProps, ComboboxItem, ComboboxItemProps, ComboboxLabel, ComboboxLabelProps, ComboboxList, ComboboxListProps, ComboboxProps, ComboboxSeparator, ComboboxSeparatorProps, ComboboxTrigger, ComboboxTriggerProps, ComboboxValue, ComboboxValueProps, Command, CommandDialog, CommandDialogProps, CommandEmpty, CommandEmptyProps, CommandGroup, CommandGroupProps, CommandInput, CommandInputProps, CommandItem, CommandItemProps, CommandList, CommandListProps, CommandProps, CommandSeparator, CommandSeparatorProps, CommandShortcut, CommandShortcutProps, Container, ContainerProps, DateRange, Dialog, DialogClose, DialogCloseProps, DialogContent, DialogContentProps, DialogDescription, DialogDescriptionProps, DialogFooter, DialogFooterProps, DialogHeader, DialogHeaderProps, DialogOverlay, DialogOverlayProps, DialogPortal, DialogPortalProps, DialogProps, DialogTitle, DialogTitleProps, DialogTrigger, DialogTriggerProps, Drawer, DrawerClose, DrawerCloseProps, DrawerContent, DrawerContentProps, DrawerDescription, DrawerDescriptionProps, DrawerFooter, DrawerFooterProps, DrawerHeader, DrawerHeaderProps, DrawerOverlay, DrawerOverlayProps, DrawerPortal, DrawerPortalProps, DrawerProps, DrawerTitle, DrawerTitleProps, DrawerTrigger, DrawerTriggerProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuCheckboxItemProps, DropdownMenuContent, DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuGroupProps, DropdownMenuItem, DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuLabelProps, DropdownMenuPortal, DropdownMenuPortalProps, DropdownMenuProps, DropdownMenuRadioGroup, DropdownMenuRadioGroupProps, DropdownMenuRadioItem, DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuSeparatorProps, DropdownMenuShortcut, DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubContentProps, DropdownMenuSubProps, DropdownMenuSubTrigger, DropdownMenuSubTriggerProps, DropdownMenuTrigger, DropdownMenuTriggerProps, Dropzone, DropzoneArea, DropzoneAreaProps, DropzoneDescription, DropzoneDescriptionProps, DropzoneFileList, DropzoneFileListItem, DropzoneFileListItemProps, DropzoneFileListProps, DropzoneFileMessage, DropzoneFileMessageProps, DropzoneFileStatus, DropzoneMessage, DropzoneMessageProps, DropzoneProps, DropzoneRemoveFile, DropzoneRemoveFileProps, DropzoneRetryFile, DropzoneRetryFileProps, DropzoneTrigger, DropzoneTriggerProps, DropzoneUploadResult, DropzoneValidation, Empty, EmptyContent, EmptyContentProps, EmptyDescription, EmptyDescriptionProps, EmptyHeader, EmptyHeaderProps, EmptyMedia, EmptyMediaProps, EmptyProps, EmptyTitle, EmptyTitleProps, ErrorCode, Field, FieldContent, FieldContentProps, FieldDescription, FieldDescriptionProps, FieldError, FieldErrorProps, FieldGroup, FieldGroupProps, FieldLabel, FieldLabelProps, FieldLegend, FieldLegendProps, FieldProps, FieldSeparator, FieldSeparatorProps, FieldSet, FieldSetProps, FieldTitle, FieldTitleProps, FileError, FileStatus, Group, GroupProps, Heading, HeadingProps, HoverCard, HoverCardContent, HoverCardContentProps, HoverCardProps, HoverCardTrigger, HoverCardTriggerProps, InfiniteProgress, InfiniteProgressProps, Input, InputGroup, InputGroupAddon, InputGroupAddonProps, InputGroupButton, InputGroupButtonProps, InputGroupInput, InputGroupInputProps, InputGroupProps, InputGroupText, InputGroupTextProps, InputGroupTextarea, InputGroupTextareaProps, InputOTP, InputOTPGroup, InputOTPGroupProps, InputOTPProps, InputOTPSeparator, InputOTPSeparatorProps, InputOTPSlot, InputOTPSlotProps, InputProps, Kbd, KbdGroup, KbdGroupProps, KbdProps, Label, LabelProps, List, ListIcon, ListIconProps, ListItem, ListItemProps, ListProps, ModeToggle, ModeToggleProps, NativeSelect, NativeSelectOptGroup, NativeSelectOptGroupProps, NativeSelectOption, NativeSelectOptionProps, NativeSelectProps, NavigationMenu, NavigationMenuContent, NavigationMenuContentProps, NavigationMenuIndicator, NavigationMenuIndicatorProps, NavigationMenuItem, NavigationMenuItemProps, NavigationMenuLink, NavigationMenuLinkProps, NavigationMenuList, NavigationMenuListProps, NavigationMenuProps, NavigationMenuTrigger, NavigationMenuTriggerProps, NavigationMenuViewport, NavigationMenuViewportProps, Pagination, PaginationContent, PaginationContentProps, PaginationEllipsis, PaginationEllipsisProps, PaginationItem, PaginationItemProps, PaginationLink, PaginationLinkProps, PaginationNext, PaginationNextProps, PaginationPrevious, PaginationPreviousProps, PaginationProps, Popover, PopoverAnchor, PopoverAnchorProps, PopoverContent, PopoverContentProps, PopoverDescription, PopoverDescriptionProps, PopoverHeader, PopoverHeaderProps, PopoverProps, PopoverTitle, PopoverTitleProps, PopoverTrigger, PopoverTriggerProps, Progress, ProgressProps, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS, RadioGroup, RadioGroupItem, RadioGroupItemProps, RadioGroupProps, ResizableHandle, ResizableHandleProps, ResizablePanel, ResizablePanelGroup, ResizablePanelGroupProps, ResizablePanelProps, ScrollArea, ScrollAreaProps, ScrollBar, ScrollBarProps, Select, SelectContent, SelectContentProps, SelectGroup, SelectGroupProps, SelectItem, SelectItemProps, SelectLabel, SelectLabelProps, SelectProps, SelectScrollDownButton, SelectScrollDownButtonProps, SelectScrollUpButton, SelectScrollUpButtonProps, SelectSeparator, SelectSeparatorProps, SelectTrigger, SelectTriggerProps, SelectValue, SelectValueProps, Separator, SeparatorProps, Sheet, SheetClose, SheetCloseProps, SheetContent, SheetContentProps, SheetDescription, SheetDescriptionProps, SheetFooter, SheetFooterProps, SheetHeader, SheetHeaderProps, SheetOverlay, SheetOverlayProps, SheetPortal, SheetPortalProps, SheetProps, SheetTitle, SheetTitleProps, SheetTrigger, SheetTriggerProps, Sidebar, SidebarContent, SidebarContentProps, SidebarFooter, SidebarFooterProps, SidebarGroup, SidebarGroupAction, SidebarGroupActionProps, SidebarGroupContent, SidebarGroupContentProps, SidebarGroupLabel, SidebarGroupLabelProps, SidebarGroupProps, SidebarHeader, SidebarHeaderProps, SidebarInput, SidebarInputProps, SidebarInset, SidebarInsetProps, SidebarMenu, SidebarMenuAction, SidebarMenuActionProps, SidebarMenuBadge, SidebarMenuBadgeProps, SidebarMenuButton, SidebarMenuButtonProps, SidebarMenuItem, SidebarMenuItemProps, SidebarMenuProps, SidebarMenuSkeleton, SidebarMenuSkeletonProps, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubButtonProps, SidebarMenuSubItem, SidebarMenuSubItemProps, SidebarMenuSubProps, SidebarProps, SidebarProvider, SidebarProviderProps, SidebarRail, SidebarRailProps, SidebarSeparator, SidebarSeparatorProps, SidebarTrigger, SidebarTriggerProps, Skeleton, SkeletonProps, Slider, SliderProps, Spinner, SpinnerProps, Stack, StackProps, Switch, SwitchProps, Table, TableBody, TableBodyProps, TableCaption, TableCaptionProps, TableCell, TableCellProps, TableFooter, TableFooterProps, TableHead, TableHeadProps, TableHeader, TableHeaderProps, TableProps, TableRow, TableRowProps, Tabs, TabsContent, TabsContentProps, TabsList, TabsListProps, TabsProps, TabsTrigger, TabsTriggerProps, Text, TextProps, Textarea, TextareaProps, Theme, ThemeProvider, ThemeProviderProps, ThemeProviderState, Timeline, TimelineConnector, TimelineConnectorColor, TimelineConnectorProps, TimelineContent, TimelineContentProps, TimelineDescription, TimelineDescriptionProps, TimelineEmpty, TimelineEmptyProps, TimelineHeader, TimelineHeaderProps, TimelineIcon, TimelineIconColor, TimelineIconProps, TimelineIconSize, TimelineItem, TimelineItemProps, TimelineProps, TimelineStatus, TimelineTime, TimelineTimeProps, TimelineTitle, TimelineTitleProps, Toaster, ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, ToggleGroupItemProps, ToggleGroupProps, ToggleProps, Tooltip, TooltipContent, TooltipContentProps, TooltipProps, TooltipProvider, TooltipProviderProps, TooltipTrigger, TooltipTriggerProps, UseDropzoneProps, UseDropzoneReturn, XAxis, anchorVariants, badgeVariants, buttonColorVariants, buttonGroupVariants, buttonVariants, centerVariants, cn, containerVariants, groupVariants, headingVariants, listVariants, navigationMenuTriggerStyle, spinnerVariants, stackVariants, tabsListVariants, textVariants, timelineVariants, toast, toggleVariants, useCarousel, useComboboxAnchor, useDropzone, useIsMobile, useSidebar, useTheme };
|
|
70
|
+
import { cn, randomId } from "./lib/utils.js";
|
|
71
|
+
export { Accordion, AccordionContent, AccordionContentProps, AccordionItem, AccordionItemProps, AccordionProps, AccordionTrigger, AccordionTriggerProps, Alert, AlertAction, AlertActionProps, AlertDescription, AlertDescriptionProps, AlertDialog, AlertDialogAction, AlertDialogActionProps, AlertDialogCancel, AlertDialogCancelProps, AlertDialogContent, AlertDialogContentProps, AlertDialogDescription, AlertDialogDescriptionProps, AlertDialogFooter, AlertDialogFooterProps, AlertDialogHeader, AlertDialogHeaderProps, AlertDialogMedia, AlertDialogMediaProps, AlertDialogOverlay, AlertDialogOverlayProps, AlertDialogPortal, AlertDialogPortalProps, AlertDialogProps, AlertDialogTitle, AlertDialogTitleProps, AlertDialogTrigger, AlertDialogTriggerProps, AlertProps, AlertTitle, AlertTitleProps, Anchor, AnchorProps, Avatar, AvatarBadge, AvatarBadgeProps, AvatarFallback, AvatarFallbackProps, AvatarGroup, AvatarGroupCount, AvatarGroupCountProps, AvatarGroupProps, AvatarImage, AvatarImageProps, AvatarProps, Badge, BadgeProps, Bar, BarChart, Breadcrumb, BreadcrumbEllipsis, BreadcrumbEllipsisProps, BreadcrumbItem, BreadcrumbItemProps, BreadcrumbLink, BreadcrumbLinkProps, BreadcrumbList, BreadcrumbListProps, BreadcrumbPage, BreadcrumbPageProps, BreadcrumbProps, BreadcrumbSeparator, BreadcrumbSeparatorProps, Button, ButtonColor, ButtonGroup, ButtonGroupProps, ButtonGroupSeparator, ButtonGroupSeparatorProps, ButtonGroupText, ButtonGroupTextProps, ButtonProps, Calendar, CalendarDayButton, CalendarDayButtonProps, CalendarProps, Card, CardAction, CardActionProps, CardContent, CardContentProps, CardDescription, CardDescriptionProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardProps, CardTitle, CardTitleProps, Carousel, CarouselApi, CarouselContent, CarouselContentProps, CarouselItem, CarouselItemProps, CarouselNext, CarouselNextProps, CarouselPrevious, CarouselPreviousProps, CarouselProps, CartesianGrid, Center, CenterProps, ChartConfig, ChartContainer, ChartContainerProps, ChartLegend, ChartLegendContent, ChartLegendContentProps, ChartLegendProps, ChartStyle, ChartStyleProps, ChartTooltip, ChartTooltipContent, ChartTooltipContentProps, ChartTooltipProps, Checkbox, CheckboxProps, Code, CodeProps, Collapsible, CollapsibleContent, CollapsibleContentProps, CollapsibleProps, CollapsibleTrigger, CollapsibleTriggerProps, Combobox, ComboboxChip, ComboboxChipProps, ComboboxChips, ComboboxChipsInput, ComboboxChipsInputProps, ComboboxChipsProps, ComboboxClear, ComboboxClearProps, ComboboxCollection, ComboboxCollectionProps, ComboboxContent, ComboboxContentProps, ComboboxEmpty, ComboboxEmptyProps, ComboboxGroup, ComboboxGroupProps, ComboboxInput, ComboboxInputProps, ComboboxItem, ComboboxItemProps, ComboboxLabel, ComboboxLabelProps, ComboboxList, ComboboxListProps, ComboboxProps, ComboboxSeparator, ComboboxSeparatorProps, ComboboxTrigger, ComboboxTriggerProps, ComboboxValue, ComboboxValueProps, Command, CommandDialog, CommandDialogProps, CommandEmpty, CommandEmptyProps, CommandGroup, CommandGroupProps, CommandInput, CommandInputProps, CommandItem, CommandItemProps, CommandList, CommandListProps, CommandProps, CommandSeparator, CommandSeparatorProps, CommandShortcut, CommandShortcutProps, Container, ContainerProps, DateRange, Dialog, DialogClose, DialogCloseProps, DialogContent, DialogContentProps, DialogDescription, DialogDescriptionProps, DialogFooter, DialogFooterProps, DialogHeader, DialogHeaderProps, DialogOverlay, DialogOverlayProps, DialogPortal, DialogPortalProps, DialogProps, DialogTitle, DialogTitleProps, DialogTrigger, DialogTriggerProps, Drawer, DrawerClose, DrawerCloseProps, DrawerContent, DrawerContentProps, DrawerDescription, DrawerDescriptionProps, DrawerFooter, DrawerFooterProps, DrawerHeader, DrawerHeaderProps, DrawerOverlay, DrawerOverlayProps, DrawerPortal, DrawerPortalProps, DrawerProps, DrawerTitle, DrawerTitleProps, DrawerTrigger, DrawerTriggerProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuCheckboxItemProps, DropdownMenuContent, DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuGroupProps, DropdownMenuItem, DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuLabelProps, DropdownMenuPortal, DropdownMenuPortalProps, DropdownMenuProps, DropdownMenuRadioGroup, DropdownMenuRadioGroupProps, DropdownMenuRadioItem, DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuSeparatorProps, DropdownMenuShortcut, DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubContentProps, DropdownMenuSubProps, DropdownMenuSubTrigger, DropdownMenuSubTriggerProps, DropdownMenuTrigger, DropdownMenuTriggerProps, Dropzone, DropzoneArea, DropzoneAreaProps, DropzoneDescription, DropzoneDescriptionProps, DropzoneFileList, DropzoneFileListItem, DropzoneFileListItemProps, DropzoneFileListProps, DropzoneFileMessage, DropzoneFileMessageProps, DropzoneFileStatus, DropzoneMessage, DropzoneMessageProps, DropzoneProps, DropzoneRemoveFile, DropzoneRemoveFileProps, DropzoneRetryFile, DropzoneRetryFileProps, DropzoneTrigger, DropzoneTriggerProps, DropzoneUploadResult, DropzoneValidation, Empty, EmptyContent, EmptyContentProps, EmptyDescription, EmptyDescriptionProps, EmptyHeader, EmptyHeaderProps, EmptyMedia, EmptyMediaProps, EmptyProps, EmptyTitle, EmptyTitleProps, ErrorCode, Field, FieldContent, FieldContentProps, FieldDescription, FieldDescriptionProps, FieldError, FieldErrorProps, FieldGroup, FieldGroupProps, FieldLabel, FieldLabelProps, FieldLegend, FieldLegendProps, FieldProps, FieldSeparator, FieldSeparatorProps, FieldSet, FieldSetProps, FieldTitle, FieldTitleProps, FileError, FileStatus, Group, GroupProps, Heading, HeadingProps, HoverCard, HoverCardContent, HoverCardContentProps, HoverCardProps, HoverCardTrigger, HoverCardTriggerProps, InfiniteProgress, InfiniteProgressProps, Input, InputGroup, InputGroupAddon, InputGroupAddonProps, InputGroupButton, InputGroupButtonProps, InputGroupInput, InputGroupInputProps, InputGroupProps, InputGroupText, InputGroupTextProps, InputGroupTextarea, InputGroupTextareaProps, InputOTP, InputOTPGroup, InputOTPGroupProps, InputOTPProps, InputOTPSeparator, InputOTPSeparatorProps, InputOTPSlot, InputOTPSlotProps, InputProps, Kbd, KbdGroup, KbdGroupProps, KbdProps, Label, LabelProps, List, ListIcon, ListIconProps, ListItem, ListItemProps, ListProps, ModeToggle, ModeToggleProps, NativeSelect, NativeSelectOptGroup, NativeSelectOptGroupProps, NativeSelectOption, NativeSelectOptionProps, NativeSelectProps, NavigationMenu, NavigationMenuContent, NavigationMenuContentProps, NavigationMenuIndicator, NavigationMenuIndicatorProps, NavigationMenuItem, NavigationMenuItemProps, NavigationMenuLink, NavigationMenuLinkProps, NavigationMenuList, NavigationMenuListProps, NavigationMenuProps, NavigationMenuTrigger, NavigationMenuTriggerProps, NavigationMenuViewport, NavigationMenuViewportProps, Pagination, PaginationContent, PaginationContentProps, PaginationEllipsis, PaginationEllipsisProps, PaginationItem, PaginationItemProps, PaginationLink, PaginationLinkProps, PaginationNext, PaginationNextProps, PaginationPrevious, PaginationPreviousProps, PaginationProps, Popover, PopoverAnchor, PopoverAnchorProps, PopoverContent, PopoverContentProps, PopoverDescription, PopoverDescriptionProps, PopoverHeader, PopoverHeaderProps, PopoverProps, PopoverTitle, PopoverTitleProps, PopoverTrigger, PopoverTriggerProps, Progress, ProgressProps, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS, RadioGroup, RadioGroupItem, RadioGroupItemProps, RadioGroupProps, ResizableHandle, ResizableHandleProps, ResizablePanel, ResizablePanelGroup, ResizablePanelGroupProps, ResizablePanelProps, ScrollArea, ScrollAreaProps, ScrollBar, ScrollBarProps, Select, SelectContent, SelectContentProps, SelectGroup, SelectGroupProps, SelectItem, SelectItemProps, SelectLabel, SelectLabelProps, SelectProps, SelectScrollDownButton, SelectScrollDownButtonProps, SelectScrollUpButton, SelectScrollUpButtonProps, SelectSeparator, SelectSeparatorProps, SelectTrigger, SelectTriggerProps, SelectValue, SelectValueProps, Separator, SeparatorProps, Sheet, SheetClose, SheetCloseProps, SheetContent, SheetContentProps, SheetDescription, SheetDescriptionProps, SheetFooter, SheetFooterProps, SheetHeader, SheetHeaderProps, SheetOverlay, SheetOverlayProps, SheetPortal, SheetPortalProps, SheetProps, SheetTitle, SheetTitleProps, SheetTrigger, SheetTriggerProps, Sidebar, SidebarContent, SidebarContentProps, SidebarFooter, SidebarFooterProps, SidebarGroup, SidebarGroupAction, SidebarGroupActionProps, SidebarGroupContent, SidebarGroupContentProps, SidebarGroupLabel, SidebarGroupLabelProps, SidebarGroupProps, SidebarHeader, SidebarHeaderProps, SidebarInput, SidebarInputProps, SidebarInset, SidebarInsetProps, SidebarMenu, SidebarMenuAction, SidebarMenuActionProps, SidebarMenuBadge, SidebarMenuBadgeProps, SidebarMenuButton, SidebarMenuButtonProps, SidebarMenuItem, SidebarMenuItemProps, SidebarMenuProps, SidebarMenuSkeleton, SidebarMenuSkeletonProps, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubButtonProps, SidebarMenuSubItem, SidebarMenuSubItemProps, SidebarMenuSubProps, SidebarProps, SidebarProvider, SidebarProviderProps, SidebarRail, SidebarRailProps, SidebarSeparator, SidebarSeparatorProps, SidebarTrigger, SidebarTriggerProps, Skeleton, SkeletonProps, Slider, SliderProps, Spinner, SpinnerProps, Stack, StackProps, Switch, SwitchProps, Table, TableBody, TableBodyProps, TableCaption, TableCaptionProps, TableCell, TableCellProps, TableFooter, TableFooterProps, TableHead, TableHeadProps, TableHeader, TableHeaderProps, TableProps, TableRow, TableRowProps, Tabs, TabsContent, TabsContentProps, TabsList, TabsListProps, TabsProps, TabsTrigger, TabsTriggerProps, Text, TextProps, Textarea, TextareaProps, Theme, ThemeProvider, ThemeProviderProps, ThemeProviderState, Timeline, TimelineConnector, TimelineConnectorColor, TimelineConnectorProps, TimelineContent, TimelineContentProps, TimelineDescription, TimelineDescriptionProps, TimelineEmpty, TimelineEmptyProps, TimelineHeader, TimelineHeaderProps, TimelineIcon, TimelineIconColor, TimelineIconProps, TimelineIconSize, TimelineItem, TimelineItemProps, TimelineProps, TimelineStatus, TimelineTime, TimelineTimeProps, TimelineTitle, TimelineTitleProps, Toaster, ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, ToggleGroupItemProps, ToggleGroupProps, ToggleProps, Tooltip, TooltipContent, TooltipContentProps, TooltipProps, TooltipProvider, TooltipProviderProps, TooltipTrigger, TooltipTriggerProps, UseDisclosureHandlers, UseDisclosureOptions, UseDisclosureReturnValue, UseDropzoneProps, UseDropzoneReturn, UseIdleOptions, UseIntervalOptions, UseIntervalReturnValue, UseLocalStorageOptions, XAxis, anchorVariants, badgeVariants, buttonColorVariants, buttonGroupVariants, buttonVariants, centerVariants, cn, containerVariants, groupVariants, headingVariants, listVariants, locale, navigationMenuTriggerStyle, randomId, spinnerVariants, stackVariants, tabsListVariants, textVariants, timelineVariants, toast, toggleVariants, useCarousel, useComboboxAnchor, useDisclosure, useDocumentVisibility, useDropzone, useIdle, useInterval, useIsMobile, useLocalStorage, useSidebar, useTheme };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cn as e}from"./lib/utils.js";import{Accordion as t,AccordionContent as n,AccordionItem as r,AccordionTrigger as i}from"./components/accordion.js";import{Alert as a,AlertAction as o,AlertDescription as s,AlertTitle as c}from"./components/alert.js";import{buttonColorVariants as l}from"./lib/button.js";import{Button as u,buttonVariants as d}from"./components/button.js";import{AlertDialog as f,AlertDialogAction as p,AlertDialogCancel as m,AlertDialogContent as h,AlertDialogDescription as g,AlertDialogFooter as _,AlertDialogHeader as v,AlertDialogMedia as y,AlertDialogOverlay as b,AlertDialogPortal as x,AlertDialogTitle as S,AlertDialogTrigger as C}from"./components/alert-dialog.js";import{Anchor as w,anchorVariants as T}from"./components/anchor.js";import{Avatar as E,AvatarBadge as D,AvatarFallback as O,AvatarGroup as k,AvatarGroupCount as A,AvatarImage as j}from"./components/avatar.js";import{Badge as M,badgeVariants as N}from"./components/badge.js";import{Breadcrumb as P,BreadcrumbEllipsis as F,BreadcrumbItem as I,BreadcrumbLink as L,BreadcrumbList as R,BreadcrumbPage as z,BreadcrumbSeparator as B}from"./components/breadcrumb.js";import{Separator as V}from"./components/separator.js";import{ButtonGroup as H,ButtonGroupSeparator as U,ButtonGroupText as W,buttonGroupVariants as G}from"./components/button-group.js";import{Calendar as K,CalendarDayButton as q}from"./components/calendar.js";import{Card as J,CardAction as Y,CardContent as X,CardDescription as Z,CardFooter as Q,CardHeader as $,CardTitle as ee}from"./components/card.js";import{Carousel as te,CarouselContent as ne,CarouselItem as re,CarouselNext as ie,CarouselPrevious as ae,useCarousel as oe}from"./components/carousel.js";import{Center as se,centerVariants as ce}from"./components/center.js";import{Bar as le,BarChart as ue,CartesianGrid as de,ChartContainer as fe,ChartLegend as pe,ChartLegendContent as me,ChartStyle as he,ChartTooltip as ge,ChartTooltipContent as _e,XAxis as ve}from"./components/chart.js";import{Checkbox as ye}from"./components/checkbox.js";import{Code as be}from"./components/code.js";import{Collapsible as xe,CollapsibleContent as Se,CollapsibleTrigger as Ce}from"./components/collapsible.js";import{Input as we}from"./components/input.js";import{Textarea as Te}from"./components/textarea.js";import{InputGroup as Ee,InputGroupAddon as De,InputGroupButton as Oe,InputGroupInput as ke,InputGroupText as Ae,InputGroupTextarea as je}from"./components/input-group.js";import{Combobox as Me,ComboboxChip as Ne,ComboboxChips as Pe,ComboboxChipsInput as Fe,ComboboxClear as Ie,ComboboxCollection as Le,ComboboxContent as Re,ComboboxEmpty as ze,ComboboxGroup as Be,ComboboxInput as Ve,ComboboxItem as He,ComboboxLabel as Ue,ComboboxList as We,ComboboxSeparator as Ge,ComboboxTrigger as Ke,ComboboxValue as qe,useComboboxAnchor as Je}from"./components/combobox.js";import{Dialog as Ye,DialogClose as Xe,DialogContent as Ze,DialogDescription as Qe,DialogFooter as $e,DialogHeader as et,DialogOverlay as tt,DialogPortal as nt,DialogTitle as rt,DialogTrigger as it}from"./components/dialog.js";import{Command as at,CommandDialog as ot,CommandEmpty as st,CommandGroup as ct,CommandInput as lt,CommandItem as ut,CommandList as dt,CommandSeparator as ft,CommandShortcut as pt}from"./components/command.js";import{Container as mt,containerVariants as ht}from"./components/container.js";import{Drawer as gt,DrawerClose as _t,DrawerContent as vt,DrawerDescription as yt,DrawerFooter as bt,DrawerHeader as xt,DrawerOverlay as St,DrawerPortal as Ct,DrawerTitle as wt,DrawerTrigger as Tt}from"./components/drawer.js";import{DropdownMenu as Et,DropdownMenuCheckboxItem as Dt,DropdownMenuContent as Ot,DropdownMenuGroup as kt,DropdownMenuItem as At,DropdownMenuLabel as jt,DropdownMenuPortal as Mt,DropdownMenuRadioGroup as Nt,DropdownMenuRadioItem as Pt,DropdownMenuSeparator as Ft,DropdownMenuShortcut as It,DropdownMenuSub as Lt,DropdownMenuSubContent as Rt,DropdownMenuSubTrigger as zt,DropdownMenuTrigger as Bt}from"./components/dropdown-menu.js";import{Dropzone as Vt,DropzoneArea as Ht,DropzoneDescription as Ut,DropzoneFileList as Wt,DropzoneFileListItem as Gt,DropzoneFileMessage as Kt,DropzoneMessage as qt,DropzoneRemoveFile as Jt,DropzoneRetryFile as Yt,DropzoneTrigger as Xt,ErrorCode as Zt,InfiniteProgress as Qt,useDropzone as $t}from"./components/dropzone.js";import{Empty as en,EmptyContent as tn,EmptyDescription as nn,EmptyHeader as rn,EmptyMedia as an,EmptyTitle as on}from"./components/empty.js";import{Label as sn}from"./components/label.js";import{Field as cn,FieldContent as ln,FieldDescription as un,FieldError as dn,FieldGroup as fn,FieldLabel as pn,FieldLegend as mn,FieldSeparator as hn,FieldSet as gn,FieldTitle as _n}from"./components/field.js";import{Group as vn,groupVariants as yn}from"./components/group.js";import{Heading as bn,headingVariants as xn}from"./components/heading.js";import{HoverCard as Sn,HoverCardContent as Cn,HoverCardTrigger as wn}from"./components/hover-card.js";import{InputOTP as Tn,InputOTPGroup as En,InputOTPSeparator as Dn,InputOTPSlot as On,REGEXP_ONLY_CHARS as kn,REGEXP_ONLY_DIGITS as An,REGEXP_ONLY_DIGITS_AND_CHARS as jn}from"./components/input-otp.js";import{Kbd as Mn,KbdGroup as Nn}from"./components/kbd.js";import{List as Pn,ListIcon as Fn,ListItem as In,listVariants as Ln}from"./components/list.js";import{NativeSelect as Rn,NativeSelectOptGroup as zn,NativeSelectOption as Bn}from"./components/native-select.js";import{NavigationMenu as Vn,NavigationMenuContent as Hn,NavigationMenuIndicator as Un,NavigationMenuItem as Wn,NavigationMenuLink as Gn,NavigationMenuList as Kn,NavigationMenuTrigger as qn,NavigationMenuViewport as Jn,navigationMenuTriggerStyle as Yn}from"./components/navigation-menu.js";import{Pagination as Xn,PaginationContent as Zn,PaginationEllipsis as Qn,PaginationItem as $n,PaginationLink as er,PaginationNext as tr,PaginationPrevious as nr}from"./components/pagination.js";import{Popover as rr,PopoverAnchor as ir,PopoverContent as ar,PopoverDescription as or,PopoverHeader as sr,PopoverTitle as cr,PopoverTrigger as lr}from"./components/popover.js";import{Progress as ur}from"./components/progress.js";import{RadioGroup as dr,RadioGroupItem as fr}from"./components/radio-group.js";import{ResizableHandle as pr,ResizablePanel as mr,ResizablePanelGroup as hr}from"./components/resizable.js";import{ScrollArea as gr,ScrollBar as _r}from"./components/scroll-area.js";import{Select as vr,SelectContent as yr,SelectGroup as br,SelectItem as xr,SelectLabel as Sr,SelectScrollDownButton as Cr,SelectScrollUpButton as wr,SelectSeparator as Tr,SelectTrigger as Er,SelectValue as Dr}from"./components/select.js";import{Sheet as Or,SheetClose as kr,SheetContent as Ar,SheetDescription as jr,SheetFooter as Mr,SheetHeader as Nr,SheetOverlay as Pr,SheetPortal as Fr,SheetTitle as Ir,SheetTrigger as Lr}from"./components/sheet.js";import{useIsMobile as Rr}from"./hooks/use-mobile.js";import{Skeleton as zr}from"./components/skeleton.js";import{Tooltip as Br,TooltipContent as Vr,TooltipProvider as Hr,TooltipTrigger as Ur}from"./components/tooltip.js";import{Sidebar as Wr,SidebarContent as Gr,SidebarFooter as Kr,SidebarGroup as qr,SidebarGroupAction as Jr,SidebarGroupContent as Yr,SidebarGroupLabel as Xr,SidebarHeader as Zr,SidebarInput as Qr,SidebarInset as $r,SidebarMenu as ei,SidebarMenuAction as ti,SidebarMenuBadge as ni,SidebarMenuButton as ri,SidebarMenuItem as ii,SidebarMenuSkeleton as ai,SidebarMenuSub as oi,SidebarMenuSubButton as si,SidebarMenuSubItem as ci,SidebarProvider as li,SidebarRail as ui,SidebarSeparator as di,SidebarTrigger as fi,useSidebar as pi}from"./components/sidebar.js";import{Slider as mi}from"./components/slider.js";import{Toaster as hi,toast as gi}from"./components/sonner.js";import{Spinner as _i,spinnerVariants as vi}from"./components/spinner.js";import{Stack as yi,stackVariants as bi}from"./components/stack.js";import{Switch as xi}from"./components/switch.js";import{Table as Si,TableBody as Ci,TableCaption as wi,TableCell as Ti,TableFooter as Ei,TableHead as Di,TableHeader as Oi,TableRow as ki}from"./components/table.js";import{Tabs as Ai,TabsContent as ji,TabsList as Mi,TabsTrigger as Ni,tabsListVariants as Pi}from"./components/tabs.js";import{Text as Fi,textVariants as Ii}from"./components/text.js";import{ModeToggle as Li,ThemeProvider as Ri,useTheme as zi}from"./components/theme.js";import{Timeline as Bi,TimelineConnector as Vi,TimelineContent as Hi,TimelineDescription as Ui,TimelineEmpty as Wi,TimelineHeader as Gi,TimelineIcon as Ki,TimelineItem as qi,TimelineTime as Ji,TimelineTitle as Yi,timelineVariants as Xi}from"./components/timeline.js";import{Toggle as Zi,toggleVariants as Qi}from"./components/toggle.js";import{ToggleGroup as $i,ToggleGroupItem as ea}from"./components/toggle-group.js";export{t as Accordion,n as AccordionContent,r as AccordionItem,i as AccordionTrigger,a as Alert,o as AlertAction,s as AlertDescription,f as AlertDialog,p as AlertDialogAction,m as AlertDialogCancel,h as AlertDialogContent,g as AlertDialogDescription,_ as AlertDialogFooter,v as AlertDialogHeader,y as AlertDialogMedia,b as AlertDialogOverlay,x as AlertDialogPortal,S as AlertDialogTitle,C as AlertDialogTrigger,c as AlertTitle,w as Anchor,E as Avatar,D as AvatarBadge,O as AvatarFallback,k as AvatarGroup,A as AvatarGroupCount,j as AvatarImage,M as Badge,le as Bar,ue as BarChart,P as Breadcrumb,F as BreadcrumbEllipsis,I as BreadcrumbItem,L as BreadcrumbLink,R as BreadcrumbList,z as BreadcrumbPage,B as BreadcrumbSeparator,u as Button,H as ButtonGroup,U as ButtonGroupSeparator,W as ButtonGroupText,K as Calendar,q as CalendarDayButton,J as Card,Y as CardAction,X as CardContent,Z as CardDescription,Q as CardFooter,$ as CardHeader,ee as CardTitle,te as Carousel,ne as CarouselContent,re as CarouselItem,ie as CarouselNext,ae as CarouselPrevious,de as CartesianGrid,se as Center,fe as ChartContainer,pe as ChartLegend,me as ChartLegendContent,he as ChartStyle,ge as ChartTooltip,_e as ChartTooltipContent,ye as Checkbox,be as Code,xe as Collapsible,Se as CollapsibleContent,Ce as CollapsibleTrigger,Me as Combobox,Ne as ComboboxChip,Pe as ComboboxChips,Fe as ComboboxChipsInput,Ie as ComboboxClear,Le as ComboboxCollection,Re as ComboboxContent,ze as ComboboxEmpty,Be as ComboboxGroup,Ve as ComboboxInput,He as ComboboxItem,Ue as ComboboxLabel,We as ComboboxList,Ge as ComboboxSeparator,Ke as ComboboxTrigger,qe as ComboboxValue,at as Command,ot as CommandDialog,st as CommandEmpty,ct as CommandGroup,lt as CommandInput,ut as CommandItem,dt as CommandList,ft as CommandSeparator,pt as CommandShortcut,mt as Container,Ye as Dialog,Xe as DialogClose,Ze as DialogContent,Qe as DialogDescription,$e as DialogFooter,et as DialogHeader,tt as DialogOverlay,nt as DialogPortal,rt as DialogTitle,it as DialogTrigger,gt as Drawer,_t as DrawerClose,vt as DrawerContent,yt as DrawerDescription,bt as DrawerFooter,xt as DrawerHeader,St as DrawerOverlay,Ct as DrawerPortal,wt as DrawerTitle,Tt as DrawerTrigger,Et as DropdownMenu,Dt as DropdownMenuCheckboxItem,Ot as DropdownMenuContent,kt as DropdownMenuGroup,At as DropdownMenuItem,jt as DropdownMenuLabel,Mt as DropdownMenuPortal,Nt as DropdownMenuRadioGroup,Pt as DropdownMenuRadioItem,Ft as DropdownMenuSeparator,It as DropdownMenuShortcut,Lt as DropdownMenuSub,Rt as DropdownMenuSubContent,zt as DropdownMenuSubTrigger,Bt as DropdownMenuTrigger,Vt as Dropzone,Ht as DropzoneArea,Ut as DropzoneDescription,Wt as DropzoneFileList,Gt as DropzoneFileListItem,Kt as DropzoneFileMessage,qt as DropzoneMessage,Jt as DropzoneRemoveFile,Yt as DropzoneRetryFile,Xt as DropzoneTrigger,en as Empty,tn as EmptyContent,nn as EmptyDescription,rn as EmptyHeader,an as EmptyMedia,on as EmptyTitle,Zt as ErrorCode,cn as Field,ln as FieldContent,un as FieldDescription,dn as FieldError,fn as FieldGroup,pn as FieldLabel,mn as FieldLegend,hn as FieldSeparator,gn as FieldSet,_n as FieldTitle,vn as Group,bn as Heading,Sn as HoverCard,Cn as HoverCardContent,wn as HoverCardTrigger,Qt as InfiniteProgress,we as Input,Ee as InputGroup,De as InputGroupAddon,Oe as InputGroupButton,ke as InputGroupInput,Ae as InputGroupText,je as InputGroupTextarea,Tn as InputOTP,En as InputOTPGroup,Dn as InputOTPSeparator,On as InputOTPSlot,Mn as Kbd,Nn as KbdGroup,sn as Label,Pn as List,Fn as ListIcon,In as ListItem,Li as ModeToggle,Rn as NativeSelect,zn as NativeSelectOptGroup,Bn as NativeSelectOption,Vn as NavigationMenu,Hn as NavigationMenuContent,Un as NavigationMenuIndicator,Wn as NavigationMenuItem,Gn as NavigationMenuLink,Kn as NavigationMenuList,qn as NavigationMenuTrigger,Jn as NavigationMenuViewport,Xn as Pagination,Zn as PaginationContent,Qn as PaginationEllipsis,$n as PaginationItem,er as PaginationLink,tr as PaginationNext,nr as PaginationPrevious,rr as Popover,ir as PopoverAnchor,ar as PopoverContent,or as PopoverDescription,sr as PopoverHeader,cr as PopoverTitle,lr as PopoverTrigger,ur as Progress,kn as REGEXP_ONLY_CHARS,An as REGEXP_ONLY_DIGITS,jn as REGEXP_ONLY_DIGITS_AND_CHARS,dr as RadioGroup,fr as RadioGroupItem,pr as ResizableHandle,mr as ResizablePanel,hr as ResizablePanelGroup,gr as ScrollArea,_r as ScrollBar,vr as Select,yr as SelectContent,br as SelectGroup,xr as SelectItem,Sr as SelectLabel,Cr as SelectScrollDownButton,wr as SelectScrollUpButton,Tr as SelectSeparator,Er as SelectTrigger,Dr as SelectValue,V as Separator,Or as Sheet,kr as SheetClose,Ar as SheetContent,jr as SheetDescription,Mr as SheetFooter,Nr as SheetHeader,Pr as SheetOverlay,Fr as SheetPortal,Ir as SheetTitle,Lr as SheetTrigger,Wr as Sidebar,Gr as SidebarContent,Kr as SidebarFooter,qr as SidebarGroup,Jr as SidebarGroupAction,Yr as SidebarGroupContent,Xr as SidebarGroupLabel,Zr as SidebarHeader,Qr as SidebarInput,$r as SidebarInset,ei as SidebarMenu,ti as SidebarMenuAction,ni as SidebarMenuBadge,ri as SidebarMenuButton,ii as SidebarMenuItem,ai as SidebarMenuSkeleton,oi as SidebarMenuSub,si as SidebarMenuSubButton,ci as SidebarMenuSubItem,li as SidebarProvider,ui as SidebarRail,di as SidebarSeparator,fi as SidebarTrigger,zr as Skeleton,mi as Slider,_i as Spinner,yi as Stack,xi as Switch,Si as Table,Ci as TableBody,wi as TableCaption,Ti as TableCell,Ei as TableFooter,Di as TableHead,Oi as TableHeader,ki as TableRow,Ai as Tabs,ji as TabsContent,Mi as TabsList,Ni as TabsTrigger,Fi as Text,Te as Textarea,Ri as ThemeProvider,Bi as Timeline,Vi as TimelineConnector,Hi as TimelineContent,Ui as TimelineDescription,Wi as TimelineEmpty,Gi as TimelineHeader,Ki as TimelineIcon,qi as TimelineItem,Ji as TimelineTime,Yi as TimelineTitle,hi as Toaster,Zi as Toggle,$i as ToggleGroup,ea as ToggleGroupItem,Br as Tooltip,Vr as TooltipContent,Hr as TooltipProvider,Ur as TooltipTrigger,ve as XAxis,T as anchorVariants,N as badgeVariants,l as buttonColorVariants,G as buttonGroupVariants,d as buttonVariants,ce as centerVariants,e as cn,ht as containerVariants,yn as groupVariants,xn as headingVariants,Ln as listVariants,Yn as navigationMenuTriggerStyle,vi as spinnerVariants,bi as stackVariants,Pi as tabsListVariants,Ii as textVariants,Xi as timelineVariants,gi as toast,Qi as toggleVariants,oe as useCarousel,Je as useComboboxAnchor,$t as useDropzone,Rr as useIsMobile,pi as useSidebar,zi as useTheme};
|
|
1
|
+
import{cn as e,randomId as t}from"./lib/utils.js";import{Accordion as n,AccordionContent as r,AccordionItem as i,AccordionTrigger as a}from"./components/accordion.js";import{Alert as o,AlertAction as s,AlertDescription as c,AlertTitle as l}from"./components/alert.js";import{buttonColorVariants as u}from"./lib/button.js";import{Button as d,buttonVariants as f}from"./components/button.js";import{AlertDialog as p,AlertDialogAction as m,AlertDialogCancel as h,AlertDialogContent as g,AlertDialogDescription as _,AlertDialogFooter as v,AlertDialogHeader as y,AlertDialogMedia as b,AlertDialogOverlay as x,AlertDialogPortal as S,AlertDialogTitle as C,AlertDialogTrigger as w}from"./components/alert-dialog.js";import{Anchor as T,anchorVariants as E}from"./components/anchor.js";import{Avatar as D,AvatarBadge as O,AvatarFallback as k,AvatarGroup as A,AvatarGroupCount as j,AvatarImage as M}from"./components/avatar.js";import{Badge as N,badgeVariants as P}from"./components/badge.js";import{Breadcrumb as F,BreadcrumbEllipsis as I,BreadcrumbItem as L,BreadcrumbLink as R,BreadcrumbList as z,BreadcrumbPage as B,BreadcrumbSeparator as V}from"./components/breadcrumb.js";import{Separator as H}from"./components/separator.js";import{ButtonGroup as U,ButtonGroupSeparator as W,ButtonGroupText as G,buttonGroupVariants as K}from"./components/button-group.js";import{Calendar as q,CalendarDayButton as J,locale as Y}from"./components/calendar.js";import{Card as X,CardAction as Z,CardContent as Q,CardDescription as $,CardFooter as ee,CardHeader as te,CardTitle as ne}from"./components/card.js";import{Carousel as re,CarouselContent as ie,CarouselItem as ae,CarouselNext as oe,CarouselPrevious as se,useCarousel as ce}from"./components/carousel.js";import{Center as le,centerVariants as ue}from"./components/center.js";import{Bar as de,BarChart as fe,CartesianGrid as pe,ChartContainer as me,ChartLegend as he,ChartLegendContent as ge,ChartStyle as _e,ChartTooltip as ve,ChartTooltipContent as ye,XAxis as be}from"./components/chart.js";import{Checkbox as xe}from"./components/checkbox.js";import{Code as Se}from"./components/code.js";import{Collapsible as Ce,CollapsibleContent as we,CollapsibleTrigger as Te}from"./components/collapsible.js";import{Input as Ee}from"./components/input.js";import{Textarea as De}from"./components/textarea.js";import{InputGroup as Oe,InputGroupAddon as ke,InputGroupButton as Ae,InputGroupInput as je,InputGroupText as Me,InputGroupTextarea as Ne}from"./components/input-group.js";import{Combobox as Pe,ComboboxChip as Fe,ComboboxChips as Ie,ComboboxChipsInput as Le,ComboboxClear as Re,ComboboxCollection as ze,ComboboxContent as Be,ComboboxEmpty as Ve,ComboboxGroup as He,ComboboxInput as Ue,ComboboxItem as We,ComboboxLabel as Ge,ComboboxList as Ke,ComboboxSeparator as qe,ComboboxTrigger as Je,ComboboxValue as Ye,useComboboxAnchor as Xe}from"./components/combobox.js";import{Dialog as Ze,DialogClose as Qe,DialogContent as $e,DialogDescription as et,DialogFooter as tt,DialogHeader as nt,DialogOverlay as rt,DialogPortal as it,DialogTitle as at,DialogTrigger as ot}from"./components/dialog.js";import{Command as st,CommandDialog as ct,CommandEmpty as lt,CommandGroup as ut,CommandInput as dt,CommandItem as ft,CommandList as pt,CommandSeparator as mt,CommandShortcut as ht}from"./components/command.js";import{Container as gt,containerVariants as _t}from"./components/container.js";import{Drawer as vt,DrawerClose as yt,DrawerContent as bt,DrawerDescription as xt,DrawerFooter as St,DrawerHeader as Ct,DrawerOverlay as wt,DrawerPortal as Tt,DrawerTitle as Et,DrawerTrigger as Dt}from"./components/drawer.js";import{DropdownMenu as Ot,DropdownMenuCheckboxItem as kt,DropdownMenuContent as At,DropdownMenuGroup as jt,DropdownMenuItem as Mt,DropdownMenuLabel as Nt,DropdownMenuPortal as Pt,DropdownMenuRadioGroup as Ft,DropdownMenuRadioItem as It,DropdownMenuSeparator as Lt,DropdownMenuShortcut as Rt,DropdownMenuSub as zt,DropdownMenuSubContent as Bt,DropdownMenuSubTrigger as Vt,DropdownMenuTrigger as Ht}from"./components/dropdown-menu.js";import{Dropzone as Ut,DropzoneArea as Wt,DropzoneDescription as Gt,DropzoneFileList as Kt,DropzoneFileListItem as qt,DropzoneFileMessage as Jt,DropzoneMessage as Yt,DropzoneRemoveFile as Xt,DropzoneRetryFile as Zt,DropzoneTrigger as Qt,ErrorCode as $t,InfiniteProgress as en,useDropzone as tn}from"./components/dropzone.js";import{Empty as nn,EmptyContent as rn,EmptyDescription as an,EmptyHeader as on,EmptyMedia as sn,EmptyTitle as cn}from"./components/empty.js";import{Label as ln}from"./components/label.js";import{Field as un,FieldContent as dn,FieldDescription as fn,FieldError as pn,FieldGroup as mn,FieldLabel as hn,FieldLegend as gn,FieldSeparator as _n,FieldSet as vn,FieldTitle as yn}from"./components/field.js";import{Group as bn,groupVariants as xn}from"./components/group.js";import{Heading as Sn,headingVariants as Cn}from"./components/heading.js";import{HoverCard as wn,HoverCardContent as Tn,HoverCardTrigger as En}from"./components/hover-card.js";import{InputOTP as Dn,InputOTPGroup as On,InputOTPSeparator as kn,InputOTPSlot as An,REGEXP_ONLY_CHARS as jn,REGEXP_ONLY_DIGITS as Mn,REGEXP_ONLY_DIGITS_AND_CHARS as Nn}from"./components/input-otp.js";import{Kbd as Pn,KbdGroup as Fn}from"./components/kbd.js";import{List as In,ListIcon as Ln,ListItem as Rn,listVariants as zn}from"./components/list.js";import{NativeSelect as Bn,NativeSelectOptGroup as Vn,NativeSelectOption as Hn}from"./components/native-select.js";import{NavigationMenu as Un,NavigationMenuContent as Wn,NavigationMenuIndicator as Gn,NavigationMenuItem as Kn,NavigationMenuLink as qn,NavigationMenuList as Jn,NavigationMenuTrigger as Yn,NavigationMenuViewport as Xn,navigationMenuTriggerStyle as Zn}from"./components/navigation-menu.js";import{Pagination as Qn,PaginationContent as $n,PaginationEllipsis as er,PaginationItem as tr,PaginationLink as nr,PaginationNext as rr,PaginationPrevious as ir}from"./components/pagination.js";import{Popover as ar,PopoverAnchor as or,PopoverContent as sr,PopoverDescription as cr,PopoverHeader as lr,PopoverTitle as ur,PopoverTrigger as dr}from"./components/popover.js";import{Progress as fr}from"./components/progress.js";import{RadioGroup as pr,RadioGroupItem as mr}from"./components/radio-group.js";import{ResizableHandle as hr,ResizablePanel as gr,ResizablePanelGroup as _r}from"./components/resizable.js";import{ScrollArea as vr,ScrollBar as yr}from"./components/scroll-area.js";import{Select as br,SelectContent as xr,SelectGroup as Sr,SelectItem as Cr,SelectLabel as wr,SelectScrollDownButton as Tr,SelectScrollUpButton as Er,SelectSeparator as Dr,SelectTrigger as Or,SelectValue as kr}from"./components/select.js";import{Sheet as Ar,SheetClose as jr,SheetContent as Mr,SheetDescription as Nr,SheetFooter as Pr,SheetHeader as Fr,SheetOverlay as Ir,SheetPortal as Lr,SheetTitle as Rr,SheetTrigger as zr}from"./components/sheet.js";import{useIsMobile as Br}from"./hooks/use-mobile.js";import{Skeleton as Vr}from"./components/skeleton.js";import{Tooltip as Hr,TooltipContent as Ur,TooltipProvider as Wr,TooltipTrigger as Gr}from"./components/tooltip.js";import{Sidebar as Kr,SidebarContent as qr,SidebarFooter as Jr,SidebarGroup as Yr,SidebarGroupAction as Xr,SidebarGroupContent as Zr,SidebarGroupLabel as Qr,SidebarHeader as $r,SidebarInput as ei,SidebarInset as ti,SidebarMenu as ni,SidebarMenuAction as ri,SidebarMenuBadge as ii,SidebarMenuButton as ai,SidebarMenuItem as oi,SidebarMenuSkeleton as si,SidebarMenuSub as ci,SidebarMenuSubButton as li,SidebarMenuSubItem as ui,SidebarProvider as di,SidebarRail as fi,SidebarSeparator as pi,SidebarTrigger as mi,useSidebar as hi}from"./components/sidebar.js";import{Slider as gi}from"./components/slider.js";import{Toaster as _i,toast as vi}from"./components/sonner.js";import{Spinner as yi,spinnerVariants as bi}from"./components/spinner.js";import{Stack as xi,stackVariants as Si}from"./components/stack.js";import{Switch as Ci}from"./components/switch.js";import{Table as wi,TableBody as Ti,TableCaption as Ei,TableCell as Di,TableFooter as Oi,TableHead as ki,TableHeader as Ai,TableRow as ji}from"./components/table.js";import{Tabs as Mi,TabsContent as Ni,TabsList as Pi,TabsTrigger as Fi,tabsListVariants as Ii}from"./components/tabs.js";import{Text as Li,textVariants as Ri}from"./components/text.js";import{ModeToggle as zi,ThemeProvider as Bi,useTheme as Vi}from"./components/theme.js";import{Timeline as Hi,TimelineConnector as Ui,TimelineContent as Wi,TimelineDescription as Gi,TimelineEmpty as Ki,TimelineHeader as qi,TimelineIcon as Ji,TimelineItem as Yi,TimelineTime as Xi,TimelineTitle as Zi,timelineVariants as Qi}from"./components/timeline.js";import{Toggle as $i,toggleVariants as ea}from"./components/toggle.js";import{ToggleGroup as ta,ToggleGroupItem as na}from"./components/toggle-group.js";import{useDisclosure as ra}from"./hooks/use-disclosure.js";import{useDocumentVisibility as ia}from"./hooks/use-document-visibility.js";import{useIdle as aa}from"./hooks/use-idle.js";import{useInterval as oa}from"./hooks/use-interval.js";import{useLocalStorage as sa}from"./hooks/use-local-storage.js";export{n as Accordion,r as AccordionContent,i as AccordionItem,a as AccordionTrigger,o as Alert,s as AlertAction,c as AlertDescription,p as AlertDialog,m as AlertDialogAction,h as AlertDialogCancel,g as AlertDialogContent,_ as AlertDialogDescription,v as AlertDialogFooter,y as AlertDialogHeader,b as AlertDialogMedia,x as AlertDialogOverlay,S as AlertDialogPortal,C as AlertDialogTitle,w as AlertDialogTrigger,l as AlertTitle,T as Anchor,D as Avatar,O as AvatarBadge,k as AvatarFallback,A as AvatarGroup,j as AvatarGroupCount,M as AvatarImage,N as Badge,de as Bar,fe as BarChart,F as Breadcrumb,I as BreadcrumbEllipsis,L as BreadcrumbItem,R as BreadcrumbLink,z as BreadcrumbList,B as BreadcrumbPage,V as BreadcrumbSeparator,d as Button,U as ButtonGroup,W as ButtonGroupSeparator,G as ButtonGroupText,q as Calendar,J as CalendarDayButton,X as Card,Z as CardAction,Q as CardContent,$ as CardDescription,ee as CardFooter,te as CardHeader,ne as CardTitle,re as Carousel,ie as CarouselContent,ae as CarouselItem,oe as CarouselNext,se as CarouselPrevious,pe as CartesianGrid,le as Center,me as ChartContainer,he as ChartLegend,ge as ChartLegendContent,_e as ChartStyle,ve as ChartTooltip,ye as ChartTooltipContent,xe as Checkbox,Se as Code,Ce as Collapsible,we as CollapsibleContent,Te as CollapsibleTrigger,Pe as Combobox,Fe as ComboboxChip,Ie as ComboboxChips,Le as ComboboxChipsInput,Re as ComboboxClear,ze as ComboboxCollection,Be as ComboboxContent,Ve as ComboboxEmpty,He as ComboboxGroup,Ue as ComboboxInput,We as ComboboxItem,Ge as ComboboxLabel,Ke as ComboboxList,qe as ComboboxSeparator,Je as ComboboxTrigger,Ye as ComboboxValue,st as Command,ct as CommandDialog,lt as CommandEmpty,ut as CommandGroup,dt as CommandInput,ft as CommandItem,pt as CommandList,mt as CommandSeparator,ht as CommandShortcut,gt as Container,Ze as Dialog,Qe as DialogClose,$e as DialogContent,et as DialogDescription,tt as DialogFooter,nt as DialogHeader,rt as DialogOverlay,it as DialogPortal,at as DialogTitle,ot as DialogTrigger,vt as Drawer,yt as DrawerClose,bt as DrawerContent,xt as DrawerDescription,St as DrawerFooter,Ct as DrawerHeader,wt as DrawerOverlay,Tt as DrawerPortal,Et as DrawerTitle,Dt as DrawerTrigger,Ot as DropdownMenu,kt as DropdownMenuCheckboxItem,At as DropdownMenuContent,jt as DropdownMenuGroup,Mt as DropdownMenuItem,Nt as DropdownMenuLabel,Pt as DropdownMenuPortal,Ft as DropdownMenuRadioGroup,It as DropdownMenuRadioItem,Lt as DropdownMenuSeparator,Rt as DropdownMenuShortcut,zt as DropdownMenuSub,Bt as DropdownMenuSubContent,Vt as DropdownMenuSubTrigger,Ht as DropdownMenuTrigger,Ut as Dropzone,Wt as DropzoneArea,Gt as DropzoneDescription,Kt as DropzoneFileList,qt as DropzoneFileListItem,Jt as DropzoneFileMessage,Yt as DropzoneMessage,Xt as DropzoneRemoveFile,Zt as DropzoneRetryFile,Qt as DropzoneTrigger,nn as Empty,rn as EmptyContent,an as EmptyDescription,on as EmptyHeader,sn as EmptyMedia,cn as EmptyTitle,$t as ErrorCode,un as Field,dn as FieldContent,fn as FieldDescription,pn as FieldError,mn as FieldGroup,hn as FieldLabel,gn as FieldLegend,_n as FieldSeparator,vn as FieldSet,yn as FieldTitle,bn as Group,Sn as Heading,wn as HoverCard,Tn as HoverCardContent,En as HoverCardTrigger,en as InfiniteProgress,Ee as Input,Oe as InputGroup,ke as InputGroupAddon,Ae as InputGroupButton,je as InputGroupInput,Me as InputGroupText,Ne as InputGroupTextarea,Dn as InputOTP,On as InputOTPGroup,kn as InputOTPSeparator,An as InputOTPSlot,Pn as Kbd,Fn as KbdGroup,ln as Label,In as List,Ln as ListIcon,Rn as ListItem,zi as ModeToggle,Bn as NativeSelect,Vn as NativeSelectOptGroup,Hn as NativeSelectOption,Un as NavigationMenu,Wn as NavigationMenuContent,Gn as NavigationMenuIndicator,Kn as NavigationMenuItem,qn as NavigationMenuLink,Jn as NavigationMenuList,Yn as NavigationMenuTrigger,Xn as NavigationMenuViewport,Qn as Pagination,$n as PaginationContent,er as PaginationEllipsis,tr as PaginationItem,nr as PaginationLink,rr as PaginationNext,ir as PaginationPrevious,ar as Popover,or as PopoverAnchor,sr as PopoverContent,cr as PopoverDescription,lr as PopoverHeader,ur as PopoverTitle,dr as PopoverTrigger,fr as Progress,jn as REGEXP_ONLY_CHARS,Mn as REGEXP_ONLY_DIGITS,Nn as REGEXP_ONLY_DIGITS_AND_CHARS,pr as RadioGroup,mr as RadioGroupItem,hr as ResizableHandle,gr as ResizablePanel,_r as ResizablePanelGroup,vr as ScrollArea,yr as ScrollBar,br as Select,xr as SelectContent,Sr as SelectGroup,Cr as SelectItem,wr as SelectLabel,Tr as SelectScrollDownButton,Er as SelectScrollUpButton,Dr as SelectSeparator,Or as SelectTrigger,kr as SelectValue,H as Separator,Ar as Sheet,jr as SheetClose,Mr as SheetContent,Nr as SheetDescription,Pr as SheetFooter,Fr as SheetHeader,Ir as SheetOverlay,Lr as SheetPortal,Rr as SheetTitle,zr as SheetTrigger,Kr as Sidebar,qr as SidebarContent,Jr as SidebarFooter,Yr as SidebarGroup,Xr as SidebarGroupAction,Zr as SidebarGroupContent,Qr as SidebarGroupLabel,$r as SidebarHeader,ei as SidebarInput,ti as SidebarInset,ni as SidebarMenu,ri as SidebarMenuAction,ii as SidebarMenuBadge,ai as SidebarMenuButton,oi as SidebarMenuItem,si as SidebarMenuSkeleton,ci as SidebarMenuSub,li as SidebarMenuSubButton,ui as SidebarMenuSubItem,di as SidebarProvider,fi as SidebarRail,pi as SidebarSeparator,mi as SidebarTrigger,Vr as Skeleton,gi as Slider,yi as Spinner,xi as Stack,Ci as Switch,wi as Table,Ti as TableBody,Ei as TableCaption,Di as TableCell,Oi as TableFooter,ki as TableHead,Ai as TableHeader,ji as TableRow,Mi as Tabs,Ni as TabsContent,Pi as TabsList,Fi as TabsTrigger,Li as Text,De as Textarea,Bi as ThemeProvider,Hi as Timeline,Ui as TimelineConnector,Wi as TimelineContent,Gi as TimelineDescription,Ki as TimelineEmpty,qi as TimelineHeader,Ji as TimelineIcon,Yi as TimelineItem,Xi as TimelineTime,Zi as TimelineTitle,_i as Toaster,$i as Toggle,ta as ToggleGroup,na as ToggleGroupItem,Hr as Tooltip,Ur as TooltipContent,Wr as TooltipProvider,Gr as TooltipTrigger,be as XAxis,E as anchorVariants,P as badgeVariants,u as buttonColorVariants,K as buttonGroupVariants,f as buttonVariants,ue as centerVariants,e as cn,_t as containerVariants,xn as groupVariants,Cn as headingVariants,zn as listVariants,Y as locale,Zn as navigationMenuTriggerStyle,t as randomId,bi as spinnerVariants,Si as stackVariants,Ii as tabsListVariants,Ri as textVariants,Qi as timelineVariants,vi as toast,ea as toggleVariants,ce as useCarousel,Xe as useComboboxAnchor,ra as useDisclosure,ia as useDocumentVisibility,tn as useDropzone,aa as useIdle,oa as useInterval,Br as useIsMobile,sa as useLocalStorage,hi as useSidebar,Vi as useTheme};
|
package/dist/lib/button.d.ts
CHANGED
package/dist/lib/utils.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as __name } from "../chunk-CHh1Zzun.js";
|
|
2
2
|
import { ClassValue } from "clsx";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/utils.d.ts
|
|
5
5
|
declare function cn(...inputs: ClassValue[]): string;
|
|
6
|
+
declare function randomId(prefix?: string): string;
|
|
6
7
|
//#endregion
|
|
7
|
-
export { cn };
|
|
8
|
+
export { cn, randomId };
|
|
8
9
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/lib/utils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-
|
|
1
|
+
import"../chunk-CHh1Zzun.js";import{clsx as e}from"clsx";import{twMerge as t}from"tailwind-merge";function cn(...n){return t(e(n))}function randomId(e=`max-`){return`${e}${Math.random().toString(36).slice(2,11)}`}export{cn,randomId};
|
|
2
2
|
//# sourceMappingURL=utils.js.map
|
package/dist/lib/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":[],"sources":["../../src/lib/utils.ts"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":"kGAGA,SAAgB,GAAG,GAAG,EAAsB,CAC1C,OAAO,EAAQ,EAAK,EAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../src/lib/utils.ts"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n\nexport function randomId(prefix = 'max-') {\n return `${prefix}${Math.random().toString(36).slice(2, 11)}`\n}\n"],"mappings":"kGAGA,SAAgB,GAAG,GAAG,EAAsB,CAC1C,OAAO,EAAQ,EAAK,EAAO,CAAC,CAG9B,SAAgB,SAAS,EAAS,OAAQ,CACxC,MAAO,GAAG,IAAS,KAAK,QAAQ,CAAC,SAAS,GAAG,CAAC,MAAM,EAAG,GAAG"}
|