@lotte-innovate/ui-component-test 0.0.47 → 0.0.49
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +281 -78
- package/dist/lib/Typography/Header/index.d.ts +1 -1
- package/dist/lib/Typography/Header/{index.js → index.jsx} +7 -4
- package/dist/lib/Typography/Text/index.d.ts +1 -1
- package/dist/lib/Typography/Text/{index.js → index.jsx} +8 -5
- package/dist/lib/components/Accordion/index.d.ts +1 -1
- package/dist/lib/components/Accordion/{index.js → index.jsx} +19 -7
- package/dist/lib/components/AlertDialog/AlertDialogAction.d.ts +1 -1
- package/dist/lib/components/AlertDialog/{AlertDialogAction.js → AlertDialogAction.jsx} +6 -5
- package/dist/lib/components/AlertDialog/AlertDialogCancel.d.ts +1 -1
- package/dist/lib/components/AlertDialog/{AlertDialogCancel.js → AlertDialogCancel.jsx} +6 -5
- package/dist/lib/components/AlertDialog/{AlertDialogContent.js → AlertDialogContent.jsx} +9 -5
- package/dist/lib/components/AlertDialog/{AlertDialogDescription.js → AlertDialogDescription.jsx} +5 -15
- package/dist/lib/components/AlertDialog/AlertDialogRoot.d.ts +1 -1
- package/dist/lib/components/AlertDialog/{AlertDialogRoot.js → AlertDialogRoot.jsx} +6 -14
- package/dist/lib/components/AlertDialog/{AlertDialogTitle.js → AlertDialogTitle.jsx} +5 -15
- package/dist/lib/components/AlertDialog/AlertDialogTrigger.d.ts +1 -1
- package/dist/lib/components/AlertDialog/{AlertDialogTrigger.js → AlertDialogTrigger.jsx} +6 -5
- package/dist/lib/components/AspectRatio/{index.js → index.jsx} +6 -5
- package/dist/lib/components/Avatar/{index.js → index.jsx} +9 -5
- package/dist/lib/components/Badge/index.d.ts +1 -1
- package/dist/lib/components/Badge/{index.js → index.jsx} +6 -5
- package/dist/lib/components/BarChart/index.d.ts +3 -2
- package/dist/lib/components/BarChart/{index.js → index.jsx} +6 -7
- package/dist/lib/components/BubbleChart/index.d.ts +3 -2
- package/dist/lib/components/BubbleChart/{index.js → index.jsx} +7 -7
- package/dist/lib/components/Button/index.d.ts +1 -1
- package/dist/lib/components/Button/{index.js → index.jsx} +6 -5
- package/dist/lib/components/Callout/{CalloutIcon.js → CalloutIcon.jsx} +10 -5
- package/dist/lib/components/Callout/CalloutRoot.d.ts +1 -1
- package/dist/lib/components/Callout/{CalloutRoot.js → CalloutRoot.jsx} +8 -5
- package/dist/lib/components/Callout/{CalloutText.js → CalloutText.jsx} +5 -15
- package/dist/lib/components/Card/index.d.ts +1 -1
- package/dist/lib/components/Card/{index.js → index.jsx} +6 -5
- package/dist/lib/components/Checkbox/index.d.ts +1 -1
- package/dist/lib/components/Checkbox/{index.js → index.jsx} +14 -6
- package/dist/lib/components/CheckboxCard/index.d.ts +2 -2
- package/dist/lib/components/CheckboxCard/{index.js → index.jsx} +9 -7
- package/dist/lib/components/CheckboxGroup/CheckboxGroupItem.d.ts +1 -1
- package/dist/lib/components/CheckboxGroup/{CheckboxGroupItem.js → CheckboxGroupItem.jsx} +7 -15
- package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.d.ts +2 -2
- package/dist/lib/components/CheckboxGroup/{CheckboxGroupRoot.js → CheckboxGroupRoot.jsx} +6 -3
- package/dist/lib/components/CheckboxGroup/index.d.ts +1 -1
- package/dist/lib/components/ContextMenu/{ContextMenuCheckboxItem.js → ContextMenuCheckboxItem.jsx} +9 -16
- package/dist/lib/components/ContextMenu/{ContextMenuContent.js → ContextMenuContent.jsx} +8 -5
- package/dist/lib/components/ContextMenu/{ContextMenuGroup.js → ContextMenuGroup.jsx} +4 -14
- package/dist/lib/components/ContextMenu/{ContextMenuItem.js → ContextMenuItem.jsx} +7 -5
- package/dist/lib/components/ContextMenu/{ContextMenuItemIndicator.js → ContextMenuItemIndicator.jsx} +6 -5
- package/dist/lib/components/ContextMenu/{ContextMenuLabel.js → ContextMenuLabel.jsx} +6 -5
- package/dist/lib/components/ContextMenu/{ContextMenuRadioGroup.js → ContextMenuRadioGroup.jsx} +6 -14
- package/dist/lib/components/ContextMenu/{ContextMenuRadioItem.js → ContextMenuRadioItem.jsx} +9 -16
- package/dist/lib/components/ContextMenu/ContextMenuRoot.d.ts +1 -1
- package/dist/lib/components/ContextMenu/{ContextMenuRoot.js → ContextMenuRoot.jsx} +6 -14
- package/dist/lib/components/ContextMenu/{ContextMenuSeparator.js → ContextMenuSeparator.jsx} +5 -15
- package/dist/lib/components/ContextMenu/{ContextMenuSubContent.js → ContextMenuSubContent.jsx} +12 -9
- package/dist/lib/components/ContextMenu/{ContextMenuSubTrigger.js → ContextMenuSubTrigger.jsx} +11 -16
- package/dist/lib/components/ContextMenu/{ContextMenuTrigger.js → ContextMenuTrigger.jsx} +5 -15
- package/dist/lib/components/DataList/{DataListItem.js → DataListItem.jsx} +6 -5
- package/dist/lib/components/DataList/{DataListLabel.js → DataListLabel.jsx} +6 -5
- package/dist/lib/components/DataList/{DataListRoot.js → DataListRoot.jsx} +7 -15
- package/dist/lib/components/DataList/{DataListValue.js → DataListValue.jsx} +6 -5
- package/dist/lib/components/Dialog/{DialogAction.js → DialogAction.jsx} +6 -16
- package/dist/lib/components/Dialog/{DialogCancel.js → DialogCancel.jsx} +5 -15
- package/dist/lib/components/Dialog/{DialogContent.js → DialogContent.jsx} +6 -5
- package/dist/lib/components/Dialog/{DialogDescription.js → DialogDescription.jsx} +5 -15
- package/dist/lib/components/Dialog/DialogRoot.d.ts +1 -1
- package/dist/lib/components/Dialog/{DialogRoot.js → DialogRoot.jsx} +6 -14
- package/dist/lib/components/Dialog/{DialogSlot.js → DialogSlot.jsx} +5 -15
- package/dist/lib/components/Dialog/{DialogTitle.js → DialogTitle.jsx} +5 -15
- package/dist/lib/components/Dialog/{DialogTrigger.js → DialogTrigger.jsx} +4 -14
- package/dist/lib/components/Dialog/index.d.ts +1 -1
- package/dist/lib/components/DoughnutChart/index.d.ts +3 -2
- package/dist/lib/components/DoughnutChart/{index.js → index.jsx} +6 -6
- package/dist/lib/components/DropdownMenu/{DropdonMenuRadioGroup.js → DropdonMenuRadioGroup.jsx} +3 -13
- package/dist/lib/components/DropdownMenu/{DropdonMenuSubContent.js → DropdonMenuSubContent.jsx} +12 -9
- package/dist/lib/components/DropdownMenu/{DropdownMenuCheckboxItem.js → DropdownMenuCheckboxItem.jsx} +9 -16
- package/dist/lib/components/DropdownMenu/{DropdownMenuContent.js → DropdownMenuContent.jsx} +8 -5
- package/dist/lib/components/DropdownMenu/DropdownMenuItem.d.ts +1 -1
- package/dist/lib/components/DropdownMenu/{DropdownMenuItem.js → DropdownMenuItem.jsx} +7 -5
- package/dist/lib/components/DropdownMenu/{DropdownMenuItemIndicator.js → DropdownMenuItemIndicator.jsx} +6 -5
- package/dist/lib/components/DropdownMenu/{DropdownMenuLable.js → DropdownMenuLable.jsx} +5 -15
- package/dist/lib/components/DropdownMenu/{DropdownMenuRadioItem.js → DropdownMenuRadioItem.jsx} +9 -16
- package/dist/lib/components/DropdownMenu/DropdownMenuRoot.d.ts +2 -2
- package/dist/lib/components/DropdownMenu/{DropdownMenuRoot.js → DropdownMenuRoot.jsx} +4 -14
- package/dist/lib/components/DropdownMenu/{DropdownMenuSeparator.js → DropdownMenuSeparator.jsx} +3 -15
- package/dist/lib/components/DropdownMenu/{DropdownMenuSub.js → DropdownMenuSub.jsx} +2 -14
- package/dist/lib/components/DropdownMenu/{DropdownMenuSubTrigger.js → DropdownMenuSubTrigger.jsx} +9 -16
- package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.d.ts +1 -1
- package/dist/lib/components/DropdownMenu/{DropdownMenuTrigger.js → DropdownMenuTrigger.jsx} +5 -15
- package/dist/lib/components/DropdownMenu/index.d.ts +1 -1
- package/dist/lib/components/HoverCard/{HoverCardContent.js → HoverCardContent.jsx} +6 -5
- package/dist/lib/components/HoverCard/HoverCardRoot.d.ts +1 -1
- package/dist/lib/components/HoverCard/{HoverCardRoot.js → HoverCardRoot.jsx} +6 -14
- package/dist/lib/components/HoverCard/{HoverCardTrigger.js → HoverCardTrigger.jsx} +4 -14
- package/dist/lib/components/HoverCard/index.d.ts +1 -1
- package/dist/lib/components/IconButton/index.d.ts +1 -1
- package/dist/lib/components/IconButton/{index.js → index.jsx} +5 -4
- package/dist/lib/components/Inset/{index.js → index.jsx} +8 -5
- package/dist/lib/components/Label/index.d.ts +1 -1
- package/dist/lib/components/Label/{index.js → index.jsx} +5 -4
- package/dist/lib/components/LineChart/index.d.ts +3 -2
- package/dist/lib/components/LineChart/{index.js → index.jsx} +6 -7
- package/dist/lib/components/Menubar/{MenubarCheckboxItem.js → MenubarCheckboxItem.jsx} +9 -16
- package/dist/lib/components/Menubar/{MenubarContent.js → MenubarContent.jsx} +12 -9
- package/dist/lib/components/Menubar/{MenubarItem.js → MenubarItem.jsx} +7 -5
- package/dist/lib/components/Menubar/{MenubarItemIndicator.js → MenubarItemIndicator.jsx} +6 -5
- package/dist/lib/components/Menubar/{MenubarMenu.js → MenubarMenu.jsx} +2 -14
- package/dist/lib/components/Menubar/{MenubarRadioGroup.js → MenubarRadioGroup.jsx} +6 -14
- package/dist/lib/components/Menubar/{MenubarRadioItem.js → MenubarRadioItem.jsx} +9 -16
- package/dist/lib/components/Menubar/MenubarRoot.d.ts +1 -1
- package/dist/lib/components/Menubar/{MenubarRoot.js → MenubarRoot.jsx} +8 -5
- package/dist/lib/components/Menubar/{MenubarSeparator.js → MenubarSeparator.jsx} +5 -15
- package/dist/lib/components/Menubar/{MenubarSub.js → MenubarSub.jsx} +2 -14
- package/dist/lib/components/Menubar/{MenubarSubContent.js → MenubarSubContent.jsx} +7 -6
- package/dist/lib/components/Menubar/{MenubarSubTrigger.js → MenubarSubTrigger.jsx} +9 -16
- package/dist/lib/components/Menubar/{MenubarTrigger.js → MenubarTrigger.jsx} +6 -5
- package/dist/lib/components/NavigationMenu/{NavigationMenuContent.js → NavigationMenuContent.jsx} +6 -5
- package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.jsx +22 -0
- package/dist/lib/components/NavigationMenu/{NavigationMenuItem.js → NavigationMenuItem.jsx} +4 -14
- package/dist/lib/components/NavigationMenu/{NavigationMenuLink.js → NavigationMenuLink.jsx} +6 -5
- package/dist/lib/components/NavigationMenu/{NavigationMenuList.js → NavigationMenuList.jsx} +7 -5
- package/dist/lib/components/NavigationMenu/NavigationMenuRoot.d.ts +1 -1
- package/dist/lib/components/NavigationMenu/{NavigationMenuRoot.js → NavigationMenuRoot.jsx} +7 -15
- package/dist/lib/components/NavigationMenu/{NavigationMenuTrigger.js → NavigationMenuTrigger.jsx} +7 -5
- package/dist/lib/components/NavigationMenu/{NavigationMenuViewport.js → NavigationMenuViewport.jsx} +6 -5
- package/dist/lib/components/PieChart/index.d.ts +3 -2
- package/dist/lib/components/PieChart/{index.js → index.jsx} +6 -6
- package/dist/lib/components/Popover/{PopoverClose.js → PopoverClose.jsx} +5 -15
- package/dist/lib/components/Popover/{PopoverContent.js → PopoverContent.jsx} +6 -5
- package/dist/lib/components/Popover/PopoverRoot.d.ts +1 -1
- package/dist/lib/components/Popover/{PopoverRoot.js → PopoverRoot.jsx} +6 -14
- package/dist/lib/components/Popover/{PopoverTrigger.js → PopoverTrigger.jsx} +4 -14
- package/dist/lib/components/Popover/index.d.ts +1 -1
- package/dist/lib/components/Progress/{index.js → index.jsx} +6 -5
- package/dist/lib/components/RadarChart/index.d.ts +3 -2
- package/dist/lib/components/RadarChart/{index.js → index.jsx} +7 -7
- package/dist/lib/components/Radio/index.d.ts +1 -1
- package/dist/lib/components/Radio/{index.js → index.jsx} +10 -15
- package/dist/lib/components/RadioCards/{RadioCardsItem.js → RadioCardsItem.jsx} +5 -15
- package/dist/lib/components/RadioCards/{RadioCardsRoot.js → RadioCardsRoot.jsx} +10 -5
- package/dist/lib/components/RadioGroup/{RadioGroupItem.js → RadioGroupItem.jsx} +5 -15
- package/dist/lib/components/RadioGroup/RadioGroupRoot.d.ts +1 -1
- package/dist/lib/components/RadioGroup/{RadioGroupRoot.js → RadioGroupRoot.jsx} +9 -15
- package/dist/lib/components/ScrollArea/{index.js → index.jsx} +6 -14
- package/dist/lib/components/SegmentedControl/{SegmentedControlItem.js → SegmentedControlItem.jsx} +5 -15
- package/dist/lib/components/SegmentedControl/SegmentedControlRoot.d.ts +1 -1
- package/dist/lib/components/SegmentedControl/{SegmentedControlRoot.js → SegmentedControlRoot.jsx} +7 -4
- package/dist/lib/components/SegmentedControl/index.d.ts +1 -1
- package/dist/lib/components/Select/index.d.ts +1 -1
- package/dist/lib/components/Select/{index.js → index.jsx} +27 -10
- package/dist/lib/components/Separator/{index.js → index.jsx} +7 -4
- package/dist/lib/components/Skeleton/index.d.ts +1 -1
- package/dist/lib/components/Skeleton/{index.js → index.jsx} +7 -4
- package/dist/lib/components/Slider/index.d.ts +1 -1
- package/dist/lib/components/Slider/{index.js → index.jsx} +5 -4
- package/dist/lib/components/Spinner/index.d.ts +1 -1
- package/dist/lib/components/Spinner/{index.js → index.jsx} +7 -4
- package/dist/lib/components/TabNav/{index.js → index.jsx} +9 -15
- package/dist/lib/components/Table/index.d.ts +1 -1
- package/dist/lib/components/Table/{index.js → index.jsx} +25 -10
- package/dist/lib/components/Tabs/{index.js → index.jsx} +16 -7
- package/dist/lib/components/TextArea/index.d.ts +1 -1
- package/dist/lib/components/TextArea/{index.js → index.jsx} +5 -4
- package/dist/lib/components/TextField/index.d.ts +1 -1
- package/dist/lib/components/TextField/{index.js → index.jsx} +10 -5
- package/dist/lib/components/Toast/ToastActionButton.d.ts +1 -1
- package/dist/lib/components/Toast/{ToastActionButton.js → ToastActionButton.jsx} +7 -6
- package/dist/lib/components/Toast/ToastDescription.d.ts +1 -1
- package/dist/lib/components/Toast/{ToastDescription.js → ToastDescription.jsx} +7 -15
- package/dist/lib/components/Toast/{ToastRoot.js → ToastRoot.jsx} +11 -5
- package/dist/lib/components/Toast/ToastTitle.d.ts +1 -1
- package/dist/lib/components/Toast/{ToastTitle.js → ToastTitle.jsx} +5 -15
- package/dist/lib/components/Toggle/ToggleWithText.d.ts +1 -1
- package/dist/lib/components/Toggle/{ToggleWithText.js → ToggleWithText.jsx} +9 -7
- package/dist/lib/components/Toggle/index.d.ts +1 -1
- package/dist/lib/components/Toggle/{index.js → index.jsx} +6 -5
- package/dist/lib/components/ToggleGroup/ToggleGroupItem.d.ts +1 -1
- package/dist/lib/components/ToggleGroup/{ToggleGroupItem.js → ToggleGroupItem.jsx} +6 -16
- package/dist/lib/components/ToggleGroup/ToggleGroupRoot.d.ts +1 -1
- package/dist/lib/components/ToggleGroup/{ToggleGroupRoot.js → ToggleGroupRoot.jsx} +10 -5
- package/dist/lib/components/ToggleSwitch/{index.js → index.jsx} +9 -5
- package/dist/lib/components/Tooltip/index.d.ts +1 -1
- package/dist/lib/components/Tooltip/{index.js → index.jsx} +13 -4
- package/dist/lib/constants.js +2 -2
- package/dist/lib/index.d.ts +2 -2
- package/dist/lib/index.js +2 -2
- package/dist/lib/utils/useDarkMode.js +1 -1
- package/package.json +2 -4
- package/dist/globals.css +0 -4
- package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.js +0 -31
- package/dist/tailwind.config.d.ts +0 -3
- package/dist/tailwind.config.js +0 -141
- /package/dist/lib/components/AlertDialog/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/Callout/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/CheckboxGroup/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/ContextMenu/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/DataList/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/Dialog/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/DropdownMenu/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/HoverCard/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/Menubar/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/NavigationMenu/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/Popover/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/RadioCards/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/RadioGroup/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/SegmentedControl/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/Toast/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/ToggleGroup/{index.js → index.jsx} +0 -0
package/README.md
CHANGED
@@ -1,88 +1,62 @@
|
|
1
|
-
# LOTTE UI
|
1
|
+
# 🎨 LOTTE UI LIBRARY (L-UI)
|
2
2
|
|
3
3
|
<br />
|
4
4
|
|
5
|
-
##
|
5
|
+
## 📌목차
|
6
6
|
|
7
|
-
- [
|
8
|
-
- [
|
9
|
-
- [
|
10
|
-
- [
|
11
|
-
- [
|
12
|
-
- [
|
7
|
+
- [💁 소개](#소개)
|
8
|
+
- [🔨 기술스택](#기술스택)
|
9
|
+
- [💻 사전설치](#사전설치)
|
10
|
+
- [🟢 실행](#실행)
|
11
|
+
- [🛠️ 배포](#배포)
|
12
|
+
- [📁 구조](#구조)
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
모든 L-UI 구성 요소를 내보내는 단일 패키지입니다.
|
17
|
-
|
18
|
-
일관되고 통일된 컴포넌트를 제공하며 사용자 정의 및 재사용 가능합니다.
|
19
|
-
|
20
|
-
이 라이브러리는 React로 구축된 프로젝트를 지원합니다.
|
21
|
-
|
22
|
-
## Installation
|
23
|
-
|
24
|
-
패키지를 설치하기 위해 아래 명령어를 사용합니다.
|
25
|
-
|
26
|
-
```bash
|
27
|
-
npm i @lotte-innovate/lui
|
28
|
-
```
|
29
|
-
|
30
|
-
```bash
|
31
|
-
yarn add @lotte-innovate/lui
|
32
|
-
```
|
14
|
+
<br />
|
33
15
|
|
34
|
-
##
|
16
|
+
## 💁소개
|
35
17
|
|
36
|
-
|
18
|
+
<b>Lotte Innovate 디자인 가이드를 적용한 전사 표준 UI 라이브러리입니다.</b>
|
37
19
|
|
38
|
-
|
20
|
+
#### 주요 특징
|
39
21
|
|
40
|
-
|
41
|
-
import '@lotte-innovate/lui/dist/globals.css';
|
42
|
-
```
|
22
|
+
- <b>웹 표준 및 접근성 준수</b>
|
43
23
|
|
44
|
-
|
24
|
+
- Headless UI Library인 radix-ui를 사용하여 웹 접근성을 보장합니다.
|
25
|
+
- 정부 UI/UX 가이드라인을 준수하여 개발되었습니다.
|
45
26
|
|
46
|
-
|
27
|
+
- <b>다양한 컴포넌트</b>
|
47
28
|
|
48
|
-
|
49
|
-
import React from 'react';
|
50
|
-
import { Button } from '@lotte-innovate/lui';
|
29
|
+
- 45가지의 UI 컴포넌트와 6가지의 차트를 제공합니다.
|
51
30
|
|
52
|
-
|
53
|
-
return (
|
54
|
-
<div>
|
55
|
-
<Button onClick={() => alert('Button clicked!')}>Click Me</Button>
|
56
|
-
</div>
|
57
|
-
);
|
58
|
-
};
|
31
|
+
- <b>일관된 디자인</b>
|
59
32
|
|
60
|
-
|
61
|
-
|
33
|
+
- 모든 컴포넌트와 차트에 공통 Props (Color, Radius, Scaling, Weight, Appearance, Size)를 적용하여 디자인의 통일성을 유지합니다.
|
34
|
+
- 다크모드에서도 표준화된 색상을 적용하여 모든 컴포넌트에 일관되게 적용욉니다.
|
35
|
+
- [피그마 디자인 가이드 바로가기](https://www.figma.com/design/tlcB7UYdvUNzPk5T66FqLf/UI-%EB%9D%BC%EC%9D%B4%EB%B8%8C%EB%9F%AC%EB%A6%AC-%EA%B3%B5%EC%9C%A0%EC%9A%A9?node-id=0-1&node-type=canvas&t=PEwpe2j6PilPTwXC-0)
|
62
36
|
|
63
|
-
|
37
|
+
- <b>스토리북 통합</b>
|
64
38
|
|
65
|
-
|
66
|
-
|
67
|
-
import { IconButton } from '@lotte-innovate/lui';
|
68
|
-
import { MagnifyingGlassIcon } from '@radix-ui/react-icons';
|
39
|
+
- Storybook을 활용하여 컴포넌트를 문서화하고 테스트할 수 있습니다.
|
40
|
+
- [스토리북 바로가기](https://66849ef80cb87f1ca900f051-tqldgzbipz.chromatic.com/?path=/docs/welcome--docs)
|
69
41
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
<IconButton>
|
74
|
-
<MagnifyingGlassIcon />
|
75
|
-
</IconButton>
|
76
|
-
</div>
|
77
|
-
);
|
78
|
-
};
|
42
|
+
- <b>npm 패키지 배포</b>
|
43
|
+
- 디자인 시스템은 npm 패키지로 배포되어, 프로젝트에 쉽게 설치하고 사용할 수 있습니다.
|
44
|
+
- [NPM 패키지 바로가기](https://www.npmjs.com/package/@lotte-innovate/lui)
|
79
45
|
|
80
|
-
|
81
|
-
|
46
|
+
<br />
|
47
|
+
<details>
|
48
|
+
<summary>공통 Props 목록</summary>
|
82
49
|
|
83
|
-
|
50
|
+
| name | description | 단계 | option |
|
51
|
+
| ---------- | ------------------------------------------------- | -------- | --------------------------------------------- |
|
52
|
+
| Color | 27가지 색상을 라이트/다크/알파/알파다크 모드 제공 | 1~12단계 | blue, crimson, teal, orange, purple, amber... |
|
53
|
+
| Radius | 컴포넌트의 둥글기 적용 | 5단계 | none, small, medium, large, full |
|
54
|
+
| Scaling | 컴포넌트의 비율 | 5단계 | 90%, 95%, 100%, 105%, 110% |
|
55
|
+
| Weight | 컴포넌트의 텍스트 굵기 | 4단계 | regular, medium, semibold, bold |
|
56
|
+
| Appearance | 컴포넌트의 디자인 스타일 | 6단계 | classic, ghost, outline, soft, solid, surface |
|
57
|
+
| Size | 컴포넌트의 크기 | 5단계 | x-small, small, medium, large, x-large |
|
84
58
|
|
85
|
-
|
59
|
+
</details>
|
86
60
|
|
87
61
|
<details>
|
88
62
|
<summary>컴포넌트 목록</summary>
|
@@ -112,22 +86,251 @@ export default App;
|
|
112
86
|
|
113
87
|
</details>
|
114
88
|
|
115
|
-
<
|
116
|
-
<summary>공통 Props 목록</summary>
|
89
|
+
<br />
|
117
90
|
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
91
|
+
#### 스토리북 주요 화면
|
92
|
+
|
93
|
+
<div>
|
94
|
+
<div>
|
95
|
+
<p>Light, Dark Color</p>
|
96
|
+
<img src="/uploads/6ff420bc359758218c69e3fdabd9ec38/color.png" width="40%" />
|
97
|
+
<img src="/uploads/5c6296dc810dd5668330520057a094f4/color-dark.png" width="40%" />
|
98
|
+
</div>
|
99
|
+
<div>
|
100
|
+
<p>Header, Checkbox Component</p>
|
101
|
+
<img src="/uploads/8a01ff02586bf822f17e3f06f70f1857/header.png" width="40%" />
|
102
|
+
<img src="/uploads/a44c67d88d699d84dcb38a16900a2654/checkbox.png" width="40%" />
|
103
|
+
</div>
|
104
|
+
<div>
|
105
|
+
<p>SegmentedControl, Doughnutchart Component</p>
|
106
|
+
<img src="/uploads/54d0265e45325d56a8f5df5a947560d4/segmented.png" width="40%" />
|
107
|
+
<img src="/uploads/1e2d25043446da8c67ce62334043618b/doughnut-chart.png" width="40%" />
|
108
|
+
</div>
|
109
|
+
<div>
|
110
|
+
<p>Dark 모드일때 ToggleGroup, Dropdown Component</p>
|
111
|
+
<img src="/uploads/059d20ecfbc22f0864f4b769f30a1723/dark-toggle.png" width="40%" />
|
112
|
+
<img src="/uploads/d4b7006f59bb35a166105dad34ee232f/dark-dropdown.png" width="40%" />
|
113
|
+
</div>
|
114
|
+
</div>
|
126
115
|
|
127
|
-
|
116
|
+
<br />
|
117
|
+
|
118
|
+
## 🔨기술스택
|
119
|
+
|
120
|
+
#### Environment
|
121
|
+
|
122
|
+
![Visual Studio Code](https://img.shields.io/badge/Visual%20Studio%20Code-007ACC?style=for-the-badge&logo=Visual%20Studio%20Code&logoColor=white)
|
123
|
+
![Git](https://img.shields.io/badge/Git-F05032?style=for-the-badge&logo=Git&logoColor=white)
|
124
|
+
![Github](https://img.shields.io/badge/Gitlab-FC6D26?style=for-the-badge&logo=GitLab&logoColor=white)
|
125
|
+
|
126
|
+
#### Config
|
127
|
+
|
128
|
+
![npm](https://img.shields.io/badge/npm-CB3837?style=for-the-badge&logo=npm&logoColor=white)
|
129
|
+
|
130
|
+
#### Development
|
131
|
+
|
132
|
+
![JavaScript](https://img.shields.io/badge/JavaScript-F7DF1E?style=for-the-badge&logo=Javascript&logoColor=white)
|
133
|
+
![React](https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB)
|
134
|
+
![Next.js](https://img.shields.io/badge/Next.js-000000?style=for-the-badge&logo=Next.js&logoColor=white)
|
135
|
+
![tailwind CSS](https://img.shields.io/badge/TailwindCSS-06B6D4?style=for-the-badge&logo=TailwindCSS&logoColor=white)
|
136
|
+
![storybook](https://img.shields.io/badge/storybook-FF4785?style=for-the-badge&logo=storybook&logoColor=white)
|
137
|
+
|
138
|
+
#### Communication
|
139
|
+
|
140
|
+
![Figma](https://img.shields.io/badge/Figma-F24E1E?style=for-the-badge&logo=Figma&logoColor=white)
|
141
|
+
![Github Issues](https://img.shields.io/badge/Github%20Issues-FC6D26?style=for-the-badge&logo=GitLab&logoColor=white)
|
142
|
+
|
143
|
+
#### Reference
|
144
|
+
|
145
|
+
![RadixUI](https://img.shields.io/badge/Radix%20UI-161618?style=for-the-badge&logo=RadixUI&logoColor=white)
|
146
|
+
![Chartjs](https://img.shields.io/badge/Chart.js-FF6384?style=for-the-badge&logo=Chart.js&logoColor=white)
|
147
|
+
|
148
|
+
<br />
|
149
|
+
|
150
|
+
## 💻사전설치
|
151
|
+
|
152
|
+
이 라이브러리는 React로 구축된 프로젝트를 지원하며 주요 사전 설치 라이브러리는 아래와 같습니다.
|
153
|
+
|
154
|
+
- radix-ui/primitives
|
155
|
+
- 컴포넌트 개발 시 활용할 라이브러리로 필요한 컴포넌트 별 설치
|
156
|
+
|
157
|
+
```shell
|
158
|
+
npm install @radix-ui/react-accordion@latest -E
|
159
|
+
```
|
160
|
+
|
161
|
+
- radix-ui/theme
|
162
|
+
- 일부 컴포넌트는 스타일이 적용된 theme 라이브러리 설치
|
163
|
+
|
164
|
+
```shell
|
165
|
+
npm install @radix-ui/themes -E
|
166
|
+
```
|
167
|
+
|
168
|
+
- chart.js
|
169
|
+
- 차트 컴포넌트 개발 시 활용
|
170
|
+
|
171
|
+
```shell
|
172
|
+
npm install chart.js
|
173
|
+
```
|
174
|
+
|
175
|
+
- storybook
|
176
|
+
- 컴포넌트 디자인 테스트를 위해 설치
|
177
|
+
|
178
|
+
```shell
|
179
|
+
npx sb init
|
180
|
+
npx storybook@latest add @storybook/addon-styling-webpack
|
181
|
+
```
|
182
|
+
|
183
|
+
- clsx
|
184
|
+
- 조건부 className 작성을 위해 사용
|
185
|
+
|
186
|
+
```shell
|
187
|
+
npm i clsx
|
188
|
+
```
|
189
|
+
|
190
|
+
- tailwind-merge
|
191
|
+
- 스타일 충돌 없이 자바스크립트에서 tailwind CSS 클래스를 효율적으로 병합하는 기능을 가진 라이브러리
|
192
|
+
|
193
|
+
```shell
|
194
|
+
npm i tailwind-merge
|
195
|
+
```
|
196
|
+
|
197
|
+
- class-variance-authority (CVA)
|
198
|
+
- 일관성 있는 UI를 정의하고 사용할 수 있도록 도와주는 툴로써 shadcn/ui 컴포넌트의 핵심 도구
|
199
|
+
|
200
|
+
```shell
|
201
|
+
npm i class-variance-authority
|
202
|
+
```
|
128
203
|
|
129
204
|
<br />
|
130
205
|
|
131
|
-
##
|
206
|
+
## 🟢실행
|
207
|
+
|
208
|
+
- 개발모드 실행
|
209
|
+
|
210
|
+
```shell
|
211
|
+
npm run dev
|
212
|
+
```
|
213
|
+
|
214
|
+
- 스토리북 실행
|
215
|
+
|
216
|
+
```shell
|
217
|
+
npm run storybook
|
218
|
+
```
|
219
|
+
|
220
|
+
> 접속주소(포트 6006 사용 시): `http://localhost:6006`
|
221
|
+
|
222
|
+
- 크로마틱 배포
|
223
|
+
- 터미널에서 크로마틱으로 배포된 주소 확인 가능
|
224
|
+
|
225
|
+
```shell
|
226
|
+
npm run chromatic
|
227
|
+
```
|
132
228
|
|
133
|
-
|
229
|
+
- 빌드
|
230
|
+
- 패키지 배포없이 스토리북과 컴포넌트 빌드가 필요할때 사용
|
231
|
+
|
232
|
+
```shell
|
233
|
+
npm run build:all
|
234
|
+
```
|
235
|
+
|
236
|
+
<br />
|
237
|
+
|
238
|
+
## 🛠️배포
|
239
|
+
|
240
|
+
> NPM 패키지로 배포하는 과정
|
241
|
+
|
242
|
+
- npm 로그인하기
|
243
|
+
|
244
|
+
```shell
|
245
|
+
npm login
|
246
|
+
```
|
247
|
+
|
248
|
+
- npm scope 배포
|
249
|
+
- npm 로그인 후, 조직 생성 시 @계정명 으로 scope 생성
|
250
|
+
scope로 생성된 패키지는 npm publish 시, 아래 옵션 추가
|
251
|
+
|
252
|
+
```shell
|
253
|
+
npm publish --access=public
|
254
|
+
```
|
255
|
+
|
256
|
+
- package.json "version" 수정 후 배포
|
257
|
+
- 버전 표기법
|
258
|
+
- 메이저: 기능 대거 추가 및 수정
|
259
|
+
- 마이너: 작은 기능 추가 및 수정
|
260
|
+
- 패치: 버그나 사소한 오류 수정
|
261
|
+
|
262
|
+
<br />
|
263
|
+
|
264
|
+
- npm 패키지 배포는 아래 명령어를 이용
|
265
|
+
|
266
|
+
```shell
|
267
|
+
npm run publish:npm
|
268
|
+
```
|
269
|
+
|
270
|
+
- package.json 에서 명시된 아래 파일들만 배포됨
|
271
|
+
|
272
|
+
```
|
273
|
+
"files": [
|
274
|
+
"dist/lib",
|
275
|
+
"dist/tailwind.config.d.ts",
|
276
|
+
"dist/tailwind.config.js",
|
277
|
+
"dist/globals.css"
|
278
|
+
],
|
279
|
+
```
|
280
|
+
|
281
|
+
<br />
|
282
|
+
|
283
|
+
## 📁구조
|
284
|
+
|
285
|
+
#### 디렉토리 구조
|
286
|
+
|
287
|
+
```
|
288
|
+
📦dist : 컴파일 시 생성되며 NPM 패키지로 배포됨
|
289
|
+
📦src
|
290
|
+
┣ 📂app
|
291
|
+
┃ ┣ 📜layout.tsx
|
292
|
+
┃ ┣ 📜page.tsx
|
293
|
+
┃ ┣ 📜stories.css : 스토리북 관련 CSS 파일
|
294
|
+
┃ ┣ 📜globals.css
|
295
|
+
┃ ┗ 📜styles.css
|
296
|
+
┣ 📂lib : NPM 패키지 배포에 필요한 컴포넌트가 들어있는 폴더
|
297
|
+
┃ ┣ 📂Typography
|
298
|
+
┃ ┃ ┣ 📂Header
|
299
|
+
┃ ┃ ┣ 📂Text
|
300
|
+
┃ ┃ ┗ 📜index.ts
|
301
|
+
┃ ┣ 📂color : 컴포넌트에서 사용하는 컬러 관련 파일 모음 폴더
|
302
|
+
┃ ┃ ┣ 📜alpha.ts
|
303
|
+
┃ ┃ ┣ 📜constants.ts
|
304
|
+
┃ ┃ ┣ 📜dark.ts
|
305
|
+
┃ ┃ ┣ 📜krdsColors.ts
|
306
|
+
┃ ┃ ┗ 📜light.ts
|
307
|
+
┃ ┣ 📂components : 배포되는 컴포넌트들이 들어있는 폴더
|
308
|
+
┃ ┃ ┣ 📂Accordion
|
309
|
+
┃ ┃ ┣ 📂AlertDialog
|
310
|
+
┃ ┃ ┣ 📂AspectRatio
|
311
|
+
┃ ┃ ┣ ...
|
312
|
+
┃ ┃ ┣ 📂ToggleGroup
|
313
|
+
┃ ┃ ┣ 📂ToggleSwitch
|
314
|
+
┃ ┃ ┣ 📂Tooltip
|
315
|
+
┃ ┃ ┗ 📜index.ts
|
316
|
+
┃ ┣ 📂utils
|
317
|
+
┃ ┃ ┗ 📜utils.ts : 공통 유틸 함수
|
318
|
+
┃ ┣ 📜README.md : NPM 전용 README 파일
|
319
|
+
┣ 📂stories : 디자인 테스트를 위한 스토리북 폴더
|
320
|
+
┃ ┣ 📂accordion
|
321
|
+
┃ ┣ 📂alert-dialog
|
322
|
+
┃ ┣ 📂aspect-ratio
|
323
|
+
┃ ┣ 📂assets : 스토리북 관련 이미지 폴더
|
324
|
+
┃ ┣ ...
|
325
|
+
┃ ┣ 📂toggle
|
326
|
+
┃ ┣ 📂tooltip
|
327
|
+
┃ ┣ 📜DarkAlphaColors.mdx
|
328
|
+
┃ ┣ 📜DarkColors.mdx
|
329
|
+
┃ ┣ 📜LightAlphaColors.mdx
|
330
|
+
┃ ┣ 📜LightColors.mdx
|
331
|
+
┃ ┣ 📜Welcome.mdx
|
332
|
+
┃ ┗ 📜Welcome.tsx
|
333
|
+
┗ 📂utils : 패키지 배포에 필요한 함수 모음
|
334
|
+
┣ 📜move.js
|
335
|
+
┗ 📜post-publish.js
|
336
|
+
```
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
2
2
|
import React from 'react';
|
3
|
-
import { IColor } from '
|
3
|
+
import { IColor } from 'lib/types';
|
4
4
|
export interface HeaderProps extends VariantProps<typeof headerVariants> {
|
5
5
|
color?: IColor;
|
6
6
|
}
|
@@ -20,10 +20,9 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import {
|
24
|
-
import { cn } from '../../../lib/utils/utils';
|
23
|
+
import { cn } from 'lib/utils/utils';
|
25
24
|
import { cva } from 'class-variance-authority';
|
26
|
-
import { textColorStyle, weightVariants } from '
|
25
|
+
import { textColorStyle, weightVariants } from 'lib/constants';
|
27
26
|
import { Heading as HeadingTheme, Theme } from '@radix-ui/themes';
|
28
27
|
import React from 'react';
|
29
28
|
var weights = __assign({}, weightVariants);
|
@@ -49,7 +48,11 @@ export var Header = React.forwardRef(function (_a, ref) {
|
|
49
48
|
var className = _a.className, children = _a.children, size = _a.size, weight = _a.weight, color = _a.color, headers = _a.headers, align = _a.align, rootProps = __rest(_a, ["className", "children", "size", "weight", "color", "headers", "align"]);
|
50
49
|
if (!headers)
|
51
50
|
headers = 'h1';
|
52
|
-
return (
|
51
|
+
return (<Theme>
|
52
|
+
<HeadingTheme ref={ref} as={headers} size={size} align={align} className={cn('leading-normal', headerVariants({ weight: weight, color: color }), className)} {...rootProps}>
|
53
|
+
{children}
|
54
|
+
</HeadingTheme>
|
55
|
+
</Theme>);
|
53
56
|
});
|
54
57
|
Header.displayName = 'Header';
|
55
58
|
export default Header;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
3
|
-
import { IColor, ITypoSize } from '
|
3
|
+
import { IColor, ITypoSize } from 'lib/types';
|
4
4
|
export interface TextProps extends VariantProps<typeof textVariants> {
|
5
5
|
color?: IColor;
|
6
6
|
size?: ITypoSize;
|
@@ -20,12 +20,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import {
|
24
|
-
import { forwardRef } from 'react';
|
23
|
+
import React, { forwardRef } from 'react';
|
25
24
|
import { cva } from 'class-variance-authority';
|
26
25
|
import { Text as TextTheme, Theme } from '@radix-ui/themes';
|
27
|
-
import { textColorStyle, weightVariants } from '
|
28
|
-
import { cn } from '
|
26
|
+
import { textColorStyle, weightVariants } from 'lib/constants';
|
27
|
+
import { cn } from 'lib/utils/utils';
|
29
28
|
var textVariants = cva('', {
|
30
29
|
variants: {
|
31
30
|
weight: __assign({ light: 'font-light' }, weightVariants),
|
@@ -38,7 +37,11 @@ var textVariants = cva('', {
|
|
38
37
|
});
|
39
38
|
export var Text = forwardRef(function (_a, ref) {
|
40
39
|
var className = _a.className, children = _a.children, as = _a.as, align = _a.align, weight = _a.weight, color = _a.color, size = _a.size, props = __rest(_a, ["className", "children", "as", "align", "weight", "color", "size"]);
|
41
|
-
return (
|
40
|
+
return (<Theme>
|
41
|
+
<TextTheme as={as} ref={ref} size={size} align={align} className={cn(textVariants({ weight: weight, color: color }), className)} {...props}>
|
42
|
+
{children}
|
43
|
+
</TextTheme>
|
44
|
+
</Theme>);
|
42
45
|
});
|
43
46
|
Text.displayName = 'Text';
|
44
47
|
export default Text;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
4
|
-
import { IColor } from '
|
4
|
+
import { IColor } from 'lib/types';
|
5
5
|
export interface AccordionProps extends React.InputHTMLAttributes<HTMLInputElement>, VariantProps<typeof accoridanVariants> {
|
6
6
|
defaultValue?: string;
|
7
7
|
color?: IColor;
|
@@ -20,13 +20,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
24
23
|
import React from 'react';
|
25
24
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
26
25
|
import { ChevronDownIcon } from '@radix-ui/react-icons';
|
27
|
-
import { cn } from '
|
26
|
+
import { cn } from 'lib/utils/utils';
|
28
27
|
import { cva } from 'class-variance-authority';
|
29
|
-
import { scalingVariants } from '
|
28
|
+
import { scalingVariants } from 'lib/constants';
|
30
29
|
var accoridanVariants = cva('', {
|
31
30
|
variants: {
|
32
31
|
scaling: __assign({}, scalingVariants),
|
@@ -37,22 +36,35 @@ var accoridanVariants = cva('', {
|
|
37
36
|
});
|
38
37
|
export var Root = React.forwardRef(function (_a, forwardedRef) {
|
39
38
|
var className = _a.className, children = _a.children, scaling = _a.scaling, rootProps = __rest(_a, ["className", "children", "scaling"]);
|
40
|
-
return (
|
39
|
+
return (<AccordionPrimitive.Root className={cn('w-[280px] rounded-md border border-slateA-4 dark:border-slateDarkA-4', accoridanVariants({ scaling: scaling }), className)} {...rootProps} ref={forwardedRef}>
|
40
|
+
{children}
|
41
|
+
</AccordionPrimitive.Root>);
|
41
42
|
});
|
42
43
|
Root.displayName = 'Accordion.Root';
|
43
44
|
export var Item = React.forwardRef(function (_a, forwardedRef) {
|
44
45
|
var className = _a.className, children = _a.children, rootProps = __rest(_a, ["className", "children"]);
|
45
|
-
return (
|
46
|
+
return (<AccordionPrimitive.Item {...rootProps} ref={forwardedRef} className={cn('mt-px w-[278px] overflow-hidden first:mt-0 first:rounded-t last:rounded-b', className)}>
|
47
|
+
{children}
|
48
|
+
</AccordionPrimitive.Item>);
|
46
49
|
});
|
47
50
|
Item.displayName = 'Accordion.Item';
|
48
51
|
export var Trigger = React.forwardRef(function (_a, forwardedRef) {
|
49
52
|
var className = _a.className, children = _a.children, _b = _a.color, color = _b === void 0 ? 'red' : _b, rootProps = __rest(_a, ["className", "children", "color"]);
|
50
|
-
return (
|
53
|
+
return (<AccordionPrimitive.Header {...rootProps} className={cn('flex', className)}>
|
54
|
+
<AccordionPrimitive.Trigger {...rootProps} ref={forwardedRef} className={cn("group flex h-[44px] w-[278px] cursor-default items-center justify-between px-[20px] py-[10px] text-base font-normal", "dark:bg-[#111113] text-".concat(color, "A-11 dark:text-").concat(color, "Dark-11 "), "hover:bg-".concat(color, "A-4 dark:hover:bg-").concat(color, "Dark-4 hover:text-").concat(color, "A-11 dark:hover:text-").concat(color, "DarkA-11"), "data-[state=open]:bg-".concat(color, "A-5 dark:data-[state=open]:bg-").concat(color, "DarkA-5"), "disabled:bg-slateA-3 disabled:text-slateA-8 disabled:dark:bg-slateDarkA-3 disabled:dark:text-slateDarkA-8", className)}>
|
55
|
+
{children}
|
56
|
+
<ChevronDownIcon className="transition-transform duration-300 ease-[cubic-bezier(0.87,_0,_0.13,_1)] group-data-[state=open]:rotate-180" aria-hidden/>
|
57
|
+
</AccordionPrimitive.Trigger>
|
58
|
+
</AccordionPrimitive.Header>);
|
51
59
|
});
|
52
60
|
Trigger.displayName = 'Accordion.Trigger';
|
53
61
|
export var Content = React.forwardRef(function (_a, forwardedRef) {
|
54
62
|
var className = _a.className, children = _a.children, rootProps = __rest(_a, ["className", "children"]);
|
55
|
-
return (
|
63
|
+
return (<AccordionPrimitive.Content {...rootProps} ref={forwardedRef} className={cn('max-h-[800px] w-[278px] overflow-hidden border-t border-t-slateA-4 bg-slateA-2 text-[16px] text-slateA-11 data-[state=closed]:animate-slideUp data-[state=open]:animate-slideDown dark:border-t-slateDarkA-4 dark:bg-slateDarkA-2 dark:text-slateDarkA-11', className)}>
|
64
|
+
<div className="h-auto max-h-[1000px] overflow-y-auto px-[20px] py-[15px] text-base font-normal">
|
65
|
+
{children}
|
66
|
+
</div>
|
67
|
+
</AccordionPrimitive.Content>);
|
56
68
|
});
|
57
69
|
Content.displayName = 'Accordion.Content';
|
58
70
|
var Accordion = {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
4
|
-
import { IAppearance } from '
|
4
|
+
import { IAppearance } from 'lib/types';
|
5
5
|
export interface AlertDialogActionProps extends VariantProps<typeof alertDialogActionVariants> {
|
6
6
|
appearance?: IAppearance;
|
7
7
|
}
|
@@ -20,12 +20,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import {
|
24
|
-
import { forwardRef } from 'react';
|
23
|
+
import React, { forwardRef } from 'react';
|
25
24
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
26
25
|
import { cva } from 'class-variance-authority';
|
27
|
-
import { cn } from '
|
28
|
-
import { appearanceStyle, primaryColorStyle, weightVariants } from '
|
26
|
+
import { cn } from 'lib/utils/utils';
|
27
|
+
import { appearanceStyle, primaryColorStyle, weightVariants } from 'lib/constants';
|
29
28
|
import { useAlertDialogContext } from './AlertDialogRoot';
|
30
29
|
export var alertDialogActionVariants = cva("inline-flex items-center justify-center px-[15px] outline-none focus:shadow-[0_0_0_2px] font-normal w-fit", {
|
31
30
|
variants: {
|
@@ -56,6 +55,8 @@ export var AlertDialogAction = forwardRef(function (_a, ref) {
|
|
56
55
|
var className = _a.className, children = _a.children, weight = _a.weight, props = __rest(_a, ["className", "children", "weight"]);
|
57
56
|
var _b = useAlertDialogContext(), radius = _b.radius, size = _b.size, _c = _b.color, color = _c === void 0 ? 'red' : _c, _d = _b.appearance, appearance = _d === void 0 ? 'solid' : _d;
|
58
57
|
var buttonClassName = cn(alertDialogActionVariants({ radius: radius, size: size, weight: weight, color: color }), appearanceStyle(appearance, color), className);
|
59
|
-
return (
|
58
|
+
return (<AlertDialogPrimitive.Action ref={ref} className={buttonClassName} {...props}>
|
59
|
+
{children}
|
60
|
+
</AlertDialogPrimitive.Action>);
|
60
61
|
});
|
61
62
|
AlertDialogAction.displayName = 'AlertDialog.Action';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
4
|
-
import { IAppearance } from '
|
4
|
+
import { IAppearance } from 'lib/types';
|
5
5
|
export interface AlertDialogCancelProps extends VariantProps<typeof alertDialogCancelVariants> {
|
6
6
|
appearance?: IAppearance;
|
7
7
|
}
|
@@ -20,12 +20,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import {
|
24
|
-
import { forwardRef } from 'react';
|
23
|
+
import React, { forwardRef } from 'react';
|
25
24
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
26
25
|
import { cva } from 'class-variance-authority';
|
27
|
-
import { cn } from '
|
28
|
-
import { appearanceStyle, weightVariants } from '
|
26
|
+
import { cn } from 'lib/utils/utils';
|
27
|
+
import { appearanceStyle, weightVariants } from 'lib/constants';
|
29
28
|
import { useAlertDialogContext } from './AlertDialogRoot';
|
30
29
|
export var alertDialogCancelVariants = cva("inline-flex justify-center items-center outline-none w-fit", {
|
31
30
|
variants: {
|
@@ -55,6 +54,8 @@ export var AlertDialogCancel = forwardRef(function (_a, ref) {
|
|
55
54
|
var _b = useAlertDialogContext(), radius = _b.radius, size = _b.size, _c = _b.appearance, appearance = _c === void 0 ? 'solid' : _c;
|
56
55
|
var disabledButtonStyle = "border-none text-slate-11 bg-slate-3 \n active:bg-slate-4 active:border-none hover:cursor-pointer hover:bg-slateA-4\n dark:text-slateDark-11 dark:bg-slateDark-3 dark:hover:bg-slateDarkA-4";
|
57
56
|
var buttonClassName = cn(alertDialogCancelVariants({ radius: radius, size: size, weight: weight }), appearanceStyle(appearance, 'slate'), disabledButtonStyle, className);
|
58
|
-
return (
|
57
|
+
return (<AlertDialogPrimitive.Cancel ref={ref} {...props} className={buttonClassName}>
|
58
|
+
{children}
|
59
|
+
</AlertDialogPrimitive.Cancel>);
|
59
60
|
});
|
60
61
|
AlertDialogCancel.displayName = 'AlertDialog.Cancel';
|
@@ -20,12 +20,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import
|
24
|
-
import { forwardRef } from 'react';
|
23
|
+
import React, { forwardRef } from 'react';
|
25
24
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
26
25
|
import { cva } from 'class-variance-authority';
|
27
|
-
import { cn } from '
|
28
|
-
import { radiusVariants, scalingVariants } from '
|
26
|
+
import { cn } from 'lib/utils/utils';
|
27
|
+
import { radiusVariants, scalingVariants } from 'lib/constants';
|
29
28
|
import { useAlertDialogContext } from './AlertDialogRoot';
|
30
29
|
export var alertDialogContentVariants = cva("fixed max-h-[85vh] top-[50%] left-[50%] focus:outline-none\n translate-x-[-50%] translate-y-[-50%] data-[state=open]:animate-contentShow bg-white dark:bg-slateDark-1 \n shadow-[hsl(206_22%_7%_/_35%)_0px_10px_38px_-10px,_hsl(206_22%_7%_/_20%)_0px_10px_20px_-15px]", {
|
31
30
|
variants: {
|
@@ -46,6 +45,11 @@ export var alertDialogContentVariants = cva("fixed max-h-[85vh] top-[50%] left-[
|
|
46
45
|
export var AlertDialogContent = forwardRef(function (_a, ref) {
|
47
46
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
48
47
|
var _b = useAlertDialogContext(), radius = _b.radius, size = _b.size, scaling = _b.scaling;
|
49
|
-
return (
|
48
|
+
return (<AlertDialogPrimitive.Portal>
|
49
|
+
<AlertDialogPrimitive.Overlay className="fixed data-[state=open]:animate-overlayShow inset-0"/>
|
50
|
+
<AlertDialogPrimitive.Content className={cn(alertDialogContentVariants({ radius: radius, size: size, scaling: scaling }), className)} ref={ref} {...props}>
|
51
|
+
{children}
|
52
|
+
</AlertDialogPrimitive.Content>
|
53
|
+
</AlertDialogPrimitive.Portal>);
|
50
54
|
});
|
51
55
|
AlertDialogContent.displayName = 'AlertDialog.Content';
|