Add library entry point and package exports for consumption
Add src/index.ts barrel export re-exporting all components, types, and
utilities. Configure package.json with main, exports (root, tokens,
utils), peerDependencies for react/react-dom, and bump to 0.1.0.
Consumers can now install via local path and import directly:
import { Button, AppShell, cn } from 'ads3-design-system'
import 'ads3-design-system/tokens'
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
12
package.json
12
package.json
@@ -1,8 +1,14 @@
|
|||||||
{
|
{
|
||||||
"name": "ads3-design-system",
|
"name": "ads3-design-system",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.0",
|
"version": "0.1.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
"main": "./src/index.ts",
|
||||||
|
"exports": {
|
||||||
|
".": "./src/index.ts",
|
||||||
|
"./tokens": "./src/tokens/tokens.css",
|
||||||
|
"./utils": "./src/lib/utils.ts"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "tsc -b && vite build",
|
"build": "tsc -b && vite build",
|
||||||
@@ -11,6 +17,10 @@
|
|||||||
"storybook": "storybook dev -p 6006",
|
"storybook": "storybook dev -p 6006",
|
||||||
"build-storybook": "storybook build"
|
"build-storybook": "storybook build"
|
||||||
},
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"react": "^19.0.0",
|
||||||
|
"react-dom": "^19.0.0"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@floating-ui/react": "^0.27.19",
|
"@floating-ui/react": "^0.27.19",
|
||||||
"@fontsource-variable/public-sans": "^5.2.7",
|
"@fontsource-variable/public-sans": "^5.2.7",
|
||||||
|
|||||||
143
src/index.ts
Normal file
143
src/index.ts
Normal file
@@ -0,0 +1,143 @@
|
|||||||
|
// Utilities
|
||||||
|
export { cn } from './lib/utils'
|
||||||
|
|
||||||
|
// Atoms
|
||||||
|
export { Button } from './components/atoms/Button'
|
||||||
|
export type { ButtonProps } from './components/atoms/Button'
|
||||||
|
|
||||||
|
export { IconButton } from './components/atoms/IconButton'
|
||||||
|
export type { IconButtonProps } from './components/atoms/IconButton'
|
||||||
|
|
||||||
|
export { Input } from './components/atoms/Input'
|
||||||
|
export type { InputProps } from './components/atoms/Input'
|
||||||
|
|
||||||
|
export { Textarea } from './components/atoms/Textarea'
|
||||||
|
export type { TextareaProps } from './components/atoms/Textarea'
|
||||||
|
|
||||||
|
export { Select } from './components/atoms/Select'
|
||||||
|
export type { SelectProps, SelectOption } from './components/atoms/Select'
|
||||||
|
|
||||||
|
export { Autocomplete } from './components/atoms/Autocomplete'
|
||||||
|
export type { AutocompleteProps, AutocompleteOption } from './components/atoms/Autocomplete'
|
||||||
|
|
||||||
|
export { Checkbox } from './components/atoms/Checkbox'
|
||||||
|
export type { CheckboxProps } from './components/atoms/Checkbox'
|
||||||
|
|
||||||
|
export { Radio, RadioGroup } from './components/atoms/Radio'
|
||||||
|
export type { RadioProps, RadioGroupProps } from './components/atoms/Radio'
|
||||||
|
|
||||||
|
export { Switch } from './components/atoms/Switch'
|
||||||
|
export type { SwitchProps } from './components/atoms/Switch'
|
||||||
|
|
||||||
|
export { Slider, RangeSlider } from './components/atoms/Slider'
|
||||||
|
export type { SliderProps, RangeSliderProps } from './components/atoms/Slider'
|
||||||
|
|
||||||
|
export { FileInput } from './components/atoms/FileInput'
|
||||||
|
export type { FileInputProps } from './components/atoms/FileInput'
|
||||||
|
|
||||||
|
export { Badge } from './components/atoms/Badge'
|
||||||
|
export type { BadgeProps } from './components/atoms/Badge'
|
||||||
|
|
||||||
|
export { Tag } from './components/atoms/Tag'
|
||||||
|
export type { TagProps, TagColor } from './components/atoms/Tag'
|
||||||
|
|
||||||
|
export { Chip } from './components/atoms/Chip'
|
||||||
|
export type { ChipProps, ChipColor } from './components/atoms/Chip'
|
||||||
|
|
||||||
|
export { Tabs, TabList, Tab, TabPanel } from './components/atoms/Tabs'
|
||||||
|
export type { TabsProps, TabListProps, TabProps, TabPanelProps } from './components/atoms/Tabs'
|
||||||
|
|
||||||
|
export { List, ListItem, ListSubheader, ListDivider } from './components/atoms/List'
|
||||||
|
export type { ListProps, ListItemProps, ListSubheaderProps, ListDividerProps } from './components/atoms/List'
|
||||||
|
|
||||||
|
export { Avatar } from './components/atoms/Avatar'
|
||||||
|
export type { AvatarProps } from './components/atoms/Avatar'
|
||||||
|
|
||||||
|
export { Tooltip } from './components/atoms/Tooltip'
|
||||||
|
export type { TooltipProps } from './components/atoms/Tooltip'
|
||||||
|
|
||||||
|
// Molecules
|
||||||
|
export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from './components/molecules/Card'
|
||||||
|
export type {
|
||||||
|
CardProps,
|
||||||
|
CardHeaderProps,
|
||||||
|
CardTitleProps,
|
||||||
|
CardDescriptionProps,
|
||||||
|
CardContentProps,
|
||||||
|
CardFooterProps,
|
||||||
|
} from './components/molecules/Card'
|
||||||
|
|
||||||
|
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from './components/molecules/Accordion'
|
||||||
|
export type {
|
||||||
|
AccordionProps,
|
||||||
|
AccordionItemProps,
|
||||||
|
AccordionTriggerProps,
|
||||||
|
AccordionContentProps,
|
||||||
|
} from './components/molecules/Accordion'
|
||||||
|
|
||||||
|
export { Alert } from './components/molecules/Alert'
|
||||||
|
export type { AlertProps, AlertVariant } from './components/molecules/Alert'
|
||||||
|
|
||||||
|
export {
|
||||||
|
Dialog,
|
||||||
|
DialogHeader,
|
||||||
|
DialogTitle,
|
||||||
|
DialogDescription,
|
||||||
|
DialogContent,
|
||||||
|
DialogFooter,
|
||||||
|
DialogClose,
|
||||||
|
} from './components/molecules/Dialog'
|
||||||
|
export type {
|
||||||
|
DialogProps,
|
||||||
|
DialogHeaderProps,
|
||||||
|
DialogTitleProps,
|
||||||
|
DialogDescriptionProps,
|
||||||
|
DialogContentProps,
|
||||||
|
DialogFooterProps,
|
||||||
|
DialogCloseProps,
|
||||||
|
} from './components/molecules/Dialog'
|
||||||
|
|
||||||
|
export { Popover, PopoverTrigger, PopoverContent, PopoverClose } from './components/molecules/Popover'
|
||||||
|
export type {
|
||||||
|
PopoverProps,
|
||||||
|
PopoverTriggerProps,
|
||||||
|
PopoverContentProps,
|
||||||
|
PopoverCloseProps,
|
||||||
|
} from './components/molecules/Popover'
|
||||||
|
|
||||||
|
export { DataTable } from './components/molecules/DataTable'
|
||||||
|
export type { DataTableProps, DataTableColumn } from './components/molecules/DataTable'
|
||||||
|
|
||||||
|
// Organisms
|
||||||
|
export { TopBar } from './components/organisms/TopBar'
|
||||||
|
export type { TopBarProps } from './components/organisms/TopBar'
|
||||||
|
|
||||||
|
export { SideNav, SideNavItem, SideNavGroup, SideNavDivider } from './components/organisms/SideNav'
|
||||||
|
export type {
|
||||||
|
SideNavProps,
|
||||||
|
SideNavItemProps,
|
||||||
|
SideNavGroupProps,
|
||||||
|
SideNavDividerProps,
|
||||||
|
} from './components/organisms/SideNav'
|
||||||
|
|
||||||
|
export { PageHeader } from './components/organisms/PageHeader'
|
||||||
|
export type { PageHeaderProps } from './components/organisms/PageHeader'
|
||||||
|
|
||||||
|
// Templates
|
||||||
|
export { AppShell } from './components/templates/AppShell'
|
||||||
|
export type { AppShellProps } from './components/templates/AppShell'
|
||||||
|
|
||||||
|
export { DashboardPage } from './components/templates/DashboardPage'
|
||||||
|
export type { DashboardPageProps } from './components/templates/DashboardPage'
|
||||||
|
|
||||||
|
export { ListPage } from './components/templates/ListPage'
|
||||||
|
export type { ListPageProps } from './components/templates/ListPage'
|
||||||
|
|
||||||
|
export { FormPage } from './components/templates/FormPage'
|
||||||
|
export type { FormPageProps, FormPageStep } from './components/templates/FormPage'
|
||||||
|
|
||||||
|
export { DetailPage } from './components/templates/DetailPage'
|
||||||
|
export type { DetailPageProps } from './components/templates/DetailPage'
|
||||||
|
|
||||||
|
export { CenteredPage } from './components/templates/CenteredPage'
|
||||||
|
export type { CenteredPageProps } from './components/templates/CenteredPage'
|
||||||
Reference in New Issue
Block a user