@lotte-innovate/ui-component-test 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +163 -163
- package/dist/Typography/Header/index.d.ts +13 -0
- package/dist/Typography/Header/index.jsx +58 -0
- package/dist/Typography/Text/index.d.ts +16 -0
- package/dist/Typography/Text/index.jsx +47 -0
- package/dist/Typography/index.d.ts +2 -0
- package/dist/Typography/index.js +2 -0
- package/dist/app/layout.d.ts +7 -0
- package/dist/app/layout.jsx +13 -0
- package/dist/app/page.d.ts +2 -0
- package/dist/app/page.jsx +42 -0
- package/dist/app/template/badgeTemplate.d.ts +12 -0
- package/dist/app/template/badgeTemplate.jsx +82 -0
- package/dist/app/template/buttonTemplate.d.ts +12 -0
- package/dist/app/template/buttonTemplate.jsx +82 -0
- package/dist/app/template/colorPicker.d.ts +7 -0
- package/dist/app/template/colorPicker.jsx +19 -0
- package/dist/app/template/textTemplate.d.ts +11 -0
- package/dist/app/template/textTemplate.jsx +72 -0
- package/dist/app/template/theme.d.ts +12 -0
- package/dist/app/template/theme.jsx +44 -0
- package/dist/color/alpha.d.ts +784 -0
- package/dist/color/alpha.js +784 -0
- package/dist/color/constants.d.ts +20 -0
- package/dist/color/constants.js +200 -0
- package/dist/color/dark.d.ts +392 -0
- package/dist/color/dark.js +392 -0
- package/dist/color/krdsColors.d.ts +309 -0
- package/dist/color/krdsColors.js +309 -0
- package/dist/color/light.d.ts +392 -0
- package/dist/color/light.js +393 -0
- package/dist/components/Accordion/index.jsx +13 -13
- package/dist/components/AlertDialog/AlertDialogAction.jsx +2 -2
- package/dist/components/AlertDialog/AlertDialogCancel.jsx +2 -2
- package/dist/components/AlertDialog/AlertDialogContent.jsx +5 -5
- package/dist/components/AlertDialog/AlertDialogDescription.jsx +2 -2
- package/dist/components/AlertDialog/AlertDialogTitle.jsx +2 -2
- package/dist/components/AlertDialog/AlertDialogTrigger.jsx +2 -2
- package/dist/components/AspectRatio/index.jsx +2 -2
- package/dist/components/Avatar/index.jsx +5 -5
- package/dist/components/Badge/index.jsx +2 -2
- package/dist/components/BubbleChart/index.d.ts +1 -1
- package/dist/components/Button/index.jsx +2 -2
- package/dist/components/Callout/CalloutIcon.jsx +6 -6
- package/dist/components/Callout/CalloutText.jsx +2 -2
- package/dist/components/Callout/index.jsx +4 -4
- package/dist/components/Card/index.jsx +2 -2
- package/dist/components/Checkbox/index.jsx +9 -9
- package/dist/components/CheckboxCard/index.jsx +3 -3
- package/dist/components/CheckboxGroup/CheckboxGroupItem.jsx +4 -4
- package/dist/components/CheckboxGroup/index.jsx +4 -4
- package/dist/components/ContextMenu/ContextMenuCheckboxItem.jsx +5 -5
- package/dist/components/ContextMenu/ContextMenuContent.jsx +4 -4
- package/dist/components/ContextMenu/ContextMenuGroup.jsx +2 -2
- package/dist/components/ContextMenu/ContextMenuItem.jsx +3 -3
- package/dist/components/ContextMenu/ContextMenuItemIndicator.jsx +2 -2
- package/dist/components/ContextMenu/ContextMenuLabel.jsx +2 -2
- package/dist/components/ContextMenu/ContextMenuRadioGroup.jsx +4 -4
- package/dist/components/ContextMenu/ContextMenuRadioItem.jsx +5 -5
- package/dist/components/ContextMenu/ContextMenuSeparator.jsx +2 -2
- package/dist/components/ContextMenu/ContextMenuSubContent.jsx +4 -4
- package/dist/components/ContextMenu/ContextMenuSubTrigger.jsx +7 -7
- package/dist/components/ContextMenu/ContextMenuTrigger.jsx +2 -2
- package/dist/components/ContextMenu/index.jsx +2 -2
- package/dist/components/DataList/DataListItem.jsx +2 -2
- package/dist/components/DataList/DataListLabel.jsx +2 -2
- package/dist/components/DataList/DataListValue.jsx +2 -2
- package/dist/components/DataList/index.jsx +4 -4
- package/dist/components/Dialog/DialogAction.jsx +2 -2
- package/dist/components/Dialog/DialogCancel.jsx +2 -2
- package/dist/components/Dialog/DialogContent.jsx +2 -2
- package/dist/components/Dialog/DialogDescription.jsx +2 -2
- package/dist/components/Dialog/DialogSlot.jsx +2 -2
- package/dist/components/Dialog/DialogTitle.jsx +2 -2
- package/dist/components/Dialog/DialogTrigger.jsx +2 -2
- package/dist/components/Dialog/index.jsx +2 -2
- package/dist/components/DropdownMenu/DropdonMenuRadioGroup.jsx +4 -4
- package/dist/components/DropdownMenu/DropdonMenuSubContent.jsx +4 -4
- package/dist/components/DropdownMenu/DropdownMenuCheckboxItem.jsx +5 -5
- package/dist/components/DropdownMenu/DropdownMenuContent.jsx +4 -4
- package/dist/components/DropdownMenu/DropdownMenuItem.jsx +3 -3
- package/dist/components/DropdownMenu/DropdownMenuItemIndicator.jsx +2 -2
- package/dist/components/DropdownMenu/DropdownMenuLable.jsx +2 -2
- package/dist/components/DropdownMenu/DropdownMenuRadioItem.jsx +5 -5
- package/dist/components/DropdownMenu/DropdownMenuSubTrigger.jsx +5 -5
- package/dist/components/DropdownMenu/DropdownMenuTrigger.jsx +2 -2
- package/dist/components/HoverCard/HoverCardContent.jsx +2 -2
- package/dist/components/HoverCard/HoverCardTrigger.jsx +2 -2
- package/dist/components/HoverCard/index.jsx +2 -2
- package/dist/components/IconButton/index.jsx +2 -2
- package/dist/components/Input/Input.stories.jsx +6 -6
- package/dist/components/Inset/index.jsx +4 -4
- package/dist/components/Label/index.jsx +2 -2
- package/dist/components/Menubar/MenubarCheckboxItem.jsx +5 -5
- package/dist/components/Menubar/MenubarContent.jsx +4 -4
- package/dist/components/Menubar/MenubarItem.jsx +3 -3
- package/dist/components/Menubar/MenubarItemIndicator.jsx +2 -2
- package/dist/components/Menubar/MenubarRadioGroup.jsx +4 -4
- package/dist/components/Menubar/MenubarRadioItem.jsx +5 -5
- package/dist/components/Menubar/MenubarSeparator.jsx +2 -2
- package/dist/components/Menubar/MenubarSubContent.jsx +2 -2
- package/dist/components/Menubar/MenubarSubTrigger.jsx +5 -5
- package/dist/components/Menubar/MenubarTrigger.jsx +2 -2
- package/dist/components/Menubar/index.jsx +4 -4
- package/dist/components/NavigationMenu/NavigationMenuContent.jsx +2 -2
- package/dist/components/NavigationMenu/NavigationMenuIndicator.jsx +3 -3
- package/dist/components/NavigationMenu/NavigationMenuItem.jsx +2 -2
- package/dist/components/NavigationMenu/NavigationMenuLink.jsx +2 -2
- package/dist/components/NavigationMenu/NavigationMenuList.jsx +3 -3
- package/dist/components/NavigationMenu/NavigationMenuTrigger.jsx +3 -3
- package/dist/components/NavigationMenu/NavigationMenuViewport.jsx +2 -2
- package/dist/components/NavigationMenu/index.jsx +4 -4
- package/dist/components/Popover/PopoverClose.jsx +2 -2
- package/dist/components/Popover/PopoverContent.jsx +2 -2
- package/dist/components/Popover/PopoverTrigger.jsx +2 -2
- package/dist/components/Popover/index.jsx +2 -2
- package/dist/components/Progress/index.d.ts +3 -3
- package/dist/components/Progress/index.jsx +2 -2
- package/dist/components/RadarChart/index.d.ts +1 -1
- package/dist/components/Radio/index.d.ts +1 -1
- package/dist/components/Radio/index.jsx +7 -7
- package/dist/components/RadioCards/RadioCardsItem.jsx +2 -2
- package/dist/components/RadioCards/index.d.ts +1 -1
- package/dist/components/RadioCards/index.jsx +4 -4
- package/dist/components/RadioGroup/RadioGroupItem.jsx +2 -2
- package/dist/components/RadioGroup/index.d.ts +1 -1
- package/dist/components/RadioGroup/index.jsx +4 -4
- package/dist/components/ScrollArea/index.jsx +4 -4
- package/dist/components/SegmentedControl/SegmentedControlItem.jsx +2 -2
- package/dist/components/SegmentedControl/index.d.ts +1 -1
- package/dist/components/SegmentedControl/index.jsx +4 -4
- package/dist/components/Select/index.d.ts +1 -1
- package/dist/components/Select/index.jsx +16 -16
- package/dist/components/Separator/index.d.ts +1 -1
- package/dist/components/Separator/index.jsx +4 -4
- package/dist/components/Skeleton/index.d.ts +1 -1
- package/dist/components/Skeleton/index.jsx +4 -4
- package/dist/components/Slider/index.d.ts +1 -1
- package/dist/components/Slider/index.jsx +2 -2
- package/dist/components/Spinner/index.d.ts +1 -1
- package/dist/components/Spinner/index.jsx +4 -4
- package/dist/components/TabNav/index.jsx +6 -6
- package/dist/components/Table/index.d.ts +2 -2
- package/dist/components/Table/index.jsx +16 -16
- package/dist/components/Tabs/index.d.ts +1 -1
- package/dist/components/Tabs/index.jsx +10 -10
- package/dist/components/TextArea/index.d.ts +3 -3
- package/dist/components/TextArea/index.jsx +2 -2
- package/dist/components/TextField/index.d.ts +1 -1
- package/dist/components/TextField/index.jsx +6 -6
- package/dist/components/Toast/ToastActionButton.d.ts +3 -3
- package/dist/components/Toast/ToastActionButton.jsx +2 -2
- package/dist/components/Toast/ToastDescription.d.ts +1 -1
- package/dist/components/Toast/ToastDescription.jsx +4 -4
- package/dist/components/Toast/ToastTitle.d.ts +1 -1
- package/dist/components/Toast/ToastTitle.jsx +2 -2
- package/dist/components/Toast/index.d.ts +3 -3
- package/dist/components/Toast/index.jsx +7 -7
- package/dist/components/Toggle/ToggleWithText.jsx +3 -3
- package/dist/components/Toggle/index.d.ts +3 -3
- package/dist/components/Toggle/index.jsx +2 -2
- package/dist/components/ToggleGroup/index.d.ts +1 -1
- package/dist/components/ToggleGroup/index.jsx +4 -4
- package/dist/components/ToggleGroup/toggleGroupItem.jsx +2 -2
- package/dist/components/ToggleSwitch/index.d.ts +3 -3
- package/dist/components/ToggleSwitch/index.jsx +5 -5
- package/dist/components/Tooltip/index.d.ts +1 -1
- package/dist/components/Tooltip/index.jsx +10 -10
- package/dist/components/index.d.ts +48 -0
- package/dist/components/index.js +48 -52
- package/dist/constants.d.ts +185 -0
- package/dist/constants.js +569 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -51
- package/dist/stories/Welcome.d.ts +3 -0
- package/dist/stories/Welcome.jsx +48 -0
- package/dist/stories/accordion/Accordion.stories.d.ts +71 -0
- package/dist/stories/accordion/Accordion.stories.jsx +79 -0
- package/dist/stories/alert-dialog/AlertDialog.stories.d.ts +107 -0
- package/dist/stories/alert-dialog/AlertDialog.stories.jsx +73 -0
- package/dist/stories/aspect-ratio/AspectRatio.stories.d.ts +68 -0
- package/dist/stories/aspect-ratio/AspectRatio.stories.jsx +106 -0
- package/dist/stories/avatar/Avatar.stories.d.ts +127 -0
- package/dist/stories/avatar/Avatar.stories.jsx +105 -0
- package/dist/stories/badge/Badge.stories.d.ts +133 -0
- package/dist/stories/badge/Badge.stories.jsx +130 -0
- package/dist/stories/bubble-chart/BubbleChart.stories.d.ts +103 -0
- package/dist/stories/bubble-chart/BubbleChart.stories.jsx +176 -0
- package/dist/stories/button/Button.stories.d.ts +148 -0
- package/dist/stories/button/Button.stories.jsx +98 -0
- package/dist/stories/button/IconButton.stories.d.ts +125 -0
- package/dist/stories/button/IconButton.stories.jsx +93 -0
- package/dist/stories/callout/Callout.stories.d.ts +129 -0
- package/dist/stories/callout/Callout.stories.jsx +205 -0
- package/dist/stories/card/Card.stories.d.ts +100 -0
- package/dist/stories/card/Card.stories.jsx +134 -0
- package/dist/stories/checkbox/Checkbox.stories.d.ts +147 -0
- package/dist/stories/checkbox/Checkbox.stories.jsx +166 -0
- package/dist/stories/checkbox/CheckboxCard.stories.d.ts +129 -0
- package/dist/stories/checkbox/CheckboxCard.stories.jsx +125 -0
- package/dist/stories/checkbox/CheckboxGroup.stories.d.ts +91 -0
- package/dist/stories/checkbox/CheckboxGroup.stories.jsx +144 -0
- package/dist/stories/context-menu/ContextMenu.stories.d.ts +113 -0
- package/dist/stories/context-menu/ContextMenu.stories.jsx +155 -0
- package/dist/stories/data-list/DataList.stories.d.ts +97 -0
- package/dist/stories/data-list/DataList.stories.jsx +185 -0
- package/dist/stories/dialog/Dialog.stories.d.ts +88 -0
- package/dist/stories/dialog/Dialog.stories.jsx +82 -0
- package/dist/stories/doughnut-chart/DoughnutChart.stories.d.ts +181 -0
- package/dist/stories/doughnut-chart/DoughnutChart.stories.jsx +236 -0
- package/dist/stories/dropdown-menu/DropdownMenu.stories.d.ts +112 -0
- package/dist/stories/dropdown-menu/DropdownMenu.stories.jsx +170 -0
- package/dist/stories/header/Header.stories.d.ts +112 -0
- package/dist/stories/header/Header.stories.jsx +116 -0
- package/dist/stories/hover-card/HoverCard.stories.d.ts +107 -0
- package/dist/stories/hover-card/HoverCard.stories.jsx +98 -0
- package/dist/stories/inset/Inset.stories.d.ts +58 -0
- package/dist/stories/inset/Inset.stories.jsx +79 -0
- package/dist/stories/label/Label.stories.d.ts +94 -0
- package/dist/stories/label/Label.stories.jsx +112 -0
- package/dist/stories/menubar/Menubar.stories.d.ts +119 -0
- package/dist/stories/menubar/Menubar.stories.jsx +135 -0
- package/dist/stories/navigation-menu/NavigationMenu.stories.d.ts +385 -0
- package/dist/stories/navigation-menu/NavigationMenu.stories.jsx +144 -0
- package/dist/stories/pie-chart/PieChart.stories.d.ts +186 -0
- package/dist/stories/pie-chart/PieChart.stories.jsx +300 -0
- package/dist/stories/popover/Popover.stories.d.ts +78 -0
- package/dist/stories/popover/Popover.stories.jsx +107 -0
- package/dist/stories/progress/Progress.stories.d.ts +113 -0
- package/dist/stories/progress/Progress.stories.jsx +82 -0
- package/dist/stories/radar-chart/RadarChart.stories.d.ts +111 -0
- package/dist/stories/radar-chart/RadarChart.stories.jsx +200 -0
- package/dist/stories/radio/Radio.stories.d.ts +108 -0
- package/dist/stories/radio/Radio.stories.jsx +94 -0
- package/dist/stories/radio/RadioCards.stories.d.ts +127 -0
- package/dist/stories/radio/RadioCards.stories.jsx +153 -0
- package/dist/stories/radio/RadioGroup.stories.d.ts +111 -0
- package/dist/stories/radio/RadioGroup.stories.jsx +142 -0
- package/dist/stories/scroll-area/ScrollArea.stories.d.ts +59 -0
- package/dist/stories/scroll-area/ScrollArea.stories.jsx +123 -0
- package/dist/stories/segmented-control/SegmentedControl.stories.d.ts +97 -0
- package/dist/stories/segmented-control/SegmentedControl.stories.jsx +101 -0
- package/dist/stories/select/Select.stories.d.ts +116 -0
- package/dist/stories/select/Select.stories.jsx +149 -0
- package/dist/stories/separator/Separator.stories.d.ts +93 -0
- package/dist/stories/separator/Separator.stories.jsx +106 -0
- package/dist/stories/skeleton/Skeleton.stories.d.ts +88 -0
- package/dist/stories/skeleton/Skeleton.stories.jsx +119 -0
- package/dist/stories/slider/Slider.stories.d.ts +114 -0
- package/dist/stories/slider/Slider.stories.jsx +94 -0
- package/dist/stories/spinner/Spinner.stories.d.ts +83 -0
- package/dist/stories/spinner/Spinner.stories.jsx +112 -0
- package/dist/stories/switch/Switch.stories.d.ts +146 -0
- package/dist/stories/switch/Switch.stories.jsx +119 -0
- package/dist/stories/tab-nav/TabNav.stories.d.ts +55 -0
- package/dist/stories/tab-nav/TabNav.stories.jsx +68 -0
- package/dist/stories/table/Table.stories.d.ts +87 -0
- package/dist/stories/table/Table.stories.jsx +106 -0
- package/dist/stories/tabs/Tabs.stories.d.ts +55 -0
- package/dist/stories/tabs/Tabs.stories.jsx +76 -0
- package/dist/stories/text/Text.stories.d.ts +74 -0
- package/dist/stories/text/Text.stories.jsx +91 -0
- package/dist/stories/textArea/TextArea.stories.d.ts +117 -0
- package/dist/stories/textArea/TextArea.stories.jsx +112 -0
- package/dist/stories/textfield/TextField.stories.d.ts +116 -0
- package/dist/stories/textfield/TextField.stories.jsx +120 -0
- package/dist/stories/toast/Toast.stories.d.ts +138 -0
- package/dist/stories/toast/Toast.stories.jsx +122 -0
- package/dist/stories/toggle/Toggle.stories.d.ts +115 -0
- package/dist/stories/toggle/Toggle.stories.jsx +106 -0
- package/dist/stories/toggle/ToggleGroup.stories.d.ts +103 -0
- package/dist/stories/toggle/ToggleGroup.stories.jsx +127 -0
- package/dist/stories/tooltip/Tooltip.stories.d.ts +93 -0
- package/dist/stories/tooltip/Tooltip.stories.jsx +91 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types.d.ts +11 -0
- package/dist/types.js +1 -0
- package/dist/utils/utils.d.ts +3 -0
- package/dist/utils/utils.js +27 -0
- package/package.json +118 -119
@@ -0,0 +1,186 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
declare const meta: {
|
3
|
+
title: string;
|
4
|
+
component: ({ labels, datasets, scaling, className, ...rest }: import("components/PieChart").PieChartProps) => import("react").JSX.Element;
|
5
|
+
parameters: {
|
6
|
+
layout: string;
|
7
|
+
docs: {
|
8
|
+
description: {
|
9
|
+
component: string;
|
10
|
+
};
|
11
|
+
};
|
12
|
+
};
|
13
|
+
tags: string[];
|
14
|
+
args: {
|
15
|
+
labels: string[];
|
16
|
+
datasets: {
|
17
|
+
label: string;
|
18
|
+
data: number[];
|
19
|
+
backgroundColor: string[];
|
20
|
+
borderColor: string[];
|
21
|
+
borderWidth: number;
|
22
|
+
}[];
|
23
|
+
options: {
|
24
|
+
plugins: {
|
25
|
+
legend: {
|
26
|
+
position: string;
|
27
|
+
labels: {
|
28
|
+
usePointStyle: boolean;
|
29
|
+
pointStyle: boolean;
|
30
|
+
};
|
31
|
+
};
|
32
|
+
title: {
|
33
|
+
display: boolean;
|
34
|
+
text: string;
|
35
|
+
};
|
36
|
+
};
|
37
|
+
};
|
38
|
+
};
|
39
|
+
argTypes: {
|
40
|
+
scaling: {
|
41
|
+
description: string;
|
42
|
+
table: {
|
43
|
+
category: string;
|
44
|
+
type: {
|
45
|
+
summary: string;
|
46
|
+
};
|
47
|
+
};
|
48
|
+
control: {
|
49
|
+
type: string;
|
50
|
+
};
|
51
|
+
options: import("types").IScaling[];
|
52
|
+
defaultValue: {
|
53
|
+
summary: string;
|
54
|
+
};
|
55
|
+
};
|
56
|
+
labels: {
|
57
|
+
name: string;
|
58
|
+
description: string;
|
59
|
+
table: {
|
60
|
+
category: string;
|
61
|
+
type: {
|
62
|
+
summary: string;
|
63
|
+
};
|
64
|
+
};
|
65
|
+
};
|
66
|
+
datasets: {
|
67
|
+
name: string;
|
68
|
+
description: string;
|
69
|
+
table: {
|
70
|
+
category: string;
|
71
|
+
type: {
|
72
|
+
summary: string;
|
73
|
+
};
|
74
|
+
};
|
75
|
+
};
|
76
|
+
'options.plugins.legend.position': {
|
77
|
+
description: string;
|
78
|
+
table: {
|
79
|
+
category: string;
|
80
|
+
type: {
|
81
|
+
summary: string;
|
82
|
+
};
|
83
|
+
};
|
84
|
+
control: {
|
85
|
+
type: string;
|
86
|
+
};
|
87
|
+
options: string[];
|
88
|
+
defaultValue: {
|
89
|
+
summary: string;
|
90
|
+
};
|
91
|
+
};
|
92
|
+
'options.plugins.legend.labels.pointStyle': {
|
93
|
+
description: string;
|
94
|
+
table: {
|
95
|
+
category: string;
|
96
|
+
type: {
|
97
|
+
summary: string;
|
98
|
+
};
|
99
|
+
};
|
100
|
+
control: {
|
101
|
+
type: string;
|
102
|
+
};
|
103
|
+
options: (string | boolean)[];
|
104
|
+
defaultValue: {
|
105
|
+
summary: string;
|
106
|
+
};
|
107
|
+
};
|
108
|
+
'options.plugins.legend.labels.usePointStyle': {
|
109
|
+
description: string;
|
110
|
+
table: {
|
111
|
+
category: string;
|
112
|
+
type: {
|
113
|
+
summary: string;
|
114
|
+
};
|
115
|
+
};
|
116
|
+
control: {
|
117
|
+
type: string;
|
118
|
+
};
|
119
|
+
defaultValue: {
|
120
|
+
summary: string;
|
121
|
+
};
|
122
|
+
};
|
123
|
+
className: {
|
124
|
+
table: {
|
125
|
+
disable: boolean;
|
126
|
+
};
|
127
|
+
};
|
128
|
+
'datasets.borderDash': {
|
129
|
+
table: {
|
130
|
+
category: string;
|
131
|
+
type: {
|
132
|
+
summary: string;
|
133
|
+
};
|
134
|
+
};
|
135
|
+
description: string;
|
136
|
+
control: string;
|
137
|
+
};
|
138
|
+
'datasets.borderDashOffset': {
|
139
|
+
table: {
|
140
|
+
category: string;
|
141
|
+
type: {
|
142
|
+
summary: string;
|
143
|
+
};
|
144
|
+
};
|
145
|
+
description: string;
|
146
|
+
control: string;
|
147
|
+
};
|
148
|
+
'datasets.offset': {
|
149
|
+
table: {
|
150
|
+
category: string;
|
151
|
+
type: {
|
152
|
+
summary: string;
|
153
|
+
};
|
154
|
+
};
|
155
|
+
description: string;
|
156
|
+
control: string;
|
157
|
+
};
|
158
|
+
'datasets.spacing': {
|
159
|
+
table: {
|
160
|
+
category: string;
|
161
|
+
type: {
|
162
|
+
summary: string;
|
163
|
+
};
|
164
|
+
};
|
165
|
+
description: string;
|
166
|
+
control: string;
|
167
|
+
};
|
168
|
+
'datasets.weight': {
|
169
|
+
table: {
|
170
|
+
category: string;
|
171
|
+
type: {
|
172
|
+
summary: string;
|
173
|
+
};
|
174
|
+
};
|
175
|
+
description: string;
|
176
|
+
control: string;
|
177
|
+
};
|
178
|
+
};
|
179
|
+
};
|
180
|
+
export default meta;
|
181
|
+
export declare const Default: ({ ...args }: {
|
182
|
+
[x: string]: any;
|
183
|
+
}) => import("react").JSX.Element;
|
184
|
+
export declare const LabelsStyle: () => import("react").JSX.Element;
|
185
|
+
export declare const BorderStyles: () => import("react").JSX.Element;
|
186
|
+
export declare const DataLabels: () => import("react").JSX.Element;
|
@@ -0,0 +1,300 @@
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
2
|
+
__assign = Object.assign || function(t) {
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
+
s = arguments[i];
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
+
t[p] = s[p];
|
7
|
+
}
|
8
|
+
return t;
|
9
|
+
};
|
10
|
+
return __assign.apply(this, arguments);
|
11
|
+
};
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
13
|
+
var t = {};
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
15
|
+
t[p] = s[p];
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
19
|
+
t[p[i]] = s[p[i]];
|
20
|
+
}
|
21
|
+
return t;
|
22
|
+
};
|
23
|
+
import PieChart from 'components/PieChart';
|
24
|
+
import { amber, blue, green, orange, purple, red, ruby, violet, yellow } from 'color/light';
|
25
|
+
import { commonArgTypes } from '../../constants';
|
26
|
+
var pointStyleList = [
|
27
|
+
'circle',
|
28
|
+
'cross',
|
29
|
+
'crossRot',
|
30
|
+
'dash',
|
31
|
+
'line',
|
32
|
+
'rect',
|
33
|
+
'rectRounded',
|
34
|
+
'rectRot',
|
35
|
+
'star',
|
36
|
+
'triangle',
|
37
|
+
false,
|
38
|
+
];
|
39
|
+
var labelPositionList = ['top', 'bottom', 'left', 'right'];
|
40
|
+
var meta = {
|
41
|
+
title: 'Chart/PieChart',
|
42
|
+
component: PieChart,
|
43
|
+
parameters: {
|
44
|
+
layout: 'centered',
|
45
|
+
docs: {
|
46
|
+
description: {
|
47
|
+
component: '데이터 간의 관계 비율을 알려주는데 효과적인 파이 차트 컴포넌트',
|
48
|
+
},
|
49
|
+
},
|
50
|
+
},
|
51
|
+
tags: ['autodocs'],
|
52
|
+
args: {
|
53
|
+
labels: ['Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange'],
|
54
|
+
datasets: [
|
55
|
+
{
|
56
|
+
label: 'Count',
|
57
|
+
data: [12, 19, 3, 5, 2, 3],
|
58
|
+
backgroundColor: [red[3], blue[3], yellow[2], green[3], purple[3], orange[3]],
|
59
|
+
borderColor: [red[9], blue[9], yellow[10], green[9], purple[9], orange[9]],
|
60
|
+
borderWidth: 1,
|
61
|
+
},
|
62
|
+
],
|
63
|
+
options: {
|
64
|
+
// responsive: false,
|
65
|
+
plugins: {
|
66
|
+
legend: {
|
67
|
+
position: 'top',
|
68
|
+
labels: {
|
69
|
+
usePointStyle: false,
|
70
|
+
pointStyle: false,
|
71
|
+
},
|
72
|
+
},
|
73
|
+
title: {
|
74
|
+
display: true,
|
75
|
+
text: '파이 차트 타이틀 영역',
|
76
|
+
},
|
77
|
+
},
|
78
|
+
},
|
79
|
+
},
|
80
|
+
argTypes: {
|
81
|
+
scaling: __assign(__assign({}, commonArgTypes.scaling), { description: '차트 크기 비율' }),
|
82
|
+
labels: {
|
83
|
+
name: 'labels',
|
84
|
+
description: '차트 위에 표시될 라벨들',
|
85
|
+
table: {
|
86
|
+
category: 'Props',
|
87
|
+
type: { summary: 'string[]' },
|
88
|
+
},
|
89
|
+
},
|
90
|
+
datasets: {
|
91
|
+
name: 'Datasets',
|
92
|
+
description: '차트에 사용할 데이터셋',
|
93
|
+
table: {
|
94
|
+
category: 'Props',
|
95
|
+
type: { summary: 'object' },
|
96
|
+
},
|
97
|
+
},
|
98
|
+
'options.plugins.legend.position': {
|
99
|
+
description: '라벨 위치',
|
100
|
+
table: {
|
101
|
+
category: 'Props',
|
102
|
+
type: { summary: labelPositionList.join(' | ') },
|
103
|
+
},
|
104
|
+
control: { type: 'select' },
|
105
|
+
options: labelPositionList,
|
106
|
+
defaultValue: { summary: 'top' },
|
107
|
+
},
|
108
|
+
'options.plugins.legend.labels.pointStyle': {
|
109
|
+
description: "- \uB77C\uBCA8 \uD3EC\uC778\uD2B8 \uC2A4\uD0C0\uC77C \n - usePointStyle\uAC00 true\uC778 \uACBD\uC6B0 \uC801\uC6A9",
|
110
|
+
table: {
|
111
|
+
category: 'Props',
|
112
|
+
type: { summary: pointStyleList.join(' | ') },
|
113
|
+
},
|
114
|
+
control: { type: 'select' },
|
115
|
+
options: pointStyleList,
|
116
|
+
defaultValue: { summary: 'false' },
|
117
|
+
},
|
118
|
+
'options.plugins.legend.labels.usePointStyle': {
|
119
|
+
description: '라벨 포인트 스타일 사용여부',
|
120
|
+
table: {
|
121
|
+
category: 'Props',
|
122
|
+
type: { summary: 'boolean' },
|
123
|
+
},
|
124
|
+
control: { type: 'boolean' },
|
125
|
+
defaultValue: { summary: 'false' },
|
126
|
+
},
|
127
|
+
className: {
|
128
|
+
table: {
|
129
|
+
disable: true,
|
130
|
+
},
|
131
|
+
},
|
132
|
+
'datasets.borderDash': {
|
133
|
+
table: {
|
134
|
+
category: '기타 속성',
|
135
|
+
type: { summary: 'number[]' },
|
136
|
+
},
|
137
|
+
description: "- \uCC28\uD2B8\uC758 \uAC01 \uC139\uC158\uC758 \uD14C\uB450\uB9AC\uB97C \uC810\uC120\uC73C\uB85C \uB9CC\uB4EC \n - ex)[5,5]: 5\uD53D\uC140 \uAE38\uC774\uC758 \uC120\uACFC 5\uD53D\uC140 \uAE38\uC774\uC758 \uAC04\uACA9",
|
138
|
+
control: 'readonly',
|
139
|
+
},
|
140
|
+
'datasets.borderDashOffset': {
|
141
|
+
table: {
|
142
|
+
category: '기타 속성',
|
143
|
+
type: { summary: 'number' },
|
144
|
+
},
|
145
|
+
description: "- \uC810\uC120\uC758 \uC2DC\uC791 \uC704\uCE58 \uC870\uC815 \n - ex) 2: \uC810\uC120\uC758 \uC2DC\uC791 \uC9C0\uC810\uC744 2\uD53D\uC140 \uC774\uB3D9",
|
146
|
+
control: 'readonly',
|
147
|
+
},
|
148
|
+
'datasets.offset': {
|
149
|
+
table: {
|
150
|
+
category: '기타 속성',
|
151
|
+
type: { summary: 'number' },
|
152
|
+
},
|
153
|
+
description: '각 섹션 사이의 간격 조정',
|
154
|
+
control: 'readonly',
|
155
|
+
},
|
156
|
+
'datasets.spacing': {
|
157
|
+
table: {
|
158
|
+
category: '기타 속성',
|
159
|
+
type: { summary: 'number' },
|
160
|
+
},
|
161
|
+
description: '각 섹션 사이의 간격 조정, offset과 유사',
|
162
|
+
control: 'readonly',
|
163
|
+
},
|
164
|
+
'datasets.weight': {
|
165
|
+
table: {
|
166
|
+
category: '기타 속성',
|
167
|
+
type: { summary: 'number' },
|
168
|
+
},
|
169
|
+
description: '각 섹션의 상대적인 두께를 설정, 섹션이 차지하는 공간의 비율을 조정',
|
170
|
+
control: 'readonly',
|
171
|
+
},
|
172
|
+
},
|
173
|
+
};
|
174
|
+
export default meta;
|
175
|
+
export var Default = function (_a) {
|
176
|
+
var args = __rest(_a, []);
|
177
|
+
return (<div className="w-[300px]">
|
178
|
+
<PieChart labels={args.label} datasets={args.datasets} {...args}/>
|
179
|
+
</div>);
|
180
|
+
};
|
181
|
+
export var LabelsStyle = function () {
|
182
|
+
var labelStyleList = ['star', 'line', 'rect', 'circle'];
|
183
|
+
var labels = ['A', 'B', 'C', 'D'];
|
184
|
+
var datasets = [
|
185
|
+
{
|
186
|
+
data: [2, 4, 7, 3],
|
187
|
+
backgroundColor: [ruby[9], violet[9], amber[9], green[9]],
|
188
|
+
borderColor: [ruby[9], violet[9], amber[9], green[9]],
|
189
|
+
},
|
190
|
+
];
|
191
|
+
return (<div className="flex">
|
192
|
+
{labelStyleList.map(function (labelOption) { return (<div className="w-[200px]" key={labelOption}>
|
193
|
+
<PieChart labels={labels} datasets={datasets} options={{
|
194
|
+
plugins: {
|
195
|
+
legend: {
|
196
|
+
labels: {
|
197
|
+
pointStyle: labelOption,
|
198
|
+
usePointStyle: true,
|
199
|
+
},
|
200
|
+
position: 'top',
|
201
|
+
},
|
202
|
+
},
|
203
|
+
}}/>
|
204
|
+
</div>); })}
|
205
|
+
</div>);
|
206
|
+
};
|
207
|
+
export var BorderStyles = function () {
|
208
|
+
var exampleData = [2, 4, 7, 3];
|
209
|
+
var datasets = [
|
210
|
+
{
|
211
|
+
data: exampleData,
|
212
|
+
backgroundColor: [ruby[9], violet[9], amber[9], green[9]],
|
213
|
+
},
|
214
|
+
];
|
215
|
+
var options = {
|
216
|
+
plugins: {
|
217
|
+
title: {
|
218
|
+
display: true,
|
219
|
+
text: '테두리선 없앤 스타일',
|
220
|
+
},
|
221
|
+
},
|
222
|
+
};
|
223
|
+
var dashDatasets = [
|
224
|
+
{
|
225
|
+
data: exampleData,
|
226
|
+
backgroundColor: [ruby[3], violet[3], amber[3], green[3]],
|
227
|
+
borderColor: [ruby[9], violet[9], amber[9], green[9]],
|
228
|
+
borderDash: [5, 5],
|
229
|
+
},
|
230
|
+
];
|
231
|
+
var dashOptions = {
|
232
|
+
plugins: {
|
233
|
+
title: {
|
234
|
+
display: true,
|
235
|
+
text: '테두리선 dash 적용 스타일',
|
236
|
+
},
|
237
|
+
},
|
238
|
+
};
|
239
|
+
return (<div className="flex">
|
240
|
+
<div className="w-[200px]">
|
241
|
+
<PieChart datasets={datasets} options={options}/>
|
242
|
+
</div>
|
243
|
+
<div className="w-[200px]">
|
244
|
+
<PieChart datasets={dashDatasets} options={dashOptions}/>
|
245
|
+
</div>
|
246
|
+
</div>);
|
247
|
+
};
|
248
|
+
export var DataLabels = function () {
|
249
|
+
var datasets = [
|
250
|
+
{
|
251
|
+
data: [1, 2, 3, 4, 5],
|
252
|
+
backgroundColor: [ruby[9], violet[9], amber[9], green[9], blue[9]],
|
253
|
+
},
|
254
|
+
];
|
255
|
+
var options = {
|
256
|
+
plugins: {
|
257
|
+
title: {
|
258
|
+
display: true,
|
259
|
+
text: '기본 데이터 라벨',
|
260
|
+
},
|
261
|
+
datalabels: {
|
262
|
+
display: true,
|
263
|
+
color: 'white',
|
264
|
+
},
|
265
|
+
},
|
266
|
+
};
|
267
|
+
var customOptions = {
|
268
|
+
plugins: {
|
269
|
+
title: {
|
270
|
+
display: true,
|
271
|
+
text: '끝에 위치한 데이터 라벨',
|
272
|
+
},
|
273
|
+
datalabels: {
|
274
|
+
display: true,
|
275
|
+
backgroundColor: function (context) {
|
276
|
+
return context.dataset.backgroundColor;
|
277
|
+
},
|
278
|
+
borderColor: 'white',
|
279
|
+
borderRadius: 10,
|
280
|
+
borderWidth: 2,
|
281
|
+
color: 'white',
|
282
|
+
font: {
|
283
|
+
weight: 'bold',
|
284
|
+
size: 9,
|
285
|
+
},
|
286
|
+
padding: 5,
|
287
|
+
formatter: Math.round,
|
288
|
+
anchor: 'end',
|
289
|
+
},
|
290
|
+
},
|
291
|
+
};
|
292
|
+
return (<div className="flex">
|
293
|
+
<div className="w-[200px]">
|
294
|
+
<PieChart datasets={datasets} options={options}/>
|
295
|
+
</div>
|
296
|
+
<div className="w-[200px]">
|
297
|
+
<PieChart datasets={datasets} options={customOptions}/>
|
298
|
+
</div>
|
299
|
+
</div>);
|
300
|
+
};
|
@@ -0,0 +1,78 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { ISize } from '../../types';
|
3
|
+
declare const meta: {
|
4
|
+
title: string;
|
5
|
+
component: import("react").ForwardRefExoticComponent<import("@radix-ui/themes/dist/cjs/components/popover").RootProps & import("../../components/Popover").PopoverProps & import("react").RefAttributes<never>>;
|
6
|
+
parameters: {
|
7
|
+
layout: string;
|
8
|
+
themes: {
|
9
|
+
themeOverride: string;
|
10
|
+
};
|
11
|
+
docs: {
|
12
|
+
description: {
|
13
|
+
component: string;
|
14
|
+
};
|
15
|
+
};
|
16
|
+
};
|
17
|
+
tags: string[];
|
18
|
+
argTypes: {
|
19
|
+
radius: {
|
20
|
+
description: string;
|
21
|
+
table: {
|
22
|
+
category: string;
|
23
|
+
type: {
|
24
|
+
summary: string;
|
25
|
+
};
|
26
|
+
};
|
27
|
+
options: import("../../types").IRadius[];
|
28
|
+
control: {
|
29
|
+
type: string;
|
30
|
+
};
|
31
|
+
defaultValue: {
|
32
|
+
summary: string;
|
33
|
+
};
|
34
|
+
};
|
35
|
+
size: {
|
36
|
+
table: {
|
37
|
+
category: string;
|
38
|
+
type: {
|
39
|
+
summary: string;
|
40
|
+
};
|
41
|
+
};
|
42
|
+
options: ISize[];
|
43
|
+
description: string;
|
44
|
+
control: {
|
45
|
+
type: string;
|
46
|
+
};
|
47
|
+
defaultValue: {
|
48
|
+
summary: string;
|
49
|
+
};
|
50
|
+
};
|
51
|
+
scaling: {
|
52
|
+
description: string;
|
53
|
+
table: {
|
54
|
+
category: string;
|
55
|
+
type: {
|
56
|
+
summary: string;
|
57
|
+
};
|
58
|
+
};
|
59
|
+
control: {
|
60
|
+
type: string;
|
61
|
+
};
|
62
|
+
options: import("../../types").IScaling[];
|
63
|
+
defaultValue: {
|
64
|
+
summary: string;
|
65
|
+
};
|
66
|
+
};
|
67
|
+
};
|
68
|
+
args: {
|
69
|
+
size: "medium";
|
70
|
+
};
|
71
|
+
};
|
72
|
+
export default meta;
|
73
|
+
export declare const Default: ({ ...args }: {
|
74
|
+
[x: string]: any;
|
75
|
+
}) => import("react").JSX.Element;
|
76
|
+
export declare const WithInset: ({ ...args }: {
|
77
|
+
[x: string]: any;
|
78
|
+
}) => import("react").JSX.Element;
|
@@ -0,0 +1,107 @@
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
2
|
+
__assign = Object.assign || function(t) {
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
+
s = arguments[i];
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
+
t[p] = s[p];
|
7
|
+
}
|
8
|
+
return t;
|
9
|
+
};
|
10
|
+
return __assign.apply(this, arguments);
|
11
|
+
};
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
13
|
+
var t = {};
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
15
|
+
t[p] = s[p];
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
19
|
+
t[p[i]] = s[p[i]];
|
20
|
+
}
|
21
|
+
return t;
|
22
|
+
};
|
23
|
+
import { commonArgTypes, sizeOptions } from '../../constants';
|
24
|
+
import { Inset } from '@radix-ui/themes';
|
25
|
+
import { Popover, PopoverTrigger, PopoverContent, PopoverClose } from '../../components/Popover';
|
26
|
+
import { TextArea } from 'components/TextArea';
|
27
|
+
import Button from 'components/Button';
|
28
|
+
import Avatar from 'components/Avatar';
|
29
|
+
import Image from 'next/image';
|
30
|
+
var meta = {
|
31
|
+
title: 'Component/Popover',
|
32
|
+
component: Popover,
|
33
|
+
parameters: {
|
34
|
+
layout: 'centered',
|
35
|
+
themes: {
|
36
|
+
themeOverride: 'dark',
|
37
|
+
},
|
38
|
+
docs: {
|
39
|
+
description: {
|
40
|
+
component: '특정 개체 위에 포인트를 클릭했을 때 제공되는 컨테이너 요소',
|
41
|
+
},
|
42
|
+
},
|
43
|
+
},
|
44
|
+
tags: ['autodocs'],
|
45
|
+
argTypes: {
|
46
|
+
radius: __assign(__assign({}, commonArgTypes.radius), { description: 'popover 둥글기' }),
|
47
|
+
size: __assign(__assign({}, commonArgTypes.size), { table: {
|
48
|
+
category: 'Props',
|
49
|
+
type: {
|
50
|
+
summary: sizeOptions.filter(function (value) { return value != 'x-small'; }).join(' | '),
|
51
|
+
},
|
52
|
+
}, options: sizeOptions.filter(function (value) { return value != 'x-small'; }), description: 'popover 크기' }),
|
53
|
+
scaling: __assign(__assign({}, commonArgTypes.scaling), { description: 'popover 비율' }),
|
54
|
+
},
|
55
|
+
args: {
|
56
|
+
size: 'medium',
|
57
|
+
},
|
58
|
+
};
|
59
|
+
export default meta;
|
60
|
+
export var Default = function (_a) {
|
61
|
+
var args = __rest(_a, []);
|
62
|
+
return (<Popover {...args}>
|
63
|
+
<PopoverTrigger>
|
64
|
+
<Button>Comment</Button>
|
65
|
+
</PopoverTrigger>
|
66
|
+
<PopoverContent {...args}>
|
67
|
+
<Avatar imagePath="https://images.unsplash.com/photo-1607346256330-dee7af15f7c5?&w=64&h=64&dpr=2&q=70&crop=focalpoint&fp-x=0.67&fp-y=0.5&fp-z=1.4&fit=crop" {...args} size={args.size === 'small'
|
68
|
+
? '2'
|
69
|
+
: args.size === 'large'
|
70
|
+
? '4'
|
71
|
+
: args.size === 'x-large'
|
72
|
+
? '5'
|
73
|
+
: '3'}/>
|
74
|
+
<div className="grow">
|
75
|
+
<TextArea placeholder="Write a comment…" {...args} className="w-full"/>
|
76
|
+
<div className="flex mt-3 justify-end">
|
77
|
+
<PopoverClose {...args}>
|
78
|
+
<Button>Comment</Button>
|
79
|
+
</PopoverClose>
|
80
|
+
</div>
|
81
|
+
</div>
|
82
|
+
</PopoverContent>
|
83
|
+
</Popover>);
|
84
|
+
};
|
85
|
+
export var WithInset = function (_a) {
|
86
|
+
var args = __rest(_a, []);
|
87
|
+
return (<Popover {...args}>
|
88
|
+
<PopoverTrigger>
|
89
|
+
<Button>Share image</Button>
|
90
|
+
</PopoverTrigger>
|
91
|
+
<PopoverContent {...args}>
|
92
|
+
<div className="grid grid-cols-[130px_1fr]">
|
93
|
+
<Inset side="left" pr="current">
|
94
|
+
<Image src="https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?&auto=format&fit=crop&w=400&q=80" alt="toggle with inset" width={150} height={150} style={{ objectFit: 'cover', width: '100%', height: '100%' }}/>
|
95
|
+
</Inset>
|
96
|
+
<div>
|
97
|
+
<span>Minimalistic 3D rendering wallpaper.</span>
|
98
|
+
<div className="mt-2 flex-col items-stretch">
|
99
|
+
<PopoverClose {...args}>
|
100
|
+
<Button>Copy link</Button>
|
101
|
+
</PopoverClose>
|
102
|
+
</div>
|
103
|
+
</div>
|
104
|
+
</div>
|
105
|
+
</PopoverContent>
|
106
|
+
</Popover>);
|
107
|
+
};
|