@soygalo/ui 0.0.0-stage → 0.1.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/controls/Accordion.js +42 -0
- package/dist/controls/ActionMenu.js +64 -0
- package/dist/controls/AlertDialog.js +62 -0
- package/dist/controls/ChipGroup.js +90 -0
- package/dist/controls/Collapsible.js +6 -0
- package/dist/controls/Command.js +88 -0
- package/dist/controls/ConfirmDialog.js +42 -0
- package/dist/controls/Dialog.js +66 -0
- package/dist/controls/FilterPopover.js +161 -0
- package/dist/controls/Kbd.js +12 -0
- package/dist/controls/Popover.js +55 -0
- package/dist/controls/SegmentedControl.js +52 -0
- package/dist/controls/Sheet.js +123 -0
- package/dist/controls/Tooltip.js +15 -0
- package/dist/controls/overlay-container.js +20 -0
- package/dist/controls/return-focus.js +16 -0
- package/dist/controls.js +17 -0
- package/dist/data-attr.js +5 -0
- package/dist/data-display/Avatar.js +47 -0
- package/dist/data-display/Badge.js +88 -0
- package/dist/data-display/Board.js +73 -0
- package/dist/data-display/Card.js +141 -0
- package/dist/data-display/ChatBubble.js +44 -0
- package/dist/data-display/Code.js +32 -0
- package/dist/data-display/DataTable.js +114 -0
- package/dist/data-display/IconTile.js +60 -0
- package/dist/data-display/Item.js +128 -0
- package/dist/data-display/Overline.js +13 -0
- package/dist/data-display/Separator.js +19 -0
- package/dist/data-display/Stat.js +36 -0
- package/dist/data-display/TablePagination.js +98 -0
- package/dist/data-display/Timeline.js +58 -0
- package/dist/data-display/chart-colors.js +36 -0
- package/dist/data-display.js +16 -0
- package/dist/feedback/Callout.js +107 -0
- package/dist/feedback/FeedbackState.js +55 -0
- package/dist/feedback/LoadingState.js +24 -0
- package/dist/feedback/Progress.js +51 -0
- package/dist/feedback/ProgressRing.js +50 -0
- package/dist/feedback/Skeleton.js +12 -0
- package/dist/feedback/SplashScreen.js +145 -0
- package/dist/feedback/StatusDot.js +34 -0
- package/dist/feedback/Stepper.js +48 -0
- package/dist/feedback/Toaster.js +38 -0
- package/dist/feedback.js +11 -0
- package/dist/fonts.css +7 -0
- package/dist/forms/Button.js +128 -0
- package/dist/forms/ButtonGroup.js +14 -0
- package/dist/forms/Calendar.js +51 -0
- package/dist/forms/Checkbox.js +30 -0
- package/dist/forms/Combobox.js +118 -0
- package/dist/forms/CopyButton.js +24 -0
- package/dist/forms/DatePicker.js +146 -0
- package/dist/forms/DateTimePicker.js +97 -0
- package/dist/forms/EditableValue.js +49 -0
- package/dist/forms/FileUpload.js +99 -0
- package/dist/forms/FormField.js +47 -0
- package/dist/forms/Input.js +58 -0
- package/dist/forms/Label.js +42 -0
- package/dist/forms/MultiSelect.js +132 -0
- package/dist/forms/QuantityStepper.js +71 -0
- package/dist/forms/RadioGroup.js +21 -0
- package/dist/forms/SearchField.js +55 -0
- package/dist/forms/Select.js +79 -0
- package/dist/forms/Slider.js +23 -0
- package/dist/forms/Switch.js +23 -0
- package/dist/forms/TagInput.js +64 -0
- package/dist/forms/Textarea.js +41 -0
- package/dist/forms/control-size.js +44 -0
- package/dist/forms/use-copy-to-clipboard.js +23 -0
- package/dist/forms.js +25 -0
- package/dist/icons/create-icon.js +20 -0
- package/dist/icons/glyphs.js +9 -0
- package/dist/icons.js +3 -0
- package/dist/index.js +101 -0
- package/dist/layout/FilterBar.js +29 -0
- package/dist/layout/Page.js +44 -0
- package/dist/layout/PageHeader.js +65 -0
- package/dist/layout/PageShell.js +20 -0
- package/dist/layout/PageSurface.js +19 -0
- package/dist/layout/Resizable.js +21 -0
- package/dist/layout/ScrollArea.js +35 -0
- package/dist/layout/SelectionBar.js +41 -0
- package/dist/layout.js +9 -0
- package/dist/lite/Contact.js +59 -0
- package/dist/lite/Coupon.js +56 -0
- package/dist/lite/Loading.js +79 -0
- package/dist/lite/Order.js +216 -0
- package/dist/lite/Product.js +124 -0
- package/dist/lite/Resolver.js +181 -0
- package/dist/lite/Shell.js +178 -0
- package/dist/lite/Smart.js +48 -0
- package/dist/lite.js +9 -0
- package/dist/navigation/ApplicationSidebar.js +101 -0
- package/dist/navigation/NavigationRail.js +45 -0
- package/dist/navigation/SidebarAccountSummary.js +20 -0
- package/dist/navigation/SidebarBrandContent.js +24 -0
- package/dist/navigation/SidebarNavigationItem.js +14 -0
- package/dist/navigation/SidebarSubnavigation.js +26 -0
- package/dist/navigation/navigation-path.js +21 -0
- package/dist/navigation/sidebar-styles.js +17 -0
- package/dist/navigation.js +9 -0
- package/dist/password-manager.js +11 -0
- package/dist/preflight.css +445 -0
- package/dist/sidebar/primitives.js +253 -0
- package/dist/sidebar/use-sidebar-shortcut.js +15 -0
- package/dist/sidebar.js +2 -0
- package/dist/styles.css +3773 -0
- package/dist/tabs/Tabs.js +48 -0
- package/dist/tabs.js +2 -0
- package/dist/tailwind-preset.js +213 -0
- package/dist/type-scale.js +45 -0
- package/dist/types/src/controls/Accordion.d.ts +10 -0
- package/dist/types/src/controls/ActionMenu.d.ts +17 -0
- package/dist/types/src/controls/AlertDialog.d.ts +15 -0
- package/dist/types/src/controls/ChipGroup.d.ts +43 -0
- package/dist/types/src/controls/Collapsible.d.ts +4 -0
- package/dist/types/src/controls/Command.d.ts +83 -0
- package/dist/types/src/controls/ConfirmDialog.d.ts +17 -0
- package/dist/types/src/controls/Dialog.d.ts +20 -0
- package/dist/types/src/controls/FilterPopover.d.ts +47 -0
- package/dist/types/src/controls/Kbd.d.ts +2 -0
- package/dist/types/src/controls/Popover.d.ts +31 -0
- package/dist/types/src/controls/SegmentedControl.d.ts +32 -0
- package/dist/types/src/controls/Sheet.d.ts +34 -0
- package/dist/types/src/controls/Tooltip.d.ts +6 -0
- package/dist/types/src/controls/index.d.ts +16 -0
- package/dist/types/src/controls/overlay-container.d.ts +11 -0
- package/dist/types/src/controls/return-focus.d.ts +6 -0
- package/dist/types/src/data-attr.d.ts +3 -0
- package/dist/types/src/data-display/Avatar.d.ts +30 -0
- package/dist/types/src/data-display/Badge.d.ts +28 -0
- package/dist/types/src/data-display/Board.d.ts +21 -0
- package/dist/types/src/data-display/Card.d.ts +45 -0
- package/dist/types/src/data-display/ChatBubble.d.ts +24 -0
- package/dist/types/src/data-display/Code.d.ts +25 -0
- package/dist/types/src/data-display/DataTable.d.ts +74 -0
- package/dist/types/src/data-display/IconTile.d.ts +22 -0
- package/dist/types/src/data-display/Item.d.ts +24 -0
- package/dist/types/src/data-display/Overline.d.ts +5 -0
- package/dist/types/src/data-display/Separator.d.ts +9 -0
- package/dist/types/src/data-display/Stat.d.ts +17 -0
- package/dist/types/src/data-display/TablePagination.d.ts +23 -0
- package/dist/types/src/data-display/Timeline.d.ts +16 -0
- package/dist/types/src/data-display/chart-colors.d.ts +51 -0
- package/dist/types/src/data-display/index.d.ts +15 -0
- package/dist/types/src/feedback/Callout.d.ts +17 -0
- package/dist/types/src/feedback/FeedbackState.d.ts +16 -0
- package/dist/types/src/feedback/LoadingState.d.ts +7 -0
- package/dist/types/src/feedback/Progress.d.ts +37 -0
- package/dist/types/src/feedback/ProgressRing.d.ts +11 -0
- package/dist/types/src/feedback/Skeleton.d.ts +2 -0
- package/dist/types/src/feedback/SplashScreen.d.ts +11 -0
- package/dist/types/src/feedback/StatusDot.d.ts +27 -0
- package/dist/types/src/feedback/Stepper.d.ts +16 -0
- package/dist/types/src/feedback/Toaster.d.ts +4 -0
- package/dist/types/src/feedback/index.d.ts +10 -0
- package/dist/types/src/forms/Button.d.ts +26 -0
- package/dist/types/src/forms/ButtonGroup.d.ts +7 -0
- package/dist/types/src/forms/Calendar.d.ts +4 -0
- package/dist/types/src/forms/Checkbox.d.ts +11 -0
- package/dist/types/src/forms/Combobox.d.ts +51 -0
- package/dist/types/src/forms/CopyButton.d.ts +8 -0
- package/dist/types/src/forms/DatePicker.d.ts +34 -0
- package/dist/types/src/forms/DateTimePicker.d.ts +20 -0
- package/dist/types/src/forms/EditableValue.d.ts +14 -0
- package/dist/types/src/forms/FileUpload.d.ts +28 -0
- package/dist/types/src/forms/FormField.d.ts +12 -0
- package/dist/types/src/forms/Input.d.ts +11 -0
- package/dist/types/src/forms/Label.d.ts +11 -0
- package/dist/types/src/forms/MultiSelect.d.ts +45 -0
- package/dist/types/src/forms/QuantityStepper.d.ts +36 -0
- package/dist/types/src/forms/RadioGroup.d.ts +4 -0
- package/dist/types/src/forms/SearchField.d.ts +13 -0
- package/dist/types/src/forms/Select.d.ts +15 -0
- package/dist/types/src/forms/Slider.d.ts +9 -0
- package/dist/types/src/forms/Switch.d.ts +14 -0
- package/dist/types/src/forms/TagInput.d.ts +19 -0
- package/dist/types/src/forms/Textarea.d.ts +10 -0
- package/dist/types/src/forms/control-size.d.ts +17 -0
- package/dist/types/src/forms/index.d.ts +24 -0
- package/dist/types/src/forms/use-copy-to-clipboard.d.ts +5 -0
- package/dist/types/src/icons/create-icon.d.ts +16 -0
- package/dist/types/src/icons/glyphs.d.ts +294 -0
- package/dist/types/src/icons/index.d.ts +2 -0
- package/dist/types/src/index.d.ts +12 -0
- package/dist/types/src/layout/FilterBar.d.ts +11 -0
- package/dist/types/src/layout/Page.d.ts +19 -0
- package/dist/types/src/layout/PageHeader.d.ts +14 -0
- package/dist/types/src/layout/PageShell.d.ts +8 -0
- package/dist/types/src/layout/PageSurface.d.ts +13 -0
- package/dist/types/src/layout/Resizable.d.ts +23 -0
- package/dist/types/src/layout/ScrollArea.d.ts +9 -0
- package/dist/types/src/layout/SelectionBar.d.ts +15 -0
- package/dist/types/src/layout/index.d.ts +8 -0
- package/dist/types/src/lite/Contact.d.ts +14 -0
- package/dist/types/src/lite/Coupon.d.ts +11 -0
- package/dist/types/src/lite/Loading.d.ts +13 -0
- package/dist/types/src/lite/Order.d.ts +49 -0
- package/dist/types/src/lite/Product.d.ts +16 -0
- package/dist/types/src/lite/Resolver.d.ts +41 -0
- package/dist/types/src/lite/Shell.d.ts +44 -0
- package/dist/types/src/lite/Smart.d.ts +9 -0
- package/dist/types/src/lite/index.d.ts +8 -0
- package/dist/types/src/navigation/ApplicationSidebar.d.ts +15 -0
- package/dist/types/src/navigation/NavigationRail.d.ts +21 -0
- package/dist/types/src/navigation/SidebarAccountSummary.d.ts +8 -0
- package/dist/types/src/navigation/SidebarBrandContent.d.ts +7 -0
- package/dist/types/src/navigation/SidebarNavigationItem.d.ts +9 -0
- package/dist/types/src/navigation/SidebarSubnavigation.d.ts +15 -0
- package/dist/types/src/navigation/index.d.ts +28 -0
- package/dist/types/src/navigation/navigation-path.d.ts +9 -0
- package/dist/types/src/navigation/sidebar-styles.d.ts +14 -0
- package/dist/types/src/password-manager.d.ts +3 -0
- package/dist/types/src/sidebar/index.d.ts +1 -0
- package/dist/types/src/sidebar/primitives.d.ts +51 -0
- package/dist/types/src/sidebar/use-sidebar-shortcut.d.ts +9 -0
- package/dist/types/src/tabs/Tabs.d.ts +21 -0
- package/dist/types/src/tabs/index.d.ts +1 -0
- package/dist/types/src/type-scale.d.ts +51 -0
- package/dist/types/src/use-media-query.d.ts +2 -0
- package/dist/types/src/utils.d.ts +5 -0
- package/dist/types/tailwind-preset.d.ts +214 -0
- package/dist/use-media-query.js +12 -0
- package/dist/utils.js +24 -0
- package/eslint/eslint-plugin-galo-ds.js +314 -0
- package/eslint/eslint.design-system.js +99 -0
- package/eslint/index.js +9 -0
- package/package.json +115 -4
- package/src/styles.css +540 -0
- package/README.md +0 -3
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface UseSplashScreenOptions {
|
|
3
|
+
position?: 'fixed' | 'absolute';
|
|
4
|
+
label?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface UseSplashScreenReturn {
|
|
7
|
+
showSplash: boolean;
|
|
8
|
+
triggerExit: () => void;
|
|
9
|
+
SplashElement: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare const useSplashScreen: ({ position, label }?: UseSplashScreenOptions) => UseSplashScreenReturn;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const DOT_TONE: {
|
|
3
|
+
readonly neutral: 'bg-muted-foreground/50';
|
|
4
|
+
readonly primary: 'bg-primary';
|
|
5
|
+
readonly success: 'bg-success';
|
|
6
|
+
readonly warning: 'bg-warning';
|
|
7
|
+
readonly error: 'bg-error';
|
|
8
|
+
readonly info: 'bg-info';
|
|
9
|
+
};
|
|
10
|
+
declare const DOT_SIZE: {
|
|
11
|
+
readonly sm: 'size-1.5';
|
|
12
|
+
readonly md: 'size-2';
|
|
13
|
+
readonly lg: 'size-3';
|
|
14
|
+
readonly xl: 'size-4';
|
|
15
|
+
};
|
|
16
|
+
export interface StatusDotProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
17
|
+
tone?: keyof typeof DOT_TONE;
|
|
18
|
+
/** Data-driven color (a user-defined stage or category color); overrides `tone`. */
|
|
19
|
+
color?: string;
|
|
20
|
+
size?: keyof typeof DOT_SIZE;
|
|
21
|
+
/** Live indicator: a ping ring around the dot. */
|
|
22
|
+
pulse?: boolean;
|
|
23
|
+
/** Screen-reader text; without it the dot is decorative. */
|
|
24
|
+
label?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare const StatusDot: React.ForwardRefExoticComponent<StatusDotProps & React.RefAttributes<HTMLSpanElement>>;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type StepStatus = 'completed' | 'current' | 'upcoming' | 'error';
|
|
3
|
+
export interface StepperItem {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
status: StepStatus;
|
|
8
|
+
icon?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export interface StepperProps {
|
|
11
|
+
items: StepperItem[];
|
|
12
|
+
ariaLabel?: string;
|
|
13
|
+
onStepChange?: (id: string) => void;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function Stepper({ items, ariaLabel, onStepChange, className }: StepperProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './FeedbackState';
|
|
2
|
+
export * from './Skeleton';
|
|
3
|
+
export * from './ProgressRing';
|
|
4
|
+
export * from './Stepper';
|
|
5
|
+
export * from './Toaster';
|
|
6
|
+
export * from './LoadingState';
|
|
7
|
+
export * from './Callout';
|
|
8
|
+
export * from './Progress';
|
|
9
|
+
export * from './StatusDot';
|
|
10
|
+
export * from './SplashScreen';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type ControlSize } from './control-size';
|
|
3
|
+
export type ButtonVariant = 'solid' | 'soft' | 'outline' | 'ghost' | 'link' | 'dashed' | 'floating';
|
|
4
|
+
export type ButtonTone = 'neutral' | 'muted' | 'primary' | 'tertiary' | 'success' | 'warning' | 'info' | 'error' | 'inverse';
|
|
5
|
+
export type ButtonSize = ControlSize | 'inline';
|
|
6
|
+
export declare const BUTTON_APPEARANCES: {
|
|
7
|
+
variant: ButtonVariant;
|
|
8
|
+
tone: ButtonTone;
|
|
9
|
+
}[];
|
|
10
|
+
export interface ButtonStyleOptions {
|
|
11
|
+
variant?: ButtonVariant;
|
|
12
|
+
tone?: ButtonTone;
|
|
13
|
+
size?: ButtonSize;
|
|
14
|
+
iconOnly?: boolean;
|
|
15
|
+
shape?: 'pill';
|
|
16
|
+
revealOnHover?: boolean;
|
|
17
|
+
active?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare const buttonVariants: ({ variant, tone, size, iconOnly, shape, revealOnHover, active }?: ButtonStyleOptions) => string;
|
|
20
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, ButtonStyleOptions {
|
|
21
|
+
asChild?: boolean;
|
|
22
|
+
loading?: boolean;
|
|
23
|
+
loadingLabel?: string;
|
|
24
|
+
'data-attr'?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ButtonGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
orientation?: 'horizontal' | 'vertical';
|
|
4
|
+
/** Accessible name of the set ("Acciones del pedido"). */
|
|
5
|
+
'aria-label'?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const ButtonGroup: React.ForwardRefExoticComponent<ButtonGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
|
+
declare const SIZE_CLASS: {
|
|
4
|
+
readonly sm: 'size-3.5 rounded [&_svg]:size-2.5';
|
|
5
|
+
readonly md: 'size-4';
|
|
6
|
+
readonly lg: 'size-6 rounded-lg [&_svg]:size-4';
|
|
7
|
+
};
|
|
8
|
+
export declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
9
|
+
size?: keyof typeof SIZE_CLASS;
|
|
10
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ComboboxOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
metadata?: unknown;
|
|
6
|
+
}
|
|
7
|
+
export interface ComboboxProps {
|
|
8
|
+
options: ComboboxOption[];
|
|
9
|
+
value?: string;
|
|
10
|
+
onValueChange: (value: string) => void;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
searchPlaceholder?: string;
|
|
13
|
+
emptyText?: string;
|
|
14
|
+
allowClear?: boolean;
|
|
15
|
+
clearText?: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
/** Highlights a trigger whose filter is applied (like SelectTrigger `active`). */
|
|
18
|
+
active?: boolean;
|
|
19
|
+
size?: 'sm' | 'md' | 'lg' | 'touch';
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
hideSearch?: boolean;
|
|
22
|
+
isLoading?: boolean;
|
|
23
|
+
renderOption?: (option: ComboboxOption) => React.ReactNode;
|
|
24
|
+
renderSelected?: (option: ComboboxOption) => React.ReactNode;
|
|
25
|
+
contentClassName?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Enables inline creation: when the search text has no exact match, an
|
|
28
|
+
* "Crear «…»" item appears. Selecting it calls `onCreate` with the typed
|
|
29
|
+
* text (the caller creates the entity and selects it). `createLabel`
|
|
30
|
+
* customizes the item text.
|
|
31
|
+
*/
|
|
32
|
+
onCreate?: (label: string) => void;
|
|
33
|
+
createLabel?: (input: string) => React.ReactNode;
|
|
34
|
+
/** Server-side search: called on each query change (same API as MultiSelect). */
|
|
35
|
+
onSearchChange?: (search: string) => void;
|
|
36
|
+
/** Skip client-side filtering (the caller/server already filtered). */
|
|
37
|
+
disableLocalFilter?: boolean;
|
|
38
|
+
/** Loading the next page (infinite scroll). */
|
|
39
|
+
isLoadingMore?: boolean;
|
|
40
|
+
/** Sentinel ref placed at the list end to drive infinite scroll. */
|
|
41
|
+
loadingMoreRef?: React.Ref<HTMLDivElement>;
|
|
42
|
+
/** PostHog autocapture key for the trigger. */
|
|
43
|
+
'data-attr'?: string;
|
|
44
|
+
/** Trigger id, for `<FormField htmlFor>` / `<Label htmlFor>`. A combobox takes no name from its text. */
|
|
45
|
+
id?: string;
|
|
46
|
+
/** Accessible name when there is no visible label pointing at `id`. */
|
|
47
|
+
'aria-label'?: string;
|
|
48
|
+
'aria-invalid'?: React.AriaAttributes['aria-invalid'];
|
|
49
|
+
'aria-describedby'?: string;
|
|
50
|
+
}
|
|
51
|
+
export declare function Combobox({ options, value, onValueChange, placeholder, searchPlaceholder, emptyText, allowClear, clearText, className, active, size, disabled, hideSearch, isLoading, renderOption, renderSelected, contentClassName, onCreate, createLabel, onSearchChange, disableLocalFilter, isLoadingMore, loadingMoreRef, 'data-attr': dataAttr, id, 'aria-label': ariaLabel, 'aria-invalid': ariaInvalid, 'aria-describedby': ariaDescribedBy, }: ComboboxProps): React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import { type ButtonProps } from './Button';
|
|
3
|
+
export interface CopyButtonProps extends Omit<ButtonProps, 'value' | 'onClick' | 'children'> {
|
|
4
|
+
value: string;
|
|
5
|
+
label?: React.ReactNode;
|
|
6
|
+
successMessage?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const CopyButton: ({ value, label, successMessage, variant, size, title, 'data-attr': dataAttr, ...props }: CopyButtonProps) => React.JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { DateRange } from 'react-day-picker';
|
|
3
|
+
export type { DateRange };
|
|
4
|
+
import { type CalendarProps } from './Calendar';
|
|
5
|
+
export interface DatePickerProps {
|
|
6
|
+
id?: string;
|
|
7
|
+
value?: Date;
|
|
8
|
+
onValueChange: (value?: Date) => void;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
locale?: string;
|
|
11
|
+
formatValue?: (date: Date) => string;
|
|
12
|
+
clearLabel?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
calendarProps?: Omit<CalendarProps, 'mode' | 'selected' | 'onSelect' | 'required'>;
|
|
16
|
+
/** PostHog key for the trigger. */
|
|
17
|
+
'data-attr'?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function DatePicker({ id, value, onValueChange, placeholder, locale, formatValue, clearLabel, disabled, className, calendarProps, 'data-attr': dataAttr }: DatePickerProps): React.JSX.Element;
|
|
20
|
+
export interface DateRangePickerProps {
|
|
21
|
+
id?: string;
|
|
22
|
+
value?: DateRange;
|
|
23
|
+
onValueChange: (value?: DateRange) => void;
|
|
24
|
+
placeholder?: string;
|
|
25
|
+
locale?: string;
|
|
26
|
+
formatValue?: (range: DateRange) => string;
|
|
27
|
+
clearLabel?: string;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
numberOfMonths?: number;
|
|
30
|
+
className?: string;
|
|
31
|
+
calendarProps?: Omit<CalendarProps, 'mode' | 'selected' | 'onSelect' | 'required' | 'numberOfMonths'>;
|
|
32
|
+
header?: React.ReactNode;
|
|
33
|
+
}
|
|
34
|
+
export declare function DateRangePicker({ id, value, onValueChange, placeholder, locale, formatValue, clearLabel, disabled, numberOfMonths, className, calendarProps, header }: DateRangePickerProps): React.JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type CalendarProps } from './Calendar';
|
|
3
|
+
export interface DateTimePickerProps {
|
|
4
|
+
id?: string;
|
|
5
|
+
value?: Date;
|
|
6
|
+
onValueChange: (value?: Date) => void;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
locale?: string;
|
|
9
|
+
formatValue?: (date: Date) => string;
|
|
10
|
+
/** Time used when the user picks a day before touching the time field. */
|
|
11
|
+
defaultTime?: string;
|
|
12
|
+
/** Minutes between the times offered in the time list. */
|
|
13
|
+
minuteStep?: number;
|
|
14
|
+
timeLabel?: string;
|
|
15
|
+
clearLabel?: string;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
className?: string;
|
|
18
|
+
calendarProps?: Omit<CalendarProps, 'mode' | 'selected' | 'onSelect' | 'required'>;
|
|
19
|
+
}
|
|
20
|
+
export declare function DateTimePicker({ id, value, onValueChange, placeholder, locale, formatValue, defaultTime, minuteStep, timeLabel, clearLabel, disabled, className, calendarProps }: DateTimePickerProps): React.JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface EditableValueProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'aria-label'> {
|
|
3
|
+
/** What clicking edits ("Editar código"). Read before the value, so the accessible name keeps the visible text (WCAG 2.5.3). */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Shown muted when there is no value yet. */
|
|
6
|
+
placeholder?: React.ReactNode;
|
|
7
|
+
/** A value that needs attention (e.g. "Sin vendedor"). */
|
|
8
|
+
tone?: 'default' | 'warning';
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A value you click to edit (opens a popover, dialog or inline input). Reads as text; on hover only
|
|
12
|
+
* the color changes and a pencil appears. Long values end in "…" and show in full in a tooltip.
|
|
13
|
+
*/
|
|
14
|
+
export declare const EditableValue: React.ForwardRefExoticComponent<EditableValueProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface FileItemProps {
|
|
3
|
+
file: File;
|
|
4
|
+
onRemove?: () => void;
|
|
5
|
+
removeLabel?: string;
|
|
6
|
+
removeDataAttr?: string;
|
|
7
|
+
error?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function FileItem({ file, onRemove, removeLabel, removeDataAttr, error, className }: FileItemProps): React.JSX.Element;
|
|
11
|
+
export interface FileUploadProps {
|
|
12
|
+
value: File[];
|
|
13
|
+
onValueChange: (files: File[]) => void;
|
|
14
|
+
accept?: string;
|
|
15
|
+
multiple?: boolean;
|
|
16
|
+
maxFiles?: number;
|
|
17
|
+
maxSize?: number;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
label?: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
browseLabel?: string;
|
|
22
|
+
removeLabel?: string;
|
|
23
|
+
/** PostHog key for each file's remove button. */
|
|
24
|
+
removeDataAttr?: string;
|
|
25
|
+
onError?: (message: string) => void;
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function FileUpload({ value, onValueChange, accept, multiple, maxFiles, maxSize, disabled, label, description, browseLabel, removeLabel, removeDataAttr, onError, className }: FileUploadProps): React.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface FormFieldProps {
|
|
3
|
+
label: string;
|
|
4
|
+
htmlFor?: string;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
hint?: string;
|
|
7
|
+
tooltip?: string;
|
|
8
|
+
error?: string;
|
|
9
|
+
required?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function FormField({ label, htmlFor, children, hint, tooltip, error, required, className }: FormFieldProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
export declare const inputVariants: (props?: {
|
|
4
|
+
variant?: "default" | "ghost" | "line";
|
|
5
|
+
size?: "display" | "lg" | "md" | "sm" | "touch" | "xs";
|
|
6
|
+
tone?: "info" | "neutral" | "success" | "warning";
|
|
7
|
+
active?: boolean;
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) => string;
|
|
9
|
+
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>, VariantProps<typeof inputVariants> {
|
|
10
|
+
}
|
|
11
|
+
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
3
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
4
|
+
export declare const labelVariants: (props?: {
|
|
5
|
+
size?: "md" | "sm" | "xs";
|
|
6
|
+
tone?: "error" | "muted" | "neutral";
|
|
7
|
+
weight?: "medium" | "normal" | "semibold";
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) => string;
|
|
9
|
+
export interface LabelProps extends React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>, VariantProps<typeof labelVariants> {
|
|
10
|
+
}
|
|
11
|
+
export declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface MultiSelectOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface MultiSelectProps {
|
|
9
|
+
options: MultiSelectOption[];
|
|
10
|
+
value: string[];
|
|
11
|
+
/** Second argument: the selected options, labels included (for callers that keep objects). */
|
|
12
|
+
onValueChange: (value: string[], selectedOptions: MultiSelectOption[]) => void;
|
|
13
|
+
/** Labels for selected values that `options` may not contain (e.g. a server search that no longer returns them). */
|
|
14
|
+
selectedOptions?: MultiSelectOption[];
|
|
15
|
+
/** `summary`: one-line trigger text (`placeholder`, the single label, or `placeholder (n)`) instead of chips. */
|
|
16
|
+
display?: 'chips' | 'summary';
|
|
17
|
+
/** Inline creation, same contract as Combobox: called with the typed text; the caller creates and selects. */
|
|
18
|
+
onCreate?: (label: string) => void;
|
|
19
|
+
createLabel?: (input: string) => React.ReactNode;
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
searchPlaceholder?: string;
|
|
22
|
+
emptyText?: string;
|
|
23
|
+
removeOptionLabel?: string;
|
|
24
|
+
maxVisible?: number;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
className?: string;
|
|
27
|
+
size?: 'sm' | 'md';
|
|
28
|
+
/** Highlights a trigger whose filter is applied (like SelectTrigger `active`). */
|
|
29
|
+
active?: boolean;
|
|
30
|
+
/** Error state of the trigger (failed to load options, validation). */
|
|
31
|
+
invalid?: boolean;
|
|
32
|
+
/** Server-side search: called on each query change. */
|
|
33
|
+
onSearchChange?: (search: string) => void;
|
|
34
|
+
/** Skip client-side filtering (the caller/server already filtered). */
|
|
35
|
+
disableLocalFilter?: boolean;
|
|
36
|
+
/** Loading the (first page of) options. */
|
|
37
|
+
isLoading?: boolean;
|
|
38
|
+
/** Loading the next page (infinite scroll). */
|
|
39
|
+
isLoadingMore?: boolean;
|
|
40
|
+
/** Sentinel ref placed at the list end to drive infinite scroll. */
|
|
41
|
+
loadingMoreRef?: React.Ref<HTMLDivElement>;
|
|
42
|
+
/** Accessible name of the trigger: a combobox takes no name from its chips, and a <label> cannot point at it. */
|
|
43
|
+
'aria-label'?: string;
|
|
44
|
+
}
|
|
45
|
+
export declare function MultiSelect({ options, value, onValueChange, selectedOptions, display, onCreate, createLabel, placeholder, searchPlaceholder, emptyText, removeOptionLabel, maxVisible, disabled, className, size: sizeProp, active, invalid, onSearchChange, disableLocalFilter, isLoading, isLoadingMore, loadingMoreRef, 'aria-label': ariaLabel }: MultiSelectProps): React.JSX.Element;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const SIZE: {
|
|
3
|
+
readonly sm: {
|
|
4
|
+
readonly root: 'h-control-sm rounded-xl';
|
|
5
|
+
readonly button: 'w-control-sm [&_svg]:size-3.5';
|
|
6
|
+
readonly value: 'w-9 text-body-xs';
|
|
7
|
+
};
|
|
8
|
+
readonly md: {
|
|
9
|
+
readonly root: 'h-control-md rounded-2xl';
|
|
10
|
+
readonly button: 'w-control-md [&_svg]:size-4';
|
|
11
|
+
readonly value: 'w-10 text-body-md';
|
|
12
|
+
};
|
|
13
|
+
readonly touch: {
|
|
14
|
+
readonly root: 'h-control-touch rounded-2xl';
|
|
15
|
+
readonly button: 'w-control-touch [&_svg]:size-5';
|
|
16
|
+
readonly value: 'w-12 text-body-lg';
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export interface QuantityStepperProps {
|
|
20
|
+
value: number;
|
|
21
|
+
onValueChange: (value: number) => void;
|
|
22
|
+
min?: number;
|
|
23
|
+
max?: number;
|
|
24
|
+
step?: number;
|
|
25
|
+
size?: keyof typeof SIZE;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/** Accessible name of the quantity field ("Cantidad de Coca-Cola 500ml"). */
|
|
28
|
+
label: string;
|
|
29
|
+
decrementLabel?: string;
|
|
30
|
+
incrementLabel?: string;
|
|
31
|
+
className?: string;
|
|
32
|
+
/** PostHog key prefix; the buttons publish `<key>-decrement` / `<key>-increment`. */
|
|
33
|
+
'data-attr'?: string;
|
|
34
|
+
}
|
|
35
|
+
export declare const QuantityStepper: ({ value, onValueChange, min, max, step, size: sizeProp, disabled, label, decrementLabel, incrementLabel, className, 'data-attr': dataAttr, }: QuantityStepperProps) => React.JSX.Element;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
3
|
+
export declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type InputProps } from './Input';
|
|
3
|
+
export interface SearchFieldProps extends Omit<InputProps, 'type' | 'size'> {
|
|
4
|
+
onClear?: () => void;
|
|
5
|
+
clearLabel?: string;
|
|
6
|
+
/** PostHog key for the clear button. */
|
|
7
|
+
clearDataAttr?: string;
|
|
8
|
+
/** Shows a spinner in place of the clear button while a debounced search is in flight. */
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
loadingLabel?: string;
|
|
11
|
+
size?: InputProps['size'];
|
|
12
|
+
}
|
|
13
|
+
export declare const SearchField: React.ForwardRefExoticComponent<SearchFieldProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
3
|
+
export declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
4
|
+
export declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
6
|
+
export interface SelectTriggerProps extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> {
|
|
7
|
+
size?: 'sm' | 'md' | 'lg' | 'touch';
|
|
8
|
+
/** Marks a filter that is applied (a value other than "all"). */
|
|
9
|
+
active?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const SelectTrigger: React.ForwardRefExoticComponent<SelectTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
export declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
export declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
3
|
+
export interface SliderProps extends React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root> {
|
|
4
|
+
/** `sm` is the compact scrubber for media players inside dense surfaces. */
|
|
5
|
+
size?: 'sm' | 'md';
|
|
6
|
+
/** `inverse` sits on a primary-colored surface (e.g. a sent chat bubble). */
|
|
7
|
+
tone?: 'neutral' | 'inverse';
|
|
8
|
+
}
|
|
9
|
+
export declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
3
|
+
declare const TONE_CLASS: {
|
|
4
|
+
readonly primary: 'border-input-border bg-secondary data-[state=checked]:border-primary data-[state=checked]:bg-primary';
|
|
5
|
+
readonly warning: 'border-input-border bg-secondary data-[state=checked]:border-warning data-[state=checked]:bg-warning';
|
|
6
|
+
readonly error: 'border-input-border bg-secondary data-[state=checked]:border-error data-[state=checked]:bg-error';
|
|
7
|
+
readonly status: 'border-error bg-error data-[state=checked]:border-success data-[state=checked]:bg-success';
|
|
8
|
+
};
|
|
9
|
+
export interface SwitchProps extends React.ComponentPropsWithoutRef<typeof SwitchPrimitive.Root> {
|
|
10
|
+
tone?: keyof typeof TONE_CLASS;
|
|
11
|
+
thumbIcon?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type InputProps } from './Input';
|
|
3
|
+
export type TagInputError = {
|
|
4
|
+
reason: 'duplicate' | 'max';
|
|
5
|
+
tag: string;
|
|
6
|
+
};
|
|
7
|
+
export interface TagInputProps extends Omit<InputProps, 'value' | 'onChange' | 'onError' | 'className'> {
|
|
8
|
+
value: string[];
|
|
9
|
+
onValueChange: (value: string[]) => void;
|
|
10
|
+
maxTags?: number;
|
|
11
|
+
/** The design system never toasts: the caller owns the copy and the channel. */
|
|
12
|
+
onError?: (error: TagInputError) => void;
|
|
13
|
+
removeLabel?: string;
|
|
14
|
+
/** PostHog key for each tag's remove button. */
|
|
15
|
+
removeDataAttr?: string;
|
|
16
|
+
nextPlaceholder?: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const TagInput: ({ value, onValueChange, maxTags, onError, removeLabel, removeDataAttr, placeholder, nextPlaceholder, disabled, className, onKeyDown, onBlur, ...props }: TagInputProps) => React.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
export declare const textareaVariants: (props?: {
|
|
4
|
+
variant?: "default" | "ghost";
|
|
5
|
+
size?: "lg" | "md" | "sm";
|
|
6
|
+
tone?: "neutral" | "success" | "warning";
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) => string;
|
|
8
|
+
export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement>, VariantProps<typeof textareaVariants> {
|
|
9
|
+
}
|
|
10
|
+
export declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export type ControlSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'touch';
|
|
3
|
+
/** One size scale for every control: the same `size` gives the same height and the same type. */
|
|
4
|
+
export declare const CONTROL_HEIGHT: Record<ControlSize, string>;
|
|
5
|
+
/** Square controls (icon-only buttons, segmented icons). */
|
|
6
|
+
export declare const CONTROL_SQUARE: Record<ControlSize, string>;
|
|
7
|
+
/** Text of a control that acts or toggles: buttons, chips, segments, tabs. */
|
|
8
|
+
export declare const CONTROL_LABEL: Record<ControlSize, string>;
|
|
9
|
+
/** Text of a control that holds a value: inputs, selects, comboboxes. */
|
|
10
|
+
export declare const CONTROL_VALUE: Record<ControlSize, string>;
|
|
11
|
+
/** A container that decides the size of every control inside it (PageHeader actions, FilterBar). */
|
|
12
|
+
export declare const ControlSizeProvider: ({ size, children }: {
|
|
13
|
+
size: ControlSize;
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
}) => import("react").FunctionComponentElement<import("react").ProviderProps<ControlSize>>;
|
|
16
|
+
/** The container's size wins over the prop; sizes outside the scale (`inline`, `display`) keep the prop. */
|
|
17
|
+
export declare const useControlSize: <Size extends string>(size: Size | undefined, fallback: Size, supported: readonly Size[]) => Size;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export * from './Button';
|
|
2
|
+
export * from './Input';
|
|
3
|
+
export * from './Select';
|
|
4
|
+
export * from './Combobox';
|
|
5
|
+
export * from './MultiSelect';
|
|
6
|
+
export * from './FormField';
|
|
7
|
+
export * from './Textarea';
|
|
8
|
+
export * from './SearchField';
|
|
9
|
+
export * from './Checkbox';
|
|
10
|
+
export * from './RadioGroup';
|
|
11
|
+
export * from './Switch';
|
|
12
|
+
export * from './Calendar';
|
|
13
|
+
export * from './DatePicker';
|
|
14
|
+
export * from './DateTimePicker';
|
|
15
|
+
export * from './FileUpload';
|
|
16
|
+
export * from './Label';
|
|
17
|
+
export * from './Slider';
|
|
18
|
+
export * from './TagInput';
|
|
19
|
+
export * from './QuantityStepper';
|
|
20
|
+
export * from './ButtonGroup';
|
|
21
|
+
export * from './control-size';
|
|
22
|
+
export * from './CopyButton';
|
|
23
|
+
export * from './EditableValue';
|
|
24
|
+
export * from './use-copy-to-clipboard';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type IconWeight = 'regular' | 'fill';
|
|
3
|
+
export interface IconProps extends Omit<React.SVGProps<SVGSVGElement>, 'ref'> {
|
|
4
|
+
/** Width and height; 24 by default. Containers usually size icons with `[&_svg]:size-*` or a `size-*` class. */
|
|
5
|
+
size?: number | string;
|
|
6
|
+
/** `fill` draws the solid version (a starred item, a flag set). */
|
|
7
|
+
weight?: IconWeight;
|
|
8
|
+
/** Kept from the Lucide API so existing call sites compile; Phosphor glyphs have no stroke, so it has no effect. */
|
|
9
|
+
strokeWidth?: number | string;
|
|
10
|
+
}
|
|
11
|
+
export type IconComponent = React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
|
|
12
|
+
/**
|
|
13
|
+
* A Phosphor glyph with the DS defaults: 24px, regular weight, current text color, and hidden from screen readers
|
|
14
|
+
* unless it carries a label.
|
|
15
|
+
*/
|
|
16
|
+
export declare const createIcon: (name: string, regular: string[], fill: string[]) => IconComponent;
|