@kubit-ui-web/react-components
Version:
Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience
24 lines • 1.83 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.StepperNumber = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = __importDefault(require("react"));
const useStyles_1 = require("../../hooks/useStyles/useStyles");
const errorBoundary_1 = require("../../provider/errorBoundary/errorBoundary");
const fallbackComponent_1 = require("../../provider/errorBoundary/fallbackComponent");
const stepperNumberStandAlone_1 = require("./stepperNumberStandAlone");
const orientation_1 = require("./types/orientation");
const STEPPER_NUMBER_STYLES = 'STEPPER_NUMBER_STYLES';
const StepperNumberComponent = react_1.default.forwardRef(({ variant, orientation = orientation_1.StepperNumberOrientationType.HORIZONTAL, ctv, ...props }, ref) => {
const stylesOrientation = (0, useStyles_1.useStyles)(STEPPER_NUMBER_STYLES, variant, ctv);
const styles = stylesOrientation?.[orientation];
return ((0, jsx_runtime_1.jsx)(stepperNumberStandAlone_1.StepperNumberStandAlone, { ...props, ref: ref, orientation: orientation, styles: styles }));
});
StepperNumberComponent.displayName = 'StepperNumberComponent';
const StepperNumberBoundary = (props, ref) => ((0, jsx_runtime_1.jsx)(errorBoundary_1.ErrorBoundary, { fallBackComponent: (0, jsx_runtime_1.jsx)(fallbackComponent_1.FallbackComponent, { children: (0, jsx_runtime_1.jsx)(stepperNumberStandAlone_1.StepperNumberStandAlone, { ...props, ref: ref }) }), children: (0, jsx_runtime_1.jsx)(StepperNumberComponent, { ...props, ref: ref }) }));
const StepperNumber = react_1.default.forwardRef(StepperNumberBoundary);
exports.StepperNumber = StepperNumber;
//# sourceMappingURL=stepperNumber.js.map