@linzjs/step-ag-grid 31.2.2 → 31.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/GridTheme.scss +5 -1
- package/dist/src/lui/ActionButton.d.ts +2 -1
- package/dist/step-ag-grid.cjs +2 -2
- package/dist/step-ag-grid.cjs.map +1 -1
- package/dist/step-ag-grid.esm.js +2 -2
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/lui/ActionButton.tsx +3 -0
- package/src/styles/GridTheme.scss +5 -1
package/dist/step-ag-grid.esm.js
CHANGED
|
@@ -64865,7 +64865,7 @@ styleInject(css_248z);
|
|
|
64865
64865
|
|
|
64866
64866
|
// Kept this less than one second, so I don't have issues with waitFor as it defaults to 1s
|
|
64867
64867
|
const minimumInProgressTimeMs = 950;
|
|
64868
|
-
const ActionButton = ({ icon, name, inProgressName, disabled, dataTestId, style, className, title, onClick, size = 'sm', iconPosition = 'left', level = 'tertiary', 'aria-label': ariaLabel, }) => {
|
|
64868
|
+
const ActionButton = ({ icon, name, inProgressName, disabled, dataTestId, style, className, title, onClick, size = 'sm', iconPosition = 'left', level = 'tertiary', intent, 'aria-label': ariaLabel, }) => {
|
|
64869
64869
|
const [inProgress, setInProgress] = useState(false);
|
|
64870
64870
|
const lastInProgress = usePrevious(inProgress ?? false);
|
|
64871
64871
|
const [localInProgress, setLocalInProgress, setLocalInProgressDeferred] = useStateDeferred(inProgress);
|
|
@@ -64880,7 +64880,7 @@ const ActionButton = ({ icon, name, inProgressName, disabled, dataTestId, style,
|
|
|
64880
64880
|
}
|
|
64881
64881
|
}, [inProgress, lastInProgress, setLocalInProgress, setLocalInProgressDeferred]);
|
|
64882
64882
|
const buttonText = (jsxs("span", { className: 'ActionButton-minimalArea', children: [jsx("span", { className: 'ActionButton-minimalAreaDisplay', children: (localInProgress ? inProgressName : name) ?? name }), jsx("span", { className: 'ActionButton-minimalAreaExpand', children: name })] }));
|
|
64883
|
-
return (jsxs(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: () => {
|
|
64883
|
+
return (jsxs(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: () => {
|
|
64884
64884
|
const promise = onClick();
|
|
64885
64885
|
const isPromise = typeof promise !== 'undefined';
|
|
64886
64886
|
if (isPromise) {
|