@sellmate/design-system-vue 1.0.69 โ†’ 1.0.70

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/README.md CHANGED
@@ -2,111 +2,264 @@
2
2
 
3
3
  Vue 3 component wrappers for Sellmate Design System built with Stencil web components.
4
4
 
5
- ## ๐Ÿ“ฆ Installation
5
+ ## Installation
6
6
 
7
7
  ```bash
8
8
  npm install @sellmate/design-system-vue
9
9
  ```
10
10
 
11
- or
11
+ ---
12
12
 
13
- ```bash
14
- yarn add @sellmate/design-system-vue
15
- ```
13
+ ## Project Setup
16
14
 
17
- ## ๐Ÿ›  Setup
15
+ ### Vue 3 (Vite)
18
16
 
19
- ### Vue 3
17
+ **1. CSS ์ „์—ญ import + ํ”Œ๋Ÿฌ๊ทธ์ธ ๋“ฑ๋ก** โ€” `src/main.ts`
20
18
 
21
19
  ```ts
22
- import '@sellmate/design-system/styles.css';
23
20
  import { createApp } from 'vue';
24
- import { StencilVuePlugin } from '@sellmate/design-system-vue';
21
+ import '@sellmate/design-system/styles.css';
22
+ import { StencilVuePlugin, SdModalVuePlugin } from '@sellmate/design-system-vue';
25
23
  import App from './App.vue';
26
24
 
27
- const app = createApp(App);
28
-
29
- app.use(StencilVuePlugin);
30
- app.mount('#app');
25
+ createApp(App)
26
+ .use(StencilVuePlugin) // ์ปค์Šคํ…€ ์—˜๋ฆฌ๋จผํŠธ ์ „์—ญ ๋“ฑ๋ก (ํ•„์ˆ˜)
27
+ .use(SdModalVuePlugin) // sdModal.create Vue ์ปดํฌ๋„ŒํŠธ ์ง€์› (ํ•„์ˆ˜)
28
+ .mount('#app');
31
29
  ```
32
30
 
33
- Import `@sellmate/design-system/styles.css` once at app entry so global token CSS variables are available for components like `sd-button`.
31
+ > **`StencilVuePlugin`์€ ํ•„์ˆ˜์ž…๋‹ˆ๋‹ค.** React์™€ ๋‹ฌ๋ฆฌ Vue ๋ž˜ํผ ์ปดํฌ๋„ŒํŠธ๋Š” import ์‹œ์ ์— ์ปค์Šคํ…€ ์—˜๋ฆฌ๋จผํŠธ๋ฅผ ์ž๋™ ๋“ฑ๋กํ•˜์ง€ ์•Š์œผ๋ฏ€๋กœ, ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ํ†ตํ•œ ๋ช…์‹œ์  ๋“ฑ๋ก์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
34
32
 
35
- ### Vite Configuration
33
+ **2. SdModalContainer ์ตœ์ƒ๋‹จ ๋ฐฐ์น˜** โ€” `src/App.vue`
36
34
 
37
- If you are using Vite, you need to configure `vite-plugin-static-copy` to serve the design system assets (icons, lazy-loaded components) correctly.
35
+ `sdModal`์€ `sd-modal-container`๋ฅผ ์ž๋™์œผ๋กœ ์ƒ์„ฑํ•˜์ง€๋งŒ, z-index ์ œ์–ด ๋ฐ ๋ Œ๋” ์œ„์น˜๋ฅผ ๋ช…์‹œ์ ์œผ๋กœ ์ง€์ •ํ•˜๋ ค๋ฉด ๋ฃจํŠธ์— ๋ฐฐ์น˜ํ•ฉ๋‹ˆ๋‹ค.
38
36
 
39
- 1. Install `vite-plugin-static-copy`:
37
+ ```vue
38
+ <template>
39
+ <SdModalContainer />
40
+ <RouterView />
41
+ </template>
40
42
 
41
- ```bash
42
- npm install -D vite-plugin-static-copy
43
+ <script setup lang="ts">
44
+ import { SdModalContainer } from '@sellmate/design-system-vue';
45
+ </script>
43
46
  ```
44
47
 
45
- or
48
+ ---
46
49
 
47
- ```bash
48
- yarn add -D vite-plugin-static-copy
50
+ ## Utility Functions
51
+
52
+ ### `sdModal` โ€” `@sellmate/design-system-vue`
53
+
54
+ Vue ์ปดํฌ๋„ŒํŠธ๋ฅผ ๋ชจ๋‹ฌ๋กœ ์—ด ์ˆ˜ ์žˆ๋Š” Vue-aware ๋ฒ„์ „์ž…๋‹ˆ๋‹ค.
55
+
56
+ ```ts
57
+ import { sdModal } from '@sellmate/design-system-vue';
58
+
59
+ // Confirm ๋ชจ๋‹ฌ
60
+ sdModal
61
+ .confirm({
62
+ type: 'positive' | 'negative' | 'default',
63
+ title: '์ œ๋ชฉ',
64
+ topMessage: ['๋ฉ”์‹œ์ง€'],
65
+ mainButtonLabel: 'ํ™•์ธ',
66
+ subButtonLabel: '์ทจ์†Œ',
67
+ persistent: false, // true ์‹œ ESC/๋ฐฑ๋“œ๋กญ์œผ๋กœ ๋‹ซ๊ธฐ ๋ถˆ๊ฐ€
68
+ })
69
+ .onOk(() => {})
70
+ .onCancel(() => {})
71
+ .onClose(() => {});
72
+
73
+ // Vue ์ปดํฌ๋„ŒํŠธ๋ฅผ ๋ชจ๋‹ฌ๋กœ ์—ด๊ธฐ
74
+ sdModal.create({
75
+ component: MyModalComponent,
76
+ componentProps: { title: '์ œ๋ชฉ' }, // ์ปดํฌ๋„ŒํŠธ์— ์ „๋‹ฌํ•  props
77
+ persistent: true,
78
+ });
79
+
80
+ // Loading ๋ชจ๋‹ฌ
81
+ const dialog = sdModal.loading({ state: 'loading' });
82
+ dialog.update({ state: 'error', message: '์˜ค๋ฅ˜ ๋ฐœ์ƒ' });
83
+ dialog.close();
84
+
85
+ // ์ „์—ญ ์„ค์ •
86
+ sdModal.configure({ zIndex: 1000 });
49
87
  ```
50
88
 
51
- 2. Update `vite.config.ts`:
89
+ > **React์™€์˜ ์ฐจ์ด**: `sdModal.create`์— Vue ์ปดํฌ๋„ŒํŠธ๋ฅผ ์ „๋‹ฌํ•˜๋ฉด ๋ฉ”์ธ ์•ฑ์˜ ์ปจํ…์ŠคํŠธ(`provide/inject`, ํ”Œ๋Ÿฌ๊ทธ์ธ, `compilerOptions` ๋“ฑ)๊ฐ€ **์ž๋™์œผ๋กœ ์ƒ์†๋ฉ๋‹ˆ๋‹ค**. `SdModalVuePlugin`์ด ์„ค์น˜๋˜์ง€ ์•Š์€ ๊ฒฝ์šฐ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
90
+
91
+ ---
92
+
93
+ ### `sdToast` โ€” `@sellmate/design-system`
52
94
 
53
95
  ```ts
54
- import { defineConfig } from 'vite';
55
- import { viteStaticCopy } from 'vite-plugin-static-copy';
56
- export default defineConfig({
57
- plugins: [
58
- viteStaticCopy({
59
- targets: [
60
- {
61
- src: 'node_modules/@sellmate/design-system/dist/esm/*',
62
- dest: 'assets',
63
- },
64
- ],
65
- }),
66
- ],
96
+ import { sdToast } from '@sellmate/design-system';
97
+
98
+ // ํ† ์ŠคํŠธ ์ƒ์„ฑ
99
+ await sdToast.create('๋ฉ”์‹œ์ง€', 'success' | 'error' | 'warning' | 'info');
100
+
101
+ // ๊ฐœ๋ณ„/์ „์ฒด ๋‹ซ๊ธฐ
102
+ await sdToast.dismiss(id);
103
+ await sdToast.dismissAll();
104
+
105
+ // ์ „์—ญ ์„ค์ •
106
+ sdToast.configure({
107
+ position: 'top-right',
108
+ maxVisible: 5,
109
+ defaultDuration: 3000,
110
+ zIndex: 9999,
67
111
  });
68
112
  ```
69
113
 
70
- ## ๐Ÿš€ Quick Start
114
+ > `sdToast`๋Š” `sd-toast-container`๋ฅผ ์ž๋™์œผ๋กœ ์ƒ์„ฑํ•˜๋ฏ€๋กœ ๋ณ„๋„์˜ Provider ๋ฐฐ์น˜๊ฐ€ ๋ถˆํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
71
115
 
72
- ### Basic Component Usage
116
+ ---
73
117
 
74
- ```vue
75
- <template>
76
- <div>
77
- <SdButton @click="handleClick"> Click me </SdButton>
78
- </div>
79
- </template>
118
+ ### `sdLoading` โ€” `@sellmate/design-system`
80
119
 
81
- <script setup lang="ts">
82
- import { SdButton } from '@sellmate/design-system-vue';
120
+ ```ts
121
+ import { sdLoading } from '@sellmate/design-system';
83
122
 
84
- const handleClick = () => {
85
- console.log('Button clicked');
86
- };
87
- </script>
123
+ const hide = sdLoading.show(); // ์ „์ฒดํ™”๋ฉด ๋กœ๋”ฉ ํ‘œ์‹œ
124
+ hide(); // ๋กœ๋”ฉ ์ˆจ๊น€
125
+
126
+ sdLoading.show({ message: '์ฒ˜๋ฆฌ ์ค‘...' });
127
+ ```
128
+
129
+ ---
130
+
131
+ ## Available Components
132
+
133
+ ### ์ž…๋ ฅ
134
+
135
+ | ์ปดํฌ๋„ŒํŠธ | ์„ค๋ช… |
136
+ | ----------------------- | -------------------- |
137
+ | `SdInput` | ํ…์ŠคํŠธ ์ž…๋ ฅ |
138
+ | `SdNumberInput` | ์ˆซ์ž ์ž…๋ ฅ |
139
+ | `SdTextarea` | ๋ฉ€ํ‹ฐ๋ผ์ธ ํ…์ŠคํŠธ ์ž…๋ ฅ |
140
+ | `SdBarcodeInput` | ๋ฐ”์ฝ”๋“œ ์Šค์บ๋„ˆ ์ž…๋ ฅ |
141
+ | `SdCheckbox` | ์ฒดํฌ๋ฐ•์Šค |
142
+ | `SdRadio` | ๋ผ๋””์˜ค ๋ฒ„ํŠผ |
143
+ | `SdRadioGroup` | ๋ผ๋””์˜ค ๊ทธ๋ฃน |
144
+ | `SdRadioButton` | ๋ฒ„ํŠผํ˜• ๋ผ๋””์˜ค |
145
+ | `SdSwitch` | ์Šค์œ„์น˜ ํ† ๊ธ€ |
146
+ | `SdToggle` | ํ† ๊ธ€ |
147
+ | `SdSelect` | ๋‹จ์ผ ์„ ํƒ ๋“œ๋กญ๋‹ค์šด |
148
+ | `SdSelectGroup` | ๊ทธ๋ฃนํ˜• ๋‹จ์ผ ์„ ํƒ |
149
+ | `SdSelectMultiple` | ๋‹ค์ค‘ ์„ ํƒ ๋“œ๋กญ๋‹ค์šด |
150
+ | `SdSelectMultipleGroup` | ๊ทธ๋ฃนํ˜• ๋‹ค์ค‘ ์„ ํƒ |
151
+ | `SdSelectV2` | ๋‹จ์ผ/๋‹ค์ค‘ ์„ ํƒ V2 |
152
+ | `SdDatePicker` | ๋‚ ์งœ ์„ ํƒ |
153
+ | `SdDateRangePicker` | ๋‚ ์งœ ๋ฒ”์œ„ ์„ ํƒ |
154
+ | `SdFilePicker` | ํŒŒ์ผ ์„ ํƒ |
155
+
156
+ ### ๋ฒ„ํŠผ
157
+
158
+ | ์ปดํฌ๋„ŒํŠธ | ์„ค๋ช… |
159
+ | ------------------ | ---------------- |
160
+ | `SdButton` | ๊ธฐ๋ณธ ๋ฒ„ํŠผ |
161
+ | `SdButtonV2` | ๋ฒ„ํŠผ V2 |
162
+ | `SdGhostButton` | ๊ณ ์ŠคํŠธ ๋ฒ„ํŠผ |
163
+ | `SdDropdownButton` | ๋“œ๋กญ๋‹ค์šด ๋ฒ„ํŠผ |
164
+ | `SdTextLink` | ํ…์ŠคํŠธ ๋งํฌ ๋ฒ„ํŠผ |
165
+
166
+ ### ํ‘œ์‹œ
167
+
168
+ | ์ปดํฌ๋„ŒํŠธ | ์„ค๋ช… |
169
+ | -------------------- | ---------------------- |
170
+ | `SdTag` | ํƒœ๊ทธ |
171
+ | `SdBadge` | ๋ฑƒ์ง€ |
172
+ | `SdIcon` | ์•„์ด์ฝ˜ |
173
+ | `SdTooltip` | ํˆดํŒ |
174
+ | `SdPopover` | ํŒ์˜ค๋ฒ„ |
175
+ | `SdProgress` | ์ง„ํ–‰ ๋ฐ” |
176
+ | `SdCircleProgress` | ์›ํ˜• ์ง„ํ–‰ ๋ฐ” |
177
+ | `SdLoadingContainer` | ๋กœ๋”ฉ ์˜ค๋ฒ„๋ ˆ์ด ์ปจํ…Œ์ด๋„ˆ |
178
+ | `SdGuide` | ๊ฐ€์ด๋“œ ํ…์ŠคํŠธ |
179
+ | `SdCard` | ์นด๋“œ |
180
+ | `SdCalendar` | ์บ˜๋ฆฐ๋” ํ‘œ์‹œ |
181
+
182
+ ### ๋ ˆ์ด์•„์›ƒ / ๊ตฌ์กฐ
183
+
184
+ | ์ปดํฌ๋„ŒํŠธ | ์„ค๋ช… |
185
+ | -------------- | ------------------------------------ |
186
+ | `SdField` | ํผ ํ•„๋“œ ๋ž˜ํผ (label + input + error) |
187
+ | `SdForm` | ํผ ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ ์ปจํ…Œ์ด๋„ˆ |
188
+ | `SdTabs` | ํƒญ ๋„ค๋น„๊ฒŒ์ด์…˜ |
189
+ | `SdTable` | ๋ฐ์ดํ„ฐ ํ…Œ์ด๋ธ” |
190
+ | `SdPagination` | ํŽ˜์ด์ง€๋„ค์ด์…˜ |
191
+
192
+ ### ๋ชจ๋‹ฌ / ์•Œ๋ฆผ
193
+
194
+ | ์ปดํฌ๋„ŒํŠธ | ์„ค๋ช… |
195
+ | ------------------ | ------------------------------------ |
196
+ | `SdModalContainer` | sdModal Provider (๋ฃจํŠธ์— 1ํšŒ ๋ฐฐ์น˜) |
197
+ | `SdConfirmModal` | Confirm ๋ชจ๋‹ฌ (์ง์ ‘ ๋ Œ๋”) |
198
+ | `SdActionModal` | Action ๋ชจ๋‹ฌ (์ง์ ‘ ๋ Œ๋”) |
199
+ | `SdLoadingModal` | Loading ๋ชจ๋‹ฌ (์ง์ ‘ ๋ Œ๋”) |
200
+ | `SdToastContainer` | Toast ์ปจํ…Œ์ด๋„ˆ (sdToast๊ฐ€ ์ž๋™ ์ƒ์„ฑ) |
201
+ | `SdToast` | ๊ฐœ๋ณ„ Toast |
202
+
203
+ ---
204
+
205
+ ## Available Types
206
+
207
+ ```ts
208
+ import type {
209
+ // Table
210
+ SdTableColumn,
211
+ SdTableRow,
212
+ // Select
213
+ SelectOption,
214
+ SelectOptionGroup,
215
+ // Radio
216
+ RadioValue,
217
+ RadioOption,
218
+ // Button
219
+ ButtonVariant,
220
+ ButtonSize,
221
+ ButtonV2Name,
222
+ DropdownButtonItem,
223
+ // Form
224
+ Rule,
225
+ ValidatableField,
226
+ // Checkbox
227
+ CheckedType,
228
+ // Tag
229
+ TagName,
230
+ // Toast
231
+ ToastType,
232
+ // DateBox
233
+ DateBoxType,
234
+ // Tabs
235
+ TabOption,
236
+ // sdModal
237
+ SdModalCreateOption,
238
+ } from '@sellmate/design-system-vue';
88
239
  ```
89
240
 
90
- ## ๐Ÿ“š Available Components
241
+ ---
242
+
243
+ ## Composables
244
+
245
+ ### `useSdTableVirtualScroll`
246
+
247
+ ```ts
248
+ import { useSdTableVirtualScroll } from '@sellmate/design-system-vue';
249
+
250
+ const { virtualRows, totalHeight, scrollToIndex } = useSdTableVirtualScroll({
251
+ rowCount: data.length,
252
+ rowHeight: 48,
253
+ containerHeight: 400,
254
+ });
255
+ ```
91
256
 
92
- - `SdButton` - Button component
93
- - `SdInput` - Input component
94
- - `SdCheckbox` - Checkbox component
95
- - `SdSelect` - Select dropdown component
96
- - `SdTableBackup` - Table component
97
- - `SdTag` - Tag component
98
- - `SdIcon` - Icon component
99
- - `SdTooltip` - Tooltip component
100
- - `SdPopover` - Popover component
101
- - `SdDatePicker` - Date picker component
102
- - `SdDateRangePicker` - Date range picker component
103
- - `SdPagination` - Pagination component
257
+ ---
104
258
 
105
- ## ๐Ÿ“‹ Requirements
259
+ ## Requirements
106
260
 
107
261
  - Vue 3.0.0 or higher
108
- - @sellmate/design-system (peer dependency)
109
262
 
110
- ## ๐Ÿ“ License
263
+ ## License
111
264
 
112
265
  MIT
@@ -461,8 +461,10 @@ export const SdPopover = /*@__PURE__*/ defineContainer('sd-popover', undefined,
461
461
  'messages',
462
462
  'buttons',
463
463
  'menuClass',
464
- 'noHover',
465
- 'useClose'
464
+ 'useClose',
465
+ 'sdShowChange'
466
+ ], [
467
+ 'sdShowChange'
466
468
  ]);
467
469
  export const SdPortal = /*@__PURE__*/ defineContainer('sd-portal', undefined, [
468
470
  'to',
@@ -748,9 +750,13 @@ export const SdSelectV2Trigger = /*@__PURE__*/ defineContainer('sd-select-v2-tri
748
750
  'placeholder',
749
751
  'disabled',
750
752
  'isOpen',
751
- 'sdTriggerClick'
753
+ 'sdTriggerClick',
754
+ 'sdTriggerFocus',
755
+ 'sdTriggerBlur'
752
756
  ], [
753
- 'sdTriggerClick'
757
+ 'sdTriggerClick',
758
+ 'sdTriggerFocus',
759
+ 'sdTriggerBlur'
754
760
  ]);
755
761
  export const SdSwitch = /*@__PURE__*/ defineContainer('sd-switch', undefined, [
756
762
  'value',
package/lib/components.ts CHANGED
@@ -538,8 +538,10 @@ export const SdPopover: StencilVueComponent<JSX.SdPopover> = /*@__PURE__*/ defin
538
538
  'messages',
539
539
  'buttons',
540
540
  'menuClass',
541
- 'noHover',
542
- 'useClose'
541
+ 'useClose',
542
+ 'sdShowChange'
543
+ ], [
544
+ 'sdShowChange'
543
545
  ]);
544
546
 
545
547
 
@@ -868,9 +870,13 @@ export const SdSelectV2Trigger: StencilVueComponent<JSX.SdSelectV2Trigger> = /*@
868
870
  'placeholder',
869
871
  'disabled',
870
872
  'isOpen',
871
- 'sdTriggerClick'
873
+ 'sdTriggerClick',
874
+ 'sdTriggerFocus',
875
+ 'sdTriggerBlur'
872
876
  ], [
873
- 'sdTriggerClick'
877
+ 'sdTriggerClick',
878
+ 'sdTriggerFocus',
879
+ 'sdTriggerBlur'
874
880
  ]);
875
881
 
876
882
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellmate/design-system-vue",
3
- "version": "1.0.69",
3
+ "version": "1.0.70",
4
4
  "description": "Design System - Vue Component Wrappers",
5
5
  "keywords": [
6
6
  "vue",
@@ -45,7 +45,7 @@
45
45
  "vue": "^3.4.38"
46
46
  },
47
47
  "dependencies": {
48
- "@sellmate/design-system": "^1.0.69",
48
+ "@sellmate/design-system": "^1.0.70",
49
49
  "@stencil/vue-output-target": "^0.11.8"
50
50
  },
51
51
  "peerDependencies": {