@progress/kendo-react-buttons 13.3.0 → 13.4.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/Button.d.ts +114 -0
- package/Button.js +1 -1
- package/Button.mjs +42 -44
- package/ButtonGroup.d.ts +47 -0
- package/ButtonGroupInterface.d.ts +39 -0
- package/ButtonInterface.d.ts +49 -0
- package/Chip/Chip.d.ts +425 -0
- package/Chip/Chip.js +1 -1
- package/Chip/Chip.mjs +43 -39
- package/Chip/ChipList.d.ts +221 -0
- package/Chip/ChipList.js +1 -1
- package/Chip/ChipList.mjs +40 -41
- package/Chip/chip-list-contexts.d.ts +20 -0
- package/Chip/data-reducer.d.ts +29 -0
- package/Chip/focus-reducer.d.ts +31 -0
- package/Chip/selection-reducer.d.ts +37 -0
- package/FloatingActionButton/FloatingActionButton.d.ts +23 -0
- package/FloatingActionButton/FloatingActionButton.js +1 -1
- package/FloatingActionButton/FloatingActionButton.mjs +85 -85
- package/FloatingActionButton/FloatingActionButtonItem.d.ts +132 -0
- package/FloatingActionButton/interfaces/FloatingActionButtonHandle.d.ts +20 -0
- package/FloatingActionButton/interfaces/FloatingActionButtonPopupSettings.d.ts +31 -0
- package/FloatingActionButton/interfaces/FloatingActionButtonProps.d.ts +354 -0
- package/FloatingActionButton/models/align-offset.d.ts +27 -0
- package/FloatingActionButton/models/align.d.ts +34 -0
- package/FloatingActionButton/models/events.d.ts +28 -0
- package/FloatingActionButton/models/position-mode.d.ts +16 -0
- package/FloatingActionButton/models/rounded.d.ts +19 -0
- package/FloatingActionButton/models/size.d.ts +18 -0
- package/FloatingActionButton/models/theme-color.d.ts +25 -0
- package/FloatingActionButton/utils.d.ts +34 -0
- package/ListButton/ButtonItem.d.ts +72 -0
- package/ListButton/DropDownButton.d.ts +153 -0
- package/ListButton/DropDownButton.js +1 -1
- package/ListButton/DropDownButton.mjs +62 -46
- package/ListButton/DropDownButtonItem.d.ts +37 -0
- package/ListButton/SplitButton.d.ts +142 -0
- package/ListButton/SplitButton.js +1 -1
- package/ListButton/SplitButton.mjs +29 -13
- package/ListButton/SplitButtonItem.d.ts +32 -0
- package/ListButton/models/ButtonItem.d.ts +41 -0
- package/ListButton/models/ListButtonProps.d.ts +411 -0
- package/ListButton/models/PopupSettings.d.ts +35 -0
- package/ListButton/models/events.d.ts +59 -0
- package/ListButton/utils/navigation.d.ts +12 -0
- package/ListButton/utils/popup.d.ts +16 -0
- package/SpeechToTextButton/SpeechToTextButton.d.ts +36 -0
- package/SpeechToTextButton/SpeechToTextButton.js +1 -1
- package/SpeechToTextButton/SpeechToTextButton.mjs +24 -24
- package/SpeechToTextButton/interfaces/SpeechToTextButtonHandle.d.ts +28 -0
- package/SpeechToTextButton/interfaces/SpeechToTextButtonProps.d.ts +117 -0
- package/dist/cdn/js/kendo-react-buttons.js +1 -1
- package/index.d.mts +43 -2928
- package/index.d.ts +43 -2928
- package/messages/index.d.ts +22 -0
- package/models/index.d.ts +95 -0
- package/package-metadata.d.ts +12 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +10 -16
- package/package.json +5 -5
- package/toolbar/Toolbar.d.ts +38 -0
- package/toolbar/Toolbar.js +1 -1
- package/toolbar/Toolbar.mjs +15 -15
- package/toolbar/events/ToolbarResizeEvent.d.ts +29 -0
- package/toolbar/interfaces/ToolbarHandle.d.ts +21 -0
- package/toolbar/interfaces/ToolbarOverflowProps.d.ts +50 -0
- package/toolbar/interfaces/ToolbarProps.d.ts +128 -0
- package/toolbar/messages/index.d.ts +27 -0
- package/toolbar/tools/ToolbarItem.d.ts +47 -0
- package/toolbar/tools/ToolbarOverflowSection.d.ts +21 -0
- package/toolbar/tools/ToolbarScrollButton.d.ts +23 -0
- package/toolbar/tools/ToolbarScrollButton.js +1 -1
- package/toolbar/tools/ToolbarScrollButton.mjs +11 -20
- package/toolbar/tools/ToolbarScrollable.d.ts +28 -0
- package/toolbar/tools/ToolbarSeparator.d.ts +22 -0
- package/toolbar/tools/ToolbarSpacer.d.ts +30 -0
- package/util.d.ts +31 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { FormComponentProps, KendoMouse } from '@progress/kendo-react-common';
|
|
9
|
+
import { ChipProps } from './Chip.js';
|
|
10
|
+
import { ChipListChangeEvent, ChipListDataChangeEvent } from './../models/index.js';
|
|
11
|
+
import * as React from 'react';
|
|
12
|
+
/**
|
|
13
|
+
* Represents the properties of [ChipList](https://www.telerik.com/kendo-react-ui/components/buttons/api/chiplist) component.
|
|
14
|
+
*/
|
|
15
|
+
export interface ChipListProps extends FormComponentProps, KendoMouse<ChipListHandle, HTMLDivElement> {
|
|
16
|
+
/**
|
|
17
|
+
* Sets the `id` property of the top div element of the ChipList.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```jsx
|
|
21
|
+
* <ChipList id="chiplist1" />
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
id?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Sets additional classes to the ChipList.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```jsx
|
|
30
|
+
* <ChipList className="custom-chiplist" />
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
className?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Sets the `tabIndex` attribute.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```jsx
|
|
39
|
+
* <ChipList tabIndex={0} />
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
tabIndex?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Sets additional CSS styles to the ChipList.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```jsx
|
|
48
|
+
* <ChipList style={{ margin: '10px' }} />
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
style?: React.CSSProperties;
|
|
52
|
+
/**
|
|
53
|
+
* Represents Chip component.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```jsx
|
|
57
|
+
* <ChipList chip={CustomChip} />
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
chip?: React.ComponentType<ChipProps>;
|
|
61
|
+
/**
|
|
62
|
+
* Represents the data about the child Chips.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```jsx
|
|
66
|
+
* <ChipList data={[{ text: 'Chip1' }, { text: 'Chip2' }]} />
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
data?: any;
|
|
70
|
+
/**
|
|
71
|
+
* Represents the default data about the child Chips.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```jsx
|
|
75
|
+
* <ChipList defaultData={[{ text: 'DefaultChip1' }, { text: 'DefaultChip2' }]} />
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
defaultData?: any[];
|
|
79
|
+
/**
|
|
80
|
+
* Fires after Chip data change.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```jsx
|
|
84
|
+
* <ChipList onDataChange={(event) => console.log(event.value)} />
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
onDataChange?: (event: ChipListDataChangeEvent) => void;
|
|
88
|
+
/**
|
|
89
|
+
* Represents the selection state of Chip component.
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```jsx
|
|
93
|
+
* <ChipList value={[{ text: 'SelectedChip' }]} />
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
value?: any | any[];
|
|
97
|
+
/**
|
|
98
|
+
* Represents the default value of the selection state of Chip component.
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```jsx
|
|
102
|
+
* <ChipList defaultValue={[{ text: 'DefaultSelectedChip' }]} />
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
defaultValue?: any | any[];
|
|
106
|
+
/**
|
|
107
|
+
* Fires after value change.
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* ```jsx
|
|
111
|
+
* <ChipList onChange={(event) => console.log(event.value)} />
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
114
|
+
onChange?: (event: ChipListChangeEvent) => void;
|
|
115
|
+
/**
|
|
116
|
+
* Represents the selection state of Chip component.
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* ```jsx
|
|
120
|
+
* <ChipList selection="multiple" />
|
|
121
|
+
* ```
|
|
122
|
+
*/
|
|
123
|
+
selection?: string;
|
|
124
|
+
/**
|
|
125
|
+
* Represents the `text` field of Chip, used for the `label`.
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* ```jsx
|
|
129
|
+
* <ChipList textField="name" />
|
|
130
|
+
* ```
|
|
131
|
+
*/
|
|
132
|
+
textField?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Represents the `value` field of Chip, used for setting the Chip `id`.
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* ```jsx
|
|
138
|
+
* <ChipList valueField="id" />
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
141
|
+
valueField?: string;
|
|
142
|
+
/**
|
|
143
|
+
* Determines of ChipList is disabled.
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* ```jsx
|
|
147
|
+
* <ChipList disabled={true} />
|
|
148
|
+
* ```
|
|
149
|
+
*/
|
|
150
|
+
disabled?: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* The ChipList direction 'ltr' as default or 'rtl'.
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* ```jsx
|
|
156
|
+
* <ChipList dir="rtl" />
|
|
157
|
+
* ```
|
|
158
|
+
*/
|
|
159
|
+
dir?: string;
|
|
160
|
+
/**
|
|
161
|
+
* Identifies the element(s) which describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
|
|
162
|
+
* For example, these elements could contain error or hint message.
|
|
163
|
+
*
|
|
164
|
+
* @example
|
|
165
|
+
* ```jsx
|
|
166
|
+
* <ChipList ariaDescribedBy="description" />
|
|
167
|
+
* ```
|
|
168
|
+
*/
|
|
169
|
+
ariaDescribedBy?: string;
|
|
170
|
+
/**
|
|
171
|
+
* Identifies the element(s) which label the component.
|
|
172
|
+
*
|
|
173
|
+
* @example
|
|
174
|
+
* ```jsx
|
|
175
|
+
* <ChipList ariaLabelledBy="label" />
|
|
176
|
+
* ```
|
|
177
|
+
*/
|
|
178
|
+
ariaLabelledBy?: string;
|
|
179
|
+
/**
|
|
180
|
+
* The accessible label of the component.
|
|
181
|
+
*
|
|
182
|
+
* @example
|
|
183
|
+
* ```jsx
|
|
184
|
+
* <ChipList ariaLabel="ChipList" />
|
|
185
|
+
* ```
|
|
186
|
+
*/
|
|
187
|
+
ariaLabel?: string;
|
|
188
|
+
/**
|
|
189
|
+
* Configures the `size` of the ChipList.
|
|
190
|
+
*
|
|
191
|
+
* The available options are:
|
|
192
|
+
* - `small`
|
|
193
|
+
* - `medium`
|
|
194
|
+
* - `large`
|
|
195
|
+
*
|
|
196
|
+
* @default undefined (theme-controlled)
|
|
197
|
+
*
|
|
198
|
+
* @example
|
|
199
|
+
* ```jsx
|
|
200
|
+
* <ChipList size="large" />
|
|
201
|
+
* ```
|
|
202
|
+
*/
|
|
203
|
+
size?: 'small' | 'medium' | 'large';
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Represents the target(element and props) of the ChipListChangeEvent.
|
|
207
|
+
*/
|
|
208
|
+
export interface ChipListHandle {
|
|
209
|
+
/**
|
|
210
|
+
* The current element or `null` if there is no one.
|
|
211
|
+
*/
|
|
212
|
+
element: HTMLDivElement | null;
|
|
213
|
+
/**
|
|
214
|
+
* The props values of the ChipList.
|
|
215
|
+
*/
|
|
216
|
+
props: ChipListProps;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Represents the ChipList component.
|
|
220
|
+
*/
|
|
221
|
+
export declare const ChipList: React.ForwardRefExoticComponent<ChipListProps & React.RefAttributes<ChipListHandle | null>>;
|
package/Chip/ChipList.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 W=require("react"),t=require("prop-types"),p=require("@progress/kendo-react-common"),X=require("./selection-reducer.js"),Y=require("./focus-reducer.js"),Z=require("./data-reducer.js"),S=require("./Chip.js"),D=require("./chip-list-contexts.js");function V(e){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(i,n,l.get?l:{enumerable:!0,get:()=>e[n]})}}return i.default=e,Object.freeze(i)}const a=V(W),ee=(e,i,n)=>{i.selection==="multiple"?Array.isArray(e)||(e=e?[e]:null):i.selection==="single"&&Array.isArray(e)&&(e=e?e.join(""):null);const[l,o]=a.useState(e);return[l,c=>{const u=X.selectionReducer(i.state||l,{...c,...i});n&&n(u,c.event),i.selection!=="none"&&o(u)}]},te=e=>{const[i,n]=a.useState(null);return[i,o=>{const h=Y.focusReducer(o.payload,{...o,...e});n(h)}]},ae=(e,i,n)=>{const[l,o]=a.useState(e);return[l,c=>{const u=Z.dataReducer(i.state||l,{...c,...i});n&&n(u,c.event),o(u)}]},x=a.forwardRef((e,i)=>{const n=a.useRef(null),l=a.useRef(null),{id:o,style:h,tabIndex:c,className:u,ariaDescribedBy:T,ariaLabelledBy:q,ariaLabel:j,value:b,defaultData:z=r.defaultData,chip:R=r.chip,disabled:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("react"),t=require("prop-types"),p=require("@progress/kendo-react-common"),X=require("./selection-reducer.js"),Y=require("./focus-reducer.js"),Z=require("./data-reducer.js"),S=require("./Chip.js"),D=require("./chip-list-contexts.js");function V(e){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(i,n,l.get?l:{enumerable:!0,get:()=>e[n]})}}return i.default=e,Object.freeze(i)}const a=V(W),ee=(e,i,n)=>{i.selection==="multiple"?Array.isArray(e)||(e=e?[e]:null):i.selection==="single"&&Array.isArray(e)&&(e=e?e.join(""):null);const[l,o]=a.useState(e);return[l,c=>{const u=X.selectionReducer(i.state||l,{...c,...i});n&&n(u,c.event),i.selection!=="none"&&o(u)}]},te=e=>{const[i,n]=a.useState(null);return[i,o=>{const h=Y.focusReducer(o.payload,{...o,...e});n(h)}]},ae=(e,i,n)=>{const[l,o]=a.useState(e);return[l,c=>{const u=Z.dataReducer(i.state||l,{...c,...i});n&&n(u,c.event),o(u)}]},x=a.forwardRef((e,i)=>{const n=a.useRef(null),l=a.useRef(null),{id:o,style:h,tabIndex:c,className:u,ariaDescribedBy:T,ariaLabelledBy:q,ariaLabel:j,value:b,defaultData:z=r.defaultData,chip:R=r.chip,disabled:v=r.disabled,size:y=r.size,defaultValue:E=r.defaultValue,selection:O=r.selection,valueField:f=r.valueField,textField:F=r.textField,dir:N=r.dir,onChange:C,onDataChange:g}=e,L=p.useDir(l,N),w=a.useMemo(()=>R||S.Chip,[R,S.Chip]);a.useImperativeHandle(n,()=>({element:l.current,props:e})),a.useImperativeHandle(i,()=>n.current);const A=a.useCallback((s,d)=>{C&&n.current&&C.call(void 0,{value:s,target:n.current,syntheticEvent:d})},[C]),[k,B]=ee(b||E,{selection:O,state:b},A),_=a.useCallback((s,d)=>{g&&n.current&&g.call(void 0,{value:s,target:n.current,syntheticEvent:d})},[g]),[I,G]=ae(e.data||z,{state:e.data,valueField:f},_),M=a.useCallback((s,d)=>(s.push(d[f]),s),[f]),m=a.useMemo(()=>e.data||I,[e.data,I]),H=a.useMemo(()=>b||k,[b,k]),K=a.useMemo(()=>m.reduce(M,[]),[m,M]),P=a.useCallback(s=>p.getter(f)(s),[f]),$=a.useCallback(s=>p.getter(F)(s),[F]),[J,Q]=te({items:K}),U=p.useMouse(e,n);return a.createElement(D.ChipListSelectionContext.Provider,{value:[H,B]},a.createElement(D.ChipListFocusContext.Provider,{value:[J,Q]},a.createElement(D.ChipListDataContext.Provider,{value:[m,G]},a.createElement("div",{ref:l,...U,role:v?void 0:"listbox",id:o,dir:L,style:h,tabIndex:p.getTabIndex(c,v,void 0),className:p.classNames("k-chip-list",{"k-rtl":L==="rtl","k-disabled":v,[`k-chip-list-${p.kendoThemeMaps.sizeMap[y]||y}`]:y},u),"aria-label":j,"aria-labelledby":q,"aria-describedby":T,"aria-orientation":"horizontal","aria-multiselectable":O==="multiple"},m.map((s,d)=>a.createElement(w,{role:"option",dataItem:s,size:y,key:[P(s),d].join("-"),text:$(s),value:P(s),ariaLabel:s.ariaLabel,svgIcon:s.svgIcon||void 0}))))))}),ne={id:t.string,className:t.string,tabIndex:t.number,data:t.any,defaultData:t.arrayOf(t.any),onDataChange:t.func,value:t.oneOfType([t.any,t.arrayOf(t.any)]),defaultValue:t.oneOfType([t.any,t.arrayOf(t.any)]),onChange:t.func,selection:t.oneOf(["single","none","multiple"]),textField:t.string,valueField:t.string,disabled:t.bool,dir:t.oneOf(["ltr","rtl"]),ariaLabelledBy:t.string,ariaDescribedBy:t.string,size:t.oneOf(["small","medium","large"])},r={chip:S.Chip,size:void 0,disabled:!1,defaultValue:null,defaultData:[],dir:"ltr",selection:"none",textField:"text",valueField:"value"};x.displayName="KendoReactChipList";x.propTypes=ne;exports.ChipList=x;
|
package/Chip/ChipList.mjs
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as t from "react";
|
|
9
9
|
import e from "prop-types";
|
|
10
|
-
import { useDir as W, getter as O, useMouse as X,
|
|
10
|
+
import { useDir as W, getter as O, useMouse as X, classNames as Y, getTabIndex as Z, kendoThemeMaps as _ } from "@progress/kendo-react-common";
|
|
11
11
|
import { selectionReducer as V } from "./selection-reducer.mjs";
|
|
12
12
|
import { focusReducer as ee } from "./focus-reducer.mjs";
|
|
13
13
|
import { dataReducer as te } from "./data-reducer.mjs";
|
|
@@ -15,43 +15,43 @@ import { Chip as D } from "./Chip.mjs";
|
|
|
15
15
|
import { ChipListSelectionContext as ae, ChipListFocusContext as ne, ChipListDataContext as se } from "./chip-list-contexts.mjs";
|
|
16
16
|
const ie = (a, i, s) => {
|
|
17
17
|
i.selection === "multiple" ? Array.isArray(a) || (a = a ? [a] : null) : i.selection === "single" && Array.isArray(a) && (a = a ? a.join("") : null);
|
|
18
|
-
const [l,
|
|
18
|
+
const [l, r] = t.useState(a);
|
|
19
19
|
return [l, (c) => {
|
|
20
20
|
const d = V(i.state || l, { ...c, ...i });
|
|
21
|
-
s && s(d, c.event), i.selection !== "none" &&
|
|
21
|
+
s && s(d, c.event), i.selection !== "none" && r(d);
|
|
22
22
|
}];
|
|
23
23
|
}, le = (a) => {
|
|
24
24
|
const [i, s] = t.useState(null);
|
|
25
|
-
return [i, (
|
|
26
|
-
const
|
|
27
|
-
s(
|
|
25
|
+
return [i, (r) => {
|
|
26
|
+
const p = ee(r.payload, { ...r, ...a });
|
|
27
|
+
s(p);
|
|
28
28
|
}];
|
|
29
|
-
},
|
|
30
|
-
const [l,
|
|
29
|
+
}, oe = (a, i, s) => {
|
|
30
|
+
const [l, r] = t.useState(a);
|
|
31
31
|
return [l, (c) => {
|
|
32
32
|
const d = te(i.state || l, { ...c, ...i });
|
|
33
|
-
s && s(d, c.event),
|
|
33
|
+
s && s(d, c.event), r(d);
|
|
34
34
|
}];
|
|
35
35
|
}, E = t.forwardRef((a, i) => {
|
|
36
36
|
const s = t.useRef(null), l = t.useRef(null), {
|
|
37
|
-
id:
|
|
38
|
-
style:
|
|
37
|
+
id: r,
|
|
38
|
+
style: p,
|
|
39
39
|
tabIndex: c,
|
|
40
40
|
className: d,
|
|
41
41
|
ariaDescribedBy: M,
|
|
42
42
|
ariaLabelledBy: T,
|
|
43
43
|
ariaLabel: z,
|
|
44
44
|
value: h,
|
|
45
|
-
defaultData: P =
|
|
46
|
-
chip: g =
|
|
47
|
-
disabled:
|
|
48
|
-
size: f =
|
|
49
|
-
defaultValue: N =
|
|
50
|
-
selection: x =
|
|
51
|
-
valueField:
|
|
52
|
-
textField: S =
|
|
53
|
-
dir: w =
|
|
54
|
-
onChange:
|
|
45
|
+
defaultData: P = o.defaultData,
|
|
46
|
+
chip: g = o.chip,
|
|
47
|
+
disabled: y = o.disabled,
|
|
48
|
+
size: f = o.size,
|
|
49
|
+
defaultValue: N = o.defaultValue,
|
|
50
|
+
selection: x = o.selection,
|
|
51
|
+
valueField: m = o.valueField,
|
|
52
|
+
textField: S = o.textField,
|
|
53
|
+
dir: w = o.dir,
|
|
54
|
+
onChange: b,
|
|
55
55
|
onDataChange: C
|
|
56
56
|
} = a, F = W(l, w), A = t.useMemo(() => g || D, [g, D]);
|
|
57
57
|
t.useImperativeHandle(s, () => ({
|
|
@@ -60,13 +60,13 @@ const ie = (a, i, s) => {
|
|
|
60
60
|
})), t.useImperativeHandle(i, () => s.current);
|
|
61
61
|
const B = t.useCallback(
|
|
62
62
|
(n, u) => {
|
|
63
|
-
|
|
63
|
+
b && s.current && b.call(void 0, {
|
|
64
64
|
value: n,
|
|
65
65
|
target: s.current,
|
|
66
66
|
syntheticEvent: u
|
|
67
67
|
});
|
|
68
68
|
},
|
|
69
|
-
[
|
|
69
|
+
[b]
|
|
70
70
|
), [L, j] = ie(
|
|
71
71
|
h || N,
|
|
72
72
|
{
|
|
@@ -83,32 +83,32 @@ const ie = (a, i, s) => {
|
|
|
83
83
|
});
|
|
84
84
|
},
|
|
85
85
|
[C]
|
|
86
|
-
), [I, H] =
|
|
86
|
+
), [I, H] = oe(
|
|
87
87
|
a.data || P,
|
|
88
88
|
{
|
|
89
89
|
state: a.data,
|
|
90
|
-
valueField:
|
|
90
|
+
valueField: m
|
|
91
91
|
},
|
|
92
92
|
G
|
|
93
93
|
), R = t.useCallback(
|
|
94
|
-
(n, u) => (n.push(u[
|
|
95
|
-
[
|
|
96
|
-
), v = t.useMemo(() => a.data || I, [a.data, I]), K = t.useMemo(() => h || L, [h, L]), $ = t.useMemo(() => v.reduce(R, []), [v, R]), k = t.useCallback((n) => O(
|
|
94
|
+
(n, u) => (n.push(u[m]), n),
|
|
95
|
+
[m]
|
|
96
|
+
), v = t.useMemo(() => a.data || I, [a.data, I]), K = t.useMemo(() => h || L, [h, L]), $ = t.useMemo(() => v.reduce(R, []), [v, R]), k = t.useCallback((n) => O(m)(n), [m]), q = t.useCallback((n) => O(S)(n), [S]), [J, Q] = le({ items: $ }), U = X(a, s);
|
|
97
97
|
return /* @__PURE__ */ t.createElement(ae.Provider, { value: [K, j] }, /* @__PURE__ */ t.createElement(ne.Provider, { value: [J, Q] }, /* @__PURE__ */ t.createElement(se.Provider, { value: [v, H] }, /* @__PURE__ */ t.createElement(
|
|
98
98
|
"div",
|
|
99
99
|
{
|
|
100
100
|
ref: l,
|
|
101
101
|
...U,
|
|
102
|
-
role:
|
|
103
|
-
id:
|
|
102
|
+
role: y ? void 0 : "listbox",
|
|
103
|
+
id: r,
|
|
104
104
|
dir: F,
|
|
105
|
-
style:
|
|
106
|
-
tabIndex:
|
|
107
|
-
className:
|
|
105
|
+
style: p,
|
|
106
|
+
tabIndex: Z(c, y, void 0),
|
|
107
|
+
className: Y(
|
|
108
108
|
"k-chip-list",
|
|
109
109
|
{
|
|
110
110
|
"k-rtl": F === "rtl",
|
|
111
|
-
"k-disabled":
|
|
111
|
+
"k-disabled": y,
|
|
112
112
|
[`k-chip-list-${_.sizeMap[f] || f}`]: f
|
|
113
113
|
},
|
|
114
114
|
d
|
|
@@ -133,7 +133,7 @@ const ie = (a, i, s) => {
|
|
|
133
133
|
}
|
|
134
134
|
))
|
|
135
135
|
))));
|
|
136
|
-
}),
|
|
136
|
+
}), re = {
|
|
137
137
|
id: e.string,
|
|
138
138
|
className: e.string,
|
|
139
139
|
tabIndex: e.number,
|
|
@@ -150,21 +150,20 @@ const ie = (a, i, s) => {
|
|
|
150
150
|
dir: e.oneOf(["ltr", "rtl"]),
|
|
151
151
|
ariaLabelledBy: e.string,
|
|
152
152
|
ariaDescribedBy: e.string,
|
|
153
|
-
size: e.oneOf([
|
|
154
|
-
},
|
|
153
|
+
size: e.oneOf(["small", "medium", "large"])
|
|
154
|
+
}, o = {
|
|
155
155
|
chip: D,
|
|
156
|
-
size:
|
|
156
|
+
size: void 0,
|
|
157
157
|
disabled: !1,
|
|
158
158
|
defaultValue: null,
|
|
159
159
|
defaultData: [],
|
|
160
160
|
dir: "ltr",
|
|
161
161
|
selection: "none",
|
|
162
162
|
textField: "text",
|
|
163
|
-
valueField: "value"
|
|
164
|
-
removable: "removable"
|
|
163
|
+
valueField: "value"
|
|
165
164
|
};
|
|
166
165
|
E.displayName = "KendoReactChipList";
|
|
167
|
-
E.propTypes =
|
|
166
|
+
E.propTypes = re;
|
|
168
167
|
export {
|
|
169
168
|
E as ChipList
|
|
170
169
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { default as React } from 'react';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export declare const ChipListSelectionContext: React.Context<[string | string[] | null, Function]>;
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
export declare const ChipListFocusContext: React.Context<[string | string[] | null, Function]>;
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*/
|
|
20
|
+
export declare const ChipListDataContext: React.Context<[string | null, Function]>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export declare enum CHIP_DATA_ACTION {
|
|
13
|
+
remove = "remove",
|
|
14
|
+
add = "add",
|
|
15
|
+
reorder = "reorder"
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*/
|
|
20
|
+
export type DataAction = {
|
|
21
|
+
type: CHIP_DATA_ACTION;
|
|
22
|
+
payload?: any;
|
|
23
|
+
valueField: string;
|
|
24
|
+
event?: React.SyntheticEvent<any>;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* @hidden
|
|
28
|
+
*/
|
|
29
|
+
export declare const dataReducer: (state: any, action: DataAction) => any;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
export declare enum FOCUS_ACTION {
|
|
12
|
+
next = "next",
|
|
13
|
+
prev = "prev",
|
|
14
|
+
current = "current",
|
|
15
|
+
reset = "reset"
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*/
|
|
20
|
+
export type FocusAction = {
|
|
21
|
+
type: FOCUS_ACTION;
|
|
22
|
+
payload: string;
|
|
23
|
+
items: string[];
|
|
24
|
+
target?: any;
|
|
25
|
+
event?: React.SyntheticEvent<any>;
|
|
26
|
+
state?: any;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* @hidden
|
|
30
|
+
*/
|
|
31
|
+
export declare const focusReducer: (state: any, action: FocusAction) => any;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export declare enum SELECTION_TYPE {
|
|
13
|
+
single = "single",
|
|
14
|
+
multiple = "multiple",
|
|
15
|
+
none = "none"
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*/
|
|
20
|
+
export declare enum SELECTION_ACTION {
|
|
21
|
+
toggle = "toggle",
|
|
22
|
+
remove = "remove"
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @hidden
|
|
26
|
+
*/
|
|
27
|
+
export type SelectionAction = {
|
|
28
|
+
type?: SELECTION_ACTION;
|
|
29
|
+
selection: SELECTION_TYPE;
|
|
30
|
+
payload?: string;
|
|
31
|
+
event?: React.SyntheticEvent<any>;
|
|
32
|
+
state?: any;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* @hidden
|
|
36
|
+
*/
|
|
37
|
+
export declare const selectionReducer: (state: any, action: SelectionAction) => any;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { FloatingActionButtonHandle } from './interfaces/FloatingActionButtonHandle.js';
|
|
9
|
+
import { FloatingActionButtonProps } from './interfaces/FloatingActionButtonProps.js';
|
|
10
|
+
import * as React from 'react';
|
|
11
|
+
/**
|
|
12
|
+
* Represents the [KendoReact FloatingActionButton component](https://www.telerik.com/kendo-react-ui/components/buttons/floatingactionbutton).
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```jsx
|
|
16
|
+
* const App = () => {
|
|
17
|
+
* return (
|
|
18
|
+
* <FloatingActionButton icon="plus" text="Create"/>
|
|
19
|
+
* );
|
|
20
|
+
* };
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare const FloatingActionButton: React.ForwardRefExoticComponent<FloatingActionButtonProps & React.RefAttributes<FloatingActionButtonHandle | null>>;
|
|
@@ -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 ye=require("react"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ye=require("react"),s=require("prop-types"),o=require("@progress/kendo-react-common"),he=require("./FloatingActionButtonItem.js"),R=require("./utils.js"),ve=require("@progress/kendo-react-popup");function Ce(d){const g=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(d){for(const r in d)if(r!=="default"){const k=Object.getOwnPropertyDescriptor(d,r);Object.defineProperty(g,r,k.get?k:{enumerable:!0,get:()=>d[r]})}}return g.default=d,Object.freeze(g)}const t=Ce(ye),Ie=2,Ee=100,M=t.forwardRef((d,g)=>{const{align:r=v.align,alignOffset:k,className:q,disabled:f,icon:w,svgIcon:A,iconClass:$,id:j,items:a,item:ee,text:C,positionMode:F=v.positionMode,size:I=v.size,style:te,rounded:E=v.rounded,themeColor:D=v.themeColor,overlayStyle:oe,tabIndex:se,accessKey:ne,popupSettings:x={},modal:ae,onClick:P,onItemClick:_,onFocus:S,onBlur:W,onKeyDown:Z,onOpen:H,onClose:L,...le}=d,X=o.useZIndexContext(),U=X?X+Ie:Ee,G=t.useRef(null),i=t.useRef(null),ie=t.useRef(null),re=t.useRef(null),J=t.useCallback(()=>{i.current&&i.current.focus()},[]),p=t.useCallback(()=>({element:i.current,focus:J}),[J]);t.useImperativeHandle(G,p),t.useImperativeHandle(g,()=>G.current);const[c,u]=t.useState(!1),[N,m]=t.useState(!1),[y,l]=t.useState(-1),ce=o.useId()+"-button-id",T=o.useDir(i,d.dir),h=T==="rtl",K=o.useId()+"-list-id";t.useEffect(()=>{R.position(i,r,k,h)},[i,r,k,h]),t.useEffect(()=>{N&&i&&i.current&&i.current.focus()},[N,i]);const b=t.useCallback((e,n)=>{a&&o.dispatchEvent(n?H:L,e,p(),void 0)},[H,L,a]),Q=t.useCallback(e=>{!e.target||f||(!a&&P?o.dispatchEvent(P,e,p(),void 0):(u(!c),m(!0),l(c?-1:0),b(e,!c)))},[u,m,l,P,b,c,a,f]),ue=t.useCallback(e=>{m(!0),l(c?0:-1),S&&o.dispatchEvent(S,e,p(),void 0)},[S,m,l]),de=t.useCallback(e=>{m(!1),u(!1),l(-1),o.dispatchEvent(W,e,p(),void 0),c&&b(e,!1)},[W,m,u,l,b]),fe=t.useCallback(e=>{e.preventDefault()},[]),z=t.useCallback((e,n)=>{a&&(a[n].disabled||o.dispatchEvent(_,e,p(),{itemProps:a[n],itemIndex:n}))},[_]),pe=t.useCallback((e,n)=>{!e.target||!a||(l(n),u(!1),z(e,n),b(e,!1))},[l,u,z,b]),me=t.useCallback(e=>{o.getActiveElement(document)===i.current&&e.preventDefault()},[i]),be=t.useCallback(e=>{const n=y,B=a?a.length:-1;if(e.altKey){!c&&e.keyCode===o.Keys.down&&(e.preventDefault(),u(!0),l(0)),c&&e.keyCode===o.Keys.up&&(e.preventDefault(),u(!1),l(-1));return}switch(e.keyCode){case o.Keys.enter:case o.Keys.space:n>=0&&z(e,n),a||Q(e),e.preventDefault(),u(!c),l(c?-1:0);break;case o.Keys.esc:e.preventDefault(),u(!1),l(-1);break;case o.Keys.home:e.preventDefault(),l(0);break;case o.Keys.end:e.preventDefault(),l(B-1);break;case o.Keys.down:case o.Keys.right:e.preventDefault(),l(n+1>=B?0:n+1);break;case o.Keys.up:case o.Keys.left:e.preventDefault(),l(n-1<0?B-1:n-1);break}o.dispatchEvent(Z,e,p(),void 0)},[Z,y,l,h,u]),ge=t.useMemo(()=>o.classNames("k-fab",{"k-fab-sm":I==="small","k-fab-md":I==="medium","k-fab-lg":I==="large","k-disabled":f,"k-pos-absolute":F==="absolute","k-pos-fixed":F==="fixed","k-focus":N,[`k-rounded-${o.kendoThemeMaps.roundedMap[E]||E}`]:E,"k-fab-solid":D,[`k-fab-solid-${D}`]:D},`k-${r.vertical}-${r.horizontal}`,q),[D,I,E,f,F,r,N,q]),ke=a&&a.map((e,n)=>t.createElement(he.FloatingActionButtonItem,{...e,key:n,index:n,id:`${K}-${n}`,disabled:f||e.disabled,focused:y===n,dataItem:e,item:ee,className:o.classNames(e.className,R.getTextDirectionClass(T||"ltr",r.horizontal)),onClick:pe,onDown:me})),V=!!((w||A)&&!C),Y=(i.current?i.current.offsetWidth:0)/2-32/2;let O;return w||A?O=t.createElement(o.IconWrap,{className:"k-fab-icon",name:w,icon:A}):$?O=t.createElement("span",{role:"presentation",className:$}):O=null,t.createElement(o.ZIndexContext.Provider,{value:U},t.createElement(t.Fragment,null,t.createElement("button",{ref:i,id:j||ce,role:"button",type:"button","aria-disabled":f,"aria-expanded":a?c:void 0,"aria-haspopup":!!a,"aria-label":`${C||""} floatingactionbutton`,"aria-owns":a?K:void 0,"aria-activedescendant":y>=0&&a?`${K}-${y}`:void 0,tabIndex:o.getTabIndex(se,f),accessKey:ne,dir:T,disabled:f,className:ge,style:te,onClick:Q,onMouseDown:fe,onFocus:ue,onBlur:de,onKeyDown:be,...le},O,C&&t.createElement("span",{className:"k-fab-text"},C)),ae&&c&&t.createElement("div",{className:"k-overlay",style:{zIndex:U,...oe}}),t.createElement(ve.Popup,{ref:re,anchor:i.current,show:c,animate:x.animate,popupClass:o.classNames("k-popup-transparent k-fab-popup",x.popupClass),anchorAlign:x.anchorAlign||R.getAnchorAlign(r,h),popupAlign:x.popupAlign||R.getPopupAlign(r,h),style:{boxShadow:"none"}},t.createElement("ul",{ref:ie,role:"menu","aria-labelledby":j,id:K,className:o.classNames("k-fab-items",{"k-fab-items-bottom":r.vertical!=="bottom","k-fab-items-top":r.vertical==="bottom"}),style:{paddingLeft:V?Y:void 0,paddingRight:V?Y:void 0}},ke))))});M.propTypes={className:s.string,style:s.object,id:s.string,dir:s.string,tabIndex:s.number,accessKey:s.string,disabled:s.bool,icon:s.string,svgIcon:o.svgIconPropType,iconClass:s.string,text:s.string,alignOffset:s.shape({x:s.oneOfType([s.number,s.string]).isRequired,y:s.oneOfType([s.number,s.string]).isRequired}),align:s.shape({vertical:s.oneOf(["top","middle","bottom"]).isRequired,horizontal:s.oneOf(["start","center","end"]).isRequired}),positionMode:s.oneOf(["absolute","fixed"]),size:s.oneOf(["small","medium","large"]),rounded:s.oneOf(["small","medium","large","full"]),themeColor:s.oneOf(["primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"]),modal:s.bool,overlayStyle:s.object};const v={align:{vertical:"bottom",horizontal:"end"},size:void 0,rounded:void 0,themeColor:void 0,positionMode:"fixed"};M.displayName="KendoFloatingActionButton";exports.FloatingActionButton=M;
|