ablok-components 0.3.59 → 0.3.60

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.
@@ -1,15 +1,11 @@
1
- import { defineComponent as L, ref as v, computed as m, useSlots as O, watch as f, openBlock as i, createBlock as N, TransitionGroup as x, withModifiers as _, normalizeClass as D, withCtx as C, createElementBlock as d, Fragment as V, renderList as M, createCommentVNode as p, createElementVNode as b, createVNode as A, renderSlot as $, createTextVNode as P, toDisplayString as j } from "vue";
1
+ import { defineComponent as L, ref as v, computed as m, useSlots as O, watch as f, openBlock as i, createBlock as N, TransitionGroup as C, withModifiers as V, normalizeClass as D, withCtx as M, createElementBlock as g, Fragment as _, renderList as x, createCommentVNode as p, createElementVNode as b, createVNode as A, renderSlot as k, createTextVNode as P, toDisplayString as j } from "vue";
2
2
  import { sanitizeHtml as z } from "../../../composables/useSanitize.js";
3
3
  import q from "../../atoms/svg-icon/svg-icon.vue.js";
4
4
  /* empty css */
5
- const F = ["onDragenter", "onDragover", "onDragleave", "onDragend", "onDrop", "innerHTML"], G = ["onDragstart", "onDrag", "onDragenter", "onDragover", "onDragleave", "onDragend", "onDrop"], J = {
5
+ const F = ["onDragenter", "onDragover", "onDragleave", "onDragend", "onDrop", "innerHTML"], G = ["draggable", "onDragstart", "onDrag", "onDragenter", "onDragover", "onDragleave", "onDragend", "onDrop"], J = {
6
6
  key: 0,
7
7
  class: "sortable-list__drag-handle"
8
- }, K = {
9
- type: "button",
10
- class: "btn",
11
- draggable: "true"
12
- }, Q = {
8
+ }, K = ["onDragstart", "onDrag"], Q = {
13
9
  key: 0,
14
10
  class: "sortable-list__item"
15
11
  }, ee = /* @__PURE__ */ L({
@@ -46,35 +42,35 @@ const F = ["onDragenter", "onDragover", "onDragleave", "onDragend", "onDrop", "i
46
42
  "update:dragIndex",
47
43
  "update:dragOverIndex"
48
44
  ],
49
- setup(n, { emit: k }) {
50
- const S = n, o = v(!1), l = v(null), s = v(null), g = k, c = m({
45
+ setup(n, { emit: H }) {
46
+ const S = n, o = v(!1), l = v(null), s = v(null), d = H, c = m({
51
47
  get() {
52
48
  return S.modelValue;
53
49
  },
54
50
  set(e) {
55
- g("update:modelValue", e);
51
+ d("update:modelValue", e);
56
52
  }
57
53
  }), B = m(() => {
58
54
  const e = document.querySelector(".is-drag-item")?.outerHTML;
59
55
  return e ? z(e) : "";
60
- }), E = O(), H = m(() => E["list-append"]);
61
- function I(e, a) {
56
+ }), E = O(), I = m(() => E["list-append"]);
57
+ function w(e, a) {
62
58
  e.dataTransfer && (e.dataTransfer.dropEffect = "move", e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("index", a.toLocaleString()), o.value = !0, l.value = a);
63
59
  }
64
- function w(e, a) {
60
+ function y(e, a) {
65
61
  o.value = !1, l.value = null, s.value = null;
66
62
  }
67
63
  function R(e, a) {
68
64
  }
69
- function y(e, a) {
65
+ function h(e, a) {
70
66
  s.value = l.value !== a ? a : null;
71
67
  }
72
- function h(e, a) {
68
+ function T(e, a) {
73
69
  s.value = l.value !== a ? a : null;
74
70
  }
75
71
  function U(e, a) {
76
72
  }
77
- function T(e, a) {
73
+ function $(e, a) {
78
74
  if (e.dataTransfer) {
79
75
  e.preventDefault();
80
76
  const u = Number(e.dataTransfer.getData("index")), r = a, t = [...c.value];
@@ -82,33 +78,33 @@ const F = ["onDragenter", "onDragover", "onDragleave", "onDragend", "onDrop", "i
82
78
  }
83
79
  }
84
80
  return f(() => o.value, (e) => {
85
- g("update:isDragging", e);
81
+ d("update:isDragging", e);
86
82
  }, { immediate: !0 }), f(() => l.value, (e) => {
87
- g("update:dragIndex", e);
83
+ d("update:dragIndex", e);
88
84
  }, { immediate: !0 }), f(() => s.value, (e) => {
89
- g("update:dragOverIndex", e);
90
- }, { immediate: !0 }), (e, a) => (i(), N(x, {
85
+ d("update:dragOverIndex", e);
86
+ }, { immediate: !0 }), (e, a) => (i(), N(C, {
91
87
  name: "list",
92
88
  tag: "ul",
93
89
  class: D(["sortable-list p-0 d-flex gap-2", {
94
90
  "flex-column": n.vertical,
95
91
  "flex-row flex-wrap": !n.vertical
96
92
  }]),
97
- onDragover: a[0] || (a[0] = _(() => {
93
+ onDragover: a[0] || (a[0] = V(() => {
98
94
  }, ["prevent"])),
99
- onDragenter: a[1] || (a[1] = _(() => {
95
+ onDragenter: a[1] || (a[1] = V(() => {
100
96
  }, ["prevent"]))
101
97
  }, {
102
- default: C(() => [
103
- (i(!0), d(V, null, M(c.value, (u, r) => (i(), d(V, { key: r }, [
104
- n.showPreview && o.value && s.value === r ? (i(), d("li", {
98
+ default: M(() => [
99
+ (i(!0), g(_, null, x(c.value, (u, r) => (i(), g(_, { key: r }, [
100
+ n.showPreview && o.value && s.value === r ? (i(), g("li", {
105
101
  key: 0,
106
102
  class: "sortable-list__item is-drop-target",
107
- onDragenter: (t) => y(t, r),
108
- onDragover: (t) => h(t, r),
103
+ onDragenter: (t) => h(t, r),
104
+ onDragover: (t) => T(t, r),
109
105
  onDragleave: (t) => void 0,
110
- onDragend: (t) => w(),
111
- onDrop: (t) => T(t, r),
106
+ onDragend: (t) => y(),
107
+ onDrop: (t) => $(t, r),
112
108
  innerHTML: B.value
113
109
  }, null, 40, F)) : p("", !0),
114
110
  b("li", {
@@ -117,26 +113,32 @@ const F = ["onDragenter", "onDragover", "onDragleave", "onDragend", "onDrop", "i
117
113
  "is-drop-target": o.value && s.value === r && !n.showPreview,
118
114
  "align-items-center gap-2": n.vertical
119
115
  }]),
120
- draggable: !0,
121
- onDragstart: (t) => I(t, r),
116
+ draggable: !n.showDragHandle,
117
+ onDragstart: (t) => w(t, r),
122
118
  onDrag: (t) => void 0,
123
- onDragenter: (t) => y(t, r),
124
- onDragover: (t) => h(t, r),
119
+ onDragenter: (t) => h(t, r),
120
+ onDragover: (t) => T(t, r),
125
121
  onDragleave: (t) => void 0,
126
- onDragend: (t) => w(),
127
- onDrop: (t) => T(t, r)
122
+ onDragend: (t) => y(),
123
+ onDrop: (t) => $(t, r)
128
124
  }, [
129
- n.showDragHandle ? (i(), d("div", J, [
130
- b("button", K, [
125
+ n.showDragHandle ? (i(), g("div", J, [
126
+ b("button", {
127
+ type: "button",
128
+ class: "btn",
129
+ draggable: "true",
130
+ onDragstart: (t) => w(t, r),
131
+ onDrag: (t) => void 0
132
+ }, [
131
133
  A(q, { symbol: "drag" })
132
- ])
134
+ ], 40, K)
133
135
  ])) : p("", !0),
134
136
  b("div", {
135
137
  class: D(["sortable-list__item-content", {
136
138
  "flex-grow-1": n.vertical
137
139
  }])
138
140
  }, [
139
- $(e.$slots, "list-item", {
141
+ k(e.$slots, "list-item", {
140
142
  item: u,
141
143
  index: r
142
144
  }, () => [
@@ -145,8 +147,8 @@ const F = ["onDragenter", "onDragover", "onDragleave", "onDragend", "onDrop", "i
145
147
  ], 2)
146
148
  ], 42, G)
147
149
  ], 64))), 128)),
148
- H.value ? (i(), d("li", Q, [
149
- $(e.$slots, "list-append")
150
+ I.value ? (i(), g("li", Q, [
151
+ k(e.$slots, "list-append")
150
152
  ])) : p("", !0)
151
153
  ]),
152
154
  _: 3
@@ -82,4 +82,13 @@
82
82
  <path d="M7.56 6.748c-0.296 0.108-0.56 0.331-0.723 0.607-0.123 0.208-0.144 0.305-0.143 0.645 0 0.283 0.029 0.455 0.099 0.587 0.053 0.103 1.721 1.813 3.705 3.8l3.607 3.613-3.607 3.613c-1.984 1.987-3.652 3.697-3.705 3.8-0.069 0.132-0.099 0.304-0.099 0.587-0.001 0.344 0.020 0.436 0.149 0.656 0.173 0.296 0.492 0.545 0.804 0.631 0.269 0.072 0.707 0.032 0.945-0.088 0.099-0.049 1.807-1.713 3.793-3.697l3.613-3.607 3.613 3.607c1.987 1.984 3.697 3.652 3.8 3.705 0.132 0.069 0.304 0.099 0.587 0.099 0.344 0.001 0.436-0.020 0.656-0.149 0.296-0.173 0.545-0.492 0.631-0.804 0.072-0.269 0.032-0.707-0.088-0.945-0.049-0.099-1.713-1.807-3.697-3.793l-3.607-3.613 3.607-3.613c1.984-1.987 3.652-3.697 3.705-3.8 0.069-0.132 0.099-0.304 0.099-0.587 0.001-0.34-0.020-0.437-0.143-0.645-0.234-0.41-0.668-0.681-1.165-0.681-0.163 0-0.319 0.029-0.464 0.083l0.009-0.003c-0.239 0.080-0.596 0.42-3.903 3.719l-3.64 3.632-3.64-3.632c-3.307-3.299-3.664-3.639-3.903-3.719-0.136-0.050-0.293-0.079-0.456-0.079-0.158 0-0.31 0.027-0.451 0.077l0.009-0.003z"></path>
83
83
  </symbol>
84
84
  </defs>
85
+ <symbol id="icon-maximize-2" viewBox="0 0 32 32">
86
+ <path d="M23.625 2.665c2.244-0.015 4.205-0.033 4.357-0.040 0.291-0.013 0.639 0.105 0.937 0.317 0.193 0.137 0.468 0.711 0.463 0.963-0.003 0.096-0.020 2.071-0.040 4.388l-0.036 4.213-0.133 0.237c-0.241 0.432-0.665 0.619-1.312 0.577-0.612-0.039-0.997-0.321-1.14-0.835-0.033-0.117-0.055-1.193-0.055-2.725v-2.533l-3.64 3.635c-2.552 2.548-3.711 3.668-3.876 3.752-0.471 0.235-0.956 0.116-1.419-0.347s-0.581-0.948-0.347-1.419c0.084-0.165 1.204-1.324 3.752-3.876l3.635-3.64h-2.533c-1.532 0-2.608-0.021-2.725-0.055-0.513-0.143-0.796-0.528-0.835-1.14-0.041-0.664 0.147-1.076 0.6-1.309l0.265-0.136 4.081-0.028zM12.827 17.395c0.463-0.239 0.988-0.116 1.441 0.337 0.463 0.463 0.581 0.948 0.347 1.419-0.084 0.165-1.204 1.324-3.752 3.876l-3.635 3.64h2.511c2.676 0 2.809 0.011 3.165 0.265 0.295 0.209 0.4 0.491 0.4 1.068 0 0.672-0.137 0.953-0.584 1.192-0.211 0.113-0.255 0.115-4.427 0.151-2.317 0.019-4.292 0.037-4.388 0.040-0.203 0.004-0.797-0.252-0.929-0.403-0.148-0.167-0.364-0.703-0.359-0.888 0.003-0.095 0.021-2.068 0.040-4.385l0.036-4.213 0.119-0.223c0.269-0.503 1.004-0.735 1.683-0.531 0.335 0.101 0.552 0.268 0.693 0.531 0.117 0.22 0.119 0.249 0.135 2.86l0.016 2.636 3.637-3.631c2.229-2.227 3.72-3.673 3.851-3.741z"></path>
87
+ </symbol>
88
+ <symbol id="icon-maximize" viewBox="0 0 32 32">
89
+ <path d="M5.999 2.724c0.147-0.024 1.315-0.048 2.593-0.051 2.479-0.007 2.624 0.005 2.979 0.259 0.293 0.208 0.4 0.491 0.401 1.068 0.001 0.443-0.016 0.536-0.132 0.744-0.147 0.263-0.392 0.453-0.687 0.535-0.115 0.032-1.089 0.055-2.411 0.055-2.525 0-2.601 0.009-2.981 0.377-0.411 0.399-0.399 0.315-0.428 3.036l-0.027 2.427-0.133 0.237c-0.241 0.432-0.665 0.619-1.312 0.577-0.62-0.040-1.003-0.324-1.145-0.853-0.037-0.139-0.049-1.064-0.037-2.725 0.019-2.461 0.021-2.524 0.141-2.889 0.489-1.481 1.703-2.548 3.179-2.796zM20.819 2.741c0.173-0.056 0.756-0.068 2.728-0.057 2.504 0.013 2.507 0.013 2.935 0.147 1.288 0.4 2.293 1.411 2.7 2.716 0.124 0.396 0.125 0.423 0.125 3.013v2.613l-0.133 0.237c-0.241 0.432-0.665 0.619-1.312 0.577-0.612-0.039-0.997-0.321-1.14-0.835-0.032-0.115-0.055-1.089-0.055-2.411 0-2.559-0.007-2.608-0.404-3.005s-0.447-0.404-3.005-0.404c-1.321 0-2.296-0.023-2.411-0.055-0.295-0.081-0.54-0.272-0.687-0.535-0.116-0.207-0.133-0.303-0.133-0.744 0-0.421 0.020-0.544 0.119-0.729 0.137-0.255 0.356-0.428 0.673-0.529zM3.485 20.076c0.457-0.143 1.067-0.063 1.419 0.189 0.091 0.064 0.219 0.217 0.284 0.339 0.116 0.219 0.119 0.268 0.145 2.649 0.020 1.769 0.045 2.468 0.093 2.577 0.117 0.264 0.343 0.517 0.595 0.665l0.245 0.144 2.427 0.027c1.787 0.021 2.467 0.045 2.58 0.095 0.528 0.232 0.696 0.531 0.699 1.239 0.001 0.443-0.016 0.536-0.132 0.744-0.151 0.268-0.396 0.456-0.705 0.54-0.139 0.037-1.064 0.049-2.725 0.037-2.461-0.019-2.524-0.021-2.889-0.141-1.315-0.435-2.295-1.425-2.701-2.727-0.124-0.396-0.125-0.423-0.125-3.013 0-2.6 0-2.615 0.119-2.836 0.137-0.256 0.357-0.429 0.673-0.528zM27.485 20.076c0.457-0.143 1.067-0.063 1.419 0.189 0.091 0.064 0.219 0.217 0.284 0.339 0.119 0.221 0.119 0.236 0.119 2.836 0 2.591-0.001 2.617-0.125 3.013-0.407 1.301-1.387 2.292-2.701 2.727-0.365 0.12-0.428 0.123-2.889 0.141-1.661 0.012-2.587 0-2.725-0.037-0.529-0.143-0.813-0.525-0.853-1.145-0.041-0.664 0.147-1.076 0.6-1.309l0.265-0.136 4.856-0.053 0.245-0.144c0.252-0.148 0.477-0.401 0.593-0.665 0.048-0.109 0.075-0.816 0.095-2.577 0.027-2.381 0.029-2.431 0.145-2.649 0.137-0.256 0.357-0.429 0.673-0.528z"></path>
90
+ </symbol>
91
+ <symbol id="icon-close" viewBox="0 0 32 32">
92
+ <path d="M7.501 6.727c-0.275 0.145-0.64 0.517-0.784 0.799-0.152 0.297-0.152 0.651 0.001 0.959 0.084 0.165 1.204 1.324 3.752 3.876l3.635 3.64-3.635 3.64c-2.548 2.552-3.668 3.711-3.752 3.876-0.235 0.471-0.116 0.956 0.347 1.419s0.948 0.581 1.419 0.347c0.165-0.084 1.324-1.204 3.876-3.752l3.64-3.635 3.64 3.635c2.552 2.548 3.711 3.668 3.876 3.752 0.471 0.235 0.956 0.116 1.419-0.347s0.581-0.948 0.347-1.419c-0.084-0.165-1.204-1.324-3.752-3.876l-3.635-3.64 3.635-3.64c2.548-2.552 3.668-3.711 3.752-3.876 0.235-0.471 0.116-0.956-0.347-1.419-0.453-0.453-0.961-0.575-1.431-0.34-0.149 0.075-1.427 1.313-3.864 3.745l-3.64 3.635-3.64-3.635c-2.437-2.432-3.715-3.671-3.864-3.745-0.293-0.147-0.716-0.145-0.995 0.001z"></path>
93
+ </symbol>
85
94
  </svg>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ablok-components",
3
3
  "private": false,
4
- "version": "0.3.59",
4
+ "version": "0.3.60",
5
5
  "dependencies": {
6
6
  "date-fns": "^3.0.0",
7
7
  "dompurify": "^3.3.1",