@linzjs/step-ag-grid 31.2.2 → 31.2.3
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.
|
@@ -14,7 +14,8 @@ export interface ActionButtonProps {
|
|
|
14
14
|
className?: 'ActionButton-fill' | 'ActionButton-tight' | string;
|
|
15
15
|
onClick: () => Promise<void> | void;
|
|
16
16
|
level?: LuiButtonProps['level'];
|
|
17
|
+
intent?: LuiButtonProps['intent'];
|
|
17
18
|
style?: CSSProperties;
|
|
18
19
|
disabled?: boolean;
|
|
19
20
|
}
|
|
20
|
-
export declare const ActionButton: ({ icon, name, inProgressName, disabled, dataTestId, style, className, title, onClick, size, iconPosition, level, "aria-label": ariaLabel, }: ActionButtonProps) => ReactElement;
|
|
21
|
+
export declare const ActionButton: ({ icon, name, inProgressName, disabled, dataTestId, style, className, title, onClick, size, iconPosition, level, intent, "aria-label": ariaLabel, }: ActionButtonProps) => ReactElement;
|
package/dist/step-ag-grid.cjs
CHANGED
|
@@ -64867,7 +64867,7 @@ styleInject(css_248z);
|
|
|
64867
64867
|
|
|
64868
64868
|
// Kept this less than one second, so I don't have issues with waitFor as it defaults to 1s
|
|
64869
64869
|
const minimumInProgressTimeMs = 950;
|
|
64870
|
-
const ActionButton = ({ icon, name, inProgressName, disabled, dataTestId, style, className, title, onClick, size = 'sm', iconPosition = 'left', level = 'tertiary', 'aria-label': ariaLabel, }) => {
|
|
64870
|
+
const ActionButton = ({ icon, name, inProgressName, disabled, dataTestId, style, className, title, onClick, size = 'sm', iconPosition = 'left', level = 'tertiary', intent, 'aria-label': ariaLabel, }) => {
|
|
64871
64871
|
const [inProgress, setInProgress] = React13.useState(false);
|
|
64872
64872
|
const lastInProgress = usePrevious(inProgress ?? false);
|
|
64873
64873
|
const [localInProgress, setLocalInProgress, setLocalInProgressDeferred] = useStateDeferred(inProgress);
|
|
@@ -64882,7 +64882,7 @@ const ActionButton = ({ icon, name, inProgressName, disabled, dataTestId, style,
|
|
|
64882
64882
|
}
|
|
64883
64883
|
}, [inProgress, lastInProgress, setLocalInProgress, setLocalInProgressDeferred]);
|
|
64884
64884
|
const buttonText = (jsxRuntime.jsxs("span", { className: 'ActionButton-minimalArea', children: [jsxRuntime.jsx("span", { className: 'ActionButton-minimalAreaDisplay', children: (localInProgress ? inProgressName : name) ?? name }), jsxRuntime.jsx("span", { className: 'ActionButton-minimalAreaExpand', children: name })] }));
|
|
64885
|
-
return (jsxRuntime.jsxs(lui.LuiButton, { "data-testid": dataTestId, type: 'button', level: level, title: title ?? ariaLabel ?? name, buttonProps: { 'aria-label': ariaLabel ?? name }, className: clsx('lui-button-icon-right', 'ActionButton', className, localInProgress && 'ActionButton-inProgress', name != null && !className?.includes('ActionButton-fill') && 'ActionButton-minimal', name == null && 'ActionButton-iconOnly'), size: 'lg', style: style, onClick: () => {
|
|
64885
|
+
return (jsxRuntime.jsxs(lui.LuiButton, { "data-testid": dataTestId, type: 'button', level: level, intent: intent, title: title ?? ariaLabel ?? name, buttonProps: { 'aria-label': ariaLabel ?? name }, className: clsx('lui-button-icon-right', 'ActionButton', className, localInProgress && 'ActionButton-inProgress', name != null && !className?.includes('ActionButton-fill') && 'ActionButton-minimal', name == null && 'ActionButton-iconOnly'), size: 'lg', style: style, onClick: () => {
|
|
64886
64886
|
const promise = onClick();
|
|
64887
64887
|
const isPromise = typeof promise !== 'undefined';
|
|
64888
64888
|
if (isPromise) {
|