@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/index40.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index40.js","sources":["../src/components/atoms/background/lib-background.component.ts"],"sourcesContent":["import { LitElement, css, unsafeCSS, TemplateResult } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport backgroundCss from './lib-background.css?inline';\nimport sharedTokens from '../../../styles/shared/tokens.css?inline';\nimport { backgroundTemplate } from './lib-background.html';\nimport { BG_CANVAS_VARIANTS } from './lib-background.types';\nimport type { LibBackgroundVariant } from './lib-background.types';\n\n/**\n * @element lib-background\n *\n * Fondo decorativo con 34 variantes. Úsalo como contenedor raíz\n * de secciones, heroes, cards o paneles. El contenido se coloca\n * en el slot por defecto.\n *\n * @prop {LibBackgroundVariant} variant — Fondo activo (default: 'washi')\n * @prop {boolean} paused — Pausa animaciones CSS (a11y)\n *\n * @csspart base — div de fondo CSS\n * @csspart overlay — div de overlay / grano / animación\n * @csspart canvas — canvas 2D generativo\n * @csspart content — contenedor del slot\n *\n * @slot — Contenido que se renderiza sobre el fondo\n */\n@customElement('lib-background')\nexport class LibBackground extends LitElement {\n static override styles = [\n css`${unsafeCSS(sharedTokens)}`,\n css`${unsafeCSS(backgroundCss)}`,\n ];\n\n /* ── Props públicas ── */\n\n @property({ type: String, reflect: true })\n variant: LibBackgroundVariant = 'washi';\n\n @property({ type: Boolean, reflect: true })\n paused = false;\n\n /* ── Canvas internal state ── */\n\n @query('.bg-canvas') private declare _canvas: HTMLCanvasElement;\n\n private _raf = 0;\n private _ro: ResizeObserver | null = null;\n\n /* ── Ciclo de vida ── */\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this._stopCanvas();\n }\n\n protected override updated(changed: Map<PropertyKey, unknown>): void {\n if (changed.has('variant')) {\n this._stopCanvas();\n if (BG_CANVAS_VARIANTS.has(this.variant)) {\n // Esperar al next tick para que el canvas exista en el DOM\n requestAnimationFrame((): void => this._startCanvas());\n }\n }\n }\n\n /* ── Canvas lifecycle ── */\n\n private _stopCanvas(): void {\n if (this._raf) { cancelAnimationFrame(this._raf); this._raf = 0; }\n if (this._ro) { this._ro.disconnect(); this._ro = null; }\n }\n\n private _startCanvas(): void {\n const canvas = this._canvas;\n if (!canvas) return;\n \n switch (this.variant) {\n case 'particles': this._initParticles(canvas); break;\n case 'rain': this._initRain(canvas); break;\n case 'wave-mesh': this._initWaveMesh(canvas); break;\n case 'constellation': this._initConstellation(canvas); break;\n case 'fireflies': this._initFireflies(canvas); break;\n case 'ink-wash': this._initInkWash(canvas); break;\n default: break;\n }\n }\n\n /* ── Canvas: Particle Field ── */\n private _initParticles(canvas: HTMLCanvasElement): void {\n const ctx = canvas.getContext('2d')!;\n // ✅ Fix: renderRoot es ShadowRoot en runtime — cast explícito para acceder a .host\n const host = ((this.renderRoot as ShadowRoot).host as HTMLElement);\n let W = 0, H = 0;\n\n const COUNT = 55;\n // ✅ Fix: tipo explícito string[] — evita string | undefined en el acceso por índice\n const COLORS: string[] = ['rgba(217,114,52,', 'rgba(78,148,130,', 'rgba(250,247,244,'];\n\n type Particle = { x:number; y:number; r:number; vx:number; vy:number; a:number; c:string };\n let pts: Particle[] = [];\n\n const resize = (): void => {\n W = canvas.width = host.clientWidth;\n H = canvas.height = host.clientHeight;\n pts = Array.from({ length: COUNT }, (): Particle => ({\n x: Math.random() * W,\n y: Math.random() * H,\n r: Math.random() * 1.5 + 0.3,\n vx: (Math.random() - 0.5) * 0.25,\n vy: (Math.random() - 0.5) * 0.25,\n a: Math.random() * 0.4 + 0.15,\n // ✅ Fix: COLORS es string[] → el acceso ya no devuelve undefined\n c: COLORS[Math.floor(Math.random() * COLORS.length)] ?? 'rgba(250,247,244,',\n }));\n };\n\n const draw = (): void => {\n ctx.clearRect(0, 0, W, H);\n for (let i = 0; i < pts.length; i++) {\n for (let j = i + 1; j < pts.length; j++) {\n // ✅ Fix: destructurar con ! — los índices son seguros por los límites del bucle\n const pi = pts[i]!;\n const pj = pts[j]!;\n const dx = pi.x - pj.x;\n const dy = pi.y - pj.y;\n const d = Math.sqrt(dx * dx + dy * dy);\n if (d < 90) {\n ctx.beginPath();\n ctx.moveTo(pi.x, pi.y);\n ctx.lineTo(pj.x, pj.y);\n ctx.strokeStyle = `rgba(250,247,244,${0.04 * (1 - d / 90)})`;\n ctx.lineWidth = 0.5;\n ctx.stroke();\n }\n }\n }\n pts.forEach(p => {\n ctx.beginPath();\n ctx.arc(p.x, p.y, p.r, 0, Math.PI * 2);\n ctx.fillStyle = `${p.c}${p.a})`;\n ctx.fill();\n p.x += p.vx;\n p.y += p.vy;\n if (p.x < 0 || p.x > W) p.vx *= -1;\n if (p.y < 0 || p.y > H) p.vy *= -1;\n });\n this._raf = requestAnimationFrame(draw);\n };\n\n this._ro = new ResizeObserver(resize);\n this._ro.observe(host);\n resize();\n draw();\n }\n\n private _initFireflies(canvas: HTMLCanvasElement): void {\n const ctx = canvas.getContext('2d')!;\n const host = (this.renderRoot as ShadowRoot).host as HTMLElement;\n let W = 0, H = 0;\n \n const COUNT = 32;\n const COLORS: string[] = [\n 'rgba(250,247,244,',\n 'rgba(250,247,244,',\n 'rgba(217,114,52,',\n 'rgba(78,148,130,',\n ];\n \n type Fly = {\n x: number; y: number; r: number;\n a: number; da: number;\n dx: number; dy: number;\n phase: number; col: string;\n };\n let flies: Fly[] = [];\n \n const resize = (): void => {\n W = canvas.width = host.clientWidth;\n H = canvas.height = host.clientHeight;\n flies = Array.from({ length: COUNT }, (): Fly => ({\n x: Math.random() * W,\n y: Math.random() * H,\n r: Math.random() * 2 + 0.8,\n a: Math.random(),\n da: (Math.random() * 0.008 + 0.003) * (Math.random() > 0.5 ? 1 : -1),\n dx: (Math.random() - 0.5) * 0.18,\n dy: -(Math.random() * 0.25 + 0.08),\n phase: Math.random() * Math.PI * 2,\n col: COLORS[Math.floor(Math.random() * COLORS.length)] ?? 'rgba(250,247,244,',\n }));\n };\n \n const draw = (): void => {\n ctx.fillStyle = 'rgba(8,6,4,0.14)';\n ctx.fillRect(0, 0, W, H);\n \n flies.forEach(f => {\n f.phase += 0.018;\n f.a += f.da;\n if (f.a > 1 || f.a < 0) { f.da *= -1; f.a = Math.max(0, Math.min(1, f.a)); }\n \n f.x += f.dx + Math.sin(f.phase) * 0.28;\n f.y += f.dy;\n \n if (f.y < -10) { f.y = H + 10; f.x = Math.random() * W; }\n if (f.x < -10) f.x = W + 10;\n if (f.x > W + 10) f.x = -10;\n \n /* Glow halo */\n const grd = ctx.createRadialGradient(f.x, f.y, 0, f.x, f.y, f.r * 5);\n grd.addColorStop(0, `${f.col}${f.a * 0.85})`);\n grd.addColorStop(1, `${f.col}0)`);\n ctx.beginPath();\n ctx.arc(f.x, f.y, f.r * 5, 0, Math.PI * 2);\n ctx.fillStyle = grd;\n ctx.fill();\n \n /* Core dot */\n ctx.beginPath();\n ctx.arc(f.x, f.y, f.r, 0, Math.PI * 2);\n ctx.fillStyle = `${f.col}${f.a})`;\n ctx.fill();\n });\n \n this._raf = requestAnimationFrame(draw);\n };\n \n this._ro = new ResizeObserver(resize);\n this._ro.observe(host);\n resize();\n draw();\n }\n\n private _initInkWash(canvas: HTMLCanvasElement): void {\n const ctx = canvas.getContext('2d')!;\n const host = (this.renderRoot as ShadowRoot).host as HTMLElement;\n let W = 0, H = 0, t = 0;\n \n type Blob = { cx: number; cy: number; r: number; speed: number; offset: number; color: string };\n let blobs: Blob[] = [];\n \n const resize = (): void => {\n W = canvas.width = host.clientWidth;\n H = canvas.height = host.clientHeight;\n const base = Math.min(W, H);\n blobs = [\n { cx: 0.28, cy: 0.42, r: base * 0.24, speed: 1.0, offset: 0, color: 'rgba(175,150,120,0.07)' },\n { cx: 0.68, cy: 0.58, r: base * 0.20, speed: 1.3, offset: 1.2, color: 'rgba(155,135,108,0.06)' },\n { cx: 0.50, cy: 0.28, r: base * 0.17, speed: 0.7, offset: 2.5, color: 'rgba(184,90,30,0.04)' },\n { cx: 0.18, cy: 0.72, r: base * 0.15, speed: 1.1, offset: 3.8, color: 'rgba(78,148,130,0.04)' },\n { cx: 0.82, cy: 0.32, r: base * 0.13, speed: 0.85, offset: 5.0, color: 'rgba(175,150,120,0.05)' },\n ];\n };\n \n const drawBlob = (b: Blob): void => {\n const pts = 44;\n const phase = t * b.speed + b.offset;\n ctx.beginPath();\n for (let i = 0; i <= pts; i++) {\n const angle = (i / pts) * Math.PI * 2;\n const noise =\n Math.sin(angle * 3 + phase) * b.r * 0.14\n + Math.cos(angle * 2 - phase * 0.8) * b.r * 0.09\n + Math.sin(angle * 5 + phase * 1.4) * b.r * 0.05;\n const x = b.cx * W + (b.r + noise) * Math.cos(angle);\n const y = b.cy * H + (b.r + noise) * Math.sin(angle);\n i === 0 ? ctx.moveTo(x, y) : ctx.lineTo(x, y);\n }\n ctx.closePath();\n ctx.fillStyle = b.color;\n ctx.fill();\n };\n \n const draw = (): void => {\n ctx.clearRect(0, 0, W, H);\n ctx.fillStyle = '#FAF7F4';\n ctx.fillRect(0, 0, W, H);\n \n blobs.forEach(drawBlob);\n \n t += 0.0028;\n this._raf = requestAnimationFrame(draw);\n };\n \n this._ro = new ResizeObserver(resize);\n this._ro.observe(host);\n resize();\n draw();\n }\n\n /* ── Canvas: Rain Lines ── */\n private _initRain(canvas: HTMLCanvasElement): void {\n const ctx = canvas.getContext('2d')!;\n const host = (this.renderRoot as ShadowRoot).host as HTMLElement;\n let W = 0, H = 0;\n\n const COUNT = 40;\n type Drop = { x:number; y:number; len:number; v:number; a:number; col:string };\n let drops: Drop[] = [];\n\n const resize = (): void => {\n W = canvas.width = host.clientWidth;\n H = canvas.height = host.clientHeight;\n drops = Array.from({ length: COUNT }, () => ({\n x: Math.random() * W,\n y: Math.random() * H - H,\n len: Math.random() * 22 + 8,\n v: Math.random() * 1.8 + 0.8,\n a: Math.random() * 0.2 + 0.04,\n col: Math.random() > 0.85 ? 'rgba(217,114,52,' : 'rgba(250,247,244,',\n }));\n };\n\n const draw = (): void => {\n ctx.fillStyle = 'rgba(14,10,7,0.18)';\n ctx.fillRect(0, 0, W, H);\n drops.forEach(d => {\n ctx.beginPath();\n ctx.moveTo(d.x, d.y);\n ctx.lineTo(d.x - d.len * 0.1, d.y + d.len);\n const g = ctx.createLinearGradient(d.x, d.y, d.x, d.y + d.len);\n g.addColorStop(0, `${d.col}0)`);\n g.addColorStop(0.5, `${d.col}${d.a})`);\n g.addColorStop(1, `${d.col}0)`);\n ctx.strokeStyle = g;\n ctx.lineWidth = 0.8;\n ctx.stroke();\n d.y += d.v;\n if (d.y > H + d.len) { d.y = -d.len; d.x = Math.random() * W; }\n });\n this._raf = requestAnimationFrame(draw);\n };\n\n this._ro = new ResizeObserver(resize);\n this._ro.observe(host);\n resize();\n draw();\n }\n\n /* ── Canvas: Wave Mesh ── */\n private _initWaveMesh(canvas: HTMLCanvasElement): void {\n const ctx = canvas.getContext('2d')!;\n const host = (this.renderRoot as ShadowRoot).host as HTMLElement;\n let W = 0, H = 0, t = 0;\n const COLS = 16, ROWS = 10;\n\n const resize = (): void => {\n W = canvas.width = host.clientWidth;\n H = canvas.height = host.clientHeight;\n };\n\n const draw = (): void => {\n ctx.clearRect(0, 0, W, H);\n ctx.fillStyle = '#FAF7F4';\n ctx.fillRect(0, 0, W, H);\n\n const cw = W / (COLS - 1);\n const ch = H / (ROWS - 1);\n\n for (let r = 0; r < ROWS; r++) {\n ctx.beginPath();\n for (let c = 0; c < COLS; c++) {\n const wave = Math.sin((c / COLS + t) * Math.PI * 2) * 12\n + Math.cos((r / ROWS + t * 0.7) * Math.PI * 2) * 8;\n const x = c * cw;\n const y = r * ch + wave;\n c === 0 ? ctx.moveTo(x, y) : ctx.lineTo(x, y);\n }\n ctx.strokeStyle = `rgba(160,140,118,${0.08 + Math.sin(r / ROWS * Math.PI) * 0.06})`;\n ctx.lineWidth = 0.8;\n ctx.stroke();\n }\n for (let c = 0; c < COLS; c++) {\n ctx.beginPath();\n for (let r = 0; r < ROWS; r++) {\n const wave = Math.sin((c / COLS + t) * Math.PI * 2) * 12\n + Math.cos((r / ROWS + t * 0.7) * Math.PI * 2) * 8;\n const x = c * cw;\n const y = r * ch + wave;\n r === 0 ? ctx.moveTo(x, y) : ctx.lineTo(x, y);\n }\n ctx.strokeStyle = `rgba(160,140,118,${0.06 + Math.sin(c / COLS * Math.PI) * 0.04})`;\n ctx.lineWidth = 0.8;\n ctx.stroke();\n }\n\n t += 0.003;\n this._raf = requestAnimationFrame(draw);\n };\n\n this._ro = new ResizeObserver(resize);\n this._ro.observe(host);\n resize();\n draw();\n }\n\n /* ── Canvas: Constellation ── */\n private _initConstellation(canvas: HTMLCanvasElement): void {\n const ctx = canvas.getContext('2d')!;\n const host = (this.renderRoot as ShadowRoot).host as HTMLElement;\n let W = 0, H = 0;\n\n const COUNT = 70;\n type Star = { x:number; y:number; r:number; a:number; pa:number; ps:number; col:number[] };\n let stars: Star[] = [];\n\n const resize = (): void => {\n W = canvas.width = host.clientWidth;\n H = canvas.height = host.clientHeight;\n stars = Array.from({ length: COUNT }, (): Star => ({\n x: Math.random() * W,\n y: Math.random() * H,\n r: Math.random() * 1.2 + 0.2,\n a: Math.random() * 0.5 + 0.1,\n pa: Math.random() * Math.PI * 2,\n ps: Math.random() * 0.008 + 0.002,\n col: Math.random() > 0.9\n ? [217, 114, 52]\n : Math.random() > 0.85\n ? [78, 148, 130]\n : [250, 247, 244],\n }));\n };\n\n const draw = (): void => {\n ctx.fillStyle = 'rgba(10,8,6,0.22)';\n ctx.fillRect(0, 0, W, H);\n\n for (let i = 0; i < stars.length; i++) {\n for (let j = i + 1; j < stars.length; j++) {\n // ✅ Fix: destructurar con ! — índices seguros por los límites del bucle\n const si = stars[i]!;\n const sj = stars[j]!;\n const dx = si.x - sj.x;\n const dy = si.y - sj.y;\n const d = Math.sqrt(dx * dx + dy * dy);\n if (d < 110) {\n ctx.beginPath();\n ctx.moveTo(si.x, si.y);\n ctx.lineTo(sj.x, sj.y);\n ctx.strokeStyle = `rgba(250,247,244,${(1 - d / 110) * 0.07})`;\n ctx.lineWidth = 0.6;\n ctx.stroke();\n }\n }\n }\n\n stars.forEach(s => {\n s.pa += s.ps;\n const pulse = Math.sin(s.pa) * 0.3 + 0.7;\n ctx.beginPath();\n ctx.arc(s.x, s.y, s.r * pulse, 0, Math.PI * 2);\n ctx.fillStyle = `rgba(${s.col.join(',')},${s.a * pulse})`;\n ctx.fill();\n if (s.a > 0.4) {\n ctx.beginPath();\n ctx.arc(s.x, s.y, s.r * 3 * pulse, 0, Math.PI * 2);\n ctx.fillStyle = `rgba(${s.col.join(',')},${s.a * 0.06 * pulse})`;\n ctx.fill();\n }\n });\n\n this._raf = requestAnimationFrame(draw);\n };\n\n this._ro = new ResizeObserver(resize);\n this._ro.observe(host);\n resize();\n draw();\n }\n\n /* ── Render ── */\n\n protected override render(): TemplateResult {\n return backgroundTemplate({\n variant: this.variant,\n isCanvas: BG_CANVAS_VARIANTS.has(this.variant),\n });\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'lib-background': LibBackground;\n }\n}"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA0BO,IAAM,gBAAN,cAA4B,WAAW;AAAA,EAAvC,cAAA;AAAA,UAAA,GAAA,SAAA;AASL,SAAA,UAAgC;AAGhC,SAAA,SAAS;AAMT,SAAQ,OAAO;AACf,SAAQ,MAA6B;AAAA,EAAA;AAAA;AAAA,EAI5B,uBAA6B;AACpC,UAAM,qBAAA;AACN,SAAK,YAAA;AAAA,EACP;AAAA,EAEmB,QAAQ,SAA0C;AACnE,QAAI,QAAQ,IAAI,SAAS,GAAG;AAC1B,WAAK,YAAA;AACL,UAAI,mBAAmB,IAAI,KAAK,OAAO,GAAG;AAExC,8BAAsB,MAAY,KAAK,cAAc;AAAA,MACvD;AAAA,IACF;AAAA,EACF;AAAA;AAAA,EAIQ,cAAoB;AAC1B,QAAI,KAAK,MAAM;AAAE,2BAAqB,KAAK,IAAI;AAAG,WAAK,OAAO;AAAA,IAAG;AACjE,QAAI,KAAK,KAAM;AAAE,WAAK,IAAI,WAAA;AAAc,WAAK,MAAM;AAAA,IAAM;AAAA,EAC3D;AAAA,EAEQ,eAAqB;AAC3B,UAAM,SAAS,KAAK;AACpB,QAAI,CAAC,OAAQ;AAEb,YAAQ,KAAK,SAAA;AAAA,MACX,KAAK;AAAiB,aAAK,eAAe,MAAM;AAAO;AAAA,MACvD,KAAK;AAAiB,aAAK,UAAU,MAAM;AAAa;AAAA,MACxD,KAA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;AAAA,MACF,CAAC;AAED,WAAK,OAAO,sBAAsB,IAAI;AAAA,IACxC;AAEA,SAAK,MAAM,IAAI,eAAe,MAAM;AACpC,SAAK,IAAI,QAAQ,IAAI;AACrB,WAAA;AACA,SAAA;AAAA,EACF;AAAA;AAAA,EAImB,SAAyB;AAC1C,WAAO,mBAAmB;AAAA,MACxB,SAAU,KAAK;AAAA,MACf,UAAU,mBAAmB,IAAI,KAAK,OAAO;AAAA,IAAA,CAC9C;AAAA,EACH;AACF;AApca,cACK,SAAS;AAAA,EACvB,MAAM,UAAU,YAAY,CAAC;AAAA,EAC7B,MAAM,UAAU,aAAa,CAAC;AAChC;AAKA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,SAAS,MAAM;AAAA,GAR9B,cASX,WAAA,WAAA,CAAA;AAGA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM;AAAA,GAX/B,cAYX,WAAA,UAAA,CAAA;AAIqC,gBAAA;AAAA,EAApC,MAAM,YAAY;AAAA,GAhBR,cAgB0B,WAAA,WAAA,CAAA;AAhB1B,gBAAN,gBAAA;AAAA,EADN,cAAc,gBAAgB;AAAA,GAClB,aAAA;"}
|
|
1
|
+
{"version":3,"file":"index40.js","sources":["../src/components/atoms/spacer/lib-spacer.component.ts"],"sourcesContent":["// lib-spacer.component.ts\nimport { LitElement, html, css, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styleMap } from 'lit/directives/style-map.js';\n\n@customElement('lib-spacer')\nexport class LibSpacer extends LitElement {\n @property({ type: String }) size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' = 'md';\n @property({ type: Boolean, reflect: true }) horizontal = false;\n\n static override styles = css`\n :host {\n display: block;\n flex-shrink: 0;\n flex-grow: 0;\n }\n :host([horizontal]) {\n display: inline-block;\n }\n `;\n\n protected override render():TemplateResult {\n // MAPEADO EXACTO A TUS TOKENS DE tokens.css\n const spaceValue = `var(--lib-space-${this.size}, 16px)`;\n \n const styles = this.horizontal \n ? { width: spaceValue, height: '100%' } \n : { height: spaceValue, width: '100%' };\n\n return html`<div style=${styleMap(styles)}></div>`;\n }\n}"],"names":["styleMap"],"mappings":";;;;;;;;;;;;;AAMO,IAAM,YAAN,cAAwB,WAAW;AAAA,EAAnC,cAAA;AAAA,UAAA,GAAA,SAAA;AACuB,SAAA,OAAyC;AACzB,SAAA,aAAa;AAAA,EAAA;AAAA,EAatC,SAAwB;AAEzC,UAAM,aAAa,mBAAmB,KAAK,IAAI;AAE/C,UAAM,SAAS,KAAK,aAChB,EAAE,OAAO,YAAY,QAAQ,OAAA,IAC7B,EAAE,QAAQ,YAAY,OAAO,OAAA;AAEjC,WAAO,kBAAkBA,EAAS,MAAM,CAAC;AAAA,EAC3C;AACF;AAzBa,UAIK,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAHG,gBAAA;AAAA,EAA3B,SAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GADf,UACiB,WAAA,QAAA,CAAA;AACgB,gBAAA;AAAA,EAA3C,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM;AAAA,GAF/B,UAEiC,WAAA,cAAA,CAAA;AAFjC,YAAN,gBAAA;AAAA,EADN,cAAc,YAAY;AAAA,GACd,SAAA;"}
|
package/dist/index41.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { unsafeCSS, css, LitElement } from "lit";
|
|
2
|
-
import { property,
|
|
3
|
-
import { burgerTemplate } from "./index268.js";
|
|
4
|
-
import burgerCss from "./index269.js";
|
|
2
|
+
import { property, customElement } from "lit/decorators.js";
|
|
5
3
|
import sharedTokens from "./index196.js";
|
|
4
|
+
import spinnerCss from "./index336.js";
|
|
5
|
+
import { spinnerTemplate } from "./index337.js";
|
|
6
6
|
var __defProp = Object.defineProperty;
|
|
7
7
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
8
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -13,97 +13,48 @@ 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 LibSpinner = class extends LitElement {
|
|
17
17
|
constructor() {
|
|
18
18
|
super(...arguments);
|
|
19
|
-
this.variant = "
|
|
19
|
+
this.variant = "enso";
|
|
20
20
|
this.size = "md";
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
23
|
-
this.
|
|
24
|
-
this.ariaLabel = "Menú";
|
|
25
|
-
this._labelText = "";
|
|
26
|
-
this._scrambleTimer = 0;
|
|
27
|
-
}
|
|
28
|
-
connectedCallback() {
|
|
29
|
-
super.connectedCallback();
|
|
30
|
-
this._labelText = this.label;
|
|
31
|
-
}
|
|
32
|
-
updated(changed) {
|
|
33
|
-
if (changed.has("open") && this.label) {
|
|
34
|
-
this._labelText = this.open ? this.labelOpen : this.label;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
disconnectedCallback() {
|
|
38
|
-
super.disconnectedCallback();
|
|
39
|
-
clearTimeout(this._scrambleTimer);
|
|
40
|
-
}
|
|
41
|
-
/* ── Toggle principal ── */
|
|
42
|
-
_handleClick() {
|
|
43
|
-
if (this.variant === "glitch") {
|
|
44
|
-
this._glitchToggle();
|
|
45
|
-
} else {
|
|
46
|
-
this._toggle();
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
_toggle() {
|
|
50
|
-
this.open = !this.open;
|
|
51
|
-
this._emit();
|
|
52
|
-
}
|
|
53
|
-
/* Glitch: scramble 320ms antes de resolver */
|
|
54
|
-
_glitchToggle() {
|
|
55
|
-
const btn = this._btn;
|
|
56
|
-
if (!btn) return;
|
|
57
|
-
btn.classList.add("is-scrambling");
|
|
58
|
-
clearTimeout(this._scrambleTimer);
|
|
59
|
-
this._scrambleTimer = window.setTimeout(() => {
|
|
60
|
-
btn.classList.remove("is-scrambling");
|
|
61
|
-
this._toggle();
|
|
62
|
-
}, 340);
|
|
63
|
-
}
|
|
64
|
-
_emit() {
|
|
65
|
-
this.dispatchEvent(new CustomEvent("ui-lib-burger-change", {
|
|
66
|
-
detail: { open: this.open },
|
|
67
|
-
bubbles: true,
|
|
68
|
-
composed: true
|
|
69
|
-
}));
|
|
21
|
+
this.tone = "ink";
|
|
22
|
+
this.dark = false;
|
|
23
|
+
this.label = "Cargando";
|
|
70
24
|
}
|
|
71
25
|
render() {
|
|
72
|
-
return
|
|
26
|
+
return spinnerTemplate({
|
|
27
|
+
variant: this.variant,
|
|
28
|
+
size: this.size,
|
|
29
|
+
tone: this.tone,
|
|
30
|
+
dark: this.dark,
|
|
31
|
+
label: this.label
|
|
32
|
+
});
|
|
73
33
|
}
|
|
74
34
|
};
|
|
75
|
-
|
|
35
|
+
LibSpinner.styles = [
|
|
76
36
|
css`${unsafeCSS(sharedTokens)}`,
|
|
77
|
-
css`${unsafeCSS(
|
|
37
|
+
css`${unsafeCSS(spinnerCss)}`
|
|
78
38
|
];
|
|
79
39
|
__decorateClass([
|
|
80
40
|
property({ type: String, reflect: true })
|
|
81
|
-
],
|
|
41
|
+
], LibSpinner.prototype, "variant", 2);
|
|
82
42
|
__decorateClass([
|
|
83
43
|
property({ type: String, reflect: true })
|
|
84
|
-
],
|
|
44
|
+
], LibSpinner.prototype, "size", 2);
|
|
45
|
+
__decorateClass([
|
|
46
|
+
property({ type: String, reflect: true })
|
|
47
|
+
], LibSpinner.prototype, "tone", 2);
|
|
85
48
|
__decorateClass([
|
|
86
49
|
property({ type: Boolean, reflect: true })
|
|
87
|
-
],
|
|
50
|
+
], LibSpinner.prototype, "dark", 2);
|
|
88
51
|
__decorateClass([
|
|
89
52
|
property({ type: String })
|
|
90
|
-
],
|
|
91
|
-
__decorateClass([
|
|
92
|
-
|
|
93
|
-
],
|
|
94
|
-
__decorateClass([
|
|
95
|
-
property({ type: String, attribute: "aria-label" })
|
|
96
|
-
], LibBurger.prototype, "ariaLabel", 2);
|
|
97
|
-
__decorateClass([
|
|
98
|
-
state()
|
|
99
|
-
], LibBurger.prototype, "_labelText", 2);
|
|
100
|
-
__decorateClass([
|
|
101
|
-
query(".burger")
|
|
102
|
-
], LibBurger.prototype, "_btn", 2);
|
|
103
|
-
LibBurger = __decorateClass([
|
|
104
|
-
customElement("lib-burger")
|
|
105
|
-
], LibBurger);
|
|
53
|
+
], LibSpinner.prototype, "label", 2);
|
|
54
|
+
LibSpinner = __decorateClass([
|
|
55
|
+
customElement("lib-spinner")
|
|
56
|
+
], LibSpinner);
|
|
106
57
|
export {
|
|
107
|
-
|
|
58
|
+
LibSpinner
|
|
108
59
|
};
|
|
109
60
|
//# sourceMappingURL=index41.js.map
|
package/dist/index41.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index41.js","sources":["../src/components/atoms/
|
|
1
|
+
{"version":3,"file":"index41.js","sources":["../src/components/atoms/spinner/lib-spinner.component.ts"],"sourcesContent":["import { LitElement, css, unsafeCSS, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport sharedTokens from '../../../styles/shared/tokens.css?inline';\nimport spinnerCss from './lib-spinner.css?inline';\nimport { spinnerTemplate } from './lib-spinner.html';\n\n/* ── Tipos públicos ─────────────────────────────────────────── */\n\n/**\n * Variante visual.\n * - `enso` — trazo de pincel zen (SVG doble capa).\n * - `sumi` — tinta disolviéndose en agua (conic-gradient).\n * - `kintsugi` — anillo dorado con halo de polvo de oro.\n * - `shizuku` — gotas en órbita decreciente.\n */\nexport type SpinnerVariant = 'enso' | 'sumi' | 'kintsugi' | 'shizuku';\n\n/** Tamaño del spinner. */\nexport type SpinnerSize = 'sm' | 'md' | 'lg';\n\n/**\n * Tono de color.\n * Afecta a `enso` (stroke) y `sumi` (gradiente).\n * En `shizuku`, `tone=\"kaki\"` equivale a `dark`.\n * No tiene efecto sobre `kintsugi` (siempre oro).\n */\nexport type SpinnerTone = 'ink' | 'kaki' | 'celadon';\n\n/**\n * @element lib-spinner\n *\n * @prop {SpinnerVariant} variant - Variante visual (default: enso).\n * @prop {SpinnerSize} size - Tamaño sm | md | lg (default: md).\n * @prop {SpinnerTone} tone - Tono de color (default: ink).\n * @prop {boolean} dark - Optimiza colores para fondos oscuros.\n * @prop {string} label - Texto accesible (default: 'Cargando').\n *\n * @csspart status - El div[role=status] raíz.\n */\n@customElement('lib-spinner')\nexport class LibSpinner extends LitElement {\n static override styles = [\n css`${unsafeCSS(sharedTokens)}`,\n css`${unsafeCSS(spinnerCss)}`,\n ];\n\n @property({ type: String, reflect: true })\n variant: SpinnerVariant = 'enso';\n\n @property({ type: String, reflect: true })\n size: SpinnerSize = 'md';\n\n @property({ type: String, reflect: true })\n tone: SpinnerTone = 'ink';\n\n @property({ type: Boolean, reflect: true })\n dark: boolean = false;\n\n @property({ type: String })\n label: string = 'Cargando';\n\n override render(): TemplateResult {\n return spinnerTemplate({\n variant: this.variant,\n size: this.size,\n tone: this.tone,\n dark: this.dark,\n label: this.label,\n });\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'lib-spinner': LibSpinner;\n }\n}"],"names":[],"mappings":";;;;;;;;;;;;;;;AAwCO,IAAM,aAAN,cAAyB,WAAW;AAAA,EAApC,cAAA;AAAA,UAAA,GAAA,SAAA;AAOL,SAAA,UAA0B;AAG1B,SAAA,OAAoB;AAGpB,SAAA,OAAoB;AAGpB,SAAA,OAAgB;AAGhB,SAAA,QAAgB;AAAA,EAAA;AAAA,EAEP,SAAyB;AAChC,WAAO,gBAAgB;AAAA,MACrB,SAAS,KAAK;AAAA,MACd,MAAS,KAAK;AAAA,MACd,MAAS,KAAK;AAAA,MACd,MAAS,KAAK;AAAA,MACd,OAAS,KAAK;AAAA,IAAA,CACf;AAAA,EACH;AACF;AA9Ba,WACK,SAAS;AAAA,EACvB,MAAM,UAAU,YAAY,CAAC;AAAA,EAC7B,MAAM,UAAU,UAAU,CAAC;AAC7B;AAGA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,SAAS,MAAM;AAAA,GAN9B,WAOX,WAAA,WAAA,CAAA;AAGA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,SAAS,MAAM;AAAA,GAT9B,WAUX,WAAA,QAAA,CAAA;AAGA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,SAAS,MAAM;AAAA,GAZ9B,WAaX,WAAA,QAAA,CAAA;AAGA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM;AAAA,GAf/B,WAgBX,WAAA,QAAA,CAAA;AAGA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAlBf,WAmBX,WAAA,SAAA,CAAA;AAnBW,aAAN,gBAAA;AAAA,EADN,cAAc,aAAa;AAAA,GACf,UAAA;"}
|
package/dist/index42.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { unsafeCSS, css, LitElement } from "lit";
|
|
2
2
|
import { property, customElement } from "lit/decorators.js";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
3
|
+
import { statusDotTemplate } from "./index338.js";
|
|
4
|
+
import statusDotCss from "./index339.js";
|
|
5
5
|
import sharedTokens from "./index196.js";
|
|
6
6
|
var __defProp = Object.defineProperty;
|
|
7
7
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -13,46 +13,43 @@ 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 LibStatusDot = class extends LitElement {
|
|
17
17
|
constructor() {
|
|
18
18
|
super(...arguments);
|
|
19
|
-
this.
|
|
20
|
-
this.line = "left";
|
|
19
|
+
this.status = "offline";
|
|
21
20
|
this.size = "md";
|
|
22
|
-
this.
|
|
23
|
-
this.
|
|
24
|
-
this.num = "";
|
|
21
|
+
this.bordered = false;
|
|
22
|
+
this.label = false;
|
|
25
23
|
}
|
|
26
24
|
render() {
|
|
27
|
-
return
|
|
25
|
+
return statusDotTemplate({
|
|
26
|
+
status: this.status,
|
|
27
|
+
size: this.size,
|
|
28
|
+
bordered: this.bordered,
|
|
29
|
+
label: this.label
|
|
30
|
+
});
|
|
28
31
|
}
|
|
29
32
|
};
|
|
30
|
-
|
|
33
|
+
LibStatusDot.styles = [
|
|
31
34
|
css`${unsafeCSS(sharedTokens)}`,
|
|
32
|
-
css`${unsafeCSS(
|
|
35
|
+
css`${unsafeCSS(statusDotCss)}`
|
|
33
36
|
];
|
|
34
37
|
__decorateClass([
|
|
35
38
|
property({ type: String, reflect: true })
|
|
36
|
-
],
|
|
39
|
+
], LibStatusDot.prototype, "status", 2);
|
|
37
40
|
__decorateClass([
|
|
38
41
|
property({ type: String, reflect: true })
|
|
39
|
-
],
|
|
40
|
-
__decorateClass([
|
|
41
|
-
property({ type: String, reflect: true })
|
|
42
|
-
], LibEyebrow.prototype, "size", 2);
|
|
43
|
-
__decorateClass([
|
|
44
|
-
property({ type: String, reflect: true })
|
|
45
|
-
], LibEyebrow.prototype, "effect", 2);
|
|
42
|
+
], LibStatusDot.prototype, "size", 2);
|
|
46
43
|
__decorateClass([
|
|
47
44
|
property({ type: Boolean, reflect: true })
|
|
48
|
-
],
|
|
45
|
+
], LibStatusDot.prototype, "bordered", 2);
|
|
49
46
|
__decorateClass([
|
|
50
|
-
property({ type:
|
|
51
|
-
],
|
|
52
|
-
|
|
53
|
-
customElement("lib-
|
|
54
|
-
],
|
|
47
|
+
property({ type: Boolean, reflect: true })
|
|
48
|
+
], LibStatusDot.prototype, "label", 2);
|
|
49
|
+
LibStatusDot = __decorateClass([
|
|
50
|
+
customElement("lib-status-dot")
|
|
51
|
+
], LibStatusDot);
|
|
55
52
|
export {
|
|
56
|
-
|
|
53
|
+
LibStatusDot
|
|
57
54
|
};
|
|
58
55
|
//# sourceMappingURL=index42.js.map
|
package/dist/index42.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index42.js","sources":["../src/components/atoms/
|
|
1
|
+
{"version":3,"file":"index42.js","sources":["../src/components/atoms/status-dot/lib-status-dot.component.ts"],"sourcesContent":["import { LitElement, css, unsafeCSS, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport type { LibStatusDotStatus, LibStatusDotSize } from './lib-status-dot.html';\nimport { statusDotTemplate } from './lib-status-dot.html';\nimport statusDotCss from './lib-status-dot.css?inline';\nimport sharedTokens from '../../../styles/shared/tokens.css?inline';\n\n/**\n * @element lib-status-dot\n *\n * Indicador de presencia con animación semántica por estado.\n * Cada estado tiene su propio ritmo extraído de conceptos japoneses:\n * - 水 mizu : online — doble onda concéntrica (2.6s)\n * - 息 iki : away — respiración scale+opacity (3s)\n * - 速い hayai : busy — parpadeo asimétrico (1.1s)\n * - 間 ma : offline — quietud total, sin movimiento\n *\n * @example — uso básico\n * <lib-status-dot status=\"online\"></lib-status-dot>\n *\n * @example — con label inline\n * <lib-status-dot status=\"away\" label></lib-status-dot>\n *\n * @example — sobre avatar (borde blanco)\n * <lib-status-dot status=\"busy\" size=\"md\" bordered></lib-status-dot>\n *\n * @example — tamaño grande en dashboard\n * <lib-status-dot status=\"online\" size=\"lg\"></lib-status-dot>\n */\n@customElement('lib-status-dot')\nexport class LibStatusDot extends LitElement {\n static override styles = [\n css`${unsafeCSS(sharedTokens)}`,\n css`${unsafeCSS(statusDotCss)}`,\n ];\n\n /**\n * Estado de presencia.\n * - online : celadón · onda mizu\n * - away : kaki · respiración iki\n * - busy : error · parpadeo hayai\n * - offline : washi-400 · quietud ma\n */\n @property({ type: String, reflect: true })\n status: LibStatusDotStatus = 'offline';\n\n /**\n * Tamaño del punto.\n * - sm : 6px — tablas y listas densas\n * - md : 10px — uso general (default)\n * - lg : 14px — alta visibilidad\n */\n @property({ type: String, reflect: true })\n size: LibStatusDotSize = 'md';\n\n /**\n * Añade un halo blanco (`box-shadow: 0 0 0 2px --bg-elevated`)\n * para separar el punto visualmente cuando se posiciona sobre un avatar.\n */\n @property({ type: Boolean, reflect: true })\n bordered = false;\n\n /**\n * Muestra el texto del estado (Online / Away / Busy / Offline)\n * en línea con el punto. El color hereda el estado activo.\n */\n @property({ type: Boolean, reflect: true })\n label = false;\n\n override render(): TemplateResult {\n return statusDotTemplate({\n status: this.status,\n size: this.size,\n bordered: this.bordered,\n label: this.label,\n });\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'lib-status-dot': LibStatusDot;\n }\n}"],"names":[],"mappings":";;;;;;;;;;;;;;;AA8BO,IAAM,eAAN,cAA2B,WAAW;AAAA,EAAtC,cAAA;AAAA,UAAA,GAAA,SAAA;AAcL,SAAA,SAA6B;AAS7B,SAAA,OAAyB;AAOzB,SAAA,WAAW;AAOX,SAAA,QAAQ;AAAA,EAAA;AAAA,EAEC,SAAyB;AAChC,WAAO,kBAAkB;AAAA,MACvB,QAAU,KAAK;AAAA,MACf,MAAU,KAAK;AAAA,MACf,UAAU,KAAK;AAAA,MACf,OAAU,KAAK;AAAA,IAAA,CAChB;AAAA,EACH;AACF;AA/Ca,aACK,SAAS;AAAA,EACvB,MAAM,UAAU,YAAY,CAAC;AAAA,EAC7B,MAAM,UAAU,YAAY,CAAC;AAC/B;AAUA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,SAAS,MAAM;AAAA,GAb9B,aAcX,WAAA,UAAA,CAAA;AASA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,SAAS,MAAM;AAAA,GAtB9B,aAuBX,WAAA,QAAA,CAAA;AAOA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM;AAAA,GA7B/B,aA8BX,WAAA,YAAA,CAAA;AAOA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM;AAAA,GApC/B,aAqCX,WAAA,SAAA,CAAA;AArCW,eAAN,gBAAA;AAAA,EADN,cAAc,gBAAgB;AAAA,GAClB,YAAA;"}
|
package/dist/index43.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { unsafeCSS, css, LitElement } from "lit";
|
|
2
2
|
import { property, customElement } from "lit/decorators.js";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
3
|
+
import { stepTemplate } from "./index340.js";
|
|
4
|
+
import stepCss from "./index341.js";
|
|
5
5
|
import sharedTokens from "./index196.js";
|
|
6
6
|
var __defProp = Object.defineProperty;
|
|
7
7
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -13,58 +13,61 @@ 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 LibStep = class extends LitElement {
|
|
17
17
|
constructor() {
|
|
18
18
|
super(...arguments);
|
|
19
|
-
this.
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
23
|
-
this.
|
|
19
|
+
this.label = "";
|
|
20
|
+
this.sub = "";
|
|
21
|
+
this.index = 1;
|
|
22
|
+
this.status = "pending";
|
|
23
|
+
this.last = false;
|
|
24
|
+
this.orientation = "horizontal";
|
|
25
|
+
this.variant = "default";
|
|
24
26
|
this.size = "md";
|
|
25
|
-
this.tag = "h2";
|
|
26
|
-
this.centered = false;
|
|
27
|
-
this._animate = false;
|
|
28
27
|
}
|
|
29
28
|
render() {
|
|
30
|
-
return
|
|
29
|
+
return stepTemplate({
|
|
30
|
+
index: this.index,
|
|
31
|
+
status: this.status,
|
|
32
|
+
label: this.label,
|
|
33
|
+
sub: this.sub,
|
|
34
|
+
last: this.last,
|
|
35
|
+
orientation: this.orientation
|
|
36
|
+
});
|
|
31
37
|
}
|
|
32
38
|
};
|
|
33
|
-
|
|
39
|
+
LibStep.styles = [
|
|
34
40
|
css`${unsafeCSS(sharedTokens)}`,
|
|
35
|
-
css`${unsafeCSS(
|
|
41
|
+
css`${unsafeCSS(stepCss)}`
|
|
36
42
|
];
|
|
37
43
|
__decorateClass([
|
|
38
44
|
property({ type: String })
|
|
39
|
-
],
|
|
40
|
-
__decorateClass([
|
|
41
|
-
property({ type: String, attribute: "line2-prefix" })
|
|
42
|
-
], LibDisplayHeading.prototype, "line2Prefix", 2);
|
|
45
|
+
], LibStep.prototype, "label", 2);
|
|
43
46
|
__decorateClass([
|
|
44
47
|
property({ type: String })
|
|
45
|
-
],
|
|
48
|
+
], LibStep.prototype, "sub", 2);
|
|
46
49
|
__decorateClass([
|
|
47
|
-
property({ type:
|
|
48
|
-
],
|
|
50
|
+
property({ type: Number, reflect: true })
|
|
51
|
+
], LibStep.prototype, "index", 2);
|
|
49
52
|
__decorateClass([
|
|
50
53
|
property({ type: String, reflect: true })
|
|
51
|
-
],
|
|
54
|
+
], LibStep.prototype, "status", 2);
|
|
52
55
|
__decorateClass([
|
|
53
|
-
property({ type:
|
|
54
|
-
],
|
|
56
|
+
property({ type: Boolean, reflect: true })
|
|
57
|
+
], LibStep.prototype, "last", 2);
|
|
55
58
|
__decorateClass([
|
|
56
59
|
property({ type: String, reflect: true })
|
|
57
|
-
],
|
|
60
|
+
], LibStep.prototype, "orientation", 2);
|
|
58
61
|
__decorateClass([
|
|
59
|
-
property({ type:
|
|
60
|
-
],
|
|
62
|
+
property({ type: String, reflect: true })
|
|
63
|
+
], LibStep.prototype, "variant", 2);
|
|
61
64
|
__decorateClass([
|
|
62
|
-
property({ type:
|
|
63
|
-
],
|
|
64
|
-
|
|
65
|
-
customElement("lib-
|
|
66
|
-
],
|
|
65
|
+
property({ type: String, reflect: true })
|
|
66
|
+
], LibStep.prototype, "size", 2);
|
|
67
|
+
LibStep = __decorateClass([
|
|
68
|
+
customElement("lib-step")
|
|
69
|
+
], LibStep);
|
|
67
70
|
export {
|
|
68
|
-
|
|
71
|
+
LibStep
|
|
69
72
|
};
|
|
70
73
|
//# sourceMappingURL=index43.js.map
|
package/dist/index43.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index43.js","sources":["../src/components/atoms/
|
|
1
|
+
{"version":3,"file":"index43.js","sources":["../src/components/atoms/step/lib-step.component.ts"],"sourcesContent":["import { LitElement, css, unsafeCSS, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport type {\n LibStepStatus,\n LibStepOrientation,\n LibStepVariant,\n LibStepSize,\n} from './lib-step.types';\nimport { stepTemplate } from './lib-step.html';\nimport stepCss from './lib-step.css?inline';\nimport sharedTokens from '../../../styles/shared/tokens.css?inline';\n\n/**\n * @element lib-step\n *\n * Paso individual del stepper. Diseñado para usarse dentro de `<lib-stepper>`,\n * que inyecta automáticamente `index`, `status`, `last`, `orientation`,\n * `variant` y `size`. El usuario solo necesita declarar `label` y, opcionalmente, `sub`.\n *\n * En modo vertical acepta contenido descriptivo en el slot por defecto.\n *\n * @example — dentro de lib-stepper (uso recomendado)\n * <lib-stepper current=\"2\">\n * <lib-step label=\"Información\" sub=\"Datos personales\"></lib-step>\n * <lib-step label=\"Pago\" sub=\"Método de pago\"></lib-step>\n * <lib-step label=\"Confirmación\"></lib-step>\n * </lib-stepper>\n *\n * @example — vertical con contenido en slot\n * <lib-stepper orientation=\"vertical\">\n * <lib-step label=\"Crea tu cuenta\">\n * Registro completado. Tu correo ha sido verificado.\n * </lib-step>\n * </lib-stepper>\n */\n@customElement('lib-step')\nexport class LibStep extends LitElement {\n static override styles = [\n css`${unsafeCSS(sharedTokens)}`,\n css`${unsafeCSS(stepCss)}`,\n ];\n\n /** Texto principal del paso (requerido por el usuario). */\n @property({ type: String })\n label = '';\n\n /** Texto secundario corto (opcional). */\n @property({ type: String })\n sub = '';\n\n /**\n * Número ordinal del paso.\n * Inyectado automáticamente por lib-stepper.\n */\n @property({ type: Number, reflect: true })\n index = 1;\n\n /**\n * Estado visual del nodo.\n * Inyectado automáticamente por lib-stepper.\n * - pending : por defecto — nodo vacío\n * - active : paso en curso — fondo oscuro + halo\n * - completed : paso superado — checkmark\n * - error : fallo — icono de exclamación\n */\n @property({ type: String, reflect: true })\n status: LibStepStatus = 'pending';\n\n /**\n * Marca el último paso del stepper (no renderiza conector).\n * Inyectado automáticamente por lib-stepper.\n */\n @property({ type: Boolean, reflect: true })\n last = false;\n\n /**\n * Dirección del flujo. Inyectado por lib-stepper.\n */\n @property({ type: String, reflect: true })\n orientation: LibStepOrientation = 'horizontal';\n\n /**\n * Variante visual. Inyectada por lib-stepper.\n * - default : nodo circular washi\n * - minimal : nodo cuadrado kaki\n * - kintsugi : venas doradas sobre superficie oscura\n */\n @property({ type: String, reflect: true })\n variant: LibStepVariant = 'default';\n\n /**\n * Tamaño del nodo. Inyectado por lib-stepper.\n * - sm : 24px\n * - md : 32px (default)\n * - lg : 40px\n */\n @property({ type: String, reflect: true })\n size: LibStepSize = 'md';\n\n override render(): TemplateResult {\n return stepTemplate({\n index: this.index,\n status: this.status,\n label: this.label,\n sub: this.sub,\n last: this.last,\n orientation: this.orientation,\n });\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'lib-step': LibStep;\n }\n}"],"names":[],"mappings":";;;;;;;;;;;;;;;AAoCO,IAAM,UAAN,cAAsB,WAAW;AAAA,EAAjC,cAAA;AAAA,UAAA,GAAA,SAAA;AAQL,SAAA,QAAQ;AAIR,SAAA,MAAM;AAON,SAAA,QAAQ;AAWR,SAAA,SAAwB;AAOxB,SAAA,OAAO;AAMP,SAAA,cAAkC;AASlC,SAAA,UAA0B;AAS1B,SAAA,OAAoB;AAAA,EAAA;AAAA,EAEX,SAAyB;AAChC,WAAO,aAAa;AAAA,MAClB,OAAa,KAAK;AAAA,MAClB,QAAa,KAAK;AAAA,MAClB,OAAa,KAAK;AAAA,MAClB,KAAa,KAAK;AAAA,MAClB,MAAa,KAAK;AAAA,MAClB,aAAa,KAAK;AAAA,IAAA,CACnB;AAAA,EACH;AACF;AAzEa,QACK,SAAS;AAAA,EACvB,MAAM,UAAU,YAAY,CAAC;AAAA,EAC7B,MAAM,UAAU,OAAO,CAAC;AAC1B;AAIA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAPf,QAQX,WAAA,SAAA,CAAA;AAIA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAXf,QAYX,WAAA,OAAA,CAAA;AAOA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,SAAS,MAAM;AAAA,GAlB9B,QAmBX,WAAA,SAAA,CAAA;AAWA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,SAAS,MAAM;AAAA,GA7B9B,QA8BX,WAAA,UAAA,CAAA;AAOA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM;AAAA,GApC/B,QAqCX,WAAA,QAAA,CAAA;AAMA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,SAAS,MAAM;AAAA,GA1C9B,QA2CX,WAAA,eAAA,CAAA;AASA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,SAAS,MAAM;AAAA,GAnD9B,QAoDX,WAAA,WAAA,CAAA;AASA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,SAAS,MAAM;AAAA,GA5D9B,QA6DX,WAAA,QAAA,CAAA;AA7DW,UAAN,gBAAA;AAAA,EADN,cAAc,UAAU;AAAA,GACZ,OAAA;"}
|
package/dist/index44.js
CHANGED
|
@@ -1,32 +1,78 @@
|
|
|
1
|
-
import { unsafeCSS, css, LitElement
|
|
2
|
-
import { customElement } from "lit/decorators.js";
|
|
3
|
-
import
|
|
1
|
+
import { unsafeCSS, css, LitElement } from "lit";
|
|
2
|
+
import { property, customElement } from "lit/decorators.js";
|
|
3
|
+
import { generateUniqueId } from "./index210.js";
|
|
4
|
+
import { switchTemplate } from "./index342.js";
|
|
5
|
+
import switchCss from "./index343.js";
|
|
4
6
|
import sharedTokens from "./index196.js";
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
5
8
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
9
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
7
10
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
8
11
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9
12
|
if (decorator = decorators[i])
|
|
10
|
-
result = decorator(result) || result;
|
|
13
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
14
|
+
if (kind && result) __defProp(target, key, result);
|
|
11
15
|
return result;
|
|
12
16
|
};
|
|
13
|
-
let
|
|
17
|
+
let LibSwitch = class extends LitElement {
|
|
18
|
+
constructor() {
|
|
19
|
+
super();
|
|
20
|
+
this.checked = false;
|
|
21
|
+
this.disabled = false;
|
|
22
|
+
this.variant = "default";
|
|
23
|
+
this.size = "md";
|
|
24
|
+
this.label = "";
|
|
25
|
+
this.sub = "";
|
|
26
|
+
this._switchId = generateUniqueId("lib-switch-");
|
|
27
|
+
}
|
|
14
28
|
render() {
|
|
15
|
-
return
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
29
|
+
return switchTemplate({
|
|
30
|
+
switchId: this._switchId,
|
|
31
|
+
checked: this.checked,
|
|
32
|
+
disabled: this.disabled,
|
|
33
|
+
label: this.label,
|
|
34
|
+
sub: this.sub,
|
|
35
|
+
handleChange: this._handleChange.bind(this)
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
_handleChange(e) {
|
|
39
|
+
const input = e.target;
|
|
40
|
+
this.checked = input.checked;
|
|
41
|
+
this.dispatchEvent(
|
|
42
|
+
new CustomEvent("ui-lib-change", {
|
|
43
|
+
detail: { checked: this.checked },
|
|
44
|
+
bubbles: true,
|
|
45
|
+
composed: true
|
|
46
|
+
})
|
|
47
|
+
);
|
|
20
48
|
}
|
|
21
49
|
};
|
|
22
|
-
|
|
50
|
+
LibSwitch.styles = [
|
|
23
51
|
css`${unsafeCSS(sharedTokens)}`,
|
|
24
|
-
css`${unsafeCSS(
|
|
52
|
+
css`${unsafeCSS(switchCss)}`
|
|
25
53
|
];
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
],
|
|
54
|
+
__decorateClass([
|
|
55
|
+
property({ type: Boolean, reflect: true })
|
|
56
|
+
], LibSwitch.prototype, "checked", 2);
|
|
57
|
+
__decorateClass([
|
|
58
|
+
property({ type: Boolean, reflect: true })
|
|
59
|
+
], LibSwitch.prototype, "disabled", 2);
|
|
60
|
+
__decorateClass([
|
|
61
|
+
property({ type: String, reflect: true })
|
|
62
|
+
], LibSwitch.prototype, "variant", 2);
|
|
63
|
+
__decorateClass([
|
|
64
|
+
property({ type: String, reflect: true })
|
|
65
|
+
], LibSwitch.prototype, "size", 2);
|
|
66
|
+
__decorateClass([
|
|
67
|
+
property({ type: String })
|
|
68
|
+
], LibSwitch.prototype, "label", 2);
|
|
69
|
+
__decorateClass([
|
|
70
|
+
property({ type: String })
|
|
71
|
+
], LibSwitch.prototype, "sub", 2);
|
|
72
|
+
LibSwitch = __decorateClass([
|
|
73
|
+
customElement("lib-switch")
|
|
74
|
+
], LibSwitch);
|
|
29
75
|
export {
|
|
30
|
-
|
|
76
|
+
LibSwitch
|
|
31
77
|
};
|
|
32
78
|
//# sourceMappingURL=index44.js.map
|
package/dist/index44.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index44.js","sources":["../src/components/atoms/
|
|
1
|
+
{"version":3,"file":"index44.js","sources":["../src/components/atoms/switch/lib-switch.component.ts"],"sourcesContent":["import { LitElement, css, unsafeCSS, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { generateUniqueId } from '../../../core/a11y';\nimport type { LibSwitchVariant, LibSwitchSize } from './lib-switch.html';\nimport { switchTemplate } from './lib-switch.html';\nimport switchCss from './lib-switch.css?inline';\nimport sharedTokens from '../../../styles/shared/tokens.css?inline';\n\nexport type { LibSwitchVariant, LibSwitchSize };\n\n/**\n * @element lib-switch\n *\n * Toggle switch con variante kintsugi de acabado premium.\n *\n * @fires ui-lib-change — Emitido al cambiar estado con `{ checked: boolean }`\n *\n * @example — default\n * <lib-switch label=\"Notificaciones\"></lib-switch>\n *\n * @example — con subtítulo\n * <lib-switch label=\"Acceso premium\" sub=\"Funciones exclusivas\" checked></lib-switch>\n *\n * @example — kintsugi (superficie oscura)\n * <lib-switch variant=\"kintsugi\" label=\"Modo ceremonial\" sub=\"Activa el tema kintsugi\"></lib-switch>\n *\n * @example — tamaños\n * <lib-switch size=\"sm\"></lib-switch>\n * <lib-switch size=\"lg\" label=\"Sincronización\"></lib-switch>\n */\n@customElement('lib-switch')\nexport class LibSwitch extends LitElement {\n static override styles = [\n css`${unsafeCSS(sharedTokens)}`,\n css`${unsafeCSS(switchCss)}`,\n ];\n\n private _switchId: string;\n\n constructor() {\n super();\n this._switchId = generateUniqueId('lib-switch-');\n }\n\n /** Estado activo del switch. */\n @property({ type: Boolean, reflect: true })\n checked = false;\n\n /** Deshabilita la interacción. */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Variante visual.\n * - default : track washi, thumb blanco\n * - kintsugi : cerámica oscura, venas doradas, thumb de oro al activar\n */\n @property({ type: String, reflect: true })\n variant: LibSwitchVariant = 'default';\n\n /**\n * Tamaño del switch.\n * - sm : 30×18px · md : 40×24px (default) · lg : 52×30px\n */\n @property({ type: String, reflect: true })\n size: LibSwitchSize = 'md';\n\n /** Texto principal de la etiqueta. */\n @property({ type: String })\n label = '';\n\n /** Texto secundario debajo del label. */\n @property({ type: String })\n sub = '';\n\n override render(): TemplateResult {\n return switchTemplate({\n switchId: this._switchId,\n checked: this.checked,\n disabled: this.disabled,\n label: this.label,\n sub: this.sub,\n handleChange: this._handleChange.bind(this),\n });\n }\n\n private _handleChange(e: Event): void {\n const input = e.target as HTMLInputElement;\n this.checked = input.checked;\n\n this.dispatchEvent(\n new CustomEvent<{ checked: boolean }>('ui-lib-change', {\n detail: { checked: this.checked },\n bubbles: true,\n composed: true,\n })\n );\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'lib-switch': LibSwitch;\n }\n}"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA+BO,IAAM,YAAN,cAAwB,WAAW;AAAA,EAQxC,cAAc;AACZ,UAAA;AAMF,SAAA,UAAU;AAIV,SAAA,WAAW;AAQX,SAAA,UAA4B;AAO5B,SAAA,OAAsB;AAItB,SAAA,QAAQ;AAIR,SAAA,MAAM;AAhCJ,SAAK,YAAY,iBAAiB,aAAa;AAAA,EACjD;AAAA,EAiCS,SAAyB;AAChC,WAAO,eAAe;AAAA,MACpB,UAAc,KAAK;AAAA,MACnB,SAAc,KAAK;AAAA,MACnB,UAAc,KAAK;AAAA,MACnB,OAAc,KAAK;AAAA,MACnB,KAAc,KAAK;AAAA,MACnB,cAAc,KAAK,cAAc,KAAK,IAAI;AAAA,IAAA,CAC3C;AAAA,EACH;AAAA,EAEQ,cAAc,GAAgB;AACpC,UAAM,QAAQ,EAAE;AAChB,SAAK,UAAU,MAAM;AAErB,SAAK;AAAA,MACH,IAAI,YAAkC,iBAAiB;AAAA,QACrD,QAAU,EAAE,SAAS,KAAK,QAAA;AAAA,QAC1B,SAAU;AAAA,QACV,UAAU;AAAA,MAAA,CACX;AAAA,IAAA;AAAA,EAEL;AACF;AAnEa,UACK,SAAS;AAAA,EACvB,MAAM,UAAU,YAAY,CAAC;AAAA,EAC7B,MAAM,UAAU,SAAS,CAAC;AAC5B;AAWA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM;AAAA,GAd/B,UAeX,WAAA,WAAA,CAAA;AAIA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM;AAAA,GAlB/B,UAmBX,WAAA,YAAA,CAAA;AAQA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,SAAS,MAAM;AAA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