@progress/kendo-react-buttons 9.4.0-develop.19 → 9.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.js +1 -1
- package/Button.mjs +18 -17
- package/ButtonGroup.js +1 -1
- package/ButtonGroup.mjs +10 -9
- package/Chip/Chip.js +1 -1
- package/Chip/Chip.mjs +1 -0
- package/Chip/ChipList.js +1 -1
- package/Chip/ChipList.mjs +1 -0
- package/Chip/chip-list-contexts.js +1 -1
- package/Chip/chip-list-contexts.mjs +7 -6
- package/Chip/data-reducer.js +1 -1
- package/Chip/data-reducer.mjs +1 -0
- package/Chip/focus-reducer.js +1 -1
- package/Chip/focus-reducer.mjs +1 -0
- package/Chip/selection-reducer.js +1 -1
- package/Chip/selection-reducer.mjs +3 -2
- package/FloatingActionButton/FloatingActionButton.js +1 -1
- package/FloatingActionButton/FloatingActionButton.mjs +1 -0
- package/FloatingActionButton/FloatingActionButtonItem.js +1 -1
- package/FloatingActionButton/FloatingActionButtonItem.mjs +7 -6
- package/FloatingActionButton/utils.js +1 -1
- package/FloatingActionButton/utils.mjs +1 -0
- package/ListButton/ButtonItem.js +1 -1
- package/ListButton/ButtonItem.mjs +4 -3
- package/ListButton/DropDownButton.js +1 -1
- package/ListButton/DropDownButton.mjs +1 -0
- package/ListButton/DropDownButtonItem.js +1 -1
- package/ListButton/DropDownButtonItem.mjs +5 -4
- package/ListButton/SplitButton.js +1 -1
- package/ListButton/SplitButton.mjs +1 -0
- package/ListButton/SplitButtonItem.js +1 -1
- package/ListButton/SplitButtonItem.mjs +1 -0
- package/ListButton/utils/navigation.js +1 -1
- package/ListButton/utils/navigation.mjs +9 -8
- package/ListButton/utils/popup.js +1 -1
- package/ListButton/utils/popup.mjs +6 -5
- package/NOTICE.txt +51 -40
- package/dist/cdn/js/kendo-react-buttons.js +1 -8
- package/index.d.mts +1 -49
- package/index.d.ts +1 -49
- package/index.js +1 -2
- package/index.mjs +2 -2
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +3 -2
- package/package.json +4 -4
- package/toolbar/Toolbar.js +1 -1
- package/toolbar/Toolbar.mjs +93 -146
- package/toolbar/tools/ToolbarItem.js +1 -1
- package/toolbar/tools/ToolbarItem.mjs +6 -5
- package/toolbar/tools/ToolbarSeparator.js +1 -1
- package/toolbar/tools/ToolbarSeparator.mjs +4 -3
- package/toolbar/tools/ToolbarSpacer.js +1 -1
- package/toolbar/tools/ToolbarSpacer.mjs +13 -12
- package/util.js +1 -1
- package/util.mjs +1 -0
- package/toolbar/messages/index.js +0 -8
- package/toolbar/messages/index.mjs +0 -18
- package/toolbar/tools/ToolbarOverflowSection.js +0 -8
- package/toolbar/tools/ToolbarOverflowSection.mjs +0 -67
- package/toolbar/tools/ToolbarScrollButton.js +0 -8
- package/toolbar/tools/ToolbarScrollButton.mjs +0 -49
- package/toolbar/tools/ToolbarScrollable.js +0 -8
- package/toolbar/tools/ToolbarScrollable.mjs +0 -39
package/index.d.mts
CHANGED
|
@@ -2016,54 +2016,10 @@ export declare interface ToolbarItemProps extends KendoReactComponentBaseProps {
|
|
|
2016
2016
|
style?: React_2.CSSProperties;
|
|
2017
2017
|
}
|
|
2018
2018
|
|
|
2019
|
-
/**
|
|
2020
|
-
* @hidden
|
|
2021
|
-
*/
|
|
2022
|
-
export declare interface ToolbarOverflowProps {
|
|
2023
|
-
/**
|
|
2024
|
-
* Represents the possible overflow mode options of the Toolbar.
|
|
2025
|
-
* Applicable when there is not enough space to render all tools.
|
|
2026
|
-
*
|
|
2027
|
-
* @default `section`
|
|
2028
|
-
*/
|
|
2029
|
-
overflow?: 'none' | 'section' | 'scroll';
|
|
2030
|
-
/**
|
|
2031
|
-
* Determines the Toolbar scroll buttons visibility.
|
|
2032
|
-
* Applicable when the overflow property is set to `scroll`.
|
|
2033
|
-
*
|
|
2034
|
-
* @default `auto`
|
|
2035
|
-
*/
|
|
2036
|
-
scrollButtons?: 'hidden' | 'visible' | 'auto';
|
|
2037
|
-
/**
|
|
2038
|
-
* Determines the Toolbar scroll buttons position.
|
|
2039
|
-
* Applicable when the overflow property is set to `scroll`.
|
|
2040
|
-
*
|
|
2041
|
-
* @default `split`
|
|
2042
|
-
*/
|
|
2043
|
-
scrollButtonsPosition?: 'start' | 'end' | 'split';
|
|
2044
|
-
/**
|
|
2045
|
-
* Sets the Toolbar scroll speed in pixels when scrolling via clicking the previous or next button.
|
|
2046
|
-
* Applicable when the overflow property is set to `scroll`.
|
|
2047
|
-
*
|
|
2048
|
-
* @default 100
|
|
2049
|
-
*/
|
|
2050
|
-
buttonScrollSpeed?: number;
|
|
2051
|
-
/**
|
|
2052
|
-
* Defines the custom component that will be rendered as a previous button.
|
|
2053
|
-
* To remove the button, set a function which returns null `() => null`.
|
|
2054
|
-
*/
|
|
2055
|
-
prevButton?: React.ComponentType;
|
|
2056
|
-
/**
|
|
2057
|
-
* Defines the custom component that will be rendered as a next button.
|
|
2058
|
-
* To remove the button, set a function which returns null `() => null`.
|
|
2059
|
-
*/
|
|
2060
|
-
nextButton?: React.ComponentType;
|
|
2061
|
-
}
|
|
2062
|
-
|
|
2063
2019
|
/**
|
|
2064
2020
|
* Represents the props of the [KendoReact Toolbar component]({% slug overview_toolbar %}).
|
|
2065
2021
|
*/
|
|
2066
|
-
export declare interface ToolbarProps extends KendoReactComponentBaseProps
|
|
2022
|
+
export declare interface ToolbarProps extends KendoReactComponentBaseProps {
|
|
2067
2023
|
/**
|
|
2068
2024
|
* Sets additional classes to the Toolbar.
|
|
2069
2025
|
*/
|
|
@@ -2167,10 +2123,6 @@ declare interface ToolbarSeparatorProps {
|
|
|
2167
2123
|
* Sets additional classes to the ToolbarSeparator component.
|
|
2168
2124
|
*/
|
|
2169
2125
|
className?: string;
|
|
2170
|
-
/**
|
|
2171
|
-
* @hidden
|
|
2172
|
-
*/
|
|
2173
|
-
_ref?: React_2.Ref<HTMLDivElement>;
|
|
2174
2126
|
}
|
|
2175
2127
|
|
|
2176
2128
|
/**
|
package/index.d.ts
CHANGED
|
@@ -2016,54 +2016,10 @@ export declare interface ToolbarItemProps extends KendoReactComponentBaseProps {
|
|
|
2016
2016
|
style?: React_2.CSSProperties;
|
|
2017
2017
|
}
|
|
2018
2018
|
|
|
2019
|
-
/**
|
|
2020
|
-
* @hidden
|
|
2021
|
-
*/
|
|
2022
|
-
export declare interface ToolbarOverflowProps {
|
|
2023
|
-
/**
|
|
2024
|
-
* Represents the possible overflow mode options of the Toolbar.
|
|
2025
|
-
* Applicable when there is not enough space to render all tools.
|
|
2026
|
-
*
|
|
2027
|
-
* @default `section`
|
|
2028
|
-
*/
|
|
2029
|
-
overflow?: 'none' | 'section' | 'scroll';
|
|
2030
|
-
/**
|
|
2031
|
-
* Determines the Toolbar scroll buttons visibility.
|
|
2032
|
-
* Applicable when the overflow property is set to `scroll`.
|
|
2033
|
-
*
|
|
2034
|
-
* @default `auto`
|
|
2035
|
-
*/
|
|
2036
|
-
scrollButtons?: 'hidden' | 'visible' | 'auto';
|
|
2037
|
-
/**
|
|
2038
|
-
* Determines the Toolbar scroll buttons position.
|
|
2039
|
-
* Applicable when the overflow property is set to `scroll`.
|
|
2040
|
-
*
|
|
2041
|
-
* @default `split`
|
|
2042
|
-
*/
|
|
2043
|
-
scrollButtonsPosition?: 'start' | 'end' | 'split';
|
|
2044
|
-
/**
|
|
2045
|
-
* Sets the Toolbar scroll speed in pixels when scrolling via clicking the previous or next button.
|
|
2046
|
-
* Applicable when the overflow property is set to `scroll`.
|
|
2047
|
-
*
|
|
2048
|
-
* @default 100
|
|
2049
|
-
*/
|
|
2050
|
-
buttonScrollSpeed?: number;
|
|
2051
|
-
/**
|
|
2052
|
-
* Defines the custom component that will be rendered as a previous button.
|
|
2053
|
-
* To remove the button, set a function which returns null `() => null`.
|
|
2054
|
-
*/
|
|
2055
|
-
prevButton?: React.ComponentType;
|
|
2056
|
-
/**
|
|
2057
|
-
* Defines the custom component that will be rendered as a next button.
|
|
2058
|
-
* To remove the button, set a function which returns null `() => null`.
|
|
2059
|
-
*/
|
|
2060
|
-
nextButton?: React.ComponentType;
|
|
2061
|
-
}
|
|
2062
|
-
|
|
2063
2019
|
/**
|
|
2064
2020
|
* Represents the props of the [KendoReact Toolbar component]({% slug overview_toolbar %}).
|
|
2065
2021
|
*/
|
|
2066
|
-
export declare interface ToolbarProps extends KendoReactComponentBaseProps
|
|
2022
|
+
export declare interface ToolbarProps extends KendoReactComponentBaseProps {
|
|
2067
2023
|
/**
|
|
2068
2024
|
* Sets additional classes to the Toolbar.
|
|
2069
2025
|
*/
|
|
@@ -2167,10 +2123,6 @@ declare interface ToolbarSeparatorProps {
|
|
|
2167
2123
|
* Sets additional classes to the ToolbarSeparator component.
|
|
2168
2124
|
*/
|
|
2169
2125
|
className?: string;
|
|
2170
|
-
/**
|
|
2171
|
-
* @hidden
|
|
2172
|
-
*/
|
|
2173
|
-
_ref?: React_2.Ref<HTMLDivElement>;
|
|
2174
2126
|
}
|
|
2175
2127
|
|
|
2176
2128
|
/**
|
package/index.js
CHANGED
|
@@ -5,5 +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";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./Button.js"),i=require("./ButtonGroup.js"),t=require("./ListButton/SplitButton.js"),a=require("./ListButton/SplitButtonItem.js"),o=require("./ListButton/DropDownButton.js"),p=require("./ListButton/DropDownButtonItem.js"),l=require("./toolbar/Toolbar.js"),B=require("./toolbar/tools/ToolbarItem.js"),c=require("./toolbar/tools/ToolbarSeparator.js"),s=require("./toolbar/tools/ToolbarSpacer.js"),D=require("./util.js"),m=require("./Chip/Chip.js"),S=require("./Chip/ChipList.js"),b=require("./FloatingActionButton/FloatingActionButton.js"),q=require("./FloatingActionButton/FloatingActionButtonItem.js"),n=require("@progress/kendo-react-common"),r=n.withIdHOC(o.DropDownButton);r.displayName="KendoReactDropDownButton";const e=n.withIdHOC(t.SplitButton);e.displayName="KendoReactSplitButton";exports.Button=u.Button;exports.ButtonGroup=i.ButtonGroup;exports.SplitButtonClassComponent=t.SplitButton;exports.SplitButtonItem=a.SplitButtonItem;exports.DropDownButtonClassComponent=o.DropDownButton;exports.DropDownButtonItem=p.DropDownButtonItem;exports.Toolbar=l.Toolbar;exports.ToolbarItem=B.ToolbarItem;exports.ToolbarSeparator=c.ToolbarSeparator;exports.ToolbarSpacer=s.ToolbarSpacer;exports.toolbarButtons=D.toolbarButtons;exports.Chip=m.Chip;exports.ChipList=S.ChipList;exports.FloatingActionButton=b.FloatingActionButton;exports.FloatingActionButtonItem=q.FloatingActionButtonItem;exports.DropDownButton=r;exports.SplitButton=e;
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./Button.js"),i=require("./ButtonGroup.js"),t=require("./ListButton/SplitButton.js"),a=require("./ListButton/SplitButtonItem.js"),o=require("./ListButton/DropDownButton.js"),p=require("./ListButton/DropDownButtonItem.js"),l=require("./toolbar/Toolbar.js"),B=require("./toolbar/tools/ToolbarItem.js"),c=require("./toolbar/tools/ToolbarSeparator.js"),s=require("./toolbar/tools/ToolbarSpacer.js"),D=require("./util.js"),m=require("./Chip/Chip.js"),S=require("./Chip/ChipList.js"),b=require("./FloatingActionButton/FloatingActionButton.js"),q=require("./FloatingActionButton/FloatingActionButtonItem.js"),n=require("@progress/kendo-react-common"),r=n.withIdHOC(o.DropDownButton);r.displayName="KendoReactDropDownButton";const e=n.withIdHOC(t.SplitButton);e.displayName="KendoReactSplitButton";exports.Button=u.Button;exports.ButtonGroup=i.ButtonGroup;exports.SplitButtonClassComponent=t.SplitButton;exports.SplitButtonItem=a.SplitButtonItem;exports.DropDownButtonClassComponent=o.DropDownButton;exports.DropDownButtonItem=p.DropDownButtonItem;exports.Toolbar=l.Toolbar;exports.ToolbarItem=B.ToolbarItem;exports.ToolbarSeparator=c.ToolbarSeparator;exports.ToolbarSpacer=s.ToolbarSpacer;exports.toolbarButtons=D.toolbarButtons;exports.Chip=m.Chip;exports.ChipList=S.ChipList;exports.FloatingActionButton=b.FloatingActionButton;exports.FloatingActionButtonItem=q.FloatingActionButtonItem;exports.DropDownButton=r;exports.SplitButton=e;
|
package/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import { ButtonGroup as f } from "./ButtonGroup.mjs";
|
|
|
11
11
|
import { SplitButton as t } from "./ListButton/SplitButton.mjs";
|
|
12
12
|
import { SplitButtonItem as x } from "./ListButton/SplitButtonItem.mjs";
|
|
13
13
|
import { DropDownButton as r } from "./ListButton/DropDownButton.mjs";
|
|
14
|
-
import { DropDownButtonItem as
|
|
14
|
+
import { DropDownButtonItem as c } from "./ListButton/DropDownButtonItem.mjs";
|
|
15
15
|
import { Toolbar as w } from "./toolbar/Toolbar.mjs";
|
|
16
16
|
import { ToolbarItem as b } from "./toolbar/tools/ToolbarItem.mjs";
|
|
17
17
|
import { ToolbarSeparator as I } from "./toolbar/tools/ToolbarSeparator.mjs";
|
|
@@ -37,7 +37,7 @@ export {
|
|
|
37
37
|
N as ChipList,
|
|
38
38
|
p as DropDownButton,
|
|
39
39
|
r as DropDownButtonClassComponent,
|
|
40
|
-
|
|
40
|
+
c as DropDownButtonItem,
|
|
41
41
|
$ as FloatingActionButton,
|
|
42
42
|
H as FloatingActionButtonItem,
|
|
43
43
|
n as SplitButton,
|
package/package-metadata.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 e={name:"@progress/kendo-react-buttons",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-buttons",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1737713685,version:"9.4.0-develop.2",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
+
"use client";
|
|
8
9
|
const e = {
|
|
9
10
|
name: "@progress/kendo-react-buttons",
|
|
10
11
|
productName: "KendoReact",
|
|
11
12
|
productCode: "KENDOUIREACT",
|
|
12
13
|
productCodes: ["KENDOUIREACT"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "9.4.0-develop.
|
|
14
|
+
publishDate: 1737713685,
|
|
15
|
+
version: "9.4.0-develop.2",
|
|
15
16
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
16
17
|
};
|
|
17
18
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-buttons",
|
|
3
|
-
"version": "9.4.0-develop.
|
|
3
|
+
"version": "9.4.0-develop.2",
|
|
4
4
|
"description": "All you need in React Button in one package: disabled/enabled states, built-in styles and more. KendoReact Buttons package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@progress/kendo-licensing": "^1.3.4",
|
|
29
|
-
"@progress/kendo-react-common": "9.4.0-develop.
|
|
30
|
-
"@progress/kendo-react-popup": "9.4.0-develop.
|
|
29
|
+
"@progress/kendo-react-common": "9.4.0-develop.2",
|
|
30
|
+
"@progress/kendo-react-popup": "9.4.0-develop.2",
|
|
31
31
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
32
32
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
33
33
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"package": {
|
|
54
54
|
"productName": "KendoReact",
|
|
55
55
|
"productCode": "KENDOUIREACT",
|
|
56
|
-
"publishDate":
|
|
56
|
+
"publishDate": 1737713685,
|
|
57
57
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
58
58
|
}
|
|
59
59
|
},
|
package/toolbar/Toolbar.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const H=require("react"),c=require("prop-types"),a=require("@progress/kendo-react-common"),P=require("../util.js"),W=require("../package-metadata.js");function A(o){const f=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const i in o)if(i!=="default"){const d=Object.getOwnPropertyDescriptor(o,i);Object.defineProperty(f,i,d.get?d:{enumerable:!0,get:()=>o[i]})}}return f.default=o,Object.freeze(f)}const r=A(H),I=r.forwardRef((o,f)=>{a.validatePackage(W.packageMetadata);const{children:i,className:d,id:q,ariaLabel:S,keyboardNavigation:h,role:M,onResize:x,dir:T,style:C,tabIndex:z=p.tabIndex,size:k=p.size,fillMode:v=p.fillMode}=o,w=r.useRef(!1),n=r.useRef(null),b=r.useRef(0),y=r.useRef(0),s=r.useRef([]),m=r.useMemo(()=>o.buttons||P.toolbarButtons,[o.buttons]),N=r.useMemo(()=>m.map(e=>e+":focus").join(","),[m]),K=()=>{const e=n.current&&n.current.querySelector(N);return Math.max(0,s.current.findIndex(u=>u===e))},R=r.useRef({element:null,props:o});r.useImperativeHandle(R,()=>({element:n.current,props:o})),r.useImperativeHandle(f,()=>R.current),r.useEffect(()=>(window.addEventListener("resize",j),n.current&&(y.current=n.current.offsetWidth,b.current=n.current.offsetHeight,h!==!1&&(s.current=Array.from(n.current.querySelectorAll(m.join(","))),O(0))),()=>{window.removeEventListener("resize",j),s.current.length=0}),[]),r.useEffect(()=>{if(w.current){if(!n.current||h===!1)return;s.current=Array.from(n.current.querySelectorAll(m.join(","))),O(K())}else w.current=!0});const O=e=>{s.current.forEach((u,t)=>{u.tabIndex=t===e?z:-1})},E=e=>{const u=e.keyCode===a.Keys.left||e.keyCode===a.Keys.right||e.keyCode===a.Keys.home||e.keyCode===a.Keys.end,t=K();!u||e.defaultPrevented||s.current.findIndex(l=>l===e.target)===-1||(e.keyCode===a.Keys.left?g(t,t===0?s.current.length-1:t-1):g(t,t===s.current.length-1?0:t+1),e.keyCode===a.Keys.home&&g(t,0),e.keyCode===a.Keys.end&&g(t,s.current.length-1))},g=(e,u)=>{const t=s.current[u];if(t){t.tabIndex=z,t.focus();const l=s.current[e];l&&(l.tabIndex=-1)}},j=e=>{if(!n.current)return;const u=n.current.offsetWidth,t=n.current.offsetHeight;if(y.current!==u||b.current!==t){y.current=u,b.current=t;const l={offsetWidth:y.current,offsetHeight:b.current};x&&x.call(void 0,{target:R.current,...l,nativeEvent:e})}};return r.createElement("div",{id:q,"aria-label":S,className:a.classNames("k-toolbar",{[`k-toolbar-${a.kendoThemeMaps.sizeMap[k]||k}`]:k,[`k-toolbar-${v}`]:v},d),style:C,role:M!==void 0?M||void 0:"toolbar",dir:T,ref:n,onKeyDown:h!==!1?E:void 0},i)}),p={tabIndex:0,size:"medium",fillMode:"solid"};I.displayName="KendoReactToolbar";I.propTypes={tabIndex:c.number,dir:c.string,keyboardNavigation:c.bool,style:c.object,className:c.string,role:c.string,onResize:c.func,buttons:c.arrayOf(c.string.isRequired),size:c.oneOf([null,"small","medium","large"]),fillMode:c.oneOf([null,"solid","flat","outline"])};exports.Toolbar=I;
|
package/toolbar/Toolbar.mjs
CHANGED
|
@@ -5,176 +5,123 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
Y(oe);
|
|
8
|
+
"use client";
|
|
9
|
+
import * as r from "react";
|
|
10
|
+
import s from "prop-types";
|
|
11
|
+
import { validatePackage as j, classNames as q, kendoThemeMaps as A, Keys as u } from "@progress/kendo-react-common";
|
|
12
|
+
import { toolbarButtons as B } from "../util.mjs";
|
|
13
|
+
import { packageMetadata as P } from "../package-metadata.mjs";
|
|
14
|
+
const v = r.forwardRef((a, C) => {
|
|
15
|
+
j(P);
|
|
17
16
|
const {
|
|
18
|
-
children:
|
|
19
|
-
className:
|
|
20
|
-
id:
|
|
21
|
-
ariaLabel:
|
|
22
|
-
keyboardNavigation:
|
|
23
|
-
role:
|
|
24
|
-
onResize:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
buttonScrollSpeed: F = f.buttonScrollSpeed,
|
|
33
|
-
prevButton: G,
|
|
34
|
-
nextButton: J
|
|
35
|
-
} = i, C = t.useRef(!1), r = t.useRef(null), m = t.useRef(null), h = t.useRef(0), S = t.useRef(0), s = t.useRef([]), I = t.useRef({ element: null, props: i }), [Q, U] = t.useState(!1), [O, P] = t.useState(!0), [W, z] = t.useState(!1), g = Z(r, i.dir), y = t.useMemo(() => i.buttons || te, [i.buttons]), V = t.useMemo(() => y.map((e) => e + ":focus").join(","), [y]), M = () => {
|
|
36
|
-
const e = r.current && r.current.querySelector(V);
|
|
17
|
+
children: E,
|
|
18
|
+
className: H,
|
|
19
|
+
id: N,
|
|
20
|
+
ariaLabel: T,
|
|
21
|
+
keyboardNavigation: b,
|
|
22
|
+
role: k,
|
|
23
|
+
onResize: x,
|
|
24
|
+
dir: W,
|
|
25
|
+
style: K,
|
|
26
|
+
tabIndex: I = h.tabIndex,
|
|
27
|
+
size: y = h.size,
|
|
28
|
+
fillMode: R = h.fillMode
|
|
29
|
+
} = a, p = r.useRef(!1), n = r.useRef(null), f = r.useRef(0), l = r.useRef(0), o = r.useRef([]), d = r.useMemo(() => a.buttons || B, [a.buttons]), O = r.useMemo(() => d.map((e) => e + ":focus").join(","), [d]), z = () => {
|
|
30
|
+
const e = n.current && n.current.querySelector(O);
|
|
37
31
|
return Math.max(
|
|
38
32
|
0,
|
|
39
|
-
|
|
33
|
+
o.current.findIndex((c) => c === e)
|
|
40
34
|
);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
}, g = r.useRef({ element: null, props: a });
|
|
36
|
+
r.useImperativeHandle(
|
|
37
|
+
g,
|
|
44
38
|
() => ({
|
|
45
|
-
element:
|
|
46
|
-
props:
|
|
39
|
+
element: n.current,
|
|
40
|
+
props: a
|
|
47
41
|
})
|
|
48
|
-
),
|
|
49
|
-
|
|
50
|
-
),
|
|
51
|
-
window.removeEventListener("resize",
|
|
52
|
-
}), []),
|
|
53
|
-
if (
|
|
54
|
-
if (!
|
|
42
|
+
), r.useImperativeHandle(C, () => g.current), r.useEffect(() => (window.addEventListener("resize", w), n.current && (l.current = n.current.offsetWidth, f.current = n.current.offsetHeight, b !== !1 && (o.current = Array.from(
|
|
43
|
+
n.current.querySelectorAll(d.join(","))
|
|
44
|
+
), M(0))), () => {
|
|
45
|
+
window.removeEventListener("resize", w), o.current.length = 0;
|
|
46
|
+
}), []), r.useEffect(() => {
|
|
47
|
+
if (p.current) {
|
|
48
|
+
if (!n.current || b === !1)
|
|
55
49
|
return;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
),
|
|
50
|
+
o.current = Array.from(
|
|
51
|
+
n.current.querySelectorAll(d.join(","))
|
|
52
|
+
), M(z());
|
|
59
53
|
} else
|
|
60
|
-
|
|
54
|
+
p.current = !0;
|
|
61
55
|
});
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
56
|
+
const M = (e) => {
|
|
57
|
+
o.current.forEach((c, t) => {
|
|
58
|
+
c.tabIndex = t === e ? I : -1;
|
|
65
59
|
});
|
|
66
|
-
},
|
|
67
|
-
const
|
|
68
|
-
!
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
) :
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
), e.keyCode === u.home &&
|
|
75
|
-
},
|
|
76
|
-
const
|
|
77
|
-
if (
|
|
78
|
-
|
|
79
|
-
const
|
|
80
|
-
|
|
60
|
+
}, S = (e) => {
|
|
61
|
+
const c = e.keyCode === u.left || e.keyCode === u.right || e.keyCode === u.home || e.keyCode === u.end, t = z();
|
|
62
|
+
!c || e.defaultPrevented || o.current.findIndex((i) => i === e.target) === -1 || (e.keyCode === u.left ? m(
|
|
63
|
+
t,
|
|
64
|
+
t === 0 ? o.current.length - 1 : t - 1
|
|
65
|
+
) : m(
|
|
66
|
+
t,
|
|
67
|
+
t === o.current.length - 1 ? 0 : t + 1
|
|
68
|
+
), e.keyCode === u.home && m(t, 0), e.keyCode === u.end && m(t, o.current.length - 1));
|
|
69
|
+
}, m = (e, c) => {
|
|
70
|
+
const t = o.current[c];
|
|
71
|
+
if (t) {
|
|
72
|
+
t.tabIndex = I, t.focus();
|
|
73
|
+
const i = o.current[e];
|
|
74
|
+
i && (i.tabIndex = -1);
|
|
81
75
|
}
|
|
82
|
-
},
|
|
83
|
-
if (!
|
|
76
|
+
}, w = (e) => {
|
|
77
|
+
if (!n.current)
|
|
84
78
|
return;
|
|
85
|
-
const
|
|
86
|
-
if (
|
|
87
|
-
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
T();
|
|
92
|
-
}, T = t.useCallback(() => {
|
|
93
|
-
const e = m.current;
|
|
94
|
-
e && U(
|
|
95
|
-
e.scrollWidth > e.clientWidth || e.scrollHeight > e.clientHeight
|
|
96
|
-
);
|
|
97
|
-
}, []), R = t.useCallback(() => {
|
|
98
|
-
const e = m.current;
|
|
99
|
-
if (e) {
|
|
100
|
-
const l = e.scrollLeft === 0, o = g !== "rtl" ? e.scrollLeft + e.clientWidth === e.scrollWidth : e.clientWidth - e.scrollLeft === e.scrollWidth;
|
|
101
|
-
l && P(!0), o && z(!0), !l && !o && (P(!1), z(!1));
|
|
79
|
+
const c = n.current.offsetWidth, t = n.current.offsetHeight;
|
|
80
|
+
if (l.current !== c || f.current !== t) {
|
|
81
|
+
l.current = c, f.current = t;
|
|
82
|
+
const i = { offsetWidth: l.current, offsetHeight: f.current };
|
|
83
|
+
x && x.call(void 0, { target: g.current, ...i, nativeEvent: e });
|
|
102
84
|
}
|
|
103
|
-
}
|
|
104
|
-
return
|
|
105
|
-
const e = m.current;
|
|
106
|
-
if (e)
|
|
107
|
-
return e.addEventListener("scroll", R), () => {
|
|
108
|
-
e.removeEventListener("scroll", R);
|
|
109
|
-
};
|
|
110
|
-
}, [R]), /* @__PURE__ */ t.createElement(
|
|
85
|
+
};
|
|
86
|
+
return /* @__PURE__ */ r.createElement(
|
|
111
87
|
"div",
|
|
112
88
|
{
|
|
113
|
-
id:
|
|
114
|
-
"aria-label":
|
|
115
|
-
className:
|
|
89
|
+
id: N,
|
|
90
|
+
"aria-label": T,
|
|
91
|
+
className: q(
|
|
116
92
|
"k-toolbar",
|
|
117
93
|
{
|
|
118
|
-
[`k-toolbar-${
|
|
119
|
-
[`k-toolbar-${
|
|
120
|
-
"k-toolbar-scrollable": c === "scroll",
|
|
121
|
-
"k-toolbar-scrollable-overlay": c === "scroll" && (d === "hidden" || d === void 0),
|
|
122
|
-
"k-toolbar-scrollable-start": c === "scroll" && d === "hidden" && O,
|
|
123
|
-
"k-toolbar-scrollable-end": c === "scroll" && d === "hidden" && W,
|
|
124
|
-
"k-toolbar-section": i.overflow && c === "section"
|
|
94
|
+
[`k-toolbar-${A.sizeMap[y] || y}`]: y,
|
|
95
|
+
[`k-toolbar-${R}`]: R
|
|
125
96
|
},
|
|
126
|
-
|
|
97
|
+
H
|
|
127
98
|
),
|
|
128
|
-
style:
|
|
129
|
-
role:
|
|
130
|
-
dir:
|
|
131
|
-
ref:
|
|
132
|
-
onKeyDown:
|
|
99
|
+
style: K,
|
|
100
|
+
role: k !== void 0 ? k || void 0 : "toolbar",
|
|
101
|
+
dir: W,
|
|
102
|
+
ref: n,
|
|
103
|
+
onKeyDown: b !== !1 ? S : void 0
|
|
133
104
|
},
|
|
134
|
-
|
|
135
|
-
re,
|
|
136
|
-
{
|
|
137
|
-
scrollButtons: d,
|
|
138
|
-
scrollButtonsPosition: $,
|
|
139
|
-
prevButton: G,
|
|
140
|
-
nextButton: J,
|
|
141
|
-
isOverflowing: Q,
|
|
142
|
-
scrollContentRef: m,
|
|
143
|
-
buttonScrollSpeed: F,
|
|
144
|
-
dir: g,
|
|
145
|
-
isScrollStartPosition: O,
|
|
146
|
-
isScrollEndPosition: W,
|
|
147
|
-
children: k
|
|
148
|
-
}
|
|
149
|
-
),
|
|
150
|
-
c === "section" && /* @__PURE__ */ t.createElement(ne, { toolbarRef: r, fillMode: w, size: b }, k),
|
|
151
|
-
(c === "none" || c === void 0) && k
|
|
105
|
+
E
|
|
152
106
|
);
|
|
153
|
-
}),
|
|
107
|
+
}), h = {
|
|
154
108
|
tabIndex: 0,
|
|
155
109
|
size: "medium",
|
|
156
|
-
fillMode: "solid"
|
|
157
|
-
scrollButtons: "auto",
|
|
158
|
-
scrollButtonsPosition: "split",
|
|
159
|
-
buttonScrollSpeed: 100
|
|
110
|
+
fillMode: "solid"
|
|
160
111
|
};
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
tabIndex:
|
|
164
|
-
dir:
|
|
165
|
-
keyboardNavigation:
|
|
166
|
-
style:
|
|
167
|
-
className:
|
|
168
|
-
role:
|
|
169
|
-
onResize:
|
|
170
|
-
buttons:
|
|
171
|
-
size:
|
|
172
|
-
fillMode:
|
|
173
|
-
overflow: n.oneOf(["none", "section", "scroll"]),
|
|
174
|
-
scrollButtons: n.oneOf(["hidden", "visible", "auto"]),
|
|
175
|
-
scrollButtonsPosition: n.oneOf(["start", "end", "split"]),
|
|
176
|
-
buttonScrollSpeed: n.number
|
|
112
|
+
v.displayName = "KendoReactToolbar";
|
|
113
|
+
v.propTypes = {
|
|
114
|
+
tabIndex: s.number,
|
|
115
|
+
dir: s.string,
|
|
116
|
+
keyboardNavigation: s.bool,
|
|
117
|
+
style: s.object,
|
|
118
|
+
className: s.string,
|
|
119
|
+
role: s.string,
|
|
120
|
+
onResize: s.func,
|
|
121
|
+
buttons: s.arrayOf(s.string.isRequired),
|
|
122
|
+
size: s.oneOf([null, "small", "medium", "large"]),
|
|
123
|
+
fillMode: s.oneOf([null, "solid", "flat", "outline"])
|
|
177
124
|
};
|
|
178
125
|
export {
|
|
179
|
-
|
|
126
|
+
v as Toolbar
|
|
180
127
|
};
|
|
@@ -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 i=require("react"),u=require("prop-types"),m=require("@progress/kendo-react-common");function d(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const n=d(i),a=n.forwardRef((e,r)=>{const{id:t,className:o,style:s,children:l}=e,c=n.useRef(null);return n.useImperativeHandle(r,()=>({element:c.current})),n.createElement("div",{id:t,className:m.classNames("k-toolbar-item",o),style:s,ref:c},l)});a.displayName="KendoReactToolbarItem";a.propTypes={className:u.string};exports.ToolbarItem=a;
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),u=require("prop-types"),m=require("@progress/kendo-react-common");function d(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const n=d(i),a=n.forwardRef((e,r)=>{const{id:t,className:o,style:s,children:l}=e,c=n.useRef(null);return n.useImperativeHandle(r,()=>({element:c.current})),n.createElement("div",{id:t,className:m.classNames("k-toolbar-item",o),style:s,ref:c},l)});a.displayName="KendoReactToolbarItem";a.propTypes={className:u.string};exports.ToolbarItem=a;
|
|
@@ -5,17 +5,18 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
+
"use client";
|
|
8
9
|
import * as e from "react";
|
|
9
10
|
import c from "prop-types";
|
|
10
|
-
import { classNames as
|
|
11
|
-
const t = e.forwardRef((
|
|
12
|
-
const { id:
|
|
11
|
+
import { classNames as i } from "@progress/kendo-react-common";
|
|
12
|
+
const t = e.forwardRef((s, a) => {
|
|
13
|
+
const { id: o, className: m, style: l, children: n } = s, r = e.useRef(null);
|
|
13
14
|
return e.useImperativeHandle(
|
|
14
|
-
|
|
15
|
+
a,
|
|
15
16
|
() => ({
|
|
16
17
|
element: r.current
|
|
17
18
|
})
|
|
18
|
-
), /* @__PURE__ */ e.createElement("div", { id:
|
|
19
|
+
), /* @__PURE__ */ e.createElement("div", { id: o, className: i("k-toolbar-item", m), style: l, ref: r }, n);
|
|
19
20
|
});
|
|
20
21
|
t.displayName = "KendoReactToolbarItem";
|
|
21
22
|
t.propTypes = {
|
|
@@ -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 o=require("react"),c=require("@progress/kendo-react-common");function n(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const s=n(o),l=e=>s.createElement("div",{
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),c=require("@progress/kendo-react-common");function n(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const s=n(o),l=e=>s.createElement("div",{className:c.classNames("k-separator",e.className)});exports.ToolbarSeparator=l;
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
import
|
|
10
|
-
|
|
8
|
+
"use client";
|
|
9
|
+
import * as e from "react";
|
|
10
|
+
import { classNames as r } from "@progress/kendo-react-common";
|
|
11
|
+
const t = (a) => /* @__PURE__ */ e.createElement("div", { className: r("k-separator", a.className) });
|
|
11
12
|
export {
|
|
12
13
|
t as ToolbarSeparator
|
|
13
14
|
};
|
|
@@ -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 o=require("react"),l=require("prop-types"),u=require("@progress/kendo-react-common");function m(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const r=m(o),c=r.forwardRef((e,a)=>{const t=r.useRef(null),n=r.useRef(null);r.useImperativeHandle(n,()=>({element:t.current})),r.useImperativeHandle(a,()=>({element:t.current}));const s=r.useMemo(()=>u.classNames("k-spacer",e.className),[e.className]);return r.createElement("span",{ref:t,className:s})});c.displayName="KendoReactToolbarSpacer";c.propTypes={className:l.string};exports.ToolbarSpacer=c;
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),l=require("prop-types"),u=require("@progress/kendo-react-common");function m(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const r=m(o),c=r.forwardRef((e,a)=>{const t=r.useRef(null),n=r.useRef(null);r.useImperativeHandle(n,()=>({element:t.current})),r.useImperativeHandle(a,()=>({element:t.current}));const s=r.useMemo(()=>u.classNames("k-spacer",e.className),[e.className]);return r.createElement("span",{ref:t,className:s})});c.displayName="KendoReactToolbarSpacer";c.propTypes={className:l.string};exports.ToolbarSpacer=c;
|
|
@@ -5,21 +5,22 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
+
"use client";
|
|
8
9
|
import * as e from "react";
|
|
9
|
-
import
|
|
10
|
-
import { classNames as
|
|
11
|
-
const
|
|
12
|
-
(
|
|
13
|
-
const a = e.useRef(null),
|
|
14
|
-
e.useImperativeHandle(
|
|
15
|
-
const
|
|
16
|
-
return /* @__PURE__ */ e.createElement("span", { ref: a, className:
|
|
10
|
+
import m from "prop-types";
|
|
11
|
+
import { classNames as n } from "@progress/kendo-react-common";
|
|
12
|
+
const r = e.forwardRef(
|
|
13
|
+
(s, t) => {
|
|
14
|
+
const a = e.useRef(null), c = e.useRef(null);
|
|
15
|
+
e.useImperativeHandle(c, () => ({ element: a.current })), e.useImperativeHandle(t, () => ({ element: a.current }));
|
|
16
|
+
const l = e.useMemo(() => n("k-spacer", s.className), [s.className]);
|
|
17
|
+
return /* @__PURE__ */ e.createElement("span", { ref: a, className: l });
|
|
17
18
|
}
|
|
18
19
|
);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
className:
|
|
20
|
+
r.displayName = "KendoReactToolbarSpacer";
|
|
21
|
+
r.propTypes = {
|
|
22
|
+
className: m.string
|
|
22
23
|
};
|
|
23
24
|
export {
|
|
24
|
-
|
|
25
|
+
r as ToolbarSpacer
|
|
25
26
|
};
|