@talogic/react 0.0.0-stage → 0.6.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.
- package/README.md +106 -2
- package/app/app-shell.component.d.ts +59 -0
- package/app/command-shortcut.hook.d.ts +21 -0
- package/app/filter-bar.component.d.ts +38 -0
- package/app/form-section.component.d.ts +21 -0
- package/app/index.d.ts +14 -0
- package/app/page-header.component.d.ts +20 -0
- package/app/records-table.component.d.ts +38 -0
- package/app/sparkline.algorithm.d.ts +11 -0
- package/app/stat-card.component.d.ts +28 -0
- package/class-names/class-names.algorithm.d.ts +8 -0
- package/class-names/index.d.ts +1 -0
- package/desktop/flow-node.component.d.ts +25 -0
- package/desktop/index.d.ts +12 -0
- package/desktop/inspector.component.d.ts +29 -0
- package/desktop/status-bar.component.d.ts +17 -0
- package/desktop/timeline-lanes.component.d.ts +43 -0
- package/desktop/timeline.algorithm.d.ts +22 -0
- package/desktop/title-bar.component.d.ts +24 -0
- package/fonts.css +4 -0
- package/index.d.ts +17 -0
- package/index.js +3495 -0
- package/index.js.map +1 -0
- package/mobile/bottom-nav.component.d.ts +23 -0
- package/mobile/capture-frame.component.d.ts +30 -0
- package/mobile/index.d.ts +6 -0
- package/mobile/record-button.component.d.ts +24 -0
- package/package.json +63 -4
- package/product/index.d.ts +8 -0
- package/product/product-catalogue.content.d.ts +16 -0
- package/product/product-logo.component.d.ts +17 -0
- package/product/product-switcher.component.d.ts +21 -0
- package/product/sidebar-brand.component.d.ts +18 -0
- package/status/index.d.ts +6 -0
- package/status/run-status.contract.d.ts +7 -0
- package/status/run-status.mapper.d.ts +18 -0
- package/status/status-badge.component.d.ts +14 -0
- package/talogic-react.css +2 -0
- package/timecode/index.d.ts +1 -0
- package/timecode/timecode.mapper.d.ts +17 -0
- package/tokens/apca-contrast.algorithm.d.ts +23 -0
- package/tokens/hue-fill.style.d.ts +6 -0
- package/tokens/index.d.ts +12 -0
- package/tokens/logo-color.algorithm.d.ts +21 -0
- package/tokens/palette.style.d.ts +6 -0
- package/tokens/product-hue.policy.d.ts +15 -0
- package/tokens/theme-attributes.mapper.d.ts +18 -0
- package/tokens/theme-root.component.d.ts +15 -0
- package/tokens/theme.contract.d.ts +34 -0
- package/tokens.css +949 -0
- package/ui/active-indicator/active-indicator.hook.d.ts +11 -0
- package/ui/active-indicator/active-indicator.recipe.d.ts +5 -0
- package/ui/active-indicator/index.d.ts +2 -0
- package/ui/avatar/avatar.component.d.ts +23 -0
- package/ui/avatar/index.d.ts +1 -0
- package/ui/badge/badge.component.d.ts +14 -0
- package/ui/badge/badge.recipe.d.ts +12 -0
- package/ui/badge/index.d.ts +4 -0
- package/ui/button/button.component.d.ts +16 -0
- package/ui/button/button.recipe.d.ts +11 -0
- package/ui/button/index.d.ts +4 -0
- package/ui/choice/checkbox.component.d.ts +11 -0
- package/ui/choice/index.d.ts +5 -0
- package/ui/choice/radio-group.component.d.ts +17 -0
- package/ui/choice/slider.component.d.ts +10 -0
- package/ui/choice/switch.component.d.ts +9 -0
- package/ui/choice/toggle-group.component.d.ts +17 -0
- package/ui/feedback/alert.component.d.ts +41 -0
- package/ui/feedback/empty-state.component.d.ts +19 -0
- package/ui/feedback/index.d.ts +8 -0
- package/ui/feedback/progress.component.d.ts +9 -0
- package/ui/feedback/skeleton.component.d.ts +8 -0
- package/ui/feedback/spinner.component.d.ts +10 -0
- package/ui/feedback/toaster.component.d.ts +10 -0
- package/ui/field/control.recipe.d.ts +5 -0
- package/ui/field/field-control.hook.d.ts +26 -0
- package/ui/field/field.component.d.ts +22 -0
- package/ui/field/index.d.ts +10 -0
- package/ui/field/input.component.d.ts +13 -0
- package/ui/field/label.component.d.ts +9 -0
- package/ui/field/select.component.d.ts +43 -0
- package/ui/field/textarea.component.d.ts +8 -0
- package/ui/index.d.ts +11 -0
- package/ui/layout/accordion.component.d.ts +30 -0
- package/ui/layout/card.component.d.ts +43 -0
- package/ui/layout/index.d.ts +7 -0
- package/ui/layout/kbd.component.d.ts +8 -0
- package/ui/layout/resizable.component.d.ts +23 -0
- package/ui/layout/scroll-area.component.d.ts +16 -0
- package/ui/layout/separator.component.d.ts +9 -0
- package/ui/layout/table.component.d.ts +50 -0
- package/ui/menu/command.component.d.ts +72 -0
- package/ui/menu/context-menu.component.d.ts +39 -0
- package/ui/menu/dropdown-menu.component.d.ts +57 -0
- package/ui/menu/index.d.ts +6 -0
- package/ui/menu/menu.recipe.d.ts +13 -0
- package/ui/navigation/breadcrumb.component.d.ts +45 -0
- package/ui/navigation/index.d.ts +11 -0
- package/ui/navigation/menu-icon.component.d.ts +18 -0
- package/ui/navigation/menubar.component.d.ts +48 -0
- package/ui/navigation/navigation-menu.component.d.ts +39 -0
- package/ui/navigation/pagination.component.d.ts +20 -0
- package/ui/navigation/stepper.component.d.ts +28 -0
- package/ui/navigation/tabs.component.d.ts +39 -0
- package/ui/overlay/alert-dialog.component.d.ts +42 -0
- package/ui/overlay/dialog.component.d.ts +48 -0
- package/ui/overlay/drawer.component.d.ts +29 -0
- package/ui/overlay/index.d.ts +9 -0
- package/ui/overlay/overlay.recipe.d.ts +18 -0
- package/ui/overlay/popover.component.d.ts +15 -0
- package/ui/overlay/sheet.component.d.ts +31 -0
- package/ui/overlay/tooltip.component.d.ts +20 -0
- package/ui/sidebar/index.d.ts +11 -0
- package/ui/sidebar/sidebar-context.hook.d.ts +29 -0
- package/ui/sidebar/sidebar-group.component.d.ts +26 -0
- package/ui/sidebar/sidebar-item.component.d.ts +35 -0
- package/ui/sidebar/sidebar-sheet.component.d.ts +25 -0
- package/ui/sidebar/sidebar.component.d.ts +80 -0
- package/ui/sidebar/sidebar.recipe.d.ts +8 -0
- package/web/cta-band.component.d.ts +20 -0
- package/web/faq.component.d.ts +19 -0
- package/web/feature-grid.component.d.ts +22 -0
- package/web/hero.component.d.ts +20 -0
- package/web/how-it-works.component.d.ts +22 -0
- package/web/index.d.ts +20 -0
- package/web/mobile-menu.component.d.ts +25 -0
- package/web/pricing-table.component.d.ts +37 -0
- package/web/product-card.component.d.ts +20 -0
- package/web/site-footer.component.d.ts +25 -0
- package/web/site-header.component.d.ts +32 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Follows the active item of a row (a tab, a segment) so one indicator can slide and resize under it. It writes
|
|
3
|
+
* `--indicator-left`, `--indicator-top`, `--indicator-width` and `--indicator-height` (in px, relative to the
|
|
4
|
+
* container) on the container whenever the active item changes or anything resizes, and sets `data-indicator` to
|
|
5
|
+
* `ready` after the first measure, so the indicator does not slide in from the corner on load. With no active item
|
|
6
|
+
* it sets `data-indicator` to `none`.
|
|
7
|
+
*
|
|
8
|
+
* @param selector - The CSS selector of the active item inside the container, such as `[data-state=active]`.
|
|
9
|
+
* @returns A ref callback for the container, which must be positioned (`relative`).
|
|
10
|
+
*/
|
|
11
|
+
export declare function useActiveIndicator<Container extends HTMLElement>(selector: string): (node: Container | null) => void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Avatar as AvatarPrimitive } from 'radix-ui';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* The shadcn/ui Avatar root: a 32 px circle. Photos crop to the circle.
|
|
5
|
+
*
|
|
6
|
+
* @param props - Radix Avatar root props.
|
|
7
|
+
* @returns The avatar.
|
|
8
|
+
*/
|
|
9
|
+
export declare function Avatar({ className, ...props }: ComponentProps<typeof AvatarPrimitive.Root>): import("react").JSX.Element;
|
|
10
|
+
/**
|
|
11
|
+
* The photo of an {@link Avatar}. It shows only once it has loaded.
|
|
12
|
+
*
|
|
13
|
+
* @param props - Radix Avatar image props.
|
|
14
|
+
* @returns The image.
|
|
15
|
+
*/
|
|
16
|
+
export declare function AvatarImage({ className, ...props }: ComponentProps<typeof AvatarPrimitive.Image>): import("react").JSX.Element;
|
|
17
|
+
/**
|
|
18
|
+
* The fallback of an {@link Avatar}: initials on the brand-soft colour.
|
|
19
|
+
*
|
|
20
|
+
* @param props - Radix Avatar fallback props.
|
|
21
|
+
* @returns The fallback.
|
|
22
|
+
*/
|
|
23
|
+
export declare function AvatarFallback({ className, ...props }: ComponentProps<typeof AvatarPrimitive.Fallback>): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Avatar, AvatarFallback, AvatarImage } from './avatar.component';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
import { type BadgeVariants } from './badge.recipe';
|
|
3
|
+
/** Props of {@link Badge}. */
|
|
4
|
+
export interface BadgeProps extends ComponentProps<'span'>, BadgeVariants {
|
|
5
|
+
/** Shows a dot in the current colour before the label, for a live status. */
|
|
6
|
+
dot?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The shadcn/ui Badge: a short label or status.
|
|
10
|
+
*
|
|
11
|
+
* @param props - Variant, `dot` and any `span` props.
|
|
12
|
+
* @returns The badge.
|
|
13
|
+
*/
|
|
14
|
+
export declare function Badge({ className, variant, dot, children, ...props }: BadgeProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
/**
|
|
3
|
+
* The Badge recipe. Status variants (success, warning, danger, info) are the same in every product.
|
|
4
|
+
* A status badge always has a word beside the colour, because some product accents share a hue with a status.
|
|
5
|
+
*/
|
|
6
|
+
export declare const badgeVariants: (props?: ({
|
|
7
|
+
variant?: "default" | "secondary" | "outline" | "brand" | "success" | "warning" | "danger" | "info" | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
|
+
/** The variant option of {@link badgeVariants}. */
|
|
10
|
+
export type BadgeVariants = VariantProps<typeof badgeVariants>;
|
|
11
|
+
/** A badge variant. */
|
|
12
|
+
export type BadgeVariant = NonNullable<BadgeVariants['variant']>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
import { type ButtonVariants } from './button.recipe';
|
|
3
|
+
/** Props of {@link Button}. */
|
|
4
|
+
export interface ButtonProps extends ComponentProps<'button'>, ButtonVariants {
|
|
5
|
+
/** Renders the child element (a link, for example) with the button's styles. */
|
|
6
|
+
asChild?: boolean;
|
|
7
|
+
/** Shows a spinner, sets `aria-busy` and disables the button. The label stays, so the width does not jump. */
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The shadcn/ui Button. Use one primary button per view.
|
|
12
|
+
*
|
|
13
|
+
* @param props - Variant, size, `asChild`, `loading` and any `button` props.
|
|
14
|
+
* @returns The button.
|
|
15
|
+
*/
|
|
16
|
+
export declare function Button({ className, variant, size, asChild, loading, disabled, children, ...props }: ButtonProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
/**
|
|
3
|
+
* The Button recipe. Sizes read the surface density (`--control-h`, `--control-px`, `--control-fs`), so the same
|
|
4
|
+
* button is 44 px on the web, 36 px in an app, 28 px on desktop and 48 px on mobile.
|
|
5
|
+
*/
|
|
6
|
+
export declare const buttonVariants: (props?: ({
|
|
7
|
+
variant?: "link" | "default" | "secondary" | "outline" | "ghost" | "destructive" | null | undefined;
|
|
8
|
+
size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
|
+
/** The variant and size options of {@link buttonVariants}. */
|
|
11
|
+
export type ButtonVariants = VariantProps<typeof buttonVariants>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Checkbox as CheckboxPrimitive } from 'radix-ui';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* The shadcn/ui Checkbox: 16 px, primary fill when checked. Checking draws the tick from its short end. Going to the
|
|
5
|
+
* indeterminate state undraws the tick while the dash draws across, and clearing undraws the mark while the fill
|
|
6
|
+
* fades. Reduced motion changes at once.
|
|
7
|
+
*
|
|
8
|
+
* @param props - Radix Checkbox props.
|
|
9
|
+
* @returns The checkbox.
|
|
10
|
+
*/
|
|
11
|
+
export declare function Checkbox({ className, ...props }: ComponentProps<typeof CheckboxPrimitive.Root>): import("react").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { Checkbox } from './checkbox.component';
|
|
2
|
+
export { RadioGroup, RadioGroupItem } from './radio-group.component';
|
|
3
|
+
export { Slider } from './slider.component';
|
|
4
|
+
export { Switch } from './switch.component';
|
|
5
|
+
export { ToggleGroup, ToggleGroupItem } from './toggle-group.component';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RadioGroup as RadioGroupPrimitive } from 'radix-ui';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* The shadcn/ui RadioGroup root.
|
|
5
|
+
*
|
|
6
|
+
* @param props - Radix RadioGroup root props.
|
|
7
|
+
* @returns The group.
|
|
8
|
+
*/
|
|
9
|
+
export declare function RadioGroup({ className, ...props }: ComponentProps<typeof RadioGroupPrimitive.Root>): import("react").JSX.Element;
|
|
10
|
+
/**
|
|
11
|
+
* One option of a {@link RadioGroup}: a 16 px circle with a dot when selected. The dot and the fill fade in on the
|
|
12
|
+
* chosen option while they fade out on the one before.
|
|
13
|
+
*
|
|
14
|
+
* @param props - Radix RadioGroup item props.
|
|
15
|
+
* @returns The radio.
|
|
16
|
+
*/
|
|
17
|
+
export declare function RadioGroupItem({ className, ...props }: ComponentProps<typeof RadioGroupPrimitive.Item>): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Slider as SliderPrimitive } from 'radix-ui';
|
|
2
|
+
import { type ComponentProps } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* The shadcn/ui Slider, with one thumb per value. A click on the track glides the thumb and the fill to that point;
|
|
5
|
+
* a drag follows the pointer at once. Give it an `aria-label` or label it with a {@link Label}.
|
|
6
|
+
*
|
|
7
|
+
* @param props - Radix Slider props.
|
|
8
|
+
* @returns The slider.
|
|
9
|
+
*/
|
|
10
|
+
export declare function Slider({ className, value, defaultValue, min, max, onPointerDown, onPointerMove, onPointerUp, ...props }: ComponentProps<typeof SliderPrimitive.Root>): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Switch as SwitchPrimitive } from 'radix-ui';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* The shadcn/ui Switch: 36 by 20 px, primary when on.
|
|
5
|
+
*
|
|
6
|
+
* @param props - Radix Switch props.
|
|
7
|
+
* @returns The switch.
|
|
8
|
+
*/
|
|
9
|
+
export declare function Switch({ className, ...props }: ComponentProps<typeof SwitchPrimitive.Root>): import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ToggleGroup as ToggleGroupPrimitive } from 'radix-ui';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* The shadcn/ui ToggleGroup, drawn as a segmented control on the muted colour. With `type='single'`, one raised
|
|
5
|
+
* background slides to the pressed segment and takes its width; with `type='multiple'`, each pressed segment lifts.
|
|
6
|
+
*
|
|
7
|
+
* @param props - Radix ToggleGroup root props (`type` is `single` or `multiple`).
|
|
8
|
+
* @returns The group.
|
|
9
|
+
*/
|
|
10
|
+
export declare function ToggleGroup({ className, children, ...props }: ComponentProps<typeof ToggleGroupPrimitive.Root>): import("react").JSX.Element;
|
|
11
|
+
/**
|
|
12
|
+
* One segment of a {@link ToggleGroup}. The pressed segment sits on the raised background.
|
|
13
|
+
*
|
|
14
|
+
* @param props - Radix ToggleGroup item props.
|
|
15
|
+
* @returns The segment.
|
|
16
|
+
*/
|
|
17
|
+
export declare function ToggleGroupItem({ className, ...props }: ComponentProps<typeof ToggleGroupPrimitive.Item>): import("react").JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
declare const tones: {
|
|
3
|
+
readonly info: {
|
|
4
|
+
readonly box: "border-border bg-card";
|
|
5
|
+
readonly icon: "text-info";
|
|
6
|
+
readonly Icon: import("lucide-react").LucideIcon;
|
|
7
|
+
};
|
|
8
|
+
readonly success: {
|
|
9
|
+
readonly box: "border-border bg-card";
|
|
10
|
+
readonly icon: "text-success";
|
|
11
|
+
readonly Icon: import("lucide-react").LucideIcon;
|
|
12
|
+
};
|
|
13
|
+
readonly warning: {
|
|
14
|
+
readonly box: "border-[color-mix(in_oklab,var(--warning)_35%,var(--border))] bg-warning-soft";
|
|
15
|
+
readonly icon: "text-warning";
|
|
16
|
+
readonly Icon: import("lucide-react").LucideIcon;
|
|
17
|
+
};
|
|
18
|
+
readonly danger: {
|
|
19
|
+
readonly box: "border-[color-mix(in_oklab,var(--destructive)_40%,var(--border))] bg-destructive-soft";
|
|
20
|
+
readonly icon: "text-destructive";
|
|
21
|
+
readonly Icon: import("lucide-react").LucideIcon;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
/** Props of {@link Alert}. */
|
|
25
|
+
export interface AlertProps extends Omit<ComponentProps<'div'>, 'title'> {
|
|
26
|
+
/** The tone. It sets the icon and colour; the title says what happened. */
|
|
27
|
+
tone?: keyof typeof tones;
|
|
28
|
+
/** A short title, such as "Run failed". */
|
|
29
|
+
title: ReactNode;
|
|
30
|
+
/** Replaces the tone's icon. */
|
|
31
|
+
icon?: ReactNode;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The shadcn/ui Alert: an inline message with an icon, a title and a description. Danger and warning
|
|
35
|
+
* alerts are announced at once (`role="alert"`); info and success are polite (`role="status"`).
|
|
36
|
+
*
|
|
37
|
+
* @param props - Tone, title, optional icon, the description as children, and any `div` props.
|
|
38
|
+
* @returns The alert.
|
|
39
|
+
*/
|
|
40
|
+
export declare function Alert({ tone, title, icon, children, className, ...props }: AlertProps): import("react").JSX.Element;
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
/** Props of {@link EmptyState}. */
|
|
3
|
+
export interface EmptyStateProps extends Omit<ComponentProps<'div'>, 'title'> {
|
|
4
|
+
/** What is missing, such as "No schedules yet". */
|
|
5
|
+
title: ReactNode;
|
|
6
|
+
/** What the user gets by adding one. */
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
/** The icon in the brand-soft tile. Default a plus. */
|
|
9
|
+
icon?: ReactNode;
|
|
10
|
+
/** The action that fills the space, usually one small primary button. */
|
|
11
|
+
action?: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The Empty pattern: a dashed box with an icon tile, a title, a sentence and one action.
|
|
15
|
+
*
|
|
16
|
+
* @param props - Title, description, icon, action and any `div` props.
|
|
17
|
+
* @returns The empty state.
|
|
18
|
+
*/
|
|
19
|
+
export declare function EmptyState({ title, description, icon, action, className, ...props }: EmptyStateProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { Alert } from './alert.component';
|
|
2
|
+
export type { AlertProps } from './alert.component';
|
|
3
|
+
export { EmptyState } from './empty-state.component';
|
|
4
|
+
export type { EmptyStateProps } from './empty-state.component';
|
|
5
|
+
export { Progress } from './progress.component';
|
|
6
|
+
export { Skeleton } from './skeleton.component';
|
|
7
|
+
export { Spinner } from './spinner.component';
|
|
8
|
+
export { Toaster } from './toaster.component';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Progress as ProgressPrimitive } from 'radix-ui';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* The shadcn/ui Progress bar: 6 px, brand fill on the muted track. Give it an `aria-label`.
|
|
5
|
+
*
|
|
6
|
+
* @param props - `value` from 0 to `max` (default 100) and Radix Progress props.
|
|
7
|
+
* @returns The progress bar.
|
|
8
|
+
*/
|
|
9
|
+
export declare function Progress({ className, value, max, ...props }: ComponentProps<typeof ProgressPrimitive.Root>): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The shadcn/ui Skeleton: a placeholder block. Skeletons copy the real layout, so size them like the content.
|
|
4
|
+
*
|
|
5
|
+
* @param props - Any `div` props; set the size with classes.
|
|
6
|
+
* @returns The placeholder.
|
|
7
|
+
*/
|
|
8
|
+
export declare function Skeleton({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The shadcn/ui Spinner. Show text beside it for any wait over 400 ms.
|
|
4
|
+
*
|
|
5
|
+
* @param props - `label` (the accessible name, default "Loading") and any `svg` props.
|
|
6
|
+
* @returns The spinner.
|
|
7
|
+
*/
|
|
8
|
+
export declare function Spinner({ className, label, ...props }: ComponentProps<'svg'> & {
|
|
9
|
+
label?: string;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
import { Toaster as Sonner } from 'sonner';
|
|
3
|
+
/**
|
|
4
|
+
* The shadcn/ui Toaster (Sonner), drawn with the Talogic tokens: popover colours, large elevation, 10 px radius.
|
|
5
|
+
* Mount one per app, then call `toast()` from `sonner`.
|
|
6
|
+
*
|
|
7
|
+
* @param props - Sonner Toaster props.
|
|
8
|
+
* @returns The toast region.
|
|
9
|
+
*/
|
|
10
|
+
export declare function Toaster(props: ComponentProps<typeof Sonner>): import("react").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type AriaAttributes } from 'react';
|
|
2
|
+
/** What a {@link Field} tells the control inside it. */
|
|
3
|
+
export interface FieldControlState {
|
|
4
|
+
/** The control's id, which the field's label points at. */
|
|
5
|
+
id: string;
|
|
6
|
+
/** Ids of the hint and the error, for `aria-describedby`. Empty when the field has neither. */
|
|
7
|
+
describedBy: string;
|
|
8
|
+
/** True when the field shows an error. */
|
|
9
|
+
invalid: boolean;
|
|
10
|
+
}
|
|
11
|
+
/** The context a {@link Field} provides. Null outside a field. */
|
|
12
|
+
export declare const FieldControlContext: import("react").Context<FieldControlState | null>;
|
|
13
|
+
/** The ARIA wiring a control spreads on itself. */
|
|
14
|
+
export interface FieldControlProps {
|
|
15
|
+
'id'?: string;
|
|
16
|
+
'aria-describedby'?: string;
|
|
17
|
+
'aria-invalid'?: AriaAttributes['aria-invalid'];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Wires a control to the field around it: its id, its description and its invalid state. A prop the caller
|
|
21
|
+
* passes wins over the field's value. Outside a field it returns the caller's props unchanged.
|
|
22
|
+
*
|
|
23
|
+
* @param own - The ARIA props the caller passed to the control.
|
|
24
|
+
* @returns The props to spread on the control element.
|
|
25
|
+
*/
|
|
26
|
+
export declare function useFieldControl(own?: FieldControlProps): FieldControlProps;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/** Props of {@link Field}. */
|
|
3
|
+
export interface FieldProps {
|
|
4
|
+
/** The visible label. */
|
|
5
|
+
label: ReactNode;
|
|
6
|
+
/** Helper copy under the control. */
|
|
7
|
+
hint?: ReactNode;
|
|
8
|
+
/** An error under the control. It marks the control invalid and replaces nothing: the hint stays. */
|
|
9
|
+
error?: ReactNode;
|
|
10
|
+
/** The control's id. A stable id is made when it is not given. */
|
|
11
|
+
id?: string;
|
|
12
|
+
/** The control: an Input, Textarea or SelectTrigger, which wire themselves to the field. */
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A labelled form field: label, control, hint and error, with the ARIA wiring done for the control.
|
|
18
|
+
*
|
|
19
|
+
* @param props - Label, hint, error, optional id and the control.
|
|
20
|
+
* @returns The field.
|
|
21
|
+
*/
|
|
22
|
+
export declare function Field({ label, hint, error, id, children, className }: FieldProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { controlClassName } from './control.recipe';
|
|
2
|
+
export { Field } from './field.component';
|
|
3
|
+
export type { FieldProps } from './field.component';
|
|
4
|
+
export { useFieldControl } from './field-control.hook';
|
|
5
|
+
export type { FieldControlProps } from './field-control.hook';
|
|
6
|
+
export { Input } from './input.component';
|
|
7
|
+
export type { InputProps } from './input.component';
|
|
8
|
+
export { Label } from './label.component';
|
|
9
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue } from './select.component';
|
|
10
|
+
export { Textarea } from './textarea.component';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
/** Props of {@link Input}. */
|
|
3
|
+
export interface InputProps extends ComponentProps<'input'> {
|
|
4
|
+
/** An icon inside the start of the input, such as a search glass. It is decorative. */
|
|
5
|
+
startIcon?: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The shadcn/ui Input. Inside a {@link Field} it takes the field's id, description and invalid state.
|
|
9
|
+
*
|
|
10
|
+
* @param props - `startIcon` and any `input` props.
|
|
11
|
+
* @returns The input, wrapped when it has an icon.
|
|
12
|
+
*/
|
|
13
|
+
export declare function Input({ className, startIcon, type, ...props }: InputProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Label as LabelPrimitive } from 'radix-ui';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* The shadcn/ui Label: 13 px, medium weight.
|
|
5
|
+
*
|
|
6
|
+
* @param props - Radix Label props.
|
|
7
|
+
* @returns The label.
|
|
8
|
+
*/
|
|
9
|
+
export declare function Label({ className, ...props }: ComponentProps<typeof LabelPrimitive.Root>): import("react").JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Select as SelectPrimitive } from 'radix-ui';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
/** The shadcn/ui Select root (Radix). */
|
|
4
|
+
export declare const Select: import("react").FC<SelectPrimitive.SelectProps>;
|
|
5
|
+
/** A group of {@link SelectItem}s. */
|
|
6
|
+
export declare const SelectGroup: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
/** The selected value inside a {@link SelectTrigger}. */
|
|
8
|
+
export declare const SelectValue: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
9
|
+
/**
|
|
10
|
+
* The button that opens a {@link Select}. Inside a {@link Field} it takes the field's id and state.
|
|
11
|
+
*
|
|
12
|
+
* @param props - Radix Select trigger props.
|
|
13
|
+
* @returns The trigger.
|
|
14
|
+
*/
|
|
15
|
+
export declare function SelectTrigger({ className, children, ...props }: ComponentProps<typeof SelectPrimitive.Trigger>): import("react").JSX.Element;
|
|
16
|
+
/**
|
|
17
|
+
* The list of a {@link Select}, in a portal, as wide as the trigger.
|
|
18
|
+
*
|
|
19
|
+
* @param props - Radix Select content props.
|
|
20
|
+
* @returns The list.
|
|
21
|
+
*/
|
|
22
|
+
export declare function SelectContent({ className, children, position, ...props }: ComponentProps<typeof SelectPrimitive.Content>): import("react").JSX.Element;
|
|
23
|
+
/**
|
|
24
|
+
* The heading of a {@link SelectGroup}.
|
|
25
|
+
*
|
|
26
|
+
* @param props - Radix Select label props.
|
|
27
|
+
* @returns The heading.
|
|
28
|
+
*/
|
|
29
|
+
export declare function SelectLabel({ className, ...props }: ComponentProps<typeof SelectPrimitive.Label>): import("react").JSX.Element;
|
|
30
|
+
/**
|
|
31
|
+
* An option of a {@link Select}, with a check mark when selected.
|
|
32
|
+
*
|
|
33
|
+
* @param props - Radix Select item props.
|
|
34
|
+
* @returns The option.
|
|
35
|
+
*/
|
|
36
|
+
export declare function SelectItem({ className, children, ...props }: ComponentProps<typeof SelectPrimitive.Item>): import("react").JSX.Element;
|
|
37
|
+
/**
|
|
38
|
+
* A line between groups of a {@link Select}.
|
|
39
|
+
*
|
|
40
|
+
* @param props - Radix Select separator props.
|
|
41
|
+
* @returns The separator.
|
|
42
|
+
*/
|
|
43
|
+
export declare function SelectSeparator({ className, ...props }: ComponentProps<typeof SelectPrimitive.Separator>): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The shadcn/ui Textarea. Inside a {@link Field} it takes the field's id, description and invalid state.
|
|
4
|
+
*
|
|
5
|
+
* @param props - Any `textarea` props.
|
|
6
|
+
* @returns The textarea.
|
|
7
|
+
*/
|
|
8
|
+
export declare function Textarea({ className, ...props }: ComponentProps<'textarea'>): import("react").JSX.Element;
|
package/ui/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './avatar';
|
|
2
|
+
export * from './badge';
|
|
3
|
+
export * from './button';
|
|
4
|
+
export * from './choice';
|
|
5
|
+
export * from './feedback';
|
|
6
|
+
export * from './field';
|
|
7
|
+
export * from './layout';
|
|
8
|
+
export * from './menu';
|
|
9
|
+
export * from './navigation';
|
|
10
|
+
export * from './overlay';
|
|
11
|
+
export * from './sidebar';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Accordion as AccordionPrimitive } from 'radix-ui';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* The shadcn/ui Accordion root, for FAQs and long settings.
|
|
5
|
+
*
|
|
6
|
+
* @param props - Radix Accordion root props (`type` is `single` or `multiple`).
|
|
7
|
+
* @returns The accordion.
|
|
8
|
+
*/
|
|
9
|
+
export declare function Accordion({ className, ...props }: ComponentProps<typeof AccordionPrimitive.Root>): import("react").JSX.Element;
|
|
10
|
+
/**
|
|
11
|
+
* One question and answer.
|
|
12
|
+
*
|
|
13
|
+
* @param props - Radix Accordion item props.
|
|
14
|
+
* @returns The item.
|
|
15
|
+
*/
|
|
16
|
+
export declare function AccordionItem({ className, ...props }: ComponentProps<typeof AccordionPrimitive.Item>): import("react").JSX.Element;
|
|
17
|
+
/**
|
|
18
|
+
* The question: a full-width button with a plus that turns into a minus as the answer opens.
|
|
19
|
+
*
|
|
20
|
+
* @param props - Radix Accordion trigger props.
|
|
21
|
+
* @returns The heading and its button.
|
|
22
|
+
*/
|
|
23
|
+
export declare function AccordionTrigger({ className, children, ...props }: ComponentProps<typeof AccordionPrimitive.Trigger>): import("react").JSX.Element;
|
|
24
|
+
/**
|
|
25
|
+
* The answer. It uncovers to its own height while it fades in, and covers again on close.
|
|
26
|
+
*
|
|
27
|
+
* @param props - Radix Accordion content props.
|
|
28
|
+
* @returns The panel.
|
|
29
|
+
*/
|
|
30
|
+
export declare function AccordionContent({ className, children, ...props }: ComponentProps<typeof AccordionPrimitive.Content>): import("react").JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The shadcn/ui Card: card colours, a border, 14 px radius and the lowest elevation.
|
|
4
|
+
*
|
|
5
|
+
* @param props - Any `div` props.
|
|
6
|
+
* @returns The card.
|
|
7
|
+
*/
|
|
8
|
+
export declare function Card({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
9
|
+
/**
|
|
10
|
+
* The top of a {@link Card}: title, description and an optional action.
|
|
11
|
+
*
|
|
12
|
+
* @param props - Any `div` props.
|
|
13
|
+
* @returns The header.
|
|
14
|
+
*/
|
|
15
|
+
export declare function CardHeader({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
16
|
+
/**
|
|
17
|
+
* The title of a {@link Card}.
|
|
18
|
+
*
|
|
19
|
+
* @param props - Any `h3` props.
|
|
20
|
+
* @returns The title.
|
|
21
|
+
*/
|
|
22
|
+
export declare function CardTitle({ className, children, ...props }: ComponentProps<'h3'>): import("react").JSX.Element;
|
|
23
|
+
/**
|
|
24
|
+
* The description of a {@link Card}.
|
|
25
|
+
*
|
|
26
|
+
* @param props - Any `p` props.
|
|
27
|
+
* @returns The description.
|
|
28
|
+
*/
|
|
29
|
+
export declare function CardDescription({ className, ...props }: ComponentProps<'p'>): import("react").JSX.Element;
|
|
30
|
+
/**
|
|
31
|
+
* The body of a {@link Card}.
|
|
32
|
+
*
|
|
33
|
+
* @param props - Any `div` props.
|
|
34
|
+
* @returns The content.
|
|
35
|
+
*/
|
|
36
|
+
export declare function CardContent({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
37
|
+
/**
|
|
38
|
+
* The foot of a {@link Card}: muted, with a top border, pinned to the bottom.
|
|
39
|
+
*
|
|
40
|
+
* @param props - Any `div` props.
|
|
41
|
+
* @returns The footer.
|
|
42
|
+
*/
|
|
43
|
+
export declare function CardFooter({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from './accordion.component';
|
|
2
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from './card.component';
|
|
3
|
+
export { Kbd } from './kbd.component';
|
|
4
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup } from './resizable.component';
|
|
5
|
+
export { ScrollArea, ScrollBar } from './scroll-area.component';
|
|
6
|
+
export { Separator } from './separator.component';
|
|
7
|
+
export { Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow } from './table.component';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The shadcn/ui Kbd: one key, in Fira Code, with a heavier bottom border.
|
|
4
|
+
*
|
|
5
|
+
* @param props - Any `kbd` props.
|
|
6
|
+
* @returns The key.
|
|
7
|
+
*/
|
|
8
|
+
export declare function Kbd({ className, ...props }: ComponentProps<'kbd'>): import("react").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
import { Group, Panel, Separator } from 'react-resizable-panels';
|
|
3
|
+
/**
|
|
4
|
+
* The shadcn/ui Resizable group: panels the user can resize, for desktop sidebars and inspectors.
|
|
5
|
+
*
|
|
6
|
+
* @param props - react-resizable-panels Group props (`orientation`).
|
|
7
|
+
* @returns The panel group.
|
|
8
|
+
*/
|
|
9
|
+
export declare function ResizablePanelGroup({ className, ...props }: ComponentProps<typeof Group>): import("react").JSX.Element;
|
|
10
|
+
/**
|
|
11
|
+
* One panel of a {@link ResizablePanelGroup}.
|
|
12
|
+
*
|
|
13
|
+
* @param props - react-resizable-panels Panel props (`defaultSize`, `minSize`).
|
|
14
|
+
* @returns The panel.
|
|
15
|
+
*/
|
|
16
|
+
export declare function ResizablePanel(props: ComponentProps<typeof Panel>): import("react").JSX.Element;
|
|
17
|
+
/**
|
|
18
|
+
* The drag handle between two panels: a 1 px border line with a wider hit area.
|
|
19
|
+
*
|
|
20
|
+
* @param props - react-resizable-panels Separator props.
|
|
21
|
+
* @returns The handle.
|
|
22
|
+
*/
|
|
23
|
+
export declare function ResizableHandle({ className, ...props }: ComponentProps<typeof Separator>): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ScrollArea as ScrollAreaPrimitive } from 'radix-ui';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* The shadcn/ui ScrollArea: native scrolling with thin themed bars, for panels in apps and desktop.
|
|
5
|
+
*
|
|
6
|
+
* @param props - Radix ScrollArea root props.
|
|
7
|
+
* @returns The scroll area.
|
|
8
|
+
*/
|
|
9
|
+
export declare function ScrollArea({ className, children, ...props }: ComponentProps<typeof ScrollAreaPrimitive.Root>): import("react").JSX.Element;
|
|
10
|
+
/**
|
|
11
|
+
* One bar of a {@link ScrollArea}.
|
|
12
|
+
*
|
|
13
|
+
* @param props - Radix ScrollArea scrollbar props.
|
|
14
|
+
* @returns The bar.
|
|
15
|
+
*/
|
|
16
|
+
export declare function ScrollBar({ className, orientation, ...props }: ComponentProps<typeof ScrollAreaPrimitive.Scrollbar>): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Separator as SeparatorPrimitive } from 'radix-ui';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* The shadcn/ui Separator: a 1 px border-colour line. Decorative unless told otherwise.
|
|
5
|
+
*
|
|
6
|
+
* @param props - Radix Separator props (`orientation`, `decorative`).
|
|
7
|
+
* @returns The line.
|
|
8
|
+
*/
|
|
9
|
+
export declare function Separator({ className, orientation, decorative, ...props }: ComponentProps<typeof SeparatorPrimitive.Root>): import("react").JSX.Element;
|