@mintplayer/web-components 2.10.0 → 2.12.0
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/accordion/index.mjs +4 -4
- package/charts/core/index.d.ts +1 -0
- package/charts/core/index.mjs +19 -0
- package/charts/core/src/arc.d.ts +28 -0
- package/charts/core/src/color.d.ts +11 -0
- package/charts/core/src/hierarchy-layout.d.ts +68 -0
- package/charts/core/src/index.d.ts +5 -0
- package/charts/core/src/scale.d.ts +21 -0
- package/charts/core/src/types.d.ts +52 -0
- package/charts/hierarchy/index.d.ts +1 -0
- package/charts/hierarchy/index.mjs +816 -0
- package/charts/hierarchy/src/components/index.d.ts +1 -0
- package/charts/hierarchy/src/components/mp-hierarchy-chart.d.ts +188 -0
- package/charts/hierarchy/src/index.d.ts +2 -0
- package/charts/hierarchy/src/styles/hierarchy-chart.styles.d.ts +2 -0
- package/charts/hierarchy/src/styles/index.d.ts +1 -0
- package/charts/sparkline/index.d.ts +1 -0
- package/charts/sparkline/index.mjs +162 -0
- package/charts/sparkline/src/components/index.d.ts +1 -0
- package/charts/sparkline/src/components/mp-sparkline.d.ts +51 -0
- package/charts/sparkline/src/index.d.ts +1 -0
- package/charts/sparkline/src/styles/index.d.ts +1 -0
- package/charts/sparkline/src/styles/sparkline.styles.d.ts +2 -0
- package/charts/trend/index.d.ts +1 -0
- package/charts/trend/index.mjs +432 -0
- package/charts/trend/src/components/index.d.ts +1 -0
- package/charts/trend/src/components/mp-trend-chart.d.ts +104 -0
- package/charts/trend/src/index.d.ts +2 -0
- package/charts/trend/src/styles/index.d.ts +1 -0
- package/charts/trend/src/styles/trend-chart.styles.d.ts +2 -0
- package/checkbox/index.mjs +1 -1
- package/chunks/color-5yPBn70k.mjs +179 -0
- package/chunks/{form-check.styles-jBlHetYX.mjs → form-check.styles-B0pxJ6YC.mjs} +2 -2
- package/chunks/{form-control.styles-BOTBdmvg.mjs → form-control.styles-C3j87Sn3.mjs} +1 -1
- package/chunks/{mp-checkbox-6EJwdUIn.mjs → mp-checkbox-CzwS7Y_t.mjs} +2 -2
- package/chunks/{mp-datatable-25O1GtvU.mjs → mp-datatable-GmKqaN8y.mjs} +1 -1
- package/chunks/{mp-radio-DvKgrTFL.mjs → mp-radio-cL46sUA0.mjs} +2 -2
- package/chunks/{mp-select-lHP00OBH.mjs → mp-select-BNrbPwN4.mjs} +1 -1
- package/chunks/{mp-toggle-button-C4Loq_p4.mjs → mp-toggle-button-eo_aTQtu.mjs} +32 -32
- package/chunks/scale-B0bRUdc7.mjs +91 -0
- package/code-snippet/index.mjs +788 -176
- package/code-snippet/src/core/highlighter.d.ts +39 -0
- package/code-snippet/src/core/split-lines.d.ts +44 -0
- package/code-snippet/src/hljs-loaders.generated.d.ts +14 -0
- package/code-snippet/src/index.d.ts +2 -0
- package/code-snippet/src/mp-code-snippet.element.d.ts +172 -2
- package/code-snippet/src/styles/code-snippet.styles.d.ts +2 -0
- package/code-snippet/src/styles/index.d.ts +1 -0
- package/code-snippet/src/types/code-line-annotation.d.ts +29 -0
- package/code-snippet/src/types/index.d.ts +1 -0
- package/datatable/index.mjs +1 -1
- package/file-manager/index.mjs +1 -1
- package/package.json +17 -1
- package/phone-input/index.mjs +26 -12
- package/phone-input/src/components/mp-phone-input.d.ts +9 -0
- package/query-builder/index.mjs +101 -101
- package/radio/index.mjs +1 -1
- package/radio-group/index.mjs +1 -1
- package/scheduler/index.mjs +3 -3
- package/select/index.mjs +1 -1
- package/toggle-button/index.mjs +1 -1
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
function E(t) {
|
|
2
|
+
const s = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = (o, l) => {
|
|
3
|
+
s.set(o.id, o), e.set(o.id, l);
|
|
4
|
+
const d = o.children?.length ? o.children.map((a) => i(a, o)).reduce((a, u) => a + u, 0) : o.value ?? 0;
|
|
5
|
+
n.set(o.id, d);
|
|
6
|
+
const c = (o.children ?? []).filter((a) => r.get(a.id) !== void 0), h = c.map((a) => n.get(a.id) ?? 0).reduce((a, u) => a + u, 0);
|
|
7
|
+
return r.set(
|
|
8
|
+
o.id,
|
|
9
|
+
o.colorValue !== void 0 ? o.colorValue : h > 0 ? c.map((a) => (r.get(a.id) ?? 0) * (n.get(a.id) ?? 0)).reduce((a, u) => a + u, 0) / h : void 0
|
|
10
|
+
), d;
|
|
11
|
+
};
|
|
12
|
+
return i(t, null), { root: t, byId: s, parents: e, values: n, colorValues: r };
|
|
13
|
+
}
|
|
14
|
+
function Z(t, s) {
|
|
15
|
+
const e = (n) => n ? [...e(t.parents.get(n.id)), n] : [];
|
|
16
|
+
return e(s);
|
|
17
|
+
}
|
|
18
|
+
function S(t, s) {
|
|
19
|
+
return Z(t, s).length;
|
|
20
|
+
}
|
|
21
|
+
const T = (t) => !!(t.children?.length || t.hasChildren);
|
|
22
|
+
function V(t, s) {
|
|
23
|
+
return [...s.children ?? []].sort(
|
|
24
|
+
(e, n) => (t.values.get(n.id) ?? 0) - (t.values.get(e.id) ?? 0)
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
function q(t, s) {
|
|
28
|
+
return s !== void 0 && t.byId.get(s) || t.root;
|
|
29
|
+
}
|
|
30
|
+
function F(t, s) {
|
|
31
|
+
const e = (n) => n.children?.length ? 1 + Math.max(...n.children.map(e)) : 0;
|
|
32
|
+
return e(q(t, s));
|
|
33
|
+
}
|
|
34
|
+
function U(t, s, e = {}) {
|
|
35
|
+
const { maxDepth: n = 2, minFraction: r = 0 } = e, i = q(t, s), o = [], l = (d, c, h, a, u) => {
|
|
36
|
+
if (a > n) return;
|
|
37
|
+
const $ = V(t, d);
|
|
38
|
+
if (!$.length) return;
|
|
39
|
+
const p = $.map((m) => t.values.get(m.id) ?? 0).reduce((m, g) => m + g, 0);
|
|
40
|
+
$.reduce((m, g, x) => {
|
|
41
|
+
const w = p > 0 ? (t.values.get(g.id) ?? 0) / p : 1 / $.length, M = m + (h - c) * w;
|
|
42
|
+
return M - m >= r && M > m && (o.push({
|
|
43
|
+
node: g,
|
|
44
|
+
x0: m,
|
|
45
|
+
x1: M,
|
|
46
|
+
depth: a,
|
|
47
|
+
level: u + 1,
|
|
48
|
+
setsize: $.length,
|
|
49
|
+
posinset: x + 1,
|
|
50
|
+
hasChildren: T(g)
|
|
51
|
+
}), l(g, m, M, a + 1, u + 1)), M;
|
|
52
|
+
}, c);
|
|
53
|
+
};
|
|
54
|
+
return l(i, 0, 1, 1, S(t, i)), o;
|
|
55
|
+
}
|
|
56
|
+
function N(t, s) {
|
|
57
|
+
const e = t.reduce((l, d) => l + d, 0);
|
|
58
|
+
if (e === 0 || s === 0) return 1 / 0;
|
|
59
|
+
const n = Math.max(...t), r = Math.min(...t), i = e * e, o = s * s;
|
|
60
|
+
return Math.max(o * n / i, i / (o * r));
|
|
61
|
+
}
|
|
62
|
+
function D(t, s) {
|
|
63
|
+
const e = /* @__PURE__ */ new Map();
|
|
64
|
+
let n = { ...s }, r = t.filter((l) => l.area > 0);
|
|
65
|
+
const i = (l) => {
|
|
66
|
+
const d = l.reduce((a, u) => a + u.area, 0), c = n.x1 - n.x0, h = n.y1 - n.y0;
|
|
67
|
+
if (!(d <= 0 || c <= 0 || h <= 0))
|
|
68
|
+
if (c >= h) {
|
|
69
|
+
const a = d / h;
|
|
70
|
+
l.reduce((u, $) => {
|
|
71
|
+
const p = $.area / a;
|
|
72
|
+
return e.set($.id, { x0: n.x0, y0: u, x1: n.x0 + a, y1: u + p }), u + p;
|
|
73
|
+
}, n.y0), n = { ...n, x0: n.x0 + a };
|
|
74
|
+
} else {
|
|
75
|
+
const a = d / c;
|
|
76
|
+
l.reduce((u, $) => {
|
|
77
|
+
const p = $.area / a;
|
|
78
|
+
return e.set($.id, { x0: u, y0: n.y0, x1: u + p, y1: n.y0 + a }), u + p;
|
|
79
|
+
}, n.x0), n = { ...n, y0: n.y0 + a };
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
let o = [];
|
|
83
|
+
for (; r.length; ) {
|
|
84
|
+
const l = Math.min(n.x1 - n.x0, n.y1 - n.y0), d = [...o, r[0]];
|
|
85
|
+
!o.length || N(d.map((c) => c.area), l) <= N(o.map((c) => c.area), l) ? (o = d, r = r.slice(1)) : (i(o), o = []);
|
|
86
|
+
}
|
|
87
|
+
return i(o), e;
|
|
88
|
+
}
|
|
89
|
+
function W(t, s, e = {}) {
|
|
90
|
+
const { maxDepth: n = 2, minArea: r = 0, childPadding: i = 0, childHeaderSpace: o = 0 } = e, l = q(t, s), d = [], c = (a) => {
|
|
91
|
+
const u = {
|
|
92
|
+
x0: a.x0 + i,
|
|
93
|
+
y0: a.y0 + i + o,
|
|
94
|
+
x1: a.x1 - i,
|
|
95
|
+
y1: a.y1 - i
|
|
96
|
+
};
|
|
97
|
+
return u.x1 - u.x0 > 0 && u.y1 - u.y0 > 0 ? u : null;
|
|
98
|
+
}, h = (a, u, $, p) => {
|
|
99
|
+
if ($ > n) return;
|
|
100
|
+
const m = $ === 1 ? u : c(u);
|
|
101
|
+
if (!m) return;
|
|
102
|
+
const g = V(t, a);
|
|
103
|
+
if (!g.length) return;
|
|
104
|
+
const x = (m.x1 - m.x0) * (m.y1 - m.y0), w = g.map((f) => t.values.get(f.id) ?? 0).reduce((f, P) => f + P, 0), M = g.map((f) => ({
|
|
105
|
+
id: f.id,
|
|
106
|
+
area: w > 0 ? (t.values.get(f.id) ?? 0) / w * x : x / g.length
|
|
107
|
+
})), A = D(M, m);
|
|
108
|
+
g.map((f, P) => ({ kid: f, i: P, r: A.get(f.id) })).filter((f) => !!f.r && (f.r.x1 - f.r.x0) * (f.r.y1 - f.r.y0) >= r).map((f) => (d.push({
|
|
109
|
+
node: f.kid,
|
|
110
|
+
...f.r,
|
|
111
|
+
depth: $,
|
|
112
|
+
level: p + 1,
|
|
113
|
+
setsize: g.length,
|
|
114
|
+
posinset: f.i + 1,
|
|
115
|
+
hasChildren: T(f.kid)
|
|
116
|
+
}), h(f.kid, f.r, $ + 1, p + 1), f));
|
|
117
|
+
};
|
|
118
|
+
return h(l, { x0: 0, y0: 0, x1: 1, y1: 1 }, 1, S(t, l)), d;
|
|
119
|
+
}
|
|
120
|
+
const k = 2 * Math.PI, v = 1e-6, y = (t, s, e) => I(t + s * Math.sin(e)), b = (t, s, e) => I(t - s * Math.cos(e)), I = (t) => Math.round(t * 1e3) / 1e3;
|
|
121
|
+
function z(t, s, e, n) {
|
|
122
|
+
const r = `M ${y(t, n, 0)} ${b(s, n, 0)} A ${n} ${n} 0 1 1 ${y(t, n, Math.PI)} ${b(s, n, Math.PI)} A ${n} ${n} 0 1 1 ${y(t, n, 0)} ${b(s, n, 0)} Z`;
|
|
123
|
+
if (e <= v) return r;
|
|
124
|
+
const i = `M ${y(t, e, 0)} ${b(s, e, 0)} A ${e} ${e} 0 1 0 ${y(t, e, Math.PI)} ${b(s, e, Math.PI)} A ${e} ${e} 0 1 0 ${y(t, e, 0)} ${b(s, e, 0)} Z`;
|
|
125
|
+
return `${r} ${i}`;
|
|
126
|
+
}
|
|
127
|
+
function j(t, s, e, n, r, i, o = {}) {
|
|
128
|
+
const { padAngle: l = 0, ringGap: d = 1 } = o, c = Math.max(0, e), h = Math.max(c, n - d);
|
|
129
|
+
if (h - c <= v || i - r <= v) return "";
|
|
130
|
+
if (i - r >= k - v) return z(t, s, c, h);
|
|
131
|
+
const a = Math.min((i - r) / 2, l) / 2, u = a > 0 ? o.padRadius ?? Math.sqrt(c * c + h * h) : 0, $ = (L) => L > v ? Math.asin(Math.min(1, u * Math.sin(a) / L)) : 0, p = (r + i) / 2, m = (L, H) => H > L ? [L, H] : [p, p + v], [g, x] = m(r + $(h), i - $(h)), w = x - g > Math.PI ? 1 : 0, M = `M ${y(t, h, g)} ${b(s, h, g)} A ${h} ${h} 0 ${w} 1 ${y(t, h, x)} ${b(s, h, x)}`;
|
|
132
|
+
if (c <= v) return `${M} L ${I(t)} ${I(s)} Z`;
|
|
133
|
+
const [A, f] = m(r + $(c), i - $(c)), P = f - A > Math.PI ? 1 : 0;
|
|
134
|
+
return `${M} L ${y(t, c, f)} ${b(s, c, f)} A ${c} ${c} 0 ${P} 0 ${y(t, c, A)} ${b(s, c, A)} Z`;
|
|
135
|
+
}
|
|
136
|
+
function G(t, s, e) {
|
|
137
|
+
const n = (t + s) / 2 * 360 % 360;
|
|
138
|
+
return `rotate(${I(n - 90)}) translate(${I(e)},0) rotate(${n < 180 ? 0 : 180})`;
|
|
139
|
+
}
|
|
140
|
+
function K(t, s, e, n = 0.03) {
|
|
141
|
+
return e * (s - t) > n;
|
|
142
|
+
}
|
|
143
|
+
function O(t) {
|
|
144
|
+
const s = t.trim().match(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i)?.[1];
|
|
145
|
+
if (s) {
|
|
146
|
+
const n = s.length === 3 ? [...s].map((r) => r + r).join("") : s;
|
|
147
|
+
return [0, 2, 4].map((r) => parseInt(n.slice(r, r + 2), 16));
|
|
148
|
+
}
|
|
149
|
+
const e = t.trim().match(/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);
|
|
150
|
+
if (e) return [Number(e[1]), Number(e[2]), Number(e[3])];
|
|
151
|
+
throw new Error(`Unsupported color: "${t}" (use #rrggbb or rgb(r, g, b))`);
|
|
152
|
+
}
|
|
153
|
+
function R([t, s, e]) {
|
|
154
|
+
const n = t / 255, r = s / 255, i = e / 255, o = Math.max(n, r, i), l = Math.min(n, r, i), d = (o + l) / 2;
|
|
155
|
+
if (o === l) return { h: 0, s: 0, l: d };
|
|
156
|
+
const c = o - l, h = d > 0.5 ? c / (2 - o - l) : c / (o + l);
|
|
157
|
+
return { h: (o === n ? (r - i) / c + (r < i ? 6 : 0) : o === r ? (i - n) / c + 2 : (n - r) / c + 4) * 60, s: h, l: d };
|
|
158
|
+
}
|
|
159
|
+
function B(t, s, e, n) {
|
|
160
|
+
const r = R(O(e)), i = R(O(n)), o = s - t;
|
|
161
|
+
return (l) => {
|
|
162
|
+
const d = o === 0 ? 0 : Math.min(1, Math.max(0, (l - t) / o)), c = r.h + (i.h - r.h) * d, h = r.s + (i.s - r.s) * d, a = r.l + (i.l - r.l) * d;
|
|
163
|
+
return `hsl(${C(c)}, ${C(h * 100)}%, ${C(a * 100)}%)`;
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
const C = (t) => Math.round(t * 10) / 10;
|
|
167
|
+
export {
|
|
168
|
+
G as a,
|
|
169
|
+
K as b,
|
|
170
|
+
j as c,
|
|
171
|
+
E as d,
|
|
172
|
+
B as e,
|
|
173
|
+
Z as f,
|
|
174
|
+
F as g,
|
|
175
|
+
S as l,
|
|
176
|
+
U as p,
|
|
177
|
+
q as r,
|
|
178
|
+
W as s
|
|
179
|
+
};
|
|
@@ -47,7 +47,7 @@ const c = e(`.form-check {
|
|
|
47
47
|
filter: brightness(90%);
|
|
48
48
|
}
|
|
49
49
|
.form-check-input:focus {
|
|
50
|
-
border-color: rgb(
|
|
50
|
+
border-color: rgb(52.5490196078%, 71.568627451%, 99.6078431373%);
|
|
51
51
|
outline: 0;
|
|
52
52
|
box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
|
|
53
53
|
}
|
|
@@ -94,7 +94,7 @@ const c = e(`.form-check {
|
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
.form-switch .form-check-input:focus {
|
|
97
|
-
--bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgb%
|
|
97
|
+
--bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgb%2852.5490196078%, 71.568627451%, 99.6078431373%%29'/%3e%3c/svg%3e");
|
|
98
98
|
}
|
|
99
99
|
.form-switch .form-check-input:checked {
|
|
100
100
|
background-position: right center;
|
|
@@ -28,7 +28,7 @@ const e = r(`.form-control {
|
|
|
28
28
|
.form-control:focus {
|
|
29
29
|
color: var(--bs-body-color);
|
|
30
30
|
background-color: var(--bs-body-bg);
|
|
31
|
-
border-color: rgb(
|
|
31
|
+
border-color: rgb(52.5490196078%, 71.568627451%, 99.6078431373%);
|
|
32
32
|
outline: 0;
|
|
33
33
|
box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
|
|
34
34
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { LitElement as a, nothing as s, html as n } from "lit";
|
|
2
2
|
import { ifDefined as h } from "lit/directives/if-defined.js";
|
|
3
3
|
import { createRef as u, ref as c } from "lit/directives/ref.js";
|
|
4
|
-
import { f as b } from "./form-check.styles-
|
|
4
|
+
import { f as b } from "./form-check.styles-B0pxJ6YC.mjs";
|
|
5
5
|
import { i as p } from "./invalid-feedback.styles-he0JYrJm.mjs";
|
|
6
6
|
import { H as _ } from "./host-aria-WSGs7SPQ.mjs";
|
|
7
7
|
import { a as m, e as f } from "./error-text-B45eDAt1.mjs";
|
|
8
8
|
import { F as k } from "./form-associated-BR-fUvZ1.mjs";
|
|
9
|
-
import { t as g } from "./mp-toggle-button-
|
|
9
|
+
import { t as g } from "./mp-toggle-button-eo_aTQtu.mjs";
|
|
10
10
|
const o = /* @__PURE__ */ new Set(["checkbox", "switch", "toggle_button"]), l = /* @__PURE__ */ new Set([
|
|
11
11
|
"primary",
|
|
12
12
|
"secondary",
|
|
@@ -5,7 +5,7 @@ import { H as I } from "./host-aria-WSGs7SPQ.mjs";
|
|
|
5
5
|
import { repeat as P } from "lit/directives/repeat.js";
|
|
6
6
|
import { styleMap as m } from "lit/directives/style-map.js";
|
|
7
7
|
import "./mp-pagination-Dea75mD4.mjs";
|
|
8
|
-
import "./mp-checkbox-
|
|
8
|
+
import "./mp-checkbox-CzwS7Y_t.mjs";
|
|
9
9
|
const E = {
|
|
10
10
|
treeChevronColumn: "Expand or collapse",
|
|
11
11
|
deselectAll: "Deselect all",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LitElement as i, nothing as r, html as a } from "lit";
|
|
2
2
|
import { createRef as d, ref as n } from "lit/directives/ref.js";
|
|
3
|
-
import { t as l } from "./mp-toggle-button-
|
|
4
|
-
import { f as c } from "./form-check.styles-
|
|
3
|
+
import { t as l } from "./mp-toggle-button-eo_aTQtu.mjs";
|
|
4
|
+
import { f as c } from "./form-check.styles-B0pxJ6YC.mjs";
|
|
5
5
|
import { i as p } from "./invalid-feedback.styles-he0JYrJm.mjs";
|
|
6
6
|
import { H as b } from "./host-aria-WSGs7SPQ.mjs";
|
|
7
7
|
import { a as _, e as g } from "./error-text-B45eDAt1.mjs";
|
|
@@ -88,12 +88,12 @@ const u = a(`.btn {
|
|
|
88
88
|
--bs-btn-bg: #0d6efd;
|
|
89
89
|
--bs-btn-border-color: #0d6efd;
|
|
90
90
|
--bs-btn-hover-color: #fff;
|
|
91
|
-
--bs-btn-hover-bg: rgb(
|
|
92
|
-
--bs-btn-hover-border-color: rgb(
|
|
91
|
+
--bs-btn-hover-bg: rgb(4.3333333333%, 36.6666666667%, 84.3333333333%);
|
|
92
|
+
--bs-btn-hover-border-color: rgb(4.0784313725%, 34.5098039216%, 79.3725490196%);
|
|
93
93
|
--bs-btn-focus-shadow-rgb: 49, 132, 253;
|
|
94
94
|
--bs-btn-active-color: #fff;
|
|
95
|
-
--bs-btn-active-bg: rgb(
|
|
96
|
-
--bs-btn-active-border-color: rgb(
|
|
95
|
+
--bs-btn-active-bg: rgb(4.0784313725%, 34.5098039216%, 79.3725490196%);
|
|
96
|
+
--bs-btn-active-border-color: rgb(3.8235294118%, 32.3529411765%, 74.4117647059%);
|
|
97
97
|
--bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
|
98
98
|
--bs-btn-disabled-color: #fff;
|
|
99
99
|
--bs-btn-disabled-bg: #0d6efd;
|
|
@@ -105,12 +105,12 @@ const u = a(`.btn {
|
|
|
105
105
|
--bs-btn-bg: #6c757d;
|
|
106
106
|
--bs-btn-border-color: #6c757d;
|
|
107
107
|
--bs-btn-hover-color: #fff;
|
|
108
|
-
--bs-btn-hover-bg: rgb(
|
|
109
|
-
--bs-btn-hover-border-color: rgb(
|
|
108
|
+
--bs-btn-hover-bg: rgb(36%, 39%, 41.6666666667%);
|
|
109
|
+
--bs-btn-hover-border-color: rgb(33.8823529412%, 36.7058823529%, 39.2156862745%);
|
|
110
110
|
--bs-btn-focus-shadow-rgb: 130, 138, 145;
|
|
111
111
|
--bs-btn-active-color: #fff;
|
|
112
|
-
--bs-btn-active-bg: rgb(
|
|
113
|
-
--bs-btn-active-border-color: rgb(
|
|
112
|
+
--bs-btn-active-bg: rgb(33.8823529412%, 36.7058823529%, 39.2156862745%);
|
|
113
|
+
--bs-btn-active-border-color: rgb(31.7647058824%, 34.4117647059%, 36.7647058824%);
|
|
114
114
|
--bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
|
115
115
|
--bs-btn-disabled-color: #fff;
|
|
116
116
|
--bs-btn-disabled-bg: #6c757d;
|
|
@@ -122,12 +122,12 @@ const u = a(`.btn {
|
|
|
122
122
|
--bs-btn-bg: #198754;
|
|
123
123
|
--bs-btn-border-color: #198754;
|
|
124
124
|
--bs-btn-hover-color: #fff;
|
|
125
|
-
--bs-btn-hover-bg: rgb(
|
|
126
|
-
--bs-btn-hover-border-color: rgb(
|
|
125
|
+
--bs-btn-hover-bg: rgb(8.3333333333%, 45%, 28%);
|
|
126
|
+
--bs-btn-hover-border-color: rgb(7.8431372549%, 42.3529411765%, 26.3529411765%);
|
|
127
127
|
--bs-btn-focus-shadow-rgb: 60, 153, 110;
|
|
128
128
|
--bs-btn-active-color: #fff;
|
|
129
|
-
--bs-btn-active-bg: rgb(
|
|
130
|
-
--bs-btn-active-border-color: rgb(
|
|
129
|
+
--bs-btn-active-bg: rgb(7.8431372549%, 42.3529411765%, 26.3529411765%);
|
|
130
|
+
--bs-btn-active-border-color: rgb(7.3529411765%, 39.7058823529%, 24.7058823529%);
|
|
131
131
|
--bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
|
132
132
|
--bs-btn-disabled-color: #fff;
|
|
133
133
|
--bs-btn-disabled-bg: #198754;
|
|
@@ -139,12 +139,12 @@ const u = a(`.btn {
|
|
|
139
139
|
--bs-btn-bg: #0dcaf0;
|
|
140
140
|
--bs-btn-border-color: #0dcaf0;
|
|
141
141
|
--bs-btn-hover-color: #000;
|
|
142
|
-
--bs-btn-hover-bg: rgb(
|
|
143
|
-
--bs-btn-hover-border-color: rgb(
|
|
142
|
+
--bs-btn-hover-bg: rgb(19.3333333333%, 82.3333333333%, 95%);
|
|
143
|
+
--bs-btn-hover-border-color: rgb(14.5882352941%, 81.2941176471%, 94.7058823529%);
|
|
144
144
|
--bs-btn-focus-shadow-rgb: 11, 172, 204;
|
|
145
145
|
--bs-btn-active-color: #000;
|
|
146
|
-
--bs-btn-active-bg: rgb(
|
|
147
|
-
--bs-btn-active-border-color: rgb(
|
|
146
|
+
--bs-btn-active-bg: rgb(24.0784313725%, 83.3725490196%, 95.2941176471%);
|
|
147
|
+
--bs-btn-active-border-color: rgb(14.5882352941%, 81.2941176471%, 94.7058823529%);
|
|
148
148
|
--bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
|
149
149
|
--bs-btn-disabled-color: #000;
|
|
150
150
|
--bs-btn-disabled-bg: #0dcaf0;
|
|
@@ -156,12 +156,12 @@ const u = a(`.btn {
|
|
|
156
156
|
--bs-btn-bg: #ffc107;
|
|
157
157
|
--bs-btn-border-color: #ffc107;
|
|
158
158
|
--bs-btn-hover-color: #000;
|
|
159
|
-
--bs-btn-hover-bg: rgb(
|
|
160
|
-
--bs-btn-hover-border-color: rgb(
|
|
159
|
+
--bs-btn-hover-bg: rgb(100%, 79.3333333333%, 17.3333333333%);
|
|
160
|
+
--bs-btn-hover-border-color: rgb(100%, 78.1176470588%, 12.4705882353%);
|
|
161
161
|
--bs-btn-focus-shadow-rgb: 217, 164, 6;
|
|
162
162
|
--bs-btn-active-color: #000;
|
|
163
|
-
--bs-btn-active-bg: rgb(
|
|
164
|
-
--bs-btn-active-border-color: rgb(
|
|
163
|
+
--bs-btn-active-bg: rgb(100%, 80.5490196078%, 22.1960784314%);
|
|
164
|
+
--bs-btn-active-border-color: rgb(100%, 78.1176470588%, 12.4705882353%);
|
|
165
165
|
--bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
|
166
166
|
--bs-btn-disabled-color: #000;
|
|
167
167
|
--bs-btn-disabled-bg: #ffc107;
|
|
@@ -173,12 +173,12 @@ const u = a(`.btn {
|
|
|
173
173
|
--bs-btn-bg: #dc3545;
|
|
174
174
|
--bs-btn-border-color: #dc3545;
|
|
175
175
|
--bs-btn-hover-color: #fff;
|
|
176
|
-
--bs-btn-hover-bg: rgb(
|
|
177
|
-
--bs-btn-hover-border-color: rgb(
|
|
176
|
+
--bs-btn-hover-bg: rgb(73.3333333333%, 17.6666666667%, 23%);
|
|
177
|
+
--bs-btn-hover-border-color: rgb(69.0196078431%, 16.6274509804%, 21.6470588235%);
|
|
178
178
|
--bs-btn-focus-shadow-rgb: 225, 83, 97;
|
|
179
179
|
--bs-btn-active-color: #fff;
|
|
180
|
-
--bs-btn-active-bg: rgb(
|
|
181
|
-
--bs-btn-active-border-color: rgb(
|
|
180
|
+
--bs-btn-active-bg: rgb(69.0196078431%, 16.6274509804%, 21.6470588235%);
|
|
181
|
+
--bs-btn-active-border-color: rgb(64.7058823529%, 15.5882352941%, 20.2941176471%);
|
|
182
182
|
--bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
|
183
183
|
--bs-btn-disabled-color: #fff;
|
|
184
184
|
--bs-btn-disabled-bg: #dc3545;
|
|
@@ -190,12 +190,12 @@ const u = a(`.btn {
|
|
|
190
190
|
--bs-btn-bg: #f8f9fa;
|
|
191
191
|
--bs-btn-border-color: #f8f9fa;
|
|
192
192
|
--bs-btn-hover-color: #000;
|
|
193
|
-
--bs-btn-hover-bg: rgb(
|
|
194
|
-
--bs-btn-hover-border-color: rgb(
|
|
193
|
+
--bs-btn-hover-bg: rgb(82.6666666667%, 83%, 83.3333333333%);
|
|
194
|
+
--bs-btn-hover-border-color: rgb(77.8039215686%, 78.1176470588%, 78.431372549%);
|
|
195
195
|
--bs-btn-focus-shadow-rgb: 211, 212, 213;
|
|
196
196
|
--bs-btn-active-color: #000;
|
|
197
|
-
--bs-btn-active-bg: rgb(
|
|
198
|
-
--bs-btn-active-border-color: rgb(
|
|
197
|
+
--bs-btn-active-bg: rgb(77.8039215686%, 78.1176470588%, 78.431372549%);
|
|
198
|
+
--bs-btn-active-border-color: rgb(72.9411764706%, 73.2352941176%, 73.5294117647%);
|
|
199
199
|
--bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
|
200
200
|
--bs-btn-disabled-color: #000;
|
|
201
201
|
--bs-btn-disabled-bg: #f8f9fa;
|
|
@@ -207,12 +207,12 @@ const u = a(`.btn {
|
|
|
207
207
|
--bs-btn-bg: #212529;
|
|
208
208
|
--bs-btn-border-color: #212529;
|
|
209
209
|
--bs-btn-hover-color: #fff;
|
|
210
|
-
--bs-btn-hover-bg: rgb(
|
|
211
|
-
--bs-btn-hover-border-color: rgb(
|
|
210
|
+
--bs-btn-hover-bg: rgb(26%, 27.3333333333%, 28.6666666667%);
|
|
211
|
+
--bs-btn-hover-border-color: rgb(21.6470588235%, 23.0588235294%, 24.4705882353%);
|
|
212
212
|
--bs-btn-focus-shadow-rgb: 66, 70, 73;
|
|
213
213
|
--bs-btn-active-color: #fff;
|
|
214
|
-
--bs-btn-active-bg: rgb(
|
|
215
|
-
--bs-btn-active-border-color: rgb(
|
|
214
|
+
--bs-btn-active-bg: rgb(30.3529411765%, 31.6078431373%, 32.862745098%);
|
|
215
|
+
--bs-btn-active-border-color: rgb(21.6470588235%, 23.0588235294%, 24.4705882353%);
|
|
216
216
|
--bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
|
217
217
|
--bs-btn-disabled-color: #fff;
|
|
218
218
|
--bs-btn-disabled-bg: #212529;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
function Y(e, r) {
|
|
2
|
+
const [n, t] = e, [o, a] = r, u = t - n;
|
|
3
|
+
return (i) => u === 0 ? (o + a) / 2 : o + (i - n) / u * (a - o);
|
|
4
|
+
}
|
|
5
|
+
function M(e, r) {
|
|
6
|
+
const n = e / Math.max(1, r), t = Math.pow(10, Math.floor(Math.log10(n))), o = n / t;
|
|
7
|
+
return (o > 5 ? 10 : o > 2 ? 5 : o > 1 ? 2 : 1) * t;
|
|
8
|
+
}
|
|
9
|
+
function x(e, r, n = 5) {
|
|
10
|
+
if (!(r > e)) return [e];
|
|
11
|
+
const t = M(r - e, n), o = Math.ceil(e / t) * t, a = Math.floor((r - o) / t + 1e-9) + 1;
|
|
12
|
+
return Array.from({ length: Math.max(0, a) }, (u, i) => y(o + i * t));
|
|
13
|
+
}
|
|
14
|
+
function F(e, r, n = 5) {
|
|
15
|
+
if (!(r > e)) return [e - 1, r + 1];
|
|
16
|
+
const t = M(r - e, n);
|
|
17
|
+
return [Math.floor(e / t) * t, Math.ceil(r / t) * t];
|
|
18
|
+
}
|
|
19
|
+
const y = (e) => Math.round(e * 1e9) / 1e9, h = 36e5, s = 24 * h, p = [
|
|
20
|
+
{ unit: "hour", every: 1, approxMs: h },
|
|
21
|
+
{ unit: "hour", every: 3, approxMs: 3 * h },
|
|
22
|
+
{ unit: "hour", every: 6, approxMs: 6 * h },
|
|
23
|
+
{ unit: "hour", every: 12, approxMs: 12 * h },
|
|
24
|
+
{ unit: "day", every: 1, approxMs: s },
|
|
25
|
+
{ unit: "day", every: 2, approxMs: 2 * s },
|
|
26
|
+
{ unit: "week", every: 1, approxMs: 7 * s },
|
|
27
|
+
{ unit: "week", every: 2, approxMs: 14 * s },
|
|
28
|
+
{ unit: "month", every: 1, approxMs: 30 * s },
|
|
29
|
+
{ unit: "month", every: 3, approxMs: 91 * s },
|
|
30
|
+
{ unit: "month", every: 6, approxMs: 182 * s },
|
|
31
|
+
{ unit: "year", every: 1, approxMs: 365 * s },
|
|
32
|
+
{ unit: "year", every: 2, approxMs: 730 * s },
|
|
33
|
+
{ unit: "year", every: 5, approxMs: 1826 * s },
|
|
34
|
+
{ unit: "year", every: 10, approxMs: 3652 * s }
|
|
35
|
+
];
|
|
36
|
+
function f(e, r, n) {
|
|
37
|
+
const t = new Date(e), o = (() => {
|
|
38
|
+
switch (r) {
|
|
39
|
+
case "hour": {
|
|
40
|
+
const a = Math.floor(t.getHours() / n) * n;
|
|
41
|
+
return new Date(t.getFullYear(), t.getMonth(), t.getDate(), a);
|
|
42
|
+
}
|
|
43
|
+
case "day":
|
|
44
|
+
return new Date(t.getFullYear(), t.getMonth(), t.getDate());
|
|
45
|
+
case "week": {
|
|
46
|
+
const a = new Date(t.getFullYear(), t.getMonth(), t.getDate()), u = (a.getDay() + 6) % 7;
|
|
47
|
+
return new Date(a.getFullYear(), a.getMonth(), a.getDate() - u);
|
|
48
|
+
}
|
|
49
|
+
case "month": {
|
|
50
|
+
const a = Math.floor(t.getMonth() / n) * n;
|
|
51
|
+
return new Date(t.getFullYear(), a, 1);
|
|
52
|
+
}
|
|
53
|
+
case "year": {
|
|
54
|
+
const a = Math.floor(t.getFullYear() / n) * n;
|
|
55
|
+
return new Date(a, 0, 1);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
})();
|
|
59
|
+
return o.getTime() >= e ? o : D(o, r, n);
|
|
60
|
+
}
|
|
61
|
+
function D(e, r, n) {
|
|
62
|
+
switch (r) {
|
|
63
|
+
case "hour":
|
|
64
|
+
return new Date(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours() + n);
|
|
65
|
+
case "day":
|
|
66
|
+
return new Date(e.getFullYear(), e.getMonth(), e.getDate() + n);
|
|
67
|
+
case "week":
|
|
68
|
+
return new Date(e.getFullYear(), e.getMonth(), e.getDate() + 7 * n);
|
|
69
|
+
case "month":
|
|
70
|
+
return new Date(e.getFullYear(), e.getMonth() + n, 1);
|
|
71
|
+
case "year":
|
|
72
|
+
return new Date(e.getFullYear() + n, 0, 1);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function m(e, r, n) {
|
|
76
|
+
const t = e === "hour" ? { hour: "numeric", minute: "2-digit" } : e === "day" || e === "week" ? r ? { month: "short", day: "numeric", year: "numeric" } : { month: "short", day: "numeric" } : e === "month" ? { month: "short", year: "numeric" } : { year: "numeric" };
|
|
77
|
+
return new Intl.DateTimeFormat(n, t);
|
|
78
|
+
}
|
|
79
|
+
function k(e, r, n = 6, t) {
|
|
80
|
+
if (!(r > e)) return [];
|
|
81
|
+
const o = r - e, a = p.find((c) => o / c.approxMs <= n) ?? p[p.length - 1], u = new Date(e).getFullYear() !== new Date(r).getFullYear(), i = m(a.unit, u, t), l = [], w = (c) => (c.getTime() <= r && l.push({ time: c.getTime(), label: i.format(c) }), D(c, a.unit, a.every));
|
|
82
|
+
let g = f(e, a.unit, a.every);
|
|
83
|
+
for (; g.getTime() <= r && l.length < n * 3; ) g = w(g);
|
|
84
|
+
return l;
|
|
85
|
+
}
|
|
86
|
+
export {
|
|
87
|
+
x as a,
|
|
88
|
+
Y as l,
|
|
89
|
+
F as n,
|
|
90
|
+
k as t
|
|
91
|
+
};
|