@progress/kendo-react-layout 14.5.0-develop.14 → 14.5.0-develop.15

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.
Files changed (55) hide show
  1. package/actionsheet/ActionSheet.js +1 -1
  2. package/actionsheet/ActionSheet.mjs +18 -19
  3. package/actionsheet/ActionSheetItem.js +1 -1
  4. package/actionsheet/ActionSheetItem.mjs +1 -3
  5. package/bottomnavigation/BottomNavigation.js +1 -1
  6. package/bottomnavigation/BottomNavigation.mjs +85 -69
  7. package/bottomnavigation/BottomNavigationItem.js +1 -1
  8. package/bottomnavigation/BottomNavigationItem.mjs +34 -33
  9. package/bottomnavigation/messages/index.d.ts +17 -0
  10. package/bottomnavigation/messages/index.js +8 -0
  11. package/bottomnavigation/messages/index.mjs +14 -0
  12. package/breadcrumb/Breadcrumb.js +1 -1
  13. package/breadcrumb/Breadcrumb.mjs +30 -28
  14. package/breadcrumb/BreadcrumbLink.js +1 -1
  15. package/breadcrumb/BreadcrumbLink.mjs +26 -26
  16. package/breadcrumb/messages/index.d.ts +17 -0
  17. package/breadcrumb/messages/index.js +8 -0
  18. package/breadcrumb/messages/index.mjs +14 -0
  19. package/dist/cdn/js/kendo-react-layout.js +1 -1
  20. package/drawer/DrawerItem.js +1 -1
  21. package/drawer/DrawerItem.mjs +22 -23
  22. package/expansionpanel/ExpansionPanel.js +1 -1
  23. package/expansionpanel/ExpansionPanel.mjs +50 -50
  24. package/expansionpanel/ExpansionPanelContent.js +1 -1
  25. package/expansionpanel/ExpansionPanelContent.mjs +7 -4
  26. package/package-metadata.js +1 -1
  27. package/package-metadata.mjs +2 -2
  28. package/package.json +8 -8
  29. package/panelbar/PanelBar.js +1 -1
  30. package/panelbar/PanelBar.mjs +5 -4
  31. package/panelbar/PanelBarItem.js +1 -1
  32. package/panelbar/PanelBarItem.mjs +13 -15
  33. package/panelbar/interfaces/RenderPanelBarItem.d.ts +1 -0
  34. package/panelbar/util.d.ts +1 -1
  35. package/panelbar/util.js +1 -1
  36. package/panelbar/util.mjs +62 -59
  37. package/splitter/SplitterBar.d.ts +1 -0
  38. package/splitter/SplitterBar.js +1 -1
  39. package/splitter/SplitterBar.mjs +64 -56
  40. package/stepper/Step.js +1 -1
  41. package/stepper/Step.mjs +79 -85
  42. package/stepper/Stepper.js +1 -1
  43. package/stepper/Stepper.mjs +103 -104
  44. package/stepper/messages/index.d.ts +12 -2
  45. package/stepper/messages/index.js +1 -1
  46. package/stepper/messages/index.mjs +8 -4
  47. package/tilelayout/InternalTile.js +1 -1
  48. package/tilelayout/InternalTile.mjs +119 -115
  49. package/tilelayout/TileLayout.js +1 -1
  50. package/tilelayout/TileLayout.mjs +58 -58
  51. package/timeline/TimelineCard.d.ts +2 -0
  52. package/timeline/TimelineCard.js +1 -1
  53. package/timeline/TimelineCard.mjs +16 -15
  54. package/timeline/TimelineHorizontal.js +1 -1
  55. package/timeline/TimelineHorizontal.mjs +105 -101
package/stepper/Step.mjs CHANGED
@@ -7,127 +7,121 @@
7
7
  */
8
8
  import * as e from "react";
9
9
  import a from "prop-types";
10
- import { StepperContext as Y } from "./context/StepperContext.mjs";
11
- import { focusFirstFocusableChild as Z, dispatchEvent as M, classNames as ee, IconWrap as T, toIconName as te } from "@progress/kendo-react-common";
12
- import { useLocalization as ae } from "@progress/kendo-react-intl";
13
- import { checkIcon as se, exclamationCircleIcon as oe } from "@progress/kendo-svg-icons";
14
- import { DEFAULT_ANIMATION_DURATION as ne, NO_ANIMATION as ce } from "./contants.mjs";
15
- import { messages as le, optionalText as ie } from "./messages/index.mjs";
16
- const L = e.forwardRef((O, R) => {
10
+ import { StepperContext as te } from "./context/StepperContext.mjs";
11
+ import { focusFirstFocusableChild as ae, dispatchEvent as O, classNames as se, IconWrap as R, toIconName as oe } from "@progress/kendo-react-common";
12
+ import { useLocalization as ne } from "@progress/kendo-react-intl";
13
+ import { checkIcon as le, exclamationCircleIcon as ce } from "@progress/kendo-svg-icons";
14
+ import { DEFAULT_ANIMATION_DURATION as ie, NO_ANIMATION as re } from "./contants.mjs";
15
+ import { messages as me, optionalText as pe, stepAriaLabel as de } from "./messages/index.mjs";
16
+ const V = e.forwardRef((D, $) => {
17
17
  const {
18
18
  // content
19
- children: V,
20
- className: g,
21
- current: d,
19
+ children: z,
20
+ className: h,
21
+ current: b,
22
22
  disabled: o,
23
- focused: E,
24
- icon: r,
25
- svgIcon: h,
23
+ focused: y,
24
+ icon: l,
25
+ svgIcon: k,
26
26
  index: s,
27
27
  isValid: t,
28
28
  label: n,
29
29
  optional: m,
30
- style: C,
31
- tabIndex: me = re.tabIndex,
32
- text: y,
33
- ...z
34
- } = O, {
35
- animationDuration: u,
36
- isVertical: k,
37
- item: D,
38
- linear: H,
39
- mode: S,
30
+ style: S,
31
+ tabIndex: be = ue.tabIndex,
32
+ text: p,
33
+ ...H
34
+ } = D, {
35
+ animationDuration: f,
36
+ isVertical: v,
37
+ item: _,
38
+ linear: w,
39
+ mode: A,
40
40
  numOfSteps: c,
41
- value: l,
42
- onChange: b,
43
- onFocus: f,
44
- successIcon: _,
45
- errorIcon: w,
46
- successSVGIcon: B,
47
- errorSVGIcon: G
48
- } = e.useContext(Y), p = e.useRef(null), F = e.useCallback(() => {
49
- p.current && Z(p.current);
50
- }, []), v = e.useCallback(
41
+ value: i,
42
+ onChange: I,
43
+ onFocus: N,
44
+ successIcon: B,
45
+ errorIcon: G,
46
+ successSVGIcon: P,
47
+ errorSVGIcon: U
48
+ } = e.useContext(te), d = e.useRef(null), F = e.useCallback(() => {
49
+ d.current && ae(d.current);
50
+ }, []), x = e.useCallback(
51
51
  () => ({
52
- element: p.current,
52
+ element: d.current,
53
53
  focus: F
54
54
  }),
55
55
  [F]
56
56
  );
57
- e.useImperativeHandle(R, v);
58
- const I = !H || s === l - 1 || s === l || s === l + 1, N = S === "labels" || !!r && !!n, P = ae(), U = ((i) => P.toLanguageString(i, le[i]))(ie), W = typeof u == "number" ? u : u !== !1 ? ne : ce, $ = e.useCallback(
59
- (i) => {
60
- b && !o && M(b, i, v(), { value: s });
57
+ e.useImperativeHandle($, x);
58
+ const g = !w || s === i - 1 || s === i || s === i + 1, E = A === "labels" || !!l && !!n, W = ne(), L = (r) => W.toLanguageString(r, me[r]), j = L(pe), K = typeof f == "number" ? f : f !== !1 ? ie : re, q = e.useCallback(
59
+ (r) => {
60
+ I && !o && O(I, r, x(), { value: s });
61
61
  },
62
- [b, l, o]
63
- ), j = e.useCallback(
64
- (i) => {
65
- f && !o && M(f, i, v(), void 0);
62
+ [I, i, o]
63
+ ), J = e.useCallback(
64
+ (r) => {
65
+ N && !o && O(N, r, x(), void 0);
66
66
  },
67
- [f, o]
68
- ), K = e.useMemo(
69
- () => ee(
67
+ [N, o]
68
+ ), Q = e.useMemo(
69
+ () => se(
70
70
  "k-step",
71
71
  {
72
72
  "k-step-first": s === 0,
73
73
  "k-step-last": c && s === c - 1,
74
- "k-step-done": s < l,
75
- "k-step-current": d,
74
+ "k-step-done": s < i,
75
+ "k-step-current": b,
76
76
  "k-step-optional": m,
77
77
  "k-step-error": t !== void 0 && !t,
78
78
  "k-step-success": t,
79
79
  "k-disabled": o,
80
- "k-focus": E
80
+ "k-focus": y
81
81
  },
82
- g
82
+ h
83
83
  ),
84
- [s, c, l, d, m, o, E, t, g]
85
- ), q = e.useMemo(
84
+ [s, c, i, b, m, o, y, t, h]
85
+ ), X = e.useMemo(
86
86
  () => ({
87
- maxWidth: k ? void 0 : `calc(100% / ${c})`,
88
- maxHeight: k ? `calc(100% / ${c})` : void 0,
89
- pointerEvents: I ? void 0 : "none",
90
- ...C
87
+ maxWidth: v ? void 0 : `calc(100% / ${c})`,
88
+ maxHeight: v ? `calc(100% / ${c})` : void 0,
89
+ pointerEvents: g ? void 0 : "none",
90
+ ...S
91
91
  }),
92
- [k, c, C, I]
93
- ), A = t ? _ : w, x = A ? /* @__PURE__ */ e.createElement("span", { className: "k-step-indicator-icon " + A, "aria-hidden": "true" }) : /* @__PURE__ */ e.createElement(
94
- T,
92
+ [v, c, S, g]
93
+ ), M = t ? B : G, C = M ? /* @__PURE__ */ e.createElement("span", { className: "k-step-indicator-icon " + M, "aria-hidden": "true" }) : /* @__PURE__ */ e.createElement(
94
+ R,
95
95
  {
96
96
  className: "k-step-indicator-icon",
97
97
  name: t ? "check-circle" : "exclamation-circle",
98
- icon: t ? B || se : G || oe
98
+ icon: t ? P || le : U || ce
99
99
  }
100
- ), J = /* @__PURE__ */ e.createElement(e.Fragment, null, S !== "labels" ? /* @__PURE__ */ e.createElement(
101
- "span",
100
+ ), Y = /* @__PURE__ */ e.createElement(e.Fragment, null, A !== "labels" ? /* @__PURE__ */ e.createElement("span", { className: "k-step-indicator", style: { transitionDuration: K + "ms" } }, l || k ? !E && t !== void 0 ? C : /* @__PURE__ */ e.createElement(
101
+ R,
102
102
  {
103
- className: "k-step-indicator",
104
- "aria-hidden": !0,
105
- style: { transitionDuration: W + "ms" }
106
- },
107
- r || h ? !N && t !== void 0 ? x : /* @__PURE__ */ e.createElement(
108
- T,
109
- {
110
- className: "k-step-indicator-icon",
111
- name: r && te(r),
112
- icon: h
113
- }
114
- ) : t !== void 0 ? x : /* @__PURE__ */ e.createElement("span", { className: "k-step-indicator-text" }, y || s + 1)
115
- ) : null), Q = (n || N || m) && /* @__PURE__ */ e.createElement("span", { className: "k-step-label" }, n && /* @__PURE__ */ e.createElement("span", { className: "k-step-text" }, n), N && t !== void 0 && x, m && /* @__PURE__ */ e.createElement("span", { className: "k-step-label-optional" }, U)), X = /* @__PURE__ */ e.createElement(e.Fragment, null, J, Q);
116
- return /* @__PURE__ */ e.createElement("li", { ref: p, className: K, style: q, ...z }, /* @__PURE__ */ e.createElement(
103
+ className: "k-step-indicator-icon",
104
+ name: l && oe(l),
105
+ icon: k
106
+ }
107
+ ) : t !== void 0 ? C : /* @__PURE__ */ e.createElement("span", { className: "k-step-indicator-text" }, p || s + 1)) : null), Z = (n || E || m) && /* @__PURE__ */ e.createElement("span", { className: "k-step-label" }, n && /* @__PURE__ */ e.createElement("span", { className: "k-step-text" }, n), E && t !== void 0 && C, m && /* @__PURE__ */ e.createElement("span", { className: "k-step-label-optional" }, j)), ee = /* @__PURE__ */ e.createElement(e.Fragment, null, Y, Z), T = L(de);
108
+ let u = n;
109
+ return u || (p ? u = `${T} ${p}` : (l || k) && (u = T)), /* @__PURE__ */ e.createElement("li", { ref: d, className: Q, style: X, ...H }, /* @__PURE__ */ e.createElement(
117
110
  "a",
118
111
  {
119
112
  className: "k-step-link",
120
113
  title: n || void 0,
121
- onClick: $,
122
- onFocus: j,
123
- "aria-current": d ? "step" : void 0,
124
- "aria-disabled": o || !I || void 0,
125
- "aria-invalid": t !== void 0 && !t || void 0
114
+ onClick: q,
115
+ onFocus: J,
116
+ "aria-current": b ? "step" : void 0,
117
+ "aria-disabled": o || !g || void 0,
118
+ "aria-invalid": t !== void 0 && !t || void 0,
119
+ "aria-label": u
126
120
  },
127
- D ? V : X
121
+ _ ? z : ee
128
122
  ));
129
123
  });
130
- L.propTypes = {
124
+ V.propTypes = {
131
125
  children: a.any,
132
126
  className: a.string,
133
127
  // content: PropTypes.any,
@@ -142,10 +136,10 @@ L.propTypes = {
142
136
  tabIndex: a.number,
143
137
  text: a.string
144
138
  };
145
- const re = {
139
+ const ue = {
146
140
  tabIndex: 0
147
141
  };
148
- L.displayName = "KendoStep";
142
+ V.displayName = "KendoStep";
149
143
  export {
150
- L as Step
144
+ V as Step
151
145
  };
@@ -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 ne=require("react"),o=require("prop-types"),se=require("./context/StepperContext.js"),p=require("@progress/kendo-react-common"),oe=require("./Step.js"),re=require("@progress/kendo-react-progressbars"),V=require("./contants.js"),ie=require("@progress/kendo-react-intl"),D=require("./messages/index.js");function ce(u){const k=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(u){for(const m in u)if(m!=="default"){const I=Object.getOwnPropertyDescriptor(u,m);Object.defineProperty(k,m,I.get?I:{enumerable:!0,get:()=>u[m]})}}return k.default=u,Object.freeze(k)}const e=ce(ne),O=e.forwardRef((u,k)=>{const{animationDuration:m,children:I,className:T,disabled:g,errorIcon:j,errorSVGIcon:_,item:w,items:b,linear:y,mode:H,orientation:C,selectOnFocus:E,style:P,successIcon:K,successSVGIcon:G,value:a=0,onChange:R,onFocus:N}=u,B=ie.useLocalization().toLanguageString(D.progBarAriaLabel,D.messages[D.progBarAriaLabel]),v=e.useRef(null),M=e.useRef(null);p.useWebMcpRegister("stepper",M,u,u.webMcp);const q=e.useCallback(()=>{v.current&&p.focusFirstFocusableChild(v.current)},[]),h=e.useCallback(()=>({element:v.current,focus:q}),[q]);e.useImperativeHandle(k,h),e.useImperativeHandle(M,h);const[U,d]=e.useState(a),f=b?b.length:0,s=C==="vertical",x=p.useDir(v,u.dir),W=typeof m=="number"?m:m!==!1?V.DEFAULT_ANIMATION_DURATION:V.NO_ANIMATION;e.useEffect(()=>{d(a)},[a]);const F=e.useCallback((c,r)=>{const t=r===a-1,n=r===a,i=r===a+1;a!==r&&R&&!g&&(!y||t||n||i)&&(p.dispatchEvent(R,c,h(),{value:r}),d(r))},[a,y,R,g,d]),J=e.useCallback(c=>{const r=c.value,t=c.syntheticEvent;F(t,r)},[F]),Q=e.useCallback(c=>{N&&!g&&p.dispatchEvent(N,c.syntheticEvent,h(),void 0)},[N,g]),S=e.useMemo(()=>{const c=x==="rtl",r=b.length-1;return new p.Navigation({root:v,selectors:["ol.k-step-list li.k-step a.k-step-link"],tabIndex:0,keyboardEvents:{keydown:{Tab:(t,n,i)=>{const l=n.elements.indexOf(t),A=n.previous(t).children[0],z=n.next(t).children[0];i.shiftKey?!c&&l>0?(i.preventDefault(),n.focusPrevious(t),d(l-1),E&&A.click()):c&&l<r&&(i.preventDefault(),n.focusNext(t),d(l+1),E&&z.click()):!c&&l<r?(i.preventDefault(),n.focusNext(t),d(l+1),E&&z.click()):c&&l>0&&(i.preventDefault(),n.focusPrevious(t),d(l-1),E&&A.click())},Home:(t,n,i)=>{i.preventDefault(),n.focusElement(n.first,t),d(0)},End:(t,n,i)=>{i.preventDefault(),n.focusElement(n.last,t),d(r)},Space:(t,n,i)=>{i.preventDefault(),t.children[0].click()},Enter:(t,n,i)=>{i.preventDefault(),t.children[0].click()}}}})},[x,b.length,d,E]);e.useEffect(()=>(S.initializeRovingTab(a),()=>S.removeFocusListener()),[]);const X=e.useCallback(S.triggerKeyboardEvent.bind(S),[]),Y=e.useMemo(()=>p.classNames("k-stepper",{"k-stepper-linear":y},T),[y,T]),Z=e.useMemo(()=>({display:"grid",gridTemplateColumns:s?void 0:"repeat("+f*2+", 1fr)",gridTemplateRows:s?"repeat("+f+", 1fr)":void 0,...P}),[s,f,P]),$=e.useMemo(()=>p.classNames("k-step-list",{"k-step-list-horizontal":!s,"k-step-list-vertical":s}),[s]),ee=e.useMemo(()=>({gridColumnStart:s?void 0:1,gridColumnEnd:s?void 0:-1,gridRowStart:s?1:void 0,gridRowEnd:s?-1:void 0}),[s]),te=e.useMemo(()=>({gridColumnStart:s?void 0:2,gridColumnEnd:s?void 0:f*2,gridRowStart:s?1:void 0,gridRowEnd:s?f:void 0,top:s?17:void 0}),[s,f]),L=b&&b.map((c,r)=>{const t={index:r,disabled:g||c.disabled,focused:r===U,current:r===a,...c},n=w||oe.Step;return e.createElement(n,{key:r,...t})});return e.createElement(se.StepperContext.Provider,{value:{animationDuration:m,isVertical:s,item:w,linear:y,mode:H,numOfSteps:f,value:a,successIcon:K,successSVGIcon:G,errorIcon:j,errorSVGIcon:_,onChange:J,onFocus:Q}},e.createElement("nav",{className:Y,style:Z,dir:x,role:"navigation",ref:v,onKeyDown:X},e.createElement("ol",{className:$,style:ee},L||I),e.createElement(re.ProgressBar,{style:te,labelPlacement:"start",animation:{duration:W},ariaLabel:B,"aria-hidden":!0,max:f-1,labelVisible:!1,orientation:C,reverse:C==="vertical",value:a,disabled:g,tabIndex:-1})))});O.propTypes={animationDuration:o.oneOfType([o.bool,o.number]),children:o.any,className:o.string,dir:o.string,disabled:o.bool,errorIcon:o.string,errorSVGIcon:p.svgIconPropType,item:o.any,items:o.any,linear:o.bool,mode:o.oneOf(["steps","labels"]),orientation:o.oneOf(["horizontal","vertical"]),style:o.object,successIcon:o.string,successSVGIcon:p.svgIconPropType,value:o.number.isRequired,onChange:o.func,onFocus:o.func};O.displayName="KendoStepper";exports.Stepper=O;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const oe=require("react"),o=require("prop-types"),re=require("./context/StepperContext.js"),p=require("@progress/kendo-react-common"),ae=require("./Step.js"),ie=require("@progress/kendo-react-progressbars"),z=require("./contants.js"),ce=require("@progress/kendo-react-intl"),k=require("./messages/index.js");function le(u){const y=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(u){for(const m in u)if(m!=="default"){const I=Object.getOwnPropertyDescriptor(u,m);Object.defineProperty(y,m,I.get?I:{enumerable:!0,get:()=>u[m]})}}return y.default=u,Object.freeze(y)}const e=le(oe),O=e.forwardRef((u,y)=>{const{animationDuration:m,children:I,className:T,disabled:g,errorIcon:_,errorSVGIcon:H,item:w,items:b,linear:E,mode:K,orientation:R,selectOnFocus:h,style:L,successIcon:G,successSVGIcon:B,value:c=0,onChange:N,onFocus:D}=u,M=ce.useLocalization(),U=M.toLanguageString(k.progressBarAriaLabel,k.messages[k.progressBarAriaLabel]),W=M.toLanguageString(k.ariaLabel,k.messages[k.ariaLabel]),v=e.useRef(null),P=e.useRef(null);p.useWebMcpRegister("stepper",P,u,u.webMcp);const q=e.useCallback(()=>{v.current&&p.focusFirstFocusableChild(v.current)},[]),S=e.useCallback(()=>({element:v.current,focus:q}),[q]);e.useImperativeHandle(y,S),e.useImperativeHandle(P,S);const[J,d]=e.useState(c),f=b?b.length:0,s=R==="vertical",x=p.useDir(v,u.dir),Q=typeof m=="number"?m:m!==!1?z.DEFAULT_ANIMATION_DURATION:z.NO_ANIMATION;e.useEffect(()=>{d(c)},[c]);const A=e.useCallback((i,r)=>{const t=r===c-1,n=r===c,a=r===c+1;c!==r&&N&&!g&&(!E||t||n||a)&&(p.dispatchEvent(N,i,S(),{value:r}),d(r))},[c,E,N,g,d]),X=e.useCallback(i=>{const r=i.value,t=i.syntheticEvent;A(t,r)},[A]),Y=e.useCallback(i=>{D&&!g&&p.dispatchEvent(D,i.syntheticEvent,S(),void 0)},[D,g]),C=e.useMemo(()=>{const i=x==="rtl",r=b.length-1;return new p.Navigation({root:v,selectors:["ol.k-step-list li.k-step a.k-step-link"],tabIndex:0,keyboardEvents:{keydown:{Tab:(t,n,a)=>{const l=n.elements.indexOf(t),V=n.previous(t).children[0],j=n.next(t).children[0];a.shiftKey?!i&&l>0?(a.preventDefault(),n.focusPrevious(t),d(l-1),h&&V.click()):i&&l<r&&(a.preventDefault(),n.focusNext(t),d(l+1),h&&j.click()):!i&&l<r?(a.preventDefault(),n.focusNext(t),d(l+1),h&&j.click()):i&&l>0&&(a.preventDefault(),n.focusPrevious(t),d(l-1),h&&V.click())},Home:(t,n,a)=>{a.preventDefault(),n.focusElement(n.first,t),d(0)},End:(t,n,a)=>{a.preventDefault(),n.focusElement(n.last,t),d(r)},Space:(t,n,a)=>{a.preventDefault(),t.children[0].click()},Enter:(t,n,a)=>{a.preventDefault(),t.children[0].click()}}}})},[x,b.length,d,h]);e.useEffect(()=>(C.initializeRovingTab(c),()=>C.removeFocusListener()),[]);const Z=e.useCallback(C.triggerKeyboardEvent.bind(C),[]),$=e.useMemo(()=>p.classNames("k-stepper",{"k-stepper-linear":E},T),[E,T]),ee=e.useMemo(()=>({display:"grid",gridTemplateColumns:s?void 0:"repeat("+f*2+", 1fr)",gridTemplateRows:s?"repeat("+f+", 1fr)":void 0,...L}),[s,f,L]),te=e.useMemo(()=>p.classNames("k-step-list",{"k-step-list-horizontal":!s,"k-step-list-vertical":s}),[s]),ne=e.useMemo(()=>({gridColumnStart:s?void 0:1,gridColumnEnd:s?void 0:-1,gridRowStart:s?1:void 0,gridRowEnd:s?-1:void 0}),[s]),se=e.useMemo(()=>({gridColumnStart:s?void 0:2,gridColumnEnd:s?void 0:f*2,gridRowStart:s?1:void 0,gridRowEnd:s?f:void 0,top:s?17:void 0}),[s,f]),F=b&&b.map((i,r)=>{const t={index:r,disabled:g||i.disabled,focused:r===J,current:r===c,...i},n=w||ae.Step;return e.createElement(n,{key:r,...t})});return e.createElement(re.StepperContext.Provider,{value:{animationDuration:m,isVertical:s,item:w,linear:E,mode:K,numOfSteps:f,value:c,successIcon:G,successSVGIcon:B,errorIcon:_,errorSVGIcon:H,onChange:X,onFocus:Y}},e.createElement("nav",{className:$,style:ee,dir:x,ref:v,onKeyDown:Z,"aria-label":W},e.createElement("ol",{className:te,style:ne},F||I),e.createElement(ie.ProgressBar,{style:se,labelPlacement:"start",animation:{duration:Q},ariaLabel:U,"aria-hidden":!0,labelVisible:!1,orientation:R,reverse:R==="vertical",value:f>1?Math.round(c/(f-1)*100):0,disabled:g,tabIndex:-1})))});O.propTypes={animationDuration:o.oneOfType([o.bool,o.number]),children:o.any,className:o.string,dir:o.string,disabled:o.bool,errorIcon:o.string,errorSVGIcon:p.svgIconPropType,item:o.any,items:o.any,linear:o.bool,mode:o.oneOf(["steps","labels"]),orientation:o.oneOf(["horizontal","vertical"]),style:o.object,successIcon:o.string,successSVGIcon:p.svgIconPropType,value:o.number.isRequired,onChange:o.func,onFocus:o.func};O.displayName="KendoStepper";exports.Stepper=O;
@@ -7,66 +7,66 @@
7
7
  */
8
8
  import * as e from "react";
9
9
  import o from "prop-types";
10
- import { StepperContext as se } from "./context/StepperContext.mjs";
11
- import { useWebMcpRegister as oe, focusFirstFocusableChild as re, useDir as ie, dispatchEvent as L, Navigation as le, classNames as A, svgIconPropType as P } from "@progress/kendo-react-common";
12
- import { Step as ae } from "./Step.mjs";
13
- import { ProgressBar as ce } from "@progress/kendo-react-progressbars";
14
- import { DEFAULT_ANIMATION_DURATION as ue, NO_ANIMATION as de } from "./contants.mjs";
15
- import { useLocalization as me } from "@progress/kendo-react-intl";
16
- import { progBarAriaLabel as V, messages as pe } from "./messages/index.mjs";
17
- const z = e.forwardRef((b, H) => {
10
+ import { StepperContext as le } from "./context/StepperContext.mjs";
11
+ import { useWebMcpRegister as ae, focusFirstFocusableChild as ce, useDir as ue, dispatchEvent as A, Navigation as de, classNames as P, svgIconPropType as V } from "@progress/kendo-react-common";
12
+ import { Step as me } from "./Step.mjs";
13
+ import { ProgressBar as pe } from "@progress/kendo-react-progressbars";
14
+ import { DEFAULT_ANIMATION_DURATION as fe, NO_ANIMATION as ge } from "./contants.mjs";
15
+ import { useLocalization as be } from "@progress/kendo-react-intl";
16
+ import { progressBarAriaLabel as z, messages as H, ariaLabel as K } from "./messages/index.mjs";
17
+ const G = e.forwardRef((v, _) => {
18
18
  const {
19
19
  animationDuration: k,
20
- children: K,
21
- className: x,
20
+ children: B,
21
+ className: N,
22
22
  disabled: m,
23
- errorIcon: G,
24
- errorSVGIcon: _,
25
- item: N,
23
+ errorIcon: U,
24
+ errorSVGIcon: j,
25
+ item: R,
26
26
  items: p,
27
27
  linear: g,
28
- mode: B,
29
- orientation: h,
30
- selectOnFocus: v,
31
- style: R,
32
- successIcon: U,
33
- successSVGIcon: j,
28
+ mode: q,
29
+ orientation: y,
30
+ selectOnFocus: b,
31
+ style: x,
32
+ successIcon: W,
33
+ successSVGIcon: J,
34
34
  value: a = 0,
35
35
  onChange: I,
36
36
  onFocus: C
37
- } = b, q = me().toLanguageString(V, pe[V]), f = e.useRef(null), D = e.useRef(null);
38
- oe("stepper", D, b, b.webMcp);
39
- const w = e.useCallback(() => {
40
- f.current && re(f.current);
37
+ } = v, D = be(), Q = D.toLanguageString(z, H[z]), X = D.toLanguageString(K, H[K]), f = e.useRef(null), w = e.useRef(null);
38
+ ae("stepper", w, v, v.webMcp);
39
+ const L = e.useCallback(() => {
40
+ f.current && ce(f.current);
41
41
  }, []), E = e.useCallback(
42
42
  () => ({
43
43
  element: f.current,
44
- focus: w
44
+ focus: L
45
45
  }),
46
- [w]
46
+ [L]
47
47
  );
48
- e.useImperativeHandle(H, E), e.useImperativeHandle(D, E);
49
- const [W, u] = e.useState(a), d = p ? p.length : 0, s = h === "vertical", S = ie(f, b.dir), J = typeof k == "number" ? k : k !== !1 ? ue : de;
48
+ e.useImperativeHandle(_, E), e.useImperativeHandle(w, E);
49
+ const [Y, u] = e.useState(a), d = p ? p.length : 0, n = y === "vertical", S = ue(f, v.dir), Z = typeof k == "number" ? k : k !== !1 ? fe : ge;
50
50
  e.useEffect(() => {
51
51
  u(a);
52
52
  }, [a]);
53
53
  const T = e.useCallback(
54
54
  (l, r) => {
55
- const t = r === a - 1, n = r === a, i = r === a + 1;
56
- a !== r && I && !m && (!g || t || n || i) && (L(I, l, E(), {
55
+ const t = r === a - 1, s = r === a, i = r === a + 1;
56
+ a !== r && I && !m && (!g || t || s || i) && (A(I, l, E(), {
57
57
  value: r
58
58
  }), u(r));
59
59
  },
60
60
  [a, g, I, m, u]
61
- ), Q = e.useCallback(
61
+ ), $ = e.useCallback(
62
62
  (l) => {
63
63
  const r = l.value, t = l.syntheticEvent;
64
64
  T(t, r);
65
65
  },
66
66
  [T]
67
- ), X = e.useCallback(
67
+ ), ee = e.useCallback(
68
68
  (l) => {
69
- C && !m && L(
69
+ C && !m && A(
70
70
  C,
71
71
  l.syntheticEvent,
72
72
  E(),
@@ -74,128 +74,127 @@ const z = e.forwardRef((b, H) => {
74
74
  );
75
75
  },
76
76
  [C, m]
77
- ), y = e.useMemo(() => {
77
+ ), h = e.useMemo(() => {
78
78
  const l = S === "rtl", r = p.length - 1;
79
- return new le({
79
+ return new de({
80
80
  root: f,
81
81
  selectors: ["ol.k-step-list li.k-step a.k-step-link"],
82
82
  tabIndex: 0,
83
83
  keyboardEvents: {
84
84
  keydown: {
85
- Tab: (t, n, i) => {
86
- const c = n.elements.indexOf(t), M = n.previous(t).children[0], O = n.next(t).children[0];
87
- i.shiftKey ? !l && c > 0 ? (i.preventDefault(), n.focusPrevious(t), u(c - 1), v && M.click()) : l && c < r && (i.preventDefault(), n.focusNext(t), u(c + 1), v && O.click()) : !l && c < r ? (i.preventDefault(), n.focusNext(t), u(c + 1), v && O.click()) : l && c > 0 && (i.preventDefault(), n.focusPrevious(t), u(c - 1), v && M.click());
85
+ Tab: (t, s, i) => {
86
+ const c = s.elements.indexOf(t), F = s.previous(t).children[0], O = s.next(t).children[0];
87
+ i.shiftKey ? !l && c > 0 ? (i.preventDefault(), s.focusPrevious(t), u(c - 1), b && F.click()) : l && c < r && (i.preventDefault(), s.focusNext(t), u(c + 1), b && O.click()) : !l && c < r ? (i.preventDefault(), s.focusNext(t), u(c + 1), b && O.click()) : l && c > 0 && (i.preventDefault(), s.focusPrevious(t), u(c - 1), b && F.click());
88
88
  },
89
- Home: (t, n, i) => {
90
- i.preventDefault(), n.focusElement(n.first, t), u(0);
89
+ Home: (t, s, i) => {
90
+ i.preventDefault(), s.focusElement(s.first, t), u(0);
91
91
  },
92
- End: (t, n, i) => {
93
- i.preventDefault(), n.focusElement(n.last, t), u(r);
92
+ End: (t, s, i) => {
93
+ i.preventDefault(), s.focusElement(s.last, t), u(r);
94
94
  },
95
- Space: (t, n, i) => {
95
+ Space: (t, s, i) => {
96
96
  i.preventDefault(), t.children[0].click();
97
97
  },
98
- Enter: (t, n, i) => {
98
+ Enter: (t, s, i) => {
99
99
  i.preventDefault(), t.children[0].click();
100
100
  }
101
101
  }
102
102
  }
103
103
  });
104
- }, [S, p.length, u, v]);
105
- e.useEffect(() => (y.initializeRovingTab(a), () => y.removeFocusListener()), []);
106
- const Y = e.useCallback(y.triggerKeyboardEvent.bind(y), []), Z = e.useMemo(
107
- () => A(
104
+ }, [S, p.length, u, b]);
105
+ e.useEffect(() => (h.initializeRovingTab(a), () => h.removeFocusListener()), []);
106
+ const te = e.useCallback(h.triggerKeyboardEvent.bind(h), []), se = e.useMemo(
107
+ () => P(
108
108
  "k-stepper",
109
109
  {
110
110
  "k-stepper-linear": g
111
111
  },
112
- x
112
+ N
113
113
  ),
114
- [g, x]
115
- ), $ = e.useMemo(
114
+ [g, N]
115
+ ), ne = e.useMemo(
116
116
  () => ({
117
117
  display: "grid",
118
- gridTemplateColumns: s ? void 0 : "repeat(" + d * 2 + ", 1fr)",
119
- gridTemplateRows: s ? "repeat(" + d + ", 1fr)" : void 0,
120
- ...R
118
+ gridTemplateColumns: n ? void 0 : "repeat(" + d * 2 + ", 1fr)",
119
+ gridTemplateRows: n ? "repeat(" + d + ", 1fr)" : void 0,
120
+ ...x
121
121
  }),
122
- [s, d, R]
123
- ), ee = e.useMemo(
124
- () => A("k-step-list", {
125
- "k-step-list-horizontal": !s,
126
- "k-step-list-vertical": s
122
+ [n, d, x]
123
+ ), oe = e.useMemo(
124
+ () => P("k-step-list", {
125
+ "k-step-list-horizontal": !n,
126
+ "k-step-list-vertical": n
127
127
  }),
128
- [s]
129
- ), te = e.useMemo(
128
+ [n]
129
+ ), re = e.useMemo(
130
130
  () => ({
131
- gridColumnStart: s ? void 0 : 1,
132
- gridColumnEnd: s ? void 0 : -1,
133
- gridRowStart: s ? 1 : void 0,
134
- gridRowEnd: s ? -1 : void 0
131
+ gridColumnStart: n ? void 0 : 1,
132
+ gridColumnEnd: n ? void 0 : -1,
133
+ gridRowStart: n ? 1 : void 0,
134
+ gridRowEnd: n ? -1 : void 0
135
135
  }),
136
- [s]
137
- ), ne = e.useMemo(
136
+ [n]
137
+ ), ie = e.useMemo(
138
138
  () => ({
139
- gridColumnStart: s ? void 0 : 2,
140
- gridColumnEnd: s ? void 0 : d * 2,
141
- gridRowStart: s ? 1 : void 0,
142
- gridRowEnd: s ? d : void 0,
143
- top: s ? 17 : void 0
139
+ gridColumnStart: n ? void 0 : 2,
140
+ gridColumnEnd: n ? void 0 : d * 2,
141
+ gridRowStart: n ? 1 : void 0,
142
+ gridRowEnd: n ? d : void 0,
143
+ top: n ? 17 : void 0
144
144
  }),
145
- [s, d]
146
- ), F = p && p.map((l, r) => {
145
+ [n, d]
146
+ ), M = p && p.map((l, r) => {
147
147
  const t = {
148
148
  index: r,
149
149
  disabled: m || l.disabled,
150
- focused: r === W,
150
+ focused: r === Y,
151
151
  current: r === a,
152
152
  ...l
153
- }, n = N || ae;
154
- return /* @__PURE__ */ e.createElement(n, { key: r, ...t });
153
+ }, s = R || me;
154
+ return /* @__PURE__ */ e.createElement(s, { key: r, ...t });
155
155
  });
156
156
  return /* @__PURE__ */ e.createElement(
157
- se.Provider,
157
+ le.Provider,
158
158
  {
159
159
  value: {
160
160
  animationDuration: k,
161
- isVertical: s,
162
- item: N,
161
+ isVertical: n,
162
+ item: R,
163
163
  linear: g,
164
- mode: B,
164
+ mode: q,
165
165
  numOfSteps: d,
166
166
  value: a,
167
- successIcon: U,
168
- successSVGIcon: j,
169
- errorIcon: G,
170
- errorSVGIcon: _,
171
- onChange: Q,
172
- onFocus: X
167
+ successIcon: W,
168
+ successSVGIcon: J,
169
+ errorIcon: U,
170
+ errorSVGIcon: j,
171
+ onChange: $,
172
+ onFocus: ee
173
173
  }
174
174
  },
175
175
  /* @__PURE__ */ e.createElement(
176
176
  "nav",
177
177
  {
178
- className: Z,
179
- style: $,
178
+ className: se,
179
+ style: ne,
180
180
  dir: S,
181
- role: "navigation",
182
181
  ref: f,
183
- onKeyDown: Y
182
+ onKeyDown: te,
183
+ "aria-label": X
184
184
  },
185
- /* @__PURE__ */ e.createElement("ol", { className: ee, style: te }, F || K),
185
+ /* @__PURE__ */ e.createElement("ol", { className: oe, style: re }, M || B),
186
186
  /* @__PURE__ */ e.createElement(
187
- ce,
187
+ pe,
188
188
  {
189
- style: ne,
189
+ style: ie,
190
190
  labelPlacement: "start",
191
- animation: { duration: J },
192
- ariaLabel: q,
191
+ animation: { duration: Z },
192
+ ariaLabel: Q,
193
193
  "aria-hidden": !0,
194
- max: d - 1,
195
194
  labelVisible: !1,
196
- orientation: h,
197
- reverse: h === "vertical",
198
- value: a,
195
+ orientation: y,
196
+ reverse: y === "vertical",
197
+ value: d > 1 ? Math.round(a / (d - 1) * 100) : 0,
199
198
  disabled: m,
200
199
  tabIndex: -1
201
200
  }
@@ -203,14 +202,14 @@ const z = e.forwardRef((b, H) => {
203
202
  )
204
203
  );
205
204
  });
206
- z.propTypes = {
205
+ G.propTypes = {
207
206
  animationDuration: o.oneOfType([o.bool, o.number]),
208
207
  children: o.any,
209
208
  className: o.string,
210
209
  dir: o.string,
211
210
  disabled: o.bool,
212
211
  errorIcon: o.string,
213
- errorSVGIcon: P,
212
+ errorSVGIcon: V,
214
213
  item: o.any,
215
214
  items: o.any,
216
215
  linear: o.bool,
@@ -218,12 +217,12 @@ z.propTypes = {
218
217
  orientation: o.oneOf(["horizontal", "vertical"]),
219
218
  style: o.object,
220
219
  successIcon: o.string,
221
- successSVGIcon: P,
220
+ successSVGIcon: V,
222
221
  value: o.number.isRequired,
223
222
  onChange: o.func,
224
223
  onFocus: o.func
225
224
  };
226
- z.displayName = "KendoStepper";
225
+ G.displayName = "KendoStepper";
227
226
  export {
228
- z as Stepper
227
+ G as Stepper
229
228
  };
@@ -12,11 +12,21 @@ export declare const optionalText = "stepper.optionalText";
12
12
  /**
13
13
  * @hidden
14
14
  */
15
- export declare const progBarAriaLabel = "stepper.progBarAriaLabel";
15
+ export declare const progressBarAriaLabel = "stepper.progressBarAriaLabel";
16
+ /**
17
+ * @hidden
18
+ */
19
+ export declare const ariaLabel = "stepper.ariaLabel";
20
+ /**
21
+ * @hidden
22
+ */
23
+ export declare const stepAriaLabel = "stepper.stepAriaLabel";
16
24
  /**
17
25
  * @hidden
18
26
  */
19
27
  export declare const messages: {
20
28
  "stepper.optionalText": string;
21
- "stepper.progBarAriaLabel": string;
29
+ "stepper.progressBarAriaLabel": string;
30
+ "stepper.ariaLabel": string;
31
+ "stepper.stepAriaLabel": string;
22
32
  };
@@ -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 e="stepper.optionalText",a="stepper.progBarAriaLabel",o={[e]:"(Optional)",[a]:"progressbar"};exports.messages=o;exports.optionalText=e;exports.progBarAriaLabel=a;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="stepper.optionalText",a="stepper.progressBarAriaLabel",r="stepper.ariaLabel",s="stepper.stepAriaLabel",t={[e]:"(Optional)",[a]:"progressbar",[r]:"Stepper",[s]:"Step"};exports.ariaLabel=r;exports.messages=t;exports.optionalText=e;exports.progressBarAriaLabel=a;exports.stepAriaLabel=s;
@@ -5,12 +5,16 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- const e = "stepper.optionalText", o = "stepper.progBarAriaLabel", r = {
8
+ const e = "stepper.optionalText", a = "stepper.progressBarAriaLabel", r = "stepper.ariaLabel", p = "stepper.stepAriaLabel", s = {
9
9
  [e]: "(Optional)",
10
- [o]: "progressbar"
10
+ [a]: "progressbar",
11
+ [r]: "Stepper",
12
+ [p]: "Step"
11
13
  };
12
14
  export {
13
- r as messages,
15
+ r as ariaLabel,
16
+ s as messages,
14
17
  e as optionalText,
15
- o as progBarAriaLabel
18
+ a as progressBarAriaLabel,
19
+ p as stepAriaLabel
16
20
  };