UNPKG

@vimeo/iris

Version:
58 lines (55 loc) 6.01 kB
import { a as __makeTemplateObject } from '../../tslib.es6-7f0e734f.js'; import styled from 'styled-components'; import { rem } from 'polished'; import { tokens } from './CardNewItem.tokens.esm.js'; import { core } from '../../tokens/core.esm.js'; import { CirclePlus as CirclePlus$1 } from '../../icons/ui/CirclePlus.esm.js'; import { white } from '../../color/colors.esm.js'; import { Text as Text$1 } from '../../typography/Text/Text.esm.js'; import '../../tokens/util/readToken.esm.js'; import '../../tokens/color/index.esm.js'; import '../../tokens/color/background/background.esm.js'; import '../../tokens/util/clamp.esm.js'; import '../../tokens/color/format/format.esm.js'; import '../../tokens/color/format/primary.esm.js'; import '../../tokens/color/format/secondary.esm.js'; import '../../tokens/color/format/tertiary.esm.js'; import '../../tokens/color/rainbow/rainbow.esm.js'; import '../../tokens/color/rainbow/conic/index.esm.js'; import '../../tokens/color/rainbow/conic/sm.esm.js'; import '../../tokens/color/rainbow/conic/xl.esm.js'; import '../../tokens/color/rainbow/linear/index.esm.js'; import '../../tokens/color/rainbow/linear/sm.esm.js'; import '../../tokens/color/rainbow/linear/xl.esm.js'; import '../../tokens/color/livestream/livestream.esm.js'; import '../../tokens/color/status/status.esm.js'; import '../../tokens/color/status/caution.esm.js'; import '../../tokens/color/status/negative.esm.js'; import '../../tokens/color/status/positive.esm.js'; import '../../tokens/color/stroke/stroke.esm.js'; import '../../tokens/color/surface/surface.esm.js'; import '../../tokens/color/text/text.esm.js'; import '../../tokens/util/round.esm.js'; import '../../tokens/color/upsell/upsell.esm.js'; import '../../tokens/color/upsell/sm.esm.js'; import '../../tokens/color/upsell/xl.esm.js'; import '../../tokens/color/upsell/new.esm.js'; import '../../tokens/edge/edge.esm.js'; import '../../tokens/space/space.esm.js'; import '../../tokens/typography/index.esm.js'; import '../../tokens/typography/size/size.esm.js'; import 'react'; import '../../typography/Text/Text.style.esm.js'; import '../../typography/typography.esm.js'; import '../../typography/Text/EditableText.esm.js'; import '../../utils/HOCs/withIris.esm.js'; import '../../utils/hooks/useLayoutStyles.esm.js'; import '../../utils/DOM/geometry.esm.js'; import '../../utils/css.esm.js'; var Wrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n cursor: pointer;\n position: relative;\n min-height: 12rem;\n border-radius: ", ";\n ", ";\n transition: 150ms ease-in-out;\n\n svg {\n height: ", ";\n background: ", ";\n transition: 180ms ease-in-out;\n }\n\n p {\n margin-top: ", ";\n margin-bottom: 0;\n transition: 150ms ease-in-out;\n }\n\n &:hover,\n &:focus,\n &:focus-within,\n &:active {\n outline: none;\n ", ";\n transform: scale(1.0075);\n\n svg {\n transform: scale(1.025);\n background: ", ";\n }\n }\n"], ["\n cursor: pointer;\n position: relative;\n min-height: 12rem;\n border-radius: ", ";\n ", ";\n transition: 150ms ease-in-out;\n\n svg {\n height: ", ";\n background: ", ";\n transition: 180ms ease-in-out;\n }\n\n p {\n margin-top: ", ";\n margin-bottom: 0;\n transition: 150ms ease-in-out;\n }\n\n &:hover,\n &:focus,\n &:focus-within,\n &:active {\n outline: none;\n ", ";\n transform: scale(1.0075);\n\n svg {\n transform: scale(1.025);\n background: ", ";\n }\n }\n"])), rem(4), core.edge(0), rem(30), tokens.icon, rem(12), core.edge(200), tokens.iconHover); var CirclePlus = styled(CirclePlus$1)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin-bottom: 0.5rem;\n border-radius: 50%;\n\n path:first-child {\n fill: none;\n }\n\n path:last-child {\n fill: ", ";\n }\n"], ["\n margin-bottom: 0.5rem;\n border-radius: 50%;\n\n path:first-child {\n fill: none;\n }\n\n path:last-child {\n fill: ", ";\n }\n"])), white); var Text = styled(Text$1)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-weight: 700;\n font-size: 1.25rem;\n line-height: 1.5rem;\n color: ", ";\n"], ["\n font-weight: 700;\n font-size: 1.25rem;\n line-height: 1.5rem;\n color: ", ";\n"])), core.color.text(0)); var Card = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n cursor: pointer;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n text-align: center;\n box-shadow: none;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-decoration: none;\n z-index: 2;\n background-color: ", ";\n transition: 150ms ease-in-out;\n\n &:hover,\n &:focus,\n &:focus-within,\n &:active {\n background-color: ", ";\n }\n\n &:focus {\n outline: none;\n }\n"], ["\n cursor: pointer;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n text-align: center;\n box-shadow: none;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-decoration: none;\n z-index: 2;\n background-color: ", ";\n transition: 150ms ease-in-out;\n\n &:hover,\n &:focus,\n &:focus-within,\n &:active {\n background-color: ", ";\n }\n\n &:focus {\n outline: none;\n }\n"])), tokens.background, tokens.backgroundHover); var Content = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n position: relative;\n overflow: hidden;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n position: relative;\n overflow: hidden;\n"]))); var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5; export { Card, CirclePlus, Content, Text, Wrapper };