@linzjs/step-ag-grid 7.0.0 → 7.0.1
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/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/src/lui/ActionButton.d.ts +3 -2
- package/dist/step-ag-grid.esm.js +4 -4
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/lui/ActionButton.scss +10 -0
- package/src/lui/ActionButton.tsx +11 -3
- package/src/react-menu3/components/ControlledMenu.tsx +1 -1
- package/src/stories/components/ActionButton.stories.tsx +2 -0
- package/src/stories/grid/FormTest.tsx +1 -1
|
@@ -11,9 +11,10 @@ export interface ActionButtonProps {
|
|
|
11
11
|
dataTestId?: string;
|
|
12
12
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | "ns";
|
|
13
13
|
iconPosition?: "left" | "right";
|
|
14
|
-
className?: string;
|
|
14
|
+
className?: "ActionButton-fill" | string;
|
|
15
15
|
onAction: () => Promise<void> | void;
|
|
16
16
|
externalSetInProgress?: () => void;
|
|
17
17
|
level?: LuiButtonProps["level"];
|
|
18
|
+
style?: React.CSSProperties;
|
|
18
19
|
}
|
|
19
|
-
export declare const ActionButton: ({ icon, name, inProgressName, dataTestId, className, title, onAction, externalSetInProgress, size, iconPosition, level, "aria-label": ariaLabel, }: ActionButtonProps) => JSX.Element;
|
|
20
|
+
export declare const ActionButton: ({ icon, name, inProgressName, dataTestId, style, className, title, onAction, externalSetInProgress, size, iconPosition, level, "aria-label": ariaLabel, }: ActionButtonProps) => JSX.Element;
|
package/dist/step-ag-grid.esm.js
CHANGED
|
@@ -1397,7 +1397,7 @@ var ControlledMenuFr = function (_a, externalRef) {
|
|
|
1397
1397
|
if (activeElement !== firstInputEl && activeElement !== lastInputEl)
|
|
1398
1398
|
return;
|
|
1399
1399
|
var isTextArea = activeElement.nodeName === "TEXTAREA";
|
|
1400
|
-
var suppressEnterAutoSave = activeElement.getAttribute("data-
|
|
1400
|
+
var suppressEnterAutoSave = activeElement.getAttribute("data-disableenterautosave") || isTextArea;
|
|
1401
1401
|
var allowTabToSave = activeElement.getAttribute("data-allowtabtoSave");
|
|
1402
1402
|
var invokeSave = function (reason) {
|
|
1403
1403
|
var _a, _b;
|
|
@@ -4210,7 +4210,7 @@ var GridFormSubComponentTextArea = function (props) {
|
|
|
4210
4210
|
return (jsx("div", __assign({ className: clsx("FreeTextInput LuiDeprecatedForms", props.className) }, { children: jsx(TextAreaInput, { className: "free-text-input", value: value, onChange: function (e) { return setValue(e.target.value); }, error: invalid(), helpText: helpText, autoFocus: true, placeholder: props.placeholder }) })));
|
|
4211
4211
|
};
|
|
4212
4212
|
|
|
4213
|
-
var css_248z = ".ActionButton{align-items:center;display:flex}.ActionButton .LuiIcon{margin:0 4px!important}.ActionButton-minimalArea{position:relative}.ActionButton-minimalAreaDisplay{position:absolute}.ActionButton-minimalAreaExpand{visibility:hidden}.ActionButton-inProgress{background-color:#e2f3f7!important;color:#007198!important;cursor:progress}.ActionButton-inProgress svg *{fill:#0000!important}";
|
|
4213
|
+
var css_248z = ".ActionButton{align-items:center;display:flex}.ActionButton-minimal{padding-right:38px!important}.ActionButton .LuiIcon{margin:0 4px!important}.ActionButton-minimalArea{position:relative}.ActionButton-minimalAreaDisplay{position:absolute}.ActionButton-minimalAreaExpand{visibility:hidden}.ActionButton-inProgress{background-color:#e2f3f7!important;color:#007198!important;cursor:progress}.ActionButton-inProgress svg *{fill:#0000!important}.ActionButton-fill{justify-content:center;width:100%}";
|
|
4214
4214
|
styleInject(css_248z);
|
|
4215
4215
|
|
|
4216
4216
|
/**
|
|
@@ -4283,7 +4283,7 @@ var useStateDeferred = function (initialValue) {
|
|
|
4283
4283
|
var minimumInProgressTimeMs = 950;
|
|
4284
4284
|
var ActionButton = function (_a) {
|
|
4285
4285
|
var _b, _c, _d;
|
|
4286
|
-
var icon = _a.icon, name = _a.name, inProgressName = _a.inProgressName, dataTestId = _a.dataTestId, className = _a.className, title = _a.title, onAction = _a.onAction, externalSetInProgress = _a.externalSetInProgress, _e = _a.size, size = _e === void 0 ? "sm" : _e, _f = _a.iconPosition, iconPosition = _f === void 0 ? "left" : _f, _g = _a.level, level = _g === void 0 ? "tertiary" : _g, ariaLabel = _a["aria-label"];
|
|
4286
|
+
var icon = _a.icon, name = _a.name, inProgressName = _a.inProgressName, dataTestId = _a.dataTestId, style = _a.style, className = _a.className, title = _a.title, onAction = _a.onAction, externalSetInProgress = _a.externalSetInProgress, _e = _a.size, size = _e === void 0 ? "sm" : _e, _f = _a.iconPosition, iconPosition = _f === void 0 ? "left" : _f, _g = _a.level, level = _g === void 0 ? "tertiary" : _g, ariaLabel = _a["aria-label"];
|
|
4287
4287
|
var _h = useState(false), inProgress = _h[0], setInProgress = _h[1];
|
|
4288
4288
|
var lastInProgress = usePrevious(inProgress !== null && inProgress !== void 0 ? inProgress : false);
|
|
4289
4289
|
var _j = useStateDeferred(inProgress), localInProgress = _j[0], setLocalInProgress = _j[1], setLocalInProgressDeferred = _j[2];
|
|
@@ -4293,7 +4293,7 @@ var ActionButton = function (_a) {
|
|
|
4293
4293
|
inProgress ? setLocalInProgress(true) : setLocalInProgressDeferred(false, minimumInProgressTimeMs);
|
|
4294
4294
|
}, [inProgress, lastInProgress, setLocalInProgress, setLocalInProgressDeferred]);
|
|
4295
4295
|
var buttonText = (jsxs("span", __assign({ className: "ActionButton-minimalArea" }, { children: [jsx("span", __assign({ className: "ActionButton-minimalAreaDisplay" }, { children: (_b = (localInProgress ? inProgressName : name)) !== null && _b !== void 0 ? _b : name })), jsx("span", __assign({ className: "ActionButton-minimalAreaExpand" }, { children: name }))] })));
|
|
4296
|
-
return (jsxs(LuiButton, __assign({ "data-testid": dataTestId, type: "button", level: level, title: (_c = title !== null && title !== void 0 ? title : ariaLabel) !== null && _c !== void 0 ? _c : name, "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : name, className: clsx("lui-button-icon-right", "ActionButton", className, localInProgress && "ActionButton-inProgress"), size: "lg", style: name == null
|
|
4296
|
+
return (jsxs(LuiButton, __assign({ "data-testid": dataTestId, type: "button", level: level, title: (_c = title !== null && title !== void 0 ? title : ariaLabel) !== null && _c !== void 0 ? _c : name, "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : name, className: clsx("lui-button-icon-right", "ActionButton", className, localInProgress && "ActionButton-inProgress", name != null && !(className === null || className === void 0 ? void 0 : className.includes("ActionButton-fill")) && "ActionButton-minimal"), size: "lg", style: __assign(__assign({}, (name == null && { padding: "8px 5px" })), style), onClick: function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
4297
4297
|
var promise, isPromise;
|
|
4298
4298
|
return __generator(this, function (_a) {
|
|
4299
4299
|
switch (_a.label) {
|