@mzc-fe/design-system 0.0.1 → 0.0.2

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 (219) hide show
  1. package/dist/components/accordion.d.ts +7 -0
  2. package/dist/components/alert-dialog.d.ts +14 -0
  3. package/dist/components/alert.d.ts +9 -0
  4. package/dist/components/aspect-ratio.d.ts +3 -0
  5. package/dist/components/avatar.d.ts +6 -0
  6. package/dist/components/badge.d.ts +9 -0
  7. package/dist/components/breadcrumb.d.ts +11 -0
  8. package/dist/components/button-group.d.ts +11 -0
  9. package/dist/components/button.d.ts +10 -0
  10. package/dist/components/calendar.d.ts +8 -0
  11. package/dist/components/card.d.ts +9 -0
  12. package/dist/components/carousel.d.ts +19 -0
  13. package/dist/components/chart.d.ts +40 -0
  14. package/dist/components/checkbox.d.ts +4 -0
  15. package/dist/components/collapsible.d.ts +5 -0
  16. package/dist/components/command.d.ts +18 -0
  17. package/dist/components/context-menu.d.ts +25 -0
  18. package/dist/components/dialog.d.ts +15 -0
  19. package/dist/components/drawer.d.ts +13 -0
  20. package/dist/components/dropdown-menu.d.ts +25 -0
  21. package/dist/components/empty.d.ts +11 -0
  22. package/dist/components/field.d.ts +24 -0
  23. package/dist/components/form.d.ts +24 -0
  24. package/dist/components/hover-card.d.ts +6 -0
  25. package/dist/components/input-group.d.ts +16 -0
  26. package/dist/components/input-otp.d.ts +11 -0
  27. package/dist/components/input.d.ts +3 -0
  28. package/dist/components/item.d.ts +23 -0
  29. package/dist/components/kbd.d.ts +3 -0
  30. package/dist/components/label.d.ts +4 -0
  31. package/dist/components/menubar.d.ts +26 -0
  32. package/dist/components/navigation-menu.d.ts +14 -0
  33. package/dist/components/pagination.d.ts +13 -0
  34. package/dist/components/popover.d.ts +7 -0
  35. package/dist/components/progress.d.ts +4 -0
  36. package/dist/components/radio-group.d.ts +5 -0
  37. package/dist/components/resizable.d.ts +8 -0
  38. package/dist/components/scroll-area.d.ts +5 -0
  39. package/dist/components/select.d.ts +15 -0
  40. package/dist/components/separator.d.ts +4 -0
  41. package/dist/components/sheet.d.ts +13 -0
  42. package/dist/components/sidebar.d.ts +69 -0
  43. package/dist/components/skeleton.d.ts +2 -0
  44. package/dist/components/slider.d.ts +4 -0
  45. package/dist/components/sonner.d.ts +3 -0
  46. package/dist/components/spinner.d.ts +2 -0
  47. package/dist/components/switch.d.ts +4 -0
  48. package/dist/components/table.d.ts +10 -0
  49. package/dist/components/tabs.d.ts +7 -0
  50. package/dist/components/textarea.d.ts +3 -0
  51. package/dist/components/toggle-group.d.ts +9 -0
  52. package/dist/components/toggle.d.ts +9 -0
  53. package/dist/components/tooltip.d.ts +7 -0
  54. package/dist/design-system.css +1 -0
  55. package/dist/design-system.es.js +30200 -0
  56. package/dist/design-system.umd.js +260 -0
  57. package/dist/foundations/ThemeProvider.d.ts +13 -0
  58. package/dist/hooks/use-mobile.d.ts +1 -0
  59. package/dist/index.d.ts +54 -0
  60. package/dist/lib/utils.d.ts +2 -0
  61. package/package.json +14 -1
  62. package/.husky/pre-push +0 -21
  63. package/.storybook/main.ts +0 -11
  64. package/.storybook/preview.tsx +0 -30
  65. package/.vscode/settings.json +0 -12
  66. package/.vscode/tailwind.json +0 -105
  67. package/bitbucket-pipelines.yml +0 -50
  68. package/components.json +0 -21
  69. package/eslint.config.js +0 -38
  70. package/src/components/accordion.stories.tsx +0 -258
  71. package/src/components/accordion.test.tsx +0 -390
  72. package/src/components/accordion.tsx +0 -64
  73. package/src/components/alert-dialog.stories.tsx +0 -213
  74. package/src/components/alert-dialog.test.tsx +0 -80
  75. package/src/components/alert-dialog.tsx +0 -155
  76. package/src/components/alert.stories.tsx +0 -84
  77. package/src/components/alert.test.tsx +0 -35
  78. package/src/components/alert.tsx +0 -66
  79. package/src/components/aspect-ratio.stories.tsx +0 -97
  80. package/src/components/aspect-ratio.test.tsx +0 -47
  81. package/src/components/aspect-ratio.tsx +0 -11
  82. package/src/components/avatar.stories.tsx +0 -76
  83. package/src/components/avatar.test.tsx +0 -50
  84. package/src/components/avatar.tsx +0 -51
  85. package/src/components/badge.stories.tsx +0 -64
  86. package/src/components/badge.test.tsx +0 -34
  87. package/src/components/badge.tsx +0 -46
  88. package/src/components/breadcrumb.stories.tsx +0 -86
  89. package/src/components/breadcrumb.test.tsx +0 -74
  90. package/src/components/breadcrumb.tsx +0 -109
  91. package/src/components/button-group.stories.tsx +0 -62
  92. package/src/components/button-group.tsx +0 -83
  93. package/src/components/button.stories.tsx +0 -118
  94. package/src/components/button.test.tsx +0 -64
  95. package/src/components/button.tsx +0 -62
  96. package/src/components/calendar.stories.tsx +0 -81
  97. package/src/components/calendar.tsx +0 -220
  98. package/src/components/card.stories.tsx +0 -110
  99. package/src/components/card.test.tsx +0 -56
  100. package/src/components/card.tsx +0 -92
  101. package/src/components/carousel.stories.tsx +0 -90
  102. package/src/components/carousel.tsx +0 -239
  103. package/src/components/chart.tsx +0 -357
  104. package/src/components/checkbox.stories.tsx +0 -108
  105. package/src/components/checkbox.test.tsx +0 -67
  106. package/src/components/checkbox.tsx +0 -32
  107. package/src/components/collapsible.stories.tsx +0 -106
  108. package/src/components/collapsible.test.tsx +0 -92
  109. package/src/components/collapsible.tsx +0 -31
  110. package/src/components/command.stories.tsx +0 -90
  111. package/src/components/command.tsx +0 -182
  112. package/src/components/context-menu.stories.tsx +0 -63
  113. package/src/components/context-menu.tsx +0 -252
  114. package/src/components/dialog.stories.tsx +0 -128
  115. package/src/components/dialog.tsx +0 -141
  116. package/src/components/drawer.stories.tsx +0 -104
  117. package/src/components/drawer.tsx +0 -135
  118. package/src/components/dropdown-menu.stories.tsx +0 -97
  119. package/src/components/dropdown-menu.tsx +0 -255
  120. package/src/components/empty.stories.tsx +0 -90
  121. package/src/components/empty.test.tsx +0 -55
  122. package/src/components/empty.tsx +0 -104
  123. package/src/components/field.tsx +0 -246
  124. package/src/components/form.tsx +0 -168
  125. package/src/components/hover-card.stories.tsx +0 -66
  126. package/src/components/hover-card.tsx +0 -44
  127. package/src/components/input-group.stories.tsx +0 -57
  128. package/src/components/input-group.test.tsx +0 -40
  129. package/src/components/input-group.tsx +0 -170
  130. package/src/components/input-otp.stories.tsx +0 -94
  131. package/src/components/input-otp.test.tsx +0 -60
  132. package/src/components/input-otp.tsx +0 -75
  133. package/src/components/input.stories.tsx +0 -94
  134. package/src/components/input.test.tsx +0 -53
  135. package/src/components/input.tsx +0 -21
  136. package/src/components/item.tsx +0 -193
  137. package/src/components/kbd.stories.tsx +0 -100
  138. package/src/components/kbd.test.tsx +0 -28
  139. package/src/components/kbd.tsx +0 -28
  140. package/src/components/label.stories.tsx +0 -48
  141. package/src/components/label.test.tsx +0 -28
  142. package/src/components/label.tsx +0 -24
  143. package/src/components/menubar.tsx +0 -274
  144. package/src/components/navigation-menu.tsx +0 -168
  145. package/src/components/pagination.stories.tsx +0 -107
  146. package/src/components/pagination.tsx +0 -127
  147. package/src/components/popover.stories.tsx +0 -102
  148. package/src/components/popover.tsx +0 -48
  149. package/src/components/progress.stories.tsx +0 -76
  150. package/src/components/progress.test.tsx +0 -36
  151. package/src/components/progress.tsx +0 -29
  152. package/src/components/radio-group.stories.tsx +0 -73
  153. package/src/components/radio-group.test.tsx +0 -74
  154. package/src/components/radio-group.tsx +0 -45
  155. package/src/components/resizable.stories.tsx +0 -120
  156. package/src/components/resizable.tsx +0 -54
  157. package/src/components/scroll-area.stories.tsx +0 -64
  158. package/src/components/scroll-area.test.tsx +0 -46
  159. package/src/components/scroll-area.tsx +0 -58
  160. package/src/components/select.stories.tsx +0 -111
  161. package/src/components/select.test.tsx +0 -90
  162. package/src/components/select.tsx +0 -188
  163. package/src/components/separator.stories.tsx +0 -76
  164. package/src/components/separator.test.tsx +0 -24
  165. package/src/components/separator.tsx +0 -28
  166. package/src/components/sheet.stories.tsx +0 -122
  167. package/src/components/sheet.tsx +0 -137
  168. package/src/components/sidebar.tsx +0 -726
  169. package/src/components/skeleton.stories.tsx +0 -53
  170. package/src/components/skeleton.test.tsx +0 -24
  171. package/src/components/skeleton.tsx +0 -13
  172. package/src/components/slider.stories.tsx +0 -97
  173. package/src/components/slider.test.tsx +0 -49
  174. package/src/components/slider.tsx +0 -63
  175. package/src/components/sonner.stories.tsx +0 -96
  176. package/src/components/sonner.tsx +0 -38
  177. package/src/components/spinner.stories.tsx +0 -54
  178. package/src/components/spinner.test.tsx +0 -30
  179. package/src/components/spinner.tsx +0 -16
  180. package/src/components/switch.stories.tsx +0 -108
  181. package/src/components/switch.test.tsx +0 -62
  182. package/src/components/switch.tsx +0 -31
  183. package/src/components/table.stories.tsx +0 -139
  184. package/src/components/table.test.tsx +0 -85
  185. package/src/components/table.tsx +0 -114
  186. package/src/components/tabs.stories.tsx +0 -99
  187. package/src/components/tabs.test.tsx +0 -64
  188. package/src/components/tabs.tsx +0 -66
  189. package/src/components/textarea.stories.tsx +0 -89
  190. package/src/components/textarea.test.tsx +0 -53
  191. package/src/components/textarea.tsx +0 -18
  192. package/src/components/toggle-group.stories.tsx +0 -108
  193. package/src/components/toggle-group.test.tsx +0 -66
  194. package/src/components/toggle-group.tsx +0 -81
  195. package/src/components/toggle.stories.tsx +0 -98
  196. package/src/components/toggle.test.tsx +0 -42
  197. package/src/components/toggle.tsx +0 -45
  198. package/src/components/tooltip.stories.tsx +0 -111
  199. package/src/components/tooltip.tsx +0 -61
  200. package/src/foundations/README.md +0 -141
  201. package/src/foundations/ThemeProvider.tsx +0 -77
  202. package/src/foundations/color.css +0 -232
  203. package/src/foundations/color.stories.tsx +0 -719
  204. package/src/foundations/palette.css +0 -249
  205. package/src/foundations/spacing.css +0 -8
  206. package/src/foundations/typography.css +0 -143
  207. package/src/foundations/typography.stories.tsx +0 -17
  208. package/src/hooks/use-mobile.ts +0 -19
  209. package/src/index.css +0 -176
  210. package/src/index.ts +0 -336
  211. package/src/lib/utils.ts +0 -6
  212. package/src/test/setup.ts +0 -8
  213. package/src/vite-env.d.ts +0 -1
  214. package/tsconfig.app.json +0 -33
  215. package/tsconfig.json +0 -13
  216. package/tsconfig.node.json +0 -25
  217. package/vite.config.ts +0 -30
  218. package/vitest.config.ts +0 -25
  219. /package/{public → dist}/vite.svg +0 -0
@@ -0,0 +1,13 @@
1
+ export type Theme = string;
2
+ type ThemeProviderProps = {
3
+ children: React.ReactNode;
4
+ defaultTheme?: Theme;
5
+ storageKey?: string;
6
+ };
7
+ type ThemeProviderState = {
8
+ theme: Theme;
9
+ setTheme: (theme: Theme) => void;
10
+ };
11
+ export declare function ThemeProvider({ children, defaultTheme, storageKey, ...props }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare const useTheme: () => ThemeProviderState;
13
+ export {};
@@ -0,0 +1 @@
1
+ export declare function useIsMobile(): boolean;
@@ -0,0 +1,54 @@
1
+ export { ThemeProvider } from './foundations/ThemeProvider';
2
+ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent, } from './components/accordion';
3
+ export { Alert, AlertTitle, AlertDescription } from './components/alert';
4
+ export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, } from './components/alert-dialog';
5
+ export { AspectRatio } from './components/aspect-ratio';
6
+ export { Avatar, AvatarImage, AvatarFallback } from './components/avatar';
7
+ export { Badge, badgeVariants } from './components/badge';
8
+ export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, } from './components/breadcrumb';
9
+ export { Button, buttonVariants } from './components/button';
10
+ export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants, } from './components/button-group';
11
+ export { Calendar, CalendarDayButton } from './components/calendar';
12
+ export { type CarouselApi, Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, } from './components/carousel';
13
+ export { type ChartConfig, ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, } from './components/chart';
14
+ export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, } from './components/card';
15
+ export { Checkbox } from './components/checkbox';
16
+ export { Collapsible, CollapsibleTrigger, CollapsibleContent, } from './components/collapsible';
17
+ export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, } from './components/command';
18
+ export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, } from './components/context-menu';
19
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, } from './components/dialog';
20
+ export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, } from './components/drawer';
21
+ export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, } from './components/dropdown-menu';
22
+ export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia, } from './components/empty';
23
+ export { Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparator, FieldSet, FieldContent, FieldTitle, } from './components/field';
24
+ export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, } from './components/form';
25
+ export { HoverCard, HoverCardTrigger, HoverCardContent, } from './components/hover-card';
26
+ export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InputGroupInput, InputGroupTextarea, } from './components/input-group';
27
+ export { Input } from './components/input';
28
+ export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator, } from './components/input-otp';
29
+ export { Item, ItemMedia, ItemContent, ItemActions, ItemGroup, ItemSeparator, ItemTitle, ItemDescription, ItemHeader, ItemFooter, } from './components/item';
30
+ export { Kbd, KbdGroup } from './components/kbd';
31
+ export { Label } from './components/label';
32
+ export { Menubar, MenubarPortal, MenubarMenu, MenubarTrigger, MenubarContent, MenubarGroup, MenubarSeparator, MenubarLabel, MenubarItem, MenubarShortcut, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarSub, MenubarSubTrigger, MenubarSubContent, } from './components/menubar';
33
+ export { NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, navigationMenuTriggerStyle, } from './components/navigation-menu';
34
+ export { Pagination, PaginationContent, PaginationLink, PaginationItem, PaginationPrevious, PaginationNext, PaginationEllipsis, } from './components/pagination';
35
+ export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, } from './components/popover';
36
+ export { Progress } from './components/progress';
37
+ export { RadioGroup, RadioGroupItem } from './components/radio-group';
38
+ export { ResizablePanelGroup, ResizablePanel, ResizableHandle, } from './components/resizable';
39
+ export { ScrollArea, ScrollBar } from './components/scroll-area';
40
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, } from './components/select';
41
+ export { Separator } from './components/separator';
42
+ export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, } from './components/sheet';
43
+ export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, } from './components/sidebar';
44
+ export { Skeleton } from './components/skeleton';
45
+ export { Slider } from './components/slider';
46
+ export { Toaster } from './components/sonner';
47
+ export { Spinner } from './components/spinner';
48
+ export { Switch } from './components/switch';
49
+ export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, } from './components/table';
50
+ export { Tabs, TabsList, TabsTrigger, TabsContent } from './components/tabs';
51
+ export { Textarea } from './components/textarea';
52
+ export { Toggle, toggleVariants } from './components/toggle';
53
+ export { ToggleGroup, ToggleGroupItem } from './components/toggle-group';
54
+ export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider, } from './components/tooltip';
@@ -0,0 +1,2 @@
1
+ import { ClassValue } from 'clsx';
2
+ export declare function cn(...inputs: ClassValue[]): string;
package/package.json CHANGED
@@ -1,10 +1,22 @@
1
1
  {
2
2
  "name": "@mzc-fe/design-system",
3
3
  "private": false,
4
- "version": "0.0.1",
4
+ "version": "0.0.2",
5
5
  "type": "module",
6
6
  "main": "./dist/design-system.umd.js",
7
7
  "module": "./dist/design-system.es.js",
8
+ "files": [
9
+ "dist/"
10
+ ],
11
+ "types": "./dist/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/design-system.es.js",
16
+ "require": "./dist/design-system.umd.js"
17
+ },
18
+ "./dist/design-system.css": "./dist/design-system.css"
19
+ },
8
20
  "scripts": {
9
21
  "build": "tsc -b && vite build",
10
22
  "lint": "eslint .",
@@ -94,6 +106,7 @@
94
106
  "typescript": "~5.8.3",
95
107
  "typescript-eslint": "^8.39.1",
96
108
  "vite": "^7.1.2",
109
+ "vite-plugin-dts": "^4.5.4",
97
110
  "vitest": "^4.0.15"
98
111
  }
99
112
  }
package/.husky/pre-push DELETED
@@ -1,21 +0,0 @@
1
- #!/bin/sh
2
-
3
- echo "Running pre-push checks..."
4
-
5
- # Run TypeScript compilation
6
- echo "Running TypeScript compilation..."
7
- yarn tsc
8
- if [ $? -ne 0 ]; then
9
- echo "TypeScript compilation failed. Push aborted."
10
- exit 1
11
- fi
12
-
13
- # Run unit tests
14
- echo "Running unit tests..."
15
- yarn test
16
- if [ $? -ne 0 ]; then
17
- echo "Unit tests failed. Push aborted."
18
- exit 1
19
- fi
20
-
21
- exit 0
@@ -1,11 +0,0 @@
1
- import type { StorybookConfig } from "@storybook/react-vite";
2
-
3
- const config: StorybookConfig = {
4
- stories: ["../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
5
- addons: [],
6
- framework: {
7
- name: "@storybook/react-vite",
8
- options: {},
9
- },
10
- };
11
- export default config;
@@ -1,30 +0,0 @@
1
- import type { Preview } from "@storybook/react-vite";
2
- import { ThemeProvider } from "../src/foundations/ThemeProvider";
3
- import "../src/index.css";
4
-
5
- const preview: Preview = {
6
- parameters: {
7
- controls: {
8
- matchers: {
9
- color: /(background|color)$/i,
10
- date: /Date$/i,
11
- },
12
- },
13
- options: {
14
- storySort: {
15
- order: ["Foundations", "Components"],
16
- },
17
- },
18
- },
19
- decorators: [
20
- (Story) => {
21
- return (
22
- <ThemeProvider>
23
- <Story />
24
- </ThemeProvider>
25
- );
26
- },
27
- ],
28
- };
29
-
30
- export default preview;
@@ -1,12 +0,0 @@
1
- {
2
- "css.customData": [".vscode/tailwind.json"],
3
-
4
- "editor.defaultFormatter": "esbenp.prettier-vscode",
5
- "editor.formatOnSave": true,
6
- "editor.tabSize": 2,
7
-
8
- "editor.codeActionsOnSave": {
9
- "source.fixAll.eslint": "explicit"
10
- },
11
- "typescript.tsdk": "node_modules/typescript/lib"
12
- }
@@ -1,105 +0,0 @@
1
- {
2
- "version": 4.0,
3
- "atDirectives": [
4
- {
5
- "name": "@import",
6
- "description": "Use the `@import` directive to inline import CSS files, including Tailwind itself.",
7
- "references": [
8
- {
9
- "name": "Tailwind Documentation",
10
- "url": "https://tailwindcss.com/docs/functions-and-directives#import-directive"
11
- }
12
- ]
13
- },
14
- {
15
- "name": "@theme",
16
- "description": "Use the `@theme` directive to define your project's custom design tokens, like fonts, colors, and breakpoints.",
17
- "references": [
18
- {
19
- "name": "Tailwind Documentation",
20
- "url": "https://tailwindcss.com/docs/functions-and-directives#theme-directive"
21
- }
22
- ]
23
- },
24
- {
25
- "name": "@source",
26
- "description": "Use the `@source` directive to explicitly specify source files that aren't picked up by Tailwind's automatic content detection.",
27
- "references": [
28
- {
29
- "name": "Tailwind Documentation",
30
- "url": "https://tailwindcss.com/docs/functions-and-directives#source-directive"
31
- }
32
- ]
33
- },
34
- {
35
- "name": "@utility",
36
- "description": "Use the `@utility` directive to add custom utilities to your project that work with variants like `hover`, `focus` and `lg`.",
37
- "references": [
38
- {
39
- "name": "Tailwind Documentation",
40
- "url": "https://tailwindcss.com/docs/functions-and-directives#utility-directive"
41
- }
42
- ]
43
- },
44
- {
45
- "name": "@variant",
46
- "description": "Use the `@variant` directive to apply a Tailwind variant to styles in your CSS. If you need to apply multiple variants at the same time, use nesting.",
47
- "references": [
48
- {
49
- "name": "Tailwind Documentation",
50
- "url": "https://tailwindcss.com/docs/functions-and-directives#variant-directive"
51
- }
52
- ]
53
- },
54
- {
55
- "name": "@custom-variant",
56
- "description": "Use the `@custom-variant` directive to add a custom variant in your project. This lets you write utilities like `pointer-coarse:size-48` and `theme-midnight:bg-slate-900`.",
57
- "references": [
58
- {
59
- "name": "Tailwind Documentation",
60
- "url": "https://tailwindcss.com/docs/functions-and-directives#custom-variant-directive"
61
- }
62
- ]
63
- },
64
- {
65
- "name": "@apply",
66
- "description": "Use the `@apply` directive to inline any existing utility classes into your own custom CSS. This is useful when you need to write custom CSS (like to override the styles in a third-party library) but still want to work with your design tokens and use the same syntax you’re used to using in your HTML.",
67
- "references": [
68
- {
69
- "name": "Tailwind Documentation",
70
- "url": "https://tailwindcss.com/docs/functions-and-directives#apply-directive"
71
- }
72
- ]
73
- },
74
- {
75
- "name": "@reference",
76
- "description": "If you want to use `@apply` or `@variant` in the `<style>` block of a Vue or Svelte component, or within CSS modules, you will need to import your theme variables, custom utilities, and custom variants to make those values available in that context. To do this without duplicating any CSS in your output, use the `@reference` directive to import your main stylesheet for reference without actually including the styles.",
77
- "references": [
78
- {
79
- "name": "Tailwind Documentation",
80
- "url": "https://tailwindcss.com/docs/functions-and-directives#reference-directive"
81
- }
82
- ]
83
- },
84
- {
85
- "name": "@config",
86
- "description": "Use the `@config` directive to load a legacy JavaScript-based configuration file.",
87
- "references": [
88
- {
89
- "name": "Tailwind Documentation",
90
- "url": "https://tailwindcss.com/docs/functions-and-directives#config-directive"
91
- }
92
- ]
93
- },
94
- {
95
- "name": "@plugin",
96
- "description": "Use the `@plugin` directive to load a Javascript-based plugin. The `@plugin` directive accepts either a package name or a local path.",
97
- "references": [
98
- {
99
- "name": "Tailwind Documentation",
100
- "url": "https://tailwindcss.com/docs/functions-and-directives#plugin-directive"
101
- }
102
- ]
103
- }
104
- ]
105
- }
@@ -1,50 +0,0 @@
1
- # Template npm-publish
2
-
3
- # This template allows you to publish your npm package, as defined in package.json, to npmjs.com or any other npm-like registry.
4
- # The workflow allows running tests, code linting and security scans on feature branches (as well as master).
5
- # The npm package will be validated and published after the code is merged to master.
6
-
7
- # Prerequisites: $NPM_TOKEN setup in the Deployment variables.
8
- # For advanced cases, please, follow examples from the pipe's README https://bitbucket.org/atlassian/npm-publish/src/master/README.md
9
-
10
- image: node:20
11
-
12
- pipelines:
13
- custom:
14
- npm_publish:
15
- - variables:
16
- - name: Version
17
- default: patch
18
- description: Select type of publish
19
- allowed-values:
20
- - patch
21
- - minor
22
- - major
23
- - rc
24
- - step:
25
- name: Install
26
- caches:
27
- - node
28
- script:
29
- - yarn install --frozen-lockfile
30
- - yarn build
31
- artifacts:
32
- - dist/**
33
- - step:
34
- name: Deploy to npm
35
- deployment: Production
36
- script:
37
- # Script 내에서 Version 체크 및 설정
38
- - |
39
- if [ "$Version" = "rc" ]; then
40
- npm version prerelease --preid=rc -m "publish v%s [skip ci]"
41
- export NPM_TAG="rc"
42
- else
43
- npm version $Version -m "publish v%s [skip ci]"
44
- export NPM_TAG="latest"
45
- fi
46
- - pipe: atlassian/npm-publish:0.3.2
47
- variables:
48
- ACCESS: "public"
49
- NPM_TOKEN: $NPM_TOKEN
50
- TAG: $NPM_TAG
package/components.json DELETED
@@ -1,21 +0,0 @@
1
- {
2
- "$schema": "https://ui.shadcn.com/schema.json",
3
- "style": "new-york",
4
- "rsc": false,
5
- "tsx": true,
6
- "tailwind": {
7
- "config": "",
8
- "css": "src/index.css",
9
- "baseColor": "neutral",
10
- "cssVariables": true,
11
- "prefix": ""
12
- },
13
- "iconLibrary": "lucide",
14
- "aliases": {
15
- "components": "@/components",
16
- "utils": "@/lib/utils",
17
- "lib": "@/lib",
18
- "hooks": "@/hooks"
19
- },
20
- "registries": {}
21
- }
package/eslint.config.js DELETED
@@ -1,38 +0,0 @@
1
- // For more info, see https://github.com/storybookjs/eslint-plugin-storybook#configuration-flat-config-format
2
- import storybook from "eslint-plugin-storybook";
3
-
4
- import js from "@eslint/js";
5
- import globals from "globals";
6
- import reactHooks from "eslint-plugin-react-hooks";
7
- import reactRefresh from "eslint-plugin-react-refresh";
8
- import tseslint from "typescript-eslint";
9
- import { defineConfig, globalIgnores } from "eslint/config";
10
-
11
- export default defineConfig(
12
- [
13
- globalIgnores(["dist"]),
14
- {
15
- files: ["**/*.{ts,tsx}"],
16
- extends: [
17
- js.configs.recommended,
18
- tseslint.configs.recommended,
19
- reactHooks.configs["recommended-latest"],
20
- reactRefresh.configs.vite,
21
- ],
22
- languageOptions: {
23
- ecmaVersion: 2020,
24
- globals: globals.browser,
25
- },
26
- rules: {
27
- "react-refresh/only-export-components": "warn",
28
- "react-hooks/exhaustive-deps": [
29
- "warn",
30
- {
31
- enableDangerousAutofixThisMayCauseInfiniteLoops: true,
32
- },
33
- ],
34
- },
35
- },
36
- ],
37
- storybook.configs["flat/recommended"]
38
- );
@@ -1,258 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react-vite";
2
- import {
3
- Accordion,
4
- AccordionItem,
5
- AccordionTrigger,
6
- AccordionContent,
7
- } from "./accordion";
8
-
9
- const meta = {
10
- title: "Components/Accordion",
11
- component: Accordion,
12
- parameters: {
13
- layout: "padded",
14
- },
15
- tags: ["autodocs"],
16
- argTypes: {
17
- type: {
18
- control: "select",
19
- options: ["single", "multiple"],
20
- description:
21
- "The type of accordion. 'single' allows only one item open at a time, 'multiple' allows multiple items open.",
22
- table: {
23
- type: { summary: '"single" | "multiple"' },
24
- defaultValue: { summary: '"single"' },
25
- },
26
- },
27
- collapsible: {
28
- control: "boolean",
29
- description:
30
- "When type is 'single', allows closing the opened item by clicking it again.",
31
- table: {
32
- type: { summary: "boolean" },
33
- defaultValue: { summary: "false" },
34
- },
35
- },
36
- defaultValue: {
37
- control: "text",
38
- description:
39
- "The default value(s) of the accordion item(s) that should be open.",
40
- table: {
41
- type: { summary: "string | string[]" },
42
- },
43
- },
44
- value: {
45
- control: "text",
46
- description:
47
- "The controlled value(s) of the accordion item(s) that should be open.",
48
- table: {
49
- type: { summary: "string | string[]" },
50
- },
51
- },
52
- disabled: {
53
- control: "boolean",
54
- description: "Disables all accordion items.",
55
- table: {
56
- type: { summary: "boolean" },
57
- defaultValue: { summary: "false" },
58
- },
59
- },
60
- className: {
61
- control: "text",
62
- description: "Additional CSS classes to apply to the accordion.",
63
- table: {
64
- type: { summary: "string" },
65
- },
66
- },
67
- },
68
- } satisfies Meta<typeof Accordion>;
69
-
70
- export default meta;
71
- type Story = StoryObj<typeof meta>;
72
-
73
- export const Default: Story = {
74
- args: {
75
- type: "single",
76
- collapsible: true,
77
- className: "w-full",
78
- },
79
- render: (args) => (
80
- <Accordion {...args}>
81
- <AccordionItem value="item-1">
82
- <AccordionTrigger>Is it accessible?</AccordionTrigger>
83
- <AccordionContent>
84
- Yes. It adheres to the WAI-ARIA design pattern and is fully
85
- accessible.
86
- </AccordionContent>
87
- </AccordionItem>
88
- <AccordionItem value="item-2">
89
- <AccordionTrigger>Is it styled?</AccordionTrigger>
90
- <AccordionContent>
91
- Yes. It comes with default styles that match the other components'
92
- aesthetic.
93
- </AccordionContent>
94
- </AccordionItem>
95
- <AccordionItem value="item-3">
96
- <AccordionTrigger>Is it animated?</AccordionTrigger>
97
- <AccordionContent>
98
- Yes. It's animated by default, but you can disable it if you prefer.
99
- </AccordionContent>
100
- </AccordionItem>
101
- </Accordion>
102
- ),
103
- };
104
-
105
- export const Multiple: Story = {
106
- args: {
107
- type: "multiple",
108
- className: "w-full",
109
- },
110
- argTypes: {
111
- type: {
112
- table: {
113
- disable: true,
114
- },
115
- },
116
- collapsible: {
117
- table: {
118
- disable: true,
119
- },
120
- },
121
- },
122
- render: (args) => (
123
- <Accordion {...args}>
124
- <AccordionItem value="item-1">
125
- <AccordionTrigger>Can I open multiple items?</AccordionTrigger>
126
- <AccordionContent>
127
- Yes! With the "multiple" type, you can have multiple items open at the
128
- same time.
129
- </AccordionContent>
130
- </AccordionItem>
131
- <AccordionItem value="item-2">
132
- <AccordionTrigger>How does it work?</AccordionTrigger>
133
- <AccordionContent>
134
- Each accordion item can be independently opened or closed, allowing
135
- users to view multiple sections simultaneously.
136
- </AccordionContent>
137
- </AccordionItem>
138
- <AccordionItem value="item-3">
139
- <AccordionTrigger>What are the use cases?</AccordionTrigger>
140
- <AccordionContent>
141
- This is useful for FAQ sections, settings panels, or any content where
142
- users might want to compare information across different sections.
143
- </AccordionContent>
144
- </AccordionItem>
145
- </Accordion>
146
- ),
147
- };
148
-
149
- export const SingleItem: Story = {
150
- args: {
151
- type: "single",
152
- collapsible: true,
153
- className: "w-full",
154
- },
155
- argTypes: {
156
- type: {
157
- table: {
158
- disable: true,
159
- },
160
- },
161
- },
162
- render: (args) => (
163
- <Accordion {...args}>
164
- <AccordionItem value="item-1">
165
- <AccordionTrigger>What is this component?</AccordionTrigger>
166
- <AccordionContent>
167
- This is an accordion component built with Radix UI. It provides a
168
- collapsible content area that can be toggled open and closed.
169
- </AccordionContent>
170
- </AccordionItem>
171
- </Accordion>
172
- ),
173
- };
174
-
175
- export const LongContent: Story = {
176
- args: {
177
- type: "single",
178
- collapsible: true,
179
- className: "w-full",
180
- },
181
- argTypes: {
182
- type: {
183
- table: {
184
- disable: true,
185
- },
186
- },
187
- },
188
- render: (args) => (
189
- <Accordion {...args}>
190
- <AccordionItem value="item-1">
191
- <AccordionTrigger>Item with long content</AccordionTrigger>
192
- <AccordionContent>
193
- <div className="space-y-2">
194
- <p>
195
- This accordion item contains longer content to demonstrate how the
196
- component handles text that spans multiple lines or paragraphs.
197
- </p>
198
- <p>
199
- The content area will expand to accommodate the full text, and the
200
- animation will smoothly transition between the collapsed and
201
- expanded states.
202
- </p>
203
- <p>
204
- This is useful for displaying detailed information, descriptions,
205
- or any content that requires more space than a simple one-liner.
206
- </p>
207
- <ul className="list-disc list-inside space-y-1 ml-4">
208
- <li>First bullet point</li>
209
- <li>Second bullet point</li>
210
- <li>Third bullet point</li>
211
- </ul>
212
- </div>
213
- </AccordionContent>
214
- </AccordionItem>
215
- <AccordionItem value="item-2">
216
- <AccordionTrigger>Another item</AccordionTrigger>
217
- <AccordionContent>
218
- This is a shorter content example to show the contrast between items
219
- with different content lengths.
220
- </AccordionContent>
221
- </AccordionItem>
222
- </Accordion>
223
- ),
224
- };
225
-
226
- export const WithCustomStyling: Story = {
227
- args: {
228
- type: "single",
229
- collapsible: true,
230
- className: "w-full max-w-2xl",
231
- },
232
- argTypes: {
233
- type: {
234
- table: {
235
- disable: true,
236
- },
237
- },
238
- },
239
- render: (args) => (
240
- <Accordion {...args}>
241
- <AccordionItem value="item-1" className="border-2 border-primary/20">
242
- <AccordionTrigger className="text-lg font-semibold">
243
- Custom styled item
244
- </AccordionTrigger>
245
- <AccordionContent className="text-base">
246
- This accordion item has custom styling applied to demonstrate how you
247
- can customize the appearance of individual items.
248
- </AccordionContent>
249
- </AccordionItem>
250
- <AccordionItem value="item-2">
251
- <AccordionTrigger>Default styled item</AccordionTrigger>
252
- <AccordionContent>
253
- This item uses the default styling for comparison.
254
- </AccordionContent>
255
- </AccordionItem>
256
- </Accordion>
257
- ),
258
- };