@progress/kendo-react-common 6.1.1 → 7.0.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/{dist/npm/Draggable.d.ts → Draggable.d.ts} +5 -1
- package/{dist/npm/Droppable.d.ts → Droppable.d.ts} +5 -1
- package/{dist/es/FormComponent.d.ts → FormComponent.d.ts} +4 -0
- package/LICENSE.md +1 -1
- package/browser-support.service.d.ts +11 -0
- package/canUseDOM.d.ts +8 -0
- package/canUseRef.d.ts +9 -0
- package/classNames.d.ts +8 -0
- package/{dist/npm/clone.d.ts → clone.d.ts} +4 -0
- package/constants/index.d.ts +8 -0
- package/contexts/ZIndexContext.d.ts +11 -0
- package/dist/cdn/js/kendo-react-common.js +8 -1
- package/{dist/npm/drag-n-drop → drag-n-drop}/context/index.d.ts +6 -2
- package/{dist/es/drag-n-drop → drag-n-drop}/index.d.ts +6 -2
- package/events/BaseEvent.d.ts +22 -0
- package/{dist/npm/events → events}/dispatchEvent.d.ts +4 -1
- package/fieldList.d.ts +8 -0
- package/focus.d.ts +8 -0
- package/getActiveElement.d.ts +12 -0
- package/getTabIndex.d.ts +8 -0
- package/{dist/es/getter.d.ts → getter.d.ts} +4 -0
- package/guid.d.ts +8 -0
- package/hasRelativeStackingContext.d.ts +6 -0
- package/{dist/npm/hocs → hocs}/AsyncFocusBlur.d.ts +5 -1
- package/{dist/npm/hocs → hocs}/withPropsContext.d.ts +4 -0
- package/{dist/npm/hooks → hooks}/index.d.ts +4 -0
- package/{dist/npm/hooks → hooks}/useAsyncFocusBlur.d.ts +5 -1
- package/hooks/useCollection.d.ts +18 -0
- package/hooks/useControlledState.d.ts +11 -0
- package/hooks/useCustomComponent.d.ts +17 -0
- package/hooks/useDir.d.ts +9 -0
- package/hooks/useDocument.d.ts +11 -0
- package/{dist/es/hooks → hooks}/useDraggable.d.ts +4 -0
- package/{dist/es/hooks → hooks}/useDroppable.d.ts +4 -0
- package/hooks/useInheritedState.d.ts +17 -0
- package/{dist/es/hooks → hooks}/useMouse.d.ts +5 -1
- package/hooks/usePropsContext.d.ts +7 -0
- package/hooks/useRtl.d.ts +9 -0
- package/hooks/useWindow.d.ts +11 -0
- package/{dist/npm/icons → icons}/BaseIconProps.d.ts +4 -1
- package/{dist/es/icons → icons}/Icon.d.ts +4 -0
- package/icons/IconWrap.d.ts +11 -0
- package/{dist/es/icons → icons}/IconsContext.d.ts +4 -0
- package/{dist/es/icons → icons}/SvgIcon.d.ts +4 -0
- package/icons/constants.d.ts +17 -0
- package/icons/models/flip.d.ts +15 -0
- package/{dist/npm/icons → icons}/models/size.d.ts +5 -1
- package/{dist/es/icons → icons}/models/theme-color.d.ts +5 -1
- package/{dist/es/icons → icons}/utils.d.ts +4 -0
- package/{dist/es/main.d.ts → index.d.ts} +4 -0
- package/index.js +8 -0
- package/index.mjs +1787 -0
- package/keys.d.ts +24 -0
- package/memoize.d.ts +14 -0
- package/{dist/es/models → models}/auto-scroll-options.d.ts +4 -1
- package/models/index.d.ts +9 -0
- package/{dist/npm/models → models}/kendoReactComponentBaseProps.d.ts +4 -1
- package/{dist/npm/models → models}/mouse.d.ts +4 -0
- package/{dist/npm/models → models}/pointer.d.ts +4 -0
- package/{dist/es/models → models}/touch.d.ts +4 -0
- package/{dist/npm/navigation.d.ts → navigation.d.ts} +4 -1
- package/noop.d.ts +8 -0
- package/package.json +26 -45
- package/scrollbarWidth.d.ts +12 -0
- package/{dist/npm/setter.d.ts → setter.d.ts} +4 -0
- package/theme.d.ts +12 -0
- package/{dist/es/tree-utils → tree-utils}/FieldsService.d.ts +4 -0
- package/tree-utils/SortedPublicItemIds.d.ts +12 -0
- package/{dist/es/tree-utils → tree-utils}/itemIdUtils.d.ts +4 -0
- package/{dist/es/tree-utils → tree-utils}/itemUtils.d.ts +4 -0
- package/tree-utils/misc.d.ts +12 -0
- package/{dist/es/treeDataOperations.d.ts → treeDataOperations.d.ts} +4 -0
- package/{dist/npm/typography → typography}/Typography.d.ts +4 -0
- package/{dist/es/typography → typography}/TypographyProps.d.ts +4 -1
- package/{dist/npm/typography → typography}/constants.d.ts +4 -0
- package/{dist/es/typography → typography}/models/margin.d.ts +5 -1
- package/validate-package.d.ts +12 -0
- package/watermark/WatermarkOverlay.d.ts +9 -0
- package/about.md +0 -3
- package/dist/es/Draggable.d.ts +0 -86
- package/dist/es/Draggable.js +0 -84
- package/dist/es/Droppable.d.ts +0 -77
- package/dist/es/Droppable.js +0 -68
- package/dist/es/FormComponent.js +0 -9
- package/dist/es/browser-support.service.d.ts +0 -7
- package/dist/es/browser-support.service.js +0 -30
- package/dist/es/canUseDOM.d.ts +0 -4
- package/dist/es/canUseDOM.js +0 -8
- package/dist/es/canUseRef.d.ts +0 -5
- package/dist/es/canUseRef.js +0 -12
- package/dist/es/classNames.d.ts +0 -4
- package/dist/es/classNames.js +0 -30
- package/dist/es/clone.d.ts +0 -20
- package/dist/es/clone.js +0 -52
- package/dist/es/constants/index.d.ts +0 -4
- package/dist/es/constants/index.js +0 -4
- package/dist/es/contexts/ZIndexContext.d.ts +0 -7
- package/dist/es/contexts/ZIndexContext.js +0 -6
- package/dist/es/drag-n-drop/context/index.d.ts +0 -19
- package/dist/es/drag-n-drop/context/index.js +0 -24
- package/dist/es/drag-n-drop/index.js +0 -44
- package/dist/es/events/BaseEvent.d.ts +0 -18
- package/dist/es/events/BaseEvent.js +0 -1
- package/dist/es/events/dispatchEvent.d.ts +0 -15
- package/dist/es/events/dispatchEvent.js +0 -22
- package/dist/es/fieldList.d.ts +0 -4
- package/dist/es/fieldList.js +0 -11
- package/dist/es/focus.d.ts +0 -4
- package/dist/es/focus.js +0 -15
- package/dist/es/getActiveElement.d.ts +0 -8
- package/dist/es/getActiveElement.js +0 -23
- package/dist/es/getTabIndex.d.ts +0 -4
- package/dist/es/getTabIndex.js +0 -23
- package/dist/es/getter.js +0 -30
- package/dist/es/guid.d.ts +0 -4
- package/dist/es/guid.js +0 -17
- package/dist/es/hasRelativeStackingContext.d.ts +0 -2
- package/dist/es/hasRelativeStackingContext.js +0 -25
- package/dist/es/hocs/AsyncFocusBlur.d.ts +0 -13
- package/dist/es/hocs/AsyncFocusBlur.js +0 -26
- package/dist/es/hocs/withPropsContext.d.ts +0 -5
- package/dist/es/hocs/withPropsContext.js +0 -22
- package/dist/es/hooks/index.d.ts +0 -12
- package/dist/es/hooks/index.js +0 -12
- package/dist/es/hooks/useAsyncFocusBlur.d.ts +0 -25
- package/dist/es/hooks/useAsyncFocusBlur.js +0 -72
- package/dist/es/hooks/useCollection.d.ts +0 -14
- package/dist/es/hooks/useCollection.js +0 -26
- package/dist/es/hooks/useControlledState.d.ts +0 -7
- package/dist/es/hooks/useControlledState.js +0 -23
- package/dist/es/hooks/useCustomComponent.d.ts +0 -13
- package/dist/es/hooks/useCustomComponent.js +0 -9
- package/dist/es/hooks/useDir.d.ts +0 -5
- package/dist/es/hooks/useDir.js +0 -19
- package/dist/es/hooks/useDocument.d.ts +0 -7
- package/dist/es/hooks/useDocument.js +0 -14
- package/dist/es/hooks/useDraggable.js +0 -336
- package/dist/es/hooks/useDroppable.js +0 -59
- package/dist/es/hooks/useInheritedState.d.ts +0 -13
- package/dist/es/hooks/useInheritedState.js +0 -21
- package/dist/es/hooks/useMouse.js +0 -117
- package/dist/es/hooks/usePointer.d.ts +0 -21
- package/dist/es/hooks/usePointer.js +0 -29
- package/dist/es/hooks/usePropsContext.d.ts +0 -3
- package/dist/es/hooks/usePropsContext.js +0 -7
- package/dist/es/hooks/useRtl.d.ts +0 -5
- package/dist/es/hooks/useRtl.js +0 -22
- package/dist/es/hooks/useTouch.d.ts +0 -15
- package/dist/es/hooks/useTouch.js +0 -29
- package/dist/es/hooks/useWindow.d.ts +0 -7
- package/dist/es/hooks/useWindow.js +0 -15
- package/dist/es/icons/BaseIconProps.d.ts +0 -73
- package/dist/es/icons/BaseIconProps.js +0 -1
- package/dist/es/icons/Icon.js +0 -78
- package/dist/es/icons/IconWrap.d.ts +0 -7
- package/dist/es/icons/IconWrap.js +0 -41
- package/dist/es/icons/IconsContext.js +0 -7
- package/dist/es/icons/SvgIcon.js +0 -96
- package/dist/es/icons/constants.d.ts +0 -13
- package/dist/es/icons/constants.js +0 -13
- package/dist/es/icons/models/flip.d.ts +0 -11
- package/dist/es/icons/models/flip.js +0 -1
- package/dist/es/icons/models/size.d.ts +0 -15
- package/dist/es/icons/models/size.js +0 -1
- package/dist/es/icons/models/theme-color.js +0 -1
- package/dist/es/icons/utils.js +0 -17
- package/dist/es/keys.d.ts +0 -20
- package/dist/es/keys.js +0 -20
- package/dist/es/main.js +0 -59
- package/dist/es/memoize.d.ts +0 -10
- package/dist/es/memoize.js +0 -41
- package/dist/es/models/auto-scroll-options.js +0 -1
- package/dist/es/models/index.d.ts +0 -5
- package/dist/es/models/index.js +0 -5
- package/dist/es/models/kendoReactComponentBaseProps.d.ts +0 -24
- package/dist/es/models/kendoReactComponentBaseProps.js +0 -1
- package/dist/es/models/mouse.d.ts +0 -16
- package/dist/es/models/mouse.js +0 -1
- package/dist/es/models/pointer.d.ts +0 -23
- package/dist/es/models/pointer.js +0 -1
- package/dist/es/models/touch.js +0 -1
- package/dist/es/navigation.d.ts +0 -128
- package/dist/es/navigation.js +0 -144
- package/dist/es/noop.d.ts +0 -4
- package/dist/es/noop.js +0 -4
- package/dist/es/scrollbarWidth.d.ts +0 -8
- package/dist/es/scrollbarWidth.js +0 -22
- package/dist/es/setter.d.ts +0 -16
- package/dist/es/setter.js +0 -36
- package/dist/es/theme.d.ts +0 -8
- package/dist/es/theme.js +0 -17
- package/dist/es/tree-utils/FieldsService.js +0 -50
- package/dist/es/tree-utils/SortedPublicItemIds.d.ts +0 -8
- package/dist/es/tree-utils/SortedPublicItemIds.js +0 -26
- package/dist/es/tree-utils/itemIdUtils.js +0 -117
- package/dist/es/tree-utils/itemUtils.js +0 -191
- package/dist/es/tree-utils/misc.d.ts +0 -8
- package/dist/es/tree-utils/misc.js +0 -17
- package/dist/es/treeDataOperations.js +0 -105
- package/dist/es/typography/Typography.d.ts +0 -35
- package/dist/es/typography/Typography.js +0 -266
- package/dist/es/typography/TypographyProps.js +0 -1
- package/dist/es/typography/constants.d.ts +0 -84
- package/dist/es/typography/constants.js +0 -84
- package/dist/es/typography/models/margin.js +0 -1
- package/dist/es/validate-package.d.ts +0 -8
- package/dist/es/validate-package.js +0 -23
- package/dist/es/watermark/WatermarkOverlay.d.ts +0 -6
- package/dist/es/watermark/WatermarkOverlay.js +0 -86
- package/dist/npm/Draggable.js +0 -87
- package/dist/npm/Droppable.js +0 -71
- package/dist/npm/FormComponent.d.ts +0 -98
- package/dist/npm/FormComponent.js +0 -12
- package/dist/npm/browser-support.service.d.ts +0 -7
- package/dist/npm/browser-support.service.js +0 -33
- package/dist/npm/canUseDOM.d.ts +0 -4
- package/dist/npm/canUseDOM.js +0 -11
- package/dist/npm/canUseRef.d.ts +0 -5
- package/dist/npm/canUseRef.js +0 -16
- package/dist/npm/classNames.d.ts +0 -4
- package/dist/npm/classNames.js +0 -34
- package/dist/npm/clone.js +0 -60
- package/dist/npm/constants/index.d.ts +0 -4
- package/dist/npm/constants/index.js +0 -7
- package/dist/npm/contexts/ZIndexContext.d.ts +0 -7
- package/dist/npm/contexts/ZIndexContext.js +0 -10
- package/dist/npm/drag-n-drop/context/index.js +0 -27
- package/dist/npm/drag-n-drop/index.d.ts +0 -21
- package/dist/npm/drag-n-drop/index.js +0 -48
- package/dist/npm/events/BaseEvent.d.ts +0 -18
- package/dist/npm/events/BaseEvent.js +0 -2
- package/dist/npm/events/dispatchEvent.js +0 -26
- package/dist/npm/fieldList.d.ts +0 -4
- package/dist/npm/fieldList.js +0 -15
- package/dist/npm/focus.d.ts +0 -4
- package/dist/npm/focus.js +0 -19
- package/dist/npm/getActiveElement.d.ts +0 -8
- package/dist/npm/getActiveElement.js +0 -28
- package/dist/npm/getTabIndex.d.ts +0 -4
- package/dist/npm/getTabIndex.js +0 -27
- package/dist/npm/getter.d.ts +0 -14
- package/dist/npm/getter.js +0 -34
- package/dist/npm/guid.d.ts +0 -4
- package/dist/npm/guid.js +0 -21
- package/dist/npm/hasRelativeStackingContext.d.ts +0 -2
- package/dist/npm/hasRelativeStackingContext.js +0 -29
- package/dist/npm/hocs/AsyncFocusBlur.js +0 -30
- package/dist/npm/hocs/withPropsContext.js +0 -27
- package/dist/npm/hooks/index.js +0 -28
- package/dist/npm/hooks/useAsyncFocusBlur.js +0 -76
- package/dist/npm/hooks/useCollection.d.ts +0 -14
- package/dist/npm/hooks/useCollection.js +0 -30
- package/dist/npm/hooks/useControlledState.d.ts +0 -7
- package/dist/npm/hooks/useControlledState.js +0 -27
- package/dist/npm/hooks/useCustomComponent.d.ts +0 -13
- package/dist/npm/hooks/useCustomComponent.js +0 -13
- package/dist/npm/hooks/useDir.d.ts +0 -5
- package/dist/npm/hooks/useDir.js +0 -23
- package/dist/npm/hooks/useDocument.d.ts +0 -7
- package/dist/npm/hooks/useDocument.js +0 -18
- package/dist/npm/hooks/useDraggable.d.ts +0 -63
- package/dist/npm/hooks/useDraggable.js +0 -340
- package/dist/npm/hooks/useDroppable.d.ts +0 -28
- package/dist/npm/hooks/useDroppable.js +0 -63
- package/dist/npm/hooks/useInheritedState.d.ts +0 -13
- package/dist/npm/hooks/useInheritedState.js +0 -25
- package/dist/npm/hooks/useMouse.d.ts +0 -20
- package/dist/npm/hooks/useMouse.js +0 -121
- package/dist/npm/hooks/usePointer.d.ts +0 -21
- package/dist/npm/hooks/usePointer.js +0 -33
- package/dist/npm/hooks/usePropsContext.d.ts +0 -3
- package/dist/npm/hooks/usePropsContext.js +0 -11
- package/dist/npm/hooks/useRtl.d.ts +0 -5
- package/dist/npm/hooks/useRtl.js +0 -26
- package/dist/npm/hooks/useTouch.d.ts +0 -15
- package/dist/npm/hooks/useTouch.js +0 -33
- package/dist/npm/hooks/useWindow.d.ts +0 -7
- package/dist/npm/hooks/useWindow.js +0 -19
- package/dist/npm/icons/BaseIconProps.js +0 -2
- package/dist/npm/icons/Icon.d.ts +0 -35
- package/dist/npm/icons/Icon.js +0 -81
- package/dist/npm/icons/IconWrap.d.ts +0 -7
- package/dist/npm/icons/IconWrap.js +0 -44
- package/dist/npm/icons/IconsContext.d.ts +0 -21
- package/dist/npm/icons/IconsContext.js +0 -10
- package/dist/npm/icons/SvgIcon.d.ts +0 -71
- package/dist/npm/icons/SvgIcon.js +0 -99
- package/dist/npm/icons/constants.d.ts +0 -13
- package/dist/npm/icons/constants.js +0 -16
- package/dist/npm/icons/models/flip.d.ts +0 -11
- package/dist/npm/icons/models/flip.js +0 -2
- package/dist/npm/icons/models/size.js +0 -2
- package/dist/npm/icons/models/theme-color.d.ts +0 -21
- package/dist/npm/icons/models/theme-color.js +0 -2
- package/dist/npm/icons/utils.d.ts +0 -17
- package/dist/npm/icons/utils.js +0 -22
- package/dist/npm/keys.d.ts +0 -20
- package/dist/npm/keys.js +0 -23
- package/dist/npm/main.d.ts +0 -58
- package/dist/npm/main.js +0 -75
- package/dist/npm/memoize.d.ts +0 -10
- package/dist/npm/memoize.js +0 -45
- package/dist/npm/models/auto-scroll-options.d.ts +0 -23
- package/dist/npm/models/auto-scroll-options.js +0 -2
- package/dist/npm/models/index.d.ts +0 -5
- package/dist/npm/models/index.js +0 -21
- package/dist/npm/models/kendoReactComponentBaseProps.js +0 -2
- package/dist/npm/models/mouse.js +0 -2
- package/dist/npm/models/pointer.js +0 -2
- package/dist/npm/models/touch.d.ts +0 -17
- package/dist/npm/models/touch.js +0 -2
- package/dist/npm/navigation.js +0 -147
- package/dist/npm/noop.d.ts +0 -4
- package/dist/npm/noop.js +0 -8
- package/dist/npm/scrollbarWidth.d.ts +0 -8
- package/dist/npm/scrollbarWidth.js +0 -27
- package/dist/npm/setter.js +0 -40
- package/dist/npm/theme.d.ts +0 -8
- package/dist/npm/theme.js +0 -20
- package/dist/npm/tree-utils/FieldsService.d.ts +0 -25
- package/dist/npm/tree-utils/FieldsService.js +0 -53
- package/dist/npm/tree-utils/SortedPublicItemIds.d.ts +0 -8
- package/dist/npm/tree-utils/SortedPublicItemIds.js +0 -29
- package/dist/npm/tree-utils/itemIdUtils.d.ts +0 -60
- package/dist/npm/tree-utils/itemIdUtils.js +0 -132
- package/dist/npm/tree-utils/itemUtils.d.ts +0 -45
- package/dist/npm/tree-utils/itemUtils.js +0 -205
- package/dist/npm/tree-utils/misc.d.ts +0 -8
- package/dist/npm/tree-utils/misc.js +0 -22
- package/dist/npm/treeDataOperations.d.ts +0 -39
- package/dist/npm/treeDataOperations.js +0 -112
- package/dist/npm/typography/Typography.js +0 -269
- package/dist/npm/typography/TypographyProps.d.ts +0 -121
- package/dist/npm/typography/TypographyProps.js +0 -2
- package/dist/npm/typography/constants.js +0 -87
- package/dist/npm/typography/models/margin.d.ts +0 -23
- package/dist/npm/typography/models/margin.js +0 -2
- package/dist/npm/validate-package.d.ts +0 -8
- package/dist/npm/validate-package.js +0 -28
- package/dist/npm/watermark/WatermarkOverlay.d.ts +0 -6
- package/dist/npm/watermark/WatermarkOverlay.js +0 -90
- package/dist/systemjs/kendo-react-common.js +0 -1
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useMouse = void 0;
|
|
4
|
-
var React = require("react");
|
|
5
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
var useMouse = function (props, target, extend) {
|
|
9
|
-
if (extend === void 0) { extend = {}; }
|
|
10
|
-
var handleMouseDown = React.useCallback(function (event) {
|
|
11
|
-
if (extend.onMouseDown) {
|
|
12
|
-
extend.onMouseDown.call(undefined, event);
|
|
13
|
-
}
|
|
14
|
-
if (props.onMouseDown) {
|
|
15
|
-
props.onMouseDown.call(undefined, {
|
|
16
|
-
target: target.current,
|
|
17
|
-
syntheticEvent: event
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
}, [extend.onMouseDown, props.onMouseDown, target]);
|
|
21
|
-
var handleMouseUp = React.useCallback(function (event) {
|
|
22
|
-
if (extend.onMouseUp) {
|
|
23
|
-
extend.onMouseUp.call(undefined, event);
|
|
24
|
-
}
|
|
25
|
-
if (props.onMouseUp) {
|
|
26
|
-
props.onMouseUp.call(undefined, {
|
|
27
|
-
target: target.current,
|
|
28
|
-
syntheticEvent: event
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
}, [extend.onMouseUp, props.onMouseUp, target]);
|
|
32
|
-
var handleClick = React.useCallback(function (event) {
|
|
33
|
-
if (extend.onClick) {
|
|
34
|
-
extend.onClick.call(undefined, event);
|
|
35
|
-
}
|
|
36
|
-
if (props.onClick) {
|
|
37
|
-
props.onClick.call(undefined, {
|
|
38
|
-
target: target.current,
|
|
39
|
-
syntheticEvent: event
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
}, [extend.onClick, props.onClick, target]);
|
|
43
|
-
var handleDoubleClick = React.useCallback(function (event) {
|
|
44
|
-
if (extend.onDoubleClick) {
|
|
45
|
-
extend.onDoubleClick.call(undefined, event);
|
|
46
|
-
}
|
|
47
|
-
if (props.onDoubleClick) {
|
|
48
|
-
props.onDoubleClick.call(undefined, {
|
|
49
|
-
target: target.current,
|
|
50
|
-
syntheticEvent: event
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
}, [extend.onDoubleClick, props.onDoubleClick, target]);
|
|
54
|
-
var handleMouseEnter = React.useCallback(function (event) {
|
|
55
|
-
if (extend.onMouseEnter) {
|
|
56
|
-
extend.onMouseEnter.call(undefined, event);
|
|
57
|
-
}
|
|
58
|
-
if (props.onMouseEnter) {
|
|
59
|
-
props.onMouseEnter.call(undefined, {
|
|
60
|
-
target: target.current,
|
|
61
|
-
syntheticEvent: event
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
}, [extend.onMouseEnter, props.onMouseEnter, target]);
|
|
65
|
-
var handleMouseLeave = React.useCallback(function (event) {
|
|
66
|
-
if (extend.onMouseLeave) {
|
|
67
|
-
extend.onMouseLeave.call(undefined, event);
|
|
68
|
-
}
|
|
69
|
-
if (props.onMouseLeave) {
|
|
70
|
-
props.onMouseLeave.call(undefined, {
|
|
71
|
-
target: target.current,
|
|
72
|
-
syntheticEvent: event
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
}, [extend.onMouseLeave, props.onMouseLeave, target]);
|
|
76
|
-
var handelMouseMove = React.useCallback(function (event) {
|
|
77
|
-
if (extend.onMouseMove) {
|
|
78
|
-
extend.onMouseMove.call(undefined, event);
|
|
79
|
-
}
|
|
80
|
-
if (props.onMouseMove) {
|
|
81
|
-
props.onMouseMove.call(undefined, {
|
|
82
|
-
target: target.current,
|
|
83
|
-
syntheticEvent: event
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
}, [extend.onMouseMove, props.onMouseMove, target]);
|
|
87
|
-
var handleMouseOut = React.useCallback(function (event) {
|
|
88
|
-
if (extend.onMouseOut) {
|
|
89
|
-
extend.onMouseOut.call(undefined, event);
|
|
90
|
-
}
|
|
91
|
-
if (props.onMouseOut) {
|
|
92
|
-
props.onMouseOut.call(undefined, {
|
|
93
|
-
target: target.current,
|
|
94
|
-
syntheticEvent: event
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
}, [extend.onMouseOut, props.onMouseOut, target]);
|
|
98
|
-
var handleMouseOver = React.useCallback(function (event) {
|
|
99
|
-
if (extend.onMouseOver) {
|
|
100
|
-
extend.onMouseOver.call(undefined, event);
|
|
101
|
-
}
|
|
102
|
-
if (props.onMouseOver) {
|
|
103
|
-
props.onMouseOver.call(undefined, {
|
|
104
|
-
target: target.current,
|
|
105
|
-
syntheticEvent: event
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
}, [extend.onMouseOver, props.onMouseOver, target]);
|
|
109
|
-
return {
|
|
110
|
-
onClick: handleClick,
|
|
111
|
-
onMouseUp: handleMouseUp,
|
|
112
|
-
onMouseDown: handleMouseDown,
|
|
113
|
-
onDoubleClick: handleDoubleClick,
|
|
114
|
-
onMouseEnter: handleMouseEnter,
|
|
115
|
-
onMouseLeave: handleMouseLeave,
|
|
116
|
-
onMouseMove: handelMouseMove,
|
|
117
|
-
onMouseOut: handleMouseOut,
|
|
118
|
-
onMouseOver: handleMouseOver
|
|
119
|
-
};
|
|
120
|
-
};
|
|
121
|
-
exports.useMouse = useMouse;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { KendoPointer } from '../models';
|
|
3
|
-
declare type ElementPointer = {
|
|
4
|
-
[P in keyof KendoPointer<any, any>]: (event: React.PointerEvent<any>) => void;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
export declare const usePointer: <E extends HTMLElement | null, P extends KendoPointer<any, any>, R extends {}>(props: P, target: React.RefObject<R>, extend?: {
|
|
10
|
-
onPointerDown?: ((args: React.PointerEvent<E>) => void) | undefined;
|
|
11
|
-
onPointerMove?: ((args: React.PointerEvent<E>) => void) | undefined;
|
|
12
|
-
onPointerUp?: ((args: React.PointerEvent<E>) => void) | undefined;
|
|
13
|
-
onPointerCancel?: ((args: React.PointerEvent<E>) => void) | undefined;
|
|
14
|
-
onGotPointerCapture?: ((args: React.PointerEvent<E>) => void) | undefined;
|
|
15
|
-
onLostPointerCapture?: ((args: React.PointerEvent<E>) => void) | undefined;
|
|
16
|
-
onPointerEnter?: ((args: React.PointerEvent<E>) => void) | undefined;
|
|
17
|
-
onPointerOver?: ((args: React.PointerEvent<E>) => void) | undefined;
|
|
18
|
-
onPointerLeave?: ((args: React.PointerEvent<E>) => void) | undefined;
|
|
19
|
-
onPointerOut?: ((args: React.PointerEvent<E>) => void) | undefined;
|
|
20
|
-
}) => ElementPointer;
|
|
21
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.usePointer = void 0;
|
|
15
|
-
var React = require("react");
|
|
16
|
-
/**
|
|
17
|
-
* @hidden
|
|
18
|
-
*/
|
|
19
|
-
var usePointer = function (props, target, extend) {
|
|
20
|
-
if (extend === void 0) { extend = {}; }
|
|
21
|
-
return Object.keys(extend).reduce(function (acc, key) {
|
|
22
|
-
var _a;
|
|
23
|
-
return (__assign(__assign({}, acc), (_a = {}, _a[key] = React.useCallback(function (syntheticEvent) {
|
|
24
|
-
if (extend[key]) {
|
|
25
|
-
extend[key](syntheticEvent);
|
|
26
|
-
}
|
|
27
|
-
if (props[key]) {
|
|
28
|
-
props[key]({ target: target.current, syntheticEvent: syntheticEvent });
|
|
29
|
-
}
|
|
30
|
-
}, [props[key], extend[key], target]), _a)));
|
|
31
|
-
}, {});
|
|
32
|
-
};
|
|
33
|
-
exports.usePointer = usePointer;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.usePropsContext = void 0;
|
|
4
|
-
var React = require("react");
|
|
5
|
-
/** @hidden */
|
|
6
|
-
var usePropsContext = function (context, props) {
|
|
7
|
-
var contextPropsCallback = React.useContext(context);
|
|
8
|
-
var contextProps = contextPropsCallback(props);
|
|
9
|
-
return contextProps;
|
|
10
|
-
};
|
|
11
|
-
exports.usePropsContext = usePropsContext;
|
package/dist/npm/hooks/useRtl.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useRtl = void 0;
|
|
4
|
-
var React = require("react");
|
|
5
|
-
// Same as 'useDir'. Export to avoid breaking change.
|
|
6
|
-
// 'useRtl' is incorrect naming, since applies that the returned value is `true` or `false`.
|
|
7
|
-
// but instead, it is returning `ltr` or `rtl`.
|
|
8
|
-
/**
|
|
9
|
-
* @hidden
|
|
10
|
-
*/
|
|
11
|
-
function useRtl(elementRef, initialDir, args) {
|
|
12
|
-
// Dir prop is read only on initial rendering due to specifics of getComputedStyles - see below
|
|
13
|
-
var _a = React.useState(initialDir), dir = _a[0], setDir = _a[1];
|
|
14
|
-
React.useEffect(function () {
|
|
15
|
-
if (!dir && window && elementRef.current) {
|
|
16
|
-
// Note: getComputedStyle forces reflow
|
|
17
|
-
var rtlCandidate = window.getComputedStyle(elementRef.current).direction;
|
|
18
|
-
if (rtlCandidate) {
|
|
19
|
-
// rerender is needed as DOM is read after first render
|
|
20
|
-
setDir(rtlCandidate);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}, args);
|
|
24
|
-
return dir;
|
|
25
|
-
}
|
|
26
|
-
exports.useRtl = useRtl;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { KendoTouch } from '../models';
|
|
3
|
-
declare type ElementTouch = {
|
|
4
|
-
[P in keyof KendoTouch<any, any>]: (event: React.TouchEvent<any>) => void;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
export declare const useMouse: <E extends HTMLElement | null, P extends KendoTouch<any, any>, R extends {}>(props: P, target: React.RefObject<R>, extend?: {
|
|
10
|
-
onTouchStart?: ((args: React.TouchEvent<E>) => void) | undefined;
|
|
11
|
-
onTouchMove?: ((args: React.TouchEvent<E>) => void) | undefined;
|
|
12
|
-
onTouchEnd?: ((args: React.TouchEvent<E>) => void) | undefined;
|
|
13
|
-
onTouchCancel?: ((args: React.TouchEvent<E>) => void) | undefined;
|
|
14
|
-
}) => ElementTouch;
|
|
15
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.useMouse = void 0;
|
|
15
|
-
var React = require("react");
|
|
16
|
-
/**
|
|
17
|
-
* @hidden
|
|
18
|
-
*/
|
|
19
|
-
var useMouse = function (props, target, extend) {
|
|
20
|
-
if (extend === void 0) { extend = {}; }
|
|
21
|
-
return Object.keys(extend).reduce(function (acc, key) {
|
|
22
|
-
var _a;
|
|
23
|
-
return (__assign(__assign({}, acc), (_a = {}, _a[key] = React.useCallback(function (syntheticEvent) {
|
|
24
|
-
if (extend[key]) {
|
|
25
|
-
extend[key](syntheticEvent);
|
|
26
|
-
}
|
|
27
|
-
if (props[key]) {
|
|
28
|
-
props[key]({ target: target.current, syntheticEvent: syntheticEvent });
|
|
29
|
-
}
|
|
30
|
-
}, [props[key], extend[key], target]), _a)));
|
|
31
|
-
}, {});
|
|
32
|
-
};
|
|
33
|
-
exports.useMouse = useMouse;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Returns a function, which gets the `defaultView` based on the `ownerDocument` of the element.
|
|
4
|
-
*/
|
|
5
|
-
export declare const useWindow: (ref: React.RefObject<HTMLElement | null | {
|
|
6
|
-
element: HTMLElement | null;
|
|
7
|
-
}>) => () => Window;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useWindow = void 0;
|
|
4
|
-
var React = require("react");
|
|
5
|
-
var useDocument_1 = require("./useDocument");
|
|
6
|
-
/**
|
|
7
|
-
* Returns a function, which gets the `defaultView` based on the `ownerDocument` of the element.
|
|
8
|
-
*/
|
|
9
|
-
var useWindow = function (ref) {
|
|
10
|
-
var getDocument = (0, useDocument_1.useDocument)(ref);
|
|
11
|
-
var getWindow = React.useCallback(function () {
|
|
12
|
-
var document = getDocument();
|
|
13
|
-
return document
|
|
14
|
-
? document.defaultView || window
|
|
15
|
-
: window;
|
|
16
|
-
}, [getDocument]);
|
|
17
|
-
return getWindow;
|
|
18
|
-
};
|
|
19
|
-
exports.useWindow = useWindow;
|
package/dist/npm/icons/Icon.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { BaseIconProps } from './BaseIconProps';
|
|
3
|
-
import { KendoMouse } from '../models/mouse';
|
|
4
|
-
/**
|
|
5
|
-
* @hidden
|
|
6
|
-
*/
|
|
7
|
-
export interface IconHandle {
|
|
8
|
-
/**
|
|
9
|
-
* The IconHandle element.
|
|
10
|
-
*/
|
|
11
|
-
element: HTMLSpanElement | null;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Represents the props of the [KendoReact Icon component]({% slug overview_icon %}).
|
|
15
|
-
*/
|
|
16
|
-
export interface IconProps extends BaseIconProps, KendoMouse<IconHandle, HTMLSpanElement> {
|
|
17
|
-
/**
|
|
18
|
-
* Represents the name of the icon.
|
|
19
|
-
*/
|
|
20
|
-
name?: string;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Represents the [KendoReact Icon component]({% slug overview_icon %}).
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* ```jsx
|
|
27
|
-
* const App = () => {
|
|
28
|
-
* return (
|
|
29
|
-
* <Icon name="home"/>
|
|
30
|
-
* );
|
|
31
|
-
* };
|
|
32
|
-
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
export declare const Icon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<IconHandle | null>>;
|
package/dist/npm/icons/Icon.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
-
var t = {};
|
|
15
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
-
t[p] = s[p];
|
|
17
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
-
t[p[i]] = s[p[i]];
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
};
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.Icon = void 0;
|
|
26
|
-
var React = require("react");
|
|
27
|
-
var PropTypes = require("prop-types");
|
|
28
|
-
var classNames_1 = require("../classNames");
|
|
29
|
-
var constants_1 = require("./constants");
|
|
30
|
-
var main_1 = require("../main");
|
|
31
|
-
/**
|
|
32
|
-
* Represents the [KendoReact Icon component]({% slug overview_icon %}).
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* ```jsx
|
|
36
|
-
* const App = () => {
|
|
37
|
-
* return (
|
|
38
|
-
* <Icon name="home"/>
|
|
39
|
-
* );
|
|
40
|
-
* };
|
|
41
|
-
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
exports.Icon = React.forwardRef(function (props, ref) {
|
|
45
|
-
var className = props.className, name = props.name, themeColor = props.themeColor, size = props.size, flip = props.flip, style = props.style, id = props.id, tabIndex = props.tabIndex, others = __rest(props, ["className", "name", "themeColor", "size", "flip", "style", "id", "tabIndex"]);
|
|
46
|
-
var target = React.useRef(null);
|
|
47
|
-
var elementRef = React.useRef(null);
|
|
48
|
-
React.useImperativeHandle(target, function () { return ({
|
|
49
|
-
element: elementRef.current
|
|
50
|
-
}); });
|
|
51
|
-
React.useImperativeHandle(ref, function () { return target.current; });
|
|
52
|
-
var sizeProp = React.useMemo(function () { return size || defaultProps.size; }, [size]);
|
|
53
|
-
var flipProp = React.useMemo(function () { return flip || defaultProps.flip; }, [flip]);
|
|
54
|
-
var fontClassNames = React.useMemo(function () {
|
|
55
|
-
var _a;
|
|
56
|
-
return (0, classNames_1.classNames)('k-icon', 'k-font-icon', name && (0, main_1.toIconClass)(name), (_a = {},
|
|
57
|
-
_a["k-color-".concat(themeColor)] = themeColor,
|
|
58
|
-
_a['k-flip-h'] = flipProp === 'horizontal' || flipProp === 'both',
|
|
59
|
-
_a['k-flip-v'] = flipProp === 'vertical' || flipProp === 'both',
|
|
60
|
-
_a), constants_1.SIZE_CLASSES[sizeProp], className);
|
|
61
|
-
}, [name, themeColor, sizeProp, flipProp, className]);
|
|
62
|
-
var mouseProps = (0, main_1.useMouse)(props, target);
|
|
63
|
-
return (React.createElement("span", __assign({ ref: elementRef }, others, mouseProps, { className: fontClassNames, id: id, tabIndex: tabIndex, style: style, role: "presentation" })));
|
|
64
|
-
});
|
|
65
|
-
exports.Icon.propTypes = {
|
|
66
|
-
style: PropTypes.object,
|
|
67
|
-
classNames: PropTypes.string,
|
|
68
|
-
name: PropTypes.string,
|
|
69
|
-
themeColor: PropTypes.oneOf([
|
|
70
|
-
'inherit', 'primary', 'secondary', 'tertiary',
|
|
71
|
-
'info', 'success', 'error', 'warning',
|
|
72
|
-
'dark', 'light', 'inverse'
|
|
73
|
-
]),
|
|
74
|
-
size: PropTypes.oneOf(['default', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'xxlarge', 'xxxlarge']),
|
|
75
|
-
flip: PropTypes.oneOf(['default', 'horizontal', 'vertical', 'both'])
|
|
76
|
-
};
|
|
77
|
-
var defaultProps = {
|
|
78
|
-
size: 'default',
|
|
79
|
-
flip: 'default'
|
|
80
|
-
};
|
|
81
|
-
exports.Icon.displayName = 'KendoIcon';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { IconProps, IconHandle } from './Icon';
|
|
3
|
-
import { SvgIconProps, SvgIconHandle } from './SvgIcon';
|
|
4
|
-
/**
|
|
5
|
-
* @hidden
|
|
6
|
-
*/
|
|
7
|
-
export declare const IconWrap: React.ForwardRefExoticComponent<IconProps & SvgIconProps & React.RefAttributes<(IconHandle & SvgIconHandle) | null>>;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
-
var t = {};
|
|
15
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
-
t[p] = s[p];
|
|
17
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
-
t[p[i]] = s[p[i]];
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
};
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.IconWrap = void 0;
|
|
26
|
-
var React = require("react");
|
|
27
|
-
var Icon_1 = require("./Icon");
|
|
28
|
-
var SvgIcon_1 = require("./SvgIcon");
|
|
29
|
-
var IconsContext_1 = require("./IconsContext");
|
|
30
|
-
/**
|
|
31
|
-
* @hidden
|
|
32
|
-
*/
|
|
33
|
-
exports.IconWrap = React.forwardRef(function (props, ref) {
|
|
34
|
-
var _a, _b;
|
|
35
|
-
var _c = React.useContext(IconsContext_1.IconsContext), type = _c.type, icons = _c.icons;
|
|
36
|
-
var icon = props.icon, fontIconProps = __rest(props, ["icon"]);
|
|
37
|
-
var name = type === 'svg' ? (((_a = props.icon) === null || _a === void 0 ? void 0 : _a.name) || props.name) : (props.name || ((_b = props.icon) === null || _b === void 0 ? void 0 : _b.name));
|
|
38
|
-
name = (name && icons && icons[name] && typeof icons[name] === 'string') ? icons[name] : name;
|
|
39
|
-
var svg = (name && icons && icons[name] && typeof icons[name] !== 'string') ? icons[name] : icon;
|
|
40
|
-
return (type === 'svg' && svg) ?
|
|
41
|
-
React.createElement(SvgIcon_1.SvgIcon, __assign({}, props, { icon: svg, ref: ref })) :
|
|
42
|
-
React.createElement(Icon_1.Icon, __assign({}, fontIconProps, { name: name, ref: ref }));
|
|
43
|
-
});
|
|
44
|
-
exports.IconWrap.displayName = 'KendoIconWrap';
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { SVGIcon } from './SvgIcon';
|
|
3
|
-
/**
|
|
4
|
-
* IconsContext type.
|
|
5
|
-
*/
|
|
6
|
-
export interface IconsContextType {
|
|
7
|
-
/**
|
|
8
|
-
* Sets the type of the icons used in the KendoReact components inside IconsContext.
|
|
9
|
-
*/
|
|
10
|
-
type?: 'font' | 'svg';
|
|
11
|
-
/**
|
|
12
|
-
* Overrides the built-in icons.
|
|
13
|
-
*/
|
|
14
|
-
icons?: {
|
|
15
|
-
[name: string]: SVGIcon | string;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Represents a React Context which provides you with the option to configure the KendoReact components icons.
|
|
20
|
-
*/
|
|
21
|
-
export declare const IconsContext: React.Context<IconsContextType>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IconsContext = void 0;
|
|
4
|
-
var React = require("react");
|
|
5
|
-
;
|
|
6
|
-
/**
|
|
7
|
-
* Represents a React Context which provides you with the option to configure the KendoReact components icons.
|
|
8
|
-
*/
|
|
9
|
-
exports.IconsContext = React.createContext({ type: 'svg' });
|
|
10
|
-
exports.IconsContext.displayName = 'KendoReactIconsContext';
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { BaseIconProps } from './BaseIconProps';
|
|
3
|
-
/**
|
|
4
|
-
* @hidden
|
|
5
|
-
*/
|
|
6
|
-
export interface SVGIcon {
|
|
7
|
-
/**
|
|
8
|
-
* The unique name of the icon.
|
|
9
|
-
*/
|
|
10
|
-
name: string;
|
|
11
|
-
/**
|
|
12
|
-
* The entire SVG content of the icon.
|
|
13
|
-
*/
|
|
14
|
-
content: string;
|
|
15
|
-
/**
|
|
16
|
-
* The [viewBox](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/viewBox)
|
|
17
|
-
* definition that should be used for the icon.
|
|
18
|
-
*/
|
|
19
|
-
viewBox: string;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* @hidden
|
|
23
|
-
*/
|
|
24
|
-
export interface SvgIconHandle {
|
|
25
|
-
/**
|
|
26
|
-
* The SvgIconHandle element.
|
|
27
|
-
*/
|
|
28
|
-
element: HTMLSpanElement | null;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Represents the props of the [KendoReact SvgIcon component]({% slug overview_svgicon %}).
|
|
32
|
-
*/
|
|
33
|
-
export interface SvgIconProps extends BaseIconProps, React.SVGAttributes<HTMLOrSVGElement> {
|
|
34
|
-
/**
|
|
35
|
-
* Specifies the SVG icon.
|
|
36
|
-
*
|
|
37
|
-
* * The possible keys are:
|
|
38
|
-
* * `name`—The unique name of the icon.
|
|
39
|
-
* * `content`—The entire SVG content of the icon.
|
|
40
|
-
* * `viewBox`—The viewBox definition that should be used for the icon.
|
|
41
|
-
*/
|
|
42
|
-
icon?: SVGIcon;
|
|
43
|
-
/**
|
|
44
|
-
* Specifies the viewBox of the custom SVG icon.
|
|
45
|
-
*/
|
|
46
|
-
viewBox?: string;
|
|
47
|
-
/**
|
|
48
|
-
* Specifies a list of CSS classes that will be added to the svg element.
|
|
49
|
-
*/
|
|
50
|
-
svgClassName?: string;
|
|
51
|
-
/**
|
|
52
|
-
* Sets additional CSS styles to the svg element.
|
|
53
|
-
*/
|
|
54
|
-
svgStyle?: React.CSSProperties;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Represents the [KendoReact SvgIcon component]({% slug overview_svgicon %}).
|
|
58
|
-
*
|
|
59
|
-
* @example
|
|
60
|
-
* ```jsx
|
|
61
|
-
* import { accessibility } from '@progress/kendo-svg-icons';
|
|
62
|
-
*
|
|
63
|
-
* const App = () => {
|
|
64
|
-
* return (
|
|
65
|
-
* <SvgIcon icon={accessibility} />
|
|
66
|
-
* );
|
|
67
|
-
* };
|
|
68
|
-
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
69
|
-
* ```
|
|
70
|
-
*/
|
|
71
|
-
export declare const SvgIcon: React.ForwardRefExoticComponent<SvgIconProps & React.RefAttributes<SvgIconHandle | null>>;
|