@factoringplus/pl-components-pack-v3 0.8.14-pre-02 → 0.8.14

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
@@ -1,17 +1,17 @@
1
- # Библиотека компонентов Vue 3
2
-
3
- ## Установка
4
-
5
- ```bash
6
- npm i @factoringplus/pl-components-pack-v3
7
- ```
8
-
9
- ### Добавление компонентов в проект
10
-
11
- ```bash
12
- // src/main.js
13
- import components from '@factoringplus/pl-components-pack-v3';
14
- import '@factoringplus/pl-components-pack-v3/dist/style.css';
15
-
16
- app.use(components)
17
- ```
1
+ # Библиотека компонентов Vue 3
2
+
3
+ ## Установка
4
+
5
+ ```bash
6
+ npm i @factoringplus/pl-components-pack-v3
7
+ ```
8
+
9
+ ### Добавление компонентов в проект
10
+
11
+ ```bash
12
+ // src/main.js
13
+ import components from '@factoringplus/pl-components-pack-v3';
14
+ import '@factoringplus/pl-components-pack-v3/dist/style.css';
15
+
16
+ app.use(components)
17
+ ```
@@ -35213,25 +35213,32 @@ const PlBtn = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render],
35213
35213
  }
35214
35214
  }, PlSnackbar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6b2b9338"]]), snackbarAnimation = "";
35215
35215
  let snackbarId = 0;
35216
- const renderSnackbar = function(g, y, j, z) {
35216
+ const renderSnackbar = function(g) {
35217
+ const { icon: y, color: j, title: z, message: L, button: V, action: re, buttonAdd: ae, actionAdd: le } = g;
35217
35218
  if (!document.getElementById("snackbar")) {
35218
- const ae = document.createElement("div");
35219
- ae.id = "snackbar", document.body.appendChild(ae);
35219
+ const de = document.createElement("div");
35220
+ de.id = "snackbar", document.body.appendChild(de);
35220
35221
  }
35221
- const V = document.createElement("div");
35222
- V.id = `snackbar-${snackbarId}`, V.classList.add("slideIn-animation"), document.getElementById("snackbar").appendChild(V);
35223
- const re = createApp({
35222
+ const ie = document.createElement("div");
35223
+ ie.id = `snackbar-${snackbarId}`, ie.classList.add("slideIn-animation"), document.getElementById("snackbar").appendChild(ie);
35224
+ const pe = createApp({
35224
35225
  render() {
35225
35226
  return h$2(TransitionGroup, { name: "fade", mode: "out-in" }, () => [
35226
- h$2(PlSnackbar, { icon: g, color: y, title: j, message: z })
35227
+ h$2(PlSnackbar, { icon: y, color: j, title: z, message: L, button: V, action: re, buttonAdd: ae, actionAdd: le })
35227
35228
  ]);
35228
35229
  }
35229
35230
  });
35230
- re.mount(`#snackbar-${snackbarId}`), setTimeout(() => {
35231
- V.classList.remove("slideIn-animation"), V.classList.add("fadeOut-animation"), V.addEventListener("animationend", () => {
35232
- re.unmount(), V.remove();
35231
+ pe.mount(`#snackbar-${snackbarId}`), setTimeout(() => {
35232
+ ie.classList.remove("slideIn-animation"), ie.classList.add("fadeOut-animation"), ie.addEventListener("animationend", () => {
35233
+ pe.unmount(), ie.remove();
35233
35234
  });
35234
35235
  }, 4200), snackbarId++;
35236
+ }, PlNotification = {
35237
+ success: (g) => renderSnackbar({ icon: "CircleCheck24", color: "#0CA31B", ...g }),
35238
+ error: (g) => renderSnackbar({ icon: "WarningThree24", color: "#ED3636", ...g }),
35239
+ warning: (g) => renderSnackbar({ icon: "WarningTwo24", color: "#FF7D1F", ...g }),
35240
+ info: (g) => renderSnackbar({ icon: "Info24", color: "white", ...g }),
35241
+ custom: renderSnackbar
35235
35242
  }, pinia = createPinia(), PlPlugin = {
35236
35243
  install(g) {
35237
35244
  var y, j, z, L, V, re, ae, le, ue, ie, pe, de, Ne, Ie, he, Ce, Oe, Ue, $e, xe, At, Dt, qe, kt, _n, Lt, vn, In, Cn, On, An, kn;
@@ -35239,7 +35246,7 @@ const renderSnackbar = function(g, y, j, z) {
35239
35246
  },
35240
35247
  apiJs: ApiJs,
35241
35248
  loader: loadingAndSetup,
35242
- renderSnackbar
35249
+ PlNotification
35243
35250
  };
35244
35251
  export {
35245
35252
  PlBody1,