@factoringplus/pl-components-pack-v3 0.8.12 → 0.8.13

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
+ ```
@@ -35208,25 +35208,32 @@ const PlBtn = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render],
35208
35208
  }
35209
35209
  }, PlSnackbar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6b2b9338"]]), snackbarAnimation = "";
35210
35210
  let snackbarId = 0;
35211
- const renderSnackbar = function(g, y, j, z) {
35211
+ const renderSnackbar = function(g) {
35212
+ const { icon: y, color: j, title: z, message: L, button: V, action: re, buttonAdd: ae, actionAdd: le } = g;
35212
35213
  if (!document.getElementById("snackbar")) {
35213
- const ae = document.createElement("div");
35214
- ae.id = "snackbar", document.body.appendChild(ae);
35214
+ const de = document.createElement("div");
35215
+ de.id = "snackbar", document.body.appendChild(de);
35215
35216
  }
35216
- const V = document.createElement("div");
35217
- V.id = `snackbar-${snackbarId}`, V.classList.add("slideIn-animation"), document.getElementById("snackbar").appendChild(V);
35218
- const re = createApp({
35217
+ const ie = document.createElement("div");
35218
+ ie.id = `snackbar-${snackbarId}`, ie.classList.add("slideIn-animation"), document.getElementById("snackbar").appendChild(ie);
35219
+ const pe = createApp({
35219
35220
  render() {
35220
35221
  return h$2(TransitionGroup, { name: "fade", mode: "out-in" }, () => [
35221
- h$2(PlSnackbar, { icon: g, color: y, title: j, message: z })
35222
+ h$2(PlSnackbar, { icon: y, color: j, title: z, message: L, button: V, action: re, buttonAdd: ae, actionAdd: le })
35222
35223
  ]);
35223
35224
  }
35224
35225
  });
35225
- re.mount(`#snackbar-${snackbarId}`), setTimeout(() => {
35226
- V.classList.remove("slideIn-animation"), V.classList.add("fadeOut-animation"), V.addEventListener("animationend", () => {
35227
- re.unmount(), V.remove();
35226
+ pe.mount(`#snackbar-${snackbarId}`), setTimeout(() => {
35227
+ ie.classList.remove("slideIn-animation"), ie.classList.add("fadeOut-animation"), ie.addEventListener("animationend", () => {
35228
+ pe.unmount(), ie.remove();
35228
35229
  });
35229
35230
  }, 4200), snackbarId++;
35231
+ }, PlNotification = {
35232
+ success: (g) => renderSnackbar({ icon: "CircleCheck24", color: "#0CA31B", ...g }),
35233
+ error: (g) => renderSnackbar({ icon: "WarningThree24", color: "#ED3636", ...g }),
35234
+ warning: (g) => renderSnackbar({ icon: "WarningTwo24", color: "#FF7D1F", ...g }),
35235
+ info: (g) => renderSnackbar({ icon: "Info24", color: "white", ...g }),
35236
+ custom: renderSnackbar
35230
35237
  }, pinia = createPinia(), PlPlugin = {
35231
35238
  install(g) {
35232
35239
  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;
@@ -35234,7 +35241,7 @@ const renderSnackbar = function(g, y, j, z) {
35234
35241
  },
35235
35242
  apiJs: ApiJs,
35236
35243
  loader: loadingAndSetup,
35237
- renderSnackbar
35244
+ PlNotification
35238
35245
  };
35239
35246
  export {
35240
35247
  PlBody1,