@progress/kendo-react-buttons 14.5.0-develop.9 → 15.0.0-develop.1

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,23 +7,24 @@
7
7
  */
8
8
  import * as t from "react";
9
9
  import n from "prop-types";
10
- import { useDir as Y, classNames as Z, kendoThemeMaps as ee, Keys as u } from "@progress/kendo-react-common";
11
- import { toolbarButtons as te } from "../util.mjs";
12
- import { ToolbarScrollable as oe } from "./tools/ToolbarScrollable.mjs";
13
- import { ToolbarOverflowSection as re } from "./tools/ToolbarOverflowSection.mjs";
10
+ import { useDir as ee, usePaidChildrenWatermark as te, classNames as oe, kendoThemeMaps as re, WatermarkOverlay as ne, Keys as a } from "@progress/kendo-react-common";
11
+ import { toolbarButtons as se } from "../util.mjs";
12
+ import { ToolbarScrollable as le } from "./tools/ToolbarScrollable.mjs";
13
+ import { ToolbarOverflowSection as ce } from "./tools/ToolbarOverflowSection.mjs";
14
+ import { packageMetadata as ie } from "../package-metadata.mjs";
14
15
  const N = t.forwardRef((i, A) => {
15
16
  const {
16
- children: k,
17
+ children: y,
17
18
  className: K,
18
19
  id: j,
19
20
  ariaLabel: q,
20
21
  keyboardNavigation: w,
21
- role: x,
22
- onResize: C,
22
+ role: C,
23
+ onResize: E,
23
24
  style: D,
24
- tabIndex: E = f.tabIndex,
25
+ tabIndex: W = f.tabIndex,
25
26
  size: b = f.size,
26
- fillMode: I = f.fillMode,
27
+ fillMode: p = f.fillMode,
27
28
  overflow: c,
28
29
  scrollButtons: d = f.scrollButtons,
29
30
  scrollButtonsPosition: $ = f.scrollButtonsPosition,
@@ -31,61 +32,65 @@ const N = t.forwardRef((i, A) => {
31
32
  prevButton: _,
32
33
  nextButton: G,
33
34
  _ariaControls: J
34
- } = i, B = t.useRef(!1), r = t.useRef(null), m = t.useRef(null), h = t.useRef(0), S = t.useRef(0), s = t.useRef([]), R = t.useRef({ element: null, props: i }), [Q, U] = t.useState(!1), [O, W] = t.useState(!0), [z, P] = t.useState(!1), v = Y(r, i.dir), y = t.useMemo(() => i.buttons || te, [i.buttons]), V = t.useMemo(() => y.map((e) => e + ":focus").join(","), [y]), M = () => {
35
- const e = r.current && r.current.querySelector(V);
35
+ } = i, x = t.useRef(!1), r = t.useRef(null), m = t.useRef(null), h = t.useRef(0), S = t.useRef(0), l = t.useRef([]), I = t.useRef({ element: null, props: i }), [Q, U] = t.useState(!1), [B, O] = t.useState(!0), [M, P] = t.useState(!1), g = ee(r, i.dir), { showWatermark: V, licenseMessage: X } = te(
36
+ r,
37
+ ie,
38
+ "Toolbar"
39
+ ), k = t.useMemo(() => i.buttons || se, [i.buttons]), Y = t.useMemo(() => k.map((e) => e + ":focus").join(","), [k]), z = () => {
40
+ const e = r.current && r.current.querySelector(Y);
36
41
  return Math.max(
37
42
  0,
38
- s.current.findIndex((l) => l === e)
43
+ l.current.findIndex((s) => s === e)
39
44
  );
40
45
  };
41
46
  t.useImperativeHandle(
42
- R,
47
+ I,
43
48
  () => ({
44
49
  element: r.current,
45
50
  props: i
46
51
  })
47
- ), t.useImperativeHandle(A, () => R.current), t.useEffect(() => (window.addEventListener("resize", L), r.current && (S.current = r.current.offsetWidth, h.current = r.current.offsetHeight, w !== !1 && (s.current = Array.from(
48
- r.current.querySelectorAll(y.join(","))
52
+ ), t.useImperativeHandle(A, () => I.current), t.useEffect(() => (window.addEventListener("resize", L), r.current && (S.current = r.current.offsetWidth, h.current = r.current.offsetHeight, w !== !1 && (l.current = Array.from(
53
+ r.current.querySelectorAll(k.join(","))
49
54
  ), H(0))), () => {
50
- window.removeEventListener("resize", L), s.current.length = 0;
55
+ window.removeEventListener("resize", L), l.current.length = 0;
51
56
  }), []), t.useEffect(() => {
52
- if (B.current) {
57
+ if (x.current) {
53
58
  if (!r.current || w === !1)
54
59
  return;
55
- s.current = Array.from(
56
- r.current.querySelectorAll(y.join(","))
57
- ), H(M()), T();
60
+ l.current = Array.from(
61
+ r.current.querySelectorAll(k.join(","))
62
+ ), H(z()), T();
58
63
  } else
59
- B.current = !0;
64
+ x.current = !0;
60
65
  });
61
66
  const H = (e) => {
62
- s.current.forEach((l, o) => {
63
- l.tabIndex = o === e ? E : -1;
67
+ l.current.forEach((s, o) => {
68
+ s.tabIndex = o === e ? W : -1;
64
69
  });
65
- }, X = (e) => {
66
- const l = e.keyCode === u.left || e.keyCode === u.right || e.keyCode === u.home || e.keyCode === u.end, o = M();
67
- !l || e.defaultPrevented || s.current.findIndex((a) => a === e.target) === -1 || (e.keyCode === u.left ? g(
70
+ }, Z = (e) => {
71
+ const s = e.keyCode === a.left || e.keyCode === a.right || e.keyCode === a.home || e.keyCode === a.end, o = z();
72
+ !s || e.defaultPrevented || l.current.findIndex((u) => u === e.target) === -1 || (e.keyCode === a.left ? v(
68
73
  o,
69
- o === 0 ? s.current.length - 1 : o - 1
70
- ) : g(
74
+ o === 0 ? l.current.length - 1 : o - 1
75
+ ) : v(
71
76
  o,
72
- o === s.current.length - 1 ? 0 : o + 1
73
- ), e.keyCode === u.home && g(o, 0), e.keyCode === u.end && g(o, s.current.length - 1));
74
- }, g = (e, l) => {
75
- const o = s.current[l];
77
+ o === l.current.length - 1 ? 0 : o + 1
78
+ ), e.keyCode === a.home && v(o, 0), e.keyCode === a.end && v(o, l.current.length - 1));
79
+ }, v = (e, s) => {
80
+ const o = l.current[s];
76
81
  if (o) {
77
- o.tabIndex = E, o.focus();
78
- const a = s.current[e];
79
- a && (a.tabIndex = -1);
82
+ o.tabIndex = W, o.focus();
83
+ const u = l.current[e];
84
+ u && (u.tabIndex = -1);
80
85
  }
81
86
  }, L = (e) => {
82
87
  if (!r.current)
83
88
  return;
84
- const l = r.current.offsetWidth, o = r.current.offsetHeight;
85
- if (S.current !== l || h.current !== o) {
86
- S.current = l, h.current = o;
87
- const a = { offsetWidth: S.current, offsetHeight: h.current };
88
- C && C.call(void 0, { target: R.current, ...a, nativeEvent: e });
89
+ const s = r.current.offsetWidth, o = r.current.offsetHeight;
90
+ if (S.current !== s || h.current !== o) {
91
+ S.current = s, h.current = o;
92
+ const u = { offsetWidth: S.current, offsetHeight: h.current };
93
+ E && E.call(void 0, { target: I.current, ...u, nativeEvent: e });
89
94
  }
90
95
  T();
91
96
  }, T = t.useCallback(() => {
@@ -93,46 +98,46 @@ const N = t.forwardRef((i, A) => {
93
98
  e && U(
94
99
  e.scrollWidth > e.clientWidth || e.scrollHeight > e.clientHeight
95
100
  );
96
- }, []), p = t.useCallback(() => {
101
+ }, []), R = t.useCallback(() => {
97
102
  const e = m.current;
98
103
  if (e) {
99
- const l = e.scrollLeft === 0, o = v !== "rtl" ? e.scrollLeft + e.clientWidth === e.scrollWidth : e.clientWidth - e.scrollLeft === e.scrollWidth;
100
- l && W(!0), o && P(!0), !l && !o && (W(!1), P(!1));
104
+ const s = e.scrollLeft === 0, o = g !== "rtl" ? e.scrollLeft + e.clientWidth === e.scrollWidth : e.clientWidth - e.scrollLeft === e.scrollWidth;
105
+ s && O(!0), o && P(!0), !s && !o && (O(!1), P(!1));
101
106
  }
102
- }, [v]);
107
+ }, [g]);
103
108
  return t.useEffect(() => {
104
109
  const e = m.current;
105
110
  if (e)
106
- return e.addEventListener("scroll", p), () => {
107
- e.removeEventListener("scroll", p);
111
+ return e.addEventListener("scroll", R), () => {
112
+ e.removeEventListener("scroll", R);
108
113
  };
109
- }, [p]), /* @__PURE__ */ t.createElement(
114
+ }, [R]), /* @__PURE__ */ t.createElement(
110
115
  "div",
111
116
  {
112
117
  id: j,
113
118
  "aria-label": q,
114
119
  "aria-controls": J,
115
- className: Z(
120
+ className: oe(
116
121
  "k-toolbar",
117
122
  {
118
- [`k-toolbar-${ee.sizeMap[b] || b}`]: b,
119
- [`k-toolbar-${I}`]: I,
123
+ [`k-toolbar-${re.sizeMap[b] || b}`]: b,
124
+ [`k-toolbar-${p}`]: p,
120
125
  "k-toolbar-scrollable": c === "scroll",
121
126
  "k-toolbar-scrollable-overlay": c === "scroll" && (d === "hidden" || d === void 0),
122
- "k-toolbar-scrollable-start": c === "scroll" && d === "hidden" && O,
123
- "k-toolbar-scrollable-end": c === "scroll" && d === "hidden" && z,
127
+ "k-toolbar-scrollable-start": c === "scroll" && d === "hidden" && B,
128
+ "k-toolbar-scrollable-end": c === "scroll" && d === "hidden" && M,
124
129
  "k-toolbar-section": i.overflow && c === "section"
125
130
  },
126
131
  K
127
132
  ),
128
133
  style: D,
129
- role: x !== void 0 ? x || void 0 : "toolbar",
130
- dir: v,
134
+ role: C !== void 0 ? C || void 0 : "toolbar",
135
+ dir: g,
131
136
  ref: r,
132
- onKeyDown: w !== !1 ? X : void 0
137
+ onKeyDown: w !== !1 ? Z : void 0
133
138
  },
134
139
  c === "scroll" && /* @__PURE__ */ t.createElement(
135
- oe,
140
+ le,
136
141
  {
137
142
  scrollButtons: d,
138
143
  scrollButtonsPosition: $,
@@ -141,14 +146,15 @@ const N = t.forwardRef((i, A) => {
141
146
  isOverflowing: Q,
142
147
  scrollContentRef: m,
143
148
  buttonScrollSpeed: F,
144
- dir: v,
145
- isScrollStartPosition: O,
146
- isScrollEndPosition: z,
147
- children: k
149
+ dir: g,
150
+ isScrollStartPosition: B,
151
+ isScrollEndPosition: M,
152
+ children: y
148
153
  }
149
154
  ),
150
- c === "section" && /* @__PURE__ */ t.createElement(re, { toolbarRef: r, fillMode: I, size: b }, k),
151
- (c === "none" || c === void 0) && k
155
+ c === "section" && /* @__PURE__ */ t.createElement(ce, { toolbarRef: r, fillMode: p, size: b }, y),
156
+ (c === "none" || c === void 0) && y,
157
+ V && /* @__PURE__ */ t.createElement(ne, { message: X })
152
158
  );
153
159
  }), f = {
154
160
  tabIndex: 0,
@@ -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 C=require("@progress/kendo-react-popup"),E=require("react"),q=require("./ToolbarSeparator.js"),M=require("../../Button.js"),P=require("@progress/kendo-svg-icons"),W=require("@progress/kendo-react-intl"),p=require("../messages/index.js"),I=require("@progress/kendo-react-common");function j(c){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const a in c)if(a!=="default"){const i=Object.getOwnPropertyDescriptor(c,a);Object.defineProperty(t,a,i.get?i:{enumerable:!0,get:()=>c[a]})}}return t.default=c,Object.freeze(t)}const e=j(E),_=c=>{var h;const{toolbarRef:t,children:a,fillMode:i,size:R}=c,[b,k]=e.useState(!1),u=e.useRef(e.Children.toArray(a).filter(r=>e.isValidElement(r)).map((r,o)=>e.cloneElement(r,{key:r.key||o}))),l=e.useRef([]),f=e.useRef(0),T=e.useRef(null),v=e.useRef(null),S=W.useLocalization(),[B,w]=e.useReducer(r=>r+1,0),m=()=>{if(!t.current)return;let r=0;const o=t.current.clientWidth,d=parseInt(window.getComputedStyle(t.current).gap||"0",10),O=Array.from(t.current.children).reduce((n,s,N)=>(n+=Math.ceil(s.clientWidth),n),0),g=Array.from(t.current.children).length,z=d*2;if(r=O+g*d+z,r>o){const n=[...u.current],s=n.pop();f.current=o,u.current=n,s&&(l.current=[s,...l.current])}else if(o>f.current+d*g){const n=[...l.current],s=n.shift();l.current=n,s&&(u.current=[...u.current,s]),f.current=o}w()};e.useEffect(()=>{m();const r=new ResizeObserver(m),o=t.current;return o&&r.observe(o),()=>{o&&r.unobserve(o)}},[]);const y=()=>{k(!b)};return e.createElement(e.Fragment,null,u.current.length>0&&u.current,l.current.length>0&&e.createElement(e.Fragment,null,e.createElement(q.ToolbarSeparator,{_ref:v,className:"k-toolbar-button-separator"}),e.createElement(M.Button,{ref:T,className:"k-toolbar-overflow-button",fillMode:"flat",svgIcon:P.moreHorizontalIcon,title:S.toLanguageString(p.moreButtonTitle,p.messages[p.moreButtonTitle]),onClick:y}),e.createElement(C.Popup,{anchor:t.current,show:b,popupClass:"k-toolbar-popup",style:{width:(h=t.current)==null?void 0:h.offsetWidth}},e.createElement("span",{className:`k-toolbar-items-list k-toolbar-items-list-${I.kendoThemeMaps.sizeMap[R]} k-toolbar-items-list-${i}`},l.current.length>0&&l.current))))};exports.ToolbarOverflowSection=_;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("react"),x=require("@progress/kendo-react-popup"),A=require("@progress/kendo-svg-icons"),D=require("@progress/kendo-react-intl"),V=require("@progress/kendo-react-common"),$=require("./ToolbarSeparator.js"),k=require("../messages/index.js"),H=require("../../Button.js");function U(a){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const i in a)if(i!=="default"){const p=Object.getOwnPropertyDescriptor(a,i);Object.defineProperty(l,i,p.get?p:{enumerable:!0,get:()=>a[i]})}}return l.default=a,Object.freeze(l)}const t=U(L),G=a=>{var S;const{toolbarRef:l,children:i,fillMode:p,size:q}=a,[T,P]=t.useState(!1),c=t.useRef(t.Children.toArray(i).filter(e=>t.isValidElement(e)).map((e,r)=>t.cloneElement(e,{key:e.key||r}))),n=t.useRef([]),m=t.useRef(0),v=t.useRef(null),w=t.useRef(null),j=D.useLocalization(),[,R]=t.useReducer(e=>e+1,0),O=()=>{const e=l.current;if(!e)return null;const r=e.clientWidth,o=parseInt(window.getComputedStyle(e).gap||"0",10),u=Array.from(e.children).filter(s=>s.dataset.kendoWatermark===void 0),b=u.map(s=>Math.ceil(s.clientWidth)),f=b.reduce((s,W)=>s+W,0)+u.length*o+o*2;return{toolbarWidth:r,gap:o,childWidths:b,totalInnerWidth:f}},B=()=>{var C,E,I,z,M;const e=O();if(!e)return;const{toolbarWidth:r,gap:o,childWidths:u,totalInnerWidth:b}=e;let f=b,s=!1;const W=n.current.length>0,g=[...c.current],y=[...n.current];for(;f>r&&g.length>0;){const d=g.pop(),h=g.length;if(d&&y.unshift(d),h<u.length&&(f-=u[h]+o),!s&&!W){const _=Math.ceil((E=(C=w.current)==null?void 0:C.offsetWidth)!=null?E:0),F=Math.ceil((M=(z=(I=v.current)==null?void 0:I.element)==null?void 0:z.offsetWidth)!=null?M:0);f+=_+F+o*2}s=!0}if(s){c.current=g,n.current=y,m.current=r,R();return}if(n.current.length>0&&r>m.current+o*u.length){const d=[...n.current],h=d.shift();n.current=d,h&&(c.current=[...c.current,h]),m.current=r,R()}};t.useEffect(()=>{const e=new ResizeObserver(B),r=l.current;return r&&e.observe(r),()=>{r&&e.unobserve(r)}},[]),t.useLayoutEffect(()=>{if(!l.current||n.current.length===0||c.current.length===0)return;const e=O();if(!e||e.totalInnerWidth<=e.toolbarWidth)return;const r=[...c.current],o=r.pop();m.current=e.toolbarWidth,c.current=r,o&&(n.current=[o,...n.current]),R()});const N=()=>{P(!T)};return t.createElement(t.Fragment,null,c.current.length>0&&c.current,n.current.length>0&&t.createElement(t.Fragment,null,t.createElement($.ToolbarSeparator,{_ref:w,className:"k-toolbar-button-separator"}),t.createElement(H.Button,{ref:v,className:"k-toolbar-overflow-button",fillMode:"flat",svgIcon:A.moreHorizontalIcon,title:j.toLanguageString(k.moreButtonTitle,k.messages[k.moreButtonTitle]),onClick:N}),t.createElement(x.Popup,{anchor:l.current,show:T,popupClass:"k-toolbar-popup",style:{width:(S=l.current)==null?void 0:S.offsetWidth}},t.createElement("span",{className:`k-toolbar-items-list k-toolbar-items-list-${V.kendoThemeMaps.sizeMap[q]} k-toolbar-items-list-${p}`},n.current.length>0&&n.current))))};exports.ToolbarOverflowSection=G;
@@ -5,69 +5,95 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { Popup as W } from "@progress/kendo-react-popup";
9
8
  import * as e from "react";
10
- import { ToolbarSeparator as S } from "./ToolbarSeparator.mjs";
11
- import { Button as M } from "../../Button.mjs";
12
- import { moreHorizontalIcon as I } from "@progress/kendo-svg-icons";
13
- import { useLocalization as O } from "@progress/kendo-react-intl";
14
- import { moreButtonTitle as d, messages as A } from "../messages/index.mjs";
15
- import { kendoThemeMaps as F } from "@progress/kendo-react-common";
16
- const U = (h) => {
17
- var m;
18
- const { toolbarRef: o, children: b, fillMode: R, size: g } = h, [u, k] = e.useState(!1), c = e.useRef(
19
- e.Children.toArray(b).filter((t) => e.isValidElement(t)).map((t, r) => e.cloneElement(t, { key: t.key || r }))
20
- ), l = e.useRef([]), a = e.useRef(0), T = e.useRef(null), w = e.useRef(null), v = O(), [N, E] = e.useReducer((t) => t + 1, 0), f = () => {
21
- if (!o.current)
9
+ import { Popup as V } from "@progress/kendo-react-popup";
10
+ import { moreHorizontalIcon as $ } from "@progress/kendo-svg-icons";
11
+ import { useLocalization as H } from "@progress/kendo-react-intl";
12
+ import { kendoThemeMaps as U } from "@progress/kendo-react-common";
13
+ import { ToolbarSeparator as _ } from "./ToolbarSeparator.mjs";
14
+ import { moreButtonTitle as y, messages as j } from "../messages/index.mjs";
15
+ import { Button as q } from "../../Button.mjs";
16
+ const Z = (M) => {
17
+ var k;
18
+ const { toolbarRef: i, children: O, fillMode: S, size: F } = M, [g, L] = e.useState(!1), l = e.useRef(
19
+ e.Children.toArray(O).filter((t) => e.isValidElement(t)).map((t, r) => e.cloneElement(t, { key: t.key || r }))
20
+ ), o = e.useRef([]), h = e.useRef(0), W = e.useRef(null), R = e.useRef(null), N = H(), [, p] = e.useReducer((t) => t + 1, 0), w = () => {
21
+ const t = i.current;
22
+ if (!t)
23
+ return null;
24
+ const r = t.clientWidth, n = parseInt(window.getComputedStyle(t).gap || "0", 10), c = Array.from(t.children).filter(
25
+ (s) => s.dataset.kendoWatermark === void 0
26
+ ), m = c.map((s) => Math.ceil(s.clientWidth)), a = m.reduce((s, b) => s + b, 0) + c.length * n + n * 2;
27
+ return { toolbarWidth: r, gap: n, childWidths: m, totalInnerWidth: a };
28
+ }, P = () => {
29
+ var T, E, C, z, I;
30
+ const t = w();
31
+ if (!t)
22
32
  return;
23
- let t = 0;
24
- const r = o.current.clientWidth, i = parseInt(window.getComputedStyle(o.current).gap || "0", 10), C = Array.from(o.current.children).reduce((n, s, P) => (n += Math.ceil(s.clientWidth), n), 0), p = Array.from(o.current.children).length, y = i * 2;
25
- if (t = C + p * i + y, t > r) {
26
- const n = [...c.current], s = n.pop();
27
- a.current = r, c.current = n, s && (l.current = [s, ...l.current]);
28
- } else if (r > a.current + i * p) {
29
- const n = [...l.current], s = n.shift();
30
- l.current = n, s && (c.current = [...c.current, s]), a.current = r;
33
+ const { toolbarWidth: r, gap: n, childWidths: c, totalInnerWidth: m } = t;
34
+ let a = m, s = !1;
35
+ const b = o.current.length > 0, d = [...l.current], v = [...o.current];
36
+ for (; a > r && d.length > 0; ) {
37
+ const u = d.pop(), f = d.length;
38
+ if (u && v.unshift(u), f < c.length && (a -= c[f] + n), !s && !b) {
39
+ const A = Math.ceil((E = (T = R.current) == null ? void 0 : T.offsetWidth) != null ? E : 0), B = Math.ceil((I = (z = (C = W.current) == null ? void 0 : C.element) == null ? void 0 : z.offsetWidth) != null ? I : 0);
40
+ a += A + B + n * 2;
41
+ }
42
+ s = !0;
43
+ }
44
+ if (s) {
45
+ l.current = d, o.current = v, h.current = r, p();
46
+ return;
47
+ }
48
+ if (o.current.length > 0 && r > h.current + n * c.length) {
49
+ const u = [...o.current], f = u.shift();
50
+ o.current = u, f && (l.current = [...l.current, f]), h.current = r, p();
31
51
  }
32
- E();
33
52
  };
34
53
  e.useEffect(() => {
35
- f();
36
- const t = new ResizeObserver(f), r = o.current;
54
+ const t = new ResizeObserver(P), r = i.current;
37
55
  return r && t.observe(r), () => {
38
56
  r && t.unobserve(r);
39
57
  };
40
- }, []);
41
- const z = () => {
42
- k(!u);
58
+ }, []), e.useLayoutEffect(() => {
59
+ if (!i.current || o.current.length === 0 || l.current.length === 0)
60
+ return;
61
+ const t = w();
62
+ if (!t || t.totalInnerWidth <= t.toolbarWidth)
63
+ return;
64
+ const r = [...l.current], n = r.pop();
65
+ h.current = t.toolbarWidth, l.current = r, n && (o.current = [n, ...o.current]), p();
66
+ });
67
+ const x = () => {
68
+ L(!g);
43
69
  };
44
- return /* @__PURE__ */ e.createElement(e.Fragment, null, c.current.length > 0 && c.current, l.current.length > 0 && /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(S, { _ref: w, className: "k-toolbar-button-separator" }), /* @__PURE__ */ e.createElement(
45
- M,
70
+ return /* @__PURE__ */ e.createElement(e.Fragment, null, l.current.length > 0 && l.current, o.current.length > 0 && /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(_, { _ref: R, className: "k-toolbar-button-separator" }), /* @__PURE__ */ e.createElement(
71
+ q,
46
72
  {
47
- ref: T,
73
+ ref: W,
48
74
  className: "k-toolbar-overflow-button",
49
75
  fillMode: "flat",
50
- svgIcon: I,
51
- title: v.toLanguageString(d, A[d]),
52
- onClick: z
76
+ svgIcon: $,
77
+ title: N.toLanguageString(y, j[y]),
78
+ onClick: x
53
79
  }
54
80
  ), /* @__PURE__ */ e.createElement(
55
- W,
81
+ V,
56
82
  {
57
- anchor: o.current,
58
- show: u,
83
+ anchor: i.current,
84
+ show: g,
59
85
  popupClass: "k-toolbar-popup",
60
- style: { width: (m = o.current) == null ? void 0 : m.offsetWidth }
86
+ style: { width: (k = i.current) == null ? void 0 : k.offsetWidth }
61
87
  },
62
88
  /* @__PURE__ */ e.createElement(
63
89
  "span",
64
90
  {
65
- className: `k-toolbar-items-list k-toolbar-items-list-${F.sizeMap[g]} k-toolbar-items-list-${R}`
91
+ className: `k-toolbar-items-list k-toolbar-items-list-${U.sizeMap[F]} k-toolbar-items-list-${S}`
66
92
  },
67
- l.current.length > 0 && l.current
93
+ o.current.length > 0 && o.current
68
94
  )
69
95
  )));
70
96
  };
71
97
  export {
72
- U as ToolbarOverflowSection
98
+ Z as ToolbarOverflowSection
73
99
  };
@@ -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 p=require("react"),l=require("@progress/kendo-react-common"),m=require("@progress/kendo-react-intl"),r=require("../messages/index.js"),s=require("@progress/kendo-svg-icons");function f(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const e=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,e.get?e:{enumerable:!0,get:()=>t[o]})}}return n.default=t,Object.freeze(n)}const i=f(p),v=t=>{const n=m.useLocalization(),{disabled:o,type:e,scrollContentRef:c,buttonScrollSpeed:a,prevButton:u,nextButton:d}=t,b=S=>{c&&c.current&&a&&c.current.scrollBy({left:e==="next"?a:-a,behavior:"smooth"})},g=e==="prev"?u||"span":d||"span";return i.createElement(g,{className:l.classNames("k-button","k-icon-button",`k-toolbar-${e}`,{"k-disabled":o}),title:`${e==="prev"?n.toLanguageString(r.prevArrowTitle,r.messages[r.prevArrowTitle]):n.toLanguageString(r.nextArrowTitle,r.messages[r.nextArrowTitle])}`,"aria-hidden":!0,tabIndex:o?-1:void 0,onClick:b},i.createElement(l.SvgIcon,{icon:e==="prev"?s.chevronLeftIcon:s.chevronRightIcon,className:"k-button-icon"}))};exports.ToolbarScrollButton=v;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react"),l=require("@progress/kendo-react-common"),m=require("@progress/kendo-react-intl"),r=require("../messages/index.js"),s=require("@progress/kendo-svg-icons");function f(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const e=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(o,n,e.get?e:{enumerable:!0,get:()=>t[n]})}}return o.default=t,Object.freeze(o)}const i=f(p),v=t=>{const o=m.useLocalization(),{disabled:n,type:e,scrollContentRef:c,buttonScrollSpeed:a,prevButton:u,nextButton:d}=t,b=S=>{c&&c.current&&a&&c.current.scrollBy({left:e==="next"?a:-a,behavior:"smooth"})},g=e==="prev"?u||"span":d||"span";return i.createElement(g,{className:l.classNames("k-button","k-icon-button",`k-toolbar-${e}`),title:`${e==="prev"?o.toLanguageString(r.prevArrowTitle,r.messages[r.prevArrowTitle]):o.toLanguageString(r.nextArrowTitle,r.messages[r.nextArrowTitle])}`,"aria-hidden":!0,tabIndex:n?-1:void 0,onClick:b},i.createElement(l.SvgIcon,{icon:e==="prev"?s.chevronLeftIcon:s.chevronRightIcon,className:"k-button-icon"}))};exports.ToolbarScrollButton=v;
@@ -5,33 +5,31 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import * as a from "react";
9
- import { classNames as d, SvgIcon as v } from "@progress/kendo-react-common";
10
- import { useLocalization as f } from "@progress/kendo-react-intl";
11
- import { prevArrowTitle as c, messages as l, nextArrowTitle as i } from "../messages/index.mjs";
12
- import { chevronLeftIcon as g, chevronRightIcon as h } from "@progress/kendo-svg-icons";
13
- const L = (s) => {
14
- const n = f(), { disabled: r, type: t, scrollContentRef: o, buttonScrollSpeed: e, prevButton: m, nextButton: p } = s, u = (S) => {
8
+ import * as r from "react";
9
+ import { classNames as b, SvgIcon as f } from "@progress/kendo-react-common";
10
+ import { useLocalization as g } from "@progress/kendo-react-intl";
11
+ import { prevArrowTitle as a, messages as c, nextArrowTitle as l } from "../messages/index.mjs";
12
+ import { chevronLeftIcon as d, chevronRightIcon as h } from "@progress/kendo-svg-icons";
13
+ const L = (i) => {
14
+ const n = g(), { disabled: s, type: t, scrollContentRef: o, buttonScrollSpeed: e, prevButton: m, nextButton: p } = i, u = (S) => {
15
15
  o && o.current && e && o.current.scrollBy({
16
16
  left: t === "next" ? e : -e,
17
17
  behavior: "smooth"
18
18
  });
19
- }, b = t === "prev" ? m || "span" : p || "span";
19
+ }, v = t === "prev" ? m || "span" : p || "span";
20
20
  return (
21
21
  // Using span instead of real Button component is intentional.
22
22
  // Ref: https://progresssoftware.atlassian.net/wiki/spaces/DE/pages/edit-v2/544997922#Hidden-interactive-elements
23
- /* @__PURE__ */ a.createElement(
24
- b,
23
+ /* @__PURE__ */ r.createElement(
24
+ v,
25
25
  {
26
- className: d("k-button", "k-icon-button", `k-toolbar-${t}`, {
27
- "k-disabled": r
28
- }),
29
- title: `${t === "prev" ? n.toLanguageString(c, l[c]) : n.toLanguageString(i, l[i])}`,
26
+ className: b("k-button", "k-icon-button", `k-toolbar-${t}`),
27
+ title: `${t === "prev" ? n.toLanguageString(a, c[a]) : n.toLanguageString(l, c[l])}`,
30
28
  "aria-hidden": !0,
31
- tabIndex: r ? -1 : void 0,
29
+ tabIndex: s ? -1 : void 0,
32
30
  onClick: u
33
31
  },
34
- /* @__PURE__ */ a.createElement(v, { icon: t === "prev" ? g : h, className: "k-button-icon" })
32
+ /* @__PURE__ */ r.createElement(f, { icon: t === "prev" ? d : h, className: "k-button-icon" })
35
33
  )
36
34
  );
37
35
  };