@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.
Files changed (143) hide show
  1. package/README.md +163 -163
  2. package/dist/Typography/Header/index.d.ts +1 -1
  3. package/dist/Typography/index.d.ts +2 -2
  4. package/dist/Typography/index.js +3 -3
  5. package/dist/app/layout.d.ts +7 -0
  6. package/dist/app/layout.js +12 -0
  7. package/dist/app/page.d.ts +1 -0
  8. package/dist/app/page.js +25 -0
  9. package/dist/app/template/badgeTemplate.d.ts +11 -0
  10. package/dist/app/template/badgeTemplate.js +11 -0
  11. package/dist/app/template/buttonTemplate.d.ts +11 -0
  12. package/dist/app/template/buttonTemplate.js +11 -0
  13. package/dist/app/template/colorPicker.d.ts +6 -0
  14. package/dist/app/template/colorPicker.js +14 -0
  15. package/dist/app/template/textTemplate.d.ts +10 -0
  16. package/dist/app/template/textTemplate.js +23 -0
  17. package/dist/app/template/theme.d.ts +12 -0
  18. package/dist/app/template/theme.js +12 -0
  19. package/dist/color/alpha.d.ts +784 -0
  20. package/dist/color/alpha.js +784 -0
  21. package/dist/color/constants.d.ts +20 -0
  22. package/dist/color/constants.js +200 -0
  23. package/dist/color/dark.d.ts +392 -0
  24. package/dist/color/dark.js +392 -0
  25. package/dist/color/krdsColors.d.ts +309 -0
  26. package/dist/color/krdsColors.js +309 -0
  27. package/dist/color/light.d.ts +392 -0
  28. package/dist/color/light.js +393 -0
  29. package/dist/components/Tooltip/index.d.ts +1 -1
  30. package/dist/components/index.d.ts +2 -0
  31. package/dist/constants.d.ts +185 -0
  32. package/dist/constants.js +569 -0
  33. package/dist/index.d.ts +5 -0
  34. package/dist/index.js +3 -0
  35. package/dist/stories/Welcome.d.ts +2 -0
  36. package/dist/stories/Welcome.js +30 -0
  37. package/dist/stories/accordion/Accordion.stories.d.ts +71 -0
  38. package/dist/stories/accordion/Accordion.stories.js +61 -0
  39. package/dist/stories/alert-dialog/AlertDialog.stories.d.ts +107 -0
  40. package/dist/stories/alert-dialog/AlertDialog.stories.js +60 -0
  41. package/dist/stories/aspect-ratio/AspectRatio.stories.d.ts +68 -0
  42. package/dist/stories/aspect-ratio/AspectRatio.stories.js +78 -0
  43. package/dist/stories/avatar/Avatar.stories.d.ts +127 -0
  44. package/dist/stories/avatar/Avatar.stories.js +94 -0
  45. package/dist/stories/badge/Badge.stories.d.ts +133 -0
  46. package/dist/stories/badge/Badge.stories.js +86 -0
  47. package/dist/stories/bubble-chart/BubbleChart.stories.d.ts +102 -0
  48. package/dist/stories/bubble-chart/BubbleChart.stories.js +168 -0
  49. package/dist/stories/button/Button.stories.d.ts +148 -0
  50. package/dist/stories/button/Button.stories.js +65 -0
  51. package/dist/stories/button/IconButton.stories.d.ts +125 -0
  52. package/dist/stories/button/IconButton.stories.js +80 -0
  53. package/dist/stories/callout/Callout.stories.d.ts +129 -0
  54. package/dist/stories/callout/Callout.stories.js +104 -0
  55. package/dist/stories/card/Card.stories.d.ts +100 -0
  56. package/dist/stories/card/Card.stories.js +84 -0
  57. package/dist/stories/checkbox/Checkbox.stories.d.ts +147 -0
  58. package/dist/stories/checkbox/Checkbox.stories.js +110 -0
  59. package/dist/stories/checkbox/CheckboxCard.stories.d.ts +129 -0
  60. package/dist/stories/checkbox/CheckboxCard.stories.js +90 -0
  61. package/dist/stories/checkbox/CheckboxGroup.stories.d.ts +91 -0
  62. package/dist/stories/checkbox/CheckboxGroup.stories.js +72 -0
  63. package/dist/stories/context-menu/ContextMenu.stories.d.ts +113 -0
  64. package/dist/stories/context-menu/ContextMenu.stories.js +86 -0
  65. package/dist/stories/data-list/DataList.stories.d.ts +97 -0
  66. package/dist/stories/data-list/DataList.stories.js +87 -0
  67. package/dist/{components/Input/Input.stories.d.ts → stories/dialog/Dialog.stories.d.ts} +39 -28
  68. package/dist/stories/dialog/Dialog.stories.js +59 -0
  69. package/dist/stories/doughnut-chart/DoughnutChart.stories.d.ts +180 -0
  70. package/dist/stories/doughnut-chart/DoughnutChart.stories.js +228 -0
  71. package/dist/stories/dropdown-menu/DropdownMenu.stories.d.ts +112 -0
  72. package/dist/stories/dropdown-menu/DropdownMenu.stories.js +75 -0
  73. package/dist/stories/header/Header.stories.d.ts +112 -0
  74. package/dist/stories/header/Header.stories.js +97 -0
  75. package/dist/stories/hover-card/HoverCard.stories.d.ts +107 -0
  76. package/dist/stories/hover-card/HoverCard.stories.js +71 -0
  77. package/dist/stories/inset/Inset.stories.d.ts +58 -0
  78. package/dist/stories/inset/Inset.stories.js +64 -0
  79. package/dist/stories/label/Label.stories.d.ts +94 -0
  80. package/dist/stories/label/Label.stories.js +91 -0
  81. package/dist/stories/menubar/Menubar.stories.d.ts +119 -0
  82. package/dist/stories/menubar/Menubar.stories.js +98 -0
  83. package/dist/stories/navigation-menu/NavigationMenu.stories.d.ts +385 -0
  84. package/dist/stories/navigation-menu/NavigationMenu.stories.js +79 -0
  85. package/dist/stories/pie-chart/PieChart.stories.d.ts +185 -0
  86. package/dist/stories/pie-chart/PieChart.stories.js +281 -0
  87. package/dist/stories/popover/Popover.stories.d.ts +78 -0
  88. package/dist/stories/popover/Popover.stories.js +74 -0
  89. package/dist/stories/progress/Progress.stories.d.ts +113 -0
  90. package/dist/stories/progress/Progress.stories.js +77 -0
  91. package/dist/stories/radar-chart/RadarChart.stories.d.ts +110 -0
  92. package/dist/stories/radar-chart/RadarChart.stories.js +201 -0
  93. package/dist/stories/radio/Radio.stories.d.ts +108 -0
  94. package/dist/stories/radio/Radio.stories.js +84 -0
  95. package/dist/stories/radio/RadioCards.stories.d.ts +127 -0
  96. package/dist/stories/radio/RadioCards.stories.js +94 -0
  97. package/dist/stories/radio/RadioGroup.stories.d.ts +111 -0
  98. package/dist/stories/radio/RadioGroup.stories.js +88 -0
  99. package/dist/stories/scroll-area/ScrollArea.stories.d.ts +59 -0
  100. package/dist/stories/scroll-area/ScrollArea.stories.js +63 -0
  101. package/dist/stories/segmented-control/SegmentedControl.stories.d.ts +97 -0
  102. package/dist/stories/segmented-control/SegmentedControl.stories.js +80 -0
  103. package/dist/stories/select/Select.stories.d.ts +116 -0
  104. package/dist/stories/select/Select.stories.js +88 -0
  105. package/dist/stories/separator/Separator.stories.d.ts +93 -0
  106. package/dist/stories/separator/Separator.stories.js +82 -0
  107. package/dist/stories/skeleton/Skeleton.stories.d.ts +88 -0
  108. package/dist/stories/skeleton/Skeleton.stories.js +92 -0
  109. package/dist/stories/slider/Slider.stories.d.ts +114 -0
  110. package/dist/stories/slider/Slider.stories.js +83 -0
  111. package/dist/stories/spinner/Spinner.stories.d.ts +83 -0
  112. package/dist/stories/spinner/Spinner.stories.js +87 -0
  113. package/dist/stories/switch/Switch.stories.d.ts +146 -0
  114. package/dist/stories/switch/Switch.stories.js +108 -0
  115. package/dist/stories/tab-nav/TabNav.stories.d.ts +55 -0
  116. package/dist/stories/tab-nav/TabNav.stories.js +59 -0
  117. package/dist/stories/table/Table.stories.d.ts +87 -0
  118. package/dist/stories/table/Table.stories.js +79 -0
  119. package/dist/stories/tabs/Tabs.stories.d.ts +55 -0
  120. package/dist/stories/tabs/Tabs.stories.js +59 -0
  121. package/dist/stories/text/Text.stories.d.ts +74 -0
  122. package/dist/stories/text/Text.stories.js +76 -0
  123. package/dist/stories/textArea/TextArea.stories.d.ts +117 -0
  124. package/dist/stories/textArea/TextArea.stories.js +96 -0
  125. package/dist/stories/textfield/TextField.stories.d.ts +116 -0
  126. package/dist/stories/textfield/TextField.stories.js +88 -0
  127. package/dist/stories/toast/Toast.stories.d.ts +138 -0
  128. package/dist/stories/toast/Toast.stories.js +104 -0
  129. package/dist/stories/toggle/Toggle.stories.d.ts +115 -0
  130. package/dist/stories/toggle/Toggle.stories.js +89 -0
  131. package/dist/stories/toggle/ToggleGroup.stories.d.ts +103 -0
  132. package/dist/stories/toggle/ToggleGroup.stories.js +94 -0
  133. package/dist/stories/tooltip/Tooltip.stories.d.ts +93 -0
  134. package/dist/stories/tooltip/Tooltip.stories.js +78 -0
  135. package/dist/tsconfig.tsbuildinfo +1 -0
  136. package/dist/types.d.ts +11 -0
  137. package/dist/types.js +1 -0
  138. package/dist/utils/utils.d.ts +3 -0
  139. package/dist/utils/utils.js +27 -0
  140. package/package.json +118 -120
  141. package/dist/components/Input/Input.stories.js +0 -74
  142. package/dist/components/Input/index.d.ts +0 -14
  143. package/dist/components/Input/index.js +0 -53
@@ -0,0 +1,180 @@
1
+ declare const meta: {
2
+ title: string;
3
+ component: ({ labels, datasets, scaling, className, ...rest }: import("components/DoughnutChart").DoughnutChartProps) => import("react/jsx-runtime").JSX.Element;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ description: {
8
+ component: string;
9
+ };
10
+ };
11
+ };
12
+ tags: string[];
13
+ args: {
14
+ labels: string[];
15
+ datasets: {
16
+ label: string;
17
+ data: number[];
18
+ backgroundColor: string[];
19
+ borderColor: string[];
20
+ borderWidth: number;
21
+ }[];
22
+ options: {
23
+ plugins: {
24
+ legend: {
25
+ position: string;
26
+ labels: {
27
+ usePointStyle: boolean;
28
+ pointStyle: boolean;
29
+ };
30
+ };
31
+ };
32
+ };
33
+ };
34
+ argTypes: {
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: import("types").IScaling[];
47
+ defaultValue: {
48
+ summary: string;
49
+ };
50
+ };
51
+ labels: {
52
+ name: string;
53
+ description: string;
54
+ table: {
55
+ category: string;
56
+ type: {
57
+ summary: string;
58
+ };
59
+ };
60
+ };
61
+ datasets: {
62
+ name: string;
63
+ description: string;
64
+ table: {
65
+ category: string;
66
+ type: {
67
+ summary: string;
68
+ };
69
+ };
70
+ };
71
+ 'options.plugins.legend.position': {
72
+ description: string;
73
+ table: {
74
+ category: string;
75
+ type: {
76
+ summary: string;
77
+ };
78
+ };
79
+ control: {
80
+ type: string;
81
+ };
82
+ options: string[];
83
+ defaultValue: {
84
+ summary: string;
85
+ };
86
+ };
87
+ 'options.plugins.legend.labels.pointStyle': {
88
+ description: string;
89
+ table: {
90
+ category: string;
91
+ type: {
92
+ summary: string;
93
+ };
94
+ };
95
+ control: {
96
+ type: string;
97
+ };
98
+ options: (string | boolean)[];
99
+ defaultValue: {
100
+ summary: string;
101
+ };
102
+ };
103
+ 'options.plugins.legend.labels.usePointStyle': {
104
+ description: string;
105
+ table: {
106
+ category: string;
107
+ type: {
108
+ summary: string;
109
+ };
110
+ };
111
+ control: {
112
+ type: string;
113
+ };
114
+ defaultValue: {
115
+ summary: string;
116
+ };
117
+ };
118
+ className: {
119
+ table: {
120
+ disable: boolean;
121
+ };
122
+ };
123
+ 'datasets.borderDash': {
124
+ table: {
125
+ category: string;
126
+ type: {
127
+ summary: string;
128
+ };
129
+ };
130
+ description: string;
131
+ control: string;
132
+ };
133
+ 'datasets.borderDashOffset': {
134
+ table: {
135
+ category: string;
136
+ type: {
137
+ summary: string;
138
+ };
139
+ };
140
+ description: string;
141
+ control: string;
142
+ };
143
+ 'datasets.offset': {
144
+ table: {
145
+ category: string;
146
+ type: {
147
+ summary: string;
148
+ };
149
+ };
150
+ description: string;
151
+ control: string;
152
+ };
153
+ 'datasets.spacing': {
154
+ table: {
155
+ category: string;
156
+ type: {
157
+ summary: string;
158
+ };
159
+ };
160
+ description: string;
161
+ control: string;
162
+ };
163
+ 'datasets.weight': {
164
+ table: {
165
+ category: string;
166
+ type: {
167
+ summary: string;
168
+ };
169
+ };
170
+ description: string;
171
+ control: string;
172
+ };
173
+ };
174
+ };
175
+ export default meta;
176
+ export declare const Default: ({ ...args }: {
177
+ [x: string]: any;
178
+ }) => import("react/jsx-runtime").JSX.Element;
179
+ export declare const BorderStyles: () => import("react/jsx-runtime").JSX.Element;
180
+ export declare const DataLabels: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,228 @@
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 DoughnutChart from 'components/DoughnutChart';
25
+ import { amber, blue, green, lime, mint, 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/DoughnutChart',
43
+ component: DoughnutChart,
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
+ plugins: {
66
+ legend: {
67
+ position: 'top',
68
+ labels: {
69
+ usePointStyle: false,
70
+ pointStyle: false,
71
+ },
72
+ },
73
+ },
74
+ },
75
+ },
76
+ argTypes: {
77
+ scaling: __assign(__assign({}, commonArgTypes.scaling), { description: '차트 크기 비율' }),
78
+ labels: {
79
+ name: 'labels',
80
+ description: '차트 위에 표시될 라벨들',
81
+ table: {
82
+ category: 'Props',
83
+ type: { summary: 'string[]' },
84
+ },
85
+ },
86
+ datasets: {
87
+ name: 'Datasets',
88
+ description: '차트에 사용할 데이터셋',
89
+ table: {
90
+ category: 'Props',
91
+ type: { summary: 'object' },
92
+ },
93
+ },
94
+ 'options.plugins.legend.position': {
95
+ description: '라벨 위치',
96
+ table: {
97
+ category: 'Props',
98
+ type: { summary: labelPositionList.join(' | ') },
99
+ },
100
+ control: { type: 'select' },
101
+ options: labelPositionList,
102
+ defaultValue: { summary: 'top' },
103
+ },
104
+ 'options.plugins.legend.labels.pointStyle': {
105
+ description: "- \uB77C\uBCA8 \uD3EC\uC778\uD2B8 \uC2A4\uD0C0\uC77C \n - usePointStyle\uAC00 true\uC778 \uACBD\uC6B0 \uC801\uC6A9",
106
+ table: {
107
+ category: 'Props',
108
+ type: { summary: pointStyleList.join(' | ') },
109
+ },
110
+ control: { type: 'select' },
111
+ options: pointStyleList,
112
+ defaultValue: { summary: 'false' },
113
+ },
114
+ 'options.plugins.legend.labels.usePointStyle': {
115
+ description: '라벨 포인트 스타일 사용여부',
116
+ table: {
117
+ category: 'Props',
118
+ type: { summary: 'boolean' },
119
+ },
120
+ control: { type: 'boolean' },
121
+ defaultValue: { summary: 'false' },
122
+ },
123
+ className: {
124
+ table: {
125
+ disable: true,
126
+ },
127
+ },
128
+ 'datasets.borderDash': {
129
+ table: {
130
+ category: '기타 속성',
131
+ type: { summary: 'number[]' },
132
+ },
133
+ 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",
134
+ control: 'readonly',
135
+ },
136
+ 'datasets.borderDashOffset': {
137
+ table: {
138
+ category: '기타 속성',
139
+ type: { summary: 'number' },
140
+ },
141
+ 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",
142
+ control: 'readonly',
143
+ },
144
+ 'datasets.offset': {
145
+ table: {
146
+ category: '기타 속성',
147
+ type: { summary: 'number' },
148
+ },
149
+ description: '각 섹션 사이의 간격 조정',
150
+ control: 'readonly',
151
+ },
152
+ 'datasets.spacing': {
153
+ table: {
154
+ category: '기타 속성',
155
+ type: { summary: 'number' },
156
+ },
157
+ description: '각 섹션 사이의 간격 조정, offset과 유사',
158
+ control: 'readonly',
159
+ },
160
+ 'datasets.weight': {
161
+ table: {
162
+ category: '기타 속성',
163
+ type: { summary: 'number' },
164
+ },
165
+ description: '각 섹션의 상대적인 두께를 설정, 섹션이 차지하는 공간의 비율을 조정',
166
+ control: 'readonly',
167
+ },
168
+ },
169
+ };
170
+ export default meta;
171
+ export var Default = function (_a) {
172
+ var args = __rest(_a, []);
173
+ return (_jsx("div", { className: "w-[300px]", children: _jsx(DoughnutChart, __assign({ labels: args.label, datasets: args.datasets }, args)) }));
174
+ };
175
+ export var BorderStyles = function () {
176
+ var datasets = [
177
+ {
178
+ data: [2, 4, 7, 3],
179
+ backgroundColor: [ruby[9], violet[9], amber[9], mint[9]],
180
+ },
181
+ ];
182
+ var options = {
183
+ plugins: {
184
+ title: {
185
+ display: true,
186
+ text: '테두리선 없앤 스타일',
187
+ },
188
+ },
189
+ };
190
+ var dashDatasets = [
191
+ {
192
+ data: [1, 2, 3, 4],
193
+ backgroundColor: [red[3], yellow[3], lime[3], blue[3]],
194
+ borderColor: [red[9], yellow[9], lime[9], blue[9]],
195
+ borderDash: [5],
196
+ },
197
+ ];
198
+ var dashOptions = {
199
+ plugins: {
200
+ title: {
201
+ display: true,
202
+ text: '테두리선 dash 적용 스타일',
203
+ },
204
+ },
205
+ };
206
+ return (_jsxs("div", { className: "flex", children: [_jsx("div", { className: "w-[200px]", children: _jsx(DoughnutChart, { datasets: datasets, options: options }) }), _jsx("div", { className: "w-[200px]", children: _jsx(DoughnutChart, { datasets: dashDatasets, options: dashOptions }) })] }));
207
+ };
208
+ export var DataLabels = function () {
209
+ var datasets = [
210
+ {
211
+ data: [2, 4, 7, 3],
212
+ backgroundColor: [ruby[9], violet[9], amber[9], mint[9]],
213
+ },
214
+ ];
215
+ var options = {
216
+ plugins: {
217
+ title: {
218
+ display: true,
219
+ text: '기본 데이터 라벨',
220
+ },
221
+ datalabels: {
222
+ display: true,
223
+ color: 'white',
224
+ },
225
+ },
226
+ };
227
+ return _jsx(DoughnutChart, { datasets: datasets, options: options });
228
+ };
@@ -0,0 +1,112 @@
1
+ /// <reference types="react" />
2
+ import { IRadius } from 'types';
3
+ declare const meta: {
4
+ title: string;
5
+ component: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dropdown-menu").DropdownMenuProps & import("../../components/DropdownMenu/index").DropdownMenuProps & 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: 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: string[];
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
+ options: string[];
91
+ control: {
92
+ type: string;
93
+ };
94
+ defaultValue: {
95
+ summary: string;
96
+ };
97
+ };
98
+ };
99
+ };
100
+ export default meta;
101
+ export declare const Default: ({ ...args }: {
102
+ [x: string]: any;
103
+ }) => import("react/jsx-runtime").JSX.Element;
104
+ export declare const Radius: ({ ...args }: {
105
+ [x: string]: any;
106
+ }) => import("react/jsx-runtime").JSX.Element;
107
+ export declare const Size: ({ ...args }: {
108
+ [x: string]: any;
109
+ }) => import("react/jsx-runtime").JSX.Element;
110
+ export declare const Appearance: ({ ...args }: {
111
+ [x: string]: any;
112
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,75 @@
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, radiusOptions } from '../../constants';
25
+ import { ChevronDownIcon } from '@radix-ui/react-icons';
26
+ import { DropdownMenu, DropdownMenuItem, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuSeparator, DropdownMenuSubTrigger, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuLabel, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, } from '../../components/DropdownMenu/index';
27
+ import Button from 'components/Button';
28
+ var meta = {
29
+ title: 'Component/DropdownMenu',
30
+ component: DropdownMenu,
31
+ parameters: {
32
+ layout: 'centered',
33
+ themes: {
34
+ themeOverride: 'dark',
35
+ },
36
+ docs: {
37
+ description: {
38
+ component: '버튼을 클릭하여 세부항목을 확인하고 하나의 항목을 선택하는 기능',
39
+ },
40
+ },
41
+ },
42
+ tags: ['autodocs'],
43
+ argTypes: {
44
+ radius: __assign(__assign({}, commonArgTypes.radius), { description: 'dropdownMenu 둥글기' }),
45
+ size: __assign(__assign({}, commonArgTypes.size), { table: {
46
+ category: 'Props',
47
+ type: {
48
+ summary: ['small', 'medium'].join(' | '),
49
+ },
50
+ }, options: ['small', 'medium'], description: 'dropdownMenu 크기' }),
51
+ scaling: __assign(__assign({}, commonArgTypes.scaling), { description: 'dropdownMenu scaling' }),
52
+ color: __assign(__assign({}, commonArgTypes.color), { description: 'dropdownMenu color' }),
53
+ appearance: __assign(__assign({}, commonArgTypes.appearance), { table: {
54
+ category: 'Props',
55
+ type: { summary: ['solid', 'soft'].join(' | ') },
56
+ }, options: ['solid', 'soft'] }),
57
+ },
58
+ };
59
+ export default meta;
60
+ export var Default = function (_a) {
61
+ var args = __rest(_a, []);
62
+ return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, __assign({}, args, { children: _jsxs(Button, { children: ["Options", _jsx(ChevronDownIcon, {})] }) })), _jsxs(DropdownMenuContent, __assign({}, args, { children: [_jsx(DropdownMenuLabel, __assign({}, args, { children: "\uB77C\uBCA8" })), _jsx(DropdownMenuItem, __assign({}, args, { shortcut: "\u2318 E", children: "\uAE30\uBCF8 \uC544\uC774\uD15C" })), _jsx(DropdownMenuItem, __assign({}, args, { disabled: true, children: "\uC0AC\uC6A9\uBD88\uAC00 \uC544\uC774\uD15C" })), _jsx(DropdownMenuSeparator, {}), _jsx(DropdownMenuCheckboxItem, __assign({ checked: true }, args, { children: "\uCCB4\uD06C\uBC15\uC2A41" })), _jsx(DropdownMenuCheckboxItem, __assign({ checked: false }, args, { children: "\uCCB4\uD06C\uBC15\uC2A42" })), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuRadioGroup, { value: "option1", children: [_jsx(DropdownMenuRadioItem, __assign({ value: "option1" }, args, { children: "\uB77C\uB514\uC6241" })), _jsx(DropdownMenuRadioItem, __assign({ value: "option2" }, args, { children: "\uB77C\uB514\uC6242" }))] }), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuSub, { children: [_jsx(DropdownMenuSubTrigger, __assign({}, args, { children: "More Menu" })), _jsxs(DropdownMenuSubContent, __assign({}, args, { children: [_jsx(DropdownMenuItem, __assign({}, args, { children: "project" })), _jsx(DropdownMenuItem, __assign({}, args, { children: "folder" })), _jsx(DropdownMenuSeparator, {}), _jsx(DropdownMenuItem, __assign({}, args, { children: "options" }))] }))] })] }))] }));
63
+ };
64
+ export var Radius = function (_a) {
65
+ var args = __rest(_a, []);
66
+ return (_jsx("div", { className: "flex items-center space-x-4", children: radiusOptions.map(function (radius) { return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, __assign({}, args, { radius: radius, children: _jsxs(Button, { children: [radius, _jsx(ChevronDownIcon, {})] }) })), _jsxs(DropdownMenuContent, __assign({}, args, { radius: radius, children: [_jsx(DropdownMenuItem, __assign({}, args, { radius: radius, children: "\uBA54\uB2741" })), _jsx(DropdownMenuItem, __assign({}, args, { radius: radius, children: "\uBA54\uB2742" }))] }))] }, radius)); }) }));
67
+ };
68
+ export var Size = function (_a) {
69
+ var args = __rest(_a, []);
70
+ return (_jsx("div", { className: "flex items-center space-x-4", children: ['small', 'medium'].map(function (size) { return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, __assign({}, args, { size: size, children: _jsxs(Button, { children: [size, _jsx(ChevronDownIcon, {})] }) })), _jsxs(DropdownMenuContent, __assign({}, args, { size: size, children: [_jsx(DropdownMenuItem, __assign({}, args, { size: size, children: "\uBA54\uB2741" })), _jsx(DropdownMenuItem, __assign({}, args, { size: size, children: "\uBA54\uB2742" }))] }))] }, size)); }) }));
71
+ };
72
+ export var Appearance = function (_a) {
73
+ var args = __rest(_a, []);
74
+ return (_jsx("div", { className: "flex items-center space-x-4", children: ['solid', 'soft'].map(function (appearance) { return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, __assign({}, args, { appearance: appearance, children: _jsxs(Button, { children: [appearance, _jsx(ChevronDownIcon, {})] }) })), _jsxs(DropdownMenuContent, __assign({}, args, { children: [_jsx(DropdownMenuItem, __assign({}, args, { appearance: appearance, children: "\uBA54\uB2741" })), _jsx(DropdownMenuItem, __assign({}, args, { appearance: appearance, children: "\uBA54\uB2742" }))] }))] }, appearance)); }) }));
75
+ };