@deftui/react 0.2.5 → 0.3.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.
Files changed (49) hide show
  1. package/README.md +2 -2
  2. package/dist/index.d.mts +7 -5
  3. package/dist/index.mjs +4 -4
  4. package/dist/styles.css +3 -0
  5. package/dist/vendor/README.md +10 -9
  6. package/dist/vendor/coss/calendar.d.mts +4 -0
  7. package/dist/vendor/coss/calendar.mjs +70 -0
  8. package/dist/vendor/coss/card.d.mts +23 -0
  9. package/dist/vendor/coss/card.mjs +160 -0
  10. package/dist/vendor/coss/dialog.d.mts +1 -1
  11. package/dist/vendor/coss/dialog.mjs +1 -1
  12. package/dist/vendor/coss/table.d.mts +15 -0
  13. package/dist/vendor/coss/table.mjs +73 -0
  14. package/dist/vendor/reui.io/cascader/cascader-async.d.mts +20 -0
  15. package/dist/vendor/reui.io/cascader/cascader-async.mjs +578 -0
  16. package/dist/vendor/reui.io/cascader/cascader-context.d.mts +12 -0
  17. package/dist/vendor/reui.io/cascader/cascader-context.mjs +56 -0
  18. package/dist/vendor/reui.io/cascader/cascader-footer.d.mts +60 -0
  19. package/dist/vendor/reui.io/cascader/cascader-footer.mjs +445 -0
  20. package/dist/vendor/reui.io/cascader/cascader-i18n.mjs +64 -0
  21. package/dist/vendor/reui.io/cascader/cascader-item.d.mts +92 -0
  22. package/dist/vendor/reui.io/cascader/cascader-item.mjs +533 -0
  23. package/dist/vendor/reui.io/cascader/cascader-lib.d.mts +3 -0
  24. package/dist/vendor/reui.io/cascader/cascader-lib.mjs +688 -0
  25. package/dist/vendor/reui.io/cascader/cascader-nav.d.mts +56 -0
  26. package/dist/vendor/reui.io/cascader/cascader-nav.mjs +310 -0
  27. package/dist/vendor/reui.io/cascader/cascader-types.d.mts +140 -0
  28. package/dist/vendor/reui.io/cascader/cascader-virtual.d.mts +18 -0
  29. package/dist/vendor/reui.io/cascader/cascader-virtual.mjs +159 -0
  30. package/dist/vendor/reui.io/cascader/cascader.d.mts +299 -0
  31. package/dist/vendor/reui.io/cascader/cascader.mjs +1470 -0
  32. package/dist/vendor/reui.io/timeline.d.mts +21 -0
  33. package/dist/vendor/reui.io/timeline.mjs +127 -0
  34. package/dist/vendor/tailored/lightbox.d.mts +1 -1
  35. package/dist/vendor/tailored/lightbox.mjs +1 -1
  36. package/dist/widgets/datetime.d.mts +1 -1
  37. package/dist/widgets/datetime.mjs +6 -1
  38. package/dist/widgets/export.d.mts +28 -0
  39. package/dist/widgets/index.d.mts +69 -20
  40. package/dist/widgets/index.mjs +61 -11
  41. package/package.json +2 -2
  42. package/dist/vendor/shadcn/calendar.d.mts +0 -10
  43. package/dist/vendor/shadcn/calendar.mjs +0 -107
  44. package/dist/vendor/shadcn/card.d.mts +0 -11
  45. package/dist/vendor/shadcn/card.mjs +0 -55
  46. package/dist/vendor/shadcn/table.d.mts +0 -9
  47. package/dist/vendor/shadcn/table.mjs +0 -59
  48. package/dist/vendor/tailored/file-tree.d.mts +0 -21
  49. package/dist/vendor/tailored/file-tree.mjs +0 -146
package/README.md CHANGED
@@ -32,9 +32,9 @@ export function Example() {
32
32
  <Card.Description>Compose your UI using Compound Component API</Card.Description>
33
33
  </Card.Header>
34
34
 
35
- <Card.Content>
35
+ <Card.Panel>
36
36
  <Button>Get started</Button>
37
- </Card.Content>
37
+ </Card.Panel>
38
38
  </Card>
39
39
  );
40
40
  }
package/dist/index.d.mts CHANGED
@@ -1,31 +1,33 @@
1
1
  import { useCopyToClipboard } from "./vendor/coss/hooks/use-copy-to-clipboard.mjs";
2
2
  import { useIsMobile, useMediaQuery } from "./vendor/coss/hooks/use-media-query.mjs";
3
+ import { CascaderChangeDetails, CascaderLabels, CascaderMode, CascaderNode } from "./vendor/reui.io/cascader/cascader-types.mjs";
4
+ import { CascaderProps, CascaderSingleProps } from "./vendor/reui.io/cascader/cascader.mjs";
3
5
  import { Separator } from "./vendor/shadcn/separator.mjs";
4
- import { Button } from "./vendor/shadcn/button.mjs";
5
6
  import { Label } from "./vendor/shadcn/label.mjs";
7
+ import { Button } from "./vendor/shadcn/button.mjs";
6
8
  import { Toaster, toast } from "./vendor/shadcn/toast.mjs";
7
9
  import { Input } from "./vendor/shadcn/input.mjs";
8
10
  import { useSidebar } from "./vendor/shadcn/sidebar.mjs";
9
11
  import { Sidebar } from "./widgets/sidebar.mjs";
12
+ import { Calendar } from "./vendor/coss/calendar.mjs";
10
13
  import { DatePicker, DateRange, DateRangePicker, TimePicker } from "./widgets/datetime.mjs";
11
14
  import { Dropzone, formatBytes, useDropzone } from "./widgets/dropzone.mjs";
12
15
  import { LightboxActions, LightboxBackdrop, LightboxCaptions, LightboxChangeReason, LightboxClose, LightboxContent, LightboxControl, LightboxControlContext, LightboxCounter, LightboxDownload, LightboxImageChangeEventDetails, LightboxImageItem, LightboxItem, LightboxMore, LightboxNext, LightboxOpenEventDetails, LightboxPrevious, LightboxProps, LightboxSlide, LightboxSlides, LightboxThumbnail, LightboxThumbnails, LightboxToolbar, LightboxTrigger, LightboxTriggerProps, LightboxVideoItem, LightboxViewport, LightboxZoom, LightboxZoomButton, useLightbox } from "./vendor/tailored/lightbox.mjs";
13
16
  import { Carousel, Image, ImageProps, Lightbox } from "./widgets/multimedia.mjs";
14
17
  import { Pagination } from "./widgets/pagination.mjs";
15
- import { Form } from "./vendor/coss/form.mjs";
16
18
  import { Badge } from "./vendor/shadcn/badge.mjs";
17
19
  import { Switch } from "./vendor/shadcn/switch.mjs";
18
20
  import { Spinner } from "./vendor/shadcn/spinner.mjs";
19
21
  import { Skeleton } from "./vendor/shadcn/skeleton.mjs";
20
22
  import { Checkbox } from "./vendor/shadcn/checkbox.mjs";
21
23
  import { Textarea } from "./vendor/shadcn/textarea.mjs";
24
+ import { Form } from "./vendor/coss/form.mjs";
22
25
  import { ScrollArea } from "./vendor/coss/scroll-area.mjs";
23
26
  import { IconSwap } from "./vendor/tailored/icon-swap.mjs";
24
27
  import { JsonViewer } from "./vendor/tailored/json-viewer.mjs";
25
- import { FileTree, FileTreeNode } from "./vendor/tailored/file-tree.mjs";
26
- import { AlertDialog, Breadcrumb, ButtonGroup, Calendar, Card, Combobox, Dialog, Drawer, Dropdown, Empty, Field, InputGroup, Kbd, Popover, Progress, Radio, Select, Table, Tabs, Tooltip } from "./widgets/index.mjs";
28
+ import { AlertDialog, Breadcrumb, ButtonGroup, Card, Cascader, Combobox, Dialog, Drawer, Dropdown, Empty, Field, Frame, InputGroup, Kbd, Popover, Progress, Radio, Select, Table, Tabs, Timeline, Tooltip } from "./widgets/index.mjs";
27
29
  import { cn } from "cn";
28
30
  import { cva } from "class-variance-authority";
29
31
  import { mergeProps } from "@base-ui/react/merge-props";
30
32
  export * from "react-dropzone";
31
- export { AlertDialog, Badge, Breadcrumb, Button, ButtonGroup, Calendar, Card, Carousel, Checkbox, Combobox, DatePicker, type DateRange, DateRangePicker, Dialog, Drawer, Dropdown, Dropzone, Empty, Field, FileTree, type FileTreeNode, Form, IconSwap, Image, ImageProps, Input, InputGroup, JsonViewer, Kbd, Label, Lightbox, type LightboxActions, type LightboxBackdrop, type LightboxCaptions, type LightboxChangeReason, type LightboxClose, type LightboxContent, type LightboxControl, type LightboxControlContext, type LightboxCounter, type LightboxDownload, type LightboxImageChangeEventDetails, type LightboxImageItem, type LightboxItem, type LightboxMore, type LightboxNext, type LightboxOpenEventDetails, type LightboxPrevious, type LightboxProps, type LightboxSlide, type LightboxSlides, type LightboxThumbnail, type LightboxThumbnails, type LightboxToolbar, type LightboxTrigger, type LightboxTriggerProps, type LightboxVideoItem, type LightboxViewport, type LightboxZoom, type LightboxZoomButton, Pagination, Popover, Progress, Radio, ScrollArea, Select, Separator, Sidebar, Skeleton, Spinner, Switch, Table, Tabs, Textarea, TimePicker, Toaster as ToastProvider, Tooltip, cn, cva, formatBytes, mergeProps, toast, useCopyToClipboard, useDropzone, useIsMobile, type useLightbox, useMediaQuery, useSidebar };
33
+ export { AlertDialog, Badge, Breadcrumb, Button, ButtonGroup, Calendar, Card, Carousel, Cascader, type CascaderChangeDetails, type CascaderLabels, type CascaderMode, type CascaderNode, type CascaderProps, type CascaderSingleProps, Checkbox, Combobox, DatePicker, type DateRange, DateRangePicker, Dialog, Drawer, Dropdown, Dropzone, Empty, Field, Form, Frame, IconSwap, Image, ImageProps, Input, InputGroup, JsonViewer, Kbd, Label, Lightbox, type LightboxActions, type LightboxBackdrop, type LightboxCaptions, type LightboxChangeReason, type LightboxClose, type LightboxContent, type LightboxControl, type LightboxControlContext, type LightboxCounter, type LightboxDownload, type LightboxImageChangeEventDetails, type LightboxImageItem, type LightboxItem, type LightboxMore, type LightboxNext, type LightboxOpenEventDetails, type LightboxPrevious, type LightboxProps, type LightboxSlide, type LightboxSlides, type LightboxThumbnail, type LightboxThumbnails, type LightboxToolbar, type LightboxTrigger, type LightboxTriggerProps, type LightboxVideoItem, type LightboxViewport, type LightboxZoom, type LightboxZoomButton, Pagination, Popover, Progress, Radio, ScrollArea, Select, Separator, Sidebar, Skeleton, Spinner, Switch, Table, Tabs, Textarea, TimePicker, Timeline, Toaster as ToastProvider, Tooltip, cn, cva, formatBytes, mergeProps, toast, useCopyToClipboard, useDropzone, useIsMobile, type useLightbox, useMediaQuery, useSidebar };
package/dist/index.mjs CHANGED
@@ -11,19 +11,19 @@ import { Toaster, toast } from "./vendor/shadcn/toast.mjs";
11
11
  import { Skeleton } from "./vendor/shadcn/skeleton.mjs";
12
12
  import { useSidebar } from "./vendor/shadcn/sidebar.mjs";
13
13
  import { Sidebar } from "./widgets/sidebar.mjs";
14
+ import { Calendar } from "./vendor/coss/calendar.mjs";
14
15
  import { DatePicker, DateRangePicker, TimePicker } from "./widgets/datetime.mjs";
15
16
  import { Dropzone, formatBytes, useDropzone } from "./widgets/dropzone.mjs";
16
17
  import { Carousel, Image, Lightbox } from "./widgets/multimedia.mjs";
17
18
  import { Pagination } from "./widgets/pagination.mjs";
18
- import { Form } from "./vendor/coss/form.mjs";
19
19
  import { Badge } from "./vendor/shadcn/badge.mjs";
20
20
  import { Switch } from "./vendor/shadcn/switch.mjs";
21
21
  import { Checkbox } from "./vendor/shadcn/checkbox.mjs";
22
+ import { Form } from "./vendor/coss/form.mjs";
22
23
  import { IconSwap } from "./vendor/tailored/icon-swap.mjs";
23
24
  import { JsonViewer } from "./vendor/tailored/json-viewer.mjs";
24
- import { FileTree } from "./vendor/tailored/file-tree.mjs";
25
- import { AlertDialog, Breadcrumb, ButtonGroup, Calendar, Card, Combobox, Dialog, Drawer, Dropdown, Empty, Field, InputGroup, Kbd, Popover, Progress, Radio, Select, Table, Tabs, Tooltip } from "./widgets/index.mjs";
25
+ import { AlertDialog, Breadcrumb, ButtonGroup, Card, Cascader, Combobox, Dialog, Drawer, Dropdown, Empty, Field, Frame, InputGroup, Kbd, Popover, Progress, Radio, Select, Table, Tabs, Timeline, Tooltip } from "./widgets/index.mjs";
26
26
  import { cn } from "cn";
27
27
  import { cva } from "class-variance-authority";
28
28
  import { mergeProps } from "@base-ui/react/merge-props";
29
- export { AlertDialog, Badge, Breadcrumb, Button, ButtonGroup, Calendar, Card, Carousel, Checkbox, Combobox, DatePicker, DateRangePicker, Dialog, Drawer, Dropdown, Dropzone, Empty, Field, FileTree, Form, IconSwap, Image, Input, InputGroup, JsonViewer, Kbd, Label, Lightbox, Pagination, Popover, Progress, Radio, ScrollArea, Select, Separator, Sidebar, Skeleton, Spinner, Switch, Table, Tabs, Textarea, TimePicker, Toaster as ToastProvider, Tooltip, cn, cva, formatBytes, mergeProps, toast, useCopyToClipboard, useDropzone, useIsMobile, useMediaQuery, useSidebar };
29
+ export { AlertDialog, Badge, Breadcrumb, Button, ButtonGroup, Calendar, Card, Carousel, Cascader, Checkbox, Combobox, DatePicker, DateRangePicker, Dialog, Drawer, Dropdown, Dropzone, Empty, Field, Form, Frame, IconSwap, Image, Input, InputGroup, JsonViewer, Kbd, Label, Lightbox, Pagination, Popover, Progress, Radio, ScrollArea, Select, Separator, Sidebar, Skeleton, Spinner, Switch, Table, Tabs, Textarea, TimePicker, Timeline, Toaster as ToastProvider, Tooltip, cn, cva, formatBytes, mergeProps, toast, useCopyToClipboard, useDropzone, useIsMobile, useMediaQuery, useSidebar };
package/dist/styles.css CHANGED
@@ -65,6 +65,9 @@
65
65
  --radius-2xl: calc(var(--radius) * 1.8);
66
66
  --radius-3xl: calc(var(--radius) * 2.2);
67
67
  --radius-4xl: calc(var(--radius) * 2.6);
68
+
69
+ --card-gap: calc(var(--spacing) * 4);
70
+ --card-spacing: calc(var(--spacing) * 6);
68
71
  }
69
72
 
70
73
  @layer base {
@@ -11,20 +11,23 @@ shadcn 组件使用 `components.json` 中的 `base-vega` 风格和 Lucide 图标
11
11
 
12
12
  | ID | File | Docs | Modifications |
13
13
  | --- | --- | --- | --- |
14
- | `@coss/alert-dialog` | [coss/alert-dialog.tsx](coss/alert-dialog.tsx) | [Alert Dialog](https://coss.com/ui/docs/components/alert-dialog) | `font-bold text-xl` 换为 `font-semibold text-lg`;用 `@starting-style` 支持初始打开时的入场动画 |
15
- | `@coss/dialog` | [coss/dialog.tsx](coss/dialog.tsx) | [Dialog](https://coss.com/ui/docs/components/dialog) | `font-bold text-xl` 换为 `font-semibold text-lg`;用 `@starting-style` 支持初始打开时的入场动画 |
16
- | `@coss/drawer` | [coss/drawer.tsx](coss/drawer.tsx) | [Drawer](https://coss.com/ui/docs/components/drawer) | `font-bold text-xl` 换为 `font-semibold text-lg`;用 `@starting-style` 支持初始打开时的入场动画 |
17
- | `@coss/empty` | [coss/empty.tsx](coss/empty.tsx) | [Empty](https://coss.com/ui/docs/components/empty) | `font-bold text-xl` 换为 `font-semibold text-lg` |
14
+ | `@coss/alert-dialog` | [coss/alert-dialog.tsx](coss/alert-dialog.tsx) | [Alert Dialog](https://coss.com/ui/docs/components/alert-dialog) | `font-bold text-xl` 替换为 `font-semibold text-lg`;用 `@starting-style` 支持初始打开时的入场动画 |
15
+ | `@coss/calendar` | [coss/calendar.tsx](coss/calendar.tsx) | [Calendar](https://coss.com/ui/docs/components/calendar) | — |
16
+ | `@coss/card` | [coss/card.tsx](coss/card.tsx) | [Card](https://coss.com/ui/docs/components/card) | 用 `--card-spacing` 与 `--card-gap` 替代分段 padding;新增 `spacing`、`gap` 属性写入对应变量;标题改为 `text-base font-semibold leading-normal`;首尾图片贴边并补圆角 |
17
+ | `@coss/dialog` | [coss/dialog.tsx](coss/dialog.tsx) | [Dialog](https://coss.com/ui/docs/components/dialog) | `font-bold text-xl` 替换为 `font-semibold text-lg`;用 `@starting-style` 支持初始打开时的入场动画 |
18
+ | `@coss/drawer` | [coss/drawer.tsx](coss/drawer.tsx) | [Drawer](https://coss.com/ui/docs/components/drawer) | `font-bold text-xl` 替换为 `font-semibold text-lg`;用 `@starting-style` 支持初始打开时的入场动画 |
19
+ | `@coss/empty` | [coss/empty.tsx](coss/empty.tsx) | [Empty](https://coss.com/ui/docs/components/empty) | `font-bold text-xl` 替换为 `font-semibold text-lg` |
18
20
  | `@coss/form` | [coss/form.tsx](coss/form.tsx) | [Form](https://coss.com/ui/docs/components/form) | — |
19
21
  | `@coss/scroll-area` | [coss/scroll-area.tsx](coss/scroll-area.tsx) | [Scroll Area](https://coss.com/ui/docs/components/scroll-area) | — |
22
+ | `@coss/table` | [coss/table.tsx](coss/table.tsx) | [Table](https://coss.com/ui/docs/components/table) | 默认变体的 `TableFooter` 移除底色,与 `card` 变体一样保持透明 |
20
23
  | `@coss/use-copy-to-clipboard` | [coss/hooks/use-copy-to-clipboard.ts](coss/hooks/use-copy-to-clipboard.ts) | [useCopyToClipboard](https://coss.com/ui/docs/hooks/use-copy-to-clipboard) | — |
21
24
  | `@coss/use-media-query` | [coss/hooks/use-media-query.ts](coss/hooks/use-media-query.ts) | [useMediaQuery](https://coss.com/ui/docs/hooks/use-media-query) | 断点:`md` 设为 768px,与 Tailwind 默认值一致 |
25
+ | `@reui/cascader` | [reui.io/cascader/cascader.tsx](reui.io/cascader/cascader.tsx) | [Cascader](https://reui.io/docs/components/cascader) | 重映射 `scroll-area` 与 `spinner` 的导入 |
26
+ | `@reui/timeline` | [reui.io/timeline.tsx](reui.io/timeline.tsx) | [Timeline](https://reui.io/docs/components/timeline) | — |
22
27
  | `badge` | [shadcn/badge.tsx](shadcn/badge.tsx) | [Badge](https://ui.shadcn.com/docs/components/base/badge) | 提供 `info`、`success`、`warning` 语义变体 |
23
28
  | `breadcrumb` | [shadcn/breadcrumb.tsx](shadcn/breadcrumb.tsx) | [Breadcrumb](https://ui.shadcn.com/docs/components/base/breadcrumb) | 未显式指定 `BreadcrumbList` 则自动包裹 |
24
- | `button` | [shadcn/button.tsx](shadcn/button.tsx) | [Button](https://ui.shadcn.com/docs/components/base/button) | `pill` 提供全圆角;`isPending` 提供加载态;提供额外 `destructive` 系列样式变体,`destructive-soft` 保留 shadcn 的浅色危险样式 |
29
+ | `button` | [shadcn/button.tsx](shadcn/button.tsx) | [Button](https://ui.shadcn.com/docs/components/base/button) | `pill` 提供全圆角;`isPending` 提供加载态;提供额外 `destructive` 系列样式变体 |
25
30
  | `button-group` | [shadcn/button-group.tsx](shadcn/button-group.tsx) | [Button Group](https://ui.shadcn.com/docs/components/base/button-group) | — |
26
- | `calendar` | [shadcn/calendar.tsx](shadcn/calendar.tsx) | [Calendar](https://ui.shadcn.com/docs/components/base/calendar) | 将 `react-day-picker` 导入改为 `@daypicker/react` |
27
- | `card` | [shadcn/card.tsx](shadcn/card.tsx) | [Card](https://ui.shadcn.com/docs/components/base/card) | — |
28
31
  | `carousel` | [shadcn/carousel.tsx](shadcn/carousel.tsx) | [Carousel](https://ui.shadcn.com/docs/components/base/carousel) | — |
29
32
  | `checkbox` | [shadcn/checkbox.tsx](shadcn/checkbox.tsx) | [Checkbox](https://ui.shadcn.com/docs/components/base/checkbox) | — |
30
33
  | `combobox` | [shadcn/combobox.tsx](shadcn/combobox.tsx) | [Combobox](https://ui.shadcn.com/docs/components/base/combobox) | 将选中标记移至左侧 |
@@ -46,7 +49,6 @@ shadcn 组件使用 `components.json` 中的 `base-vega` 风格和 Lucide 图标
46
49
  | `skeleton` | [shadcn/skeleton.tsx](shadcn/skeleton.tsx) | [Skeleton](https://ui.shadcn.com/docs/components/base/skeleton) | — |
47
50
  | `spinner` | [shadcn/spinner.tsx](shadcn/spinner.tsx) | [Spinner](https://ui.shadcn.com/docs/components/base/spinner) | — |
48
51
  | `switch` | [shadcn/switch.tsx](shadcn/switch.tsx) | [Switch](https://ui.shadcn.com/docs/components/base/switch) | — |
49
- | `table` | [shadcn/table.tsx](shadcn/table.tsx) | [Table](https://ui.shadcn.com/docs/components/base/table) | — |
50
52
  | `tabs` | [shadcn/tabs.tsx](shadcn/tabs.tsx) | [Tabs](https://ui.shadcn.com/docs/components/base/tabs) | — |
51
53
  | `textarea` | [shadcn/textarea.tsx](shadcn/textarea.tsx) | [Textarea](https://ui.shadcn.com/docs/components/base/textarea) | — |
52
54
  | `toast` | [shadcn/toast.tsx](shadcn/toast.tsx) | [Toast](https://ui.shadcn.com/docs/components/base/toast) | — |
@@ -64,5 +66,4 @@ shadcn 组件使用 `components.json` 中的 `base-vega` 风格和 Lucide 图标
64
66
  | `https://ui.iandefined.com/r/icon-swap.json` | [tailored/icon-swap.tsx](tailored/icon-swap.tsx) | [Icon Swap](https://ui.iandefined.com/docs/utilities/icon-swap/) | 进出场动画减弱模糊为 2px,缩短为 0.2s 时长 |
65
67
  | `https://ui.iandefined.com/r/lightbox.json` | [tailored/lightbox.tsx](tailored/lightbox.tsx) | [Lightbox](https://ui.iandefined.com/docs/components/lightbox/) | 适配本地组件和尺寸;修正嵌套弹层层级与点击隔离;补充加载失败反馈 |
66
68
  | `https://ui.iandefined.com/r/scroll-area.json` | [tailored/lightbox.tsx](tailored/lightbox.tsx) | [Scroll Area](https://ui.iandefined.com/docs/components/scroll-area/) | 作为 Lightbox 的私有依赖内联 |
67
- | `Tinkerers-Labs/mischief-ui/file-tree` | [tailored/file-tree.tsx](tailored/file-tree.tsx) | [File Tree](https://ui.tinkererslabs.com/docs/components/file-tree/) | — |
68
69
  | `Tinkerers-Labs/mischief-ui/json-viewer` | [tailored/json-viewer.tsx](tailored/json-viewer.tsx) | [JSON Viewer](https://ui.tinkererslabs.com/docs/components/json-viewer/) | — |
@@ -0,0 +1,4 @@
1
+ import * as React$1 from "react";
2
+ import { DayPicker } from "@daypicker/react";
3
+ /** https://coss.com/ui/docs/components/calendar */
4
+ export declare function Calendar({ className, classNames, showOutsideDays, components: userComponents, mode, ...props }: React$1.ComponentProps<typeof DayPicker>): React$1.ReactElement;
@@ -0,0 +1,70 @@
1
+ "use client";
2
+ import { cn } from "../shadcn/lib/utils.mjs";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { ChevronLeftIcon, ChevronRightIcon, ChevronsUpDownIcon } from "lucide-react";
5
+ import { DayPicker } from "@daypicker/react";
6
+ // src/vendor/coss/calendar.tsx
7
+ const buttonClassNames = "relative flex size-(--cell-size) text-base sm:text-sm items-center justify-center rounded-lg text-foreground not-in-data-selected:hover:bg-accent disabled:pointer-events-none disabled:opacity-64 [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0";
8
+ /** https://coss.com/ui/docs/components/calendar */
9
+ function Calendar({ className, classNames, showOutsideDays = true, components: userComponents, mode = "single", ...props }) {
10
+ const defaultClassNames = {
11
+ button_next: buttonClassNames,
12
+ button_previous: buttonClassNames,
13
+ caption_label: "text-base sm:text-sm font-medium flex items-center gap-2 h-full",
14
+ day: "size-(--cell-size) text-sm py-px",
15
+ day_button: cn(buttonClassNames, "in-data-disabled:pointer-events-none in-[.range-middle]:rounded-none in-[.range-end:not(.range-start)]:rounded-s-none in-[.range-start:not(.range-end)]:rounded-e-none in-[.range-middle]:in-data-selected:bg-accent in-data-selected:bg-primary in-[.range-middle]:in-data-selected:text-foreground in-data-disabled:text-muted-foreground/72 in-data-outside:text-muted-foreground/72 in-data-selected:in-data-outside:text-primary-foreground in-data-selected:text-primary-foreground in-data-disabled:line-through outline-none in-[[data-selected]:not(.range-middle)]:transition-[border-radius,box-shadow] focus-visible:z-1 focus-visible:ring-[3px] focus-visible:ring-ring/50"),
16
+ dropdown: "absolute bg-popover inset-0 opacity-0",
17
+ dropdown_root: "relative has-focus:border-ring has-focus:ring-ring/50 has-focus:ring-[3px] border border-input shadow-xs/5 rounded-lg px-[calc(--spacing(3)-1px)] h-9 sm:h-8 [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:-me-1",
18
+ dropdowns: "w-full flex items-center text-base sm:text-sm justify-center h-(--cell-size) gap-1.5 *:[span]:font-medium",
19
+ hidden: "invisible",
20
+ month: "w-full",
21
+ month_caption: "relative mx-(--cell-size) px-1 mb-1 flex h-(--cell-size) items-center justify-center z-2",
22
+ months: "relative flex flex-col sm:flex-row gap-2",
23
+ nav: "absolute top-0 flex w-full justify-between z-1",
24
+ outside: "text-muted-foreground data-selected:bg-accent/50 data-selected:text-muted-foreground",
25
+ range_end: "range-end",
26
+ range_middle: "range-middle",
27
+ range_start: "range-start",
28
+ today: "*:after:pointer-events-none *:after:absolute *:after:bottom-1 *:after:start-1/2 *:after:z-1 *:after:size-[3px] *:after:-translate-x-1/2 *:after:rounded-full *:after:bg-primary [&[data-selected]:not(.range-middle)>*]:after:bg-background [&[data-disabled]>*]:after:bg-foreground/30",
29
+ week_number: "size-(--cell-size) p-0 text-xs font-medium text-muted-foreground/72",
30
+ weekday: "size-(--cell-size) p-0 text-xs font-medium text-muted-foreground/72"
31
+ };
32
+ const mergedClassNames = Object.keys(defaultClassNames).reduce((acc, key) => {
33
+ const userClass = classNames?.[key];
34
+ const baseClass = defaultClassNames[key];
35
+ acc[key] = userClass ? cn(baseClass, userClass) : baseClass;
36
+ return acc;
37
+ }, { ...defaultClassNames });
38
+ const mergedComponents = {
39
+ Chevron: ({ className, orientation, ...props }) => {
40
+ if (orientation === "left") return /* @__PURE__ */ jsx(ChevronLeftIcon, {
41
+ className: cn(className, "rtl:rotate-180"),
42
+ ...props,
43
+ "aria-hidden": "true"
44
+ });
45
+ if (orientation === "right") return /* @__PURE__ */ jsx(ChevronRightIcon, {
46
+ className: cn(className, "rtl:rotate-180"),
47
+ ...props,
48
+ "aria-hidden": "true"
49
+ });
50
+ return /* @__PURE__ */ jsx(ChevronsUpDownIcon, {
51
+ className,
52
+ ...props,
53
+ "aria-hidden": "true"
54
+ });
55
+ },
56
+ ...userComponents
57
+ };
58
+ const dayPickerProps = {
59
+ className: cn("w-fit [--cell-size:--spacing(10)] sm:[--cell-size:--spacing(9)]", className),
60
+ classNames: mergedClassNames,
61
+ components: mergedComponents,
62
+ "data-slot": "calendar",
63
+ formatters: { formatMonthDropdown: (month, dateLib) => dateLib.format(month, "LLL") },
64
+ mode,
65
+ showOutsideDays,
66
+ ...props
67
+ };
68
+ return /* @__PURE__ */ jsx(DayPicker, { ...dayPickerProps });
69
+ }
70
+ export { Calendar };
@@ -0,0 +1,23 @@
1
+ import React from "react";
2
+ import { useRender } from "@base-ui/react/use-render";
3
+ type SpacingProps = {
4
+ /** Gap between card sections. Numbers use the spacing scale. */
5
+ gap?: CardSpacing;
6
+ /** Outer inset and horizontal section padding. Numbers use the spacing scale. */
7
+ spacing?: CardSpacing;
8
+ };
9
+ type CardSpacing = number | (string & {});
10
+ export declare function Card({ className, render, gap, spacing, ...props }: useRender.ComponentProps<"div"> & SpacingProps): React.ReactElement;
11
+ export declare function CardFrame({ className, render, gap, spacing, ...props }: useRender.ComponentProps<"div"> & SpacingProps): React.ReactElement;
12
+ export declare function CardFrameHeader({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement;
13
+ export declare function CardFrameTitle({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement;
14
+ export declare function CardFrameDescription({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement;
15
+ export declare function CardFrameAction({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement;
16
+ export declare function CardFrameFooter({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement;
17
+ export declare function CardHeader({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement;
18
+ export declare function CardTitle({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement;
19
+ export declare function CardDescription({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement;
20
+ export declare function CardAction({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement;
21
+ export declare function CardPanel({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement;
22
+ export declare function CardFooter({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement;
23
+ export { CardPanel as CardContent };
@@ -0,0 +1,160 @@
1
+ "use client";
2
+ import { cn } from "../shadcn/lib/utils.mjs";
3
+ import { mergeProps } from "@base-ui/react/merge-props";
4
+ import { useRender } from "@base-ui/react/use-render";
5
+ // src/vendor/coss/card.tsx
6
+ function resolveSpacing(value) {
7
+ return typeof value === "number" ? `calc(var(--spacing) * ${value})` : value;
8
+ }
9
+ function getCardStyle(spacing, gap) {
10
+ return {
11
+ ...spacing !== void 0 && { "--card-spacing": resolveSpacing(spacing) },
12
+ ...gap !== void 0 && { "--card-gap": resolveSpacing(gap) }
13
+ };
14
+ }
15
+ function Card({ className, render, gap, spacing, ...props }) {
16
+ const defaultProps = {
17
+ className: cn("relative flex flex-col gap-(--card-gap) rounded-2xl border bg-card not-dark:bg-clip-padding py-(--card-spacing) text-card-foreground text-sm shadow-xs/5 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-2xl)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] has-[>img:first-child]:pt-0 has-[>img:last-child]:pb-0 *:[img:first-child]:rounded-t-2xl *:[img:last-child]:rounded-b-2xl dark:before:shadow-[0_-1px_--theme(--color-white/6%)]", className),
18
+ "data-slot": "card",
19
+ style: getCardStyle(spacing, gap)
20
+ };
21
+ return useRender({
22
+ defaultTagName: "div",
23
+ props: mergeProps(defaultProps, props),
24
+ render
25
+ });
26
+ }
27
+ function CardFrame({ className, render, gap, spacing, ...props }) {
28
+ const defaultProps = {
29
+ className: cn("relative flex flex-col rounded-2xl border bg-card not-dark:bg-clip-padding text-card-foreground shadow-xs/5 [--clip-bottom:-1rem] [--clip-top:-1rem] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-2xl)-1px)] before:bg-muted/72 before:shadow-[0_1px_--theme(--color-black/4%)] has-data-[slot=table-container]:overflow-hidden *:data-[slot=card]:-m-px *:data-[slot=table-container]:-m-px *:data-[slot=table-container]:w-[calc(100%+2px)] *:not-first:data-[slot=card]:rounded-t-xl *:not-last:data-[slot=card]:rounded-b-xl *:data-[slot=card]:bg-clip-padding *:data-[slot=card]:shadow-none *:data-[slot=card]:before:hidden *:not-first:data-[slot=card]:before:rounded-t-[calc(var(--radius-xl)-1px)] *:not-last:data-[slot=card]:before:rounded-b-[calc(var(--radius-xl)-1px)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)] *:data-[slot=card]:[clip-path:inset(var(--clip-top)_1px_var(--clip-bottom)_1px_round_calc(var(--radius-2xl)-1px))] *:data-[slot=card]:last:[--clip-bottom:1px] *:data-[slot=card]:first:[--clip-top:1px]", className),
30
+ "data-slot": "card-frame",
31
+ style: getCardStyle(spacing, gap)
32
+ };
33
+ return useRender({
34
+ defaultTagName: "div",
35
+ props: mergeProps(defaultProps, props),
36
+ render
37
+ });
38
+ }
39
+ function CardFrameHeader({ className, render, ...props }) {
40
+ const defaultProps = {
41
+ className: cn("relative flex grid auto-rows-min grid-rows-[auto_auto] flex-col items-start gap-x-4 px-(--card-spacing) py-(--card-gap) has-data-[slot=card-frame-action]:grid-cols-[1fr_auto]", className),
42
+ "data-slot": "card-frame-header"
43
+ };
44
+ return useRender({
45
+ defaultTagName: "div",
46
+ props: mergeProps(defaultProps, props),
47
+ render
48
+ });
49
+ }
50
+ function CardFrameTitle({ className, render, ...props }) {
51
+ const defaultProps = {
52
+ className: cn("self-center font-semibold text-sm", className),
53
+ "data-slot": "card-frame-title"
54
+ };
55
+ return useRender({
56
+ defaultTagName: "div",
57
+ props: mergeProps(defaultProps, props),
58
+ render
59
+ });
60
+ }
61
+ function CardFrameDescription({ className, render, ...props }) {
62
+ const defaultProps = {
63
+ className: cn("self-center text-muted-foreground text-sm", className),
64
+ "data-slot": "card-frame-description"
65
+ };
66
+ return useRender({
67
+ defaultTagName: "div",
68
+ props: mergeProps(defaultProps, props),
69
+ render
70
+ });
71
+ }
72
+ function CardFrameAction({ className, render, ...props }) {
73
+ const defaultProps = {
74
+ className: cn("col-start-2 nth-3:row-span-2 nth-3:row-start-1 inline-flex self-center justify-self-end", className),
75
+ "data-slot": "card-frame-action"
76
+ };
77
+ return useRender({
78
+ defaultTagName: "div",
79
+ props: mergeProps(defaultProps, props),
80
+ render
81
+ });
82
+ }
83
+ function CardFrameFooter({ className, render, ...props }) {
84
+ const defaultProps = {
85
+ className: cn("px-(--card-spacing) py-(--card-gap)", className),
86
+ "data-slot": "card-frame-footer"
87
+ };
88
+ return useRender({
89
+ defaultTagName: "div",
90
+ props: mergeProps(defaultProps, props),
91
+ render
92
+ });
93
+ }
94
+ function CardHeader({ className, render, ...props }) {
95
+ const defaultProps = {
96
+ className: cn("grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-(--card-spacing) [.border-b]:pb-(--card-gap) has-data-[slot=card-action]:grid-cols-[1fr_auto]", className),
97
+ "data-slot": "card-header"
98
+ };
99
+ return useRender({
100
+ defaultTagName: "div",
101
+ props: mergeProps(defaultProps, props),
102
+ render
103
+ });
104
+ }
105
+ function CardTitle({ className, render, ...props }) {
106
+ const defaultProps = {
107
+ className: cn("font-heading font-semibold text-base leading-normal", className),
108
+ "data-slot": "card-title"
109
+ };
110
+ return useRender({
111
+ defaultTagName: "div",
112
+ props: mergeProps(defaultProps, props),
113
+ render
114
+ });
115
+ }
116
+ function CardDescription({ className, render, ...props }) {
117
+ const defaultProps = {
118
+ className: cn("text-muted-foreground text-sm", className),
119
+ "data-slot": "card-description"
120
+ };
121
+ return useRender({
122
+ defaultTagName: "div",
123
+ props: mergeProps(defaultProps, props),
124
+ render
125
+ });
126
+ }
127
+ function CardAction({ className, render, ...props }) {
128
+ const defaultProps = {
129
+ className: cn("col-start-2 row-span-2 row-start-1 inline-flex self-start justify-self-end", className),
130
+ "data-slot": "card-action"
131
+ };
132
+ return useRender({
133
+ defaultTagName: "div",
134
+ props: mergeProps(defaultProps, props),
135
+ render
136
+ });
137
+ }
138
+ function CardPanel({ className, render, ...props }) {
139
+ const defaultProps = {
140
+ className: cn("flex-1 px-(--card-spacing)", className),
141
+ "data-slot": "card-panel"
142
+ };
143
+ return useRender({
144
+ defaultTagName: "div",
145
+ props: mergeProps(defaultProps, props),
146
+ render
147
+ });
148
+ }
149
+ function CardFooter({ className, render, ...props }) {
150
+ const defaultProps = {
151
+ className: cn("flex items-center px-(--card-spacing) [.border-t]:pt-(--card-gap)", className),
152
+ "data-slot": "card-footer"
153
+ };
154
+ return useRender({
155
+ defaultTagName: "div",
156
+ props: mergeProps(defaultProps, props),
157
+ render
158
+ });
159
+ }
160
+ export { Card, CardAction, CardPanel as CardContent, CardPanel, CardDescription, CardFooter, CardFrame, CardFrameAction, CardFrameDescription, CardFrameFooter, CardFrameHeader, CardFrameTitle, CardHeader, CardTitle };
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
- import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
3
2
  import { useRender } from "@base-ui/react/use-render";
3
+ import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
4
4
  export declare function DialogTrigger(props: DialogPrimitive.Trigger.Props): React.ReactElement;
5
5
  export declare function DialogClose(props: DialogPrimitive.Close.Props): React.ReactElement;
6
6
  export declare function DialogPopup({ className, children, showCloseButton, bottomStickOnMobile, closeProps, portalProps, ...props }: DialogPrimitive.Popup.Props & {
@@ -4,8 +4,8 @@ import { Button } from "../shadcn/button.mjs";
4
4
  import { ScrollArea } from "./scroll-area.mjs";
5
5
  import { mergeProps } from "@base-ui/react/merge-props";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
- import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
8
7
  import { useRender } from "@base-ui/react/use-render";
8
+ import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
9
9
  import { XIcon } from "lucide-react";
10
10
  DialogPrimitive.createHandle;
11
11
  const Dialog$1 = DialogPrimitive.Root;
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { useRender } from "@base-ui/react/use-render";
3
+ export type TableVariant = "default" | "card";
4
+ export type TableProps = React.ComponentProps<"table"> & {
5
+ variant?: TableVariant;
6
+ render?: useRender.ComponentProps<"div">["render"];
7
+ };
8
+ export declare function Table({ className, variant, render, ...props }: TableProps): React.ReactElement;
9
+ export declare function TableHeader({ className, ...props }: React.ComponentProps<"thead">): React.ReactElement;
10
+ export declare function TableBody({ className, ...props }: React.ComponentProps<"tbody">): React.ReactElement;
11
+ export declare function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">): React.ReactElement;
12
+ export declare function TableRow({ className, ...props }: React.ComponentProps<"tr">): React.ReactElement;
13
+ export declare function TableHead({ className, ...props }: React.ComponentProps<"th">): React.ReactElement;
14
+ export declare function TableCell({ className, ...props }: React.ComponentProps<"td">): React.ReactElement;
15
+ export declare function TableCaption({ className, ...props }: React.ComponentProps<"caption">): React.ReactElement;
@@ -0,0 +1,73 @@
1
+ "use client";
2
+ import { cn } from "../shadcn/lib/utils.mjs";
3
+ import { mergeProps } from "@base-ui/react/merge-props";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import { useRender } from "@base-ui/react/use-render";
6
+ // src/vendor/coss/table.tsx
7
+ function Table({ className, variant = "default", render, ...props }) {
8
+ const defaultProps = {
9
+ children: /* @__PURE__ */ jsx("table", {
10
+ className: cn("w-full caption-bottom in-data-[variant=card]:border-separate in-data-[variant=card]:border-spacing-0 text-sm", className),
11
+ "data-slot": "table",
12
+ ...props
13
+ }),
14
+ className: "relative w-full overflow-x-auto",
15
+ "data-slot": "table-container",
16
+ "data-variant": variant
17
+ };
18
+ return useRender({
19
+ defaultTagName: "div",
20
+ props: mergeProps(defaultProps, {}),
21
+ render
22
+ });
23
+ }
24
+ function TableHeader({ className, ...props }) {
25
+ return /* @__PURE__ */ jsx("thead", {
26
+ className: cn("[&_tr]:border-b", className),
27
+ "data-slot": "table-header",
28
+ ...props
29
+ });
30
+ }
31
+ function TableBody({ className, ...props }) {
32
+ return /* @__PURE__ */ jsx("tbody", {
33
+ className: cn("relative in-data-[variant=card]:rounded-xl in-data-[variant=card]:shadow-xs/5 before:pointer-events-none before:absolute before:inset-px not-in-data-[variant=card]:before:hidden before:rounded-[calc(var(--radius-xl)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] dark:before:shadow-[0_-1px_--theme(--color-white/8%)] [&_tr:last-child]:border-0 in-data-[variant=card]:*:[tr]:border-0 in-data-[variant=card]:*:[tr]:*:[td]:border-b in-data-[variant=card]:*:[tr]:*:[td]:bg-card in-data-[variant=card]:*:[tr]:first:*:[td]:first:rounded-ss-xl in-data-[variant=card]:*:[tr]:*:[td]:first:border-s in-data-[variant=card]:*:[tr]:first:*:[td]:border-t in-data-[variant=card]:*:[tr]:last:*:[td]:last:rounded-ee-xl in-data-[variant=card]:*:[tr]:*:[td]:last:border-e in-data-[variant=card]:*:[tr]:first:*:[td]:last:rounded-se-xl in-data-[variant=card]:*:[tr]:last:*:[td]:first:rounded-es-xl in-data-[variant=card]:*:[tr]:hover:*:[td]:bg-[color-mix(in_srgb,var(--card),var(--color-black)_2%)] in-data-[variant=card]:*:[tr]:data-[state=selected]:*:[td]:bg-[color-mix(in_srgb,var(--card),var(--color-black)_4%)] dark:in-data-[variant=card]:*:[tr]:data-[state=selected]:*:[td]:bg-[color-mix(in_srgb,var(--card),var(--color-white)_4%)] dark:in-data-[variant=card]:*:[tr]:hover:*:[td]:bg-[color-mix(in_srgb,var(--card),var(--color-white)_2%)]", className),
34
+ "data-slot": "table-body",
35
+ ...props
36
+ });
37
+ }
38
+ function TableFooter({ className, ...props }) {
39
+ return /* @__PURE__ */ jsx("tfoot", {
40
+ className: cn("border-t in-data-[variant=card]:border-none bg-transparent font-medium [&>tr]:last:border-b-0", className),
41
+ "data-slot": "table-footer",
42
+ ...props
43
+ });
44
+ }
45
+ function TableRow({ className, ...props }) {
46
+ return /* @__PURE__ */ jsx("tr", {
47
+ className: cn("relative border-b not-in-data-[variant=card]:hover:bg-[color-mix(in_srgb,var(--background),var(--color-black)_2%)] not-in-data-[variant=card]:data-[state=selected]:bg-[color-mix(in_srgb,var(--background),var(--color-black)_4%)] dark:not-in-data-[variant=card]:data-[state=selected]:bg-[color-mix(in_srgb,var(--background),var(--color-white)_4%)] dark:not-in-data-[variant=card]:hover:bg-[color-mix(in_srgb,var(--background),var(--color-white)_2%)]", className),
48
+ "data-slot": "table-row",
49
+ ...props
50
+ });
51
+ }
52
+ function TableHead({ className, ...props }) {
53
+ return /* @__PURE__ */ jsx("th", {
54
+ className: cn("h-10 whitespace-nowrap px-2.5 text-left align-middle font-medium text-muted-foreground leading-none has-[[role=checkbox]]:w-px last:has-[[role=checkbox]]:ps-0 first:has-[[role=checkbox]]:pe-0", className),
55
+ "data-slot": "table-head",
56
+ ...props
57
+ });
58
+ }
59
+ function TableCell({ className, ...props }) {
60
+ return /* @__PURE__ */ jsx("td", {
61
+ className: cn("whitespace-nowrap bg-clip-padding p-2.5 in-data-[slot=table-footer]:py-3.5 align-middle leading-none in-data-[variant=card]:first:ps-[calc(--spacing(2.5)-1px)] in-data-[variant=card]:last:pe-[calc(--spacing(2.5)-1px)] has-[[role=checkbox]]:w-px last:has-[[role=checkbox]]:ps-0 first:has-[[role=checkbox]]:pe-0", className),
62
+ "data-slot": "table-cell",
63
+ ...props
64
+ });
65
+ }
66
+ function TableCaption({ className, ...props }) {
67
+ return /* @__PURE__ */ jsx("caption", {
68
+ className: cn("in-data-[variant=card]:my-4 mt-4 text-muted-foreground text-sm", className),
69
+ "data-slot": "table-caption",
70
+ ...props
71
+ });
72
+ }
73
+ export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
@@ -0,0 +1,20 @@
1
+ import { CascaderLoadContext, CascaderLoadResult, CascaderNode, CascaderSearchContext } from "./cascader-types.mjs";
2
+ /**
3
+ * Async data for the cascader. Loaded pages live in their own store and are
4
+ * MERGED onto the index built from `items`, never folded into that build:
5
+ * `items` changes identity on any parent re-render, and folding would discard
6
+ * every level the user drilled into. Map membership is the load discriminator:
7
+ * no `states` entry means never fetched, while an entry with no `loading`, no
8
+ * `error` and no children means empty for real.
9
+ */
10
+ /**
11
+ * Fetches one level. `node` is `null` for the root level, and only
12
+ * `{ value, label: value }`, no `data`, for a level on screen whose node has
13
+ * not loaded: a deep link before the level above loads, or a page-loaded
14
+ * level after a `loadKey` change.
15
+ */
16
+ export type CascaderGetChildren<T = unknown> = (node: CascaderNode<T> | null, context: CascaderLoadContext) => CascaderNode<T>[] | CascaderLoadResult<T> | Promise<CascaderNode<T>[] | CascaderLoadResult<T>>;
17
+ /** Server-side search, replacing the local index scan while the query is set. */
18
+ export type CascaderOnSearch<T = unknown> = (query: string, context: CascaderSearchContext) => CascaderNode<T>[] | CascaderLoadResult<T> | Promise<CascaderNode<T>[] | CascaderLoadResult<T>>;
19
+ /** Resolves a selected value to its ancestor chain, root first, node last. */
20
+ export type CascaderResolveValue<T = unknown> = (value: string, context: CascaderLoadContext) => CascaderNode<T>[] | Promise<CascaderNode<T>[]>;