@sendelius/vue 0.4.0 → 0.4.3

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 (89) hide show
  1. package/dist/Autocomplete.css +1 -0
  2. package/dist/Btn.css +1 -0
  3. package/dist/Checkbox.css +1 -0
  4. package/dist/Confirm.css +1 -0
  5. package/dist/Cookie.css +1 -0
  6. package/dist/Error.css +1 -0
  7. package/dist/Input.css +1 -0
  8. package/dist/InputCity.css +1 -0
  9. package/dist/InputDate-CRpVPH9p.js +9795 -0
  10. package/dist/InputDate.css +1 -0
  11. package/dist/InputPassword.css +1 -0
  12. package/dist/InputPhone-CTq4y49q.js +272 -0
  13. package/dist/Popup-BIJpeS3t.js +150 -0
  14. package/dist/Popup.css +1 -0
  15. package/dist/Progress.css +1 -0
  16. package/dist/Select.css +1 -0
  17. package/dist/Success.css +1 -0
  18. package/dist/Table.css +1 -0
  19. package/dist/TableFooter.css +1 -0
  20. package/dist/TableHeader.css +1 -0
  21. package/dist/TableItems.css +1 -0
  22. package/dist/TablePagination.css +1 -0
  23. package/dist/Warning.css +1 -0
  24. package/dist/_plugin-vue_export-helper-Djzt4Yr7.js +7 -0
  25. package/dist/config/config.d.ts +2 -0
  26. package/dist/index.js +210 -0
  27. package/dist/ui/btn/Btn.d.ts +4 -0
  28. package/dist/ui/btn/Btn.js +102 -0
  29. package/dist/ui/btn/Btn.vue.d.ts +9 -3
  30. package/dist/ui/cookie/Cookie.d.ts +4 -0
  31. package/dist/ui/cookie/Cookie.js +22 -0
  32. package/dist/ui/cookie/Cookie.vue.d.ts +5 -1
  33. package/dist/ui/form/Autocomplete.d.ts +4 -0
  34. package/dist/ui/form/Autocomplete.js +172 -0
  35. package/dist/ui/form/Autocomplete.vue.d.ts +12 -6
  36. package/dist/ui/form/Checkbox.d.ts +4 -0
  37. package/dist/ui/form/Checkbox.js +69 -0
  38. package/dist/ui/form/Checkbox.vue.d.ts +9 -3
  39. package/dist/ui/form/Input.d.ts +4 -0
  40. package/dist/ui/form/Input.js +92 -0
  41. package/dist/ui/form/Input.vue.d.ts +7 -2
  42. package/dist/ui/form/InputCity.d.ts +4 -0
  43. package/dist/ui/form/InputCity.js +86 -0
  44. package/dist/ui/form/InputDate.d.ts +4 -0
  45. package/dist/ui/form/InputDate.js +1 -0
  46. package/dist/ui/form/InputDate.vue.d.ts +7 -2
  47. package/dist/ui/form/InputPassword.d.ts +4 -0
  48. package/dist/ui/form/InputPassword.js +100 -0
  49. package/dist/ui/form/InputPassword.vue.d.ts +7 -2
  50. package/dist/ui/form/InputPhone.d.ts +4 -0
  51. package/dist/ui/form/InputPhone.js +1 -0
  52. package/dist/ui/form/Select.d.ts +4 -0
  53. package/dist/ui/form/Select.js +76 -0
  54. package/dist/ui/form/Select.vue.d.ts +9 -3
  55. package/dist/ui/notice/Error.d.ts +4 -0
  56. package/dist/ui/notice/Error.js +84 -0
  57. package/dist/ui/notice/Error.vue.d.ts +9 -3
  58. package/dist/ui/notice/Success.d.ts +4 -0
  59. package/dist/ui/notice/Success.js +70 -0
  60. package/dist/ui/notice/Success.vue.d.ts +7 -2
  61. package/dist/ui/notice/Warning.d.ts +4 -0
  62. package/dist/ui/notice/Warning.js +74 -0
  63. package/dist/ui/notice/Warning.vue.d.ts +7 -2
  64. package/dist/ui/popup/Confirm.d.ts +4 -0
  65. package/dist/ui/popup/Confirm.js +61 -0
  66. package/dist/ui/popup/Popup.d.ts +4 -0
  67. package/dist/ui/popup/Popup.js +1 -0
  68. package/dist/ui/progress/Progress.d.ts +4 -0
  69. package/dist/ui/progress/Progress.js +23 -0
  70. package/dist/ui/table/Table.d.ts +4 -0
  71. package/dist/ui/table/Table.js +178 -0
  72. package/dist/ui/table/Table.vue.d.ts +21 -12
  73. package/dist/ui/table/TableFilters.d.ts +4 -0
  74. package/dist/ui/table/TableFilters.js +8 -0
  75. package/dist/ui/table/TableFooter.d.ts +4 -0
  76. package/dist/ui/table/TableFooter.js +142 -0
  77. package/dist/ui/table/TableFooter.vue.d.ts +9 -3
  78. package/dist/ui/table/TableHeader.d.ts +4 -0
  79. package/dist/ui/table/TableHeader.js +157 -0
  80. package/dist/ui/table/TableHeader.vue.d.ts +7 -2
  81. package/dist/ui/table/TableItems.d.ts +4 -0
  82. package/dist/ui/table/TableItems.js +83 -0
  83. package/dist/ui/table/TableItems.vue.d.ts +12 -9
  84. package/dist/ui/table/TablePagination.d.ts +4 -0
  85. package/dist/ui/table/TablePagination.js +92 -0
  86. package/dist/ui/table/TablePagination.vue.d.ts +7 -2
  87. package/package.json +16 -13
  88. package/dist/sendelius-vue.css +0 -2
  89. package/dist/sendelius-vue.js +0 -11916
@@ -0,0 +1,92 @@
1
+ import { t as e } from "../../_plugin-vue_export-helper-Djzt4Yr7.js";
2
+ import { computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, normalizeClass as a, openBlock as o, ref as s, renderSlot as c, toDisplayString as l, vModelDynamic as u, withDirectives as d, withModifiers as f } from "vue";
3
+ import '../../Input.css';// src/ui/form/Input.vue
4
+ var p = [
5
+ "type",
6
+ "required",
7
+ "disabled",
8
+ "autocomplete"
9
+ ], m = {
10
+ key: 0,
11
+ class: "label"
12
+ }, h = {
13
+ key: 1,
14
+ class: "error"
15
+ }, g = /*#__PURE__*/ e({
16
+ __name: "Input",
17
+ props: {
18
+ modelValue: {
19
+ type: [String, Number],
20
+ default: ""
21
+ },
22
+ type: {
23
+ type: [String, Boolean],
24
+ default: "text"
25
+ },
26
+ label: {
27
+ type: [String, Boolean],
28
+ default: ""
29
+ },
30
+ required: {
31
+ type: Boolean,
32
+ default: !1
33
+ },
34
+ disabled: {
35
+ type: Boolean,
36
+ default: !1
37
+ },
38
+ error: {
39
+ type: String,
40
+ default: ""
41
+ },
42
+ autocompleteOff: {
43
+ type: Boolean,
44
+ default: !1
45
+ }
46
+ },
47
+ emits: [
48
+ "update:modelValue",
49
+ "focus",
50
+ "blur"
51
+ ],
52
+ setup(e, { expose: g, emit: _ }) {
53
+ let v = e, y = _, b = s(null), x = s(""), S = t(() => [{
54
+ "input-label": v.label,
55
+ "input-error": v.error || x.value
56
+ }]), C = t({
57
+ get: () => v.modelValue,
58
+ set: (e) => {
59
+ y("update:modelValue", e), x.value = "";
60
+ }
61
+ }), w = () => {
62
+ x.value = b.value?.validationMessage ?? "";
63
+ };
64
+ return g({
65
+ focus: () => b.value?.focus(),
66
+ blur: () => b.value?.blur(),
67
+ setCustomValidity: (e) => {
68
+ b.value?.setCustomValidity(e);
69
+ }
70
+ }), (t, s) => (o(), r("div", { class: a(["input", S.value]) }, [
71
+ c(t.$slots, "before", {}, void 0, !0),
72
+ d(i("input", {
73
+ ref_key: "input",
74
+ ref: b,
75
+ type: e.type,
76
+ "onUpdate:modelValue": s[0] ||= (e) => C.value = e,
77
+ placeholder: " ",
78
+ required: e.required,
79
+ disabled: e.disabled,
80
+ onInvalid: f(w, ["prevent"]),
81
+ onInput: w,
82
+ onFocus: s[1] ||= (e) => y("focus", e),
83
+ onBlur: s[2] ||= (e) => y("blur", e),
84
+ autocomplete: e.autocompleteOff ? "off" : null
85
+ }, null, 40, p), [[u, C.value]]),
86
+ e.label ? (o(), r("div", m, l(e.label), 1)) : n("", !0),
87
+ e.error || x.value ? (o(), r("div", h, l(e.error || x.value), 1)) : n("", !0),
88
+ c(t.$slots, "after", {}, void 0, !0)
89
+ ], 2));
90
+ }
91
+ }, [["__scopeId", "data-v-03732987"]]);
92
+ export { g as default };
@@ -1,6 +1,11 @@
1
1
  declare const component: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
2
- declare var __VLS_1: {};
3
- declare var __VLS_3: {};
2
+ declare function __VLS_template(): {
3
+ __VLS_Slots: {
4
+ before?: (props: {}) => any;
5
+ } & {
6
+ after?: (props: {}) => any;
7
+ };
8
+ };
4
9
  declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
10
  modelValue: {
6
11
  type: (StringConstructor | NumberConstructor)[];
@@ -0,0 +1,4 @@
1
+ export {}
2
+ import _default from './InputCity.vue.js'
3
+ export default _default
4
+ export {}
@@ -0,0 +1,86 @@
1
+ import e from "./Select.js";
2
+ import t from "./Autocomplete.js";
3
+ import { t as n } from "../../_plugin-vue_export-helper-Djzt4Yr7.js";
4
+ import { computed as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, openBlock as c, ref as l, toDisplayString as u, watch as d, withCtx as f } from "vue";
5
+ import '../../InputCity.css';// src/ui/form/InputCity.vue
6
+ var p = { class: "input-city" }, m = /*#__PURE__*/ n({
7
+ __name: "InputCity",
8
+ props: {
9
+ city: {
10
+ type: [String, Number],
11
+ default: ""
12
+ },
13
+ region: {
14
+ type: [String, Number],
15
+ default: ""
16
+ },
17
+ country: {
18
+ type: String,
19
+ default: "RU"
20
+ },
21
+ label: {
22
+ type: [String, Boolean],
23
+ default: ""
24
+ },
25
+ error: {
26
+ type: String,
27
+ default: ""
28
+ },
29
+ autocomplete: {
30
+ type: Function,
31
+ default: null
32
+ }
33
+ },
34
+ emits: [
35
+ "update:city",
36
+ "update:region",
37
+ "update:country"
38
+ ],
39
+ setup(n, { expose: m, emit: h }) {
40
+ let g = n, _ = h, v = [{
41
+ title: "🇷🇺 Россия",
42
+ value: "RU"
43
+ }, {
44
+ title: "🇧🇾 Беларусь",
45
+ value: "BY"
46
+ }], y = r({
47
+ get: () => g.city,
48
+ set: (e) => _("update:city", e)
49
+ }), b = r({
50
+ get: () => g.region,
51
+ set: (e) => _("update:region", e)
52
+ }), x = r({
53
+ get: () => g.country,
54
+ set: (e) => _("update:country", e)
55
+ }), S = l(null), C = l(!1), w = r(() => !!S.value && S.value.city === y.value && S.value.country === x.value), T = r(() => g.error ? g.error : !C.value || !y.value || w.value ? "" : "Выберите город из списка"), E = async (e) => (await g.autocomplete?.(e, x.value))?.cities ?? [], D = (e) => {
56
+ C.value = !0, S.value = e, y.value = e.city, b.value = e.region, x.value = e.country;
57
+ };
58
+ return d(y, (e) => {
59
+ S.value?.city !== e && (S.value = null, b.value = "");
60
+ }), d(x, () => {
61
+ y.value = "", b.value = "", S.value = null;
62
+ }), m({ validate: () => (C.value = !0, y.value ? w.value : !1) }), (r, l) => (c(), i("div", p, [s(e, {
63
+ options: v,
64
+ modelValue: x.value,
65
+ "onUpdate:modelValue": l[0] ||= (e) => x.value = e,
66
+ label: "Страна"
67
+ }, null, 8, ["modelValue"]), s(t, {
68
+ modelValue: y.value,
69
+ "onUpdate:modelValue": l[1] ||= (e) => y.value = e,
70
+ autocomplete: E,
71
+ label: n.label,
72
+ error: T.value,
73
+ required: "",
74
+ onSelect: D
75
+ }, {
76
+ default: f(({ item: e }) => [a("small", null, u(e.region), 1), o(" " + u(e.city), 1)]),
77
+ empty: f(() => [...l[2] ||= [o(" Город не найден ", -1)]]),
78
+ _: 1
79
+ }, 8, [
80
+ "modelValue",
81
+ "label",
82
+ "error"
83
+ ])]));
84
+ }
85
+ }, [["__scopeId", "data-v-cf7e5a0c"]]);
86
+ export { m as default };
@@ -0,0 +1,4 @@
1
+ export {}
2
+ import _default from './InputDate.vue.js'
3
+ export default _default
4
+ export {}
@@ -0,0 +1 @@
1
+ export { t as default } from "../../InputDate-CRpVPH9p.js";
@@ -1,6 +1,11 @@
1
1
  declare const component: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
2
- declare var __VLS_1: {};
3
- declare var __VLS_31: {};
2
+ declare function __VLS_template(): {
3
+ __VLS_Slots: {
4
+ before?: (props: {}) => any;
5
+ } & {
6
+ after?: (props: {}) => any;
7
+ };
8
+ };
4
9
  declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
10
  modelValue: {
6
11
  type: StringConstructor;
@@ -0,0 +1,4 @@
1
+ export {}
2
+ import _default from './InputPassword.vue.js'
3
+ export default _default
4
+ export {}
@@ -0,0 +1,100 @@
1
+ import e from "./Input.js";
2
+ import { t } from "../../_plugin-vue_export-helper-Djzt4Yr7.js";
3
+ import { computed as n, createBlock as r, createElementVNode as i, openBlock as a, ref as o, renderSlot as s, vShow as c, withCtx as l, withDirectives as u, withModifiers as d } from "vue";
4
+ import '../../InputPassword.css';// src/ui/form/InputPassword.vue
5
+ var f = { class: "input-password-control" }, p = /*#__PURE__*/ t({
6
+ __name: "InputPassword",
7
+ props: {
8
+ modelValue: {
9
+ type: String,
10
+ default: ""
11
+ },
12
+ label: {
13
+ type: String,
14
+ default: ""
15
+ },
16
+ required: {
17
+ type: Boolean,
18
+ default: !1
19
+ },
20
+ disabled: {
21
+ type: Boolean,
22
+ default: !1
23
+ },
24
+ error: {
25
+ type: String,
26
+ default: ""
27
+ },
28
+ autocompleteOff: {
29
+ type: Boolean,
30
+ default: !1
31
+ }
32
+ },
33
+ emits: ["update:modelValue"],
34
+ setup(t, { emit: p }) {
35
+ let m = t, h = p, g = o(!1), _ = n({
36
+ get: () => m.modelValue,
37
+ set: (e) => h("update:modelValue", e)
38
+ });
39
+ return (n, o) => (a(), r(e, {
40
+ modelValue: _.value,
41
+ "onUpdate:modelValue": o[2] ||= (e) => _.value = e,
42
+ type: g.value ? "text" : "password",
43
+ label: t.label,
44
+ required: t.required,
45
+ disabled: t.disabled,
46
+ error: t.error,
47
+ autocompleteOff: t.autocompleteOff
48
+ }, {
49
+ after: l(() => [i("div", f, [u(i("button", {
50
+ type: "button",
51
+ class: "show-password",
52
+ title: "показать пароль",
53
+ onClick: o[0] ||= d((e) => g.value = !0, ["prevent"])
54
+ }, [s(n.$slots, "iconEyeOff", {}, () => [o[3] ||= i("svg", {
55
+ xmlns: "http://www.w3.org/2000/svg",
56
+ width: "20",
57
+ height: "20",
58
+ viewBox: "0 0 24 24",
59
+ fill: "none",
60
+ stroke: "currentColor",
61
+ "stroke-width": "2",
62
+ "stroke-linecap": "round",
63
+ "stroke-linejoin": "round",
64
+ class: "input-password-control-icon"
65
+ }, [
66
+ i("path", { d: "M21 9c-2.4 2.667 -5.4 4 -9 4c-3.6 0 -6.6 -1.333 -9 -4" }),
67
+ i("path", { d: "M3 15l2.5 -3.8" }),
68
+ i("path", { d: "M21 14.976l-2.492 -3.776" }),
69
+ i("path", { d: "M9 17l.5 -4" }),
70
+ i("path", { d: "M15 17l-.5 -4" })
71
+ ], -1)], !0)], 512), [[c, !g.value]]), u(i("button", {
72
+ type: "button",
73
+ class: "hide-password",
74
+ title: "скрыть пароль",
75
+ onClick: o[1] ||= d((e) => g.value = !1, ["prevent"])
76
+ }, [s(n.$slots, "iconEyeOn", {}, () => [o[4] ||= i("svg", {
77
+ xmlns: "http://www.w3.org/2000/svg",
78
+ width: "20",
79
+ height: "20",
80
+ viewBox: "0 0 24 24",
81
+ fill: "none",
82
+ stroke: "currentColor",
83
+ "stroke-width": "2",
84
+ "stroke-linecap": "round",
85
+ "stroke-linejoin": "round",
86
+ class: "input-password-control-icon"
87
+ }, [i("path", { d: "M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" }), i("path", { d: "M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6" })], -1)], !0)], 512), [[c, g.value]])])]),
88
+ _: 3
89
+ }, 8, [
90
+ "modelValue",
91
+ "type",
92
+ "label",
93
+ "required",
94
+ "disabled",
95
+ "error",
96
+ "autocompleteOff"
97
+ ]));
98
+ }
99
+ }, [["__scopeId", "data-v-d018c024"]]);
100
+ export { p as default };
@@ -1,6 +1,11 @@
1
1
  declare const component: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
2
- declare var __VLS_8: {};
3
- declare var __VLS_10: {};
2
+ declare function __VLS_template(): {
3
+ __VLS_Slots: {
4
+ iconEyeOff?: (props: {}) => any;
5
+ } & {
6
+ iconEyeOn?: (props: {}) => any;
7
+ };
8
+ };
4
9
  declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
10
  modelValue: {
6
11
  type: StringConstructor;
@@ -0,0 +1,4 @@
1
+ export {}
2
+ import _default from './InputPhone.vue.js'
3
+ export default _default
4
+ export {}
@@ -0,0 +1 @@
1
+ export { t as default } from "../../InputPhone-CTq4y49q.js";
@@ -0,0 +1,4 @@
1
+ export {}
2
+ import _default from './Select.vue.js'
3
+ export default _default
4
+ export {}
@@ -0,0 +1,76 @@
1
+ import { t as e } from "../../_plugin-vue_export-helper-Djzt4Yr7.js";
2
+ import { Fragment as t, computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, normalizeClass as o, openBlock as s, ref as c, renderList as l, renderSlot as u, toDisplayString as d, vModelSelect as f, withDirectives as p, withModifiers as m } from "vue";
3
+ import '../../Select.css';// src/ui/form/Select.vue
4
+ var h = ["required", "disabled"], g = ["value", "disabled"], _ = {
5
+ key: 0,
6
+ class: "label"
7
+ }, v = {
8
+ key: 1,
9
+ class: "error"
10
+ }, y = /*#__PURE__*/ e({
11
+ __name: "Select",
12
+ props: {
13
+ modelValue: {
14
+ type: String,
15
+ default: ""
16
+ },
17
+ label: {
18
+ type: String,
19
+ default: ""
20
+ },
21
+ required: {
22
+ type: Boolean,
23
+ default: !1
24
+ },
25
+ disabled: {
26
+ type: Boolean,
27
+ default: !1
28
+ },
29
+ error: {
30
+ type: String,
31
+ default: ""
32
+ },
33
+ options: {
34
+ type: Array,
35
+ default: () => []
36
+ }
37
+ },
38
+ emits: ["update:modelValue"],
39
+ setup(e, { expose: y, emit: b }) {
40
+ let x = e, S = b, C = c(null), w = c(""), T = n(() => [{
41
+ "select-label": x.label,
42
+ "select-error": x.error || w.value,
43
+ "select-disabled": x.disabled
44
+ }]), E = () => {
45
+ w.value = C.value?.validationMessage ?? "";
46
+ }, D = n({
47
+ get: () => x.modelValue,
48
+ set: (e) => {
49
+ S("update:modelValue", e), w.value = "";
50
+ }
51
+ });
52
+ return y({
53
+ focus: () => C.value?.focus(),
54
+ blur: () => C.value?.blur()
55
+ }), (n, c) => (s(), i("div", { class: o(["select", T.value]) }, [
56
+ u(n.$slots, "before", {}, void 0, !0),
57
+ p(a("select", {
58
+ ref_key: "select",
59
+ ref: C,
60
+ "onUpdate:modelValue": c[0] ||= (e) => D.value = e,
61
+ required: e.required,
62
+ disabled: e.disabled,
63
+ onInvalid: m(E, ["prevent"]),
64
+ onInput: E
65
+ }, [(s(!0), i(t, null, l(e.options, (e) => (s(), i("option", {
66
+ key: e.value,
67
+ value: e.value,
68
+ disabled: e.disabled
69
+ }, d(e.title), 9, g))), 128)), u(n.$slots, "options", {}, void 0, !0)], 40, h), [[f, D.value]]),
70
+ e.label ? (s(), i("div", _, d(e.label), 1)) : r("", !0),
71
+ e.error || w.value ? (s(), i("div", v, d(e.error || w.value), 1)) : r("", !0),
72
+ u(n.$slots, "after", {}, void 0, !0)
73
+ ], 2));
74
+ }
75
+ }, [["__scopeId", "data-v-60f9f346"]]);
76
+ export { y as default };
@@ -1,7 +1,13 @@
1
1
  declare const component: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
2
- declare var __VLS_1: {};
3
- declare var __VLS_4: {};
4
- declare var __VLS_6: {};
2
+ declare function __VLS_template(): {
3
+ __VLS_Slots: {
4
+ before?: (props: {}) => any;
5
+ } & {
6
+ options?: (props: {}) => any;
7
+ } & {
8
+ after?: (props: {}) => any;
9
+ };
10
+ };
5
11
  declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
6
12
  modelValue: {
7
13
  type: StringConstructor;
@@ -0,0 +1,4 @@
1
+ export {}
2
+ import _default from './Error.vue.js'
3
+ export default _default
4
+ export {}
@@ -0,0 +1,84 @@
1
+ import e from "../btn/Btn.js";
2
+ import { t } from "../../_plugin-vue_export-helper-Djzt4Yr7.js";
3
+ import { createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, createVNode as o, onBeforeUnmount as s, onMounted as c, openBlock as l, renderSlot as u, toDisplayString as d, unref as f, useSlots as p, withCtx as m } from "vue";
4
+ import '../../Error.css';// src/ui/notice/Error.vue
5
+ var h = { class: "error" }, g = { class: "error-item" }, _ = { class: "error-icon" }, v = { class: "error-text" }, y = {
6
+ key: 0,
7
+ class: "error-title"
8
+ }, b = { key: 0 }, x = {
9
+ key: 1,
10
+ class: "error-title"
11
+ }, S = ["innerHTML"], C = {
12
+ key: 3,
13
+ class: "error-content"
14
+ }, w = {
15
+ key: 0,
16
+ class: "error-actions"
17
+ }, T = /*#__PURE__*/ t({
18
+ __name: "Error",
19
+ props: {
20
+ title: {
21
+ type: String,
22
+ default: "Ошибка"
23
+ },
24
+ content: {
25
+ type: String,
26
+ default: ""
27
+ },
28
+ cancelAction: {
29
+ type: Boolean,
30
+ default: !1
31
+ },
32
+ cancelText: {
33
+ type: String,
34
+ default: "Отменить"
35
+ },
36
+ cancelVariant: {
37
+ type: String,
38
+ default: "gray",
39
+ validator: (e) => [
40
+ "outline",
41
+ "gray",
42
+ "red",
43
+ "green"
44
+ ].includes(e)
45
+ }
46
+ },
47
+ emits: ["confirm", "cancel"],
48
+ setup(t, { emit: T }) {
49
+ let E = p(), D = t, O = T, k = (e) => {
50
+ e.key === "Enter" && (e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation(), O("confirm"));
51
+ };
52
+ return c(() => {
53
+ D.cancelAction && document.addEventListener("keydown", k);
54
+ }), s(() => {
55
+ D.cancelAction && document.removeEventListener("keydown", k);
56
+ }), (s, c) => (l(), r("div", h, [i("div", g, [i("div", _, [u(s.$slots, "icon", {}, () => [c[1] ||= i("svg", {
57
+ xmlns: "http://www.w3.org/2000/svg",
58
+ width: "24",
59
+ height: "24",
60
+ viewBox: "0 0 24 24",
61
+ fill: "none",
62
+ stroke: "currentColor",
63
+ "stroke-width": "2",
64
+ "stroke-linecap": "round",
65
+ "stroke-linejoin": "round",
66
+ class: "icon icon-error icon-stroke"
67
+ }, [
68
+ i("path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" }),
69
+ i("path", { d: "M12 9v4" }),
70
+ i("path", { d: "M12 16v.01" })
71
+ ], -1)], !0)]), i("div", v, [t.title ? (l(), r("div", y, [a(d(t.title), 1), t.content ? (l(), r("span", b, ":")) : n("", !0)])) : f(E).title ? (l(), r("div", x, [u(s.$slots, "title", {}, void 0, !0)])) : n("", !0), t.content ? (l(), r("div", {
72
+ key: 2,
73
+ class: "error-content",
74
+ innerHTML: t.content
75
+ }, null, 8, S)) : f(E).content ? (l(), r("div", C, [u(s.$slots, "content", {}, void 0, !0)])) : n("", !0)])]), t.cancelAction ? (l(), r("div", w, [o(e, {
76
+ variant: t.cancelVariant,
77
+ onClick: c[0] ||= (e) => O("cancel")
78
+ }, {
79
+ default: m(() => [a(d(t.cancelText), 1)]),
80
+ _: 1
81
+ }, 8, ["variant"])])) : n("", !0)]));
82
+ }
83
+ }, [["__scopeId", "data-v-a63387e8"]]);
84
+ export { T as default };
@@ -1,7 +1,13 @@
1
1
  declare const component: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
2
- declare var __VLS_1: {};
3
- declare var __VLS_3: {};
4
- declare var __VLS_5: {};
2
+ declare function __VLS_template(): {
3
+ __VLS_Slots: {
4
+ icon?: (props: {}) => any;
5
+ } & {
6
+ title?: (props: {}) => any;
7
+ } & {
8
+ content?: (props: {}) => any;
9
+ };
10
+ };
5
11
  declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
6
12
  title: {
7
13
  type: StringConstructor;
@@ -0,0 +1,4 @@
1
+ export {}
2
+ import _default from './Success.vue.js'
3
+ export default _default
4
+ export {}
@@ -0,0 +1,70 @@
1
+ import e from "../btn/Btn.js";
2
+ import { t } from "../../_plugin-vue_export-helper-Djzt4Yr7.js";
3
+ import { createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, createVNode as o, onBeforeUnmount as s, onMounted as c, openBlock as l, renderSlot as u, toDisplayString as d, unref as f, useSlots as p, withCtx as m } from "vue";
4
+ import '../../Success.css';// src/ui/notice/Success.vue
5
+ var h = { class: "success" }, g = { class: "success-item" }, _ = { class: "success-icon" }, v = ["innerHTML"], y = {
6
+ key: 1,
7
+ class: "success-text"
8
+ }, b = {
9
+ key: 0,
10
+ class: "success-actions"
11
+ }, x = /*#__PURE__*/ t({
12
+ __name: "Success",
13
+ props: {
14
+ content: {
15
+ type: String,
16
+ default: ""
17
+ },
18
+ cancelAction: {
19
+ type: Boolean,
20
+ default: !1
21
+ },
22
+ cancelText: {
23
+ type: String,
24
+ default: "Отменить"
25
+ },
26
+ cancelVariant: {
27
+ type: String,
28
+ default: "gray",
29
+ validator: (e) => [
30
+ "outline",
31
+ "gray",
32
+ "red",
33
+ "green"
34
+ ].includes(e)
35
+ }
36
+ },
37
+ emits: ["confirm", "cancel"],
38
+ setup(t, { emit: x }) {
39
+ let S = p(), C = t, w = x, T = (e) => {
40
+ e.key === "Enter" && (e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation(), w("confirm"));
41
+ };
42
+ return c(() => {
43
+ C.cancelAction && document.addEventListener("keydown", T);
44
+ }), s(() => {
45
+ C.cancelAction && document.removeEventListener("keydown", T);
46
+ }), (s, c) => (l(), r("div", h, [i("div", g, [i("div", _, [u(s.$slots, "icon", {}, () => [c[1] ||= i("svg", {
47
+ xmlns: "http://www.w3.org/2000/svg",
48
+ width: "24",
49
+ height: "24",
50
+ viewBox: "0 0 24 24",
51
+ fill: "none",
52
+ stroke: "currentColor",
53
+ "stroke-width": "2",
54
+ "stroke-linecap": "round",
55
+ "stroke-linejoin": "round",
56
+ class: "icon icon-success icon-stroke"
57
+ }, [i("path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" }), i("path", { d: "M9 12l2 2l4 -4" })], -1)], !0)]), t.content ? (l(), r("div", {
58
+ key: 0,
59
+ class: "success-text",
60
+ innerHTML: t.content
61
+ }, null, 8, v)) : f(S).content ? (l(), r("div", y, [u(s.$slots, "content", {}, void 0, !0)])) : n("", !0)]), t.cancelAction ? (l(), r("div", b, [o(e, {
62
+ variant: t.cancelVariant,
63
+ onClick: c[0] ||= (e) => w("cancel")
64
+ }, {
65
+ default: m(() => [a(d(t.cancelText), 1)]),
66
+ _: 1
67
+ }, 8, ["variant"])])) : n("", !0)]));
68
+ }
69
+ }, [["__scopeId", "data-v-4a83407c"]]);
70
+ export { x as default };
@@ -1,6 +1,11 @@
1
1
  declare const component: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
2
- declare var __VLS_1: {};
3
- declare var __VLS_3: {};
2
+ declare function __VLS_template(): {
3
+ __VLS_Slots: {
4
+ icon?: (props: {}) => any;
5
+ } & {
6
+ content?: (props: {}) => any;
7
+ };
8
+ };
4
9
  declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
10
  content: {
6
11
  type: StringConstructor;
@@ -0,0 +1,4 @@
1
+ export {}
2
+ import _default from './Warning.vue.js'
3
+ export default _default
4
+ export {}