@uselets/ui 1.2.2 → 1.4.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 +96 -5
- package/dist/chart-DHS2QeM8.d.ts +80 -0
- package/dist/cli/uselets.mjs.map +1 -1
- package/dist/components/accordion.d.ts +4 -5
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/alert-dialog.d.ts +12 -13
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/alert.d.ts +5 -7
- package/dist/components/alert.js.map +1 -1
- package/dist/components/anchor.d.ts +2 -4
- package/dist/components/anchor.js.map +1 -1
- package/dist/components/area-chart.d.ts +58 -0
- package/dist/components/area-chart.js +2 -0
- package/dist/components/area-chart.js.map +1 -0
- package/dist/components/avatar.d.ts +6 -7
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/badge.d.ts +2 -4
- package/dist/components/badge.js.map +1 -1
- package/dist/components/bar-chart.d.ts +54 -0
- package/dist/components/bar-chart.js +2 -0
- package/dist/components/bar-chart.js.map +1 -0
- package/dist/components/breadcrumb.d.ts +7 -8
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/button-group.d.ts +4 -6
- package/dist/components/button-group.js.map +1 -1
- package/dist/components/button.d.ts +2 -4
- package/dist/components/button.js.map +1 -1
- package/dist/components/calendar.d.ts +2 -3
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/card.d.ts +7 -8
- package/dist/components/card.js.map +1 -1
- package/dist/components/carousel.d.ts +17 -7
- package/dist/components/carousel.js +1 -1
- package/dist/components/carousel.js.map +1 -1
- package/dist/components/carousel.spec.d.ts +1 -0
- package/dist/components/carousel.spec.js +2 -0
- package/dist/components/carousel.spec.js.map +1 -0
- package/dist/components/center.d.ts +2 -4
- package/dist/components/center.js.map +1 -1
- package/dist/components/chart.d.ts +2 -263
- package/dist/components/chart.js +1 -1
- package/dist/components/chart.js.map +1 -1
- package/dist/components/checkbox.d.ts +2 -4
- package/dist/components/checkbox.js +1 -1
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/code.d.ts +1 -2
- package/dist/components/code.js.map +1 -1
- package/dist/components/collapsible.d.ts +3 -4
- package/dist/components/collapsible.js.map +1 -1
- package/dist/components/combobox.d.ts +15 -16
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/command.d.ts +9 -10
- package/dist/components/command.js.map +1 -1
- package/dist/components/container.d.ts +2 -4
- package/dist/components/container.js.map +1 -1
- package/dist/components/data-table.d.ts +164 -0
- package/dist/components/data-table.js +2 -0
- package/dist/components/data-table.js.map +1 -0
- package/dist/components/date-range-picker.d.ts +11 -12
- package/dist/components/date-range-picker.js.map +1 -1
- package/dist/components/dialog.d.ts +11 -13
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/donut-chart.d.ts +22 -0
- package/dist/components/donut-chart.js +2 -0
- package/dist/components/donut-chart.js.map +1 -0
- package/dist/components/drawer.d.ts +12 -14
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.d.ts +15 -16
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/dropzone.d.ts +1 -2
- package/dist/components/dropzone.js.map +1 -1
- package/dist/components/empty.d.ts +7 -9
- package/dist/components/empty.js.map +1 -1
- package/dist/components/field.d.ts +11 -13
- package/dist/components/field.js.map +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 +25 -0
- package/dist/components/flex.js +2 -0
- package/dist/components/flex.js.map +1 -0
- package/dist/components/grid.d.ts +2 -3
- package/dist/components/grid.js +1 -1
- package/dist/components/grid.js.map +1 -1
- package/dist/components/group.d.ts +6 -4
- package/dist/components/group.js +1 -1
- package/dist/components/group.js.map +1 -1
- package/dist/components/heading.d.ts +2 -4
- package/dist/components/heading.js.map +1 -1
- package/dist/components/hover-card.d.ts +3 -4
- package/dist/components/hover-card.js.map +1 -1
- package/dist/components/input-group.d.ts +8 -10
- package/dist/components/input-group.js.map +1 -1
- package/dist/components/input-otp.d.ts +4 -5
- package/dist/components/input-otp.js.map +1 -1
- package/dist/components/input.d.ts +1 -2
- package/dist/components/input.js.map +1 -1
- package/dist/components/kbd.d.ts +2 -3
- package/dist/components/kbd.js.map +1 -1
- package/dist/components/label.d.ts +1 -2
- package/dist/components/label.js.map +1 -1
- package/dist/components/list.d.ts +4 -6
- package/dist/components/list.js.map +1 -1
- package/dist/components/mask-input.d.ts +25 -0
- package/dist/components/mask-input.js +2 -0
- package/dist/components/mask-input.js.map +1 -0
- package/dist/components/native-select.d.ts +3 -4
- package/dist/components/native-select.js.map +1 -1
- package/dist/components/navigation-menu.d.ts +9 -11
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/pagination.d.ts +7 -8
- package/dist/components/pagination.js.map +1 -1
- package/dist/components/pie-chart.d.ts +58 -0
- package/dist/components/pie-chart.js +2 -0
- package/dist/components/pie-chart.js.map +1 -0
- package/dist/components/popover.d.ts +7 -8
- package/dist/components/popover.js.map +1 -1
- package/dist/components/progress.d.ts +1 -2
- package/dist/components/progress.js.map +1 -1
- package/dist/components/radio-group.d.ts +3 -5
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/resizable.d.ts +3 -4
- package/dist/components/resizable.js.map +1 -1
- package/dist/components/scroll-area.d.ts +2 -3
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/select.d.ts +10 -11
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.d.ts +1 -2
- package/dist/components/separator.js.map +1 -1
- package/dist/components/sidebar.d.ts +24 -26
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/simple-grid.d.ts +1 -2
- package/dist/components/simple-grid.js +1 -1
- package/dist/components/simple-grid.js.map +1 -1
- package/dist/components/skeleton.d.ts +1 -2
- package/dist/components/skeleton.js.map +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 -2
- package/dist/components/slider.js.map +1 -1
- package/dist/components/sonner.d.ts +1 -2
- package/dist/components/sonner.js.map +1 -1
- package/dist/components/spinner.d.ts +2 -4
- package/dist/components/spinner.js.map +1 -1
- package/dist/components/stack.d.ts +6 -4
- package/dist/components/stack.js +1 -1
- package/dist/components/stack.js.map +1 -1
- package/dist/components/switch.d.ts +1 -2
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.d.ts +29 -11
- package/dist/components/table.js +1 -1
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.d.ts +5 -7
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/text.d.ts +2 -4
- package/dist/components/text.js.map +1 -1
- package/dist/components/textarea.d.ts +1 -2
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/theme.d.ts +2 -3
- package/dist/components/theme.js +1 -1
- package/dist/components/theme.js.map +1 -1
- package/dist/components/timeline.d.ts +3 -4
- package/dist/components/timeline.js.map +1 -1
- package/dist/components/toggle-group.d.ts +2 -3
- package/dist/components/toggle-group.js.map +1 -1
- package/dist/components/toggle.d.ts +2 -4
- package/dist/components/toggle.js.map +1 -1
- package/dist/components/tooltip.d.ts +5 -6
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/unstyled-button.d.ts +1 -2
- package/dist/components/unstyled-button.js.map +1 -1
- package/dist/components/visibility.d.ts +2 -3
- package/dist/components/visibility.js.map +1 -1
- package/dist/dist-C35vdEt2.js +129 -0
- package/dist/dist-C35vdEt2.js.map +1 -0
- package/dist/hooks/use-breakpoint-value.js.map +1 -1
- package/dist/hooks/use-breakpoint-value.spec.js +1 -14
- package/dist/hooks/use-breakpoint-value.spec.js.map +1 -1
- package/dist/hooks/use-breakpoint.js.map +1 -1
- package/dist/hooks/use-breakpoint.spec.js +1 -1
- package/dist/hooks/use-breakpoint.spec.js.map +1 -1
- package/dist/hooks/use-disclosure.js.map +1 -1
- package/dist/hooks/use-disclosure.spec.js +1 -1
- package/dist/hooks/use-disclosure.spec.js.map +1 -1
- package/dist/hooks/use-document-visibility.js.map +1 -1
- package/dist/hooks/use-document-visibility.spec.js +1 -1
- package/dist/hooks/use-document-visibility.spec.js.map +1 -1
- package/dist/hooks/use-idle.js.map +1 -1
- package/dist/hooks/use-idle.spec.js +1 -1
- package/dist/hooks/use-idle.spec.js.map +1 -1
- package/dist/hooks/use-interval.js.map +1 -1
- package/dist/hooks/use-interval.spec.js +1 -1
- package/dist/hooks/use-interval.spec.js.map +1 -1
- package/dist/hooks/use-local-storage.js.map +1 -1
- package/dist/hooks/use-local-storage.spec.js +1 -1
- package/dist/hooks/use-local-storage.spec.js.map +1 -1
- package/dist/hooks/use-mask.d.ts +9 -0
- package/dist/hooks/use-mask.js +2 -0
- package/dist/hooks/use-mask.js.map +1 -0
- package/dist/hooks/use-mobile.js.map +1 -1
- package/dist/hooks/use-mobile.spec.js +1 -1
- package/dist/hooks/use-mobile.spec.js.map +1 -1
- package/dist/index.d.ts +12 -4
- package/dist/index.js +1 -1
- package/dist/lib/button.js.map +1 -1
- package/dist/lib/color.js.map +1 -1
- package/dist/lib/utils.js.map +1 -1
- package/dist/magic-string.es-C-uSEkg2.js +15 -0
- package/dist/magic-string.es-C-uSEkg2.js.map +1 -0
- package/dist/postcss.config.js.map +1 -1
- package/dist/{react.esm-B3a5z6DL.js → react.esm-BagSCtI3.js} +12 -3
- package/dist/{react.esm-B3a5z6DL.js.map → react.esm-BagSCtI3.js.map} +1 -1
- package/dist/skills/uselets-ui/SKILL.md +1 -0
- package/dist/skills/uselets-ui/references/component-catalog.md +37 -7
- package/dist/skills/uselets-ui/references/package-guide.md +139 -2
- package/package.json +15 -13
- package/skills/uselets-ui/SKILL.md +1 -0
- package/skills/uselets-ui/references/component-catalog.md +37 -7
- package/skills/uselets-ui/references/package-guide.md +139 -2
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { n as __name } from "../chunk-CHh1Zzun.js";
|
|
2
|
+
import { f as ChartTooltipContentProps, o as ChartLegendContentProps } from "../chart-DHS2QeM8.js";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/area-chart.d.ts
|
|
6
|
+
type AreaChartSeries = {
|
|
7
|
+
name: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
color?: string;
|
|
10
|
+
};
|
|
11
|
+
type AreaChartType = 'default' | 'stacked' | 'percent' | 'split';
|
|
12
|
+
type AreaChartCurveType = 'linear' | 'monotone' | 'natural' | 'step' | 'bump' | 'stepAfter' | 'stepBefore';
|
|
13
|
+
type AreaChartGridAxis = 'none' | 'x' | 'y' | 'xy';
|
|
14
|
+
type AreaChartProps = Omit<React.ComponentProps<'div'>, 'children'> & {
|
|
15
|
+
data: Array<Record<string, unknown>>;
|
|
16
|
+
series: AreaChartSeries[];
|
|
17
|
+
dataKey: string;
|
|
18
|
+
type?: AreaChartType;
|
|
19
|
+
curveType?: AreaChartCurveType;
|
|
20
|
+
withXAxis?: boolean;
|
|
21
|
+
withYAxis?: boolean;
|
|
22
|
+
gridAxis?: AreaChartGridAxis;
|
|
23
|
+
withDots?: boolean;
|
|
24
|
+
withTooltip?: boolean;
|
|
25
|
+
withLegend?: boolean;
|
|
26
|
+
connectNulls?: boolean;
|
|
27
|
+
unit?: string;
|
|
28
|
+
fillOpacity?: number;
|
|
29
|
+
strokeWidth?: number;
|
|
30
|
+
animationDuration?: number;
|
|
31
|
+
tooltipProps?: ChartTooltipContentProps;
|
|
32
|
+
legendProps?: ChartLegendContentProps;
|
|
33
|
+
};
|
|
34
|
+
declare function AreaChart({
|
|
35
|
+
className,
|
|
36
|
+
data,
|
|
37
|
+
series,
|
|
38
|
+
dataKey,
|
|
39
|
+
type,
|
|
40
|
+
curveType,
|
|
41
|
+
withXAxis,
|
|
42
|
+
withYAxis,
|
|
43
|
+
gridAxis,
|
|
44
|
+
withDots,
|
|
45
|
+
withTooltip,
|
|
46
|
+
withLegend,
|
|
47
|
+
connectNulls,
|
|
48
|
+
unit,
|
|
49
|
+
fillOpacity,
|
|
50
|
+
strokeWidth,
|
|
51
|
+
animationDuration,
|
|
52
|
+
tooltipProps,
|
|
53
|
+
legendProps,
|
|
54
|
+
...props
|
|
55
|
+
}: AreaChartProps): import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
//#endregion
|
|
57
|
+
export { AreaChart, AreaChartCurveType, AreaChartGridAxis, AreaChartProps, AreaChartSeries, AreaChartType };
|
|
58
|
+
//# sourceMappingURL=area-chart.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{ChartContainer as t,ChartLegendContent as n,ChartTooltipContent as r}from"./chart.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";import*as o from"react";import{Area as s,AreaChart as c,CartesianGrid as l,Legend as u,Tooltip as d,XAxis as f,YAxis as p}from"recharts";const m=[`var(--chart-1)`,`var(--chart-2)`,`var(--chart-3)`,`var(--chart-4)`,`var(--chart-5)`];function buildConfig(e){return e.reduce((e,t,n)=>(e[t.name]={label:t.label??t.name,color:t.color??m[n%m.length]},e),{})}function AreaChart({className:m,data:h,series:g,dataKey:_,type:v=`default`,curveType:y=`monotone`,withXAxis:b=!0,withYAxis:x=!0,gridAxis:S=`x`,withDots:C=!1,withTooltip:w=!0,withLegend:T=!1,connectNulls:E,unit:D,fillOpacity:O=.2,strokeWidth:k=2,animationDuration:A,tooltipProps:j,legendProps:M,...N}){let P=o.useMemo(()=>buildConfig(g),[g]),F=v===`default`?void 0:`stack`,I=v===`percent`?`expand`:v===`split`?`silhouette`:void 0;return i(t,{"data-slot":`area-chart`,className:e(`w-full`,m),config:P,...N,children:a(c,{data:h,stackOffset:I,children:[S!==`none`&&i(l,{vertical:S===`y`||S===`xy`,horizontal:S===`x`||S===`xy`}),b&&i(f,{dataKey:_,tickLine:!1,axisLine:!1,tickMargin:8}),x&&i(p,{tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:v===`percent`?e=>`${Math.round(e*100)}%`:D?e=>`${e}${D}`:void 0}),w&&i(d,{cursor:!1,content:i(r,{...j})}),T&&i(u,{content:i(n,{...M})}),g.map(e=>i(s,{type:y,dataKey:e.name,stackId:F,stroke:`var(--color-${e.name})`,fill:`var(--color-${e.name})`,fillOpacity:O,strokeWidth:k,dot:C,connectNulls:E,animationDuration:A,isAnimationActive:A!==0},e.name))]})})}export{AreaChart};
|
|
2
|
+
//# sourceMappingURL=area-chart.js.map
|
|
@@ -0,0 +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 ChartConfig,\n ChartContainer,\n ChartLegendContent,\n type ChartLegendContentProps,\n ChartTooltipContent,\n type ChartTooltipContentProps\n} from './chart'\n\nconst DEFAULT_PALETTE = [\n 'var(--chart-1)',\n 'var(--chart-2)',\n 'var(--chart-3)',\n 'var(--chart-4)',\n 'var(--chart-5)'\n] as const\n\nexport type AreaChartSeries = {\n name: string\n label?: string\n color?: string\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}\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: item.color ?? DEFAULT_PALETTE[index % DEFAULT_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 ...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 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={`var(--color-${item.name})`}\n fill={`var(--color-${item.name})`}\n fillOpacity={fillOpacity}\n strokeWidth={strokeWidth}\n dot={withDots}\n connectNulls={connectNulls}\n animationDuration={animationDuration}\n isAnimationActive={animationDuration !== 0}\n />\n ))}\n </RechartsAreaChart>\n </ChartContainer>\n )\n}\n\nexport { AreaChart }\n"],"mappings":"0VAcA,MAAM,EAAkB,CACtB,iBACA,iBACA,iBACA,iBACA,gBACF,EAiCA,SAAS,YAAY,EAAwC,CAC3D,OAAO,EAAO,QAAqB,EAAK,EAAM,KAC5C,EAAI,EAAK,MAAQ,CACf,MAAO,EAAK,OAAS,EAAK,KAC1B,MAAO,EAAK,OAAS,EAAgB,EAAQ,EAAgB,OAC/D,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,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,WAC7F,EAACA,EAAD,CAAyB,OAAmB,uBAA5C,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,eAAe,EAAK,KAAK,GACjC,KAAM,eAAe,EAAK,KAAK,GAClB,cACA,cACb,IAAK,EACS,eACK,oBACnB,kBAAmB,IAAsB,CAC1C,EAZM,EAAK,IAYX,CACF,CACgB,GACL,CAAA,CAEpB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { n as __name } from "../chunk-CHh1Zzun.js";
|
|
2
2
|
import { Avatar as Avatar$1 } from "radix-ui";
|
|
3
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
3
|
import * as React from "react";
|
|
5
4
|
|
|
6
5
|
//#region src/components/avatar.d.ts
|
|
@@ -16,27 +15,27 @@ declare function Avatar({
|
|
|
16
15
|
className,
|
|
17
16
|
size,
|
|
18
17
|
...props
|
|
19
|
-
}: AvatarProps):
|
|
18
|
+
}: AvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
20
19
|
declare function AvatarImage({
|
|
21
20
|
className,
|
|
22
21
|
...props
|
|
23
|
-
}: AvatarImageProps):
|
|
22
|
+
}: AvatarImageProps): import("react/jsx-runtime").JSX.Element;
|
|
24
23
|
declare function AvatarFallback({
|
|
25
24
|
className,
|
|
26
25
|
...props
|
|
27
|
-
}: AvatarFallbackProps):
|
|
26
|
+
}: AvatarFallbackProps): import("react/jsx-runtime").JSX.Element;
|
|
28
27
|
declare function AvatarBadge({
|
|
29
28
|
className,
|
|
30
29
|
...props
|
|
31
|
-
}: AvatarBadgeProps):
|
|
30
|
+
}: AvatarBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
32
31
|
declare function AvatarGroup({
|
|
33
32
|
className,
|
|
34
33
|
...props
|
|
35
|
-
}: AvatarGroupProps):
|
|
34
|
+
}: AvatarGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
36
35
|
declare function AvatarGroupCount({
|
|
37
36
|
className,
|
|
38
37
|
...props
|
|
39
|
-
}: AvatarGroupCountProps):
|
|
38
|
+
}: AvatarGroupCountProps): import("react/jsx-runtime").JSX.Element;
|
|
40
39
|
//#endregion
|
|
41
40
|
export { Avatar, AvatarBadge, AvatarBadgeProps, AvatarFallback, AvatarFallbackProps, AvatarGroup, AvatarGroupCount, AvatarGroupCountProps, AvatarGroupProps, AvatarImage, AvatarImageProps, AvatarProps };
|
|
42
41
|
//# sourceMappingURL=avatar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.js","names":["AvatarPrimitive"],"sources":["../../src/components/avatar.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { Avatar as AvatarPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type AvatarProps = React.ComponentProps<typeof AvatarPrimitive.Root> & {\n size?: 'sm' | 'md' | 'lg'\n}\n\nexport type AvatarImageProps = React.ComponentProps<typeof AvatarPrimitive.Image>\n\nexport type AvatarFallbackProps = React.ComponentProps<typeof AvatarPrimitive.Fallback>\n\nexport type AvatarBadgeProps = React.ComponentProps<'span'>\n\nexport type AvatarGroupProps = React.ComponentProps<'div'>\n\nexport type AvatarGroupCountProps = React.ComponentProps<'div'>\n\nfunction Avatar({ className, size = 'md', ...props }: AvatarProps) {\n return (\n <AvatarPrimitive.Root\n data-slot=\"avatar\"\n data-size={size}\n className={cn(\n 'group/avatar relative flex shrink-0 size-8 rounded-full select-none',\n 'data-[size=lg]:size-10 data-[size=sm]:size-6',\n 'after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken dark:after:mix-blend-lighten',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AvatarImage({ className, ...props }: AvatarImageProps) {\n return (\n <AvatarPrimitive.Image\n data-slot=\"avatar-image\"\n className={cn('rounded-full aspect-square size-full object-cover', className)}\n {...props}\n />\n )\n}\n\nfunction AvatarFallback({ className, ...props }: AvatarFallbackProps) {\n return (\n <AvatarPrimitive.Fallback\n data-slot=\"avatar-fallback\"\n className={cn(\n 'bg-muted text-muted-foreground rounded-full flex size-full items-center justify-center text-sm group-data-[size=sm]/avatar:text-xs',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AvatarBadge({ className, ...props }: AvatarBadgeProps) {\n return (\n <span\n data-slot=\"avatar-badge\"\n className={cn(\n 'bg-primary text-primary-foreground ring-background absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-blend-color ring-2 select-none',\n 'group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden',\n 'group-data-[size=md]/avatar:size-2.5 group-data-[size=md]/avatar:[&>svg]:size-2',\n 'group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AvatarGroup({ className, ...props }: AvatarGroupProps) {\n return (\n <div\n data-slot=\"avatar-group\"\n className={cn(\n '*:data-[slot=avatar]:ring-background group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AvatarGroupCount({ className, ...props }: AvatarGroupCountProps) {\n return (\n <div\n data-slot=\"avatar-group-count\"\n className={cn(\n 'bg-muted text-muted-foreground ring-background relative flex shrink-0 items-center justify-center size-8 rounded-full text-sm ring-2',\n 'group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6',\n '[&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage }\n"],"mappings":"4IAoBA,SAAS,OAAO,CAAE,YAAW,OAAO,KAAM,GAAG,GAAsB,CACjE,OACE,EAACA,EAAgB,KAAjB,CACE,YAAU,SACV,YAAW,EACX,UAAW,EACT,sEACA,+CACA,uIACA,
|
|
1
|
+
{"version":3,"file":"avatar.js","names":["AvatarPrimitive"],"sources":["../../src/components/avatar.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { Avatar as AvatarPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type AvatarProps = React.ComponentProps<typeof AvatarPrimitive.Root> & {\n size?: 'sm' | 'md' | 'lg'\n}\n\nexport type AvatarImageProps = React.ComponentProps<typeof AvatarPrimitive.Image>\n\nexport type AvatarFallbackProps = React.ComponentProps<typeof AvatarPrimitive.Fallback>\n\nexport type AvatarBadgeProps = React.ComponentProps<'span'>\n\nexport type AvatarGroupProps = React.ComponentProps<'div'>\n\nexport type AvatarGroupCountProps = React.ComponentProps<'div'>\n\nfunction Avatar({ className, size = 'md', ...props }: AvatarProps) {\n return (\n <AvatarPrimitive.Root\n data-slot=\"avatar\"\n data-size={size}\n className={cn(\n 'group/avatar relative flex shrink-0 size-8 rounded-full select-none',\n 'data-[size=lg]:size-10 data-[size=sm]:size-6',\n 'after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken dark:after:mix-blend-lighten',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AvatarImage({ className, ...props }: AvatarImageProps) {\n return (\n <AvatarPrimitive.Image\n data-slot=\"avatar-image\"\n className={cn('rounded-full aspect-square size-full object-cover', className)}\n {...props}\n />\n )\n}\n\nfunction AvatarFallback({ className, ...props }: AvatarFallbackProps) {\n return (\n <AvatarPrimitive.Fallback\n data-slot=\"avatar-fallback\"\n className={cn(\n 'bg-muted text-muted-foreground rounded-full flex size-full items-center justify-center text-sm group-data-[size=sm]/avatar:text-xs',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AvatarBadge({ className, ...props }: AvatarBadgeProps) {\n return (\n <span\n data-slot=\"avatar-badge\"\n className={cn(\n 'bg-primary text-primary-foreground ring-background absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-blend-color ring-2 select-none',\n 'group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden',\n 'group-data-[size=md]/avatar:size-2.5 group-data-[size=md]/avatar:[&>svg]:size-2',\n 'group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AvatarGroup({ className, ...props }: AvatarGroupProps) {\n return (\n <div\n data-slot=\"avatar-group\"\n className={cn(\n '*:data-[slot=avatar]:ring-background group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AvatarGroupCount({ className, ...props }: AvatarGroupCountProps) {\n return (\n <div\n data-slot=\"avatar-group-count\"\n className={cn(\n 'bg-muted text-muted-foreground ring-background relative flex shrink-0 items-center justify-center size-8 rounded-full text-sm ring-2',\n 'group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6',\n '[&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage }\n"],"mappings":"4IAoBA,SAAS,OAAO,CAAE,YAAW,OAAO,KAAM,GAAG,GAAsB,CACjE,OACE,EAACA,EAAgB,KAAjB,CACE,YAAU,SACV,YAAW,EACX,UAAW,EACT,sEACA,+CACA,uIACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,YAAY,CAAE,YAAW,GAAG,GAA2B,CAC9D,OACE,EAACA,EAAgB,MAAjB,CACE,YAAU,eACV,UAAW,EAAG,oDAAqD,CAAS,EAC5E,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,eAAe,CAAE,YAAW,GAAG,GAA8B,CACpE,OACE,EAACA,EAAgB,SAAjB,CACE,YAAU,kBACV,UAAW,EACT,qIACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,YAAY,CAAE,YAAW,GAAG,GAA2B,CAC9D,OACE,EAAC,OAAD,CACE,YAAU,eACV,UAAW,EACT,2KACA,gFACA,kFACA,gFACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,YAAY,CAAE,YAAW,GAAG,GAA2B,CAC9D,OACE,EAAC,MAAD,CACE,YAAU,eACV,UAAW,EACT,sGACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,iBAAiB,CAAE,YAAW,GAAG,GAAgC,CACxE,OACE,EAAC,MAAD,CACE,YAAU,qBACV,UAAW,EACT,uIACA,6FACA,2HACA,CACF,EACA,GAAI,CACL,CAAA,CAEL"}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { n as __name } from "../chunk-CHh1Zzun.js";
|
|
2
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
2
|
import { VariantProps } from "class-variance-authority";
|
|
4
3
|
import * as React from "react";
|
|
5
|
-
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
6
4
|
|
|
7
5
|
//#region src/components/badge.d.ts
|
|
8
6
|
declare const badgeVariants: (props?: ({
|
|
9
7
|
variant?: "default" | "destructive" | "secondary" | "outline" | "ghost" | "link" | null | undefined;
|
|
10
|
-
} &
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
9
|
type BadgeProps = React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
|
|
12
10
|
asChild?: boolean;
|
|
13
11
|
};
|
|
@@ -16,7 +14,7 @@ declare function Badge({
|
|
|
16
14
|
variant,
|
|
17
15
|
asChild,
|
|
18
16
|
...props
|
|
19
|
-
}: BadgeProps):
|
|
17
|
+
}: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
20
18
|
//#endregion
|
|
21
19
|
export { Badge, BadgeProps, badgeVariants };
|
|
22
20
|
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.js","names":[],"sources":["../../src/components/badge.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Slot } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nconst badgeVariants = cva(\n 'group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-[8px] border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!',\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground [a]:hover:bg-primary/80',\n secondary: 'bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80',\n destructive:\n 'bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20',\n outline: 'border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground',\n ghost: 'hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50',\n link: 'text-primary underline-offset-4 hover:underline'\n }\n },\n defaultVariants: {\n variant: 'default'\n }\n }\n)\n\nexport type BadgeProps = React.ComponentProps<'span'> &\n VariantProps<typeof badgeVariants> & {\n asChild?: boolean\n }\n\nfunction Badge({ className, variant = 'default', asChild = false, ...props }: BadgeProps) {\n const Comp = asChild ? Slot.Root : 'span'\n\n return (\n <Comp data-slot=\"badge\" data-variant={variant} className={cn(badgeVariants({ variant }), className)} {...props} />\n )\n}\n\nexport { Badge, badgeVariants }\n"],"mappings":"yLAOA,MAAM,EAAgB,EACpB,+eACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,6DACT,UAAW,mEACX,YACE,iKACF,QAAS,mFACT,MAAO,oEACP,KAAM,
|
|
1
|
+
{"version":3,"file":"badge.js","names":[],"sources":["../../src/components/badge.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Slot } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nconst badgeVariants = cva(\n 'group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-[8px] border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!',\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground [a]:hover:bg-primary/80',\n secondary: 'bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80',\n destructive:\n 'bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20',\n outline: 'border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground',\n ghost: 'hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50',\n link: 'text-primary underline-offset-4 hover:underline'\n }\n },\n defaultVariants: {\n variant: 'default'\n }\n }\n)\n\nexport type BadgeProps = React.ComponentProps<'span'> &\n VariantProps<typeof badgeVariants> & {\n asChild?: boolean\n }\n\nfunction Badge({ className, variant = 'default', asChild = false, ...props }: BadgeProps) {\n const Comp = asChild ? Slot.Root : 'span'\n\n return (\n <Comp data-slot=\"badge\" data-variant={variant} className={cn(badgeVariants({ variant }), className)} {...props} />\n )\n}\n\nexport { Badge, badgeVariants }\n"],"mappings":"yLAOA,MAAM,EAAgB,EACpB,+eACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,6DACT,UAAW,mEACX,YACE,iKACF,QAAS,mFACT,MAAO,oEACP,KAAM,iDACR,CACF,EACA,gBAAiB,CACf,QAAS,SACX,CACF,CACF,EAOA,SAAS,MAAM,CAAE,YAAW,UAAU,UAAW,UAAU,GAAO,GAAG,GAAqB,CAGxF,OACE,EAHW,EAAU,EAAK,KAAO,OAGjC,CAAM,YAAU,QAAQ,eAAc,EAAS,UAAW,EAAG,EAAc,CAAE,SAAQ,CAAC,EAAG,CAAS,EAAG,GAAI,CAAQ,CAAA,CAErH"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { n as __name } from "../chunk-CHh1Zzun.js";
|
|
2
|
+
import { f as ChartTooltipContentProps, o as ChartLegendContentProps } from "../chart-DHS2QeM8.js";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/bar-chart.d.ts
|
|
6
|
+
type BarChartSeries = {
|
|
7
|
+
name: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
color?: string;
|
|
10
|
+
};
|
|
11
|
+
type BarChartType = 'default' | 'stacked' | 'percent';
|
|
12
|
+
type BarChartOrientation = 'vertical' | 'horizontal';
|
|
13
|
+
type BarChartGridAxis = 'none' | 'x' | 'y' | 'xy';
|
|
14
|
+
type BarChartProps = Omit<React.ComponentProps<'div'>, 'children'> & {
|
|
15
|
+
data: Array<Record<string, unknown>>;
|
|
16
|
+
series: BarChartSeries[];
|
|
17
|
+
dataKey: string;
|
|
18
|
+
type?: BarChartType;
|
|
19
|
+
orientation?: BarChartOrientation;
|
|
20
|
+
withXAxis?: boolean;
|
|
21
|
+
withYAxis?: boolean;
|
|
22
|
+
gridAxis?: BarChartGridAxis;
|
|
23
|
+
withTooltip?: boolean;
|
|
24
|
+
withLegend?: boolean;
|
|
25
|
+
barSize?: number;
|
|
26
|
+
radius?: number | [number, number, number, number];
|
|
27
|
+
unit?: string;
|
|
28
|
+
animationDuration?: number;
|
|
29
|
+
tooltipProps?: ChartTooltipContentProps;
|
|
30
|
+
legendProps?: ChartLegendContentProps;
|
|
31
|
+
};
|
|
32
|
+
declare function BarChart({
|
|
33
|
+
className,
|
|
34
|
+
data,
|
|
35
|
+
series,
|
|
36
|
+
dataKey,
|
|
37
|
+
type,
|
|
38
|
+
orientation,
|
|
39
|
+
withXAxis,
|
|
40
|
+
withYAxis,
|
|
41
|
+
gridAxis,
|
|
42
|
+
withTooltip,
|
|
43
|
+
withLegend,
|
|
44
|
+
barSize,
|
|
45
|
+
radius,
|
|
46
|
+
unit,
|
|
47
|
+
animationDuration,
|
|
48
|
+
tooltipProps,
|
|
49
|
+
legendProps,
|
|
50
|
+
...props
|
|
51
|
+
}: BarChartProps): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
//#endregion
|
|
53
|
+
export { BarChart, BarChartGridAxis, BarChartOrientation, BarChartProps, BarChartSeries, BarChartType };
|
|
54
|
+
//# sourceMappingURL=bar-chart.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{ChartContainer as t,ChartLegendContent as n,ChartTooltipContent as r}from"./chart.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";import*as o from"react";import{Bar as s,BarChart as c,CartesianGrid as l,Legend as u,Tooltip as d,XAxis as f,YAxis as p}from"recharts";const m=[`var(--chart-1)`,`var(--chart-2)`,`var(--chart-3)`,`var(--chart-4)`,`var(--chart-5)`];function buildConfig(e){return e.reduce((e,t,n)=>(e[t.name]={label:t.label??t.name,color:t.color??m[n%m.length]},e),{})}function BarChart({className:m,data:h,series:g,dataKey:_,type:v=`default`,orientation:y=`vertical`,withXAxis:b=!0,withYAxis:x=!0,gridAxis:S=`x`,withTooltip:C=!0,withLegend:w=!1,barSize:T,radius:E=4,unit:D,animationDuration:O,tooltipProps:k,legendProps:A,...j}){let M=o.useMemo(()=>buildConfig(g),[g]),N=v===`default`?void 0:`stack`,P=v===`percent`?`expand`:void 0,F=y===`horizontal`,I={dataKey:_,tickLine:!1,axisLine:!1,tickMargin:8},L=v===`percent`?e=>`${Math.round(e*100)}%`:D?e=>`${e}${D}`:void 0;return i(t,{"data-slot":`bar-chart`,className:e(`w-full`,m),config:M,...j,children:a(c,{data:h,stackOffset:P,layout:F?`vertical`:`horizontal`,children:[S!==`none`&&i(l,{vertical:S===`y`||S===`xy`,horizontal:S===`x`||S===`xy`}),b&&(F?i(f,{type:`number`,tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:L}):i(f,{type:`category`,...I})),x&&(F?i(p,{type:`category`,...I}):i(p,{type:`number`,tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:L})),C&&i(d,{cursor:!1,content:i(r,{...k})}),w&&i(u,{content:i(n,{...A})}),g.map(e=>i(s,{dataKey:e.name,stackId:N,fill:`var(--color-${e.name})`,radius:E,barSize:T,animationDuration:O,isAnimationActive:O!==0},e.name))]})})}export{BarChart};
|
|
2
|
+
//# sourceMappingURL=bar-chart.js.map
|
|
@@ -0,0 +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, Tooltip, XAxis, YAxis } from 'recharts'\n\nimport { cn } from '../lib/utils'\nimport {\n type ChartConfig,\n ChartContainer,\n ChartLegendContent,\n type ChartLegendContentProps,\n ChartTooltipContent,\n type ChartTooltipContentProps\n} from './chart'\n\nconst DEFAULT_PALETTE = [\n 'var(--chart-1)',\n 'var(--chart-2)',\n 'var(--chart-3)',\n 'var(--chart-4)',\n 'var(--chart-5)'\n] as const\n\nexport type BarChartSeries = {\n name: string\n label?: string\n color?: string\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: Array<Record<string, unknown>>\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}\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: item.color ?? DEFAULT_PALETTE[index % DEFAULT_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 ...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 data={data} stackOffset={stackOffset} layout={isHorizontal ? 'vertical' : 'horizontal'}>\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 <Bar\n key={item.name}\n dataKey={item.name}\n stackId={stackId}\n fill={`var(--color-${item.name})`}\n radius={radius}\n barSize={barSize}\n animationDuration={animationDuration}\n isAnimationActive={animationDuration !== 0}\n />\n ))}\n </RechartsBarChart>\n </ChartContainer>\n )\n}\n\nexport { BarChart }\n"],"mappings":"wVAcA,MAAM,EAAkB,CACtB,iBACA,iBACA,iBACA,iBACA,gBACF,EA+BA,SAAS,YAAY,EAAuC,CAC1D,OAAO,EAAO,QAAqB,EAAK,EAAM,KAC5C,EAAI,EAAK,MAAQ,CACf,MAAO,EAAK,OAAS,EAAK,KAC1B,MAAO,EAAK,OAAS,EAAgB,EAAQ,EAAgB,OAC/D,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,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,WAC5F,EAACA,EAAD,CAAwB,OAAmB,cAAa,OAAQ,EAAe,WAAa,sBAA5F,CACG,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,GACX,EAAC,EAAD,CAEE,QAAS,EAAK,KACL,UACT,KAAM,eAAe,EAAK,KAAK,GACvB,SACC,UACU,oBACnB,kBAAmB,IAAsB,CAC1C,EARM,EAAK,IAQX,CACF,CACe,GACJ,CAAA,CAEpB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { n as __name } from "../chunk-CHh1Zzun.js";
|
|
2
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
2
|
import * as React from "react";
|
|
4
3
|
|
|
5
4
|
//#region src/components/breadcrumb.d.ts
|
|
@@ -15,33 +14,33 @@ type BreadcrumbEllipsisProps = React.ComponentProps<'span'>;
|
|
|
15
14
|
declare function Breadcrumb({
|
|
16
15
|
className,
|
|
17
16
|
...props
|
|
18
|
-
}: BreadcrumbProps):
|
|
17
|
+
}: BreadcrumbProps): import("react/jsx-runtime").JSX.Element;
|
|
19
18
|
declare function BreadcrumbList({
|
|
20
19
|
className,
|
|
21
20
|
...props
|
|
22
|
-
}: BreadcrumbListProps):
|
|
21
|
+
}: BreadcrumbListProps): import("react/jsx-runtime").JSX.Element;
|
|
23
22
|
declare function BreadcrumbItem({
|
|
24
23
|
className,
|
|
25
24
|
...props
|
|
26
|
-
}: BreadcrumbItemProps):
|
|
25
|
+
}: BreadcrumbItemProps): import("react/jsx-runtime").JSX.Element;
|
|
27
26
|
declare function BreadcrumbLink({
|
|
28
27
|
asChild,
|
|
29
28
|
className,
|
|
30
29
|
...props
|
|
31
|
-
}: BreadcrumbLinkProps):
|
|
30
|
+
}: BreadcrumbLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
32
31
|
declare function BreadcrumbPage({
|
|
33
32
|
className,
|
|
34
33
|
...props
|
|
35
|
-
}: BreadcrumbPageProps):
|
|
34
|
+
}: BreadcrumbPageProps): import("react/jsx-runtime").JSX.Element;
|
|
36
35
|
declare function BreadcrumbSeparator({
|
|
37
36
|
children,
|
|
38
37
|
className,
|
|
39
38
|
...props
|
|
40
|
-
}: BreadcrumbSeparatorProps):
|
|
39
|
+
}: BreadcrumbSeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
41
40
|
declare function BreadcrumbEllipsis({
|
|
42
41
|
className,
|
|
43
42
|
...props
|
|
44
|
-
}: BreadcrumbEllipsisProps):
|
|
43
|
+
}: BreadcrumbEllipsisProps): import("react/jsx-runtime").JSX.Element;
|
|
45
44
|
//#endregion
|
|
46
45
|
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbEllipsisProps, BreadcrumbItem, BreadcrumbItemProps, BreadcrumbLink, BreadcrumbLinkProps, BreadcrumbList, BreadcrumbListProps, BreadcrumbPage, BreadcrumbPageProps, BreadcrumbProps, BreadcrumbSeparator, BreadcrumbSeparatorProps };
|
|
47
46
|
//# sourceMappingURL=breadcrumb.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb.js","names":[],"sources":["../../src/components/breadcrumb.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconChevronRight, IconDots } from '@tabler/icons-react'\nimport { Slot } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type BreadcrumbProps = React.ComponentProps<'nav'>\n\nexport type BreadcrumbListProps = React.ComponentProps<'ol'>\n\nexport type BreadcrumbItemProps = React.ComponentProps<'li'>\n\nexport type BreadcrumbLinkProps = React.ComponentProps<'a'> & {\n asChild?: boolean\n}\n\nexport type BreadcrumbPageProps = React.ComponentProps<'span'>\n\nexport type BreadcrumbSeparatorProps = React.ComponentProps<'li'>\n\nexport type BreadcrumbEllipsisProps = React.ComponentProps<'span'>\n\nfunction Breadcrumb({ className, ...props }: BreadcrumbProps) {\n return <nav aria-label=\"breadcrumb\" data-slot=\"breadcrumb\" className={cn(className)} {...props} />\n}\n\nfunction BreadcrumbList({ className, ...props }: BreadcrumbListProps) {\n return (\n <ol\n data-slot=\"breadcrumb-list\"\n className={cn('flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground', className)}\n {...props}\n />\n )\n}\n\nfunction BreadcrumbItem({ className, ...props }: BreadcrumbItemProps) {\n return <li data-slot=\"breadcrumb-item\" className={cn('inline-flex items-center gap-1', className)} {...props} />\n}\n\nfunction BreadcrumbLink({ asChild, className, ...props }: BreadcrumbLinkProps) {\n const Comp = asChild ? Slot.Root : 'a'\n\n return (\n <Comp data-slot=\"breadcrumb-link\" className={cn('transition-colors hover:text-foreground', className)} {...props} />\n )\n}\n\nfunction BreadcrumbPage({ className, ...props }: BreadcrumbPageProps) {\n return (\n <span\n data-slot=\"breadcrumb-page\"\n aria-current=\"page\"\n className={cn('font-normal text-foreground', className)}\n {...props}\n />\n )\n}\n\nfunction BreadcrumbSeparator({ children, className, ...props }: BreadcrumbSeparatorProps) {\n return (\n <li\n data-slot=\"breadcrumb-separator\"\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn('[&>svg]:size-3.5', className)}\n {...props}\n >\n {children ?? <IconChevronRight />}\n </li>\n )\n}\n\nfunction BreadcrumbEllipsis({ className, ...props }: BreadcrumbEllipsisProps) {\n return (\n <span\n data-slot=\"breadcrumb-ellipsis\"\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn('flex size-5 items-center justify-center [&>svg]:size-4', className)}\n {...props}\n >\n <IconDots />\n <span className=\"sr-only\">More</span>\n </span>\n )\n}\n\nexport {\n Breadcrumb,\n BreadcrumbEllipsis,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbList,\n BreadcrumbPage,\n BreadcrumbSeparator\n}\n"],"mappings":"yNAuBA,SAAS,WAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OAAO,EAAC,MAAD,CAAK,aAAW,aAAa,YAAU,aAAa,UAAW,EAAG,
|
|
1
|
+
{"version":3,"file":"breadcrumb.js","names":[],"sources":["../../src/components/breadcrumb.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconChevronRight, IconDots } from '@tabler/icons-react'\nimport { Slot } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type BreadcrumbProps = React.ComponentProps<'nav'>\n\nexport type BreadcrumbListProps = React.ComponentProps<'ol'>\n\nexport type BreadcrumbItemProps = React.ComponentProps<'li'>\n\nexport type BreadcrumbLinkProps = React.ComponentProps<'a'> & {\n asChild?: boolean\n}\n\nexport type BreadcrumbPageProps = React.ComponentProps<'span'>\n\nexport type BreadcrumbSeparatorProps = React.ComponentProps<'li'>\n\nexport type BreadcrumbEllipsisProps = React.ComponentProps<'span'>\n\nfunction Breadcrumb({ className, ...props }: BreadcrumbProps) {\n return <nav aria-label=\"breadcrumb\" data-slot=\"breadcrumb\" className={cn(className)} {...props} />\n}\n\nfunction BreadcrumbList({ className, ...props }: BreadcrumbListProps) {\n return (\n <ol\n data-slot=\"breadcrumb-list\"\n className={cn('flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground', className)}\n {...props}\n />\n )\n}\n\nfunction BreadcrumbItem({ className, ...props }: BreadcrumbItemProps) {\n return <li data-slot=\"breadcrumb-item\" className={cn('inline-flex items-center gap-1', className)} {...props} />\n}\n\nfunction BreadcrumbLink({ asChild, className, ...props }: BreadcrumbLinkProps) {\n const Comp = asChild ? Slot.Root : 'a'\n\n return (\n <Comp data-slot=\"breadcrumb-link\" className={cn('transition-colors hover:text-foreground', className)} {...props} />\n )\n}\n\nfunction BreadcrumbPage({ className, ...props }: BreadcrumbPageProps) {\n return (\n <span\n data-slot=\"breadcrumb-page\"\n aria-current=\"page\"\n className={cn('font-normal text-foreground', className)}\n {...props}\n />\n )\n}\n\nfunction BreadcrumbSeparator({ children, className, ...props }: BreadcrumbSeparatorProps) {\n return (\n <li\n data-slot=\"breadcrumb-separator\"\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn('[&>svg]:size-3.5', className)}\n {...props}\n >\n {children ?? <IconChevronRight />}\n </li>\n )\n}\n\nfunction BreadcrumbEllipsis({ className, ...props }: BreadcrumbEllipsisProps) {\n return (\n <span\n data-slot=\"breadcrumb-ellipsis\"\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn('flex size-5 items-center justify-center [&>svg]:size-4', className)}\n {...props}\n >\n <IconDots />\n <span className=\"sr-only\">More</span>\n </span>\n )\n}\n\nexport {\n Breadcrumb,\n BreadcrumbEllipsis,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbList,\n BreadcrumbPage,\n BreadcrumbSeparator\n}\n"],"mappings":"yNAuBA,SAAS,WAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OAAO,EAAC,MAAD,CAAK,aAAW,aAAa,YAAU,aAAa,UAAW,EAAG,CAAS,EAAG,GAAI,CAAQ,CAAA,CACnG,CAEA,SAAS,eAAe,CAAE,YAAW,GAAG,GAA8B,CACpE,OACE,EAAC,KAAD,CACE,YAAU,kBACV,UAAW,EAAG,oFAAqF,CAAS,EAC5G,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,eAAe,CAAE,YAAW,GAAG,GAA8B,CACpE,OAAO,EAAC,KAAD,CAAI,YAAU,kBAAkB,UAAW,EAAG,iCAAkC,CAAS,EAAG,GAAI,CAAQ,CAAA,CACjH,CAEA,SAAS,eAAe,CAAE,UAAS,YAAW,GAAG,GAA8B,CAG7E,OACE,EAHW,EAAU,EAAK,KAAO,IAGjC,CAAM,YAAU,kBAAkB,UAAW,EAAG,0CAA2C,CAAS,EAAG,GAAI,CAAQ,CAAA,CAEvH,CAEA,SAAS,eAAe,CAAE,YAAW,GAAG,GAA8B,CACpE,OACE,EAAC,OAAD,CACE,YAAU,kBACV,eAAa,OACb,UAAW,EAAG,8BAA+B,CAAS,EACtD,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,oBAAoB,CAAE,WAAU,YAAW,GAAG,GAAmC,CACxF,OACE,EAAC,KAAD,CACE,YAAU,uBACV,KAAK,eACL,cAAY,OACZ,UAAW,EAAG,mBAAoB,CAAS,EAC3C,GAAI,WAEH,GAAY,EAAC,EAAD,CAAmB,CAAA,CAC9B,CAAA,CAER,CAEA,SAAS,mBAAmB,CAAE,YAAW,GAAG,GAAkC,CAC5E,OACE,EAAC,OAAD,CACE,YAAU,sBACV,KAAK,eACL,cAAY,OACZ,UAAW,EAAG,yDAA0D,CAAS,EACjF,GAAI,WALN,CAOE,EAAC,EAAD,CAAW,CAAA,EACX,EAAC,OAAD,CAAM,UAAU,mBAAU,MAAU,CAAA,CAChC,GAEV"}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { n as __name } from "../chunk-CHh1Zzun.js";
|
|
2
2
|
import { Separator } from "./separator.js";
|
|
3
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
3
|
import { VariantProps } from "class-variance-authority";
|
|
5
|
-
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
6
4
|
|
|
7
5
|
//#region src/components/button-group.d.ts
|
|
8
6
|
declare const buttonGroupVariants: (props?: ({
|
|
9
7
|
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
10
|
-
} &
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
9
|
type ButtonGroupProps = React.ComponentProps<'div'> & VariantProps<typeof buttonGroupVariants>;
|
|
12
10
|
type ButtonGroupTextProps = React.ComponentProps<'div'> & {
|
|
13
11
|
asChild?: boolean;
|
|
@@ -17,17 +15,17 @@ declare function ButtonGroup({
|
|
|
17
15
|
className,
|
|
18
16
|
orientation,
|
|
19
17
|
...props
|
|
20
|
-
}: ButtonGroupProps):
|
|
18
|
+
}: ButtonGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
21
19
|
declare function ButtonGroupText({
|
|
22
20
|
className,
|
|
23
21
|
asChild,
|
|
24
22
|
...props
|
|
25
|
-
}: ButtonGroupTextProps):
|
|
23
|
+
}: ButtonGroupTextProps): import("react/jsx-runtime").JSX.Element;
|
|
26
24
|
declare function ButtonGroupSeparator({
|
|
27
25
|
className,
|
|
28
26
|
orientation,
|
|
29
27
|
...props
|
|
30
|
-
}: ButtonGroupSeparatorProps):
|
|
28
|
+
}: ButtonGroupSeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
31
29
|
//#endregion
|
|
32
30
|
export { ButtonGroup, ButtonGroupProps, ButtonGroupSeparator, ButtonGroupSeparatorProps, ButtonGroupText, ButtonGroupTextProps, buttonGroupVariants };
|
|
33
31
|
//# sourceMappingURL=button-group.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-group.js","names":["Separator"],"sources":["../../src/components/button-group.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority'\nimport { Slot } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\nimport { Separator } from './separator'\n\nconst buttonGroupVariants = cva(\n \"flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1\",\n {\n variants: {\n orientation: {\n horizontal:\n '[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg!',\n vertical:\n 'flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg!'\n }\n },\n defaultVariants: {\n orientation: 'horizontal'\n }\n }\n)\n\nexport type ButtonGroupProps = React.ComponentProps<'div'> & VariantProps<typeof buttonGroupVariants>\n\nexport type ButtonGroupTextProps = React.ComponentProps<'div'> & {\n asChild?: boolean\n}\n\nexport type ButtonGroupSeparatorProps = React.ComponentProps<typeof Separator>\n\nfunction ButtonGroup({ className, orientation, ...props }: ButtonGroupProps) {\n return (\n <div\n data-slot=\"button-group\"\n data-orientation={orientation}\n className={cn(buttonGroupVariants({ orientation }), className)}\n {...props}\n />\n )\n}\n\nfunction ButtonGroupText({ className, asChild = false, ...props }: ButtonGroupTextProps) {\n const Comp = asChild ? Slot.Root : 'div'\n\n return (\n <Comp\n className={cn(\n \"flex items-center gap-2 rounded-lg border bg-muted px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ButtonGroupSeparator({ className, orientation = 'vertical', ...props }: ButtonGroupSeparatorProps) {\n return (\n <Separator\n data-slot=\"button-group-separator\"\n orientation={orientation}\n className={cn(\n 'relative self-stretch bg-input data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants }\n"],"mappings":"oOAMA,MAAM,EAAsB,EAC1B,2RACA,CACE,SAAU,CACR,YAAa,CACX,WACE,wKACF,SACE,
|
|
1
|
+
{"version":3,"file":"button-group.js","names":["Separator"],"sources":["../../src/components/button-group.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority'\nimport { Slot } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\nimport { Separator } from './separator'\n\nconst buttonGroupVariants = cva(\n \"flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1\",\n {\n variants: {\n orientation: {\n horizontal:\n '[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg!',\n vertical:\n 'flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg!'\n }\n },\n defaultVariants: {\n orientation: 'horizontal'\n }\n }\n)\n\nexport type ButtonGroupProps = React.ComponentProps<'div'> & VariantProps<typeof buttonGroupVariants>\n\nexport type ButtonGroupTextProps = React.ComponentProps<'div'> & {\n asChild?: boolean\n}\n\nexport type ButtonGroupSeparatorProps = React.ComponentProps<typeof Separator>\n\nfunction ButtonGroup({ className, orientation, ...props }: ButtonGroupProps) {\n return (\n <div\n data-slot=\"button-group\"\n data-orientation={orientation}\n className={cn(buttonGroupVariants({ orientation }), className)}\n {...props}\n />\n )\n}\n\nfunction ButtonGroupText({ className, asChild = false, ...props }: ButtonGroupTextProps) {\n const Comp = asChild ? Slot.Root : 'div'\n\n return (\n <Comp\n className={cn(\n \"flex items-center gap-2 rounded-lg border bg-muted px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ButtonGroupSeparator({ className, orientation = 'vertical', ...props }: ButtonGroupSeparatorProps) {\n return (\n <Separator\n data-slot=\"button-group-separator\"\n orientation={orientation}\n className={cn(\n 'relative self-stretch bg-input data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants }\n"],"mappings":"oOAMA,MAAM,EAAsB,EAC1B,2RACA,CACE,SAAU,CACR,YAAa,CACX,WACE,wKACF,SACE,gLACJ,CACF,EACA,gBAAiB,CACf,YAAa,YACf,CACF,CACF,EAUA,SAAS,YAAY,CAAE,YAAW,cAAa,GAAG,GAA2B,CAC3E,OACE,EAAC,MAAD,CACE,YAAU,eACV,mBAAkB,EAClB,UAAW,EAAG,EAAoB,CAAE,aAAY,CAAC,EAAG,CAAS,EAC7D,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,gBAAgB,CAAE,YAAW,UAAU,GAAO,GAAG,GAA+B,CAGvF,OACE,EAHW,EAAU,EAAK,KAAO,MAGjC,CACE,UAAW,EACT,iJACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,qBAAqB,CAAE,YAAW,cAAc,WAAY,GAAG,GAAoC,CAC1G,OACE,EAACA,EAAD,CACE,YAAU,yBACG,cACb,UAAW,EACT,uHACA,CACF,EACA,GAAI,CACL,CAAA,CAEL"}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { n as __name } from "../chunk-CHh1Zzun.js";
|
|
2
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
2
|
import { VariantProps } from "class-variance-authority";
|
|
4
3
|
import * as React from "react";
|
|
5
|
-
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
6
4
|
|
|
7
5
|
//#region src/components/button.d.ts
|
|
8
6
|
declare const buttonVariants: (props?: ({
|
|
9
7
|
variant?: "outline" | "ghost" | "link" | "solid" | "subtle" | null | undefined;
|
|
10
8
|
color?: "primary" | "brand" | "gray" | "zinc" | "red" | "yellow" | "blue" | "indigo" | "pink" | "green" | null | undefined;
|
|
11
9
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | "icon-xl" | null | undefined;
|
|
12
|
-
} &
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
11
|
type ButtonProps = React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
|
14
12
|
asChild?: boolean;
|
|
15
13
|
loading?: boolean;
|
|
@@ -24,7 +22,7 @@ declare function Button({
|
|
|
24
22
|
disabled,
|
|
25
23
|
loading,
|
|
26
24
|
...props
|
|
27
|
-
}: ButtonProps):
|
|
25
|
+
}: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
28
26
|
//#endregion
|
|
29
27
|
export { Button, ButtonProps, buttonVariants };
|
|
30
28
|
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","names":[],"sources":["../../src/components/button.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Slot } from 'radix-ui'\n\nimport { buttonColorVariants } from '../lib/button'\nimport { cn } from '../lib/utils'\nimport { Spinner } from './spinner'\n\nconst buttonVariants = cva(\n \"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 relative rounded-full border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all [&_svg]:transition-colors disabled:pointer-events-none disabled:opacity-50 disabled:data-[loading=true]:pointer-events-auto disabled:data-[loading=true]:cursor-not-allowed disabled:data-[loading=true]:opacity-100 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none\",\n {\n variants: {\n variant: {\n solid:\n 'bg-(--button-solid) text-(--button-solid-foreground) hover:bg-(--button-solid-hover) data-[loading=true]:hover:bg-(--button-solid)',\n outline:\n 'border-(--button-outline-border) bg-background text-(--button-outline-foreground) hover:bg-(--button-solid) hover:text-(--button-solid-foreground) hover:[&_svg]:text-(--button-solid-foreground) data-[loading=true]:hover:bg-background data-[loading=true]:hover:text-(--button-outline-foreground) aria-expanded:bg-(--button-solid) aria-expanded:text-(--button-solid-foreground) aria-expanded:[&_svg]:text-(--button-solid-foreground)',\n subtle:\n 'bg-(--button-soft) text-(--button-soft-foreground) hover:bg-(--button-soft-hover) hover:text-(--button-soft-foreground) data-[loading=true]:hover:bg-(--button-soft) data-[loading=true]:hover:text-(--button-soft-foreground) aria-expanded:bg-(--button-soft-hover) aria-expanded:text-(--button-soft-foreground)',\n ghost:\n 'text-(--button-ghost-foreground) hover:bg-(--button-ghost-hover) hover:text-(--button-ghost-foreground) data-[loading=true]:hover:bg-transparent data-[loading=true]:hover:text-(--button-ghost-foreground) aria-expanded:bg-(--button-ghost-hover) aria-expanded:text-(--button-ghost-foreground)',\n link: 'text-(--button-link-foreground) underline-offset-4 hover:underline data-[loading=true]:hover:no-underline'\n },\n color: buttonColorVariants,\n size: {\n xs: \"h-7 gap-1 px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-8 gap-1 px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5\",\n md: 'h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2',\n lg: 'h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3',\n xl: 'h-11 gap-2 px-3 has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4',\n icon: 'size-9',\n 'icon-xs': \"size-7 in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3\",\n 'icon-sm': 'size-8 in-data-[slot=button-group]:rounded-lg',\n 'icon-lg': 'size-10',\n 'icon-xl': 'size-11'\n }\n },\n defaultVariants: {\n variant: 'solid',\n color: 'primary',\n size: 'md'\n }\n }\n)\n\nexport type ButtonProps = React.ComponentProps<'button'> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean\n loading?: boolean\n }\n\nfunction Button({\n children,\n className,\n variant = 'solid',\n color = 'primary',\n size = 'md',\n asChild = false,\n disabled,\n loading = false,\n ...props\n}: ButtonProps) {\n const Comp = asChild ? Slot.Root : 'button'\n const isDisabled = disabled || loading\n\n return (\n <Comp\n type={!asChild ? 'button' : undefined}\n data-slot=\"button\"\n data-variant={variant}\n data-color={color}\n data-size={size}\n data-loading={loading}\n aria-busy={loading ? true : undefined}\n disabled={isDisabled}\n className={cn(buttonVariants({ variant, color, size, className }))}\n {...props}\n >\n {loading && !asChild ? (\n <>\n <span className=\"invisible inline-flex items-center gap-[inherit]\">{children}</span>\n <span className=\"absolute inset-0 inline-flex items-center justify-center\">\n <Spinner />\n </span>\n </>\n ) : loading ? (\n <Spinner />\n ) : (\n children\n )}\n </Comp>\n )\n}\n\nexport { Button, buttonVariants }\n"],"mappings":"+SASA,MAAM,EAAiB,EACrB,kuBACA,CACE,SAAU,CACR,QAAS,CACP,MACE,qIACF,QACE,ibACF,OACE,sTACF,MACE,qSACF,KAAM,
|
|
1
|
+
{"version":3,"file":"button.js","names":[],"sources":["../../src/components/button.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Slot } from 'radix-ui'\n\nimport { buttonColorVariants } from '../lib/button'\nimport { cn } from '../lib/utils'\nimport { Spinner } from './spinner'\n\nconst buttonVariants = cva(\n \"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 relative rounded-full border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all [&_svg]:transition-colors disabled:pointer-events-none disabled:opacity-50 disabled:data-[loading=true]:pointer-events-auto disabled:data-[loading=true]:cursor-not-allowed disabled:data-[loading=true]:opacity-100 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none\",\n {\n variants: {\n variant: {\n solid:\n 'bg-(--button-solid) text-(--button-solid-foreground) hover:bg-(--button-solid-hover) data-[loading=true]:hover:bg-(--button-solid)',\n outline:\n 'border-(--button-outline-border) bg-background text-(--button-outline-foreground) hover:bg-(--button-solid) hover:text-(--button-solid-foreground) hover:[&_svg]:text-(--button-solid-foreground) data-[loading=true]:hover:bg-background data-[loading=true]:hover:text-(--button-outline-foreground) aria-expanded:bg-(--button-solid) aria-expanded:text-(--button-solid-foreground) aria-expanded:[&_svg]:text-(--button-solid-foreground)',\n subtle:\n 'bg-(--button-soft) text-(--button-soft-foreground) hover:bg-(--button-soft-hover) hover:text-(--button-soft-foreground) data-[loading=true]:hover:bg-(--button-soft) data-[loading=true]:hover:text-(--button-soft-foreground) aria-expanded:bg-(--button-soft-hover) aria-expanded:text-(--button-soft-foreground)',\n ghost:\n 'text-(--button-ghost-foreground) hover:bg-(--button-ghost-hover) hover:text-(--button-ghost-foreground) data-[loading=true]:hover:bg-transparent data-[loading=true]:hover:text-(--button-ghost-foreground) aria-expanded:bg-(--button-ghost-hover) aria-expanded:text-(--button-ghost-foreground)',\n link: 'text-(--button-link-foreground) underline-offset-4 hover:underline data-[loading=true]:hover:no-underline'\n },\n color: buttonColorVariants,\n size: {\n xs: \"h-7 gap-1 px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-8 gap-1 px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5\",\n md: 'h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2',\n lg: 'h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3',\n xl: 'h-11 gap-2 px-3 has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4',\n icon: 'size-9',\n 'icon-xs': \"size-7 in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3\",\n 'icon-sm': 'size-8 in-data-[slot=button-group]:rounded-lg',\n 'icon-lg': 'size-10',\n 'icon-xl': 'size-11'\n }\n },\n defaultVariants: {\n variant: 'solid',\n color: 'primary',\n size: 'md'\n }\n }\n)\n\nexport type ButtonProps = React.ComponentProps<'button'> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean\n loading?: boolean\n }\n\nfunction Button({\n children,\n className,\n variant = 'solid',\n color = 'primary',\n size = 'md',\n asChild = false,\n disabled,\n loading = false,\n ...props\n}: ButtonProps) {\n const Comp = asChild ? Slot.Root : 'button'\n const isDisabled = disabled || loading\n\n return (\n <Comp\n type={!asChild ? 'button' : undefined}\n data-slot=\"button\"\n data-variant={variant}\n data-color={color}\n data-size={size}\n data-loading={loading}\n aria-busy={loading ? true : undefined}\n disabled={isDisabled}\n className={cn(buttonVariants({ variant, color, size, className }))}\n {...props}\n >\n {loading && !asChild ? (\n <>\n <span className=\"invisible inline-flex items-center gap-[inherit]\">{children}</span>\n <span className=\"absolute inset-0 inline-flex items-center justify-center\">\n <Spinner />\n </span>\n </>\n ) : loading ? (\n <Spinner />\n ) : (\n children\n )}\n </Comp>\n )\n}\n\nexport { Button, buttonVariants }\n"],"mappings":"+SASA,MAAM,EAAiB,EACrB,kuBACA,CACE,SAAU,CACR,QAAS,CACP,MACE,qIACF,QACE,ibACF,OACE,sTACF,MACE,qSACF,KAAM,2GACR,EACA,MAAO,EACP,KAAM,CACJ,GAAI,2KACJ,GAAI,qLACJ,GAAI,8HACJ,GAAI,wFACJ,GAAI,oFACJ,KAAM,SACN,UAAW,qFACX,UAAW,gDACX,UAAW,UACX,UAAW,SACb,CACF,EACA,gBAAiB,CACf,QAAS,QACT,MAAO,UACP,KAAM,IACR,CACF,CACF,EAQA,SAAS,OAAO,CACd,WACA,YACA,UAAU,QACV,QAAQ,UACR,OAAO,KACP,UAAU,GACV,WACA,UAAU,GACV,GAAG,GACW,CAId,OACE,EAJW,EAAU,EAAK,KAAO,SAIjC,CACE,KAAO,EAAqB,IAAA,GAAX,SACjB,YAAU,SACV,eAAc,EACd,aAAY,EACZ,YAAW,EACX,eAAc,EACd,YAAW,EAAU,GAAO,IAAA,GAC5B,SAXe,GAAY,EAY3B,UAAW,EAAG,EAAe,CAAE,UAAS,QAAO,OAAM,WAAU,CAAC,CAAC,EACjE,GAAI,WAEH,GAAW,CAAC,EACX,EAAA,EAAA,CAAA,SAAA,CACE,EAAC,OAAD,CAAM,UAAU,mDAAoD,UAAe,CAAA,EACnF,EAAC,OAAD,CAAM,UAAU,oEACd,EAAC,EAAD,CAAU,CAAA,CACN,CAAA,CACN,CAAA,CAAA,EACA,EACF,EAAC,EAAD,CAAU,CAAA,EAEV,CAEE,CAAA,CAEV"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { n as __name } from "../chunk-CHh1Zzun.js";
|
|
2
2
|
import { Button } from "./button.js";
|
|
3
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
3
|
import * as React from "react";
|
|
5
4
|
import { DateRange, DayButton, DayPicker, Locale } from "react-day-picker";
|
|
6
5
|
import * as locale from "react-day-picker/locale";
|
|
@@ -22,14 +21,14 @@ declare function Calendar({
|
|
|
22
21
|
formatters,
|
|
23
22
|
components,
|
|
24
23
|
...props
|
|
25
|
-
}: CalendarProps):
|
|
24
|
+
}: CalendarProps): import("react/jsx-runtime").JSX.Element;
|
|
26
25
|
declare function CalendarDayButton({
|
|
27
26
|
className,
|
|
28
27
|
day,
|
|
29
28
|
modifiers,
|
|
30
29
|
locale,
|
|
31
30
|
...props
|
|
32
|
-
}: CalendarDayButtonProps):
|
|
31
|
+
}: CalendarDayButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
33
32
|
//#endregion
|
|
34
33
|
export { Calendar, CalendarDayButton, CalendarDayButtonProps, CalendarProps, type DateRange, locale };
|
|
35
34
|
//# sourceMappingURL=calendar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.js","names":[],"sources":["../../src/components/calendar.tsx"],"sourcesContent":["import * as React from 'react'\nimport { type DateRange, type DayButton, DayPicker, getDefaultClassNames, type Locale } from 'react-day-picker'\nimport * as locale from 'react-day-picker/locale'\n\nimport { IconChevronDown, IconChevronLeft, IconChevronRight } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\nimport { Button, buttonVariants } from './button'\n\nexport type CalendarProps = React.ComponentProps<typeof DayPicker> & {\n buttonVariant?: React.ComponentProps<typeof Button>['variant']\n}\n\nexport type CalendarDayButtonProps = Omit<React.ComponentProps<typeof DayButton>, 'color'> & {\n locale?: Partial<Locale>\n}\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = 'label',\n buttonVariant = 'ghost',\n locale,\n formatters,\n components,\n ...props\n}: CalendarProps) {\n const defaultClassNames = getDefaultClassNames()\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\n 'group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent',\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className\n )}\n captionLayout={captionLayout}\n locale={locale}\n formatters={{\n formatMonthDropdown: (date) => date.toLocaleString(locale?.code, { month: 'short' }),\n ...formatters\n }}\n classNames={{\n root: cn('w-fit', defaultClassNames.root),\n months: cn('relative flex gap-4', defaultClassNames.months),\n month: cn('flex w-full flex-col gap-4', defaultClassNames.month),\n nav: cn('absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1', defaultClassNames.nav),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n 'size-(--cell-size) p-0 select-none aria-disabled:opacity-50',\n defaultClassNames.button_previous\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n 'size-(--cell-size) p-0 select-none aria-disabled:opacity-50',\n defaultClassNames.button_next\n ),\n month_caption: cn(\n 'flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)',\n defaultClassNames.month_caption\n ),\n dropdowns: cn(\n 'flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium',\n defaultClassNames.dropdowns\n ),\n dropdown_root: cn('relative rounded-(--cell-radius)', defaultClassNames.dropdown_root),\n dropdown: cn('absolute inset-0 bg-popover opacity-0', defaultClassNames.dropdown),\n caption_label: cn(\n 'font-medium select-none',\n captionLayout === 'label'\n ? 'text-sm'\n : 'flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground',\n defaultClassNames.caption_label\n ),\n table: 'w-full border-collapse',\n weekdays: cn('flex', defaultClassNames.weekdays),\n weekday: cn(\n 'flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none',\n defaultClassNames.weekday\n ),\n week: cn('mt-2 flex w-full', defaultClassNames.week),\n week_number_header: cn(\n 'w-(--cell-size) text-xs font-normal text-muted-foreground select-none',\n defaultClassNames.week_number_header\n ),\n week_number: cn(\n 'text-xs font-normal tabular-nums text-muted-foreground select-none',\n defaultClassNames.week_number\n ),\n day: cn(\n 'group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)',\n props.showWeekNumber\n ? '[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)'\n : '[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)',\n defaultClassNames.day\n ),\n range_start: cn(\n 'relative isolate z-0 rounded-l-(--cell-radius) bg-primary-50 after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-primary-50 dark:bg-primary-950 dark:after:bg-primary-950',\n defaultClassNames.range_start\n ),\n range_middle: cn('rounded-none', defaultClassNames.range_middle),\n range_end: cn(\n 'relative isolate z-0 rounded-r-(--cell-radius) bg-primary-50 after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-primary-50 dark:bg-primary-950 dark:after:bg-primary-950',\n defaultClassNames.range_end\n ),\n today: cn(\n 'rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none',\n defaultClassNames.today\n ),\n outside: cn('text-muted-foreground aria-selected:text-muted-foreground', defaultClassNames.outside),\n disabled: cn('text-muted-foreground opacity-50', defaultClassNames.disabled),\n hidden: cn('invisible', defaultClassNames.hidden),\n ...classNames\n }}\n components={{\n Root: ({ className, rootRef, ...props }) => {\n return (\n <div data-slot=\"calendar\" ref={rootRef as React.Ref<HTMLDivElement>} className={cn(className)} {...props} />\n )\n },\n Chevron: ({ className, orientation, ...props }) => {\n if (orientation === 'left') {\n return <IconChevronLeft className={cn('size-4', className)} {...props} />\n }\n\n if (orientation === 'right') {\n return <IconChevronRight className={cn('size-4', className)} {...props} />\n }\n\n return <IconChevronDown className={cn('size-4', className)} {...props} />\n },\n DayButton: ({ ...props }) => <CalendarDayButton locale={locale} {...props} />,\n WeekNumber: ({ children, ...props }) => {\n return (\n <td {...props}>\n <div className=\"flex size-(--cell-size) items-center justify-center text-center text-xs font-normal tabular-nums\">\n {children}\n </div>\n </td>\n )\n },\n ...components\n }}\n {...props}\n />\n )\n}\n\nfunction CalendarDayButton({ className, day, modifiers, locale, ...props }: CalendarDayButtonProps) {\n const defaultClassNames = getDefaultClassNames()\n const isWeekend = day.date.getDay() === 0 || day.date.getDay() === 6\n\n const ref = React.useRef<HTMLButtonElement>(null)\n React.useEffect(() => {\n if (modifiers.focused) ref.current?.focus()\n }, [modifiers.focused])\n\n return (\n <Button\n ref={ref}\n variant=\"ghost\"\n size=\"icon\"\n color=\"zinc\"\n data-day={day.date.toLocaleDateString(locale?.code)}\n data-weekend={isWeekend}\n data-selected-single={\n modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle\n }\n data-range-start={modifiers.range_start}\n data-range-end={modifiers.range_end}\n data-range-middle={modifiers.range_middle}\n className={cn(\n 'relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 text-foreground leading-none font-normal',\n 'hover:bg-primary-50 hover:text-foreground dark:hover:bg-primary-950 dark:hover:text-foreground',\n 'group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50',\n 'data-[weekend=true]:text-destructive data-[weekend=true]:hover:bg-red-50 data-[weekend=true]:hover:text-destructive dark:data-[weekend=true]:hover:bg-red-950',\n 'data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-primary-50 data-[range-middle=true]:text-foreground data-[range-middle=true]:hover:bg-primary-50 data-[range-middle=true]:hover:text-foreground dark:data-[range-middle=true]:bg-primary-950 dark:data-[range-middle=true]:hover:bg-primary-950',\n 'data-[range-middle=true]:data-[weekend=true]:text-destructive data-[range-middle=true]:data-[weekend=true]:hover:bg-red-50 data-[range-middle=true]:data-[weekend=true]:hover:text-destructive dark:data-[range-middle=true]:data-[weekend=true]:hover:bg-red-950',\n 'data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary-500 data-[range-end=true]:text-white data-[range-end=true]:hover:bg-primary-500 data-[range-end=true]:hover:text-white dark:data-[range-end=true]:hover:bg-primary-500',\n 'data-[range-end=true]:data-[weekend=true]:text-white data-[range-end=true]:data-[weekend=true]:hover:text-white',\n 'data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary-500 data-[range-start=true]:text-white data-[range-start=true]:hover:bg-primary-500 data-[range-start=true]:hover:text-white dark:data-[range-start=true]:hover:bg-primary-500',\n 'data-[range-start=true]:data-[weekend=true]:text-white data-[range-start=true]:data-[weekend=true]:hover:text-white',\n 'data-[selected-single=true]:bg-primary-500 data-[selected-single=true]:text-white data-[selected-single=true]:hover:bg-primary-500 data-[selected-single=true]:hover:text-white dark:data-[selected-single=true]:hover:bg-primary-500',\n 'data-[selected-single=true]:data-[weekend=true]:text-white data-[selected-single=true]:data-[weekend=true]:hover:text-white',\n '[&>span]:text-xs [&>span]:opacity-70',\n defaultClassNames.day,\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Calendar, CalendarDayButton, type DateRange, locale }\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"calendar.js","names":[],"sources":["../../src/components/calendar.tsx"],"sourcesContent":["import * as React from 'react'\nimport { type DateRange, type DayButton, DayPicker, getDefaultClassNames, type Locale } from 'react-day-picker'\nimport * as locale from 'react-day-picker/locale'\n\nimport { IconChevronDown, IconChevronLeft, IconChevronRight } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\nimport { Button, buttonVariants } from './button'\n\nexport type CalendarProps = React.ComponentProps<typeof DayPicker> & {\n buttonVariant?: React.ComponentProps<typeof Button>['variant']\n}\n\nexport type CalendarDayButtonProps = Omit<React.ComponentProps<typeof DayButton>, 'color'> & {\n locale?: Partial<Locale>\n}\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = 'label',\n buttonVariant = 'ghost',\n locale,\n formatters,\n components,\n ...props\n}: CalendarProps) {\n const defaultClassNames = getDefaultClassNames()\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\n 'group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent',\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className\n )}\n captionLayout={captionLayout}\n locale={locale}\n formatters={{\n formatMonthDropdown: (date) => date.toLocaleString(locale?.code, { month: 'short' }),\n ...formatters\n }}\n classNames={{\n root: cn('w-fit', defaultClassNames.root),\n months: cn('relative flex gap-4', defaultClassNames.months),\n month: cn('flex w-full flex-col gap-4', defaultClassNames.month),\n nav: cn('absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1', defaultClassNames.nav),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n 'size-(--cell-size) p-0 select-none aria-disabled:opacity-50',\n defaultClassNames.button_previous\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n 'size-(--cell-size) p-0 select-none aria-disabled:opacity-50',\n defaultClassNames.button_next\n ),\n month_caption: cn(\n 'flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)',\n defaultClassNames.month_caption\n ),\n dropdowns: cn(\n 'flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium',\n defaultClassNames.dropdowns\n ),\n dropdown_root: cn('relative rounded-(--cell-radius)', defaultClassNames.dropdown_root),\n dropdown: cn('absolute inset-0 bg-popover opacity-0', defaultClassNames.dropdown),\n caption_label: cn(\n 'font-medium select-none',\n captionLayout === 'label'\n ? 'text-sm'\n : 'flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground',\n defaultClassNames.caption_label\n ),\n table: 'w-full border-collapse',\n weekdays: cn('flex', defaultClassNames.weekdays),\n weekday: cn(\n 'flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none',\n defaultClassNames.weekday\n ),\n week: cn('mt-2 flex w-full', defaultClassNames.week),\n week_number_header: cn(\n 'w-(--cell-size) text-xs font-normal text-muted-foreground select-none',\n defaultClassNames.week_number_header\n ),\n week_number: cn(\n 'text-xs font-normal tabular-nums text-muted-foreground select-none',\n defaultClassNames.week_number\n ),\n day: cn(\n 'group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)',\n props.showWeekNumber\n ? '[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)'\n : '[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)',\n defaultClassNames.day\n ),\n range_start: cn(\n 'relative isolate z-0 rounded-l-(--cell-radius) bg-primary-50 after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-primary-50 dark:bg-primary-950 dark:after:bg-primary-950',\n defaultClassNames.range_start\n ),\n range_middle: cn('rounded-none', defaultClassNames.range_middle),\n range_end: cn(\n 'relative isolate z-0 rounded-r-(--cell-radius) bg-primary-50 after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-primary-50 dark:bg-primary-950 dark:after:bg-primary-950',\n defaultClassNames.range_end\n ),\n today: cn(\n 'rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none',\n defaultClassNames.today\n ),\n outside: cn('text-muted-foreground aria-selected:text-muted-foreground', defaultClassNames.outside),\n disabled: cn('text-muted-foreground opacity-50', defaultClassNames.disabled),\n hidden: cn('invisible', defaultClassNames.hidden),\n ...classNames\n }}\n components={{\n Root: ({ className, rootRef, ...props }) => {\n return (\n <div data-slot=\"calendar\" ref={rootRef as React.Ref<HTMLDivElement>} className={cn(className)} {...props} />\n )\n },\n Chevron: ({ className, orientation, ...props }) => {\n if (orientation === 'left') {\n return <IconChevronLeft className={cn('size-4', className)} {...props} />\n }\n\n if (orientation === 'right') {\n return <IconChevronRight className={cn('size-4', className)} {...props} />\n }\n\n return <IconChevronDown className={cn('size-4', className)} {...props} />\n },\n DayButton: ({ ...props }) => <CalendarDayButton locale={locale} {...props} />,\n WeekNumber: ({ children, ...props }) => {\n return (\n <td {...props}>\n <div className=\"flex size-(--cell-size) items-center justify-center text-center text-xs font-normal tabular-nums\">\n {children}\n </div>\n </td>\n )\n },\n ...components\n }}\n {...props}\n />\n )\n}\n\nfunction CalendarDayButton({ className, day, modifiers, locale, ...props }: CalendarDayButtonProps) {\n const defaultClassNames = getDefaultClassNames()\n const isWeekend = day.date.getDay() === 0 || day.date.getDay() === 6\n\n const ref = React.useRef<HTMLButtonElement>(null)\n React.useEffect(() => {\n if (modifiers.focused) ref.current?.focus()\n }, [modifiers.focused])\n\n return (\n <Button\n ref={ref}\n variant=\"ghost\"\n size=\"icon\"\n color=\"zinc\"\n data-day={day.date.toLocaleDateString(locale?.code)}\n data-weekend={isWeekend}\n data-selected-single={\n modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle\n }\n data-range-start={modifiers.range_start}\n data-range-end={modifiers.range_end}\n data-range-middle={modifiers.range_middle}\n className={cn(\n 'relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 text-foreground leading-none font-normal',\n 'hover:bg-primary-50 hover:text-foreground dark:hover:bg-primary-950 dark:hover:text-foreground',\n 'group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50',\n 'data-[weekend=true]:text-destructive data-[weekend=true]:hover:bg-red-50 data-[weekend=true]:hover:text-destructive dark:data-[weekend=true]:hover:bg-red-950',\n 'data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-primary-50 data-[range-middle=true]:text-foreground data-[range-middle=true]:hover:bg-primary-50 data-[range-middle=true]:hover:text-foreground dark:data-[range-middle=true]:bg-primary-950 dark:data-[range-middle=true]:hover:bg-primary-950',\n 'data-[range-middle=true]:data-[weekend=true]:text-destructive data-[range-middle=true]:data-[weekend=true]:hover:bg-red-50 data-[range-middle=true]:data-[weekend=true]:hover:text-destructive dark:data-[range-middle=true]:data-[weekend=true]:hover:bg-red-950',\n 'data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary-500 data-[range-end=true]:text-white data-[range-end=true]:hover:bg-primary-500 data-[range-end=true]:hover:text-white dark:data-[range-end=true]:hover:bg-primary-500',\n 'data-[range-end=true]:data-[weekend=true]:text-white data-[range-end=true]:data-[weekend=true]:hover:text-white',\n 'data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary-500 data-[range-start=true]:text-white data-[range-start=true]:hover:bg-primary-500 data-[range-start=true]:hover:text-white dark:data-[range-start=true]:hover:bg-primary-500',\n 'data-[range-start=true]:data-[weekend=true]:text-white data-[range-start=true]:data-[weekend=true]:hover:text-white',\n 'data-[selected-single=true]:bg-primary-500 data-[selected-single=true]:text-white data-[selected-single=true]:hover:bg-primary-500 data-[selected-single=true]:hover:text-white dark:data-[selected-single=true]:hover:bg-primary-500',\n 'data-[selected-single=true]:data-[weekend=true]:text-white data-[selected-single=true]:data-[weekend=true]:hover:text-white',\n '[&>span]:text-xs [&>span]:opacity-70',\n defaultClassNames.day,\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Calendar, CalendarDayButton, type DateRange, locale }\n"],"mappings":"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"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { n as __name } from "../chunk-CHh1Zzun.js";
|
|
2
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
2
|
import * as React from "react";
|
|
4
3
|
|
|
5
4
|
//#region src/components/card.d.ts
|
|
@@ -16,31 +15,31 @@ declare function Card({
|
|
|
16
15
|
className,
|
|
17
16
|
size,
|
|
18
17
|
...props
|
|
19
|
-
}: CardProps):
|
|
18
|
+
}: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
20
19
|
declare function CardHeader({
|
|
21
20
|
className,
|
|
22
21
|
...props
|
|
23
|
-
}: CardHeaderProps):
|
|
22
|
+
}: CardHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
24
23
|
declare function CardTitle({
|
|
25
24
|
className,
|
|
26
25
|
...props
|
|
27
|
-
}: CardTitleProps):
|
|
26
|
+
}: CardTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
28
27
|
declare function CardDescription({
|
|
29
28
|
className,
|
|
30
29
|
...props
|
|
31
|
-
}: CardDescriptionProps):
|
|
30
|
+
}: CardDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
32
31
|
declare function CardAction({
|
|
33
32
|
className,
|
|
34
33
|
...props
|
|
35
|
-
}: CardActionProps):
|
|
34
|
+
}: CardActionProps): import("react/jsx-runtime").JSX.Element;
|
|
36
35
|
declare function CardContent({
|
|
37
36
|
className,
|
|
38
37
|
...props
|
|
39
|
-
}: CardContentProps):
|
|
38
|
+
}: CardContentProps): import("react/jsx-runtime").JSX.Element;
|
|
40
39
|
declare function CardFooter({
|
|
41
40
|
className,
|
|
42
41
|
...props
|
|
43
|
-
}: CardFooterProps):
|
|
42
|
+
}: CardFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
44
43
|
//#endregion
|
|
45
44
|
export { Card, CardAction, CardActionProps, CardContent, CardContentProps, CardDescription, CardDescriptionProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardProps, CardTitle, CardTitleProps };
|
|
46
45
|
//# sourceMappingURL=card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","names":[],"sources":["../../src/components/card.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cn } from '../lib/utils'\n\nexport type CardProps = React.ComponentProps<'div'> & { size?: 'sm' | 'md' }\n\nexport type CardHeaderProps = React.ComponentProps<'div'>\n\nexport type CardTitleProps = React.ComponentProps<'div'>\n\nexport type CardDescriptionProps = React.ComponentProps<'div'>\n\nexport type CardActionProps = React.ComponentProps<'div'>\n\nexport type CardContentProps = React.ComponentProps<'div'>\n\nexport type CardFooterProps = React.ComponentProps<'div'>\n\nfunction Card({ className, size = 'md', ...props }: CardProps) {\n return (\n <div\n data-slot=\"card\"\n data-size={size}\n className={cn(\n 'group/card flex flex-col gap-4 overflow-hidden rounded-xl py-4 text-sm bg-card text-card-foreground ring-foreground/10 ring-1',\n 'has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0',\n 'data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0',\n '*:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardHeader({ className, ...props }: CardHeaderProps) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n 'group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4',\n 'group-data-[size=sm]/card:px-3 [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3',\n 'has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardTitle({ className, ...props }: CardTitleProps) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn('text-lg leading-snug font-bold group-data-[size=sm]/card:text-sm', className)}\n {...props}\n />\n )\n}\n\nfunction CardDescription({ className, ...props }: CardDescriptionProps) {\n return <div data-slot=\"card-description\" className={cn('text-muted-foreground text-sm', className)} {...props} />\n}\n\nfunction CardAction({ className, ...props }: CardActionProps) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn('col-start-2 row-span-2 row-start-1 self-start justify-self-end', className)}\n {...props}\n />\n )\n}\n\nfunction CardContent({ className, ...props }: CardContentProps) {\n return <div data-slot=\"card-content\" className={cn('px-4 group-data-[size=sm]/card:px-3', className)} {...props} />\n}\n\nfunction CardFooter({ className, ...props }: CardFooterProps) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn(\n 'bg-muted/50 flex items-center rounded-b-xl border-t p-4',\n 'group-data-[size=sm]/card:p-3',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle }\n"],"mappings":"0GAkBA,SAAS,KAAK,CAAE,YAAW,OAAO,KAAM,GAAG,GAAoB,CAC7D,OACE,EAAC,MAAD,CACE,YAAU,OACV,YAAW,EACX,UAAW,EACT,gIACA,+DACA,2FACA,mEACA,
|
|
1
|
+
{"version":3,"file":"card.js","names":[],"sources":["../../src/components/card.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cn } from '../lib/utils'\n\nexport type CardProps = React.ComponentProps<'div'> & { size?: 'sm' | 'md' }\n\nexport type CardHeaderProps = React.ComponentProps<'div'>\n\nexport type CardTitleProps = React.ComponentProps<'div'>\n\nexport type CardDescriptionProps = React.ComponentProps<'div'>\n\nexport type CardActionProps = React.ComponentProps<'div'>\n\nexport type CardContentProps = React.ComponentProps<'div'>\n\nexport type CardFooterProps = React.ComponentProps<'div'>\n\nfunction Card({ className, size = 'md', ...props }: CardProps) {\n return (\n <div\n data-slot=\"card\"\n data-size={size}\n className={cn(\n 'group/card flex flex-col gap-4 overflow-hidden rounded-xl py-4 text-sm bg-card text-card-foreground ring-foreground/10 ring-1',\n 'has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0',\n 'data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0',\n '*:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardHeader({ className, ...props }: CardHeaderProps) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n 'group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4',\n 'group-data-[size=sm]/card:px-3 [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3',\n 'has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardTitle({ className, ...props }: CardTitleProps) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn('text-lg leading-snug font-bold group-data-[size=sm]/card:text-sm', className)}\n {...props}\n />\n )\n}\n\nfunction CardDescription({ className, ...props }: CardDescriptionProps) {\n return <div data-slot=\"card-description\" className={cn('text-muted-foreground text-sm', className)} {...props} />\n}\n\nfunction CardAction({ className, ...props }: CardActionProps) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn('col-start-2 row-span-2 row-start-1 self-start justify-self-end', className)}\n {...props}\n />\n )\n}\n\nfunction CardContent({ className, ...props }: CardContentProps) {\n return <div data-slot=\"card-content\" className={cn('px-4 group-data-[size=sm]/card:px-3', className)} {...props} />\n}\n\nfunction CardFooter({ className, ...props }: CardFooterProps) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn(\n 'bg-muted/50 flex items-center rounded-b-xl border-t p-4',\n 'group-data-[size=sm]/card:p-3',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle }\n"],"mappings":"0GAkBA,SAAS,KAAK,CAAE,YAAW,OAAO,KAAM,GAAG,GAAoB,CAC7D,OACE,EAAC,MAAD,CACE,YAAU,OACV,YAAW,EACX,UAAW,EACT,gIACA,+DACA,2FACA,mEACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,WAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OACE,EAAC,MAAD,CACE,YAAU,cACV,UAAW,EACT,kGACA,6FACA,0GACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,UAAU,CAAE,YAAW,GAAG,GAAyB,CAC1D,OACE,EAAC,MAAD,CACE,YAAU,aACV,UAAW,EAAG,mEAAoE,CAAS,EAC3F,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,gBAAgB,CAAE,YAAW,GAAG,GAA+B,CACtE,OAAO,EAAC,MAAD,CAAK,YAAU,mBAAmB,UAAW,EAAG,gCAAiC,CAAS,EAAG,GAAI,CAAQ,CAAA,CAClH,CAEA,SAAS,WAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OACE,EAAC,MAAD,CACE,YAAU,cACV,UAAW,EAAG,iEAAkE,CAAS,EACzF,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,YAAY,CAAE,YAAW,GAAG,GAA2B,CAC9D,OAAO,EAAC,MAAD,CAAK,YAAU,eAAe,UAAW,EAAG,sCAAuC,CAAS,EAAG,GAAI,CAAQ,CAAA,CACpH,CAEA,SAAS,WAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OACE,EAAC,MAAD,CACE,YAAU,cACV,UAAW,EACT,0DACA,gCACA,CACF,EACA,GAAI,CACL,CAAA,CAEL"}
|