@progress/kendo-react-layout 9.0.0-develop.1 → 9.0.0-develop.3
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 +82 -82
- package/actionsheet/ActionSheet.js +1 -1
- package/actionsheet/ActionSheet.mjs +25 -38
- package/actionsheet/ActionSheetFooter.mjs +1 -10
- package/actionsheet/ActionSheetHeader.mjs +1 -10
- package/actionsheet/ActionSheetItem.mjs +10 -7
- package/appbar/AppBar.mjs +5 -30
- package/appbar/AppBarSection.mjs +4 -17
- package/appbar/AppBarSpacer.mjs +6 -16
- package/bottomnavigation/BottomNavigation.mjs +30 -54
- package/bottomnavigation/BottomNavigationItem.mjs +63 -61
- package/breadcrumb/Breadcrumb.mjs +39 -63
- package/breadcrumb/BreadcrumbDelimiter.mjs +29 -24
- package/breadcrumb/BreadcrumbLink.mjs +16 -18
- package/breadcrumb/BreadcrumbListItem.mjs +31 -29
- package/breadcrumb/BreadcrumbOrderedList.mjs +47 -42
- package/card/Avatar.mjs +15 -1
- package/card/CardBody.mjs +1 -11
- package/card/CardFooter.mjs +1 -11
- package/card/CardHeader.mjs +1 -11
- package/card/CardImage.mjs +1 -4
- package/card/CardSubtitle.mjs +1 -11
- package/card/CardTitle.mjs +1 -11
- package/dist/cdn/js/kendo-react-layout.js +1 -1
- package/drawer/Drawer.mjs +10 -21
- package/drawer/DrawerContent.mjs +6 -3
- package/drawer/DrawerItem.mjs +10 -10
- package/drawer/DrawerNavigation.mjs +109 -130
- package/expansionpanel/ExpansionPanel.mjs +12 -15
- package/expansionpanel/ExpansionPanelContent.mjs +3 -9
- package/gridlayout/GridLayout.mjs +1 -10
- package/gridlayout/GridLayoutItem.mjs +1 -10
- package/menu/components/MenuItemLink.mjs +4 -17
- package/menu/utils/getNewItemIdUponKeyboardNavigation.js +1 -1
- package/menu/utils/getNewItemIdUponKeyboardNavigation.mjs +55 -57
- package/menu/utils/hoverDelay.js +1 -1
- package/menu/utils/hoverDelay.mjs +2 -2
- package/menu/utils/itemsIdsUtils.js +1 -1
- package/menu/utils/itemsIdsUtils.mjs +14 -18
- package/menu/utils/misc.js +1 -1
- package/menu/utils/misc.mjs +2 -2
- package/menu/utils/prepareInputItemsForInternalWork.js +1 -1
- package/menu/utils/prepareInputItemsForInternalWork.mjs +30 -31
- package/package-metadata.mjs +1 -1
- package/package.json +6 -6
- package/panelbar/PanelBar.mjs +2 -7
- package/panelbar/util.js +1 -1
- package/panelbar/util.mjs +27 -40
- package/splitter/SplitterBar.mjs +23 -40
- package/splitter/SplitterPane.mjs +1 -11
- package/stacklayout/StackLayout.mjs +2 -14
- package/stepper/Step.mjs +25 -46
- package/stepper/Stepper.js +1 -1
- package/stepper/Stepper.mjs +59 -78
- package/tabstrip/TabStripContent.mjs +2 -14
- package/tabstrip/TabStripTab.mjs +2 -9
- package/tilelayout/InternalTile.mjs +31 -19
- package/tilelayout/ResizeHandlers.mjs +7 -1
- package/tilelayout/TileLayout.mjs +24 -20
- package/timeline/TimelineCard.mjs +1 -4
- package/timeline/TimelineHorizontal.mjs +52 -63
- package/timeline/TimelineVertical.mjs +7 -5
- package/timeline/utils.mjs +4 -1
package/README.md
CHANGED
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
# KendoReact Layout Library for React
|
|
6
6
|
|
|
7
7
|
> **Important**
|
|
8
|
-
>
|
|
9
|
-
>
|
|
10
|
-
>
|
|
11
|
-
>
|
|
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-layout)—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-layout).
|
|
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-layout) 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-layout). 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-layout).
|
|
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!
|
|
12
13
|
>
|
|
13
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-layout) and speed up your development process!
|
|
14
15
|
|
|
@@ -16,23 +17,23 @@ The React Layout components, part of KendoReact, enable you to create a percepti
|
|
|
16
17
|
|
|
17
18
|
What's in this package (ToC):
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
20
|
+
- [React AppBar component](#react-appbar-component)
|
|
21
|
+
- [React Avatar component](#react-avatar-component)
|
|
22
|
+
- [React BottomNavigation component](#react-bottomnavigation-component)
|
|
23
|
+
- [React Breadcrumb component](#react-breadcrumb-component)
|
|
24
|
+
- [React Card component](#react-card-component)
|
|
25
|
+
- [React Drawer component](#react-drawer-component)
|
|
26
|
+
- [React GridLayout component](#react-gridlayout-component)
|
|
27
|
+
- [React Menu component](#react-menu-component)
|
|
28
|
+
- [React PanelBar component](#react-panelbar-component)
|
|
29
|
+
- [React Splitter component](#react-splitter-component)
|
|
30
|
+
- [React StackLayout component](#react-stacklayout-component)
|
|
31
|
+
- [React Stepper component](#react-stepper-component)
|
|
32
|
+
- [React TabStrip component](#react-tabstrip-component)
|
|
33
|
+
- [React TileLayout component](#react-tilelayout-component)
|
|
34
|
+
- [React Layout Components Library Features](#react-layout-library-shared-features)
|
|
35
|
+
- [Support Options](#support-options)
|
|
36
|
+
- [Resources](#resources)
|
|
36
37
|
|
|
37
38
|
## React AppBar Component
|
|
38
39
|
|
|
@@ -40,9 +41,9 @@ What's in this package (ToC):
|
|
|
40
41
|
|
|
41
42
|
### Key Features
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
- **Positioning**—The AppBar can be positioned either at the top or bottom of any React application.
|
|
45
|
+
- **Content Arrangement**—To assist with arranging the content of the React AppBar, there are several layout components like the Section, Spacing and Separator, which can be used to make the KendoReact AppBar fit any design.
|
|
46
|
+
- **Responsive Design**—The KendoReact AppBar component can adhere to any responsive design rules provided by the React application.
|
|
46
47
|
|
|
47
48
|
## React Avatar Component
|
|
48
49
|
|
|
@@ -54,9 +55,9 @@ What's in this package (ToC):
|
|
|
54
55
|
|
|
55
56
|
### Key Features
|
|
56
57
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
- **Content Types**—Through a few simple configuration options, the items of the KendoReact Bottom Navigation component can be set up to show icons, text or a mix of both.
|
|
59
|
+
- **Positioning**—Positioning HTML elements can be tricky, but the React Bottom Navigation component can be easily positioned through a single configuration option.
|
|
60
|
+
- **Appearance**—Options like filling in each item with a solid color or just rendering an outline, as well as appearance options associated with success, warning, error, primary and more common scenarios let React developers make the React Bottom Navigation component fit any design requirements.
|
|
60
61
|
|
|
61
62
|
## React Breadcrumb Component
|
|
62
63
|
|
|
@@ -68,9 +69,9 @@ What's in this package (ToC):
|
|
|
68
69
|
|
|
69
70
|
### Key Features
|
|
70
71
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
- **Card Types**—While the KendoReact Card component has a default look -and -feel which can be customized to fit any UX requirements, it does also come with several built-in styles to cut down on the number of customizations needed.
|
|
73
|
+
- **Action Buttons**—Every React Card has a dedicated area for action buttons related to the content.
|
|
74
|
+
- **Layouts**—When rendering multiple KendoReact Card components, there are several built-in layouts to help display cards in various ways, including building a list from top to bottom as well as rendering the cards side-by-side.
|
|
74
75
|
|
|
75
76
|
## React Drawer Component
|
|
76
77
|
|
|
@@ -78,8 +79,8 @@ What's in this package (ToC):
|
|
|
78
79
|
|
|
79
80
|
### Key Features
|
|
80
81
|
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
- **Display Modes**—The KendoReact Drawer component offers several display modes. This includes controlling if the React Drawer pushes content to the side as it expands or if it is displayed as an overlay on top of the content.
|
|
83
|
+
- **Positioning**—Thanks to its position property, the KendoReact Drawer can be specified to be rendered in any position in relation to the page content.
|
|
83
84
|
|
|
84
85
|
## React GridLayout Component
|
|
85
86
|
|
|
@@ -91,9 +92,9 @@ What's in this package (ToC):
|
|
|
91
92
|
|
|
92
93
|
### Key Features
|
|
93
94
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
- **Menu Items**—The KendoReact Menu Items provide many customization options, making it easy to add additional elements like icons, images and more.
|
|
96
|
+
- **Vertical Menu**—The KendoReact Menu is rendered horizontally by default, but it can render vertically by setting just a single property.
|
|
97
|
+
- **Context Menu**—The ContextMenu gives the user a beautifully styled list of options for navigation or executing commands like, copy, paste, download etc.
|
|
97
98
|
|
|
98
99
|
## React PanelBar Component
|
|
99
100
|
|
|
@@ -101,8 +102,8 @@ What's in this package (ToC):
|
|
|
101
102
|
|
|
102
103
|
### Key Features
|
|
103
104
|
|
|
104
|
-
|
|
105
|
-
|
|
105
|
+
- **Expand Modes**—The component provides two built-in expand modes, allowing the user to expand multiple elements at once, or only one.
|
|
106
|
+
- **Animations**—The React PanelBar component comes with a wide variety of eye catching and slick animations. These result in more fluent transitions between sections.
|
|
106
107
|
|
|
107
108
|
## React Splitter Component
|
|
108
109
|
|
|
@@ -110,8 +111,8 @@ What's in this package (ToC):
|
|
|
110
111
|
|
|
111
112
|
### Key Features
|
|
112
113
|
|
|
113
|
-
|
|
114
|
-
|
|
114
|
+
- **Panes**—Each content area of the React Splitter is a Pane, and each Pane has options to help define dimensions and allow for resizing, collapsing or scrolling on a pane-by-pane basis.
|
|
115
|
+
- **Orientation**—The KendoReact Splitter allows for each Pane to be arranged either horizontally or vertically.
|
|
115
116
|
|
|
116
117
|
## React StackLayout Component
|
|
117
118
|
|
|
@@ -123,9 +124,9 @@ What's in this package (ToC):
|
|
|
123
124
|
|
|
124
125
|
### Key Features
|
|
125
126
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
- **Display Modes**—With the KendoReact Stepper component there are several ways to display each step. This includes simple steps numbered in sequential order, to using icons or custom text within each step, as well as providing labels underneath each step.
|
|
128
|
+
- **Linear Mode**—There may be requirements that enforce a progression from the first to the last step in order, and this is where the linear mode of the KendoReact Stepper comes in to play.
|
|
129
|
+
- **Orientation**—The KendoReact Stepper supports both horizontal and vertical orientations and can dynamically switch between them with a single configuration option.
|
|
129
130
|
|
|
130
131
|
## React TabStrip Component
|
|
131
132
|
|
|
@@ -137,59 +138,58 @@ With [the KendoReact TabStrip component](https://www.telerik.com/kendo-react-ui/
|
|
|
137
138
|
|
|
138
139
|
### Key Features
|
|
139
140
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
141
|
+
- **Tile Interactions**—With end-user interactivity being the primary driver of the component, the KendoReact TileLayout component gives users the flexibility of rearranging and resizing the available tiles.
|
|
142
|
+
- **Tile Configuration Options**—The Tiles can be static, resized with a resize handler, dragged & dropped to change their location, as well as edited. The layout of the React TileLayout component is defined through a set number of columns and then the available Tile collection will auto-populate the available columns and rows within the TileLayout component.
|
|
143
|
+
- **Auto Flows**—The KendoReact TileLayout component provides out-of-the-box defaults for how tiles should behave when they are placed within the component. In addition to the default AutoFlow, React developers can also customize the flow to their liking, based on the industry-standard CSS grid-auto-flow property.
|
|
144
144
|
|
|
145
145
|
## React Layout Components Library Features
|
|
146
146
|
|
|
147
147
|
Among the many features which the KendoReact Layout deliver are:
|
|
148
148
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
149
|
+
- **Routing**—You can use most of the Layout components as a navigational component by wiring it with the React router.
|
|
150
|
+
- **Data binding**—The layout components enables you to bind a data collection to them.
|
|
151
|
+
- **Keyboard navigation**—You can interact with the layout components using only the keyboard.
|
|
152
|
+
- **Custom Rendering**—You can replace the content of the layout components with custom elements.
|
|
153
|
+
- **Accessibility support**—The Layout are compliant with WAI-ARIA and Section 508.
|
|
154
|
+
- [Theme support](https://www.telerik.com/kendo-react-ui/components/styling/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-layout)—The KendoReact Layout, as well as all 100+ components in the KendoReact suite, are styled in three polished themes (Bootstrap, Material, and Default) and can be further customized to match your specific design guidelines.
|
|
155
155
|
|
|
156
156
|
## Support Options
|
|
157
157
|
|
|
158
158
|
For any issues you might encounter while working with the KendoReact Layout, use any of the available support channels:
|
|
159
159
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
- 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 syste.](https://www.telerik.com/account/support-tickets?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-layout).
|
|
161
|
+
- 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-layout) are part of the free support you can get from the community and from the KendoReact team.
|
|
162
|
+
- 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-layout) is where you can request and vote for new features to be added.
|
|
163
163
|
|
|
164
164
|
## Resources
|
|
165
165
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
166
|
+
- [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-layout)
|
|
167
|
+
- [Getting Started with the KendoReact Layout](https://www.telerik.com/kendo-react-ui/components/layout/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-layout)
|
|
168
|
+
- [API Reference of the KendoReact Layout](https://www.telerik.com/kendo-react-ui/components/layout/api/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-layout)
|
|
169
|
+
- [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-layout)
|
|
170
|
+
- [Blogs](https://www.telerik.com/blogs/tag/kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-layout)
|
|
171
|
+
- [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-layout)
|
|
172
|
+
- [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-layout)
|
|
173
|
+
- [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-layout)
|
|
174
174
|
|
|
175
175
|
High-level component overview pages
|
|
176
176
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
177
|
+
- [React AppBar Component](https://www.telerik.com/kendo-react-ui/appbar)
|
|
178
|
+
- [React Avatar Component](https://www.telerik.com/kendo-react-ui/avatar)
|
|
179
|
+
- [React BottomNavigation Component](https://www.telerik.com/kendo-react-ui/bottomnavigation)
|
|
180
|
+
- [React BreadCrumb Component](https://www.telerik.com/kendo-react-ui/breadcrumb)
|
|
181
|
+
- [React Card Component](https://www.telerik.com/kendo-react-ui/card)
|
|
182
|
+
- [React Drawer Component](https://www.telerik.com/kendo-react-ui/drawer)
|
|
183
|
+
- [React ExpansionPanel Component](https://www.telerik.com/kendo-react-ui/expansionpanel)
|
|
184
|
+
- [React Grid Layout Component](https://www.telerik.com/kendo-react-ui/gridlayout)
|
|
185
|
+
- [React Menu Component](https://www.telerik.com/kendo-react-ui/menu)
|
|
186
|
+
- [React PanelBar Component](https://www.telerik.com/kendo-react-ui/panelbar)
|
|
187
|
+
- [React Splitter Component](https://www.telerik.com/kendo-react-ui/splitter)
|
|
188
|
+
- [React Stack Layout Component](https://www.telerik.com/kendo-react-ui/stacklayout)
|
|
189
|
+
- [React Stepper Component](https://www.telerik.com/kendo-react-ui/stepper)
|
|
190
|
+
- [React TabStrip Component](https://www.telerik.com/kendo-react-ui/tabstrip)
|
|
191
|
+
- [React TileLayout Component](https://www.telerik.com/kendo-react-ui/tilelayout)
|
|
192
|
+
|
|
193
|
+
_Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved._
|
|
194
|
+
|
|
195
|
+
_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._
|
|
@@ -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 N=require("react"),m=require("prop-types"),C=require("@progress/kendo-react-animation"),b=require("@progress/kendo-react-common"),x=require("../package-metadata.js"),E=require("./ActionSheetItem.js"),
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("react"),m=require("prop-types"),C=require("@progress/kendo-react-animation"),b=require("@progress/kendo-react-common"),x=require("../package-metadata.js"),E=require("./ActionSheetItem.js"),S=require("./ActionSheetHeader.js"),D=require("./ActionSheetFooter.js"),I=require("./ActionSheetContent.js");function O(h){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(h){for(const t in h)if(t!=="default"){const e=Object.getOwnPropertyDescriptor(h,t);Object.defineProperty(n,t,e.get?e:{enumerable:!0,get:()=>h[t]})}}return n.default=h,Object.freeze(n)}const i=O(N),d=class d extends i.Component{constructor(n){super(n),this.actionSheetRef=i.createRef(),this.actionSheetTitleClass="k-actionsheet-title",this.ariaLabeledBy=this.actionSheetTitleClass,this.animationDuration=300,this.bottomPosition={bottom:"0",width:"100%"},this.handleKeyDown=t=>{this.props.navigatable&&this.navigation.triggerKeyboardEvent(t)},this.onTab=(t,e,s)=>{s.preventDefault(),s.shiftKey?e.focusPrevious(t):e.focusNext(t)},this.handleOverlayClick=t=>{this.props.onOverlayClick&&this.props.onOverlayClick.call(void 0,t),this.props.onClose&&this.props.onClose.call(void 0,t),this.props.animation||this.hideActionSheet()},this.handleItemClick=t=>{this.props.onItemClick&&this.props.onItemClick.call(void 0,t),this.props.onItemSelect&&this.props.onItemSelect.call(void 0,t),this.props.animation||this.hideActionSheet()},this.onEnter=(t,e,s)=>{if(t.ariaDisabled)return;const c=t.className&&t.className.indexOf?t.className.indexOf("k-actionsheet-item")!==-1:!1,l=e.elements.filter(a=>a.className.indexOf("k-actionsheet-item")!==-1);if(c&&this.props.onItemClick){s.preventDefault();const a=this.props.items[l.indexOf(t)];this.props.onItemClick.call(void 0,{syntheticEvent:s,item:a,title:a&&a.title})}if(c&&this.props.onItemSelect){s.preventDefault();const a=this.props.items[l.indexOf(t)];this.props.onItemSelect.call(void 0,{syntheticEvent:s,item:a,title:a&&a.title})}this.props.animation||this.hideActionSheet()},this.onEscape=(t,e,s)=>{this.props.onOverlayClick&&(s.preventDefault(),this.props.onOverlayClick.call(void 0,s)),this.props.onClose&&(s.preventDefault(),this.props.onClose.call(void 0,s)),this.props.animation||this.hideActionSheet()},this.hideActionSheet=()=>{this.setState({show:!1})},this.children=t=>{const e={};return i.Children.forEach(t,s=>{s&&(e[s.type.displayName]=s)}),e},this.state={show:!1,slide:!1},b.validatePackage(x.packageMetadata)}componentDidMount(){this.props.expand&&!this.state.show&&this.setState({show:!0})}componentDidUpdate(n,t){const e=this.actionSheetRef.current;if(this.props.expand&&!this.state.show&&this.setState({show:!0}),this.props.expand&&this.state.show&&!this.state.slide&&this.setState({slide:!0}),!this.props.expand&&this.state.show&&this.state.slide&&this.setState({slide:!1}),t!==this.state&&this.state.slide&&e&&!this.props.className&&(e.style.setProperty("--kendo-actionsheet-height","auto"),e.style.setProperty("--kendo-actionsheet-max-height","none")),e&&this.props.navigatable){const c=[".k-actionsheet-item",...[".k-actionsheet-footer",".k-actionsheet-content",".k-actionsheet-titlebar"].map(l=>b.FOCUSABLE_ELEMENTS.concat(this.props.navigatableElements).map(a=>`${l} ${a}`)).flat()];this.navigation=new b.Navigation({tabIndex:this.props.tabIndex||0,root:this.actionSheetRef,rovingTabIndex:!1,selectors:c,keyboardEvents:{keydown:{Tab:this.onTab,Enter:this.onEnter,Escape:this.onEscape}}}),this.navigation.focusElement(this.navigation.first,null)}}render(){const{title:n,subTitle:t,animationStyles:e,animation:s,expand:c,tabIndex:l,items:a}=this.props,r=a==null?void 0:a.filter(o=>!o.group||o.group==="top"),u=a==null?void 0:a.filter(o=>o.group==="bottom"),g=r&&r.length>0&&u&&u.length>0,f=this.children(this.props.children),y=this.props.animationDuration||this.animationDuration,v=this.state.slide&&i.createElement("div",{className:b.classNames("k-actionsheet",this.props.className,{"k-actionsheet-bottom":!this.props.className}),role:"dialog","aria-modal":"true","aria-hidden":!1,"aria-labelledby":this.ariaLabeledBy,ref:this.actionSheetRef,onKeyDown:this.handleKeyDown},f[S.headerDisplayName]&&!n&&!t&&f[S.headerDisplayName],(n||t)&&i.createElement("div",{className:"k-actionsheet-titlebar k-text-center"},i.createElement("div",{className:"k-actionsheet-titlebar-group k-hbox"},i.createElement("div",{className:this.actionSheetTitleClass,id:this.ariaLabeledBy},n&&i.createElement("div",null,n),t&&i.createElement("div",{className:"k-actionsheet-subtitle"},t)))),f[I.contentDisplayName]||i.createElement("div",{className:"k-actionsheet-content"},i.createElement("div",{className:"k-list-ul",role:"group"},r&&r.map((o,p)=>i.createElement(E.ActionSheetItem,{...o,id:p,key:p,item:o,tabIndex:l||0,onClick:this.handleItemClick}))),g&&i.createElement("hr",{className:"k-hr"}),i.createElement("div",{className:"k-list-ul",role:"group"},u&&u.map((o,p)=>i.createElement(E.ActionSheetItem,{...o,id:p+((r==null?void 0:r.length)||0),key:p,item:o,tabIndex:l||0,onClick:this.handleItemClick})))),f[D.footerDisplayName]);return i.createElement(i.Fragment,null,c||this.state.show?i.createElement("div",{className:"k-actionsheet-container"},i.createElement("div",{className:"k-overlay",onClick:this.handleOverlayClick}),s?i.createElement(C.Animation,{transitionName:this.state.slide?"slide-up":"slide-down",onExited:this.hideActionSheet,transitionEnterDuration:y,transitionExitDuration:y,animationEnteringStyle:e||this.bottomPosition,animationEnteredStyle:e||this.bottomPosition,animationExitingStyle:e||this.bottomPosition,exit:!0,enter:!0,appear:!1},v):v):null)}};d.displayName="KendoReactActionSheet",d.propTypes={items:m.array,subTitle:m.string,title:m.string,navigatable:m.bool,navigatableElements:m.array},d.defaultProps={navigatable:!0,navigatableElements:[]};let k=d;exports.ActionSheet=k;
|
|
@@ -17,8 +17,8 @@ import { footerDisplayName as I } from "./ActionSheetFooter.mjs";
|
|
|
17
17
|
import { contentDisplayName as w } from "./ActionSheetContent.mjs";
|
|
18
18
|
const m = class m extends e.Component {
|
|
19
19
|
/** @hidden */
|
|
20
|
-
constructor(
|
|
21
|
-
super(
|
|
20
|
+
constructor(n) {
|
|
21
|
+
super(n), this.actionSheetRef = e.createRef(), this.actionSheetTitleClass = "k-actionsheet-title", this.ariaLabeledBy = this.actionSheetTitleClass, this.animationDuration = 300, this.bottomPosition = { bottom: "0", width: "100%" }, this.handleKeyDown = (t) => {
|
|
22
22
|
this.props.navigatable && this.navigation.triggerKeyboardEvent(t);
|
|
23
23
|
}, this.onTab = (t, a, i) => {
|
|
24
24
|
i.preventDefault(), i.shiftKey ? a.focusPrevious(t) : a.focusNext(t);
|
|
@@ -68,19 +68,16 @@ const m = class m extends e.Component {
|
|
|
68
68
|
this.props.expand && !this.state.show && this.setState({ show: !0 });
|
|
69
69
|
}
|
|
70
70
|
/** @hidden */
|
|
71
|
-
componentDidUpdate(
|
|
71
|
+
componentDidUpdate(n, t) {
|
|
72
72
|
const a = this.actionSheetRef.current;
|
|
73
73
|
if (this.props.expand && !this.state.show && this.setState({ show: !0 }), this.props.expand && this.state.show && !this.state.slide && this.setState({ slide: !0 }), !this.props.expand && this.state.show && this.state.slide && this.setState({ slide: !1 }), t !== this.state && this.state.slide && a && !this.props.className && (a.style.setProperty("--kendo-actionsheet-height", "auto"), a.style.setProperty("--kendo-actionsheet-max-height", "none")), a && this.props.navigatable) {
|
|
74
|
-
const h = [
|
|
75
|
-
".k-actionsheet-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
(s) => `${l} ${s}`
|
|
82
|
-
)).flat()
|
|
83
|
-
];
|
|
74
|
+
const h = [".k-actionsheet-item", ...[
|
|
75
|
+
".k-actionsheet-footer",
|
|
76
|
+
".k-actionsheet-content",
|
|
77
|
+
".k-actionsheet-titlebar"
|
|
78
|
+
].map((l) => S.concat(this.props.navigatableElements).map(
|
|
79
|
+
(s) => `${l} ${s}`
|
|
80
|
+
)).flat()];
|
|
84
81
|
this.navigation = new C({
|
|
85
82
|
tabIndex: this.props.tabIndex || 0,
|
|
86
83
|
root: this.actionSheetRef,
|
|
@@ -98,15 +95,11 @@ const m = class m extends e.Component {
|
|
|
98
95
|
}
|
|
99
96
|
/** @hidden */
|
|
100
97
|
render() {
|
|
101
|
-
const {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
expand: h,
|
|
107
|
-
tabIndex: l,
|
|
108
|
-
items: s
|
|
109
|
-
} = this.props, r = s == null ? void 0 : s.filter((n) => !n.group || n.group === "top"), d = s == null ? void 0 : s.filter((n) => n.group === "bottom"), y = r && r.length > 0 && d && d.length > 0, f = this.children(this.props.children), u = this.props.animationDuration || this.animationDuration, k = this.state.slide && /* @__PURE__ */ e.createElement(
|
|
98
|
+
const { title: n, subTitle: t, animationStyles: a, animation: i, expand: h, tabIndex: l, items: s } = this.props, r = s == null ? void 0 : s.filter(
|
|
99
|
+
(o) => !o.group || o.group === "top"
|
|
100
|
+
), d = s == null ? void 0 : s.filter(
|
|
101
|
+
(o) => o.group === "bottom"
|
|
102
|
+
), y = r && r.length > 0 && d && d.length > 0, f = this.children(this.props.children), u = this.props.animationDuration || this.animationDuration, k = this.state.slide && /* @__PURE__ */ e.createElement(
|
|
110
103
|
"div",
|
|
111
104
|
{
|
|
112
105
|
className: x("k-actionsheet", this.props.className, {
|
|
@@ -119,38 +112,32 @@ const m = class m extends e.Component {
|
|
|
119
112
|
ref: this.actionSheetRef,
|
|
120
113
|
onKeyDown: this.handleKeyDown
|
|
121
114
|
},
|
|
122
|
-
f[v] && !
|
|
123
|
-
(
|
|
124
|
-
f[w] || /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-content" }, /* @__PURE__ */ e.createElement("div", { className: "k-list-ul", role: "group" }, r && r.map((
|
|
115
|
+
f[v] && !n && !t && f[v],
|
|
116
|
+
(n || t) && /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-titlebar k-text-center" }, /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-titlebar-group k-hbox" }, /* @__PURE__ */ e.createElement("div", { className: this.actionSheetTitleClass, id: this.ariaLabeledBy }, n && /* @__PURE__ */ e.createElement("div", null, n), t && /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-subtitle" }, t)))),
|
|
117
|
+
f[w] || /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-content" }, /* @__PURE__ */ e.createElement("div", { className: "k-list-ul", role: "group" }, r && r.map((o, c) => /* @__PURE__ */ e.createElement(
|
|
125
118
|
E,
|
|
126
119
|
{
|
|
127
|
-
...
|
|
120
|
+
...o,
|
|
128
121
|
id: c,
|
|
129
122
|
key: c,
|
|
130
|
-
item:
|
|
123
|
+
item: o,
|
|
131
124
|
tabIndex: l || 0,
|
|
132
125
|
onClick: this.handleItemClick
|
|
133
126
|
}
|
|
134
|
-
))), y && /* @__PURE__ */ e.createElement("hr", { className: "k-hr" }), /* @__PURE__ */ e.createElement("div", { className: "k-list-ul", role: "group" }, d && d.map((
|
|
127
|
+
))), y && /* @__PURE__ */ e.createElement("hr", { className: "k-hr" }), /* @__PURE__ */ e.createElement("div", { className: "k-list-ul", role: "group" }, d && d.map((o, c) => /* @__PURE__ */ e.createElement(
|
|
135
128
|
E,
|
|
136
129
|
{
|
|
137
|
-
...
|
|
130
|
+
...o,
|
|
138
131
|
id: c + ((r == null ? void 0 : r.length) || 0),
|
|
139
132
|
key: c,
|
|
140
|
-
item:
|
|
133
|
+
item: o,
|
|
141
134
|
tabIndex: l || 0,
|
|
142
135
|
onClick: this.handleItemClick
|
|
143
136
|
}
|
|
144
137
|
)))),
|
|
145
138
|
f[I]
|
|
146
139
|
);
|
|
147
|
-
return /* @__PURE__ */ e.createElement(e.Fragment, null, h || this.state.show ? /* @__PURE__ */ e.createElement(
|
|
148
|
-
"div",
|
|
149
|
-
{
|
|
150
|
-
className: "k-overlay",
|
|
151
|
-
onClick: this.handleOverlayClick
|
|
152
|
-
}
|
|
153
|
-
), i ? /* @__PURE__ */ e.createElement(
|
|
140
|
+
return /* @__PURE__ */ e.createElement(e.Fragment, null, h || this.state.show ? /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-container" }, /* @__PURE__ */ e.createElement("div", { className: "k-overlay", onClick: this.handleOverlayClick }), i ? /* @__PURE__ */ e.createElement(
|
|
154
141
|
g,
|
|
155
142
|
{
|
|
156
143
|
transitionName: this.state.slide ? "slide-up" : "slide-down",
|
|
@@ -165,7 +152,7 @@ const m = class m extends e.Component {
|
|
|
165
152
|
appear: !1
|
|
166
153
|
},
|
|
167
154
|
k
|
|
168
|
-
) : k)
|
|
155
|
+
) : k) : null);
|
|
169
156
|
}
|
|
170
157
|
};
|
|
171
158
|
m.displayName = "KendoReactActionSheet", m.propTypes = {
|
|
@@ -9,16 +9,7 @@
|
|
|
9
9
|
import * as r from "react";
|
|
10
10
|
import t from "prop-types";
|
|
11
11
|
import { classNames as s } from "@progress/kendo-react-common";
|
|
12
|
-
const a = "ActionSheetFooter", e = (o) => /* @__PURE__ */ r.createElement(
|
|
13
|
-
"div",
|
|
14
|
-
{
|
|
15
|
-
className: s(
|
|
16
|
-
"k-actionsheet-footer",
|
|
17
|
-
o.className
|
|
18
|
-
)
|
|
19
|
-
},
|
|
20
|
-
o.children
|
|
21
|
-
);
|
|
12
|
+
const a = "ActionSheetFooter", e = (o) => /* @__PURE__ */ r.createElement("div", { className: s("k-actionsheet-footer", o.className) }, o.children);
|
|
22
13
|
e.propTypes = {
|
|
23
14
|
className: t.string
|
|
24
15
|
};
|
|
@@ -9,16 +9,7 @@
|
|
|
9
9
|
import * as r from "react";
|
|
10
10
|
import t from "prop-types";
|
|
11
11
|
import { classNames as s } from "@progress/kendo-react-common";
|
|
12
|
-
const c = "ActionSheetHeader", e = (a) => /* @__PURE__ */ r.createElement(
|
|
13
|
-
"div",
|
|
14
|
-
{
|
|
15
|
-
className: s(
|
|
16
|
-
"k-actionsheet-titlebar",
|
|
17
|
-
a.className
|
|
18
|
-
)
|
|
19
|
-
},
|
|
20
|
-
a.children
|
|
21
|
-
);
|
|
12
|
+
const c = "ActionSheetHeader", e = (a) => /* @__PURE__ */ r.createElement("div", { className: s("k-actionsheet-titlebar", a.className) }, a.children);
|
|
22
13
|
e.propTypes = {
|
|
23
14
|
className: t.string
|
|
24
15
|
};
|
|
@@ -10,13 +10,16 @@ import * as t from "react";
|
|
|
10
10
|
import i from "prop-types";
|
|
11
11
|
import { classNames as l } from "@progress/kendo-react-common";
|
|
12
12
|
const s = (e) => {
|
|
13
|
-
const a = t.useRef(null), c = t.useCallback(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
const a = t.useRef(null), c = t.useCallback(
|
|
14
|
+
(n) => {
|
|
15
|
+
e.onClick && e.onClick.call(void 0, {
|
|
16
|
+
syntheticEvent: n,
|
|
17
|
+
item: e.item,
|
|
18
|
+
title: e.title
|
|
19
|
+
});
|
|
20
|
+
},
|
|
21
|
+
[e.item, e.title, e.onClick]
|
|
22
|
+
);
|
|
20
23
|
return t.useEffect(() => {
|
|
21
24
|
a.current && e.focused && a.current.focus();
|
|
22
25
|
}, [e.focused]), /* @__PURE__ */ t.createElement(
|
package/appbar/AppBar.mjs
CHANGED
|
@@ -12,17 +12,9 @@ import { validatePackage as h, focusFirstFocusableChild as C, useId as y, classN
|
|
|
12
12
|
import { packageMetadata as N } from "../package-metadata.mjs";
|
|
13
13
|
const l = e.forwardRef((o, m) => {
|
|
14
14
|
h(N);
|
|
15
|
-
const {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
style: u,
|
|
19
|
-
id: f
|
|
20
|
-
} = o, a = e.useRef(null), p = e.useCallback(
|
|
21
|
-
() => {
|
|
22
|
-
a.current && C(a.current);
|
|
23
|
-
},
|
|
24
|
-
[]
|
|
25
|
-
), b = e.useCallback(
|
|
15
|
+
const { children: d, className: r, style: u, id: f } = o, a = e.useRef(null), p = e.useCallback(() => {
|
|
16
|
+
a.current && C(a.current);
|
|
17
|
+
}, []), b = e.useCallback(
|
|
26
18
|
() => ({
|
|
27
19
|
element: a.current,
|
|
28
20
|
focus: p
|
|
@@ -30,16 +22,7 @@ const l = e.forwardRef((o, m) => {
|
|
|
30
22
|
[p]
|
|
31
23
|
);
|
|
32
24
|
e.useImperativeHandle(m, b);
|
|
33
|
-
const k = y(), i = e.useMemo(
|
|
34
|
-
() => o.themeColor || c.themeColor,
|
|
35
|
-
[o.themeColor]
|
|
36
|
-
), n = e.useMemo(
|
|
37
|
-
() => o.position || c.position,
|
|
38
|
-
[o.position]
|
|
39
|
-
), s = e.useMemo(
|
|
40
|
-
() => o.positionMode || c.positionMode,
|
|
41
|
-
[o.positionMode]
|
|
42
|
-
), M = e.useMemo(
|
|
25
|
+
const k = y(), i = e.useMemo(() => o.themeColor || c.themeColor, [o.themeColor]), n = e.useMemo(() => o.position || c.position, [o.position]), s = e.useMemo(() => o.positionMode || c.positionMode, [o.positionMode]), M = e.useMemo(
|
|
43
26
|
() => g(
|
|
44
27
|
"k-appbar",
|
|
45
28
|
{
|
|
@@ -54,15 +37,7 @@ const l = e.forwardRef((o, m) => {
|
|
|
54
37
|
),
|
|
55
38
|
[n, s, i, r]
|
|
56
39
|
);
|
|
57
|
-
return /* @__PURE__ */ e.createElement(
|
|
58
|
-
"div",
|
|
59
|
-
{
|
|
60
|
-
className: M,
|
|
61
|
-
style: u,
|
|
62
|
-
id: f || k
|
|
63
|
-
},
|
|
64
|
-
d
|
|
65
|
-
);
|
|
40
|
+
return /* @__PURE__ */ e.createElement("div", { className: M, style: u, id: f || k }, d);
|
|
66
41
|
});
|
|
67
42
|
l.propTypes = {
|
|
68
43
|
children: t.any,
|
package/appbar/AppBarSection.mjs
CHANGED
|
@@ -10,16 +10,9 @@ import * as e from "react";
|
|
|
10
10
|
import t from "prop-types";
|
|
11
11
|
import { focusFirstFocusableChild as u, classNames as f } from "@progress/kendo-react-common";
|
|
12
12
|
const r = e.forwardRef((n, o) => {
|
|
13
|
-
const {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
style: i
|
|
17
|
-
} = n, s = e.useRef(null), c = e.useCallback(
|
|
18
|
-
() => {
|
|
19
|
-
s.current && u(s.current);
|
|
20
|
-
},
|
|
21
|
-
[]
|
|
22
|
-
), m = e.useCallback(
|
|
13
|
+
const { children: l, className: a, style: i } = n, s = e.useRef(null), c = e.useCallback(() => {
|
|
14
|
+
s.current && u(s.current);
|
|
15
|
+
}, []), m = e.useCallback(
|
|
23
16
|
() => ({
|
|
24
17
|
element: s.current,
|
|
25
18
|
focus: c
|
|
@@ -27,13 +20,7 @@ const r = e.forwardRef((n, o) => {
|
|
|
27
20
|
[c]
|
|
28
21
|
);
|
|
29
22
|
e.useImperativeHandle(o, m);
|
|
30
|
-
const p = e.useMemo(
|
|
31
|
-
() => f(
|
|
32
|
-
"k-appbar-section",
|
|
33
|
-
a
|
|
34
|
-
),
|
|
35
|
-
[a]
|
|
36
|
-
);
|
|
23
|
+
const p = e.useMemo(() => f("k-appbar-section", a), [a]);
|
|
37
24
|
return /* @__PURE__ */ e.createElement("div", { className: p, style: i }, l);
|
|
38
25
|
});
|
|
39
26
|
r.propTypes = {
|
package/appbar/AppBarSpacer.mjs
CHANGED
|
@@ -10,16 +10,9 @@ import * as s from "react";
|
|
|
10
10
|
import r from "prop-types";
|
|
11
11
|
import { focusFirstFocusableChild as d, classNames as f } from "@progress/kendo-react-common";
|
|
12
12
|
const l = s.forwardRef((n, p) => {
|
|
13
|
-
const {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
style: e
|
|
17
|
-
} = n, a = s.useRef(null), c = s.useCallback(
|
|
18
|
-
() => {
|
|
19
|
-
a.current && d(a.current);
|
|
20
|
-
},
|
|
21
|
-
[]
|
|
22
|
-
), i = s.useCallback(
|
|
13
|
+
const { children: o, className: t, style: e } = n, a = s.useRef(null), c = s.useCallback(() => {
|
|
14
|
+
a.current && d(a.current);
|
|
15
|
+
}, []), i = s.useCallback(
|
|
23
16
|
() => ({
|
|
24
17
|
element: a.current,
|
|
25
18
|
focus: c
|
|
@@ -36,12 +29,9 @@ const l = s.forwardRef((n, p) => {
|
|
|
36
29
|
t
|
|
37
30
|
),
|
|
38
31
|
[t, e]
|
|
39
|
-
), u = s.useMemo(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}),
|
|
43
|
-
[e]
|
|
44
|
-
);
|
|
32
|
+
), u = s.useMemo(() => ({
|
|
33
|
+
flexBasis: e && e.width ? e.width : void 0
|
|
34
|
+
}), [e]);
|
|
45
35
|
return /* @__PURE__ */ s.createElement("span", { className: m, style: u }, o);
|
|
46
36
|
});
|
|
47
37
|
l.propTypes = {
|