@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/index259.js
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
function stepperTemplate(props) {
|
|
3
|
+
return html`
|
|
4
|
+
<div class="stepper-track" role="list" aria-label="Pasos del proceso">
|
|
5
|
+
<slot @slotchange=${props.handleSlotChange}></slot>
|
|
6
|
+
</div>
|
|
7
|
+
`;
|
|
8
|
+
}
|
|
2
9
|
export {
|
|
3
|
-
|
|
10
|
+
stepperTemplate
|
|
4
11
|
};
|
|
5
12
|
//# sourceMappingURL=index259.js.map
|
package/dist/index259.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index259.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"index259.js","sources":["../src/components/organisms/stepper/lib-stepper.html.ts"],"sourcesContent":["import { html, TemplateResult } from 'lit';\n\nexport type LibStepperOrientation = 'horizontal' | 'vertical';\nexport type LibStepperVariant = 'default' | 'minimal' | 'kintsugi';\nexport type LibStepperSize = 'sm' | 'md' | 'lg';\n\nexport interface StepperTemplateProps {\n orientation: LibStepperOrientation;\n handleSlotChange: (e: Event) => void;\n}\n\n/**\n * El stepper es únicamente el contenedor flex + slot.\n * Toda la lógica de estados y el dibujado visual vive en lib-step.\n * @layer components gestiona flex-direction vía :host([orientation=\"vertical\"]).\n */\nexport function stepperTemplate(props: StepperTemplateProps): TemplateResult {\n return html`\n <div class=\"stepper-track\" role=\"list\" aria-label=\"Pasos del proceso\">\n <slot @slotchange=${props.handleSlotChange}></slot>\n </div>\n `;\n}"],"names":[],"mappings":";AAgBO,SAAS,gBAAgB,OAA6C;AAC3E,SAAO;AAAA;AAAA,0BAEiB,MAAM,gBAAgB;AAAA;AAAA;AAGhD;"}
|
package/dist/index26.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { unsafeCSS, css, LitElement } from "lit";
|
|
2
|
-
import { property,
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
2
|
+
import { property, state, customElement } from "lit/decorators.js";
|
|
3
|
+
import { kbdTemplate } from "./index309.js";
|
|
4
|
+
import kbdCss from "./index310.js";
|
|
5
5
|
import sharedTokens from "./index196.js";
|
|
6
6
|
var __defProp = Object.defineProperty;
|
|
7
7
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -13,259 +13,54 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
13
13
|
if (kind && result) __defProp(target, key, result);
|
|
14
14
|
return result;
|
|
15
15
|
};
|
|
16
|
-
let
|
|
16
|
+
let LibKbd = class extends LitElement {
|
|
17
17
|
constructor() {
|
|
18
18
|
super(...arguments);
|
|
19
|
-
this.value = 0;
|
|
20
|
-
this.prefix = "";
|
|
21
|
-
this.suffix = "";
|
|
22
|
-
this.thousands = ".";
|
|
23
|
-
this.decimals = null;
|
|
24
19
|
this.size = "md";
|
|
25
|
-
this.
|
|
26
|
-
this.
|
|
27
|
-
this.
|
|
28
|
-
this.deltaDir = "up";
|
|
29
|
-
this.playOnVisible = false;
|
|
30
|
-
this._builtDigitCount = -1;
|
|
31
|
-
this._builtThousands = "";
|
|
32
|
-
this._hasAnimated = false;
|
|
33
|
-
this._firstUpdate = true;
|
|
34
|
-
}
|
|
35
|
-
/* ── Lifecycle ──────────────────────────────────────────── */
|
|
36
|
-
connectedCallback() {
|
|
37
|
-
super.connectedCallback();
|
|
38
|
-
if (this.playOnVisible) {
|
|
39
|
-
this._observer = new IntersectionObserver(
|
|
40
|
-
(entries) => {
|
|
41
|
-
var _a, _b;
|
|
42
|
-
if (((_a = entries[0]) == null ? void 0 : _a.isIntersecting) && !this._hasAnimated) {
|
|
43
|
-
this._hasAnimated = true;
|
|
44
|
-
this._animateTo(
|
|
45
|
-
this.value,
|
|
46
|
-
/* fromZero */
|
|
47
|
-
true
|
|
48
|
-
);
|
|
49
|
-
(_b = this._observer) == null ? void 0 : _b.disconnect();
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
{ threshold: 0.2 }
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
disconnectedCallback() {
|
|
57
|
-
var _a;
|
|
58
|
-
super.disconnectedCallback();
|
|
59
|
-
(_a = this._observer) == null ? void 0 : _a.disconnect();
|
|
20
|
+
this.variant = "default";
|
|
21
|
+
this.pressed = false;
|
|
22
|
+
this._pointerPressed = false;
|
|
60
23
|
}
|
|
61
24
|
render() {
|
|
62
|
-
return
|
|
25
|
+
return kbdTemplate({
|
|
63
26
|
size: this.size,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
updated(changed) {
|
|
71
|
-
var _a;
|
|
72
|
-
super.updated(changed);
|
|
73
|
-
const structureChanged = changed.has("value") || changed.has("prefix") || changed.has("suffix") || changed.has("thousands") || changed.has("decimals");
|
|
74
|
-
if (!structureChanged && !this._firstUpdate) return;
|
|
75
|
-
const needRebuild = this._needsRebuild();
|
|
76
|
-
if (needRebuild) {
|
|
77
|
-
this._buildRow();
|
|
78
|
-
}
|
|
79
|
-
if (this._firstUpdate) {
|
|
80
|
-
this._firstUpdate = false;
|
|
81
|
-
if (this.playOnVisible) {
|
|
82
|
-
this._setRowInstant(0);
|
|
83
|
-
(_a = this._observer) == null ? void 0 : _a.observe(this);
|
|
84
|
-
} else {
|
|
85
|
-
this._setRowInstant(this.value);
|
|
86
|
-
}
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
if (changed.has("value")) {
|
|
90
|
-
this._animateTo(
|
|
91
|
-
this.value,
|
|
92
|
-
/* fromZero */
|
|
93
|
-
false
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
/* ── Motor de digit-flip ────────────────────────────────── */
|
|
98
|
-
_needsRebuild() {
|
|
99
|
-
const digitCount = Math.abs(Math.floor(this.value)).toString().length;
|
|
100
|
-
if (digitCount !== this._builtDigitCount) return true;
|
|
101
|
-
if (this.thousands !== this._builtThousands) return true;
|
|
102
|
-
return false;
|
|
103
|
-
}
|
|
104
|
-
_buildRow() {
|
|
105
|
-
const row = this._rowEl;
|
|
106
|
-
if (!row) return;
|
|
107
|
-
row.innerHTML = "";
|
|
108
|
-
const absVal = Math.abs(Math.floor(this.value));
|
|
109
|
-
const str = absVal.toString();
|
|
110
|
-
this._builtDigitCount = str.length;
|
|
111
|
-
this._builtThousands = this.thousands;
|
|
112
|
-
if (this.prefix) {
|
|
113
|
-
const p = document.createElement("span");
|
|
114
|
-
p.className = "cnt-prefix";
|
|
115
|
-
p.textContent = this.prefix;
|
|
116
|
-
row.appendChild(p);
|
|
117
|
-
}
|
|
118
|
-
const chars = this._buildCharArray(str, this.thousands);
|
|
119
|
-
chars.forEach((c) => {
|
|
120
|
-
if (c.type === "sep") {
|
|
121
|
-
const sep = document.createElement("span");
|
|
122
|
-
sep.className = "cnt-sep";
|
|
123
|
-
sep.textContent = c.char;
|
|
124
|
-
row.appendChild(sep);
|
|
125
|
-
} else {
|
|
126
|
-
row.appendChild(this._makeDigitSlot(parseInt(c.char, 10)));
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
if (this.decimals !== null) {
|
|
130
|
-
const dot = document.createElement("span");
|
|
131
|
-
dot.className = "cnt-sep";
|
|
132
|
-
dot.textContent = ",";
|
|
133
|
-
row.appendChild(dot);
|
|
134
|
-
const decStr = this.decimals.toString().padStart(2, "0");
|
|
135
|
-
for (const ch of decStr) {
|
|
136
|
-
row.appendChild(this._makeDigitSlot(parseInt(ch, 10)));
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
if (this.suffix) {
|
|
140
|
-
const s = document.createElement("span");
|
|
141
|
-
s.className = "cnt-suffix";
|
|
142
|
-
s.textContent = this.suffix;
|
|
143
|
-
row.appendChild(s);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
_buildCharArray(str, thousands) {
|
|
147
|
-
const result = [];
|
|
148
|
-
for (let i = 0; i < str.length; i++) {
|
|
149
|
-
const posFromRight = str.length - 1 - i;
|
|
150
|
-
if (i > 0 && posFromRight % 3 === 2 && thousands) {
|
|
151
|
-
result.push({ type: "sep", char: thousands });
|
|
152
|
-
}
|
|
153
|
-
result.push({ type: "digit", char: str[i] ?? "0" });
|
|
154
|
-
}
|
|
155
|
-
return result;
|
|
156
|
-
}
|
|
157
|
-
_makeDigitSlot(digit) {
|
|
158
|
-
const slot = document.createElement("span");
|
|
159
|
-
slot.className = "cnt-digit";
|
|
160
|
-
const inner = document.createElement("span");
|
|
161
|
-
inner.className = "cnt-digit-inner";
|
|
162
|
-
for (let i = 0; i <= 9; i++) {
|
|
163
|
-
const span = document.createElement("span");
|
|
164
|
-
span.textContent = String(i);
|
|
165
|
-
inner.appendChild(span);
|
|
166
|
-
}
|
|
167
|
-
inner.style.transition = "none";
|
|
168
|
-
inner.style.transform = `translateY(-${digit}em)`;
|
|
169
|
-
slot.appendChild(inner);
|
|
170
|
-
return slot;
|
|
171
|
-
}
|
|
172
|
-
_setRowInstant(value) {
|
|
173
|
-
var _a;
|
|
174
|
-
const slots = (_a = this._rowEl) == null ? void 0 : _a.querySelectorAll(".cnt-digit");
|
|
175
|
-
if (!slots) return;
|
|
176
|
-
const digits = this._extractTargetDigits(value);
|
|
177
|
-
slots.forEach((slot, i) => {
|
|
178
|
-
const inner = slot.querySelector(".cnt-digit-inner");
|
|
179
|
-
if (!inner) return;
|
|
180
|
-
inner.style.transition = "none";
|
|
181
|
-
inner.style.transform = `translateY(-${digits[i] ?? 0}em)`;
|
|
27
|
+
variant: this.variant,
|
|
28
|
+
pressed: this.pressed || this._pointerPressed,
|
|
29
|
+
onDown: this._onPointerDown.bind(this),
|
|
30
|
+
onUp: this._onPointerUp.bind(this),
|
|
31
|
+
onLeave: this._onPointerLeave.bind(this)
|
|
182
32
|
});
|
|
183
33
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
const slots = (_a = this._rowEl) == null ? void 0 : _a.querySelectorAll(".cnt-digit");
|
|
187
|
-
if (!slots || !slots.length) return;
|
|
188
|
-
const targetDigits = this._extractTargetDigits(value);
|
|
189
|
-
const total = slots.length;
|
|
190
|
-
slots.forEach((slot, i) => {
|
|
191
|
-
const inner = slot.querySelector(".cnt-digit-inner");
|
|
192
|
-
if (!inner) return;
|
|
193
|
-
const target = targetDigits[i] ?? 0;
|
|
194
|
-
const fromRight = total - 1 - i;
|
|
195
|
-
const delay = fromRight * 40;
|
|
196
|
-
if (fromZero) {
|
|
197
|
-
inner.style.transition = "none";
|
|
198
|
-
inner.style.transform = "translateY(0)";
|
|
199
|
-
}
|
|
200
|
-
void inner.offsetHeight;
|
|
201
|
-
inner.style.transition = `transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) ${delay}ms`;
|
|
202
|
-
inner.style.transform = `translateY(-${target}em)`;
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
_extractTargetDigits(value) {
|
|
206
|
-
const absVal = Math.abs(Math.floor(value));
|
|
207
|
-
let str = absVal.toString();
|
|
208
|
-
if (this.decimals !== null) {
|
|
209
|
-
const decStr = this.decimals.toString().padStart(2, "0");
|
|
210
|
-
str = str + decStr;
|
|
211
|
-
}
|
|
212
|
-
return str.split("").map((c) => parseInt(c, 10));
|
|
34
|
+
_onPointerDown() {
|
|
35
|
+
this._pointerPressed = true;
|
|
213
36
|
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
animateTo(value) {
|
|
217
|
-
this.value = value;
|
|
37
|
+
_onPointerUp() {
|
|
38
|
+
this._pointerPressed = false;
|
|
218
39
|
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
this._hasAnimated = false;
|
|
222
|
-
this._animateTo(this.value, true);
|
|
40
|
+
_onPointerLeave() {
|
|
41
|
+
this._pointerPressed = false;
|
|
223
42
|
}
|
|
224
43
|
};
|
|
225
|
-
|
|
44
|
+
LibKbd.styles = [
|
|
226
45
|
css`${unsafeCSS(sharedTokens)}`,
|
|
227
|
-
css`${unsafeCSS(
|
|
46
|
+
css`${unsafeCSS(kbdCss)}`
|
|
228
47
|
];
|
|
229
|
-
__decorateClass([
|
|
230
|
-
property({ type: Number, reflect: true })
|
|
231
|
-
], LibCounter.prototype, "value", 2);
|
|
232
|
-
__decorateClass([
|
|
233
|
-
property({ type: String, attribute: "prefix", reflect: true })
|
|
234
|
-
], LibCounter.prototype, "prefix", 2);
|
|
235
|
-
__decorateClass([
|
|
236
|
-
property({ type: String, attribute: "suffix", reflect: true })
|
|
237
|
-
], LibCounter.prototype, "suffix", 2);
|
|
238
|
-
__decorateClass([
|
|
239
|
-
property({ type: String, attribute: "thousands", reflect: true })
|
|
240
|
-
], LibCounter.prototype, "thousands", 2);
|
|
241
|
-
__decorateClass([
|
|
242
|
-
property({ type: Number, attribute: "decimals", reflect: true })
|
|
243
|
-
], LibCounter.prototype, "decimals", 2);
|
|
244
48
|
__decorateClass([
|
|
245
49
|
property({ type: String, reflect: true })
|
|
246
|
-
],
|
|
50
|
+
], LibKbd.prototype, "size", 2);
|
|
247
51
|
__decorateClass([
|
|
248
52
|
property({ type: String, reflect: true })
|
|
249
|
-
],
|
|
250
|
-
__decorateClass([
|
|
251
|
-
property({ type: String })
|
|
252
|
-
], LibCounter.prototype, "label", 2);
|
|
253
|
-
__decorateClass([
|
|
254
|
-
property({ type: String })
|
|
255
|
-
], LibCounter.prototype, "delta", 2);
|
|
256
|
-
__decorateClass([
|
|
257
|
-
property({ type: String, attribute: "delta-dir", reflect: true })
|
|
258
|
-
], LibCounter.prototype, "deltaDir", 2);
|
|
53
|
+
], LibKbd.prototype, "variant", 2);
|
|
259
54
|
__decorateClass([
|
|
260
|
-
property({ type: Boolean,
|
|
261
|
-
],
|
|
55
|
+
property({ type: Boolean, reflect: true })
|
|
56
|
+
], LibKbd.prototype, "pressed", 2);
|
|
262
57
|
__decorateClass([
|
|
263
|
-
|
|
264
|
-
],
|
|
265
|
-
|
|
266
|
-
customElement("lib-
|
|
267
|
-
],
|
|
58
|
+
state()
|
|
59
|
+
], LibKbd.prototype, "_pointerPressed", 2);
|
|
60
|
+
LibKbd = __decorateClass([
|
|
61
|
+
customElement("lib-kbd")
|
|
62
|
+
], LibKbd);
|
|
268
63
|
export {
|
|
269
|
-
|
|
64
|
+
LibKbd
|
|
270
65
|
};
|
|
271
66
|
//# sourceMappingURL=index26.js.map
|
package/dist/index26.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index26.js","sources":["../src/components/atoms/lib-counter/lib-counter.component.ts"],"sourcesContent":["import { LitElement, css, unsafeCSS, TemplateResult, PropertyValues } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { counterTemplate } from './lib-counter.html';\nimport type { LibCounterSize, LibCounterTone, LibCounterDeltaDir } from './lib-counter.html';\nimport counterCss from './lib-counter.css?inline';\nimport sharedTokens from '../../../styles/shared/tokens.css?inline';\n\nexport type { LibCounterSize, LibCounterTone, LibCounterDeltaDir };\n\n/**\n * @element lib-counter\n *\n * Contador animado con digit-flip: cada dígito es una columna\n * de 0 a 9 que se desplaza con translateY. Los dígitos de mayor\n * peso animan antes que los de menor — efecto odómetro.\n *\n * @example — básico\n * <lib-counter value=\"24819\" label=\"Usuarios activos\" play-on-visible></lib-counter>\n *\n * @example — moneda con delta\n * <lib-counter value=\"18540\" prefix=\"€\" size=\"lg\" tone=\"kaki\"\n * label=\"Ingresos\" delta=\"+14,7%\" delta-dir=\"up\" play-on-visible>\n * </lib-counter>\n *\n * @example — porcentaje sin separador de miles\n * <lib-counter value=\"87\" suffix=\"%\" thousands=\"\" size=\"md\" play-on-visible></lib-counter>\n *\n * @example — con decimales\n * <lib-counter value=\"4\" decimals=\"73\" play-on-visible></lib-counter>\n * → renderiza 4,73\n */\n@customElement('lib-counter')\nexport class LibCounter extends LitElement {\n static override styles = [\n css`${unsafeCSS(sharedTokens)}`,\n css`${unsafeCSS(counterCss)}`,\n ];\n\n /* ── Props visuales ─────────────────────────────────────── */\n\n /** Valor numérico a mostrar. */\n @property({ type: Number, reflect: true })\n value = 0;\n\n /** Carácter prefijo (€, $, …). */\n @property({ type: String, attribute: 'prefix', reflect: true })\n override prefix = '';\n\n /** Carácter sufijo (%, k, …). */\n @property({ type: String, attribute: 'suffix', reflect: true })\n suffix = '';\n\n /** Separador de miles. Default: punto. Vacío = sin separador. */\n @property({ type: String, attribute: 'thousands', reflect: true })\n thousands = '.';\n\n /**\n * Dígitos decimales a mostrar después de coma.\n * Ejemplo: decimals=\"73\" → \",73\"\n */\n @property({ type: Number, attribute: 'decimals', reflect: true })\n decimals: number | null = null;\n\n /** Tamaño del contador. */\n @property({ type: String, reflect: true })\n size: LibCounterSize = 'md';\n\n /** Tono de color. */\n @property({ type: String, reflect: true })\n tone: LibCounterTone = 'default';\n\n /** Etiqueta inferior en font-mono uppercase. */\n @property({ type: String })\n label = '';\n\n /** Texto del indicador de variación (e.g. \"+14,7%\"). */\n @property({ type: String })\n delta = '';\n\n /** Dirección del delta — controla color e icono. */\n @property({ type: String, attribute: 'delta-dir', reflect: true })\n deltaDir: LibCounterDeltaDir = 'up';\n\n /**\n * Si está presente, el contador arranca desde 0 y anima\n * hasta `value` cuando entra en el viewport (IntersectionObserver).\n * Nombre: play-on-visible (evita colisión con HTMLElement.animate).\n */\n @property({ type: Boolean, attribute: 'play-on-visible', reflect: true })\n playOnVisible = false;\n\n /* ── Internos ───────────────────────────────────────────── */\n\n // FIX: declare evita el error de overload en decoradores strict\n @query('.cnt-row')\n declare private _rowEl: HTMLElement;\n\n private _builtDigitCount = -1;\n private _builtThousands = '';\n\n private _observer: IntersectionObserver | undefined;\n private _hasAnimated = false;\n private _firstUpdate = true;\n\n /* ── Lifecycle ──────────────────────────────────────────── */\n override connectedCallback(): void {\n super.connectedCallback();\n if (this.playOnVisible) {\n this._observer = new IntersectionObserver(\n (entries) => {\n if (entries[0]?.isIntersecting && !this._hasAnimated) {\n this._hasAnimated = true;\n this._animateTo(this.value, /* fromZero */ true);\n this._observer?.disconnect();\n }\n },\n { threshold: 0.2 }\n );\n }\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this._observer?.disconnect();\n }\n\n override render(): TemplateResult {\n return counterTemplate({\n size: this.size,\n tone: this.tone,\n label: this.label,\n delta: this.delta,\n deltaDir: this.deltaDir,\n });\n }\n\n override updated(changed: PropertyValues): void {\n super.updated(changed);\n\n const structureChanged =\n changed.has('value') ||\n changed.has('prefix') ||\n changed.has('suffix') ||\n changed.has('thousands') ||\n changed.has('decimals');\n\n if (!structureChanged && !this._firstUpdate) return;\n\n const needRebuild = this._needsRebuild();\n if (needRebuild) {\n this._buildRow();\n }\n\n if (this._firstUpdate) {\n this._firstUpdate = false;\n\n if (this.playOnVisible) {\n // Construir en 0 y esperar viewport\n this._setRowInstant(0);\n // FIX: cast a Element para satisfacer IntersectionObserver.observe()\n this._observer?.observe(this as unknown as Element);\n } else {\n this._setRowInstant(this.value);\n }\n return;\n }\n\n if (changed.has('value')) {\n this._animateTo(this.value, /* fromZero */ false);\n }\n }\n\n /* ── Motor de digit-flip ────────────────────────────────── */\n\n private _needsRebuild(): boolean {\n const digitCount = Math.abs(Math.floor(this.value)).toString().length;\n if (digitCount !== this._builtDigitCount) return true;\n if (this.thousands !== this._builtThousands) return true;\n return false;\n }\n\n private _buildRow(): void {\n const row = this._rowEl;\n if (!row) return;\n row.innerHTML = '';\n\n const absVal = Math.abs(Math.floor(this.value));\n const str = absVal.toString();\n this._builtDigitCount = str.length;\n this._builtThousands = this.thousands;\n\n if (this.prefix) {\n const p = document.createElement('span');\n p.className = 'cnt-prefix';\n p.textContent = this.prefix;\n row.appendChild(p);\n }\n\n const chars = this._buildCharArray(str, this.thousands);\n chars.forEach((c) => {\n if (c.type === 'sep') {\n const sep = document.createElement('span');\n sep.className = 'cnt-sep';\n sep.textContent = c.char;\n row.appendChild(sep);\n } else {\n row.appendChild(this._makeDigitSlot(parseInt(c.char, 10)));\n }\n });\n\n if (this.decimals !== null) {\n const dot = document.createElement('span');\n dot.className = 'cnt-sep';\n dot.textContent = ',';\n row.appendChild(dot);\n\n const decStr = this.decimals.toString().padStart(2, '0');\n for (const ch of decStr) {\n row.appendChild(this._makeDigitSlot(parseInt(ch, 10)));\n }\n }\n\n if (this.suffix) {\n const s = document.createElement('span');\n s.className = 'cnt-suffix';\n s.textContent = this.suffix;\n row.appendChild(s);\n }\n }\n\n private _buildCharArray(\n str: string,\n thousands: string\n ): Array<{ type: 'digit' | 'sep'; char: string }> {\n const result: Array<{ type: 'digit' | 'sep'; char: string }> = [];\n for (let i = 0; i < str.length; i++) {\n const posFromRight = str.length - 1 - i;\n if (i > 0 && posFromRight % 3 === 2 && thousands) {\n result.push({ type: 'sep', char: thousands });\n }\n // FIX: str[i] es string | undefined en TS estricto — asegurar con ?? '0'\n result.push({ type: 'digit', char: str[i] ?? '0' });\n }\n return result;\n }\n\n private _makeDigitSlot(digit: number): HTMLElement {\n const slot = document.createElement('span');\n slot.className = 'cnt-digit';\n\n const inner = document.createElement('span');\n inner.className = 'cnt-digit-inner';\n\n for (let i = 0; i <= 9; i++) {\n const span = document.createElement('span');\n span.textContent = String(i);\n inner.appendChild(span);\n }\n\n inner.style.transition = 'none';\n inner.style.transform = `translateY(-${digit}em)`;\n slot.appendChild(inner);\n return slot;\n }\n\n private _setRowInstant(value: number): void {\n const slots = this._rowEl?.querySelectorAll<HTMLElement>('.cnt-digit');\n if (!slots) return;\n const digits = this._extractTargetDigits(value);\n slots.forEach((slot, i) => {\n const inner = slot.querySelector<HTMLElement>('.cnt-digit-inner');\n if (!inner) return;\n inner.style.transition = 'none';\n inner.style.transform = `translateY(-${digits[i] ?? 0}em)`;\n });\n }\n\n private _animateTo(value: number, fromZero: boolean): void {\n const slots = this._rowEl?.querySelectorAll<HTMLElement>('.cnt-digit');\n if (!slots || !slots.length) return;\n\n const targetDigits = this._extractTargetDigits(value);\n const total = slots.length;\n\n slots.forEach((slot, i) => {\n const inner = slot.querySelector<HTMLElement>('.cnt-digit-inner');\n if (!inner) return;\n\n const target = targetDigits[i] ?? 0;\n const fromRight = total - 1 - i;\n const delay = fromRight * 40;\n\n if (fromZero) {\n inner.style.transition = 'none';\n inner.style.transform = 'translateY(0)';\n }\n\n void inner.offsetHeight; // forzar reflow\n\n inner.style.transition = `transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) ${delay}ms`;\n inner.style.transform = `translateY(-${target}em)`;\n });\n }\n\n private _extractTargetDigits(value: number): number[] {\n const absVal = Math.abs(Math.floor(value));\n let str = absVal.toString();\n\n if (this.decimals !== null) {\n const decStr = this.decimals.toString().padStart(2, '0');\n str = str + decStr;\n }\n\n return str.split('').map((c) => parseInt(c, 10));\n }\n\n /* ── Public API ─────────────────────────────────────────── */\n\n /** Anima el contador a un nuevo valor manualmente. */\n public animateTo(value: number): void {\n this.value = value;\n }\n\n /** Reinicia la animación desde cero al valor actual. */\n public replay(): void {\n this._hasAnimated = false;\n this._animateTo(this.value, true);\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'lib-counter': LibCounter;\n }\n}"],"names":[],"mappings":";;;;;;;;;;;;;;;AAgCO,IAAM,aAAN,cAAyB,WAAW;AAAA,EAApC,cAAA;AAAA,UAAA,GAAA,SAAA;AAUL,SAAA,QAAQ;AAIR,SAAS,SAAS;AAIlB,SAAA,SAAS;AAIT,SAAA,YAAY;AAOZ,SAAA,WAA0B;AAI1B,SAAA,OAAuB;AAIvB,SAAA,OAAuB;AAIvB,SAAA,QAAQ;AAIR,SAAA,QAAQ;AAIR,SAAA,WAA+B;AAQ/B,SAAA,gBAAgB;AAQhB,SAAQ,mBAAmB;AAC3B,SAAQ,kBAAmB;AAG3B,SAAQ,eAAe;AACvB,SAAQ,eAAe;AAAA,EAAA;AAAA;AAAA,EAGd,oBAA0B;AACjC,UAAM,kBAAA;AACN,QAAI,KAAK,eAAe;AACtB,WAAK,YAAY,IAAI;AAAA,QACnB,CAAC,YAAY;;AACX,gBAAI,aAAQ,CAAC,MAAT,mBAAY,mBAAkB,CAAC,KAAK,cAAc;AACpD,iBAAK,eAAe;AACpB,iBAAK;AAAA,cAAW,KAAK;AAAA;AAAA,cAAsB;AAAA,YAAA;AAC3C,uBAAK,cAAL,mBAAgB;AAAA,UAClB;AAAA,QACF;AAAA,QACA,EAAE,WAAW,IAAA;AAAA,MAAI;AAAA,IAErB;AAAA,EACF;AAAA,E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X,WAAA,aAAA,CAAA;AAOA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,WAAW,YAAY,SAAS,MAAM;AAAA,GA5BrD,WA6BX,WAAA,YAAA,CAAA;AAIA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,SAAS,MAAM;AAAA,GAhC9B,WAiCX,WAAA,QAAA,CAAA;AAIA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,SAAS,MAAM;AAAA,GApC9B,WAqCX,WAAA,QAAA,CAAA;AAIA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAxCf,WAyCX,WAAA,SAAA,CAAA;AAIA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GA5Cf,WA6CX,WAAA,SAAA,CAAA;AAIA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,WAAW,aAAa,SAAS,MAAM;AAAA,GAhDtD,WAiDX,WAAA,YAAA,CAAA;AAQA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,WAAW,mBAAmB,SAAS,MAAM;AAAA,GAxD7D,WAyDX,WAAA,iBAAA,CAAA;AAMgB,gBAAA;AAAA,EADf,MAAM,UAAU;AAAA,GA9DN,WA+DK,WAAA,UAAA,CAAA;AA/DL,aAAN,gBAAA;AAAA,EADN,cAAc,aAAa;AAAA,GACf,UAAA;"}
|
|
1
|
+
{"version":3,"file":"index26.js","sources":["../src/components/atoms/kbd/lib-kbd.component.ts"],"sourcesContent":["import { LitElement, css, unsafeCSS, TemplateResult } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { kbdTemplate } from './lib-kbd.html';\nimport kbdCss from './lib-kbd.css?inline';\nimport sharedTokens from '../../../styles/shared/tokens.css?inline';\n\nexport type LibKbdSize = 'xs' | 'sm' | 'md' | 'lg';\nexport type LibKbdVariant = 'default' | 'dark' | 'ghost' | 'kaki' | 'celadon';\n\n/**\n * @element lib-kbd\n *\n * Representa una tecla de teclado física.\n * El `border-bottom` de 3px simula la pared lateral de la tecla.\n * El estado `pressed` produce un desplazamiento físico de 1-2px.\n *\n * @slot (default) — el símbolo o texto de la tecla (⌘, K, Ctrl…)\n *\n * @example — tecla individual\n * <lib-kbd>⌘</lib-kbd>\n *\n * @example — combo (el consumer compone las teclas)\n * <lib-kbd size=\"sm\">⌘</lib-kbd>\n * <span>+</span>\n * <lib-kbd size=\"sm\">K</lib-kbd>\n *\n * @example — pressed programático\n * <lib-kbd pressed>Space</lib-kbd>\n */\n@customElement('lib-kbd')\nexport class LibKbd extends LitElement {\n static override styles = [\n css`${unsafeCSS(sharedTokens)}`,\n css`${unsafeCSS(kbdCss)}`,\n ];\n\n /** Tamaño de la tecla. */\n @property({ type: String, reflect: true })\n size: LibKbdSize = 'md';\n\n /** Variante visual de color. */\n @property({ type: String, reflect: true })\n variant: LibKbdVariant = 'default';\n\n /**\n * Estado pressed programático.\n * El componente también gestiona pressed internamente\n * via mousedown/mouseup para la interacción del usuario.\n */\n @property({ type: Boolean, reflect: true })\n pressed = false;\n\n /** Estado interno de pulsación por ratón (no expuesto como atributo). */\n @state()\n private _pointerPressed = false;\n\n override render(): TemplateResult {\n return kbdTemplate({\n size: this.size,\n variant: this.variant,\n pressed: this.pressed || this._pointerPressed,\n onDown: this._onPointerDown.bind(this),\n onUp: this._onPointerUp.bind(this),\n onLeave: this._onPointerLeave.bind(this),\n });\n }\n\n private _onPointerDown(): void {\n this._pointerPressed = true;\n }\n\n private _onPointerUp(): void {\n this._pointerPressed = false;\n }\n\n private _onPointerLeave(): void {\n this._pointerPressed = false;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'lib-kbd': LibKbd;\n }\n}"],"names":[],"mappings":";;;;;;;;;;;;;;;AA8BO,IAAM,SAAN,cAAqB,WAAW;AAAA,EAAhC,cAAA;AAAA,UAAA,GAAA,SAAA;AAQL,SAAA,OAAmB;AAInB,SAAA,UAAyB;AAQzB,SAAA,UAAU;AAIV,SAAQ,kBAAkB;AAAA,EAAA;AAAA,EAEjB,SAAyB;AAChC,WAAO,YAAY;AAAA,MACjB,MAAS,KAAK;AAAA,MACd,SAAS,KAAK;AAAA,MACd,SAAS,KAAK,WAAW,KAAK;AAAA,MAC9B,QAAS,KAAK,eAAe,KAAK,IAAI;AAAA,MACtC,MAAS,KAAK,aAAa,KAAK,IAAI;AAAA,MACpC,SAAS,KAAK,gBAAgB,KAAK,IAAI;AAAA,IAAA,CACxC;AAAA,EACH;AAAA,EAEQ,iBAAuB;AAC7B,SAAK,kBAAkB;AAAA,EACzB;AAAA,EAEQ,eAAqB;AAC3B,SAAK,kBAAkB;AAAA,EACzB;AAAA,EAEQ,kBAAwB;AAC9B,SAAK,kBAAkB;AAAA,EACzB;AACF;AAhDa,OACK,SAAS;AAAA,EACvB,MAAM,UAAU,YAAY,CAAC;AAAA,EAC7B,MAAM,UAAU,MAAM,CAAC;AACzB;AAIA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,SAAS,MAAM;AAAA,GAP9B,OAQX,WAAA,QAAA,CAAA;AAIA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,SAAS,MAAM;AAAA,GAX9B,OAYX,WAAA,WAAA,CAAA;AAQA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM;AAAA,GAnB/B,OAoBX,WAAA,WAAA,CAAA;AAIQ,gBAAA;AAAA,EADP,MAAA;AAAM,GAvBI,OAwBH,WAAA,mBAAA,CAAA;AAxBG,SAAN,gBAAA;AAAA,EADN,cAAc,SAAS;AAAA,GACX,MAAA;"}
|
package/dist/index260.js
CHANGED
|
@@ -1,35 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
const spinnerSvg = svg`
|
|
3
|
-
<svg class="spinner" viewBox="0 0 16 16" fill="none"
|
|
4
|
-
stroke="currentColor" stroke-width="1.5" stroke-linecap="round">
|
|
5
|
-
<path d="M8 2a6 6 0 1 0 6 6" opacity="0.3"/>
|
|
6
|
-
<path d="M14 8a6 6 0 0 0-6-6"/>
|
|
7
|
-
</svg>`;
|
|
8
|
-
function buttonLiquidTemplate(ctx) {
|
|
9
|
-
const { loading, disabled } = ctx;
|
|
10
|
-
return html`
|
|
11
|
-
<button
|
|
12
|
-
class="btn"
|
|
13
|
-
part="button"
|
|
14
|
-
?disabled="${disabled || loading}"
|
|
15
|
-
aria-disabled="${disabled || loading}"
|
|
16
|
-
aria-busy="${loading ? "true" : nothing}"
|
|
17
|
-
@mouseenter="${(e) => ctx._onMouseEnter(e)}"
|
|
18
|
-
@mouseleave="${() => ctx._onMouseLeave()}"
|
|
19
|
-
@mousedown="${(e) => ctx._onMouseDown(e)}"
|
|
20
|
-
>
|
|
21
|
-
<!-- Canvas inyectado por el componente en firstUpdated -->
|
|
22
|
-
|
|
23
|
-
<span class="btn-inner" part="inner">
|
|
24
|
-
${loading ? spinnerSvg : nothing}
|
|
25
|
-
<slot name="prefix"></slot>
|
|
26
|
-
<slot></slot>
|
|
27
|
-
<slot name="suffix"></slot>
|
|
28
|
-
</span>
|
|
29
|
-
</button>
|
|
30
|
-
`;
|
|
31
|
-
}
|
|
1
|
+
const stepperCss = '@layer tokens,reset,components;@layer reset{:host{display:block;width:100%}*,*:before,*:after{box-sizing:border-box}}@layer components{.stepper-track{display:flex;flex-direction:row;align-items:flex-start;width:100%;position:relative}:host([orientation="vertical"]) .stepper-track{flex-direction:column}}';
|
|
32
2
|
export {
|
|
33
|
-
|
|
3
|
+
stepperCss as default
|
|
34
4
|
};
|
|
35
5
|
//# sourceMappingURL=index260.js.map
|
package/dist/index260.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index260.js","sources":[
|
|
1
|
+
{"version":3,"file":"index260.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index261.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const
|
|
1
|
+
const timelineCss = '@layer tokens,reset,components;@layer reset{*,*:before,*:after{box-sizing:border-box}:host{display:block}}@layer components{.tl{display:flex;flex-direction:column;gap:0}.tl-item{display:grid;grid-template-columns:40px 1fr;gap:0 var(--lib-space-md);position:relative}.tl-spine{display:flex;flex-direction:column;align-items:center;position:relative}.tl-node{width:28px;height:28px;border-radius:var(--radius-full);flex-shrink:0;display:flex;align-items:center;justify-content:center;position:relative;z-index:1;transition:transform var(--duration-base),box-shadow var(--duration-base)}.tl-node-dot{background:var(--bg-elevated);border:2px solid var(--color-washi-700)}.tl-node-dot:after{content:"";width:8px;height:8px;border-radius:var(--radius-full);background:var(--color-washi-700)}.tl-node-icon{background:var(--bg-surface);border:1px solid var(--border-default);border-radius:var(--radius-sm);font-size:14px;color:var(--text-secondary)}.tl-node-avatar{background:var(--color-washi-200);border:1px solid var(--border-default);font-family:var(--lib-font-mono);font-size:9px;color:var(--text-secondary)}.nd-kaki.tl-node-dot{border-color:var(--color-kaki-500)}.nd-kaki.tl-node-dot:after{background:var(--color-kaki-500)}.nd-kaki.tl-node-icon{background:var(--color-kaki-50);border-color:var(--color-kaki-100);color:var(--color-kaki-500)}.nd-kaki.tl-node-avatar{background:var(--color-kaki-100);border-color:var(--color-kaki-100);color:var(--color-kaki-600)}.nd-celadon.tl-node-dot{border-color:var(--color-celadon-500)}.nd-celadon.tl-node-dot:after{background:var(--color-celadon-500)}.nd-celadon.tl-node-icon{background:var(--color-celadon-50);border-color:var(--color-celadon-100);color:var(--color-celadon-500)}.nd-celadon.tl-node-avatar{background:var(--color-celadon-100);border-color:var(--color-celadon-100);color:var(--color-celadon-600)}.nd-error.tl-node-dot{border-color:var(--color-error)}.nd-error.tl-node-dot:after{background:var(--color-error)}.nd-error.tl-node-icon{background:#fff8f7;border-color:#f5c4bc;color:var(--color-error)}.nd-muted.tl-node-dot{border-color:var(--color-washi-300);border-style:dashed}.nd-muted.tl-node-dot:after{background:var(--color-washi-300)}.nd-muted.tl-node-icon{background:var(--bg-surface);border-color:var(--border-subtle);color:var(--text-muted)}@keyframes tl-pulse{0%{box-shadow:0 0 #b85a1e59}70%{box-shadow:0 0 0 8px #b85a1e00}to{box-shadow:0 0 #b85a1e00}}.tl-item.is-active .tl-node-dot{border-color:var(--color-kaki-500);animation:tl-pulse 2s infinite}.tl-item.is-active .tl-node-dot:after{background:var(--color-kaki-500)}.tl-item.is-active .tl-title{color:var(--text-primary)}.tl-item.is-done .tl-node-dot{background:var(--color-washi-900);border-color:var(--color-washi-900)}.tl-item.is-done .tl-node-dot:after{display:none}.tl-item.is-done .tl-node-dot:before{content:"";width:6px;height:10px;border-right:2px solid var(--color-white);border-bottom:2px solid var(--color-white);transform:rotate(45deg) translate(-1px,-2px)}.tl-item.is-error .tl-node-dot{background:var(--color-error);border-color:var(--color-error)}.tl-item.is-error .tl-node-dot:after{display:none}.tl-item.is-error .tl-node-dot:before{content:"!";font-family:var(--lib-font-mono);font-size:11px;font-weight:700;color:var(--color-white);line-height:1}.tl-item.is-error .tl-title{color:var(--color-error)}.tl-item.is-pending .tl-node-dot{border-color:var(--color-washi-300);border-style:dashed}.tl-item.is-pending .tl-node-dot:after{background:var(--color-washi-300);width:6px;height:6px}.tl-item.is-pending .tl-title{color:var(--text-muted)}.tl-item.is-pending .tl-body{opacity:.5}.tl-line{width:1px;flex:1;background:var(--border-default);margin:var(--lib-space-xs) 0;min-height:var(--lib-space-lg);position:relative;overflow:hidden}.tl-line.dashed{background:repeating-linear-gradient(to bottom,var(--border-default) 0,var(--border-default) 4px,transparent 4px,transparent 8px)}.tl-line.progress{background:var(--border-subtle)}.tl-line.progress:after{content:"";position:absolute;top:0;left:0;right:0;height:var(--tl-progress, 0%);background:var(--color-kaki-500);transition:height var(--duration-slower) var(--ease-out)}.tl-content{padding-bottom:var(--lib-space-lg);padding-top:2px}.tl-item:last-child .tl-content{padding-bottom:0}.tl-timestamp{font-family:var(--lib-font-mono);font-size:10px;letter-spacing:var(--tracking-wider);color:var(--text-muted);margin-bottom:var(--lib-space-sm);display:flex;align-items:center;gap:var(--lib-space-sm);line-height:1;padding-top:6px}.tl-timestamp-dot{width:4px;height:4px;border-radius:var(--radius-full);background:var(--color-washi-300);flex-shrink:0}.tl-title{font-family:var(--lib-font-body);font-size:var(--text-base);color:var(--text-secondary);line-height:var(--leading-snug);margin-bottom:var(--lib-space-sm)}.tl-body{font-size:var(--text-sm);color:var(--text-secondary);line-height:var(--leading-relaxed);opacity:.85}.tl-body p{margin-bottom:var(--lib-space-sm)}.tl-body p:last-child{margin-bottom:0}.tl-meta{display:flex;align-items:center;flex-wrap:wrap;gap:var(--lib-space-sm);margin-top:var(--lib-space-sm)}.tl-card{background:var(--bg-elevated);border:1px solid var(--border-subtle);padding:var(--lib-space-md) var(--lib-space-md);margin-top:var(--lib-space-xs)}.tl-item.is-active .tl-card{border-color:var(--color-kaki-200);background:var(--color-kaki-50)}.tl-item.is-done .tl-card{background:var(--bg-surface)}.tl-item.is-error .tl-card{border-color:#c44030;background:#fff8f7}.tl-item.is-pending .tl-card{background:var(--bg-surface);opacity:.6}.tl-media{margin-top:var(--lib-space-md);border-top:1px solid var(--border-subtle);padding-top:var(--lib-space-md);display:flex;gap:var(--lib-space-sm);flex-wrap:wrap}.tl-media-thumb{width:64px;height:48px;background:var(--border-subtle);border:1px solid var(--border-default);flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:20px;color:var(--text-muted)}.tl-badge{display:inline-flex;align-items:center;gap:var(--lib-space-xs);font-family:var(--lib-font-mono);font-size:9px;letter-spacing:var(--tracking-wider);text-transform:uppercase;padding:2px var(--lib-space-sm)}.tl-badge:before{content:"";width:4px;height:4px;border-radius:var(--radius-full);background:currentcolor;opacity:.65;flex-shrink:0}.tl-badge-default{color:var(--text-muted);background:var(--bg-surface);border:1px solid var(--border-subtle)}.tl-badge-kaki{color:var(--color-kaki-500);background:var(--color-kaki-50);border:1px solid var(--color-kaki-100)}.tl-badge-celadon{color:var(--color-celadon-500);background:var(--color-celadon-50);border:1px solid var(--color-celadon-100)}.tl-badge-error{color:var(--color-error);background:#fff8f7;border:1px solid #F5C4BC}.tl-avatar{width:20px;height:20px;border-radius:var(--radius-full);background:var(--color-washi-200);display:inline-flex;align-items:center;justify-content:center;font-family:var(--lib-font-mono);font-size:7px;color:var(--text-secondary);border:1px solid var(--border-subtle);flex-shrink:0}.tl-item.is-collapsed .tl-body,.tl-item.is-collapsed .tl-media,.tl-item.is-collapsed .tl-card-body{display:none}.tl-item.is-collapsed .tl-content{padding-bottom:var(--lib-space-md)}.tl-expand-btn{background:none;border:none;cursor:pointer;font-family:var(--lib-font-mono);font-size:9px;letter-spacing:var(--tracking-wider);text-transform:uppercase;color:var(--text-muted);padding:0;margin-top:var(--lib-space-sm);display:flex;align-items:center;gap:var(--lib-space-sm);transition:color var(--duration-fast)}.tl-expand-btn:hover{color:var(--text-primary)}:host([size="sm"]) .tl-item{grid-template-columns:28px 1fr}:host([size="sm"]) .tl-node{width:20px;height:20px}:host([size="sm"]) .tl-node-dot:after{width:6px;height:6px}:host([size="sm"]) .tl-node-icon{font-size:11px}:host([size="sm"]) .tl-node-avatar{font-size:7px}:host([size="sm"]) .tl-line{min-height:var(--lib-space-md)}:host([size="sm"]) .tl-content{padding-bottom:var(--lib-space-md)}:host([size="sm"]) .tl-timestamp{font-size:9px;padding-top:2px}:host([size="sm"]) .tl-title{font-size:var(--text-sm)}:host([size="sm"]) .tl-body{font-size:var(--text-xs)}:host([size="sm"]) .tl-card{padding:var(--lib-space-sm) var(--lib-space-md)}:host([size="lg"]) .tl-item{grid-template-columns:48px 1fr;gap:0 var(--lib-space-md)}:host([size="lg"]) .tl-node{width:36px;height:36px}:host([size="lg"]) .tl-node-dot:after{width:10px;height:10px}:host([size="lg"]) .tl-node-icon{font-size:18px}:host([size="lg"]) .tl-line{min-height:var(--lib-space-lg)}:host([size="lg"]) .tl-content{padding-bottom:var(--lib-space-xl);padding-top:4px}:host([size="lg"]) .tl-timestamp{font-size:11px;padding-top:8px}:host([size="lg"]) .tl-title{font-size:var(--text-md)}:host([size="lg"]) .tl-body{font-size:var(--text-sm)}:host([size="lg"]) .tl-card{padding:var(--lib-space-md) var(--lib-space-lg)}}';
|
|
2
2
|
export {
|
|
3
|
-
|
|
3
|
+
timelineCss as default
|
|
4
4
|
};
|
|
5
5
|
//# sourceMappingURL=index261.js.map
|
package/dist/index262.js
CHANGED
|
@@ -1,12 +1,95 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { html, nothing } from "lit";
|
|
2
|
+
import { styleMap as o } from "./index267.js";
|
|
3
|
+
function timelineItemTemplate(props) {
|
|
4
|
+
const {
|
|
5
|
+
nodeType,
|
|
6
|
+
nodeColor,
|
|
7
|
+
icon,
|
|
8
|
+
avatar,
|
|
9
|
+
status,
|
|
10
|
+
lineVariant,
|
|
11
|
+
lineProgress,
|
|
12
|
+
hideLine,
|
|
13
|
+
timestamp,
|
|
14
|
+
title,
|
|
15
|
+
body,
|
|
16
|
+
card,
|
|
17
|
+
collapsed,
|
|
18
|
+
collapsible,
|
|
19
|
+
onToggleCollapse
|
|
20
|
+
} = props;
|
|
21
|
+
const itemCls = [
|
|
22
|
+
"tl-item",
|
|
23
|
+
status !== "default" ? `is-${status}` : "",
|
|
24
|
+
collapsed ? "is-collapsed" : ""
|
|
25
|
+
].filter(Boolean).join(" ");
|
|
26
|
+
const nodeTypeCls = `tl-node-${nodeType}`;
|
|
27
|
+
const nodeColorCls = nodeColor !== "default" ? `nd-${nodeColor}` : "";
|
|
28
|
+
const nodeCls = `tl-node ${nodeTypeCls} ${nodeColorCls}`.trim();
|
|
29
|
+
const nodeInner = nodeType === "icon" ? html`<lib-icon name="${icon}" size="xs"></lib-icon>` : nodeType === "avatar" ? html`${avatar}` : nothing;
|
|
30
|
+
const lineCls = [
|
|
31
|
+
"tl-line",
|
|
32
|
+
lineVariant === "dashed" ? "dashed" : "",
|
|
33
|
+
lineVariant === "progress" ? "progress" : ""
|
|
34
|
+
].filter(Boolean).join(" ");
|
|
35
|
+
const lineStyles = lineVariant === "progress" ? o({ "--tl-progress": `${lineProgress}%` }) : nothing;
|
|
36
|
+
const contentInner = card ? html`
|
|
37
|
+
<div class="tl-card">
|
|
38
|
+
${title ? html`<p class="tl-title">${title}</p>` : nothing}
|
|
39
|
+
<div class="tl-card-body">
|
|
40
|
+
${body ? html`<div class="tl-body">${body}</div>` : nothing}
|
|
41
|
+
<!-- slot por defecto para contenido libre dentro de la card -->
|
|
42
|
+
<slot></slot>
|
|
43
|
+
<!-- slot meta: badges, avatares, etc. -->
|
|
44
|
+
<div class="tl-meta">
|
|
45
|
+
<slot name="meta"></slot>
|
|
46
|
+
</div>
|
|
47
|
+
<!-- slot media: imágenes adjuntas -->
|
|
48
|
+
<slot name="media"></slot>
|
|
49
|
+
</div>
|
|
50
|
+
</div>` : html`
|
|
51
|
+
${title ? html`<p class="tl-title">${title}</p>` : nothing}
|
|
52
|
+
${body ? html`<div class="tl-body">${body}</div>` : html`<div class="tl-body"><slot></slot></div>`}
|
|
53
|
+
<div class="tl-meta">
|
|
54
|
+
<slot name="meta"></slot>
|
|
55
|
+
</div>`;
|
|
56
|
+
return html`
|
|
57
|
+
<div class="${itemCls}" role="listitem">
|
|
58
|
+
|
|
59
|
+
<!-- ── Spine: nodo + línea ── -->
|
|
60
|
+
<div class="tl-spine">
|
|
61
|
+
<div class="${nodeCls}">${nodeInner}</div>
|
|
62
|
+
${hideLine ? nothing : html`<div class="${lineCls}" style="${lineStyles}"></div>`}
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<!-- ── Content ── -->
|
|
66
|
+
<div class="tl-content">
|
|
67
|
+
${timestamp ? html`
|
|
68
|
+
<div class="tl-timestamp">
|
|
69
|
+
<span class="tl-timestamp-dot"></span>
|
|
70
|
+
${timestamp}
|
|
71
|
+
</div>` : nothing}
|
|
72
|
+
|
|
73
|
+
${contentInner}
|
|
74
|
+
|
|
75
|
+
${collapsible ? html`
|
|
76
|
+
<button
|
|
77
|
+
class="tl-expand-btn"
|
|
78
|
+
aria-expanded="${!collapsed}"
|
|
79
|
+
@click="${onToggleCollapse}"
|
|
80
|
+
>
|
|
81
|
+
<lib-icon
|
|
82
|
+
name="${collapsed ? "caret-down" : "caret-up"}"
|
|
83
|
+
size="xs"
|
|
84
|
+
></lib-icon>
|
|
85
|
+
${collapsed ? "Mostrar más" : "Mostrar menos"}
|
|
86
|
+
</button>` : nothing}
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
</div>
|
|
90
|
+
`;
|
|
91
|
+
}
|
|
9
92
|
export {
|
|
10
|
-
|
|
93
|
+
timelineItemTemplate
|
|
11
94
|
};
|
|
12
95
|
//# sourceMappingURL=index262.js.map
|
package/dist/index262.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index262.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index262.js","sources":["../src/components/organisms/timeline/lib-timeline-item.html.ts"],"sourcesContent":["import { html, nothing, TemplateResult } from 'lit';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport type { TimelineItemTemplateProps } from './lib-timeline-item.types';\n\nexport function timelineItemTemplate(props: TimelineItemTemplateProps): TemplateResult {\n const {\n nodeType, nodeColor, icon, avatar,\n status, lineVariant, lineProgress, hideLine,\n timestamp, title, body, card, collapsed, collapsible,\n onToggleCollapse,\n } = props;\n\n /* ── Clases del ítem raíz ── */\n const itemCls = [\n 'tl-item',\n status !== 'default' ? `is-${status}` : '',\n collapsed ? 'is-collapsed' : '',\n ].filter(Boolean).join(' ');\n\n /* ── Clases del nodo ── */\n const nodeTypeCls = `tl-node-${nodeType}`;\n const nodeColorCls = nodeColor !== 'default' ? `nd-${nodeColor}` : '';\n const nodeCls = `tl-node ${nodeTypeCls} ${nodeColorCls}`.trim();\n\n /* ── Nodo interior ── */\n const nodeInner = nodeType === 'icon'\n ? html`<lib-icon name=\"${icon}\" size=\"xs\"></lib-icon>`\n : nodeType === 'avatar'\n ? html`${avatar}`\n : nothing; /* dot — nodo gestionado por CSS ::before/::after */\n\n /* ── Línea ── */\n const lineCls = [\n 'tl-line',\n lineVariant === 'dashed' ? 'dashed' : '',\n lineVariant === 'progress' ? 'progress' : '',\n ].filter(Boolean).join(' ');\n\n const lineStyles = lineVariant === 'progress'\n ? styleMap({ '--tl-progress': `${lineProgress}%` } as Record<string, string>)\n : nothing;\n\n /* ── Contenido ── */\n const contentInner: TemplateResult = card\n ? html`\n <div class=\"tl-card\">\n ${title ? html`<p class=\"tl-title\">${title}</p>` : nothing}\n <div class=\"tl-card-body\">\n ${body ? html`<div class=\"tl-body\">${body}</div>` : nothing}\n <!-- slot por defecto para contenido libre dentro de la card -->\n <slot></slot>\n <!-- slot meta: badges, avatares, etc. -->\n <div class=\"tl-meta\">\n <slot name=\"meta\"></slot>\n </div>\n <!-- slot media: imágenes adjuntas -->\n <slot name=\"media\"></slot>\n </div>\n </div>`\n : html`\n ${title ? html`<p class=\"tl-title\">${title}</p>` : nothing}\n ${body\n ? html`<div class=\"tl-body\">${body}</div>`\n : html`<div class=\"tl-body\"><slot></slot></div>`}\n <div class=\"tl-meta\">\n <slot name=\"meta\"></slot>\n </div>`;\n\n return html`\n <div class=\"${itemCls}\" role=\"listitem\">\n\n <!-- ── Spine: nodo + línea ── -->\n <div class=\"tl-spine\">\n <div class=\"${nodeCls}\">${nodeInner}</div>\n ${hideLine\n ? nothing\n : html`<div class=\"${lineCls}\" style=\"${lineStyles}\"></div>`}\n </div>\n\n <!-- ── Content ── -->\n <div class=\"tl-content\">\n ${timestamp\n ? html`\n <div class=\"tl-timestamp\">\n <span class=\"tl-timestamp-dot\"></span>\n ${timestamp}\n </div>`\n : nothing}\n\n ${contentInner}\n\n ${collapsible\n ? html`\n <button\n class=\"tl-expand-btn\"\n aria-expanded=\"${!collapsed}\"\n @click=\"${onToggleCollapse}\"\n >\n <lib-icon\n name=\"${coll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