@progress/kendo-react-layout 7.4.0-develop.1 → 7.4.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.
@@ -7,12 +7,12 @@
7
7
  */
8
8
  "use client";
9
9
  import * as a from "react";
10
- import f from "prop-types";
11
- import { TabStripNavigationItem as C } from "./TabStripNavigationItem.mjs";
10
+ import h from "prop-types";
11
+ import { TabStripNavigationItem as g } from "./TabStripNavigationItem.mjs";
12
12
  import { classNames as I } from "@progress/kendo-react-common";
13
13
  import { Button as x } from "@progress/kendo-react-buttons";
14
14
  import { caretAltRightIcon as P, caretAltLeftIcon as k, caretAltUpIcon as A, caretAltDownIcon as M } from "@progress/kendo-svg-icons";
15
- const E = (S) => Array.apply(null, Array(S)), L = (S) => S.preventDefault(), b = "smooth", d = "prev", u = "next", w = class w extends a.Component {
15
+ const E = (w) => Array.apply(null, Array(w)), L = (w) => w.preventDefault(), b = "smooth", d = "prev", u = "next", T = class T extends a.Component {
16
16
  constructor(l) {
17
17
  super(l), this.itemsNavRef = a.createRef(), this.isRtl = () => this.props.dir === "rtl", this.onWheel = (t) => {
18
18
  t.stopPropagation();
@@ -29,20 +29,20 @@ const E = (S) => Array.apply(null, Array(S)), L = (S) => S.preventDefault(), b =
29
29
  if (!e)
30
30
  return;
31
31
  const n = this.horizontalScroll(), c = n ? e.scrollWidth - e.offsetWidth : e.scrollHeight - e.offsetHeight, r = (s.type === "click" ? this.props.buttonScrollSpeed : this.props.mouseScrollSpeed) || 0;
32
- let o = n ? e.scrollLeft : e.scrollTop, i = n ? e.scrollWidth - e.scrollLeft : e.scrollHeight - e.scrollTop, h = e.scrollWidth - e.scrollLeft * -1;
33
- this.isRtl() && this.horizontalScroll() ? (t === d && o < 0 && (o += r, h += r), t === u && o < c && (o -= r, h -= r), o = Math.min(0, Math.min(c, o))) : (t === d && o > 0 && (o -= r, i += r), t === u && o < c && (o += r, i -= r), o = Math.max(0, Math.min(c, o)));
34
- const v = o === 0, m = s.type === "click" ? b : void 0;
32
+ let o = n ? e.scrollLeft : e.scrollTop, i = n ? e.scrollWidth - e.scrollLeft : e.scrollHeight - e.scrollTop, f = e.scrollWidth - e.scrollLeft * -1;
33
+ this.isRtl() && this.horizontalScroll() ? (t === d && o < 0 && (o += r, f += r), t === u && o < c && (o -= r, f -= r), o = Math.min(0, Math.min(c, o))) : (t === d && o > 0 && (o -= r, i += r), t === u && o < c && (o += r, i -= r), o = Math.max(0, Math.min(c, o)));
34
+ const m = o === 0, v = s.type === "click" ? b : void 0;
35
35
  if (n) {
36
- const T = this.isRtl() ? Math.round(h) <= e.clientWidth || Math.floor(h) <= e.clientWidth : Math.round(i) <= e.clientWidth || Math.floor(i) <= e.clientWidth;
36
+ const S = this.isRtl() ? Math.round(f) <= e.clientWidth || Math.floor(f) <= e.clientWidth : Math.round(i) <= e.clientWidth || Math.floor(i) <= e.clientWidth;
37
37
  this.setState({
38
- disabledPrev: v,
39
- disabledNext: T
40
- }), e.scrollTo({ left: o, behavior: m });
38
+ disabledPrev: m,
39
+ disabledNext: S
40
+ }), e.scrollTo({ left: o, behavior: v });
41
41
  } else
42
42
  this.setState({
43
- disabledPrev: v,
43
+ disabledPrev: m,
44
44
  disabledNext: Math.round(i) <= e.clientHeight || Math.floor(i) <= e.clientHeight
45
- }), e.scrollTo({ top: o, behavior: m });
45
+ }), e.scrollTo({ top: o, behavior: v });
46
46
  }, this.renderArrow = (t, s) => {
47
47
  const e = this.horizontalScroll(), n = {
48
48
  prev: {
@@ -94,47 +94,48 @@ const E = (S) => Array.apply(null, Array(S)), L = (S) => S.preventDefault(), b =
94
94
  * @hidden
95
95
  */
96
96
  render() {
97
- const { selected: l, tabPosition: t, children: s, onSelect: e, onKeyDown: n, navItemId: c, contentPanelId: r } = this.props, o = a.Children.count(s), i = a.Children.toArray(s);
98
- let h;
99
- s && (h = E(o).map((T, p, R) => {
100
- const g = {
97
+ const { selected: l, tabPosition: t, children: s, onSelect: e, onKeyDown: n, navItemId: c, contentPanelId: r, renderAllContent: o } = this.props, i = a.Children.count(s), f = a.Children.toArray(s);
98
+ let m;
99
+ s && (m = E(i).map((W, p, C) => {
100
+ const R = {
101
101
  active: l === p,
102
- disabled: i[p].props.disabled,
102
+ disabled: f[p].props.disabled,
103
103
  index: p,
104
- title: i[p].props.title,
104
+ title: f[p].props.title,
105
105
  first: p === 0,
106
- last: p === R.length - 1,
106
+ last: p === C.length - 1,
107
107
  contentPanelId: r,
108
+ renderAllContent: o,
108
109
  id: c,
109
110
  onSelect: e
110
111
  };
111
- return /* @__PURE__ */ a.createElement(C, { key: p, ...g });
112
+ return /* @__PURE__ */ a.createElement(g, { key: p, ...R });
112
113
  }));
113
114
  const v = I("k-tabstrip-items-wrapper", {
114
115
  "k-hstack": t === "top" || t === "bottom",
115
116
  "k-vstack": t === "left" || t === "right"
116
- }), m = I("k-tabstrip-items", "k-reset");
117
+ }), S = I("k-tabstrip-items", "k-reset");
117
118
  return /* @__PURE__ */ a.createElement("div", { className: v }, this.props.scrollable ? /* @__PURE__ */ a.createElement(a.Fragment, null, this.renderArrow(d, this.state.disabledPrev), /* @__PURE__ */ a.createElement(
118
119
  "ul",
119
120
  {
120
121
  ref: this.itemsNavRef,
121
- className: m,
122
+ className: S,
122
123
  role: "tablist",
123
124
  tabIndex: this.props.tabIndex,
124
125
  onKeyDown: n,
125
126
  onWheel: this.onWheel,
126
127
  "aria-orientation": t === "left" || t === "right" ? "vertical" : void 0
127
128
  },
128
- h
129
+ m
129
130
  ), this.renderArrow(u, this.state.disabledNext)) : /* @__PURE__ */ a.createElement(
130
131
  "ul",
131
132
  {
132
- className: m,
133
+ className: S,
133
134
  role: "tablist",
134
135
  tabIndex: this.props.tabIndex,
135
136
  onKeyDown: n
136
137
  },
137
- h
138
+ m
138
139
  ));
139
140
  }
140
141
  scrollToSelected() {
@@ -155,17 +156,17 @@ const E = (S) => Array.apply(null, Array(S)), L = (S) => S.preventDefault(), b =
155
156
  return /top|bottom/.test(this.props.tabPosition || "top");
156
157
  }
157
158
  };
158
- w.propTypes = {
159
- children: f.oneOfType([
160
- f.element,
161
- f.arrayOf(f.element)
159
+ T.propTypes = {
160
+ children: h.oneOfType([
161
+ h.element,
162
+ h.arrayOf(h.element)
162
163
  ]),
163
- onSelect: f.func,
164
- onKeyDown: f.func,
165
- selected: f.number,
166
- tabIndex: f.number
164
+ onSelect: h.func,
165
+ onKeyDown: h.func,
166
+ selected: h.number,
167
+ tabIndex: h.number
167
168
  };
168
- let N = w;
169
+ let N = T;
169
170
  export {
170
171
  N as TabStripNavigation
171
172
  };
@@ -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 p=require("react"),e=require("prop-types"),b=require("@progress/kendo-react-common");function h(s){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const t in s)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(s,t);Object.defineProperty(o,t,i.get?i:{enumerable:!0,get:()=>s[t]})}}return o.default=s,Object.freeze(o)}const n=h(p),l=class l extends n.Component{constructor(){super(...arguments),this.itemRef=null,this.focus=()=>{this.itemRef&&(this.itemRef.tabIndex=0,this.itemRef.focus())},this.blur=()=>{this.itemRef&&(this.itemRef.tabIndex=-1,this.itemRef.blur())},this.onClick=()=>{this.props.onSelect&&this.props.onSelect(this.props.index),this.itemRef&&(this.itemRef.tabIndex=0,this.itemRef.focus())}}render(){const{id:o,active:t,disabled:i,title:a="Untitled",contentPanelId:c,index:f}=this.props,d={id:`${o}-${f.toString()}`,"aria-selected":t,"aria-controls":t?c:void 0,"aria-disabled":i,role:"tab",onClick:i?void 0:this.onClick},u=b.classNames("k-item","k-tabstrip-item",{"k-disabled":i,"k-active":t});return n.createElement("li",{...d,className:u,ref:m=>this.itemRef=m,onBlur:this.blur,"aria-controls":c},n.createElement("span",{className:"k-link"},a))}};l.propTypes={active:e.bool,disabled:e.bool,index:e.number,onSelect:e.func,title:e.oneOfType([e.string,e.element]),first:e.bool,last:e.bool};let r=l;exports.TabStripNavigationItem=r;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),e=require("prop-types"),h=require("@progress/kendo-react-common");function R(s){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const t in s)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(s,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:()=>s[t]})}}return n.default=s,Object.freeze(n)}const o=R(b),l=class l extends o.Component{constructor(){super(...arguments),this.itemRef=null,this.focus=()=>{this.itemRef&&(this.itemRef.tabIndex=0,this.itemRef.focus())},this.blur=()=>{this.itemRef&&(this.itemRef.tabIndex=-1,this.itemRef.blur())},this.onClick=()=>{this.props.onSelect&&this.props.onSelect(this.props.index),this.itemRef&&(this.itemRef.tabIndex=0,this.itemRef.focus())}}render(){const{id:n,active:t,disabled:i,title:d="Untitled",index:c,renderAllContent:f}=this.props,a=f?`${this.props.contentPanelId}-${c.toString()}`:this.props.contentPanelId,u={id:`${n}-${c.toString()}`,"aria-selected":t,"aria-controls":t?a:void 0,"aria-disabled":i,role:"tab",onClick:i?void 0:this.onClick},p=h.classNames("k-item","k-tabstrip-item",{"k-disabled":i,"k-active":t});return o.createElement("li",{...u,className:p,ref:m=>this.itemRef=m,onBlur:this.blur,"aria-controls":a},o.createElement("span",{className:"k-link"},d))}};l.propTypes={active:e.bool,disabled:e.bool,index:e.number,onSelect:e.func,title:e.oneOfType([e.string,e.element]),first:e.bool,last:e.bool};let r=l;exports.TabStripNavigationItem=r;
@@ -8,7 +8,7 @@
8
8
  "use client";
9
9
  import * as s from "react";
10
10
  import e from "prop-types";
11
- import { classNames as p } from "@progress/kendo-react-common";
11
+ import { classNames as h } from "@progress/kendo-react-common";
12
12
  const o = class o extends s.Component {
13
13
  constructor() {
14
14
  super(...arguments), this.itemRef = null, this.focus = () => {
@@ -23,18 +23,18 @@ const o = class o extends s.Component {
23
23
  * @hidden
24
24
  */
25
25
  render() {
26
- const { id: r, active: t, disabled: i, title: a = "Untitled", contentPanelId: l, index: c } = this.props, m = {
27
- id: `${r}-${c.toString()}`,
26
+ const { id: c, active: t, disabled: i, title: a = "Untitled", index: n, renderAllContent: m } = this.props, l = m ? `${this.props.contentPanelId}-${n.toString()}` : this.props.contentPanelId, d = {
27
+ id: `${c}-${n.toString()}`,
28
28
  "aria-selected": t,
29
29
  "aria-controls": t ? l : void 0,
30
30
  "aria-disabled": i,
31
31
  role: "tab",
32
32
  onClick: i ? void 0 : this.onClick
33
- }, f = p("k-item", "k-tabstrip-item", {
33
+ }, p = h("k-item", "k-tabstrip-item", {
34
34
  "k-disabled": i,
35
35
  "k-active": t
36
36
  });
37
- return /* @__PURE__ */ s.createElement("li", { ...m, className: f, ref: (d) => this.itemRef = d, onBlur: this.blur, "aria-controls": l }, /* @__PURE__ */ s.createElement("span", { className: "k-link" }, a));
37
+ return /* @__PURE__ */ s.createElement("li", { ...d, className: p, ref: (f) => this.itemRef = f, onBlur: this.blur, "aria-controls": l }, /* @__PURE__ */ s.createElement("span", { className: "k-link" }, a));
38
38
  }
39
39
  };
40
40
  o.propTypes = {
@@ -49,7 +49,7 @@ o.propTypes = {
49
49
  first: e.bool,
50
50
  last: e.bool
51
51
  };
52
- let n = o;
52
+ let r = o;
53
53
  export {
54
- n as TabStripNavigationItem
54
+ r as TabStripNavigationItem
55
55
  };