@progress/kendo-react-layout 7.4.0 → 7.5.0-develop.10

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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("react"),m=require("prop-types"),C=require("@progress/kendo-react-animation"),b=require("@progress/kendo-react-common"),x=require("../package-metadata.js"),E=require("./ActionSheetItem.js"),g=require("./ActionSheetHeader.js"),D=require("./ActionSheetFooter.js"),I=require("./ActionSheetContent.js");function O(h){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(h){for(const t in h)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(h,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:()=>h[t]})}}return n.default=h,Object.freeze(n)}const e=O(N),d=class d extends e.Component{constructor(n){super(n),this.actionSheetRef=e.createRef(),this.actionSheetTitleClass="k-actionsheet-title",this.ariaLabeledBy=this.actionSheetTitleClass+1,this.animationDuration=300,this.bottomPosition={bottom:"0",width:"100%"},this.handleKeyDown=t=>{this.props.navigatable&&this.navigation.triggerKeyboardEvent(t)},this.onTab=(t,i,s)=>{s.preventDefault(),s.shiftKey?i.focusPrevious(t):i.focusNext(t)},this.handleOverlayClick=t=>{this.props.onOverlayClick&&this.props.onOverlayClick.call(void 0,t),this.props.onClose&&this.props.onClose.call(void 0,t),this.props.animation||this.hideActionSheet()},this.handleItemClick=t=>{this.props.onItemClick&&this.props.onItemClick.call(void 0,t),this.props.onItemSelect&&this.props.onItemSelect.call(void 0,t),this.props.animation||this.hideActionSheet()},this.onEnter=(t,i,s)=>{if(t.ariaDisabled)return;const c=t.className&&t.className.indexOf?t.className.indexOf("k-actionsheet-item")!==-1:!1,l=i.elements.filter(a=>a.className.indexOf("k-actionsheet-item")!==-1);if(c&&this.props.onItemClick){s.preventDefault();const a=this.props.items[l.indexOf(t)];this.props.onItemClick.call(void 0,{syntheticEvent:s,item:a,title:a&&a.title})}if(c&&this.props.onItemSelect){s.preventDefault();const a=this.props.items[l.indexOf(t)];this.props.onItemSelect.call(void 0,{syntheticEvent:s,item:a,title:a&&a.title})}this.props.animation||this.hideActionSheet()},this.onEscape=(t,i,s)=>{this.props.onOverlayClick&&(s.preventDefault(),this.props.onOverlayClick.call(void 0,s)),this.props.onClose&&(s.preventDefault(),this.props.onClose.call(void 0,s)),this.props.animation||this.hideActionSheet()},this.hideActionSheet=()=>{this.setState({show:!1})},this.children=t=>{const i={};return e.Children.forEach(t,s=>{s&&(i[s.type.displayName]=s)}),i},this.state={show:!1,slide:!1},b.validatePackage(x.packageMetadata)}componentDidMount(){this.props.expand&&!this.state.show&&this.setState({show:!0})}componentDidUpdate(n,t){const i=this.actionSheetRef.current;if(this.props.expand&&!this.state.show&&this.setState({show:!0}),this.props.expand&&this.state.show&&!this.state.slide&&this.setState({slide:!0}),!this.props.expand&&this.state.show&&this.state.slide&&this.setState({slide:!1}),t!==this.state&&this.state.slide&&i&&!this.props.className&&(i.style.setProperty("--kendo-actionsheet-height","auto"),i.style.setProperty("--kendo-actionsheet-max-height","none")),i&&this.props.navigatable){const c=[".k-actionsheet-item",...[".k-actionsheet-footer",".k-actionsheet-content",".k-actionsheet-titlebar"].map(l=>b.FOCUSABLE_ELEMENTS.concat(this.props.navigatableElements).map(a=>`${l} ${a}`)).flat()];this.navigation=new b.Navigation({tabIndex:this.props.tabIndex||0,root:this.actionSheetRef,rovingTabIndex:!1,selectors:c,keyboardEvents:{keydown:{Tab:this.onTab,Enter:this.onEnter,Escape:this.onEscape}}}),this.navigation.focusElement(this.navigation.first,null)}}render(){const{title:n,subTitle:t,animationStyles:i,animation:s,expand:c,tabIndex:l,items:a}=this.props,r=a==null?void 0:a.filter(o=>!o.group||o.group==="top"),u=a==null?void 0:a.filter(o=>o.group==="bottom"),S=r&&r.length>0&&u&&u.length>0,f=this.children(this.props.children),y=this.props.animationDuration||this.animationDuration,v=this.state.slide&&e.createElement("div",{className:b.classNames("k-actionsheet",this.props.className,{"k-actionsheet-bottom":!this.props.className}),role:"dialog","aria-modal":"true","aria-hidden":!1,"aria-labelledby":this.ariaLabeledBy,ref:this.actionSheetRef,onKeyDown:this.handleKeyDown},f[g.headerDisplayName]&&!n&&!t&&f[g.headerDisplayName],(n||t)&&e.createElement("div",{className:"k-actionsheet-titlebar k-text-center"},e.createElement("div",{className:"k-actionsheet-titlebar-group k-hbox"},e.createElement("div",{className:this.actionSheetTitleClass,id:this.ariaLabeledBy},n&&e.createElement("div",null,n),t&&e.createElement("div",{className:"k-actionsheet-subtitle"},t)))),f[I.contentDisplayName]||e.createElement("div",{className:"k-actionsheet-content"},e.createElement("div",{className:"k-list-ul",role:"group"},r&&r.map((o,p)=>e.createElement(E.ActionSheetItem,{...o,id:p,key:p,item:o,tabIndex:l||0,onClick:this.handleItemClick}))),S&&e.createElement("hr",{className:"k-hr"}),e.createElement("div",{className:"k-list-ul",role:"group"},u&&u.map((o,p)=>e.createElement(E.ActionSheetItem,{...o,id:p+((r==null?void 0:r.length)||0),key:p,item:o,tabIndex:l||0,onClick:this.handleItemClick})))),f[D.footerDisplayName]);return e.createElement(e.Fragment,null,c||this.state.show?e.createElement(e.Fragment,null,e.createElement("div",{className:"k-actionsheet-container"},e.createElement("div",{className:"k-overlay",onClick:this.handleOverlayClick}),s?e.createElement(C.Animation,{transitionName:this.state.slide?"slide-up":"slide-down",onExited:this.hideActionSheet,transitionEnterDuration:y,transitionExitDuration:y,animationEnteringStyle:i||this.bottomPosition,animationEnteredStyle:i||this.bottomPosition,animationExitingStyle:i||this.bottomPosition,exit:!0,enter:!0,appear:!1},v):v)):null)}};d.displayName="KendoReactActionSheet",d.propTypes={items:m.array,subTitle:m.string,title:m.string,navigatable:m.bool,navigatableElements:m.array},d.defaultProps={navigatable:!0,navigatableElements:[]};let k=d;exports.ActionSheet=k;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("react"),m=require("prop-types"),C=require("@progress/kendo-react-animation"),b=require("@progress/kendo-react-common"),x=require("../package-metadata.js"),E=require("./ActionSheetItem.js"),g=require("./ActionSheetHeader.js"),D=require("./ActionSheetFooter.js"),I=require("./ActionSheetContent.js");function O(h){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(h){for(const t in h)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(h,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:()=>h[t]})}}return n.default=h,Object.freeze(n)}const e=O(N),d=class d extends e.Component{constructor(n){super(n),this.actionSheetRef=e.createRef(),this.actionSheetTitleClass="k-actionsheet-title",this.ariaLabeledBy=this.actionSheetTitleClass,this.animationDuration=300,this.bottomPosition={bottom:"0",width:"100%"},this.handleKeyDown=t=>{this.props.navigatable&&this.navigation.triggerKeyboardEvent(t)},this.onTab=(t,i,s)=>{s.preventDefault(),s.shiftKey?i.focusPrevious(t):i.focusNext(t)},this.handleOverlayClick=t=>{this.props.onOverlayClick&&this.props.onOverlayClick.call(void 0,t),this.props.onClose&&this.props.onClose.call(void 0,t),this.props.animation||this.hideActionSheet()},this.handleItemClick=t=>{this.props.onItemClick&&this.props.onItemClick.call(void 0,t),this.props.onItemSelect&&this.props.onItemSelect.call(void 0,t),this.props.animation||this.hideActionSheet()},this.onEnter=(t,i,s)=>{if(t.ariaDisabled)return;const c=t.className&&t.className.indexOf?t.className.indexOf("k-actionsheet-item")!==-1:!1,l=i.elements.filter(a=>a.className.indexOf("k-actionsheet-item")!==-1);if(c&&this.props.onItemClick){s.preventDefault();const a=this.props.items[l.indexOf(t)];this.props.onItemClick.call(void 0,{syntheticEvent:s,item:a,title:a&&a.title})}if(c&&this.props.onItemSelect){s.preventDefault();const a=this.props.items[l.indexOf(t)];this.props.onItemSelect.call(void 0,{syntheticEvent:s,item:a,title:a&&a.title})}this.props.animation||this.hideActionSheet()},this.onEscape=(t,i,s)=>{this.props.onOverlayClick&&(s.preventDefault(),this.props.onOverlayClick.call(void 0,s)),this.props.onClose&&(s.preventDefault(),this.props.onClose.call(void 0,s)),this.props.animation||this.hideActionSheet()},this.hideActionSheet=()=>{this.setState({show:!1})},this.children=t=>{const i={};return e.Children.forEach(t,s=>{s&&(i[s.type.displayName]=s)}),i},this.state={show:!1,slide:!1},b.validatePackage(x.packageMetadata)}componentDidMount(){this.props.expand&&!this.state.show&&this.setState({show:!0})}componentDidUpdate(n,t){const i=this.actionSheetRef.current;if(this.props.expand&&!this.state.show&&this.setState({show:!0}),this.props.expand&&this.state.show&&!this.state.slide&&this.setState({slide:!0}),!this.props.expand&&this.state.show&&this.state.slide&&this.setState({slide:!1}),t!==this.state&&this.state.slide&&i&&!this.props.className&&(i.style.setProperty("--kendo-actionsheet-height","auto"),i.style.setProperty("--kendo-actionsheet-max-height","none")),i&&this.props.navigatable){const c=[".k-actionsheet-item",...[".k-actionsheet-footer",".k-actionsheet-content",".k-actionsheet-titlebar"].map(l=>b.FOCUSABLE_ELEMENTS.concat(this.props.navigatableElements).map(a=>`${l} ${a}`)).flat()];this.navigation=new b.Navigation({tabIndex:this.props.tabIndex||0,root:this.actionSheetRef,rovingTabIndex:!1,selectors:c,keyboardEvents:{keydown:{Tab:this.onTab,Enter:this.onEnter,Escape:this.onEscape}}}),this.navigation.focusElement(this.navigation.first,null)}}render(){const{title:n,subTitle:t,animationStyles:i,animation:s,expand:c,tabIndex:l,items:a}=this.props,r=a==null?void 0:a.filter(o=>!o.group||o.group==="top"),u=a==null?void 0:a.filter(o=>o.group==="bottom"),S=r&&r.length>0&&u&&u.length>0,f=this.children(this.props.children),y=this.props.animationDuration||this.animationDuration,v=this.state.slide&&e.createElement("div",{className:b.classNames("k-actionsheet",this.props.className,{"k-actionsheet-bottom":!this.props.className}),role:"dialog","aria-modal":"true","aria-hidden":!1,"aria-labelledby":this.ariaLabeledBy,ref:this.actionSheetRef,onKeyDown:this.handleKeyDown},f[g.headerDisplayName]&&!n&&!t&&f[g.headerDisplayName],(n||t)&&e.createElement("div",{className:"k-actionsheet-titlebar k-text-center"},e.createElement("div",{className:"k-actionsheet-titlebar-group k-hbox"},e.createElement("div",{className:this.actionSheetTitleClass,id:this.ariaLabeledBy},n&&e.createElement("div",null,n),t&&e.createElement("div",{className:"k-actionsheet-subtitle"},t)))),f[I.contentDisplayName]||e.createElement("div",{className:"k-actionsheet-content"},e.createElement("div",{className:"k-list-ul",role:"group"},r&&r.map((o,p)=>e.createElement(E.ActionSheetItem,{...o,id:p,key:p,item:o,tabIndex:l||0,onClick:this.handleItemClick}))),S&&e.createElement("hr",{className:"k-hr"}),e.createElement("div",{className:"k-list-ul",role:"group"},u&&u.map((o,p)=>e.createElement(E.ActionSheetItem,{...o,id:p+((r==null?void 0:r.length)||0),key:p,item:o,tabIndex:l||0,onClick:this.handleItemClick})))),f[D.footerDisplayName]);return e.createElement(e.Fragment,null,c||this.state.show?e.createElement(e.Fragment,null,e.createElement("div",{className:"k-actionsheet-container"},e.createElement("div",{className:"k-overlay",onClick:this.handleOverlayClick}),s?e.createElement(C.Animation,{transitionName:this.state.slide?"slide-up":"slide-down",onExited:this.hideActionSheet,transitionEnterDuration:y,transitionExitDuration:y,animationEnteringStyle:i||this.bottomPosition,animationEnteredStyle:i||this.bottomPosition,animationExitingStyle:i||this.bottomPosition,exit:!0,enter:!0,appear:!1},v):v)):null)}};d.displayName="KendoReactActionSheet",d.propTypes={items:m.array,subTitle:m.string,title:m.string,navigatable:m.bool,navigatableElements:m.array},d.defaultProps={navigatable:!0,navigatableElements:[]};let k=d;exports.ActionSheet=k;
@@ -18,7 +18,7 @@ import { contentDisplayName as w } from "./ActionSheetContent.mjs";
18
18
  const m = class m extends e.Component {
19
19
  /** @hidden */
20
20
  constructor(o) {
21
- super(o), this.actionSheetRef = e.createRef(), this.actionSheetTitleClass = "k-actionsheet-title", this.ariaLabeledBy = this.actionSheetTitleClass + 1, this.animationDuration = 300, this.bottomPosition = { bottom: "0", width: "100%" }, this.handleKeyDown = (t) => {
21
+ super(o), this.actionSheetRef = e.createRef(), this.actionSheetTitleClass = "k-actionsheet-title", this.ariaLabeledBy = this.actionSheetTitleClass, this.animationDuration = 300, this.bottomPosition = { bottom: "0", width: "100%" }, this.handleKeyDown = (t) => {
22
22
  this.props.navigatable && this.navigation.triggerKeyboardEvent(t);
23
23
  }, this.onTab = (t, a, i) => {
24
24
  i.preventDefault(), i.shiftKey ? a.focusPrevious(t) : a.focusNext(t);
@@ -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 b=require("react"),t=require("prop-types"),i=require("@progress/kendo-react-common"),m=require("../package-metadata.js");function k(e){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const c in e)if(c!=="default"){const n=Object.getOwnPropertyDescriptor(e,c);Object.defineProperty(l,c,n.get?n:{enumerable:!0,get:()=>e[c]})}}return l.default=e,Object.freeze(l)}const a=k(b),d=a.forwardRef((e,l)=>{i.validatePackage(m.packageMetadata);const c=a.useRef(null),n=a.useRef(null),s=a.useCallback(()=>{n.current&&n.current.focus()},[n]);a.useImperativeHandle(c,()=>({element:n.current,focus:s,props:e})),a.useImperativeHandle(l,()=>c.current);const u=a.useCallback(r=>{e.id&&i.dispatchEvent(e.onItemSelect,r,r.target,{id:e.id})},[e.onItemSelect]),o=a.useCallback(r=>{e.id&&i.dispatchEvent(e.onKeyDown,r,r.target,{id:e.id})},[e.onKeyDown]);return a.createElement("span",{"aria-current":e.ariaCurrent?e.ariaCurrent:e.isLast,role:"link",id:e.id,ref:n,style:e.style,dir:i.useDir(n,e.dir),tabIndex:i.getTabIndex(e.tabIndex,e.disabled),className:i.classNames({"k-breadcrumb-root-link":e.isFirst,"k-breadcrumb-link":!e.isFirst,"k-breadcrumb-icontext-link":e.iconClass!==void 0&&e.text,"k-breadcrumb-icon-link":e.iconClass!==void 0&&!e.text,"k-disabled":e.disabled}),onClick:u,onKeyDown:o},e.iconClass?a.createElement("span",{className:i.classNames("k-icon",e.iconClass)}):e.icon?e.icon:"",e.text&&a.createElement("span",{className:"k-breadcrumb-item-text"},e.text))}),f={id:t.string,className:t.string,tabIndex:t.number,style:t.object,dir:t.string,disabled:t.bool,text:t.string,icon:t.node,iconClass:t.string,onClick:t.func,ariaCurrent:t.bool};d.displayName="KendoReactBreadcrumbLink";d.propTypes=f;exports.BreadcrumbLink=d;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),t=require("prop-types"),l=require("@progress/kendo-react-common"),m=require("../package-metadata.js");function k(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const c in e)if(c!=="default"){const n=Object.getOwnPropertyDescriptor(e,c);Object.defineProperty(r,c,n.get?n:{enumerable:!0,get:()=>e[c]})}}return r.default=e,Object.freeze(r)}const a=k(b),d=a.forwardRef((e,r)=>{l.validatePackage(m.packageMetadata);const c=a.useRef(null),n=a.useRef(null),s=a.useCallback(()=>{n.current&&n.current.focus()},[n]);a.useImperativeHandle(c,()=>({element:n.current,focus:s,props:e})),a.useImperativeHandle(r,()=>c.current);const u=a.useCallback(i=>{e.id&&l.dispatchEvent(e.onItemSelect,i,i.target,{id:e.id})},[e.onItemSelect]),o=a.useCallback(i=>{e.id&&l.dispatchEvent(e.onKeyDown,i,i.target,{id:e.id})},[e.onKeyDown]);return a.createElement("a",{href:"#","aria-current":e.ariaCurrent?e.ariaCurrent:e.isLast,role:"link",id:e.id,ref:n,style:e.style,dir:l.useDir(n,e.dir),tabIndex:l.getTabIndex(e.tabIndex,e.disabled),className:l.classNames({"k-breadcrumb-root-link":e.isFirst,"k-breadcrumb-link":!e.isFirst,"k-breadcrumb-icontext-link":(e.icon!==void 0||e.iconClass!==void 0)&&e.text,"k-breadcrumb-icon-link":(e.icon!==void 0||e.iconClass!==void 0)&&!e.text,"k-disabled":e.disabled}),onClick:i=>{i.preventDefault(),u(i)},onKeyDown:o},e.iconClass?a.createElement("span",{className:l.classNames("k-icon",e.iconClass)}):e.icon?e.icon:"",e.text&&a.createElement("span",{className:"k-breadcrumb-item-text"},e.text))}),f={id:t.string,className:t.string,tabIndex:t.number,style:t.object,dir:t.string,disabled:t.bool,text:t.string,icon:t.node,iconClass:t.string,onClick:t.func,ariaCurrent:t.bool};d.displayName="KendoReactBreadcrumbLink";d.propTypes=f;exports.BreadcrumbLink=d;
@@ -8,58 +8,58 @@
8
8
  "use client";
9
9
  import * as t from "react";
10
10
  import a from "prop-types";
11
- import { validatePackage as o, dispatchEvent as l, useDir as k, getTabIndex as f, classNames as d } from "@progress/kendo-react-common";
11
+ import { validatePackage as b, dispatchEvent as l, useDir as k, getTabIndex as f, classNames as d } from "@progress/kendo-react-common";
12
12
  import { packageMetadata as C } from "../package-metadata.mjs";
13
13
  const r = t.forwardRef((e, s) => {
14
- o(C);
15
- const c = t.useRef(null), n = t.useRef(null), m = t.useCallback(
14
+ b(C);
15
+ const c = t.useRef(null), i = t.useRef(null), m = t.useCallback(
16
16
  () => {
17
- n.current && n.current.focus();
17
+ i.current && i.current.focus();
18
18
  },
19
- [n]
19
+ [i]
20
20
  );
21
21
  t.useImperativeHandle(c, () => ({
22
- element: n.current,
22
+ element: i.current,
23
23
  focus: m,
24
24
  props: e
25
25
  })), t.useImperativeHandle(s, () => c.current);
26
26
  const u = t.useCallback(
27
- (i) => {
28
- e.id && l(e.onItemSelect, i, i.target, { id: e.id });
27
+ (n) => {
28
+ e.id && l(e.onItemSelect, n, n.target, { id: e.id });
29
29
  },
30
30
  [e.onItemSelect]
31
- ), b = t.useCallback(
32
- (i) => {
33
- e.id && l(e.onKeyDown, i, i.target, { id: e.id });
31
+ ), o = t.useCallback(
32
+ (n) => {
33
+ e.id && l(e.onKeyDown, n, n.target, { id: e.id });
34
34
  },
35
35
  [e.onKeyDown]
36
36
  );
37
37
  return /* @__PURE__ */ t.createElement(
38
- "span",
38
+ "a",
39
39
  {
40
+ href: "#",
40
41
  "aria-current": e.ariaCurrent ? e.ariaCurrent : e.isLast,
41
42
  role: "link",
42
43
  id: e.id,
43
- ref: n,
44
+ ref: i,
44
45
  style: e.style,
45
- dir: k(n, e.dir),
46
+ dir: k(i, e.dir),
46
47
  tabIndex: f(e.tabIndex, e.disabled),
47
48
  className: d(
48
49
  {
49
50
  "k-breadcrumb-root-link": e.isFirst,
50
51
  "k-breadcrumb-link": !e.isFirst,
51
- "k-breadcrumb-icontext-link": e.iconClass !== void 0 && e.text,
52
- "k-breadcrumb-icon-link": e.iconClass !== void 0 && !e.text,
52
+ "k-breadcrumb-icontext-link": (e.icon !== void 0 || e.iconClass !== void 0) && e.text,
53
+ "k-breadcrumb-icon-link": (e.icon !== void 0 || e.iconClass !== void 0) && !e.text,
53
54
  "k-disabled": e.disabled
54
55
  }
55
56
  ),
56
- onClick: u,
57
- onKeyDown: b
57
+ onClick: (n) => {
58
+ n.preventDefault(), u(n);
59
+ },
60
+ onKeyDown: o
58
61
  },
59
- e.iconClass ? /* @__PURE__ */ t.createElement("span", { className: d(
60
- "k-icon",
61
- e.iconClass
62
- ) }) : e.icon ? e.icon : "",
62
+ e.iconClass ? /* @__PURE__ */ t.createElement("span", { className: d("k-icon", e.iconClass) }) : e.icon ? e.icon : "",
63
63
  e.text && /* @__PURE__ */ t.createElement("span", { className: "k-breadcrumb-item-text" }, e.text)
64
64
  );
65
65
  }), x = {
package/card/Card.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 g=require("react"),r=require("prop-types"),u=require("@progress/kendo-react-common"),o=require("./interfaces/Enums.js"),O=require("../package-metadata.js");function R(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const c=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,c.get?c:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const a=R(g),i=a.forwardRef((e,n)=>{u.validatePackage(O.packageMetadata);const{children:t,dir:c,style:p,className:f,type:s,orientation:m,...y}=e,l=a.useRef(null),d=a.useRef(null);return a.useImperativeHandle(l,()=>({element:d.current,props:e})),a.useImperativeHandle(n,()=>l.current),a.createElement("div",{dir:c,style:p,ref:d,className:u.classNames("k-card",f,{[`k-card-${s}`]:s!==o.cardType.DEFAULT},m!==o.cardOrientation.HORIZONTAL?"k-card-vertical":"k-card-horizontal"),...y},t)});i.displayName="KendoReactCard";i.propTypes={children:r.node,className:r.string,dir:r.string,orientation:r.oneOf(["horizontal","vertical"]),style:r.object,type:r.oneOf(["default","primary","info","success","warning","error"])};i.defaultProps={type:o.cardType.DEFAULT,orientation:o.cardOrientation.VERTICAL};exports.Card=i;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react"),r=require("prop-types"),p=require("@progress/kendo-react-common"),o=require("./interfaces/Enums.js"),O=require("../package-metadata.js");function R(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const c=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,c.get?c:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const a=R(g),i=a.forwardRef((e,n)=>{p.validatePackage(O.packageMetadata);const{children:t,dir:c,style:f,className:m,type:s,orientation:l,...y}=e,d=a.useRef(null),u=a.useRef(null);return a.useImperativeHandle(d,()=>({element:u.current,props:e})),a.useImperativeHandle(n,()=>d.current),a.createElement("div",{dir:c,style:f,ref:u,className:p.classNames("k-card",m,{[`k-card-${s}`]:s!==o.cardType.DEFAULT},l===null?void 0:l!==o.cardOrientation.HORIZONTAL?"k-card-vertical":"k-card-horizontal"),...y},t)});i.displayName="KendoReactCard";i.propTypes={children:r.node,className:r.string,dir:r.string,orientation:r.oneOf(["horizontal","vertical"]),style:r.object,type:r.oneOf(["default","primary","info","success","warning","error"])};i.defaultProps={type:o.cardType.DEFAULT,orientation:o.cardOrientation.VERTICAL};exports.Card=i;
package/card/Card.mjs CHANGED
@@ -8,30 +8,30 @@
8
8
  "use client";
9
9
  import * as e from "react";
10
10
  import r from "prop-types";
11
- import { validatePackage as R, classNames as T } from "@progress/kendo-react-common";
12
- import { cardType as c, cardOrientation as s } from "./interfaces/Enums.mjs";
13
- import { packageMetadata as g } from "../package-metadata.mjs";
14
- const a = e.forwardRef((t, l) => {
15
- R(g);
16
- const { children: d, dir: m, style: p, className: f, type: o, orientation: u, ...y } = t, n = e.useRef(null), i = e.useRef(null);
17
- return e.useImperativeHandle(n, () => ({
18
- element: i.current,
11
+ import { validatePackage as R, classNames as v } from "@progress/kendo-react-common";
12
+ import { cardType as s, cardOrientation as l } from "./interfaces/Enums.mjs";
13
+ import { packageMetadata as T } from "../package-metadata.mjs";
14
+ const a = e.forwardRef((t, d) => {
15
+ R(T);
16
+ const { children: m, dir: p, style: f, className: u, type: o, orientation: n, ...y } = t, i = e.useRef(null), c = e.useRef(null);
17
+ return e.useImperativeHandle(i, () => ({
18
+ element: c.current,
19
19
  props: t
20
- })), e.useImperativeHandle(l, () => n.current), /* @__PURE__ */ e.createElement(
20
+ })), e.useImperativeHandle(d, () => i.current), /* @__PURE__ */ e.createElement(
21
21
  "div",
22
22
  {
23
- dir: m,
24
- style: p,
25
- ref: i,
26
- className: T(
23
+ dir: p,
24
+ style: f,
25
+ ref: c,
26
+ className: v(
27
27
  "k-card",
28
- f,
29
- { [`k-card-${o}`]: o !== c.DEFAULT },
30
- u !== s.HORIZONTAL ? "k-card-vertical" : "k-card-horizontal"
28
+ u,
29
+ { [`k-card-${o}`]: o !== s.DEFAULT },
30
+ n === null ? void 0 : n !== l.HORIZONTAL ? "k-card-vertical" : "k-card-horizontal"
31
31
  ),
32
32
  ...y
33
33
  },
34
- d
34
+ m
35
35
  );
36
36
  });
37
37
  a.displayName = "KendoReactCard";
@@ -44,8 +44,8 @@ a.propTypes = {
44
44
  type: r.oneOf(["default", "primary", "info", "success", "warning", "error"])
45
45
  };
46
46
  a.defaultProps = {
47
- type: c.DEFAULT,
48
- orientation: s.VERTICAL
47
+ type: s.DEFAULT,
48
+ orientation: l.VERTICAL
49
49
  };
50
50
  export {
51
51
  a as Card