@chayns-components/core 5.0.0-beta.300 → 5.0.0-beta.301
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/lib/components/accordion/accordion-head/AccordionHead.styles.js +1 -0
- package/lib/components/accordion/accordion-head/AccordionHead.styles.js.map +1 -1
- package/lib/components/button/Button.d.ts +1 -1
- package/lib/components/button/Button.js +3 -2
- package/lib/components/button/Button.js.map +1 -1
- package/lib/components/button/Button.styles.d.ts +1 -0
- package/lib/components/button/Button.styles.js +23 -8
- package/lib/components/button/Button.styles.js.map +1 -1
- package/lib/components/icon/Icon.styles.js +8 -14
- package/lib/components/icon/Icon.styles.js.map +1 -1
- package/package.json +2 -2
|
@@ -107,6 +107,7 @@ const StyledRightWrapper = exports.StyledRightWrapper = _styledComponents.defaul
|
|
|
107
107
|
flex: 0 0 auto;
|
|
108
108
|
grid-template-areas: 'right';
|
|
109
109
|
margin-right: 5px;
|
|
110
|
+
overflow: hidden;
|
|
110
111
|
position: relative;
|
|
111
112
|
`;
|
|
112
113
|
const StyledMotionRightElementWrapper = exports.StyledMotionRightElementWrapper = (0, _styledComponents.default)(_framerMotion.motion.div)`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionHead.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireWildcard","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","StyledMotionAccordionHead","exports","styled","motion","div","_ref","theme","text","StyledMotionIconWrapper","_ref2","onClick","StyledMotionContentWrapper","_ref3","StyledMotionTitleWrapper","StyledMotionTitle","_ref4","isOpen","isWrapped","undefined","_ref5","_ref6","_ref7","_ref8","css","StyledMotionTitleElementWrapper","StyledRightWrapper","StyledMotionRightElementWrapper","StyledMotionRightInput","input","_ref9","_ref10","_ref11","hasIcon","StyledMotionRightInputIconWrapper"],"sources":["../../../../src/components/accordion/accordion-head/AccordionHead.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport styled, { css } from 'styled-components';\nimport type { WithTheme } from '../../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledMotionAccordionHeadProps = WithTheme<unknown>;\n\nexport const StyledMotionAccordionHead = styled(motion.div)`\n align-items: center;\n color: ${({ theme }: StyledMotionAccordionHeadProps) => theme.text};\n display: flex;\n overflow: hidden;\n padding: 4px 0;\n`;\n\nexport const StyledMotionIconWrapper = styled(motion.div)`\n align-items: center;\n cursor: ${({ onClick }) => (typeof onClick === 'function' ? 'pointer' : 'default')};\n display: flex;\n flex: 0 0 auto;\n height: 25px;\n justify-content: center;\n width: 25px;\n`;\n\nexport const StyledMotionContentWrapper = styled(motion.div)`\n align-self: flex-start;\n cursor: ${({ onClick }) => (typeof onClick === 'function' ? 'pointer' : 'default')};\n display: flex;\n flex: 1 1 auto;\n height: 100%;\n overflow: hidden;\n margin-right: 10px;\n`;\n\nexport const StyledMotionTitleWrapper = styled(motion.div)`\n display: grid;\n flex: 0 1 auto;\n grid-template-areas: 'header';\n`;\n\ninterface StyledMotionTitleProps {\n isOpen: boolean;\n isWrapped: boolean;\n}\n\nexport const StyledMotionTitle = styled(motion.div)<StyledMotionTitleProps>`\n font-size: ${({ isOpen, isWrapped }) => (isOpen && !isWrapped ? '1.3rem' : undefined)};\n font-weight: ${({ isOpen, isWrapped }) => (isOpen && isWrapped ? 700 : 'normal')};\n grid-area: header;\n height: ${({ isWrapped }) => (isWrapped ? '100%' : undefined)};\n overflow: hidden;\n text-overflow: ellipsis;\n transform-origin: top left;\n user-select: none;\n white-space: ${({ isOpen, isWrapped }) => (isOpen && !isWrapped ? 'normal' : 'nowrap')};\n\n ${({ isWrapped }) =>\n isWrapped &&\n css`\n align-items: center;\n display: flex;\n `}\n`;\n\nexport const StyledMotionTitleElementWrapper = styled(motion.div)`\n align-items: center;\n display: flex;\n margin-left: 8px;\n`;\n\nexport const StyledRightWrapper = styled.div`\n display: grid;\n flex: 0 0 auto;\n grid-template-areas: 'right';\n margin-right: 5px;\n position: relative;\n`;\n\nexport const StyledMotionRightElementWrapper = styled(motion.div)`\n align-items: center;\n display: flex;\n grid-area: header;\n justify-content: flex-end;\n`;\n\ntype StyledMotionRightInputProps = WithTheme<{\n hasIcon: boolean;\n}>;\n\nexport const StyledMotionRightInput = styled(motion.input)<StyledMotionRightInputProps>`\n background-color: transparent;\n border: 1px solid transparent;\n border-bottom-color: rgba(\n ${({ theme }: StyledMotionRightInputProps) => theme['headline-rgb']},\n 0.45\n );\n color: ${({ theme }: StyledMotionRightInputProps) => theme.text};\n grid-area: header;\n padding: ${({ hasIcon }) => (hasIcon ? '5px 23px 5px 1px' : '5px 1px')};\n`;\n\nexport const StyledMotionRightInputIconWrapper = styled(motion.div)`\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n position: absolute;\n right: 4px;\n top: 0;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,uBAAA,CAAAF,OAAA;AAAgD,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAF,wBAAAE,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,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AACA;AACA,CAAC;AAEM,MAAMqB,kBAAkB,GAAAxB,OAAA,CAAAwB,kBAAA,GAAGvB,yBAAM,CAACE,GAAI;AAC7C;AACA;AACA;AACA;AACA;AACA,CAAC;AAEM,MAAMsB,+BAA+B,GAAAzB,OAAA,CAAAyB,+BAAA,GAAG,IAAAxB,yBAAM,EAACC,oBAAM,CAACC,GAAG,CAAE;AAClE;AACA;AACA;AACA;AACA,CAAC;AAMM,MAAMuB,sBAAsB,GAAA1B,OAAA,CAAA0B,sBAAA,GAAG,IAAAzB,yBAAM,EAACC,oBAAM,CAACyB,KAAK,CAA+B;AACxF;AACA;AACA;AACA,UAAUC,KAAA;EAAA,IAAC;IAAEvB;EAAmC,CAAC,GAAAuB,KAAA;EAAA,OAAKvB,KAAK,CAAC,cAAc,CAAC;AAAA,CAAC;AAC5E;AACA;AACA,aAAawB,MAAA;EAAA,IAAC;IAAExB;EAAmC,CAAC,GAAAwB,MAAA;EAAA,OAAKxB,KAAK,CAACC,IAAI;AAAA,CAAC;AACpE;AACA,eAAewB,MAAA;EAAA,IAAC;IAAEC;EAAQ,CAAC,GAAAD,MAAA;EAAA,OAAMC,OAAO,GAAG,kBAAkB,GAAG,SAAS;AAAA,CAAE;AAC3E,CAAC;AAEM,MAAMC,iCAAiC,GAAAhC,OAAA,CAAAgC,iCAAA,GAAG,IAAA/B,yBAAM,EAACC,oBAAM,CAACC,GAAG,CAAE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC"}
|
|
1
|
+
{"version":3,"file":"AccordionHead.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireWildcard","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","StyledMotionAccordionHead","exports","styled","motion","div","_ref","theme","text","StyledMotionIconWrapper","_ref2","onClick","StyledMotionContentWrapper","_ref3","StyledMotionTitleWrapper","StyledMotionTitle","_ref4","isOpen","isWrapped","undefined","_ref5","_ref6","_ref7","_ref8","css","StyledMotionTitleElementWrapper","StyledRightWrapper","StyledMotionRightElementWrapper","StyledMotionRightInput","input","_ref9","_ref10","_ref11","hasIcon","StyledMotionRightInputIconWrapper"],"sources":["../../../../src/components/accordion/accordion-head/AccordionHead.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport styled, { css } from 'styled-components';\nimport type { WithTheme } from '../../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledMotionAccordionHeadProps = WithTheme<unknown>;\n\nexport const StyledMotionAccordionHead = styled(motion.div)`\n align-items: center;\n color: ${({ theme }: StyledMotionAccordionHeadProps) => theme.text};\n display: flex;\n overflow: hidden;\n padding: 4px 0;\n`;\n\nexport const StyledMotionIconWrapper = styled(motion.div)`\n align-items: center;\n cursor: ${({ onClick }) => (typeof onClick === 'function' ? 'pointer' : 'default')};\n display: flex;\n flex: 0 0 auto;\n height: 25px;\n justify-content: center;\n width: 25px;\n`;\n\nexport const StyledMotionContentWrapper = styled(motion.div)`\n align-self: flex-start;\n cursor: ${({ onClick }) => (typeof onClick === 'function' ? 'pointer' : 'default')};\n display: flex;\n flex: 1 1 auto;\n height: 100%;\n overflow: hidden;\n margin-right: 10px;\n`;\n\nexport const StyledMotionTitleWrapper = styled(motion.div)`\n display: grid;\n flex: 0 1 auto;\n grid-template-areas: 'header';\n`;\n\ninterface StyledMotionTitleProps {\n isOpen: boolean;\n isWrapped: boolean;\n}\n\nexport const StyledMotionTitle = styled(motion.div)<StyledMotionTitleProps>`\n font-size: ${({ isOpen, isWrapped }) => (isOpen && !isWrapped ? '1.3rem' : undefined)};\n font-weight: ${({ isOpen, isWrapped }) => (isOpen && isWrapped ? 700 : 'normal')};\n grid-area: header;\n height: ${({ isWrapped }) => (isWrapped ? '100%' : undefined)};\n overflow: hidden;\n text-overflow: ellipsis;\n transform-origin: top left;\n user-select: none;\n white-space: ${({ isOpen, isWrapped }) => (isOpen && !isWrapped ? 'normal' : 'nowrap')};\n\n ${({ isWrapped }) =>\n isWrapped &&\n css`\n align-items: center;\n display: flex;\n `}\n`;\n\nexport const StyledMotionTitleElementWrapper = styled(motion.div)`\n align-items: center;\n display: flex;\n margin-left: 8px;\n`;\n\nexport const StyledRightWrapper = styled.div`\n display: grid;\n flex: 0 0 auto;\n grid-template-areas: 'right';\n margin-right: 5px;\n overflow: hidden;\n position: relative;\n`;\n\nexport const StyledMotionRightElementWrapper = styled(motion.div)`\n align-items: center;\n display: flex;\n grid-area: header;\n justify-content: flex-end;\n`;\n\ntype StyledMotionRightInputProps = WithTheme<{\n hasIcon: boolean;\n}>;\n\nexport const StyledMotionRightInput = styled(motion.input)<StyledMotionRightInputProps>`\n background-color: transparent;\n border: 1px solid transparent;\n border-bottom-color: rgba(\n ${({ theme }: StyledMotionRightInputProps) => theme['headline-rgb']},\n 0.45\n );\n color: ${({ theme }: StyledMotionRightInputProps) => theme.text};\n grid-area: header;\n padding: ${({ hasIcon }) => (hasIcon ? '5px 23px 5px 1px' : '5px 1px')};\n`;\n\nexport const StyledMotionRightInputIconWrapper = styled(motion.div)`\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n position: absolute;\n right: 4px;\n top: 0;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,uBAAA,CAAAF,OAAA;AAAgD,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAF,wBAAAE,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ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M,qBAAG,CAAC;AACZ;AACA;AACA,SAAS;AAAA,CAAC;AACV,CAAC;AAEM,MAAMC,+BAA+B,GAAAvB,OAAA,CAAAuB,+BAAA,GAAG,IAAAtB,yBAAM,EAACC,oBAAM,CAACC,GAAG,CAAE;AAClE;AACA;AACA;AACA,CAAC;AAEM,MAAMqB,kBAAkB,GAAAxB,OAAA,CAAAwB,kBAAA,GAAGvB,yBAAM,CAACE,GAAI;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAEM,MAAMsB,+BAA+B,GAAAzB,OAAA,CAAAyB,+BAAA,GAAG,IAAAxB,yBAAM,EAACC,oBAAM,CAACC,GAAG,CAAE;AAClE;AACA;AACA;AACA;AACA,CAAC;AAMM,MAAMuB,sBAAsB,GAAA1B,OAAA,CAAA0B,sBAAA,GAAG,IAAAzB,yBAAM,EAACC,oBAAM,CAACyB,KAAK,CAA+B;AACxF;AACA;AACA;AACA,UAAUC,KAAA;EAAA,IAAC;IAAEvB;EAAmC,CAAC,GAAAuB,KAAA;EAAA,OAAKvB,KAAK,CAAC,cAAc,CAAC;AAAA,CAAC;AAC5E;AACA;AACA,aAAawB,MAAA;EAAA,IAAC;IAAExB;EAAmC,CAAC,GAAAwB,MAAA;EAAA,OAAKxB,KAAK,CAACC,IAAI;AAAA,CAAC;AACpE;AACA,eAAewB,MAAA;EAAA,IAAC;IAAEC;EAAQ,CAAC,GAAAD,MAAA;EAAA,OAAMC,OAAO,GAAG,kBAAkB,GAAG,SAAS;AAAA,CAAE;AAC3E,CAAC;AAEM,MAAMC,iCAAiC,GAAAhC,OAAA,CAAAgC,iCAAA,GAAG,IAAA/B,yBAAM,EAACC,oBAAM,CAACC,GAAG,CAAE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC"}
|
|
@@ -34,6 +34,7 @@ const Button = _ref => {
|
|
|
34
34
|
return /*#__PURE__*/_react.default.createElement(_Button.StyledButton, {
|
|
35
35
|
className: buttonClasses,
|
|
36
36
|
disabled: isDisabled,
|
|
37
|
+
hasChildren: !!children,
|
|
37
38
|
hasIcon: typeof icon === 'string' && icon !== '',
|
|
38
39
|
isSecondary: isSecondary,
|
|
39
40
|
onClick: handleClick
|
|
@@ -42,7 +43,7 @@ const Button = _ref => {
|
|
|
42
43
|
}, icon && /*#__PURE__*/_react.default.createElement(_Button.StyledIconWrapper, null, /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
43
44
|
color: "white",
|
|
44
45
|
icons: [icon]
|
|
45
|
-
})), shouldShowWaitCursor
|
|
46
|
+
})), shouldShowWaitCursor && /*#__PURE__*/_react.default.createElement(_Button.StyledMotionWaitCursorWrapper, {
|
|
46
47
|
animate: {
|
|
47
48
|
opacity: 1,
|
|
48
49
|
width: 40
|
|
@@ -66,7 +67,7 @@ const Button = _ref => {
|
|
|
66
67
|
color: "white",
|
|
67
68
|
shouldHideBackground: true,
|
|
68
69
|
size: _SmallWaitCursor.SmallWaitCursorSize.Small
|
|
69
|
-
}))
|
|
70
|
+
})), !shouldShowWaitCursor && children && /*#__PURE__*/_react.default.createElement(_Button.StyledMotionChildrenWrapper, {
|
|
70
71
|
animate: {
|
|
71
72
|
opacity: 1,
|
|
72
73
|
width: 'auto'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","names":["_clsx","_interopRequireDefault","require","_framerMotion","_react","_Icon","_SmallWaitCursor","_interopRequireWildcard","_Button","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","obj","Button","_ref","children","className","icon","isDisabled","isSecondary","onClick","shouldShowWaitCursor","shouldStopPropagation","handleClick","event","stopPropagation","buttonClasses","clsx","createElement","StyledButton","disabled","hasIcon","AnimatePresence","initial","StyledIconWrapper","color","icons","StyledMotionWaitCursorWrapper","animate","opacity","width","exit","key","style","overflow","transition","duration","shouldHideBackground","size","SmallWaitCursorSize","Small","StyledMotionChildrenWrapper","displayName","_default","exports"],"sources":["../../../src/components/button/Button.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport { AnimatePresence } from 'framer-motion';\nimport React, { FC, MouseEventHandler, ReactNode } from 'react';\nimport Icon from '../icon/Icon';\nimport SmallWaitCursor, { SmallWaitCursorSize } from '../small-wait-cursor/SmallWaitCursor';\nimport {\n StyledButton,\n StyledIconWrapper,\n StyledMotionChildrenWrapper,\n StyledMotionWaitCursorWrapper,\n} from './Button.styles';\n\nexport type ButtonProps = {\n /**\n * The label of the button\n */\n children
|
|
1
|
+
{"version":3,"file":"Button.js","names":["_clsx","_interopRequireDefault","require","_framerMotion","_react","_Icon","_SmallWaitCursor","_interopRequireWildcard","_Button","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","obj","Button","_ref","children","className","icon","isDisabled","isSecondary","onClick","shouldShowWaitCursor","shouldStopPropagation","handleClick","event","stopPropagation","buttonClasses","clsx","createElement","StyledButton","disabled","hasChildren","hasIcon","AnimatePresence","initial","StyledIconWrapper","color","icons","StyledMotionWaitCursorWrapper","animate","opacity","width","exit","key","style","overflow","transition","duration","shouldHideBackground","size","SmallWaitCursorSize","Small","StyledMotionChildrenWrapper","displayName","_default","exports"],"sources":["../../../src/components/button/Button.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport { AnimatePresence } from 'framer-motion';\nimport React, { FC, MouseEventHandler, ReactNode } from 'react';\nimport Icon from '../icon/Icon';\nimport SmallWaitCursor, { SmallWaitCursorSize } from '../small-wait-cursor/SmallWaitCursor';\nimport {\n StyledButton,\n StyledIconWrapper,\n StyledMotionChildrenWrapper,\n StyledMotionWaitCursorWrapper,\n} from './Button.styles';\n\nexport type ButtonProps = {\n /**\n * The label of the button\n */\n children?: ReactNode;\n /**\n * Additional class names for the button element\n */\n className?: string;\n /**\n * An icon that is displayed on the left-hand side of the button text\n */\n icon?: string;\n /**\n * Disables the button so that it cannot be clicked anymore\n */\n isDisabled?: boolean;\n /**\n * Displays the button in the secondary style\n */\n isSecondary?: boolean;\n /**\n * Function to be executed when the button is clicked\n */\n onClick: MouseEventHandler<HTMLButtonElement>;\n /**\n * Shows a wait cursor instead of button text\n */\n shouldShowWaitCursor?: boolean;\n /**\n * Stops event propagation on click\n */\n shouldStopPropagation?: boolean;\n};\n\nconst Button: FC<ButtonProps> = ({\n children,\n className,\n icon,\n isDisabled,\n isSecondary,\n onClick,\n shouldShowWaitCursor,\n shouldStopPropagation,\n}) => {\n const handleClick: MouseEventHandler<HTMLButtonElement> = (event) => {\n if (shouldStopPropagation) {\n event.stopPropagation();\n }\n\n onClick(event);\n };\n\n const buttonClasses = clsx('beta-chayns-button ellipsis', className);\n\n return (\n <StyledButton\n className={buttonClasses}\n disabled={isDisabled}\n hasChildren={!!children}\n hasIcon={typeof icon === 'string' && icon !== ''}\n isSecondary={isSecondary}\n onClick={handleClick}\n >\n <AnimatePresence initial={false}>\n {icon && (\n <StyledIconWrapper>\n <Icon color=\"white\" icons={[icon]} />\n </StyledIconWrapper>\n )}\n {shouldShowWaitCursor && (\n <StyledMotionWaitCursorWrapper\n animate={{ opacity: 1, width: 40 }}\n exit={{ opacity: 0, width: 0 }}\n initial={{ opacity: 0, width: 0 }}\n key=\"wait-cursor\"\n style={{ overflow: 'hidden' }}\n transition={{ duration: 0.2 }}\n >\n <SmallWaitCursor\n color=\"white\"\n shouldHideBackground\n size={SmallWaitCursorSize.Small}\n />\n </StyledMotionWaitCursorWrapper>\n )}\n {!shouldShowWaitCursor && children && (\n <StyledMotionChildrenWrapper\n animate={{ opacity: 1, width: 'auto' }}\n exit={{ opacity: 0, width: 0 }}\n initial={{ opacity: 0, width: 0 }}\n key=\"children\"\n style={{ overflow: 'hidden' }}\n transition={{ duration: 0.2 }}\n >\n {children}\n </StyledMotionChildrenWrapper>\n )}\n </AnimatePresence>\n </StyledButton>\n );\n};\n\nButton.displayName = 'Button';\n\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AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA1D,OAAA,GAEfgB,MAAM"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ButtonProps } from './Button';
|
|
2
2
|
export declare const StyledButton: import("styled-components").StyledComponent<"button", any, ButtonProps & {
|
|
3
3
|
hasIcon: boolean;
|
|
4
|
+
hasChildren: boolean;
|
|
4
5
|
} & {
|
|
5
6
|
theme: import("../color-scheme-provider/ColorSchemeProvider").Theme;
|
|
6
7
|
}, never>;
|
|
@@ -5,8 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.StyledMotionWaitCursorWrapper = exports.StyledMotionChildrenWrapper = exports.StyledIconWrapper = exports.StyledButton = void 0;
|
|
7
7
|
var _framerMotion = require("framer-motion");
|
|
8
|
-
var _styledComponents =
|
|
9
|
-
function
|
|
8
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
10
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
10
11
|
const StyledButton = exports.StyledButton = _styledComponents.default.button`
|
|
11
12
|
align-items: center;
|
|
12
13
|
background-color: ${_ref => {
|
|
@@ -35,16 +36,30 @@ const StyledButton = exports.StyledButton = _styledComponents.default.button`
|
|
|
35
36
|
disabled
|
|
36
37
|
} = _ref3;
|
|
37
38
|
return disabled ? 0.5 : 1;
|
|
38
|
-
}};
|
|
39
|
-
padding: ${_ref4 => {
|
|
40
|
-
let {
|
|
41
|
-
hasIcon
|
|
42
|
-
} = _ref4;
|
|
43
|
-
return `7px 12px 7px ${hasIcon ? '42px' : '12px'}`;
|
|
44
39
|
}};
|
|
45
40
|
position: relative;
|
|
46
41
|
user-select: none;
|
|
47
42
|
transition: opacity 0.3s ease;
|
|
43
|
+
|
|
44
|
+
${_ref4 => {
|
|
45
|
+
let {
|
|
46
|
+
hasIcon,
|
|
47
|
+
hasChildren
|
|
48
|
+
} = _ref4;
|
|
49
|
+
if (hasIcon) {
|
|
50
|
+
if (hasChildren) {
|
|
51
|
+
return (0, _styledComponents.css)`
|
|
52
|
+
padding: 7px 12px 7px 42px;
|
|
53
|
+
`;
|
|
54
|
+
}
|
|
55
|
+
return (0, _styledComponents.css)`
|
|
56
|
+
padding: 7px 12px 7px 18px;
|
|
57
|
+
`;
|
|
58
|
+
}
|
|
59
|
+
return (0, _styledComponents.css)`
|
|
60
|
+
padding: 7px 12px 7px 12px;
|
|
61
|
+
`;
|
|
62
|
+
}}
|
|
48
63
|
`;
|
|
49
64
|
const StyledIconWrapper = exports.StyledIconWrapper = _styledComponents.default.span`
|
|
50
65
|
align-items: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.styles.js","names":["_framerMotion","require","_styledComponents","
|
|
1
|
+
{"version":3,"file":"Button.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireWildcard","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","StyledButton","exports","styled","button","_ref","isSecondary","theme","_ref2","text","_ref3","disabled","_ref4","hasIcon","hasChildren","css","StyledIconWrapper","span","StyledMotionChildrenWrapper","motion","div","StyledMotionWaitCursorWrapper"],"sources":["../../../src/components/button/Button.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport styled, { css } from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\nimport type { ButtonProps } from './Button';\n\ntype StyledButtonProps = ButtonProps &\n WithTheme<{\n hasIcon: boolean;\n hasChildren: boolean;\n }>;\n\nexport const StyledButton = styled.button<StyledButtonProps>`\n align-items: center;\n background-color: ${({ isSecondary, theme }: StyledButtonProps) =>\n isSecondary ? theme['202'] : theme['408']};\n border-radius: 3px;\n box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.2);\n border: none;\n color: ${({ isSecondary, theme }: StyledButtonProps) => (isSecondary ? theme.text : 'white')};\n cursor: pointer;\n display: inline-flex;\n line-height: 1.15;\n min-height: 32px;\n opacity: ${({ disabled }) => (disabled ? 0.5 : 1)};\n position: relative;\n user-select: none;\n transition: opacity 0.3s ease;\n\n ${({ hasIcon, hasChildren }) => {\n if (hasIcon) {\n if (hasChildren) {\n return css`\n padding: 7px 12px 7px 42px;\n `;\n }\n return css`\n padding: 7px 12px 7px 18px;\n `;\n }\n return css`\n padding: 7px 12px 7px 12px;\n `;\n }}\n`;\n\nexport const StyledIconWrapper = styled.span`\n align-items: center;\n background-color: rgba(255, 255, 255, 0.2);\n bottom: 0;\n display: flex;\n justify-content: center;\n left: 0;\n position: absolute;\n top: 0;\n width: 30px;\n`;\n\nexport const StyledMotionChildrenWrapper = styled(motion.div)``;\n\nexport const StyledMotionWaitCursorWrapper = styled(motion.div)`\n align-items: center;\n display: flex;\n justify-content: center;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,uBAAA,CAAAF,OAAA;AAAgD,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAF,w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,CAAC,GAAAC,KAAA;EAAA,OAAMF,WAAW,GAAGC,KAAK,CAACE,IAAI,GAAG,OAAO;AAAA,CAAE;AACjG;AACA;AACA;AACA;AACA,eAAeC,KAAA;EAAA,IAAC;IAAEC;EAAS,CAAC,GAAAD,KAAA;EAAA,OAAMC,QAAQ,GAAG,GAAG,GAAG,CAAC;AAAA,CAAE;AACtD;AACA;AACA;AACA;AACA,MAAMC,KAAA,IAA8B;EAAA,IAA7B;IAAEC,OAAO;IAAEC;EAAY,CAAC,GAAAF,KAAA;EACvB,IAAIC,OAAO,EAAE;IACT,IAAIC,WAAW,EAAE;MACb,OAAO,IAAAC,qBAAG,CAAC;AAC3B;AACA,iBAAiB;IACL;IACA,OAAO,IAAAA,qBAAG,CAAC;AACvB;AACA,aAAa;EACL;EACA,OAAO,IAAAA,qBAAG,CAAC;AACnB;AACA,SAAS;AACL,CAAE;AACN,CAAC;AAEM,MAAMC,iBAAiB,GAAAd,OAAA,CAAAc,iBAAA,GAAGb,yBAAM,CAACc,IAAK;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAEM,MAAMC,2BAA2B,GAAAhB,OAAA,CAAAgB,2BAAA,GAAG,IAAAf,yBAAM,EAACgB,oBAAM,CAACC,GAAG,CAAE,EAAC;AAExD,MAAMC,6BAA6B,GAAAnB,OAAA,CAAAmB,6BAAA,GAAG,IAAAlB,yBAAM,EAACgB,oBAAM,CAACC,GAAG,CAAE;AAChE;AACA;AACA;AACA,CAAC"}
|
|
@@ -32,39 +32,33 @@ const StyledIconWrapper = exports.StyledIconWrapper = _styledComponents.default.
|
|
|
32
32
|
}};
|
|
33
33
|
position: relative;
|
|
34
34
|
transition: opacity 0.3s ease;
|
|
35
|
-
width: ${_ref4 => {
|
|
36
|
-
let {
|
|
37
|
-
size
|
|
38
|
-
} = _ref4;
|
|
39
|
-
return `${size}px`;
|
|
40
|
-
}};
|
|
41
35
|
`;
|
|
42
36
|
const StyledIcon = exports.StyledIcon = _styledComponents.default.i`
|
|
43
|
-
color: ${
|
|
37
|
+
color: ${_ref4 => {
|
|
44
38
|
let {
|
|
45
39
|
color,
|
|
46
40
|
theme
|
|
47
|
-
} =
|
|
41
|
+
} = _ref4;
|
|
48
42
|
return color || theme.headline;
|
|
49
43
|
}};
|
|
50
|
-
display: ${
|
|
44
|
+
display: ${_ref5 => {
|
|
51
45
|
let {
|
|
52
46
|
isStacked
|
|
53
|
-
} =
|
|
47
|
+
} = _ref5;
|
|
54
48
|
return isStacked ? undefined : 'inline-flex';
|
|
55
49
|
}};
|
|
56
|
-
font-size: ${
|
|
50
|
+
font-size: ${_ref6 => {
|
|
57
51
|
let {
|
|
58
52
|
fontSize
|
|
59
|
-
} =
|
|
53
|
+
} = _ref6;
|
|
60
54
|
return `${fontSize}px`;
|
|
61
55
|
}};
|
|
62
56
|
|
|
63
|
-
${
|
|
57
|
+
${_ref7 => {
|
|
64
58
|
let {
|
|
65
59
|
fontSize,
|
|
66
60
|
size
|
|
67
|
-
} =
|
|
61
|
+
} = _ref7;
|
|
68
62
|
return fontSize !== size && (0, _styledComponents.css)`
|
|
69
63
|
top: 50%;
|
|
70
64
|
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","
|
|
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","_ref4","color","theme","headline","_ref5","isStacked","undefined","_ref6","fontSize","_ref7","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`;\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: 50%;\n transform: translateY(-50%);\n `}\n`;\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAgD,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAH,wBAAAG,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CA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CAAE;AAC1D;AACA;AACA,CAAC;AAQM,MAAMK,UAAU,GAAAT,OAAA,CAAAS,UAAA,GAAGR,yBAAM,CAACJ,CAAmB;AACpD,aAAaa,KAAA;EAAA,IAAC;IAAEC,KAAK;IAAEC;EAAuB,CAAC,GAAAF,KAAA;EAAA,OAAKC,KAAK,IAAIC,KAAK,CAACC,QAAQ;AAAA,CAAC;AAC5E,eAAeC,KAAA;EAAA,IAAC;IAAEC;EAAU,CAAC,GAAAD,KAAA;EAAA,OAAMC,SAAS,GAAGC,SAAS,GAAG,aAAa;AAAA,CAAE;AAC1E,iBAAiBC,KAAA;EAAA,IAAC;IAAEC;EAAS,CAAC,GAAAD,KAAA;EAAA,OAAM,GAAEC,QAAS,IAAG;AAAA,CAAC;AACnD;AACA,MAAMC,KAAA;EAAA,IAAC;IAAED,QAAQ;IAAEX;EAAK,CAAC,GAAAY,KAAA;EAAA,OACjBD,QAAQ,KAAKX,IAAI,IACjB,IAAAa,qBAAG,CAAC;AACZ;AACA;AACA,SAAS;AAAA,CAAC;AACV,CAAC"}
|
package/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.301",
|
|
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": "bc3188baf20da690992e8b7aed0fbd59527fdcaa"
|
|
70
70
|
}
|