@cruk/cruk-react-components 1.1.4 → 1.1.5

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.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("../../../node_modules/tslib/tslib.es6.js"),o=require("styled-components");function r(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var t,e,c,a,i,l,d,s,u=r(o),b=u.default.span(t||(t=n.__makeTemplateObject(["\n margin-left: ",";\n &:first-of-type {\n margin-left: 0;\n }\n"],["\n margin-left: ",";\n &:first-of-type {\n margin-left: 0;\n }\n"])),(function(n){return n.theme.spacing.xxs})),m=u.default.button(s||(s=n.__makeTemplateObject(["\n box-sizing: border-box;\n min-height: ",";\n display: inline-block;\n vertical-align: middle;\n padding: ",";\n width: ",";\n min-width: ",";\n\n border-radius: ",";\n border-style: solid;\n border-width: ",";\n\n transition: color 0.2s ease, background-color 0.2s ease,\n border-color 0.2s ease;\n\n cursor: pointer;\n font-size: ",";\n font-family: ",";\n font-weight: ",";\n text-align: center;\n text-transform: ",";\n text-decoration: ",";\n\n &:focus-visible {\n outline: auto;\n }\n\n ","\n\n ","\n\n ","\n \n ","\n\n ","\n\n ","\n"],["\n box-sizing: border-box;\n min-height: ",";\n display: inline-block;\n vertical-align: middle;\n padding: ",";\n width: ",";\n min-width: ",";\n\n border-radius: ",";\n border-style: solid;\n border-width: ",";\n\n transition: color 0.2s ease, background-color 0.2s ease,\n border-color 0.2s ease;\n\n cursor: pointer;\n font-size: ",";\n font-family: ",";\n font-weight: ",";\n text-align: center;\n text-transform: ",";\n text-decoration: ",";\n\n &:focus-visible {\n outline: auto;\n }\n\n ","\n\n ","\n\n ","\n \n ","\n\n ","\n\n ","\n"])),"3rem",(function(n){var o=n.theme;return n.isIconButton?"0":"calc( (".concat("3rem"," - ( ").concat(o.button.buttonBorderThickness," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.spacing.m)}),(function(n){return n.isIconButton?"".concat("3rem"):"auto"}),(function(n){return n.isIconButton?"".concat("3rem"):"auto"}),(function(n){return n.theme.button.borderRadius}),(function(n){return n.theme.button.buttonBorderThickness}),(function(n){return n.theme.fontSizes.m}),(function(n){return n.theme.typography.fontFamilyHeadings}),(function(n){return n.theme.typography.fontWeightMedium}),(function(n){return n.theme.button.textTransform}),(function(n){return n.theme.button.textDecoration}),(function(r){return"primary"===r.appearance&&o.css(e||(e=n.__makeTemplateObject(["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "],["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "])),r.theme.colors.buttonPrimaryBackground,r.theme.colors.buttonPrimaryBorder,r.theme.colors.buttonPrimaryText,r.theme.colors.buttonPrimaryBackgroundHover,r.theme.colors.buttonPrimaryBorderHover,r.theme.colors.buttonPrimaryTextHover,r.theme.colors.buttonPrimaryDisabledBackground,r.theme.colors.buttonPrimaryDisabledText,r.theme.colors.buttonPrimaryDisabledBorder)}),(function(r){return"secondary"===r.appearance&&o.css(c||(c=n.__makeTemplateObject(["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "],["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "])),r.theme.colors.buttonSecondaryBackground,r.theme.colors.buttonSecondaryBorder,r.theme.colors.buttonSecondaryText,r.theme.colors.buttonSecondaryBackgroundHover,r.theme.colors.buttonSecondaryBorderHover,r.theme.colors.buttonSecondaryTextHover,r.theme.colors.buttonSecondaryDisabledBackground,r.theme.colors.buttonSecondaryDisabledText,r.theme.colors.buttonSecondaryDisabledBorder)}),(function(r){return"tertiary"===r.appearance&&o.css(a||(a=n.__makeTemplateObject(["\n display: inline-block;\n padding: 0;\n border: 0px;\n background-color: rgba(255, 255, 255, 0);\n transition: color 0.2s ease;\n color: ",";\n :focus,\n :hover {\n color: ",";\n }\n :disabled {\n cursor: not-allowed;\n background-color: transparent;\n color: "," !important;\n border-color: transparent;\n }\n "],["\n display: inline-block;\n padding: 0;\n border: 0px;\n background-color: rgba(255, 255, 255, 0);\n transition: color 0.2s ease;\n color: ",";\n :focus,\n :hover {\n color: ",";\n }\n :disabled {\n cursor: not-allowed;\n background-color: transparent;\n color: "," !important;\n border-color: transparent;\n }\n "])),r.theme.colors.buttonTertiaryText,r.theme.colors.buttonTertiaryTextHover,r.theme.colors.buttonTertiaryDisabledText)}),(function(r){return"l"===r.size&&o.css(i||(i=n.__makeTemplateObject(["\n min-height: ",";\n border-radius: ",";\n padding: ",";\n min-width: ",";\n height: ",";\n "],["\n min-height: ",";\n border-radius: ",";\n padding: ",";\n min-width: ",";\n height: ",";\n "])),"4rem",(function(n){return n.theme.button.borderRadiusLarge}),(function(n){var o=n.theme;return n.isIconButton?"0":"calc( (".concat("4rem"," - ( ").concat(o.button.buttonBorderThickness," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.spacing.m)}),(function(n){return n.isIconButton?"".concat("4rem"):"auto"}),(function(n){return n.isIconButton?"".concat("4rem"):"min-content"}))}),(function(r){return r.full&&o.css(l||(l=n.__makeTemplateObject(["\n width: 100%;\n "],["\n width: 100%;\n "])))}),(function(r){return r.css&&o.css(d||(d=n.__makeTemplateObject(["\n ","\n "],["\n ","\n "])),r.css)}));exports.Spacer=b,exports.StyledButton=m;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("../../../node_modules/tslib/tslib.es6.js"),o=require("styled-components");function r(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var t,e,c,a,i,l,d,s,u=r(o),b=u.default.span(t||(t=n.__makeTemplateObject(["\n margin-left: ",";\n &:first-of-type {\n margin-left: 0;\n }\n"],["\n margin-left: ",";\n &:first-of-type {\n margin-left: 0;\n }\n"])),(function(n){return n.theme.spacing.xxs})),m=u.default.button(s||(s=n.__makeTemplateObject(["\n box-sizing: border-box;\n min-height: ",';\n height: "min-content";\n display: inline-block;\n vertical-align: middle;\n padding: ',";\n width: ",";\n min-width: ",";\n\n border-radius: ",";\n border-style: solid;\n border-width: ",";\n\n transition: color 0.2s ease, background-color 0.2s ease,\n border-color 0.2s ease;\n\n cursor: pointer;\n font-size: ",";\n font-family: ",";\n font-weight: ",";\n text-align: center;\n text-transform: ",";\n text-decoration: ",";\n\n &:focus-visible {\n outline: auto;\n }\n\n ","\n\n ","\n\n ","\n \n ","\n\n ","\n\n ","\n"],["\n box-sizing: border-box;\n min-height: ",';\n height: "min-content";\n display: inline-block;\n vertical-align: middle;\n padding: ',";\n width: ",";\n min-width: ",";\n\n border-radius: ",";\n border-style: solid;\n border-width: ",";\n\n transition: color 0.2s ease, background-color 0.2s ease,\n border-color 0.2s ease;\n\n cursor: pointer;\n font-size: ",";\n font-family: ",";\n font-weight: ",";\n text-align: center;\n text-transform: ",";\n text-decoration: ",";\n\n &:focus-visible {\n outline: auto;\n }\n\n ","\n\n ","\n\n ","\n \n ","\n\n ","\n\n ","\n"])),"3rem",(function(n){var o=n.theme;return n.isIconButton?"0":"calc( (".concat("3rem"," - ( ").concat(o.button.buttonBorderThickness," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.spacing.m)}),(function(n){return n.isIconButton?"".concat("3rem"):"auto"}),(function(n){return n.isIconButton?"".concat("3rem"):"auto"}),(function(n){return n.theme.button.borderRadius}),(function(n){return n.theme.button.buttonBorderThickness}),(function(n){return n.theme.fontSizes.m}),(function(n){return n.theme.typography.fontFamilyHeadings}),(function(n){return n.theme.typography.fontWeightMedium}),(function(n){return n.theme.button.textTransform}),(function(n){return n.theme.button.textDecoration}),(function(r){return"primary"===r.appearance&&o.css(e||(e=n.__makeTemplateObject(["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "],["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "])),r.theme.colors.buttonPrimaryBackground,r.theme.colors.buttonPrimaryBorder,r.theme.colors.buttonPrimaryText,r.theme.colors.buttonPrimaryBackgroundHover,r.theme.colors.buttonPrimaryBorderHover,r.theme.colors.buttonPrimaryTextHover,r.theme.colors.buttonPrimaryDisabledBackground,r.theme.colors.buttonPrimaryDisabledText,r.theme.colors.buttonPrimaryDisabledBorder)}),(function(r){return"secondary"===r.appearance&&o.css(c||(c=n.__makeTemplateObject(["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "],["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "])),r.theme.colors.buttonSecondaryBackground,r.theme.colors.buttonSecondaryBorder,r.theme.colors.buttonSecondaryText,r.theme.colors.buttonSecondaryBackgroundHover,r.theme.colors.buttonSecondaryBorderHover,r.theme.colors.buttonSecondaryTextHover,r.theme.colors.buttonSecondaryDisabledBackground,r.theme.colors.buttonSecondaryDisabledText,r.theme.colors.buttonSecondaryDisabledBorder)}),(function(r){return"tertiary"===r.appearance&&o.css(a||(a=n.__makeTemplateObject(["\n display: inline-block;\n padding: 0;\n border: 0px;\n background-color: rgba(255, 255, 255, 0);\n transition: color 0.2s ease;\n color: ",";\n :focus,\n :hover {\n color: ",";\n }\n :disabled {\n cursor: not-allowed;\n background-color: transparent;\n color: "," !important;\n border-color: transparent;\n }\n "],["\n display: inline-block;\n padding: 0;\n border: 0px;\n background-color: rgba(255, 255, 255, 0);\n transition: color 0.2s ease;\n color: ",";\n :focus,\n :hover {\n color: ",";\n }\n :disabled {\n cursor: not-allowed;\n background-color: transparent;\n color: "," !important;\n border-color: transparent;\n }\n "])),r.theme.colors.buttonTertiaryText,r.theme.colors.buttonTertiaryTextHover,r.theme.colors.buttonTertiaryDisabledText)}),(function(r){return"l"===r.size&&o.css(i||(i=n.__makeTemplateObject(["\n min-height: ",";\n border-radius: ",";\n padding: ",";\n min-width: ",";\n height: ",";\n "],["\n min-height: ",";\n border-radius: ",";\n padding: ",";\n min-width: ",";\n height: ",";\n "])),"4rem",(function(n){return n.theme.button.borderRadiusLarge}),(function(n){var o=n.theme;return n.isIconButton?"0":"calc( (".concat("4rem"," - ( ").concat(o.button.buttonBorderThickness," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.spacing.m)}),(function(n){return n.isIconButton?"".concat("4rem"):"auto"}),(function(n){return n.isIconButton?"".concat("4rem"):"min-content"}))}),(function(r){return r.full&&o.css(l||(l=n.__makeTemplateObject(["\n width: 100%;\n "],["\n width: 100%;\n "])))}),(function(r){return r.css&&o.css(d||(d=n.__makeTemplateObject(["\n ","\n "],["\n ","\n "])),r.css)}));exports.Spacer=b,exports.StyledButton=m;
2
2
  //# sourceMappingURL=styles.js.map
@@ -3,6 +3,7 @@ import { Props } from ".";
3
3
  declare const _default: Meta<Props>;
4
4
  export default _default;
5
5
  export declare const Primary: Story;
6
+ export declare const PrimaryAnchorButton: Story;
6
7
  export declare const Secondary: Story;
7
8
  export declare const Tertiary: Story;
8
9
  export declare const WithIcons: Story;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Font Awesome Free 6.1.1 by @fontawesome - https://fontawesome.com
2
+ * Font Awesome Free 6.1.2 by @fontawesome - https://fontawesome.com
3
3
  * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4
4
  * Copyright 2022 Fonticons, Inc.
5
5
  */