aptechka 0.5.40 → 0.5.42
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/lib/Animation-DDHjrbtL.cjs +1 -0
- package/lib/{Animation-AkD1vhRW.js → Animation-Dq_05jlR.js} +16 -16
- package/lib/{Damped-CH96byE8.js → Damped-P4MkCGoY.js} +4 -5
- package/lib/Damped-l0mnlhar.cjs +1 -0
- package/lib/{Tweened-DzckT3pw.js → Tweened-CwDC2zl8.js} +9 -10
- package/lib/Tweened-DIt9j9B-.cjs +1 -0
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/checkbox/index.cjs +1 -1
- package/lib/checkbox/index.js +29 -29
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +125 -114
- package/lib/en3/index.cjs +1 -1
- package/lib/en3/index.js +1 -1
- package/lib/{index-BAHHdcp3.js → index-BtsOv9u0.js} +85 -85
- package/lib/index-Buf76Qoq.cjs +9 -0
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +30 -30
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +1 -1
- package/lib/polyfills-BA-CL_HF.js +27 -0
- package/lib/polyfills-DHs2SNbz.cjs +1 -0
- package/lib/scroll/ScrollElement.d.ts +16 -5
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +538 -494
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.d.ts +9 -84
- package/lib/theme/index.js +12 -27
- package/lib/tweaker/index.cjs +6 -6
- package/lib/tweaker/index.js +207 -199
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +26 -27
- package/package.json +1 -1
- package/lib/Animation-BIRIzLIL.cjs +0 -1
- package/lib/Damped-3daHRLIW.cjs +0 -1
- package/lib/Tweened-Bv9mgPvl.cjs +0 -1
- package/lib/index-D2XtQX56.cjs +0 -9
- package/lib/number-Bo5RdrA1.js +0 -23
- package/lib/number-yVpzMdbQ.cjs +0 -1
- package/lib/polyfills-CrcS4RcO.cjs +0 -1
- package/lib/polyfills-DJUYczFm.js +0 -6
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
var
|
|
1
|
+
var A = (e, t, s) => {
|
|
2
2
|
if (!t.has(e))
|
|
3
3
|
throw TypeError("Cannot " + s);
|
|
4
4
|
};
|
|
5
|
-
var H = (e, t, s) => (
|
|
5
|
+
var H = (e, t, s) => (A(e, t, "read from private field"), s ? s.call(e) : t.get(e)), I = (e, t, s) => {
|
|
6
6
|
if (t.has(e))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
8
|
t instanceof WeakSet ? t.add(e) : t.set(e, s);
|
|
9
|
-
},
|
|
10
|
-
import { CustomElement as
|
|
9
|
+
}, G = (e, t, s, i) => (A(e, t, "write to private field"), i ? i.call(e, s) : t.set(e, s), s);
|
|
10
|
+
import { CustomElement as U, define as b } from "./custom-element/index.js";
|
|
11
11
|
import "./Store-BQXXikps.js";
|
|
12
|
-
import { i as
|
|
13
|
-
import { d as
|
|
14
|
-
import { a as
|
|
15
|
-
import { e as
|
|
16
|
-
import { c as
|
|
17
|
-
import { aptechkaTheme as
|
|
12
|
+
import { i as P } from "./browser-0zX67oeU.js";
|
|
13
|
+
import { d as J } from "./events-_C2CztxR.js";
|
|
14
|
+
import { a as Q } from "./style-CklEF62D.js";
|
|
15
|
+
import { e as T, p as X, ay as w, D as R } from "./tags-CMPg9ETZ.js";
|
|
16
|
+
import { c as D } from "./createStylesheet-DBCEbDjI.js";
|
|
17
|
+
import { aptechkaTheme as j } from "./theme/index.js";
|
|
18
18
|
var ee = Object.defineProperty, te = Object.getOwnPropertyDescriptor, se = (e, t, s, i) => {
|
|
19
19
|
for (var a = i > 1 ? void 0 : i ? te(t, s) : t, r = e.length - 1, l; r >= 0; r--)
|
|
20
20
|
(l = e[r]) && (a = (i ? l(t, s, a) : l(a)) || a);
|
|
21
21
|
return i && a && ee(t, s, a), a;
|
|
22
|
-
},
|
|
22
|
+
}, z = (e, t, s) => {
|
|
23
23
|
if (!t.has(e))
|
|
24
24
|
throw TypeError("Cannot " + s);
|
|
25
|
-
}, n = (e, t, s) => (
|
|
25
|
+
}, n = (e, t, s) => (z(e, t, "read from private field"), s ? s.call(e) : t.get(e)), h = (e, t, s) => {
|
|
26
26
|
if (t.has(e))
|
|
27
27
|
throw TypeError("Cannot add the same private member more than once");
|
|
28
28
|
t instanceof WeakSet ? t.add(e) : t.set(e, s);
|
|
29
|
-
}, c = (e, t, s, i) => (
|
|
30
|
-
const ie =
|
|
29
|
+
}, c = (e, t, s, i) => (z(e, t, "write to private field"), i ? i.call(e, s) : t.set(e, s), s), q = (e, t, s) => (z(e, t, "access private method"), s), v, u, o, p, f, g, L, y, M;
|
|
30
|
+
const ie = D({
|
|
31
31
|
":host": {
|
|
32
32
|
position: "relative"
|
|
33
33
|
},
|
|
@@ -51,7 +51,7 @@ const ie = z({
|
|
|
51
51
|
left: "0",
|
|
52
52
|
width: "100%",
|
|
53
53
|
overflow: "hidden",
|
|
54
|
-
transitionDuration:
|
|
54
|
+
transitionDuration: "var(--duration, var(--duration-short))",
|
|
55
55
|
transitionProperty: "height",
|
|
56
56
|
cursor: "default"
|
|
57
57
|
},
|
|
@@ -62,27 +62,27 @@ const ie = z({
|
|
|
62
62
|
paddingTop: "var(--gap, 0px)"
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
|
-
let
|
|
65
|
+
let O = class extends U {
|
|
66
66
|
constructor() {
|
|
67
|
-
super(), h(this,
|
|
68
|
-
|
|
69
|
-
}),
|
|
67
|
+
super(), h(this, y), h(this, v, null), h(this, u, ""), h(this, o, null), h(this, p, !1), h(this, f, void 0), h(this, g, null), h(this, L, () => {
|
|
68
|
+
J(this);
|
|
69
|
+
}), P && (this.openShadow(ie), c(this, v, this.attachInternals()), c(this, g, new ResizeObserver(n(this, L))), T(this, {
|
|
70
70
|
children: [
|
|
71
|
-
|
|
71
|
+
X({
|
|
72
72
|
class: "head",
|
|
73
|
-
children:
|
|
73
|
+
children: w({ name: "head" }),
|
|
74
74
|
onClick: () => {
|
|
75
75
|
this.opened ? this.close() : this.open();
|
|
76
76
|
}
|
|
77
77
|
}),
|
|
78
|
-
|
|
78
|
+
R({
|
|
79
79
|
class: "body",
|
|
80
80
|
style: {
|
|
81
81
|
height: "0px"
|
|
82
82
|
},
|
|
83
|
-
children:
|
|
83
|
+
children: R({
|
|
84
84
|
class: "body-inner",
|
|
85
|
-
children:
|
|
85
|
+
children: w()
|
|
86
86
|
}),
|
|
87
87
|
ref: (e) => {
|
|
88
88
|
c(this, o, e);
|
|
@@ -110,13 +110,13 @@ let b = class extends V {
|
|
|
110
110
|
}
|
|
111
111
|
open() {
|
|
112
112
|
clearTimeout(n(this, f)), c(this, p, !0), n(this, o).style.display = "grid", this.classList.add("triggered"), setTimeout(() => {
|
|
113
|
-
this.classList.add("opened"), n(this, o).style.height = n(this, o).scrollHeight + "px",
|
|
113
|
+
this.classList.add("opened"), n(this, o).style.height = n(this, o).scrollHeight + "px", q(this, y, M).call(this);
|
|
114
114
|
}, 0);
|
|
115
115
|
}
|
|
116
116
|
close() {
|
|
117
|
-
c(this, p, !1), n(this, o).style.height = "0px", this.classList.remove("opened"),
|
|
117
|
+
c(this, p, !1), n(this, o).style.height = "0px", this.classList.remove("opened"), q(this, y, M).call(this), c(this, f, setTimeout(() => {
|
|
118
118
|
this.classList.remove("triggered"), n(this, o).style.display = "none";
|
|
119
|
-
},
|
|
119
|
+
}, Q(n(this, o))));
|
|
120
120
|
}
|
|
121
121
|
connectedCallback() {
|
|
122
122
|
n(this, g).observe(n(this, o));
|
|
@@ -131,9 +131,9 @@ o = /* @__PURE__ */ new WeakMap();
|
|
|
131
131
|
p = /* @__PURE__ */ new WeakMap();
|
|
132
132
|
f = /* @__PURE__ */ new WeakMap();
|
|
133
133
|
g = /* @__PURE__ */ new WeakMap();
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
L = /* @__PURE__ */ new WeakMap();
|
|
135
|
+
y = /* @__PURE__ */ new WeakSet();
|
|
136
|
+
M = function() {
|
|
137
137
|
this.dispatchEvent(
|
|
138
138
|
new CustomEvent("selectToggle", {
|
|
139
139
|
bubbles: !0,
|
|
@@ -144,81 +144,81 @@ W = function() {
|
|
|
144
144
|
})
|
|
145
145
|
);
|
|
146
146
|
};
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
],
|
|
151
|
-
var
|
|
152
|
-
class
|
|
147
|
+
O.formAssociated = !0;
|
|
148
|
+
O = se([
|
|
149
|
+
b("e-select")
|
|
150
|
+
], O);
|
|
151
|
+
var E;
|
|
152
|
+
class V extends U {
|
|
153
153
|
constructor() {
|
|
154
154
|
super(...arguments);
|
|
155
|
-
|
|
155
|
+
I(this, E, null);
|
|
156
156
|
}
|
|
157
157
|
get selectElement() {
|
|
158
|
-
return H(this,
|
|
158
|
+
return H(this, E);
|
|
159
159
|
}
|
|
160
160
|
connectedCallback() {
|
|
161
161
|
var i, a;
|
|
162
162
|
const s = (a = (i = this.assignedSlot) == null ? void 0 : i.getRootNode()) == null ? void 0 : a.host;
|
|
163
|
-
s ?
|
|
163
|
+
s ? G(this, E, s) : console.log(this, "e-select not found");
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
-
|
|
166
|
+
E = new WeakMap();
|
|
167
167
|
var ae = Object.defineProperty, ne = Object.getOwnPropertyDescriptor, re = (e, t, s, i) => {
|
|
168
168
|
for (var a = i > 1 ? void 0 : i ? ne(t, s) : t, r = e.length - 1, l; r >= 0; r--)
|
|
169
169
|
(l = e[r]) && (a = (i ? l(t, s, a) : l(a)) || a);
|
|
170
170
|
return i && a && ae(t, s, a), a;
|
|
171
|
-
},
|
|
171
|
+
}, Y = (e, t, s) => {
|
|
172
172
|
if (!t.has(e))
|
|
173
173
|
throw TypeError("Cannot " + s);
|
|
174
|
-
},
|
|
174
|
+
}, k = (e, t, s) => (Y(e, t, "read from private field"), s ? s.call(e) : t.get(e)), B = (e, t, s) => {
|
|
175
175
|
if (t.has(e))
|
|
176
176
|
throw TypeError("Cannot add the same private member more than once");
|
|
177
177
|
t instanceof WeakSet ? t.add(e) : t.set(e, s);
|
|
178
|
-
},
|
|
179
|
-
const le =
|
|
178
|
+
}, F = (e, t, s) => (Y(e, t, "access private method"), s), m, C, W;
|
|
179
|
+
const le = D({
|
|
180
180
|
":host": {
|
|
181
181
|
width: "100%",
|
|
182
|
-
height:
|
|
182
|
+
height: "40px",
|
|
183
183
|
display: "inline-flex",
|
|
184
184
|
alignItems: "center"
|
|
185
185
|
}
|
|
186
186
|
});
|
|
187
|
-
let
|
|
187
|
+
let K = class extends V {
|
|
188
188
|
constructor() {
|
|
189
|
-
super(),
|
|
189
|
+
super(), B(this, C), B(this, m, () => {
|
|
190
190
|
this.selectElement.value === this.value ? this.style.display = "none" : this.style.display = "";
|
|
191
|
-
}),
|
|
191
|
+
}), P && (this.openShadow(le), T(this, {
|
|
192
192
|
tabindex: 0,
|
|
193
193
|
onClick: () => {
|
|
194
|
-
|
|
194
|
+
F(this, C, W).call(this);
|
|
195
195
|
},
|
|
196
196
|
onKeydown: (e) => {
|
|
197
|
-
e.code === "Space" &&
|
|
197
|
+
e.code === "Space" && F(this, C, W).call(this);
|
|
198
198
|
},
|
|
199
|
-
children:
|
|
199
|
+
children: w()
|
|
200
200
|
}));
|
|
201
201
|
}
|
|
202
202
|
get value() {
|
|
203
203
|
return (this.hasAttribute("value") ? this.getAttribute("value") : this.innerText) || "";
|
|
204
204
|
}
|
|
205
205
|
connectedCallback() {
|
|
206
|
-
super.connectedCallback(), this.hasAttribute("default") && (this.selectElement.value || (this.selectElement.value = this.value)), this.selectElement.addEventListener("change",
|
|
207
|
-
|
|
206
|
+
super.connectedCallback(), this.hasAttribute("default") && (this.selectElement.value || (this.selectElement.value = this.value)), this.selectElement.addEventListener("change", k(this, m)), setTimeout(() => {
|
|
207
|
+
k(this, m).call(this);
|
|
208
208
|
});
|
|
209
209
|
}
|
|
210
210
|
disconnectedCallback() {
|
|
211
|
-
this.selectElement.removeEventListener("change",
|
|
211
|
+
this.selectElement.removeEventListener("change", k(this, m));
|
|
212
212
|
}
|
|
213
213
|
};
|
|
214
214
|
m = /* @__PURE__ */ new WeakMap();
|
|
215
|
-
|
|
216
|
-
|
|
215
|
+
C = /* @__PURE__ */ new WeakSet();
|
|
216
|
+
W = function() {
|
|
217
217
|
this.selectElement.value = this.value, this.selectElement.close();
|
|
218
218
|
};
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
],
|
|
219
|
+
K = re([
|
|
220
|
+
b("e-select-option")
|
|
221
|
+
], K);
|
|
222
222
|
const oe = `<svg
|
|
223
223
|
xmlns="http://www.w3.org/2000/svg"
|
|
224
224
|
width="32"
|
|
@@ -232,18 +232,18 @@ var he = Object.defineProperty, ce = Object.getOwnPropertyDescriptor, de = (e, t
|
|
|
232
232
|
for (var a = i > 1 ? void 0 : i ? ce(t, s) : t, r = e.length - 1, l; r >= 0; r--)
|
|
233
233
|
(l = e[r]) && (a = (i ? l(t, s, a) : l(a)) || a);
|
|
234
234
|
return i && a && he(t, s, a), a;
|
|
235
|
-
},
|
|
235
|
+
}, Z = (e, t, s) => {
|
|
236
236
|
if (!t.has(e))
|
|
237
237
|
throw TypeError("Cannot " + s);
|
|
238
|
-
}, d = (e, t, s) => (
|
|
238
|
+
}, d = (e, t, s) => (Z(e, t, "read from private field"), s ? s.call(e) : t.get(e)), $ = (e, t, s) => {
|
|
239
239
|
if (t.has(e))
|
|
240
240
|
throw TypeError("Cannot add the same private member more than once");
|
|
241
241
|
t instanceof WeakSet ? t.add(e) : t.set(e, s);
|
|
242
|
-
}, pe = (e, t, s, i) => (
|
|
243
|
-
const ve =
|
|
242
|
+
}, pe = (e, t, s, i) => (Z(e, t, "write to private field"), i ? i.call(e, s) : t.set(e, s), s), S, _, x;
|
|
243
|
+
const ve = D({
|
|
244
244
|
":host": {
|
|
245
245
|
width: "100%",
|
|
246
|
-
height:
|
|
246
|
+
height: "40px",
|
|
247
247
|
display: "inline-flex",
|
|
248
248
|
alignItems: "center",
|
|
249
249
|
justifyContent: "space-between"
|
|
@@ -252,50 +252,50 @@ const ve = z({
|
|
|
252
252
|
flexShrink: "0",
|
|
253
253
|
width: "var(--arrow-size, 1em)",
|
|
254
254
|
height: "var(--arrow-size, 1em)",
|
|
255
|
-
fill: `var(--arrow-color, ${
|
|
255
|
+
fill: `var(--arrow-color, ${j.colorMain.var})`,
|
|
256
256
|
transitionProperty: "transform",
|
|
257
|
-
transitionDuration:
|
|
257
|
+
transitionDuration: "var(--duration, var(--duration-short))"
|
|
258
258
|
},
|
|
259
259
|
":host(.opened) .default-arrow": {
|
|
260
260
|
transform: "scaleY(-1)"
|
|
261
261
|
}
|
|
262
262
|
});
|
|
263
|
-
let
|
|
263
|
+
let N = class extends V {
|
|
264
264
|
constructor() {
|
|
265
|
-
super(),
|
|
265
|
+
super(), $(this, S, null), $(this, _, () => {
|
|
266
266
|
const t = this.selectElement.shadowRoot.querySelector(
|
|
267
267
|
".body slot"
|
|
268
268
|
).assignedElements().find((s) => s.value === this.selectElement.value);
|
|
269
|
-
t && (d(this,
|
|
270
|
-
}),
|
|
269
|
+
t && (d(this, S).innerHTML = t.innerHTML);
|
|
270
|
+
}), $(this, x, () => {
|
|
271
271
|
this.classList.toggle("opened", this.selectElement.opened);
|
|
272
|
-
}),
|
|
272
|
+
}), P && (this.openShadow(ve), T(this, {
|
|
273
273
|
children: [
|
|
274
|
-
|
|
275
|
-
|
|
274
|
+
w(),
|
|
275
|
+
w({
|
|
276
276
|
name: "arrow",
|
|
277
|
-
children:
|
|
277
|
+
children: T(oe, { class: "default-arrow" })
|
|
278
278
|
})
|
|
279
279
|
]
|
|
280
280
|
}), this.slot = "head");
|
|
281
281
|
}
|
|
282
282
|
connectedCallback() {
|
|
283
|
-
super.connectedCallback(), pe(this,
|
|
283
|
+
super.connectedCallback(), pe(this, S, this.querySelector("[data-value-holder]") || this), this.selectElement.addEventListener("change", d(this, _)), d(this, _).call(this), this.selectElement.addEventListener("selectToggle", d(this, x));
|
|
284
284
|
}
|
|
285
285
|
disconnectedCallback() {
|
|
286
|
-
this.selectElement.removeEventListener("change", d(this, _)), this.selectElement.removeEventListener("selectToggle", d(this,
|
|
286
|
+
this.selectElement.removeEventListener("change", d(this, _)), this.selectElement.removeEventListener("selectToggle", d(this, x));
|
|
287
287
|
}
|
|
288
288
|
};
|
|
289
|
-
|
|
289
|
+
S = /* @__PURE__ */ new WeakMap();
|
|
290
290
|
_ = /* @__PURE__ */ new WeakMap();
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
],
|
|
291
|
+
x = /* @__PURE__ */ new WeakMap();
|
|
292
|
+
N = de([
|
|
293
|
+
b("e-select-head")
|
|
294
|
+
], N);
|
|
295
295
|
export {
|
|
296
|
-
|
|
296
|
+
O as S,
|
|
297
297
|
oe as a,
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
298
|
+
V as b,
|
|
299
|
+
K as c,
|
|
300
|
+
N as d
|
|
301
301
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";var D=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)};var z=(t,e,s)=>(D(t,e,"read from private field"),s?s.call(t):e.get(t)),A=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},H=(t,e,s,i)=>(D(t,e,"write to private field"),i?i.call(t,s):e.set(t,s),s);const y=require("./custom-element/index.cjs");require("./Store-C-1ruEIm.cjs");const W=require("./browser-CpzFX2xg.cjs"),K=require("./events-Crwi8fz6.cjs"),N=require("./style-At6aDoqG.cjs"),a=require("./tags-Djb6mb1o.cjs"),b=require("./createStylesheet-CqHU9_qv.cjs"),V=require("./theme/index.cjs");var Y=Object.defineProperty,Z=Object.getOwnPropertyDescriptor,J=(t,e,s,i)=>{for(var n=i>1?void 0:i?Z(e,s):e,l=t.length-1,o;l>=0;l--)(o=t[l])&&(n=(i?o(e,s,n):o(n))||n);return i&&n&&Y(e,s,n),n},P=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},r=(t,e,s)=>(P(t,e,"read from private field"),s?s.call(t):e.get(t)),c=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},d=(t,e,s,i)=>(P(t,e,"write to private field"),i?i.call(t,s):e.set(t,s),s),I=(t,e,s)=>(P(t,e,"access private method"),s),u,f,h,v,g,m,$,S,L;const Q=b.createStylesheet({":host":{position:"relative"},".head":{width:"100%",cursor:"default",background:"none",border:"none",color:"inherit",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit",textAlign:"start",padding:"0",margin:"0"},".body":{boxSizing:"border-box",position:"var(--position, unset)",top:"100%",left:"0",width:"100%",overflow:"hidden",transitionDuration:"var(--duration, var(--duration-short))",transitionProperty:"height",cursor:"default"},".body-inner":{display:"grid",gap:"var(--gap, 0px)",width:"100%",paddingTop:"var(--gap, 0px)"}});exports.SelectElement=class extends y.CustomElement{constructor(){super(),c(this,S),c(this,u,null),c(this,f,""),c(this,h,null),c(this,v,!1),c(this,g,void 0),c(this,m,null),c(this,$,()=>{K.dispatchSizeChangeEvent(this)}),W.isBrowser&&(this.openShadow(Q),d(this,u,this.attachInternals()),d(this,m,new ResizeObserver(r(this,$))),a.element(this,{children:[a.button({class:"head",children:a.slot({name:"head"}),onClick:()=>{this.opened?this.close():this.open()}}),a.div({class:"body",style:{height:"0px"},children:a.div({class:"body-inner",children:a.slot()}),ref:e=>{d(this,h,e)}})]}))}get value(){return r(this,f)}set value(e){d(this,f,e),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),r(this,u).setFormValue(r(this,f))}get internals(){return r(this,u)}get opened(){return r(this,v)}open(){clearTimeout(r(this,g)),d(this,v,!0),r(this,h).style.display="grid",this.classList.add("triggered"),setTimeout(()=>{this.classList.add("opened"),r(this,h).style.height=r(this,h).scrollHeight+"px",I(this,S,L).call(this)},0)}close(){d(this,v,!1),r(this,h).style.height="0px",this.classList.remove("opened"),I(this,S,L).call(this),d(this,g,setTimeout(()=>{this.classList.remove("triggered"),r(this,h).style.display="none"},N.getElementTransitionDurationMS(r(this,h))))}connectedCallback(){r(this,m).observe(r(this,h))}disconnectedCallback(){clearTimeout(r(this,g)),r(this,m).disconnect()}};u=new WeakMap;f=new WeakMap;h=new WeakMap;v=new WeakMap;g=new WeakMap;m=new WeakMap;$=new WeakMap;S=new WeakSet;L=function(){this.dispatchEvent(new CustomEvent("selectToggle",{bubbles:!0,composed:!0,detail:{opened:r(this,v)}}))};exports.SelectElement.formAssociated=!0;exports.SelectElement=J([y.define("e-select")],exports.SelectElement);var E;class q extends y.CustomElement{constructor(){super(...arguments);A(this,E,null)}get selectElement(){return z(this,E)}connectedCallback(){var i,n;const s=(n=(i=this.assignedSlot)==null?void 0:i.getRootNode())==null?void 0:n.host;s?H(this,E,s):console.log(this,"e-select not found")}}E=new WeakMap;var X=Object.defineProperty,j=Object.getOwnPropertyDescriptor,ee=(t,e,s,i)=>{for(var n=i>1?void 0:i?j(e,s):e,l=t.length-1,o;l>=0;l--)(o=t[l])&&(n=(i?o(e,s,n):o(n))||n);return i&&n&&X(e,s,n),n},R=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},k=(t,e,s)=>(R(t,e,"read from private field"),s?s.call(t):e.get(t)),B=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},G=(t,e,s)=>(R(t,e,"access private method"),s),w,C,M;const te=b.createStylesheet({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center"}});exports.SelectOptionElement=class extends q{constructor(){super(),B(this,C),B(this,w,()=>{this.selectElement.value===this.value?this.style.display="none":this.style.display=""}),W.isBrowser&&(this.openShadow(te),a.element(this,{tabindex:0,onClick:()=>{G(this,C,M).call(this)},onKeydown:e=>{e.code==="Space"&&G(this,C,M).call(this)},children:a.slot()}))}get value(){return(this.hasAttribute("value")?this.getAttribute("value"):this.innerText)||""}connectedCallback(){super.connectedCallback(),this.hasAttribute("default")&&(this.selectElement.value||(this.selectElement.value=this.value)),this.selectElement.addEventListener("change",k(this,w)),setTimeout(()=>{k(this,w).call(this)})}disconnectedCallback(){this.selectElement.removeEventListener("change",k(this,w))}};w=new WeakMap;C=new WeakSet;M=function(){this.selectElement.value=this.value,this.selectElement.close()};exports.SelectOptionElement=ee([y.define("e-select-option")],exports.SelectOptionElement);const F=`<svg
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
3
|
+
width="32"
|
|
4
|
+
height="32"
|
|
5
|
+
viewBox="0 0 24 24"
|
|
6
|
+
>
|
|
7
|
+
<path d="m12.37 15.835l6.43-6.63C19.201 8.79 18.958 8 18.43 8H5.57c-.528 0-.771.79-.37 1.205l6.43 6.63c.213.22.527.22.74 0Z" />
|
|
8
|
+
</svg>
|
|
9
|
+
`;var se=Object.defineProperty,ie=Object.getOwnPropertyDescriptor,ne=(t,e,s,i)=>{for(var n=i>1?void 0:i?ie(e,s):e,l=t.length-1,o;l>=0;l--)(o=t[l])&&(n=(i?o(e,s,n):o(n))||n);return i&&n&&se(e,s,n),n},U=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},p=(t,e,s)=>(U(t,e,"read from private field"),s?s.call(t):e.get(t)),O=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},re=(t,e,s,i)=>(U(t,e,"write to private field"),i?i.call(t,s):e.set(t,s),s),x,_,T;const ae=b.createStylesheet({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center",justifyContent:"space-between"},".default-arrow":{flexShrink:"0",width:"var(--arrow-size, 1em)",height:"var(--arrow-size, 1em)",fill:`var(--arrow-color, ${V.aptechkaTheme.colorMain.var})`,transitionProperty:"transform",transitionDuration:"var(--duration, var(--duration-short))"},":host(.opened) .default-arrow":{transform:"scaleY(-1)"}});exports.SelectHeadElement=class extends q{constructor(){super(),O(this,x,null),O(this,_,()=>{const s=this.selectElement.shadowRoot.querySelector(".body slot").assignedElements().find(i=>i.value===this.selectElement.value);s&&(p(this,x).innerHTML=s.innerHTML)}),O(this,T,()=>{this.classList.toggle("opened",this.selectElement.opened)}),W.isBrowser&&(this.openShadow(ae),a.element(this,{children:[a.slot(),a.slot({name:"arrow",children:a.element(F,{class:"default-arrow"})})]}),this.slot="head")}connectedCallback(){super.connectedCallback(),re(this,x,this.querySelector("[data-value-holder]")||this),this.selectElement.addEventListener("change",p(this,_)),p(this,_).call(this),this.selectElement.addEventListener("selectToggle",p(this,T))}disconnectedCallback(){this.selectElement.removeEventListener("change",p(this,_)),this.selectElement.removeEventListener("selectToggle",p(this,T))}};x=new WeakMap;_=new WeakMap;T=new WeakMap;exports.SelectHeadElement=ne([y.define("e-select-head")],exports.SelectHeadElement);exports.SelectUserElement=q;exports.arrowIcon=F;
|
package/lib/modal/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../custom-element/index.cjs");require("../Store-C-1ruEIm.cjs");const v=require("../browser-CpzFX2xg.cjs"),s=require("../tags-Djb6mb1o.cjs"),b=require("../createStylesheet-CqHU9_qv.cjs"),m=require("../popover/index.cjs"),g=require("../theme/index.cjs");var w=Object.defineProperty,_=Object.getOwnPropertyDescriptor,y=(t,e,o,r)=>{for(var n=r>1?void 0:r?_(e,o):e,c=t.length-1,d;c>=0;c--)(d=t[c])&&(n=(r?d(e,o,n):d(n))||n);return r&&n&&w(e,o,n),n},f=(t,e,o)=>{if(!e.has(t))throw TypeError("Cannot "+o)},l=(t,e,o)=>(f(t,e,"read from private field"),o?o.call(t):e.get(t)),h=(t,e,o)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,o)},u=(t,e,o,r)=>(f(t,e,"write to private field"),r?r.call(t,o):e.set(t,o),o),i,a;const C=b.createStylesheet({":host":{position:"fixed",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%",transitionProperty:"opacity",transitionDuration:"var(--duration-short)"},":host::before":{content:'""',position:"fixed",top:"0",left:"0",zIndex:"-1",width:"100%",height:"100%",backgroundColor:"var(--backdrop, rgba(0, 0, 0, 0.8))"},".inner":{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden auto"},".overflow .inner":{alignItems:"flex-start"},".content":{position:"relative"},".close-button":{position:"absolute",zIndex:"1",top:"var(--close-button-top, 0.5em)",right:"var(--close-button-right, 0.5em)",background:"none",border:"none",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit"},".close-button-default":{width:"var(--close-button-size, 1.5em)",height:"var(--close-button-size, 1.5em)",display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"transform",transitionDuration:"var(--duration-short)",willChange:"transform"},".close-button:hover .close-button-default":{transform:"scale(0.9)"},".close-button:active .close-button-default":{transform:"scale(0.7)"},".close-button-default::before, .close-button-default::after":{content:'""',position:"absolute",width:"var(--close-button-thickness, 0.1em)",height:"100%",backgroundColor:`var(--close-button-color, ${g.aptechkaTheme.colorMain.var})`},".close-button-default::before":{transform:"rotate(-45deg)"},".close-button-default::after":{transform:"rotate(45deg)"}});exports.ModalElement=class extends m.PopoverElement{constructor(){super(),h(this,i,null),h(this,a,null),v.isBrowser&&(this.openShadow(C),s.element(this,{children:s.div({class:"inner",outside:!0,children:s.div({class:"content",children:[s.element("e-popover-button",{type:"close",target:this.id,class:"close-button",lightChildren:[s.slot({name:"close-button",children:s.span({class:"close-button-default"})})]}),s.slot()]}),ref:e=>u(this,a,e)})}),u(this,i,new ResizeObserver(()=>{l(this,a).scrollHeight>l(this,a).clientHeight?this.classList.add("overflow"):this.classList.remove("overflow")})))}connectedCallback(){super.connectedCallback(),l(this,i).observe(this)}disconnectedCallback(){super.disconnectedCallback(),l(this,i).disconnect()}};i=new WeakMap;a=new WeakMap;exports.ModalElement=y([p.define("e-modal")],exports.ModalElement);
|
package/lib/modal/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { define as
|
|
1
|
+
import { define as b } from "../custom-element/index.js";
|
|
2
2
|
import "../Store-BQXXikps.js";
|
|
3
|
-
import { i as
|
|
4
|
-
import { e as
|
|
5
|
-
import { c as
|
|
6
|
-
import { PopoverElement as
|
|
7
|
-
import { aptechkaTheme as
|
|
8
|
-
var
|
|
9
|
-
for (var n = r > 1 ? void 0 : r ?
|
|
3
|
+
import { i as g } from "../browser-0zX67oeU.js";
|
|
4
|
+
import { e as h, D as d, ay as f, aB as w } from "../tags-CMPg9ETZ.js";
|
|
5
|
+
import { c as _ } from "../createStylesheet-DBCEbDjI.js";
|
|
6
|
+
import { PopoverElement as y } from "../popover/index.js";
|
|
7
|
+
import { aptechkaTheme as C } from "../theme/index.js";
|
|
8
|
+
var x = Object.defineProperty, k = Object.getOwnPropertyDescriptor, z = (t, e, o, r) => {
|
|
9
|
+
for (var n = r > 1 ? void 0 : r ? k(e, o) : e, l = t.length - 1, c; l >= 0; l--)
|
|
10
10
|
(c = t[l]) && (n = (r ? c(e, o, n) : c(n)) || n);
|
|
11
|
-
return r && n &&
|
|
12
|
-
},
|
|
11
|
+
return r && n && x(e, o, n), n;
|
|
12
|
+
}, m = (t, e, o) => {
|
|
13
13
|
if (!e.has(t))
|
|
14
14
|
throw TypeError("Cannot " + o);
|
|
15
|
-
}, a = (t, e, o) => (
|
|
15
|
+
}, a = (t, e, o) => (m(t, e, "read from private field"), o ? o.call(t) : e.get(t)), u = (t, e, o) => {
|
|
16
16
|
if (e.has(t))
|
|
17
17
|
throw TypeError("Cannot add the same private member more than once");
|
|
18
18
|
e instanceof WeakSet ? e.add(t) : e.set(t, o);
|
|
19
|
-
},
|
|
20
|
-
const P =
|
|
19
|
+
}, p = (t, e, o, r) => (m(t, e, "write to private field"), r ? r.call(t, o) : e.set(t, o), o), s, i;
|
|
20
|
+
const P = _({
|
|
21
21
|
":host": {
|
|
22
22
|
position: "fixed",
|
|
23
23
|
top: "0",
|
|
@@ -26,7 +26,7 @@ const P = y({
|
|
|
26
26
|
width: "100%",
|
|
27
27
|
height: "100%",
|
|
28
28
|
transitionProperty: "opacity",
|
|
29
|
-
transitionDuration:
|
|
29
|
+
transitionDuration: "var(--duration-short)"
|
|
30
30
|
},
|
|
31
31
|
":host::before": {
|
|
32
32
|
content: '""',
|
|
@@ -70,7 +70,7 @@ const P = y({
|
|
|
70
70
|
alignItems: "center",
|
|
71
71
|
justifyContent: "center",
|
|
72
72
|
transitionProperty: "transform",
|
|
73
|
-
transitionDuration:
|
|
73
|
+
transitionDuration: "var(--duration-short)",
|
|
74
74
|
willChange: "transform"
|
|
75
75
|
},
|
|
76
76
|
".close-button:hover .close-button-default": {
|
|
@@ -84,7 +84,7 @@ const P = y({
|
|
|
84
84
|
position: "absolute",
|
|
85
85
|
width: "var(--close-button-thickness, 0.1em)",
|
|
86
86
|
height: "100%",
|
|
87
|
-
backgroundColor: `var(--close-button-color, ${
|
|
87
|
+
backgroundColor: `var(--close-button-color, ${C.colorMain.var})`
|
|
88
88
|
},
|
|
89
89
|
".close-button-default::before": {
|
|
90
90
|
transform: "rotate(-45deg)"
|
|
@@ -93,32 +93,32 @@ const P = y({
|
|
|
93
93
|
transform: "rotate(45deg)"
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
|
-
let
|
|
96
|
+
let v = class extends y {
|
|
97
97
|
constructor() {
|
|
98
|
-
super(),
|
|
99
|
-
children:
|
|
98
|
+
super(), u(this, s, null), u(this, i, null), g && (this.openShadow(P), h(this, {
|
|
99
|
+
children: d({
|
|
100
100
|
class: "inner",
|
|
101
101
|
outside: !0,
|
|
102
|
-
children:
|
|
102
|
+
children: d({
|
|
103
103
|
class: "content",
|
|
104
104
|
children: [
|
|
105
|
-
|
|
105
|
+
h("e-popover-button", {
|
|
106
106
|
type: "close",
|
|
107
107
|
target: this.id,
|
|
108
108
|
class: "close-button",
|
|
109
109
|
lightChildren: [
|
|
110
|
-
|
|
110
|
+
f({
|
|
111
111
|
name: "close-button",
|
|
112
|
-
children:
|
|
112
|
+
children: w({ class: "close-button-default" })
|
|
113
113
|
})
|
|
114
114
|
]
|
|
115
115
|
}),
|
|
116
|
-
|
|
116
|
+
f()
|
|
117
117
|
]
|
|
118
118
|
}),
|
|
119
|
-
ref: (t) =>
|
|
119
|
+
ref: (t) => p(this, i, t)
|
|
120
120
|
})
|
|
121
|
-
}),
|
|
121
|
+
}), p(this, s, new ResizeObserver(() => {
|
|
122
122
|
a(this, i).scrollHeight > a(this, i).clientHeight ? this.classList.add("overflow") : this.classList.remove("overflow");
|
|
123
123
|
})));
|
|
124
124
|
}
|
|
@@ -131,9 +131,9 @@ let m = class extends C {
|
|
|
131
131
|
};
|
|
132
132
|
s = /* @__PURE__ */ new WeakMap();
|
|
133
133
|
i = /* @__PURE__ */ new WeakMap();
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
],
|
|
134
|
+
v = z([
|
|
135
|
+
b("e-modal")
|
|
136
|
+
], v);
|
|
137
137
|
export {
|
|
138
|
-
|
|
138
|
+
v as ModalElement
|
|
139
139
|
};
|
package/lib/pointer/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var J=Object.defineProperty;var D=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var k=(i,e,s)=>e in i?J(i,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[e]=s,O=(i,e)=>{for(var s in e||(e={}))K.call(e,s)&&k(i,s,e[s]);if(D)for(var s of D(e))N.call(e,s)&&k(i,s,e[s]);return i};var T=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>(T(i,e,"read from private field"),s?s.call(i):e.get(i)),a=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},l=(i,e,s,o)=>(T(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-C-1ruEIm.cjs");const q=require("../coordinates-D8Np3cPD.cjs"),Q=require("../dom-JBOkFLTh.cjs"),A=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const M=require("../Damped-
|
|
1
|
+
"use strict";var J=Object.defineProperty;var D=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var k=(i,e,s)=>e in i?J(i,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[e]=s,O=(i,e)=>{for(var s in e||(e={}))K.call(e,s)&&k(i,s,e[s]);if(D)for(var s of D(e))N.call(e,s)&&k(i,s,e[s]);return i};var T=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>(T(i,e,"read from private field"),s?s.call(i):e.get(i)),a=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},l=(i,e,s,o)=>(T(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-C-1ruEIm.cjs");const q=require("../coordinates-D8Np3cPD.cjs"),Q=require("../dom-JBOkFLTh.cjs"),A=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const M=require("../Damped-l0mnlhar.cjs"),B=require("../element-resizer/index.cjs"),G=require("../window-resizer/index.cjs"),H=require("../custom-element/index.cjs"),S=require("../css-property/index.cjs");var c,u,m,v,f,d,P,w,_,C,E,y;class F{constructor(e){a(this,c,void 0);a(this,u,void 0);a(this,m,void 0);a(this,v,void 0);a(this,f,void 0);a(this,d,void 0);a(this,P,0);a(this,w,0);a(this,_,e=>{t(this,v).set(1)});a(this,C,e=>{t(this,v).set(0)});a(this,E,e=>{const s=q.getPointerPosition(e,t(this,c).getBoundingClientRect()),o={width:t(this,P),height:t(this,w)},n={x:s.x,y:s.y};if(t(this,f)){const p=q.screenToCartesian(n,o);n.x=p.x,n.y=p.y}if(t(this,d)){const p=q.normalize(n,o);n.x=A.clamp(p.x*2,-1,1),n.y=A.clamp(p.y*2,-1,1)}t(this,u).set(n.x),t(this,m).set(n.y)});a(this,y,()=>{l(this,P,this.element.clientWidth),l(this,w,this.element.clientHeight);let e=0,s=0,o=0,n=0;t(this,f)?t(this,d)?(e=-1,s=1,o=-1,n=1):(e=t(this,P)/2*-1,s=t(this,P)/2*1,o=t(this,w)/2*-1,n=t(this,w)/2*1):t(this,d)?(e=0,s=1,o=0,n=1):(e=0,s=t(this,P),o=0,n=t(this,w)),t(this,u).min=e,t(this,u).max=s,t(this,m).min=o,t(this,m).max=n});l(this,c,Q.getElement(e.element)),l(this,u,new M.Damped(0,e.damped)),l(this,m,new M.Damped(0,e.damped)),l(this,v,new M.Damped(0,O({min:0,max:1},e.damped))),l(this,f,e.cartesian||!1),l(this,d,e.normalize||!1)}get element(){return t(this,c)}get x(){return t(this,u)}get y(){return t(this,m)}get z(){return t(this,v)}get cartesian(){return t(this,f)}set cartesian(e){l(this,f,e),t(this,y).call(this)}get normalize(){return t(this,d)}set normalize(e){l(this,d,e),t(this,y).call(this)}connect(){t(this,c).addEventListener("pointerenter",t(this,_)),t(this,c).addEventListener("pointerleave",t(this,C)),t(this,c).addEventListener("pointermove",t(this,E)),B.elementResizer.subscribe(t(this,c),t(this,y)),G.windowResizer.subscribe(t(this,y))}disconnect(){t(this,c).removeEventListener("pointerenter",t(this,_)),t(this,c).removeEventListener("pointerleave",t(this,C)),t(this,c).removeEventListener("pointermove",t(this,E)),B.elementResizer.unsubscribe(t(this,y)),G.windowResizer.unsubscribe(t(this,y)),t(this,u).reset(),t(this,m).reset(),t(this,v).reset()}}c=new WeakMap,u=new WeakMap,m=new WeakMap,v=new WeakMap,f=new WeakMap,d=new WeakMap,P=new WeakMap,w=new WeakMap,_=new WeakMap,C=new WeakMap,E=new WeakMap,y=new WeakMap;var U=Object.defineProperty,V=Object.getOwnPropertyDescriptor,X=(i,e,s,o)=>{for(var n=o>1?void 0:o?V(e,s):e,p=i.length-1,L;p>=0;p--)(L=i[p])&&(n=(o?L(e,s,n):L(n))||n);return o&&n&&U(e,s,n),n},I=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},r=(i,e,s)=>(I(i,e,"read from private field"),s?s.call(i):e.get(i)),x=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},Y=(i,e,s,o)=>(I(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s),h,b,g,z,W,R;exports.PointerElement=class extends H.CustomElement{constructor(){super(),x(this,h,void 0),x(this,b,new S.CSSProperty(this,"--damping",20)),x(this,g,new S.CSSProperty(this,"--mass",0)),x(this,z,new S.CSSProperty(this,"--stiffness",0)),x(this,W,new S.CSSProperty(this,"--cartesian",!1)),x(this,R,new S.CSSProperty(this,"--normalize",!1)),Y(this,h,new F({element:this})),r(this,b).subscribe(e=>{r(this,h).x.damping=e.current,r(this,h).y.damping=e.current,r(this,h).z.damping=e.current}),r(this,W).subscribe(e=>{r(this,h).cartesian=e.current}),r(this,R).subscribe(e=>{r(this,h).normalize=e.current}),r(this,g).subscribe(e=>{r(this,h).x.mass=e.current,r(this,h).y.mass=e.current,r(this,h).z.mass=e.current}),r(this,z).subscribe(e=>{r(this,h).x.stiffness=e.current,r(this,h).y.stiffness=e.current,r(this,h).z.stiffness=e.current}),r(this,h).x.subscribe(e=>{this.style.setProperty("--x",e.current.toString())}),r(this,h).y.subscribe(e=>{this.style.setProperty("--y",e.current.toString())}),r(this,h).z.subscribe(e=>{this.style.setProperty("--z",e.current.toString())})}get pointer(){return r(this,h)}connectedCallback(){r(this,h).connect(),r(this,b).observe(),r(this,g).observe(),r(this,z).observe()}disconnectedCallback(){r(this,h).disconnect(),r(this,b).unobserve(),r(this,g).unobserve(),r(this,z).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}};h=new WeakMap;b=new WeakMap;g=new WeakMap;z=new WeakMap;W=new WeakMap;R=new WeakMap;exports.PointerElement=X([H.define("e-pointer")],exports.PointerElement);exports.Pointer=F;
|
package/lib/pointer/index.js
CHANGED
|
@@ -23,7 +23,7 @@ import { g as K, s as N, n as Q } from "../coordinates-CgdGoSYs.js";
|
|
|
23
23
|
import { g as U } from "../dom-0S_WDL4g.js";
|
|
24
24
|
import { c as A } from "../math-BOBiC4TN.js";
|
|
25
25
|
import "../ticker/index.js";
|
|
26
|
-
import { D as W } from "../Damped-
|
|
26
|
+
import { D as W } from "../Damped-P4MkCGoY.js";
|
|
27
27
|
import { elementResizer as B } from "../element-resizer/index.js";
|
|
28
28
|
import { windowResizer as G } from "../window-resizer/index.js";
|
|
29
29
|
import { CustomElement as V, define as X } from "../custom-element/index.js";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const r = [
|
|
2
|
+
1,
|
|
3
|
+
10,
|
|
4
|
+
100,
|
|
5
|
+
1e3,
|
|
6
|
+
1e4,
|
|
7
|
+
1e5,
|
|
8
|
+
1e6,
|
|
9
|
+
1e7,
|
|
10
|
+
1e8,
|
|
11
|
+
1e9,
|
|
12
|
+
1e10
|
|
13
|
+
];
|
|
14
|
+
function u(n, e = 5) {
|
|
15
|
+
return Math.round(n * r[e]) / r[e];
|
|
16
|
+
}
|
|
17
|
+
function o(n, e) {
|
|
18
|
+
return Math.round(n / e) * e;
|
|
19
|
+
}
|
|
20
|
+
function t(n, e) {
|
|
21
|
+
return typeof n == "undefined" ? e : n;
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
t as n,
|
|
25
|
+
u as p,
|
|
26
|
+
o as r
|
|
27
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10];function u(n,e=5){return Math.round(n*r[e])/r[e]}function i(n,e){return Math.round(n/e)*e}function o(n,e){return typeof n=="undefined"?e:n}exports.nullishCoalescing=o;exports.preciseNumber=u;exports.roundNumberTo=i;
|
|
@@ -1,17 +1,25 @@
|
|
|
1
1
|
import { CSSProperty } from '../css-property';
|
|
2
|
-
import { Axes2D } from '../utils';
|
|
2
|
+
import { Axes2D, EasingFunction } from '../utils';
|
|
3
3
|
import { Store } from '../store';
|
|
4
4
|
import { CustomElement } from '../custom-element';
|
|
5
5
|
import { Damped } from '../animation';
|
|
6
6
|
|
|
7
7
|
export type ScrollBehaviour = 'smooth' | 'instant';
|
|
8
|
+
export interface ScrollSetOptions {
|
|
9
|
+
behaviour?: ScrollBehaviour;
|
|
10
|
+
tween?: {
|
|
11
|
+
easing?: EasingFunction;
|
|
12
|
+
duration: number;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
8
15
|
export type SectionMark = 'current' | 'previous' | 'next' | null;
|
|
9
16
|
export type SectionmarkChangeEvent = CustomEvent<{
|
|
10
17
|
mark: SectionMark;
|
|
11
18
|
}>;
|
|
12
19
|
declare class Section {
|
|
13
20
|
#private;
|
|
14
|
-
constructor(element: HTMLElement, scrollElement: ScrollElement);
|
|
21
|
+
constructor(element: HTMLElement, index: number, scrollElement: ScrollElement);
|
|
22
|
+
get index(): number;
|
|
15
23
|
get size(): number;
|
|
16
24
|
get position(): number;
|
|
17
25
|
destroy(): void;
|
|
@@ -45,6 +53,8 @@ export declare class ScrollElement extends CustomElement {
|
|
|
45
53
|
get classesCSSProperty(): CSSProperty<number, keyof import('../store').StoreManagers>;
|
|
46
54
|
get currentIndexStartOffsetCSSProperty(): CSSProperty<number, keyof import('../store').StoreManagers>;
|
|
47
55
|
get currentIndexEndOffsetCSSProperty(): CSSProperty<number, keyof import('../store').StoreManagers>;
|
|
56
|
+
get focusDelayCSSProperty(): CSSProperty<number, keyof import('../store').StoreManagers>;
|
|
57
|
+
get focusDurationCSSProperty(): CSSProperty<number, keyof import('../store').StoreManagers>;
|
|
48
58
|
get disabledCSSProperty(): CSSProperty<boolean, keyof import('../store').StoreManagers>;
|
|
49
59
|
get hibernatedCSSProperty(): CSSProperty<boolean, keyof import('../store').StoreManagers>;
|
|
50
60
|
get currentScrollValue(): number;
|
|
@@ -71,9 +81,10 @@ export declare class ScrollElement extends CustomElement {
|
|
|
71
81
|
range(from: number, distance: number, margin?: number): number;
|
|
72
82
|
curve(from: number, distance: number, margin?: number): number;
|
|
73
83
|
visible(from: number, distance: number, margin?: number): boolean;
|
|
74
|
-
scrollToSection(sectionIndex: number,
|
|
75
|
-
shiftSections(step: number,
|
|
76
|
-
setPosition(value: number,
|
|
84
|
+
scrollToSection(sectionIndex: number, options?: ScrollSetOptions): void;
|
|
85
|
+
shiftSections(step: number, options?: ScrollSetOptions): void;
|
|
86
|
+
setPosition(value: number, options?: ScrollSetOptions): void;
|
|
87
|
+
shiftPosition(value: number, options?: ScrollSetOptions): void;
|
|
77
88
|
protected connectedCallback(): void;
|
|
78
89
|
protected disconnectedCallback(): void;
|
|
79
90
|
}
|