@redsift/design-system 11.9.4 → 12.0.0-muiv6
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/CONTRIBUTING.md +1 -5
- package/_internal/Alert2.js +9 -4
- package/_internal/Alert2.js.map +1 -1
- package/_internal/AppContent.js +9 -4
- package/_internal/AppContent.js.map +1 -1
- package/_internal/Badge2.js +9 -4
- package/_internal/Badge2.js.map +1 -1
- package/_internal/Breadcrumbs2.js +9 -4
- package/_internal/Breadcrumbs2.js.map +1 -1
- package/_internal/Button2.js +9 -4
- package/_internal/Button2.js.map +1 -1
- package/_internal/ButtonGroup.js +15 -6
- package/_internal/ButtonGroup.js.map +1 -1
- package/_internal/ButtonLink.js +1 -1
- package/_internal/Card2.js +9 -4
- package/_internal/Card2.js.map +1 -1
- package/_internal/CardActions.js +16 -12
- package/_internal/CardActions.js.map +1 -1
- package/_internal/CardBody.js +9 -4
- package/_internal/CardBody.js.map +1 -1
- package/_internal/CardHeader.js +13 -4
- package/_internal/CardHeader.js.map +1 -1
- package/_internal/Checkbox2.js +9 -4
- package/_internal/Checkbox2.js.map +1 -1
- package/_internal/CheckboxGroup.js +9 -4
- package/_internal/CheckboxGroup.js.map +1 -1
- package/_internal/DetailedCard.js +24 -12
- package/_internal/DetailedCard.js.map +1 -1
- package/_internal/Flexbox2.js +21 -16
- package/_internal/Flexbox2.js.map +1 -1
- package/_internal/Grid2.js +21 -16
- package/_internal/Grid2.js.map +1 -1
- package/_internal/GridItem.js +9 -4
- package/_internal/GridItem.js.map +1 -1
- package/_internal/Heading2.js +9 -4
- package/_internal/Heading2.js.map +1 -1
- package/_internal/Icon2.js +10 -5
- package/_internal/Icon2.js.map +1 -1
- package/_internal/IconButton.js +9 -4
- package/_internal/IconButton.js.map +1 -1
- package/_internal/IconButtonLink.js +1 -1
- package/_internal/Item2.js +16 -7
- package/_internal/Item2.js.map +1 -1
- package/_internal/Link2.js +9 -4
- package/_internal/Link2.js.map +1 -1
- package/_internal/LinkButton.js +2 -1
- package/_internal/LinkButton.js.map +1 -1
- package/_internal/Listbox2.js +14 -8
- package/_internal/Listbox2.js.map +1 -1
- package/_internal/Number2.js +10 -5
- package/_internal/Number2.js.map +1 -1
- package/_internal/NumberField.js +11 -6
- package/_internal/NumberField.js.map +1 -1
- package/_internal/Pill2.js +9 -4
- package/_internal/Pill2.js.map +1 -1
- package/_internal/ProgressBar.js +20 -11
- package/_internal/ProgressBar.js.map +1 -1
- package/_internal/Radio2.js +9 -4
- package/_internal/Radio2.js.map +1 -1
- package/_internal/RadioGroup.js +9 -4
- package/_internal/RadioGroup.js.map +1 -1
- package/_internal/Shield2.js +12 -7
- package/_internal/Shield2.js.map +1 -1
- package/_internal/SideNavigationMenu.js +1 -1
- package/_internal/Skeleton2.js +9 -4
- package/_internal/Skeleton2.js.map +1 -1
- package/_internal/SkeletonCircle.js +1 -1
- package/_internal/SkeletonText.js +1 -1
- package/_internal/Spinner2.js +9 -4
- package/_internal/Spinner2.js.map +1 -1
- package/_internal/Switch2.js +9 -4
- package/_internal/Switch2.js.map +1 -1
- package/_internal/SwitchGroup.js +9 -4
- package/_internal/SwitchGroup.js.map +1 -1
- package/_internal/Text2.js +13 -6
- package/_internal/Text2.js.map +1 -1
- package/_internal/TextArea.js +18 -12
- package/_internal/TextArea.js.map +1 -1
- package/_internal/TextField.js +12 -6
- package/_internal/TextField.js.map +1 -1
- package/_internal/_rollupPluginBabelHelpers.js +1 -1
- package/_internal/button.js +1 -1
- package/_internal/colors.js +1 -1
- package/_internal/icon-button.js +1 -1
- package/_internal/link.js +1 -1
- package/_internal/shared.js +1 -1
- package/_internal/styles.js +309 -217
- package/_internal/styles.js.map +1 -1
- package/_internal/styles2.js +202 -14
- package/_internal/styles2.js.map +1 -1
- package/_internal/styles3.js +30 -128
- package/_internal/styles3.js.map +1 -1
- package/_internal/styles4.js +129 -234
- package/_internal/styles4.js.map +1 -1
- package/_internal/styles5.js +227 -118
- package/_internal/styles5.js.map +1 -1
- package/_internal/styles6.js +128 -69
- package/_internal/styles6.js.map +1 -1
- package/_internal/styles7.js +84 -0
- package/_internal/styles7.js.map +1 -0
- package/_internal/text.js +1 -1
- package/_internal/types2.js.map +1 -1
- package/_internal/useFocusOnList.js +1 -1
- package/_internal/useFocusRing.js +1 -1
- package/_internal/useListboxItem.js.map +1 -1
- package/_internal/useLocalizedStringFormatter.js +1 -1
- package/_internal/useMessageFormatter.js +1 -1
- package/_internal/useNumberFormatter.js +1 -1
- package/index.d.ts +227 -136
- package/index.js +8 -164
- package/index.js.map +1 -1
- package/package.json +5 -6
package/_internal/styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../src/components/button/types.ts","../../src/components/button/styles.ts"],"sourcesContent":["import { ComponentProps } from 'react';\nimport { ButtonsColorPalette, StylingProps, Theme, ValueOf } from '../../types';\nimport { IconProps } from '../icon';\n\n/**\n * Component variant.\n */\nexport const ButtonVariant = {\n primary: 'primary',\n secondary: 'secondary',\n unstyled: 'unstyled',\n} as const;\nexport type ButtonVariant = ValueOf<typeof ButtonVariant>;\n\n/**\n * Component color.\n */\nexport type ButtonColor = ButtonsColorPalette;\n\n/**\n * Component props.\n */\nexport interface ButtonProps extends ComponentProps<'button'>, StylingProps {\n /** Color variant. */\n color?: ButtonColor;\n /** Whether the component take the full width or not. */\n fullWidth?: boolean;\n /** Whether the component is active or not. */\n isActive?: boolean;\n /** Whether the component is disabled or not. */\n isDisabled?: boolean;\n /** Whether the component is hovered or not. */\n isHovered?: boolean;\n /** Whether the component is in a loading state or not. */\n isLoading?: boolean;\n /**\n * Can be a string or an array of strings containing `d` property of the `path` SVG element.<br />\n * Can also be a ReactElement.\n */\n leftIcon?: IconProps['icon'];\n /** Props to add to the left icon. */\n leftIconProps?: Omit<IconProps, 'icon' | 'ref'>;\n /**\n * Can be a string or an array of strings containing `d` property of the `path` SVG element.<br />\n * Can also be a ReactElement.\n */\n rightIcon?: IconProps['icon'];\n /** Props to add to the right icon. */\n rightIconProps?: Omit<IconProps, 'icon' | 'ref'>;\n /** Theme. */\n theme?: Theme;\n /** Button variant. */\n variant?: ButtonVariant;\n}\n\nexport type StyledButtonProps = ButtonProps & {\n $color: ButtonProps['color'];\n $fullWidth?: ButtonProps['fullWidth'];\n $isActive: ButtonProps['isActive'];\n $isDisabled: ButtonProps['isDisabled'];\n $isGradient: boolean;\n $isHovered: ButtonProps['isHovered'];\n $isLoading: ButtonProps['isLoading'];\n $theme: ButtonProps['theme'];\n $variant: ButtonProps['variant'];\n};\n","import styled, { css } from 'styled-components';\nimport { baseStyling, focusRing } from '../shared';\nimport { StyledButtonProps, ButtonVariant } from './types';\n\n/**\n * Component style.\n */\nexport const StyledButton = styled.button<StyledButtonProps>`\n align-items: center;\n background: none;\n border: none;\n border-radius: 4px;\n display: inline-flex;\n font-family: var(--redsift-typography-button-font-family);\n font-size: var(--redsift-typography-button-font-size);\n font-weight: var(--redsift-typography-button-font-weight);\n gap: 8px;\n height: fit-content;\n justify-content: center;\n line-height: var(--redsift-typography-button-line-height);\n text-decoration: none;\n text-transform: var(--redsift-typography-button-text-transform);\n vertical-align: middle;\n -webkit-font-smoothing: antialiased;\n ${baseStyling}\n\n ${({ $isLoading }) =>\n $isLoading\n ? css`\n & > span {\n opacity: 0;\n }\n\n & > .redsift-shield {\n position: absolute;\n }\n `\n : ''}\n\n ${({ $variant, $color, $isActive, $isDisabled, $isGradient, $isHovered, $theme }) => css`\n padding: ${$variant !== ButtonVariant.secondary ||\n ($variant === ButtonVariant.secondary && $isGradient && !$isDisabled)\n ? '9px 16px'\n : '8px 15px'};\n\n ${!$isGradient\n ? css`\n background-color: var(\n --redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-background-${$isDisabled\n ? 'disabled'\n : $isActive\n ? 'active'\n : $isHovered\n ? 'hover'\n : 'default'}\n );\n &,\n .redsift-icon:not(.colored) {\n color: var(\n --redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-text-${$isDisabled\n ? 'disabled'\n : $isActive\n ? 'active'\n : $isHovered\n ? 'hover'\n : 'default'}\n );\n }\n `\n : css`\n background: var(\n --redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-background-${$isDisabled\n ? 'disabled'\n : $isActive\n ? 'active'\n : $isHovered\n ? 'hover'\n : 'default'}\n );\n\n ${$variant === ButtonVariant.primary || $isDisabled\n ? css`\n &,\n .redsift-icon:not(.colored) {\n color: var(\n --redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-text-${$isDisabled\n ? 'disabled'\n : $isActive\n ? 'active'\n : $isHovered\n ? 'hover'\n : 'default'}\n );\n }\n `\n : ''}\n\n ${$variant !== ButtonVariant.primary && !$isDisabled\n ? css`\n path {\n fill: url(#${$color}-gradient-${$isActive ? 'active' : $isHovered ? 'hover' : 'default'});\n }\n `\n : ''}\n\n span {\n background: var(\n --redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-text-${$isDisabled\n ? 'disabled'\n : $isActive\n ? 'active'\n : $isHovered\n ? 'hover'\n : 'default'}\n );\n background-clip: text;\n color: transparent;\n }\n `}\n\n ${$variant === ButtonVariant.secondary\n ? css`\n border: 1px solid\n var(\n --redsift-color-${$theme}-components-buttons-secondary-button-${$color}-text-${$isDisabled ? 'disabled' : $isActive ? 'active' : $isHovered ? 'hover' : 'default'}\n );\n `\n : ''}\n `};\n\n &:hover,\n &:focus-visible {\n outline: none;\n\n ${({ $variant, $color, $isDisabled, $isGradient, $theme }) => css`\n cursor: ${$isDisabled ? 'default' : 'pointer'};\n\n ${!$isGradient\n ? css`\n background-color: var(\n --redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-background-${$isDisabled\n ? 'disabled'\n : 'hover'}\n );\n &,\n .redsift-icon:not(.colored) {\n color: var(\n --redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-text-${$isDisabled\n ? 'disabled'\n : 'hover'}\n );\n }\n\n ${$variant === ButtonVariant.secondary\n ? css`\n border: 1px solid\n var(\n --redsift-color-${$theme}-components-buttons-secondary-button-${$color}-text-${$isDisabled ? 'disabled' : 'hover'}\n );\n `\n : ''}\n `\n : css`\n background: var(\n --redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-background-${$isDisabled\n ? 'disabled'\n : 'hover'}\n );\n\n ${$variant !== ButtonVariant.primary && !$isDisabled\n ? css`\n path {\n fill: url(#${$color}-gradient-hover);\n }\n `\n : ''}\n `}\n `};\n }\n\n &:active {\n outline: none;\n\n ${({ $variant, $color, $isGradient, $isHovered, $isDisabled, $theme }) => css`\n ${!$isGradient\n ? css`\n background-color: var(\n --redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-background-${$isDisabled\n ? 'disabled'\n : $isHovered\n ? 'hover'\n : 'active'}\n );\n &,\n .redsift-icon:not(.colored) {\n color: var(\n --redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-text-${$isDisabled\n ? 'disabled'\n : $isHovered\n ? 'hover'\n : 'active'}\n );\n }\n\n ${$variant === ButtonVariant.secondary\n ? css`\n border: 1px solid\n var(\n --redsift-color-${$theme}-components-buttons-secondary-button-${$color}-text-${$isDisabled ? 'disabled' : $isHovered ? 'hover' : 'active'}\n );\n `\n : ''}\n `\n : css`\n background: var(\n --redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-background-${$isDisabled\n ? 'disabled'\n : $isHovered\n ? 'hover'\n : 'active'}\n );\n\n ${$variant !== ButtonVariant.primary && !$isDisabled\n ? css`\n path {\n fill: url(#${$color}-gradient-active);\n }\n `\n : ''}\n `}\n `};\n }\n\n ${({ $fullWidth }) =>\n $fullWidth\n ? `\n width: 100%;\n flex-grow: 1;\n `\n : ''}\n\n .redsift-icon.left {\n margin-right: unset;\n align-items: center;\n }\n\n .redsift-icon.right {\n margin-left: unset;\n align-items: center;\n }\n\n ${focusRing}\n`;\n"],"names":["ButtonVariant","primary","secondary","unstyled","StyledButton","styled","button","baseStyling","_ref","$isLoading","css","_ref2","$variant","$color","$isActive","$isDisabled","$isGradient","$isHovered","$theme","_ref3","_ref4","_ref5","$fullWidth","focusRing"],"mappings":";;;AAIA;AACA;AACA;AACO,MAAMA,aAAa,GAAG;AAC3BC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,SAAS,EAAE,WAAW;AACtBC,EAAAA,QAAQ,EAAE,UAAA;AACZ,EAAU;;AAGV;AACA;AACA;;AAGA;AACA;AACA;;ACjBA;AACA;AACA;AACaC,MAAAA,YAAY,GAAGC,MAAM,CAACC,MAA0B,CAAA;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAA,EAAIC,WAAY,CAAA;AAChB;AACA,EAAA,EAAIC,IAAA,IAAA;EAAA,IAAC;AAAEC,IAAAA,UAAAA;AAAW,GAAC,GAAAD,IAAA,CAAA;EAAA,OACfC,UAAU,GACNC,GAAI,CAAA;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAA,CAAS,GACD,EAAE,CAAA;AAAA,CAAC,CAAA;AACX;AACA,EAAA,EAAIC,KAAA,IAAA;EAAA,IAAC;IAAEC,QAAQ;IAAEC,MAAM;IAAEC,SAAS;IAAEC,WAAW;IAAEC,WAAW;IAAEC,UAAU;AAAEC,IAAAA,MAAAA;AAAO,GAAC,GAAAP,KAAA,CAAA;AAAA,EAAA,OAAKD,GAAI,CAAA;AAC3F,aAAA,EAAeE,QAAQ,KAAKZ,aAAa,CAACE,SAAS,IAC9CU,QAAQ,KAAKZ,aAAa,CAACE,SAAS,IAAIc,WAAW,IAAI,CAACD,WAAY,GACjE,UAAU,GACV,UAAW,CAAA;AACnB;AACA,IAAM,EAAA,CAACC,WAAW,GACVN,GAAI,CAAA;AACZ;AACA,4BAAA,EAA8BQ,MAAO,CAAsBN,oBAAAA,EAAAA,QAAS,WAAUC,MAAO,CAAA,YAAA,EAAcE,WAAW,GAC5F,UAAU,GACVD,SAAS,GACT,QAAQ,GACRG,UAAU,GACV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QAAS,CAAA;AAChK;AACA,gBAAA,CAAiB,GACD,EAAG,CAAA;AACnB,UAAA,CAAW,GACDP,GAAI,CAAA;AACd;AACA,8BAAA,EAAgCQ,MAAO,CAAA,oBAAA,EAAsBN,QAAS,CAAA,QAAA,EAAUC,MAAO,CAAcE,YAAAA,EAAAA,WAAW,GAC5F,UAAU,GACVE,UAAU,GACV,OAAO,GACP,QAAS,CAAA;AAC7B;AACA;AACA,YAAcL,EAAAA,QAAQ,KAAKZ,aAAa,CAACC,OAAO,IAAI,CAACc,WAAW,GAChDL,GAAI,CAAA;AACpB;AACA,+BAAA,EAAiCG,MAAO,CAAA;AACxC;AACA,gBAAA,CAAiB,GACD,EAAG,CAAA;AACnB,UAAY,CAAA,CAAA;AACZ,IAAK,CAAA,CAAA;AAAA,CAAC,CAAA;AACN;AACA;AACA,EAAA,EAAIQ,KAAA,IAAA;EAAA,IAAC;AAAEC,IAAAA,UAAAA;AAAW,GAAC,GAAAD,KAAA,CAAA;AAAA,EAAA,OACfC,UAAU,GACL,CAAA;AACT;AACA;AACA,MAAA,CAAO,GACC,EAAE,CAAA;AAAA,CAAC,CAAA;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAA,EAAIC,SAAU,CAAA;AACd;;;;"}
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../src/types/styles.ts"],"sourcesContent":["import { ValueOf } from './helpers';\n\nexport const AlignSelf = {\n auto: 'auto',\n normal: 'normal',\n start: 'start',\n end: 'end',\n center: 'center',\n 'flex-start': 'flex-start',\n 'flex-end': 'flex-end',\n 'self-start': 'self-start',\n 'self-end': 'self-end',\n baseline: 'baseline',\n stretch: 'stretch',\n} as const;\nexport type AlignSelf = ValueOf<typeof AlignSelf>;\n\nexport const JustifySelf = {\n auto: 'auto',\n normal: 'normal',\n start: 'start',\n end: 'end',\n center: 'center',\n 'flex-start': 'flex-start',\n 'flex-end': 'flex-end',\n 'self-start': 'self-start',\n 'self-end': 'self-end',\n left: 'left',\n right: 'right',\n stretch: 'stretch',\n} as const;\nexport type JustifySelf = ValueOf<typeof JustifySelf>;\n\nexport const AlignContent = {\n 'flex-start': 'flex-start',\n 'flex-end': 'flex-end',\n center: 'center',\n 'space-between': 'space-between',\n 'space-around': 'space-around',\n 'space-evenly': 'space-evenly',\n stretch: 'stretch',\n start: 'start',\n end: 'end',\n baseline: 'baseline',\n 'first baseline': 'first baseline',\n 'last baseline': 'last baseline',\n} as const;\nexport type AlignContent = ValueOf<typeof AlignContent>;\n\nexport const AlignItems = {\n stretch: 'stretch',\n 'flex-start': 'flex-start',\n 'flex-end': 'flex-end',\n center: 'center',\n baseline: 'baseline',\n 'first baseline': 'first baseline',\n 'last baseline': 'last baseline',\n start: 'start',\n end: 'end',\n 'self-start': 'self-start',\n 'self-end': 'self-end',\n} as const;\nexport type AlignItems = ValueOf<typeof AlignItems>;\n\nexport const FlexDirection = {\n row: 'row',\n 'row-reverse': 'row-reverse',\n column: 'column',\n 'column-reverse': 'column-reverse',\n} as const;\nexport type FlexDirection = ValueOf<typeof FlexDirection>;\n\nexport const FlexWrap = {\n nowrap: 'nowrap',\n wrap: 'wrap',\n 'wrap-reverse': 'wrap-reverse',\n} as const;\nexport type FlexWrap = ValueOf<typeof FlexWrap>;\n\nexport const JustifyContent = {\n 'flex-start': 'flex-start',\n 'flex-end': 'flex-end',\n center: 'center',\n 'space-between': 'space-between',\n 'space-around': 'space-around',\n 'space-evenly': 'space-evenly',\n start: 'start',\n end: 'end',\n left: 'left',\n right: 'right',\n baseline: 'baseline',\n 'first baseline': 'first baseline',\n 'last baseline': 'last baseline',\n stretch: 'stretch',\n} as const;\nexport type JustifyContent = ValueOf<typeof JustifyContent>;\n\nexport const JustifyItems = {\n start: 'start',\n end: 'end',\n center: 'center',\n stretch: 'stretch',\n} as const;\nexport type JustifyItems = ValueOf<typeof JustifyItems>;\n\nexport interface LayoutProps {\n /** When used in a flex layout, specifies how the element will grow or shrink to fit the space available. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/flex\">MDN</a>. */\n flex?: string;\n /** When used in a flex layout, specifies how the element will grow to fit the space available. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/flex-grow\">MDN</a>. */\n flexGrow?: number;\n /** When used in a flex layout, specifies how the element will shrink to fit the space available. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/flex-shrink\">MDN</a>. */\n flexShrink?: number;\n /** When used in a flex layout, specifies the initial main size of the element. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/flex_basis\">MDN</a>. */\n flexBasis?: string;\n /** Overrides the alignItems property of a flex or grid container. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/align-self\">MDN</a>. */\n alignSelf?: AlignSelf;\n /** Specifies how the element is justified inside a flex or grid container. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/justify-self\">MDN</a>. */\n justifySelf?: string;\n /** The layout order for the element within a flex or grid container. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/order\">MDN</a>. */\n order?: number;\n /** When used in a grid layout, specifies the named grid area that the element should be placed in within the grid. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area\">MDN</a>. */\n gridArea?: string;\n /** When used in a grid layout, specifies the column the element should be placed in within the grid. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column\">MDN</a>. */\n gridColumn?: string;\n /** When used in a grid layout, specifies the row the element should be placed in within the grid. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row\">MDN</a>. */\n gridRow?: string;\n /** When used in a grid layout, specifies the starting column to span within the grid. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-start\">MDN</a>. */\n gridColumnStart?: string;\n /** When used in a grid layout, specifies the ending column to span within the grid. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-end\">MDN</a>. */\n gridColumnEnd?: string;\n /** When used in a grid layout, specifies the starting row to span within the grid. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-start\">MDN</a>. */\n gridRowStart?: string;\n /** When used in a grid layout, specifies the ending row to span within the grid. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-end\">MDN</a>. */\n gridRowEnd?: string;\n}\n\nexport interface SpacingProps {\n /** The margin for all four sides of the element. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/margin\">MDN</a>. */\n margin?: string;\n /** The margin for the bottom side of the element. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom\">MDN</a>. */\n marginBottom?: string;\n /** The margin for the left side of the element. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left\">MDN</a>. */\n marginLeft?: string;\n /** The margin for the right side of the element. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right\">MDN</a>. */\n marginRight?: string;\n /** The margin for the top side of the element. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top\">MDN</a>. */\n marginTop?: string;\n}\n\nexport interface SizingProps {\n /** The height of the element. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/height\">MDN</a>. */\n height?: string | number;\n /** The maximum height of the element. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/max-height\">MDN</a>. */\n maxHeight?: string;\n /** The maximum width of the element. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/max-width\">MDN</a>. */\n maxWidth?: string;\n /** The minimum height of the element. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/min-height\">MDN</a>. */\n minHeight?: string;\n /** The minimum width of the element. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/min-width\">MDN</a>. */\n minWidth?: string;\n /** The width of the element. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/width\">MDN</a>. */\n width?: string | number;\n}\n\nexport interface PositioningProps {\n /** Specifies how the element is positioned. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/position\">MDN</a>. */\n position?: string;\n /** The top position for the element. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/top\">MDN</a>. */\n top?: string;\n /** The bottom position for the element. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/bottom\">MDN</a>. */\n bottom?: string;\n /** The left position for the element. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/left\">MDN</a>. Consider using start instead for RTL support. */\n left?: string;\n /** The right position for the element. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/right\">MDN</a>. Consider using start instead for RTL support. */\n right?: string;\n /** The stacking order for the element. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/z-index\">MDN</a>. */\n zIndex?: string;\n}\n\nexport interface BorderProps {\n /** The background shorthand CSS property sets all background style properties at once, such as color, image, origin and size, or repeat method. Component properties not set in the background shorthand property value declaration are set to their default values. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/background\">MDN</a>. */\n background?: string;\n /** The background-color CSS property sets the background color of an element. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/background-color\">MDN</a>. */\n backgroundColor?: string;\n /** The border shorthand CSS property sets an element's border. It sets the values of border-width, border-style, and border-color. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/border\">MDN</a>. */\n border?: string;\n /** The border-top CSS property sets all the properties of an element's top border. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/border-top\">MDN</a>. */\n borderTop?: string;\n /** The border-top CSS property sets all the properties of an element's bottom border. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom\">MDN</a>. */\n borderBottom?: string;\n /** The border-top CSS property sets all the properties of an element's left border. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/border-left\">MDN</a>. Consider using start instead for RTL support. */\n borderLeft?: string;\n /** The border-top CSS property sets all the properties of an element's right border. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/border-right\">MDN</a>. Consider using start instead for RTL support. */\n borderRight?: string;\n /** The border-radius CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius\">MDN</a>. */\n borderRadius?: string;\n /** The box-shadow CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow\">MDN</a>. */\n boxShadow?: string;\n}\n\nexport interface FlexLayoutProps {\n /** The distribution of space around child items along the cross axis. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/align-content\">MDN</a>. */\n alignContent?: AlignContent;\n /** The alignment of children within their container. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/align-items\">MDN</a>. */\n alignItems?: AlignItems;\n /** The direction in which to layout children. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction\">MDN</a>. */\n flexDirection?: FlexDirection;\n /** Whether to wrap items onto multiple lines. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap\">MDN</a>. */\n flexWrap?: FlexWrap;\n /** The space to display between both rows and columns. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/gap\">MDN</a>. */\n gap?: string;\n /** Whether the box is displayed inline or not. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/display\">MDN</a>. */\n inline?: boolean;\n /** The distribution of space around items along the main axis. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content\">MDN</a>. */\n justifyContent?: JustifyContent;\n}\n\nexport interface GridLayoutProps {\n /** The distribution of space around child items along the cross axis. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/align-content\">MDN</a>. */\n alignContent?: AlignContent;\n /** The alignment of children within their container. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/align-items\">MDN</a>. */\n alignItems?: AlignItems;\n /** The space to display between both rows and columns. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/gap\">MDN</a>. */\n gap?: string;\n /** Defines the size of implicitly generated columns. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-columns\">MDN</a>. */\n gridAutoColumns?: string;\n /** Defines the size of implicitly generated rows. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-rows\">MDN</a>. */\n gridAutoRows?: string;\n /** Defines named grid areas. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-areas\">MDN</a>. */\n gridTemplateAreas?: string;\n /** Defines the sizes of each column in the grid. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns\">MDN</a>. */\n gridTemplateColumns?: string;\n /** Defines the sizes of each row in the grid. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-rows\">MDN</a>. */\n gridTemplateRows?: string;\n /** Whether the box is displayed inline or not. */\n inline?: boolean;\n /** The distribution of space around items along the main axis. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content\">MDN</a>. */\n justifyContent?: JustifyContent;\n /** Defines the default justifySelf for all items in the grid. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/justify-items\">MDN</a>. */\n justifyItems?: JustifyItems;\n}\n\nexport interface StylingProps extends LayoutProps, SpacingProps, SizingProps, PositioningProps {}\n\nexport interface InternalSpacingProps {\n /** The padding for all four sides of the element. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/padding\">MDN</a>. */\n padding?: string;\n /** The padding for the bottom side of the element. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom\">MDN</a>. */\n paddingBottom?: string;\n /** The padding for the left side of the element. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left\">MDN</a>. */\n paddingLeft?: string;\n /** The padding for the right side of the element. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/padding-right\">MDN</a>. */\n paddingRight?: string;\n /** The padding for the top side of the element. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/padding-top\">MDN</a>. */\n paddingTop?: string;\n}\nexport interface ContainerProps\n extends Omit<FlexLayoutProps, 'inline'>,\n Omit<GridLayoutProps, 'inline'>,\n SpacingProps,\n SizingProps,\n PositioningProps,\n BorderProps,\n InternalSpacingProps {\n /** Sets whether an element is treated as a block or inline element and the layout used for its children, such as flow layout, grid or flex. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/display\">MDN</a>. */\n display?: 'block' | 'inline' | 'inline-block' | 'flex' | 'inline-flex' | 'grid' | 'inline-grid' | 'inherit';\n}\n\nexport const getContainerProps = (props: ContainerProps) => ({\n ...(props.alignContent && { alignContent: props.alignContent }),\n ...(props.alignItems && { alignItems: props.alignItems }),\n ...(props.bottom && { bottom: props.bottom }),\n ...(props.flexDirection && { flexDirection: props.flexDirection }),\n ...(props.flexWrap && { flexWrap: props.flexWrap }),\n ...(props.gap && { gap: props.gap }),\n ...(props.gridAutoColumns && { gridAutoColumns: props.gridAutoColumns }),\n ...(props.gridAutoRows && { gridAutoRows: props.gridAutoRows }),\n ...(props.gridTemplateAreas && { gridTemplateAreas: props.gridTemplateAreas }),\n ...(props.gridTemplateColumns && { gridTemplateColumns: props.gridTemplateColumns }),\n ...(props.gridTemplateRows && { gridTemplateRows: props.gridTemplateRows }),\n ...(props.height && { height: props.height }),\n ...(props.justifyContent && { justifyContent: props.justifyContent }),\n ...(props.justifyItems && { justifyItems: props.justifyItems }),\n ...(props.left && { left: props.left }),\n ...(props.margin && { margin: props.margin }),\n ...(props.marginBottom && { marginBottom: props.marginBottom }),\n ...(props.marginLeft && { marginLeft: props.marginLeft }),\n ...(props.marginRight && { marginRight: props.marginRight }),\n ...(props.marginTop && { marginTop: props.marginTop }),\n ...(props.maxHeight && { maxHeight: props.maxHeight }),\n ...(props.maxWidth && { maxWidth: props.maxWidth }),\n ...(props.minHeight && { minHeight: props.minHeight }),\n ...(props.minWidth && { minWidth: props.minWidth }),\n ...(props.padding && { padding: props.padding }),\n ...(props.paddingBottom && { paddingBottom: props.paddingBottom }),\n ...(props.paddingLeft && { paddingLeft: props.paddingLeft }),\n ...(props.paddingRight && { paddingRight: props.paddingRight }),\n ...(props.paddingTop && { paddingTop: props.paddingTop }),\n ...(props.position && { position: props.position }),\n ...(props.right && { right: props.right }),\n ...(props.top && { top: props.top }),\n ...(props.width && { width: props.width }),\n ...(props.zIndex && { zIndex: props.zIndex }),\n});\n\n/**\n * Converts styling props to transient props by adding a $ prefix.\n * Filters out undefined values to avoid passing unnecessary props.\n */\nconst toTransientProps = <T extends Record<string, any>>(props: T, keys: (keyof T)[]): Partial<TransientProps<T>> => {\n return keys.reduce((acc, key) => {\n const value = props[key];\n if (value !== undefined) {\n const transientKey = `$${String(key)}` as keyof TransientProps<T>;\n acc[transientKey] = value;\n }\n return acc;\n }, {} as Partial<TransientProps<T>>);\n};\n\nconst LAYOUT_PROPS_KEYS: (keyof LayoutProps)[] = [\n 'flex',\n 'flexGrow',\n 'flexShrink',\n 'flexBasis',\n 'alignSelf',\n 'justifySelf',\n 'order',\n 'gridArea',\n 'gridColumn',\n 'gridRow',\n 'gridColumnStart',\n 'gridColumnEnd',\n 'gridRowStart',\n 'gridRowEnd',\n];\n\nconst SPACING_PROPS_KEYS: (keyof SpacingProps)[] = ['margin', 'marginBottom', 'marginLeft', 'marginRight', 'marginTop'];\n\nconst SIZING_PROPS_KEYS: (keyof SizingProps)[] = ['height', 'maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'width'];\n\nconst POSITIONING_PROPS_KEYS: (keyof PositioningProps)[] = ['position', 'top', 'bottom', 'left', 'right', 'zIndex'];\n\nconst INTERNAL_SPACING_PROPS_KEYS: (keyof InternalSpacingProps)[] = [\n 'padding',\n 'paddingBottom',\n 'paddingLeft',\n 'paddingRight',\n 'paddingTop',\n];\n\nconst BORDER_PROPS_KEYS: (keyof BorderProps)[] = [\n 'background',\n 'backgroundColor',\n 'border',\n 'borderTop',\n 'borderBottom',\n 'borderLeft',\n 'borderRight',\n 'borderRadius',\n 'boxShadow',\n];\n\nconst FLEX_LAYOUT_PROPS_KEYS: (keyof FlexLayoutProps)[] = [\n 'alignContent',\n 'alignItems',\n 'flexDirection',\n 'flexWrap',\n 'gap',\n 'inline',\n 'justifyContent',\n];\n\nconst GRID_LAYOUT_PROPS_KEYS: (keyof GridLayoutProps)[] = [\n 'alignContent',\n 'alignItems',\n 'gap',\n 'gridAutoColumns',\n 'gridAutoRows',\n 'gridTemplateAreas',\n 'gridTemplateColumns',\n 'gridTemplateRows',\n 'inline',\n 'justifyContent',\n 'justifyItems',\n];\n\nconst STYLING_PROPS_KEYS: (keyof StylingProps)[] = [\n ...LAYOUT_PROPS_KEYS,\n ...SPACING_PROPS_KEYS,\n ...SIZING_PROPS_KEYS,\n ...POSITIONING_PROPS_KEYS,\n];\n\nconst CONTAINER_PROPS_KEYS: string[] = [\n ...LAYOUT_PROPS_KEYS,\n ...SPACING_PROPS_KEYS,\n ...SIZING_PROPS_KEYS,\n ...POSITIONING_PROPS_KEYS,\n ...INTERNAL_SPACING_PROPS_KEYS,\n ...BORDER_PROPS_KEYS,\n ...FLEX_LAYOUT_PROPS_KEYS,\n ...GRID_LAYOUT_PROPS_KEYS,\n 'display',\n];\n\n/**\n * Converts styling props to transient props (with $ prefix) for styled-components.\n * Also returns the original props with styling props removed.\n * @param props - Object containing styling props\n * @returns Object with transientProps (with $ prefix) and otherProps (without styling props)\n */\nexport const getStylingTransientProps = <T extends Record<string, any>>(\n props: T\n): { transientProps: Partial<StylingTransientProps>; otherProps: Omit<T, keyof StylingProps> } => {\n const transientProps = {\n ...toTransientProps(props, LAYOUT_PROPS_KEYS),\n ...toTransientProps(props, SPACING_PROPS_KEYS),\n ...toTransientProps(props, SIZING_PROPS_KEYS),\n ...toTransientProps(props, POSITIONING_PROPS_KEYS),\n };\n\n const otherProps = { ...props };\n STYLING_PROPS_KEYS.forEach((key) => {\n delete otherProps[key as string];\n });\n\n return {\n transientProps,\n otherProps: otherProps as Omit<T, keyof StylingProps>,\n };\n};\n\n/**\n * Converts flex layout props to transient props (with $ prefix) for styled-components.\n * Used for components that need flexbox-specific props alongside styling props.\n * @param props - Object containing flex layout props\n * @returns Object with transientProps (with $ prefix) and otherProps (without flex layout props)\n */\nexport const getFlexLayoutTransientProps = <T extends Record<string, any>>(\n props: T\n): { transientProps: Partial<FlexLayoutTransientProps>; otherProps: Omit<T, keyof FlexLayoutProps> } => {\n const transientProps = toTransientProps(props, FLEX_LAYOUT_PROPS_KEYS);\n\n const otherProps = { ...props };\n FLEX_LAYOUT_PROPS_KEYS.forEach((key) => {\n delete otherProps[key as string];\n });\n\n return {\n transientProps,\n otherProps: otherProps as Omit<T, keyof FlexLayoutProps>,\n };\n};\n\n/**\n * Removes styling props from an object to prevent passing them to the DOM.\n * @param props - Object that may contain styling props\n * @returns New object with styling props removed\n */\nexport const omitStylingProps = <T extends Record<string, any>>(props: T): Omit<T, keyof StylingProps> => {\n const result = { ...props };\n STYLING_PROPS_KEYS.forEach((key) => {\n delete result[key as string];\n });\n return result as Omit<T, keyof StylingProps>;\n};\n\n/**\n * Converts container props (styling + internal spacing + border + flex layout) to transient props for styled-components.\n * Used for Flexbox, Grid, and other container components.\n * @param props - Object containing container props\n * @returns Object with transientProps (with $ prefix) and otherProps (without container props)\n */\nexport const getContainerStylingTransientProps = <T extends Record<string, any>>(\n props: T\n): {\n transientProps: Partial<\n StylingTransientProps &\n InternalSpacingTransientProps &\n BorderTransientProps &\n FlexLayoutTransientProps &\n GridLayoutTransientProps & { $display?: ContainerProps['display'] }\n >;\n otherProps: Omit<T, keyof (StylingProps & InternalSpacingProps & BorderProps & FlexLayoutProps & { display: any })>;\n} => {\n const transientProps = {\n ...toTransientProps(props, LAYOUT_PROPS_KEYS),\n ...toTransientProps(props, SPACING_PROPS_KEYS),\n ...toTransientProps(props, SIZING_PROPS_KEYS),\n ...toTransientProps(props, POSITIONING_PROPS_KEYS),\n ...toTransientProps(props, INTERNAL_SPACING_PROPS_KEYS),\n ...toTransientProps(props, BORDER_PROPS_KEYS),\n ...toTransientProps(props, FLEX_LAYOUT_PROPS_KEYS),\n ...toTransientProps(props, GRID_LAYOUT_PROPS_KEYS),\n ...(props.display !== undefined && { $display: props.display }),\n };\n\n const otherProps = { ...props };\n CONTAINER_PROPS_KEYS.forEach((key) => {\n delete otherProps[key];\n });\n\n return {\n transientProps,\n otherProps: otherProps as any,\n };\n};\n\n/** TRANSIENT PROPS */\ntype TransientProps<T> = {\n [K in keyof T as `$${string & K}`]: T[K];\n};\n\nexport interface LayoutTransientProps extends TransientProps<LayoutProps> {}\nexport interface SpacingTransientProps extends TransientProps<SpacingProps> {}\nexport interface SizingTransientProps extends TransientProps<SizingProps> {}\nexport interface PositioningTransientProps extends TransientProps<PositioningProps> {}\nexport interface BorderTransientProps extends TransientProps<BorderProps> {}\nexport interface FlexLayoutTransientProps extends TransientProps<FlexLayoutProps> {}\nexport interface GridLayoutTransientProps extends TransientProps<GridLayoutProps> {}\nexport interface StylingTransientProps extends TransientProps<StylingProps> {}\nexport interface InternalSpacingTransientProps extends TransientProps<InternalSpacingProps> {}\nexport interface ContainerTransientProps extends TransientProps<ContainerProps> {}\n\nexport const getContainerTransientProps = (props: ContainerTransientProps) => ({\n ...(props.$alignContent && { alignContent: props.$alignContent }),\n ...(props.$alignItems && { alignItems: props.$alignItems }),\n ...(props.$bottom && { bottom: props.$bottom }),\n ...(props.$flexDirection && { flexDirection: props.$flexDirection }),\n ...(props.$flexWrap && { flexWrap: props.$flexWrap }),\n ...(props.$gap && { gap: props.$gap }),\n ...(props.$gridAutoColumns && { gridAutoColumns: props.$gridAutoColumns }),\n ...(props.$gridAutoRows && { gridAutoRows: props.$gridAutoRows }),\n ...(props.$gridTemplateAreas && { gridTemplateAreas: props.$gridTemplateAreas }),\n ...(props.$gridTemplateColumns && { gridTemplateColumns: props.$gridTemplateColumns }),\n ...(props.$gridTemplateRows && { gridTemplateRows: props.$gridTemplateRows }),\n ...(props.$height && { height: props.$height }),\n ...(props.$justifyContent && { justifyContent: props.$justifyContent }),\n ...(props.$justifyItems && { justifyItems: props.$justifyItems }),\n ...(props.$left && { left: props.$left }),\n ...(props.$margin && { margin: props.$margin }),\n ...(props.$marginBottom && { marginBottom: props.$marginBottom }),\n ...(props.$marginLeft && { marginLeft: props.$marginLeft }),\n ...(props.$marginRight && { marginRight: props.$marginRight }),\n ...(props.$marginTop && { marginTop: props.$marginTop }),\n ...(props.$maxHeight && { maxHeight: props.$maxHeight }),\n ...(props.$maxWidth && { maxWidth: props.$maxWidth }),\n ...(props.$minHeight && { minHeight: props.$minHeight }),\n ...(props.$minWidth && { minWidth: props.$minWidth }),\n ...(props.$padding && { padding: props.$padding }),\n ...(props.$paddingBottom && { paddingBottom: props.$paddingBottom }),\n ...(props.$paddingLeft && { paddingLeft: props.$paddingLeft }),\n ...(props.$paddingRight && { paddingRight: props.$paddingRight }),\n ...(props.$paddingTop && { paddingTop: props.$paddingTop }),\n ...(props.$position && { position: props.$position }),\n ...(props.$right && { right: props.$right }),\n ...(props.$top && { top: props.$top }),\n ...(props.$width && { width: props.$width }),\n ...(props.$zIndex && { zIndex: props.$zIndex }),\n});\n"],"names":["AlignSelf","auto","normal","start","end","center","baseline","stretch","JustifySelf","left","right","AlignContent","AlignItems","FlexDirection","row","column","FlexWrap","nowrap","wrap","JustifyContent","JustifyItems","getContainerProps","props","_objectSpread","alignContent","alignItems","bottom","flexDirection","flexWrap","gap","gridAutoColumns","gridAutoRows","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","justifyContent","justifyItems","margin","marginBottom","marginLeft","marginRight","marginTop","maxHeight","maxWidth","minHeight","minWidth","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","position","top","width","zIndex","toTransientProps","keys","reduce","acc","key","value","undefined","transientKey","String","LAYOUT_PROPS_KEYS","SPACING_PROPS_KEYS","SIZING_PROPS_KEYS","POSITIONING_PROPS_KEYS","INTERNAL_SPACING_PROPS_KEYS","BORDER_PROPS_KEYS","FLEX_LAYOUT_PROPS_KEYS","GRID_LAYOUT_PROPS_KEYS","STYLING_PROPS_KEYS","CONTAINER_PROPS_KEYS","getStylingTransientProps","transientProps","otherProps","forEach","getFlexLayoutTransientProps","omitStylingProps","result","getContainerStylingTransientProps","display","$display","getContainerTransientProps","$alignContent","$alignItems","$bottom","$flexDirection","$flexWrap","$gap","$gridAutoColumns","$gridAutoRows","$gridTemplateAreas","$gridTemplateColumns","$gridTemplateRows","$height","$justifyContent","$justifyItems","$left","$margin","$marginBottom","$marginLeft","$marginRight","$marginTop","$maxHeight","$maxWidth","$minHeight","$minWidth","$padding","$paddingBottom","$paddingLeft","$paddingRight","$paddingTop","$position","$right","$top","$width","$zIndex"],"mappings":";;AAEO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE,QAAQ;AAChB,EAAA,YAAY,EAAE,YAAY;AAC1B,EAAA,UAAU,EAAE,UAAU;AACtB,EAAA,YAAY,EAAE,YAAY;AAC1B,EAAA,UAAU,EAAE,UAAU;AACtBC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,OAAO,EAAE,SAAA;AACX,EAAU;AAGH,MAAMC,WAAW,GAAG;AACzBP,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE,QAAQ;AAChB,EAAA,YAAY,EAAE,YAAY;AAC1B,EAAA,UAAU,EAAE,UAAU;AACtB,EAAA,YAAY,EAAE,YAAY;AAC1B,EAAA,UAAU,EAAE,UAAU;AACtBI,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,KAAK,EAAE,OAAO;AACdH,EAAAA,OAAO,EAAE,SAAA;AACX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AK,CAAC+F,IAAAA;AAAK,CAAC,CACjC/F,EAAAA,KAAK,CAACgG,MAAM,IAAI;EAAEhE,KAAK,EAAEhC,KAAK,CAACgG,MAAAA;AAAO,CAAC,CACvChG,EAAAA,KAAK,CAACiG,OAAO,IAAI;EAAEhE,MAAM,EAAEjC,KAAK,CAACiG,OAAAA;AAAQ,CAAC;;;;"}
|
package/_internal/styles2.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
|
-
import {
|
|
2
|
+
import { i as baseStyling, k as focusRing } from './styles5.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Component variant.
|
|
6
6
|
*/
|
|
7
|
-
const
|
|
7
|
+
const ButtonVariant = {
|
|
8
8
|
primary: 'primary',
|
|
9
9
|
secondary: 'secondary',
|
|
10
10
|
unstyled: 'unstyled'
|
|
@@ -21,27 +21,215 @@ const IconButtonVariant = {
|
|
|
21
21
|
/**
|
|
22
22
|
* Component style.
|
|
23
23
|
*/
|
|
24
|
-
const
|
|
24
|
+
const StyledButton = styled.button`
|
|
25
|
+
align-items: center;
|
|
26
|
+
background: none;
|
|
27
|
+
border: none;
|
|
28
|
+
border-radius: 4px;
|
|
29
|
+
display: inline-flex;
|
|
30
|
+
font-family: var(--redsift-typography-button-font-family);
|
|
31
|
+
font-size: var(--redsift-typography-button-font-size);
|
|
32
|
+
font-weight: var(--redsift-typography-button-font-weight);
|
|
33
|
+
gap: 8px;
|
|
34
|
+
height: fit-content;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
line-height: var(--redsift-typography-button-line-height);
|
|
37
|
+
text-decoration: none;
|
|
38
|
+
text-transform: var(--redsift-typography-button-text-transform);
|
|
39
|
+
vertical-align: middle;
|
|
40
|
+
-webkit-font-smoothing: antialiased;
|
|
41
|
+
${baseStyling}
|
|
42
|
+
|
|
25
43
|
${_ref => {
|
|
26
44
|
let {
|
|
27
|
-
$
|
|
45
|
+
$isLoading
|
|
28
46
|
} = _ref;
|
|
29
|
-
return css`
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
47
|
+
return $isLoading ? css`
|
|
48
|
+
& > span {
|
|
49
|
+
opacity: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
& > .redsift-shield {
|
|
53
|
+
position: absolute;
|
|
54
|
+
}
|
|
55
|
+
` : '';
|
|
56
|
+
}}
|
|
33
57
|
|
|
34
58
|
${_ref2 => {
|
|
35
59
|
let {
|
|
36
|
-
$
|
|
60
|
+
$variant,
|
|
61
|
+
$color,
|
|
62
|
+
$isActive,
|
|
63
|
+
$isDisabled,
|
|
64
|
+
$isGradient,
|
|
65
|
+
$isHovered,
|
|
66
|
+
$theme
|
|
37
67
|
} = _ref2;
|
|
38
|
-
return
|
|
39
|
-
|
|
40
|
-
|
|
68
|
+
return css`
|
|
69
|
+
padding: ${$variant !== ButtonVariant.secondary || $variant === ButtonVariant.secondary && $isGradient && !$isDisabled ? '9px 16px' : '8px 15px'};
|
|
70
|
+
|
|
71
|
+
${!$isGradient ? css`
|
|
72
|
+
background-color: var(
|
|
73
|
+
--redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-background-${$isDisabled ? 'disabled' : $isActive ? 'active' : $isHovered ? 'hover' : 'default'}
|
|
74
|
+
);
|
|
75
|
+
&,
|
|
76
|
+
.redsift-icon:not(.colored) {
|
|
77
|
+
color: var(
|
|
78
|
+
--redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-text-${$isDisabled ? 'disabled' : $isActive ? 'active' : $isHovered ? 'hover' : 'default'}
|
|
79
|
+
);
|
|
41
80
|
}
|
|
42
|
-
` :
|
|
81
|
+
` : css`
|
|
82
|
+
background: var(
|
|
83
|
+
--redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-background-${$isDisabled ? 'disabled' : $isActive ? 'active' : $isHovered ? 'hover' : 'default'}
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
${$variant === ButtonVariant.primary || $isDisabled ? css`
|
|
87
|
+
&,
|
|
88
|
+
.redsift-icon:not(.colored) {
|
|
89
|
+
color: var(
|
|
90
|
+
--redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-text-${$isDisabled ? 'disabled' : $isActive ? 'active' : $isHovered ? 'hover' : 'default'}
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
` : ''}
|
|
94
|
+
|
|
95
|
+
${$variant !== ButtonVariant.primary && !$isDisabled ? css`
|
|
96
|
+
path {
|
|
97
|
+
fill: url(#${$color}-gradient-${$isActive ? 'active' : $isHovered ? 'hover' : 'default'});
|
|
98
|
+
}
|
|
99
|
+
` : ''}
|
|
100
|
+
|
|
101
|
+
span {
|
|
102
|
+
background: var(
|
|
103
|
+
--redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-text-${$isDisabled ? 'disabled' : $isActive ? 'active' : $isHovered ? 'hover' : 'default'}
|
|
104
|
+
);
|
|
105
|
+
background-clip: text;
|
|
106
|
+
color: transparent;
|
|
107
|
+
}
|
|
108
|
+
`}
|
|
109
|
+
|
|
110
|
+
${$variant === ButtonVariant.secondary ? css`
|
|
111
|
+
border: 1px solid
|
|
112
|
+
var(
|
|
113
|
+
--redsift-color-${$theme}-components-buttons-secondary-button-${$color}-text-${$isDisabled ? 'disabled' : $isActive ? 'active' : $isHovered ? 'hover' : 'default'}
|
|
114
|
+
);
|
|
115
|
+
` : ''}
|
|
116
|
+
`;
|
|
117
|
+
}};
|
|
118
|
+
|
|
119
|
+
&:hover,
|
|
120
|
+
&:focus-visible {
|
|
121
|
+
outline: none;
|
|
122
|
+
|
|
123
|
+
${_ref3 => {
|
|
124
|
+
let {
|
|
125
|
+
$variant,
|
|
126
|
+
$color,
|
|
127
|
+
$isDisabled,
|
|
128
|
+
$isGradient,
|
|
129
|
+
$theme
|
|
130
|
+
} = _ref3;
|
|
131
|
+
return css`
|
|
132
|
+
cursor: ${$isDisabled ? 'default' : 'pointer'};
|
|
133
|
+
|
|
134
|
+
${!$isGradient ? css`
|
|
135
|
+
background-color: var(
|
|
136
|
+
--redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-background-${$isDisabled ? 'disabled' : 'hover'}
|
|
137
|
+
);
|
|
138
|
+
&,
|
|
139
|
+
.redsift-icon:not(.colored) {
|
|
140
|
+
color: var(
|
|
141
|
+
--redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-text-${$isDisabled ? 'disabled' : 'hover'}
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
${$variant === ButtonVariant.secondary ? css`
|
|
146
|
+
border: 1px solid
|
|
147
|
+
var(
|
|
148
|
+
--redsift-color-${$theme}-components-buttons-secondary-button-${$color}-text-${$isDisabled ? 'disabled' : 'hover'}
|
|
149
|
+
);
|
|
150
|
+
` : ''}
|
|
151
|
+
` : css`
|
|
152
|
+
background: var(
|
|
153
|
+
--redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-background-${$isDisabled ? 'disabled' : 'hover'}
|
|
154
|
+
);
|
|
155
|
+
|
|
156
|
+
${$variant !== ButtonVariant.primary && !$isDisabled ? css`
|
|
157
|
+
path {
|
|
158
|
+
fill: url(#${$color}-gradient-hover);
|
|
159
|
+
}
|
|
160
|
+
` : ''}
|
|
161
|
+
`}
|
|
162
|
+
`;
|
|
163
|
+
}};
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
&:active {
|
|
167
|
+
outline: none;
|
|
168
|
+
|
|
169
|
+
${_ref4 => {
|
|
170
|
+
let {
|
|
171
|
+
$variant,
|
|
172
|
+
$color,
|
|
173
|
+
$isGradient,
|
|
174
|
+
$isHovered,
|
|
175
|
+
$isDisabled,
|
|
176
|
+
$theme
|
|
177
|
+
} = _ref4;
|
|
178
|
+
return css`
|
|
179
|
+
${!$isGradient ? css`
|
|
180
|
+
background-color: var(
|
|
181
|
+
--redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-background-${$isDisabled ? 'disabled' : $isHovered ? 'hover' : 'active'}
|
|
182
|
+
);
|
|
183
|
+
&,
|
|
184
|
+
.redsift-icon:not(.colored) {
|
|
185
|
+
color: var(
|
|
186
|
+
--redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-text-${$isDisabled ? 'disabled' : $isHovered ? 'hover' : 'active'}
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
${$variant === ButtonVariant.secondary ? css`
|
|
191
|
+
border: 1px solid
|
|
192
|
+
var(
|
|
193
|
+
--redsift-color-${$theme}-components-buttons-secondary-button-${$color}-text-${$isDisabled ? 'disabled' : $isHovered ? 'hover' : 'active'}
|
|
194
|
+
);
|
|
195
|
+
` : ''}
|
|
196
|
+
` : css`
|
|
197
|
+
background: var(
|
|
198
|
+
--redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-background-${$isDisabled ? 'disabled' : $isHovered ? 'hover' : 'active'}
|
|
199
|
+
);
|
|
200
|
+
|
|
201
|
+
${$variant !== ButtonVariant.primary && !$isDisabled ? css`
|
|
202
|
+
path {
|
|
203
|
+
fill: url(#${$color}-gradient-active);
|
|
204
|
+
}
|
|
205
|
+
` : ''}
|
|
206
|
+
`}
|
|
207
|
+
`;
|
|
208
|
+
}};
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
${_ref5 => {
|
|
212
|
+
let {
|
|
213
|
+
$fullWidth
|
|
214
|
+
} = _ref5;
|
|
215
|
+
return $fullWidth ? `
|
|
216
|
+
width: 100%;
|
|
217
|
+
flex-grow: 1;
|
|
218
|
+
` : '';
|
|
43
219
|
}}
|
|
220
|
+
|
|
221
|
+
.redsift-icon.left {
|
|
222
|
+
margin-right: unset;
|
|
223
|
+
align-items: center;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.redsift-icon.right {
|
|
227
|
+
margin-left: unset;
|
|
228
|
+
align-items: center;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
${focusRing}
|
|
44
232
|
`;
|
|
45
233
|
|
|
46
|
-
export {
|
|
234
|
+
export { ButtonVariant as B, StyledButton as S };
|
|
47
235
|
//# sourceMappingURL=styles2.js.map
|
package/_internal/styles2.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles2.js","sources":["../../src/components/icon-button/types.ts","../../src/components/icon-button/styles.ts"],"sourcesContent":["import { ComponentProps } from 'react';\nimport { ButtonsColorPalette, StylingProps, Theme, ValueOf } from '../../types';\nimport { IconProps } from '../icon';\n\n/**\n * Component variant.\n */\nexport const IconButtonVariant = {\n primary: 'primary',\n secondary: 'secondary',\n unstyled: 'unstyled',\n} as const;\nexport type IconButtonVariant = ValueOf<typeof IconButtonVariant>;\n\n/**\n * Component color.\n */\nexport type IconButtonColor = ButtonsColorPalette;\n\n/**\n * Component props.\n */\nexport interface IconButtonProps extends ComponentProps<'button'>, StylingProps {\n /** Color variant. */\n color?: IconButtonColor;\n /**\n * Can be a string or an array of strings containing `d` property of the `path` SVG element.<br />\n * Can also be a ReactElement.\n */\n icon: IconProps['icon'];\n /** Props to forward to the icon. */\n iconProps?: Omit<IconProps, 'ref' | 'icon'>;\n /** Whether the component is active or not. */\n isActive?: boolean;\n /** Whether the component is disabled or not. */\n isDisabled?: boolean;\n /** Whether the component is hovered or not. */\n isHovered?: boolean;\n /** Whether the component is in a loading state or not. */\n isLoading?: boolean;\n /** Theme. */\n theme?: Theme;\n /** Button variant. */\n variant?: IconButtonVariant;\n}\n\nexport type StyledIconButtonProps = Omit<IconButtonProps, 'icon'> & {\n $color: IconButtonProps['color'];\n $isActive: IconButtonProps['isActive'];\n $isDisabled: IconButtonProps['isDisabled'];\n $isHovered: IconButtonProps['isHovered'];\n $isLoading: IconButtonProps['isLoading'];\n $theme: IconButtonProps['theme'];\n $variant: IconButtonProps['variant'];\n};\n","import styled, { css } from 'styled-components';\nimport { StyledButton } from '../button';\nimport { IconButtonVariant, StyledIconButtonProps } from './types';\n\n/**\n * Component style.\n */\nexport const StyledIconButton = styled(StyledButton)<StyledIconButtonProps>`\n ${({ $variant }) => css`\n padding: ${$variant === IconButtonVariant.secondary ? '8px' : '9px'};\n `};\n\n ${({ $isLoading }) =>\n $isLoading\n ? css`\n & > .redsift-shield {\n position: relative;\n }\n `\n : ''}\n`;\n"],"names":["IconButtonVariant","primary","secondary","unstyled","StyledIconButton","styled","StyledButton","_ref","$variant","css","_ref2","$isLoading"],"mappings":";;;AAIA;AACA;AACA;AACO,MAAMA,iBAAiB,GAAG;AAC/BC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,SAAS,EAAE,WAAW;AACtBC,EAAAA,QAAQ,EAAE,UAAA;AACZ,EAAU;;AAGV;AACA;AACA;;AAGA;AACA;AACA;;ACjBA;AACA;AACA;MACaC,gBAAgB,GAAGC,MAAM,CAACC,YAAY,CAAyB,CAAA;AAC5E,EAAA,EAAIC,IAAA,IAAA;EAAA,IAAC;AAAEC,IAAAA,QAAAA;AAAS,GAAC,GAAAD,IAAA,CAAA;AAAA,EAAA,OAAKE,GAAI,CAAA;AAC1B,aAAeD,EAAAA,QAAQ,KAAKR,iBAAiB,CAACE,SAAS,GAAG,KAAK,GAAG,KAAM,CAAA;AACxE,EAAG,CAAA,CAAA;AAAA,CAAC,CAAA;AACJ;AACA,EAAA,EAAIQ,KAAA,IAAA;EAAA,IAAC;AAAEC,IAAAA,UAAAA;AAAW,GAAC,GAAAD,KAAA,CAAA;EAAA,OACfC,UAAU,GACNF,GAAI,CAAA;AACZ;AACA;AACA;AACA,QAAA,CAAS,GACD,EAAE,CAAA;AAAA,CAAC,CAAA;AACX;;;;"}
|
|
1
|
+
{"version":3,"file":"styles2.js","sources":["../../src/components/button/types.ts","../../src/components/button/styles.ts"],"sourcesContent":["import { ComponentProps } from 'react';\nimport { ButtonsColorPalette, StylingProps, StylingTransientProps, Theme, ValueOf } from '../../types';\nimport { IconProps } from '../icon';\n\n/**\n * Component variant.\n */\nexport const ButtonVariant = {\n primary: 'primary',\n secondary: 'secondary',\n unstyled: 'unstyled',\n} as const;\nexport type ButtonVariant = ValueOf<typeof ButtonVariant>;\n\n/**\n * Component color.\n */\nexport type ButtonColor = ButtonsColorPalette;\n\n/**\n * Component props.\n */\nexport interface ButtonProps extends ComponentProps<'button'>, StylingProps {\n /** Color variant. */\n color?: ButtonColor;\n /** Whether the component take the full width or not. */\n fullWidth?: boolean;\n /** Whether the component is active or not. */\n isActive?: boolean;\n /** Whether the component is disabled or not. */\n isDisabled?: boolean;\n /** Whether the component is hovered or not. */\n isHovered?: boolean;\n /** Whether the component is in a loading state or not. */\n isLoading?: boolean;\n /**\n * Can be a string or an array of strings containing `d` property of the `path` SVG element.<br />\n * Can also be a ReactElement.\n */\n leftIcon?: IconProps['icon'];\n /** Props to add to the left icon. */\n leftIconProps?: Omit<IconProps, 'icon' | 'ref'>;\n /**\n * Can be a string or an array of strings containing `d` property of the `path` SVG element.<br />\n * Can also be a ReactElement.\n */\n rightIcon?: IconProps['icon'];\n /** Props to add to the right icon. */\n rightIconProps?: Omit<IconProps, 'icon' | 'ref'>;\n /** Theme. */\n theme?: Theme;\n /** Button variant. */\n variant?: ButtonVariant;\n}\n\nexport interface StyledButtonProps extends ComponentProps<'button'>, StylingTransientProps {\n $color: ButtonProps['color'];\n $fullWidth?: ButtonProps['fullWidth'];\n $isActive: ButtonProps['isActive'];\n $isDisabled: ButtonProps['isDisabled'];\n $isGradient: boolean;\n $isHovered: ButtonProps['isHovered'];\n $isLoading: ButtonProps['isLoading'];\n $theme: ButtonProps['theme'];\n $variant: ButtonProps['variant'];\n}\n","import styled, { css } from 'styled-components';\nimport { baseStyling, focusRing } from '../shared';\nimport { StyledButtonProps, ButtonVariant } from './types';\n\n/**\n * Component style.\n */\nexport const StyledButton = styled.button<StyledButtonProps>`\n align-items: center;\n background: none;\n border: none;\n border-radius: 4px;\n display: inline-flex;\n font-family: var(--redsift-typography-button-font-family);\n font-size: var(--redsift-typography-button-font-size);\n font-weight: var(--redsift-typography-button-font-weight);\n gap: 8px;\n height: fit-content;\n justify-content: center;\n line-height: var(--redsift-typography-button-line-height);\n text-decoration: none;\n text-transform: var(--redsift-typography-button-text-transform);\n vertical-align: middle;\n -webkit-font-smoothing: antialiased;\n ${baseStyling}\n\n ${({ $isLoading }) =>\n $isLoading\n ? css`\n & > span {\n opacity: 0;\n }\n\n & > .redsift-shield {\n position: absolute;\n }\n `\n : ''}\n\n ${({ $variant, $color, $isActive, $isDisabled, $isGradient, $isHovered, $theme }) => css`\n padding: ${$variant !== ButtonVariant.secondary ||\n ($variant === ButtonVariant.secondary && $isGradient && !$isDisabled)\n ? '9px 16px'\n : '8px 15px'};\n\n ${!$isGradient\n ? css`\n background-color: var(\n --redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-background-${$isDisabled\n ? 'disabled'\n : $isActive\n ? 'active'\n : $isHovered\n ? 'hover'\n : 'default'}\n );\n &,\n .redsift-icon:not(.colored) {\n color: var(\n --redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-text-${$isDisabled\n ? 'disabled'\n : $isActive\n ? 'active'\n : $isHovered\n ? 'hover'\n : 'default'}\n );\n }\n `\n : css`\n background: var(\n --redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-background-${$isDisabled\n ? 'disabled'\n : $isActive\n ? 'active'\n : $isHovered\n ? 'hover'\n : 'default'}\n );\n\n ${$variant === ButtonVariant.primary || $isDisabled\n ? css`\n &,\n .redsift-icon:not(.colored) {\n color: var(\n --redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-text-${$isDisabled\n ? 'disabled'\n : $isActive\n ? 'active'\n : $isHovered\n ? 'hover'\n : 'default'}\n );\n }\n `\n : ''}\n\n ${$variant !== ButtonVariant.primary && !$isDisabled\n ? css`\n path {\n fill: url(#${$color}-gradient-${$isActive ? 'active' : $isHovered ? 'hover' : 'default'});\n }\n `\n : ''}\n\n span {\n background: var(\n --redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-text-${$isDisabled\n ? 'disabled'\n : $isActive\n ? 'active'\n : $isHovered\n ? 'hover'\n : 'default'}\n );\n background-clip: text;\n color: transparent;\n }\n `}\n\n ${$variant === ButtonVariant.secondary\n ? css`\n border: 1px solid\n var(\n --redsift-color-${$theme}-components-buttons-secondary-button-${$color}-text-${$isDisabled ? 'disabled' : $isActive ? 'active' : $isHovered ? 'hover' : 'default'}\n );\n `\n : ''}\n `};\n\n &:hover,\n &:focus-visible {\n outline: none;\n\n ${({ $variant, $color, $isDisabled, $isGradient, $theme }) => css`\n cursor: ${$isDisabled ? 'default' : 'pointer'};\n\n ${!$isGradient\n ? css`\n background-color: var(\n --redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-background-${$isDisabled\n ? 'disabled'\n : 'hover'}\n );\n &,\n .redsift-icon:not(.colored) {\n color: var(\n --redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-text-${$isDisabled\n ? 'disabled'\n : 'hover'}\n );\n }\n\n ${$variant === ButtonVariant.secondary\n ? css`\n border: 1px solid\n var(\n --redsift-color-${$theme}-components-buttons-secondary-button-${$color}-text-${$isDisabled ? 'disabled' : 'hover'}\n );\n `\n : ''}\n `\n : css`\n background: var(\n --redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-background-${$isDisabled\n ? 'disabled'\n : 'hover'}\n );\n\n ${$variant !== ButtonVariant.primary && !$isDisabled\n ? css`\n path {\n fill: url(#${$color}-gradient-hover);\n }\n `\n : ''}\n `}\n `};\n }\n\n &:active {\n outline: none;\n\n ${({ $variant, $color, $isGradient, $isHovered, $isDisabled, $theme }) => css`\n ${!$isGradient\n ? css`\n background-color: var(\n --redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-background-${$isDisabled\n ? 'disabled'\n : $isHovered\n ? 'hover'\n : 'active'}\n );\n &,\n .redsift-icon:not(.colored) {\n color: var(\n --redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-text-${$isDisabled\n ? 'disabled'\n : $isHovered\n ? 'hover'\n : 'active'}\n );\n }\n\n ${$variant === ButtonVariant.secondary\n ? css`\n border: 1px solid\n var(\n --redsift-color-${$theme}-components-buttons-secondary-button-${$color}-text-${$isDisabled ? 'disabled' : $isHovered ? 'hover' : 'active'}\n );\n `\n : ''}\n `\n : css`\n background: var(\n --redsift-color-${$theme}-components-buttons-${$variant}-button-${$color}-background-${$isDisabled\n ? 'disabled'\n : $isHovered\n ? 'hover'\n : 'active'}\n );\n\n ${$variant !== ButtonVariant.primary && !$isDisabled\n ? css`\n path {\n fill: url(#${$color}-gradient-active);\n }\n `\n : ''}\n `}\n `};\n }\n\n ${({ $fullWidth }) =>\n $fullWidth\n ? `\n width: 100%;\n flex-grow: 1;\n `\n : ''}\n\n .redsift-icon.left {\n margin-right: unset;\n align-items: center;\n }\n\n .redsift-icon.right {\n margin-left: unset;\n align-items: center;\n }\n\n ${focusRing}\n`;\n"],"names":["ButtonVariant","primary","secondary","unstyled","StyledButton","styled","button","baseStyling","_ref","$isLoading","css","_ref2","$variant","$color","$isActive","$isDisabled","$isGradient","$isHovered","$theme","_ref3","_ref4","_ref5","$fullWidth","focusRing"],"mappings":";;;AAIA;AACA;AACA;AACO,MAAMA,aAAa,GAAG;AAC3BC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,SAAS,EAAE,WAAW;AACtBC,EAAAA,QAAQ,EAAE,UAAA;AACZ,EAAU;;AAGV;AACA;AACA;;AAGA;AACA;AACA;;ACjBA;AACA;AACA;AACaC,MAAAA,YAAY,GAAGC,MAAM,CAACC,MAA0B,CAAA;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAA,EAAIC,WAAY,CAAA;AAChB;AACA,EAAA,EAAIC,IAAA,IAAA;EAAA,IAAC;AAAEC,IAAAA,UAAAA;AAAW,GAAC,GAAAD,IAAA,CAAA;EAAA,OACfC,UAAU,GACNC,GAAI,CAAA;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAA,CAAS,GACD,EAAE,CAAA;AAAA,CAAC,CAA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A;AACA,MAAA,CAAO,GACC,EAAE,CAAA;AAAA,CAAC,CAAA;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAA,EAAIC,SAAU,CAAA;AACd;;;;"}
|
package/_internal/styles3.js
CHANGED
|
@@ -1,145 +1,47 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
|
-
import {
|
|
3
|
-
import { N as NotificationsColorPalette, g as NeutralColorPalette, e as ProductColorPalette } from './colors.js';
|
|
2
|
+
import { S as StyledButton } from './styles2.js';
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
|
-
* Component
|
|
5
|
+
* Component variant.
|
|
6
|
+
*/
|
|
7
|
+
const IconButtonVariant = {
|
|
8
|
+
primary: 'primary',
|
|
9
|
+
secondary: 'secondary',
|
|
10
|
+
unstyled: 'unstyled'
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Component color.
|
|
7
15
|
*/
|
|
8
|
-
const StyledLink = styled.a`
|
|
9
|
-
background: none;
|
|
10
|
-
border: none;
|
|
11
|
-
color: unset;
|
|
12
|
-
cursor: text !important;
|
|
13
|
-
display: inline-flex;
|
|
14
|
-
gap: 4px;
|
|
15
|
-
align-items: center;
|
|
16
|
-
font-family: var(--redsift-typography-link-font-family);
|
|
17
|
-
font-size: var(--redsift-typography-link-font-size);
|
|
18
|
-
font-weight: var(--redsift-typography-link-font-weight);
|
|
19
|
-
height: var(--redsift-typography-link-line-height);
|
|
20
|
-
line-height: var(--redsift-typography-link-line-height);
|
|
21
|
-
padding: unset;
|
|
22
|
-
position: relative;
|
|
23
|
-
text-decoration: none;
|
|
24
|
-
width: fit-content;
|
|
25
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Component props.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Component style.
|
|
23
|
+
*/
|
|
24
|
+
const StyledIconButton = styled(StyledButton)`
|
|
26
25
|
${_ref => {
|
|
27
26
|
let {
|
|
28
|
-
$
|
|
27
|
+
$variant
|
|
29
28
|
} = _ref;
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}}
|
|
34
|
-
|
|
35
|
-
${baseStyling}
|
|
29
|
+
return css`
|
|
30
|
+
padding: ${$variant === IconButtonVariant.secondary ? '8px' : '9px'};
|
|
31
|
+
`;
|
|
32
|
+
}};
|
|
36
33
|
|
|
37
34
|
${_ref2 => {
|
|
38
35
|
let {
|
|
39
|
-
$
|
|
40
|
-
$color,
|
|
41
|
-
$theme,
|
|
42
|
-
$hasIcons
|
|
36
|
+
$isLoading
|
|
43
37
|
} = _ref2;
|
|
44
|
-
return
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
color: transparent;
|
|
49
|
-
|
|
50
|
-
path {
|
|
51
|
-
fill: url(#${$color}-gradient-default);
|
|
52
|
-
}
|
|
53
|
-
` : Object.keys(NotificationsColorPalette).indexOf($color) !== -1 ? css`
|
|
54
|
-
&,
|
|
55
|
-
.redsift-icon:not(.colored) {
|
|
56
|
-
color: var(--redsift-color-notifications-${$color}-primary);
|
|
57
|
-
}
|
|
58
|
-
` : Object.keys(NeutralColorPalette).indexOf($color) !== -1 ? css`
|
|
59
|
-
&,
|
|
60
|
-
.redsift-icon:not(.colored) {
|
|
61
|
-
color: var(--redsift-color-neutral-${$color});
|
|
62
|
-
}
|
|
63
|
-
` : Object.keys(ProductColorPalette).indexOf($color) !== -1 ? css`
|
|
64
|
-
&,
|
|
65
|
-
.redsift-icon:not(.colored) {
|
|
66
|
-
color: var(--redsift-color-product-${$color});
|
|
67
|
-
}
|
|
68
|
-
` : css`
|
|
69
|
-
&,
|
|
70
|
-
.redsift-icon:not(.colored) {
|
|
71
|
-
color: ${$color || css`var(--redsift-color-${$theme}-components-text-primary)`};
|
|
72
|
-
}
|
|
73
|
-
`}}
|
|
74
|
-
|
|
75
|
-
${$color && $color === 'radar' && !$hasIcons ? css`
|
|
76
|
-
position: relative;
|
|
77
|
-
|
|
78
|
-
&:hover,
|
|
79
|
-
&:focus-visible {
|
|
80
|
-
cursor: pointer !important;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
&:hover::before,
|
|
84
|
-
&:focus-visible::before {
|
|
85
|
-
content: '';
|
|
86
|
-
position: absolute;
|
|
87
|
-
bottom: 3px;
|
|
88
|
-
width: 100%;
|
|
89
|
-
left: 0;
|
|
90
|
-
height: 1px;
|
|
91
|
-
background: linear-gradient(90deg, #51b78e 0%, #0081c3 100%);
|
|
92
|
-
}
|
|
93
|
-
` : $color && $color === 'radar' && $hasIcons ? css`
|
|
94
|
-
position: relative;
|
|
95
|
-
|
|
96
|
-
&:hover,
|
|
97
|
-
&:focus-visible {
|
|
98
|
-
cursor: pointer !important;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.text::before {
|
|
102
|
-
content: '';
|
|
103
|
-
position: absolute;
|
|
104
|
-
bottom: 3px;
|
|
105
|
-
width: 100%;
|
|
106
|
-
left: 0;
|
|
107
|
-
height: 1px;
|
|
108
|
-
background: linear-gradient(90deg, #51b78e 0%, #0081c3 100%);
|
|
109
|
-
transform: scaleX(0);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
&:hover .text::before,
|
|
113
|
-
.icon:hover + .text::before,
|
|
114
|
-
.text:hover::before {
|
|
115
|
-
transform: scaleX(1);
|
|
116
|
-
}
|
|
117
|
-
` : css`
|
|
118
|
-
text-decoration: underline;
|
|
119
|
-
text-decoration-color: transparent;
|
|
120
|
-
text-underline-offset: 2px;
|
|
121
|
-
|
|
122
|
-
&:hover,
|
|
123
|
-
&:focus-visible {
|
|
124
|
-
cursor: pointer !important;
|
|
125
|
-
${Object.keys(NotificationsColorPalette).indexOf($color) !== -1 ? css`
|
|
126
|
-
text-decoration-color: var(--redsift-color-notifications-${$color}-primary);
|
|
127
|
-
` : Object.keys(NeutralColorPalette).indexOf($color) !== -1 ? css`
|
|
128
|
-
text-decoration-color: var(--redsift-color-neutral-${$color});
|
|
129
|
-
` : Object.keys(ProductColorPalette).indexOf($color) !== -1 ? css`
|
|
130
|
-
text-decoration-color: var(--redsift-color-product-${$color});
|
|
131
|
-
` : css`
|
|
132
|
-
text-decoration-color: ${$color || css`var(--redsift-color-${$theme}-components-text-primary)`};
|
|
133
|
-
`}
|
|
134
|
-
}
|
|
135
|
-
`}
|
|
38
|
+
return $isLoading ? css`
|
|
39
|
+
& > .redsift-shield {
|
|
40
|
+
position: relative;
|
|
41
|
+
}
|
|
136
42
|
` : '';
|
|
137
43
|
}}
|
|
138
|
-
|
|
139
|
-
&:focus-visible {
|
|
140
|
-
outline: 2px solid var(--redsift-color-primary-n);
|
|
141
|
-
}
|
|
142
44
|
`;
|
|
143
45
|
|
|
144
|
-
export {
|
|
46
|
+
export { IconButtonVariant as I, StyledIconButton as S };
|
|
145
47
|
//# sourceMappingURL=styles3.js.map
|