@progress/kendo-react-layout 8.1.0-develop.9 → 8.1.1-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.
@@ -6,14 +6,14 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as a from "react";
10
- import { Keys as n, classNames as m, Draggable as v, IconWrap as g } from "@progress/kendo-react-common";
11
- import { caretAltLeftIcon as c, caretAltRightIcon as h, caretAltDownIcon as b, caretAltUpIcon as d } from "@progress/kendo-svg-icons";
12
- class k extends a.Component {
13
- constructor(o) {
14
- super(o), this.draggable = null, this.onDrag = (t, e, l) => {
15
- const { event: s } = t, { onDrag: i, index: r } = this.props, p = this.draggable && this.draggable.element;
16
- p && !this.isStatic && this.isDraggable && i(s, p, r, e, l);
9
+ import * as o from "react";
10
+ import { Navigation as d, classNames as f, Draggable as u, IconWrap as g } from "@progress/kendo-react-common";
11
+ import { caretAltLeftIcon as n, caretAltRightIcon as p, caretAltDownIcon as h, caretAltUpIcon as b } from "@progress/kendo-svg-icons";
12
+ class v extends o.Component {
13
+ constructor(a) {
14
+ super(a), this.draggable = null, this.spliterBarRef = o.createRef(), this.onDrag = (s, e, l) => {
15
+ const { event: i } = s, { onDrag: r, index: t } = this.props, c = this.draggable && this.draggable.element;
16
+ c && !this.isStatic && this.isDraggable && r(i, c, t, e, l);
17
17
  }, this.onFocus = () => {
18
18
  this.setState({
19
19
  focused: !0
@@ -22,62 +22,88 @@ class k extends a.Component {
22
22
  this.setState({
23
23
  focused: !1
24
24
  });
25
- }, this.onToggle = (t) => {
26
- const { onToggle: e, index: l, prev: s, next: i } = this.props;
27
- (s.collapsible || i.collapsible) && e(s.collapsible ? l : l + 1, t);
28
- }, this.onPrevToggle = (t) => {
29
- const { onToggle: e, index: l, prev: s } = this.props;
30
- s.collapsible && e(l, t);
31
- }, this.onNextToggle = (t) => {
32
- const { onToggle: e, index: l, next: s } = this.props;
33
- s.collapsible && e(l + 1, t);
34
- }, this.onKeyDown = (t) => {
35
- const e = t && t.keyCode, l = this.isHorizontal, { index: s } = this.props, i = this.draggable && this.draggable.element, r = (p, f, u) => {
36
- t.preventDefault(), this.props.onKeyboardResize(p, f, u, t);
37
- };
38
- i && (e === n.enter ? (t.preventDefault(), this.onToggle(t)) : this.isDraggable && (l && e === n.left ? r(i, s, -10) : l && e === n.right ? r(i, s, 10) : !l && e === n.up ? r(i, s, -10) : !l && e === n.down && r(i, s, 10)));
25
+ }, this.onToggle = (s) => {
26
+ const { onToggle: e, index: l, prev: i, next: r } = this.props;
27
+ (i.collapsible || r.collapsible) && e(i.collapsible ? l : l + 1, s);
28
+ }, this.onPrevToggle = (s) => {
29
+ const { onToggle: e, index: l, prev: i } = this.props;
30
+ i.collapsible && e(l, s);
31
+ }, this.onNextToggle = (s) => {
32
+ const { onToggle: e, index: l, next: i } = this.props;
33
+ i.collapsible && e(l + 1, s);
34
+ }, this.onKeyDown = (s) => {
35
+ this.navigation.triggerKeyboardEvent(s);
39
36
  }, this.state = {
40
37
  focused: !1
41
38
  };
42
39
  }
43
40
  get isStatic() {
44
- const { prev: o, next: t } = this.props, e = o.resizable && t.resizable, l = o.collapsible || t.collapsible;
41
+ const { prev: a, next: s } = this.props, e = a.resizable && s.resizable, l = a.collapsible || s.collapsible;
45
42
  return !e && !l;
46
43
  }
47
44
  get isDraggable() {
48
- const { prev: o, next: t } = this.props, e = o.resizable && t.resizable, l = o.collapsed || t.collapsed;
45
+ const { prev: a, next: s } = this.props, e = a.resizable && s.resizable, l = a.collapsed || s.collapsed;
49
46
  return !!e && !l;
50
47
  }
51
48
  get isHorizontal() {
52
49
  return this.props.orientation === "horizontal";
53
50
  }
51
+ /** @hidden */
52
+ componentDidMount() {
53
+ const a = this.draggable && this.draggable.element, { index: s, onKeyboardResize: e } = this.props, l = this.isHorizontal;
54
+ a && (this.navigation = new d({
55
+ tabIndex: 0,
56
+ root: this.spliterBarRef,
57
+ selectors: [".k-splitter .k-splitbar"],
58
+ keyboardEvents: {
59
+ keydown: {
60
+ ArrowLeft: (i, r, t) => {
61
+ l && (t.preventDefault(), this.isDraggable && e(a, s, -10, t), (t.metaKey || t.ctrlKey) && (e(a, s, 0, t), this.isDraggable ? this.onPrevToggle(t) : this.onNextToggle(t)));
62
+ },
63
+ ArrowRight: (i, r, t) => {
64
+ l && (t.preventDefault(), this.isDraggable && e(a, s, 10, t), (t.metaKey || t.ctrlKey) && (e(a, s, 0, t), this.isDraggable ? this.onNextToggle(t) : this.onPrevToggle(t)));
65
+ },
66
+ ArrowDown: (i, r, t) => {
67
+ l || (t.preventDefault(), this.isDraggable && e(a, s, 10, t), (t.metaKey || t.ctrlKey) && (e(a, s, 0, t), this.isDraggable ? this.onNextToggle(t) : this.onPrevToggle(t)));
68
+ },
69
+ ArrowUp: (i, r, t) => {
70
+ l || (t.preventDefault(), this.isDraggable && e(a, s, -10, t), (t.metaKey || t.ctrlKey) && (e(a, s, 0, t), this.isDraggable ? this.onPrevToggle(t) : this.onNextToggle(t)));
71
+ },
72
+ Enter: (i, r, t) => {
73
+ t.preventDefault(), this.onToggle(t);
74
+ }
75
+ }
76
+ }
77
+ }));
78
+ }
54
79
  render() {
55
- const o = this.isDraggable, t = this.isStatic, e = this.isHorizontal, l = m(
80
+ const a = this.isDraggable, s = this.isStatic, e = this.isHorizontal, l = f(
56
81
  "k-splitbar",
57
82
  {
58
83
  "k-focus": this.state.focused,
59
84
  "k-splitbar-horizontal": e,
60
85
  "k-splitbar-vertical": !e,
61
- "k-splitbar-draggable-horizontal": e && o,
62
- "k-splitbar-draggable-vertical": !e && o,
63
- "k-splitbar-static-horizontal": e && t,
64
- "k-splitbar-static-vertical": !e && t
86
+ "k-splitbar-draggable-horizontal": e && a,
87
+ "k-splitbar-draggable-vertical": !e && a,
88
+ "k-splitbar-static-horizontal": e && s,
89
+ "k-splitbar-static-vertical": !e && s
65
90
  }
66
91
  );
67
- return /* @__PURE__ */ a.createElement(
68
- v,
92
+ return /* @__PURE__ */ o.createElement(
93
+ u,
69
94
  {
70
- onPress: (s) => this.onDrag(s, !0, !1),
71
- onDrag: (s) => this.onDrag(s, !1, !1),
72
- onRelease: (s) => this.onDrag(s, !1, !0),
73
- ref: (s) => {
74
- this.draggable = s;
95
+ onPress: (i) => this.onDrag(i, !0, !1),
96
+ onDrag: (i) => this.onDrag(i, !1, !1),
97
+ onRelease: (i) => this.onDrag(i, !1, !0),
98
+ ref: (i) => {
99
+ this.draggable = i;
75
100
  }
76
101
  },
77
- /* @__PURE__ */ a.createElement(
102
+ /* @__PURE__ */ o.createElement(
78
103
  "div",
79
104
  {
80
- tabIndex: t ? -1 : 0,
105
+ ref: this.spliterBarRef,
106
+ tabIndex: s ? -1 : 0,
81
107
  role: "separator",
82
108
  "aria-valuenow": 0,
83
109
  "aria-label": this.props.ariaLabel,
@@ -89,33 +115,33 @@ class k extends a.Component {
89
115
  onDoubleClick: this.onToggle,
90
116
  onKeyDown: this.onKeyDown
91
117
  },
92
- this.props.prev.collapsible && /* @__PURE__ */ a.createElement(
118
+ this.props.prev.collapsible && /* @__PURE__ */ o.createElement(
93
119
  "div",
94
120
  {
95
121
  className: "k-collapse-prev",
96
122
  onClick: this.onPrevToggle
97
123
  },
98
- /* @__PURE__ */ a.createElement(
124
+ /* @__PURE__ */ o.createElement(
99
125
  g,
100
126
  {
101
127
  name: this.props.prev.collapsible ? e ? this.props.prev.collapsed ? this.props.isRtl ? "caret-alt-left" : "caret-alt-right" : this.props.isRtl ? "caret-alt-right" : "caret-alt-left" : this.props.prev.collapsed ? "caret-alt-down" : "caret-alt-up" : void 0,
102
- icon: this.props.prev.collapsible ? e ? this.props.prev.collapsed ? this.props.isRtl ? c : h : this.props.isRtl ? h : c : this.props.prev.collapsed ? b : d : void 0,
128
+ icon: this.props.prev.collapsible ? e ? this.props.prev.collapsed ? this.props.isRtl ? n : p : this.props.isRtl ? p : n : this.props.prev.collapsed ? h : b : void 0,
103
129
  size: "xsmall"
104
130
  }
105
131
  )
106
132
  ),
107
- /* @__PURE__ */ a.createElement("div", { className: "k-resize-handle" }),
108
- this.props.next.collapsible && /* @__PURE__ */ a.createElement(
133
+ /* @__PURE__ */ o.createElement("div", { className: "k-resize-handle" }),
134
+ this.props.next.collapsible && /* @__PURE__ */ o.createElement(
109
135
  "div",
110
136
  {
111
137
  className: "k-collapse-next",
112
138
  onClick: this.onNextToggle
113
139
  },
114
- /* @__PURE__ */ a.createElement(
140
+ /* @__PURE__ */ o.createElement(
115
141
  g,
116
142
  {
117
143
  name: this.props.next.collapsible ? e ? this.props.next.collapsed ? this.props.isRtl ? "caret-alt-right" : "caret-alt-left" : this.props.isRtl ? "caret-alt-left" : "caret-alt-right" : this.props.next.collapsed ? "caret-alt-up" : "caret-alt-down" : void 0,
118
- icon: this.props.next.collapsible ? e ? this.props.next.collapsed ? this.props.isRtl ? h : c : this.props.isRtl ? c : h : this.props.next.collapsed ? d : b : void 0,
144
+ icon: this.props.next.collapsible ? e ? this.props.next.collapsed ? this.props.isRtl ? p : n : this.props.isRtl ? n : p : this.props.next.collapsed ? b : h : void 0,
119
145
  size: "xsmall"
120
146
  }
121
147
  )
@@ -125,5 +151,5 @@ class k extends a.Component {
125
151
  }
126
152
  }
127
153
  export {
128
- k as SplitterBar
154
+ v as SplitterBar
129
155
  };
@@ -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 j=require("react"),n=require("prop-types"),O=require("../package-metadata.js"),d=require("@progress/kendo-react-common");function z(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const c in t)if(c!=="default"){const l=Object.getOwnPropertyDescriptor(t,c);Object.defineProperty(s,c,l.get?l:{enumerable:!0,get:()=>t[c]})}}return s.default=t,Object.freeze(s)}const i=z(j),g=i.forwardRef((t,s)=>{d.validatePackage(O.packageMetadata);const c=i.useRef(null),l=i.useCallback(()=>({element:c.current}),[]);i.useImperativeHandle(s,l);const{className:m,style:f,id:y,children:k}=t,h=d.useId(),r=i.useMemo(()=>t.orientation||u.orientation,[t.orientation]),e=r==="horizontal",a=i.useMemo(()=>t.align&&t.align.horizontal?t.align.horizontal:u.hAlign,[t.align]),o=i.useMemo(()=>t.align&&t.align.vertical?t.align.vertical:u.vAlign,[t.align]),b=i.useMemo(()=>d.classNames("k-stack-layout",{"k-hstack":r==="horizontal","k-vstack":r==="vertical","k-justify-content-start":e&&a==="start"||!e&&o==="top","k-justify-content-center":e&&a==="center"||!e&&o==="middle","k-justify-content-end":e&&a==="end"||!e&&o==="bottom","k-justify-content-stretch":e&&a==="stretch"||!e&&o==="stretch","k-align-items-start":!e&&a==="start"||e&&o==="top","k-align-items-center":!e&&a==="center"||e&&o==="middle","k-align-items-end":!e&&a==="end"||e&&o==="bottom","k-align-items-stretch":!e&&a==="stretch"||e&&o==="stretch"},m),[r,e,a,o,m]),v={gap:`${typeof t.gap=="number"?t.gap+"px":t.gap}`,...f};return i.createElement("div",{ref:c,className:b,style:v,id:y||h},k)}),u={orientation:"horizontal",hAlign:"stretch",vAlign:"stretch"};g.propTypes={className:n.string,style:n.object,children:n.any,id:n.string,orientation:n.oneOf(["horizontal","vertical"]),gap:n.oneOfType([n.string,n.number]),align:n.shape({vertical:n.oneOf(["top","middle","bottom","stretch"]),horizontal:n.oneOf(["start","center","end","stretch"])})};g.defaultProps=u;g.displayName="KendoReactStackLayout";exports.StackLayout=g;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("react"),n=require("prop-types"),O=require("../package-metadata.js"),u=require("@progress/kendo-react-common");function z(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const c in t)if(c!=="default"){const l=Object.getOwnPropertyDescriptor(t,c);Object.defineProperty(s,c,l.get?l:{enumerable:!0,get:()=>t[c]})}}return s.default=t,Object.freeze(s)}const i=z(j),d=i.forwardRef((t,s)=>{u.validatePackage(O.packageMetadata);const c=i.useRef(null),l=i.useCallback(()=>({element:c.current}),[]);i.useImperativeHandle(s,l);const{className:m,style:y,id:f,children:k}=t,h=u.useId(),r=i.useMemo(()=>t.orientation||g.orientation,[t.orientation]),e=r==="horizontal",a=i.useMemo(()=>t.align&&t.align.horizontal?t.align.horizontal:g.hAlign,[t.align]),o=i.useMemo(()=>t.align&&t.align.vertical?t.align.vertical:g.vAlign,[t.align]),b=i.useMemo(()=>u.classNames("k-stack-layout",{"k-hstack":r==="horizontal","k-vstack":r==="vertical","k-justify-content-start":e&&a==="start"||!e&&o==="top","k-justify-content-center":e&&a==="center"||!e&&o==="middle","k-justify-content-end":e&&a==="end"||!e&&o==="bottom","k-justify-content-stretch":e&&a==="stretch"||!e&&o==="stretch","k-align-items-start":!e&&a==="start"||e&&o==="top","k-align-items-center":!e&&a==="center"||e&&o==="middle","k-align-items-end":!e&&a==="end"||e&&o==="bottom","k-align-items-stretch":!e&&a==="stretch"||e&&o==="stretch"},m),[r,e,a,o,m]),v={gap:`${typeof t.gap=="number"?t.gap+"px":t.gap}`,...y};return i.createElement("div",{ref:c,className:b,style:v,id:f||h},k)}),g={orientation:"horizontal",hAlign:"stretch",vAlign:"stretch"};d.propTypes={className:n.string,style:n.object,children:n.any,id:n.string,orientation:n.oneOf(["horizontal","vertical"]),gap:n.oneOfType([n.string,n.number]),align:n.shape({vertical:n.oneOf(["top","middle","bottom","stretch"]),horizontal:n.oneOf(["start","center","end","stretch"])})};d.displayName="KendoReactStackLayout";exports.StackLayout=d;
@@ -10,16 +10,16 @@ import * as o from "react";
10
10
  import n from "prop-types";
11
11
  import { packageMetadata as z } from "../package-metadata.mjs";
12
12
  import { validatePackage as b, useId as A, classNames as j } from "@progress/kendo-react-common";
13
- const c = o.forwardRef((e, g) => {
13
+ const m = o.forwardRef((e, g) => {
14
14
  b(z);
15
- const r = o.useRef(null), d = o.useCallback(
15
+ const c = o.useRef(null), d = o.useCallback(
16
16
  () => ({
17
- element: r.current
17
+ element: c.current
18
18
  }),
19
19
  []
20
20
  );
21
21
  o.useImperativeHandle(g, d);
22
- const { className: m, style: u, id: h, children: k } = e, f = A(), s = o.useMemo(
22
+ const { className: r, style: u, id: h, children: k } = e, y = A(), s = o.useMemo(
23
23
  () => e.orientation || l.orientation,
24
24
  [e.orientation]
25
25
  ), t = s === "horizontal", a = o.useMemo(
@@ -28,7 +28,7 @@ const c = o.forwardRef((e, g) => {
28
28
  ), i = o.useMemo(
29
29
  () => e.align && e.align.vertical ? e.align.vertical : l.vAlign,
30
30
  [e.align]
31
- ), y = o.useMemo(
31
+ ), f = o.useMemo(
32
32
  () => j(
33
33
  "k-stack-layout",
34
34
  {
@@ -43,9 +43,9 @@ const c = o.forwardRef((e, g) => {
43
43
  "k-align-items-end": !t && a === "end" || t && i === "bottom",
44
44
  "k-align-items-stretch": !t && a === "stretch" || t && i === "stretch"
45
45
  },
46
- m
46
+ r
47
47
  ),
48
- [s, t, a, i, m]
48
+ [s, t, a, i, r]
49
49
  ), v = {
50
50
  gap: `${typeof e.gap == "number" ? e.gap + "px" : e.gap}`,
51
51
  ...u
@@ -53,10 +53,10 @@ const c = o.forwardRef((e, g) => {
53
53
  return /* @__PURE__ */ o.createElement(
54
54
  "div",
55
55
  {
56
- ref: r,
57
- className: y,
56
+ ref: c,
57
+ className: f,
58
58
  style: v,
59
- id: h || f
59
+ id: h || y
60
60
  },
61
61
  k
62
62
  );
@@ -65,7 +65,7 @@ const c = o.forwardRef((e, g) => {
65
65
  hAlign: "stretch",
66
66
  vAlign: "stretch"
67
67
  };
68
- c.propTypes = {
68
+ m.propTypes = {
69
69
  className: n.string,
70
70
  style: n.object,
71
71
  children: n.any,
@@ -77,8 +77,7 @@ c.propTypes = {
77
77
  horizontal: n.oneOf(["start", "center", "end", "stretch"])
78
78
  })
79
79
  };
80
- c.defaultProps = l;
81
- c.displayName = "KendoReactStackLayout";
80
+ m.displayName = "KendoReactStackLayout";
82
81
  export {
83
- c as StackLayout
82
+ m as StackLayout
84
83
  };
package/stepper/Step.js CHANGED
@@ -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 te=require("react"),n=require("prop-types"),ne=require("./context/StepperContext.js"),c=require("@progress/kendo-react-common"),ae=require("@progress/kendo-react-intl"),D=require("@progress/kendo-svg-icons"),L=require("./contants.js"),P=require("./messages/index.js");function se(s){const p=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const l in s)if(l!=="default"){const m=Object.getOwnPropertyDescriptor(s,l);Object.defineProperty(p,l,m.get?m:{enumerable:!0,get:()=>s[l]})}}return p.default=s,Object.freeze(p)}const e=se(te),v=e.forwardRef((s,p)=>{const{children:l,className:m,current:I,disabled:o,focused:g,icon:b,svgIcon:M,index:a,isValid:t,label:i,optional:k,style:T,tabIndex:q,text:F,..._}=s,{animationDuration:N,isVertical:x,item:z,linear:V,mode:R,numOfSteps:r,value:u,onChange:E,onFocus:C,successIcon:w,errorIcon:H,successSVGIcon:W,errorSVGIcon:$}=e.useContext(ne.StepperContext),f=e.useRef(null),A=e.useCallback(()=>{f.current&&c.focusFirstFocusableChild(f.current)},[]),S=e.useCallback(()=>({element:f.current,focus:A}),[A]);e.useImperativeHandle(p,S);const h=!V||a===u-1||a===u||a===u+1,y=R==="labels"||!!b&&!!i,B=ae.useLocalization(),G=(d=>B.toLanguageString(d,P.messages[d]))(P.optionalText),U=typeof N=="number"?N:N!==!1?L.DEFAULT_ANIMATION_DURATION:L.NO_ANIMATION,K=e.useCallback(d=>{E&&!o&&c.dispatchEvent(E,d,S(),{value:a})},[E,u,o]),J=e.useCallback(d=>{C&&!o&&c.dispatchEvent(C,d,S(),void 0)},[C,o]),Q=e.useMemo(()=>c.classNames("k-step",{"k-step-first":a===0,"k-step-last":r&&a===r-1,"k-step-done":a<u,"k-step-current":I,"k-step-optional":k,"k-step-error":t!==void 0&&!t,"k-step-success":t},{"k-disabled":o,"k-focus":g},m),[a,r,u,I,k,o,g,t,m]),X=e.useMemo(()=>({maxWidth:x?void 0:`calc(100% / ${r})`,maxHeight:x?`calc(100% / ${r})`:void 0,pointerEvents:h?void 0:"none",...T}),[x,r,T,h]),j=t?w:H,O=j?e.createElement("span",{className:"k-step-indicator-icon "+j,"aria-hidden":"true"}):e.createElement(c.IconWrap,{className:"k-step-indicator-icon",name:t?"check-circle":"exclamation-circle",icon:t?W||D.checkOutlineIcon:$||D.exclamationCircleIcon}),Y=e.createElement(e.Fragment,null,R!=="labels"?e.createElement("span",{className:"k-step-indicator","aria-hidden":!0,style:{transitionDuration:U+"ms"}},b||M?!y&&t!==void 0?O:e.createElement(c.IconWrap,{className:"k-step-indicator-icon",name:b&&c.toIconName(b),icon:M}):t!==void 0?O:e.createElement("span",{className:"k-step-indicator-text"},F||a+1)):null),Z=(i||y||k)&&e.createElement("span",{className:"k-step-label"},i&&e.createElement("span",{className:"k-step-text"},i),y&&t!==void 0&&O,k&&e.createElement("span",{className:"k-step-label-optional"},G)),ee=e.createElement(e.Fragment,null,Y,Z);return e.createElement("li",{ref:f,className:Q,style:X,..._},e.createElement("a",{className:"k-step-link",title:i||void 0,onClick:K,onFocus:J,tabIndex:q||(g?0:-1),"aria-current":I,"aria-disabled":o||!h||void 0,"aria-invalid":t!==void 0&&!t||void 0},z?l:ee))});v.propTypes={children:n.any,className:n.string,current:n.bool,disabled:n.bool,icon:n.string,index:n.number,isValid:n.bool,label:n.string,optional:n.bool,style:n.object,tabIndex:n.number,text:n.string};const oe={tabIndex:0};v.defaultProps=oe;v.displayName="KendoStep";exports.Step=v;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ee=require("react"),n=require("prop-types"),te=require("./context/StepperContext.js"),c=require("@progress/kendo-react-common"),ne=require("@progress/kendo-react-intl"),j=require("@progress/kendo-svg-icons"),D=require("./contants.js"),L=require("./messages/index.js");function ae(s){const p=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const i in s)if(i!=="default"){const m=Object.getOwnPropertyDescriptor(s,i);Object.defineProperty(p,i,m.get?m:{enumerable:!0,get:()=>s[i]})}}return p.default=s,Object.freeze(p)}const e=ae(ee),y=e.forwardRef((s,p)=>{const{children:i,className:m,current:v,disabled:o,focused:O,icon:b,svgIcon:M,index:a,isValid:t,label:l,optional:k,style:T,tabIndex:oe=se.tabIndex,text:q,..._}=s,{animationDuration:I,isVertical:g,item:z,linear:P,mode:F,numOfSteps:r,value:d,onChange:N,onFocus:x,successIcon:V,errorIcon:w,successSVGIcon:H,errorSVGIcon:W}=e.useContext(te.StepperContext),f=e.useRef(null),R=e.useCallback(()=>{f.current&&c.focusFirstFocusableChild(f.current)},[]),E=e.useCallback(()=>({element:f.current,focus:R}),[R]);e.useImperativeHandle(p,E);const C=!P||a===d-1||a===d||a===d+1,S=F==="labels"||!!b&&!!l,$=ne.useLocalization(),B=(u=>$.toLanguageString(u,L.messages[u]))(L.optionalText),G=typeof I=="number"?I:I!==!1?D.DEFAULT_ANIMATION_DURATION:D.NO_ANIMATION,U=e.useCallback(u=>{N&&!o&&c.dispatchEvent(N,u,E(),{value:a})},[N,d,o]),K=e.useCallback(u=>{x&&!o&&c.dispatchEvent(x,u,E(),void 0)},[x,o]),J=e.useMemo(()=>c.classNames("k-step",{"k-step-first":a===0,"k-step-last":r&&a===r-1,"k-step-done":a<d,"k-step-current":v,"k-step-optional":k,"k-step-error":t!==void 0&&!t,"k-step-success":t,"k-disabled":o,"k-focus":O},m),[a,r,d,v,k,o,O,t,m]),Q=e.useMemo(()=>({maxWidth:g?void 0:`calc(100% / ${r})`,maxHeight:g?`calc(100% / ${r})`:void 0,pointerEvents:C?void 0:"none",...T}),[g,r,T,C]),A=t?V:w,h=A?e.createElement("span",{className:"k-step-indicator-icon "+A,"aria-hidden":"true"}):e.createElement(c.IconWrap,{className:"k-step-indicator-icon",name:t?"check-circle":"exclamation-circle",icon:t?H||j.checkOutlineIcon:W||j.exclamationCircleIcon}),X=e.createElement(e.Fragment,null,F!=="labels"?e.createElement("span",{className:"k-step-indicator","aria-hidden":!0,style:{transitionDuration:G+"ms"}},b||M?!S&&t!==void 0?h:e.createElement(c.IconWrap,{className:"k-step-indicator-icon",name:b&&c.toIconName(b),icon:M}):t!==void 0?h:e.createElement("span",{className:"k-step-indicator-text"},q||a+1)):null),Y=(l||S||k)&&e.createElement("span",{className:"k-step-label"},l&&e.createElement("span",{className:"k-step-text"},l),S&&t!==void 0&&h,k&&e.createElement("span",{className:"k-step-label-optional"},B)),Z=e.createElement(e.Fragment,null,X,Y);return e.createElement("li",{ref:f,className:J,style:Q,..._},e.createElement("a",{className:"k-step-link",title:l||void 0,onClick:U,onFocus:K,"aria-current":v?"step":void 0,"aria-disabled":o||!C||void 0,"aria-invalid":t!==void 0&&!t||void 0},z?i:Z))});y.propTypes={children:n.any,className:n.string,current:n.bool,disabled:n.bool,icon:n.string,index:n.number,isValid:n.bool,label:n.string,optional:n.bool,style:n.object,tabIndex:n.number,text:n.string};const se={tabIndex:0};y.displayName="KendoStep";exports.Step=y;
package/stepper/Step.mjs CHANGED
@@ -8,79 +8,79 @@
8
8
  "use client";
9
9
  import * as e from "react";
10
10
  import a from "prop-types";
11
- import { StepperContext as Z } from "./context/StepperContext.mjs";
12
- import { focusFirstFocusableChild as ee, dispatchEvent as L, classNames as te, IconWrap as O, toIconName as ae } from "@progress/kendo-react-common";
13
- import { useLocalization as se } from "@progress/kendo-react-intl";
14
- import { checkOutlineIcon as ne, exclamationCircleIcon as oe } from "@progress/kendo-svg-icons";
15
- import { DEFAULT_ANIMATION_DURATION as ce, NO_ANIMATION as le } from "./contants.mjs";
16
- import { messages as ie, optionalText as re } from "./messages/index.mjs";
17
- const E = e.forwardRef((R, V) => {
11
+ import { StepperContext as Y } from "./context/StepperContext.mjs";
12
+ import { focusFirstFocusableChild as Z, dispatchEvent as M, classNames as ee, IconWrap as T, toIconName as te } from "@progress/kendo-react-common";
13
+ import { useLocalization as ae } from "@progress/kendo-react-intl";
14
+ import { checkOutlineIcon as se, exclamationCircleIcon as ne } from "@progress/kendo-svg-icons";
15
+ import { DEFAULT_ANIMATION_DURATION as oe, NO_ANIMATION as ce } from "./contants.mjs";
16
+ import { messages as le, optionalText as ie } from "./messages/index.mjs";
17
+ const L = e.forwardRef((O, R) => {
18
18
  const {
19
19
  // content
20
- children: z,
21
- className: h,
20
+ children: V,
21
+ className: g,
22
22
  current: d,
23
23
  disabled: n,
24
- focused: u,
24
+ focused: E,
25
25
  icon: r,
26
- svgIcon: C,
26
+ svgIcon: h,
27
27
  index: s,
28
28
  isValid: t,
29
29
  label: o,
30
30
  optional: m,
31
- style: y,
32
- tabIndex: S,
33
- text: F,
34
- ...D
35
- } = R, {
36
- animationDuration: k,
37
- isVertical: b,
38
- item: H,
39
- linear: P,
40
- mode: A,
31
+ style: C,
32
+ tabIndex: me = re.tabIndex,
33
+ text: y,
34
+ ...z
35
+ } = O, {
36
+ animationDuration: u,
37
+ isVertical: k,
38
+ item: D,
39
+ linear: H,
40
+ mode: S,
41
41
  numOfSteps: c,
42
42
  value: l,
43
- onChange: f,
44
- onFocus: I,
43
+ onChange: b,
44
+ onFocus: f,
45
45
  successIcon: _,
46
46
  errorIcon: w,
47
47
  successSVGIcon: B,
48
48
  errorSVGIcon: G
49
- } = e.useContext(Z), p = e.useRef(null), M = e.useCallback(
49
+ } = e.useContext(Y), p = e.useRef(null), F = e.useCallback(
50
50
  () => {
51
- p.current && ee(p.current);
51
+ p.current && Z(p.current);
52
52
  },
53
53
  []
54
54
  ), v = e.useCallback(
55
55
  () => ({
56
56
  element: p.current,
57
- focus: M
57
+ focus: F
58
58
  }),
59
- [M]
59
+ [F]
60
60
  );
61
- e.useImperativeHandle(V, v);
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(
61
+ e.useImperativeHandle(R, v);
62
+ const I = !H || s === l - 1 || s === l || s === l + 1, N = S === "labels" || !!r && !!o, P = ae(), U = ((i) => P.toLanguageString(i, le[i]))(ie), W = typeof u == "number" ? u : u !== !1 ? oe : ce, $ = e.useCallback(
63
63
  (i) => {
64
- f && !n && L(
65
- f,
64
+ b && !n && M(
65
+ b,
66
66
  i,
67
67
  v(),
68
68
  { value: s }
69
69
  );
70
70
  },
71
- [f, l, n]
72
- ), K = e.useCallback(
71
+ [b, l, n]
72
+ ), j = e.useCallback(
73
73
  (i) => {
74
- I && !n && L(
75
- I,
74
+ f && !n && M(
75
+ f,
76
76
  i,
77
77
  v(),
78
78
  void 0
79
79
  );
80
80
  },
81
- [I, n]
82
- ), q = e.useMemo(
83
- () => te(
81
+ [f, n]
82
+ ), K = e.useMemo(
83
+ () => ee(
84
84
  "k-step",
85
85
  {
86
86
  "k-step-first": s === 0,
@@ -89,70 +89,67 @@ const E = e.forwardRef((R, V) => {
89
89
  "k-step-current": d,
90
90
  "k-step-optional": m,
91
91
  "k-step-error": t !== void 0 && !t,
92
- "k-step-success": t
93
- },
94
- {
92
+ "k-step-success": t,
95
93
  "k-disabled": n,
96
- "k-focus": u
94
+ "k-focus": E
97
95
  },
98
- h
96
+ g
99
97
  ),
100
- [s, c, l, d, m, n, u, t, h]
101
- ), J = e.useMemo(
98
+ [s, c, l, d, m, n, E, t, g]
99
+ ), q = e.useMemo(
102
100
  () => ({
103
- maxWidth: b ? void 0 : `calc(100% / ${c})`,
104
- maxHeight: b ? `calc(100% / ${c})` : void 0,
105
- pointerEvents: N ? void 0 : "none",
106
- ...y
101
+ maxWidth: k ? void 0 : `calc(100% / ${c})`,
102
+ maxHeight: k ? `calc(100% / ${c})` : void 0,
103
+ pointerEvents: I ? void 0 : "none",
104
+ ...C
107
105
  }),
108
- [b, c, y, N]
109
- ), T = t ? _ : w, g = T ? /* @__PURE__ */ e.createElement(
106
+ [k, c, C, I]
107
+ ), A = t ? _ : w, x = A ? /* @__PURE__ */ e.createElement(
110
108
  "span",
111
109
  {
112
- className: "k-step-indicator-icon " + T,
110
+ className: "k-step-indicator-icon " + A,
113
111
  "aria-hidden": "true"
114
112
  }
115
113
  ) : /* @__PURE__ */ e.createElement(
116
- O,
114
+ T,
117
115
  {
118
116
  className: "k-step-indicator-icon",
119
117
  name: t ? "check-circle" : "exclamation-circle",
120
- icon: t ? B || ne : G || oe
118
+ icon: t ? B || se : G || ne
121
119
  }
122
- ), Q = /* @__PURE__ */ e.createElement(e.Fragment, null, A !== "labels" ? /* @__PURE__ */ e.createElement(
120
+ ), J = /* @__PURE__ */ e.createElement(e.Fragment, null, S !== "labels" ? /* @__PURE__ */ e.createElement(
123
121
  "span",
124
122
  {
125
123
  className: "k-step-indicator",
126
124
  "aria-hidden": !0,
127
- style: { transitionDuration: $ + "ms" }
125
+ style: { transitionDuration: W + "ms" }
128
126
  },
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);
127
+ r || h ? !N && t !== void 0 ? x : /* @__PURE__ */ e.createElement(T, { className: "k-step-indicator-icon", name: r && te(r), icon: h }) : t !== void 0 ? x : /* @__PURE__ */ e.createElement("span", { className: "k-step-indicator-text" }, y || s + 1)
128
+ ) : null), Q = (o || N || m) && /* @__PURE__ */ e.createElement("span", { className: "k-step-label" }, o && /* @__PURE__ */ e.createElement("span", { className: "k-step-text" }, o), 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);
131
129
  return /* @__PURE__ */ e.createElement(
132
130
  "li",
133
131
  {
134
132
  ref: p,
135
- className: q,
136
- style: J,
137
- ...D
133
+ className: K,
134
+ style: q,
135
+ ...z
138
136
  },
139
137
  /* @__PURE__ */ e.createElement(
140
138
  "a",
141
139
  {
142
140
  className: "k-step-link",
143
141
  title: o || void 0,
144
- onClick: j,
145
- onFocus: K,
146
- tabIndex: S || (u ? 0 : -1),
147
- "aria-current": d,
148
- "aria-disabled": n || !N || void 0,
142
+ onClick: $,
143
+ onFocus: j,
144
+ "aria-current": d ? "step" : void 0,
145
+ "aria-disabled": n || !I || void 0,
149
146
  "aria-invalid": t !== void 0 && !t || void 0
150
147
  },
151
- H ? z : Y
148
+ D ? V : X
152
149
  )
153
150
  );
154
151
  });
155
- E.propTypes = {
152
+ L.propTypes = {
156
153
  children: a.any,
157
154
  className: a.string,
158
155
  // content: PropTypes.any,
@@ -167,11 +164,10 @@ E.propTypes = {
167
164
  tabIndex: a.number,
168
165
  text: a.string
169
166
  };
170
- const me = {
167
+ const re = {
171
168
  tabIndex: 0
172
169
  };
173
- E.defaultProps = me;
174
- E.displayName = "KendoStep";
170
+ L.displayName = "KendoStep";
175
171
  export {
176
- E as Step
172
+ L as Step
177
173
  };
@@ -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(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;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Z=require("react"),l=require("prop-types"),$=require("./context/StepperContext.js"),d=require("@progress/kendo-react-common"),ee=require("./Step.js"),te=require("@progress/kendo-react-progressbars"),q=require("./contants.js"),se=require("../package-metadata.js"),ne=require("@progress/kendo-react-intl"),D=require("./messages/index.js");function oe(p){const y=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(p){for(const f in p)if(f!=="default"){const I=Object.getOwnPropertyDescriptor(p,f);Object.defineProperty(y,f,I.get?I:{enumerable:!0,get:()=>p[f]})}}return y.default=p,Object.freeze(y)}const o=oe(Z),O=o.forwardRef((p,y)=>{d.validatePackage(se.packageMetadata);const{animationDuration:f,children:I,className:w,disabled:g,errorIcon:F,errorSVGIcon:L,item:P,items:b,linear:k,mode:z,orientation:S,style:R,successIcon:V,successSVGIcon:j,value:u=0,onChange:h,onFocus:x}=p,_=ne.useLocalization().toLanguageString(D.progBarAriaLabel,D.messages[D.progBarAriaLabel]),v=o.useRef(null),T=o.useCallback(()=>{v.current&&d.focusFirstFocusableChild(v.current)},[]),C=o.useCallback(()=>({element:v.current,focus:T}),[T]);o.useImperativeHandle(y,C);const[K,c]=o.useState(u),m=b?b.length:0,s=S==="vertical",N=d.useDir(v,p.dir),G=typeof f=="number"?f:f!==!1?q.DEFAULT_ANIMATION_DURATION:q.NO_ANIMATION;o.useEffect(()=>{c(u)},[u]);const A=o.useCallback((r,i)=>{const e=i===u-1,t=i===u,a=i===u+1;u!==i&&h&&!g&&(!k||e||t||a)&&(d.dispatchEvent(h,r,C(),{value:i}),c(i))},[u,k,h,g,c]),B=o.useCallback(r=>{let i=r.value,e=r.syntheticEvent;A(e,i)},[A]),H=o.useCallback(r=>{x&&!g&&d.dispatchEvent(x,r.syntheticEvent,C(),void 0)},[x,g]),E=o.useMemo(()=>{const r=N==="rtl",i=b.length-1;return new d.Navigation({root:v,selectors:["ol.k-step-list li.k-step a.k-step-link"],tabIndex:0,keyboardEvents:{keydown:{ArrowLeft:(e,t,a)=>{a.preventDefault();const n=t.elements.indexOf(e);!s&&!r&&n>0?(t.focusPrevious(e),c(n-1)):!s&&r&&n<i&&(t.focusNext(e),c(n+1))},ArrowRight:(e,t,a)=>{a.preventDefault();const n=t.elements.indexOf(e);!s&&!r&&n<i?(t.focusNext(e),c(n+1)):!s&&r&&n>0&&(t.focusPrevious(e),c(n-1))},ArrowUp:(e,t,a)=>{a.preventDefault();const n=t.elements.indexOf(e);s&&!r&&n>0?(t.focusPrevious(e),c(n-1)):s&&r&&n>0&&(t.focusPrevious(e),c(n+1))},ArrowDown:(e,t,a)=>{a.preventDefault();const n=t.elements.indexOf(e);s&&!r&&n<i?(t.focusNext(e),c(n+1)):s&&r&&n<i&&(t.focusNext(e),c(n-1))},Tab:(e,t,a)=>{a.preventDefault();const n=t.elements.indexOf(e);a.shiftKey?!s&&!r&&n>0?(t.focusPrevious(e),c(n-1)):!s&&r&&n<i&&(t.focusNext(e),c(n+1)):!s&&!r&&n<i?(t.focusNext(e),c(n+1)):!s&&r&&n>0&&(t.focusPrevious(e),c(n-1))},Home:(e,t,a)=>{a.preventDefault(),t.focusElement(t.first,e),c(0)},End:(e,t,a)=>{a.preventDefault(),t.focusElement(t.last,e),c(i)},Space:(e,t,a)=>{a.preventDefault(),e.children[0].click()},Enter:(e,t,a)=>{a.preventDefault(),e.children[0].click()}}}})},[N,b.length,s,c]);o.useEffect(()=>(E.initializeRovingTab(u),()=>E.removeFocusListener()),[]);const U=o.useCallback(E.triggerKeyboardEvent.bind(E),[]),J=o.useMemo(()=>d.classNames("k-stepper",{"k-stepper-linear":k},w),[k,w]),Q=o.useMemo(()=>({display:"grid",gridTemplateColumns:s?void 0:"repeat("+m*2+", 1fr)",gridTemplateRows:s?"repeat("+m+", 1fr)":void 0,...R}),[s,m,R]),W=o.useMemo(()=>d.classNames("k-step-list",{"k-step-list-horizontal":!s,"k-step-list-vertical":s}),[s]),X=o.useMemo(()=>({gridColumnStart:s?void 0:1,gridColumnEnd:s?void 0:-1,gridRowStart:s?1:void 0,gridRowEnd:s?-1:void 0}),[s]),Y=o.useMemo(()=>({gridColumnStart:s?void 0:2,gridColumnEnd:s?void 0:m*2,gridRowStart:s?1:void 0,gridRowEnd:s?m:void 0,top:s?17:void 0}),[s,m]),M=b&&b.map((r,i)=>{const e={index:i,disabled:g||r.disabled,focused:i===K,current:i===u,...r},t=P||ee.Step;return o.createElement(t,{key:i,...e})});return o.createElement($.StepperContext.Provider,{value:{animationDuration:f,isVertical:s,item:P,linear:k,mode:z,numOfSteps:m,value:u,successIcon:V,successSVGIcon:j,errorIcon:F,errorSVGIcon:L,onChange:B,onFocus:H}},o.createElement("nav",{className:J,style:Q,dir:N,role:"navigation",ref:v,onKeyDown:U},o.createElement("ol",{className:W,style:X},M||I),o.createElement(te.ProgressBar,{style:Y,labelPlacement:"start",animation:{duration:G},ariaLabel:_,"aria-hidden":!0,max:m-1,labelVisible:!1,orientation:S,reverse:S==="vertical",value:u,disabled:g,tabIndex:-1})))});O.propTypes={animationDuration:l.oneOfType([l.bool,l.number]),children:l.any,className:l.string,dir:l.string,disabled:l.bool,errorIcon:l.string,errorSVGIcon:d.svgIconPropType,item:l.any,items:l.any,linear:l.bool,mode:l.oneOf(["steps","labels"]),orientation:l.oneOf(["horizontal","vertical"]),style:l.object,successIcon:l.string,successSVGIcon:d.svgIconPropType,value:l.number.isRequired,onChange:l.func,onFocus:l.func};O.displayName="KendoStepper";exports.Stepper=O;