@progress/kendo-react-scrollview 7.4.0 → 7.5.0-develop.2

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/ScrollView.js CHANGED
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("react"),r=require("prop-types"),o=require("@progress/kendo-react-common"),A=require("./package-metadata.js"),p=require("@progress/kendo-svg-icons");function _(c){const m=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const i in c)if(i!=="default"){const f=Object.getOwnPropertyDescriptor(c,i);Object.defineProperty(m,i,f.get?f:{enumerable:!0,get:()=>c[i]})}}return m.default=c,Object.freeze(m)}const e=_(M),k=e.forwardRef((c,m)=>{o.validatePackage(A.packageMetadata);const{className:i,style:f,children:N,pagerOverlay:b,pageable:O,arrows:P,endless:n,activeView:S,automaticViewChange:E,automaticViewChangeInterval:R}=c,[t,s]=e.useState(S||1),g=e.useRef(null),d=e.useRef(null),y=e.useRef(null),l=e.Children.toArray(N),C=o.useRtl(g,c.dir),u=C==="rtl",I=e.useCallback(()=>{g.current&&g.current.focus()},[]),T=e.useCallback(()=>({element:g.current,focus:I}),[I]);e.useImperativeHandle(m,T);const h=e.useCallback(()=>{n?t>1?s(t-1):s(l.length):t>1&&s(t-1)},[t,l.length,n]),w=e.useCallback(()=>{n?t<l.length?s(t+1):s(1):t<l.length&&s(t+1)},[t,l.length,n]);e.useEffect(()=>{let a=l.length;d.current&&(d.current.style.setProperty("--kendo-scrollview-views",`${a}`),d.current.style.setProperty("--kendo-scrollview-current",`${t}`))},[l,t,C]);function V(){y.current&&clearTimeout(y.current)}e.useEffect(()=>{if(E)return V(),y.current=setTimeout(()=>s(a=>a===l.length?n?1:a:a+1),R),()=>{V()}},[E,R,l.length,t,n]);const j=e.useCallback(a=>{switch(a.keyCode){case o.Keys.left:a.preventDefault(),u?w():h();break;case o.Keys.right:a.preventDefault(),u?h():w();break}},[u,w,h]),D=e.useMemo(()=>o.classNames("k-scrollview",{"k-scrollview-light":b==="light","k-scrollview-dark":b==="dark"},i),[i,b]),q=e.Children.map(N||null,(a,v)=>e.createElement("div",{className:"k-scrollview-view","aria-hidden":t!==v+1},a)),x=e.useCallback(()=>{let a;return a=t>1,(n||a)&&l.length>0},[t,l.length,n]),K=e.useCallback(()=>{let a;return a=t<l.length,(n||a)&&l.length>0},[t,l.length,n]);return e.createElement("div",{className:D,style:f,ref:g,tabIndex:0,dir:C,onKeyDown:j},e.createElement("div",{className:"k-scrollview-wrap k-scrollview-animate",ref:d},q),e.createElement("div",{className:"k-scrollview-elements"},P&&e.createElement(e.Fragment,null,x()&&e.createElement("span",{className:"k-scrollview-prev","aria-label":"previous",onClick:h},e.createElement(o.IconWrap,{name:u?"chevron-right":"chevron-left",icon:u?p.chevronRightIcon:p.chevronLeftIcon,size:"xxxlarge"})),K()&&e.createElement("span",{className:"k-scrollview-next",onClick:w},e.createElement(o.IconWrap,{name:u?"chevron-left":"chevron-right",icon:u?p.chevronLeftIcon:p.chevronRightIcon,size:"xxxlarge"}))),O&&e.createElement("div",{className:"k-scrollview-nav-wrap"},e.createElement("div",{className:"k-scrollview-nav"},l.map((a,v)=>e.createElement("span",{className:o.classNames("k-link",{"k-primary":t===v+1}),key:v+1,onClick:()=>s(v+1)}))))))});k.propTypes={activeView:r.number,arrows:r.bool,automaticViewChange:r.bool,automaticViewChangeInterval:r.number,children:r.any,className:r.string,dir:r.string,endless:r.bool,pageable:r.bool,pageOverlay:r.string,style:r.object};const z={activeView:1,arrows:!0,automaticViewChange:!0,automaticViewChangeInterval:5e3,endless:!1,pageable:!0,pageOverlay:"none"};k.defaultProps=z;k.displayName="KendoScrollView";exports.ScrollView=k;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("react"),r=require("prop-types"),o=require("@progress/kendo-react-common"),A=require("./package-metadata.js"),w=require("@progress/kendo-svg-icons");function _(c){const m=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const i in c)if(i!=="default"){const f=Object.getOwnPropertyDescriptor(c,i);Object.defineProperty(m,i,f.get?f:{enumerable:!0,get:()=>c[i]})}}return m.default=c,Object.freeze(m)}const e=_(M),k=e.forwardRef((c,m)=>{o.validatePackage(A.packageMetadata);const{className:i,style:f,children:N,pagerOverlay:b,pageable:O,arrows:P,endless:n,activeView:S,automaticViewChange:E,automaticViewChangeInterval:R}=c,[t,s]=e.useState(S||1),v=e.useRef(null),d=e.useRef(null),y=e.useRef(null),l=e.Children.toArray(N),C=o.useRtl(v,c.dir),u=C==="rtl",I=e.useCallback(()=>{v.current&&v.current.focus()},[]),T=e.useCallback(()=>({element:v.current,focus:I}),[I]);e.useImperativeHandle(m,T);const h=e.useCallback(()=>{n?t>1?s(t-1):s(l.length):t>1&&s(t-1)},[t,l.length,n]),p=e.useCallback(()=>{n?t<l.length?s(t+1):s(1):t<l.length&&s(t+1)},[t,l.length,n]);e.useEffect(()=>{let a=l.length;d.current&&(d.current.style.setProperty("--kendo-scrollview-views",`${a}`),d.current.style.setProperty("--kendo-scrollview-current",`${t}`))},[l,t,C]);function V(){y.current&&clearTimeout(y.current)}e.useEffect(()=>{if(E)return V(),y.current=setTimeout(()=>s(a=>a===l.length?n?1:a:a+1),R),()=>{V()}},[E,R,l.length,t,n]);const j=e.useCallback(a=>{switch(a.keyCode){case o.Keys.left:a.preventDefault(),u?p():h();break;case o.Keys.right:a.preventDefault(),u?h():p();break}},[u,p,h]),D=e.useMemo(()=>o.classNames("k-scrollview",{"k-scrollview-light":b==="light","k-scrollview-dark":b==="dark"},i),[i,b]),q=e.Children.map(N||null,(a,g)=>e.createElement("div",{className:"k-scrollview-view","aria-hidden":t!==g+1},a)),x=e.useCallback(()=>{let a;return a=t>1,(n||a)&&l.length>0},[t,l.length,n]),K=e.useCallback(()=>{let a;return a=t<l.length,(n||a)&&l.length>0},[t,l.length,n]);return e.createElement("div",{className:D,style:f,ref:v,tabIndex:0,dir:C,onKeyDown:j},e.createElement("div",{className:"k-scrollview-wrap k-scrollview-animate",ref:d},q),e.createElement("div",{className:"k-scrollview-elements"},P&&e.createElement(e.Fragment,null,x()&&e.createElement("span",{className:"k-scrollview-prev","aria-label":"previous",onClick:h},e.createElement(o.IconWrap,{name:u?"chevron-right":"chevron-left",icon:u?w.chevronRightIcon:w.chevronLeftIcon,size:"xxxlarge"})),K()&&e.createElement("span",{className:"k-scrollview-next",onClick:p},e.createElement(o.IconWrap,{name:u?"chevron-left":"chevron-right",icon:u?w.chevronLeftIcon:w.chevronRightIcon,size:"xxxlarge"}))),O&&e.createElement("div",{className:"k-scrollview-nav-wrap"},e.createElement("div",{className:"k-scrollview-nav"},l.map((a,g)=>e.createElement("span",{className:o.classNames("k-link",{"k-primary":t===g+1}),key:g+1,onClick:()=>s(g+1)}))))),e.createElement("div",{"aria-live":"polite","aria-atomic":"true",className:"k-sr-only"}))});k.propTypes={activeView:r.number,arrows:r.bool,automaticViewChange:r.bool,automaticViewChangeInterval:r.number,children:r.any,className:r.string,dir:r.string,endless:r.bool,pageable:r.bool,pageOverlay:r.string,style:r.object};const z={activeView:1,arrows:!0,automaticViewChange:!0,automaticViewChangeInterval:5e3,endless:!1,pageable:!0,pageOverlay:"none"};k.defaultProps=z;k.displayName="KendoScrollView";exports.ScrollView=k;
package/ScrollView.mjs CHANGED
@@ -120,7 +120,7 @@ const h = e.forwardRef((p, P) => {
120
120
  key: i + 1,
121
121
  onClick: () => s(i + 1)
122
122
  }
123
- ))))));
123
+ ))))), /* @__PURE__ */ e.createElement("div", { "aria-live": "polite", "aria-atomic": "true", className: "k-sr-only" }));
124
124
  });
125
125
  h.propTypes = {
126
126
  activeView: r.number,
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-svg-icons")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-svg-icons"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactScrollview={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoSvgIcons)}(this,(function(e,r,t,l,n){"use strict";function a(e){var r=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,l.get?l:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,Object.freeze(r)}var c=a(r);const s={name:"@progress/kendo-react-scrollview",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},o=c.forwardRef(((e,r)=>{l.validatePackage(s);const{className:t,style:a,children:o,pagerOverlay:i,pageable:u,arrows:m,endless:p,activeView:d,automaticViewChange:v,automaticViewChangeInterval:g}=e,[h,f]=c.useState(d||1),k=c.useRef(null),w=c.useRef(null),y=c.useRef(null),b=c.Children.toArray(o),C=l.useRtl(k,e.dir),E="rtl"===C,N=c.useCallback((()=>{k.current&&k.current.focus()}),[]),I=c.useCallback((()=>({element:k.current,focus:N})),[N]);c.useImperativeHandle(r,I);const O=c.useCallback((()=>{p?f(h>1?h-1:b.length):h>1&&f(h-1)}),[h,b.length,p]),R=c.useCallback((()=>{p?h<b.length?f(h+1):f(1):h<b.length&&f(h+1)}),[h,b.length,p]);function x(){y.current&&clearTimeout(y.current)}c.useEffect((()=>{let e=b.length;w.current&&(w.current.style.setProperty("--kendo-scrollview-views",`${e}`),w.current.style.setProperty("--kendo-scrollview-current",`${h}`))}),[b,h,C]),c.useEffect((()=>{if(v)return x(),y.current=setTimeout((()=>f((e=>e===b.length?p?1:e:e+1))),g),()=>{x()}}),[v,g,b.length,h,p]);const V=c.useCallback((e=>{switch(e.keyCode){case l.Keys.left:e.preventDefault(),E?R():O();break;case l.Keys.right:e.preventDefault(),E?O():R()}}),[E,R,O]),K=c.useMemo((()=>l.classNames("k-scrollview",{"k-scrollview-light":"light"===i,"k-scrollview-dark":"dark"===i},t)),[t,i]),D=c.Children.map(o||null,((e,r)=>c.createElement("div",{className:"k-scrollview-view","aria-hidden":h!==r+1},e))),P=c.useCallback((()=>{let e;return e=h>1,(p||e)&&b.length>0}),[h,b.length,p]),T=c.useCallback((()=>{let e;return e=h<b.length,(p||e)&&b.length>0}),[h,b.length,p]);return c.createElement("div",{className:K,style:a,ref:k,tabIndex:0,dir:C,onKeyDown:V},c.createElement("div",{className:"k-scrollview-wrap k-scrollview-animate",ref:w},D),c.createElement("div",{className:"k-scrollview-elements"},m&&c.createElement(c.Fragment,null,P()&&c.createElement("span",{className:"k-scrollview-prev","aria-label":"previous",onClick:O},c.createElement(l.IconWrap,{name:E?"chevron-right":"chevron-left",icon:E?n.chevronRightIcon:n.chevronLeftIcon,size:"xxxlarge"})),T()&&c.createElement("span",{className:"k-scrollview-next",onClick:R},c.createElement(l.IconWrap,{name:E?"chevron-left":"chevron-right",icon:E?n.chevronLeftIcon:n.chevronRightIcon,size:"xxxlarge"}))),u&&c.createElement("div",{className:"k-scrollview-nav-wrap"},c.createElement("div",{className:"k-scrollview-nav"},b.map(((e,r)=>c.createElement("span",{className:l.classNames("k-link",{"k-primary":h===r+1}),key:r+1,onClick:()=>f(r+1)})))))))}));o.propTypes={activeView:t.number,arrows:t.bool,automaticViewChange:t.bool,automaticViewChangeInterval:t.number,children:t.any,className:t.string,dir:t.string,endless:t.bool,pageable:t.bool,pageOverlay:t.string,style:t.object};o.defaultProps={activeView:1,arrows:!0,automaticViewChange:!0,automaticViewChangeInterval:5e3,endless:!1,pageable:!0,pageOverlay:"none"},o.displayName="KendoScrollView",e.ScrollView=o}));
8
+ !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-svg-icons")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-svg-icons"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactScrollview={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoSvgIcons)}(this,(function(e,r,t,a,l){"use strict";function n(e){var r=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,Object.freeze(r)}var c=n(r);const s={name:"@progress/kendo-react-scrollview",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},o=c.forwardRef(((e,r)=>{a.validatePackage(s);const{className:t,style:n,children:o,pagerOverlay:i,pageable:u,arrows:m,endless:p,activeView:v,automaticViewChange:d,automaticViewChangeInterval:g}=e,[h,f]=c.useState(v||1),k=c.useRef(null),w=c.useRef(null),y=c.useRef(null),b=c.Children.toArray(o),C=a.useRtl(k,e.dir),E="rtl"===C,N=c.useCallback((()=>{k.current&&k.current.focus()}),[]),I=c.useCallback((()=>({element:k.current,focus:N})),[N]);c.useImperativeHandle(r,I);const O=c.useCallback((()=>{p?f(h>1?h-1:b.length):h>1&&f(h-1)}),[h,b.length,p]),R=c.useCallback((()=>{p?h<b.length?f(h+1):f(1):h<b.length&&f(h+1)}),[h,b.length,p]);function x(){y.current&&clearTimeout(y.current)}c.useEffect((()=>{let e=b.length;w.current&&(w.current.style.setProperty("--kendo-scrollview-views",`${e}`),w.current.style.setProperty("--kendo-scrollview-current",`${h}`))}),[b,h,C]),c.useEffect((()=>{if(d)return x(),y.current=setTimeout((()=>f((e=>e===b.length?p?1:e:e+1))),g),()=>{x()}}),[d,g,b.length,h,p]);const V=c.useCallback((e=>{switch(e.keyCode){case a.Keys.left:e.preventDefault(),E?R():O();break;case a.Keys.right:e.preventDefault(),E?O():R()}}),[E,R,O]),K=c.useMemo((()=>a.classNames("k-scrollview",{"k-scrollview-light":"light"===i,"k-scrollview-dark":"dark"===i},t)),[t,i]),D=c.Children.map(o||null,((e,r)=>c.createElement("div",{className:"k-scrollview-view","aria-hidden":h!==r+1},e))),P=c.useCallback((()=>{let e;return e=h>1,(p||e)&&b.length>0}),[h,b.length,p]),T=c.useCallback((()=>{let e;return e=h<b.length,(p||e)&&b.length>0}),[h,b.length,p]);return c.createElement("div",{className:K,style:n,ref:k,tabIndex:0,dir:C,onKeyDown:V},c.createElement("div",{className:"k-scrollview-wrap k-scrollview-animate",ref:w},D),c.createElement("div",{className:"k-scrollview-elements"},m&&c.createElement(c.Fragment,null,P()&&c.createElement("span",{className:"k-scrollview-prev","aria-label":"previous",onClick:O},c.createElement(a.IconWrap,{name:E?"chevron-right":"chevron-left",icon:E?l.chevronRightIcon:l.chevronLeftIcon,size:"xxxlarge"})),T()&&c.createElement("span",{className:"k-scrollview-next",onClick:R},c.createElement(a.IconWrap,{name:E?"chevron-left":"chevron-right",icon:E?l.chevronLeftIcon:l.chevronRightIcon,size:"xxxlarge"}))),u&&c.createElement("div",{className:"k-scrollview-nav-wrap"},c.createElement("div",{className:"k-scrollview-nav"},b.map(((e,r)=>c.createElement("span",{className:a.classNames("k-link",{"k-primary":h===r+1}),key:r+1,onClick:()=>f(r+1)})))))),c.createElement("div",{"aria-live":"polite","aria-atomic":"true",className:"k-sr-only"}))}));o.propTypes={activeView:t.number,arrows:t.bool,automaticViewChange:t.bool,automaticViewChangeInterval:t.number,children:t.any,className:t.string,dir:t.string,endless:t.bool,pageable:t.bool,pageOverlay:t.string,style:t.object};o.defaultProps={activeView:1,arrows:!0,automaticViewChange:!0,automaticViewChangeInterval:5e3,endless:!1,pageable:!0,pageOverlay:"none"},o.displayName="KendoScrollView",e.ScrollView=o}));
@@ -10,7 +10,7 @@ const e = {
10
10
  name: "@progress/kendo-react-scrollview",
11
11
  productName: "KendoReact",
12
12
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
13
- publishDate: 1712847142,
13
+ publishDate: 1712928841,
14
14
  version: "",
15
15
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
16
16
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-scrollview",
3
- "version": "7.4.0",
3
+ "version": "7.5.0-develop.2",
4
4
  "description": "React ScrollView (React Carousel) displays images or content in a horizontally scrollable collection. KendoReact ScrollView package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -23,7 +23,7 @@
23
23
  "sideEffects": false,
24
24
  "peerDependencies": {
25
25
  "@progress/kendo-licensing": "^1.3.4",
26
- "@progress/kendo-react-common": "7.4.0",
26
+ "@progress/kendo-react-common": "7.5.0-develop.2",
27
27
  "@progress/kendo-svg-icons": "^2.1.0",
28
28
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0",
29
29
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"