@foxford/ui 2.53.0-beta-fc8b350-20241125 → 2.54.0-beta-1aa2896-20241202
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/_virtual/index5.mjs +1 -1
- package/_virtual/index6.mjs +1 -1
- package/components/Arrow/Arrow.js +1 -1
- package/components/Arrow/Arrow.js.map +1 -1
- package/components/Arrow/Arrow.mjs +1 -1
- package/components/Arrow/Arrow.mjs.map +1 -1
- package/components/Arrow/style.js +1 -1
- package/components/Arrow/style.js.map +1 -1
- package/components/Arrow/style.mjs +1 -1
- package/components/Arrow/style.mjs.map +1 -1
- package/components/Button/style.js +1 -1
- package/components/Button/style.js.map +1 -1
- package/components/Button/style.mjs +1 -1
- package/components/Button/style.mjs.map +1 -1
- package/components/Dropdown/Dropdown.js +1 -1
- package/components/Dropdown/Dropdown.js.map +1 -1
- package/components/Dropdown/Dropdown.mjs +1 -1
- package/components/Dropdown/Dropdown.mjs.map +1 -1
- package/components/Input/Input.js +1 -1
- package/components/Input/Input.js.map +1 -1
- package/components/Input/Input.mjs +1 -1
- package/components/Input/Input.mjs.map +1 -1
- package/components/Textarea/Textarea.js +1 -1
- package/components/Textarea/Textarea.js.map +1 -1
- package/components/Textarea/Textarea.mjs +1 -1
- package/components/Textarea/Textarea.mjs.map +1 -1
- package/dts/index.d.ts +400 -142
- package/external/.pnpm/@foxford_icon-pack@0.10.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@foxford/icon-pack/icons/LoaderFill/index.mjs +1 -1
- package/external/.pnpm/@foxford_icon-pack@0.10.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@foxford/icon-pack/icons/NotifFill/index.mjs +1 -1
- package/package.json +1 -1
package/_virtual/index5.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var NotifFill={};export{NotifFill as __exports};
|
|
2
2
|
//# sourceMappingURL=index5.mjs.map
|
package/_virtual/index6.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var LoaderFill={};export{LoaderFill as __exports};
|
|
2
2
|
//# sourceMappingURL=index6.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var React=require('react');var withMergedProps=require('../../hocs/withMergedProps.js');var constants=require('./constants.js');var defaultConstants=require('./default-constants.js');var style=require('./style.js');var require$$0=require('react/jsx-runtime');var Icon=require('../Icon/Icon.js');const Arrow=withMergedProps.withMergedProps(React.forwardRef(((r,e)=>{const{type:s="button",size:t="l",iconProps:
|
|
1
|
+
'use strict';var React=require('react');var withMergedProps=require('../../hocs/withMergedProps.js');var constants=require('./constants.js');var defaultConstants=require('./default-constants.js');var style=require('./style.js');var require$$0=require('react/jsx-runtime');var Icon=require('../Icon/Icon.js');const Arrow=withMergedProps.withMergedProps(React.forwardRef(((r,e)=>{const{type:s="button",size:t="l",top:o=!0,iconProps:n={},...a}=r;return require$$0.jsx(style.Root,{...a,type:s,size:t,top:o,ref:e,children:require$$0.jsx(Icon.Icon,{name:a.preset==='brand'?'arrowUp':'chevronUp',as:'span',color:'inherit',...n})})})),{displayName:"Arrow",sizes:r=>r.preset==='brand'?constants.SIZES:defaultConstants.SIZES_DEFAULT});exports.Arrow=Arrow,exports.COMPONENT_NAME="Arrow";
|
|
2
2
|
//# sourceMappingURL=Arrow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Arrow.js","sources":["../../../../src/components/Arrow/Arrow.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { Icon } from 'components/Icon'\nimport type { IconProps } from 'components/Icon'\nimport { SIZES } from './constants'\nimport { SIZES_DEFAULT } from './default-constants'\nimport type { ArrowProps } from './types'\n\nimport * as Styled from './style'\n\nconst COMPONENT_NAME = 'Arrow'\n\n/**\n *\n * Component accepts all \\<button\\> attributes.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [ArrowProps](https://github.com/foxford/ui/blob/master/src/components/Arrow/types.ts)\n */\nconst Arrow: React.ForwardRefExoticComponent<ArrowProps> = withMergedProps<ArrowProps, HTMLButtonElement>(\n forwardRef((props, ref) => {\n const { type = 'button', size = 'l', iconProps = {}, ...restProps } = props\n\n const iconBaseProps: IconProps = { as: 'span', color: 'inherit' }\n\n return (\n <Styled.Root {...restProps} type={type} size={size} ref={ref}>\n <Icon name={restProps.preset === 'brand' ? 'arrowUp' : 'chevronUp'} {...iconBaseProps} {...iconProps} />\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: (props) => (props.preset === 'brand' ? SIZES : SIZES_DEFAULT),\n }\n)\n\nexport { Arrow, COMPONENT_NAME }\n\nexport type { ArrowProps }\n"],"names":["Arrow","withMergedProps","forwardRef","props","ref","type","size","iconProps","restProps","_jsx","Styled","children","jsx","Icon","name","preset","as","color","displayName","sizes","SIZES","SIZES_DEFAULT"],"mappings":"oTAsBMA,MAAAA,MAAqDC,gBAAAA,gBACzDC,MAAAA,YAAW,CAACC,EAAOC,KACjB,MAAMC,KAAEA,EAAO,SAAQC,KAAEA,EAAO,IAAGC,UAAEA,EAAY,CAAE,KAAKC,
|
|
1
|
+
{"version":3,"file":"Arrow.js","sources":["../../../../src/components/Arrow/Arrow.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { Icon } from 'components/Icon'\nimport type { IconProps } from 'components/Icon'\nimport { SIZES } from './constants'\nimport { SIZES_DEFAULT } from './default-constants'\nimport type { ArrowProps } from './types'\n\nimport * as Styled from './style'\n\nconst COMPONENT_NAME = 'Arrow'\n\n/**\n *\n * Component accepts all \\<button\\> attributes.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [ArrowProps](https://github.com/foxford/ui/blob/master/src/components/Arrow/types.ts)\n */\nconst Arrow: React.ForwardRefExoticComponent<ArrowProps> = withMergedProps<ArrowProps, HTMLButtonElement>(\n forwardRef((props, ref) => {\n const { type = 'button', size = 'l', top = true, iconProps = {}, ...restProps } = props\n\n const iconBaseProps: IconProps = { as: 'span', color: 'inherit' }\n\n return (\n <Styled.Root {...restProps} type={type} size={size} top={top} ref={ref}>\n <Icon name={restProps.preset === 'brand' ? 'arrowUp' : 'chevronUp'} {...iconBaseProps} {...iconProps} />\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: (props) => (props.preset === 'brand' ? SIZES : SIZES_DEFAULT),\n }\n)\n\nexport { Arrow, COMPONENT_NAME }\n\nexport type { ArrowProps }\n"],"names":["Arrow","withMergedProps","forwardRef","props","ref","type","size","top","iconProps","restProps","_jsx","Styled","children","jsx","Icon","name","preset","as","color","displayName","sizes","SIZES","SIZES_DEFAULT"],"mappings":"oTAsBMA,MAAAA,MAAqDC,gBAAAA,gBACzDC,MAAAA,YAAW,CAACC,EAAOC,KACjB,MAAMC,KAAEA,EAAO,SAAQC,KAAEA,EAAO,IAAGC,IAAEA,GAAM,EAAIC,UAAEA,EAAY,CAAE,KAAKC,GAAcN,EAIlF,OACEO,WAAAA,IAACC,MAAAA,KAAW,IAAKF,EAAWJ,KAAMA,EAAMC,KAAMA,EAAMC,IAAKA,EAAKH,IAAKA,EAAIQ,SACrEF,WAAAG,IAACC,UAAI,CAACC,KAAMN,EAAUO,SAAW,QAAU,UAAY,YAJxBC,GAAI,OAAQC,MAAO,aAIyCV,KAC/E,IAGlB,CACEW,YAzBmB,QA0BnBC,MAAQjB,GAAWA,EAAMa,SAAW,QAAUK,UAAKA,MAAGC,iBAAAA,2DA1BnC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{forwardRef}from'react';import{withMergedProps}from'../../hocs/withMergedProps.mjs';import{SIZES}from'./constants.mjs';import{SIZES_DEFAULT}from'./default-constants.mjs';import{Root}from'./style.mjs';import{jsx}from'react/jsx-runtime';import{Icon}from'../Icon/Icon.mjs';const COMPONENT_NAME='Arrow';const Arrow=withMergedProps(forwardRef(((r,o)=>{const{type:t="button",size:s="l",iconProps:
|
|
1
|
+
import{forwardRef}from'react';import{withMergedProps}from'../../hocs/withMergedProps.mjs';import{SIZES}from'./constants.mjs';import{SIZES_DEFAULT}from'./default-constants.mjs';import{Root}from'./style.mjs';import{jsx}from'react/jsx-runtime';import{Icon}from'../Icon/Icon.mjs';const COMPONENT_NAME='Arrow';const Arrow=withMergedProps(forwardRef(((r,o)=>{const{type:t="button",size:s="l",top:e=!0,iconProps:m={},...n}=r;return jsx(Root,{...n,type:t,size:s,top:e,ref:o,children:jsx(Icon,{name:n.preset==='brand'?'arrowUp':'chevronUp',as:'span',color:'inherit',...m})})})),{displayName:"Arrow",sizes:r=>r.preset==='brand'?SIZES:SIZES_DEFAULT});export{Arrow,COMPONENT_NAME};
|
|
2
2
|
//# sourceMappingURL=Arrow.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Arrow.mjs","sources":["../../../../src/components/Arrow/Arrow.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { Icon } from 'components/Icon'\nimport type { IconProps } from 'components/Icon'\nimport { SIZES } from './constants'\nimport { SIZES_DEFAULT } from './default-constants'\nimport type { ArrowProps } from './types'\n\nimport * as Styled from './style'\n\nconst COMPONENT_NAME = 'Arrow'\n\n/**\n *\n * Component accepts all \\<button\\> attributes.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [ArrowProps](https://github.com/foxford/ui/blob/master/src/components/Arrow/types.ts)\n */\nconst Arrow: React.ForwardRefExoticComponent<ArrowProps> = withMergedProps<ArrowProps, HTMLButtonElement>(\n forwardRef((props, ref) => {\n const { type = 'button', size = 'l', iconProps = {}, ...restProps } = props\n\n const iconBaseProps: IconProps = { as: 'span', color: 'inherit' }\n\n return (\n <Styled.Root {...restProps} type={type} size={size} ref={ref}>\n <Icon name={restProps.preset === 'brand' ? 'arrowUp' : 'chevronUp'} {...iconBaseProps} {...iconProps} />\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: (props) => (props.preset === 'brand' ? SIZES : SIZES_DEFAULT),\n }\n)\n\nexport { Arrow, COMPONENT_NAME }\n\nexport type { ArrowProps }\n"],"names":["COMPONENT_NAME","Arrow","withMergedProps","forwardRef","props","ref","type","size","iconProps","restProps","_jsx","Styled","children","Icon","name","preset","as","color","displayName","sizes","SIZES","SIZES_DEFAULT"],"mappings":"oRAUMA,MAAAA,eAAiB,QAYjBC,MAAAA,MAAqDC,gBACzDC,YAAW,CAACC,EAAOC,KACjB,MAAMC,KAAEA,EAAO,SAAQC,KAAEA,EAAO,IAAGC,UAAEA,EAAY,CAAE,KAAKC,
|
|
1
|
+
{"version":3,"file":"Arrow.mjs","sources":["../../../../src/components/Arrow/Arrow.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { Icon } from 'components/Icon'\nimport type { IconProps } from 'components/Icon'\nimport { SIZES } from './constants'\nimport { SIZES_DEFAULT } from './default-constants'\nimport type { ArrowProps } from './types'\n\nimport * as Styled from './style'\n\nconst COMPONENT_NAME = 'Arrow'\n\n/**\n *\n * Component accepts all \\<button\\> attributes.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [ArrowProps](https://github.com/foxford/ui/blob/master/src/components/Arrow/types.ts)\n */\nconst Arrow: React.ForwardRefExoticComponent<ArrowProps> = withMergedProps<ArrowProps, HTMLButtonElement>(\n forwardRef((props, ref) => {\n const { type = 'button', size = 'l', top = true, iconProps = {}, ...restProps } = props\n\n const iconBaseProps: IconProps = { as: 'span', color: 'inherit' }\n\n return (\n <Styled.Root {...restProps} type={type} size={size} top={top} ref={ref}>\n <Icon name={restProps.preset === 'brand' ? 'arrowUp' : 'chevronUp'} {...iconBaseProps} {...iconProps} />\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: (props) => (props.preset === 'brand' ? SIZES : SIZES_DEFAULT),\n }\n)\n\nexport { Arrow, COMPONENT_NAME }\n\nexport type { ArrowProps }\n"],"names":["COMPONENT_NAME","Arrow","withMergedProps","forwardRef","props","ref","type","size","top","iconProps","restProps","_jsx","Styled","children","Icon","name","preset","as","color","displayName","sizes","SIZES","SIZES_DEFAULT"],"mappings":"oRAUMA,MAAAA,eAAiB,QAYjBC,MAAAA,MAAqDC,gBACzDC,YAAW,CAACC,EAAOC,KACjB,MAAMC,KAAEA,EAAO,SAAQC,KAAEA,EAAO,IAAGC,IAAEA,GAAM,EAAIC,UAAEA,EAAY,CAAE,KAAKC,GAAcN,EAIlF,OACEO,IAACC,KAAW,IAAKF,EAAWJ,KAAMA,EAAMC,KAAMA,EAAMC,IAAKA,EAAKH,IAAKA,EAAIQ,SACrEF,IAACG,KAAI,CAACC,KAAML,EAAUM,SAAW,QAAU,UAAY,YAJxBC,GAAI,OAAQC,MAAO,aAIyCT,KAC/E,IAGlB,CACEU,YAzBmB,QA0BnBC,MAAQhB,GAAWA,EAAMY,SAAW,QAAUK,MAAQC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var styled=require('styled-components');var tinycolor=require('../../external/.pnpm/tinycolor2@1.4.2/node_modules/tinycolor2/tinycolor.js');var responsiveSize=require('../../mixins/responsive-size.js');var responsiveMargin=require('../../mixins/responsive-margin.js');var focus=require('../../mixins/focus.js');var style=require('../../shared/utils/style.js');function _interopDefault(o){return o&&o.__esModule?o:{default:o}}var styled__default=_interopDefault(styled);const shouldForwardArrowProp=style.createShouldForwardProp((o=>!['square','top','right','bottom','left','onColored','outline','inverse'].includes(o)));const template=o=>`\n color: ${o.color};\n background-color: ${o.backgroundColor};\n border-color: ${o.borderColor};\n &::before {\n box-shadow: inset 0px 4px 0px ${o.shadowColor};\n }\n &:hover {\n color: ${o.colorHover};\n background-color: ${o.backgroundColorHover};\n border-color: ${o.borderColorHover};\n }\n &:active {\n color: ${o.colorActive};\n background-color: ${o.backgroundColorActive};\n border-color: ${o.borderColorActive};\n }\n &:disabled {\n color: ${o.colorDisabled};\n background-color: ${o.backgroundColorDisabled};\n border-color: ${o.borderColorDisabled};\n }\n`;const defaultDisabledStyles="\n -webkit-filter: grayscale(100%);\n -moz-filter: grayscale(100%);\n -ms-filter: grayscale(100%);\n -o-filter: grayscale(100%);\n filter: grayscale(100%);\n";const COLOR_SCHEMA={
|
|
1
|
+
'use strict';var styled=require('styled-components');var tinycolor=require('../../external/.pnpm/tinycolor2@1.4.2/node_modules/tinycolor2/tinycolor.js');var responsiveSize=require('../../mixins/responsive-size.js');var responsiveMargin=require('../../mixins/responsive-margin.js');var focus=require('../../mixins/focus.js');var style=require('../../shared/utils/style.js');function _interopDefault(o){return o&&o.__esModule?o:{default:o}}var styled__default=_interopDefault(styled);const shouldForwardArrowProp=style.createShouldForwardProp((o=>!['square','top','right','bottom','left','onColored','outline','inverse'].includes(o)));const template=o=>`\n color: ${o.color};\n background-color: ${o.backgroundColor};\n border-color: ${o.borderColor};\n &::before {\n box-shadow: inset 0px 4px 0px ${o.shadowColor};\n }\n &:hover {\n color: ${o.colorHover};\n background-color: ${o.backgroundColorHover};\n border-color: ${o.borderColorHover};\n }\n &:active {\n color: ${o.colorActive};\n background-color: ${o.backgroundColorActive};\n border-color: ${o.borderColorActive};\n }\n &:disabled {\n color: ${o.colorDisabled};\n background-color: ${o.backgroundColorDisabled};\n border-color: ${o.borderColorDisabled};\n }\n`;const defaultDisabledStyles="\n -webkit-filter: grayscale(100%);\n -moz-filter: grayscale(100%);\n -ms-filter: grayscale(100%);\n -o-filter: grayscale(100%);\n filter: grayscale(100%);\n";const COLOR_SCHEMA={contrast:{outline:styled.css(["",""],(o=>template({color:o.theme.colors['content-oncolor-primary'],backgroundColor:o.theme.colors.transparent,borderColor:o.theme.colors['border-oncolor-default'],colorHover:o.theme.colors['content-oncolor-constant'],backgroundColorHover:o.theme.colors['bg-oncolor-primary'],borderColorHover:o.theme.colors.transparent,colorActive:o.theme.colors['content-oncolor-constant'],backgroundColorActive:tinycolor.default(o.theme.colors['bg-oncolor-primary']).darken(6).toString(),borderColorActive:o.theme.colors.transparent,colorDisabled:o.theme.colors['content-oncolor-disabled'],backgroundColorDisabled:o.theme.colors.transparent,borderColorDisabled:o.theme.colors['border-oncolor-disabled'],shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))),default:styled.css(["",""],(o=>template({color:o.theme.colors['content-oncolor-constant'],backgroundColor:o.theme.colors['bg-oncolor-primary'],borderColor:o.theme.colors.transparent,colorHover:o.theme.colors['content-oncolor-constant'],backgroundColorHover:tinycolor.default(o.theme.colors['bg-oncolor-primary']).darken(6).toString(),borderColorHover:o.theme.colors.transparent,colorActive:o.theme.colors['content-oncolor-constant'],backgroundColorActive:tinycolor.default(o.theme.colors['bg-oncolor-primary']).darken(8).toString(),borderColorActive:o.theme.colors.transparent,colorDisabled:o.theme.colors['content-disabled'],backgroundColorDisabled:o.theme.colors['bg-oncolor-primary'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette})))},default:{outline:styled.css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors.transparent,borderColor:o.theme.colors['border-onmain-contrast'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:o.theme.colors['bg-onmain-tertiary'],borderColorHover:o.theme.colors.transparent,colorActive:o.theme.colors['content-oncolor-primary'],backgroundColorActive:o.theme.colors['bg-brand-primary-basic-active'],borderColorActive:o.theme.colors.transparent,colorDisabled:o.theme.colors['content-disabled'],backgroundColorDisabled:o.theme.colors.transparent,borderColorDisabled:o.theme.colors['border-disabled'],shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))),default:styled.css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['bg-onmain-tertiary'],borderColor:o.theme.colors.transparent,colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:tinycolor.default(o.theme.colors['bg-onmain-tertiary']).darken(4).toString(),borderColorHover:o.theme.colors.transparent,colorActive:o.theme.colors['content-oncolor-primary'],backgroundColorActive:o.theme.colors['bg-brand-primary-basic-active'],borderColorActive:o.theme.colors.transparent,colorDisabled:o.theme.colors['content-disabled'],backgroundColorDisabled:o.theme.colors['bg-disabled-large'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette})))}};const DEFAULT_STYLES={filled:styled.css(["",""],(({theme:o,disabled:r})=>`\n background-color: ${o.colors.white};\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);\n & svg {\n fill: ${o.colors.accent};\n }\n &:hover {\n background-color: ${o.colors.accent};\n box-shadow: none;\n svg {\n fill: ${o.colors.white};\n }\n }\n &:active {\n box-shadow: inset 0 4px 0 rgba(5, 108, 188, 0.5);\n }\n ${r?defaultDisabledStyles:''}\n `)),outline:styled.css(["",""],(({theme:o,disabled:r})=>`\n background-color: transparent;\n box-shadow: inset 0 0 0 2px ${o.colors.alto};\n & svg {\n fill: ${o.colors.alto};\n }\n &:hover {\n background-color: ${o.colors.accent};\n box-shadow: none;\n svg {\n fill: ${o.colors.white};\n }\n }\n &:active {\n box-shadow: inset 0 4px 0 rgba(5, 108, 188, 0.5);\n }\n ${r?defaultDisabledStyles:''}\n `)),inverse:styled.css(["",""],(({theme:o,disabled:r})=>`\n background-color: transparent;\n box-shadow: inset 0 0 0 2px ${o.colors.white};\n & svg {\n fill: ${o.colors.white};\n }\n &:hover {\n background-color: ${o.colors.white};\n box-shadow: none;\n svg {\n fill: ${o.colors.accent};\n }\n }\n &:active {\n box-shadow: inset 0 4px 0 #eaecf3;\n }\n ${r?defaultDisabledStyles:''}\n `))};const Root=styled__default.default.button.withConfig({shouldForwardProp:shouldForwardArrowProp}).attrs({dynamicSizeDeclaration:(o,r)=>({fontSize:typeof o=='string'?o:`${o}${r}`,width:'1.8em',height:'1.8em'})}).withConfig({displayName:"Arrow__Root",componentId:"ui__sc-1xgj0m4-0"})([""," "," "," "," ",""],(o=>{let r='rotate(0deg)';return o.right&&(r='rotate(90deg)'),o.bottom&&(r='rotate(180deg)'),o.left&&(r='rotate(270deg)'),`\n box-sizing: border-box;\n position: relative;\n isolation: isolate;\n appearance: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n padding: 0;\n border-radius: ${o.square?'8px':'50%'};\n cursor: ${o.disabled?'not-allowed':'pointer'};\n & svg {\n transform: ${r};\n transform-origin: center;\n }\n ${o.preset==='brand'?"\n border: 1px solid transparent;\n transition-property: background-color; \n transition-duration: 250ms;\n &::before {\n content: '';\n position: absolute;\n top: -1px;\n left: -1px;\n width: calc(100% + 2px);\n height: calc(100% + 2px);\n border-radius: inherit;\n opacity: 0;\n transition-property: opacity; \n transition-duration: 150ms;\n transition-timing-function: ease-in;\n }\n &:active:not(:disabled)::before {\n opacity: 1;\n }":"\n border: none;\n transition-property: background-color, box-shadow;\n transition-duration: 200ms;"}\n `}),(o=>{if(o.preset==='brand'){const r=o.contrast||o.onColored?COLOR_SCHEMA.contrast:COLOR_SCHEMA.default;return o.outline?r.outline:r.default}return o.inverse?DEFAULT_STYLES.inverse:o.outline?DEFAULT_STYLES.outline:DEFAULT_STYLES.filled}),focus.focus,responsiveSize.responsiveSize,responsiveMargin.responsiveMargin);exports.Root=Root;
|
|
2
2
|
//# sourceMappingURL=style.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sources":["../../../../src/components/Arrow/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport tinycolor from 'tinycolor2'\nimport { responsiveSize } from 'mixins/responsive-size'\nimport { responsiveMargin } from 'mixins/responsive-margin'\nimport { focus } from 'mixins/focus'\nimport { createShouldForwardProp } from 'shared/utils/style'\nimport type { CSSColor } from 'shared/types'\nimport type { StyledArrowProps, ArrowPalette } from './types'\n\nconst shouldForwardArrowProp = createShouldForwardProp((propKey) => {\n return !['square', 'top', 'right', 'bottom', 'left', 'onColored', 'outline', 'inverse'].includes(propKey)\n})\n\nconst template = (palette: ArrowPalette) => `\n color: ${palette.color};\n background-color: ${palette.backgroundColor};\n border-color: ${palette.borderColor};\n &::before {\n box-shadow: inset 0px 4px 0px ${palette.shadowColor};\n }\n &:hover {\n color: ${palette.colorHover};\n background-color: ${palette.backgroundColorHover};\n border-color: ${palette.borderColorHover};\n }\n &:active {\n color: ${palette.colorActive};\n background-color: ${palette.backgroundColorActive};\n border-color: ${palette.borderColorActive};\n }\n &:disabled {\n color: ${palette.colorDisabled};\n background-color: ${palette.backgroundColorDisabled};\n border-color: ${palette.borderColorDisabled};\n }\n`\n\nconst defaultDisabledStyles = `\n -webkit-filter: grayscale(100%);\n -moz-filter: grayscale(100%);\n -ms-filter: grayscale(100%);\n -o-filter: grayscale(100%);\n filter: grayscale(100%);\n`\n\nconst COLOR_SCHEMA = {\n onColored: {\n outline: css<StyledArrowProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-oncolor-primary'],\n backgroundColor: props.theme.colors.transparent,\n borderColor: props.theme.colors['border-oncolor-default'],\n colorHover: props.theme.colors['content-oncolor-constant'],\n backgroundColorHover: props.theme.colors['bg-oncolor-primary'],\n borderColorHover: props.theme.colors.transparent,\n colorActive: props.theme.colors['content-oncolor-constant'],\n backgroundColorActive: tinycolor(props.theme.colors['bg-oncolor-primary']).darken(6).toString() as CSSColor,\n borderColorActive: props.theme.colors.transparent,\n colorDisabled: props.theme.colors['content-oncolor-disabled'],\n backgroundColorDisabled: props.theme.colors.transparent,\n borderColorDisabled: props.theme.colors['border-oncolor-disabled'],\n shadowColor: props.theme.colors['bg-oncolor-hover'],\n ...props.palette,\n })}\n `,\n default: css<StyledArrowProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-oncolor-constant'],\n backgroundColor: props.theme.colors['bg-oncolor-primary'],\n borderColor: props.theme.colors.transparent,\n colorHover: props.theme.colors['content-oncolor-constant'],\n backgroundColorHover: tinycolor(props.theme.colors['bg-oncolor-primary']).darken(6).toString() as CSSColor,\n borderColorHover: props.theme.colors.transparent,\n colorActive: props.theme.colors['content-oncolor-constant'],\n backgroundColorActive: tinycolor(props.theme.colors['bg-oncolor-primary']).darken(8).toString() as CSSColor,\n borderColorActive: props.theme.colors.transparent,\n colorDisabled: props.theme.colors['content-disabled'],\n backgroundColorDisabled: props.theme.colors['bg-oncolor-primary'],\n borderColorDisabled: props.theme.colors.transparent,\n shadowColor: props.theme.colors['bg-oncolor-hover'],\n ...props.palette,\n })}\n `,\n },\n default: {\n outline: css<StyledArrowProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors.transparent,\n borderColor: props.theme.colors['border-onmain-contrast'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: props.theme.colors['bg-onmain-tertiary'],\n borderColorHover: props.theme.colors.transparent,\n colorActive: props.theme.colors['content-oncolor-primary'],\n backgroundColorActive: props.theme.colors['bg-brand-primary-basic-active'],\n borderColorActive: props.theme.colors.transparent,\n colorDisabled: props.theme.colors['content-disabled'],\n backgroundColorDisabled: props.theme.colors.transparent,\n borderColorDisabled: props.theme.colors['border-disabled'],\n shadowColor: props.theme.colors['bg-oncolor-hover'],\n ...props.palette,\n })}\n `,\n default: css<StyledArrowProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['bg-onmain-tertiary'],\n borderColor: props.theme.colors.transparent,\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: tinycolor(props.theme.colors['bg-onmain-tertiary']).darken(4).toString() as CSSColor,\n borderColorHover: props.theme.colors.transparent,\n colorActive: props.theme.colors['content-oncolor-primary'],\n backgroundColorActive: props.theme.colors['bg-brand-primary-basic-active'],\n borderColorActive: props.theme.colors.transparent,\n colorDisabled: props.theme.colors['content-disabled'],\n backgroundColorDisabled: props.theme.colors['bg-disabled-large'],\n borderColorDisabled: props.theme.colors.transparent,\n shadowColor: props.theme.colors['bg-oncolor-hover'],\n ...props.palette,\n })}\n `,\n },\n}\n\nconst DEFAULT_STYLES = {\n filled: css<StyledArrowProps>`\n ${({ theme, disabled }) => `\n background-color: ${theme.colors.white};\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);\n & svg {\n fill: ${theme.colors.accent};\n }\n &:hover {\n background-color: ${theme.colors.accent};\n box-shadow: none;\n svg {\n fill: ${theme.colors.white};\n }\n }\n &:active {\n box-shadow: inset 0 4px 0 rgba(5, 108, 188, 0.5);\n }\n ${disabled ? defaultDisabledStyles : ''}\n `}\n `,\n outline: css<StyledArrowProps>`\n ${({ theme, disabled }) => `\n background-color: transparent;\n box-shadow: inset 0 0 0 2px ${theme.colors.alto};\n & svg {\n fill: ${theme.colors.alto};\n }\n &:hover {\n background-color: ${theme.colors.accent};\n box-shadow: none;\n svg {\n fill: ${theme.colors.white};\n }\n }\n &:active {\n box-shadow: inset 0 4px 0 rgba(5, 108, 188, 0.5);\n }\n ${disabled ? defaultDisabledStyles : ''}\n `}\n `,\n inverse: css<StyledArrowProps>`\n ${({ theme, disabled }) => `\n background-color: transparent;\n box-shadow: inset 0 0 0 2px ${theme.colors.white};\n & svg {\n fill: ${theme.colors.white};\n }\n &:hover {\n background-color: ${theme.colors.white};\n box-shadow: none;\n svg {\n fill: ${theme.colors.accent};\n }\n }\n &:active {\n box-shadow: inset 0 4px 0 #eaecf3;\n }\n ${disabled ? defaultDisabledStyles : ''}\n `}\n `,\n}\n\nexport const Root = styled.button\n .withConfig<StyledArrowProps>({\n shouldForwardProp: shouldForwardArrowProp,\n })\n .attrs<StyledArrowProps>(<Required<Pick<StyledArrowProps, 'dynamicSizeDeclaration'>>>{\n dynamicSizeDeclaration: (size, sizeUnits) => {\n return {\n fontSize: typeof size === 'string' ? size : `${size}${sizeUnits}`,\n width: '1.8em',\n height: '1.8em',\n }\n },\n })`\n ${(props) => {\n let transform = 'rotate(0deg)'\n\n if (props.right) transform = 'rotate(90deg)'\n if (props.bottom) transform = 'rotate(180deg)'\n if (props.left) transform = 'rotate(270deg)'\n\n return `\n box-sizing: border-box;\n position: relative;\n isolation: isolate;\n appearance: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n padding: 0;\n border-radius: ${props.square ? '8px' : '50%'};\n cursor: ${props.disabled ? 'not-allowed' : 'pointer'};\n & svg {\n transform: ${transform};\n transform-origin: center;\n }\n ${\n props.preset === 'brand'\n ? `\n border: 1px solid transparent;\n transition-property: background-color; \n transition-duration: 250ms;\n &::before {\n content: '';\n position: absolute;\n top: -1px;\n left: -1px;\n width: calc(100% + 2px);\n height: calc(100% + 2px);\n border-radius: inherit;\n opacity: 0;\n transition-property: opacity; \n transition-duration: 150ms;\n transition-timing-function: ease-in;\n }\n &:active:not(:disabled)::before {\n opacity: 1;\n }`\n : `\n border: none;\n transition-property: background-color, box-shadow;\n transition-duration: 200ms;`\n }\n `\n }}\n\n ${(props) => {\n if (props.preset === 'brand') {\n const schema = props.onColored ? COLOR_SCHEMA.onColored : COLOR_SCHEMA.default\n\n return props.outline ? schema.outline : schema.default\n }\n\n const defaultStyles = DEFAULT_STYLES\n\n if (props.inverse) return defaultStyles.inverse\n if (props.outline) return defaultStyles.outline\n\n return defaultStyles.filled\n }}\n\n ${focus}\n ${responsiveSize}\n ${responsiveMargin}\n`\n"],"names":["shouldForwardArrowProp","createShouldForwardProp","propKey","includes","template","palette","color","backgroundColor","borderColor","shadowColor","colorHover","backgroundColorHover","borderColorHover","colorActive","backgroundColorActive","borderColorActive","colorDisabled","backgroundColorDisabled","borderColorDisabled","defaultDisabledStyles","COLOR_SCHEMA","onColored","outline","css","props","theme","colors","transparent","tinycolor","default","darken","toString","DEFAULT_STYLES","filled","disabled","white","accent","alto","inverse","Root","styled","button","withConfig","shouldForwardProp","attrs","dynamicSizeDeclaration","size","sizeUnits","fontSize","width","height","displayName","componentId","transform","right","bottom","left","square","preset","schema","focus","responsiveSize","responsiveMargin"],"mappings":"keASA,MAAMA,uBAAyBC,MAAuBA,yBAAEC,IAC9C,CAAC,SAAU,MAAO,QAAS,SAAU,OAAQ,YAAa,UAAW,WAAWC,SAASD,KAGnG,MAAME,SAAYC,GAA0B,cACjCA,EAAQC,+BACGD,EAAQE,qCACZF,EAAQG,kEAEUH,EAAQI,8CAG/BJ,EAAQK,sCACGL,EAAQM,4CACZN,EAAQO,oDAGfP,EAAQQ,uCACGR,EAAQS,6CACZT,EAAQU,uDAGfV,EAAQW,yCACGX,EAAQY,+CACZZ,EAAQa,8BAI5B,MAAMC,sBAAwB,qKAQ9B,MAAMC,aAAe,CACnBC,UAAW,CACTC,QAASC,OAAGA,IAAA,CAAA,GAAA,KACPC,GACDpB,SAAS,CACPE,MAAOkB,EAAMC,MAAMC,OAAO,2BAC1BnB,gBAAiBiB,EAAMC,MAAMC,OAAOC,YACpCnB,YAAagB,EAAMC,MAAMC,OAAO,0BAChChB,WAAYc,EAAMC,MAAMC,OAAO,4BAC/Bf,qBAAsBa,EAAMC,MAAMC,OAAO,sBACzCd,iBAAkBY,EAAMC,MAAMC,OAAOC,YACrCd,YAAaW,EAAMC,MAAMC,OAAO,4BAChCZ,sBAAuBc,UAASC,QAACL,EAAMC,MAAMC,OAAO,uBAAuBI,OAAO,GAAGC,WACrFhB,kBAAmBS,EAAMC,MAAMC,OAAOC,YACtCX,cAAeQ,EAAMC,MAAMC,OAAO,4BAClCT,wBAAyBO,EAAMC,MAAMC,OAAOC,YAC5CT,oBAAqBM,EAAMC,MAAMC,OAAO,2BACxCjB,YAAae,EAAMC,MAAMC,OAAO,uBAC7BF,EAAMnB,YAGfwB,QAASN,OAAGA,IAAA,CAAA,GAAA,KACPC,GACDpB,SAAS,CACPE,MAAOkB,EAAMC,MAAMC,OAAO,4BAC1BnB,gBAAiBiB,EAAMC,MAAMC,OAAO,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AAO,QACPC,OAAQ,YAGZR,WAAA,CAAAS,YAAA,cAAAC,YAAA,oBAZgBZ,CAYhB,CAAA,GAAA,IAAA,IAAA,IAAA,IAAA,KACChB,IACD,IAAI6B,EAAY,eAMhB,OAJI7B,EAAM8B,QAAOD,EAAY,iBACzB7B,EAAM+B,SAAQF,EAAY,kBAC1B7B,EAAMgC,OAAMH,EAAY,kBAErB,2QAUY7B,EAAMiC,OAAS,MAAQ,yBAC9BjC,EAAMU,SAAW,cAAgB,iDAE5BmB,yDAIb7B,EAAMkC,SAAW,QACb,kqBAoBA,8IAKP,IAGAlC,IACD,GAAIA,EAAMkC,SAAW,QAAS,CAC5B,MAAMC,EAASnC,EAAMH,UAAYD,aAAaC,UAAYD,aAAaS,QAEvE,OAAOL,EAAMF,QAAUqC,EAAOrC,QAAUqC,EAAO9B,OACjD,CAIA,OAAIL,EAAMc,QAFYN,eAEkBM,QACpCd,EAAMF,QAHYU,eAGkBV,QAHlBU,eAKDC,MAAM,GAG3B2B,MAAAA,MACAC,eAAAA,eACAC,iBAAgBA"}
|
|
1
|
+
{"version":3,"file":"style.js","sources":["../../../../src/components/Arrow/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport tinycolor from 'tinycolor2'\nimport { responsiveSize } from 'mixins/responsive-size'\nimport { responsiveMargin } from 'mixins/responsive-margin'\nimport { focus } from 'mixins/focus'\nimport { createShouldForwardProp } from 'shared/utils/style'\nimport type { CSSColor } from 'shared/types'\nimport type { StyledArrowProps, ArrowPalette } from './types'\n\nconst shouldForwardArrowProp = createShouldForwardProp((propKey) => {\n return !['square', 'top', 'right', 'bottom', 'left', 'onColored', 'outline', 'inverse'].includes(propKey)\n})\n\nconst template = (palette: ArrowPalette) => `\n color: ${palette.color};\n background-color: ${palette.backgroundColor};\n border-color: ${palette.borderColor};\n &::before {\n box-shadow: inset 0px 4px 0px ${palette.shadowColor};\n }\n &:hover {\n color: ${palette.colorHover};\n background-color: ${palette.backgroundColorHover};\n border-color: ${palette.borderColorHover};\n }\n &:active {\n color: ${palette.colorActive};\n background-color: ${palette.backgroundColorActive};\n border-color: ${palette.borderColorActive};\n }\n &:disabled {\n color: ${palette.colorDisabled};\n background-color: ${palette.backgroundColorDisabled};\n border-color: ${palette.borderColorDisabled};\n }\n`\n\nconst defaultDisabledStyles = `\n -webkit-filter: grayscale(100%);\n -moz-filter: grayscale(100%);\n -ms-filter: grayscale(100%);\n -o-filter: grayscale(100%);\n filter: grayscale(100%);\n`\n\nconst COLOR_SCHEMA = {\n contrast: {\n outline: css<StyledArrowProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-oncolor-primary'],\n backgroundColor: props.theme.colors.transparent,\n borderColor: props.theme.colors['border-oncolor-default'],\n colorHover: props.theme.colors['content-oncolor-constant'],\n backgroundColorHover: props.theme.colors['bg-oncolor-primary'],\n borderColorHover: props.theme.colors.transparent,\n colorActive: props.theme.colors['content-oncolor-constant'],\n backgroundColorActive: tinycolor(props.theme.colors['bg-oncolor-primary']).darken(6).toString() as CSSColor,\n borderColorActive: props.theme.colors.transparent,\n colorDisabled: props.theme.colors['content-oncolor-disabled'],\n backgroundColorDisabled: props.theme.colors.transparent,\n borderColorDisabled: props.theme.colors['border-oncolor-disabled'],\n shadowColor: props.theme.colors['bg-oncolor-hover'],\n ...props.palette,\n })}\n `,\n default: css<StyledArrowProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-oncolor-constant'],\n backgroundColor: props.theme.colors['bg-oncolor-primary'],\n borderColor: props.theme.colors.transparent,\n colorHover: props.theme.colors['content-oncolor-constant'],\n backgroundColorHover: tinycolor(props.theme.colors['bg-oncolor-primary']).darken(6).toString() as CSSColor,\n borderColorHover: props.theme.colors.transparent,\n colorActive: props.theme.colors['content-oncolor-constant'],\n backgroundColorActive: tinycolor(props.theme.colors['bg-oncolor-primary']).darken(8).toString() as CSSColor,\n borderColorActive: props.theme.colors.transparent,\n colorDisabled: props.theme.colors['content-disabled'],\n backgroundColorDisabled: props.theme.colors['bg-oncolor-primary'],\n borderColorDisabled: props.theme.colors.transparent,\n shadowColor: props.theme.colors['bg-oncolor-hover'],\n ...props.palette,\n })}\n `,\n },\n default: {\n outline: css<StyledArrowProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors.transparent,\n borderColor: props.theme.colors['border-onmain-contrast'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: props.theme.colors['bg-onmain-tertiary'],\n borderColorHover: props.theme.colors.transparent,\n colorActive: props.theme.colors['content-oncolor-primary'],\n backgroundColorActive: props.theme.colors['bg-brand-primary-basic-active'],\n borderColorActive: props.theme.colors.transparent,\n colorDisabled: props.theme.colors['content-disabled'],\n backgroundColorDisabled: props.theme.colors.transparent,\n borderColorDisabled: props.theme.colors['border-disabled'],\n shadowColor: props.theme.colors['bg-oncolor-hover'],\n ...props.palette,\n })}\n `,\n default: css<StyledArrowProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['bg-onmain-tertiary'],\n borderColor: props.theme.colors.transparent,\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: tinycolor(props.theme.colors['bg-onmain-tertiary']).darken(4).toString() as CSSColor,\n borderColorHover: props.theme.colors.transparent,\n colorActive: props.theme.colors['content-oncolor-primary'],\n backgroundColorActive: props.theme.colors['bg-brand-primary-basic-active'],\n borderColorActive: props.theme.colors.transparent,\n colorDisabled: props.theme.colors['content-disabled'],\n backgroundColorDisabled: props.theme.colors['bg-disabled-large'],\n borderColorDisabled: props.theme.colors.transparent,\n shadowColor: props.theme.colors['bg-oncolor-hover'],\n ...props.palette,\n })}\n `,\n },\n}\n\nconst DEFAULT_STYLES = {\n filled: css<StyledArrowProps>`\n ${({ theme, disabled }) => `\n background-color: ${theme.colors.white};\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);\n & svg {\n fill: ${theme.colors.accent};\n }\n &:hover {\n background-color: ${theme.colors.accent};\n box-shadow: none;\n svg {\n fill: ${theme.colors.white};\n }\n }\n &:active {\n box-shadow: inset 0 4px 0 rgba(5, 108, 188, 0.5);\n }\n ${disabled ? defaultDisabledStyles : ''}\n `}\n `,\n outline: css<StyledArrowProps>`\n ${({ theme, disabled }) => `\n background-color: transparent;\n box-shadow: inset 0 0 0 2px ${theme.colors.alto};\n & svg {\n fill: ${theme.colors.alto};\n }\n &:hover {\n background-color: ${theme.colors.accent};\n box-shadow: none;\n svg {\n fill: ${theme.colors.white};\n }\n }\n &:active {\n box-shadow: inset 0 4px 0 rgba(5, 108, 188, 0.5);\n }\n ${disabled ? defaultDisabledStyles : ''}\n `}\n `,\n inverse: css<StyledArrowProps>`\n ${({ theme, disabled }) => `\n background-color: transparent;\n box-shadow: inset 0 0 0 2px ${theme.colors.white};\n & svg {\n fill: ${theme.colors.white};\n }\n &:hover {\n background-color: ${theme.colors.white};\n box-shadow: none;\n svg {\n fill: ${theme.colors.accent};\n }\n }\n &:active {\n box-shadow: inset 0 4px 0 #eaecf3;\n }\n ${disabled ? defaultDisabledStyles : ''}\n `}\n `,\n}\n\nexport const Root = styled.button\n .withConfig<StyledArrowProps>({\n shouldForwardProp: shouldForwardArrowProp,\n })\n .attrs<StyledArrowProps>(<Required<Pick<StyledArrowProps, 'dynamicSizeDeclaration'>>>{\n dynamicSizeDeclaration: (size, sizeUnits) => {\n return {\n fontSize: typeof size === 'string' ? size : `${size}${sizeUnits}`,\n width: '1.8em',\n height: '1.8em',\n }\n },\n })`\n ${(props) => {\n let transform = 'rotate(0deg)'\n\n if (props.right) transform = 'rotate(90deg)'\n if (props.bottom) transform = 'rotate(180deg)'\n if (props.left) transform = 'rotate(270deg)'\n\n return `\n box-sizing: border-box;\n position: relative;\n isolation: isolate;\n appearance: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n padding: 0;\n border-radius: ${props.square ? '8px' : '50%'};\n cursor: ${props.disabled ? 'not-allowed' : 'pointer'};\n & svg {\n transform: ${transform};\n transform-origin: center;\n }\n ${\n props.preset === 'brand'\n ? `\n border: 1px solid transparent;\n transition-property: background-color; \n transition-duration: 250ms;\n &::before {\n content: '';\n position: absolute;\n top: -1px;\n left: -1px;\n width: calc(100% + 2px);\n height: calc(100% + 2px);\n border-radius: inherit;\n opacity: 0;\n transition-property: opacity; \n transition-duration: 150ms;\n transition-timing-function: ease-in;\n }\n &:active:not(:disabled)::before {\n opacity: 1;\n }`\n : `\n border: none;\n transition-property: background-color, box-shadow;\n transition-duration: 200ms;`\n }\n `\n }}\n\n ${(props) => {\n if (props.preset === 'brand') {\n const schema = props.contrast || props.onColored ? COLOR_SCHEMA.contrast : COLOR_SCHEMA.default\n\n return props.outline ? schema.outline : schema.default\n }\n\n const defaultStyles = DEFAULT_STYLES\n\n if (props.inverse) return defaultStyles.inverse\n if (props.outline) return defaultStyles.outline\n\n return defaultStyles.filled\n }}\n\n ${focus}\n ${responsiveSize}\n ${responsiveMargin}\n`\n"],"names":["shouldForwardArrowProp","createShouldForwardProp","propKey","includes","template","palette","color","backgroundColor","borderColor","shadowColor","colorHover","backgroundColorHover","borderColorHover","colorActive","backgroundColorActive","borderColorActive","colorDisabled","backgroundColorDisabled","borderColorDisabled","defaultDisabledStyles","COLOR_SCHEMA","contrast","outline","css","props","theme","colors","transparent","tinycolor","default","darken","toString","DEFAULT_STYLES","filled","disabled","white","accent","alto","inverse","Root","styled","button","withConfig","shouldForwardProp","attrs","dynamicSizeDeclaration","size","sizeUnits","fontSize","width","height","displayName","componentId","transform","right","bottom","left","square","preset","schema","onColored","focus","responsiveSize","responsiveMargin"],"mappings":"keASA,MAAMA,uBAAyBC,MAAuBA,yBAAEC,IAC9C,CAAC,SAAU,MAAO,QAAS,SAAU,OAAQ,YAAa,UAAW,WAAWC,SAASD,KAGnG,MAAME,SAAYC,GAA0B,cACjCA,EAAQC,+BACGD,EAAQE,qCACZF,EAAQG,kEAEUH,EAAQI,8CAG/BJ,EAAQK,sCACGL,EAAQM,4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B,EAAMkC,SAAW,QACb,kqBAoBA,8IAKP,IAGAlC,IACD,GAAIA,EAAMkC,SAAW,QAAS,CAC5B,MAAMC,EAASnC,EAAMH,UAAYG,EAAMoC,UAAYxC,aAAaC,SAAWD,aAAaS,QAExF,OAAOL,EAAMF,QAAUqC,EAAOrC,QAAUqC,EAAO9B,OACjD,CAIA,OAAIL,EAAMc,QAFYN,eAEkBM,QACpCd,EAAMF,QAHYU,eAGkBV,QAHlBU,eAKDC,MAAM,GAG3B4B,MAAAA,MACAC,eAAAA,eACAC,iBAAgBA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import styled,{css}from'styled-components';import tinycolor from'../../external/.pnpm/tinycolor2@1.4.2/node_modules/tinycolor2/tinycolor.mjs';import{responsiveSize}from'../../mixins/responsive-size.mjs';import{responsiveMargin}from'../../mixins/responsive-margin.mjs';import{focus}from'../../mixins/focus.mjs';import{createShouldForwardProp}from'../../shared/utils/style.mjs';const shouldForwardArrowProp=createShouldForwardProp((o=>!['square','top','right','bottom','left','onColored','outline','inverse'].includes(o)));const template=o=>`\n color: ${o.color};\n background-color: ${o.backgroundColor};\n border-color: ${o.borderColor};\n &::before {\n box-shadow: inset 0px 4px 0px ${o.shadowColor};\n }\n &:hover {\n color: ${o.colorHover};\n background-color: ${o.backgroundColorHover};\n border-color: ${o.borderColorHover};\n }\n &:active {\n color: ${o.colorActive};\n background-color: ${o.backgroundColorActive};\n border-color: ${o.borderColorActive};\n }\n &:disabled {\n color: ${o.colorDisabled};\n background-color: ${o.backgroundColorDisabled};\n border-color: ${o.borderColorDisabled};\n }\n`;const defaultDisabledStyles="\n -webkit-filter: grayscale(100%);\n -moz-filter: grayscale(100%);\n -ms-filter: grayscale(100%);\n -o-filter: grayscale(100%);\n filter: grayscale(100%);\n";const COLOR_SCHEMA={
|
|
1
|
+
import styled,{css}from'styled-components';import tinycolor from'../../external/.pnpm/tinycolor2@1.4.2/node_modules/tinycolor2/tinycolor.mjs';import{responsiveSize}from'../../mixins/responsive-size.mjs';import{responsiveMargin}from'../../mixins/responsive-margin.mjs';import{focus}from'../../mixins/focus.mjs';import{createShouldForwardProp}from'../../shared/utils/style.mjs';const shouldForwardArrowProp=createShouldForwardProp((o=>!['square','top','right','bottom','left','onColored','outline','inverse'].includes(o)));const template=o=>`\n color: ${o.color};\n background-color: ${o.backgroundColor};\n border-color: ${o.borderColor};\n &::before {\n box-shadow: inset 0px 4px 0px ${o.shadowColor};\n }\n &:hover {\n color: ${o.colorHover};\n background-color: ${o.backgroundColorHover};\n border-color: ${o.borderColorHover};\n }\n &:active {\n color: ${o.colorActive};\n background-color: ${o.backgroundColorActive};\n border-color: ${o.borderColorActive};\n }\n &:disabled {\n color: ${o.colorDisabled};\n background-color: ${o.backgroundColorDisabled};\n border-color: ${o.borderColorDisabled};\n }\n`;const defaultDisabledStyles="\n -webkit-filter: grayscale(100%);\n -moz-filter: grayscale(100%);\n -ms-filter: grayscale(100%);\n -o-filter: grayscale(100%);\n filter: grayscale(100%);\n";const COLOR_SCHEMA={contrast:{outline:css(["",""],(o=>template({color:o.theme.colors['content-oncolor-primary'],backgroundColor:o.theme.colors.transparent,borderColor:o.theme.colors['border-oncolor-default'],colorHover:o.theme.colors['content-oncolor-constant'],backgroundColorHover:o.theme.colors['bg-oncolor-primary'],borderColorHover:o.theme.colors.transparent,colorActive:o.theme.colors['content-oncolor-constant'],backgroundColorActive:tinycolor(o.theme.colors['bg-oncolor-primary']).darken(6).toString(),borderColorActive:o.theme.colors.transparent,colorDisabled:o.theme.colors['content-oncolor-disabled'],backgroundColorDisabled:o.theme.colors.transparent,borderColorDisabled:o.theme.colors['border-oncolor-disabled'],shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))),default:css(["",""],(o=>template({color:o.theme.colors['content-oncolor-constant'],backgroundColor:o.theme.colors['bg-oncolor-primary'],borderColor:o.theme.colors.transparent,colorHover:o.theme.colors['content-oncolor-constant'],backgroundColorHover:tinycolor(o.theme.colors['bg-oncolor-primary']).darken(6).toString(),borderColorHover:o.theme.colors.transparent,colorActive:o.theme.colors['content-oncolor-constant'],backgroundColorActive:tinycolor(o.theme.colors['bg-oncolor-primary']).darken(8).toString(),borderColorActive:o.theme.colors.transparent,colorDisabled:o.theme.colors['content-disabled'],backgroundColorDisabled:o.theme.colors['bg-oncolor-primary'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette})))},default:{outline:css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors.transparent,borderColor:o.theme.colors['border-onmain-contrast'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:o.theme.colors['bg-onmain-tertiary'],borderColorHover:o.theme.colors.transparent,colorActive:o.theme.colors['content-oncolor-primary'],backgroundColorActive:o.theme.colors['bg-brand-primary-basic-active'],borderColorActive:o.theme.colors.transparent,colorDisabled:o.theme.colors['content-disabled'],backgroundColorDisabled:o.theme.colors.transparent,borderColorDisabled:o.theme.colors['border-disabled'],shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))),default:css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['bg-onmain-tertiary'],borderColor:o.theme.colors.transparent,colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:tinycolor(o.theme.colors['bg-onmain-tertiary']).darken(4).toString(),borderColorHover:o.theme.colors.transparent,colorActive:o.theme.colors['content-oncolor-primary'],backgroundColorActive:o.theme.colors['bg-brand-primary-basic-active'],borderColorActive:o.theme.colors.transparent,colorDisabled:o.theme.colors['content-disabled'],backgroundColorDisabled:o.theme.colors['bg-disabled-large'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette})))}};const DEFAULT_STYLES={filled:css(["",""],(({theme:o,disabled:r})=>`\n background-color: ${o.colors.white};\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);\n & svg {\n fill: ${o.colors.accent};\n }\n &:hover {\n background-color: ${o.colors.accent};\n box-shadow: none;\n svg {\n fill: ${o.colors.white};\n }\n }\n &:active {\n box-shadow: inset 0 4px 0 rgba(5, 108, 188, 0.5);\n }\n ${r?defaultDisabledStyles:''}\n `)),outline:css(["",""],(({theme:o,disabled:r})=>`\n background-color: transparent;\n box-shadow: inset 0 0 0 2px ${o.colors.alto};\n & svg {\n fill: ${o.colors.alto};\n }\n &:hover {\n background-color: ${o.colors.accent};\n box-shadow: none;\n svg {\n fill: ${o.colors.white};\n }\n }\n &:active {\n box-shadow: inset 0 4px 0 rgba(5, 108, 188, 0.5);\n }\n ${r?defaultDisabledStyles:''}\n `)),inverse:css(["",""],(({theme:o,disabled:r})=>`\n background-color: transparent;\n box-shadow: inset 0 0 0 2px ${o.colors.white};\n & svg {\n fill: ${o.colors.white};\n }\n &:hover {\n background-color: ${o.colors.white};\n box-shadow: none;\n svg {\n fill: ${o.colors.accent};\n }\n }\n &:active {\n box-shadow: inset 0 4px 0 #eaecf3;\n }\n ${r?defaultDisabledStyles:''}\n `))};const Root=styled.button.withConfig({shouldForwardProp:shouldForwardArrowProp}).attrs({dynamicSizeDeclaration:(o,r)=>({fontSize:typeof o=='string'?o:`${o}${r}`,width:'1.8em',height:'1.8em'})}).withConfig({displayName:"Arrow__Root",componentId:"ui__sc-1xgj0m4-0"})([""," "," "," "," ",""],(o=>{let r='rotate(0deg)';return o.right&&(r='rotate(90deg)'),o.bottom&&(r='rotate(180deg)'),o.left&&(r='rotate(270deg)'),`\n box-sizing: border-box;\n position: relative;\n isolation: isolate;\n appearance: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n padding: 0;\n border-radius: ${o.square?'8px':'50%'};\n cursor: ${o.disabled?'not-allowed':'pointer'};\n & svg {\n transform: ${r};\n transform-origin: center;\n }\n ${o.preset==='brand'?"\n border: 1px solid transparent;\n transition-property: background-color; \n transition-duration: 250ms;\n &::before {\n content: '';\n position: absolute;\n top: -1px;\n left: -1px;\n width: calc(100% + 2px);\n height: calc(100% + 2px);\n border-radius: inherit;\n opacity: 0;\n transition-property: opacity; \n transition-duration: 150ms;\n transition-timing-function: ease-in;\n }\n &:active:not(:disabled)::before {\n opacity: 1;\n }":"\n border: none;\n transition-property: background-color, box-shadow;\n transition-duration: 200ms;"}\n `}),(o=>{if(o.preset==='brand'){const r=o.contrast||o.onColored?COLOR_SCHEMA.contrast:COLOR_SCHEMA.default;return o.outline?r.outline:r.default}return o.inverse?DEFAULT_STYLES.inverse:o.outline?DEFAULT_STYLES.outline:DEFAULT_STYLES.filled}),focus,responsiveSize,responsiveMargin);export{Root};
|
|
2
2
|
//# sourceMappingURL=style.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.mjs","sources":["../../../../src/components/Arrow/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport tinycolor from 'tinycolor2'\nimport { responsiveSize } from 'mixins/responsive-size'\nimport { responsiveMargin } from 'mixins/responsive-margin'\nimport { focus } from 'mixins/focus'\nimport { createShouldForwardProp } from 'shared/utils/style'\nimport type { CSSColor } from 'shared/types'\nimport type { StyledArrowProps, ArrowPalette } from './types'\n\nconst shouldForwardArrowProp = createShouldForwardProp((propKey) => {\n return !['square', 'top', 'right', 'bottom', 'left', 'onColored', 'outline', 'inverse'].includes(propKey)\n})\n\nconst template = (palette: ArrowPalette) => `\n color: ${palette.color};\n background-color: ${palette.backgroundColor};\n border-color: ${palette.borderColor};\n &::before {\n box-shadow: inset 0px 4px 0px ${palette.shadowColor};\n }\n &:hover {\n color: ${palette.colorHover};\n background-color: ${palette.backgroundColorHover};\n border-color: ${palette.borderColorHover};\n }\n &:active {\n color: ${palette.colorActive};\n background-color: ${palette.backgroundColorActive};\n border-color: ${palette.borderColorActive};\n }\n &:disabled {\n color: ${palette.colorDisabled};\n background-color: ${palette.backgroundColorDisabled};\n border-color: ${palette.borderColorDisabled};\n }\n`\n\nconst defaultDisabledStyles = `\n -webkit-filter: grayscale(100%);\n -moz-filter: grayscale(100%);\n -ms-filter: grayscale(100%);\n -o-filter: grayscale(100%);\n filter: grayscale(100%);\n`\n\nconst COLOR_SCHEMA = {\n onColored: {\n outline: css<StyledArrowProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-oncolor-primary'],\n backgroundColor: props.theme.colors.transparent,\n borderColor: props.theme.colors['border-oncolor-default'],\n colorHover: props.theme.colors['content-oncolor-constant'],\n backgroundColorHover: props.theme.colors['bg-oncolor-primary'],\n borderColorHover: props.theme.colors.transparent,\n colorActive: props.theme.colors['content-oncolor-constant'],\n backgroundColorActive: tinycolor(props.theme.colors['bg-oncolor-primary']).darken(6).toString() as CSSColor,\n borderColorActive: props.theme.colors.transparent,\n colorDisabled: props.theme.colors['content-oncolor-disabled'],\n backgroundColorDisabled: props.theme.colors.transparent,\n borderColorDisabled: props.theme.colors['border-oncolor-disabled'],\n shadowColor: props.theme.colors['bg-oncolor-hover'],\n ...props.palette,\n })}\n `,\n default: css<StyledArrowProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-oncolor-constant'],\n backgroundColor: props.theme.colors['bg-oncolor-primary'],\n borderColor: props.theme.colors.transparent,\n colorHover: props.theme.colors['content-oncolor-constant'],\n backgroundColorHover: tinycolor(props.theme.colors['bg-oncolor-primary']).darken(6).toString() as CSSColor,\n borderColorHover: props.theme.colors.transparent,\n colorActive: props.theme.colors['content-oncolor-constant'],\n backgroundColorActive: tinycolor(props.theme.colors['bg-oncolor-primary']).darken(8).toString() as CSSColor,\n borderColorActive: props.theme.colors.transparent,\n colorDisabled: props.theme.colors['content-disabled'],\n backgroundColorDisabled: props.theme.colors['bg-oncolor-primary'],\n borderColorDisabled: props.theme.colors.transparent,\n shadowColor: props.theme.colors['bg-oncolor-hover'],\n ...props.palette,\n })}\n `,\n },\n default: {\n outline: css<StyledArrowProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors.transparent,\n borderColor: props.theme.colors['border-onmain-contrast'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: props.theme.colors['bg-onmain-tertiary'],\n borderColorHover: props.theme.colors.transparent,\n colorActive: props.theme.colors['content-oncolor-primary'],\n backgroundColorActive: props.theme.colors['bg-brand-primary-basic-active'],\n borderColorActive: props.theme.colors.transparent,\n colorDisabled: props.theme.colors['content-disabled'],\n backgroundColorDisabled: props.theme.colors.transparent,\n borderColorDisabled: props.theme.colors['border-disabled'],\n shadowColor: props.theme.colors['bg-oncolor-hover'],\n ...props.palette,\n })}\n `,\n default: css<StyledArrowProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['bg-onmain-tertiary'],\n borderColor: props.theme.colors.transparent,\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: tinycolor(props.theme.colors['bg-onmain-tertiary']).darken(4).toString() as CSSColor,\n borderColorHover: props.theme.colors.transparent,\n colorActive: props.theme.colors['content-oncolor-primary'],\n backgroundColorActive: props.theme.colors['bg-brand-primary-basic-active'],\n borderColorActive: props.theme.colors.transparent,\n colorDisabled: props.theme.colors['content-disabled'],\n backgroundColorDisabled: props.theme.colors['bg-disabled-large'],\n borderColorDisabled: props.theme.colors.transparent,\n shadowColor: props.theme.colors['bg-oncolor-hover'],\n ...props.palette,\n })}\n `,\n },\n}\n\nconst DEFAULT_STYLES = {\n filled: css<StyledArrowProps>`\n ${({ theme, disabled }) => `\n background-color: ${theme.colors.white};\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);\n & svg {\n fill: ${theme.colors.accent};\n }\n &:hover {\n background-color: ${theme.colors.accent};\n box-shadow: none;\n svg {\n fill: ${theme.colors.white};\n }\n }\n &:active {\n box-shadow: inset 0 4px 0 rgba(5, 108, 188, 0.5);\n }\n ${disabled ? defaultDisabledStyles : ''}\n `}\n `,\n outline: css<StyledArrowProps>`\n ${({ theme, disabled }) => `\n background-color: transparent;\n box-shadow: inset 0 0 0 2px ${theme.colors.alto};\n & svg {\n fill: ${theme.colors.alto};\n }\n &:hover {\n background-color: ${theme.colors.accent};\n box-shadow: none;\n svg {\n fill: ${theme.colors.white};\n }\n }\n &:active {\n box-shadow: inset 0 4px 0 rgba(5, 108, 188, 0.5);\n }\n ${disabled ? defaultDisabledStyles : ''}\n `}\n `,\n inverse: css<StyledArrowProps>`\n ${({ theme, disabled }) => `\n background-color: transparent;\n box-shadow: inset 0 0 0 2px ${theme.colors.white};\n & svg {\n fill: ${theme.colors.white};\n }\n &:hover {\n background-color: ${theme.colors.white};\n box-shadow: none;\n svg {\n fill: ${theme.colors.accent};\n }\n }\n &:active {\n box-shadow: inset 0 4px 0 #eaecf3;\n }\n ${disabled ? defaultDisabledStyles : ''}\n `}\n `,\n}\n\nexport const Root = styled.button\n .withConfig<StyledArrowProps>({\n shouldForwardProp: shouldForwardArrowProp,\n })\n .attrs<StyledArrowProps>(<Required<Pick<StyledArrowProps, 'dynamicSizeDeclaration'>>>{\n dynamicSizeDeclaration: (size, sizeUnits) => {\n return {\n fontSize: typeof size === 'string' ? size : `${size}${sizeUnits}`,\n width: '1.8em',\n height: '1.8em',\n }\n },\n })`\n ${(props) => {\n let transform = 'rotate(0deg)'\n\n if (props.right) transform = 'rotate(90deg)'\n if (props.bottom) transform = 'rotate(180deg)'\n if (props.left) transform = 'rotate(270deg)'\n\n return `\n box-sizing: border-box;\n position: relative;\n isolation: isolate;\n appearance: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n padding: 0;\n border-radius: ${props.square ? '8px' : '50%'};\n cursor: ${props.disabled ? 'not-allowed' : 'pointer'};\n & svg {\n transform: ${transform};\n transform-origin: center;\n }\n ${\n props.preset === 'brand'\n ? `\n border: 1px solid transparent;\n transition-property: background-color; \n transition-duration: 250ms;\n &::before {\n content: '';\n position: absolute;\n top: -1px;\n left: -1px;\n width: calc(100% + 2px);\n height: calc(100% + 2px);\n border-radius: inherit;\n opacity: 0;\n transition-property: opacity; \n transition-duration: 150ms;\n transition-timing-function: ease-in;\n }\n &:active:not(:disabled)::before {\n opacity: 1;\n }`\n : `\n border: none;\n transition-property: background-color, box-shadow;\n transition-duration: 200ms;`\n }\n `\n }}\n\n ${(props) => {\n if (props.preset === 'brand') {\n const schema = props.onColored ? COLOR_SCHEMA.onColored : COLOR_SCHEMA.default\n\n return props.outline ? schema.outline : schema.default\n }\n\n const defaultStyles = DEFAULT_STYLES\n\n if (props.inverse) return defaultStyles.inverse\n if (props.outline) return defaultStyles.outline\n\n return defaultStyles.filled\n }}\n\n ${focus}\n ${responsiveSize}\n ${responsiveMargin}\n`\n"],"names":["shouldForwardArrowProp","createShouldForwardProp","propKey","includes","template","palette","color","backgroundColor","borderColor","shadowColor","colorHover","backgroundColorHover","borderColorHover","colorActive","backgroundColorActive","borderColorActive","colorDisabled","backgroundColorDisabled","borderColorDisabled","defaultDisabledStyles","COLOR_SCHEMA","onColored","outline","css","props","theme","colors","transparent","tinycolor","darken","toString","default","DEFAULT_STYLES","filled","disabled","white","accent","alto","inverse","Root","styled","button","withConfig","shouldForwardProp","attrs","dynamicSizeDeclaration","size","sizeUnits","fontSize","width","height","displayName","componentId","transform","right","bottom","left","square","preset","schema","focus","responsiveSize","responsiveMargin"],"mappings":"wXASA,MAAMA,uBAAyBC,yBAAyBC,IAC9C,CAAC,SAAU,MAAO,QAAS,SAAU,OAAQ,YAAa,UAAW,WAAWC,SAASD,KAGnG,MAAME,SAAYC,GAA0B,cACjCA,EAAQC,+BACGD,EAAQE,qCACZF,EAAQG,kEAEUH,EAAQI,8CAG/BJ,EAAQK,sCACGL,EAAQM,4CACZN,EAAQO,oDAGfP,EAAQQ,uCACGR,EAAQS,6CACZT,EAAQU,uDAGfV,EAAQW,yCACGX,EAAQY,+CACZZ,EAAQa,8BAI5B,MAAMC,sBAAwB,qKAQ9B,MAAMC,aAAe,CACnBC,UAAW,CACTC,QAASC,IAAG,CAAA,GAAA,KACPC,GACDpB,SAAS,CACPE,MAAOkB,EAAMC,MAAM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
|
+
{"version":3,"file":"style.mjs","sources":["../../../../src/components/Arrow/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport tinycolor from 'tinycolor2'\nimport { responsiveSize } from 'mixins/responsive-size'\nimport { responsiveMargin } from 'mixins/responsive-margin'\nimport { focus } from 'mixins/focus'\nimport { createShouldForwardProp } from 'shared/utils/style'\nimport type { CSSColor } from 'shared/types'\nimport type { StyledArrowProps, ArrowPalette } from './types'\n\nconst shouldForwardArrowProp = createShouldForwardProp((propKey) => {\n return !['square', 'top', 'right', 'bottom', 'left', 'onColored', 'outline', 'inverse'].includes(propKey)\n})\n\nconst template = (palette: ArrowPalette) => `\n color: ${palette.color};\n background-color: ${palette.backgroundColor};\n border-color: ${palette.borderColor};\n &::before {\n box-shadow: inset 0px 4px 0px ${palette.shadowColor};\n }\n &:hover {\n color: ${palette.colorHover};\n background-color: ${palette.backgroundColorHover};\n border-color: ${palette.borderColorHover};\n }\n &:active {\n color: ${palette.colorActive};\n background-color: ${palette.backgroundColorActive};\n border-color: ${palette.borderColorActive};\n }\n &:disabled {\n color: ${palette.colorDisabled};\n background-color: ${palette.backgroundColorDisabled};\n border-color: ${palette.borderColorDisabled};\n }\n`\n\nconst defaultDisabledStyles = `\n -webkit-filter: grayscale(100%);\n -moz-filter: grayscale(100%);\n -ms-filter: grayscale(100%);\n -o-filter: grayscale(100%);\n filter: grayscale(100%);\n`\n\nconst COLOR_SCHEMA = {\n contrast: {\n outline: css<StyledArrowProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-oncolor-primary'],\n backgroundColor: props.theme.colors.transparent,\n borderColor: props.theme.colors['border-oncolor-default'],\n colorHover: props.theme.colors['content-oncolor-constant'],\n backgroundColorHover: props.theme.colors['bg-oncolor-primary'],\n borderColorHover: props.theme.colors.transparent,\n colorActive: props.theme.colors['content-oncolor-constant'],\n backgroundColorActive: tinycolor(props.theme.colors['bg-oncolor-primary']).darken(6).toString() as CSSColor,\n borderColorActive: props.theme.colors.transparent,\n colorDisabled: props.theme.colors['content-oncolor-disabled'],\n backgroundColorDisabled: props.theme.colors.transparent,\n borderColorDisabled: props.theme.colors['border-oncolor-disabled'],\n shadowColor: props.theme.colors['bg-oncolor-hover'],\n ...props.palette,\n })}\n `,\n default: css<StyledArrowProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-oncolor-constant'],\n backgroundColor: props.theme.colors['bg-oncolor-primary'],\n borderColor: props.theme.colors.transparent,\n colorHover: props.theme.colors['content-oncolor-constant'],\n backgroundColorHover: tinycolor(props.theme.colors['bg-oncolor-primary']).darken(6).toString() as CSSColor,\n borderColorHover: props.theme.colors.transparent,\n colorActive: props.theme.colors['content-oncolor-constant'],\n backgroundColorActive: tinycolor(props.theme.colors['bg-oncolor-primary']).darken(8).toString() as CSSColor,\n borderColorActive: props.theme.colors.transparent,\n colorDisabled: props.theme.colors['content-disabled'],\n backgroundColorDisabled: props.theme.colors['bg-oncolor-primary'],\n borderColorDisabled: props.theme.colors.transparent,\n shadowColor: props.theme.colors['bg-oncolor-hover'],\n ...props.palette,\n })}\n `,\n },\n default: {\n outline: css<StyledArrowProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors.transparent,\n borderColor: props.theme.colors['border-onmain-contrast'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: props.theme.colors['bg-onmain-tertiary'],\n borderColorHover: props.theme.colors.transparent,\n colorActive: props.theme.colors['content-oncolor-primary'],\n backgroundColorActive: props.theme.colors['bg-brand-primary-basic-active'],\n borderColorActive: props.theme.colors.transparent,\n colorDisabled: props.theme.colors['content-disabled'],\n backgroundColorDisabled: props.theme.colors.transparent,\n borderColorDisabled: props.theme.colors['border-disabled'],\n shadowColor: props.theme.colors['bg-oncolor-hover'],\n ...props.palette,\n })}\n `,\n default: css<StyledArrowProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['bg-onmain-tertiary'],\n borderColor: props.theme.colors.transparent,\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: tinycolor(props.theme.colors['bg-onmain-tertiary']).darken(4).toString() as CSSColor,\n borderColorHover: props.theme.colors.transparent,\n colorActive: props.theme.colors['content-oncolor-primary'],\n backgroundColorActive: props.theme.colors['bg-brand-primary-basic-active'],\n borderColorActive: props.theme.colors.transparent,\n colorDisabled: props.theme.colors['content-disabled'],\n backgroundColorDisabled: props.theme.colors['bg-disabled-large'],\n borderColorDisabled: props.theme.colors.transparent,\n shadowColor: props.theme.colors['bg-oncolor-hover'],\n ...props.palette,\n })}\n `,\n },\n}\n\nconst DEFAULT_STYLES = {\n filled: css<StyledArrowProps>`\n ${({ theme, disabled }) => `\n background-color: ${theme.colors.white};\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);\n & svg {\n fill: ${theme.colors.accent};\n }\n &:hover {\n background-color: ${theme.colors.accent};\n box-shadow: none;\n svg {\n fill: ${theme.colors.white};\n }\n }\n &:active {\n box-shadow: inset 0 4px 0 rgba(5, 108, 188, 0.5);\n }\n ${disabled ? defaultDisabledStyles : ''}\n `}\n `,\n outline: css<StyledArrowProps>`\n ${({ theme, disabled }) => `\n background-color: transparent;\n box-shadow: inset 0 0 0 2px ${theme.colors.alto};\n & svg {\n fill: ${theme.colors.alto};\n }\n &:hover {\n background-color: ${theme.colors.accent};\n box-shadow: none;\n svg {\n fill: ${theme.colors.white};\n }\n }\n &:active {\n box-shadow: inset 0 4px 0 rgba(5, 108, 188, 0.5);\n }\n ${disabled ? defaultDisabledStyles : ''}\n `}\n `,\n inverse: css<StyledArrowProps>`\n ${({ theme, disabled }) => `\n background-color: transparent;\n box-shadow: inset 0 0 0 2px ${theme.colors.white};\n & svg {\n fill: ${theme.colors.white};\n }\n &:hover {\n background-color: ${theme.colors.white};\n box-shadow: none;\n svg {\n fill: ${theme.colors.accent};\n }\n }\n &:active {\n box-shadow: inset 0 4px 0 #eaecf3;\n }\n ${disabled ? defaultDisabledStyles : ''}\n `}\n `,\n}\n\nexport const Root = styled.button\n .withConfig<StyledArrowProps>({\n shouldForwardProp: shouldForwardArrowProp,\n })\n .attrs<StyledArrowProps>(<Required<Pick<StyledArrowProps, 'dynamicSizeDeclaration'>>>{\n dynamicSizeDeclaration: (size, sizeUnits) => {\n return {\n fontSize: typeof size === 'string' ? size : `${size}${sizeUnits}`,\n width: '1.8em',\n height: '1.8em',\n }\n },\n })`\n ${(props) => {\n let transform = 'rotate(0deg)'\n\n if (props.right) transform = 'rotate(90deg)'\n if (props.bottom) transform = 'rotate(180deg)'\n if (props.left) transform = 'rotate(270deg)'\n\n return `\n box-sizing: border-box;\n position: relative;\n isolation: isolate;\n appearance: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n padding: 0;\n border-radius: ${props.square ? '8px' : '50%'};\n cursor: ${props.disabled ? 'not-allowed' : 'pointer'};\n & svg {\n transform: ${transform};\n transform-origin: center;\n }\n ${\n props.preset === 'brand'\n ? `\n border: 1px solid transparent;\n transition-property: background-color; \n transition-duration: 250ms;\n &::before {\n content: '';\n position: absolute;\n top: -1px;\n left: -1px;\n width: calc(100% + 2px);\n height: calc(100% + 2px);\n border-radius: inherit;\n opacity: 0;\n transition-property: opacity; \n transition-duration: 150ms;\n transition-timing-function: ease-in;\n }\n &:active:not(:disabled)::before {\n opacity: 1;\n }`\n : `\n border: none;\n transition-property: background-color, box-shadow;\n transition-duration: 200ms;`\n }\n `\n }}\n\n ${(props) => {\n if (props.preset === 'brand') {\n const schema = props.contrast || props.onColored ? COLOR_SCHEMA.contrast : COLOR_SCHEMA.default\n\n return props.outline ? schema.outline : schema.default\n }\n\n const defaultStyles = DEFAULT_STYLES\n\n if (props.inverse) return defaultStyles.inverse\n if (props.outline) return defaultStyles.outline\n\n return defaultStyles.filled\n }}\n\n ${focus}\n ${responsiveSize}\n ${responsiveMargin}\n`\n"],"names":["shouldForwardArrowProp","createShouldForwardProp","propKey","includes","template","palette","color","backgroundColor","borderColor","shadowColor","colorHover","backgroundColorHover","borderColorHover","colorActive","backgroundColorActive","borderColorActive","colorDisabled","backgroundColorDisabled","borderColorDisabled","defaultDisabledStyles","COLOR_SCHEMA","contrast","outline","css","props","theme","colors","transparent","tinycolor","darken","toString","default","DEFAULT_STYLES","filled","disabled","white","accent","alto","inverse","Root","styled","button","withConfig","shouldForwardProp","attrs","dynamicSizeDeclaration","size","sizeUnits","fontSize","width","height","displayName","componentId","transform","right","bottom","left","square","preset","schema","onColored","focus","responsiveSize","responsiveMargin"],"mappings":"wXASA,MAAMA,uBAAyBC,yBAAyBC,IAC9C,CAAC,SAAU,MAAO,QAAS,SAAU,OAAQ,YAAa,UAAW,WAAWC,SAASD,KAGnG,MAAME,SAAYC,GAA0B,cACjCA,EAAQC,+BACGD,EAAQE,qCACZF,EAAQG,kEAEUH,EAAQI,8CAG/BJ,EAAQK,sCACGL,EAAQM,4CACZN,EAAQO,oDAGfP,EAAQQ,uCACGR,EAAQS,6CACZT,EAAQU,uDAGfV,EAAQW,yCACGX,EAAQY,+CACZZ,EAAQa,8BAI5B,MAAMC,sBAAwB,qKAQ9B,MAAMC,aAAe,CACnBC,SAAU,CACRC,QAASC,IAAG,CAAA,GAAA,KACPC,GACDpB,SAAS,CACPE,MAAOkB,EAAMC,MAAMC,OAAO,2BAC1BnB,gBAAiBiB,EAAMC,MAAMC,OAAOC,YACpCnB,YAAagB,EAAMC,MAAMC,OAAO,0BAChChB,WAAYc,EAAMC,MAAMC,OAAO,4BAC/Bf,qBAAsBa,EAAMC,MAAMC,OAAO,sBACzCd,iBAAkBY,EAAMC,MAAMC,OAAOC,YACrCd,YAAaW,EAAMC,MAAMC,OAAO,4BAChCZ,sBAAuBc,UAAUJ,EAAMC,MAAMC,OAAO,uBAAuBG,OAAO,GAAGC,WACrFf,kBAAmBS,EAAMC,MAAMC,OAAOC,YACtCX,cAAeQ,EAAMC,MAAMC,OAAO,4BAClCT,wBAAyBO,EAAMC,MAAMC,OAAOC,YAC5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KAAOC,OAAOC,OACxBC,WAA6B,CAC5BC,kBAAmB3C,yBAEpB4C,MAAoF,CACnFC,uBAAwBA,CAACC,EAAMC,KACtB,CACLC,gBAAiBF,GAAS,SAAWA,EAAO,GAAGA,IAAOC,IACtDE,MAAO,QACPC,OAAQ,YAGZR,WAAA,CAAAS,YAAA,cAAAC,YAAA,oBAZgBZ,CAYhB,CAAA,GAAA,IAAA,IAAA,IAAA,IAAA,KACChB,IACD,IAAI6B,EAAY,eAMhB,OAJI7B,EAAM8B,QAAOD,EAAY,iBACzB7B,EAAM+B,SAAQF,EAAY,kBAC1B7B,EAAMgC,OAAMH,EAAY,kBAErB,2QAUY7B,EAAMiC,OAAS,MAAQ,yBAC9BjC,EAAMU,SAAW,cAAgB,iDAE5BmB,yDAIb7B,EAAMkC,SAAW,QACb,kqBAoBA,8IAKP,IAGAlC,IACD,GAAIA,EAAMkC,SAAW,QAAS,CAC5B,MAAMC,EAASnC,EAAMH,UAAYG,EAAMoC,UAAYxC,aAAaC,SAAWD,aAAaW,QAExF,OAAOP,EAAMF,QAAUqC,EAAOrC,QAAUqC,EAAO5B,OACjD,CAIA,OAAIP,EAAMc,QAFYN,eAEkBM,QACpCd,EAAMF,QAHYU,eAGkBV,QAHlBU,eAKDC,MAAM,GAG3B4B,MACAC,eACAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var styled=require('styled-components');var tinycolor=require('../../external/.pnpm/tinycolor2@1.4.2/node_modules/tinycolor2/tinycolor.js');var responsiveProperty=require('../../mixins/responsive-property.js');var color=require('../../mixins/color.js');var style=require('../../shared/utils/style.js');var focus=require('../../mixins/focus.js');var responsiveSize=require('../../mixins/responsive-size.js');var regexp=require('../../shared/regexp.js');var index=require('../../external/.pnpm/@foxford_icon-pack@0.10.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@foxford/icon-pack/icons/LoaderFill/index.js');function _interopDefault(o){return o&&o.__esModule?o:{default:o}}var styled__default=_interopDefault(styled);const shouldForwardButtonProp=style.createShouldForwardProp((o=>!['fluid','width','display','padding','paddingTop','paddingRight','paddingBottom','paddingLeft','fontSize','height','inline','round','success','loading','black','danger','onColored','clear','base','outline','autoRel','noSpacing','primary','secondary','inverted','rounded','basic'].includes(o)),(o=>!(regexp.responsiveFluidPropKeyRegExp.test(o)||regexp.responsiveWidthPropKeyRegExp.test(o)||regexp.responsivePaddingPropKeyRegExp.test(o)||regexp.responsiveFontSizePropKeyRegExp.test(o)||regexp.responsiveHeightPropKeyRegExp.test(o))));const WIDTHS={xl:320,l:280,m:245,s:180,xs:140};const loadingAnimation=styled.keyframes(["0%{background-position:0 0;}100%{background-position:50px 50px;}"]);const spinAnimation=styled.keyframes(["100%{transform:rotate(360deg);}"]);const defaultLoadingStyles=styled.css(["background-image:linear-gradient( -45deg,rgba(255,255,255,0.2) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.2) 50%,rgba(255,255,255,0.2) 75%,transparent 75%,transparent );background-size:25px 25px;animation:"," 2s linear infinite;cursor:progress;"],loadingAnimation);const getWidth=o=>o==='auto'?'auto':typeof o=='number'||typeof o=='boolean'?o:o&&WIDTHS[o]?WIDTHS[o]:'auto';const fluidStyles=()=>styled.css(["min-width:initial;width:100%;"]);const template=o=>`\n color: ${o.color};\n background-color: ${o.backgroundColor};\n border-color: ${o.borderColor};\n &::before {\n box-shadow: inset 0px 4px 0px ${o.shadowColor};\n }\n &:hover {\n color: ${o.colorHover};\n background-color: ${o.backgroundColorHover};\n border-color: ${o.borderColorHover};\n }\n &:active {\n color: ${o.colorActive};\n background-color: ${o.backgroundColorActive};\n border-color: ${o.borderColorActive};\n }\n &:disabled {\n color: ${o.colorDisabled};\n background-color: ${o.backgroundColorDisabled};\n border-color: ${o.borderColorDisabled};\n }\n`;const COLOR_SCHEMA={onColored:{clear:styled.css(["",""],(o=>template({color:o.theme.colors['content-oncolor-primary'],backgroundColor:o.theme.colors.transparent,borderColor:o.theme.colors.transparent,colorHover:o.theme.colors['content-oncolor-primary'],backgroundColorHover:o.theme.colors['bg-oncontrast-hover'],borderColorHover:o.theme.colors.transparent,colorActive:o.theme.colors['content-oncolor-primary'],backgroundColorActive:o.theme.colors['bg-oncontrast-hover'],borderColorActive:o.theme.colors.transparent,colorDisabled:o.loading?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-oncolor-disabled'],backgroundColorDisabled:o.theme.colors.transparent,borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncontrast-hover'],...o.palette}))),base:styled.css(["",""],(o=>template({color:o.success?o.theme.colors['alert-success']:o.theme.colors['content-oncolor-primary'],backgroundColor:o.success?o.theme.colors['bg-oncolor-primary']:o.theme.colors['bg-oncolor-secondary'],borderColor:o.theme.colors.transparent,colorHover:o.success?o.theme.colors['alert-success']:o.theme.colors['content-oncolor-primary'],backgroundColorHover:o.success?tinycolor.default(o.theme.colors['bg-oncolor-primary']).darken(2).toString():tinycolor.default(o.theme.colors['bg-oncolor-secondary']).darken(4).toString(),borderColorHover:o.theme.colors.transparent,colorActive:o.success?o.theme.colors['alert-success']:o.theme.colors['content-oncolor-primary'],backgroundColorActive:o.success?tinycolor.default(o.theme.colors['bg-oncolor-primary']).darken(2).toString():tinycolor.default(o.theme.colors['bg-oncolor-secondary']).darken(4).toString(),borderColorActive:o.theme.colors.transparent,colorDisabled:o.loading?o.theme.colors['content-oncolor-constant']:o.theme.colors['content-oncolor-disabled'],backgroundColorDisabled:o.loading?o.theme.colors['bg-oncolor-primary']:o.theme.colors['bg-oncolor-disabled'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))),outline:styled.css(["",""],(o=>template({color:o.success?o.theme.colors['alert-success']:o.loading?o.theme.colors['content-oncolor-constant']:o.theme.colors['content-oncolor-primary'],backgroundColor:o.success||o.loading?o.theme.colors['bg-oncolor-primary']:o.theme.colors.transparent,borderColor:o.success||o.loading?o.theme.colors.transparent:o.theme.colors['border-oncolor-default'],colorHover:o.success?o.theme.colors['alert-success']:o.theme.colors['content-oncolor-constant'],backgroundColorHover:o.success?tinycolor.default(o.theme.colors['bg-oncolor-primary']).darken(2).toString():o.theme.colors['bg-oncolor-primary'],borderColorHover:o.theme.colors.transparent,colorActive:o.success?o.theme.colors['alert-success']:o.theme.colors['content-oncolor-constant'],backgroundColorActive:o.success?tinycolor.default(o.theme.colors['bg-oncolor-primary']).darken(2).toString():o.theme.colors['bg-oncolor-primary'],borderColorActive:o.theme.colors.transparent,colorDisabled:o.loading?o.theme.colors['content-oncolor-constant']:o.theme.colors['content-oncolor-disabled'],backgroundColorDisabled:o.loading?o.theme.colors['bg-oncolor-primary']:o.theme.colors['bg-oncolor-disabled'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))),default:styled.css(["",""],(o=>template({color:o.success?o.theme.colors['alert-success']:o.theme.colors['content-oncolor-constant'],backgroundColor:o.theme.colors['bg-oncolor-primary'],borderColor:o.theme.colors.transparent,colorHover:o.success?o.theme.colors['alert-success']:o.theme.colors['content-oncolor-constant'],backgroundColorHover:tinycolor.default(o.theme.colors['bg-oncolor-primary']).darken(2).toString(),borderColorHover:o.theme.colors.transparent,colorActive:o.success?o.theme.colors['alert-success']:o.theme.colors['content-oncolor-constant'],backgroundColorActive:tinycolor.default(o.theme.colors['bg-oncolor-primary']).darken(2).toString(),borderColorActive:o.theme.colors.transparent,colorDisabled:o.loading?o.theme.colors['content-oncolor-constant']:o.theme.colors['content-oncolor-disabled'],backgroundColorDisabled:o.loading?o.theme.colors['bg-oncolor-primary']:o.theme.colors['bg-oncolor-disabled'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette})))},danger:{clear:styled.css(["",""],(o=>template({color:o.success?o.theme.colors['alert-success']:o.theme.colors['alert-error'],backgroundColor:o.theme.colors.transparent,borderColor:o.theme.colors.transparent,colorHover:o.success?o.theme.colors['alert-success']:o.theme.colors['alert-error'],backgroundColorHover:o.theme.colors['bg-oncolor-hover'],borderColorHover:o.theme.colors.transparent,colorActive:o.success?o.theme.colors['alert-success']:o.theme.colors['alert-error'],backgroundColorActive:o.theme.colors['bg-oncolor-hover'],borderColorActive:o.theme.colors.transparent,colorDisabled:o.loading?o.theme.colors['alert-error']:o.theme.colors['content-disabled'],backgroundColorDisabled:o.theme.colors.transparent,borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))),base:styled.css(["",""],(o=>template({color:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['alert-error'],backgroundColor:o.success?o.theme.colors['alert-bg-success-500']:o.theme.colors['bg-onmain-tertiary'],borderColor:o.theme.colors.transparent,colorHover:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['alert-error'],backgroundColorHover:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).darken(2).toString():tinycolor.default(o.theme.colors['bg-onmain-tertiary']).darken(2).toString(),borderColorHover:o.theme.colors.transparent,colorActive:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['alert-error'],backgroundColorActive:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).darken(2).toString():tinycolor.default(o.theme.colors['bg-onmain-tertiary']).darken(2).toString(),borderColorActive:o.theme.colors.transparent,colorDisabled:o.loading?o.theme.colors['alert-error']:o.theme.colors['content-disabled'],backgroundColorDisabled:o.loading?o.theme.colors['bg-onmain-tertiary']:o.theme.colors['bg-disabled-large'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))),outline:styled.css(["",""],(o=>template({color:o.success||o.loading?o.theme.colors['content-oncolor-primary']:o.theme.colors['alert-error'],backgroundColor:o.success?o.theme.colors['alert-bg-success-500']:o.loading?o.theme.colors['alert-bg-error-500']:o.theme.colors.transparent,borderColor:o.success||o.loading?o.theme.colors.transparent:o.theme.colors['alert-bg-error-500'],colorHover:o.theme.colors['content-oncolor-primary'],backgroundColorHover:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).darken(2).toString():o.theme.colors['alert-bg-error-500'],borderColorHover:o.theme.colors.transparent,colorActive:o.theme.colors['content-oncolor-primary'],backgroundColorActive:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).darken(2).toString():tinycolor.default(o.theme.colors['alert-bg-error-500']).darken(2).toString(),borderColorActive:o.theme.colors.transparent,colorDisabled:o.loading?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-disabled'],backgroundColorDisabled:o.loading?o.theme.colors['alert-bg-error-500']:o.theme.colors['bg-disabled-large'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))),default:styled.css(["",""],(o=>template({color:o.theme.colors['content-oncolor-primary'],backgroundColor:o.success?o.theme.colors['alert-bg-success-500']:o.theme.colors['alert-bg-error-500'],borderColor:o.theme.colors.transparent,colorHover:o.theme.colors['content-oncolor-primary'],backgroundColorHover:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).darken(2).toString():tinycolor.default(o.theme.colors['alert-bg-error-500']).darken(2).toString(),borderColorHover:o.theme.colors.transparent,colorActive:o.theme.colors['content-oncolor-primary'],backgroundColorActive:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).darken(2).toString():tinycolor.default(o.theme.colors['alert-bg-error-500']).darken(2).toString(),borderColorActive:o.theme.colors.transparent,colorDisabled:o.loading?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-disabled'],backgroundColorDisabled:o.loading?o.theme.colors['alert-bg-error-500']:o.theme.colors['bg-disabled-large'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette})))},black:{clear:styled.css(["",""],(o=>template({color:o.success?o.theme.colors['alert-success']:o.theme.colors['content-oncolor-inverse'],backgroundColor:o.theme.colors.transparent,borderColor:o.theme.colors.transparent,colorHover:o.theme.colors['content-oncolor-inverse'],backgroundColorHover:o.theme.colors['bg-oncolor-hover'],borderColorHover:o.theme.colors.transparent,colorActive:o.theme.colors['content-oncolor-inverse'],backgroundColorActive:o.theme.colors['bg-oncolor-hover'],borderColorActive:o.theme.colors.transparent,colorDisabled:o.theme.colors['content-disabled'],backgroundColorDisabled:o.theme.colors.transparent,borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))),base:styled.css(["",""],(o=>template({color:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-oncolor-inverse'],backgroundColor:o.success?o.theme.colors['alert-bg-success-500']:o.theme.colors['bg-onmain-tertiary'],borderColor:o.theme.colors.transparent,colorHover:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-oncolor-inverse'],backgroundColorHover:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).lighten(4).toString():tinycolor.default(o.theme.colors['bg-onmain-tertiary']).darken(4).toString(),borderColorHover:o.theme.colors.transparent,colorActive:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-oncolor-inverse'],backgroundColorActive:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).lighten(4).toString():tinycolor.default(o.theme.colors['bg-onmain-tertiary']).darken(4).toString(),borderColorActive:o.theme.colors.transparent,colorDisabled:o.theme.colors['content-disabled'],backgroundColorDisabled:o.theme.colors['bg-disabled-large'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))),outline:styled.css(["",""],(o=>template({color:o.success?o.theme.colors['content-oncolor-primary']:o.loading?o.theme.colors['content-onmain-inverse']:o.theme.colors['content-oncolor-inverse'],backgroundColor:o.success?o.theme.colors['alert-bg-success-500']:o.loading?o.theme.colors['bg-onmain-inverse']:o.theme.colors.transparent,borderColor:o.success||o.loading?o.theme.colors.transparent:o.theme.colors['border-onmain-contrast'],colorHover:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-onmain-inverse'],backgroundColorHover:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).lighten(4).toString():o.theme.colors['bg-onmain-inverse'],borderColorHover:o.theme.colors.transparent,colorActive:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-onmain-inverse'],backgroundColorActive:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).lighten(4).toString():tinycolor.default(o.theme.colors['bg-onmain-inverse']).lighten(4).toString(),borderColorActive:o.theme.colors.transparent,colorDisabled:o.theme.colors['content-disabled'],backgroundColorDisabled:o.theme.colors['bg-disabled-large'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))),default:styled.css(["",""],(o=>template({color:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-onmain-inverse'],backgroundColor:o.success?o.theme.colors['alert-bg-success-500']:o.theme.colors['bg-onmain-inverse'],borderColor:o.theme.colors.transparent,colorHover:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-onmain-inverse'],backgroundColorHover:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).lighten(4).toString():tinycolor.default(o.theme.colors['bg-onmain-inverse']).lighten(4).toString(),borderColorHover:o.theme.colors.transparent,colorActive:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-onmain-inverse'],backgroundColorActive:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).lighten(4).toString():tinycolor.default(o.theme.colors['bg-onmain-inverse']).lighten(4).toString(),borderColorActive:o.theme.colors.transparent,colorDisabled:o.theme.colors['content-disabled'],backgroundColorDisabled:o.theme.colors['bg-disabled-large'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette})))},default:{clear:styled.css(["",""],(o=>template({color:o.success?o.theme.colors['alert-success']:o.theme.colors['content-brand-primary'],backgroundColor:o.theme.colors.transparent,borderColor:o.theme.colors.transparent,colorHover:o.success?o.theme.colors['alert-success']:o.theme.colors['content-brand-primary'],backgroundColorHover:o.theme.colors['bg-oncolor-hover'],borderColorHover:o.theme.colors.transparent,colorActive:o.success?o.theme.colors['alert-success']:o.theme.colors['content-brand-primary'],backgroundColorActive:o.theme.colors['bg-oncolor-hover'],borderColorActive:o.theme.colors.transparent,colorDisabled:o.loading?o.theme.colors['content-brand-primary']:o.theme.colors['content-disabled'],backgroundColorDisabled:o.theme.colors.transparent,borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))),base:styled.css(["",""],(o=>template({color:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-brand-primary'],backgroundColor:o.success?o.theme.colors['alert-bg-success-500']:o.theme.colors['bg-onmain-tertiary'],borderColor:o.theme.colors.transparent,colorHover:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-brand-primary'],backgroundColorHover:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).darken(2).toString():tinycolor.default(o.theme.colors['bg-onmain-tertiary']).darken(2).toString(),borderColorHover:o.theme.colors.transparent,colorActive:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-brand-primary'],backgroundColorActive:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).darken(2).toString():tinycolor.default(o.theme.colors['bg-onmain-tertiary']).darken(2).toString(),borderColorActive:o.theme.colors.transparent,colorDisabled:o.loading?o.theme.colors['content-brand-primary']:o.theme.colors['content-disabled'],backgroundColorDisabled:o.loading?o.theme.colors['bg-onmain-tertiary']:o.theme.colors['bg-disabled-large'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))),outline:styled.css(["",""],(o=>template({color:o.success||o.loading?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-brand-primary'],backgroundColor:o.success?o.theme.colors['alert-bg-success-500']:o.loading?o.theme.colors['bg-brand-primary-basic']:o.theme.colors.transparent,borderColor:o.success||o.loading?o.theme.colors.transparent:o.theme.colors['border-brand-primary'],colorHover:o.theme.colors['content-oncolor-primary'],backgroundColorHover:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).darken(2).toString():o.theme.colors['bg-brand-primary-basic'],borderColorHover:o.theme.colors.transparent,colorActive:o.theme.colors['content-oncolor-primary'],backgroundColorActive:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).darken(2).toString():tinycolor.default(o.theme.colors['bg-brand-primary-basic']).darken(2).toString(),borderColorActive:o.theme.colors.transparent,colorDisabled:o.loading?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-disabled'],backgroundColorDisabled:o.loading?o.theme.colors['bg-brand-primary-basic']:o.theme.colors['bg-disabled-large'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))),default:styled.css(["",""],(o=>template({color:o.theme.colors['content-oncolor-primary'],backgroundColor:o.success?o.theme.colors['alert-bg-success-500']:o.theme.colors['bg-brand-primary-basic'],borderColor:o.theme.colors.transparent,colorHover:o.theme.colors['content-oncolor-primary'],backgroundColorHover:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).darken(2).toString():tinycolor.default(o.theme.colors['bg-brand-primary-basic']).darken(2).toString(),borderColorHover:o.theme.colors.transparent,colorActive:o.theme.colors['content-oncolor-primary'],backgroundColorActive:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).darken(2).toString():tinycolor.default(o.theme.colors['bg-brand-primary-basic']).darken(2).toString(),borderColorActive:o.theme.colors.transparent,colorDisabled:o.loading?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-disabled'],backgroundColorDisabled:o.loading?o.theme.colors['bg-brand-primary-basic']:o.theme.colors['bg-disabled-large'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette})))}};const defaultStyles=styled.css([""," "," "," "," "," ",""],(o=>o.disabled||o.loading?'':`\n &:active {\n box-shadow: inset 0 4px 0px 0px rgba(0, 0, 0, 0.14);\n }\n &:hover {\n color: ${o.fontColor};\n background-color: ${tinycolor.default(o.theme.colors[o.color]).saturate(-5).lighten(-8).toString()};\n }\n ${o.inverted||o.basic||o.outline?`\n &:not(:hover) {\n border: 1px solid ${o.theme.colors[o.color]};\n }\n &:hover {\n border: 1px solid ${o.theme.colors[o.color]};\n }\n `:''}\n `),(o=>o.loading?defaultLoadingStyles:''),(o=>{let r='background-color';return(o.inverted||o.basic||o.outline)&&(r='color'),color.color(o.color,r)}),(o=>{let r='color';return(o.inverted||o.basic||o.outline)&&(r='background-color'),color.color(o.fontColor,r)}),(o=>o.disabled?`\n cursor: not-allowed;\n background-color: ${o.theme.colors.mercury};\n color: ${o.theme.colors.silver};\n `:''),(o=>o.basic||o.outline?'background-color: transparent;':''));const Root=styled__default.default.button.withConfig({shouldForwardProp:shouldForwardButtonProp}).attrs((o=>({dynamicSizeDeclaration:(r,e)=>({fontSize:typeof r=='string'?r:`${r}${e}`,height:'2.8em',width:o.round?'2.8em':void 0,paddingRight:o.round?void 0:'1.6em',paddingLeft:o.round?void 0:'1.6em'})}))).withConfig({displayName:"Button__Root",componentId:"ui__sc-16o31r2-0"})([""," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ",""],(o=>{let r=o.inline?'inline-flex':'flex';o.display&&(r=o.display);let e='0px';o.rounded&&(e=o.preset==='brand'?'48px':'5px'),o.round&&(e='50%');let t='pointer';return o.disabled&&(t='not-allowed'),o.loading&&(t='wait'),`\n display: ${r};\n border-radius: ${e};\n cursor: ${t};\n box-sizing: border-box;\n position: relative;\n isolation: isolate;\n justify-content: center;\n align-items: center;\n user-select: none;\n border: none;\n text-decoration: none;\n appearance: none;\n white-space: nowrap;\n text-align: center;\n vertical-align: top;\n ${o.preset==='brand'?"\n border: 1px solid transparent;\n transition-property: background-color; \n transition-duration: 250ms;\n &::before {\n transition-property: opacity; \n transition-duration: 150ms;\n transition-timing-function: ease-in;\n }\n &::before {\n content: '';\n position: absolute;\n top: -1px;\n left: -1px;\n width: calc(100% + 2px);\n height: calc(100% + 2px);\n border-radius: inherit;\n opacity: 0;\n }\n &:active:not(:disabled)::before {\n opacity: 1;\n }":"\n border: none;\n overflow: hidden;\n transition-property: background-color, color;\n transition-duration: 200ms;"}\n `}),(o=>{if(o.preset==='default')return defaultStyles;let r=COLOR_SCHEMA.default;return o.black&&(r=COLOR_SCHEMA.black),o.danger&&(r=COLOR_SCHEMA.danger),o.onColored&&(r=COLOR_SCHEMA.onColored),o.clear?r.clear:o.base?r.base:o.outline?r.outline:r.default}),focus.focus,responsiveSize.responsiveSize,(o=>o.padding?responsiveProperty.property(o.padding,'padding'):null),(o=>o.paddingTop?responsiveProperty.property(o.paddingTop,'padding-top'):null),(o=>o.paddingRight?responsiveProperty.property(o.paddingRight,'padding-right'):null),(o=>o.paddingBottom?responsiveProperty.property(o.paddingBottom,'padding-bottom'):null),(o=>o.paddingLeft?responsiveProperty.property(o.paddingLeft,'padding-left'):null),(o=>o.margin?responsiveProperty.property(o.margin,'margin'):null),(o=>o.marginTop?responsiveProperty.property(o.marginTop,'margin-top'):null),(o=>o.marginRight?responsiveProperty.property(o.marginRight,'margin-right'):null),(o=>o.marginBottom?responsiveProperty.property(o.marginBottom,'margin-bottom'):null),(o=>o.marginLeft?responsiveProperty.property(o.marginLeft,'margin-left'):null),(o=>o.fontSize?responsiveProperty.property(o.fontSize,'font-size'):null),(o=>o.height?responsiveProperty.property(o.height,'height'):null),(o=>{const r=o.fluid&&o.width!=='auto'?'max-width':'width';return o.width?responsiveProperty.property(getWidth(o.width),r):null}),(({paddingXS:o,paddingS:r,paddingM:e,paddingL:t,paddingXL:n})=>responsiveProperty.responsiveNamedProperty({sizes:{paddingXS:o,paddingS:r,paddingM:e,paddingL:t,paddingXL:n},cssProperty:'padding'})),(({paddingTopXS:o,paddingTopS:r,paddingTopM:e,paddingTopL:t,paddingTopXL:n})=>responsiveProperty.responsiveNamedProperty({sizes:{paddingTopXS:o,paddingTopS:r,paddingTopM:e,paddingTopL:t,paddingTopXL:n},cssProperty:'padding-top'})),(({paddingRightXS:o,paddingRightS:r,paddingRightM:e,paddingRightL:t,paddingRightXL:n})=>responsiveProperty.responsiveNamedProperty({sizes:{paddingRightXS:o,paddingRightS:r,paddingRightM:e,paddingRightL:t,paddingRightXL:n},cssProperty:'padding-right'})),(({paddingBottomXS:o,paddingBottomS:r,paddingBottomM:e,paddingBottomL:t,paddingBottomXL:n})=>responsiveProperty.responsiveNamedProperty({sizes:{paddingBottomXS:o,paddingBottomS:r,paddingBottomM:e,paddingBottomL:t,paddingBottomXL:n},cssProperty:'padding-bottom'})),(({paddingLeftXS:o,paddingLeftS:r,paddingLeftM:e,paddingLeftL:t,paddingLeftXL:n})=>responsiveProperty.responsiveNamedProperty({sizes:{paddingLeftXS:o,paddingLeftS:r,paddingLeftM:e,paddingLeftL:t,paddingLeftXL:n},cssProperty:'padding-left'})),(({marginXS:o,marginS:r,marginM:e,marginL:t,marginXL:n})=>responsiveProperty.responsiveNamedProperty({sizes:{marginXS:o,marginS:r,marginM:e,marginL:t,marginXL:n},cssProperty:'margin'})),(({marginTopXS:o,marginTopS:r,marginTopM:e,marginTopL:t,marginTopXL:n})=>responsiveProperty.responsiveNamedProperty({sizes:{marginTopXS:o,marginTopS:r,marginTopM:e,marginTopL:t,marginTopXL:n},cssProperty:'margin-top'})),(({marginRightXS:o,marginRightS:r,marginRightM:e,marginRightL:t,marginRightXL:n})=>responsiveProperty.responsiveNamedProperty({sizes:{marginRightXS:o,marginRightS:r,marginRightM:e,marginRightL:t,marginRightXL:n},cssProperty:'margin-right'})),(({marginBottomXS:o,marginBottomS:r,marginBottomM:e,marginBottomL:t,marginBottomXL:n})=>responsiveProperty.responsiveNamedProperty({sizes:{marginBottomXS:o,marginBottomS:r,marginBottomM:e,marginBottomL:t,marginBottomXL:n},cssProperty:'margin-bottom'})),(({marginLeftXS:o,marginLeftS:r,marginLeftM:e,marginLeftL:t,marginLeftXL:n})=>responsiveProperty.responsiveNamedProperty({sizes:{marginLeftXS:o,marginLeftS:r,marginLeftM:e,marginLeftL:t,marginLeftXL:n},cssProperty:'margin-left'})),(({fontSizeXS:o,fontSizeS:r,fontSizeM:e,fontSizeL:t,fontSizeXL:n})=>responsiveProperty.responsiveNamedProperty({sizes:{fontSizeXS:o,fontSizeS:r,fontSizeM:e,fontSizeL:t,fontSizeXL:n},cssProperty:'font-size'})),(({heightXS:o,heightS:r,heightM:e,heightL:t,heightXL:n})=>responsiveProperty.responsiveNamedProperty({sizes:{heightXS:o,heightS:r,heightM:e,heightL:t,heightXL:n},cssProperty:'height'})),(({widthXS:o,widthS:r,widthM:e,widthL:t,widthXL:n,fluid:s,width:l})=>responsiveProperty.responsiveNamedProperty({sizes:{widthXS:o,widthS:r,widthM:e,widthL:t,widthXL:n},cssProperty:s&&l!=='auto'?'max-width':'width',customSizeHandler:getWidth})),(o=>o.fluid?responsiveProperty.property(o.fluid,fluidStyles):null),(({fluidXS:o,fluidS:r,fluidM:e,fluidL:t,fluidXL:n})=>responsiveProperty.responsiveNamedProperty({sizes:{fluidXS:o,fluidS:r,fluidM:e,fluidL:t,fluidXL:n},cssProperty:fluidStyles})));const LoaderIcon=styled__default.default(index.LoaderFill).withConfig({displayName:"Button__LoaderIcon",componentId:"ui__sc-16o31r2-1"})(["transform-origin:center;animation:"," 1600ms infinite linear;"],spinAnimation);exports.LoaderIcon=LoaderIcon,exports.Root=Root;
|
|
1
|
+
'use strict';var styled=require('styled-components');var tinycolor=require('../../external/.pnpm/tinycolor2@1.4.2/node_modules/tinycolor2/tinycolor.js');var responsiveProperty=require('../../mixins/responsive-property.js');var color=require('../../mixins/color.js');var style=require('../../shared/utils/style.js');var focus=require('../../mixins/focus.js');var responsiveSize=require('../../mixins/responsive-size.js');var regexp=require('../../shared/regexp.js');var index=require('../../external/.pnpm/@foxford_icon-pack@0.10.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@foxford/icon-pack/icons/LoaderFill/index.js');function _interopDefault(o){return o&&o.__esModule?o:{default:o}}var styled__default=_interopDefault(styled);const shouldForwardButtonProp=style.createShouldForwardProp((o=>!['fluid','width','display','padding','paddingTop','paddingRight','paddingBottom','paddingLeft','fontSize','height','inline','round','success','loading','black','danger','onColored','clear','base','outline','autoRel','noSpacing','primary','secondary','inverted','rounded','basic'].includes(o)),(o=>!(regexp.responsiveFluidPropKeyRegExp.test(o)||regexp.responsiveWidthPropKeyRegExp.test(o)||regexp.responsivePaddingPropKeyRegExp.test(o)||regexp.responsiveFontSizePropKeyRegExp.test(o)||regexp.responsiveHeightPropKeyRegExp.test(o))));const WIDTHS={xl:320,l:280,m:245,s:180,xs:140};const loadingAnimation=styled.keyframes(["0%{background-position:0 0;}100%{background-position:50px 50px;}"]);const spinAnimation=styled.keyframes(["100%{transform:rotate(360deg);}"]);const defaultLoadingStyles=styled.css(["background-image:linear-gradient( -45deg,rgba(255,255,255,0.2) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.2) 50%,rgba(255,255,255,0.2) 75%,transparent 75%,transparent );background-size:25px 25px;animation:"," 2s linear infinite;cursor:progress;"],loadingAnimation);const getWidth=o=>o==='auto'?'auto':typeof o=='number'||typeof o=='boolean'?o:o&&WIDTHS[o]?WIDTHS[o]:'auto';const fluidStyles=()=>styled.css(["min-width:initial;width:100%;"]);const template=o=>`\n color: ${o.color};\n background-color: ${o.backgroundColor};\n border-color: ${o.borderColor};\n &::before {\n box-shadow: inset 0px 4px 0px ${o.shadowColor};\n }\n &:hover {\n color: ${o.colorHover};\n background-color: ${o.backgroundColorHover};\n border-color: ${o.borderColorHover};\n }\n &:active {\n color: ${o.colorActive};\n background-color: ${o.backgroundColorActive};\n border-color: ${o.borderColorActive};\n }\n &:disabled {\n color: ${o.colorDisabled};\n background-color: ${o.backgroundColorDisabled};\n border-color: ${o.borderColorDisabled};\n }\n`;const COLOR_SCHEMA={contrast:{clear:styled.css(["",""],(o=>template({color:o.theme.colors['content-oncolor-primary'],backgroundColor:o.theme.colors.transparent,borderColor:o.theme.colors.transparent,colorHover:o.theme.colors['content-oncolor-primary'],backgroundColorHover:o.theme.colors['bg-oncontrast-hover'],borderColorHover:o.theme.colors.transparent,colorActive:o.theme.colors['content-oncolor-primary'],backgroundColorActive:o.theme.colors['bg-oncontrast-hover'],borderColorActive:o.theme.colors.transparent,colorDisabled:o.loading?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-oncolor-disabled'],backgroundColorDisabled:o.theme.colors.transparent,borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncontrast-hover'],...o.palette}))),base:styled.css(["",""],(o=>template({color:o.success?o.theme.colors['alert-success']:o.theme.colors['content-oncolor-primary'],backgroundColor:o.success?o.theme.colors['bg-oncolor-primary']:o.theme.colors['bg-oncolor-secondary'],borderColor:o.theme.colors.transparent,colorHover:o.success?o.theme.colors['alert-success']:o.theme.colors['content-oncolor-primary'],backgroundColorHover:o.success?tinycolor.default(o.theme.colors['bg-oncolor-primary']).darken(2).toString():tinycolor.default(o.theme.colors['bg-oncolor-secondary']).darken(4).toString(),borderColorHover:o.theme.colors.transparent,colorActive:o.success?o.theme.colors['alert-success']:o.theme.colors['content-oncolor-primary'],backgroundColorActive:o.success?tinycolor.default(o.theme.colors['bg-oncolor-primary']).darken(2).toString():tinycolor.default(o.theme.colors['bg-oncolor-secondary']).darken(4).toString(),borderColorActive:o.theme.colors.transparent,colorDisabled:o.loading?o.theme.colors['content-oncolor-constant']:o.theme.colors['content-oncolor-disabled'],backgroundColorDisabled:o.loading?o.theme.colors['bg-oncolor-primary']:o.theme.colors['bg-oncolor-disabled'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))),outline:styled.css(["",""],(o=>template({color:o.success?o.theme.colors['alert-success']:o.loading?o.theme.colors['content-oncolor-constant']:o.theme.colors['content-oncolor-primary'],backgroundColor:o.success||o.loading?o.theme.colors['bg-oncolor-primary']:o.theme.colors.transparent,borderColor:o.success||o.loading?o.theme.colors.transparent:o.theme.colors['border-oncolor-default'],colorHover:o.success?o.theme.colors['alert-success']:o.theme.colors['content-oncolor-constant'],backgroundColorHover:o.success?tinycolor.default(o.theme.colors['bg-oncolor-primary']).darken(2).toString():o.theme.colors['bg-oncolor-primary'],borderColorHover:o.theme.colors.transparent,colorActive:o.success?o.theme.colors['alert-success']:o.theme.colors['content-oncolor-constant'],backgroundColorActive:o.success?tinycolor.default(o.theme.colors['bg-oncolor-primary']).darken(2).toString():o.theme.colors['bg-oncolor-primary'],borderColorActive:o.theme.colors.transparent,colorDisabled:o.loading?o.theme.colors['content-oncolor-constant']:o.theme.colors['content-oncolor-disabled'],backgroundColorDisabled:o.loading?o.theme.colors['bg-oncolor-primary']:o.theme.colors['bg-oncolor-disabled'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))),default:styled.css(["",""],(o=>template({color:o.success?o.theme.colors['alert-success']:o.theme.colors['content-oncolor-constant'],backgroundColor:o.theme.colors['bg-oncolor-primary'],borderColor:o.theme.colors.transparent,colorHover:o.success?o.theme.colors['alert-success']:o.theme.colors['content-oncolor-constant'],backgroundColorHover:tinycolor.default(o.theme.colors['bg-oncolor-primary']).darken(2).toString(),borderColorHover:o.theme.colors.transparent,colorActive:o.success?o.theme.colors['alert-success']:o.theme.colors['content-oncolor-constant'],backgroundColorActive:tinycolor.default(o.theme.colors['bg-oncolor-primary']).darken(2).toString(),borderColorActive:o.theme.colors.transparent,colorDisabled:o.loading?o.theme.colors['content-oncolor-constant']:o.theme.colors['content-oncolor-disabled'],backgroundColorDisabled:o.loading?o.theme.colors['bg-oncolor-primary']:o.theme.colors['bg-oncolor-disabled'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette})))},danger:{clear:styled.css(["",""],(o=>template({color:o.success?o.theme.colors['alert-success']:o.theme.colors['alert-error'],backgroundColor:o.theme.colors.transparent,borderColor:o.theme.colors.transparent,colorHover:o.success?o.theme.colors['alert-success']:o.theme.colors['alert-error'],backgroundColorHover:o.theme.colors['bg-oncolor-hover'],borderColorHover:o.theme.colors.transparent,colorActive:o.success?o.theme.colors['alert-success']:o.theme.colors['alert-error'],backgroundColorActive:o.theme.colors['bg-oncolor-hover'],borderColorActive:o.theme.colors.transparent,colorDisabled:o.loading?o.theme.colors['alert-error']:o.theme.colors['content-disabled'],backgroundColorDisabled:o.theme.colors.transparent,borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))),base:styled.css(["",""],(o=>template({color:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['alert-error'],backgroundColor:o.success?o.theme.colors['alert-bg-success-500']:o.theme.colors['bg-onmain-tertiary'],borderColor:o.theme.colors.transparent,colorHover:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['alert-error'],backgroundColorHover:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).darken(2).toString():tinycolor.default(o.theme.colors['bg-onmain-tertiary']).darken(2).toString(),borderColorHover:o.theme.colors.transparent,colorActive:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['alert-error'],backgroundColorActive:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).darken(2).toString():tinycolor.default(o.theme.colors['bg-onmain-tertiary']).darken(2).toString(),borderColorActive:o.theme.colors.transparent,colorDisabled:o.loading?o.theme.colors['alert-error']:o.theme.colors['content-disabled'],backgroundColorDisabled:o.loading?o.theme.colors['bg-onmain-tertiary']:o.theme.colors['bg-disabled-large'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))),outline:styled.css(["",""],(o=>template({color:o.success||o.loading?o.theme.colors['content-oncolor-primary']:o.theme.colors['alert-error'],backgroundColor:o.success?o.theme.colors['alert-bg-success-500']:o.loading?o.theme.colors['alert-bg-error-500']:o.theme.colors.transparent,borderColor:o.success||o.loading?o.theme.colors.transparent:o.theme.colors['alert-bg-error-500'],colorHover:o.theme.colors['content-oncolor-primary'],backgroundColorHover:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).darken(2).toString():o.theme.colors['alert-bg-error-500'],borderColorHover:o.theme.colors.transparent,colorActive:o.theme.colors['content-oncolor-primary'],backgroundColorActive:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).darken(2).toString():tinycolor.default(o.theme.colors['alert-bg-error-500']).darken(2).toString(),borderColorActive:o.theme.colors.transparent,colorDisabled:o.loading?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-disabled'],backgroundColorDisabled:o.loading?o.theme.colors['alert-bg-error-500']:o.theme.colors['bg-disabled-large'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))),default:styled.css(["",""],(o=>template({color:o.theme.colors['content-oncolor-primary'],backgroundColor:o.success?o.theme.colors['alert-bg-success-500']:o.theme.colors['alert-bg-error-500'],borderColor:o.theme.colors.transparent,colorHover:o.theme.colors['content-oncolor-primary'],backgroundColorHover:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).darken(2).toString():tinycolor.default(o.theme.colors['alert-bg-error-500']).darken(2).toString(),borderColorHover:o.theme.colors.transparent,colorActive:o.theme.colors['content-oncolor-primary'],backgroundColorActive:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).darken(2).toString():tinycolor.default(o.theme.colors['alert-bg-error-500']).darken(2).toString(),borderColorActive:o.theme.colors.transparent,colorDisabled:o.loading?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-disabled'],backgroundColorDisabled:o.loading?o.theme.colors['alert-bg-error-500']:o.theme.colors['bg-disabled-large'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette})))},black:{clear:styled.css(["",""],(o=>template({color:o.success?o.theme.colors['alert-success']:o.theme.colors['content-oncolor-inverse'],backgroundColor:o.theme.colors.transparent,borderColor:o.theme.colors.transparent,colorHover:o.theme.colors['content-oncolor-inverse'],backgroundColorHover:o.theme.colors['bg-oncolor-hover'],borderColorHover:o.theme.colors.transparent,colorActive:o.theme.colors['content-oncolor-inverse'],backgroundColorActive:o.theme.colors['bg-oncolor-hover'],borderColorActive:o.theme.colors.transparent,colorDisabled:o.theme.colors['content-disabled'],backgroundColorDisabled:o.theme.colors.transparent,borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))),base:styled.css(["",""],(o=>template({color:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-oncolor-inverse'],backgroundColor:o.success?o.theme.colors['alert-bg-success-500']:o.theme.colors['bg-onmain-tertiary'],borderColor:o.theme.colors.transparent,colorHover:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-oncolor-inverse'],backgroundColorHover:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).lighten(4).toString():tinycolor.default(o.theme.colors['bg-onmain-tertiary']).darken(4).toString(),borderColorHover:o.theme.colors.transparent,colorActive:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-oncolor-inverse'],backgroundColorActive:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).lighten(4).toString():tinycolor.default(o.theme.colors['bg-onmain-tertiary']).darken(4).toString(),borderColorActive:o.theme.colors.transparent,colorDisabled:o.theme.colors['content-disabled'],backgroundColorDisabled:o.theme.colors['bg-disabled-large'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))),outline:styled.css(["",""],(o=>template({color:o.success?o.theme.colors['content-oncolor-primary']:o.loading?o.theme.colors['content-onmain-inverse']:o.theme.colors['content-oncolor-inverse'],backgroundColor:o.success?o.theme.colors['alert-bg-success-500']:o.loading?o.theme.colors['bg-onmain-inverse']:o.theme.colors.transparent,borderColor:o.success||o.loading?o.theme.colors.transparent:o.theme.colors['border-onmain-contrast'],colorHover:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-onmain-inverse'],backgroundColorHover:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).lighten(4).toString():o.theme.colors['bg-onmain-inverse'],borderColorHover:o.theme.colors.transparent,colorActive:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-onmain-inverse'],backgroundColorActive:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).lighten(4).toString():tinycolor.default(o.theme.colors['bg-onmain-inverse']).lighten(4).toString(),borderColorActive:o.theme.colors.transparent,colorDisabled:o.theme.colors['content-disabled'],backgroundColorDisabled:o.theme.colors['bg-disabled-large'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))),default:styled.css(["",""],(o=>template({color:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-onmain-inverse'],backgroundColor:o.success?o.theme.colors['alert-bg-success-500']:o.theme.colors['bg-onmain-inverse'],borderColor:o.theme.colors.transparent,colorHover:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-onmain-inverse'],backgroundColorHover:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).lighten(4).toString():tinycolor.default(o.theme.colors['bg-onmain-inverse']).lighten(4).toString(),borderColorHover:o.theme.colors.transparent,colorActive:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-onmain-inverse'],backgroundColorActive:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).lighten(4).toString():tinycolor.default(o.theme.colors['bg-onmain-inverse']).lighten(4).toString(),borderColorActive:o.theme.colors.transparent,colorDisabled:o.theme.colors['content-disabled'],backgroundColorDisabled:o.theme.colors['bg-disabled-large'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette})))},default:{clear:styled.css(["",""],(o=>template({color:o.success?o.theme.colors['alert-success']:o.theme.colors['content-brand-primary'],backgroundColor:o.theme.colors.transparent,borderColor:o.theme.colors.transparent,colorHover:o.success?o.theme.colors['alert-success']:o.theme.colors['content-brand-primary'],backgroundColorHover:o.theme.colors['bg-oncolor-hover'],borderColorHover:o.theme.colors.transparent,colorActive:o.success?o.theme.colors['alert-success']:o.theme.colors['content-brand-primary'],backgroundColorActive:o.theme.colors['bg-oncolor-hover'],borderColorActive:o.theme.colors.transparent,colorDisabled:o.loading?o.theme.colors['content-brand-primary']:o.theme.colors['content-disabled'],backgroundColorDisabled:o.theme.colors.transparent,borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))),base:styled.css(["",""],(o=>template({color:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-brand-primary'],backgroundColor:o.success?o.theme.colors['alert-bg-success-500']:o.theme.colors['bg-onmain-tertiary'],borderColor:o.theme.colors.transparent,colorHover:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-brand-primary'],backgroundColorHover:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).darken(2).toString():tinycolor.default(o.theme.colors['bg-onmain-tertiary']).darken(2).toString(),borderColorHover:o.theme.colors.transparent,colorActive:o.success?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-brand-primary'],backgroundColorActive:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).darken(2).toString():tinycolor.default(o.theme.colors['bg-onmain-tertiary']).darken(2).toString(),borderColorActive:o.theme.colors.transparent,colorDisabled:o.loading?o.theme.colors['content-brand-primary']:o.theme.colors['content-disabled'],backgroundColorDisabled:o.loading?o.theme.colors['bg-onmain-tertiary']:o.theme.colors['bg-disabled-large'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))),outline:styled.css(["",""],(o=>template({color:o.success||o.loading?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-brand-primary'],backgroundColor:o.success?o.theme.colors['alert-bg-success-500']:o.loading?o.theme.colors['bg-brand-primary-basic']:o.theme.colors.transparent,borderColor:o.success||o.loading?o.theme.colors.transparent:o.theme.colors['border-brand-primary'],colorHover:o.theme.colors['content-oncolor-primary'],backgroundColorHover:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).darken(2).toString():o.theme.colors['bg-brand-primary-basic'],borderColorHover:o.theme.colors.transparent,colorActive:o.theme.colors['content-oncolor-primary'],backgroundColorActive:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).darken(2).toString():tinycolor.default(o.theme.colors['bg-brand-primary-basic']).darken(2).toString(),borderColorActive:o.theme.colors.transparent,colorDisabled:o.loading?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-disabled'],backgroundColorDisabled:o.loading?o.theme.colors['bg-brand-primary-basic']:o.theme.colors['bg-disabled-large'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))),default:styled.css(["",""],(o=>template({color:o.theme.colors['content-oncolor-primary'],backgroundColor:o.success?o.theme.colors['alert-bg-success-500']:o.theme.colors['bg-brand-primary-basic'],borderColor:o.theme.colors.transparent,colorHover:o.theme.colors['content-oncolor-primary'],backgroundColorHover:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).darken(2).toString():tinycolor.default(o.theme.colors['bg-brand-primary-basic']).darken(2).toString(),borderColorHover:o.theme.colors.transparent,colorActive:o.theme.colors['content-oncolor-primary'],backgroundColorActive:o.success?tinycolor.default(o.theme.colors['alert-bg-success-500']).darken(2).toString():tinycolor.default(o.theme.colors['bg-brand-primary-basic']).darken(2).toString(),borderColorActive:o.theme.colors.transparent,colorDisabled:o.loading?o.theme.colors['content-oncolor-primary']:o.theme.colors['content-disabled'],backgroundColorDisabled:o.loading?o.theme.colors['bg-brand-primary-basic']:o.theme.colors['bg-disabled-large'],borderColorDisabled:o.theme.colors.transparent,shadowColor:o.theme.colors['bg-oncolor-hover'],...o.palette})))}};const defaultStyles=styled.css([""," "," "," "," "," ",""],(o=>o.disabled||o.loading?'':`\n &:active {\n box-shadow: inset 0 4px 0px 0px rgba(0, 0, 0, 0.14);\n }\n &:hover {\n color: ${o.fontColor};\n background-color: ${tinycolor.default(o.theme.colors[o.color]).saturate(-5).lighten(-8).toString()};\n }\n ${o.inverted||o.basic||o.outline?`\n &:not(:hover) {\n border: 1px solid ${o.theme.colors[o.color]};\n }\n &:hover {\n border: 1px solid ${o.theme.colors[o.color]};\n }\n `:''}\n `),(o=>o.loading?defaultLoadingStyles:''),(o=>{let r='background-color';return(o.inverted||o.basic||o.outline)&&(r='color'),color.color(o.color,r)}),(o=>{let r='color';return(o.inverted||o.basic||o.outline)&&(r='background-color'),color.color(o.fontColor,r)}),(o=>o.disabled?`\n cursor: not-allowed;\n background-color: ${o.theme.colors.mercury};\n color: ${o.theme.colors.silver};\n `:''),(o=>o.basic||o.outline?'background-color: transparent;':''));const Root=styled__default.default.button.withConfig({shouldForwardProp:shouldForwardButtonProp}).attrs((o=>({dynamicSizeDeclaration:(r,e)=>({fontSize:typeof r=='string'?r:`${r}${e}`,height:'2.8em',width:o.round?'2.8em':void 0,paddingRight:o.round?void 0:'1.6em',paddingLeft:o.round?void 0:'1.6em'})}))).withConfig({displayName:"Button__Root",componentId:"ui__sc-16o31r2-0"})([""," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ",""],(o=>{let r=o.inline?'inline-flex':'flex';o.display&&(r=o.display);let e='0px';o.rounded&&(e=o.preset==='brand'?'48px':'5px'),o.round&&(e='50%');let t='pointer';return o.disabled&&(t='not-allowed'),o.loading&&(t='wait'),`\n display: ${r};\n border-radius: ${e};\n cursor: ${t};\n box-sizing: border-box;\n position: relative;\n isolation: isolate;\n justify-content: center;\n align-items: center;\n user-select: none;\n border: none;\n text-decoration: none;\n appearance: none;\n white-space: nowrap;\n text-align: center;\n vertical-align: top;\n ${o.preset==='brand'?"\n border: 1px solid transparent;\n transition-property: background-color; \n transition-duration: 250ms;\n &::before {\n transition-property: opacity; \n transition-duration: 150ms;\n transition-timing-function: ease-in;\n }\n &::before {\n content: '';\n position: absolute;\n top: -1px;\n left: -1px;\n width: calc(100% + 2px);\n height: calc(100% + 2px);\n border-radius: inherit;\n opacity: 0;\n }\n &:active:not(:disabled)::before {\n opacity: 1;\n }":"\n border: none;\n overflow: hidden;\n transition-property: background-color, color;\n transition-duration: 200ms;"}\n `}),(o=>{if(o.preset==='default')return defaultStyles;let r=COLOR_SCHEMA.default;return o.black&&(r=COLOR_SCHEMA.black),o.danger&&(r=COLOR_SCHEMA.danger),(o.contrast||o.onColored)&&(r=COLOR_SCHEMA.contrast),o.clear?r.clear:o.base?r.base:o.outline?r.outline:r.default}),focus.focus,responsiveSize.responsiveSize,(o=>o.padding?responsiveProperty.property(o.padding,'padding'):null),(o=>o.paddingTop?responsiveProperty.property(o.paddingTop,'padding-top'):null),(o=>o.paddingRight?responsiveProperty.property(o.paddingRight,'padding-right'):null),(o=>o.paddingBottom?responsiveProperty.property(o.paddingBottom,'padding-bottom'):null),(o=>o.paddingLeft?responsiveProperty.property(o.paddingLeft,'padding-left'):null),(o=>o.margin?responsiveProperty.property(o.margin,'margin'):null),(o=>o.marginTop?responsiveProperty.property(o.marginTop,'margin-top'):null),(o=>o.marginRight?responsiveProperty.property(o.marginRight,'margin-right'):null),(o=>o.marginBottom?responsiveProperty.property(o.marginBottom,'margin-bottom'):null),(o=>o.marginLeft?responsiveProperty.property(o.marginLeft,'margin-left'):null),(o=>o.fontSize?responsiveProperty.property(o.fontSize,'font-size'):null),(o=>o.height?responsiveProperty.property(o.height,'height'):null),(o=>{const r=o.fluid&&o.width!=='auto'?'max-width':'width';return o.width?responsiveProperty.property(getWidth(o.width),r):null}),(({paddingXS:o,paddingS:r,paddingM:e,paddingL:t,paddingXL:n})=>responsiveProperty.responsiveNamedProperty({sizes:{paddingXS:o,paddingS:r,paddingM:e,paddingL:t,paddingXL:n},cssProperty:'padding'})),(({paddingTopXS:o,paddingTopS:r,paddingTopM:e,paddingTopL:t,paddingTopXL:n})=>responsiveProperty.responsiveNamedProperty({sizes:{paddingTopXS:o,paddingTopS:r,paddingTopM:e,paddingTopL:t,paddingTopXL:n},cssProperty:'padding-top'})),(({paddingRightXS:o,paddingRightS:r,paddingRightM:e,paddingRightL:t,paddingRightXL:n})=>responsiveProperty.responsiveNamedProperty({sizes:{paddingRightXS:o,paddingRightS:r,paddingRightM:e,paddingRightL:t,paddingRightXL:n},cssProperty:'padding-right'})),(({paddingBottomXS:o,paddingBottomS:r,paddingBottomM:e,paddingBottomL:t,paddingBottomXL:n})=>responsiveProperty.responsiveNamedProperty({sizes:{paddingBottomXS:o,paddingBottomS:r,paddingBottomM:e,paddingBottomL:t,paddingBottomXL:n},cssProperty:'padding-bottom'})),(({paddingLeftXS:o,paddingLeftS:r,paddingLeftM:e,paddingLeftL:t,paddingLeftXL:n})=>responsiveProperty.responsiveNamedProperty({sizes:{paddingLeftXS:o,paddingLeftS:r,paddingLeftM:e,paddingLeftL:t,paddingLeftXL:n},cssProperty:'padding-left'})),(({marginXS:o,marginS:r,marginM:e,marginL:t,marginXL:n})=>responsiveProperty.responsiveNamedProperty({sizes:{marginXS:o,marginS:r,marginM:e,marginL:t,marginXL:n},cssProperty:'margin'})),(({marginTopXS:o,marginTopS:r,marginTopM:e,marginTopL:t,marginTopXL:n})=>responsiveProperty.responsiveNamedProperty({sizes:{marginTopXS:o,marginTopS:r,marginTopM:e,marginTopL:t,marginTopXL:n},cssProperty:'margin-top'})),(({marginRightXS:o,marginRightS:r,marginRightM:e,marginRightL:t,marginRightXL:n})=>responsiveProperty.responsiveNamedProperty({sizes:{marginRightXS:o,marginRightS:r,marginRightM:e,marginRightL:t,marginRightXL:n},cssProperty:'margin-right'})),(({marginBottomXS:o,marginBottomS:r,marginBottomM:e,marginBottomL:t,marginBottomXL:n})=>responsiveProperty.responsiveNamedProperty({sizes:{marginBottomXS:o,marginBottomS:r,marginBottomM:e,marginBottomL:t,marginBottomXL:n},cssProperty:'margin-bottom'})),(({marginLeftXS:o,marginLeftS:r,marginLeftM:e,marginLeftL:t,marginLeftXL:n})=>responsiveProperty.responsiveNamedProperty({sizes:{marginLeftXS:o,marginLeftS:r,marginLeftM:e,marginLeftL:t,marginLeftXL:n},cssProperty:'margin-left'})),(({fontSizeXS:o,fontSizeS:r,fontSizeM:e,fontSizeL:t,fontSizeXL:n})=>responsiveProperty.responsiveNamedProperty({sizes:{fontSizeXS:o,fontSizeS:r,fontSizeM:e,fontSizeL:t,fontSizeXL:n},cssProperty:'font-size'})),(({heightXS:o,heightS:r,heightM:e,heightL:t,heightXL:n})=>responsiveProperty.responsiveNamedProperty({sizes:{heightXS:o,heightS:r,heightM:e,heightL:t,heightXL:n},cssProperty:'height'})),(({widthXS:o,widthS:r,widthM:e,widthL:t,widthXL:n,fluid:s,width:l})=>responsiveProperty.responsiveNamedProperty({sizes:{widthXS:o,widthS:r,widthM:e,widthL:t,widthXL:n},cssProperty:s&&l!=='auto'?'max-width':'width',customSizeHandler:getWidth})),(o=>o.fluid?responsiveProperty.property(o.fluid,fluidStyles):null),(({fluidXS:o,fluidS:r,fluidM:e,fluidL:t,fluidXL:n})=>responsiveProperty.responsiveNamedProperty({sizes:{fluidXS:o,fluidS:r,fluidM:e,fluidL:t,fluidXL:n},cssProperty:fluidStyles})));const LoaderIcon=styled__default.default(index.LoaderFill).withConfig({displayName:"Button__LoaderIcon",componentId:"ui__sc-16o31r2-1"})(["transform-origin:center;animation:"," 1600ms infinite linear;"],spinAnimation);exports.LoaderIcon=LoaderIcon,exports.Root=Root;
|
|
2
2
|
//# sourceMappingURL=style.js.map
|