react-shadcn-kit 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/global.css +1 -1
- package/dist/components/composites/ComponentSearch.js +1 -0
- package/dist/components/composites/ComponentSearch.js.map +1 -1
- package/dist/components/composites/action-button.js +1 -0
- package/dist/components/composites/action-button.js.map +1 -1
- package/dist/components/composites/theme-toggle.js +1 -0
- package/dist/components/composites/theme-toggle.js.map +1 -1
- package/dist/components/composites/user-menu.js +1 -0
- package/dist/components/composites/user-menu.js.map +1 -1
- package/dist/components/data-table/data-table-column-header.js +37 -0
- package/dist/components/data-table/data-table-column-header.js.map +1 -0
- package/dist/components/data-table/data-table-faceted-filter.js +87 -0
- package/dist/components/data-table/data-table-faceted-filter.js.map +1 -0
- package/dist/components/data-table/data-table-pagination.js +97 -0
- package/dist/components/data-table/data-table-pagination.js.map +1 -0
- package/dist/components/data-table/data-table-toolbar.js +65 -0
- package/dist/components/data-table/data-table-toolbar.js.map +1 -0
- package/dist/components/data-table/data-table-view-options.js +32 -0
- package/dist/components/data-table/data-table-view-options.js.map +1 -0
- package/dist/components/data-table/data-table.js +143 -0
- package/dist/components/data-table/data-table.js.map +1 -0
- package/dist/components/kanban/kanban.js +293 -0
- package/dist/components/kanban/kanban.js.map +1 -0
- package/dist/components/marketing/hero.js +1 -0
- package/dist/components/marketing/hero.js.map +1 -1
- package/dist/components/marketing/social-proof.js +1 -0
- package/dist/components/marketing/social-proof.js.map +1 -1
- package/dist/components/marketing/value-props.js +1 -0
- package/dist/components/marketing/value-props.js.map +1 -1
- package/dist/components/primitives/aspect-ratio.js +1 -0
- package/dist/components/primitives/aspect-ratio.js.map +1 -1
- package/dist/components/primitives/badge.js +1 -0
- package/dist/components/primitives/badge.js.map +1 -1
- package/dist/components/primitives/button-group.js +1 -0
- package/dist/components/primitives/button-group.js.map +1 -1
- package/dist/components/primitives/button.js +1 -0
- package/dist/components/primitives/button.js.map +1 -1
- package/dist/components/primitives/calendar.js +1 -0
- package/dist/components/primitives/calendar.js.map +1 -1
- package/dist/components/primitives/carousel.js +1 -0
- package/dist/components/primitives/carousel.js.map +1 -1
- package/dist/components/primitives/chart.js +1 -0
- package/dist/components/primitives/chart.js.map +1 -1
- package/dist/components/primitives/checkbox.js +1 -0
- package/dist/components/primitives/checkbox.js.map +1 -1
- package/dist/components/primitives/context-menu.js +1 -0
- package/dist/components/primitives/context-menu.js.map +1 -1
- package/dist/components/primitives/custom-button.js +1 -0
- package/dist/components/primitives/custom-button.js.map +1 -1
- package/dist/components/primitives/drawer.js +1 -0
- package/dist/components/primitives/drawer.js.map +1 -1
- package/dist/components/primitives/dropdown-menu.js +3 -0
- package/dist/components/primitives/dropdown-menu.js.map +1 -1
- package/dist/components/primitives/field.js +1 -0
- package/dist/components/primitives/field.js.map +1 -1
- package/dist/components/primitives/form-context.js +1 -0
- package/dist/components/primitives/form-context.js.map +1 -1
- package/dist/components/primitives/form.js +1 -0
- package/dist/components/primitives/form.js.map +1 -1
- package/dist/components/primitives/hover-card.js +1 -0
- package/dist/components/primitives/hover-card.js.map +1 -1
- package/dist/components/primitives/input-group.js +1 -0
- package/dist/components/primitives/input-group.js.map +1 -1
- package/dist/components/primitives/input-otp.js +1 -0
- package/dist/components/primitives/input-otp.js.map +1 -1
- package/dist/components/primitives/label.js +1 -0
- package/dist/components/primitives/label.js.map +1 -1
- package/dist/components/primitives/loading-swap.js +1 -0
- package/dist/components/primitives/loading-swap.js.map +1 -1
- package/dist/components/primitives/navigation-menu.js +1 -0
- package/dist/components/primitives/navigation-menu.js.map +1 -1
- package/dist/components/primitives/popover.js +1 -0
- package/dist/components/primitives/popover.js.map +1 -1
- package/dist/components/primitives/radio-group.js +1 -0
- package/dist/components/primitives/radio-group.js.map +1 -1
- package/dist/components/primitives/scroll-area.js +1 -0
- package/dist/components/primitives/scroll-area.js.map +1 -1
- package/dist/components/primitives/separator.js +1 -0
- package/dist/components/primitives/separator.js.map +1 -1
- package/dist/components/primitives/sidebar-context.js +1 -0
- package/dist/components/primitives/sidebar-context.js.map +1 -1
- package/dist/components/primitives/sidebar.js +1 -0
- package/dist/components/primitives/sidebar.js.map +1 -1
- package/dist/components/primitives/slider.js +1 -0
- package/dist/components/primitives/slider.js.map +1 -1
- package/dist/components/primitives/sonner.js +1 -0
- package/dist/components/primitives/sonner.js.map +1 -1
- package/dist/components/primitives/switch.js +1 -0
- package/dist/components/primitives/switch.js.map +1 -1
- package/dist/components/primitives/tabs.js +1 -0
- package/dist/components/primitives/tabs.js.map +1 -1
- package/dist/components/primitives/theme-provider.js +1 -0
- package/dist/components/primitives/theme-provider.js.map +1 -1
- package/dist/components/primitives/toggle-group.js +1 -0
- package/dist/components/primitives/toggle-group.js.map +1 -1
- package/dist/components/primitives/toggle.js +1 -0
- package/dist/components/primitives/toggle.js.map +1 -1
- package/dist/components/primitives/tooltip.js +1 -0
- package/dist/components/primitives/tooltip.js.map +1 -1
- package/dist/hooks/use-aria-live.js +1 -0
- package/dist/hooks/use-aria-live.js.map +1 -1
- package/dist/hooks/use-focus-visible.js +1 -0
- package/dist/hooks/use-focus-visible.js.map +1 -1
- package/dist/hooks/use-mobile.js +1 -0
- package/dist/hooks/use-mobile.js.map +1 -1
- package/dist/hooks/use-screen-reader-only.js +1 -0
- package/dist/hooks/use-screen-reader-only.js.map +1 -1
- package/dist/index.d.ts +144 -0
- package/dist/index.js +266 -245
- package/dist/index.js.map +1 -1
- package/package.json +17 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-group.js","sources":["../../../src/components/primitives/toggle-group.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"toggle-group.js","sources":["../../../src/components/primitives/toggle-group.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as ToggleGroupPrimitive from \"@radix-ui/react-toggle-group\";\nimport { type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\nimport { toggleVariants } from \"../primitives/toggle-variants\";\n\nconst ToggleGroupContext = React.createContext<\n VariantProps<typeof toggleVariants> & {\n spacing?: number;\n }\n>({\n size: \"default\",\n variant: \"default\",\n spacing: 0,\n});\n\nfunction ToggleGroup({\n className,\n variant,\n size,\n spacing = 0,\n children,\n ...props\n}: React.ComponentProps<typeof ToggleGroupPrimitive.Root> &\n VariantProps<typeof toggleVariants> & {\n spacing?: number;\n }) {\n return (\n <ToggleGroupPrimitive.Root\n data-slot=\"toggle-group\"\n data-variant={variant}\n data-size={size}\n data-spacing={spacing}\n style={{ \"--gap\": spacing } as React.CSSProperties}\n className={cn(\n \"group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs\",\n className,\n )}\n {...props}\n >\n <ToggleGroupContext.Provider value={{ variant, size, spacing }}>\n {children}\n </ToggleGroupContext.Provider>\n </ToggleGroupPrimitive.Root>\n );\n}\n\nfunction ToggleGroupItem({\n className,\n children,\n variant,\n size,\n ...props\n}: React.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>) {\n const context = React.useContext(ToggleGroupContext);\n\n return (\n <ToggleGroupPrimitive.Item\n data-slot=\"toggle-group-item\"\n data-variant={context.variant || variant}\n data-size={context.size || size}\n data-spacing={context.spacing}\n className={cn(\n toggleVariants({\n variant: context.variant || variant,\n size: context.size || size,\n }),\n \"w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10\",\n \"data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l\",\n className,\n )}\n {...props}\n >\n {children}\n </ToggleGroupPrimitive.Item>\n );\n}\n\nexport { ToggleGroup, ToggleGroupItem };\n"],"names":[],"mappings":";AASA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIE;AACM;AACG;AAEX;AAEA;AAAqB;AACnB;AACA;AACA;AACU;AACV;AAEF;AAIE;AACE;AAAsB;AAArB;AACW;AACI;AACH;AACG;AACI;AACP;AACT;AACA;AAAA;AAEE;AAIJ;AAAA;AAGN;AAEA;AAAyB;AACvB;AACA;AACA;AACA;AAEF;AACE;AAEA;AACE;AAAsB;AAArB;AACW;AACuB;AACN;AACL;AACX;AACM;AACe;AACN;AACvB;AACD;AACA;AACA;AAAA;AAEE;AAEH;AAAA;AAGP;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.js","sources":["../../../src/components/primitives/toggle.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as TogglePrimitive from \"@radix-ui/react-toggle\";\nimport { type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"@/lib/utils\";\nimport { toggleVariants } from \"./toggle-variants\";\n\ninterface ToggleProps\n extends React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root>,\n VariantProps<typeof toggleVariants> {}\n\nconst Toggle = React.forwardRef<React.ElementRef<typeof TogglePrimitive.Root>, ToggleProps>(\n ({ className, variant, size, ...props }, ref) => {\n return (\n <TogglePrimitive.Root\n ref={ref}\n data-slot=\"toggle\"\n className={cn(toggleVariants({ variant, size, className }))}\n {...props}\n />\n );\n },\n);\n\nToggle.displayName = TogglePrimitive.Root.displayName;\n\nexport { Toggle };\nexport type { ToggleProps };\n"],"names":["
|
|
1
|
+
{"version":3,"file":"toggle.js","sources":["../../../src/components/primitives/toggle.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as TogglePrimitive from \"@radix-ui/react-toggle\";\nimport { type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"@/lib/utils\";\nimport { toggleVariants } from \"./toggle-variants\";\n\ninterface ToggleProps\n extends React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root>,\n VariantProps<typeof toggleVariants> {}\n\nconst Toggle = React.forwardRef<React.ElementRef<typeof TogglePrimitive.Root>, ToggleProps>(\n ({ className, variant, size, ...props }, ref) => {\n return (\n <TogglePrimitive.Root\n ref={ref}\n data-slot=\"toggle\"\n className={cn(toggleVariants({ variant, size, className }))}\n {...props}\n />\n );\n },\n);\n\nToggle.displayName = TogglePrimitive.Root.displayName;\n\nexport { Toggle };\nexport type { ToggleProps };\n"],"names":["Toggle"],"mappings":";AAYA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAqB;AAGf;AAAiB;AAAhB;AACC;AACU;AACgD;AACtD;AAAA;AAIZ;AAEAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.js","sources":["../../../src/components/primitives/tooltip.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\n\nimport { cn } from \"@/lib/utils\";\n\nfunction TooltipProvider({\n delayDuration = 0,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n return (\n <TooltipPrimitive.Provider\n data-slot=\"tooltip-provider\"\n delayDuration={delayDuration}\n {...props}\n />\n );\n}\n\nfunction Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n return (\n <TooltipProvider>\n <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />\n </TooltipProvider>\n );\n}\n\nfunction TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {\n return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />;\n}\n\nfunction TooltipContent({\n className,\n sideOffset = 0,\n children,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Content>) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n data-slot=\"tooltip-content\"\n sideOffset={sideOffset}\n className={cn(\n \"bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance\",\n className,\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className=\"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]\" />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n );\n}\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };\n"],"names":[
|
|
1
|
+
{"version":3,"file":"tooltip.js","sources":["../../../src/components/primitives/tooltip.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\n\nimport { cn } from \"@/lib/utils\";\n\nfunction TooltipProvider({\n delayDuration = 0,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n return (\n <TooltipPrimitive.Provider\n data-slot=\"tooltip-provider\"\n delayDuration={delayDuration}\n {...props}\n />\n );\n}\n\nfunction Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n return (\n <TooltipProvider>\n <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />\n </TooltipProvider>\n );\n}\n\nfunction TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {\n return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />;\n}\n\nfunction TooltipContent({\n className,\n sideOffset = 0,\n children,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Content>) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n data-slot=\"tooltip-content\"\n sideOffset={sideOffset}\n className={cn(\n \"bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance\",\n className,\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className=\"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]\" />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n );\n}\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };\n"],"names":[],"mappings":";AAOA;AAAA;AAAA;AAAA;AAAyB;AACP;AAElB;AACE;AACE;AAAkB;AAAjB;AACW;AACV;AACI;AAAA;AAGV;AAEA;AACE;AAKF;AAEA;AACE;AACF;AAEA;AAAwB;AACtB;AACa;AACb;AAEF;AACE;AAEI;AAAkB;AAAjB;AACW;AACV;AACW;AACT;AACA;AAAA;AAEE;AAEH;AAAA;AACsI;AAAA;AAAA;AAI/I;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-aria-live.js","sources":["../../src/hooks/use-aria-live.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"use-aria-live.js","sources":["../../src/hooks/use-aria-live.ts"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useRef } from \"react\";\n\n/**\n * useAriaLive\n *\n * Provides a simple way to announce dynamic content to screen readers using an\n * `aria-live` region. The hook returns a ref that should be attached to a hidden\n * element and a function to update the live message.\n *\n * Example usage:\n * ```tsx\n * const { liveRef, announce } = useAriaLive();\n * return (\n * <>\n * <div ref={liveRef} aria-live=\"polite\" className=\"sr-only\" />\n * <button onClick={() => announce('Item added')}>Add</button>\n * </>\n * );\n * ```\n */\nexport function useAriaLive() {\n const liveRef = useRef<HTMLDivElement>(null);\n\n const announce = (message: string) => {\n if (liveRef.current) {\n // Clear previous message to ensure screen readers pick up the new one\n liveRef.current.textContent = \"\";\n // Use a timeout to allow the DOM to register the change\n setTimeout(() => {\n if (liveRef.current) {\n liveRef.current.textContent = message;\n }\n }, 100);\n }\n };\n\n // Cleanup on unmount\n useEffect(() => {\n const liveElement = liveRef.current;\n return () => {\n if (liveElement) {\n liveElement.textContent = \"\";\n }\n };\n }, []);\n\n return { liveRef, announce } as const;\n}\n"],"names":[],"mappings":";AAsBO;AAAA;AACL;AAGE;AAKI;AACgC;AAE5B;AAKV;AACE;AACA;AACE;AAC4B;AAE9B;AAIJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-focus-visible.js","sources":["../../src/hooks/use-focus-visible.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"use-focus-visible.js","sources":["../../src/hooks/use-focus-visible.ts"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\n\n/**\n * useFocusVisible\n *\n * Detects when the user is navigating via keyboard (focus-visible) and provides a\n * boolean flag that can be used to apply a visual focus style only for keyboard\n * users. This mirrors the behavior of the `:focus-visible` CSS pseudo‑class but\n * works in browsers that lack native support.\n *\n * Example usage:\n * ```tsx\n * const isFocusVisible = useFocusVisible();\n * return <button className={isFocusVisible ? 'focus-visible' : ''}>Click</button>;\n * ```\n */\nexport function useFocusVisible() {\n const [isFocusVisible, setIsFocusVisible] = useState(false);\n\n useEffect(() => {\n const onKeyDown = (e: KeyboardEvent) => {\n if (\n e.key === \"Tab\" ||\n e.key === \"Shift\" ||\n e.key === \"ArrowUp\" ||\n e.key === \"ArrowDown\" ||\n e.key === \"ArrowLeft\" ||\n e.key === \"ArrowRight\"\n ) {\n setIsFocusVisible(true);\n }\n };\n const onMouseDown = () => setIsFocusVisible(false);\n\n window.addEventListener(\"keydown\", onKeyDown);\n window.addEventListener(\"mousedown\", onMouseDown);\n return () => {\n window.removeEventListener(\"keydown\", onKeyDown);\n window.removeEventListener(\"mousedown\", onMouseDown);\n };\n }, []);\n\n return isFocusVisible;\n}\n"],"names":[],"mappings":";AAkBO;AAAA;AACL;AAEA;AACE;AACE;AAQwB;AAK1B;AAGE;AACmD;AACrD;AAIJ;;;;"}
|
package/dist/hooks/use-mobile.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-mobile.js","sources":["../../src/hooks/use-mobile.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"use-mobile.js","sources":["../../src/hooks/use-mobile.ts"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nconst MOBILE_BREAKPOINT = 768;\n\nexport function useIsMobile() {\n const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined);\n\n React.useEffect(() => {\n const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);\n const onChange = () => {\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n };\n mql.addEventListener(\"change\", onChange);\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n return () => mql.removeEventListener(\"change\", onChange);\n }, []);\n\n return !!isMobile;\n}\n"],"names":[],"mappings":";;AAIA;AAEO;AACL;AAEA;AACE;AAEE;AAAiD;AAEnD;AAEuD;AAI3D;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-screen-reader-only.js","sources":["../../src/hooks/use-screen-reader-only.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"use-screen-reader-only.js","sources":["../../src/hooks/use-screen-reader-only.ts"],"sourcesContent":["\"use client\";\n\nimport { useEffect } from \"react\";\n\n/**\n * useScreenReaderOnly\n *\n * Provides a utility hook that returns a className string for visually hidden\n * elements that are still accessible to screen readers. It mirrors the common\n * `sr-only` utility from Tailwind but can be used without Tailwind.\n *\n * Example usage:\n * ```tsx\n * const srOnly = useScreenReaderOnly();\n * return <span className={srOnly}>Only for screen readers</span>;\n * ```\n */\nexport function useScreenReaderOnly() {\n // The className mirrors Tailwind's `sr-only` implementation.\n const className =\n \"absolute w-px h-px overflow-hidden whitespace-nowrap border-0 p-0 -m-px clip[rect(0,0,0,0)]\";\n\n // Ensure the element is removed from the visual flow on mount (no side‑effects needed).\n useEffect(() => {}, []);\n\n return className;\n}\n"],"names":[],"mappings":";AAiBO;AAAA;AAEL;AAIA;AAAgB;AAGlB;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
|
6
6
|
import { ClassProp } from 'class-variance-authority/types';
|
|
7
7
|
import { ClassValue } from 'clsx';
|
|
8
8
|
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
9
|
+
import { Column } from '@tanstack/react-table';
|
|
10
|
+
import { ColumnDef } from '@tanstack/react-table';
|
|
9
11
|
import { Command as Command_2 } from 'cmdk';
|
|
10
12
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
11
13
|
import { ControllerProps } from 'react-hook-form';
|
|
@@ -32,6 +34,7 @@ import * as React_2 from 'react';
|
|
|
32
34
|
import * as RechartsPrimitive from 'recharts';
|
|
33
35
|
import { RefObject } from 'react';
|
|
34
36
|
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
37
|
+
import { Row } from '@tanstack/react-table';
|
|
35
38
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
36
39
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
37
40
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
@@ -39,6 +42,7 @@ import { SeparatorProps } from '@radix-ui/react-separator';
|
|
|
39
42
|
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
40
43
|
import { SlotProps } from '@radix-ui/react-slot';
|
|
41
44
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
45
|
+
import { Table as Table_2 } from '@tanstack/react-table';
|
|
42
46
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
43
47
|
import { ThemeProvider as ThemeProvider_2 } from 'next-themes';
|
|
44
48
|
import { ToasterProps } from 'sonner';
|
|
@@ -393,6 +397,88 @@ export declare const customButtonVariants: (props?: ({
|
|
|
393
397
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
394
398
|
} & ClassProp) | undefined) => string;
|
|
395
399
|
|
|
400
|
+
export declare function DataTable<TData, TValue>({ columns, data, searchKey, onRowClick, renderSubComponent, enableRowExpansion, enableColumnSizing, enableColumnPinning, enableGlobalFilter, enableColumnOrdering, enableRowPinning, facetedFilters, }: DataTableProps<TData, TValue>): JSX.Element;
|
|
401
|
+
|
|
402
|
+
export declare function DataTableColumnHeader<TData, TValue>({ column, title, className, }: DataTableColumnHeaderProps<TData, TValue>): JSX.Element;
|
|
403
|
+
|
|
404
|
+
declare interface DataTableColumnHeaderProps<TData, TValue> extends React.HTMLAttributes<HTMLDivElement> {
|
|
405
|
+
column: Column<TData, TValue>;
|
|
406
|
+
title: string;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
export declare function DataTableFacetedFilter<TData, TValue>({ column, title, options, }: DataTableFacetedFilterProps<TData, TValue>): JSX.Element;
|
|
410
|
+
|
|
411
|
+
declare interface DataTableFacetedFilterProps<TData, TValue> {
|
|
412
|
+
column?: Column<TData, TValue>;
|
|
413
|
+
title?: string;
|
|
414
|
+
options: {
|
|
415
|
+
label: string;
|
|
416
|
+
value: string;
|
|
417
|
+
icon?: React_2.ComponentType<{
|
|
418
|
+
className?: string;
|
|
419
|
+
}>;
|
|
420
|
+
}[];
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
export declare function DataTablePagination<TData>({ table }: DataTablePaginationProps<TData>): JSX.Element;
|
|
424
|
+
|
|
425
|
+
declare interface DataTablePaginationProps<TData> {
|
|
426
|
+
table: Table_2<TData>;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
declare interface DataTableProps<TData, TValue> {
|
|
430
|
+
columns: ColumnDef<TData, TValue>[];
|
|
431
|
+
data: TData[];
|
|
432
|
+
searchKey?: string;
|
|
433
|
+
onRowClick?: (row: Row<TData>) => void;
|
|
434
|
+
renderSubComponent?: (props: {
|
|
435
|
+
row: Row<TData>;
|
|
436
|
+
}) => React_2.ReactNode;
|
|
437
|
+
enableRowExpansion?: boolean;
|
|
438
|
+
enableColumnSizing?: boolean;
|
|
439
|
+
enableColumnPinning?: boolean;
|
|
440
|
+
enableGlobalFilter?: boolean;
|
|
441
|
+
enableColumnOrdering?: boolean;
|
|
442
|
+
enableRowPinning?: boolean;
|
|
443
|
+
facetedFilters?: {
|
|
444
|
+
columnId: string;
|
|
445
|
+
title: string;
|
|
446
|
+
options: {
|
|
447
|
+
label: string;
|
|
448
|
+
value: string;
|
|
449
|
+
icon?: React_2.ComponentType<{
|
|
450
|
+
className?: string;
|
|
451
|
+
}>;
|
|
452
|
+
}[];
|
|
453
|
+
}[];
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
export declare function DataTableToolbar<TData>({ table, searchKey, placeholder, enableGlobalFilter, facetedFilters, }: DataTableToolbarProps<TData>): JSX.Element;
|
|
457
|
+
|
|
458
|
+
declare interface DataTableToolbarProps<TData> {
|
|
459
|
+
table: Table_2<TData>;
|
|
460
|
+
searchKey?: string;
|
|
461
|
+
placeholder?: string;
|
|
462
|
+
enableGlobalFilter?: boolean;
|
|
463
|
+
facetedFilters?: {
|
|
464
|
+
columnId: string;
|
|
465
|
+
title: string;
|
|
466
|
+
options: {
|
|
467
|
+
label: string;
|
|
468
|
+
value: string;
|
|
469
|
+
icon?: React.ComponentType<{
|
|
470
|
+
className?: string;
|
|
471
|
+
}>;
|
|
472
|
+
}[];
|
|
473
|
+
}[];
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
export declare function DataTableViewOptions<TData>({ table }: DataTableViewOptionsProps<TData>): JSX.Element;
|
|
477
|
+
|
|
478
|
+
declare interface DataTableViewOptionsProps<TData> {
|
|
479
|
+
table: Table_2<TData>;
|
|
480
|
+
}
|
|
481
|
+
|
|
396
482
|
export declare function Dialog({ ...props }: React_2.ComponentProps<typeof DialogPrimitive.Root>): JSX.Element;
|
|
397
483
|
|
|
398
484
|
export declare function DialogClose({ ...props }: React_2.ComponentProps<typeof DialogPrimitive.Close>): JSX.Element;
|
|
@@ -646,6 +732,64 @@ declare const itemVariants: (props?: ({
|
|
|
646
732
|
size?: "default" | "sm" | null | undefined;
|
|
647
733
|
} & ClassProp) | undefined) => string;
|
|
648
734
|
|
|
735
|
+
export declare function Kanban<T extends KanbanItem>({ items, columns, onItemUpdate, onItemClick, renderCard, className, }: KanbanRootProps<T>): JSX.Element;
|
|
736
|
+
|
|
737
|
+
export declare const KanbanCard: typeof KanbanCardInner;
|
|
738
|
+
|
|
739
|
+
export declare function KanbanCardDescription({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
|
|
740
|
+
|
|
741
|
+
declare const KanbanCardInner: <T extends KanbanItem>({ card, onCardClick, renderCard, className, }: KanbanCardProps<T>) => JSX.Element;
|
|
742
|
+
|
|
743
|
+
declare interface KanbanCardProps<T extends KanbanItem> {
|
|
744
|
+
card: T;
|
|
745
|
+
onCardClick?: (item: T) => void;
|
|
746
|
+
renderCard?: (item: T) => React_2.ReactNode;
|
|
747
|
+
className?: string;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
export declare function KanbanCardTitle({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
|
|
751
|
+
|
|
752
|
+
export declare function KanbanColumn<T extends KanbanItem>({ column, items, onCardClick, renderCard, className, }: KanbanColumnProps<T>): JSX.Element;
|
|
753
|
+
|
|
754
|
+
export declare function KanbanColumnBadge({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
|
|
755
|
+
|
|
756
|
+
export declare function KanbanColumnContent({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
|
|
757
|
+
|
|
758
|
+
export declare interface KanbanColumnDef {
|
|
759
|
+
id: string;
|
|
760
|
+
title: string;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
export declare function KanbanColumnHeader({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
|
|
764
|
+
|
|
765
|
+
declare interface KanbanColumnProps<T extends KanbanItem> {
|
|
766
|
+
column: KanbanColumnDef;
|
|
767
|
+
items: T[];
|
|
768
|
+
onCardClick?: (item: T) => void;
|
|
769
|
+
renderCard?: (item: T) => React_2.ReactNode;
|
|
770
|
+
className?: string;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
export declare type KanbanId = string | number;
|
|
774
|
+
|
|
775
|
+
export declare interface KanbanItem {
|
|
776
|
+
id: KanbanId;
|
|
777
|
+
status: string;
|
|
778
|
+
title?: string;
|
|
779
|
+
name?: string;
|
|
780
|
+
description?: string;
|
|
781
|
+
[key: string]: unknown;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
declare interface KanbanRootProps<T extends KanbanItem> {
|
|
785
|
+
items: T[];
|
|
786
|
+
columns?: KanbanColumnDef[];
|
|
787
|
+
onItemUpdate: (itemId: KanbanId, newStatus: string) => void;
|
|
788
|
+
onItemClick?: (item: T) => void;
|
|
789
|
+
renderCard?: (item: T) => React_2.ReactNode;
|
|
790
|
+
className?: string;
|
|
791
|
+
}
|
|
792
|
+
|
|
649
793
|
export declare function Kbd({ className, ...props }: React.ComponentProps<"kbd">): JSX.Element;
|
|
650
794
|
|
|
651
795
|
export declare function KbdGroup({ className, ...props }: React.ComponentProps<"div">): JSX.Element;
|