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

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.
package/stepper/Step.mjs CHANGED
@@ -14,66 +14,66 @@ import { useLocalization as se } from "@progress/kendo-react-intl";
14
14
  import { checkOutlineIcon as ne, exclamationCircleIcon as oe } from "@progress/kendo-svg-icons";
15
15
  import { DEFAULT_ANIMATION_DURATION as ce, NO_ANIMATION as le } from "./contants.mjs";
16
16
  import { messages as ie, optionalText as re } from "./messages/index.mjs";
17
- const g = e.forwardRef((R, V) => {
17
+ const E = e.forwardRef((R, V) => {
18
18
  const {
19
19
  // content
20
20
  children: z,
21
- className: E,
22
- current: p,
21
+ className: h,
22
+ current: d,
23
23
  disabled: n,
24
- focused: d,
25
- icon: i,
26
- svgIcon: h,
24
+ focused: u,
25
+ icon: r,
26
+ svgIcon: C,
27
27
  index: s,
28
28
  isValid: t,
29
- label: r,
30
- optional: u,
31
- style: C,
32
- tabIndex: y,
33
- text: S,
29
+ label: o,
30
+ optional: m,
31
+ style: y,
32
+ tabIndex: S,
33
+ text: F,
34
34
  ...D
35
35
  } = R, {
36
36
  animationDuration: k,
37
37
  isVertical: b,
38
38
  item: H,
39
39
  linear: P,
40
- mode: F,
41
- numOfSteps: o,
42
- value: c,
40
+ mode: A,
41
+ numOfSteps: c,
42
+ value: l,
43
43
  onChange: f,
44
44
  onFocus: I,
45
45
  successIcon: _,
46
46
  errorIcon: w,
47
47
  successSVGIcon: B,
48
48
  errorSVGIcon: G
49
- } = e.useContext(Z), m = e.useRef(null), A = e.useCallback(
49
+ } = e.useContext(Z), p = e.useRef(null), M = e.useCallback(
50
50
  () => {
51
- m.current && ee(m.current);
51
+ p.current && ee(p.current);
52
52
  },
53
53
  []
54
54
  ), v = e.useCallback(
55
55
  () => ({
56
- element: m.current,
57
- focus: A
56
+ element: p.current,
57
+ focus: M
58
58
  }),
59
- [A]
59
+ [M]
60
60
  );
61
61
  e.useImperativeHandle(V, v);
62
- const N = !P || s === c - 1 || s === c || s === c + 1, M = F === "labels" || !!i && !!r, U = se(), W = ((l) => U.toLanguageString(l, ie[l]))(re), $ = typeof k == "number" ? k : k !== !1 ? ce : le, j = e.useCallback(
63
- (l) => {
62
+ const N = !P || s === l - 1 || s === l || s === l + 1, x = A === "labels" || !!r && !!o, U = se(), W = ((i) => U.toLanguageString(i, ie[i]))(re), $ = typeof k == "number" ? k : k !== !1 ? ce : le, j = e.useCallback(
63
+ (i) => {
64
64
  f && !n && L(
65
65
  f,
66
- l,
66
+ i,
67
67
  v(),
68
68
  { value: s }
69
69
  );
70
70
  },
71
- [f, c, n]
71
+ [f, l, n]
72
72
  ), K = e.useCallback(
73
- (l) => {
73
+ (i) => {
74
74
  I && !n && L(
75
75
  I,
76
- l,
76
+ i,
77
77
  v(),
78
78
  void 0
79
79
  );
@@ -84,29 +84,29 @@ const g = e.forwardRef((R, V) => {
84
84
  "k-step",
85
85
  {
86
86
  "k-step-first": s === 0,
87
- "k-step-last": o && s === o - 1,
88
- "k-step-done": s < c,
89
- "k-step-current": p,
90
- "k-step-optional": u,
87
+ "k-step-last": c && s === c - 1,
88
+ "k-step-done": s < l,
89
+ "k-step-current": d,
90
+ "k-step-optional": m,
91
91
  "k-step-error": t !== void 0 && !t,
92
92
  "k-step-success": t
93
93
  },
94
94
  {
95
95
  "k-disabled": n,
96
- "k-focus": d
96
+ "k-focus": u
97
97
  },
98
- E
98
+ h
99
99
  ),
100
- [s, o, c, p, u, n, d, t, E]
100
+ [s, c, l, d, m, n, u, t, h]
101
101
  ), J = e.useMemo(
102
102
  () => ({
103
- maxWidth: b ? void 0 : `calc(100% / ${o})`,
104
- maxHeight: b ? `calc(100% / ${o})` : void 0,
103
+ maxWidth: b ? void 0 : `calc(100% / ${c})`,
104
+ maxHeight: b ? `calc(100% / ${c})` : void 0,
105
105
  pointerEvents: N ? void 0 : "none",
106
- ...C
106
+ ...y
107
107
  }),
108
- [b, o, C, N]
109
- ), T = t ? _ : w, x = T ? /* @__PURE__ */ e.createElement(
108
+ [b, c, y, N]
109
+ ), T = t ? _ : w, g = T ? /* @__PURE__ */ e.createElement(
110
110
  "span",
111
111
  {
112
112
  className: "k-step-indicator-icon " + T,
@@ -119,19 +119,19 @@ const g = e.forwardRef((R, V) => {
119
119
  name: t ? "check-circle" : "exclamation-circle",
120
120
  icon: t ? B || ne : G || oe
121
121
  }
122
- ), Q = /* @__PURE__ */ e.createElement(e.Fragment, null, F !== "labels" ? /* @__PURE__ */ e.createElement(
122
+ ), Q = /* @__PURE__ */ e.createElement(e.Fragment, null, A !== "labels" ? /* @__PURE__ */ e.createElement(
123
123
  "span",
124
124
  {
125
125
  className: "k-step-indicator",
126
126
  "aria-hidden": !0,
127
127
  style: { transitionDuration: $ + "ms" }
128
128
  },
129
- i || h ? !M && t !== void 0 ? x : /* @__PURE__ */ e.createElement(O, { className: "k-step-indicator-icon", name: i && ae(i), icon: h }) : t !== void 0 ? x : /* @__PURE__ */ e.createElement("span", { className: "k-step-indicator-text" }, S || s + 1)
130
- ) : null), X = /* @__PURE__ */ e.createElement("span", { className: "k-step-label" }, r && /* @__PURE__ */ e.createElement("span", { className: "k-step-text" }, r), M && t !== void 0 && x, u && /* @__PURE__ */ e.createElement("span", { className: "k-step-label-optional" }, W)), Y = /* @__PURE__ */ e.createElement(e.Fragment, null, Q, X);
129
+ r || C ? !x && t !== void 0 ? g : /* @__PURE__ */ e.createElement(O, { className: "k-step-indicator-icon", name: r && ae(r), icon: C }) : t !== void 0 ? g : /* @__PURE__ */ e.createElement("span", { className: "k-step-indicator-text" }, F || s + 1)
130
+ ) : null), X = (o || x || m) && /* @__PURE__ */ e.createElement("span", { className: "k-step-label" }, o && /* @__PURE__ */ e.createElement("span", { className: "k-step-text" }, o), x && t !== void 0 && g, m && /* @__PURE__ */ e.createElement("span", { className: "k-step-label-optional" }, W)), Y = /* @__PURE__ */ e.createElement(e.Fragment, null, Q, X);
131
131
  return /* @__PURE__ */ e.createElement(
132
132
  "li",
133
133
  {
134
- ref: m,
134
+ ref: p,
135
135
  className: q,
136
136
  style: J,
137
137
  ...D
@@ -140,11 +140,11 @@ const g = e.forwardRef((R, V) => {
140
140
  "a",
141
141
  {
142
142
  className: "k-step-link",
143
- title: r || void 0,
143
+ title: o || void 0,
144
144
  onClick: j,
145
145
  onFocus: K,
146
- tabIndex: y || (d ? 0 : -1),
147
- "aria-current": p,
146
+ tabIndex: S || (u ? 0 : -1),
147
+ "aria-current": d,
148
148
  "aria-disabled": n || !N || void 0,
149
149
  "aria-invalid": t !== void 0 && !t || void 0
150
150
  },
@@ -152,7 +152,7 @@ const g = e.forwardRef((R, V) => {
152
152
  )
153
153
  );
154
154
  });
155
- g.propTypes = {
155
+ E.propTypes = {
156
156
  children: a.any,
157
157
  className: a.string,
158
158
  // content: PropTypes.any,
@@ -170,8 +170,8 @@ g.propTypes = {
170
170
  const me = {
171
171
  tabIndex: 0
172
172
  };
173
- g.defaultProps = me;
174
- g.displayName = "KendoStep";
173
+ E.defaultProps = me;
174
+ E.displayName = "KendoStep";
175
175
  export {
176
- g as Step
176
+ E as Step
177
177
  };
@@ -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 Z=require("react"),r=require("prop-types"),$=require("./context/StepperContext.js"),o=require("@progress/kendo-react-common"),ee=require("./Step.js"),te=require("@progress/kendo-react-progressbars"),K=require("./contants.js"),se=require("../package-metadata.js"),ae=require("@progress/kendo-react-intl"),N=require("./messages/index.js");function ne(l){const b=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const u in l)if(u!=="default"){const v=Object.getOwnPropertyDescriptor(l,u);Object.defineProperty(b,u,v.get?v:{enumerable:!0,get:()=>l[u]})}}return b.default=l,Object.freeze(b)}const a=ne(Z),I=a.forwardRef((l,b)=>{o.validatePackage(se.packageMetadata);const{animationDuration:u,children:v,className:O,disabled:f,errorIcon:A,errorSVGIcon:F,item:w,items:m,linear:g,mode:L,orientation:S,style:P,successIcon:V,successSVGIcon:j,onChange:h,onFocus:E}=l,z=ae.useLocalization().toLanguageString(N.progBarAriaLabel,N.messages[N.progBarAriaLabel]),k=a.useRef(null),T=a.useCallback(()=>{k.current&&o.focusFirstFocusableChild(k.current)},[]),R=a.useCallback(()=>({element:k.current,focus:T}),[T]);a.useImperativeHandle(b,R);const i=l.value||M.value,[y,c]=a.useState(i),p=m?m.length:0,n=S==="vertical",D=o.useRtl(k,l.dir),_=typeof u=="number"?u:u!==!1?K.DEFAULT_ANIMATION_DURATION:K.NO_ANIMATION;a.useEffect(()=>{c(i)},[i]);const C=a.useCallback((t,s)=>{const e=s===i-1,d=s===i,Y=s===i+1;i!==s&&h&&!f&&(!g||e||d||Y)&&(o.dispatchEvent(h,t,R(),{value:s}),c(s))},[i,g,h,f,c]),G=a.useCallback(t=>{let s=t.value,e=t.syntheticEvent;C(e,s)},[C]),B=a.useCallback(t=>{E&&!f&&o.dispatchEvent(E,t.syntheticEvent,R(),void 0)},[E,f]),q=a.useCallback(t=>{C(t,y)},[C,y]),H=a.useCallback(t=>{const s=D==="rtl",e=y,d=m.length-1;switch(t.keyCode){case o.Keys.left:t.preventDefault(),!s&&e>0&&c(e-1),s&&e<d&&c(e+1);break;case o.Keys.right:t.preventDefault(),!s&&e<d&&c(e+1),s&&e>0&&c(e-1);break;case o.Keys.up:t.preventDefault(),!s&&e>0&&c(e-1),s&&e>0&&c(e-1);break;case o.Keys.down:t.preventDefault(),!s&&e<d&&c(e+1),s&&e<d&&c(e+1);break;case o.Keys.home:t.preventDefault(),c(0);break;case o.Keys.end:t.preventDefault(),c(d);break;case o.Keys.space:t.preventDefault();break;case o.Keys.enter:t.preventDefault(),m[e].disabled||q(t);break}},[m,c,y,D,q]),U=a.useMemo(()=>o.classNames("k-stepper",{"k-stepper-linear":g},O),[g,O]),J=a.useMemo(()=>({display:"grid",gridTemplateColumns:n?void 0:"repeat("+p*2+", 1fr)",gridTemplateRows:n?"repeat("+p+", 1fr)":void 0,...P}),[n,p,P]),Q=a.useMemo(()=>o.classNames("k-step-list",{"k-step-list-horizontal":!n,"k-step-list-vertical":n}),[n]),W=a.useMemo(()=>({gridColumnStart:n?void 0:1,gridColumnEnd:n?void 0:-1,gridRowStart:n?1:void 0,gridRowEnd:n?-1:void 0}),[n]),X=a.useMemo(()=>({gridColumnStart:n?void 0:2,gridColumnEnd:n?void 0:p*2,gridRowStart:n?1:void 0,gridRowEnd:n?p:void 0,top:n?17:void 0}),[n,p]),x=m&&m.map((t,s)=>{const e={index:s,disabled:f||t.disabled,focused:s===y,current:s===i,...t},d=w||ee.Step;return a.createElement(d,{key:s,...e})});return a.createElement($.StepperContext.Provider,{value:{animationDuration:u,isVertical:n,item:w,linear:g,mode:L,numOfSteps:p,value:i,successIcon:V,successSVGIcon:j,errorIcon:A,errorSVGIcon:F,onChange:G,onFocus:B}},a.createElement("nav",{className:U,style:J,dir:D,onKeyDown:H},a.createElement("ol",{className:Q,style:W},x||v),a.createElement(te.ProgressBar,{style:X,animation:{duration:_},ariaLabel:z,"aria-hidden":!0,max:p-1,labelVisible:!1,orientation:S,reverse:S==="vertical",value:i,disabled:f,tabIndex:-1})))});I.propTypes={animationDuration:r.oneOfType([r.bool,r.number]),children:r.any,className:r.string,dir:r.string,disabled:r.bool,errorIcon:r.string,errorSVGIcon:o.svgIconPropType,item:r.any,items:r.any,linear:r.bool,mode:r.oneOf(["steps","labels"]),orientation:r.oneOf(["horizontal","vertical"]),style:r.object,successIcon:r.string,successSVGIcon:o.svgIconPropType,value:r.number.isRequired,onChange:r.func,onFocus:r.func};const M={value:0};I.defaultProps=M;I.displayName="KendoStepper";exports.Stepper=I;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Z=require("react"),r=require("prop-types"),$=require("./context/StepperContext.js"),o=require("@progress/kendo-react-common"),ee=require("./Step.js"),te=require("@progress/kendo-react-progressbars"),K=require("./contants.js"),se=require("../package-metadata.js"),ae=require("@progress/kendo-react-intl"),N=require("./messages/index.js");function ne(i){const b=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const u in i)if(u!=="default"){const v=Object.getOwnPropertyDescriptor(i,u);Object.defineProperty(b,u,v.get?v:{enumerable:!0,get:()=>i[u]})}}return b.default=i,Object.freeze(b)}const a=ne(Z),I=a.forwardRef((i,b)=>{o.validatePackage(se.packageMetadata);const{animationDuration:u,children:v,className:O,disabled:f,errorIcon:A,errorSVGIcon:F,item:P,items:m,linear:g,mode:L,orientation:S,style:w,successIcon:V,successSVGIcon:j,onChange:h,onFocus:E}=i,z=ae.useLocalization().toLanguageString(N.progBarAriaLabel,N.messages[N.progBarAriaLabel]),k=a.useRef(null),T=a.useCallback(()=>{k.current&&o.focusFirstFocusableChild(k.current)},[]),R=a.useCallback(()=>({element:k.current,focus:T}),[T]);a.useImperativeHandle(b,R);const l=i.value||M.value,[y,c]=a.useState(l),p=m?m.length:0,n=S==="vertical",D=o.useRtl(k,i.dir),_=typeof u=="number"?u:u!==!1?K.DEFAULT_ANIMATION_DURATION:K.NO_ANIMATION;a.useEffect(()=>{c(l)},[l]);const C=a.useCallback((t,s)=>{const e=s===l-1,d=s===l,Y=s===l+1;l!==s&&h&&!f&&(!g||e||d||Y)&&(o.dispatchEvent(h,t,R(),{value:s}),c(s))},[l,g,h,f,c]),G=a.useCallback(t=>{let s=t.value,e=t.syntheticEvent;C(e,s)},[C]),B=a.useCallback(t=>{E&&!f&&o.dispatchEvent(E,t.syntheticEvent,R(),void 0)},[E,f]),q=a.useCallback(t=>{C(t,y)},[C,y]),H=a.useCallback(t=>{const s=D==="rtl",e=y,d=m.length-1;switch(t.keyCode){case o.Keys.left:t.preventDefault(),!s&&e>0&&c(e-1),s&&e<d&&c(e+1);break;case o.Keys.right:t.preventDefault(),!s&&e<d&&c(e+1),s&&e>0&&c(e-1);break;case o.Keys.up:t.preventDefault(),!s&&e>0&&c(e-1),s&&e>0&&c(e-1);break;case o.Keys.down:t.preventDefault(),!s&&e<d&&c(e+1),s&&e<d&&c(e+1);break;case o.Keys.home:t.preventDefault(),c(0);break;case o.Keys.end:t.preventDefault(),c(d);break;case o.Keys.space:t.preventDefault();break;case o.Keys.enter:t.preventDefault(),m[e].disabled||q(t);break}},[m,c,y,D,q]),U=a.useMemo(()=>o.classNames("k-stepper",{"k-stepper-linear":g},O),[g,O]),J=a.useMemo(()=>({display:"grid",gridTemplateColumns:n?void 0:"repeat("+p*2+", 1fr)",gridTemplateRows:n?"repeat("+p+", 1fr)":void 0,...w}),[n,p,w]),Q=a.useMemo(()=>o.classNames("k-step-list",{"k-step-list-horizontal":!n,"k-step-list-vertical":n}),[n]),W=a.useMemo(()=>({gridColumnStart:n?void 0:1,gridColumnEnd:n?void 0:-1,gridRowStart:n?1:void 0,gridRowEnd:n?-1:void 0}),[n]),X=a.useMemo(()=>({gridColumnStart:n?void 0:2,gridColumnEnd:n?void 0:p*2,gridRowStart:n?1:void 0,gridRowEnd:n?p:void 0,top:n?17:void 0}),[n,p]),x=m&&m.map((t,s)=>{const e={index:s,disabled:f||t.disabled,focused:s===y,current:s===l,...t},d=P||ee.Step;return a.createElement(d,{key:s,...e})});return a.createElement($.StepperContext.Provider,{value:{animationDuration:u,isVertical:n,item:P,linear:g,mode:L,numOfSteps:p,value:l,successIcon:V,successSVGIcon:j,errorIcon:A,errorSVGIcon:F,onChange:G,onFocus:B}},a.createElement("nav",{className:U,style:J,dir:D,onKeyDown:H},a.createElement("ol",{className:Q,style:W},x||v),a.createElement(te.ProgressBar,{style:X,labelPlacement:"start",animation:{duration:_},ariaLabel:z,"aria-hidden":!0,max:p-1,labelVisible:!1,orientation:S,reverse:S==="vertical",value:l,disabled:f,tabIndex:-1})))});I.propTypes={animationDuration:r.oneOfType([r.bool,r.number]),children:r.any,className:r.string,dir:r.string,disabled:r.bool,errorIcon:r.string,errorSVGIcon:o.svgIconPropType,item:r.any,items:r.any,linear:r.bool,mode:r.oneOf(["steps","labels"]),orientation:r.oneOf(["horizontal","vertical"]),style:r.object,successIcon:r.string,successSVGIcon:o.svgIconPropType,value:r.number.isRequired,onChange:r.func,onFocus:r.func};const M={value:0};I.defaultProps=M;I.displayName="KendoStepper";exports.Stepper=I;
@@ -6,28 +6,28 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as o from "react";
9
+ import * as a from "react";
10
10
  import r from "prop-types";
11
11
  import { StepperContext as ee } from "./context/StepperContext.mjs";
12
- import { validatePackage as te, focusFirstFocusableChild as se, useRtl as oe, dispatchEvent as A, Keys as u, classNames as F, svgIconPropType as M } from "@progress/kendo-react-common";
13
- import { Step as ae } from "./Step.mjs";
12
+ import { validatePackage as te, focusFirstFocusableChild as se, useRtl as ae, dispatchEvent as P, Keys as u, classNames as A, svgIconPropType as F } from "@progress/kendo-react-common";
13
+ import { Step as oe } from "./Step.mjs";
14
14
  import { ProgressBar as re } from "@progress/kendo-react-progressbars";
15
- import { DEFAULT_ANIMATION_DURATION as ne, NO_ANIMATION as ie } from "./contants.mjs";
16
- import { packageMetadata as le } from "../package-metadata.mjs";
15
+ import { DEFAULT_ANIMATION_DURATION as ne, NO_ANIMATION as le } from "./contants.mjs";
16
+ import { packageMetadata as ie } from "../package-metadata.mjs";
17
17
  import { useLocalization as ce } from "@progress/kendo-react-intl";
18
- import { progBarAriaLabel as O, messages as ue } from "./messages/index.mjs";
19
- const E = o.forwardRef((k, V) => {
20
- te(le);
18
+ import { progBarAriaLabel as M, messages as ue } from "./messages/index.mjs";
19
+ const E = a.forwardRef((k, V) => {
20
+ te(ie);
21
21
  const {
22
22
  animationDuration: b,
23
23
  children: L,
24
24
  className: D,
25
- disabled: p,
25
+ disabled: m,
26
26
  errorIcon: z,
27
27
  errorSVGIcon: G,
28
28
  item: N,
29
29
  items: d,
30
- linear: m,
30
+ linear: p,
31
31
  mode: K,
32
32
  orientation: y,
33
33
  style: R,
@@ -35,76 +35,76 @@ const E = o.forwardRef((k, V) => {
35
35
  successSVGIcon: B,
36
36
  onChange: h,
37
37
  onFocus: C
38
- } = k, H = ce().toLanguageString(O, ue[O]), g = o.useRef(null), w = o.useCallback(
38
+ } = k, H = ce().toLanguageString(M, ue[M]), g = a.useRef(null), w = a.useCallback(
39
39
  () => {
40
40
  g.current && se(g.current);
41
41
  },
42
42
  []
43
- ), I = o.useCallback(
43
+ ), I = a.useCallback(
44
44
  () => ({
45
45
  element: g.current,
46
46
  focus: w
47
47
  }),
48
48
  [w]
49
49
  );
50
- o.useImperativeHandle(V, I);
51
- const i = k.value || P.value, [f, n] = o.useState(i), c = d ? d.length : 0, a = y === "vertical", S = oe(g, k.dir), U = typeof b == "number" ? b : b !== !1 ? ne : ie;
52
- o.useEffect(() => {
53
- n(i);
54
- }, [i]);
55
- const v = o.useCallback(
50
+ a.useImperativeHandle(V, I);
51
+ const l = k.value || O.value, [f, n] = a.useState(l), c = d ? d.length : 0, o = y === "vertical", S = ae(g, k.dir), U = typeof b == "number" ? b : b !== !1 ? ne : le;
52
+ a.useEffect(() => {
53
+ n(l);
54
+ }, [l]);
55
+ const v = a.useCallback(
56
56
  (t, s) => {
57
- const e = s === i - 1, l = s === i, $ = s === i + 1;
58
- i !== s && h && !p && (!m || e || l || $) && (A(
57
+ const e = s === l - 1, i = s === l, $ = s === l + 1;
58
+ l !== s && h && !m && (!p || e || i || $) && (P(
59
59
  h,
60
60
  t,
61
61
  I(),
62
62
  { value: s }
63
63
  ), n(s));
64
64
  },
65
- [i, m, h, p, n]
66
- ), j = o.useCallback(
65
+ [l, p, h, m, n]
66
+ ), j = a.useCallback(
67
67
  (t) => {
68
68
  let s = t.value, e = t.syntheticEvent;
69
69
  v(e, s);
70
70
  },
71
71
  [v]
72
- ), q = o.useCallback(
72
+ ), q = a.useCallback(
73
73
  (t) => {
74
- C && !p && A(
74
+ C && !m && P(
75
75
  C,
76
76
  t.syntheticEvent,
77
77
  I(),
78
78
  void 0
79
79
  );
80
80
  },
81
- [C, p]
82
- ), x = o.useCallback(
81
+ [C, m]
82
+ ), x = a.useCallback(
83
83
  (t) => {
84
84
  v(t, f);
85
85
  },
86
86
  [v, f]
87
- ), J = o.useCallback(
87
+ ), J = a.useCallback(
88
88
  (t) => {
89
- const s = S === "rtl", e = f, l = d.length - 1;
89
+ const s = S === "rtl", e = f, i = d.length - 1;
90
90
  switch (t.keyCode) {
91
91
  case u.left:
92
- t.preventDefault(), !s && e > 0 && n(e - 1), s && e < l && n(e + 1);
92
+ t.preventDefault(), !s && e > 0 && n(e - 1), s && e < i && n(e + 1);
93
93
  break;
94
94
  case u.right:
95
- t.preventDefault(), !s && e < l && n(e + 1), s && e > 0 && n(e - 1);
95
+ t.preventDefault(), !s && e < i && n(e + 1), s && e > 0 && n(e - 1);
96
96
  break;
97
97
  case u.up:
98
98
  t.preventDefault(), !s && e > 0 && n(e - 1), s && e > 0 && n(e - 1);
99
99
  break;
100
100
  case u.down:
101
- t.preventDefault(), !s && e < l && n(e + 1), s && e < l && n(e + 1);
101
+ t.preventDefault(), !s && e < i && n(e + 1), s && e < i && n(e + 1);
102
102
  break;
103
103
  case u.home:
104
104
  t.preventDefault(), n(0);
105
105
  break;
106
106
  case u.end:
107
- t.preventDefault(), n(l);
107
+ t.preventDefault(), n(i);
108
108
  break;
109
109
  case u.space:
110
110
  t.preventDefault();
@@ -115,70 +115,70 @@ const E = o.forwardRef((k, V) => {
115
115
  }
116
116
  },
117
117
  [d, n, f, S, x]
118
- ), Q = o.useMemo(
119
- () => F(
118
+ ), Q = a.useMemo(
119
+ () => A(
120
120
  "k-stepper",
121
121
  {
122
- "k-stepper-linear": m
122
+ "k-stepper-linear": p
123
123
  },
124
124
  D
125
125
  ),
126
- [m, D]
127
- ), W = o.useMemo(
126
+ [p, D]
127
+ ), W = a.useMemo(
128
128
  () => ({
129
129
  display: "grid",
130
- gridTemplateColumns: a ? void 0 : "repeat(" + c * 2 + ", 1fr)",
131
- gridTemplateRows: a ? "repeat(" + c + ", 1fr)" : void 0,
130
+ gridTemplateColumns: o ? void 0 : "repeat(" + c * 2 + ", 1fr)",
131
+ gridTemplateRows: o ? "repeat(" + c + ", 1fr)" : void 0,
132
132
  ...R
133
133
  }),
134
- [a, c, R]
135
- ), X = o.useMemo(
136
- () => F(
134
+ [o, c, R]
135
+ ), X = a.useMemo(
136
+ () => A(
137
137
  "k-step-list",
138
138
  {
139
- "k-step-list-horizontal": !a,
140
- "k-step-list-vertical": a
139
+ "k-step-list-horizontal": !o,
140
+ "k-step-list-vertical": o
141
141
  }
142
142
  ),
143
- [a]
144
- ), Y = o.useMemo(
143
+ [o]
144
+ ), Y = a.useMemo(
145
145
  () => ({
146
- gridColumnStart: a ? void 0 : 1,
147
- gridColumnEnd: a ? void 0 : -1,
148
- gridRowStart: a ? 1 : void 0,
149
- gridRowEnd: a ? -1 : void 0
146
+ gridColumnStart: o ? void 0 : 1,
147
+ gridColumnEnd: o ? void 0 : -1,
148
+ gridRowStart: o ? 1 : void 0,
149
+ gridRowEnd: o ? -1 : void 0
150
150
  }),
151
- [a]
152
- ), Z = o.useMemo(
151
+ [o]
152
+ ), Z = a.useMemo(
153
153
  () => ({
154
- gridColumnStart: a ? void 0 : 2,
155
- gridColumnEnd: a ? void 0 : c * 2,
156
- gridRowStart: a ? 1 : void 0,
157
- gridRowEnd: a ? c : void 0,
158
- top: a ? 17 : void 0
154
+ gridColumnStart: o ? void 0 : 2,
155
+ gridColumnEnd: o ? void 0 : c * 2,
156
+ gridRowStart: o ? 1 : void 0,
157
+ gridRowEnd: o ? c : void 0,
158
+ top: o ? 17 : void 0
159
159
  }),
160
- [a, c]
160
+ [o, c]
161
161
  ), T = d && d.map((t, s) => {
162
162
  const e = {
163
163
  index: s,
164
- disabled: p || t.disabled,
164
+ disabled: m || t.disabled,
165
165
  focused: s === f,
166
- current: s === i,
166
+ current: s === l,
167
167
  ...t
168
- }, l = N || ae;
169
- return /* @__PURE__ */ o.createElement(l, { key: s, ...e });
168
+ }, i = N || oe;
169
+ return /* @__PURE__ */ a.createElement(i, { key: s, ...e });
170
170
  });
171
- return /* @__PURE__ */ o.createElement(
171
+ return /* @__PURE__ */ a.createElement(
172
172
  ee.Provider,
173
173
  {
174
174
  value: {
175
175
  animationDuration: b,
176
- isVertical: a,
176
+ isVertical: o,
177
177
  item: N,
178
- linear: m,
178
+ linear: p,
179
179
  mode: K,
180
180
  numOfSteps: c,
181
- value: i,
181
+ value: l,
182
182
  successIcon: _,
183
183
  successSVGIcon: B,
184
184
  errorIcon: z,
@@ -187,7 +187,7 @@ const E = o.forwardRef((k, V) => {
187
187
  onFocus: q
188
188
  }
189
189
  },
190
- /* @__PURE__ */ o.createElement(
190
+ /* @__PURE__ */ a.createElement(
191
191
  "nav",
192
192
  {
193
193
  className: Q,
@@ -195,7 +195,7 @@ const E = o.forwardRef((k, V) => {
195
195
  dir: S,
196
196
  onKeyDown: J
197
197
  },
198
- /* @__PURE__ */ o.createElement(
198
+ /* @__PURE__ */ a.createElement(
199
199
  "ol",
200
200
  {
201
201
  className: X,
@@ -203,10 +203,11 @@ const E = o.forwardRef((k, V) => {
203
203
  },
204
204
  T || L
205
205
  ),
206
- /* @__PURE__ */ o.createElement(
206
+ /* @__PURE__ */ a.createElement(
207
207
  re,
208
208
  {
209
209
  style: Z,
210
+ labelPlacement: "start",
210
211
  animation: { duration: U },
211
212
  ariaLabel: H,
212
213
  "aria-hidden": !0,
@@ -214,8 +215,8 @@ const E = o.forwardRef((k, V) => {
214
215
  labelVisible: !1,
215
216
  orientation: y,
216
217
  reverse: y === "vertical",
217
- value: i,
218
- disabled: p,
218
+ value: l,
219
+ disabled: m,
219
220
  tabIndex: -1
220
221
  }
221
222
  )
@@ -229,7 +230,7 @@ E.propTypes = {
229
230
  dir: r.string,
230
231
  disabled: r.bool,
231
232
  errorIcon: r.string,
232
- errorSVGIcon: M,
233
+ errorSVGIcon: F,
233
234
  item: r.any,
234
235
  items: r.any,
235
236
  linear: r.bool,
@@ -237,15 +238,15 @@ E.propTypes = {
237
238
  orientation: r.oneOf(["horizontal", "vertical"]),
238
239
  style: r.object,
239
240
  successIcon: r.string,
240
- successSVGIcon: M,
241
+ successSVGIcon: F,
241
242
  value: r.number.isRequired,
242
243
  onChange: r.func,
243
244
  onFocus: r.func
244
245
  };
245
- const P = {
246
+ const O = {
246
247
  value: 0
247
248
  };
248
- E.defaultProps = P;
249
+ E.defaultProps = O;
249
250
  E.displayName = "KendoStepper";
250
251
  export {
251
252
  E as Stepper
@@ -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"),b=require("prop-types"),y=require("../card/Card.js"),A=require("../card/CardHeader.js"),D=require("../card/CardTitle.js"),I=require("../card/CardSubtitle.js"),O=require("../card/CardBody.js"),T=require("../card/CardImage.js"),h=require("../card/CardActions.js"),r=require("@progress/kendo-react-common"),q=require("@progress/kendo-react-animation"),S=require("@progress/kendo-svg-icons");function R(e){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const l in e)if(l!=="default"){const c=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(i,l,c.get?c:{enumerable:!0,get:()=>e[l]})}}return i.default=e,Object.freeze(i)}const t=R(N),v=e=>{const{title:l,subtitle:c,actions:o,images:d,description:E}=e.eventData,[s,C]=t.useState(e.eventData.opened||!1),[u,m]=t.useState(e.eventData.opened||!!e.collapsible),f=n=>{if(C(!s),e.onChange){const a={syntheticEvent:n,nativeEvent:n.nativeEvent,eventData:e.eventData};e.onChange.call(void 0,a)}},g=n=>{if(e.onActionClick){const a={syntheticEvent:n,nativeEvent:n.nativeEvent,eventData:e.eventData};e.onActionClick.call(void 0,a)}},k=()=>t.createElement(t.Fragment,null,t.createElement(O.CardBody,null,t.createElement("div",{className:"k-card-description"},t.createElement("p",null,E),d&&d.map((n,a)=>t.createElement(T.CardImage,{key:a,src:n.src})))),t.createElement(h.CardActions,null,o&&o.map((n,a)=>t.createElement("a",{key:a,href:n.url,className:"k-button k-button-md k-rounded-md k-button-flat k-button-flat-primary",onClick:g},n.text))));return t.createElement("div",{"data-testid":"k-timeline-card",className:r.classNames("k-timeline-card",{"k-collapsed":e.collapsible&&u})},t.createElement(y.Card,{"aria-live":"polite","aria-describedby":e.id,"aria-atomic":"true",tabIndex:e.tabindex,role:e.horizontal?"tabpanel":"button","aria-expanded":e.collapsible&&u,className:"k-card-with-callout",onClick:n=>f(n)},t.createElement("span",{style:e.calloutStyle,className:r.classNames("k-timeline-card-callout","k-card-callout",{"k-callout-n":e.horizontal},{"k-callout-e":e.alternated&&!e.horizontal},{"k-callout-w":!e.alternated&&!e.horizontal})}),t.createElement("div",{className:"k-card-inner"},t.createElement(A.CardHeader,null,t.createElement(D.CardTitle,null,t.createElement("span",{className:"k-event-title"},l),e.collapsible&&t.createElement("span",{className:"k-event-collapse k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button"},t.createElement(r.SvgIcon,{icon:S.chevronRightIcon}))),c&&t.createElement(I.CardSubtitle,null,c)),e.collapsible?t.createElement(q.Reveal,{transitionEnterDuration:e.transitionDuration||400,transitionExitDuration:e.transitionDuration||400,onBeforeEnter:()=>m(!1),onAfterExited:()=>m(!0)},s?k():null):k())))};v.propTypes={onChange:b.func,onActionClick:b.func};exports.TimelineCard=v;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("react"),k=require("prop-types"),y=require("../card/Card.js"),A=require("../card/CardHeader.js"),D=require("../card/CardTitle.js"),I=require("../card/CardSubtitle.js"),O=require("../card/CardBody.js"),T=require("../card/CardImage.js"),h=require("../card/CardActions.js"),v=require("@progress/kendo-react-common"),q=require("@progress/kendo-react-animation"),R=require("@progress/kendo-svg-icons"),S=require("@progress/kendo-react-buttons");function x(e){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const l in e)if(l!=="default"){const c=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(i,l,c.get?c:{enumerable:!0,get:()=>e[l]})}}return i.default=e,Object.freeze(i)}const t=x(N),E=e=>{const{title:l,subtitle:c,actions:r,images:o,description:C}=e.eventData,[d,b]=t.useState(e.eventData.opened||!1),[s,u]=t.useState(e.eventData.opened||!!e.collapsible),f=n=>{if(b(!d),e.onChange){const a={syntheticEvent:n,nativeEvent:n.nativeEvent,eventData:e.eventData};e.onChange.call(void 0,a)}},g=n=>{if(e.onActionClick){const a={syntheticEvent:n,nativeEvent:n.nativeEvent,eventData:e.eventData};e.onActionClick.call(void 0,a)}},m=()=>t.createElement(t.Fragment,null,t.createElement(O.CardBody,null,t.createElement("div",{className:"k-card-description"},t.createElement("p",null,C),o&&o.map((n,a)=>t.createElement(T.CardImage,{key:a,src:n.src})))),r&&t.createElement(h.CardActions,null,r.map((n,a)=>t.createElement("a",{key:a,href:n.url,className:"k-button k-button-md k-rounded-md k-button-flat k-button-flat-primary",onClick:g},n.text))));return t.createElement("div",{"data-testid":"k-timeline-card",className:v.classNames("k-timeline-card",{"k-collapsed":e.collapsible&&s})},t.createElement(y.Card,{"aria-live":"polite","aria-describedby":e.id,"aria-atomic":"true",tabIndex:e.tabindex,role:e.horizontal?"tabpanel":"button","aria-expanded":e.collapsible&&s,className:"k-card-with-callout",onClick:n=>f(n)},t.createElement("span",{style:e.calloutStyle,className:v.classNames("k-timeline-card-callout","k-card-callout",{"k-callout-n":e.horizontal},{"k-callout-e":e.alternated&&!e.horizontal},{"k-callout-w":!e.alternated&&!e.horizontal})}),t.createElement("div",{className:"k-card-inner"},t.createElement(A.CardHeader,null,t.createElement(D.CardTitle,null,t.createElement("span",{className:"k-event-title"},l),e.collapsible&&t.createElement(S.Button,{className:"k-event-collapse",fillMode:"flat",svgIcon:R.chevronRightIcon})),c&&t.createElement(I.CardSubtitle,null,c)),e.collapsible?t.createElement(q.Reveal,{transitionEnterDuration:e.transitionDuration||400,transitionExitDuration:e.transitionDuration||400,onBeforeEnter:()=>u(!1),onAfterExited:()=>u(!0)},d?m():null):m())))};E.propTypes={onChange:k.func,onActionClick:k.func};exports.TimelineCard=E;
@@ -8,19 +8,20 @@
8
8
  "use client";
9
9
  import * as t from "react";
10
10
  import s from "prop-types";
11
- import { Card as C } from "../card/Card.mjs";
12
- import { CardHeader as N } from "../card/CardHeader.mjs";
11
+ import { Card as N } from "../card/Card.mjs";
12
+ import { CardHeader as b } from "../card/CardHeader.mjs";
13
13
  import { CardTitle as A } from "../card/CardTitle.mjs";
14
14
  import { CardSubtitle as D } from "../card/CardSubtitle.mjs";
15
15
  import { CardBody as h } from "../card/CardBody.mjs";
16
16
  import { CardImage as I } from "../card/CardImage.mjs";
17
17
  import { CardActions as g } from "../card/CardActions.mjs";
18
- import { classNames as u, SvgIcon as y } from "@progress/kendo-react-common";
19
- import { Reveal as T } from "@progress/kendo-react-animation";
20
- import { chevronRightIcon as O } from "@progress/kendo-svg-icons";
18
+ import { classNames as u } from "@progress/kendo-react-common";
19
+ import { Reveal as y } from "@progress/kendo-react-animation";
20
+ import { chevronRightIcon as T } from "@progress/kendo-svg-icons";
21
+ import { Button as O } from "@progress/kendo-react-buttons";
21
22
  const x = (e) => {
22
- const { title: k, subtitle: l, actions: i, images: o, description: E } = e.eventData, [c, v] = t.useState(e.eventData.opened || !1), [r, m] = t.useState(e.eventData.opened || !!e.collapsible), f = (a) => {
23
- if (v(!c), e.onChange) {
23
+ const { title: E, subtitle: l, actions: i, images: c, description: v } = e.eventData, [o, k] = t.useState(e.eventData.opened || !1), [r, m] = t.useState(e.eventData.opened || !!e.collapsible), f = (a) => {
24
+ if (k(!o), e.onChange) {
24
25
  const n = {
25
26
  syntheticEvent: a,
26
27
  nativeEvent: a.nativeEvent,
@@ -28,7 +29,7 @@ const x = (e) => {
28
29
  };
29
30
  e.onChange.call(void 0, n);
30
31
  }
31
- }, b = (a) => {
32
+ }, C = (a) => {
32
33
  if (e.onActionClick) {
33
34
  const n = {
34
35
  syntheticEvent: a,
@@ -37,13 +38,13 @@ const x = (e) => {
37
38
  };
38
39
  e.onActionClick.call(void 0, n);
39
40
  }
40
- }, d = () => /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(h, null, /* @__PURE__ */ t.createElement("div", { className: "k-card-description" }, /* @__PURE__ */ t.createElement("p", null, E), o && o.map((a, n) => /* @__PURE__ */ t.createElement(I, { key: n, src: a.src })))), /* @__PURE__ */ t.createElement(g, null, i && i.map((a, n) => /* @__PURE__ */ t.createElement(
41
+ }, d = () => /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(h, null, /* @__PURE__ */ t.createElement("div", { className: "k-card-description" }, /* @__PURE__ */ t.createElement("p", null, v), c && c.map((a, n) => /* @__PURE__ */ t.createElement(I, { key: n, src: a.src })))), i && /* @__PURE__ */ t.createElement(g, null, i.map((a, n) => /* @__PURE__ */ t.createElement(
41
42
  "a",
42
43
  {
43
44
  key: n,
44
45
  href: a.url,
45
46
  className: "k-button k-button-md k-rounded-md k-button-flat k-button-flat-primary",
46
- onClick: b
47
+ onClick: C
47
48
  },
48
49
  a.text
49
50
  ))));
@@ -57,7 +58,7 @@ const x = (e) => {
57
58
  )
58
59
  },
59
60
  /* @__PURE__ */ t.createElement(
60
- C,
61
+ N,
61
62
  {
62
63
  "aria-live": "polite",
63
64
  "aria-describedby": e.id,
@@ -81,21 +82,15 @@ const x = (e) => {
81
82
  )
82
83
  }
83
84
  ),
84
- /* @__PURE__ */ t.createElement("div", { className: "k-card-inner" }, /* @__PURE__ */ t.createElement(N, null, /* @__PURE__ */ t.createElement(A, null, /* @__PURE__ */ t.createElement("span", { className: "k-event-title" }, k), e.collapsible && /* @__PURE__ */ t.createElement(
85
- "span",
86
- {
87
- className: "k-event-collapse k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button"
88
- },
89
- /* @__PURE__ */ t.createElement(y, { icon: O })
90
- )), l && /* @__PURE__ */ t.createElement(D, null, l)), e.collapsible ? /* @__PURE__ */ t.createElement(
91
- T,
85
+ /* @__PURE__ */ t.createElement("div", { className: "k-card-inner" }, /* @__PURE__ */ t.createElement(b, null, /* @__PURE__ */ t.createElement(A, null, /* @__PURE__ */ t.createElement("span", { className: "k-event-title" }, E), e.collapsible && /* @__PURE__ */ t.createElement(O, { className: "k-event-collapse", fillMode: "flat", svgIcon: T })), l && /* @__PURE__ */ t.createElement(D, null, l)), e.collapsible ? /* @__PURE__ */ t.createElement(
86
+ y,
92
87
  {
93
88
  transitionEnterDuration: e.transitionDuration || 400,
94
89
  transitionExitDuration: e.transitionDuration || 400,
95
90
  onBeforeEnter: () => m(!1),
96
91
  onAfterExited: () => m(!0)
97
92
  },
98
- c ? d() : null
93
+ o ? d() : null
99
94
  ) : d())
100
95
  )
101
96
  );