@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,105 @@
|
|
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 Avatar from 'components/Avatar';
|
24
|
+
import { radiusOptions, scalingOptions, commonArgTypes, typoSizeOptions, appearanceOptions, } from '../../constants';
|
25
|
+
var meta = {
|
26
|
+
title: 'Component/Avatar',
|
27
|
+
component: Avatar,
|
28
|
+
parameters: {
|
29
|
+
layout: 'centered',
|
30
|
+
themes: {
|
31
|
+
themeOverride: 'dark',
|
32
|
+
},
|
33
|
+
docs: {
|
34
|
+
description: {
|
35
|
+
component: '사용자 프로필 아이콘으로 사용자를 대표하는 이미지를 사진이나 이니셜로 표현하는 컴포넌트',
|
36
|
+
},
|
37
|
+
},
|
38
|
+
},
|
39
|
+
tags: ['autodocs'],
|
40
|
+
argTypes: {
|
41
|
+
radius: __assign(__assign({}, commonArgTypes.radius), { description: 'Avatar 둥굴기', defaultValue: { summary: 'full' } }),
|
42
|
+
scaling: __assign(__assign({}, commonArgTypes.scaling), { description: 'Avatar 비율' }),
|
43
|
+
size: {
|
44
|
+
table: {
|
45
|
+
category: 'Props',
|
46
|
+
type: { summary: '1 ~ 9' },
|
47
|
+
},
|
48
|
+
options: typoSizeOptions,
|
49
|
+
control: { type: 'select' },
|
50
|
+
description: 'Avatar 크기',
|
51
|
+
defaultValue: { summary: '3' },
|
52
|
+
},
|
53
|
+
color: __assign(__assign({}, commonArgTypes.color), { description: 'Avatar 메인 color' }),
|
54
|
+
appearance: __assign(__assign({}, commonArgTypes.appearance), { description: 'Avatar 스타일', table: {
|
55
|
+
category: 'Props',
|
56
|
+
type: {
|
57
|
+
summary: appearanceOptions
|
58
|
+
.filter(function (option) { return option === 'solid' || option === 'soft'; })
|
59
|
+
.join(' | '),
|
60
|
+
},
|
61
|
+
}, options: appearanceOptions.filter(function (option) { return option === 'solid' || option === 'soft'; }) }),
|
62
|
+
fallbackText: {
|
63
|
+
table: {
|
64
|
+
category: 'Props',
|
65
|
+
type: { summary: 'string' },
|
66
|
+
},
|
67
|
+
control: 'text',
|
68
|
+
description: 'Avatar fallback 텍스트',
|
69
|
+
defaultValue: 'FB',
|
70
|
+
},
|
71
|
+
},
|
72
|
+
};
|
73
|
+
export default meta;
|
74
|
+
export var Default = function (_a) {
|
75
|
+
var args = __rest(_a, []);
|
76
|
+
return (<div className="flex space-x-4">
|
77
|
+
<Avatar imagePath="https://images.unsplash.com/photo-1492633423870-43d1cd2775eb?&w=128&h=128&dpr=2&q=80" {...args}/>
|
78
|
+
<Avatar fallbackText="A" {...args}/>
|
79
|
+
</div>);
|
80
|
+
};
|
81
|
+
export var Radius = function (_a) {
|
82
|
+
var args = __rest(_a, []);
|
83
|
+
return (<div className="flex space-x-4">
|
84
|
+
{radiusOptions.map(function (radius) { return (<Avatar key={radius} radius={radius} imagePath="https://images.unsplash.com/photo-1511485977113-f34c92461ad9?ixlib=rb-1.2.1&w=128&h=128&dpr=2&q=80" {...args}/>); })}
|
85
|
+
</div>);
|
86
|
+
};
|
87
|
+
export var Size = function (_a) {
|
88
|
+
var args = __rest(_a, []);
|
89
|
+
return (<div className="flex space-x-4">
|
90
|
+
{typoSizeOptions.map(function (size) { return (<Avatar key={size} size={size} fallbackText="A" {...args}/>); })}
|
91
|
+
</div>);
|
92
|
+
};
|
93
|
+
export var Scaling = function (_a) {
|
94
|
+
var args = __rest(_a, []);
|
95
|
+
return (<div className="flex space-x-4">
|
96
|
+
{scalingOptions.map(function (scaling) { return (<Avatar key={scaling} scaling={scaling} imagePath="https://images.unsplash.com/photo-1502823403499-6ccfcf4fb453?&w=256&h=256&q=70&crop=focalpoint&fp-x=0.5&fp-y=0.3&fp-z=1&fit=crop" {...args}/>); })}
|
97
|
+
</div>);
|
98
|
+
};
|
99
|
+
export var Appearance = function (_a) {
|
100
|
+
var args = __rest(_a, []);
|
101
|
+
return (<div className="flex space-x-4">
|
102
|
+
<Avatar appearance="solid" fallbackText={'A'} {...args}/>
|
103
|
+
<Avatar appearance="soft" fallbackText={'A'} {...args}/>
|
104
|
+
</div>);
|
105
|
+
};
|
@@ -0,0 +1,133 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { IRadius, IScaling, IWeight } from '../../types';
|
3
|
+
declare const meta: {
|
4
|
+
title: string;
|
5
|
+
component: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("components/Badge").BadgeProps & React.RefAttributes<HTMLDivElement>>;
|
6
|
+
parameters: {
|
7
|
+
layout: string;
|
8
|
+
docs: {
|
9
|
+
description: {
|
10
|
+
component: string;
|
11
|
+
};
|
12
|
+
};
|
13
|
+
};
|
14
|
+
tags: string[];
|
15
|
+
argTypes: {
|
16
|
+
radius: {
|
17
|
+
description: string;
|
18
|
+
table: {
|
19
|
+
category: string;
|
20
|
+
type: {
|
21
|
+
summary: string;
|
22
|
+
};
|
23
|
+
};
|
24
|
+
options: IRadius[];
|
25
|
+
control: {
|
26
|
+
type: string;
|
27
|
+
};
|
28
|
+
defaultValue: {
|
29
|
+
summary: string;
|
30
|
+
};
|
31
|
+
};
|
32
|
+
size: {
|
33
|
+
table: {
|
34
|
+
category: string;
|
35
|
+
type: {
|
36
|
+
summary: string;
|
37
|
+
};
|
38
|
+
};
|
39
|
+
options: import("../../types").ISize[];
|
40
|
+
description: string;
|
41
|
+
control: {
|
42
|
+
type: string;
|
43
|
+
};
|
44
|
+
defaultValue: {
|
45
|
+
summary: string;
|
46
|
+
};
|
47
|
+
};
|
48
|
+
scaling: {
|
49
|
+
description: string;
|
50
|
+
table: {
|
51
|
+
category: string;
|
52
|
+
type: {
|
53
|
+
summary: string;
|
54
|
+
};
|
55
|
+
};
|
56
|
+
control: {
|
57
|
+
type: string;
|
58
|
+
};
|
59
|
+
options: IScaling[];
|
60
|
+
defaultValue: {
|
61
|
+
summary: string;
|
62
|
+
};
|
63
|
+
};
|
64
|
+
weight: {
|
65
|
+
description: string;
|
66
|
+
table: {
|
67
|
+
category: string;
|
68
|
+
type: {
|
69
|
+
summary: string;
|
70
|
+
};
|
71
|
+
};
|
72
|
+
options: IWeight[];
|
73
|
+
control: {
|
74
|
+
type: string;
|
75
|
+
};
|
76
|
+
defaultValue: {
|
77
|
+
summary: string;
|
78
|
+
};
|
79
|
+
};
|
80
|
+
color: {
|
81
|
+
description: string;
|
82
|
+
table: {
|
83
|
+
category: string;
|
84
|
+
type: {
|
85
|
+
summary: string;
|
86
|
+
};
|
87
|
+
};
|
88
|
+
options: import("../../types").IColor[];
|
89
|
+
control: {
|
90
|
+
type: string;
|
91
|
+
};
|
92
|
+
defaultValue: {
|
93
|
+
summary: string;
|
94
|
+
};
|
95
|
+
};
|
96
|
+
appearance: {
|
97
|
+
table: {
|
98
|
+
category: string;
|
99
|
+
type: {
|
100
|
+
summary: string;
|
101
|
+
};
|
102
|
+
};
|
103
|
+
description: string;
|
104
|
+
options: import("../../types").IAppearance[];
|
105
|
+
control: {
|
106
|
+
type: string;
|
107
|
+
};
|
108
|
+
defaultValue: {
|
109
|
+
summary: string;
|
110
|
+
};
|
111
|
+
};
|
112
|
+
};
|
113
|
+
args: {};
|
114
|
+
};
|
115
|
+
export default meta;
|
116
|
+
export declare const Default: ({ ...args }: {
|
117
|
+
[x: string]: any;
|
118
|
+
}) => React.JSX.Element;
|
119
|
+
export declare const Radius: ({ ...args }: {
|
120
|
+
[x: string]: any;
|
121
|
+
}) => React.JSX.Element;
|
122
|
+
export declare const Size: ({ ...args }: {
|
123
|
+
[x: string]: any;
|
124
|
+
}) => React.JSX.Element;
|
125
|
+
export declare const Scaling: ({ ...args }: {
|
126
|
+
[x: string]: any;
|
127
|
+
}) => React.JSX.Element;
|
128
|
+
export declare const Weight: ({ ...args }: {
|
129
|
+
[x: string]: any;
|
130
|
+
}) => React.JSX.Element;
|
131
|
+
export declare const Appearance: ({ ...args }: {
|
132
|
+
[x: string]: any;
|
133
|
+
}) => React.JSX.Element;
|
@@ -0,0 +1,130 @@
|
|
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 React from 'react';
|
24
|
+
import Badge from 'components/Badge';
|
25
|
+
import { radiusOptions, commonArgTypes, appearanceOptions, sizeOptions, scalingOptions, } from '../../../src/constants';
|
26
|
+
var meta = {
|
27
|
+
title: 'Component/Badge',
|
28
|
+
component: Badge,
|
29
|
+
parameters: {
|
30
|
+
layout: 'centered',
|
31
|
+
docs: {
|
32
|
+
description: {
|
33
|
+
component: '빠른 인지와 탐색을 돕기 위해 컴포넌트 근처에 표시되는 작은 문자 또는 숫자 데이터',
|
34
|
+
},
|
35
|
+
},
|
36
|
+
},
|
37
|
+
tags: ['autodocs'],
|
38
|
+
argTypes: {
|
39
|
+
radius: __assign(__assign({}, commonArgTypes.radius), { description: 'Badge 둥굴기' }),
|
40
|
+
size: __assign(__assign({}, commonArgTypes.size), { table: {
|
41
|
+
category: 'Props',
|
42
|
+
type: {
|
43
|
+
summary: sizeOptions
|
44
|
+
.filter(function (option) { return option !== 'x-small' && option !== 'x-large'; })
|
45
|
+
.join(' | '),
|
46
|
+
},
|
47
|
+
}, options: sizeOptions.filter(function (option) { return option !== 'x-small' && option !== 'x-large'; }), description: 'Badge 크기' }),
|
48
|
+
scaling: __assign(__assign({}, commonArgTypes.scaling), { description: 'Badge 비율' }),
|
49
|
+
weight: __assign(__assign({}, commonArgTypes.weight), { description: 'Badge 폰트 두께' }),
|
50
|
+
color: __assign(__assign({}, commonArgTypes.color), { description: 'Badge 매인색' }),
|
51
|
+
appearance: __assign(__assign({}, commonArgTypes.appearance), { table: {
|
52
|
+
category: 'Props',
|
53
|
+
type: {
|
54
|
+
summary: appearanceOptions
|
55
|
+
.filter(function (option) { return option !== 'classic' && option !== 'ghost'; })
|
56
|
+
.join(' | '),
|
57
|
+
},
|
58
|
+
}, description: 'Badge 스타일', options: appearanceOptions.filter(function (option) { return option !== 'classic' && option !== 'ghost'; }) }),
|
59
|
+
},
|
60
|
+
args: {},
|
61
|
+
};
|
62
|
+
export default meta;
|
63
|
+
export var Default = function (_a) {
|
64
|
+
var args = __rest(_a, []);
|
65
|
+
return <Badge {...args}>Badge</Badge>;
|
66
|
+
};
|
67
|
+
export var Radius = function (_a) {
|
68
|
+
var args = __rest(_a, []);
|
69
|
+
return (<div className="flex gap-3">
|
70
|
+
{radiusOptions.map(function (radius) { return (<Badge key={radius} {...args} radius={radius}>
|
71
|
+
{radius}
|
72
|
+
</Badge>); })}
|
73
|
+
</div>);
|
74
|
+
};
|
75
|
+
export var Size = function (_a) {
|
76
|
+
var args = __rest(_a, []);
|
77
|
+
return (<div className="flex items-center gap-3">
|
78
|
+
<Badge {...args} size={'small'}>
|
79
|
+
small
|
80
|
+
</Badge>
|
81
|
+
<Badge {...args} size={'medium'}>
|
82
|
+
medium
|
83
|
+
</Badge>
|
84
|
+
<Badge {...args} size={'large'}>
|
85
|
+
large
|
86
|
+
</Badge>
|
87
|
+
</div>);
|
88
|
+
};
|
89
|
+
export var Scaling = function (_a) {
|
90
|
+
var args = __rest(_a, []);
|
91
|
+
return (<div className="flex items-center gap-3">
|
92
|
+
{scalingOptions.map(function (scaling) { return (<Badge key={scaling} {...args} scaling={scaling}>
|
93
|
+
{scaling}
|
94
|
+
</Badge>); })}
|
95
|
+
</div>);
|
96
|
+
};
|
97
|
+
export var Weight = function (_a) {
|
98
|
+
var args = __rest(_a, []);
|
99
|
+
return (<div className="flex items-center gap-3">
|
100
|
+
<Badge {...args} weight="regular">
|
101
|
+
regular
|
102
|
+
</Badge>
|
103
|
+
<Badge {...args} weight="medium">
|
104
|
+
medium
|
105
|
+
</Badge>
|
106
|
+
<Badge {...args} weight="semibold">
|
107
|
+
semibold
|
108
|
+
</Badge>
|
109
|
+
<Badge {...args} weight="bold">
|
110
|
+
bold
|
111
|
+
</Badge>
|
112
|
+
</div>);
|
113
|
+
};
|
114
|
+
export var Appearance = function (_a) {
|
115
|
+
var args = __rest(_a, []);
|
116
|
+
return (<div className="flex items-center gap-3">
|
117
|
+
<Badge {...args} appearance="solid">
|
118
|
+
solid
|
119
|
+
</Badge>
|
120
|
+
<Badge {...args} appearance="soft">
|
121
|
+
soft
|
122
|
+
</Badge>
|
123
|
+
<Badge {...args} appearance="surface">
|
124
|
+
surface
|
125
|
+
</Badge>
|
126
|
+
<Badge {...args} appearance="outline">
|
127
|
+
outline
|
128
|
+
</Badge>
|
129
|
+
</div>);
|
130
|
+
};
|
@@ -0,0 +1,103 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { PointStyle } from 'types';
|
3
|
+
declare const meta: {
|
4
|
+
title: string;
|
5
|
+
component: {
|
6
|
+
({ className, datasets, scaling, width, height, ...props }: import("components/BubbleChart").BubbleChartProps): import("react").JSX.Element;
|
7
|
+
displayName: string;
|
8
|
+
};
|
9
|
+
parameters: {
|
10
|
+
layout: string;
|
11
|
+
themes: {
|
12
|
+
themeOverride: string;
|
13
|
+
};
|
14
|
+
docs: {
|
15
|
+
description: {
|
16
|
+
component: string;
|
17
|
+
};
|
18
|
+
};
|
19
|
+
};
|
20
|
+
tags: string[];
|
21
|
+
args: {
|
22
|
+
datasets: {
|
23
|
+
label: string;
|
24
|
+
data: {
|
25
|
+
x: number;
|
26
|
+
y: number;
|
27
|
+
r: number;
|
28
|
+
}[];
|
29
|
+
backgroundColor: string;
|
30
|
+
borderColor: string;
|
31
|
+
borderWidth: number;
|
32
|
+
pointStyle: PointStyle;
|
33
|
+
}[];
|
34
|
+
};
|
35
|
+
argTypes: {
|
36
|
+
scaling: {
|
37
|
+
description: string;
|
38
|
+
table: {
|
39
|
+
category: string;
|
40
|
+
type: {
|
41
|
+
summary: string;
|
42
|
+
};
|
43
|
+
};
|
44
|
+
control: {
|
45
|
+
type: string;
|
46
|
+
};
|
47
|
+
options: import("types").IScaling[];
|
48
|
+
defaultValue: {
|
49
|
+
summary: string;
|
50
|
+
};
|
51
|
+
};
|
52
|
+
datasets: {
|
53
|
+
description: string;
|
54
|
+
table: {
|
55
|
+
category: string;
|
56
|
+
type: {
|
57
|
+
summary: string;
|
58
|
+
};
|
59
|
+
};
|
60
|
+
};
|
61
|
+
labelPosition: {
|
62
|
+
description: string;
|
63
|
+
table: {
|
64
|
+
category: string;
|
65
|
+
type: {
|
66
|
+
summary: string;
|
67
|
+
};
|
68
|
+
};
|
69
|
+
control: {
|
70
|
+
type: string;
|
71
|
+
};
|
72
|
+
options: string[];
|
73
|
+
defaultValue: {
|
74
|
+
summary: string;
|
75
|
+
};
|
76
|
+
};
|
77
|
+
className: {
|
78
|
+
table: {
|
79
|
+
disable: boolean;
|
80
|
+
};
|
81
|
+
};
|
82
|
+
width: {
|
83
|
+
table: {
|
84
|
+
disable: boolean;
|
85
|
+
};
|
86
|
+
};
|
87
|
+
height: {
|
88
|
+
table: {
|
89
|
+
disable: boolean;
|
90
|
+
};
|
91
|
+
};
|
92
|
+
};
|
93
|
+
};
|
94
|
+
export default meta;
|
95
|
+
export declare const Default: ({ ...args }: {
|
96
|
+
[x: string]: any;
|
97
|
+
}) => import("react").JSX.Element;
|
98
|
+
export declare const MultiDatasets: ({ ...args }: {
|
99
|
+
[x: string]: any;
|
100
|
+
}) => import("react").JSX.Element;
|
101
|
+
export declare const PointStyles: ({ ...args }: {
|
102
|
+
[x: string]: any;
|
103
|
+
}) => import("react").JSX.Element;
|
@@ -0,0 +1,176 @@
|
|
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 { BubbleChart } from 'components/BubbleChart';
|
24
|
+
import { commonArgTypes, labelPositionList } from '../../constants';
|
25
|
+
import { red, blue, yellow } from 'color/light';
|
26
|
+
var datasets = function (label, pointStyle) {
|
27
|
+
return [
|
28
|
+
{
|
29
|
+
label: label,
|
30
|
+
data: [
|
31
|
+
{ x: 20, y: 30, r: 15 },
|
32
|
+
{ x: 25, y: 50, r: 10 },
|
33
|
+
{ x: 35, y: 25, r: 25 },
|
34
|
+
{ x: 40, y: 10, r: 10 },
|
35
|
+
],
|
36
|
+
backgroundColor: red[3],
|
37
|
+
borderColor: red[9],
|
38
|
+
borderWidth: 1,
|
39
|
+
pointStyle: pointStyle,
|
40
|
+
},
|
41
|
+
];
|
42
|
+
};
|
43
|
+
var meta = {
|
44
|
+
title: 'Chart/BubbleChart',
|
45
|
+
component: BubbleChart,
|
46
|
+
parameters: {
|
47
|
+
layout: 'centered',
|
48
|
+
themes: {
|
49
|
+
themeOverride: 'dark',
|
50
|
+
},
|
51
|
+
docs: {
|
52
|
+
description: {
|
53
|
+
component: '버블 차트 컴포넌트',
|
54
|
+
},
|
55
|
+
},
|
56
|
+
},
|
57
|
+
tags: ['autodocs'],
|
58
|
+
args: {
|
59
|
+
datasets: datasets('example', 'circle'),
|
60
|
+
},
|
61
|
+
argTypes: {
|
62
|
+
scaling: __assign(__assign({}, commonArgTypes.scaling), { description: '차트 크기 비율' }),
|
63
|
+
datasets: {
|
64
|
+
description: '차트에 사용할 데이터 세트',
|
65
|
+
table: {
|
66
|
+
category: 'Props',
|
67
|
+
type: { summary: 'object' },
|
68
|
+
},
|
69
|
+
},
|
70
|
+
labelPosition: {
|
71
|
+
description: '라벨 위치',
|
72
|
+
table: {
|
73
|
+
category: 'Props',
|
74
|
+
type: { summary: labelPositionList.join(' | ') },
|
75
|
+
},
|
76
|
+
control: { type: 'select' },
|
77
|
+
options: labelPositionList,
|
78
|
+
defaultValue: { summary: 'top' },
|
79
|
+
},
|
80
|
+
className: {
|
81
|
+
table: {
|
82
|
+
disable: true,
|
83
|
+
},
|
84
|
+
},
|
85
|
+
width: {
|
86
|
+
table: {
|
87
|
+
disable: true,
|
88
|
+
},
|
89
|
+
},
|
90
|
+
height: {
|
91
|
+
table: {
|
92
|
+
disable: true,
|
93
|
+
},
|
94
|
+
},
|
95
|
+
},
|
96
|
+
};
|
97
|
+
export default meta;
|
98
|
+
export var Default = function (_a) {
|
99
|
+
var args = __rest(_a, []);
|
100
|
+
var options = {
|
101
|
+
plugins: {
|
102
|
+
legend: {
|
103
|
+
position: args.labelPosition,
|
104
|
+
},
|
105
|
+
title: {
|
106
|
+
display: true,
|
107
|
+
text: 'Bubble Chart',
|
108
|
+
align: 'center',
|
109
|
+
},
|
110
|
+
},
|
111
|
+
};
|
112
|
+
return (<div className="w-[500px] h-[400px]">
|
113
|
+
<BubbleChart width={400} height={300} datasets={args.datasets} options={options} {...args}/>
|
114
|
+
</div>);
|
115
|
+
};
|
116
|
+
export var MultiDatasets = function (_a) {
|
117
|
+
var args = __rest(_a, []);
|
118
|
+
var datasets = [
|
119
|
+
{
|
120
|
+
label: 'first',
|
121
|
+
data: [
|
122
|
+
{ x: 20, y: 30, r: 15 },
|
123
|
+
{ x: 25, y: 50, r: 10 },
|
124
|
+
{ x: 35, y: 25, r: 25 },
|
125
|
+
{ x: 40, y: 10, r: 10 },
|
126
|
+
],
|
127
|
+
backgroundColor: red[3],
|
128
|
+
borderColor: red[9],
|
129
|
+
},
|
130
|
+
{
|
131
|
+
label: 'second',
|
132
|
+
data: [
|
133
|
+
{ x: 10, y: 10, r: 15 },
|
134
|
+
{ x: 35, y: 50, r: 10 },
|
135
|
+
{ x: 25, y: 25, r: 21 },
|
136
|
+
{ x: 30, y: 15, r: 10 },
|
137
|
+
],
|
138
|
+
backgroundColor: blue[3],
|
139
|
+
borderColor: blue[9],
|
140
|
+
},
|
141
|
+
{
|
142
|
+
label: 'third',
|
143
|
+
data: [
|
144
|
+
{ x: 5, y: 5, r: 12 },
|
145
|
+
{ x: 25, y: 10, r: 8 },
|
146
|
+
{ x: 12, y: 28, r: 13 },
|
147
|
+
{ x: 22, y: 5, r: 10 },
|
148
|
+
],
|
149
|
+
backgroundColor: yellow[3],
|
150
|
+
borderColor: yellow[9],
|
151
|
+
},
|
152
|
+
];
|
153
|
+
var options = {
|
154
|
+
plugins: {
|
155
|
+
title: {
|
156
|
+
display: true,
|
157
|
+
text: 'Radar Chart - Multiple',
|
158
|
+
},
|
159
|
+
},
|
160
|
+
};
|
161
|
+
return <Default datasets={datasets} options={options}/>;
|
162
|
+
};
|
163
|
+
export var PointStyles = function (_a) {
|
164
|
+
var args = __rest(_a, []);
|
165
|
+
var options = {
|
166
|
+
responsive: false,
|
167
|
+
};
|
168
|
+
return (<div className="space-y-3">
|
169
|
+
<div className="flex items-center space-x-3">
|
170
|
+
{['cross', 'crossRot'].map(function (style, index) { return (<BubbleChart key={index} options={options} width={350} height={250} {...args} datasets={datasets(style, style)}/>); })}
|
171
|
+
</div>
|
172
|
+
<div className="flex items-center space-x-3">
|
173
|
+
{['dash', 'rect'].map(function (style, index) { return (<BubbleChart key={index} options={options} width={350} height={250} {...args} datasets={datasets(style, style)}/>); })}
|
174
|
+
</div>
|
175
|
+
</div>);
|
176
|
+
};
|