@progress/kendo-react-layout 14.5.0-develop.7 → 14.5.0-develop.9
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/actionsheet/ActionSheet.d.ts +12 -0
- package/actionsheet/ActionSheet.js +1 -1
- package/actionsheet/ActionSheet.mjs +60 -58
- package/appbar/interfaces/AppBarProps.d.ts +2 -14
- package/bottomnavigation/BottomNavigation.js +1 -1
- package/bottomnavigation/BottomNavigation.mjs +24 -35
- package/bottomnavigation/BottomNavigationProps.d.ts +3 -13
- package/card/Avatar.js +1 -1
- package/card/Avatar.mjs +14 -26
- package/card/interfaces/AvatarProps.d.ts +1 -8
- package/dist/cdn/js/kendo-react-layout.js +1 -1
- package/drawer/Drawer.d.ts +1 -1
- package/drawer/DrawerContent.d.ts +1 -1
- package/drawer/DrawerItem.d.ts +1 -1
- package/menu/components/MenuItemArrow.d.ts +3 -3
- package/menu/components/MenuItemArrow.js +1 -1
- package/menu/components/MenuItemArrow.mjs +13 -23
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +14 -9
- package/splitter/SplitterBar.js +1 -1
- package/splitter/SplitterBar.mjs +65 -64
- package/stepper/Step.js +1 -1
- package/stepper/Step.mjs +1 -1
- package/tabstrip/TabStripNavigation.js +1 -1
- package/tabstrip/TabStripNavigation.mjs +31 -31
- package/timeline/TimelineCard.js +1 -1
- package/timeline/TimelineCard.mjs +13 -5
- package/timeline/TimelineHorizontal.js +1 -1
- package/timeline/TimelineHorizontal.mjs +39 -39
|
@@ -187,6 +187,18 @@ export interface ActionSheetProps {
|
|
|
187
187
|
* Specifies the styles of the ActionSheet component.
|
|
188
188
|
*/
|
|
189
189
|
style?: React.CSSProperties;
|
|
190
|
+
/**
|
|
191
|
+
* Specifies the container element where the ActionSheet will be appended.
|
|
192
|
+
* Defaults to `null` (renders in place). Set to a DOM element (e.g. `document.body`)
|
|
193
|
+
* to escape CSS containing blocks created by `transform`, `backdrop-filter`, etc.
|
|
194
|
+
*
|
|
195
|
+
* @default null
|
|
196
|
+
* @example
|
|
197
|
+
* ```jsx
|
|
198
|
+
* <ActionSheet appendTo={document.body} />
|
|
199
|
+
* ```
|
|
200
|
+
*/
|
|
201
|
+
appendTo?: HTMLElement | null;
|
|
190
202
|
}
|
|
191
203
|
/**
|
|
192
204
|
* @hidden
|
|
@@ -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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const X=require("react"),Y=require("react-dom"),r=require("prop-types"),Z=require("@progress/kendo-react-animation"),k=require("@progress/kendo-react-common"),K=require("./ActionSheetItem.js"),F=require("./ActionSheetHeader.js"),p=require("./ActionSheetFooter.js"),ee=require("./ActionSheetContent.js"),H=require("./ActionSheetView.js");function V(e){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const m in e)if(m!=="default"){const f=Object.getOwnPropertyDescriptor(e,m);Object.defineProperty(d,m,f.get?f:{enumerable:!0,get:()=>e[m]})}}return d.default=e,Object.freeze(d)}const n=V(X),te=V(Y),R=n.forwardRef((e,d)=>{var _,M;const{navigatableElements:m=N.navigatableElements,navigatable:f=N.navigatable,position:L=N.position,animationDuration:l=300,prefixActions:g,suffixActions:D,filter:w}=e,$=(t,a,i)=>{i.preventDefault(),i.shiftKey?a.focusPrevious(t):a.focusNext(t)},B=(t,a,i)=>{if(t.ariaDisabled)return;const c=t.className&&t.className.indexOf?t.className.indexOf("k-actionsheet-item")!==-1:!1,A=a.elements.filter(y=>y.className.indexOf("k-actionsheet-item")!==-1);if(c&&e.onItemSelect){i.preventDefault();const y=e.items[A.indexOf(t)];e.onItemSelect.call(void 0,{syntheticEvent:i,item:y,title:y&&y.title})}e.animation||h()},U=(t,a,i)=>{e.onClose&&(i.preventDefault(),e.onClose.call(void 0,i)),e.animation||h()},h=()=>{b({show:!1})},z=t=>{f&&v.current.triggerKeyboardEvent(t)},G=t=>{e.onClose&&e.onClose.call(void 0,t),e.animation||h()},O=t=>{e.onItemSelect&&e.onItemSelect.call(void 0,t),e.animation||h()},J=t=>{const a={},i=[];return n.Children.forEach(t,c=>{c&&(c.type.displayName===H.ActionSheetViewDisplayName?i.push(c):a[c.type.displayName]=c)}),i.length>0?i:a},T=n.useRef(null),E=n.useRef(null);n.useImperativeHandle(T,()=>({props:e,element:E.current})),n.useImperativeHandle(d,()=>T.current);const v=n.useRef(void 0),x=n.useRef({bottom:"0",width:"100%"}),C=n.useRef(void 0),[o,Q]=n.useState({show:!1,slide:!1}),b=t=>{Q(a=>({...a,...t}))};n.useEffect(()=>{e.expand&&!o.show&&b({show:!0})},[]),n.useEffect(()=>{const t=E.current;if(e.expand&&!o.show&&b({show:!0}),e.expand&&o.show&&!o.slide&&b({slide:!0}),!e.expand&&o.show&&o.slide&&b({slide:!1}),C!==o&&o.slide&&t&&!e.className&&(t.style.setProperty("--kendo-actionsheet-height","auto"),t.style.setProperty("--kendo-actionsheet-max-height","none")),t&&f){const i=[".k-actionsheet-item",...[".k-actionsheet-footer",".k-actionsheet-content",".k-actionsheet-view",".k-actionsheet-titlebar"].map(c=>k.FOCUSABLE_ELEMENTS.concat(m).map(A=>`${c} ${A}`)).flat()];v.current=new k.Navigation({tabIndex:e.tabIndex||0,root:E,rovingTabIndex:!1,selectors:i,keyboardEvents:{keydown:{Tab:$,Enter:B,Escape:U}}}),v.current.focusElement(v.current.first,null)}C.current={...o}});const I="k-actionsheet-title",P=I,s=(_=e.items)==null?void 0:_.filter(t=>!t.group||t.group==="top"),S=(M=e.items)==null?void 0:M.filter(t=>t.group==="bottom"),W=s&&s.length>0&&S&&S.length>0,u=J(e.children),q=o.slide&&n.createElement("div",{className:k.classNames(`k-actionsheet k-actionsheet-${L}`,e.className),role:"dialog","aria-modal":"true",style:e.style,"aria-hidden":!1,"aria-labelledby":P,ref:E,onKeyDown:z},Array.isArray(u)?n.createElement(n.Fragment,null,u.map(t=>t)):n.createElement(H.ActionSheetView,null,u[F.headerDisplayName]&&!e.title&&!e.subTitle&&u[F.headerDisplayName],(e.title||e.subTitle||g||D||w)&&n.createElement("div",{className:"k-actionsheet-titlebar"},n.createElement("div",{className:"k-actionsheet-titlebar-group"},g&&n.createElement("div",{className:"k-actionsheet-actions"},g),n.createElement("div",{className:I,id:P},n.createElement("div",{className:"k-text-center"},e.title),e.subTitle&&n.createElement("div",{className:"k-actionsheet-subtitle k-text-center"},e.subTitle)),D&&n.createElement("div",{className:"k-actionsheet-actions"},D)),w&&n.createElement("div",{className:"k-actionsheet-titlebar-group k-actionsheet-filter"},w)),u[ee.contentDisplayName]||n.createElement("div",{className:"k-actionsheet-content"},n.createElement("div",{className:"k-list-ul",role:"group"},s&&s.map((t,a)=>n.createElement(K.ActionSheetItem,{...t,id:a,key:a,item:t,onClick:O})),W&&n.createElement("hr",{className:"k-hr"}),S&&S.map((t,a)=>n.createElement(K.ActionSheetItem,{...t,id:a+((s==null?void 0:s.length)||0),key:a,item:t,onClick:O})))),u[p.footerDisplayName])),j=n.createElement(n.Fragment,null,e.expand||o.show?n.createElement("div",{className:"k-actionsheet-container"},n.createElement("div",{className:"k-overlay",onClick:G}),e.animation?n.createElement(Z.Animation,{transitionName:o.slide?"slide-up":"slide-down",onExited:h,transitionEnterDuration:typeof l=="object"&&Object.keys(l).length>0&&l.openDuration?Number(l.openDuration):Number(l),transitionExitDuration:typeof l=="object"&&Object.keys(l).length>0&&l.closeDuration?Number(l.closeDuration):Number(l),animationEnteringStyle:e.animationStyles||x.current,animationEnteredStyle:e.animationStyles||x.current,animationExitingStyle:e.animationStyles||x.current,exit:!0,enter:!0,appear:!1},q):q):null);return e.appendTo&&k.canUseDOM?te.createPortal(j,e.appendTo):j}),N={navigatable:!0,navigatableElements:[],position:"bottom"};R.propTypes={items:r.array,subTitle:r.node,title:r.node,navigatable:r.bool,navigatableElements:r.array,position:r.oneOf(["top","bottom","left","right","fullscreen"]),appendTo:r.any};R.displayName="KendoReactActionSheet";exports.ActionSheet=R;exports.actionSheetDefaultProps=N;
|
|
@@ -6,87 +6,88 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as n from "react";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
import * as J from "react-dom";
|
|
10
|
+
import r from "prop-types";
|
|
11
|
+
import { Animation as Q } from "@progress/kendo-react-animation";
|
|
12
|
+
import { FOCUSABLE_ELEMENTS as W, Navigation as X, classNames as Y, canUseDOM as Z } from "@progress/kendo-react-common";
|
|
13
|
+
import { ActionSheetItem as K } from "./ActionSheetItem.mjs";
|
|
14
|
+
import { headerDisplayName as j } from "./ActionSheetHeader.mjs";
|
|
15
|
+
import { footerDisplayName as p } from "./ActionSheetFooter.mjs";
|
|
16
|
+
import { contentDisplayName as ee } from "./ActionSheetContent.mjs";
|
|
17
|
+
import { ActionSheetView as te, ActionSheetViewDisplayName as ne } from "./ActionSheetView.mjs";
|
|
18
|
+
const _ = n.forwardRef((e, F) => {
|
|
19
|
+
var O, P;
|
|
19
20
|
const {
|
|
20
|
-
navigatableElements:
|
|
21
|
-
navigatable: x =
|
|
22
|
-
position:
|
|
21
|
+
navigatableElements: H = g.navigatableElements,
|
|
22
|
+
navigatable: x = g.navigatable,
|
|
23
|
+
position: L = g.position,
|
|
23
24
|
animationDuration: l = 300,
|
|
24
|
-
prefixActions:
|
|
25
|
+
prefixActions: b,
|
|
25
26
|
suffixActions: v,
|
|
26
27
|
filter: k
|
|
27
|
-
} = e,
|
|
28
|
+
} = e, M = (t, a, i) => {
|
|
28
29
|
i.preventDefault(), i.shiftKey ? a.focusPrevious(t) : a.focusNext(t);
|
|
29
30
|
}, V = (t, a, i) => {
|
|
30
31
|
if (t.ariaDisabled)
|
|
31
32
|
return;
|
|
32
|
-
const s = t.className && t.className.indexOf ? t.className.indexOf("k-actionsheet-item") !== -1 : !1,
|
|
33
|
+
const s = t.className && t.className.indexOf ? t.className.indexOf("k-actionsheet-item") !== -1 : !1, S = a.elements.filter((u) => u.className.indexOf("k-actionsheet-item") !== -1);
|
|
33
34
|
if (s && e.onItemSelect) {
|
|
34
35
|
i.preventDefault();
|
|
35
|
-
const
|
|
36
|
+
const u = e.items[S.indexOf(t)];
|
|
36
37
|
e.onItemSelect.call(void 0, {
|
|
37
38
|
syntheticEvent: i,
|
|
38
|
-
item:
|
|
39
|
-
title:
|
|
39
|
+
item: u,
|
|
40
|
+
title: u && u.title
|
|
40
41
|
});
|
|
41
42
|
}
|
|
42
43
|
e.animation || f();
|
|
43
44
|
}, $ = (t, a, i) => {
|
|
44
45
|
e.onClose && (i.preventDefault(), e.onClose.call(void 0, i)), e.animation || f();
|
|
45
46
|
}, f = () => {
|
|
46
|
-
|
|
47
|
+
d({ show: !1 });
|
|
47
48
|
}, B = (t) => {
|
|
48
49
|
x && E.current.triggerKeyboardEvent(t);
|
|
49
|
-
},
|
|
50
|
+
}, U = (t) => {
|
|
50
51
|
e.onClose && e.onClose.call(void 0, t), e.animation || f();
|
|
51
52
|
}, w = (t) => {
|
|
52
53
|
e.onItemSelect && e.onItemSelect.call(void 0, t), e.animation || f();
|
|
53
|
-
},
|
|
54
|
+
}, q = (t) => {
|
|
54
55
|
const a = {}, i = [];
|
|
55
56
|
return n.Children.forEach(t, (s) => {
|
|
56
|
-
s && (s.type.displayName ===
|
|
57
|
+
s && (s.type.displayName === ne ? i.push(s) : a[s.type.displayName] = s);
|
|
57
58
|
}), i.length > 0 ? i : a;
|
|
58
59
|
}, D = n.useRef(null), h = n.useRef(null);
|
|
59
60
|
n.useImperativeHandle(
|
|
60
61
|
D,
|
|
61
62
|
() => ({ props: e, element: h.current })
|
|
62
63
|
), n.useImperativeHandle(
|
|
63
|
-
|
|
64
|
+
F,
|
|
64
65
|
() => D.current
|
|
65
66
|
);
|
|
66
|
-
const E = n.useRef(void 0), N = n.useRef({ bottom: "0", width: "100%" }), R = n.useRef(void 0), [o,
|
|
67
|
-
|
|
67
|
+
const E = n.useRef(void 0), N = n.useRef({ bottom: "0", width: "100%" }), R = n.useRef(void 0), [o, z] = n.useState({ show: !1, slide: !1 }), d = (t) => {
|
|
68
|
+
z((a) => ({ ...a, ...t }));
|
|
68
69
|
};
|
|
69
70
|
n.useEffect(() => {
|
|
70
|
-
e.expand && !o.show &&
|
|
71
|
+
e.expand && !o.show && d({ show: !0 });
|
|
71
72
|
}, []), n.useEffect(() => {
|
|
72
73
|
const t = h.current;
|
|
73
|
-
if (e.expand && !o.show &&
|
|
74
|
+
if (e.expand && !o.show && d({ show: !0 }), e.expand && o.show && !o.slide && d({ slide: !0 }), !e.expand && o.show && o.slide && d({ slide: !1 }), R !== o && o.slide && t && !e.className && (t.style.setProperty("--kendo-actionsheet-height", "auto"), t.style.setProperty("--kendo-actionsheet-max-height", "none")), t && x) {
|
|
74
75
|
const i = [".k-actionsheet-item", ...[
|
|
75
76
|
".k-actionsheet-footer",
|
|
76
77
|
".k-actionsheet-content",
|
|
77
78
|
".k-actionsheet-view",
|
|
78
79
|
".k-actionsheet-titlebar"
|
|
79
|
-
].map((s) =>
|
|
80
|
-
(
|
|
80
|
+
].map((s) => W.concat(H).map(
|
|
81
|
+
(S) => `${s} ${S}`
|
|
81
82
|
)).flat()];
|
|
82
|
-
E.current = new
|
|
83
|
+
E.current = new X({
|
|
83
84
|
tabIndex: e.tabIndex || 0,
|
|
84
85
|
root: h,
|
|
85
86
|
rovingTabIndex: !1,
|
|
86
87
|
selectors: i,
|
|
87
88
|
keyboardEvents: {
|
|
88
89
|
keydown: {
|
|
89
|
-
Tab:
|
|
90
|
+
Tab: M,
|
|
90
91
|
Enter: V,
|
|
91
92
|
Escape: $
|
|
92
93
|
}
|
|
@@ -95,24 +96,24 @@ const j = n.forwardRef((e, _) => {
|
|
|
95
96
|
}
|
|
96
97
|
R.current = { ...o };
|
|
97
98
|
});
|
|
98
|
-
const
|
|
99
|
+
const T = "k-actionsheet-title", C = T, c = (O = e.items) == null ? void 0 : O.filter(
|
|
99
100
|
(t) => !t.group || t.group === "top"
|
|
100
|
-
),
|
|
101
|
+
), y = (P = e.items) == null ? void 0 : P.filter(
|
|
101
102
|
(t) => t.group === "bottom"
|
|
102
|
-
),
|
|
103
|
+
), G = c && c.length > 0 && y && y.length > 0, m = q(e.children), I = o.slide && /* @__PURE__ */ n.createElement(
|
|
103
104
|
"div",
|
|
104
105
|
{
|
|
105
|
-
className:
|
|
106
|
+
className: Y(`k-actionsheet k-actionsheet-${L}`, e.className),
|
|
106
107
|
role: "dialog",
|
|
107
108
|
"aria-modal": "true",
|
|
108
109
|
style: e.style,
|
|
109
110
|
"aria-hidden": !1,
|
|
110
|
-
"aria-labelledby":
|
|
111
|
+
"aria-labelledby": C,
|
|
111
112
|
ref: h,
|
|
112
113
|
onKeyDown: B
|
|
113
114
|
},
|
|
114
|
-
Array.isArray(
|
|
115
|
-
|
|
115
|
+
Array.isArray(m) ? /* @__PURE__ */ n.createElement(n.Fragment, null, m.map((t) => t)) : /* @__PURE__ */ n.createElement(te, null, m[j] && !e.title && !e.subTitle && m[j], (e.title || e.subTitle || b || v || k) && /* @__PURE__ */ n.createElement("div", { className: "k-actionsheet-titlebar" }, /* @__PURE__ */ n.createElement("div", { className: "k-actionsheet-titlebar-group" }, b && /* @__PURE__ */ n.createElement("div", { className: "k-actionsheet-actions" }, b), /* @__PURE__ */ n.createElement("div", { className: T, id: C }, /* @__PURE__ */ n.createElement("div", { className: "k-text-center" }, e.title), e.subTitle && /* @__PURE__ */ n.createElement("div", { className: "k-actionsheet-subtitle k-text-center" }, e.subTitle)), v && /* @__PURE__ */ n.createElement("div", { className: "k-actionsheet-actions" }, v)), k && /* @__PURE__ */ n.createElement("div", { className: "k-actionsheet-titlebar-group k-actionsheet-filter" }, k)), m[ee] || /* @__PURE__ */ n.createElement("div", { className: "k-actionsheet-content" }, /* @__PURE__ */ n.createElement("div", { className: "k-list-ul", role: "group" }, c && c.map((t, a) => /* @__PURE__ */ n.createElement(
|
|
116
|
+
K,
|
|
116
117
|
{
|
|
117
118
|
...t,
|
|
118
119
|
id: a,
|
|
@@ -120,8 +121,8 @@ const j = n.forwardRef((e, _) => {
|
|
|
120
121
|
item: t,
|
|
121
122
|
onClick: w
|
|
122
123
|
}
|
|
123
|
-
)),
|
|
124
|
-
|
|
124
|
+
)), G && /* @__PURE__ */ n.createElement("hr", { className: "k-hr" }), y && y.map((t, a) => /* @__PURE__ */ n.createElement(
|
|
125
|
+
K,
|
|
125
126
|
{
|
|
126
127
|
...t,
|
|
127
128
|
id: a + ((c == null ? void 0 : c.length) || 0),
|
|
@@ -129,10 +130,9 @@ const j = n.forwardRef((e, _) => {
|
|
|
129
130
|
item: t,
|
|
130
131
|
onClick: w
|
|
131
132
|
}
|
|
132
|
-
)))),
|
|
133
|
-
)
|
|
134
|
-
|
|
135
|
-
G,
|
|
133
|
+
)))), m[p])
|
|
134
|
+
), A = /* @__PURE__ */ n.createElement(n.Fragment, null, e.expand || o.show ? /* @__PURE__ */ n.createElement("div", { className: "k-actionsheet-container" }, /* @__PURE__ */ n.createElement("div", { className: "k-overlay", onClick: U }), e.animation ? /* @__PURE__ */ n.createElement(
|
|
135
|
+
Q,
|
|
136
136
|
{
|
|
137
137
|
transitionName: o.slide ? "slide-up" : "slide-down",
|
|
138
138
|
onExited: f,
|
|
@@ -145,23 +145,25 @@ const j = n.forwardRef((e, _) => {
|
|
|
145
145
|
enter: !0,
|
|
146
146
|
appear: !1
|
|
147
147
|
},
|
|
148
|
-
|
|
149
|
-
) :
|
|
150
|
-
|
|
148
|
+
I
|
|
149
|
+
) : I) : null);
|
|
150
|
+
return e.appendTo && Z ? J.createPortal(A, e.appendTo) : A;
|
|
151
|
+
}), g = {
|
|
151
152
|
navigatable: !0,
|
|
152
153
|
navigatableElements: [],
|
|
153
154
|
position: "bottom"
|
|
154
155
|
};
|
|
155
|
-
|
|
156
|
-
items:
|
|
157
|
-
subTitle:
|
|
158
|
-
title:
|
|
159
|
-
navigatable:
|
|
160
|
-
navigatableElements:
|
|
161
|
-
position:
|
|
156
|
+
_.propTypes = {
|
|
157
|
+
items: r.array,
|
|
158
|
+
subTitle: r.node,
|
|
159
|
+
title: r.node,
|
|
160
|
+
navigatable: r.bool,
|
|
161
|
+
navigatableElements: r.array,
|
|
162
|
+
position: r.oneOf(["top", "bottom", "left", "right", "fullscreen"]),
|
|
163
|
+
appendTo: r.any
|
|
162
164
|
};
|
|
163
|
-
|
|
165
|
+
_.displayName = "KendoReactActionSheet";
|
|
164
166
|
export {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
+
_ as ActionSheet,
|
|
168
|
+
g as actionSheetDefaultProps
|
|
167
169
|
};
|
|
@@ -84,16 +84,10 @@ export interface AppBarProps {
|
|
|
84
84
|
* Specifies the AppBar theme color ([see example](https://www.telerik.com/kendo-react-ui/components/layout/appbar/appearance)).
|
|
85
85
|
*
|
|
86
86
|
* * The possible values are:
|
|
87
|
-
* * '
|
|
87
|
+
* * 'base'
|
|
88
88
|
* * 'primary'
|
|
89
89
|
* * 'secondary'
|
|
90
90
|
* * 'tertiary'
|
|
91
|
-
* * 'info'
|
|
92
|
-
* * 'success'
|
|
93
|
-
* * 'warning'
|
|
94
|
-
* * 'error'
|
|
95
|
-
* * 'dark'
|
|
96
|
-
* * 'inherit'
|
|
97
91
|
* * 'inverse'
|
|
98
92
|
*
|
|
99
93
|
* @default undefined (theme-controlled)
|
|
@@ -131,13 +125,7 @@ export type AppBarPositionMode = 'static' | 'sticky' | 'fixed';
|
|
|
131
125
|
* * 'primary'
|
|
132
126
|
* * 'secondary'
|
|
133
127
|
* * 'tertiary'
|
|
134
|
-
* * 'info'
|
|
135
|
-
* * 'success'
|
|
136
|
-
* * 'warning'
|
|
137
|
-
* * 'error'
|
|
138
|
-
* * 'dark'
|
|
139
|
-
* * 'inherit'
|
|
140
128
|
* * 'inverse'
|
|
141
129
|
*
|
|
142
130
|
*/
|
|
143
|
-
export type AppBarThemeColor = 'base' | 'primary' | 'secondary' | 'tertiary' | '
|
|
131
|
+
export type AppBarThemeColor = 'base' | 'primary' | 'secondary' | 'tertiary' | 'inverse';
|
|
@@ -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 _=require("react"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react"),l=require("prop-types"),r=require("@progress/kendo-react-common"),N=require("./models/utils.js"),j=require("./BottomNavigationItem.js");function B(e){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const c=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(i,n,c.get?c:{enumerable:!0,get:()=>e[n]})}}return i.default=e,Object.freeze(i)}const o=B(_),g=o.forwardRef((e,i)=>{const n=o.useRef(null),c=o.useCallback(()=>{n.current&&r.focusFirstFocusableChild(n.current)},[]),m=o.useCallback(()=>({element:n.current,focus:c}),[c]);o.useImperativeHandle(i,m);const{positionMode:C=d.positionMode,itemFlow:M=d.itemFlow,border:S=d.border,className:k,items:s,item:I,itemRender:w,disabled:f,style:E,id:h,onSelect:b,onKeyDown:p}=e,O=r.useId(),D=r.useDir(n,e.dir),v=o.useMemo(()=>e.fillMode===null?null:e.fillMode||d.fillMode,[e.fillMode]),y=o.useMemo(()=>e.themeColor||d.themeColor,[e.themeColor]),R=o.useMemo(()=>r.classNames("k-bottom-nav",N.POSITION_MODE_CLASSES[C],N.ITEM_FLOW_CLASSES[M],{[`k-bottom-nav-${v}`]:v,[`k-bottom-nav-${y}`]:!!y,"k-bottom-nav-border":S,"k-disabled":f},k),[C,y,v,M,S,f,k]),u=o.useCallback((t,a)=>{s&&!s[a].disabled&&b&&r.dispatchEvent(b,t,m(),{itemTarget:s[a],itemIndex:a})},[s,b]),F=o.useCallback((t,a)=>{u(t,a)},[u]),T=o.useCallback((t,a)=>{switch(t.keyCode){case r.Keys.enter:case r.Keys.space:u(t,a),t.preventDefault();break}r.dispatchEvent(p,t,m(),void 0)},[u,p]);return o.createElement("nav",{ref:n,className:R,style:E,id:h||O,dir:D},s&&s.map((t,a)=>o.createElement(j.BottomNavigationItem,{...t,key:a,index:a,id:`${h||O}-${a}`,disabled:f||t.disabled,selected:t.selected,dataItem:t,item:I,render:w,onSelect:F,onKeyDown:T})))}),d={themeColor:void 0,fillMode:void 0,itemFlow:"vertical",positionMode:"fixed",border:!0};g.propTypes={className:l.string,style:l.object,id:l.string,dir:l.string,themeColor:l.oneOf(["base","primary","secondary","tertiary","inverse"]),fillMode:l.oneOf(["solid","flat"]),itemFlow:l.oneOf(["vertical","horizontal"]),border:l.bool,disabled:l.bool,selected:l.number,onSelect:l.func};g.displayName="KendoReactBottomNavigation";exports.BottomNavigation=g;
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as o from "react";
|
|
9
9
|
import l from "prop-types";
|
|
10
|
-
import { focusFirstFocusableChild as T, useId as B, useDir as _, classNames as $, dispatchEvent as S, Keys as
|
|
10
|
+
import { focusFirstFocusableChild as T, useId as B, useDir as _, classNames as $, dispatchEvent as S, Keys as I } from "@progress/kendo-react-common";
|
|
11
11
|
import { POSITION_MODE_CLASSES as L, ITEM_FLOW_CLASSES as P } from "./models/utils.mjs";
|
|
12
12
|
import { BottomNavigationItem as A } from "./BottomNavigationItem.mjs";
|
|
13
|
-
const w = o.forwardRef((
|
|
13
|
+
const w = o.forwardRef((a, E) => {
|
|
14
14
|
const s = o.useRef(null), b = o.useCallback(() => {
|
|
15
15
|
s.current && T(s.current);
|
|
16
16
|
}, []), d = o.useCallback(
|
|
@@ -20,21 +20,21 @@ const w = o.forwardRef((r, I) => {
|
|
|
20
20
|
}),
|
|
21
21
|
[b]
|
|
22
22
|
);
|
|
23
|
-
o.useImperativeHandle(
|
|
23
|
+
o.useImperativeHandle(E, d);
|
|
24
24
|
const {
|
|
25
25
|
positionMode: v = i.positionMode,
|
|
26
26
|
itemFlow: C = i.itemFlow,
|
|
27
27
|
border: M = i.border,
|
|
28
|
-
className:
|
|
29
|
-
items:
|
|
30
|
-
item:
|
|
31
|
-
itemRender:
|
|
28
|
+
className: y,
|
|
29
|
+
items: r,
|
|
30
|
+
item: N,
|
|
31
|
+
itemRender: g,
|
|
32
32
|
disabled: c,
|
|
33
33
|
style: F,
|
|
34
|
-
id:
|
|
34
|
+
id: h,
|
|
35
35
|
onSelect: m,
|
|
36
|
-
onKeyDown:
|
|
37
|
-
} =
|
|
36
|
+
onKeyDown: k
|
|
37
|
+
} = a, p = B(), O = _(s, a.dir), f = o.useMemo(() => a.fillMode === null ? null : a.fillMode || i.fillMode, [a.fillMode]), u = o.useMemo(() => a.themeColor || i.themeColor, [a.themeColor]), D = o.useMemo(
|
|
38
38
|
() => $(
|
|
39
39
|
"k-bottom-nav",
|
|
40
40
|
L[v],
|
|
@@ -45,17 +45,17 @@ const w = o.forwardRef((r, I) => {
|
|
|
45
45
|
"k-bottom-nav-border": M,
|
|
46
46
|
"k-disabled": c
|
|
47
47
|
},
|
|
48
|
-
|
|
48
|
+
y
|
|
49
49
|
),
|
|
50
|
-
[v, u, f, C, M, c,
|
|
50
|
+
[v, u, f, C, M, c, y]
|
|
51
51
|
), n = o.useCallback(
|
|
52
52
|
(e, t) => {
|
|
53
|
-
|
|
54
|
-
itemTarget:
|
|
53
|
+
r && !r[t].disabled && m && S(m, e, d(), {
|
|
54
|
+
itemTarget: r[t],
|
|
55
55
|
itemIndex: t
|
|
56
56
|
});
|
|
57
57
|
},
|
|
58
|
-
[
|
|
58
|
+
[r, m]
|
|
59
59
|
), R = o.useCallback(
|
|
60
60
|
(e, t) => {
|
|
61
61
|
n(e, t);
|
|
@@ -64,32 +64,32 @@ const w = o.forwardRef((r, I) => {
|
|
|
64
64
|
), K = o.useCallback(
|
|
65
65
|
(e, t) => {
|
|
66
66
|
switch (e.keyCode) {
|
|
67
|
-
case
|
|
68
|
-
case
|
|
67
|
+
case I.enter:
|
|
68
|
+
case I.space:
|
|
69
69
|
n(e, t), e.preventDefault();
|
|
70
70
|
break;
|
|
71
71
|
}
|
|
72
72
|
S(
|
|
73
|
-
|
|
73
|
+
k,
|
|
74
74
|
e,
|
|
75
75
|
d(),
|
|
76
76
|
void 0
|
|
77
77
|
);
|
|
78
78
|
},
|
|
79
|
-
[n,
|
|
79
|
+
[n, k]
|
|
80
80
|
);
|
|
81
|
-
return /* @__PURE__ */ o.createElement("nav", { ref: s, className: D, style: F, id:
|
|
81
|
+
return /* @__PURE__ */ o.createElement("nav", { ref: s, className: D, style: F, id: h || p, dir: O }, r && r.map((e, t) => /* @__PURE__ */ o.createElement(
|
|
82
82
|
A,
|
|
83
83
|
{
|
|
84
84
|
...e,
|
|
85
85
|
key: t,
|
|
86
86
|
index: t,
|
|
87
|
-
id: `${
|
|
87
|
+
id: `${h || p}-${t}`,
|
|
88
88
|
disabled: c || e.disabled,
|
|
89
89
|
selected: e.selected,
|
|
90
90
|
dataItem: e,
|
|
91
|
-
item:
|
|
92
|
-
render:
|
|
91
|
+
item: N,
|
|
92
|
+
render: g,
|
|
93
93
|
onSelect: R,
|
|
94
94
|
onKeyDown: K
|
|
95
95
|
}
|
|
@@ -106,18 +106,7 @@ w.propTypes = {
|
|
|
106
106
|
style: l.object,
|
|
107
107
|
id: l.string,
|
|
108
108
|
dir: l.string,
|
|
109
|
-
themeColor: l.oneOf([
|
|
110
|
-
"primary",
|
|
111
|
-
"secondary",
|
|
112
|
-
"tertiary",
|
|
113
|
-
"info",
|
|
114
|
-
"success",
|
|
115
|
-
"warning",
|
|
116
|
-
"error",
|
|
117
|
-
"dark",
|
|
118
|
-
"light",
|
|
119
|
-
"inverse"
|
|
120
|
-
]),
|
|
109
|
+
themeColor: l.oneOf(["base", "primary", "secondary", "tertiary", "inverse"]),
|
|
121
110
|
fillMode: l.oneOf(["solid", "flat"]),
|
|
122
111
|
itemFlow: l.oneOf(["vertical", "horizontal"]),
|
|
123
112
|
border: l.bool,
|
|
@@ -52,15 +52,10 @@ export interface BottomNavigationProps {
|
|
|
52
52
|
* ([see example](https://www.telerik.com/kendo-react-ui/components/layout/bottomnavigation/appearance#toc-theme-color)).
|
|
53
53
|
*
|
|
54
54
|
* The possible values are:
|
|
55
|
+
* * `base` — Applies coloring based on the base theme color.
|
|
55
56
|
* * `primary` — Applies coloring based on the primary theme color.
|
|
56
57
|
* * `secondary` — Applies coloring based on the secondary theme color.
|
|
57
58
|
* * `tertiary` — Applies coloring based on the tertiary theme color.
|
|
58
|
-
* * `info` — Applies coloring based on the info theme color.
|
|
59
|
-
* * `success` — Applies coloring based on the success theme color.
|
|
60
|
-
* * `warning` — Applies coloring based on the warning theme color.
|
|
61
|
-
* * `error` — Applies coloring based on the error theme color.
|
|
62
|
-
* * `dark` — Applies coloring based on the dark theme color.
|
|
63
|
-
* * `light` — Applies coloring based on the light theme color.
|
|
64
59
|
* * `inverse` — Applies coloring based on the inverted theme color.
|
|
65
60
|
*
|
|
66
61
|
* @default undefined (theme-controlled)
|
|
@@ -216,15 +211,10 @@ export type BottomNavigationItemFlow = 'vertical' | 'horizontal';
|
|
|
216
211
|
* * `primary` (Default) — Applies coloring based on the primary theme color.
|
|
217
212
|
* * `secondary` — Applies coloring based on the secondary theme color.
|
|
218
213
|
* * `tertiary` — Applies coloring based on the tertiary theme color.
|
|
219
|
-
* * `
|
|
220
|
-
* * `success` — Applies coloring based on the success theme color.
|
|
221
|
-
* * `warning` — Applies coloring based on the warning theme color.
|
|
222
|
-
* * `error` — Applies coloring based on the error theme color.
|
|
223
|
-
* * `dark` — Applies coloring based on the dark theme color.
|
|
224
|
-
* * `light` — Applies coloring based on the light theme color.
|
|
214
|
+
* * `base` — Applies coloring based on the base theme color.
|
|
225
215
|
* * `inverse` — Applies coloring based on the inverted theme color.
|
|
226
216
|
*/
|
|
227
|
-
export type BottomNavigationThemeColor = '
|
|
217
|
+
export type BottomNavigationThemeColor = 'base' | 'primary' | 'secondary' | 'tertiary' | 'inverse';
|
|
228
218
|
/**
|
|
229
219
|
* Specifies the BottomNavigation position and behavior when the page is scrolled
|
|
230
220
|
* ([see example](https://www.telerik.com/kendo-react-ui/components/layout/bottomnavigation/positioning#toc-position-mode)).
|
package/card/Avatar.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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),a=require("prop-types"),r=require("@progress/kendo-react-common"),i=require("./interfaces/Enums.js");function c(o){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const t in o)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(o,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>o[t]})}}return e.default=o,Object.freeze(e)}const s=c(d),l=o=>{const e={type:i.avatarType.TEXT,size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0,...o};return s.createElement("div",{style:e.style,className:r.classNames("k-avatar",{"k-avatar-bordered":e.border,[`k-rounded-${r.kendoThemeMaps.roundedMap[e.rounded]||e.rounded}`]:e.rounded,[`k-avatar-${r.kendoThemeMaps.sizeMap[e.size]||e.size}`]:e.size,[`k-avatar-${e.fillMode}`]:e.fillMode,[`k-avatar-${e.themeColor}`]:!!e.themeColor},e.className)},s.createElement("span",{className:`k-avatar-${e.type}`},e.children))};l.propTypes={className:a.string,type:a.oneOf(["text","image","icon"]),size:a.oneOf(["small","medium","large"]),rounded:a.oneOf(["small","medium","large","full","none"]),fillMode:a.oneOf(["solid","outline"]),themeColor:a.oneOf(["base","primary","secondary","tertiary"])};exports.Avatar=l;
|
package/card/Avatar.mjs
CHANGED
|
@@ -5,58 +5,46 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
8
|
+
import * as a from "react";
|
|
9
9
|
import o from "prop-types";
|
|
10
|
-
import { classNames as
|
|
11
|
-
import { avatarType as
|
|
12
|
-
const
|
|
10
|
+
import { classNames as d, kendoThemeMaps as r } from "@progress/kendo-react-common";
|
|
11
|
+
import { avatarType as l } from "./interfaces/Enums.mjs";
|
|
12
|
+
const s = (t) => {
|
|
13
13
|
const e = {
|
|
14
|
-
type:
|
|
14
|
+
type: l.TEXT,
|
|
15
15
|
size: void 0,
|
|
16
16
|
rounded: void 0,
|
|
17
17
|
fillMode: void 0,
|
|
18
18
|
themeColor: void 0,
|
|
19
|
-
...
|
|
19
|
+
...t
|
|
20
20
|
};
|
|
21
|
-
return /* @__PURE__ */
|
|
21
|
+
return /* @__PURE__ */ a.createElement(
|
|
22
22
|
"div",
|
|
23
23
|
{
|
|
24
24
|
style: e.style,
|
|
25
|
-
className:
|
|
25
|
+
className: d(
|
|
26
26
|
"k-avatar",
|
|
27
27
|
{
|
|
28
28
|
"k-avatar-bordered": e.border,
|
|
29
|
-
[`k-rounded-${
|
|
30
|
-
[`k-avatar-${
|
|
29
|
+
[`k-rounded-${r.roundedMap[e.rounded] || e.rounded}`]: e.rounded,
|
|
30
|
+
[`k-avatar-${r.sizeMap[e.size] || e.size}`]: e.size,
|
|
31
31
|
[`k-avatar-${e.fillMode}`]: e.fillMode,
|
|
32
32
|
[`k-avatar-${e.themeColor}`]: !!e.themeColor
|
|
33
33
|
},
|
|
34
34
|
e.className
|
|
35
35
|
)
|
|
36
36
|
},
|
|
37
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ a.createElement("span", { className: `k-avatar-${e.type}` }, e.children)
|
|
38
38
|
);
|
|
39
39
|
};
|
|
40
|
-
|
|
40
|
+
s.propTypes = {
|
|
41
41
|
className: o.string,
|
|
42
42
|
type: o.oneOf(["text", "image", "icon"]),
|
|
43
43
|
size: o.oneOf(["small", "medium", "large"]),
|
|
44
44
|
rounded: o.oneOf(["small", "medium", "large", "full", "none"]),
|
|
45
45
|
fillMode: o.oneOf(["solid", "outline"]),
|
|
46
|
-
themeColor: o.oneOf([
|
|
47
|
-
"base",
|
|
48
|
-
"dark",
|
|
49
|
-
"error",
|
|
50
|
-
"info",
|
|
51
|
-
"inverse",
|
|
52
|
-
"light",
|
|
53
|
-
"primary",
|
|
54
|
-
"secondary",
|
|
55
|
-
"success",
|
|
56
|
-
"tertiary",
|
|
57
|
-
"warning"
|
|
58
|
-
])
|
|
46
|
+
themeColor: o.oneOf(["base", "primary", "secondary", "tertiary"])
|
|
59
47
|
};
|
|
60
48
|
export {
|
|
61
|
-
|
|
49
|
+
s as Avatar
|
|
62
50
|
};
|
|
@@ -114,13 +114,6 @@ export interface AvatarProps {
|
|
|
114
114
|
* - primary
|
|
115
115
|
* - secondary
|
|
116
116
|
* - tertiary
|
|
117
|
-
* - info
|
|
118
|
-
* - success
|
|
119
|
-
* - error
|
|
120
|
-
* - warning
|
|
121
|
-
* - dark
|
|
122
|
-
* - light
|
|
123
|
-
* - inverse
|
|
124
117
|
*
|
|
125
118
|
* @default undefined (theme-controlled)
|
|
126
119
|
*
|
|
@@ -129,7 +122,7 @@ export interface AvatarProps {
|
|
|
129
122
|
* <Avatar themeColor="primary">AB</Avatar>
|
|
130
123
|
* ```
|
|
131
124
|
*/
|
|
132
|
-
themeColor?: 'base' | 'primary' | 'secondary' | 'tertiary'
|
|
125
|
+
themeColor?: 'base' | 'primary' | 'secondary' | 'tertiary';
|
|
133
126
|
/**
|
|
134
127
|
* Sets the URL for the image when type is 'image'.
|
|
135
128
|
*
|