@templatical/editor 0.13.0 → 0.15.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/dist/{AiChatSidebar-B0-U5-sb.js → AiChatSidebar-BIKvYREk.js} +57 -56
- package/dist/{AiFeatureMenu-DxDwLS8B.js → AiFeatureMenu-QbD82crt.js} +23 -23
- package/dist/{BlockIssueBadge-C-EPqWsh.js → BlockIssueBadge-B3xVgMTh.js} +11 -11
- package/dist/CloudEditor-DptuSf7A.js +1234 -0
- package/dist/{CollaboratorBar-DgwjisX2.js → CollaboratorBar-DrA_K69w.js} +20 -20
- package/dist/{CommentsSidebar-CpRLN40c.js → CommentsSidebar-D_tSGvTX.js} +158 -157
- package/dist/CountdownBlock-apiYUhkQ.js +92 -0
- package/dist/CountdownToolbar-CS0axcjz.js +210 -0
- package/dist/{DesignReferenceSidebar-BgPDbOsl.js → DesignReferenceSidebar-DWYK9nTk.js} +58 -57
- package/dist/{IssuesPanel-I0z6k6-H.js → IssuesPanel-CR1MPaDE.js} +40 -40
- package/dist/{LoadingTrack-C7mGWPHS.js → LoadingTrack-DsecR8Rw.js} +1 -1
- package/dist/MergeTagSuggestion-CH2SUxBo.js +1327 -0
- package/dist/ModuleBrowserModal-D45rBj5C.js +202 -0
- package/dist/{ModulePreviewCanvas-Dni9kK4j.js → ModulePreviewCanvas-BiQ6B2-l.js} +29 -29
- package/dist/{NumberWithSuffix-D3fdj0iO.js → NumberWithSuffix-CrA6quxx.js} +143 -142
- package/dist/ParagraphEditor-1NaUJpZO.js +721 -0
- package/dist/{RichTextEditorContent-Q5altsx1.js → RichTextEditorContent-BqLHIZY7.js} +45 -44
- package/dist/{SaveModuleDialog-C38VqN2T.js → SaveModuleDialog-B0sPOTgO.js} +38 -37
- package/dist/{SnapshotHistory-ByloTpwh.js → SnapshotHistory-DslVzmSb.js} +34 -33
- package/dist/{TemplateScoringPanel-CUxiPtEf.js → TemplateScoringPanel-CZ62rGHz.js} +83 -82
- package/dist/{TestEmailModal-BvZBMBad.js → TestEmailModal-DWGniJVu.js} +22 -21
- package/dist/TitleEditor-D4t_gZZJ.js +193 -0
- package/dist/{TplModal-BYb-X5Bj.js → TplModal-Br2VG6cn.js} +14 -13
- package/dist/{blockTypeIcons-CyAom3iI.js → blockTypeIcons-CXhCS5WV.js} +5 -5
- package/dist/bundle-stats.json +8 -8
- package/dist/cdn/chunks/{AiFeatureMenu-BSoy-SoF.js → AiFeatureMenu-3Slo_LGA.js} +8 -8
- package/dist/cdn/chunks/{AiFeatureMenu-BSoy-SoF.js.map → AiFeatureMenu-3Slo_LGA.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-BQDUuJxy.js → BlockIssueBadge-BxwEiiF3.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-BQDUuJxy.js.map → BlockIssueBadge-BxwEiiF3.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-BZuzsQOZ.js → CloudEditor-DFIFWD9G.js} +163 -161
- package/dist/cdn/chunks/CloudEditor-DFIFWD9G.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-DUpSrtDr.js → CollaboratorBar-Cu3vuN66.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-DUpSrtDr.js.map → CollaboratorBar-Cu3vuN66.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-DChGTAsH.js → CountdownBlock-BEVAJQtQ.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-DChGTAsH.js.map → CountdownBlock-BEVAJQtQ.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-C6gX2SJr.js → CountdownToolbar-CI2sQZv5.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-C6gX2SJr.js.map → CountdownToolbar-CI2sQZv5.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-Bo1uhdSe.js → IssuesPanel-BdeDoTcn.js} +11 -11
- package/dist/cdn/chunks/{IssuesPanel-Bo1uhdSe.js.map → IssuesPanel-BdeDoTcn.js.map} +1 -1
- package/dist/cdn/chunks/MergeTagSuggestion-BsCAo4Co.js +213 -0
- package/dist/cdn/chunks/MergeTagSuggestion-BsCAo4Co.js.map +1 -0
- package/dist/cdn/chunks/{ModuleBrowserModal-a-tZRCcD.js → ModuleBrowserModal-Dz-I5zfj.js} +11 -8
- package/dist/cdn/chunks/{ModuleBrowserModal-a-tZRCcD.js.map → ModuleBrowserModal-Dz-I5zfj.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-Bm6k0Op0.js → ModulePreviewCanvas-BfinyuAN.js} +21 -21
- package/dist/cdn/chunks/{ModulePreviewCanvas-Bm6k0Op0.js.map → ModulePreviewCanvas-BfinyuAN.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-HTbuD3VJ.js → NumberWithSuffix-CDjEa08X.js} +4 -4
- package/dist/cdn/chunks/{NumberWithSuffix-HTbuD3VJ.js.map → NumberWithSuffix-CDjEa08X.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-pGrfSccu.js → ParagraphEditor-B3fG0vge.js} +130 -110
- package/dist/cdn/chunks/ParagraphEditor-B3fG0vge.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-D7XZix_1.js → RichTextEditorContent-C6YPCp9j.js} +4 -4
- package/dist/cdn/chunks/{RichTextEditorContent-D7XZix_1.js.map → RichTextEditorContent-C6YPCp9j.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-C9PQ9x6j.js → SaveModuleDialog-C6UIIVAM.js} +6 -6
- package/dist/cdn/chunks/{SaveModuleDialog-C9PQ9x6j.js.map → SaveModuleDialog-C6UIIVAM.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-BvFbL16O.js → TitleEditor-BiZbLYF1.js} +62 -46
- package/dist/cdn/chunks/TitleEditor-BiZbLYF1.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-BernVG06.js +22 -0
- package/dist/cdn/chunks/{blockTypeIcons-Kd1MT0u8.js.map → blockTypeIcons-BernVG06.js.map} +1 -1
- package/dist/{de-C2wOXoxs.js → cdn/chunks/de-LsV0u1tP.js} +19 -1
- package/dist/cdn/chunks/de-LsV0u1tP.js.map +1 -0
- package/dist/cdn/chunks/{draggable-Bci-fq8y.js → draggable-kG-D5Xsm.js} +19 -10
- package/dist/cdn/chunks/draggable-kG-D5Xsm.js.map +1 -0
- package/dist/cdn/chunks/{en-dR7zfNC3.js → en-Bb8X1bOs.js} +18 -2
- package/dist/cdn/chunks/en-Bb8X1bOs.js.map +1 -0
- package/dist/cdn/chunks/extensions-Drp8UDc6.js +421 -0
- package/dist/cdn/chunks/extensions-Drp8UDc6.js.map +1 -0
- package/dist/cdn/chunks/{features-DU6lA8l1.js → features-Dpczf9Su.js} +1171 -994
- package/dist/cdn/chunks/features-Dpczf9Su.js.map +1 -0
- package/dist/cdn/chunks/{icons-BjHUZZyJ.js → icons-CuxnJiGQ.js} +170 -164
- package/dist/cdn/chunks/icons-CuxnJiGQ.js.map +1 -0
- package/dist/cdn/chunks/{liquid.browser-DKKBzRQu.js → liquid.browser-BJOEu6Cg.js} +693 -678
- package/dist/cdn/chunks/liquid.browser-BJOEu6Cg.js.map +1 -0
- package/dist/cdn/chunks/{media-library-Byelliig.js → media-library-CiYl_BO7.js} +556 -554
- package/dist/cdn/chunks/{media-library-Byelliig.js.map → media-library-CiYl_BO7.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-BZ86xqK6.js → pt-BR-BwJY_cvb.js} +18 -2
- package/dist/cdn/chunks/pt-BR-BwJY_cvb.js.map +1 -0
- package/dist/cdn/chunks/{pusher-BICWUP2j.js → pusher-CIwiKF8H.js} +9 -6
- package/dist/cdn/chunks/{pusher-BICWUP2j.js.map → pusher-CIwiKF8H.js.map} +1 -1
- package/dist/cdn/chunks/quality-CNjGxBG0.js +2176 -0
- package/dist/cdn/chunks/{quality-DNnYAntR.js.map → quality-CNjGxBG0.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-CZKO-Tav.js → renderer-CFkg8h-K.js} +40 -31
- package/dist/cdn/chunks/renderer-CFkg8h-K.js.map +1 -0
- package/dist/cdn/chunks/{src-DsqSXXjk.js → src-DRpKu4Dy.js} +11 -11
- package/dist/cdn/chunks/{src-DsqSXXjk.js.map → src-DRpKu4Dy.js.map} +1 -1
- package/dist/cdn/chunks/styles-B7wryV0l.js +3943 -0
- package/dist/cdn/chunks/styles-B7wryV0l.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-CwScfbsM.js → tiptap-DF9PEiqH.js} +5429 -5373
- package/dist/cdn/chunks/tiptap-DF9PEiqH.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +117 -115
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-BRzXxFHr.js → check-rl7ok6uJ.js} +1 -1
- package/dist/{chevron-down-DmEgzmYT.js → chevron-down-BKe__NOD.js} +1 -1
- package/dist/{circle-alert-BStvZr3O.js → circle-alert-C8xmpMsK.js} +1 -1
- package/dist/{clock-Blwp_1R6.js → clock-BW4JuDCN.js} +1 -1
- package/dist/{cloud-_olro76D.js → cloud-BQusL53H.js} +208 -208
- package/dist/createLucideIcon-Dx-EjR9r.js +43 -0
- package/dist/{cdn/chunks/de-C2wOXoxs.js → de-LsV0u1tP.js} +17 -3
- package/dist/{dist-BlG7k25W.js → dist-B5Sov3sS.js} +7 -7
- package/dist/dist-BEWiuOMi.js +251 -0
- package/dist/{dist-b7Ak-CuM.js → dist-BFmE-7hB.js} +2 -2
- package/dist/{dist-o73iaGqy.js → dist-BMoa33wT.js} +2 -2
- package/dist/{dist-BctFrpeA.js → dist-BibU4HNl.js} +74 -65
- package/dist/{dist-D6x1cQeh.js → dist-BsCGIDSt.js} +103 -102
- package/dist/dist-CNLKj9wa.js +5 -0
- package/dist/{dist-DULfKmTh.js → dist-CNXDNYQn.js} +729 -695
- package/dist/{dist-412xXefB.js → dist-COG3IdPK.js} +3 -3
- package/dist/{dist-Cz79qrLL.js → dist-CQZxDvFw.js} +3 -3
- package/dist/{dist-BwgjpLfr.js → dist-CRsjOQM-.js} +2 -2
- package/dist/dist-CTT6WYJ6.js +134 -0
- package/dist/dist-Cqa6aeAJ.js +5 -0
- package/dist/{dist-BCQZZUE9.js → dist-SXJJ2v41.js} +2 -2
- package/dist/{dist-DhKTdU52.js → dist-itdjZraK.js} +1445 -1420
- package/dist/{en-dR7zfNC3.js → en-Bb8X1bOs.js} +17 -1
- package/dist/extensions-DwaZAqm6.js +423 -0
- package/dist/{image-up-BFPbw_Zq.js → image-up-BwBCmQ4P.js} +1 -1
- package/dist/index.d.ts +17 -0
- package/dist/{info-B_qLEBN2.js → info-TCn7uWR5.js} +1 -1
- package/dist/keys-Cv8-8GsD.js +10 -0
- package/dist/{liquid.browser-CVjP5Mex.js → liquid.browser-DZLtv26k.js} +692 -677
- package/dist/{list-checks-CGg7JxPm.js → list-checks-CSrOWNgq.js} +1 -1
- package/dist/{loader-circle-CDF8eR_Q.js → loader-circle-BLmicnPG.js} +1 -1
- package/dist/{message-circle-C3cHsCJl.js → message-circle-C9hHMQCI.js} +1 -1
- package/dist/{pt-BR-BZ86xqK6.js → pt-BR-BwJY_cvb.js} +17 -1
- package/dist/{refresh-cw-Butml7Q4.js → refresh-cw-D1JQ1LNa.js} +1 -1
- package/dist/runtime-dom.esm-bundler-BzuoCyNp.js +523 -0
- package/dist/scan-line-DgijVq9y.js +31 -0
- package/dist/{send-k7npFJNO.js → send-DjPdq69F.js} +1 -1
- package/dist/{shield-check-CV6GbmCu.js → shield-check-Bqluu8FS.js} +1 -1
- package/dist/{sparkles-C965Xop4.js → sparkles-M4azPVSP.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/styles-D7fQ7f_1.js +4164 -0
- package/dist/templatical-editor.js +155 -152
- package/dist/{text-align-start-Bxnps8fH.js → text-align-start-CMya5pCQ.js} +11 -11
- package/dist/{trash-2-DpGb7fIt.js → trash-2-C-81rkLS.js} +1 -1
- package/dist/{triangle-alert-BKYElAwz.js → triangle-alert-BuRWnynk.js} +1 -1
- package/dist/{upload-BF7sxd1_.js → upload-CWBIoLd4.js} +1 -1
- package/dist/{useAliveFlag-BinvbqQR.js → useAliveFlag-CECL_OUb.js} +1 -1
- package/dist/{useCloudI18n-L3H2XvdW.js → useCloudI18n-AKCy98qD.js} +2 -2
- package/dist/{useEditorCore-DKYZ7aKk.js → useEditorCore-vcWLdnjN.js} +1480 -1310
- package/dist/{useI18n-CTs_bP9d.js → useI18n-C-TDeJBt.js} +2 -2
- package/dist/{useMergeTag-e3RSY-s3.js → useMergeTag-DSrBY0-2.js} +6 -6
- package/dist/usePopoverRoot-DKUDnr55.js +8 -0
- package/dist/{vue.runtime.esm-bundler-B2k01iQh.js → vue.runtime.esm-bundler-l0XAqiyv.js} +639 -1151
- package/dist/{x-CGjkjdKK.js → x-CQSvXnGR.js} +1 -1
- package/package.json +27 -27
- package/dist/CloudEditor-DaEfipBn.js +0 -1230
- package/dist/CountdownBlock-DO9fziwf.js +0 -92
- package/dist/CountdownToolbar-BeII06yJ.js +0 -210
- package/dist/ModuleBrowserModal-DsZRr87F.js +0 -198
- package/dist/ParagraphEditor-CZ-cmhX3.js +0 -700
- package/dist/TitleEditor-DbNOcvhR.js +0 -177
- package/dist/cdn/chunks/CloudEditor-BZuzsQOZ.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-pGrfSccu.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-BvFbL16O.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-Kd1MT0u8.js +0 -22
- package/dist/cdn/chunks/de-C2wOXoxs.js.map +0 -1
- package/dist/cdn/chunks/draggable-Bci-fq8y.js.map +0 -1
- package/dist/cdn/chunks/en-dR7zfNC3.js.map +0 -1
- package/dist/cdn/chunks/extensions-CuUjSmuA.js +0 -605
- package/dist/cdn/chunks/extensions-CuUjSmuA.js.map +0 -1
- package/dist/cdn/chunks/features-DU6lA8l1.js.map +0 -1
- package/dist/cdn/chunks/icons-BjHUZZyJ.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-DKKBzRQu.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-BZ86xqK6.js.map +0 -1
- package/dist/cdn/chunks/quality-DNnYAntR.js +0 -2176
- package/dist/cdn/chunks/renderer-CZKO-Tav.js.map +0 -1
- package/dist/cdn/chunks/styles-DiAdtiz9.js +0 -3428
- package/dist/cdn/chunks/styles-DiAdtiz9.js.map +0 -1
- package/dist/cdn/chunks/tiptap-CwScfbsM.js.map +0 -1
- package/dist/createLucideIcon-CmPAC-gt.js +0 -43
- package/dist/dist-BNEdeWub.js +0 -5
- package/dist/dist-Cgry6fNv.js +0 -382
- package/dist/dist-u0iIJH3V.js +0 -5
- package/dist/extensions-XPlNAKIL.js +0 -1720
- package/dist/keys-mFiJ5N0_.js +0 -10
- package/dist/scan-line-XYEqim_E.js +0 -25
- package/dist/styles-D0RCAWhB.js +0 -3647
- package/dist/usePopoverRoot-DVh7NY1q.js +0 -8
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
import { A as e,
|
|
2
|
-
import { t as
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
1
|
+
import { A as e, Dt as t, Et as n, N as r, O as i, Ot as a, R as o, Y as s, _ as c, c as l, d as u, h as d, j as f, l as p, nt as m, r as h, s as g, u as _ } from "./vue.runtime.esm-bundler-l0XAqiyv.js";
|
|
2
|
+
import { s as v, t as y } from "./runtime-dom.esm-bundler-BzuoCyNp.js";
|
|
3
|
+
import { t as b } from "./dist-BEWiuOMi.js";
|
|
4
|
+
import { t as ee } from "./useI18n-C-TDeJBt.js";
|
|
5
|
+
import { t as te } from "./x-CQSvXnGR.js";
|
|
6
|
+
import { h as x, m as S, p as C, u as ne } from "./styleConstants-lGobwiLH.js";
|
|
6
7
|
//#region ../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/utils/math.js
|
|
7
|
-
var
|
|
8
|
+
var w = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, T = (e, t = 0, n = 10 ** t) => Math.round(n * e) / n;
|
|
8
9
|
360 / (Math.PI * 2);
|
|
9
|
-
var
|
|
10
|
+
var E = (e) => ae(D(e)), D = (e) => (e[0] === "#" && (e = e.substring(1)), e.length < 6 ? {
|
|
10
11
|
r: parseInt(e[0] + e[0], 16),
|
|
11
12
|
g: parseInt(e[1] + e[1], 16),
|
|
12
13
|
b: parseInt(e[2] + e[2], 16),
|
|
13
|
-
a: e.length === 4 ?
|
|
14
|
+
a: e.length === 4 ? T(parseInt(e[3] + e[3], 16) / 255, 2) : 1
|
|
14
15
|
} : {
|
|
15
16
|
r: parseInt(e.substring(0, 2), 16),
|
|
16
17
|
g: parseInt(e.substring(2, 4), 16),
|
|
17
18
|
b: parseInt(e.substring(4, 6), 16),
|
|
18
|
-
a: e.length === 8 ?
|
|
19
|
-
}),
|
|
19
|
+
a: e.length === 8 ? T(parseInt(e.substring(6, 8), 16) / 255, 2) : 1
|
|
20
|
+
}), O = (e) => ie(re(e)), k = ({ h: e, s: t, v: n, a: r }) => {
|
|
20
21
|
let i = (200 - t) * n / 100;
|
|
21
22
|
return {
|
|
22
|
-
h:
|
|
23
|
-
s:
|
|
24
|
-
l:
|
|
25
|
-
a:
|
|
23
|
+
h: T(e),
|
|
24
|
+
s: T(i > 0 && i < 200 ? t * n / 100 / (i <= 100 ? i : 200 - i) * 100 : 0),
|
|
25
|
+
l: T(i / 2),
|
|
26
|
+
a: T(r, 2)
|
|
26
27
|
};
|
|
27
|
-
},
|
|
28
|
-
let { h: t, s: n, l: r } =
|
|
28
|
+
}, A = (e) => {
|
|
29
|
+
let { h: t, s: n, l: r } = k(e);
|
|
29
30
|
return `hsl(${t}, ${n}%, ${r}%)`;
|
|
30
|
-
},
|
|
31
|
+
}, re = ({ h: e, s: t, v: n, a: r }) => {
|
|
31
32
|
e = e / 360 * 6, t /= 100, n /= 100;
|
|
32
33
|
let i = Math.floor(e), a = n * (1 - t), o = n * (1 - (e - i) * t), s = n * (1 - (1 - e + i) * t), c = i % 6;
|
|
33
34
|
return {
|
|
34
|
-
r:
|
|
35
|
+
r: T([
|
|
35
36
|
n,
|
|
36
37
|
o,
|
|
37
38
|
a,
|
|
@@ -39,7 +40,7 @@ var C = (e) => j(w(e)), w = (e) => (e[0] === "#" && (e = e.substring(1)), e.leng
|
|
|
39
40
|
s,
|
|
40
41
|
n
|
|
41
42
|
][c] * 255),
|
|
42
|
-
g:
|
|
43
|
+
g: T([
|
|
43
44
|
s,
|
|
44
45
|
n,
|
|
45
46
|
n,
|
|
@@ -47,7 +48,7 @@ var C = (e) => j(w(e)), w = (e) => (e[0] === "#" && (e = e.substring(1)), e.leng
|
|
|
47
48
|
a,
|
|
48
49
|
a
|
|
49
50
|
][c] * 255),
|
|
50
|
-
b:
|
|
51
|
+
b: T([
|
|
51
52
|
a,
|
|
52
53
|
a,
|
|
53
54
|
s,
|
|
@@ -55,62 +56,62 @@ var C = (e) => j(w(e)), w = (e) => (e[0] === "#" && (e = e.substring(1)), e.leng
|
|
|
55
56
|
n,
|
|
56
57
|
o
|
|
57
58
|
][c] * 255),
|
|
58
|
-
a:
|
|
59
|
+
a: T(r, 2)
|
|
59
60
|
};
|
|
60
|
-
},
|
|
61
|
+
}, j = (e) => {
|
|
61
62
|
let t = e.toString(16);
|
|
62
63
|
return t.length < 2 ? "0" + t : t;
|
|
63
|
-
},
|
|
64
|
-
let i = r < 1 ?
|
|
65
|
-
return "#" +
|
|
66
|
-
},
|
|
64
|
+
}, ie = ({ r: e, g: t, b: n, a: r }) => {
|
|
65
|
+
let i = r < 1 ? j(T(r * 255)) : "";
|
|
66
|
+
return "#" + j(e) + j(t) + j(n) + i;
|
|
67
|
+
}, ae = ({ r: e, g: t, b: n, a: r }) => {
|
|
67
68
|
let i = Math.max(e, t, n), a = i - Math.min(e, t, n), o = a ? i === e ? (t - n) / a : i === t ? 2 + (n - e) / a : 4 + (e - t) / a : 0;
|
|
68
69
|
return {
|
|
69
|
-
h:
|
|
70
|
-
s:
|
|
71
|
-
v:
|
|
70
|
+
h: T(60 * (o < 0 ? o + 6 : o)),
|
|
71
|
+
s: T(i ? a / i * 100 : 0),
|
|
72
|
+
v: T(i / 255 * 100),
|
|
72
73
|
a: r
|
|
73
74
|
};
|
|
74
75
|
}, M = (e, t) => {
|
|
75
76
|
if (e === t) return !0;
|
|
76
77
|
for (let n in e) if (e[n] !== t[n]) return !1;
|
|
77
78
|
return !0;
|
|
78
|
-
},
|
|
79
|
-
let t =
|
|
80
|
-
return t || (t = document.createElement("template"), t.innerHTML = e,
|
|
81
|
-
},
|
|
79
|
+
}, N = (e, t) => e.toLowerCase() === t.toLowerCase() || M(D(e), D(t)), P = {}, F = (e) => {
|
|
80
|
+
let t = P[e];
|
|
81
|
+
return t || (t = document.createElement("template"), t.innerHTML = e, P[e] = t), t;
|
|
82
|
+
}, I = (e, t, n) => {
|
|
82
83
|
e.dispatchEvent(new CustomEvent(t, {
|
|
83
84
|
bubbles: !0,
|
|
84
85
|
detail: n
|
|
85
86
|
}));
|
|
86
|
-
},
|
|
87
|
-
let n =
|
|
88
|
-
|
|
89
|
-
x:
|
|
90
|
-
y:
|
|
87
|
+
}, L = !1, R = (e) => "touches" in e, oe = (e) => L && !R(e) ? !1 : (L ||= R(e), !0), z = (e, t) => {
|
|
88
|
+
let n = R(t) ? t.touches[0] : t, r = e.el.getBoundingClientRect();
|
|
89
|
+
I(e.el, "move", e.getMove({
|
|
90
|
+
x: w((n.pageX - (r.left + window.pageXOffset)) / r.width),
|
|
91
|
+
y: w((n.pageY - (r.top + window.pageYOffset)) / r.height)
|
|
91
92
|
}));
|
|
92
93
|
}, B = (e, t) => {
|
|
93
94
|
let n = t.keyCode;
|
|
94
|
-
n > 40 || e.xy && n < 37 || n < 33 || (t.preventDefault(),
|
|
95
|
+
n > 40 || e.xy && n < 37 || n < 33 || (t.preventDefault(), I(e.el, "move", e.getMove({
|
|
95
96
|
x: n === 39 ? .01 : n === 37 ? -.01 : n === 34 ? .05 : n === 33 ? -.05 : n === 35 ? 1 : n === 36 ? -1 : 0,
|
|
96
97
|
y: n === 40 ? .01 : n === 38 ? -.01 : 0
|
|
97
98
|
}, !0)));
|
|
98
99
|
}, V = class {
|
|
99
100
|
constructor(e, t, n, r) {
|
|
100
|
-
let i =
|
|
101
|
+
let i = F(`<div role="slider" tabindex="0" part="${t}" ${n}><div part="${t}-pointer"></div></div>`);
|
|
101
102
|
e.appendChild(i.content.cloneNode(!0));
|
|
102
103
|
let a = e.querySelector(`[part=${t}]`);
|
|
103
104
|
a.addEventListener("mousedown", this), a.addEventListener("touchstart", this), a.addEventListener("keydown", this), this.el = a, this.xy = r, this.nodes = [a.firstChild, a];
|
|
104
105
|
}
|
|
105
106
|
set dragging(e) {
|
|
106
107
|
let t = e ? document.addEventListener : document.removeEventListener;
|
|
107
|
-
t(
|
|
108
|
+
t(L ? "touchmove" : "mousemove", this), t(L ? "touchend" : "mouseup", this);
|
|
108
109
|
}
|
|
109
110
|
handleEvent(e) {
|
|
110
111
|
switch (e.type) {
|
|
111
112
|
case "mousedown":
|
|
112
113
|
case "touchstart":
|
|
113
|
-
if (e.preventDefault(), !
|
|
114
|
+
if (e.preventDefault(), !oe(e) || !L && e.button != 0) return;
|
|
114
115
|
this.el.focus(), z(this, e), this.dragging = !0;
|
|
115
116
|
break;
|
|
116
117
|
case "mousemove":
|
|
@@ -138,16 +139,16 @@ var C = (e) => j(w(e)), w = (e) => (e[0] === "#" && (e = e.substring(1)), e.leng
|
|
|
138
139
|
update({ h: e }) {
|
|
139
140
|
this.h = e, this.style([{
|
|
140
141
|
left: `${e / 360 * 100}%`,
|
|
141
|
-
color:
|
|
142
|
+
color: A({
|
|
142
143
|
h: e,
|
|
143
144
|
s: 100,
|
|
144
145
|
v: 100,
|
|
145
146
|
a: 1
|
|
146
147
|
})
|
|
147
|
-
}]), this.el.setAttribute("aria-valuenow", `${
|
|
148
|
+
}]), this.el.setAttribute("aria-valuenow", `${T(e)}`);
|
|
148
149
|
}
|
|
149
150
|
getMove(e, t) {
|
|
150
|
-
return { h: t ?
|
|
151
|
+
return { h: t ? w(this.h + e.x * 360, 0, 360) : 360 * e.x };
|
|
151
152
|
}
|
|
152
153
|
}, U = class extends V {
|
|
153
154
|
constructor(e) {
|
|
@@ -157,18 +158,18 @@ var C = (e) => j(w(e)), w = (e) => (e[0] === "#" && (e = e.substring(1)), e.leng
|
|
|
157
158
|
this.hsva = e, this.style([{
|
|
158
159
|
top: `${100 - e.v}%`,
|
|
159
160
|
left: `${e.s}%`,
|
|
160
|
-
color:
|
|
161
|
-
}, { "background-color":
|
|
161
|
+
color: A(e)
|
|
162
|
+
}, { "background-color": A({
|
|
162
163
|
h: e.h,
|
|
163
164
|
s: 100,
|
|
164
165
|
v: 100,
|
|
165
166
|
a: 1
|
|
166
|
-
}) }]), this.el.setAttribute("aria-valuetext", `Saturation ${
|
|
167
|
+
}) }]), this.el.setAttribute("aria-valuetext", `Saturation ${T(e.s)}%, Brightness ${T(e.v)}%`);
|
|
167
168
|
}
|
|
168
169
|
getMove(e, t) {
|
|
169
170
|
return {
|
|
170
|
-
s: t ?
|
|
171
|
-
v: t ?
|
|
171
|
+
s: t ? w(this.hsva.s + e.x * 100, 0, 100) : e.x * 100,
|
|
172
|
+
v: t ? w(this.hsva.v - e.y * 100, 0, 100) : Math.round(100 - e.y * 100)
|
|
172
173
|
};
|
|
173
174
|
}
|
|
174
175
|
}, W = ":host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:\"\";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}", G = "[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}", K = "[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}", q = Symbol("same"), J = Symbol("color"), Y = Symbol("hsva"), X = Symbol("update"), Z = Symbol("parts"), Q = Symbol("css"), $ = Symbol("sliders"), se = class extends HTMLElement {
|
|
@@ -196,7 +197,7 @@ var C = (e) => j(w(e)), w = (e) => (e[0] === "#" && (e = e.substring(1)), e.leng
|
|
|
196
197
|
}
|
|
197
198
|
constructor() {
|
|
198
199
|
super();
|
|
199
|
-
let e =
|
|
200
|
+
let e = F(`<style>${this[Q].join("")}</style>`), t = this.attachShadow({ mode: "open" });
|
|
200
201
|
t.appendChild(e.content.cloneNode(!0)), t.addEventListener("move", this), this[Z] = this[$].map((e) => new e(t));
|
|
201
202
|
}
|
|
202
203
|
connectedCallback() {
|
|
@@ -216,7 +217,7 @@ var C = (e) => j(w(e)), w = (e) => (e[0] === "#" && (e = e.substring(1)), e.leng
|
|
|
216
217
|
};
|
|
217
218
|
this[X](n);
|
|
218
219
|
let r;
|
|
219
|
-
!M(n, t) && !this[q](r = this.colorModel.fromHsva(n)) && (this[J] = r,
|
|
220
|
+
!M(n, t) && !this[q](r = this.colorModel.fromHsva(n)) && (this[J] = r, I(this, "color-changed", { value: r }));
|
|
220
221
|
}
|
|
221
222
|
[q](e) {
|
|
222
223
|
return this.color && this.colorModel.equal(e, this.color);
|
|
@@ -226,14 +227,14 @@ var C = (e) => j(w(e)), w = (e) => (e[0] === "#" && (e = e.substring(1)), e.leng
|
|
|
226
227
|
}
|
|
227
228
|
}, ce = {
|
|
228
229
|
defaultColor: "#000",
|
|
229
|
-
toHsva:
|
|
230
|
-
fromHsva: ({ h: e, s: t, v: n }) =>
|
|
230
|
+
toHsva: E,
|
|
231
|
+
fromHsva: ({ h: e, s: t, v: n }) => O({
|
|
231
232
|
h: e,
|
|
232
233
|
s: t,
|
|
233
234
|
v: n,
|
|
234
235
|
a: 1
|
|
235
236
|
}),
|
|
236
|
-
equal:
|
|
237
|
+
equal: N,
|
|
237
238
|
fromAttr: (e) => e
|
|
238
239
|
}, le = class extends se {
|
|
239
240
|
get colorModel() {
|
|
@@ -255,7 +256,7 @@ var de = [
|
|
|
255
256
|
"placeholder",
|
|
256
257
|
"disabled",
|
|
257
258
|
"aria-label"
|
|
258
|
-
], me = ["aria-label", "title"], he = ["color", "aria-label"], ge = /* @__PURE__ */
|
|
259
|
+
], me = ["aria-label", "title"], he = ["color", "aria-label"], ge = /* @__PURE__ */ c({
|
|
259
260
|
__name: "ColorPicker",
|
|
260
261
|
props: {
|
|
261
262
|
modelValue: {},
|
|
@@ -271,67 +272,67 @@ var de = [
|
|
|
271
272
|
}
|
|
272
273
|
},
|
|
273
274
|
emits: ["update:modelValue"],
|
|
274
|
-
setup(
|
|
275
|
-
let
|
|
276
|
-
|
|
275
|
+
setup(e, { emit: r }) {
|
|
276
|
+
let a = e, c = r, { t: f } = ee(), p = s(!1), h = s(), x = s(), S = s(!1);
|
|
277
|
+
b(h, () => {
|
|
277
278
|
p.value = !1;
|
|
278
|
-
}, { ignore: [
|
|
279
|
-
let
|
|
280
|
-
function
|
|
281
|
-
|
|
279
|
+
}, { ignore: [x] });
|
|
280
|
+
let C = g(() => !a.modelValue), w = g(() => a.modelValue || a.seedColor), T = g(() => !a.swatchOnly && !a.disabled && !C.value);
|
|
281
|
+
function E(e) {
|
|
282
|
+
S.value = !0, c("update:modelValue", e.detail.value);
|
|
282
283
|
}
|
|
283
|
-
function
|
|
284
|
-
|
|
284
|
+
function D() {
|
|
285
|
+
S.value = !1;
|
|
285
286
|
}
|
|
286
|
-
function
|
|
287
|
-
!
|
|
287
|
+
function O() {
|
|
288
|
+
!S.value && C.value && c("update:modelValue", w.value);
|
|
288
289
|
}
|
|
289
|
-
function
|
|
290
|
-
|
|
290
|
+
function k(e) {
|
|
291
|
+
c("update:modelValue", e.target.value);
|
|
291
292
|
}
|
|
292
|
-
function
|
|
293
|
-
|
|
293
|
+
function A() {
|
|
294
|
+
c("update:modelValue", "");
|
|
294
295
|
}
|
|
295
|
-
return (
|
|
296
|
-
|
|
296
|
+
return (r, a) => (i(), u("div", { class: n(["tpl:flex tpl:items-center tpl:gap-2 tpl:relative", e.disabled && "tpl:opacity-60 tpl:cursor-not-allowed"]) }, [
|
|
297
|
+
l("button", {
|
|
297
298
|
ref_key: "swatchRef",
|
|
298
|
-
ref:
|
|
299
|
+
ref: x,
|
|
299
300
|
type: "button",
|
|
300
|
-
disabled:
|
|
301
|
-
"aria-label": m(
|
|
301
|
+
disabled: e.disabled,
|
|
302
|
+
"aria-label": m(f).colorPicker.pickColor,
|
|
302
303
|
"aria-expanded": p.value,
|
|
303
|
-
class:
|
|
304
|
+
class: n([
|
|
304
305
|
"tpl:shrink-0 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-0.5 tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
|
|
305
|
-
|
|
306
|
-
p.value ? "tpl:border-[var(--tpl-primary)] tpl:shadow-[var(--tpl-ring)]" : !
|
|
306
|
+
e.disabled ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer",
|
|
307
|
+
p.value ? "tpl:border-[var(--tpl-primary)] tpl:shadow-[var(--tpl-ring)]" : !e.disabled && "hover:tpl:border-[var(--tpl-text-dim)]",
|
|
307
308
|
"tpl:size-10"
|
|
308
309
|
]),
|
|
309
|
-
onClick:
|
|
310
|
-
}, [
|
|
311
|
-
class:
|
|
312
|
-
style:
|
|
310
|
+
onClick: a[0] ||= (t) => !e.disabled && (p.value = !p.value)
|
|
311
|
+
}, [l("span", {
|
|
312
|
+
class: n(["tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]", { "tpl-color-swatch-empty": C.value }]),
|
|
313
|
+
style: t(C.value ? void 0 : { backgroundColor: e.modelValue })
|
|
313
314
|
}, null, 6)], 10, de),
|
|
314
|
-
|
|
315
|
+
e.swatchOnly ? _("", !0) : (i(), u("div", fe, [l("input", {
|
|
315
316
|
type: "text",
|
|
316
|
-
class:
|
|
317
|
-
style:
|
|
318
|
-
value:
|
|
319
|
-
placeholder:
|
|
320
|
-
disabled:
|
|
321
|
-
"aria-label": m(
|
|
322
|
-
onInput:
|
|
323
|
-
}, null, 46, pe),
|
|
317
|
+
class: n([m(ne), "tpl:w-full"]),
|
|
318
|
+
style: t(T.value ? { paddingRight: "2.25rem" } : void 0),
|
|
319
|
+
value: e.modelValue,
|
|
320
|
+
placeholder: e.placeholder || m(f).colorPicker.notSet,
|
|
321
|
+
disabled: e.disabled,
|
|
322
|
+
"aria-label": m(f).colorPicker.hexValue,
|
|
323
|
+
onInput: k
|
|
324
|
+
}, null, 46, pe), T.value ? (i(), u("button", {
|
|
324
325
|
key: 0,
|
|
325
326
|
type: "button",
|
|
326
|
-
"aria-label": m(
|
|
327
|
-
title: m(
|
|
327
|
+
"aria-label": m(f).colorPicker.clear,
|
|
328
|
+
title: m(f).colorPicker.clear,
|
|
328
329
|
class: "tpl:absolute tpl:right-2 tpl:top-1/2 tpl:flex tpl:size-6 tpl:-translate-y-1/2 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:bg-[var(--tpl-bg-hover)] hover:tpl:text-[var(--tpl-text)]",
|
|
329
|
-
onClick:
|
|
330
|
-
}, [
|
|
330
|
+
onClick: A
|
|
331
|
+
}, [d(m(te), {
|
|
331
332
|
size: 14,
|
|
332
333
|
"stroke-width": 1.5
|
|
333
|
-
})], 8, me)) :
|
|
334
|
-
|
|
334
|
+
})], 8, me)) : _("", !0)])),
|
|
335
|
+
d(y, {
|
|
335
336
|
"enter-active-class": "tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
|
|
336
337
|
"enter-from-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1",
|
|
337
338
|
"enter-to-class": "tpl:opacity-100 tpl:scale-100 tpl:translate-y-0",
|
|
@@ -339,19 +340,19 @@ var de = [
|
|
|
339
340
|
"leave-from-class": "tpl:opacity-100 tpl:scale-100 tpl:translate-y-0",
|
|
340
341
|
"leave-to-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1"
|
|
341
342
|
}, {
|
|
342
|
-
default:
|
|
343
|
+
default: o(() => [p.value ? (i(), u("div", {
|
|
343
344
|
key: 0,
|
|
344
345
|
ref_key: "popoverRef",
|
|
345
346
|
ref: h,
|
|
346
347
|
class: "tpl:absolute tpl:left-0 tpl:top-full tpl:z-50 tpl:mt-2 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-3 tpl:shadow-lg"
|
|
347
|
-
}, [
|
|
348
|
-
color:
|
|
349
|
-
"aria-label": m(
|
|
350
|
-
onColorChanged:
|
|
351
|
-
onPointerdown:
|
|
352
|
-
onPointerup:
|
|
353
|
-
onKeydown:
|
|
354
|
-
}, null, 40, he)], 512)) :
|
|
348
|
+
}, [l("hex-color-picker", {
|
|
349
|
+
color: w.value,
|
|
350
|
+
"aria-label": m(f).colorPicker.pickColor,
|
|
351
|
+
onColorChanged: E,
|
|
352
|
+
onPointerdown: D,
|
|
353
|
+
onPointerup: O,
|
|
354
|
+
onKeydown: a[1] ||= v((e) => p.value = !1, ["escape"])
|
|
355
|
+
}, null, 40, he)], 512)) : _("", !0)]),
|
|
355
356
|
_: 1
|
|
356
357
|
})
|
|
357
358
|
], 2));
|
|
@@ -361,65 +362,65 @@ var de = [
|
|
|
361
362
|
"aria-label",
|
|
362
363
|
"title",
|
|
363
364
|
"onClick"
|
|
364
|
-
], ve = { key: 1 }, ye = /* @__PURE__ */
|
|
365
|
+
], ve = { key: 1 }, ye = /* @__PURE__ */ c({
|
|
365
366
|
__name: "SlidingPillSelect",
|
|
366
367
|
props: {
|
|
367
368
|
options: {},
|
|
368
369
|
modelValue: {}
|
|
369
370
|
},
|
|
370
371
|
emits: ["update:modelValue"],
|
|
371
|
-
setup(
|
|
372
|
-
let
|
|
373
|
-
return (
|
|
372
|
+
setup(n, { emit: o }) {
|
|
373
|
+
let s = n, c = o, l = g(() => s.options.findIndex((e) => e.value === s.modelValue)), d = g(() => `translateX(${Math.max(l.value, 0) * 100}%)`);
|
|
374
|
+
return (o, s) => (i(), u("div", {
|
|
374
375
|
role: "radiogroup",
|
|
375
376
|
class: "tpl:relative tpl:grid tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1",
|
|
376
|
-
style:
|
|
377
|
-
gridTemplateColumns: `repeat(${
|
|
377
|
+
style: t({
|
|
378
|
+
gridTemplateColumns: `repeat(${n.options.length}, 1fr)`,
|
|
378
379
|
backgroundColor: "var(--tpl-bg-hover)"
|
|
379
380
|
})
|
|
380
|
-
}, [
|
|
381
|
+
}, [l.value >= 0 ? (i(), u("div", {
|
|
381
382
|
key: 0,
|
|
382
383
|
class: "tpl:absolute tpl:inset-y-1 tpl:rounded-[var(--tpl-radius-sm)]",
|
|
383
|
-
style:
|
|
384
|
+
style: t({
|
|
384
385
|
left: "4px",
|
|
385
|
-
width: `calc((100% - 8px) / ${
|
|
386
|
-
transform:
|
|
386
|
+
width: `calc((100% - 8px) / ${n.options.length})`,
|
|
387
|
+
transform: d.value,
|
|
387
388
|
backgroundColor: "var(--tpl-bg)",
|
|
388
389
|
boxShadow: "var(--tpl-shadow)",
|
|
389
390
|
transition: "transform 120ms cubic-bezier(0.16, 1, 0.3, 1)"
|
|
390
391
|
})
|
|
391
|
-
}, null, 4)) :
|
|
392
|
-
key:
|
|
392
|
+
}, null, 4)) : _("", !0), (i(!0), u(h, null, e(n.options, (e) => (i(), u("button", {
|
|
393
|
+
key: e.value,
|
|
393
394
|
role: "radio",
|
|
394
|
-
"aria-checked":
|
|
395
|
-
"aria-label":
|
|
395
|
+
"aria-checked": n.modelValue === e.value,
|
|
396
|
+
"aria-label": e.label,
|
|
396
397
|
class: "tpl:relative tpl:z-10 tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-2.5 tpl:py-[5px] tpl:text-xs tpl:font-medium",
|
|
397
|
-
style:
|
|
398
|
-
color:
|
|
398
|
+
style: t({
|
|
399
|
+
color: n.modelValue === e.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
399
400
|
transition: "color 120ms cubic-bezier(0.16, 1, 0.3, 1)"
|
|
400
401
|
}),
|
|
401
|
-
title:
|
|
402
|
-
onClick: (
|
|
403
|
-
}, [
|
|
402
|
+
title: e.label,
|
|
403
|
+
onClick: (t) => c("update:modelValue", e.value)
|
|
404
|
+
}, [e.icon ? (i(), p(r(e.icon), {
|
|
404
405
|
key: 0,
|
|
405
406
|
size: 14,
|
|
406
407
|
"stroke-width": 2
|
|
407
|
-
})) : (
|
|
408
|
+
})) : (i(), u("span", ve, a(e.label), 1))], 12, _e))), 128))], 4));
|
|
408
409
|
}
|
|
409
|
-
}), be = { class: "tpl:mb-3.5" }, xe = /* @__PURE__ */
|
|
410
|
+
}), be = { class: "tpl:mb-3.5" }, xe = /* @__PURE__ */ c({
|
|
410
411
|
__name: "FieldRow",
|
|
411
412
|
props: { label: {} },
|
|
412
|
-
setup(
|
|
413
|
-
return (
|
|
413
|
+
setup(e) {
|
|
414
|
+
return (t, r) => (i(), u("div", be, [e.label ? (i(), u("label", {
|
|
414
415
|
key: 0,
|
|
415
|
-
class:
|
|
416
|
-
},
|
|
416
|
+
class: n(m(x))
|
|
417
|
+
}, a(e.label), 3)) : _("", !0), f(t.$slots, "default")]));
|
|
417
418
|
}
|
|
418
419
|
}), Se = { class: "tpl:flex tpl:items-stretch" }, Ce = [
|
|
419
420
|
"value",
|
|
420
421
|
"min",
|
|
421
422
|
"max"
|
|
422
|
-
], we = /* @__PURE__ */
|
|
423
|
+
], we = /* @__PURE__ */ c({
|
|
423
424
|
__name: "NumberWithSuffix",
|
|
424
425
|
props: {
|
|
425
426
|
modelValue: {},
|
|
@@ -428,16 +429,16 @@ var de = [
|
|
|
428
429
|
suffix: {}
|
|
429
430
|
},
|
|
430
431
|
emits: ["update:modelValue"],
|
|
431
|
-
setup(
|
|
432
|
-
let r =
|
|
433
|
-
return (
|
|
432
|
+
setup(e, { emit: t }) {
|
|
433
|
+
let r = t;
|
|
434
|
+
return (t, o) => (i(), u("div", Se, [l("input", {
|
|
434
435
|
type: "number",
|
|
435
|
-
class:
|
|
436
|
-
value:
|
|
437
|
-
min:
|
|
438
|
-
max:
|
|
439
|
-
onInput:
|
|
440
|
-
}, null, 42, Ce),
|
|
436
|
+
class: n(m(C)),
|
|
437
|
+
value: e.modelValue,
|
|
438
|
+
min: e.min,
|
|
439
|
+
max: e.max,
|
|
440
|
+
onInput: o[0] ||= (e) => r("update:modelValue", Number(e.target.value))
|
|
441
|
+
}, null, 42, Ce), l("span", { class: n(m(S)) }, a(e.suffix), 3)]));
|
|
441
442
|
}
|
|
442
443
|
});
|
|
443
444
|
//#endregion
|