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