@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,281 @@
|
|
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 PieChart from 'components/PieChart';
|
25
|
+
import { amber, blue, green, orange, purple, red, ruby, violet, yellow } from 'color/light';
|
26
|
+
import { commonArgTypes } from '../../constants';
|
27
|
+
var pointStyleList = [
|
28
|
+
'circle',
|
29
|
+
'cross',
|
30
|
+
'crossRot',
|
31
|
+
'dash',
|
32
|
+
'line',
|
33
|
+
'rect',
|
34
|
+
'rectRounded',
|
35
|
+
'rectRot',
|
36
|
+
'star',
|
37
|
+
'triangle',
|
38
|
+
false,
|
39
|
+
];
|
40
|
+
var labelPositionList = ['top', 'bottom', 'left', 'right'];
|
41
|
+
var meta = {
|
42
|
+
title: 'Chart/PieChart',
|
43
|
+
component: PieChart,
|
44
|
+
parameters: {
|
45
|
+
layout: 'centered',
|
46
|
+
docs: {
|
47
|
+
description: {
|
48
|
+
component: '데이터 간의 관계 비율을 알려주는데 효과적인 파이 차트 컴포넌트',
|
49
|
+
},
|
50
|
+
},
|
51
|
+
},
|
52
|
+
tags: ['autodocs'],
|
53
|
+
args: {
|
54
|
+
labels: ['Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange'],
|
55
|
+
datasets: [
|
56
|
+
{
|
57
|
+
label: 'Count',
|
58
|
+
data: [12, 19, 3, 5, 2, 3],
|
59
|
+
backgroundColor: [red[3], blue[3], yellow[2], green[3], purple[3], orange[3]],
|
60
|
+
borderColor: [red[9], blue[9], yellow[10], green[9], purple[9], orange[9]],
|
61
|
+
borderWidth: 1,
|
62
|
+
},
|
63
|
+
],
|
64
|
+
options: {
|
65
|
+
// responsive: false,
|
66
|
+
plugins: {
|
67
|
+
legend: {
|
68
|
+
position: 'top',
|
69
|
+
labels: {
|
70
|
+
usePointStyle: false,
|
71
|
+
pointStyle: false,
|
72
|
+
},
|
73
|
+
},
|
74
|
+
title: {
|
75
|
+
display: true,
|
76
|
+
text: '파이 차트 타이틀 영역',
|
77
|
+
},
|
78
|
+
},
|
79
|
+
},
|
80
|
+
},
|
81
|
+
argTypes: {
|
82
|
+
scaling: __assign(__assign({}, commonArgTypes.scaling), { description: '차트 크기 비율' }),
|
83
|
+
labels: {
|
84
|
+
name: 'labels',
|
85
|
+
description: '차트 위에 표시될 라벨들',
|
86
|
+
table: {
|
87
|
+
category: 'Props',
|
88
|
+
type: { summary: 'string[]' },
|
89
|
+
},
|
90
|
+
},
|
91
|
+
datasets: {
|
92
|
+
name: 'Datasets',
|
93
|
+
description: '차트에 사용할 데이터셋',
|
94
|
+
table: {
|
95
|
+
category: 'Props',
|
96
|
+
type: { summary: 'object' },
|
97
|
+
},
|
98
|
+
},
|
99
|
+
'options.plugins.legend.position': {
|
100
|
+
description: '라벨 위치',
|
101
|
+
table: {
|
102
|
+
category: 'Props',
|
103
|
+
type: { summary: labelPositionList.join(' | ') },
|
104
|
+
},
|
105
|
+
control: { type: 'select' },
|
106
|
+
options: labelPositionList,
|
107
|
+
defaultValue: { summary: 'top' },
|
108
|
+
},
|
109
|
+
'options.plugins.legend.labels.pointStyle': {
|
110
|
+
description: "- \uB77C\uBCA8 \uD3EC\uC778\uD2B8 \uC2A4\uD0C0\uC77C \n - usePointStyle\uAC00 true\uC778 \uACBD\uC6B0 \uC801\uC6A9",
|
111
|
+
table: {
|
112
|
+
category: 'Props',
|
113
|
+
type: { summary: pointStyleList.join(' | ') },
|
114
|
+
},
|
115
|
+
control: { type: 'select' },
|
116
|
+
options: pointStyleList,
|
117
|
+
defaultValue: { summary: 'false' },
|
118
|
+
},
|
119
|
+
'options.plugins.legend.labels.usePointStyle': {
|
120
|
+
description: '라벨 포인트 스타일 사용여부',
|
121
|
+
table: {
|
122
|
+
category: 'Props',
|
123
|
+
type: { summary: 'boolean' },
|
124
|
+
},
|
125
|
+
control: { type: 'boolean' },
|
126
|
+
defaultValue: { summary: 'false' },
|
127
|
+
},
|
128
|
+
className: {
|
129
|
+
table: {
|
130
|
+
disable: true,
|
131
|
+
},
|
132
|
+
},
|
133
|
+
'datasets.borderDash': {
|
134
|
+
table: {
|
135
|
+
category: '기타 속성',
|
136
|
+
type: { summary: 'number[]' },
|
137
|
+
},
|
138
|
+
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",
|
139
|
+
control: 'readonly',
|
140
|
+
},
|
141
|
+
'datasets.borderDashOffset': {
|
142
|
+
table: {
|
143
|
+
category: '기타 속성',
|
144
|
+
type: { summary: 'number' },
|
145
|
+
},
|
146
|
+
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",
|
147
|
+
control: 'readonly',
|
148
|
+
},
|
149
|
+
'datasets.offset': {
|
150
|
+
table: {
|
151
|
+
category: '기타 속성',
|
152
|
+
type: { summary: 'number' },
|
153
|
+
},
|
154
|
+
description: '각 섹션 사이의 간격 조정',
|
155
|
+
control: 'readonly',
|
156
|
+
},
|
157
|
+
'datasets.spacing': {
|
158
|
+
table: {
|
159
|
+
category: '기타 속성',
|
160
|
+
type: { summary: 'number' },
|
161
|
+
},
|
162
|
+
description: '각 섹션 사이의 간격 조정, offset과 유사',
|
163
|
+
control: 'readonly',
|
164
|
+
},
|
165
|
+
'datasets.weight': {
|
166
|
+
table: {
|
167
|
+
category: '기타 속성',
|
168
|
+
type: { summary: 'number' },
|
169
|
+
},
|
170
|
+
description: '각 섹션의 상대적인 두께를 설정, 섹션이 차지하는 공간의 비율을 조정',
|
171
|
+
control: 'readonly',
|
172
|
+
},
|
173
|
+
},
|
174
|
+
};
|
175
|
+
export default meta;
|
176
|
+
export var Default = function (_a) {
|
177
|
+
var args = __rest(_a, []);
|
178
|
+
return (_jsx("div", { className: "w-[300px]", children: _jsx(PieChart, __assign({ labels: args.label, datasets: args.datasets }, args)) }));
|
179
|
+
};
|
180
|
+
export var LabelsStyle = function () {
|
181
|
+
var labelStyleList = ['star', 'line', 'rect', 'circle'];
|
182
|
+
var labels = ['A', 'B', 'C', 'D'];
|
183
|
+
var datasets = [
|
184
|
+
{
|
185
|
+
data: [2, 4, 7, 3],
|
186
|
+
backgroundColor: [ruby[9], violet[9], amber[9], green[9]],
|
187
|
+
borderColor: [ruby[9], violet[9], amber[9], green[9]],
|
188
|
+
},
|
189
|
+
];
|
190
|
+
return (_jsx("div", { className: "flex", children: labelStyleList.map(function (labelOption) { return (_jsx("div", { className: "w-[200px]", children: _jsx(PieChart, { labels: labels, datasets: datasets, options: {
|
191
|
+
plugins: {
|
192
|
+
legend: {
|
193
|
+
labels: {
|
194
|
+
pointStyle: labelOption,
|
195
|
+
usePointStyle: true,
|
196
|
+
},
|
197
|
+
position: 'top',
|
198
|
+
},
|
199
|
+
},
|
200
|
+
} }) }, labelOption)); }) }));
|
201
|
+
};
|
202
|
+
export var BorderStyles = function () {
|
203
|
+
var exampleData = [2, 4, 7, 3];
|
204
|
+
var datasets = [
|
205
|
+
{
|
206
|
+
data: exampleData,
|
207
|
+
backgroundColor: [ruby[9], violet[9], amber[9], green[9]],
|
208
|
+
},
|
209
|
+
];
|
210
|
+
var options = {
|
211
|
+
plugins: {
|
212
|
+
title: {
|
213
|
+
display: true,
|
214
|
+
text: '테두리선 없앤 스타일',
|
215
|
+
},
|
216
|
+
},
|
217
|
+
};
|
218
|
+
var dashDatasets = [
|
219
|
+
{
|
220
|
+
data: exampleData,
|
221
|
+
backgroundColor: [ruby[3], violet[3], amber[3], green[3]],
|
222
|
+
borderColor: [ruby[9], violet[9], amber[9], green[9]],
|
223
|
+
borderDash: [5, 5],
|
224
|
+
},
|
225
|
+
];
|
226
|
+
var dashOptions = {
|
227
|
+
plugins: {
|
228
|
+
title: {
|
229
|
+
display: true,
|
230
|
+
text: '테두리선 dash 적용 스타일',
|
231
|
+
},
|
232
|
+
},
|
233
|
+
};
|
234
|
+
return (_jsxs("div", { className: "flex", children: [_jsx("div", { className: "w-[200px]", children: _jsx(PieChart, { datasets: datasets, options: options }) }), _jsx("div", { className: "w-[200px]", children: _jsx(PieChart, { datasets: dashDatasets, options: dashOptions }) })] }));
|
235
|
+
};
|
236
|
+
export var DataLabels = function () {
|
237
|
+
var datasets = [
|
238
|
+
{
|
239
|
+
data: [1, 2, 3, 4, 5],
|
240
|
+
backgroundColor: [ruby[9], violet[9], amber[9], green[9], blue[9]],
|
241
|
+
},
|
242
|
+
];
|
243
|
+
var options = {
|
244
|
+
plugins: {
|
245
|
+
title: {
|
246
|
+
display: true,
|
247
|
+
text: '기본 데이터 라벨',
|
248
|
+
},
|
249
|
+
datalabels: {
|
250
|
+
display: true,
|
251
|
+
color: 'white',
|
252
|
+
},
|
253
|
+
},
|
254
|
+
};
|
255
|
+
var customOptions = {
|
256
|
+
plugins: {
|
257
|
+
title: {
|
258
|
+
display: true,
|
259
|
+
text: '끝에 위치한 데이터 라벨',
|
260
|
+
},
|
261
|
+
datalabels: {
|
262
|
+
display: true,
|
263
|
+
backgroundColor: function (context) {
|
264
|
+
return context.dataset.backgroundColor;
|
265
|
+
},
|
266
|
+
borderColor: 'white',
|
267
|
+
borderRadius: 10,
|
268
|
+
borderWidth: 2,
|
269
|
+
color: 'white',
|
270
|
+
font: {
|
271
|
+
weight: 'bold',
|
272
|
+
size: 9,
|
273
|
+
},
|
274
|
+
padding: 5,
|
275
|
+
formatter: Math.round,
|
276
|
+
anchor: 'end',
|
277
|
+
},
|
278
|
+
},
|
279
|
+
};
|
280
|
+
return (_jsxs("div", { className: "flex", children: [_jsx("div", { className: "w-[200px]", children: _jsx(PieChart, { datasets: datasets, options: options }) }), _jsx("div", { className: "w-[200px]", children: _jsx(PieChart, { datasets: datasets, options: customOptions }) })] }));
|
281
|
+
};
|
@@ -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-runtime").JSX.Element;
|
76
|
+
export declare const WithInset: ({ ...args }: {
|
77
|
+
[x: string]: any;
|
78
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,74 @@
|
|
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 { Inset } from '@radix-ui/themes';
|
26
|
+
import { Popover, PopoverTrigger, PopoverContent, PopoverClose } from '../../components/Popover';
|
27
|
+
import { TextArea } from 'components/TextArea';
|
28
|
+
import Button from 'components/Button';
|
29
|
+
import Avatar from 'components/Avatar';
|
30
|
+
import Image from 'next/image';
|
31
|
+
var meta = {
|
32
|
+
title: 'Component/Popover',
|
33
|
+
component: Popover,
|
34
|
+
parameters: {
|
35
|
+
layout: 'centered',
|
36
|
+
themes: {
|
37
|
+
themeOverride: 'dark',
|
38
|
+
},
|
39
|
+
docs: {
|
40
|
+
description: {
|
41
|
+
component: '특정 개체 위에 포인트를 클릭했을 때 제공되는 컨테이너 요소',
|
42
|
+
},
|
43
|
+
},
|
44
|
+
},
|
45
|
+
tags: ['autodocs'],
|
46
|
+
argTypes: {
|
47
|
+
radius: __assign(__assign({}, commonArgTypes.radius), { description: 'popover 둥글기' }),
|
48
|
+
size: __assign(__assign({}, commonArgTypes.size), { table: {
|
49
|
+
category: 'Props',
|
50
|
+
type: {
|
51
|
+
summary: sizeOptions.filter(function (value) { return value != 'x-small'; }).join(' | '),
|
52
|
+
},
|
53
|
+
}, options: sizeOptions.filter(function (value) { return value != 'x-small'; }), description: 'popover 크기' }),
|
54
|
+
scaling: __assign(__assign({}, commonArgTypes.scaling), { description: 'popover 비율' }),
|
55
|
+
},
|
56
|
+
args: {
|
57
|
+
size: 'medium',
|
58
|
+
},
|
59
|
+
};
|
60
|
+
export default meta;
|
61
|
+
export var Default = function (_a) {
|
62
|
+
var args = __rest(_a, []);
|
63
|
+
return (_jsxs(Popover, __assign({}, args, { children: [_jsx(PopoverTrigger, { children: _jsx(Button, { children: "Comment" }) }), _jsxs(PopoverContent, __assign({}, args, { children: [_jsx(Avatar, __assign({ 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'
|
64
|
+
? '2'
|
65
|
+
: args.size === 'large'
|
66
|
+
? '4'
|
67
|
+
: args.size === 'x-large'
|
68
|
+
? '5'
|
69
|
+
: '3' })), _jsxs("div", { className: "grow", children: [_jsx(TextArea, __assign({ placeholder: "Write a comment\u2026" }, args, { className: "w-full" })), _jsx("div", { className: "flex mt-3 justify-end", children: _jsx(PopoverClose, __assign({}, args, { children: _jsx(Button, { children: "Comment" }) })) })] })] }))] })));
|
70
|
+
};
|
71
|
+
export var WithInset = function (_a) {
|
72
|
+
var args = __rest(_a, []);
|
73
|
+
return (_jsxs(Popover, __assign({}, args, { children: [_jsx(PopoverTrigger, { children: _jsx(Button, { children: "Share image" }) }), _jsx(PopoverContent, __assign({}, args, { children: _jsxs("div", { className: "grid grid-cols-[130px_1fr]", children: [_jsx(Inset, { side: "left", pr: "current", children: _jsx(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%' } }) }), _jsxs("div", { children: [_jsx("span", { children: "Minimalistic 3D rendering wallpaper." }), _jsx("div", { className: "mt-2 flex-col items-stretch", children: _jsx(PopoverClose, __assign({}, args, { children: _jsx(Button, { children: "Copy link" }) })) })] })] }) }))] })));
|
74
|
+
};
|
@@ -0,0 +1,113 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { IRadius, ISize } from '../../types';
|
3
|
+
declare const meta: {
|
4
|
+
title: string;
|
5
|
+
component: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-progress").ProgressProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("../../components/Progress").ProgressProps & import("react").RefAttributes<HTMLDivElement>>;
|
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: 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
|
+
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
|
+
table: {
|
85
|
+
category: string;
|
86
|
+
type: {
|
87
|
+
summary: string;
|
88
|
+
};
|
89
|
+
};
|
90
|
+
description: string;
|
91
|
+
options: string[];
|
92
|
+
defaultValue: {
|
93
|
+
summary: string;
|
94
|
+
};
|
95
|
+
control: {
|
96
|
+
type: string;
|
97
|
+
};
|
98
|
+
};
|
99
|
+
};
|
100
|
+
};
|
101
|
+
export default meta;
|
102
|
+
export declare const Default: ({ ...args }: {
|
103
|
+
[x: string]: any;
|
104
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
105
|
+
export declare const Radius: ({ ...args }: {
|
106
|
+
[x: string]: any;
|
107
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
108
|
+
export declare const Size: ({ ...args }: {
|
109
|
+
[x: string]: any;
|
110
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
111
|
+
export declare const Variant: ({ ...args }: {
|
112
|
+
[x: string]: any;
|
113
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,77 @@
|
|
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 } from "react/jsx-runtime";
|
24
|
+
import { commonArgTypes, radiusOptions, sizeOptions } from '../../constants';
|
25
|
+
import { Progress } from '../../components/Progress';
|
26
|
+
var meta = {
|
27
|
+
title: 'Component/Progress',
|
28
|
+
component: Progress,
|
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: 'progress 둥글기' }),
|
43
|
+
size: __assign(__assign({}, commonArgTypes.size), { table: {
|
44
|
+
category: 'Props',
|
45
|
+
type: {
|
46
|
+
summary: sizeOptions
|
47
|
+
.filter(function (value) { return value != 'x-small' && value != 'x-large'; })
|
48
|
+
.join(' | '),
|
49
|
+
},
|
50
|
+
}, options: sizeOptions.filter(function (value) { return value != 'x-small' && value != 'x-large'; }), description: 'popover 크기' }),
|
51
|
+
scaling: __assign(__assign({}, commonArgTypes.scaling), { description: 'progress 비율' }),
|
52
|
+
color: __assign(__assign({}, commonArgTypes.color), { description: 'progress color' }),
|
53
|
+
appearance: __assign(__assign({}, commonArgTypes.appearance), { table: {
|
54
|
+
category: 'Props',
|
55
|
+
type: { summary: ['classic', 'surface', 'soft'].join(' | ') },
|
56
|
+
}, description: 'progress 스타일', options: ['classic', 'surface', 'soft'], defaultValue: { summary: 'surface' } }),
|
57
|
+
},
|
58
|
+
};
|
59
|
+
export default meta;
|
60
|
+
export var Default = function (_a) {
|
61
|
+
var args = __rest(_a, []);
|
62
|
+
return _jsx(Progress, __assign({ value: 25 }, args));
|
63
|
+
};
|
64
|
+
export var Radius = function (_a) {
|
65
|
+
var args = __rest(_a, []);
|
66
|
+
return (_jsx("div", { className: "flex flex-col space-y-3", children: radiusOptions.map(function (radius) { return (_jsx(Progress, __assign({ value: 25 }, args, { radius: radius }), radius)); }) }));
|
67
|
+
};
|
68
|
+
export var Size = function (_a) {
|
69
|
+
var args = __rest(_a, []);
|
70
|
+
return (_jsx("div", { className: "flex flex-col space-y-3", children: sizeOptions
|
71
|
+
.filter(function (value) { return value != 'x-small' && value != 'x-large'; })
|
72
|
+
.map(function (size) { return (_jsx(Progress, __assign({ value: 25 }, args, { size: size }), size)); }) }));
|
73
|
+
};
|
74
|
+
export var Variant = function (_a) {
|
75
|
+
var args = __rest(_a, []);
|
76
|
+
return (_jsx("div", { className: "flex flex-col space-y-3", children: ['classic', 'surface', 'soft'].map(function (appearance) { return (_jsx(Default, __assign({ value: 25 }, args, { appearance: appearance }), appearance)); }) }));
|
77
|
+
};
|