@uselets/ui 1.12.0 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/{chart-lqgodZYQ.d.ts → chart-CVe5-EWS.d.ts} +9 -39
- package/dist/components/accordion.d.ts +4 -19
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/alert-dialog.d.ts +12 -53
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/alert.d.ts +4 -18
- package/dist/components/anchor.d.ts +2 -9
- package/dist/components/area-chart.d.ts +2 -26
- package/dist/components/area-chart.js.map +1 -1
- package/dist/components/avatar.d.ts +6 -26
- package/dist/components/badge.d.ts +4 -12
- package/dist/components/bar-chart.d.ts +2 -24
- package/dist/components/bar-chart.js.map +1 -1
- package/dist/components/breadcrumb.d.ts +7 -31
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/button-group.d.ts +3 -16
- package/dist/components/button.d.ts +4 -15
- package/dist/components/button.js.map +1 -1
- package/dist/components/calendar.d.ts +2 -19
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/card.d.ts +7 -30
- package/dist/components/carousel.d.ts +6 -37
- package/dist/components/carousel.js +1 -1
- package/dist/components/carousel.js.map +1 -1
- package/dist/components/carousel.spec.d.ts +1 -1
- package/dist/components/carousel.spec.js +93 -1
- package/dist/components/carousel.spec.js.map +1 -1
- package/dist/components/center.d.ts +2 -8
- package/dist/components/chart.d.ts +1 -1
- package/dist/components/chart.js +1 -1
- package/dist/components/chart.js.map +1 -1
- package/dist/components/checkbox.d.ts +3 -12
- package/dist/components/checkbox.js +1 -1
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/code.d.ts +1 -5
- package/dist/components/collapsible.d.ts +3 -10
- package/dist/components/combobox.d.ts +15 -80
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/command.d.ts +9 -43
- package/dist/components/command.js.map +1 -1
- package/dist/components/container.d.ts +2 -7
- package/dist/components/data-table.d.ts +8 -61
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/date-range-picker.d.ts +11 -75
- 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 +12 -49
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/donut-chart.d.ts +1 -10
- package/dist/components/donut-chart.js.map +1 -1
- package/dist/components/drawer.d.ts +13 -49
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.d.ts +15 -66
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/dropzone.d.ts +1 -5
- package/dist/components/dropzone.js.map +1 -1
- package/dist/components/empty.d.ts +6 -26
- package/dist/components/field.d.ts +11 -48
- package/dist/components/field.js.map +1 -1
- package/dist/components/field.spec.d.ts +1 -1
- package/dist/components/field.spec.js +1 -1
- package/dist/components/field.spec.js.map +1 -1
- package/dist/components/flex.d.ts +5 -14
- package/dist/components/grid.d.ts +2 -18
- package/dist/components/group.d.ts +4 -12
- package/dist/components/heading.d.ts +2 -8
- package/dist/components/hover-card.d.ts +3 -13
- package/dist/components/hover-card.js.map +1 -1
- package/dist/components/input-group.d.ts +8 -32
- package/dist/components/input-otp.d.ts +4 -19
- package/dist/components/input-otp.js.map +1 -1
- package/dist/components/input.d.ts +1 -7
- package/dist/components/kbd.d.ts +2 -9
- package/dist/components/label.d.ts +1 -5
- package/dist/components/list.d.ts +5 -22
- package/dist/components/list.js.map +1 -1
- package/dist/components/marker.d.ts +18 -0
- package/dist/components/marker.js +2 -0
- package/dist/components/marker.js.map +1 -0
- package/dist/components/mask-input.d.ts +1 -11
- package/dist/components/native-select.d.ts +3 -14
- package/dist/components/native-select.js.map +1 -1
- package/dist/components/navigation-menu.d.ts +8 -36
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/pagination.d.ts +7 -33
- package/dist/components/pagination.js.map +1 -1
- package/dist/components/pie-chart.d.ts +2 -24
- package/dist/components/pie-chart.js.map +1 -1
- package/dist/components/popover.d.ts +7 -28
- package/dist/components/progress.d.ts +3 -10
- package/dist/components/progress.js.map +1 -1
- package/dist/components/radio-group.d.ts +4 -17
- package/dist/components/radio-group.js +1 -1
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/resizable.d.ts +3 -13
- package/dist/components/resizable.js.map +1 -1
- package/dist/components/ring-progress.d.ts +3 -11
- package/dist/components/ring-progress.js.map +1 -1
- package/dist/components/scroll-area.d.ts +2 -11
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/select.d.ts +10 -46
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.d.ts +1 -7
- package/dist/components/sidebar.d.ts +24 -118
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/simple-grid.d.ts +1 -10
- package/dist/components/skeleton.d.ts +1 -7
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/skeleton.spec.d.ts +1 -1
- package/dist/components/skeleton.spec.js +1 -1
- package/dist/components/skeleton.spec.js.map +1 -1
- package/dist/components/slider.d.ts +1 -10
- package/dist/components/slider.js.map +1 -1
- package/dist/components/sonner.d.ts +0 -1
- package/dist/components/spinner.d.ts +2 -7
- package/dist/components/stack.d.ts +4 -11
- package/dist/components/switch.d.ts +1 -10
- package/dist/components/switch.js +1 -1
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.d.ts +10 -43
- package/dist/components/tabs.d.ts +5 -21
- package/dist/components/text.d.ts +2 -8
- package/dist/components/textarea.d.ts +1 -6
- package/dist/components/theme.d.ts +1 -7
- package/dist/components/theme.js.map +1 -1
- package/dist/components/timeline.d.ts +5 -6
- package/dist/components/timeline.js.map +1 -1
- package/dist/components/toggle-group.d.ts +2 -19
- package/dist/components/toggle-group.js.map +1 -1
- package/dist/components/toggle.d.ts +4 -11
- package/dist/components/tooltip.d.ts +5 -28
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/unstyled-button.d.ts +1 -7
- package/dist/components/visibility.d.ts +2 -9
- package/dist/hooks/use-breakpoint-value.d.ts +0 -1
- package/dist/hooks/use-breakpoint-value.spec.d.ts +1 -1
- package/dist/hooks/use-breakpoint-value.spec.js +1 -1
- package/dist/hooks/use-breakpoint-value.spec.js.map +1 -1
- package/dist/hooks/use-breakpoint.d.ts +0 -1
- package/dist/hooks/use-breakpoint.spec.d.ts +1 -1
- package/dist/hooks/use-breakpoint.spec.js +1 -1
- package/dist/hooks/use-disclosure.d.ts +0 -1
- package/dist/hooks/use-disclosure.spec.d.ts +1 -1
- package/dist/hooks/use-disclosure.spec.js +1 -1
- package/dist/hooks/use-document-visibility.d.ts +0 -1
- package/dist/hooks/use-document-visibility.spec.d.ts +1 -1
- package/dist/hooks/use-document-visibility.spec.js +1 -1
- package/dist/hooks/use-hotkeys.d.ts +1 -1
- package/dist/hooks/use-hotkeys.js +1 -1
- package/dist/hooks/use-hotkeys.spec.d.ts +1 -1
- package/dist/hooks/use-hotkeys.spec.js +1 -1
- package/dist/hooks/use-idle.d.ts +0 -1
- package/dist/hooks/use-idle.spec.d.ts +1 -1
- package/dist/hooks/use-idle.spec.js +1 -1
- package/dist/hooks/use-interval.d.ts +10 -8
- package/dist/hooks/use-interval.spec.d.ts +1 -1
- package/dist/hooks/use-interval.spec.js +1 -1
- package/dist/hooks/use-local-storage.d.ts +0 -1
- package/dist/hooks/use-local-storage.spec.d.ts +1 -1
- package/dist/hooks/use-local-storage.spec.js +1 -1
- package/dist/hooks/use-mask.d.ts +0 -1
- package/dist/hooks/use-mobile.d.ts +0 -1
- package/dist/hooks/use-mobile.spec.d.ts +1 -1
- package/dist/hooks/use-mobile.spec.js +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.js +1 -1
- package/dist/lib/badge.d.ts +0 -1
- package/dist/lib/button.d.ts +0 -1
- package/dist/lib/color.d.ts +1 -2
- package/dist/lib/compose-refs.d.ts +0 -1
- package/dist/lib/progress.d.ts +0 -1
- package/dist/lib/utils.d.ts +0 -1
- package/dist/{magic-string.es-DbBO8R0S.js → magic-string.es-oADFB1hu.js} +2 -2
- package/dist/{magic-string.es-DbBO8R0S.js.map → magic-string.es-oADFB1hu.js.map} +1 -1
- package/dist/{react.esm-D88qr0ij.js → react.esm-D5AipFQb.js} +5 -5
- package/dist/{react.esm-D88qr0ij.js.map → react.esm-D5AipFQb.js.map} +1 -1
- package/dist/skills/uselets-ui/references/component-catalog.md +4 -1
- package/dist/{use-hotkeys-BOfOFxb5.js → use-hotkeys-C0d5t4yo.js} +2 -2
- package/dist/{use-hotkeys-BOfOFxb5.js.map → use-hotkeys-C0d5t4yo.js.map} +1 -1
- package/dist/{use-hotkeys-Cl1cV6e8.d.ts → use-hotkeys-DloZH-B4.d.ts} +1 -2
- package/dist/utils-Cj3IZeiu.js +37 -0
- package/dist/utils-Cj3IZeiu.js.map +1 -0
- package/package.json +16 -16
- package/skills/uselets-ui/references/component-catalog.md +4 -1
- package/dist/dist-B-hwiqYg.js +0 -129
- package/dist/dist-B-hwiqYg.js.map +0 -1
package/README.md
CHANGED
|
@@ -358,6 +358,7 @@ You can import from the package root (`@uselets/ui`) or by subpath (`@uselets/ui
|
|
|
358
358
|
| `mask-input` | `MaskInput` | Formatted input backed by `@react-input/mask`. Accepts `mask` plus optional `replacement`, `showMask`, `separate`, `track`, `modify`. Default replacement tokens: `9` (digit), `a` (letter), `*` (any). Forwards an external `ref` prop to the underlying `<input>`, composed with the mask ref. The `useMask` hook is also exported from `@uselets/ui/hooks/use-mask` for custom inputs. |
|
|
359
359
|
| `kbd` | `Kbd`, `KbdGroup` | Keyboard shortcut presentation primitives. |
|
|
360
360
|
| `label` | `Label` | Styled `<label>` wrapper. |
|
|
361
|
+
| `marker` | `Marker`, `MarkerContent`, `MarkerIcon`, `markerVariants` | `variant: 'default' \| 'separator' \| 'border'` (default: `default`); `asChild?: boolean`. `separator` renders divider lines on both sides of the content (for labeled dividers); `border` renders a bottom border instead. |
|
|
361
362
|
| `list` | `List`, `ListItem`, `ListIcon`, `listVariants` | `List.type: 'unordered' \| 'ordered'`; `size` and `spacing` use the `xs` to `xl` scale; `ListIcon` can use `asChild` and replaces the default marker with a primary-colored icon. |
|
|
362
363
|
| `native-select` | `NativeSelect`, `NativeSelectOption`, `NativeSelectOptGroup` | Native `<select>` API with `size: 'sm' \| 'md'` (default: `md`). |
|
|
363
364
|
| `popover` | `Popover`, `PopoverTrigger`, `PopoverContent`, `PopoverAnchor`, `PopoverHeader`, `PopoverTitle`, `PopoverDescription` | `PopoverContent` supports positioning props (`side`, `sideOffset`, `align`, `alignOffset`) and can be used in controlled mode via root props (`open`, `onOpenChange`). |
|
|
@@ -369,7 +370,7 @@ You can import from the package root (`@uselets/ui`) or by subpath (`@uselets/ui
|
|
|
369
370
|
| `simple-grid` | `SimpleGrid` | Simple grid with `cols`, `gap`, `rowGap`, and `columnGap`. `cols` accepts a number; spacing uses the `xs` to `xl` scale (`4/8/16/24/32px`). Use `useBreakpointValue` when column count needs responsive values. |
|
|
370
371
|
| `skeleton` | `Skeleton` | Generic loading placeholder block. Supports `visible?: boolean` (default: `true`) and can wrap `children` to reserve their size while the placeholder is shown. |
|
|
371
372
|
| `spinner` | `Spinner` | Loader icon (`role="status"`), accepts SVG props and supports `size: 'sm' \| 'md' \| 'lg'` (default: `md`). |
|
|
372
|
-
| `switch` | `Switch` | `Switch` supports `size: 'sm' \| 'md' \| 'lg'` (default: `md`), `color: UIColor` (default: `green`), `label?: React.ReactNode`, and `labelProps` for the composed `Label`. When `label` is provided without `id`, it generates an id and wires `htmlFor` automatically. Track size is `sm` 34x16px, `md` 42x20px, and `lg` 48x22px; the thumb and internal indicator scale with the switch. Label text follows switch size: `sm`
|
|
373
|
+
| `switch` | `Switch` | `Switch` supports `size: 'sm' \| 'md' \| 'lg'` (default: `md`), `color: UIColor` (default: `green`), `label?: React.ReactNode`, and `labelProps` for the composed `Label`. When `label` is provided without `id`, it generates an id and wires `htmlFor` automatically. Track size is `sm` 34x16px, `md` 42x20px, and `lg` 48x22px; the thumb and internal indicator scale with the switch. Label text follows switch size: `sm` 14px, `md` 16px, `lg` 18px. |
|
|
373
374
|
| `tabs` | `Tabs`, `TabsContent`, `TabsList`, `TabsTrigger`, `tabsListVariants` | `TabsList.variant: 'line' \| 'enclosed'` (default: `line`); `TabsList.grow?: boolean` makes horizontal tabs share the available width equally; `line` uses a neutral border line with a `primary` active indicator. |
|
|
374
375
|
| `text` | `Text`, `textVariants` | Text primitive with `size: 'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl'` (default: `md`) and `asChild`. |
|
|
375
376
|
| `timeline` | `Timeline`, `TimelineItem`, `TimelineConnector`, `TimelineContent`, `TimelineDescription`, `TimelineEmpty`, `TimelineHeader`, `TimelineIcon`, `TimelineTime`, `TimelineTitle`, `timelineVariants` | `Timeline.size: 'sm' \| 'md' \| 'lg'` (default: `md`); `Timeline.iconSize: 'sm' \| 'md' \| 'lg'`; `TimelineItem.status: 'completed' \| 'in-progress' \| 'pending'`; icon and connector colors use the semantic palette (`primary`, `secondary`, `muted`, `accent`, `destructive`). |
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { n as __name } from "./rolldown-runtime-Bdj-bS2b.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import * as RechartsPrimitive from "recharts";
|
|
4
|
-
|
|
5
4
|
//#region src/components/chart.d.ts
|
|
6
5
|
declare const THEMES: {
|
|
7
|
-
readonly light:
|
|
8
|
-
readonly dark:
|
|
6
|
+
readonly light: '';
|
|
7
|
+
readonly dark: '.dark';
|
|
9
8
|
};
|
|
10
9
|
type ChartColorKey = 'primary' | 'brand' | 'gray' | 'zinc' | 'red' | 'yellow' | 'green' | 'blue' | 'indigo' | 'pink';
|
|
11
10
|
declare const CHART_COLOR_KEYS: readonly ChartColorKey[];
|
|
12
11
|
declare function resolveChartColor(value: string | undefined): string | undefined;
|
|
13
|
-
declare const DEFAULT_CHART_PALETTE: readonly [
|
|
12
|
+
declare const DEFAULT_CHART_PALETTE: readonly ['var(--chart-1)', 'var(--chart-2)', 'var(--chart-3)', 'var(--chart-4)', 'var(--chart-5)'];
|
|
14
13
|
type ChartConfig = { [k in string]: {
|
|
15
14
|
label?: React.ReactNode;
|
|
16
15
|
icon?: React.ComponentType;
|
|
@@ -20,7 +19,7 @@ type ChartConfig = { [k in string]: {
|
|
|
20
19
|
} | {
|
|
21
20
|
color?: never;
|
|
22
21
|
theme: Record<keyof typeof THEMES, string>;
|
|
23
|
-
}) };
|
|
22
|
+
}); };
|
|
24
23
|
type ChartContainerProps = React.ComponentProps<'div'> & {
|
|
25
24
|
config: ChartConfig;
|
|
26
25
|
children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children'];
|
|
@@ -44,41 +43,12 @@ type ChartLegendContentProps = React.ComponentProps<'div'> & Pick<RechartsPrimit
|
|
|
44
43
|
hideIcon?: boolean;
|
|
45
44
|
nameKey?: string;
|
|
46
45
|
};
|
|
47
|
-
declare function ChartContainer({
|
|
48
|
-
|
|
49
|
-
className,
|
|
50
|
-
children,
|
|
51
|
-
config,
|
|
52
|
-
...props
|
|
53
|
-
}: ChartContainerProps): React.JSX.Element;
|
|
54
|
-
declare const ChartStyle: ({
|
|
55
|
-
id,
|
|
56
|
-
config
|
|
57
|
-
}: ChartStyleProps) => React.JSX.Element | null;
|
|
46
|
+
declare function ChartContainer({ id, className, children, config, ...props }: ChartContainerProps): React.JSX.Element;
|
|
47
|
+
declare const ChartStyle: ({ id, config }: ChartStyleProps) => React.JSX.Element | null;
|
|
58
48
|
declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
|
|
59
|
-
declare function ChartTooltipContent({
|
|
60
|
-
active,
|
|
61
|
-
payload,
|
|
62
|
-
className,
|
|
63
|
-
indicator,
|
|
64
|
-
hideLabel,
|
|
65
|
-
hideIndicator,
|
|
66
|
-
label,
|
|
67
|
-
labelFormatter,
|
|
68
|
-
labelClassName,
|
|
69
|
-
formatter,
|
|
70
|
-
color,
|
|
71
|
-
nameKey,
|
|
72
|
-
labelKey
|
|
73
|
-
}: ChartTooltipContentProps): React.JSX.Element | null;
|
|
49
|
+
declare function ChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey }: ChartTooltipContentProps): React.JSX.Element | null;
|
|
74
50
|
declare const ChartLegend: React.MemoExoticComponent<(outsideProps: RechartsPrimitive.LegendProps) => React.ReactPortal | null>;
|
|
75
|
-
declare function ChartLegendContent({
|
|
76
|
-
className,
|
|
77
|
-
hideIcon,
|
|
78
|
-
payload,
|
|
79
|
-
verticalAlign,
|
|
80
|
-
nameKey
|
|
81
|
-
}: ChartLegendContentProps): React.JSX.Element | null;
|
|
51
|
+
declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey }: ChartLegendContentProps): React.JSX.Element | null;
|
|
82
52
|
//#endregion
|
|
83
53
|
export { resolveChartColor as _, ChartContainerProps as a, ChartLegendContentProps as c, ChartStyleProps as d, ChartTooltip as f, DEFAULT_CHART_PALETTE as g, ChartTooltipProps as h, ChartContainer as i, ChartLegendProps as l, ChartTooltipContentProps as m, ChartColorKey as n, ChartLegend as o, ChartTooltipContent as p, ChartConfig as r, ChartLegendContent as s, CHART_COLOR_KEYS as t, ChartStyle as u };
|
|
84
|
-
//# sourceMappingURL=chart-
|
|
54
|
+
//# sourceMappingURL=chart-CVe5-EWS.d.ts.map
|
|
@@ -1,30 +1,15 @@
|
|
|
1
1
|
import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
2
2
|
import { Accordion as Accordion$1 } from "radix-ui";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
|
|
5
4
|
//#region src/components/accordion.d.ts
|
|
6
5
|
type AccordionProps = React.ComponentProps<typeof Accordion$1.Root>;
|
|
7
6
|
type AccordionItemProps = React.ComponentProps<typeof Accordion$1.Item>;
|
|
8
7
|
type AccordionTriggerProps = React.ComponentProps<typeof Accordion$1.Trigger>;
|
|
9
8
|
type AccordionContentProps = React.ComponentProps<typeof Accordion$1.Content>;
|
|
10
|
-
declare function Accordion({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}:
|
|
14
|
-
declare function AccordionItem({
|
|
15
|
-
className,
|
|
16
|
-
...props
|
|
17
|
-
}: AccordionItemProps): React.JSX.Element;
|
|
18
|
-
declare function AccordionTrigger({
|
|
19
|
-
className,
|
|
20
|
-
children,
|
|
21
|
-
...props
|
|
22
|
-
}: AccordionTriggerProps): React.JSX.Element;
|
|
23
|
-
declare function AccordionContent({
|
|
24
|
-
className,
|
|
25
|
-
children,
|
|
26
|
-
...props
|
|
27
|
-
}: AccordionContentProps): React.JSX.Element;
|
|
9
|
+
declare function Accordion({ className, ...props }: AccordionProps): React.JSX.Element;
|
|
10
|
+
declare function AccordionItem({ className, ...props }: AccordionItemProps): React.JSX.Element;
|
|
11
|
+
declare function AccordionTrigger({ className, children, ...props }: AccordionTriggerProps): React.JSX.Element;
|
|
12
|
+
declare function AccordionContent({ className, children, ...props }: AccordionContentProps): React.JSX.Element;
|
|
28
13
|
//#endregion
|
|
29
14
|
export { Accordion, AccordionContent, AccordionContentProps, AccordionItem, AccordionItemProps, AccordionProps, AccordionTrigger, AccordionTriggerProps };
|
|
30
15
|
//# sourceMappingURL=accordion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.js","names":["AccordionPrimitive"],"sources":["../../src/components/accordion.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconChevronDown, IconChevronUp } from '@tabler/icons-react'\nimport { Accordion as AccordionPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type AccordionProps = React.ComponentProps<typeof AccordionPrimitive.Root>\n\nexport type AccordionItemProps = React.ComponentProps<typeof AccordionPrimitive.Item>\n\nexport type AccordionTriggerProps = React.ComponentProps<typeof AccordionPrimitive.Trigger>\n\nexport type AccordionContentProps = React.ComponentProps<typeof AccordionPrimitive.Content>\n\nfunction Accordion({ className, ...props }: AccordionProps) {\n return (\n <AccordionPrimitive.Root\n data-slot=\"accordion\"\n className={cn('flex w-full flex-col border rounded-sm', className)}\n {...props}\n />\n )\n}\n\nfunction AccordionItem({ className, ...props }: AccordionItemProps) {\n return (\n <AccordionPrimitive.Item\n data-slot=\"accordion-item\"\n className={cn('not-last:border-b px-4', className)}\n {...props}\n />\n )\n}\n\nfunction AccordionTrigger({ className, children, ...props }: AccordionTriggerProps) {\n return (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n data-slot=\"accordion-trigger\"\n className={cn(\n 'group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring disabled:pointer-events-none disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground',\n className\n )}\n {...props}\n >\n {children}\n <IconChevronDown\n data-slot=\"accordion-trigger-icon\"\n className=\"pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden\"\n />\n <IconChevronUp\n data-slot=\"accordion-trigger-icon\"\n className=\"pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline\"\n />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n )\n}\n\nfunction AccordionContent({ className, children, ...props }: AccordionContentProps) {\n return (\n <AccordionPrimitive.Content\n data-slot=\"accordion-content\"\n className=\"wrap-break-word data-closed:overflow-hidden text-sm data-open:animate-accordion-down data-closed:animate-accordion-up\"\n {...props}\n >\n <div className={cn('h-(--radix-accordion-content-height) pt-0 pb-2.5', className)}>{children}</div>\n </AccordionPrimitive.Content>\n )\n}\n\nexport { Accordion, AccordionContent, AccordionItem, AccordionTrigger }\n"],"mappings":"6OAeA,SAAS,UAAU,CAAE,YAAW,GAAG,GAAyB,CAC1D,OACE,EAACA,EAAmB,KAApB,CACE,YAAU,YACV,UAAW,EAAG,yCAA0C,CAAS,EACjE,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,cAAc,CAAE,YAAW,GAAG,GAA6B,CAClE,OACE,EAACA,EAAmB,KAApB,CACE,YAAU,iBACV,UAAW,EAAG,yBAA0B,CAAS,EACjD,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,iBAAiB,CAAE,YAAW,WAAU,GAAG,GAAgC,CAClF,OACE,EAACA,EAAmB,OAApB,CAA2B,UAAU,
|
|
1
|
+
{"version":3,"file":"accordion.js","names":["AccordionPrimitive"],"sources":["../../src/components/accordion.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconChevronDown, IconChevronUp } from '@tabler/icons-react'\nimport { Accordion as AccordionPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type AccordionProps = React.ComponentProps<typeof AccordionPrimitive.Root>\n\nexport type AccordionItemProps = React.ComponentProps<typeof AccordionPrimitive.Item>\n\nexport type AccordionTriggerProps = React.ComponentProps<typeof AccordionPrimitive.Trigger>\n\nexport type AccordionContentProps = React.ComponentProps<typeof AccordionPrimitive.Content>\n\nfunction Accordion({ className, ...props }: AccordionProps) {\n return (\n <AccordionPrimitive.Root\n data-slot=\"accordion\"\n className={cn('flex w-full flex-col border rounded-sm', className)}\n {...props}\n />\n )\n}\n\nfunction AccordionItem({ className, ...props }: AccordionItemProps) {\n return (\n <AccordionPrimitive.Item\n data-slot=\"accordion-item\"\n className={cn('not-last:border-b px-4', className)}\n {...props}\n />\n )\n}\n\nfunction AccordionTrigger({ className, children, ...props }: AccordionTriggerProps) {\n return (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n data-slot=\"accordion-trigger\"\n className={cn(\n 'group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring disabled:pointer-events-none disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground',\n className\n )}\n {...props}\n >\n {children}\n <IconChevronDown\n data-slot=\"accordion-trigger-icon\"\n className=\"pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden\"\n />\n <IconChevronUp\n data-slot=\"accordion-trigger-icon\"\n className=\"pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline\"\n />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n )\n}\n\nfunction AccordionContent({ className, children, ...props }: AccordionContentProps) {\n return (\n <AccordionPrimitive.Content\n data-slot=\"accordion-content\"\n className=\"wrap-break-word data-closed:overflow-hidden text-sm data-open:animate-accordion-down data-closed:animate-accordion-up\"\n {...props}\n >\n <div className={cn('h-(--radix-accordion-content-height) pt-0 pb-2.5', className)}>{children}</div>\n </AccordionPrimitive.Content>\n )\n}\n\nexport { Accordion, AccordionContent, AccordionItem, AccordionTrigger }\n"],"mappings":"6OAeA,SAAS,UAAU,CAAE,YAAW,GAAG,GAAyB,CAC1D,OACE,EAACA,EAAmB,KAApB,CACE,YAAU,YACV,UAAW,EAAG,yCAA0C,CAAS,EACjE,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,cAAc,CAAE,YAAW,GAAG,GAA6B,CAClE,OACE,EAACA,EAAmB,KAApB,CACE,YAAU,iBACV,UAAW,EAAG,yBAA0B,CAAS,EACjD,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,iBAAiB,CAAE,YAAW,WAAU,GAAG,GAAgC,CAClF,OACE,EAACA,EAAmB,OAApB,CAA2B,UAAU,OACnC,SAAA,EAACA,EAAmB,QAApB,CACE,YAAU,oBACV,UAAW,EACT,mfACA,CACF,EACA,GAAI,EANN,SAAA,CAQG,EACD,EAAC,EAAD,CACE,YAAU,yBACV,UAAU,2EACX,CAAA,EACD,EAAC,EAAD,CACE,YAAU,yBACV,UAAU,kFACX,CAAA,CACyB,GACH,CAAA,CAE/B,CAEA,SAAS,iBAAiB,CAAE,YAAW,WAAU,GAAG,GAAgC,CAClF,OACE,EAACA,EAAmB,QAApB,CACE,YAAU,oBACV,UAAU,wHACV,GAAI,EAEJ,SAAA,EAAC,MAAD,CAAK,UAAW,EAAG,mDAAoD,CAAS,EAAI,UAAc,CAAA,CACxE,CAAA,CAEhC"}
|
|
@@ -2,7 +2,6 @@ import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
|
2
2
|
import { Button } from "./button.js";
|
|
3
3
|
import { AlertDialog as AlertDialog$1 } from "radix-ui";
|
|
4
4
|
import * as React from "react";
|
|
5
|
-
|
|
6
5
|
//#region src/components/alert-dialog.d.ts
|
|
7
6
|
type AlertDialogProps = React.ComponentProps<typeof AlertDialog$1.Root>;
|
|
8
7
|
type AlertDialogTriggerProps = React.ComponentProps<typeof AlertDialog$1.Trigger>;
|
|
@@ -18,58 +17,18 @@ type AlertDialogTitleProps = React.ComponentProps<typeof AlertDialog$1.Title>;
|
|
|
18
17
|
type AlertDialogDescriptionProps = React.ComponentProps<typeof AlertDialog$1.Description>;
|
|
19
18
|
type AlertDialogActionProps = React.ComponentProps<typeof AlertDialog$1.Action> & Pick<React.ComponentProps<typeof Button>, 'variant' | 'color' | 'size'>;
|
|
20
19
|
type AlertDialogCancelProps = React.ComponentProps<typeof AlertDialog$1.Cancel> & Pick<React.ComponentProps<typeof Button>, 'variant' | 'color' | 'size'>;
|
|
21
|
-
declare function AlertDialog({
|
|
22
|
-
|
|
23
|
-
}:
|
|
24
|
-
declare function
|
|
25
|
-
|
|
26
|
-
}:
|
|
27
|
-
declare function
|
|
28
|
-
|
|
29
|
-
}:
|
|
30
|
-
declare function
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}: AlertDialogOverlayProps): React.JSX.Element;
|
|
34
|
-
declare function AlertDialogContent({
|
|
35
|
-
className,
|
|
36
|
-
size,
|
|
37
|
-
...props
|
|
38
|
-
}: AlertDialogContentProps): React.JSX.Element;
|
|
39
|
-
declare function AlertDialogHeader({
|
|
40
|
-
className,
|
|
41
|
-
...props
|
|
42
|
-
}: AlertDialogHeaderProps): React.JSX.Element;
|
|
43
|
-
declare function AlertDialogFooter({
|
|
44
|
-
className,
|
|
45
|
-
...props
|
|
46
|
-
}: AlertDialogFooterProps): React.JSX.Element;
|
|
47
|
-
declare function AlertDialogMedia({
|
|
48
|
-
className,
|
|
49
|
-
...props
|
|
50
|
-
}: AlertDialogMediaProps): React.JSX.Element;
|
|
51
|
-
declare function AlertDialogTitle({
|
|
52
|
-
className,
|
|
53
|
-
...props
|
|
54
|
-
}: AlertDialogTitleProps): React.JSX.Element;
|
|
55
|
-
declare function AlertDialogDescription({
|
|
56
|
-
className,
|
|
57
|
-
...props
|
|
58
|
-
}: AlertDialogDescriptionProps): React.JSX.Element;
|
|
59
|
-
declare function AlertDialogAction({
|
|
60
|
-
className,
|
|
61
|
-
variant,
|
|
62
|
-
color,
|
|
63
|
-
size,
|
|
64
|
-
...props
|
|
65
|
-
}: AlertDialogActionProps): React.JSX.Element;
|
|
66
|
-
declare function AlertDialogCancel({
|
|
67
|
-
className,
|
|
68
|
-
variant,
|
|
69
|
-
color,
|
|
70
|
-
size,
|
|
71
|
-
...props
|
|
72
|
-
}: AlertDialogCancelProps): React.JSX.Element;
|
|
20
|
+
declare function AlertDialog({ ...props }: AlertDialogProps): React.JSX.Element;
|
|
21
|
+
declare function AlertDialogTrigger({ ...props }: AlertDialogTriggerProps): React.JSX.Element;
|
|
22
|
+
declare function AlertDialogPortal({ ...props }: AlertDialogPortalProps): React.JSX.Element;
|
|
23
|
+
declare function AlertDialogOverlay({ className, ...props }: AlertDialogOverlayProps): React.JSX.Element;
|
|
24
|
+
declare function AlertDialogContent({ className, size, ...props }: AlertDialogContentProps): React.JSX.Element;
|
|
25
|
+
declare function AlertDialogHeader({ className, ...props }: AlertDialogHeaderProps): React.JSX.Element;
|
|
26
|
+
declare function AlertDialogFooter({ className, ...props }: AlertDialogFooterProps): React.JSX.Element;
|
|
27
|
+
declare function AlertDialogMedia({ className, ...props }: AlertDialogMediaProps): React.JSX.Element;
|
|
28
|
+
declare function AlertDialogTitle({ className, ...props }: AlertDialogTitleProps): React.JSX.Element;
|
|
29
|
+
declare function AlertDialogDescription({ className, ...props }: AlertDialogDescriptionProps): React.JSX.Element;
|
|
30
|
+
declare function AlertDialogAction({ className, variant, color, size, ...props }: AlertDialogActionProps): React.JSX.Element;
|
|
31
|
+
declare function AlertDialogCancel({ className, variant, color, size, ...props }: AlertDialogCancelProps): React.JSX.Element;
|
|
73
32
|
//#endregion
|
|
74
33
|
export { AlertDialog, AlertDialogAction, AlertDialogActionProps, AlertDialogCancel, AlertDialogCancelProps, AlertDialogContent, AlertDialogContentProps, AlertDialogDescription, AlertDialogDescriptionProps, AlertDialogFooter, AlertDialogFooterProps, AlertDialogHeader, AlertDialogHeaderProps, AlertDialogMedia, AlertDialogMediaProps, AlertDialogOverlay, AlertDialogOverlayProps, AlertDialogPortal, AlertDialogPortalProps, AlertDialogProps, AlertDialogTitle, AlertDialogTitleProps, AlertDialogTrigger, AlertDialogTriggerProps };
|
|
75
34
|
//# sourceMappingURL=alert-dialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert-dialog.js","names":["AlertDialogPrimitive"],"sources":["../../src/components/alert-dialog.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { AlertDialog as AlertDialogPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\nimport { Button } from './button'\n\nexport type AlertDialogProps = React.ComponentProps<typeof AlertDialogPrimitive.Root>\n\nexport type AlertDialogTriggerProps = React.ComponentProps<typeof AlertDialogPrimitive.Trigger>\n\nexport type AlertDialogPortalProps = React.ComponentProps<typeof AlertDialogPrimitive.Portal>\n\nexport type AlertDialogOverlayProps = React.ComponentProps<typeof AlertDialogPrimitive.Overlay>\n\nexport type AlertDialogContentProps = React.ComponentProps<typeof AlertDialogPrimitive.Content> & {\n size?: 'sm' | 'md'\n}\n\nexport type AlertDialogHeaderProps = React.ComponentProps<'div'>\n\nexport type AlertDialogFooterProps = React.ComponentProps<'div'>\n\nexport type AlertDialogMediaProps = React.ComponentProps<'div'>\n\nexport type AlertDialogTitleProps = React.ComponentProps<typeof AlertDialogPrimitive.Title>\n\nexport type AlertDialogDescriptionProps = React.ComponentProps<typeof AlertDialogPrimitive.Description>\n\nexport type AlertDialogActionProps = React.ComponentProps<typeof AlertDialogPrimitive.Action> &\n Pick<React.ComponentProps<typeof Button>, 'variant' | 'color' | 'size'>\n\nexport type AlertDialogCancelProps = React.ComponentProps<typeof AlertDialogPrimitive.Cancel> &\n Pick<React.ComponentProps<typeof Button>, 'variant' | 'color' | 'size'>\n\nfunction AlertDialog({ ...props }: AlertDialogProps) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />\n}\n\nfunction AlertDialogTrigger({ ...props }: AlertDialogTriggerProps) {\n return <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />\n}\n\nfunction AlertDialogPortal({ ...props }: AlertDialogPortalProps) {\n return <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />\n}\n\nfunction AlertDialogOverlay({ className, ...props }: AlertDialogOverlayProps) {\n return (\n <AlertDialogPrimitive.Overlay\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n 'fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogContent({ className, size = 'md', ...props }: AlertDialogContentProps) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot=\"alert-dialog-content\"\n data-size={size}\n className={cn(\n 'group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 ring-1 ring-foreground/10 duration-100 outline-none data-[size=md]:max-w-xs data-[size=sm]:max-w-xs data-[size=md]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n )\n}\n\nfunction AlertDialogHeader({ className, ...props }: AlertDialogHeaderProps) {\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn(\n 'grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=md]/alert-dialog-content:place-items-start sm:group-data-[size=md]/alert-dialog-content:text-left sm:group-data-[size=md]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogFooter({ className, ...props }: AlertDialogFooterProps) {\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn(\n '-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogMedia({ className, ...props }: AlertDialogMediaProps) {\n return (\n <div\n data-slot=\"alert-dialog-media\"\n className={cn(\n \"mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=md]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogTitle({ className, ...props }: AlertDialogTitleProps) {\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn(\n 'text-base font-medium sm:group-data-[size=md]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogDescription({ className, ...props }: AlertDialogDescriptionProps) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn(\n 'text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogAction({\n className,\n variant = 'solid',\n color = 'primary',\n size = 'md',\n ...props\n}: AlertDialogActionProps) {\n return (\n <Button variant={variant} color={color} size={size} asChild>\n <AlertDialogPrimitive.Action data-slot=\"alert-dialog-action\" className={cn(className)} {...props} />\n </Button>\n )\n}\n\nfunction AlertDialogCancel({\n className,\n variant = 'outline',\n color = 'primary',\n size = 'md',\n ...props\n}: AlertDialogCancelProps) {\n return (\n <Button variant={variant} color={color} size={size} asChild>\n <AlertDialogPrimitive.Cancel data-slot=\"alert-dialog-cancel\" className={cn(className)} {...props} />\n </Button>\n )\n}\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger\n}\n"],"mappings":"2MAmCA,SAAS,YAAY,CAAE,GAAG,GAA2B,CACnD,OAAO,EAACA,EAAqB,KAAtB,CAA2B,YAAU,eAAe,GAAI,CAAQ,CAAA,CACzE,CAEA,SAAS,mBAAmB,CAAE,GAAG,GAAkC,CACjE,OAAO,EAACA,EAAqB,QAAtB,CAA8B,YAAU,uBAAuB,GAAI,CAAQ,CAAA,CACpF,CAEA,SAAS,kBAAkB,CAAE,GAAG,GAAiC,CAC/D,OAAO,EAACA,EAAqB,OAAtB,CAA6B,YAAU,sBAAsB,GAAI,CAAQ,CAAA,CAClF,CAEA,SAAS,mBAAmB,CAAE,YAAW,GAAG,GAAkC,CAC5E,OACE,EAACA,EAAqB,QAAtB,CACE,YAAU,uBACV,UAAW,EACT,gLACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,mBAAmB,CAAE,YAAW,OAAO,KAAM,GAAG,GAAkC,CACzF,OACE,EAAC,kBAAD,CAAA,SAAA,CACE,EAAC,mBAAD,CAAqB,CAAA,EACrB,EAACA,EAAqB,QAAtB,CACE,YAAU,uBACV,YAAW,EACX,UAAW,EACT,8YACA,CACF,EACA,GAAI,CACL,CAAA,CACgB,CAAA,CAAA,CAEvB,CAEA,SAAS,kBAAkB,CAAE,YAAW,GAAG,GAAiC,CAC1E,OACE,EAAC,MAAD,CACE,YAAU,sBACV,UAAW,EACT,sYACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,kBAAkB,CAAE,YAAW,GAAG,GAAiC,CAC1E,OACE,EAAC,MAAD,CACE,YAAU,sBACV,UAAW,EACT,gNACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,iBAAiB,CAAE,YAAW,GAAG,GAAgC,CACxE,OACE,EAAC,MAAD,CACE,YAAU,qBACV,UAAW,EACT,wKACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,iBAAiB,CAAE,YAAW,GAAG,GAAgC,CACxE,OACE,EAACA,EAAqB,MAAtB,CACE,YAAU,qBACV,UAAW,EACT,+IACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,uBAAuB,CAAE,YAAW,GAAG,GAAsC,CACpF,OACE,EAACA,EAAqB,YAAtB,CACE,YAAU,2BACV,UAAW,EACT,iIACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,kBAAkB,CACzB,YACA,UAAU,QACV,QAAQ,UACR,OAAO,KACP,GAAG,GACsB,CACzB,OACE,EAAC,EAAD,CAAiB,UAAgB,QAAa,OAAM,QAAA,
|
|
1
|
+
{"version":3,"file":"alert-dialog.js","names":["AlertDialogPrimitive"],"sources":["../../src/components/alert-dialog.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { AlertDialog as AlertDialogPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\nimport { Button } from './button'\n\nexport type AlertDialogProps = React.ComponentProps<typeof AlertDialogPrimitive.Root>\n\nexport type AlertDialogTriggerProps = React.ComponentProps<typeof AlertDialogPrimitive.Trigger>\n\nexport type AlertDialogPortalProps = React.ComponentProps<typeof AlertDialogPrimitive.Portal>\n\nexport type AlertDialogOverlayProps = React.ComponentProps<typeof AlertDialogPrimitive.Overlay>\n\nexport type AlertDialogContentProps = React.ComponentProps<typeof AlertDialogPrimitive.Content> & {\n size?: 'sm' | 'md'\n}\n\nexport type AlertDialogHeaderProps = React.ComponentProps<'div'>\n\nexport type AlertDialogFooterProps = React.ComponentProps<'div'>\n\nexport type AlertDialogMediaProps = React.ComponentProps<'div'>\n\nexport type AlertDialogTitleProps = React.ComponentProps<typeof AlertDialogPrimitive.Title>\n\nexport type AlertDialogDescriptionProps = React.ComponentProps<typeof AlertDialogPrimitive.Description>\n\nexport type AlertDialogActionProps = React.ComponentProps<typeof AlertDialogPrimitive.Action> &\n Pick<React.ComponentProps<typeof Button>, 'variant' | 'color' | 'size'>\n\nexport type AlertDialogCancelProps = React.ComponentProps<typeof AlertDialogPrimitive.Cancel> &\n Pick<React.ComponentProps<typeof Button>, 'variant' | 'color' | 'size'>\n\nfunction AlertDialog({ ...props }: AlertDialogProps) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />\n}\n\nfunction AlertDialogTrigger({ ...props }: AlertDialogTriggerProps) {\n return <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />\n}\n\nfunction AlertDialogPortal({ ...props }: AlertDialogPortalProps) {\n return <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />\n}\n\nfunction AlertDialogOverlay({ className, ...props }: AlertDialogOverlayProps) {\n return (\n <AlertDialogPrimitive.Overlay\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n 'fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogContent({ className, size = 'md', ...props }: AlertDialogContentProps) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot=\"alert-dialog-content\"\n data-size={size}\n className={cn(\n 'group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 ring-1 ring-foreground/10 duration-100 outline-none data-[size=md]:max-w-xs data-[size=sm]:max-w-xs data-[size=md]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n )\n}\n\nfunction AlertDialogHeader({ className, ...props }: AlertDialogHeaderProps) {\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn(\n 'grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=md]/alert-dialog-content:place-items-start sm:group-data-[size=md]/alert-dialog-content:text-left sm:group-data-[size=md]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogFooter({ className, ...props }: AlertDialogFooterProps) {\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn(\n '-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogMedia({ className, ...props }: AlertDialogMediaProps) {\n return (\n <div\n data-slot=\"alert-dialog-media\"\n className={cn(\n \"mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=md]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogTitle({ className, ...props }: AlertDialogTitleProps) {\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn(\n 'text-base font-medium sm:group-data-[size=md]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogDescription({ className, ...props }: AlertDialogDescriptionProps) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn(\n 'text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogAction({\n className,\n variant = 'solid',\n color = 'primary',\n size = 'md',\n ...props\n}: AlertDialogActionProps) {\n return (\n <Button variant={variant} color={color} size={size} asChild>\n <AlertDialogPrimitive.Action data-slot=\"alert-dialog-action\" className={cn(className)} {...props} />\n </Button>\n )\n}\n\nfunction AlertDialogCancel({\n className,\n variant = 'outline',\n color = 'primary',\n size = 'md',\n ...props\n}: AlertDialogCancelProps) {\n return (\n <Button variant={variant} color={color} size={size} asChild>\n <AlertDialogPrimitive.Cancel data-slot=\"alert-dialog-cancel\" className={cn(className)} {...props} />\n </Button>\n )\n}\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger\n}\n"],"mappings":"2MAmCA,SAAS,YAAY,CAAE,GAAG,GAA2B,CACnD,OAAO,EAACA,EAAqB,KAAtB,CAA2B,YAAU,eAAe,GAAI,CAAQ,CAAA,CACzE,CAEA,SAAS,mBAAmB,CAAE,GAAG,GAAkC,CACjE,OAAO,EAACA,EAAqB,QAAtB,CAA8B,YAAU,uBAAuB,GAAI,CAAQ,CAAA,CACpF,CAEA,SAAS,kBAAkB,CAAE,GAAG,GAAiC,CAC/D,OAAO,EAACA,EAAqB,OAAtB,CAA6B,YAAU,sBAAsB,GAAI,CAAQ,CAAA,CAClF,CAEA,SAAS,mBAAmB,CAAE,YAAW,GAAG,GAAkC,CAC5E,OACE,EAACA,EAAqB,QAAtB,CACE,YAAU,uBACV,UAAW,EACT,gLACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,mBAAmB,CAAE,YAAW,OAAO,KAAM,GAAG,GAAkC,CACzF,OACE,EAAC,kBAAD,CAAA,SAAA,CACE,EAAC,mBAAD,CAAqB,CAAA,EACrB,EAACA,EAAqB,QAAtB,CACE,YAAU,uBACV,YAAW,EACX,UAAW,EACT,8YACA,CACF,EACA,GAAI,CACL,CAAA,CACgB,CAAA,CAAA,CAEvB,CAEA,SAAS,kBAAkB,CAAE,YAAW,GAAG,GAAiC,CAC1E,OACE,EAAC,MAAD,CACE,YAAU,sBACV,UAAW,EACT,sYACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,kBAAkB,CAAE,YAAW,GAAG,GAAiC,CAC1E,OACE,EAAC,MAAD,CACE,YAAU,sBACV,UAAW,EACT,gNACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,iBAAiB,CAAE,YAAW,GAAG,GAAgC,CACxE,OACE,EAAC,MAAD,CACE,YAAU,qBACV,UAAW,EACT,wKACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,iBAAiB,CAAE,YAAW,GAAG,GAAgC,CACxE,OACE,EAACA,EAAqB,MAAtB,CACE,YAAU,qBACV,UAAW,EACT,+IACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,uBAAuB,CAAE,YAAW,GAAG,GAAsC,CACpF,OACE,EAACA,EAAqB,YAAtB,CACE,YAAU,2BACV,UAAW,EACT,iIACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,kBAAkB,CACzB,YACA,UAAU,QACV,QAAQ,UACR,OAAO,KACP,GAAG,GACsB,CACzB,OACE,EAAC,EAAD,CAAiB,UAAgB,QAAa,OAAM,QAAA,GAClD,SAAA,EAACA,EAAqB,OAAtB,CAA6B,YAAU,sBAAsB,UAAW,EAAG,CAAS,EAAG,GAAI,CAAQ,CAAA,CAC7F,CAAA,CAEZ,CAEA,SAAS,kBAAkB,CACzB,YACA,UAAU,UACV,QAAQ,UACR,OAAO,KACP,GAAG,GACsB,CACzB,OACE,EAAC,EAAD,CAAiB,UAAgB,QAAa,OAAM,QAAA,GAClD,SAAA,EAACA,EAAqB,OAAtB,CAA6B,YAAU,sBAAsB,UAAW,EAAG,CAAS,EAAG,GAAI,CAAQ,CAAA,CAC7F,CAAA,CAEZ"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
2
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
|
|
5
4
|
//#region src/components/alert.d.ts
|
|
6
5
|
declare const alertVariants: (props?: ({
|
|
7
6
|
variant?: "default" | "destructive" | null | undefined;
|
|
@@ -10,23 +9,10 @@ type AlertProps = React.ComponentProps<'div'> & VariantProps<typeof alertVariant
|
|
|
10
9
|
type AlertTitleProps = React.ComponentProps<'div'>;
|
|
11
10
|
type AlertDescriptionProps = React.ComponentProps<'div'>;
|
|
12
11
|
type AlertActionProps = React.ComponentProps<'div'>;
|
|
13
|
-
declare function Alert({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}: AlertProps): React.JSX.Element;
|
|
18
|
-
declare function AlertTitle({
|
|
19
|
-
className,
|
|
20
|
-
...props
|
|
21
|
-
}: AlertTitleProps): React.JSX.Element;
|
|
22
|
-
declare function AlertDescription({
|
|
23
|
-
className,
|
|
24
|
-
...props
|
|
25
|
-
}: AlertDescriptionProps): React.JSX.Element;
|
|
26
|
-
declare function AlertAction({
|
|
27
|
-
className,
|
|
28
|
-
...props
|
|
29
|
-
}: AlertActionProps): React.JSX.Element;
|
|
12
|
+
declare function Alert({ className, variant, ...props }: AlertProps): React.JSX.Element;
|
|
13
|
+
declare function AlertTitle({ className, ...props }: AlertTitleProps): React.JSX.Element;
|
|
14
|
+
declare function AlertDescription({ className, ...props }: AlertDescriptionProps): React.JSX.Element;
|
|
15
|
+
declare function AlertAction({ className, ...props }: AlertActionProps): React.JSX.Element;
|
|
30
16
|
//#endregion
|
|
31
17
|
export { Alert, AlertAction, AlertActionProps, AlertDescription, AlertDescriptionProps, AlertProps, AlertTitle, AlertTitleProps };
|
|
32
18
|
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -1,22 +1,15 @@
|
|
|
1
1
|
import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
2
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
|
|
5
4
|
//#region src/components/anchor.d.ts
|
|
6
5
|
declare const anchorVariants: (props?: ({
|
|
7
|
-
size?: "
|
|
6
|
+
size?: "lg" | "md" | "sm" | "xl" | "xs" | null | undefined;
|
|
8
7
|
underline?: "always" | "hover" | "never" | "not-hover" | null | undefined;
|
|
9
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
9
|
type AnchorProps = React.ComponentProps<'a'> & VariantProps<typeof anchorVariants> & {
|
|
11
10
|
asChild?: boolean;
|
|
12
11
|
};
|
|
13
|
-
declare function Anchor({
|
|
14
|
-
className,
|
|
15
|
-
size,
|
|
16
|
-
underline,
|
|
17
|
-
asChild,
|
|
18
|
-
...props
|
|
19
|
-
}: AnchorProps): React.JSX.Element;
|
|
12
|
+
declare function Anchor({ className, size, underline, asChild, ...props }: AnchorProps): React.JSX.Element;
|
|
20
13
|
//#endregion
|
|
21
14
|
export { Anchor, AnchorProps, anchorVariants };
|
|
22
15
|
//# sourceMappingURL=anchor.d.ts.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
2
|
-
import { c as ChartLegendContentProps, m as ChartTooltipContentProps, n as ChartColorKey } from "../chart-
|
|
2
|
+
import { c as ChartLegendContentProps, m as ChartTooltipContentProps, n as ChartColorKey } from "../chart-CVe5-EWS.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Area, AreaChart as AreaChart$1 } from "recharts";
|
|
5
|
-
|
|
6
5
|
//#region src/components/area-chart.d.ts
|
|
7
6
|
type AreaChartSeries = {
|
|
8
7
|
name: string;
|
|
@@ -35,30 +34,7 @@ type AreaChartProps = Omit<React.ComponentProps<'div'>, 'children'> & {
|
|
|
35
34
|
areaProps?: Partial<React.ComponentProps<typeof Area>>;
|
|
36
35
|
areaChartProps?: Omit<React.ComponentProps<typeof AreaChart$1>, 'data' | 'stackOffset'>;
|
|
37
36
|
};
|
|
38
|
-
declare function AreaChart({
|
|
39
|
-
className,
|
|
40
|
-
data,
|
|
41
|
-
series,
|
|
42
|
-
dataKey,
|
|
43
|
-
type,
|
|
44
|
-
curveType,
|
|
45
|
-
withXAxis,
|
|
46
|
-
withYAxis,
|
|
47
|
-
gridAxis,
|
|
48
|
-
withDots,
|
|
49
|
-
withTooltip,
|
|
50
|
-
withLegend,
|
|
51
|
-
connectNulls,
|
|
52
|
-
unit,
|
|
53
|
-
fillOpacity,
|
|
54
|
-
strokeWidth,
|
|
55
|
-
animationDuration,
|
|
56
|
-
tooltipProps,
|
|
57
|
-
legendProps,
|
|
58
|
-
areaProps,
|
|
59
|
-
areaChartProps,
|
|
60
|
-
...props
|
|
61
|
-
}: AreaChartProps): React.JSX.Element;
|
|
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;
|
|
62
38
|
//#endregion
|
|
63
39
|
export { AreaChart, AreaChartCurveType, AreaChartGridAxis, AreaChartProps, AreaChartSeries, AreaChartType };
|
|
64
40
|
//# sourceMappingURL=area-chart.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"area-chart.js","names":["RechartsAreaChart"],"sources":["../../src/components/area-chart.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Area, CartesianGrid, Legend, AreaChart as RechartsAreaChart, Tooltip, XAxis, YAxis } from 'recharts'\n\nimport { cn } from '../lib/utils'\nimport {\n type ChartColorKey,\n type ChartConfig,\n ChartContainer,\n ChartLegendContent,\n type ChartLegendContentProps,\n ChartTooltipContent,\n type ChartTooltipContentProps,\n DEFAULT_CHART_PALETTE,\n resolveChartColor\n} from './chart'\n\nexport type AreaChartSeries = {\n name: string\n label?: string\n color?: string\n colorKey?: ChartColorKey\n}\n\nexport type AreaChartType = 'default' | 'stacked' | 'percent' | 'split'\nexport type AreaChartCurveType = 'linear' | 'monotone' | 'natural' | 'step' | 'bump' | 'stepAfter' | 'stepBefore'\nexport type AreaChartGridAxis = 'none' | 'x' | 'y' | 'xy'\n\nexport type AreaChartProps = Omit<React.ComponentProps<'div'>, 'children'> & {\n data: Array<Record<string, unknown>>\n series: AreaChartSeries[]\n dataKey: string\n type?: AreaChartType\n curveType?: AreaChartCurveType\n withXAxis?: boolean\n withYAxis?: boolean\n gridAxis?: AreaChartGridAxis\n withDots?: boolean\n withTooltip?: boolean\n withLegend?: boolean\n connectNulls?: boolean\n unit?: string\n fillOpacity?: number\n strokeWidth?: number\n animationDuration?: number\n tooltipProps?: ChartTooltipContentProps\n legendProps?: ChartLegendContentProps\n areaProps?: Partial<React.ComponentProps<typeof Area>>\n areaChartProps?: Omit<React.ComponentProps<typeof RechartsAreaChart>, 'data' | 'stackOffset'>\n}\n\nfunction buildConfig(series: AreaChartSeries[]): ChartConfig {\n return series.reduce<ChartConfig>((acc, item, index) => {\n acc[item.name] = {\n label: item.label ?? item.name,\n color:\n item.color ?? resolveChartColor(item.colorKey) ?? DEFAULT_CHART_PALETTE[index % DEFAULT_CHART_PALETTE.length]\n }\n return acc\n }, {})\n}\n\nfunction AreaChart({\n className,\n data,\n series,\n dataKey,\n type = 'default',\n curveType = 'monotone',\n withXAxis = true,\n withYAxis = true,\n gridAxis = 'x',\n withDots = false,\n withTooltip = true,\n withLegend = false,\n connectNulls,\n unit,\n fillOpacity = 0.2,\n strokeWidth = 2,\n animationDuration,\n tooltipProps,\n legendProps,\n areaProps,\n areaChartProps,\n ...props\n}: AreaChartProps) {\n const config = React.useMemo(() => buildConfig(series), [series])\n const stackId = type === 'default' ? undefined : 'stack'\n const stackOffset = type === 'percent' ? 'expand' : type === 'split' ? 'silhouette' : undefined\n\n return (\n <ChartContainer data-slot=\"area-chart\" className={cn('w-full', className)} config={config} {...props}>\n <RechartsAreaChart {...areaChartProps} data={data} stackOffset={stackOffset}>\n {gridAxis !== 'none' && (\n <CartesianGrid\n vertical={gridAxis === 'y' || gridAxis === 'xy'}\n horizontal={gridAxis === 'x' || gridAxis === 'xy'}\n />\n )}\n {withXAxis && <XAxis dataKey={dataKey} tickLine={false} axisLine={false} tickMargin={8} />}\n {withYAxis && (\n <YAxis\n tickLine={false}\n axisLine={false}\n tickMargin={8}\n tickFormatter={\n type === 'percent'\n ? (value: number) => `${Math.round(value * 100)}%`\n : unit\n ? (value) => `${value}${unit}`\n : undefined\n }\n />\n )}\n {withTooltip && <Tooltip cursor={false} content={<ChartTooltipContent {...tooltipProps} />} />}\n {withLegend && <Legend content={<ChartLegendContent {...legendProps} />} />}\n {series.map((item) => (\n <Area\n key={item.name}\n type={curveType}\n dataKey={item.name}\n stackId={stackId}\n stroke={config[item.name]?.color}\n fill={config[item.name]?.color}\n fillOpacity={fillOpacity}\n strokeWidth={strokeWidth}\n dot={withDots}\n connectNulls={connectNulls}\n animationDuration={animationDuration}\n isAnimationActive={animationDuration !== 0}\n {...areaProps}\n />\n ))}\n </RechartsAreaChart>\n </ChartContainer>\n )\n}\n\nexport { AreaChart }\n"],"mappings":"uZAmDA,SAAS,YAAY,EAAwC,CAC3D,OAAO,EAAO,QAAqB,EAAK,EAAM,KAC5C,EAAI,EAAK,MAAQ,CACf,MAAO,EAAK,OAAS,EAAK,KAC1B,MACE,EAAK,OAAS,EAAkB,EAAK,QAAQ,GAAK,EAAsB,EAAQ,EAAsB,OAC1G,EACO,GACN,CAAC,CAAC,CACP,CAEA,SAAS,UAAU,CACjB,YACA,OACA,SACA,UACA,OAAO,UACP,YAAY,WACZ,YAAY,GACZ,YAAY,GACZ,WAAW,IACX,WAAW,GACX,cAAc,GACd,aAAa,GACb,eACA,OACA,cAAc,GACd,cAAc,EACd,oBACA,eACA,cACA,YACA,iBACA,GAAG,GACc,CACjB,IAAM,EAAS,EAAM,YAAc,YAAY,CAAM,EAAG,CAAC,CAAM,CAAC,EAC1D,EAAU,IAAS,UAAY,IAAA,GAAY,QAC3C,EAAc,IAAS,UAAY,SAAW,IAAS,QAAU,aAAe,IAAA,GAEtF,OACE,EAAC,EAAD,CAAgB,YAAU,aAAa,UAAW,EAAG,SAAU,CAAS,EAAW,SAAQ,GAAI,
|
|
1
|
+
{"version":3,"file":"area-chart.js","names":["RechartsAreaChart"],"sources":["../../src/components/area-chart.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Area, CartesianGrid, Legend, AreaChart as RechartsAreaChart, Tooltip, XAxis, YAxis } from 'recharts'\n\nimport { cn } from '../lib/utils'\nimport {\n type ChartColorKey,\n type ChartConfig,\n ChartContainer,\n ChartLegendContent,\n type ChartLegendContentProps,\n ChartTooltipContent,\n type ChartTooltipContentProps,\n DEFAULT_CHART_PALETTE,\n resolveChartColor\n} from './chart'\n\nexport type AreaChartSeries = {\n name: string\n label?: string\n color?: string\n colorKey?: ChartColorKey\n}\n\nexport type AreaChartType = 'default' | 'stacked' | 'percent' | 'split'\nexport type AreaChartCurveType = 'linear' | 'monotone' | 'natural' | 'step' | 'bump' | 'stepAfter' | 'stepBefore'\nexport type AreaChartGridAxis = 'none' | 'x' | 'y' | 'xy'\n\nexport type AreaChartProps = Omit<React.ComponentProps<'div'>, 'children'> & {\n data: Array<Record<string, unknown>>\n series: AreaChartSeries[]\n dataKey: string\n type?: AreaChartType\n curveType?: AreaChartCurveType\n withXAxis?: boolean\n withYAxis?: boolean\n gridAxis?: AreaChartGridAxis\n withDots?: boolean\n withTooltip?: boolean\n withLegend?: boolean\n connectNulls?: boolean\n unit?: string\n fillOpacity?: number\n strokeWidth?: number\n animationDuration?: number\n tooltipProps?: ChartTooltipContentProps\n legendProps?: ChartLegendContentProps\n areaProps?: Partial<React.ComponentProps<typeof Area>>\n areaChartProps?: Omit<React.ComponentProps<typeof RechartsAreaChart>, 'data' | 'stackOffset'>\n}\n\nfunction buildConfig(series: AreaChartSeries[]): ChartConfig {\n return series.reduce<ChartConfig>((acc, item, index) => {\n acc[item.name] = {\n label: item.label ?? item.name,\n color:\n item.color ?? resolveChartColor(item.colorKey) ?? DEFAULT_CHART_PALETTE[index % DEFAULT_CHART_PALETTE.length]\n }\n return acc\n }, {})\n}\n\nfunction AreaChart({\n className,\n data,\n series,\n dataKey,\n type = 'default',\n curveType = 'monotone',\n withXAxis = true,\n withYAxis = true,\n gridAxis = 'x',\n withDots = false,\n withTooltip = true,\n withLegend = false,\n connectNulls,\n unit,\n fillOpacity = 0.2,\n strokeWidth = 2,\n animationDuration,\n tooltipProps,\n legendProps,\n areaProps,\n areaChartProps,\n ...props\n}: AreaChartProps) {\n const config = React.useMemo(() => buildConfig(series), [series])\n const stackId = type === 'default' ? undefined : 'stack'\n const stackOffset = type === 'percent' ? 'expand' : type === 'split' ? 'silhouette' : undefined\n\n return (\n <ChartContainer data-slot=\"area-chart\" className={cn('w-full', className)} config={config} {...props}>\n <RechartsAreaChart {...areaChartProps} data={data} stackOffset={stackOffset}>\n {gridAxis !== 'none' && (\n <CartesianGrid\n vertical={gridAxis === 'y' || gridAxis === 'xy'}\n horizontal={gridAxis === 'x' || gridAxis === 'xy'}\n />\n )}\n {withXAxis && <XAxis dataKey={dataKey} tickLine={false} axisLine={false} tickMargin={8} />}\n {withYAxis && (\n <YAxis\n tickLine={false}\n axisLine={false}\n tickMargin={8}\n tickFormatter={\n type === 'percent'\n ? (value: number) => `${Math.round(value * 100)}%`\n : unit\n ? (value) => `${value}${unit}`\n : undefined\n }\n />\n )}\n {withTooltip && <Tooltip cursor={false} content={<ChartTooltipContent {...tooltipProps} />} />}\n {withLegend && <Legend content={<ChartLegendContent {...legendProps} />} />}\n {series.map((item) => (\n <Area\n key={item.name}\n type={curveType}\n dataKey={item.name}\n stackId={stackId}\n stroke={config[item.name]?.color}\n fill={config[item.name]?.color}\n fillOpacity={fillOpacity}\n strokeWidth={strokeWidth}\n dot={withDots}\n connectNulls={connectNulls}\n animationDuration={animationDuration}\n isAnimationActive={animationDuration !== 0}\n {...areaProps}\n />\n ))}\n </RechartsAreaChart>\n </ChartContainer>\n )\n}\n\nexport { AreaChart }\n"],"mappings":"uZAmDA,SAAS,YAAY,EAAwC,CAC3D,OAAO,EAAO,QAAqB,EAAK,EAAM,KAC5C,EAAI,EAAK,MAAQ,CACf,MAAO,EAAK,OAAS,EAAK,KAC1B,MACE,EAAK,OAAS,EAAkB,EAAK,QAAQ,GAAK,EAAsB,EAAQ,EAAsB,OAC1G,EACO,GACN,CAAC,CAAC,CACP,CAEA,SAAS,UAAU,CACjB,YACA,OACA,SACA,UACA,OAAO,UACP,YAAY,WACZ,YAAY,GACZ,YAAY,GACZ,WAAW,IACX,WAAW,GACX,cAAc,GACd,aAAa,GACb,eACA,OACA,cAAc,GACd,cAAc,EACd,oBACA,eACA,cACA,YACA,iBACA,GAAG,GACc,CACjB,IAAM,EAAS,EAAM,YAAc,YAAY,CAAM,EAAG,CAAC,CAAM,CAAC,EAC1D,EAAU,IAAS,UAAY,IAAA,GAAY,QAC3C,EAAc,IAAS,UAAY,SAAW,IAAS,QAAU,aAAe,IAAA,GAEtF,OACE,EAAC,EAAD,CAAgB,YAAU,aAAa,UAAW,EAAG,SAAU,CAAS,EAAW,SAAQ,GAAI,EAC7F,SAAA,EAACA,EAAD,CAAmB,GAAI,EAAsB,OAAmB,cAAhE,SAAA,CACG,IAAa,QACZ,EAAC,EAAD,CACE,SAAU,IAAa,KAAO,IAAa,KAC3C,WAAY,IAAa,KAAO,IAAa,IAC9C,CAAA,EAEF,GAAa,EAAC,EAAD,CAAgB,UAAS,SAAU,GAAO,SAAU,GAAO,WAAY,CAAI,CAAA,EACxF,GACC,EAAC,EAAD,CACE,SAAU,GACV,SAAU,GACV,WAAY,EACZ,cACE,IAAS,UACJ,GAAkB,GAAG,KAAK,MAAM,EAAQ,GAAG,EAAE,GAC9C,EACG,GAAU,GAAG,IAAQ,IACtB,IAAA,EAET,CAAA,EAEF,GAAe,EAAC,EAAD,CAAS,OAAQ,GAAO,QAAS,EAAC,EAAD,CAAqB,GAAI,CAAe,CAAA,CAAI,CAAA,EAC5F,GAAc,EAAC,EAAD,CAAQ,QAAS,EAAC,EAAD,CAAoB,GAAI,CAAc,CAAA,CAAI,CAAA,EACzE,EAAO,IAAK,GACX,EAAC,EAAD,CAEE,KAAM,EACN,QAAS,EAAK,KACL,UACT,OAAQ,EAAO,EAAK,KAAK,EAAE,MAC3B,KAAM,EAAO,EAAK,KAAK,EAAE,MACZ,cACA,cACb,IAAK,EACS,eACK,oBACnB,kBAAmB,IAAsB,EACzC,GAAI,CACL,EAbM,EAAK,IAaX,CACF,CACgB,GACL,CAAA,CAEpB"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
2
2
|
import { Avatar as Avatar$1 } from "radix-ui";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
|
|
5
4
|
//#region src/components/avatar.d.ts
|
|
6
5
|
type AvatarProps = React.ComponentProps<typeof Avatar$1.Root> & {
|
|
7
6
|
size?: 'sm' | 'md' | 'lg';
|
|
@@ -11,31 +10,12 @@ type AvatarFallbackProps = React.ComponentProps<typeof Avatar$1.Fallback>;
|
|
|
11
10
|
type AvatarBadgeProps = React.ComponentProps<'span'>;
|
|
12
11
|
type AvatarGroupProps = React.ComponentProps<'div'>;
|
|
13
12
|
type AvatarGroupCountProps = React.ComponentProps<'div'>;
|
|
14
|
-
declare function Avatar({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}:
|
|
19
|
-
declare function
|
|
20
|
-
className,
|
|
21
|
-
...props
|
|
22
|
-
}: AvatarImageProps): React.JSX.Element;
|
|
23
|
-
declare function AvatarFallback({
|
|
24
|
-
className,
|
|
25
|
-
...props
|
|
26
|
-
}: AvatarFallbackProps): React.JSX.Element;
|
|
27
|
-
declare function AvatarBadge({
|
|
28
|
-
className,
|
|
29
|
-
...props
|
|
30
|
-
}: AvatarBadgeProps): React.JSX.Element;
|
|
31
|
-
declare function AvatarGroup({
|
|
32
|
-
className,
|
|
33
|
-
...props
|
|
34
|
-
}: AvatarGroupProps): React.JSX.Element;
|
|
35
|
-
declare function AvatarGroupCount({
|
|
36
|
-
className,
|
|
37
|
-
...props
|
|
38
|
-
}: AvatarGroupCountProps): React.JSX.Element;
|
|
13
|
+
declare function Avatar({ className, size, ...props }: AvatarProps): React.JSX.Element;
|
|
14
|
+
declare function AvatarImage({ className, ...props }: AvatarImageProps): React.JSX.Element;
|
|
15
|
+
declare function AvatarFallback({ className, ...props }: AvatarFallbackProps): React.JSX.Element;
|
|
16
|
+
declare function AvatarBadge({ className, ...props }: AvatarBadgeProps): React.JSX.Element;
|
|
17
|
+
declare function AvatarGroup({ className, ...props }: AvatarGroupProps): React.JSX.Element;
|
|
18
|
+
declare function AvatarGroupCount({ className, ...props }: AvatarGroupCountProps): React.JSX.Element;
|
|
39
19
|
//#endregion
|
|
40
20
|
export { Avatar, AvatarBadge, AvatarBadgeProps, AvatarFallback, AvatarFallbackProps, AvatarGroup, AvatarGroupCount, AvatarGroupCountProps, AvatarGroupProps, AvatarImage, AvatarImageProps, AvatarProps };
|
|
41
21
|
//# sourceMappingURL=avatar.d.ts.map
|
|
@@ -1,24 +1,16 @@
|
|
|
1
1
|
import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
2
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
|
|
5
4
|
//#region src/components/badge.d.ts
|
|
6
5
|
declare const badgeVariants: (props?: ({
|
|
7
|
-
size?: "
|
|
8
|
-
variant?: "
|
|
9
|
-
color?: "
|
|
6
|
+
size?: "lg" | "md" | "sm" | "xl" | "xs" | null | undefined;
|
|
7
|
+
variant?: "outline" | "secondary" | "solid" | "subtle" | null | undefined;
|
|
8
|
+
color?: "blue" | "brand" | "gray" | "green" | "indigo" | "pink" | "primary" | "red" | "yellow" | "zinc" | null | undefined;
|
|
10
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
10
|
type BadgeProps = React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
|
|
12
11
|
asChild?: boolean;
|
|
13
12
|
};
|
|
14
|
-
declare function Badge({
|
|
15
|
-
className,
|
|
16
|
-
size,
|
|
17
|
-
variant,
|
|
18
|
-
color,
|
|
19
|
-
asChild,
|
|
20
|
-
...props
|
|
21
|
-
}: BadgeProps): React.JSX.Element;
|
|
13
|
+
declare function Badge({ className, size, variant, color, asChild, ...props }: BadgeProps): React.JSX.Element;
|
|
22
14
|
//#endregion
|
|
23
15
|
export { Badge, BadgeProps, badgeVariants };
|
|
24
16
|
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
2
|
-
import { c as ChartLegendContentProps, m as ChartTooltipContentProps, n as ChartColorKey } from "../chart-
|
|
2
|
+
import { c as ChartLegendContentProps, m as ChartTooltipContentProps, n as ChartColorKey } from "../chart-CVe5-EWS.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Bar, BarChart as BarChart$1 } from "recharts";
|
|
5
|
-
|
|
6
5
|
//#region src/components/bar-chart.d.ts
|
|
7
6
|
type BarChartSeries = {
|
|
8
7
|
name: string;
|
|
@@ -37,28 +36,7 @@ type BarChartProps = Omit<React.ComponentProps<'div'>, 'children'> & {
|
|
|
37
36
|
barProps?: Partial<React.ComponentProps<typeof Bar>>;
|
|
38
37
|
barChartProps?: Omit<React.ComponentProps<typeof BarChart$1>, 'data' | 'layout' | 'stackOffset'>;
|
|
39
38
|
};
|
|
40
|
-
declare function BarChart({
|
|
41
|
-
className,
|
|
42
|
-
data,
|
|
43
|
-
series,
|
|
44
|
-
dataKey,
|
|
45
|
-
type,
|
|
46
|
-
orientation,
|
|
47
|
-
withXAxis,
|
|
48
|
-
withYAxis,
|
|
49
|
-
gridAxis,
|
|
50
|
-
withTooltip,
|
|
51
|
-
withLegend,
|
|
52
|
-
barSize,
|
|
53
|
-
radius,
|
|
54
|
-
unit,
|
|
55
|
-
animationDuration,
|
|
56
|
-
tooltipProps,
|
|
57
|
-
legendProps,
|
|
58
|
-
barProps,
|
|
59
|
-
barChartProps,
|
|
60
|
-
...props
|
|
61
|
-
}: BarChartProps): React.JSX.Element;
|
|
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;
|
|
62
40
|
//#endregion
|
|
63
41
|
export { BarChart, BarChartDatum, BarChartGridAxis, BarChartOrientation, BarChartProps, BarChartSeries, BarChartType };
|
|
64
42
|
//# sourceMappingURL=bar-chart.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bar-chart.js","names":["RechartsBarChart"],"sources":["../../src/components/bar-chart.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Bar, CartesianGrid, Legend, BarChart as RechartsBarChart, Rectangle, Tooltip, XAxis, YAxis } from 'recharts'\n\nimport { cn } from '../lib/utils'\nimport {\n type ChartColorKey,\n type ChartConfig,\n ChartContainer,\n ChartLegendContent,\n type ChartLegendContentProps,\n ChartTooltipContent,\n type ChartTooltipContentProps,\n DEFAULT_CHART_PALETTE,\n resolveChartColor\n} from './chart'\n\nexport type BarChartSeries = {\n name: string\n label?: string\n color?: string\n colorKey?: ChartColorKey\n}\n\nexport type BarChartDatum = Record<string, unknown> & {\n color?: string\n colorKey?: ChartColorKey\n}\n\nexport type BarChartType = 'default' | 'stacked' | 'percent'\nexport type BarChartOrientation = 'vertical' | 'horizontal'\nexport type BarChartGridAxis = 'none' | 'x' | 'y' | 'xy'\n\nexport type BarChartProps = Omit<React.ComponentProps<'div'>, 'children'> & {\n data: BarChartDatum[]\n series: BarChartSeries[]\n dataKey: string\n type?: BarChartType\n orientation?: BarChartOrientation\n withXAxis?: boolean\n withYAxis?: boolean\n gridAxis?: BarChartGridAxis\n withTooltip?: boolean\n withLegend?: boolean\n barSize?: number\n radius?: number | [number, number, number, number]\n unit?: string\n animationDuration?: number\n tooltipProps?: ChartTooltipContentProps\n legendProps?: ChartLegendContentProps\n barProps?: Partial<React.ComponentProps<typeof Bar>>\n barChartProps?: Omit<React.ComponentProps<typeof RechartsBarChart>, 'data' | 'layout' | 'stackOffset'>\n}\n\nfunction buildConfig(series: BarChartSeries[]): ChartConfig {\n return series.reduce<ChartConfig>((acc, item, index) => {\n acc[item.name] = {\n label: item.label ?? item.name,\n color:\n item.color ?? resolveChartColor(item.colorKey) ?? DEFAULT_CHART_PALETTE[index % DEFAULT_CHART_PALETTE.length]\n }\n return acc\n }, {})\n}\n\nfunction BarChart({\n className,\n data,\n series,\n dataKey,\n type = 'default',\n orientation = 'vertical',\n withXAxis = true,\n withYAxis = true,\n gridAxis = 'x',\n withTooltip = true,\n withLegend = false,\n barSize,\n radius = 4,\n unit,\n animationDuration,\n tooltipProps,\n legendProps,\n barProps,\n barChartProps,\n ...props\n}: BarChartProps) {\n const config = React.useMemo(() => buildConfig(series), [series])\n const stackId = type === 'default' ? undefined : 'stack'\n const stackOffset = type === 'percent' ? 'expand' : undefined\n const isHorizontal = orientation === 'horizontal'\n\n const categoryAxisProps = {\n dataKey,\n tickLine: false,\n axisLine: false,\n tickMargin: 8\n } as const\n\n const valueTickFormatter =\n type === 'percent'\n ? (value: number) => `${Math.round(value * 100)}%`\n : unit\n ? (value: number) => `${value}${unit}`\n : undefined\n\n return (\n <ChartContainer data-slot=\"bar-chart\" className={cn('w-full', className)} config={config} {...props}>\n <RechartsBarChart\n {...barChartProps}\n data={data}\n stackOffset={stackOffset}\n layout={isHorizontal ? 'vertical' : 'horizontal'}\n >\n {gridAxis !== 'none' && (\n <CartesianGrid\n vertical={gridAxis === 'y' || gridAxis === 'xy'}\n horizontal={gridAxis === 'x' || gridAxis === 'xy'}\n />\n )}\n {withXAxis &&\n (isHorizontal ? (\n <XAxis type=\"number\" tickLine={false} axisLine={false} tickMargin={8} tickFormatter={valueTickFormatter} />\n ) : (\n <XAxis type=\"category\" {...categoryAxisProps} />\n ))}\n {withYAxis &&\n (isHorizontal ? (\n <YAxis type=\"category\" {...categoryAxisProps} />\n ) : (\n <YAxis type=\"number\" tickLine={false} axisLine={false} tickMargin={8} tickFormatter={valueTickFormatter} />\n ))}\n {withTooltip && <Tooltip cursor={false} content={<ChartTooltipContent {...tooltipProps} />} />}\n {withLegend && <Legend content={<ChartLegendContent {...legendProps} />} />}\n {series.map((item) => {\n const seriesColor = config[item.name]?.color\n return (\n <Bar\n key={item.name}\n dataKey={item.name}\n stackId={stackId}\n fill={seriesColor}\n radius={radius}\n barSize={barSize}\n animationDuration={animationDuration}\n isAnimationActive={animationDuration !== 0}\n shape={(shapeProps) => {\n const row = shapeProps.payload as BarChartDatum | undefined\n const fill = row?.color ?? resolveChartColor(row?.colorKey) ?? seriesColor\n return <Rectangle {...shapeProps} fill={fill} />\n }}\n {...barProps}\n />\n )\n })}\n </RechartsBarChart>\n </ChartContainer>\n )\n}\n\nexport { BarChart }\n"],"mappings":"oaAsDA,SAAS,YAAY,EAAuC,CAC1D,OAAO,EAAO,QAAqB,EAAK,EAAM,KAC5C,EAAI,EAAK,MAAQ,CACf,MAAO,EAAK,OAAS,EAAK,KAC1B,MACE,EAAK,OAAS,EAAkB,EAAK,QAAQ,GAAK,EAAsB,EAAQ,EAAsB,OAC1G,EACO,GACN,CAAC,CAAC,CACP,CAEA,SAAS,SAAS,CAChB,YACA,OACA,SACA,UACA,OAAO,UACP,cAAc,WACd,YAAY,GACZ,YAAY,GACZ,WAAW,IACX,cAAc,GACd,aAAa,GACb,UACA,SAAS,EACT,OACA,oBACA,eACA,cACA,WACA,gBACA,GAAG,GACa,CAChB,IAAM,EAAS,EAAM,YAAc,YAAY,CAAM,EAAG,CAAC,CAAM,CAAC,EAC1D,EAAU,IAAS,UAAY,IAAA,GAAY,QAC3C,EAAc,IAAS,UAAY,SAAW,IAAA,GAC9C,EAAe,IAAgB,aAE/B,EAAoB,CACxB,UACA,SAAU,GACV,SAAU,GACV,WAAY,CACd,EAEM,EACJ,IAAS,UACJ,GAAkB,GAAG,KAAK,MAAM,EAAQ,GAAG,EAAE,GAC9C,EACG,GAAkB,GAAG,IAAQ,IAC9B,IAAA,GAER,OACE,EAAC,EAAD,CAAgB,YAAU,YAAY,UAAW,EAAG,SAAU,CAAS,EAAW,SAAQ,GAAI,
|
|
1
|
+
{"version":3,"file":"bar-chart.js","names":["RechartsBarChart"],"sources":["../../src/components/bar-chart.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Bar, CartesianGrid, Legend, BarChart as RechartsBarChart, Rectangle, Tooltip, XAxis, YAxis } from 'recharts'\n\nimport { cn } from '../lib/utils'\nimport {\n type ChartColorKey,\n type ChartConfig,\n ChartContainer,\n ChartLegendContent,\n type ChartLegendContentProps,\n ChartTooltipContent,\n type ChartTooltipContentProps,\n DEFAULT_CHART_PALETTE,\n resolveChartColor\n} from './chart'\n\nexport type BarChartSeries = {\n name: string\n label?: string\n color?: string\n colorKey?: ChartColorKey\n}\n\nexport type BarChartDatum = Record<string, unknown> & {\n color?: string\n colorKey?: ChartColorKey\n}\n\nexport type BarChartType = 'default' | 'stacked' | 'percent'\nexport type BarChartOrientation = 'vertical' | 'horizontal'\nexport type BarChartGridAxis = 'none' | 'x' | 'y' | 'xy'\n\nexport type BarChartProps = Omit<React.ComponentProps<'div'>, 'children'> & {\n data: BarChartDatum[]\n series: BarChartSeries[]\n dataKey: string\n type?: BarChartType\n orientation?: BarChartOrientation\n withXAxis?: boolean\n withYAxis?: boolean\n gridAxis?: BarChartGridAxis\n withTooltip?: boolean\n withLegend?: boolean\n barSize?: number\n radius?: number | [number, number, number, number]\n unit?: string\n animationDuration?: number\n tooltipProps?: ChartTooltipContentProps\n legendProps?: ChartLegendContentProps\n barProps?: Partial<React.ComponentProps<typeof Bar>>\n barChartProps?: Omit<React.ComponentProps<typeof RechartsBarChart>, 'data' | 'layout' | 'stackOffset'>\n}\n\nfunction buildConfig(series: BarChartSeries[]): ChartConfig {\n return series.reduce<ChartConfig>((acc, item, index) => {\n acc[item.name] = {\n label: item.label ?? item.name,\n color:\n item.color ?? resolveChartColor(item.colorKey) ?? DEFAULT_CHART_PALETTE[index % DEFAULT_CHART_PALETTE.length]\n }\n return acc\n }, {})\n}\n\nfunction BarChart({\n className,\n data,\n series,\n dataKey,\n type = 'default',\n orientation = 'vertical',\n withXAxis = true,\n withYAxis = true,\n gridAxis = 'x',\n withTooltip = true,\n withLegend = false,\n barSize,\n radius = 4,\n unit,\n animationDuration,\n tooltipProps,\n legendProps,\n barProps,\n barChartProps,\n ...props\n}: BarChartProps) {\n const config = React.useMemo(() => buildConfig(series), [series])\n const stackId = type === 'default' ? undefined : 'stack'\n const stackOffset = type === 'percent' ? 'expand' : undefined\n const isHorizontal = orientation === 'horizontal'\n\n const categoryAxisProps = {\n dataKey,\n tickLine: false,\n axisLine: false,\n tickMargin: 8\n } as const\n\n const valueTickFormatter =\n type === 'percent'\n ? (value: number) => `${Math.round(value * 100)}%`\n : unit\n ? (value: number) => `${value}${unit}`\n : undefined\n\n return (\n <ChartContainer data-slot=\"bar-chart\" className={cn('w-full', className)} config={config} {...props}>\n <RechartsBarChart\n {...barChartProps}\n data={data}\n stackOffset={stackOffset}\n layout={isHorizontal ? 'vertical' : 'horizontal'}\n >\n {gridAxis !== 'none' && (\n <CartesianGrid\n vertical={gridAxis === 'y' || gridAxis === 'xy'}\n horizontal={gridAxis === 'x' || gridAxis === 'xy'}\n />\n )}\n {withXAxis &&\n (isHorizontal ? (\n <XAxis type=\"number\" tickLine={false} axisLine={false} tickMargin={8} tickFormatter={valueTickFormatter} />\n ) : (\n <XAxis type=\"category\" {...categoryAxisProps} />\n ))}\n {withYAxis &&\n (isHorizontal ? (\n <YAxis type=\"category\" {...categoryAxisProps} />\n ) : (\n <YAxis type=\"number\" tickLine={false} axisLine={false} tickMargin={8} tickFormatter={valueTickFormatter} />\n ))}\n {withTooltip && <Tooltip cursor={false} content={<ChartTooltipContent {...tooltipProps} />} />}\n {withLegend && <Legend content={<ChartLegendContent {...legendProps} />} />}\n {series.map((item) => {\n const seriesColor = config[item.name]?.color\n return (\n <Bar\n key={item.name}\n dataKey={item.name}\n stackId={stackId}\n fill={seriesColor}\n radius={radius}\n barSize={barSize}\n animationDuration={animationDuration}\n isAnimationActive={animationDuration !== 0}\n shape={(shapeProps) => {\n const row = shapeProps.payload as BarChartDatum | undefined\n const fill = row?.color ?? resolveChartColor(row?.colorKey) ?? seriesColor\n return <Rectangle {...shapeProps} fill={fill} />\n }}\n {...barProps}\n />\n )\n })}\n </RechartsBarChart>\n </ChartContainer>\n )\n}\n\nexport { BarChart }\n"],"mappings":"oaAsDA,SAAS,YAAY,EAAuC,CAC1D,OAAO,EAAO,QAAqB,EAAK,EAAM,KAC5C,EAAI,EAAK,MAAQ,CACf,MAAO,EAAK,OAAS,EAAK,KAC1B,MACE,EAAK,OAAS,EAAkB,EAAK,QAAQ,GAAK,EAAsB,EAAQ,EAAsB,OAC1G,EACO,GACN,CAAC,CAAC,CACP,CAEA,SAAS,SAAS,CAChB,YACA,OACA,SACA,UACA,OAAO,UACP,cAAc,WACd,YAAY,GACZ,YAAY,GACZ,WAAW,IACX,cAAc,GACd,aAAa,GACb,UACA,SAAS,EACT,OACA,oBACA,eACA,cACA,WACA,gBACA,GAAG,GACa,CAChB,IAAM,EAAS,EAAM,YAAc,YAAY,CAAM,EAAG,CAAC,CAAM,CAAC,EAC1D,EAAU,IAAS,UAAY,IAAA,GAAY,QAC3C,EAAc,IAAS,UAAY,SAAW,IAAA,GAC9C,EAAe,IAAgB,aAE/B,EAAoB,CACxB,UACA,SAAU,GACV,SAAU,GACV,WAAY,CACd,EAEM,EACJ,IAAS,UACJ,GAAkB,GAAG,KAAK,MAAM,EAAQ,GAAG,EAAE,GAC9C,EACG,GAAkB,GAAG,IAAQ,IAC9B,IAAA,GAER,OACE,EAAC,EAAD,CAAgB,YAAU,YAAY,UAAW,EAAG,SAAU,CAAS,EAAW,SAAQ,GAAI,EAC5F,SAAA,EAACA,EAAD,CACE,GAAI,EACE,OACO,cACb,OAAQ,EAAe,WAAa,aAJtC,SAAA,CAMG,IAAa,QACZ,EAAC,EAAD,CACE,SAAU,IAAa,KAAO,IAAa,KAC3C,WAAY,IAAa,KAAO,IAAa,IAC9C,CAAA,EAEF,IACE,EACC,EAAC,EAAD,CAAO,KAAK,SAAS,SAAU,GAAO,SAAU,GAAO,WAAY,EAAG,cAAe,CAAqB,CAAA,EAE1G,EAAC,EAAD,CAAO,KAAK,WAAW,GAAI,CAAoB,CAAA,GAElD,IACE,EACC,EAAC,EAAD,CAAO,KAAK,WAAW,GAAI,CAAoB,CAAA,EAE/C,EAAC,EAAD,CAAO,KAAK,SAAS,SAAU,GAAO,SAAU,GAAO,WAAY,EAAG,cAAe,CAAqB,CAAA,GAE7G,GAAe,EAAC,EAAD,CAAS,OAAQ,GAAO,QAAS,EAAC,EAAD,CAAqB,GAAI,CAAe,CAAA,CAAI,CAAA,EAC5F,GAAc,EAAC,EAAD,CAAQ,QAAS,EAAC,EAAD,CAAoB,GAAI,CAAc,CAAA,CAAI,CAAA,EACzE,EAAO,IAAK,GAAS,CACpB,IAAM,EAAc,EAAO,EAAK,KAAK,EAAE,MACvC,OACE,EAAC,EAAD,CAEE,QAAS,EAAK,KACL,UACT,KAAM,EACE,SACC,UACU,oBACnB,kBAAmB,IAAsB,EACzC,MAAQ,GAAe,CACrB,IAAM,EAAM,EAAW,QACjB,EAAO,GAAK,OAAS,EAAkB,GAAK,QAAQ,GAAK,EAC/D,OAAO,EAAC,EAAD,CAAW,GAAI,EAAkB,MAAO,CAAA,CACjD,EACA,GAAI,CACL,EAdM,EAAK,IAcX,CAEL,CAAC,CACe,GACJ,CAAA,CAEpB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
|
|
4
3
|
//#region src/components/breadcrumb.d.ts
|
|
5
4
|
type BreadcrumbProps = React.ComponentProps<'nav'>;
|
|
6
5
|
type BreadcrumbListProps = React.ComponentProps<'ol'>;
|
|
@@ -11,36 +10,13 @@ type BreadcrumbLinkProps = React.ComponentProps<'a'> & {
|
|
|
11
10
|
type BreadcrumbPageProps = React.ComponentProps<'span'>;
|
|
12
11
|
type BreadcrumbSeparatorProps = React.ComponentProps<'li'>;
|
|
13
12
|
type BreadcrumbEllipsisProps = React.ComponentProps<'span'>;
|
|
14
|
-
declare function Breadcrumb({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}:
|
|
18
|
-
declare function
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}: BreadcrumbListProps): React.JSX.Element;
|
|
22
|
-
declare function BreadcrumbItem({
|
|
23
|
-
className,
|
|
24
|
-
...props
|
|
25
|
-
}: BreadcrumbItemProps): React.JSX.Element;
|
|
26
|
-
declare function BreadcrumbLink({
|
|
27
|
-
asChild,
|
|
28
|
-
className,
|
|
29
|
-
...props
|
|
30
|
-
}: BreadcrumbLinkProps): React.JSX.Element;
|
|
31
|
-
declare function BreadcrumbPage({
|
|
32
|
-
className,
|
|
33
|
-
...props
|
|
34
|
-
}: BreadcrumbPageProps): React.JSX.Element;
|
|
35
|
-
declare function BreadcrumbSeparator({
|
|
36
|
-
children,
|
|
37
|
-
className,
|
|
38
|
-
...props
|
|
39
|
-
}: BreadcrumbSeparatorProps): React.JSX.Element;
|
|
40
|
-
declare function BreadcrumbEllipsis({
|
|
41
|
-
className,
|
|
42
|
-
...props
|
|
43
|
-
}: BreadcrumbEllipsisProps): React.JSX.Element;
|
|
13
|
+
declare function Breadcrumb({ className, ...props }: BreadcrumbProps): React.JSX.Element;
|
|
14
|
+
declare function BreadcrumbList({ className, ...props }: BreadcrumbListProps): React.JSX.Element;
|
|
15
|
+
declare function BreadcrumbItem({ className, ...props }: BreadcrumbItemProps): React.JSX.Element;
|
|
16
|
+
declare function BreadcrumbLink({ asChild, className, ...props }: BreadcrumbLinkProps): React.JSX.Element;
|
|
17
|
+
declare function BreadcrumbPage({ className, ...props }: BreadcrumbPageProps): React.JSX.Element;
|
|
18
|
+
declare function BreadcrumbSeparator({ children, className, ...props }: BreadcrumbSeparatorProps): React.JSX.Element;
|
|
19
|
+
declare function BreadcrumbEllipsis({ className, ...props }: BreadcrumbEllipsisProps): React.JSX.Element;
|
|
44
20
|
//#endregion
|
|
45
21
|
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbEllipsisProps, BreadcrumbItem, BreadcrumbItemProps, BreadcrumbLink, BreadcrumbLinkProps, BreadcrumbList, BreadcrumbListProps, BreadcrumbPage, BreadcrumbPageProps, BreadcrumbProps, BreadcrumbSeparator, BreadcrumbSeparatorProps };
|
|
46
22
|
//# sourceMappingURL=breadcrumb.d.ts.map
|