@availity/mui-stepper 0.3.3 → 1.0.0-alpha.0
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/CHANGELOG.md +28 -0
- package/dist/index.js +246 -200
- package/dist/index.mjs +226 -180
- package/package.json +18 -9
- package/src/lib/Step.stories.tsx +1 -1
- package/src/lib/StepButton.stories.tsx +1 -1
- package/src/lib/StepLabel.stories.tsx +4 -2
- package/src/lib/Stepper.stories.tsx +1 -1
- /package/{introduction.stories.mdx → introduction.mdx} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -53,9 +53,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
53
53
|
mod
|
|
54
54
|
));
|
|
55
55
|
|
|
56
|
-
// ../../node_modules/
|
|
56
|
+
// ../../node_modules/react-is/cjs/react-is.production.min.js
|
|
57
57
|
var require_react_is_production_min = __commonJS({
|
|
58
|
-
"../../node_modules/
|
|
58
|
+
"../../node_modules/react-is/cjs/react-is.production.min.js"(exports) {
|
|
59
59
|
"use strict";
|
|
60
60
|
var b = "function" === typeof Symbol && Symbol.for;
|
|
61
61
|
var c = b ? Symbol.for("react.element") : 60103;
|
|
@@ -166,9 +166,9 @@ var require_react_is_production_min = __commonJS({
|
|
|
166
166
|
}
|
|
167
167
|
});
|
|
168
168
|
|
|
169
|
-
// ../../node_modules/
|
|
169
|
+
// ../../node_modules/react-is/cjs/react-is.development.js
|
|
170
170
|
var require_react_is_development = __commonJS({
|
|
171
|
-
"../../node_modules/
|
|
171
|
+
"../../node_modules/react-is/cjs/react-is.development.js"(exports) {
|
|
172
172
|
"use strict";
|
|
173
173
|
if (process.env.NODE_ENV !== "production") {
|
|
174
174
|
(function() {
|
|
@@ -321,9 +321,9 @@ var require_react_is_development = __commonJS({
|
|
|
321
321
|
}
|
|
322
322
|
});
|
|
323
323
|
|
|
324
|
-
// ../../node_modules/
|
|
324
|
+
// ../../node_modules/react-is/index.js
|
|
325
325
|
var require_react_is = __commonJS({
|
|
326
|
-
"../../node_modules/
|
|
326
|
+
"../../node_modules/react-is/index.js"(exports, module) {
|
|
327
327
|
"use strict";
|
|
328
328
|
if (process.env.NODE_ENV === "production") {
|
|
329
329
|
module.exports = require_react_is_production_min();
|
|
@@ -1039,12 +1039,9 @@ import { jsx as jsx5 } from "react/jsx-runtime";
|
|
|
1039
1039
|
var StepIcon = (_a) => {
|
|
1040
1040
|
var _b = _a, { error, completed, warning } = _b, rest = __objRest(_b, ["error", "completed", "warning"]);
|
|
1041
1041
|
let tag = null;
|
|
1042
|
-
if (error)
|
|
1043
|
-
|
|
1044
|
-
if (
|
|
1045
|
-
tag = (props) => /* @__PURE__ */ jsx5(WarningCircleIcon, __spreadValues({ color: "warning" }, props));
|
|
1046
|
-
if (completed)
|
|
1047
|
-
tag = SuccessCircleIcon;
|
|
1042
|
+
if (error) tag = WarningCircleIcon;
|
|
1043
|
+
if (warning) tag = (props) => /* @__PURE__ */ jsx5(WarningCircleIcon, __spreadValues({ color: "warning" }, props));
|
|
1044
|
+
if (completed) tag = SuccessCircleIcon;
|
|
1048
1045
|
return /* @__PURE__ */ jsx5(MuiStepIcon, __spreadProps(__spreadValues({}, rest), { error, completed, as: tag }));
|
|
1049
1046
|
};
|
|
1050
1047
|
|
|
@@ -1106,43 +1103,11 @@ var IconButton = forwardRef2((props, ref) => {
|
|
|
1106
1103
|
// ../button/src/lib/LoadingButton.tsx
|
|
1107
1104
|
import { forwardRef as forwardRef4 } from "react";
|
|
1108
1105
|
|
|
1109
|
-
// ../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
|
|
1110
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
1111
|
-
if (source == null)
|
|
1112
|
-
return {};
|
|
1113
|
-
var target = {};
|
|
1114
|
-
var sourceKeys = Object.keys(source);
|
|
1115
|
-
var key, i;
|
|
1116
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
1117
|
-
key = sourceKeys[i];
|
|
1118
|
-
if (excluded.indexOf(key) >= 0)
|
|
1119
|
-
continue;
|
|
1120
|
-
target[key] = source[key];
|
|
1121
|
-
}
|
|
1122
|
-
return target;
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
|
-
// ../../node_modules/@babel/runtime/helpers/esm/extends.js
|
|
1126
|
-
function _extends() {
|
|
1127
|
-
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
1128
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1129
|
-
var source = arguments[i];
|
|
1130
|
-
for (var key in source) {
|
|
1131
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1132
|
-
target[key] = source[key];
|
|
1133
|
-
}
|
|
1134
|
-
}
|
|
1135
|
-
}
|
|
1136
|
-
return target;
|
|
1137
|
-
};
|
|
1138
|
-
return _extends.apply(this, arguments);
|
|
1139
|
-
}
|
|
1140
|
-
|
|
1141
1106
|
// ../../node_modules/@mui/lab/LoadingButton/LoadingButton.js
|
|
1142
1107
|
var import_prop_types = __toESM(require_prop_types());
|
|
1143
1108
|
import * as React from "react";
|
|
1144
1109
|
|
|
1145
|
-
// ../../node_modules/@mui/
|
|
1110
|
+
// ../../node_modules/@mui/utils/esm/chainPropTypes/chainPropTypes.js
|
|
1146
1111
|
function chainPropTypes(propType1, propType2) {
|
|
1147
1112
|
if (process.env.NODE_ENV === "production") {
|
|
1148
1113
|
return () => null;
|
|
@@ -1152,34 +1117,61 @@ function chainPropTypes(propType1, propType2) {
|
|
|
1152
1117
|
};
|
|
1153
1118
|
}
|
|
1154
1119
|
|
|
1155
|
-
// ../../node_modules/@mui/
|
|
1120
|
+
// ../../node_modules/@mui/utils/esm/resolveProps/resolveProps.js
|
|
1156
1121
|
function resolveProps(defaultProps, props) {
|
|
1157
|
-
const output =
|
|
1158
|
-
|
|
1159
|
-
if (
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1122
|
+
const output = __spreadValues({}, props);
|
|
1123
|
+
for (const key in defaultProps) {
|
|
1124
|
+
if (Object.prototype.hasOwnProperty.call(defaultProps, key)) {
|
|
1125
|
+
const propName = key;
|
|
1126
|
+
if (propName === "components" || propName === "slots") {
|
|
1127
|
+
output[propName] = __spreadValues(__spreadValues({}, defaultProps[propName]), output[propName]);
|
|
1128
|
+
} else if (propName === "componentsProps" || propName === "slotProps") {
|
|
1129
|
+
const defaultSlotProps = defaultProps[propName];
|
|
1130
|
+
const slotProps = props[propName];
|
|
1131
|
+
if (!slotProps) {
|
|
1132
|
+
output[propName] = defaultSlotProps || {};
|
|
1133
|
+
} else if (!defaultSlotProps) {
|
|
1134
|
+
output[propName] = slotProps;
|
|
1135
|
+
} else {
|
|
1136
|
+
output[propName] = __spreadValues({}, slotProps);
|
|
1137
|
+
for (const slotKey in defaultSlotProps) {
|
|
1138
|
+
if (Object.prototype.hasOwnProperty.call(defaultSlotProps, slotKey)) {
|
|
1139
|
+
const slotPropName = slotKey;
|
|
1140
|
+
output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
} else if (output[propName] === void 0) {
|
|
1145
|
+
output[propName] = defaultProps[propName];
|
|
1174
1146
|
}
|
|
1175
|
-
} else if (output[propName] === void 0) {
|
|
1176
|
-
output[propName] = defaultProps[propName];
|
|
1177
1147
|
}
|
|
1178
|
-
}
|
|
1148
|
+
}
|
|
1149
|
+
return output;
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
// ../../node_modules/@mui/utils/esm/composeClasses/composeClasses.js
|
|
1153
|
+
function composeClasses(slots, getUtilityClass, classes = void 0) {
|
|
1154
|
+
const output = {};
|
|
1155
|
+
for (const slotName in slots) {
|
|
1156
|
+
const slot = slots[slotName];
|
|
1157
|
+
let buffer = "";
|
|
1158
|
+
let start = true;
|
|
1159
|
+
for (let i = 0; i < slot.length; i += 1) {
|
|
1160
|
+
const value = slot[i];
|
|
1161
|
+
if (value) {
|
|
1162
|
+
buffer += (start === true ? "" : " ") + getUtilityClass(value);
|
|
1163
|
+
start = false;
|
|
1164
|
+
if (classes && classes[value]) {
|
|
1165
|
+
buffer += " " + classes[value];
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
output[slotName] = buffer;
|
|
1170
|
+
}
|
|
1179
1171
|
return output;
|
|
1180
1172
|
}
|
|
1181
1173
|
|
|
1182
|
-
// ../../node_modules/@mui/
|
|
1174
|
+
// ../../node_modules/@mui/utils/esm/ClassNameGenerator/ClassNameGenerator.js
|
|
1183
1175
|
var defaultGenerator = (componentName) => componentName;
|
|
1184
1176
|
var createClassNameGenerator = () => {
|
|
1185
1177
|
let generate = defaultGenerator;
|
|
@@ -1198,7 +1190,7 @@ var createClassNameGenerator = () => {
|
|
|
1198
1190
|
var ClassNameGenerator = createClassNameGenerator();
|
|
1199
1191
|
var ClassNameGenerator_default = ClassNameGenerator;
|
|
1200
1192
|
|
|
1201
|
-
// ../../node_modules/@mui/
|
|
1193
|
+
// ../../node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js
|
|
1202
1194
|
var globalStateClasses = {
|
|
1203
1195
|
active: "active",
|
|
1204
1196
|
checked: "checked",
|
|
@@ -1218,7 +1210,7 @@ function generateUtilityClass(componentName, slot, globalStatePrefix = "Mui") {
|
|
|
1218
1210
|
return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator_default.generate(componentName)}-${slot}`;
|
|
1219
1211
|
}
|
|
1220
1212
|
|
|
1221
|
-
// ../../node_modules/@mui/
|
|
1213
|
+
// ../../node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js
|
|
1222
1214
|
function generateUtilityClasses(componentName, slots, globalStatePrefix = "Mui") {
|
|
1223
1215
|
const result = {};
|
|
1224
1216
|
slots.forEach((slot) => {
|
|
@@ -1228,49 +1220,24 @@ function generateUtilityClasses(componentName, slots, globalStatePrefix = "Mui")
|
|
|
1228
1220
|
}
|
|
1229
1221
|
|
|
1230
1222
|
// ../../node_modules/@mui/lab/LoadingButton/LoadingButton.js
|
|
1231
|
-
import { capitalize, unstable_useId as useId } from "@mui/material/utils";
|
|
1232
|
-
|
|
1233
|
-
// ../../node_modules/@mui/base/node_modules/@mui/utils/composeClasses/composeClasses.js
|
|
1234
|
-
function composeClasses(slots, getUtilityClass, classes = void 0) {
|
|
1235
|
-
const output = {};
|
|
1236
|
-
Object.keys(slots).forEach(
|
|
1237
|
-
// `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
|
|
1238
|
-
// @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208
|
|
1239
|
-
(slot) => {
|
|
1240
|
-
output[slot] = slots[slot].reduce((acc, key) => {
|
|
1241
|
-
if (key) {
|
|
1242
|
-
const utilityClass = getUtilityClass(key);
|
|
1243
|
-
if (utilityClass !== "") {
|
|
1244
|
-
acc.push(utilityClass);
|
|
1245
|
-
}
|
|
1246
|
-
if (classes && classes[key]) {
|
|
1247
|
-
acc.push(classes[key]);
|
|
1248
|
-
}
|
|
1249
|
-
}
|
|
1250
|
-
return acc;
|
|
1251
|
-
}, []).join(" ");
|
|
1252
|
-
}
|
|
1253
|
-
);
|
|
1254
|
-
return output;
|
|
1255
|
-
}
|
|
1256
|
-
|
|
1257
|
-
// ../../node_modules/@mui/lab/LoadingButton/LoadingButton.js
|
|
1258
|
-
import { styled, useThemeProps } from "@mui/material/styles";
|
|
1223
|
+
import { capitalize, unstable_useId as useId, unstable_memoTheme as memoTheme } from "@mui/material/utils";
|
|
1224
|
+
import { useDefaultProps } from "@mui/material/DefaultPropsProvider";
|
|
1259
1225
|
import Button2 from "@mui/material/Button";
|
|
1260
1226
|
import { ButtonGroupContext } from "@mui/material/ButtonGroup";
|
|
1261
1227
|
import CircularProgress from "@mui/material/CircularProgress";
|
|
1262
1228
|
|
|
1229
|
+
// ../../node_modules/@mui/lab/zero-styled/index.js
|
|
1230
|
+
import { styled } from "@mui/material/styles";
|
|
1231
|
+
|
|
1263
1232
|
// ../../node_modules/@mui/lab/LoadingButton/loadingButtonClasses.js
|
|
1264
1233
|
function getLoadingButtonUtilityClass(slot) {
|
|
1265
1234
|
return generateUtilityClass("MuiLoadingButton", slot);
|
|
1266
1235
|
}
|
|
1267
|
-
var loadingButtonClasses = generateUtilityClasses("MuiLoadingButton", ["root", "loading", "loadingIndicator", "loadingIndicatorCenter", "loadingIndicatorStart", "loadingIndicatorEnd", "endIconLoadingEnd", "startIconLoadingStart"]);
|
|
1236
|
+
var loadingButtonClasses = generateUtilityClasses("MuiLoadingButton", ["root", "label", "loading", "loadingIndicator", "loadingIndicatorCenter", "loadingIndicatorStart", "loadingIndicatorEnd", "endIconLoadingEnd", "startIconLoadingStart"]);
|
|
1268
1237
|
var loadingButtonClasses_default = loadingButtonClasses;
|
|
1269
1238
|
|
|
1270
1239
|
// ../../node_modules/@mui/lab/LoadingButton/LoadingButton.js
|
|
1271
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1272
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
1273
|
-
var _excluded = ["children", "disabled", "id", "loading", "loadingIndicator", "loadingPosition", "variant"];
|
|
1240
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1274
1241
|
var useUtilityClasses = (ownerState) => {
|
|
1275
1242
|
const {
|
|
1276
1243
|
loading,
|
|
@@ -1279,12 +1246,13 @@ var useUtilityClasses = (ownerState) => {
|
|
|
1279
1246
|
} = ownerState;
|
|
1280
1247
|
const slots = {
|
|
1281
1248
|
root: ["root", loading && "loading"],
|
|
1249
|
+
label: ["label"],
|
|
1282
1250
|
startIcon: [loading && `startIconLoading${capitalize(loadingPosition)}`],
|
|
1283
1251
|
endIcon: [loading && `endIconLoading${capitalize(loadingPosition)}`],
|
|
1284
1252
|
loadingIndicator: ["loadingIndicator", loading && `loadingIndicator${capitalize(loadingPosition)}`]
|
|
1285
1253
|
};
|
|
1286
1254
|
const composedClasses = composeClasses(slots, getLoadingButtonUtilityClass, classes);
|
|
1287
|
-
return
|
|
1255
|
+
return __spreadValues(__spreadValues({}, classes), composedClasses);
|
|
1288
1256
|
};
|
|
1289
1257
|
var rootShouldForwardProp = (prop) => prop !== "ownerState" && prop !== "theme" && prop !== "sx" && prop !== "as" && prop !== "classes";
|
|
1290
1258
|
var LoadingButtonRoot = styled(Button2, {
|
|
@@ -1298,40 +1266,56 @@ var LoadingButtonRoot = styled(Button2, {
|
|
|
1298
1266
|
[`& .${loadingButtonClasses_default.endIconLoadingEnd}`]: styles.endIconLoadingEnd
|
|
1299
1267
|
}];
|
|
1300
1268
|
}
|
|
1301
|
-
})(({
|
|
1302
|
-
ownerState,
|
|
1269
|
+
})(memoTheme(({
|
|
1303
1270
|
theme
|
|
1304
|
-
}) =>
|
|
1271
|
+
}) => ({
|
|
1272
|
+
display: "inline-flex",
|
|
1305
1273
|
[`& .${loadingButtonClasses_default.startIconLoadingStart}, & .${loadingButtonClasses_default.endIconLoadingEnd}`]: {
|
|
1306
1274
|
transition: theme.transitions.create(["opacity"], {
|
|
1307
1275
|
duration: theme.transitions.duration.short
|
|
1308
1276
|
}),
|
|
1309
1277
|
opacity: 0
|
|
1310
|
-
}
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
},
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
}
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
}
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
}
|
|
1278
|
+
},
|
|
1279
|
+
variants: [{
|
|
1280
|
+
props: {
|
|
1281
|
+
loadingPosition: "center"
|
|
1282
|
+
},
|
|
1283
|
+
style: {
|
|
1284
|
+
transition: theme.transitions.create(["background-color", "box-shadow", "border-color"], {
|
|
1285
|
+
duration: theme.transitions.duration.short
|
|
1286
|
+
}),
|
|
1287
|
+
[`&.${loadingButtonClasses_default.loading}`]: {
|
|
1288
|
+
color: "transparent"
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
}, {
|
|
1292
|
+
props: ({
|
|
1293
|
+
ownerState
|
|
1294
|
+
}) => ownerState.loadingPosition === "start" && ownerState.fullWidth,
|
|
1295
|
+
style: {
|
|
1296
|
+
[`& .${loadingButtonClasses_default.startIconLoadingStart}, & .${loadingButtonClasses_default.endIconLoadingEnd}`]: {
|
|
1297
|
+
transition: theme.transitions.create(["opacity"], {
|
|
1298
|
+
duration: theme.transitions.duration.short
|
|
1299
|
+
}),
|
|
1300
|
+
opacity: 0,
|
|
1301
|
+
marginRight: -8
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
}, {
|
|
1305
|
+
props: ({
|
|
1306
|
+
ownerState
|
|
1307
|
+
}) => ownerState.loadingPosition === "end" && ownerState.fullWidth,
|
|
1308
|
+
style: {
|
|
1309
|
+
[`& .${loadingButtonClasses_default.startIconLoadingStart}, & .${loadingButtonClasses_default.endIconLoadingEnd}`]: {
|
|
1310
|
+
transition: theme.transitions.create(["opacity"], {
|
|
1311
|
+
duration: theme.transitions.duration.short
|
|
1312
|
+
}),
|
|
1313
|
+
opacity: 0,
|
|
1314
|
+
marginLeft: -8
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
}]
|
|
1318
|
+
})));
|
|
1335
1319
|
var LoadingButtonLoadingIndicator = styled("span", {
|
|
1336
1320
|
name: "MuiLoadingButton",
|
|
1337
1321
|
slot: "LoadingIndicator",
|
|
@@ -1341,40 +1325,106 @@ var LoadingButtonLoadingIndicator = styled("span", {
|
|
|
1341
1325
|
} = props;
|
|
1342
1326
|
return [styles.loadingIndicator, styles[`loadingIndicator${capitalize(ownerState.loadingPosition)}`]];
|
|
1343
1327
|
}
|
|
1344
|
-
})(({
|
|
1345
|
-
theme
|
|
1346
|
-
|
|
1347
|
-
}) => _extends({
|
|
1328
|
+
})(memoTheme(({
|
|
1329
|
+
theme
|
|
1330
|
+
}) => ({
|
|
1348
1331
|
position: "absolute",
|
|
1349
1332
|
visibility: "visible",
|
|
1350
|
-
display: "flex"
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
},
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
},
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
}
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1333
|
+
display: "flex",
|
|
1334
|
+
variants: [{
|
|
1335
|
+
props: {
|
|
1336
|
+
loadingPosition: "start",
|
|
1337
|
+
size: "small"
|
|
1338
|
+
},
|
|
1339
|
+
style: {
|
|
1340
|
+
left: 10
|
|
1341
|
+
}
|
|
1342
|
+
}, {
|
|
1343
|
+
props: ({
|
|
1344
|
+
loadingPosition,
|
|
1345
|
+
ownerState
|
|
1346
|
+
}) => loadingPosition === "start" && ownerState.size !== "small",
|
|
1347
|
+
style: {
|
|
1348
|
+
left: 14
|
|
1349
|
+
}
|
|
1350
|
+
}, {
|
|
1351
|
+
props: {
|
|
1352
|
+
variant: "text",
|
|
1353
|
+
loadingPosition: "start"
|
|
1354
|
+
},
|
|
1355
|
+
style: {
|
|
1356
|
+
left: 6
|
|
1357
|
+
}
|
|
1358
|
+
}, {
|
|
1359
|
+
props: {
|
|
1360
|
+
loadingPosition: "center"
|
|
1361
|
+
},
|
|
1362
|
+
style: {
|
|
1363
|
+
left: "50%",
|
|
1364
|
+
transform: "translate(-50%)",
|
|
1365
|
+
color: (theme.vars || theme).palette.action.disabled
|
|
1366
|
+
}
|
|
1367
|
+
}, {
|
|
1368
|
+
props: {
|
|
1369
|
+
loadingPosition: "end",
|
|
1370
|
+
size: "small"
|
|
1371
|
+
},
|
|
1372
|
+
style: {
|
|
1373
|
+
right: 10
|
|
1374
|
+
}
|
|
1375
|
+
}, {
|
|
1376
|
+
props: ({
|
|
1377
|
+
loadingPosition,
|
|
1378
|
+
ownerState
|
|
1379
|
+
}) => loadingPosition === "end" && ownerState.size !== "small",
|
|
1380
|
+
style: {
|
|
1381
|
+
right: 14
|
|
1382
|
+
}
|
|
1383
|
+
}, {
|
|
1384
|
+
props: {
|
|
1385
|
+
variant: "text",
|
|
1386
|
+
loadingPosition: "end"
|
|
1387
|
+
},
|
|
1388
|
+
style: {
|
|
1389
|
+
right: 6
|
|
1390
|
+
}
|
|
1391
|
+
}, {
|
|
1392
|
+
props: ({
|
|
1393
|
+
ownerState
|
|
1394
|
+
}) => ownerState.loadingPosition === "start" && ownerState.fullWidth,
|
|
1395
|
+
style: {
|
|
1396
|
+
position: "relative",
|
|
1397
|
+
left: -10
|
|
1398
|
+
}
|
|
1399
|
+
}, {
|
|
1400
|
+
props: ({
|
|
1401
|
+
ownerState
|
|
1402
|
+
}) => ownerState.loadingPosition === "end" && ownerState.fullWidth,
|
|
1403
|
+
style: {
|
|
1404
|
+
position: "relative",
|
|
1405
|
+
right: -10
|
|
1406
|
+
}
|
|
1407
|
+
}]
|
|
1408
|
+
})));
|
|
1409
|
+
var LoadingButtonLabel = styled("span", {
|
|
1410
|
+
name: "MuiLoadingButton",
|
|
1411
|
+
slot: "Label",
|
|
1412
|
+
overridesResolver: (props, styles) => {
|
|
1413
|
+
return [styles.label];
|
|
1414
|
+
}
|
|
1415
|
+
})({
|
|
1416
|
+
display: "inherit",
|
|
1417
|
+
alignItems: "inherit",
|
|
1418
|
+
justifyContent: "inherit"
|
|
1419
|
+
});
|
|
1370
1420
|
var LoadingButton = /* @__PURE__ */ React.forwardRef(function LoadingButton2(inProps, ref) {
|
|
1371
1421
|
const contextProps = React.useContext(ButtonGroupContext);
|
|
1372
1422
|
const resolvedProps = resolveProps(contextProps, inProps);
|
|
1373
|
-
const props =
|
|
1423
|
+
const props = useDefaultProps({
|
|
1374
1424
|
props: resolvedProps,
|
|
1375
1425
|
name: "MuiLoadingButton"
|
|
1376
1426
|
});
|
|
1377
|
-
const {
|
|
1427
|
+
const _a = props, {
|
|
1378
1428
|
children,
|
|
1379
1429
|
disabled = false,
|
|
1380
1430
|
id: idProp,
|
|
@@ -1382,14 +1432,22 @@ var LoadingButton = /* @__PURE__ */ React.forwardRef(function LoadingButton2(inP
|
|
|
1382
1432
|
loadingIndicator: loadingIndicatorProp,
|
|
1383
1433
|
loadingPosition = "center",
|
|
1384
1434
|
variant = "text"
|
|
1385
|
-
} =
|
|
1435
|
+
} = _a, other = __objRest(_a, [
|
|
1436
|
+
"children",
|
|
1437
|
+
"disabled",
|
|
1438
|
+
"id",
|
|
1439
|
+
"loading",
|
|
1440
|
+
"loadingIndicator",
|
|
1441
|
+
"loadingPosition",
|
|
1442
|
+
"variant"
|
|
1443
|
+
]);
|
|
1386
1444
|
const id = useId(idProp);
|
|
1387
1445
|
const loadingIndicator = loadingIndicatorProp != null ? loadingIndicatorProp : /* @__PURE__ */ _jsx(CircularProgress, {
|
|
1388
1446
|
"aria-labelledby": id,
|
|
1389
1447
|
color: "inherit",
|
|
1390
1448
|
size: 16
|
|
1391
1449
|
});
|
|
1392
|
-
const ownerState =
|
|
1450
|
+
const ownerState = __spreadProps(__spreadValues({}, props), {
|
|
1393
1451
|
disabled,
|
|
1394
1452
|
loading,
|
|
1395
1453
|
loadingIndicator,
|
|
@@ -1402,15 +1460,21 @@ var LoadingButton = /* @__PURE__ */ React.forwardRef(function LoadingButton2(inP
|
|
|
1402
1460
|
ownerState,
|
|
1403
1461
|
children: loadingIndicator
|
|
1404
1462
|
}) : null;
|
|
1405
|
-
return /* @__PURE__ */ _jsxs(LoadingButtonRoot,
|
|
1463
|
+
return /* @__PURE__ */ _jsxs(LoadingButtonRoot, __spreadProps(__spreadValues({
|
|
1406
1464
|
disabled: disabled || loading,
|
|
1407
1465
|
id,
|
|
1408
1466
|
ref
|
|
1409
|
-
}, other, {
|
|
1467
|
+
}, other), {
|
|
1410
1468
|
variant,
|
|
1411
1469
|
classes,
|
|
1412
1470
|
ownerState,
|
|
1413
|
-
children: [ownerState.loadingPosition === "end" ?
|
|
1471
|
+
children: [ownerState.loadingPosition === "end" ? /* @__PURE__ */ _jsx(LoadingButtonLabel, {
|
|
1472
|
+
className: classes.label,
|
|
1473
|
+
children
|
|
1474
|
+
}) : loadingButtonLoadingIndicator, ownerState.loadingPosition === "end" ? loadingButtonLoadingIndicator : /* @__PURE__ */ _jsx(LoadingButtonLabel, {
|
|
1475
|
+
className: classes.label,
|
|
1476
|
+
children
|
|
1477
|
+
})]
|
|
1414
1478
|
}));
|
|
1415
1479
|
});
|
|
1416
1480
|
process.env.NODE_ENV !== "production" ? LoadingButton.propTypes = {
|
|
@@ -1512,7 +1576,7 @@ import MuiContainer from "@mui/material/Container";
|
|
|
1512
1576
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
1513
1577
|
|
|
1514
1578
|
// ../layout/src/lib/Grid.tsx
|
|
1515
|
-
import MuiGrid2 from "@mui/material/
|
|
1579
|
+
import MuiGrid2 from "@mui/material/Grid2";
|
|
1516
1580
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
1517
1581
|
var Grid = (args) => {
|
|
1518
1582
|
return /* @__PURE__ */ jsx12(MuiGrid2, __spreadValues({}, args));
|
|
@@ -1654,22 +1718,4 @@ object-assign/index.js:
|
|
|
1654
1718
|
(c) Sindre Sorhus
|
|
1655
1719
|
@license MIT
|
|
1656
1720
|
*)
|
|
1657
|
-
|
|
1658
|
-
@mui/utils/index.js:
|
|
1659
|
-
(**
|
|
1660
|
-
* @mui/utils v5.15.14
|
|
1661
|
-
*
|
|
1662
|
-
* @license MIT
|
|
1663
|
-
* This source code is licensed under the MIT license found in the
|
|
1664
|
-
* LICENSE file in the root directory of this source tree.
|
|
1665
|
-
*)
|
|
1666
|
-
|
|
1667
|
-
@mui/utils/index.js:
|
|
1668
|
-
(**
|
|
1669
|
-
* @mui/utils v5.15.14
|
|
1670
|
-
*
|
|
1671
|
-
* @license MIT
|
|
1672
|
-
* This source code is licensed under the MIT license found in the
|
|
1673
|
-
* LICENSE file in the root directory of this source tree.
|
|
1674
|
-
*)
|
|
1675
1721
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@availity/mui-stepper",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-alpha.0",
|
|
4
4
|
"description": "Availity MUI Stepper Component - part of the @availity/element design system",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -23,6 +23,14 @@
|
|
|
23
23
|
"main": "./dist/index.js",
|
|
24
24
|
"module": "./dist/index.mjs",
|
|
25
25
|
"types": "./dist/index.d.ts",
|
|
26
|
+
"exports": {
|
|
27
|
+
"./package.json": "./package.json",
|
|
28
|
+
".": {
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"import": "./dist/index.mjs",
|
|
31
|
+
"require": "./dist/index.js"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
26
34
|
"scripts": {
|
|
27
35
|
"build": "tsup src/index.ts --format esm,cjs --dts",
|
|
28
36
|
"dev": "tsup src/index.ts --format esm,cjs --watch --dts",
|
|
@@ -32,21 +40,22 @@
|
|
|
32
40
|
"publish:canary": "yarn npm publish --access public --tag canary"
|
|
33
41
|
},
|
|
34
42
|
"dependencies": {
|
|
35
|
-
"@availity/mui-icon": "^0.
|
|
36
|
-
"@availity/mui-typography": "^0.
|
|
43
|
+
"@availity/mui-icon": "^1.0.0-alpha.0",
|
|
44
|
+
"@availity/mui-typography": "^1.0.0-alpha.0"
|
|
37
45
|
},
|
|
38
46
|
"devDependencies": {
|
|
39
|
-
"@availity/mui-button": "^0.
|
|
40
|
-
"@availity/mui-layout": "^0.
|
|
41
|
-
"@availity/mui-paper": "^0.
|
|
42
|
-
"@mui
|
|
47
|
+
"@availity/mui-button": "^1.0.0-alpha.0",
|
|
48
|
+
"@availity/mui-layout": "^1.0.0-alpha.0",
|
|
49
|
+
"@availity/mui-paper": "^1.0.0-alpha.0",
|
|
50
|
+
"@availity/mui-typography": "^1.0.0-alpha.0",
|
|
51
|
+
"@mui/material": "^6.4.5",
|
|
43
52
|
"react": "18.2.0",
|
|
44
53
|
"react-dom": "18.2.0",
|
|
45
|
-
"tsup": "^8.
|
|
54
|
+
"tsup": "^8.3.6",
|
|
46
55
|
"typescript": "^5.4.5"
|
|
47
56
|
},
|
|
48
57
|
"peerDependencies": {
|
|
49
|
-
"@mui/material": "^
|
|
58
|
+
"@mui/material": "^6.4.5",
|
|
50
59
|
"react": ">=16.3.0"
|
|
51
60
|
},
|
|
52
61
|
"publishConfig": {
|
package/src/lib/Step.stories.tsx
CHANGED
|
@@ -119,7 +119,7 @@ export const _Stepper: StoryObj<typeof Step> = {
|
|
|
119
119
|
};
|
|
120
120
|
|
|
121
121
|
return (
|
|
122
|
-
<Box maxWidth
|
|
122
|
+
<Box sx={{ maxWidth: '75vw', marginX: 'auto' }}>
|
|
123
123
|
<Paper sx={{ padding: '2rem' }}>
|
|
124
124
|
<Stepper activeStep={activeStep} orientation={width < 600 ? 'vertical' : 'horizontal'}>
|
|
125
125
|
{steps.map((label, index) => {
|
|
@@ -121,7 +121,7 @@ export const _Stepper: StoryObj<typeof StepButton> = {
|
|
|
121
121
|
};
|
|
122
122
|
|
|
123
123
|
return (
|
|
124
|
-
<Box maxWidth
|
|
124
|
+
<Box sx={{ maxWidth: '75vw', marginX: 'auto' }}>
|
|
125
125
|
<Paper sx={{ padding: '2rem' }}>
|
|
126
126
|
<Stepper activeStep={activeStep} orientation={width < 600 ? 'vertical' : 'horizontal'}>
|
|
127
127
|
{steps.map((label, index) => {
|
|
@@ -118,7 +118,7 @@ export const _Stepper: StoryObj<typeof StepLabel> = {
|
|
|
118
118
|
};
|
|
119
119
|
|
|
120
120
|
return (
|
|
121
|
-
<Box maxWidth
|
|
121
|
+
<Box sx={{ maxWidth: '75vw', marginX: 'auto' }}>
|
|
122
122
|
<Paper sx={{ padding: '2rem' }}>
|
|
123
123
|
<Stepper activeStep={activeStep} orientation={width < 600 ? 'vertical' : 'horizontal'}>
|
|
124
124
|
{steps.map((label, index) => {
|
|
@@ -144,7 +144,9 @@ export const _Stepper: StoryObj<typeof StepLabel> = {
|
|
|
144
144
|
return (
|
|
145
145
|
<Step key={label} {...stepProps}>
|
|
146
146
|
<StepButton color="inherit" onClick={handleStep(index)}>
|
|
147
|
-
<StepLabel {...labelProps} {...args}>
|
|
147
|
+
<StepLabel {...labelProps} {...args}>
|
|
148
|
+
{label}
|
|
149
|
+
</StepLabel>
|
|
148
150
|
</StepButton>
|
|
149
151
|
</Step>
|
|
150
152
|
);
|