@chayns-components/core 5.0.0-beta.301 → 5.0.0-beta.302
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.
|
@@ -32,33 +32,39 @@ const StyledIconWrapper = exports.StyledIconWrapper = _styledComponents.default.
|
|
|
32
32
|
}};
|
|
33
33
|
position: relative;
|
|
34
34
|
transition: opacity 0.3s ease;
|
|
35
|
+
min-width: ${_ref4 => {
|
|
36
|
+
let {
|
|
37
|
+
size
|
|
38
|
+
} = _ref4;
|
|
39
|
+
return `${size}px`;
|
|
40
|
+
}};
|
|
35
41
|
`;
|
|
36
42
|
const StyledIcon = exports.StyledIcon = _styledComponents.default.i`
|
|
37
|
-
color: ${
|
|
43
|
+
color: ${_ref5 => {
|
|
38
44
|
let {
|
|
39
45
|
color,
|
|
40
46
|
theme
|
|
41
|
-
} =
|
|
47
|
+
} = _ref5;
|
|
42
48
|
return color || theme.headline;
|
|
43
49
|
}};
|
|
44
|
-
display: ${
|
|
50
|
+
display: ${_ref6 => {
|
|
45
51
|
let {
|
|
46
52
|
isStacked
|
|
47
|
-
} =
|
|
53
|
+
} = _ref6;
|
|
48
54
|
return isStacked ? undefined : 'inline-flex';
|
|
49
55
|
}};
|
|
50
|
-
font-size: ${
|
|
56
|
+
font-size: ${_ref7 => {
|
|
51
57
|
let {
|
|
52
58
|
fontSize
|
|
53
|
-
} =
|
|
59
|
+
} = _ref7;
|
|
54
60
|
return `${fontSize}px`;
|
|
55
61
|
}};
|
|
56
62
|
|
|
57
|
-
${
|
|
63
|
+
${_ref8 => {
|
|
58
64
|
let {
|
|
59
65
|
fontSize,
|
|
60
66
|
size
|
|
61
|
-
} =
|
|
67
|
+
} = _ref8;
|
|
62
68
|
return fontSize !== size && (0, _styledComponents.css)`
|
|
63
69
|
top: 50%;
|
|
64
70
|
transform: translateY(-50%);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.styles.js","names":["_styledComponents","_interopRequireWildcard","require","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","StyledIconWrapper","exports","styled","span","_ref","isDisabled","onClick","_ref2","size","_ref3","StyledIcon","
|
|
1
|
+
{"version":3,"file":"Icon.styles.js","names":["_styledComponents","_interopRequireWildcard","require","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","StyledIconWrapper","exports","styled","span","_ref","isDisabled","onClick","_ref2","size","_ref3","_ref4","StyledIcon","_ref5","color","theme","headline","_ref6","isStacked","undefined","_ref7","fontSize","_ref8","css"],"sources":["../../../src/components/icon/Icon.styles.ts"],"sourcesContent":["import type { MouseEventHandler } from 'react';\nimport styled, { css } from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\nimport type { IconProps } from './Icon';\n\ntype StyledIconWrapperProps = {\n isDisabled?: boolean;\n onClick?: MouseEventHandler<HTMLSpanElement>;\n size: number;\n};\n\nexport const StyledIconWrapper = styled.span<StyledIconWrapperProps>`\n align-items: center;\n cursor: ${({ isDisabled, onClick }) =>\n typeof onClick === 'function' && !isDisabled ? 'pointer' : 'inherit'};\n display: inline-flex;\n height: ${({ size }) => `${size}px`};\n justify-content: center;\n opacity: ${({ isDisabled }) => (isDisabled ? 0.5 : 1)};\n position: relative;\n transition: opacity 0.3s ease;\n min-width: ${({ size }) => `${size}px`};\n`;\n\ntype StyledIconProps = Omit<IconProps, 'icons'> &\n WithTheme<{\n fontSize: number;\n isStacked?: boolean;\n }>;\n\nexport const StyledIcon = styled.i<StyledIconProps>`\n color: ${({ color, theme }: StyledIconProps) => color || theme.headline};\n display: ${({ isStacked }) => (isStacked ? undefined : 'inline-flex')};\n font-size: ${({ fontSize }) => `${fontSize}px`};\n\n ${({ fontSize, size }) =>\n fontSize !== size &&\n css`\n top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package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chayns-components/core",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.302",
|
|
4
4
|
"description": "A set of beautiful React components for developing your own applications with chayns.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chayns",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "6c21937347f66444e135919dcea01fc003600684"
|
|
70
70
|
}
|