@progress/kendo-react-common 7.2.4-develop.2 → 7.2.4-develop.4
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/Draggable.js +8 -0
- package/Draggable.mjs +79 -0
- package/Droppable.js +8 -0
- package/Droppable.mjs +64 -0
- package/FormComponent.js +8 -0
- package/FormComponent.mjs +13 -0
- package/browser-support.service.js +8 -0
- package/browser-support.service.mjs +25 -0
- package/canUseDOM.js +8 -0
- package/canUseDOM.mjs +13 -0
- package/canUseRef.js +8 -0
- package/canUseRef.mjs +15 -0
- package/classNames.js +8 -0
- package/classNames.mjs +17 -0
- package/clone.js +8 -0
- package/clone.mjs +44 -0
- package/constants/index.js +8 -0
- package/constants/index.mjs +12 -0
- package/contexts/ZIndexContext.js +8 -0
- package/contexts/ZIndexContext.mjs +15 -0
- package/dist/cdn/js/kendo-react-common.js +8 -5
- package/drag-n-drop/context/index.js +8 -0
- package/drag-n-drop/context/index.mjs +23 -0
- package/drag-n-drop/index.js +8 -0
- package/drag-n-drop/index.mjs +46 -0
- package/events/dispatchEvent.js +8 -0
- package/events/dispatchEvent.mjs +21 -0
- package/fieldList.js +8 -0
- package/fieldList.mjs +18 -0
- package/getActiveElement.js +8 -0
- package/getActiveElement.mjs +19 -0
- package/getTabIndex.js +8 -0
- package/getTabIndex.mjs +16 -0
- package/getter.js +8 -0
- package/getter.mjs +26 -0
- package/guid.js +8 -0
- package/guid.mjs +17 -0
- package/hasRelativeStackingContext.js +8 -0
- package/hasRelativeStackingContext.mjs +25 -0
- package/hocs/AsyncFocusBlur.js +8 -0
- package/hocs/AsyncFocusBlur.mjs +23 -0
- package/hocs/use-id-hoc.js +8 -0
- package/hocs/use-id-hoc.mjs +17 -0
- package/hocs/withPropsContext.js +8 -0
- package/hocs/withPropsContext.mjs +18 -0
- package/hooks/use-id.js +8 -0
- package/hooks/use-id.mjs +35 -0
- package/hooks/use-isomorphic-layout-effect.js +8 -0
- package/hooks/use-isomorphic-layout-effect.mjs +13 -0
- package/hooks/useAsyncFocusBlur.js +8 -0
- package/hooks/useAsyncFocusBlur.mjs +38 -0
- package/hooks/useCollection.js +8 -0
- package/hooks/useCollection.mjs +32 -0
- package/hooks/useControlledState.js +8 -0
- package/hooks/useControlledState.mjs +21 -0
- package/hooks/useCustomComponent.js +8 -0
- package/hooks/useCustomComponent.mjs +22 -0
- package/hooks/useDir.js +8 -0
- package/hooks/useDir.mjs +24 -0
- package/hooks/useDocument.js +8 -0
- package/hooks/useDocument.mjs +22 -0
- package/hooks/useDraggable.js +8 -0
- package/hooks/useDraggable.mjs +308 -0
- package/hooks/useDroppable.js +8 -0
- package/hooks/useDroppable.mjs +67 -0
- package/hooks/useInheritedState.js +8 -0
- package/hooks/useInheritedState.mjs +21 -0
- package/hooks/useMouse.js +8 -0
- package/hooks/useMouse.mjs +98 -0
- package/hooks/usePropsContext.js +8 -0
- package/hooks/usePropsContext.mjs +13 -0
- package/hooks/useRtl.js +8 -0
- package/hooks/useRtl.mjs +24 -0
- package/hooks/useWindow.js +8 -0
- package/hooks/useWindow.mjs +20 -0
- package/icons/Icon.js +8 -0
- package/icons/Icon.mjs +92 -0
- package/icons/IconWrap.js +8 -0
- package/icons/IconWrap.mjs +24 -0
- package/icons/IconsContext.js +8 -0
- package/icons/IconsContext.mjs +14 -0
- package/icons/SvgIcon.js +8 -0
- package/icons/SvgIcon.mjs +124 -0
- package/icons/constants.js +8 -0
- package/icons/constants.mjs +21 -0
- package/icons/utils.js +8 -0
- package/icons/utils.mjs +19 -0
- package/index.d.mts +1771 -5
- package/index.d.ts +1771 -65
- package/index.js +8 -5
- package/index.mjs +147 -1812
- package/keys.js +8 -0
- package/keys.mjs +28 -0
- package/memoize.js +8 -0
- package/memoize.mjs +38 -0
- package/navigation.js +8 -0
- package/navigation.mjs +97 -0
- package/noop.js +8 -0
- package/noop.mjs +13 -0
- package/package.json +1 -1
- package/scrollbarWidth.js +8 -0
- package/scrollbarWidth.mjs +20 -0
- package/setter.js +8 -0
- package/setter.mjs +27 -0
- package/theme.js +8 -0
- package/theme.mjs +27 -0
- package/trappedFocus.js +8 -0
- package/trappedFocus.mjs +58 -0
- package/tree-utils/FieldsService.js +8 -0
- package/tree-utils/FieldsService.mjs +48 -0
- package/tree-utils/SortedPublicItemIds.js +8 -0
- package/tree-utils/SortedPublicItemIds.mjs +24 -0
- package/tree-utils/itemIdUtils.js +8 -0
- package/tree-utils/itemIdUtils.mjs +87 -0
- package/tree-utils/itemUtils.js +8 -0
- package/tree-utils/itemUtils.mjs +118 -0
- package/tree-utils/misc.js +8 -0
- package/tree-utils/misc.mjs +22 -0
- package/treeDataOperations.js +8 -0
- package/treeDataOperations.mjs +45 -0
- package/typography/Typography.js +8 -0
- package/typography/Typography.mjs +110 -0
- package/typography/constants.js +8 -0
- package/typography/constants.mjs +71 -0
- package/validate-package.js +8 -0
- package/validate-package.mjs +20 -0
- package/watermark/WatermarkOverlay.js +8 -0
- package/watermark/WatermarkOverlay.mjs +93 -0
- package/Draggable.d.ts +0 -90
- package/Droppable.d.ts +0 -81
- package/FormComponent.d.ts +0 -167
- package/browser-support.service.d.ts +0 -11
- package/canUseDOM.d.ts +0 -8
- package/canUseRef.d.ts +0 -9
- package/classNames.d.ts +0 -8
- package/clone.d.ts +0 -24
- package/constants/index.d.ts +0 -8
- package/contexts/ZIndexContext.d.ts +0 -11
- package/drag-n-drop/context/index.d.ts +0 -23
- package/drag-n-drop/index.d.ts +0 -25
- package/events/BaseEvent.d.ts +0 -22
- package/events/dispatchEvent.d.ts +0 -18
- package/fieldList.d.ts +0 -8
- package/focus.d.ts +0 -8
- package/getActiveElement.d.ts +0 -12
- package/getTabIndex.d.ts +0 -8
- package/getter.d.ts +0 -18
- package/guid.d.ts +0 -8
- package/hasRelativeStackingContext.d.ts +0 -6
- package/hocs/AsyncFocusBlur.d.ts +0 -17
- package/hocs/use-id-hoc.d.ts +0 -7
- package/hocs/withPropsContext.d.ts +0 -9
- package/hooks/index.d.ts +0 -16
- package/hooks/use-id.d.ts +0 -6
- package/hooks/use-isomorphic-layout-effect.d.ts +0 -7
- package/hooks/useAsyncFocusBlur.d.ts +0 -29
- package/hooks/useCollection.d.ts +0 -18
- package/hooks/useControlledState.d.ts +0 -11
- package/hooks/useCustomComponent.d.ts +0 -15
- package/hooks/useDir.d.ts +0 -9
- package/hooks/useDocument.d.ts +0 -11
- package/hooks/useDraggable.d.ts +0 -67
- package/hooks/useDroppable.d.ts +0 -32
- package/hooks/useInheritedState.d.ts +0 -17
- package/hooks/useMouse.d.ts +0 -24
- package/hooks/usePropsContext.d.ts +0 -7
- package/hooks/useRtl.d.ts +0 -9
- package/hooks/useWindow.d.ts +0 -11
- package/icons/BaseIconProps.d.ts +0 -76
- package/icons/Icon.d.ts +0 -39
- package/icons/IconWrap.d.ts +0 -11
- package/icons/IconsContext.d.ts +0 -25
- package/icons/SvgIcon.d.ts +0 -75
- package/icons/constants.d.ts +0 -17
- package/icons/models/flip.d.ts +0 -15
- package/icons/models/size.d.ts +0 -19
- package/icons/models/theme-color.d.ts +0 -25
- package/icons/utils.d.ts +0 -21
- package/keys.d.ts +0 -24
- package/memoize.d.ts +0 -14
- package/models/auto-scroll-options.d.ts +0 -26
- package/models/index.d.ts +0 -9
- package/models/kendoReactComponentBaseProps.d.ts +0 -27
- package/models/mouse.d.ts +0 -20
- package/models/pointer.d.ts +0 -27
- package/models/touch.d.ts +0 -21
- package/navigation.d.ts +0 -131
- package/noop.d.ts +0 -8
- package/scrollbarWidth.d.ts +0 -12
- package/setter.d.ts +0 -20
- package/theme.d.ts +0 -12
- package/tree-utils/FieldsService.d.ts +0 -29
- package/tree-utils/SortedPublicItemIds.d.ts +0 -12
- package/tree-utils/itemIdUtils.d.ts +0 -64
- package/tree-utils/itemUtils.d.ts +0 -49
- package/tree-utils/misc.d.ts +0 -12
- package/treeDataOperations.d.ts +0 -43
- package/typography/Typography.d.ts +0 -39
- package/typography/TypographyProps.d.ts +0 -124
- package/typography/constants.d.ts +0 -88
- package/typography/models/margin.d.ts +0 -27
- package/validate-package.d.ts +0 -13
- package/watermark/WatermarkOverlay.d.ts +0 -9
|
@@ -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 v=require("react"),o=require("../noop.js"),k=require("./useInheritedState.js"),d=require("../drag-n-drop/context/index.js"),y=require("./use-isomorphic-layout-effect.js");function E(e){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const u=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(c,r,u.get?u:{enumerable:!0,get:()=>e[r]})}}return c.default=e,Object.freeze(c)}const n=E(v);function L(e,c={onDragEnter:o.noop,onDragOver:o.noop,onDragLeave:o.noop,onDrop:o.noop}){const{onDragEnter:r=o.noop,onDragOver:u=o.noop,onDragLeave:l=o.noop,onDrop:p=o.noop}=c,[,a]=k.useInheritedState(d.DropContext),[,g,i]=n.useContext(d.DropsContext),b=n.useCallback(()=>e.current&&e.current.element?e.current.element:e.current,[e]),s=n.useRef(null);n.useImperativeHandle(s,()=>({element:b(),onDragEnter:m,onDragOver:O,onDragLeave:C,onDrop:h,data:e.current}));const m=n.useCallback(t=>{a(s,{target:e.current,event:t}),r(t)},[a,e,r]),O=n.useCallback(t=>{u(t)},[u]),C=n.useCallback(t=>{a(null,{target:e.current,event:t}),l(t)},[a,e,l]),h=n.useCallback(t=>{a(null,{target:e.current,event:t}),p(t)},[a,e,p]),D=n.useCallback(()=>(g(s),()=>{i(s)}),[i,g]);y.useIsomorphicLayoutEffect(D,[D])}exports.useDroppable=L;
|
|
@@ -0,0 +1,67 @@
|
|
|
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 t from "react";
|
|
10
|
+
import { noop as n } from "../noop.mjs";
|
|
11
|
+
import { useInheritedState as k } from "./useInheritedState.mjs";
|
|
12
|
+
import { DropsContext as v, DropContext as E } from "../drag-n-drop/context/index.mjs";
|
|
13
|
+
import { useIsomorphicLayoutEffect as L } from "./use-isomorphic-layout-effect.mjs";
|
|
14
|
+
function y(e, m = {
|
|
15
|
+
onDragEnter: n,
|
|
16
|
+
onDragOver: n,
|
|
17
|
+
onDragLeave: n,
|
|
18
|
+
onDrop: n
|
|
19
|
+
}) {
|
|
20
|
+
const {
|
|
21
|
+
onDragEnter: s = n,
|
|
22
|
+
onDragOver: c = n,
|
|
23
|
+
onDragLeave: l = n,
|
|
24
|
+
onDrop: u = n
|
|
25
|
+
} = m, [, o] = k(E), [, D, g] = t.useContext(v), i = t.useCallback(
|
|
26
|
+
() => e.current && e.current.element ? e.current.element : e.current,
|
|
27
|
+
[e]
|
|
28
|
+
), a = t.useRef(null);
|
|
29
|
+
t.useImperativeHandle(a, () => ({
|
|
30
|
+
element: i(),
|
|
31
|
+
onDragEnter: C,
|
|
32
|
+
onDragOver: d,
|
|
33
|
+
onDragLeave: b,
|
|
34
|
+
onDrop: h,
|
|
35
|
+
data: e.current
|
|
36
|
+
}));
|
|
37
|
+
const C = t.useCallback(
|
|
38
|
+
(r) => {
|
|
39
|
+
o(a, { target: e.current, event: r }), s(r);
|
|
40
|
+
},
|
|
41
|
+
[o, e, s]
|
|
42
|
+
), d = t.useCallback(
|
|
43
|
+
(r) => {
|
|
44
|
+
c(r);
|
|
45
|
+
},
|
|
46
|
+
[c]
|
|
47
|
+
), b = t.useCallback(
|
|
48
|
+
(r) => {
|
|
49
|
+
o(null, { target: e.current, event: r }), l(r);
|
|
50
|
+
},
|
|
51
|
+
[o, e, l]
|
|
52
|
+
), h = t.useCallback(
|
|
53
|
+
(r) => {
|
|
54
|
+
o(null, { target: e.current, event: r }), u(r);
|
|
55
|
+
},
|
|
56
|
+
[o, e, u]
|
|
57
|
+
), p = t.useCallback(
|
|
58
|
+
() => (D(a), () => {
|
|
59
|
+
g(a);
|
|
60
|
+
}),
|
|
61
|
+
[g, D]
|
|
62
|
+
);
|
|
63
|
+
L(p, [p]);
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
y as useDroppable
|
|
67
|
+
};
|
|
@@ -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 l=require("react");function s(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,o.get?o:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const c=s(l),i=(t,n)=>{const[e,o]=c.useContext(t),[r,u]=c.useState(n);return[e!==void 0?e:r,(...a)=>{e!==void 0?o(...a):u(a[0])}]};exports.useInheritedState=i;
|
|
@@ -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 a from "react";
|
|
10
|
+
const d = (n, o) => {
|
|
11
|
+
const [e, l] = a.useContext(n), [c, u] = a.useState(o);
|
|
12
|
+
return [
|
|
13
|
+
e !== void 0 ? e : c,
|
|
14
|
+
(...t) => {
|
|
15
|
+
e !== void 0 ? l(...t) : u(t[0]);
|
|
16
|
+
}
|
|
17
|
+
];
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
d as useInheritedState
|
|
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 b=require("react");function C(o){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const e in o)if(e!=="default"){const c=Object.getOwnPropertyDescriptor(o,e);Object.defineProperty(u,e,c.get?c:{enumerable:!0,get:()=>o[e]})}}return u.default=o,Object.freeze(u)}const l=C(b),r=(o,u,e={})=>{const c=l.useCallback(n=>{e.onMouseDown&&e.onMouseDown.call(void 0,n),o.onMouseDown&&o.onMouseDown.call(void 0,{target:u.current,syntheticEvent:n})},[e.onMouseDown,o.onMouseDown,u]),i=l.useCallback(n=>{e.onMouseUp&&e.onMouseUp.call(void 0,n),o.onMouseUp&&o.onMouseUp.call(void 0,{target:u.current,syntheticEvent:n})},[e.onMouseUp,o.onMouseUp,u]),s=l.useCallback(n=>{e.onClick&&e.onClick.call(void 0,n),o.onClick&&o.onClick.call(void 0,{target:u.current,syntheticEvent:n})},[e.onClick,o.onClick,u]),M=l.useCallback(n=>{e.onDoubleClick&&e.onDoubleClick.call(void 0,n),o.onDoubleClick&&o.onDoubleClick.call(void 0,{target:u.current,syntheticEvent:n})},[e.onDoubleClick,o.onDoubleClick,u]),a=l.useCallback(n=>{e.onMouseEnter&&e.onMouseEnter.call(void 0,n),o.onMouseEnter&&o.onMouseEnter.call(void 0,{target:u.current,syntheticEvent:n})},[e.onMouseEnter,o.onMouseEnter,u]),t=l.useCallback(n=>{e.onMouseLeave&&e.onMouseLeave.call(void 0,n),o.onMouseLeave&&o.onMouseLeave.call(void 0,{target:u.current,syntheticEvent:n})},[e.onMouseLeave,o.onMouseLeave,u]),v=l.useCallback(n=>{e.onMouseMove&&e.onMouseMove.call(void 0,n),o.onMouseMove&&o.onMouseMove.call(void 0,{target:u.current,syntheticEvent:n})},[e.onMouseMove,o.onMouseMove,u]),f=l.useCallback(n=>{e.onMouseOut&&e.onMouseOut.call(void 0,n),o.onMouseOut&&o.onMouseOut.call(void 0,{target:u.current,syntheticEvent:n})},[e.onMouseOut,o.onMouseOut,u]),k=l.useCallback(n=>{e.onMouseOver&&e.onMouseOver.call(void 0,n),o.onMouseOver&&o.onMouseOver.call(void 0,{target:u.current,syntheticEvent:n})},[e.onMouseOver,o.onMouseOver,u]);return{onClick:s,onMouseUp:i,onMouseDown:c,onDoubleClick:M,onMouseEnter:a,onMouseLeave:t,onMouseMove:v,onMouseOut:f,onMouseOver:k}};exports.useMouse=r;
|
|
@@ -0,0 +1,98 @@
|
|
|
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
|
+
const h = (o, l, u = {}) => {
|
|
11
|
+
const c = e.useCallback(
|
|
12
|
+
(n) => {
|
|
13
|
+
u.onMouseDown && u.onMouseDown.call(void 0, n), o.onMouseDown && o.onMouseDown.call(void 0, {
|
|
14
|
+
target: l.current,
|
|
15
|
+
syntheticEvent: n
|
|
16
|
+
});
|
|
17
|
+
},
|
|
18
|
+
[u.onMouseDown, o.onMouseDown, l]
|
|
19
|
+
), M = e.useCallback(
|
|
20
|
+
(n) => {
|
|
21
|
+
u.onMouseUp && u.onMouseUp.call(void 0, n), o.onMouseUp && o.onMouseUp.call(void 0, {
|
|
22
|
+
target: l.current,
|
|
23
|
+
syntheticEvent: n
|
|
24
|
+
});
|
|
25
|
+
},
|
|
26
|
+
[u.onMouseUp, o.onMouseUp, l]
|
|
27
|
+
), i = e.useCallback(
|
|
28
|
+
(n) => {
|
|
29
|
+
u.onClick && u.onClick.call(void 0, n), o.onClick && o.onClick.call(void 0, {
|
|
30
|
+
target: l.current,
|
|
31
|
+
syntheticEvent: n
|
|
32
|
+
});
|
|
33
|
+
},
|
|
34
|
+
[u.onClick, o.onClick, l]
|
|
35
|
+
), s = e.useCallback(
|
|
36
|
+
(n) => {
|
|
37
|
+
u.onDoubleClick && u.onDoubleClick.call(void 0, n), o.onDoubleClick && o.onDoubleClick.call(void 0, {
|
|
38
|
+
target: l.current,
|
|
39
|
+
syntheticEvent: n
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
[u.onDoubleClick, o.onDoubleClick, l]
|
|
43
|
+
), a = e.useCallback(
|
|
44
|
+
(n) => {
|
|
45
|
+
u.onMouseEnter && u.onMouseEnter.call(void 0, n), o.onMouseEnter && o.onMouseEnter.call(void 0, {
|
|
46
|
+
target: l.current,
|
|
47
|
+
syntheticEvent: n
|
|
48
|
+
});
|
|
49
|
+
},
|
|
50
|
+
[u.onMouseEnter, o.onMouseEnter, l]
|
|
51
|
+
), v = e.useCallback(
|
|
52
|
+
(n) => {
|
|
53
|
+
u.onMouseLeave && u.onMouseLeave.call(void 0, n), o.onMouseLeave && o.onMouseLeave.call(void 0, {
|
|
54
|
+
target: l.current,
|
|
55
|
+
syntheticEvent: n
|
|
56
|
+
});
|
|
57
|
+
},
|
|
58
|
+
[u.onMouseLeave, o.onMouseLeave, l]
|
|
59
|
+
), k = e.useCallback(
|
|
60
|
+
(n) => {
|
|
61
|
+
u.onMouseMove && u.onMouseMove.call(void 0, n), o.onMouseMove && o.onMouseMove.call(void 0, {
|
|
62
|
+
target: l.current,
|
|
63
|
+
syntheticEvent: n
|
|
64
|
+
});
|
|
65
|
+
},
|
|
66
|
+
[u.onMouseMove, o.onMouseMove, l]
|
|
67
|
+
), C = e.useCallback(
|
|
68
|
+
(n) => {
|
|
69
|
+
u.onMouseOut && u.onMouseOut.call(void 0, n), o.onMouseOut && o.onMouseOut.call(void 0, {
|
|
70
|
+
target: l.current,
|
|
71
|
+
syntheticEvent: n
|
|
72
|
+
});
|
|
73
|
+
},
|
|
74
|
+
[u.onMouseOut, o.onMouseOut, l]
|
|
75
|
+
), f = e.useCallback(
|
|
76
|
+
(n) => {
|
|
77
|
+
u.onMouseOver && u.onMouseOver.call(void 0, n), o.onMouseOver && o.onMouseOver.call(void 0, {
|
|
78
|
+
target: l.current,
|
|
79
|
+
syntheticEvent: n
|
|
80
|
+
});
|
|
81
|
+
},
|
|
82
|
+
[u.onMouseOver, o.onMouseOver, l]
|
|
83
|
+
);
|
|
84
|
+
return {
|
|
85
|
+
onClick: i,
|
|
86
|
+
onMouseUp: M,
|
|
87
|
+
onMouseDown: c,
|
|
88
|
+
onDoubleClick: s,
|
|
89
|
+
onMouseEnter: a,
|
|
90
|
+
onMouseLeave: v,
|
|
91
|
+
onMouseMove: k,
|
|
92
|
+
onMouseOut: C,
|
|
93
|
+
onMouseOver: f
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
export {
|
|
97
|
+
h as useMouse
|
|
98
|
+
};
|
|
@@ -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 r=require("react");function c(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const s=c(r),a=(e,t)=>s.useContext(e)(t);exports.usePropsContext=a;
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
const n = (t, o) => e.useContext(t)(o);
|
|
11
|
+
export {
|
|
12
|
+
n as usePropsContext
|
|
13
|
+
};
|
package/hooks/useRtl.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.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react");function a(e){const r=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(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const o=a(i);function s(e,r,t){const[n,u]=o.useState(r);return o.useEffect(()=>{if(!n&&window&&e.current){const c=window.getComputedStyle(e.current).direction;c&&u(c)}},t),n}exports.useRtl=s;
|
package/hooks/useRtl.mjs
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
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 i from "react";
|
|
10
|
+
function u(t, n, o) {
|
|
11
|
+
const [e, c] = i.useState(n);
|
|
12
|
+
return i.useEffect(
|
|
13
|
+
() => {
|
|
14
|
+
if (!e && window && t.current) {
|
|
15
|
+
const r = window.getComputedStyle(t.current).direction;
|
|
16
|
+
r && c(r);
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
o
|
|
20
|
+
), e;
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
u as useRtl
|
|
24
|
+
};
|
|
@@ -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"),u=require("./useDocument.js");function r(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const i=r(c),s=e=>{const t=u.useDocument(e);return i.useCallback(()=>{const o=t();return o&&o.defaultView||window},[t])};exports.useWindow=s;
|
|
@@ -0,0 +1,20 @@
|
|
|
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 n from "react";
|
|
10
|
+
import { useDocument as c } from "./useDocument.mjs";
|
|
11
|
+
const r = (o) => {
|
|
12
|
+
const t = c(o);
|
|
13
|
+
return n.useCallback(() => {
|
|
14
|
+
const e = t();
|
|
15
|
+
return e && e.defaultView || window;
|
|
16
|
+
}, [t]);
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
r as useWindow
|
|
20
|
+
};
|
package/icons/Icon.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.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react"),r=require("prop-types"),z=require("../classNames.js"),I=require("./constants.js"),N=require("./utils.js"),P=require("../hooks/useMouse.js");function S(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(n,s,o.get?o:{enumerable:!0,get:()=>t[s]})}}return n.default=t,Object.freeze(n)}const e=S(x),i=e.forwardRef((t,n)=>{const{className:s,name:o,themeColor:l,size:u,flip:f,style:g,id:b,tabIndex:y,...h}=t,c=e.useRef(null),m=e.useRef(null);e.useImperativeHandle(c,()=>({element:m.current})),e.useImperativeHandle(n,()=>c.current);const p=e.useMemo(()=>u||d.size,[u]),a=e.useMemo(()=>f||d.flip,[f]),O=e.useMemo(()=>z.classNames("k-icon","k-font-icon",o&&N.toIconClass(o),{[`k-color-${l}`]:l,"k-flip-h":a==="horizontal"||a==="both","k-flip-v":a==="vertical"||a==="both"},I.SIZE_CLASSES[p],s),[o,l,p,a,s]),v=P.useMouse(t,c);return e.createElement("span",{ref:m,...h,...v,className:O,id:b,tabIndex:y,style:g,role:"presentation"})});i.propTypes={style:r.object,classNames:r.string,name:r.string,themeColor:r.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:r.oneOf(["default","xsmall","small","medium","large","xlarge","xxlarge","xxxlarge"]),flip:r.oneOf(["default","horizontal","vertical","both"])};const d={size:"default",flip:"default"};i.displayName="KendoIcon";exports.Icon=i;
|
package/icons/Icon.mjs
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
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 o from "prop-types";
|
|
11
|
+
import { classNames as k } from "../classNames.mjs";
|
|
12
|
+
import { SIZE_CLASSES as v } from "./constants.mjs";
|
|
13
|
+
import { toIconClass as N } from "./utils.mjs";
|
|
14
|
+
import { useMouse as b } from "../hooks/useMouse.mjs";
|
|
15
|
+
const u = e.forwardRef((a, d) => {
|
|
16
|
+
const {
|
|
17
|
+
className: n,
|
|
18
|
+
name: s,
|
|
19
|
+
themeColor: t,
|
|
20
|
+
size: i,
|
|
21
|
+
flip: m,
|
|
22
|
+
style: h,
|
|
23
|
+
id: g,
|
|
24
|
+
tabIndex: x,
|
|
25
|
+
...y
|
|
26
|
+
} = a, l = e.useRef(null), c = e.useRef(null);
|
|
27
|
+
e.useImperativeHandle(l, () => ({
|
|
28
|
+
element: c.current
|
|
29
|
+
})), e.useImperativeHandle(d, () => l.current);
|
|
30
|
+
const f = e.useMemo(
|
|
31
|
+
() => i || p.size,
|
|
32
|
+
[i]
|
|
33
|
+
), r = e.useMemo(
|
|
34
|
+
() => m || p.flip,
|
|
35
|
+
[m]
|
|
36
|
+
), z = e.useMemo(
|
|
37
|
+
() => k(
|
|
38
|
+
"k-icon",
|
|
39
|
+
"k-font-icon",
|
|
40
|
+
s && N(s),
|
|
41
|
+
{
|
|
42
|
+
[`k-color-${t}`]: t,
|
|
43
|
+
"k-flip-h": r === "horizontal" || r === "both",
|
|
44
|
+
"k-flip-v": r === "vertical" || r === "both"
|
|
45
|
+
},
|
|
46
|
+
v[f],
|
|
47
|
+
n
|
|
48
|
+
),
|
|
49
|
+
[s, t, f, r, n]
|
|
50
|
+
), I = b(a, l);
|
|
51
|
+
return /* @__PURE__ */ e.createElement(
|
|
52
|
+
"span",
|
|
53
|
+
{
|
|
54
|
+
ref: c,
|
|
55
|
+
...y,
|
|
56
|
+
...I,
|
|
57
|
+
className: z,
|
|
58
|
+
id: g,
|
|
59
|
+
tabIndex: x,
|
|
60
|
+
style: h,
|
|
61
|
+
role: "presentation"
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
});
|
|
65
|
+
u.propTypes = {
|
|
66
|
+
style: o.object,
|
|
67
|
+
classNames: o.string,
|
|
68
|
+
name: o.string,
|
|
69
|
+
themeColor: o.oneOf([
|
|
70
|
+
"inherit",
|
|
71
|
+
"primary",
|
|
72
|
+
"secondary",
|
|
73
|
+
"tertiary",
|
|
74
|
+
"info",
|
|
75
|
+
"success",
|
|
76
|
+
"error",
|
|
77
|
+
"warning",
|
|
78
|
+
"dark",
|
|
79
|
+
"light",
|
|
80
|
+
"inverse"
|
|
81
|
+
]),
|
|
82
|
+
size: o.oneOf(["default", "xsmall", "small", "medium", "large", "xlarge", "xxlarge", "xxxlarge"]),
|
|
83
|
+
flip: o.oneOf(["default", "horizontal", "vertical", "both"])
|
|
84
|
+
};
|
|
85
|
+
const p = {
|
|
86
|
+
size: "default",
|
|
87
|
+
flip: "default"
|
|
88
|
+
};
|
|
89
|
+
u.displayName = "KendoIcon";
|
|
90
|
+
export {
|
|
91
|
+
u as Icon
|
|
92
|
+
};
|
|
@@ -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 g=require("react"),m=require("./Icon.js"),d=require("./SvgIcon.js"),I=require("./IconsContext.js");function y(e){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const t=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(c,o,t.get?t:{enumerable:!0,get:()=>e[o]})}}return c.default=e,Object.freeze(c)}const r=y(g),u=r.forwardRef((e,c)=>{var i,s;const{type:o,icons:t}=r.useContext(I.IconsContext),{icon:l,...f}=e;let n=o==="svg"?((i=e.icon)==null?void 0:i.name)||e.name:e.name||((s=e.icon)==null?void 0:s.name);n=n&&t&&t[n]&&typeof t[n]=="string"?t[n]:n;const a=n&&t&&t[n]&&typeof t[n]!="string"?t[n]:l;return o==="svg"&&a?r.createElement(d.SvgIcon,{...e,icon:a,ref:c}):r.createElement(m.Icon,{...f,name:n,ref:c})});u.displayName="KendoIconWrap";exports.IconWrap=u;
|
|
@@ -0,0 +1,24 @@
|
|
|
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 t from "react";
|
|
10
|
+
import { Icon as g } from "./Icon.mjs";
|
|
11
|
+
import { SvgIcon as I } from "./SvgIcon.mjs";
|
|
12
|
+
import { IconsContext as l } from "./IconsContext.mjs";
|
|
13
|
+
const v = t.forwardRef((o, c) => {
|
|
14
|
+
var r, i;
|
|
15
|
+
const { type: m, icons: e } = t.useContext(l), { icon: s, ...f } = o;
|
|
16
|
+
let n = m === "svg" ? ((r = o.icon) == null ? void 0 : r.name) || o.name : o.name || ((i = o.icon) == null ? void 0 : i.name);
|
|
17
|
+
n = n && e && e[n] && typeof e[n] == "string" ? e[n] : n;
|
|
18
|
+
const a = n && e && e[n] && typeof e[n] != "string" ? e[n] : s;
|
|
19
|
+
return m === "svg" && a ? /* @__PURE__ */ t.createElement(I, { ...o, icon: a, ref: c }) : /* @__PURE__ */ t.createElement(g, { ...f, name: n, ref: c });
|
|
20
|
+
});
|
|
21
|
+
v.displayName = "KendoIconWrap";
|
|
22
|
+
export {
|
|
23
|
+
v as IconWrap
|
|
24
|
+
};
|
|
@@ -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 r=require("react");function a(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const s=a(r),c=s.createContext({type:"svg"});c.displayName="KendoReactIconsContext";exports.IconsContext=c;
|
|
@@ -0,0 +1,14 @@
|
|
|
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 t from "react";
|
|
10
|
+
const e = t.createContext({ type: "svg" });
|
|
11
|
+
e.displayName = "KendoReactIconsContext";
|
|
12
|
+
export {
|
|
13
|
+
e as IconsContext
|
|
14
|
+
};
|
package/icons/SvgIcon.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.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("react"),n=require("prop-types"),j=require("../classNames.js"),I=require("./constants.js");function B(e){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const l=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(s,o,l.get?l:{enumerable:!0,get:()=>e[o]})}}return s.default=e,Object.freeze(s)}const t=B(z),u=t.forwardRef((e,s)=>{const{children:o,className:l,svgClassName:y,icon:i,flip:d,id:b,tabIndex:x,size:m,style:r,svgStyle:S,themeColor:h,viewBox:f,name:C,onClick:N,...k}=e,g=t.useRef(null);t.useImperativeHandle(s,()=>({element:g.current}));const v=t.useMemo(()=>i?i.name:c.icon,[i]),w=t.useMemo(()=>m||c.size,[m]),a=t.useMemo(()=>d||c.flip,[d]),M=t.useMemo(()=>f||c.viewBox,[f]),O=t.useMemo(()=>j.classNames("k-icon","k-svg-icon","k-svg-i-"+v,{[`k-color-${h}`]:h,"k-flip-h":a==="horizontal"||a==="both","k-flip-v":a==="vertical"||a==="both"},I.SIZE_CLASSES[w],l),[v,h,w,a,l]),P=t.useMemo(()=>e.width&&e.height?{width:e.width,height:e.height,...r}:e.width?{width:e.width,height:e.width,...r}:e.height?{width:e.height,height:e.height,...r}:{...r},[e.width,e.height,r]);return t.createElement("span",{className:O,style:P,ref:g,onClick:N,"aria-hidden":!0},t.createElement("svg",{id:b,className:y,style:S,"aria-hidden":!0,tabIndex:x,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:i?i.viewBox:M,dangerouslySetInnerHTML:i?{__html:i.content}:void 0,...k},i?void 0:o))});u.propTypes={style:n.object,classNames:n.string,children:n.any,icon:n.object,themeColor:n.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:n.oneOf(["default","xsmall","small","medium","large","xlarge","xxlarge","xxxlarge"]),flip:n.oneOf(["default","horizontal","vertical","both"])};const c={size:"default",flip:"default",icon:"",viewBox:"0 0 24 24"};u.displayName="KendoSvgIcon";exports.SvgIcon=u;
|
|
@@ -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 t from "react";
|
|
10
|
+
import o from "prop-types";
|
|
11
|
+
import { classNames as C } from "../classNames.mjs";
|
|
12
|
+
import { SIZE_CLASSES as I } from "./constants.mjs";
|
|
13
|
+
const g = t.forwardRef((e, v) => {
|
|
14
|
+
const {
|
|
15
|
+
children: w,
|
|
16
|
+
className: r,
|
|
17
|
+
svgClassName: x,
|
|
18
|
+
icon: i,
|
|
19
|
+
flip: h,
|
|
20
|
+
id: y,
|
|
21
|
+
tabIndex: N,
|
|
22
|
+
size: c,
|
|
23
|
+
style: l,
|
|
24
|
+
svgStyle: S,
|
|
25
|
+
themeColor: a,
|
|
26
|
+
viewBox: m,
|
|
27
|
+
name: P,
|
|
28
|
+
onClick: k,
|
|
29
|
+
...b
|
|
30
|
+
} = e, d = t.useRef(null);
|
|
31
|
+
t.useImperativeHandle(
|
|
32
|
+
v,
|
|
33
|
+
() => ({
|
|
34
|
+
element: d.current
|
|
35
|
+
})
|
|
36
|
+
);
|
|
37
|
+
const f = t.useMemo(
|
|
38
|
+
() => i ? i.name : s.icon,
|
|
39
|
+
[i]
|
|
40
|
+
), u = t.useMemo(
|
|
41
|
+
() => c || s.size,
|
|
42
|
+
[c]
|
|
43
|
+
), n = t.useMemo(
|
|
44
|
+
() => h || s.flip,
|
|
45
|
+
[h]
|
|
46
|
+
), z = t.useMemo(
|
|
47
|
+
() => m || s.viewBox,
|
|
48
|
+
[m]
|
|
49
|
+
), M = t.useMemo(
|
|
50
|
+
() => C(
|
|
51
|
+
"k-icon",
|
|
52
|
+
"k-svg-icon",
|
|
53
|
+
"k-svg-i-" + f,
|
|
54
|
+
{
|
|
55
|
+
[`k-color-${a}`]: a,
|
|
56
|
+
"k-flip-h": n === "horizontal" || n === "both",
|
|
57
|
+
"k-flip-v": n === "vertical" || n === "both"
|
|
58
|
+
},
|
|
59
|
+
I[u],
|
|
60
|
+
r
|
|
61
|
+
),
|
|
62
|
+
[f, a, u, n, r]
|
|
63
|
+
), B = t.useMemo(
|
|
64
|
+
() => e.width && e.height ? { width: e.width, height: e.height, ...l } : e.width ? { width: e.width, height: e.width, ...l } : e.height ? { width: e.height, height: e.height, ...l } : { ...l },
|
|
65
|
+
[e.width, e.height, l]
|
|
66
|
+
);
|
|
67
|
+
return /* @__PURE__ */ t.createElement(
|
|
68
|
+
"span",
|
|
69
|
+
{
|
|
70
|
+
className: M,
|
|
71
|
+
style: B,
|
|
72
|
+
ref: d,
|
|
73
|
+
onClick: k,
|
|
74
|
+
"aria-hidden": !0
|
|
75
|
+
},
|
|
76
|
+
/* @__PURE__ */ t.createElement(
|
|
77
|
+
"svg",
|
|
78
|
+
{
|
|
79
|
+
id: y,
|
|
80
|
+
className: x,
|
|
81
|
+
style: S,
|
|
82
|
+
"aria-hidden": !0,
|
|
83
|
+
tabIndex: N,
|
|
84
|
+
focusable: !1,
|
|
85
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
86
|
+
viewBox: i ? i.viewBox : z,
|
|
87
|
+
dangerouslySetInnerHTML: i ? { __html: i.content } : void 0,
|
|
88
|
+
...b
|
|
89
|
+
},
|
|
90
|
+
i ? void 0 : w
|
|
91
|
+
)
|
|
92
|
+
);
|
|
93
|
+
});
|
|
94
|
+
g.propTypes = {
|
|
95
|
+
style: o.object,
|
|
96
|
+
classNames: o.string,
|
|
97
|
+
children: o.any,
|
|
98
|
+
icon: o.object,
|
|
99
|
+
themeColor: o.oneOf([
|
|
100
|
+
"inherit",
|
|
101
|
+
"primary",
|
|
102
|
+
"secondary",
|
|
103
|
+
"tertiary",
|
|
104
|
+
"info",
|
|
105
|
+
"success",
|
|
106
|
+
"error",
|
|
107
|
+
"warning",
|
|
108
|
+
"dark",
|
|
109
|
+
"light",
|
|
110
|
+
"inverse"
|
|
111
|
+
]),
|
|
112
|
+
size: o.oneOf(["default", "xsmall", "small", "medium", "large", "xlarge", "xxlarge", "xxxlarge"]),
|
|
113
|
+
flip: o.oneOf(["default", "horizontal", "vertical", "both"])
|
|
114
|
+
};
|
|
115
|
+
const s = {
|
|
116
|
+
size: "default",
|
|
117
|
+
flip: "default",
|
|
118
|
+
icon: "",
|
|
119
|
+
viewBox: "0 0 24 24"
|
|
120
|
+
};
|
|
121
|
+
g.displayName = "KendoSvgIcon";
|
|
122
|
+
export {
|
|
123
|
+
g as SvgIcon
|
|
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 l={default:"",xsmall:"k-icon-xs",small:"k-icon-sm",medium:"k-icon-md",large:"k-icon-lg",xlarge:"k-icon-xl",xxlarge:"k-icon-xxl",xxxlarge:"k-icon-xxxl"};exports.SIZE_CLASSES=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
|
+
const x = {
|
|
10
|
+
default: "",
|
|
11
|
+
xsmall: "k-icon-xs",
|
|
12
|
+
small: "k-icon-sm",
|
|
13
|
+
medium: "k-icon-md",
|
|
14
|
+
large: "k-icon-lg",
|
|
15
|
+
xlarge: "k-icon-xl",
|
|
16
|
+
xxlarge: "k-icon-xxl",
|
|
17
|
+
xxxlarge: "k-icon-xxxl"
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
x as SIZE_CLASSES
|
|
21
|
+
};
|
package/icons/utils.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.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("prop-types"),s=o=>o.replace(/^k-i-/,""),t=o=>"k-i-"+o,n=e.shape({name:e.string.isRequired,content:e.string.isRequired,viewBox:e.string.isRequired});exports.svgIconPropType=n;exports.toIconClass=t;exports.toIconName=s;
|