@mailstep/design-system 0.6.55 → 0.6.57-beta.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/package.json +1 -1
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/components/ActionRow.d.ts +2 -2
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/components/ActionRow.js +6 -5
- package/ui/Blocks/CommonGrid/hooks/useManageColumn.d.ts +3 -3
- package/ui/Blocks/CommonGrid/hooks/useManageColumn.js +5 -2
- package/ui/Blocks/SideMenu/styles.js +1 -1
- package/ui/Blocks/Stepper/Stepper.d.ts +3 -0
- package/ui/Blocks/Stepper/Stepper.js +14 -0
- package/ui/Blocks/Stepper/components/StepItem/index.d.ts +11 -0
- package/ui/Blocks/Stepper/components/StepItem/index.js +13 -0
- package/ui/Blocks/Stepper/components/StepItem/styles.d.ts +13 -0
- package/ui/Blocks/Stepper/components/StepItem/styles.js +33 -0
- package/ui/Blocks/Stepper/hooks/useStepper.d.ts +6 -0
- package/ui/Blocks/Stepper/hooks/useStepper.js +8 -0
- package/ui/Blocks/Stepper/index.d.ts +3 -0
- package/ui/Blocks/Stepper/index.js +2 -0
- package/ui/Blocks/Stepper/stories/Stepper.stories.d.ts +7 -0
- package/ui/Blocks/Stepper/stories/Stepper.stories.js +60 -0
- package/ui/Blocks/Stepper/styles.d.ts +2 -0
- package/ui/Blocks/Stepper/styles.js +8 -0
- package/ui/Blocks/Stepper/types.d.ts +15 -0
- package/ui/Blocks/Stepper/types.js +1 -0
- package/ui/Elements/Typography/Typography.js +2 -2
- package/ui/index.d.ts +3 -1
- package/ui/index.es.js +12349 -12255
- package/ui/index.js +3 -1
- package/ui/index.umd.js +631 -582
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ColumnConfig, ColumnDefinition } from '../../../types';
|
|
3
2
|
import { DraggableProps, DraggableProvidedDragHandleProps } from 'react-beautiful-dnd';
|
|
3
|
+
import { ColumnConfig, ColumnDefinition } from '../../../types';
|
|
4
4
|
type ActionRowProps = {
|
|
5
5
|
column: ColumnDefinition;
|
|
6
6
|
columnsConfigValues: string[] | undefined;
|
|
@@ -12,5 +12,5 @@ type ActionRowProps = {
|
|
|
12
12
|
draggableProps?: DraggableProps | any;
|
|
13
13
|
dragHandleProps?: DraggableProvidedDragHandleProps | null;
|
|
14
14
|
};
|
|
15
|
-
export declare const ActionRow: ({ column, columnsConfigValues, setColumnsConfigOptions, searchedValue, innerRef, draggableProps, dragHandleProps
|
|
15
|
+
export declare const ActionRow: ({ column, columnsConfigValues, setColumnsConfigOptions, searchedValue, innerRef, draggableProps, dragHandleProps }: ActionRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
export {};
|
|
@@ -15,13 +15,13 @@ var __assign = (this && this.__assign) || function () {
|
|
|
15
15
|
};
|
|
16
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
17
|
import { useCallback, useMemo, useState } from 'react';
|
|
18
|
-
import {
|
|
18
|
+
import { isObject } from 'lodash';
|
|
19
19
|
import styled from 'styled-components';
|
|
20
|
-
import Toggle from '../../../../../Elements/Toggle/Toggle';
|
|
21
20
|
import { Group } from '../../../../../Elements/Icon/icons/Group';
|
|
22
|
-
import
|
|
21
|
+
import Toggle from '../../../../../Elements/Toggle/Toggle';
|
|
23
22
|
import { H6 } from '../../../../../Elements/Typography/Typography';
|
|
24
23
|
import { i18n } from '@lingui/core';
|
|
24
|
+
import { x, th } from '@xstyled/styled-components';
|
|
25
25
|
var RowLayout = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: ", ";\n align-items: center;\n justify-content: space-between;\n padding: 16px;\n height: 52px;\n background-color: white;\n border: 1px solid ", ";\n border-radius: 8px;\n margin-bottom: 15px;\n"], ["\n display: ", ";\n align-items: center;\n justify-content: space-between;\n padding: 16px;\n height: 52px;\n background-color: white;\n border: 1px solid ", ";\n border-radius: 8px;\n margin-bottom: 15px;\n"])), function (_a) {
|
|
26
26
|
var $isVisible = _a.$isVisible;
|
|
27
27
|
return ($isVisible ? 'flex' : 'none');
|
|
@@ -31,10 +31,11 @@ export var ActionRow = function (_a) {
|
|
|
31
31
|
var column = _a.column, columnsConfigValues = _a.columnsConfigValues, setColumnsConfigOptions = _a.setColumnsConfigOptions, searchedValue = _a.searchedValue, innerRef = _a.innerRef, draggableProps = _a.draggableProps, dragHandleProps = _a.dragHandleProps;
|
|
32
32
|
var _g = useState((_b = columnsConfigValues === null || columnsConfigValues === void 0 ? void 0 : columnsConfigValues.includes(column.name)) !== null && _b !== void 0 ? _b : false), isSelected = _g[0], setIsSelected = _g[1];
|
|
33
33
|
var style = useMemo(function () { return (__assign({}, draggableProps === null || draggableProps === void 0 ? void 0 : draggableProps.style)); }, [draggableProps]);
|
|
34
|
-
var translatedValue = isObject(column === null || column === void 0 ? void 0 : column.title) &&
|
|
34
|
+
var translatedValue = (isObject(column === null || column === void 0 ? void 0 : column.title) &&
|
|
35
35
|
'props' in column.title &&
|
|
36
36
|
((_c = column.title) === null || _c === void 0 ? void 0 : _c.props) &&
|
|
37
|
-
i18n._({ id: (_e = (_d = column.title) === null || _d === void 0 ? void 0 : _d.props) === null || _e === void 0 ? void 0 : _e.id, message: (_f = column.title) === null || _f === void 0 ? void 0 : _f.props.message })
|
|
37
|
+
i18n._({ id: (_e = (_d = column.title) === null || _d === void 0 ? void 0 : _d.props) === null || _e === void 0 ? void 0 : _e.id, message: (_f = column.title) === null || _f === void 0 ? void 0 : _f.props.message })) ||
|
|
38
|
+
(column === null || column === void 0 ? void 0 : column.title);
|
|
38
39
|
var isVisible = translatedValue && translatedValue.toLocaleLowerCase().includes(searchedValue.toLocaleLowerCase()) && !column.alwaysOn;
|
|
39
40
|
var handleToggleChange = useCallback(function () {
|
|
40
41
|
setColumnsConfigOptions(function (prevOptions) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { DropResult } from 'react-beautiful-dnd';
|
|
3
|
-
import { CommonGridProps, GridActionsType, GridSelectorsType } from '../types';
|
|
3
|
+
import { CommonGridProps, GridActionsType, GridSelectorsType, ColumnDefinition } from '../types';
|
|
4
4
|
type Props = {
|
|
5
5
|
columns: CommonGridProps['columnsDefinitions'];
|
|
6
6
|
gridActions: GridActionsType;
|
|
@@ -18,7 +18,7 @@ declare const useManageColumn: ({ columns, gridSelectors, gridActions, onClose }
|
|
|
18
18
|
resetColumnConfig: () => void;
|
|
19
19
|
handleDragEnd: (isManageModal?: boolean) => (item: DropResult) => void;
|
|
20
20
|
onCloseForm: () => void;
|
|
21
|
-
displayColumnsDefinitions:
|
|
22
|
-
manageColumnsFormDefinitions:
|
|
21
|
+
displayColumnsDefinitions: ColumnDefinition<string>[];
|
|
22
|
+
manageColumnsFormDefinitions: ColumnDefinition<string>[];
|
|
23
23
|
};
|
|
24
24
|
export default useManageColumn;
|
|
@@ -60,11 +60,14 @@ var useManageColumn = function (_a) {
|
|
|
60
60
|
setColumnsConfigOptions(columnConfig || {});
|
|
61
61
|
}, [columnsOrderValue, onClose]);
|
|
62
62
|
var getSortedColumns = useCallback(function (orderValues, isManageModal) {
|
|
63
|
-
|
|
63
|
+
var list = !isManageModal ? columns.filter(function (column) { return isColumnOn(column, columnsConfigOptions); }) : columns;
|
|
64
|
+
var sortFunction = function (col1, col2) {
|
|
64
65
|
var i = (orderValues || []).indexOf(col1.name);
|
|
65
66
|
var j = (orderValues || []).indexOf(col2.name);
|
|
66
67
|
return i > j ? 1 : i < j ? -1 : 0;
|
|
67
|
-
}
|
|
68
|
+
};
|
|
69
|
+
var sortedList = __spreadArray([], list, true).sort(sortFunction);
|
|
70
|
+
return sortedList;
|
|
68
71
|
}, [columnConfig, columnsConfigOptions, columns]);
|
|
69
72
|
var displayColumnsDefinitions = useMemo(function () { return getSortedColumns(columnsOrderValue, false); }, [columnsOrderValue, columns, columnsConfigOptions, getSortedColumns]);
|
|
70
73
|
var manageColumnsFormDefinitions = useMemo(function () { return getSortedColumns(updatedColumnsOrder, true); }, [updatedColumnsOrder]);
|
|
@@ -139,7 +139,7 @@ export var TooltipWrap = styled.div(templateObject_16 || (templateObject_16 = __
|
|
|
139
139
|
var $lightMode = _a.$lightMode;
|
|
140
140
|
return ($lightMode ? th.color('red20') : th.color('blue2'));
|
|
141
141
|
});
|
|
142
|
-
export var OverflowWithEllipsis = styled.span(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n max-width: 140px;\n
|
|
142
|
+
export var OverflowWithEllipsis = styled.span(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n max-width: 140px;\n overflow: hidden;\n text-overflow: ellipsis;\n"], ["\n max-width: 140px;\n overflow: hidden;\n text-overflow: ellipsis;\n"])));
|
|
143
143
|
export var TopLevelWrap = styled.div(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n background-color: ", ";\n border-right: 1px solid ", ";\n height: -webkit-fill-available;\n transition: width 0.5s ease;\n width: ", ";\n\n z-index: 5;\n position: absolute;\n top: ", ";\n height: ", ";\n\n display: flex;\n flex-direction: column;\n\n @media (min-width: 1024px) {\n top: inherit;\n z-index: 2;\n }\n"], ["\n background-color: ", ";\n border-right: 1px solid ", ";\n height: -webkit-fill-available;\n transition: width 0.5s ease;\n width: ", ";\n\n z-index: 5;\n position: absolute;\n top: ", ";\n height: ", ";\n\n display: flex;\n flex-direction: column;\n\n @media (min-width: 1024px) {\n top: inherit;\n z-index: 2;\n }\n"])), function (_a) {
|
|
144
144
|
var lightMode = _a.lightMode;
|
|
145
145
|
return (lightMode ? 'white' : th('colors.blue3'));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { StepItem } from './components/StepItem';
|
|
4
|
+
import { Container, ItemsWrapper } from './styles';
|
|
5
|
+
export var Stepper = function (_a) {
|
|
6
|
+
var items = _a.items, activeStep = _a.activeStep, handleChangeStep = _a.handleChangeStep;
|
|
7
|
+
if (!(items === null || items === void 0 ? void 0 : items.length))
|
|
8
|
+
return null;
|
|
9
|
+
var Component = useMemo(function () { return items[activeStep].component; }, [items, activeStep]);
|
|
10
|
+
return (_jsxs(Container, { children: [_jsx(ItemsWrapper, { children: items.map(function (_a, index) {
|
|
11
|
+
var title = _a.title, disabled = _a.disabled, completed = _a.completed;
|
|
12
|
+
return (_jsx(StepItem, { onClick: handleChangeStep(index), title: title, index: index, activeStep: activeStep, disabled: disabled, completed: completed }, title));
|
|
13
|
+
}) }), _jsx(Component, { handleGoToNextStep: handleChangeStep(activeStep + 1) })] }));
|
|
14
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Icon from '../../../../Elements/Icon/Icon';
|
|
3
|
+
import { Paragraph2, H7 } from '../../../../Elements/Typography/Typography';
|
|
4
|
+
import { Trans } from '@lingui/react';
|
|
5
|
+
import { x } from '@xstyled/styled-components';
|
|
6
|
+
import isBoolean from 'lodash/isBoolean';
|
|
7
|
+
import { Line, StepItemContainer, StepNumber, ContentWrapper, CompletedStep } from './styles';
|
|
8
|
+
export var StepItem = function (_a) {
|
|
9
|
+
var title = _a.title, index = _a.index, disabled = _a.disabled, activeStep = _a.activeStep, completed = _a.completed, onClick = _a.onClick;
|
|
10
|
+
var isActiveStep = index === activeStep;
|
|
11
|
+
var isCompletedStep = isBoolean(completed) ? completed : index < activeStep;
|
|
12
|
+
return (_jsxs(StepItemContainer, { onClick: !disabled && isCompletedStep ? onClick : undefined, isActiveStep: isActiveStep, isDisabled: disabled, children: [_jsx(Line, { isActiveStep: isActiveStep, isCompletedStep: isCompletedStep }), _jsxs(ContentWrapper, { children: [isCompletedStep ? (_jsx(CompletedStep, { children: _jsx(Icon, { icon: "check", size: "12px" }) })) : (_jsx(StepNumber, { isActiveStep: isActiveStep, children: index + 1 })), _jsxs("div", { children: [_jsx(x.span, { textTransform: "uppercase", children: _jsxs(H7, { color: "gray1", variant: "semiBold", mt: 0, mb: "4px", children: [_jsx(Trans, { id: "step", message: "Step" }), ": ", index + 1] }) }), _jsx(Paragraph2, { variant: "medium", children: title })] })] })] }));
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const StepItemContainer: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {
|
|
2
|
+
isActiveStep: boolean;
|
|
3
|
+
isDisabled?: boolean | undefined;
|
|
4
|
+
}, never>;
|
|
5
|
+
export declare const Line: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {
|
|
6
|
+
isActiveStep: boolean;
|
|
7
|
+
isCompletedStep: boolean;
|
|
8
|
+
}, never>;
|
|
9
|
+
export declare const StepNumber: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {
|
|
10
|
+
isActiveStep: boolean;
|
|
11
|
+
}, never>;
|
|
12
|
+
export declare const ContentWrapper: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {}, never>;
|
|
13
|
+
export declare const CompletedStep: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {}, never>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import styled, { css, th } from '@xstyled/styled-components';
|
|
6
|
+
export var StepItemContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-radius: 10px;\n width: 240px;\n padding: 24px;\n background-color: ", ";\n cursor: ", ";\n"], ["\n border-radius: 10px;\n width: 240px;\n padding: 24px;\n background-color: ", ";\n cursor: ", ";\n"])), function (_a) {
|
|
7
|
+
var isActiveStep = _a.isActiveStep;
|
|
8
|
+
return (isActiveStep ? th.color('bgLightGray1') : 'transparent');
|
|
9
|
+
}, function (_a) {
|
|
10
|
+
var isDisabled = _a.isDisabled;
|
|
11
|
+
return (isDisabled ? 'not-allowed' : 'pointer');
|
|
12
|
+
});
|
|
13
|
+
export var Line = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: 4px;\n border-radius: 8px;\n width: 100%;\n background-color: ", ";\n margin-bottom: 16px;\n"], ["\n height: 4px;\n border-radius: 8px;\n width: 100%;\n background-color: ", ";\n margin-bottom: 16px;\n"])), function (_a) {
|
|
14
|
+
var isActiveStep = _a.isActiveStep, isCompletedStep = _a.isCompletedStep;
|
|
15
|
+
if (isActiveStep)
|
|
16
|
+
return th.color('red1');
|
|
17
|
+
if (isCompletedStep)
|
|
18
|
+
return th.color('red20');
|
|
19
|
+
return th.color('lightGray7');
|
|
20
|
+
});
|
|
21
|
+
export var StepNumber = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-size: 16px;\n font-weight: 600;\n margin-bottom: 16px;\n color: ", ";\n border: 2px solid ", ";\n border-radius: 50%;\n height: 36px;\n width: 36px;\n display: flex;\n justify-content: center;\n align-items: center;\n\n ", "\n"], ["\n font-size: 16px;\n font-weight: 600;\n margin-bottom: 16px;\n color: ", ";\n border: 2px solid ", ";\n border-radius: 50%;\n height: 36px;\n width: 36px;\n display: flex;\n justify-content: center;\n align-items: center;\n\n ", "\n"])), function (_a) {
|
|
22
|
+
var isActiveStep = _a.isActiveStep;
|
|
23
|
+
return (isActiveStep ? th.color('red1') : th.color('lightGray6'));
|
|
24
|
+
}, function (_a) {
|
|
25
|
+
var isActiveStep = _a.isActiveStep;
|
|
26
|
+
return (isActiveStep ? th.color('red1') : th.color('lightGray6'));
|
|
27
|
+
}, function (_a) {
|
|
28
|
+
var isActiveStep = _a.isActiveStep;
|
|
29
|
+
return isActiveStep && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n box-shadow: 0 0 0 4px ", ";\n "], ["\n box-shadow: 0 0 0 4px ", ";\n "])), th.color('red20'));
|
|
30
|
+
});
|
|
31
|
+
export var ContentWrapper = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n column-gap: 16px;\n"], ["\n display: flex;\n column-gap: 16px;\n"])));
|
|
32
|
+
export var CompletedStep = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n border-radius: 50%;\n border: 8px solid ", ";\n color: ", ";\n height: 36px;\n width: 36px;\n display: flex;\n justify-content: center;\n align-items: center;\n"], ["\n border-radius: 50%;\n border: 8px solid ", ";\n color: ", ";\n height: 36px;\n width: 36px;\n display: flex;\n justify-content: center;\n align-items: center;\n"])), th.color('red1'), th.color('red1'));
|
|
33
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { useCallback, useState } from 'react';
|
|
2
|
+
export var useStepper = function () {
|
|
3
|
+
var _a = useState(0), activeStep = _a[0], setActiveStep = _a[1];
|
|
4
|
+
var handleChangeStep = useCallback(function (step) { return function () {
|
|
5
|
+
setActiveStep(step);
|
|
6
|
+
}; }, []);
|
|
7
|
+
return { activeStep: activeStep, handleChangeStep: handleChangeStep };
|
|
8
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import Stepper from '../';
|
|
14
|
+
import Button from '../../../Elements/Button/Button';
|
|
15
|
+
import { LinguiContainer } from '../../../utils/LinguiContainer';
|
|
16
|
+
import { useStepper } from '../hooks/useStepper';
|
|
17
|
+
var items = [
|
|
18
|
+
{
|
|
19
|
+
title: 'Scan product',
|
|
20
|
+
component: function (_a) {
|
|
21
|
+
var handleGoToNextStep = _a.handleGoToNextStep;
|
|
22
|
+
return (_jsxs("div", { children: ["Scan product ", _jsx(Button, { onClick: handleGoToNextStep, children: "Go next" })] }));
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
title: 'Measurement',
|
|
27
|
+
component: function (_a) {
|
|
28
|
+
var handleGoToNextStep = _a.handleGoToNextStep;
|
|
29
|
+
return (_jsxs("div", { children: ["Measurement page ", _jsx(Button, { onClick: handleGoToNextStep, children: "Go next" })] }));
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
title: 'Logistic info',
|
|
34
|
+
component: function (_a) {
|
|
35
|
+
var handleGoToNextStep = _a.handleGoToNextStep;
|
|
36
|
+
return (_jsxs("div", { children: ["Logistic info ", _jsx(Button, { onClick: handleGoToNextStep, children: "Go next" })] }));
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
title: 'Color',
|
|
41
|
+
component: function (_a) {
|
|
42
|
+
var handleGoToNextStep = _a.handleGoToNextStep;
|
|
43
|
+
return (_jsxs("div", { children: ["Select color ", _jsx(Button, { onClick: handleGoToNextStep, children: "Finish" })] }));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
];
|
|
47
|
+
var completedItems = items.map(function (item) { return (__assign(__assign({}, item), { completed: true })); });
|
|
48
|
+
var meta = {
|
|
49
|
+
title: 'Blocks/Stepper',
|
|
50
|
+
tags: ['autodocs']
|
|
51
|
+
};
|
|
52
|
+
export default meta;
|
|
53
|
+
export var Default = function () {
|
|
54
|
+
var _a = useStepper(), activeStep = _a.activeStep, handleChangeStep = _a.handleChangeStep;
|
|
55
|
+
return (_jsx(LinguiContainer, { children: _jsx(Stepper, { items: items, activeStep: activeStep, handleChangeStep: handleChangeStep }) }));
|
|
56
|
+
};
|
|
57
|
+
export var AllStepsCompleted = function () {
|
|
58
|
+
var _a = useStepper(), activeStep = _a.activeStep, handleChangeStep = _a.handleChangeStep;
|
|
59
|
+
return (_jsx(LinguiContainer, { children: _jsx(Stepper, { items: completedItems, activeStep: activeStep, handleChangeStep: handleChangeStep }) }));
|
|
60
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import styled from '@xstyled/styled-components';
|
|
6
|
+
export var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n height: fit-content;\n justify-content: center;\n align-items: center;\n width: 100%;\n"], ["\n display: flex;\n flex-direction: column;\n height: fit-content;\n justify-content: center;\n align-items: center;\n width: 100%;\n"])));
|
|
7
|
+
export var ItemsWrapper = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n margin-bottom: 36px;\n"], ["\n display: flex;\n margin-bottom: 36px;\n"])));
|
|
8
|
+
var templateObject_1, templateObject_2;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export type StepperProps = {
|
|
3
|
+
items: StepperItem[];
|
|
4
|
+
activeStep: number;
|
|
5
|
+
handleChangeStep: (step: number) => () => void;
|
|
6
|
+
};
|
|
7
|
+
export type StepperPassedDownProps = {
|
|
8
|
+
handleGoToNextStep: () => void;
|
|
9
|
+
};
|
|
10
|
+
export type StepperItem = {
|
|
11
|
+
title: string;
|
|
12
|
+
completed?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
component: FC<StepperPassedDownProps>;
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -28,7 +28,7 @@ export var Text = function (_a) {
|
|
|
28
28
|
};
|
|
29
29
|
var BaseHeading = function (_a) {
|
|
30
30
|
var _b = _a.fontFamily, fontFamily = _b === void 0 ? 'heading' : _b, _c = _a.mb, mb = _c === void 0 ? 2 : _c, _d = _a.mt, mt = _d === void 0 ? 2 : _d, props = __rest(_a, ["fontFamily", "mb", "mt"]);
|
|
31
|
-
return (_jsx(Text, __assign({ fontFamily: fontFamily, mt: mt, mb:
|
|
31
|
+
return (_jsx(Text, __assign({ fontFamily: fontFamily, mt: mt, mb: mb }, props)));
|
|
32
32
|
};
|
|
33
33
|
// Paragraphs
|
|
34
34
|
export var Paragraph1 = function (props) { return _jsx(Text, __assign({ fontSize: "18px" }, props)); };
|
|
@@ -43,4 +43,4 @@ export var H3 = function (props) { return _jsx(BaseHeading, __assign({ fontSize:
|
|
|
43
43
|
export var H4 = function (props) { return _jsx(BaseHeading, __assign({ fontSize: "18px", as: "h4" }, props)); };
|
|
44
44
|
export var H5 = function (props) { return _jsx(BaseHeading, __assign({ fontSize: "16px", as: "h5" }, props)); };
|
|
45
45
|
export var H6 = function (props) { return _jsx(BaseHeading, __assign({ fontSize: "14px", as: "h6" }, props)); };
|
|
46
|
-
export var H7 = function (props) { return _jsx(BaseHeading, __assign({ fontSize: "
|
|
46
|
+
export var H7 = function (props) { return _jsx(BaseHeading, __assign({ fontSize: "12px", as: "h6" }, props)); };
|
package/ui/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import LoginPage from './Blocks/LoginPage';
|
|
|
7
7
|
import Modal from './Blocks/Modal';
|
|
8
8
|
import Popover from './Blocks/Popover';
|
|
9
9
|
import SideMenu from './Blocks/SideMenu';
|
|
10
|
+
import Stepper from './Blocks/Stepper';
|
|
10
11
|
import Tabs from './Blocks/Tabs';
|
|
11
12
|
import Alert from './Elements/Alert';
|
|
12
13
|
import Avatar from './Elements/Avatar';
|
|
@@ -43,7 +44,7 @@ import RadioButton from './Forms/RadioButton';
|
|
|
43
44
|
import TextArea from './Forms/TextArea';
|
|
44
45
|
import ThemeProvider from './ThemeProvider';
|
|
45
46
|
import utils from './utils';
|
|
46
|
-
export { DropdownSelect, DatePicker, CommonGrid, Popover, SingleSelect, MultiSelect, Select, Card, CornerDialog, ImageList, LightBox, Modal, Tabs, Alert, Avatar, Badge, BorderedBox, Button, Dropdown, ErrorMessage, Icon, Image, Label, Line, Link, Logo, Pagination, Portal, ProgressBar, SimpleLink, SpaceAround, Spinner, Tag, Toast, Toggle, Typography, Checkbox, Input, RadioButton, ThemeProvider, utils, TextArea, LoginPage, LanguageSwitch, SideMenu };
|
|
47
|
+
export { DropdownSelect, DatePicker, CommonGrid, Popover, SingleSelect, MultiSelect, Select, Card, CornerDialog, ImageList, LightBox, Modal, Tabs, Alert, Avatar, Badge, BorderedBox, Button, Dropdown, ErrorMessage, Icon, Image, Label, Line, Link, Logo, Pagination, Portal, ProgressBar, SimpleLink, SpaceAround, Spinner, Tag, Toast, Toggle, Typography, Checkbox, Input, RadioButton, ThemeProvider, utils, TextArea, LoginPage, LanguageSwitch, SideMenu, Stepper };
|
|
47
48
|
export * from './Blocks/CornerDialog';
|
|
48
49
|
export * from './Blocks/ImageList';
|
|
49
50
|
export * from './Blocks/LightBox';
|
|
@@ -89,3 +90,4 @@ export * from './Forms/TextArea';
|
|
|
89
90
|
export * from './Blocks/LoginPage';
|
|
90
91
|
export * from './Blocks/LanguageSwitch';
|
|
91
92
|
export * from './Blocks/SideMenu';
|
|
93
|
+
export * from './Blocks/Stepper';
|