@progress/kendo-react-layout 14.5.0-develop.9 → 15.0.0-develop.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MenuMcpWrapper.d.ts +17 -0
- package/MenuMcpWrapper.js +8 -0
- package/MenuMcpWrapper.mjs +18 -0
- package/README.md +4 -4
- package/actionsheet/ActionSheet.js +1 -1
- package/actionsheet/ActionSheet.mjs +18 -19
- package/actionsheet/ActionSheetItem.js +1 -1
- package/actionsheet/ActionSheetItem.mjs +1 -3
- package/bottomnavigation/BottomNavigation.js +1 -1
- package/bottomnavigation/BottomNavigation.mjs +85 -69
- package/bottomnavigation/BottomNavigationItem.js +1 -1
- package/bottomnavigation/BottomNavigationItem.mjs +34 -33
- package/bottomnavigation/messages/index.d.ts +17 -0
- package/bottomnavigation/messages/index.js +8 -0
- package/bottomnavigation/messages/index.mjs +14 -0
- package/breadcrumb/Breadcrumb.js +1 -1
- package/breadcrumb/Breadcrumb.mjs +30 -28
- package/breadcrumb/BreadcrumbLink.js +1 -1
- package/breadcrumb/BreadcrumbLink.mjs +26 -26
- package/breadcrumb/messages/index.d.ts +17 -0
- package/breadcrumb/messages/index.js +8 -0
- package/breadcrumb/messages/index.mjs +14 -0
- package/dist/cdn/js/kendo-react-layout.js +1 -1
- package/drawer/Drawer.js +1 -1
- package/drawer/Drawer.mjs +63 -63
- package/drawer/DrawerItem.js +1 -1
- package/drawer/DrawerItem.mjs +22 -23
- package/drawer/interfaces/DrawerProps.d.ts +8 -0
- package/expansionpanel/ExpansionPanel.js +1 -1
- package/expansionpanel/ExpansionPanel.mjs +50 -50
- package/expansionpanel/ExpansionPanelContent.js +1 -1
- package/expansionpanel/ExpansionPanelContent.mjs +7 -4
- package/index.d.mts +1 -2
- package/index.d.ts +1 -2
- package/index.js +1 -1
- package/index.mjs +128 -130
- package/menu/MenuProps.d.ts +6 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +8 -8
- package/panelbar/PanelBar.js +1 -1
- package/panelbar/PanelBar.mjs +94 -91
- package/panelbar/PanelBarItem.js +1 -1
- package/panelbar/PanelBarItem.mjs +13 -15
- package/panelbar/interfaces/PanelBarProps.d.ts +8 -0
- package/panelbar/interfaces/RenderPanelBarItem.d.ts +1 -0
- package/panelbar/util.d.ts +1 -1
- package/panelbar/util.js +1 -1
- package/panelbar/util.mjs +62 -59
- package/splitter/SplitterBar.d.ts +1 -0
- package/splitter/SplitterBar.js +1 -1
- package/splitter/SplitterBar.mjs +64 -56
- package/stepper/Step.js +1 -1
- package/stepper/Step.mjs +79 -85
- package/stepper/Stepper.js +1 -1
- package/stepper/Stepper.mjs +134 -133
- package/stepper/interfaces/StepperProps.d.ts +8 -1
- package/stepper/messages/index.d.ts +12 -2
- package/stepper/messages/index.js +1 -1
- package/stepper/messages/index.mjs +8 -4
- package/tabstrip/TabStrip.d.ts +8 -1
- package/tabstrip/TabStrip.js +1 -1
- package/tabstrip/TabStrip.mjs +126 -125
- package/tilelayout/InternalTile.js +1 -1
- package/tilelayout/InternalTile.mjs +119 -115
- package/tilelayout/TileLayout.js +1 -1
- package/tilelayout/TileLayout.mjs +58 -58
- package/timeline/TimelineCard.d.ts +2 -0
- package/timeline/TimelineCard.js +1 -1
- package/timeline/TimelineCard.mjs +16 -15
- package/timeline/TimelineHorizontal.js +1 -1
- package/timeline/TimelineHorizontal.mjs +105 -101
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as t from "react";
|
|
9
9
|
import s from "prop-types";
|
|
10
|
-
import { Card as
|
|
11
|
-
import { CardHeader as
|
|
12
|
-
import { CardTitle as
|
|
13
|
-
import { CardSubtitle as
|
|
14
|
-
import { CardBody as
|
|
10
|
+
import { Card as C } from "../card/Card.mjs";
|
|
11
|
+
import { CardHeader as N } from "../card/CardHeader.mjs";
|
|
12
|
+
import { CardTitle as h } from "../card/CardTitle.mjs";
|
|
13
|
+
import { CardSubtitle as A } from "../card/CardSubtitle.mjs";
|
|
14
|
+
import { CardBody as D } from "../card/CardBody.mjs";
|
|
15
15
|
import { CardImage as I } from "../card/CardImage.mjs";
|
|
16
16
|
import { CardActions as g } from "../card/CardActions.mjs";
|
|
17
17
|
import { classNames as u } from "@progress/kendo-react-common";
|
|
@@ -19,7 +19,7 @@ import { Reveal as y } from "@progress/kendo-react-animation";
|
|
|
19
19
|
import { chevronRightIcon as T } from "@progress/kendo-svg-icons";
|
|
20
20
|
import { Button as x } from "@progress/kendo-react-buttons";
|
|
21
21
|
const O = (e) => {
|
|
22
|
-
const { title:
|
|
22
|
+
const { title: v, subtitle: l, actions: i, images: o, description: E } = e.eventData, [c, k] = t.useState(e.eventData.opened || !1), [r, m] = t.useState(e.eventData.opened || !!e.collapsible), f = (a) => {
|
|
23
23
|
if (k(!c), e.onChange) {
|
|
24
24
|
const n = {
|
|
25
25
|
syntheticEvent: a,
|
|
@@ -28,7 +28,7 @@ const O = (e) => {
|
|
|
28
28
|
};
|
|
29
29
|
e.onChange.call(void 0, n);
|
|
30
30
|
}
|
|
31
|
-
},
|
|
31
|
+
}, b = (a) => {
|
|
32
32
|
if (e.onActionClick) {
|
|
33
33
|
const n = {
|
|
34
34
|
syntheticEvent: a,
|
|
@@ -37,13 +37,13 @@ const O = (e) => {
|
|
|
37
37
|
};
|
|
38
38
|
e.onActionClick.call(void 0, n);
|
|
39
39
|
}
|
|
40
|
-
}, d = () => /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
|
|
40
|
+
}, d = () => /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(D, null, /* @__PURE__ */ t.createElement("div", { className: "k-card-description" }, /* @__PURE__ */ t.createElement("p", null, E), o && o.map((a, n) => /* @__PURE__ */ t.createElement(I, { key: n, src: a.src })))), i && /* @__PURE__ */ t.createElement(g, null, i.map((a, n) => /* @__PURE__ */ t.createElement(
|
|
41
41
|
"a",
|
|
42
42
|
{
|
|
43
43
|
key: n,
|
|
44
44
|
href: a.url,
|
|
45
45
|
className: "k-button k-button-md k-rounded-md k-button-flat k-button-flat-primary",
|
|
46
|
-
onClick:
|
|
46
|
+
onClick: b
|
|
47
47
|
},
|
|
48
48
|
a.text
|
|
49
49
|
))));
|
|
@@ -54,14 +54,15 @@ const O = (e) => {
|
|
|
54
54
|
className: u("k-timeline-card", { "k-collapsed": e.collapsible && r })
|
|
55
55
|
},
|
|
56
56
|
/* @__PURE__ */ t.createElement(
|
|
57
|
-
|
|
57
|
+
C,
|
|
58
58
|
{
|
|
59
|
-
|
|
59
|
+
id: e.panelId,
|
|
60
|
+
"aria-label": e.ariaLabel,
|
|
61
|
+
"aria-live": e.horizontal ? void 0 : "polite",
|
|
60
62
|
"aria-describedby": e.id,
|
|
61
|
-
"aria-atomic": "true",
|
|
62
63
|
tabIndex: e.tabindex,
|
|
63
64
|
role: e.horizontal ? "tabpanel" : "button",
|
|
64
|
-
"aria-expanded": e.collapsible
|
|
65
|
+
"aria-expanded": e.collapsible ? r : void 0,
|
|
65
66
|
className: "k-card-with-callout",
|
|
66
67
|
onClick: (a) => f(a)
|
|
67
68
|
},
|
|
@@ -78,7 +79,7 @@ const O = (e) => {
|
|
|
78
79
|
)
|
|
79
80
|
}
|
|
80
81
|
),
|
|
81
|
-
/* @__PURE__ */ t.createElement("div", { className: "k-card-inner" }, /* @__PURE__ */ t.createElement(
|
|
82
|
+
/* @__PURE__ */ t.createElement("div", { className: "k-card-inner" }, /* @__PURE__ */ t.createElement(N, null, /* @__PURE__ */ t.createElement(h, null, /* @__PURE__ */ t.createElement("span", { className: "k-event-title" }, v), e.collapsible && /* @__PURE__ */ t.createElement(
|
|
82
83
|
x,
|
|
83
84
|
{
|
|
84
85
|
className: "k-event-collapse",
|
|
@@ -86,7 +87,7 @@ const O = (e) => {
|
|
|
86
87
|
size: "xs",
|
|
87
88
|
svgIcon: T
|
|
88
89
|
}
|
|
89
|
-
)), l && /* @__PURE__ */ t.createElement(
|
|
90
|
+
)), l && /* @__PURE__ */ t.createElement(A, null, l)), e.collapsible ? /* @__PURE__ */ t.createElement(
|
|
90
91
|
y,
|
|
91
92
|
{
|
|
92
93
|
transitionEnterDuration: e.transitionDuration || 400,
|
|
@@ -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 ve=require("react"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ve=require("react"),ge=require("prop-types"),Te=require("./TimelineCard.js"),be=require("./utils.js"),X=require("@progress/kendo-svg-icons"),ke=require("@progress/kendo-react-intl"),v=require("@progress/kendo-react-common"),Y=require("@progress/kendo-react-buttons");function Ee(l){const I=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const g in l)if(g!=="default"){const T=Object.getOwnPropertyDescriptor(l,g);Object.defineProperty(I,g,T.get?T:{enumerable:!0,get:()=>l[g]})}}return I.default=l,Object.freeze(I)}const s=Ee(ve),G=l=>{const T=ke.useInternationalization(),[A,J]=s.useState(!1),[O,Q]=s.useState(!0),[Z,ee]=s.useState(),[f,L]=s.useState(0),[y,te]=s.useState(),[u,ne]=s.useState(0),[h,se]=s.useState(0),[a,D]=s.useState(1),[d,R]=s.useState(),[i,re]=s.useState(),[F,W]=s.useState([0,0,0]),[_,U]=s.useState(0),[P,ae]=s.useState(1),V=v.useId(),m=s.useRef(null),c=s.useRef(null),x=s.useRef(null),{eventsData:oe,dateFormat:$,navigatable:ie,onActionClick:ce}=l,j=y?`${y}%`:"150px",b=s.useRef(new v.Navigation({tabIndex:0,root:m,selectors:[".k-timeline-scrollable-wrap"]}));s.useEffect(()=>{m.current&&l.navigatable&&(setTimeout(()=>{const e=b.current.first;e&&e.setAttribute("tabindex",String(0))},0),b.current.keyboardEvents={keydown:{ArrowRight:ue,ArrowLeft:fe,End:me,Home:de}})},[l.navigatable,a,u]),s.useEffect(()=>{b.current.update()});const le=e=>{ie&&b.current&&b.current.triggerKeyboardEvent(e)};s.useEffect(()=>{var r;const e=v.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(w),t=c.current,n=((r=m==null?void 0:m.current)==null?void 0:r.offsetWidth)||0;return e&&t&&e.observe(t),q(),w(),W([n,0,-n]),()=>{e&&e.disconnect()}},[]),s.useEffect(()=>{const e=c.current,t=e&&e.children[a];if(t){const n=t.offsetWidth,r=!(f>=0);if(J(r),i){const o=i.length*n>u*n*((f*-1+100)/100);Q(o)}(e==null?void 0:e.offsetWidth)*-f/100>=e.children.length*n&&(q(),w(),L((t.offsetLeft-t.offsetWidth)/(u*t.offsetWidth)*100*-1)),M(t)}},[u,y,a]);const ue=(e,t,n)=>{if(c.current){const r=c.current.children[a+1],o=r&&r.classList.contains("k-timeline-flag-wrap")?a+2:a+1;if(i&&i.length<=o)return;u+h<=o&&H(),E(o,n)}},fe=(e,t,n)=>{if(c.current){const r=c.current&&c.current.children[a-1],o=r&&r.classList.contains("k-timeline-flag-wrap")?a-2:a-1;if(o<=0)return;o<h&&z(),E(o,n)}},de=(e,t,n)=>{if(c.current){if(a<=1)return;const r=1;N(!0,r,0,0),E(r,n)}},me=(e,t,n)=>{if(c.current){const r=c.current&&c.current.children.length-1;if(r<=a)return;const o=Math.floor(r/u),p=o*-100,S=o*u;N(!0,r,S,p),E(r,n)}},q=()=>{const e=be.addYearsFlags(oe);re(e),R([e[a-1],e[a],e[a+1]])},z=()=>{var t;if(c.current&&i){const n=h-u,r=h-1,o=i[r]&&((t=i[r])!=null&&t.yearFlag)?r-1:r,p=f+100>0?0:f+100;N(!1,o,n,p)}},H=()=>{if(c.current&&i){const t=h+u,n=i[t]&&i[t].yearFlag?t+1:t,r=f-100;N(!0,n,t,r)}},N=(e,t,n,r)=>{C(e,t),w(),se(n),L(r),D(t)},C=(e,t)=>{if(d&&i){const n=k(e,P),r=Object.assign([],d,{[n]:i[t]});R(r),ae(n),U(e?-100:100),setTimeout(()=>{var K;const o=(K=m.current)==null?void 0:K.offsetWidth,p=Object.assign([],F,{[n]:0,[k(!0,n)]:o,[k(!1,n)]:o&&-o}),S=Object.assign([],r,{[k(!0,n)]:{},[k(!1,n)]:{}});R(S),W(p),U(0)},l.transitionDuration||300)}},k=(e,t)=>{const n=e?t+1:t-1;return d?n<0?d.length-1:n%d.length:0},M=e=>{var n,r;const t=(a-h)*e.offsetWidth+e.offsetWidth/2+(((r=(n=x.current)==null?void 0:n.element)==null?void 0:r.clientWidth)||0);ee(t)},E=(e,t)=>{t.preventDefault(),e>a?C(!0,e):e<a&&C(!1,e),D(e)},w=s.useCallback(()=>{const e=c.current,t=e&&e.children[a];if(e instanceof HTMLElement&&t){const n=Math.round(e.offsetWidth/150);M(t),te(100/n),ne(n)}},[]),he=()=>({transitionDuration:"300ms"}),B=e=>({transform:`translateX(${e}%)`,transformOrigin:"left top"});return s.createElement(s.Fragment,null,s.createElement("div",{className:"k-timeline-track-wrap",ref:m,onKeyDown:le},s.createElement(Y.Button,{ref:x,"aria-hidden":"true",rounded:"full",svgIcon:X.chevronLeftIcon,icon:"chevron-left",onClick:()=>A&&z(),className:v.classNames("k-timeline-arrow","k-timeline-arrow-left",{"k-disabled":!A})}),s.createElement(Y.Button,{"aria-hidden":"true",rounded:"full",svgIcon:X.chevronRightIcon,icon:"chevron-right",onClick:()=>O&&H(),className:v.classNames("k-timeline-arrow","k-timeline-arrow-right",{"k-disabled":!O})}),s.createElement("div",{className:"k-timeline-track"},s.createElement("ul",{ref:c,className:"k-timeline-scrollable-wrap",role:"tablist",tabIndex:0,style:{transform:`translateX(${f}%)`}},i==null?void 0:i.map((e,t)=>e.yearFlag?s.createElement("li",{role:"none","aria-hidden":"true",className:"k-timeline-track-item k-timeline-flag-wrap",style:{flex:`1 0 ${j}`},key:t},s.createElement("span",{className:"k-timeline-flag"},e.yearFlag)):s.createElement("li",{role:"tab",className:v.classNames("k-timeline-track-item",{"k-focus":t===a}),"aria-selected":t===a||void 0,"aria-describedby":t===a?V:void 0,style:{flex:`1 0 ${j}`},key:t},s.createElement("div",{className:"k-timeline-date-wrap"},s.createElement("span",{className:"k-timeline-date"},T.formatDate(e.date,$))),s.createElement("span",{onClick:n=>E(t,n),className:"k-timeline-circle"})))))),s.createElement("div",{className:"k-timeline-events-list"},s.createElement("ul",{className:"k-timeline-scrollable-wrap",style:_===0?{...B(_)}:{...B(_),...he()}},d&&d.map((e,t)=>t===P?s.createElement("li",{key:t,className:"k-timeline-event",style:{transform:`translate3d(${F[t]}px, 0px, 0px)`}},e&&s.createElement(Te.TimelineCard,{tabindex:0,panelId:V,eventData:e,ariaLabel:e.date?T.formatDate(e.date,$):void 0,onActionClick:ce,horizontal:!0,collapsible:!1,calloutStyle:{left:`${Z}px`}})):null))))};G.propTypes={onActionClick:ge.func};exports.TimelineHorizontal=G;
|
|
@@ -6,16 +6,16 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as s from "react";
|
|
9
|
-
import
|
|
10
|
-
import { TimelineCard as
|
|
11
|
-
import { addYearsFlags as
|
|
12
|
-
import { chevronLeftIcon as
|
|
13
|
-
import { useInternationalization as
|
|
14
|
-
import {
|
|
15
|
-
import { Button as
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
new
|
|
9
|
+
import ut from "prop-types";
|
|
10
|
+
import { TimelineCard as mt } from "./TimelineCard.mjs";
|
|
11
|
+
import { addYearsFlags as dt } from "./utils.mjs";
|
|
12
|
+
import { chevronLeftIcon as ht, chevronRightIcon as vt } from "@progress/kendo-svg-icons";
|
|
13
|
+
import { useInternationalization as Et } from "@progress/kendo-react-intl";
|
|
14
|
+
import { useId as Tt, Navigation as gt, canUseDOM as pt, classNames as C } from "@progress/kendo-react-common";
|
|
15
|
+
import { Button as X } from "@progress/kendo-react-buttons";
|
|
16
|
+
const kt = (g) => {
|
|
17
|
+
const R = Et(), [_, Y] = s.useState(!1), [A, B] = s.useState(!0), [q, G] = s.useState(), [f, S] = s.useState(0), [b, J] = s.useState(), [l, Q] = s.useState(0), [d, Z] = s.useState(0), [a, L] = s.useState(1), [u, I] = s.useState(), [i, tt] = s.useState(), [F, O] = s.useState([0, 0, 0]), [w, W] = s.useState(0), [U, et] = s.useState(1), D = Tt(), m = s.useRef(null), c = s.useRef(null), V = s.useRef(null), { eventsData: nt, dateFormat: x, navigatable: st, onActionClick: rt } = g, P = b ? `${b}%` : "150px", h = s.useRef(
|
|
18
|
+
new gt({
|
|
19
19
|
tabIndex: 0,
|
|
20
20
|
root: m,
|
|
21
21
|
selectors: [".k-timeline-scrollable-wrap"]
|
|
@@ -27,156 +27,157 @@ const gt = (g) => {
|
|
|
27
27
|
t && t.setAttribute("tabindex", String(0));
|
|
28
28
|
}, 0), h.current.keyboardEvents = {
|
|
29
29
|
keydown: {
|
|
30
|
-
ArrowRight:
|
|
31
|
-
ArrowLeft:
|
|
32
|
-
End:
|
|
33
|
-
Home:
|
|
30
|
+
ArrowRight: ot,
|
|
31
|
+
ArrowLeft: it,
|
|
32
|
+
End: lt,
|
|
33
|
+
Home: ct
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
}, [g.navigatable, a, l]), s.useEffect(() => {
|
|
37
37
|
h.current.update();
|
|
38
38
|
});
|
|
39
|
-
const
|
|
40
|
-
|
|
39
|
+
const at = (t) => {
|
|
40
|
+
st && h.current && h.current.triggerKeyboardEvent(t);
|
|
41
41
|
};
|
|
42
42
|
s.useEffect(() => {
|
|
43
43
|
var r;
|
|
44
|
-
const t =
|
|
45
|
-
return t && e && t.observe(e),
|
|
44
|
+
const t = pt && window.ResizeObserver && new window.ResizeObserver(k), e = c.current, n = ((r = m == null ? void 0 : m.current) == null ? void 0 : r.offsetWidth) || 0;
|
|
45
|
+
return t && e && t.observe(e), $(), k(), O([n, 0, -n]), () => {
|
|
46
46
|
t && t.disconnect();
|
|
47
47
|
};
|
|
48
48
|
}, []), s.useEffect(() => {
|
|
49
|
-
const t =
|
|
49
|
+
const t = c.current, e = t && t.children[a];
|
|
50
50
|
if (e) {
|
|
51
51
|
const n = e.offsetWidth, r = !(f >= 0);
|
|
52
|
-
if (
|
|
53
|
-
const o =
|
|
54
|
-
|
|
52
|
+
if (Y(r), i) {
|
|
53
|
+
const o = i.length * n > l * n * ((f * -1 + 100) / 100);
|
|
54
|
+
B(o);
|
|
55
55
|
}
|
|
56
|
-
(t == null ? void 0 : t.offsetWidth) * -f / 100 >= t.children.length * n && (
|
|
56
|
+
(t == null ? void 0 : t.offsetWidth) * -f / 100 >= t.children.length * n && ($(), k(), S(
|
|
57
57
|
(e.offsetLeft - e.offsetWidth) / (l * e.offsetWidth) * 100 * -1
|
|
58
|
-
)),
|
|
58
|
+
)), M(e);
|
|
59
59
|
}
|
|
60
60
|
}, [l, b, a]);
|
|
61
|
-
const
|
|
62
|
-
if (
|
|
63
|
-
const r =
|
|
64
|
-
if (
|
|
61
|
+
const ot = (t, e, n) => {
|
|
62
|
+
if (c.current) {
|
|
63
|
+
const r = c.current.children[a + 1], o = r && r.classList.contains("k-timeline-flag-wrap") ? a + 2 : a + 1;
|
|
64
|
+
if (i && i.length <= o)
|
|
65
65
|
return;
|
|
66
|
-
l + d <= o &&
|
|
66
|
+
l + d <= o && z(), E(o, n);
|
|
67
67
|
}
|
|
68
|
-
},
|
|
69
|
-
if (
|
|
70
|
-
const r =
|
|
68
|
+
}, it = (t, e, n) => {
|
|
69
|
+
if (c.current) {
|
|
70
|
+
const r = c.current && c.current.children[a - 1], o = r && r.classList.contains("k-timeline-flag-wrap") ? a - 2 : a - 1;
|
|
71
71
|
if (o <= 0)
|
|
72
72
|
return;
|
|
73
|
-
o < d &&
|
|
73
|
+
o < d && H(), E(o, n);
|
|
74
74
|
}
|
|
75
|
-
},
|
|
76
|
-
if (
|
|
75
|
+
}, ct = (t, e, n) => {
|
|
76
|
+
if (c.current) {
|
|
77
77
|
if (a <= 1)
|
|
78
78
|
return;
|
|
79
79
|
const r = 1;
|
|
80
|
-
|
|
80
|
+
p(!0, r, 0, 0), E(r, n);
|
|
81
81
|
}
|
|
82
|
-
},
|
|
83
|
-
if (
|
|
84
|
-
const r =
|
|
82
|
+
}, lt = (t, e, n) => {
|
|
83
|
+
if (c.current) {
|
|
84
|
+
const r = c.current && c.current.children.length - 1;
|
|
85
85
|
if (r <= a)
|
|
86
86
|
return;
|
|
87
|
-
const o = Math.floor(r / l),
|
|
88
|
-
|
|
87
|
+
const o = Math.floor(r / l), T = o * -100, y = o * l;
|
|
88
|
+
p(!0, r, y, T), E(r, n);
|
|
89
89
|
}
|
|
90
|
-
},
|
|
91
|
-
const t =
|
|
92
|
-
|
|
93
|
-
},
|
|
90
|
+
}, $ = () => {
|
|
91
|
+
const t = dt(nt);
|
|
92
|
+
tt(t), I([t[a - 1], t[a], t[a + 1]]);
|
|
93
|
+
}, H = () => {
|
|
94
94
|
var e;
|
|
95
|
-
if (
|
|
96
|
-
const n = d - l, r = d - 1, o =
|
|
97
|
-
|
|
95
|
+
if (c.current && i) {
|
|
96
|
+
const n = d - l, r = d - 1, o = i[r] && ((e = i[r]) != null && e.yearFlag) ? r - 1 : r, T = f + 100 > 0 ? 0 : f + 100;
|
|
97
|
+
p(!1, o, n, T);
|
|
98
98
|
}
|
|
99
|
-
},
|
|
100
|
-
if (
|
|
101
|
-
const e = d + l, n =
|
|
102
|
-
|
|
99
|
+
}, z = () => {
|
|
100
|
+
if (c.current && i) {
|
|
101
|
+
const e = d + l, n = i[e] && i[e].yearFlag ? e + 1 : e, r = f - 100;
|
|
102
|
+
p(!0, n, e, r);
|
|
103
103
|
}
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
},
|
|
107
|
-
if (u &&
|
|
108
|
-
const n = v(t,
|
|
109
|
-
I(r),
|
|
110
|
-
var
|
|
111
|
-
const o = (
|
|
104
|
+
}, p = (t, e, n, r) => {
|
|
105
|
+
N(t, e), k(), Z(n), S(r), L(e);
|
|
106
|
+
}, N = (t, e) => {
|
|
107
|
+
if (u && i) {
|
|
108
|
+
const n = v(t, U), r = Object.assign([], u, { [n]: i[e] });
|
|
109
|
+
I(r), et(n), W(t ? -100 : 100), setTimeout(() => {
|
|
110
|
+
var K;
|
|
111
|
+
const o = (K = m.current) == null ? void 0 : K.offsetWidth, T = Object.assign([], F, {
|
|
112
112
|
[n]: 0,
|
|
113
113
|
[v(!0, n)]: o,
|
|
114
114
|
[v(!1, n)]: o && -o
|
|
115
|
-
}),
|
|
115
|
+
}), y = Object.assign([], r, {
|
|
116
116
|
[v(!0, n)]: {},
|
|
117
117
|
[v(!1, n)]: {}
|
|
118
118
|
});
|
|
119
|
-
I(
|
|
119
|
+
I(y), O(T), W(0);
|
|
120
120
|
}, g.transitionDuration || 300);
|
|
121
121
|
}
|
|
122
122
|
}, v = (t, e) => {
|
|
123
123
|
const n = t ? e + 1 : e - 1;
|
|
124
124
|
return u ? n < 0 ? u.length - 1 : n % u.length : 0;
|
|
125
|
-
},
|
|
125
|
+
}, M = (t) => {
|
|
126
126
|
var n, r;
|
|
127
|
-
const e = (a - d) * t.offsetWidth + t.offsetWidth / 2 + (((r = (n =
|
|
128
|
-
|
|
129
|
-
},
|
|
130
|
-
e.preventDefault(), t > a ?
|
|
131
|
-
},
|
|
132
|
-
const t =
|
|
127
|
+
const e = (a - d) * t.offsetWidth + t.offsetWidth / 2 + (((r = (n = V.current) == null ? void 0 : n.element) == null ? void 0 : r.clientWidth) || 0);
|
|
128
|
+
G(e);
|
|
129
|
+
}, E = (t, e) => {
|
|
130
|
+
e.preventDefault(), t > a ? N(!0, t) : t < a && N(!1, t), L(t);
|
|
131
|
+
}, k = s.useCallback(() => {
|
|
132
|
+
const t = c.current, e = t && t.children[a];
|
|
133
133
|
if (t instanceof HTMLElement && e) {
|
|
134
134
|
const n = Math.round(t.offsetWidth / 150);
|
|
135
|
-
|
|
135
|
+
M(e), J(100 / n), Q(n);
|
|
136
136
|
}
|
|
137
|
-
}, []),
|
|
137
|
+
}, []), ft = () => ({
|
|
138
138
|
transitionDuration: "300ms"
|
|
139
|
-
}),
|
|
139
|
+
}), j = (t) => ({
|
|
140
140
|
transform: `translateX(${t}%)`,
|
|
141
141
|
transformOrigin: "left top"
|
|
142
142
|
});
|
|
143
|
-
return /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement("div", { className: "k-timeline-track-wrap", ref: m, onKeyDown:
|
|
144
|
-
|
|
143
|
+
return /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement("div", { className: "k-timeline-track-wrap", ref: m, onKeyDown: at }, /* @__PURE__ */ s.createElement(
|
|
144
|
+
X,
|
|
145
145
|
{
|
|
146
|
-
ref:
|
|
146
|
+
ref: V,
|
|
147
147
|
"aria-hidden": "true",
|
|
148
148
|
rounded: "full",
|
|
149
|
-
svgIcon:
|
|
149
|
+
svgIcon: ht,
|
|
150
150
|
icon: "chevron-left",
|
|
151
|
-
onClick: () =>
|
|
152
|
-
className:
|
|
151
|
+
onClick: () => _ && H(),
|
|
152
|
+
className: C("k-timeline-arrow", "k-timeline-arrow-left", { "k-disabled": !_ })
|
|
153
153
|
}
|
|
154
154
|
), /* @__PURE__ */ s.createElement(
|
|
155
|
-
|
|
155
|
+
X,
|
|
156
156
|
{
|
|
157
157
|
"aria-hidden": "true",
|
|
158
158
|
rounded: "full",
|
|
159
|
-
svgIcon:
|
|
159
|
+
svgIcon: vt,
|
|
160
160
|
icon: "chevron-right",
|
|
161
|
-
onClick: () => A &&
|
|
162
|
-
className:
|
|
161
|
+
onClick: () => A && z(),
|
|
162
|
+
className: C("k-timeline-arrow", "k-timeline-arrow-right", { "k-disabled": !A })
|
|
163
163
|
}
|
|
164
164
|
), /* @__PURE__ */ s.createElement("div", { className: "k-timeline-track" }, /* @__PURE__ */ s.createElement(
|
|
165
165
|
"ul",
|
|
166
166
|
{
|
|
167
|
-
ref:
|
|
167
|
+
ref: c,
|
|
168
168
|
className: "k-timeline-scrollable-wrap",
|
|
169
169
|
role: "tablist",
|
|
170
170
|
tabIndex: 0,
|
|
171
171
|
style: { transform: `translateX(${f}%)` }
|
|
172
172
|
},
|
|
173
|
-
|
|
173
|
+
i == null ? void 0 : i.map(
|
|
174
174
|
(t, e) => t.yearFlag ? /* @__PURE__ */ s.createElement(
|
|
175
175
|
"li",
|
|
176
176
|
{
|
|
177
177
|
role: "none",
|
|
178
|
+
"aria-hidden": "true",
|
|
178
179
|
className: "k-timeline-track-item k-timeline-flag-wrap",
|
|
179
|
-
style: { flex: `1 0 ${
|
|
180
|
+
style: { flex: `1 0 ${P}` },
|
|
180
181
|
key: e
|
|
181
182
|
},
|
|
182
183
|
/* @__PURE__ */ s.createElement("span", { className: "k-timeline-flag" }, t.yearFlag)
|
|
@@ -184,47 +185,50 @@ const gt = (g) => {
|
|
|
184
185
|
"li",
|
|
185
186
|
{
|
|
186
187
|
role: "tab",
|
|
187
|
-
className:
|
|
188
|
+
className: C("k-timeline-track-item", {
|
|
188
189
|
"k-focus": e === a
|
|
189
190
|
}),
|
|
190
|
-
"aria-selected": e === a,
|
|
191
|
-
|
|
191
|
+
"aria-selected": e === a || void 0,
|
|
192
|
+
"aria-describedby": e === a ? D : void 0,
|
|
193
|
+
style: { flex: `1 0 ${P}` },
|
|
192
194
|
key: e
|
|
193
195
|
},
|
|
194
|
-
/* @__PURE__ */ s.createElement("div", { className: "k-timeline-date-wrap" }, /* @__PURE__ */ s.createElement("span", { className: "k-timeline-date" },
|
|
195
|
-
/* @__PURE__ */ s.createElement("span", { onClick: (n) =>
|
|
196
|
+
/* @__PURE__ */ s.createElement("div", { className: "k-timeline-date-wrap" }, /* @__PURE__ */ s.createElement("span", { className: "k-timeline-date" }, R.formatDate(t.date, x))),
|
|
197
|
+
/* @__PURE__ */ s.createElement("span", { onClick: (n) => E(e, n), className: "k-timeline-circle" })
|
|
196
198
|
)
|
|
197
199
|
)
|
|
198
200
|
))), /* @__PURE__ */ s.createElement("div", { className: "k-timeline-events-list" }, /* @__PURE__ */ s.createElement(
|
|
199
201
|
"ul",
|
|
200
202
|
{
|
|
201
203
|
className: "k-timeline-scrollable-wrap",
|
|
202
|
-
style:
|
|
204
|
+
style: w === 0 ? { ...j(w) } : { ...j(w), ...ft() }
|
|
203
205
|
},
|
|
204
|
-
u && u.map((t, e) => /* @__PURE__ */ s.createElement(
|
|
206
|
+
u && u.map((t, e) => e === U ? /* @__PURE__ */ s.createElement(
|
|
205
207
|
"li",
|
|
206
208
|
{
|
|
207
209
|
key: e,
|
|
208
210
|
className: "k-timeline-event",
|
|
209
|
-
style: { transform: `translate3d(${
|
|
211
|
+
style: { transform: `translate3d(${F[e]}px, 0px, 0px)` }
|
|
210
212
|
},
|
|
211
213
|
t && /* @__PURE__ */ s.createElement(
|
|
212
|
-
|
|
214
|
+
mt,
|
|
213
215
|
{
|
|
214
|
-
tabindex:
|
|
216
|
+
tabindex: 0,
|
|
217
|
+
panelId: D,
|
|
215
218
|
eventData: t,
|
|
216
|
-
|
|
219
|
+
ariaLabel: t.date ? R.formatDate(t.date, x) : void 0,
|
|
220
|
+
onActionClick: rt,
|
|
217
221
|
horizontal: !0,
|
|
218
222
|
collapsible: !1,
|
|
219
|
-
calloutStyle: { left: `${
|
|
223
|
+
calloutStyle: { left: `${q}px` }
|
|
220
224
|
}
|
|
221
225
|
)
|
|
222
|
-
))
|
|
226
|
+
) : null)
|
|
223
227
|
)));
|
|
224
228
|
};
|
|
225
|
-
|
|
226
|
-
onActionClick:
|
|
229
|
+
kt.propTypes = {
|
|
230
|
+
onActionClick: ut.func
|
|
227
231
|
};
|
|
228
232
|
export {
|
|
229
|
-
|
|
233
|
+
kt as TimelineHorizontal
|
|
230
234
|
};
|