@profitliga/ui 2.0.11 → 2.0.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.
@@ -1 +1 @@
1
- .sheet-trigger[data-v-252549aa]{display:contents}.sheet-layer[data-v-252549aa]{position:relative}.sheet-overlay[data-v-252549aa]{pointer-events:auto;cursor:pointer}.sheet-content[data-v-252549aa]{background-color:var(--theme-neutral-0);z-index:1002;border-radius:12px 12px 0 0;flex-direction:column;width:100%;max-height:calc(100vh - 40px);display:flex;position:fixed;bottom:0;left:0;right:0;overflow:visible;box-shadow:0 2px 5px #3a3a3a40}.sheet-content[data-state=open][data-v-252549aa]{animation:slideBottomIn var(--animation-duration) ease-in-out}.sheet-content[data-state=closed][data-v-252549aa]{animation:slideBottomOut var(--animation-duration) ease-in-out}.sheet-content__handle[data-v-252549aa]{cursor:grab;touch-action:none;flex-shrink:0;justify-content:center;align-items:flex-end;width:100%;height:24px;padding-bottom:12px;display:flex}.sheet-content__handle[data-v-252549aa]:active{cursor:grabbing}.sheet-content__handle-dot[data-v-252549aa]{background-color:var(--theme-neutral-icon-primary);border-radius:2px;width:48px;height:4px}.sheet-content__body[data-v-252549aa]{box-sizing:content-box;scrollbar-width:thin;scrollbar-color:var(--theme-neutral-icon-primary) var(--theme-neutral-surface-icon);flex:auto;width:100%;min-height:0;overflow-y:auto}.sheet-content__body[data-v-252549aa]::-webkit-scrollbar{width:8px;height:0}.sheet-content__body[data-v-252549aa]::-webkit-scrollbar-thumb{background-color:var(--theme-neutral-icon-primary);background-clip:padding-box;border:1px solid #0000;border-radius:999px}.sheet-content__body[data-v-252549aa]::-webkit-scrollbar-track{background:var(--theme-neutral-surface-icon);border-radius:4px}.sheet-content__body[data-v-252549aa]::-webkit-scrollbar-corner{background:0 0}.sheet-overlay--drag-closing[data-v-252549aa]{visibility:hidden}
1
+ .sheet-trigger[data-v-0ccbb8c3]{display:contents}.sheet-layer[data-v-0ccbb8c3]{position:relative}.sheet-overlay[data-v-0ccbb8c3]{pointer-events:auto;cursor:pointer}.sheet-content[data-v-0ccbb8c3]{background-color:var(--theme-neutral-0);z-index:1002;border-radius:12px 12px 0 0;flex-direction:column;width:100%;max-height:calc(100vh - 40px);display:flex;position:fixed;bottom:0;left:0;right:0;overflow:visible;box-shadow:0 2px 5px #3a3a3a40}.sheet-content[data-state=open][data-v-0ccbb8c3]{animation:slideBottomIn var(--animation-duration) ease-in-out}.sheet-content[data-state=closed][data-v-0ccbb8c3]{animation:slideBottomOut var(--animation-duration) ease-in-out}.sheet-content__handle[data-v-0ccbb8c3]{cursor:grab;touch-action:none;flex-shrink:0;justify-content:center;align-items:flex-end;width:100%;height:24px;padding-bottom:12px;display:flex}.sheet-content__handle[data-v-0ccbb8c3]:active{cursor:grabbing}.sheet-content__handle-dot[data-v-0ccbb8c3]{background-color:var(--theme-neutral-icon-primary);border-radius:2px;width:48px;height:4px}.sheet-content__body[data-v-0ccbb8c3]{box-sizing:content-box;scrollbar-width:thin;scrollbar-color:var(--theme-neutral-icon-primary) var(--theme-neutral-surface-icon);flex:auto;width:100%;min-height:0;overflow-y:auto}.sheet-content__body[data-v-0ccbb8c3]::-webkit-scrollbar{width:8px;height:0}.sheet-content__body[data-v-0ccbb8c3]::-webkit-scrollbar-thumb{background-color:var(--theme-neutral-icon-primary);background-clip:padding-box;border:1px solid #0000;border-radius:999px}.sheet-content__body[data-v-0ccbb8c3]::-webkit-scrollbar-track{background:var(--theme-neutral-surface-icon);border-radius:4px}.sheet-content__body[data-v-0ccbb8c3]::-webkit-scrollbar-corner{background:0 0}.sheet-overlay--drag-closing[data-v-0ccbb8c3]{visibility:hidden}
@@ -2,7 +2,7 @@ import './BottomSheet.css';
2
2
  import o from "./BottomSheet.vue2.js";
3
3
  /* empty css */
4
4
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
5
- const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-252549aa"]]);
5
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0ccbb8c3"]]);
6
6
  export {
7
7
  e as default
8
8
  };
@@ -1,15 +1,15 @@
1
- import { defineComponent as F, useModel as K, useId as U, computed as k, ref as Z, useTemplateRef as w, watch as E, onBeforeUnmount as q, openBlock as m, createElementBlock as D, Fragment as H, mergeProps as u, unref as t, renderSlot as B, createCommentVNode as I, createBlock as Y, withCtx as j, createElementVNode as f, normalizeStyle as G, withModifiers as J, mergeModels as M, nextTick as Q } from "vue";
2
- import { onClickOutside as W } from "../../../utils/onClickOutside.util.js";
3
- import { useBodyScroll as X } from "../../../utils/useBodyScroll.util.js";
4
- import { useFocusTrap as _ } from "../../../utils/useFocusTrap.util.js";
5
- import { useSwipeToClose as ee } from "../../../utils/useSwipeToClose.util.js";
1
+ import { defineComponent as V, useModel as F, useId as K, computed as k, ref as Z, useTemplateRef as w, watch as E, onUnmounted as q, onBeforeUnmount as H, openBlock as p, createElementBlock as D, Fragment as Y, mergeProps as u, unref as t, renderSlot as B, createCommentVNode as I, createBlock as j, withCtx as G, createElementVNode as f, normalizeStyle as J, withModifiers as Q, mergeModels as M, nextTick as W } from "vue";
2
+ import { onClickOutside as X } from "../../../utils/onClickOutside.util.js";
3
+ import { useBodyScroll as _ } from "../../../utils/useBodyScroll.util.js";
4
+ import { useFocusTrap as ee } from "../../../utils/useFocusTrap.util.js";
5
+ import { useSwipeToClose as te } from "../../../utils/useSwipeToClose.util.js";
6
6
  import { ANIMATION_DURATION_MS as R } from "../shared/animation.const.js";
7
- import te from "../shared/Portal.vue.js";
8
- import { useDelayedVisibility as oe } from "../shared/useDelayedVisibility.util.js";
9
- import { useLayerZIndex as ae } from "../shared/useLayerZIndex.util.js";
10
- import { useTestId as ne } from "../shared/useTestId.util.js";
11
- import { useTriggerAria as le } from "../shared/useTriggerAria.util.js";
12
- const se = ["data-state"], re = ["aria-label", "aria-labelledby", "data-state"], ke = /* @__PURE__ */ F({
7
+ import oe from "../shared/Portal.vue.js";
8
+ import { useDelayedVisibility as ae } from "../shared/useDelayedVisibility.util.js";
9
+ import { useLayerZIndex as ne } from "../shared/useLayerZIndex.util.js";
10
+ import { useTestId as le } from "../shared/useTestId.util.js";
11
+ import { useTriggerAria as se } from "../shared/useTriggerAria.util.js";
12
+ const re = ["data-state"], ie = ["aria-label", "aria-labelledby", "data-state"], we = /* @__PURE__ */ V({
13
13
  inheritAttrs: !1,
14
14
  __name: "BottomSheet",
15
15
  props: /* @__PURE__ */ M({
@@ -25,43 +25,43 @@ const se = ["data-state"], re = ["aria-label", "aria-labelledby", "data-state"],
25
25
  }),
26
26
  emits: /* @__PURE__ */ M(["escapeKeyDown", "pointerDownOutside"], ["update:open"]),
27
27
  setup(l, { emit: x }) {
28
- const c = l, S = x, s = K(l, "open"), p = `sheet-content-${U()}`, r = ne(() => c.testId), $ = k(() => ({
28
+ const c = l, S = x, s = F(l, "open"), g = `sheet-content-${K()}`, r = le(() => c.testId), $ = k(() => ({
29
29
  "aria-haspopup": "dialog",
30
30
  "aria-expanded": s.value,
31
- "aria-controls": s.value ? p : void 0
31
+ "aria-controls": s.value ? g : void 0
32
32
  })), i = Z(!1), C = w("triggerRef"), v = w("contentRef"), O = w("layerRef");
33
- le({
33
+ se({
34
34
  host: () => C.value,
35
35
  isOpen: () => s.value,
36
- contentId: () => p,
36
+ contentId: () => g,
37
37
  hasPopup: () => "dialog"
38
38
  });
39
- const { lockScroll: P, unlockScroll: z } = X(), g = _(() => v.value), d = ae(), A = k(
39
+ const { lockScroll: P, unlockScroll: z } = _(), y = ee(() => v.value), d = ne(), A = k(
40
40
  () => c.zIndex === "auto" ? d.zIndex.value : c.zIndex
41
41
  );
42
- function y() {
42
+ function h() {
43
43
  s.value = !1;
44
44
  }
45
- const o = ee({
45
+ const o = te({
46
46
  onClose: () => {
47
- i.value = !0, y();
47
+ i.value = !0, h();
48
48
  }
49
49
  });
50
- function h(e) {
51
- e.key === "Escape" && (S("escapeKeyDown", e), e.defaultPrevented || y());
50
+ function b(e) {
51
+ e.key === "Escape" && (S("escapeKeyDown", e), e.defaultPrevented || h());
52
52
  }
53
53
  function N(e) {
54
- S("pointerDownOutside", e), !c.disableOutsidePointerEvents && !e.defaultPrevented && y();
54
+ S("pointerDownOutside", e), !c.disableOutsidePointerEvents && !e.defaultPrevented && h();
55
55
  }
56
- const { visible: L, dataState: T } = oe(
56
+ const { visible: L, dataState: T } = ae(
57
57
  s,
58
58
  () => i.value ? 0 : R,
59
59
  {
60
60
  onOpen: () => {
61
- i.value = !1, o.reset(), d.acquire(), P(), g.activate({ focusDelayMs: R }), document.addEventListener("keydown", h), Q(() => o.measureContentHeight(v.value));
61
+ i.value = !1, o.reset(), d.acquire(), P(), y.activate({ focusDelayMs: R }), document.addEventListener("keydown", b), W(() => o.measureContentHeight(v.value));
62
62
  },
63
63
  onCloseStart: () => {
64
- g.deactivate(), document.removeEventListener("keydown", h);
64
+ y.deactivate(), document.removeEventListener("keydown", b);
65
65
  },
66
66
  onCloseEnd: () => {
67
67
  z(), d.release();
@@ -69,21 +69,21 @@ const se = ["data-state"], re = ["aria-label", "aria-labelledby", "data-state"],
69
69
  }
70
70
  );
71
71
  E(O, (e) => d.registerElement(e));
72
- let b;
72
+ let m;
73
73
  E(v, (e) => {
74
- b?.(), b = e ? W(e, N, {
75
- ignore: () => d.elementsAbove()
76
- }) : void 0;
74
+ m?.(), m = e ? X(e, N, { ignore: () => d.elementsAbove() }) : void 0;
77
75
  }), q(() => {
78
- b?.(), document.removeEventListener("keydown", h), g.deactivate();
76
+ m?.();
77
+ }), H(() => {
78
+ m?.(), document.removeEventListener("keydown", b), y.deactivate();
79
79
  });
80
- const V = k(() => ({
80
+ const U = k(() => ({
81
81
  transform: o.dragOffset.value > 0 ? `translateY(${o.dragOffset.value}px)` : void 0,
82
82
  transition: o.isDragging.value ? "none" : "transform 0.2s ease-out",
83
83
  animation: i.value ? "none" : void 0
84
84
  }));
85
- return (e, a) => (m(), D(H, null, [
86
- e.$slots.trigger ? (m(), D("span", u({
85
+ return (e, a) => (p(), D(Y, null, [
86
+ e.$slots.trigger ? (p(), D("span", u({
87
87
  key: 0,
88
88
  ref_key: "triggerRef",
89
89
  ref: C,
@@ -93,20 +93,20 @@ const se = ["data-state"], re = ["aria-label", "aria-labelledby", "data-state"],
93
93
  }), [
94
94
  B(e.$slots, "trigger", { props: $.value }, void 0, !0)
95
95
  ], 16)) : I("", !0),
96
- t(L) ? (m(), Y(te, { key: 1 }, {
97
- default: j(() => [
96
+ t(L) ? (p(), j(oe, { key: 1 }, {
97
+ default: G(() => [
98
98
  f("div", {
99
99
  ref_key: "layerRef",
100
100
  ref: O,
101
101
  class: "sheet-layer",
102
- style: G({ zIndex: A.value })
102
+ style: J({ zIndex: A.value })
103
103
  }, [
104
104
  f("div", u({
105
105
  class: ["overlay sheet-overlay dialog-overlay", { "sheet-overlay--drag-closing": i.value }],
106
106
  "data-state": t(T)
107
- }, t(r)("overlay")), null, 16, se),
107
+ }, t(r)("overlay")), null, 16, re),
108
108
  f("div", u({
109
- id: p,
109
+ id: g,
110
110
  ref_key: "contentRef",
111
111
  ref: v,
112
112
  role: "dialog",
@@ -115,9 +115,9 @@ const se = ["data-state"], re = ["aria-label", "aria-labelledby", "data-state"],
115
115
  "aria-labelledby": l.labelledBy,
116
116
  class: "sheet-content",
117
117
  "data-state": t(T),
118
- style: V.value
118
+ style: U.value
119
119
  }, { ...e.$attrs, ...t(r)("content") }), [
120
- l.disableSwipeToClose ? I("", !0) : (m(), D("div", u({
120
+ l.disableSwipeToClose ? I("", !0) : (p(), D("div", u({
121
121
  key: 0,
122
122
  class: "sheet-content__handle",
123
123
  "aria-hidden": "true",
@@ -125,7 +125,7 @@ const se = ["data-state"], re = ["aria-label", "aria-labelledby", "data-state"],
125
125
  }, t(r)("handle"), {
126
126
  onTouchstart: a[1] || (a[1] = //@ts-ignore
127
127
  (...n) => t(o).handleDragStart && t(o).handleDragStart(...n)),
128
- onTouchmove: a[2] || (a[2] = J(
128
+ onTouchmove: a[2] || (a[2] = Q(
129
129
  //@ts-ignore
130
130
  (...n) => t(o).handleDragMove && t(o).handleDragMove(...n),
131
131
  ["prevent"]
@@ -140,7 +140,7 @@ const se = ["data-state"], re = ["aria-label", "aria-labelledby", "data-state"],
140
140
  f("div", u({ class: "sheet-content__body" }, t(r)("body")), [
141
141
  B(e.$slots, "default", {}, void 0, !0)
142
142
  ], 16)
143
- ], 16, re)
143
+ ], 16, ie)
144
144
  ], 4)
145
145
  ]),
146
146
  _: 3
@@ -149,5 +149,5 @@ const se = ["data-state"], re = ["aria-label", "aria-labelledby", "data-state"],
149
149
  }
150
150
  });
151
151
  export {
152
- ke as default
152
+ we as default
153
153
  };
@@ -1,36 +1,37 @@
1
- import { toValue as d, unref as g } from "vue";
2
- const s = /* @__PURE__ */ new WeakMap();
1
+ import { toValue as p, unref as g } from "vue";
2
+ const c = /* @__PURE__ */ new WeakMap();
3
3
  let i = 0;
4
4
  const E = 500;
5
- function m(n) {
6
- const o = g(n);
5
+ function m(r) {
6
+ const o = g(r);
7
7
  return o?.$el ?? o;
8
8
  }
9
- function y(n) {
10
- return typeof n == "string" ? document.querySelector(n) : m(n);
9
+ function C(r) {
10
+ return typeof r == "string" ? document.querySelector(r) : m(r);
11
11
  }
12
- function h(n, o, f = {}) {
13
- const r = y(n);
14
- if (!r) return () => {
12
+ function y(r, o, d = {}) {
13
+ const t = C(r);
14
+ if (!t) return () => {
15
15
  };
16
- const a = s.get(r);
17
- a && (a(), s.delete(r));
16
+ console.log("%c[onClickOutside] REGISTER", "color: lime", t);
17
+ const a = c.get(t);
18
+ a && (a(), c.delete(t));
18
19
  const u = (e) => {
19
20
  if (e.type === "touchstart")
20
21
  i = e.timeStamp;
21
22
  else if (i > 0 && e.timeStamp - i < E)
22
23
  return;
23
- const c = e.target instanceof Node ? e.target : null;
24
- if (!c) return;
25
- const p = (d(f.ignore) ?? []).map((t) => typeof t == "string" ? document.querySelector(t) : m(t)).filter((t) => t != null);
26
- r.contains(c) || p.some((t) => t.contains(c)) || (o(e), e.type === "touchstart" && e.cancelable && e.preventDefault());
24
+ const s = e.target instanceof Node ? e.target : null;
25
+ if (!s) return;
26
+ const f = (p(d.ignore) ?? []).map((n) => typeof n == "string" ? document.querySelector(n) : m(n)).filter((n) => n != null);
27
+ t.contains(s) || f.some((n) => n.contains(s)) || (o(e), e.type === "touchstart" && e.cancelable && e.preventDefault());
27
28
  };
28
29
  document.addEventListener("mousedown", u, { capture: !0 }), document.addEventListener("touchstart", u, { capture: !0, passive: !1 });
29
30
  const l = () => {
30
- document.removeEventListener("mousedown", u, { capture: !0 }), document.removeEventListener("touchstart", u, { capture: !0 }), s.delete(r);
31
+ console.log("%c[onClickOutside] CLEANUP", "color: red", t), document.removeEventListener("mousedown", u, { capture: !0 }), document.removeEventListener("touchstart", u, { capture: !0 }), c.delete(t);
31
32
  };
32
- return s.set(r, l), l;
33
+ return c.set(t, l), l;
33
34
  }
34
35
  export {
35
- h as onClickOutside
36
+ y as onClickOutside
36
37
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@profitliga/ui",
3
- "version": "2.0.11",
3
+ "version": "2.0.13",
4
4
  "author": "Profit League<dev@pr-lg.ru>",
5
5
  "license": "MIT",
6
6
  "description": "Vue 3 UI component library with TypeScript and SCSS",