@progress/kendo-react-layout 16.2.0-develop.17 → 16.2.0-develop.19

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.
@@ -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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const X=require("react"),i=require("prop-types"),M=require("@progress/kendo-react-common"),t=require("../utils/itemsIdsUtils.js"),ee=require("../utils/prepareInputItemsForInternalWork.js"),Z=require("../utils/getNewItemIdUponKeyboardNavigation.js"),B=require("../utils/hoverDelay.js"),te=require("./MenuItemInternal.js"),re=require("../utils/DirectionHolder.js"),ne=require("../utils/MouseOverHandler.js");function oe(o){const D=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const I in o)if(I!=="default"){const b=Object.getOwnPropertyDescriptor(o,I);Object.defineProperty(D,I,b.get?b:{enumerable:!0,get:()=>o[I]})}}return D.default=o,Object.freeze(D)}const n=oe(X),K={focusedItemId:t.EMPTY_ID,hoveredItemId:t.EMPTY_ID,tabbableItemId:t.ZERO_LEVEL_ZERO_ITEM_ID},S=n.forwardRef((o,D)=>{const I=n.useRef(null),b=n.useRef(null),y=n.useRef(null),R=n.useRef(new re.DirectionHolder),O=n.useRef([]),N=n.useRef([]),l=n.useRef(o);l.current=o;const[v,h]=n.useState({...K}),C=n.useRef(v);C.current=v;const w=n.useRef(()=>{}),P=n.useRef(new ne.MouseOverHandler(o.openOnClick,()=>w.current())),{items:j,inputItems:F}=ee.prepareInputItemsForInternalWork(o.items,o.children);O.current=j,N.current=F,R.current.setIsDirectionRightToLeft(V());function V(){return!!(l.current.dir!==void 0?l.current.dir==="rtl":I.current&&getComputedStyle(I.current).direction==="rtl")}const g=n.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null),y.current&&(clearTimeout(y.current),y.current=null)},[]),H=n.useCallback(()=>{g(),h({...K})},[g]);w.current=H;const E=n.useRef({get element(){return I.current},reset:()=>w.current()});n.useImperativeHandle(D,()=>E.current,[]);const m=n.useCallback(e=>{h(r=>{const c=e===t.EMPTY_ID?r.tabbableItemId:t.getRootParentId(e);return{hoveredItemId:e===t.EMPTY_ID||t.isIdEmptyOrZeroLevel(r.hoveredItemId)&&t.isIdEmptyOrZeroLevel(e)?r.hoveredItemId:t.EMPTY_ID,focusedItemId:e,tabbableItemId:c}})},[]),a=n.useCallback(e=>{h(r=>t.isIdEmptyOrZeroLevel(e)&&t.isIdEmptyOrZeroLevel(r.focusedItemId)?{hoveredItemId:e,focusedItemId:r.focusedItemId,tabbableItemId:r.tabbableItemId}:{hoveredItemId:e,focusedItemId:t.EMPTY_ID,tabbableItemId:t.ZERO_LEVEL_ZERO_ITEM_ID})},[]),f=n.useCallback(e=>t.getItemById(e,N.current),[]),T=n.useCallback((e,r)=>{M.dispatchEvent(l.current.onSelect,e,E.current,{item:f(r),itemId:r})},[f]),_=n.useCallback(e=>!l.current.customCloseItemIds||l.current.customCloseItemIds.indexOf(e)===-1,[]),Y=n.useCallback(e=>{var s,u;const r=l.current,c=C.current;if(r.openOnClick&&c.hoveredItemId!==t.EMPTY_ID){const d=e.target;((s=I.current)==null?void 0:s.contains(d))===!1&&(r.id&&((u=d.closest)!=null&&u.call(d,`[id^="${r.id}_"]`))||a(t.EMPTY_ID))}},[a]),W=n.useCallback(e=>{const r=C.current,c=l.current,s=O.current;if(r.focusedItemId!==t.EMPTY_ID){const u=t.getItemById(r.focusedItemId,s);let d=Z.getNewItemIdUponKeyboardNavigation(s,u.id,e.keyCode,e.key,c.vertical,R.current.getIsDirectionRightToLeft());const k=t.getItemById(d,s);if(k!=null&&k.separator&&(d=Z.getNewItemIdUponKeyboardNavigation(s,d,e.keyCode,e.key,c.vertical,R.current.getIsDirectionRightToLeft())),u.id!==d&&(e.preventDefault(),m(d)),(e.keyCode===M.Keys.enter||e.keyCode===M.Keys.space)&&!u.disabled&&(P.current.handleItemSelectedViaKeyboard(),T(e,u.id),!e.isDefaultPrevented()&&u.items.length===0&&u.url&&window.location.assign(u.url)),e.keyCode===M.Keys.esc&&t.isIdZeroLevel(u.id)&&c.onClose){const p=f(u.id);c.onClose({target:E.current,item:p,itemId:u.id})}}},[m,T,f]),U=n.useCallback(e=>{const r=C.current,c=l.current,s=c.openOnClick&&!t.isIdZeroLevel(e)&&r.hoveredItemId!==t.EMPTY_ID;(P.current.IsMouseOverEnabled||s)&&(g(),b.current=window.setTimeout(()=>{a(e),b.current=null},B.getHoverOpenDelay(c)))},[g,a]),A=n.useCallback(e=>{const r=C.current,c=l.current,s=c.openOnClick&&!t.isIdZeroLevel(e)&&r.hoveredItemId!==t.EMPTY_ID;(P.current.IsMouseOverEnabled||s)&&_(e)&&(g(),y.current=window.setTimeout(()=>{a(s?t.getDirectParentId(e):t.EMPTY_ID),y.current=null},B.getHoverCloseDelay(c)))},[g,_,a]),z=n.useCallback(e=>{C.current.hoveredItemId===t.EMPTY_ID?m(e):h(c=>({focusedItemId:e,hoveredItemId:c.hoveredItemId,tabbableItemId:t.getRootParentId(e)}))},[m]),G=n.useCallback((e,r)=>{const c=O.current,s=t.getItemById(r,c),u=C.current,d=l.current;if(!s.disabled){const k=t.isIdZeroLevel(r),p=!s.items||s.items.length===0;k?(m(r),p||d.openOnClick&&u.hoveredItemId!==t.EMPTY_ID&&t.getRootParentId(u.hoveredItemId)===r?a(t.EMPTY_ID):a(r)):p&&(m(r),a(t.EMPTY_ID)),T(e,r),!e.isDefaultPrevented()&&s.url&&window.location.assign(s.url)}},[m,a,T]),$=n.useCallback((e,r)=>{const c=l.current;c.onClose&&c.onClose({target:E.current,item:f(e),itemId:e,popupCloseEvent:r})},[f]),x=n.useCallback((e,r)=>{var s;const c=l.current;if(_(e)&&m(t.EMPTY_ID),((s=r.relatedTarget)==null?void 0:s.nodeName)==="LI"){const u=r.relatedTarget.getAttribute("id");if(u!=null&&u.includes(c.id))return}if(t.isIdZeroLevel(e)&&c.onClose){const u=f(e);c.onClose({target:E.current,item:u,itemId:e})}},[_,m,f]),q=n.useRef(o.vertical);n.useEffect(()=>()=>{g()},[g]),n.useEffect(()=>(o.openOnClick&&document.addEventListener("mousedown",Y),()=>{document.removeEventListener("mousedown",Y)}),[o.openOnClick,Y]),n.useEffect(()=>{const e=!!q.current!=!!o.vertical,r=R.current.hasDirectionChanged();(e||r)&&H(),P.current.OpenOnClick=o.openOnClick,q.current=o.vertical});const J=()=>M.classNames("k-reset","k-header","k-menu",{"k-menu-horizontal":!o.vertical},{"k-menu-vertical":o.vertical},o.className);let L;v.hoveredItemId?L=v.hoveredItemId:v.focusedItemId?L=t.getDirectParentId(v.focusedItemId):L=t.EMPTY_ID;const Q=o.animate!==void 0?o.animate:!0;return n.createElement("div",{id:o.id,onKeyDown:W,style:o.style,className:R.current.getIsDirectionRightToLeft()?"k-rtl":void 0,ref:I},n.createElement(te.MenuItemInternalsList,{className:J(),"aria-orientation":o.vertical?"vertical":void 0,items:O.current,animate:Q,isMenuVertical:o.vertical,isDirectionRightToLeft:R.current.getIsDirectionRightToLeft(),focusedItemId:v.focusedItemId,lastItemIdToBeOpened:L,tabbableItemId:v.tabbableItemId,itemRender:o.itemRender,linkRender:o.linkRender,menuGuid:o.id,onMouseLeave:A,onMouseOver:U,onFocus:z,onClick:G,onBlur:x,onOriginalItemNeeded:f,onPopupClose:$,role:o.role}))});S.propTypes={vertical:i.bool,items:i.arrayOf(i.object),style:i.object,animate:i.oneOfType([i.bool,i.shape({openDuration:i.number,closeDuration:i.number})]),dir:i.string,hoverOpenDelay:i.number,hoverCloseDelay:i.number,openOnClick:i.bool,itemRender:i.any,linkRender:i.any,customCloseItemIds:i.arrayOf(i.string),onSelect:i.func,onClose:i.func,role:i.string};S.displayName="Menu";exports.Menu=S;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ee=require("react"),i=require("prop-types"),k=require("@progress/kendo-react-common"),t=require("../utils/itemsIdsUtils.js"),te=require("../utils/prepareInputItemsForInternalWork.js"),B=require("../utils/getNewItemIdUponKeyboardNavigation.js"),K=require("../utils/hoverDelay.js"),re=require("./MenuItemInternal.js"),ne=require("../utils/DirectionHolder.js"),oe=require("../utils/MouseOverHandler.js");function ce(o){const E=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const I in o)if(I!=="default"){const b=Object.getOwnPropertyDescriptor(o,I);Object.defineProperty(E,I,b.get?b:{enumerable:!0,get:()=>o[I]})}}return E.default=o,Object.freeze(E)}const n=ce(ee),U={focusedItemId:t.EMPTY_ID,hoveredItemId:t.EMPTY_ID,tabbableItemId:t.ZERO_LEVEL_ZERO_ITEM_ID},S=n.forwardRef((o,E)=>{const I=n.useRef(null),b=n.useRef(null),M=n.useRef(null),D=n.useRef(new ne.DirectionHolder),h=n.useRef([]),N=n.useRef([]),l=n.useRef(o);l.current=o;const[v,P]=n.useState({...U}),C=n.useRef(v);C.current=v;const w=n.useRef(()=>{}),T=n.useRef(new oe.MouseOverHandler(o.openOnClick,()=>w.current())),{items:j,inputItems:F}=te.prepareInputItemsForInternalWork(o.items,o.children);h.current=j,N.current=F,D.current.setIsDirectionRightToLeft(V());function V(){return!!(l.current.dir!==void 0?l.current.dir==="rtl":I.current&&getComputedStyle(I.current).direction==="rtl")}const g=n.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null),M.current&&(clearTimeout(M.current),M.current=null)},[]),H=n.useCallback(()=>{g(),P({...U})},[g]);w.current=H;const O=n.useRef({get element(){return I.current},reset:()=>w.current()});n.useImperativeHandle(E,()=>O.current,[]);const m=n.useCallback(e=>{P(r=>{const c=e===t.EMPTY_ID?r.tabbableItemId:t.getRootParentId(e);return{hoveredItemId:e===t.EMPTY_ID||t.isIdEmptyOrZeroLevel(r.hoveredItemId)&&t.isIdEmptyOrZeroLevel(e)?r.hoveredItemId:t.EMPTY_ID,focusedItemId:e,tabbableItemId:c}})},[]),a=n.useCallback(e=>{P(r=>t.isIdEmptyOrZeroLevel(e)&&t.isIdEmptyOrZeroLevel(r.focusedItemId)?{hoveredItemId:e,focusedItemId:r.focusedItemId,tabbableItemId:r.tabbableItemId}:{hoveredItemId:e,focusedItemId:t.EMPTY_ID,tabbableItemId:t.ZERO_LEVEL_ZERO_ITEM_ID})},[]),f=n.useCallback(e=>t.getItemById(e,N.current),[]),_=n.useCallback((e,r)=>{k.dispatchEvent(l.current.onSelect,e,O.current,{item:f(r),itemId:r})},[f]),L=n.useCallback(e=>!l.current.customCloseItemIds||l.current.customCloseItemIds.indexOf(e)===-1,[]),Y=n.useCallback(e=>{var s,u;const r=l.current,c=C.current;if(r.openOnClick&&c.hoveredItemId!==t.EMPTY_ID){const d=e.target;((s=I.current)==null?void 0:s.contains(d))===!1&&(r.id&&((u=d.closest)!=null&&u.call(d,`[id^="${r.id}_"]`))||a(t.EMPTY_ID))}},[a]),W=n.useCallback(e=>{const r=C.current,c=l.current,s=h.current;if(r.focusedItemId!==t.EMPTY_ID){const u=t.getItemById(r.focusedItemId,s);let d=B.getNewItemIdUponKeyboardNavigation(s,u.id,e.keyCode,e.key,c.vertical,D.current.getIsDirectionRightToLeft());const y=t.getItemById(d,s);if(y!=null&&y.separator&&(d=B.getNewItemIdUponKeyboardNavigation(s,d,e.keyCode,e.key,c.vertical,D.current.getIsDirectionRightToLeft())),u.id!==d&&(e.preventDefault(),m(d)),(e.keyCode===k.Keys.enter||e.keyCode===k.Keys.space)&&!u.disabled&&(T.current.handleItemSelectedViaKeyboard(),_(e,u.id),!e.isDefaultPrevented()&&u.items.length===0&&u.url)){const R=k.sanitizeUrl(u.url);R&&window.location.assign(R)}if(e.keyCode===k.Keys.esc&&t.isIdZeroLevel(u.id)&&c.onClose){const R=f(u.id);c.onClose({target:O.current,item:R,itemId:u.id})}}},[m,_,f]),z=n.useCallback(e=>{const r=C.current,c=l.current,s=c.openOnClick&&!t.isIdZeroLevel(e)&&r.hoveredItemId!==t.EMPTY_ID;(T.current.IsMouseOverEnabled||s)&&(g(),b.current=window.setTimeout(()=>{a(e),b.current=null},K.getHoverOpenDelay(c)))},[g,a]),A=n.useCallback(e=>{const r=C.current,c=l.current,s=c.openOnClick&&!t.isIdZeroLevel(e)&&r.hoveredItemId!==t.EMPTY_ID;(T.current.IsMouseOverEnabled||s)&&L(e)&&(g(),M.current=window.setTimeout(()=>{a(s?t.getDirectParentId(e):t.EMPTY_ID),M.current=null},K.getHoverCloseDelay(c)))},[g,L,a]),G=n.useCallback(e=>{C.current.hoveredItemId===t.EMPTY_ID?m(e):P(c=>({focusedItemId:e,hoveredItemId:c.hoveredItemId,tabbableItemId:t.getRootParentId(e)}))},[m]),$=n.useCallback((e,r)=>{const c=h.current,s=t.getItemById(r,c),u=C.current,d=l.current;if(!s.disabled){const y=t.isIdZeroLevel(r),R=!s.items||s.items.length===0;if(y?(m(r),R||d.openOnClick&&u.hoveredItemId!==t.EMPTY_ID&&t.getRootParentId(u.hoveredItemId)===r?a(t.EMPTY_ID):a(r)):R&&(m(r),a(t.EMPTY_ID)),_(e,r),!e.isDefaultPrevented()&&s.url){const Z=k.sanitizeUrl(s.url);Z&&window.location.assign(Z)}}},[m,a,_]),x=n.useCallback((e,r)=>{const c=l.current;c.onClose&&c.onClose({target:O.current,item:f(e),itemId:e,popupCloseEvent:r})},[f]),J=n.useCallback((e,r)=>{var s;const c=l.current;if(L(e)&&m(t.EMPTY_ID),((s=r.relatedTarget)==null?void 0:s.nodeName)==="LI"){const u=r.relatedTarget.getAttribute("id");if(u!=null&&u.includes(c.id))return}if(t.isIdZeroLevel(e)&&c.onClose){const u=f(e);c.onClose({target:O.current,item:u,itemId:e})}},[L,m,f]),q=n.useRef(o.vertical);n.useEffect(()=>()=>{g()},[g]),n.useEffect(()=>(o.openOnClick&&document.addEventListener("mousedown",Y),()=>{document.removeEventListener("mousedown",Y)}),[o.openOnClick,Y]),n.useEffect(()=>{const e=!!q.current!=!!o.vertical,r=D.current.hasDirectionChanged();(e||r)&&H(),T.current.OpenOnClick=o.openOnClick,q.current=o.vertical});const Q=()=>k.classNames("k-reset","k-header","k-menu",{"k-menu-horizontal":!o.vertical},{"k-menu-vertical":o.vertical},o.className);let p;v.hoveredItemId?p=v.hoveredItemId:v.focusedItemId?p=t.getDirectParentId(v.focusedItemId):p=t.EMPTY_ID;const X=o.animate!==void 0?o.animate:!0;return n.createElement("div",{id:o.id,onKeyDown:W,style:o.style,className:D.current.getIsDirectionRightToLeft()?"k-rtl":void 0,ref:I},n.createElement(re.MenuItemInternalsList,{className:Q(),"aria-orientation":o.vertical?"vertical":void 0,items:h.current,animate:X,isMenuVertical:o.vertical,isDirectionRightToLeft:D.current.getIsDirectionRightToLeft(),focusedItemId:v.focusedItemId,lastItemIdToBeOpened:p,tabbableItemId:v.tabbableItemId,itemRender:o.itemRender,linkRender:o.linkRender,menuGuid:o.id,onMouseLeave:A,onMouseOver:z,onFocus:G,onClick:$,onBlur:J,onOriginalItemNeeded:f,onPopupClose:x,role:o.role}))});S.propTypes={vertical:i.bool,items:i.arrayOf(i.object),style:i.object,animate:i.oneOfType([i.bool,i.shape({openDuration:i.number,closeDuration:i.number})]),dir:i.string,hoverOpenDelay:i.number,hoverCloseDelay:i.number,openOnClick:i.bool,itemRender:i.any,linkRender:i.any,customCloseItemIds:i.arrayOf(i.string),onSelect:i.func,onClose:i.func,role:i.string};S.displayName="Menu";exports.Menu=S;
@@ -7,180 +7,187 @@
7
7
  */
8
8
  import * as r from "react";
9
9
  import u from "prop-types";
10
- import { dispatchEvent as oe, Keys as B, classNames as ce } from "@progress/kendo-react-common";
11
- import { ZERO_LEVEL_ZERO_ITEM_ID as A, EMPTY_ID as i, getRootParentId as _, isIdEmptyOrZeroLevel as P, getItemById as S, isIdZeroLevel as O, getDirectParentId as W } from "../utils/itemsIdsUtils.mjs";
12
- import { prepareInputItemsForInternalWork as se } from "../utils/prepareInputItemsForInternalWork.mjs";
13
- import { getNewItemIdUponKeyboardNavigation as Z } from "../utils/getNewItemIdUponKeyboardNavigation.mjs";
14
- import { getHoverOpenDelay as ue, getHoverCloseDelay as ie } from "../utils/hoverDelay.mjs";
15
- import { MenuItemInternalsList as le } from "./MenuItemInternal.mjs";
16
- import { DirectionHolder as ae } from "../utils/DirectionHolder.mjs";
17
- import { MouseOverHandler as de } from "../utils/MouseOverHandler.mjs";
18
- const q = {
10
+ import { dispatchEvent as se, Keys as B, sanitizeUrl as W, classNames as ue } from "@progress/kendo-react-common";
11
+ import { ZERO_LEVEL_ZERO_ITEM_ID as j, EMPTY_ID as i, getRootParentId as _, isIdEmptyOrZeroLevel as P, getItemById as S, isIdZeroLevel as D, getDirectParentId as Z } from "../utils/itemsIdsUtils.mjs";
12
+ import { prepareInputItemsForInternalWork as ie } from "../utils/prepareInputItemsForInternalWork.mjs";
13
+ import { getNewItemIdUponKeyboardNavigation as q } from "../utils/getNewItemIdUponKeyboardNavigation.mjs";
14
+ import { getHoverOpenDelay as le, getHoverCloseDelay as ae } from "../utils/hoverDelay.mjs";
15
+ import { MenuItemInternalsList as de } from "./MenuItemInternal.mjs";
16
+ import { DirectionHolder as me } from "../utils/DirectionHolder.mjs";
17
+ import { MouseOverHandler as fe } from "../utils/MouseOverHandler.mjs";
18
+ const A = {
19
19
  focusedItemId: i,
20
20
  hoveredItemId: i,
21
- tabbableItemId: A
22
- }, j = r.forwardRef((o, x) => {
23
- const R = r.useRef(null), g = r.useRef(null), h = r.useRef(null), k = r.useRef(new ae()), D = r.useRef([]), F = r.useRef([]), l = r.useRef(o);
21
+ tabbableItemId: j
22
+ }, z = r.forwardRef((o, x) => {
23
+ const g = r.useRef(null), h = r.useRef(null), y = r.useRef(null), v = r.useRef(new me()), L = r.useRef([]), F = r.useRef([]), l = r.useRef(o);
24
24
  l.current = o;
25
- const [f, L] = r.useState({ ...q }), C = r.useRef(f);
26
- C.current = f;
25
+ const [I, p] = r.useState({ ...A }), C = r.useRef(I);
26
+ C.current = I;
27
27
  const H = r.useRef(() => {
28
- }), p = r.useRef(new de(o.openOnClick, () => H.current())), { items: z, inputItems: G } = se(
28
+ }), T = r.useRef(new fe(o.openOnClick, () => H.current())), { items: G, inputItems: Y } = ie(
29
29
  o.items,
30
30
  o.children
31
31
  );
32
- D.current = z, F.current = G, k.current.setIsDirectionRightToLeft(U());
33
- function U() {
34
- return !!(l.current.dir !== void 0 ? l.current.dir === "rtl" : R.current && getComputedStyle(R.current).direction === "rtl");
32
+ L.current = G, F.current = Y, v.current.setIsDirectionRightToLeft($());
33
+ function $() {
34
+ return !!(l.current.dir !== void 0 ? l.current.dir === "rtl" : g.current && getComputedStyle(g.current).direction === "rtl");
35
35
  }
36
36
  const b = r.useCallback(() => {
37
- g.current && (clearTimeout(g.current), g.current = null), h.current && (clearTimeout(h.current), h.current = null);
37
+ h.current && (clearTimeout(h.current), h.current = null), y.current && (clearTimeout(y.current), y.current = null);
38
38
  }, []), K = r.useCallback(() => {
39
- b(), L({ ...q });
39
+ b(), p({ ...A });
40
40
  }, [b]);
41
41
  H.current = K;
42
- const y = r.useRef({
42
+ const O = r.useRef({
43
43
  get element() {
44
- return R.current;
44
+ return g.current;
45
45
  },
46
46
  reset: () => H.current()
47
47
  });
48
- r.useImperativeHandle(x, () => y.current, []);
48
+ r.useImperativeHandle(x, () => O.current, []);
49
49
  const m = r.useCallback((e) => {
50
- L((t) => {
50
+ p((t) => {
51
51
  const n = e === i ? t.tabbableItemId : _(e);
52
52
  return { hoveredItemId: e === i || P(t.hoveredItemId) && P(e) ? t.hoveredItemId : i, focusedItemId: e, tabbableItemId: n };
53
53
  });
54
54
  }, []), a = r.useCallback((e) => {
55
- L((t) => P(e) && P(t.focusedItemId) ? {
55
+ p((t) => P(e) && P(t.focusedItemId) ? {
56
56
  hoveredItemId: e,
57
57
  focusedItemId: t.focusedItemId,
58
58
  tabbableItemId: t.tabbableItemId
59
- } : { hoveredItemId: e, focusedItemId: i, tabbableItemId: A });
60
- }, []), I = r.useCallback((e) => S(e, F.current), []), T = r.useCallback(
59
+ } : { hoveredItemId: e, focusedItemId: i, tabbableItemId: j });
60
+ }, []), f = r.useCallback((e) => S(e, F.current), []), E = r.useCallback(
61
61
  (e, t) => {
62
- oe(l.current.onSelect, e, y.current, {
63
- item: I(t),
62
+ se(l.current.onSelect, e, O.current, {
63
+ item: f(t),
64
64
  itemId: t
65
65
  });
66
66
  },
67
- [I]
68
- ), E = r.useCallback((e) => !l.current.customCloseItemIds || l.current.customCloseItemIds.indexOf(e) === -1, []), N = r.useCallback(
67
+ [f]
68
+ ), M = r.useCallback((e) => !l.current.customCloseItemIds || l.current.customCloseItemIds.indexOf(e) === -1, []), N = r.useCallback(
69
69
  (e) => {
70
70
  var c, s;
71
71
  const t = l.current, n = C.current;
72
72
  if (t.openOnClick && n.hoveredItemId !== i) {
73
73
  const d = e.target;
74
- ((c = R.current) == null ? void 0 : c.contains(d)) === !1 && (t.id && ((s = d.closest) != null && s.call(d, `[id^="${t.id}_"]`)) || a(i));
74
+ ((c = g.current) == null ? void 0 : c.contains(d)) === !1 && (t.id && ((s = d.closest) != null && s.call(d, `[id^="${t.id}_"]`)) || a(i));
75
75
  }
76
76
  },
77
77
  [a]
78
- ), Y = r.useCallback(
78
+ ), J = r.useCallback(
79
79
  (e) => {
80
- const t = C.current, n = l.current, c = D.current;
80
+ const t = C.current, n = l.current, c = L.current;
81
81
  if (t.focusedItemId !== i) {
82
82
  const s = S(t.focusedItemId, c);
83
- let d = Z(
83
+ let d = q(
84
84
  c,
85
85
  s.id,
86
86
  e.keyCode,
87
87
  e.key,
88
88
  n.vertical,
89
- k.current.getIsDirectionRightToLeft()
89
+ v.current.getIsDirectionRightToLeft()
90
90
  );
91
- const v = S(d, c);
92
- if (v != null && v.separator && (d = Z(
91
+ const R = S(d, c);
92
+ if (R != null && R.separator && (d = q(
93
93
  c,
94
94
  d,
95
95
  e.keyCode,
96
96
  e.key,
97
97
  n.vertical,
98
- k.current.getIsDirectionRightToLeft()
99
- )), s.id !== d && (e.preventDefault(), m(d)), (e.keyCode === B.enter || e.keyCode === B.space) && !s.disabled && (p.current.handleItemSelectedViaKeyboard(), T(e, s.id), !e.isDefaultPrevented() && s.items.length === 0 && s.url && window.location.assign(s.url)), e.keyCode === B.esc && O(s.id) && n.onClose) {
100
- const w = I(s.id);
98
+ v.current.getIsDirectionRightToLeft()
99
+ )), s.id !== d && (e.preventDefault(), m(d)), (e.keyCode === B.enter || e.keyCode === B.space) && !s.disabled && (T.current.handleItemSelectedViaKeyboard(), E(e, s.id), !e.isDefaultPrevented() && s.items.length === 0 && s.url)) {
100
+ const k = W(s.url);
101
+ k && window.location.assign(k);
102
+ }
103
+ if (e.keyCode === B.esc && D(s.id) && n.onClose) {
104
+ const k = f(s.id);
101
105
  n.onClose({
102
- target: y.current,
103
- item: w,
106
+ target: O.current,
107
+ item: k,
104
108
  itemId: s.id
105
109
  });
106
110
  }
107
111
  }
108
112
  },
109
- [m, T, I]
110
- ), $ = r.useCallback(
113
+ [m, E, f]
114
+ ), Q = r.useCallback(
111
115
  (e) => {
112
- const t = C.current, n = l.current, c = n.openOnClick && !O(e) && t.hoveredItemId !== i;
113
- (p.current.IsMouseOverEnabled || c) && (b(), g.current = window.setTimeout(() => {
114
- a(e), g.current = null;
115
- }, ue(n)));
116
+ const t = C.current, n = l.current, c = n.openOnClick && !D(e) && t.hoveredItemId !== i;
117
+ (T.current.IsMouseOverEnabled || c) && (b(), h.current = window.setTimeout(() => {
118
+ a(e), h.current = null;
119
+ }, le(n)));
116
120
  },
117
121
  [b, a]
118
- ), J = r.useCallback(
122
+ ), X = r.useCallback(
119
123
  (e) => {
120
- const t = C.current, n = l.current, c = n.openOnClick && !O(e) && t.hoveredItemId !== i;
121
- (p.current.IsMouseOverEnabled || c) && E(e) && (b(), h.current = window.setTimeout(() => {
122
- a(c ? W(e) : i), h.current = null;
123
- }, ie(n)));
124
+ const t = C.current, n = l.current, c = n.openOnClick && !D(e) && t.hoveredItemId !== i;
125
+ (T.current.IsMouseOverEnabled || c) && M(e) && (b(), y.current = window.setTimeout(() => {
126
+ a(c ? Z(e) : i), y.current = null;
127
+ }, ae(n)));
124
128
  },
125
- [b, E, a]
126
- ), Q = r.useCallback(
129
+ [b, M, a]
130
+ ), ee = r.useCallback(
127
131
  (e) => {
128
- C.current.hoveredItemId === i ? m(e) : L((n) => ({
132
+ C.current.hoveredItemId === i ? m(e) : p((n) => ({
129
133
  focusedItemId: e,
130
134
  hoveredItemId: n.hoveredItemId,
131
135
  tabbableItemId: _(e)
132
136
  }));
133
137
  },
134
138
  [m]
135
- ), X = r.useCallback(
139
+ ), te = r.useCallback(
136
140
  (e, t) => {
137
- const n = D.current, c = S(t, n), s = C.current, d = l.current;
141
+ const n = L.current, c = S(t, n), s = C.current, d = l.current;
138
142
  if (!c.disabled) {
139
- const v = O(t), w = !c.items || c.items.length === 0;
140
- v ? (m(t), w ? a(i) : d.openOnClick && s.hoveredItemId !== i && _(s.hoveredItemId) === t ? a(i) : a(t)) : w && (m(t), a(i)), T(e, t), !e.isDefaultPrevented() && c.url && window.location.assign(c.url);
143
+ const R = D(t), k = !c.items || c.items.length === 0;
144
+ if (R ? (m(t), k ? a(i) : d.openOnClick && s.hoveredItemId !== i && _(s.hoveredItemId) === t ? a(i) : a(t)) : k && (m(t), a(i)), E(e, t), !e.isDefaultPrevented() && c.url) {
145
+ const V = W(c.url);
146
+ V && window.location.assign(V);
147
+ }
141
148
  }
142
149
  },
143
- [m, a, T]
144
- ), ee = r.useCallback(
150
+ [m, a, E]
151
+ ), re = r.useCallback(
145
152
  (e, t) => {
146
153
  const n = l.current;
147
154
  n.onClose && n.onClose({
148
- target: y.current,
149
- item: I(e),
155
+ target: O.current,
156
+ item: f(e),
150
157
  itemId: e,
151
158
  popupCloseEvent: t
152
159
  });
153
160
  },
154
- [I]
155
- ), te = r.useCallback(
161
+ [f]
162
+ ), ne = r.useCallback(
156
163
  (e, t) => {
157
164
  var c;
158
165
  const n = l.current;
159
- if (E(e) && m(i), ((c = t.relatedTarget) == null ? void 0 : c.nodeName) === "LI") {
166
+ if (M(e) && m(i), ((c = t.relatedTarget) == null ? void 0 : c.nodeName) === "LI") {
160
167
  const s = t.relatedTarget.getAttribute("id");
161
168
  if (s != null && s.includes(n.id))
162
169
  return;
163
170
  }
164
- if (O(e) && n.onClose) {
165
- const s = I(e);
171
+ if (D(e) && n.onClose) {
172
+ const s = f(e);
166
173
  n.onClose({
167
- target: y.current,
174
+ target: O.current,
168
175
  item: s,
169
176
  itemId: e
170
177
  });
171
178
  }
172
179
  },
173
- [E, m, I]
174
- ), V = r.useRef(o.vertical);
180
+ [M, m, f]
181
+ ), U = r.useRef(o.vertical);
175
182
  r.useEffect(() => () => {
176
183
  b();
177
184
  }, [b]), r.useEffect(() => (o.openOnClick && document.addEventListener("mousedown", N), () => {
178
185
  document.removeEventListener("mousedown", N);
179
186
  }), [o.openOnClick, N]), r.useEffect(() => {
180
- const e = !!V.current != !!o.vertical, t = k.current.hasDirectionChanged();
181
- (e || t) && K(), p.current.OpenOnClick = o.openOnClick, V.current = o.vertical;
187
+ const e = !!U.current != !!o.vertical, t = v.current.hasDirectionChanged();
188
+ (e || t) && K(), T.current.OpenOnClick = o.openOnClick, U.current = o.vertical;
182
189
  });
183
- const re = () => ce(
190
+ const oe = () => ue(
184
191
  "k-reset",
185
192
  "k-header",
186
193
  "k-menu",
@@ -188,46 +195,46 @@ const q = {
188
195
  { "k-menu-vertical": o.vertical },
189
196
  o.className
190
197
  );
191
- let M;
192
- f.hoveredItemId ? M = f.hoveredItemId : f.focusedItemId ? M = W(f.focusedItemId) : M = i;
193
- const ne = o.animate !== void 0 ? o.animate : !0;
198
+ let w;
199
+ I.hoveredItemId ? w = I.hoveredItemId : I.focusedItemId ? w = Z(I.focusedItemId) : w = i;
200
+ const ce = o.animate !== void 0 ? o.animate : !0;
194
201
  return /* @__PURE__ */ r.createElement(
195
202
  "div",
196
203
  {
197
204
  id: o.id,
198
- onKeyDown: Y,
205
+ onKeyDown: J,
199
206
  style: o.style,
200
- className: k.current.getIsDirectionRightToLeft() ? "k-rtl" : void 0,
201
- ref: R
207
+ className: v.current.getIsDirectionRightToLeft() ? "k-rtl" : void 0,
208
+ ref: g
202
209
  },
203
210
  /* @__PURE__ */ r.createElement(
204
- le,
211
+ de,
205
212
  {
206
- className: re(),
213
+ className: oe(),
207
214
  "aria-orientation": o.vertical ? "vertical" : void 0,
208
- items: D.current,
209
- animate: ne,
215
+ items: L.current,
216
+ animate: ce,
210
217
  isMenuVertical: o.vertical,
211
- isDirectionRightToLeft: k.current.getIsDirectionRightToLeft(),
212
- focusedItemId: f.focusedItemId,
213
- lastItemIdToBeOpened: M,
214
- tabbableItemId: f.tabbableItemId,
218
+ isDirectionRightToLeft: v.current.getIsDirectionRightToLeft(),
219
+ focusedItemId: I.focusedItemId,
220
+ lastItemIdToBeOpened: w,
221
+ tabbableItemId: I.tabbableItemId,
215
222
  itemRender: o.itemRender,
216
223
  linkRender: o.linkRender,
217
224
  menuGuid: o.id,
218
- onMouseLeave: J,
219
- onMouseOver: $,
220
- onFocus: Q,
221
- onClick: X,
222
- onBlur: te,
223
- onOriginalItemNeeded: I,
224
- onPopupClose: ee,
225
+ onMouseLeave: X,
226
+ onMouseOver: Q,
227
+ onFocus: ee,
228
+ onClick: te,
229
+ onBlur: ne,
230
+ onOriginalItemNeeded: f,
231
+ onPopupClose: re,
225
232
  role: o.role
226
233
  }
227
234
  )
228
235
  );
229
236
  });
230
- j.propTypes = {
237
+ z.propTypes = {
231
238
  vertical: u.bool,
232
239
  items: u.arrayOf(u.object),
233
240
  style: u.object,
@@ -249,7 +256,7 @@ j.propTypes = {
249
256
  onClose: u.func,
250
257
  role: u.string
251
258
  };
252
- j.displayName = "Menu";
259
+ z.displayName = "Menu";
253
260
  export {
254
- j as Menu
261
+ z as Menu
255
262
  };
@@ -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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),r=require("prop-types"),s=require("@progress/kendo-react-common");function u(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const c=u(o),l=e=>s.classNames("k-link","k-menu-link",{"k-active":e}),i=e=>e.url?c.createElement("a",{className:l(e.opened),href:e.url,tabIndex:-1},e.children):c.createElement("span",{id:e.id,className:s.classNames(l(e.opened),e.className),style:e.style,role:"presentation"},e.children);i.propTypes={opened:r.bool,url:r.string};exports.MenuItemLink=i;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),c=require("prop-types"),a=require("@progress/kendo-react-common");function u(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const l=u(o),i=e=>a.classNames("k-link","k-menu-link",{"k-active":e}),s=e=>e.url?l.createElement("a",{className:i(e.opened),href:a.sanitizeUrl(e.url)||void 0,tabIndex:-1},e.children):l.createElement("span",{id:e.id,className:a.classNames(i(e.opened),e.className),style:e.style,role:"presentation"},e.children);s.propTypes={opened:c.bool,url:c.string};exports.MenuItemLink=s;
@@ -7,8 +7,8 @@
7
7
  */
8
8
  import * as t from "react";
9
9
  import n from "prop-types";
10
- import { classNames as l } from "@progress/kendo-react-common";
11
- const a = (e) => l("k-link", "k-menu-link", { "k-active": e }), m = (e) => e.url ? /* @__PURE__ */ t.createElement("a", { className: a(e.opened), href: e.url, tabIndex: -1 }, e.children) : /* @__PURE__ */ t.createElement(
10
+ import { sanitizeUrl as i, classNames as l } from "@progress/kendo-react-common";
11
+ const a = (e) => l("k-link", "k-menu-link", { "k-active": e }), r = (e) => e.url ? /* @__PURE__ */ t.createElement("a", { className: a(e.opened), href: i(e.url) || void 0, tabIndex: -1 }, e.children) : /* @__PURE__ */ t.createElement(
12
12
  "span",
13
13
  {
14
14
  id: e.id,
@@ -18,10 +18,10 @@ const a = (e) => l("k-link", "k-menu-link", { "k-active": e }), m = (e) => e.url
18
18
  },
19
19
  e.children
20
20
  );
21
- m.propTypes = {
21
+ r.propTypes = {
22
22
  opened: n.bool,
23
23
  url: n.string
24
24
  };
25
25
  export {
26
- m as MenuItemLink
26
+ r as MenuItemLink
27
27
  };
@@ -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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-layout",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1790779727,version:"16.2.0-develop.17",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-layout",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1791292207,version:"16.2.0-develop.19",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
@@ -7,7 +7,7 @@ export const packageMetadata = Object.freeze({
7
7
  productName: 'KendoReact',
8
8
  productCode: 'KENDOUIREACT',
9
9
  productCodes: ['KENDOUIREACT'],
10
- publishDate: 1790779727,
11
- version: '16.2.0-develop.17',
10
+ publishDate: 1791292207,
11
+ version: '16.2.0-develop.19',
12
12
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/components/my-license/'
13
13
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-layout",
3
- "version": "16.2.0-develop.17",
3
+ "version": "16.2.0-develop.19",
4
4
  "description": "React Layout components enable you to create a perceptive and intuitive layout of web projects. KendoReact Layout package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -26,12 +26,12 @@
26
26
  "sideEffects": false,
27
27
  "peerDependencies": {
28
28
  "@progress/kendo-licensing": "^1.7.2",
29
- "@progress/kendo-react-animation": "16.2.0-develop.17",
30
- "@progress/kendo-react-buttons": "16.2.0-develop.17",
31
- "@progress/kendo-react-common": "16.2.0-develop.17",
32
- "@progress/kendo-react-intl": "16.2.0-develop.17",
33
- "@progress/kendo-react-popup": "16.2.0-develop.17",
34
- "@progress/kendo-react-progressbars": "16.2.0-develop.17",
29
+ "@progress/kendo-react-animation": "16.2.0-develop.19",
30
+ "@progress/kendo-react-buttons": "16.2.0-develop.19",
31
+ "@progress/kendo-react-common": "16.2.0-develop.19",
32
+ "@progress/kendo-react-intl": "16.2.0-develop.19",
33
+ "@progress/kendo-react-popup": "16.2.0-develop.19",
34
+ "@progress/kendo-react-progressbars": "16.2.0-develop.19",
35
35
  "@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
36
36
  "react": "^18.0.0 || ^19.0.0",
37
37
  "react-dom": "^18.0.0 || ^19.0.0"
@@ -108,7 +108,7 @@
108
108
  "package": {
109
109
  "productName": "KendoReact",
110
110
  "productCode": "KENDOUIREACT",
111
- "publishDate": 1790779727,
111
+ "publishDate": 1791292207,
112
112
  "licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
113
113
  }
114
114
  },
@@ -118,10 +118,5 @@
118
118
  },
119
119
  "publishConfig": {
120
120
  "access": "public"
121
- },
122
- "peerDependenciesMeta": {
123
- "@progress/kendo-svg-icons": {
124
- "optional": true
125
- }
126
121
  }
127
122
  }
@@ -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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("react"),v=require("prop-types"),y=require("../card/Card.js"),A=require("../card/CardHeader.js"),D=require("../card/CardTitle.js"),I=require("../card/CardSubtitle.js"),h=require("../card/CardBody.js"),O=require("../card/CardImage.js"),T=require("../card/CardActions.js"),k=require("@progress/kendo-react-common"),q=require("@progress/kendo-react-animation"),R=require("@progress/kendo-svg-icons"),S=require("@progress/kendo-react-buttons");function x(e){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const l in e)if(l!=="default"){const c=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(i,l,c.get?c:{enumerable:!0,get:()=>e[l]})}}return i.default=e,Object.freeze(i)}const t=x(N),E=e=>{const{title:l,subtitle:c,actions:r,images:o,description:b}=e.eventData,[d,C]=t.useState(e.eventData.opened||!1),[s,u]=t.useState(!!e.collapsible&&!e.eventData.opened),f=a=>{if(C(!d),e.onChange){const n={syntheticEvent:a,nativeEvent:a.nativeEvent,eventData:e.eventData};e.onChange.call(void 0,n)}},g=a=>{if(e.onActionClick){const n={syntheticEvent:a,nativeEvent:a.nativeEvent,eventData:e.eventData};e.onActionClick.call(void 0,n)}},m=()=>t.createElement(t.Fragment,null,t.createElement(h.CardBody,null,t.createElement("div",{className:"k-card-description"},t.createElement("p",null,b),o&&o.map((a,n)=>t.createElement(O.CardImage,{key:n,src:a.src})))),r&&t.createElement(T.CardActions,null,r.map((a,n)=>t.createElement("a",{key:n,href:a.url,className:"k-button k-button-md k-rounded-md k-button-flat k-button-flat-primary",onClick:g},a.text))));return t.createElement("div",{"data-testid":"k-timeline-card",className:k.classNames("k-timeline-card",{"k-collapsed":e.collapsible&&s})},t.createElement(y.Card,{id:e.panelId,"aria-label":e.ariaLabel,"aria-live":e.horizontal?void 0:"polite","aria-describedby":e.id,tabIndex:e.tabindex,role:e.horizontal?"tabpanel":"button","aria-expanded":e.collapsible?!s:void 0,className:"k-card-with-callout",onClick:a=>f(a)},t.createElement("span",{style:e.calloutStyle,className:k.classNames("k-timeline-card-callout","k-card-callout",{"k-callout-n":e.horizontal},{"k-callout-e":e.alternated&&!e.horizontal},{"k-callout-w":!e.alternated&&!e.horizontal})}),t.createElement("div",{className:"k-card-inner"},t.createElement(A.CardHeader,null,t.createElement(D.CardTitle,null,t.createElement("span",{className:"k-event-title"},l),e.collapsible&&t.createElement(S.Button,{className:"k-event-collapse",fillMode:"flat",size:"xs",svgIcon:R.chevronRightIcon})),c&&t.createElement(I.CardSubtitle,null,c)),e.collapsible?t.createElement(q.Reveal,{transitionEnterDuration:e.transitionDuration||400,transitionExitDuration:e.transitionDuration||400,onBeforeEnter:()=>u(!1),onAfterExited:()=>u(!0)},d?m():null):m())))};E.propTypes={onChange:v.func,onActionClick:v.func};exports.TimelineCard=E;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("react"),k=require("prop-types"),y=require("../card/Card.js"),A=require("../card/CardHeader.js"),D=require("../card/CardTitle.js"),I=require("../card/CardSubtitle.js"),h=require("../card/CardBody.js"),O=require("../card/CardImage.js"),T=require("../card/CardActions.js"),r=require("@progress/kendo-react-common"),q=require("@progress/kendo-react-animation"),R=require("@progress/kendo-svg-icons"),S=require("@progress/kendo-react-buttons");function z(e){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const l in e)if(l!=="default"){const i=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(c,l,i.get?i:{enumerable:!0,get:()=>e[l]})}}return c.default=e,Object.freeze(c)}const t=z(N),E=e=>{const{title:l,subtitle:i,actions:o,images:d,description:b}=e.eventData,[s,C]=t.useState(e.eventData.opened||!1),[u,m]=t.useState(!!e.collapsible&&!e.eventData.opened),f=a=>{if(C(!s),e.onChange){const n={syntheticEvent:a,nativeEvent:a.nativeEvent,eventData:e.eventData};e.onChange.call(void 0,n)}},g=a=>{if(e.onActionClick){const n={syntheticEvent:a,nativeEvent:a.nativeEvent,eventData:e.eventData};e.onActionClick.call(void 0,n)}},v=()=>t.createElement(t.Fragment,null,t.createElement(h.CardBody,null,t.createElement("div",{className:"k-card-description"},t.createElement("p",null,b),d&&d.map((a,n)=>t.createElement(O.CardImage,{key:n,src:a.src})))),o&&t.createElement(T.CardActions,null,o.map((a,n)=>t.createElement("a",{key:n,href:r.sanitizeUrl(a.url)||void 0,className:"k-button k-button-md k-rounded-md k-button-flat k-button-flat-primary",onClick:g},a.text))));return t.createElement("div",{"data-testid":"k-timeline-card",className:r.classNames("k-timeline-card",{"k-collapsed":e.collapsible&&u})},t.createElement(y.Card,{id:e.panelId,"aria-label":e.ariaLabel,"aria-live":e.horizontal?void 0:"polite","aria-describedby":e.id,tabIndex:e.tabindex,role:e.horizontal?"tabpanel":"button","aria-expanded":e.collapsible?!u:void 0,className:"k-card-with-callout",onClick:a=>f(a)},t.createElement("span",{style:e.calloutStyle,className:r.classNames("k-timeline-card-callout","k-card-callout",{"k-callout-n":e.horizontal},{"k-callout-e":e.alternated&&!e.horizontal},{"k-callout-w":!e.alternated&&!e.horizontal})}),t.createElement("div",{className:"k-card-inner"},t.createElement(A.CardHeader,null,t.createElement(D.CardTitle,null,t.createElement("span",{className:"k-event-title"},l),e.collapsible&&t.createElement(S.Button,{className:"k-event-collapse",fillMode:"flat",size:"xs",svgIcon:R.chevronRightIcon})),i&&t.createElement(I.CardSubtitle,null,i)),e.collapsible?t.createElement(q.Reveal,{transitionEnterDuration:e.transitionDuration||400,transitionExitDuration:e.transitionDuration||400,onBeforeEnter:()=>m(!1),onAfterExited:()=>m(!0)},s?v():null):v())))};E.propTypes={onChange:k.func,onActionClick:k.func};exports.TimelineCard=E;
@@ -14,11 +14,11 @@ import { CardSubtitle as A } from "../card/CardSubtitle.mjs";
14
14
  import { CardBody as D } from "../card/CardBody.mjs";
15
15
  import { CardImage as I } from "../card/CardImage.mjs";
16
16
  import { CardActions as g } from "../card/CardActions.mjs";
17
- import { classNames as u } from "@progress/kendo-react-common";
18
- import { Reveal as y } from "@progress/kendo-react-animation";
19
- import { chevronRightIcon as T } from "@progress/kendo-svg-icons";
20
- import { Button as x } from "@progress/kendo-react-buttons";
21
- const O = (e) => {
17
+ import { classNames as u, sanitizeUrl as y } from "@progress/kendo-react-common";
18
+ import { Reveal as T } from "@progress/kendo-react-animation";
19
+ import { chevronRightIcon as x } from "@progress/kendo-svg-icons";
20
+ import { Button as O } from "@progress/kendo-react-buttons";
21
+ const z = (e) => {
22
22
  const { title: v, subtitle: l, actions: i, images: o, description: E } = e.eventData, [c, k] = t.useState(e.eventData.opened || !1), [r, m] = t.useState(!!e.collapsible && !e.eventData.opened), f = (a) => {
23
23
  if (k(!c), e.onChange) {
24
24
  const n = {
@@ -41,7 +41,7 @@ const O = (e) => {
41
41
  "a",
42
42
  {
43
43
  key: n,
44
- href: a.url,
44
+ href: y(a.url) || void 0,
45
45
  className: "k-button k-button-md k-rounded-md k-button-flat k-button-flat-primary",
46
46
  onClick: b
47
47
  },
@@ -80,15 +80,15 @@ const O = (e) => {
80
80
  }
81
81
  ),
82
82
  /* @__PURE__ */ t.createElement("div", { className: "k-card-inner" }, /* @__PURE__ */ t.createElement(N, null, /* @__PURE__ */ t.createElement(h, null, /* @__PURE__ */ t.createElement("span", { className: "k-event-title" }, v), e.collapsible && /* @__PURE__ */ t.createElement(
83
- x,
83
+ O,
84
84
  {
85
85
  className: "k-event-collapse",
86
86
  fillMode: "flat",
87
87
  size: "xs",
88
- svgIcon: T
88
+ svgIcon: x
89
89
  }
90
90
  )), l && /* @__PURE__ */ t.createElement(A, null, l)), e.collapsible ? /* @__PURE__ */ t.createElement(
91
- y,
91
+ T,
92
92
  {
93
93
  transitionEnterDuration: e.transitionDuration || 400,
94
94
  transitionExitDuration: e.transitionDuration || 400,
@@ -100,10 +100,10 @@ const O = (e) => {
100
100
  )
101
101
  );
102
102
  };
103
- O.propTypes = {
103
+ z.propTypes = {
104
104
  onChange: s.func,
105
105
  onActionClick: s.func
106
106
  };
107
107
  export {
108
- O as TimelineCard
108
+ z as TimelineCard
109
109
  };