@bosonprotocol/react-kit 0.32.0-alpha.8 → 0.32.0-alpha.9
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/cjs/components/contractualAgreement/ContractualAgreement.js +2 -2
- package/dist/cjs/components/contractualAgreement/ContractualAgreement.js.map +1 -1
- package/dist/cjs/components/error/SimpleError.d.ts +1 -1
- package/dist/cjs/components/error/SimpleError.d.ts.map +1 -1
- package/dist/cjs/components/error/SimpleError.js +2 -1
- package/dist/cjs/components/error/SimpleError.js.map +1 -1
- package/dist/cjs/components/form/BaseTextArea.d.ts +5 -0
- package/dist/cjs/components/form/BaseTextArea.d.ts.map +1 -0
- package/dist/cjs/components/form/{Textarea.js → BaseTextArea.js} +6 -5
- package/dist/cjs/components/form/BaseTextArea.js.map +1 -0
- package/dist/cjs/components/form/Field.styles.d.ts +25 -1
- package/dist/cjs/components/form/Field.styles.d.ts.map +1 -1
- package/dist/cjs/components/form/Field.styles.js +35 -60
- package/dist/cjs/components/form/Field.styles.js.map +1 -1
- package/dist/cjs/components/form/index.d.ts +1 -1
- package/dist/cjs/components/form/index.d.ts.map +1 -1
- package/dist/cjs/components/form/index.js +2 -3
- package/dist/cjs/components/form/index.js.map +1 -1
- package/dist/cjs/components/form/types.d.ts +4 -1
- package/dist/cjs/components/form/types.d.ts.map +1 -1
- package/dist/cjs/components/license/License.js +2 -2
- package/dist/cjs/components/license/License.js.map +1 -1
- package/dist/cjs/components/modal/components/Redeem/Confirmation/Confirmation.js +3 -3
- package/dist/cjs/components/modal/components/Redeem/Confirmation/Confirmation.js.map +1 -1
- package/dist/cjs/components/modal/components/Redeem/ExchangeView/cancellation/CancelExchange.js +2 -2
- package/dist/cjs/components/modal/components/Redeem/ExchangeView/cancellation/CancelExchange.js.map +1 -1
- package/dist/cjs/components/modal/components/Redeem/ExchangeView/expireVoucher/ExpireVoucher.js +2 -2
- package/dist/cjs/components/modal/components/Redeem/ExchangeView/expireVoucher/ExpireVoucher.js.map +1 -1
- package/dist/cjs/components/modal/components/common/VariationSelects.js +2 -2
- package/dist/cjs/components/modal/components/common/VariationSelects.js.map +1 -1
- package/dist/cjs/components/step/MultiSteps.d.ts +23 -0
- package/dist/cjs/components/step/MultiSteps.d.ts.map +1 -0
- package/dist/cjs/components/step/MultiSteps.js +121 -0
- package/dist/cjs/components/step/MultiSteps.js.map +1 -0
- package/dist/cjs/components/step/Step.d.ts +28 -0
- package/dist/cjs/components/step/Step.d.ts.map +1 -0
- package/dist/cjs/components/step/Step.js +32 -0
- package/dist/cjs/components/step/Step.js.map +1 -0
- package/dist/cjs/components/step/Step.styles.d.ts +29 -0
- package/dist/cjs/components/step/Step.styles.d.ts.map +1 -0
- package/dist/cjs/components/step/Step.styles.js +196 -0
- package/dist/cjs/components/step/Step.styles.js.map +1 -0
- package/dist/cjs/index.d.ts +3 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +3 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/contractualAgreement/ContractualAgreement.js +1 -1
- package/dist/esm/components/contractualAgreement/ContractualAgreement.js.map +1 -1
- package/dist/esm/components/error/SimpleError.d.ts +1 -1
- package/dist/esm/components/error/SimpleError.d.ts.map +1 -1
- package/dist/esm/components/error/SimpleError.js +1 -1
- package/dist/esm/components/error/SimpleError.js.map +1 -1
- package/dist/esm/components/form/BaseTextArea.d.ts +5 -0
- package/dist/esm/components/form/BaseTextArea.d.ts.map +1 -0
- package/dist/esm/components/form/{Textarea.js → BaseTextArea.js} +3 -3
- package/dist/esm/components/form/BaseTextArea.js.map +1 -0
- package/dist/esm/components/form/Field.styles.d.ts +25 -1
- package/dist/esm/components/form/Field.styles.d.ts.map +1 -1
- package/dist/esm/components/form/Field.styles.js +35 -60
- package/dist/esm/components/form/Field.styles.js.map +1 -1
- package/dist/esm/components/form/index.d.ts +1 -1
- package/dist/esm/components/form/index.d.ts.map +1 -1
- package/dist/esm/components/form/index.js +1 -1
- package/dist/esm/components/form/index.js.map +1 -1
- package/dist/esm/components/form/types.d.ts +4 -1
- package/dist/esm/components/form/types.d.ts.map +1 -1
- package/dist/esm/components/license/License.js +1 -1
- package/dist/esm/components/license/License.js.map +1 -1
- package/dist/esm/components/modal/components/Redeem/Confirmation/Confirmation.js +1 -1
- package/dist/esm/components/modal/components/Redeem/Confirmation/Confirmation.js.map +1 -1
- package/dist/esm/components/modal/components/Redeem/ExchangeView/cancellation/CancelExchange.js +1 -1
- package/dist/esm/components/modal/components/Redeem/ExchangeView/cancellation/CancelExchange.js.map +1 -1
- package/dist/esm/components/modal/components/Redeem/ExchangeView/expireVoucher/ExpireVoucher.js +1 -1
- package/dist/esm/components/modal/components/Redeem/ExchangeView/expireVoucher/ExpireVoucher.js.map +1 -1
- package/dist/esm/components/modal/components/common/VariationSelects.js +1 -1
- package/dist/esm/components/modal/components/common/VariationSelects.js.map +1 -1
- package/dist/esm/components/step/MultiSteps.d.ts +23 -0
- package/dist/esm/components/step/MultiSteps.d.ts.map +1 -0
- package/dist/esm/components/step/MultiSteps.js +82 -0
- package/dist/esm/components/step/MultiSteps.js.map +1 -0
- package/dist/esm/components/step/Step.d.ts +28 -0
- package/dist/esm/components/step/Step.d.ts.map +1 -0
- package/dist/esm/components/step/Step.js +13 -0
- package/dist/esm/components/step/Step.js.map +1 -0
- package/dist/esm/components/step/Step.styles.d.ts +29 -0
- package/dist/esm/components/step/Step.styles.d.ts.map +1 -0
- package/dist/esm/components/step/Step.styles.js +170 -0
- package/dist/esm/components/step/Step.styles.js.map +1 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -1
- package/package.json +4 -4
- package/src/components/contractualAgreement/ContractualAgreement.tsx +1 -1
- package/src/components/error/SimpleError.tsx +1 -5
- package/src/components/form/{Textarea.tsx → BaseTextArea.tsx} +8 -3
- package/src/components/form/Field.styles.ts +67 -63
- package/src/components/form/index.ts +1 -1
- package/src/components/form/types.ts +2 -1
- package/src/components/license/License.tsx +1 -1
- package/src/components/modal/components/Redeem/Confirmation/Confirmation.tsx +1 -1
- package/src/components/modal/components/Redeem/ExchangeView/cancellation/CancelExchange.tsx +1 -1
- package/src/components/modal/components/Redeem/ExchangeView/expireVoucher/ExpireVoucher.tsx +1 -1
- package/src/components/modal/components/common/VariationSelects.tsx +1 -1
- package/src/components/step/MultiSteps.tsx +187 -0
- package/src/components/step/Step.styles.ts +209 -0
- package/src/components/step/Step.tsx +67 -0
- package/src/index.tsx +3 -0
- package/src/stories/form/{Input.stories.tsx → BaseInput.stories.tsx} +1 -1
- package/src/stories/form/BaseTextArea.stories.tsx +59 -0
- package/src/stories/multisteps/MultiSteps.stories.tsx +86 -0
- package/dist/cjs/components/form/Textarea.d.ts +0 -4
- package/dist/cjs/components/form/Textarea.d.ts.map +0 -1
- package/dist/cjs/components/form/Textarea.js.map +0 -1
- package/dist/esm/components/form/Textarea.d.ts +0 -4
- package/dist/esm/components/form/Textarea.d.ts.map +0 -1
- package/dist/esm/components/form/Textarea.js.map +0 -1
- /package/src/stories/buttons/{button.stories.tsx → Button.stories.tsx} +0 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { ArrowLeft, ArrowRight } from "phosphor-react";
|
|
2
|
+
import React, { useEffect, useRef, useState } from "react";
|
|
3
|
+
import { Grid } from "../ui/Grid";
|
|
4
|
+
import { Step, StepState } from "./Step";
|
|
5
|
+
import { MultiStepStyle, MultiStepWrapper, StepWrapper } from "./Step.styles";
|
|
6
|
+
import { useBreakpoints } from "../../hooks/useBreakpoints";
|
|
7
|
+
import { theme } from "../../theme";
|
|
8
|
+
const colors = theme.colors.light;
|
|
9
|
+
const dataStepsWrapper = "data-steps-wrapper";
|
|
10
|
+
export function MultiSteps({ data, active, callback, disableInactiveSteps = false, isRightArrowEnabled = false, hideArrows = false, enabledArrowColor = colors.darkGrey, disabledArrowColor = colors.lightArrowColor, stepInactiveDotColor = "#d3d5db", stepInactiveBackgroundColor = colors.white, stepInactiveHoverDotColor = colors.darkGrey, stepInactiveHoverBackgroundColor = colors.lightGrey, stepActiveBackgroundColor = colors.black, stepActiveDotsColor = colors.green, // TODO: var(--primary) in boson Dapp
|
|
11
|
+
stepDoneBackgroundColor = colors.green, // TODO: var(--primary) in boson Dapp
|
|
12
|
+
stepDoneCheckColor = colors.black, stepDoneHoverBackgroundColor = colors.black, stepDoneHoverCheckColor = colors.green, // TODO: var(--primary) in boson Dapp
|
|
13
|
+
...props }) {
|
|
14
|
+
const [current, setCurrent] = useState(active || 0);
|
|
15
|
+
const { isLteS } = useBreakpoints();
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
setCurrent(active || 0);
|
|
18
|
+
}, [active]);
|
|
19
|
+
const stepWidthRef = useRef(50);
|
|
20
|
+
return (React.createElement(Grid, { justifyContent: "space-evenly", ref: (element) => {
|
|
21
|
+
const children = element?.querySelectorAll(`[${dataStepsWrapper}] > *`);
|
|
22
|
+
children?.forEach((child) => {
|
|
23
|
+
const isVisible = child.checkVisibility({ checkVisibilityCSS: true });
|
|
24
|
+
if (isVisible) {
|
|
25
|
+
if (child.clientWidth &&
|
|
26
|
+
stepWidthRef.current !== child.clientWidth) {
|
|
27
|
+
stepWidthRef.current = child.clientWidth;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
} },
|
|
32
|
+
isLteS && !hideArrows && (React.createElement(Grid, { alignItems: "center", width: "auto" },
|
|
33
|
+
React.createElement(ArrowLeft, { size: 32, style: { cursor: active && callback ? "pointer" : "not-allowed" }, color: active === 0 ? disabledArrowColor : enabledArrowColor, onClick: () => {
|
|
34
|
+
if (active && callback) {
|
|
35
|
+
callback(active - 1);
|
|
36
|
+
}
|
|
37
|
+
} }))),
|
|
38
|
+
React.createElement("div", { style: {
|
|
39
|
+
width: `${stepWidthRef.current}px`
|
|
40
|
+
} }),
|
|
41
|
+
React.createElement(MultiStepStyle, { ...props, [dataStepsWrapper]: true, "$isLteS": isLteS }, data.map((el, i) => {
|
|
42
|
+
const steps = Array.from(Array(el.steps).keys());
|
|
43
|
+
const newData = data.slice(0, i);
|
|
44
|
+
const previousLength = newData.reduce((acc, cur) => (acc += cur.steps), 0);
|
|
45
|
+
if ((isLteS &&
|
|
46
|
+
current >= previousLength &&
|
|
47
|
+
current <= previousLength + steps.length) ||
|
|
48
|
+
!isLteS) {
|
|
49
|
+
return (React.createElement(MultiStepWrapper, { "$isLteS": isLteS, key: `multi_${i}` },
|
|
50
|
+
React.createElement(StepWrapper, null, steps.map((_, key) => {
|
|
51
|
+
const currentKey = previousLength + key;
|
|
52
|
+
const state = currentKey === current
|
|
53
|
+
? StepState.Active
|
|
54
|
+
: currentKey < current
|
|
55
|
+
? StepState.Done
|
|
56
|
+
: StepState.Inactive;
|
|
57
|
+
const isStepDisabled = !callback ||
|
|
58
|
+
(disableInactiveSteps && StepState.Inactive === state);
|
|
59
|
+
if ((isLteS && active === currentKey) || !isLteS) {
|
|
60
|
+
return (React.createElement(Step, { disabled: isStepDisabled, state: state, onClick: () => {
|
|
61
|
+
if (!isStepDisabled) {
|
|
62
|
+
setCurrent(currentKey);
|
|
63
|
+
callback(currentKey);
|
|
64
|
+
}
|
|
65
|
+
}, key: `multi-step_${currentKey}`, stepInactiveDotColor: stepInactiveDotColor, stepInactiveBackgroundColor: stepInactiveBackgroundColor, stepInactiveHoverDotColor: stepInactiveHoverDotColor, stepInactiveHoverBackgroundColor: stepInactiveHoverBackgroundColor, stepActiveBackgroundColor: stepActiveBackgroundColor, stepActiveDotsColor: stepActiveDotsColor, stepDoneBackgroundColor: stepDoneBackgroundColor, stepDoneCheckColor: stepDoneCheckColor, stepDoneHoverBackgroundColor: stepDoneHoverBackgroundColor, stepDoneHoverCheckColor: stepDoneHoverCheckColor }));
|
|
66
|
+
}
|
|
67
|
+
return null;
|
|
68
|
+
})),
|
|
69
|
+
React.createElement("p", null, el.name)));
|
|
70
|
+
}
|
|
71
|
+
return null;
|
|
72
|
+
})),
|
|
73
|
+
isLteS && !hideArrows && (React.createElement(Grid, { alignItems: "flex-end", width: "auto" },
|
|
74
|
+
React.createElement(ArrowRight, { size: 32, color: isRightArrowEnabled ? enabledArrowColor : disabledArrowColor, style: { cursor: isRightArrowEnabled ? "pointer" : "not-allowed" }, onClick: () => {
|
|
75
|
+
if (isRightArrowEnabled &&
|
|
76
|
+
typeof active === "number" &&
|
|
77
|
+
callback) {
|
|
78
|
+
callback(active + 1);
|
|
79
|
+
}
|
|
80
|
+
} })))));
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=MultiSteps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultiSteps.js","sourceRoot":"","sources":["../../../../src/components/step/MultiSteps.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,IAAI,EAAkB,SAAS,EAAE,MAAM,QAAQ,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;AAgBlC,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AAC9C,MAAM,UAAU,UAAU,CAAC,EACzB,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,oBAAoB,GAAG,KAAK,EAC5B,mBAAmB,GAAG,KAAK,EAC3B,UAAU,GAAG,KAAK,EAClB,iBAAiB,GAAG,MAAM,CAAC,QAAQ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,EAE9B,uBAAuB,EAAE,uBAAuB,GAChD,CACH,CAAC;yBACH;wBACD,OAAO,IAAI,CAAC;oBACd,CAAC,CAAC,CACU;oBACd,+BAAI,EAAE,CAAC,IAAI,CAAK,CACC,CACpB,CAAC;aACH;YACD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CACa;QAChB,MAAM,IAAI,CAAC,UAAU,IAAI,CACxB,oBAAC,IAAI,IAAC,UAAU,EAAC,UAAU,EAAC,KAAK,EAAC,MAAM;YACtC,oBAAC,UAAU,IACT,IAAI,EAAE,EAAE,EACR,KAAK,EAAE,mBAAmB,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,kBAAkB,EACnE,KAAK,EAAE,EAAE,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,EAAE,EAClE,OAAO,EAAE,GAAG,EAAE;oBACZ,IACE,mBAAmB;wBACnB,OAAO,MAAM,KAAK,QAAQ;wBAC1B,QAAQ,EACR;wBACA,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;qBACtB;gBACH,CAAC,GACD,CACG,CACR,CACI,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CSSProperties } from "styled-components";
|
|
3
|
+
export declare enum StepState {
|
|
4
|
+
Inactive = "inactive",
|
|
5
|
+
Active = "active",
|
|
6
|
+
Done = "done"
|
|
7
|
+
}
|
|
8
|
+
export type StepColorProps = {
|
|
9
|
+
stepInactiveDotColor?: CSSProperties["color"];
|
|
10
|
+
stepInactiveBackgroundColor?: CSSProperties["color"];
|
|
11
|
+
stepInactiveHoverDotColor?: CSSProperties["color"];
|
|
12
|
+
stepInactiveHoverBackgroundColor?: CSSProperties["color"];
|
|
13
|
+
stepActiveBackgroundColor?: CSSProperties["color"];
|
|
14
|
+
stepActiveDotsColor?: CSSProperties["color"];
|
|
15
|
+
stepDoneBackgroundColor?: CSSProperties["color"];
|
|
16
|
+
stepDoneCheckColor?: CSSProperties["color"];
|
|
17
|
+
stepDoneHoverBackgroundColor?: CSSProperties["color"];
|
|
18
|
+
stepDoneHoverCheckColor?: CSSProperties["color"];
|
|
19
|
+
};
|
|
20
|
+
type StepProps = StepColorProps & {
|
|
21
|
+
className?: string;
|
|
22
|
+
onClick?: () => void;
|
|
23
|
+
state?: StepState;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
};
|
|
26
|
+
export declare function Step({ state, className, disabled, onClick, stepInactiveDotColor, stepInactiveBackgroundColor, stepInactiveHoverDotColor, stepInactiveHoverBackgroundColor, stepActiveBackgroundColor, stepActiveDotsColor, stepDoneBackgroundColor, stepDoneCheckColor, stepDoneHoverBackgroundColor, stepDoneHoverCheckColor, ...props }: StepProps): JSX.Element;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=Step.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Step.d.ts","sourceRoot":"","sources":["../../../../src/components/step/Step.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAIlD,oBAAY,SAAS;IACnB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,oBAAoB,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9C,2BAA2B,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IACrD,yBAAyB,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IACnD,gCAAgC,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC1D,yBAAyB,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IACnD,mBAAmB,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC7C,uBAAuB,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IACjD,kBAAkB,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC5C,4BAA4B,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IACtD,uBAAuB,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;CAClD,CAAC;AAEF,KAAK,SAAS,GAAG,cAAc,GAAG;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,wBAAgB,IAAI,CAAC,EACnB,KAA0B,EAC1B,SAAS,EACT,QAAQ,EACR,OAAO,EACP,oBAAoB,EACpB,2BAA2B,EAC3B,yBAAyB,EACzB,gCAAgC,EAChC,yBAAyB,EACzB,mBAAmB,EACnB,uBAAuB,EACvB,kBAAkB,EAClB,4BAA4B,EAC5B,uBAAuB,EACvB,GAAG,KAAK,EACT,EAAE,SAAS,eAoBX"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StepStyle } from "./Step.styles";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export var StepState;
|
|
4
|
+
(function (StepState) {
|
|
5
|
+
StepState["Inactive"] = "inactive";
|
|
6
|
+
StepState["Active"] = "active";
|
|
7
|
+
StepState["Done"] = "done";
|
|
8
|
+
})(StepState || (StepState = {}));
|
|
9
|
+
export function Step({ state = StepState.Inactive, className, disabled, onClick, stepInactiveDotColor, stepInactiveBackgroundColor, stepInactiveHoverDotColor, stepInactiveHoverBackgroundColor, stepActiveBackgroundColor, stepActiveDotsColor, stepDoneBackgroundColor, stepDoneCheckColor, stepDoneHoverBackgroundColor, stepDoneHoverCheckColor, ...props }) {
|
|
10
|
+
return (React.createElement(StepStyle, { "$state": state, ...props, "$stepInactiveDotColor": stepInactiveDotColor, "$stepInactiveBackgroundColor": stepInactiveBackgroundColor, "$stepInactiveHoverDotColor": stepInactiveHoverDotColor, "$stepInactiveHoverBackgroundColor": stepInactiveHoverBackgroundColor, "$stepActiveBackgroundColor": stepActiveBackgroundColor, "$stepActiveDotsColor": stepActiveDotsColor, "$stepDoneBackgroundColor": stepDoneBackgroundColor, "$stepDoneCheckColor": stepDoneCheckColor, "$stepDoneHoverBackgroundColor": stepDoneHoverBackgroundColor, "$stepDoneHoverCheckColor": stepDoneHoverCheckColor, disabled: !!disabled },
|
|
11
|
+
React.createElement("div", null)));
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=Step.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Step.js","sourceRoot":"","sources":["../../../../src/components/step/Step.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAN,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,kCAAqB,CAAA;IACrB,8BAAiB,CAAA;IACjB,0BAAa,CAAA;AACf,CAAC,EAJW,SAAS,KAAT,SAAS,QAIpB;AAsBD,MAAM,UAAU,IAAI,CAAC,EACnB,KAAK,GAAG,SAAS,CAAC,QAAQ,EAC1B,SAAS,EACT,QAAQ,EACR,OAAO,EACP,oBAAoB,EACpB,2BAA2B,EAC3B,yBAAyB,EACzB,gCAAgC,EAChC,yBAAyB,EACzB,mBAAmB,EACnB,uBAAuB,EACvB,kBAAkB,EAClB,4BAA4B,EAC5B,uBAAuB,EACvB,GAAG,KAAK,EACE;IACV,OAAO,CACL,oBAAC,SAAS,cACA,KAAK,KACT,KAAK,2BACc,oBAAoB,kCACb,2BAA2B,gCAC7B,yBAAyB,uCAClB,gCAAgC,gCACvC,yBAAyB,0BAC/B,mBAAmB,8BACf,uBAAuB,yBAC5B,kBAAkB,mCACR,4BAA4B,8BACjC,uBAAuB,EACjD,QAAQ,EAAE,CAAC,CAAC,QAAQ;QAEpB,gCAAO,CACG,CACb,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CSSProperties } from "styled-components";
|
|
3
|
+
import { StepState } from "./Step";
|
|
4
|
+
type StepColorProps = {
|
|
5
|
+
$stepInactiveDotColor?: CSSProperties["color"];
|
|
6
|
+
$stepInactiveBackgroundColor?: CSSProperties["color"];
|
|
7
|
+
$stepInactiveHoverDotColor?: CSSProperties["color"];
|
|
8
|
+
$stepInactiveHoverBackgroundColor?: CSSProperties["color"];
|
|
9
|
+
$stepActiveBackgroundColor?: CSSProperties["color"];
|
|
10
|
+
$stepActiveDotsColor?: CSSProperties["color"];
|
|
11
|
+
$stepDoneBackgroundColor?: CSSProperties["color"];
|
|
12
|
+
$stepDoneCheckColor?: CSSProperties["color"];
|
|
13
|
+
$stepDoneHoverBackgroundColor?: CSSProperties["color"];
|
|
14
|
+
$stepDoneHoverCheckColor?: CSSProperties["color"];
|
|
15
|
+
};
|
|
16
|
+
export declare const StepStyle: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
17
|
+
$state: StepState;
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
$isLteS?: boolean | undefined;
|
|
20
|
+
} & StepColorProps>>;
|
|
21
|
+
export declare const MultiStepStyle: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
22
|
+
$isLteS: boolean;
|
|
23
|
+
}>>;
|
|
24
|
+
export declare const MultiStepWrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
25
|
+
$isLteS: boolean;
|
|
26
|
+
}>>;
|
|
27
|
+
export declare const StepWrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=Step.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Step.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/step/Step.styles.ts"],"names":[],"mappings":";AAAA,OAAe,EAAE,aAAa,EAAO,MAAM,mBAAmB,CAAC;AAG/D,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAGnC,KAAK,cAAc,GAAG;IACpB,qBAAqB,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC/C,4BAA4B,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IACtD,0BAA0B,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IACpD,iCAAiC,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC3D,0BAA0B,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IACpD,oBAAoB,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9C,wBAAwB,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAClD,mBAAmB,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC7C,6BAA6B,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IACvD,wBAAwB,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;CACnD,CAAC;AACF,eAAO,MAAM,SAAS;YAEV,SAAS;cACP,OAAO;;oBA4IpB,CAAC;AAEF,eAAO,MAAM,cAAc;aAAyB,OAAO;GAoB1D,CAAC;AAEF,eAAO,MAAM,gBAAgB;aAAyB,OAAO;GAO5D,CAAC;AAEF,eAAO,MAAM,WAAW,gNAcvB,CAAC"}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import styled, { css } from "styled-components";
|
|
2
|
+
import { transition } from "../../components/ui/styles";
|
|
3
|
+
import { StepState } from "./Step";
|
|
4
|
+
import { theme } from "../../theme";
|
|
5
|
+
const colors = theme.colors.light;
|
|
6
|
+
export const StepStyle = styled.div `
|
|
7
|
+
position: relative;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: row;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
align-items: center;
|
|
12
|
+
flex-grow: 1;
|
|
13
|
+
|
|
14
|
+
min-width: 6rem;
|
|
15
|
+
height: 1.25rem;
|
|
16
|
+
${({ $state, disabled }) => $state !== StepState.Active &&
|
|
17
|
+
!disabled &&
|
|
18
|
+
css `
|
|
19
|
+
&:hover {
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
}
|
|
22
|
+
`}
|
|
23
|
+
|
|
24
|
+
${({ $state, disabled, $stepInactiveBackgroundColor, $stepInactiveDotColor, $stepInactiveHoverBackgroundColor, $stepInactiveHoverDotColor }) => $state === StepState.Inactive &&
|
|
25
|
+
css `
|
|
26
|
+
background: ${$stepInactiveBackgroundColor};
|
|
27
|
+
${transition}
|
|
28
|
+
|
|
29
|
+
&:before {
|
|
30
|
+
content: "";
|
|
31
|
+
position: absolute;
|
|
32
|
+
top: 50%;
|
|
33
|
+
left: 50%;
|
|
34
|
+
transform: translate(-50%, -50%);
|
|
35
|
+
border-radius: 50%;
|
|
36
|
+
background: ${$stepInactiveDotColor};
|
|
37
|
+
|
|
38
|
+
${transition}
|
|
39
|
+
|
|
40
|
+
width: 0.25rem;
|
|
41
|
+
height: 0.25rem;
|
|
42
|
+
}
|
|
43
|
+
${!disabled &&
|
|
44
|
+
css `
|
|
45
|
+
&:hover {
|
|
46
|
+
background: ${$stepInactiveHoverBackgroundColor};
|
|
47
|
+
&:before {
|
|
48
|
+
background: ${$stepInactiveHoverDotColor};
|
|
49
|
+
width: 0.5rem;
|
|
50
|
+
height: 0.5rem;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
`}
|
|
54
|
+
|
|
55
|
+
> div {
|
|
56
|
+
display: none;
|
|
57
|
+
}
|
|
58
|
+
`}
|
|
59
|
+
|
|
60
|
+
${({ $state, $stepActiveBackgroundColor, $stepActiveDotsColor }) => $state === StepState.Active &&
|
|
61
|
+
css `
|
|
62
|
+
background: ${$stepActiveBackgroundColor};
|
|
63
|
+
|
|
64
|
+
&:before {
|
|
65
|
+
margin-left: -0.75rem;
|
|
66
|
+
}
|
|
67
|
+
&:after {
|
|
68
|
+
margin-left: 0.75rem;
|
|
69
|
+
}
|
|
70
|
+
> div,
|
|
71
|
+
&:before,
|
|
72
|
+
&:after {
|
|
73
|
+
content: "";
|
|
74
|
+
position: absolute;
|
|
75
|
+
top: 50%;
|
|
76
|
+
left: 50%;
|
|
77
|
+
transform: translate(-50%, -50%);
|
|
78
|
+
${transition}
|
|
79
|
+
width: 0.25rem;
|
|
80
|
+
height: 0.25rem;
|
|
81
|
+
border-radius: 50%;
|
|
82
|
+
background: ${$stepActiveDotsColor};
|
|
83
|
+
}
|
|
84
|
+
`}
|
|
85
|
+
|
|
86
|
+
${({ $state, disabled, $stepDoneBackgroundColor, $stepDoneCheckColor, $stepDoneHoverBackgroundColor, $stepDoneHoverCheckColor }) => $state === StepState.Done &&
|
|
87
|
+
css `
|
|
88
|
+
background: ${$stepDoneBackgroundColor};
|
|
89
|
+
|
|
90
|
+
&:before,
|
|
91
|
+
&:after {
|
|
92
|
+
content: "";
|
|
93
|
+
position: absolute;
|
|
94
|
+
top: 50%;
|
|
95
|
+
left: 50%;
|
|
96
|
+
${transition}
|
|
97
|
+
background: ${$stepDoneCheckColor};
|
|
98
|
+
}
|
|
99
|
+
&:before {
|
|
100
|
+
width: 0.35rem;
|
|
101
|
+
height: 0.125rem;
|
|
102
|
+
transform: translate(calc(-50% - 0.35rem), calc(-50% + 0.15rem))
|
|
103
|
+
rotate(-135deg);
|
|
104
|
+
}
|
|
105
|
+
&:after {
|
|
106
|
+
width: 0.75rem;
|
|
107
|
+
height: 0.125rem;
|
|
108
|
+
transform: translate(-50%, -50%) rotate(-45deg);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
> div {
|
|
112
|
+
display: none;
|
|
113
|
+
}
|
|
114
|
+
${!disabled &&
|
|
115
|
+
css `
|
|
116
|
+
&:hover {
|
|
117
|
+
background: ${$stepDoneHoverBackgroundColor};
|
|
118
|
+
&:before,
|
|
119
|
+
&:after {
|
|
120
|
+
background: ${$stepDoneHoverCheckColor};
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
`}
|
|
124
|
+
`}
|
|
125
|
+
`;
|
|
126
|
+
export const MultiStepStyle = styled.div `
|
|
127
|
+
display: flex;
|
|
128
|
+
gap: 1rem;
|
|
129
|
+
flex-direction: row;
|
|
130
|
+
flex-wrap: nowrap;
|
|
131
|
+
justify-content: flex-start;
|
|
132
|
+
width: 100%;
|
|
133
|
+
align-items: center;
|
|
134
|
+
div div {
|
|
135
|
+
display: ${({ $isLteS }) => $isLteS && "none"};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
p {
|
|
139
|
+
text-align: center;
|
|
140
|
+
margin: 0;
|
|
141
|
+
font-weight: 600;
|
|
142
|
+
font-size: 0.75rem;
|
|
143
|
+
line-height: 1.5;
|
|
144
|
+
color: ${colors.darkGrey};
|
|
145
|
+
}
|
|
146
|
+
`;
|
|
147
|
+
export const MultiStepWrapper = styled.div `
|
|
148
|
+
display: flex;
|
|
149
|
+
flex-grow: 1;
|
|
150
|
+
flex-direction: column;
|
|
151
|
+
position: ${({ $isLteS }) => $isLteS && "absolute"};
|
|
152
|
+
left: ${({ $isLteS }) => $isLteS && "50%"};
|
|
153
|
+
transform: ${({ $isLteS }) => $isLteS && "translate(-50%, 0)"};
|
|
154
|
+
`;
|
|
155
|
+
export const StepWrapper = styled.div `
|
|
156
|
+
display: flex;
|
|
157
|
+
gap: 0;
|
|
158
|
+
flex-grow: 1;
|
|
159
|
+
|
|
160
|
+
flex-direction: row;
|
|
161
|
+
flex-wrap: nowrap;
|
|
162
|
+
border: 1px solid ${colors.border};
|
|
163
|
+
&:empty + p {
|
|
164
|
+
display: none;
|
|
165
|
+
}
|
|
166
|
+
&:empty {
|
|
167
|
+
display: none;
|
|
168
|
+
}
|
|
169
|
+
`;
|
|
170
|
+
//# sourceMappingURL=Step.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Step.styles.js","sourceRoot":"","sources":["../../../../src/components/step/Step.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAiB,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;AAalC,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAMlC;;;;;;;;;;IAUG,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,CACzB,MAAM,KAAK,SAAS,CAAC,MAAM;IAC3B,CAAC,QAAQ;IACT,GAAG,CAAA;;;;KAIF;;IAED,CAAC,EACD,MAAM,EACN,QAAQ,EACR,4BAA4B,EAC5B,qBAAqB,EACrB,iCAAiC,EACjC,0BAA0B,EAC3B,EAAE,EAAE,CACH,MAAM,KAAK,SAAS,CAAC,QAAQ;IAC7B,GAAG,CAAA;oBACa,4BAA4B;QACxC,UAAU;;;;;;;;;sBASI,qBAAqB;;UAEjC,UAAU;;;;;QAKZ,CAAC,QAAQ;QACX,GAAG,CAAA;;wBAEe,iCAAiC;;0BAE/B,0BAA0B;;;;;OAK7C;;;;;KAKF;;IAED,CAAC,EAAE,MAAM,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,EAAE,EAAE,CACjE,MAAM,KAAK,SAAS,CAAC,MAAM;IAC3B,GAAG,CAAA;oBACa,0BAA0B;;;;;;;;;;;;;;;;UAgBpC,UAAU;;;;sBAIE,oBAAoB;;KAErC;;IAED,CAAC,EACD,MAAM,EACN,QAAQ,EACR,wBAAwB,EACxB,mBAAmB,EACnB,6BAA6B,EAC7B,wBAAwB,EACzB,EAAE,EAAE,CACH,MAAM,KAAK,SAAS,CAAC,IAAI;IACzB,GAAG,CAAA;oBACa,wBAAwB;;;;;;;;UAQlC,UAAU;sBACE,mBAAmB;;;;;;;;;;;;;;;;;QAiBjC,CAAC,QAAQ;QACX,GAAG,CAAA;;wBAEe,6BAA6B;;;0BAG3B,wBAAwB;;;OAG3C;KACF;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAsB;;;;;;;;;eAS/C,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,IAAI,MAAM;;;;;;;;;aASpC,MAAM,CAAC,QAAQ;;CAE3B,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAsB;;;;cAIlD,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,IAAI,UAAU;UAC1C,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,IAAI,KAAK;eAC5B,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,IAAI,oBAAoB;CAC9D,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;sBAOf,MAAM,CAAC,MAAM;;;;;;;CAOlC,CAAC"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -78,4 +78,7 @@ export * from "./components/wallet2/web3Provider/index";
|
|
|
78
78
|
export * from "./components/wallet2/accountDrawer/index";
|
|
79
79
|
export * from "./components/portal/Portal";
|
|
80
80
|
export * from "./components/error/ErrorMessage";
|
|
81
|
+
export * from "./components/error/SimpleError";
|
|
82
|
+
export * from "./components/step/MultiSteps";
|
|
83
|
+
export * from "./components/ipfs/IpfsProvider";
|
|
81
84
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EACL,OAAO,IAAI,YAAY,EACvB,OAAO,EACP,iBAAiB,EAClB,MAAM,8BAA8B,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,wCAAwC,CAAC;AACvD,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,sCAAsC,CAAC;AACrD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2CAA2C,CAAC;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CAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -78,4 +78,7 @@ export * from "./components/wallet2/web3Provider/index";
|
|
|
78
78
|
export * from "./components/wallet2/accountDrawer/index";
|
|
79
79
|
export * from "./components/portal/Portal";
|
|
80
80
|
export * from "./components/error/ErrorMessage";
|
|
81
|
+
export * from "./components/error/SimpleError";
|
|
82
|
+
export * from "./components/step/MultiSteps";
|
|
83
|
+
export * from "./components/ipfs/IpfsProvider";
|
|
81
84
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EACL,OAAO,IAAI,YAAY,EAEvB,iBAAiB,EAClB,MAAM,8BAA8B,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0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2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6CAA6C,CAAC;AAC5D,cAAc,uCAAuC,CAAC;AACtD,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bosonprotocol/react-kit",
|
|
3
3
|
"description": "React toolkit with smart components and hooks for building on top of the Boson Protocol.",
|
|
4
|
-
"version": "0.32.0-alpha.
|
|
4
|
+
"version": "0.32.0-alpha.9",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
7
7
|
"types": "./dist/cjs/index.d.ts",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"license": "Apache-2.0",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@bosonprotocol/chat-sdk": "^1.3.1-alpha.9",
|
|
18
|
-
"@bosonprotocol/core-sdk": "^1.40.4-alpha.
|
|
19
|
-
"@bosonprotocol/ethers-sdk": "^1.14.4-alpha.
|
|
18
|
+
"@bosonprotocol/core-sdk": "^1.40.4-alpha.7",
|
|
19
|
+
"@bosonprotocol/ethers-sdk": "^1.14.4-alpha.7",
|
|
20
20
|
"@bosonprotocol/ipfs-storage": "^1.11.3",
|
|
21
21
|
"@davatar/react": "1.11.1",
|
|
22
22
|
"@ethersproject/units": "5.6.0",
|
|
@@ -185,5 +185,5 @@
|
|
|
185
185
|
"overrides": {
|
|
186
186
|
"typescript": "^5.1.6"
|
|
187
187
|
},
|
|
188
|
-
"gitHead": "
|
|
188
|
+
"gitHead": "bbc2d285de7252d51efa9007980be0ba83e8fd5e"
|
|
189
189
|
}
|
|
@@ -8,7 +8,7 @@ import { ProgressStatus } from "../../lib/progress/progressStatus";
|
|
|
8
8
|
|
|
9
9
|
import { subgraph } from "@bosonprotocol/core-sdk";
|
|
10
10
|
import { useBosonContext } from "../boson/BosonProvider";
|
|
11
|
-
import SimpleError from "../error/SimpleError";
|
|
11
|
+
import { SimpleError } from "../error/SimpleError";
|
|
12
12
|
import Loading from "../ui/loading/LoadingWrapper";
|
|
13
13
|
|
|
14
14
|
interface ContractualAgreementProps {
|
|
@@ -18,11 +18,7 @@ interface Props {
|
|
|
18
18
|
[x: string]: any;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
export
|
|
22
|
-
errorMessage,
|
|
23
|
-
children,
|
|
24
|
-
...rest
|
|
25
|
-
}: Props) {
|
|
21
|
+
export function SimpleError({ errorMessage, children, ...rest }: Props) {
|
|
26
22
|
return (
|
|
27
23
|
<StyledGrid
|
|
28
24
|
justifyContent="flex-start"
|
|
@@ -4,15 +4,20 @@ import React from "react";
|
|
|
4
4
|
import Error from "./Error";
|
|
5
5
|
import { FieldTextArea } from "./Field.styles";
|
|
6
6
|
import type { TextareaProps } from "./types";
|
|
7
|
-
|
|
8
|
-
export
|
|
7
|
+
export type BaseTextAreaProps = TextareaProps;
|
|
8
|
+
export function BaseTextArea({ name, theme, ...props }: TextareaProps) {
|
|
9
9
|
const [field, meta] = useField(name);
|
|
10
10
|
const errorMessage = meta.error && meta.touched ? meta.error : "";
|
|
11
11
|
const displayError =
|
|
12
12
|
typeof errorMessage === typeof "string" && errorMessage !== "";
|
|
13
13
|
return (
|
|
14
14
|
<>
|
|
15
|
-
<FieldTextArea
|
|
15
|
+
<FieldTextArea
|
|
16
|
+
$error={errorMessage}
|
|
17
|
+
{...field}
|
|
18
|
+
{...props}
|
|
19
|
+
theme={theme}
|
|
20
|
+
/>
|
|
16
21
|
<Error display={displayError} message={errorMessage} />
|
|
17
22
|
</>
|
|
18
23
|
);
|
|
@@ -61,7 +61,6 @@ export const FieldInput = styled.input<{
|
|
|
61
61
|
border: 1px solid ${(props) => props.theme?.borderColor || colors.border};
|
|
62
62
|
border-radius: ${(props) => props.theme?.borderRadius || 0}px;
|
|
63
63
|
outline: none;
|
|
64
|
-
font-family: "Plus Jakarta Sans";
|
|
65
64
|
|
|
66
65
|
${transition}
|
|
67
66
|
|
|
@@ -210,16 +209,38 @@ export const FieldFileUploadWrapper = styled.div<{ $disabled: boolean }>`
|
|
|
210
209
|
background: ${colors.black}80;
|
|
211
210
|
}
|
|
212
211
|
`;
|
|
213
|
-
|
|
214
|
-
|
|
212
|
+
export type TextAreaTheme = {
|
|
213
|
+
background: CSSProperties["backgroundColor"];
|
|
214
|
+
borderColor: CSSProperties["borderColor"];
|
|
215
|
+
borderRadius: CSSProperties["borderRadius"];
|
|
216
|
+
focus: {
|
|
217
|
+
caretColor: CSSProperties["caretColor"];
|
|
218
|
+
};
|
|
219
|
+
hover: {
|
|
220
|
+
borderColor: CSSProperties["borderColor"];
|
|
221
|
+
};
|
|
222
|
+
error: {
|
|
223
|
+
borderColor: CSSProperties["borderColor"];
|
|
224
|
+
hover: {
|
|
225
|
+
borderColor: CSSProperties["borderColor"];
|
|
226
|
+
};
|
|
227
|
+
focus: {
|
|
228
|
+
borderColor: CSSProperties["borderColor"];
|
|
229
|
+
caretColor: CSSProperties["caretColor"];
|
|
230
|
+
};
|
|
231
|
+
placeholder: {
|
|
232
|
+
color: CSSProperties["color"];
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
export const FieldTextArea = styled.textarea<{ $error: any }>`
|
|
215
237
|
width: 100%;
|
|
216
238
|
padding: 1rem;
|
|
217
239
|
gap: 0.5rem;
|
|
218
|
-
font-family:
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
border:
|
|
222
|
-
border-radius: 0;
|
|
240
|
+
font-family: inherit;
|
|
241
|
+
background: ${(props) => props.theme?.background || "transparent"};
|
|
242
|
+
border: 1px solid ${(props) => props.theme?.borderColor || colors.border};
|
|
243
|
+
border-radius: ${(props) => props.theme?.borderRadius || 0}px;
|
|
223
244
|
outline: none;
|
|
224
245
|
|
|
225
246
|
${transition}
|
|
@@ -227,7 +248,9 @@ export const FieldTextArea = styled.textarea<{ error: any }>`
|
|
|
227
248
|
&:not(:disabled) {
|
|
228
249
|
&:focus,
|
|
229
250
|
&:hover {
|
|
230
|
-
border: 1px solid
|
|
251
|
+
border: 1px solid
|
|
252
|
+
${(props) => props.theme?.hover?.borderColor || colors.lightGrey};
|
|
253
|
+
caret-color: ${(props) => props.theme?.focus?.caretColor || "initial"};
|
|
231
254
|
}
|
|
232
255
|
}
|
|
233
256
|
|
|
@@ -236,39 +259,41 @@ export const FieldTextArea = styled.textarea<{ error: any }>`
|
|
|
236
259
|
opacity: 0.5;
|
|
237
260
|
}
|
|
238
261
|
|
|
239
|
-
${({ error }) =>
|
|
240
|
-
!checkIfValueIsEmpty(error)
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
262
|
+
${({ $error }) =>
|
|
263
|
+
!checkIfValueIsEmpty($error) &&
|
|
264
|
+
css`
|
|
265
|
+
border: 1px solid
|
|
266
|
+
${(props) => props.theme?.error?.borderColor || colors.orange};
|
|
267
|
+
&:not(:disabled) {
|
|
268
|
+
&:hover {
|
|
269
|
+
border: 1px solid
|
|
270
|
+
${(props) =>
|
|
271
|
+
props.theme?.error?.hover?.borderColor || colors.orange};
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
&:not(:disabled) {
|
|
275
|
+
&:focus {
|
|
276
|
+
border: 1px solid
|
|
277
|
+
${(props) =>
|
|
278
|
+
props.theme?.error?.focus?.borderColor || colors.lightGrey};
|
|
279
|
+
caret-color: ${(props) =>
|
|
280
|
+
props.theme?.error?.focus?.caretColor || colors.orange};
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
&::placeholder {
|
|
284
|
+
color: ${(props) =>
|
|
285
|
+
props.theme?.error?.placeholder?.color || colors.orange};
|
|
286
|
+
opacity: 1;
|
|
287
|
+
}
|
|
288
|
+
&:-ms-input-placeholder {
|
|
289
|
+
color: ${(props) =>
|
|
290
|
+
props.theme?.error?.placeholder?.color || colors.orange};
|
|
291
|
+
}
|
|
292
|
+
&::-ms-input-placeholder {
|
|
293
|
+
color: ${(props) =>
|
|
294
|
+
props.theme?.error?.placeholder?.color || colors.orange};
|
|
295
|
+
}
|
|
296
|
+
`}
|
|
272
297
|
`;
|
|
273
298
|
|
|
274
299
|
export const FormFieldWrapper = styled(Grid)`
|
|
@@ -277,31 +302,10 @@ export const FormFieldWrapper = styled(Grid)`
|
|
|
277
302
|
line-height: 150%;
|
|
278
303
|
}
|
|
279
304
|
|
|
280
|
-
// theme white
|
|
281
|
-
margin-bottom: 0.5rem;
|
|
282
|
-
input,
|
|
283
|
-
textarea {
|
|
284
|
-
background: ${colors.white};
|
|
285
|
-
&:disabled {
|
|
286
|
-
opacity: 1;
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
input {
|
|
290
|
-
border-width: 0;
|
|
291
|
-
&:hover {
|
|
292
|
-
border-width: 0;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
input + div {
|
|
296
|
-
background: ${colors.white};
|
|
297
|
-
}
|
|
298
|
-
// end theme white
|
|
299
|
-
|
|
300
305
|
[data-header] {
|
|
301
306
|
margin: 0;
|
|
302
307
|
font-weight: 600;
|
|
303
308
|
font-size: 1rem;
|
|
304
|
-
color: ${colors.black};
|
|
305
309
|
+ div button {
|
|
306
310
|
margin-left: 0.5rem;
|
|
307
311
|
padding: 0;
|