vue-nt-toast 0.1.0 → 0.1.2

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.
Files changed (2) hide show
  1. package/README.md +102 -18
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,35 +1,119 @@
1
- # vue-nt-toast
1
+ vue-nt-toast
2
+ ================
3
+ ![Static Badge](https://img.shields.io/badge/vue_3-only-%234FC08D?style=for-the-badge)
4
+ ![Static Badge](https://img.shields.io/badge/javascript-%23F7DF1E?style=for-the-badge)
5
+ ![Static Badge](https://img.shields.io/badge/html-%23E34F26?style=for-the-badge&logo=html)
6
+ ![Static Badge](https://img.shields.io/badge/sass-%23CC6699?style=for-the-badge)
7
+ ![Static Badge](https://img.shields.io/badge/vite-bundler-%23646CFF?style=for-the-badge)
8
+ ![Static Badge](https://img.shields.io/badge/icon-font_awesome_4.7.0-%23528DD7?style=for-the-badge)
9
+ ![Static Badge](https://img.shields.io/badge/vue_plugin-user_custom_with_vue_3-%234FC08D?style=for-the-badge)
2
10
 
3
- This template should help get you started developing with Vue 3 in Vite.
11
+ ![preview](https://github.com/noistommy/vue-nt-toast/assets/6008185/991fe4fc-1144-440d-8b20-de1ede57f0b7)
4
12
 
5
- ## Recommended IDE Setup
6
13
 
7
- [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
14
+ `vue-nt-toast` is a JavaScript notification system library. It is made available through the installation of the plugin in the Vue project.
8
15
 
9
- ## Customize configuration
16
+ It is designed to operate outside the application (the top layer) so as not to affect the application's layer system as much as possible, and provides status indications of "success", "risk", "information", "attention", and "important" depending on the type of content.
10
17
 
11
- See [Vite Configuration Reference](https://vitejs.dev/config/).
18
+ You can set multiple options across the system, including theme, location, and snack bar mode, to reflect them in the entire system, and you can also apply options that can be changed every time the user runs it.
12
19
 
13
- ## Project Setup
20
+ `vue-nt-toast`는 자바스크립트 알림 시스템 라이브러리 입니다. Vue 프로젝트 내 plugin 설치를 통해서 사용 가능하도록 제작 되었습니다.
21
+ 어플리케이션 외부(최상단 레이어)에서 동작하여 내부 레이어 시스템에 영향을 받지 않게 설계 되었으며 컨텐츠의 종류에 따라 “성공”, “위험”, “정보”, “주의”, “중요” 의 상태 표시를 제공하고있습니다.
14
22
 
15
- ```sh
16
- npm install
17
- ```
23
+ 테마, 위치, 스낵바 모드 등 여러 옵션을 전역에서 설정 하여 전체 시스템에 반영 하도록 할수있고, 사용자가 실행 할때 마다 변경 가능한 옵션을 적용 할수도 있습니다.
18
24
 
19
- ### Compile and Hot-Reload for Development
25
+ ---
26
+ ## Installation
20
27
 
21
28
  ```sh
22
- npm run dev
29
+ $ npm install vue-nt-toast —-save
23
30
  ```
31
+ ---
32
+ ## Plugin registration
24
33
 
25
- ### Compile and Minify for Production
34
+ ```javascript
35
+ Import { createApp } from “vue”;
36
+ // import module
37
+ import NtToast from “vue-nt-toast”;
38
+ // import style css or use yours
39
+ import “vue-nt-toast/toast.css”;
40
+
41
+ const app = createApp(App)
26
42
 
27
- ```sh
28
- npm run build
43
+ Const defaultOptions = {
44
+ // You can set your initial options here
45
+ };
46
+ app.use(NtToast, defaultOptions)
29
47
  ```
48
+ ---
30
49
 
31
- ### Lint with [ESLint](https://eslint.org/)
50
+ ## Usage
32
51
 
33
- ```sh
34
- npm run lint
52
+ * show(type, contents, options)
53
+ * contents.title (Toast title)
54
+ * contents.description (Toast description)
55
+
56
+ ### Set for use global function
57
+
58
+ ```javascript
59
+ // get Proxy in current instance
60
+ import { getCurrentInctance } from 'vue';
61
+
62
+ // composition api or setup
63
+ const { proxy } = getCurrentInstance();
64
+ ```
65
+ ### Creating toast (Show toast)
66
+ ```javascript
67
+ // show success toast
68
+ proxy.$ntToast.show('success', ..., ...)
69
+
70
+ // show another type
71
+ proxy.$ntToast.show('info', ..., ...)
72
+ proxy.$ntToast.show('danger', ..., ...)
35
73
  ```
74
+ ---
75
+
76
+ ## Parameters
77
+
78
+ | Name | Description | Required |
79
+ | --- | --- | --- |
80
+ | `type` | Status or Colors | `true` |
81
+ | `contnts.type` | Title Text | |
82
+ | `contents.description` | Description Text | `true` |
83
+ | `options` | User Custom Options | |
84
+ ---
85
+
86
+ ## Properties
87
+
88
+ * **useTitle**: _boolean_ ▶︎ `true`
89
+ Setting for show/hide toast title.
90
+
91
+ * **useIcon**: _boolean_ ▶︎ `true`
92
+ Setting for show/hide toast status icon.
93
+
94
+ * **round**: _boolean_ ▶︎ `false`
95
+ Setting for enable/disable round border.
96
+
97
+ * **closeButton**: _boolean_ ▶︎ `true`
98
+ Setting for show/hide close button.
99
+
100
+ * **displayOnTop**: _boolean_ ▶︎ `false`
101
+ Setting for order type when toast create.
102
+
103
+ * **snackbar**: _boolean_ ▶︎ `false`
104
+ Setting for snackbar mode.
105
+
106
+ * **freeze**: _boolean_ ▶︎ `false`
107
+ Setting for auto close off.
108
+
109
+ * **timeout**: _number_ ▶︎ `5000`
110
+ Setting for delay time.
111
+
112
+ * **theme**: _string_ ▶︎ `''`
113
+ Setting for toast style.
114
+ `light` `icon` `icon-bg` `line`
115
+
116
+ * **position**: _string_ ▶︎ `top-right`
117
+ Setting for create position.
118
+ v-align(`top`, `bottom`) and h-align(`left`, `center`, `right`) and `full-width`
119
+ ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-nt-toast",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Toast system plugin with vue3",
5
5
  "author": "Minyoung Tommy Kim",
6
6
  "private": false,