@ironsource/shared-ui 2.0.0-rc.6 → 2.0.0-rc.8

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 (244) hide show
  1. package/Button.vue_vue_type_style_index_0_scoped_bfe31a93_lang.css +1 -0
  2. package/ButtonBase.vue_vue_type_style_index_0_scoped_9021cac4_lang.css +1 -0
  3. package/ButtonV4.vue_vue_type_style_index_0_scoped_31e553e8_lang.css +1 -0
  4. package/Checkbox.vue_vue_type_style_index_0_scoped_58dedb90_lang.css +1 -0
  5. package/CheckboxV4.vue_vue_type_style_index_0_scoped_ee3e6d82_lang.css +1 -0
  6. package/DataGrid.vue_vue_type_style_index_0_scoped_7a670808_lang.css +1 -0
  7. package/Dropdown.vue_vue_type_style_index_0_scoped_d4f8e790_lang.css +1 -0
  8. package/FilterDropdown.vue_vue_type_style_index_0_scoped_b42d8b45_lang.css +1 -0
  9. package/FilterSearchInput.vue_vue_type_style_index_0_scoped_51006ea0_lang.css +1 -0
  10. package/FiltersPanel.vue_vue_type_style_index_0_scoped_9d2f3413_lang.css +1 -0
  11. package/FiltersPanelV4.vue_vue_type_style_index_0_scoped_39061862_lang.css +1 -0
  12. package/IconButton.vue_vue_type_style_index_0_scoped_6dffd3f6_lang.css +1 -0
  13. package/IncludeExclude.vue_vue_type_style_index_0_scoped_2a01a791_lang.css +1 -0
  14. package/IncludeExcludeDragDrop.vue_vue_type_style_index_0_scoped_85bff8f4_lang.css +1 -0
  15. package/IncludeExcludeOption.vue_vue_type_style_index_0_scoped_91bc7787_lang.css +1 -0
  16. package/Label.vue_vue_type_style_index_0_scoped_48e00c04_lang.css +1 -0
  17. package/Option.vue_vue_type_style_index_0_scoped_3d6ce2fc_lang.css +1 -0
  18. package/OptionV4.vue_vue_type_style_index_0_scoped_92add735_lang.css +1 -0
  19. package/Popover.vue_vue_type_style_index_0_scoped_25eb53db_lang.css +1 -0
  20. package/RadioButton.vue_vue_type_style_index_0_scoped_3c6b715c_lang.css +1 -0
  21. package/RadioButtonV4.vue_vue_type_style_index_0_scoped_14be812e_lang.css +1 -0
  22. package/RadioGroup.vue_vue_type_style_index_0_scoped_3071ef24_lang.css +1 -0
  23. package/RadioGroupV4.vue_vue_type_style_index_0_scoped_f8e8cbab_lang.css +1 -0
  24. package/SearchInput.vue_vue_type_style_index_0_scoped_b256f8ef_lang.css +1 -0
  25. package/Snackbar.vue_vue_type_style_index_0_scoped_cec4f8e5_lang.css +1 -0
  26. package/SnackbarV4.vue_vue_type_style_index_0_scoped_48311746_lang.css +1 -0
  27. package/components/autocompleteDropdown/AutocompleteDropdown.vue.d.ts +1 -1
  28. package/components/autocompleteDropdown/AutocompleteDropdown.vue2.js +3 -3
  29. package/components/autocompleteDropdown/index.d.ts +1 -1
  30. package/components/button/v3/Button.vue.d.ts +8 -31
  31. package/components/button/v3/Button.vue.js +3 -3
  32. package/components/button/v3/Button.vue2.js +43 -75
  33. package/components/button/{common → v3}/ButtonBase.vue.d.ts +9 -9
  34. package/components/button/{common → v3}/ButtonBase.vue.js +3 -3
  35. package/components/button/{common → v3}/ButtonBase.vue2.js +3 -3
  36. package/components/button/v3/IconButton.vue.js +2 -2
  37. package/components/button/v3/IconButton.vue2.js +4 -4
  38. package/components/button/v3/LoaderCircleIcon.vue2.js +0 -0
  39. package/components/button/v3/LoaderDotsIcon.vue2.js +0 -0
  40. package/components/button/v3/index.d.ts +130 -0
  41. package/components/button/v4/ButtonV4.vue.d.ts +21 -6
  42. package/components/button/v4/ButtonV4.vue.js +4 -4
  43. package/components/button/v4/ButtonV4.vue2.js +41 -35
  44. package/components/button/v4/index.d.ts +72 -15
  45. package/components/checkbox/common/Checkbox.common.d.ts +11 -0
  46. package/components/checkbox/common/Checkbox.common.js +32 -0
  47. package/components/checkbox/v3/Checkbox.vue.js +7 -0
  48. package/components/checkbox/v3/Checkbox.vue2.js +99 -0
  49. package/components/checkbox/{icons → v3/icons}/checked.vue.js +1 -1
  50. package/components/checkbox/{icons → v3/icons}/indeterminate.vue.js +1 -1
  51. package/components/checkbox/{icons → v3/icons}/unchecked.vue.js +1 -1
  52. package/components/checkbox/v4/CheckboxV4.vue.d.ts +53 -0
  53. package/components/checkbox/v4/CheckboxV4.vue.js +7 -0
  54. package/components/checkbox/v4/CheckboxV4.vue2.js +107 -0
  55. package/components/checkbox/v4/icons/CheckedDisabledState.vue.js +38 -0
  56. package/components/checkbox/v4/icons/CheckedState.vue.d.ts +2 -0
  57. package/components/checkbox/v4/icons/CheckedState.vue.js +38 -0
  58. package/components/checkbox/v4/icons/IndeterminateDisabledState.vue.d.ts +2 -0
  59. package/components/checkbox/v4/icons/IndeterminateDisabledState.vue.js +40 -0
  60. package/components/checkbox/v4/icons/IndeterminateState.vue.d.ts +2 -0
  61. package/components/checkbox/v4/icons/IndeterminateState.vue.js +40 -0
  62. package/components/checkbox/v4/icons/UncheckedDisabledState.vue.d.ts +2 -0
  63. package/components/checkbox/v4/icons/UncheckedDisabledState.vue.js +31 -0
  64. package/components/checkbox/v4/icons/UncheckedState.vue.d.ts +2 -0
  65. package/components/checkbox/v4/icons/UncheckedState.vue.js +31 -0
  66. package/components/checkbox/v4/index.d.ts +152 -0
  67. package/components/checkbox/v4/index.js +6 -0
  68. package/components/chip/v3/Chip.vue.d.ts +1 -1
  69. package/components/chip/v3/index.d.ts +20 -20
  70. package/components/chip/v4/ChipV4.vue.d.ts +1 -1
  71. package/components/chip/v4/index.d.ts +20 -20
  72. package/components/dialog/v3/Dialog.vue.d.ts +1 -1
  73. package/components/dialog/v3/index.d.ts +4 -4
  74. package/components/dialog/v4/DialogV4.vue.d.ts +1 -1
  75. package/components/dialog/v4/index.d.ts +4 -4
  76. package/components/dropdown/v3/Dropdown.vue.d.ts +5 -5
  77. package/components/dropdown/v3/Dropdown.vue.js +2 -2
  78. package/components/dropdown/v3/Dropdown.vue2.js +5 -5
  79. package/components/dropdown/v3/Label.vue.js +7 -0
  80. package/components/dropdown/{common → v3}/Label.vue2.js +2 -2
  81. package/components/dropdown/v3/Option.vue.js +7 -0
  82. package/components/dropdown/{common → v3}/Option.vue2.js +3 -3
  83. package/components/dropdown/{common → v3}/SearchInput.vue.js +2 -2
  84. package/components/dropdown/{common → v3}/SearchInput.vue2.js +2 -2
  85. package/components/dropdown/v3/index.d.ts +62 -62
  86. package/components/dropdown/v3/index.js +3 -3
  87. package/components/dropdown/v4/ChipDropdownTrigger.vue.d.ts +1 -1
  88. package/components/dropdown/v4/DefaultDropdownTrigger.vue.d.ts +3 -3
  89. package/components/dropdown/v4/DropdownV4.vue.d.ts +2 -2
  90. package/components/dropdown/v4/OptionV4.vue.js +3 -3
  91. package/components/dropdown/v4/OptionV4.vue2.js +2 -2
  92. package/components/dropdown/v4/index.d.ts +111 -111
  93. package/components/emptyState/v3/EmptyState.vue.d.ts +3 -3
  94. package/components/emptyState/v3/index.d.ts +7 -7
  95. package/components/filterDropdown/FilterDropdown.vue.d.ts +1 -1
  96. package/components/filterDropdown/FilterDropdown.vue.js +2 -2
  97. package/components/filterDropdown/FilterDropdown.vue2.js +7 -7
  98. package/components/filterDropdown/index.d.ts +2 -2
  99. package/components/filtersPanel/v3/FilterSearchInput.vue.d.ts +2 -0
  100. package/components/filtersPanel/v3/FilterSearchInput.vue.js +7 -0
  101. package/components/filtersPanel/{FilterSearchInput.vue2.js → v3/FilterSearchInput.vue2.js} +6 -6
  102. package/components/filtersPanel/v3/FiltersPanel.vue.js +7 -0
  103. package/components/filtersPanel/{FiltersPanel.vue2.js → v3/FiltersPanel.vue2.js} +1 -1
  104. package/components/filtersPanel/v4/FiltersPanelV4.vue.d.ts +44 -0
  105. package/components/filtersPanel/v4/FiltersPanelV4.vue.js +7 -0
  106. package/components/filtersPanel/v4/FiltersPanelV4.vue2.js +23 -0
  107. package/components/filtersPanel/v4/index.d.ts +101 -0
  108. package/components/filtersPanel/v4/index.js +6 -0
  109. package/components/filtersPanel/v4/storyConsts.d.ts +20 -0
  110. package/components/icon/icons/FiltersSearch.vue.d.ts +2 -0
  111. package/components/icon/v3/icons/index.d.ts +3 -0
  112. package/components/icon/v3/icons/index.js +3 -0
  113. package/components/icon/v3/index.d.ts +3 -0
  114. package/components/includeExclude/IncludeExclude.vue.d.ts +2 -2
  115. package/components/includeExclude/IncludeExclude.vue.js +3 -3
  116. package/components/includeExclude/IncludeExclude.vue2.js +23 -24
  117. package/components/includeExclude/IncludeExcludeAppHeader.vue.d.ts +2 -2
  118. package/components/includeExclude/IncludeExcludeChipFilter.vue.d.ts +2 -2
  119. package/components/includeExclude/IncludeExcludeDragDrop.vue.d.ts +2 -2
  120. package/components/includeExclude/IncludeExcludeDragDrop.vue.js +3 -3
  121. package/components/includeExclude/IncludeExcludeDragDrop.vue2.js +31 -32
  122. package/components/includeExclude/IncludeExcludeOption.vue.js +5 -5
  123. package/components/includeExclude/IncludeExcludeOption.vue2.js +2 -2
  124. package/components/includeExclude/index.d.ts +135 -135
  125. package/components/input/v3/Input.vue.d.ts +3 -3
  126. package/components/input/v3/index.d.ts +82 -82
  127. package/components/input/v4/TextField.vue.d.ts +6 -6
  128. package/components/input/v4/index.d.ts +103 -103
  129. package/components/menu/Menu.vue.d.ts +1 -1
  130. package/components/menu/index.d.ts +20 -20
  131. package/components/multibar/MultiBar.vue.d.ts +1 -1
  132. package/components/multibar/index.d.ts +1 -1
  133. package/components/popover/Popover.vue.js +6 -36
  134. package/components/popover/Popover.vue2.js +36 -3
  135. package/components/popover/index.d.ts +16 -16
  136. package/components/popover/index.js +2 -3
  137. package/components/radioButton/common/radioGroup.common.d.ts +3 -0
  138. package/components/radioButton/common/radioGroup.common.js +26 -0
  139. package/components/radioButton/v3/RadioButton.vue.js +7 -0
  140. package/components/radioButton/v3/RadioButton.vue2.js +79 -0
  141. package/components/radioButton/v3/RadioGroup.vue.js +7 -0
  142. package/components/radioButton/v3/RadioGroup.vue2.js +29 -0
  143. package/components/radioButton/v4/RadioButtonV4.vue.d.ts +59 -0
  144. package/components/radioButton/v4/RadioButtonV4.vue.js +7 -0
  145. package/components/radioButton/v4/RadioButtonV4.vue2.js +67 -0
  146. package/components/radioButton/v4/RadioGroupV4.vue.d.ts +61 -0
  147. package/components/radioButton/v4/RadioGroupV4.vue.js +7 -0
  148. package/components/radioButton/v4/RadioGroupV4.vue2.js +29 -0
  149. package/components/radioButton/v4/index.d.ts +334 -0
  150. package/components/radioButton/v4/index.js +8 -0
  151. package/components/snackbar/common/notify.d.ts +3 -0
  152. package/components/snackbar/common/notify.js +82 -0
  153. package/components/snackbar/common/snackbar.common.d.ts +11 -0
  154. package/components/snackbar/common/snackbar.common.js +51 -0
  155. package/components/snackbar/v3/Snackbar.vue.js +7 -0
  156. package/components/snackbar/v3/Snackbar.vue2.js +129 -0
  157. package/components/snackbar/v3/index.d.ts +3 -0
  158. package/components/snackbar/v3/index.js +10 -0
  159. package/components/snackbar/v4/SnackbarV4.vue.d.ts +206 -0
  160. package/components/snackbar/v4/SnackbarV4.vue.js +7 -0
  161. package/components/snackbar/v4/SnackbarV4.vue2.js +137 -0
  162. package/components/snackbar/v4/index.d.ts +4 -0
  163. package/components/snackbar/v4/index.js +11 -0
  164. package/components/table/v3/index.d.ts +16 -16
  165. package/components/table/v4/DataGrid.vue.d.ts +1 -1
  166. package/components/table/v4/DataGrid.vue.js +2 -2
  167. package/components/table/v4/DataGrid.vue2.js +28 -29
  168. package/components/table/v4/index.d.ts +20 -20
  169. package/components/toggle/v3/Toggle.vue.d.ts +1 -1
  170. package/components/toggle/v3/index.d.ts +17 -17
  171. package/components/toggle/v4/ToggleV4.vue.d.ts +2 -2
  172. package/index.d.ts +2125 -828
  173. package/index.js +145 -152
  174. package/package.json +40 -15
  175. package/testids/index.d.ts +8 -0
  176. package/testids/index.js +14 -13
  177. package/Button.vue_vue_type_style_index_0_scoped_d92097c8_lang.css +0 -1
  178. package/ButtonBase.vue_vue_type_style_index_0_scoped_70baba59_lang.css +0 -1
  179. package/ButtonV4.vue_vue_type_style_index_0_scoped_43578f8c_lang.css +0 -1
  180. package/Checkbox.vue_vue_type_style_index_0_scoped_518c02d0_lang.css +0 -1
  181. package/DataGrid.vue_vue_type_style_index_0_scoped_f080f37f_lang.css +0 -1
  182. package/Dropdown.vue_vue_type_style_index_0_scoped_0114904e_lang.css +0 -1
  183. package/FilterDropdown.vue_vue_type_style_index_0_scoped_b25c5605_lang.css +0 -1
  184. package/FilterSearchInput.vue_vue_type_style_index_0_scoped_9198bf4e_lang.css +0 -1
  185. package/FiltersPanel.vue_vue_type_style_index_0_scoped_2996b384_lang.css +0 -1
  186. package/IconButton.vue_vue_type_style_index_0_scoped_2fe9bc4c_lang.css +0 -1
  187. package/IncludeExclude.vue_vue_type_style_index_0_scoped_2c9debd6_lang.css +0 -1
  188. package/IncludeExcludeDragDrop.vue_vue_type_style_index_0_scoped_ff32d111_lang.css +0 -1
  189. package/IncludeExcludeOption.vue_vue_type_style_index_0_scoped_4a87e4fd_lang.css +0 -1
  190. package/Label.vue_vue_type_style_index_0_scoped_5faaafce_lang.css +0 -1
  191. package/Option.vue_vue_type_style_index_0_scoped_2432f13f_lang.css +0 -1
  192. package/OptionV4.vue_vue_type_style_index_0_scoped_b879fe79_lang.css +0 -1
  193. package/RadioButton.vue_vue_type_style_index_0_scoped_f5d3359c_lang.css +0 -1
  194. package/RadioGroup.vue_vue_type_style_index_0_scoped_50bc6963_lang.css +0 -1
  195. package/SearchInput.vue_vue_type_style_index_0_scoped_0b1ea2f6_lang.css +0 -1
  196. package/Snackbar.vue_vue_type_style_index_0_scoped_d14230ca_lang.css +0 -1
  197. package/components/button/common/ButtonSuper.vue.d.ts +0 -52
  198. package/components/checkbox/Checkbox.vue.js +0 -7
  199. package/components/checkbox/Checkbox.vue2.js +0 -97
  200. package/components/dropdown/common/Label.vue.js +0 -7
  201. package/components/dropdown/common/Option.vue.js +0 -7
  202. package/components/filtersPanel/FilterSearchInput.vue.js +0 -7
  203. package/components/filtersPanel/FiltersPanel.vue.js +0 -7
  204. package/components/radioButton/RadioButton.vue.js +0 -7
  205. package/components/radioButton/RadioButton.vue2.js +0 -82
  206. package/components/radioButton/RadioGroup.vue.js +0 -7
  207. package/components/radioButton/RadioGroup.vue2.js +0 -44
  208. package/components/snackbar/Snackbar.vue.js +0 -7
  209. package/components/snackbar/Snackbar.vue2.js +0 -150
  210. package/components/snackbar/index.d.ts +0 -3
  211. package/components/snackbar/index.js +0 -6
  212. package/components/snackbar/notify.js +0 -84
  213. /package/{Popover.vue_vue_type_style_index_0_lang.css → Popover.vue_vue_type_style_index_1_lang.css} +0 -0
  214. /package/components/button/{consts.d.ts → common/consts.d.ts} +0 -0
  215. /package/components/button/{consts.js → common/consts.js} +0 -0
  216. /package/components/button/{icon → v3}/LoaderCircleIcon.vue.d.ts +0 -0
  217. /package/components/button/{icon → v3}/LoaderCircleIcon.vue.js +0 -0
  218. /package/components/button/{icon → v3}/LoaderDotsIcon.vue.d.ts +0 -0
  219. /package/components/button/{icon → v3}/LoaderDotsIcon.vue.js +0 -0
  220. /package/components/checkbox/{Checkbox.vue.d.ts → v3/Checkbox.vue.d.ts} +0 -0
  221. /package/components/checkbox/{icons → v3/icons}/checked.vue.d.ts +0 -0
  222. /package/components/checkbox/{icons → v3/icons}/indeterminate.vue.d.ts +0 -0
  223. /package/components/checkbox/{icons → v3/icons}/unchecked.vue.d.ts +0 -0
  224. /package/components/checkbox/{index.d.ts → v3/index.d.ts} +0 -0
  225. /package/components/checkbox/{index.js → v3/index.js} +0 -0
  226. /package/components/{filtersPanel/FilterSearchInput.vue.d.ts → checkbox/v4/icons/CheckedDisabledState.vue.d.ts} +0 -0
  227. /package/components/dropdown/{common → v3}/Label.vue.d.ts +0 -0
  228. /package/components/dropdown/{common → v3}/Option.vue.d.ts +0 -0
  229. /package/components/dropdown/{common → v3}/SearchInput.vue.d.ts +0 -0
  230. /package/components/filtersPanel/{Filter.d.ts → v3/Filter.d.ts} +0 -0
  231. /package/components/filtersPanel/{index.d.ts → v3/index.d.ts} +0 -0
  232. /package/components/filtersPanel/{index.js → v3/index.js} +0 -0
  233. /package/components/filtersPanel/{useHiddenFilter.d.ts → v3/useHiddenFilter.d.ts} +0 -0
  234. /package/components/filtersPanel/{useHiddenFilter.js → v3/useHiddenFilter.js} +0 -0
  235. /package/components/radioButton/{useRadio.d.ts → common/useRadio.d.ts} +0 -0
  236. /package/components/radioButton/{useRadio.js → common/useRadio.js} +0 -0
  237. /package/components/radioButton/{RadioButton.vue.d.ts → v3/RadioButton.vue.d.ts} +0 -0
  238. /package/components/radioButton/{RadioGroup.vue.d.ts → v3/RadioGroup.vue.d.ts} +0 -0
  239. /package/components/radioButton/{index.d.ts → v3/index.d.ts} +0 -0
  240. /package/components/radioButton/{index.js → v3/index.js} +0 -0
  241. /package/components/snackbar/{notify.d.ts → common/notify_old.d.ts} +0 -0
  242. /package/components/snackbar/{snackbar.types.d.ts → common/snackbar.types.d.ts} +0 -0
  243. /package/components/snackbar/{snackbar.types.js → common/snackbar.types.js} +0 -0
  244. /package/components/snackbar/{Snackbar.vue.d.ts → v3/Snackbar.vue.d.ts} +0 -0
@@ -1,150 +0,0 @@
1
- import "../../Snackbar.vue_vue_type_style_index_0_scoped_d14230ca_lang.css"; import { defineComponent as H, ref as N, computed as l, onMounted as V, openBlock as s, createBlock as r, Transition as $, withCtx as a, withDirectives as z, createElementVNode as c, normalizeClass as T, unref as n, normalizeStyle as B, createElementBlock as M, createVNode as f, resolveDynamicComponent as U, createCommentVNode as y, renderSlot as W, createTextVNode as A, toDisplayString as F, vShow as w, withModifiers as K } from "vue";
2
- import { useEventListener as P, useTimeoutFn as j } from "@vueuse/core";
3
- import x from "../icon/v3/Icon.vue.js";
4
- import L from "../icon/v3/icons/Close.vue.js";
5
- import q from "../icon/v3/icons/Check.vue.js";
6
- import "../button/v3/Button.vue.js";
7
- import G from "../button/v3/IconButton.vue.js";
8
- import "../button/v3/ScrollButton.vue.js";
9
- import S from "../typography/Text.vue.js";
10
- const J = ["id"], O = { class: "container" }, Q = { class: "texts" }, R = ["innerHTML"], ie = /* @__PURE__ */ H({
11
- __name: "Snackbar",
12
- props: {
13
- customClass: null,
14
- dangerouslyUseHTMLString: { type: Boolean },
15
- duration: { default: 3e3 },
16
- icon: null,
17
- id: null,
18
- message: null,
19
- offset: null,
20
- onClick: null,
21
- onClose: null,
22
- type: { default: null },
23
- position: { default: "top-right" },
24
- showClose: { type: Boolean, default: !0 },
25
- title: { default: "" },
26
- zIndex: { default: 0 }
27
- },
28
- emits: ["destroy"],
29
- setup(e) {
30
- const t = e, v = {
31
- success: q,
32
- error: L
33
- }, i = N(!1);
34
- let C;
35
- const k = l(() => {
36
- const o = t.type;
37
- return o && v[t.type] ? o : "";
38
- }), p = l(() => v[t.type] || t.icon || ""), b = l(
39
- () => t.position.endsWith("right") ? "right" : "left"
40
- ), I = l(
41
- () => t.position.startsWith("top") ? "top" : "bottom"
42
- ), D = l(() => ({
43
- [I.value]: `${t.offset}px`,
44
- zIndex: t.zIndex
45
- }));
46
- function d() {
47
- t.duration > 0 && ({ stop: C } = j(() => {
48
- i.value && m();
49
- }, t.duration));
50
- }
51
- function g() {
52
- C?.();
53
- }
54
- function m() {
55
- i.value = !1;
56
- }
57
- function E({ code: o }) {
58
- o === "Delete" || o === "Backspace" ? g() : o === "Escape" ? i.value && m() : d();
59
- }
60
- return V(() => {
61
- d(), i.value = !0;
62
- }), P(document, "keydown", E), (o, u) => (s(), r($, {
63
- name: "snackbar",
64
- onBeforeLeave: e.onClose,
65
- onAfterLeave: u[1] || (u[1] = (h) => o.$emit("destroy"))
66
- }, {
67
- default: a(() => [
68
- z(c("div", {
69
- id: e.id,
70
- class: T(["snackbar", [e.customClass, n(b)]]),
71
- style: B(n(D)),
72
- role: "alert",
73
- onMouseenter: g,
74
- onMouseleave: d,
75
- onClick: u[0] || (u[0] = //@ts-ignore
76
- (...h) => e.onClick && e.onClick(...h))
77
- }, [
78
- n(p) ? (s(), M("div", {
79
- key: 0,
80
- class: T(["start-icon-container", [n(k)]])
81
- }, [
82
- f(n(x), {
83
- "font-size": n(k) ? "sm" : "lg"
84
- }, {
85
- default: a(() => [
86
- (s(), r(U(n(p))))
87
- ]),
88
- _: 1
89
- }, 8, ["font-size"])
90
- ], 2)) : y("", !0),
91
- c("div", O, [
92
- c("div", Q, [
93
- e.title ? (s(), r(S, {
94
- key: 0,
95
- size: "md",
96
- strong: "",
97
- class: "title"
98
- })) : y("", !0),
99
- z(c("div", {
100
- class: "message",
101
- style: B(e.title ? void 0 : { margin: 0 })
102
- }, [
103
- W(o.$slots, "default", {}, () => [
104
- e.dangerouslyUseHTMLString ? (s(), M("div", {
105
- key: 1,
106
- innerHTML: e.message
107
- }, null, 8, R)) : (s(), r(S, {
108
- key: 0,
109
- size: "sm"
110
- }, {
111
- default: a(() => [
112
- A(F(e.message), 1)
113
- ]),
114
- _: 1
115
- }))
116
- ], !0)
117
- ], 4), [
118
- [w, e.message]
119
- ])
120
- ]),
121
- e.showClose ? (s(), r(n(G), {
122
- key: 0,
123
- theme: "third",
124
- size: "sm",
125
- class: "snackbar-close-button",
126
- variant: "colorized",
127
- onClick: K(m, ["stop"])
128
- }, {
129
- default: a(() => [
130
- f(n(x), null, {
131
- default: a(() => [
132
- f(L)
133
- ]),
134
- _: 1
135
- })
136
- ]),
137
- _: 1
138
- }, 8, ["onClick"])) : y("", !0)
139
- ])
140
- ], 46, J), [
141
- [w, i.value]
142
- ])
143
- ]),
144
- _: 3
145
- }, 8, ["onBeforeLeave"]));
146
- }
147
- });
148
- export {
149
- ie as default
150
- };
@@ -1,3 +0,0 @@
1
- export declare const Snackbar: import("./snackbar.types").Notify;
2
- export default Snackbar;
3
- export * from './snackbar.types';
@@ -1,6 +0,0 @@
1
- import o from "./notify.js";
2
- const a = o;
3
- export {
4
- a as Snackbar,
5
- a as default
6
- };
@@ -1,84 +0,0 @@
1
- import { isVNode as x, createVNode as y, render as v } from "vue";
2
- import b from "./Snackbar.vue.js";
3
- import { snackbarTypes as I } from "./snackbar.types.js";
4
- const p = {
5
- "top-left": [],
6
- "top-right": [],
7
- "bottom-left": [],
8
- "bottom-right": []
9
- }, g = 16;
10
- let C = 1;
11
- const N = 2e3, a = function(e = {}, t = null) {
12
- (typeof e == "string" || x(e)) && (e = { message: e });
13
- const o = e.position || "top-right";
14
- let n = e.zIndex || N, s = p[o].reduce(
15
- (m, { vm: h }) => m + (h.el?.offsetHeight || 0) + g,
16
- e.offset || 0
17
- );
18
- s += g;
19
- const i = () => n++, d = `notification_${C++}`, u = e.onClose, l = {
20
- ...e,
21
- zIndex: i(),
22
- offset: s,
23
- id: d,
24
- onClose: () => {
25
- A(d, o, u);
26
- }
27
- }, c = document.body, f = document.createElement("div"), r = y(
28
- b,
29
- l,
30
- x(l.message) ? {
31
- default: () => l.message
32
- } : null
33
- );
34
- return r.appContext = t ?? a._context, r.props.onDestroy = () => {
35
- v(null, f);
36
- }, v(r, f), p[o].push({ vm: r }), c.appendChild(f?.firstElementChild), {
37
- // instead of calling the onClose function directly, setting this value so that we can have the full lifecycle
38
- // for out component, so that all closing steps will not be skipped.
39
- close: () => {
40
- const m = r.component?.proxy;
41
- m && (m.visible = !1);
42
- }
43
- };
44
- };
45
- function A(e, t, o) {
46
- const n = p[t], s = n.findIndex(
47
- ({ vm: c }) => c.component?.props.id === e
48
- );
49
- if (s === -1)
50
- return;
51
- const { vm: i } = n[s];
52
- if (!i)
53
- return;
54
- o?.(i);
55
- const d = i.el?.offsetHeight, u = t.split("-")[0];
56
- n.splice(s, 1);
57
- const l = n.length;
58
- for (let c = s; c < l; c++) {
59
- const { el: f, component: r } = n[c].vm;
60
- r.props.offset = Number.parseInt(f.style[u], 10) - d - g;
61
- }
62
- }
63
- I.forEach((e) => {
64
- a[e] = (t = {}) => ((typeof t == "string" || x(t)) && (t = {
65
- message: t
66
- }), a({
67
- ...t,
68
- type: e
69
- }));
70
- });
71
- function E() {
72
- for (const e of Object.values(p))
73
- e.forEach(({ vm: t }) => {
74
- const o = t.component?.proxy;
75
- o && (o.visible = !1);
76
- });
77
- }
78
- a.closeAll = E;
79
- a._context = null;
80
- export {
81
- A as close,
82
- E as closeAll,
83
- a as default
84
- };
File without changes