@uselets/ui 1.18.6 → 1.18.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/components/accordion.d.ts +5 -5
- package/dist/components/alert-dialog.d.ts +13 -13
- package/dist/components/alert.d.ts +5 -5
- package/dist/components/anchor.d.ts +2 -2
- package/dist/components/area-chart.d.ts +6 -6
- package/dist/components/avatar.d.ts +7 -7
- package/dist/components/badge.d.ts +2 -2
- package/dist/components/bar-chart.d.ts +7 -7
- package/dist/components/breadcrumb.d.ts +8 -8
- package/dist/components/button-group.d.ts +4 -4
- package/dist/components/button.d.ts +2 -2
- package/dist/components/calendar.d.ts +3 -3
- package/dist/components/card.d.ts +8 -8
- package/dist/components/carousel.d.ts +8 -8
- package/dist/components/carousel.js +1 -1
- package/dist/components/carousel.js.map +1 -1
- package/dist/components/center.d.ts +2 -2
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/code.d.ts +2 -2
- package/dist/components/collapsible.d.ts +4 -4
- package/dist/components/combobox.d.ts +17 -17
- package/dist/components/command.d.ts +10 -10
- package/dist/components/container.d.ts +2 -2
- package/dist/components/date-range-picker.d.ts +13 -13
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/date-range-picker.js.map +1 -1
- package/dist/components/dialog.d.ts +13 -13
- package/dist/components/dialog.js +1 -1
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/donut-chart.d.ts +2 -2
- package/dist/components/drawer.d.ts +13 -13
- package/dist/components/drawer.js +1 -1
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.d.ts +16 -16
- package/dist/components/dropzone.d.ts +18 -18
- package/dist/components/empty.d.ts +7 -7
- package/dist/components/field.d.ts +11 -11
- package/dist/components/flex.d.ts +2 -2
- package/dist/components/grid.d.ts +3 -3
- package/dist/components/group.d.ts +2 -2
- package/dist/components/heading.d.ts +2 -2
- package/dist/components/hover-card.d.ts +4 -4
- package/dist/components/input-group.d.ts +7 -7
- package/dist/components/input-otp.d.ts +5 -5
- package/dist/components/input.d.ts +2 -2
- package/dist/components/kbd.d.ts +3 -3
- package/dist/components/label.d.ts +2 -2
- package/dist/components/list.d.ts +4 -4
- package/dist/components/logo.d.ts +10 -10
- package/dist/components/marker.d.ts +4 -4
- package/dist/components/mask-input.d.ts +2 -2
- package/dist/components/native-select.d.ts +4 -4
- package/dist/components/navigation-menu.d.ts +9 -9
- package/dist/components/number-field.d.ts +7 -7
- package/dist/components/pagination.d.ts +8 -8
- package/dist/components/phone-input.d.ts +2 -2
- package/dist/components/pie-chart.d.ts +5 -5
- package/dist/components/popover.d.ts +8 -8
- package/dist/components/progress.d.ts +2 -2
- package/dist/components/radio-group.d.ts +3 -3
- package/dist/components/resizable.d.ts +4 -4
- package/dist/components/ring-progress.d.ts +3 -3
- package/dist/components/scroll-area.d.ts +3 -3
- package/dist/components/select.d.ts +11 -11
- package/dist/components/separator.d.ts +2 -2
- package/dist/components/sidebar.d.ts +24 -24
- package/dist/components/simple-grid.d.ts +2 -2
- package/dist/components/skeleton.d.ts +2 -2
- package/dist/components/slider.d.ts +2 -2
- package/dist/components/sonner.d.ts +2 -2
- package/dist/components/spinner.d.ts +2 -2
- package/dist/components/stack.d.ts +2 -2
- package/dist/components/stepper.d.ts +7 -7
- package/dist/components/switch.d.ts +2 -2
- package/dist/components/table.d.ts +10 -10
- package/dist/components/tabs.d.ts +5 -5
- package/dist/components/text.d.ts +2 -2
- package/dist/components/textarea.d.ts +2 -2
- package/dist/components/theme.d.ts +7 -8
- package/dist/components/timeline.d.ts +15 -15
- package/dist/components/toggle-group.d.ts +3 -3
- package/dist/components/toggle.d.ts +2 -2
- package/dist/components/tooltip.d.ts +6 -6
- package/dist/components/unstyled-button.d.ts +2 -2
- package/dist/components/visibility.d.ts +3 -3
- package/dist/hooks/use-breakpoint-value.d.ts +2 -3
- package/dist/hooks/use-breakpoint.d.ts +3 -4
- package/dist/hooks/use-disclosure.d.ts +5 -6
- package/dist/hooks/use-document-visibility.d.ts +1 -2
- package/dist/hooks/use-idle.d.ts +3 -4
- package/dist/hooks/use-interval.d.ts +4 -5
- package/dist/hooks/use-local-storage.d.ts +4 -5
- package/dist/hooks/use-mask.d.ts +3 -3
- package/dist/hooks/use-mobile.d.ts +1 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/lib/badge.d.ts +2 -3
- package/dist/lib/button.d.ts +2 -3
- package/dist/lib/color.d.ts +3 -4
- package/dist/lib/compose-refs.d.ts +2 -3
- package/dist/lib/progress.d.ts +2 -3
- package/dist/lib/utils.d.ts +4 -2
- package/dist/lib/utils.js +1 -1
- package/dist/lib/utils.js.map +1 -1
- package/dist/skills/uselets-ui/references/component-catalog.md +2 -2
- package/package.json +14 -14
- package/skills/uselets-ui/references/component-catalog.md +2 -2
package/README.md
CHANGED
|
@@ -356,8 +356,8 @@ You can import from the package root (`@uselets/ui`) or by subpath (`@uselets/ui
|
|
|
356
356
|
| `checkbox` | `Checkbox` | `Checkbox` supports `size: 'sm' \| 'md' \| 'lg'` (default: `md`), `color: UIColor` (default: `primary`), `label?: React.ReactNode`, and `labelProps` for the composed `Label`. When `label` is provided without `id`, it generates an id and wires `htmlFor` automatically. Label text follows checkbox size: `sm` 12px, `md` 14px, `lg` 20px. |
|
|
357
357
|
| `code` | `Code` | Inline code primitive rendered as `<code>`. |
|
|
358
358
|
| `combobox` | `Combobox`, `ComboboxInput`, `ComboboxContent`, `ComboboxList`, `ComboboxItem`, `ComboboxGroup`, `ComboboxLabel`, `ComboboxCollection`, `ComboboxClear`, `ComboboxEmpty`, `ComboboxSeparator`, `ComboboxChips`, `ComboboxChip`, `ComboboxChipsInput`, `ComboboxTrigger`, `ComboboxValue`, `useComboboxAnchor` | `ComboboxInput` supports `icon?: React.ReactNode`, `triggerIcon?: React.ReactNode`, `showTrigger?: boolean`, and `showClear?: boolean`; `ComboboxChips` supports `showClear?: boolean` to render a button that clears all selected chips at once; `ComboboxContent` supports `container` for rendering inside overlays such as dialogs. |
|
|
359
|
-
| `dialog` | `Dialog`, `DialogTrigger`, `DialogPortal`, `DialogClose`, `DialogOverlay`, `DialogContent`, `DialogHeader`, `DialogBody`, `DialogFooter`, `DialogTitle`, `DialogDescription` | `Dialog` supports `size: 'sm' \| 'md' \| 'lg' \| 'xl' \| '2xl' \| '3xl' \| 'full'` (default: `md`); `full` occupies the entire viewport. `DialogContent` caps its height at `calc(100dvh - 2rem)` and arranges children as a flex column; wrap long content in `DialogBody` (`flex-1 overflow-y-auto`) so the body scrolls while `DialogHeader` and `DialogFooter` stay pinned. `DialogContent.showCloseButton` (default: `true`); `DialogFooter.showCloseButton` (default: `false`). `Dialog.dismissible` (default: `true`); when `false`, clicking outside and pressing Esc no longer close the dialog (the close button and `DialogClose` still work). |
|
|
360
|
-
| `drawer` | `Drawer`, `DrawerTrigger`, `DrawerPortal`, `DrawerClose`, `DrawerOverlay`, `DrawerContent`, `DrawerHeader`, `DrawerBody`, `DrawerFooter`, `DrawerTitle`, `DrawerDescription` | `Drawer` supports `size: 'sm' \| 'md' \| 'lg' \| 'xl' \| '2xl' \| '3xl' \| 'full'` (default: `md`); `DrawerBody` provides padded auto-scroll content; `DrawerFooter` stacks actions on mobile and aligns them to the end on larger breakpoints; `DrawerContent.showCloseButton` (default: `true`). `Drawer.dismissible` (default: `true`); when `false`, clicking outside and pressing Esc no longer close the drawer (the close button and `DrawerClose` still work). `Drawer.direction: 'top' \| 'right' \| 'bottom' \| 'left'` (default: `right`) controls which edge the drawer slides in from. |
|
|
359
|
+
| `dialog` | `Dialog`, `DialogTrigger`, `DialogPortal`, `DialogClose`, `DialogOverlay`, `DialogContent`, `DialogHeader`, `DialogBody`, `DialogFooter`, `DialogTitle`, `DialogDescription` | `Dialog` supports `size: 'sm' \| 'md' \| 'lg' \| 'xl' \| '2xl' \| '3xl' \| 'full'` (default: `md`); `full` occupies the entire viewport. `DialogContent` caps its height at `calc(100dvh - 2rem)` and arranges children as a flex column; wrap long content in `DialogBody` (`flex-1 overflow-y-auto`) so the body scrolls while `DialogHeader` and `DialogFooter` stay pinned. `DialogContent.showCloseButton` (default: `true`); `DialogFooter.showCloseButton` (default: `false`). `Dialog.dismissible` (default: `true`); when `false`, clicking outside and pressing Esc no longer close the dialog (the close button and `DialogClose` still work). `DialogOverlay` and `DialogContent` stop `click`/`submit` events from bubbling to ancestor elements, since Radix portals move them elsewhere in the DOM but React still propagates their synthetic events through the component tree. |
|
|
360
|
+
| `drawer` | `Drawer`, `DrawerTrigger`, `DrawerPortal`, `DrawerClose`, `DrawerOverlay`, `DrawerContent`, `DrawerHeader`, `DrawerBody`, `DrawerFooter`, `DrawerTitle`, `DrawerDescription` | `Drawer` supports `size: 'sm' \| 'md' \| 'lg' \| 'xl' \| '2xl' \| '3xl' \| 'full'` (default: `md`); `DrawerBody` provides padded auto-scroll content; `DrawerFooter` stacks actions on mobile and aligns them to the end on larger breakpoints; `DrawerContent.showCloseButton` (default: `true`). `Drawer.dismissible` (default: `true`); when `false`, clicking outside and pressing Esc no longer close the drawer (the close button and `DrawerClose` still work). `Drawer.direction: 'top' \| 'right' \| 'bottom' \| 'left'` (default: `right`) controls which edge the drawer slides in from. `DrawerOverlay` and `DrawerContent` stop `click`/`submit` events from bubbling to ancestor elements, since Radix portals move them elsewhere in the DOM but React still propagates their synthetic events through the component tree. |
|
|
361
361
|
| `dropzone` | `Dropzone`, `DropzoneArea`, `DropzoneDescription`, `DropzoneFileList`, `DropzoneFileListItem`, `DropzoneFileMessage`, `DropzoneMessage`, `DropzoneRemoveFile`, `DropzoneRetryFile`, `DropzoneTrigger`, `InfiniteProgress`, `useDropzone` | `useDropzone` manages upload lifecycle, validation (`accept`, `minSize`, `maxSize`, `maxFiles`), retry handling, and optional `shiftOnMaxFiles` replacement. Compose the returned state with `Dropzone` and its subcomponents. |
|
|
362
362
|
| `dropdown-menu` | `DropdownMenu`, `DropdownMenuTrigger`, `DropdownMenuContent`, `DropdownMenuItem`, `DropdownMenuCheckboxItem`, `DropdownMenuRadioGroup`, `DropdownMenuRadioItem`, `DropdownMenuSub`, `DropdownMenuSubTrigger`, `DropdownMenuSubContent`, `DropdownMenuSeparator`, `DropdownMenuShortcut` | `DropdownMenuContent` supports `side`, `sideOffset`, `align`, `alignOffset`; items support `inset`, and `DropdownMenuItem` supports `variant: 'default' \| 'destructive'`. |
|
|
363
363
|
| `empty` | `Empty`, `EmptyHeader`, `EmptyMedia`, `EmptyTitle`, `EmptyDescription`, `EmptyContent` | `EmptyMedia` supports `variant: 'default' \| 'icon'` (default: `default`). |
|
|
@@ -2,14 +2,14 @@ import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
|
|
|
2
2
|
import { Accordion as Accordion$1 } from "radix-ui";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
//#region src/components/accordion.d.ts
|
|
5
|
-
type AccordionProps = React.ComponentProps<typeof Accordion$1.Root>;
|
|
6
|
-
type AccordionItemProps = React.ComponentProps<typeof Accordion$1.Item>;
|
|
7
|
-
type AccordionTriggerProps = React.ComponentProps<typeof Accordion$1.Trigger>;
|
|
8
|
-
type AccordionContentProps = React.ComponentProps<typeof Accordion$1.Content>;
|
|
5
|
+
export type AccordionProps = React.ComponentProps<typeof Accordion$1.Root>;
|
|
6
|
+
export type AccordionItemProps = React.ComponentProps<typeof Accordion$1.Item>;
|
|
7
|
+
export type AccordionTriggerProps = React.ComponentProps<typeof Accordion$1.Trigger>;
|
|
8
|
+
export type AccordionContentProps = React.ComponentProps<typeof Accordion$1.Content>;
|
|
9
9
|
declare function Accordion({ className, ...props }: AccordionProps): React.JSX.Element;
|
|
10
10
|
declare function AccordionItem({ className, ...props }: AccordionItemProps): React.JSX.Element;
|
|
11
11
|
declare function AccordionTrigger({ className, children, ...props }: AccordionTriggerProps): React.JSX.Element;
|
|
12
12
|
declare function AccordionContent({ className, children, ...props }: AccordionContentProps): React.JSX.Element;
|
|
13
13
|
//#endregion
|
|
14
|
-
export { Accordion, AccordionContent,
|
|
14
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
15
15
|
//# sourceMappingURL=accordion.d.ts.map
|
|
@@ -3,20 +3,20 @@ import { Button } from "./button.js";
|
|
|
3
3
|
import { AlertDialog as AlertDialog$1 } from "radix-ui";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
//#region src/components/alert-dialog.d.ts
|
|
6
|
-
type AlertDialogProps = React.ComponentProps<typeof AlertDialog$1.Root>;
|
|
7
|
-
type AlertDialogTriggerProps = React.ComponentProps<typeof AlertDialog$1.Trigger>;
|
|
8
|
-
type AlertDialogPortalProps = React.ComponentProps<typeof AlertDialog$1.Portal>;
|
|
9
|
-
type AlertDialogOverlayProps = React.ComponentProps<typeof AlertDialog$1.Overlay>;
|
|
10
|
-
type AlertDialogContentProps = React.ComponentProps<typeof AlertDialog$1.Content> & {
|
|
6
|
+
export type AlertDialogProps = React.ComponentProps<typeof AlertDialog$1.Root>;
|
|
7
|
+
export type AlertDialogTriggerProps = React.ComponentProps<typeof AlertDialog$1.Trigger>;
|
|
8
|
+
export type AlertDialogPortalProps = React.ComponentProps<typeof AlertDialog$1.Portal>;
|
|
9
|
+
export type AlertDialogOverlayProps = React.ComponentProps<typeof AlertDialog$1.Overlay>;
|
|
10
|
+
export type AlertDialogContentProps = React.ComponentProps<typeof AlertDialog$1.Content> & {
|
|
11
11
|
size?: 'sm' | 'md';
|
|
12
12
|
};
|
|
13
|
-
type AlertDialogHeaderProps = React.ComponentProps<'div'>;
|
|
14
|
-
type AlertDialogFooterProps = React.ComponentProps<'div'>;
|
|
15
|
-
type AlertDialogMediaProps = React.ComponentProps<'div'>;
|
|
16
|
-
type AlertDialogTitleProps = React.ComponentProps<typeof AlertDialog$1.Title>;
|
|
17
|
-
type AlertDialogDescriptionProps = React.ComponentProps<typeof AlertDialog$1.Description>;
|
|
18
|
-
type AlertDialogActionProps = React.ComponentProps<typeof AlertDialog$1.Action> & Pick<React.ComponentProps<typeof Button>, 'variant' | 'color' | 'size'>;
|
|
19
|
-
type AlertDialogCancelProps = React.ComponentProps<typeof AlertDialog$1.Cancel> & Pick<React.ComponentProps<typeof Button>, 'variant' | 'color' | 'size'>;
|
|
13
|
+
export type AlertDialogHeaderProps = React.ComponentProps<'div'>;
|
|
14
|
+
export type AlertDialogFooterProps = React.ComponentProps<'div'>;
|
|
15
|
+
export type AlertDialogMediaProps = React.ComponentProps<'div'>;
|
|
16
|
+
export type AlertDialogTitleProps = React.ComponentProps<typeof AlertDialog$1.Title>;
|
|
17
|
+
export type AlertDialogDescriptionProps = React.ComponentProps<typeof AlertDialog$1.Description>;
|
|
18
|
+
export type AlertDialogActionProps = React.ComponentProps<typeof AlertDialog$1.Action> & Pick<React.ComponentProps<typeof Button>, 'variant' | 'color' | 'size'>;
|
|
19
|
+
export type AlertDialogCancelProps = React.ComponentProps<typeof AlertDialog$1.Cancel> & Pick<React.ComponentProps<typeof Button>, 'variant' | 'color' | 'size'>;
|
|
20
20
|
declare function AlertDialog({ ...props }: AlertDialogProps): React.JSX.Element;
|
|
21
21
|
declare function AlertDialogTrigger({ ...props }: AlertDialogTriggerProps): React.JSX.Element;
|
|
22
22
|
declare function AlertDialogPortal({ ...props }: AlertDialogPortalProps): React.JSX.Element;
|
|
@@ -30,5 +30,5 @@ declare function AlertDialogDescription({ className, ...props }: AlertDialogDesc
|
|
|
30
30
|
declare function AlertDialogAction({ className, variant, color, size, ...props }: AlertDialogActionProps): React.JSX.Element;
|
|
31
31
|
declare function AlertDialogCancel({ className, variant, color, size, ...props }: AlertDialogCancelProps): React.JSX.Element;
|
|
32
32
|
//#endregion
|
|
33
|
-
export { AlertDialog, AlertDialogAction,
|
|
33
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };
|
|
34
34
|
//# sourceMappingURL=alert-dialog.d.ts.map
|
|
@@ -5,14 +5,14 @@ import * as React from "react";
|
|
|
5
5
|
declare const alertVariants: (props?: ({
|
|
6
6
|
variant?: "default" | "destructive" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
-
type AlertProps = React.ComponentProps<'div'> & VariantProps<typeof alertVariants>;
|
|
9
|
-
type AlertTitleProps = React.ComponentProps<'div'>;
|
|
10
|
-
type AlertDescriptionProps = React.ComponentProps<'div'>;
|
|
11
|
-
type AlertActionProps = React.ComponentProps<'div'>;
|
|
8
|
+
export type AlertProps = React.ComponentProps<'div'> & VariantProps<typeof alertVariants>;
|
|
9
|
+
export type AlertTitleProps = React.ComponentProps<'div'>;
|
|
10
|
+
export type AlertDescriptionProps = React.ComponentProps<'div'>;
|
|
11
|
+
export type AlertActionProps = React.ComponentProps<'div'>;
|
|
12
12
|
declare function Alert({ className, variant, ...props }: AlertProps): React.JSX.Element;
|
|
13
13
|
declare function AlertTitle({ className, ...props }: AlertTitleProps): React.JSX.Element;
|
|
14
14
|
declare function AlertDescription({ className, ...props }: AlertDescriptionProps): React.JSX.Element;
|
|
15
15
|
declare function AlertAction({ className, ...props }: AlertActionProps): React.JSX.Element;
|
|
16
16
|
//#endregion
|
|
17
|
-
export { Alert, AlertAction,
|
|
17
|
+
export { Alert, AlertAction, AlertDescription, AlertTitle };
|
|
18
18
|
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -6,10 +6,10 @@ declare const anchorVariants: (props?: ({
|
|
|
6
6
|
size?: "lg" | "md" | "sm" | "xl" | "xs" | null | undefined;
|
|
7
7
|
underline?: "always" | "hover" | "never" | "not-hover" | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
|
-
type AnchorProps = React.ComponentProps<'a'> & VariantProps<typeof anchorVariants> & {
|
|
9
|
+
export type AnchorProps = React.ComponentProps<'a'> & VariantProps<typeof anchorVariants> & {
|
|
10
10
|
asChild?: boolean;
|
|
11
11
|
};
|
|
12
12
|
declare function Anchor({ className, size, underline, asChild, ...props }: AnchorProps): React.JSX.Element;
|
|
13
13
|
//#endregion
|
|
14
|
-
export { Anchor,
|
|
14
|
+
export { Anchor, anchorVariants };
|
|
15
15
|
//# sourceMappingURL=anchor.d.ts.map
|
|
@@ -3,16 +3,16 @@ import { c as ChartLegendContentProps, m as ChartTooltipContentProps, n as Chart
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Area, AreaChart as AreaChart$1 } from "recharts";
|
|
5
5
|
//#region src/components/area-chart.d.ts
|
|
6
|
-
type AreaChartSeries = {
|
|
6
|
+
export type AreaChartSeries = {
|
|
7
7
|
name: string;
|
|
8
8
|
label?: string;
|
|
9
9
|
color?: string;
|
|
10
10
|
colorKey?: ChartColorKey;
|
|
11
11
|
};
|
|
12
|
-
type AreaChartType = 'default' | 'stacked' | 'percent' | 'split';
|
|
13
|
-
type AreaChartCurveType = 'linear' | 'monotone' | 'natural' | 'step' | 'bump' | 'stepAfter' | 'stepBefore';
|
|
14
|
-
type AreaChartGridAxis = 'none' | 'x' | 'y' | 'xy';
|
|
15
|
-
type AreaChartProps = Omit<React.ComponentProps<'div'>, 'children'> & {
|
|
12
|
+
export type AreaChartType = 'default' | 'stacked' | 'percent' | 'split';
|
|
13
|
+
export type AreaChartCurveType = 'linear' | 'monotone' | 'natural' | 'step' | 'bump' | 'stepAfter' | 'stepBefore';
|
|
14
|
+
export type AreaChartGridAxis = 'none' | 'x' | 'y' | 'xy';
|
|
15
|
+
export type AreaChartProps = Omit<React.ComponentProps<'div'>, 'children'> & {
|
|
16
16
|
data: Array<Record<string, unknown>>;
|
|
17
17
|
series: AreaChartSeries[];
|
|
18
18
|
dataKey: string;
|
|
@@ -36,5 +36,5 @@ type AreaChartProps = Omit<React.ComponentProps<'div'>, 'children'> & {
|
|
|
36
36
|
};
|
|
37
37
|
declare function AreaChart({ className, data, series, dataKey, type, curveType, withXAxis, withYAxis, gridAxis, withDots, withTooltip, withLegend, connectNulls, unit, fillOpacity, strokeWidth, animationDuration, tooltipProps, legendProps, areaProps, areaChartProps, ...props }: AreaChartProps): React.JSX.Element;
|
|
38
38
|
//#endregion
|
|
39
|
-
export { AreaChart
|
|
39
|
+
export { AreaChart };
|
|
40
40
|
//# sourceMappingURL=area-chart.d.ts.map
|
|
@@ -2,14 +2,14 @@ import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
|
|
|
2
2
|
import { Avatar as Avatar$1 } from "radix-ui";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
//#region src/components/avatar.d.ts
|
|
5
|
-
type AvatarProps = React.ComponentProps<typeof Avatar$1.Root> & {
|
|
5
|
+
export type AvatarProps = React.ComponentProps<typeof Avatar$1.Root> & {
|
|
6
6
|
size?: 'sm' | 'md' | 'lg';
|
|
7
7
|
};
|
|
8
|
-
type AvatarImageProps = React.ComponentProps<typeof Avatar$1.Image>;
|
|
9
|
-
type AvatarFallbackProps = React.ComponentProps<typeof Avatar$1.Fallback>;
|
|
10
|
-
type AvatarBadgeProps = React.ComponentProps<'span'>;
|
|
11
|
-
type AvatarGroupProps = React.ComponentProps<'div'>;
|
|
12
|
-
type AvatarGroupCountProps = React.ComponentProps<'div'>;
|
|
8
|
+
export type AvatarImageProps = React.ComponentProps<typeof Avatar$1.Image>;
|
|
9
|
+
export type AvatarFallbackProps = React.ComponentProps<typeof Avatar$1.Fallback>;
|
|
10
|
+
export type AvatarBadgeProps = React.ComponentProps<'span'>;
|
|
11
|
+
export type AvatarGroupProps = React.ComponentProps<'div'>;
|
|
12
|
+
export type AvatarGroupCountProps = React.ComponentProps<'div'>;
|
|
13
13
|
declare function Avatar({ className, size, ...props }: AvatarProps): React.JSX.Element;
|
|
14
14
|
declare function AvatarImage({ className, ...props }: AvatarImageProps): React.JSX.Element;
|
|
15
15
|
declare function AvatarFallback({ className, ...props }: AvatarFallbackProps): React.JSX.Element;
|
|
@@ -17,5 +17,5 @@ declare function AvatarBadge({ className, ...props }: AvatarBadgeProps): React.J
|
|
|
17
17
|
declare function AvatarGroup({ className, ...props }: AvatarGroupProps): React.JSX.Element;
|
|
18
18
|
declare function AvatarGroupCount({ className, ...props }: AvatarGroupCountProps): React.JSX.Element;
|
|
19
19
|
//#endregion
|
|
20
|
-
export { Avatar, AvatarBadge,
|
|
20
|
+
export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage };
|
|
21
21
|
//# sourceMappingURL=avatar.d.ts.map
|
|
@@ -7,10 +7,10 @@ declare const badgeVariants: (props?: ({
|
|
|
7
7
|
variant?: "outline" | "secondary" | "solid" | "subtle" | null | undefined;
|
|
8
8
|
color?: "blue" | "brand" | "gray" | "green" | "indigo" | "pink" | "primary" | "red" | "yellow" | "zinc" | null | undefined;
|
|
9
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
|
-
type BadgeProps = React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
|
|
10
|
+
export type BadgeProps = React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
|
|
11
11
|
asChild?: boolean;
|
|
12
12
|
};
|
|
13
13
|
declare function Badge({ className, size, variant, color, asChild, ...props }: BadgeProps): React.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { Badge,
|
|
15
|
+
export { Badge, badgeVariants };
|
|
16
16
|
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -3,20 +3,20 @@ import { c as ChartLegendContentProps, m as ChartTooltipContentProps, n as Chart
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Bar, BarChart as BarChart$1 } from "recharts";
|
|
5
5
|
//#region src/components/bar-chart.d.ts
|
|
6
|
-
type BarChartSeries = {
|
|
6
|
+
export type BarChartSeries = {
|
|
7
7
|
name: string;
|
|
8
8
|
label?: string;
|
|
9
9
|
color?: string;
|
|
10
10
|
colorKey?: ChartColorKey;
|
|
11
11
|
};
|
|
12
|
-
type BarChartDatum = Record<string, unknown> & {
|
|
12
|
+
export type BarChartDatum = Record<string, unknown> & {
|
|
13
13
|
color?: string;
|
|
14
14
|
colorKey?: ChartColorKey;
|
|
15
15
|
};
|
|
16
|
-
type BarChartType = 'default' | 'stacked' | 'percent';
|
|
17
|
-
type BarChartOrientation = 'vertical' | 'horizontal';
|
|
18
|
-
type BarChartGridAxis = 'none' | 'x' | 'y' | 'xy';
|
|
19
|
-
type BarChartProps = Omit<React.ComponentProps<'div'>, 'children'> & {
|
|
16
|
+
export type BarChartType = 'default' | 'stacked' | 'percent';
|
|
17
|
+
export type BarChartOrientation = 'vertical' | 'horizontal';
|
|
18
|
+
export type BarChartGridAxis = 'none' | 'x' | 'y' | 'xy';
|
|
19
|
+
export type BarChartProps = Omit<React.ComponentProps<'div'>, 'children'> & {
|
|
20
20
|
data: BarChartDatum[];
|
|
21
21
|
series: BarChartSeries[];
|
|
22
22
|
dataKey: string;
|
|
@@ -38,5 +38,5 @@ type BarChartProps = Omit<React.ComponentProps<'div'>, 'children'> & {
|
|
|
38
38
|
};
|
|
39
39
|
declare function BarChart({ className, data, series, dataKey, type, orientation, withXAxis, withYAxis, gridAxis, withTooltip, withLegend, barSize, radius, unit, animationDuration, tooltipProps, legendProps, barProps, barChartProps, ...props }: BarChartProps): React.JSX.Element;
|
|
40
40
|
//#endregion
|
|
41
|
-
export { BarChart
|
|
41
|
+
export { BarChart };
|
|
42
42
|
//# sourceMappingURL=bar-chart.d.ts.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
//#region src/components/breadcrumb.d.ts
|
|
4
|
-
type BreadcrumbProps = React.ComponentProps<'nav'>;
|
|
5
|
-
type BreadcrumbListProps = React.ComponentProps<'ol'>;
|
|
6
|
-
type BreadcrumbItemProps = React.ComponentProps<'li'>;
|
|
7
|
-
type BreadcrumbLinkProps = React.ComponentProps<'a'> & {
|
|
4
|
+
export type BreadcrumbProps = React.ComponentProps<'nav'>;
|
|
5
|
+
export type BreadcrumbListProps = React.ComponentProps<'ol'>;
|
|
6
|
+
export type BreadcrumbItemProps = React.ComponentProps<'li'>;
|
|
7
|
+
export type BreadcrumbLinkProps = React.ComponentProps<'a'> & {
|
|
8
8
|
asChild?: boolean;
|
|
9
9
|
};
|
|
10
|
-
type BreadcrumbPageProps = React.ComponentProps<'span'>;
|
|
11
|
-
type BreadcrumbSeparatorProps = React.ComponentProps<'li'>;
|
|
12
|
-
type BreadcrumbEllipsisProps = React.ComponentProps<'span'>;
|
|
10
|
+
export type BreadcrumbPageProps = React.ComponentProps<'span'>;
|
|
11
|
+
export type BreadcrumbSeparatorProps = React.ComponentProps<'li'>;
|
|
12
|
+
export type BreadcrumbEllipsisProps = React.ComponentProps<'span'>;
|
|
13
13
|
declare function Breadcrumb({ className, ...props }: BreadcrumbProps): React.JSX.Element;
|
|
14
14
|
declare function BreadcrumbList({ className, ...props }: BreadcrumbListProps): React.JSX.Element;
|
|
15
15
|
declare function BreadcrumbItem({ className, ...props }: BreadcrumbItemProps): React.JSX.Element;
|
|
@@ -18,5 +18,5 @@ declare function BreadcrumbPage({ className, ...props }: BreadcrumbPageProps): R
|
|
|
18
18
|
declare function BreadcrumbSeparator({ children, className, ...props }: BreadcrumbSeparatorProps): React.JSX.Element;
|
|
19
19
|
declare function BreadcrumbEllipsis({ className, ...props }: BreadcrumbEllipsisProps): React.JSX.Element;
|
|
20
20
|
//#endregion
|
|
21
|
-
export { Breadcrumb, BreadcrumbEllipsis,
|
|
21
|
+
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
|
|
22
22
|
//# sourceMappingURL=breadcrumb.d.ts.map
|
|
@@ -5,14 +5,14 @@ import { VariantProps } from "class-variance-authority";
|
|
|
5
5
|
declare const buttonGroupVariants: (props?: ({
|
|
6
6
|
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
-
type ButtonGroupProps = React.ComponentProps<'div'> & VariantProps<typeof buttonGroupVariants>;
|
|
9
|
-
type ButtonGroupTextProps = React.ComponentProps<'div'> & {
|
|
8
|
+
export type ButtonGroupProps = React.ComponentProps<'div'> & VariantProps<typeof buttonGroupVariants>;
|
|
9
|
+
export type ButtonGroupTextProps = React.ComponentProps<'div'> & {
|
|
10
10
|
asChild?: boolean;
|
|
11
11
|
};
|
|
12
|
-
type ButtonGroupSeparatorProps = React.ComponentProps<typeof Separator>;
|
|
12
|
+
export type ButtonGroupSeparatorProps = React.ComponentProps<typeof Separator>;
|
|
13
13
|
declare function ButtonGroup({ className, orientation, ...props }: ButtonGroupProps): import("react").JSX.Element;
|
|
14
14
|
declare function ButtonGroupText({ className, asChild, ...props }: ButtonGroupTextProps): import("react").JSX.Element;
|
|
15
15
|
declare function ButtonGroupSeparator({ className, orientation, ...props }: ButtonGroupSeparatorProps): import("react").JSX.Element;
|
|
16
16
|
//#endregion
|
|
17
|
-
export { ButtonGroup,
|
|
17
|
+
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };
|
|
18
18
|
//# sourceMappingURL=button-group.d.ts.map
|
|
@@ -7,11 +7,11 @@ declare const buttonVariants: (props?: ({
|
|
|
7
7
|
color?: "blue" | "brand" | "gray" | "green" | "indigo" | "pink" | "primary" | "red" | "yellow" | "zinc" | null | undefined;
|
|
8
8
|
size?: "icon" | "icon-lg" | "icon-sm" | "icon-xl" | "icon-xs" | "lg" | "md" | "sm" | "xl" | "xs" | null | undefined;
|
|
9
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
|
-
type ButtonProps = React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
|
10
|
+
export type ButtonProps = React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
|
11
11
|
asChild?: boolean;
|
|
12
12
|
loading?: boolean;
|
|
13
13
|
};
|
|
14
14
|
declare function Button({ children, className, variant, color, size, asChild, disabled, loading, ...props }: ButtonProps): React.JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
|
-
export { Button,
|
|
16
|
+
export { Button, buttonVariants };
|
|
17
17
|
//# sourceMappingURL=button.d.ts.map
|
|
@@ -4,14 +4,14 @@ import * as React from "react";
|
|
|
4
4
|
import { DateRange, DayButton, DayPicker, Locale } from "react-day-picker";
|
|
5
5
|
import * as locale from "react-day-picker/locale";
|
|
6
6
|
//#region src/components/calendar.d.ts
|
|
7
|
-
type CalendarProps = React.ComponentProps<typeof DayPicker> & {
|
|
7
|
+
export type CalendarProps = React.ComponentProps<typeof DayPicker> & {
|
|
8
8
|
buttonVariant?: React.ComponentProps<typeof Button>['variant'];
|
|
9
9
|
};
|
|
10
|
-
type CalendarDayButtonProps = Omit<React.ComponentProps<typeof DayButton>, 'color'> & {
|
|
10
|
+
export type CalendarDayButtonProps = Omit<React.ComponentProps<typeof DayButton>, 'color'> & {
|
|
11
11
|
locale?: Partial<Locale>;
|
|
12
12
|
};
|
|
13
13
|
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, locale, formatters, components, ...props }: CalendarProps): React.JSX.Element;
|
|
14
14
|
declare function CalendarDayButton({ className, day, modifiers, locale, ...props }: CalendarDayButtonProps): React.JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
|
-
export { Calendar, CalendarDayButton,
|
|
16
|
+
export { Calendar, CalendarDayButton, type DateRange, locale };
|
|
17
17
|
//# sourceMappingURL=calendar.d.ts.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
//#region src/components/card.d.ts
|
|
4
|
-
type CardProps = React.ComponentProps<'div'> & {
|
|
4
|
+
export type CardProps = React.ComponentProps<'div'> & {
|
|
5
5
|
size?: 'sm' | 'md' | 'lg';
|
|
6
6
|
};
|
|
7
|
-
type CardHeaderProps = React.ComponentProps<'div'>;
|
|
8
|
-
type CardTitleProps = React.ComponentProps<'div'>;
|
|
9
|
-
type CardDescriptionProps = React.ComponentProps<'div'>;
|
|
10
|
-
type CardActionProps = React.ComponentProps<'div'>;
|
|
11
|
-
type CardContentProps = React.ComponentProps<'div'>;
|
|
12
|
-
type CardFooterProps = React.ComponentProps<'div'>;
|
|
7
|
+
export type CardHeaderProps = React.ComponentProps<'div'>;
|
|
8
|
+
export type CardTitleProps = React.ComponentProps<'div'>;
|
|
9
|
+
export type CardDescriptionProps = React.ComponentProps<'div'>;
|
|
10
|
+
export type CardActionProps = React.ComponentProps<'div'>;
|
|
11
|
+
export type CardContentProps = React.ComponentProps<'div'>;
|
|
12
|
+
export type CardFooterProps = React.ComponentProps<'div'>;
|
|
13
13
|
declare function Card({ className, size, ...props }: CardProps): React.JSX.Element;
|
|
14
14
|
declare function CardHeader({ className, ...props }: CardHeaderProps): React.JSX.Element;
|
|
15
15
|
declare function CardTitle({ className, ...props }: CardTitleProps): React.JSX.Element;
|
|
@@ -18,5 +18,5 @@ declare function CardAction({ className, ...props }: CardActionProps): React.JSX
|
|
|
18
18
|
declare function CardContent({ className, ...props }: CardContentProps): React.JSX.Element;
|
|
19
19
|
declare function CardFooter({ className, ...props }: CardFooterProps): React.JSX.Element;
|
|
20
20
|
//#endregion
|
|
21
|
-
export { Card, CardAction,
|
|
21
|
+
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
22
22
|
//# sourceMappingURL=card.d.ts.map
|
|
@@ -6,18 +6,18 @@ import useEmblaCarousel, { UseEmblaCarouselType } from "embla-carousel-react";
|
|
|
6
6
|
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
7
7
|
type CarouselOptions = UseCarouselParameters[0];
|
|
8
8
|
type CarouselPlugin = UseCarouselParameters[1];
|
|
9
|
-
type CarouselApi = UseEmblaCarouselType[1];
|
|
10
|
-
type CarouselProps = React.ComponentProps<'div'> & {
|
|
9
|
+
export type CarouselApi = UseEmblaCarouselType[1];
|
|
10
|
+
export type CarouselProps = React.ComponentProps<'div'> & {
|
|
11
11
|
opts?: CarouselOptions;
|
|
12
12
|
plugins?: CarouselPlugin;
|
|
13
13
|
orientation?: 'horizontal' | 'vertical';
|
|
14
14
|
setApi?: (api: CarouselApi) => void;
|
|
15
15
|
};
|
|
16
|
-
type CarouselContentProps = React.ComponentProps<'div'>;
|
|
17
|
-
type CarouselItemProps = React.ComponentProps<'div'>;
|
|
18
|
-
type CarouselPreviousProps = React.ComponentProps<typeof Button>;
|
|
19
|
-
type CarouselNextProps = React.ComponentProps<typeof Button>;
|
|
20
|
-
type CarouselIndicatorsProps = React.ComponentProps<'div'> & {
|
|
16
|
+
export type CarouselContentProps = React.ComponentProps<'div'>;
|
|
17
|
+
export type CarouselItemProps = React.ComponentProps<'div'>;
|
|
18
|
+
export type CarouselPreviousProps = React.ComponentProps<typeof Button>;
|
|
19
|
+
export type CarouselNextProps = React.ComponentProps<typeof Button>;
|
|
20
|
+
export type CarouselIndicatorsProps = React.ComponentProps<'div'> & {
|
|
21
21
|
getIndicatorProps?: (index: number) => React.ComponentProps<'button'>;
|
|
22
22
|
};
|
|
23
23
|
type CarouselContextProps = {
|
|
@@ -39,5 +39,5 @@ declare function CarouselPrevious({ className, variant, size, color, ...props }:
|
|
|
39
39
|
declare function CarouselNext({ className, variant, size, color, ...props }: CarouselNextProps): React.JSX.Element;
|
|
40
40
|
declare function CarouselIndicators({ className, getIndicatorProps, ...props }: CarouselIndicatorsProps): React.JSX.Element | null;
|
|
41
41
|
//#endregion
|
|
42
|
-
export { Carousel,
|
|
42
|
+
export { Carousel, CarouselContent, CarouselIndicators, CarouselItem, CarouselNext, CarouselPrevious, useCarousel };
|
|
43
43
|
//# sourceMappingURL=carousel.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{Button as t}from"./button.js";import{IconChevronLeft as n,IconChevronRight as r}from"@tabler/icons-react";import{jsx as i,jsxs as a}from"react/jsx-runtime";import*as o from"react";import s from"embla-carousel-react";const c=o.createContext(null);function useCarousel(){let e=o.useContext(c);if(!e)throw Error(`useCarousel must be used within a <Carousel />`);return e}function Carousel({orientation:t=`horizontal`,opts:n,setApi:r,plugins:a,className:l,children:u,...d}){let[f,p]=s({...n,axis:t===`horizontal`?`x`:`y`},a),[m,h]=o.useState(!1),[g,_]=o.useState(!1),[v,y]=o.useState(0),[b,x]=o.useState([]),S=o.useCallback(e=>{e&&(h(e.canScrollPrev()),_(e.canScrollNext()),y(e.selectedScrollSnap()),x(e.scrollSnapList()))},[]),C=o.useCallback(()=>{p?.scrollPrev()},[p]),w=o.useCallback(()=>{p?.scrollNext()},[p]),T=o.useCallback(e=>{p?.scrollTo(e)},[p]),E=o.useCallback(e=>{e.key===`ArrowLeft`?(e.preventDefault(),C()):e.key===`ArrowRight`&&(e.preventDefault(),w())},[C,w]);return o.useEffect(()=>{
|
|
1
|
+
import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{Button as t}from"./button.js";import{IconChevronLeft as n,IconChevronRight as r}from"@tabler/icons-react";import{jsx as i,jsxs as a}from"react/jsx-runtime";import*as o from"react";import s from"embla-carousel-react";const c=o.createContext(null);function useCarousel(){let e=o.useContext(c);if(!e)throw Error(`useCarousel must be used within a <Carousel />`);return e}function Carousel({orientation:t=`horizontal`,opts:n,setApi:r,plugins:a,className:l,children:u,...d}){let[f,p]=s({...n,axis:t===`horizontal`?`x`:`y`},a),[m,h]=o.useState(!1),[g,_]=o.useState(!1),[v,y]=o.useState(0),[b,x]=o.useState([]),S=o.useCallback(e=>{e&&(h(e.canScrollPrev()),_(e.canScrollNext()),y(e.selectedScrollSnap()),x(e.scrollSnapList()))},[]),C=o.useCallback(()=>{p?.scrollPrev()},[p]),w=o.useCallback(()=>{p?.scrollNext()},[p]),T=o.useCallback(e=>{p?.scrollTo(e)},[p]),E=o.useCallback(e=>{e.key===`ArrowLeft`?(e.preventDefault(),C()):e.key===`ArrowRight`&&(e.preventDefault(),w())},[C,w]);return o.useEffect(()=>{p&&r&&r(p)},[p,r]),o.useEffect(()=>{if(p)return S(p),p.on(`reInit`,S),p.on(`select`,S),()=>{p?.off(`reInit`,S),p?.off(`select`,S)}},[p,S]),i(c.Provider,{value:{carouselRef:f,api:p,opts:n,orientation:t||(n?.axis===`y`?`vertical`:`horizontal`),scrollPrev:C,scrollNext:w,scrollTo:T,canScrollPrev:m,canScrollNext:g,selectedIndex:v,scrollSnaps:b},children:i(`section`,{onKeyDownCapture:E,className:e(`relative`,l),"data-slot":`carousel`,...d,children:u})})}function CarouselContent({className:t,...n}){let{carouselRef:r,orientation:a}=useCarousel();return i(`div`,{ref:r,className:`overflow-hidden`,"data-slot":`carousel-content`,children:i(`div`,{className:e(`flex`,a===`horizontal`?`-ml-4`:`-mt-4 flex-col`,t),...n})})}function CarouselItem({className:t,...n}){let{orientation:r}=useCarousel();return i(`div`,{"data-slot":`carousel-item`,className:e(`min-w-0 shrink-0 grow-0 basis-full`,r===`horizontal`?`pl-4`:`pt-4`,t),...n})}function CarouselPrevious({className:r,variant:o=`outline`,size:s=`icon-sm`,color:c=`zinc`,...l}){let{orientation:u,scrollPrev:d,canScrollPrev:f}=useCarousel();return a(t,{"data-slot":`carousel-previous`,color:c,variant:o,size:s,className:e(`absolute touch-manipulation rounded-full`,u===`horizontal`?`top-1/2 -left-12 -translate-y-1/2`:`-top-12 left-1/2 -translate-x-1/2 rotate-90`,r),disabled:!f,onClick:d,...l,children:[i(n,{}),i(`span`,{className:`sr-only`,children:`Previous slide`})]})}function CarouselNext({className:n,variant:o=`outline`,size:s=`icon-sm`,color:c=`zinc`,...l}){let{orientation:u,scrollNext:d,canScrollNext:f}=useCarousel();return a(t,{"data-slot":`carousel-next`,color:c,variant:o,size:s,className:e(`absolute touch-manipulation rounded-full`,u===`horizontal`?`top-1/2 -right-12 -translate-y-1/2`:`-bottom-12 left-1/2 -translate-x-1/2 rotate-90`,n),disabled:!f,onClick:d,...l,children:[i(r,{}),i(`span`,{className:`sr-only`,children:`Next slide`})]})}function CarouselIndicators({className:t,getIndicatorProps:n,...r}){let{orientation:a,scrollSnaps:o,selectedIndex:s,scrollTo:c}=useCarousel();return o.length===0?null:i(`div`,{"data-slot":`carousel-indicators`,className:e(`pointer-events-none absolute flex justify-center gap-2`,a===`horizontal`?`inset-x-0 bottom-4 flex-row`:`inset-y-0 right-4 flex-col items-center`,t),...r,children:o.map((t,r)=>{let{className:a,onClick:o,...l}=n?.(r)??{};return i(`button`,{...l,type:`button`,"data-slot":`carousel-indicator`,"data-active":s===r||void 0,"aria-label":`Go to slide ${r+1}`,className:e(`pointer-events-auto cursor-pointer size-2.5 touch-manipulation rounded-full bg-background opacity-60 shadow-sm ring-1 ring-border transition-opacity hover:opacity-100 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3 focus-visible:outline-none data-[active=true]:opacity-100`,a),onClick:e=>{c(r),o?.(e)}},t)})})}export{Carousel,CarouselContent,CarouselIndicators,CarouselItem,CarouselNext,CarouselPrevious,useCarousel};
|
|
2
2
|
//# sourceMappingURL=carousel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel.js","names":[],"sources":["../../src/components/carousel.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { IconChevronLeft, IconChevronRight } from '@tabler/icons-react'\nimport useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react'\n\nimport { cn } from '../lib/utils'\nimport { Button } from './button'\n\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>\ntype CarouselOptions = UseCarouselParameters[0]\ntype CarouselPlugin = UseCarouselParameters[1]\n\nexport type CarouselApi = UseEmblaCarouselType[1]\n\nexport type CarouselProps = React.ComponentProps<'div'> & {\n opts?: CarouselOptions\n plugins?: CarouselPlugin\n orientation?: 'horizontal' | 'vertical'\n setApi?: (api: CarouselApi) => void\n}\n\nexport type CarouselContentProps = React.ComponentProps<'div'>\n\nexport type CarouselItemProps = React.ComponentProps<'div'>\n\nexport type CarouselPreviousProps = React.ComponentProps<typeof Button>\n\nexport type CarouselNextProps = React.ComponentProps<typeof Button>\n\nexport type CarouselIndicatorsProps = React.ComponentProps<'div'> & {\n getIndicatorProps?: (index: number) => React.ComponentProps<'button'>\n}\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0]\n api: ReturnType<typeof useEmblaCarousel>[1]\n scrollPrev: () => void\n scrollNext: () => void\n scrollTo: (index: number) => void\n canScrollPrev: boolean\n canScrollNext: boolean\n selectedIndex: number\n scrollSnaps: number[]\n} & CarouselProps\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null)\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext)\n\n if (!context) {\n throw new Error('useCarousel must be used within a <Carousel />')\n }\n\n return context\n}\n\nfunction Carousel({ orientation = 'horizontal', opts, setApi, plugins, className, children, ...props }: CarouselProps) {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === 'horizontal' ? 'x' : 'y'\n },\n plugins\n )\n const [canScrollPrev, setCanScrollPrev] = React.useState(false)\n const [canScrollNext, setCanScrollNext] = React.useState(false)\n const [selectedIndex, setSelectedIndex] = React.useState(0)\n const [scrollSnaps, setScrollSnaps] = React.useState<number[]>([])\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) return\n setCanScrollPrev(api.canScrollPrev())\n setCanScrollNext(api.canScrollNext())\n setSelectedIndex(api.selectedScrollSnap())\n setScrollSnaps(api.scrollSnapList())\n }, [])\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev()\n }, [api])\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext()\n }, [api])\n\n const scrollTo = React.useCallback(\n (index: number) => {\n api?.scrollTo(index)\n },\n [api]\n )\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault()\n scrollPrev()\n } else if (event.key === 'ArrowRight') {\n event.preventDefault()\n scrollNext()\n }\n },\n [scrollPrev, scrollNext]\n )\n\n React.useEffect(() => {\n if (!api || !setApi) return\n setApi(api)\n }, [api, setApi])\n\n React.useEffect(() => {\n if (!api) return\n onSelect(api)\n api.on('reInit', onSelect)\n api.on('select', onSelect)\n\n return () => {\n api?.off('reInit', onSelect)\n api?.off('select', onSelect)\n }\n }, [api, onSelect])\n\n return (\n <CarouselContext.Provider\n value={{\n carouselRef,\n api: api,\n opts,\n orientation: orientation || (opts?.axis === 'y' ? 'vertical' : 'horizontal'),\n scrollPrev,\n scrollNext,\n scrollTo,\n canScrollPrev,\n canScrollNext,\n selectedIndex,\n scrollSnaps\n }}\n >\n <section onKeyDownCapture={handleKeyDown} className={cn('relative', className)} data-slot=\"carousel\" {...props}>\n {children}\n </section>\n </CarouselContext.Provider>\n )\n}\n\nfunction CarouselContent({ className, ...props }: CarouselContentProps) {\n const { carouselRef, orientation } = useCarousel()\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\" data-slot=\"carousel-content\">\n <div className={cn('flex', orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col', className)} {...props} />\n </div>\n )\n}\n\nfunction CarouselItem({ className, ...props }: CarouselItemProps) {\n const { orientation } = useCarousel()\n\n return (\n <div\n data-slot=\"carousel-item\"\n className={cn('min-w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'pl-4' : 'pt-4', className)}\n {...props}\n />\n )\n}\n\nfunction CarouselPrevious({\n className,\n variant = 'outline',\n size = 'icon-sm',\n color = 'zinc',\n ...props\n}: CarouselPreviousProps) {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel()\n\n return (\n <Button\n data-slot=\"carousel-previous\"\n color={color}\n variant={variant}\n size={size}\n className={cn(\n 'absolute touch-manipulation rounded-full',\n orientation === 'horizontal'\n ? 'top-1/2 -left-12 -translate-y-1/2'\n : '-top-12 left-1/2 -translate-x-1/2 rotate-90',\n className\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <IconChevronLeft />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n )\n}\n\nfunction CarouselNext({\n className,\n variant = 'outline',\n size = 'icon-sm',\n color = 'zinc',\n ...props\n}: CarouselNextProps) {\n const { orientation, scrollNext, canScrollNext } = useCarousel()\n\n return (\n <Button\n data-slot=\"carousel-next\"\n color={color}\n variant={variant}\n size={size}\n className={cn(\n 'absolute touch-manipulation rounded-full',\n orientation === 'horizontal'\n ? 'top-1/2 -right-12 -translate-y-1/2'\n : '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',\n className\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <IconChevronRight />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n )\n}\n\nfunction CarouselIndicators({ className, getIndicatorProps, ...props }: CarouselIndicatorsProps) {\n const { orientation, scrollSnaps, selectedIndex, scrollTo } = useCarousel()\n\n if (scrollSnaps.length === 0) {\n return null\n }\n\n return (\n <div\n data-slot=\"carousel-indicators\"\n className={cn(\n 'pointer-events-none absolute flex justify-center gap-2',\n orientation === 'horizontal' ? 'inset-x-0 bottom-4 flex-row' : 'inset-y-0 right-4 flex-col items-center',\n className\n )}\n {...props}\n >\n {scrollSnaps.map((snap, index) => {\n const { className: indicatorClassName, onClick, ...indicatorProps } = getIndicatorProps?.(index) ?? {}\n\n return (\n <button\n key={snap}\n {...indicatorProps}\n type=\"button\"\n data-slot=\"carousel-indicator\"\n data-active={selectedIndex === index ? true : undefined}\n aria-label={`Go to slide ${index + 1}`}\n className={cn(\n 'pointer-events-auto cursor-pointer size-2.5 touch-manipulation rounded-full bg-background opacity-60 shadow-sm ring-1 ring-border transition-opacity hover:opacity-100 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3 focus-visible:outline-none data-[active=true]:opacity-100',\n indicatorClassName\n )}\n onClick={(event) => {\n scrollTo(index)\n onClick?.(event)\n }}\n />\n )\n })}\n </div>\n )\n}\n\nexport { Carousel, CarouselContent, CarouselIndicators, CarouselItem, CarouselNext, CarouselPrevious, useCarousel }\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"carousel.js","names":[],"sources":["../../src/components/carousel.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { IconChevronLeft, IconChevronRight } from '@tabler/icons-react'\nimport useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react'\n\nimport { cn } from '../lib/utils'\nimport { Button } from './button'\n\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>\ntype CarouselOptions = UseCarouselParameters[0]\ntype CarouselPlugin = UseCarouselParameters[1]\n\nexport type CarouselApi = UseEmblaCarouselType[1]\n\nexport type CarouselProps = React.ComponentProps<'div'> & {\n opts?: CarouselOptions\n plugins?: CarouselPlugin\n orientation?: 'horizontal' | 'vertical'\n setApi?: (api: CarouselApi) => void\n}\n\nexport type CarouselContentProps = React.ComponentProps<'div'>\n\nexport type CarouselItemProps = React.ComponentProps<'div'>\n\nexport type CarouselPreviousProps = React.ComponentProps<typeof Button>\n\nexport type CarouselNextProps = React.ComponentProps<typeof Button>\n\nexport type CarouselIndicatorsProps = React.ComponentProps<'div'> & {\n getIndicatorProps?: (index: number) => React.ComponentProps<'button'>\n}\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0]\n api: ReturnType<typeof useEmblaCarousel>[1]\n scrollPrev: () => void\n scrollNext: () => void\n scrollTo: (index: number) => void\n canScrollPrev: boolean\n canScrollNext: boolean\n selectedIndex: number\n scrollSnaps: number[]\n} & CarouselProps\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null)\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext)\n\n if (!context) {\n throw new Error('useCarousel must be used within a <Carousel />')\n }\n\n return context\n}\n\nfunction Carousel({ orientation = 'horizontal', opts, setApi, plugins, className, children, ...props }: CarouselProps) {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === 'horizontal' ? 'x' : 'y'\n },\n plugins\n )\n const [canScrollPrev, setCanScrollPrev] = React.useState(false)\n const [canScrollNext, setCanScrollNext] = React.useState(false)\n const [selectedIndex, setSelectedIndex] = React.useState(0)\n const [scrollSnaps, setScrollSnaps] = React.useState<number[]>([])\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) return\n setCanScrollPrev(api.canScrollPrev())\n setCanScrollNext(api.canScrollNext())\n setSelectedIndex(api.selectedScrollSnap())\n setScrollSnaps(api.scrollSnapList())\n }, [])\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev()\n }, [api])\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext()\n }, [api])\n\n const scrollTo = React.useCallback(\n (index: number) => {\n api?.scrollTo(index)\n },\n [api]\n )\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault()\n scrollPrev()\n } else if (event.key === 'ArrowRight') {\n event.preventDefault()\n scrollNext()\n }\n },\n [scrollPrev, scrollNext]\n )\n\n React.useEffect(() => {\n if (!api || !setApi) return\n setApi(api)\n }, [api, setApi])\n\n React.useEffect(() => {\n if (!api) return\n onSelect(api)\n api.on('reInit', onSelect)\n api.on('select', onSelect)\n\n return () => {\n api?.off('reInit', onSelect)\n api?.off('select', onSelect)\n }\n }, [api, onSelect])\n\n return (\n <CarouselContext.Provider\n value={{\n carouselRef,\n api: api,\n opts,\n orientation: orientation || (opts?.axis === 'y' ? 'vertical' : 'horizontal'),\n scrollPrev,\n scrollNext,\n scrollTo,\n canScrollPrev,\n canScrollNext,\n selectedIndex,\n scrollSnaps\n }}\n >\n <section onKeyDownCapture={handleKeyDown} className={cn('relative', className)} data-slot=\"carousel\" {...props}>\n {children}\n </section>\n </CarouselContext.Provider>\n )\n}\n\nfunction CarouselContent({ className, ...props }: CarouselContentProps) {\n const { carouselRef, orientation } = useCarousel()\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\" data-slot=\"carousel-content\">\n <div className={cn('flex', orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col', className)} {...props} />\n </div>\n )\n}\n\nfunction CarouselItem({ className, ...props }: CarouselItemProps) {\n const { orientation } = useCarousel()\n\n return (\n <div\n data-slot=\"carousel-item\"\n className={cn('min-w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'pl-4' : 'pt-4', className)}\n {...props}\n />\n )\n}\n\nfunction CarouselPrevious({\n className,\n variant = 'outline',\n size = 'icon-sm',\n color = 'zinc',\n ...props\n}: CarouselPreviousProps) {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel()\n\n return (\n <Button\n data-slot=\"carousel-previous\"\n color={color}\n variant={variant}\n size={size}\n className={cn(\n 'absolute touch-manipulation rounded-full',\n orientation === 'horizontal'\n ? 'top-1/2 -left-12 -translate-y-1/2'\n : '-top-12 left-1/2 -translate-x-1/2 rotate-90',\n className\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <IconChevronLeft />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n )\n}\n\nfunction CarouselNext({\n className,\n variant = 'outline',\n size = 'icon-sm',\n color = 'zinc',\n ...props\n}: CarouselNextProps) {\n const { orientation, scrollNext, canScrollNext } = useCarousel()\n\n return (\n <Button\n data-slot=\"carousel-next\"\n color={color}\n variant={variant}\n size={size}\n className={cn(\n 'absolute touch-manipulation rounded-full',\n orientation === 'horizontal'\n ? 'top-1/2 -right-12 -translate-y-1/2'\n : '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',\n className\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <IconChevronRight />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n )\n}\n\nfunction CarouselIndicators({ className, getIndicatorProps, ...props }: CarouselIndicatorsProps) {\n const { orientation, scrollSnaps, selectedIndex, scrollTo } = useCarousel()\n\n if (scrollSnaps.length === 0) {\n return null\n }\n\n return (\n <div\n data-slot=\"carousel-indicators\"\n className={cn(\n 'pointer-events-none absolute flex justify-center gap-2',\n orientation === 'horizontal' ? 'inset-x-0 bottom-4 flex-row' : 'inset-y-0 right-4 flex-col items-center',\n className\n )}\n {...props}\n >\n {scrollSnaps.map((snap, index) => {\n const { className: indicatorClassName, onClick, ...indicatorProps } = getIndicatorProps?.(index) ?? {}\n\n return (\n <button\n key={snap}\n {...indicatorProps}\n type=\"button\"\n data-slot=\"carousel-indicator\"\n data-active={selectedIndex === index ? true : undefined}\n aria-label={`Go to slide ${index + 1}`}\n className={cn(\n 'pointer-events-auto cursor-pointer size-2.5 touch-manipulation rounded-full bg-background opacity-60 shadow-sm ring-1 ring-border transition-opacity hover:opacity-100 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3 focus-visible:outline-none data-[active=true]:opacity-100',\n indicatorClassName\n )}\n onClick={(event) => {\n scrollTo(index)\n onClick?.(event)\n }}\n />\n )\n })}\n </div>\n )\n}\n\nexport { Carousel, CarouselContent, CarouselIndicators, CarouselItem, CarouselNext, CarouselPrevious, useCarousel }\n"],"mappings":"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"}
|
|
@@ -6,8 +6,8 @@ declare const centerVariants: (props?: ({
|
|
|
6
6
|
direction?: "horizontal" | "vertical" | null | undefined;
|
|
7
7
|
size?: "lg" | "md" | "sm" | "xl" | "xs" | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
|
-
type CenterProps = React.ComponentProps<'div'> & VariantProps<typeof centerVariants>;
|
|
9
|
+
export type CenterProps = React.ComponentProps<'div'> & VariantProps<typeof centerVariants>;
|
|
10
10
|
declare function Center({ className, direction, size, ...props }: CenterProps): React.JSX.Element;
|
|
11
11
|
//#endregion
|
|
12
|
-
export { Center,
|
|
12
|
+
export { Center, centerVariants };
|
|
13
13
|
//# sourceMappingURL=center.d.ts.map
|
|
@@ -10,12 +10,12 @@ declare const checkboxVariants: (props?: ({
|
|
|
10
10
|
color?: "blue" | "brand" | "gray" | "green" | "indigo" | "pink" | "primary" | "red" | "yellow" | "zinc" | null | undefined;
|
|
11
11
|
size?: "lg" | "md" | "sm" | null | undefined;
|
|
12
12
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
|
-
type CheckboxProps = React.ComponentProps<typeof Checkbox$1.Root> & VariantProps<typeof checkboxVariants> & {
|
|
13
|
+
export type CheckboxProps = React.ComponentProps<typeof Checkbox$1.Root> & VariantProps<typeof checkboxVariants> & {
|
|
14
14
|
color?: UIColor;
|
|
15
15
|
label?: ReactNode;
|
|
16
16
|
labelProps?: Omit<LabelProps, 'children' | 'htmlFor'>;
|
|
17
17
|
};
|
|
18
18
|
declare function Checkbox({ className, color, id, label, labelProps, size, ...props }: CheckboxProps): React.JSX.Element;
|
|
19
19
|
//#endregion
|
|
20
|
-
export { Checkbox
|
|
20
|
+
export { Checkbox };
|
|
21
21
|
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
//#region src/components/code.d.ts
|
|
4
|
-
type CodeProps = React.ComponentProps<'code'>;
|
|
4
|
+
export type CodeProps = React.ComponentProps<'code'>;
|
|
5
5
|
declare function Code({ className, ...props }: CodeProps): React.JSX.Element;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { Code
|
|
7
|
+
export { Code };
|
|
8
8
|
//# sourceMappingURL=code.d.ts.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
|
|
2
2
|
import { Collapsible as Collapsible$1 } from "radix-ui";
|
|
3
3
|
//#region src/components/collapsible.d.ts
|
|
4
|
-
type CollapsibleProps = React.ComponentProps<typeof Collapsible$1.Root>;
|
|
5
|
-
type CollapsibleTriggerProps = React.ComponentProps<typeof Collapsible$1.CollapsibleTrigger>;
|
|
6
|
-
type CollapsibleContentProps = React.ComponentProps<typeof Collapsible$1.CollapsibleContent>;
|
|
4
|
+
export type CollapsibleProps = React.ComponentProps<typeof Collapsible$1.Root>;
|
|
5
|
+
export type CollapsibleTriggerProps = React.ComponentProps<typeof Collapsible$1.CollapsibleTrigger>;
|
|
6
|
+
export type CollapsibleContentProps = React.ComponentProps<typeof Collapsible$1.CollapsibleContent>;
|
|
7
7
|
declare function Collapsible({ ...props }: CollapsibleProps): import("react").JSX.Element;
|
|
8
8
|
declare function CollapsibleTrigger({ ...props }: CollapsibleTriggerProps): import("react").JSX.Element;
|
|
9
9
|
declare function CollapsibleContent({ ...props }: CollapsibleContentProps): import("react").JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
|
-
export { Collapsible, CollapsibleContent,
|
|
11
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
12
12
|
//# sourceMappingURL=collapsible.d.ts.map
|
|
@@ -2,33 +2,33 @@ import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { Combobox as Combobox$1 } from "@base-ui/react";
|
|
4
4
|
//#region src/components/combobox.d.ts
|
|
5
|
-
type ComboboxProps = React.ComponentProps<typeof Combobox$1.Root>;
|
|
6
|
-
type ComboboxValueProps = Combobox$1.Value.Props;
|
|
7
|
-
type ComboboxTriggerProps = Combobox$1.Trigger.Props & {
|
|
5
|
+
export type ComboboxProps = React.ComponentProps<typeof Combobox$1.Root>;
|
|
6
|
+
export type ComboboxValueProps = Combobox$1.Value.Props;
|
|
7
|
+
export type ComboboxTriggerProps = Combobox$1.Trigger.Props & {
|
|
8
8
|
icon?: React.ReactNode;
|
|
9
9
|
};
|
|
10
|
-
type ComboboxClearProps = Combobox$1.Clear.Props;
|
|
11
|
-
type ComboboxInputProps = Combobox$1.Input.Props & {
|
|
10
|
+
export type ComboboxClearProps = Combobox$1.Clear.Props;
|
|
11
|
+
export type ComboboxInputProps = Combobox$1.Input.Props & {
|
|
12
12
|
icon?: React.ReactNode;
|
|
13
13
|
triggerIcon?: React.ReactNode;
|
|
14
14
|
showTrigger?: boolean;
|
|
15
15
|
showClear?: boolean;
|
|
16
16
|
};
|
|
17
|
-
type ComboboxContentProps = Combobox$1.Popup.Props & Pick<Combobox$1.Positioner.Props, 'side' | 'align' | 'sideOffset' | 'alignOffset' | 'anchor'> & Pick<Combobox$1.Portal.Props, 'container'>;
|
|
18
|
-
type ComboboxListProps = Combobox$1.List.Props;
|
|
19
|
-
type ComboboxItemProps = Combobox$1.Item.Props;
|
|
20
|
-
type ComboboxGroupProps = Combobox$1.Group.Props;
|
|
21
|
-
type ComboboxLabelProps = Combobox$1.GroupLabel.Props;
|
|
22
|
-
type ComboboxCollectionProps = Combobox$1.Collection.Props;
|
|
23
|
-
type ComboboxEmptyProps = Combobox$1.Empty.Props;
|
|
24
|
-
type ComboboxSeparatorProps = Combobox$1.Separator.Props;
|
|
25
|
-
type ComboboxChipsProps = React.ComponentPropsWithRef<typeof Combobox$1.Chips> & Combobox$1.Chips.Props & {
|
|
17
|
+
export type ComboboxContentProps = Combobox$1.Popup.Props & Pick<Combobox$1.Positioner.Props, 'side' | 'align' | 'sideOffset' | 'alignOffset' | 'anchor'> & Pick<Combobox$1.Portal.Props, 'container'>;
|
|
18
|
+
export type ComboboxListProps = Combobox$1.List.Props;
|
|
19
|
+
export type ComboboxItemProps = Combobox$1.Item.Props;
|
|
20
|
+
export type ComboboxGroupProps = Combobox$1.Group.Props;
|
|
21
|
+
export type ComboboxLabelProps = Combobox$1.GroupLabel.Props;
|
|
22
|
+
export type ComboboxCollectionProps = Combobox$1.Collection.Props;
|
|
23
|
+
export type ComboboxEmptyProps = Combobox$1.Empty.Props;
|
|
24
|
+
export type ComboboxSeparatorProps = Combobox$1.Separator.Props;
|
|
25
|
+
export type ComboboxChipsProps = React.ComponentPropsWithRef<typeof Combobox$1.Chips> & Combobox$1.Chips.Props & {
|
|
26
26
|
showClear?: boolean;
|
|
27
27
|
};
|
|
28
|
-
type ComboboxChipProps = Combobox$1.Chip.Props & {
|
|
28
|
+
export type ComboboxChipProps = Combobox$1.Chip.Props & {
|
|
29
29
|
showRemove?: boolean;
|
|
30
30
|
};
|
|
31
|
-
type ComboboxChipsInputProps = Combobox$1.Input.Props;
|
|
31
|
+
export type ComboboxChipsInputProps = Combobox$1.Input.Props;
|
|
32
32
|
declare const Combobox: typeof Combobox$1.Root;
|
|
33
33
|
declare function ComboboxValue({ ...props }: ComboboxValueProps): React.JSX.Element;
|
|
34
34
|
declare function ComboboxTrigger({ className, children, icon, ...props }: ComboboxTriggerProps): React.JSX.Element;
|
|
@@ -47,5 +47,5 @@ declare function ComboboxChip({ className, children, showRemove, ...props }: Com
|
|
|
47
47
|
declare function ComboboxChipsInput({ className, id, ...props }: ComboboxChipsInputProps): React.JSX.Element;
|
|
48
48
|
declare function useComboboxAnchor(): React.RefObject<HTMLDivElement | null>;
|
|
49
49
|
//#endregion
|
|
50
|
-
export { Combobox, ComboboxChip,
|
|
50
|
+
export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, useComboboxAnchor };
|
|
51
51
|
//# sourceMappingURL=combobox.d.ts.map
|