@progress/kendo-react-scrollview 9.0.0-develop.2 → 9.0.0-develop.20
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/README.md +19 -19
- package/ScrollView.mjs +63 -60
- package/package-metadata.mjs +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
<img src="https://www.telerik.com/kendo-react-ui/components/npm-banner.svg" alt="KendoReact NPM Banner">
|
|
3
3
|
</a>
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
# KendoReact ScrollView Component for React
|
|
7
6
|
|
|
8
7
|
> **Important**
|
|
9
|
-
>
|
|
10
|
-
>
|
|
11
|
-
>
|
|
12
|
-
>
|
|
8
|
+
>
|
|
9
|
+
> - This package is а part of [KendoReact](https://www.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scrollview)—a commercial UI library.
|
|
10
|
+
> - You will need to install a license key when adding the package to your project. For more information, please refer to the [KendoReact My License page](https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scrollview).
|
|
11
|
+
> - To receive a license key, you need to either [purchase a license](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scrollview) or register for a [free trial](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scrollview). Doing so indicates that you [accept the KendoReact License Agreement](https://www.telerik.com/purchase/license-agreement/progress-kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scrollview).
|
|
12
|
+
> - The 30-day free trial gives you access to all the KendoReact components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the KendoReact dev team!
|
|
13
13
|
>
|
|
14
14
|
> [Start using KendoReact](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scrollview) and speed up your development process!
|
|
15
15
|
|
|
@@ -17,25 +17,25 @@
|
|
|
17
17
|
|
|
18
18
|
For any issues you might encounter while working with the KendoReact ScrollView, use any of the available support channels:
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
- Industry-leading technical support—KendoReact paid license holders and users with an active (free) trial license can take advantage of our outstanding customer support. To submit a ticket, use [the dedicated KendoReact support system](https://www.telerik.com/account/support-tickets?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scrollview).
|
|
21
|
+
- Product forums—The [KendoReact forums](https://www.telerik.com/forums/kendo-ui-react?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scrollview) are part of the free support you can get from the community and from the KendoReact team.
|
|
22
|
+
- Feedback portal—The [KendoReact feedback portal](https://feedback.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scrollview) is where you can request and vote for new features to be added.
|
|
23
23
|
|
|
24
24
|
## Resources
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
- [Getting Started with KendoReact](https://www.telerik.com/kendo-react-ui/components/getting-started/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scrollview)
|
|
27
|
+
- [Get Started with the KendoReact ScrollView](https://www.telerik.com/kendo-react-ui/components/scrollview/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scrollview)
|
|
28
|
+
- [API Reference of the KendoReact ScrollView](https://www.telerik.com/kendo-react-ui/components/scrollview/api/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scrollview)
|
|
29
|
+
- [KendoReact Roadmap](https://www.telerik.com/support/whats-new/kendo-react-ui/roadmap?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scrollview)
|
|
30
|
+
- [Blogs](https://www.telerik.com/blogs/tag/kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scrollview)
|
|
31
|
+
- [Demos, documentation, and component reference](https://www.telerik.com/kendo-react-ui/components/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scrollview)
|
|
32
|
+
- [KendoReact pricing and licensing](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scrollview)
|
|
33
|
+
- [Changelog](https://www.telerik.com/kendo-react-ui/components/changelogs/ui-for-react/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scrollview)
|
|
34
34
|
|
|
35
35
|
High-level component overview pages
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
- [React ScrollView (Carousel) Component](https://www.telerik.com/kendo-react-ui/scrollview)
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
_Copyright © 2021 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved._
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
_Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries._
|
package/ScrollView.mjs
CHANGED
|
@@ -26,12 +26,9 @@ const O = e.forwardRef((d, B) => {
|
|
|
26
26
|
activeView: j = m.activeView,
|
|
27
27
|
automaticViewChange: C = m.automaticViewChange,
|
|
28
28
|
automaticViewChangeInterval: E = m.automaticViewChangeInterval
|
|
29
|
-
} = d, [a, s] = e.useState(j || 1), c = e.useRef(null), v = e.useRef(null), h = e.useRef(null), l = e.Children.toArray(y), p = Q(c, d.dir), i = p === "rtl", N = X(), I = e.useCallback(
|
|
30
|
-
()
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
[]
|
|
34
|
-
), F = e.useCallback(
|
|
29
|
+
} = d, [a, s] = e.useState(j || 1), c = e.useRef(null), v = e.useRef(null), h = e.useRef(null), l = e.Children.toArray(y), p = Q(c, d.dir), i = p === "rtl", N = X(), I = e.useCallback(() => {
|
|
30
|
+
c.current && c.current.focus();
|
|
31
|
+
}, []), F = e.useCallback(
|
|
35
32
|
() => ({
|
|
36
33
|
element: c.current,
|
|
37
34
|
focus: I
|
|
@@ -43,11 +40,14 @@ const O = e.forwardRef((d, B) => {
|
|
|
43
40
|
r ? a > 1 ? s(a - 1) : s(l.length) : a > 1 && s(a - 1);
|
|
44
41
|
}, [a, l.length, r]), g = e.useCallback(() => {
|
|
45
42
|
r ? a < l.length ? s(a + 1) : s(1) : a < l.length && s(a + 1);
|
|
46
|
-
}, [a, l.length, r]), V = e.useCallback(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
43
|
+
}, [a, l.length, r]), V = e.useCallback(
|
|
44
|
+
(t) => {
|
|
45
|
+
var L, x;
|
|
46
|
+
const o = t.target;
|
|
47
|
+
o.classList.contains("k-scrollview-prev") ? (u(), !((r || a > 2) && l.length > 0) && ((L = c.current) == null || L.focus())) : o.classList.contains("k-scrollview-next") && (g(), !((r || a < l.length - 1) && l.length > 0) && ((x = c.current) == null || x.focus()));
|
|
48
|
+
},
|
|
49
|
+
[a, l.length, r]
|
|
50
|
+
);
|
|
51
51
|
e.useEffect(() => {
|
|
52
52
|
const t = l.length;
|
|
53
53
|
v.current && (v.current.style.setProperty("--kendo-scrollview-views", `${t}`), v.current.style.setProperty("--kendo-scrollview-current", `${a}`));
|
|
@@ -92,69 +92,72 @@ const O = e.forwardRef((d, B) => {
|
|
|
92
92
|
b
|
|
93
93
|
),
|
|
94
94
|
[b, w]
|
|
95
|
-
), Y = e.Children.map(y || null, (t, o) => /* @__PURE__ */ e.createElement(
|
|
96
|
-
"div",
|
|
97
|
-
{
|
|
98
|
-
className: "k-scrollview-view",
|
|
99
|
-
"aria-hidden": a !== o + 1
|
|
100
|
-
},
|
|
101
|
-
t
|
|
102
|
-
)), _ = e.useCallback(() => {
|
|
95
|
+
), Y = e.Children.map(y || null, (t, o) => /* @__PURE__ */ e.createElement("div", { className: "k-scrollview-view", "aria-hidden": a !== o + 1 }, t)), _ = e.useCallback(() => {
|
|
103
96
|
let t;
|
|
104
97
|
return t = a > 1, (r || t) && l.length > 0;
|
|
105
98
|
}, [a, l.length, r]), q = e.useCallback(() => {
|
|
106
99
|
let t;
|
|
107
100
|
return t = a < l.length, (r || t) && l.length > 0;
|
|
108
101
|
}, [a, l.length, r]);
|
|
109
|
-
return /* @__PURE__ */ e.createElement(
|
|
110
|
-
"
|
|
102
|
+
return /* @__PURE__ */ e.createElement(
|
|
103
|
+
"div",
|
|
111
104
|
{
|
|
112
|
-
className:
|
|
113
|
-
|
|
114
|
-
|
|
105
|
+
className: W,
|
|
106
|
+
style: H,
|
|
107
|
+
ref: c,
|
|
115
108
|
tabIndex: 0,
|
|
116
|
-
|
|
109
|
+
dir: p,
|
|
117
110
|
onKeyDown: k
|
|
118
111
|
},
|
|
119
|
-
/* @__PURE__ */ e.createElement(
|
|
120
|
-
|
|
112
|
+
/* @__PURE__ */ e.createElement("div", { className: "k-scrollview-wrap k-scrollview-animate", ref: v }, Y),
|
|
113
|
+
/* @__PURE__ */ e.createElement("div", { className: "k-scrollview-elements" }, $ && /* @__PURE__ */ e.createElement(e.Fragment, null, _() && /* @__PURE__ */ e.createElement(
|
|
114
|
+
"span",
|
|
121
115
|
{
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
/* @__PURE__ */ e.createElement(
|
|
138
|
-
|
|
116
|
+
className: "k-scrollview-prev",
|
|
117
|
+
"aria-label": N.toLanguageString(T, A[T]),
|
|
118
|
+
role: "button",
|
|
119
|
+
tabIndex: 0,
|
|
120
|
+
onClick: u,
|
|
121
|
+
onKeyDown: k
|
|
122
|
+
},
|
|
123
|
+
/* @__PURE__ */ e.createElement(
|
|
124
|
+
P,
|
|
125
|
+
{
|
|
126
|
+
name: i ? "chevron-right" : "chevron-left",
|
|
127
|
+
icon: i ? K : S,
|
|
128
|
+
size: "xxxlarge"
|
|
129
|
+
}
|
|
130
|
+
)
|
|
131
|
+
), q() && /* @__PURE__ */ e.createElement(
|
|
132
|
+
"span",
|
|
139
133
|
{
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
"k-link",
|
|
134
|
+
className: "k-scrollview-next",
|
|
135
|
+
"aria-label": N.toLanguageString(z, A[z]),
|
|
136
|
+
role: "button",
|
|
137
|
+
tabIndex: 0,
|
|
138
|
+
onClick: g,
|
|
139
|
+
onKeyDown: k
|
|
140
|
+
},
|
|
141
|
+
/* @__PURE__ */ e.createElement(
|
|
142
|
+
P,
|
|
150
143
|
{
|
|
151
|
-
|
|
144
|
+
name: i ? "chevron-left" : "chevron-right",
|
|
145
|
+
icon: i ? S : K,
|
|
146
|
+
size: "xxxlarge"
|
|
152
147
|
}
|
|
153
|
-
)
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
148
|
+
)
|
|
149
|
+
)), M && /* @__PURE__ */ e.createElement("div", { className: "k-scrollview-nav-wrap" }, /* @__PURE__ */ e.createElement("div", { className: "k-scrollview-nav" }, l.map((t, o) => /* @__PURE__ */ e.createElement(
|
|
150
|
+
"span",
|
|
151
|
+
{
|
|
152
|
+
className: D("k-link", {
|
|
153
|
+
"k-primary": a === o + 1
|
|
154
|
+
}),
|
|
155
|
+
key: o + 1,
|
|
156
|
+
onClick: () => s(o + 1)
|
|
157
|
+
}
|
|
158
|
+
))))),
|
|
159
|
+
/* @__PURE__ */ e.createElement("div", { "aria-live": "polite", "aria-atomic": "true", className: "k-sr-only" })
|
|
160
|
+
);
|
|
158
161
|
});
|
|
159
162
|
O.propTypes = {
|
|
160
163
|
activeView: n.number,
|
package/package-metadata.mjs
CHANGED
|
@@ -10,7 +10,7 @@ const e = {
|
|
|
10
10
|
name: "@progress/kendo-react-scrollview",
|
|
11
11
|
productName: "KendoReact",
|
|
12
12
|
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
13
|
-
publishDate:
|
|
13
|
+
publishDate: 1731057203,
|
|
14
14
|
version: "",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
16
16
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-scrollview",
|
|
3
|
-
"version": "9.0.0-develop.
|
|
3
|
+
"version": "9.0.0-develop.20",
|
|
4
4
|
"description": "React ScrollView (React Carousel) displays images or content in a horizontally scrollable collection. KendoReact ScrollView package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"sideEffects": false,
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@progress/kendo-licensing": "^1.3.4",
|
|
26
|
-
"@progress/kendo-react-common": "9.0.0-develop.
|
|
26
|
+
"@progress/kendo-react-common": "9.0.0-develop.20",
|
|
27
27
|
"@progress/kendo-svg-icons": "^3.0.0",
|
|
28
28
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0",
|
|
29
29
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
|