venice-ui 2.4.10 → 2.4.12
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/Theme/Theme.js +2 -2
- package/dist/cjs/components/Checkbox/Checkbox.js +2 -2
- package/dist/cjs/components/Checkbox/Checkbox.styles.js +3 -6
- package/dist/cjs/components/Input/Input.styles.js +1 -1
- package/dist/esm/Theme/Theme.js +2 -2
- package/dist/esm/components/Checkbox/Checkbox.js +2 -2
- package/dist/esm/components/Checkbox/Checkbox.styles.js +3 -6
- package/dist/esm/components/Input/Input.styles.js +1 -1
- package/dist/types/components/Typography/Typography.styles.d.ts +1 -0
- package/package.json +1 -1
package/dist/cjs/Theme/Theme.js
CHANGED
|
@@ -124,7 +124,7 @@ exports.mainTheme = {
|
|
|
124
124
|
chipsNeutralHoverBackground: (0, polished_1.lighten)(0.1, exports.Theme.colors.primary),
|
|
125
125
|
//toogle
|
|
126
126
|
toogleBackgrund: exports.Theme.colors.gray_3,
|
|
127
|
-
toogleActiveBackgorund: exports.Theme.colors.
|
|
127
|
+
toogleActiveBackgorund: exports.Theme.colors.primary_20,
|
|
128
128
|
//checkobx
|
|
129
|
-
checkColor: exports.Theme.colors.
|
|
129
|
+
checkColor: exports.Theme.colors.text,
|
|
130
130
|
};
|
|
@@ -13,11 +13,11 @@ const Checkbox_styles_1 = require("./Checkbox.styles");
|
|
|
13
13
|
const Icons_1 = require("../Icons");
|
|
14
14
|
const Checkbox = ({ theme = Theme_1.mainTheme, label, labelPosition = 'top', value = false, readOnly = false, name, size = 'medium', width = 'auto', isIntermedian = false, handleClick, }) => {
|
|
15
15
|
return (react_1.default.createElement(styled_components_1.ThemeProvider, { theme: theme },
|
|
16
|
-
react_1.default.createElement(Aligment_1.Aligment, { align: labelPosition === 'top' ? 'flex-start' : 'center', justify:
|
|
16
|
+
react_1.default.createElement(Aligment_1.Aligment, { align: labelPosition === 'top' ? 'flex-start' : 'center', justify: 'flex-start', direction: labelPosition === 'top' ? 'column-reverse' : 'row', wrap: 'nowrap', width: width },
|
|
17
17
|
react_1.default.createElement(Input_1.InputWrapper, { width: width },
|
|
18
18
|
react_1.default.createElement(Checkbox_styles_1.ToogleCheckboxWrapper, { size: size },
|
|
19
19
|
react_1.default.createElement(Checkbox_styles_1.CheckboxElement, { size: size, active: value || isIntermedian, onClick: () => handleClick(!value) }, (value || isIntermedian) && (react_1.default.createElement(Checkbox_styles_1.CheckoxIcon, null,
|
|
20
20
|
react_1.default.createElement(Icons_1.Icon, { name: isIntermedian ? "remove" : 'check', size: 20, iconColor: theme.checkColor, noPadding: true })))))),
|
|
21
|
-
label && (react_1.default.createElement(Input_1.InputLabelElement, { size: size, labelPosition: labelPosition }, label)))));
|
|
21
|
+
label && (react_1.default.createElement(Input_1.InputLabelElement, { size: size, labelPosition: labelPosition, wrapLabel: labelPosition === 'left' }, label)))));
|
|
22
22
|
};
|
|
23
23
|
exports.Checkbox = Checkbox;
|
|
@@ -20,18 +20,15 @@ exports.CheckboxElement = styled_components_1.default.div `
|
|
|
20
20
|
justify-content: center;
|
|
21
21
|
box-sizing: border-box;
|
|
22
22
|
background-color: ${(p) => p.active ? p.theme.toogleActiveBackgorund : p.theme.toogleBackgrund};
|
|
23
|
-
border: 1px solid
|
|
23
|
+
border: 1px solid
|
|
24
|
+
${(p) => p.active ? p.theme.toogleActiveBackgorund : p.theme.inputDefaultBorder};
|
|
24
25
|
font-family: 'Lato', sans-serif;
|
|
25
26
|
outline: 0;
|
|
26
27
|
white-space: nowrap;
|
|
27
28
|
overflow: hidden;
|
|
28
29
|
text-overflow: ellipsis;
|
|
29
30
|
cursor: pointer;
|
|
30
|
-
|
|
31
|
-
`
|
|
32
|
-
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12),
|
|
33
|
-
inset 0 1px 2px rgba(0, 0, 0, 0.24);
|
|
34
|
-
`}
|
|
31
|
+
|
|
35
32
|
height: ${(p) => (p.size === 'small' ? '20px' : '24px')};
|
|
36
33
|
width: ${(p) => (p.size === 'small' ? '20px' : '24px')};
|
|
37
34
|
border-radius: ${Theme_1.Theme.borderRadius.m};
|
|
@@ -70,7 +70,7 @@ exports.InputLabelElement = (0, styled_components_1.default)(Typography_1.TextLa
|
|
|
70
70
|
${(p) => p.labelPosition === 'top' && `margin-bottom: ${Theme_1.Theme.padding.s};`}
|
|
71
71
|
${(p) => p.labelPosition === 'left' && `margin-left: ${Theme_1.Theme.padding.s};`}
|
|
72
72
|
${(p) => p.labelPosition === 'left' && `margin-right: ${Theme_1.Theme.padding.s};`}
|
|
73
|
-
white-space: nowrap;
|
|
73
|
+
white-space: ${(p) => (p.wrapLabel ? 'normal' : 'nowrap')};
|
|
74
74
|
`;
|
|
75
75
|
exports.InputWrapper = styled_components_1.default.div `
|
|
76
76
|
display: flex;
|
package/dist/esm/Theme/Theme.js
CHANGED
|
@@ -121,7 +121,7 @@ export const mainTheme = {
|
|
|
121
121
|
chipsNeutralHoverBackground: lighten(0.1, Theme.colors.primary),
|
|
122
122
|
//toogle
|
|
123
123
|
toogleBackgrund: Theme.colors.gray_3,
|
|
124
|
-
toogleActiveBackgorund: Theme.colors.
|
|
124
|
+
toogleActiveBackgorund: Theme.colors.primary_20,
|
|
125
125
|
//checkobx
|
|
126
|
-
checkColor: Theme.colors.
|
|
126
|
+
checkColor: Theme.colors.text,
|
|
127
127
|
};
|
|
@@ -7,10 +7,10 @@ import { CheckboxElement, CheckoxIcon, ToogleCheckboxWrapper, } from './Checkbox
|
|
|
7
7
|
import { Icon } from '../Icons';
|
|
8
8
|
export const Checkbox = ({ theme = mainTheme, label, labelPosition = 'top', value = false, readOnly = false, name, size = 'medium', width = 'auto', isIntermedian = false, handleClick, }) => {
|
|
9
9
|
return (React.createElement(ThemeProvider, { theme: theme },
|
|
10
|
-
React.createElement(Aligment, { align: labelPosition === 'top' ? 'flex-start' : 'center', justify:
|
|
10
|
+
React.createElement(Aligment, { align: labelPosition === 'top' ? 'flex-start' : 'center', justify: 'flex-start', direction: labelPosition === 'top' ? 'column-reverse' : 'row', wrap: 'nowrap', width: width },
|
|
11
11
|
React.createElement(InputWrapper, { width: width },
|
|
12
12
|
React.createElement(ToogleCheckboxWrapper, { size: size },
|
|
13
13
|
React.createElement(CheckboxElement, { size: size, active: value || isIntermedian, onClick: () => handleClick(!value) }, (value || isIntermedian) && (React.createElement(CheckoxIcon, null,
|
|
14
14
|
React.createElement(Icon, { name: isIntermedian ? "remove" : 'check', size: 20, iconColor: theme.checkColor, noPadding: true })))))),
|
|
15
|
-
label && (React.createElement(InputLabelElement, { size: size, labelPosition: labelPosition }, label)))));
|
|
15
|
+
label && (React.createElement(InputLabelElement, { size: size, labelPosition: labelPosition, wrapLabel: labelPosition === 'left' }, label)))));
|
|
16
16
|
};
|
|
@@ -14,18 +14,15 @@ export const CheckboxElement = styled.div `
|
|
|
14
14
|
justify-content: center;
|
|
15
15
|
box-sizing: border-box;
|
|
16
16
|
background-color: ${(p) => p.active ? p.theme.toogleActiveBackgorund : p.theme.toogleBackgrund};
|
|
17
|
-
border: 1px solid
|
|
17
|
+
border: 1px solid
|
|
18
|
+
${(p) => p.active ? p.theme.toogleActiveBackgorund : p.theme.inputDefaultBorder};
|
|
18
19
|
font-family: 'Lato', sans-serif;
|
|
19
20
|
outline: 0;
|
|
20
21
|
white-space: nowrap;
|
|
21
22
|
overflow: hidden;
|
|
22
23
|
text-overflow: ellipsis;
|
|
23
24
|
cursor: pointer;
|
|
24
|
-
|
|
25
|
-
`
|
|
26
|
-
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12),
|
|
27
|
-
inset 0 1px 2px rgba(0, 0, 0, 0.24);
|
|
28
|
-
`}
|
|
25
|
+
|
|
29
26
|
height: ${(p) => (p.size === 'small' ? '20px' : '24px')};
|
|
30
27
|
width: ${(p) => (p.size === 'small' ? '20px' : '24px')};
|
|
31
28
|
border-radius: ${Theme.borderRadius.m};
|
|
@@ -64,7 +64,7 @@ export const InputLabelElement = styled(TextLabel) `
|
|
|
64
64
|
${(p) => p.labelPosition === 'top' && `margin-bottom: ${Theme.padding.s};`}
|
|
65
65
|
${(p) => p.labelPosition === 'left' && `margin-left: ${Theme.padding.s};`}
|
|
66
66
|
${(p) => p.labelPosition === 'left' && `margin-right: ${Theme.padding.s};`}
|
|
67
|
-
white-space: nowrap;
|
|
67
|
+
white-space: ${(p) => (p.wrapLabel ? 'normal' : 'nowrap')};
|
|
68
68
|
`;
|
|
69
69
|
export const InputWrapper = styled.div `
|
|
70
70
|
display: flex;
|
|
@@ -13,6 +13,7 @@ export declare const TextAccent: import("styled-components").StyledComponent<"di
|
|
|
13
13
|
export interface ITextLabelProps {
|
|
14
14
|
size?: InputSize;
|
|
15
15
|
labelPosition?: LabelPosition;
|
|
16
|
+
wrapLabel?: boolean;
|
|
16
17
|
}
|
|
17
18
|
export declare const TextLabel: import("styled-components").StyledComponent<"div", any, ITextLabelProps, never>;
|
|
18
19
|
export {};
|