@progress/kendo-react-layout 9.0.0-develop.8 → 9.0.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.
@@ -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"),S=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 e=Object.getOwnPropertyDescriptor(h,t);Object.defineProperty(n,t,e.get?e:{enumerable:!0,get:()=>h[t]})}}return n.default=h,Object.freeze(n)}const i=O(N),d=class d extends i.Component{constructor(n){super(n),this.actionSheetRef=i.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,e,s)=>{s.preventDefault(),s.shiftKey?e.focusPrevious(t):e.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,e,s)=>{if(t.ariaDisabled)return;const c=t.className&&t.className.indexOf?t.className.indexOf("k-actionsheet-item")!==-1:!1,l=e.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,e,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 e={};return i.Children.forEach(t,s=>{s&&(e[s.type.displayName]=s)}),e},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 e=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&&e&&!this.props.className&&(e.style.setProperty("--kendo-actionsheet-height","auto"),e.style.setProperty("--kendo-actionsheet-max-height","none")),e&&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:e,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"),g=r&&r.length>0&&u&&u.length>0,f=this.children(this.props.children),y=this.props.animationDuration||this.animationDuration,v=this.state.slide&&i.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[S.headerDisplayName]&&!n&&!t&&f[S.headerDisplayName],(n||t)&&i.createElement("div",{className:"k-actionsheet-titlebar k-text-center"},i.createElement("div",{className:"k-actionsheet-titlebar-group k-hbox"},i.createElement("div",{className:this.actionSheetTitleClass,id:this.ariaLabeledBy},n&&i.createElement("div",null,n),t&&i.createElement("div",{className:"k-actionsheet-subtitle"},t)))),f[I.contentDisplayName]||i.createElement("div",{className:"k-actionsheet-content"},i.createElement("div",{className:"k-list-ul",role:"group"},r&&r.map((o,p)=>i.createElement(E.ActionSheetItem,{...o,id:p,key:p,item:o,tabIndex:l||0,onClick:this.handleItemClick}))),g&&i.createElement("hr",{className:"k-hr"}),i.createElement("div",{className:"k-list-ul",role:"group"},u&&u.map((o,p)=>i.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 i.createElement(i.Fragment,null,c||this.state.show?i.createElement("div",{className:"k-actionsheet-container"},i.createElement("div",{className:"k-overlay",onClick:this.handleOverlayClick}),s?i.createElement(C.Animation,{transitionName:this.state.slide?"slide-up":"slide-down",onExited:this.hideActionSheet,transitionEnterDuration:y,transitionExitDuration:y,animationEnteringStyle:e||this.bottomPosition,animationEnteredStyle:e||this.bottomPosition,animationExitingStyle:e||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 U=require("react"),f=require("prop-types"),G=require("@progress/kendo-react-animation"),v=require("@progress/kendo-react-common"),J=require("../package-metadata.js"),q=require("./ActionSheetItem.js"),_=require("./ActionSheetHeader.js"),Q=require("./ActionSheetFooter.js"),V=require("./ActionSheetContent.js");function W(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const m=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,m.get?m:{enumerable:!0,get:()=>e[s]})}}return r.default=e,Object.freeze(r)}const n=W(U),x=n.forwardRef((e,r)=>{var A,P;v.validatePackage(J.packageMetadata);const{navigatableElements:s=N.navigatableElements,navigatable:m=N.navigatable}=e,j=(t,i,a)=>{a.preventDefault(),a.shiftKey?i.focusPrevious(t):i.focusNext(t)},K=(t,i,a)=>{if(t.ariaDisabled)return;const y=t.className&&t.className.indexOf?t.className.indexOf("k-actionsheet-item")!==-1:!1,E=i.elements.filter(c=>c.className.indexOf("k-actionsheet-item")!==-1);if(y&&e.onItemClick){a.preventDefault();const c=e.items[E.indexOf(t)];e.onItemClick.call(void 0,{syntheticEvent:a,item:c,title:c&&c.title})}if(y&&e.onItemSelect){a.preventDefault();const c=e.items[E.indexOf(t)];e.onItemSelect.call(void 0,{syntheticEvent:a,item:c,title:c&&c.title})}e.animation||u()},M=(t,i,a)=>{e.onOverlayClick&&(a.preventDefault(),e.onOverlayClick.call(void 0,a)),e.onClose&&(a.preventDefault(),e.onClose.call(void 0,a)),e.animation||u()},u=()=>{d({show:!1})},H=t=>{m&&h.current.triggerKeyboardEvent(t)},F=t=>{e.onOverlayClick&&e.onOverlayClick.call(void 0,t),e.onClose&&e.onClose.call(void 0,t),e.animation||u()},C=t=>{e.onItemClick&&e.onItemClick.call(void 0,t),e.onItemSelect&&e.onItemSelect.call(void 0,t),e.animation||u()},L=t=>{const i={};return n.Children.forEach(t,a=>{a&&(i[a.type.displayName]=a)}),i},I=n.useRef(null),S=n.useRef(null);n.useImperativeHandle(I,()=>({props:e})),n.useImperativeHandle(r,()=>I.current);const h=n.useRef(),B=n.useRef(e.animationDuration||300),g=n.useRef({bottom:"0",width:"100%"}),D=n.useRef(),[l,$]=n.useState({show:!1,slide:!1}),d=t=>{$(i=>({...i,...t}))};n.useEffect(()=>{e.expand&&!l.show&&d({show:!0})},[]),n.useEffect(()=>{const t=S.current;if(e.expand&&!l.show&&d({show:!0}),e.expand&&l.show&&!l.slide&&d({slide:!0}),!e.expand&&l.show&&l.slide&&d({slide:!1}),D!==l&&l.slide&&t&&!e.className&&(t.style.setProperty("--kendo-actionsheet-height","auto"),t.style.setProperty("--kendo-actionsheet-max-height","none")),t&&m){const a=[".k-actionsheet-item",...[".k-actionsheet-footer",".k-actionsheet-content",".k-actionsheet-titlebar"].map(y=>v.FOCUSABLE_ELEMENTS.concat(s).map(E=>`${y} ${E}`)).flat()];h.current=new v.Navigation({tabIndex:e.tabIndex||0,root:S,rovingTabIndex:!1,selectors:a,keyboardEvents:{keydown:{Tab:j,Enter:K,Escape:M}}}),h.current.focusElement(h.current.first,null)}D.current={...l}});const R="k-actionsheet-title",w=R,o=(A=e.items)==null?void 0:A.filter(t=>!t.group||t.group==="top"),b=(P=e.items)==null?void 0:P.filter(t=>t.group==="bottom"),z=o&&o.length>0&&b&&b.length>0,k=L(e.children),O=e.animationDuration||B.current,T=l.slide&&n.createElement("div",{className:v.classNames("k-actionsheet",e.className,{"k-actionsheet-bottom":!e.className}),role:"dialog","aria-modal":"true","aria-hidden":!1,"aria-labelledby":w,ref:S,onKeyDown:H},k[_.headerDisplayName]&&!e.title&&!e.subTitle&&k[_.headerDisplayName],(e.title||e.subTitle)&&n.createElement("div",{className:"k-actionsheet-titlebar k-text-center"},n.createElement("div",{className:"k-actionsheet-titlebar-group k-hbox"},n.createElement("div",{className:R,id:w},e.title&&n.createElement("div",null,e.title),e.subTitle&&n.createElement("div",{className:"k-actionsheet-subtitle"},e.subTitle)))),k[V.contentDisplayName]||n.createElement("div",{className:"k-actionsheet-content"},n.createElement("div",{className:"k-list-ul",role:"group"},o&&o.map((t,i)=>n.createElement(q.ActionSheetItem,{...t,id:i,key:i,item:t,tabIndex:e.tabIndex||0,onClick:C}))),z&&n.createElement("hr",{className:"k-hr"}),n.createElement("div",{className:"k-list-ul",role:"group"},b&&b.map((t,i)=>n.createElement(q.ActionSheetItem,{...t,id:i+((o==null?void 0:o.length)||0),key:i,item:t,tabIndex:e.tabIndex||0,onClick:C})))),k[Q.footerDisplayName]);return n.createElement(n.Fragment,null,e.expand||l.show?n.createElement("div",{className:"k-actionsheet-container"},n.createElement("div",{className:"k-overlay",onClick:F}),e.animation?n.createElement(G.Animation,{transitionName:l.slide?"slide-up":"slide-down",onExited:u,transitionEnterDuration:O,transitionExitDuration:O,animationEnteringStyle:e.animationStyles||g.current,animationEnteredStyle:e.animationStyles||g.current,animationExitingStyle:e.animationStyles||g.current,exit:!0,enter:!0,appear:!1},T):T):null)}),N={navigatable:!0,navigatableElements:[]};x.propTypes={items:f.array,subTitle:f.string,title:f.string,navigatable:f.bool,navigatableElements:f.array};x.displayName="KendoReactActionSheet";exports.ActionSheet=x;exports.actionSheetDefaultProps=N;
@@ -6,166 +6,168 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as e from "react";
10
- import p from "prop-types";
11
- import { Animation as g } from "@progress/kendo-react-animation";
12
- import { validatePackage as N, FOCUSABLE_ELEMENTS as S, Navigation as C, classNames as x } from "@progress/kendo-react-common";
13
- import { packageMetadata as D } from "../package-metadata.mjs";
14
- import { ActionSheetItem as E } from "./ActionSheetItem.mjs";
15
- import { headerDisplayName as v } from "./ActionSheetHeader.mjs";
16
- import { footerDisplayName as I } from "./ActionSheetFooter.mjs";
17
- import { contentDisplayName as w } from "./ActionSheetContent.mjs";
18
- const m = class m extends e.Component {
19
- /** @hidden */
20
- constructor(n) {
21
- 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) => {
22
- this.props.navigatable && this.navigation.triggerKeyboardEvent(t);
23
- }, this.onTab = (t, a, i) => {
24
- i.preventDefault(), i.shiftKey ? a.focusPrevious(t) : a.focusNext(t);
25
- }, this.handleOverlayClick = (t) => {
26
- 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();
27
- }, this.handleItemClick = (t) => {
28
- 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();
29
- }, this.onEnter = (t, a, i) => {
30
- if (t.ariaDisabled)
31
- return;
32
- const h = t.className && t.className.indexOf ? t.className.indexOf("k-actionsheet-item") !== -1 : !1, l = a.elements.filter((s) => s.className.indexOf("k-actionsheet-item") !== -1);
33
- if (h && this.props.onItemClick) {
34
- i.preventDefault();
35
- const s = this.props.items[l.indexOf(t)];
36
- this.props.onItemClick.call(void 0, {
37
- syntheticEvent: i,
38
- item: s,
39
- title: s && s.title
40
- });
41
- }
42
- if (h && this.props.onItemSelect) {
43
- i.preventDefault();
44
- const s = this.props.items[l.indexOf(t)];
45
- this.props.onItemSelect.call(void 0, {
46
- syntheticEvent: i,
47
- item: s,
48
- title: s && s.title
49
- });
50
- }
51
- this.props.animation || this.hideActionSheet();
52
- }, this.onEscape = (t, a, i) => {
53
- this.props.onOverlayClick && (i.preventDefault(), this.props.onOverlayClick.call(void 0, i)), this.props.onClose && (i.preventDefault(), this.props.onClose.call(void 0, i)), this.props.animation || this.hideActionSheet();
54
- }, this.hideActionSheet = () => {
55
- this.setState({ show: !1 });
56
- }, this.children = (t) => {
57
- const a = {};
58
- return e.Children.forEach(t, (i) => {
59
- i && (a[i.type.displayName] = i);
60
- }), a;
61
- }, this.state = {
62
- show: !1,
63
- slide: !1
64
- }, N(D);
65
- }
66
- /** @hidden */
67
- componentDidMount() {
68
- this.props.expand && !this.state.show && this.setState({ show: !0 });
69
- }
70
- /** @hidden */
71
- componentDidUpdate(n, t) {
72
- const a = this.actionSheetRef.current;
73
- 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 && a && !this.props.className && (a.style.setProperty("--kendo-actionsheet-height", "auto"), a.style.setProperty("--kendo-actionsheet-max-height", "none")), a && this.props.navigatable) {
74
- const h = [".k-actionsheet-item", ...[
9
+ import * as n from "react";
10
+ import r from "prop-types";
11
+ import { Animation as q } from "@progress/kendo-react-animation";
12
+ import { validatePackage as z, FOCUSABLE_ELEMENTS as G, Navigation as J, classNames as Q } from "@progress/kendo-react-common";
13
+ import { packageMetadata as V } from "../package-metadata.mjs";
14
+ import { ActionSheetItem as w } from "./ActionSheetItem.mjs";
15
+ import { headerDisplayName as T } from "./ActionSheetHeader.mjs";
16
+ import { footerDisplayName as W } from "./ActionSheetFooter.mjs";
17
+ import { contentDisplayName as X } from "./ActionSheetContent.mjs";
18
+ const P = n.forwardRef((e, A) => {
19
+ var D, R;
20
+ z(V);
21
+ const {
22
+ navigatableElements: K = O.navigatableElements,
23
+ navigatable: b = O.navigatable
24
+ } = e, _ = (t, i, a) => {
25
+ a.preventDefault(), a.shiftKey ? i.focusPrevious(t) : i.focusNext(t);
26
+ }, H = (t, i, a) => {
27
+ if (t.ariaDisabled)
28
+ return;
29
+ const h = t.className && t.className.indexOf ? t.className.indexOf("k-actionsheet-item") !== -1 : !1, E = i.elements.filter((o) => o.className.indexOf("k-actionsheet-item") !== -1);
30
+ if (h && e.onItemClick) {
31
+ a.preventDefault();
32
+ const o = e.items[E.indexOf(t)];
33
+ e.onItemClick.call(void 0, {
34
+ syntheticEvent: a,
35
+ item: o,
36
+ title: o && o.title
37
+ });
38
+ }
39
+ if (h && e.onItemSelect) {
40
+ a.preventDefault();
41
+ const o = e.items[E.indexOf(t)];
42
+ e.onItemSelect.call(void 0, {
43
+ syntheticEvent: a,
44
+ item: o,
45
+ title: o && o.title
46
+ });
47
+ }
48
+ e.animation || s();
49
+ }, L = (t, i, a) => {
50
+ e.onOverlayClick && (a.preventDefault(), e.onOverlayClick.call(void 0, a)), e.onClose && (a.preventDefault(), e.onClose.call(void 0, a)), e.animation || s();
51
+ }, s = () => {
52
+ m({ show: !1 });
53
+ }, B = (t) => {
54
+ b && d.current.triggerKeyboardEvent(t);
55
+ }, F = (t) => {
56
+ e.onOverlayClick && e.onOverlayClick.call(void 0, t), e.onClose && e.onClose.call(void 0, t), e.animation || s();
57
+ }, y = (t) => {
58
+ e.onItemClick && e.onItemClick.call(void 0, t), e.onItemSelect && e.onItemSelect.call(void 0, t), e.animation || s();
59
+ }, M = (t) => {
60
+ const i = {};
61
+ return n.Children.forEach(t, (a) => {
62
+ a && (i[a.type.displayName] = a);
63
+ }), i;
64
+ }, N = n.useRef(null), k = n.useRef(null);
65
+ n.useImperativeHandle(N, () => ({ props: e })), n.useImperativeHandle(
66
+ A,
67
+ () => N.current
68
+ );
69
+ const d = n.useRef(), $ = n.useRef(e.animationDuration || 300), v = n.useRef({ bottom: "0", width: "100%" }), g = n.useRef(), [l, U] = n.useState({ show: !1, slide: !1 }), m = (t) => {
70
+ U((i) => ({ ...i, ...t }));
71
+ };
72
+ n.useEffect(() => {
73
+ e.expand && !l.show && m({ show: !0 });
74
+ }, []), n.useEffect(() => {
75
+ const t = k.current;
76
+ if (e.expand && !l.show && m({ show: !0 }), e.expand && l.show && !l.slide && m({ slide: !0 }), !e.expand && l.show && l.slide && m({ slide: !1 }), g !== l && l.slide && t && !e.className && (t.style.setProperty("--kendo-actionsheet-height", "auto"), t.style.setProperty("--kendo-actionsheet-max-height", "none")), t && b) {
77
+ const a = [".k-actionsheet-item", ...[
75
78
  ".k-actionsheet-footer",
76
79
  ".k-actionsheet-content",
77
80
  ".k-actionsheet-titlebar"
78
- ].map((l) => S.concat(this.props.navigatableElements).map(
79
- (s) => `${l} ${s}`
81
+ ].map((h) => G.concat(K).map(
82
+ (E) => `${h} ${E}`
80
83
  )).flat()];
81
- this.navigation = new C({
82
- tabIndex: this.props.tabIndex || 0,
83
- root: this.actionSheetRef,
84
+ d.current = new J({
85
+ tabIndex: e.tabIndex || 0,
86
+ root: k,
84
87
  rovingTabIndex: !1,
85
- selectors: h,
88
+ selectors: a,
86
89
  keyboardEvents: {
87
90
  keydown: {
88
- Tab: this.onTab,
89
- Enter: this.onEnter,
90
- Escape: this.onEscape
91
+ Tab: _,
92
+ Enter: H,
93
+ Escape: L
91
94
  }
92
95
  }
93
- }), this.navigation.focusElement(this.navigation.first, null);
96
+ }), d.current.focusElement(d.current.first, null);
94
97
  }
95
- }
96
- /** @hidden */
97
- render() {
98
- const { title: n, subTitle: t, animationStyles: a, animation: i, expand: h, tabIndex: l, items: s } = this.props, r = s == null ? void 0 : s.filter(
99
- (o) => !o.group || o.group === "top"
100
- ), d = s == null ? void 0 : s.filter(
101
- (o) => o.group === "bottom"
102
- ), y = r && r.length > 0 && d && d.length > 0, f = this.children(this.props.children), u = this.props.animationDuration || this.animationDuration, k = this.state.slide && /* @__PURE__ */ e.createElement(
103
- "div",
98
+ g.current = { ...l };
99
+ });
100
+ const S = "k-actionsheet-title", x = S, c = (D = e.items) == null ? void 0 : D.filter(
101
+ (t) => !t.group || t.group === "top"
102
+ ), f = (R = e.items) == null ? void 0 : R.filter(
103
+ (t) => t.group === "bottom"
104
+ ), j = c && c.length > 0 && f && f.length > 0, u = M(e.children), C = e.animationDuration || $.current, I = l.slide && /* @__PURE__ */ n.createElement(
105
+ "div",
106
+ {
107
+ className: Q("k-actionsheet", e.className, {
108
+ "k-actionsheet-bottom": !e.className
109
+ }),
110
+ role: "dialog",
111
+ "aria-modal": "true",
112
+ "aria-hidden": !1,
113
+ "aria-labelledby": x,
114
+ ref: k,
115
+ onKeyDown: B
116
+ },
117
+ u[T] && !e.title && !e.subTitle && u[T],
118
+ (e.title || e.subTitle) && /* @__PURE__ */ n.createElement("div", { className: "k-actionsheet-titlebar k-text-center" }, /* @__PURE__ */ n.createElement("div", { className: "k-actionsheet-titlebar-group k-hbox" }, /* @__PURE__ */ n.createElement("div", { className: S, id: x }, e.title && /* @__PURE__ */ n.createElement("div", null, e.title), e.subTitle && /* @__PURE__ */ n.createElement("div", { className: "k-actionsheet-subtitle" }, e.subTitle)))),
119
+ u[X] || /* @__PURE__ */ n.createElement("div", { className: "k-actionsheet-content" }, /* @__PURE__ */ n.createElement("div", { className: "k-list-ul", role: "group" }, c && c.map((t, i) => /* @__PURE__ */ n.createElement(
120
+ w,
104
121
  {
105
- className: x("k-actionsheet", this.props.className, {
106
- "k-actionsheet-bottom": !this.props.className
107
- }),
108
- role: "dialog",
109
- "aria-modal": "true",
110
- "aria-hidden": !1,
111
- "aria-labelledby": this.ariaLabeledBy,
112
- ref: this.actionSheetRef,
113
- onKeyDown: this.handleKeyDown
114
- },
115
- f[v] && !n && !t && f[v],
116
- (n || t) && /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-titlebar k-text-center" }, /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-titlebar-group k-hbox" }, /* @__PURE__ */ e.createElement("div", { className: this.actionSheetTitleClass, id: this.ariaLabeledBy }, n && /* @__PURE__ */ e.createElement("div", null, n), t && /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-subtitle" }, t)))),
117
- f[w] || /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-content" }, /* @__PURE__ */ e.createElement("div", { className: "k-list-ul", role: "group" }, r && r.map((o, c) => /* @__PURE__ */ e.createElement(
118
- E,
119
- {
120
- ...o,
121
- id: c,
122
- key: c,
123
- item: o,
124
- tabIndex: l || 0,
125
- onClick: this.handleItemClick
126
- }
127
- ))), y && /* @__PURE__ */ e.createElement("hr", { className: "k-hr" }), /* @__PURE__ */ e.createElement("div", { className: "k-list-ul", role: "group" }, d && d.map((o, c) => /* @__PURE__ */ e.createElement(
128
- E,
129
- {
130
- ...o,
131
- id: c + ((r == null ? void 0 : r.length) || 0),
132
- key: c,
133
- item: o,
134
- tabIndex: l || 0,
135
- onClick: this.handleItemClick
136
- }
137
- )))),
138
- f[I]
139
- );
140
- return /* @__PURE__ */ e.createElement(e.Fragment, null, h || this.state.show ? /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-container" }, /* @__PURE__ */ e.createElement("div", { className: "k-overlay", onClick: this.handleOverlayClick }), i ? /* @__PURE__ */ e.createElement(
141
- g,
122
+ ...t,
123
+ id: i,
124
+ key: i,
125
+ item: t,
126
+ tabIndex: e.tabIndex || 0,
127
+ onClick: y
128
+ }
129
+ ))), j && /* @__PURE__ */ n.createElement("hr", { className: "k-hr" }), /* @__PURE__ */ n.createElement("div", { className: "k-list-ul", role: "group" }, f && f.map((t, i) => /* @__PURE__ */ n.createElement(
130
+ w,
142
131
  {
143
- transitionName: this.state.slide ? "slide-up" : "slide-down",
144
- onExited: this.hideActionSheet,
145
- transitionEnterDuration: u,
146
- transitionExitDuration: u,
147
- animationEnteringStyle: a || this.bottomPosition,
148
- animationEnteredStyle: a || this.bottomPosition,
149
- animationExitingStyle: a || this.bottomPosition,
150
- exit: !0,
151
- enter: !0,
152
- appear: !1
153
- },
154
- k
155
- ) : k) : null);
156
- }
157
- };
158
- m.displayName = "KendoReactActionSheet", m.propTypes = {
159
- items: p.array,
160
- subTitle: p.string,
161
- title: p.string,
162
- navigatable: p.bool,
163
- navigatableElements: p.array
164
- }, m.defaultProps = {
132
+ ...t,
133
+ id: i + ((c == null ? void 0 : c.length) || 0),
134
+ key: i,
135
+ item: t,
136
+ tabIndex: e.tabIndex || 0,
137
+ onClick: y
138
+ }
139
+ )))),
140
+ u[W]
141
+ );
142
+ return /* @__PURE__ */ n.createElement(n.Fragment, null, e.expand || l.show ? /* @__PURE__ */ n.createElement("div", { className: "k-actionsheet-container" }, /* @__PURE__ */ n.createElement("div", { className: "k-overlay", onClick: F }), e.animation ? /* @__PURE__ */ n.createElement(
143
+ q,
144
+ {
145
+ transitionName: l.slide ? "slide-up" : "slide-down",
146
+ onExited: s,
147
+ transitionEnterDuration: C,
148
+ transitionExitDuration: C,
149
+ animationEnteringStyle: e.animationStyles || v.current,
150
+ animationEnteredStyle: e.animationStyles || v.current,
151
+ animationExitingStyle: e.animationStyles || v.current,
152
+ exit: !0,
153
+ enter: !0,
154
+ appear: !1
155
+ },
156
+ I
157
+ ) : I) : null);
158
+ }), O = {
165
159
  navigatable: !0,
166
160
  navigatableElements: []
167
161
  };
168
- let b = m;
162
+ P.propTypes = {
163
+ items: r.array,
164
+ subTitle: r.string,
165
+ title: r.string,
166
+ navigatable: r.bool,
167
+ navigatableElements: r.array
168
+ };
169
+ P.displayName = "KendoReactActionSheet";
169
170
  export {
170
- b as ActionSheet
171
+ P as ActionSheet,
172
+ O as actionSheetDefaultProps
171
173
  };