@chayns-components/core 5.0.0-beta.1394 → 5.0.0-beta.1396
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/lib/cjs/components/action-menu-button/ActionMenuButton.js +73 -0
- package/lib/cjs/components/action-menu-button/ActionMenuButton.js.map +1 -0
- package/lib/cjs/components/action-menu-button/ActionMenuButton.styles.js +75 -0
- package/lib/cjs/components/action-menu-button/ActionMenuButton.styles.js.map +1 -0
- package/lib/cjs/components/action-menu-button/ActionMenuButton.types.js +6 -0
- package/lib/cjs/components/action-menu-button/ActionMenuButton.types.js.map +1 -0
- package/lib/cjs/index.js +7 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/components/action-menu-button/ActionMenuButton.js +64 -0
- package/lib/esm/components/action-menu-button/ActionMenuButton.js.map +1 -0
- package/lib/esm/components/action-menu-button/ActionMenuButton.styles.js +68 -0
- package/lib/esm/components/action-menu-button/ActionMenuButton.styles.js.map +1 -0
- package/lib/esm/components/action-menu-button/ActionMenuButton.types.js +2 -0
- package/lib/esm/components/action-menu-button/ActionMenuButton.types.js.map +1 -0
- package/lib/esm/index.js +1 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/types/components/action-menu-button/ActionMenuButton.d.ts +7 -0
- package/lib/types/components/action-menu-button/ActionMenuButton.styles.d.ts +16 -0
- package/lib/types/components/action-menu-button/ActionMenuButton.types.d.ts +41 -0
- package/lib/types/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _ContextMenu = _interopRequireDefault(require("../context-menu/ContextMenu"));
|
|
9
|
+
var _Icon = _interopRequireDefault(require("../icon/Icon"));
|
|
10
|
+
var _ActionMenuButton = require("./ActionMenuButton.styles");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
13
|
+
/**
|
|
14
|
+
* A versatile button component that can act as a standard button, a menu trigger, or a split button.
|
|
15
|
+
*/
|
|
16
|
+
const ActionMenuButton = ({
|
|
17
|
+
contextMenuItems,
|
|
18
|
+
icon,
|
|
19
|
+
isDisabled,
|
|
20
|
+
label,
|
|
21
|
+
onClick,
|
|
22
|
+
shouldUseFullWidth = false
|
|
23
|
+
}) => {
|
|
24
|
+
const contextMenuRef = (0, _react.useRef)(null);
|
|
25
|
+
const hasDropdown = Array.isArray(contextMenuItems) && contextMenuItems.length > 0;
|
|
26
|
+
const handleActionClick = event => {
|
|
27
|
+
event.stopPropagation();
|
|
28
|
+
console.debug('ActionMenuButton: handleActionClick called', {
|
|
29
|
+
isDisabled,
|
|
30
|
+
hasDropdown,
|
|
31
|
+
typeofOnClick: typeof onClick
|
|
32
|
+
});
|
|
33
|
+
if (typeof onClick === 'function') {
|
|
34
|
+
onClick(event);
|
|
35
|
+
} else if (hasDropdown) {
|
|
36
|
+
var _contextMenuRef$curre;
|
|
37
|
+
(_contextMenuRef$curre = contextMenuRef.current) === null || _contextMenuRef$curre === void 0 || _contextMenuRef$curre.show();
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const handleMenuClick = event => {
|
|
41
|
+
var _contextMenuRef$curre2;
|
|
42
|
+
event.stopPropagation();
|
|
43
|
+
(_contextMenuRef$curre2 = contextMenuRef.current) === null || _contextMenuRef$curre2 === void 0 || _contextMenuRef$curre2.show();
|
|
44
|
+
};
|
|
45
|
+
return /*#__PURE__*/_react.default.createElement(_ActionMenuButton.StyledActionMenuButton, {
|
|
46
|
+
$shouldUseFullWidth: shouldUseFullWidth
|
|
47
|
+
}, /*#__PURE__*/_react.default.createElement(_ActionMenuButton.StyledActionMenuButtonAction, {
|
|
48
|
+
onClick: isDisabled ? undefined : handleActionClick,
|
|
49
|
+
type: "button",
|
|
50
|
+
$isDisabled: isDisabled,
|
|
51
|
+
$isSplit: hasDropdown
|
|
52
|
+
}, typeof icon === 'string' && /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
53
|
+
color: "white",
|
|
54
|
+
icons: [icon],
|
|
55
|
+
size: 18
|
|
56
|
+
}), label), hasDropdown && /*#__PURE__*/_react.default.createElement(_ActionMenuButton.StyledActionMenuButtonMenu, {
|
|
57
|
+
onClick: isDisabled ? undefined : handleMenuClick,
|
|
58
|
+
type: "button",
|
|
59
|
+
$isDisabled: isDisabled,
|
|
60
|
+
$isSplit: true
|
|
61
|
+
}, /*#__PURE__*/_react.default.createElement(_ContextMenu.default, {
|
|
62
|
+
items: contextMenuItems,
|
|
63
|
+
shouldDisableClick: isDisabled,
|
|
64
|
+
ref: contextMenuRef
|
|
65
|
+
}, /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
66
|
+
color: "white",
|
|
67
|
+
icons: ['fa fa-angle-down'],
|
|
68
|
+
size: 18
|
|
69
|
+
}))));
|
|
70
|
+
};
|
|
71
|
+
ActionMenuButton.displayName = 'ActionMenuButton';
|
|
72
|
+
var _default = exports.default = ActionMenuButton;
|
|
73
|
+
//# sourceMappingURL=ActionMenuButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionMenuButton.js","names":["_react","_interopRequireWildcard","require","_ContextMenu","_interopRequireDefault","_Icon","_ActionMenuButton","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ActionMenuButton","contextMenuItems","icon","isDisabled","label","onClick","shouldUseFullWidth","contextMenuRef","useRef","hasDropdown","Array","isArray","length","handleActionClick","event","stopPropagation","console","debug","typeofOnClick","_contextMenuRef$curre","current","show","handleMenuClick","_contextMenuRef$curre2","createElement","StyledActionMenuButton","$shouldUseFullWidth","StyledActionMenuButtonAction","undefined","type","$isDisabled","$isSplit","color","icons","size","StyledActionMenuButtonMenu","items","shouldDisableClick","ref","displayName","_default","exports"],"sources":["../../../../src/components/action-menu-button/ActionMenuButton.tsx"],"sourcesContent":["import React, { FC, MouseEvent, useRef } from 'react';\nimport ContextMenu from '../context-menu/ContextMenu';\nimport type { ContextMenuRef } from '../context-menu/ContextMenu.types';\nimport Icon from '../icon/Icon';\nimport { ActionMenuButtonProps } from './ActionMenuButton.types';\nimport {\n StyledActionMenuButtonAction,\n StyledActionMenuButton,\n StyledActionMenuButtonMenu,\n} from './ActionMenuButton.styles';\n\n/**\n * A versatile button component that can act as a standard button, a menu trigger, or a split button.\n */\nconst ActionMenuButton: FC<ActionMenuButtonProps> = ({\n contextMenuItems,\n icon,\n isDisabled,\n label,\n onClick,\n shouldUseFullWidth = false,\n}) => {\n const contextMenuRef = useRef<ContextMenuRef>(null);\n\n const hasDropdown = Array.isArray(contextMenuItems) && contextMenuItems.length > 0;\n\n const handleActionClick = (event: MouseEvent<HTMLButtonElement>) => {\n event.stopPropagation();\n\n console.debug('ActionMenuButton: handleActionClick called', {\n isDisabled,\n hasDropdown,\n typeofOnClick: typeof onClick,\n });\n\n if (typeof onClick === 'function') {\n onClick(event);\n } else if (hasDropdown) {\n contextMenuRef.current?.show();\n }\n };\n\n const handleMenuClick = (event: MouseEvent<HTMLButtonElement>) => {\n event.stopPropagation();\n\n contextMenuRef.current?.show();\n };\n\n return (\n <StyledActionMenuButton $shouldUseFullWidth={shouldUseFullWidth}>\n <StyledActionMenuButtonAction\n onClick={isDisabled ? undefined : handleActionClick}\n type=\"button\"\n $isDisabled={isDisabled}\n $isSplit={hasDropdown}\n >\n {typeof icon === 'string' && <Icon color=\"white\" icons={[icon]} size={18} />}\n {label}\n </StyledActionMenuButtonAction>\n {hasDropdown && (\n <StyledActionMenuButtonMenu\n onClick={isDisabled ? undefined : handleMenuClick}\n type=\"button\"\n $isDisabled={isDisabled}\n $isSplit\n >\n <ContextMenu\n items={contextMenuItems}\n shouldDisableClick={isDisabled}\n ref={contextMenuRef}\n >\n <Icon color=\"white\" icons={['fa fa-angle-down']} size={18} />\n </ContextMenu>\n </StyledActionMenuButtonMenu>\n )}\n </StyledActionMenuButton>\n );\n};\n\nActionMenuButton.displayName = 'ActionMenuButton';\n\nexport default ActionMenuButton;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,iBAAA,GAAAJ,OAAA;AAImC,SAAAE,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAV,uBAAA,YAAAA,CAAAM,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAAF,CAAA,GAAAJ,CAAA,GAAAG,CAAA,GAAAD,CAA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BjC,MAAA,CAAAS,OAAA,CAAAyC,aAAA,CAAC7C,KAAA,CAAAI,OAAI;IAACiD,KAAK,EAAC,OAAO;IAACC,KAAK,EAAE,CAAC,kBAAkB,CAAE;IAACC,IAAI,EAAE;EAAG,CAAE,CACnD,CACW,CAEZ,CAAC;AAEjC,CAAC;AAEDlC,gBAAgB,CAACuC,WAAW,GAAG,kBAAkB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA1D,OAAA,GAEnCiB,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StyledActionMenuButtonMenu = exports.StyledActionMenuButtonAction = exports.StyledActionMenuButton = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
8
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
9
|
+
const StyledActionMenuButton = exports.StyledActionMenuButton = _styledComponents.default.div`
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
gap: 2px;
|
|
12
|
+
height: 42px;
|
|
13
|
+
width: ${({
|
|
14
|
+
$shouldUseFullWidth
|
|
15
|
+
}) => $shouldUseFullWidth ? '100%' : 'auto'};
|
|
16
|
+
`;
|
|
17
|
+
const StyledActionMenuButtonAction = exports.StyledActionMenuButtonAction = _styledComponents.default.button`
|
|
18
|
+
align-items: center;
|
|
19
|
+
background-color: rgba(30, 30, 30, 0.2);
|
|
20
|
+
border-bottom-left-radius: 21px;
|
|
21
|
+
border-top-left-radius: 21px;
|
|
22
|
+
color: ${({
|
|
23
|
+
theme
|
|
24
|
+
}) => theme.buttonColor ?? 'white'};
|
|
25
|
+
cursor: ${({
|
|
26
|
+
$isDisabled
|
|
27
|
+
}) => $isDisabled ? 'default' : 'pointer'};
|
|
28
|
+
display: flex;
|
|
29
|
+
flex: 1 1 0;
|
|
30
|
+
gap: 10px;
|
|
31
|
+
opacity: ${({
|
|
32
|
+
$isDisabled
|
|
33
|
+
}) => $isDisabled ? 0.5 : 1};
|
|
34
|
+
padding: 0 12px;
|
|
35
|
+
transition: background-color 0.2s ease;
|
|
36
|
+
|
|
37
|
+
&:hover {
|
|
38
|
+
background-color: ${({
|
|
39
|
+
$isDisabled
|
|
40
|
+
}) => $isDisabled ? 'rgba(30, 30, 30, 0.2)' : 'rgba(30, 30, 30, 0.25)'};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
${({
|
|
44
|
+
$isSplit
|
|
45
|
+
}) => !$isSplit && (0, _styledComponents.css)`
|
|
46
|
+
border-bottom-right-radius: 21px;
|
|
47
|
+
border-top-right-radius: 21px;
|
|
48
|
+
`}
|
|
49
|
+
`;
|
|
50
|
+
const StyledActionMenuButtonMenu = exports.StyledActionMenuButtonMenu = _styledComponents.default.button`
|
|
51
|
+
align-items: center;
|
|
52
|
+
background-color: rgba(30, 30, 30, 0.2);
|
|
53
|
+
border-bottom-right-radius: 21px;
|
|
54
|
+
border-top-right-radius: 21px;
|
|
55
|
+
color: ${({
|
|
56
|
+
theme
|
|
57
|
+
}) => theme.buttonColor ?? 'white'};
|
|
58
|
+
cursor: ${({
|
|
59
|
+
$isDisabled
|
|
60
|
+
}) => $isDisabled ? 'default' : 'pointer'};
|
|
61
|
+
display: flex;
|
|
62
|
+
flex: 0 0 auto;
|
|
63
|
+
opacity: ${({
|
|
64
|
+
$isDisabled
|
|
65
|
+
}) => $isDisabled ? 0.5 : 1};
|
|
66
|
+
padding: 0 2px 0 0;
|
|
67
|
+
transition: background-color 0.2s ease;
|
|
68
|
+
|
|
69
|
+
&:hover {
|
|
70
|
+
background-color: ${({
|
|
71
|
+
$isDisabled
|
|
72
|
+
}) => $isDisabled ? 'rgba(30, 30, 30, 0.2)' : 'rgba(30, 30, 30, 0.25)'};
|
|
73
|
+
}
|
|
74
|
+
`;
|
|
75
|
+
//# sourceMappingURL=ActionMenuButton.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionMenuButton.styles.js","names":["_styledComponents","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","StyledActionMenuButton","exports","styled","div","$shouldUseFullWidth","StyledActionMenuButtonAction","button","theme","buttonColor","$isDisabled","$isSplit","css","StyledActionMenuButtonMenu"],"sources":["../../../../src/components/action-menu-button/ActionMenuButton.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledActionMenuButtonProps = WithTheme<{\n $shouldUseFullWidth?: boolean;\n}>;\n\nexport const StyledActionMenuButton = styled.div<StyledActionMenuButtonProps>`\n display: inline-flex;\n gap: 2px;\n height: 42px;\n width: ${({ $shouldUseFullWidth }) => ($shouldUseFullWidth ? '100%' : 'auto')};\n`;\n\ntype StyledActionMenuButtonActionProps = WithTheme<{\n $isDisabled?: boolean;\n $isSplit?: boolean;\n}>;\n\nexport const StyledActionMenuButtonAction = styled.button<StyledActionMenuButtonActionProps>`\n align-items: center;\n background-color: rgba(30, 30, 30, 0.2);\n border-bottom-left-radius: 21px;\n border-top-left-radius: 21px;\n color: ${({ theme }) => theme.buttonColor ?? 'white'};\n cursor: ${({ $isDisabled }) => ($isDisabled ? 'default' : 'pointer')};\n display: flex;\n flex: 1 1 0;\n gap: 10px;\n opacity: ${({ $isDisabled }) => ($isDisabled ? 0.5 : 1)};\n padding: 0 12px;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({ $isDisabled }) =>\n $isDisabled ? 'rgba(30, 30, 30, 0.2)' : 'rgba(30, 30, 30, 0.25)'};\n }\n\n ${({ $isSplit }) =>\n !$isSplit &&\n css`\n border-bottom-right-radius: 21px;\n border-top-right-radius: 21px;\n `}\n`;\n\ntype StyledActionMenuButtonMenuProps = WithTheme<{\n $isDisabled?: boolean;\n $isSplit?: boolean;\n}>;\n\nexport const StyledActionMenuButtonMenu = styled.button<StyledActionMenuButtonMenuProps>`\n align-items: center;\n background-color: rgba(30, 30, 30, 0.2);\n border-bottom-right-radius: 21px;\n border-top-right-radius: 21px;\n color: ${({ theme }) => theme.buttonColor ?? 'white'};\n cursor: ${({ $isDisabled }) => ($isDisabled ? 'default' : 'pointer')};\n display: flex;\n flex: 0 0 auto;\n opacity: ${({ $isDisabled }) => ($isDisabled ? 0.5 : 1)};\n padding: 0 2px 0 0;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({ $isDisabled }) =>\n $isDisabled ? 'rgba(30, 30, 30, 0.2)' : 'rgba(30, 30, 30, 0.25)'};\n }\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAgD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAA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ACX,CAACA,QAAQ,IACT,IAAAC,qBAAG;AACX;AACA;AACA,SAAS;AACT,CAAC;AAOM,MAAMC,0BAA0B,GAAAX,OAAA,CAAAW,0BAAA,GAAGV,yBAAM,CAACI,MAAuC;AACxF;AACA;AACA;AACA;AACA,aAAa,CAAC;EAAEC;AAAM,CAAC,KAAKA,KAAK,CAACC,WAAW,IAAI,OAAO;AACxD,cAAc,CAAC;EAAEC;AAAY,CAAC,KAAMA,WAAW,GAAG,SAAS,GAAG,SAAU;AACxE;AACA;AACA,eAAe,CAAC;EAAEA;AAAY,CAAC,KAAMA,WAAW,GAAG,GAAG,GAAG,CAAE;AAC3D;AACA;AACA;AACA;AACA,4BAA4B,CAAC;EAAEA;AAAY,CAAC,KAChCA,WAAW,GAAG,uBAAuB,GAAG,wBAAwB;AAC5E;AACA,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionMenuButton.types.js","names":[],"sources":["../../../../src/components/action-menu-button/ActionMenuButton.types.ts"],"sourcesContent":["import type { MouseEventHandler, ReactNode } from 'react';\nimport type { ContextMenuItem } from '../context-menu/ContextMenu.types';\n\nexport type ActionMenuButtonProps = {\n /**\n * List of items to display in the dropdown menu.\n * @description Array of menu items. If provided, a dropdown trigger (or the whole button) will open a context menu.\n * @optional\n */\n contextMenuItems?: ContextMenuItem[];\n /**\n * Icon to display on the left side of the text.\n * @description Can be a string identifier for an icon or a ReactNode.\n * @optional\n */\n icon?: string | ReactNode;\n /**\n * Whether the button is disabled.\n * @description If true, the button is non-interactive and displayed in a disabled state.\n * @optional\n * @default false\n */\n isDisabled?: boolean;\n /**\n * The content to be displayed inside the button.\n * @description Should be a string used as the main label of the button.\n */\n label?: string;\n /**\n * Function to call when the primary action (left part) is clicked.\n * @description If provided, this function is called on click. If not provided but menu items exist, the button serves as a menu trigger.\n * @optional\n */\n onClick?: MouseEventHandler<HTMLButtonElement>;\n /**\n * Whether the button should take the full available width.\n * @description If true, the button expands to 100% width of its container.\n * @optional\n * @default false\n */\n shouldUseFullWidth?: boolean;\n};\n"],"mappings":"","ignoreList":[]}
|
package/lib/cjs/index.js
CHANGED
|
@@ -33,6 +33,12 @@ Object.defineProperty(exports, "AccordionItem", {
|
|
|
33
33
|
return _AccordionItem.default;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
+
Object.defineProperty(exports, "ActionMenuButton", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _ActionMenuButton.default;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
36
42
|
Object.defineProperty(exports, "AmountControl", {
|
|
37
43
|
enumerable: true,
|
|
38
44
|
get: function () {
|
|
@@ -518,6 +524,7 @@ var _AccordionContent = _interopRequireDefault(require("./components/accordion/a
|
|
|
518
524
|
var _AccordionGroup = _interopRequireDefault(require("./components/accordion/accordion-group/AccordionGroup"));
|
|
519
525
|
var _AccordionIntro = _interopRequireDefault(require("./components/accordion/accordion-intro/AccordionIntro"));
|
|
520
526
|
var _AccordionItem = _interopRequireDefault(require("./components/accordion/accordion-item/AccordionItem"));
|
|
527
|
+
var _ActionMenuButton = _interopRequireDefault(require("./components/action-menu-button/ActionMenuButton"));
|
|
521
528
|
var _AmountControl = _interopRequireDefault(require("./components/amount-control/AmountControl"));
|
|
522
529
|
var _VerificationBadge = _interopRequireDefault(require("./components/verification-badge/VerificationBadge"));
|
|
523
530
|
var _AreaContextProvider = _interopRequireWildcard(require("./components/area-provider/AreaContextProvider"));
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_Accordion","_interopRequireDefault","require","_AccordionContent","_AccordionGroup","_AccordionIntro","_AccordionItem","_AmountControl","_VerificationBadge","_AreaContextProvider","_interopRequireWildcard","_Badge","_Button","_Checkbox","_ColorSchemeProvider","_Badge2","_container","_dropdown","_element","_ref","_Filter","_AnimatedNumber","_FileList","_FileSelect","_DropdownBodyWrapper","_ComboBox","_ContentCard","_HighlightSlider","_ContextMenu","_ContextMenu2","_ExpandableContent","_FileInput","_FilterButton","_FilterButtons","_GridImage","_GroupedImage","_Icon","_Input","_List","_ListItemContent","_ListItem","_MentionFinder","_NumberInput","_PageProvider","_Popup","_PopupContent","_ProgressBar","_popup","_RadioButtonGroup","_RadioButton","_ScrollView","_SearchBox","_SearchInput","_SelectButton","_SetupWizardItem","_SetupWizard","_SharingBar","_Signature","_SliderButton","_Slider","_SmallWaitCursor","_TagInput","_TextArea","_Tooltip","_Truncation","_mentionFinder","_contentCard","_file","_filterButtons","_truncation","_environment","_fileDialog","_isTobitEmployee","_pageProvider","_uploadFile","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor"],"sources":["../../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\n\nexport { default as Accordion } from './components/accordion/Accordion';\nexport { default as AccordionContent } from './components/accordion/accordion-content/AccordionContent';\nexport { default as AccordionGroup } from './components/accordion/accordion-group/AccordionGroup';\nexport { default as AccordionIntro } from './components/accordion/accordion-intro/AccordionIntro';\nexport { default as AccordionItem } from './components/accordion/accordion-item/AccordionItem';\nexport { default as AmountControl } from './components/amount-control/AmountControl';\nexport { default as VerificationBadge } from './components/verification-badge/VerificationBadge';\nexport {\n AreaContext,\n default as AreaProvider,\n} from './components/area-provider/AreaContextProvider';\nexport { default as Badge } from './components/badge/Badge';\nexport { default as Button } from './components/button/Button';\nexport { default as Checkbox } from './components/checkbox/Checkbox';\nexport {\n default as ColorSchemeProvider,\n useColorScheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { BadgeSize, BadgeDesign } from './components/badge/Badge.types';\nexport type {\n ColorSchemeContextProps,\n WithTheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { useContainer, ContainerAnchor } from './hooks/container';\nexport { DropdownDirection, type DropdownCoordinates } from './types/dropdown';\nexport { useIsMeasuredClone } from './hooks/element';\nexport { useCombinedRefs } from './hooks/ref';\nexport { default as Filter, type FilterRightIcon } from './components/filter/Filter';\nexport {\n type SortItem,\n type SearchConfig,\n type SortConfig,\n type CheckboxConfig,\n type FilterButtonConfig,\n type FilterRef,\n} from './types/filter';\nexport { default as AnimatedNumber } from './components/animated-number/AnimatedNumber';\nexport {\n default as FileList,\n type IFileItem as FileListItem,\n} from './components/file-list/FileList';\nexport { default as FileSelect } from './components/file-select/FileSelect';\nexport { default as DropdownBodyWrapper } from './components/dropdown-body-wrapper/DropdownBodyWrapper';\nexport {\n default as ComboBox,\n type ComboBoxTextStyles,\n type IComboBoxItem as ComboBoxItem,\n type IComboBoxItems as ComboBoxItems,\n type ComboBoxRef,\n} from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport { default as HighlightSlider } from './components/highlight-slider/HighlightSlider';\nexport type { HighlightSliderItemColors as HighlightSliderColors } from './components/highlight-slider/highlight-slider-item/HighlightSliderItem';\nexport { default as ContextMenu } from './components/context-menu/ContextMenu';\nexport {\n ContextMenuAlignment,\n type ContextMenuCoordinates,\n type ContextMenuItem,\n type ContextMenuProps,\n type ContextMenuRef,\n} from './components/context-menu/ContextMenu.types';\nexport { default as ExpandableContent } from './components/expandable-content/ExpandableContent';\nexport {\n default as FileInput,\n type FileInputRef,\n STREAMINGSERVICE_FILE_TYPES,\n TSIMG_FILE_TYPES,\n} from './components/file-input/FileInput';\nexport { default as FilterButton } from './components/filter-buttons/filter-button/FilterButton';\nexport { default as FilterButtons } from './components/filter-buttons/FilterButtons';\nexport { default as GridImage } from './components/grid-image/GridImage';\nexport { default as GroupedImage } from './components/grouped-image/GroupedImage';\nexport { default as Icon, type IconProps } from './components/icon/Icon';\nexport { default as Input, InputSize } from './components/input/Input';\nexport { default as List } from './components/list/List';\nexport { default as ListItemContent } from './components/list/list-item/list-item-content/ListItemContent';\nexport {\n default as ListItem,\n type ListItemElements,\n type ListItemProps,\n type ListItemRef,\n} from './components/list/list-item/ListItem';\nexport { default as MentionFinder } from './components/mention-finder/MentionFinder';\nexport type { MentionMember } from './components/mention-finder/MentionFinder';\nexport { default as NumberInput } from './components/number-input/NumberInput';\nexport { default as PageProvider } from './components/page-provider/PageProvider';\nexport { default as Popup } from './components/popup/Popup';\nexport { default as PopupContent } from './components/popup/popup-content/PopupContent';\nexport { default as ProgressBar } from './components/progress-bar/ProgressBar';\nexport { PopupAlignment } from './types/popup';\nexport {\n default as RadioButtonGroup,\n type RadioButtonGroupRef,\n} from './components/radio-button/radio-button-group/RadioButtonGroup';\nexport { default as RadioButton } from './components/radio-button/RadioButton';\nexport { default as ScrollView } from './components/scroll-view/ScrollView';\nexport { default as SearchBox } from './components/search-box/SearchBox';\nexport { default as SearchInput } from './components/search-input/SearchInput';\nexport { default as SelectButton } from './components/select-button/SelectButton';\nexport { default as SetupWizardItem } from './components/setup-wizard/setup-wizard-item/SetupWizardItem';\nexport { default as SetupWizard } from './components/setup-wizard/SetupWizard';\nexport type { SetupWizardRef } from './components/setup-wizard/SetupWizard';\nexport { default as SharingBar } from './components/sharing-bar/SharingBar';\nexport { default as Signature } from './components/signature/Signature';\nexport type { SignatureRef } from './components/signature/Signature';\nexport { default as SliderButton } from './components/slider-button/SliderButton';\nexport { default as Slider } from './components/slider/Slider';\nexport {\n default as SmallWaitCursor,\n SmallWaitCursorSize,\n SmallWaitCursorSpeed,\n} from './components/small-wait-cursor/SmallWaitCursor';\nexport type { Tag } from './types/tagInput';\nexport { default as TagInput } from './components/tag-input/TagInput';\nexport type { TagInputRef } from './components/tag-input/TagInput';\nexport { default as TextArea } from './components/text-area/TextArea';\nexport { default as Tooltip } from './components/tooltip/Tooltip';\nexport { default as Truncation } from './components/truncation/Truncation';\nexport { MentionFinderPopupAlignment } from './constants/mentionFinder';\nexport { useElementSize } from './hooks/element';\nexport type { BrowserName } from './types/chayns';\nexport { ContentCardType } from './types/contentCard';\nexport type { FileItem, Image, InternalFileItem, Meta, Video } from './types/file';\nexport { isValidFileType } from './utils/file';\nexport type { FileInputFileItem } from './types/fileInput';\nexport { FilterButtonItemShape, FilterButtonSize } from './types/filterButtons';\nexport type { IFilterButtonItem as FilterButtonItem } from './types/filterButtons';\nexport type { IListItemRightElements } from './types/list';\nexport type { PopupRef } from './types/popup';\nexport type { RadioButtonItem } from './types/radioButton';\nexport type {\n ISearchBoxItem as SearchBoxItem,\n ISearchBoxItems as SearchBoxItems,\n} from './types/searchBox';\nexport type { SelectButtonItem } from './types/selectButton';\nexport type { SliderButtonItem } from './types/slider-button';\nexport { ClampPosition } from './types/truncation';\nexport { useIsTouch } from './utils/environment';\nexport { filterFilesByMimeType, getFileAsArrayBuffer, selectFiles } from './utils/fileDialog';\nexport { isTobitEmployee } from './utils/isTobitEmployee';\nexport { getUsableHeight } from './utils/pageProvider';\nexport { uploadFile } from './utils/uploadFile';\nexport type { Theme } from './components/color-scheme-provider/ColorSchemeProvider';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAAA,UAAA,GAAAC,sBAAA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CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAAA,SAAA3E,uBAAA0E,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAK,UAAA,GAAAL,CAAA,KAAAU,OAAA,EAAAV,CAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_Accordion","_interopRequireDefault","require","_AccordionContent","_AccordionGroup","_AccordionIntro","_AccordionItem","_ActionMenuButton","_AmountControl","_VerificationBadge","_AreaContextProvider","_interopRequireWildcard","_Badge","_Button","_Checkbox","_ColorSchemeProvider","_Badge2","_container","_dropdown","_element","_ref","_Filter","_AnimatedNumber","_FileList","_FileSelect","_DropdownBodyWrapper","_ComboBox","_ContentCard","_HighlightSlider","_ContextMenu","_ContextMenu2","_ExpandableContent","_FileInput","_FilterButton","_FilterButtons","_GridImage","_GroupedImage","_Icon","_Input","_List","_ListItemContent","_ListItem","_MentionFinder","_NumberInput","_PageProvider","_Popup","_PopupContent","_ProgressBar","_popup","_RadioButtonGroup","_RadioButton","_ScrollView","_SearchBox","_SearchInput","_SelectButton","_SetupWizardItem","_SetupWizard","_SharingBar","_Signature","_SliderButton","_Slider","_SmallWaitCursor","_TagInput","_TextArea","_Tooltip","_Truncation","_mentionFinder","_contentCard","_file","_filterButtons","_truncation","_environment","_fileDialog","_isTobitEmployee","_pageProvider","_uploadFile","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor"],"sources":["../../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\n\nexport { default as Accordion } from './components/accordion/Accordion';\nexport { default as AccordionContent } from './components/accordion/accordion-content/AccordionContent';\nexport { default as AccordionGroup } from './components/accordion/accordion-group/AccordionGroup';\nexport { default as AccordionIntro } from './components/accordion/accordion-intro/AccordionIntro';\nexport { default as AccordionItem } from './components/accordion/accordion-item/AccordionItem';\nexport { default as ActionMenuButton } from './components/action-menu-button/ActionMenuButton';\nexport { default as AmountControl } from './components/amount-control/AmountControl';\nexport { default as VerificationBadge } from './components/verification-badge/VerificationBadge';\nexport {\n AreaContext,\n default as AreaProvider,\n} from './components/area-provider/AreaContextProvider';\nexport { default as Badge } from './components/badge/Badge';\nexport { default as Button } from './components/button/Button';\nexport { default as Checkbox } from './components/checkbox/Checkbox';\nexport {\n default as ColorSchemeProvider,\n useColorScheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { BadgeSize, BadgeDesign } from './components/badge/Badge.types';\nexport type {\n ColorSchemeContextProps,\n WithTheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { useContainer, ContainerAnchor } from './hooks/container';\nexport { DropdownDirection, type DropdownCoordinates } from './types/dropdown';\nexport { useIsMeasuredClone } from './hooks/element';\nexport { useCombinedRefs } from './hooks/ref';\nexport { default as Filter, type FilterRightIcon } from './components/filter/Filter';\nexport {\n type SortItem,\n type SearchConfig,\n type SortConfig,\n type CheckboxConfig,\n type FilterButtonConfig,\n type FilterRef,\n} from './types/filter';\nexport { default as AnimatedNumber } from './components/animated-number/AnimatedNumber';\nexport {\n default as FileList,\n type IFileItem as FileListItem,\n} from './components/file-list/FileList';\nexport { default as FileSelect } from './components/file-select/FileSelect';\nexport { default as DropdownBodyWrapper } from './components/dropdown-body-wrapper/DropdownBodyWrapper';\nexport {\n default as ComboBox,\n type ComboBoxTextStyles,\n type IComboBoxItem as ComboBoxItem,\n type IComboBoxItems as ComboBoxItems,\n type ComboBoxRef,\n} from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport { default as HighlightSlider } from './components/highlight-slider/HighlightSlider';\nexport type { HighlightSliderItemColors as HighlightSliderColors } from './components/highlight-slider/highlight-slider-item/HighlightSliderItem';\nexport { default as ContextMenu } from './components/context-menu/ContextMenu';\nexport {\n ContextMenuAlignment,\n type ContextMenuCoordinates,\n type ContextMenuItem,\n type ContextMenuProps,\n type ContextMenuRef,\n} from './components/context-menu/ContextMenu.types';\nexport { default as ExpandableContent } from './components/expandable-content/ExpandableContent';\nexport {\n default as FileInput,\n type FileInputRef,\n STREAMINGSERVICE_FILE_TYPES,\n TSIMG_FILE_TYPES,\n} from './components/file-input/FileInput';\nexport { default as FilterButton } from './components/filter-buttons/filter-button/FilterButton';\nexport { default as FilterButtons } from './components/filter-buttons/FilterButtons';\nexport { default as GridImage } from './components/grid-image/GridImage';\nexport { default as GroupedImage } from './components/grouped-image/GroupedImage';\nexport { default as Icon, type IconProps } from './components/icon/Icon';\nexport { default as Input, InputSize } from './components/input/Input';\nexport { default as List } from './components/list/List';\nexport { default as ListItemContent } from './components/list/list-item/list-item-content/ListItemContent';\nexport {\n default as ListItem,\n type ListItemElements,\n type ListItemProps,\n type ListItemRef,\n} from './components/list/list-item/ListItem';\nexport { default as MentionFinder } from './components/mention-finder/MentionFinder';\nexport type { MentionMember } from './components/mention-finder/MentionFinder';\nexport { default as NumberInput } from './components/number-input/NumberInput';\nexport { default as PageProvider } from './components/page-provider/PageProvider';\nexport { default as Popup } from './components/popup/Popup';\nexport { default as PopupContent } from './components/popup/popup-content/PopupContent';\nexport { default as ProgressBar } from './components/progress-bar/ProgressBar';\nexport { PopupAlignment } from './types/popup';\nexport {\n default as RadioButtonGroup,\n type RadioButtonGroupRef,\n} from './components/radio-button/radio-button-group/RadioButtonGroup';\nexport { default as RadioButton } from './components/radio-button/RadioButton';\nexport { default as ScrollView } from './components/scroll-view/ScrollView';\nexport { default as SearchBox } from './components/search-box/SearchBox';\nexport { default as SearchInput } from './components/search-input/SearchInput';\nexport { default as SelectButton } from './components/select-button/SelectButton';\nexport { default as SetupWizardItem } from './components/setup-wizard/setup-wizard-item/SetupWizardItem';\nexport { default as SetupWizard } from './components/setup-wizard/SetupWizard';\nexport type { SetupWizardRef } from './components/setup-wizard/SetupWizard';\nexport { default as SharingBar } from './components/sharing-bar/SharingBar';\nexport { default as Signature } from './components/signature/Signature';\nexport type { SignatureRef } from './components/signature/Signature';\nexport { default as SliderButton } from './components/slider-button/SliderButton';\nexport { default as Slider } from './components/slider/Slider';\nexport {\n default as SmallWaitCursor,\n SmallWaitCursorSize,\n SmallWaitCursorSpeed,\n} from './components/small-wait-cursor/SmallWaitCursor';\nexport type { Tag } from './types/tagInput';\nexport { default as TagInput } from './components/tag-input/TagInput';\nexport type { TagInputRef } from './components/tag-input/TagInput';\nexport { default as TextArea } from './components/text-area/TextArea';\nexport { default as Tooltip } from './components/tooltip/Tooltip';\nexport { default as Truncation } from './components/truncation/Truncation';\nexport { MentionFinderPopupAlignment } from './constants/mentionFinder';\nexport { useElementSize } from './hooks/element';\nexport type { BrowserName } from './types/chayns';\nexport { ContentCardType } from './types/contentCard';\nexport type { FileItem, Image, InternalFileItem, Meta, Video } from './types/file';\nexport { isValidFileType } from './utils/file';\nexport type { FileInputFileItem } from './types/fileInput';\nexport { FilterButtonItemShape, FilterButtonSize } from './types/filterButtons';\nexport type { IFilterButtonItem as FilterButtonItem } from './types/filterButtons';\nexport type { IListItemRightElements } from './types/list';\nexport type { PopupRef } from './types/popup';\nexport type { RadioButtonItem } from './types/radioButton';\nexport type {\n ISearchBoxItem as SearchBoxItem,\n ISearchBoxItems as SearchBoxItems,\n} from './types/searchBox';\nexport type { SelectButtonItem } from './types/selectButton';\nexport type { SliderButtonItem } from './types/slider-button';\nexport { ClampPosition } from './types/truncation';\nexport { useIsTouch } from './utils/environment';\nexport { filterFilesByMimeType, getFileAsArrayBuffer, selectFiles } from './utils/fileDialog';\nexport { isTobitEmployee } from './utils/isTobitEmployee';\nexport { getUsableHeight } from './utils/pageProvider';\nexport { uploadFile } from './utils/uploadFile';\nexport type { Theme } from './components/color-scheme-provider/ColorSchemeProvider';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,eAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,eAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,cAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,iBAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,cAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,kBAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,o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CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAAA,SAAA5E,uBAAA2E,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAK,UAAA,GAAAL,CAAA,KAAAU,OAAA,EAAAV,CAAA","ignoreList":[]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
|
+
import ContextMenu from '../context-menu/ContextMenu';
|
|
3
|
+
import Icon from '../icon/Icon';
|
|
4
|
+
import { StyledActionMenuButtonAction, StyledActionMenuButton, StyledActionMenuButtonMenu } from './ActionMenuButton.styles';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A versatile button component that can act as a standard button, a menu trigger, or a split button.
|
|
8
|
+
*/
|
|
9
|
+
const ActionMenuButton = ({
|
|
10
|
+
contextMenuItems,
|
|
11
|
+
icon,
|
|
12
|
+
isDisabled,
|
|
13
|
+
label,
|
|
14
|
+
onClick,
|
|
15
|
+
shouldUseFullWidth = false
|
|
16
|
+
}) => {
|
|
17
|
+
const contextMenuRef = useRef(null);
|
|
18
|
+
const hasDropdown = Array.isArray(contextMenuItems) && contextMenuItems.length > 0;
|
|
19
|
+
const handleActionClick = event => {
|
|
20
|
+
event.stopPropagation();
|
|
21
|
+
console.debug('ActionMenuButton: handleActionClick called', {
|
|
22
|
+
isDisabled,
|
|
23
|
+
hasDropdown,
|
|
24
|
+
typeofOnClick: typeof onClick
|
|
25
|
+
});
|
|
26
|
+
if (typeof onClick === 'function') {
|
|
27
|
+
onClick(event);
|
|
28
|
+
} else if (hasDropdown) {
|
|
29
|
+
contextMenuRef.current?.show();
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const handleMenuClick = event => {
|
|
33
|
+
event.stopPropagation();
|
|
34
|
+
contextMenuRef.current?.show();
|
|
35
|
+
};
|
|
36
|
+
return /*#__PURE__*/React.createElement(StyledActionMenuButton, {
|
|
37
|
+
$shouldUseFullWidth: shouldUseFullWidth
|
|
38
|
+
}, /*#__PURE__*/React.createElement(StyledActionMenuButtonAction, {
|
|
39
|
+
onClick: isDisabled ? undefined : handleActionClick,
|
|
40
|
+
type: "button",
|
|
41
|
+
$isDisabled: isDisabled,
|
|
42
|
+
$isSplit: hasDropdown
|
|
43
|
+
}, typeof icon === 'string' && /*#__PURE__*/React.createElement(Icon, {
|
|
44
|
+
color: "white",
|
|
45
|
+
icons: [icon],
|
|
46
|
+
size: 18
|
|
47
|
+
}), label), hasDropdown && /*#__PURE__*/React.createElement(StyledActionMenuButtonMenu, {
|
|
48
|
+
onClick: isDisabled ? undefined : handleMenuClick,
|
|
49
|
+
type: "button",
|
|
50
|
+
$isDisabled: isDisabled,
|
|
51
|
+
$isSplit: true
|
|
52
|
+
}, /*#__PURE__*/React.createElement(ContextMenu, {
|
|
53
|
+
items: contextMenuItems,
|
|
54
|
+
shouldDisableClick: isDisabled,
|
|
55
|
+
ref: contextMenuRef
|
|
56
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
57
|
+
color: "white",
|
|
58
|
+
icons: ['fa fa-angle-down'],
|
|
59
|
+
size: 18
|
|
60
|
+
}))));
|
|
61
|
+
};
|
|
62
|
+
ActionMenuButton.displayName = 'ActionMenuButton';
|
|
63
|
+
export default ActionMenuButton;
|
|
64
|
+
//# sourceMappingURL=ActionMenuButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionMenuButton.js","names":["React","useRef","ContextMenu","Icon","StyledActionMenuButtonAction","StyledActionMenuButton","StyledActionMenuButtonMenu","ActionMenuButton","contextMenuItems","icon","isDisabled","label","onClick","shouldUseFullWidth","contextMenuRef","hasDropdown","Array","isArray","length","handleActionClick","event","stopPropagation","console","debug","typeofOnClick","current","show","handleMenuClick","createElement","$shouldUseFullWidth","undefined","type","$isDisabled","$isSplit","color","icons","size","items","shouldDisableClick","ref","displayName"],"sources":["../../../../src/components/action-menu-button/ActionMenuButton.tsx"],"sourcesContent":["import React, { FC, MouseEvent, useRef } from 'react';\nimport ContextMenu from '../context-menu/ContextMenu';\nimport type { ContextMenuRef } from '../context-menu/ContextMenu.types';\nimport Icon from '../icon/Icon';\nimport { ActionMenuButtonProps } from './ActionMenuButton.types';\nimport {\n StyledActionMenuButtonAction,\n StyledActionMenuButton,\n StyledActionMenuButtonMenu,\n} from './ActionMenuButton.styles';\n\n/**\n * A versatile button component that can act as a standard button, a menu trigger, or a split button.\n */\nconst ActionMenuButton: FC<ActionMenuButtonProps> = ({\n contextMenuItems,\n icon,\n isDisabled,\n label,\n onClick,\n shouldUseFullWidth = false,\n}) => {\n const contextMenuRef = useRef<ContextMenuRef>(null);\n\n const hasDropdown = Array.isArray(contextMenuItems) && contextMenuItems.length > 0;\n\n const handleActionClick = (event: MouseEvent<HTMLButtonElement>) => {\n event.stopPropagation();\n\n console.debug('ActionMenuButton: handleActionClick called', {\n isDisabled,\n hasDropdown,\n typeofOnClick: typeof onClick,\n });\n\n if (typeof onClick === 'function') {\n onClick(event);\n } else if (hasDropdown) {\n contextMenuRef.current?.show();\n }\n };\n\n const handleMenuClick = (event: MouseEvent<HTMLButtonElement>) => {\n event.stopPropagation();\n\n contextMenuRef.current?.show();\n };\n\n return (\n <StyledActionMenuButton $shouldUseFullWidth={shouldUseFullWidth}>\n <StyledActionMenuButtonAction\n onClick={isDisabled ? undefined : handleActionClick}\n type=\"button\"\n $isDisabled={isDisabled}\n $isSplit={hasDropdown}\n >\n {typeof icon === 'string' && <Icon color=\"white\" icons={[icon]} size={18} />}\n {label}\n </StyledActionMenuButtonAction>\n {hasDropdown && (\n <StyledActionMenuButtonMenu\n onClick={isDisabled ? undefined : handleMenuClick}\n type=\"button\"\n $isDisabled={isDisabled}\n $isSplit\n >\n <ContextMenu\n items={contextMenuItems}\n shouldDisableClick={isDisabled}\n ref={contextMenuRef}\n >\n <Icon color=\"white\" icons={['fa fa-angle-down']} size={18} />\n </ContextMenu>\n </StyledActionMenuButtonMenu>\n )}\n </StyledActionMenuButton>\n );\n};\n\nActionMenuButton.displayName = 'ActionMenuButton';\n\nexport default ActionMenuButton;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAoBC,MAAM,QAAQ,OAAO;AACrD,OAAOC,WAAW,MAAM,6BAA6B;AAErD,OAAOC,IAAI,MAAM,cAAc;AAE/B,SACIC,4BAA4B,EAC5BC,sBAAsB,EACtBC,0BAA0B,QACvB,2BAA2B;;AAElC;AACA;AACA;AACA,MAAMC,gBAA2C,GAAGA,CAAC;EACjDC,gBAAgB;EAChBC,IAAI;EACJC,UAAU;EACVC,KAAK;EACLC,OAAO;EACPC,kBAAkB,GAAG;AACzB,CAAC,KAAK;EACF,MAAMC,cAAc,GAAGb,MAAM,CAAiB,IAAI,CAAC;EAEnD,MAAMc,WAAW,GAAGC,KAAK,CAACC,OAAO,CAACT,gBAAgB,CAAC,IAAIA,gBAAgB,CAACU,MAAM,GAAG,CAAC;EAElF,MAAMC,iBAAiB,GAAIC,KAAoC,IAAK;IAChEA,KAAK,CAACC,eAAe,CAAC,CAAC;IAEvBC,OAAO,CAACC,KAAK,CAAC,4CAA4C,EAAE;MACxDb,UAAU;MACVK,WAAW;MACXS,aAAa,EAAE,OAAOZ;IAC1B,CAAC,CAAC;IAEF,IAAI,OAAOA,OAAO,KAAK,UAAU,EAAE;MAC/BA,OAAO,CAACQ,KAAK,CAAC;IAClB,CAAC,MAAM,IAAIL,WAAW,EAAE;MACpBD,cAAc,CAACW,OAAO,EAAEC,IAAI,CAAC,CAAC;IAClC;EACJ,CAAC;EAED,MAAMC,eAAe,GAAIP,KAAoC,IAAK;IAC9DA,KAAK,CAACC,eAAe,CAAC,CAAC;IAEvBP,cAAc,CAACW,OAAO,EAAEC,IAAI,CAAC,CAAC;EAClC,CAAC;EAED,oBACI1B,KAAA,CAAA4B,aAAA,CAACvB,sBAAsB;IAACwB,mBAAmB,EAAEhB;EAAmB,gBAC5Db,KAAA,CAAA4B,aAAA,CAACxB,4BAA4B;IACzBQ,OAAO,EAAEF,UAAU,GAAGoB,SAAS,GAAGX,iBAAkB;IACpDY,IAAI,EAAC,QAAQ;IACbC,WAAW,EAAEtB,UAAW;IACxBuB,QAAQ,EAAElB;EAAY,GAErB,OAAON,IAAI,KAAK,QAAQ,iBAAIT,KAAA,CAAA4B,aAAA,CAACzB,IAAI;IAAC+B,KAAK,EAAC,OAAO;IAACC,KAAK,EAAE,CAAC1B,IAAI,CAAE;IAAC2B,IAAI,EAAE;EAAG,CAAE,CAAC,EAC3EzB,KACyB,CAAC,EAC9BI,WAAW,iBACRf,KAAA,CAAA4B,aAAA,CAACtB,0BAA0B;IACvBM,OAAO,EAAEF,UAAU,GAAGoB,SAAS,GAAGH,eAAgB;IAClDI,IAAI,EAAC,QAAQ;IACbC,WAAW,EAAEtB,UAAW;IACxBuB,QAAQ;EAAA,gBAERjC,KAAA,CAAA4B,aAAA,CAAC1B,WAAW;IACRmC,KAAK,EAAE7B,gBAAiB;IACxB8B,kBAAkB,EAAE5B,UAAW;IAC/B6B,GAAG,EAAEzB;EAAe,gBAEpBd,KAAA,CAAA4B,aAAA,CAACzB,IAAI;IAAC+B,KAAK,EAAC,OAAO;IAACC,KAAK,EAAE,CAAC,kBAAkB,CAAE;IAACC,IAAI,EAAE;EAAG,CAAE,CACnD,CACW,CAEZ,CAAC;AAEjC,CAAC;AAED7B,gBAAgB,CAACiC,WAAW,GAAG,kBAAkB;AAEjD,eAAejC,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
export const StyledActionMenuButton = styled.div`
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
gap: 2px;
|
|
5
|
+
height: 42px;
|
|
6
|
+
width: ${({
|
|
7
|
+
$shouldUseFullWidth
|
|
8
|
+
}) => $shouldUseFullWidth ? '100%' : 'auto'};
|
|
9
|
+
`;
|
|
10
|
+
export const StyledActionMenuButtonAction = styled.button`
|
|
11
|
+
align-items: center;
|
|
12
|
+
background-color: rgba(30, 30, 30, 0.2);
|
|
13
|
+
border-bottom-left-radius: 21px;
|
|
14
|
+
border-top-left-radius: 21px;
|
|
15
|
+
color: ${({
|
|
16
|
+
theme
|
|
17
|
+
}) => theme.buttonColor ?? 'white'};
|
|
18
|
+
cursor: ${({
|
|
19
|
+
$isDisabled
|
|
20
|
+
}) => $isDisabled ? 'default' : 'pointer'};
|
|
21
|
+
display: flex;
|
|
22
|
+
flex: 1 1 0;
|
|
23
|
+
gap: 10px;
|
|
24
|
+
opacity: ${({
|
|
25
|
+
$isDisabled
|
|
26
|
+
}) => $isDisabled ? 0.5 : 1};
|
|
27
|
+
padding: 0 12px;
|
|
28
|
+
transition: background-color 0.2s ease;
|
|
29
|
+
|
|
30
|
+
&:hover {
|
|
31
|
+
background-color: ${({
|
|
32
|
+
$isDisabled
|
|
33
|
+
}) => $isDisabled ? 'rgba(30, 30, 30, 0.2)' : 'rgba(30, 30, 30, 0.25)'};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
${({
|
|
37
|
+
$isSplit
|
|
38
|
+
}) => !$isSplit && css`
|
|
39
|
+
border-bottom-right-radius: 21px;
|
|
40
|
+
border-top-right-radius: 21px;
|
|
41
|
+
`}
|
|
42
|
+
`;
|
|
43
|
+
export const StyledActionMenuButtonMenu = styled.button`
|
|
44
|
+
align-items: center;
|
|
45
|
+
background-color: rgba(30, 30, 30, 0.2);
|
|
46
|
+
border-bottom-right-radius: 21px;
|
|
47
|
+
border-top-right-radius: 21px;
|
|
48
|
+
color: ${({
|
|
49
|
+
theme
|
|
50
|
+
}) => theme.buttonColor ?? 'white'};
|
|
51
|
+
cursor: ${({
|
|
52
|
+
$isDisabled
|
|
53
|
+
}) => $isDisabled ? 'default' : 'pointer'};
|
|
54
|
+
display: flex;
|
|
55
|
+
flex: 0 0 auto;
|
|
56
|
+
opacity: ${({
|
|
57
|
+
$isDisabled
|
|
58
|
+
}) => $isDisabled ? 0.5 : 1};
|
|
59
|
+
padding: 0 2px 0 0;
|
|
60
|
+
transition: background-color 0.2s ease;
|
|
61
|
+
|
|
62
|
+
&:hover {
|
|
63
|
+
background-color: ${({
|
|
64
|
+
$isDisabled
|
|
65
|
+
}) => $isDisabled ? 'rgba(30, 30, 30, 0.2)' : 'rgba(30, 30, 30, 0.25)'};
|
|
66
|
+
}
|
|
67
|
+
`;
|
|
68
|
+
//# sourceMappingURL=ActionMenuButton.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionMenuButton.styles.js","names":["styled","css","StyledActionMenuButton","div","$shouldUseFullWidth","StyledActionMenuButtonAction","button","theme","buttonColor","$isDisabled","$isSplit","StyledActionMenuButtonMenu"],"sources":["../../../../src/components/action-menu-button/ActionMenuButton.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledActionMenuButtonProps = WithTheme<{\n $shouldUseFullWidth?: boolean;\n}>;\n\nexport const StyledActionMenuButton = styled.div<StyledActionMenuButtonProps>`\n display: inline-flex;\n gap: 2px;\n height: 42px;\n width: ${({ $shouldUseFullWidth }) => ($shouldUseFullWidth ? '100%' : 'auto')};\n`;\n\ntype StyledActionMenuButtonActionProps = WithTheme<{\n $isDisabled?: boolean;\n $isSplit?: boolean;\n}>;\n\nexport const StyledActionMenuButtonAction = styled.button<StyledActionMenuButtonActionProps>`\n align-items: center;\n background-color: rgba(30, 30, 30, 0.2);\n border-bottom-left-radius: 21px;\n border-top-left-radius: 21px;\n color: ${({ theme }) => theme.buttonColor ?? 'white'};\n cursor: ${({ $isDisabled }) => ($isDisabled ? 'default' : 'pointer')};\n display: flex;\n flex: 1 1 0;\n gap: 10px;\n opacity: ${({ $isDisabled }) => ($isDisabled ? 0.5 : 1)};\n padding: 0 12px;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({ $isDisabled }) =>\n $isDisabled ? 'rgba(30, 30, 30, 0.2)' : 'rgba(30, 30, 30, 0.25)'};\n }\n\n ${({ $isSplit }) =>\n !$isSplit &&\n css`\n border-bottom-right-radius: 21px;\n border-top-right-radius: 21px;\n `}\n`;\n\ntype StyledActionMenuButtonMenuProps = WithTheme<{\n $isDisabled?: boolean;\n $isSplit?: boolean;\n}>;\n\nexport const StyledActionMenuButtonMenu = styled.button<StyledActionMenuButtonMenuProps>`\n align-items: center;\n background-color: rgba(30, 30, 30, 0.2);\n border-bottom-right-radius: 21px;\n border-top-right-radius: 21px;\n color: ${({ theme }) => theme.buttonColor ?? 'white'};\n cursor: ${({ $isDisabled }) => ($isDisabled ? 'default' : 'pointer')};\n display: flex;\n flex: 0 0 auto;\n opacity: ${({ $isDisabled }) => ($isDisabled ? 0.5 : 1)};\n padding: 0 2px 0 0;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({ $isDisabled }) =>\n $isDisabled ? 'rgba(30, 30, 30, 0.2)' : 'rgba(30, 30, 30, 0.25)'};\n }\n`;\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAO/C,OAAO,MAAMC,sBAAsB,GAAGF,MAAM,CAACG,GAAgC;AAC7E;AACA;AACA;AACA,aAAa,CAAC;EAAEC;AAAoB,CAAC,KAAMA,mBAAmB,GAAG,MAAM,GAAG,MAAO;AACjF,CAAC;AAOD,OAAO,MAAMC,4BAA4B,GAAGL,MAAM,CAACM,MAAyC;AAC5F;AACA;AACA;AACA;AACA,aAAa,CAAC;EAAEC;AAAM,CAAC,KAAKA,KAAK,CAACC,WAAW,IAAI,OAAO;AACxD,cAAc,CAAC;EAAEC;AAAY,CAAC,KAAMA,WAAW,GAAG,SAAS,GAAG,SAAU;AACxE;AACA;AACA;AACA,eAAe,CAAC;EAAEA;AAAY,CAAC,KAAMA,WAAW,GAAG,GAAG,GAAG,CAAE;AAC3D;AACA;AACA;AACA;AACA,4BAA4B,CAAC;EAAEA;AAAY,CAAC,KAChCA,WAAW,GAAG,uBAAuB,GAAG,wBAAwB;AAC5E;AACA;AACA,MAAM,CAAC;EAAEC;AAAS,CAAC,KACX,CAACA,QAAQ,IACTT,GAAG;AACX;AACA;AACA,SAAS;AACT,CAAC;AAOD,OAAO,MAAMU,0BAA0B,GAAGX,MAAM,CAACM,MAAuC;AACxF;AACA;AACA;AACA;AACA,aAAa,CAAC;EAAEC;AAAM,CAAC,KAAKA,KAAK,CAACC,WAAW,IAAI,OAAO;AACxD,cAAc,CAAC;EAAEC;AAAY,CAAC,KAAMA,WAAW,GAAG,SAAS,GAAG,SAAU;AACxE;AACA;AACA,eAAe,CAAC;EAAEA;AAAY,CAAC,KAAMA,WAAW,GAAG,GAAG,GAAG,CAAE;AAC3D;AACA;AACA;AACA;AACA,4BAA4B,CAAC;EAAEA;AAAY,CAAC,KAChCA,WAAW,GAAG,uBAAuB,GAAG,wBAAwB;AAC5E;AACA,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionMenuButton.types.js","names":[],"sources":["../../../../src/components/action-menu-button/ActionMenuButton.types.ts"],"sourcesContent":["import type { MouseEventHandler, ReactNode } from 'react';\nimport type { ContextMenuItem } from '../context-menu/ContextMenu.types';\n\nexport type ActionMenuButtonProps = {\n /**\n * List of items to display in the dropdown menu.\n * @description Array of menu items. If provided, a dropdown trigger (or the whole button) will open a context menu.\n * @optional\n */\n contextMenuItems?: ContextMenuItem[];\n /**\n * Icon to display on the left side of the text.\n * @description Can be a string identifier for an icon or a ReactNode.\n * @optional\n */\n icon?: string | ReactNode;\n /**\n * Whether the button is disabled.\n * @description If true, the button is non-interactive and displayed in a disabled state.\n * @optional\n * @default false\n */\n isDisabled?: boolean;\n /**\n * The content to be displayed inside the button.\n * @description Should be a string used as the main label of the button.\n */\n label?: string;\n /**\n * Function to call when the primary action (left part) is clicked.\n * @description If provided, this function is called on click. If not provided but menu items exist, the button serves as a menu trigger.\n * @optional\n */\n onClick?: MouseEventHandler<HTMLButtonElement>;\n /**\n * Whether the button should take the full available width.\n * @description If true, the button expands to 100% width of its container.\n * @optional\n * @default false\n */\n shouldUseFullWidth?: boolean;\n};\n"],"mappings":"","ignoreList":[]}
|
package/lib/esm/index.js
CHANGED
|
@@ -5,6 +5,7 @@ export { default as AccordionContent } from './components/accordion/accordion-co
|
|
|
5
5
|
export { default as AccordionGroup } from './components/accordion/accordion-group/AccordionGroup';
|
|
6
6
|
export { default as AccordionIntro } from './components/accordion/accordion-intro/AccordionIntro';
|
|
7
7
|
export { default as AccordionItem } from './components/accordion/accordion-item/AccordionItem';
|
|
8
|
+
export { default as ActionMenuButton } from './components/action-menu-button/ActionMenuButton';
|
|
8
9
|
export { default as AmountControl } from './components/amount-control/AmountControl';
|
|
9
10
|
export { default as VerificationBadge } from './components/verification-badge/VerificationBadge';
|
|
10
11
|
export { AreaContext, default as AreaProvider } from './components/area-provider/AreaContextProvider';
|
package/lib/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","Accordion","AccordionContent","AccordionGroup","AccordionIntro","AccordionItem","AmountControl","VerificationBadge","AreaContext","AreaProvider","Badge","Button","Checkbox","ColorSchemeProvider","useColorScheme","BadgeSize","BadgeDesign","useContainer","ContainerAnchor","DropdownDirection","useIsMeasuredClone","useCombinedRefs","Filter","AnimatedNumber","FileList","FileSelect","DropdownBodyWrapper","ComboBox","ContentCard","HighlightSlider","ContextMenu","ContextMenuAlignment","ExpandableContent","FileInput","STREAMINGSERVICE_FILE_TYPES","TSIMG_FILE_TYPES","FilterButton","FilterButtons","GridImage","GroupedImage","Icon","Input","InputSize","List","ListItemContent","ListItem","MentionFinder","NumberInput","PageProvider","Popup","PopupContent","ProgressBar","PopupAlignment","RadioButtonGroup","RadioButton","ScrollView","SearchBox","SearchInput","SelectButton","SetupWizardItem","SetupWizard","SharingBar","Signature","SliderButton","Slider","SmallWaitCursor","SmallWaitCursorSize","SmallWaitCursorSpeed","TagInput","TextArea","Tooltip","Truncation","MentionFinderPopupAlignment","useElementSize","ContentCardType","isValidFileType","FilterButtonItemShape","FilterButtonSize","ClampPosition","useIsTouch","filterFilesByMimeType","getFileAsArrayBuffer","selectFiles","isTobitEmployee","getUsableHeight","uploadFile"],"sources":["../../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\n\nexport { default as Accordion } from './components/accordion/Accordion';\nexport { default as AccordionContent } from './components/accordion/accordion-content/AccordionContent';\nexport { default as AccordionGroup } from './components/accordion/accordion-group/AccordionGroup';\nexport { default as AccordionIntro } from './components/accordion/accordion-intro/AccordionIntro';\nexport { default as AccordionItem } from './components/accordion/accordion-item/AccordionItem';\nexport { default as AmountControl } from './components/amount-control/AmountControl';\nexport { default as VerificationBadge } from './components/verification-badge/VerificationBadge';\nexport {\n AreaContext,\n default as AreaProvider,\n} from './components/area-provider/AreaContextProvider';\nexport { default as Badge } from './components/badge/Badge';\nexport { default as Button } from './components/button/Button';\nexport { default as Checkbox } from './components/checkbox/Checkbox';\nexport {\n default as ColorSchemeProvider,\n useColorScheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { BadgeSize, BadgeDesign } from './components/badge/Badge.types';\nexport type {\n ColorSchemeContextProps,\n WithTheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { useContainer, ContainerAnchor } from './hooks/container';\nexport { DropdownDirection, type DropdownCoordinates } from './types/dropdown';\nexport { useIsMeasuredClone } from './hooks/element';\nexport { useCombinedRefs } from './hooks/ref';\nexport { default as Filter, type FilterRightIcon } from './components/filter/Filter';\nexport {\n type SortItem,\n type SearchConfig,\n type SortConfig,\n type CheckboxConfig,\n type FilterButtonConfig,\n type FilterRef,\n} from './types/filter';\nexport { default as AnimatedNumber } from './components/animated-number/AnimatedNumber';\nexport {\n default as FileList,\n type IFileItem as FileListItem,\n} from './components/file-list/FileList';\nexport { default as FileSelect } from './components/file-select/FileSelect';\nexport { default as DropdownBodyWrapper } from './components/dropdown-body-wrapper/DropdownBodyWrapper';\nexport {\n default as ComboBox,\n type ComboBoxTextStyles,\n type IComboBoxItem as ComboBoxItem,\n type IComboBoxItems as ComboBoxItems,\n type ComboBoxRef,\n} from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport { default as HighlightSlider } from './components/highlight-slider/HighlightSlider';\nexport type { HighlightSliderItemColors as HighlightSliderColors } from './components/highlight-slider/highlight-slider-item/HighlightSliderItem';\nexport { default as ContextMenu } from './components/context-menu/ContextMenu';\nexport {\n ContextMenuAlignment,\n type ContextMenuCoordinates,\n type ContextMenuItem,\n type ContextMenuProps,\n type ContextMenuRef,\n} from './components/context-menu/ContextMenu.types';\nexport { default as ExpandableContent } from './components/expandable-content/ExpandableContent';\nexport {\n default as FileInput,\n type FileInputRef,\n STREAMINGSERVICE_FILE_TYPES,\n TSIMG_FILE_TYPES,\n} from './components/file-input/FileInput';\nexport { default as FilterButton } from './components/filter-buttons/filter-button/FilterButton';\nexport { default as FilterButtons } from './components/filter-buttons/FilterButtons';\nexport { default as GridImage } from './components/grid-image/GridImage';\nexport { default as GroupedImage } from './components/grouped-image/GroupedImage';\nexport { default as Icon, type IconProps } from './components/icon/Icon';\nexport { default as Input, InputSize } from './components/input/Input';\nexport { default as List } from './components/list/List';\nexport { default as ListItemContent } from './components/list/list-item/list-item-content/ListItemContent';\nexport {\n default as ListItem,\n type ListItemElements,\n type ListItemProps,\n type ListItemRef,\n} from './components/list/list-item/ListItem';\nexport { default as MentionFinder } from './components/mention-finder/MentionFinder';\nexport type { MentionMember } from './components/mention-finder/MentionFinder';\nexport { default as NumberInput } from './components/number-input/NumberInput';\nexport { default as PageProvider } from './components/page-provider/PageProvider';\nexport { default as Popup } from './components/popup/Popup';\nexport { default as PopupContent } from './components/popup/popup-content/PopupContent';\nexport { default as ProgressBar } from './components/progress-bar/ProgressBar';\nexport { PopupAlignment } from './types/popup';\nexport {\n default as RadioButtonGroup,\n type RadioButtonGroupRef,\n} from './components/radio-button/radio-button-group/RadioButtonGroup';\nexport { default as RadioButton } from './components/radio-button/RadioButton';\nexport { default as ScrollView } from './components/scroll-view/ScrollView';\nexport { default as SearchBox } from './components/search-box/SearchBox';\nexport { default as SearchInput } from './components/search-input/SearchInput';\nexport { default as SelectButton } from './components/select-button/SelectButton';\nexport { default as SetupWizardItem } from './components/setup-wizard/setup-wizard-item/SetupWizardItem';\nexport { default as SetupWizard } from './components/setup-wizard/SetupWizard';\nexport type { SetupWizardRef } from './components/setup-wizard/SetupWizard';\nexport { default as SharingBar } from './components/sharing-bar/SharingBar';\nexport { default as Signature } from './components/signature/Signature';\nexport type { SignatureRef } from './components/signature/Signature';\nexport { default as SliderButton } from './components/slider-button/SliderButton';\nexport { default as Slider } from './components/slider/Slider';\nexport {\n default as SmallWaitCursor,\n SmallWaitCursorSize,\n SmallWaitCursorSpeed,\n} from './components/small-wait-cursor/SmallWaitCursor';\nexport type { Tag } from './types/tagInput';\nexport { default as TagInput } from './components/tag-input/TagInput';\nexport type { TagInputRef } from './components/tag-input/TagInput';\nexport { default as TextArea } from './components/text-area/TextArea';\nexport { default as Tooltip } from './components/tooltip/Tooltip';\nexport { default as Truncation } from './components/truncation/Truncation';\nexport { MentionFinderPopupAlignment } from './constants/mentionFinder';\nexport { useElementSize } from './hooks/element';\nexport type { BrowserName } from './types/chayns';\nexport { ContentCardType } from './types/contentCard';\nexport type { FileItem, Image, InternalFileItem, Meta, Video } from './types/file';\nexport { isValidFileType } from './utils/file';\nexport type { FileInputFileItem } from './types/fileInput';\nexport { FilterButtonItemShape, FilterButtonSize } from './types/filterButtons';\nexport type { IFilterButtonItem as FilterButtonItem } from './types/filterButtons';\nexport type { IListItemRightElements } from './types/list';\nexport type { PopupRef } from './types/popup';\nexport type { RadioButtonItem } from './types/radioButton';\nexport type {\n ISearchBoxItem as SearchBoxItem,\n ISearchBoxItems as SearchBoxItems,\n} from './types/searchBox';\nexport type { SelectButtonItem } from './types/selectButton';\nexport type { SliderButtonItem } from './types/slider-button';\nexport { ClampPosition } from './types/truncation';\nexport { useIsTouch } from './utils/environment';\nexport { filterFilesByMimeType, getFileAsArrayBuffer, selectFiles } from './utils/fileDialog';\nexport { isTobitEmployee } from './utils/isTobitEmployee';\nexport { getUsableHeight } from './utils/pageProvider';\nexport { uploadFile } from './utils/uploadFile';\nexport type { Theme } from './components/color-scheme-provider/ColorSchemeProvider';\n"],"mappings":"AAAA;;AAEA,SAASA,OAAO,IAAIC,SAAS,QAAQ,kCAAkC;AACvE,SAASD,OAAO,IAAIE,gBAAgB,QAAQ,2DAA2D;AACvG,SAASF,OAAO,IAAIG,cAAc,QAAQ,uDAAuD;AACjG,SAASH,OAAO,IAAII,cAAc,QAAQ,uDAAuD;AACjG,SAASJ,OAAO,IAAIK,aAAa,QAAQ,qDAAqD;AAC9F,SAASL,OAAO,IAAIM,aAAa,QAAQ,2CAA2C;AACpF,SAASN,OAAO,IAAIO,iBAAiB,QAAQ,mDAAmD;AAChG,SACIC,WAAW,EACXR,OAAO,IAAIS,YAAY,QACpB,gDAAgD;AACvD,SAAST,OAAO,IAAIU,KAAK,QAAQ,0BAA0B;AAC3D,SAASV,OAAO,IAAIW,MAAM,QAAQ,4BAA4B;AAC9D,SAASX,OAAO,IAAIY,QAAQ,QAAQ,gCAAgC;AACpE,SACIZ,OAAO,IAAIa,mBAAmB,EAC9BC,cAAc,QACX,wDAAwD;AAC/D,SAASC,SAAS,EAAEC,WAAW,QAAQ,gCAAgC;AAKvE,SAASC,YAAY,EAAEC,eAAe,QAAQ,mBAAmB;AACjE,SAASC,iBAAiB,QAAkC,kBAAkB;AAC9E,SAASC,kBAAkB,QAAQ,iBAAiB;AACpD,SAASC,eAAe,QAAQ,aAAa;AAC7C,SAASrB,OAAO,IAAIsB,MAAM,QAA8B,4BAA4B;AASpF,SAAStB,OAAO,IAAIuB,cAAc,QAAQ,6CAA6C;AACvF,SACIvB,OAAO,IAAIwB,QAAQ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,EAAEC,oBAAoB,EAAEC,WAAW,QAAQ,oBAAoB;AAC7F,SAASC,eAAe,QAAQ,yBAAyB;AACzD,SAASC,eAAe,QAAQ,sBAAsB;AACtD,SAASC,UAAU,QAAQ,oBAAoB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","Accordion","AccordionContent","AccordionGroup","AccordionIntro","AccordionItem","ActionMenuButton","AmountControl","VerificationBadge","AreaContext","AreaProvider","Badge","Button","Checkbox","ColorSchemeProvider","useColorScheme","BadgeSize","BadgeDesign","useContainer","ContainerAnchor","DropdownDirection","useIsMeasuredClone","useCombinedRefs","Filter","AnimatedNumber","FileList","FileSelect","DropdownBodyWrapper","ComboBox","ContentCard","HighlightSlider","ContextMenu","ContextMenuAlignment","ExpandableContent","FileInput","STREAMINGSERVICE_FILE_TYPES","TSIMG_FILE_TYPES","FilterButton","FilterButtons","GridImage","GroupedImage","Icon","Input","InputSize","List","ListItemContent","ListItem","MentionFinder","NumberInput","PageProvider","Popup","PopupContent","ProgressBar","PopupAlignment","RadioButtonGroup","RadioButton","ScrollView","SearchBox","SearchInput","SelectButton","SetupWizardItem","SetupWizard","SharingBar","Signature","SliderButton","Slider","SmallWaitCursor","SmallWaitCursorSize","SmallWaitCursorSpeed","TagInput","TextArea","Tooltip","Truncation","MentionFinderPopupAlignment","useElementSize","ContentCardType","isValidFileType","FilterButtonItemShape","FilterButtonSize","ClampPosition","useIsTouch","filterFilesByMimeType","getFileAsArrayBuffer","selectFiles","isTobitEmployee","getUsableHeight","uploadFile"],"sources":["../../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\n\nexport { default as Accordion } from './components/accordion/Accordion';\nexport { default as AccordionContent } from './components/accordion/accordion-content/AccordionContent';\nexport { default as AccordionGroup } from './components/accordion/accordion-group/AccordionGroup';\nexport { default as AccordionIntro } from './components/accordion/accordion-intro/AccordionIntro';\nexport { default as AccordionItem } from './components/accordion/accordion-item/AccordionItem';\nexport { default as ActionMenuButton } from './components/action-menu-button/ActionMenuButton';\nexport { default as AmountControl } from './components/amount-control/AmountControl';\nexport { default as VerificationBadge } from './components/verification-badge/VerificationBadge';\nexport {\n AreaContext,\n default as AreaProvider,\n} from './components/area-provider/AreaContextProvider';\nexport { default as Badge } from './components/badge/Badge';\nexport { default as Button } from './components/button/Button';\nexport { default as Checkbox } from './components/checkbox/Checkbox';\nexport {\n default as ColorSchemeProvider,\n useColorScheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { BadgeSize, BadgeDesign } from './components/badge/Badge.types';\nexport type {\n ColorSchemeContextProps,\n WithTheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { useContainer, ContainerAnchor } from './hooks/container';\nexport { DropdownDirection, type DropdownCoordinates } from './types/dropdown';\nexport { useIsMeasuredClone } from './hooks/element';\nexport { useCombinedRefs } from './hooks/ref';\nexport { default as Filter, type FilterRightIcon } from './components/filter/Filter';\nexport {\n type SortItem,\n type SearchConfig,\n type SortConfig,\n type CheckboxConfig,\n type FilterButtonConfig,\n type FilterRef,\n} from './types/filter';\nexport { default as AnimatedNumber } from './components/animated-number/AnimatedNumber';\nexport {\n default as FileList,\n type IFileItem as FileListItem,\n} from './components/file-list/FileList';\nexport { default as FileSelect } from './components/file-select/FileSelect';\nexport { default as DropdownBodyWrapper } from './components/dropdown-body-wrapper/DropdownBodyWrapper';\nexport {\n default as ComboBox,\n type ComboBoxTextStyles,\n type IComboBoxItem as ComboBoxItem,\n type IComboBoxItems as ComboBoxItems,\n type ComboBoxRef,\n} from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport { default as HighlightSlider } from './components/highlight-slider/HighlightSlider';\nexport type { HighlightSliderItemColors as HighlightSliderColors } from './components/highlight-slider/highlight-slider-item/HighlightSliderItem';\nexport { default as ContextMenu } from './components/context-menu/ContextMenu';\nexport {\n ContextMenuAlignment,\n type ContextMenuCoordinates,\n type ContextMenuItem,\n type ContextMenuProps,\n type ContextMenuRef,\n} from './components/context-menu/ContextMenu.types';\nexport { default as ExpandableContent } from './components/expandable-content/ExpandableContent';\nexport {\n default as FileInput,\n type FileInputRef,\n STREAMINGSERVICE_FILE_TYPES,\n TSIMG_FILE_TYPES,\n} from './components/file-input/FileInput';\nexport { default as FilterButton } from './components/filter-buttons/filter-button/FilterButton';\nexport { default as FilterButtons } from './components/filter-buttons/FilterButtons';\nexport { default as GridImage } from './components/grid-image/GridImage';\nexport { default as GroupedImage } from './components/grouped-image/GroupedImage';\nexport { default as Icon, type IconProps } from './components/icon/Icon';\nexport { default as Input, InputSize } from './components/input/Input';\nexport { default as List } from './components/list/List';\nexport { default as ListItemContent } from './components/list/list-item/list-item-content/ListItemContent';\nexport {\n default as ListItem,\n type ListItemElements,\n type ListItemProps,\n type ListItemRef,\n} from './components/list/list-item/ListItem';\nexport { default as MentionFinder } from './components/mention-finder/MentionFinder';\nexport type { MentionMember } from './components/mention-finder/MentionFinder';\nexport { default as NumberInput } from './components/number-input/NumberInput';\nexport { default as PageProvider } from './components/page-provider/PageProvider';\nexport { default as Popup } from './components/popup/Popup';\nexport { default as PopupContent } from './components/popup/popup-content/PopupContent';\nexport { default as ProgressBar } from './components/progress-bar/ProgressBar';\nexport { PopupAlignment } from './types/popup';\nexport {\n default as RadioButtonGroup,\n type RadioButtonGroupRef,\n} from './components/radio-button/radio-button-group/RadioButtonGroup';\nexport { default as RadioButton } from './components/radio-button/RadioButton';\nexport { default as ScrollView } from './components/scroll-view/ScrollView';\nexport { default as SearchBox } from './components/search-box/SearchBox';\nexport { default as SearchInput } from './components/search-input/SearchInput';\nexport { default as SelectButton } from './components/select-button/SelectButton';\nexport { default as SetupWizardItem } from './components/setup-wizard/setup-wizard-item/SetupWizardItem';\nexport { default as SetupWizard } from './components/setup-wizard/SetupWizard';\nexport type { SetupWizardRef } from './components/setup-wizard/SetupWizard';\nexport { default as SharingBar } from './components/sharing-bar/SharingBar';\nexport { default as Signature } from './components/signature/Signature';\nexport type { SignatureRef } from './components/signature/Signature';\nexport { default as SliderButton } from './components/slider-button/SliderButton';\nexport { default as Slider } from './components/slider/Slider';\nexport {\n default as SmallWaitCursor,\n SmallWaitCursorSize,\n SmallWaitCursorSpeed,\n} from './components/small-wait-cursor/SmallWaitCursor';\nexport type { Tag } from './types/tagInput';\nexport { default as TagInput } from './components/tag-input/TagInput';\nexport type { TagInputRef } from './components/tag-input/TagInput';\nexport { default as TextArea } from './components/text-area/TextArea';\nexport { default as Tooltip } from './components/tooltip/Tooltip';\nexport { default as Truncation } from './components/truncation/Truncation';\nexport { MentionFinderPopupAlignment } from './constants/mentionFinder';\nexport { useElementSize } from './hooks/element';\nexport type { BrowserName } from './types/chayns';\nexport { ContentCardType } from './types/contentCard';\nexport type { FileItem, Image, InternalFileItem, Meta, Video } from './types/file';\nexport { isValidFileType } from './utils/file';\nexport type { FileInputFileItem } from './types/fileInput';\nexport { FilterButtonItemShape, FilterButtonSize } from './types/filterButtons';\nexport type { IFilterButtonItem as FilterButtonItem } from './types/filterButtons';\nexport type { IListItemRightElements } from './types/list';\nexport type { PopupRef } from './types/popup';\nexport type { RadioButtonItem } from './types/radioButton';\nexport type {\n ISearchBoxItem as SearchBoxItem,\n ISearchBoxItems as SearchBoxItems,\n} from './types/searchBox';\nexport type { SelectButtonItem } from './types/selectButton';\nexport type { SliderButtonItem } from './types/slider-button';\nexport { ClampPosition } from './types/truncation';\nexport { useIsTouch } from './utils/environment';\nexport { filterFilesByMimeType, getFileAsArrayBuffer, selectFiles } from './utils/fileDialog';\nexport { isTobitEmployee } from './utils/isTobitEmployee';\nexport { getUsableHeight } from './utils/pageProvider';\nexport { uploadFile } from './utils/uploadFile';\nexport type { Theme } from './components/color-scheme-provider/ColorSchemeProvider';\n"],"mappings":"AAAA;;AAEA,SAASA,OAAO,IAAIC,SAAS,QAAQ,kCAAkC;AACvE,SAASD,OAAO,IAAIE,gBAAgB,QAAQ,2DAA2D;AACvG,SAASF,OAAO,IAAIG,cAAc,QAAQ,uDAAuD;A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,eAAe,QAAQ,6DAA6D;AACxG,SAAS5D,OAAO,IAAI6D,WAAW,QAAQ,uCAAuC;AAE9E,SAAS7D,OAAO,IAAI8D,UAAU,QAAQ,qCAAqC;AAC3E,SAAS9D,OAAO,IAAI+D,SAAS,QAAQ,kCAAkC;AAEvE,SAAS/D,OAAO,IAAIgE,YAAY,QAAQ,yCAAyC;AACjF,SAAShE,OAAO,IAAIiE,MAAM,QAAQ,4BAA4B;AAC9D,SACIjE,OAAO,IAAIkE,eAAe,EAC1BC,mBAAmB,EACnBC,oBAAoB,QACjB,gDAAgD;AAEvD,SAASpE,OAAO,IAAIqE,QAAQ,QAAQ,iCAAiC;AAErE,SAASrE,OAAO,IAAIsE,QAAQ,QAAQ,iCAAiC;AACrE,SAAStE,OAAO,IAAIuE,OAAO,QAAQ,8BAA8B;AACjE,SAASvE,OAAO,IAAIwE,UAAU,QAAQ,oCAAoC;AAC1E,SAASC,2BAA2B,QAAQ,2BAA2B;AACvE,SAASC,cAAc,QAAQ,iBAAiB;AAEhD,SAASC,eAAe,QAAQ,qBAAqB;AAErD,SAASC,eAAe,QAAQ,cAAc;AAE9C,SAASC,qBAAqB,EAAEC,gBAAgB,QAAQ,uBAAuB;AAW/E,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,UAAU,QAAQ,qBAAqB;AAChD,SAASC,qBAAqB,EAAEC,oBAAoB,EAAEC,WAAW,QAAQ,oBAAoB;AAC7F,SAASC,eAAe,QAAQ,yBAAyB;AACzD,SAASC,eAAe,QAAQ,sBAAsB;AACtD,SAASC,UAAU,QAAQ,oBAAoB","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ActionMenuButtonProps } from './ActionMenuButton.types';
|
|
3
|
+
/**
|
|
4
|
+
* A versatile button component that can act as a standard button, a menu trigger, or a split button.
|
|
5
|
+
*/
|
|
6
|
+
declare const ActionMenuButton: FC<ActionMenuButtonProps>;
|
|
7
|
+
export default ActionMenuButton;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';
|
|
2
|
+
type StyledActionMenuButtonProps = WithTheme<{
|
|
3
|
+
$shouldUseFullWidth?: boolean;
|
|
4
|
+
}>;
|
|
5
|
+
export declare const StyledActionMenuButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledActionMenuButtonProps>> & string;
|
|
6
|
+
type StyledActionMenuButtonActionProps = WithTheme<{
|
|
7
|
+
$isDisabled?: boolean;
|
|
8
|
+
$isSplit?: boolean;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const StyledActionMenuButtonAction: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, StyledActionMenuButtonActionProps>> & string;
|
|
11
|
+
type StyledActionMenuButtonMenuProps = WithTheme<{
|
|
12
|
+
$isDisabled?: boolean;
|
|
13
|
+
$isSplit?: boolean;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const StyledActionMenuButtonMenu: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, StyledActionMenuButtonMenuProps>> & string;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { MouseEventHandler, ReactNode } from 'react';
|
|
2
|
+
import type { ContextMenuItem } from '../context-menu/ContextMenu.types';
|
|
3
|
+
export type ActionMenuButtonProps = {
|
|
4
|
+
/**
|
|
5
|
+
* List of items to display in the dropdown menu.
|
|
6
|
+
* @description Array of menu items. If provided, a dropdown trigger (or the whole button) will open a context menu.
|
|
7
|
+
* @optional
|
|
8
|
+
*/
|
|
9
|
+
contextMenuItems?: ContextMenuItem[];
|
|
10
|
+
/**
|
|
11
|
+
* Icon to display on the left side of the text.
|
|
12
|
+
* @description Can be a string identifier for an icon or a ReactNode.
|
|
13
|
+
* @optional
|
|
14
|
+
*/
|
|
15
|
+
icon?: string | ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Whether the button is disabled.
|
|
18
|
+
* @description If true, the button is non-interactive and displayed in a disabled state.
|
|
19
|
+
* @optional
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
isDisabled?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The content to be displayed inside the button.
|
|
25
|
+
* @description Should be a string used as the main label of the button.
|
|
26
|
+
*/
|
|
27
|
+
label?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Function to call when the primary action (left part) is clicked.
|
|
30
|
+
* @description If provided, this function is called on click. If not provided but menu items exist, the button serves as a menu trigger.
|
|
31
|
+
* @optional
|
|
32
|
+
*/
|
|
33
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
34
|
+
/**
|
|
35
|
+
* Whether the button should take the full available width.
|
|
36
|
+
* @description If true, the button expands to 100% width of its container.
|
|
37
|
+
* @optional
|
|
38
|
+
* @default false
|
|
39
|
+
*/
|
|
40
|
+
shouldUseFullWidth?: boolean;
|
|
41
|
+
};
|
package/lib/types/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { default as AccordionContent } from './components/accordion/accordion-co
|
|
|
3
3
|
export { default as AccordionGroup } from './components/accordion/accordion-group/AccordionGroup';
|
|
4
4
|
export { default as AccordionIntro } from './components/accordion/accordion-intro/AccordionIntro';
|
|
5
5
|
export { default as AccordionItem } from './components/accordion/accordion-item/AccordionItem';
|
|
6
|
+
export { default as ActionMenuButton } from './components/action-menu-button/ActionMenuButton';
|
|
6
7
|
export { default as AmountControl } from './components/amount-control/AmountControl';
|
|
7
8
|
export { default as VerificationBadge } from './components/verification-badge/VerificationBadge';
|
|
8
9
|
export { AreaContext, default as AreaProvider, } from './components/area-provider/AreaContextProvider';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chayns-components/core",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.1396",
|
|
4
4
|
"description": "A set of beautiful React components for developing your own applications with chayns.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"browserslist": [
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "f6962ac3328f7451ce05503dca47547bee58d5aa"
|
|
90
90
|
}
|