@kimdw-rtk/ui 0.0.0 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion/Accordion.css.d.ts +16 -0
- package/dist/components/Accordion/Accordion.css.d.ts.map +1 -0
- package/dist/components/Accordion/Accordion.css.js +24 -0
- package/dist/components/Accordion/Accordion.d.ts +8 -0
- package/dist/components/Accordion/Accordion.d.ts.map +1 -0
- package/dist/components/Accordion/Accordion.js +12 -0
- package/dist/components/Accordion/Accordion.spec.d.ts +2 -0
- package/dist/components/Accordion/Accordion.spec.d.ts.map +1 -0
- package/{src/components/Accordion/Accordion.spec.tsx → dist/components/Accordion/Accordion.spec.js} +5 -6
- package/dist/components/Accordion/AccordionContent.css.d.ts +13 -0
- package/dist/components/Accordion/AccordionContent.css.d.ts.map +1 -0
- package/dist/components/Accordion/AccordionContent.css.js +22 -0
- package/dist/components/Accordion/AccordionContent.d.ts +7 -0
- package/dist/components/Accordion/AccordionContent.d.ts.map +1 -0
- package/dist/components/Accordion/AccordionContent.js +56 -0
- package/dist/components/Accordion/AccordionContext.d.ts +7 -0
- package/dist/components/Accordion/AccordionContext.d.ts.map +1 -0
- package/dist/components/Accordion/AccordionContext.js +5 -0
- package/dist/components/Accordion/AccordionTrigger.css.d.ts +19 -0
- package/dist/components/Accordion/AccordionTrigger.css.d.ts.map +1 -0
- package/dist/components/Accordion/AccordionTrigger.css.js +39 -0
- package/dist/components/Accordion/AccordionTrigger.d.ts +8 -0
- package/dist/components/Accordion/AccordionTrigger.d.ts.map +1 -0
- package/dist/components/Accordion/AccordionTrigger.js +14 -0
- package/dist/components/Accordion/index.d.ts +4 -0
- package/dist/components/Accordion/index.d.ts.map +1 -0
- package/{src/components/Accordion/index.ts → dist/components/Accordion/index.js} +3 -3
- package/dist/components/Alert/index.d.ts +7 -0
- package/dist/components/Alert/index.d.ts.map +1 -0
- package/dist/components/Alert/index.js +9 -0
- package/dist/components/Box/Box.css.d.ts +13 -0
- package/dist/components/Box/Box.css.d.ts.map +1 -0
- package/dist/components/Box/Box.css.js +16 -0
- package/dist/components/Box/Box.spec.d.ts +2 -0
- package/dist/components/Box/Box.spec.d.ts.map +1 -0
- package/{src/components/Box/Box.spec.tsx → dist/components/Box/Box.spec.js} +5 -6
- package/dist/components/Box/index.d.ts +7 -0
- package/dist/components/Box/index.d.ts.map +1 -0
- package/dist/components/Box/index.js +10 -0
- package/dist/components/Button/Button.css.d.ts +146 -0
- package/dist/components/Button/Button.css.d.ts.map +1 -0
- package/dist/components/Button/Button.css.js +182 -0
- package/dist/components/Button/Button.spec.d.ts +2 -0
- package/dist/components/Button/Button.spec.d.ts.map +1 -0
- package/dist/components/Button/Button.spec.js +19 -0
- package/dist/components/Button/index.d.ts +9 -0
- package/dist/components/Button/index.d.ts.map +1 -0
- package/dist/components/Button/index.js +19 -0
- package/dist/components/Card/Card.css.d.ts +61 -0
- package/dist/components/Card/Card.css.d.ts.map +1 -0
- package/dist/components/Card/Card.css.js +68 -0
- package/dist/components/Card/Card.d.ts +10 -0
- package/dist/components/Card/Card.d.ts.map +1 -0
- package/dist/components/Card/Card.js +10 -0
- package/dist/components/Card/Card.spec.d.ts +2 -0
- package/dist/components/Card/Card.spec.d.ts.map +1 -0
- package/dist/components/Card/Card.spec.js +16 -0
- package/dist/components/Card/CardContent.css.d.ts +2 -0
- package/dist/components/Card/CardContent.css.d.ts.map +1 -0
- package/{src/components/Card/CardContent.css.ts → dist/components/Card/CardContent.css.js} +6 -8
- package/dist/components/Card/CardContent.d.ts +5 -0
- package/dist/components/Card/CardContent.d.ts.map +1 -0
- package/dist/components/Card/CardContent.js +9 -0
- package/dist/components/Card/CardInteraction.css.d.ts +2 -0
- package/dist/components/Card/CardInteraction.css.d.ts.map +1 -0
- package/dist/components/Card/CardInteraction.css.js +8 -0
- package/dist/components/Card/CardInteraction.d.ts +5 -0
- package/dist/components/Card/CardInteraction.d.ts.map +1 -0
- package/dist/components/Card/CardInteraction.js +12 -0
- package/dist/components/Card/CardThumbnail.css.d.ts +2 -0
- package/dist/components/Card/CardThumbnail.css.d.ts.map +1 -0
- package/{src/components/Card/CardThumbnail.css.ts → dist/components/Card/CardThumbnail.css.js} +5 -6
- package/dist/components/Card/CardThumbnail.d.ts +5 -0
- package/dist/components/Card/CardThumbnail.d.ts.map +1 -0
- package/dist/components/Card/CardThumbnail.js +9 -0
- package/dist/components/Card/index.d.ts +5 -0
- package/dist/components/Card/index.d.ts.map +1 -0
- package/{src/components/Card/index.ts → dist/components/Card/index.js} +4 -4
- package/dist/components/Chip/Chip.css.d.ts +46 -0
- package/dist/components/Chip/Chip.css.d.ts.map +1 -0
- package/dist/components/Chip/Chip.css.js +56 -0
- package/dist/components/Chip/Chip.d.ts +6 -0
- package/dist/components/Chip/Chip.d.ts.map +1 -0
- package/dist/components/Chip/Chip.js +10 -0
- package/dist/components/Chip/Chip.spec.d.ts +2 -0
- package/dist/components/Chip/Chip.spec.d.ts.map +1 -0
- package/{src/components/Chip/Chip.spec.tsx → dist/components/Chip/Chip.spec.js} +5 -6
- package/dist/components/Chip/index.d.ts +2 -0
- package/dist/components/Chip/index.d.ts.map +1 -0
- package/{src/components/Chip/index.ts → dist/components/Chip/index.js} +1 -1
- package/dist/components/Confirm/index.d.ts +12 -0
- package/dist/components/Confirm/index.d.ts.map +1 -0
- package/dist/components/Confirm/index.js +13 -0
- package/dist/components/Dialog/Dialog.css.d.ts +3 -0
- package/dist/components/Dialog/Dialog.css.d.ts.map +1 -0
- package/dist/components/Dialog/Dialog.css.js +19 -0
- package/dist/components/Dialog/Dialog.d.ts +5 -0
- package/dist/components/Dialog/Dialog.d.ts.map +1 -0
- package/dist/components/Dialog/Dialog.js +10 -0
- package/dist/components/Dialog/Dialog.spec.d.ts +2 -0
- package/dist/components/Dialog/Dialog.spec.d.ts.map +1 -0
- package/dist/components/Dialog/Dialog.spec.js +16 -0
- package/dist/components/Dialog/DialogContent.css.d.ts +2 -0
- package/dist/components/Dialog/DialogContent.css.d.ts.map +1 -0
- package/dist/components/Dialog/DialogContent.css.js +12 -0
- package/dist/components/Dialog/DialogContent.d.ts +5 -0
- package/dist/components/Dialog/DialogContent.d.ts.map +1 -0
- package/dist/components/Dialog/DialogContent.js +10 -0
- package/dist/components/Dialog/DialogFooter.css.d.ts +3 -0
- package/dist/components/Dialog/DialogFooter.css.d.ts.map +1 -0
- package/dist/components/Dialog/DialogFooter.css.js +15 -0
- package/dist/components/Dialog/DialogFooter.d.ts +5 -0
- package/dist/components/Dialog/DialogFooter.d.ts.map +1 -0
- package/dist/components/Dialog/DialogFooter.js +9 -0
- package/dist/components/Dialog/DialogHeader.css.d.ts +3 -0
- package/dist/components/Dialog/DialogHeader.css.d.ts.map +1 -0
- package/dist/components/Dialog/DialogHeader.css.js +23 -0
- package/dist/components/Dialog/DialogHeader.d.ts +7 -0
- package/dist/components/Dialog/DialogHeader.d.ts.map +1 -0
- package/dist/components/Dialog/DialogHeader.js +11 -0
- package/dist/components/Dialog/index.d.ts +5 -0
- package/dist/components/Dialog/index.d.ts.map +1 -0
- package/{src/components/Dialog/index.ts → dist/components/Dialog/index.js} +4 -4
- package/dist/components/Navigation/Navigation.spec.d.ts +2 -0
- package/dist/components/Navigation/Navigation.spec.d.ts.map +1 -0
- package/dist/components/Navigation/Navigation.spec.js +11 -0
- package/dist/components/Navigation/NavigationAside.css.d.ts +2 -0
- package/dist/components/Navigation/NavigationAside.css.d.ts.map +1 -0
- package/{src/components/Navigation/NavigationAside.css.ts → dist/components/Navigation/NavigationAside.css.js} +6 -7
- package/dist/components/Navigation/NavigationAside.d.ts +5 -0
- package/dist/components/Navigation/NavigationAside.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationAside.js +10 -0
- package/dist/components/Navigation/NavigationBar.css.d.ts +15 -0
- package/dist/components/Navigation/NavigationBar.css.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationBar.css.js +32 -0
- package/dist/components/Navigation/NavigationBar.d.ts +6 -0
- package/dist/components/Navigation/NavigationBar.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationBar.js +10 -0
- package/dist/components/Navigation/NavigationContainer.css.d.ts +2 -0
- package/dist/components/Navigation/NavigationContainer.css.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationContainer.css.js +9 -0
- package/dist/components/Navigation/NavigationContainer.d.ts +5 -0
- package/dist/components/Navigation/NavigationContainer.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationContainer.js +9 -0
- package/dist/components/Navigation/NavigationDrawer.css.d.ts +14 -0
- package/dist/components/Navigation/NavigationDrawer.css.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationDrawer.css.js +49 -0
- package/dist/components/Navigation/NavigationDrawer.d.ts +8 -0
- package/dist/components/Navigation/NavigationDrawer.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationDrawer.js +23 -0
- package/dist/components/Navigation/NavigationItem.css.d.ts +11 -0
- package/dist/components/Navigation/NavigationItem.css.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationItem.css.js +34 -0
- package/dist/components/Navigation/NavigationItem.d.ts +6 -0
- package/dist/components/Navigation/NavigationItem.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationItem.js +9 -0
- package/dist/components/Navigation/NavigationLogo.css.d.ts +2 -0
- package/dist/components/Navigation/NavigationLogo.css.d.ts.map +1 -0
- package/{src/components/Navigation/NavigationLogo.css.ts → dist/components/Navigation/NavigationLogo.css.js} +4 -5
- package/dist/components/Navigation/NavigationLogo.d.ts +5 -0
- package/dist/components/Navigation/NavigationLogo.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationLogo.js +9 -0
- package/dist/components/Navigation/NavigationMenu.css.d.ts +2 -0
- package/dist/components/Navigation/NavigationMenu.css.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationMenu.css.js +19 -0
- package/dist/components/Navigation/NavigationMenu.d.ts +6 -0
- package/dist/components/Navigation/NavigationMenu.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationMenu.js +10 -0
- package/dist/components/Navigation/index.d.ts +8 -0
- package/dist/components/Navigation/index.d.ts.map +1 -0
- package/{src/components/Navigation/index.ts → dist/components/Navigation/index.js} +7 -7
- package/dist/components/Range/Range.css.d.ts +49 -0
- package/dist/components/Range/Range.css.d.ts.map +1 -0
- package/dist/components/Range/Range.css.js +93 -0
- package/dist/components/Range/Range.d.ts +12 -0
- package/dist/components/Range/Range.d.ts.map +1 -0
- package/dist/components/Range/Range.js +37 -0
- package/dist/components/Range/Range.spec.d.ts +2 -0
- package/dist/components/Range/Range.spec.d.ts.map +1 -0
- package/{src/components/Range/Range.spec.tsx → dist/components/Range/Range.spec.js} +5 -6
- package/dist/components/Range/index.d.ts +2 -0
- package/dist/components/Range/index.d.ts.map +1 -0
- package/{src/components/Range/index.ts → dist/components/Range/index.js} +1 -1
- package/dist/components/ScrollArea/ScrollArea.css.d.ts +6 -0
- package/dist/components/ScrollArea/ScrollArea.css.d.ts.map +1 -0
- package/{src/components/ScrollArea/ScrollArea.css.ts → dist/components/ScrollArea/ScrollArea.css.js} +32 -40
- package/dist/components/ScrollArea/ScrollArea.d.ts +6 -0
- package/dist/components/ScrollArea/ScrollArea.d.ts.map +1 -0
- package/dist/components/ScrollArea/ScrollArea.js +34 -0
- package/dist/components/ScrollArea/ScrollArea.spec.d.ts +2 -0
- package/dist/components/ScrollArea/ScrollArea.spec.d.ts.map +1 -0
- package/{src/components/ScrollArea/ScrollArea.spec.tsx → dist/components/ScrollArea/ScrollArea.spec.js} +5 -6
- package/dist/components/ScrollArea/index.d.ts +2 -0
- package/dist/components/ScrollArea/index.d.ts.map +1 -0
- package/{src/components/ScrollArea/index.ts → dist/components/ScrollArea/index.js} +1 -1
- package/dist/components/Select/Select.css.d.ts +14 -0
- package/dist/components/Select/Select.css.d.ts.map +1 -0
- package/dist/components/Select/Select.css.js +20 -0
- package/dist/components/Select/Select.d.ts +17 -0
- package/dist/components/Select/Select.d.ts.map +1 -0
- package/dist/components/Select/Select.js +46 -0
- package/dist/components/Select/Select.spec.d.ts +2 -0
- package/dist/components/Select/Select.spec.d.ts.map +1 -0
- package/dist/components/Select/Select.spec.js +35 -0
- package/dist/components/Select/SelectContext.d.ts +34 -0
- package/dist/components/Select/SelectContext.d.ts.map +1 -0
- package/dist/components/Select/SelectContext.js +30 -0
- package/dist/components/Select/SelectOption.css.d.ts +2 -0
- package/dist/components/Select/SelectOption.css.d.ts.map +1 -0
- package/dist/components/Select/SelectOption.css.js +10 -0
- package/dist/components/Select/SelectOption.d.ts +8 -0
- package/dist/components/Select/SelectOption.d.ts.map +1 -0
- package/dist/components/Select/SelectOption.js +23 -0
- package/dist/components/Select/SelectOptionList.css.d.ts +19 -0
- package/dist/components/Select/SelectOptionList.css.d.ts.map +1 -0
- package/dist/components/Select/SelectOptionList.css.js +55 -0
- package/dist/components/Select/SelectOptionList.d.ts +7 -0
- package/dist/components/Select/SelectOptionList.d.ts.map +1 -0
- package/dist/components/Select/SelectOptionList.js +33 -0
- package/dist/components/Select/SelectTrigger.css.d.ts +34 -0
- package/dist/components/Select/SelectTrigger.css.d.ts.map +1 -0
- package/dist/components/Select/SelectTrigger.css.js +59 -0
- package/dist/components/Select/SelectTrigger.d.ts +6 -0
- package/dist/components/Select/SelectTrigger.d.ts.map +1 -0
- package/dist/components/Select/SelectTrigger.js +19 -0
- package/dist/components/Select/index.d.ts +3 -0
- package/dist/components/Select/index.d.ts.map +1 -0
- package/{src/components/Select/index.tsx → dist/components/Select/index.js} +2 -2
- package/dist/components/Skeleton/Skeleton.css.d.ts +2 -0
- package/dist/components/Skeleton/Skeleton.css.d.ts.map +1 -0
- package/dist/components/Skeleton/Skeleton.css.js +19 -0
- package/dist/components/Skeleton/Skeleton.spec.d.ts +2 -0
- package/dist/components/Skeleton/Skeleton.spec.d.ts.map +1 -0
- package/{src/components/Skeleton/Skeleton.spec.tsx → dist/components/Skeleton/Skeleton.spec.js} +5 -6
- package/dist/components/Skeleton/index.d.ts +9 -0
- package/dist/components/Skeleton/index.d.ts.map +1 -0
- package/dist/components/Skeleton/index.js +9 -0
- package/dist/components/Table/Table.css.d.ts +3 -0
- package/dist/components/Table/Table.css.d.ts.map +1 -0
- package/{src/components/Table/Table.css.ts → dist/components/Table/Table.css.js} +7 -10
- package/dist/components/Table/Table.d.ts +8 -0
- package/dist/components/Table/Table.d.ts.map +1 -0
- package/dist/components/Table/Table.js +10 -0
- package/dist/components/Table/Table.spec.d.ts +2 -0
- package/dist/components/Table/Table.spec.d.ts.map +1 -0
- package/dist/components/Table/Table.spec.js +10 -0
- package/dist/components/Table/TableBody.d.ts +5 -0
- package/dist/components/Table/TableBody.d.ts.map +1 -0
- package/dist/components/Table/TableBody.js +6 -0
- package/dist/components/Table/TableCell.css.d.ts +2 -0
- package/dist/components/Table/TableCell.css.d.ts.map +1 -0
- package/dist/components/Table/TableCell.css.js +32 -0
- package/dist/components/Table/TableCell.d.ts +9 -0
- package/dist/components/Table/TableCell.d.ts.map +1 -0
- package/dist/components/Table/TableCell.js +8 -0
- package/dist/components/Table/TableHead.css.d.ts +2 -0
- package/dist/components/Table/TableHead.css.d.ts.map +1 -0
- package/dist/components/Table/TableHead.css.js +8 -0
- package/dist/components/Table/TableHead.d.ts +9 -0
- package/dist/components/Table/TableHead.d.ts.map +1 -0
- package/dist/components/Table/TableHead.js +8 -0
- package/dist/components/Table/TableHeader.d.ts +5 -0
- package/dist/components/Table/TableHeader.d.ts.map +1 -0
- package/dist/components/Table/TableHeader.js +6 -0
- package/dist/components/Table/TableRow.css.d.ts +2 -0
- package/dist/components/Table/TableRow.css.d.ts.map +1 -0
- package/{src/components/Table/TableRow.css.ts → dist/components/Table/TableRow.css.js} +2 -3
- package/dist/components/Table/TableRow.d.ts +7 -0
- package/dist/components/Table/TableRow.d.ts.map +1 -0
- package/dist/components/Table/TableRow.js +7 -0
- package/dist/components/Table/index.d.ts +7 -0
- package/dist/components/Table/index.d.ts.map +1 -0
- package/{src/components/Table/index.ts → dist/components/Table/index.js} +6 -6
- package/dist/components/Tabs/Tabs.d.ts +7 -0
- package/dist/components/Tabs/Tabs.d.ts.map +1 -0
- package/dist/components/Tabs/Tabs.js +11 -0
- package/dist/components/Tabs/Tabs.spec.d.ts +2 -0
- package/dist/components/Tabs/Tabs.spec.d.ts.map +1 -0
- package/dist/components/Tabs/Tabs.spec.js +22 -0
- package/dist/components/Tabs/TabsContent.d.ts +9 -0
- package/dist/components/Tabs/TabsContent.d.ts.map +1 -0
- package/dist/components/Tabs/TabsContent.js +17 -0
- package/dist/components/Tabs/TabsList.css.d.ts +2 -0
- package/dist/components/Tabs/TabsList.css.d.ts.map +1 -0
- package/dist/components/Tabs/TabsList.css.js +8 -0
- package/dist/components/Tabs/TabsList.d.ts +5 -0
- package/dist/components/Tabs/TabsList.d.ts.map +1 -0
- package/dist/components/Tabs/TabsList.js +9 -0
- package/dist/components/Tabs/TabsProvider.d.ts +9 -0
- package/dist/components/Tabs/TabsProvider.d.ts.map +1 -0
- package/dist/components/Tabs/TabsProvider.js +6 -0
- package/dist/components/Tabs/TabsTrigger.css.d.ts +13 -0
- package/dist/components/Tabs/TabsTrigger.css.d.ts.map +1 -0
- package/dist/components/Tabs/TabsTrigger.css.js +29 -0
- package/dist/components/Tabs/TabsTrigger.d.ts +7 -0
- package/dist/components/Tabs/TabsTrigger.d.ts.map +1 -0
- package/dist/components/Tabs/TabsTrigger.js +19 -0
- package/dist/components/Tabs/index.d.ts +5 -0
- package/dist/components/Tabs/index.d.ts.map +1 -0
- package/{src/components/Tabs/index.ts → dist/components/Tabs/index.js} +4 -4
- package/dist/components/TextField/TextField.css.d.ts +49 -0
- package/dist/components/TextField/TextField.css.d.ts.map +1 -0
- package/dist/components/TextField/TextField.css.js +59 -0
- package/dist/components/TextField/TextField.spec.d.ts +2 -0
- package/dist/components/TextField/TextField.spec.d.ts.map +1 -0
- package/{src/components/TextField/TextField.spec.tsx → dist/components/TextField/TextField.spec.js} +5 -6
- package/dist/components/TextField/index.d.ts +8 -0
- package/dist/components/TextField/index.d.ts.map +1 -0
- package/dist/components/TextField/index.js +10 -0
- package/dist/components/Toast/Toast.css.d.ts +26 -0
- package/dist/components/Toast/Toast.css.d.ts.map +1 -0
- package/dist/components/Toast/Toast.css.js +62 -0
- package/dist/components/Toast/Toast.spec.d.ts +2 -0
- package/dist/components/Toast/Toast.spec.d.ts.map +1 -0
- package/{src/components/Toast/Toast.spec.tsx → dist/components/Toast/Toast.spec.js} +5 -6
- package/dist/components/Toast/index.d.ts +8 -0
- package/dist/components/Toast/index.d.ts.map +1 -0
- package/dist/components/Toast/index.js +13 -0
- package/dist/components/Typography/Typography.css.d.ts +10 -0
- package/dist/components/Typography/Typography.css.d.ts.map +1 -0
- package/dist/components/Typography/Typography.css.js +15 -0
- package/dist/components/Typography/Typography.spec.d.ts +2 -0
- package/dist/components/Typography/Typography.spec.d.ts.map +1 -0
- package/dist/components/Typography/Typography.spec.js +28 -0
- package/dist/components/Typography/index.d.ts +14 -0
- package/dist/components/Typography/index.d.ts.map +1 -0
- package/dist/components/Typography/index.js +11 -0
- package/dist/components/index.d.ts +19 -0
- package/dist/components/index.d.ts.map +1 -0
- package/{src/components/index.ts → dist/components/index.js} +18 -18
- package/dist/contexts/UIProvider.d.ts +9 -0
- package/dist/contexts/UIProvider.d.ts.map +1 -0
- package/dist/contexts/UIProvider.js +8 -0
- package/dist/contexts/index.d.ts +2 -0
- package/dist/contexts/index.d.ts.map +1 -0
- package/{src/contexts/index.ts → dist/contexts/index.js} +1 -1
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/{src/hooks/index.ts → dist/hooks/index.js} +5 -5
- package/dist/hooks/useDialog/index.d.ts +6 -0
- package/dist/hooks/useDialog/index.d.ts.map +1 -0
- package/dist/hooks/useDialog/index.js +28 -0
- package/dist/hooks/useDialog/useDialog.spec.d.ts +2 -0
- package/dist/hooks/useDialog/useDialog.spec.d.ts.map +1 -0
- package/dist/hooks/useDialog/useDialog.spec.js +53 -0
- package/dist/hooks/useMouseScroll/index.d.ts +5 -0
- package/dist/hooks/useMouseScroll/index.d.ts.map +1 -0
- package/dist/hooks/useMouseScroll/index.js +47 -0
- package/dist/hooks/usePointerSlider/index.d.ts +6 -0
- package/dist/hooks/usePointerSlider/index.d.ts.map +1 -0
- package/dist/hooks/usePointerSlider/index.js +44 -0
- package/dist/hooks/useRipple/index.d.ts +4 -0
- package/dist/hooks/useRipple/index.d.ts.map +1 -0
- package/dist/hooks/useRipple/index.js +111 -0
- package/dist/hooks/useRipple/ripple.css.d.ts +13 -0
- package/dist/hooks/useRipple/ripple.css.d.ts.map +1 -0
- package/dist/hooks/useRipple/ripple.css.js +30 -0
- package/dist/hooks/useToast/ToastContainer.css.d.ts +2 -0
- package/dist/hooks/useToast/ToastContainer.css.d.ts.map +1 -0
- package/dist/hooks/useToast/ToastContainer.css.js +10 -0
- package/dist/hooks/useToast/ToastContainer.d.ts +7 -0
- package/dist/hooks/useToast/ToastContainer.d.ts.map +1 -0
- package/dist/hooks/useToast/ToastContainer.js +5 -0
- package/dist/hooks/useToast/ToastProvider.d.ts +22 -0
- package/dist/hooks/useToast/ToastProvider.d.ts.map +1 -0
- package/dist/hooks/useToast/ToastProvider.js +47 -0
- package/dist/hooks/useToast/index.d.ts +5 -0
- package/dist/hooks/useToast/index.d.ts.map +1 -0
- package/dist/hooks/useToast/index.js +10 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/{src/index.ts → dist/index.js} +8 -8
- package/dist/styles/globalStyle.css.d.ts +2 -0
- package/dist/styles/globalStyle.css.d.ts.map +1 -0
- package/dist/styles/globalStyle.css.js +26 -0
- package/dist/styles/index.d.ts +5 -0
- package/dist/styles/index.d.ts.map +1 -0
- package/{src/styles/index.ts → dist/styles/index.js} +4 -4
- package/dist/styles/layers.css.d.ts +3 -0
- package/dist/styles/layers.css.d.ts.map +1 -0
- package/{src/styles/layers.css.ts → dist/styles/layers.css.js} +3 -4
- package/dist/styles/overlay.css.d.ts +4 -0
- package/dist/styles/overlay.css.d.ts.map +1 -0
- package/dist/styles/overlay.css.js +31 -0
- package/dist/styles/sprinkles.css.d.ts +3954 -0
- package/dist/styles/sprinkles.css.d.ts.map +1 -0
- package/dist/styles/sprinkles.css.js +118 -0
- package/dist/styles/sx.d.ts +3 -0
- package/dist/styles/sx.d.ts.map +1 -0
- package/dist/styles/sx.js +10 -0
- package/dist/tests/uiTest.d.ts +3 -0
- package/dist/tests/uiTest.d.ts.map +1 -0
- package/dist/tests/uiTest.js +36 -0
- package/dist/themes/darkTheme.css.d.ts +314 -0
- package/dist/themes/darkTheme.css.d.ts.map +1 -0
- package/dist/themes/darkTheme.css.js +29 -0
- package/dist/themes/index.d.ts +4 -0
- package/dist/themes/index.d.ts.map +1 -0
- package/{src/themes/index.ts → dist/themes/index.js} +3 -3
- package/dist/themes/lightTheme.css.d.ts +314 -0
- package/dist/themes/lightTheme.css.d.ts.map +1 -0
- package/dist/themes/lightTheme.css.js +29 -0
- package/dist/themes/theme.css.d.ts +314 -0
- package/dist/themes/theme.css.d.ts.map +1 -0
- package/dist/themes/theme.css.js +21 -0
- package/dist/tokens/index.d.ts +6 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/{src/tokens/index.ts → dist/tokens/index.js} +5 -5
- package/dist/tokens/scale/color.d.ts +579 -0
- package/dist/tokens/scale/color.d.ts.map +1 -0
- package/dist/tokens/scale/color.js +600 -0
- package/dist/tokens/semantic/breakpoint.d.ts +7 -0
- package/dist/tokens/semantic/breakpoint.d.ts.map +1 -0
- package/dist/tokens/semantic/breakpoint.js +6 -0
- package/dist/tokens/semantic/color.d.ts +2 -0
- package/dist/tokens/semantic/color.d.ts.map +1 -0
- package/dist/tokens/semantic/color.js +10 -0
- package/dist/tokens/semantic/spacing.d.ts +10 -0
- package/dist/tokens/semantic/spacing.d.ts.map +1 -0
- package/dist/tokens/semantic/spacing.js +9 -0
- package/dist/tokens/semantic/typography.d.ts +33 -0
- package/dist/tokens/semantic/typography.d.ts.map +1 -0
- package/dist/tokens/semantic/typography.js +32 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/{src/types/index.ts → dist/types/index.js} +1 -1
- package/{src/types/ui.types.ts → dist/types/ui.types.d.ts} +15 -26
- package/dist/types/ui.types.d.ts.map +1 -0
- package/dist/types/ui.types.js +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/{src/utils/index.ts → dist/utils/index.js} +1 -1
- package/dist/utils/sprinklesUtils.d.ts +10 -0
- package/dist/utils/sprinklesUtils.d.ts.map +1 -0
- package/dist/utils/sprinklesUtils.js +19 -0
- package/dist/utils/styleUtils.css.d.ts +23 -0
- package/dist/utils/styleUtils.css.d.ts.map +1 -0
- package/dist/utils/styleUtils.css.js +61 -0
- package/package.json +8 -3
- package/.babelrc +0 -12
- package/.turbo/turbo-check-types.log +0 -2
- package/.turbo/turbo-lint.log +0 -12
- package/.turbo/turbo-test.log +0 -4084
- package/.vscode/settings.json +0 -4
- package/eslint.config.mjs +0 -4
- package/jest.config.json +0 -10
- package/jest.setup.js +0 -2
- package/src/components/Accordion/Accordion.css.ts +0 -29
- package/src/components/Accordion/Accordion.tsx +0 -44
- package/src/components/Accordion/AccordionContent.css.ts +0 -29
- package/src/components/Accordion/AccordionContent.tsx +0 -87
- package/src/components/Accordion/AccordionContext.ts +0 -9
- package/src/components/Accordion/AccordionTrigger.css.ts +0 -46
- package/src/components/Accordion/AccordionTrigger.tsx +0 -41
- package/src/components/Alert/index.tsx +0 -25
- package/src/components/Box/Box.css.ts +0 -18
- package/src/components/Box/index.tsx +0 -41
- package/src/components/Button/Button.css.ts +0 -241
- package/src/components/Button/Button.spec.tsx +0 -30
- package/src/components/Button/index.tsx +0 -60
- package/src/components/Card/Card.css.ts +0 -93
- package/src/components/Card/Card.spec.tsx +0 -24
- package/src/components/Card/Card.tsx +0 -41
- package/src/components/Card/CardContent.tsx +0 -23
- package/src/components/Card/CardInteraction.css.ts +0 -11
- package/src/components/Card/CardInteraction.tsx +0 -36
- package/src/components/Card/CardThumbnail.tsx +0 -23
- package/src/components/Chip/Chip.css.ts +0 -75
- package/src/components/Chip/Chip.tsx +0 -37
- package/src/components/Confirm/index.tsx +0 -44
- package/src/components/Dialog/Dialog.css.ts +0 -25
- package/src/components/Dialog/Dialog.spec.tsx +0 -26
- package/src/components/Dialog/Dialog.tsx +0 -30
- package/src/components/Dialog/DialogContent.css.ts +0 -16
- package/src/components/Dialog/DialogContent.tsx +0 -26
- package/src/components/Dialog/DialogFooter.css.ts +0 -20
- package/src/components/Dialog/DialogFooter.tsx +0 -26
- package/src/components/Dialog/DialogHeader.css.ts +0 -31
- package/src/components/Dialog/DialogHeader.tsx +0 -37
- package/src/components/Navigation/Navigation.spec.tsx +0 -19
- package/src/components/Navigation/NavigationAside.tsx +0 -23
- package/src/components/Navigation/NavigationBar.css.ts +0 -42
- package/src/components/Navigation/NavigationBar.tsx +0 -25
- package/src/components/Navigation/NavigationContainer.css.ts +0 -11
- package/src/components/Navigation/NavigationContainer.tsx +0 -26
- package/src/components/Navigation/NavigationDrawer.css.ts +0 -61
- package/src/components/Navigation/NavigationDrawer.tsx +0 -67
- package/src/components/Navigation/NavigationItem.css.ts +0 -43
- package/src/components/Navigation/NavigationItem.tsx +0 -24
- package/src/components/Navigation/NavigationLogo.tsx +0 -28
- package/src/components/Navigation/NavigationMenu.css.ts +0 -23
- package/src/components/Navigation/NavigationMenu.tsx +0 -25
- package/src/components/Range/Range.css.ts +0 -132
- package/src/components/Range/Range.tsx +0 -90
- package/src/components/ScrollArea/ScrollArea.tsx +0 -68
- package/src/components/Select/Select.css.ts +0 -22
- package/src/components/Select/Select.spec.tsx +0 -65
- package/src/components/Select/Select.tsx +0 -111
- package/src/components/Select/SelectContext.ts +0 -59
- package/src/components/Select/SelectOption.css.ts +0 -14
- package/src/components/Select/SelectOption.tsx +0 -40
- package/src/components/Select/SelectOptionList.css.ts +0 -68
- package/src/components/Select/SelectOptionList.tsx +0 -59
- package/src/components/Select/SelectTrigger.css.ts +0 -73
- package/src/components/Select/SelectTrigger.tsx +0 -49
- package/src/components/Skeleton/Skeleton.css.ts +0 -26
- package/src/components/Skeleton/index.tsx +0 -27
- package/src/components/Table/Table.spec.tsx +0 -12
- package/src/components/Table/Table.tsx +0 -27
- package/src/components/Table/TableBody.tsx +0 -14
- package/src/components/Table/TableCell.css.ts +0 -43
- package/src/components/Table/TableCell.tsx +0 -30
- package/src/components/Table/TableHead.css.ts +0 -10
- package/src/components/Table/TableHead.tsx +0 -30
- package/src/components/Table/TableHeader.tsx +0 -14
- package/src/components/Table/TableRow.tsx +0 -24
- package/src/components/Tabs/Tabs.spec.tsx +0 -46
- package/src/components/Tabs/Tabs.tsx +0 -34
- package/src/components/Tabs/TabsContent.tsx +0 -32
- package/src/components/Tabs/TabsList.css.ts +0 -11
- package/src/components/Tabs/TabsList.tsx +0 -25
- package/src/components/Tabs/TabsProvider.tsx +0 -17
- package/src/components/Tabs/TabsTrigger.css.ts +0 -38
- package/src/components/Tabs/TabsTrigger.tsx +0 -43
- package/src/components/TextField/TextField.css.ts +0 -81
- package/src/components/TextField/index.tsx +0 -38
- package/src/components/Toast/Toast.css.ts +0 -79
- package/src/components/Toast/index.tsx +0 -48
- package/src/components/Typography/Typography.css.ts +0 -17
- package/src/components/Typography/Typography.spec.tsx +0 -35
- package/src/components/Typography/index.tsx +0 -57
- package/src/contexts/UIProvider.tsx +0 -30
- package/src/hooks/useDialog/index.tsx +0 -51
- package/src/hooks/useDialog/useDialog.spec.tsx +0 -80
- package/src/hooks/useMouseScroll/index.ts +0 -63
- package/src/hooks/usePointerSlider/index.ts +0 -79
- package/src/hooks/useRipple/index.tsx +0 -152
- package/src/hooks/useRipple/ripple.css.ts +0 -40
- package/src/hooks/useToast/ToastContainer.css.ts +0 -12
- package/src/hooks/useToast/ToastContainer.tsx +0 -11
- package/src/hooks/useToast/ToastProvider.tsx +0 -131
- package/src/hooks/useToast/index.ts +0 -15
- package/src/styles/globalStyle.css.ts +0 -36
- package/src/styles/overlay.css.ts +0 -40
- package/src/styles/sprinkles.css.ts +0 -149
- package/src/styles/sx.ts +0 -13
- package/src/tests/uiTest.tsx +0 -54
- package/src/themes/darkTheme.css.ts +0 -30
- package/src/themes/lightTheme.css.ts +0 -30
- package/src/themes/theme.css.ts +0 -32
- package/src/tokens/scale/color.ts +0 -604
- package/src/tokens/semantic/breakpoint.ts +0 -6
- package/src/tokens/semantic/color.ts +0 -10
- package/src/tokens/semantic/spacing.ts +0 -9
- package/src/tokens/semantic/typography.ts +0 -32
- package/src/utils/sprinklesUtils.ts +0 -28
- package/src/utils/styleUtils.css.ts +0 -109
- package/tsconfig.json +0 -11
- package/turbo/generators/config.ts +0 -30
- package/turbo/generators/templates/component.hbs +0 -8
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef, useEffect, useRef, useState } from 'react';
|
|
4
|
+
import { useCombinedRefs } from '@kimdw-rtk/utils';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
import { useMouseScroll } from '#hooks/useMouseScroll';
|
|
7
|
+
import { sx } from '#styles';
|
|
8
|
+
import * as s from './ScrollArea.css';
|
|
9
|
+
export const ScrollArea = forwardRef(({ children, className, sx: propSx, ...props }, ref) => {
|
|
10
|
+
const scrollAreaRef = useRef(null);
|
|
11
|
+
const targetRef = useCombinedRefs(ref, scrollAreaRef);
|
|
12
|
+
const [hasLeftSpace, setHasLeftSpace] = useState(false);
|
|
13
|
+
const [hasRightSpace, setHasRightSpace] = useState(true);
|
|
14
|
+
useMouseScroll(scrollAreaRef);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
const element = scrollAreaRef.current;
|
|
17
|
+
if (element === null) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const handleScroll = () => {
|
|
21
|
+
setHasLeftSpace(element.scrollLeft !== 0);
|
|
22
|
+
setHasRightSpace(Math.round(element.scrollLeft + element.clientWidth) <
|
|
23
|
+
element.scrollWidth);
|
|
24
|
+
};
|
|
25
|
+
handleScroll();
|
|
26
|
+
element.addEventListener('scroll', handleScroll);
|
|
27
|
+
return () => {
|
|
28
|
+
element.removeEventListener('scroll', handleScroll);
|
|
29
|
+
};
|
|
30
|
+
}, []);
|
|
31
|
+
return (_jsx("div", { ref: targetRef, className: clsx(s.scrollArea, className, sx(propSx), hasLeftSpace && hasRightSpace && s.maskBoth, hasLeftSpace && s.maskLeft, hasRightSpace && s.maskRight), ...props, children: _jsx("div", { className: s.wrapper, children: children }) }));
|
|
32
|
+
});
|
|
33
|
+
ScrollArea.displayName = 'ScrollArea';
|
|
34
|
+
export { s as scrollAreaCss };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScrollArea.spec.d.ts","sourceRoot":"","sources":["../../../src/components/ScrollArea/ScrollArea.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { uiTest } from '../../tests/uiTest';
|
|
2
|
-
import { ScrollArea } from './ScrollArea';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
});
|
|
1
|
+
import { uiTest } from '../../tests/uiTest';
|
|
2
|
+
import { ScrollArea } from './ScrollArea';
|
|
3
|
+
describe('ScrollArea 컴포넌트', () => {
|
|
4
|
+
uiTest(ScrollArea, 'ScrollArea');
|
|
5
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScrollArea/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './ScrollArea';
|
|
1
|
+
export * from './ScrollArea';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.css.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM;;;;;;;;;;;;EAkBjB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { recipeWithLayer } from '#styleUtils';
|
|
2
|
+
import { typography } from '#tokens';
|
|
3
|
+
export const select = recipeWithLayer({
|
|
4
|
+
base: {
|
|
5
|
+
position: 'relative',
|
|
6
|
+
},
|
|
7
|
+
variants: {
|
|
8
|
+
size: {
|
|
9
|
+
sm: {
|
|
10
|
+
fontSize: typography.size.sm,
|
|
11
|
+
},
|
|
12
|
+
md: {
|
|
13
|
+
fontSize: typography.size.md,
|
|
14
|
+
},
|
|
15
|
+
lg: {
|
|
16
|
+
fontSize: typography.size.lg,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ComponentProps, type CSSProperties, type RefObject } from 'react';
|
|
2
|
+
import type { UIComponent } from '#types';
|
|
3
|
+
import * as s from './Select.css';
|
|
4
|
+
import SelectTrigger from './SelectTrigger';
|
|
5
|
+
interface SelectProps extends Omit<UIComponent<'div', typeof s.select>, 'ref' | 'onChange'> {
|
|
6
|
+
ref?: RefObject<{
|
|
7
|
+
value?: string;
|
|
8
|
+
} | null>;
|
|
9
|
+
name?: string;
|
|
10
|
+
width?: CSSProperties['width'];
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
variant?: ComponentProps<typeof SelectTrigger>['variant'];
|
|
13
|
+
onChange?: (value: string | undefined) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const Select: import("react").ForwardRefExoticComponent<Omit<SelectProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
|
+
export { s as selectCss };
|
|
17
|
+
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAEA,OAAO,EAKL,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAMf,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE1C,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAGlC,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,UAAU,WACR,SAAQ,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,GAAG,UAAU,CAAC;IACrE,GAAG,CAAC,EAAE,SAAS,CAAC;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,CAAC,SAAS,CAAC,CAAC;IAC1D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CAChD;AAED,eAAO,MAAM,MAAM,qHA0ElB,CAAC;AAGF,OAAO,EAAE,CAAC,IAAI,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef, useEffect, useReducer, useRef, } from 'react';
|
|
4
|
+
import { useCombinedRefs } from '@kimdw-rtk/utils';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
import { sx } from '#styles';
|
|
7
|
+
import * as s from './Select.css';
|
|
8
|
+
import { SelectContext, selectReducer } from './SelectContext';
|
|
9
|
+
import SelectOptionList from './SelectOptionList';
|
|
10
|
+
import SelectTrigger from './SelectTrigger';
|
|
11
|
+
export const Select = forwardRef(({ children, className, style, name, defaultValue, width = '100%', size = 'md', sx: propSx, variant = 'outlined', onChange, ...props }, ref) => {
|
|
12
|
+
const containerRef = useRef(null);
|
|
13
|
+
const targetRef = useCombinedRefs(ref, containerRef);
|
|
14
|
+
const [state, dispatch] = useReducer(selectReducer, {
|
|
15
|
+
isActive: false,
|
|
16
|
+
containerRef,
|
|
17
|
+
defaultValue,
|
|
18
|
+
items: new Map(),
|
|
19
|
+
});
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
const container = containerRef.current;
|
|
22
|
+
if (!container) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const handleOutsideClick = (e) => {
|
|
26
|
+
if (container.contains(e.target) || !state.isActive) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
dispatch({ type: 'TOGGLE' });
|
|
30
|
+
};
|
|
31
|
+
window.addEventListener('mousedown', handleOutsideClick);
|
|
32
|
+
return () => {
|
|
33
|
+
window.removeEventListener('mousedown', handleOutsideClick);
|
|
34
|
+
};
|
|
35
|
+
}, [state.isActive, dispatch]);
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
if (!onChange || !state.items.size) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
onChange(state.selected);
|
|
41
|
+
//eslint-disable-next-line
|
|
42
|
+
}, [state.selected]);
|
|
43
|
+
return (_jsx(SelectContext.Provider, { value: { state, dispatch }, children: _jsxs("div", { ref: targetRef, style: { ...style, width }, className: clsx(s.select({ size }), className, sx(propSx)), ...props, children: [_jsx(SelectTrigger, { variant: variant, children: state.selected !== null && state.items.get(state.selected || '') }), _jsx(SelectOptionList, { children: children }), _jsx("input", { type: "hidden", name: name, value: state.selected || '' })] }) }));
|
|
44
|
+
});
|
|
45
|
+
Select.displayName = 'Select';
|
|
46
|
+
export { s as selectCss };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.spec.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { fireEvent, render, screen } from '@testing-library/react';
|
|
3
|
+
import { Select, SelectOption } from '.';
|
|
4
|
+
import { uiTest } from '../../tests/uiTest';
|
|
5
|
+
describe('Select 컴포넌트', () => {
|
|
6
|
+
uiTest(Select, 'Select');
|
|
7
|
+
it('클릭한 option의 내용이 Select에 보인다.', () => {
|
|
8
|
+
render(_jsxs(Select, { "data-testid": "select", children: [_jsx(SelectOption, { value: "1", children: "1\uBC88" }), _jsx(SelectOption, { value: "2", children: "2\uBC88" })] }));
|
|
9
|
+
const select = screen.getByTestId('select');
|
|
10
|
+
fireEvent.click(screen.getByText('2번'));
|
|
11
|
+
expect(select).toHaveTextContent('2번');
|
|
12
|
+
});
|
|
13
|
+
it('새로운 option을 클릭하면 onChange 이벤트가 발생하고, form value, ref.value의 값이 바뀐다.', () => {
|
|
14
|
+
const handleChange = jest.fn();
|
|
15
|
+
render(_jsx("form", { "data-testid": "form", children: _jsxs(Select, { "data-testid": "select", name: "select", onChange: handleChange, children: [_jsx(SelectOption, { value: "1", children: "1\uBC88" }), _jsx(SelectOption, { value: "2", children: "2\uBC88" })] }) }));
|
|
16
|
+
const option2 = screen.getByText('2번');
|
|
17
|
+
const form = screen.getByTestId('form');
|
|
18
|
+
fireEvent.click(option2);
|
|
19
|
+
expect(handleChange).toHaveBeenCalledTimes(1);
|
|
20
|
+
expect(handleChange.mock.calls[0][0]).toBe('2');
|
|
21
|
+
expect(new FormData(form).get('select')).toBe('2');
|
|
22
|
+
fireEvent.click(option2);
|
|
23
|
+
expect(handleChange).toHaveBeenCalledTimes(1);
|
|
24
|
+
expect(new FormData(form).get('select')).toBe('2');
|
|
25
|
+
fireEvent.click(screen.getByText('1번'));
|
|
26
|
+
expect(handleChange).toHaveBeenCalledTimes(2);
|
|
27
|
+
expect(handleChange.mock.calls[1][0]).toBe('1');
|
|
28
|
+
expect(new FormData(form).get('select')).toBe('1');
|
|
29
|
+
});
|
|
30
|
+
it('defaultValue의 값이 기본으로 보인다.', () => {
|
|
31
|
+
render(_jsxs(Select, { "data-testid": "select", defaultValue: "2", children: [_jsx(SelectOption, { value: "1", children: "1\uBC88" }), _jsx(SelectOption, { value: "2", children: "2\uBC88" })] }));
|
|
32
|
+
const select = screen.getByTestId('select');
|
|
33
|
+
expect(select).toHaveTextContent('2번');
|
|
34
|
+
});
|
|
35
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type Dispatch, type ReactNode } from 'react';
|
|
2
|
+
type SelectState = {
|
|
3
|
+
isActive: boolean;
|
|
4
|
+
selected?: string;
|
|
5
|
+
defaultValue?: string;
|
|
6
|
+
items: Map<string, ReactNode>;
|
|
7
|
+
containerRef: React.RefObject<HTMLDivElement | null>;
|
|
8
|
+
};
|
|
9
|
+
type SelectAction = {
|
|
10
|
+
type: 'ADD';
|
|
11
|
+
payload: {
|
|
12
|
+
value: string;
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
};
|
|
15
|
+
} | {
|
|
16
|
+
type: 'REMOVE';
|
|
17
|
+
payload: {
|
|
18
|
+
value: string;
|
|
19
|
+
};
|
|
20
|
+
} | {
|
|
21
|
+
type: 'SELECT';
|
|
22
|
+
payload: {
|
|
23
|
+
value: string;
|
|
24
|
+
};
|
|
25
|
+
} | {
|
|
26
|
+
type: 'TOGGLE';
|
|
27
|
+
};
|
|
28
|
+
export declare const SelectContext: import("react").Context<{
|
|
29
|
+
state: SelectState;
|
|
30
|
+
dispatch: Dispatch<SelectAction>;
|
|
31
|
+
} | undefined>;
|
|
32
|
+
export declare const selectReducer: (state: SelectState, action: SelectAction) => SelectState;
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=SelectContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectContext.d.ts","sourceRoot":"","sources":["../../../src/components/Select/SelectContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAErE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC9B,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;CACtD,CAAC;AAEF,KAAK,YAAY,GACb;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,SAAS,CAAA;KAAE,CAAA;CAAE,GAChE;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GAC9C;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GAC9C;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC;AAEvB,eAAO,MAAM,aAAa;WACf,WAAW;cAAY,QAAQ,CAAC,YAAY,CAAC;cAC5C,CAAC;AAEb,eAAO,MAAM,aAAa,GACxB,OAAO,WAAW,EAClB,QAAQ,YAAY,KACnB,WAmCF,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
export const SelectContext = createContext(undefined);
|
|
3
|
+
export const selectReducer = (state, action) => {
|
|
4
|
+
switch (action.type) {
|
|
5
|
+
case 'ADD': {
|
|
6
|
+
// 현재 selected가 없고, defaultValue === payload.value일 경우 select함.
|
|
7
|
+
if (state.selected === undefined &&
|
|
8
|
+
state.defaultValue === action.payload.value) {
|
|
9
|
+
return {
|
|
10
|
+
...state,
|
|
11
|
+
selected: action.payload.value,
|
|
12
|
+
items: new Map(state.items).set(action.payload.value, action.payload.children),
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
return {
|
|
16
|
+
...state,
|
|
17
|
+
items: new Map(state.items).set(action.payload.value, action.payload.children),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
case 'REMOVE': {
|
|
21
|
+
const newMap = new Map(state.items);
|
|
22
|
+
newMap.delete(action.payload.value);
|
|
23
|
+
return { ...state, items: newMap };
|
|
24
|
+
}
|
|
25
|
+
case 'SELECT':
|
|
26
|
+
return { ...state, isActive: false, selected: action.payload.value };
|
|
27
|
+
case 'TOGGLE':
|
|
28
|
+
return { ...state, isActive: !state.isActive };
|
|
29
|
+
}
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectOption.css.d.ts","sourceRoot":"","sources":["../../../src/components/Select/SelectOption.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,QAUvB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { styleWithLayer } from '#styleUtils';
|
|
2
|
+
import { theme } from '#themes';
|
|
3
|
+
export const selectOption = styleWithLayer({
|
|
4
|
+
padding: '0.75em 0.5em',
|
|
5
|
+
transition: 'background-color 0.2s ease',
|
|
6
|
+
cursor: 'default',
|
|
7
|
+
':hover': {
|
|
8
|
+
backgroundColor: `rgb(${theme.color.accent})`,
|
|
9
|
+
},
|
|
10
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
interface SelectOptionProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const SelectOption: ({ children, value }: SelectOptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=SelectOption.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectOption.d.ts","sourceRoot":"","sources":["../../../src/components/Select/SelectOption.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAyB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAK9D,UAAU,iBAAiB;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,YAAY,GAAI,qBAAqB,iBAAiB,4CA2BlE,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useContext, useEffect } from 'react';
|
|
4
|
+
import { SelectContext } from './SelectContext';
|
|
5
|
+
import * as s from './SelectOption.css';
|
|
6
|
+
export const SelectOption = ({ children, value }) => {
|
|
7
|
+
const selectContext = useContext(SelectContext);
|
|
8
|
+
if (!selectContext) {
|
|
9
|
+
throw new Error('SelectOption must be rendered within a Select.');
|
|
10
|
+
}
|
|
11
|
+
const { dispatch } = selectContext;
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
dispatch({ type: 'ADD', payload: { value, children } });
|
|
14
|
+
return () => {
|
|
15
|
+
dispatch({ type: 'REMOVE', payload: { value } });
|
|
16
|
+
};
|
|
17
|
+
// eslint-disable-next-line
|
|
18
|
+
}, [dispatch, value]);
|
|
19
|
+
const handleClick = () => {
|
|
20
|
+
dispatch({ type: 'SELECT', payload: { value } });
|
|
21
|
+
};
|
|
22
|
+
return (_jsx("div", { className: s.selectOption, onClick: handleClick, children: children }));
|
|
23
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const container: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
2
|
+
isVisible: {
|
|
3
|
+
true: {
|
|
4
|
+
display: "block";
|
|
5
|
+
};
|
|
6
|
+
false: {
|
|
7
|
+
display: "none";
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
isAbove: {
|
|
11
|
+
true: {
|
|
12
|
+
top: "100%";
|
|
13
|
+
};
|
|
14
|
+
false: {
|
|
15
|
+
bottom: "100%";
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
}>;
|
|
19
|
+
//# sourceMappingURL=SelectOptionList.css.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectOptionList.css.d.ts","sourceRoot":"","sources":["../../../src/components/Select/SelectOptionList.css.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;EAkDpB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { keyframes } from '@vanilla-extract/css';
|
|
2
|
+
import { recipeWithLayer } from '#styleUtils';
|
|
3
|
+
import { theme } from '#themes';
|
|
4
|
+
const fadeIn = keyframes({
|
|
5
|
+
'0%': {
|
|
6
|
+
transform: 'scale(0.95)',
|
|
7
|
+
opacity: 0,
|
|
8
|
+
},
|
|
9
|
+
'100%': {
|
|
10
|
+
transform: 'scale(1)',
|
|
11
|
+
opacity: 1,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
export const container = recipeWithLayer({
|
|
15
|
+
base: {
|
|
16
|
+
overflowY: 'auto',
|
|
17
|
+
position: 'absolute',
|
|
18
|
+
zIndex: '10',
|
|
19
|
+
width: '100%',
|
|
20
|
+
minWidth: 'max-content',
|
|
21
|
+
border: `1px solid rgb(${theme.color.border})`,
|
|
22
|
+
borderRadius: theme.borderRadius,
|
|
23
|
+
margin: '0.5rem 0',
|
|
24
|
+
backgroundColor: `rgb(${theme.color.background})`,
|
|
25
|
+
animation: `${fadeIn} 0.3s ease 1`,
|
|
26
|
+
transformOrigin: '0 0',
|
|
27
|
+
userSelect: 'none',
|
|
28
|
+
'::-webkit-scrollbar': {
|
|
29
|
+
width: '0.25rem',
|
|
30
|
+
height: '0.25rem',
|
|
31
|
+
},
|
|
32
|
+
'::-webkit-scrollbar-thumb': {
|
|
33
|
+
borderRadius: '0.5rem',
|
|
34
|
+
backgroundColor: `rgb(${theme.color['muted-foreground']})`,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
variants: {
|
|
38
|
+
isVisible: {
|
|
39
|
+
true: {
|
|
40
|
+
display: 'block',
|
|
41
|
+
},
|
|
42
|
+
false: {
|
|
43
|
+
display: 'none',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
isAbove: {
|
|
47
|
+
true: {
|
|
48
|
+
top: '100%',
|
|
49
|
+
},
|
|
50
|
+
false: {
|
|
51
|
+
bottom: '100%',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
interface SelectOptionListProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
declare const SelectOptionList: ({ children }: SelectOptionListProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default SelectOptionList;
|
|
7
|
+
//# sourceMappingURL=SelectOptionList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectOptionList.d.ts","sourceRoot":"","sources":["../../../src/components/Select/SelectOptionList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AASpE,UAAU,qBAAqB;IAC7B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,QAAA,MAAM,gBAAgB,GAAI,cAAc,qBAAqB,4CA2C5D,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useContext, useMemo, useRef } from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { sprinkles } from '#styles';
|
|
5
|
+
import { SelectContext } from './SelectContext';
|
|
6
|
+
import * as s from './SelectOptionList.css';
|
|
7
|
+
const SelectOptionList = ({ children }) => {
|
|
8
|
+
const selectContext = useContext(SelectContext);
|
|
9
|
+
const containerRef = useRef(null);
|
|
10
|
+
if (!selectContext) {
|
|
11
|
+
throw new Error('SelectOption must be rendered within a Select.');
|
|
12
|
+
}
|
|
13
|
+
const { state } = selectContext;
|
|
14
|
+
const isAbove = useMemo(() => {
|
|
15
|
+
const container = containerRef.current;
|
|
16
|
+
const parent = state.containerRef.current;
|
|
17
|
+
if (!state.isActive || !container || !parent) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const parentRect = parent.getBoundingClientRect();
|
|
21
|
+
container.style.display = 'block';
|
|
22
|
+
const containerRect = container.getBoundingClientRect();
|
|
23
|
+
container.style.display = '';
|
|
24
|
+
// 하단에 리스트를 모두 보여줄 공간이 충분한 경우
|
|
25
|
+
if (containerRect.top + containerRect.height < window.innerHeight) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
// 그렇지 않으면 parent의 상단/하단 중 공간이 더 넓은 쪽으로 리스트를 보여줌
|
|
29
|
+
return parentRect.top + parentRect.height / 2 < window.innerHeight / 2;
|
|
30
|
+
}, [state.isActive, state.containerRef]);
|
|
31
|
+
return (_jsx("div", { ref: containerRef, className: clsx(s.container({ isVisible: state.isActive, isAbove }), sprinkles({ boxShadow: 'accent-sm' })), children: children }));
|
|
32
|
+
};
|
|
33
|
+
export default SelectOptionList;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare const children: string;
|
|
2
|
+
export declare const icon: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
3
|
+
isActive: {
|
|
4
|
+
false: {
|
|
5
|
+
transform: "rotate(0)";
|
|
6
|
+
};
|
|
7
|
+
true: {
|
|
8
|
+
color: `rgb(var(--${string}))`;
|
|
9
|
+
transform: "rotate(-180deg)";
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
}>;
|
|
13
|
+
export declare const selectTrigger: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
14
|
+
isActive: {
|
|
15
|
+
true: {
|
|
16
|
+
borderColor: `rgb(var(--${string}))`;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
variant: {
|
|
20
|
+
contained: {
|
|
21
|
+
padding: "0.75em 0.75em";
|
|
22
|
+
borderRadius: `var(--${string})`;
|
|
23
|
+
backgroundColor: `rgb(var(--${string}))`;
|
|
24
|
+
};
|
|
25
|
+
outlined: {
|
|
26
|
+
padding: "0.75em 0.5em";
|
|
27
|
+
border: "1px solid";
|
|
28
|
+
borderColor: `rgb(var(--${string}))`;
|
|
29
|
+
borderRadius: `var(--${string})`;
|
|
30
|
+
backgroundColor: `rgb(var(--${string}))`;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
}>;
|
|
34
|
+
//# sourceMappingURL=SelectTrigger.css.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectTrigger.css.d.ts","sourceRoot":"","sources":["../../../src/components/Select/SelectTrigger.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,QAAQ,QAInB,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;;;;;;EAqBf,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;EAsCxB,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { style } from '@vanilla-extract/css';
|
|
2
|
+
import { recipe } from '@vanilla-extract/recipes';
|
|
3
|
+
import { theme } from '#themes';
|
|
4
|
+
export const children = style({
|
|
5
|
+
overflow: 'hidden',
|
|
6
|
+
textOverflow: 'ellipsis',
|
|
7
|
+
whiteSpace: 'nowrap',
|
|
8
|
+
});
|
|
9
|
+
export const icon = recipe({
|
|
10
|
+
base: {
|
|
11
|
+
flexShrink: '0',
|
|
12
|
+
lineHeight: '0',
|
|
13
|
+
transition: 'color 0.2s ease, transform 0.2s ease',
|
|
14
|
+
},
|
|
15
|
+
variants: {
|
|
16
|
+
isActive: {
|
|
17
|
+
false: {
|
|
18
|
+
transform: 'rotate(0)',
|
|
19
|
+
},
|
|
20
|
+
true: {
|
|
21
|
+
color: `rgb(${theme.color.primary})`,
|
|
22
|
+
transform: 'rotate(-180deg)',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
export const selectTrigger = recipe({
|
|
28
|
+
base: {
|
|
29
|
+
display: 'flex',
|
|
30
|
+
alignItems: 'center',
|
|
31
|
+
gap: '0.5em',
|
|
32
|
+
justifyContent: 'space-between',
|
|
33
|
+
width: '100%',
|
|
34
|
+
transition: 'border-color 0.2s ease',
|
|
35
|
+
cursor: 'pointer',
|
|
36
|
+
userSelect: 'none',
|
|
37
|
+
},
|
|
38
|
+
variants: {
|
|
39
|
+
isActive: {
|
|
40
|
+
true: {
|
|
41
|
+
borderColor: `rgb(${theme.color.primary})`,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
variant: {
|
|
45
|
+
contained: {
|
|
46
|
+
padding: '0.75em 0.75em',
|
|
47
|
+
borderRadius: theme.borderRadius,
|
|
48
|
+
backgroundColor: `rgb(${theme.color.secondary})`,
|
|
49
|
+
},
|
|
50
|
+
outlined: {
|
|
51
|
+
padding: '0.75em 0.5em',
|
|
52
|
+
border: '1px solid',
|
|
53
|
+
borderColor: `rgb(${theme.color.border})`,
|
|
54
|
+
borderRadius: theme.borderRadius,
|
|
55
|
+
backgroundColor: `rgb(${theme.color.background})`,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { UIComponent } from '#types';
|
|
2
|
+
import * as s from './SelectTrigger.css';
|
|
3
|
+
type SelectTriggerProps = UIComponent<'div', typeof s.selectTrigger>;
|
|
4
|
+
declare const SelectTrigger: ({ children, className, variant, sx: propSx, }: SelectTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export default SelectTrigger;
|
|
6
|
+
//# sourceMappingURL=SelectTrigger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectTrigger.d.ts","sourceRoot":"","sources":["../../../src/components/Select/SelectTrigger.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAG1C,OAAO,KAAK,CAAC,MAAM,qBAAqB,CAAC;AAEzC,KAAK,kBAAkB,GAAG,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,aAAa,CAAC,CAAC;AAErE,QAAA,MAAM,aAAa,GAAI,+CAKpB,kBAAkB,4CA4BpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useContext } from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { ChevronDownIcon } from 'lucide-react';
|
|
5
|
+
import { sx } from '#styles';
|
|
6
|
+
import { SelectContext } from './SelectContext';
|
|
7
|
+
import * as s from './SelectTrigger.css';
|
|
8
|
+
const SelectTrigger = ({ children, className, variant, sx: propSx, }) => {
|
|
9
|
+
const selectContext = useContext(SelectContext);
|
|
10
|
+
if (!selectContext) {
|
|
11
|
+
throw new Error('SelectTrigger must be rendered within a Select.');
|
|
12
|
+
}
|
|
13
|
+
const { state, dispatch } = selectContext;
|
|
14
|
+
const handleClick = () => {
|
|
15
|
+
dispatch({ type: 'TOGGLE' });
|
|
16
|
+
};
|
|
17
|
+
return (_jsxs("div", { className: clsx(s.selectTrigger({ isActive: state.isActive, variant }), className, sx(propSx)), onClick: handleClick, children: [_jsx("span", { className: s.children, children: children }), _jsx("span", { className: s.icon({ isActive: state.isActive }), children: _jsx(ChevronDownIcon, { size: "1em", strokeWidth: "2px" }) })] }));
|
|
18
|
+
};
|
|
19
|
+
export default SelectTrigger;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Select/index.tsx"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './Select';
|
|
2
|
-
export * from './SelectOption';
|
|
1
|
+
export * from './Select';
|
|
2
|
+
export * from './SelectOption';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.css.d.ts","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.css.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,QAAQ,QAUnB,CAAC"}
|