@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/index298.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index298.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index298.js","sources":["../src/components/atoms/content-pillar/content-pillar.html.ts"],"sourcesContent":["import { html, nothing, type TemplateResult } from 'lit';\nimport type { LibContentPillar } from './content-pillar.component';\n\nexport function rendercontentPillar(ctx: LibContentPillar): TemplateResult {\n return html`\n <div class=\"pillar\" part=\"pillar\">\n\n ${ctx.kanji\n ? html`<div class=\"pillar-kanji\" part=\"kanji\" aria-hidden=\"true\">${ctx.kanji}</div>`\n : nothing\n }\n\n <div class=\"pillar-body\" part=\"body\">\n ${ctx.label\n ? html`<p class=\"pillar-label\" part=\"label\">${ctx.label}</p>`\n : nothing\n }\n\n ${ctx.description\n ? html`<p class=\"pillar-desc\" part=\"description\">${ctx.description}</p>`\n : html`<slot></slot>`\n }\n </div>\n\n </div>\n `;\n}"],"names":[],"mappings":";AAGO,SAAS,oBAAoB,KAAuC;AACzE,SAAO;AAAA;AAAA;AAAA,QAGD,IAAI,QACF,iEAAiE,IAAI,KAAK,WAC1E,OACJ;AAAA;AAAA;AAAA,UAGI,IAAI,QACF,4CAA4C,IAAI,KAAK,SACrD,OACJ;AAAA;AAAA,UAEE,IAAI,cACF,iDAAiD,IAAI,WAAW,SAChE,mBACJ;AAAA;AAAA;AAAA;AAAA;AAKR;"}
|
package/dist/index299.js
CHANGED
|
@@ -1,136 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
function renderValue(v, unit) {
|
|
3
|
-
return html`${v}${unit ? html`<span class="rs-value-unit">${unit}</span>` : nothing}`;
|
|
4
|
-
}
|
|
5
|
-
function renderMarks(marks, pct) {
|
|
6
|
-
if (!marks.length) return html``;
|
|
7
|
-
return html`
|
|
8
|
-
<div class="rs-marks">
|
|
9
|
-
${marks.map((m) => html`
|
|
10
|
-
<div
|
|
11
|
-
class="rs-mark ${m.pct <= pct ? "is-filled" : ""}"
|
|
12
|
-
style="left: ${m.pct}%"
|
|
13
|
-
>
|
|
14
|
-
${m.label ? html`<span class="rs-mark-label">${m.label}</span>` : nothing}
|
|
15
|
-
</div>
|
|
16
|
-
`)}
|
|
17
|
-
</div>
|
|
18
|
-
`;
|
|
19
|
-
}
|
|
20
|
-
function renderLimits(show, low, high) {
|
|
21
|
-
if (!show) return html``;
|
|
22
|
-
return html`
|
|
23
|
-
<div class="rs-limits">
|
|
24
|
-
<span class="rs-limit">${low}</span>
|
|
25
|
-
<span class="rs-limit">${high}</span>
|
|
26
|
-
</div>
|
|
27
|
-
`;
|
|
28
|
-
}
|
|
29
|
-
function renderTooltip(show, pct, value, unit) {
|
|
30
|
-
if (!show) return html``;
|
|
31
|
-
return html`
|
|
32
|
-
<div class="rs-tooltip-wrap" style="left: ${pct}%">
|
|
33
|
-
<span class="rs-tooltip-bubble">${value}${unit}</span>
|
|
34
|
-
</div>
|
|
35
|
-
`;
|
|
36
|
-
}
|
|
37
|
-
function renderTrack(p) {
|
|
38
|
-
if (p.dual) {
|
|
39
|
-
return html`
|
|
40
|
-
<div class="rs-track-wrap">
|
|
41
|
-
<div class="rs-track">
|
|
42
|
-
<div
|
|
43
|
-
class="rs-fill-dual"
|
|
44
|
-
style="left: ${p.minPct}%; right: ${100 - p.maxPct}%"
|
|
45
|
-
></div>
|
|
46
|
-
</div>
|
|
47
|
-
<input
|
|
48
|
-
type="range"
|
|
49
|
-
class="rs-input-min"
|
|
50
|
-
min=${p.min} max=${p.max} step=${p.step}
|
|
51
|
-
.value=${String(p.valueMin)}
|
|
52
|
-
?disabled=${p.disabled}
|
|
53
|
-
aria-label="Mínimo"
|
|
54
|
-
@input=${p.onInputMin}
|
|
55
|
-
>
|
|
56
|
-
<input
|
|
57
|
-
type="range"
|
|
58
|
-
class="rs-input-max"
|
|
59
|
-
min=${p.min} max=${p.max} step=${p.step}
|
|
60
|
-
.value=${String(p.valueMax)}
|
|
61
|
-
?disabled=${p.disabled}
|
|
62
|
-
aria-label="Máximo"
|
|
63
|
-
@input=${p.onInputMax}
|
|
64
|
-
>
|
|
65
|
-
</div>
|
|
66
|
-
`;
|
|
67
|
-
}
|
|
68
|
-
if (p.vertical) {
|
|
69
|
-
return html`
|
|
70
|
-
<div class="rs-vert-wrap">
|
|
71
|
-
<div class="rs-track-wrap">
|
|
72
|
-
<div class="rs-track">
|
|
73
|
-
<div class="rs-fill" style="width: ${p.pct}%"></div>
|
|
74
|
-
</div>
|
|
75
|
-
<input
|
|
76
|
-
type="range"
|
|
77
|
-
min=${p.min} max=${p.max} step=${p.step}
|
|
78
|
-
.value=${String(p.value)}
|
|
79
|
-
?disabled=${p.disabled}
|
|
80
|
-
@input=${p.onInput}
|
|
81
|
-
>
|
|
82
|
-
</div>
|
|
83
|
-
</div>
|
|
84
|
-
`;
|
|
85
|
-
}
|
|
86
|
-
return html`
|
|
87
|
-
<div class="rs-track-wrap">
|
|
88
|
-
<div class="rs-track">
|
|
89
|
-
<div class="rs-fill" style="width: ${p.pct}%"></div>
|
|
90
|
-
</div>
|
|
91
|
-
<input
|
|
92
|
-
type="range"
|
|
93
|
-
min=${p.min} max=${p.max} step=${p.step}
|
|
94
|
-
.value=${String(p.value)}
|
|
95
|
-
?disabled=${p.disabled}
|
|
96
|
-
@input=${p.onInput}
|
|
97
|
-
>
|
|
98
|
-
${renderTooltip(p.tooltip, p.pct, p.value, p.unit)}
|
|
99
|
-
</div>
|
|
100
|
-
`;
|
|
101
|
-
}
|
|
102
|
-
function rangeSliderTemplate(p) {
|
|
103
|
-
const valueDisplay = p.dual ? html`<span class="rs-value">
|
|
104
|
-
${p.valueMin} — ${p.valueMax}
|
|
105
|
-
${p.unit ? html`<span class="rs-value-unit">${p.unit}</span>` : nothing}
|
|
106
|
-
</span>` : html`<span class="rs-value">${renderValue(p.value, p.unit)}</span>`;
|
|
107
|
-
return html`
|
|
108
|
-
<div class="rs">
|
|
109
|
-
|
|
110
|
-
${!p.vertical && (p.label || p.dual) ? html`
|
|
111
|
-
<div class="rs-label-row">
|
|
112
|
-
${p.label ? html`<span class="rs-label">${p.label}</span>` : nothing}
|
|
113
|
-
${valueDisplay}
|
|
114
|
-
</div>
|
|
115
|
-
` : nothing}
|
|
116
|
-
|
|
117
|
-
${renderTrack(p)}
|
|
118
|
-
|
|
119
|
-
${p.vertical ? html`
|
|
120
|
-
<div class="rs-label-row">
|
|
121
|
-
${p.label ? html`<span class="rs-label">${p.label}</span>` : nothing}
|
|
122
|
-
${valueDisplay}
|
|
123
|
-
</div>
|
|
124
|
-
` : nothing}
|
|
125
|
-
|
|
126
|
-
${renderMarks(p.marks, p.pct)}
|
|
127
|
-
|
|
128
|
-
${renderLimits(p.showLimits, p.limitMinText, p.limitMaxText)}
|
|
129
|
-
|
|
130
|
-
</div>
|
|
131
|
-
`;
|
|
132
|
-
}
|
|
1
|
+
const componentCss = '@layer tokens,reset,components;@layer tokens{:host{display:block;--pp-kanji-color: rgb(184, 90, 30, .35);--pp-label-color: rgb(184, 90, 30, .5);--pp-desc-color: rgb(250, 247, 244, .25);--pp-kanji-size: 2rem;--pp-kanji-width: 2.5rem;--pp-gap: 1.25rem;--pp-font-display: var(--lib-font-display, "Cormorant Garamond", Georgia, serif);--pp-font-mono: var(--lib-font-mono, "DM Mono", "Courier New", monospace);--pp-font-body: var(--lib-font-body, "Shippori Mincho", serif)}:host([surface="light"]){--pp-kanji-color: rgb(184, 90, 30, .25);--pp-label-color: var(--color-kaki-500, #B85A1E);--pp-desc-color: var(--color-washi-600, #7A6A5C)}}@layer reset{*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}}@layer components{.pillar{display:flex;gap:var(--pp-gap);align-items:flex-start}.pillar-kanji{font-family:var(--pp-font-display);font-size:var(--pp-kanji-size);font-weight:300;color:var(--pp-kanji-color);line-height:1;flex-shrink:0;width:var(--pp-kanji-width);text-align:center;-webkit-user-select:none;user-select:none}.pillar-body{display:flex;flex-direction:column;gap:.35rem}.pillar-label{font-family:var(--pp-font-mono);font-size:.65rem;letter-spacing:.2em;text-transform:uppercase;color:var(--pp-label-color);line-height:1}.pillar-desc{font-family:var(--pp-font-body);font-size:.82rem;color:var(--pp-desc-color);line-height:1.8}::slotted(*){font-family:var(--pp-font-body);font-size:.82rem;color:var(--pp-desc-color);line-height:1.8;margin:0}}';
|
|
133
2
|
export {
|
|
134
|
-
|
|
3
|
+
componentCss as default
|
|
135
4
|
};
|
|
136
5
|
//# sourceMappingURL=index299.js.map
|
package/dist/index299.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index299.js","sources":[
|
|
1
|
+
{"version":3,"file":"index299.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index30.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { unsafeCSS,
|
|
2
|
-
import { property, customElement } from "lit/decorators.js";
|
|
3
|
-
import
|
|
4
|
-
import { aspectRatioTemplate } from "./index244.js";
|
|
5
|
-
import styles from "./index245.js";
|
|
1
|
+
import { unsafeCSS, LitElement, html } from "lit";
|
|
2
|
+
import { property, query, customElement } from "lit/decorators.js";
|
|
3
|
+
import styles from "./index317.js";
|
|
6
4
|
var __defProp = Object.defineProperty;
|
|
7
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
6
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -13,30 +11,45 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
13
11
|
if (kind && result) __defProp(target, key, result);
|
|
14
12
|
return result;
|
|
15
13
|
};
|
|
16
|
-
let
|
|
14
|
+
let LibMagnetic = class extends LitElement {
|
|
17
15
|
constructor() {
|
|
18
16
|
super(...arguments);
|
|
19
|
-
this.
|
|
17
|
+
this.shift = 0.4;
|
|
20
18
|
}
|
|
21
19
|
render() {
|
|
22
|
-
const hostStyles = {
|
|
23
|
-
"--lib-aspect-ratio": this.ratio
|
|
24
|
-
};
|
|
25
20
|
return html`
|
|
26
|
-
<div
|
|
27
|
-
|
|
21
|
+
<div
|
|
22
|
+
class="magnetic-wrapper"
|
|
23
|
+
@mousemove=${this._handleMouseMove}
|
|
24
|
+
@mouseleave=${this._handleMouseLeave}
|
|
25
|
+
>
|
|
26
|
+
<slot></slot>
|
|
28
27
|
</div>
|
|
29
28
|
`;
|
|
30
29
|
}
|
|
30
|
+
_handleMouseMove(e) {
|
|
31
|
+
const { left, top, width, height } = this.getBoundingClientRect();
|
|
32
|
+
const centerX = left + width / 2;
|
|
33
|
+
const centerY = top + height / 2;
|
|
34
|
+
const deltaX = (e.clientX - centerX) * this.shift;
|
|
35
|
+
const deltaY = (e.clientY - centerY) * this.shift;
|
|
36
|
+
this._wrapper.style.transform = `translate(${deltaX}px, ${deltaY}px)`;
|
|
37
|
+
}
|
|
38
|
+
_handleMouseLeave() {
|
|
39
|
+
this._wrapper.style.transform = `translate(0px, 0px)`;
|
|
40
|
+
}
|
|
31
41
|
};
|
|
32
|
-
|
|
42
|
+
LibMagnetic.styles = unsafeCSS(styles);
|
|
43
|
+
__decorateClass([
|
|
44
|
+
property({ type: Number })
|
|
45
|
+
], LibMagnetic.prototype, "shift", 2);
|
|
33
46
|
__decorateClass([
|
|
34
|
-
|
|
35
|
-
],
|
|
36
|
-
|
|
37
|
-
customElement("lib-
|
|
38
|
-
],
|
|
47
|
+
query(".magnetic-wrapper")
|
|
48
|
+
], LibMagnetic.prototype, "_wrapper", 2);
|
|
49
|
+
LibMagnetic = __decorateClass([
|
|
50
|
+
customElement("lib-magnetic")
|
|
51
|
+
], LibMagnetic);
|
|
39
52
|
export {
|
|
40
|
-
|
|
53
|
+
LibMagnetic
|
|
41
54
|
};
|
|
42
55
|
//# sourceMappingURL=index30.js.map
|
package/dist/index30.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index30.js","sources":["../src/components/atoms/
|
|
1
|
+
{"version":3,"file":"index30.js","sources":["../src/components/atoms/magnetic/lib-magnetic.component.ts"],"sourcesContent":["import { LitElement, TemplateResult, html, unsafeCSS } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport styles from './lib-magnetic.css?inline';\n\n@customElement('lib-magnetic')\nexport class LibMagnetic extends LitElement {\n static override styles = unsafeCSS(styles);\n\n /**\n * Intensidad del efecto (0.1 a 1). \n * Valores más altos hacen que el elemento siga más de cerca al ratón.\n */\n @property({ type: Number }) shift = 0.4;\n\n @query('.magnetic-wrapper') _wrapper!: HTMLElement;\n\n override render():TemplateResult {\n return html`\n <div \n class=\"magnetic-wrapper\"\n @mousemove=${this._handleMouseMove}\n @mouseleave=${this._handleMouseLeave}\n >\n <slot></slot>\n </div>\n `;\n }\n\n private _handleMouseMove(e: MouseEvent):void {\n const { left, top, width, height } = this.getBoundingClientRect();\n \n // Calculamos la distancia del cursor respecto al centro del elemento\n const centerX = left + width / 2;\n const centerY = top + height / 2;\n \n const deltaX = (e.clientX - centerX) * this.shift;\n const deltaY = (e.clientY - centerY) * this.shift;\n\n this._wrapper.style.transform = `translate(${deltaX}px, ${deltaY}px)`;\n }\n\n private _handleMouseLeave():void {\n // Retorno suave a la posición inicial\n this._wrapper.style.transform = `translate(0px, 0px)`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'lib-magnetic': LibMagnetic;\n }\n}"],"names":[],"mappings":";;;;;;;;;;;;;AAKO,IAAM,cAAN,cAA0B,WAAW;AAAA,EAArC,cAAA;AAAA,UAAA,GAAA,SAAA;AAOuB,SAAA,QAAQ;AAAA,EAAA;AAAA,EAI3B,SAAwB;AAC/B,WAAO;AAAA;AAAA;AAAA,qBAGU,KAAK,gBAAgB;AAAA,sBACpB,KAAK,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA,EAK1C;AAAA,EAEQ,iBAAiB,GAAoB;AAC3C,UAAM,EAAE,MAAM,KAAK,OAAO,OAAA,IAAW,KAAK,sBAAA;AAG1C,UAAM,UAAU,OAAO,QAAQ;AAC/B,UAAM,UAAU,MAAM,SAAS;AAE/B,UAAM,UAAU,EAAE,UAAU,WAAW,KAAK;AAC5C,UAAM,UAAU,EAAE,UAAU,WAAW,KAAK;AAE5C,SAAK,SAAS,MAAM,YAAY,aAAa,MAAM,OAAO,MAAM;AAAA,EAClE;AAAA,EAEQ,oBAAyB;AAE/B,SAAK,SAAS,MAAM,YAAY;AAAA,EAClC;AACF;AAxCa,YACK,SAAS,UAAU,MAAM;AAMb,gBAAA;AAAA,EAA3B,SAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAPf,YAOiB,WAAA,SAAA,CAAA;AAEA,gBAAA;AAAA,EAA3B,MAAM,mBAAmB;AAAA,GATf,YASiB,WAAA,YAAA,CAAA;AATjB,cAAN,gBAAA;AAAA,EADN,cAAc,cAAc;AAAA,GAChB,WAAA;"}
|
package/dist/index300.js
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
|
-
|
|
1
|
+
import { nothing, html } from "lit";
|
|
2
|
+
function copyButtonTemplate(props) {
|
|
3
|
+
const btn = html`
|
|
4
|
+
<button
|
|
5
|
+
type="button"
|
|
6
|
+
class="copy-btn"
|
|
7
|
+
aria-label="${props.iconOnly ? "Copiar al portapapeles" : nothing}"
|
|
8
|
+
?disabled="${props.disabled}"
|
|
9
|
+
@click="${props.onClick}"
|
|
10
|
+
>
|
|
11
|
+
<span class="copy-btn__idle">
|
|
12
|
+
<lib-icon name="copy" size="${props.size === "lg" ? "sm" : "xs"}"></lib-icon>
|
|
13
|
+
${!props.iconOnly && props.label ? html`<span class="copy-btn__text">${props.label}</span>` : nothing}
|
|
14
|
+
</span>
|
|
15
|
+
|
|
16
|
+
<span class="copy-btn__copied">
|
|
17
|
+
<lib-icon name="check" size="${props.size === "lg" ? "sm" : "xs"}"></lib-icon>
|
|
18
|
+
${!props.iconOnly && props.successLabel ? html`<span class="copy-btn__text">${props.successLabel}</span>` : nothing}
|
|
19
|
+
</span>
|
|
20
|
+
</button>
|
|
21
|
+
`;
|
|
22
|
+
if (!props.tooltip) return btn;
|
|
23
|
+
return html`
|
|
24
|
+
<span class="copy-btn__wrap">
|
|
25
|
+
${btn}
|
|
26
|
+
<span class="copy-btn__tooltip">Copiado</span>
|
|
27
|
+
</span>
|
|
28
|
+
`;
|
|
29
|
+
}
|
|
2
30
|
export {
|
|
3
|
-
|
|
31
|
+
copyButtonTemplate
|
|
4
32
|
};
|
|
5
33
|
//# sourceMappingURL=index300.js.map
|
package/dist/index300.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index300.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"index300.js","sources":["../src/components/atoms/copy-button/lib-copy-button.html.ts"],"sourcesContent":["import { html, nothing, TemplateResult } from 'lit';\n\nexport type LibCopyVariant = 'ghost' | 'outlined' | 'filled' | 'subtle' | 'on-dark';\nexport type LibCopySize = 'sm' | 'md' | 'lg';\n\nexport interface CopyButtonTemplateProps {\n value: string;\n variant: LibCopyVariant;\n size: LibCopySize;\n iconOnly: boolean;\n label: string;\n successLabel: string;\n tooltip: boolean;\n copied: boolean;\n disabled: boolean;\n onClick: () => void;\n}\n\n/**\n * Plantilla para lib-copy-button.\n *\n * Dos capas internas con crossfade CSS:\n * .copy-btn__idle → icono copy (+ label opcional) — visible en reposo\n * .copy-btn__copied → icono check (+ label opcional) — visible al copiar\n *\n * El atributo [copied] en :host activa el swap via CSS.\n * El tooltip es opcional y se posiciona en un wrapper.\n */\nexport function copyButtonTemplate(props: CopyButtonTemplateProps): TemplateResult {\n const btn = html`\n <button\n type=\"button\"\n class=\"copy-btn\"\n aria-label=\"${props.iconOnly ? 'Copiar al portapapeles' : nothing}\"\n ?disabled=\"${props.disabled}\"\n @click=\"${props.onClick}\"\n >\n <span class=\"copy-btn__idle\">\n <lib-icon name=\"copy\" size=\"${props.size === 'lg' ? 'sm' : 'xs'}\"></lib-icon>\n ${!props.iconOnly && props.label\n ? html`<span class=\"copy-btn__text\">${props.label}</span>`\n : nothing}\n </span>\n\n <span class=\"copy-btn__copied\">\n <lib-icon name=\"check\" size=\"${props.size === 'lg' ? 'sm' : 'xs'}\"></lib-icon>\n ${!props.iconOnly && props.successLabel\n ? html`<span class=\"copy-btn__text\">${props.successLabel}</span>`\n : nothing}\n </span>\n </button>\n `;\n\n if (!props.tooltip) return btn;\n\n return html`\n <span class=\"copy-btn__wrap\">\n ${btn}\n <span class=\"copy-btn__tooltip\">Copiado</span>\n </span>\n `;\n}"],"names":[],"mappings":";AA4BO,SAAS,mBAAmB,OAAgD;AACjF,QAAM,MAAM;AAAA;AAAA;AAAA;AAAA,oBAIM,MAAM,WAAW,2BAA2B,OAAO;AAAA,mBACpD,MAAM,QAAQ;AAAA,gBACjB,MAAM,OAAO;AAAA;AAAA;AAAA,sCAGS,MAAM,SAAS,OAAO,OAAO,IAAI;AAAA,UAC7D,CAAC,MAAM,YAAY,MAAM,QACvB,oCAAoC,MAAM,KAAK,YAC/C,OAAO;AAAA;AAAA;AAAA;AAAA,uCAIoB,MAAM,SAAS,OAAO,OAAO,IAAI;AAAA,UAC9D,CAAC,MAAM,YAAY,MAAM,eACvB,oCAAoC,MAAM,YAAY,YACtD,OAAO;AAAA;AAAA;AAAA;AAKjB,MAAI,CAAC,MAAM,QAAS,QAAO;AAE3B,SAAO;AAAA;AAAA,QAED,GAAG;AAAA;AAAA;AAAA;AAIX;"}
|
package/dist/index301.js
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2021 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/
|
|
6
|
-
function* o(o2, f) {
|
|
7
|
-
if (void 0 !== o2) {
|
|
8
|
-
let i = 0;
|
|
9
|
-
for (const t of o2) yield f(t, i++);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
1
|
+
const copyButtonCss = '@layer tokens,reset,components;@layer reset{:host{display:inline-flex;flex-shrink:0;vertical-align:middle}*,*:before,*:after{box-sizing:border-box}}@layer components{.copy-btn__wrap{position:relative;display:inline-flex}.copy-btn{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:var(--lib-space-xs);position:relative;font-family:var(--lib-font-mono);font-size:var(--text-xs);letter-spacing:var(--tracking-wider);text-transform:uppercase;white-space:nowrap;overflow:hidden;outline:none;transition:background var(--duration-base) var(--ease-default),border-color var(--duration-base) var(--ease-default),color var(--duration-base) var(--ease-default),transform var(--duration-fast) var(--ease-default)}.copy-btn:disabled{opacity:.4;pointer-events:none;cursor:not-allowed}.copy-btn:active:not(:disabled){transform:scale(.94)}.copy-btn:focus-visible{box-shadow:0 0 0 3px var(--color-ink-20)}:host([size="sm"]) .copy-btn{height:28px;padding:0 var(--lib-space-sm);font-size:10px}:host([size="md"]) .copy-btn{height:34px;padding:0 var(--lib-space-md);font-size:var(--text-xs)}:host([size="lg"]) .copy-btn{height:40px;padding:0 var(--lib-space-lg);font-size:var(--text-sm)}:host([icon-only][size="sm"]) .copy-btn{height:28px;width:28px;padding:0}:host([icon-only][size="md"]) .copy-btn{height:34px;width:34px;padding:0}:host([icon-only][size="lg"]) .copy-btn{height:40px;width:40px;padding:0}.copy-btn__idle,.copy-btn__copied{display:inline-flex;align-items:center;gap:var(--lib-space-xs);transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-slow) var(--ease-bounce)}.copy-btn__idle{opacity:1;transform:translateY(0) scale(1)}.copy-btn__copied{opacity:0;transform:translateY(6px) scale(.8);position:absolute}:host([copied]) .copy-btn__idle{opacity:0;transform:translateY(-6px) scale(.8)}:host([copied]) .copy-btn__copied{opacity:1;transform:translateY(0) scale(1);position:relative}:host([copied]) .copy-btn{color:var(--color-celadon-600)!important;border-color:var(--color-celadon-500)!important}:host([variant="ghost"]) .copy-btn{background:transparent;color:var(--text-muted);border-radius:var(--radius-sm)}:host([variant="ghost"]) .copy-btn:hover{background:var(--color-washi-200);color:var(--text-primary)}:host([variant="outlined"]) .copy-btn{background:transparent;color:var(--text-secondary);border:1px solid var(--border-default);border-radius:var(--radius-sm)}:host([variant="outlined"]) .copy-btn:hover{background:var(--bg-surface);border-color:var(--border-strong);color:var(--text-primary)}:host([variant="filled"]) .copy-btn{background:var(--color-washi-900);color:var(--color-washi-50);border:1px solid transparent;border-radius:var(--radius-sm)}:host([variant="filled"]) .copy-btn:hover{background:var(--color-washi-800)}:host([variant="filled"][copied]) .copy-btn{background:var(--color-celadon-500)!important;border-color:transparent!important;color:#fff!important}:host([variant="subtle"]) .copy-btn{background:var(--color-washi-100);color:var(--text-secondary);border:1px solid transparent;border-radius:var(--radius-sm)}:host([variant="subtle"]) .copy-btn:hover{background:var(--color-washi-200);color:var(--text-primary)}:host([variant="subtle"][copied]) .copy-btn{background:var(--color-celadon-100)!important}:host([variant="on-dark"]) .copy-btn{background:#ffffff12;color:#ffffff73;border:1px solid oklch(100% 0 0deg / .1);border-radius:var(--radius-sm)}:host([variant="on-dark"]) .copy-btn:hover{background:#ffffff1f;color:#ffffffd9;border-color:#fff3}:host([variant="on-dark"][copied]) .copy-btn{color:#6daf92!important;border-color:#6daf92!important;background:#ffffff12!important}:host([variant="on-dark"]) .copy-btn:focus-visible{box-shadow:0 0 0 3px #fff3}.copy-btn__tooltip{position:absolute;bottom:calc(100% + 6px);left:50%;transform:translate(-50%) translateY(4px);background:var(--color-washi-900);color:var(--color-washi-50);font-family:var(--lib-font-mono);font-size:10px;letter-spacing:var(--tracking-wider);white-space:nowrap;padding:3px var(--lib-space-sm);pointer-events:none;opacity:0;z-index:var(--z-tooltip);transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-bounce)}:host([copied]) .copy-btn__tooltip{opacity:1;transform:translate(-50%) translateY(0)}@media(prefers-reduced-motion:reduce){.copy-btn,.copy-btn__idle,.copy-btn__copied,.copy-btn__tooltip{transition:none}}}';
|
|
12
2
|
export {
|
|
13
|
-
|
|
3
|
+
copyButtonCss as default
|
|
14
4
|
};
|
|
15
5
|
//# sourceMappingURL=index301.js.map
|
package/dist/index301.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index301.js","sources":[
|
|
1
|
+
{"version":3,"file":"index301.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index302.js
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
|
-
const pickerCss = '@layer tokens,reset,components;@layer reset{:host{display:inline-block}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}}@layer components{.cp{width:260px;background:var(--bg-elevated);border:1px solid var(--border-default);box-shadow:var(--shadow-md);-webkit-user-select:none;user-select:none;flex-shrink:0}.cp-canvas{width:100%;height:160px;position:relative;cursor:crosshair;overflow:hidden}.cp-canvas:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(to right,#fff 0%,transparent 100%);pointer-events:none}.cp-canvas:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(to bottom,transparent 0%,#000 100%);pointer-events:none}.cp-thumb{position:absolute;width:14px;height:14px;border-radius:var(--radius-full);border:2px solid #fff;box-shadow:0 0 0 1px #0000004d,0 2px 4px #0003;transform:translate(-50%,-50%);z-index:2;pointer-events:none;transition:transform var(--duration-fast)}.cp-canvas:active .cp-thumb{transform:translate(-50%,-50%) scale(1.15)}.cp-sliders{display:flex;gap:var(--lib-space-sm);align-items:center;padding:var(--lib-space-sm) var(--lib-space-md) 0}.cp-preview-dot{width:28px;height:28px;border-radius:var(--radius-full);flex-shrink:0;border:1px solid rgb(0,0,0,.1);position:relative;overflow:hidden}.cp-preview-dot:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:6px 6px;background-position:0 0,0 3px,3px -3px,-3px 0}.cp-preview-color{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:var(--radius-full)}.cp-sliders-stack{display:flex;flex-direction:column;gap:var(--lib-space-xs);flex:1}.cp-range{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:10px;border-radius:var(--radius-full);border:1px solid rgb(0,0,0,.08);outline:none;cursor:pointer}.cp-range::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:14px;height:14px;border-radius:var(--radius-full);background:#fff;border:1px solid rgb(0,0,0,.25);box-shadow:0 1px 3px #0003;cursor:grab;transition:transform var(--duration-fast),box-shadow var(--duration-fast)}.cp-range::-webkit-slider-thumb:active{cursor:grabbing;transform:scale(1.15);box-shadow:0 2px 6px #00000040}.cp-range::-moz-range-thumb{width:14px;height:14px;border-radius:var(--radius-full);background:#fff;border:1px solid rgb(0,0,0,.25);box-shadow:0 1px 3px #0003;cursor:grab}.cp-range-hue{background:linear-gradient(to right,red,#ff8000,#ff0,#80ff00,#0f0,#00ff80,#0ff,#0080ff,#00f,#7f00ff,#f0f,#ff0080,red)}.cp-alpha-wrap{position:relative;border-radius:var(--radius-full);overflow:hidden}.cp-alpha-checker{position:absolute;top:0;right:0;bottom:0;left:0;background-image:linear-gradient(45deg,#aaa 25%,transparent 25%),linear-gradient(-45deg,#aaa 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#aaa 75%),linear-gradient(-45deg,transparent 75%,#aaa 75%);background-size:8px 8px;background-position:0 0,0 4px,4px -4px,-4px 0;background-color:#eee;border-radius:var(--radius-full);border:1px solid rgb(0,0,0,.08)}.cp-alpha-checker .cp-range-alpha{position:relative;z-index:1;background:transparent;border:none}.cp-inputs-wrap{padding:var(--lib-space-sm) var(--lib-space-md);display:flex;gap:var(--lib-space-xs);align-items:flex-start;border-top:1px solid var(--border-subtle)}.cp-mode-btn{width:22px;height:22px;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:12px;color:var(--text-muted);background:transparent;border:none;cursor:pointer;transition:color var(--duration-fast);margin-top:4px;padding:0}.cp-mode-btn:hover{color:var(--text-primary)}.cp-input-group{display:flex;flex-direction:column;gap:0;min-width:0}.cp-input{font-family:var(--lib-font-mono);font-size:var(--text-xs);letter-spacing:var(--tracking-wide);color:var(--text-primary);background:var(--bg-base);border:1px solid var(--border-default);padding:var(--lib-space-xs) var(--lib-space-sm);outline:none;width:100%;transition:border-color var(--duration-base),box-shadow var(--duration-base);text-transform:uppercase}.cp-input:focus{border-color:var(--color-washi-700);box-shadow:0 0 0 3px #1a140e17}.cp-input[type=number]{text-transform:none}.cp-input-label{font-family:var(--lib-font-mono);font-size:9px;letter-spacing:var(--tracking-widest);text-transform:uppercase;color:var(--text-muted);display:block;text-align:center;margin-top:3px}.cp-saved{padding:var(--lib-space-xs) var(--lib-space-md) var(--lib-space-sm);border-top:1px solid var(--border-subtle);display:flex;align-items:center;gap:var(--lib-space-xs);flex-wrap:wrap}.cp-saved-label{font-family:var(--lib-font-mono);font-size:9px;letter-spacing:var(--tracking-widest);text-transform:uppercase;color:var(--text-muted);width:100%}.cp-saved-add{width:20px;height:20px;border:1px dashed var(--border-default);display:flex;align-items:center;justify-content:center;font-size:14px;color:var(--text-muted);cursor:pointer;background:transparent;transition:border-color var(--duration-fast),color var(--duration-fast),background var(--duration-fast);flex-shrink:0;line-height:1}.cp-saved-add:hover{border-color:var(--color-washi-700);color:var(--text-primary);background:var(--bg-surface)}.cp-actions{display:flex;gap:var(--lib-space-xs);padding:var(--lib-space-sm) var(--lib-space-md);border-top:1px solid var(--border-subtle);background:var(--bg-surface)}.cp-btn{font-family:var(--lib-font-mono);font-size:10px;letter-spacing:var(--tracking-wider);text-transform:uppercase;border:none;padding:var(--lib-space-xs) var(--lib-space-md);cursor:pointer;transition:background var(--duration-base),color var(--duration-base);flex:1}.cp-btn-cancel{background:transparent;border:1px solid var(--border-default);color:var(--text-muted)}.cp-btn-cancel:hover{background:var(--color-washi-200);color:var(--text-primary)}.cp-btn-ok{background:var(--color-washi-900);color:var(--color-washi-50)}.cp-btn-ok:hover{background:var(--color-washi-800)}.cp-trigger-wrap{position:relative;display:inline-block}.cp-trigger{display:flex;align-items:center;gap:var(--lib-space-sm);font-family:var(--lib-font-mono);font-size:var(--text-xs);letter-spacing:var(--tracking-wide);color:var(--text-secondary);background:var(--bg-elevated);border:1px solid var(--border-default);padding:var(--lib-space-xs) var(--lib-space-sm);cursor:pointer;transition:border-color var(--duration-base),box-shadow var(--duration-base);outline:none}.cp-trigger:focus,.cp-trigger.is-open{border-color:var(--color-washi-700);box-shadow:0 0 0 3px #1a140e17}.cp-trigger-dot{width:18px;height:18px;border:1px solid rgb(0,0,0,.1);flex-shrink:0;position:relative;overflow:hidden}.cp-trigger-dot:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:6px 6px;background-position:0 0,0 3px,3px -3px,-3px 0}.cp-trigger-color{position:absolute;top:0;right:0;bottom:0;left:0}.cp-trigger-wrap .cp{position:absolute;top:calc(100% + 6px);left:0;z-index:400;opacity:0;transform:translateY(-4px);pointer-events:none;transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.cp-trigger-wrap .cp.is-open{opacity:1;transform:translateY(0);pointer-events:auto}.cp-swatches{display:flex;flex-direction:column;gap:var(--lib-space-sm)}.cp-swatches-row{display:flex;gap:var(--lib-space-xs);align-items:center}.cp-swatches-label{font-family:var(--lib-font-mono);font-size:9px;letter-spacing:var(--tracking-widest);text-transform:uppercase;color:var(--text-muted);width:52px;flex-shrink:0}.cp-swatch{width:24px;height:24px;border:1px solid rgb(0,0,0,.08);cursor:pointer;position:relative;flex-shrink:0;transition:transform var(--duration-fast),box-shadow var(--duration-fast)}.cp-swatch:hover{transform:scale(1.18);box-shadow:0 2px 8px #0000002e;z-index:1}.cp-swatch.is-selected:after{content:"";position:absolute;top:-3px;right:-3px;bottom:-3px;left:-3px;border:2px solid var(--color-washi-900)}.cp-swatch[data-name]:before{content:attr(data-name);position:absolute;bottom:calc(100% + 6px);left:50%;transform:translate(-50%);font-family:var(--lib-font-mono);font-size:9px;letter-spacing:var(--tracking-wide);white-space:nowrap;background:var(--color-washi-900);color:var(--color-washi-100);padding:2px var(--lib-space-xs);pointer-events:none;opacity:0;transition:opacity var(--duration-base);z-index:10}.cp-swatch[data-name]:hover:before{opacity:1}.cp-swatch-sm{width:18px;height:18px}.cp-swatch-lg{width:32px;height:32px}.cp-swatch-xl{width:48px;height:48px}:host([dark]) .cp{background:#0a0403;border-color:#1e130e;box-shadow:0 8px 32px #00000080}:host([dark]) .cp-input{background:#060201;border-color:#231813;color:#998c84}:host([dark]) .cp-input:focus{border-color:#6d6059}:host([dark]) .cp-input-label{color:#2a1f19}:host([dark]) .cp-saved{border-color:#190f0a}:host([dark]) .cp-saved-label{color:#2a1f19}:host([dark]) .cp-saved-add{border-color:#231813;color:#362b25}:host([dark]) .cp-saved-add:hover{background:#150a06;border-color:#51453e;color:#998c84}:host([dark]) .cp-actions{background:#060201;border-color:#190f0a}:host([dark]) .cp-btn-cancel{border-color:#231813;color:#433831}:host([dark]) .cp-btn-cancel:hover{background:#190f0a;color:#998c84}:host([dark]) .cp-mode-btn{color:#362b25}:host([dark]) .cp-mode-btn:hover{color:#998c84}:host([dark]) .cp-inputs-wrap{border-color:#190f0a}:host([dark]) .cp-trigger{background:#100704;border-color:#1e130e;color:#5f524c}:host([dark]) .cp-trigger:focus,:host([dark]) .cp-trigger.is-open{border-color:#6d6059}:host([dark]) .cp-swatch.is-selected:after{border-color:#998c84}:host([dark]) .cp-swatches-label{color:#312620}:host([disabled]){pointer-events:none;opacity:.5}}';
|
|
1
|
+
import { nothing, html } from "lit";
|
|
2
|
+
function renderDisplayHeading(ctx) {
|
|
3
|
+
const headingContent = html`
|
|
4
|
+
<!-- Línea 1 -->
|
|
5
|
+
${ctx.line1}
|
|
6
|
+
<!-- Línea 2: prefix + acento itálico -->
|
|
7
|
+
${ctx.line2Prefix || ctx.accent ? html`
|
|
8
|
+
<br>
|
|
9
|
+
${ctx.line2Prefix ? html`${ctx.line2Prefix} ` : nothing}
|
|
10
|
+
${ctx.accent ? html`<em class="dh-accent">${ctx.accent}</em>` : nothing}
|
|
11
|
+
` : nothing}
|
|
12
|
+
`;
|
|
13
|
+
return html`
|
|
14
|
+
<div class="dh-wrapper" part="wrapper">
|
|
15
|
+
|
|
16
|
+
<!-- Slot eyebrow: permite pasar un <lib-eyebrow> desde fuera -->
|
|
17
|
+
<slot name="eyebrow"></slot>
|
|
18
|
+
|
|
19
|
+
<!-- Heading con tag dinámico -->
|
|
20
|
+
${ctx.tag === "h1" ? html`<h1 class="dh-heading" part="heading">${headingContent}</h1>` : nothing}
|
|
21
|
+
${ctx.tag === "h2" ? html`<h2 class="dh-heading" part="heading">${headingContent}</h2>` : nothing}
|
|
22
|
+
${ctx.tag === "h3" ? html`<h3 class="dh-heading" part="heading">${headingContent}</h3>` : nothing}
|
|
23
|
+
${ctx.tag === "h4" ? html`<h4 class="dh-heading" part="heading">${headingContent}</h4>` : nothing}
|
|
24
|
+
|
|
25
|
+
<!-- Descripción como prop -->
|
|
26
|
+
${ctx.description ? html`<p class="dh-desc" part="description">${ctx.description}</p>` : nothing}
|
|
27
|
+
|
|
28
|
+
<!-- Descripción como slot (rich content) -->
|
|
29
|
+
<slot name="description"></slot>
|
|
30
|
+
|
|
31
|
+
</div>
|
|
32
|
+
`;
|
|
33
|
+
}
|
|
2
34
|
export {
|
|
3
|
-
|
|
35
|
+
renderDisplayHeading
|
|
4
36
|
};
|
|
5
37
|
//# sourceMappingURL=index302.js.map
|
package/dist/index302.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index302.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"index302.js","sources":["../src/components/atoms/display-heading/lib-display-heading.html.ts"],"sourcesContent":["import { html, nothing, type TemplateResult } from 'lit';\nimport type { LibDisplayHeading } from './lib-display-heading.component';\n\nexport function renderDisplayHeading(ctx: LibDisplayHeading): TemplateResult {\n /* Decide el tag semántico del heading */\n const headingContent = html`\n <!-- Línea 1 -->\n ${ctx.line1}\n <!-- Línea 2: prefix + acento itálico -->\n ${ctx.line2Prefix || ctx.accent\n ? html`\n <br>\n ${ctx.line2Prefix ? html`${ctx.line2Prefix} ` : nothing}\n ${ctx.accent\n ? html`<em class=\"dh-accent\">${ctx.accent}</em>`\n : nothing\n }\n `\n : nothing\n }\n `;\n\n return html`\n <div class=\"dh-wrapper\" part=\"wrapper\">\n\n <!-- Slot eyebrow: permite pasar un <lib-eyebrow> desde fuera -->\n <slot name=\"eyebrow\"></slot>\n\n <!-- Heading con tag dinámico -->\n ${ctx.tag === 'h1' ? html`<h1 class=\"dh-heading\" part=\"heading\">${headingContent}</h1>` : nothing}\n ${ctx.tag === 'h2' ? html`<h2 class=\"dh-heading\" part=\"heading\">${headingContent}</h2>` : nothing}\n ${ctx.tag === 'h3' ? html`<h3 class=\"dh-heading\" part=\"heading\">${headingContent}</h3>` : nothing}\n ${ctx.tag === 'h4' ? html`<h4 class=\"dh-heading\" part=\"heading\">${headingContent}</h4>` : nothing}\n\n <!-- Descripción como prop -->\n ${ctx.description\n ? html`<p class=\"dh-desc\" part=\"description\">${ctx.description}</p>`\n : nothing\n }\n\n <!-- Descripción como slot (rich content) -->\n <slot name=\"description\"></slot>\n\n </div>\n `;\n}"],"names":[],"mappings":";AAGO,SAAS,qBAAqB,KAAwC;AAE3E,QAAM,iBAAiB;AAAA;AAAA,MAEnB,IAAI,KAAK;AAAA;AAAA,MAET,IAAI,eAAe,IAAI,SACrB;AAAA;AAAA,YAEI,IAAI,cAAc,OAAO,IAAI,WAAW,MAAM,OAAO;AAAA,YACrD,IAAI,SACF,6BAA6B,IAAI,MAAM,UACvC,OACJ;AAAA,YAEF,OACJ;AAAA;AAGF,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAOD,IAAI,QAAQ,OAAO,6CAA6C,cAAc,UAAU,OAAO;AAAA,QAC/F,IAAI,QAAQ,OAAO,6CAA6C,cAAc,UAAU,OAAO;AAAA,QAC/F,IAAI,QAAQ,OAAO,6CAA6C,cAAc,UAAU,OAAO;AAAA,QAC/F,IAAI,QAAQ,OAAO,6CAA6C,cAAc,UAAU,OAAO;AAAA;AAAA;AAAA,QAG/F,IAAI,cACF,6CAA6C,IAAI,WAAW,SAC5D,OACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAON;"}
|
package/dist/index303.js
CHANGED
|
@@ -1,165 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
const ROTATE_SVG = html`<svg width="12" height="12" viewBox="0 0 12 12" fill="none" stroke="currentColor"
|
|
3
|
-
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
|
4
|
-
<path d="M10 2.5A4.5 4.5 0 1 0 11 6"/>
|
|
5
|
-
<path d="M10 .5v2h2"/>
|
|
6
|
-
</svg>`;
|
|
7
|
-
const CARET_SVG = html`<svg width="10" height="10" viewBox="0 0 10 10" fill="none" stroke="currentColor"
|
|
8
|
-
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
|
9
|
-
<path d="M2 4l3 3 3-3"/>
|
|
10
|
-
</svg>`;
|
|
11
|
-
function swatchGridTemplate(props) {
|
|
12
|
-
const { rows, selected, onSelect } = props;
|
|
13
|
-
return html`
|
|
14
|
-
<div class="cp-swatches">
|
|
15
|
-
${rows.map((row) => html`
|
|
16
|
-
<div class="cp-swatches-row">
|
|
17
|
-
<span class="cp-swatches-label">${row.label}</span>
|
|
18
|
-
${row.colors.map((c) => html`
|
|
19
|
-
<div
|
|
20
|
-
class="cp-swatch ${c.value.toLowerCase() === selected.toLowerCase() ? "is-selected" : ""}"
|
|
21
|
-
style="background:${c.value};"
|
|
22
|
-
data-name="${c.name ?? ""}"
|
|
23
|
-
@click="${() => onSelect(c)}"
|
|
24
|
-
role="button"
|
|
25
|
-
aria-label="${c.name ?? c.value}"
|
|
26
|
-
></div>
|
|
27
|
-
`)}
|
|
28
|
-
</div>
|
|
29
|
-
`)}
|
|
30
|
-
</div>
|
|
31
|
-
`;
|
|
32
|
-
}
|
|
33
|
-
function pickerPanelTemplate(p) {
|
|
34
|
-
const { hex, r, g, b, h, s, l, alpha, inputMode, savedColors, showAlpha } = p;
|
|
35
|
-
const thumbX = s;
|
|
36
|
-
const thumbY = 100 - l;
|
|
37
|
-
const cssColor = alpha < 100 ? `rgba(${r},${g},${b},${(alpha / 100).toFixed(2)})` : hex;
|
|
38
|
-
const alphaGradient = `linear-gradient(to right, transparent, hsl(${h},${s}%,${l}%))`;
|
|
39
|
-
const inputsBlock = inputMode === "hex" ? html`
|
|
40
|
-
<div class="cp-input-group" style="flex:3">
|
|
41
|
-
<input class="cp-input" type="text" .value="${hex}" maxlength="7"
|
|
42
|
-
@input="${p.onHexInput}">
|
|
43
|
-
<span class="cp-input-label">HEX</span>
|
|
44
|
-
</div>
|
|
45
|
-
${showAlpha ? html`
|
|
46
|
-
<div class="cp-input-group" style="flex:1">
|
|
47
|
-
<input class="cp-input" type="number" .value="${String(Math.round(alpha))}" min="0" max="100"
|
|
48
|
-
@input="${p.onAlphaNumInput}">
|
|
49
|
-
<span class="cp-input-label">A%</span>
|
|
50
|
-
</div>` : nothing}
|
|
51
|
-
` : inputMode === "rgb" ? html`
|
|
52
|
-
<div class="cp-input-group" style="flex:1"><input class="cp-input" type="number" .value="${String(r)}" min="0" max="255" @input="${(e) => p.onRgbInput(0, e)}"><span class="cp-input-label">R</span></div>
|
|
53
|
-
<div class="cp-input-group" style="flex:1"><input class="cp-input" type="number" .value="${String(g)}" min="0" max="255" @input="${(e) => p.onRgbInput(1, e)}"><span class="cp-input-label">G</span></div>
|
|
54
|
-
<div class="cp-input-group" style="flex:1"><input class="cp-input" type="number" .value="${String(b)}" min="0" max="255" @input="${(e) => p.onRgbInput(2, e)}"><span class="cp-input-label">B</span></div>
|
|
55
|
-
${showAlpha ? html`<div class="cp-input-group" style="flex:1"><input class="cp-input" type="number" .value="${String(Math.round(alpha))}" min="0" max="100" @input="${p.onAlphaNumInput}"><span class="cp-input-label">A%</span></div>` : nothing}
|
|
56
|
-
` : html`
|
|
57
|
-
<div class="cp-input-group" style="flex:1"><input class="cp-input" type="number" .value="${String(h)}" min="0" max="360" @input="${(e) => p.onHslInput(0, e)}"><span class="cp-input-label">H</span></div>
|
|
58
|
-
<div class="cp-input-group" style="flex:1"><input class="cp-input" type="number" .value="${String(s)}" min="0" max="100" @input="${(e) => p.onHslInput(1, e)}"><span class="cp-input-label">S%</span></div>
|
|
59
|
-
<div class="cp-input-group" style="flex:1"><input class="cp-input" type="number" .value="${String(l)}" min="0" max="100" @input="${(e) => p.onHslInput(2, e)}"><span class="cp-input-label">L%</span></div>
|
|
60
|
-
${showAlpha ? html`<div class="cp-input-group" style="flex:1"><input class="cp-input" type="number" .value="${String(Math.round(alpha))}" min="0" max="100" @input="${p.onAlphaNumInput}"><span class="cp-input-label">A%</span></div>` : nothing}
|
|
61
|
-
`;
|
|
62
|
-
return html`
|
|
63
|
-
<!-- Canvas 2D -->
|
|
64
|
-
<div class="cp-canvas"
|
|
65
|
-
style="background: hsl(${h},100%,50%);"
|
|
66
|
-
@mousedown="${p.onCanvasMousedown}"
|
|
67
|
-
>
|
|
68
|
-
<div class="cp-thumb"
|
|
69
|
-
style="left:${thumbX}%;top:${thumbY}%;background:${cssColor};"
|
|
70
|
-
></div>
|
|
71
|
-
</div>
|
|
72
|
-
|
|
73
|
-
<!-- Sliders -->
|
|
74
|
-
<div class="cp-sliders">
|
|
75
|
-
<div class="cp-preview-dot">
|
|
76
|
-
<div class="cp-preview-color" style="background:${cssColor};"></div>
|
|
77
|
-
</div>
|
|
78
|
-
<div class="cp-sliders-stack">
|
|
79
|
-
<input type="range" class="cp-range cp-range-hue"
|
|
80
|
-
min="0" max="360" .value="${String(h)}"
|
|
81
|
-
@input="${p.onHueInput}">
|
|
82
|
-
${showAlpha ? html`
|
|
83
|
-
<div class="cp-alpha-wrap" style="height:10px;">
|
|
84
|
-
<div class="cp-alpha-checker">
|
|
85
|
-
<input type="range" class="cp-range cp-range-alpha"
|
|
86
|
-
min="0" max="100" .value="${String(Math.round(alpha))}"
|
|
87
|
-
style="background:${alphaGradient};"
|
|
88
|
-
@input="${p.onAlphaInput}">
|
|
89
|
-
</div>
|
|
90
|
-
</div>` : nothing}
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
|
|
94
|
-
<!-- Inputs -->
|
|
95
|
-
<div class="cp-inputs-wrap">
|
|
96
|
-
<button class="cp-mode-btn" title="Cambiar modo" @click="${p.onModeToggle}">
|
|
97
|
-
${ROTATE_SVG}
|
|
98
|
-
</button>
|
|
99
|
-
<div style="display:flex;gap:var(--lib-space-xs);flex:1;">
|
|
100
|
-
${inputsBlock}
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
|
|
104
|
-
<!-- Saved colors -->
|
|
105
|
-
<div class="cp-saved">
|
|
106
|
-
<span class="cp-saved-label">Guardados</span>
|
|
107
|
-
${savedColors.map((sc) => html`
|
|
108
|
-
<div class="cp-swatch cp-swatch-sm"
|
|
109
|
-
style="background:${sc};"
|
|
110
|
-
data-name="${sc}"
|
|
111
|
-
@click="${() => p.onSavedClick(sc)}"
|
|
112
|
-
></div>
|
|
113
|
-
`)}
|
|
114
|
-
<button class="cp-saved-add" title="Guardar color actual" @click="${p.onSaveColor}">+</button>
|
|
115
|
-
</div>
|
|
116
|
-
|
|
117
|
-
<!-- Actions -->
|
|
118
|
-
<div class="cp-actions">
|
|
119
|
-
<button class="cp-btn cp-btn-cancel" @click="${p.onCancel}">Cancelar</button>
|
|
120
|
-
<button class="cp-btn cp-btn-ok" @click="${p.onApply}">Aplicar</button>
|
|
121
|
-
</div>
|
|
122
|
-
`;
|
|
123
|
-
}
|
|
124
|
-
function colorPickerTemplate(props) {
|
|
125
|
-
const {
|
|
126
|
-
variant,
|
|
127
|
-
/*label,*/
|
|
128
|
-
hex,
|
|
129
|
-
alpha,
|
|
130
|
-
panelOpen,
|
|
131
|
-
onTriggerClick
|
|
132
|
-
} = props;
|
|
133
|
-
const panel = html`
|
|
134
|
-
<div class="cp ${variant === "trigger" && panelOpen ? "is-open" : ""}">
|
|
135
|
-
${pickerPanelTemplate(props)}
|
|
136
|
-
</div>
|
|
137
|
-
`;
|
|
138
|
-
if (variant === "inline") {
|
|
139
|
-
return panel;
|
|
140
|
-
}
|
|
141
|
-
const cssColor = alpha < 100 ? `rgba(${props.r},${props.g},${props.b},${(alpha / 100).toFixed(2)})` : hex;
|
|
142
|
-
return html`
|
|
143
|
-
<div class="cp-trigger-wrap">
|
|
144
|
-
<button
|
|
145
|
-
class="cp-trigger ${panelOpen ? "is-open" : ""}"
|
|
146
|
-
@click="${onTriggerClick}"
|
|
147
|
-
aria-expanded="${panelOpen}"
|
|
148
|
-
aria-haspopup="true"
|
|
149
|
-
>
|
|
150
|
-
<div class="cp-trigger-dot">
|
|
151
|
-
<div class="cp-trigger-color" style="background:${cssColor};"></div>
|
|
152
|
-
</div>
|
|
153
|
-
<span>${hex.toUpperCase()}</span>
|
|
154
|
-
${CARET_SVG}
|
|
155
|
-
</button>
|
|
156
|
-
${panel}
|
|
157
|
-
</div>
|
|
158
|
-
`;
|
|
159
|
-
}
|
|
1
|
+
const componentCss = '@layer tokens,reset,components;@layer tokens{:host{display:block;--dh-font-display: var(--lib-font-display, "Cormorant Garamond", Georgia, serif);--dh-font-body: var(--lib-font-body, "Shippori Mincho", serif);--dh-size: clamp(2.2rem, 5vw, 3.5rem);--dh-color-heading: var(--color-washi-800, #3D332A);--dh-color-accent: var(--color-kaki-400, #D97234);--dh-color-desc: var(--color-washi-500, #9A8878);--dh-gap-eyebrow: var(--lib-space-md, 1rem);--dh-gap-desc: var(--lib-space-lg, 1.5rem);--dh-max-width: 640px;--dh-dur: .56s;--dh-ease: cubic-bezier(0, 0, .2, 1)}:host([surface="dark"]){--dh-color-heading: rgb(250, 247, 244, .65);--dh-color-desc: rgb(250, 247, 244, .28)}:host([surface="washi"]){--dh-color-heading: var(--color-washi-800, #3D332A);--dh-color-desc: var(--color-washi-600, #7A6A5C)}:host([size="sm"]){--dh-size: clamp(1.5rem, 3.5vw, 2.2rem)}:host([size="md"]){--dh-size: clamp(2.2rem, 5vw, 3.5rem)}:host([size="lg"]){--dh-size: clamp(2.75rem, 6vw, 5rem)}}@layer reset{*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}}@layer components{.dh-wrapper{display:flex;flex-direction:column;align-items:flex-start;max-width:var(--dh-max-width)}.dh-eyebrow-slot{display:contents}::slotted([slot="eyebrow"]){margin-bottom:var(--dh-gap-eyebrow)}.dh-heading{font-family:var(--dh-font-display);font-size:var(--dh-size);font-weight:300;letter-spacing:-.02em;line-height:1.15;color:var(--dh-color-heading);margin:0}.dh-accent{font-style:italic;color:var(--dh-color-accent);font-family:inherit;font-size:inherit;font-weight:inherit}.dh-desc{font-family:var(--dh-font-body);font-size:var(--text-sm, .8125rem);color:var(--dh-color-desc);line-height:1.9;margin-top:var(--dh-gap-desc);max-width:var(--dh-max-width)}::slotted([slot="description"]){font-family:var(--dh-font-body);font-size:var(--text-sm, .8125rem);color:var(--dh-color-desc);line-height:1.9;margin-top:var(--dh-gap-desc);display:block}@keyframes dh-fade-up{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}:host([animate]) .dh-heading{animation:dh-fade-up var(--dh-dur) var(--dh-ease) both}:host([animate]) .dh-desc{animation:dh-fade-up var(--dh-dur) var(--dh-ease) .12s both}:host([centered]) .dh-wrapper{align-items:center;text-align:center;max-width:none}:host([centered]) .dh-heading,:host([centered]) .dh-desc{max-width:var(--dh-max-width);text-align:center}}';
|
|
160
2
|
export {
|
|
161
|
-
|
|
162
|
-
pickerPanelTemplate,
|
|
163
|
-
swatchGridTemplate
|
|
3
|
+
componentCss as default
|
|
164
4
|
};
|
|
165
5
|
//# sourceMappingURL=index303.js.map
|