@danxbot/ui 1.0.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.
Files changed (183) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +126 -0
  3. package/dist/fonts/bricolage-grotesque-0.woff2 +0 -0
  4. package/dist/fonts/bricolage-grotesque-1.woff2 +0 -0
  5. package/dist/fonts/bricolage-grotesque-2.woff2 +0 -0
  6. package/dist/fonts/figtree-0.woff2 +0 -0
  7. package/dist/fonts/figtree-1.woff2 +0 -0
  8. package/dist/fonts/figtree-2.woff2 +0 -0
  9. package/dist/fonts/figtree-3.woff2 +0 -0
  10. package/dist/fonts/jetbrains-mono-0.woff2 +0 -0
  11. package/dist/fonts/jetbrains-mono-1.woff2 +0 -0
  12. package/dist/fonts/jetbrains-mono-10.woff2 +0 -0
  13. package/dist/fonts/jetbrains-mono-11.woff2 +0 -0
  14. package/dist/fonts/jetbrains-mono-2.woff2 +0 -0
  15. package/dist/fonts/jetbrains-mono-3.woff2 +0 -0
  16. package/dist/fonts/jetbrains-mono-4.woff2 +0 -0
  17. package/dist/fonts/jetbrains-mono-5.woff2 +0 -0
  18. package/dist/fonts/jetbrains-mono-6.woff2 +0 -0
  19. package/dist/fonts/jetbrains-mono-7.woff2 +0 -0
  20. package/dist/fonts/jetbrains-mono-8.woff2 +0 -0
  21. package/dist/fonts/jetbrains-mono-9.woff2 +0 -0
  22. package/dist/fonts.css +187 -0
  23. package/dist/index.js +42425 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/styles.css +190 -0
  26. package/dist/types/components/Accordion.d.ts +15 -0
  27. package/dist/types/components/AppShell.d.ts +58 -0
  28. package/dist/types/components/Avatar.d.ts +154 -0
  29. package/dist/types/components/Badge.d.ts +73 -0
  30. package/dist/types/components/Button.d.ts +103 -0
  31. package/dist/types/components/Card.d.ts +193 -0
  32. package/dist/types/components/Choice.d.ts +112 -0
  33. package/dist/types/components/CodeEditor.d.ts +86 -0
  34. package/dist/types/components/Combobox.d.ts +37 -0
  35. package/dist/types/components/CommandPalette.d.ts +33 -0
  36. package/dist/types/components/DatePicker.d.ts +20 -0
  37. package/dist/types/components/Dialog.d.ts +117 -0
  38. package/dist/types/components/DragDrop.d.ts +60 -0
  39. package/dist/types/components/ErrorBoundary.d.ts +16 -0
  40. package/dist/types/components/Field.d.ts +37 -0
  41. package/dist/types/components/FileUpload.d.ts +22 -0
  42. package/dist/types/components/Icon.d.ts +40 -0
  43. package/dist/types/components/Input.d.ts +120 -0
  44. package/dist/types/components/Loading.d.ts +83 -0
  45. package/dist/types/components/MarkdownEditor.d.ts +24 -0
  46. package/dist/types/components/Menu.d.ts +57 -0
  47. package/dist/types/components/Navigation.d.ts +46 -0
  48. package/dist/types/components/NumberInput.d.ts +88 -0
  49. package/dist/types/components/OTPInput.d.ts +11 -0
  50. package/dist/types/components/Panel.d.ts +94 -0
  51. package/dist/types/components/Popover.d.ts +64 -0
  52. package/dist/types/components/Progress.d.ts +178 -0
  53. package/dist/types/components/Select.d.ts +53 -0
  54. package/dist/types/components/Slider.d.ts +203 -0
  55. package/dist/types/components/Spinner.d.ts +29 -0
  56. package/dist/types/components/Stat.d.ts +98 -0
  57. package/dist/types/components/StatusSelect.d.ts +23 -0
  58. package/dist/types/components/Surface.d.ts +110 -0
  59. package/dist/types/components/Table.d.ts +46 -0
  60. package/dist/types/components/Tabs.d.ts +84 -0
  61. package/dist/types/components/ThemeMenu.d.ts +4 -0
  62. package/dist/types/components/Toast.d.ts +46 -0
  63. package/dist/types/components/Toggle.d.ts +65 -0
  64. package/dist/types/components/Tree.d.ts +20 -0
  65. package/dist/types/components/calendar/CalendarMonth.d.ts +33 -0
  66. package/dist/types/components/calendar/CalendarTimeGrid.d.ts +75 -0
  67. package/dist/types/components/calendar/EventActions.d.ts +17 -0
  68. package/dist/types/components/calendar/format.d.ts +43 -0
  69. package/dist/types/components/calendar/index.d.ts +9 -0
  70. package/dist/types/components/calendar/palette.d.ts +17 -0
  71. package/dist/types/components/calendar/use-calendar-drag.d.ts +54 -0
  72. package/dist/types/components/calendar/use-event-keyboard.d.ts +24 -0
  73. package/dist/types/components/calendar/use-grid-navigation.d.ts +47 -0
  74. package/dist/types/components/calendar/use-now.d.ts +20 -0
  75. package/dist/types/components/chat/Attachment.d.ts +49 -0
  76. package/dist/types/components/chat/Chat.d.ts +60 -0
  77. package/dist/types/components/chat/Composer.d.ts +29 -0
  78. package/dist/types/components/chat/ContextMeter.d.ts +55 -0
  79. package/dist/types/components/chat/EffortControl.d.ts +23 -0
  80. package/dist/types/components/chat/Markdown.d.ts +22 -0
  81. package/dist/types/components/chat/Message.d.ts +59 -0
  82. package/dist/types/components/chat/MessageScroller.d.ts +13 -0
  83. package/dist/types/components/chat/ModelSelector.d.ts +44 -0
  84. package/dist/types/components/chat/types.d.ts +155 -0
  85. package/dist/types/components/code-editor/context.d.ts +32 -0
  86. package/dist/types/components/code-editor/editing.d.ts +39 -0
  87. package/dist/types/components/code-editor/highlight.d.ts +20 -0
  88. package/dist/types/components/code-editor/recipe.d.ts +109 -0
  89. package/dist/types/components/code-editor/state.d.ts +14 -0
  90. package/dist/types/components/drag-drop/context.d.ts +45 -0
  91. package/dist/types/components/drag-drop/recipe.d.ts +121 -0
  92. package/dist/types/components/drag-drop/shift.d.ts +66 -0
  93. package/dist/types/components/markdown/Affordances.d.ts +76 -0
  94. package/dist/types/components/rbac/AccountMenu.d.ts +8 -0
  95. package/dist/types/components/rbac/DevToolsPopover.d.ts +5 -0
  96. package/dist/types/components/rbac/ProfilePage.d.ts +1 -0
  97. package/dist/types/components/rbac/RBACProvider.d.ts +64 -0
  98. package/dist/types/components/rbac/RolePermissionMatrix.d.ts +6 -0
  99. package/dist/types/components/rbac/RolesPermissionsPage.d.ts +1 -0
  100. package/dist/types/components/rbac/index.d.ts +7 -0
  101. package/dist/types/components/rbac/types.d.ts +26 -0
  102. package/dist/types/components/roadmap/PhaseManager.d.ts +19 -0
  103. package/dist/types/components/roadmap/RoadmapItemCard.d.ts +45 -0
  104. package/dist/types/components/roadmap/RoadmapPage.d.ts +9 -0
  105. package/dist/types/components/roadmap/RoadmapSwimlaneBoard.d.ts +9 -0
  106. package/dist/types/components/roadmap/UseCaseCard.d.ts +14 -0
  107. package/dist/types/components/roadmap/UseCaseLedgerPage.d.ts +21 -0
  108. package/dist/types/components/roadmap/chip-tones.d.ts +2 -0
  109. package/dist/types/components/roadmap/derive.d.ts +12 -0
  110. package/dist/types/components/roadmap/index.d.ts +9 -0
  111. package/dist/types/components/roadmap/types.d.ts +54 -0
  112. package/dist/types/icons/data.d.ts +1318 -0
  113. package/dist/types/index.d.ts +97 -0
  114. package/dist/types/lib/calendar/band-packer.d.ts +53 -0
  115. package/dist/types/lib/calendar/drag.d.ts +125 -0
  116. package/dist/types/lib/calendar/index.d.ts +4 -0
  117. package/dist/types/lib/calendar/lane-packer.d.ts +88 -0
  118. package/dist/types/lib/calendar/segments.d.ts +91 -0
  119. package/dist/types/lib/calendar/types.d.ts +166 -0
  120. package/dist/types/lib/cn.d.ts +7 -0
  121. package/dist/types/lib/dnd/announce.d.ts +132 -0
  122. package/dist/types/lib/dnd/autoscroll.d.ts +88 -0
  123. package/dist/types/lib/dnd/geometry.d.ts +78 -0
  124. package/dist/types/lib/dnd/index.d.ts +16 -0
  125. package/dist/types/lib/dnd/sensors/gesture.d.ts +37 -0
  126. package/dist/types/lib/dnd/sensors/keyboard.d.ts +50 -0
  127. package/dist/types/lib/dnd/sensors/pointer.d.ts +59 -0
  128. package/dist/types/lib/dnd/session.d.ts +99 -0
  129. package/dist/types/lib/dnd/types.d.ts +162 -0
  130. package/dist/types/lib/dnd/use-drag.d.ts +56 -0
  131. package/dist/types/lib/icons.d.ts +40 -0
  132. package/dist/types/lib/markdown/caret-map.d.ts +48 -0
  133. package/dist/types/lib/markdown/caret.d.ts +6 -0
  134. package/dist/types/lib/markdown/commands.d.ts +170 -0
  135. package/dist/types/lib/markdown/convert.d.ts +82 -0
  136. package/dist/types/lib/markdown/dom.d.ts +67 -0
  137. package/dist/types/lib/markdown/edit.d.ts +16 -0
  138. package/dist/types/lib/markdown/history.d.ts +47 -0
  139. package/dist/types/lib/markdown/hotkeys.d.ts +39 -0
  140. package/dist/types/lib/markdown/input.d.ts +15 -0
  141. package/dist/types/lib/markdown/keys.d.ts +34 -0
  142. package/dist/types/lib/markdown/paste.d.ts +9 -0
  143. package/dist/types/lib/markdown/position.d.ts +43 -0
  144. package/dist/types/lib/markdown/project.d.ts +88 -0
  145. package/dist/types/lib/markdown/reconcile.d.ts +63 -0
  146. package/dist/types/lib/markdown/surface.d.ts +177 -0
  147. package/dist/types/lib/persist.d.ts +40 -0
  148. package/dist/types/lib/preferences.d.ts +80 -0
  149. package/dist/types/lib/sim/createSimStore.d.ts +18 -0
  150. package/dist/types/lib/sim/index.d.ts +5 -0
  151. package/dist/types/lib/sim/latency.d.ts +10 -0
  152. package/dist/types/lib/sim/registry.d.ts +14 -0
  153. package/dist/types/lib/sim/settings.d.ts +11 -0
  154. package/dist/types/lib/sim/types.d.ts +3 -0
  155. package/dist/types/lib/syntax/index.d.ts +16 -0
  156. package/dist/types/lib/syntax/languages/bash.d.ts +1 -0
  157. package/dist/types/lib/syntax/languages/css.d.ts +1 -0
  158. package/dist/types/lib/syntax/languages/html.d.ts +17 -0
  159. package/dist/types/lib/syntax/languages/index.d.ts +33 -0
  160. package/dist/types/lib/syntax/languages/javascript.d.ts +22 -0
  161. package/dist/types/lib/syntax/languages/json.d.ts +1 -0
  162. package/dist/types/lib/syntax/languages/mongodb.d.ts +1 -0
  163. package/dist/types/lib/syntax/languages/plain.d.ts +9 -0
  164. package/dist/types/lib/syntax/languages/sql.d.ts +4 -0
  165. package/dist/types/lib/syntax/languages/vue.d.ts +1 -0
  166. package/dist/types/lib/syntax/languages/yaml.d.ts +1 -0
  167. package/dist/types/lib/syntax/markdown/frames.d.ts +145 -0
  168. package/dist/types/lib/syntax/markdown/grammar.d.ts +1 -0
  169. package/dist/types/lib/syntax/markdown/index.d.ts +4 -0
  170. package/dist/types/lib/syntax/markdown/inline.d.ts +21 -0
  171. package/dist/types/lib/syntax/markdown/parse.d.ts +11 -0
  172. package/dist/types/lib/syntax/markdown/render.d.ts +19 -0
  173. package/dist/types/lib/syntax/markdown/spans.d.ts +84 -0
  174. package/dist/types/lib/syntax/markdown/types.d.ts +108 -0
  175. package/dist/types/lib/syntax/registry.d.ts +37 -0
  176. package/dist/types/lib/syntax/tokenize.d.ts +17 -0
  177. package/dist/types/lib/syntax/types.d.ts +119 -0
  178. package/dist/types/lib/time/index.d.ts +3 -0
  179. package/dist/types/lib/time/plain.d.ts +61 -0
  180. package/dist/types/lib/time/types.d.ts +87 -0
  181. package/dist/types/lib/time/zone.d.ts +97 -0
  182. package/dist/types/lib/use-media-query.d.ts +29 -0
  183. package/package.json +130 -0
@@ -0,0 +1,154 @@
1
+ import type { ReactNode, Ref } from "react";
2
+ import { type VariantProps } from "tailwind-variants";
3
+ declare const avatar: import("tailwind-variants").TVReturnType<{
4
+ size: {
5
+ xs: {
6
+ root: string;
7
+ fallback: string;
8
+ status: string;
9
+ };
10
+ sm: {
11
+ root: string;
12
+ fallback: string;
13
+ status: string;
14
+ };
15
+ md: {
16
+ root: string;
17
+ fallback: string;
18
+ status: string;
19
+ };
20
+ lg: {
21
+ root: string;
22
+ fallback: string;
23
+ status: string;
24
+ };
25
+ xl: {
26
+ root: string;
27
+ fallback: string;
28
+ status: string;
29
+ };
30
+ };
31
+ shape: {
32
+ circle: {
33
+ root: string;
34
+ };
35
+ rounded: {
36
+ root: string;
37
+ };
38
+ };
39
+ }, {
40
+ root: string[];
41
+ image: string;
42
+ fallback: string;
43
+ status: string[];
44
+ }, undefined, {
45
+ size: {
46
+ xs: {
47
+ root: string;
48
+ fallback: string;
49
+ status: string;
50
+ };
51
+ sm: {
52
+ root: string;
53
+ fallback: string;
54
+ status: string;
55
+ };
56
+ md: {
57
+ root: string;
58
+ fallback: string;
59
+ status: string;
60
+ };
61
+ lg: {
62
+ root: string;
63
+ fallback: string;
64
+ status: string;
65
+ };
66
+ xl: {
67
+ root: string;
68
+ fallback: string;
69
+ status: string;
70
+ };
71
+ };
72
+ shape: {
73
+ circle: {
74
+ root: string;
75
+ };
76
+ rounded: {
77
+ root: string;
78
+ };
79
+ };
80
+ }, {
81
+ root: string[];
82
+ image: string;
83
+ fallback: string;
84
+ status: string[];
85
+ }, import("tailwind-variants").TVReturnTypeLike<{
86
+ size: {
87
+ xs: {
88
+ root: string;
89
+ fallback: string;
90
+ status: string;
91
+ };
92
+ sm: {
93
+ root: string;
94
+ fallback: string;
95
+ status: string;
96
+ };
97
+ md: {
98
+ root: string;
99
+ fallback: string;
100
+ status: string;
101
+ };
102
+ lg: {
103
+ root: string;
104
+ fallback: string;
105
+ status: string;
106
+ };
107
+ xl: {
108
+ root: string;
109
+ fallback: string;
110
+ status: string;
111
+ };
112
+ };
113
+ shape: {
114
+ circle: {
115
+ root: string;
116
+ };
117
+ rounded: {
118
+ root: string;
119
+ };
120
+ };
121
+ }, {
122
+ root: string[];
123
+ image: string;
124
+ fallback: string;
125
+ status: string[];
126
+ }>>;
127
+ export type AvatarStatus = "online" | "busy" | "away" | "offline";
128
+ export interface AvatarProps extends VariantProps<typeof avatar> {
129
+ src?: string;
130
+ /** Drives the initials, the fallback tint, and the accessible name. */
131
+ name: string;
132
+ /** Overrides the derived initials — for an icon, or a custom mark. */
133
+ fallback?: ReactNode;
134
+ status?: AvatarStatus;
135
+ className?: string;
136
+ ref?: Ref<HTMLSpanElement>;
137
+ }
138
+ export declare function Avatar({ src, name, fallback, status, size, shape, className, ref }: AvatarProps): import("react").JSX.Element;
139
+ export interface AvatarGroupProps {
140
+ children: ReactNode;
141
+ /** Show at most this many, then a +N chip. */
142
+ max?: number;
143
+ size?: VariantProps<typeof avatar>["size"];
144
+ className?: string;
145
+ }
146
+ /**
147
+ * Overlapping avatars with an overflow count.
148
+ *
149
+ * The stack order is REVERSED so earlier avatars sit on top of later ones.
150
+ * Left-to-right overlap with natural order puts each avatar's face under its
151
+ * neighbour, which is exactly the half you need to see.
152
+ */
153
+ export declare function AvatarGroup({ children, max, size, className }: AvatarGroupProps): import("react").JSX.Element;
154
+ export {};
@@ -0,0 +1,73 @@
1
+ import type { HTMLAttributes, ReactNode, Ref } from "react";
2
+ import { type VariantProps } from "tailwind-variants";
3
+ declare const badge: import("tailwind-variants").TVReturnType<{
4
+ tone: {
5
+ neutral: "border-border bg-surface-raised text-secondary";
6
+ accent: "border-accent-border bg-accent-subtle text-accent-text";
7
+ brand: "border-transparent bg-brand-subtle text-brand-text";
8
+ success: "border-success-border bg-success-subtle text-success-text";
9
+ warning: "border-warning-border bg-warning-subtle text-warning-text";
10
+ danger: "border-danger-border bg-danger-subtle text-danger-text";
11
+ info: "border-info-border bg-info-subtle text-info-text";
12
+ };
13
+ size: {
14
+ sm: "h-5 rounded-sm px-1.5 text-2xs";
15
+ md: "h-6 rounded-md px-2 text-xs";
16
+ lg: "h-7 rounded-md px-2.5 text-sm";
17
+ };
18
+ dot: {
19
+ true: "";
20
+ false: "";
21
+ };
22
+ }, undefined, string[], {
23
+ tone: {
24
+ neutral: "border-border bg-surface-raised text-secondary";
25
+ accent: "border-accent-border bg-accent-subtle text-accent-text";
26
+ brand: "border-transparent bg-brand-subtle text-brand-text";
27
+ success: "border-success-border bg-success-subtle text-success-text";
28
+ warning: "border-warning-border bg-warning-subtle text-warning-text";
29
+ danger: "border-danger-border bg-danger-subtle text-danger-text";
30
+ info: "border-info-border bg-info-subtle text-info-text";
31
+ };
32
+ size: {
33
+ sm: "h-5 rounded-sm px-1.5 text-2xs";
34
+ md: "h-6 rounded-md px-2 text-xs";
35
+ lg: "h-7 rounded-md px-2.5 text-sm";
36
+ };
37
+ dot: {
38
+ true: "";
39
+ false: "";
40
+ };
41
+ }, undefined, import("tailwind-variants").TVReturnTypeLike<{
42
+ tone: {
43
+ neutral: "border-border bg-surface-raised text-secondary";
44
+ accent: "border-accent-border bg-accent-subtle text-accent-text";
45
+ brand: "border-transparent bg-brand-subtle text-brand-text";
46
+ success: "border-success-border bg-success-subtle text-success-text";
47
+ warning: "border-warning-border bg-warning-subtle text-warning-text";
48
+ danger: "border-danger-border bg-danger-subtle text-danger-text";
49
+ info: "border-info-border bg-info-subtle text-info-text";
50
+ };
51
+ size: {
52
+ sm: "h-5 rounded-sm px-1.5 text-2xs";
53
+ md: "h-6 rounded-md px-2 text-xs";
54
+ lg: "h-7 rounded-md px-2.5 text-sm";
55
+ };
56
+ dot: {
57
+ true: "";
58
+ false: "";
59
+ };
60
+ }, undefined>>;
61
+ export interface BadgeProps extends HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badge> {
62
+ icon?: ReactNode;
63
+ /**
64
+ * Ping the dot outward — for genuinely LIVE states only (running, connected,
65
+ * streaming). A pulse on a static label is the badge equivalent of a blinking
66
+ * tag: it captures attention permanently and therefore stops meaning
67
+ * anything.
68
+ */
69
+ pulse?: boolean;
70
+ ref?: Ref<HTMLSpanElement>;
71
+ }
72
+ export declare function Badge({ className, tone, size, dot, icon, pulse, children, ref, ...props }: BadgeProps): import("react").JSX.Element;
73
+ export { badge as badgeVariants };
@@ -0,0 +1,103 @@
1
+ import type { ButtonHTMLAttributes, ReactNode, Ref } from "react";
2
+ import { useRender } from "@base-ui/react/use-render";
3
+ import { type VariantProps } from "tailwind-variants";
4
+ declare const button: import("tailwind-variants").TVReturnType<{
5
+ variant: {
6
+ solid: string[];
7
+ brand: string[];
8
+ subtle: string[];
9
+ outline: string[];
10
+ ghost: string[];
11
+ danger: string[];
12
+ "danger-subtle": string[];
13
+ link: string[];
14
+ };
15
+ size: {
16
+ xs: "h-control-xs rounded-sm px-2.5 text-2xs gap-1.5";
17
+ sm: "h-control-sm rounded-md px-3.5 text-xs";
18
+ md: "h-control-md rounded-md px-5 text-sm";
19
+ lg: "h-control-lg rounded-lg px-6 text-md";
20
+ xl: "h-control-xl rounded-lg px-8 text-lg";
21
+ };
22
+ iconOnly: {
23
+ true: "px-0 aspect-square";
24
+ false: "";
25
+ };
26
+ fullWidth: {
27
+ true: "w-full";
28
+ false: "";
29
+ };
30
+ }, undefined, string[], {
31
+ variant: {
32
+ solid: string[];
33
+ brand: string[];
34
+ subtle: string[];
35
+ outline: string[];
36
+ ghost: string[];
37
+ danger: string[];
38
+ "danger-subtle": string[];
39
+ link: string[];
40
+ };
41
+ size: {
42
+ xs: "h-control-xs rounded-sm px-2.5 text-2xs gap-1.5";
43
+ sm: "h-control-sm rounded-md px-3.5 text-xs";
44
+ md: "h-control-md rounded-md px-5 text-sm";
45
+ lg: "h-control-lg rounded-lg px-6 text-md";
46
+ xl: "h-control-xl rounded-lg px-8 text-lg";
47
+ };
48
+ iconOnly: {
49
+ true: "px-0 aspect-square";
50
+ false: "";
51
+ };
52
+ fullWidth: {
53
+ true: "w-full";
54
+ false: "";
55
+ };
56
+ }, undefined, import("tailwind-variants").TVReturnTypeLike<{
57
+ variant: {
58
+ solid: string[];
59
+ brand: string[];
60
+ subtle: string[];
61
+ outline: string[];
62
+ ghost: string[];
63
+ danger: string[];
64
+ "danger-subtle": string[];
65
+ link: string[];
66
+ };
67
+ size: {
68
+ xs: "h-control-xs rounded-sm px-2.5 text-2xs gap-1.5";
69
+ sm: "h-control-sm rounded-md px-3.5 text-xs";
70
+ md: "h-control-md rounded-md px-5 text-sm";
71
+ lg: "h-control-lg rounded-lg px-6 text-md";
72
+ xl: "h-control-xl rounded-lg px-8 text-lg";
73
+ };
74
+ iconOnly: {
75
+ true: "px-0 aspect-square";
76
+ false: "";
77
+ };
78
+ fullWidth: {
79
+ true: "w-full";
80
+ false: "";
81
+ };
82
+ }, undefined>>;
83
+ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof button> {
84
+ /**
85
+ * Render as a different element, keeping every style and behaviour.
86
+ *
87
+ * Takes the element itself (`render={<a href="/x" />}`) rather than a
88
+ * `asChild` boolean over `children`. The difference matters: with `asChild`
89
+ * the rendered element is buried inside children and TypeScript cannot tell
90
+ * you that you passed two of them, which fails at runtime. Here the element
91
+ * is a prop with a type.
92
+ */
93
+ render?: useRender.RenderProp;
94
+ /** Show a spinner and block interaction. Width is preserved — no layout shift. */
95
+ loading?: boolean;
96
+ /** Element rendered before the label. */
97
+ leadingIcon?: ReactNode;
98
+ /** Element rendered after the label. */
99
+ trailingIcon?: ReactNode;
100
+ ref?: Ref<HTMLButtonElement>;
101
+ }
102
+ export declare function Button({ className, variant, size, iconOnly, fullWidth, render, loading, leadingIcon, trailingIcon, disabled, children, onPointerDown, ref, ...props }: ButtonProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
103
+ export { button as buttonVariants };
@@ -0,0 +1,193 @@
1
+ import type { ReactNode, Ref } from "react";
2
+ import { useRender } from "@base-ui/react/use-render";
3
+ import { type VariantProps } from "tailwind-variants";
4
+ declare const card: import("tailwind-variants").TVReturnType<{
5
+ variant: {
6
+ raised: {
7
+ root: string;
8
+ };
9
+ flat: {
10
+ root: string;
11
+ };
12
+ sunken: {
13
+ root: string;
14
+ };
15
+ ghost: {
16
+ root: string;
17
+ };
18
+ };
19
+ padding: {
20
+ none: {
21
+ root: string;
22
+ };
23
+ sm: {
24
+ root: string;
25
+ };
26
+ md: {
27
+ root: string;
28
+ };
29
+ lg: {
30
+ root: string;
31
+ };
32
+ };
33
+ interactive: {
34
+ true: {
35
+ root: string[];
36
+ };
37
+ false: {};
38
+ };
39
+ selected: {
40
+ true: {
41
+ root: string;
42
+ };
43
+ false: {};
44
+ };
45
+ }, {
46
+ root: string[];
47
+ header: string;
48
+ title: string;
49
+ description: string;
50
+ body: string;
51
+ footer: string;
52
+ }, undefined, {
53
+ variant: {
54
+ raised: {
55
+ root: string;
56
+ };
57
+ flat: {
58
+ root: string;
59
+ };
60
+ sunken: {
61
+ root: string;
62
+ };
63
+ ghost: {
64
+ root: string;
65
+ };
66
+ };
67
+ padding: {
68
+ none: {
69
+ root: string;
70
+ };
71
+ sm: {
72
+ root: string;
73
+ };
74
+ md: {
75
+ root: string;
76
+ };
77
+ lg: {
78
+ root: string;
79
+ };
80
+ };
81
+ interactive: {
82
+ true: {
83
+ root: string[];
84
+ };
85
+ false: {};
86
+ };
87
+ selected: {
88
+ true: {
89
+ root: string;
90
+ };
91
+ false: {};
92
+ };
93
+ }, {
94
+ root: string[];
95
+ header: string;
96
+ title: string;
97
+ description: string;
98
+ body: string;
99
+ footer: string;
100
+ }, import("tailwind-variants").TVReturnTypeLike<{
101
+ variant: {
102
+ raised: {
103
+ root: string;
104
+ };
105
+ flat: {
106
+ root: string;
107
+ };
108
+ sunken: {
109
+ root: string;
110
+ };
111
+ ghost: {
112
+ root: string;
113
+ };
114
+ };
115
+ padding: {
116
+ none: {
117
+ root: string;
118
+ };
119
+ sm: {
120
+ root: string;
121
+ };
122
+ md: {
123
+ root: string;
124
+ };
125
+ lg: {
126
+ root: string;
127
+ };
128
+ };
129
+ interactive: {
130
+ true: {
131
+ root: string[];
132
+ };
133
+ false: {};
134
+ };
135
+ selected: {
136
+ true: {
137
+ root: string;
138
+ };
139
+ false: {};
140
+ };
141
+ }, {
142
+ root: string[];
143
+ header: string;
144
+ title: string;
145
+ description: string;
146
+ body: string;
147
+ footer: string;
148
+ }>>;
149
+ export interface CardProps extends VariantProps<typeof card> {
150
+ /** Render as something else — a link, an article, a button. */
151
+ render?: useRender.RenderProp;
152
+ className?: string;
153
+ children?: ReactNode;
154
+ ref?: Ref<HTMLElement>;
155
+ onClick?: (event: React.MouseEvent) => void;
156
+ }
157
+ export declare function Card({ variant, padding, interactive, selected, render, className, children, ref, ...props }: CardProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
158
+ export interface CardHeaderProps {
159
+ title?: ReactNode;
160
+ description?: ReactNode;
161
+ /** Sits at the trailing edge — a menu, a badge, an action. */
162
+ action?: ReactNode;
163
+ /** Sits before the text — an icon or avatar. */
164
+ media?: ReactNode;
165
+ /**
166
+ * The heading level the title renders as.
167
+ *
168
+ * A CARD'S CORRECT HEADING LEVEL IS A PROPERTY OF WHERE IT SITS, NOT OF THE
169
+ * CARD, and this used to be hard-coded to `h3`. Headings have to descend one
170
+ * level at a time — a screen reader's heading list IS the page outline, and a
171
+ * gap in it reads as a missing section. So a card placed directly under a
172
+ * page's `<h1>` needs `h2`, and the same card nested inside a titled
173
+ * section needs `h3`. Only the caller knows which.
174
+ *
175
+ * Hard-coding it did not merely risk that defect, it shipped it: a demo page
176
+ * whose first section deliberately carries no heading of its own put a row of
177
+ * `h3` cards straight under the page title, and axe's `heading-order`
178
+ * reported the gap while `a11y-scan` stayed green — it blocks on serious and
179
+ * critical, and heading-order is moderate.
180
+ *
181
+ * `h3` remains the default because a card is usually inside something.
182
+ *
183
+ * @default "h3"
184
+ */
185
+ titleAs?: "h2" | "h3" | "h4" | "h5" | "h6";
186
+ className?: string;
187
+ }
188
+ export declare function CardHeader({ title, description, action, media, titleAs: Title, className, }: CardHeaderProps): import("react").JSX.Element;
189
+ export declare function CardFooter({ className, children }: {
190
+ className?: string;
191
+ children: ReactNode;
192
+ }): import("react").JSX.Element;
193
+ export {};
@@ -0,0 +1,112 @@
1
+ import type { ReactNode, Ref } from "react";
2
+ import { Checkbox as BaseCheckbox } from "@base-ui/react/checkbox";
3
+ import { Switch as BaseSwitch } from "@base-ui/react/switch";
4
+ import { Radio as BaseRadio } from "@base-ui/react/radio";
5
+ import { RadioGroup as BaseRadioGroup } from "@base-ui/react/radio-group";
6
+ import { type VariantProps } from "tailwind-variants";
7
+ import { type FieldProps } from "./Field";
8
+ declare const checkbox: import("tailwind-variants").TVReturnType<{
9
+ size: {
10
+ sm: "size-[1.125rem] rounded-[0.3125rem]";
11
+ md: "size-[1.375rem] rounded-md";
12
+ lg: "size-[1.625rem] rounded-md";
13
+ };
14
+ }, undefined, string[], {
15
+ size: {
16
+ sm: "size-[1.125rem] rounded-[0.3125rem]";
17
+ md: "size-[1.375rem] rounded-md";
18
+ lg: "size-[1.625rem] rounded-md";
19
+ };
20
+ }, undefined, import("tailwind-variants").TVReturnTypeLike<{
21
+ size: {
22
+ sm: "size-[1.125rem] rounded-[0.3125rem]";
23
+ md: "size-[1.375rem] rounded-md";
24
+ lg: "size-[1.625rem] rounded-md";
25
+ };
26
+ }, undefined>>;
27
+ export interface CheckboxProps extends Omit<BaseCheckbox.Root.Props, "className" | "render">, VariantProps<typeof checkbox> {
28
+ className?: string;
29
+ ref?: Ref<HTMLButtonElement>;
30
+ }
31
+ export declare function Checkbox({ size, className, ref, ...props }: CheckboxProps): import("react").JSX.Element;
32
+ declare const switchTrack: import("tailwind-variants").TVReturnType<{
33
+ size: {
34
+ sm: "h-(--switch-h) w-(--switch-w) [--switch-h:calc(1.25rem*var(--ui-scale))] [--switch-w:calc(2.25rem*var(--ui-scale))]";
35
+ md: "h-(--switch-h) w-(--switch-w) [--switch-h:calc(1.5rem*var(--ui-scale))] [--switch-w:calc(2.75rem*var(--ui-scale))]";
36
+ lg: "h-(--switch-h) w-(--switch-w) [--switch-h:calc(1.75rem*var(--ui-scale))] [--switch-w:calc(3.25rem*var(--ui-scale))]";
37
+ };
38
+ }, undefined, string[], {
39
+ size: {
40
+ sm: "h-(--switch-h) w-(--switch-w) [--switch-h:calc(1.25rem*var(--ui-scale))] [--switch-w:calc(2.25rem*var(--ui-scale))]";
41
+ md: "h-(--switch-h) w-(--switch-w) [--switch-h:calc(1.5rem*var(--ui-scale))] [--switch-w:calc(2.75rem*var(--ui-scale))]";
42
+ lg: "h-(--switch-h) w-(--switch-w) [--switch-h:calc(1.75rem*var(--ui-scale))] [--switch-w:calc(3.25rem*var(--ui-scale))]";
43
+ };
44
+ }, undefined, import("tailwind-variants").TVReturnTypeLike<{
45
+ size: {
46
+ sm: "h-(--switch-h) w-(--switch-w) [--switch-h:calc(1.25rem*var(--ui-scale))] [--switch-w:calc(2.25rem*var(--ui-scale))]";
47
+ md: "h-(--switch-h) w-(--switch-w) [--switch-h:calc(1.5rem*var(--ui-scale))] [--switch-w:calc(2.75rem*var(--ui-scale))]";
48
+ lg: "h-(--switch-h) w-(--switch-w) [--switch-h:calc(1.75rem*var(--ui-scale))] [--switch-w:calc(3.25rem*var(--ui-scale))]";
49
+ };
50
+ }, undefined>>;
51
+ export interface SwitchProps extends Omit<BaseSwitch.Root.Props, "className" | "render">, VariantProps<typeof switchTrack> {
52
+ className?: string;
53
+ ref?: Ref<HTMLButtonElement>;
54
+ }
55
+ export declare function Switch({ size, className, ref, ...props }: SwitchProps): import("react").JSX.Element;
56
+ declare const radio: import("tailwind-variants").TVReturnType<{
57
+ size: {
58
+ sm: "size-[1.125rem]";
59
+ md: "size-[1.375rem]";
60
+ lg: "size-[1.625rem]";
61
+ };
62
+ }, undefined, string[], {
63
+ size: {
64
+ sm: "size-[1.125rem]";
65
+ md: "size-[1.375rem]";
66
+ lg: "size-[1.625rem]";
67
+ };
68
+ }, undefined, import("tailwind-variants").TVReturnTypeLike<{
69
+ size: {
70
+ sm: "size-[1.125rem]";
71
+ md: "size-[1.375rem]";
72
+ lg: "size-[1.625rem]";
73
+ };
74
+ }, undefined>>;
75
+ export interface RadioProps extends Omit<BaseRadio.Root.Props, "className" | "render">, VariantProps<typeof radio> {
76
+ className?: string;
77
+ ref?: Ref<HTMLButtonElement>;
78
+ }
79
+ export declare function Radio({ size, className, ref, ...props }: RadioProps): import("react").JSX.Element;
80
+ export interface RadioGroupProps extends Omit<BaseRadioGroup.Props, "className" | "render"> {
81
+ className?: string;
82
+ /** Lay options out in a row instead of a column. */
83
+ orientation?: "vertical" | "horizontal";
84
+ ref?: Ref<HTMLDivElement>;
85
+ }
86
+ export declare function RadioGroup({ className, orientation, children, ref, ...props }: RadioGroupProps): import("react").JSX.Element;
87
+ type LabelledProps = Pick<FieldProps, "label" | "description" | "error" | "disabled" | "name">;
88
+ export interface CheckboxFieldProps extends CheckboxProps, LabelledProps {
89
+ fieldClassName?: string;
90
+ }
91
+ export declare function CheckboxField({ label, description, error, name, disabled, fieldClassName, ...props }: CheckboxFieldProps): import("react").JSX.Element;
92
+ export interface SwitchFieldProps extends SwitchProps, LabelledProps {
93
+ fieldClassName?: string;
94
+ }
95
+ export declare function SwitchField({ label, description, error, name, disabled, fieldClassName, ...props }: SwitchFieldProps): import("react").JSX.Element;
96
+ export interface RadioFieldProps extends RadioProps, LabelledProps {
97
+ fieldClassName?: string;
98
+ }
99
+ export declare function RadioField({ label, description, error, name, disabled, fieldClassName, ...props }: RadioFieldProps): import("react").JSX.Element;
100
+ export interface RadioCardProps extends RadioProps {
101
+ label: ReactNode;
102
+ description?: ReactNode;
103
+ }
104
+ /**
105
+ * A radio rendered as a full selectable card.
106
+ *
107
+ * The whole card is the hit target, which is the point: on touch, a 22px dot
108
+ * beside a paragraph of text is a target most people miss at least once, and
109
+ * the card turns the same choice into something you cannot miss.
110
+ */
111
+ export declare function RadioCard({ label, description, className, size, ...props }: RadioCardProps): import("react").JSX.Element;
112
+ export {};