@hex-core/components 1.4.0 → 1.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/_tsup-dts-rollup.d.ts +3105 -0
- package/dist/accordion.d.ts +4 -13
- package/dist/alert-dialog.d.ts +11 -34
- package/dist/alert.d.ts +4 -17
- package/dist/aspect-ratio.d.ts +1 -7
- package/dist/avatar.d.ts +3 -11
- package/dist/badge.d.ts +3 -22
- package/dist/breadcrumb.d.ts +7 -27
- package/dist/button.d.ts +3 -13
- package/dist/calendar.d.ts +1 -17
- package/dist/card.d.ts +6 -16
- package/dist/checkbox.d.ts +2 -11
- package/dist/citation.d.ts +2 -0
- package/dist/citation.js +70 -0
- package/dist/citation.js.map +1 -0
- package/dist/cluster.d.ts +3 -34
- package/dist/code-block-copy.d.ts +2 -0
- package/dist/code-block-copy.js +108 -0
- package/dist/code-block-copy.js.map +1 -0
- package/dist/code-block.d.ts +3 -0
- package/dist/code-block.js +90 -0
- package/dist/code-block.js.map +1 -0
- package/dist/collapsible.d.ts +3 -11
- package/dist/color-picker.d.ts +2 -44
- package/dist/combobox.d.ts +3 -45
- package/dist/command.d.ts +9 -111
- package/dist/composer.d.ts +2 -0
- package/dist/composer.js +75 -0
- package/dist/composer.js.map +1 -0
- package/dist/container.d.ts +3 -41
- package/dist/context-menu.d.ts +12 -37
- package/dist/data-table.d.ts +2 -33
- package/dist/date-picker.d.ts +2 -43
- package/dist/dialog.d.ts +11 -46
- package/dist/drawer.d.ts +10 -41
- package/dist/dropdown-menu.d.ts +13 -39
- package/dist/dropzone.d.ts +3 -54
- package/dist/file-tree.d.ts +3 -53
- package/dist/form.d.ts +8 -45
- package/dist/grid.d.ts +3 -50
- package/dist/hover-card.d.ts +3 -11
- package/dist/index.d.ts +298 -179
- package/dist/index.js +674 -1
- package/dist/index.js.map +1 -1
- package/dist/input-otp.d.ts +5 -19
- package/dist/input.d.ts +2 -6
- package/dist/label.d.ts +2 -11
- package/dist/loading-indicator.d.ts +3 -0
- package/dist/loading-indicator.js +64 -0
- package/dist/loading-indicator.js.map +1 -0
- package/dist/markdown.d.ts +2 -0
- package/dist/markdown.js +28 -0
- package/dist/markdown.js.map +1 -0
- package/dist/menubar.d.ts +11 -35
- package/dist/message-actions.d.ts +2 -0
- package/dist/message-actions.js +28 -0
- package/dist/message-actions.js.map +1 -0
- package/dist/message-list.d.ts +2 -0
- package/dist/message-list.js +49 -0
- package/dist/message-list.js.map +1 -0
- package/dist/message.d.ts +3 -0
- package/dist/message.js +35 -0
- package/dist/message.js.map +1 -0
- package/dist/multi-combobox.d.ts +3 -51
- package/dist/navigation-menu.d.ts +9 -23
- package/dist/pagination.d.ts +7 -40
- package/dist/popover.d.ts +4 -13
- package/dist/progress.d.ts +1 -10
- package/dist/radio-group.d.ts +2 -9
- package/dist/reasoning.d.ts +2 -0
- package/dist/reasoning.js +90 -0
- package/dist/reasoning.js.map +1 -0
- package/dist/resizable.d.ts +3 -28
- package/dist/schemas.d.ts +72 -121
- package/dist/schemas.js +849 -1
- package/dist/schemas.js.map +1 -1
- package/dist/scroll-area.d.ts +3 -18
- package/dist/select.d.ts +8 -21
- package/dist/separator.d.ts +2 -11
- package/dist/sheet.d.ts +10 -39
- package/dist/sidebar.d.ts +8 -75
- package/dist/skeleton.d.ts +1 -11
- package/dist/slider.d.ts +2 -20
- package/dist/sonner.d.ts +2 -14
- package/dist/spacer.d.ts +3 -38
- package/dist/stack.d.ts +3 -34
- package/dist/stepper.d.ts +4 -48
- package/dist/suggestion.d.ts +2 -0
- package/dist/suggestion.js +55 -0
- package/dist/suggestion.js.map +1 -0
- package/dist/switch.d.ts +2 -11
- package/dist/table.d.ts +8 -24
- package/dist/tabs.d.ts +4 -13
- package/dist/textarea.d.ts +2 -10
- package/dist/time-picker.d.ts +2 -34
- package/dist/timeline.d.ts +4 -42
- package/dist/toggle-group.d.ts +2 -17
- package/dist/toggle.d.ts +2 -19
- package/dist/tool-call.d.ts +2 -0
- package/dist/tool-call.js +133 -0
- package/dist/tool-call.js.map +1 -0
- package/dist/tooltip.d.ts +4 -13
- package/package.json +4 -1
- package/dist/button-variants-Bx6gCUFp.d.ts +0 -19
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts","../src/ai/code-block/code-block.tsx"],"names":[],"mappings":"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","file":"code-block.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind CSS conflict resolution.\n * @param inputs - Class values (strings, arrays, objects) to merge\n * @returns A single merged class string with Tailwind conflicts resolved\n */\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","import * as React from \"react\";\nimport { cache } from \"react\";\nimport { codeToHtml } from \"shiki\";\nimport { cn } from \"../../lib/utils.js\";\nimport { CodeBlockCopy } from \"./code-block-copy.js\";\n\n/**\n * Languages we surface in the prop type. Plain literal union of real\n * Shiki grammar IDs — kept literal (not `Extract<BundledLanguage, …>`)\n * because Shiki's full bundled-language union is 600+ literals, and\n * deriving from it forced the rollup-dts pass past a 4GB heap. The\n * literals here are all standard Shiki grammar IDs; if Shiki removes\n * one upstream, `codeToHtml` will throw at runtime — acceptable trade.\n */\nexport type SupportedLang =\n\t| \"bash\"\n\t| \"ts\"\n\t| \"tsx\"\n\t| \"js\"\n\t| \"jsx\"\n\t| \"json\"\n\t| \"css\"\n\t| \"html\"\n\t| \"md\"\n\t| \"py\"\n\t| \"text\";\n\nconst LABEL_TO_LANG: Record<string, SupportedLang> = {\n\tpnpm: \"bash\",\n\tnpm: \"bash\",\n\tyarn: \"bash\",\n\tbun: \"bash\",\n\tbash: \"bash\",\n\tsh: \"bash\",\n\tshell: \"bash\",\n\tzsh: \"bash\",\n\tts: \"ts\",\n\ttypescript: \"ts\",\n\ttsx: \"tsx\",\n\tjs: \"js\",\n\tjavascript: \"js\",\n\tjsx: \"jsx\",\n\tjson: \"json\",\n\tcss: \"css\",\n\thtml: \"html\",\n\tmd: \"md\",\n\tmarkdown: \"md\",\n\tpy: \"py\",\n\tpython: \"py\",\n\ttext: \"text\",\n\tprompt: \"text\",\n\tplain: \"text\",\n};\n\nconst DEFAULT_THEMES = { light: \"github-light\", dark: \"github-dark\" } as const;\n\n/**\n * Per-render-tree memoization of `codeToHtml`. React's `cache()` dedupes\n * identical (code, lang, theme) combos within a single RSC render pass —\n * useful when a page renders many copies of the same install snippet.\n * Shiki itself caches grammars/themes per process, so this layer only\n * eliminates duplicate parse + tokenize work within one request.\n */\nconst cachedCodeToHtml = cache(\n\tasync (code: string, lang: SupportedLang, themesKey: string, themes: { light: string; dark: string }) => {\n\t\tvoid themesKey;\n\t\treturn codeToHtml(code, { lang, themes, defaultColor: false });\n\t},\n);\n\nfunction resolveLang(label?: string, language?: SupportedLang): SupportedLang {\n\tif (language) return language;\n\tif (label) {\n\t\tconst fromLabel = LABEL_TO_LANG[label.toLowerCase()];\n\t\tif (fromLabel) return fromLabel;\n\t}\n\treturn \"text\";\n}\n\n/**\n * Syntax-highlighted code block with a language-label header and a copy\n * button. Highlighting runs server-side via Shiki using a dual-theme\n * (default: github-light / github-dark) so the same HTML flips on\n * `data-theme`/`prefers-color-scheme` without client-side rehydration.\n *\n * Async Server Component — render inside RSC trees or pre-render in\n * static contexts. For client-side streaming code blocks, plug Streamdown's\n * built-in code rendering via `Markdown components={{ pre: … }}` instead.\n *\n * @example\n * <CodeBlock label=\"pnpm\" code=\"pnpm add @hex-core/components\" />\n * @example\n * <CodeBlock language=\"tsx\" code={src} />\n */\nexport interface CodeBlockProps {\n\tcode: string;\n\t/** Optional header label (e.g. \"pnpm\", \"tsx\"). Inferred from `language` if omitted. */\n\tlabel?: string;\n\t/** Explicit Shiki grammar key. Overrides inference from `label`. */\n\tlanguage?: SupportedLang;\n\t/** Override the default github-light / github-dark theme pair. */\n\tthemes?: { light: string; dark: string };\n\tclassName?: string;\n}\n\n/**\n * Async Server Component that highlights `code` server-side and emits the\n * resulting HTML with a header + copy island.\n *\n * @param props - code, optional label/language/themes\n * @returns A bordered card wrapping the highlighted code\n */\nasync function CodeBlock({\n\tcode,\n\tlabel,\n\tlanguage,\n\tthemes = DEFAULT_THEMES,\n\tclassName,\n}: CodeBlockProps) {\n\tconst lang = resolveLang(label, language);\n\tconst themesKey = `${themes.light}|${themes.dark}`;\n\tconst html = await cachedCodeToHtml(code, lang, themesKey, themes);\n\tconst displayLabel = label ?? lang;\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t\"group relative overflow-hidden rounded-lg border bg-card text-card-foreground\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t<div className=\"flex items-center justify-between border-b bg-muted/40 px-3 py-1.5\">\n\t\t\t\t<span className=\"font-mono text-xs font-medium text-muted-foreground\">{displayLabel}</span>\n\t\t\t\t<CodeBlockCopy code={code} />\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\tdata-shiki=\"\"\n\t\t\t\tclassName=\"overflow-x-auto p-4 font-mono text-sm [&_pre]:!bg-transparent\"\n\t\t\t\t// biome-ignore lint/security/noDangerouslySetInnerHtml: Shiki output is trusted server-rendered HTML\n\t\t\t\tdangerouslySetInnerHTML={{ __html: html }}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nexport { CodeBlock };\n"]}
|
package/dist/collapsible.d.ts
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/** Root container controlling the expanded state of the content. */
|
|
5
|
-
declare const Collapsible: React.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
-
/** The element that toggles the Collapsible open/closed. */
|
|
7
|
-
declare const CollapsibleTrigger: React.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
-
/** The collapsible content shown/hidden by the trigger. */
|
|
9
|
-
declare const CollapsibleContent: React.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
-
|
|
11
|
-
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
1
|
+
export { Collapsible_alias_1 as Collapsible } from './_tsup-dts-rollup.js';
|
|
2
|
+
export { CollapsibleTrigger_alias_1 as CollapsibleTrigger } from './_tsup-dts-rollup.js';
|
|
3
|
+
export { CollapsibleContent_alias_1 as CollapsibleContent } from './_tsup-dts-rollup.js';
|
package/dist/color-picker.d.ts
CHANGED
|
@@ -1,44 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/** Props for the ColorPicker component. */
|
|
4
|
-
interface ColorPickerProps {
|
|
5
|
-
/**
|
|
6
|
-
* Current color as an HSL triplet string (`"<H> <S>% <L>%"`, e.g. `"240 5.9% 10%"`).
|
|
7
|
-
* Match the format used by `@hex-core/tokens`; round-trip safe.
|
|
8
|
-
*/
|
|
9
|
-
value: string;
|
|
10
|
-
/**
|
|
11
|
-
* Called with the next HSL triplet whenever the user drags a slider or commits a valid hex value.
|
|
12
|
-
* Not called for invalid hex input — the picker keeps the prior value until the input parses cleanly.
|
|
13
|
-
*/
|
|
14
|
-
onChange: (value: string) => void;
|
|
15
|
-
/**
|
|
16
|
-
* Disable interaction. Native `disabled` attribute is set on the trigger so the
|
|
17
|
-
* popover doesn't open via mouse or keyboard activation. Tab focus still lands
|
|
18
|
-
* on the trigger per browser defaults; if you want to fully remove it from the
|
|
19
|
-
* tab order, wrap in a parent that handles `tabIndex` accordingly.
|
|
20
|
-
*/
|
|
21
|
-
disabled?: boolean;
|
|
22
|
-
/** Accessible name for the trigger button (defaults to "Pick color"). */
|
|
23
|
-
"aria-label"?: string;
|
|
24
|
-
/** Additional class names merged onto the trigger. */
|
|
25
|
-
className?: string;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* HSL-native color picker. Edits an HSL triplet directly via three sliders
|
|
29
|
-
* (H/S/L), with a hex input as a display adapter.
|
|
30
|
-
*
|
|
31
|
-
* Round-trip safe: triplet → hex → triplet preserves the slider state because
|
|
32
|
-
* sliders are the source of truth and hex updates them only when valid.
|
|
33
|
-
*
|
|
34
|
-
* @param props - Controlled component; `value` and `onChange` are required.
|
|
35
|
-
* @returns A trigger button that opens a popover with H/S/L sliders + hex input.
|
|
36
|
-
* @example
|
|
37
|
-
* ```tsx
|
|
38
|
-
* const [color, setColor] = React.useState("240 5.9% 10%");
|
|
39
|
-
* <ColorPicker value={color} onChange={setColor} aria-label="Primary color" />
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
|
-
declare function ColorPicker({ value, onChange, disabled, "aria-label": ariaLabel, className, }: ColorPickerProps): react_jsx_runtime.JSX.Element;
|
|
43
|
-
|
|
44
|
-
export { ColorPicker, type ColorPickerProps };
|
|
1
|
+
export { ColorPickerProps_alias_1 as ColorPickerProps } from './_tsup-dts-rollup.js';
|
|
2
|
+
export { ColorPicker_alias_1 as ColorPicker } from './_tsup-dts-rollup.js';
|
package/dist/combobox.d.ts
CHANGED
|
@@ -1,45 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/** The value returned from onChange (stable, unique). */
|
|
5
|
-
value: string;
|
|
6
|
-
/** The display label shown in the list and the trigger. */
|
|
7
|
-
label: string;
|
|
8
|
-
/** Mark as non-selectable. */
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
}
|
|
11
|
-
interface ComboboxProps {
|
|
12
|
-
/** The list of selectable options. */
|
|
13
|
-
options: ComboboxOption[];
|
|
14
|
-
/** Controlled selected value. */
|
|
15
|
-
value?: string;
|
|
16
|
-
/** Fired when the user picks an option: (value: string) => void */
|
|
17
|
-
onChange?: (value: string) => void;
|
|
18
|
-
/** Text shown on the trigger when nothing is selected. */
|
|
19
|
-
placeholder?: string;
|
|
20
|
-
/** Input placeholder inside the popover list. */
|
|
21
|
-
searchPlaceholder?: string;
|
|
22
|
-
/** Text shown when no options match the search. */
|
|
23
|
-
emptyText?: string;
|
|
24
|
-
/** Disable the trigger. */
|
|
25
|
-
disabled?: boolean;
|
|
26
|
-
/** Extra class names on the trigger button. */
|
|
27
|
-
className?: string;
|
|
28
|
-
/** Accessible label for the trigger (required when no adjacent visible label). */
|
|
29
|
-
"aria-label"?: string;
|
|
30
|
-
/** Id of an external visible label that names this combobox. */
|
|
31
|
-
"aria-labelledby"?: string;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Searchable select input built on Command + Popover.
|
|
35
|
-
*
|
|
36
|
-
* Pass `options` with `{ value, label }` shape. The selected label is shown on
|
|
37
|
-
* the trigger; the popover contains a CommandInput and filtered CommandList.
|
|
38
|
-
* @returns A trigger button that opens a filtered option list.
|
|
39
|
-
*/
|
|
40
|
-
declare function Combobox({ options, value, onChange, placeholder, searchPlaceholder, emptyText, disabled, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, }: ComboboxProps): react_jsx_runtime.JSX.Element;
|
|
41
|
-
declare namespace Combobox {
|
|
42
|
-
var displayName: string;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export { Combobox, type ComboboxOption, type ComboboxProps };
|
|
1
|
+
export { Combobox_alias_1 as Combobox } from './_tsup-dts-rollup.js';
|
|
2
|
+
export { ComboboxOption_alias_1 as ComboboxOption } from './_tsup-dts-rollup.js';
|
|
3
|
+
export { ComboboxProps_alias_1 as ComboboxProps } from './_tsup-dts-rollup.js';
|
package/dist/command.d.ts
CHANGED
|
@@ -1,111 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
11
|
-
} & {
|
|
12
|
-
asChild?: boolean;
|
|
13
|
-
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
14
|
-
label?: string;
|
|
15
|
-
shouldFilter?: boolean;
|
|
16
|
-
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
17
|
-
defaultValue?: string;
|
|
18
|
-
value?: string;
|
|
19
|
-
onValueChange?: (value: string) => void;
|
|
20
|
-
loop?: boolean;
|
|
21
|
-
disablePointerSelection?: boolean;
|
|
22
|
-
vimBindings?: boolean;
|
|
23
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
-
interface CommandDialogProps extends React.ComponentPropsWithoutRef<typeof Dialog> {
|
|
25
|
-
/** Command children (CommandInput + CommandList + CommandItem, etc.) */
|
|
26
|
-
children: React.ReactNode;
|
|
27
|
-
/** Accessible title for the dialog (screen-reader only by default). */
|
|
28
|
-
title?: string;
|
|
29
|
-
/** Accessible description for the dialog (screen-reader only by default). */
|
|
30
|
-
description?: string;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Command menu rendered inside a Dialog — a ⌘K-style launcher.
|
|
34
|
-
* @param props - Forwarded to the underlying Dialog (open, onOpenChange, etc.)
|
|
35
|
-
* @returns A Dialog containing a Command menu.
|
|
36
|
-
*/
|
|
37
|
-
declare function CommandDialog({ title, description, children, ...props }: CommandDialogProps): react_jsx_runtime.JSX.Element;
|
|
38
|
-
/** Search input for the Command menu. Fires onValueChange as the user types. */
|
|
39
|
-
declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
|
|
40
|
-
ref?: React.Ref<HTMLInputElement>;
|
|
41
|
-
} & {
|
|
42
|
-
asChild?: boolean;
|
|
43
|
-
}, "asChild" | "key" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "type" | "value"> & {
|
|
44
|
-
value?: string;
|
|
45
|
-
onValueChange?: (search: string) => void;
|
|
46
|
-
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
47
|
-
/** Scrollable list that contains CommandGroup / CommandItem / CommandEmpty. */
|
|
48
|
-
declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
49
|
-
children?: React.ReactNode;
|
|
50
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
51
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
52
|
-
} & {
|
|
53
|
-
asChild?: boolean;
|
|
54
|
-
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
55
|
-
label?: string;
|
|
56
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
57
|
-
/** Rendered when no items match the current search. */
|
|
58
|
-
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
59
|
-
children?: React.ReactNode;
|
|
60
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
61
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
62
|
-
} & {
|
|
63
|
-
asChild?: boolean;
|
|
64
|
-
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
65
|
-
/** Logical group of items — renders a heading and filters as a unit. */
|
|
66
|
-
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
67
|
-
children?: React.ReactNode;
|
|
68
|
-
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
69
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
70
|
-
} & {
|
|
71
|
-
asChild?: boolean;
|
|
72
|
-
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "heading" | "value"> & {
|
|
73
|
-
heading?: React.ReactNode;
|
|
74
|
-
value?: string;
|
|
75
|
-
forceMount?: boolean;
|
|
76
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
77
|
-
/**
|
|
78
|
-
* Horizontal rule between groups. Renders as a presentational `<div>` (no role)
|
|
79
|
-
* so it can sit inside CommandList (role=listbox) without violating ARIA's
|
|
80
|
-
* required-children rule for listbox. The line is purely decorative — cmdk's
|
|
81
|
-
* built-in Separator hardcodes `role="separator"`, which axe rejects in this
|
|
82
|
-
* context, so we render the divider directly.
|
|
83
|
-
*
|
|
84
|
-
* The `data-cmdk-separator` attribute is preserved so existing CSS / test
|
|
85
|
-
* selectors that target cmdk's separator continue to match.
|
|
86
|
-
*/
|
|
87
|
-
declare const CommandSeparator: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
88
|
-
/** Selectable item. onSelect fires on Enter or click. */
|
|
89
|
-
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
90
|
-
children?: React.ReactNode;
|
|
91
|
-
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
92
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
93
|
-
} & {
|
|
94
|
-
asChild?: boolean;
|
|
95
|
-
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "onSelect" | "disabled" | "value"> & {
|
|
96
|
-
disabled?: boolean;
|
|
97
|
-
onSelect?: (value: string) => void;
|
|
98
|
-
value?: string;
|
|
99
|
-
keywords?: string[];
|
|
100
|
-
forceMount?: boolean;
|
|
101
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
102
|
-
/**
|
|
103
|
-
* Keyboard shortcut hint (e.g. '⌘K') aligned to the right of an item.
|
|
104
|
-
* @returns A muted inline span rendered at the end of a CommandItem.
|
|
105
|
-
*/
|
|
106
|
-
declare function CommandShortcut({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
|
|
107
|
-
declare namespace CommandShortcut {
|
|
108
|
-
var displayName: string;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
|
|
1
|
+
export { Command_alias_1 as Command } from './_tsup-dts-rollup.js';
|
|
2
|
+
export { CommandDialog_alias_1 as CommandDialog } from './_tsup-dts-rollup.js';
|
|
3
|
+
export { CommandInput_alias_1 as CommandInput } from './_tsup-dts-rollup.js';
|
|
4
|
+
export { CommandList_alias_1 as CommandList } from './_tsup-dts-rollup.js';
|
|
5
|
+
export { CommandEmpty_alias_1 as CommandEmpty } from './_tsup-dts-rollup.js';
|
|
6
|
+
export { CommandGroup_alias_1 as CommandGroup } from './_tsup-dts-rollup.js';
|
|
7
|
+
export { CommandItem_alias_1 as CommandItem } from './_tsup-dts-rollup.js';
|
|
8
|
+
export { CommandShortcut_alias_1 as CommandShortcut } from './_tsup-dts-rollup.js';
|
|
9
|
+
export { CommandSeparator_alias_1 as CommandSeparator } from './_tsup-dts-rollup.js';
|
package/dist/composer.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
|
+
import { twMerge } from 'tailwind-merge';
|
|
4
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
function cn(...inputs) {
|
|
7
|
+
return twMerge(clsx(inputs));
|
|
8
|
+
}
|
|
9
|
+
function Composer({
|
|
10
|
+
value,
|
|
11
|
+
onValueChange,
|
|
12
|
+
onSubmit,
|
|
13
|
+
disabled,
|
|
14
|
+
placeholder,
|
|
15
|
+
submitOnEnter = true,
|
|
16
|
+
textareaAriaLabel,
|
|
17
|
+
children,
|
|
18
|
+
className,
|
|
19
|
+
...rest
|
|
20
|
+
}) {
|
|
21
|
+
function trySubmit() {
|
|
22
|
+
const trimmed = value.trim();
|
|
23
|
+
if (!trimmed || disabled) return;
|
|
24
|
+
onSubmit(trimmed);
|
|
25
|
+
}
|
|
26
|
+
function handleKeyDown(event) {
|
|
27
|
+
if (!submitOnEnter) return;
|
|
28
|
+
if (event.key === "Enter" && !event.shiftKey && !event.nativeEvent.isComposing) {
|
|
29
|
+
event.preventDefault();
|
|
30
|
+
trySubmit();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function handleSubmit(event) {
|
|
34
|
+
event.preventDefault();
|
|
35
|
+
trySubmit();
|
|
36
|
+
}
|
|
37
|
+
return /* @__PURE__ */ jsxs(
|
|
38
|
+
"form",
|
|
39
|
+
{
|
|
40
|
+
...rest,
|
|
41
|
+
onSubmit: handleSubmit,
|
|
42
|
+
className: cn(
|
|
43
|
+
"flex items-end gap-2 rounded-lg border bg-background p-2",
|
|
44
|
+
"focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",
|
|
45
|
+
"transition-all duration-[var(--duration-normal,200ms)] ease-out",
|
|
46
|
+
className
|
|
47
|
+
),
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ jsx(
|
|
50
|
+
"textarea",
|
|
51
|
+
{
|
|
52
|
+
value,
|
|
53
|
+
onChange: (event) => onValueChange(event.target.value),
|
|
54
|
+
onKeyDown: handleKeyDown,
|
|
55
|
+
disabled,
|
|
56
|
+
placeholder,
|
|
57
|
+
"aria-label": textareaAriaLabel ?? placeholder ?? "Message",
|
|
58
|
+
rows: 1,
|
|
59
|
+
className: cn(
|
|
60
|
+
"flex-1 resize-none bg-transparent px-2 py-1.5 text-sm leading-6",
|
|
61
|
+
"placeholder:text-muted-foreground focus:outline-none",
|
|
62
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
63
|
+
"max-h-48 min-h-[2.25rem] overflow-y-auto"
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
children
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export { Composer };
|
|
74
|
+
//# sourceMappingURL=composer.js.map
|
|
75
|
+
//# sourceMappingURL=composer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts","../src/ai/composer/composer.tsx"],"names":[],"mappings":";;;;AAQO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACoCA,SAAS,QAAA,CAAS;AAAA,EACjB,KAAA;AAAA,EACA,aAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA,WAAA;AAAA,EACA,aAAA,GAAgB,IAAA;AAAA,EAChB,iBAAA;AAAA,EACA,QAAA;AAAA,EACA,SAAA;AAAA,EACA,GAAG;AACJ,CAAA,EAAkB;AACjB,EAAA,SAAS,SAAA,GAAY;AACpB,IAAA,MAAM,OAAA,GAAU,MAAM,IAAA,EAAK;AAC3B,IAAA,IAAI,CAAC,WAAW,QAAA,EAAU;AAC1B,IAAA,QAAA,CAAS,OAAO,CAAA;AAAA,EACjB;AAEA,EAAA,SAAS,cAAc,KAAA,EAAiD;AACvE,IAAA,IAAI,CAAC,aAAA,EAAe;AACpB,IAAA,IAAI,KAAA,CAAM,QAAQ,OAAA,IAAW,CAAC,MAAM,QAAA,IAAY,CAAC,KAAA,CAAM,WAAA,CAAY,WAAA,EAAa;AAC/E,MAAA,KAAA,CAAM,cAAA,EAAe;AACrB,MAAA,SAAA,EAAU;AAAA,IACX;AAAA,EACD;AAEA,EAAA,SAAS,aAAa,KAAA,EAAyC;AAC9D,IAAA,KAAA,CAAM,cAAA,EAAe;AACrB,IAAA,SAAA,EAAU;AAAA,EACX;AAEA,EAAA,uBACC,IAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,GAAG,IAAA;AAAA,MACJ,QAAA,EAAU,YAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACV,0DAAA;AAAA,QACA,uEAAA;AAAA,QACA,iEAAA;AAAA,QACA;AAAA,OACD;AAAA,MAEA,QAAA,EAAA;AAAA,wBAAA,GAAA;AAAA,UAAC,UAAA;AAAA,UAAA;AAAA,YACA,KAAA;AAAA,YACA,UAAU,CAAC,KAAA,KAAU,aAAA,CAAc,KAAA,CAAM,OAAO,KAAK,CAAA;AAAA,YACrD,SAAA,EAAW,aAAA;AAAA,YACX,QAAA;AAAA,YACA,WAAA;AAAA,YACA,YAAA,EAAY,qBAAqB,WAAA,IAAe,SAAA;AAAA,YAChD,IAAA,EAAM,CAAA;AAAA,YACN,SAAA,EAAW,EAAA;AAAA,cACV,iEAAA;AAAA,cACA,sDAAA;AAAA,cACA,iDAAA;AAAA,cACA;AAAA;AACD;AAAA,SACD;AAAA,QACC;AAAA;AAAA;AAAA,GACF;AAEF","file":"composer.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind CSS conflict resolution.\n * @param inputs - Class values (strings, arrays, objects) to merge\n * @returns A single merged class string with Tailwind conflicts resolved\n */\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","\"use client\";\n\nimport * as React from \"react\";\nimport { cn } from \"../../lib/utils.js\";\n\n/**\n * Multi-line text input + submission shell for chat composers. Headless on\n * data flow — `value`/`onValueChange` are required so the consumer keeps\n * input state wherever fits (a `useChat` hook, a parent form, local state).\n *\n * Submits on Enter (without Shift). Children render after the textarea —\n * the canonical place for attachment buttons + a send button.\n *\n * Spreads remaining props onto the underlying `<form>`, so consumers can\n * pass `aria-label`, `id`, `name`, `data-*`, and similar attributes.\n *\n * @example\n * <Composer\n * value={input}\n * onValueChange={setInput}\n * onSubmit={(v) => sendMessage(v)}\n * placeholder=\"Ask anything…\"\n * >\n * <Button type=\"submit\">Send</Button>\n * </Composer>\n */\nexport interface ComposerProps\n\textends Omit<React.FormHTMLAttributes<HTMLFormElement>, \"onSubmit\" | \"children\"> {\n\tvalue: string;\n\tonValueChange: (value: string) => void;\n\tonSubmit: (value: string) => void;\n\tdisabled?: boolean;\n\tplaceholder?: string;\n\t/** Submit on Enter without Shift. Default true. */\n\tsubmitOnEnter?: boolean;\n\t/** Accessible name for the textarea. Defaults to `placeholder` when set, else \"Message\". */\n\ttextareaAriaLabel?: string;\n\t/** Trailing slot — attachment buttons, send button, etc. */\n\tchildren?: React.ReactNode;\n}\n\n/**\n * Renders a chat composer with a textarea + slot for action buttons.\n * @param props - controlled value/handlers + slot children\n * @returns A form element with a textarea and trailing slot\n */\nfunction Composer({\n\tvalue,\n\tonValueChange,\n\tonSubmit,\n\tdisabled,\n\tplaceholder,\n\tsubmitOnEnter = true,\n\ttextareaAriaLabel,\n\tchildren,\n\tclassName,\n\t...rest\n}: ComposerProps) {\n\tfunction trySubmit() {\n\t\tconst trimmed = value.trim();\n\t\tif (!trimmed || disabled) return;\n\t\tonSubmit(trimmed);\n\t}\n\n\tfunction handleKeyDown(event: React.KeyboardEvent<HTMLTextAreaElement>) {\n\t\tif (!submitOnEnter) return;\n\t\tif (event.key === \"Enter\" && !event.shiftKey && !event.nativeEvent.isComposing) {\n\t\t\tevent.preventDefault();\n\t\t\ttrySubmit();\n\t\t}\n\t}\n\n\tfunction handleSubmit(event: React.FormEvent<HTMLFormElement>) {\n\t\tevent.preventDefault();\n\t\ttrySubmit();\n\t}\n\n\treturn (\n\t\t<form\n\t\t\t{...rest}\n\t\t\tonSubmit={handleSubmit}\n\t\t\tclassName={cn(\n\t\t\t\t\"flex items-end gap-2 rounded-lg border bg-background p-2\",\n\t\t\t\t\"focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2\",\n\t\t\t\t\"transition-all duration-[var(--duration-normal,200ms)] ease-out\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t<textarea\n\t\t\t\tvalue={value}\n\t\t\t\tonChange={(event) => onValueChange(event.target.value)}\n\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tplaceholder={placeholder}\n\t\t\t\taria-label={textareaAriaLabel ?? placeholder ?? \"Message\"}\n\t\t\t\trows={1}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex-1 resize-none bg-transparent px-2 py-1.5 text-sm leading-6\",\n\t\t\t\t\t\"placeholder:text-muted-foreground focus:outline-none\",\n\t\t\t\t\t\"disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\t\t\"max-h-48 min-h-[2.25rem] overflow-y-auto\",\n\t\t\t\t)}\n\t\t\t/>\n\t\t\t{children}\n\t\t</form>\n\t);\n}\n\nexport { Composer };\n"]}
|
package/dist/container.d.ts
CHANGED
|
@@ -1,41 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* CVA variants for Container — max-width wrapper bound to `--container-*` tokens.
|
|
8
|
-
* Variant names match token names (`sm`/`md`/`lg`/`xl`/`full`); `full` removes the clamp.
|
|
9
|
-
* Padding maps to `--space-*` tokens.
|
|
10
|
-
*/
|
|
11
|
-
declare const containerVariants: (props?: ({
|
|
12
|
-
size?: "sm" | "lg" | "md" | "xl" | "full" | null | undefined;
|
|
13
|
-
padding?: "none" | "sm" | "lg" | "md" | null | undefined;
|
|
14
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
15
|
-
/** Props for the Container component. */
|
|
16
|
-
interface ContainerProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof containerVariants> {
|
|
17
|
-
/**
|
|
18
|
-
* Render as a different element via Radix `Slot`. Pass `<Container asChild><main>...</main></Container>`
|
|
19
|
-
* to render the layout as a `<main>` (or `<section>`, `<article>`, etc.) and inherit landmark semantics.
|
|
20
|
-
*/
|
|
21
|
-
asChild?: boolean;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* A centered max-width wrapper for page content. Use to constrain reading-width sections.
|
|
25
|
-
* Pass `asChild` to render as a semantic landmark (`<main>`, `<section>`, etc.) instead of a plain `<div>`.
|
|
26
|
-
*
|
|
27
|
-
* @param props - Container props including `size`, `padding`, and optional `asChild`.
|
|
28
|
-
* @returns A wrapper element with `mx-auto`, max-width clamp, and optional horizontal padding.
|
|
29
|
-
* @example
|
|
30
|
-
* ```tsx
|
|
31
|
-
* <Container size="lg" padding="md" asChild>
|
|
32
|
-
* <main>
|
|
33
|
-
* <h1>Article title</h1>
|
|
34
|
-
* <p>Reading-width content...</p>
|
|
35
|
-
* </main>
|
|
36
|
-
* </Container>
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
|
-
declare function Container({ className, size, padding, asChild, ...props }: ContainerProps): react_jsx_runtime.JSX.Element;
|
|
40
|
-
|
|
41
|
-
export { Container, type ContainerProps, containerVariants };
|
|
1
|
+
export { ContainerProps_alias_1 as ContainerProps } from './_tsup-dts-rollup.js';
|
|
2
|
+
export { Container_alias_1 as Container } from './_tsup-dts-rollup.js';
|
|
3
|
+
export { containerVariants_alias_1 as containerVariants } from './_tsup-dts-rollup.js';
|
package/dist/context-menu.d.ts
CHANGED
|
@@ -1,37 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
/** Group for checkable radio items. */
|
|
14
|
-
declare const ContextMenuRadioGroup: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
-
/** The menu panel shown when the trigger is right-clicked. */
|
|
16
|
-
declare const ContextMenuContent: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
-
/** A clickable menu item. */
|
|
18
|
-
declare const ContextMenuItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
19
|
-
inset?: boolean;
|
|
20
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
-
/** A checkable menu item. */
|
|
22
|
-
declare const ContextMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
-
/** A radio menu item. */
|
|
24
|
-
declare const ContextMenuRadioItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
-
/** A non-interactive heading label. */
|
|
26
|
-
declare const ContextMenuLabel: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
27
|
-
inset?: boolean;
|
|
28
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
-
/** Horizontal divider. */
|
|
30
|
-
declare const ContextMenuSeparator: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
31
|
-
/**
|
|
32
|
-
* Right-aligned shortcut text (e.g. ⌘⇧N).
|
|
33
|
-
* @returns A span with muted typography
|
|
34
|
-
*/
|
|
35
|
-
declare function ContextMenuShortcut({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
|
|
36
|
-
|
|
37
|
-
export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuTrigger };
|
|
1
|
+
export { ContextMenu_alias_1 as ContextMenu } from './_tsup-dts-rollup.js';
|
|
2
|
+
export { ContextMenuTrigger_alias_1 as ContextMenuTrigger } from './_tsup-dts-rollup.js';
|
|
3
|
+
export { ContextMenuContent_alias_1 as ContextMenuContent } from './_tsup-dts-rollup.js';
|
|
4
|
+
export { ContextMenuItem_alias_1 as ContextMenuItem } from './_tsup-dts-rollup.js';
|
|
5
|
+
export { ContextMenuCheckboxItem_alias_1 as ContextMenuCheckboxItem } from './_tsup-dts-rollup.js';
|
|
6
|
+
export { ContextMenuRadioItem_alias_1 as ContextMenuRadioItem } from './_tsup-dts-rollup.js';
|
|
7
|
+
export { ContextMenuLabel_alias_1 as ContextMenuLabel } from './_tsup-dts-rollup.js';
|
|
8
|
+
export { ContextMenuSeparator_alias_1 as ContextMenuSeparator } from './_tsup-dts-rollup.js';
|
|
9
|
+
export { ContextMenuShortcut_alias_1 as ContextMenuShortcut } from './_tsup-dts-rollup.js';
|
|
10
|
+
export { ContextMenuGroup_alias_1 as ContextMenuGroup } from './_tsup-dts-rollup.js';
|
|
11
|
+
export { ContextMenuPortal_alias_1 as ContextMenuPortal } from './_tsup-dts-rollup.js';
|
|
12
|
+
export { ContextMenuRadioGroup_alias_1 as ContextMenuRadioGroup } from './_tsup-dts-rollup.js';
|
package/dist/data-table.d.ts
CHANGED
|
@@ -1,33 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { ColumnDef } from '@tanstack/react-table';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Generic DataTable wrapper that renders a TanStack Table model using Hex UI's
|
|
7
|
-
* Table primitives. Pass columns + data; use TanStack hooks for sorting,
|
|
8
|
-
* filtering, pagination, row-selection as needed.
|
|
9
|
-
* @template TData - Row data type. Cell value types are inferred per column by TanStack.
|
|
10
|
-
*/
|
|
11
|
-
interface DataTableProps<TData> {
|
|
12
|
-
columns: ColumnDef<TData, unknown>[];
|
|
13
|
-
data: TData[];
|
|
14
|
-
/**
|
|
15
|
-
* Visible caption rendered below the table. Announced by screen readers
|
|
16
|
-
* when the user enters the table. Provide either `caption` or `aria-label`.
|
|
17
|
-
*/
|
|
18
|
-
caption?: React.ReactNode;
|
|
19
|
-
/**
|
|
20
|
-
* Accessible label for the table when no visible caption is shown.
|
|
21
|
-
* Forwarded as `aria-label` on the underlying `<table>` element. Kebab-case
|
|
22
|
-
* to match the canonical ARIA prop convention used elsewhere in Hex UI.
|
|
23
|
-
*/
|
|
24
|
-
"aria-label"?: string;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Render a data-driven table from TanStack column definitions.
|
|
28
|
-
* @param props - Columns, data, and optional accessible labelling (`caption` or `aria-label`)
|
|
29
|
-
* @returns A styled Table rendered from the TanStack row model
|
|
30
|
-
*/
|
|
31
|
-
declare function DataTable<TData>({ columns, data, caption, "aria-label": ariaLabel, }: DataTableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
32
|
-
|
|
33
|
-
export { DataTable, type DataTableProps };
|
|
1
|
+
export { DataTable_alias_1 as DataTable } from './_tsup-dts-rollup.js';
|
|
2
|
+
export { DataTableProps_alias_1 as DataTableProps } from './_tsup-dts-rollup.js';
|
package/dist/date-picker.d.ts
CHANGED
|
@@ -1,43 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
interface DatePickerProps {
|
|
4
|
-
/** Controlled selected date. */
|
|
5
|
-
value?: Date;
|
|
6
|
-
/** Fired when the user picks a date in the calendar. */
|
|
7
|
-
onChange?: (date: Date | undefined) => void;
|
|
8
|
-
/** Placeholder shown when no date is selected. */
|
|
9
|
-
placeholder?: string;
|
|
10
|
-
/** date-fns format string for the trigger label. */
|
|
11
|
-
dateFormat?: string;
|
|
12
|
-
/** Disable the trigger. */
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
/** Extra class names on the trigger button. */
|
|
15
|
-
className?: string;
|
|
16
|
-
/** Accessible label for the trigger (required when no visible label is adjacent). */
|
|
17
|
-
"aria-label"?: string;
|
|
18
|
-
/**
|
|
19
|
-
* Caption layout forwarded to react-day-picker. Use `"dropdown"` (or
|
|
20
|
-
* `"dropdown-years"` / `"dropdown-months"`) to render native `<select>`
|
|
21
|
-
* navigation — useful for birth-date pickers and far-out years.
|
|
22
|
-
*
|
|
23
|
-
* Always pair `dropdown` layouts with explicit `startMonth` and `endMonth`;
|
|
24
|
-
* the RDP default span is ±100 years.
|
|
25
|
-
*/
|
|
26
|
-
captionLayout?: "label" | "dropdown" | "dropdown-months" | "dropdown-years";
|
|
27
|
-
/** Earliest month/year navigable in the calendar. Forwarded to react-day-picker. */
|
|
28
|
-
startMonth?: Date;
|
|
29
|
-
/** Latest month/year navigable in the calendar. Forwarded to react-day-picker. */
|
|
30
|
-
endMonth?: Date;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Date picker composed from Popover + Calendar + a styled trigger button.
|
|
34
|
-
*
|
|
35
|
-
* This is a minimal single-date picker. For multi/range, compose Calendar + Popover yourself.
|
|
36
|
-
* @returns A button that opens a single-date calendar popover.
|
|
37
|
-
*/
|
|
38
|
-
declare function DatePicker({ value, onChange, placeholder, dateFormat, disabled, className, "aria-label": ariaLabel, captionLayout, startMonth, endMonth, }: DatePickerProps): react_jsx_runtime.JSX.Element;
|
|
39
|
-
declare namespace DatePicker {
|
|
40
|
-
var displayName: string;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export { DatePicker, type DatePickerProps };
|
|
1
|
+
export { DatePicker_alias_1 as DatePicker } from './_tsup-dts-rollup.js';
|
|
2
|
+
export { DatePickerProps_alias_1 as DatePickerProps } from './_tsup-dts-rollup.js';
|
package/dist/dialog.d.ts
CHANGED
|
@@ -1,46 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
13
|
-
/** Dimmed backdrop rendered behind the dialog content. */
|
|
14
|
-
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
-
interface DialogContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
|
|
16
|
-
/**
|
|
17
|
-
* When `true` (the default), DialogContent caps its height at viewport-2rem
|
|
18
|
-
* and renders children inside a padded inner scroll container. The Close
|
|
19
|
-
* button stays anchored to the (non-scrolling) outer panel so it remains
|
|
20
|
-
* visible even when the user scrolls long content.
|
|
21
|
-
*
|
|
22
|
-
* Pass `scrollable={false}` to opt out — useful when the consumer manages
|
|
23
|
-
* its own scroll surface (e.g. CommandDialog defers scroll to cmdk's
|
|
24
|
-
* internal CommandList).
|
|
25
|
-
*/
|
|
26
|
-
scrollable?: boolean;
|
|
27
|
-
}
|
|
28
|
-
/** The dialog content panel, centered on the overlay. Includes a close button by default. */
|
|
29
|
-
declare const DialogContent: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Header container inside DialogContent; stacks title and description.
|
|
33
|
-
* @returns A div wrapping title/description with vertical rhythm
|
|
34
|
-
*/
|
|
35
|
-
declare function DialogHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
36
|
-
/**
|
|
37
|
-
* Footer container inside DialogContent; aligns action buttons.
|
|
38
|
-
* @returns A div that stacks buttons on mobile and right-aligns on desktop
|
|
39
|
-
*/
|
|
40
|
-
declare function DialogFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
41
|
-
/** Accessible dialog title; Radix wires it to aria-labelledby automatically. */
|
|
42
|
-
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
43
|
-
/** Accessible dialog description; Radix wires it to aria-describedby automatically. */
|
|
44
|
-
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
45
|
-
|
|
46
|
-
export { Dialog, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
1
|
+
export { DialogContentProps } from './_tsup-dts-rollup.js';
|
|
2
|
+
export { Dialog_alias_1 as Dialog } from './_tsup-dts-rollup.js';
|
|
3
|
+
export { DialogPortal_alias_1 as DialogPortal } from './_tsup-dts-rollup.js';
|
|
4
|
+
export { DialogOverlay_alias_1 as DialogOverlay } from './_tsup-dts-rollup.js';
|
|
5
|
+
export { DialogTrigger_alias_1 as DialogTrigger } from './_tsup-dts-rollup.js';
|
|
6
|
+
export { DialogClose_alias_1 as DialogClose } from './_tsup-dts-rollup.js';
|
|
7
|
+
export { DialogContent_alias_1 as DialogContent } from './_tsup-dts-rollup.js';
|
|
8
|
+
export { DialogHeader_alias_1 as DialogHeader } from './_tsup-dts-rollup.js';
|
|
9
|
+
export { DialogFooter_alias_1 as DialogFooter } from './_tsup-dts-rollup.js';
|
|
10
|
+
export { DialogTitle_alias_1 as DialogTitle } from './_tsup-dts-rollup.js';
|
|
11
|
+
export { DialogDescription_alias_1 as DialogDescription } from './_tsup-dts-rollup.js';
|