@opsnow-mcp/opsnow-mcp-common-ui-server 1.0.19 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/build/components/data/icon-names.js +0 -129
- package/build/components/examples/opsnow-common-calendar-examples-data.js +0 -48
- package/build/components/examples/opsnow-common-chart-examples-data.js +0 -6590
- package/build/components/examples/opsnow-common-data-status-examples-data.js +0 -65
- package/build/components/examples/opsnow-common-file-upload-examples-data.js +0 -95
- package/build/components/examples/opsnow-common-forms-examples-data.js +0 -1699
- package/build/components/examples/opsnow-common-grid-examples-data.js +0 -2328
- package/build/components/examples/opsnow-common-icons-examples-data.js +0 -72
- package/build/components/examples/opsnow-common-layout-examples-data.js +0 -72
- package/build/components/examples/opsnow-common-notification-examples-data.js +0 -78
- package/build/components/examples/opsnow-common-pagination-examples-data.js +0 -82
- package/build/components/examples/opsnow-common-popup-examples-data.js +0 -205
- package/build/components/examples/opsnow-common-progress-examples-data.js +0 -86
- package/build/components/examples/opsnow-common-select-examples-data.js +0 -106
- package/build/components/examples/opsnow-common-stepper-examples-data.js +0 -180
- package/build/components/examples/opsnow-common-storage-examples-data.js +0 -8
- package/build/components/examples/opsnow-common-tab-examples-data.js +0 -87
- package/build/components/examples/opsnow-common-toast-popup-examples-data.js +0 -129
- package/build/components/examples/opsnow-common-tooltip-examples-data.js +0 -80
- package/build/components/examples/opsnow-common-typography-examples-data.js +0 -366
- package/build/components/opsnow-common-calendar.js +0 -228
- package/build/components/opsnow-common-chart.js +0 -1643
- package/build/components/opsnow-common-data-status.js +0 -116
- package/build/components/opsnow-common-examples.js +0 -109
- package/build/components/opsnow-common-file-upload.js +0 -57
- package/build/components/opsnow-common-forms.js +0 -1006
- package/build/components/opsnow-common-grid.js +0 -352
- package/build/components/opsnow-common-icons.js +0 -139
- package/build/components/opsnow-common-layout.js +0 -138
- package/build/components/opsnow-common-notification.js +0 -110
- package/build/components/opsnow-common-pagination.js +0 -164
- package/build/components/opsnow-common-popup.js +0 -71
- package/build/components/opsnow-common-progress.js +0 -177
- package/build/components/opsnow-common-select.js +0 -132
- package/build/components/opsnow-common-stepper.js +0 -72
- package/build/components/opsnow-common-tab.js +0 -111
- package/build/components/opsnow-common-toast-popup.js +0 -135
- package/build/components/opsnow-common-tooltip.js +0 -204
- package/build/components/opsnow-common-typography.js +0 -93
- package/build/index.js +0 -124
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
// Select 컴포넌트 예제 데이터
|
|
2
|
-
export const SelectExamples = [
|
|
3
|
-
{
|
|
4
|
-
title: '기본 셀렉트',
|
|
5
|
-
code: `<OpsnowCommonSelect items={[{ label: '옵션1', value: '1' }, { label: '옵션2', value: '2' }]} onChange={e => setValue(e.target.value)} />`,
|
|
6
|
-
description: '가장 기본적인 셀렉트 예제입니다.'
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
title: 'standard, size=small',
|
|
10
|
-
code: `<OpsnowCommonSelect items={[{ label: 'Option 1', value: '1' }, { label: 'Option 2', value: '2' }]} size="small" variant="standard" value={value} onChange={e => setValue(e.target.value)} />`,
|
|
11
|
-
description: 'standard variant, small 사이즈 셀렉트 예제입니다.'
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
title: 'noLine, size=small',
|
|
15
|
-
code: `<OpsnowCommonSelect items={[{ label: 'Option 1', value: '1' }, { label: 'Option 2', value: '2' }]} variant="noLine" size="small" value={value} onChange={e => setValue(e.target.value)} />`,
|
|
16
|
-
description: 'noLine variant, small 사이즈 단일 선택 셀렉트 예제입니다.'
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
title: 'noLine, size=small, multiple',
|
|
20
|
-
code: `<OpsnowCommonSelect items={[{ label: 'Option 1', value: '1' }, { label: 'Option 2', value: '2' }]} size="small" variant="noLine" multiple value={value} onChange={e => setValue(e.target.value)} />`,
|
|
21
|
-
description: 'noLine variant, small 사이즈, 다중 선택 셀렉트 예제입니다.'
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
title: 'filled, size=small, label JSX',
|
|
25
|
-
code: `<OpsnowCommonSelect items={[{ label: 'Option 1', value: '1' }, { label: <strong>Option 2</strong>, value: '2' }, { label: <StarIcon />, value: '3' }]} size="small" variant="filled" value={value} onChange={e => setValue(e.target.value)} />`,
|
|
26
|
-
description: 'filled variant, small 사이즈, label에 strong/아이콘 사용 예제입니다.'
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
title: 'outlined, size=small',
|
|
30
|
-
code: `<OpsnowCommonSelect items={[{ label: 'Option 1', value: '1' }, { label: 'Option 2', value: '2' }]} variant="outlined" size="small" value={value} onChange={e => setValue(e.target.value)} />`,
|
|
31
|
-
description: 'outlined variant, small 사이즈 단일 선택 셀렉트 예제입니다.'
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
title: 'outlined, size=small, multiple',
|
|
35
|
-
code: `<OpsnowCommonSelect items={[{ label: 'Option 1', value: '1' }, { label: 'Option 2', value: '2' }]} size="small" variant="outlined" multiple value={value} onChange={e => setValue(e.target.value)} />`,
|
|
36
|
-
description: 'outlined variant, small 사이즈, 다중 선택 셀렉트 예제입니다.'
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
title: 'standard, size=medium',
|
|
40
|
-
code: `<OpsnowCommonSelect items={[{ label: 'Option 1', value: '1' }, { label: 'Option 2', value: '2' }]} variant="standard" size="medium" value={value} onChange={e => setValue(e.target.value)} />`,
|
|
41
|
-
description: 'standard variant, medium 사이즈 단일 선택 셀렉트 예제입니다.'
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
title: 'outlined, size=medium, error',
|
|
45
|
-
code: `<OpsnowCommonSelect items={[{ label: 'Option 1', value: '1' }, { label: 'Option 2', value: '2' }]} size="medium" variant="outlined" error value={value} onChange={e => setValue(e.target.value)} />`,
|
|
46
|
-
description: 'outlined variant, medium 사이즈, 에러 상태 셀렉트 예제입니다.'
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
title: 'filled, size=medium, disabled',
|
|
50
|
-
code: `<OpsnowCommonSelect items={[{ label: 'Option 1', value: '1' }, { label: 'Option 2', value: '2' }]} size="medium" variant="filled" disabled value={value} onChange={e => setValue(e.target.value)} />`,
|
|
51
|
-
description: 'filled variant, medium 사이즈, 비활성화 셀렉트 예제입니다.'
|
|
52
|
-
}
|
|
53
|
-
];
|
|
54
|
-
// Autocomplete(오토컴플리트) 컴포넌트 예제 데이터
|
|
55
|
-
export const AutocompleteExamples = [
|
|
56
|
-
{
|
|
57
|
-
title: 'Autocomplete - 단일 선택',
|
|
58
|
-
code: `<OpsnowCommonAutocomplete items={[{ value: '1', label: 'Option 1' }, { value: '2', label: 'Option 2' }, { value: '3', label: 'Option 3' }]} value={value} onChange={setValue} label="Select Option" />`,
|
|
59
|
-
description: '기본 오토컴플리트 단일 선택 예제입니다.'
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
title: 'Autocomplete - 단일 선택 (disableCloseOnSelect)',
|
|
63
|
-
code: `<OpsnowCommonAutocomplete items={[{ value: '1', label: 'Option 1' }, { value: '2', label: 'Option 2' }]} value={value} onChange={setValue} label="Select Option" disableCloseOnSelect />`,
|
|
64
|
-
description: '항목 선택 후에도 드롭다운이 닫히지 않는 단일 선택 예제입니다.'
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
title: 'Autocomplete - 다중 선택',
|
|
68
|
-
code: `<OpsnowCommonAutocomplete items={[{ value: '1', label: 'Option 1' }, { value: '2', label: 'Option 2' }, { value: '3', label: 'Option 3' }]} multiple value={value} onChange={setValue} label="Select multiple options" />`,
|
|
69
|
-
description: '오토컴플리트 다중 선택 예제입니다.'
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
title: 'Autocomplete - 그룹 옵션',
|
|
73
|
-
code: `<OpsnowCommonAutocomplete items={[{ value: '1', label: 'Option 1', group: 'Level 1' }, { value: '2', label: 'Option 2', group: 'Level 1' }, { value: '3', label: 'Option 3', group: 'Level 2' }]} value={value} onChange={setValue} label="Select Grouped Option" />`,
|
|
74
|
-
description: '옵션 그룹이 있는 오토컴플리트 예제입니다.'
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
title: 'Autocomplete - 그룹 옵션 (다중 선택)',
|
|
78
|
-
code: `<OpsnowCommonAutocomplete items={[{ value: '1', label: 'Option 1', group: 'Level 1' }, { value: '2', label: 'Option 2', group: 'Level 1' }, { value: '3', label: 'Option 3', group: 'Level 2' }]} multiple value={value} onChange={setValue} label="Select Grouped Option" />`,
|
|
79
|
-
description: '그룹 옵션을 다중 선택할 수 있는 예제입니다.'
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
title: 'Autocomplete - 체크박스/전체선택',
|
|
83
|
-
code: `<OpsnowCommonAutocomplete items={[{ value: '1', label: 'Option 1', group: 'A' }, { value: '2', label: 'Option 2', group: 'A' }, { value: '3', label: 'Option 3', group: 'B' }]} multiple value={value} onChange={setValue} label="Select with checkbox" useCheckboxOption useSelectAll />`,
|
|
84
|
-
description: '체크박스와 전체선택이 있는 오토컴플리트 예제입니다.'
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
title: 'Autocomplete - 아이콘 옵션',
|
|
88
|
-
code: `<OpsnowCommonAutocomplete items={[{ value: 'aws', label: 'AWS', iconName: 'LogoAws' }, { value: 'azure', label: 'Azure', iconName: 'LogoAzure' }, { value: 'gcp', label: 'GCP', iconName: 'LogoGcp' }]} multiple value={value} onChange={setValue} useCheckboxOption useSelectAll />`,
|
|
89
|
-
description: '옵션에 아이콘이 포함된 오토컴플리트 예제입니다.'
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
title: 'Autocomplete - 일부 옵션 disabled',
|
|
93
|
-
code: `<OpsnowCommonAutocomplete items={[{ value: '1', label: 'Option 1' }, { value: '2', label: 'Option 2', disabled: true }, { value: '3', label: 'Option 3' }, { value: '4', label: 'Option 4', disabled: true }]} multiple value={value} onChange={setValue} useCheckboxOption useSelectAll />`,
|
|
94
|
-
description: '일부 옵션이 비활성화된 오토컴플리트 예제입니다.'
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
title: 'Autocomplete - 전체 disabled',
|
|
98
|
-
code: `<OpsnowCommonAutocomplete items={[{ value: '1', label: 'Option 1' }, { value: '2', label: 'Option 2' }]} multiple value={value} onChange={setValue} disabled />`,
|
|
99
|
-
description: '컴포넌트 전체가 비활성화된 예제입니다.'
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
title: 'Autocomplete - 비동기 로딩',
|
|
103
|
-
code: `<OpsnowCommonAutocomplete items={asyncItems} loading={loading} value={value} onChange={setValue} label="Select Async Option" />`,
|
|
104
|
-
description: '비동기 데이터 로딩/로딩 상태 오토컴플리트 예제입니다.'
|
|
105
|
-
}
|
|
106
|
-
];
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
// Stepper 컴포넌트 예제 데이터
|
|
2
|
-
export const StepperExamples = [
|
|
3
|
-
{
|
|
4
|
-
title: 'Horizontal Stepper',
|
|
5
|
-
code: `<OpsnowCommonStepper
|
|
6
|
-
steps={[
|
|
7
|
-
{ label: 'Step 1', status: 'notStarted', optionalText: 'optional' },
|
|
8
|
-
{ label: 'Step 2', status: 'notStarted' },
|
|
9
|
-
{ label: 'Step 3', status: 'notStarted' },
|
|
10
|
-
]}
|
|
11
|
-
activeStep={activeStep}
|
|
12
|
-
contentPadding="1rem 0"
|
|
13
|
-
contentHeight="500px"
|
|
14
|
-
>
|
|
15
|
-
<OpsnowCommonStepContent stepIndex={0}>
|
|
16
|
-
<TextField
|
|
17
|
-
label="Input 1"
|
|
18
|
-
variant="outlined"
|
|
19
|
-
fullWidth
|
|
20
|
-
value={input1}
|
|
21
|
-
onChange={(e) => setInput1(e.target.value)}
|
|
22
|
-
/>
|
|
23
|
-
<Box sx={{ height: '40rem', marginTop: '1rem', padding: '1rem', background: '#eee' }}>
|
|
24
|
-
content
|
|
25
|
-
</Box>
|
|
26
|
-
</OpsnowCommonStepContent>
|
|
27
|
-
<OpsnowCommonStepContent stepIndex={1}>
|
|
28
|
-
<TextField
|
|
29
|
-
label="Input 2"
|
|
30
|
-
variant="outlined"
|
|
31
|
-
fullWidth
|
|
32
|
-
value={input2}
|
|
33
|
-
onChange={(e) => setInput2(e.target.value)}
|
|
34
|
-
/>
|
|
35
|
-
</OpsnowCommonStepContent>
|
|
36
|
-
<OpsnowCommonStepContent stepIndex={2}>
|
|
37
|
-
<Typography>This is the content for Step 3</Typography>
|
|
38
|
-
</OpsnowCommonStepContent>
|
|
39
|
-
</OpsnowCommonStepper>`,
|
|
40
|
-
description: 'Horizontal stepper with content area and navigation buttons.'
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
title: 'Simple Stepper',
|
|
44
|
-
code: `<OpsnowCommonStepper
|
|
45
|
-
steps={steps}
|
|
46
|
-
activeStep={activeStepSimple}
|
|
47
|
-
isSimpleView
|
|
48
|
-
contentPadding="1rem 0"
|
|
49
|
-
contentHeight="500px"
|
|
50
|
-
>
|
|
51
|
-
<OpsnowCommonStepContent stepIndex={0}>
|
|
52
|
-
<Typography>Simple Step 1</Typography>
|
|
53
|
-
<Box sx={{ height: '40rem', background: '#ccc' }}>content</Box>
|
|
54
|
-
</OpsnowCommonStepContent>
|
|
55
|
-
<OpsnowCommonStepContent stepIndex={1}>
|
|
56
|
-
<Typography>Simple Step 2</Typography>
|
|
57
|
-
</OpsnowCommonStepContent>
|
|
58
|
-
<OpsnowCommonStepContent stepIndex={2}>
|
|
59
|
-
<Typography>Simple Step 3</Typography>
|
|
60
|
-
</OpsnowCommonStepContent>
|
|
61
|
-
</OpsnowCommonStepper>`,
|
|
62
|
-
description: 'Simplified stepper view without connectors.'
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
title: 'Right-aligned Stepper with Custom Connector',
|
|
66
|
-
code: `<OpsnowCommonStepper
|
|
67
|
-
steps={steps}
|
|
68
|
-
activeStep={activeStepRight}
|
|
69
|
-
align="right"
|
|
70
|
-
connector={<CustomConnector />}
|
|
71
|
-
>
|
|
72
|
-
<OpsnowCommonStepContent stepIndex={0}>
|
|
73
|
-
<TextField label="Input 1" variant="outlined" fullWidth value={input1} onChange={(e) => setInput1(e.target.value)} />
|
|
74
|
-
</OpsnowCommonStepContent>
|
|
75
|
-
<OpsnowCommonStepContent stepIndex={1}>
|
|
76
|
-
<TextField label="Input 2" variant="outlined" fullWidth value={input2} onChange={(e) => setInput2(e.target.value)} />
|
|
77
|
-
</OpsnowCommonStepContent>
|
|
78
|
-
<OpsnowCommonStepContent stepIndex={2}>
|
|
79
|
-
<Typography>This is the content for Step 3</Typography>
|
|
80
|
-
</OpsnowCommonStepContent>
|
|
81
|
-
</OpsnowCommonStepper>`,
|
|
82
|
-
description: 'Stepper aligned to the right with a custom connector style.'
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
title: 'Vertical Non-linear Stepper',
|
|
86
|
-
code: `<OpsnowCommonStepper
|
|
87
|
-
steps={steps}
|
|
88
|
-
activeStep={activeStepVertical}
|
|
89
|
-
orientation="vertical"
|
|
90
|
-
nonLinear
|
|
91
|
-
onStepClick={(index) => setActiveStepVertical(index)}
|
|
92
|
-
contentDependency={false}
|
|
93
|
-
>
|
|
94
|
-
<OpsnowCommonStepContent stepIndex={0}>
|
|
95
|
-
<TextField
|
|
96
|
-
label="Vertical Input 1"
|
|
97
|
-
variant="outlined"
|
|
98
|
-
fullWidth
|
|
99
|
-
value={input1}
|
|
100
|
-
onChange={(e) => setInput1(e.target.value)}
|
|
101
|
-
/>
|
|
102
|
-
<OpsnowCommonStepButton
|
|
103
|
-
prev={() => setActiveStepVertical(activeStepVertical - 1)}
|
|
104
|
-
next={() => setActiveStepVertical(activeStepVertical + 1)}
|
|
105
|
-
leftDisabled={activeStepVertical === 0}
|
|
106
|
-
rightDisabled={activeStepVertical === steps.length - 1}
|
|
107
|
-
/>
|
|
108
|
-
</OpsnowCommonStepContent>
|
|
109
|
-
<OpsnowCommonStepContent stepIndex={1}>
|
|
110
|
-
<TextField
|
|
111
|
-
label="Vertical Input 2"
|
|
112
|
-
variant="outlined"
|
|
113
|
-
fullWidth
|
|
114
|
-
value={input2}
|
|
115
|
-
onChange={(e) => setInput2(e.target.value)}
|
|
116
|
-
/>
|
|
117
|
-
<OpsnowCommonStepButton
|
|
118
|
-
prev={() => setActiveStepVertical(activeStepVertical - 1)}
|
|
119
|
-
next={() => setActiveStepVertical(activeStepVertical + 1)}
|
|
120
|
-
leftDisabled={activeStepVertical === 0}
|
|
121
|
-
rightDisabled={activeStepVertical === steps.length - 1}
|
|
122
|
-
/>
|
|
123
|
-
</OpsnowCommonStepContent>
|
|
124
|
-
<OpsnowCommonStepContent stepIndex={2}>
|
|
125
|
-
<Typography>This is the content for Step 3</Typography>
|
|
126
|
-
<OpsnowCommonStepButton
|
|
127
|
-
prev={() => setActiveStepVertical(activeStepVertical - 1)}
|
|
128
|
-
next={() => setActiveStepVertical(activeStepVertical + 1)}
|
|
129
|
-
leftDisabled={activeStepVertical === 0}
|
|
130
|
-
rightDisabled={activeStepVertical === steps.length - 1}
|
|
131
|
-
/>
|
|
132
|
-
</OpsnowCommonStepContent>
|
|
133
|
-
</OpsnowCommonStepper>`,
|
|
134
|
-
description: 'Vertical stepper that allows non-linear navigation by clicking steps.'
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
title: 'Vertical Stepper with Completed Content',
|
|
138
|
-
code: `<OpsnowCommonStepper
|
|
139
|
-
steps={steps}
|
|
140
|
-
activeStep={activeStepCompleted}
|
|
141
|
-
orientation="vertical"
|
|
142
|
-
>
|
|
143
|
-
<OpsnowCommonStepContent stepIndex={0}>
|
|
144
|
-
<Typography>Step 1: This input field is the first step.</Typography>
|
|
145
|
-
<TextField label="Vertical Input 1" variant="outlined" fullWidth value={input1} onChange={(e) => setInput1(e.target.value)} />
|
|
146
|
-
</OpsnowCommonStepContent>
|
|
147
|
-
<OpsnowCommonStepContent slot="completed" stepIndex={0}>
|
|
148
|
-
<Typography>Step 1 Completed!</Typography>
|
|
149
|
-
</OpsnowCommonStepContent>
|
|
150
|
-
|
|
151
|
-
<OpsnowCommonStepContent stepIndex={1}>
|
|
152
|
-
<Typography>Step 2: This input field is the second step.</Typography>
|
|
153
|
-
<TextField label="Vertical Input 2" variant="outlined" fullWidth value={input2} onChange={(e) => setInput2(e.target.value)} />
|
|
154
|
-
</OpsnowCommonStepContent>
|
|
155
|
-
<OpsnowCommonStepContent slot="completed" stepIndex={1}>
|
|
156
|
-
<Typography>Step 2 Completed!</Typography>
|
|
157
|
-
</OpsnowCommonStepContent>
|
|
158
|
-
|
|
159
|
-
<OpsnowCommonStepContent stepIndex={2}>
|
|
160
|
-
<Typography>Step 3: This is the final step.</Typography>
|
|
161
|
-
</OpsnowCommonStepContent>
|
|
162
|
-
<OpsnowCommonStepContent slot="completed" stepIndex={2}>
|
|
163
|
-
<Typography>Step 3 Completed!</Typography>
|
|
164
|
-
</OpsnowCommonStepContent>
|
|
165
|
-
</OpsnowCommonStepper>`,
|
|
166
|
-
description: 'Vertical stepper showing custom content when each step is completed.'
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
title: 'Change Step Status',
|
|
170
|
-
code: `{steps.map((step, index) => (
|
|
171
|
-
<Box key={index} sx={{ marginBottom: '1rem' }}>
|
|
172
|
-
<Typography>Step {index + 1} - Current Status: {step.status}</Typography>
|
|
173
|
-
<OpsnowCommonButton label="Error" onClick={() => changeStepStatus(index, 'error')} sx={{ marginRight: '8px' }} />
|
|
174
|
-
<OpsnowCommonButton label="Completed" onClick={() => changeStepStatus(index, 'completed')} sx={{ marginRight: '8px' }} />
|
|
175
|
-
<OpsnowCommonButton label="Not Started" onClick={() => changeStepStatus(index, 'notStarted')} />
|
|
176
|
-
</Box>
|
|
177
|
-
))}`,
|
|
178
|
-
description: 'Example showing how to programmatically change the status of each step.'
|
|
179
|
-
}
|
|
180
|
-
];
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
// Tab 컴포넌트 예제 데이터
|
|
2
|
-
export const TabExamples = [
|
|
3
|
-
{
|
|
4
|
-
title: "label",
|
|
5
|
-
code: `<OpsnowCommonTab items={[{ label: '탭1' }, { label: '탭2' }]} />`,
|
|
6
|
-
description: "탭이 2개인 기본 탭 예제입니다.",
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
title: "orientation-label",
|
|
10
|
-
code: `<OpsnowCommonTab orientation="vertical" items={[{ label: '탭1' }, { label: '탭2' }]} />`,
|
|
11
|
-
description: "탭이 2개이고 탭 방향이 세로로 변경되는 예제입니다.",
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
title: "orientation-label-handleTabChange-value",
|
|
15
|
-
code: `
|
|
16
|
-
const handleTabChange = (_event, newValue) => {
|
|
17
|
-
setTabIndex(newValue)
|
|
18
|
-
}
|
|
19
|
-
<OpsnowCommonTab orientation="horizontal" items={[{ label: '탭1' }, { label: '탭2' }]} onChange = {handleTabChange} value={tabIndex}/>`,
|
|
20
|
-
description: "tab index에 따라 탭 값이 변경되며 탭이 2개인 예제입니다.",
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
title: "label-disabled",
|
|
24
|
-
code: `<OpsnowCommonTab items={[{ label: '탭1' }, { label: '탭2', , disabled: true}]} />`,
|
|
25
|
-
description: "탭이 2개이고 두번째 탭이 비활성화된 예제입니다.",
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
title: "label-depth",
|
|
29
|
-
code: `<OpsnowCommonTab items={[{ label: '탭1' }, { label: '탭2'}]} depth={2} />`,
|
|
30
|
-
description: "탭이 2개이고 탭 깊이가 2인 예제입니다.",
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
title: "label-contentGap",
|
|
34
|
-
code: `<OpsnowCommonTab items={[{ label: '탭1' }, { label: '탭2'}]} contentGap="small" />`,
|
|
35
|
-
description: "탭이 2개이고 탭 간격이 small인 예제입니다.",
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
title: "label-fullWidth",
|
|
39
|
-
code: `<OpsnowCommonTab items={[{ label: '탭1' }, { label: '탭2'}]} fullWidth={true} />`,
|
|
40
|
-
description: "탭이 2개이고 탭 전체 너비 사용 여부가 true인 예제입니다.",
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
title: "label-color",
|
|
44
|
-
code: `<OpsnowCommonTab items={[{ label: '탭1' }, { label: '탭2'}]} color="primary" />`,
|
|
45
|
-
description: "탭이 2개이고 탭 색상이 primary인 예제입니다.",
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
title: "label-iconName",
|
|
49
|
-
code: `<OpsnowCommonTab items={[{ label: '탭1', iconName: 'LogoAws' }, { label: '탭2', iconName: 'LogoAzure'}]} />`,
|
|
50
|
-
description: "탭이 2개이고 각 탭에 아이콘이 포함된 예제입니다.",
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
title: "label-content",
|
|
54
|
-
code: `<OpsnowCommonTab items={[{ label: '탭1', content: <div>탭1 내용</div> }, { label: '탭2', content: <div>탭2 내용</div>}]} />`,
|
|
55
|
-
description: "탭이 2개이고 각 탭에 내용이 포함된 예제입니다.",
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
title: "label-content-disabled",
|
|
59
|
-
code: `<OpsnowCommonTab items={[{ label: '탭1', content: <div>탭1 내용</div> }, { label: '탭2', content: <div>탭2 내용</div>, disabled: true}]} />`,
|
|
60
|
-
description: "탭이 2개이고 두번째 탭이 비활성화된 예제입니다.",
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
title: "label-iconName-content",
|
|
64
|
-
code: `<OpsnowCommonTab items={[{ label: '탭1', iconName: 'LogoAws', content: <div>탭1 내용</div> }, { label: '탭2', iconName: 'LogoAzure', content: <div>탭2 내용</div>}]} />`,
|
|
65
|
-
description: "탭이 2개이고 각 탭에 아이콘과 내용이 포함된 예제입니다.",
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
title: "label-iconName-content-disabled",
|
|
69
|
-
code: `<OpsnowCommonTab items={[{ label: '탭1', iconName: 'LogoAws', content: <div>탭1 내용</div> }, { label: '탭2', iconName: 'LogoAzure', content: <div>탭2 내용</div>, disabled: true}]} />`,
|
|
70
|
-
description: "탭이 2개이고 각 탭에 아이콘과 내용이 포함된 예제입니다.",
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
title: "value-label-iconName-content",
|
|
74
|
-
code: `<OpsnowCommonTab value = {0} items={[{ label: '탭1', iconName: 'LogoAws', content: <div>탭1 내용</div> }, { label: '탭2', iconName: 'LogoAzure', content: <div>탭2 내용</div>}]} />`,
|
|
75
|
-
description: "탭 선택이 첫 번째로 고정되어 있는 상태로 탭이 2개이고 각 탭에 아이콘과 내용이 포함된 예제입니다.",
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
title: "value-label-iconName-content",
|
|
79
|
-
code: `<OpsnowCommonTab value = {tabIndex} items={[{ label: '탭1', iconName: 'LogoAws', content: <div>탭1 내용</div> }, { label: '탭2', iconName: 'LogoAzure', content: <div>탭2 내용</div>}]} />`,
|
|
80
|
-
description: "탭 선택이 tabIndex라는 state 변수에 따라 변경되는 상태로 탭이 2개이고 각 탭에 아이콘과 내용이 포함된 예제입니다.",
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
title: "2-depth-button-tab-ui",
|
|
84
|
-
code: `<OpsnowCommonTab value={activeTab} onChange={handleTabChange} items={[{ label: 'Overview', content: (<div style={{ marginTop: '20px' }}><p>Overview content</p></div>) }, { label: 'Explorer', content: (<div style={{ marginTop: '20px' }}>{buttons.map((button) => (<OpsnowCommonButton key={button.value} label={button.label} onClick={() => handleButtonClick(button.value)} variant={selectedButton === button.value ? 'contained' : 'outlined'} style={{ marginRight: '10px', marginBottom: '10px' }} />))}{selectedButton && (<div style={{ marginTop: '20px' }}><p>Selected: {selectedButton}</p></div>)}</div>) }]} />`,
|
|
85
|
-
description: "2개의 탭(Overview, Explorer)이 있고, Explorer 탭에 동적 버튼 그룹이 포함된 2-Depth Button Tab UI 예제입니다.",
|
|
86
|
-
},
|
|
87
|
-
];
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
// Toast Popup 컴포넌트 예제 데이터
|
|
2
|
-
export const ToastPopupExamples = [
|
|
3
|
-
{
|
|
4
|
-
title: "message-info-duration-bottom-left",
|
|
5
|
-
code: `
|
|
6
|
-
const handleClick = () => {
|
|
7
|
-
showToast("토스트 메시지입니다!",{
|
|
8
|
-
color: 'info',
|
|
9
|
-
autoHideDuration: 1000,
|
|
10
|
-
anchorOrigin: { vertical: 'bottom', horizontal: 'left'},
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
<OpsnowCommonButton onClick={handleClick} />`,
|
|
14
|
-
description: "1초 후 토스트 메시지가 사라지며 토스트 위치는 하단 왼쪽인 토스트 팝업 예제입니다.",
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
title: "message-error-duration-bottom-right",
|
|
18
|
-
code: `
|
|
19
|
-
const handleClick = () => {
|
|
20
|
-
showToast("토스트 메시지입니다!",{
|
|
21
|
-
color: "error",
|
|
22
|
-
autoHideDuration: 3000,
|
|
23
|
-
anchorOrigin: { vertical: 'bottom', horizontal: 'right'},
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
<OpsnowCommonButton onClick={handleClick} />`,
|
|
27
|
-
description: "3초 후 토스트 메시지가 사라지며 토스트 위치는 하단 오른쪽인 토스트 팝업 예제입니다.",
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
title: "message-warning-duration-top-center",
|
|
31
|
-
code: `
|
|
32
|
-
const handleClick = () => {
|
|
33
|
-
showToast("토스트 메시지입니다!",{
|
|
34
|
-
color: "warning",
|
|
35
|
-
autoHideDuration: 3000,
|
|
36
|
-
anchorOrigin: { vertical: 'top', horizontal: 'center'},
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
<OpsnowCommonButton onClick={handleClick} />`,
|
|
40
|
-
description: "3초 후 토스트 메시지가 사라지며 토스트 위치는 상단 중앙인 토스트 팝업 예제입니다.",
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
title: "message-default-duration-bottom-center",
|
|
44
|
-
code: `
|
|
45
|
-
const handleClick = () => {
|
|
46
|
-
showToast("토스트 메시지입니다!",{
|
|
47
|
-
color: "default",
|
|
48
|
-
autoHideDuration: 3000,
|
|
49
|
-
anchorOrigin: { vertical: 'bottom', horizontal: 'center'},
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
<OpsnowCommonButton onClick={handleClick} />`,
|
|
53
|
-
description: "3초 후 토스트 메시지가 사라지며 토스트 위치는 하단 중앙인 토스트 팝업 예제입니다.",
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
title: "message-custom-action-duration-bottom-center",
|
|
57
|
-
code: `
|
|
58
|
-
const handleClick = () => {
|
|
59
|
-
showToast("토스트 메시지입니다!",{
|
|
60
|
-
color: "default",
|
|
61
|
-
autoHideDuration: 3000,
|
|
62
|
-
anchorOrigin: { vertical: 'bottom', horizontal: 'center'},
|
|
63
|
-
customActionBtn: {<OpsnowCommonButton
|
|
64
|
-
iconPosition="right"
|
|
65
|
-
iconName="ArrowRight"
|
|
66
|
-
label="Confirm"
|
|
67
|
-
variant="text"
|
|
68
|
-
color="inherit"
|
|
69
|
-
size="small"
|
|
70
|
-
theme="white"
|
|
71
|
-
onClick={handleCustomAction}
|
|
72
|
-
/>
|
|
73
|
-
},
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
const handleCustomAction = () => {
|
|
77
|
-
alert('Notification confirm button clicked!');
|
|
78
|
-
}
|
|
79
|
-
<OpsnowCommonButton onClick={handleClick} />`,
|
|
80
|
-
description: "3초 후 토스트 메시지가 사라지며 토스트 위치는 하단 중앙이며 토스트 내부 버튼을 커스텀하는 토스트 팝업 예제입니다.",
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
title: "message-custom-action-duration-bottom-center",
|
|
84
|
-
code: `
|
|
85
|
-
const handleClick = () => {
|
|
86
|
-
showToast("토스트 메시지입니다!",{
|
|
87
|
-
color: "warning",
|
|
88
|
-
useTitle: true,
|
|
89
|
-
title: 'Warning',
|
|
90
|
-
autoHideDuration: 3000,
|
|
91
|
-
anchorOrigin: { vertical: 'top', horizontal: 'center'},
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
<OpsnowCommonButton onClick={handleClick} />`,
|
|
95
|
-
description: "3초 후 토스트 메시지가 사라지며 토스트 위치는 상단 중앙이며 토스트 타이틀을 사용하는 토스트 팝업 예제입니다.",
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
title: "message-custom-action-duration-bottom-center-TransitionComponent",
|
|
99
|
-
code: `
|
|
100
|
-
const handleClick = () => {
|
|
101
|
-
showToast("토스트 메시지입니다!",{
|
|
102
|
-
color: "default",
|
|
103
|
-
autoHideDuration: 3000,
|
|
104
|
-
anchorOrigin: { vertical: 'bottom', horizontal: 'center'},
|
|
105
|
-
TransitionComponent: Zoom,
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
<OpsnowCommonButton onClick={handleClick} />`,
|
|
109
|
-
description: "3초 후 토스트 메시지가 사라지며 토스트 위치는 하단 중앙이며 mui 트랜지션 컴포넌트를 사용하는 토스트 팝업 예제입니다.",
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
title: "message-custom-action-duration-top-center-style",
|
|
113
|
-
code: `
|
|
114
|
-
const handleClick = () => {
|
|
115
|
-
showToast("토스트 메시지입니다!",{
|
|
116
|
-
color: "default",
|
|
117
|
-
autoHideDuration: 3000,
|
|
118
|
-
anchorOrigin: { vertical: 'top', horizontal: 'center'},
|
|
119
|
-
style: {
|
|
120
|
-
boxShadow: '0 0 10px 0 rgba(0, 0, 0, 0.1)',
|
|
121
|
-
borderLeft: '4px solid #000',
|
|
122
|
-
backgroundColor: '#f0f0f0',
|
|
123
|
-
},
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
<OpsnowCommonButton onClick={handleClick} />`,
|
|
127
|
-
description: "3초 후 토스트 메시지가 사라지며 토스트 위치는 상단 중앙이며 토스트 스타일을 커스텀하는 토스트 팝업 예제입니다.",
|
|
128
|
-
},
|
|
129
|
-
];
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
// Tooltip 컴포넌트 예제 데이터
|
|
2
|
-
export const TooltipExamples = [
|
|
3
|
-
{
|
|
4
|
-
title: "titleProps.title",
|
|
5
|
-
code: `<OpsnowCommonTooltip title="툴팁 내용"><Button>Hover me</Button></OpsnowCommonTooltip>`,
|
|
6
|
-
description: "툴팁 내용이라고 나오는 가장 기본적인 툴팁 예제입니다.",
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
title: "titleProps.imgSrc",
|
|
10
|
-
code: `</OpsnowCommonTooltip>
|
|
11
|
-
<OpsnowCommonTooltip title={<img src="https://picsum.photos/200/300"/>}><Button>Hover me</Button></OpsnowCommonTooltip>`,
|
|
12
|
-
description: "이미지를 툴팁내용으로 사용하는 기본 툴팁 예제입니다.",
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
title: "isIconTooltip-titleProps.title-iconTooltipProps.iconName-iconTooltipProps.useIcon",
|
|
16
|
-
code: `<OpsnowCommonIconTooltip iconName={'ArrowBothVerticalCircleOutline'} useIcon={true} title = '툴팁 내용'></OpsnowCommonIconTooltip>`,
|
|
17
|
-
description: "아이콘 호버 시 툴팁 표시되는 아이콘 툴팁 기본 예제입니다.",
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
title: "isIconTooltip-titleProps.title-iconTooltipProps.iconName-iconTooltipProps.useIcon",
|
|
21
|
-
code: `<OpsnowCommonIconTooltip iconName={'Battery'} useIcon={true} title = {<img src="https://picsum.photos/200/300"/>}></OpsnowCommonIconTooltip>`,
|
|
22
|
-
description: "이미지를 툴팁내용으로 사용하는 아이콘 툴팁 예제입니다.",
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
title: "isIconTooltip-titleProps.title-iconTooltipProps.placement-iconTooltipProps.iconName-iconTooltipProps.useIcon",
|
|
26
|
-
code: `<OpsnowCommonIconTooltip iconName={'InfoCircleOutline'} useIcon={true} title="툴팁 내용" placement="bottom"></OpsnowCommonIconTooltip>`,
|
|
27
|
-
description: "툴팁이 아래쪽으로 표시되는 아이콘 툴팁 예제입니다.",
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
title: "isIconTooltip-titleProps.title-iconTooltipProps.placement-iconTooltipProps.iconName-iconTooltipProps.useIcon",
|
|
31
|
-
code: `<OpsnowCommonIconTooltip iconName={'ChevronDoubleRight'} useIcon={true} title="툴팁 내용" placement="bottom"></OpsnowCommonIconTooltip>`,
|
|
32
|
-
description: "툴팁이 아래쪽으로 표시되는 아이콘 툴팁 예제입니다.",
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
title: "titleProps.title-onOpen-disableHoverListener",
|
|
36
|
-
code: `
|
|
37
|
-
<OpsnowCommonTooltip title="툴팁 내용" onOpen={open} disableHoverListener><Button>Hover me</Button></OpsnowCommonTooltip>`,
|
|
38
|
-
description: "툴팁 열림 시 함수 실행 및 호버 리스너 비활성화 예제입니다.",
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
title: "titleProps.title-bottom",
|
|
42
|
-
code: `<OpsnowCommonTooltip title="툴팁 내용" placement="bottom"><Button>Hover me</Button></OpsnowCommonTooltip>`,
|
|
43
|
-
description: "아래쪽에 표시되는 툴팁 예제입니다.",
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
title: "titleProps.title-bottom-tooltipFullWidth",
|
|
47
|
-
code: `<OpsnowCommonTooltip title="툴팁 내용" placement="bottom" tooltipFullWidth><Button>Hover me</Button></OpsnowCommonTooltip>`,
|
|
48
|
-
description: "툴팁 전체 너비로 아래쪽에 표시되는 툴팁 예제입니다.",
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
title: "titleProps.title-bottom-enterDelay",
|
|
52
|
-
code: `<OpsnowCommonTooltip title="툴팁 내용" placement="bottom" enterDelay={1000}><Button>Hover me</Button></OpsnowCommonTooltip>`,
|
|
53
|
-
description: "툴팁 열림 지연 시간 예제입니다.",
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
title: "titleProps.title-bottom-enterTouchDelay",
|
|
57
|
-
code: `<OpsnowCommonTooltip title="툴팁 내용" placement="bottom" enterTouchDelay={1000}><Button>Hover me</Button></OpsnowCommonTooltip>`,
|
|
58
|
-
description: "툴팁 열림 터치 지연 시간 예제입니다.",
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
title: "titleProps.title-bottom-enterNextDelay",
|
|
62
|
-
code: `<OpsnowCommonTooltip title="툴팁 내용" placement="bottom" enterNextDelay={1000}><Button>Hover me</Button></OpsnowCommonTooltip>`,
|
|
63
|
-
description: "툴팁 열림 다음 지연 시간 예제입니다.",
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
title: "titleProps.title-bottom-leaveDelay",
|
|
67
|
-
code: `<OpsnowCommonTooltip title="툴팁 내용" placement="bottom" leaveDelay={1000}><Button>Hover me</Button></OpsnowCommonTooltip>`,
|
|
68
|
-
description: "툴팁 닫힘 지연 시간 예제입니다.",
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
title: "titleProps.title-bottom-leaveNextDelay",
|
|
72
|
-
code: `<OpsnowCommonTooltip title="툴팁 내용" placement="bottom" leaveNextDelay={1000}><Button>Hover me</Button></OpsnowCommonTooltip>`,
|
|
73
|
-
description: "툴팁 닫힘 다음 지연 시간 예제입니다.",
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
title: "titleProps.title-bottom-green",
|
|
77
|
-
code: `<OpsnowCommonTooltip title="툴팁 내용" placement="bottom" color={'green'}><Button>Hover me</Button></OpsnowCommonTooltip>`,
|
|
78
|
-
description: "툴팁 색상 예제입니다.",
|
|
79
|
-
},
|
|
80
|
-
];
|