@webority/ui-react 0.132.0 → 0.133.0

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.
@@ -2,7 +2,7 @@
2
2
  "kind": "WeborityWeb",
3
3
  "library": {
4
4
  "name": "@webority/ui-react",
5
- "version": "0.132.0"
5
+ "version": "0.133.0"
6
6
  },
7
7
  "rendererProtocolVersion": 13,
8
8
  "platform": "Web",
@@ -13776,6 +13776,17 @@
13776
13776
  "description": "The full-screen dialog's name for screen readers.",
13777
13777
  "default": "Image viewer"
13778
13778
  },
13779
+ {
13780
+ "name": "layout",
13781
+ "type": "enum",
13782
+ "enum": [
13783
+ "gallery",
13784
+ "single"
13785
+ ],
13786
+ "required": false,
13787
+ "description": "gallery shows thumbnails; single shows each image at the container's full width, at its own shape.",
13788
+ "default": "gallery"
13789
+ },
13779
13790
  {
13780
13791
  "name": "openIndex",
13781
13792
  "type": "number",
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "webority-web",
3
- "version": "0.132.0",
3
+ "version": "0.133.0",
4
4
  "platform": "Web",
5
5
  "kitModuleVersion": 2,
6
6
  "rendererProtocolVersion": 13,
7
7
  "library": {
8
8
  "name": "@webority/ui-react",
9
- "version": "0.132.0"
9
+ "version": "0.133.0"
10
10
  },
11
11
  "files": {
12
12
  "manifest.json": {
13
- "sha256": "1ab939dd724956b61547a58ecc18f71a02c5ee418b5602e1f101e6437e50005d",
14
- "bytes": 1004508
13
+ "sha256": "eceb33f0467445c9a0ccf4201faceb555c1f5f32694ede13a86fec1473e729d1",
14
+ "bytes": 1004847
15
15
  },
16
16
  "kit.js": {
17
- "sha256": "29422c4be30de831a002a427af2ea4b3c2515043daea83c0fa8ec0300713287e",
18
- "bytes": 11167028
17
+ "sha256": "ba7bc20c374d6519dc7820ed78be70c350cd94ebcbb39a90ed49dbdfdc55cb65",
18
+ "bytes": 11167763
19
19
  },
20
20
  "kit.css": {
21
21
  "sha256": "13b14f71fb6ea024945f95cba617b4f1d49f44a65ba7c7ed05d2354805539ef6",
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{useEffect as n,useRef as r}from"react";import{jsx as i}from"react/jsx-runtime";import"@webority/ui-elements/elements/lightbox";function a(a){let{marker:o,props:s}=e(`AppLightbox`,a),{items:c=[],download:l=!1,label:u,openIndex:d,onChange:f,onClose:p,className:m=``,...h}=s;t(`AppLightbox`,h);let g=r(null),_=r({onChange:f,onClose:p});return n(()=>{_.current={onChange:f,onClose:p}}),n(()=>{let e=g.current,t=e=>_.current.onChange?.(e.detail.index),n=()=>_.current.onClose?.();return e.addEventListener(`wui-lightbox:change`,t),e.addEventListener(`wui-lightbox:close`,n),()=>{e.removeEventListener(`wui-lightbox:change`,t),e.removeEventListener(`wui-lightbox:close`,n)}},[]),/* @__PURE__ */ i(`wui-lightbox`,{ref:g,class:[`wui-lightbox`,m].filter(Boolean).join(` `),download:l?``:void 0,label:u||void 0,"open-index":Number.isInteger(d)?d:void 0,...o,...h,children:c.map(e=>/* @__PURE__ */ i(`a`,{className:`wui-lightbox-item`,href:e.src,"data-caption":e.caption||void 0,"data-name":e.name||void 0,children:/* @__PURE__ */ i(`img`,{src:e.thumb||e.src,alt:e.alt??e.caption??``,loading:`lazy`})},e.key??e.src))})}export{a as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{useEffect as r,useRef as i}from"react";import{jsx as a}from"react/jsx-runtime";import"@webority/ui-elements/elements/lightbox";var o=[`gallery`,`single`];function s(s){let{marker:c,props:l}=e(`AppLightbox`,s),{items:u=[],download:d=!1,label:f,layout:p=`gallery`,openIndex:m,onChange:h,onClose:g,className:_=``,...v}=l;n(`AppLightbox`,v),t(`AppLightbox`,`layout`,p,o);let y=i(null),b=i({onChange:h,onClose:g});return r(()=>{b.current={onChange:h,onClose:g}}),r(()=>{let e=y.current,t=e=>b.current.onChange?.(e.detail.index),n=()=>b.current.onClose?.();return e.addEventListener(`wui-lightbox:change`,t),e.addEventListener(`wui-lightbox:close`,n),()=>{e.removeEventListener(`wui-lightbox:change`,t),e.removeEventListener(`wui-lightbox:close`,n)}},[]),/* @__PURE__ */ a(`wui-lightbox`,{ref:y,class:[`wui-lightbox`,_].filter(Boolean).join(` `),download:d?``:void 0,label:f||void 0,layout:p===`single`?`single`:void 0,"open-index":Number.isInteger(m)?m:void 0,...c,...v,children:u.map(e=>/* @__PURE__ */ a(`a`,{className:`wui-lightbox-item`,href:e.src,"data-caption":e.caption||void 0,"data-name":e.name||void 0,children:/* @__PURE__ */ a(`img`,{src:e.thumb||e.src,alt:e.alt??e.caption??``,loading:`lazy`})},e.key??e.src))})}export{s as default};
@@ -2,7 +2,7 @@
2
2
  "format": "webority-guidance/1",
3
3
  "package": {
4
4
  "name": "@webority/ui-react",
5
- "version": "0.132.0"
5
+ "version": "0.133.0"
6
6
  },
7
7
  "components": [
8
8
  {
@@ -14,6 +14,7 @@ import "@webority/ui-elements/elements/lightbox";
14
14
  * @param {{ src: string, thumb?: string, alt?: string, caption?: string, name?: string, key?: string }[]} props.items
15
15
  * @param {boolean} [props.download]
16
16
  * @param {string} [props.label]
17
+ * @param {"gallery"|"single"} [props.layout] gallery shows thumbnails; single shows each image at the container's full width, at its own shape.
17
18
  * @param {number} [props.openIndex] Opens the viewer on this image, counted from 0.
18
19
  * @param {(index: number) => void} [props.onChange] Called with the position (from 0) of the
19
20
  * image shown, when the view opens and each time it changes.
@@ -40,6 +41,11 @@ export default function AppLightbox(props: {
40
41
  * @default "Image viewer"
41
42
  */
42
43
  label?: string;
44
+ /**
45
+ * gallery shows thumbnails; single shows each image at the container's full width, at its own shape.
46
+ * @default "gallery"
47
+ */
48
+ layout?: "gallery" | "single";
43
49
  /** Opens the viewer on this image, counted from 0. */
44
50
  openIndex?: number;
45
51
  onChange?: (index: number) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/ui-react",
3
- "version": "0.132.0",
3
+ "version": "0.133.0",
4
4
  "description": "Webority shared React component library — App* primitives on react-bootstrap + the @webority/theme design system.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",
@@ -29,10 +29,10 @@
29
29
  },
30
30
  "sideEffects": false,
31
31
  "dependencies": {
32
- "@webority/markdown-core": "0.132.0",
33
- "@webority/theme": "0.132.0",
34
- "@webority/ui-elements": "0.132.0",
35
- "@webority/web-core": "0.132.0"
32
+ "@webority/markdown-core": "0.133.0",
33
+ "@webority/theme": "0.133.0",
34
+ "@webority/ui-elements": "0.133.0",
35
+ "@webority/web-core": "0.133.0"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "@webority/analytics": "^0.35.0",
@@ -50,8 +50,8 @@
50
50
  "@vitejs/plugin-react": "^6.0.1",
51
51
  "@vitest/coverage-v8": "5.0.1",
52
52
  "@webority/analytics": "0.35.0",
53
- "@webority/canvas-kit": "0.132.0",
54
- "@webority/tokens": "0.132.0",
53
+ "@webority/canvas-kit": "0.133.0",
54
+ "@webority/tokens": "0.133.0",
55
55
  "bootstrap": "5.3.3",
56
56
  "jsdom": "30.1.1",
57
57
  "react": "^19.2.6",