@ichaingo/ui 1.1.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 (141) hide show
  1. package/.babelrc +12 -0
  2. package/README.md +103 -0
  3. package/components.json +21 -0
  4. package/dist/accordion.d.ts +13 -0
  5. package/dist/accordion.mjs +64 -0
  6. package/dist/alert-dialog.d.ts +27 -0
  7. package/dist/alert-dialog.mjs +146 -0
  8. package/dist/alert.d.ts +16 -0
  9. package/dist/alert.mjs +66 -0
  10. package/dist/aspect-ratio.d.ts +6 -0
  11. package/dist/aspect-ratio.mjs +10 -0
  12. package/dist/avatar.d.ts +11 -0
  13. package/dist/avatar.mjs +53 -0
  14. package/dist/badge.d.ts +14 -0
  15. package/dist/badge.mjs +39 -0
  16. package/dist/breadcrumb.d.ts +20 -0
  17. package/dist/breadcrumb.mjs +102 -0
  18. package/dist/button.d.ts +15 -0
  19. package/dist/button.mjs +49 -0
  20. package/dist/calendar.d.ts +23 -0
  21. package/dist/calendar.mjs +173 -0
  22. package/dist/card.d.ts +18 -0
  23. package/dist/card.mjs +90 -0
  24. package/dist/carousel.d.ts +42 -0
  25. package/dist/carousel.mjs +177 -0
  26. package/dist/checkbox.d.ts +7 -0
  27. package/dist/checkbox.mjs +31 -0
  28. package/dist/collapsible.d.ts +10 -0
  29. package/dist/collapsible.mjs +34 -0
  30. package/dist/command.d.ts +31 -0
  31. package/dist/command.mjs +170 -0
  32. package/dist/context-menu.d.ts +42 -0
  33. package/dist/context-menu.mjs +223 -0
  34. package/dist/dialog.d.ts +27 -0
  35. package/dist/dialog.mjs +136 -0
  36. package/dist/dropdown-menu.d.ts +42 -0
  37. package/dist/dropdown-menu.mjs +231 -0
  38. package/dist/form.d.ts +38 -0
  39. package/dist/form.mjs +101 -0
  40. package/dist/hover-card.d.ts +11 -0
  41. package/dist/hover-card.mjs +38 -0
  42. package/dist/input.d.ts +6 -0
  43. package/dist/input.mjs +21 -0
  44. package/dist/label.d.ts +7 -0
  45. package/dist/label.mjs +23 -0
  46. package/dist/menubar.d.ts +44 -0
  47. package/dist/menubar.mjs +251 -0
  48. package/dist/navigation-menu.d.ts +26 -0
  49. package/dist/navigation-menu.mjs +170 -0
  50. package/dist/pagination.d.ts +33 -0
  51. package/dist/pagination.mjs +116 -0
  52. package/dist/popover.d.ts +13 -0
  53. package/dist/popover.mjs +44 -0
  54. package/dist/progress.d.ts +7 -0
  55. package/dist/progress.mjs +31 -0
  56. package/dist/radio-group.d.ts +9 -0
  57. package/dist/radio-group.mjs +45 -0
  58. package/dist/resizable.d.ts +13 -0
  59. package/dist/resizable.mjs +48 -0
  60. package/dist/scroll-area.d.ts +9 -0
  61. package/dist/scroll-area.mjs +60 -0
  62. package/dist/select.d.ts +27 -0
  63. package/dist/select.mjs +169 -0
  64. package/dist/separator.d.ts +7 -0
  65. package/dist/separator.mjs +26 -0
  66. package/dist/sheet.d.ts +23 -0
  67. package/dist/sheet.mjs +126 -0
  68. package/dist/skeleton.d.ts +5 -0
  69. package/dist/skeleton.mjs +15 -0
  70. package/dist/slider.d.ts +7 -0
  71. package/dist/slider.mjs +63 -0
  72. package/dist/sonner.d.ts +6 -0
  73. package/dist/sonner.mjs +22 -0
  74. package/dist/switch.d.ts +7 -0
  75. package/dist/switch.mjs +31 -0
  76. package/dist/table.d.ts +20 -0
  77. package/dist/table.mjs +114 -0
  78. package/dist/tabs.d.ts +13 -0
  79. package/dist/tabs.mjs +67 -0
  80. package/dist/textarea.d.ts +6 -0
  81. package/dist/textarea.mjs +18 -0
  82. package/dist/toggle-group.d.ts +16 -0
  83. package/dist/toggle-group.mjs +62 -0
  84. package/dist/toggle.d.ts +14 -0
  85. package/dist/toggle.mjs +43 -0
  86. package/dist/tooltip.d.ts +13 -0
  87. package/dist/tooltip.mjs +55 -0
  88. package/dist/utils-B7J70Nno.js +8 -0
  89. package/eslint.config.mjs +12 -0
  90. package/package.json +273 -0
  91. package/postcss.config.js +6 -0
  92. package/src/components/ui/accordion.tsx +64 -0
  93. package/src/components/ui/alert-dialog.tsx +155 -0
  94. package/src/components/ui/alert.tsx +66 -0
  95. package/src/components/ui/aspect-ratio.tsx +9 -0
  96. package/src/components/ui/avatar.tsx +51 -0
  97. package/src/components/ui/badge.tsx +46 -0
  98. package/src/components/ui/breadcrumb.tsx +109 -0
  99. package/src/components/ui/button.tsx +59 -0
  100. package/src/components/ui/calendar.tsx +211 -0
  101. package/src/components/ui/card.tsx +92 -0
  102. package/src/components/ui/carousel.tsx +239 -0
  103. package/src/components/ui/checkbox.tsx +30 -0
  104. package/src/components/ui/collapsible.tsx +31 -0
  105. package/src/components/ui/command.tsx +182 -0
  106. package/src/components/ui/context-menu.tsx +250 -0
  107. package/src/components/ui/dialog.tsx +141 -0
  108. package/src/components/ui/dropdown-menu.tsx +255 -0
  109. package/src/components/ui/form.tsx +165 -0
  110. package/src/components/ui/hover-card.tsx +42 -0
  111. package/src/components/ui/input.tsx +21 -0
  112. package/src/components/ui/label.tsx +24 -0
  113. package/src/components/ui/menubar.tsx +274 -0
  114. package/src/components/ui/navigation-menu.tsx +168 -0
  115. package/src/components/ui/pagination.tsx +125 -0
  116. package/src/components/ui/popover.tsx +46 -0
  117. package/src/components/ui/progress.tsx +29 -0
  118. package/src/components/ui/radio-group.tsx +43 -0
  119. package/src/components/ui/resizable.tsx +54 -0
  120. package/src/components/ui/scroll-area.tsx +56 -0
  121. package/src/components/ui/select.tsx +183 -0
  122. package/src/components/ui/separator.tsx +26 -0
  123. package/src/components/ui/sheet.tsx +137 -0
  124. package/src/components/ui/skeleton.tsx +13 -0
  125. package/src/components/ui/slider.tsx +61 -0
  126. package/src/components/ui/sonner.tsx +23 -0
  127. package/src/components/ui/switch.tsx +29 -0
  128. package/src/components/ui/table.tsx +114 -0
  129. package/src/components/ui/tabs.tsx +64 -0
  130. package/src/components/ui/textarea.tsx +18 -0
  131. package/src/components/ui/toggle-group.tsx +71 -0
  132. package/src/components/ui/toggle.tsx +45 -0
  133. package/src/components/ui/tooltip.tsx +59 -0
  134. package/src/index.ts +46 -0
  135. package/src/lib/utils.ts +6 -0
  136. package/src/style.css +0 -0
  137. package/tailwind.config.js +52 -0
  138. package/tsconfig.json +19 -0
  139. package/tsconfig.lib.json +54 -0
  140. package/tsconfig.spec.json +32 -0
  141. package/vite.config.ts +136 -0
package/.babelrc ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "presets": [
3
+ [
4
+ "@nx/react/babel",
5
+ {
6
+ "runtime": "automatic",
7
+ "useBuiltIns": "usage"
8
+ }
9
+ ]
10
+ ],
11
+ "plugins": []
12
+ }
package/README.md ADDED
@@ -0,0 +1,103 @@
1
+ # @ichaingo/ui
2
+
3
+ 这是一个使用 Tailwind CSS 构建的现代化 UI 组件库。
4
+
5
+ ## 安装
6
+
7
+ ```bash
8
+ npm install @ichaingo/ui
9
+ # 或
10
+ yarn add @ichaingo/ui
11
+ # 或
12
+ pnpm add @ichaingo/ui
13
+ ```
14
+
15
+ ## 使用方法
16
+
17
+ ### 导入整个库
18
+
19
+ ```tsx
20
+ import { Button, Card, Input } from '@ichaingo/ui';
21
+ ```
22
+
23
+ ### 按需导入单个组件
24
+
25
+ 你也可以按需导入单个组件,这样可以减少打包体积:
26
+
27
+ ```tsx
28
+ // 导入单个组件
29
+ import { Button } from '@ichaingo/ui/button';
30
+ import { Card } from '@ichaingo/ui/card';
31
+ import { Input } from '@ichaingo/ui/input';
32
+ import { Dialog } from '@ichaingo/ui/dialog';
33
+ import { Form } from '@ichaingo/ui/form';
34
+ ```
35
+
36
+ ### 可用的组件入口
37
+
38
+ - `@ichaingo/ui/accordion` - 手风琴组件
39
+ - `@ichaingo/ui/alert` - 警告组件
40
+ - `@ichaingo/ui/alert-dialog` - 警告对话框
41
+ - `@ichaingo/ui/aspect-ratio` - 宽高比组件
42
+ - `@ichaingo/ui/avatar` - 头像组件
43
+ - `@ichaingo/ui/badge` - 徽章组件
44
+ - `@ichaingo/ui/breadcrumb` - 面包屑导航
45
+ - `@ichaingo/ui/button` - 按钮组件
46
+ - `@ichaingo/ui/calendar` - 日历组件
47
+ - `@ichaingo/ui/card` - 卡片组件
48
+ - `@ichaingo/ui/carousel` - 轮播图组件
49
+ - `@ichaingo/ui/checkbox` - 复选框组件
50
+ - `@ichaingo/ui/collapsible` - 可折叠组件
51
+ - `@ichaingo/ui/command` - 命令组件
52
+ - `@ichaingo/ui/context-menu` - 上下文菜单
53
+ - `@ichaingo/ui/dialog` - 对话框组件
54
+ - `@ichaingo/ui/dropdown-menu` - 下拉菜单
55
+ - `@ichaingo/ui/form` - 表单组件
56
+ - `@ichaingo/ui/hover-card` - 悬停卡片
57
+ - `@ichaingo/ui/input` - 输入框组件
58
+ - `@ichaingo/ui/label` - 标签组件
59
+ - `@ichaingo/ui/menubar` - 菜单栏
60
+ - `@ichaingo/ui/navigation-menu` - 导航菜单
61
+ - `@ichaingo/ui/pagination` - 分页组件
62
+ - `@ichaingo/ui/popover` - 弹出框组件
63
+ - `@ichaingo/ui/progress` - 进度条组件
64
+ - `@ichaingo/ui/radio-group` - 单选按钮组
65
+ - `@ichaingo/ui/resizable` - 可调整大小组件
66
+ - `@ichaingo/ui/scroll-area` - 滚动区域
67
+ - `@ichaingo/ui/select` - 选择器组件
68
+ - `@ichaingo/ui/separator` - 分隔符组件
69
+ - `@ichaingo/ui/sheet` - 侧边栏组件
70
+ - `@ichaingo/ui/skeleton` - 骨架屏组件
71
+ - `@ichaingo/ui/slider` - 滑块组件
72
+ - `@ichaingo/ui/sonner` - 通知组件
73
+ - `@ichaingo/ui/switch` - 开关组件
74
+ - `@ichaingo/ui/table` - 表格组件
75
+ - `@ichaingo/ui/tabs` - 标签页组件
76
+ - `@ichaingo/ui/textarea` - 文本域组件
77
+ - `@ichaingo/ui/toggle-group` - 切换按钮组
78
+ - `@ichaingo/ui/toggle` - 切换按钮
79
+ - `@ichaingo/ui/tooltip` - 工具提示
80
+
81
+ ## 样式
82
+
83
+ 确保在你的项目中引入了 Tailwind CSS:
84
+
85
+ ```css
86
+ @import '@ichaingo/ui/styles.css';
87
+ ```
88
+
89
+ ## 开发
90
+
91
+ ```bash
92
+ # 安装依赖
93
+ pnpm install
94
+
95
+ # 构建库
96
+ pnpm build
97
+
98
+ # 运行测试
99
+ pnpm test
100
+
101
+ # 运行 Storybook
102
+ pnpm storybook
103
+ ```
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema.json",
3
+ "style": "new-york",
4
+ "rsc": false,
5
+ "tsx": true,
6
+ "tailwind": {
7
+ "config": "tailwind.config.js",
8
+ "css": "src/styles.css",
9
+ "baseColor": "neutral",
10
+ "cssVariables": true,
11
+ "prefix": ""
12
+ },
13
+ "aliases": {
14
+ "components": "@/components",
15
+ "utils": "@/lib/utils",
16
+ "ui": "@/components/ui",
17
+ "lib": "@/lib",
18
+ "hooks": "@/hooks"
19
+ },
20
+ "iconLibrary": "lucide"
21
+ }
@@ -0,0 +1,13 @@
1
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
2
+ import { JSX } from 'react/jsx-runtime';
3
+ import * as React_2 from 'react';
4
+
5
+ export declare function Accordion({ ...props }: React_2.ComponentProps<typeof AccordionPrimitive.Root>): JSX.Element;
6
+
7
+ export declare function AccordionContent({ className, children, ...props }: React_2.ComponentProps<typeof AccordionPrimitive.Content>): JSX.Element;
8
+
9
+ export declare function AccordionItem({ className, ...props }: React_2.ComponentProps<typeof AccordionPrimitive.Item>): JSX.Element;
10
+
11
+ export declare function AccordionTrigger({ className, children, ...props }: React_2.ComponentProps<typeof AccordionPrimitive.Trigger>): JSX.Element;
12
+
13
+ export { }
@@ -0,0 +1,64 @@
1
+ import { jsx as e, jsxs as a } from "react/jsx-runtime";
2
+ import * as n from "@radix-ui/react-accordion";
3
+ import { ChevronDownIcon as s } from "lucide-react";
4
+ import { c as i } from "./utils-B7J70Nno.js";
5
+ function m({
6
+ ...t
7
+ }) {
8
+ return /* @__PURE__ */ e(n.Root, { "data-slot": "accordion", ...t });
9
+ }
10
+ function f({
11
+ className: t,
12
+ ...o
13
+ }) {
14
+ return /* @__PURE__ */ e(
15
+ n.Item,
16
+ {
17
+ "data-slot": "accordion-item",
18
+ className: i("border-b last:border-b-0", t),
19
+ ...o
20
+ }
21
+ );
22
+ }
23
+ function u({
24
+ className: t,
25
+ children: o,
26
+ ...r
27
+ }) {
28
+ return /* @__PURE__ */ e(n.Header, { className: "flex", children: /* @__PURE__ */ a(
29
+ n.Trigger,
30
+ {
31
+ "data-slot": "accordion-trigger",
32
+ className: i(
33
+ "focus-visible:border-ring focus-visible:ring-ring/50 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:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
34
+ t
35
+ ),
36
+ ...r,
37
+ children: [
38
+ o,
39
+ /* @__PURE__ */ e(s, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
40
+ ]
41
+ }
42
+ ) });
43
+ }
44
+ function p({
45
+ className: t,
46
+ children: o,
47
+ ...r
48
+ }) {
49
+ return /* @__PURE__ */ e(
50
+ n.Content,
51
+ {
52
+ "data-slot": "accordion-content",
53
+ className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
54
+ ...r,
55
+ children: /* @__PURE__ */ e("div", { className: i("pt-0 pb-4", t), children: o })
56
+ }
57
+ );
58
+ }
59
+ export {
60
+ m as Accordion,
61
+ p as AccordionContent,
62
+ f as AccordionItem,
63
+ u as AccordionTrigger
64
+ };
@@ -0,0 +1,27 @@
1
+ import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
2
+ import { JSX } from 'react/jsx-runtime';
3
+ import * as React_2 from 'react';
4
+
5
+ export declare function AlertDialog({ ...props }: React_2.ComponentProps<typeof AlertDialogPrimitive.Root>): JSX.Element;
6
+
7
+ export declare function AlertDialogAction({ className, ...props }: React_2.ComponentProps<typeof AlertDialogPrimitive.Action>): JSX.Element;
8
+
9
+ export declare function AlertDialogCancel({ className, ...props }: React_2.ComponentProps<typeof AlertDialogPrimitive.Cancel>): JSX.Element;
10
+
11
+ export declare function AlertDialogContent({ className, ...props }: React_2.ComponentProps<typeof AlertDialogPrimitive.Content>): JSX.Element;
12
+
13
+ export declare function AlertDialogDescription({ className, ...props }: React_2.ComponentProps<typeof AlertDialogPrimitive.Description>): JSX.Element;
14
+
15
+ export declare function AlertDialogFooter({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
16
+
17
+ export declare function AlertDialogHeader({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
18
+
19
+ export declare function AlertDialogOverlay({ className, ...props }: React_2.ComponentProps<typeof AlertDialogPrimitive.Overlay>): JSX.Element;
20
+
21
+ export declare function AlertDialogPortal({ ...props }: React_2.ComponentProps<typeof AlertDialogPrimitive.Portal>): JSX.Element;
22
+
23
+ export declare function AlertDialogTitle({ className, ...props }: React_2.ComponentProps<typeof AlertDialogPrimitive.Title>): JSX.Element;
24
+
25
+ export declare function AlertDialogTrigger({ ...props }: React_2.ComponentProps<typeof AlertDialogPrimitive.Trigger>): JSX.Element;
26
+
27
+ export { }
@@ -0,0 +1,146 @@
1
+ import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
+ import * as o from "@radix-ui/react-alert-dialog";
3
+ import { c as l } from "./utils-B7J70Nno.js";
4
+ import { buttonVariants as r } from "./button.mjs";
5
+ function u({
6
+ ...t
7
+ }) {
8
+ return /* @__PURE__ */ e(o.Root, { "data-slot": "alert-dialog", ...t });
9
+ }
10
+ function f({
11
+ ...t
12
+ }) {
13
+ return /* @__PURE__ */ e(o.Trigger, { "data-slot": "alert-dialog-trigger", ...t });
14
+ }
15
+ function i({
16
+ ...t
17
+ }) {
18
+ return /* @__PURE__ */ e(o.Portal, { "data-slot": "alert-dialog-portal", ...t });
19
+ }
20
+ function s({
21
+ className: t,
22
+ ...a
23
+ }) {
24
+ return /* @__PURE__ */ e(
25
+ o.Overlay,
26
+ {
27
+ "data-slot": "alert-dialog-overlay",
28
+ className: l(
29
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
30
+ t
31
+ ),
32
+ ...a
33
+ }
34
+ );
35
+ }
36
+ function m({
37
+ className: t,
38
+ ...a
39
+ }) {
40
+ return /* @__PURE__ */ n(i, { children: [
41
+ /* @__PURE__ */ e(s, {}),
42
+ /* @__PURE__ */ e(
43
+ o.Content,
44
+ {
45
+ "data-slot": "alert-dialog-content",
46
+ className: l(
47
+ "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
48
+ t
49
+ ),
50
+ ...a
51
+ }
52
+ )
53
+ ] });
54
+ }
55
+ function p({
56
+ className: t,
57
+ ...a
58
+ }) {
59
+ return /* @__PURE__ */ e(
60
+ "div",
61
+ {
62
+ "data-slot": "alert-dialog-header",
63
+ className: l("flex flex-col gap-2 text-center sm:text-left", t),
64
+ ...a
65
+ }
66
+ );
67
+ }
68
+ function x({
69
+ className: t,
70
+ ...a
71
+ }) {
72
+ return /* @__PURE__ */ e(
73
+ "div",
74
+ {
75
+ "data-slot": "alert-dialog-footer",
76
+ className: l(
77
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
78
+ t
79
+ ),
80
+ ...a
81
+ }
82
+ );
83
+ }
84
+ function A({
85
+ className: t,
86
+ ...a
87
+ }) {
88
+ return /* @__PURE__ */ e(
89
+ o.Title,
90
+ {
91
+ "data-slot": "alert-dialog-title",
92
+ className: l("text-lg font-semibold", t),
93
+ ...a
94
+ }
95
+ );
96
+ }
97
+ function D({
98
+ className: t,
99
+ ...a
100
+ }) {
101
+ return /* @__PURE__ */ e(
102
+ o.Description,
103
+ {
104
+ "data-slot": "alert-dialog-description",
105
+ className: l("text-muted-foreground text-sm", t),
106
+ ...a
107
+ }
108
+ );
109
+ }
110
+ function v({
111
+ className: t,
112
+ ...a
113
+ }) {
114
+ return /* @__PURE__ */ e(
115
+ o.Action,
116
+ {
117
+ className: l(r(), t),
118
+ ...a
119
+ }
120
+ );
121
+ }
122
+ function N({
123
+ className: t,
124
+ ...a
125
+ }) {
126
+ return /* @__PURE__ */ e(
127
+ o.Cancel,
128
+ {
129
+ className: l(r({ variant: "outline" }), t),
130
+ ...a
131
+ }
132
+ );
133
+ }
134
+ export {
135
+ u as AlertDialog,
136
+ v as AlertDialogAction,
137
+ N as AlertDialogCancel,
138
+ m as AlertDialogContent,
139
+ D as AlertDialogDescription,
140
+ x as AlertDialogFooter,
141
+ p as AlertDialogHeader,
142
+ s as AlertDialogOverlay,
143
+ i as AlertDialogPortal,
144
+ A as AlertDialogTitle,
145
+ f as AlertDialogTrigger
146
+ };
@@ -0,0 +1,16 @@
1
+ import { ClassProp } from 'class-variance-authority/types';
2
+ import { JSX } from 'react/jsx-runtime';
3
+ import * as React_2 from 'react';
4
+ import { VariantProps } from 'class-variance-authority';
5
+
6
+ export declare function Alert({ className, variant, ...props }: React_2.ComponentProps<"div"> & VariantProps<typeof alertVariants>): JSX.Element;
7
+
8
+ export declare function AlertDescription({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
9
+
10
+ export declare function AlertTitle({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
11
+
12
+ declare const alertVariants: (props?: ({
13
+ variant?: "default" | "destructive" | null | undefined;
14
+ } & ClassProp) | undefined) => string;
15
+
16
+ export { }
package/dist/alert.mjs ADDED
@@ -0,0 +1,66 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { cva as i } from "class-variance-authority";
3
+ import { c as e } from "./utils-B7J70Nno.js";
4
+ const l = i(
5
+ "relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
6
+ {
7
+ variants: {
8
+ variant: {
9
+ default: "bg-card text-card-foreground",
10
+ destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"
11
+ }
12
+ },
13
+ defaultVariants: {
14
+ variant: "default"
15
+ }
16
+ }
17
+ );
18
+ function o({
19
+ className: t,
20
+ variant: r,
21
+ ...s
22
+ }) {
23
+ return /* @__PURE__ */ a(
24
+ "div",
25
+ {
26
+ "data-slot": "alert",
27
+ role: "alert",
28
+ className: e(l({ variant: r }), t),
29
+ ...s
30
+ }
31
+ );
32
+ }
33
+ function g({ className: t, ...r }) {
34
+ return /* @__PURE__ */ a(
35
+ "div",
36
+ {
37
+ "data-slot": "alert-title",
38
+ className: e(
39
+ "col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
40
+ t
41
+ ),
42
+ ...r
43
+ }
44
+ );
45
+ }
46
+ function u({
47
+ className: t,
48
+ ...r
49
+ }) {
50
+ return /* @__PURE__ */ a(
51
+ "div",
52
+ {
53
+ "data-slot": "alert-description",
54
+ className: e(
55
+ "text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
56
+ t
57
+ ),
58
+ ...r
59
+ }
60
+ );
61
+ }
62
+ export {
63
+ o as Alert,
64
+ u as AlertDescription,
65
+ g as AlertTitle
66
+ };
@@ -0,0 +1,6 @@
1
+ import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
2
+ import { JSX } from 'react/jsx-runtime';
3
+
4
+ export declare function AspectRatio({ ...props }: React.ComponentProps<typeof AspectRatioPrimitive.Root>): JSX.Element;
5
+
6
+ export { }
@@ -0,0 +1,10 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import * as i from "@radix-ui/react-aspect-ratio";
3
+ function a({
4
+ ...t
5
+ }) {
6
+ return /* @__PURE__ */ o(i.Root, { "data-slot": "aspect-ratio", ...t });
7
+ }
8
+ export {
9
+ a as AspectRatio
10
+ };
@@ -0,0 +1,11 @@
1
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
2
+ import { JSX } from 'react/jsx-runtime';
3
+ import * as React_2 from 'react';
4
+
5
+ export declare function Avatar({ className, ...props }: React_2.ComponentProps<typeof AvatarPrimitive.Root>): JSX.Element;
6
+
7
+ export declare function AvatarFallback({ className, ...props }: React_2.ComponentProps<typeof AvatarPrimitive.Fallback>): JSX.Element;
8
+
9
+ export declare function AvatarImage({ className, ...props }: React_2.ComponentProps<typeof AvatarPrimitive.Image>): JSX.Element;
10
+
11
+ export { }
@@ -0,0 +1,53 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import * as r from "@radix-ui/react-avatar";
3
+ import { c as l } from "./utils-B7J70Nno.js";
4
+ function i({
5
+ className: a,
6
+ ...t
7
+ }) {
8
+ return /* @__PURE__ */ e(
9
+ r.Root,
10
+ {
11
+ "data-slot": "avatar",
12
+ className: l(
13
+ "relative flex size-8 shrink-0 overflow-hidden rounded-full",
14
+ a
15
+ ),
16
+ ...t
17
+ }
18
+ );
19
+ }
20
+ function n({
21
+ className: a,
22
+ ...t
23
+ }) {
24
+ return /* @__PURE__ */ e(
25
+ r.Image,
26
+ {
27
+ "data-slot": "avatar-image",
28
+ className: l("aspect-square size-full", a),
29
+ ...t
30
+ }
31
+ );
32
+ }
33
+ function f({
34
+ className: a,
35
+ ...t
36
+ }) {
37
+ return /* @__PURE__ */ e(
38
+ r.Fallback,
39
+ {
40
+ "data-slot": "avatar-fallback",
41
+ className: l(
42
+ "bg-muted flex size-full items-center justify-center rounded-full",
43
+ a
44
+ ),
45
+ ...t
46
+ }
47
+ );
48
+ }
49
+ export {
50
+ i as Avatar,
51
+ f as AvatarFallback,
52
+ n as AvatarImage
53
+ };
@@ -0,0 +1,14 @@
1
+ import { ClassProp } from 'class-variance-authority/types';
2
+ import { JSX } from 'react/jsx-runtime';
3
+ import * as React_2 from 'react';
4
+ import { VariantProps } from 'class-variance-authority';
5
+
6
+ export declare function Badge({ className, variant, asChild, ...props }: React_2.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
7
+ asChild?: boolean;
8
+ }): JSX.Element;
9
+
10
+ export declare const badgeVariants: (props?: ({
11
+ variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
12
+ } & ClassProp) | undefined) => string;
13
+
14
+ export { }
package/dist/badge.mjs ADDED
@@ -0,0 +1,39 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { Slot as o } from "@radix-ui/react-slot";
3
+ import { cva as n } from "class-variance-authority";
4
+ import { c as s } from "./utils-B7J70Nno.js";
5
+ const d = n(
6
+ "inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
7
+ {
8
+ variants: {
9
+ variant: {
10
+ default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
11
+ secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
12
+ destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
13
+ outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
14
+ }
15
+ },
16
+ defaultVariants: {
17
+ variant: "default"
18
+ }
19
+ }
20
+ );
21
+ function b({
22
+ className: r,
23
+ variant: e,
24
+ asChild: t = !1,
25
+ ...i
26
+ }) {
27
+ return /* @__PURE__ */ a(
28
+ t ? o : "span",
29
+ {
30
+ "data-slot": "badge",
31
+ className: s(d({ variant: e }), r),
32
+ ...i
33
+ }
34
+ );
35
+ }
36
+ export {
37
+ b as Badge,
38
+ d as badgeVariants
39
+ };
@@ -0,0 +1,20 @@
1
+ import { JSX } from 'react/jsx-runtime';
2
+ import * as React_2 from 'react';
3
+
4
+ export declare function Breadcrumb({ ...props }: React_2.ComponentProps<"nav">): JSX.Element;
5
+
6
+ export declare function BreadcrumbEllipsis({ className, ...props }: React_2.ComponentProps<"span">): JSX.Element;
7
+
8
+ export declare function BreadcrumbItem({ className, ...props }: React_2.ComponentProps<"li">): JSX.Element;
9
+
10
+ export declare function BreadcrumbLink({ asChild, className, ...props }: React_2.ComponentProps<"a"> & {
11
+ asChild?: boolean;
12
+ }): JSX.Element;
13
+
14
+ export declare function BreadcrumbList({ className, ...props }: React_2.ComponentProps<"ol">): JSX.Element;
15
+
16
+ export declare function BreadcrumbPage({ className, ...props }: React_2.ComponentProps<"span">): JSX.Element;
17
+
18
+ export declare function BreadcrumbSeparator({ children, className, ...props }: React_2.ComponentProps<"li">): JSX.Element;
19
+
20
+ export { }