@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/index303.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index303.js","sources":["../src/components/molecules/color-picker/lib-color-picker.html.ts"],"sourcesContent":["import { html, nothing, TemplateResult } from 'lit';\nimport type { ColorPickerVariant, ColorInputMode, SwatchRow, SwatchColor } from './lib-color-picker.types';\n\n/* ── Icono ↺ inline para el mode button ── */\nconst ROTATE_SVG = html`<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" stroke=\"currentColor\"\n stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M10 2.5A4.5 4.5 0 1 0 11 6\"/>\n <path d=\"M10 .5v2h2\"/>\n</svg>`;\n\n/* ── Caret-down para trigger ── */\nconst CARET_SVG = html`<svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" fill=\"none\" stroke=\"currentColor\"\n stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M2 4l3 3 3-3\"/>\n</svg>`;\n\n/* ────────────────────────────────────────────\n Interfaces de props para cada sub-sección\n ──────────────────────────────────────────── */\n\nexport interface PickerPanelProps {\n hex: string;\n r: number; g: number; b: number;\n h: number; s: number; l: number;\n alpha: number; // 0–100\n inputMode: ColorInputMode;\n savedColors: string[];\n showAlpha: boolean;\n /** Callbacks */\n onCanvasMousedown: (e: MouseEvent) => void;\n onHueInput: (e: Event) => void;\n onAlphaInput: (e: Event) => void;\n onModeToggle: () => void;\n onHexInput: (e: Event) => void;\n onRgbInput: (rIdx: 0|1|2, e: Event) => void;\n onHslInput: (cIdx: 0|1|2, e: Event) => void;\n onAlphaNumInput: (e: Event) => void;\n onSaveColor: () => void;\n onSavedClick: (hex: string) => void;\n onCancel: () => void;\n onApply: () => void;\n}\n\nexport interface SwatchGridProps {\n rows: SwatchRow[];\n selected: string;\n onSelect: (color: SwatchColor) => void;\n}\n\n/* ────────────────────────────────────────────\n Swatch grid template\n ──────────────────────────────────────────── */\nexport function swatchGridTemplate(props: SwatchGridProps): TemplateResult {\n const { rows, selected, onSelect } = props;\n return html`\n <div class=\"cp-swatches\">\n ${rows.map(row => html`\n <div class=\"cp-swatches-row\">\n <span class=\"cp-swatches-label\">${row.label}</span>\n ${row.colors.map(c => html`\n <div\n class=\"cp-swatch ${c.value.toLowerCase() === selected.toLowerCase() ? 'is-selected' : ''}\"\n style=\"background:${c.value};\"\n data-name=\"${c.name ?? ''}\"\n @click=\"${(): void => onSelect(c)}\"\n role=\"button\"\n aria-label=\"${c.name ?? c.value}\"\n ></div>\n `)}\n </div>\n `)}\n </div>\n `;\n}\n\n/* ────────────────────────────────────────────\n Picker panel template (canvas + sliders + inputs + saved + actions)\n ──────────────────────────────────────────── */\nexport function pickerPanelTemplate(p: PickerPanelProps): TemplateResult {\n const { hex, r, g, b, h, s, l, alpha, inputMode, savedColors, showAlpha } = p;\n\n /* Thumb position: x = saturation %, y = inverted lightness % */\n const thumbX = s;\n const thumbY = 100 - l;\n\n const cssColor = alpha < 100\n ? `rgba(${r},${g},${b},${(alpha / 100).toFixed(2)})`\n : hex;\n\n const alphaGradient =\n `linear-gradient(to right, transparent, hsl(${h},${s}%,${l}%))`;\n\n /* Inputs según el modo */\n const inputsBlock: TemplateResult = inputMode === 'hex'\n ? html`\n <div class=\"cp-input-group\" style=\"flex:3\">\n <input class=\"cp-input\" type=\"text\" .value=\"${hex}\" maxlength=\"7\"\n @input=\"${p.onHexInput}\">\n <span class=\"cp-input-label\">HEX</span>\n </div>\n ${showAlpha ? html`\n <div class=\"cp-input-group\" style=\"flex:1\">\n <input class=\"cp-input\" type=\"number\" .value=\"${String(Math.round(alpha))}\" min=\"0\" max=\"100\"\n @input=\"${p.onAlphaNumInput}\">\n <span class=\"cp-input-label\">A%</span>\n </div>` : nothing}\n `\n : inputMode === 'rgb'\n ? html`\n <div class=\"cp-input-group\" style=\"flex:1\"><input class=\"cp-input\" type=\"number\" .value=\"${String(r)}\" min=\"0\" max=\"255\" @input=\"${(e: Event): void => p.onRgbInput(0, e)}\"><span class=\"cp-input-label\">R</span></div>\n <div class=\"cp-input-group\" style=\"flex:1\"><input class=\"cp-input\" type=\"number\" .value=\"${String(g)}\" min=\"0\" max=\"255\" @input=\"${(e: Event): void => p.onRgbInput(1, e)}\"><span class=\"cp-input-label\">G</span></div>\n <div class=\"cp-input-group\" style=\"flex:1\"><input class=\"cp-input\" type=\"number\" .value=\"${String(b)}\" min=\"0\" max=\"255\" @input=\"${(e: Event): void => p.onRgbInput(2, e)}\"><span class=\"cp-input-label\">B</span></div>\n ${showAlpha ? html`<div class=\"cp-input-group\" style=\"flex:1\"><input class=\"cp-input\" type=\"number\" .value=\"${String(Math.round(alpha))}\" min=\"0\" max=\"100\" @input=\"${p.onAlphaNumInput}\"><span class=\"cp-input-label\">A%</span></div>` : nothing}\n `\n : html`\n <div class=\"cp-input-group\" style=\"flex:1\"><input class=\"cp-input\" type=\"number\" .value=\"${String(h)}\" min=\"0\" max=\"360\" @input=\"${(e: Event): void => p.onHslInput(0, e)}\"><span class=\"cp-input-label\">H</span></div>\n <div class=\"cp-input-group\" style=\"flex:1\"><input class=\"cp-input\" type=\"number\" .value=\"${String(s)}\" min=\"0\" max=\"100\" @input=\"${(e: Event): void => p.onHslInput(1, e)}\"><span class=\"cp-input-label\">S%</span></div>\n <div class=\"cp-input-group\" style=\"flex:1\"><input class=\"cp-input\" type=\"number\" .value=\"${String(l)}\" min=\"0\" max=\"100\" @input=\"${(e: Event): void => p.onHslInput(2, e)}\"><span class=\"cp-input-label\">L%</span></div>\n ${showAlpha ? html`<div class=\"cp-input-group\" style=\"flex:1\"><input class=\"cp-input\" type=\"number\" .value=\"${String(Math.round(alpha))}\" min=\"0\" max=\"100\" @input=\"${p.onAlphaNumInput}\"><span class=\"cp-input-label\">A%</span></div>` : nothing}\n `;\n\n return html`\n <!-- Canvas 2D -->\n <div class=\"cp-canvas\"\n style=\"background: hsl(${h},100%,50%);\"\n @mousedown=\"${p.onCanvasMousedown}\"\n >\n <div class=\"cp-thumb\"\n style=\"left:${thumbX}%;top:${thumbY}%;background:${cssColor};\"\n ></div>\n </div>\n\n <!-- Sliders -->\n <div class=\"cp-sliders\">\n <div class=\"cp-preview-dot\">\n <div class=\"cp-preview-color\" style=\"background:${cssColor};\"></div>\n </div>\n <div class=\"cp-sliders-stack\">\n <input type=\"range\" class=\"cp-range cp-range-hue\"\n min=\"0\" max=\"360\" .value=\"${String(h)}\"\n @input=\"${p.onHueInput}\">\n ${showAlpha ? html`\n <div class=\"cp-alpha-wrap\" style=\"height:10px;\">\n <div class=\"cp-alpha-checker\">\n <input type=\"range\" class=\"cp-range cp-range-alpha\"\n min=\"0\" max=\"100\" .value=\"${String(Math.round(alpha))}\"\n style=\"background:${alphaGradient};\"\n @input=\"${p.onAlphaInput}\">\n </div>\n </div>` : nothing}\n </div>\n </div>\n\n <!-- Inputs -->\n <div class=\"cp-inputs-wrap\">\n <button class=\"cp-mode-btn\" title=\"Cambiar modo\" @click=\"${p.onModeToggle}\">\n ${ROTATE_SVG}\n </button>\n <div style=\"display:flex;gap:var(--lib-space-xs);flex:1;\">\n ${inputsBlock}\n </div>\n </div>\n\n <!-- Saved colors -->\n <div class=\"cp-saved\">\n <span class=\"cp-saved-label\">Guardados</span>\n ${savedColors.map(sc => html`\n <div class=\"cp-swatch cp-swatch-sm\"\n style=\"background:${sc};\"\n data-name=\"${sc}\"\n @click=\"${(): void => p.onSavedClick(sc)}\"\n ></div>\n `)}\n <button class=\"cp-saved-add\" title=\"Guardar color actual\" @click=\"${p.onSaveColor}\">+</button>\n </div>\n\n <!-- Actions -->\n <div class=\"cp-actions\">\n <button class=\"cp-btn cp-btn-cancel\" @click=\"${p.onCancel}\">Cancelar</button>\n <button class=\"cp-btn cp-btn-ok\" @click=\"${p.onApply}\">Aplicar</button>\n </div>\n `;\n}\n\n/* ────────────────────────────────────────────\n Root template — inline vs trigger\n ──────────────────────────────────────────── */\n\nexport interface ColorPickerRootProps extends PickerPanelProps {\n variant: ColorPickerVariant;\n label: string;\n panelOpen: boolean;\n onTriggerClick: () => void;\n}\n\nexport function colorPickerTemplate(props: ColorPickerRootProps): TemplateResult {\n const { variant, /*label,*/ hex, alpha, panelOpen, onTriggerClick } = props;\n\n const panel = html`\n <div class=\"cp ${variant === 'trigger' && panelOpen ? 'is-open' : ''}\">\n ${pickerPanelTemplate(props)}\n </div>\n `;\n\n if (variant === 'inline') {\n return panel;\n }\n\n /* Trigger variant — botón + panel flotante */\n const cssColor = alpha < 100\n ? `rgba(${props.r},${props.g},${props.b},${(alpha / 100).toFixed(2)})`\n : hex;\n\n return html`\n <div class=\"cp-trigger-wrap\">\n <button\n class=\"cp-trigger ${panelOpen ? 'is-open' : ''}\"\n @click=\"${onTriggerClick}\"\n aria-expanded=\"${panelOpen}\"\n aria-haspopup=\"true\"\n >\n <div class=\"cp-trigger-dot\">\n <div class=\"cp-trigger-color\" style=\"background:${cssColor};\"></div>\n </div>\n <span>${hex.toUpperCase()}</span>\n ${CARET_SVG}\n </button>\n ${panel}\n </div>\n `;\n}"],"names":[],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index303.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index304.js
CHANGED
|
@@ -1,46 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
{ value: "#FAF7F4", name: "washi-50" },
|
|
6
|
-
{ value: "#F2EDE6", name: "washi-100" },
|
|
7
|
-
{ value: "#E5DDD3", name: "washi-200" },
|
|
8
|
-
{ value: "#D3C8BC", name: "washi-300" },
|
|
9
|
-
{ value: "#B8A99A", name: "washi-400" },
|
|
10
|
-
{ value: "#9A8878", name: "washi-500" },
|
|
11
|
-
{ value: "#7A6A5C", name: "washi-600" },
|
|
12
|
-
{ value: "#5C4E42", name: "washi-700" },
|
|
13
|
-
{ value: "#3D332A", name: "washi-800" },
|
|
14
|
-
{ value: "#221C16", name: "washi-900" },
|
|
15
|
-
{ value: "#120E0A", name: "washi-950" }
|
|
16
|
-
]
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
label: "kaki",
|
|
20
|
-
colors: [
|
|
21
|
-
{ value: "#FDF3EC", name: "kaki-50" },
|
|
22
|
-
{ value: "#FAE2CC", name: "kaki-100" },
|
|
23
|
-
{ value: "#F5C89A", name: "kaki-200" },
|
|
24
|
-
{ value: "#EBAA66", name: "kaki-300" },
|
|
25
|
-
{ value: "#D97234", name: "kaki-400" },
|
|
26
|
-
{ value: "#B85A1E", name: "kaki-500" },
|
|
27
|
-
{ value: "#8C4115", name: "kaki-600" }
|
|
28
|
-
]
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
label: "celadón",
|
|
32
|
-
colors: [
|
|
33
|
-
{ value: "#EFF5F3", name: "celadon-50" },
|
|
34
|
-
{ value: "#D3E8E1", name: "celadon-100" },
|
|
35
|
-
{ value: "#A8D0C5", name: "celadon-200" },
|
|
36
|
-
{ value: "#76B3A5", name: "celadon-300" },
|
|
37
|
-
{ value: "#4D8E82", name: "celadon-400" },
|
|
38
|
-
{ value: "#357164", name: "celadon-500" },
|
|
39
|
-
{ value: "#245249", name: "celadon-600" }
|
|
40
|
-
]
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
function dividerCenter(props) {
|
|
3
|
+
if (props.ornament === "dot") {
|
|
4
|
+
return html`<span class="dv__ornament dv__ornament--dot"></span>`;
|
|
41
5
|
}
|
|
42
|
-
|
|
6
|
+
if (props.ornament === "diamond") {
|
|
7
|
+
return html`<span class="dv__ornament dv__ornament--diamond"></span>`;
|
|
8
|
+
}
|
|
9
|
+
if (props.hasSlotContent) {
|
|
10
|
+
return html`
|
|
11
|
+
<span class="dv__label dv__label--${props.labelStyle}">
|
|
12
|
+
<slot @slotchange="${props.onSlotChange}"></slot>
|
|
13
|
+
</span>
|
|
14
|
+
`;
|
|
15
|
+
}
|
|
16
|
+
return html`<slot @slotchange="${props.onSlotChange}" style="display:none"></slot>`;
|
|
17
|
+
}
|
|
18
|
+
function dividerTemplate(props) {
|
|
19
|
+
return html`
|
|
20
|
+
<div class="dv">
|
|
21
|
+
<span class="dv__line"></span>
|
|
22
|
+
${dividerCenter(props)}
|
|
23
|
+
<span class="dv__line"></span>
|
|
24
|
+
</div>
|
|
25
|
+
`;
|
|
26
|
+
}
|
|
43
27
|
export {
|
|
44
|
-
|
|
28
|
+
dividerTemplate
|
|
45
29
|
};
|
|
46
30
|
//# sourceMappingURL=index304.js.map
|
package/dist/index304.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index304.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index304.js","sources":["../src/components/atoms/divider/lib-divider.component.html.ts"],"sourcesContent":["import { html, nothing, TemplateResult } from 'lit';\n\nexport type LibDividerStyle = 'hairline' | 'default' | 'strong' | 'heavy' | 'dashed' | 'dotted' | 'gradient';\nexport type LibDividerColor = 'default' | 'kaki' | 'celadon';\nexport type LibDividerAlign = 'left' | 'center' | 'right';\nexport type LibDividerOrnament = 'none' | 'dot' | 'diamond';\nexport type LibDividerLabelStyle = 'mono' | 'display' | 'kanji';\nexport type LibDividerOrientation = 'horizontal' | 'vertical';\n\nexport interface DividerTemplateProps {\n orientation: LibDividerOrientation;\n style: LibDividerStyle;\n color: LibDividerColor;\n align: LibDividerAlign;\n ornament: LibDividerOrnament;\n labelStyle: LibDividerLabelStyle;\n hasSlotContent: boolean;\n onSlotChange: (e: Event) => void;\n}\n\n/**\n * Renderiza el contenido central del divider:\n * - ornament (dot / diamond) si está activo\n * - slot con label si hay contenido slotado\n * - nada si es una línea pura\n *\n * Las dos .dv-line siempre se renderizan.\n * La alineación izquierda/derecha la gestiona CSS via :host([align]).\n */\nfunction dividerCenter(props: DividerTemplateProps): TemplateResult | typeof nothing {\n if (props.ornament === 'dot') {\n return html`<span class=\"dv__ornament dv__ornament--dot\"></span>`;\n }\n if (props.ornament === 'diamond') {\n return html`<span class=\"dv__ornament dv__ornament--diamond\"></span>`;\n }\n if (props.hasSlotContent) {\n return html`\n <span class=\"dv__label dv__label--${props.labelStyle}\">\n <slot @slotchange=\"${props.onSlotChange}\"></slot>\n </span>\n `;\n }\n // Slot vacío — lo mantenemos para detectar cambios futuros\n return html`<slot @slotchange=\"${props.onSlotChange}\" style=\"display:none\"></slot>`;\n}\n\nexport function dividerTemplate(props: DividerTemplateProps): TemplateResult {\n return html`\n <div class=\"dv\">\n <span class=\"dv__line\"></span>\n ${dividerCenter(props)}\n <span class=\"dv__line\"></span>\n </div>\n `;\n}"],"names":[],"mappings":";AA6BA,SAAS,cAAc,OAA8D;AACnF,MAAI,MAAM,aAAa,OAAO;AAC5B,WAAO;AAAA,EACT;AACA,MAAI,MAAM,aAAa,WAAW;AAChC,WAAO;AAAA,EACT;AACA,MAAI,MAAM,gBAAgB;AACxB,WAAO;AAAA,0CAC+B,MAAM,UAAU;AAAA,6BAC7B,MAAM,YAAY;AAAA;AAAA;AAAA,EAG7C;AAEA,SAAO,0BAA0B,MAAM,YAAY;AACrD;AAEO,SAAS,gBAAgB,OAA6C;AAC3E,SAAO;AAAA;AAAA;AAAA,QAGD,cAAc,KAAK,CAAC;AAAA;AAAA;AAAA;AAI5B;"}
|
package/dist/index305.js
CHANGED
|
@@ -1,84 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
const chevronLeft = html`
|
|
3
|
-
<svg viewBox="0 0 256 256" fill="currentColor" aria-hidden="true">
|
|
4
|
-
<path d="M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"/>
|
|
5
|
-
</svg>`;
|
|
6
|
-
const chevronRight = html`
|
|
7
|
-
<svg viewBox="0 0 256 256" fill="currentColor" aria-hidden="true">
|
|
8
|
-
<path d="M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"/>
|
|
9
|
-
</svg>`;
|
|
10
|
-
function buildPageSequence(current, total, siblings) {
|
|
11
|
-
if (total <= 1) return [1];
|
|
12
|
-
const left = Math.max(2, current - siblings);
|
|
13
|
-
const right = Math.min(total - 1, current + siblings);
|
|
14
|
-
const pages = [1];
|
|
15
|
-
if (left > 2) pages.push(null);
|
|
16
|
-
for (let i = left; i <= right; i++) pages.push(i);
|
|
17
|
-
if (right < total - 1) pages.push(null);
|
|
18
|
-
if (total > 1) pages.push(total);
|
|
19
|
-
return pages;
|
|
20
|
-
}
|
|
21
|
-
function paginationTemplate(ctx) {
|
|
22
|
-
const total = ctx.totalPages;
|
|
23
|
-
const current = ctx.currentPage;
|
|
24
|
-
const sequence = buildPageSequence(current, total, ctx.siblings);
|
|
25
|
-
const infoText = ctx.showInfo ? (() => {
|
|
26
|
-
const from = (current - 1) * ctx.itemsPerPage + 1;
|
|
27
|
-
const to = Math.min(current * ctx.itemsPerPage, ctx.totalItems);
|
|
28
|
-
return html`
|
|
29
|
-
<span class="pg-info" part="info">
|
|
30
|
-
${from}–${to} de ${ctx.totalItems}
|
|
31
|
-
</span>`;
|
|
32
|
-
})() : nothing;
|
|
33
|
-
return html`
|
|
34
|
-
<nav class="pg" part="root" aria-label="${ctx.ariaLabel}">
|
|
35
|
-
|
|
36
|
-
${ctx.showInfo ? infoText : nothing}
|
|
37
|
-
|
|
38
|
-
<!-- ← Anterior -->
|
|
39
|
-
<button
|
|
40
|
-
class="pg-btn pg-btn--nav"
|
|
41
|
-
part="btn-prev"
|
|
42
|
-
?disabled="${current === 1}"
|
|
43
|
-
aria-label="Página anterior"
|
|
44
|
-
@click="${() => ctx._changePage(current - 1)}"
|
|
45
|
-
>
|
|
46
|
-
${chevronLeft}
|
|
47
|
-
${ctx.size !== "sm" ? html`<span>Ant</span>` : nothing}
|
|
48
|
-
</button>
|
|
49
|
-
|
|
50
|
-
<!-- Números -->
|
|
51
|
-
<div class="pg-numbers" part="numbers" role="list">
|
|
52
|
-
${sequence.map(
|
|
53
|
-
(page) => page === null ? html`<span class="pg-ellipsis" role="listitem" aria-hidden="true">…</span>` : html`
|
|
54
|
-
<button
|
|
55
|
-
class="pg-btn ${page === current ? "pg-btn--active" : ""}"
|
|
56
|
-
part="btn-page${page === current ? " btn-page-active" : ""}"
|
|
57
|
-
role="listitem"
|
|
58
|
-
aria-label="Página ${page}"
|
|
59
|
-
aria-current="${page === current ? "page" : nothing}"
|
|
60
|
-
?disabled="${page === current}"
|
|
61
|
-
@click="${() => ctx._changePage(page)}"
|
|
62
|
-
>${page}</button>`
|
|
63
|
-
)}
|
|
64
|
-
</div>
|
|
65
|
-
|
|
66
|
-
<!-- → Siguiente -->
|
|
67
|
-
<button
|
|
68
|
-
class="pg-btn pg-btn--nav"
|
|
69
|
-
part="btn-next"
|
|
70
|
-
?disabled="${current === total}"
|
|
71
|
-
aria-label="Página siguiente"
|
|
72
|
-
@click="${() => ctx._changePage(current + 1)}"
|
|
73
|
-
>
|
|
74
|
-
${ctx.size !== "sm" ? html`<span>Sig</span>` : nothing}
|
|
75
|
-
${chevronRight}
|
|
76
|
-
</button>
|
|
77
|
-
|
|
78
|
-
</nav>
|
|
79
|
-
`;
|
|
80
|
-
}
|
|
1
|
+
const dividerCss = '@layer tokens,reset,components;@layer reset{:host{display:block;width:100%}:host([orientation="vertical"]){display:inline-flex;width:auto;height:100%}*,*:before,*:after{box-sizing:border-box}}@layer components{.dv{display:flex;align-items:center;width:100%;gap:var(--lib-space-md)}:host([orientation="vertical"]) .dv{flex-direction:column;width:auto;height:100%;gap:var(--lib-space-sm)}.dv__line{flex:1;min-width:0;min-height:0;height:1px;width:auto;background:var(--border-subtle)}:host([orientation="vertical"]) .dv__line{height:auto;width:1px}:host([style-variant="default"]) .dv__line{background:var(--border-default)}:host([style-variant="strong"]) .dv__line{height:2px;background:var(--border-strong)}:host([style-variant="heavy"]) .dv__line{height:4px;background:var(--color-washi-900)}:host([style-variant="dashed"]) .dv__line{background:none;border-top:1px dashed var(--border-default);height:0}:host([style-variant="dotted"]) .dv__line{background:none;border-top:1px dotted var(--color-washi-400);height:0}:host([style-variant="gradient"]) .dv__line{background:linear-gradient(to right,transparent 0%,var(--border-default) 20%,var(--border-default) 80%,transparent 100%)}:host([orientation="vertical"][style-variant="default"]) .dv__line{background:var(--border-default)}:host([orientation="vertical"][style-variant="strong"]) .dv__line{width:2px;background:var(--border-strong);height:auto}:host([orientation="vertical"][style-variant="dashed"]) .dv__line{background:none;border-left:1px dashed var(--border-default);width:0}:host([orientation="vertical"][style-variant="gradient"]) .dv__line{background:linear-gradient(to bottom,transparent 0%,var(--border-default) 20%,var(--border-default) 80%,transparent 100%)}:host([color="kaki"]) .dv__line{background:var(--color-kaki-500);height:2px}:host([color="celadon"]) .dv__line{background:var(--color-celadon-500);height:2px}:host([align="left"]) .dv__line:first-child{max-width:24px}:host([align="right"]) .dv__line:last-child{max-width:24px}.dv__ornament{flex-shrink:0}.dv__ornament--dot{width:5px;height:5px;border-radius:var(--radius-full);background:var(--color-washi-400)}.dv__ornament--diamond{width:6px;height:6px;background:var(--color-washi-400);transform:rotate(45deg)}:host([color="kaki"]) .dv__ornament{background:var(--color-kaki-500)}:host([color="celadon"]) .dv__ornament{background:var(--color-celadon-500)}.dv__label{flex-shrink:0;white-space:nowrap;line-height:1}.dv__label--mono{font-family:var(--lib-font-mono);font-size:var(--text-xs);letter-spacing:var(--tracking-widest);text-transform:uppercase;color:var(--text-muted)}.dv__label--display{font-family:var(--lib-font-display);font-size:var(--text-xl);font-weight:var(--weight-light);letter-spacing:var(--tracking-tight);color:var(--text-secondary);text-transform:none;font-style:italic}.dv__label--kanji{font-family:var(--lib-font-display);font-size:1.25rem;color:var(--color-washi-300);line-height:1;text-transform:none}:host([color="kaki"]) .dv__label--mono{color:var(--color-kaki-500)}}';
|
|
81
2
|
export {
|
|
82
|
-
|
|
3
|
+
dividerCss as default
|
|
83
4
|
};
|
|
84
5
|
//# sourceMappingURL=index305.js.map
|
package/dist/index305.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index305.js","sources":[
|
|
1
|
+
{"version":3,"file":"index305.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index306.js
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import { nothing, html } from "lit";
|
|
2
|
+
function renderEyebrow(ctx) {
|
|
3
|
+
return html`
|
|
4
|
+
<span class="eb" part="base">
|
|
5
|
+
<slot></slot>
|
|
6
|
+
${ctx.num ? html`<span class="eb-num-badge" part="badge">${ctx.num}</span>` : nothing}
|
|
7
|
+
</span>
|
|
8
|
+
`;
|
|
9
|
+
}
|
|
2
10
|
export {
|
|
3
|
-
|
|
11
|
+
renderEyebrow
|
|
4
12
|
};
|
|
5
13
|
//# sourceMappingURL=index306.js.map
|
package/dist/index306.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index306.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"index306.js","sources":["../src/components/atoms/eyebrow/lib-eyebrow.html.ts"],"sourcesContent":["import { html, type TemplateResult, nothing } from 'lit';\nimport type { LibEyebrow } from './lib-eyebrow.component';\n\nexport function renderEyebrow(ctx: LibEyebrow): TemplateResult {\n return html`\n <span class=\"eb\" part=\"base\">\n <slot></slot>\n ${ctx.num\n ? html`<span class=\"eb-num-badge\" part=\"badge\">${ctx.num}</span>`\n : nothing\n }\n </span>\n `;\n}"],"names":[],"mappings":";AAGO,SAAS,cAAc,KAAiC;AAC7D,SAAO;AAAA;AAAA;AAAA,QAGD,IAAI,MACF,+CAA+C,IAAI,GAAG,YACtD,OACJ;AAAA;AAAA;AAGN;"}
|
package/dist/index307.js
CHANGED
|
@@ -1,74 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { unsafeHTML as o } from "./index357.js";
|
|
3
|
-
function renderBadge(item) {
|
|
4
|
-
return item.badge != null ? html`<span class="tb-badge">${item.badge}</span>` : nothing;
|
|
5
|
-
}
|
|
6
|
-
function renderTab(item, context) {
|
|
7
|
-
const isActive = context.active === item.id;
|
|
8
|
-
const isDisabled = item.disabled === true;
|
|
9
|
-
return html`
|
|
10
|
-
${item.group ? html`<div class="tb-label">${item.group}</div>` : nothing}
|
|
11
|
-
<button
|
|
12
|
-
id="tab-${item.id}"
|
|
13
|
-
class="tb-tab ${isActive ? "is-active" : ""} ${isDisabled ? "is-disabled" : ""}"
|
|
14
|
-
role="tab"
|
|
15
|
-
aria-selected="${isActive}"
|
|
16
|
-
aria-controls="panel-${item.id}"
|
|
17
|
-
tabindex="${isActive ? "0" : "-1"}"
|
|
18
|
-
data-id="${item.id}"
|
|
19
|
-
data-label="${item.label}"
|
|
20
|
-
?disabled="${isDisabled}"
|
|
21
|
-
@click="${(e) => context._handleClick(e)}"
|
|
22
|
-
>
|
|
23
|
-
${item.icon ? html`${o(item.icon)}` : nothing}
|
|
24
|
-
${item.label}
|
|
25
|
-
${renderBadge(item)}
|
|
26
|
-
</button>
|
|
27
|
-
`;
|
|
28
|
-
}
|
|
29
|
-
function renderPanel(item, context) {
|
|
30
|
-
const isActive = context.active === item.id;
|
|
31
|
-
return html`
|
|
32
|
-
<div
|
|
33
|
-
class="tb-panel ${isActive ? "is-active" : ""}"
|
|
34
|
-
role="tabpanel"
|
|
35
|
-
id="panel-${item.id}"
|
|
36
|
-
aria-labelledby="tab-${item.id}"
|
|
37
|
-
>
|
|
38
|
-
<slot name="${item.id}"></slot>
|
|
39
|
-
</div>
|
|
40
|
-
`;
|
|
41
|
-
}
|
|
42
|
-
function tabsTemplate(context) {
|
|
43
|
-
const tabs = context.items ?? [];
|
|
44
|
-
const showInk = !["pill", "card", "outline", "vertical"].includes(context.variant);
|
|
45
|
-
return html`
|
|
46
|
-
<div class="tb" part="root">
|
|
47
|
-
|
|
48
|
-
<!-- Tab list -->
|
|
49
|
-
<div
|
|
50
|
-
class="tb-list"
|
|
51
|
-
part="list"
|
|
52
|
-
role="tablist"
|
|
53
|
-
aria-label="${context.ariaLabel || nothing}"
|
|
54
|
-
|
|
55
|
-
@keydown="${(e) => context._handleKey(e)}"
|
|
56
|
-
>
|
|
57
|
-
${tabs.map((item) => renderTab(item, context))}
|
|
58
|
-
</div>
|
|
59
|
-
|
|
60
|
-
<!-- Ink bar (posicionada por JS, solo para variantes underline) -->
|
|
61
|
-
${showInk ? html`<div class="tb-ink" part="ink" style="left:${context._inkLeft}px;width:${context._inkWidth}px;"></div>` : nothing}
|
|
62
|
-
|
|
63
|
-
<!-- Panels -->
|
|
64
|
-
<div class="tb-panels" part="panels">
|
|
65
|
-
${tabs.map((item) => renderPanel(item, context))}
|
|
66
|
-
</div>
|
|
67
|
-
|
|
68
|
-
</div>
|
|
69
|
-
`;
|
|
70
|
-
}
|
|
1
|
+
const componentCss = '@layer tokens,reset,components;@layer tokens{:host{--eb-font: var(--lib-font-mono, "DM Mono", "Courier New", monospace);--eb-size: .65rem;--eb-tracking: .24em;--eb-color: rgb(184, 90, 30, .55);--eb-line-w: 28px;--eb-line-w-hover: 40px;--eb-line-grad: linear-gradient(90deg, var(--color-kaki-400, #D97234), transparent);--eb-line-grad-r: linear-gradient(270deg, var(--color-kaki-400, #D97234), transparent);--eb-dot-size: 5px;--eb-dot-color: var(--color-kaki-400, #D97234);--eb-num-color: rgb(184, 90, 30, .3);--eb-num-border: rgb(184, 90, 30, .18);--eb-dur-slow: .38s;--eb-ease-out: cubic-bezier(0, 0, .2, 1)}}@layer reset{*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}}@layer components{:host{display:inline-flex}.eb{display:inline-flex;align-items:center;gap:.7rem;font-family:var(--eb-font);font-size:var(--eb-size);letter-spacing:var(--eb-tracking);text-transform:uppercase;line-height:1;white-space:nowrap;color:var(--eb-color)}.eb:before{content:"";display:block;width:var(--eb-line-w);height:1px;flex-shrink:0;background:var(--eb-line-grad);transition:width var(--eb-dur-slow) var(--eb-ease-out)}.eb:hover:before{width:var(--eb-line-w-hover)}:host([line="right"]) .eb{flex-direction:row-reverse}:host([line="right"]) .eb:before{background:var(--eb-line-grad-r)}:host([line="both"]) .eb:after{content:"";display:block;width:var(--eb-line-w);height:1px;flex-shrink:0;background:var(--eb-line-grad-r);transition:width var(--eb-dur-slow) var(--eb-ease-out)}:host([line="both"]) .eb:hover:after{width:var(--eb-line-w-hover)}:host([line="none"]) .eb:before,:host([line="none"]) .eb:after{display:none}:host([color="washi"]) .eb{--eb-color: var(--color-washi-400, #B8A99A);--eb-line-grad: linear-gradient(90deg, var(--color-washi-400, #B8A99A), transparent);--eb-line-grad-r: linear-gradient(270deg, var(--color-washi-400, #B8A99A), transparent)}:host([color="celadon"]) .eb{--eb-color: rgb(78, 148, 130, .6);--eb-line-grad: linear-gradient(90deg, var(--color-celadon-400, #4E9482), transparent);--eb-line-grad-r: linear-gradient(270deg, var(--color-celadon-400, #4E9482), transparent)}:host([color="white"]) .eb{--eb-color: rgb(250, 247, 244, .35);--eb-line-grad: linear-gradient(90deg, rgb(250, 247, 244, .4), transparent);--eb-line-grad-r: linear-gradient(270deg, rgb(250, 247, 244, .4), transparent)}:host([color="muted"]) .eb{--eb-color: rgb(250, 247, 244, .15);--eb-line-grad: linear-gradient(90deg, rgb(250, 247, 244, .15), transparent);--eb-line-grad-r: linear-gradient(270deg, rgb(250, 247, 244, .15), transparent)}:host([color="dark"]) .eb{--eb-color: rgb(184, 90, 30, .45);--eb-line-grad: linear-gradient(90deg, rgb(184, 90, 30, .5), transparent);--eb-line-grad-r: linear-gradient(270deg, rgb(184, 90, 30, .5), transparent)}:host([size="sm"]) .eb{--eb-size: .58rem;--eb-tracking: .18em;--eb-line-w: 20px}:host([size="lg"]) .eb{--eb-size: .75rem;--eb-tracking: .2em;--eb-line-w: 36px}:host([dot]) .eb:before{width:var(--eb-dot-size)!important;height:var(--eb-dot-size);border-radius:50%;background:var(--eb-dot-color)!important;animation:none!important}:host([dot][color="celadon"]) .eb:before{--eb-dot-color: var(--color-celadon-400, #4E9482)}:host([dot][color="washi"]) .eb:before{--eb-dot-color: var(--color-washi-400, #B8A99A)}:host([dot][color="white"]) .eb:before{--eb-dot-color: rgb(250, 247, 244, .4)}:host([dot]) .eb:hover:before{width:var(--eb-dot-size)!important}.eb-num-badge{display:inline-block;font-family:var(--eb-font);font-size:.58rem;letter-spacing:.12em;color:var(--eb-num-color);border:1px solid var(--eb-num-border);padding:0 5px;line-height:1.6;flex-shrink:0}@keyframes eb-gold{0%{background-position:-200% 0}to{background-position:200% 0}}:host([effect="kintsugi"]) .eb{background:linear-gradient(90deg,var(--color-kaki-600, #8C4115),#F5D08A,var(--color-kaki-400, #D97234),#F5D08A,var(--color-kaki-600, #8C4115));background-size:200% 100%;animation:eb-gold 4s linear infinite;-webkit-text-fill-color:transparent;-webkit-background-clip:text;background-clip:text;color:transparent}:host([effect="kintsugi"]) .eb:before{background:linear-gradient(90deg,var(--color-kaki-400, #D97234),#F5D08A,transparent);background-size:200% 100%;animation:eb-gold 4s linear infinite}:host([effect="kintsugi"][line="right"]) .eb:before,:host([effect="kintsugi"][line="both"]) .eb:after{background:linear-gradient(270deg,var(--color-kaki-400, #D97234),#F5D08A,transparent);background-size:200% 100%;animation:eb-gold 4s linear infinite}@keyframes eb-glitch{0%,88%,to{transform:none;opacity:1}89%{transform:translate(-2px);opacity:.7}90%{transform:translate(2px);opacity:.9}91%{transform:none;opacity:1}}@keyframes eb-flicker{0%,87%,to{opacity:1}88%{opacity:.4}89%{opacity:1}90%{opacity:.2}90.5%{opacity:1}}:host([effect="glitch"]) .eb{color:#faf7f440;animation:eb-glitch 6s steps(1) infinite,eb-flicker 6s steps(1) infinite}:host([effect="glitch"]) .eb:before{background:linear-gradient(90deg,rgb(250,247,244,.25),transparent)}}';
|
|
71
2
|
export {
|
|
72
|
-
|
|
3
|
+
componentCss as default
|
|
73
4
|
};
|
|
74
5
|
//# sourceMappingURL=index307.js.map
|
package/dist/index307.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index307.js","sources":[
|
|
1
|
+
{"version":3,"file":"index307.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index308.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const tabsCss = '@layer tokens,reset,components;@layer reset{:host{display:block;position:relative}*,*:before,*:after{box-sizing:border-box}button{font:inherit;background:none;border:none;padding:0;margin:0;cursor:pointer}}@layer components{.tb{position:relative}.tb-list{display:flex;align-items:flex-end;position:relative;gap:0}.tb-tab{position:relative;display:inline-flex;align-items:center;gap:var(--lib-space-xs);padding:var(--lib-space-md) var(--lib-space-xl);height:44px;font-family:var(--lib-font-mono);font-size:var(--text-xs);letter-spacing:.14em;text-transform:uppercase;color:var(--color-washi-400);background:none;border:none;cursor:pointer;white-space:nowrap;transition:color var(--duration-base) var(--ease-out),background var(--duration-base) var(--ease-out);outline:none;flex-shrink:0;-webkit-user-select:none;user-select:none}.tb-tab:hover{color:var(--color-washi-700)}.tb-tab.is-active{color:var(--color-washi-900)}.tb-tab:focus-visible{outline:2px solid var(--color-kaki-400);outline-offset:-2px}.tb-tab.is-disabled{opacity:.35;pointer-events:none}.tb-tab svg{width:13px;height:13px;stroke:currentcolor;fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.tb-badge{display:inline-flex;align-items:center;justify-content:center;min-width:16px;height:16px;padding:0 4px;font-size:9px;font-family:var(--lib-font-mono);letter-spacing:0;background:var(--color-washi-200);color:var(--color-washi-600);border-radius:999px;transition:background var(--duration-base),color var(--duration-base)}.tb-tab.is-active .tb-badge{background:var(--color-kaki-500);color:#fff}.tb-label{font-family:var(--lib-font-mono);font-size:9px;letter-spacing:var(--tracking-widest);text-transform:uppercase;color:var(--color-washi-400);padding:0 var(--lib-space-xl) var(--lib-space-md)}.tb-label+.tb-label,.tb-label:not(:first-child){margin-top:var(--lib-space-2xl)}:host([size="sm"]) .tb-tab{height:36px;padding:var(--lib-space-xs) var(--lib-space-lg);font-size:10px}:host([size="lg"]) .tb-tab{height:52px;padding:var(--lib-space-lg) var(--lib-space-2xl);letter-spacing:.18em}.tb-panels{position:relative}.tb-panel{display:none}.tb-panel.is-active{display:block;animation:tb-in var(--duration-slow) var(--ease-out) both}@keyframes tb-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}:host([variant="underline"]) .tb-list{border-bottom:1px solid var(--color-washi-200);gap:var(--lib-space-xs)}:host([variant="underline"]) .tb-panels{padding-top:var(--lib-space-2xl)}:host([variant="underline"]) .tb-tab.is-active{color:var(--color-kaki-600)}.tb-ink{position:absolute;bottom:0;height:2px;background:var(--color-kaki-500);transition:left var(--duration-slow) var(--ease-bounce),width var(--duration-slow) var(--ease-bounce);pointer-events:none;z-index:2}:host([variant="underline"][color="celadon"]) .tb-tab.is-active{color:var(--color-celadon-500)}:host([variant="underline"][color="celadon"]) .tb-ink{background:var(--color-celadon-500)}:host([variant="underline"][color="celadon"]) .tb-tab.is-active .tb-badge{background:var(--color-celadon-500)}:host([variant="pill"]) .tb-list{gap:var(--lib-space-xs);padding:var(--lib-space-xs);background:var(--color-washi-100);border:1px solid var(--color-washi-200);display:inline-flex}:host([variant="pill"]) .tb-tab{border-radius:2px;height:36px;padding:var(--lib-space-xs) var(--lib-space-lg)}:host([variant="pill"]) .tb-tab.is-active{background:#fff;color:var(--color-washi-900);box-shadow:0 1px 4px #1a140e1a}:host([variant="pill"]) .tb-panels{padding-top:var(--lib-space-2xl)}:host([variant="pill"]) .tb-ink{display:none}:host([variant="pill"][color="kaki"]) .tb-tab.is-active{background:var(--color-kaki-500);color:#fff}:host([variant="pill"][color="kaki"]) .tb-tab.is-active .tb-badge{background:#ffffff4d;color:#fff}:host([variant="pill"][color="celadon"]) .tb-tab.is-active{background:var(--color-celadon-500);color:#fff}:host([variant="pill"][round]) .tb-list{border-radius:999px}:host([variant="pill"][round]) .tb-tab{border-radius:999px}:host([variant="card"]) .tb-list{gap:2px;align-items:flex-end}:host([variant="card"]) .tb-tab{border:1px solid transparent;border-bottom:none;background:var(--color-washi-100);color:var(--color-washi-400);height:40px;margin-bottom:-1px;padding:0 var(--lib-space-xl);border-radius:2px 2px 0 0}:host([variant="card"]) .tb-tab:hover{background:var(--color-washi-50);color:var(--color-washi-700)}:host([variant="card"]) .tb-tab.is-active{background:#fff;color:var(--color-washi-900);border-color:var(--color-washi-200);border-bottom-color:#fff;z-index:1;height:44px}:host([variant="card"]) .tb-panels{border:1px solid var(--color-washi-200);background:#fff;padding:var(--lib-space-2xl)}:host([variant="card"]) .tb-ink{display:none}:host([variant="outline"]) .tb-list{border-bottom:1px solid var(--color-washi-200);gap:var(--lib-space-xs)}:host([variant="outline"]) .tb-tab{border:1px solid transparent;border-bottom:none;margin-bottom:-1px}:host([variant="outline"]) .tb-tab.is-active{border-color:var(--color-washi-200);border-bottom-color:var(--color-washi-50);background:var(--color-washi-50);color:var(--color-washi-900)}:host([variant="outline"]) .tb-panels{padding-top:var(--lib-space-2xl)}:host([variant="outline"]) .tb-ink{display:none}:host([variant="vertical"]) .tb{display:grid;grid-template-columns:180px 1fr;gap:0;align-items:start}:host([variant="vertical"]) .tb-list{flex-direction:column;align-items:stretch;border-right:1px solid var(--color-washi-200);border-bottom:none;gap:0;padding:var(--lib-space-xs) 0;grid-column:1;grid-row:1}:host([variant="vertical"]) .tb-ink{display:none}:host([variant="vertical"]) .tb-panels{padding:var(--lib-space-xs) 0 var(--lib-space-xs) var(--lib-space-2xl);grid-column:2;grid-row:1}:host([variant="vertical"]) .tb-tab{height:auto;padding:var(--lib-space-md) var(--lib-space-xl);text-align:left;border-left:2px solid transparent;border-radius:0;justify-content:flex-start}:host([variant="vertical"]) .tb-tab:hover{border-left-color:var(--color-washi-300)}:host([variant="vertical"]) .tb-tab.is-active{border-left-color:var(--color-kaki-500);color:var(--color-kaki-600);background:var(--color-kaki-50)}:host([variant="vertical"]) .tb-panel.is-active{animation:tb-in-h var(--duration-slow) var(--ease-out) both}@keyframes tb-in-h{0%{opacity:0;transform:translate(8px)}to{opacity:1;transform:none}}:host([variant="vertical"]) .tb-label{padding:0 var(--lib-space-xl) var(--lib-space-md)}:host([dark]){background:var(--color-washi-950)}:host([dark]) .tb-tab{color:#faf7f440}:host([dark]) .tb-tab:hover{color:#faf7f499}:host([dark]) .tb-tab:focus-visible{outline-color:var(--color-kaki-400)}:host([dark]) .tb-badge{background:#ffffff1a;color:#faf7f466}:host([dark]) .tb-tab.is-active .tb-badge{background:var(--color-kaki-500);color:#fff}:host([dark]) .tb-panels{color:#faf7f499}:host([dark]) .tb-label{color:#faf7f42e}:host([dark][variant="underline"]) .tb-list{border-bottom-color:#ffffff14}:host([dark][variant="underline"]) .tb-tab.is-active{color:var(--color-kaki-400)}:host([dark][variant="underline"]) .tb-ink{background:var(--color-kaki-400)}:host([dark][variant="pill"]) .tb-list{background:#ffffff0a;border-color:#ffffff12}:host([dark][variant="pill"]) .tb-tab.is-active{background:#ffffff17;color:#faf7f4cc;box-shadow:0 1px 4px #0000004d}:host([dark][variant="pill"][color="kaki"]) .tb-tab.is-active{background:var(--color-kaki-500);color:#fff}:host([dark][variant="card"]) .tb-tab{background:#ffffff08;border-color:transparent}:host([dark][variant="card"]) .tb-tab.is-active{background:#ffffff12;border-color:#ffffff14;border-bottom-color:var(--color-washi-950);color:#faf7f4bf}:host([dark][variant="card"]) .tb-panels{background:#ffffff0a;border-color:#ffffff14}:host([dark][variant="vertical"]) .tb-list{border-right-color:#ffffff14}:host([dark][variant="vertical"]) .tb-tab.is-active{border-left-color:var(--color-kaki-500);color:var(--color-kaki-400);background:#b85a1e1a}@keyframes kintsugi-ink{0%{background-position:0% 0}to{background-position:200% 0}}:host([kintsugi][variant="underline"]) .tb-ink{background:linear-gradient(90deg,var(--color-kaki-600) 0%,var(--color-kaki-400) 25%,#F5D08A 50%,var(--color-kaki-400) 75%,var(--color-kaki-600) 100%);background-size:200% 100%;animation:kintsugi-ink 3s linear infinite}:host([kintsugi]) .tb-tab.is-active{color:var(--color-kaki-600)}:host([kintsugi]) .tb-tab.is-active .tb-badge{background:var(--color-kaki-500);color:#fff}:host([kintsugi][variant="pill"]) .tb-tab.is-active{background:linear-gradient(90deg,var(--color-kaki-600),var(--color-kaki-400),#F5D08A,var(--color-kaki-400),var(--color-kaki-600));background-size:200% 100%;animation:kintsugi-ink 3s linear infinite;color:#fff}:host([kintsugi][dark][variant="underline"]) .tb-ink{background:linear-gradient(90deg,#b85a1e66,#d97234b3,#f5d08ae6,#d97234b3,#b85a1e66);background-size:200% 100%;animation:kintsugi-ink 3.5s linear infinite}:host([kintsugi][dark]) .tb-tab.is-active{color:var(--color-kaki-400)}@keyframes tb-glitch-x{0%,88%,to{transform:translate(0)}89%{transform:translate(-2px)}90%{transform:translate(2px)}91%{transform:translate(0)}}@keyframes tb-glitch-r{0%,88%,to{opacity:0}89%{opacity:.6;transform:translate(-2px);clip-path:inset(20% 0 50% 0)}90%{opacity:.4;transform:translate(1px);clip-path:inset(55% 0 10% 0)}91%{opacity:0}}@keyframes tb-glitch-b{0%,88%,to{opacity:0}89%{opacity:.5;transform:translate(2px);clip-path:inset(50% 0 20% 0)}90%{opacity:.3;transform:translate(-1px);clip-path:inset(10% 0 60% 0)}91%{opacity:0}}@keyframes tb-glitch-flicker{0%,85%,to{opacity:1}89%{opacity:.7}89.5%{opacity:1}90%{opacity:.5}90.5%{opacity:1}}:host([glitch]) .tb-tab.is-active{animation:tb-glitch-x 6s steps(1) infinite,tb-glitch-flicker 6s steps(1) infinite;position:relative}:host([glitch]) .tb-tab.is-active:before,:host([glitch]) .tb-tab.is-active:after{content:attr(data-label);position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;font-family:var(--lib-font-mono);font-size:inherit;letter-spacing:inherit;text-transform:uppercase;pointer-events:none;padding:inherit}:host([glitch]) .tb-tab.is-active:before{color:#d97234b3;animation:tb-glitch-r 6s steps(1) infinite}:host([glitch]) .tb-tab.is-active:after{color:#4e948299;animation:tb-glitch-b 6s steps(1) infinite;animation-delay:60ms}:host([glitch][variant="underline"]) .tb-ink{background:var(--color-washi-900);animation:tb-glitch-flicker 6s steps(1) infinite!important}:host([glitch][dark]) .tb-tab.is-active:before{color:#d97234cc}:host([glitch][dark]) .tb-tab.is-active:after{color:#4e9482b3}:host([glitch][dark][variant="underline"]) .tb-ink{background:#faf7f499}:host([scroll]) .tb-list{overflow:auto hidden;scrollbar-width:none;-ms-overflow-style:none;flex-wrap:nowrap}:host([scroll]) .tb-list::-webkit-scrollbar{display:none}:host([full]) .tb-list{display:grid;grid-auto-columns:1fr;grid-auto-flow:column}:host([full]) .tb-tab{justify-content:center}}';
|
|
1
|
+
const iconStyles = ":host{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;line-height:0}.icon-wrapper{display:flex;width:var(--lib-icon-size, 1em);height:var(--lib-icon-size, 1em);color:currentcolor}svg{display:block;width:100%!important;height:100%!important;fill:currentcolor}.variant-primary{color:var(--lib-color-primary)}.variant-secondary{color:var(--lib-color-secondary)}.variant-success{color:var(--lib-color-success)}.variant-danger{color:var(--lib-color-danger)}";
|
|
2
2
|
export {
|
|
3
|
-
|
|
3
|
+
iconStyles as default
|
|
4
4
|
};
|
|
5
5
|
//# sourceMappingURL=index308.js.map
|
package/dist/index309.js
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
function kbdTemplate(props) {
|
|
3
|
+
const { size, variant, pressed, onDown, onUp, onLeave } = props;
|
|
4
|
+
const variantClass = variant !== "default" ? ` kbd-${variant}` : "";
|
|
5
|
+
const pressedClass = pressed ? " is-pressed" : "";
|
|
6
|
+
const cls = `kbd kbd-${size}${variantClass}${pressedClass}`;
|
|
7
|
+
return html`
|
|
8
|
+
<kbd
|
|
9
|
+
class=${cls}
|
|
10
|
+
role="img"
|
|
11
|
+
@mousedown=${onDown}
|
|
12
|
+
@mouseup=${onUp}
|
|
13
|
+
@mouseleave=${onLeave}
|
|
14
|
+
>
|
|
15
|
+
<slot></slot>
|
|
16
|
+
</kbd>
|
|
17
|
+
`;
|
|
18
|
+
}
|
|
2
19
|
export {
|
|
3
|
-
|
|
20
|
+
kbdTemplate
|
|
4
21
|
};
|
|
5
22
|
//# sourceMappingURL=index309.js.map
|
package/dist/index309.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index309.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"index309.js","sources":["../src/components/atoms/kbd/lib-kbd.html.ts"],"sourcesContent":["import { html, TemplateResult } from 'lit';\nimport type { LibKbdSize, LibKbdVariant } from './lib-kbd.component';\n\nexport interface KbdTemplateProps {\n size: LibKbdSize;\n variant: LibKbdVariant;\n pressed: boolean;\n onDown: () => void;\n onUp: () => void;\n onLeave: () => void;\n}\n\n/**\n * Template de lib-kbd.\n *\n * Estructura:\n * kbd.kbd.kbd-{size}[.kbd-{variant}][.is-pressed]\n * slot\n *\n * El `border-bottom` de 3px simula la pared lateral física.\n * `.is-pressed` reduce ese borde a 1px y añade translateY(1px)\n * — efecto pulsación real.\n */\nexport function kbdTemplate(props: KbdTemplateProps): TemplateResult {\n const { size, variant, pressed, onDown, onUp, onLeave } = props;\n\n const variantClass = variant !== 'default' ? ` kbd-${variant}` : '';\n const pressedClass = pressed ? ' is-pressed' : '';\n const cls = `kbd kbd-${size}${variantClass}${pressedClass}`;\n\n return html`\n <kbd\n class=${cls}\n role=\"img\"\n @mousedown=${onDown}\n @mouseup=${onUp}\n @mouseleave=${onLeave}\n >\n <slot></slot>\n </kbd>\n `;\n}"],"names":[],"mappings":";AAuBO,SAAS,YAAY,OAAyC;AACnE,QAAM,EAAE,MAAM,SAAS,SAAS,QAAQ,MAAM,YAAY;AAE1D,QAAM,eAAe,YAAY,YAAY,QAAQ,OAAO,KAAK;AACjE,QAAM,eAAe,UAAU,gBAAgB;AAC/C,QAAM,MAAe,WAAW,IAAI,GAAG,YAAY,GAAG,YAAY;AAElE,SAAO;AAAA;AAAA,cAEK,GAAG;AAAA;AAAA,mBAEE,MAAM;AAAA,iBACR,IAAI;AAAA,oBACD,OAAO;AAAA;AAAA;AAAA;AAAA;AAK3B;"}
|
package/dist/index31.js
CHANGED
|
@@ -1,25 +1,110 @@
|
|
|
1
1
|
import { unsafeCSS, css, LitElement } from "lit";
|
|
2
|
-
import { customElement } from "lit/decorators.js";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
2
|
+
import { property, customElement } from "lit/decorators.js";
|
|
3
|
+
import { progressTemplate } from "./index318.js";
|
|
4
|
+
import progressCss from "./index319.js";
|
|
5
|
+
import sharedTokens from "./index196.js";
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
5
7
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
8
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
7
9
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
8
10
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9
11
|
if (decorator = decorators[i])
|
|
10
|
-
result = decorator(result) || result;
|
|
12
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
13
|
+
if (kind && result) __defProp(target, key, result);
|
|
11
14
|
return result;
|
|
12
15
|
};
|
|
13
|
-
let
|
|
16
|
+
let LibProgress = class extends LitElement {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments);
|
|
19
|
+
this.value = 0;
|
|
20
|
+
this.max = 100;
|
|
21
|
+
this.size = "md";
|
|
22
|
+
this.tone = "default";
|
|
23
|
+
this.indeterminate = false;
|
|
24
|
+
this.striped = false;
|
|
25
|
+
this.square = false;
|
|
26
|
+
this.label = "";
|
|
27
|
+
this.valueLabel = "";
|
|
28
|
+
this.sub = "";
|
|
29
|
+
this.showValue = false;
|
|
30
|
+
this.segments = "";
|
|
31
|
+
this.ariaLabel = null;
|
|
32
|
+
}
|
|
14
33
|
render() {
|
|
15
|
-
|
|
34
|
+
const percent = this.indeterminate ? 100 : Math.min(Math.max(this.value / (this.max || 100) * 100, 0), 100);
|
|
35
|
+
let parsedSegments = [];
|
|
36
|
+
if (this.segments) {
|
|
37
|
+
try {
|
|
38
|
+
parsedSegments = JSON.parse(this.segments);
|
|
39
|
+
} catch {
|
|
40
|
+
console.warn("[lib-progress] Invalid JSON in `segments` prop.");
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return progressTemplate({
|
|
44
|
+
percent,
|
|
45
|
+
size: this.size,
|
|
46
|
+
tone: this.tone,
|
|
47
|
+
indeterminate: this.indeterminate,
|
|
48
|
+
striped: this.striped,
|
|
49
|
+
square: this.square,
|
|
50
|
+
label: this.label,
|
|
51
|
+
valueLabel: this.valueLabel,
|
|
52
|
+
sub: this.sub,
|
|
53
|
+
showValue: this.showValue,
|
|
54
|
+
segments: parsedSegments,
|
|
55
|
+
ariaLabel: this.ariaLabel ?? this.label,
|
|
56
|
+
rawValue: this.value,
|
|
57
|
+
max: this.max
|
|
58
|
+
});
|
|
16
59
|
}
|
|
17
60
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
]
|
|
61
|
+
LibProgress.styles = [
|
|
62
|
+
css`${unsafeCSS(sharedTokens)}`,
|
|
63
|
+
css`${unsafeCSS(progressCss)}`
|
|
64
|
+
];
|
|
65
|
+
__decorateClass([
|
|
66
|
+
property({ type: Number })
|
|
67
|
+
], LibProgress.prototype, "value", 2);
|
|
68
|
+
__decorateClass([
|
|
69
|
+
property({ type: Number })
|
|
70
|
+
], LibProgress.prototype, "max", 2);
|
|
71
|
+
__decorateClass([
|
|
72
|
+
property({ type: String, reflect: true })
|
|
73
|
+
], LibProgress.prototype, "size", 2);
|
|
74
|
+
__decorateClass([
|
|
75
|
+
property({ type: String, reflect: true })
|
|
76
|
+
], LibProgress.prototype, "tone", 2);
|
|
77
|
+
__decorateClass([
|
|
78
|
+
property({ type: Boolean, reflect: true })
|
|
79
|
+
], LibProgress.prototype, "indeterminate", 2);
|
|
80
|
+
__decorateClass([
|
|
81
|
+
property({ type: Boolean, reflect: true })
|
|
82
|
+
], LibProgress.prototype, "striped", 2);
|
|
83
|
+
__decorateClass([
|
|
84
|
+
property({ type: Boolean, reflect: true })
|
|
85
|
+
], LibProgress.prototype, "square", 2);
|
|
86
|
+
__decorateClass([
|
|
87
|
+
property({ type: String })
|
|
88
|
+
], LibProgress.prototype, "label", 2);
|
|
89
|
+
__decorateClass([
|
|
90
|
+
property({ type: String, attribute: "value-label" })
|
|
91
|
+
], LibProgress.prototype, "valueLabel", 2);
|
|
92
|
+
__decorateClass([
|
|
93
|
+
property({ type: String })
|
|
94
|
+
], LibProgress.prototype, "sub", 2);
|
|
95
|
+
__decorateClass([
|
|
96
|
+
property({ type: Boolean, attribute: "show-value" })
|
|
97
|
+
], LibProgress.prototype, "showValue", 2);
|
|
98
|
+
__decorateClass([
|
|
99
|
+
property({ type: String })
|
|
100
|
+
], LibProgress.prototype, "segments", 2);
|
|
101
|
+
__decorateClass([
|
|
102
|
+
property({ type: String, attribute: "aria-label" })
|
|
103
|
+
], LibProgress.prototype, "ariaLabel", 2);
|
|
104
|
+
LibProgress = __decorateClass([
|
|
105
|
+
customElement("lib-progress")
|
|
106
|
+
], LibProgress);
|
|
22
107
|
export {
|
|
23
|
-
|
|
108
|
+
LibProgress
|
|
24
109
|
};
|
|
25
110
|
//# sourceMappingURL=index31.js.map
|
package/dist/index31.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index31.js","sources":["../src/components/atoms/
|
|
1
|
+
{"version":3,"file":"index31.js","sources":["../src/components/atoms/progress/lib-progress.component.ts"],"sourcesContent":["import { LitElement, css, unsafeCSS, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { progressTemplate } from './lib-progress.html';\nimport progressCss from './lib-progress.css?inline';\nimport sharedTokens from '../../../styles/shared/tokens.css?inline';\nimport type { ProgressSize, ProgressTone, ProgressSegment } from './lib-progress.types';\n\n/**\n * @element lib-progress\n *\n * Barra de progreso lineal del sistema Shibui.\n *\n * Modos:\n * - Simple bar → valor 0-100 con prop `value`\n * - Con meta → añade `label` y/o `value-label`\n * - Multi-segmento → prop `segments` (JSON)\n *\n * @attr value — Valor actual (0–max). Default 0.\n * @attr max — Valor máximo. Default 100.\n * @attr size — xs · sm · md · lg · xl. Default md.\n * @attr tone — default · kaki · celadon · error. Default default.\n * @attr indeterminate — Duración desconocida; animación continua.\n * @attr striped — Relleno con diagonales sutiles.\n * @attr square — Bordes rectos (radius-sm) en lugar de full.\n * @attr label — Etiqueta sobre la barra.\n * @attr value-label — Texto libre junto al label (ej: \"3.4 MB / 7 MB\").\n * @attr show-value — Muestra el % calculado junto al label (ignorado si value-label está presente).\n * @attr sub — Texto secundario bajo la barra (DM Mono, 10px).\n * @attr segments — JSON: ProgressSegment[]. Activa modo multi-segmento.\n */\n@customElement('lib-progress')\nexport class LibProgress extends LitElement {\n static override styles = [\n css`${unsafeCSS(sharedTokens)}`,\n css`${unsafeCSS(progressCss)}`,\n ];\n\n /* ── Bar config ── */\n @property({ type: Number }) value = 0;\n @property({ type: Number }) max = 100;\n\n @property({ type: String, reflect: true }) size: ProgressSize = 'md';\n @property({ type: String, reflect: true }) tone: ProgressTone = 'default';\n\n @property({ type: Boolean, reflect: true }) indeterminate = false;\n @property({ type: Boolean, reflect: true }) striped = false;\n @property({ type: Boolean, reflect: true }) square = false;\n\n /* ── Meta ── */\n @property({ type: String }) label = '';\n @property({ type: String, attribute: 'value-label' }) valueLabel = '';\n @property({ type: String }) sub = '';\n @property({ type: Boolean, attribute: 'show-value' }) showValue = false;\n\n /* ── Multi-segment (JSON string) ── */\n @property({ type: String }) segments = '';\n\n /* ── a11y ── */\n @property({ type: String, attribute: 'aria-label' }) override ariaLabel: string | null = null;\n\n override render(): TemplateResult {\n const percent = this.indeterminate\n ? 100\n : Math.min(Math.max((this.value / (this.max || 100)) * 100, 0), 100);\n\n let parsedSegments: ProgressSegment[] = [];\n if (this.segments) {\n try {\n parsedSegments = JSON.parse(this.segments) as ProgressSegment[];\n } catch {\n console.warn('[lib-progress] Invalid JSON in `segments` prop.');\n }\n }\n\n return progressTemplate({\n percent,\n size: this.size,\n tone: this.tone,\n indeterminate: this.indeterminate,\n striped: this.striped,\n square: this.square,\n\n label: this.label,\n valueLabel: this.valueLabel,\n sub: this.sub,\n showValue: this.showValue,\n\n segments: parsedSegments,\n\n ariaLabel: this.ariaLabel ?? this.label,\n rawValue: this.value,\n max: this.max,\n });\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'lib-progress': LibProgress;\n }\n}"],"names":[],"mappings":"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"}
|