@progress/kendo-react-buttons 7.2.4-develop.3 → 7.3.0-develop.1
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 +8 -0
- package/Button.mjs +124 -0
- package/ButtonGroup.js +8 -0
- package/ButtonGroup.mjs +76 -0
- package/Chip/Chip.js +8 -0
- package/Chip/Chip.mjs +220 -0
- package/Chip/ChipList.js +8 -0
- package/Chip/ChipList.mjs +190 -0
- package/Chip/chip-list-contexts.js +8 -0
- package/Chip/chip-list-contexts.mjs +18 -0
- package/Chip/data-reducer.js +8 -0
- package/Chip/data-reducer.mjs +25 -0
- package/Chip/focus-reducer.js +8 -0
- package/Chip/focus-reducer.mjs +28 -0
- package/Chip/selection-reducer.js +8 -0
- package/Chip/selection-reducer.mjs +47 -0
- package/FloatingActionButton/FloatingActionButton.js +8 -0
- package/FloatingActionButton/FloatingActionButton.mjs +343 -0
- package/FloatingActionButton/FloatingActionButtonItem.js +8 -0
- package/FloatingActionButton/FloatingActionButtonItem.mjs +93 -0
- package/FloatingActionButton/utils.js +8 -0
- package/FloatingActionButton/utils.mjs +46 -0
- package/ListButton/ButtonItem.js +8 -0
- package/ListButton/ButtonItem.mjs +63 -0
- package/ListButton/DropDownButton.js +8 -0
- package/ListButton/DropDownButton.mjs +267 -0
- package/ListButton/DropDownButtonItem.js +8 -0
- package/ListButton/DropDownButtonItem.mjs +31 -0
- package/ListButton/SplitButton.js +8 -0
- package/ListButton/SplitButton.mjs +298 -0
- package/ListButton/SplitButtonItem.js +8 -0
- package/ListButton/SplitButtonItem.mjs +30 -0
- package/ListButton/utils/navigation.js +8 -0
- package/ListButton/utils/navigation.mjs +35 -0
- package/ListButton/utils/popup.js +8 -0
- package/ListButton/utils/popup.mjs +20 -0
- package/dist/cdn/js/kendo-react-buttons.js +8 -5
- package/index.d.mts +2227 -5
- package/index.d.ts +2227 -40
- package/index.js +8 -5
- package/index.mjs +44 -1906
- package/package-metadata.js +8 -0
- package/package-metadata.mjs +19 -0
- package/package.json +3 -3
- package/toolbar/Toolbar.js +8 -0
- package/toolbar/Toolbar.mjs +124 -0
- package/toolbar/tools/ToolbarItem.js +8 -0
- package/toolbar/tools/ToolbarItem.mjs +44 -0
- package/toolbar/tools/ToolbarSeparator.js +8 -0
- package/toolbar/tools/ToolbarSeparator.mjs +21 -0
- package/toolbar/tools/ToolbarSpacer.js +8 -0
- package/toolbar/tools/ToolbarSpacer.mjs +36 -0
- package/util.js +8 -0
- package/util.mjs +36 -0
- package/Button.d.ts +0 -146
- package/ButtonGroup.d.ts +0 -36
- package/ButtonGroupInterface.d.ts +0 -36
- package/ButtonInterface.d.ts +0 -39
- package/Chip/Chip.d.ts +0 -238
- package/Chip/ChipList.d.ts +0 -119
- package/Chip/chip-list-contexts.d.ts +0 -17
- package/Chip/data-reducer.d.ts +0 -26
- package/Chip/focus-reducer.d.ts +0 -28
- package/Chip/selection-reducer.d.ts +0 -34
- package/FloatingActionButton/FloatingActionButton.d.ts +0 -21
- package/FloatingActionButton/FloatingActionButtonItem.d.ts +0 -109
- package/FloatingActionButton/interfaces/FloatingActionButtonHandle.d.ts +0 -17
- package/FloatingActionButton/interfaces/FloatingActionButtonPopupSettings.d.ts +0 -28
- package/FloatingActionButton/interfaces/FloatingActionButtonProps.d.ts +0 -219
- package/FloatingActionButton/models/align-offset.d.ts +0 -24
- package/FloatingActionButton/models/align.d.ts +0 -31
- package/FloatingActionButton/models/events.d.ts +0 -25
- package/FloatingActionButton/models/position-mode.d.ts +0 -13
- package/FloatingActionButton/models/rounded.d.ts +0 -16
- package/FloatingActionButton/models/size.d.ts +0 -15
- package/FloatingActionButton/models/theme-color.d.ts +0 -22
- package/FloatingActionButton/utils.d.ts +0 -31
- package/ListButton/ButtonItem.d.ts +0 -34
- package/ListButton/DropDownButton.d.ts +0 -127
- package/ListButton/DropDownButtonItem.d.ts +0 -34
- package/ListButton/SplitButton.d.ts +0 -129
- package/ListButton/SplitButtonItem.d.ts +0 -29
- package/ListButton/models/ButtonItem.d.ts +0 -38
- package/ListButton/models/ListButtonProps.d.ts +0 -339
- package/ListButton/models/PopupSettings.d.ts +0 -32
- package/ListButton/models/events.d.ts +0 -51
- package/ListButton/utils/navigation.d.ts +0 -9
- package/ListButton/utils/popup.d.ts +0 -13
- package/models/index.d.ts +0 -92
- package/package-metadata.d.ts +0 -9
- package/toolbar/Toolbar.d.ts +0 -175
- package/toolbar/tools/ToolbarItem.d.ts +0 -42
- package/toolbar/tools/ToolbarSeparator.d.ts +0 -20
- package/toolbar/tools/ToolbarSpacer.d.ts +0 -27
- package/util.d.ts +0 -31
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-buttons",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
const e = {
|
|
10
|
+
name: "@progress/kendo-react-buttons",
|
|
11
|
+
productName: "KendoReact",
|
|
12
|
+
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
13
|
+
publishDate: 1709715178,
|
|
14
|
+
version: "",
|
|
15
|
+
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
e as packageMetadata
|
|
19
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-buttons",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0-develop.1",
|
|
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",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"sideEffects": false,
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@progress/kendo-licensing": "^1.3.4",
|
|
26
|
-
"@progress/kendo-react-common": "7.
|
|
27
|
-
"@progress/kendo-react-popup": "7.
|
|
26
|
+
"@progress/kendo-react-common": "7.3.0-develop.1",
|
|
27
|
+
"@progress/kendo-react-popup": "7.3.0-develop.1",
|
|
28
28
|
"@progress/kendo-svg-icons": "^2.1.0",
|
|
29
29
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0",
|
|
30
30
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),i=require("prop-types"),n=require("@progress/kendo-react-common"),u=require("../util.js"),p=require("../package-metadata.js");function b(h){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(h){for(const t in h)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(h,t);Object.defineProperty(e,t,o.get?o:{enumerable:!0,get:()=>h[t]})}}return e.default=h,Object.freeze(e)}const l=b(c),a=class a extends l.Component{constructor(e){super(e),this._element=null,this.offsetHeight=0,this.offsetWidth=0,this.buttons=[],this.focusedSelector=this.selectors.map(t=>t+":focus").join(","),this.setTabIndex=t=>{const{tabIndex:o=a.defaultProps.tabIndex}=this.props;this.buttons.forEach((r,s)=>{r.tabIndex=s===t?o:-1})},this.onKeyDown=t=>{const o=t.target;if(!(t.keyCode===n.Keys.left||t.keyCode===n.Keys.right||t.keyCode===n.Keys.home||t.keyCode===n.Keys.end)||t.defaultPrevented||this.buttons.findIndex(d=>d===o)===-1)return;const s=this.focusedIndex;t.keyCode===n.Keys.left?this.focusButton(s,s===0?this.buttons.length-1:s-1):this.focusButton(s,s===this.buttons.length-1?0:s+1),t.keyCode===n.Keys.home&&this.focusButton(s,0),t.keyCode===n.Keys.end&&this.focusButton(s,this.buttons.length-1)},this.onWindowResize=t=>{const o=this.element;if(!o)return;const r=o.offsetWidth,s=o.offsetHeight;if(this.offsetWidth!==r||this.offsetHeight!==s){this.offsetWidth=r,this.offsetHeight=s;const d={offsetWidth:this.offsetWidth,offsetHeight:this.offsetHeight};this.props.onResize&&this.props.onResize.call(void 0,{target:this,...d,nativeEvent:t})}},n.validatePackage(p.packageMetadata)}get selectors(){return this.props.buttons||u.toolbarButtons}get focusedIndex(){const e=this.element&&this.element.querySelector(this.focusedSelector);return Math.max(0,this.buttons.findIndex(t=>t===e))}get element(){return this._element}componentDidMount(){window.addEventListener("resize",this.onWindowResize);const e=this.element;e&&(this.offsetWidth=e.offsetWidth,this.offsetHeight=e.offsetHeight,this.props.keyboardNavigation!==!1&&(this.buttons=Array.from(e.querySelectorAll(this.selectors.join(","))),this.setTabIndex(0)))}componentDidUpdate(){const e=this.element;!e||this.props.keyboardNavigation===!1||(this.buttons=Array.from(e.querySelectorAll(this.selectors.join(","))),this.setTabIndex(this.focusedIndex))}componentWillUnmount(){window.removeEventListener("resize",this.onWindowResize),this.buttons.length=0}render(){return l.createElement("div",{id:this.props.id,"aria-label":this.props.ariaLabel,className:n.classNames("k-toolbar",{[`k-toolbar-${n.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size},this.props.className),style:this.props.style,role:this.props.role!==void 0?this.props.role||void 0:"toolbar",dir:this.props.dir,ref:e=>this._element=e,onKeyDown:this.props.keyboardNavigation!==!1?this.onKeyDown:void 0},this.props.children)}focusButton(e,t){const{tabIndex:o=a.defaultProps.tabIndex}=this.props,r=this.buttons[t];if(r){r.tabIndex=o,r.focus();const s=this.buttons[e];s&&(s.tabIndex=-1)}}};a.propTypes={tabIndex:i.number,dir:i.string,keyboardNavigation:i.bool,style:i.object,className:i.string,role:i.string,onResize:i.func,buttons:i.arrayOf(i.string),size:i.oneOf([null,"small","medium","large"])},a.defaultProps={tabIndex:0,size:"medium"};let f=a;exports.Toolbar=f;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as a from "react";
|
|
10
|
+
import o from "prop-types";
|
|
11
|
+
import { Keys as r, validatePackage as l, classNames as p, kendoThemeMaps as u } from "@progress/kendo-react-common";
|
|
12
|
+
import { toolbarButtons as c } from "../util.mjs";
|
|
13
|
+
import { packageMetadata as m } from "../package-metadata.mjs";
|
|
14
|
+
const h = class h extends a.Component {
|
|
15
|
+
constructor(s) {
|
|
16
|
+
super(s), this._element = null, this.offsetHeight = 0, this.offsetWidth = 0, this.buttons = [], this.focusedSelector = this.selectors.map((t) => t + ":focus").join(","), this.setTabIndex = (t) => {
|
|
17
|
+
const { tabIndex: i = h.defaultProps.tabIndex } = this.props;
|
|
18
|
+
this.buttons.forEach((n, e) => {
|
|
19
|
+
n.tabIndex = e === t ? i : -1;
|
|
20
|
+
});
|
|
21
|
+
}, this.onKeyDown = (t) => {
|
|
22
|
+
const i = t.target;
|
|
23
|
+
if (!(t.keyCode === r.left || t.keyCode === r.right || t.keyCode === r.home || t.keyCode === r.end) || t.defaultPrevented || this.buttons.findIndex((f) => f === i) === -1)
|
|
24
|
+
return;
|
|
25
|
+
const e = this.focusedIndex;
|
|
26
|
+
t.keyCode === r.left ? this.focusButton(e, e === 0 ? this.buttons.length - 1 : e - 1) : this.focusButton(e, e === this.buttons.length - 1 ? 0 : e + 1), t.keyCode === r.home && this.focusButton(e, 0), t.keyCode === r.end && this.focusButton(e, this.buttons.length - 1);
|
|
27
|
+
}, this.onWindowResize = (t) => {
|
|
28
|
+
const i = this.element;
|
|
29
|
+
if (!i)
|
|
30
|
+
return;
|
|
31
|
+
const n = i.offsetWidth, e = i.offsetHeight;
|
|
32
|
+
if (this.offsetWidth !== n || this.offsetHeight !== e) {
|
|
33
|
+
this.offsetWidth = n, this.offsetHeight = e;
|
|
34
|
+
const f = { offsetWidth: this.offsetWidth, offsetHeight: this.offsetHeight };
|
|
35
|
+
this.props.onResize && this.props.onResize.call(void 0, { target: this, ...f, nativeEvent: t });
|
|
36
|
+
}
|
|
37
|
+
}, l(m);
|
|
38
|
+
}
|
|
39
|
+
get selectors() {
|
|
40
|
+
return this.props.buttons || c;
|
|
41
|
+
}
|
|
42
|
+
get focusedIndex() {
|
|
43
|
+
const s = this.element && this.element.querySelector(this.focusedSelector);
|
|
44
|
+
return Math.max(0, this.buttons.findIndex((t) => t === s));
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Returns the HTML element of the Toolbar component.
|
|
48
|
+
*/
|
|
49
|
+
get element() {
|
|
50
|
+
return this._element;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* @hidden
|
|
54
|
+
*/
|
|
55
|
+
componentDidMount() {
|
|
56
|
+
window.addEventListener("resize", this.onWindowResize);
|
|
57
|
+
const s = this.element;
|
|
58
|
+
s && (this.offsetWidth = s.offsetWidth, this.offsetHeight = s.offsetHeight, this.props.keyboardNavigation !== !1 && (this.buttons = Array.from(s.querySelectorAll(this.selectors.join(","))), this.setTabIndex(0)));
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* @hidden
|
|
62
|
+
*/
|
|
63
|
+
componentDidUpdate() {
|
|
64
|
+
const s = this.element;
|
|
65
|
+
!s || this.props.keyboardNavigation === !1 || (this.buttons = Array.from(s.querySelectorAll(this.selectors.join(","))), this.setTabIndex(this.focusedIndex));
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* @hidden
|
|
69
|
+
*/
|
|
70
|
+
componentWillUnmount() {
|
|
71
|
+
window.removeEventListener("resize", this.onWindowResize), this.buttons.length = 0;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* @hidden
|
|
75
|
+
*/
|
|
76
|
+
render() {
|
|
77
|
+
return /* @__PURE__ */ a.createElement(
|
|
78
|
+
"div",
|
|
79
|
+
{
|
|
80
|
+
id: this.props.id,
|
|
81
|
+
"aria-label": this.props.ariaLabel,
|
|
82
|
+
className: p(
|
|
83
|
+
"k-toolbar",
|
|
84
|
+
{
|
|
85
|
+
[`k-toolbar-${u.sizeMap[this.props.size] || this.props.size}`]: this.props.size
|
|
86
|
+
},
|
|
87
|
+
this.props.className
|
|
88
|
+
),
|
|
89
|
+
style: this.props.style,
|
|
90
|
+
role: this.props.role !== void 0 ? this.props.role || void 0 : "toolbar",
|
|
91
|
+
dir: this.props.dir,
|
|
92
|
+
ref: (s) => this._element = s,
|
|
93
|
+
onKeyDown: this.props.keyboardNavigation !== !1 ? this.onKeyDown : void 0
|
|
94
|
+
},
|
|
95
|
+
this.props.children
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
focusButton(s, t) {
|
|
99
|
+
const { tabIndex: i = h.defaultProps.tabIndex } = this.props, n = this.buttons[t];
|
|
100
|
+
if (n) {
|
|
101
|
+
n.tabIndex = i, n.focus();
|
|
102
|
+
const e = this.buttons[s];
|
|
103
|
+
e && (e.tabIndex = -1);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
h.propTypes = {
|
|
108
|
+
tabIndex: o.number,
|
|
109
|
+
dir: o.string,
|
|
110
|
+
keyboardNavigation: o.bool,
|
|
111
|
+
style: o.object,
|
|
112
|
+
className: o.string,
|
|
113
|
+
role: o.string,
|
|
114
|
+
onResize: o.func,
|
|
115
|
+
buttons: o.arrayOf(o.string),
|
|
116
|
+
size: o.oneOf([null, "small", "medium", "large"])
|
|
117
|
+
}, h.defaultProps = {
|
|
118
|
+
tabIndex: 0,
|
|
119
|
+
size: "medium"
|
|
120
|
+
};
|
|
121
|
+
let d = h;
|
|
122
|
+
export {
|
|
123
|
+
d as Toolbar
|
|
124
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),a=require("prop-types"),l=require("@progress/kendo-react-common");function u(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const c=u(i),n=class n extends c.PureComponent{constructor(){super(...arguments),this._element=null}get element(){return this._element}render(){return c.createElement("div",{id:this.props.id,className:l.classNames("k-toolbar-item",this.props.className),style:this.props.style,ref:t=>this._element=t},this.props.children)}};n.propTypes={className:a.string};let s=n;exports.ToolbarItem=s;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as s from "react";
|
|
10
|
+
import i from "prop-types";
|
|
11
|
+
import { classNames as p } from "@progress/kendo-react-common";
|
|
12
|
+
const e = class e extends s.PureComponent {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments), this._element = null;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Returns the HTML element of the ToolbarItem component.
|
|
18
|
+
*/
|
|
19
|
+
get element() {
|
|
20
|
+
return this._element;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @hidden
|
|
24
|
+
*/
|
|
25
|
+
render() {
|
|
26
|
+
return /* @__PURE__ */ s.createElement(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
id: this.props.id,
|
|
30
|
+
className: p("k-toolbar-item", this.props.className),
|
|
31
|
+
style: this.props.style,
|
|
32
|
+
ref: (r) => this._element = r
|
|
33
|
+
},
|
|
34
|
+
this.props.children
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
e.propTypes = {
|
|
39
|
+
className: i.string
|
|
40
|
+
};
|
|
41
|
+
let t = e;
|
|
42
|
+
export {
|
|
43
|
+
t as ToolbarItem
|
|
44
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),c=require("@progress/kendo-react-common");function s(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 o=s(n);class l extends o.PureComponent{render(){return o.createElement("div",{className:c.classNames("k-separator",this.props.className)})}}exports.ToolbarSeparator=l;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as e from "react";
|
|
10
|
+
import { classNames as r } from "@progress/kendo-react-common";
|
|
11
|
+
class t extends e.PureComponent {
|
|
12
|
+
/**
|
|
13
|
+
* @hidden
|
|
14
|
+
*/
|
|
15
|
+
render() {
|
|
16
|
+
return /* @__PURE__ */ e.createElement("div", { className: r("k-separator", this.props.className) });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
t as ToolbarSeparator
|
|
21
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
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;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as e from "react";
|
|
10
|
+
import m from "prop-types";
|
|
11
|
+
import { classNames as n } from "@progress/kendo-react-common";
|
|
12
|
+
const r = e.forwardRef((s, t) => {
|
|
13
|
+
const a = e.useRef(null), c = e.useRef(null);
|
|
14
|
+
e.useImperativeHandle(c, () => ({ element: a.current })), e.useImperativeHandle(t, () => ({ element: a.current }));
|
|
15
|
+
const l = e.useMemo(
|
|
16
|
+
() => n(
|
|
17
|
+
"k-spacer",
|
|
18
|
+
s.className
|
|
19
|
+
),
|
|
20
|
+
[s.className]
|
|
21
|
+
);
|
|
22
|
+
return /* @__PURE__ */ e.createElement(
|
|
23
|
+
"span",
|
|
24
|
+
{
|
|
25
|
+
ref: a,
|
|
26
|
+
className: l
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
});
|
|
30
|
+
r.displayName = "KendoReactToolbarSpacer";
|
|
31
|
+
r.propTypes = {
|
|
32
|
+
className: m.string
|
|
33
|
+
};
|
|
34
|
+
export {
|
|
35
|
+
r as ToolbarSpacer
|
|
36
|
+
};
|
package/util.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o={button:"k-button",flat:"k-flat",outline:"k-outline",clear:"k-button-clear",primary:"k-primary","state-selected":"k-selected","button-icon":"k-button-icon","button-icontext":"k-button-icontext","state-disabled":"k-disabled","group-start":"k-group-start","group-end":"k-group-end","button-group":"k-button-group","button-group-stretched":"k-button-group-stretched",ltr:"k-ltr",rtl:"k-rtl"},t=":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)",n=["button"+t,".k-button-group > button"+t,".k-colorpicker",".k-dropdownlist"],e={styles:o};exports.default=e;exports.toolbarButtons=n;
|
package/util.mjs
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
const o = {
|
|
10
|
+
button: "k-button",
|
|
11
|
+
flat: "k-flat",
|
|
12
|
+
outline: "k-outline",
|
|
13
|
+
clear: "k-button-clear",
|
|
14
|
+
primary: "k-primary",
|
|
15
|
+
"state-selected": "k-selected",
|
|
16
|
+
"button-icon": "k-button-icon",
|
|
17
|
+
"button-icontext": "k-button-icontext",
|
|
18
|
+
"state-disabled": "k-disabled",
|
|
19
|
+
"group-start": "k-group-start",
|
|
20
|
+
"group-end": "k-group-end",
|
|
21
|
+
"button-group": "k-button-group",
|
|
22
|
+
"button-group-stretched": "k-button-group-stretched",
|
|
23
|
+
ltr: "k-ltr",
|
|
24
|
+
rtl: "k-rtl"
|
|
25
|
+
}, t = ":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)", n = [
|
|
26
|
+
"button" + t,
|
|
27
|
+
".k-button-group > button" + t,
|
|
28
|
+
".k-colorpicker",
|
|
29
|
+
".k-dropdownlist"
|
|
30
|
+
], r = {
|
|
31
|
+
styles: o
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
r as default,
|
|
35
|
+
n as toolbarButtons
|
|
36
|
+
};
|
package/Button.d.ts
DELETED
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
|
-
import { ButtonInterface } from './ButtonInterface';
|
|
8
|
-
/**
|
|
9
|
-
* Represents the props of the [KendoReact Button component]({% slug overview_button %}).
|
|
10
|
-
* Extends the [native button props](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement).
|
|
11
|
-
*/
|
|
12
|
-
export interface ButtonProps extends ButtonInterface, React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
13
|
-
/**
|
|
14
|
-
* @hidden
|
|
15
|
-
*/
|
|
16
|
-
children?: React.ReactNode;
|
|
17
|
-
/**
|
|
18
|
-
* Configures the `size` of the Button.
|
|
19
|
-
*
|
|
20
|
-
* The available options are:
|
|
21
|
-
* - small
|
|
22
|
-
* - medium
|
|
23
|
-
* - large
|
|
24
|
-
* - null—Does not set a size `className`.
|
|
25
|
-
*
|
|
26
|
-
* @default `medium`
|
|
27
|
-
*/
|
|
28
|
-
size?: null | 'small' | 'medium' | 'large';
|
|
29
|
-
/**
|
|
30
|
-
* Configures the `roundness` of the Button.
|
|
31
|
-
*
|
|
32
|
-
* The available options are:
|
|
33
|
-
* - small
|
|
34
|
-
* - medium
|
|
35
|
-
* - large
|
|
36
|
-
* - full
|
|
37
|
-
* - null—Does not set a rounded `className`.
|
|
38
|
-
*
|
|
39
|
-
* @default `medium`
|
|
40
|
-
*/
|
|
41
|
-
rounded?: null | 'small' | 'medium' | 'large' | 'full';
|
|
42
|
-
/**
|
|
43
|
-
* Sets the title htmlAttribute of the Button.
|
|
44
|
-
*/
|
|
45
|
-
title?: string;
|
|
46
|
-
/**
|
|
47
|
-
* Configures the `fillMode` of the Button.
|
|
48
|
-
*
|
|
49
|
-
* The available options are:
|
|
50
|
-
* - solid
|
|
51
|
-
* - outline
|
|
52
|
-
* - flat
|
|
53
|
-
* - link
|
|
54
|
-
* - null—Does not set a fillMode `className`.
|
|
55
|
-
*
|
|
56
|
-
* @default `solid`
|
|
57
|
-
*/
|
|
58
|
-
fillMode?: null | 'solid' | 'outline' | 'flat' | 'link';
|
|
59
|
-
/**
|
|
60
|
-
* Configures the `themeColor` of the Button.
|
|
61
|
-
*
|
|
62
|
-
* The available options are:
|
|
63
|
-
* - base
|
|
64
|
-
* - primary
|
|
65
|
-
* - secondary
|
|
66
|
-
* - tertiary
|
|
67
|
-
* - info
|
|
68
|
-
* - success
|
|
69
|
-
* - warning
|
|
70
|
-
* - error
|
|
71
|
-
* - dark
|
|
72
|
-
* - light
|
|
73
|
-
* - inverse
|
|
74
|
-
* - null—Does not set a themeColor `className`.
|
|
75
|
-
*
|
|
76
|
-
* @default `base`
|
|
77
|
-
*/
|
|
78
|
-
themeColor?: null | 'base' | 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'error' | 'dark' | 'light' | 'inverse';
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* @hidden
|
|
82
|
-
*/
|
|
83
|
-
export interface ButtonState {
|
|
84
|
-
selected: boolean;
|
|
85
|
-
}
|
|
86
|
-
export declare class Button extends React.Component<ButtonProps, ButtonState> {
|
|
87
|
-
/**
|
|
88
|
-
* @hidden
|
|
89
|
-
*/
|
|
90
|
-
static propTypes: {
|
|
91
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
92
|
-
selected: PropTypes.Requireable<boolean>;
|
|
93
|
-
togglable: PropTypes.Requireable<boolean>;
|
|
94
|
-
icon: PropTypes.Requireable<string>;
|
|
95
|
-
svgIcon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
96
|
-
name: PropTypes.Validator<string>;
|
|
97
|
-
content: PropTypes.Validator<string>;
|
|
98
|
-
viewBox: PropTypes.Validator<string>;
|
|
99
|
-
}>>;
|
|
100
|
-
iconClass: PropTypes.Requireable<string>;
|
|
101
|
-
imageUrl: PropTypes.Requireable<string>;
|
|
102
|
-
imageAlt: PropTypes.Requireable<string>;
|
|
103
|
-
size: PropTypes.Requireable<string | null>;
|
|
104
|
-
rounded: PropTypes.Requireable<string | null>;
|
|
105
|
-
fillMode: PropTypes.Requireable<string | null>;
|
|
106
|
-
themeColor: PropTypes.Requireable<string | null>;
|
|
107
|
-
};
|
|
108
|
-
/**
|
|
109
|
-
* @hidden
|
|
110
|
-
*/
|
|
111
|
-
static defaultProps: {
|
|
112
|
-
togglable: boolean;
|
|
113
|
-
size: string;
|
|
114
|
-
rounded: string;
|
|
115
|
-
fillMode: string;
|
|
116
|
-
themeColor: string;
|
|
117
|
-
};
|
|
118
|
-
/**
|
|
119
|
-
* @hidden
|
|
120
|
-
*/
|
|
121
|
-
readonly state: ButtonState;
|
|
122
|
-
private _selectedTemp?;
|
|
123
|
-
private _element;
|
|
124
|
-
/**
|
|
125
|
-
* Gets the DOM element of the Button component.
|
|
126
|
-
*/
|
|
127
|
-
get element(): HTMLButtonElement | null;
|
|
128
|
-
/**
|
|
129
|
-
* Returns `true` when the component is togglable and selected ([see example]({% slug toggleable_button %})).
|
|
130
|
-
* Otherwise, returns `false`.
|
|
131
|
-
*/
|
|
132
|
-
get selected(): boolean;
|
|
133
|
-
constructor(props: ButtonProps);
|
|
134
|
-
/**
|
|
135
|
-
* @hidden
|
|
136
|
-
*/
|
|
137
|
-
static getDerivedStateFromProps(props: ButtonProps, state: ButtonState): {
|
|
138
|
-
selected: boolean;
|
|
139
|
-
} | null;
|
|
140
|
-
/**
|
|
141
|
-
* @hidden
|
|
142
|
-
*/
|
|
143
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
144
|
-
private toggleIfApplicable;
|
|
145
|
-
private handleClick;
|
|
146
|
-
}
|
package/ButtonGroup.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
|
-
import { ButtonGroupInterface } from './ButtonGroupInterface';
|
|
8
|
-
/**
|
|
9
|
-
* Represents the props of the [KendoReact ButtonGroup component]({% slug overview_buttongroup %}).
|
|
10
|
-
*/
|
|
11
|
-
export interface ButtonGroupProps extends ButtonGroupInterface {
|
|
12
|
-
/**
|
|
13
|
-
* Sets the `className` of the ButtonGroup component.
|
|
14
|
-
*/
|
|
15
|
-
className?: string;
|
|
16
|
-
}
|
|
17
|
-
export declare class ButtonGroup extends React.Component<ButtonGroupProps, {}> {
|
|
18
|
-
/**
|
|
19
|
-
* @hidden
|
|
20
|
-
*/
|
|
21
|
-
static propTypes: {
|
|
22
|
-
children: PropTypes.Requireable<NonNullable<PropTypes.ReactElementLike | (PropTypes.ReactElementLike | null | undefined)[] | null | undefined>>;
|
|
23
|
-
className: PropTypes.Requireable<string>;
|
|
24
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
25
|
-
width: PropTypes.Requireable<string>;
|
|
26
|
-
dir: PropTypes.Requireable<string>;
|
|
27
|
-
};
|
|
28
|
-
private _element;
|
|
29
|
-
constructor(props: ButtonGroupProps);
|
|
30
|
-
/**
|
|
31
|
-
* @hidden
|
|
32
|
-
*/
|
|
33
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
34
|
-
private mapButtons;
|
|
35
|
-
private renderButton;
|
|
36
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* Represents the properties which can be set to a ButtonGroup.
|
|
7
|
-
*/
|
|
8
|
-
export interface ButtonGroupInterface {
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
children?: React.ReactNode;
|
|
13
|
-
/**
|
|
14
|
-
* By default, the ButtonGroup is enabled ([see example]({% slug disabledstate_buttongroup %})). To disable the whole group of buttons, set its `disabled` attribute to `true`. To disable a specific button, set its own `disabled` attribute to `true` and leave the `disabled` attribute of the ButtonGroup undefined.
|
|
15
|
-
*
|
|
16
|
-
* If you define the `disabled` attribute of the ButtonGroup, it will take precedence over the `disabled` attributes of the underlying buttons and they will be ignored.
|
|
17
|
-
*/
|
|
18
|
-
disabled?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Sets the width of the ButtonGroup.
|
|
21
|
-
*
|
|
22
|
-
* If the width of the ButtonGroup is set:
|
|
23
|
-
* - The buttons resize automatically to fill the full width of the group wrapper.
|
|
24
|
-
* - The buttons acquire the same width.
|
|
25
|
-
*/
|
|
26
|
-
width?: string;
|
|
27
|
-
/**
|
|
28
|
-
* Sets the direction of the ButtonGroup ([more information](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir)).
|
|
29
|
-
*
|
|
30
|
-
* The available options are:
|
|
31
|
-
* * `rtl`
|
|
32
|
-
* * `ltr`
|
|
33
|
-
* * `auto`
|
|
34
|
-
*/
|
|
35
|
-
dir?: string;
|
|
36
|
-
}
|
package/ButtonInterface.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { SVGIcon } from '@progress/kendo-react-common';
|
|
6
|
-
/**
|
|
7
|
-
* Inherits the native HTML Button. Represents the properties which can be set to a Button.
|
|
8
|
-
*/
|
|
9
|
-
export interface ButtonInterface {
|
|
10
|
-
/**
|
|
11
|
-
* Specifies if the Button is disabled ([see example]({% slug disabled_button %})). Defaults to `false`.
|
|
12
|
-
*/
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Sets the selected state of the Button. Can be used for controlled state.
|
|
16
|
-
*/
|
|
17
|
-
selected?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Provides visual styling that indicates if the Button is selected ([see example]({% slug toggleable_button %})). Defaults to `false`.
|
|
20
|
-
*/
|
|
21
|
-
togglable?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Defines the name for an existing icon in a KendoReact theme ([see example]({% slug icons_button %})). The icon is rendered inside the Button by a `span.k-icon` element.
|
|
24
|
-
*/
|
|
25
|
-
icon?: string;
|
|
26
|
-
svgIcon?: SVGIcon;
|
|
27
|
-
/**
|
|
28
|
-
* Defines a CSS class—or multiple classes separated by spaces—which are applied to a `span` element inside the Button ([see example]({% slug icons_button %})). Allows the usage of custom icons.
|
|
29
|
-
*/
|
|
30
|
-
iconClass?: string;
|
|
31
|
-
/**
|
|
32
|
-
* Defines a URL which is used as an `img` element inside the Button ([see example]({% slug icons_button %})). The URL can be relative or absolute. If relative, it is evaluated with relation to the URL of the web page.
|
|
33
|
-
*/
|
|
34
|
-
imageUrl?: string;
|
|
35
|
-
/**
|
|
36
|
-
* Defines the alternative text of the image rendered inside the Button component.
|
|
37
|
-
*/
|
|
38
|
-
imageAlt?: string;
|
|
39
|
-
}
|