@react-fabric/core 1.0.0-beta.5 → 1.0.0-beta.6
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/cjs/components/animations/Animations.js +12 -5
- package/dist/cjs/components/avatar/Avatar.js +6 -7
- package/dist/cjs/components/button/ConfirmButton.js +4 -2
- package/dist/cjs/components/card/Card.js +4 -2
- package/dist/cjs/components/collapsable/Collapsable.js +3 -2
- package/dist/cjs/components/dropdown/Dropdown.js +2 -1
- package/dist/cjs/components/dropdown/DropdownTool.js +3 -2
- package/dist/cjs/components/icon/Icon.js +7 -7
- package/dist/cjs/components/menu/ContextMenu.js +30 -10
- package/dist/cjs/components/menu/Menu.js +1 -1
- package/dist/cjs/components/navigator/Navigator.js +2 -0
- package/dist/cjs/components/panel/Panel.js +2 -0
- package/dist/cjs/components/tabpanel/Tab.js +54 -36
- package/dist/cjs/core/aside/Aside.js +3 -0
- package/dist/cjs/core/content/Content.js +8 -5
- package/dist/cjs/core/page/Page.js +1 -0
- package/dist/cjs/typography/Typography.module.css +1 -1
- package/dist/esm/components/animations/Animations.js +12 -5
- package/dist/esm/components/avatar/Avatar.js +7 -8
- package/dist/esm/components/button/ConfirmButton.js +4 -2
- package/dist/esm/components/card/Card.js +4 -2
- package/dist/esm/components/collapsable/Collapsable.js +3 -2
- package/dist/esm/components/dropdown/Dropdown.js +2 -1
- package/dist/esm/components/dropdown/DropdownTool.js +3 -2
- package/dist/esm/components/icon/Icon.js +7 -7
- package/dist/esm/components/menu/ContextMenu.js +32 -12
- package/dist/esm/components/menu/Menu.js +1 -1
- package/dist/esm/components/navigator/Navigator.js +2 -0
- package/dist/esm/components/panel/Panel.js +2 -0
- package/dist/esm/components/tabpanel/Tab.js +55 -37
- package/dist/esm/core/aside/Aside.js +3 -0
- package/dist/esm/core/content/Content.js +8 -5
- package/dist/esm/core/page/Page.js +1 -0
- package/dist/esm/typography/Typography.module.css +1 -1
- package/dist/types/components/actionLabel/ActionLabel.d.ts +2 -2
- package/dist/types/components/animations/Animations.d.ts +1 -1
- package/dist/types/components/button/ConfirmButton.d.ts +6 -1
- package/dist/types/components/card/Card.d.ts +3 -3
- package/dist/types/components/collapsable/Collapsable.d.ts +5 -1
- package/dist/types/components/dropdown/DropdownTool.d.ts +2 -1
- package/dist/types/components/media/Media.d.ts +2 -2
- package/dist/types/components/menu/ContextMenu.d.ts +2 -1
- package/dist/types/components/tabpanel/Tab.d.ts +4 -4
- package/dist/types/core/content/Content.d.ts +3 -2
- package/dist/types/types/index.d.ts +4 -0
- package/package.json +3 -3
- package/src/components/actionLabel/ActionLabel.tsx +12 -3
- package/src/components/animations/Animations.tsx +8 -2
- package/src/components/avatar/Avatar.tsx +68 -81
- package/src/components/button/ConfirmButton.tsx +10 -4
- package/src/components/card/Card.tsx +4 -0
- package/src/components/collapsable/Collapsable.tsx +6 -0
- package/src/components/dropdown/Dropdown.tsx +1 -0
- package/src/components/dropdown/DropdownTool.tsx +3 -1
- package/src/components/icon/Icon.tsx +45 -57
- package/src/components/media/Media.tsx +2 -2
- package/src/components/menu/ContextMenu.tsx +36 -11
- package/src/components/menu/Menu.tsx +1 -1
- package/src/components/navigator/Navigator.tsx +2 -0
- package/src/components/panel/Panel.tsx +2 -0
- package/src/components/tabpanel/Tab.tsx +73 -59
- package/src/core/aside/Aside.tsx +3 -0
- package/src/core/content/Content.tsx +16 -10
- package/src/core/page/Page.tsx +1 -0
- package/src/types/index.ts +5 -0
- package/src/typography/Typography.module.css +1 -1
|
@@ -6,8 +6,7 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
|
|
|
6
6
|
import { isSvgPath } from '@react-fabric/utilities';
|
|
7
7
|
import BoringAvatar from 'boring-avatars';
|
|
8
8
|
import classNames from 'classnames';
|
|
9
|
-
import { useState } from 'react';
|
|
10
|
-
import { useMemoDebugger } from '../../hooks/useEffectDebugger.js';
|
|
9
|
+
import { useState, useMemo } from 'react';
|
|
11
10
|
import { getColor, getBgClass, getColorClass } from '../../utils/getColor.js';
|
|
12
11
|
import classes from './Avatar.module.css';
|
|
13
12
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -49,7 +48,7 @@ var Avatar = function Avatar(_ref) {
|
|
|
49
48
|
setFallback = _useState2[1];
|
|
50
49
|
|
|
51
50
|
/** ***************** style map *******************/
|
|
52
|
-
var styles =
|
|
51
|
+
var styles = useMemo(function () {
|
|
53
52
|
var s = {};
|
|
54
53
|
if (bg) {
|
|
55
54
|
s.backgroundColor = getColor(bg);
|
|
@@ -64,10 +63,10 @@ var Avatar = function Avatar(_ref) {
|
|
|
64
63
|
s.fontSize = SizeMap[size];
|
|
65
64
|
}
|
|
66
65
|
return s;
|
|
67
|
-
}, [bg, color, size]
|
|
66
|
+
}, [bg, color, size]);
|
|
68
67
|
|
|
69
68
|
/** ***************** render icon *******************/
|
|
70
|
-
var avatarImage =
|
|
69
|
+
var avatarImage = useMemo(function () {
|
|
71
70
|
setFallback(!avatar);
|
|
72
71
|
return avatar && /*#__PURE__*/jsxs("div", {
|
|
73
72
|
className: "contents",
|
|
@@ -86,8 +85,8 @@ var Avatar = function Avatar(_ref) {
|
|
|
86
85
|
}
|
|
87
86
|
})]
|
|
88
87
|
});
|
|
89
|
-
}, [avatar]
|
|
90
|
-
var fallbackAvatar =
|
|
88
|
+
}, [avatar]);
|
|
89
|
+
var fallbackAvatar = useMemo(function () {
|
|
91
90
|
if (fallbackIcon) {
|
|
92
91
|
return isSvgPath(fallbackIcon) ? /*#__PURE__*/jsx("svg", {
|
|
93
92
|
viewBox: viewBox,
|
|
@@ -128,7 +127,7 @@ var Avatar = function Avatar(_ref) {
|
|
|
128
127
|
variant: variant,
|
|
129
128
|
name: name
|
|
130
129
|
});
|
|
131
|
-
}, [name, variant, fallbackIcon]
|
|
130
|
+
}, [name, variant, fallbackIcon]);
|
|
132
131
|
return /*#__PURE__*/jsxs("dfn", _objectSpread(_objectSpread({
|
|
133
132
|
role: "presentation",
|
|
134
133
|
className: classNames(classes.avatar, className, "select-none relative overflow-hidden inline-block box-content leading-none not-italic text-center", bg && getBgClass(bg), color && getColorClass(color), !rounded && "rounded", rounded && "rounded-full"),
|
|
@@ -11,7 +11,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
11
11
|
import { Button } from './Button.js';
|
|
12
12
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
13
13
|
|
|
14
|
-
var _excluded = ["ref", "message", "color", "okLabel", "cancelLabel", "onClick", "loading", "actionMessage", "showActionDone", "showActionDoneEvent"],
|
|
14
|
+
var _excluded = ["ref", "message", "color", "okLabel", "cancelLabel", "onClick", "loading", "placement", "actionMessage", "showActionDone", "showActionDoneEvent"],
|
|
15
15
|
_excluded2 = ["ref"];
|
|
16
16
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
17
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -26,6 +26,8 @@ var ConfirmButton = function ConfirmButton(_ref) {
|
|
|
26
26
|
cancelLabel = _ref.cancelLabel,
|
|
27
27
|
onClick = _ref.onClick,
|
|
28
28
|
loading = _ref.loading,
|
|
29
|
+
_ref$placement = _ref.placement,
|
|
30
|
+
placement = _ref$placement === void 0 ? "bottom" : _ref$placement,
|
|
29
31
|
actionMessage = _ref.actionMessage,
|
|
30
32
|
showActionDone = _ref.showActionDone,
|
|
31
33
|
_ref$showActionDoneEv = _ref.showActionDoneEvent,
|
|
@@ -77,7 +79,7 @@ var ConfirmButton = function ConfirmButton(_ref) {
|
|
|
77
79
|
}
|
|
78
80
|
},
|
|
79
81
|
strategy: "fixed",
|
|
80
|
-
placement:
|
|
82
|
+
placement: placement,
|
|
81
83
|
whileElementsMounted: autoUpdate,
|
|
82
84
|
middleware: [shift({
|
|
83
85
|
padding: 8
|
|
@@ -12,7 +12,7 @@ import { nodeCheck } from '../../utils/nodeCheck.js';
|
|
|
12
12
|
import classes from './Card.module.css';
|
|
13
13
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
14
14
|
|
|
15
|
-
var _excluded = ["children", "className", "bodyClassName", "selected", "selectedRibbon", "onClick", "flex", "draggable", "dragKey", "dragData"];
|
|
15
|
+
var _excluded = ["children", "className", "bodyClassName", "selected", "selectedRibbon", "onClick", "flex", "draggable", "dragKey", "dragData", "ref"];
|
|
16
16
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
17
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
18
|
var Card = function Card(_ref) {
|
|
@@ -26,6 +26,7 @@ var Card = function Card(_ref) {
|
|
|
26
26
|
draggable = _ref.draggable,
|
|
27
27
|
dragKey = _ref.dragKey,
|
|
28
28
|
dragData = _ref.dragData,
|
|
29
|
+
ref = _ref.ref,
|
|
29
30
|
aria = _objectWithoutProperties(_ref, _excluded);
|
|
30
31
|
var _useMemo = useMemo(function () {
|
|
31
32
|
return Children.toArray(children).reduce(function (ret, node) {
|
|
@@ -46,7 +47,8 @@ var Card = function Card(_ref) {
|
|
|
46
47
|
onDragStart: !draggable ? undefined : function (e) {
|
|
47
48
|
var _e$dataTransfer;
|
|
48
49
|
return dragKey && ((_e$dataTransfer = e.dataTransfer) === null || _e$dataTransfer === void 0 ? void 0 : _e$dataTransfer.setData(dragKey, JSON.stringify(dragData)));
|
|
49
|
-
}
|
|
50
|
+
},
|
|
51
|
+
ref: ref
|
|
50
52
|
}, aria), {}, {
|
|
51
53
|
children: [header, /*#__PURE__*/jsx("div", {
|
|
52
54
|
role: "none",
|
|
@@ -11,7 +11,7 @@ import { Icon } from '../icon/Icon.js';
|
|
|
11
11
|
import classes from './Collapsable.module.css';
|
|
12
12
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
13
13
|
|
|
14
|
-
var _excluded = ["ref", "disabled", "className", "bodyClassName", "headerClassName", "children", "iconAlign", "iconClosed", "iconOpen", "open", "onClose", "onOpen"];
|
|
14
|
+
var _excluded = ["ref", "disabled", "className", "bodyClassName", "headerClassName", "children", "iconAlign", "stickyHeader", "iconClosed", "iconOpen", "open", "onClose", "onOpen"];
|
|
15
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
17
|
var Collapsable = function Collapsable(_ref) {
|
|
@@ -22,6 +22,7 @@ var Collapsable = function Collapsable(_ref) {
|
|
|
22
22
|
headerClassName = _ref.headerClassName,
|
|
23
23
|
children = _ref.children,
|
|
24
24
|
iconAlign = _ref.iconAlign,
|
|
25
|
+
stickyHeader = _ref.stickyHeader,
|
|
25
26
|
_ref$iconClosed = _ref.iconClosed,
|
|
26
27
|
iconClosed = _ref$iconClosed === void 0 ? CoreIcons.chevronRight : _ref$iconClosed,
|
|
27
28
|
_ref$iconOpen = _ref.iconOpen,
|
|
@@ -62,7 +63,7 @@ var Collapsable = function Collapsable(_ref) {
|
|
|
62
63
|
children: [/*#__PURE__*/jsxs("div", {
|
|
63
64
|
role: "none",
|
|
64
65
|
ref: headRef,
|
|
65
|
-
className: classNames(classes.collapsableHead, "flex gap-1 flex-nowrap py-2 font-medium cursor-pointer items-center select-none hover:opacity-70", headerClassName, iconAlign === "end" ? "flex-row-reverse" : "flex-row"),
|
|
66
|
+
className: classNames(classes.collapsableHead, "flex gap-1 flex-nowrap py-2 font-medium cursor-pointer items-center select-none hover:opacity-70", headerClassName, stickyHeader && "bg-base sticky top-0 px-2 py-1 z-10", iconAlign === "end" ? "flex-row-reverse" : "flex-row"),
|
|
66
67
|
onClick: function onClick() {
|
|
67
68
|
return !disabled && setOpenState(!openState);
|
|
68
69
|
},
|
|
@@ -131,7 +131,8 @@ var DropdownElement = function DropdownElement(_ref) {
|
|
|
131
131
|
style: _objectSpread({
|
|
132
132
|
minWidth: minWidth,
|
|
133
133
|
zIndex: "var(--z-popover)"
|
|
134
|
-
}, floatingStyles)
|
|
134
|
+
}, floatingStyles),
|
|
135
|
+
"data-testid": "dropdown-body"
|
|
135
136
|
}, getFloatingProps({
|
|
136
137
|
onClick: function onClick(e) {
|
|
137
138
|
return e.stopPropagation();
|
|
@@ -8,17 +8,18 @@ import { Icon } from '../icon/Icon.js';
|
|
|
8
8
|
import { Dropdown } from './Dropdown.js';
|
|
9
9
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
10
10
|
|
|
11
|
-
var _excluded = ["children", "className", "groupHover"];
|
|
11
|
+
var _excluded = ["children", "className", "groupHover", "icon"];
|
|
12
12
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
13
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
14
|
var DropdownTool = function DropdownTool(_ref) {
|
|
15
15
|
var children = _ref.children,
|
|
16
16
|
className = _ref.className,
|
|
17
17
|
groupHover = _ref.groupHover,
|
|
18
|
+
icon = _ref.icon,
|
|
18
19
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
19
20
|
return /*#__PURE__*/jsxs(Dropdown, _objectSpread(_objectSpread({}, props), {}, {
|
|
20
21
|
children: [/*#__PURE__*/jsx(Icon, {
|
|
21
|
-
icon: CoreIcons.caretDown,
|
|
22
|
+
icon: icon !== null && icon !== void 0 ? icon : CoreIcons.caretDown,
|
|
22
23
|
className: classNames(className, "outline bg-base flex-content pointer-events-auto cursor-pointer", groupHover && "hidden group-hover:inline-block data-[dropdown-open]:inline-block")
|
|
23
24
|
}), children]
|
|
24
25
|
}));
|
|
@@ -4,7 +4,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
4
4
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
5
5
|
import { isSvgPath, isString } from '@react-fabric/utilities';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
|
-
import {
|
|
7
|
+
import { useMemo } from 'react';
|
|
8
8
|
import { getColor, getBgClass, getColorClass } from '../../utils/getColor.js';
|
|
9
9
|
import classes from './Icon.module.css';
|
|
10
10
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -40,7 +40,7 @@ var Icon = function Icon(_ref) {
|
|
|
40
40
|
onClick = _ref.onClick,
|
|
41
41
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
42
42
|
/** ***************** style map *******************/
|
|
43
|
-
var styles =
|
|
43
|
+
var styles = useMemo(function () {
|
|
44
44
|
var s = {};
|
|
45
45
|
if (bg) {
|
|
46
46
|
s.backgroundColor = getColor(bg);
|
|
@@ -55,15 +55,15 @@ var Icon = function Icon(_ref) {
|
|
|
55
55
|
s.fontSize = SizeMap[size];
|
|
56
56
|
}
|
|
57
57
|
return s;
|
|
58
|
-
}, [bg, color, size]
|
|
58
|
+
}, [bg, color, size]);
|
|
59
59
|
|
|
60
60
|
/** ***************** check if icon is svg path *******************/
|
|
61
|
-
var isSvg =
|
|
61
|
+
var isSvg = useMemo(function () {
|
|
62
62
|
return isSvgPath(icon);
|
|
63
|
-
}, [icon]
|
|
63
|
+
}, [icon]);
|
|
64
64
|
|
|
65
65
|
/** ***************** render icon *******************/
|
|
66
|
-
var iconEl =
|
|
66
|
+
var iconEl = useMemo(function () {
|
|
67
67
|
var _SvgTextSize$icon$len;
|
|
68
68
|
if (!isString(icon)) {
|
|
69
69
|
throw Error("Invalid icon expected string");
|
|
@@ -90,7 +90,7 @@ var Icon = function Icon(_ref) {
|
|
|
90
90
|
}) : /*#__PURE__*/jsx("i", {
|
|
91
91
|
className: "".concat(icon)
|
|
92
92
|
});
|
|
93
|
-
}, [icon, isSvg, viewBox]
|
|
93
|
+
}, [icon, isSvg, viewBox]);
|
|
94
94
|
return /*#__PURE__*/jsx("dfn", _objectSpread(_objectSpread({}, rest), {}, {
|
|
95
95
|
ref: ref,
|
|
96
96
|
role: "presentation",
|
|
@@ -2,22 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
4
4
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
5
|
-
import { useFloating, autoUpdate, offset, flip, useClick, useDismiss, useInteractions, FloatingPortal } from '@floating-ui/react';
|
|
6
|
-
import { useState, useRef, cloneElement } from 'react';
|
|
5
|
+
import { useFloatingNodeId, useFloating, autoUpdate, offset, flip, useClick, useDismiss, useInteractions, FloatingPortal } from '@floating-ui/react';
|
|
6
|
+
import { useState, useRef, useEffect, cloneElement } from 'react';
|
|
7
7
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
8
|
|
|
9
9
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10
10
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
11
|
var ContextMenu = function ContextMenu(_ref) {
|
|
12
|
+
var _refs$domReference$cu, _refs$domReference$cu2;
|
|
12
13
|
var children = _ref.children,
|
|
13
|
-
menu = _ref.menu
|
|
14
|
+
menu = _ref.menu,
|
|
15
|
+
disabled = _ref.disabled;
|
|
14
16
|
var _useState = useState(false),
|
|
15
17
|
_useState2 = _slicedToArray(_useState, 2),
|
|
16
18
|
isOpen = _useState2[0],
|
|
17
19
|
setIsOpen = _useState2[1];
|
|
20
|
+
var nodeId = useFloatingNodeId();
|
|
18
21
|
var _useFloating = useFloating({
|
|
19
22
|
open: isOpen,
|
|
20
|
-
|
|
23
|
+
nodeId: nodeId,
|
|
24
|
+
onOpenChange: function onOpenChange(open, evt, reason) {
|
|
25
|
+
var target = evt === null || evt === void 0 ? void 0 : evt.target;
|
|
26
|
+
if (!(target !== null && target !== void 0 && target.closest(".menu-list"))) setIsOpen(open);
|
|
27
|
+
},
|
|
21
28
|
strategy: "fixed",
|
|
22
29
|
placement: "bottom-start",
|
|
23
30
|
whileElementsMounted: autoUpdate,
|
|
@@ -26,8 +33,13 @@ var ContextMenu = function ContextMenu(_ref) {
|
|
|
26
33
|
refs = _useFloating.refs,
|
|
27
34
|
floatingStyles = _useFloating.floatingStyles,
|
|
28
35
|
context = _useFloating.context;
|
|
29
|
-
var click = useClick(context, {
|
|
30
|
-
|
|
36
|
+
var click = useClick(context, {
|
|
37
|
+
toggle: true,
|
|
38
|
+
ignoreMouse: true
|
|
39
|
+
});
|
|
40
|
+
var dismiss = useDismiss(context, {
|
|
41
|
+
bubbles: true
|
|
42
|
+
});
|
|
31
43
|
var _useInteractions = useInteractions([dismiss, click]),
|
|
32
44
|
getFloatingProps = _useInteractions.getFloatingProps;
|
|
33
45
|
var handleClick = useRef(function (e) {
|
|
@@ -51,11 +63,18 @@ var ContextMenu = function ContextMenu(_ref) {
|
|
|
51
63
|
e.preventDefault();
|
|
52
64
|
return false;
|
|
53
65
|
});
|
|
54
|
-
var wrapperRef = useRef(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
66
|
+
var wrapperRef = useRef(null);
|
|
67
|
+
useEffect(function () {
|
|
68
|
+
var el = wrapperRef.current;
|
|
69
|
+
if (el && !disabled) {
|
|
70
|
+
var _el$parentElement;
|
|
71
|
+
el === null || el === void 0 || (_el$parentElement = el.parentElement) === null || _el$parentElement === void 0 || _el$parentElement.addEventListener("contextmenu", handleClick.current);
|
|
72
|
+
return function () {
|
|
73
|
+
var _el$parentElement2;
|
|
74
|
+
el === null || el === void 0 || (_el$parentElement2 = el.parentElement) === null || _el$parentElement2 === void 0 || _el$parentElement2.removeEventListener("contextmenu", handleClick.current);
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
}, [disabled]);
|
|
59
78
|
var tryClosing = useRef(function (e) {
|
|
60
79
|
var _e$target;
|
|
61
80
|
if ((_e$target = e.target) !== null && _e$target !== void 0 && _e$target.closest("[data-dropdown-dismiss='true']")) setTimeout(function () {
|
|
@@ -64,9 +83,10 @@ var ContextMenu = function ContextMenu(_ref) {
|
|
|
64
83
|
});
|
|
65
84
|
return /*#__PURE__*/jsxs("div", {
|
|
66
85
|
className: "contents",
|
|
67
|
-
ref: wrapperRef
|
|
86
|
+
ref: wrapperRef,
|
|
68
87
|
onMouseUpCapture: tryClosing.current,
|
|
69
88
|
children: [children, isOpen && /*#__PURE__*/jsx(FloatingPortal, {
|
|
89
|
+
root: (_refs$domReference$cu = (_refs$domReference$cu2 = refs.domReference.current) === null || _refs$domReference$cu2 === void 0 ? void 0 : _refs$domReference$cu2.closest(".theme-base")) !== null && _refs$domReference$cu !== void 0 ? _refs$domReference$cu : undefined,
|
|
70
90
|
children: /*#__PURE__*/cloneElement(menu, _objectSpread(_objectSpread({}, getFloatingProps()), {}, {
|
|
71
91
|
style: _objectSpread(_objectSpread({}, floatingStyles), {}, {
|
|
72
92
|
borderRadius: "var(--rounding)",
|
|
@@ -163,7 +163,7 @@ var MenuComponent = function MenuComponent(_ref) {
|
|
|
163
163
|
children: /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({
|
|
164
164
|
className: classNames(menuClassName, "flex flex-col bg-base p-1 menu-list", isNested && "outline shadow-lg rounded-capped max-h-96 overflow-auto scroll-thin z-[var(--z-popover)]"),
|
|
165
165
|
autoFocus: true,
|
|
166
|
-
ref: mergeRefs(
|
|
166
|
+
ref: mergeRefs(isNested ? refs.setFloating : ref)
|
|
167
167
|
}, getFloatingProps({
|
|
168
168
|
onClick: isNested ? undefined : handleClick
|
|
169
169
|
})), {}, {
|
|
@@ -34,6 +34,7 @@ var Navigator = function Navigator(_ref) {
|
|
|
34
34
|
color: color,
|
|
35
35
|
className: "text-[1em] p-1",
|
|
36
36
|
"aria-label": "previous",
|
|
37
|
+
"data-testid": "previous",
|
|
37
38
|
icon: CoreIcons.chevronLeft,
|
|
38
39
|
onClick: function onClick(e) {
|
|
39
40
|
return [e.stopPropagation(), onNavigate(-1)];
|
|
@@ -43,6 +44,7 @@ var Navigator = function Navigator(_ref) {
|
|
|
43
44
|
className: "text-[1em] p-1",
|
|
44
45
|
color: color,
|
|
45
46
|
"aria-label": "next",
|
|
47
|
+
"data-testid": "next",
|
|
46
48
|
icon: CoreIcons.chevronRight,
|
|
47
49
|
onClick: function onClick(e) {
|
|
48
50
|
return [e.stopPropagation(), onNavigate(1)];
|
|
@@ -74,6 +74,7 @@ var Panel = function Panel(_ref) {
|
|
|
74
74
|
children: [/*#__PURE__*/jsxs("header", {
|
|
75
75
|
role: "none",
|
|
76
76
|
className: classNames(classes.panelHeader, headerClassName, "flex flex-nowrap items-center area-head"),
|
|
77
|
+
"data-testid": "panel-header",
|
|
77
78
|
onClick: collapsable ? toggleCollapse : undefined,
|
|
78
79
|
children: [onBack && /*#__PURE__*/jsx(Icon, {
|
|
79
80
|
"data-ref": "panelBack",
|
|
@@ -116,6 +117,7 @@ var Panel = function Panel(_ref) {
|
|
|
116
117
|
})]
|
|
117
118
|
})]
|
|
118
119
|
}), (!collapsed || expanded) && /*#__PURE__*/jsxs("div", {
|
|
120
|
+
"data-testid": "panel-body",
|
|
119
121
|
className: classNames(classes.panelBody, "area-content grid overflow-hidden"),
|
|
120
122
|
children: [loading && /*#__PURE__*/jsx(Loading, {}), children]
|
|
121
123
|
})]
|
|
@@ -2,15 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
4
4
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
5
|
+
import { isString } from '@react-fabric/utilities';
|
|
5
6
|
import classNames from 'classnames';
|
|
6
|
-
import { useMemo } from 'react';
|
|
7
|
+
import { useMemo, Fragment } from 'react';
|
|
8
|
+
import '@babel/runtime/helpers/slicedToArray';
|
|
9
|
+
import '@floating-ui/react';
|
|
10
|
+
import 'react-i18next';
|
|
11
|
+
import '../../hooks/useEffectDebugger.js';
|
|
12
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
13
|
+
import '../../hotkeys/HotKeyWrapper.js';
|
|
14
|
+
import { Tooltip } from '../../overlays/tooltip/Tooltip.js';
|
|
7
15
|
import { getBadgeProps, Badge } from '../badge/Badge.js';
|
|
8
|
-
import { DropdownTool } from '../dropdown/DropdownTool.js';
|
|
9
16
|
import { Icon } from '../icon/Icon.js';
|
|
17
|
+
import '../../types/icons.js';
|
|
18
|
+
import { DropdownTool } from '../dropdown/DropdownTool.js';
|
|
10
19
|
import classes from './TabPanel.module.css';
|
|
11
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
12
20
|
|
|
13
|
-
var _excluded = ["ref", "as", "id", "className", "label", "icon", "iconBg", "iconColor", "rtlFlip", "badge", "disabled", "onClose", "active", "minimal", "onClick", "tabFlex", "color", "actions", "activeClassName"];
|
|
21
|
+
var _excluded = ["ref", "as", "id", "className", "label", "icon", "iconBg", "iconColor", "rtlFlip", "badge", "disabled", "onClose", "active", "minimal", "onClick", "tabFlex", "color", "actions", "tooltip", "activeClassName"];
|
|
14
22
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
23
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
24
|
var Tab = function Tab(_ref) {
|
|
@@ -32,46 +40,56 @@ var Tab = function Tab(_ref) {
|
|
|
32
40
|
tabFlex = _ref.tabFlex,
|
|
33
41
|
color = _ref.color,
|
|
34
42
|
actions = _ref.actions,
|
|
43
|
+
tooltip = _ref.tooltip,
|
|
35
44
|
activeClassName = _ref.activeClassName,
|
|
36
45
|
aria = _objectWithoutProperties(_ref, _excluded);
|
|
37
46
|
var badgeProps = useMemo(function () {
|
|
38
47
|
return getBadgeProps(badge);
|
|
39
48
|
}, [badge]);
|
|
49
|
+
var tooltipProps = useMemo(function () {
|
|
50
|
+
if (isString(tooltip)) return {
|
|
51
|
+
content: tooltip
|
|
52
|
+
};
|
|
53
|
+
return tooltip !== null && tooltip !== void 0 ? tooltip : {};
|
|
54
|
+
}, [tooltip]);
|
|
40
55
|
var E = as !== null && as !== void 0 ? as : "button";
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}, aria), {}, {
|
|
51
|
-
children: [icon && /*#__PURE__*/jsx(Icon, {
|
|
52
|
-
icon: icon,
|
|
53
|
-
bg: iconBg,
|
|
54
|
-
color: iconColor,
|
|
55
|
-
rtlFlip: rtlFlip,
|
|
56
|
-
className: "flex-content"
|
|
57
|
-
}), !minimal && /*#__PURE__*/jsx("label", {
|
|
58
|
-
className: "flex-initial truncate text-center px-1 py-1",
|
|
59
|
-
children: label
|
|
60
|
-
}), badge && /*#__PURE__*/jsx(Badge, _objectSpread(_objectSpread({}, badgeProps), {}, {
|
|
61
|
-
placement: minimal ? "end" : "",
|
|
62
|
-
className: classNames("me-1", badgeProps.className)
|
|
63
|
-
})), actions && active && /*#__PURE__*/jsx(DropdownTool, {
|
|
64
|
-
className: "bg-base/20 me-1 z-5",
|
|
65
|
-
children: actions
|
|
66
|
-
}), onClose && /*#__PURE__*/jsx("span", {
|
|
67
|
-
role: "none",
|
|
68
|
-
className: classNames("cursor-pointer me-1 opacity-65 hover:opacity-90 pointer-events-auto"),
|
|
69
|
-
onClick: function onClick(e) {
|
|
70
|
-
onClose === null || onClose === void 0 || onClose();
|
|
71
|
-
e.stopPropagation();
|
|
56
|
+
var W = tooltip ? Tooltip : Fragment;
|
|
57
|
+
return /*#__PURE__*/jsx(W, _objectSpread(_objectSpread({}, tooltipProps), {}, {
|
|
58
|
+
children: /*#__PURE__*/jsxs(E, _objectSpread(_objectSpread({
|
|
59
|
+
"data-id": id,
|
|
60
|
+
disabled: disabled,
|
|
61
|
+
"data-color": color,
|
|
62
|
+
className: classNames(classes.tabButton, className, active && "active pointer-events-none", active && activeClassName, disabled && "text-tint-500 pointer-events-none", tabFlex ? "flex-1" : "flex-initial max-w-36 min-w-24", "flex items-center justify-center px-1 rounded overflow-hidden"),
|
|
63
|
+
onClick: function onClick() {
|
|
64
|
+
return !active && (_onClick === null || _onClick === void 0 ? void 0 : _onClick(id));
|
|
72
65
|
},
|
|
73
|
-
|
|
74
|
-
})
|
|
66
|
+
ref: ref
|
|
67
|
+
}, aria), {}, {
|
|
68
|
+
children: [icon && /*#__PURE__*/jsx(Icon, {
|
|
69
|
+
icon: icon,
|
|
70
|
+
bg: iconBg,
|
|
71
|
+
color: iconColor,
|
|
72
|
+
rtlFlip: rtlFlip,
|
|
73
|
+
className: "flex-content"
|
|
74
|
+
}), !minimal && /*#__PURE__*/jsx("label", {
|
|
75
|
+
className: "flex-initial truncate text-center px-1 py-1",
|
|
76
|
+
children: label
|
|
77
|
+
}), badge && /*#__PURE__*/jsx(Badge, _objectSpread(_objectSpread({}, badgeProps), {}, {
|
|
78
|
+
placement: minimal ? "end" : "",
|
|
79
|
+
className: classNames("me-1", badgeProps.className)
|
|
80
|
+
})), actions && active && /*#__PURE__*/jsx(DropdownTool, {
|
|
81
|
+
className: "bg-base/20 me-1 z-5",
|
|
82
|
+
children: actions
|
|
83
|
+
}), onClose && /*#__PURE__*/jsx("span", {
|
|
84
|
+
role: "none",
|
|
85
|
+
className: classNames("cursor-pointer me-1 opacity-65 hover:opacity-90 pointer-events-auto"),
|
|
86
|
+
onClick: function onClick(e) {
|
|
87
|
+
onClose === null || onClose === void 0 || onClose();
|
|
88
|
+
e.stopPropagation();
|
|
89
|
+
},
|
|
90
|
+
children: "\xD7"
|
|
91
|
+
})]
|
|
92
|
+
}))
|
|
75
93
|
}));
|
|
76
94
|
};
|
|
77
95
|
|
|
@@ -106,12 +106,14 @@ var Aside = function Aside(_ref) {
|
|
|
106
106
|
className: classNames(classes.aside, className, "overflow-hidden grid"),
|
|
107
107
|
"data-align": align,
|
|
108
108
|
"data-flyout": peek,
|
|
109
|
+
"data-loading": loading,
|
|
109
110
|
"data-collapsed": isCollapsed,
|
|
110
111
|
style: isCollapsed ? undefined : widthStyles,
|
|
111
112
|
"data-testid": testId,
|
|
112
113
|
"data-test-value": testValue,
|
|
113
114
|
children: [/*#__PURE__*/jsxs("header", {
|
|
114
115
|
className: classNames(classes.asideHeader, headerClassName, "grid area-head items-center"),
|
|
116
|
+
"data-testid": "aside-header",
|
|
115
117
|
children: [title && /*#__PURE__*/jsx("div", {
|
|
116
118
|
className: classNames(classes.asideTitle, "truncate py-0.5 px-1 select-none pointer-events-none"),
|
|
117
119
|
children: title
|
|
@@ -142,6 +144,7 @@ var Aside = function Aside(_ref) {
|
|
|
142
144
|
"data-ref": "asideBody",
|
|
143
145
|
className: classNames(classes.asideBody, bodyClassName, "overflow-hidden grid"),
|
|
144
146
|
style: isCollapsed ? widthStyles : undefined,
|
|
147
|
+
"data-testid": "aside-body",
|
|
145
148
|
children: /*#__PURE__*/jsx(ErrorBoundary, {
|
|
146
149
|
children: children
|
|
147
150
|
})
|
|
@@ -44,12 +44,15 @@ var Content = function Content(_ref) {
|
|
|
44
44
|
testValue = _ref["data-test-value"];
|
|
45
45
|
var resizeHandle = useResizeObserver(onResize);
|
|
46
46
|
var scrollHandler = useDebounce(function (e) {
|
|
47
|
+
var el = e.target;
|
|
47
48
|
onScroll === null || onScroll === void 0 || onScroll({
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
left: el.scrollLeft,
|
|
50
|
+
top: el.scrollTop,
|
|
51
|
+
scrollHeight: el.scrollHeight,
|
|
52
|
+
scrollWidth: el.scrollWidth,
|
|
53
|
+
width: el.offsetWidth,
|
|
54
|
+
height: el.offsetHeight
|
|
55
|
+
}, e);
|
|
53
56
|
}, [onScroll]);
|
|
54
57
|
useImperativeHandle(ref, function () {
|
|
55
58
|
return resizeHandle.current;
|
|
@@ -47,6 +47,7 @@ var Page = function Page(_ref) {
|
|
|
47
47
|
return /*#__PURE__*/jsxs("div", {
|
|
48
48
|
"data-testid": testId,
|
|
49
49
|
"data-test-value": testValue,
|
|
50
|
+
"data-loading": loading,
|
|
50
51
|
className: classNames(classes.page, "overflow-hidden grid area-content", paper && "shadow-paper m-[6px] rounded-capped"),
|
|
51
52
|
children: [title && /*#__PURE__*/jsxs("div", {
|
|
52
53
|
"data-ref": "pageTitle",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer comp{.title{line-height:1.125}.moreLink{margin:-.25rem 0 1rem;text-align:end;&>span{color:theme(colors.accent.700);cursor:pointer;font-size:.75rem;user-select:none;&:hover{color:theme(colors.accent.500);text-decoration:underline;text-underline-offset:2px}}}}@layer util{.text{-webkit-line-clamp:var(--text-clamp)}.abbr{--abbr-color:var(--accent);color:color-mix(in lab,var(--abbr-color) 50%,var(--fabric-text))}.mark{--mark-color:var(--
|
|
1
|
+
@layer comp{.title{line-height:1.125}.moreLink{margin:-.25rem 0 1rem;text-align:end;&>span{color:theme(colors.accent.700);cursor:pointer;font-size:.75rem;user-select:none;&:hover{color:theme(colors.accent.500);text-decoration:underline;text-underline-offset:2px}}}}@layer util{.text{-webkit-line-clamp:var(--text-clamp)}.abbr{--abbr-color:var(--accent);color:color-mix(in lab,var(--abbr-color) 50%,var(--fabric-text))}.mark{--mark-color:var(--primary);background-color:color-mix(in lab,var(--mark-color) 25%,var(--fabric-bg))}}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactElement } from "react";
|
|
2
|
-
import { type AriaProps, type ChildProp, type CssProp } from "../../types";
|
|
3
|
-
export interface ActionLabelProps extends AriaProps, CssProp, ChildProp {
|
|
2
|
+
import { type AriaProps, type ChildProp, type CssProp, type TestProps } from "../../types";
|
|
3
|
+
export interface ActionLabelProps extends AriaProps, CssProp, ChildProp, TestProps {
|
|
4
4
|
/**
|
|
5
5
|
* action buttons aligment
|
|
6
6
|
*/
|
|
@@ -20,4 +20,4 @@ export declare const AnimationSpinner: ({ color, size, }: {
|
|
|
20
20
|
size?: number | string;
|
|
21
21
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
export declare const Loading: () => import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
export declare const Skeleton: () => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const Skeleton: ({ className, ...rest }: CssProp) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { type Placement } from "@floating-ui/react";
|
|
2
3
|
import { type CallbackReturn, type PolymorphicProps, type RefProp } from "../../types";
|
|
3
4
|
import { type BaseProps, type ButtonProps } from "./Button";
|
|
4
5
|
interface ExtendedProps extends Omit<BaseProps, "onClick">, RefProp {
|
|
@@ -14,6 +15,10 @@ interface ExtendedProps extends Omit<BaseProps, "onClick">, RefProp {
|
|
|
14
15
|
* ok label
|
|
15
16
|
*/
|
|
16
17
|
cancelLabel?: string;
|
|
18
|
+
/**
|
|
19
|
+
* dropdown placement
|
|
20
|
+
*/
|
|
21
|
+
placement?: Placement;
|
|
17
22
|
/**
|
|
18
23
|
* click handler, return Promise to autoset loading state
|
|
19
24
|
*/
|
|
@@ -23,5 +28,5 @@ export type ConfirmButtonProps = ExtendedProps & ButtonProps;
|
|
|
23
28
|
/**
|
|
24
29
|
* Button with confirmation dropdown
|
|
25
30
|
*/
|
|
26
|
-
export declare const ConfirmButton: <Tag extends import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> = "button">({ ref, message, color, okLabel, cancelLabel, onClick, loading, actionMessage, showActionDone, showActionDoneEvent, ...props }: ConfirmButtonProps & PolymorphicProps<Tag>) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare const ConfirmButton: <Tag extends import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> = "button">({ ref, message, color, okLabel, cancelLabel, onClick, loading, placement, actionMessage, showActionDone, showActionDoneEvent, ...props }: ConfirmButtonProps & PolymorphicProps<Tag>) => import("react/jsx-runtime").JSX.Element;
|
|
27
32
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type MouseEventHandler } from "react";
|
|
2
2
|
import { type ContentProps } from "../../core/content/Content";
|
|
3
3
|
import { type HeadFootProps } from "../../core/headfoot/HeadFoot";
|
|
4
|
-
import { type AriaProps, type ChildrenProp, type CssProp, type TestProps } from "../../types";
|
|
5
|
-
export interface CardProps extends CssProp, AriaProps, TestProps, ChildrenProp<React.ReactElement<HeadFootProps | ContentProps>> {
|
|
4
|
+
import { type AriaProps, type ChildrenProp, type CssProp, type RefProp, type TestProps } from "../../types";
|
|
5
|
+
export interface CardProps extends CssProp, AriaProps, TestProps, RefProp<HTMLDivElement>, ChildrenProp<React.ReactElement<HeadFootProps | ContentProps>> {
|
|
6
6
|
/**
|
|
7
7
|
* apply flex fill styling
|
|
8
8
|
*/
|
|
@@ -36,4 +36,4 @@ export interface CardProps extends CssProp, AriaProps, TestProps, ChildrenProp<R
|
|
|
36
36
|
*/
|
|
37
37
|
dragData?: KeyValue;
|
|
38
38
|
}
|
|
39
|
-
export declare const Card: ({ children, className, bodyClassName, selected, selectedRibbon, onClick, flex, draggable, dragKey, dragData, ...aria }: CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export declare const Card: ({ children, className, bodyClassName, selected, selectedRibbon, onClick, flex, draggable, dragKey, dragData, ref, ...aria }: CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -18,6 +18,10 @@ export interface CollapsableProps extends CssProp, AriaProps, TestProps, RefProp
|
|
|
18
18
|
* header button className
|
|
19
19
|
*/
|
|
20
20
|
headerClassName?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Header position sticky
|
|
23
|
+
*/
|
|
24
|
+
stickyHeader?: boolean;
|
|
21
25
|
/**
|
|
22
26
|
* open state icon
|
|
23
27
|
*/
|
|
@@ -43,5 +47,5 @@ export interface CollapsableProps extends CssProp, AriaProps, TestProps, RefProp
|
|
|
43
47
|
*/
|
|
44
48
|
onClose?: () => void;
|
|
45
49
|
}
|
|
46
|
-
export declare const Collapsable: ({ ref, disabled, className, bodyClassName, headerClassName, children, iconAlign, iconClosed, iconOpen, open, onClose, onOpen, ...aria }: CollapsableProps) => import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
export declare const Collapsable: ({ ref, disabled, className, bodyClassName, headerClassName, children, iconAlign, stickyHeader, iconClosed, iconOpen, open, onClose, onOpen, ...aria }: CollapsableProps) => import("react/jsx-runtime").JSX.Element;
|
|
47
51
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ChildProp, type CssProp } from "../../types";
|
|
2
2
|
import { type DropdownProps } from "./Dropdown";
|
|
3
|
-
export declare const DropdownTool: ({ children, className, groupHover, ...props }: ChildProp & CssProp & Omit<DropdownProps, "children"> & {
|
|
3
|
+
export declare const DropdownTool: ({ children, className, groupHover, icon, ...props }: ChildProp & CssProp & Omit<DropdownProps, "children"> & {
|
|
4
|
+
icon?: string;
|
|
4
5
|
/**
|
|
5
6
|
* hide until group hovered
|
|
6
7
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type AriaProps, type CssProp } from "../../types";
|
|
2
|
-
export interface BaseProps extends CssProp, AriaProps {
|
|
1
|
+
import { type AriaProps, type CssProp, type TestProps } from "../../types";
|
|
2
|
+
export interface BaseProps extends CssProp, TestProps, AriaProps {
|
|
3
3
|
/**
|
|
4
4
|
* media source
|
|
5
5
|
*/
|
|
@@ -3,5 +3,6 @@ import { type ChildrenProp } from "../../types";
|
|
|
3
3
|
import { type Menu } from "./Menu";
|
|
4
4
|
export interface ContextMenuProps extends ChildrenProp {
|
|
5
5
|
menu: React.ReactElement<typeof Menu>;
|
|
6
|
+
disabled?: boolean;
|
|
6
7
|
}
|
|
7
|
-
export declare const ContextMenu: ({ children, menu }: ContextMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const ContextMenu: ({ children, menu, disabled }: ContextMenuProps) => import("react/jsx-runtime").JSX.Element;
|