@progress/kendo-react-buttons 6.1.1 → 7.0.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/{dist/es/Button.d.ts → Button.d.ts} +5 -1
- package/{dist/npm/ButtonGroup.d.ts → ButtonGroup.d.ts} +5 -1
- package/{dist/es/ButtonGroupInterface.d.ts → ButtonGroupInterface.d.ts} +4 -1
- package/{dist/npm/ButtonInterface.d.ts → ButtonInterface.d.ts} +4 -0
- package/{dist/npm/Chip → Chip}/Chip.d.ts +4 -0
- package/{dist/npm/Chip → Chip}/ChipList.d.ts +4 -12
- package/Chip/chip-list-contexts.d.ts +17 -0
- package/{dist/npm/Chip → Chip}/data-reducer.d.ts +5 -1
- package/{dist/es/Chip → Chip}/focus-reducer.d.ts +5 -2
- package/{dist/npm/Chip → Chip}/selection-reducer.d.ts +5 -1
- package/{dist/npm/FloatingActionButton → FloatingActionButton}/FloatingActionButton.d.ts +4 -0
- package/{dist/es/FloatingActionButton → FloatingActionButton}/FloatingActionButtonItem.d.ts +4 -0
- package/FloatingActionButton/interfaces/FloatingActionButtonHandle.d.ts +17 -0
- package/{dist/es/FloatingActionButton → FloatingActionButton}/interfaces/FloatingActionButtonPopupSettings.d.ts +4 -0
- package/{dist/npm/FloatingActionButton → FloatingActionButton}/interfaces/FloatingActionButtonProps.d.ts +5 -2
- package/{dist/es/FloatingActionButton → FloatingActionButton}/models/align-offset.d.ts +4 -0
- package/{dist/npm/FloatingActionButton → FloatingActionButton}/models/align.d.ts +4 -0
- package/{dist/es/FloatingActionButton → FloatingActionButton}/models/events.d.ts +5 -1
- package/FloatingActionButton/models/position-mode.d.ts +13 -0
- package/FloatingActionButton/models/rounded.d.ts +16 -0
- package/FloatingActionButton/models/size.d.ts +15 -0
- package/{dist/npm/FloatingActionButton → FloatingActionButton}/models/theme-color.d.ts +5 -1
- package/{dist/npm/FloatingActionButton → FloatingActionButton}/utils.d.ts +4 -0
- package/LICENSE.md +1 -1
- package/{dist/es/ListButton → ListButton}/ButtonItem.d.ts +4 -0
- package/{dist/es/ListButton → ListButton}/DropDownButton.d.ts +5 -1
- package/{dist/npm/ListButton → ListButton}/DropDownButtonItem.d.ts +4 -0
- package/{dist/npm/ListButton → ListButton}/SplitButton.d.ts +5 -1
- package/{dist/es/ListButton → ListButton}/SplitButtonItem.d.ts +4 -0
- package/{dist/npm/ListButton → ListButton}/models/ButtonItem.d.ts +4 -0
- package/{dist/npm/ListButton → ListButton}/models/ListButtonProps.d.ts +4 -1
- package/{dist/npm/ListButton → ListButton}/models/PopupSettings.d.ts +4 -0
- package/{dist/npm/ListButton → ListButton}/models/events.d.ts +4 -0
- package/ListButton/utils/navigation.d.ts +9 -0
- package/ListButton/utils/popup.d.ts +13 -0
- package/dist/cdn/js/kendo-react-buttons.js +5 -1
- package/index.d.ts +36 -0
- package/index.js +5 -0
- package/index.mjs +1877 -0
- package/{dist/npm/models → models}/index.d.ts +4 -1
- package/package-metadata.d.ts +9 -0
- package/package.json +28 -42
- package/{dist/es/toolbar → toolbar}/Toolbar.d.ts +5 -1
- package/{dist/es/toolbar → toolbar}/tools/ToolbarItem.d.ts +5 -1
- package/toolbar/tools/ToolbarSeparator.d.ts +20 -0
- package/{dist/es/toolbar → toolbar}/tools/ToolbarSpacer.d.ts +4 -0
- package/{dist/npm/util.d.ts → util.d.ts} +4 -0
- package/about.md +0 -3
- package/dist/es/Button.js +0 -171
- package/dist/es/ButtonGroup.d.ts +0 -32
- package/dist/es/ButtonGroup.js +0 -101
- package/dist/es/ButtonGroupInterface.js +0 -2
- package/dist/es/ButtonInterface.d.ts +0 -35
- package/dist/es/ButtonInterface.js +0 -3
- package/dist/es/Chip/Chip.d.ts +0 -234
- package/dist/es/Chip/Chip.js +0 -173
- package/dist/es/Chip/ChipList.d.ts +0 -123
- package/dist/es/Chip/ChipList.js +0 -177
- package/dist/es/Chip/data-reducer.d.ts +0 -22
- package/dist/es/Chip/data-reducer.js +0 -26
- package/dist/es/Chip/focus-reducer.js +0 -32
- package/dist/es/Chip/selection-reducer.d.ts +0 -30
- package/dist/es/Chip/selection-reducer.js +0 -75
- package/dist/es/FloatingActionButton/FloatingActionButton.d.ts +0 -17
- package/dist/es/FloatingActionButton/FloatingActionButton.js +0 -281
- package/dist/es/FloatingActionButton/FloatingActionButtonItem.js +0 -82
- package/dist/es/FloatingActionButton/interfaces/FloatingActionButtonHandle.d.ts +0 -13
- package/dist/es/FloatingActionButton/interfaces/FloatingActionButtonHandle.js +0 -1
- package/dist/es/FloatingActionButton/interfaces/FloatingActionButtonPopupSettings.js +0 -1
- package/dist/es/FloatingActionButton/interfaces/FloatingActionButtonProps.d.ts +0 -216
- package/dist/es/FloatingActionButton/interfaces/FloatingActionButtonProps.js +0 -1
- package/dist/es/FloatingActionButton/models/align-offset.js +0 -1
- package/dist/es/FloatingActionButton/models/align.d.ts +0 -27
- package/dist/es/FloatingActionButton/models/align.js +0 -1
- package/dist/es/FloatingActionButton/models/events.js +0 -1
- package/dist/es/FloatingActionButton/models/position-mode.d.ts +0 -9
- package/dist/es/FloatingActionButton/models/position-mode.js +0 -1
- package/dist/es/FloatingActionButton/models/rounded.d.ts +0 -12
- package/dist/es/FloatingActionButton/models/rounded.js +0 -1
- package/dist/es/FloatingActionButton/models/size.d.ts +0 -11
- package/dist/es/FloatingActionButton/models/size.js +0 -1
- package/dist/es/FloatingActionButton/models/theme-color.d.ts +0 -18
- package/dist/es/FloatingActionButton/models/theme-color.js +0 -1
- package/dist/es/FloatingActionButton/utils.d.ts +0 -27
- package/dist/es/FloatingActionButton/utils.js +0 -93
- package/dist/es/ListButton/ButtonItem.js +0 -24
- package/dist/es/ListButton/DropDownButton.js +0 -325
- package/dist/es/ListButton/DropDownButtonItem.d.ts +0 -30
- package/dist/es/ListButton/DropDownButtonItem.js +0 -43
- package/dist/es/ListButton/SplitButton.d.ts +0 -120
- package/dist/es/ListButton/SplitButton.js +0 -334
- package/dist/es/ListButton/SplitButtonItem.js +0 -42
- package/dist/es/ListButton/models/ButtonItem.d.ts +0 -34
- package/dist/es/ListButton/models/ButtonItem.js +0 -3
- package/dist/es/ListButton/models/ListButtonProps.d.ts +0 -336
- package/dist/es/ListButton/models/ListButtonProps.js +0 -2
- package/dist/es/ListButton/models/PopupSettings.d.ts +0 -24
- package/dist/es/ListButton/models/PopupSettings.js +0 -1
- package/dist/es/ListButton/models/events.d.ts +0 -47
- package/dist/es/ListButton/models/events.js +0 -1
- package/dist/es/ListButton/utils/navigation.d.ts +0 -5
- package/dist/es/ListButton/utils/navigation.js +0 -29
- package/dist/es/ListButton/utils/popup.d.ts +0 -9
- package/dist/es/ListButton/utils/popup.js +0 -20
- package/dist/es/main.d.ts +0 -32
- package/dist/es/main.js +0 -17
- package/dist/es/models/index.d.ts +0 -89
- package/dist/es/models/index.js +0 -1
- package/dist/es/package-metadata.d.ts +0 -5
- package/dist/es/package-metadata.js +0 -11
- package/dist/es/toolbar/Toolbar.js +0 -214
- package/dist/es/toolbar/tools/ToolbarItem.js +0 -56
- package/dist/es/toolbar/tools/ToolbarSeparator.d.ts +0 -16
- package/dist/es/toolbar/tools/ToolbarSeparator.js +0 -31
- package/dist/es/toolbar/tools/ToolbarSpacer.js +0 -20
- package/dist/es/util.d.ts +0 -27
- package/dist/es/util.js +0 -37
- package/dist/npm/Button.d.ts +0 -138
- package/dist/npm/Button.js +0 -174
- package/dist/npm/ButtonGroup.js +0 -104
- package/dist/npm/ButtonGroupInterface.d.ts +0 -33
- package/dist/npm/ButtonGroupInterface.js +0 -3
- package/dist/npm/ButtonInterface.js +0 -4
- package/dist/npm/Chip/Chip.js +0 -176
- package/dist/npm/Chip/ChipList.js +0 -180
- package/dist/npm/Chip/data-reducer.js +0 -30
- package/dist/npm/Chip/focus-reducer.d.ts +0 -25
- package/dist/npm/Chip/focus-reducer.js +0 -36
- package/dist/npm/Chip/selection-reducer.js +0 -79
- package/dist/npm/FloatingActionButton/FloatingActionButton.js +0 -284
- package/dist/npm/FloatingActionButton/FloatingActionButtonItem.d.ts +0 -105
- package/dist/npm/FloatingActionButton/FloatingActionButtonItem.js +0 -85
- package/dist/npm/FloatingActionButton/interfaces/FloatingActionButtonHandle.d.ts +0 -13
- package/dist/npm/FloatingActionButton/interfaces/FloatingActionButtonHandle.js +0 -2
- package/dist/npm/FloatingActionButton/interfaces/FloatingActionButtonPopupSettings.d.ts +0 -24
- package/dist/npm/FloatingActionButton/interfaces/FloatingActionButtonPopupSettings.js +0 -2
- package/dist/npm/FloatingActionButton/interfaces/FloatingActionButtonProps.js +0 -2
- package/dist/npm/FloatingActionButton/models/align-offset.d.ts +0 -20
- package/dist/npm/FloatingActionButton/models/align-offset.js +0 -2
- package/dist/npm/FloatingActionButton/models/align.js +0 -2
- package/dist/npm/FloatingActionButton/models/events.d.ts +0 -21
- package/dist/npm/FloatingActionButton/models/events.js +0 -2
- package/dist/npm/FloatingActionButton/models/position-mode.d.ts +0 -9
- package/dist/npm/FloatingActionButton/models/position-mode.js +0 -2
- package/dist/npm/FloatingActionButton/models/rounded.d.ts +0 -12
- package/dist/npm/FloatingActionButton/models/rounded.js +0 -2
- package/dist/npm/FloatingActionButton/models/size.d.ts +0 -11
- package/dist/npm/FloatingActionButton/models/size.js +0 -2
- package/dist/npm/FloatingActionButton/models/theme-color.js +0 -2
- package/dist/npm/FloatingActionButton/utils.js +0 -101
- package/dist/npm/ListButton/ButtonItem.d.ts +0 -30
- package/dist/npm/ListButton/ButtonItem.js +0 -28
- package/dist/npm/ListButton/DropDownButton.d.ts +0 -118
- package/dist/npm/ListButton/DropDownButton.js +0 -328
- package/dist/npm/ListButton/DropDownButtonItem.js +0 -46
- package/dist/npm/ListButton/SplitButton.js +0 -337
- package/dist/npm/ListButton/SplitButtonItem.d.ts +0 -25
- package/dist/npm/ListButton/SplitButtonItem.js +0 -45
- package/dist/npm/ListButton/models/ButtonItem.js +0 -4
- package/dist/npm/ListButton/models/ListButtonProps.js +0 -3
- package/dist/npm/ListButton/models/PopupSettings.js +0 -2
- package/dist/npm/ListButton/models/events.js +0 -2
- package/dist/npm/ListButton/utils/navigation.d.ts +0 -5
- package/dist/npm/ListButton/utils/navigation.js +0 -32
- package/dist/npm/ListButton/utils/popup.d.ts +0 -9
- package/dist/npm/ListButton/utils/popup.js +0 -25
- package/dist/npm/main.d.ts +0 -32
- package/dist/npm/main.js +0 -48
- package/dist/npm/models/index.js +0 -2
- package/dist/npm/package-metadata.d.ts +0 -5
- package/dist/npm/package-metadata.js +0 -14
- package/dist/npm/toolbar/Toolbar.d.ts +0 -171
- package/dist/npm/toolbar/Toolbar.js +0 -217
- package/dist/npm/toolbar/tools/ToolbarItem.d.ts +0 -38
- package/dist/npm/toolbar/tools/ToolbarItem.js +0 -59
- package/dist/npm/toolbar/tools/ToolbarSeparator.d.ts +0 -16
- package/dist/npm/toolbar/tools/ToolbarSeparator.js +0 -34
- package/dist/npm/toolbar/tools/ToolbarSpacer.d.ts +0 -23
- package/dist/npm/toolbar/tools/ToolbarSpacer.js +0 -23
- package/dist/npm/util.js +0 -40
- package/dist/systemjs/kendo-react-buttons.js +0 -1
- package/e2e-next/button.basic.tests.ts +0 -24
- package/e2e-next/buttongroup.basic.tests.ts +0 -24
- package/e2e-next/chip.basic.tests.ts +0 -24
- package/e2e-next/chiplist.basic.tests.ts +0 -24
- package/e2e-next/dropdownbutton.basic.tests.ts +0 -24
- package/e2e-next/floatingactionbutton.basic.tests.ts +0 -24
- package/e2e-next/splitbutton.basic.tests.ts +0 -24
- package/e2e-next/toolbar.basic.tests.ts +0 -24
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import * as React from 'react';
|
|
24
|
-
import * as PropTypes from 'prop-types';
|
|
25
|
-
import { classNames, getTabIndex, IconWrap, svgIconPropType } from '@progress/kendo-react-common';
|
|
26
|
-
/**
|
|
27
|
-
* Represents the [KendoReact FloatingActionButtonItem component]({% slug overview_floatingactionbutton %}).
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```jsx
|
|
31
|
-
*
|
|
32
|
-
* const App = () => {
|
|
33
|
-
* return (
|
|
34
|
-
* <FloatingActionButton items={[{icon: 'pencil', text: 'Edit'}, {icon: 'close', text: 'Remove'}] icon: 'plus'} />
|
|
35
|
-
* );
|
|
36
|
-
* };
|
|
37
|
-
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
export var FloatingActionButtonItem = React.forwardRef(function (props, ref) {
|
|
41
|
-
var className = props.className, disabled = props.disabled, text = props.text, icon = props.icon, style = props.style, id = props.id, focused = props.focused, tabIndex = props.tabIndex, index = props.index, dataItem = props.dataItem, item = props.item, svgIcon = props.svgIcon, onDown = props.onDown, onClick = props.onClick, others = __rest(props, ["className", "disabled", "text", "icon", "style", "id", "focused", "tabIndex", "index", "dataItem", "item", "svgIcon", "onDown", "onClick"]);
|
|
42
|
-
var elementRef = React.useRef(null);
|
|
43
|
-
var focusElement = React.useCallback(function () {
|
|
44
|
-
if (elementRef.current) {
|
|
45
|
-
elementRef.current.focus();
|
|
46
|
-
}
|
|
47
|
-
}, []);
|
|
48
|
-
var getImperativeHandle = React.useCallback(function () { return ({
|
|
49
|
-
element: elementRef.current,
|
|
50
|
-
focus: focusElement
|
|
51
|
-
}); }, [focusElement]);
|
|
52
|
-
React.useImperativeHandle(ref, getImperativeHandle);
|
|
53
|
-
var handleClick = React.useCallback(function (event) {
|
|
54
|
-
if (onClick && index !== undefined && !disabled) {
|
|
55
|
-
onClick(event, index);
|
|
56
|
-
}
|
|
57
|
-
}, [onClick, index]);
|
|
58
|
-
var itemClassNames = React.useMemo(function () { return classNames('k-fab-item', {
|
|
59
|
-
'k-focus': focused,
|
|
60
|
-
'k-disabled': disabled
|
|
61
|
-
}, className); }, [className, disabled, focused]);
|
|
62
|
-
var ItemComp = item;
|
|
63
|
-
return (React.createElement("li", __assign({ ref: elementRef, id: id, className: itemClassNames, style: style, role: 'menuitem', tabIndex: getTabIndex(tabIndex, disabled), "aria-disabled": disabled, "aria-label": "".concat(text || '', " floatingactionbutton item"), onClick: handleClick, onMouseDown: onDown, onPointerDown: onDown }, others), ItemComp ?
|
|
64
|
-
React.createElement(ItemComp, { itemIndex: index, item: dataItem }) :
|
|
65
|
-
(React.createElement(React.Fragment, null,
|
|
66
|
-
text && React.createElement("span", { className: "k-fab-item-text" }, text),
|
|
67
|
-
(icon || svgIcon) ? React.createElement(IconWrap, { className: "k-fab-item-icon", name: icon, icon: svgIcon }) : null))));
|
|
68
|
-
});
|
|
69
|
-
FloatingActionButtonItem.propTypes = {
|
|
70
|
-
className: PropTypes.string,
|
|
71
|
-
style: PropTypes.object,
|
|
72
|
-
children: PropTypes.any,
|
|
73
|
-
disabled: PropTypes.bool,
|
|
74
|
-
focused: PropTypes.bool,
|
|
75
|
-
index: PropTypes.number,
|
|
76
|
-
icon: PropTypes.string,
|
|
77
|
-
svgIcon: svgIconPropType,
|
|
78
|
-
text: PropTypes.string,
|
|
79
|
-
tabIndex: PropTypes.number,
|
|
80
|
-
customProp: PropTypes.any
|
|
81
|
-
};
|
|
82
|
-
FloatingActionButtonItem.displayName = 'KendoFloatingActionButtonItem';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { FloatingActionButtonPopupSettings } from './FloatingActionButtonPopupSettings';
|
|
3
|
-
import { FloatingActionButtonItemProps } from '../FloatingActionButtonItem';
|
|
4
|
-
import { FloatingActionButtonAlign } from '../models/align';
|
|
5
|
-
import { FloatingActionButtonAlignOffset } from '../models/align-offset';
|
|
6
|
-
import { FloatingActionButtonEvent, FloatingActionButtonItemEvent } from '../models/events';
|
|
7
|
-
import { FloatingActionButtonPositionMode } from '../models/position-mode';
|
|
8
|
-
import { FloatingActionButtonSize } from '../models/size';
|
|
9
|
-
import { FloatingActionButtonThemeColor } from '../models/theme-color';
|
|
10
|
-
import { FloatingActionButtonRounded } from '../models/rounded';
|
|
11
|
-
import { SVGIcon } from '@progress/kendo-react-common';
|
|
12
|
-
/**
|
|
13
|
-
* @hidden
|
|
14
|
-
*/
|
|
15
|
-
declare type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
16
|
-
/**
|
|
17
|
-
* Represents the props of the [KendoReact FloatingActionButton component]({% slug overview_floatingactionbutton %}).
|
|
18
|
-
*/
|
|
19
|
-
export interface FloatingActionButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onBlur' | 'onFocus' | 'onKeyDown' | 'onClick'> {
|
|
20
|
-
/**
|
|
21
|
-
* Sets additional CSS styles to the Floating Action Button.
|
|
22
|
-
*/
|
|
23
|
-
style?: React.CSSProperties;
|
|
24
|
-
/**
|
|
25
|
-
* Specifies a list of CSS classes that will be added to the Floating Action Button.
|
|
26
|
-
*/
|
|
27
|
-
className?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Represents the `dir` HTML attribute. This is used to switch from LTR to RTL [see example]({% slug rtl_buttons %}).
|
|
30
|
-
*/
|
|
31
|
-
dir?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Sets the `id` property of the root HTML element.
|
|
34
|
-
*/
|
|
35
|
-
id?: string;
|
|
36
|
-
/**
|
|
37
|
-
* Specifies if the Floating Action Button is disabled [see example]({% slug disabled_floatingactionbutton %}). Defaults to `false`.
|
|
38
|
-
*/
|
|
39
|
-
disabled?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Defines the icon rendered in the Floating Action Button [see example]({% slug contenttypes_floatingactionbutton %}).
|
|
42
|
-
*/
|
|
43
|
-
icon?: string;
|
|
44
|
-
/**
|
|
45
|
-
* Defines the SVG icon rendered in the Floating Action Button [see example]({% slug contenttypes_floatingactionbutton %}).
|
|
46
|
-
*/
|
|
47
|
-
svgIcon?: SVGIcon;
|
|
48
|
-
/**
|
|
49
|
-
* Defines a CSS class or multiple classes separated by spaces which are applied
|
|
50
|
-
* to a `span` element inside the Floating Action Button. Allows the usage of custom icons.
|
|
51
|
-
*/
|
|
52
|
-
iconClass?: string;
|
|
53
|
-
/**
|
|
54
|
-
* Specifies the text of the Floating Action Button [see example]({% slug contenttypes_floatingactionbutton %}).
|
|
55
|
-
*/
|
|
56
|
-
text?: string;
|
|
57
|
-
/**
|
|
58
|
-
* Specifies the horizontal and vertical offset applied to the Floating Action Button
|
|
59
|
-
* [see example]({% slug positioning_floatingactionbutton %}).
|
|
60
|
-
*
|
|
61
|
-
* Normally, the floating button is positioned next to the boundaries of its container with a default offset of `16px`.
|
|
62
|
-
*
|
|
63
|
-
* Positive offsets move floating buttons, which are in a corner, further from that corner. Buttons, which are
|
|
64
|
-
* not in a corner, can be moved along the container's boundary or towards the center of the container.
|
|
65
|
-
*
|
|
66
|
-
* A negative offset can be used to force a button to overflow the boundaries of its container.
|
|
67
|
-
*
|
|
68
|
-
* The possible keys are:
|
|
69
|
-
* * `x`—Sets the horizontal offset of the Floating Action Button.
|
|
70
|
-
* * `y`—Sets the vertical offset of the Floating Action Button.
|
|
71
|
-
*
|
|
72
|
-
*/
|
|
73
|
-
alignOffset?: FloatingActionButtonAlignOffset;
|
|
74
|
-
/**
|
|
75
|
-
* Specifies the horizontal and vertical alignment of the Floating Action Button in relation to the container
|
|
76
|
-
* [see example]({% slug positioning_floatingactionbutton %}).
|
|
77
|
-
*
|
|
78
|
-
* > Centering the Floating Action Button in both horizontal and vertical dimension is not a typical use case.
|
|
79
|
-
* Still, it is possible to achieve such a layout with appropriate offsets. Setting horizontal: "center" and vertical: "middle"
|
|
80
|
-
* at the same time is not supported.
|
|
81
|
-
*
|
|
82
|
-
* The possible keys are:
|
|
83
|
-
* * `horizontal`— Defines the possible horizontal alignment of the Floating Action Button..
|
|
84
|
-
* * `start`—Uses the start point of the container.
|
|
85
|
-
* * `center`—Uses the center point of the container.
|
|
86
|
-
* * `end`(Default)—Uses the end point of the container
|
|
87
|
-
* * `vertical`— Defines the possible vertical alignment of the Floating Action Button..
|
|
88
|
-
* * `top`—Uses the top point of the container.
|
|
89
|
-
* * `middle`—Uses the middle point of the container.
|
|
90
|
-
* * `bottom`(Default)—Uses the bottom point of the container.
|
|
91
|
-
*
|
|
92
|
-
*/
|
|
93
|
-
align?: FloatingActionButtonAlign;
|
|
94
|
-
/**
|
|
95
|
-
* Specifies the position mode of the Floating Action Button
|
|
96
|
-
* [see example]({% slug positioning_floatingactionbutton %}). It is based on the
|
|
97
|
-
* [CSS position](https://developer.mozilla.org/en-US/docs/Web/CSS/position) rule.
|
|
98
|
-
*
|
|
99
|
-
* * The possible values are:
|
|
100
|
-
* * 'fixed' (Default)
|
|
101
|
-
* * 'absolute'
|
|
102
|
-
*/
|
|
103
|
-
positionMode?: FloatingActionButtonPositionMode;
|
|
104
|
-
/**
|
|
105
|
-
* Specifies the size of the Floating Action Button
|
|
106
|
-
* [see example]({% slug appearance_floatingactionbutton %}).
|
|
107
|
-
*
|
|
108
|
-
* The possible values are:
|
|
109
|
-
* * `small`—Applies half of the default padding, e.g. `8px`.
|
|
110
|
-
* * `medium` (Default)—Applies the default padding, e.g. `16px`.
|
|
111
|
-
* * `large`—Applies one and one half of the default padding, e.g. `24px`.
|
|
112
|
-
* * `null`—Does not set a size `className`.
|
|
113
|
-
*
|
|
114
|
-
*/
|
|
115
|
-
size?: FloatingActionButtonSize;
|
|
116
|
-
/**
|
|
117
|
-
* Specifies the rounding of the Floating Action Button.
|
|
118
|
-
*
|
|
119
|
-
* The possible values are:
|
|
120
|
-
* * `small`
|
|
121
|
-
* * `medium`
|
|
122
|
-
* * `large`
|
|
123
|
-
* * `full`
|
|
124
|
-
* * `null`—Does not set a rounded `className`.
|
|
125
|
-
*
|
|
126
|
-
* @default `full`
|
|
127
|
-
*/
|
|
128
|
-
rounded?: FloatingActionButtonRounded;
|
|
129
|
-
/**
|
|
130
|
-
* Specifies the theme color of the Floating Action Button
|
|
131
|
-
* [see example]({% slug appearance_floatingactionbutton %}).
|
|
132
|
-
*
|
|
133
|
-
* The possible values are:
|
|
134
|
-
* * `primary` (Default)—Applies coloring based on the primary theme color.
|
|
135
|
-
* * `secondary`—Applies coloring based on the secondary theme color.
|
|
136
|
-
* * `tertiary`— Applies coloring based on the tertiary theme color.
|
|
137
|
-
* * `info`—Applies coloring based on the info theme color.
|
|
138
|
-
* * `success`— Applies coloring based on the success theme color.
|
|
139
|
-
* * `warning`— Applies coloring based on the warning theme color.
|
|
140
|
-
* * `error`— Applies coloring based on the error theme color.
|
|
141
|
-
* * `dark`— Applies coloring based on the dark theme color.
|
|
142
|
-
* * `light`— Applies coloring based on the light theme color.
|
|
143
|
-
* * `inverse`— Applies coloring based on the inverse theme color.
|
|
144
|
-
* * `null`—Does not set a theme color `className`.
|
|
145
|
-
*
|
|
146
|
-
*/
|
|
147
|
-
themeColor?: FloatingActionButtonThemeColor;
|
|
148
|
-
/**
|
|
149
|
-
* The collection of items that will be rendered in the Floating Action Button
|
|
150
|
-
* [see example]({% slug databinding_floatingactionbutton %}).
|
|
151
|
-
*/
|
|
152
|
-
items?: Array<FloatingActionButtonItemProps>;
|
|
153
|
-
/**
|
|
154
|
-
* Overrides the default component responsible for visualizing a single item
|
|
155
|
-
* [see example]({% slug customization_floatingactionbutton %}#toc-items-rendering).
|
|
156
|
-
*
|
|
157
|
-
* The default Component is: [FloatingActionButtonItem]({% slug api_buttons_floatingactionbuttonitem %}).
|
|
158
|
-
*/
|
|
159
|
-
item?: React.ComponentType<FloatingActionButtonItemProps>;
|
|
160
|
-
/**
|
|
161
|
-
* Represents the additional props that will be passed to the Popup inside the Floating Action Button
|
|
162
|
-
* [see example]({% slug customization_floatingactionbutton %}#toc-popup-behavior).
|
|
163
|
-
*/
|
|
164
|
-
popupSettings?: FloatingActionButtonPopupSettings;
|
|
165
|
-
/**
|
|
166
|
-
* Specifies the `tabIndex` of the main button.
|
|
167
|
-
*/
|
|
168
|
-
tabIndex?: number;
|
|
169
|
-
/**
|
|
170
|
-
* Specifies the `accessKey` of the main button.
|
|
171
|
-
*/
|
|
172
|
-
accessKey?: string;
|
|
173
|
-
/**
|
|
174
|
-
* Specifies if the Floating Action Button will be modal by rendering an overlay under the component.
|
|
175
|
-
*/
|
|
176
|
-
modal?: boolean;
|
|
177
|
-
/**
|
|
178
|
-
* Set styles to the Floating Action Button overlay element rendered when the `modal` prop is enabled.
|
|
179
|
-
*/
|
|
180
|
-
overlayStyle?: React.CSSProperties;
|
|
181
|
-
/**
|
|
182
|
-
* Fires when the Floating Action Button is focused
|
|
183
|
-
* [see example]({% slug overview_floatingactionbutton %}#toc-events).
|
|
184
|
-
*/
|
|
185
|
-
onFocus?: (event: FloatingActionButtonEvent) => void;
|
|
186
|
-
/**
|
|
187
|
-
* Fires when the Floating Action Button is blurred
|
|
188
|
-
* [see example]({% slug overview_floatingactionbutton %}#toc-events).
|
|
189
|
-
*/
|
|
190
|
-
onBlur?: (event: FloatingActionButtonEvent) => void;
|
|
191
|
-
/**
|
|
192
|
-
* Fires when the Floating Action Button is clicked.
|
|
193
|
-
*/
|
|
194
|
-
onClick?: (event: FloatingActionButtonEvent) => void;
|
|
195
|
-
/**
|
|
196
|
-
* Fires when the Floating Action Button Item is clicked
|
|
197
|
-
* [see example]({% slug overview_floatingactionbutton %}#toc-events).
|
|
198
|
-
*/
|
|
199
|
-
onItemClick?: (event: FloatingActionButtonItemEvent) => void;
|
|
200
|
-
/**
|
|
201
|
-
* Triggers onKeyDown event
|
|
202
|
-
* [see example]({% slug overview_floatingactionbutton %}#toc-events).
|
|
203
|
-
*/
|
|
204
|
-
onKeyDown?: (event: FloatingActionButtonEvent) => void;
|
|
205
|
-
/**
|
|
206
|
-
* Fires when the popup which contains the items is opened
|
|
207
|
-
* [see example]({% slug overview_floatingactionbutton %}#toc-events).
|
|
208
|
-
*/
|
|
209
|
-
onOpen?: (event: FloatingActionButtonEvent) => void;
|
|
210
|
-
/**
|
|
211
|
-
* Fires when the popup which contains the items is closed
|
|
212
|
-
* [see example]({% slug overview_floatingactionbutton %}#toc-events).
|
|
213
|
-
*/
|
|
214
|
-
onClose?: (event: FloatingActionButtonEvent) => void;
|
|
215
|
-
}
|
|
216
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Specifies the horizontal and vertical alignment of the Floating Action Button in relation to the container.
|
|
3
|
-
*
|
|
4
|
-
* > Centering the Floating Action Button in both horizontal and vertical dimension is not a typical use case.
|
|
5
|
-
* Still, it is possible to achieve such a layout with appropriate offsets. Setting horizontal: "center" and
|
|
6
|
-
* vertical: "middle" at the same time is not supported.
|
|
7
|
-
*/
|
|
8
|
-
export interface FloatingActionButtonAlign {
|
|
9
|
-
/**
|
|
10
|
-
* Defines the possible horizontal alignment of the Floating Action Button.
|
|
11
|
-
*
|
|
12
|
-
* The available values are:
|
|
13
|
-
* - `start`—Uses the start point of the container.
|
|
14
|
-
* - `center`—Uses the center point of the container.
|
|
15
|
-
* - `end`(Default)—Uses the end point of the container.
|
|
16
|
-
*/
|
|
17
|
-
horizontal?: 'start' | 'center' | 'end';
|
|
18
|
-
/**
|
|
19
|
-
* Defines the possible vertical alignment of the Floating Action Button.
|
|
20
|
-
*
|
|
21
|
-
* The available values are:
|
|
22
|
-
* - `top`—Uses the top point of the container.
|
|
23
|
-
* - `middle`—Uses the middle point of the container.
|
|
24
|
-
* - `bottom`(Default)—Uses the bottom point of the container.
|
|
25
|
-
*/
|
|
26
|
-
vertical?: 'top' | 'middle' | 'bottom';
|
|
27
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Specifies the position mode of the Floating Action Button. It is based on the
|
|
3
|
-
* [CSS position](https://developer.mozilla.org/en-US/docs/Web/CSS/position) rule.
|
|
4
|
-
*
|
|
5
|
-
* * The possible values are:
|
|
6
|
-
* * 'absolute' (Default)
|
|
7
|
-
* * 'fixed'
|
|
8
|
-
*/
|
|
9
|
-
export declare type FloatingActionButtonPositionMode = 'absolute' | 'fixed';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Specifies the rounding of the Floating Action Button.
|
|
3
|
-
*
|
|
4
|
-
* The possible values are:
|
|
5
|
-
* * `small`
|
|
6
|
-
* * `medium`
|
|
7
|
-
* * `large`
|
|
8
|
-
* * `full`
|
|
9
|
-
* * `null`—Does not set a rounded `className`.
|
|
10
|
-
*
|
|
11
|
-
*/
|
|
12
|
-
export declare type FloatingActionButtonRounded = null | 'small' | 'medium' | 'large' | 'full';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Specifies the size of the Floating Action Button.
|
|
3
|
-
*
|
|
4
|
-
* The possible values are:
|
|
5
|
-
* * `small`—Applies half of the default padding, e.g. `8px`.
|
|
6
|
-
* * `medium` (Default)—Applies the default padding, e.g. `16px`.
|
|
7
|
-
* * `large`—Applies one and one half of the default padding, e.g. `24px`.
|
|
8
|
-
* * `null`—Does not set a size `className`.
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
|
-
export declare type FloatingActionButtonSize = null | 'small' | 'medium' | 'large';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Specifies the theme color of the Floating Action Button..
|
|
3
|
-
*
|
|
4
|
-
* The possible values are:
|
|
5
|
-
* * `primary` (Default)—Applies coloring based on the primary theme color.
|
|
6
|
-
* * `secondary`—Applies coloring based on the secondary theme color.
|
|
7
|
-
* * `tertiary`— Applies coloring based on the tertiary theme color.
|
|
8
|
-
* * `info`—Applies coloring based on the info theme color.
|
|
9
|
-
* * `success`— Applies coloring based on the success theme color.
|
|
10
|
-
* * `warning`— Applies coloring based on the warning theme color.
|
|
11
|
-
* * `error`— Applies coloring based on the error theme color.
|
|
12
|
-
* * `dark`— Applies coloring based on the dark theme color.
|
|
13
|
-
* * `light`— Applies coloring based on the light theme color.
|
|
14
|
-
* * `inverse`— Applies coloring based on the inverse theme color.
|
|
15
|
-
* * `null`—Does not set a theme color `className`.
|
|
16
|
-
*
|
|
17
|
-
*/
|
|
18
|
-
export declare type FloatingActionButtonThemeColor = null | 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'error' | 'dark' | 'light' | 'inverse';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Align } from '@progress/kendo-react-popup';
|
|
2
|
-
import { FloatingActionButtonAlignOffset } from './models/align-offset';
|
|
3
|
-
import { FloatingActionButtonAlign } from './models/align';
|
|
4
|
-
/**
|
|
5
|
-
* @hidden
|
|
6
|
-
*/
|
|
7
|
-
export declare const DEFAULT_OFFSET = "16px";
|
|
8
|
-
/**
|
|
9
|
-
* @hidden
|
|
10
|
-
*/
|
|
11
|
-
export declare const toStringValues: (val: number | string) => string;
|
|
12
|
-
/**
|
|
13
|
-
* @hidden
|
|
14
|
-
*/
|
|
15
|
-
export declare const getAnchorAlign: (fabAlign: FloatingActionButtonAlign, rtl?: boolean) => Align;
|
|
16
|
-
/**
|
|
17
|
-
* @hidden
|
|
18
|
-
*/
|
|
19
|
-
export declare const getPopupAlign: (fabAlign: FloatingActionButtonAlign, rtl: boolean) => Align;
|
|
20
|
-
/**
|
|
21
|
-
* @hidden
|
|
22
|
-
*/
|
|
23
|
-
export declare const getTextDirectionClass: (rtl: string, hAlign: any) => any;
|
|
24
|
-
/**
|
|
25
|
-
* @hidden
|
|
26
|
-
*/
|
|
27
|
-
export declare const position: (ref: any, align: FloatingActionButtonAlign, alignOffset: FloatingActionButtonAlignOffset | undefined, isRtl: boolean) => void;
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @hidden
|
|
3
|
-
*/
|
|
4
|
-
export var DEFAULT_OFFSET = '16px';
|
|
5
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
export var toStringValues = function (val) {
|
|
9
|
-
if (typeof val === 'number') {
|
|
10
|
-
return val + 'px';
|
|
11
|
-
}
|
|
12
|
-
return val;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* @hidden
|
|
16
|
-
*/
|
|
17
|
-
export var getAnchorAlign = function (fabAlign, rtl) {
|
|
18
|
-
var align = { horizontal: (rtl ? 'right' : 'left'), vertical: 'bottom' };
|
|
19
|
-
if (fabAlign.horizontal === 'end') {
|
|
20
|
-
align.horizontal = rtl ? 'left' : 'right';
|
|
21
|
-
}
|
|
22
|
-
return align;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* @hidden
|
|
26
|
-
*/
|
|
27
|
-
export var getPopupAlign = function (fabAlign, rtl) {
|
|
28
|
-
var align = { horizontal: (rtl ? 'right' : 'left'), vertical: 'top' };
|
|
29
|
-
if (fabAlign.horizontal === 'end') {
|
|
30
|
-
align.horizontal = rtl ? 'left' : 'right';
|
|
31
|
-
}
|
|
32
|
-
return align;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* @hidden
|
|
36
|
-
*/
|
|
37
|
-
export var getTextDirectionClass = function (rtl, hAlign) {
|
|
38
|
-
var al = hAlign === 'end' ? 'end' : 'start';
|
|
39
|
-
var directions = {
|
|
40
|
-
rtl: { end: 'k-text-left', start: 'k-text-right' },
|
|
41
|
-
ltr: { start: 'k-text-left', end: 'k-text-right' }
|
|
42
|
-
};
|
|
43
|
-
return directions[rtl][al];
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* @hidden
|
|
47
|
-
*/
|
|
48
|
-
export var position = function (ref, align, alignOffset, isRtl) {
|
|
49
|
-
var horizontal = align.horizontal;
|
|
50
|
-
var vertical = align.vertical;
|
|
51
|
-
if (ref.current) {
|
|
52
|
-
var xFab = alignOffset && alignOffset.x !== undefined ?
|
|
53
|
-
toStringValues(alignOffset.x) :
|
|
54
|
-
DEFAULT_OFFSET;
|
|
55
|
-
var xCenterFab = alignOffset && alignOffset.x !== undefined ?
|
|
56
|
-
"calc(50% + ".concat(toStringValues(alignOffset.x), ")") :
|
|
57
|
-
'50%';
|
|
58
|
-
var yFab = alignOffset && alignOffset.y !== undefined ?
|
|
59
|
-
toStringValues(alignOffset.y) :
|
|
60
|
-
DEFAULT_OFFSET;
|
|
61
|
-
var yCenterFab = alignOffset && alignOffset.y !== undefined ?
|
|
62
|
-
"calc(50% + ".concat(toStringValues(alignOffset.y), ")") :
|
|
63
|
-
'50%';
|
|
64
|
-
ref.current.style.setProperty(horizontalPosition(align, isRtl), horizontal === 'center' ? xCenterFab : xFab);
|
|
65
|
-
ref.current.style.setProperty(verticalPosition(align), vertical === 'middle' ? yCenterFab : yFab);
|
|
66
|
-
if (isRtl) {
|
|
67
|
-
if ((vertical === 'top' || vertical === 'bottom') && horizontal === 'start') {
|
|
68
|
-
ref.current.style.setProperty('left', 'unset');
|
|
69
|
-
}
|
|
70
|
-
if (vertical === 'middle' && horizontal === 'end') {
|
|
71
|
-
ref.current.style.setProperty('right', 'unset');
|
|
72
|
-
}
|
|
73
|
-
if (vertical === 'middle' && horizontal === 'start') {
|
|
74
|
-
ref.current.style.setProperty('left', 'unset');
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
var horizontalPosition = function (align, isRtl) {
|
|
80
|
-
var horizontal = align.horizontal;
|
|
81
|
-
return {
|
|
82
|
-
end: isRtl ? 'left' : 'right',
|
|
83
|
-
center: 'left',
|
|
84
|
-
start: isRtl ? 'right' : 'left'
|
|
85
|
-
}[horizontal || 'end'];
|
|
86
|
-
};
|
|
87
|
-
var verticalPosition = function (align) {
|
|
88
|
-
return {
|
|
89
|
-
top: 'top',
|
|
90
|
-
middle: 'top',
|
|
91
|
-
bottom: 'bottom'
|
|
92
|
-
}[align.vertical || 'bottom'];
|
|
93
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { classNames, IconWrap } from '@progress/kendo-react-common';
|
|
3
|
-
/**
|
|
4
|
-
* @hidden
|
|
5
|
-
*/
|
|
6
|
-
export var ButtonItem = function (props) {
|
|
7
|
-
var handleClick = React.useCallback(function (event) {
|
|
8
|
-
props.onClick(event, props.index);
|
|
9
|
-
}, [props]);
|
|
10
|
-
var As = props.dataItem.render || props.item || (props.item === undefined ? props.render : null);
|
|
11
|
-
var text = props.dataItem.text !== undefined ? props.dataItem.text : (props.textField ? props.dataItem[props.textField] : props.dataItem);
|
|
12
|
-
var item = (React.createElement("li", { id: props.id, className: classNames('k-item', props.className, { 'k-focus': props.focused }), tabIndex: -1, onClick: handleClick, onMouseDown: props.onDown, onPointerDown: props.onDown, role: "menuitem", "aria-disabled": props.dataItem.disabled || undefined }, (React.createElement("span", { tabIndex: -1, className: classNames('k-link k-menu-link', {
|
|
13
|
-
'k-selected': props.dataItem.selected,
|
|
14
|
-
'k-disabled': props.dataItem.disabled
|
|
15
|
-
}), key: "icon" }, As
|
|
16
|
-
? (React.createElement(As, { item: props.dataItem, itemIndex: props.index }))
|
|
17
|
-
: (React.createElement(React.Fragment, null,
|
|
18
|
-
(props.dataItem.icon || props.dataItem.iconClass) && (React.createElement(IconWrap, { className: props.dataItem.iconClass, name: props.dataItem.icon, icon: props.dataItem.svgIcon })),
|
|
19
|
-
(props.dataItem.imageUrl) && (React.createElement("img", { role: "presentation", alt: "", src: props.dataItem.imageUrl, className: 'k-icon' })),
|
|
20
|
-
(text) && (React.createElement("span", { className: "k-menu-link-text" }, text))))))));
|
|
21
|
-
return ((props.item !== undefined && /* to be removed in 5.0.0 */
|
|
22
|
-
props.render !== undefined) ? props.render.call(undefined, item, props) : item);
|
|
23
|
-
};
|
|
24
|
-
ButtonItem.displayName = 'KendoReactButtonItem';
|