@dev-dga/react 0.7.0 → 0.8.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/CHANGELOG.md +46 -0
- package/README.md +5 -5
- package/dist/index.cjs +2054 -421
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +507 -25
- package/dist/index.d.ts +507 -25
- package/dist/index.js +2000 -391
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
|
-
import { Checkbox as Checkbox$1, RadioGroup as RadioGroup$1, Switch as Switch$1, Select as Select$1, Avatar as Avatar$1, Tooltip as Tooltip$1, Dialog, Tabs as Tabs$1, Accordion as Accordion$1, Progress as Progress$1, DropdownMenu as DropdownMenu$1, Slider as Slider$1, Toggle as Toggle$1, ToggleGroup as ToggleGroup$1, Popover as Popover$1, ScrollArea as ScrollArea$1, Menubar as Menubar$1 } from 'radix-ui';
|
|
6
|
-
import { Command } from 'cmdk';
|
|
5
|
+
import { Checkbox as Checkbox$1, RadioGroup as RadioGroup$1, Switch as Switch$1, Select as Select$1, Avatar as Avatar$1, Tooltip as Tooltip$1, Dialog, Tabs as Tabs$1, Accordion as Accordion$1, Progress as Progress$1, DropdownMenu as DropdownMenu$1, Slider as Slider$1, Toggle as Toggle$1, ToggleGroup as ToggleGroup$1, Popover as Popover$1, ScrollArea as ScrollArea$1, Menubar as Menubar$1, Collapsible as Collapsible$1 } from 'radix-ui';
|
|
6
|
+
import { Command as Command$1 } from 'cmdk';
|
|
7
7
|
import { DgaTheme } from '@dev-dga/tokens';
|
|
8
8
|
export { DgaTheme, PaletteName, ThemeColor } from '@dev-dga/tokens';
|
|
9
9
|
import { ClassValue } from 'clsx';
|
|
@@ -13,6 +13,7 @@ declare const buttonVariants: (props?: ({
|
|
|
13
13
|
size?: "sm" | "md" | "lg" | "icon" | "icon-sm" | null | undefined;
|
|
14
14
|
fullWidth?: boolean | null | undefined;
|
|
15
15
|
inverted?: boolean | null | undefined;
|
|
16
|
+
fab?: boolean | null | undefined;
|
|
16
17
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
17
18
|
interface ButtonProps extends React.ComponentProps<'button'>, VariantProps<typeof buttonVariants> {
|
|
18
19
|
loading?: boolean;
|
|
@@ -37,7 +38,7 @@ interface ButtonProps extends React.ComponentProps<'button'>, VariantProps<typeo
|
|
|
37
38
|
*/
|
|
38
39
|
asChild?: boolean;
|
|
39
40
|
}
|
|
40
|
-
declare function Button({ variant, size, fullWidth, inverted, loading, disabled, startIcon, endIcon, iconFlip, asChild, className, children, type, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
41
|
+
declare function Button({ variant, size, fullWidth, inverted, fab, loading, disabled, startIcon, endIcon, iconFlip, asChild, className, children, type, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
41
42
|
|
|
42
43
|
declare const inputVariants: (props?: ({
|
|
43
44
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
@@ -169,7 +170,7 @@ interface SelectItemProps extends React.ComponentProps<typeof Select$1.Item> {
|
|
|
169
170
|
/** The visible label for this item. */
|
|
170
171
|
children: ReactNode;
|
|
171
172
|
}
|
|
172
|
-
declare function Select({ id: externalId, label, helperText, errorMessage, error, size, required, placeholder, className, children, ...rootProps }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
173
|
+
declare function Select({ id: externalId, label, helperText, errorMessage, error, size, required, placeholder, className, children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, ...rootProps }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
173
174
|
declare function SelectItem({ className, children, ...props }: SelectItemProps): react_jsx_runtime.JSX.Element;
|
|
174
175
|
|
|
175
176
|
declare const cardVariants: (props?: ({
|
|
@@ -353,9 +354,6 @@ interface AlertProps extends Omit<React.ComponentProps<'div'>, 'role'>, VariantP
|
|
|
353
354
|
/** Localized label for the close button. Defaults to `"Dismiss"`. */
|
|
354
355
|
closeLabel?: string;
|
|
355
356
|
}
|
|
356
|
-
type AlertSectionProps = React.ComponentProps<'div'> & {
|
|
357
|
-
asChild?: boolean;
|
|
358
|
-
};
|
|
359
357
|
interface AlertTitleProps extends React.ComponentProps<'h5'> {
|
|
360
358
|
/** Override the heading element (e.g. render an `<h3>`). */
|
|
361
359
|
asChild?: boolean;
|
|
@@ -520,11 +518,20 @@ interface TabsProps extends React.ComponentProps<typeof Tabs$1.Root>, VariantPro
|
|
|
520
518
|
}
|
|
521
519
|
interface TabsListProps extends React.ComponentProps<typeof Tabs$1.List>, VariantProps<typeof tabsListVariants> {
|
|
522
520
|
}
|
|
523
|
-
|
|
521
|
+
interface TabsTriggerProps extends React.ComponentProps<typeof Tabs$1.Trigger> {
|
|
522
|
+
/**
|
|
523
|
+
* Leading icon, rendered before the label in a decorative (`aria-hidden`)
|
|
524
|
+
* wrapper. Ignored when `asChild` is set — compose icons inside your own
|
|
525
|
+
* element in that mode.
|
|
526
|
+
*/
|
|
527
|
+
startIcon?: ReactNode;
|
|
528
|
+
/** Trailing icon (e.g. a count/badge glyph). Same rules as `startIcon`. */
|
|
529
|
+
endIcon?: ReactNode;
|
|
530
|
+
}
|
|
524
531
|
type TabsContentProps = React.ComponentProps<typeof Tabs$1.Content>;
|
|
525
532
|
declare function Tabs({ variant, size, className, ...props }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
526
533
|
declare function TabsList({ fullWidth, className, ...props }: TabsListProps): react_jsx_runtime.JSX.Element;
|
|
527
|
-
declare function TabsTrigger({ className, ...props }: TabsTriggerProps): react_jsx_runtime.JSX.Element;
|
|
534
|
+
declare function TabsTrigger({ className, startIcon, endIcon, children, asChild, ...props }: TabsTriggerProps): react_jsx_runtime.JSX.Element;
|
|
528
535
|
declare function TabsContent({ className, ...props }: TabsContentProps): react_jsx_runtime.JSX.Element;
|
|
529
536
|
|
|
530
537
|
declare const breadcrumbVariants: (props?: ({
|
|
@@ -704,13 +711,21 @@ type CircularProgressOwnProps = VariantProps<typeof circularProgressVariants> &
|
|
|
704
711
|
max?: number;
|
|
705
712
|
/** Stroke width in px. Defaults to 4 (sm) / 5 (md) / 6 (lg). */
|
|
706
713
|
thickness?: number;
|
|
707
|
-
/**
|
|
714
|
+
/**
|
|
715
|
+
* Render the ring as `segments` discrete arcs (a radial stepper) instead of a
|
|
716
|
+
* continuous arc. Pass an integer `>= 2`; values below that fall back to the
|
|
717
|
+
* continuous ring. The number of filled segments is `round(pct × segments)`,
|
|
718
|
+
* so `value={3} max={5} segments={5}` fills 3. Segmented mode is determinate —
|
|
719
|
+
* a `null` value renders 0 filled (no spinner).
|
|
720
|
+
*/
|
|
721
|
+
segments?: number;
|
|
722
|
+
/** Render the label inside the ring (`%`, or `filled/segments` when segmented). */
|
|
708
723
|
showLabel?: boolean;
|
|
709
724
|
'aria-label'?: string;
|
|
710
725
|
'aria-labelledby'?: string;
|
|
711
726
|
};
|
|
712
727
|
type CircularProgressProps = CircularProgressOwnProps & Omit<React.ComponentProps<'div'>, keyof CircularProgressOwnProps>;
|
|
713
|
-
declare function CircularProgress({ value, max, size, color, thickness, showLabel, className, ...props }: CircularProgressProps): react_jsx_runtime.JSX.Element;
|
|
728
|
+
declare function CircularProgress({ value, max, size, color, thickness, segments, showLabel, className, ...props }: CircularProgressProps): react_jsx_runtime.JSX.Element;
|
|
714
729
|
|
|
715
730
|
declare const dropdownMenuVariants: (props?: ({
|
|
716
731
|
size?: "sm" | "md" | null | undefined;
|
|
@@ -836,7 +851,7 @@ interface ComboboxProps extends VariantProps<typeof comboboxTriggerVariants> {
|
|
|
836
851
|
/** `<ComboboxItem>` (+ optional Group / Separator) children. */
|
|
837
852
|
children: ReactNode;
|
|
838
853
|
}
|
|
839
|
-
interface ComboboxItemProps extends Omit<React.ComponentProps<typeof Command.Item>, 'value' | 'onSelect'> {
|
|
854
|
+
interface ComboboxItemProps extends Omit<React.ComponentProps<typeof Command$1.Item>, 'value' | 'onSelect'> {
|
|
840
855
|
/** Stable value for filtering + selection. */
|
|
841
856
|
value: string;
|
|
842
857
|
/** Extra search terms cmdk should match against the input. */
|
|
@@ -846,16 +861,22 @@ interface ComboboxItemProps extends Omit<React.ComponentProps<typeof Command.Ite
|
|
|
846
861
|
/** Optional select handler — fires alongside the root's `onValueChange`. */
|
|
847
862
|
onSelect?: (value: string) => void;
|
|
848
863
|
}
|
|
849
|
-
interface ComboboxGroupProps extends React.ComponentProps<typeof Command.Group> {
|
|
864
|
+
interface ComboboxGroupProps extends React.ComponentProps<typeof Command$1.Group> {
|
|
850
865
|
/** Group heading rendered above its items. */
|
|
851
866
|
heading?: ReactNode;
|
|
852
867
|
}
|
|
853
|
-
type ComboboxSeparatorProps = React.ComponentProps<typeof Command.Separator>;
|
|
868
|
+
type ComboboxSeparatorProps = React.ComponentProps<typeof Command$1.Separator>;
|
|
854
869
|
declare function Combobox({ value: controlledValue, defaultValue, onValueChange, open: controlledOpen, defaultOpen, onOpenChange, label, helperText, errorMessage, error, required, disabled, size, placeholder, searchPlaceholder, emptyMessage, getLabel, id: externalId, className, children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, }: ComboboxProps): react_jsx_runtime.JSX.Element;
|
|
855
870
|
declare function ComboboxItem({ value, keywords, disabled, onSelect, className, children, ...props }: ComboboxItemProps): react_jsx_runtime.JSX.Element;
|
|
856
871
|
declare function ComboboxGroup({ className, heading, ...props }: ComboboxGroupProps): react_jsx_runtime.JSX.Element;
|
|
857
872
|
declare function ComboboxSeparator({ className, ...props }: ComboboxSeparatorProps): react_jsx_runtime.JSX.Element;
|
|
858
873
|
|
|
874
|
+
type CalendarSystem = 'gregorian' | 'hijri';
|
|
875
|
+
interface CalendarLabels {
|
|
876
|
+
gregorian: string;
|
|
877
|
+
hijri: string;
|
|
878
|
+
}
|
|
879
|
+
|
|
859
880
|
declare const datePickerTriggerVariants: (props?: ({
|
|
860
881
|
size?: "sm" | "md" | null | undefined;
|
|
861
882
|
error?: boolean | null | undefined;
|
|
@@ -864,11 +885,6 @@ declare const datePickerVariants: (props?: ({
|
|
|
864
885
|
size?: "sm" | "md" | null | undefined;
|
|
865
886
|
error?: boolean | null | undefined;
|
|
866
887
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
867
|
-
type CalendarSystem = 'gregorian' | 'hijri';
|
|
868
|
-
interface CalendarLabels {
|
|
869
|
-
gregorian: string;
|
|
870
|
-
hijri: string;
|
|
871
|
-
}
|
|
872
888
|
interface DatePickerProps extends VariantProps<typeof datePickerTriggerVariants> {
|
|
873
889
|
/** Currently selected date (controlled). Local Y/M/D. */
|
|
874
890
|
value?: Date | null;
|
|
@@ -1143,6 +1159,12 @@ interface EmptyStateProps extends Omit<React.ComponentProps<'div'>, 'title'>, Va
|
|
|
1143
1159
|
action?: ReactNode;
|
|
1144
1160
|
/** Secondary action beside the primary one. Ignored when `children` is set. */
|
|
1145
1161
|
secondaryAction?: ReactNode;
|
|
1162
|
+
/**
|
|
1163
|
+
* Render the consumer's own element as the root (Radix `Slot`) instead of a
|
|
1164
|
+
* `<div>`, so the empty-state surface can compose with a custom container.
|
|
1165
|
+
* As with the other composable parts, supply a single child element.
|
|
1166
|
+
*/
|
|
1167
|
+
asChild?: boolean;
|
|
1146
1168
|
}
|
|
1147
1169
|
type EmptyStateMediaProps = React.ComponentProps<'div'>;
|
|
1148
1170
|
interface EmptyStateTitleProps extends React.ComponentProps<'h3'> {
|
|
@@ -1155,16 +1177,17 @@ type EmptyStateDescriptionProps = React.ComponentProps<'p'> & {
|
|
|
1155
1177
|
type EmptyStateActionsProps = React.ComponentProps<'div'> & {
|
|
1156
1178
|
asChild?: boolean;
|
|
1157
1179
|
};
|
|
1158
|
-
declare function EmptyState({ variant, size, icon, title, description, action, secondaryAction, className, children, ...props }: EmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
1180
|
+
declare function EmptyState({ variant, size, icon, title, description, action, secondaryAction, asChild, className, children, ...props }: EmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
1159
1181
|
declare function EmptyStateMedia({ className, ...props }: EmptyStateMediaProps): react_jsx_runtime.JSX.Element;
|
|
1160
1182
|
declare function EmptyStateTitle({ asChild, className, ...props }: EmptyStateTitleProps): react_jsx_runtime.JSX.Element;
|
|
1161
1183
|
declare function EmptyStateDescription({ asChild, className, ...props }: EmptyStateDescriptionProps): react_jsx_runtime.JSX.Element;
|
|
1162
1184
|
declare function EmptyStateActions({ asChild, className, ...props }: EmptyStateActionsProps): react_jsx_runtime.JSX.Element;
|
|
1163
1185
|
|
|
1164
1186
|
declare const statVariants: (props?: ({
|
|
1165
|
-
variant?: "flat" | "elevated" | "accent" | null | undefined;
|
|
1166
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
1187
|
+
variant?: "flat" | "elevated" | "gradient" | "accent" | null | undefined;
|
|
1188
|
+
size?: "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
1167
1189
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1190
|
+
type ChangeVariant = 'text' | 'chip';
|
|
1168
1191
|
type Trend = 'up' | 'down' | 'flat';
|
|
1169
1192
|
type Sentiment = 'positive' | 'negative' | 'neutral';
|
|
1170
1193
|
interface StatProps extends React.ComponentProps<'div'>, VariantProps<typeof statVariants> {
|
|
@@ -1180,19 +1203,34 @@ interface StatProps extends React.ComponentProps<'div'>, VariantProps<typeof sta
|
|
|
1180
1203
|
trend?: Trend;
|
|
1181
1204
|
/** Change color. Omitted → derived from `trend`. Explicit always wins. */
|
|
1182
1205
|
sentiment?: Sentiment;
|
|
1206
|
+
/**
|
|
1207
|
+
* How the change renders: `'text'` (default — colored text + caret) or
|
|
1208
|
+
* `'chip'` (the same, wrapped in a sentiment-tinted pill). Threaded to the
|
|
1209
|
+
* inner `StatChange`.
|
|
1210
|
+
*/
|
|
1211
|
+
changeVariant?: ChangeVariant;
|
|
1183
1212
|
/** Optional icon at the inline-end of the label row (decorative). */
|
|
1184
1213
|
icon?: ReactNode;
|
|
1185
1214
|
}
|
|
1186
1215
|
type StatLabelProps = React.ComponentProps<'div'>;
|
|
1187
1216
|
type StatValueProps = React.ComponentProps<'div'>;
|
|
1217
|
+
type StatChartProps = React.ComponentProps<'div'>;
|
|
1188
1218
|
interface StatChangeProps extends React.ComponentProps<'div'> {
|
|
1189
1219
|
trend?: Trend;
|
|
1190
1220
|
sentiment?: Sentiment;
|
|
1221
|
+
/** `'chip'` wraps the change in a sentiment-tinted pill. Defaults to `'text'`. */
|
|
1222
|
+
variant?: ChangeVariant;
|
|
1191
1223
|
}
|
|
1192
|
-
declare function Stat({ variant, size, label, value, change, changeLabel, trend, sentiment, icon, className, children, ...props }: StatProps): react_jsx_runtime.JSX.Element;
|
|
1224
|
+
declare function Stat({ variant, size, label, value, change, changeLabel, trend, sentiment, changeVariant, icon, className, children, ...props }: StatProps): react_jsx_runtime.JSX.Element;
|
|
1193
1225
|
declare function StatLabel({ className, ...props }: StatLabelProps): react_jsx_runtime.JSX.Element;
|
|
1194
1226
|
declare function StatValue({ className, ...props }: StatValueProps): react_jsx_runtime.JSX.Element;
|
|
1195
|
-
|
|
1227
|
+
/**
|
|
1228
|
+
* Styled slot for a consumer-supplied sparkline / mini-chart. The library ships
|
|
1229
|
+
* no charting dependency — drop your own `<svg>`/chart in here and it gets a
|
|
1230
|
+
* consistent height + spacing, stretched to the tile width.
|
|
1231
|
+
*/
|
|
1232
|
+
declare function StatChart({ className, ...props }: StatChartProps): react_jsx_runtime.JSX.Element;
|
|
1233
|
+
declare function StatChange({ trend, sentiment, variant, className, children, ...props }: StatChangeProps): react_jsx_runtime.JSX.Element;
|
|
1196
1234
|
|
|
1197
1235
|
declare const statGroupVariants: (props?: ({
|
|
1198
1236
|
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
@@ -1435,6 +1473,450 @@ declare function TimelineTitle({ className, ...props }: TimelineTitleProps): rea
|
|
|
1435
1473
|
declare function TimelineDescription({ className, ...props }: TimelineDescriptionProps): react_jsx_runtime.JSX.Element;
|
|
1436
1474
|
declare function TimelineTime({ className, ...props }: TimelineTimeProps): react_jsx_runtime.JSX.Element;
|
|
1437
1475
|
|
|
1476
|
+
declare const commandVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
1477
|
+
type CommandProps = React.ComponentProps<typeof Command$1> & VariantProps<typeof commandVariants>;
|
|
1478
|
+
type CommandInputProps = React.ComponentProps<typeof Command$1.Input>;
|
|
1479
|
+
type CommandListProps = React.ComponentProps<typeof Command$1.List>;
|
|
1480
|
+
type CommandEmptyProps = React.ComponentProps<typeof Command$1.Empty>;
|
|
1481
|
+
type CommandGroupProps = React.ComponentProps<typeof Command$1.Group>;
|
|
1482
|
+
type CommandSeparatorProps = React.ComponentProps<typeof Command$1.Separator>;
|
|
1483
|
+
interface CommandItemProps extends Omit<React.ComponentProps<typeof Command$1.Item>, 'onSelect' | 'value'> {
|
|
1484
|
+
/**
|
|
1485
|
+
* Stable value for filtering + the `onSelect` payload. Required: cmdk would
|
|
1486
|
+
* otherwise derive it from the rendered text, so a label / translation /
|
|
1487
|
+
* icon change would silently change what `onSelect` receives.
|
|
1488
|
+
*/
|
|
1489
|
+
value: string;
|
|
1490
|
+
/** Leading icon — mirrors Menubar / DropdownMenu item icons. */
|
|
1491
|
+
startIcon?: React.ReactNode;
|
|
1492
|
+
/** Right-aligned keyboard hint, e.g. `"⌘P"` — mirrors Menubar / DropdownMenu. */
|
|
1493
|
+
shortcut?: React.ReactNode;
|
|
1494
|
+
/**
|
|
1495
|
+
* Fires when the item is chosen (click / Enter). Receives the item's
|
|
1496
|
+
* `value` (cmdk defaults it to the text content when `value` is omitted).
|
|
1497
|
+
*
|
|
1498
|
+
* Action-oriented: items run a command and don't track selection. Inside
|
|
1499
|
+
* `CommandDialog` the consumer closes the dialog here, e.g.
|
|
1500
|
+
* `onSelect={() => { setOpen(false); run(); }}`.
|
|
1501
|
+
*/
|
|
1502
|
+
onSelect?: (value: string) => void;
|
|
1503
|
+
}
|
|
1504
|
+
interface CommandDialogProps extends Pick<React.ComponentProps<typeof Command$1>, 'filter' | 'shouldFilter' | 'loop'> {
|
|
1505
|
+
/** Controlled open state. */
|
|
1506
|
+
open?: boolean;
|
|
1507
|
+
/** Initial open state when uncontrolled. */
|
|
1508
|
+
defaultOpen?: boolean;
|
|
1509
|
+
onOpenChange?: (open: boolean) => void;
|
|
1510
|
+
/**
|
|
1511
|
+
* Key for the built-in document shortcut (with Cmd on macOS / Ctrl elsewhere).
|
|
1512
|
+
* Defaults to `'k'` (⌘K / Ctrl+K). Pass `false` to bind no listener and wire
|
|
1513
|
+
* your own. The modifier is fixed; only the key is configurable.
|
|
1514
|
+
*/
|
|
1515
|
+
shortcut?: string | false;
|
|
1516
|
+
/** Accessible name → visually-hidden `DialogTitle`. Defaults to `"Command palette"`. */
|
|
1517
|
+
label?: React.ReactNode;
|
|
1518
|
+
/** Optional visually-hidden `DialogDescription`. */
|
|
1519
|
+
description?: React.ReactNode;
|
|
1520
|
+
className?: string;
|
|
1521
|
+
/** `CommandInput` + `CommandList` + groups / items. */
|
|
1522
|
+
children: React.ReactNode;
|
|
1523
|
+
}
|
|
1524
|
+
/**
|
|
1525
|
+
* Inline command palette (cmdk root). Pass cmdk's `label` to give the search
|
|
1526
|
+
* input + listbox their accessible name — cmdk wires it via `aria-labelledby`,
|
|
1527
|
+
* which wins over any `aria-label` on `CommandInput`. `CommandDialog` sets this
|
|
1528
|
+
* for you from its `label`.
|
|
1529
|
+
*/
|
|
1530
|
+
declare function Command({ className, ...props }: CommandProps): react_jsx_runtime.JSX.Element;
|
|
1531
|
+
declare function CommandInput({ className, placeholder, 'aria-label': ariaLabel, ...props }: CommandInputProps): react_jsx_runtime.JSX.Element;
|
|
1532
|
+
declare function CommandList({ className, ...props }: CommandListProps): react_jsx_runtime.JSX.Element;
|
|
1533
|
+
declare function CommandEmpty({ className, ...props }: CommandEmptyProps): react_jsx_runtime.JSX.Element;
|
|
1534
|
+
declare function CommandGroup({ className, ...props }: CommandGroupProps): react_jsx_runtime.JSX.Element;
|
|
1535
|
+
declare function CommandSeparator({ className, 'aria-hidden': ariaHidden, ...props }: CommandSeparatorProps): react_jsx_runtime.JSX.Element;
|
|
1536
|
+
declare function CommandItem({ startIcon, shortcut, className, children, keywords, ...props }: CommandItemProps): react_jsx_runtime.JSX.Element;
|
|
1537
|
+
declare function CommandDialog({ open: controlledOpen, defaultOpen, onOpenChange, shortcut, label, description, className, filter, shouldFilter, loop, children, }: CommandDialogProps): react_jsx_runtime.JSX.Element;
|
|
1538
|
+
|
|
1539
|
+
declare const tableVariants: (props?: ({
|
|
1540
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
1541
|
+
striped?: boolean | null | undefined;
|
|
1542
|
+
divided?: boolean | null | undefined;
|
|
1543
|
+
bordered?: boolean | null | undefined;
|
|
1544
|
+
stickyHeader?: boolean | null | undefined;
|
|
1545
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1546
|
+
type Align = 'start' | 'center' | 'end';
|
|
1547
|
+
interface TableProps extends React.ComponentProps<'table'>, VariantProps<typeof tableVariants> {
|
|
1548
|
+
/**
|
|
1549
|
+
* Accessible name for the **scroll region** wrapping the table. Strongly
|
|
1550
|
+
* recommended: a wide table scrolls horizontally, and a named, focusable
|
|
1551
|
+
* region lets keyboard and screen-reader users find and scroll it. When
|
|
1552
|
+
* provided, the wrapper becomes `role="region"` `tabindex="0"`; when omitted,
|
|
1553
|
+
* it degrades to a plain scroll container and a dev warning fires.
|
|
1554
|
+
* Note: this names the region, not the `<table>` — use `<TableCaption>` for
|
|
1555
|
+
* the table's own name.
|
|
1556
|
+
*/
|
|
1557
|
+
'aria-label'?: string;
|
|
1558
|
+
/** Accessible name for the scroll region, by id reference. See `aria-label`. */
|
|
1559
|
+
'aria-labelledby'?: string;
|
|
1560
|
+
/**
|
|
1561
|
+
* Caps the scroll region's block-size (number → px) so the body scrolls
|
|
1562
|
+
* vertically within it. **Required for `stickyHeader` to engage** — sticky
|
|
1563
|
+
* needs a height-constrained, scrollable ancestor; without it the region
|
|
1564
|
+
* grows to content height and the header has nothing to stick to.
|
|
1565
|
+
*/
|
|
1566
|
+
maxHeight?: number | string;
|
|
1567
|
+
}
|
|
1568
|
+
interface TableRowProps extends React.ComponentProps<'tr'> {
|
|
1569
|
+
/** Visually highlights the row and sets `data-state="selected"`. Selection
|
|
1570
|
+
* semantics for assistive tech come from a checkbox in the cell (see the
|
|
1571
|
+
* DataTable recipe), not from the row. */
|
|
1572
|
+
selected?: boolean;
|
|
1573
|
+
}
|
|
1574
|
+
interface TableHeadProps extends Omit<React.ComponentProps<'th'>, 'align' | 'onClick'> {
|
|
1575
|
+
align?: Align;
|
|
1576
|
+
/** Renders the column as sortable: wraps content in a button and sets
|
|
1577
|
+
* `aria-sort`. Sort *logic* is the consumer's — wire `onClick`. */
|
|
1578
|
+
sortable?: boolean;
|
|
1579
|
+
/** Current sort direction, or `false` when unsorted. */
|
|
1580
|
+
sortDirection?: 'asc' | 'desc' | false;
|
|
1581
|
+
/** Click handler bound to the sort button (only rendered when `sortable`). */
|
|
1582
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
1583
|
+
/**
|
|
1584
|
+
* Visually-hidden, **caller-localized** cue appended to the sort button's
|
|
1585
|
+
* accessible name (e.g. "activate to sort ascending"). `aria-sort` already
|
|
1586
|
+
* conveys state, but a focused button otherwise announces only its column
|
|
1587
|
+
* label; this adds the action cue. Kept as a prop (not hard-coded text) so
|
|
1588
|
+
* the design system stays language-neutral — pass Arabic in RTL. Only used
|
|
1589
|
+
* when `sortable`. Typed `string` (not `ReactNode`) so interactive content
|
|
1590
|
+
* can't be hidden into a keyboard-reachable, invisible trap.
|
|
1591
|
+
*/
|
|
1592
|
+
sortLabel?: string;
|
|
1593
|
+
}
|
|
1594
|
+
interface TableCellProps extends Omit<React.ComponentProps<'td'>, 'align'> {
|
|
1595
|
+
align?: Align;
|
|
1596
|
+
}
|
|
1597
|
+
declare function Table({ size, striped, divided, bordered, stickyHeader, className, maxHeight, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, ...props }: TableProps): react_jsx_runtime.JSX.Element;
|
|
1598
|
+
declare function TableHeader({ className, ...props }: React.ComponentProps<'thead'>): react_jsx_runtime.JSX.Element;
|
|
1599
|
+
declare function TableBody({ className, ...props }: React.ComponentProps<'tbody'>): react_jsx_runtime.JSX.Element;
|
|
1600
|
+
declare function TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>): react_jsx_runtime.JSX.Element;
|
|
1601
|
+
declare function TableRow({ className, selected, ...props }: TableRowProps): react_jsx_runtime.JSX.Element;
|
|
1602
|
+
declare function TableHead({ className, align, sortable, sortDirection, sortLabel, onClick, children, ...props }: TableHeadProps): react_jsx_runtime.JSX.Element;
|
|
1603
|
+
declare function TableCell({ className, align, ...props }: TableCellProps): react_jsx_runtime.JSX.Element;
|
|
1604
|
+
declare function TableCaption({ className, ...props }: React.ComponentProps<'caption'>): react_jsx_runtime.JSX.Element;
|
|
1605
|
+
|
|
1606
|
+
declare const inputOTPVariants: (props?: ({
|
|
1607
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
1608
|
+
error?: boolean | null | undefined;
|
|
1609
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1610
|
+
interface InputOTPProps extends Omit<React.ComponentProps<'div'>, 'onChange' | 'defaultValue' | 'children'>, VariantProps<typeof inputOTPVariants> {
|
|
1611
|
+
/** Number of slots. Defaults to 6 (Saudi SMS OTP length). */
|
|
1612
|
+
length?: number;
|
|
1613
|
+
/** Optional visual grouping; must sum to `length`. Default: one group. */
|
|
1614
|
+
groupSizes?: number[];
|
|
1615
|
+
/** Controlled value (the entered characters). */
|
|
1616
|
+
value?: string;
|
|
1617
|
+
/** Uncontrolled initial value. */
|
|
1618
|
+
defaultValue?: string;
|
|
1619
|
+
onChange?: (value: string) => void;
|
|
1620
|
+
/** Fires when all `length` slots are filled. */
|
|
1621
|
+
onComplete?: (value: string) => void;
|
|
1622
|
+
/** Full-string regex the entered value must match. Defaults to digits-only. */
|
|
1623
|
+
pattern?: string;
|
|
1624
|
+
/** Render dots instead of characters (PIN entry). */
|
|
1625
|
+
mask?: boolean;
|
|
1626
|
+
/** Override the divider rendered between groups. */
|
|
1627
|
+
separator?: ReactNode;
|
|
1628
|
+
disabled?: boolean;
|
|
1629
|
+
autoFocus?: boolean;
|
|
1630
|
+
name?: string;
|
|
1631
|
+
required?: boolean;
|
|
1632
|
+
/** Visible field label, auto-associated to the input via `htmlFor`/`id`. */
|
|
1633
|
+
label?: ReactNode;
|
|
1634
|
+
/** Hint shown below the field. Hidden while an error message is showing. */
|
|
1635
|
+
helperText?: ReactNode;
|
|
1636
|
+
/** Message shown below the field when invalid. */
|
|
1637
|
+
errorMessage?: ReactNode;
|
|
1638
|
+
/** Marks the field invalid: sets `aria-invalid` and error styling. */
|
|
1639
|
+
error?: boolean;
|
|
1640
|
+
}
|
|
1641
|
+
declare function InputOTP({ id: externalId, length, groupSizes, value, defaultValue, onChange, onComplete, pattern, mask, separator, size, disabled, autoFocus, name, required, label, helperText, errorMessage, error, className, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, ...props }: InputOTPProps): react_jsx_runtime.JSX.Element;
|
|
1642
|
+
|
|
1643
|
+
declare const linkVariants: (props?: ({
|
|
1644
|
+
variant?: "default" | "subtle" | "standalone" | null | undefined;
|
|
1645
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1646
|
+
interface LinkProps extends React.ComponentProps<'a'>, VariantProps<typeof linkVariants> {
|
|
1647
|
+
/**
|
|
1648
|
+
* External link: appends a decorative ↗ icon and sets
|
|
1649
|
+
* `rel="noopener noreferrer"` (merged with any consumer `rel`). `target` is
|
|
1650
|
+
* left to the consumer — forcing `_blank` is an a11y opinion best owned by
|
|
1651
|
+
* the caller.
|
|
1652
|
+
*/
|
|
1653
|
+
external?: boolean;
|
|
1654
|
+
/** Leading icon (standalone-friendly). Decorative — rendered `aria-hidden`. */
|
|
1655
|
+
startIcon?: ReactNode;
|
|
1656
|
+
/**
|
|
1657
|
+
* Trailing icon. Decorative. When both `external` and `endIcon` are set, the
|
|
1658
|
+
* consumer's `endIcon` wins (the auto ↗ is suppressed).
|
|
1659
|
+
*/
|
|
1660
|
+
endIcon?: ReactNode;
|
|
1661
|
+
/**
|
|
1662
|
+
* Flip start/end icons horizontally in RTL (for directional arrows/chevrons).
|
|
1663
|
+
* Does NOT apply to the auto `external` icon, which is RTL-neutral by design
|
|
1664
|
+
* (a symbolic "leaves the site" cue, not a directional glyph).
|
|
1665
|
+
*/
|
|
1666
|
+
iconFlip?: boolean;
|
|
1667
|
+
/**
|
|
1668
|
+
* Render as the single child element instead of an `<a>`. Lets consumers
|
|
1669
|
+
* compose with framework routers (`<Link asChild><RouterLink to="…">…</RouterLink></Link>`).
|
|
1670
|
+
* `Slottable` marks where the child's own content lands so the icons render
|
|
1671
|
+
* around it. In this mode the href dev-warning is skipped — the consumer's
|
|
1672
|
+
* element owns its attributes.
|
|
1673
|
+
*/
|
|
1674
|
+
asChild?: boolean;
|
|
1675
|
+
}
|
|
1676
|
+
declare function Link({ variant, external, startIcon, endIcon, iconFlip, asChild, className, children, rel, ...props }: LinkProps): react_jsx_runtime.JSX.Element;
|
|
1677
|
+
|
|
1678
|
+
interface SearchBoxProps extends Omit<InputProps, 'startAdornment' | 'endAdornment' | 'type'> {
|
|
1679
|
+
/** Fires on Enter with the current query string. */
|
|
1680
|
+
onSearch?: (value: string) => void;
|
|
1681
|
+
/** Fires when the field is cleared (clear button or Escape). */
|
|
1682
|
+
onClear?: () => void;
|
|
1683
|
+
/** Show the clear (×) button while the field has a value. Default `true`. */
|
|
1684
|
+
clearable?: boolean;
|
|
1685
|
+
/** Accessible label for the clear button. Default `'Clear search'`. */
|
|
1686
|
+
clearLabel?: string;
|
|
1687
|
+
}
|
|
1688
|
+
declare function SearchBox({ value, defaultValue, onChange, onKeyDown, onSearch, onClear, clearable, clearLabel, className, ref, ...rest }: SearchBoxProps): react_jsx_runtime.JSX.Element;
|
|
1689
|
+
|
|
1690
|
+
declare const listVariants: (props?: ({
|
|
1691
|
+
variant?: "plain" | "bulleted" | "numbered" | "lettered" | null | undefined;
|
|
1692
|
+
divided?: boolean | null | undefined;
|
|
1693
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1694
|
+
interface ListProps extends Omit<React.ComponentProps<'ul'>, 'type'>, VariantProps<typeof listVariants> {
|
|
1695
|
+
/** Ordered variants (`numbered` / `lettered`) only — the ordinal to start from. */
|
|
1696
|
+
start?: number;
|
|
1697
|
+
/** Ordered variants only — count the ordinals down instead of up. */
|
|
1698
|
+
reversed?: boolean;
|
|
1699
|
+
}
|
|
1700
|
+
type ListItemProps = React.ComponentProps<'li'>;
|
|
1701
|
+
type ListItemIconProps = React.ComponentProps<'span'>;
|
|
1702
|
+
type ListItemActionProps = React.ComponentProps<'div'>;
|
|
1703
|
+
interface ListItemContentProps extends React.ComponentProps<'div'> {
|
|
1704
|
+
/**
|
|
1705
|
+
* Primary line. Ignored if `children` is provided — `children` fully
|
|
1706
|
+
* replaces the primary/secondary rendering (use one or the other).
|
|
1707
|
+
*/
|
|
1708
|
+
primary?: ReactNode;
|
|
1709
|
+
/** Secondary, de-emphasized line below the primary. Ignored if `children` is set. */
|
|
1710
|
+
secondary?: ReactNode;
|
|
1711
|
+
}
|
|
1712
|
+
declare function List({ variant, divided, className, start, reversed, ...props }: ListProps): react_jsx_runtime.JSX.Element;
|
|
1713
|
+
declare function ListItem({ className, ...props }: ListItemProps): react_jsx_runtime.JSX.Element;
|
|
1714
|
+
declare function ListItemIcon({ className, ...props }: ListItemIconProps): react_jsx_runtime.JSX.Element;
|
|
1715
|
+
declare function ListItemContent({ primary, secondary, className, children, ...props }: ListItemContentProps): react_jsx_runtime.JSX.Element;
|
|
1716
|
+
declare function ListItemAction({ className, ...props }: ListItemActionProps): react_jsx_runtime.JSX.Element;
|
|
1717
|
+
|
|
1718
|
+
declare const quoteVariants: (props?: ({
|
|
1719
|
+
variant?: "default" | "plain" | "pullquote" | "testimonial" | null | undefined;
|
|
1720
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1721
|
+
interface QuoteProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof quoteVariants> {
|
|
1722
|
+
/** The quote text. Rendered inside the `<blockquote>`. */
|
|
1723
|
+
children?: ReactNode;
|
|
1724
|
+
/** Show a decorative opening quotation mark (RTL-flipped). Defaults to `false`. */
|
|
1725
|
+
quoteMark?: boolean;
|
|
1726
|
+
/**
|
|
1727
|
+
* Attribution media (e.g. an `<Avatar />`), rendered at the inline-start of the
|
|
1728
|
+
* caption. Only shown alongside textual attribution (`author`/`byline`/`source`)
|
|
1729
|
+
* — an avatar with no name is decorative-only and would leave the
|
|
1730
|
+
* `<figcaption>` empty to assistive tech, so it is dropped on its own. Most
|
|
1731
|
+
* natural on `testimonial`. Quote renders whatever node you pass — it takes no
|
|
1732
|
+
* Avatar dependency.
|
|
1733
|
+
*/
|
|
1734
|
+
avatar?: ReactNode;
|
|
1735
|
+
/** Attribution name (e.g. the person quoted). Rendered as plain text. */
|
|
1736
|
+
author?: ReactNode;
|
|
1737
|
+
/**
|
|
1738
|
+
* Secondary attribution line below the author — typically a job title or
|
|
1739
|
+
* affiliation (e.g. "Product Manager, DGA"). Named `byline` rather than `role`
|
|
1740
|
+
* so the native ARIA `role` attribute stays available on the root element.
|
|
1741
|
+
*/
|
|
1742
|
+
byline?: ReactNode;
|
|
1743
|
+
/** Title of the work, rendered in a real `<cite>` element. */
|
|
1744
|
+
source?: ReactNode;
|
|
1745
|
+
/**
|
|
1746
|
+
* URL of the source document — set as the `cite=` **attribute** on the
|
|
1747
|
+
* `<blockquote>` (machine-readable, not visible). For a visible work title use
|
|
1748
|
+
* `source`.
|
|
1749
|
+
*/
|
|
1750
|
+
cite?: string;
|
|
1751
|
+
}
|
|
1752
|
+
type QuoteContentProps = React.ComponentProps<'div'> & {
|
|
1753
|
+
asChild?: boolean;
|
|
1754
|
+
};
|
|
1755
|
+
type QuoteCaptionProps = React.ComponentProps<'figcaption'> & {
|
|
1756
|
+
asChild?: boolean;
|
|
1757
|
+
};
|
|
1758
|
+
type QuoteAuthorProps = React.ComponentProps<'span'> & {
|
|
1759
|
+
asChild?: boolean;
|
|
1760
|
+
};
|
|
1761
|
+
type QuoteSourceProps = React.ComponentProps<'cite'> & {
|
|
1762
|
+
asChild?: boolean;
|
|
1763
|
+
};
|
|
1764
|
+
/**
|
|
1765
|
+
* Visual-only quote. Renders a `<blockquote>`; when textual attribution
|
|
1766
|
+
* (`author`/`byline`/`source`) is present it is wrapped in a `<figure>` with a
|
|
1767
|
+
* `<figcaption>` (a `<figcaption>` must not be empty, so a bare quote stays a
|
|
1768
|
+
* lone `<blockquote>`).
|
|
1769
|
+
*
|
|
1770
|
+
* No `asChild` on the root: the `figure`/`blockquote`/`figcaption` composite has
|
|
1771
|
+
* fixed semantics (documented carve-out, mirrors `EmptyState`/`Timeline`/`List`).
|
|
1772
|
+
* The exported sub-parts carry `asChild` for hand-assembled compositions.
|
|
1773
|
+
*/
|
|
1774
|
+
declare function Quote({ variant, quoteMark, avatar, author, byline, source, cite, className, children, ...props }: QuoteProps): react_jsx_runtime.JSX.Element;
|
|
1775
|
+
/** Body wrapper inside the `<blockquote>`. */
|
|
1776
|
+
declare function QuoteContent({ asChild, className, ...props }: QuoteContentProps): react_jsx_runtime.JSX.Element;
|
|
1777
|
+
/** Caption (attribution) below the quote. Pair with a `<figure>` root. */
|
|
1778
|
+
declare function QuoteCaption({ asChild, className, ...props }: QuoteCaptionProps): react_jsx_runtime.JSX.Element;
|
|
1779
|
+
/** Attribution name. */
|
|
1780
|
+
declare function QuoteAuthor({ asChild, className, ...props }: QuoteAuthorProps): react_jsx_runtime.JSX.Element;
|
|
1781
|
+
/** Title of the cited work — a real `<cite>` element. */
|
|
1782
|
+
declare function QuoteSource({ asChild, className, ...props }: QuoteSourceProps): react_jsx_runtime.JSX.Element;
|
|
1783
|
+
|
|
1784
|
+
type CollapsibleProps = React.ComponentProps<typeof Collapsible$1.Root>;
|
|
1785
|
+
type CollapsibleTriggerProps = React.ComponentProps<typeof Collapsible$1.Trigger>;
|
|
1786
|
+
type CollapsibleContentProps = React.ComponentProps<typeof Collapsible$1.Content>;
|
|
1787
|
+
declare function Collapsible({ className, ...props }: CollapsibleProps): react_jsx_runtime.JSX.Element;
|
|
1788
|
+
declare function CollapsibleTrigger({ className, ...props }: CollapsibleTriggerProps): react_jsx_runtime.JSX.Element;
|
|
1789
|
+
declare function CollapsibleContent({ className, children, ...props }: CollapsibleContentProps): react_jsx_runtime.JSX.Element;
|
|
1790
|
+
|
|
1791
|
+
declare const tagInputVariants: (props?: ({
|
|
1792
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
1793
|
+
error?: boolean | null | undefined;
|
|
1794
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1795
|
+
type NativeInputProps = Omit<React.ComponentProps<'input'>, 'value' | 'defaultValue' | 'onChange' | 'size'>;
|
|
1796
|
+
interface TagInputProps extends NativeInputProps, Omit<VariantProps<typeof tagInputVariants>, 'error'> {
|
|
1797
|
+
/** Controlled tag list. */
|
|
1798
|
+
value?: string[];
|
|
1799
|
+
/** Uncontrolled initial tag list. */
|
|
1800
|
+
defaultValue?: string[];
|
|
1801
|
+
/** Fires with the full accepted tag set after every add/remove. */
|
|
1802
|
+
onChange?: (tags: string[]) => void;
|
|
1803
|
+
/** Visible field label, associated to the text input. */
|
|
1804
|
+
label?: ReactNode;
|
|
1805
|
+
/** Hint shown below the field. Hidden while an error message is showing. */
|
|
1806
|
+
helperText?: ReactNode;
|
|
1807
|
+
/** Message shown below the field when invalid. */
|
|
1808
|
+
errorMessage?: ReactNode;
|
|
1809
|
+
/** Marks the field invalid: sets `aria-invalid` and error styling. */
|
|
1810
|
+
error?: boolean;
|
|
1811
|
+
/** Caps the number of tags. Adds beyond the cap are no-ops. */
|
|
1812
|
+
max?: number;
|
|
1813
|
+
/** Allow the same tag more than once. Off → duplicates are rejected. */
|
|
1814
|
+
allowDuplicates?: boolean;
|
|
1815
|
+
/** Make duplicate detection case-sensitive. Default: case-insensitive. */
|
|
1816
|
+
caseSensitive?: boolean;
|
|
1817
|
+
/** Consumer gate run on each candidate tag. Return false to reject (draft kept). */
|
|
1818
|
+
validate?: (tag: string, tags: string[]) => boolean;
|
|
1819
|
+
/** Characters that commit the draft and split a paste. Newline always splits a paste. */
|
|
1820
|
+
delimiters?: string[];
|
|
1821
|
+
/** Badge variant used for the chips. */
|
|
1822
|
+
chipVariant?: BadgeProps['variant'];
|
|
1823
|
+
/** Accessible name for each chip's remove button. */
|
|
1824
|
+
removeLabel?: (tag: string) => string;
|
|
1825
|
+
/** Live-region text announced on add/remove (screen readers). */
|
|
1826
|
+
formatAnnouncement?: (tag: string, action: 'add' | 'remove') => string;
|
|
1827
|
+
}
|
|
1828
|
+
declare function TagInput({ id: externalId, value, defaultValue, onChange, label, helperText, errorMessage, error, size, disabled, placeholder, max, allowDuplicates, caseSensitive, validate, delimiters, chipVariant, removeLabel, formatAnnouncement, className, ...props }: TagInputProps): react_jsx_runtime.JSX.Element;
|
|
1829
|
+
|
|
1830
|
+
declare const dateRangePickerTriggerVariants: (props?: ({
|
|
1831
|
+
size?: "sm" | "md" | null | undefined;
|
|
1832
|
+
error?: boolean | null | undefined;
|
|
1833
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1834
|
+
declare const dateRangePickerVariants: (props?: ({
|
|
1835
|
+
size?: "sm" | "md" | null | undefined;
|
|
1836
|
+
error?: boolean | null | undefined;
|
|
1837
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1838
|
+
/** A complete, inclusive date range. Both ends are local Y/M/D. */
|
|
1839
|
+
interface DateRange {
|
|
1840
|
+
start: Date;
|
|
1841
|
+
end: Date;
|
|
1842
|
+
}
|
|
1843
|
+
interface DateRangePickerProps extends VariantProps<typeof dateRangePickerTriggerVariants> {
|
|
1844
|
+
/** Currently selected range (controlled). `null` clears it. */
|
|
1845
|
+
value?: DateRange | null;
|
|
1846
|
+
/** Initial range when uncontrolled. */
|
|
1847
|
+
defaultValue?: DateRange | null;
|
|
1848
|
+
/** Fires when a complete range is picked, or `null` when cleared. */
|
|
1849
|
+
onChange?: (value: DateRange | null) => void;
|
|
1850
|
+
/** Earliest pickable date (inclusive). */
|
|
1851
|
+
minValue?: Date;
|
|
1852
|
+
/** Latest pickable date (inclusive). */
|
|
1853
|
+
maxValue?: Date;
|
|
1854
|
+
/** Visible label above the trigger. */
|
|
1855
|
+
label?: ReactNode;
|
|
1856
|
+
/** Hint shown below the trigger. Hidden while an error message is showing. */
|
|
1857
|
+
helperText?: ReactNode;
|
|
1858
|
+
/** Message shown below the trigger when `error` is true. */
|
|
1859
|
+
errorMessage?: ReactNode;
|
|
1860
|
+
/** Marks the field invalid — sets `aria-invalid` and error styling. */
|
|
1861
|
+
error?: boolean;
|
|
1862
|
+
/** Marks the field required — adds the asterisk + `aria-required`. */
|
|
1863
|
+
required?: boolean;
|
|
1864
|
+
/** Disables the trigger entirely. */
|
|
1865
|
+
disabled?: boolean;
|
|
1866
|
+
/** Caller-supplied id for the field. */
|
|
1867
|
+
id?: string;
|
|
1868
|
+
/** Forwarded to the Group (the trigger row), matching Input/Select. */
|
|
1869
|
+
className?: string;
|
|
1870
|
+
'aria-label'?: string;
|
|
1871
|
+
'aria-labelledby'?: string;
|
|
1872
|
+
/** Calendar system (controlled). Omit to let the user toggle freely. */
|
|
1873
|
+
calendar?: CalendarSystem;
|
|
1874
|
+
/** Initial calendar system when uncontrolled. Defaults to `'gregorian'`. */
|
|
1875
|
+
defaultCalendar?: CalendarSystem;
|
|
1876
|
+
/** Fires whenever the calendar system toggles. */
|
|
1877
|
+
onCalendarChange?: (calendar: CalendarSystem) => void;
|
|
1878
|
+
/**
|
|
1879
|
+
* Show the Gregorian↔Hijri toggle inside the popover. Defaults to `true`, but
|
|
1880
|
+
* is forced off when `calendar` is controlled.
|
|
1881
|
+
*/
|
|
1882
|
+
showCalendarToggle?: boolean;
|
|
1883
|
+
/** Override the toggle labels. Defaults are locale-aware (English / Arabic). */
|
|
1884
|
+
calendarLabels?: CalendarLabels;
|
|
1885
|
+
/**
|
|
1886
|
+
* When `true`, each day cell also shows the *other* calendar's day number as
|
|
1887
|
+
* small secondary text. Helps cross-reference Hijri↔Gregorian. Default `false`.
|
|
1888
|
+
*/
|
|
1889
|
+
showSecondaryCalendar?: boolean;
|
|
1890
|
+
}
|
|
1891
|
+
declare function DateRangePicker({ value: controlledValue, defaultValue, onChange, minValue, maxValue, label, helperText, errorMessage, error, required, disabled, size, id, className, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, calendar: controlledCalendar, defaultCalendar, onCalendarChange, showCalendarToggle, calendarLabels, showSecondaryCalendar, }: DateRangePickerProps): react_jsx_runtime.JSX.Element;
|
|
1892
|
+
|
|
1893
|
+
interface AspectRatioProps extends React.ComponentProps<'div'> {
|
|
1894
|
+
/**
|
|
1895
|
+
* Width-to-height ratio, fed to the native CSS `aspect-ratio` property.
|
|
1896
|
+
* Prefer the readable string form (`ratio="16/9"`) — it stays legible in the
|
|
1897
|
+
* rendered DOM and is a true CSS `<ratio>`. The numeric form (`ratio={16 / 9}`)
|
|
1898
|
+
* also works but JavaScript evaluates it to a float (`1.777…`), so the
|
|
1899
|
+
* original intent is lost in dev tools. Default `1` (square).
|
|
1900
|
+
*/
|
|
1901
|
+
ratio?: number | string;
|
|
1902
|
+
/**
|
|
1903
|
+
* Render the ratio onto the single child element (e.g. an `<img>` / `<video>`)
|
|
1904
|
+
* via Radix `Slot`, instead of wrapping it in a `<div>`. Avoids an extra
|
|
1905
|
+
* wrapper around media.
|
|
1906
|
+
*/
|
|
1907
|
+
asChild?: boolean;
|
|
1908
|
+
}
|
|
1909
|
+
/**
|
|
1910
|
+
* Constrains its content to a fixed width-to-height ratio so layouts don't shift
|
|
1911
|
+
* as media loads. Built on the native CSS `aspect-ratio` property (Baseline
|
|
1912
|
+
* since 2021) — not the legacy padding-bottom hack.
|
|
1913
|
+
*
|
|
1914
|
+
* The box is full-width by default; set the bounding width via `className` /
|
|
1915
|
+
* `style` (or a parent) and the height follows from `ratio`. A single child
|
|
1916
|
+
* (image, video, iframe, chart) fills the box with `object-fit: cover`.
|
|
1917
|
+
*/
|
|
1918
|
+
declare function AspectRatio({ ratio, asChild, className, style, ...props }: AspectRatioProps): react_jsx_runtime.JSX.Element;
|
|
1919
|
+
|
|
1438
1920
|
type DgaRootElement = 'div' | 'main' | 'nav' | 'section' | 'article' | 'aside' | 'header' | 'footer';
|
|
1439
1921
|
interface DgaProviderProps {
|
|
1440
1922
|
dir?: 'ltr' | 'rtl';
|
|
@@ -1546,4 +2028,4 @@ declare function FieldMessage({ id, variant, children }: FieldMessageProps): rea
|
|
|
1546
2028
|
|
|
1547
2029
|
declare function cn(...inputs: ClassValue[]): string;
|
|
1548
2030
|
|
|
1549
|
-
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, type AlertDescriptionProps, type AlertProps, type
|
|
2031
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, type AlertDescriptionProps, type AlertProps, AlertTitle, type AlertTitleProps, AspectRatio, type AspectRatioProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarGroup, type AvatarGroupProps, AvatarImage, type AvatarImageProps, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, type BreadcrumbListProps, BreadcrumbPage, type BreadcrumbPageProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, Button, type ButtonProps, type CalendarLabels, type CalendarSystem, Card, CardContent, CardDescription, type CardDescriptionProps, CardFooter, CardHeader, CardImage, type CardImageProps, type CardProps, type CardSectionProps, CardTitle, type CardTitleProps, Checkbox, type CheckboxProps, CircularProgress, type CircularProgressProps, Collapsible, CollapsibleContent, type CollapsibleContentProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps, Combobox, ComboboxGroup, type ComboboxGroupProps, ComboboxItem, type ComboboxItemProps, type ComboboxProps, ComboboxSeparator, type ComboboxSeparatorProps, Command, CommandDialog, type CommandDialogProps, CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, type CommandProps, CommandSeparator, type CommandSeparatorProps, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, DescriptionDetails, type DescriptionDetailsProps, DescriptionItem, type DescriptionItemProps, DescriptionList, type DescriptionListProps, DescriptionTerm, type DescriptionTermProps, DgaProvider, type DgaProviderProps, Divider, type DividerProps, Drawer, DrawerBody, DrawerClose, type DrawerCloseProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, DrawerHeader, type DrawerProps, type DrawerSectionProps, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, EmptyState, EmptyStateActions, type EmptyStateActionsProps, EmptyStateDescription, type EmptyStateDescriptionProps, EmptyStateMedia, type EmptyStateMediaProps, type EmptyStateProps, EmptyStateTitle, type EmptyStateTitleProps, type FieldA11y, FieldMessage, type FieldMessageProps, type FileRejection, type FileStatus, FileUpload, type FileUploadProps, Input, InputOTP, type InputOTPProps, type InputProps, Link, type LinkProps, List, ListItem, ListItemAction, type ListItemActionProps, ListItemContent, type ListItemContentProps, ListItemIcon, type ListItemIconProps, type ListItemProps, type ListProps, Menubar, MenubarCheckboxItem, type MenubarCheckboxItemProps, MenubarContent, type MenubarContentProps, MenubarGroup, type MenubarGroupProps, MenubarItem, type MenubarItemProps, MenubarLabel, type MenubarLabelProps, MenubarMenu, type MenubarMenuProps, type MenubarProps, MenubarRadioGroup, type MenubarRadioGroupProps, MenubarRadioItem, type MenubarRadioItemProps, MenubarSeparator, type MenubarSeparatorProps, MenubarSub, MenubarSubContent, type MenubarSubContentProps, type MenubarSubProps, MenubarSubTrigger, type MenubarSubTriggerProps, MenubarTrigger, type MenubarTriggerProps, Modal, ModalClose, type ModalCloseProps, ModalContent, type ModalContentProps, ModalDescription, type ModalDescriptionProps, ModalFooter, ModalHeader, type ModalProps, type ModalSectionProps, ModalTitle, type ModalTitleProps, ModalTrigger, type ModalTriggerProps, NumberInput, type NumberInputProps, Pagination, PaginationContent, type PaginationContentProps, PaginationEllipsis, type PaginationEllipsisProps, PaginationItem, type PaginationItemProps, PaginationLink, type PaginationLinkProps, PaginationNext, type PaginationNextProps, PaginationPrevious, type PaginationPreviousProps, type PaginationProps, Popover, PopoverAnchor, type PopoverAnchorProps, PopoverClose, type PopoverCloseProps, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Progress, type ProgressProps, Quote, QuoteAuthor, type QuoteAuthorProps, QuoteCaption, type QuoteCaptionProps, QuoteContent, type QuoteContentProps, type QuoteProps, QuoteSource, type QuoteSourceProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, type RejectionCode, ScrollArea, type ScrollAreaOrientation, type ScrollAreaProps, SearchBox, type SearchBoxProps, Select, SelectItem, type SelectItemProps, type SelectProps, Sidebar, SidebarContent, type SidebarContextValue, SidebarFooter, SidebarGroup, SidebarGroupAction, type SidebarGroupActionProps, SidebarGroupContent, type SidebarGroupDivProps, SidebarGroupLabel, SidebarHeader, SidebarInset, type SidebarInsetProps, SidebarMenu, SidebarMenuAction, type SidebarMenuActionProps, SidebarMenuBadge, SidebarMenuButton, type SidebarMenuButtonProps, SidebarMenuItem, SidebarMenuSkeleton, type SidebarMenuSkeletonProps, SidebarMenuSub, SidebarMenuSubButton, type SidebarMenuSubButtonProps, SidebarMenuSubItem, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarRail, type SidebarSectionProps, SidebarSeparator, SidebarTrigger, type SidebarTriggerProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderValue, Spinner, type SpinnerProps, Stat, StatChange, type StatChangeProps, StatChart, type StatChartProps, StatGroup, type StatGroupProps, StatLabel, type StatLabelProps, type StatProps, StatValue, type StatValueProps, Step, StepDescription, type StepDescriptionProps, StepIndicator, type StepIndicatorProps, type StepProps, type StepState, StepTitle, type StepTitleProps, Steps, type StepsProps, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, type TableCellProps, TableFooter, TableHead, type TableHeadProps, TableHeader, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TagInput, type TagInputProps, Textarea, type TextareaProps, Timeline, TimelineContent, type TimelineContentProps, TimelineDescription, type TimelineDescriptionProps, TimelineItem, type TimelineItemProps, TimelineMarker, type TimelineMarkerProps, type TimelineProps, type TimelineStatus, TimelineTime, type TimelineTimeProps, TimelineTitle, type TimelineTitleProps, type ToastAction, type ToastData, type ToastOptions, type ToastPosition, type ToastStore, type ToastVariant, Toaster, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipTrigger, type TooltipTriggerProps, type UploadFile, type UseFieldA11yOptions, accordionVariants, alertVariants, avatarVariants, badgeVariants, breadcrumbVariants, buttonVariants, cardVariants, checkboxVariants, circularProgressVariants, cn, comboboxTriggerVariants, comboboxVariants, commandVariants, createToast, createToastStore, datePickerVariants, dateRangePickerTriggerVariants, dateRangePickerVariants, descriptionListVariants, dividerVariants, drawerVariants, dropdownMenuVariants, emptyStateVariants, inputOTPVariants, inputVariants, linkVariants, listVariants, menubarContentVariants, menubarTriggerVariants, modalContentVariants, numberInputVariants, paginationLinkVariants, paginationVariants, popoverContentVariants, progressVariants, quoteVariants, radioGroupVariants, radioVariants, ratingVariants, scrollAreaVariants, selectTriggerVariants, sidebarMenuButtonVariants, sidebarMenuSubButtonVariants, skeletonVariants, sliderVariants, spinnerVariants, statGroupVariants, statVariants, stepVariants, stepsVariants, switchVariants, tableVariants, tabsListVariants, tabsVariants, tagInputVariants, textareaVariants, timelineMarkerVariants, timelineVariants, toast, toastStore, toastVariants, toastViewportVariants, toggleGroupVariants, toggleVariants, tooltipContentVariants, useDga, useDir, useFieldA11y, useIsMobile, useSidebar };
|