@stagewise/ui 0.1.0 → 0.2.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.
Files changed (113) hide show
  1. package/README.md +9 -3
  2. package/package.json +9 -15
  3. package/src/components/ui/accordion.tsx +13 -15
  4. package/src/components/ui/alert-dialog.tsx +38 -38
  5. package/src/components/ui/alert.tsx +22 -22
  6. package/src/components/ui/aspect-ratio.tsx +6 -6
  7. package/src/components/ui/avatar.tsx +30 -30
  8. package/src/components/ui/badge.tsx +24 -22
  9. package/src/components/ui/breadcrumb.tsx +34 -37
  10. package/src/components/ui/bubble.tsx +48 -48
  11. package/src/components/ui/button-group.tsx +24 -24
  12. package/src/components/ui/button.tsx +24 -24
  13. package/src/components/ui/calendar.tsx +94 -81
  14. package/src/components/ui/card.tsx +30 -30
  15. package/src/components/ui/carousel.tsx +95 -92
  16. package/src/components/ui/chart.tsx +110 -110
  17. package/src/components/ui/checkbox.tsx +9 -10
  18. package/src/components/ui/collapsible.tsx +5 -5
  19. package/src/components/ui/combobox.tsx +51 -44
  20. package/src/components/ui/command.tsx +173 -190
  21. package/src/components/ui/context-menu.tsx +60 -50
  22. package/src/components/ui/dialog.tsx +33 -34
  23. package/src/components/ui/direction.tsx +1 -1
  24. package/src/components/ui/drawer.tsx +61 -61
  25. package/src/components/ui/dropdown-menu.tsx +54 -50
  26. package/src/components/ui/empty.tsx +30 -30
  27. package/src/components/ui/field.tsx +64 -64
  28. package/src/components/ui/hover-card.tsx +12 -12
  29. package/src/components/ui/input-group.tsx +54 -54
  30. package/src/components/ui/input-otp.tsx +24 -25
  31. package/src/components/ui/input.tsx +8 -8
  32. package/src/components/ui/item.tsx +64 -64
  33. package/src/components/ui/kbd.tsx +8 -8
  34. package/src/components/ui/klex-logo-combo.tsx +69 -0
  35. package/src/components/ui/klex-logo-text.tsx +70 -0
  36. package/src/components/ui/klex-logo.tsx +146 -0
  37. package/src/components/ui/label.tsx +8 -8
  38. package/src/components/ui/marker.tsx +25 -25
  39. package/src/components/ui/menubar.tsx +54 -50
  40. package/src/components/ui/message-scroller.tsx +130 -0
  41. package/src/components/ui/message.tsx +27 -27
  42. package/src/components/ui/native-select.tsx +22 -18
  43. package/src/components/ui/navigation-menu.tsx +37 -34
  44. package/src/components/ui/pagination.tsx +34 -31
  45. package/src/components/ui/popover.tsx +19 -19
  46. package/src/components/ui/progress.tsx +16 -16
  47. package/src/components/ui/questionnaire.tsx +72 -69
  48. package/src/components/ui/radio-group.tsx +9 -9
  49. package/src/components/ui/resizable.tsx +19 -12
  50. package/src/components/ui/scroll-area.tsx +10 -10
  51. package/src/components/ui/select.tsx +39 -34
  52. package/src/components/ui/separator.tsx +7 -7
  53. package/src/components/ui/sheet.tsx +31 -32
  54. package/src/components/ui/sidebar.tsx +244 -232
  55. package/src/components/ui/skeleton.tsx +5 -5
  56. package/src/components/ui/slider.tsx +11 -7
  57. package/src/components/ui/spinner.tsx +15 -6
  58. package/src/components/ui/stagewise-logo-combo.tsx +43 -0
  59. package/src/components/ui/stagewise-logo-text.tsx +30 -0
  60. package/src/components/ui/stagewise-logo.tsx +42 -0
  61. package/src/components/ui/switch.tsx +9 -9
  62. package/src/components/ui/table.tsx +31 -31
  63. package/src/components/ui/tabs.tsx +37 -26
  64. package/src/components/ui/textarea.tsx +7 -7
  65. package/src/components/ui/toast.tsx +70 -70
  66. package/src/components/ui/toggle-group.tsx +26 -26
  67. package/src/components/ui/toggle.tsx +15 -15
  68. package/src/components/ui/tooltip.tsx +13 -13
  69. package/src/hooks/use-mobile.ts +13 -11
  70. package/src/icons/custom/ui-outline-18/IconKlexOutline18.tsx +39 -0
  71. package/src/icons/custom/ui-outline-18/IconLaptop.tsx +35 -0
  72. package/src/icons/custom/ui-outline-18/IconSignOut.tsx +33 -0
  73. package/src/icons/custom/ui-outline-18/index.ts +4 -1
  74. package/src/icons/index.ts +42 -20
  75. package/src/icons/nucleo/social-media/IconMicrosoftEntraId.tsx +56 -0
  76. package/src/icons/nucleo/social-media/index.ts +1 -0
  77. package/src/icons/nucleo/ui-outline-18/IconArrowDownOutline18.tsx +4 -3
  78. package/src/icons/nucleo/ui-outline-18/IconArrowTurnRightOutline18.tsx +32 -0
  79. package/src/icons/nucleo/ui-outline-18/IconArrowUpOutline18.tsx +35 -0
  80. package/src/icons/nucleo/ui-outline-18/IconChartPieOutline18.tsx +4 -3
  81. package/src/icons/nucleo/ui-outline-18/IconChevronMaximizeDiagonal2Outline18.tsx +33 -0
  82. package/src/icons/nucleo/ui-outline-18/IconChevronUpOutline18.tsx +4 -3
  83. package/src/icons/nucleo/ui-outline-18/IconEmptyOutline18.tsx +41 -0
  84. package/src/icons/nucleo/ui-outline-18/IconEyeOffOutline18.tsx +18 -0
  85. package/src/icons/nucleo/ui-outline-18/IconLinkBrokenOutline18.tsx +66 -0
  86. package/src/icons/nucleo/ui-outline-18/IconLock18Outline.tsx +48 -0
  87. package/src/icons/nucleo/ui-outline-18/IconMinusOutline18.tsx +4 -3
  88. package/src/icons/nucleo/ui-outline-18/IconMsgs2Outline18.tsx +32 -0
  89. package/src/icons/nucleo/ui-outline-18/IconPanelLeftOutline18.tsx +4 -3
  90. package/src/icons/nucleo/ui-outline-18/IconSidebarLeft2HideOutline18.tsx +63 -0
  91. package/src/icons/nucleo/ui-outline-18/IconSidebarRight2HideOutline18.tsx +63 -0
  92. package/src/icons/nucleo/ui-outline-18/index.ts +11 -1
  93. package/src/icons/provider/IconAnthropic.tsx +15 -0
  94. package/src/icons/provider/IconCodex.tsx +18 -0
  95. package/src/icons/provider/IconDiscord.tsx +17 -0
  96. package/src/icons/provider/IconGemini.tsx +152 -0
  97. package/src/icons/provider/IconLinear.tsx +9 -0
  98. package/src/icons/provider/IconOpenAI.tsx +15 -0
  99. package/src/icons/provider/IconOpenRouter.tsx +24 -0
  100. package/src/icons/provider/IconSlack.tsx +24 -0
  101. package/src/icons/provider/IconTelegram.tsx +29 -0
  102. package/src/icons/provider/IconWhatsapp.tsx +14 -0
  103. package/src/icons/provider/LICENSE +21 -0
  104. package/src/icons/provider/index.ts +10 -0
  105. package/src/index.ts +68 -61
  106. package/src/lib/utils.ts +3 -3
  107. package/src/styles/bridge.css +7 -3
  108. package/src/styles/derived-utilities.css +129 -50
  109. package/src/styles/index.css +17 -2
  110. package/src/styles/palette.css +266 -105
  111. package/src/styles/scroll-fade.css +116 -0
  112. package/src/styles/tailwind-tokens.css +3 -0
  113. package/src/styles/theme.css +57 -43
package/README.md CHANGED
@@ -2,10 +2,16 @@
2
2
 
3
3
  Customized [shadcn/ui](https://ui.shadcn.com) components built on [Base UI](https://base-ui.com) primitives, with a dynamic OKLCH color system and derived color utilities.
4
4
 
5
- ## Installation
5
+ ## Workspace usage
6
6
 
7
- ```bash
8
- pnpm add @stagewise/ui
7
+ Add the package to the consuming workspace app:
8
+
9
+ ```json
10
+ {
11
+ "dependencies": {
12
+ "@stagewise/ui": "workspace:*"
13
+ }
14
+ }
9
15
  ```
10
16
 
11
17
  ### Peer dependencies
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stagewise/ui",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Customized shadcn/ui components built on Base UI primitives, for use across stagewise projects.",
5
5
  "type": "module",
6
6
  "license": "MIT AND OFL-1.1",
@@ -52,9 +52,10 @@
52
52
  "tailwindcss": "^4.0.0"
53
53
  },
54
54
  "devDependencies": {
55
- "@types/react": "^19.0.0",
56
- "@types/react-dom": "^19.0.0",
57
- "typescript": "^5.9.0"
55
+ "@types/react": "19.2.18",
56
+ "@types/react-dom": "19.2.4",
57
+ "@stagewise/typescript-config": "workspace:*",
58
+ "typescript": "5.9.3"
58
59
  },
59
60
  "keywords": [
60
61
  "react",
@@ -65,16 +66,9 @@
65
66
  "engines": {
66
67
  "node": ">=22"
67
68
  },
69
+ "repository": "https://github.com/stagewise-io/cloud.git",
68
70
  "publishConfig": {
69
- "access": "public"
70
- },
71
- "repository": {
72
- "type": "git",
73
- "url": "https://github.com/stagewise-io/ui.git",
74
- "directory": "packages/ui"
75
- },
76
- "bugs": {
77
- "url": "https://github.com/stagewise-io/ui/issues"
78
- },
79
- "homepage": "https://github.com/stagewise-io/ui/tree/main/packages/ui"
71
+ "access": "public",
72
+ "provenance": false
73
+ }
80
74
  }
@@ -1,26 +1,26 @@
1
- import { Accordion as AccordionPrimitive } from "@base-ui/react/accordion"
1
+ import { Accordion as AccordionPrimitive } from '@base-ui/react/accordion';
2
2
 
3
- import { cn } from "../../lib/utils"
4
- import { IconChevronDownOutline18 } from "../../icons"
3
+ import { cn } from '../../lib/utils';
4
+ import { IconChevronDownOutline18 } from '../../icons';
5
5
 
6
6
  function Accordion({ className, ...props }: AccordionPrimitive.Root.Props) {
7
7
  return (
8
8
  <AccordionPrimitive.Root
9
9
  data-slot="accordion"
10
- className={cn("flex w-full flex-col", className)}
10
+ className={cn('flex w-full flex-col', className)}
11
11
  {...props}
12
12
  />
13
- )
13
+ );
14
14
  }
15
15
 
16
16
  function AccordionItem({ className, ...props }: AccordionPrimitive.Item.Props) {
17
17
  return (
18
18
  <AccordionPrimitive.Item
19
19
  data-slot="accordion-item"
20
- className={cn("not-last:border-b", className)}
20
+ className={cn('not-last:border-b', className)}
21
21
  {...props}
22
22
  />
23
- )
23
+ );
24
24
  }
25
25
 
26
26
  function AccordionTrigger({
@@ -33,8 +33,8 @@ function AccordionTrigger({
33
33
  <AccordionPrimitive.Trigger
34
34
  data-slot="accordion-trigger"
35
35
  className={cn(
36
- "flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&[aria-expanded=true]>svg]:rotate-180",
37
- className
36
+ 'flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&[aria-expanded=true]>svg]:rotate-180',
37
+ className,
38
38
  )}
39
39
  {...props}
40
40
  >
@@ -42,7 +42,7 @@ function AccordionTrigger({
42
42
  <IconChevronDownOutline18 className="pointer-events-none size-4 shrink-0 translate-y-0.5 text-muted-foreground transition-transform duration-200" />
43
43
  </AccordionPrimitive.Trigger>
44
44
  </AccordionPrimitive.Header>
45
- )
45
+ );
46
46
  }
47
47
 
48
48
  function AccordionContent({
@@ -56,11 +56,9 @@ function AccordionContent({
56
56
  className="overflow-hidden text-sm h-(--accordion-panel-height) transition-[height] duration-200 ease-out data-starting-style:h-0 data-ending-style:h-0"
57
57
  {...props}
58
58
  >
59
- <div className={cn("pt-0 pb-4", className)}>
60
- {children}
61
- </div>
59
+ <div className={cn('pt-0 pb-4', className)}>{children}</div>
62
60
  </AccordionPrimitive.Panel>
63
- )
61
+ );
64
62
  }
65
63
 
66
- export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }
64
+ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
@@ -1,23 +1,23 @@
1
- import * as React from "react"
2
- import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog"
1
+ import * as React from 'react';
2
+ import { AlertDialog as AlertDialogPrimitive } from '@base-ui/react/alert-dialog';
3
3
 
4
- import { cn } from "../../lib/utils"
5
- import { Button } from "./button"
4
+ import { cn } from '../../lib/utils';
5
+ import { Button } from './button';
6
6
 
7
7
  function AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props) {
8
- return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />
8
+ return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />;
9
9
  }
10
10
 
11
11
  function AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props) {
12
12
  return (
13
13
  <AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />
14
- )
14
+ );
15
15
  }
16
16
 
17
17
  function AlertDialogPortal({ ...props }: AlertDialogPrimitive.Portal.Props) {
18
18
  return (
19
19
  <AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />
20
- )
20
+ );
21
21
  }
22
22
 
23
23
  function AlertDialogOverlay({
@@ -28,20 +28,20 @@ function AlertDialogOverlay({
28
28
  <AlertDialogPrimitive.Backdrop
29
29
  data-slot="alert-dialog-overlay"
30
30
  className={cn(
31
- "fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
32
- className
31
+ 'fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0',
32
+ className,
33
33
  )}
34
34
  {...props}
35
35
  />
36
- )
36
+ );
37
37
  }
38
38
 
39
39
  function AlertDialogContent({
40
40
  className,
41
- size = "default",
41
+ size = 'default',
42
42
  ...props
43
43
  }: AlertDialogPrimitive.Popup.Props & {
44
- size?: "default" | "sm"
44
+ size?: 'default' | 'sm';
45
45
  }) {
46
46
  return (
47
47
  <AlertDialogPortal>
@@ -50,61 +50,61 @@ function AlertDialogContent({
50
50
  data-slot="alert-dialog-content"
51
51
  data-size={size}
52
52
  className={cn(
53
- "group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
54
- className
53
+ 'group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',
54
+ className,
55
55
  )}
56
56
  {...props}
57
57
  />
58
58
  </AlertDialogPortal>
59
- )
59
+ );
60
60
  }
61
61
 
62
62
  function AlertDialogHeader({
63
63
  className,
64
64
  ...props
65
- }: React.ComponentProps<"div">) {
65
+ }: React.ComponentProps<'div'>) {
66
66
  return (
67
67
  <div
68
68
  data-slot="alert-dialog-header"
69
69
  className={cn(
70
- "grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",
71
- className
70
+ 'grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]',
71
+ className,
72
72
  )}
73
73
  {...props}
74
74
  />
75
- )
75
+ );
76
76
  }
77
77
 
78
78
  function AlertDialogFooter({
79
79
  className,
80
80
  ...props
81
- }: React.ComponentProps<"div">) {
81
+ }: React.ComponentProps<'div'>) {
82
82
  return (
83
83
  <div
84
84
  data-slot="alert-dialog-footer"
85
85
  className={cn(
86
- "-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",
87
- className
86
+ '-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end',
87
+ className,
88
88
  )}
89
89
  {...props}
90
90
  />
91
- )
91
+ );
92
92
  }
93
93
 
94
94
  function AlertDialogMedia({
95
95
  className,
96
96
  ...props
97
- }: React.ComponentProps<"div">) {
97
+ }: React.ComponentProps<'div'>) {
98
98
  return (
99
99
  <div
100
100
  data-slot="alert-dialog-media"
101
101
  className={cn(
102
102
  "mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6",
103
- className
103
+ className,
104
104
  )}
105
105
  {...props}
106
106
  />
107
- )
107
+ );
108
108
  }
109
109
 
110
110
  function AlertDialogTitle({
@@ -115,12 +115,12 @@ function AlertDialogTitle({
115
115
  <AlertDialogPrimitive.Title
116
116
  data-slot="alert-dialog-title"
117
117
  className={cn(
118
- "font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",
119
- className
118
+ 'font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2',
119
+ className,
120
120
  )}
121
121
  {...props}
122
122
  />
123
- )
123
+ );
124
124
  }
125
125
 
126
126
  function AlertDialogDescription({
@@ -131,12 +131,12 @@ function AlertDialogDescription({
131
131
  <AlertDialogPrimitive.Description
132
132
  data-slot="alert-dialog-description"
133
133
  className={cn(
134
- "text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
135
- className
134
+ 'text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground',
135
+ className,
136
136
  )}
137
137
  {...props}
138
138
  />
139
- )
139
+ );
140
140
  }
141
141
 
142
142
  function AlertDialogAction({
@@ -149,16 +149,16 @@ function AlertDialogAction({
149
149
  className={cn(className)}
150
150
  {...props}
151
151
  />
152
- )
152
+ );
153
153
  }
154
154
 
155
155
  function AlertDialogCancel({
156
156
  className,
157
- variant = "outline",
158
- size = "default",
157
+ variant = 'outline',
158
+ size = 'default',
159
159
  ...props
160
160
  }: AlertDialogPrimitive.Close.Props &
161
- Pick<React.ComponentProps<typeof Button>, "variant" | "size">) {
161
+ Pick<React.ComponentProps<typeof Button>, 'variant' | 'size'>) {
162
162
  return (
163
163
  <AlertDialogPrimitive.Close
164
164
  data-slot="alert-dialog-cancel"
@@ -166,7 +166,7 @@ function AlertDialogCancel({
166
166
  render={<Button variant={variant} size={size} />}
167
167
  {...props}
168
168
  />
169
- )
169
+ );
170
170
  }
171
171
 
172
172
  export {
@@ -182,4 +182,4 @@ export {
182
182
  AlertDialogPortal,
183
183
  AlertDialogTitle,
184
184
  AlertDialogTrigger,
185
- }
185
+ };
@@ -1,29 +1,29 @@
1
- import * as React from "react"
2
- import { cva, type VariantProps } from "class-variance-authority"
1
+ import * as React from 'react';
2
+ import { cva, type VariantProps } from 'class-variance-authority';
3
3
 
4
- import { cn } from "../../lib/utils"
4
+ import { cn } from '../../lib/utils';
5
5
 
6
6
  const alertVariants = cva(
7
7
  "group/alert relative grid w-full gap-0 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",
8
8
  {
9
9
  variants: {
10
10
  variant: {
11
- default: "bg-card text-card-foreground",
11
+ default: 'bg-card text-card-foreground',
12
12
  destructive:
13
- "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current",
13
+ 'bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current',
14
14
  },
15
15
  },
16
16
  defaultVariants: {
17
- variant: "default",
17
+ variant: 'default',
18
18
  },
19
- }
20
- )
19
+ },
20
+ );
21
21
 
22
22
  function Alert({
23
23
  className,
24
24
  variant,
25
25
  ...props
26
- }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>) {
26
+ }: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>) {
27
27
  return (
28
28
  <div
29
29
  data-slot="alert"
@@ -31,46 +31,46 @@ function Alert({
31
31
  className={cn(alertVariants({ variant }), className)}
32
32
  {...props}
33
33
  />
34
- )
34
+ );
35
35
  }
36
36
 
37
- function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
37
+ function AlertTitle({ className, ...props }: React.ComponentProps<'div'>) {
38
38
  return (
39
39
  <div
40
40
  data-slot="alert-title"
41
41
  className={cn(
42
- "font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",
43
- className
42
+ 'font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground',
43
+ className,
44
44
  )}
45
45
  {...props}
46
46
  />
47
- )
47
+ );
48
48
  }
49
49
 
50
50
  function AlertDescription({
51
51
  className,
52
52
  ...props
53
- }: React.ComponentProps<"div">) {
53
+ }: React.ComponentProps<'div'>) {
54
54
  return (
55
55
  <div
56
56
  data-slot="alert-description"
57
57
  className={cn(
58
- "text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",
59
- className
58
+ 'text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4',
59
+ className,
60
60
  )}
61
61
  {...props}
62
62
  />
63
- )
63
+ );
64
64
  }
65
65
 
66
- function AlertAction({ className, ...props }: React.ComponentProps<"div">) {
66
+ function AlertAction({ className, ...props }: React.ComponentProps<'div'>) {
67
67
  return (
68
68
  <div
69
69
  data-slot="alert-action"
70
- className={cn("absolute top-2 right-2", className)}
70
+ className={cn('absolute top-2 right-2', className)}
71
71
  {...props}
72
72
  />
73
- )
73
+ );
74
74
  }
75
75
 
76
- export { Alert, AlertTitle, AlertDescription, AlertAction }
76
+ export { Alert, AlertTitle, AlertDescription, AlertAction };
@@ -1,22 +1,22 @@
1
- import { cn } from "../../lib/utils"
1
+ import { cn } from '../../lib/utils';
2
2
 
3
3
  function AspectRatio({
4
4
  ratio,
5
5
  className,
6
6
  ...props
7
- }: React.ComponentProps<"div"> & { ratio: number }) {
7
+ }: React.ComponentProps<'div'> & { ratio: number }) {
8
8
  return (
9
9
  <div
10
10
  data-slot="aspect-ratio"
11
11
  style={
12
12
  {
13
- "--ratio": ratio,
13
+ '--ratio': ratio,
14
14
  } as React.CSSProperties
15
15
  }
16
- className={cn("relative aspect-(--ratio)", className)}
16
+ className={cn('relative aspect-(--ratio)', className)}
17
17
  {...props}
18
18
  />
19
- )
19
+ );
20
20
  }
21
21
 
22
- export { AspectRatio }
22
+ export { AspectRatio };
@@ -1,26 +1,26 @@
1
- import * as React from "react"
2
- import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar"
1
+ import * as React from 'react';
2
+ import { Avatar as AvatarPrimitive } from '@base-ui/react/avatar';
3
3
 
4
- import { cn } from "../../lib/utils"
4
+ import { cn } from '../../lib/utils';
5
5
 
6
6
  function Avatar({
7
7
  className,
8
- size = "default",
8
+ size = 'default',
9
9
  ...props
10
10
  }: AvatarPrimitive.Root.Props & {
11
- size?: "default" | "sm" | "lg"
11
+ size?: 'default' | 'xs' | 'sm' | 'lg';
12
12
  }) {
13
13
  return (
14
14
  <AvatarPrimitive.Root
15
15
  data-slot="avatar"
16
16
  data-size={size}
17
17
  className={cn(
18
- "group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-derived-subtle after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",
19
- className
18
+ 'group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-derived-subtle after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 data-[size=xs]:size-4 dark:after:mix-blend-lighten',
19
+ className,
20
20
  )}
21
21
  {...props}
22
22
  />
23
- )
23
+ );
24
24
  }
25
25
 
26
26
  function AvatarImage({ className, ...props }: AvatarPrimitive.Image.Props) {
@@ -28,12 +28,12 @@ function AvatarImage({ className, ...props }: AvatarPrimitive.Image.Props) {
28
28
  <AvatarPrimitive.Image
29
29
  data-slot="avatar-image"
30
30
  className={cn(
31
- "aspect-square size-full rounded-full object-cover",
32
- className
31
+ 'aspect-square size-full rounded-full object-cover',
32
+ className,
33
33
  )}
34
34
  {...props}
35
35
  />
36
- )
36
+ );
37
37
  }
38
38
 
39
39
  function AvatarFallback({
@@ -44,57 +44,57 @@ function AvatarFallback({
44
44
  <AvatarPrimitive.Fallback
45
45
  data-slot="avatar-fallback"
46
46
  className={cn(
47
- "flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",
48
- className
47
+ 'flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs group-data-[size=xs]/avatar:text-[0.5rem]',
48
+ className,
49
49
  )}
50
50
  {...props}
51
51
  />
52
- )
52
+ );
53
53
  }
54
54
 
55
- function AvatarBadge({ className, ...props }: React.ComponentProps<"span">) {
55
+ function AvatarBadge({ className, ...props }: React.ComponentProps<'span'>) {
56
56
  return (
57
57
  <span
58
58
  data-slot="avatar-badge"
59
59
  className={cn(
60
- "absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none",
61
- "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden",
62
- "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2",
63
- "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",
64
- className
60
+ 'absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none',
61
+ 'group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden',
62
+ 'group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2',
63
+ 'group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2',
64
+ className,
65
65
  )}
66
66
  {...props}
67
67
  />
68
- )
68
+ );
69
69
  }
70
70
 
71
- function AvatarGroup({ className, ...props }: React.ComponentProps<"div">) {
71
+ function AvatarGroup({ className, ...props }: React.ComponentProps<'div'>) {
72
72
  return (
73
73
  <div
74
74
  data-slot="avatar-group"
75
75
  className={cn(
76
- "group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background",
77
- className
76
+ 'group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background',
77
+ className,
78
78
  )}
79
79
  {...props}
80
80
  />
81
- )
81
+ );
82
82
  }
83
83
 
84
84
  function AvatarGroupCount({
85
85
  className,
86
86
  ...props
87
- }: React.ComponentProps<"div">) {
87
+ }: React.ComponentProps<'div'>) {
88
88
  return (
89
89
  <div
90
90
  data-slot="avatar-group-count"
91
91
  className={cn(
92
- "relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",
93
- className
92
+ 'relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3',
93
+ className,
94
94
  )}
95
95
  {...props}
96
96
  />
97
- )
97
+ );
98
98
  }
99
99
 
100
100
  export {
@@ -104,4 +104,4 @@ export {
104
104
  AvatarGroup,
105
105
  AvatarGroupCount,
106
106
  AvatarBadge,
107
- }
107
+ };