@kubetail/ui 2.4.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/elements/avatar.cjs +1 -1
- package/dist/elements/avatar.cjs.map +1 -1
- package/dist/elements/avatar.d.ts +1 -1
- package/dist/elements/avatar.js +1 -1
- package/dist/elements/avatar.js.map +1 -1
- package/dist/elements/button.cjs.map +1 -1
- package/dist/elements/calendar.cjs.map +1 -1
- package/dist/elements/calendar.stories.d.ts +0 -3
- package/dist/elements/card.cjs.map +1 -1
- package/dist/elements/checkbox.cjs.map +1 -1
- package/dist/elements/context-menu.cjs +2 -0
- package/dist/elements/context-menu.cjs.map +1 -0
- package/dist/elements/context-menu.d.ts +30 -0
- package/dist/elements/context-menu.js +126 -0
- package/dist/elements/context-menu.js.map +1 -0
- package/dist/elements/context-menu.stories.d.ts +17 -0
- package/dist/elements/context-menu.test.d.ts +0 -0
- package/dist/elements/dialog.cjs.map +1 -1
- package/dist/elements/dropdown-menu.cjs.map +1 -1
- package/dist/elements/form.cjs.map +1 -1
- package/dist/elements/input.cjs.map +1 -1
- package/dist/elements/label.cjs.map +1 -1
- package/dist/elements/link.cjs.map +1 -1
- package/dist/elements/pagination.cjs.map +1 -1
- package/dist/elements/popover.cjs.map +1 -1
- package/dist/elements/search-box.cjs.map +1 -1
- package/dist/elements/select.cjs.map +1 -1
- package/dist/elements/separator.cjs.map +1 -1
- package/dist/elements/sheet.cjs.map +1 -1
- package/dist/elements/sidebar.cjs +1 -1
- package/dist/elements/sidebar.cjs.map +1 -1
- package/dist/elements/sidebar.js +1 -1
- package/dist/elements/sidebar.js.map +1 -1
- package/dist/elements/skeleton.cjs.map +1 -1
- package/dist/elements/spinner.cjs.map +1 -1
- package/dist/elements/switch.cjs.map +1 -1
- package/dist/elements/table.cjs.map +1 -1
- package/dist/elements/tabs.cjs.map +1 -1
- package/dist/elements/toggle.cjs.map +1 -1
- package/dist/elements/tooltip.cjs.map +1 -1
- package/dist/hooks/use-mobile.cjs +1 -1
- package/dist/hooks/use-mobile.cjs.map +1 -1
- package/dist/hooks/use-mobile.js +3 -3
- package/dist/hooks/use-mobile.js.map +1 -1
- package/dist/hooks/use-mobile.test.d.ts +1 -0
- package/package.json +33 -27
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.cjs","names":[],"sources":["../../src/elements/table.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@/lib/utils';\n\ninterface TableProps extends React.ComponentProps<'table'> {\n containerClassName?: string;\n}\n\nfunction Table({ className, containerClassName, ...props }: TableProps) {\n return (\n <div data-slot=\"table-container\" className={cn('relative w-full overflow-x-auto', containerClassName)}>\n <table data-slot=\"table\" className={cn('w-full caption-bottom text-sm', className)} {...props} />\n </div>\n );\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<'thead'>) {\n return <thead data-slot=\"table-header\" className={cn('[&_tr]:border-b', className)} {...props} />;\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<'tbody'>) {\n return <tbody data-slot=\"table-body\" className={cn('[&_tr:last-child]:border-0', className)} {...props} />;\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>) {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn('bg-muted/50 border-t font-medium [&>tr]:last:border-b-0', className)}\n {...props}\n />\n );\n}\n\nfunction TableRow({ className, ...props }: React.ComponentProps<'tr'>) {\n return (\n <tr\n data-slot=\"table-row\"\n className={cn('hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors', className)}\n {...props}\n />\n );\n}\n\nfunction TableHead({ className, ...props }: React.ComponentProps<'th'>) {\n return (\n <th\n data-slot=\"table-head\"\n className={cn(\n 'text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCell({ className, ...props }: React.ComponentProps<'td'>) {\n return (\n <td\n data-slot=\"table-cell\"\n className={cn(\n 'p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCaption({ className, ...props }: React.ComponentProps<'caption'>) {\n return (\n <caption data-slot=\"table-caption\" className={cn('text-muted-foreground mt-4 text-sm', className)} {...props} />\n );\n}\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };\nexport type { TableProps };\n"],"mappings":"oMAQA,SAAS,EAAM,CAAE,YAAW,qBAAoB,GAAG,GAAqB,CACtE,
|
|
1
|
+
{"version":3,"file":"table.cjs","names":[],"sources":["../../src/elements/table.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@/lib/utils';\n\ninterface TableProps extends React.ComponentProps<'table'> {\n containerClassName?: string;\n}\n\nfunction Table({ className, containerClassName, ...props }: TableProps) {\n return (\n <div data-slot=\"table-container\" className={cn('relative w-full overflow-x-auto', containerClassName)}>\n <table data-slot=\"table\" className={cn('w-full caption-bottom text-sm', className)} {...props} />\n </div>\n );\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<'thead'>) {\n return <thead data-slot=\"table-header\" className={cn('[&_tr]:border-b', className)} {...props} />;\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<'tbody'>) {\n return <tbody data-slot=\"table-body\" className={cn('[&_tr:last-child]:border-0', className)} {...props} />;\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>) {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn('bg-muted/50 border-t font-medium [&>tr]:last:border-b-0', className)}\n {...props}\n />\n );\n}\n\nfunction TableRow({ className, ...props }: React.ComponentProps<'tr'>) {\n return (\n <tr\n data-slot=\"table-row\"\n className={cn('hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors', className)}\n {...props}\n />\n );\n}\n\nfunction TableHead({ className, ...props }: React.ComponentProps<'th'>) {\n return (\n <th\n data-slot=\"table-head\"\n className={cn(\n 'text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCell({ className, ...props }: React.ComponentProps<'td'>) {\n return (\n <td\n data-slot=\"table-cell\"\n className={cn(\n 'p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCaption({ className, ...props }: React.ComponentProps<'caption'>) {\n return (\n <caption data-slot=\"table-caption\" className={cn('text-muted-foreground mt-4 text-sm', className)} {...props} />\n );\n}\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };\nexport type { TableProps };\n"],"mappings":"oMAQA,SAAS,EAAM,CAAE,YAAW,qBAAoB,GAAG,GAAqB,CACtE,OACE,EAAA,EAAA,KAAC,MAAD,CAAK,YAAU,kBAAkB,UAAW,EAAA,GAAG,kCAAmC,EAAmB,WACnG,EAAA,EAAA,KAAC,QAAD,CAAO,YAAU,QAAQ,UAAW,EAAA,GAAG,gCAAiC,EAAU,CAAE,GAAI,EAAS,CAAA,CAC7F,CAAA,CAIV,SAAS,EAAY,CAAE,YAAW,GAAG,GAAwC,CAC3E,OAAO,EAAA,EAAA,KAAC,QAAD,CAAO,YAAU,eAAe,UAAW,EAAA,GAAG,kBAAmB,EAAU,CAAE,GAAI,EAAS,CAAA,CAGnG,SAAS,EAAU,CAAE,YAAW,GAAG,GAAwC,CACzE,OAAO,EAAA,EAAA,KAAC,QAAD,CAAO,YAAU,aAAa,UAAW,EAAA,GAAG,6BAA8B,EAAU,CAAE,GAAI,EAAS,CAAA,CAG5G,SAAS,EAAY,CAAE,YAAW,GAAG,GAAwC,CAC3E,OACE,EAAA,EAAA,KAAC,QAAD,CACE,YAAU,eACV,UAAW,EAAA,GAAG,0DAA2D,EAAU,CACnF,GAAI,EACJ,CAAA,CAIN,SAAS,EAAS,CAAE,YAAW,GAAG,GAAqC,CACrE,OACE,EAAA,EAAA,KAAC,KAAD,CACE,YAAU,YACV,UAAW,EAAA,GAAG,8EAA+E,EAAU,CACvG,GAAI,EACJ,CAAA,CAIN,SAAS,EAAU,CAAE,YAAW,GAAG,GAAqC,CACtE,OACE,EAAA,EAAA,KAAC,KAAD,CACE,YAAU,aACV,UAAW,EAAA,GACT,qJACA,EACD,CACD,GAAI,EACJ,CAAA,CAIN,SAAS,EAAU,CAAE,YAAW,GAAG,GAAqC,CACtE,OACE,EAAA,EAAA,KAAC,KAAD,CACE,YAAU,aACV,UAAW,EAAA,GACT,yGACA,EACD,CACD,GAAI,EACJ,CAAA,CAIN,SAAS,EAAa,CAAE,YAAW,GAAG,GAA0C,CAC9E,OACE,EAAA,EAAA,KAAC,UAAD,CAAS,YAAU,gBAAgB,UAAW,EAAA,GAAG,qCAAsC,EAAU,CAAE,GAAI,EAAS,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.cjs","names":[],"sources":["../../src/elements/tabs.tsx"],"sourcesContent":["'use client';\n\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\n\nimport { cn } from '@/lib/utils';\n\nfunction Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>) {\n return <TabsPrimitive.Root data-slot=\"tabs\" className={cn('flex flex-col gap-2', className)} {...props} />;\n}\n\nfunction TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>) {\n return (\n <TabsPrimitive.List\n data-slot=\"tabs-list\"\n className={cn(\n 'bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n return (\n <TabsPrimitive.Trigger\n data-slot=\"tabs-trigger\"\n className={cn(\n \"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>) {\n return <TabsPrimitive.Content data-slot=\"tabs-content\" className={cn('flex-1 outline-none', className)} {...props} />;\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n"],"mappings":"uPAMA,SAAS,EAAK,CAAE,YAAW,GAAG,GAA0D,CACtF,
|
|
1
|
+
{"version":3,"file":"tabs.cjs","names":[],"sources":["../../src/elements/tabs.tsx"],"sourcesContent":["'use client';\n\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\n\nimport { cn } from '@/lib/utils';\n\nfunction Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>) {\n return <TabsPrimitive.Root data-slot=\"tabs\" className={cn('flex flex-col gap-2', className)} {...props} />;\n}\n\nfunction TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>) {\n return (\n <TabsPrimitive.List\n data-slot=\"tabs-list\"\n className={cn(\n 'bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n return (\n <TabsPrimitive.Trigger\n data-slot=\"tabs-trigger\"\n className={cn(\n \"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>) {\n return <TabsPrimitive.Content data-slot=\"tabs-content\" className={cn('flex-1 outline-none', className)} {...props} />;\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n"],"mappings":"uPAMA,SAAS,EAAK,CAAE,YAAW,GAAG,GAA0D,CACtF,OAAO,EAAA,EAAA,KAAC,EAAc,KAAf,CAAoB,YAAU,OAAO,UAAW,EAAA,GAAG,sBAAuB,EAAU,CAAE,GAAI,EAAS,CAAA,CAG5G,SAAS,EAAS,CAAE,YAAW,GAAG,GAA0D,CAC1F,OACE,EAAA,EAAA,KAAC,EAAc,KAAf,CACE,YAAU,YACV,UAAW,EAAA,GACT,sGACA,EACD,CACD,GAAI,EACJ,CAAA,CAIN,SAAS,EAAY,CAAE,YAAW,GAAG,GAA6D,CAChG,OACE,EAAA,EAAA,KAAC,EAAc,QAAf,CACE,YAAU,eACV,UAAW,EAAA,GACT,kqBACA,EACD,CACD,GAAI,EACJ,CAAA,CAIN,SAAS,EAAY,CAAE,YAAW,GAAG,GAA6D,CAChG,OAAO,EAAA,EAAA,KAAC,EAAc,QAAf,CAAuB,YAAU,eAAe,UAAW,EAAA,GAAG,sBAAuB,EAAU,CAAE,GAAI,EAAS,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.cjs","names":[],"sources":["../../src/elements/toggle.tsx"],"sourcesContent":["'use client';\n\nimport * as TogglePrimitive from '@radix-ui/react-toggle';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\n\nconst toggleVariants = cva(\n \"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive hover:bg-muted hover:text-muted-foreground data-[state=on]:bg-accent data-[state=on]:text-accent-foreground\",\n {\n variants: {\n variant: {\n default: 'bg-transparent',\n outline: 'border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground',\n },\n size: {\n default: 'h-9 px-2 min-w-9',\n sm: 'h-8 px-1.5 min-w-8',\n lg: 'h-10 px-2.5 min-w-10',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nfunction Toggle({\n className,\n variant,\n size,\n ...props\n}: React.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>) {\n return (\n <TogglePrimitive.Root data-slot=\"toggle\" className={cn(toggleVariants({ variant, size, className }))} {...props} />\n );\n}\n\nexport { Toggle, toggleVariants };\n"],"mappings":"yPAOA,IAAM,GAAA,sCAAA,KACJ,+gBACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,iBACT,QAAS,4FACV,CACD,KAAM,CACJ,QAAS,mBACT,GAAI,qBACJ,GAAI,uBACL,CACF,CACD,gBAAiB,CACf,QAAS,UACT,KAAM,UACP,CACF,CACF,CAED,SAAS,EAAO,CACd,YACA,UACA,OACA,GAAG,GACuF,CAC1F,
|
|
1
|
+
{"version":3,"file":"toggle.cjs","names":[],"sources":["../../src/elements/toggle.tsx"],"sourcesContent":["'use client';\n\nimport * as TogglePrimitive from '@radix-ui/react-toggle';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\n\nconst toggleVariants = cva(\n \"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive hover:bg-muted hover:text-muted-foreground data-[state=on]:bg-accent data-[state=on]:text-accent-foreground\",\n {\n variants: {\n variant: {\n default: 'bg-transparent',\n outline: 'border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground',\n },\n size: {\n default: 'h-9 px-2 min-w-9',\n sm: 'h-8 px-1.5 min-w-8',\n lg: 'h-10 px-2.5 min-w-10',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nfunction Toggle({\n className,\n variant,\n size,\n ...props\n}: React.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>) {\n return (\n <TogglePrimitive.Root data-slot=\"toggle\" className={cn(toggleVariants({ variant, size, className }))} {...props} />\n );\n}\n\nexport { Toggle, toggleVariants };\n"],"mappings":"yPAOA,IAAM,GAAA,sCAAA,KACJ,+gBACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,iBACT,QAAS,4FACV,CACD,KAAM,CACJ,QAAS,mBACT,GAAI,qBACJ,GAAI,uBACL,CACF,CACD,gBAAiB,CACf,QAAS,UACT,KAAM,UACP,CACF,CACF,CAED,SAAS,EAAO,CACd,YACA,UACA,OACA,GAAG,GACuF,CAC1F,OACE,EAAA,EAAA,KAAC,EAAgB,KAAjB,CAAsB,YAAU,SAAS,UAAW,EAAA,GAAG,EAAe,CAAE,UAAS,OAAM,YAAW,CAAC,CAAC,CAAE,GAAI,EAAS,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.cjs","names":[],"sources":["../../src/elements/tooltip.tsx"],"sourcesContent":["'use client';\n\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\n\nimport { cn } from '@/lib/utils';\n\nfunction TooltipProvider({ delayDuration = 0, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n return <TooltipPrimitive.Provider data-slot=\"tooltip-provider\" delayDuration={delayDuration} {...props} />;\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"],"mappings":"8PAMA,SAAS,EAAgB,CAAE,gBAAgB,EAAG,GAAG,GAAiE,CAChH,
|
|
1
|
+
{"version":3,"file":"tooltip.cjs","names":[],"sources":["../../src/elements/tooltip.tsx"],"sourcesContent":["'use client';\n\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\n\nimport { cn } from '@/lib/utils';\n\nfunction TooltipProvider({ delayDuration = 0, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n return <TooltipPrimitive.Provider data-slot=\"tooltip-provider\" delayDuration={delayDuration} {...props} />;\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"],"mappings":"8PAMA,SAAS,EAAgB,CAAE,gBAAgB,EAAG,GAAG,GAAiE,CAChH,OAAO,EAAA,EAAA,KAAC,EAAiB,SAAlB,CAA2B,YAAU,mBAAkC,gBAAe,GAAI,EAAS,CAAA,CAG5G,SAAS,EAAQ,CAAE,GAAG,GAA6D,CACjF,OACE,EAAA,EAAA,KAAC,EAAD,CAAA,UACE,EAAA,EAAA,KAAC,EAAiB,KAAlB,CAAuB,YAAU,UAAU,GAAI,EAAS,CAAA,CACxC,CAAA,CAItB,SAAS,EAAe,CAAE,GAAG,GAAgE,CAC3F,OAAO,EAAA,EAAA,KAAC,EAAiB,QAAlB,CAA0B,YAAU,kBAAkB,GAAI,EAAS,CAAA,CAG5E,SAAS,EAAe,CACtB,YACA,aAAa,EACb,WACA,GAAG,GACqD,CACxD,OACE,EAAA,EAAA,KAAC,EAAiB,OAAlB,CAAA,UACE,EAAA,EAAA,MAAC,EAAiB,QAAlB,CACE,YAAU,kBACE,aACZ,UAAW,EAAA,GACT,oaACA,EACD,CACD,GAAI,WAPN,CASG,GACD,EAAA,EAAA,KAAC,EAAiB,MAAlB,CAAwB,UAAU,qGAAuG,CAAA,CAChH,GACH,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require(`../_virtual/_rolldown/runtime.cjs`);let e=require(`react`);var t=768;function n(){let[n,r]=(0,e.useState)(
|
|
1
|
+
require(`../_virtual/_rolldown/runtime.cjs`);let e=require(`react`);var t=768;function n(){let[n,r]=(0,e.useState)(typeof window<`u`?window.innerWidth<t:!1);return(0,e.useEffect)(()=>{let e=window.matchMedia(`(max-width: ${t-1}px)`),n=()=>{r(window.innerWidth<t)};return e.addEventListener(`change`,n),()=>e.removeEventListener(`change`,n)},[]),n}exports.useIsMobile=n;
|
|
2
2
|
//# sourceMappingURL=use-mobile.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-mobile.cjs","names":[],"sources":["../../src/hooks/use-mobile.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nconst MOBILE_BREAKPOINT = 768;\n\nexport function useIsMobile() {\n const [isMobile, setIsMobile] = useState<
|
|
1
|
+
{"version":3,"file":"use-mobile.cjs","names":[],"sources":["../../src/hooks/use-mobile.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nconst MOBILE_BREAKPOINT = 768;\n\nexport function useIsMobile() {\n const [isMobile, setIsMobile] = useState(\n typeof window !== 'undefined' ? window.innerWidth < MOBILE_BREAKPOINT : false,\n );\n\n 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 return () => mql.removeEventListener('change', onChange);\n }, []);\n\n return isMobile;\n}\n"],"mappings":"oEAEA,IAAM,EAAoB,IAE1B,SAAgB,GAAc,CAC5B,GAAM,CAAC,EAAU,IAAA,EAAA,EAAA,UACf,OAAO,OAAW,IAAc,OAAO,WAAa,EAAoB,GACzE,CAWD,OATA,EAAA,EAAA,eAAgB,CACd,IAAM,EAAM,OAAO,WAAW,eAAe,EAAoB,EAAE,KAAK,CAClE,MAAiB,CACrB,EAAY,OAAO,WAAa,EAAkB,EAGpD,OADA,EAAI,iBAAiB,SAAU,EAAS,KAC3B,EAAI,oBAAoB,SAAU,EAAS,EACvD,EAAE,CAAC,CAEC"}
|
package/dist/hooks/use-mobile.js
CHANGED
|
@@ -2,13 +2,13 @@ import { useEffect as e, useState as t } from "react";
|
|
|
2
2
|
//#region src/hooks/use-mobile.ts
|
|
3
3
|
var n = 768;
|
|
4
4
|
function r() {
|
|
5
|
-
let [r, i] = t(
|
|
5
|
+
let [r, i] = t(typeof window < "u" ? window.innerWidth < n : !1);
|
|
6
6
|
return e(() => {
|
|
7
7
|
let e = window.matchMedia(`(max-width: ${n - 1}px)`), t = () => {
|
|
8
8
|
i(window.innerWidth < n);
|
|
9
9
|
};
|
|
10
|
-
return e.addEventListener("change", t),
|
|
11
|
-
}, []),
|
|
10
|
+
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
11
|
+
}, []), r;
|
|
12
12
|
}
|
|
13
13
|
//#endregion
|
|
14
14
|
export { r as useIsMobile };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-mobile.js","names":[],"sources":["../../src/hooks/use-mobile.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nconst MOBILE_BREAKPOINT = 768;\n\nexport function useIsMobile() {\n const [isMobile, setIsMobile] = useState<
|
|
1
|
+
{"version":3,"file":"use-mobile.js","names":[],"sources":["../../src/hooks/use-mobile.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nconst MOBILE_BREAKPOINT = 768;\n\nexport function useIsMobile() {\n const [isMobile, setIsMobile] = useState(\n typeof window !== 'undefined' ? window.innerWidth < MOBILE_BREAKPOINT : false,\n );\n\n 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 return () => mql.removeEventListener('change', onChange);\n }, []);\n\n return isMobile;\n}\n"],"mappings":";;AAEA,IAAM,IAAoB;AAE1B,SAAgB,IAAc;CAC5B,IAAM,CAAC,GAAU,KAAe,EAC9B,OAAO,SAAW,MAAc,OAAO,aAAa,IAAoB,GACzE;AAWD,QATA,QAAgB;EACd,IAAM,IAAM,OAAO,WAAW,eAAe,IAAoB,EAAE,KAAK,EAClE,UAAiB;AACrB,KAAY,OAAO,aAAa,EAAkB;;AAGpD,SADA,EAAI,iBAAiB,UAAU,EAAS,QAC3B,EAAI,oBAAoB,UAAU,EAAS;IACvD,EAAE,CAAC,EAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubetail/ui",
|
|
3
|
-
"version": "v2.
|
|
3
|
+
"version": "v2.5.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/kubetail-org/kubetail-ui"
|
|
@@ -34,7 +34,9 @@
|
|
|
34
34
|
"/dist"
|
|
35
35
|
],
|
|
36
36
|
"peerDependencies": {
|
|
37
|
+
"@radix-ui/react-avatar": "^1",
|
|
37
38
|
"@radix-ui/react-checkbox": "^1",
|
|
39
|
+
"@radix-ui/react-context-menu": "^2",
|
|
38
40
|
"@radix-ui/react-dialog": "^1",
|
|
39
41
|
"@radix-ui/react-dropdown-menu": "^2",
|
|
40
42
|
"@radix-ui/react-label": "^2",
|
|
@@ -47,7 +49,6 @@
|
|
|
47
49
|
"@radix-ui/react-toggle": "^1",
|
|
48
50
|
"@radix-ui/react-tooltip": "^1",
|
|
49
51
|
"lucide-react": "*",
|
|
50
|
-
"radix-ui": "^1",
|
|
51
52
|
"react": "^19",
|
|
52
53
|
"react-day-picker": "^9",
|
|
53
54
|
"react-dom": "^19",
|
|
@@ -55,9 +56,15 @@
|
|
|
55
56
|
"tailwindcss": "^4"
|
|
56
57
|
},
|
|
57
58
|
"peerDependenciesMeta": {
|
|
59
|
+
"@radix-ui/react-avatar": {
|
|
60
|
+
"optional": true
|
|
61
|
+
},
|
|
58
62
|
"@radix-ui/react-checkbox": {
|
|
59
63
|
"optional": true
|
|
60
64
|
},
|
|
65
|
+
"@radix-ui/react-context-menu": {
|
|
66
|
+
"optional": true
|
|
67
|
+
},
|
|
61
68
|
"@radix-ui/react-dialog": {
|
|
62
69
|
"optional": true
|
|
63
70
|
},
|
|
@@ -94,9 +101,6 @@
|
|
|
94
101
|
"lucide-react": {
|
|
95
102
|
"optional": true
|
|
96
103
|
},
|
|
97
|
-
"radix-ui": {
|
|
98
|
-
"optional": true
|
|
99
|
-
},
|
|
100
104
|
"react-day-picker": {
|
|
101
105
|
"optional": true
|
|
102
106
|
},
|
|
@@ -105,12 +109,14 @@
|
|
|
105
109
|
}
|
|
106
110
|
},
|
|
107
111
|
"devDependencies": {
|
|
108
|
-
"@chromatic-com/storybook": "^5.
|
|
109
|
-
"@eslint/compat": "^2.0.
|
|
112
|
+
"@chromatic-com/storybook": "^5.1.1",
|
|
113
|
+
"@eslint/compat": "^2.0.5",
|
|
110
114
|
"@eslint/js": "^9.39.1",
|
|
111
115
|
"@fontsource-variable/roboto-flex": "^5.2.8",
|
|
112
|
-
"@microsoft/api-extractor": "^7.
|
|
116
|
+
"@microsoft/api-extractor": "^7.58.1",
|
|
117
|
+
"@radix-ui/react-avatar": "^1.1.11",
|
|
113
118
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
119
|
+
"@radix-ui/react-context-menu": "^2.2.16",
|
|
114
120
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
115
121
|
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
116
122
|
"@radix-ui/react-label": "^2.1.8",
|
|
@@ -122,23 +128,23 @@
|
|
|
122
128
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
123
129
|
"@radix-ui/react-toggle": "^1.1.10",
|
|
124
130
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
125
|
-
"@storybook/addon-docs": "^10.
|
|
126
|
-
"@storybook/addon-links": "^10.
|
|
127
|
-
"@storybook/addon-themes": "^10.
|
|
128
|
-
"@storybook/builder-vite": "^10.
|
|
129
|
-
"@storybook/react-vite": "^10.
|
|
130
|
-
"@stylistic/eslint-plugin": "^
|
|
131
|
-
"@tailwindcss/vite": "^4.2.
|
|
131
|
+
"@storybook/addon-docs": "^10.3.5",
|
|
132
|
+
"@storybook/addon-links": "^10.3.5",
|
|
133
|
+
"@storybook/addon-themes": "^10.3.5",
|
|
134
|
+
"@storybook/builder-vite": "^10.3.5",
|
|
135
|
+
"@storybook/react-vite": "^10.3.5",
|
|
136
|
+
"@stylistic/eslint-plugin": "^5.10.0",
|
|
137
|
+
"@tailwindcss/vite": "^4.2.2",
|
|
132
138
|
"@testing-library/jest-dom": "^6.9.1",
|
|
133
139
|
"@testing-library/react": "^16.3.2",
|
|
134
|
-
"@types/node": "^
|
|
140
|
+
"@types/node": "^25.5.2",
|
|
135
141
|
"@types/react": "^19.2.14",
|
|
136
142
|
"@types/react-dom": "^19.2.3",
|
|
137
143
|
"@types/rollup-plugin-auto-external": "^2.0.5",
|
|
138
144
|
"@vitejs/plugin-react": "^6.0.1",
|
|
139
145
|
"@vueless/storybook-dark-mode": "^10.0.7",
|
|
140
146
|
"eslint": "^9.39.1",
|
|
141
|
-
"eslint-config-airbnb-extended": "^
|
|
147
|
+
"eslint-config-airbnb-extended": "^3.1.0",
|
|
142
148
|
"eslint-config-prettier": "^10.1.8",
|
|
143
149
|
"eslint-import-resolver-typescript": "^4.4.3",
|
|
144
150
|
"eslint-plugin-import-x": "^4.16.2",
|
|
@@ -147,26 +153,26 @@
|
|
|
147
153
|
"eslint-plugin-react": "^7.37.5",
|
|
148
154
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
149
155
|
"eslint-plugin-react-refresh": "^0.5.2",
|
|
156
|
+
"eslint-plugin-storybook": "10.3.5",
|
|
150
157
|
"glob": "^13.0.6",
|
|
151
158
|
"globals": "^17.4.0",
|
|
152
|
-
"jsdom": "^29.0.
|
|
153
|
-
"lucide-react": "^
|
|
159
|
+
"jsdom": "^29.0.2",
|
|
160
|
+
"lucide-react": "^1.7.0",
|
|
154
161
|
"prettier": "^3.8.1",
|
|
155
|
-
"radix-ui": "^1.4.3",
|
|
156
162
|
"react-day-picker": "^9.14.0",
|
|
157
163
|
"react-docgen-typescript": "^2.4.0",
|
|
158
|
-
"react-hook-form": "^7.
|
|
164
|
+
"react-hook-form": "^7.72.1",
|
|
159
165
|
"rollup-plugin-auto-external": "^2.0.0",
|
|
160
166
|
"rollup-plugin-copy": "^3.5.0",
|
|
161
|
-
"storybook": "^10.
|
|
162
|
-
"tailwindcss": "^4.2.
|
|
167
|
+
"storybook": "^10.3.5",
|
|
168
|
+
"tailwindcss": "^4.2.2",
|
|
163
169
|
"tslib": "^2.8.1",
|
|
164
170
|
"typescript": "~5.9.3",
|
|
165
|
-
"typescript-eslint": "^8.
|
|
171
|
+
"typescript-eslint": "^8.58.1",
|
|
166
172
|
"unplugin-dts": "1.0.0-beta.6",
|
|
167
|
-
"unplugin-fonts": "^
|
|
168
|
-
"vite": "^8.0.
|
|
169
|
-
"vitest": "^4.1.
|
|
173
|
+
"unplugin-fonts": "^2.0.0",
|
|
174
|
+
"vite": "^8.0.7",
|
|
175
|
+
"vitest": "^4.1.3"
|
|
170
176
|
},
|
|
171
177
|
"dependencies": {
|
|
172
178
|
"class-variance-authority": "^0.7.1",
|