@lotte-innovate/ui-component-test 0.0.7 → 0.0.9
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 +1 -1
- package/dist/Typography/index.d.ts +2 -2
- package/dist/Typography/index.js +3 -3
- package/dist/app/layout.d.ts +7 -0
- package/dist/app/layout.js +12 -0
- package/dist/app/page.d.ts +1 -0
- package/dist/app/page.js +25 -0
- package/dist/app/template/badgeTemplate.d.ts +11 -0
- package/dist/app/template/badgeTemplate.js +11 -0
- package/dist/app/template/buttonTemplate.d.ts +11 -0
- package/dist/app/template/buttonTemplate.js +11 -0
- package/dist/app/template/colorPicker.d.ts +6 -0
- package/dist/app/template/colorPicker.js +14 -0
- package/dist/app/template/textTemplate.d.ts +10 -0
- package/dist/app/template/textTemplate.js +23 -0
- package/dist/app/template/theme.d.ts +12 -0
- package/dist/app/template/theme.js +12 -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/Tooltip/index.d.ts +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/constants.d.ts +185 -0
- package/dist/constants.js +569 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +3 -0
- package/dist/stories/Welcome.d.ts +2 -0
- package/dist/stories/Welcome.js +30 -0
- package/dist/stories/accordion/Accordion.stories.d.ts +71 -0
- package/dist/stories/accordion/Accordion.stories.js +61 -0
- package/dist/stories/alert-dialog/AlertDialog.stories.d.ts +107 -0
- package/dist/stories/alert-dialog/AlertDialog.stories.js +60 -0
- package/dist/stories/aspect-ratio/AspectRatio.stories.d.ts +68 -0
- package/dist/stories/aspect-ratio/AspectRatio.stories.js +78 -0
- package/dist/stories/avatar/Avatar.stories.d.ts +127 -0
- package/dist/stories/avatar/Avatar.stories.js +94 -0
- package/dist/stories/badge/Badge.stories.d.ts +133 -0
- package/dist/stories/badge/Badge.stories.js +86 -0
- package/dist/stories/bubble-chart/BubbleChart.stories.d.ts +102 -0
- package/dist/stories/bubble-chart/BubbleChart.stories.js +168 -0
- package/dist/stories/button/Button.stories.d.ts +148 -0
- package/dist/stories/button/Button.stories.js +65 -0
- package/dist/stories/button/IconButton.stories.d.ts +125 -0
- package/dist/stories/button/IconButton.stories.js +80 -0
- package/dist/stories/callout/Callout.stories.d.ts +129 -0
- package/dist/stories/callout/Callout.stories.js +104 -0
- package/dist/stories/card/Card.stories.d.ts +100 -0
- package/dist/stories/card/Card.stories.js +84 -0
- package/dist/stories/checkbox/Checkbox.stories.d.ts +147 -0
- package/dist/stories/checkbox/Checkbox.stories.js +110 -0
- package/dist/stories/checkbox/CheckboxCard.stories.d.ts +129 -0
- package/dist/stories/checkbox/CheckboxCard.stories.js +90 -0
- package/dist/stories/checkbox/CheckboxGroup.stories.d.ts +91 -0
- package/dist/stories/checkbox/CheckboxGroup.stories.js +72 -0
- package/dist/stories/context-menu/ContextMenu.stories.d.ts +113 -0
- package/dist/stories/context-menu/ContextMenu.stories.js +86 -0
- package/dist/stories/data-list/DataList.stories.d.ts +97 -0
- package/dist/stories/data-list/DataList.stories.js +87 -0
- package/dist/{components/Input/Input.stories.d.ts → stories/dialog/Dialog.stories.d.ts} +39 -28
- package/dist/stories/dialog/Dialog.stories.js +59 -0
- package/dist/stories/doughnut-chart/DoughnutChart.stories.d.ts +180 -0
- package/dist/stories/doughnut-chart/DoughnutChart.stories.js +228 -0
- package/dist/stories/dropdown-menu/DropdownMenu.stories.d.ts +112 -0
- package/dist/stories/dropdown-menu/DropdownMenu.stories.js +75 -0
- package/dist/stories/header/Header.stories.d.ts +112 -0
- package/dist/stories/header/Header.stories.js +97 -0
- package/dist/stories/hover-card/HoverCard.stories.d.ts +107 -0
- package/dist/stories/hover-card/HoverCard.stories.js +71 -0
- package/dist/stories/inset/Inset.stories.d.ts +58 -0
- package/dist/stories/inset/Inset.stories.js +64 -0
- package/dist/stories/label/Label.stories.d.ts +94 -0
- package/dist/stories/label/Label.stories.js +91 -0
- package/dist/stories/menubar/Menubar.stories.d.ts +119 -0
- package/dist/stories/menubar/Menubar.stories.js +98 -0
- package/dist/stories/navigation-menu/NavigationMenu.stories.d.ts +385 -0
- package/dist/stories/navigation-menu/NavigationMenu.stories.js +79 -0
- package/dist/stories/pie-chart/PieChart.stories.d.ts +185 -0
- package/dist/stories/pie-chart/PieChart.stories.js +281 -0
- package/dist/stories/popover/Popover.stories.d.ts +78 -0
- package/dist/stories/popover/Popover.stories.js +74 -0
- package/dist/stories/progress/Progress.stories.d.ts +113 -0
- package/dist/stories/progress/Progress.stories.js +77 -0
- package/dist/stories/radar-chart/RadarChart.stories.d.ts +110 -0
- package/dist/stories/radar-chart/RadarChart.stories.js +201 -0
- package/dist/stories/radio/Radio.stories.d.ts +108 -0
- package/dist/stories/radio/Radio.stories.js +84 -0
- package/dist/stories/radio/RadioCards.stories.d.ts +127 -0
- package/dist/stories/radio/RadioCards.stories.js +94 -0
- package/dist/stories/radio/RadioGroup.stories.d.ts +111 -0
- package/dist/stories/radio/RadioGroup.stories.js +88 -0
- package/dist/stories/scroll-area/ScrollArea.stories.d.ts +59 -0
- package/dist/stories/scroll-area/ScrollArea.stories.js +63 -0
- package/dist/stories/segmented-control/SegmentedControl.stories.d.ts +97 -0
- package/dist/stories/segmented-control/SegmentedControl.stories.js +80 -0
- package/dist/stories/select/Select.stories.d.ts +116 -0
- package/dist/stories/select/Select.stories.js +88 -0
- package/dist/stories/separator/Separator.stories.d.ts +93 -0
- package/dist/stories/separator/Separator.stories.js +82 -0
- package/dist/stories/skeleton/Skeleton.stories.d.ts +88 -0
- package/dist/stories/skeleton/Skeleton.stories.js +92 -0
- package/dist/stories/slider/Slider.stories.d.ts +114 -0
- package/dist/stories/slider/Slider.stories.js +83 -0
- package/dist/stories/spinner/Spinner.stories.d.ts +83 -0
- package/dist/stories/spinner/Spinner.stories.js +87 -0
- package/dist/stories/switch/Switch.stories.d.ts +146 -0
- package/dist/stories/switch/Switch.stories.js +108 -0
- package/dist/stories/tab-nav/TabNav.stories.d.ts +55 -0
- package/dist/stories/tab-nav/TabNav.stories.js +59 -0
- package/dist/stories/table/Table.stories.d.ts +87 -0
- package/dist/stories/table/Table.stories.js +79 -0
- package/dist/stories/tabs/Tabs.stories.d.ts +55 -0
- package/dist/stories/tabs/Tabs.stories.js +59 -0
- package/dist/stories/text/Text.stories.d.ts +74 -0
- package/dist/stories/text/Text.stories.js +76 -0
- package/dist/stories/textArea/TextArea.stories.d.ts +117 -0
- package/dist/stories/textArea/TextArea.stories.js +96 -0
- package/dist/stories/textfield/TextField.stories.d.ts +116 -0
- package/dist/stories/textfield/TextField.stories.js +88 -0
- package/dist/stories/toast/Toast.stories.d.ts +138 -0
- package/dist/stories/toast/Toast.stories.js +104 -0
- package/dist/stories/toggle/Toggle.stories.d.ts +115 -0
- package/dist/stories/toggle/Toggle.stories.js +89 -0
- package/dist/stories/toggle/ToggleGroup.stories.d.ts +103 -0
- package/dist/stories/toggle/ToggleGroup.stories.js +94 -0
- package/dist/stories/tooltip/Tooltip.stories.d.ts +93 -0
- package/dist/stories/tooltip/Tooltip.stories.js +78 -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 -120
- package/dist/components/Input/Input.stories.js +0 -74
- package/dist/components/Input/index.d.ts +0 -14
- package/dist/components/Input/index.js +0 -53
@@ -0,0 +1,71 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
declare const meta: {
|
3
|
+
title: string;
|
4
|
+
component: import("react").ForwardRefExoticComponent<((Omit<import("@radix-ui/react-accordion").AccordionSingleProps & import("react").RefAttributes<HTMLDivElement>, "ref"> | Omit<import("@radix-ui/react-accordion").AccordionMultipleProps & import("react").RefAttributes<HTMLDivElement>, "ref">) & import("../../components/Accordion/index").AccordionProps) & import("react").RefAttributes<HTMLDivElement>>;
|
5
|
+
parameters: {
|
6
|
+
layout: string;
|
7
|
+
themes: {
|
8
|
+
themeOverride: string;
|
9
|
+
};
|
10
|
+
docs: {
|
11
|
+
description: {
|
12
|
+
component: string;
|
13
|
+
};
|
14
|
+
};
|
15
|
+
};
|
16
|
+
tags: string[];
|
17
|
+
argTypes: {
|
18
|
+
color: {
|
19
|
+
description: string;
|
20
|
+
table: {
|
21
|
+
category: string;
|
22
|
+
type: {
|
23
|
+
summary: string;
|
24
|
+
};
|
25
|
+
};
|
26
|
+
options: import("types").IColor[];
|
27
|
+
control: {
|
28
|
+
type: string;
|
29
|
+
};
|
30
|
+
defaultValue: {
|
31
|
+
summary: string;
|
32
|
+
};
|
33
|
+
};
|
34
|
+
scaling: {
|
35
|
+
description: string;
|
36
|
+
table: {
|
37
|
+
category: string;
|
38
|
+
type: {
|
39
|
+
summary: string;
|
40
|
+
};
|
41
|
+
};
|
42
|
+
control: {
|
43
|
+
type: string;
|
44
|
+
};
|
45
|
+
options: import("types").IScaling[];
|
46
|
+
defaultValue: {
|
47
|
+
summary: string;
|
48
|
+
};
|
49
|
+
};
|
50
|
+
type: {
|
51
|
+
description: string;
|
52
|
+
defaultValue: {
|
53
|
+
summary: string;
|
54
|
+
};
|
55
|
+
table: {
|
56
|
+
category: string;
|
57
|
+
type: {
|
58
|
+
summary: string;
|
59
|
+
};
|
60
|
+
};
|
61
|
+
options: string[];
|
62
|
+
control: {
|
63
|
+
type: string;
|
64
|
+
};
|
65
|
+
};
|
66
|
+
};
|
67
|
+
};
|
68
|
+
export default meta;
|
69
|
+
export declare const Default: ({ ...args }: {
|
70
|
+
[x: string]: any;
|
71
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,61 @@
|
|
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 { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
24
|
+
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from '../../components/Accordion/index';
|
25
|
+
import { commonArgTypes } from '../../constants';
|
26
|
+
var meta = {
|
27
|
+
title: 'Component/Accordion',
|
28
|
+
component: Accordion,
|
29
|
+
parameters: {
|
30
|
+
layout: 'centered',
|
31
|
+
themes: {
|
32
|
+
themeOverride: 'dark',
|
33
|
+
},
|
34
|
+
docs: {
|
35
|
+
description: {
|
36
|
+
component: '제한된 공간에 많은 정보를 구성할 수 있는 요소로 접힘, 펼침을 통해 정보를 보이거나 숨기는 기능',
|
37
|
+
},
|
38
|
+
},
|
39
|
+
},
|
40
|
+
tags: ['autodocs'],
|
41
|
+
argTypes: {
|
42
|
+
color: __assign(__assign({}, commonArgTypes.color), { description: 'Accordion 색상' }),
|
43
|
+
scaling: __assign(__assign({}, commonArgTypes.scaling), { description: 'Accordion 크기' }),
|
44
|
+
type: {
|
45
|
+
description: 'Accordion 항목을 하나 또는 여러개 열 수 있는지 설정',
|
46
|
+
defaultValue: { summary: 'single' },
|
47
|
+
table: {
|
48
|
+
category: 'Props',
|
49
|
+
type: { summary: ['single', 'multiple'].join(' | ') },
|
50
|
+
},
|
51
|
+
options: ['single', 'multiple'],
|
52
|
+
control: { type: 'select' },
|
53
|
+
},
|
54
|
+
},
|
55
|
+
};
|
56
|
+
export default meta;
|
57
|
+
export var Default = function (_a) {
|
58
|
+
var _b;
|
59
|
+
var args = __rest(_a, []);
|
60
|
+
return (_jsxs(Accordion, __assign({ defaultValue: "item-1", type: (_b = args.type) !== null && _b !== void 0 ? _b : 'single' }, args, { children: [_jsxs(AccordionItem, { value: "item-1", children: [_jsx(AccordionTrigger, __assign({}, args, { children: "\uB9AC\uC561\uD2B8\uB294 \uBB34\uC5C7\uC778\uAC00\uC694?" })), _jsx(AccordionContent, { children: "\uB9AC\uC561\uD2B8\uB294 \uC790\uBC14\uC2A4\uD06C\uB9BD\uD2B8 \uB77C\uC774\uBE0C\uB7EC\uB9AC\uC758 \uD558\uB098\uB85C\uC11C \uC0AC\uC6A9\uC790 \uC778\uD130\uD398\uC774\uC2A4\uB97C \uB9CC\uB4E4\uAE30 \uC704\uD574 \uC0AC\uC6A9\uB41C\uB2E4." })] }), _jsxs(AccordionItem, { value: "item-2", children: [_jsx(AccordionTrigger, __assign({}, args, { children: "\uC790\uBC14\uC2A4\uD06C\uB9BD\uD2B8\uB780 \uBB34\uC5C7\uC778\uAC00\uC694?" })), _jsx(AccordionContent, { children: "\uC790\uBC14\uC2A4\uD06C\uB9BD\uD2B8\uB294 \uAC1D\uCCB4 \uAE30\uBC18\uC758 \uC2A4\uD06C\uB9BD\uD2B8 \uD504\uB85C\uADF8\uB798\uBC0D \uC5B8\uC5B4\uC774\uB2E4." })] }), _jsxs(AccordionItem, { value: "item-3", disabled: true, children: [_jsx(AccordionTrigger, __assign({}, args, { children: "Can it be animated?" })), _jsx(AccordionContent, { children: "Yes! You can animate the Accordion with CSS or JavaScript." })] })] })));
|
61
|
+
};
|
@@ -0,0 +1,107 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
declare const meta: {
|
3
|
+
title: string;
|
4
|
+
component: import("react").ForwardRefExoticComponent<import("@radix-ui/react-alert-dialog").AlertDialogProps & import("components/AlertDialog").AlertDialogProps & import("react").RefAttributes<never>>;
|
5
|
+
parameters: {
|
6
|
+
layout: string;
|
7
|
+
themes: {
|
8
|
+
themeOverride: string;
|
9
|
+
};
|
10
|
+
docs: {
|
11
|
+
description: {
|
12
|
+
component: string;
|
13
|
+
};
|
14
|
+
};
|
15
|
+
};
|
16
|
+
tags: string[];
|
17
|
+
argTypes: {
|
18
|
+
radius: {
|
19
|
+
description: string;
|
20
|
+
defaultValue: {
|
21
|
+
summary: string;
|
22
|
+
};
|
23
|
+
table: {
|
24
|
+
category: string;
|
25
|
+
type: {
|
26
|
+
summary: string;
|
27
|
+
};
|
28
|
+
};
|
29
|
+
options: import("types").IRadius[];
|
30
|
+
control: {
|
31
|
+
type: string;
|
32
|
+
};
|
33
|
+
};
|
34
|
+
size: {
|
35
|
+
table: {
|
36
|
+
category: string;
|
37
|
+
type: {
|
38
|
+
summary: string;
|
39
|
+
};
|
40
|
+
};
|
41
|
+
options: import("types").ISize[];
|
42
|
+
description: string;
|
43
|
+
defaultValue: {
|
44
|
+
summary: string;
|
45
|
+
};
|
46
|
+
control: {
|
47
|
+
type: string;
|
48
|
+
};
|
49
|
+
};
|
50
|
+
scaling: {
|
51
|
+
description: string;
|
52
|
+
table: {
|
53
|
+
category: string;
|
54
|
+
type: {
|
55
|
+
summary: string;
|
56
|
+
};
|
57
|
+
};
|
58
|
+
control: {
|
59
|
+
type: string;
|
60
|
+
};
|
61
|
+
options: import("types").IScaling[];
|
62
|
+
defaultValue: {
|
63
|
+
summary: string;
|
64
|
+
};
|
65
|
+
};
|
66
|
+
color: {
|
67
|
+
description: string;
|
68
|
+
table: {
|
69
|
+
category: string;
|
70
|
+
type: {
|
71
|
+
summary: string;
|
72
|
+
};
|
73
|
+
};
|
74
|
+
options: import("types").IColor[];
|
75
|
+
control: {
|
76
|
+
type: string;
|
77
|
+
};
|
78
|
+
defaultValue: {
|
79
|
+
summary: string;
|
80
|
+
};
|
81
|
+
};
|
82
|
+
titleText: {
|
83
|
+
description: string;
|
84
|
+
table: {
|
85
|
+
category: string;
|
86
|
+
type: {
|
87
|
+
summary: string;
|
88
|
+
};
|
89
|
+
};
|
90
|
+
control: string;
|
91
|
+
};
|
92
|
+
contentText: {
|
93
|
+
description: string;
|
94
|
+
table: {
|
95
|
+
category: string;
|
96
|
+
type: {
|
97
|
+
summary: string;
|
98
|
+
};
|
99
|
+
};
|
100
|
+
control: string;
|
101
|
+
};
|
102
|
+
};
|
103
|
+
};
|
104
|
+
export default meta;
|
105
|
+
export declare const Default: ({ ...args }: {
|
106
|
+
[x: string]: any;
|
107
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,60 @@
|
|
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 { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
24
|
+
import { commonArgTypes, sizeOptions } from '../../constants';
|
25
|
+
import Button from 'components/Button';
|
26
|
+
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogTitle, AlertDialogTrigger, } from 'components/AlertDialog';
|
27
|
+
var meta = {
|
28
|
+
title: 'Component/AlertDialog',
|
29
|
+
component: AlertDialog,
|
30
|
+
parameters: {
|
31
|
+
layout: 'centered',
|
32
|
+
themes: {
|
33
|
+
themeOverride: 'dark',
|
34
|
+
},
|
35
|
+
docs: {
|
36
|
+
description: {
|
37
|
+
component: '사용자에게 결정을 내리거나 추가 정보를 입력하라는 프롬프트를 보내는 작은 창',
|
38
|
+
},
|
39
|
+
},
|
40
|
+
},
|
41
|
+
tags: ['autodocs'],
|
42
|
+
argTypes: {
|
43
|
+
radius: __assign(__assign({}, commonArgTypes.radius), { description: 'AlertDialog 테두리, Dialog 내 버튼 border 둥굴기', defaultValue: { summary: 'large' } }),
|
44
|
+
size: __assign(__assign({}, commonArgTypes.size), { table: {
|
45
|
+
category: 'Props',
|
46
|
+
type: {
|
47
|
+
summary: sizeOptions.filter(function (option) { return option !== 'x-small'; }).join(' | '),
|
48
|
+
},
|
49
|
+
}, options: sizeOptions.filter(function (option) { return option !== 'x-small'; }), description: 'AlertDialog 크기', defaultValue: { summary: 'large' } }),
|
50
|
+
scaling: __assign(__assign({}, commonArgTypes.scaling), { description: 'AlertDialog 비율' }),
|
51
|
+
color: __assign(__assign({}, commonArgTypes.color), { description: 'Action Button 메인 색' }),
|
52
|
+
titleText: __assign(__assign({}, commonArgTypes.basicText), { description: 'AlertDialog 타이틀 텍스트' }),
|
53
|
+
contentText: __assign(__assign({}, commonArgTypes.basicText), { description: 'AlertDialog 내용 텍스트' }),
|
54
|
+
},
|
55
|
+
};
|
56
|
+
export default meta;
|
57
|
+
export var Default = function (_a) {
|
58
|
+
var args = __rest(_a, []);
|
59
|
+
return (_jsxs(AlertDialog, { children: [_jsx(AlertDialogTrigger, { children: _jsx(Button, { children: "\uBC84\uD2BC\uC744 \uD074\uB9AD\uD574\uC8FC\uC138\uC694" }) }), _jsxs(AlertDialogContent, __assign({}, args, { children: [_jsx(AlertDialogTitle, __assign({}, args, { children: "AlertDialog \uC81C\uBAA9" })), _jsx(AlertDialogDescription, __assign({}, args, { children: "AlertDialog \uB0B4\uC6A9\uC774 \uB4E4\uC5B4\uAC08 \uACF5\uAC04\uC785\uB2C8\uB2E4." })), _jsxs("div", { className: "flex justify-end", children: [_jsx(AlertDialogCancel, __assign({}, args, { children: "\uCDE8\uC18C" })), _jsx(AlertDialogAction, __assign({}, args, { children: "\uD655\uC778" }))] })] }))] }));
|
60
|
+
};
|
@@ -0,0 +1,68 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { IScaling } from 'types';
|
3
|
+
declare const meta: {
|
4
|
+
title: string;
|
5
|
+
component: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-aspect-ratio").AspectRatioProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("components/AspectRatio").AspectRatioProps & import("react").RefAttributes<HTMLDivElement>>;
|
6
|
+
parameters: {
|
7
|
+
layout: string;
|
8
|
+
docs: {
|
9
|
+
description: {
|
10
|
+
component: string;
|
11
|
+
};
|
12
|
+
};
|
13
|
+
};
|
14
|
+
tags: string[];
|
15
|
+
argTypes: {
|
16
|
+
ratio: {
|
17
|
+
table: {
|
18
|
+
category: string;
|
19
|
+
type: {
|
20
|
+
summary: string;
|
21
|
+
};
|
22
|
+
};
|
23
|
+
options: string[];
|
24
|
+
mapping: {
|
25
|
+
'1': number;
|
26
|
+
'5/4': number;
|
27
|
+
'5/3': number;
|
28
|
+
'5/2': number;
|
29
|
+
'5/1': number;
|
30
|
+
'16/9': number;
|
31
|
+
};
|
32
|
+
control: {
|
33
|
+
type: string;
|
34
|
+
};
|
35
|
+
description: string;
|
36
|
+
defaultValue: {
|
37
|
+
summary: string;
|
38
|
+
};
|
39
|
+
};
|
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: IScaling[];
|
52
|
+
defaultValue: {
|
53
|
+
summary: string;
|
54
|
+
};
|
55
|
+
};
|
56
|
+
};
|
57
|
+
args: {};
|
58
|
+
};
|
59
|
+
export default meta;
|
60
|
+
export declare const Default: ({ ...args }: {
|
61
|
+
[x: string]: any;
|
62
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
63
|
+
export declare const Ratio: ({ ...args }: {
|
64
|
+
[x: string]: any;
|
65
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
66
|
+
export declare const Scaling: ({ ...args }: {
|
67
|
+
[x: string]: any;
|
68
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,78 @@
|
|
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 { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
24
|
+
import Image from 'next/image';
|
25
|
+
import AspectRatio from 'components/AspectRatio';
|
26
|
+
import { Text } from 'Typography/Text';
|
27
|
+
import { commonArgTypes, scalingOptions } from '../../constants';
|
28
|
+
var aspectOptions = {
|
29
|
+
'1': 1,
|
30
|
+
'5/4': 1.25,
|
31
|
+
'5/3': 1.66,
|
32
|
+
'5/2': 2.5,
|
33
|
+
'5/1': 5,
|
34
|
+
'16/9': 1.77,
|
35
|
+
};
|
36
|
+
var meta = {
|
37
|
+
title: 'Component/AspectRatio',
|
38
|
+
component: AspectRatio,
|
39
|
+
parameters: {
|
40
|
+
layout: 'centered',
|
41
|
+
docs: {
|
42
|
+
description: {
|
43
|
+
component: '원하는 비율로 콘텐츠를 표시하는 컴포넌트',
|
44
|
+
},
|
45
|
+
},
|
46
|
+
},
|
47
|
+
tags: ['autodocs'],
|
48
|
+
argTypes: {
|
49
|
+
ratio: {
|
50
|
+
table: {
|
51
|
+
category: 'Props',
|
52
|
+
type: { summary: 'number' },
|
53
|
+
},
|
54
|
+
options: Object.keys(aspectOptions),
|
55
|
+
mapping: aspectOptions,
|
56
|
+
control: {
|
57
|
+
type: 'select',
|
58
|
+
},
|
59
|
+
description: 'width / height 비율',
|
60
|
+
defaultValue: { summary: '16/9' },
|
61
|
+
},
|
62
|
+
scaling: __assign(__assign({}, commonArgTypes.scaling), { description: 'AspectRatio 비율' }),
|
63
|
+
},
|
64
|
+
args: {},
|
65
|
+
};
|
66
|
+
export default meta;
|
67
|
+
export var Default = function (_a) {
|
68
|
+
var args = __rest(_a, []);
|
69
|
+
return (_jsx("div", { className: "w-[300px]", children: _jsx(AspectRatio, __assign({ id: "defaultAspectRatio" }, args, { children: _jsx(Image, { className: "h-full w-full object-cover", src: "https://images.unsplash.com/photo-1535025183041-0991a977e25b?w=300&dpr=2&q=80", alt: "Landscape photograph by Tobias Tullius", width: 100, height: 100 }) })) }));
|
70
|
+
};
|
71
|
+
export var Ratio = function (_a) {
|
72
|
+
var args = __rest(_a, []);
|
73
|
+
return (_jsxs("div", { className: "flex space-x-2", children: [_jsxs("div", { className: "flex flex-col w-[200px] items-center", children: [_jsx(Text, { children: '3 / 1' }), _jsx(AspectRatio, __assign({ id: "defaultAspectRatio" }, args, { ratio: 3 / 1, children: _jsx(Image, { className: "h-full w-full object-cover", src: "https://images.unsplash.com/photo-1535025183041-0991a977e25b?w=300&dpr=2&q=80", alt: "Landscape photograph by Tobias Tullius", width: 100, height: 100 }) }))] }), _jsxs("div", { className: "flex flex-col w-[200px] items-center", children: [_jsx(Text, { children: '3 / 2' }), _jsx(AspectRatio, __assign({ id: "defaultAspectRatio" }, args, { ratio: 3 / 2, children: _jsx(Image, { className: "h-full w-full object-cover", src: "https://images.unsplash.com/photo-1535025183041-0991a977e25b?w=300&dpr=2&q=80", alt: "Landscape photograph by Tobias Tullius", width: 100, height: 100 }) }))] }), _jsxs("div", { className: "flex flex-col w-[200px] items-center", children: [_jsx(Text, { children: '3 / 3' }), _jsx(AspectRatio, __assign({ id: "defaultAspectRatio" }, args, { ratio: 3 / 3, children: _jsx(Image, { className: "h-full w-full object-cover", src: "https://images.unsplash.com/photo-1535025183041-0991a977e25b?w=300&dpr=2&q=80", alt: "Landscape photograph by Tobias Tullius", width: 100, height: 100 }) }))] })] }));
|
74
|
+
};
|
75
|
+
export var Scaling = function (_a) {
|
76
|
+
var args = __rest(_a, []);
|
77
|
+
return (_jsx("div", { className: "flex flex-row space-x-5", children: scalingOptions.map(function (scaling) { return (_jsx("div", { className: "w-[130px] border border-red-9", children: _jsx(AspectRatio, __assign({ id: scaling, scaling: scaling }, args, { children: _jsx(Image, { className: "h-full w-full object-cover", src: "https://images.unsplash.com/photo-1535025183041-0991a977e25b?w=300&dpr=2&q=80", alt: "Landscape photograph by Tobias Tullius", width: 100, height: 100 }) })) }, scaling)); }) }));
|
78
|
+
};
|
@@ -0,0 +1,127 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { IRadius, IScaling, ITypoSize } from 'types';
|
3
|
+
declare const meta: {
|
4
|
+
title: string;
|
5
|
+
component: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("components/Avatar").AvatarProps & import("react").RefAttributes<HTMLSpanElement>>;
|
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
|
+
defaultValue: {
|
22
|
+
summary: string;
|
23
|
+
};
|
24
|
+
table: {
|
25
|
+
category: string;
|
26
|
+
type: {
|
27
|
+
summary: string;
|
28
|
+
};
|
29
|
+
};
|
30
|
+
options: IRadius[];
|
31
|
+
control: {
|
32
|
+
type: string;
|
33
|
+
};
|
34
|
+
};
|
35
|
+
scaling: {
|
36
|
+
description: string;
|
37
|
+
table: {
|
38
|
+
category: string;
|
39
|
+
type: {
|
40
|
+
summary: string;
|
41
|
+
};
|
42
|
+
};
|
43
|
+
control: {
|
44
|
+
type: string;
|
45
|
+
};
|
46
|
+
options: IScaling[];
|
47
|
+
defaultValue: {
|
48
|
+
summary: string;
|
49
|
+
};
|
50
|
+
};
|
51
|
+
size: {
|
52
|
+
table: {
|
53
|
+
category: string;
|
54
|
+
type: {
|
55
|
+
summary: string;
|
56
|
+
};
|
57
|
+
};
|
58
|
+
options: ITypoSize[];
|
59
|
+
control: {
|
60
|
+
type: string;
|
61
|
+
};
|
62
|
+
description: string;
|
63
|
+
defaultValue: {
|
64
|
+
summary: string;
|
65
|
+
};
|
66
|
+
};
|
67
|
+
color: {
|
68
|
+
description: string;
|
69
|
+
table: {
|
70
|
+
category: string;
|
71
|
+
type: {
|
72
|
+
summary: string;
|
73
|
+
};
|
74
|
+
};
|
75
|
+
options: import("types").IColor[];
|
76
|
+
control: {
|
77
|
+
type: string;
|
78
|
+
};
|
79
|
+
defaultValue: {
|
80
|
+
summary: string;
|
81
|
+
};
|
82
|
+
};
|
83
|
+
appearance: {
|
84
|
+
description: string;
|
85
|
+
table: {
|
86
|
+
category: string;
|
87
|
+
type: {
|
88
|
+
summary: string;
|
89
|
+
};
|
90
|
+
};
|
91
|
+
options: import("types").IAppearance[];
|
92
|
+
control: {
|
93
|
+
type: string;
|
94
|
+
};
|
95
|
+
defaultValue: {
|
96
|
+
summary: string;
|
97
|
+
};
|
98
|
+
};
|
99
|
+
fallbackText: {
|
100
|
+
table: {
|
101
|
+
category: string;
|
102
|
+
type: {
|
103
|
+
summary: string;
|
104
|
+
};
|
105
|
+
};
|
106
|
+
control: string;
|
107
|
+
description: string;
|
108
|
+
defaultValue: string;
|
109
|
+
};
|
110
|
+
};
|
111
|
+
};
|
112
|
+
export default meta;
|
113
|
+
export declare const Default: ({ ...args }: {
|
114
|
+
[x: string]: any;
|
115
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
116
|
+
export declare const Radius: ({ ...args }: {
|
117
|
+
[x: string]: any;
|
118
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
119
|
+
export declare const Size: ({ ...args }: {
|
120
|
+
[x: string]: any;
|
121
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
122
|
+
export declare const Scaling: ({ ...args }: {
|
123
|
+
[x: string]: any;
|
124
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
125
|
+
export declare const Appearance: ({ ...args }: {
|
126
|
+
[x: string]: any;
|
127
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,94 @@
|
|
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 { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
24
|
+
import Avatar from 'components/Avatar';
|
25
|
+
import { radiusOptions, scalingOptions, commonArgTypes, typoSizeOptions, appearanceOptions, } from '../../constants';
|
26
|
+
var meta = {
|
27
|
+
title: 'Component/Avatar',
|
28
|
+
component: Avatar,
|
29
|
+
parameters: {
|
30
|
+
layout: 'centered',
|
31
|
+
themes: {
|
32
|
+
themeOverride: 'dark',
|
33
|
+
},
|
34
|
+
docs: {
|
35
|
+
description: {
|
36
|
+
component: '사용자 프로필 아이콘으로 사용자를 대표하는 이미지를 사진이나 이니셜로 표현하는 컴포넌트',
|
37
|
+
},
|
38
|
+
},
|
39
|
+
},
|
40
|
+
tags: ['autodocs'],
|
41
|
+
argTypes: {
|
42
|
+
radius: __assign(__assign({}, commonArgTypes.radius), { description: 'Avatar 둥굴기', defaultValue: { summary: 'full' } }),
|
43
|
+
scaling: __assign(__assign({}, commonArgTypes.scaling), { description: 'Avatar 비율' }),
|
44
|
+
size: {
|
45
|
+
table: {
|
46
|
+
category: 'Props',
|
47
|
+
type: { summary: '1 ~ 9' },
|
48
|
+
},
|
49
|
+
options: typoSizeOptions,
|
50
|
+
control: { type: 'select' },
|
51
|
+
description: 'Avatar 크기',
|
52
|
+
defaultValue: { summary: '3' },
|
53
|
+
},
|
54
|
+
color: __assign(__assign({}, commonArgTypes.color), { description: 'Avatar 메인 color' }),
|
55
|
+
appearance: __assign(__assign({}, commonArgTypes.appearance), { description: 'Avatar 스타일', table: {
|
56
|
+
category: 'Props',
|
57
|
+
type: {
|
58
|
+
summary: appearanceOptions
|
59
|
+
.filter(function (option) { return option === 'solid' || option === 'soft'; })
|
60
|
+
.join(' | '),
|
61
|
+
},
|
62
|
+
}, options: appearanceOptions.filter(function (option) { return option === 'solid' || option === 'soft'; }) }),
|
63
|
+
fallbackText: {
|
64
|
+
table: {
|
65
|
+
category: 'Props',
|
66
|
+
type: { summary: 'string' },
|
67
|
+
},
|
68
|
+
control: 'text',
|
69
|
+
description: 'Avatar fallback 텍스트',
|
70
|
+
defaultValue: 'FB',
|
71
|
+
},
|
72
|
+
},
|
73
|
+
};
|
74
|
+
export default meta;
|
75
|
+
export var Default = function (_a) {
|
76
|
+
var args = __rest(_a, []);
|
77
|
+
return (_jsxs("div", { className: "flex space-x-4", children: [_jsx(Avatar, __assign({ imagePath: "https://images.unsplash.com/photo-1492633423870-43d1cd2775eb?&w=128&h=128&dpr=2&q=80" }, args)), _jsx(Avatar, __assign({ fallbackText: "A" }, args))] }));
|
78
|
+
};
|
79
|
+
export var Radius = function (_a) {
|
80
|
+
var args = __rest(_a, []);
|
81
|
+
return (_jsx("div", { className: "flex space-x-4", children: radiusOptions.map(function (radius) { return (_jsx(Avatar, __assign({ radius: radius, imagePath: "https://images.unsplash.com/photo-1511485977113-f34c92461ad9?ixlib=rb-1.2.1&w=128&h=128&dpr=2&q=80" }, args), radius)); }) }));
|
82
|
+
};
|
83
|
+
export var Size = function (_a) {
|
84
|
+
var args = __rest(_a, []);
|
85
|
+
return (_jsx("div", { className: "flex space-x-4", children: typoSizeOptions.map(function (size) { return (_jsx(Avatar, __assign({ size: size, fallbackText: "A" }, args), size)); }) }));
|
86
|
+
};
|
87
|
+
export var Scaling = function (_a) {
|
88
|
+
var args = __rest(_a, []);
|
89
|
+
return (_jsx("div", { className: "flex space-x-4", children: scalingOptions.map(function (scaling) { return (_jsx(Avatar, __assign({ 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), scaling)); }) }));
|
90
|
+
};
|
91
|
+
export var Appearance = function (_a) {
|
92
|
+
var args = __rest(_a, []);
|
93
|
+
return (_jsxs("div", { className: "flex space-x-4", children: [_jsx(Avatar, __assign({ appearance: "solid", fallbackText: 'A' }, args)), _jsx(Avatar, __assign({ appearance: "soft", fallbackText: 'A' }, args))] }));
|
94
|
+
};
|