@progress/kendo-react-layout 13.4.0-develop.2 → 13.4.0-develop.4

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,7 +5,6 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { default as PropTypes } from 'prop-types';
9
8
  import { TileLayoutGap, TileLayoutItem, TilePosition, TileLayoutRepositionEvent, TileStrictPosition, TileLayoutAutoFlow } from './interfaces/index.js';
10
9
  import * as React from 'react';
11
10
  /**
@@ -117,16 +116,6 @@ export interface TileLayoutProps {
117
116
  * ```
118
117
  */
119
118
  positions?: TilePosition[];
120
- /**
121
- * Fires when the user repositions the tile by either dragging or resizing
122
- * ([see example](https://www.telerik.com/kendo-react-ui/components/layout/tilelayout/tiles#toc-controlling-the-position)).
123
- *
124
- * @example
125
- * ```jsx
126
- * <TileLayout onReposition={(e) => console.log(e.value)} />
127
- * ```
128
- */
129
- onReposition?: (event: TileLayoutRepositionEvent) => void;
130
119
  /**
131
120
  * Controls how the auto-placement algorithm works, specifying exactly how auto-placed items get flowed into the TileLayout.
132
121
  * For further reference, check [grid-auto-flow CSS](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-flow) article.
@@ -141,6 +130,16 @@ export interface TileLayoutProps {
141
130
  * ```
142
131
  */
143
132
  autoFlow?: TileLayoutAutoFlow;
133
+ /**
134
+ * Fires when the user repositions the tile by either dragging or resizing
135
+ * ([see example](https://www.telerik.com/kendo-react-ui/components/layout/tilelayout/tiles#toc-controlling-the-position)).
136
+ *
137
+ * @example
138
+ * ```jsx
139
+ * <TileLayout onReposition={(e) => console.log(e.value)} />
140
+ * ```
141
+ */
142
+ onReposition?: (event: TileLayoutRepositionEvent) => void;
144
143
  /**
145
144
  * Use this callback to prevent or allow dragging of the tiles based on specific DOM events.
146
145
  * Setting `ignoreDrag={(e) => { return !(e.target.classList.contains("k-card-title")); }}` makes only the headers draggable.
@@ -151,7 +150,7 @@ export interface TileLayoutProps {
151
150
  * <TileLayout ignoreDrag={(e) => e.target.nodeName === 'INPUT'} />
152
151
  * ```
153
152
  */
154
- ignoreDrag?: (event: any) => boolean;
153
+ ignoreDrag?: (element: HTMLElement) => boolean;
155
154
  }
156
155
  /**
157
156
  * @hidden
@@ -161,68 +160,24 @@ export interface TileLayoutState {
161
160
  activeHint?: boolean;
162
161
  }
163
162
  /**
164
- * Represents the [KendoReact TileLayout component](https://www.telerik.com/kendo-react-ui/components/layout/tilelayout).
163
+ * Represents the public API of the TileLayout component.
165
164
  */
166
- export declare class TileLayout extends React.Component<TileLayoutProps, TileLayoutState> {
167
- /**
168
- * @hidden
169
- */
170
- static propTypes: {
171
- id: PropTypes.Requireable<string>;
172
- style: PropTypes.Requireable<object>;
173
- className: PropTypes.Requireable<string>;
174
- dir: PropTypes.Requireable<string>;
175
- gap: PropTypes.Requireable<object>;
176
- columns: PropTypes.Requireable<number>;
177
- columnWidth: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
178
- rowHeight: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
179
- dataItemKey: PropTypes.Requireable<string>;
180
- items: PropTypes.Requireable<any[]>;
181
- positions: PropTypes.Requireable<any[]>;
182
- autoFlow: PropTypes.Requireable<string>;
183
- onReposition: PropTypes.Requireable<(...args: any[]) => any>;
184
- ignoreDrag: PropTypes.Requireable<(...args: any[]) => any>;
185
- };
186
- /**
187
- * @hidden
188
- */
189
- static displayName: string;
190
- /**
191
- * @hidden
192
- */
193
- _element: HTMLDivElement | null;
194
- /**
195
- * @hidden
196
- */
197
- state: {
198
- positions: ({
199
- order: number;
200
- rowSpan: number;
201
- colSpan: number;
202
- } & TilePosition)[];
203
- activeHint: boolean;
204
- };
165
+ export interface TileLayoutHandle {
205
166
  /**
206
167
  * Gets the HTML element of the TileLayout component.
207
168
  */
208
- get element(): HTMLDivElement | null;
169
+ element: HTMLDivElement | null;
209
170
  /**
210
- * @hidden
171
+ * Focuses the TileLayout component.
211
172
  */
212
173
  focus: () => void;
213
- /**
214
- * @hidden
215
- */
216
- static getDerivedStateFromProps(props: TileLayoutProps, state: TileLayoutState): {
217
- positions: ({
218
- order: number;
219
- rowSpan: number;
220
- colSpan: number;
221
- } & TilePosition)[];
222
- } | null;
223
- /**
224
- * @hidden
225
- */
226
- update: (index: number, dOrder: number, dCol: number, dRowSpan?: number, dColSpan?: number) => void;
227
- render(): React.JSX.Element;
228
174
  }
175
+ /**
176
+ * Represents the [KendoReact TileLayout component](https://www.telerik.com/kendo-react-ui/components/layout/tilelayout).
177
+ *
178
+ * @example
179
+ * ```jsx
180
+ * <TileLayout />
181
+ * ```
182
+ */
183
+ export declare const TileLayout: React.ForwardRefExoticComponent<TileLayoutProps & React.RefAttributes<TileLayoutHandle>>;
@@ -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 w=require("react"),t=require("prop-types"),y=require("@progress/kendo-react-common"),S=require("./InternalTile.js");function k(d){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(d){for(const s in d)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(d,s);Object.defineProperty(o,s,n.get?n:{enumerable:!0,get:()=>d[s]})}}return o.default=d,Object.freeze(o)}const a=k(w),v={column:"k-grid-flow-col",row:"k-grid-flow-row","column dense":"k-grid-flow-col-dense","row dense":"k-grid-flow-row-dense",unset:"k-grid-flow-unset"},g=class g extends a.Component{constructor(){super(...arguments),this._element=null,this.state={positions:(this.props.items||[]).map((o,s)=>Object.assign({order:s,rowSpan:1,colSpan:1},o.defaultPosition)),activeHint:!1},this.focus=()=>{this._element&&this._element.focus()},this.update=(o,s,n,r=0,c=0)=>{if(s===0&&n===0&&!c&&!r)return;let p=!1;const m=this.state.positions.map(f=>Object.assign({},f)),i=m[o],u=m.find(f=>f.order===i.order+s);u&&u!==i&&(i.order+=s,u.order+=-s,p=!0);const h=i.col+n;n!==0&&h>=1&&h+i.colSpan<=(this.props.columns||3)+1&&(i.col=h,p=!0);const e=i.colSpan+c;c&&e>=1&&e+i.col<=(this.props.columns||3)+1&&(i.colSpan=e,p=!0);const l=i.rowSpan+r;r&&l>=1&&(i.rowSpan=l,p=!0),p&&(this.setState({positions:m}),y.dispatchEvent(this.props.onReposition,{},this,{value:m}))}}get element(){return this._element}static getDerivedStateFromProps(o,s){return o.positions?{positions:o.positions.map((n,r)=>Object.assign({order:r,rowSpan:1,colSpan:1},n))}:o.items&&(!s.positions||o.items.length!==s.positions.length)?{positions:o.items.map((n,r)=>Object.assign({order:r,rowSpan:1,colSpan:1},n.defaultPosition))}:null}render(){const{className:o,columns:s=3,columnWidth:n="1fr",gap:r,rowHeight:c="1fr",style:p,autoFlow:m="column",items:i=[]}=this.props,u=r?`${typeof r.rows=="number"?r.rows+"px":r.rows} ${typeof r.columns=="number"?r.columns+"px":r.columns}`:16,h={gridTemplateColumns:`repeat(${s}, minmax(0px, ${typeof n=="number"?n+"px":n}))`,gridAutoRows:`minmax(0px, ${typeof c=="number"?c+"px":c})`,gap:u,padding:u,...p};return a.createElement("div",{ref:e=>{this._element=e},dir:this.props.dir,className:y.classNames("k-tilelayout k-pos-relative",v[m],o),style:h,id:this.props.id,role:"list"},i.map((e,l)=>a.createElement(a.Fragment,{key:this.props.dataItemKey?y.getter(this.props.dataItemKey)(e):l},a.createElement(S.InternalTile,{update:this.update,defaultPosition:this.state.positions[l],index:l,resizable:e.resizable,reorderable:e.reorderable,style:e.style,header:e.header,className:e.className,hintClassName:e.hintClassName,hintStyle:e.hintStyle,ignoreDrag:this.props.ignoreDrag,onPress:()=>this.setState({activeHint:!0}),onRelease:()=>this.setState({activeHint:!1})},e.item?e.item:a.createElement(a.Fragment,null,a.createElement("div",{className:"k-tilelayout-item-header k-card-header"},a.isValidElement(e.header)?e.header:a.createElement("div",{id:typeof e.header=="string"?e.header:this.props.id?`tilelayout-${this.props.id}-${l}`:`tilelayout-${l}`,className:"k-card-title"},e.header)),a.createElement("div",{className:"k-tilelayout-item-body k-card-body"},e.body))))),!this.state.activeHint&&a.createElement("div",{className:"k-layout-item-hint",style:{display:"none",zIndex:"1",height:"auto"}}))}};g.propTypes={id:t.string,style:t.object,className:t.string,dir:t.string,gap:t.object,columns:t.number,columnWidth:t.oneOfType([t.number,t.string]),rowHeight:t.oneOfType([t.number,t.string]),dataItemKey:t.string,items:t.array,positions:t.array,autoFlow:t.oneOf(["column","row","column dense","row dense","unset"]),onReposition:t.func,ignoreDrag:t.func},g.displayName="KendoTileLayout";let b=g;exports.TileLayout=b;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),t=require("prop-types"),O=require("@progress/kendo-react-common"),Q=require("./InternalTile.js");function X(c){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const m in c)if(m!=="default"){const l=Object.getOwnPropertyDescriptor(c,m);Object.defineProperty(d,m,l.get?l:{enumerable:!0,get:()=>c[m]})}}return d.default=c,Object.freeze(d)}const o=X(r),Y={column:"k-grid-flow-col",row:"k-grid-flow-row","column dense":"k-grid-flow-col-dense","row dense":"k-grid-flow-row-dense",unset:"k-grid-flow-unset"},y={columns:3,columnWidth:"1fr",rowHeight:"1fr",autoFlow:"column",items:[]},$=o.forwardRef((c,d)=>{const{className:m,columns:l=y.columns,columnWidth:g=y.columnWidth,gap:i,rowHeight:h=y.rowHeight,style:j,autoFlow:q=y.autoFlow,items:u=y.items,positions:w,onReposition:P,dataItemKey:C,id:N,dir:z,ignoreDrag:A}=c,K=r.useCallback(()=>{k.current&&k.current.focus()},[]),b=r.useRef(null),k=r.useRef(null);o.useImperativeHandle(b,()=>({element:k.current,focus:K})),o.useImperativeHandle(d,()=>b.current);const p=w!==void 0,R=r.useCallback(e=>e.map((n,a)=>({order:a,rowSpan:1,colSpan:1,...n.defaultPosition})),[]),U=r.useMemo(()=>{if(w)return w.map((e,n)=>({order:n,rowSpan:1,colSpan:1,...e}))},[w]),[V,D]=r.useState(()=>R(u)),[B,M]=r.useState(!1),W=r.useRef(u.length);r.useEffect(()=>{!p&&u.length!==W.current&&(D(R(u)),W.current=u.length)},[u,p,R]);const T=p?U:V,G=r.useCallback((e,n,a,S=0,I=0)=>{if(n===0&&a===0&&!I&&!S)return;let f=!1;const v=T.map(F=>({...F})),s=v[e],H=v.find(F=>F.order===s.order+n);H&&H!==s&&(s.order+=n,H.order+=-n,f=!0);const L=s.col+a;a!==0&&L>=1&&L+s.colSpan<=l+1&&(s.col=L,f=!0);const x=s.colSpan+I;I&&x>=1&&x+s.col<=l+1&&(s.colSpan=x,f=!0);const _=s.rowSpan+S;S&&_>=1&&(s.rowSpan=_,f=!0),f&&(p||D(v),P&&O.dispatchEvent(P,{},b.current,{value:v}))},[T,l,p,P,b]),E=r.useMemo(()=>i?`${typeof i.rows=="number"?i.rows+"px":i.rows} ${typeof i.columns=="number"?i.columns+"px":i.columns}`:16,[i]),J=r.useMemo(()=>({gridTemplateColumns:`repeat(${l}, minmax(0px, ${typeof g=="number"?g+"px":g}))`,gridAutoRows:`minmax(0px, ${typeof h=="number"?h+"px":h})`,gap:E,padding:E,...j}),[l,g,h,E,j]);return o.createElement("div",{ref:k,dir:z,className:O.classNames("k-tilelayout k-pos-relative",Y[q],m),style:J,id:N,role:"list"},u.map((e,n)=>{let a;return typeof e.header=="string"?a=e.header:a=`tilelayout-${N?`${N}-`:""}${n}`,o.createElement(o.Fragment,{key:C?O.getter(C)(e):n},o.createElement(Q.InternalTile,{update:G,defaultPosition:T[n],index:n,resizable:e.resizable,reorderable:e.reorderable,style:e.style,header:e.header,className:e.className,hintClassName:e.hintClassName,hintStyle:e.hintStyle,ignoreDrag:A,onPress:()=>M(!0),onRelease:()=>M(!1)},e.item?e.item:o.createElement(o.Fragment,null,o.createElement("div",{className:"k-tilelayout-item-header k-card-header"},o.isValidElement(e.header)?e.header:o.createElement("div",{id:a,className:"k-card-title"},e.header)),o.createElement("div",{className:"k-tilelayout-item-body k-card-body"},e.body))))}),!B&&o.createElement("div",{className:"k-layout-item-hint",style:{display:"none",zIndex:"1",height:"auto"}}))});$.displayName="KendoTileLayout";$.propTypes={id:t.string,style:t.object,className:t.string,dir:t.string,gap:t.object,columns:t.number,columnWidth:t.oneOfType([t.number,t.string]),rowHeight:t.oneOfType([t.number,t.string]),dataItemKey:t.string,items:t.array,positions:t.array,autoFlow:t.oneOf(["column","row","column dense","row dense","unset"]),onReposition:t.func,ignoreDrag:t.func};exports.TileLayout=$;
@@ -5,92 +5,103 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import * as r from "react";
8
+ import * as o from "react";
9
+ import { useCallback as R, useRef as T, useMemo as F, useState as z, useEffect as Y } from "react";
9
10
  import t from "prop-types";
10
- import { dispatchEvent as y, classNames as w, getter as b } from "@progress/kendo-react-common";
11
- import { InternalTile as S } from "./InternalTile.mjs";
12
- const k = {
11
+ import { dispatchEvent as Z, classNames as ee, getter as te } from "@progress/kendo-react-common";
12
+ import { InternalTile as oe } from "./InternalTile.mjs";
13
+ const re = {
13
14
  column: "k-grid-flow-col",
14
15
  row: "k-grid-flow-row",
15
16
  "column dense": "k-grid-flow-col-dense",
16
17
  "row dense": "k-grid-flow-row-dense",
17
18
  unset: "k-grid-flow-unset"
18
- }, h = class h extends r.Component {
19
- constructor() {
20
- super(...arguments), this._element = null, this.state = {
21
- positions: (this.props.items || []).map(
22
- (i, n) => Object.assign({ order: n, rowSpan: 1, colSpan: 1 }, i.defaultPosition)
23
- ),
24
- activeHint: !1
25
- }, this.focus = () => {
26
- this._element && this._element.focus();
27
- }, this.update = (i, n, a, s = 0, p = 0) => {
28
- if (n === 0 && a === 0 && !p && !s)
19
+ }, m = {
20
+ columns: 3,
21
+ columnWidth: "1fr",
22
+ rowHeight: "1fr",
23
+ autoFlow: "column",
24
+ items: []
25
+ }, K = o.forwardRef((U, j) => {
26
+ const {
27
+ className: O,
28
+ columns: i = m.columns,
29
+ columnWidth: d = m.columnWidth,
30
+ gap: a,
31
+ rowHeight: p = m.rowHeight,
32
+ style: L,
33
+ autoFlow: V = m.autoFlow,
34
+ items: l = m.items,
35
+ positions: f,
36
+ onReposition: b,
37
+ dataItemKey: $,
38
+ id: v,
39
+ dir: _,
40
+ ignoreDrag: M
41
+ } = U, q = R(() => {
42
+ g.current && g.current.focus();
43
+ }, []), y = T(null), g = T(null);
44
+ o.useImperativeHandle(
45
+ y,
46
+ () => ({
47
+ element: g.current,
48
+ focus: q
49
+ })
50
+ ), o.useImperativeHandle(j, () => y.current);
51
+ const c = f !== void 0, k = R((e) => e.map((r, s) => ({ order: s, rowSpan: 1, colSpan: 1, ...r.defaultPosition })), []), B = F(() => {
52
+ if (f)
53
+ return f.map(
54
+ (e, r) => ({ order: r, rowSpan: 1, colSpan: 1, ...e })
55
+ );
56
+ }, [f]), [G, W] = z(
57
+ () => k(l)
58
+ ), [J, A] = z(!1), C = T(l.length);
59
+ Y(() => {
60
+ !c && l.length !== C.current && (W(k(l)), C.current = l.length);
61
+ }, [l, c, k]);
62
+ const S = c ? B : G, Q = R(
63
+ (e, r, s, h = 0, P = 0) => {
64
+ if (r === 0 && s === 0 && !P && !h)
29
65
  return;
30
- let m = !1;
31
- const c = this.state.positions.map((f) => Object.assign({}, f)), o = c[i], u = c.find((f) => f.order === o.order + n);
32
- u && u !== o && (o.order += n, u.order += -n, m = !0);
33
- const d = o.col + a;
34
- a !== 0 && d >= 1 && d + o.colSpan <= (this.props.columns || 3) + 1 && (o.col = d, m = !0);
35
- const e = o.colSpan + p;
36
- p && e >= 1 && e + o.col <= (this.props.columns || 3) + 1 && (o.colSpan = e, m = !0);
37
- const l = o.rowSpan + s;
38
- s && l >= 1 && (o.rowSpan = l, m = !0), m && (this.setState({ positions: c }), y(this.props.onReposition, {}, this, { value: c }));
39
- };
40
- }
41
- /**
42
- * Gets the HTML element of the TileLayout component.
43
- */
44
- get element() {
45
- return this._element;
46
- }
47
- /**
48
- * @hidden
49
- */
50
- static getDerivedStateFromProps(i, n) {
51
- return i.positions ? {
52
- positions: i.positions.map((a, s) => Object.assign({ order: s, rowSpan: 1, colSpan: 1 }, a))
53
- } : i.items && (!n.positions || i.items.length !== n.positions.length) ? {
54
- positions: i.items.map(
55
- (a, s) => Object.assign({ order: s, rowSpan: 1, colSpan: 1 }, a.defaultPosition)
56
- )
57
- } : null;
58
- }
59
- render() {
60
- const {
61
- className: i,
62
- columns: n = 3,
63
- columnWidth: a = "1fr",
64
- gap: s,
65
- rowHeight: p = "1fr",
66
- style: m,
67
- autoFlow: c = "column",
68
- items: o = []
69
- } = this.props, u = s ? `${typeof s.rows == "number" ? s.rows + "px" : s.rows} ${typeof s.columns == "number" ? s.columns + "px" : s.columns}` : 16, d = {
70
- gridTemplateColumns: `repeat(${n}, minmax(0px, ${typeof a == "number" ? a + "px" : a}))`,
66
+ let u = !1;
67
+ const w = S.map((I) => ({ ...I })), n = w[e], E = w.find((I) => I.order === n.order + r);
68
+ E && E !== n && (n.order += r, E.order += -r, u = !0);
69
+ const x = n.col + s;
70
+ s !== 0 && x >= 1 && x + n.colSpan <= i + 1 && (n.col = x, u = !0);
71
+ const H = n.colSpan + P;
72
+ P && H >= 1 && H + n.col <= i + 1 && (n.colSpan = H, u = !0);
73
+ const D = n.rowSpan + h;
74
+ h && D >= 1 && (n.rowSpan = D, u = !0), u && (c || W(w), b && Z(b, {}, y.current, { value: w }));
75
+ },
76
+ [S, i, c, b, y]
77
+ ), N = F(() => a ? `${typeof a.rows == "number" ? a.rows + "px" : a.rows} ${typeof a.columns == "number" ? a.columns + "px" : a.columns}` : 16, [a]), X = F(
78
+ () => ({
79
+ gridTemplateColumns: `repeat(${i}, minmax(0px, ${typeof d == "number" ? d + "px" : d}))`,
71
80
  gridAutoRows: `minmax(0px, ${typeof p == "number" ? p + "px" : p})`,
72
- gap: u,
73
- padding: u,
74
- ...m
75
- };
76
- return /* @__PURE__ */ r.createElement(
77
- "div",
78
- {
79
- ref: (e) => {
80
- this._element = e;
81
- },
82
- dir: this.props.dir,
83
- className: w("k-tilelayout k-pos-relative", k[c], i),
84
- style: d,
85
- id: this.props.id,
86
- role: "list"
87
- },
88
- o.map((e, l) => /* @__PURE__ */ r.createElement(r.Fragment, { key: this.props.dataItemKey ? b(this.props.dataItemKey)(e) : l }, /* @__PURE__ */ r.createElement(
89
- S,
81
+ gap: N,
82
+ padding: N,
83
+ ...L
84
+ }),
85
+ [i, d, p, N, L]
86
+ );
87
+ return /* @__PURE__ */ o.createElement(
88
+ "div",
89
+ {
90
+ ref: g,
91
+ dir: _,
92
+ className: ee("k-tilelayout k-pos-relative", re[V], O),
93
+ style: X,
94
+ id: v,
95
+ role: "list"
96
+ },
97
+ l.map((e, r) => {
98
+ let s;
99
+ return typeof e.header == "string" ? s = e.header : s = `tilelayout-${v ? `${v}-` : ""}${r}`, /* @__PURE__ */ o.createElement(o.Fragment, { key: $ ? te($)(e) : r }, /* @__PURE__ */ o.createElement(
100
+ oe,
90
101
  {
91
- update: this.update,
92
- defaultPosition: this.state.positions[l],
93
- index: l,
102
+ update: Q,
103
+ defaultPosition: S[r],
104
+ index: r,
94
105
  resizable: e.resizable,
95
106
  reorderable: e.reorderable,
96
107
  style: e.style,
@@ -98,24 +109,18 @@ const k = {
98
109
  className: e.className,
99
110
  hintClassName: e.hintClassName,
100
111
  hintStyle: e.hintStyle,
101
- ignoreDrag: this.props.ignoreDrag,
102
- onPress: () => this.setState({ activeHint: !0 }),
103
- onRelease: () => this.setState({ activeHint: !1 })
112
+ ignoreDrag: M,
113
+ onPress: () => A(!0),
114
+ onRelease: () => A(!1)
104
115
  },
105
- e.item ? e.item : /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement("div", { className: "k-tilelayout-item-header k-card-header" }, r.isValidElement(e.header) ? e.header : /* @__PURE__ */ r.createElement(
106
- "div",
107
- {
108
- id: typeof e.header == "string" ? e.header : this.props.id ? `tilelayout-${this.props.id}-${l}` : `tilelayout-${l}`,
109
- className: "k-card-title"
110
- },
111
- e.header
112
- )), /* @__PURE__ */ r.createElement("div", { className: "k-tilelayout-item-body k-card-body" }, e.body))
113
- ))),
114
- !this.state.activeHint && /* @__PURE__ */ r.createElement("div", { className: "k-layout-item-hint", style: { display: "none", zIndex: "1", height: "auto" } })
115
- );
116
- }
117
- };
118
- h.propTypes = {
116
+ e.item ? e.item : /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("div", { className: "k-tilelayout-item-header k-card-header" }, o.isValidElement(e.header) ? e.header : /* @__PURE__ */ o.createElement("div", { id: s, className: "k-card-title" }, e.header)), /* @__PURE__ */ o.createElement("div", { className: "k-tilelayout-item-body k-card-body" }, e.body))
117
+ ));
118
+ }),
119
+ !J && /* @__PURE__ */ o.createElement("div", { className: "k-layout-item-hint", style: { display: "none", zIndex: "1", height: "auto" } })
120
+ );
121
+ });
122
+ K.displayName = "KendoTileLayout";
123
+ K.propTypes = {
119
124
  id: t.string,
120
125
  style: t.object,
121
126
  className: t.string,
@@ -130,8 +135,7 @@ h.propTypes = {
130
135
  autoFlow: t.oneOf(["column", "row", "column dense", "row dense", "unset"]),
131
136
  onReposition: t.func,
132
137
  ignoreDrag: t.func
133
- }, h.displayName = "KendoTileLayout";
134
- let g = h;
138
+ };
135
139
  export {
136
- g as TileLayout
140
+ K as TileLayout
137
141
  };
@@ -6,7 +6,7 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import { BaseEvent } from '@progress/kendo-react-common';
9
- import { TileLayout } from '../TileLayout.js';
9
+ import { TileLayoutHandle } from '../TileLayout.js';
10
10
  /**
11
11
  * The interface for describing items that can be passed to the `items` prop of the TileLayout component.
12
12
  */
@@ -151,7 +151,7 @@ export type TileLayoutAutoFlow = 'column' | 'row' | 'column dense' | 'row dense'
151
151
  /**
152
152
  * The arguments for the `onReposition` TileLayout event.
153
153
  */
154
- export interface TileLayoutRepositionEvent extends BaseEvent<TileLayout> {
154
+ export interface TileLayoutRepositionEvent extends BaseEvent<TileLayoutHandle> {
155
155
  /**
156
156
  * The new positions of the TileLayout tiles.
157
157
  */