@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/index328.js
CHANGED
|
@@ -1,5 +1,81 @@
|
|
|
1
|
-
const tableCss = '@layer tokens,reset,components;@layer reset{:host{display:block;width:100%}*,*:before,*:after{box-sizing:border-box}}@layer components{.tbl-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--border-subtle)}.tbl-wrap table{border:none}.tbl-wrap.tbl-sticky-head{max-height:380px;overflow-y:auto}.tbl-sticky-head thead th{position:sticky;top:0;z-index:3}table{width:100%;border-collapse:collapse;font-family:var(--lib-font-body);font-size:var(--text-sm);color:var(--text-secondary);background:var(--bg-elevated)}caption{font-family:var(--lib-font-mono);font-size:var(--text-xs);letter-spacing:var(--tracking-widest);text-transform:uppercase;color:var(--text-muted);text-align:left;padding:var(--lib-space-sm) var(--lib-space-md);background:var(--bg-surface);border-bottom:1px solid var(--border-subtle);caption-side:top}thead th{font-family:var(--lib-font-mono);font-size:10px;letter-spacing:var(--tracking-widest);text-transform:uppercase;color:var(--text-muted);font-weight:400;padding:var(--lib-space-sm) var(--lib-space-md);text-align:left;background:var(--bg-surface);border-bottom:1px solid var(--border-default);white-space:nowrap;-webkit-user-select:none;user-select:none;position:relative}thead th.is-sortable{cursor:pointer;padding-right:var(--lib-space-lg);transition:color var(--duration-fast),background var(--duration-fast)}thead th.is-sortable:hover{color:var(--text-primary);background:var(--color-washi-200)}thead th.is-sortable:after{content:"";position:absolute;right:var(--lib-space-sm);top:50%;transform:translateY(-50%);width:0;height:0;opacity:.3;border-left:4px solid transparent;border-right:4px solid transparent;border-top:5px solid currentcolor;transition:opacity var(--duration-fast),transform var(--duration-base)}thead th.is-sortable:hover:after{opacity:.6}thead th.sort-asc:after{opacity:1;transform:translateY(-50%) rotate(180deg)}thead th.sort-desc:after{opacity:1;transform:translateY(-50%) rotate(0)}thead th.sort-asc,thead th.sort-desc{color:var(--text-primary);background:var(--color-washi-200)}thead th.is-num{text-align:right}tbody tr{transition:background var(--duration-fast);border-bottom:1px solid var(--border-subtle)}tbody tr:last-child{border-bottom:none}tbody td{padding:var(--lib-space-md) var(--lib-space-md);color:var(--text-secondary);font-size:var(--text-sm);vertical-align:middle;line-height:var(--leading-snug)}tfoot td{padding:var(--lib-space-sm) var(--lib-space-md);font-family:var(--lib-font-mono);font-size:10px;letter-spacing:var(--tracking-wide);color:var(--text-muted);background:var(--bg-surface);border-top:1px solid var(--border-default)}:host([size="sm"]) thead th{padding:var(--lib-space-xs) var(--lib-space-sm);font-size:9px}:host([size="sm"]) tbody td{padding:var(--lib-space-xs) var(--lib-space-sm);font-size:var(--text-xs)}:host([size="sm"]) tfoot td{padding:var(--lib-space-xs) var(--lib-space-sm)}:host([size="lg"]) thead th{padding:var(--lib-space-md) var(--lib-space-lg);font-size:11px}:host([size="lg"]) tbody td{padding:calc(var(--lib-space-md) + var(--lib-space-xs)) var(--lib-space-lg);font-size:var(--text-base)}:host([size="lg"]) tfoot td{padding:var(--lib-space-md) var(--lib-space-lg)}:host([variant="lines"]) tbody tr:hover,:host(:not([variant])) tbody tr:hover{background:var(--color-washi-50)}:host([variant="grid"]) thead th,:host([variant="grid"]) tbody td{border-right:1px solid var(--border-subtle)}:host([variant="grid"]) thead th:last-child,:host([variant="grid"]) tbody td:last-child{border-right:none}:host([variant="grid"]) tbody tr:hover{background:var(--color-washi-50)}:host([variant="striped"]) tbody tr:nth-child(2n){background:var(--bg-surface)}:host([variant="striped"]) tbody tr:hover{background:var(--color-washi-50)}:host([variant="striped"]) tbody tr:nth-child(2n):hover{background:var(--color-washi-200)}:host([variant="borderless"]) thead th{border-bottom:1px solid var(--border-default)}:host([variant="borderless"]) tbody tr{border-bottom:none}:host([variant="borderless"]) tbody td{border:none}:host([variant="borderless"]) tbody tr:hover{background:var(--bg-surface)}tbody tr.is-selected,tbody tr.is-selected:hover{background:var(--color-kaki-50);border-bottom-color:var(--color-kaki-100)}tbody tr.is-selected td{color:var(--text-primary)}tbody tr.is-error,tbody tr.is-error:hover{background:#f5ddd9;border-bottom-color:#ebc9c4}tbody tr.is-error td{color:var(--color-error)}tbody tr.is-warning,tbody tr.is-warning:hover{background:#fef9ec;border-bottom-color:#f5e6a8}tbody tr.is-warning td{color:#7a5c0a}tbody tr.is-success,tbody tr.is-success:hover{background:var(--color-celadon-50);border-bottom-color:var(--color-celadon-100)}tbody tr.is-success td{color:var(--color-celadon-600)}tbody tr.is-disabled,tbody tr.is-disabled:hover{background:transparent;opacity:.38;cursor:not-allowed}.col-sticky{position:sticky;left:0;z-index:1;background:inherit}thead .col-sticky{background:var(--bg-surface);z-index:2}.col-sticky:after{content:"";position:absolute;top:0;right:-1px;bottom:0;width:1px;background:var(--border-subtle);box-shadow:2px 0 6px #1a140e0d}.cell-num{text-align:right;font-family:var(--lib-font-mono);font-size:var(--text-xs);letter-spacing:var(--tracking-wide);color:var(--text-primary)}thead th.cell-num{color:var(--text-muted)}.cell-mono{font-family:var(--lib-font-mono);font-size:var(--text-xs);letter-spacing:var(--tracking-wide);color:var(--text-muted)}.cell-truncate{max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cell-check{width:40px;padding:var(--lib-space-md) var(--lib-space-sm) var(--lib-space-md) var(--lib-space-md)!important}.cell-check input[type=checkbox]{width:14px;height:14px;accent-color:var(--color-washi-900);cursor:pointer;display:block}.cell-avatar{display:flex;align-items:center;gap:var(--lib-space-sm)}.avatar-circle{width:28px;height:28px;border-radius:var(--radius-full);display:flex;align-items:center;justify-content:center;font-family:var(--lib-font-mono);font-size:9px;flex-shrink:0;background:var(--color-washi-200);color:var(--text-secondary)}.avatar-text{display:flex;flex-direction:column;gap:1px}.avatar-name{font-size:var(--text-sm);color:var(--text-secondary);line-height:var(--leading-tight)}.avatar-hint{font-family:var(--lib-font-mono);font-size:10px;color:var(--text-muted);letter-spacing:var(--tracking-wide)}.cell-badge{display:inline-flex;align-items:center;gap:var(--lib-space-xs);font-family:var(--lib-font-mono);font-size:9px;letter-spacing:var(--tracking-wider);text-transform:uppercase;padding:2px var(--lib-space-sm);white-space:nowrap}.cell-badge:before{content:"";width:5px;height:5px;border-radius:var(--radius-full);background:currentcolor;flex-shrink:0;opacity:.7}.cell-badge.tone-estable{color:var(--color-celadon-600);background:var(--color-celadon-50)}.cell-badge.tone-beta{color:var(--color-kaki-500);background:var(--color-kaki-50)}.cell-badge.tone-error{color:var(--color-error);background:#f5ddd9}.cell-badge.tone-warning{color:#7a5c0a;background:#fef9ec}.cell-badge.tone-inactive{color:var(--text-muted);background:var(--bg-surface)}.cell-badge.tone-info{color:#1a4a6e;background:#d6e8f5}.cell-progress{display:flex;align-items:center;gap:var(--lib-space-sm)}.progress-bar{flex:1;height:3px;background:var(--color-washi-200);position:relative;min-width:60px}.progress-fill{position:absolute;left:0;top:0;bottom:0;background:var(--color-washi-700);transition:width var(--duration-slow) var(--ease-out)}.progress-fill.tone-kaki{background:var(--color-kaki-500)}.progress-fill.tone-celadon{background:var(--color-celadon-500)}.progress-val{font-family:var(--lib-font-mono);font-size:10px;color:var(--text-muted);letter-spacing:var(--tracking-wide);flex-shrink:0;width:28px;text-align:right}.cell-actions{width:44px;text-align:right!important;padding-right:var(--lib-space-md)!important}.actions-btn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;font-size:18px;line-height:1;color:var(--text-muted);background:transparent;border:none;cursor:pointer;border-radius:var(--radius-full);transition:background var(--duration-fast),color var(--duration-fast);opacity:0}tbody tr:hover .actions-btn{opacity:1}.actions-btn:hover{background:var(--bg-surface);color:var(--text-primary)}@keyframes dt-shimmer{0%{background-position:-600px 0}to{background-position:600px 0}}.skel-line{height:10px;background:linear-gradient(90deg,var(--color-washi-200) 25%,var(--color-washi-100) 50%,var(--color-washi-200) 75%);background-size:600px 100%;animation:dt-shimmer 1.4s infinite linear;border-radius:2px}.skel-line.w-80{width:80%}.skel-line.w-60{width:60%}.skel-line.w-40{width:40%}.skel-line.w-30{width:30%}.skel-avatar{width:28px;height:28px;border-radius:var(--radius-full);background:linear-gradient(90deg,var(--color-washi-200) 25%,var(--color-washi-100) 50%,var(--color-washi-200) 75%);background-size:600px 100%;animation:dt-shimmer 1.4s infinite linear;flex-shrink:0}.skel-cell{display:flex;align-items:center;gap:var(--lib-space-sm)}.skel-badge{height:16px;width:48px;border-radius:2px;background:linear-gradient(90deg,var(--color-washi-200) 25%,var(--color-washi-100) 50%,var(--color-washi-200) 75%);background-size:600px 100%;animation:dt-shimmer 1.4s infinite linear}.empty-row td{text-align:center;padding:var(--lib-space-xl) var(--lib-space-lg)!important;border-bottom:none!important}.empty-icon{font-size:32px;color:var(--color-washi-300);display:block;margin:0 auto var(--lib-space-md)}.empty-title{font-family:var(--lib-font-display);font-size:var(--text-xl);font-weight:var(--weight-light);color:var(--text-muted);letter-spacing:var(--tracking-tight);display:block;margin-bottom:var(--lib-space-xs)}.empty-desc{font-family:var(--lib-font-mono);font-size:10px;letter-spacing:var(--tracking-wide);color:var(--color-washi-300);text-transform:uppercase;display:block}.tbl-toolbar{display:flex;align-items:center;gap:var(--lib-space-sm);padding:var(--lib-space-sm) var(--lib-space-md);background:var(--bg-surface);border:1px solid var(--border-subtle);border-bottom:none}.tbl-toolbar-title{font-family:var(--lib-font-mono);font-size:var(--text-xs);letter-spacing:var(--tracking-wider);text-transform:uppercase;color:var(--text-secondary)}.tbl-toolbar-count{font-family:var(--lib-font-mono);font-size:10px;color:var(--text-muted);letter-spacing:var(--tracking-wide);margin-right:auto}.tbl-toolbar-search{font-family:var(--lib-font-mono);font-size:var(--text-xs);color:var(--text-primary);background:var(--bg-elevated);border:1px solid var(--border-default);padding:var(--lib-space-xs) var(--lib-space-sm);outline:none;width:180px;transition:border-color var(--duration-base),box-shadow var(--duration-base)}.tbl-toolbar-search::placeholder{color:var(--text-muted)}.tbl-toolbar-search:focus{border-color:var(--color-washi-700);box-shadow:0 0 0 3px #1a140e14}.tbl-pagination{display:flex;align-items:center;gap:var(--lib-space-xs);padding:var(--lib-space-sm) var(--lib-space-md);border:1px solid var(--border-subtle);border-top:none;background:var(--bg-surface)}.pag-info{font-family:var(--lib-font-mono);font-size:10px;letter-spacing:var(--tracking-wide);color:var(--text-muted);margin-right:auto}.pag-btn{width:28px;height:28px;display:flex;align-items:center;justify-content:center;font-family:var(--lib-font-mono);font-size:10px;letter-spacing:var(--tracking-wide);color:var(--text-muted);background:transparent;border:1px solid transparent;cursor:pointer;transition:background var(--duration-fast),color var(--duration-fast),border-color var(--duration-fast)}.pag-btn:hover{background:var(--bg-elevated);border-color:var(--border-default);color:var(--text-primary)}.pag-btn.is-active{background:var(--color-washi-900);color:var(--color-washi-50);border-color:var(--color-washi-900)}.pag-btn:disabled{opacity:.35;cursor:not-allowed;pointer-events:none}.pag-sep{font-family:var(--lib-font-mono);font-size:10px;color:var(--text-muted);padding:0 2px}:host([dark]) table{background:#0a0403;color:#7b6f67}:host([dark]) thead th{background:#060201;color:#312620;border-bottom-color:#190f0a}:host([dark]) thead th.is-sortable:hover{background:#150a06;color:#998c84}:host([dark]) thead th.sort-asc,:host([dark]) thead th.sort-desc{background:#150a06;color:#a99b93}:host([dark]) tbody tr{border-bottom-color:#150a06}:host([dark]) tbody td{color:#7b6f67}:host([dark]) tbody td.cell-num{color:#afa299}:host([dark]) tbody tr:hover{background:#150a06}:host([dark]) .tbl-wrap{border-color:#150a06}:host([dark]) tfoot td{background:#060201;border-top-color:#190f0a;color:#362b25}:host([dark]) caption{background:#060201;color:#312620;border-color:#150a06}:host([dark]) .tbl-toolbar{background:#060201;border-color:#150a06}:host([dark]) .tbl-toolbar-title{color:#51453e}:host([dark]) .tbl-toolbar-count{color:#2a1f19}:host([dark]) .tbl-toolbar-search{background:#060201;border-color:#231813;color:#998c84}:host([dark]) .tbl-toolbar-search::placeholder{color:#312620}:host([dark]) .tbl-pagination{background:#060201;border-color:#150a06}:host([dark]) .pag-btn:hover{background:#150a06;border-color:#231813;color:#998c84}:host([dark]) .avatar-circle{background:#1e130e;color:#5f524c}:host([dark]) .avatar-name{color:#8a7d75}:host([dark]) .avatar-hint{color:#362b25}:host([dark]) .progress-bar{background:#1e130e}:host([dark]) .col-sticky{background:#0a0403}:host([dark]) thead .col-sticky{background:#060201}:host([dark]) .cell-mono{color:#362b25}:host([dark]) .actions-btn:hover{background:#1e130e;color:#998c84}:host([dark]) tbody tr.is-selected,:host([dark]) tbody tr.is-selected:hover{background:#190f0a}:host([dark]) .skel-line,:host([dark]) .skel-avatar,:host([dark]) .skel-badge{background:linear-gradient(90deg,#17100c 25%,#211815,#17100c 75%);background-size:600px 100%}}';
|
|
1
|
+
import { html, nothing, svg } from "lit";
|
|
2
|
+
function renderDots(p) {
|
|
3
|
+
const current = Math.round(p.progress / 100 * p.dotsCount);
|
|
4
|
+
return html`
|
|
5
|
+
${Array.from({ length: p.dotsCount }, (_, i) => {
|
|
6
|
+
const done = i < current - 1;
|
|
7
|
+
const active = i === current - 1;
|
|
8
|
+
return html`
|
|
9
|
+
<span
|
|
10
|
+
class="rp-dot ${done ? "is-done" : ""} ${active ? "is-current" : ""}"
|
|
11
|
+
aria-hidden="true"
|
|
12
|
+
></span>
|
|
13
|
+
`;
|
|
14
|
+
})}
|
|
15
|
+
`;
|
|
16
|
+
}
|
|
17
|
+
function renderRing(p) {
|
|
18
|
+
const r = p.ringSize / 2 - 3;
|
|
19
|
+
const circumference = 2 * Math.PI * r;
|
|
20
|
+
const offset = circumference * (1 - p.progress / 100);
|
|
21
|
+
return html`
|
|
22
|
+
${svg`
|
|
23
|
+
<svg
|
|
24
|
+
class="rp-ring-svg"
|
|
25
|
+
width="${p.ringSize}"
|
|
26
|
+
height="${p.ringSize}"
|
|
27
|
+
viewBox="0 0 ${p.ringSize} ${p.ringSize}"
|
|
28
|
+
role="img"
|
|
29
|
+
aria-label="Progreso de lectura: ${p.progress}%"
|
|
30
|
+
>
|
|
31
|
+
<circle
|
|
32
|
+
class="rp-ring-track"
|
|
33
|
+
cx="${p.ringSize / 2}"
|
|
34
|
+
cy="${p.ringSize / 2}"
|
|
35
|
+
r="${r}"
|
|
36
|
+
/>
|
|
37
|
+
<circle
|
|
38
|
+
class="rp-ring-fill"
|
|
39
|
+
cx="${p.ringSize / 2}"
|
|
40
|
+
cy="${p.ringSize / 2}"
|
|
41
|
+
r="${r}"
|
|
42
|
+
stroke-dasharray="${circumference}"
|
|
43
|
+
stroke-dashoffset="${offset}"
|
|
44
|
+
/>
|
|
45
|
+
</svg>
|
|
46
|
+
`}
|
|
47
|
+
`;
|
|
48
|
+
}
|
|
49
|
+
function readingProgressTemplate(p) {
|
|
50
|
+
if (p.variant === "bar" || p.variant === "line" || p.variant === "vertical") {
|
|
51
|
+
return html`
|
|
52
|
+
<span
|
|
53
|
+
role="progressbar"
|
|
54
|
+
aria-label="Progreso de lectura"
|
|
55
|
+
aria-valuemin="0"
|
|
56
|
+
aria-valuemax="100"
|
|
57
|
+
aria-valuenow="${p.progress}"
|
|
58
|
+
style="display:none"
|
|
59
|
+
></span>
|
|
60
|
+
`;
|
|
61
|
+
}
|
|
62
|
+
if (p.variant === "dots") {
|
|
63
|
+
return html`
|
|
64
|
+
<span role="progressbar" aria-label="Progreso de lectura" aria-valuenow="${p.progress}" aria-valuemin="0" aria-valuemax="100" style="display:contents">
|
|
65
|
+
${renderDots(p)}
|
|
66
|
+
</span>
|
|
67
|
+
`;
|
|
68
|
+
}
|
|
69
|
+
if (p.variant === "ring") {
|
|
70
|
+
return html`
|
|
71
|
+
<span role="progressbar" aria-label="Progreso de lectura" aria-valuenow="${p.progress}" aria-valuemin="0" aria-valuemax="100" style="display:contents">
|
|
72
|
+
${renderRing(p)}
|
|
73
|
+
</span>
|
|
74
|
+
`;
|
|
75
|
+
}
|
|
76
|
+
return nothing;
|
|
77
|
+
}
|
|
2
78
|
export {
|
|
3
|
-
|
|
79
|
+
readingProgressTemplate
|
|
4
80
|
};
|
|
5
81
|
//# sourceMappingURL=index328.js.map
|
package/dist/index328.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index328.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"index328.js","sources":["../src/components/atoms/reading-progress/lib-reading-progress.html.ts"],"sourcesContent":["import { html, nothing, svg, TemplateResult } from 'lit';\nimport { ReadingProgressVariant } from './lib-reading-progress.component';\n\nexport interface ReadingProgressTemplateProps {\n variant: ReadingProgressVariant;\n progress: number; /* 0 – 100 */\n dotsCount: number;\n ringSize: number;\n}\n\n/* ── DOTS ──────────────────────────────────────────────── */\nfunction renderDots(p: ReadingProgressTemplateProps): TemplateResult {\n const current = Math.round((p.progress / 100) * p.dotsCount);\n return html`\n ${Array.from({ length: p.dotsCount }, (_, i) => {\n const done = i < current - 1;\n const active = i === current - 1;\n return html`\n <span\n class=\"rp-dot ${done ? 'is-done' : ''} ${active ? 'is-current' : ''}\"\n aria-hidden=\"true\"\n ></span>\n `;\n })}\n `;\n}\n\n/* ── RING ──────────────────────────────────────────────── */\nfunction renderRing(p: ReadingProgressTemplateProps): TemplateResult {\n const r = (p.ringSize / 2) - 3; /* margen para stroke-width:2 */\n const circumference = 2 * Math.PI * r;\n const offset = circumference * (1 - p.progress / 100);\n\n return html`\n ${svg`\n <svg\n class=\"rp-ring-svg\"\n width=\"${p.ringSize}\"\n height=\"${p.ringSize}\"\n viewBox=\"0 0 ${p.ringSize} ${p.ringSize}\"\n role=\"img\"\n aria-label=\"Progreso de lectura: ${p.progress}%\"\n >\n <circle\n class=\"rp-ring-track\"\n cx=\"${p.ringSize / 2}\"\n cy=\"${p.ringSize / 2}\"\n r=\"${r}\"\n />\n <circle\n class=\"rp-ring-fill\"\n cx=\"${p.ringSize / 2}\"\n cy=\"${p.ringSize / 2}\"\n r=\"${r}\"\n stroke-dasharray=\"${circumference}\"\n stroke-dashoffset=\"${offset}\"\n />\n </svg>\n `}\n `;\n}\n\n/* ── Template principal ─────────────────────────────────── */\nexport function readingProgressTemplate(\n p: ReadingProgressTemplateProps,\n): TemplateResult {\n /* bar + line + vertical → el host ES el elemento visual (CSS en :host)\n Solo necesitamos el aria progressbar */\n if (p.variant === 'bar' || p.variant === 'line' || p.variant === 'vertical') {\n return html`\n <span\n role=\"progressbar\"\n aria-label=\"Progreso de lectura\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n aria-valuenow=\"${p.progress}\"\n style=\"display:none\"\n ></span>\n `;\n }\n\n if (p.variant === 'dots') {\n return html`\n <span role=\"progressbar\" aria-label=\"Progreso de lectura\" aria-valuenow=\"${p.progress}\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"display:contents\">\n ${renderDots(p)}\n </span>\n `;\n }\n\n if (p.variant === 'ring') {\n return html`\n <span role=\"progressbar\" aria-label=\"Progreso de lectura\" aria-valuenow=\"${p.progress}\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"display:contents\">\n ${renderRing(p)}\n </span>\n `;\n }\n\n return nothing as unknown as TemplateResult;\n}"],"names":[],"mappings":";AAWA,SAAS,WAAW,GAAiD;AACnE,QAAM,UAAU,KAAK,MAAO,EAAE,WAAW,MAAO,EAAE,SAAS;AAC3D,SAAO;AAAA,MACH,MAAM,KAAK,EAAE,QAAQ,EAAE,UAAA,GAAa,CAAC,GAAG,MAAM;AAC9C,UAAM,OAAO,IAAI,UAAU;AAC3B,UAAM,SAAS,MAAM,UAAU;AAC/B,WAAO;AAAA;AAAA,0BAEa,OAAO,YAAY,EAAE,IAAI,SAAS,eAAe,EAAE;AAAA;AAAA;AAAA;AAAA,EAIzE,CAAC,CAAC;AAAA;AAEN;AAGA,SAAS,WAAW,GAAiD;AACnE,QAAM,IAAgB,EAAE,WAAW,IAAK;AACxC,QAAM,gBAAgB,IAAI,KAAK,KAAK;AACpC,QAAM,SAAgB,iBAAiB,IAAI,EAAE,WAAW;AAExD,SAAO;AAAA,MACH;AAAA;AAAA;AAAA,iBAGW,EAAE,QAAQ;AAAA,kBACT,EAAE,QAAQ;AAAA,uBACL,EAAE,QAAQ,IAAI,EAAE,QAAQ;AAAA;AAAA,2CAEJ,EAAE,QAAQ;AAAA;AAAA;AAAA;AAAA,gBAIrC,EAAE,WAAW,CAAC;AAAA,gBACd,EAAE,WAAW,CAAC;AAAA,eACf,CAAC;AAAA;AAAA;AAAA;AAAA,gBAIA,EAAE,WAAW,CAAC;AAAA,gBACd,EAAE,WAAW,CAAC;AAAA,eACf,CAAC;AAAA,8BACc,aAAa;AAAA,+BACZ,MAAM;AAAA;AAAA;AAAA,KAGhC;AAAA;AAEL;AAGO,SAAS,wBACd,GACgB;AAGhB,MAAI,EAAE,YAAY,SAAS,EAAE,YAAY,UAAU,EAAE,YAAY,YAAY;AAC3E,WAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAMc,EAAE,QAAQ;AAAA;AAAA;AAAA;AAAA,EAIjC;AAEA,MAAI,EAAE,YAAY,QAAQ;AACxB,WAAO;AAAA,iFACsE,EAAE,QAAQ;AAAA,UACjF,WAAW,CAAC,CAAC;AAAA;AAAA;AAAA,EAGrB;AAEA,MAAI,EAAE,YAAY,QAAQ;AACxB,WAAO;AAAA,iFACsE,EAAE,QAAQ;AAAA,UACjF,WAAW,CAAC,CAAC;AAAA;AAAA;AAAA,EAGrB;AAEA,SAAO;AACT;"}
|
package/dist/index329.js
CHANGED
|
@@ -1,240 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
function renderBadge(value, tone) {
|
|
3
|
-
const label = String(value ?? "");
|
|
4
|
-
return html`<span class="cell-badge tone-${tone}">${label}</span>`;
|
|
5
|
-
}
|
|
6
|
-
function renderProgress(value, tone) {
|
|
7
|
-
const pct = Math.min(100, Math.max(0, Number(value) || 0));
|
|
8
|
-
const toneClass = tone ? `tone-${tone}` : "";
|
|
9
|
-
return html`
|
|
10
|
-
<div class="cell-progress">
|
|
11
|
-
<div class="progress-bar">
|
|
12
|
-
<div class="progress-fill ${toneClass}" style="width:${pct}%"></div>
|
|
13
|
-
</div>
|
|
14
|
-
<span class="progress-val">${pct}%</span>
|
|
15
|
-
</div>
|
|
16
|
-
`;
|
|
17
|
-
}
|
|
18
|
-
function renderAvatar(row, col) {
|
|
19
|
-
const name = String(row[col.key] ?? "");
|
|
20
|
-
const initials = col.initialsKey ? String(row[col.initialsKey] ?? "").slice(0, 2).toUpperCase() : name.split(" ").map((w) => w[0]).join("").slice(0, 2).toUpperCase();
|
|
21
|
-
const hint = col.hintKey ? String(row[col.hintKey] ?? "") : "";
|
|
22
|
-
return html`
|
|
23
|
-
<div class="cell-avatar">
|
|
24
|
-
<div class="avatar-circle">${initials}</div>
|
|
25
|
-
<div class="avatar-text">
|
|
26
|
-
<span class="avatar-name">${name}</span>
|
|
27
|
-
${hint ? html`<span class="avatar-hint">${hint}</span>` : nothing}
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
`;
|
|
31
|
-
}
|
|
32
|
-
function renderActionsBtn(row, idx, onRowAction) {
|
|
33
|
-
return html`
|
|
34
|
-
<button class="actions-btn"
|
|
35
|
-
aria-label="Acciones"
|
|
36
|
-
@click="${(e) => {
|
|
37
|
-
e.stopPropagation();
|
|
38
|
-
onRowAction(row, idx);
|
|
39
|
-
}}"
|
|
40
|
-
>⋯</button>
|
|
41
|
-
`;
|
|
42
|
-
}
|
|
43
|
-
function renderCell(col, row, idx, onRowAction) {
|
|
44
|
-
const value = row[col.key];
|
|
45
|
-
switch (col.type) {
|
|
46
|
-
case "badge": {
|
|
47
|
-
const tone = col.toneKey ? String(row[col.toneKey] ?? "inactive") : col.badgeTone ?? "inactive";
|
|
48
|
-
return renderBadge(value, tone);
|
|
49
|
-
}
|
|
50
|
-
case "progress":
|
|
51
|
-
return renderProgress(value, col.progressTone ?? "");
|
|
52
|
-
case "avatar":
|
|
53
|
-
return renderAvatar(row, col);
|
|
54
|
-
case "actions":
|
|
55
|
-
return renderActionsBtn(row, idx, onRowAction);
|
|
56
|
-
case "mono":
|
|
57
|
-
return html`<span class="cell-mono">${value ?? "—"}</span>`;
|
|
58
|
-
default:
|
|
59
|
-
return html`${value ?? "—"}`;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
function thClasses(col, sortKey, sortDir) {
|
|
63
|
-
const parts = [];
|
|
64
|
-
if (col.type === "num") parts.push("cell-num", "is-num");
|
|
65
|
-
if (col.sticky) parts.push("col-sticky");
|
|
66
|
-
if (col.sortable) {
|
|
67
|
-
parts.push("is-sortable");
|
|
68
|
-
if (sortKey === col.key) parts.push(sortDir === "asc" ? "sort-asc" : "sort-desc");
|
|
69
|
-
}
|
|
70
|
-
return parts.join(" ");
|
|
71
|
-
}
|
|
72
|
-
function tdClasses(col) {
|
|
73
|
-
const parts = [];
|
|
74
|
-
if (col.type === "num") parts.push("cell-num");
|
|
75
|
-
if (col.type === "actions") parts.push("cell-actions");
|
|
76
|
-
if (col.sticky) parts.push("col-sticky");
|
|
77
|
-
if (col.truncate) parts.push("cell-truncate");
|
|
78
|
-
return parts.join(" ");
|
|
79
|
-
}
|
|
80
|
-
function rowClass(row, idx, selected) {
|
|
81
|
-
const state = row._state;
|
|
82
|
-
const isSelected = selected.has(idx) || state === "selected";
|
|
83
|
-
const parts = [];
|
|
84
|
-
if (isSelected) parts.push("is-selected");
|
|
85
|
-
else if (state) parts.push(`is-${state}`);
|
|
86
|
-
return parts.join(" ");
|
|
87
|
-
}
|
|
88
|
-
const WIDTHS = ["w-80", "w-60", "w-40", "w-60", "w-80"];
|
|
89
|
-
function renderSkeletonCell(col, idx) {
|
|
90
|
-
const w = WIDTHS[idx % WIDTHS.length] ?? "w-60";
|
|
91
|
-
if (col.type === "avatar") return html`
|
|
92
|
-
<div class="skel-cell">
|
|
93
|
-
<div class="skel-avatar"></div>
|
|
94
|
-
<div style="flex:1;display:flex;flex-direction:column;gap:4px;">
|
|
95
|
-
<div class="skel-line ${w}"></div>
|
|
96
|
-
<div class="skel-line w-40" style="height:7px;"></div>
|
|
97
|
-
</div>
|
|
98
|
-
</div>`;
|
|
99
|
-
if (col.type === "badge") return html`<div class="skel-badge"></div>`;
|
|
100
|
-
if (col.type === "num") return html`<div class="skel-line ${w}" style="margin-left:auto;"></div>`;
|
|
101
|
-
return html`<div class="skel-line ${w}"></div>`;
|
|
102
|
-
}
|
|
103
|
-
function renderSkeleton(count, cols, selectable) {
|
|
104
|
-
return html`${Array.from({ length: count }, (_, r) => html`
|
|
105
|
-
<tr class="tbl-tr">
|
|
106
|
-
${selectable ? html`<td class="cell-check"></td>` : nothing}
|
|
107
|
-
${cols.map((col, c) => html`
|
|
108
|
-
<td class="${tdClasses(col)}" style="${col.type === "actions" ? "" : ""}">
|
|
109
|
-
${renderSkeletonCell(col, r + c)}
|
|
110
|
-
</td>
|
|
111
|
-
`)}
|
|
112
|
-
</tr>
|
|
113
|
-
`)}`;
|
|
114
|
-
}
|
|
115
|
-
function renderEmpty(title, desc, colSpan) {
|
|
116
|
-
return html`
|
|
117
|
-
<tr class="empty-row">
|
|
118
|
-
<td colspan="${colSpan}">
|
|
119
|
-
<span class="empty-icon">◯</span>
|
|
120
|
-
<span class="empty-title">${title}</span>
|
|
121
|
-
<span class="empty-desc">${desc}</span>
|
|
122
|
-
</td>
|
|
123
|
-
</tr>
|
|
124
|
-
`;
|
|
125
|
-
}
|
|
126
|
-
function renderToolbar(p) {
|
|
127
|
-
const countLabel = p.query ? `${p.filteredTotal} de ${p.totalRows}` : `${p.totalRows} registros`;
|
|
128
|
-
return html`
|
|
129
|
-
<div class="tbl-toolbar">
|
|
130
|
-
${p.toolbarTitle ? html`<span class="tbl-toolbar-title">${p.toolbarTitle}</span>` : nothing}
|
|
131
|
-
<span class="tbl-toolbar-count">${countLabel}</span>
|
|
132
|
-
<input
|
|
133
|
-
class="tbl-toolbar-search"
|
|
134
|
-
type="search"
|
|
135
|
-
placeholder="Buscar…"
|
|
136
|
-
.value="${p.query}"
|
|
137
|
-
@input="${(e) => p.onSearch(e.target.value)}"
|
|
138
|
-
>
|
|
139
|
-
<slot name="toolbar-actions"></slot>
|
|
140
|
-
</div>
|
|
141
|
-
`;
|
|
142
|
-
}
|
|
143
|
-
function buildPageNumbers(current, total) {
|
|
144
|
-
if (total <= 7) return Array.from({ length: total }, (_, i) => i + 1);
|
|
145
|
-
const pages = [1];
|
|
146
|
-
if (current > 3) pages.push("…");
|
|
147
|
-
const lo = Math.max(2, current - 1);
|
|
148
|
-
const hi = Math.min(total - 1, current + 1);
|
|
149
|
-
for (let i = lo; i <= hi; i++) pages.push(i);
|
|
150
|
-
if (current < total - 2) pages.push("…");
|
|
151
|
-
pages.push(total);
|
|
152
|
-
return pages;
|
|
153
|
-
}
|
|
154
|
-
function renderPagination(p) {
|
|
155
|
-
if (p.pageSize <= 0 || p.totalPages <= 1) return html``;
|
|
156
|
-
const start = (p.page - 1) * p.pageSize + 1;
|
|
157
|
-
const end = Math.min(p.page * p.pageSize, p.filteredTotal);
|
|
158
|
-
const pages = buildPageNumbers(p.page, p.totalPages);
|
|
159
|
-
return html`
|
|
160
|
-
<div class="tbl-pagination">
|
|
161
|
-
<span class="pag-info">${start}–${end} de ${p.filteredTotal}</span>
|
|
162
|
-
|
|
163
|
-
<button class="pag-btn" ?disabled="${p.page <= 1}"
|
|
164
|
-
@click="${() => p.onPageChange(p.page - 1)}">‹</button>
|
|
165
|
-
|
|
166
|
-
${pages.map((pg) => pg === "…" ? html`<span class="pag-sep">…</span>` : html`
|
|
167
|
-
<button class="pag-btn ${p.page === pg ? "is-active" : ""}"
|
|
168
|
-
@click="${() => p.onPageChange(pg)}">${pg}</button>
|
|
169
|
-
`)}
|
|
170
|
-
|
|
171
|
-
<button class="pag-btn" ?disabled="${p.page >= p.totalPages}"
|
|
172
|
-
@click="${() => p.onPageChange(p.page + 1)}">›</button>
|
|
173
|
-
</div>
|
|
174
|
-
`;
|
|
175
|
-
}
|
|
176
|
-
function dataTableTemplate(p) {
|
|
177
|
-
const colSpan = p.columns.length + (p.selectable ? 1 : 0);
|
|
178
|
-
const wrapCls = `tbl-wrap${p.stickyHead ? " tbl-sticky-head" : ""}`;
|
|
179
|
-
return html`
|
|
180
|
-
${p.toolbar ? renderToolbar(p) : nothing}
|
|
181
|
-
|
|
182
|
-
<div class="${wrapCls}">
|
|
183
|
-
<table>
|
|
184
|
-
${p.caption ? html`<caption>${p.caption}</caption>` : nothing}
|
|
185
|
-
|
|
186
|
-
<!-- THEAD -->
|
|
187
|
-
<thead>
|
|
188
|
-
<tr>
|
|
189
|
-
${p.selectable ? html`
|
|
190
|
-
<th class="cell-check">
|
|
191
|
-
<input type="checkbox"
|
|
192
|
-
.indeterminate="${p.someSelected}"
|
|
193
|
-
.checked="${p.allSelected}"
|
|
194
|
-
@change="${(e) => p.onSelectAll(e.target.checked, p.data.length)}">
|
|
195
|
-
</th>
|
|
196
|
-
` : nothing}
|
|
197
|
-
|
|
198
|
-
${p.columns.map((col) => html`
|
|
199
|
-
<th class="${thClasses(col, p.sortKey, p.sortDir)}"
|
|
200
|
-
@click="${col.sortable ? () => p.onSort(col.key) : nothing}">
|
|
201
|
-
${col.header}
|
|
202
|
-
</th>
|
|
203
|
-
`)}
|
|
204
|
-
</tr>
|
|
205
|
-
</thead>
|
|
206
|
-
|
|
207
|
-
<!-- TBODY -->
|
|
208
|
-
<tbody>
|
|
209
|
-
${p.loading ? renderSkeleton(p.skeletonRows, p.columns, p.selectable) : p.data.length === 0 ? renderEmpty(p.emptyTitle, p.emptyDesc, colSpan) : p.data.map((row, idx) => {
|
|
210
|
-
const globalIdx = (p.page - 1) * (p.pageSize || 0) + idx;
|
|
211
|
-
return html`
|
|
212
|
-
<tr class="${rowClass(row, globalIdx, p.selected)}">
|
|
213
|
-
${p.selectable ? html`
|
|
214
|
-
<td class="cell-check">
|
|
215
|
-
<input type="checkbox"
|
|
216
|
-
.checked="${p.selected.has(globalIdx)}"
|
|
217
|
-
@change="${(e) => p.onSelectRow(globalIdx, e.target.checked)}">
|
|
218
|
-
</td>
|
|
219
|
-
` : nothing}
|
|
220
|
-
|
|
221
|
-
${p.columns.map((col) => html`
|
|
222
|
-
<td class="${tdClasses(col)}">
|
|
223
|
-
${renderCell(col, row, globalIdx, p.onRowAction)}
|
|
224
|
-
</td>
|
|
225
|
-
`)}
|
|
226
|
-
</tr>
|
|
227
|
-
`;
|
|
228
|
-
})}
|
|
229
|
-
</tbody>
|
|
230
|
-
</table>
|
|
231
|
-
</div>
|
|
232
|
-
|
|
233
|
-
${renderPagination(p)}
|
|
234
|
-
<slot name="pagination"></slot>
|
|
235
|
-
`;
|
|
236
|
-
}
|
|
1
|
+
const componentCss = '@layer tokens,reset,components;@layer reset{*,*:before,*:after{box-sizing:border-box}}@layer components{:host([variant="bar"]),:host(:not([variant])){display:block;position:absolute;bottom:-1px;left:0;width:0%;height:2px;pointer-events:none;z-index:var(--z-raised);transition:width 80ms linear;background:var(--rp-color)}:host([variant="bar"]):after,:host(:not([variant])):after{content:"";position:absolute;right:-8px;top:50%;transform:translateY(-50%);width:16px;height:5px;border-radius:var(--radius-full);background:var(--rp-glow);filter:blur(3px);opacity:0;transition:opacity var(--duration-slow)}:host([variant="bar"][active]):after,:host(:not([variant])[active]):after{opacity:1}:host([variant="line"]){display:block;position:absolute;bottom:0;left:0;width:0%;height:1px;pointer-events:none;z-index:var(--z-raised);transition:width 80ms linear;background:var(--rp-color);opacity:.6}:host([variant="dots"]){display:inline-flex;align-items:center;gap:5px}.rp-dot{width:5px;height:5px;border-radius:var(--radius-full);background:var(--border-default);transition:background var(--duration-slow) var(--ease-out),transform var(--duration-slow) var(--ease-out),opacity var(--duration-slow);flex-shrink:0}.rp-dot.is-done{background:var(--rp-color);transform:scale(1.2)}.rp-dot.is-current{background:var(--rp-color-light);transform:scale(1.4);box-shadow:0 0 0 2px var(--rp-glow)}:host([variant="ring"]){display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.rp-ring-svg{display:block;transform:rotate(-90deg);overflow:visible}.rp-ring-track{fill:none;stroke:var(--border-subtle);stroke-width:2}.rp-ring-fill{fill:none;stroke:var(--rp-color);stroke-width:2;stroke-linecap:round;transition:stroke-dashoffset 80ms linear}:host([variant="vertical"]){display:block;position:fixed;left:0;top:0;width:2px;height:0%;background:linear-gradient(to bottom,var(--rp-color),var(--rp-color-light));z-index:var(--z-modal);pointer-events:none;transition:height 80ms linear}:host([variant="vertical"]):after{content:"";position:absolute;bottom:-6px;left:-3px;width:8px;height:8px;border-radius:var(--radius-full);background:var(--rp-color-light);box-shadow:0 0 6px var(--rp-glow)}:host,:host([tone="kaki"]){--rp-color: var(--color-kaki-500);--rp-color-light: var(--color-kaki-400);--rp-glow: rgb(217, 114, 52, .25)}:host([tone="celadon"]){--rp-color: var(--color-celadon-500);--rp-color-light: var(--color-celadon-400);--rp-glow: rgb(53, 113, 100, .25)}:host([tone="ink"]){--rp-color: var(--color-washi-800);--rp-color-light: var(--color-washi-700);--rp-glow: rgb(61, 51, 42, .2)}:host([tone="kintsugi"]){--rp-color: var(--color-kaki-500);--rp-color-light: var(--color-kaki-300);--rp-glow: oklch(65% .1 50deg / .55)}:host([tone="kintsugi"][variant="bar"]),:host([tone="kintsugi"]:not([variant])){background:linear-gradient(90deg,var(--color-kaki-600) 0%,var(--color-kaki-500) 30%,var(--color-kaki-300) 65%,var(--color-kaki-400) 100%);height:3px}:host([tone="kintsugi"][variant="bar"]):before,:host([tone="kintsugi"]:not([variant])):before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(90deg,transparent 0%,oklch(92% .04 60deg / .75) 45%,oklch(98% .01 60deg / .9) 50%,oklch(92% .04 60deg / .75) 55%,transparent 100%);animation:rp-kintsugi-shimmer 3s cubic-bezier(.4,0,.6,1) infinite;pointer-events:none}:host([tone="kintsugi"][variant="bar"][active]):after,:host([tone="kintsugi"]:not([variant])[active]):after{width:24px;height:8px;background:#c07c56a6;filter:blur(5px)}:host([tone="kintsugi"][variant="line"]){background:linear-gradient(90deg,var(--color-kaki-600) 0%,var(--color-kaki-300) 60%,var(--color-kaki-500) 100%);opacity:.85;height:1.5px}:host([tone="kintsugi"][variant="vertical"]){background:linear-gradient(to bottom,var(--color-kaki-600) 0%,var(--color-kaki-400) 45%,var(--color-kaki-300) 75%,var(--color-kaki-500) 100%);width:3px}:host([tone="kintsugi"][variant="vertical"]):after{width:10px;height:10px;background:var(--color-kaki-300);box-shadow:0 0 8px #c07c56b3,0 0 16px #c07c5659}@keyframes rp-kintsugi-shimmer{0%{transform:translate(-120%);opacity:0}15%{opacity:1}85%{opacity:1}to{transform:translate(120%);opacity:0}}}';
|
|
237
2
|
export {
|
|
238
|
-
|
|
3
|
+
componentCss as default
|
|
239
4
|
};
|
|
240
5
|
//# sourceMappingURL=index329.js.map
|
package/dist/index329.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index329.js","sources":["../src/components/organisms/data-table/lib-data-table.html.ts"],"sourcesContent":["import { html, nothing, TemplateResult } from 'lit';\nimport type {\n TableColumn,\n TableRowData,\n TableVariant,\n TableSize,\n TableBadgeTone,\n} from './lib-data-table.types';\n\n/* ── Template Props ─────────────────────────────────────── */\nexport interface DataTableTemplateProps {\n columns: TableColumn[];\n data: TableRowData[];\n filteredTotal: number;\n totalRows: number;\n variant: TableVariant;\n size: TableSize;\n dark: boolean;\n loading: boolean;\n selectable: boolean;\n stickyHead: boolean;\n caption: string;\n emptyTitle: string;\n emptyDesc: string;\n toolbar: boolean;\n toolbarTitle: string;\n skeletonRows: number;\n sortKey: string;\n sortDir: 'asc' | 'desc';\n query: string;\n selected: Set<number>;\n allSelected: boolean;\n someSelected: boolean;\n page: number;\n pageSize: number;\n totalPages: number;\n onSort: (key: string) => void;\n onSearch: (q: string) => void;\n onSelectAll: (checked: boolean, total: number) => void;\n onSelectRow: (idx: number, checked: boolean) => void;\n onRowAction: (row: TableRowData, idx: number) => void;\n onPageChange: (p: number) => void;\n}\n\n/* ── Helpers: Cell renderers ───────────────────────────── */\n\nfunction renderBadge(value: unknown, tone: string): TemplateResult {\n const label = String(value ?? '');\n return html`<span class=\"cell-badge tone-${tone}\">${label}</span>`;\n}\n\nfunction renderProgress(value: unknown, tone: 'kaki' | 'celadon' | ''): TemplateResult {\n const pct = Math.min(100, Math.max(0, Number(value) || 0));\n const toneClass = tone ? `tone-${tone}` : '';\n return html`\n <div class=\"cell-progress\">\n <div class=\"progress-bar\">\n <div class=\"progress-fill ${toneClass}\" style=\"width:${pct}%\"></div>\n </div>\n <span class=\"progress-val\">${pct}%</span>\n </div>\n `;\n}\n\nfunction renderAvatar(row: TableRowData, col: TableColumn): TemplateResult {\n const name = String(row[col.key] ?? '');\n const initials = col.initialsKey\n ? String(row[col.initialsKey] ?? '').slice(0, 2).toUpperCase()\n : name.split(' ').map(w => w[0]).join('').slice(0, 2).toUpperCase();\n const hint = col.hintKey ? String(row[col.hintKey] ?? '') : '';\n\n return html`\n <div class=\"cell-avatar\">\n <div class=\"avatar-circle\">${initials}</div>\n <div class=\"avatar-text\">\n <span class=\"avatar-name\">${name}</span>\n ${hint ? html`<span class=\"avatar-hint\">${hint}</span>` : nothing}\n </div>\n </div>\n `;\n}\n\nfunction renderActionsBtn(row: TableRowData, idx: number, onRowAction: (r: TableRowData, i: number) => void): TemplateResult {\n return html`\n <button class=\"actions-btn\"\n aria-label=\"Acciones\"\n @click=\"${(e: Event):void => { e.stopPropagation(); onRowAction(row, idx); }}\"\n >⋯</button>\n `;\n}\n\nfunction renderCell(col: TableColumn, row: TableRowData, idx: number, onRowAction: (r: TableRowData, i: number) => void): TemplateResult {\n const value = row[col.key];\n\n switch (col.type) {\n case 'badge': {\n const tone = col.toneKey\n ? String(row[col.toneKey] ?? 'inactive')\n : (col.badgeTone ?? 'inactive');\n return renderBadge(value, tone as TableBadgeTone);\n }\n case 'progress':\n return renderProgress(value, col.progressTone ?? '');\n case 'avatar':\n return renderAvatar(row, col);\n case 'actions':\n return renderActionsBtn(row, idx, onRowAction);\n case 'mono':\n return html`<span class=\"cell-mono\">${value ?? '—'}</span>`;\n default:\n return html`${value ?? '—'}`;\n }\n}\n\n/* ── Helpers: Structural ───────────────────────────────── */\n\nfunction thClasses(col: TableColumn, sortKey: string, sortDir: 'asc' | 'desc'): string {\n const parts: string[] = [];\n if (col.type === 'num') parts.push('cell-num', 'is-num');\n if (col.sticky) parts.push('col-sticky');\n if (col.sortable) {\n parts.push('is-sortable');\n if (sortKey === col.key) parts.push(sortDir === 'asc' ? 'sort-asc' : 'sort-desc');\n }\n return parts.join(' ');\n}\n\nfunction tdClasses(col: TableColumn): string {\n const parts: string[] = [];\n if (col.type === 'num') parts.push('cell-num');\n if (col.type === 'actions') parts.push('cell-actions');\n if (col.sticky) parts.push('col-sticky');\n if (col.truncate) parts.push('cell-truncate');\n return parts.join(' ');\n}\n\nfunction rowClass(row: TableRowData, idx: number, selected: Set<number>): string {\n const state = row._state;\n const isSelected = selected.has(idx) || state === 'selected';\n const parts: string[] = [];\n if (isSelected) parts.push('is-selected');\n else if (state) parts.push(`is-${state}`);\n return parts.join(' ');\n}\n\n/* ── Skeleton rows ───────────────────────────────────────── */\nconst WIDTHS = ['w-80', 'w-60', 'w-40', 'w-60', 'w-80'] as const;\n\nfunction renderSkeletonCell(col: TableColumn, idx: number): TemplateResult {\n const w = WIDTHS[idx % WIDTHS.length] ?? 'w-60';\n if (col.type === 'avatar') return html`\n <div class=\"skel-cell\">\n <div class=\"skel-avatar\"></div>\n <div style=\"flex:1;display:flex;flex-direction:column;gap:4px;\">\n <div class=\"skel-line ${w}\"></div>\n <div class=\"skel-line w-40\" style=\"height:7px;\"></div>\n </div>\n </div>`;\n if (col.type === 'badge') return html`<div class=\"skel-badge\"></div>`;\n if (col.type === 'num') return html`<div class=\"skel-line ${w}\" style=\"margin-left:auto;\"></div>`;\n return html`<div class=\"skel-line ${w}\"></div>`;\n}\n\nfunction renderSkeleton(count: number, cols: TableColumn[], selectable: boolean): TemplateResult {\n return html`${Array.from({ length: count }, (_, r) => html`\n <tr class=\"tbl-tr\">\n ${selectable ? html`<td class=\"cell-check\"></td>` : nothing}\n ${cols.map((col, c) => html`\n <td class=\"${tdClasses(col)}\" style=\"${col.type === 'actions' ? '' : ''}\">\n ${renderSkeletonCell(col, r + c)}\n </td>\n `)}\n </tr>\n `)}`;\n}\n\n/* ── Empty state ─────────────────────────────────────────── */\nfunction renderEmpty(title: string, desc: string, colSpan: number): TemplateResult {\n return html`\n <tr class=\"empty-row\">\n <td colspan=\"${colSpan}\">\n <span class=\"empty-icon\">◯</span>\n <span class=\"empty-title\">${title}</span>\n <span class=\"empty-desc\">${desc}</span>\n </td>\n </tr>\n `;\n}\n\n/* ── Toolbar ─────────────────────────────────────────────── */\nfunction renderToolbar(p: DataTableTemplateProps): TemplateResult {\n const countLabel = p.query\n ? `${p.filteredTotal} de ${p.totalRows}`\n : `${p.totalRows} registros`;\n\n return html`\n <div class=\"tbl-toolbar\">\n ${p.toolbarTitle ? html`<span class=\"tbl-toolbar-title\">${p.toolbarTitle}</span>` : nothing}\n <span class=\"tbl-toolbar-count\">${countLabel}</span>\n <input\n class=\"tbl-toolbar-search\"\n type=\"search\"\n placeholder=\"Buscar…\"\n .value=\"${p.query}\"\n @input=\"${(e: Event):void => p.onSearch((e.target as HTMLInputElement).value)}\"\n >\n <slot name=\"toolbar-actions\"></slot>\n </div>\n `;\n}\n\n/* ── Built-in pagination bar ─────────────────────────────── */\nfunction buildPageNumbers(current: number, total: number): (number | '…')[] {\n if (total <= 7) return Array.from({ length: total }, (_, i) => i + 1);\n const pages: (number | '…')[] = [1];\n if (current > 3) pages.push('…');\n const lo = Math.max(2, current - 1);\n const hi = Math.min(total - 1, current + 1);\n for (let i = lo; i <= hi; i++) pages.push(i);\n if (current < total - 2) pages.push('…');\n pages.push(total);\n return pages;\n}\n\nfunction renderPagination(p: DataTableTemplateProps): TemplateResult {\n if (p.pageSize <= 0 || p.totalPages <= 1) return html``;\n const start = (p.page - 1) * p.pageSize + 1;\n const end = Math.min(p.page * p.pageSize, p.filteredTotal);\n const pages = buildPageNumbers(p.page, p.totalPages);\n\n return html`\n <div class=\"tbl-pagination\">\n <span class=\"pag-info\">${start}–${end} de ${p.filteredTotal}</span>\n\n <button class=\"pag-btn\" ?disabled=\"${p.page <= 1}\"\n @click=\"${():void => p.onPageChange(p.page - 1)}\">‹</button>\n\n ${pages.map(pg => pg === '…'\n ? html`<span class=\"pag-sep\">…</span>`\n : html`\n <button class=\"pag-btn ${p.page === pg ? 'is-active' : ''}\"\n @click=\"${():void => p.onPageChange(pg as number)}\">${pg}</button>\n `)}\n\n <button class=\"pag-btn\" ?disabled=\"${p.page >= p.totalPages}\"\n @click=\"${():void => p.onPageChange(p.page + 1)}\">›</button>\n </div>\n `;\n}\n\n/* ── Main template ────────────────────────────────────────── */\nexport function dataTableTemplate(p: DataTableTemplateProps): TemplateResult {\n const colSpan = p.columns.length + (p.selectable ? 1 : 0);\n const wrapCls = `tbl-wrap${p.stickyHead ? ' tbl-sticky-head' : ''}`;\n\n return html`\n ${p.toolbar ? renderToolbar(p) : nothing}\n\n <div class=\"${wrapCls}\">\n <table>\n ${p.caption ? html`<caption>${p.caption}</caption>` : nothing}\n\n <!-- THEAD -->\n <thead>\n <tr>\n ${p.selectable ? html`\n <th class=\"cell-check\">\n <input type=\"checkbox\"\n .indeterminate=\"${p.someSelected}\"\n .checked=\"${p.allSelected}\"\n @change=\"${(e: Event):void =>\n p.onSelectAll((e.target as HTMLInputElement).checked, p.data.length)}\">\n </th>\n ` : nothing}\n\n ${p.columns.map(col => html`\n <th class=\"${thClasses(col, p.sortKey, p.sortDir)}\"\n @click=\"${col.sortable ? ():void => p.onSort(col.key) : nothing}\">\n ${col.header}\n </th>\n `)}\n </tr>\n </thead>\n\n <!-- TBODY -->\n <tbody>\n ${p.loading\n ? renderSkeleton(p.skeletonRows, p.columns, p.selectable)\n : p.data.length === 0\n ? renderEmpty(p.emptyTitle, p.emptyDesc, colSpan)\n : p.data.map((row, idx) => {\n const globalIdx = (p.page - 1) * (p.pageSize || 0) + idx;\n return html`\n <tr class=\"${rowClass(row, globalIdx, p.selected)}\">\n ${p.selectable ? html`\n <td class=\"cell-check\">\n <input type=\"checkbox\"\n .checked=\"${p.selected.has(globalIdx)}\"\n @change=\"${(e: Event):void =>\n p.onSelectRow(globalIdx, (e.target as HTMLInputElement).checked)}\">\n </td>\n ` : nothing}\n\n ${p.columns.map(col => html`\n <td class=\"${tdClasses(col)}\">\n ${renderCell(col, row, globalIdx, p.onRowAction)}\n </td>\n `)}\n </tr>\n `;\n })\n }\n </tbody>\n </table>\n </div>\n\n ${renderPagination(p)}\n <slot name=\"pagination\"></slot>\n `;\n}"],"names":[],"mappings":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AA,4BACvB,WAAW,KAAK,KAAK,WAAW,EAAE,WAAW,CAAC;AAAA;AAAA,uBAEnD,CAAC;AAAA;AAAA;AAAA,EAGR,CAAC,CACP;AAAA;AAAA;AAAA;AAAA;AAAA,MAKJ,iBAAiB,CAAC,CAAC;AAAA;AAAA;AAGzB;"}
|
|
1
|
+
{"version":3,"file":"index329.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index33.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { unsafeCSS, css, LitElement } from "lit";
|
|
2
2
|
import { property, customElement } from "lit/decorators.js";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import radioCss from "./index251.js";
|
|
3
|
+
import { renderQuote } from "./index322.js";
|
|
4
|
+
import componentCss from "./index323.js";
|
|
6
5
|
import sharedTokens from "./index196.js";
|
|
7
6
|
var __defProp = Object.defineProperty;
|
|
8
7
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -14,77 +13,42 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
14
13
|
if (kind && result) __defProp(target, key, result);
|
|
15
14
|
return result;
|
|
16
15
|
};
|
|
17
|
-
let
|
|
16
|
+
let LibQuote = class extends LitElement {
|
|
18
17
|
constructor() {
|
|
19
|
-
super();
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
23
|
-
this.
|
|
24
|
-
this.label = "";
|
|
25
|
-
this.sublabel = "";
|
|
18
|
+
super(...arguments);
|
|
19
|
+
this.text = "";
|
|
20
|
+
this.accent = "";
|
|
21
|
+
this.cite = "";
|
|
22
|
+
this.surface = "dark";
|
|
26
23
|
this.size = "md";
|
|
27
|
-
this.variant = "default";
|
|
28
|
-
this._radioId = generateUniqueId("lib-radio-");
|
|
29
|
-
}
|
|
30
|
-
_handleChange(e) {
|
|
31
|
-
const input = e.target;
|
|
32
|
-
this.checked = input.checked;
|
|
33
|
-
this.dispatchEvent(
|
|
34
|
-
new CustomEvent("change", {
|
|
35
|
-
detail: { checked: this.checked, value: this.value },
|
|
36
|
-
bubbles: true,
|
|
37
|
-
composed: true
|
|
38
|
-
})
|
|
39
|
-
);
|
|
40
24
|
}
|
|
41
25
|
render() {
|
|
42
|
-
return
|
|
43
|
-
radioId: this._radioId,
|
|
44
|
-
name: this.name,
|
|
45
|
-
value: this.value,
|
|
46
|
-
checked: this.checked,
|
|
47
|
-
disabled: this.disabled,
|
|
48
|
-
label: this.label,
|
|
49
|
-
sublabel: this.sublabel,
|
|
50
|
-
size: this.size,
|
|
51
|
-
variant: this.variant,
|
|
52
|
-
onChange: this._handleChange.bind(this)
|
|
53
|
-
});
|
|
26
|
+
return renderQuote(this);
|
|
54
27
|
}
|
|
55
28
|
};
|
|
56
|
-
|
|
29
|
+
LibQuote.styles = [
|
|
57
30
|
css`${unsafeCSS(sharedTokens)}`,
|
|
58
|
-
css`${unsafeCSS(
|
|
31
|
+
css`${unsafeCSS(componentCss)}`
|
|
59
32
|
];
|
|
60
|
-
__decorateClass([
|
|
61
|
-
property({ type: Boolean, reflect: true })
|
|
62
|
-
], LibRadio.prototype, "checked", 2);
|
|
63
|
-
__decorateClass([
|
|
64
|
-
property({ type: Boolean, reflect: true })
|
|
65
|
-
], LibRadio.prototype, "disabled", 2);
|
|
66
|
-
__decorateClass([
|
|
67
|
-
property({ type: String })
|
|
68
|
-
], LibRadio.prototype, "name", 2);
|
|
69
33
|
__decorateClass([
|
|
70
34
|
property({ type: String })
|
|
71
|
-
],
|
|
35
|
+
], LibQuote.prototype, "text", 2);
|
|
72
36
|
__decorateClass([
|
|
73
37
|
property({ type: String })
|
|
74
|
-
],
|
|
38
|
+
], LibQuote.prototype, "accent", 2);
|
|
75
39
|
__decorateClass([
|
|
76
40
|
property({ type: String })
|
|
77
|
-
],
|
|
41
|
+
], LibQuote.prototype, "cite", 2);
|
|
78
42
|
__decorateClass([
|
|
79
43
|
property({ type: String, reflect: true })
|
|
80
|
-
],
|
|
44
|
+
], LibQuote.prototype, "surface", 2);
|
|
81
45
|
__decorateClass([
|
|
82
46
|
property({ type: String, reflect: true })
|
|
83
|
-
],
|
|
84
|
-
|
|
85
|
-
customElement("lib-
|
|
86
|
-
],
|
|
47
|
+
], LibQuote.prototype, "size", 2);
|
|
48
|
+
LibQuote = __decorateClass([
|
|
49
|
+
customElement("lib-quote")
|
|
50
|
+
], LibQuote);
|
|
87
51
|
export {
|
|
88
|
-
|
|
52
|
+
LibQuote
|
|
89
53
|
};
|
|
90
54
|
//# sourceMappingURL=index33.js.map
|
package/dist/index33.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index33.js","sources":["../src/components/atoms/
|
|
1
|
+
{"version":3,"file":"index33.js","sources":["../src/components/atoms/quote/lib-quote.component.ts"],"sourcesContent":["import { LitElement, css, unsafeCSS, type TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { renderQuote } from './lib-quote.html';\nimport componentCss from './lib-quote.css?inline';\nimport sharedTokens from '../../../styles/shared/tokens.css?inline';\n\n/**\n * `<lib-quote>` — Cita display editorial.\n *\n * Blockquote en Cormorant Garamond con acento itálico en kaki y\n * atribución en DM Mono. Patrón recurrente en hero sections, CTAs\n * y secciones de filosofía del sistema Shibui.\n *\n * @tag lib-quote\n *\n * @attr {string} text - Primera línea de la cita (alternativa al slot).\n * @attr {string} accent - Segunda línea en itálica kaki.\n * @attr {string} cite - Atribución (ej: \"— Principio Shibui · 渋い\").\n * @attr {'dark'|'light'|'washi'} surface - Superficie de fondo. Default: `dark`.\n * @attr {'sm'|'md'|'lg'} size - Tamaño tipográfico fluido. Default: `md`.\n *\n * @slot - Primera línea de la cita como rich content (alternativa al atributo `text`).\n *\n * @csspart blockquote - El elemento blockquote raíz.\n * @csspart text - El párrafo de la cita.\n * @csspart accent - El em de la segunda línea.\n * @csspart cite - El elemento cite de atribución.\n *\n * @cssprop --q-text-color - Color del texto principal.\n * @cssprop --q-accent-color - Color del acento itálico.\n * @cssprop --q-cite-color - Color de la atribución.\n * @cssprop --q-size - Tamaño de fuente (sobreescribe el atributo `size`).\n *\n * @example\n * <lib-quote\n * text=\"Lo bello no se anuncia.\"\n * accent=\"Se descubre con pausa.\"\n * cite=\"— Principio Shibui · 渋い\"\n * surface=\"dark\"\n * ></lib-quote>\n *\n * <!-- Con slot -->\n * <lib-quote accent=\"Se descubre con pausa.\" cite=\"— Principio Shibui\">\n * Lo bello no se anuncia.\n * </lib-quote>\n */\n@customElement('lib-quote')\nexport class LibQuote extends LitElement {\n\n static override styles = [\n css`${unsafeCSS(sharedTokens)}`,\n css`${unsafeCSS(componentCss)}`,\n ];\n\n /** Primera línea de la cita */\n @property({ type: String })\n text = '';\n\n /** Segunda línea en itálica kaki */\n @property({ type: String })\n accent = '';\n\n /** Atribución */\n @property({ type: String })\n cite = '';\n\n /** Superficie de fondo */\n @property({ type: String, reflect: true })\n surface: 'dark' | 'light' | 'washi' = 'dark';\n\n /** Tamaño tipográfico fluido */\n @property({ type: String, reflect: true })\n size: 'sm' | 'md' | 'lg' = 'md';\n\n protected override render(): TemplateResult {\n return renderQuote(this);\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'lib-quote': LibQuote;\n }\n}"],"names":[],"mappings":";;;;;;;;;;;;;;;AA+CO,IAAM,WAAN,cAAuB,WAAW;AAAA,EAAlC,cAAA;AAAA,UAAA,GAAA,SAAA;AASL,SAAA,OAAO;AAIP,SAAA,SAAS;AAIT,SAAA,OAAO;AAIP,SAAA,UAAsC;AAItC,SAAA,OAA2B;AAAA,EAAA;AAAA,EAER,SAAyB;AAC1C,WAAO,YAAY,IAAI;AAAA,EACzB;AACF;AA9Ba,SAEK,SAAS;AAAA,EACvB,MAAM,UAAU,YAAY,CAAC;AAAA,EAC7B,MAAM,UAAU,YAAY,CAAC;AAC/B;AAIA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GARf,SASX,WAAA,QAAA,CAAA;AAIA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAZf,SAaX,WAAA,UAAA,CAAA;AAIA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAhBf,SAiBX,WAAA,QAAA,CAAA;AAIA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,SAAS,MAAM;AAAA,GApB9B,SAqBX,WAAA,WAAA,CAAA;AAIA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,SAAS,MAAM;AAAA,GAxB9B,SAyBX,WAAA,QAAA,CAAA;AAzBW,WAAN,gBAAA;AAAA,EADN,cAAc,WAAW;AAAA,GACb,QAAA;"}
|
package/dist/index330.js
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { html } from "lit";
|
|
2
|
-
|
|
2
|
+
const rippleTemplate = (ripples) => {
|
|
3
3
|
return html`
|
|
4
|
-
|
|
5
|
-
<
|
|
6
|
-
|
|
4
|
+
${ripples.map((r) => html`
|
|
5
|
+
<span class="ripple" style="
|
|
6
|
+
width: ${r.size}px;
|
|
7
|
+
height: ${r.size}px;
|
|
8
|
+
left: ${r.x}px;
|
|
9
|
+
top: ${r.y}px;
|
|
10
|
+
"></span>
|
|
11
|
+
`)}
|
|
7
12
|
`;
|
|
8
|
-
}
|
|
13
|
+
};
|
|
9
14
|
export {
|
|
10
|
-
|
|
15
|
+
rippleTemplate
|
|
11
16
|
};
|
|
12
17
|
//# sourceMappingURL=index330.js.map
|
package/dist/index330.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index330.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index330.js","sources":["../src/components/atoms/ripple/lib-ripple.html.ts"],"sourcesContent":["import { html, TemplateResult } from 'lit';\nimport { RippleEffect } from './lib-ripple.component';\n\nexport const rippleTemplate = (ripples: RippleEffect[]): TemplateResult => {\n return html`\n ${ripples.map(r => html`\n <span class=\"ripple\" style=\"\n width: ${r.size}px;\n height: ${r.size}px;\n left: ${r.x}px;\n top: ${r.y}px;\n \"></span>\n `)}\n `;\n};"],"names":[],"mappings":";AAGO,MAAM,iBAAiB,CAAC,YAA4C;AACzE,SAAO;AAAA,MACH,QAAQ,IAAI,CAAA,MAAK;AAAA;AAAA,iBAEN,EAAE,IAAI;AAAA,kBACL,EAAE,IAAI;AAAA,gBACR,EAAE,CAAC;AAAA,eACJ,EAAE,CAAC;AAAA;AAAA,KAEb,CAAC;AAAA;AAEN;"}
|
package/dist/index331.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const
|
|
1
|
+
const styles = "@layer components{:host{display:block;position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden;pointer-events:none;border-radius:inherit;z-index:10}.ripple{position:absolute;border-radius:50%;background-color:var(--lib-ripple-color, orange);opacity:.2;transform:scale(0);animation:ripple-animation var(--duration-slower, .6s) var(--ease-out) forwards;pointer-events:none}@keyframes ripple-animation{to{transform:scale(1);opacity:0}}}";
|
|
2
2
|
export {
|
|
3
|
-
|
|
3
|
+
styles as default
|
|
4
4
|
};
|
|
5
5
|
//# sourceMappingURL=index331.js.map
|