@burtson-labs/ui 0.2.0 → 0.3.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 +3 -3
- package/dist/components/accordion.js +1 -1
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/alert.d.ts +1 -1
- package/dist/components/alert.js +9 -8
- package/dist/components/alert.js.map +1 -1
- package/dist/components/app-shell.d.ts +8 -0
- package/dist/components/app-shell.js +50 -0
- package/dist/components/app-shell.js.map +1 -0
- package/dist/components/avatar.js +1 -1
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/badge.js +9 -8
- package/dist/components/badge.js.map +1 -1
- package/dist/components/button.d.ts +4 -4
- package/dist/components/button.js +28 -19
- package/dist/components/button.js.map +1 -1
- package/dist/components/card.d.ts +10 -2
- package/dist/components/card.js +40 -9
- package/dist/components/card.js.map +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/command.js +4 -4
- package/dist/components/command.js.map +1 -1
- package/dist/components/dialog.d.ts +1 -1
- package/dist/components/dialog.js +15 -15
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/dropdown-menu.js +3 -3
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/empty-state.d.ts +7 -0
- package/dist/components/empty-state.js +44 -0
- package/dist/components/empty-state.js.map +1 -0
- package/dist/components/field.d.ts +8 -0
- package/dist/components/field.js +51 -0
- package/dist/components/field.js.map +1 -0
- package/dist/components/icon-button.d.ts +8 -0
- package/dist/components/icon-button.js +19 -0
- package/dist/components/icon-button.js.map +1 -0
- package/dist/components/input.d.ts +1 -2
- package/dist/components/input.js +2 -3
- package/dist/components/input.js.map +1 -1
- package/dist/components/kbd.js +1 -1
- package/dist/components/kbd.js.map +1 -1
- package/dist/components/label.js +1 -1
- package/dist/components/label.js.map +1 -1
- package/dist/components/page-header.d.ts +8 -0
- package/dist/components/page-header.js +51 -0
- package/dist/components/page-header.js.map +1 -0
- package/dist/components/popover.d.ts +5 -2
- package/dist/components/popover.js +5 -2
- package/dist/components/popover.js.map +1 -1
- package/dist/components/progress.js +2 -2
- package/dist/components/progress.js.map +1 -1
- package/dist/components/radio-group.js +1 -1
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/scroll-area.js +1 -1
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/select.js +3 -3
- package/dist/components/select.js.map +1 -1
- package/dist/components/sheet.js +4 -4
- package/dist/components/sheet.js.map +1 -1
- package/dist/components/skeleton.js +1 -1
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/stat-card.d.ts +11 -0
- package/dist/components/stat-card.js +42 -0
- package/dist/components/stat-card.js.map +1 -0
- package/dist/components/status.d.ts +12 -0
- package/dist/components/status.js +40 -0
- package/dist/components/status.js.map +1 -0
- package/dist/components/switch.js +1 -1
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.d.ts +19 -4
- package/dist/components/table.js +18 -12
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.js +4 -4
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/textarea.js +1 -1
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/toolbar.d.ts +6 -0
- package/dist/components/toolbar.js +39 -0
- package/dist/components/toolbar.js.map +1 -0
- package/dist/components/tooltip.js +2 -2
- package/dist/components/tooltip.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +11 -3
- package/dist/mui/index.js +9 -5
- package/dist/mui/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme.css +95 -47
- package/dist/tokens.d.ts +41 -13
- package/dist/tokens.js +80 -47
- package/dist/tokens.js.map +1 -1
- package/package.json +2 -2
|
@@ -7,11 +7,11 @@ function Progress$1({ className, value, ...props }) {
|
|
|
7
7
|
return /* @__PURE__ */ jsx(Progress.Root, {
|
|
8
8
|
"data-slot": "progress",
|
|
9
9
|
value,
|
|
10
|
-
className: cn("relative h-
|
|
10
|
+
className: cn("relative h-1.5 w-full overflow-hidden rounded-full bg-muted", className),
|
|
11
11
|
...props,
|
|
12
12
|
children: /* @__PURE__ */ jsx(Progress.Indicator, {
|
|
13
13
|
"data-slot": "progress-indicator",
|
|
14
|
-
className: "h-full w-full flex-1 bg-
|
|
14
|
+
className: "h-full w-full flex-1 bg-brand transition-transform",
|
|
15
15
|
style: { transform: `translateX(-${100 - (value ?? 0)}%)` }
|
|
16
16
|
})
|
|
17
17
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress.js","names":["Progress","ProgressPrimitive"],"sources":["../../src/components/progress.tsx"],"sourcesContent":["import { Progress as ProgressPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nfunction Progress({\n className,\n value,\n ...props\n}: React.ComponentProps<typeof ProgressPrimitive.Root>) {\n return (\n <ProgressPrimitive.Root\n data-slot=\"progress\"\n value={value}\n className={cn('relative h-
|
|
1
|
+
{"version":3,"file":"progress.js","names":["Progress","ProgressPrimitive"],"sources":["../../src/components/progress.tsx"],"sourcesContent":["import { Progress as ProgressPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nfunction Progress({\n className,\n value,\n ...props\n}: React.ComponentProps<typeof ProgressPrimitive.Root>) {\n return (\n <ProgressPrimitive.Root\n data-slot=\"progress\"\n value={value}\n className={cn('relative h-1.5 w-full overflow-hidden rounded-full bg-muted', className)}\n {...props}\n >\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className=\"h-full w-full flex-1 bg-brand transition-transform\"\n style={{ transform: `translateX(-${100 - (value ?? 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n );\n}\n\nexport { Progress };\n"],"mappings":";;;;;AAKA,SAASA,WAAS,EAChB,WACA,OACA,GAAG,SACmD;CACtD,OACE,oBAACC,SAAkB,MAAnB;EACE,aAAU;EACH;EACP,WAAW,GAAG,+DAA+D,SAAS;EACtF,GAAI;EAEJ,UAAA,oBAACA,SAAkB,WAAnB;GACE,aAAU;GACV,WAAU;GACV,OAAO,EAAE,WAAW,eAAe,OAAO,SAAS,GAAG,IAAI;EAC3D,CAAA;CACqB,CAAA;AAE5B"}
|
|
@@ -13,7 +13,7 @@ function RadioGroup$1({ className, ...props }) {
|
|
|
13
13
|
function RadioGroupItem({ className, ...props }) {
|
|
14
14
|
return /* @__PURE__ */ jsx(RadioGroup.Item, {
|
|
15
15
|
"data-slot": "radio-group-item",
|
|
16
|
-
className: cn("aspect-square size-4 shrink-0 rounded-full border border-
|
|
16
|
+
className: cn("aspect-square size-4 shrink-0 rounded-full border border-border-strong bg-surface text-primary shadow-xs transition-[border-color,box-shadow] outline-none hover:border-brand/50 focus-visible:ring-[3px] focus-visible:ring-ring/20 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive data-[state=checked]:border-primary", className),
|
|
17
17
|
...props,
|
|
18
18
|
children: /* @__PURE__ */ jsx(RadioGroup.Indicator, {
|
|
19
19
|
"data-slot": "radio-group-indicator",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.js","names":["RadioGroup","RadioGroupPrimitive"],"sources":["../../src/components/radio-group.tsx"],"sourcesContent":["import { RadioGroup as RadioGroupPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nfunction RadioGroup({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {\n return (\n <RadioGroupPrimitive.Root\n data-slot=\"radio-group\"\n className={cn('grid gap-3', className)}\n {...props}\n />\n );\n}\n\nfunction RadioGroupItem({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(\n 'aspect-square size-4 shrink-0 rounded-full border border-
|
|
1
|
+
{"version":3,"file":"radio-group.js","names":["RadioGroup","RadioGroupPrimitive"],"sources":["../../src/components/radio-group.tsx"],"sourcesContent":["import { RadioGroup as RadioGroupPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nfunction RadioGroup({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {\n return (\n <RadioGroupPrimitive.Root\n data-slot=\"radio-group\"\n className={cn('grid gap-3', className)}\n {...props}\n />\n );\n}\n\nfunction RadioGroupItem({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(\n 'aspect-square size-4 shrink-0 rounded-full border border-border-strong bg-surface text-primary shadow-xs transition-[border-color,box-shadow] outline-none hover:border-brand/50 focus-visible:ring-[3px] focus-visible:ring-ring/20 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive data-[state=checked]:border-primary',\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className=\"relative flex items-center justify-center\"\n >\n <span className=\"size-2 rounded-full bg-primary\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n );\n}\n\nexport { RadioGroup, RadioGroupItem };\n"],"mappings":";;;;;AAKA,SAASA,aAAW,EAClB,WACA,GAAG,SACqD;CACxD,OACE,oBAACC,WAAoB,MAArB;EACE,aAAU;EACV,WAAW,GAAG,cAAc,SAAS;EACrC,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,eAAe,EACtB,WACA,GAAG,SACqD;CACxD,OACE,oBAACA,WAAoB,MAArB;EACE,aAAU;EACV,WAAW,GACT,4VACA,SACF;EACA,GAAI;EAEJ,UAAA,oBAACA,WAAoB,WAArB;GACE,aAAU;GACV,WAAU;GAEV,UAAA,oBAAC,QAAD,EAAM,WAAU,iCAAkC,CAAA;EACrB,CAAA;CACP,CAAA;AAE9B"}
|
|
@@ -27,7 +27,7 @@ function ScrollBar({ className, orientation = "vertical", ...props }) {
|
|
|
27
27
|
...props,
|
|
28
28
|
children: /* @__PURE__ */ jsx(ScrollArea.ScrollAreaThumb, {
|
|
29
29
|
"data-slot": "scroll-area-thumb",
|
|
30
|
-
className: "relative flex-1 rounded-full bg-border"
|
|
30
|
+
className: "relative flex-1 rounded-full bg-border-strong"
|
|
31
31
|
})
|
|
32
32
|
});
|
|
33
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-area.js","names":["ScrollArea","ScrollAreaPrimitive"],"sources":["../../src/components/scroll-area.tsx"],"sourcesContent":["import { ScrollArea as ScrollAreaPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nfunction ScrollArea({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {\n return (\n <ScrollAreaPrimitive.Root\n data-slot=\"scroll-area\"\n className={cn('relative', className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className=\"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n );\n}\n\nfunction ScrollBar({\n className,\n orientation = 'vertical',\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {\n return (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n data-slot=\"scroll-area-scrollbar\"\n orientation={orientation}\n className={cn(\n 'flex touch-none p-px transition-colors select-none',\n orientation === 'vertical' && 'h-full w-2.5 border-l border-l-transparent',\n orientation === 'horizontal' && 'h-2.5 flex-col border-t border-t-transparent',\n className,\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb\n data-slot=\"scroll-area-thumb\"\n className=\"relative flex-1 rounded-full bg-border\"\n />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n );\n}\n\nexport { ScrollArea, ScrollBar };\n"],"mappings":";;;;;AAKA,SAASA,aAAW,EAClB,WACA,UACA,GAAG,SACqD;CACxD,OACE,qBAACC,WAAoB,MAArB;EACE,aAAU;EACV,WAAW,GAAG,YAAY,SAAS;EACnC,GAAI;EAHN,UAAA;GAKE,oBAACA,WAAoB,UAArB;IACE,aAAU;IACV,WAAU;IAET;GAC2B,CAAA;GAC9B,oBAAC,WAAD,CAAY,CAAA;GACZ,oBAACA,WAAoB,QAArB,CAA6B,CAAA;EACL;;AAE9B;AAEA,SAAS,UAAU,EACjB,WACA,cAAc,YACd,GAAG,SACoE;CACvE,OACE,oBAACA,WAAoB,qBAArB;EACE,aAAU;EACG;EACb,WAAW,GACT,sDACA,gBAAgB,cAAc,8CAC9B,gBAAgB,gBAAgB,gDAChC,SACF;EACA,GAAI;EAEJ,UAAA,oBAACA,WAAoB,iBAArB;GACE,aAAU;GACV,WAAU;EACX,CAAA;CACsC,CAAA;AAE7C"}
|
|
1
|
+
{"version":3,"file":"scroll-area.js","names":["ScrollArea","ScrollAreaPrimitive"],"sources":["../../src/components/scroll-area.tsx"],"sourcesContent":["import { ScrollArea as ScrollAreaPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nfunction ScrollArea({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {\n return (\n <ScrollAreaPrimitive.Root\n data-slot=\"scroll-area\"\n className={cn('relative', className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className=\"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n );\n}\n\nfunction ScrollBar({\n className,\n orientation = 'vertical',\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {\n return (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n data-slot=\"scroll-area-scrollbar\"\n orientation={orientation}\n className={cn(\n 'flex touch-none p-px transition-colors select-none',\n orientation === 'vertical' && 'h-full w-2.5 border-l border-l-transparent',\n orientation === 'horizontal' && 'h-2.5 flex-col border-t border-t-transparent',\n className,\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb\n data-slot=\"scroll-area-thumb\"\n className=\"relative flex-1 rounded-full bg-border-strong\"\n />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n );\n}\n\nexport { ScrollArea, ScrollBar };\n"],"mappings":";;;;;AAKA,SAASA,aAAW,EAClB,WACA,UACA,GAAG,SACqD;CACxD,OACE,qBAACC,WAAoB,MAArB;EACE,aAAU;EACV,WAAW,GAAG,YAAY,SAAS;EACnC,GAAI;EAHN,UAAA;GAKE,oBAACA,WAAoB,UAArB;IACE,aAAU;IACV,WAAU;IAET;GAC2B,CAAA;GAC9B,oBAAC,WAAD,CAAY,CAAA;GACZ,oBAACA,WAAoB,QAArB,CAA6B,CAAA;EACL;;AAE9B;AAEA,SAAS,UAAU,EACjB,WACA,cAAc,YACd,GAAG,SACoE;CACvE,OACE,oBAACA,WAAoB,qBAArB;EACE,aAAU;EACG;EACb,WAAW,GACT,sDACA,gBAAgB,cAAc,8CAC9B,gBAAgB,gBAAgB,gDAChC,SACF;EACA,GAAI;EAEJ,UAAA,oBAACA,WAAoB,iBAArB;GACE,aAAU;GACV,WAAU;EACX,CAAA;CACsC,CAAA;AAE7C"}
|
|
@@ -72,19 +72,19 @@ function SelectContent({ className, children, position = "popper", ...props }) {
|
|
|
72
72
|
function SelectLabel({ className, ...props }) {
|
|
73
73
|
return /* @__PURE__ */ jsx(Select.Label, {
|
|
74
74
|
"data-slot": "select-label",
|
|
75
|
-
className: cn("px-2
|
|
75
|
+
className: cn("px-2 pt-2 pb-1 text-[11px] font-semibold tracking-[0.08em] text-muted-foreground uppercase", className),
|
|
76
76
|
...props
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
function SelectItem({ className, children, ...props }) {
|
|
80
80
|
return /* @__PURE__ */ jsxs(Select.Item, {
|
|
81
81
|
"data-slot": "select-item",
|
|
82
|
-
className: cn("relative flex w-full cursor-default items-center gap-2 rounded-sm
|
|
82
|
+
className: cn("relative flex min-h-8 w-full cursor-default items-center gap-2 rounded-sm pr-8 pl-2 text-[13px] outline-hidden select-none focus:bg-muted focus:text-foreground data-[state=checked]:font-semibold data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
83
83
|
...props,
|
|
84
84
|
children: [/* @__PURE__ */ jsx("span", {
|
|
85
85
|
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
86
86
|
children: /* @__PURE__ */ jsx(Select.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, {
|
|
87
|
-
className: "size-4",
|
|
87
|
+
className: "size-4 text-brand",
|
|
88
88
|
"aria-hidden": true
|
|
89
89
|
}) })
|
|
90
90
|
}), /* @__PURE__ */ jsx(Select.ItemText, { children })]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.js","names":["Select","SelectPrimitive"],"sources":["../../src/components/select.tsx"],"sourcesContent":["import Check from '@burtson-labs/icons/react/check';\nimport ChevronDown from '@burtson-labs/icons/react/chevron-down';\nimport ChevronUp from '@burtson-labs/icons/react/chevron-up';\nimport { Select as SelectPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nimport { fieldClasses } from './input';\nimport { surfaceClasses } from './popover';\n\nfunction Select(props: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\nfunction SelectGroup(props: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\nfunction SelectValue(props: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\nfunction SelectTrigger({\n className,\n size = 'default',\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & { size?: 'sm' | 'default' }) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n fieldClasses,\n \"flex w-fit items-center justify-between gap-2 py-2 whitespace-nowrap data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"size-4 opacity-60\" aria-hidden />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\nfunction SelectContent({\n className,\n children,\n position = 'popper',\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n surfaceClasses,\n 'relative max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n className,\n )}\n position={position}\n {...props}\n >\n <SelectPrimitive.ScrollUpButton className=\"flex cursor-default items-center justify-center py-1\">\n <ChevronUp className=\"size-4\" aria-hidden />\n </SelectPrimitive.ScrollUpButton>\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' &&\n 'h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width) scroll-my-1',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectPrimitive.ScrollDownButton className=\"flex cursor-default items-center justify-center py-1\">\n <ChevronDown className=\"size-4\" aria-hidden />\n </SelectPrimitive.ScrollDownButton>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\nfunction SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn('px-2
|
|
1
|
+
{"version":3,"file":"select.js","names":["Select","SelectPrimitive"],"sources":["../../src/components/select.tsx"],"sourcesContent":["import Check from '@burtson-labs/icons/react/check';\nimport ChevronDown from '@burtson-labs/icons/react/chevron-down';\nimport ChevronUp from '@burtson-labs/icons/react/chevron-up';\nimport { Select as SelectPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nimport { fieldClasses } from './input';\nimport { surfaceClasses } from './popover';\n\nfunction Select(props: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\nfunction SelectGroup(props: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\nfunction SelectValue(props: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\nfunction SelectTrigger({\n className,\n size = 'default',\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & { size?: 'sm' | 'default' }) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n fieldClasses,\n \"flex w-fit items-center justify-between gap-2 py-2 whitespace-nowrap data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"size-4 opacity-60\" aria-hidden />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\nfunction SelectContent({\n className,\n children,\n position = 'popper',\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n surfaceClasses,\n 'relative max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n className,\n )}\n position={position}\n {...props}\n >\n <SelectPrimitive.ScrollUpButton className=\"flex cursor-default items-center justify-center py-1\">\n <ChevronUp className=\"size-4\" aria-hidden />\n </SelectPrimitive.ScrollUpButton>\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' &&\n 'h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width) scroll-my-1',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectPrimitive.ScrollDownButton className=\"flex cursor-default items-center justify-center py-1\">\n <ChevronDown className=\"size-4\" aria-hidden />\n </SelectPrimitive.ScrollDownButton>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\nfunction SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn(\n 'px-2 pt-2 pb-1 text-[11px] font-semibold tracking-[0.08em] text-muted-foreground uppercase',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"relative flex min-h-8 w-full cursor-default items-center gap-2 rounded-sm pr-8 pl-2 text-[13px] outline-hidden select-none focus:bg-muted focus:text-foreground data-[state=checked]:font-semibold data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <Check className=\"size-4 text-brand\" aria-hidden />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn('pointer-events-none -mx-1 my-1 h-px bg-border', className)}\n {...props}\n />\n );\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n};\n"],"mappings":";;;;;;;;;;AAWA,SAASA,SAAO,OAA0D;CACxE,OAAO,oBAACC,OAAgB,MAAjB;EAAsB,aAAU;EAAS,GAAI;CAAQ,CAAA;AAC9D;AAEA,SAAS,YAAY,OAA2D;CAC9E,OAAO,oBAACA,OAAgB,OAAjB;EAAuB,aAAU;EAAe,GAAI;CAAQ,CAAA;AACrE;AAEA,SAAS,YAAY,OAA2D;CAC9E,OAAO,oBAACA,OAAgB,OAAjB;EAAuB,aAAU;EAAe,GAAI;CAAQ,CAAA;AACrE;AAEA,SAAS,cAAc,EACrB,WACA,OAAO,WACP,UACA,GAAG,SACkF;CACrF,OACE,qBAACA,OAAgB,SAAjB;EACE,aAAU;EACV,aAAW;EACX,WAAW,GACT,cACA,+XACA,SACF;EACA,GAAI;EARN,UAAA,CAUG,UACD,oBAACA,OAAgB,MAAjB;GAAsB,SAAA;GACpB,UAAA,oBAAC,aAAD;IAAa,WAAU;IAAoB,eAAA;GAAa,CAAA;EACpC,CAAA,CACC;;AAE7B;AAEA,SAAS,cAAc,EACrB,WACA,UACA,WAAW,UACX,GAAG,SACoD;CACvD,OACE,oBAACA,OAAgB,QAAjB,EAAA,UACE,qBAACA,OAAgB,SAAjB;EACE,aAAU;EACV,WAAW,GACT,gBACA,4JACA,aAAa,YACX,mIACF,SACF;EACU;EACV,GAAI;EAVN,UAAA;GAYE,oBAACA,OAAgB,gBAAjB;IAAgC,WAAU;IACxC,UAAA,oBAAC,WAAD;KAAW,WAAU;KAAS,eAAA;IAAa,CAAA;GACb,CAAA;GAChC,oBAACA,OAAgB,UAAjB;IACE,WAAW,GACT,OACA,aAAa,YACX,2FACJ;IAEC;GACuB,CAAA;GAC1B,oBAACA,OAAgB,kBAAjB;IAAkC,WAAU;IAC1C,UAAA,oBAAC,aAAD;KAAa,WAAU;KAAS,eAAA;IAAa,CAAA;GACb,CAAA;EACX;CACH,CAAA,EAAA,CAAA;AAE5B;AAEA,SAAS,YAAY,EAAE,WAAW,GAAG,SAA6D;CAChG,OACE,oBAACA,OAAgB,OAAjB;EACE,aAAU;EACV,WAAW,GACT,8FACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,WAAW,EAClB,WACA,UACA,GAAG,SACiD;CACpD,OACE,qBAACA,OAAgB,MAAjB;EACE,aAAU;EACV,WAAW,GACT,uVACA,SACF;EACA,GAAI;EANN,UAAA,CAQE,oBAAC,QAAD;GAAM,WAAU;GACd,UAAA,oBAACA,OAAgB,eAAjB,EAAA,UACE,oBAAC,OAAD;IAAO,WAAU;IAAoB,eAAA;GAAa,CAAA,EACrB,CAAA;EAC3B,CAAA,GACN,oBAACA,OAAgB,UAAjB,EAA2B,SAAmC,CAAA,CAC1C;;AAE1B;AAEA,SAAS,gBAAgB,EACvB,WACA,GAAG,SACsD;CACzD,OACE,oBAACA,OAAgB,WAAjB;EACE,aAAU;EACV,WAAW,GAAG,iDAAiD,SAAS;EACxE,GAAI;CACL,CAAA;AAEL"}
|
package/dist/components/sheet.js
CHANGED
|
@@ -29,13 +29,13 @@ var sideClasses = {
|
|
|
29
29
|
function SheetContent({ className, children, side = "right", ...props }) {
|
|
30
30
|
return /* @__PURE__ */ jsxs(Dialog.Portal, { children: [/* @__PURE__ */ jsx(Dialog.Overlay, {
|
|
31
31
|
"data-slot": "sheet-overlay",
|
|
32
|
-
className: "fixed inset-0 z-50 bg-black/
|
|
32
|
+
className: "fixed inset-0 z-50 bg-black/55 backdrop-blur-[3px] data-[state=closed]:animate-out data-[state=open]:animate-in"
|
|
33
33
|
}), /* @__PURE__ */ jsxs(Dialog.Content, {
|
|
34
34
|
"data-slot": "sheet-content",
|
|
35
|
-
className: cn("fixed z-50 flex flex-col gap-4 bg-
|
|
35
|
+
className: cn("fixed z-50 flex flex-col gap-4 border-border-strong bg-surface-raised text-foreground shadow-[0_24px_80px_rgb(0_0_0_/_0.28)] outline-none data-[state=closed]:animate-sheet-out data-[state=open]:animate-sheet-in", sideClasses[side], className),
|
|
36
36
|
...props,
|
|
37
37
|
children: [children, /* @__PURE__ */ jsxs(Dialog.Close, {
|
|
38
|
-
className: "absolute top-
|
|
38
|
+
className: "absolute top-3.5 right-3.5 grid size-8 place-items-center rounded-md text-muted-foreground transition-colors outline-none hover:bg-muted hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/20 [&_svg]:size-4",
|
|
39
39
|
children: [/* @__PURE__ */ jsx(X, { "aria-hidden": true }), /* @__PURE__ */ jsx("span", {
|
|
40
40
|
className: "sr-only",
|
|
41
41
|
children: "Close"
|
|
@@ -60,7 +60,7 @@ function SheetFooter({ className, ...props }) {
|
|
|
60
60
|
function SheetTitle({ className, ...props }) {
|
|
61
61
|
return /* @__PURE__ */ jsx(Dialog.Title, {
|
|
62
62
|
"data-slot": "sheet-title",
|
|
63
|
-
className: cn("font-semibold text-foreground", className),
|
|
63
|
+
className: cn("text-base font-semibold tracking-[-0.02em] text-foreground", className),
|
|
64
64
|
...props
|
|
65
65
|
});
|
|
66
66
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sheet.js","names":["SheetPrimitive"],"sources":["../../src/components/sheet.tsx"],"sourcesContent":["import X from '@burtson-labs/icons/react/x';\nimport { Dialog as SheetPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nfunction Sheet(props: React.ComponentProps<typeof SheetPrimitive.Root>) {\n return <SheetPrimitive.Root data-slot=\"sheet\" {...props} />;\n}\n\nfunction SheetTrigger(props: React.ComponentProps<typeof SheetPrimitive.Trigger>) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />;\n}\n\nfunction SheetClose(props: React.ComponentProps<typeof SheetPrimitive.Close>) {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />;\n}\n\nconst sideClasses = {\n right: 'inset-y-0 right-0 h-full w-3/4 border-l [--bl-sheet-from:100%] sm:max-w-sm',\n left: 'inset-y-0 left-0 h-full w-3/4 border-r [--bl-sheet-from:-100%] sm:max-w-sm',\n} as const;\n\nfunction SheetContent({\n className,\n children,\n side = 'right',\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Content> & { side?: keyof typeof sideClasses }) {\n return (\n <SheetPrimitive.Portal>\n <SheetPrimitive.Overlay\n data-slot=\"sheet-overlay\"\n className=\"fixed inset-0 z-50 bg-black/
|
|
1
|
+
{"version":3,"file":"sheet.js","names":["SheetPrimitive"],"sources":["../../src/components/sheet.tsx"],"sourcesContent":["import X from '@burtson-labs/icons/react/x';\nimport { Dialog as SheetPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nfunction Sheet(props: React.ComponentProps<typeof SheetPrimitive.Root>) {\n return <SheetPrimitive.Root data-slot=\"sheet\" {...props} />;\n}\n\nfunction SheetTrigger(props: React.ComponentProps<typeof SheetPrimitive.Trigger>) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />;\n}\n\nfunction SheetClose(props: React.ComponentProps<typeof SheetPrimitive.Close>) {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />;\n}\n\nconst sideClasses = {\n right: 'inset-y-0 right-0 h-full w-3/4 border-l [--bl-sheet-from:100%] sm:max-w-sm',\n left: 'inset-y-0 left-0 h-full w-3/4 border-r [--bl-sheet-from:-100%] sm:max-w-sm',\n} as const;\n\nfunction SheetContent({\n className,\n children,\n side = 'right',\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Content> & { side?: keyof typeof sideClasses }) {\n return (\n <SheetPrimitive.Portal>\n <SheetPrimitive.Overlay\n data-slot=\"sheet-overlay\"\n className=\"fixed inset-0 z-50 bg-black/55 backdrop-blur-[3px] data-[state=closed]:animate-out data-[state=open]:animate-in\"\n />\n <SheetPrimitive.Content\n data-slot=\"sheet-content\"\n className={cn(\n 'fixed z-50 flex flex-col gap-4 border-border-strong bg-surface-raised text-foreground shadow-[0_24px_80px_rgb(0_0_0_/_0.28)] outline-none data-[state=closed]:animate-sheet-out data-[state=open]:animate-sheet-in',\n sideClasses[side],\n className,\n )}\n {...props}\n >\n {children}\n <SheetPrimitive.Close className=\"absolute top-3.5 right-3.5 grid size-8 place-items-center rounded-md text-muted-foreground transition-colors outline-none hover:bg-muted hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/20 [&_svg]:size-4\">\n <X aria-hidden />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPrimitive.Portal>\n );\n}\n\nfunction SheetHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sheet-header\"\n className={cn('flex flex-col gap-1.5 p-4', className)}\n {...props}\n />\n );\n}\n\nfunction SheetFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sheet-footer\"\n className={cn('mt-auto flex flex-col gap-2 p-4', className)}\n {...props}\n />\n );\n}\n\nfunction SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>) {\n return (\n <SheetPrimitive.Title\n data-slot=\"sheet-title\"\n className={cn('text-base font-semibold tracking-[-0.02em] text-foreground', className)}\n {...props}\n />\n );\n}\n\nfunction SheetDescription({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Description>) {\n return (\n <SheetPrimitive.Description\n data-slot=\"sheet-description\"\n className={cn('text-sm text-muted-foreground', className)}\n {...props}\n />\n );\n}\n\nexport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetFooter,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n};\n"],"mappings":";;;;;;AAMA,SAAS,MAAM,OAAyD;CACtE,OAAO,oBAACA,OAAe,MAAhB;EAAqB,aAAU;EAAQ,GAAI;CAAQ,CAAA;AAC5D;AAEA,SAAS,aAAa,OAA4D;CAChF,OAAO,oBAACA,OAAe,SAAhB;EAAwB,aAAU;EAAgB,GAAI;CAAQ,CAAA;AACvE;AAEA,SAAS,WAAW,OAA0D;CAC5E,OAAO,oBAACA,OAAe,OAAhB;EAAsB,aAAU;EAAc,GAAI;CAAQ,CAAA;AACnE;AAEA,IAAM,cAAc;CAClB,OAAO;CACP,MAAM;AACR;AAEA,SAAS,aAAa,EACpB,WACA,UACA,OAAO,SACP,GAAG,SACyF;CAC5F,OACE,qBAACA,OAAe,QAAhB,EAAA,UAAA,CACE,oBAACA,OAAe,SAAhB;EACE,aAAU;EACV,WAAU;CACX,CAAA,GACD,qBAACA,OAAe,SAAhB;EACE,aAAU;EACV,WAAW,GACT,sNACA,YAAY,OACZ,SACF;EACA,GAAI;EAPN,UAAA,CASG,UACD,qBAACA,OAAe,OAAhB;GAAsB,WAAU;GAAhC,UAAA,CACE,oBAAC,GAAD,EAAG,eAAA,KAAa,CAAA,GAChB,oBAAC,QAAD;IAAM,WAAU;IAAU,UAAA;GAAW,CAAA,CACjB;EACA,CAAA,CAAA;CACH,CAAA,CAAA,EAAA,CAAA;AAE3B;AAEA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAsC;CACzE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,6BAA6B,SAAS;EACpD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAsC;CACzE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,mCAAmC,SAAS;EAC1D,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,SAA4D;CAC9F,OACE,oBAACA,OAAe,OAAhB;EACE,aAAU;EACV,WAAW,GAAG,8DAA8D,SAAS;EACrF,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,iBAAiB,EACxB,WACA,GAAG,SACuD;CAC1D,OACE,oBAACA,OAAe,aAAhB;EACE,aAAU;EACV,WAAW,GAAG,iCAAiC,SAAS;EACxD,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -6,7 +6,7 @@ function Skeleton({ className, ...props }) {
|
|
|
6
6
|
return /* @__PURE__ */ jsx("div", {
|
|
7
7
|
"data-slot": "skeleton",
|
|
8
8
|
"aria-hidden": true,
|
|
9
|
-
className: cn("animate-pulse rounded-md bg-
|
|
9
|
+
className: cn("animate-pulse rounded-md bg-foreground/[0.06]", className),
|
|
10
10
|
...props
|
|
11
11
|
});
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton.js","names":[],"sources":["../../src/components/skeleton.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nfunction Skeleton({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"skeleton\"\n aria-hidden\n className={cn('animate-pulse rounded-md bg-
|
|
1
|
+
{"version":3,"file":"skeleton.js","names":[],"sources":["../../src/components/skeleton.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nfunction Skeleton({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"skeleton\"\n aria-hidden\n className={cn('animate-pulse rounded-md bg-foreground/[0.06]', className)}\n {...props}\n />\n );\n}\n\nexport { Skeleton };\n"],"mappings":";;;;AAIA,SAAS,SAAS,EAAE,WAAW,GAAG,SAAsC;CACtE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,eAAA;EACA,WAAW,GAAG,iDAAiD,SAAS;EACxE,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Card } from './card';
|
|
3
|
+
export interface StatCardProps extends React.ComponentProps<typeof Card> {
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
value: React.ReactNode;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
detail?: React.ReactNode;
|
|
8
|
+
trend?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare function StatCard({ label, value, icon, detail, trend, className, ...props }: StatCardProps): React.JSX.Element;
|
|
11
|
+
export { StatCard };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { Card } from "./card.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/stat-card.tsx
|
|
6
|
+
function StatCard({ label, value, icon, detail, trend, className, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsxs(Card, {
|
|
8
|
+
density: "compact",
|
|
9
|
+
className: cn("min-w-0", className),
|
|
10
|
+
...props,
|
|
11
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
12
|
+
className: "flex items-start justify-between gap-4 p-4",
|
|
13
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
14
|
+
className: "min-w-0",
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ jsx("div", {
|
|
17
|
+
className: "text-[11px] font-semibold tracking-[0.08em] text-muted-foreground uppercase",
|
|
18
|
+
children: label
|
|
19
|
+
}),
|
|
20
|
+
/* @__PURE__ */ jsx("div", {
|
|
21
|
+
className: "mt-1 truncate text-2xl font-semibold tracking-[-0.035em] text-foreground",
|
|
22
|
+
children: value
|
|
23
|
+
}),
|
|
24
|
+
detail ? /* @__PURE__ */ jsx("div", {
|
|
25
|
+
className: "mt-1 text-xs text-muted-foreground",
|
|
26
|
+
children: detail
|
|
27
|
+
}) : null
|
|
28
|
+
]
|
|
29
|
+
}), icon ? /* @__PURE__ */ jsx("div", {
|
|
30
|
+
className: "grid size-9 shrink-0 place-items-center rounded-lg border border-brand/15 bg-brand-soft text-brand [&_svg]:size-4.5",
|
|
31
|
+
children: icon
|
|
32
|
+
}) : null]
|
|
33
|
+
}), trend ? /* @__PURE__ */ jsx("div", {
|
|
34
|
+
className: "border-t border-border px-4 py-2.5 text-xs",
|
|
35
|
+
children: trend
|
|
36
|
+
}) : null]
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { StatCard };
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=stat-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stat-card.js","names":[],"sources":["../../src/components/stat-card.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nimport { Card } from './card';\n\nexport interface StatCardProps extends React.ComponentProps<typeof Card> {\n label: React.ReactNode;\n value: React.ReactNode;\n icon?: React.ReactNode;\n detail?: React.ReactNode;\n trend?: React.ReactNode;\n}\n\nfunction StatCard({ label, value, icon, detail, trend, className, ...props }: StatCardProps) {\n return (\n <Card density=\"compact\" className={cn('min-w-0', className)} {...props}>\n <div className=\"flex items-start justify-between gap-4 p-4\">\n <div className=\"min-w-0\">\n <div className=\"text-[11px] font-semibold tracking-[0.08em] text-muted-foreground uppercase\">\n {label}\n </div>\n <div className=\"mt-1 truncate text-2xl font-semibold tracking-[-0.035em] text-foreground\">\n {value}\n </div>\n {detail ? <div className=\"mt-1 text-xs text-muted-foreground\">{detail}</div> : null}\n </div>\n {icon ? (\n <div className=\"grid size-9 shrink-0 place-items-center rounded-lg border border-brand/15 bg-brand-soft text-brand [&_svg]:size-4.5\">\n {icon}\n </div>\n ) : null}\n </div>\n {trend ? <div className=\"border-t border-border px-4 py-2.5 text-xs\">{trend}</div> : null}\n </Card>\n );\n}\n\nexport { StatCard };\n"],"mappings":";;;;;AAcA,SAAS,SAAS,EAAE,OAAO,OAAO,MAAM,QAAQ,OAAO,WAAW,GAAG,SAAwB;CAC3F,OACE,qBAAC,MAAD;EAAM,SAAQ;EAAU,WAAW,GAAG,WAAW,SAAS;EAAG,GAAI;EAAjE,UAAA,CACE,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA;KACE,oBAAC,OAAD;MAAK,WAAU;MACZ,UAAA;KACE,CAAA;KACL,oBAAC,OAAD;MAAK,WAAU;MACZ,UAAA;KACE,CAAA;KACJ,SAAS,oBAAC,OAAD;MAAK,WAAU;MAAsC,UAAA;KAAY,CAAA,IAAI;IAC5E;GACJ,CAAA,GAAA,OACC,oBAAC,OAAD;IAAK,WAAU;IACZ,UAAA;GACE,CAAA,IACH,IACD;EACJ,CAAA,GAAA,QAAQ,oBAAC,OAAD;GAAK,WAAU;GAA8C,UAAA;EAAW,CAAA,IAAI,IACjF;;AAEV"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const statusDotVariants: (props?: ({
|
|
4
|
+
status?: "success" | "warning" | "info" | "brand" | "neutral" | "danger" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare function StatusDot({ className, status, pulse, ...props }: React.ComponentProps<'span'> & VariantProps<typeof statusDotVariants> & {
|
|
7
|
+
pulse?: boolean;
|
|
8
|
+
}): React.JSX.Element;
|
|
9
|
+
declare function Status({ className, status, pulse, children, ...props }: React.ComponentProps<'span'> & VariantProps<typeof statusDotVariants> & {
|
|
10
|
+
pulse?: boolean;
|
|
11
|
+
}): React.JSX.Element;
|
|
12
|
+
export { Status, StatusDot, statusDotVariants };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
//#region src/components/status.tsx
|
|
6
|
+
var statusDotVariants = cva("size-2 shrink-0 rounded-full ring-2 ring-current/10", {
|
|
7
|
+
variants: { status: {
|
|
8
|
+
neutral: "bg-muted-foreground text-muted-foreground",
|
|
9
|
+
brand: "bg-brand text-brand",
|
|
10
|
+
success: "bg-success text-success",
|
|
11
|
+
warning: "bg-warning text-warning",
|
|
12
|
+
danger: "bg-destructive text-destructive",
|
|
13
|
+
info: "bg-info text-info"
|
|
14
|
+
} },
|
|
15
|
+
defaultVariants: { status: "neutral" }
|
|
16
|
+
});
|
|
17
|
+
function StatusDot({ className, status, pulse = false, ...props }) {
|
|
18
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
19
|
+
"data-slot": "status-dot",
|
|
20
|
+
className: cn("relative inline-flex", className),
|
|
21
|
+
"aria-hidden": "true",
|
|
22
|
+
...props,
|
|
23
|
+
children: [pulse ? /* @__PURE__ */ jsx("span", { className: cn(statusDotVariants({ status }), "absolute inset-0 animate-ping opacity-40 motion-reduce:hidden") }) : null, /* @__PURE__ */ jsx("span", { className: statusDotVariants({ status }) })]
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function Status({ className, status, pulse, children, ...props }) {
|
|
27
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
28
|
+
"data-slot": "status",
|
|
29
|
+
className: cn("inline-flex items-center gap-2 text-xs font-medium text-muted-foreground", className),
|
|
30
|
+
...props,
|
|
31
|
+
children: [/* @__PURE__ */ jsx(StatusDot, {
|
|
32
|
+
status,
|
|
33
|
+
pulse
|
|
34
|
+
}), children]
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { Status, StatusDot, statusDotVariants };
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.js","names":[],"sources":["../../src/components/status.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nconst statusDotVariants = cva('size-2 shrink-0 rounded-full ring-2 ring-current/10', {\n variants: {\n status: {\n neutral: 'bg-muted-foreground text-muted-foreground',\n brand: 'bg-brand text-brand',\n success: 'bg-success text-success',\n warning: 'bg-warning text-warning',\n danger: 'bg-destructive text-destructive',\n info: 'bg-info text-info',\n },\n },\n defaultVariants: { status: 'neutral' },\n});\n\nfunction StatusDot({\n className,\n status,\n pulse = false,\n ...props\n}: React.ComponentProps<'span'> & VariantProps<typeof statusDotVariants> & { pulse?: boolean }) {\n return (\n <span\n data-slot=\"status-dot\"\n className={cn('relative inline-flex', className)}\n aria-hidden=\"true\"\n {...props}\n >\n {pulse ? (\n <span\n className={cn(\n statusDotVariants({ status }),\n 'absolute inset-0 animate-ping opacity-40 motion-reduce:hidden',\n )}\n />\n ) : null}\n <span className={statusDotVariants({ status })} />\n </span>\n );\n}\n\nfunction Status({\n className,\n status,\n pulse,\n children,\n ...props\n}: React.ComponentProps<'span'> & VariantProps<typeof statusDotVariants> & { pulse?: boolean }) {\n return (\n <span\n data-slot=\"status\"\n className={cn(\n 'inline-flex items-center gap-2 text-xs font-medium text-muted-foreground',\n className,\n )}\n {...props}\n >\n <StatusDot status={status} pulse={pulse} />\n {children}\n </span>\n );\n}\n\nexport { Status, StatusDot, statusDotVariants };\n"],"mappings":";;;;;AAKA,IAAM,oBAAoB,IAAI,uDAAuD;CACnF,UAAU,EACR,QAAQ;EACN,SAAS;EACT,OAAO;EACP,SAAS;EACT,SAAS;EACT,QAAQ;EACR,MAAM;CACR,EACF;CACA,iBAAiB,EAAE,QAAQ,UAAU;AACvC,CAAC;AAED,SAAS,UAAU,EACjB,WACA,QACA,QAAQ,OACR,GAAG,SAC2F;CAC9F,OACE,qBAAC,QAAD;EACE,aAAU;EACV,WAAW,GAAG,wBAAwB,SAAS;EAC/C,eAAY;EACZ,GAAI;EAJN,UAAA,CAMG,QACC,oBAAC,QAAD,EACE,WAAW,GACT,kBAAkB,EAAE,OAAO,CAAC,GAC5B,+DACF,EACD,CAAA,IACC,MACJ,oBAAC,QAAD,EAAM,WAAW,kBAAkB,EAAE,OAAO,CAAC,EAAI,CAAA,CAC7C;;AAEV;AAEA,SAAS,OAAO,EACd,WACA,QACA,OACA,UACA,GAAG,SAC2F;CAC9F,OACE,qBAAC,QAAD;EACE,aAAU;EACV,WAAW,GACT,4EACA,SACF;EACA,GAAI;EANN,UAAA,CAQE,oBAAC,WAAD;GAAmB;GAAe;EAAQ,CAAA,GACzC,QACG;;AAEV"}
|
|
@@ -6,7 +6,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
6
6
|
function Switch$1({ className, ...props }) {
|
|
7
7
|
return /* @__PURE__ */ jsx(Switch.Root, {
|
|
8
8
|
"data-slot": "switch",
|
|
9
|
-
className: cn("peer inline-flex h-5 w-9 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-colors outline-none focus-visible:ring-[3px] focus-visible:ring-ring/
|
|
9
|
+
className: cn("peer inline-flex h-5 w-9 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-colors outline-none focus-visible:ring-[3px] focus-visible:ring-ring/20 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-border-strong", className),
|
|
10
10
|
...props,
|
|
11
11
|
children: /* @__PURE__ */ jsx(Switch.Thumb, {
|
|
12
12
|
"data-slot": "switch-thumb",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.js","names":["Switch","SwitchPrimitive"],"sources":["../../src/components/switch.tsx"],"sourcesContent":["import { Switch as SwitchPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nfunction Switch({ className, ...props }: React.ComponentProps<typeof SwitchPrimitive.Root>) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n className={cn(\n 'peer inline-flex h-5 w-9 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-colors outline-none focus-visible:ring-[3px] focus-visible:ring-ring/
|
|
1
|
+
{"version":3,"file":"switch.js","names":["Switch","SwitchPrimitive"],"sources":["../../src/components/switch.tsx"],"sourcesContent":["import { Switch as SwitchPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nfunction Switch({ className, ...props }: React.ComponentProps<typeof SwitchPrimitive.Root>) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n className={cn(\n 'peer inline-flex h-5 w-9 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-colors outline-none focus-visible:ring-[3px] focus-visible:ring-ring/20 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-border-strong',\n className,\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n data-slot=\"switch-thumb\"\n className=\"pointer-events-none block size-4 rounded-full bg-background shadow-sm ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-1px)] data-[state=unchecked]:translate-x-px dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground/80\"\n />\n </SwitchPrimitive.Root>\n );\n}\n\nexport { Switch };\n"],"mappings":";;;;;AAKA,SAASA,SAAO,EAAE,WAAW,GAAG,SAA4D;CAC1F,OACE,oBAACC,OAAgB,MAAjB;EACE,aAAU;EACV,WAAW,GACT,8SACA,SACF;EACA,GAAI;EAEJ,UAAA,oBAACA,OAAgB,OAAjB;GACE,aAAU;GACV,WAAU;EACX,CAAA;CACmB,CAAA;AAE1B"}
|
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
export interface TableProps extends React.ComponentProps<'table'> {
|
|
3
|
+
/** `compact` for dense ops screens (32px rows), `default` 40px. */
|
|
4
|
+
density?: 'compact' | 'default';
|
|
5
|
+
/** Keep the header visible while the container scrolls; give it a height. */
|
|
6
|
+
stickyHeader?: boolean;
|
|
7
|
+
containerClassName?: string;
|
|
8
|
+
}
|
|
9
|
+
declare function Table({ className, density, stickyHeader, containerClassName, ...props }: TableProps): React.JSX.Element;
|
|
3
10
|
declare function TableHeader({ className, ...props }: React.ComponentProps<'thead'>): React.JSX.Element;
|
|
4
11
|
declare function TableBody({ className, ...props }: React.ComponentProps<'tbody'>): React.JSX.Element;
|
|
5
12
|
declare function TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>): React.JSX.Element;
|
|
6
|
-
|
|
7
|
-
declare function
|
|
8
|
-
|
|
13
|
+
/** Set `data-state="selected"` (or `selected`) to mark a chosen row. */
|
|
14
|
+
declare function TableRow({ className, selected, ...props }: React.ComponentProps<'tr'> & {
|
|
15
|
+
selected?: boolean;
|
|
16
|
+
}): React.JSX.Element;
|
|
17
|
+
/** `numeric` right-aligns with tabular figures, for counts, money and durations. */
|
|
18
|
+
declare function TableHead({ className, numeric, ...props }: React.ComponentProps<'th'> & {
|
|
19
|
+
numeric?: boolean;
|
|
20
|
+
}): React.JSX.Element;
|
|
21
|
+
declare function TableCell({ className, numeric, ...props }: React.ComponentProps<'td'> & {
|
|
22
|
+
numeric?: boolean;
|
|
23
|
+
}): React.JSX.Element;
|
|
9
24
|
declare function TableCaption({ className, ...props }: React.ComponentProps<'caption'>): React.JSX.Element;
|
|
10
25
|
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
package/dist/components/table.js
CHANGED
|
@@ -2,13 +2,15 @@ import { cn } from "../lib/utils.js";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/table.tsx
|
|
5
|
-
function Table({ className, ...props }) {
|
|
5
|
+
function Table({ className, density = "default", stickyHeader = false, containerClassName, ...props }) {
|
|
6
6
|
return /* @__PURE__ */ jsx("div", {
|
|
7
7
|
"data-slot": "table-container",
|
|
8
|
-
|
|
8
|
+
"data-density": density,
|
|
9
|
+
"data-sticky": stickyHeader || void 0,
|
|
10
|
+
className: cn("group/table relative w-full overflow-auto", containerClassName),
|
|
9
11
|
children: /* @__PURE__ */ jsx("table", {
|
|
10
12
|
"data-slot": "table",
|
|
11
|
-
className: cn("w-full caption-bottom text-
|
|
13
|
+
className: cn("w-full caption-bottom text-[13px]", className),
|
|
12
14
|
...props
|
|
13
15
|
})
|
|
14
16
|
});
|
|
@@ -16,7 +18,7 @@ function Table({ className, ...props }) {
|
|
|
16
18
|
function TableHeader({ className, ...props }) {
|
|
17
19
|
return /* @__PURE__ */ jsx("thead", {
|
|
18
20
|
"data-slot": "table-header",
|
|
19
|
-
className: cn("[&_tr]:border-b", className),
|
|
21
|
+
className: cn("bg-surface-muted [&_tr]:border-b group-data-[sticky]/table:sticky group-data-[sticky]/table:top-0 group-data-[sticky]/table:z-10", className),
|
|
20
22
|
...props
|
|
21
23
|
});
|
|
22
24
|
}
|
|
@@ -30,35 +32,39 @@ function TableBody({ className, ...props }) {
|
|
|
30
32
|
function TableFooter({ className, ...props }) {
|
|
31
33
|
return /* @__PURE__ */ jsx("tfoot", {
|
|
32
34
|
"data-slot": "table-footer",
|
|
33
|
-
className: cn("border-t bg-muted
|
|
35
|
+
className: cn("border-t bg-surface-muted font-medium [&>tr]:last:border-b-0", className),
|
|
34
36
|
...props
|
|
35
37
|
});
|
|
36
38
|
}
|
|
37
|
-
|
|
39
|
+
/** Set `data-state="selected"` (or `selected`) to mark a chosen row. */
|
|
40
|
+
function TableRow({ className, selected, ...props }) {
|
|
38
41
|
return /* @__PURE__ */ jsx("tr", {
|
|
39
42
|
"data-slot": "table-row",
|
|
40
|
-
|
|
43
|
+
"data-state": selected ? "selected" : void 0,
|
|
44
|
+
"aria-selected": selected || void 0,
|
|
45
|
+
className: cn("border-b transition-colors hover:bg-muted/60 data-[state=selected]:bg-brand-soft/60 data-[state=selected]:shadow-[inset_2px_0_0_var(--color-brand)]", className),
|
|
41
46
|
...props
|
|
42
47
|
});
|
|
43
48
|
}
|
|
44
|
-
|
|
49
|
+
/** `numeric` right-aligns with tabular figures, for counts, money and durations. */
|
|
50
|
+
function TableHead({ className, numeric, ...props }) {
|
|
45
51
|
return /* @__PURE__ */ jsx("th", {
|
|
46
52
|
"data-slot": "table-head",
|
|
47
|
-
className: cn("h-
|
|
53
|
+
className: cn("h-9 px-3 text-left align-middle text-[11px] font-semibold tracking-[0.06em] whitespace-nowrap text-muted-foreground uppercase group-data-[density=compact]/table:h-8 [&:has([role=checkbox])]:w-10 [&:has([role=checkbox])]:pr-0", numeric && "text-right tabular-nums", className),
|
|
48
54
|
...props
|
|
49
55
|
});
|
|
50
56
|
}
|
|
51
|
-
function TableCell({ className, ...props }) {
|
|
57
|
+
function TableCell({ className, numeric, ...props }) {
|
|
52
58
|
return /* @__PURE__ */ jsx("td", {
|
|
53
59
|
"data-slot": "table-cell",
|
|
54
|
-
className: cn("
|
|
60
|
+
className: cn("h-10 px-3 align-middle whitespace-nowrap group-data-[density=compact]/table:h-8 [&:has([role=checkbox])]:pr-0", numeric && "text-right font-mono text-[12.5px] tabular-nums", className),
|
|
55
61
|
...props
|
|
56
62
|
});
|
|
57
63
|
}
|
|
58
64
|
function TableCaption({ className, ...props }) {
|
|
59
65
|
return /* @__PURE__ */ jsx("caption", {
|
|
60
66
|
"data-slot": "table-caption",
|
|
61
|
-
className: cn("mt-
|
|
67
|
+
className: cn("mt-3 text-xs text-muted-foreground", className),
|
|
62
68
|
...props
|
|
63
69
|
});
|
|
64
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.js","names":[],"sources":["../../src/components/table.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\
|
|
1
|
+
{"version":3,"file":"table.js","names":[],"sources":["../../src/components/table.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nexport interface TableProps extends React.ComponentProps<'table'> {\n /** `compact` for dense ops screens (32px rows), `default` 40px. */\n density?: 'compact' | 'default';\n /** Keep the header visible while the container scrolls; give it a height. */\n stickyHeader?: boolean;\n containerClassName?: string;\n}\n\nfunction Table({\n className,\n density = 'default',\n stickyHeader = false,\n containerClassName,\n ...props\n}: TableProps) {\n return (\n <div\n data-slot=\"table-container\"\n data-density={density}\n data-sticky={stickyHeader || undefined}\n className={cn('group/table relative w-full overflow-auto', containerClassName)}\n >\n <table\n data-slot=\"table\"\n className={cn('w-full caption-bottom text-[13px]', className)}\n {...props}\n />\n </div>\n );\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<'thead'>) {\n return (\n <thead\n data-slot=\"table-header\"\n className={cn(\n 'bg-surface-muted [&_tr]:border-b group-data-[sticky]/table:sticky group-data-[sticky]/table:top-0 group-data-[sticky]/table:z-10',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<'tbody'>) {\n return (\n <tbody\n data-slot=\"table-body\"\n className={cn('[&_tr:last-child]:border-0', className)}\n {...props}\n />\n );\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>) {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn('border-t bg-surface-muted font-medium [&>tr]:last:border-b-0', className)}\n {...props}\n />\n );\n}\n\n/** Set `data-state=\"selected\"` (or `selected`) to mark a chosen row. */\nfunction TableRow({\n className,\n selected,\n ...props\n}: React.ComponentProps<'tr'> & { selected?: boolean }) {\n return (\n <tr\n data-slot=\"table-row\"\n data-state={selected ? 'selected' : undefined}\n aria-selected={selected || undefined}\n className={cn(\n 'border-b transition-colors hover:bg-muted/60 data-[state=selected]:bg-brand-soft/60 data-[state=selected]:shadow-[inset_2px_0_0_var(--color-brand)]',\n className,\n )}\n {...props}\n />\n );\n}\n\n/** `numeric` right-aligns with tabular figures, for counts, money and durations. */\nfunction TableHead({\n className,\n numeric,\n ...props\n}: React.ComponentProps<'th'> & { numeric?: boolean }) {\n return (\n <th\n data-slot=\"table-head\"\n className={cn(\n 'h-9 px-3 text-left align-middle text-[11px] font-semibold tracking-[0.06em] whitespace-nowrap text-muted-foreground uppercase group-data-[density=compact]/table:h-8 [&:has([role=checkbox])]:w-10 [&:has([role=checkbox])]:pr-0',\n numeric && 'text-right tabular-nums',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCell({\n className,\n numeric,\n ...props\n}: React.ComponentProps<'td'> & { numeric?: boolean }) {\n return (\n <td\n data-slot=\"table-cell\"\n className={cn(\n 'h-10 px-3 align-middle whitespace-nowrap group-data-[density=compact]/table:h-8 [&:has([role=checkbox])]:pr-0',\n numeric && 'text-right font-mono text-[12.5px] tabular-nums',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCaption({ className, ...props }: React.ComponentProps<'caption'>) {\n return (\n <caption\n data-slot=\"table-caption\"\n className={cn('mt-3 text-xs text-muted-foreground', className)}\n {...props}\n />\n );\n}\n\nexport { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };\n"],"mappings":";;;;AAYA,SAAS,MAAM,EACb,WACA,UAAU,WACV,eAAe,OACf,oBACA,GAAG,SACU;CACb,OACE,oBAAC,OAAD;EACE,aAAU;EACV,gBAAc;EACd,eAAa,gBAAgB,KAAA;EAC7B,WAAW,GAAG,6CAA6C,kBAAkB;EAE7E,UAAA,oBAAC,SAAD;GACE,aAAU;GACV,WAAW,GAAG,qCAAqC,SAAS;GAC5D,GAAI;EACL,CAAA;CACE,CAAA;AAET;AAEA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAwC;CAC3E,OACE,oBAAC,SAAD;EACE,aAAU;EACV,WAAW,GACT,oIACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,UAAU,EAAE,WAAW,GAAG,SAAwC;CACzE,OACE,oBAAC,SAAD;EACE,aAAU;EACV,WAAW,GAAG,8BAA8B,SAAS;EACrD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAwC;CAC3E,OACE,oBAAC,SAAD;EACE,aAAU;EACV,WAAW,GAAG,gEAAgE,SAAS;EACvF,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,SAAS,EAChB,WACA,UACA,GAAG,SACmD;CACtD,OACE,oBAAC,MAAD;EACE,aAAU;EACV,cAAY,WAAW,aAAa,KAAA;EACpC,iBAAe,YAAY,KAAA;EAC3B,WAAW,GACT,uJACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,UAAU,EACjB,WACA,SACA,GAAG,SACkD;CACrD,OACE,oBAAC,MAAD;EACE,aAAU;EACV,WAAW,GACT,oOACA,WAAW,2BACX,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,UAAU,EACjB,WACA,SACA,GAAG,SACkD;CACrD,OACE,oBAAC,MAAD;EACE,aAAU;EACV,WAAW,GACT,iHACA,WAAW,mDACX,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,aAAa,EAAE,WAAW,GAAG,SAA0C;CAC9E,OACE,oBAAC,WAAD;EACE,aAAU;EACV,WAAW,GAAG,sCAAsC,SAAS;EAC7D,GAAI;CACL,CAAA;AAEL"}
|
package/dist/components/tabs.js
CHANGED
|
@@ -6,28 +6,28 @@ import { jsx } from "react/jsx-runtime";
|
|
|
6
6
|
function Tabs$1({ className, ...props }) {
|
|
7
7
|
return /* @__PURE__ */ jsx(Tabs.Root, {
|
|
8
8
|
"data-slot": "tabs",
|
|
9
|
-
className: cn("flex flex-col gap-
|
|
9
|
+
className: cn("flex flex-col gap-3", className),
|
|
10
10
|
...props
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
function TabsList({ className, ...props }) {
|
|
14
14
|
return /* @__PURE__ */ jsx(Tabs.List, {
|
|
15
15
|
"data-slot": "tabs-list",
|
|
16
|
-
className: cn("inline-flex h-9 w-fit items-center
|
|
16
|
+
className: cn("inline-flex h-9 w-fit items-center gap-0.5 rounded-md border border-border bg-surface-muted p-1 text-muted-foreground", className),
|
|
17
17
|
...props
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
function TabsTrigger({ className, ...props }) {
|
|
21
21
|
return /* @__PURE__ */ jsx(Tabs.Trigger, {
|
|
22
22
|
"data-slot": "tabs-trigger",
|
|
23
|
-
className: cn("inline-flex h-
|
|
23
|
+
className: cn("inline-flex h-7 min-w-0 items-center justify-center gap-1.5 rounded-sm px-2.5 text-[13px] font-semibold whitespace-nowrap outline-none transition-[background-color,color,box-shadow] focus-visible:ring-[3px] focus-visible:ring-ring/20 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-surface data-[state=active]:text-foreground data-[state=active]:shadow-xs hover:text-foreground [&_svg]:size-3.5", className),
|
|
24
24
|
...props
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
function TabsContent({ className, ...props }) {
|
|
28
28
|
return /* @__PURE__ */ jsx(Tabs.Content, {
|
|
29
29
|
"data-slot": "tabs-content",
|
|
30
|
-
className: cn("flex-1 outline-none", className),
|
|
30
|
+
className: cn("min-w-0 flex-1 outline-none", className),
|
|
31
31
|
...props
|
|
32
32
|
});
|
|
33
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.js","names":["Tabs","TabsPrimitive"],"sources":["../../src/components/tabs.tsx"],"sourcesContent":["import { Tabs as TabsPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nfunction Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>) {\n return (\n <TabsPrimitive.Root\n data-slot=\"tabs\"\n className={cn('flex flex-col gap-
|
|
1
|
+
{"version":3,"file":"tabs.js","names":["Tabs","TabsPrimitive"],"sources":["../../src/components/tabs.tsx"],"sourcesContent":["import { Tabs as TabsPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nfunction Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>) {\n return (\n <TabsPrimitive.Root\n data-slot=\"tabs\"\n className={cn('flex flex-col gap-3', className)}\n {...props}\n />\n );\n}\n\nfunction TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>) {\n return (\n <TabsPrimitive.List\n data-slot=\"tabs-list\"\n className={cn(\n 'inline-flex h-9 w-fit items-center gap-0.5 rounded-md border border-border bg-surface-muted p-1 text-muted-foreground',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n return (\n <TabsPrimitive.Trigger\n data-slot=\"tabs-trigger\"\n className={cn(\n 'inline-flex h-7 min-w-0 items-center justify-center gap-1.5 rounded-sm px-2.5 text-[13px] font-semibold whitespace-nowrap outline-none transition-[background-color,color,box-shadow] focus-visible:ring-[3px] focus-visible:ring-ring/20 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-surface data-[state=active]:text-foreground data-[state=active]:shadow-xs hover:text-foreground [&_svg]:size-3.5',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>) {\n return (\n <TabsPrimitive.Content\n data-slot=\"tabs-content\"\n className={cn('min-w-0 flex-1 outline-none', className)}\n {...props}\n />\n );\n}\n\nexport { Tabs, TabsContent, TabsList, TabsTrigger };\n"],"mappings":";;;;;AAKA,SAASA,OAAK,EAAE,WAAW,GAAG,SAA0D;CACtF,OACE,oBAACC,KAAc,MAAf;EACE,aAAU;EACV,WAAW,GAAG,uBAAuB,SAAS;EAC9C,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,SAAS,EAAE,WAAW,GAAG,SAA0D;CAC1F,OACE,oBAACA,KAAc,MAAf;EACE,aAAU;EACV,WAAW,GACT,yHACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,YAAY,EAAE,WAAW,GAAG,SAA6D;CAChG,OACE,oBAACA,KAAc,SAAf;EACE,aAAU;EACV,WAAW,GACT,saACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,YAAY,EAAE,WAAW,GAAG,SAA6D;CAChG,OACE,oBAACA,KAAc,SAAf;EACE,aAAU;EACV,WAAW,GAAG,+BAA+B,SAAS;EACtD,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -6,7 +6,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
6
6
|
function Textarea({ className, ...props }) {
|
|
7
7
|
return /* @__PURE__ */ jsx("textarea", {
|
|
8
8
|
"data-slot": "textarea",
|
|
9
|
-
className: cn(fieldClasses, "
|
|
9
|
+
className: cn(fieldClasses, "min-h-24 resize-y py-2.5 leading-5", className),
|
|
10
10
|
...props
|
|
11
11
|
});
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.js","names":[],"sources":["../../src/components/textarea.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nimport { fieldClasses } from './input';\n\nfunction Textarea({ className, ...props }: React.ComponentProps<'textarea'>) {\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(fieldClasses, '
|
|
1
|
+
{"version":3,"file":"textarea.js","names":[],"sources":["../../src/components/textarea.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nimport { fieldClasses } from './input';\n\nfunction Textarea({ className, ...props }: React.ComponentProps<'textarea'>) {\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(fieldClasses, 'min-h-24 resize-y py-2.5 leading-5', className)}\n {...props}\n />\n );\n}\n\nexport { Textarea };\n"],"mappings":";;;;;AAMA,SAAS,SAAS,EAAE,WAAW,GAAG,SAA2C;CAC3E,OACE,oBAAC,YAAD;EACE,aAAU;EACV,WAAW,GAAG,cAAc,sCAAsC,SAAS;EAC3E,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare function Toolbar({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
3
|
+
declare function ToolbarGroup({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
4
|
+
declare function ToolbarSeparator({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
5
|
+
declare function ToolbarSpacer({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
6
|
+
export { Toolbar, ToolbarGroup, ToolbarSeparator, ToolbarSpacer };
|