wimui 0.23.5 → 0.23.6
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/data-display/Carousel/carousel.module.cjs +1 -1
- package/dist/components/data-display/Carousel/carousel.module.js +1 -1
- package/dist/components/layout/Header/header.module.cjs +1 -1
- package/dist/components/layout/Header/header.module.js +4 -4
- package/dist/components/media/Audio/audio.module.cjs +1 -1
- package/dist/components/media/Audio/audio.module.js +2 -2
- package/dist/components/media/Gallery/Gallery.cjs +1 -1
- package/dist/components/media/Gallery/Gallery.d.ts +2 -2
- package/dist/components/media/Gallery/Gallery.js +4 -7
- package/dist/components/media/Gallery/gallery.module.cjs +1 -1
- package/dist/components/media/Gallery/gallery.module.js +17 -18
- package/dist/components/media/Lightbox/Lightbox.d.ts +13 -0
- package/dist/llms-full.txt +3 -3
- package/dist/llms.txt +1 -1
- package/dist/styles.css +2 -2
- package/dist/wimui.umd.css +1 -1
- package/dist/wimui.umd.js +2 -2
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_root_kpbzt_3`,t=`_viewport_kpbzt_12`,n=`_track_kpbzt_16`,r=`_transition_kpbzt_20`,i=`_item_kpbzt_23`,a=`_hasAspectRatio_kpbzt_28`,o=`_control_kpbzt_42`,s=`_prev_kpbzt_72`,c=`_next_kpbzt_75`,l=`_indicators_kpbzt_79`,u=`_indicator_kpbzt_79`,d=`_active_kpbzt_104`,f={root:e,viewport:t,track:n,transition:r,item:i,hasAspectRatio:a,control:o,prev:s,next:c,indicators:l,indicator:u,active:d};exports.active=d,exports.control=o,exports.default=f,exports.hasAspectRatio=a,exports.indicator=u,exports.indicators=l,exports.item=i,exports.next=c,exports.prev=s,exports.root=e,exports.track=n,exports.transition=r,exports.viewport=t;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/data-display/Carousel/carousel.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_root_kpbzt_3", t = "_viewport_kpbzt_12", n = "_track_kpbzt_16", r = "_transition_kpbzt_20", i = "_item_kpbzt_23", a = "_hasAspectRatio_kpbzt_28", o = "_control_kpbzt_42", s = "_prev_kpbzt_72", c = "_next_kpbzt_75", l = "_indicators_kpbzt_79", u = "_indicator_kpbzt_79", d = "_active_kpbzt_104", f = {
|
|
4
4
|
root: e,
|
|
5
5
|
viewport: t,
|
|
6
6
|
track: n,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_root_1yx20_2`,t=`_fixed_1yx20_14`,n=`_sticky_1yx20_20`,r=`_bordered_1yx20_25`,i=`_glass_1yx20_28`,a=`_container_1yx20_43`,o=`_fluid_1yx20_56`,s=`_section_1yx20_60`,c=`_start_1yx20_65`,l=`_center_1yx20_68`,u=`_end_1yx20_71`,d={root:e,fixed:t,sticky:n,bordered:r,glass:i,"bg-surface":`_bg-surface_1yx20_33`,"bg-surface-variant":`_bg-surface-variant_1yx20_36`,"bg-transparent":`_bg-transparent_1yx20_39`,container:a,fluid:o,section:s,start:c,center:l,end:u};exports.bordered=r,exports.center=l,exports.container=a,exports.default=d,exports.end=u,exports.fixed=t,exports.fluid=o,exports.glass=i,exports.root=e,exports.section=s,exports.start=c,exports.sticky=n;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/layout/Header/header.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_root_1yx20_2", t = "_fixed_1yx20_14", n = "_sticky_1yx20_20", r = "_bordered_1yx20_25", i = "_glass_1yx20_28", a = "_container_1yx20_43", o = "_fluid_1yx20_56", s = "_section_1yx20_60", c = "_start_1yx20_65", l = "_center_1yx20_68", u = "_end_1yx20_71", d = {
|
|
4
4
|
root: e,
|
|
5
5
|
fixed: t,
|
|
6
6
|
sticky: n,
|
|
7
7
|
bordered: r,
|
|
8
8
|
glass: i,
|
|
9
|
-
"bg-surface": "_bg-
|
|
10
|
-
"bg-surface-variant": "_bg-surface-
|
|
11
|
-
"bg-transparent": "_bg-
|
|
9
|
+
"bg-surface": "_bg-surface_1yx20_33",
|
|
10
|
+
"bg-surface-variant": "_bg-surface-variant_1yx20_36",
|
|
11
|
+
"bg-transparent": "_bg-transparent_1yx20_39",
|
|
12
12
|
container: a,
|
|
13
13
|
fluid: o,
|
|
14
14
|
section: s,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_root_1x6tc_3`,t=`_inner_1x6tc_13`,n=`_radiusSm_1x6tc_23`,r=`_radiusMd_1x6tc_27`,i=`_radiusLg_1x6tc_31`,a=`_radiusFull_1x6tc_35`,o=`_shadow_1x6tc_39`,s=`_loading_1x6tc_43`,c=`_border_1x6tc_46`,l=`_fadeIn_1x6tc_49`,u=`_audio_1x6tc_49`,d=`_customControls_1x6tc_50`,f=`_metadata_1x6tc_51`,p=`_isLoaded_1x6tc_55`,m=`_caption_1x6tc_89`,h=`_custom_1x6tc_50`,g=`_visualizerCanvas_1x6tc_118`,_=`_cover_1x6tc_142`,v=`_info_1x6tc_149`,y=`_title_1x6tc_155`,b=`_artist_1x6tc_161`,x=`_badge_1x6tc_166`,S=`_controlsRow_1x6tc_189`,C=`_controlsGroup_1x6tc_196`,w=`_btn_1x6tc_200`,T=`_active_1x6tc_221`,E=`_btnText_1x6tc_225`,D=`_btnPlay_1x6tc_232`,O=`_time_1x6tc_246`,k=`_progressContainer_1x6tc_258`,A=`_progress_1x6tc_258`,j=`_progressFill_1x6tc_282`,M=`_volumeContainer_1x6tc_304`,N=`_volume_1x6tc_304`,P={root:e,inner:t,radiusSm:n,radiusMd:r,radiusLg:i,radiusFull:a,shadow:o,loading:s,border:c,fadeIn:l,audio:u,customControls:d,metadata:f,isLoaded:p,"skeleton-loading":`_skeleton-loading_1x6tc_1`,caption:m,custom:h,visualizerCanvas:g,cover:_,info:v,title:y,artist:b,badge:x,controlsRow:S,controlsGroup:C,btn:w,active:T,btnText:E,btnPlay:D,time:O,progressContainer:k,progress:A,progressFill:j,volumeContainer:M,volume:N};exports.active=T,exports.artist=b,exports.audio=u,exports.badge=x,exports.border=c,exports.btn=w,exports.btnPlay=D,exports.btnText=E,exports.caption=m,exports.controlsGroup=C,exports.controlsRow=S,exports.cover=_,exports.custom=h,exports.customControls=d,exports.default=P,exports.fadeIn=l,exports.info=v,exports.inner=t,exports.isLoaded=p,exports.loading=s,exports.metadata=f,exports.progress=A,exports.progressContainer=k,exports.progressFill=j,exports.radiusFull=a,exports.radiusLg=i,exports.radiusMd=r,exports.radiusSm=n,exports.root=e,exports.shadow=o,exports.time=O,exports.title=y,exports.visualizerCanvas=g,exports.volume=N,exports.volumeContainer=M;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/media/Audio/audio.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_root_1x6tc_3", t = "_inner_1x6tc_13", n = "_radiusSm_1x6tc_23", r = "_radiusMd_1x6tc_27", i = "_radiusLg_1x6tc_31", a = "_radiusFull_1x6tc_35", o = "_shadow_1x6tc_39", s = "_loading_1x6tc_43", c = "_border_1x6tc_46", l = "_fadeIn_1x6tc_49", u = "_audio_1x6tc_49", d = "_customControls_1x6tc_50", f = "_metadata_1x6tc_51", p = "_isLoaded_1x6tc_55", m = "_caption_1x6tc_89", h = "_custom_1x6tc_50", g = "_visualizerCanvas_1x6tc_118", _ = "_cover_1x6tc_142", v = "_info_1x6tc_149", y = "_title_1x6tc_155", b = "_artist_1x6tc_161", x = "_badge_1x6tc_166", S = "_controlsRow_1x6tc_189", C = "_controlsGroup_1x6tc_196", w = "_btn_1x6tc_200", T = "_active_1x6tc_221", E = "_btnText_1x6tc_225", D = "_btnPlay_1x6tc_232", O = "_time_1x6tc_246", k = "_progressContainer_1x6tc_258", A = "_progress_1x6tc_258", j = "_progressFill_1x6tc_282", M = "_volumeContainer_1x6tc_304", N = "_volume_1x6tc_304", P = {
|
|
4
4
|
root: e,
|
|
5
5
|
inner: t,
|
|
6
6
|
radiusSm: n,
|
|
@@ -15,7 +15,7 @@ var e = "_root_ey1aj_3", t = "_inner_ey1aj_12", n = "_radiusSm_ey1aj_22", r = "_
|
|
|
15
15
|
customControls: d,
|
|
16
16
|
metadata: f,
|
|
17
17
|
isLoaded: p,
|
|
18
|
-
"skeleton-loading": "_skeleton-
|
|
18
|
+
"skeleton-loading": "_skeleton-loading_1x6tc_1",
|
|
19
19
|
caption: m,
|
|
20
20
|
custom: h,
|
|
21
21
|
visualizerCanvas: g,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../icon/close.cjs"),r=require("../Icon/Icon.cjs"),i=require("../../form/Button/Button.cjs"),a=require("../../form/Checkbox/Checkbox.cjs"),o=require("./gallery.module.cjs");let s=require("react");s=e.__toESM(s,1);let c=require("classnames");c=e.__toESM(c,1);let l=require("react/jsx-runtime");var u=(0,s.createContext)(null),d=()=>{let e=(0,s.useContext)(u);if(!e)throw Error(`Gallery subcomponents must be used within Gallery`);return e},f=s.default.forwardRef(({items:e,columns:a=3,gap:d=`md`,aspect:f=`square`,selectable:m=!1,selected:h,defaultSelected:g=[],onSelectionChange:_,onItemClick:v,renderActions:y,className:b,style:x,...S},C)=>{let{t:w}=t.useWimTranslation(`components`),T=h!==void 0,[E,D]=(0,s.useState)(()=>new Set(g)),[O,k]=(0,s.useState)(0),A=(0,s.useRef)(null),j=(0,s.useRef)(null),[M,N]=(0,s.useState)(a),P=(0,s.useCallback)(e=>{j.current=e,typeof C==`function`?C(e):C&&(C.current=e)},[C]);(0,s.useEffect)(()=>{let e=j.current;if(!e)return;let t=new ResizeObserver(e=>{let t=e[0].contentRect.width;N(t<480?1:t<576?2:a)});return t.observe(e),()=>t.disconnect()},[a]);let F=(0,s.useMemo)(()=>T?new Set(h):E,[T,h,E]),I=(0,s.useCallback)(e=>{T||D(e),_?.(Array.from(e))},[T,_]),L=(0,s.useCallback)((t,n,r)=>{let i=new Set(F);if(r&&A.current!==null){let r=Math.min(A.current,n),a=Math.max(A.current,n),o=!F.has(t);for(let t=r;t<=a;t++)o?i.add(e[t].id):i.delete(e[t].id)}else i.has(t)?i.delete(t):i.add(t),A.current=n;I(i)},[F,e,I]),R=(0,s.useCallback)(()=>{I(new Set(e.map(e=>e.id)))},[e,I]),z=(0,s.useCallback)(()=>{I(new Set)},[I]),B=(0,s.useMemo)(()=>{let t=[];for(let n=0;n<e.length;n+=M)t.push({rowItems:e.slice(n,n+M),startIndex:n});return t},[e,M]),V=Array.from(F),H=V.length>0,U={"--gallery-columns":M,...x},W=t=>{let n=M,r=e.length,i=O;switch(t.key){case`ArrowRight`:t.preventDefault(),i=Math.min(O+1,r-1);break;case`ArrowLeft`:t.preventDefault(),i=Math.max(O-1,0);break;case`ArrowDown`:t.preventDefault(),i=Math.min(O+n,r-1);break;case`ArrowUp`:t.preventDefault(),i=Math.max(O-n,0);break;case`Home`:t.preventDefault(),i=0;break;case`End`:t.preventDefault(),i=r-1;break;case`Escape`:m&&(t.preventDefault(),z());break;case`a`:case`A`:m&&(t.ctrlKey||t.metaKey)&&(t.preventDefault(),R());break;default:return}i!==O&&(k(i),t.currentTarget.querySelectorAll(`[data-gallery-item]`)[i]?.focus())};return(0,l.jsx)(u.Provider,{value:{selectable:m,selectedIds:F,lastClickedIndex:A,items:e,toggleSelect:L,focusedIndex:O,setFocusedIndex:k,selectAll:R,clearSelection:z,onItemClick:v},children:(0,l.jsxs)(`div`,{ref:P,className:(0,c.default)(`wim-gallery`,o.default.root,b),...S,children:[m&&H&&(0,l.jsxs)(`div`,{className:o.default.toolbar,role:`toolbar`,"aria-label":w(`gallery.toolbar_label`),children:[(0,l.jsx)(`span`,{className:o.default.toolbarCount,children:w(`gallery.selected_count`,{count:V.length})}),(0,l.jsxs)(`div`,{className:o.default.toolbarActions,children:[y?.({selectedIds:V,clearSelection:z}),(0,l.jsx)(i.Button,{size:`sm`,variant:`ghost`,className:o.default.toolbarClear,onClick:z,"aria-label":w(`gallery.clear_selection`),icon:(0,l.jsx)(r.Icon,{component:n.default,size:`sm`})})]})]}),(0,l.jsx)(`div`,{className:(0,c.default)(o.default.grid,o.default[`gap-${d}`],o.default[`aspect-${f}`]),style:U,role:`grid`,"aria-multiselectable":m||void 0,"aria-label":w(`gallery.grid_label`),onKeyDown:W,tabIndex:0,children:B.map(({rowItems:e,startIndex:t},n)=>(0,l.jsx)(`div`,{role:`row`,style:{display:`contents`},children:e.map((e,n)=>(0,l.jsx)(p,{item:e,index:t+n},e.id))},n))})]})})});f.displayName=`Gallery`;var p=({item:e,index:n})=>{let{selectable:r,selectedIds:i,toggleSelect:s,focusedIndex:u,setFocusedIndex:f,onItemClick:p}=d(),{t:m}=t.useWimTranslation(`components`),h=i.has(e.id),g=u===n,_=
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../icon/close.cjs"),r=require("../Icon/Icon.cjs"),i=require("../../form/Button/Button.cjs"),a=require("../../form/Checkbox/Checkbox.cjs"),o=require("./gallery.module.cjs");let s=require("react");s=e.__toESM(s,1);let c=require("classnames");c=e.__toESM(c,1);let l=require("react/jsx-runtime");var u=(0,s.createContext)(null),d=()=>{let e=(0,s.useContext)(u);if(!e)throw Error(`Gallery subcomponents must be used within Gallery`);return e},f=s.default.forwardRef(({items:e,columns:a=3,gap:d=`md`,aspect:f=`square`,selectable:m=!1,selected:h,defaultSelected:g=[],onSelectionChange:_,onItemClick:v,renderActions:y,className:b,style:x,...S},C)=>{let{t:w}=t.useWimTranslation(`components`),T=h!==void 0,[E,D]=(0,s.useState)(()=>new Set(g)),[O,k]=(0,s.useState)(0),A=(0,s.useRef)(null),j=(0,s.useRef)(null),[M,N]=(0,s.useState)(a),P=(0,s.useCallback)(e=>{j.current=e,typeof C==`function`?C(e):C&&(C.current=e)},[C]);(0,s.useEffect)(()=>{let e=j.current;if(!e)return;let t=new ResizeObserver(e=>{let t=e[0].contentRect.width;N(t<480?1:t<576?2:a)});return t.observe(e),()=>t.disconnect()},[a]);let F=(0,s.useMemo)(()=>T?new Set(h):E,[T,h,E]),I=(0,s.useCallback)(e=>{T||D(e),_?.(Array.from(e))},[T,_]),L=(0,s.useCallback)((t,n,r)=>{let i=new Set(F);if(r&&A.current!==null){let r=Math.min(A.current,n),a=Math.max(A.current,n),o=!F.has(t);for(let t=r;t<=a;t++)o?i.add(e[t].id):i.delete(e[t].id)}else i.has(t)?i.delete(t):i.add(t),A.current=n;I(i)},[F,e,I]),R=(0,s.useCallback)(()=>{I(new Set(e.map(e=>e.id)))},[e,I]),z=(0,s.useCallback)(()=>{I(new Set)},[I]),B=(0,s.useMemo)(()=>{let t=[];for(let n=0;n<e.length;n+=M)t.push({rowItems:e.slice(n,n+M),startIndex:n});return t},[e,M]),V=Array.from(F),H=V.length>0,U={"--gallery-columns":M,...x},W=t=>{let n=M,r=e.length,i=O;switch(t.key){case`ArrowRight`:t.preventDefault(),i=Math.min(O+1,r-1);break;case`ArrowLeft`:t.preventDefault(),i=Math.max(O-1,0);break;case`ArrowDown`:t.preventDefault(),i=Math.min(O+n,r-1);break;case`ArrowUp`:t.preventDefault(),i=Math.max(O-n,0);break;case`Home`:t.preventDefault(),i=0;break;case`End`:t.preventDefault(),i=r-1;break;case`Escape`:m&&(t.preventDefault(),z());break;case`a`:case`A`:m&&(t.ctrlKey||t.metaKey)&&(t.preventDefault(),R());break;default:return}i!==O&&(k(i),t.currentTarget.querySelectorAll(`[data-gallery-item]`)[i]?.focus())};return(0,l.jsx)(u.Provider,{value:{selectable:m,selectedIds:F,lastClickedIndex:A,items:e,toggleSelect:L,focusedIndex:O,setFocusedIndex:k,selectAll:R,clearSelection:z,onItemClick:v},children:(0,l.jsxs)(`div`,{ref:P,className:(0,c.default)(`wim-gallery`,o.default.root,b),...S,children:[m&&H&&(0,l.jsxs)(`div`,{className:o.default.toolbar,role:`toolbar`,"aria-label":w(`gallery.toolbar_label`),children:[(0,l.jsx)(`span`,{className:o.default.toolbarCount,children:w(`gallery.selected_count`,{count:V.length})}),(0,l.jsxs)(`div`,{className:o.default.toolbarActions,children:[y?.({selectedIds:V,clearSelection:z}),(0,l.jsx)(i.Button,{size:`sm`,variant:`ghost`,className:o.default.toolbarClear,onClick:z,"aria-label":w(`gallery.clear_selection`),icon:(0,l.jsx)(r.Icon,{component:n.default,size:`sm`})})]})]}),(0,l.jsx)(`div`,{className:(0,c.default)(o.default.grid,o.default[`gap-${d}`],o.default[`aspect-${f}`]),style:U,role:`grid`,"aria-multiselectable":m||void 0,"aria-label":w(`gallery.grid_label`),onKeyDown:W,tabIndex:0,children:B.map(({rowItems:e,startIndex:t},n)=>(0,l.jsx)(`div`,{role:`row`,style:{display:`contents`},children:e.map((e,n)=>(0,l.jsx)(p,{item:e,index:t+n},e.id))},n))})]})})});f.displayName=`Gallery`;var p=({item:e,index:n})=>{let{selectable:r,selectedIds:i,toggleSelect:s,focusedIndex:u,setFocusedIndex:f,onItemClick:p}=d(),{t:m}=t.useWimTranslation(`components`),h=i.has(e.id),g=u===n,_=()=>{p?.(e,n),f(n)},v=t=>{t.stopPropagation(),s(e.id,n,t.shiftKey)},y=t=>{(t.key===` `||t.key===`Enter`)&&(t.preventDefault(),r&&t.key===` `?s(e.id,n,t.shiftKey):p?.(e,n))};return(0,l.jsxs)(`div`,{className:(0,c.default)(o.default.item,{[o.default.selected]:h}),role:`gridcell`,"aria-selected":r?h:void 0,tabIndex:g?0:-1,onClick:_,onKeyDown:y,onFocus:()=>f(n),"data-gallery-item":!0,children:[(0,l.jsxs)(`div`,{className:o.default.imageWrapper,children:[(0,l.jsx)(`img`,{src:e.src,alt:e.alt??e.title??``,className:o.default.image,draggable:!1}),r&&(0,l.jsx)(`div`,{className:o.default.checkboxOverlay,children:(0,l.jsx)(a.Checkbox,{checked:h,onChange:()=>{},onClick:v,"aria-label":m(h?`gallery.deselect_item`:`gallery.select_item`,{title:e.title??e.alt??String(n+1)}),tabIndex:-1,className:o.default.checkbox})}),h&&(0,l.jsx)(`div`,{className:o.default.selectedRing,"aria-hidden":!0})]}),(e.title||e.caption)&&(0,l.jsxs)(`div`,{className:o.default.caption,children:[e.title&&(0,l.jsx)(`span`,{className:o.default.captionTitle,children:e.title}),e.caption&&(0,l.jsx)(`span`,{className:o.default.captionText,children:e.caption})]})]})};exports.Gallery=f;
|
|
@@ -15,7 +15,7 @@ export interface GalleryProps extends Omit<React.ComponentPropsWithoutRef<"div">
|
|
|
15
15
|
gap?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
16
16
|
/** Aspect ratio for each image. Default: "square". */
|
|
17
17
|
aspect?: "square" | "landscape" | "portrait" | "auto";
|
|
18
|
-
/** Enable multi-select with checkboxes. */
|
|
18
|
+
/** Enable multi-select with checkboxes. The photo click is `onItemClick`, not select. */
|
|
19
19
|
selectable?: boolean;
|
|
20
20
|
/** Controlled selected IDs. */
|
|
21
21
|
selected?: string[];
|
|
@@ -23,7 +23,7 @@ export interface GalleryProps extends Omit<React.ComponentPropsWithoutRef<"div">
|
|
|
23
23
|
defaultSelected?: string[];
|
|
24
24
|
/** Called when selection changes. */
|
|
25
25
|
onSelectionChange?: (ids: string[]) => void;
|
|
26
|
-
/** Called when
|
|
26
|
+
/** Called when the item (not the checkbox) is clicked. Fires even when `selectable`. */
|
|
27
27
|
onItemClick?: (item: GalleryItem, index: number) => void;
|
|
28
28
|
/** Render bulk-action toolbar when items are selected. */
|
|
29
29
|
renderActions?: (params: {
|
|
@@ -152,18 +152,15 @@ var _ = s(null), v = () => {
|
|
|
152
152
|
});
|
|
153
153
|
y.displayName = "Gallery";
|
|
154
154
|
var b = ({ item: t, index: n }) => {
|
|
155
|
-
let { selectable: r, selectedIds: o, toggleSelect: s, focusedIndex: c, setFocusedIndex: l, onItemClick: u } = v(), { t: d } = e("components"), f = o.has(t.id), p = c === n, _ = (
|
|
156
|
-
|
|
155
|
+
let { selectable: r, selectedIds: o, toggleSelect: s, focusedIndex: c, setFocusedIndex: l, onItemClick: u } = v(), { t: d } = e("components"), f = o.has(t.id), p = c === n, _ = () => {
|
|
156
|
+
u?.(t, n), l(n);
|
|
157
157
|
}, y = (e) => {
|
|
158
158
|
e.stopPropagation(), s(t.id, n, e.shiftKey);
|
|
159
159
|
}, b = (e) => {
|
|
160
|
-
(e.key === " " || e.key === "Enter") && (e.preventDefault(), r ? s(t.id, n,
|
|
160
|
+
(e.key === " " || e.key === "Enter") && (e.preventDefault(), r && e.key === " " ? s(t.id, n, e.shiftKey) : u?.(t, n));
|
|
161
161
|
};
|
|
162
162
|
return /* @__PURE__ */ g("div", {
|
|
163
|
-
className: m(a.item, {
|
|
164
|
-
[a.selected]: f,
|
|
165
|
-
[a.selectable]: r
|
|
166
|
-
}),
|
|
163
|
+
className: m(a.item, { [a.selected]: f }),
|
|
167
164
|
role: "gridcell",
|
|
168
165
|
"aria-selected": r ? f : void 0,
|
|
169
166
|
tabIndex: p ? 0 : -1,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_root_161ke_3`,t=`_toolbar_161ke_16`,n=`_toolbarCount_161ke_39`,r=`_toolbarActions_161ke_45`,i=`_toolbarClear_161ke_51`,a=`_grid_161ke_55`,o=`_item_161ke_90`,s=`_selected_161ke_101`,c=`_imageWrapper_161ke_101`,l=`_image_161ke_101`,u=`_checkboxOverlay_161ke_142`,d=`_checkbox_161ke_142`,f=`_selectedRing_161ke_164`,p=`_caption_161ke_172`,m=`_captionTitle_161ke_179`,h=`_captionText_161ke_188`,g={root:e,toolbar:t,"toolbar-in":`_toolbar-in_161ke_1`,toolbarCount:n,toolbarActions:r,toolbarClear:i,grid:a,"gap-xs":`_gap-xs_161ke_70`,"gap-sm":`_gap-sm_161ke_74`,"gap-md":`_gap-md_161ke_78`,"gap-lg":`_gap-lg_161ke_82`,"gap-xl":`_gap-xl_161ke_86`,item:o,selected:s,imageWrapper:c,"aspect-square":`_aspect-square_161ke_112`,"aspect-landscape":`_aspect-landscape_161ke_116`,"aspect-portrait":`_aspect-portrait_161ke_120`,"aspect-auto":`_aspect-auto_161ke_124`,image:l,checkboxOverlay:u,checkbox:d,selectedRing:f,caption:p,captionTitle:m,captionText:h};exports.caption=p,exports.captionText=h,exports.captionTitle=m,exports.checkbox=d,exports.checkboxOverlay=u,exports.default=g,exports.grid=a,exports.image=l,exports.imageWrapper=c,exports.item=o,exports.root=e,exports.selected=s,exports.selectedRing=f,exports.toolbar=t,exports.toolbarActions=r,exports.toolbarClear=i,exports.toolbarCount=n;
|
|
@@ -1,33 +1,32 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/media/Gallery/gallery.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_root_161ke_3", t = "_toolbar_161ke_16", n = "_toolbarCount_161ke_39", r = "_toolbarActions_161ke_45", i = "_toolbarClear_161ke_51", a = "_grid_161ke_55", o = "_item_161ke_90", s = "_selected_161ke_101", c = "_imageWrapper_161ke_101", l = "_image_161ke_101", u = "_checkboxOverlay_161ke_142", d = "_checkbox_161ke_142", f = "_selectedRing_161ke_164", p = "_caption_161ke_172", m = "_captionTitle_161ke_179", h = "_captionText_161ke_188", g = {
|
|
4
4
|
root: e,
|
|
5
5
|
toolbar: t,
|
|
6
|
-
"toolbar-in": "_toolbar-
|
|
6
|
+
"toolbar-in": "_toolbar-in_161ke_1",
|
|
7
7
|
toolbarCount: n,
|
|
8
8
|
toolbarActions: r,
|
|
9
9
|
toolbarClear: i,
|
|
10
10
|
grid: a,
|
|
11
|
-
"gap-xs": "_gap-
|
|
12
|
-
"gap-sm": "_gap-
|
|
13
|
-
"gap-md": "_gap-
|
|
14
|
-
"gap-lg": "_gap-
|
|
15
|
-
"gap-xl": "_gap-
|
|
11
|
+
"gap-xs": "_gap-xs_161ke_70",
|
|
12
|
+
"gap-sm": "_gap-sm_161ke_74",
|
|
13
|
+
"gap-md": "_gap-md_161ke_78",
|
|
14
|
+
"gap-lg": "_gap-lg_161ke_82",
|
|
15
|
+
"gap-xl": "_gap-xl_161ke_86",
|
|
16
16
|
item: o,
|
|
17
17
|
selected: s,
|
|
18
18
|
imageWrapper: c,
|
|
19
|
-
"aspect-square": "_aspect-
|
|
20
|
-
"aspect-landscape": "_aspect-
|
|
21
|
-
"aspect-portrait": "_aspect-
|
|
22
|
-
"aspect-auto": "_aspect-
|
|
19
|
+
"aspect-square": "_aspect-square_161ke_112",
|
|
20
|
+
"aspect-landscape": "_aspect-landscape_161ke_116",
|
|
21
|
+
"aspect-portrait": "_aspect-portrait_161ke_120",
|
|
22
|
+
"aspect-auto": "_aspect-auto_161ke_124",
|
|
23
23
|
image: l,
|
|
24
24
|
checkboxOverlay: u,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
captionText: g
|
|
25
|
+
checkbox: d,
|
|
26
|
+
selectedRing: f,
|
|
27
|
+
caption: p,
|
|
28
|
+
captionTitle: m,
|
|
29
|
+
captionText: h
|
|
31
30
|
};
|
|
32
31
|
//#endregion
|
|
33
|
-
export {
|
|
32
|
+
export { p as caption, h as captionText, m as captionTitle, d as checkbox, u as checkboxOverlay, g as default, a as grid, l as image, c as imageWrapper, o as item, e as root, s as selected, f as selectedRing, t as toolbar, r as toolbarActions, i as toolbarClear, n as toolbarCount };
|
|
@@ -56,9 +56,22 @@ export declare const LightboxContent: {
|
|
|
56
56
|
displayName: string;
|
|
57
57
|
};
|
|
58
58
|
export interface LightboxGalleryProps {
|
|
59
|
+
/** Thumbnails for the strip (`Lightbox.Trigger`). Not a `Gallery` grid. */
|
|
59
60
|
children: React.ReactNode;
|
|
61
|
+
/** Items registered on the Lightbox for the overlay. */
|
|
60
62
|
items: LightboxItem[];
|
|
61
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Thumbnail strip that registers `items` on the Lightbox context.
|
|
66
|
+
*
|
|
67
|
+
* Composition Contract:
|
|
68
|
+
* - Registers `items` for `Lightbox.Content`; does not render the overlay
|
|
69
|
+
* - Children are a centered wrapping flex row (column below `sm`)
|
|
70
|
+
* - Intended children: `Lightbox.Trigger` (and similar thumbnails)
|
|
71
|
+
* - Do not wrap `Gallery` here — the grid becomes one centered flex item and
|
|
72
|
+
* stacks on small widths. Register items with `null` children and render
|
|
73
|
+
* `Gallery` as a sibling
|
|
74
|
+
*/
|
|
62
75
|
export declare const LightboxGallery: {
|
|
63
76
|
({ items, children }: LightboxGalleryProps): React.JSX.Element;
|
|
64
77
|
displayName: string;
|
package/dist/llms-full.txt
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## What this is
|
|
6
6
|
|
|
7
|
-
**wimui** v0.23.
|
|
7
|
+
**wimui** v0.23.6 — a React 19 component library: 218 documented components across 10 categories, with design tokens, dark mode, i18n (en/ja/pt-BR) and WAI-ARIA compliant a11y. Peer deps: react ^19, react-dom ^19 (plus optional peers for specific components — see package.json).
|
|
8
8
|
|
|
9
9
|
## Install & required setup
|
|
10
10
|
|
|
@@ -2737,11 +2737,11 @@ Ignored when `truncate` is set (one line wins; they cannot both apply).
|
|
|
2737
2737
|
- `columns: number` = 3 — Number of grid columns. Default: 3.
|
|
2738
2738
|
- `gap: "xs" | "sm" | "md" | "lg" | "xl"` = "md" — Gap between items. Default: "md".
|
|
2739
2739
|
- `aspect: "square" | "landscape" | "portrait" | "auto"` = "square" — Aspect ratio for each image. Default: "square".
|
|
2740
|
-
- `selectable: boolean` = false — Enable multi-select with checkboxes.
|
|
2740
|
+
- `selectable: boolean` = false — Enable multi-select with checkboxes. The photo click is `onItemClick`, not select.
|
|
2741
2741
|
- `selected: string[]` — Controlled selected IDs.
|
|
2742
2742
|
- `defaultSelected: string[]` = [] — Uncontrolled initial selected IDs.
|
|
2743
2743
|
- `onSelectionChange: (ids: string[]) => void` — Called when selection changes.
|
|
2744
|
-
- `onItemClick: (item: GalleryItem, index: number) => void` — Called when
|
|
2744
|
+
- `onItemClick: (item: GalleryItem, index: number) => void` — Called when the item (not the checkbox) is clicked. Fires even when `selectable`.
|
|
2745
2745
|
- `renderActions: (params: { selectedIds: string[]; clearSelection: () => void; }) => React.ReactNode` — Render bulk-action toolbar when items are selected.
|
|
2746
2746
|
- **Icon** — Visual symbols
|
|
2747
2747
|
- `name: keyof typeof ALL_ICONS` — Icon name. Requires `import "wimui/icons"` once at the app entry to register icons.
|
package/dist/llms.txt
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## What this is
|
|
6
6
|
|
|
7
|
-
**wimui** v0.23.
|
|
7
|
+
**wimui** v0.23.6 — a React 19 component library: 218 documented components across 10 categories, with design tokens, dark mode, i18n (en/ja/pt-BR) and WAI-ARIA compliant a11y. Peer deps: react ^19, react-dom ^19 (plus optional peers for specific components — see package.json).
|
|
8
8
|
|
|
9
9
|
## Install & required setup
|
|
10
10
|
|