@bosonprotocol/react-kit 0.34.0-alpha.27 → 0.34.0-alpha.29
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/buttons/BaseButton.d.ts +0 -2
- package/dist/cjs/components/buttons/BaseButton.d.ts.map +1 -1
- package/dist/cjs/components/buttons/BaseButton.js +2 -19
- package/dist/cjs/components/buttons/BaseButton.js.map +1 -1
- package/dist/cjs/components/buttons/Button.d.ts +1 -1
- package/dist/cjs/components/cta/common/CtaButton.d.ts.map +1 -1
- package/dist/cjs/components/cta/common/CtaButton.js +1 -1
- package/dist/cjs/components/cta/common/CtaButton.js.map +1 -1
- package/dist/cjs/components/cta/common/styles.d.ts.map +1 -1
- package/dist/cjs/components/cta/common/styles.js +10 -8
- package/dist/cjs/components/cta/common/styles.js.map +1 -1
- package/dist/cjs/components/form/BaseCheckbox.d.ts +1 -1
- package/dist/cjs/components/form/BaseCheckbox.d.ts.map +1 -1
- package/dist/cjs/components/form/BaseCheckbox.js +8 -4
- package/dist/cjs/components/form/BaseCheckbox.js.map +1 -1
- package/dist/cjs/components/form/Field.styles.d.ts +22 -22
- package/dist/cjs/components/form/Field.styles.d.ts.map +1 -1
- package/dist/cjs/components/form/Field.styles.js +1 -2
- package/dist/cjs/components/form/Field.styles.js.map +1 -1
- package/dist/cjs/components/form/Upload/BaseUpload.js +1 -1
- package/dist/cjs/components/form/Upload/BaseUpload.js.map +1 -1
- package/dist/cjs/components/form/types.d.ts +5 -2
- package/dist/cjs/components/form/types.d.ts.map +1 -1
- package/dist/cjs/components/modal/components/SellerFinance/FinancesStyles.d.ts +22 -22
- package/dist/cjs/components/modal/components/common/detail/Detail.style.d.ts +51 -51
- package/dist/cjs/components/productCard/ProductCard.styles.d.ts +33 -33
- package/dist/cjs/components/ui/ThemedButton.d.ts +1 -1
- package/dist/cjs/components/ui/column/index.d.ts +1 -1
- package/dist/cjs/components/ui/styles.d.ts +1 -1
- package/dist/cjs/components/ui/styles.d.ts.map +1 -1
- package/dist/cjs/components/ui/styles.js +18 -27
- package/dist/cjs/components/ui/styles.js.map +1 -1
- package/dist/esm/components/buttons/BaseButton.d.ts +0 -2
- package/dist/esm/components/buttons/BaseButton.d.ts.map +1 -1
- package/dist/esm/components/buttons/BaseButton.js +2 -19
- package/dist/esm/components/buttons/BaseButton.js.map +1 -1
- package/dist/esm/components/buttons/Button.d.ts +1 -1
- package/dist/esm/components/cta/common/CtaButton.d.ts.map +1 -1
- package/dist/esm/components/cta/common/CtaButton.js +1 -1
- package/dist/esm/components/cta/common/CtaButton.js.map +1 -1
- package/dist/esm/components/cta/common/styles.d.ts.map +1 -1
- package/dist/esm/components/cta/common/styles.js +10 -8
- package/dist/esm/components/cta/common/styles.js.map +1 -1
- package/dist/esm/components/form/BaseCheckbox.d.ts +1 -1
- package/dist/esm/components/form/BaseCheckbox.d.ts.map +1 -1
- package/dist/esm/components/form/BaseCheckbox.js +7 -4
- package/dist/esm/components/form/BaseCheckbox.js.map +1 -1
- package/dist/esm/components/form/Field.styles.d.ts +22 -22
- package/dist/esm/components/form/Field.styles.d.ts.map +1 -1
- package/dist/esm/components/form/Field.styles.js +1 -2
- package/dist/esm/components/form/Field.styles.js.map +1 -1
- package/dist/esm/components/form/Upload/BaseUpload.js +1 -1
- package/dist/esm/components/form/Upload/BaseUpload.js.map +1 -1
- package/dist/esm/components/form/types.d.ts +5 -2
- package/dist/esm/components/form/types.d.ts.map +1 -1
- package/dist/esm/components/modal/components/SellerFinance/FinancesStyles.d.ts +22 -22
- package/dist/esm/components/modal/components/common/detail/Detail.style.d.ts +51 -51
- package/dist/esm/components/productCard/ProductCard.styles.d.ts +33 -33
- package/dist/esm/components/ui/ThemedButton.d.ts +1 -1
- package/dist/esm/components/ui/column/index.d.ts +1 -1
- package/dist/esm/components/ui/styles.d.ts +1 -1
- package/dist/esm/components/ui/styles.d.ts.map +1 -1
- package/dist/esm/components/ui/styles.js +17 -26
- package/dist/esm/components/ui/styles.js.map +1 -1
- package/package.json +5 -5
- package/src/components/buttons/BaseButton.tsx +1 -27
- package/src/components/cta/common/CtaButton.tsx +1 -1
- package/src/components/cta/common/styles.ts +10 -8
- package/src/components/form/BaseCheckbox.tsx +13 -2
- package/src/components/form/Field.styles.ts +1 -2
- package/src/components/form/Upload/BaseUpload.tsx +1 -1
- package/src/components/form/types.ts +12 -4
- package/src/components/ui/styles.ts +18 -27
|
@@ -12,6 +12,8 @@ export function BaseCheckbox({
|
|
|
12
12
|
text,
|
|
13
13
|
theme,
|
|
14
14
|
hideError,
|
|
15
|
+
className,
|
|
16
|
+
iconProps,
|
|
15
17
|
...props
|
|
16
18
|
}: BaseCheckboxProps) {
|
|
17
19
|
const [field, meta, helpers] = useField(name);
|
|
@@ -30,17 +32,26 @@ export function BaseCheckbox({
|
|
|
30
32
|
|
|
31
33
|
return (
|
|
32
34
|
<>
|
|
33
|
-
<CheckboxWrapper
|
|
35
|
+
<CheckboxWrapper
|
|
36
|
+
htmlFor={checkboxId}
|
|
37
|
+
$error={errorMessage}
|
|
38
|
+
theme={theme}
|
|
39
|
+
className={className}
|
|
40
|
+
>
|
|
34
41
|
<input
|
|
35
42
|
hidden
|
|
36
43
|
id={checkboxId}
|
|
37
44
|
type="checkbox"
|
|
38
45
|
{...props}
|
|
39
46
|
{...field}
|
|
47
|
+
onChange={(event) => {
|
|
48
|
+
field.onChange(event);
|
|
49
|
+
props.onChange?.(event);
|
|
50
|
+
}}
|
|
40
51
|
checked={field.value}
|
|
41
52
|
/>
|
|
42
53
|
<div>
|
|
43
|
-
<Check size={16} />
|
|
54
|
+
<Check size={16} width="100%" height="100%" {...iconProps} />
|
|
44
55
|
</div>
|
|
45
56
|
<b>{text}</b>
|
|
46
57
|
</CheckboxWrapper>
|
|
@@ -189,7 +189,6 @@ export const FileUploadWrapper = styled.div<{
|
|
|
189
189
|
cursor: not-allowed;
|
|
190
190
|
opacity: 0.5;
|
|
191
191
|
}
|
|
192
|
-
${({ theme: { overrides } }) => overrides}
|
|
193
192
|
`;
|
|
194
193
|
|
|
195
194
|
export const FieldFileUpload = styled(FieldInput)`
|
|
@@ -371,6 +370,7 @@ export const CheckboxWrapper = styled.label<{
|
|
|
371
370
|
align-items: center;
|
|
372
371
|
justify-content: flex-start;
|
|
373
372
|
cursor: pointer;
|
|
373
|
+
gap: 0.5rem;
|
|
374
374
|
|
|
375
375
|
> input {
|
|
376
376
|
&:disabled {
|
|
@@ -427,7 +427,6 @@ export const CheckboxWrapper = styled.label<{
|
|
|
427
427
|
css`
|
|
428
428
|
border-radius: ${theme?.borderRadius};
|
|
429
429
|
`};
|
|
430
|
-
margin-right: 0.5rem;
|
|
431
430
|
}
|
|
432
431
|
|
|
433
432
|
> input {
|
|
@@ -14,6 +14,7 @@ import type {
|
|
|
14
14
|
} from "./Field.styles";
|
|
15
15
|
import type { GridProps } from "../ui/Grid";
|
|
16
16
|
import { StateManagerProps } from "react-select/dist/declarations/src/useStateManager";
|
|
17
|
+
import { IconProps } from "phosphor-react";
|
|
17
18
|
|
|
18
19
|
export interface BaseProps {
|
|
19
20
|
name: string;
|
|
@@ -29,10 +30,17 @@ export interface DatepickerProps extends BaseProps {
|
|
|
29
30
|
setIsFormValid?: (isValid: boolean) => void;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
|
-
export
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
export type CheckboxProps = BaseProps &
|
|
34
|
+
Omit<React.InputHTMLAttributes<HTMLInputElement>, "checked"> & {
|
|
35
|
+
text?: string;
|
|
36
|
+
className?: string;
|
|
37
|
+
theme?: CheckboxTheme;
|
|
38
|
+
iconProps?: Parameters<
|
|
39
|
+
React.ForwardRefExoticComponent<
|
|
40
|
+
IconProps & React.RefAttributes<SVGSVGElement>
|
|
41
|
+
>
|
|
42
|
+
>[0];
|
|
43
|
+
};
|
|
36
44
|
|
|
37
45
|
export type TextareaProps = BaseProps &
|
|
38
46
|
React.TextareaHTMLAttributes<HTMLTextAreaElement> & { theme?: TextAreaTheme };
|
|
@@ -5,6 +5,14 @@ export const transition = css`
|
|
|
5
5
|
transition: all 150ms ease-in-out;
|
|
6
6
|
`;
|
|
7
7
|
|
|
8
|
+
export const buttonText = css`
|
|
9
|
+
letter-spacing: 0.5px;
|
|
10
|
+
font-style: normal;
|
|
11
|
+
font-size: 1rem;
|
|
12
|
+
font-weight: 500;
|
|
13
|
+
line-height: 24px;
|
|
14
|
+
`;
|
|
15
|
+
|
|
8
16
|
export const button = css`
|
|
9
17
|
box-sizing: border-box;
|
|
10
18
|
cursor: pointer;
|
|
@@ -18,7 +26,7 @@ export const button = css`
|
|
|
18
26
|
position: relative;
|
|
19
27
|
overflow: hidden;
|
|
20
28
|
box-shadow: 0px 0px 0px #000000;
|
|
21
|
-
|
|
29
|
+
${buttonText}
|
|
22
30
|
${transition}
|
|
23
31
|
svg {
|
|
24
32
|
${transition}
|
|
@@ -47,51 +55,34 @@ export const text = css`
|
|
|
47
55
|
line-height: 24px;
|
|
48
56
|
`;
|
|
49
57
|
|
|
50
|
-
export const buttonText = css`
|
|
51
|
-
letter-spacing: 0.5px;
|
|
52
|
-
font-style: normal;
|
|
53
|
-
font-size: 1rem;
|
|
54
|
-
font-weight: 500;
|
|
55
|
-
line-height: 24px;
|
|
56
|
-
`;
|
|
57
|
-
|
|
58
58
|
export const small = css`
|
|
59
59
|
min-height: 2.125rem;
|
|
60
60
|
padding: 0.5rem 1rem;
|
|
61
|
-
|
|
62
|
-
font-size: 0.75rem !important;
|
|
63
|
-
}
|
|
64
|
-
#buttonText {
|
|
61
|
+
* {
|
|
65
62
|
font-size: 0.75rem;
|
|
66
63
|
}
|
|
67
64
|
`;
|
|
68
65
|
export const regular = css`
|
|
69
66
|
min-height: 2.813rem;
|
|
70
67
|
padding: 0.75rem 1.5rem;
|
|
71
|
-
|
|
72
|
-
font-size: 1rem
|
|
68
|
+
* {
|
|
69
|
+
font-size: 1rem;
|
|
73
70
|
}
|
|
74
71
|
${breakpoint.xxs} {
|
|
75
|
-
|
|
76
|
-
font-size: 0.875rem
|
|
72
|
+
* {
|
|
73
|
+
font-size: 0.875rem;
|
|
77
74
|
}
|
|
78
75
|
}
|
|
79
|
-
#buttonText {
|
|
80
|
-
font-size: 0.875rem;
|
|
81
|
-
}
|
|
82
76
|
`;
|
|
83
77
|
export const large = css`
|
|
84
78
|
min-height: 3.5rem;
|
|
85
79
|
padding: 1rem 2rem;
|
|
86
|
-
|
|
87
|
-
font-size: 1.125rem
|
|
80
|
+
* {
|
|
81
|
+
font-size: 1.125rem;
|
|
88
82
|
}
|
|
89
83
|
${breakpoint.xxs} {
|
|
90
|
-
|
|
91
|
-
font-size: 1rem
|
|
84
|
+
* {
|
|
85
|
+
font-size: 1rem;
|
|
92
86
|
}
|
|
93
87
|
}
|
|
94
|
-
#buttonText {
|
|
95
|
-
font-size: 1rem;
|
|
96
|
-
}
|
|
97
88
|
`;
|