@shibui-ui/ui 1.24.1 → 1.25.1
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/components/atoms/index.d.ts +45 -16
- package/dist/components/atoms/index.d.ts.map +1 -1
- package/dist/components/molecules/index.d.ts +20 -1
- package/dist/components/molecules/index.d.ts.map +1 -1
- package/dist/components/organisms/index.d.ts +17 -1
- package/dist/components/organisms/index.d.ts.map +1 -1
- package/dist/index.d.ts +3 -82
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +79 -80
- package/dist/index.js.map +1 -1
- package/dist/index10.js +82 -18
- package/dist/index10.js.map +1 -1
- package/dist/index11.js +84 -69
- package/dist/index11.js.map +1 -1
- package/dist/index12.js +40 -26
- package/dist/index12.js.map +1 -1
- package/dist/index13.js +16 -39
- package/dist/index13.js.map +1 -1
- package/dist/index14.js +29 -44
- package/dist/index14.js.map +1 -1
- package/dist/index15.js +16 -117
- package/dist/index15.js.map +1 -1
- package/dist/index16.js +48 -40
- package/dist/index16.js.map +1 -1
- package/dist/index17.js +41 -25
- package/dist/index17.js.map +1 -1
- package/dist/index18.js +76 -49
- package/dist/index18.js.map +1 -1
- package/dist/index19.js +19 -39
- package/dist/index19.js.map +1 -1
- package/dist/index194.js +94 -24
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +2 -2
- package/dist/index197.js +2 -24
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +74 -2
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +64 -35
- package/dist/index199.js.map +1 -1
- package/dist/index20.js +21 -41
- package/dist/index20.js.map +1 -1
- package/dist/index200.js +2 -2
- package/dist/index201.js +54 -13
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +2 -2
- package/dist/index203.js +2 -2
- package/dist/index204.js +143 -157
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +43 -24
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +51 -2
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +2 -11
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +33 -2
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +2 -91
- package/dist/index209.js.map +1 -1
- package/dist/index21.js +90 -26
- package/dist/index21.js.map +1 -1
- package/dist/index210.js +6 -2
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +2 -41
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +260 -2
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +16 -5
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +2 -2
- package/dist/index215.js +2 -35
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +59 -42
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +32 -2
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +2 -85
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +2 -2
- package/dist/index22.js +41 -48
- package/dist/index22.js.map +1 -1
- package/dist/index220.js +73 -65
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +81 -2
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +2 -10
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +133 -2
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +2 -26
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +2 -2
- package/dist/index226.js +66 -12
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +97 -2
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +2 -2
- package/dist/index229.js +62 -24
- package/dist/index229.js.map +1 -1
- package/dist/index23.js +50 -94
- package/dist/index23.js.map +1 -1
- package/dist/index230.js +2 -2
- package/dist/index231.js +2 -2
- package/dist/index232.js +12 -2
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +5 -16
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +2 -2
- package/dist/index235.js +11 -9
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +2 -2
- package/dist/index237.js +76 -34
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +2 -2
- package/dist/index239.js +2 -27
- package/dist/index239.js.map +1 -1
- package/dist/index24.js +37 -34
- package/dist/index24.js.map +1 -1
- package/dist/index240.js +39 -2
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +2 -34
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +235 -12
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +82 -2
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +2 -9
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +94 -2
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +2 -5
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +268 -2
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +2 -36
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +21 -2
- package/dist/index249.js.map +1 -1
- package/dist/index25.js +51 -32
- package/dist/index25.js.map +1 -1
- package/dist/index250.js +2 -31
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +9 -2
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +2 -19
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +15 -2
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +2 -2
- package/dist/index255.js +135 -69
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +2 -11
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +5 -2
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +2 -78
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +9 -2
- package/dist/index259.js.map +1 -1
- package/dist/index26.js +31 -236
- package/dist/index26.js.map +1 -1
- package/dist/index260.js +2 -32
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +2 -2
- package/dist/index262.js +92 -9
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +59 -2
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +2 -16
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +41 -2
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +2 -16
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +34 -9
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +8 -54
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +2 -2
- package/dist/index27.js +27 -58
- package/dist/index27.js.map +1 -1
- package/dist/index270.js +42 -7
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +2 -2
- package/dist/index272.js +2 -34
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +16 -2
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +9 -2
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +6 -13
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +2 -2
- package/dist/index277.js +8 -15
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +2 -2
- package/dist/index279.js +55 -2
- package/dist/index279.js.map +1 -1
- package/dist/index28.js +247 -24
- package/dist/index28.js.map +1 -1
- package/dist/index280.js +2 -42
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +2 -100
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +20 -2
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +2 -97
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +33 -2
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +6 -27
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +2 -2
- package/dist/index287.js +9 -44
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +2 -2
- package/dist/index289.js +2 -33
- package/dist/index289.js.map +1 -1
- package/dist/index29.js +249 -39
- package/dist/index29.js.map +1 -1
- package/dist/index290.js +36 -2
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +2 -57
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +24 -2
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +2 -2
- package/dist/index294.js +26 -247
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +2 -2
- package/dist/index296.js +2 -72
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +42 -2
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +7 -56
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +2 -133
- package/dist/index299.js.map +1 -1
- package/dist/index30.js +32 -19
- package/dist/index30.js.map +1 -1
- package/dist/index300.js +30 -2
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +2 -12
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +34 -2
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +2 -162
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +26 -42
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +2 -81
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +10 -2
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +2 -71
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +2 -2
- package/dist/index309.js +19 -2
- package/dist/index309.js.map +1 -1
- package/dist/index31.js +96 -11
- package/dist/index31.js.map +1 -1
- package/dist/index310.js +2 -81
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +2 -2
- package/dist/index312.js +42 -2
- package/dist/index312.js.map +1 -1
- package/dist/index313.js +2 -74
- package/dist/index313.js.map +1 -1
- package/dist/index314.js +25 -67
- package/dist/index314.js.map +1 -1
- package/dist/index315.js +2 -2
- package/dist/index316.js +9 -17
- package/dist/index316.js.map +1 -1
- package/dist/index317.js +2 -2
- package/dist/index318.js +84 -32
- package/dist/index318.js.map +1 -1
- package/dist/index319.js +2 -2
- package/dist/index32.js +40 -48
- package/dist/index32.js.map +1 -1
- package/dist/index320.js +68 -77
- package/dist/index320.js.map +1 -1
- package/dist/index321.js +2 -2
- package/dist/index322.js +12 -148
- package/dist/index322.js.map +1 -1
- package/dist/index323.js +1 -1
- package/dist/index324.js +28 -6
- package/dist/index324.js.map +1 -1
- package/dist/index325.js +2 -2
- package/dist/index326.js +78 -87
- package/dist/index326.js.map +1 -1
- package/dist/index327.js +2 -2
- package/dist/index328.js +78 -2
- package/dist/index328.js.map +1 -1
- package/dist/index329.js +2 -237
- package/dist/index329.js.map +1 -1
- package/dist/index33.js +20 -56
- package/dist/index33.js.map +1 -1
- package/dist/index330.js +11 -6
- package/dist/index330.js.map +1 -1
- package/dist/index331.js +2 -2
- package/dist/index332.js +18 -59
- package/dist/index332.js.map +1 -1
- package/dist/index333.js +2 -2
- package/dist/index334.js +12 -5
- package/dist/index334.js.map +1 -1
- package/dist/index335.js +2 -2
- package/dist/index336.js +2 -15
- package/dist/index336.js.map +1 -1
- package/dist/index337.js +88 -2
- package/dist/index337.js.map +1 -1
- package/dist/index338.js +24 -2
- package/dist/index338.js.map +1 -1
- package/dist/index339.js +2 -92
- package/dist/index339.js.map +1 -1
- package/dist/index34.js +59 -35
- package/dist/index34.js.map +1 -1
- package/dist/index340.js +42 -14
- package/dist/index340.js.map +1 -1
- package/dist/index341.js +2 -2
- package/dist/index342.js +22 -80
- package/dist/index342.js.map +1 -1
- package/dist/index343.js +2 -2
- package/dist/index344.js +2 -18
- package/dist/index344.js.map +1 -1
- package/dist/index345.js +16 -2
- package/dist/index345.js.map +1 -1
- package/dist/index346.js +2 -268
- package/dist/index346.js.map +1 -1
- package/dist/index347.js +176 -2
- package/dist/index347.js.map +1 -1
- package/dist/index348.js +2 -2
- package/dist/index349.js +35 -39
- package/dist/index349.js.map +1 -1
- package/dist/index35.js +101 -28
- package/dist/index35.js.map +1 -1
- package/dist/index350.js +3 -3
- package/dist/index350.js.map +1 -1
- package/dist/index351.js +2 -2
- package/dist/index352.js +19 -26
- package/dist/index352.js.map +1 -1
- package/dist/index357.js +26 -19
- package/dist/index357.js.map +1 -1
- package/dist/index36.js +115 -33
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +41 -115
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +34 -246
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +30 -137
- package/dist/index39.js.map +1 -1
- package/dist/index4.js +26 -84
- package/dist/index4.js.map +1 -1
- package/dist/index40.js +26 -400
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +28 -77
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +23 -26
- package/dist/index42.js.map +1 -1
- package/dist/index43.js +36 -33
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +62 -16
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +138 -21
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +129 -22
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +41 -19
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +11 -82
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +56 -279
- package/dist/index49.js.map +1 -1
- package/dist/index5.js +21 -34
- package/dist/index5.js.map +1 -1
- package/dist/index50.js +280 -33
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +74 -94
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +66 -41
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +333 -62
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +96 -256
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +38 -130
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +251 -50
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +144 -115
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +93 -183
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +33 -339
- package/dist/index59.js.map +1 -1
- package/dist/index6.js +2 -2
- package/dist/index60.js +102 -66
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +73 -179
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +117 -97
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +113 -263
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +258 -251
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +177 -79
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +261 -140
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +183 -100
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +28 -89
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +20 -161
- package/dist/index69.js.map +1 -1
- package/dist/index7.js +394 -32
- package/dist/index7.js.map +1 -1
- package/dist/index70.js +190 -53
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +204 -112
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +2 -2
- package/dist/index73.js +89 -28
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +126 -63
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +122 -111
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +67 -64
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +112 -88
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +87 -16
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +151 -79
- package/dist/index79.js.map +1 -1
- package/dist/index8.js +25 -127
- package/dist/index8.js.map +1 -1
- package/dist/index80.js +104 -186
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +59 -20
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +17 -129
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +88 -217
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +64 -112
- package/dist/index84.js.map +1 -1
- package/dist/index9.js +30 -45
- package/dist/index9.js.map +1 -1
- package/dist/src/components/atoms/index.d.ts +45 -16
- package/dist/src/components/atoms/index.d.ts.map +1 -1
- package/dist/src/components/molecules/index.d.ts +20 -1
- package/dist/src/components/molecules/index.d.ts.map +1 -1
- package/dist/src/components/organisms/index.d.ts +17 -1
- package/dist/src/components/organisms/index.d.ts.map +1 -1
- package/dist/src/index.d.ts +3 -82
- package/dist/src/index.d.ts.map +1 -1
- package/dist/tokens.css +353 -7
- package/dist/vite.config.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/index212.js
CHANGED
|
@@ -1,5 +1,263 @@
|
|
|
1
|
-
|
|
1
|
+
import { nothing, html } from "lit";
|
|
2
|
+
import { map as o } from "./index232.js";
|
|
3
|
+
import { styleMap as o$1 } from "./index267.js";
|
|
4
|
+
function renderFileEntry(entry, onRemove) {
|
|
5
|
+
var _a;
|
|
6
|
+
const isUploading = entry.status === "uploading";
|
|
7
|
+
const isDone = entry.status === "done";
|
|
8
|
+
const isError = entry.status === "error";
|
|
9
|
+
const rowCls = [
|
|
10
|
+
"fu-file",
|
|
11
|
+
isDone ? "is-done" : "",
|
|
12
|
+
isError ? "is-error" : "",
|
|
13
|
+
isUploading ? "is-uploading" : ""
|
|
14
|
+
].filter(Boolean).join(" ");
|
|
15
|
+
const ext = ((_a = entry.file.name.split(".").pop()) == null ? void 0 : _a.toLowerCase()) ?? "";
|
|
16
|
+
const isImg = ["jpg", "jpeg", "png", "gif", "webp", "svg"].includes(ext);
|
|
17
|
+
const fileSize = entry.file.size < 1024 * 1024 ? `${(entry.file.size / 1024).toFixed(0)} KB` : `${(entry.file.size / (1024 * 1024)).toFixed(1)} MB`;
|
|
18
|
+
return html`
|
|
19
|
+
<div class="${rowCls}">
|
|
20
|
+
<!-- Progress background -->
|
|
21
|
+
<div
|
|
22
|
+
class="fu-file-prog-bg"
|
|
23
|
+
style="${o$1({ width: isUploading ? `${entry.progress}%` : isDone ? "100%" : "0%" })}"
|
|
24
|
+
></div>
|
|
25
|
+
|
|
26
|
+
<!-- Thumbnail o icono -->
|
|
27
|
+
${isImg && entry.previewUrl ? html`<img class="fu-file-thumb" src="${entry.previewUrl}" alt="${entry.file.name}">` : html`
|
|
28
|
+
<div class="fu-file-icon">
|
|
29
|
+
${isDone ? html`<lib-icon name="check-circle" weight="fill" size="sm"></lib-icon>` : isError ? html`<lib-icon name="warning-circle" weight="fill" size="sm"></lib-icon>` : html`<span class="fu-ext">${ext || "—"}</span>`}
|
|
30
|
+
</div>`}
|
|
31
|
+
|
|
32
|
+
<!-- Meta -->
|
|
33
|
+
<div class="fu-file-meta">
|
|
34
|
+
<span class="fu-file-name">${entry.file.name}</span>
|
|
35
|
+
<span class="fu-file-info">
|
|
36
|
+
<span>${fileSize}</span>
|
|
37
|
+
${isError ? html`
|
|
38
|
+
<span class="fu-file-info-sep"></span>
|
|
39
|
+
<span style="color:var(--color-error)">${entry.errorMessage ?? "Error al subir"}</span>` : nothing}
|
|
40
|
+
${isDone ? html`
|
|
41
|
+
<span class="fu-file-info-sep"></span>
|
|
42
|
+
<span style="color:var(--color-celadon-500)">Completado</span>` : nothing}
|
|
43
|
+
</span>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<!-- Acciones -->
|
|
47
|
+
<div class="fu-file-actions">
|
|
48
|
+
${isUploading ? html`
|
|
49
|
+
<span class="fu-file-pct">${entry.progress}%</span>
|
|
50
|
+
<span class="fu-spinner"></span>` : isDone ? html`<span class="fu-status-done"><lib-icon name="check-circle" weight="fill" size="sm"></lib-icon></span>` : isError ? html`<span class="fu-status-error"><lib-icon name="warning" weight="fill" size="sm"></lib-icon></span>` : nothing}
|
|
51
|
+
|
|
52
|
+
<button
|
|
53
|
+
class="fu-file-remove"
|
|
54
|
+
aria-label="Eliminar ${entry.file.name}"
|
|
55
|
+
@click="${(e) => {
|
|
56
|
+
e.stopPropagation();
|
|
57
|
+
onRemove(entry.id);
|
|
58
|
+
}}"
|
|
59
|
+
>
|
|
60
|
+
<lib-icon name="x" size="xs"></lib-icon>
|
|
61
|
+
</button>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
`;
|
|
65
|
+
}
|
|
66
|
+
function fileUploaderTemplate(props) {
|
|
67
|
+
var _a, _b;
|
|
68
|
+
const {
|
|
69
|
+
zone,
|
|
70
|
+
title,
|
|
71
|
+
/*subtitle*/
|
|
72
|
+
hint,
|
|
73
|
+
multiple,
|
|
74
|
+
accept,
|
|
75
|
+
disabled,
|
|
76
|
+
isDragover,
|
|
77
|
+
entries,
|
|
78
|
+
imagePreviewUrl,
|
|
79
|
+
onDragover,
|
|
80
|
+
onDragleave,
|
|
81
|
+
onDrop,
|
|
82
|
+
onInputChange,
|
|
83
|
+
onRemove,
|
|
84
|
+
onUploadAll,
|
|
85
|
+
onClearAll,
|
|
86
|
+
onResetImage
|
|
87
|
+
} = props;
|
|
88
|
+
const doneCount = entries.filter((e) => e.status === "done").length;
|
|
89
|
+
const uploadingCount = entries.filter((e) => e.status === "uploading").length;
|
|
90
|
+
const allDone = entries.length > 0 && doneCount === entries.length;
|
|
91
|
+
const anyUploading = uploadingCount > 0;
|
|
92
|
+
if (zone === "default") {
|
|
93
|
+
return html`
|
|
94
|
+
<div class="fu-root">
|
|
95
|
+
<!-- Drop zone -->
|
|
96
|
+
<div
|
|
97
|
+
class="fu-zone ${isDragover ? "is-dragover" : ""} ${disabled ? "is-disabled" : ""}"
|
|
98
|
+
@dragover="${(e) => {
|
|
99
|
+
if (!disabled) onDragover(e);
|
|
100
|
+
}}"
|
|
101
|
+
@dragleave="${() => {
|
|
102
|
+
if (!disabled) onDragleave();
|
|
103
|
+
}}"
|
|
104
|
+
@drop="${(e) => {
|
|
105
|
+
if (!disabled) onDrop(e);
|
|
106
|
+
}}"
|
|
107
|
+
>
|
|
108
|
+
<!-- input real cubriendo toda la zona -->
|
|
109
|
+
<input
|
|
110
|
+
type="file"
|
|
111
|
+
?multiple="${multiple}"
|
|
112
|
+
accept="${accept}"
|
|
113
|
+
?disabled="${disabled}"
|
|
114
|
+
@change="${onInputChange}"
|
|
115
|
+
aria-label="${title}"
|
|
116
|
+
>
|
|
117
|
+
|
|
118
|
+
<div class="fu-zone-icon">
|
|
119
|
+
<lib-icon name="cloud-arrow-up" weight="thin" size="xl"></lib-icon>
|
|
120
|
+
</div>
|
|
121
|
+
|
|
122
|
+
<div>
|
|
123
|
+
<p class="fu-zone-title">${title}</p>
|
|
124
|
+
<p class="fu-zone-sub" style="margin-top:var(--lib-space-sm)">
|
|
125
|
+
o <span>busca en tu equipo</span>
|
|
126
|
+
</p>
|
|
127
|
+
</div>
|
|
128
|
+
|
|
129
|
+
<p class="fu-zone-hint">${hint}</p>
|
|
130
|
+
</div>
|
|
131
|
+
|
|
132
|
+
<!-- Lista de archivos -->
|
|
133
|
+
${entries.length > 0 ? html`
|
|
134
|
+
<div class="fu-list">
|
|
135
|
+
${o(entries, (entry) => renderFileEntry(entry, onRemove))}
|
|
136
|
+
</div>
|
|
137
|
+
|
|
138
|
+
<!-- Footer summary -->
|
|
139
|
+
<div class="fu-summary">
|
|
140
|
+
<span class="fu-summary-text">
|
|
141
|
+
${allDone ? `${doneCount} archivo${doneCount !== 1 ? "s" : ""} subido${doneCount !== 1 ? "s" : ""}` : anyUploading ? `Subiendo ${uploadingCount} archivo${uploadingCount !== 1 ? "s" : ""}…` : `${entries.length} archivo${entries.length !== 1 ? "s" : ""} seleccionado${entries.length !== 1 ? "s" : ""}`}
|
|
142
|
+
</span>
|
|
143
|
+
<div style="display:flex;gap:var(--lib-space-sm)">
|
|
144
|
+
<button
|
|
145
|
+
class="fu-summary-btn"
|
|
146
|
+
style="background:transparent;color:var(--text-muted);border:1px solid var(--border-default)"
|
|
147
|
+
?disabled="${anyUploading}"
|
|
148
|
+
@click="${onClearAll}"
|
|
149
|
+
>Limpiar</button>
|
|
150
|
+
<button
|
|
151
|
+
class="fu-summary-btn"
|
|
152
|
+
?disabled="${anyUploading || allDone}"
|
|
153
|
+
@click="${onUploadAll}"
|
|
154
|
+
>
|
|
155
|
+
${anyUploading ? "Subiendo…" : "Subir todo"}
|
|
156
|
+
</button>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
` : nothing}
|
|
160
|
+
</div>
|
|
161
|
+
`;
|
|
162
|
+
}
|
|
163
|
+
if (zone === "compact") {
|
|
164
|
+
return html`
|
|
165
|
+
<div class="fu-root">
|
|
166
|
+
<div
|
|
167
|
+
class="fu-zone-sm ${isDragover ? "is-dragover" : ""} ${disabled ? "is-disabled" : ""}"
|
|
168
|
+
@dragover="${(e) => {
|
|
169
|
+
if (!disabled) onDragover(e);
|
|
170
|
+
}}"
|
|
171
|
+
@dragleave="${() => {
|
|
172
|
+
if (!disabled) onDragleave();
|
|
173
|
+
}}"
|
|
174
|
+
@drop="${(e) => {
|
|
175
|
+
if (!disabled) onDrop(e);
|
|
176
|
+
}}"
|
|
177
|
+
>
|
|
178
|
+
<input
|
|
179
|
+
type="file"
|
|
180
|
+
?multiple="${multiple}"
|
|
181
|
+
accept="${accept}"
|
|
182
|
+
?disabled="${disabled}"
|
|
183
|
+
@change="${onInputChange}"
|
|
184
|
+
aria-label="${title}"
|
|
185
|
+
>
|
|
186
|
+
|
|
187
|
+
<span class="fu-zone-sm-icon">
|
|
188
|
+
<lib-icon name="paperclip" size="md"></lib-icon>
|
|
189
|
+
</span>
|
|
190
|
+
|
|
191
|
+
<div class="fu-zone-sm-text">
|
|
192
|
+
<span class="fu-zone-sm-title">${title}</span>
|
|
193
|
+
<span class="fu-zone-sm-sub">${hint}</span>
|
|
194
|
+
</div>
|
|
195
|
+
</div>
|
|
196
|
+
|
|
197
|
+
${entries.length > 0 ? html`
|
|
198
|
+
<div class="fu-list" style="margin-top:1px">
|
|
199
|
+
${o(entries, (entry) => renderFileEntry(entry, onRemove))}
|
|
200
|
+
</div>
|
|
201
|
+
` : nothing}
|
|
202
|
+
</div>
|
|
203
|
+
`;
|
|
204
|
+
}
|
|
205
|
+
return html`
|
|
206
|
+
<div class="fu-root">
|
|
207
|
+
<div
|
|
208
|
+
class="fu-zone-img ${isDragover ? "is-dragover" : ""} ${imagePreviewUrl ? "has-preview" : ""} ${disabled ? "is-disabled" : ""}"
|
|
209
|
+
@dragover="${(e) => {
|
|
210
|
+
if (!disabled) onDragover(e);
|
|
211
|
+
}}"
|
|
212
|
+
@dragleave="${() => {
|
|
213
|
+
if (!disabled) onDragleave();
|
|
214
|
+
}}"
|
|
215
|
+
@drop="${(e) => {
|
|
216
|
+
if (!disabled) onDrop(e);
|
|
217
|
+
}}"
|
|
218
|
+
>
|
|
219
|
+
<input
|
|
220
|
+
type="file"
|
|
221
|
+
accept="image/*"
|
|
222
|
+
?disabled="${disabled || !!imagePreviewUrl}"
|
|
223
|
+
@change="${onInputChange}"
|
|
224
|
+
aria-label="${title}"
|
|
225
|
+
>
|
|
226
|
+
|
|
227
|
+
<!-- Placeholder (sin imagen) -->
|
|
228
|
+
<div class="fu-zone-img-placeholder">
|
|
229
|
+
<lib-icon name="image" weight="thin" size="xl" style="color:var(--text-muted)"></lib-icon>
|
|
230
|
+
<p class="fu-zone-sub">${title}</p>
|
|
231
|
+
<p class="fu-zone-hint">${hint}</p>
|
|
232
|
+
</div>
|
|
233
|
+
|
|
234
|
+
<!-- Preview (con imagen) -->
|
|
235
|
+
${imagePreviewUrl ? html`<img class="fu-zone-img-preview" src="${imagePreviewUrl}" alt="Preview">` : nothing}
|
|
236
|
+
|
|
237
|
+
<!-- Overlay de reemplazo -->
|
|
238
|
+
${imagePreviewUrl ? html`
|
|
239
|
+
<div class="fu-zone-img-overlay">
|
|
240
|
+
<lib-icon name="camera" size="md" style="color:#fff"></lib-icon>
|
|
241
|
+
<span class="fu-zone-img-overlay-text">Cambiar imagen</span>
|
|
242
|
+
</div>` : nothing}
|
|
243
|
+
</div>
|
|
244
|
+
|
|
245
|
+
<!-- Barra de progreso debajo de la zona imagen -->
|
|
246
|
+
${entries.length > 0 && ((_a = entries[0]) == null ? void 0 : _a.status) === "uploading" ? html`
|
|
247
|
+
<div class="fu-progress-bar">
|
|
248
|
+
<div class="fu-progress-fill" style="width:${((_b = entries[0]) == null ? void 0 : _b.progress) ?? 0}%"></div>
|
|
249
|
+
</div>` : nothing}
|
|
250
|
+
|
|
251
|
+
${imagePreviewUrl ? html`
|
|
252
|
+
<div style="display:flex;justify-content:flex-end;margin-top:var(--lib-space-sm)">
|
|
253
|
+
<button class="fu-file-remove" style="width:auto;padding:0 var(--lib-space-sm);border-radius:0;border:1px solid var(--border-default);font-family:var(--lib-font-mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase" @click="${onResetImage}">
|
|
254
|
+
Eliminar
|
|
255
|
+
</button>
|
|
256
|
+
</div>` : nothing}
|
|
257
|
+
</div>
|
|
258
|
+
`;
|
|
259
|
+
}
|
|
2
260
|
export {
|
|
3
|
-
|
|
261
|
+
fileUploaderTemplate
|
|
4
262
|
};
|
|
5
263
|
//# sourceMappingURL=index212.js.map
|
package/dist/index212.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index212.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"index212.js","sources":["../src/components/molecules/file-uploader/lib-file-uploader.html.ts"],"sourcesContent":["import { html, nothing, TemplateResult } from 'lit';\nimport { map } from 'lit/directives/map.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport type { FileEntry, FileUploaderTemplateProps } from './lib-file-uploader.types';\n\n/* ================================================================\n FILE ENTRY — una fila en la lista\n ================================================================ */\n\nfunction renderFileEntry(\n entry: FileEntry,\n onRemove: (id: string) => void,\n): TemplateResult {\n const isUploading = entry.status === 'uploading';\n const isDone = entry.status === 'done';\n const isError = entry.status === 'error';\n\n const rowCls = [\n 'fu-file',\n isDone ? 'is-done' : '',\n isError ? 'is-error' : '',\n isUploading ? 'is-uploading' : '',\n ].filter(Boolean).join(' ');\n\n /* Icono o thumbnail para imágenes */\n const ext = entry.file.name.split('.').pop()?.toLowerCase() ?? '';\n const isImg = ['jpg', 'jpeg', 'png', 'gif', 'webp', 'svg'].includes(ext);\n\n const fileSize = entry.file.size < 1024 * 1024\n ? `${(entry.file.size / 1024).toFixed(0)} KB`\n : `${(entry.file.size / (1024 * 1024)).toFixed(1)} MB`;\n\n return html`\n <div class=\"${rowCls}\">\n <!-- Progress background -->\n <div\n class=\"fu-file-prog-bg\"\n style=\"${styleMap({ width: isUploading ? `${entry.progress}%` : isDone ? '100%' : '0%' })}\"\n ></div>\n\n <!-- Thumbnail o icono -->\n ${isImg && entry.previewUrl\n ? html`<img class=\"fu-file-thumb\" src=\"${entry.previewUrl}\" alt=\"${entry.file.name}\">`\n : html`\n <div class=\"fu-file-icon\">\n ${isDone\n ? html`<lib-icon name=\"check-circle\" weight=\"fill\" size=\"sm\"></lib-icon>`\n : isError\n ? html`<lib-icon name=\"warning-circle\" weight=\"fill\" size=\"sm\"></lib-icon>`\n : html`<span class=\"fu-ext\">${ext || '—'}</span>`}\n </div>`}\n\n <!-- Meta -->\n <div class=\"fu-file-meta\">\n <span class=\"fu-file-name\">${entry.file.name}</span>\n <span class=\"fu-file-info\">\n <span>${fileSize}</span>\n ${isError\n ? html`\n <span class=\"fu-file-info-sep\"></span>\n <span style=\"color:var(--color-error)\">${entry.errorMessage ?? 'Error al subir'}</span>`\n : nothing}\n ${isDone\n ? html`\n <span class=\"fu-file-info-sep\"></span>\n <span style=\"color:var(--color-celadon-500)\">Completado</span>`\n : nothing}\n </span>\n </div>\n\n <!-- Acciones -->\n <div class=\"fu-file-actions\">\n ${isUploading\n ? html`\n <span class=\"fu-file-pct\">${entry.progress}%</span>\n <span class=\"fu-spinner\"></span>`\n : isDone\n ? html`<span class=\"fu-status-done\"><lib-icon name=\"check-circle\" weight=\"fill\" size=\"sm\"></lib-icon></span>`\n : isError\n ? html`<span class=\"fu-status-error\"><lib-icon name=\"warning\" weight=\"fill\" size=\"sm\"></lib-icon></span>`\n : nothing}\n\n <button\n class=\"fu-file-remove\"\n aria-label=\"Eliminar ${entry.file.name}\"\n @click=\"${(e: Event): void => { e.stopPropagation(); onRemove(entry.id); }}\"\n >\n <lib-icon name=\"x\" size=\"xs\"></lib-icon>\n </button>\n </div>\n </div>\n `;\n}\n\n/* ================================================================\n TEMPLATE PRINCIPAL\n ================================================================ */\n\nexport function fileUploaderTemplate(props: FileUploaderTemplateProps): TemplateResult {\n const {\n zone, title, /*subtitle*/ hint, multiple, accept, disabled,\n isDragover, entries, imagePreviewUrl,\n onDragover, onDragleave, onDrop, onInputChange, onRemove,\n onUploadAll, onClearAll, onResetImage,\n } = props;\n\n const doneCount = entries.filter(e => e.status === 'done').length;\n const uploadingCount = entries.filter(e => e.status === 'uploading').length;\n const allDone = entries.length > 0 && doneCount === entries.length;\n const anyUploading = uploadingCount > 0;\n\n /* ────────────────────────────────────\n VARIANTE: default (zona grande)\n ──────────────────────────────────── */\n if (zone === 'default') {\n return html`\n <div class=\"fu-root\">\n <!-- Drop zone -->\n <div\n class=\"fu-zone ${isDragover ? 'is-dragover' : ''} ${disabled ? 'is-disabled' : ''}\"\n @dragover=\"${(e: DragEvent): void => { if (!disabled) onDragover(e); }}\"\n @dragleave=\"${(): void => { if (!disabled) onDragleave(); }}\"\n @drop=\"${(e: DragEvent): void => { if (!disabled) onDrop(e); }}\"\n >\n <!-- input real cubriendo toda la zona -->\n <input\n type=\"file\"\n ?multiple=\"${multiple}\"\n accept=\"${accept}\"\n ?disabled=\"${disabled}\"\n @change=\"${onInputChange}\"\n aria-label=\"${title}\"\n >\n\n <div class=\"fu-zone-icon\">\n <lib-icon name=\"cloud-arrow-up\" weight=\"thin\" size=\"xl\"></lib-icon>\n </div>\n\n <div>\n <p class=\"fu-zone-title\">${title}</p>\n <p class=\"fu-zone-sub\" style=\"margin-top:var(--lib-space-sm)\">\n o <span>busca en tu equipo</span>\n </p>\n </div>\n\n <p class=\"fu-zone-hint\">${hint}</p>\n </div>\n\n <!-- Lista de archivos -->\n ${entries.length > 0 ? html`\n <div class=\"fu-list\">\n ${map(entries, (entry: FileEntry) => renderFileEntry(entry, onRemove))}\n </div>\n\n <!-- Footer summary -->\n <div class=\"fu-summary\">\n <span class=\"fu-summary-text\">\n ${allDone\n ? `${doneCount} archivo${doneCount !== 1 ? 's' : ''} subido${doneCount !== 1 ? 's' : ''}`\n : anyUploading\n ? `Subiendo ${uploadingCount} archivo${uploadingCount !== 1 ? 's' : ''}…`\n : `${entries.length} archivo${entries.length !== 1 ? 's' : ''} seleccionado${entries.length !== 1 ? 's' : ''}`}\n </span>\n <div style=\"display:flex;gap:var(--lib-space-sm)\">\n <button\n class=\"fu-summary-btn\"\n style=\"background:transparent;color:var(--text-muted);border:1px solid var(--border-default)\"\n ?disabled=\"${anyUploading}\"\n @click=\"${onClearAll}\"\n >Limpiar</button>\n <button\n class=\"fu-summary-btn\"\n ?disabled=\"${anyUploading || allDone}\"\n @click=\"${onUploadAll}\"\n >\n ${anyUploading ? 'Subiendo…' : 'Subir todo'}\n </button>\n </div>\n </div>\n ` : nothing}\n </div>\n `;\n }\n\n /* ────────────────────────────────────\n VARIANTE: compact (horizontal)\n ──────────────────────────────────── */\n if (zone === 'compact') {\n return html`\n <div class=\"fu-root\">\n <div\n class=\"fu-zone-sm ${isDragover ? 'is-dragover' : ''} ${disabled ? 'is-disabled' : ''}\"\n @dragover=\"${(e: DragEvent): void => { if (!disabled) onDragover(e); }}\"\n @dragleave=\"${(): void => { if (!disabled) onDragleave(); }}\"\n @drop=\"${(e: DragEvent): void => { if (!disabled) onDrop(e); }}\"\n >\n <input\n type=\"file\"\n ?multiple=\"${multiple}\"\n accept=\"${accept}\"\n ?disabled=\"${disabled}\"\n @change=\"${onInputChange}\"\n aria-label=\"${title}\"\n >\n\n <span class=\"fu-zone-sm-icon\">\n <lib-icon name=\"paperclip\" size=\"md\"></lib-icon>\n </span>\n\n <div class=\"fu-zone-sm-text\">\n <span class=\"fu-zone-sm-title\">${title}</span>\n <span class=\"fu-zone-sm-sub\">${hint}</span>\n </div>\n </div>\n\n ${entries.length > 0 ? html`\n <div class=\"fu-list\" style=\"margin-top:1px\">\n ${map(entries, (entry: FileEntry) => renderFileEntry(entry, onRemove))}\n </div>\n ` : nothing}\n </div>\n `;\n }\n\n /* ────────────────────────────────────\n VARIANTE: image (preview inline)\n ──────────────────────────────────── */\n return html`\n <div class=\"fu-root\">\n <div\n class=\"fu-zone-img ${isDragover ? 'is-dragover' : ''} ${imagePreviewUrl ? 'has-preview' : ''} ${disabled ? 'is-disabled' : ''}\"\n @dragover=\"${(e: DragEvent): void => { if (!disabled) onDragover(e); }}\"\n @dragleave=\"${(): void => { if (!disabled) onDragleave(); }}\"\n @drop=\"${(e: DragEvent): void => { if (!disabled) onDrop(e); }}\"\n >\n <input\n type=\"file\"\n accept=\"image/*\"\n ?disabled=\"${disabled || !!imagePreviewUrl}\"\n @change=\"${onInputChange}\"\n aria-label=\"${title}\"\n >\n\n <!-- Placeholder (sin imagen) -->\n <div class=\"fu-zone-img-placeholder\">\n <lib-icon name=\"image\" weight=\"thin\" size=\"xl\" style=\"color:var(--text-muted)\"></lib-icon>\n <p class=\"fu-zone-sub\">${title}</p>\n <p class=\"fu-zone-hint\">${hint}</p>\n </div>\n\n <!-- Preview (con imagen) -->\n ${imagePreviewUrl\n ? html`<img class=\"fu-zone-img-preview\" src=\"${imagePreviewUrl}\" alt=\"Preview\">`\n : nothing}\n\n <!-- Overlay de reemplazo -->\n ${imagePreviewUrl\n ? html`\n <div class=\"fu-zone-img-overlay\">\n <lib-icon name=\"camera\" size=\"md\" style=\"color:#fff\"></lib-icon>\n <span class=\"fu-zone-img-overlay-text\">Cambiar imagen</span>\n </div>`\n : nothing}\n </div>\n\n <!-- Barra de progreso debajo de la zona imagen -->\n ${entries.length > 0 && entries[0]?.status === 'uploading'\n ? html`\n <div class=\"fu-progress-bar\">\n <div class=\"fu-progress-fill\" style=\"width:${entries[0]?.progress ?? 0}%\"></div>\n </div>`\n : nothing}\n\n ${imagePreviewUrl\n ? html`\n <div style=\"display:flex;justify-content:flex-end;margin-top:var(--lib-space-sm)\">\n <button class=\"fu-file-remove\" style=\"width:auto;padding:0 var(--lib-space-sm);border-radius:0;border:1px solid var(--border-default);font-family:var(--lib-font-mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase\" @click=\"${onResetImage}\">\n Eliminar\n </button>\n </div>`\n : nothing}\n </div>\n `;\n}"],"names":["styleMap","map"],"mappings":"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"}
|
package/dist/index213.js
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { renderClassic } from "./index353.js";
|
|
2
|
+
import { renderCentered } from "./index354.js";
|
|
3
|
+
import { renderMega } from "./index355.js";
|
|
4
|
+
import { renderAppBar } from "./index356.js";
|
|
5
|
+
function headerTemplate(ctx) {
|
|
6
|
+
switch (ctx.variant) {
|
|
7
|
+
case "centered":
|
|
8
|
+
return renderCentered(ctx);
|
|
9
|
+
case "mega":
|
|
10
|
+
return renderMega(ctx);
|
|
11
|
+
case "app-bar":
|
|
12
|
+
return renderAppBar(ctx);
|
|
13
|
+
default:
|
|
14
|
+
return renderClassic(ctx);
|
|
15
|
+
}
|
|
5
16
|
}
|
|
6
17
|
export {
|
|
7
|
-
|
|
18
|
+
headerTemplate
|
|
8
19
|
};
|
|
9
20
|
//# sourceMappingURL=index213.js.map
|
package/dist/index213.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index213.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index213.js","sources":["../src/components/molecules/header/lib-header.html.ts"],"sourcesContent":["import { TemplateResult } from 'lit';\nimport type { LibHeader } from './lib-header.component';\n\nimport { renderClassic } from './templates/header-classic.html';\nimport { renderCentered } from './templates/header-centered.html';\nimport { renderMega } from './templates/header-mega.html';\nimport { renderAppBar } from './templates/header-app-bar.html';\n\n/**\n * Dispatcher principal del componente lib-header.\n *\n * No contiene lógica de presentación propia.\n * Cada variante vive en su propio fichero dentro de /templates.\n *\n * Variantes → fichero\n * ───────────────────────────────────────────────────────────\n * classic · dark · transparent · kintsugi\n * glitch · minimal · shrink → header-classic.html.ts\n * centered → header-centered.html.ts\n * mega → header-mega.html.ts\n * app-bar → header-app-bar.html.ts\n *\n * Helpers compartidos (logo, links, actions, SVGs) → header-shared.html.ts\n * Móvil (hamburger + drawer) → header-mobile.html.ts\n */\nexport function headerTemplate(ctx: LibHeader): TemplateResult {\n switch (ctx.variant) {\n case 'centered': return renderCentered(ctx);\n case 'mega': return renderMega(ctx);\n case 'app-bar': return renderAppBar(ctx);\n default: return renderClassic(ctx);\n }\n}"],"names":[],"mappings":";;;;AAyBO,SAAS,eAAe,KAAgC;AAC7D,UAAQ,IAAI,SAAA;AAAA,IACV,KAAK;AAAY,aAAO,eAAe,GAAG;AAAA,IAC1C,KAAK;AAAY,aAAO,WAAW,GAAG;AAAA,IACtC,KAAK;AAAY,aAAO,aAAa,GAAG;AAAA,IACxC;AAAiB,aAAO,cAAc,GAAG;AAAA,EAAA;AAE7C;"}
|
package/dist/index214.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const tooltipCss = '@layer tokens,reset,components;@layer reset{*,*:before,*:after{box-sizing:border-box}}@layer components{:host{display:inline-flex;align-items:center;justify-content:center}.tip-wrap{position:relative;display:inline-flex;align-items:center;justify-content:center}.tip-bubble{position:absolute;z-index:var(--z-tooltip, 400);background:var(--color-washi-900);color:var(--color-washi-100);font-family:var(--lib-font-mono);font-size:11px;letter-spacing:var(--tracking-wide);line-height:var(--leading-snug);padding:var(--lib-space-sm) var(--lib-space-md);max-width:220px;width:max-content;pointer-events:none;white-space:normal;opacity:0;transform-origin:center;transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out);transition-delay:0ms}.tip-wrap:hover .tip-bubble,.tip-wrap:focus-within .tip-bubble{transition-delay:.3s}.tip-instant .tip-bubble,.tip-instant:hover .tip-bubble,.tip-instant:focus-within .tip-bubble{transition-delay:0ms}.tip-wrap:hover .tip-bubble,.tip-wrap:focus-within .tip-bubble,.tip-wrap.is-open .tip-bubble{opacity:1}.tip-sm .tip-bubble{font-size:10px;padding:var(--lib-space-xs) var(--lib-space-sm);max-width:160px;letter-spacing:var(--tracking-wider)}.tip-lg .tip-bubble{font-size:var(--text-xs);font-family:var(--lib-font-body);padding:var(--lib-space-md) var(--lib-space-md);max-width:300px;letter-spacing:0;line-height:var(--leading-normal)}.tip-bubble:after{content:"";position:absolute;width:0;height:0;border:5px solid transparent;pointer-events:none}.tip-wrap[data-pos=top] .tip-bubble,.tip-wrap:not([data-pos]) .tip-bubble{bottom:calc(100% + 8px);left:50%;transform:translate(-50%) translateY(4px)}.tip-wrap[data-pos=top]:hover .tip-bubble,.tip-wrap[data-pos=top]:focus-within .tip-bubble,.tip-wrap[data-pos=top].is-open .tip-bubble,.tip-wrap:not([data-pos]):hover .tip-bubble,.tip-wrap:not([data-pos]):focus-within .tip-bubble,.tip-wrap:not([data-pos]).is-open .tip-bubble{transform:translate(-50%) translateY(0)}.tip-wrap[data-pos=top] .tip-bubble:after,.tip-wrap:not([data-pos]) .tip-bubble:after{top:100%;left:50%;transform:translate(-50%);border-top-color:var(--color-washi-900)}.tip-wrap[data-pos=bottom] .tip-bubble{top:calc(100% + 8px);left:50%;transform:translate(-50%) translateY(-4px)}.tip-wrap[data-pos=bottom]:hover .tip-bubble,.tip-wrap[data-pos=bottom]:focus-within .tip-bubble,.tip-wrap[data-pos=bottom].is-open .tip-bubble{transform:translate(-50%) translateY(0)}.tip-wrap[data-pos=bottom] .tip-bubble:after{bottom:100%;left:50%;transform:translate(-50%);border-bottom-color:var(--color-washi-900)}.tip-wrap[data-pos=left] .tip-bubble{right:calc(100% + 8px);top:50%;transform:translateY(-50%) translate(4px)}.tip-wrap[data-pos=left]:hover .tip-bubble,.tip-wrap[data-pos=left]:focus-within .tip-bubble,.tip-wrap[data-pos=left].is-open .tip-bubble{transform:translateY(-50%) translate(0)}.tip-wrap[data-pos=left] .tip-bubble:after{left:100%;top:50%;transform:translateY(-50%);border-left-color:var(--color-washi-900)}.tip-wrap[data-pos=right] .tip-bubble{left:calc(100% + 8px);top:50%;transform:translateY(-50%) translate(-4px)}.tip-wrap[data-pos=right]:hover .tip-bubble,.tip-wrap[data-pos=right]:focus-within .tip-bubble,.tip-wrap[data-pos=right].is-open .tip-bubble{transform:translateY(-50%) translate(0)}.tip-wrap[data-pos=right] .tip-bubble:after{right:100%;top:50%;transform:translateY(-50%);border-right-color:var(--color-washi-900)}.tip-wrap[data-pos=top-start] .tip-bubble{bottom:calc(100% + 8px);left:0;transform:translateY(4px)}.tip-wrap[data-pos=top-start]:hover .tip-bubble,.tip-wrap[data-pos=top-start]:focus-within .tip-bubble,.tip-wrap[data-pos=top-start].is-open .tip-bubble{transform:translateY(0)}.tip-wrap[data-pos=top-start] .tip-bubble:after{top:100%;left:var(--lib-space-md);border-top-color:var(--color-washi-900)}.tip-wrap[data-pos=top-end] .tip-bubble{bottom:calc(100% + 8px);right:0;transform:translateY(4px)}.tip-wrap[data-pos=top-end]:hover .tip-bubble,.tip-wrap[data-pos=top-end]:focus-within .tip-bubble,.tip-wrap[data-pos=top-end].is-open .tip-bubble{transform:translateY(0)}.tip-wrap[data-pos=top-end] .tip-bubble:after{top:100%;right:var(--lib-space-md);border-top-color:var(--color-washi-900)}.tip-wrap[data-pos=bottom-start] .tip-bubble{top:calc(100% + 8px);left:0;transform:translateY(-4px)}.tip-wrap[data-pos=bottom-start]:hover .tip-bubble,.tip-wrap[data-pos=bottom-start]:focus-within .tip-bubble,.tip-wrap[data-pos=bottom-start].is-open .tip-bubble{transform:translateY(0)}.tip-wrap[data-pos=bottom-start] .tip-bubble:after{bottom:100%;left:var(--lib-space-md);border-bottom-color:var(--color-washi-900)}.tip-wrap[data-pos=bottom-end] .tip-bubble{top:calc(100% + 8px);right:0;transform:translateY(-4px)}.tip-wrap[data-pos=bottom-end]:hover .tip-bubble,.tip-wrap[data-pos=bottom-end]:focus-within .tip-bubble,.tip-wrap[data-pos=bottom-end].is-open .tip-bubble{transform:translateY(0)}.tip-wrap[data-pos=bottom-end] .tip-bubble:after{bottom:100%;right:var(--lib-space-md);border-bottom-color:var(--color-washi-900)}.tip-light .tip-bubble{background:var(--bg-elevated);color:var(--text-secondary);border:1px solid var(--border-default);box-shadow:var(--shadow-md)}.tip-light[data-pos=top] .tip-bubble:after,.tip-light:not([data-pos]) .tip-bubble:after{border-top-color:var(--bg-elevated)}.tip-light[data-pos=bottom] .tip-bubble:after{border-bottom-color:var(--bg-elevated)}.tip-light[data-pos=left] .tip-bubble:after{border-left-color:var(--bg-elevated)}.tip-light[data-pos=right] .tip-bubble:after{border-right-color:var(--bg-elevated)}.tip-light[data-pos=top-start] .tip-bubble:after{border-top-color:var(--bg-elevated)}.tip-light[data-pos=top-end] .tip-bubble:after{border-top-color:var(--bg-elevated)}.tip-light[data-pos=bottom-start] .tip-bubble:after{border-bottom-color:var(--bg-elevated)}.tip-light[data-pos=bottom-end] .tip-bubble:after{border-bottom-color:var(--bg-elevated)}.tip-kaki .tip-bubble{background:var(--color-kaki-500);color:var(--color-white)}.tip-kaki[data-pos=top] .tip-bubble:after,.tip-kaki:not([data-pos]) .tip-bubble:after{border-top-color:var(--color-kaki-500)}.tip-kaki[data-pos=bottom] .tip-bubble:after{border-bottom-color:var(--color-kaki-500)}.tip-kaki[data-pos=left] .tip-bubble:after{border-left-color:var(--color-kaki-500)}.tip-kaki[data-pos=right] .tip-bubble:after{border-right-color:var(--color-kaki-500)}.tip-kaki[data-pos=top-start] .tip-bubble:after{border-top-color:var(--color-kaki-500)}.tip-kaki[data-pos=top-end] .tip-bubble:after{border-top-color:var(--color-kaki-500)}.tip-kaki[data-pos=bottom-start] .tip-bubble:after{border-bottom-color:var(--color-kaki-500)}.tip-kaki[data-pos=bottom-end] .tip-bubble:after{border-bottom-color:var(--color-kaki-500)}.tip-error .tip-bubble{background:var(--color-error);color:var(--color-white)}.tip-error[data-pos=top] .tip-bubble:after,.tip-error:not([data-pos]) .tip-bubble:after{border-top-color:var(--color-error)}.tip-error[data-pos=bottom] .tip-bubble:after{border-bottom-color:var(--color-error)}.tip-error[data-pos=left] .tip-bubble:after{border-left-color:var(--color-error)}.tip-error[data-pos=right] .tip-bubble:after{border-right-color:var(--color-error)}.tip-error[data-pos=top-start] .tip-bubble:after{border-top-color:var(--color-error)}.tip-error[data-pos=top-end] .tip-bubble:after{border-top-color:var(--color-error)}.tip-error[data-pos=bottom-start] .tip-bubble:after{border-bottom-color:var(--color-error)}.tip-error[data-pos=bottom-end] .tip-bubble:after{border-bottom-color:var(--color-error)}.tip-celadon .tip-bubble{background:var(--color-celadon-500);color:var(--color-white)}.tip-celadon[data-pos=top] .tip-bubble:after,.tip-celadon:not([data-pos]) .tip-bubble:after{border-top-color:var(--color-celadon-500)}.tip-celadon[data-pos=bottom] .tip-bubble:after{border-bottom-color:var(--color-celadon-500)}.tip-celadon[data-pos=left] .tip-bubble:after{border-left-color:var(--color-celadon-500)}.tip-celadon[data-pos=right] .tip-bubble:after{border-right-color:var(--color-celadon-500)}.tip-celadon[data-pos=top-start] .tip-bubble:after{border-top-color:var(--color-celadon-500)}.tip-celadon[data-pos=top-end] .tip-bubble:after{border-top-color:var(--color-celadon-500)}.tip-celadon[data-pos=bottom-start] .tip-bubble:after{border-bottom-color:var(--color-celadon-500)}.tip-celadon[data-pos=bottom-end] .tip-bubble:after{border-bottom-color:var(--color-celadon-500)}::slotted(.tip-title),.tip-title{font-family:var(--lib-font-display);font-size:var(--text-md);font-weight:var(--weight-light);letter-spacing:var(--tracking-tight);line-height:var(--leading-tight);color:inherit;display:block;margin-bottom:var(--lib-space-xs)}::slotted(.tip-body),.tip-body{font-family:var(--lib-font-body);font-size:var(--text-xs);color:inherit;opacity:.75;line-height:var(--leading-normal);display:block}::slotted(.tip-kbd),.tip-kbd{display:inline-flex;align-items:center;gap:2px;margin-top:var(--lib-space-sm)}.tip-bubble kbd{font-family:var(--lib-font-mono);font-size:9px;letter-spacing:var(--tracking-wide);background:#ffffff1f;border:1px solid rgb(255,255,255,.18);padding:1px var(--lib-space-sm);color:inherit;line-height:1.6}.tip-light .tip-bubble kbd{background:var(--bg-surface);border-color:var(--border-default);color:var(--text-secondary)}::slotted(.tip-sep),.tip-sep{height:1px;background:#ffffff1f;margin:var(--lib-space-sm) 0;display:block}.tip-light .tip-sep,.tip-light ::slotted(.tip-sep){background:var(--border-subtle)}}';
|
|
1
|
+
const headerCss = '@layer tokens,reset,components;@layer reset{:host{display:block;position:relative;z-index:var(--z-overlay)}*,*:before,*:after{box-sizing:border-box}a{text-decoration:none}button{font:inherit;cursor:pointer;background:none;border:none}}@layer components{.hdr{width:100%;display:flex;align-items:center;position:relative;overflow:visible;transition:height var(--duration-slow) var(--ease-out),background var(--duration-slow) var(--ease-out),border-color var(--duration-slow) var(--ease-out),backdrop-filter var(--duration-slow) var(--ease-out),box-shadow var(--duration-slow) var(--ease-out)}:host([variant="classic"]) .hdr{height:64px;background:var(--bg-elevated);border-bottom:1px solid var(--border-subtle);padding:0 var(--lib-space-xl);gap:var(--lib-space-xl)}:host([variant="dark"]) .hdr{height:64px;background:#120e0ad9;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border-bottom:1px solid rgb(255,255,255,.07);padding:0 var(--lib-space-xl);gap:var(--lib-space-xl)}:host([variant="centered"]) .hdr{height:64px;background:var(--bg-elevated);border-bottom:1px solid var(--border-subtle);display:grid;grid-template-columns:1fr auto 1fr;padding:0 var(--lib-space-xl);gap:var(--lib-space-lg)}.hdr-announcement{height:36px;background:var(--color-kaki-50);border-bottom:1px solid rgb(184,90,30,.15);display:flex;align-items:center;justify-content:center;gap:var(--lib-space-md);padding:0 var(--lib-space-xl);font-family:var(--lib-font-mono);font-size:9px;letter-spacing:.14em;text-transform:uppercase;color:var(--color-kaki-600)}.hdr-announcement a{color:var(--color-kaki-500);text-decoration:underline;text-underline-offset:2px}:host([variant="transparent"]) .hdr{height:68px;background:transparent;border-bottom:1px solid transparent;padding:0 var(--lib-space-xl);gap:var(--lib-space-xl)}:host([variant="transparent"][scrolled]) .hdr{background:#120e0ad1;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border-bottom-color:#ffffff12}:host([variant="kintsugi"]) .hdr{height:64px;background:var(--color-washi-950);border-bottom:none;padding:0 var(--lib-space-xl);gap:var(--lib-space-xl)}:host([variant="kintsugi"]) .hdr:after{content:"";position:absolute;bottom:0;left:0;right:0;height:2px;background:linear-gradient(90deg,transparent,rgb(184,90,30,.4) 10%,var(--color-kaki-400) 30%,#F5D08A 50%,var(--color-kaki-400) 70%,rgb(184,90,30,.4) 90%,transparent);background-size:200% 100%;animation:hdr-kintsugi-seam 5s linear infinite;pointer-events:none}@keyframes hdr-kintsugi-seam{0%{background-position:-200% 0}to{background-position:200% 0}}:host([variant="glitch"]) .hdr{height:56px;background:var(--color-washi-950);border-bottom:1px solid rgb(255,255,255,.06);padding:0 var(--lib-space-lg);gap:var(--lib-space-xl);position:relative;overflow:hidden;animation:hdr-glitch 7s steps(1) infinite}:host([variant="glitch"]) .hdr:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:repeating-linear-gradient(0deg,transparent,transparent 3px,rgb(255,255,255,.012) 3px,rgb(255,255,255,.012) 4px);pointer-events:none;z-index:5;animation:hdr-scanline-shift 7s steps(1) infinite}@keyframes hdr-glitch{0%,88%,to{transform:none}89%{transform:translate(-2px)}90%{transform:translate(2px)}91%{transform:none}}@keyframes hdr-scanline-shift{0%,88%,to{opacity:1;transform:none}89%{transform:translateY(-3px);opacity:.7}90%{transform:translateY(2px);opacity:.9}91%{transform:none;opacity:1}}:host([variant="mega"]) .hdr{height:64px;background:var(--bg-elevated);border-bottom:1px solid var(--border-subtle);padding:0 var(--lib-space-xl);gap:var(--lib-space-xl);z-index:var(--z-overlay)}.hdr-mega-panel{position:absolute;top:64px;left:0;right:0;background:var(--bg-elevated);border-bottom:1px solid var(--border-subtle);box-shadow:0 12px 40px #1a140e1a;z-index:calc(var(--z-overlay) - 1);opacity:0;transform:translateY(-8px);pointer-events:none;transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.hdr-mega-panel.is-open{opacity:1;transform:translateY(0);pointer-events:auto}.hdr-mega-inner{max-width:1200px;margin:0 auto;padding:var(--lib-space-xl);display:grid;grid-template-columns:1fr 1fr 1fr 240px;gap:var(--lib-space-xl)}.hdr-mega-group-title{font-family:var(--lib-font-mono);font-size:8px;letter-spacing:.22em;text-transform:uppercase;color:var(--text-muted);margin-bottom:var(--lib-space-md)}.hdr-mega-link{display:block;font-family:var(--lib-font-body);font-size:var(--text-sm);color:var(--color-washi-700);padding:var(--lib-space-xs) 0;transition:color var(--duration-fast)}.hdr-mega-link:hover{color:var(--color-kaki-500)}.hdr-mega-cta{background:var(--color-kaki-50);border:1px solid rgb(184,90,30,.15);padding:var(--lib-space-lg)}.hdr-mega-cta-label{font-family:var(--lib-font-mono);font-size:8px;letter-spacing:.2em;text-transform:uppercase;color:var(--color-kaki-500);margin-bottom:var(--lib-space-md)}.hdr-mega-cta-title{font-family:var(--lib-font-display);font-size:1.1rem;font-weight:300;color:var(--color-kaki-600);margin-bottom:var(--lib-space-sm);line-height:1.3}.hdr-mega-cta-desc{font-size:var(--text-xs);color:var(--color-kaki-600);line-height:1.7;margin-bottom:var(--lib-space-md)}.hdr-mega-overlay{position:absolute;top:64px;left:0;right:0;height:300px;background:#1a140e40;opacity:0;pointer-events:none;transition:opacity var(--duration-base);z-index:calc(var(--z-overlay) - 2)}.hdr-mega-overlay.is-open{opacity:1;pointer-events:auto}:host([variant="minimal"]) .hdr{height:60px;background:transparent;border-bottom:none;padding:0 var(--lib-space-xl);gap:var(--lib-space-xl)}:host([variant="shrink"]) .hdr{height:72px;background:var(--bg-elevated);border-bottom:1px solid transparent;padding:0 var(--lib-space-xl);gap:var(--lib-space-xl)}:host([variant="shrink"][shrunk]) .hdr{height:48px;border-bottom-color:var(--border-subtle);box-shadow:0 1px 8px #1a140e12}:host([variant="shrink"]) .hdr-logo-mark{width:36px;height:36px;font-size:1.3rem}:host([variant="shrink"][shrunk]) .hdr-logo-mark{width:26px;height:26px;font-size:.95rem}:host([variant="shrink"]) .hdr-brand-name{font-size:1.3rem;transition:font-size var(--duration-slow) var(--ease-out)}:host([variant="shrink"][shrunk]) .hdr-brand-name{font-size:1rem}.hdr-tagline{font-family:var(--lib-font-mono);font-size:8px;letter-spacing:.18em;text-transform:uppercase;color:var(--text-muted);line-height:1;margin-top:3px;overflow:hidden;max-height:20px;opacity:1;transition:max-height var(--duration-slow) var(--ease-out),opacity var(--duration-slow) var(--ease-out)}:host([variant="shrink"][shrunk]) .hdr-tagline{max-height:0;opacity:0}:host([variant="app-bar"]) .hdr{height:56px;background:var(--bg-elevated);border-bottom:1px solid var(--border-subtle);padding:0 var(--lib-space-lg);gap:var(--lib-space-md)}:host([variant="app-bar"][compact]) .hdr{height:44px;background:#120e0ae6;border-bottom-color:#ffffff12}.hdr-breadcrumbs{display:flex;align-items:center;gap:var(--lib-space-xs);font-family:var(--lib-font-mono);font-size:9px;letter-spacing:.1em;flex-shrink:0}.hdr-breadcrumb-link{color:var(--text-muted);text-transform:uppercase;transition:color var(--duration-fast)}.hdr-breadcrumb-link:hover{color:var(--text-primary)}.hdr-breadcrumb-sep{color:var(--color-washi-300)}.hdr-breadcrumb-current{color:var(--color-washi-700);text-transform:uppercase}:host([variant="app-bar"][compact]) .hdr-breadcrumb-link{color:#faf7f440}:host([variant="app-bar"][compact]) .hdr-breadcrumb-sep{color:#ffffff1f}:host([variant="app-bar"][compact]) .hdr-breadcrumb-current{color:#faf7f480}.hdr-search{display:flex;align-items:center;gap:var(--lib-space-xs);border:1px solid var(--border-subtle);background:var(--bg-base);height:32px;padding:0 var(--lib-space-sm);max-width:320px;flex:1}:host([variant="app-bar"][compact]) .hdr-search{border-color:#ffffff12;background:#ffffff08;height:26px;max-width:260px}.hdr-search input{flex:1;background:none;border:none;outline:none;font-family:var(--lib-font-mono);font-size:9px;letter-spacing:.1em;color:var(--text-primary);width:100%}.hdr-search input::placeholder{color:var(--text-muted)}:host([variant="app-bar"][compact]) .hdr-search input{color:#faf7f499}.hdr-search-kbd{font-family:var(--lib-font-mono);font-size:7px;color:var(--color-washi-300);border:1px solid var(--color-washi-200);padding:0 4px;flex-shrink:0;margin-left:auto}:host([variant="app-bar"][compact]) .hdr-search-kbd{display:none}.hdr-notif{width:32px;height:32px;display:flex;align-items:center;justify-content:center;color:var(--text-muted);position:relative;flex-shrink:0;transition:color var(--duration-base)}.hdr-notif:hover{color:var(--text-primary)}.hdr-notif-dot{position:absolute;top:4px;right:4px;width:5px;height:5px;border-radius:50%;background:var(--color-kaki-400);border:1px solid var(--bg-elevated)}:host([variant="app-bar"][compact]) .hdr-notif{width:26px;height:26px;color:#faf7f440}:host([variant="app-bar"][compact]) .hdr-notif:hover{color:#faf7f4b3}:host([variant="app-bar"][compact]) .hdr-notif-dot{border-color:#120e0ae6}.hdr-avatar{width:30px;height:30px;border-radius:50%;background:var(--color-kaki-500);display:flex;align-items:center;justify-content:center;font-family:var(--lib-font-display);color:#fff;font-size:.9rem;cursor:pointer;flex-shrink:0}:host([variant="app-bar"][compact]) .hdr-avatar{width:26px;height:26px;font-size:.8rem;background:#b85a1e33;border:1px solid rgb(184,90,30,.25);color:var(--color-kaki-400)}.hdr-status{display:flex;align-items:center;gap:var(--lib-space-xs)}.hdr-status-dot{width:6px;height:6px;border-radius:50%;background:var(--color-celadon-400);flex-shrink:0}.hdr-status-text{font-family:var(--lib-font-mono);font-size:8px;letter-spacing:.1em;color:#faf7f433}.hdr-logo{display:flex;align-items:center;gap:var(--lib-space-sm);flex-shrink:0;text-decoration:none;color:inherit}.hdr-logo-mark{width:30px;height:30px;background:var(--color-kaki-500);display:flex;align-items:center;justify-content:center;font-family:var(--lib-font-display);color:#fff;font-size:1.1rem;font-weight:300;flex-shrink:0;transition:all var(--duration-slow) var(--ease-out)}:host([variant="dark"]) .hdr-logo-mark,:host([variant="transparent"]) .hdr-logo-mark{background:#b85a1e33;border:1px solid rgb(184,90,30,.35);color:var(--color-kaki-400)}:host([variant="transparent"]) .hdr-logo-mark{background:#faf7f426;border:1px solid rgb(250,247,244,.25);color:#faf7f4cc}:host([variant="kintsugi"]) .hdr-logo-mark{position:relative;background:transparent;border:none;border-radius:50%;overflow:visible}:host([variant="kintsugi"]) .hdr-logo-mark:before{content:"";position:absolute;top:-2px;right:-2px;bottom:-2px;left:-2px;border-radius:50%;background:conic-gradient(var(--color-kaki-600),#F5D08A,var(--color-kaki-400),#F5D08A,var(--color-kaki-600));animation:hdr-logo-ring 4s linear infinite}:host([variant="kintsugi"]) .hdr-logo-mark:after{content:"";position:absolute;top:1px;right:1px;bottom:1px;left:1px;border-radius:50%;background:var(--color-washi-950)}:host([variant="kintsugi"]) .hdr-logo-mark-text{position:relative;z-index:2;color:var(--color-kaki-400)}@keyframes hdr-logo-ring{to{transform:rotate(360deg)}}.hdr-brand-name{font-family:var(--lib-font-display);font-size:1.2rem;font-weight:300;letter-spacing:.06em;white-space:nowrap}:host([variant="classic"]) .hdr-brand-name,:host([variant="mega"]) .hdr-brand-name,:host([variant="shrink"]) .hdr-brand-name{color:var(--color-washi-900)}:host([variant="dark"]) .hdr-brand-name{color:#faf7f499}:host([variant="transparent"]) .hdr-brand-name{color:#faf7f4bf;transition:color var(--duration-slow)}:host([variant="transparent"][scrolled]) .hdr-brand-name{color:#faf7f4a6}:host([variant="kintsugi"]) .hdr-brand-name{color:#faf7f480}:host([variant="centered"]) .hdr-brand-name{color:var(--color-washi-900);font-size:1.35rem;letter-spacing:.1em}:host([variant="minimal"]) .hdr-brand-name{font-family:var(--lib-font-display);font-size:1.4rem;letter-spacing:.12em;color:var(--color-washi-700)}.hdr-version{font-family:var(--lib-font-mono);font-size:7px;letter-spacing:.18em;text-transform:uppercase;color:#b85a1e80;border:1px solid rgb(184,90,30,.2);padding:1px 5px;margin-left:2px}.hdr-logo-glitch{font-family:var(--lib-font-mono);font-size:.8rem;letter-spacing:.2em;color:var(--color-kaki-400);display:flex;align-items:center;gap:var(--lib-space-xs);text-decoration:none;position:relative;z-index:6;flex-shrink:0}.hdr-logo-glitch-badge{font-family:var(--lib-font-mono);font-size:7px;letter-spacing:.14em;color:#faf7f426;border:1px solid rgb(255,255,255,.08);padding:1px 4px}.hdr-nav{display:flex;align-items:center;gap:var(--lib-space-lg);flex:1}.hdr-nav--right{justify-content:flex-end}.hdr-link{font-family:var(--lib-font-mono);font-size:var(--text-xs);letter-spacing:.14em;text-transform:uppercase;cursor:pointer;display:flex;align-items:center;gap:4px;transition:opacity var(--duration-fast),color var(--duration-fast);white-space:nowrap}.hdr-link:hover{opacity:.7}:host([variant="classic"]) .hdr-link,:host([variant="centered"]) .hdr-link,:host([variant="mega"]) .hdr-link,:host([variant="shrink"]) .hdr-link{color:var(--color-washi-600)}:host([variant="dark"]) .hdr-link{color:#faf7f44d}:host([variant="transparent"]) .hdr-link{color:#faf7f48c;transition:color var(--duration-slow)}:host([variant="transparent"][scrolled]) .hdr-link{color:#faf7f473}:host([variant="kintsugi"]) .hdr-link{color:#faf7f447}:host([variant="kintsugi"]) .hdr-link:hover{opacity:1;color:var(--color-kaki-400)}:host([variant="glitch"]) .hdr-link{font-family:var(--lib-font-mono);font-size:9px;letter-spacing:.12em;text-transform:none;color:#faf7f438;position:relative;z-index:6}:host([variant="glitch"]) .hdr-link:hover{opacity:1;color:var(--color-kaki-400)}:host([variant="minimal"]) .hdr-link{font-family:var(--lib-font-body);font-size:var(--text-sm);letter-spacing:0;text-transform:none;color:var(--color-washi-500);position:relative;padding-bottom:2px}:host([variant="minimal"]) .hdr-link:hover{opacity:1;color:var(--color-washi-900)}:host([variant="minimal"]) .hdr-link.is-active{color:var(--color-washi-900)}:host([variant="minimal"]) .hdr-link.is-active:after{content:"";position:absolute;bottom:-1px;left:0;right:0;height:1px;background:var(--color-washi-700)}.hdr-link-chevron{transition:transform var(--duration-base)}.hdr-link.dd-open .hdr-link-chevron{transform:rotate(180deg)}.hdr-dd{position:relative;display:inline-block}.hdr-dd-menu{position:absolute;top:calc(100% + 8px);left:0;min-width:180px;display:none;z-index:calc(var(--z-overlay) + 1);box-shadow:0 8px 32px #1a140e1f;background:var(--bg-elevated);border:1px solid var(--border-subtle)}.hdr-dd:hover .hdr-dd-menu{display:block}:host([variant="dark"]) .hdr-dd-menu{background:var(--color-washi-900);border-color:#ffffff1a}.hdr-dd-item{display:block;padding:var(--lib-space-sm) var(--lib-space-md);font-family:var(--lib-font-mono);font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:var(--color-washi-500);transition:all var(--duration-fast)}.hdr-dd-item:hover{background:var(--bg-base);color:var(--color-washi-900)}.hdr-dd-item--divider{border-top:1px solid var(--color-washi-100)}:host([variant="dark"]) .hdr-dd-item{color:#faf7f459}:host([variant="dark"]) .hdr-dd-item:hover{background:#ffffff0f;color:#faf7f4cc}.hdr-actions{display:flex;align-items:center;gap:var(--lib-space-sm);flex-shrink:0;position:relative;z-index:6}.hdr-action{font-family:var(--lib-font-mono);font-size:9px;letter-spacing:.16em;text-transform:uppercase;height:36px;padding:0 var(--lib-space-md);display:inline-flex;align-items:center;gap:var(--lib-space-xs);transition:all var(--duration-base);white-space:nowrap;text-decoration:none;cursor:pointer}.hdr-action--kaki{background:var(--color-kaki-500);color:#fff;border:1px solid var(--color-kaki-500)}.hdr-action--kaki:hover{background:var(--color-kaki-600)}.hdr-action--outline{background:transparent;color:var(--color-washi-600);border:1px solid var(--color-washi-300)}.hdr-action--outline:hover{border-color:var(--color-washi-500);color:var(--color-washi-900)}.hdr-action--ghost{background:transparent;color:#faf7f48c;border:1px solid rgb(255,255,255,.12)}.hdr-action--ghost:hover{border-color:#ffffff40;color:#faf7f4d9}.hdr-action--kintsugi{background:transparent;border:1px solid rgb(184,90,30,.35);color:var(--color-kaki-400)}.hdr-action--kintsugi:hover{border-color:var(--color-kaki-400);background:#b85a1e14}.hdr-action--glitch{background:transparent;border:1px solid rgb(255,255,255,.1);color:#faf7f459;animation:hdr-glitch-cta 7s steps(1) infinite;height:30px}.hdr-action--glitch:hover{border-color:var(--color-kaki-400);color:var(--color-kaki-400)}@keyframes hdr-glitch-cta{0%,88%,to{box-shadow:none}89%{box-shadow:-2px 0 #d9723459,2px 0 #4e948240}90%{box-shadow:2px 0 #d972344d,-2px 0 #4e948233}91%{box-shadow:none}}.hdr-login{font-family:var(--lib-font-mono);font-size:var(--text-xs);letter-spacing:.14em;text-transform:uppercase;transition:opacity var(--duration-fast),color var(--duration-fast);text-decoration:none;white-space:nowrap}:host([variant="classic"]) .hdr-login,:host([variant="shrink"]) .hdr-login,:host([variant="mega"]) .hdr-login{color:var(--color-washi-500)}:host([variant="dark"]) .hdr-login{color:#faf7f440}:host([variant="transparent"]) .hdr-login{color:#faf7f466;transition:color var(--duration-slow)}:host([variant="kintsugi"]) .hdr-login{color:#faf7f433}.hdr-login:hover{opacity:.7}.hdr-contact{font-family:var(--lib-font-mono);font-size:var(--text-xs);letter-spacing:.14em;text-transform:uppercase;color:var(--color-kaki-500);text-decoration:none;flex-shrink:0}.hdr-online{font-family:var(--lib-font-mono);font-size:8px;letter-spacing:.12em;color:#4e948299}.hdr-divider{width:1px;height:20px;background:var(--border-subtle);flex-shrink:0}:host([variant="app-bar"][compact]) .hdr-divider{background:#ffffff14;height:16px}.hdr-spacer{flex:1}@media(prefers-reduced-motion:reduce){:host([variant="kintsugi"]) .hdr:after,:host([variant="kintsugi"]) .hdr-logo-mark:before,:host([variant="glitch"]) .hdr,:host([variant="glitch"]) .hdr:before,.hdr-action--glitch{animation:none!important}.hdr{transition:none!important}}}.hdr-burger{display:none;align-items:center;justify-content:center;width:40px;height:40px;flex-shrink:0;margin-left:auto;cursor:pointer;background:none;border:none;padding:0;z-index:6;position:relative}.hdr-mobile-backdrop{display:none;position:fixed;top:0;right:0;bottom:0;left:0;background:#0806048c;z-index:calc(var(--z-overlay) + 1);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:hdr-backdrop-in .2s var(--ease-out) both}.hdr-mobile-drawer{display:none;position:fixed;top:0;right:0;bottom:0;width:min(320px,85vw);background:var(--color-washi-950, #120E0A);border-left:1px solid rgb(255,255,255,.07);z-index:calc(var(--z-overlay) + 2);flex-direction:column;overflow-y:auto;animation:hdr-drawer-in .24s var(--ease-out) both}.hdr-mobile-drawer.is-open{display:flex}.hdr-mobile-links{flex:1;padding:var(--lib-space-xl, 2rem) var(--lib-space-lg, 1.5rem);display:flex;flex-direction:column;gap:2px}.hdr-mobile-link{font-family:var(--lib-font-display, "Cormorant Garamond", serif);font-size:1.35rem;font-weight:300;letter-spacing:-.01em;color:#faf7f48c;text-decoration:none;padding:.5rem 0;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid rgb(255,255,255,.05);transition:color .16s}.hdr-mobile-link:hover{color:#faf7f4d9}.hdr-mobile-sub{display:flex;flex-direction:column;gap:2px;padding:var(--lib-space-xs, .25rem) 0 var(--lib-space-sm, .5rem) var(--lib-space-md, 1rem)}.hdr-mobile-sub-link{font-family:var(--lib-font-mono, "DM Mono", monospace);font-size:.65rem;letter-spacing:.14em;text-transform:uppercase;color:#faf7f438;text-decoration:none;padding:.3rem 0;transition:color .16s}.hdr-mobile-sub-link:hover{color:var(--color-kaki-400, #D97234)}.hdr-mobile-col-title{font-family:var(--lib-font-mono, "DM Mono", monospace);font-size:.55rem;letter-spacing:.2em;text-transform:uppercase;color:#faf7f426;margin:var(--lib-space-md, 1rem) 0 var(--lib-space-xs, .25rem)}.hdr-mobile-divider{height:1px;background:#ffffff12;margin:0 var(--lib-space-lg, 1.5rem)}.hdr-mobile-actions{padding:var(--lib-space-lg, 1.5rem);display:flex;flex-direction:column;gap:var(--lib-space-sm, .5rem)}.hdr-mobile-cta{font-family:var(--lib-font-mono, "DM Mono", monospace);font-size:.65rem;letter-spacing:.16em;text-transform:uppercase;background:var(--color-kaki-500, #B85A1E);color:#fff;border:1px solid var(--color-kaki-500, #B85A1E);padding:0 var(--lib-space-md, 1rem);height:40px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;transition:background .16s}.hdr-mobile-cta:hover{background:var(--color-kaki-600, #8C4115)}.hdr-mobile-login{font-family:var(--lib-font-mono, "DM Mono", monospace);font-size:.6rem;letter-spacing:.14em;text-transform:uppercase;color:#faf7f440;text-decoration:none;text-align:center;padding:var(--lib-space-xs, .25rem) 0;transition:color .16s}.hdr-mobile-login:hover{color:#faf7f499}.hdr-mobile-footer{display:flex;align-items:center;justify-content:space-between;padding:var(--lib-space-md, 1rem) var(--lib-space-lg, 1.5rem);border-top:1px solid rgb(255,255,255,.07);font-family:var(--lib-font-mono, "DM Mono", monospace);font-size:.55rem;letter-spacing:.2em;text-transform:uppercase;color:#faf7f41f}.hdr-mobile-close{background:none;border:none;color:#faf7f433;font-size:.8rem;cursor:pointer;padding:var(--lib-space-xs, .25rem);transition:color .16s}.hdr-mobile-close:hover{color:#faf7f499}@keyframes hdr-drawer-in{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}@keyframes hdr-backdrop-in{0%{opacity:0}to{opacity:1}}@media(max-width:640px){.hdr-burger{display:flex}.hdr-mobile-backdrop{display:block}.hdr-nav,.hdr-actions,.hdr-login,.hdr-contact,.hdr-online,.hdr-divider--desktop,.hdr-status--desktop,.hdr-actions--desktop{display:none!important}:host([variant="centered"]) .hdr{display:flex;grid-template-columns:unset}:host([variant="centered"]) .hdr-nav--centered-left{display:none!important}:host([variant="app-bar"]) .hdr-breadcrumbs{max-width:120px;overflow:hidden}:host([variant="app-bar"]) .hdr-breadcrumb-link,:host([variant="app-bar"]) .hdr-breadcrumb-sep{display:none}:host([variant="app-bar"]) .hdr-search{max-width:36px;overflow:hidden;padding:0 var(--lib-space-xs, .25rem)}:host([variant="app-bar"]) .hdr-search input,:host([variant="app-bar"]) .hdr-search-kbd{display:none}.hdr-mega-panel,.hdr-mega-overlay{display:none!important}:host([variant="classic"]) .hdr,:host([variant="dark"]) .hdr,:host([variant="centered"]) .hdr,:host([variant="mega"]) .hdr{height:56px}:host([variant="shrink"]) .hdr{height:56px}:host([variant="shrink"][shrunk]) .hdr{height:44px}}@media(prefers-reduced-motion:reduce){.hdr-mobile-drawer,.hdr-mobile-backdrop{animation:none}}';
|
|
2
2
|
export {
|
|
3
|
-
|
|
3
|
+
headerCss as default
|
|
4
4
|
};
|
|
5
5
|
//# sourceMappingURL=index214.js.map
|
package/dist/index215.js
CHANGED
|
@@ -1,38 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
function wrapperClass(props) {
|
|
3
|
-
const parts = ["tip-wrap"];
|
|
4
|
-
if (props.size !== "md") parts.push(`tip-${props.size}`);
|
|
5
|
-
if (props.variant !== "dark") parts.push(`tip-${props.variant}`);
|
|
6
|
-
if (props.instant) parts.push("tip-instant");
|
|
7
|
-
if (props.open) parts.push("is-open");
|
|
8
|
-
return parts.join(" ");
|
|
9
|
-
}
|
|
10
|
-
function tooltipTemplate(props) {
|
|
11
|
-
return html`
|
|
12
|
-
<div
|
|
13
|
-
class="${wrapperClass(props)}"
|
|
14
|
-
data-pos="${props.position}"
|
|
15
|
-
part="wrapper"
|
|
16
|
-
>
|
|
17
|
-
<!-- Trigger — el consumidor pone aquí su elemento -->
|
|
18
|
-
<slot aria-describedby="${props.tipId}"></slot>
|
|
19
|
-
|
|
20
|
-
<!-- Burbuja flotante -->
|
|
21
|
-
<span
|
|
22
|
-
id="${props.tipId}"
|
|
23
|
-
class="tip-bubble"
|
|
24
|
-
role="tooltip"
|
|
25
|
-
part="bubble"
|
|
26
|
-
>
|
|
27
|
-
<!-- Texto simple via prop -->
|
|
28
|
-
${props.content ? props.content : nothing}
|
|
29
|
-
<!-- Contenido rico via slot nombrado -->
|
|
30
|
-
<slot name="content"></slot>
|
|
31
|
-
</span>
|
|
32
|
-
</div>
|
|
33
|
-
`;
|
|
34
|
-
}
|
|
1
|
+
const inputStyles = "@layer tokens,reset,components;@layer reset{:host{display:block;width:100%}*,*:before,*:after{box-sizing:border-box}}@layer components{.input-group{display:flex;flex-direction:column;gap:var(--lib-space-xs)}.input-label{font-family:var(--lib-font-mono);font-size:10px;font-weight:var(--weight-regular);letter-spacing:var(--tracking-wider);text-transform:uppercase;color:var(--border-default);display:flex;align-items:center;gap:var(--lib-space-xs)}.input-required{color:var(--color-error);font-size:var(--text-xs)}.input-wrapper{display:flex;align-items:center;gap:var(--lib-space-sm);padding:0 var(--lib-space-md);background:var(--bg-elevated);border:1px solid var(--border-default);border-radius:var(--radius-none);min-height:42px;transition:border-color var(--duration-base) var(--ease-default),box-shadow var(--duration-base) var(--ease-default)}.input-wrapper:focus-within{border-color:var(--color-washi-800);box-shadow:0 0 0 3px var(--color-ink-10)}input{flex:1;border:none;background:transparent;font-family:var(--lib-font-body);font-size:var(--text-sm);color:var(--text-primary);padding:var(--lib-space-sm) 0;outline:none;width:100%}input::placeholder{color:var(--border-strong)}::slotted(*){display:flex;align-items:center;color:var(--text-muted);font-size:var(--text-sm);flex-shrink:0}.input-password-toggle{display:flex;align-items:center;justify-content:center;background:transparent;border:none;padding:var(--lib-space-xs);cursor:pointer;color:var(--text-muted);flex-shrink:0;transition:color var(--duration-base) var(--ease-default)}.input-password-toggle:hover{color:var(--text-primary)}.has-error .input-wrapper{border-color:var(--color-error)}.has-error .input-wrapper:focus-within{border-color:var(--color-error);box-shadow:0 0 0 3px #8c2a1a1a}.has-error .input-label{color:var(--color-error)}.input-error-message{font-family:var(--lib-font-mono);font-size:10px;letter-spacing:var(--tracking-wide);color:var(--color-error)}.is-disabled .input-wrapper{background:var(--bg-surface);border-color:var(--border-subtle);cursor:not-allowed}.is-disabled input{cursor:not-allowed;color:var(--text-muted)}.is-disabled .input-label{color:var(--text-muted)}}";
|
|
35
2
|
export {
|
|
36
|
-
|
|
3
|
+
inputStyles as default
|
|
37
4
|
};
|
|
38
5
|
//# sourceMappingURL=index215.js.map
|
package/dist/index215.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index215.js","sources":[
|
|
1
|
+
{"version":3,"file":"index215.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index216.js
CHANGED
|
@@ -1,52 +1,69 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
<polyline points="2,6 5,9 10,3"/>
|
|
5
|
-
</svg>
|
|
6
|
-
`;
|
|
7
|
-
const iconError = svg`
|
|
8
|
-
<svg class="step-icon" viewBox="0 0 14 14" fill="none"
|
|
9
|
-
stroke="currentColor" stroke-width="2" stroke-linecap="round"
|
|
10
|
-
aria-hidden="true">
|
|
11
|
-
<line x1="7" y1="3" x2="7" y2="7.5"/>
|
|
12
|
-
<circle cx="7" cy="10" r="0.75" fill="currentColor" stroke="none"/>
|
|
13
|
-
</svg>
|
|
14
|
-
`;
|
|
15
|
-
function nodeContent(props) {
|
|
16
|
-
if (props.status === "completed") return iconCheck;
|
|
17
|
-
if (props.status === "error") return iconError;
|
|
18
|
-
return html`${props.index}`;
|
|
19
|
-
}
|
|
20
|
-
function stepTemplate(props) {
|
|
21
|
-
const isVertical = props.orientation === "vertical";
|
|
1
|
+
import { nothing, html } from "lit";
|
|
2
|
+
function inputTemplate(props) {
|
|
3
|
+
const inputType = props.type === "password" && props.showPassword ? "text" : props.type;
|
|
22
4
|
return html`
|
|
23
|
-
<div
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
5
|
+
<div class="input-group ${props.error ? "has-error" : ""} ${props.disabled ? "is-disabled" : ""}">
|
|
6
|
+
|
|
7
|
+
${props.label ? html`
|
|
8
|
+
<label
|
|
9
|
+
class="input-label"
|
|
10
|
+
for="${props.uuid}"
|
|
11
|
+
>
|
|
12
|
+
${props.label}
|
|
13
|
+
${props.required ? html`<span class="input-required" aria-hidden="true">*</span>` : nothing}
|
|
14
|
+
</label>
|
|
15
|
+
` : nothing}
|
|
16
|
+
|
|
17
|
+
<div class="input-wrapper">
|
|
18
|
+
<slot name="prefix"></slot>
|
|
19
|
+
|
|
20
|
+
<input
|
|
21
|
+
id="${props.uuid}"
|
|
22
|
+
type="${inputType}"
|
|
23
|
+
placeholder="${props.placeholder}"
|
|
24
|
+
?required="${props.required}"
|
|
25
|
+
?disabled="${props.disabled}"
|
|
26
|
+
aria-invalid="${props.error}"
|
|
27
|
+
aria-describedby="${props.error && props.errorMessage ? `${props.uuid}-error` : nothing}"
|
|
28
|
+
.value="${props.value}"
|
|
29
|
+
@input="${props.handleInput}"
|
|
30
|
+
/>
|
|
31
|
+
|
|
32
|
+
${props.type === "password" ? html`
|
|
33
|
+
<button
|
|
34
|
+
class="input-password-toggle"
|
|
35
|
+
type="button"
|
|
36
|
+
@click="${props.handleTogglePassword}"
|
|
37
|
+
aria-label="${props.showPassword ? "Ocultar contraseña" : "Mostrar contraseña"}"
|
|
38
|
+
>
|
|
39
|
+
${props.showPassword ? html`
|
|
40
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
41
|
+
<path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94"/>
|
|
42
|
+
<path d="M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19"/>
|
|
43
|
+
<line x1="1" y1="1" x2="23" y2="23"/>
|
|
44
|
+
</svg>
|
|
45
|
+
` : html`
|
|
46
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
47
|
+
<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/>
|
|
48
|
+
<circle cx="12" cy="12" r="3"/>
|
|
49
|
+
</svg>
|
|
50
|
+
`}
|
|
51
|
+
</button>
|
|
52
|
+
` : nothing}
|
|
53
|
+
|
|
54
|
+
<slot name="suffix"></slot>
|
|
30
55
|
</div>
|
|
31
56
|
|
|
32
|
-
${
|
|
57
|
+
${props.error && props.errorMessage ? html`
|
|
58
|
+
<span class="input-error-message" id="${props.uuid}-error" role="alert">
|
|
59
|
+
${props.errorMessage}
|
|
60
|
+
</span>
|
|
61
|
+
` : nothing}
|
|
33
62
|
|
|
34
|
-
${isVertical ? html`
|
|
35
|
-
<div class="step-body">
|
|
36
|
-
<p class="step-title">${props.label}</p>
|
|
37
|
-
${props.sub ? html`<p class="step-sub">${props.sub}</p>` : nothing}
|
|
38
|
-
<div class="step-content"><slot></slot></div>
|
|
39
|
-
</div>
|
|
40
|
-
` : html`
|
|
41
|
-
<div class="step-text">
|
|
42
|
-
<span class="step-label">${props.label}</span>
|
|
43
|
-
${props.sub ? html`<span class="step-sub">${props.sub}</span>` : nothing}
|
|
44
|
-
</div>
|
|
45
|
-
`}
|
|
46
63
|
</div>
|
|
47
64
|
`;
|
|
48
65
|
}
|
|
49
66
|
export {
|
|
50
|
-
|
|
67
|
+
inputTemplate
|
|
51
68
|
};
|
|
52
69
|
//# sourceMappingURL=index216.js.map
|