@cruk/chakra-components 0.1.0-alpha.2 → 0.1.0-alpha.3

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.
Files changed (35) hide show
  1. package/dist/cjs/packages/components/src/components/Breadcrumb/index.js +1 -1
  2. package/dist/cjs/packages/components/src/components/Card/index.js +1 -1
  3. package/dist/cjs/packages/components/src/components/Heading/index.js +1 -1
  4. package/dist/cjs/packages/components/src/components/Image/index.js +1 -1
  5. package/dist/cjs/packages/components/src/components/PopOver/index.js +1 -1
  6. package/dist/esm/packages/components/src/components/Breadcrumb/index.js +1 -1
  7. package/dist/esm/packages/components/src/components/Card/index.js +1 -1
  8. package/dist/esm/packages/components/src/components/Heading/index.js +1 -1
  9. package/dist/esm/packages/components/src/components/Image/index.js +1 -1
  10. package/dist/esm/packages/components/src/components/PopOver/index.js +1 -1
  11. package/dist/fonts/Poppins-Bold.woff +0 -0
  12. package/dist/fonts/Poppins-Light.woff +0 -0
  13. package/dist/fonts/Poppins-LightItalic.woff +0 -0
  14. package/dist/fonts/Poppins-Medium.woff +0 -0
  15. package/dist/fonts/Poppins-Regular.woff +0 -0
  16. package/dist/fonts/Poppins-SemiBold.woff +0 -0
  17. package/dist/fonts/Progress-Light.woff +0 -0
  18. package/dist/fonts/Progress-Medium.woff +0 -0
  19. package/dist/fonts/Progress-Regular.woff +0 -0
  20. package/dist/fonts/Progress-SemiBold.woff +0 -0
  21. package/dist/fonts/poppins/Poppins-Bold.woff +0 -0
  22. package/dist/fonts/poppins/Poppins-Light.woff +0 -0
  23. package/dist/fonts/poppins/Poppins-LightItalic.woff +0 -0
  24. package/dist/fonts/poppins/Poppins-Medium.woff +0 -0
  25. package/dist/fonts/poppins/Poppins-Regular.woff +0 -0
  26. package/dist/fonts/poppins/Poppins-SemiBold.woff +0 -0
  27. package/dist/fonts/progress/Progress-Light.woff +0 -0
  28. package/dist/fonts/progress/Progress-Medium.woff +0 -0
  29. package/dist/fonts/progress/Progress-Regular.woff +0 -0
  30. package/dist/fonts/progress/Progress-SemiBold.woff +0 -0
  31. package/dist/types/src/components/Card/index.d.ts.map +1 -1
  32. package/dist/types/src/components/Image/index.d.ts.map +1 -1
  33. package/dist/types/src/components/PopOver/index.d.ts +1 -1
  34. package/dist/types/src/components/PopOver/index.d.ts.map +1 -1
  35. package/package.json +5 -3
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),t=require("@chakra-ui/icons"),a=require("@chakra-ui/react");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=i(require("react")),u=a.forwardRef((function(t,i){var n=t.children,u=t.variant,l=void 0===u?"breadcrumb-link":u,c=e.__rest(t,["children","variant"]);return r.jsx(a.BreadcrumbLink,e.__assign({"data-cta-variant":l,ref:i},c,{children:n}))})),l=a.forwardRef((function(i,l){var c=i.children,d=void 0===c?[]:c,o=e.__rest(i,["children"]),s=a.useBreakpointValue({base:!1,xl:!0},{fallback:"xl"}),f=n.default.Children.toArray(d).filter((function(e){return n.default.isValidElement(e)&&e.type===a.BreadcrumbItem})),b=a.useControllableState({defaultValue:f.length>3}),h=b[0],m=b[1];return r.jsx(a.Breadcrumb,e.__assign({separator:r.jsx(t.ChevronRightIcon,{color:"linkColor",boxSize:"6","aria-hidden":"true"}),ref:l},o,{children:s||!h?f:[f[0],r.jsx(a.BreadcrumbItem,{children:r.jsx(u,{variant:"breadcrumb-ellipsis",onClick:function(e){e.preventDefault(),m(!1)},children:"..."})}),f[f.length-2],f[f.length-1]]}))}));Object.defineProperty(exports,"BreadcrumbItem",{enumerable:!0,get:function(){return a.BreadcrumbItem}}),exports.Breadcrumb=l,exports.BreadcrumbLink=u;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),t=require("@chakra-ui/icons"),a=require("@chakra-ui/react");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=i(require("react")),u=a.forwardRef((function(t,i){var n=t.children,u=t.variant,l=void 0===u?"breadcrumb-link":u,c=e.__rest(t,["children","variant"]);return r.jsx(a.BreadcrumbLink,e.__assign({"data-cta-variant":l,ref:i},c,{children:n}))})),l=a.forwardRef((function(i,l){var c=i.children,d=void 0===c?[]:c,o=e.__rest(i,["children"]),s=a.useBreakpointValue({base:!1,xl:!0},{fallback:"xl"}),b=n.default.Children.toArray(d).filter((function(e){return n.default.isValidElement(e)&&e.type===a.BreadcrumbItem})),f=a.useControllableState({defaultValue:b.length>3}),m=f[0],h=f[1];return r.jsx(a.Breadcrumb,e.__assign({separator:r.jsx(t.ChevronRightIcon,{color:"linkColor",boxSize:"6","aria-hidden":"true"}),ref:l},o,{children:s||!m?b:[b[0],r.jsx(a.BreadcrumbItem,{children:r.jsx(u,{variant:"breadcrumb-ellipsis",onClick:function(e){e.preventDefault(),h(!1)},children:"..."})},"breadcrumb-ellipsis"),b[b.length-2],b[b.length-1]]}))}));Object.defineProperty(exports,"BreadcrumbItem",{enumerable:!0,get:function(){return a.BreadcrumbItem}}),exports.Breadcrumb=l,exports.BreadcrumbLink=u;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_tslib.js"),i=require("react/jsx-runtime"),n=require("@chakra-ui/icons"),r=require("@chakra-ui/react"),s=require("../Button/index.js");require("../Flex/index.js");var a=require("../Heading/index.js"),t=require("../Icon/index.js"),o=require("../Image/index.js"),d=require("../Link/index.js"),c=require("../Text/index.js"),l=r.forwardRef((function(l,u){var x=l.variant,g=void 0===x?"unstyled":x,j=l.image,_=l.icon,h=l.label,p=l.heading,m=l.description,f=l.button,v=l.link,b=e.__rest(l,["variant","image","icon","label","heading","description","button","link"]);return i.jsxs(r.Card,e.__assign({ref:u,variant:g},b,{children:[j&&i.jsx((function(n){var s=n.as,a=n.src,t=n.alt,d=n.width,c=n.height,l=e.__rest(n,["as","src","alt","width","height"]);return i.jsx(r.AspectRatio,e.__assign({ratio:1},l,{children:i.jsx(o.Image,{as:s,src:a,alt:t,width:d,height:c})}))}),e.__assign({},j)),_&&i.jsx(t.Icon,{name:_.name}),i.jsxs(r.Stack,{width:"100%",spacing:4,children:[i.jsx(r.CardBody,{children:i.jsxs(r.Stack,{spacing:2,children:[h&&i.jsx(c.Text,{bgColor:"cardTextBackgroundColor",variant:"caption",fontFamily:"poppins.medium",color:"cardTextColor",width:"fit-content",py:1,px:3,children:h}),p&&i.jsxs(r.Flex,{justifyContent:"space-between",alignItems:"center",width:"100%",children:[i.jsx(a.Heading4,e.__assign({},p)),"navigation"===g&&i.jsx(t.Icon,{as:n.ArrowForwardIcon,boxSize:6,p:0})]}),m]})}),(f||v)&&i.jsxs(r.CardFooter,{alignItems:"flex-start",children:[f&&i.jsx(s.Button,e.__assign({},f)),v&&i.jsx(d.Link,e.__assign({},v))]})]})]}))})),u=r.forwardRef((function(n,t){var o=n.heading,c=n.description,u=n.hasSteps,x=void 0!==u&&u,g=n.numberOfColumns,j=n.cards,_=n.link,h=n.button,p=n.gridGap,m=void 0===p?{base:6,lg:8,xl:10}:p,f=e.__rest(n,["heading","description","hasSteps","numberOfColumns","cards","link","button","gridGap"]);return i.jsxs(r.Stack,e.__assign({ref:t,spacing:6},f,{children:[o&&i.jsx(a.Heading2,e.__assign({},o)),c,j&&i.jsx(r.SimpleGrid,{columns:g,gap:m,children:j.map((function(n,r){return i.jsx(l,e.__assign({label:x?"Step: ".concat(r+1):void 0},n),"card-item-".concat(r))}))}),h&&i.jsx(s.Button,e.__assign({},h)),_&&i.jsx(d.Link,e.__assign({},_))]}))}));exports.Card=l,exports.CardStack=u;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_tslib.js"),i=require("react/jsx-runtime"),n=require("@chakra-ui/icons"),r=require("@chakra-ui/react"),s=require("../Button/index.js");require("../Flex/index.js");var a=require("../Heading/index.js"),t=require("../Icon/index.js"),o=require("../Image/index.js"),d=require("../Link/index.js"),c=require("../Text/index.js"),l=r.forwardRef((function(l,u){var x=l.variant,g=void 0===x?"unstyled":x,j=l.image,_=l.icon,h=l.label,p=l.heading,m=l.description,f=l.button,v=l.link,b=e.__rest(l,["variant","image","icon","label","heading","description","button","link"]);return i.jsxs(r.Card,e.__assign({ref:u,variant:g},b,{children:[j&&i.jsx((function(n){var s=n.as,a=n.src,t=n.alt,d=n.width,c=n.height,l=n.style,u=e.__rest(n,["as","src","alt","width","height","style"]);return i.jsx(r.AspectRatio,e.__assign({ratio:1},u,{children:i.jsx(o.Image,{as:s,src:a,alt:t,width:d,height:c,style:l})}))}),e.__assign({},j)),_&&i.jsx(t.Icon,{name:_.name}),i.jsxs(r.Stack,{width:"100%",spacing:4,children:[i.jsx(r.CardBody,{children:i.jsxs(r.Stack,{spacing:2,children:[h&&i.jsx(c.Text,{bgColor:"cardTextBackgroundColor",variant:"caption",fontFamily:"poppins.medium",color:"cardTextColor",width:"fit-content",py:1,px:3,children:h}),p&&i.jsxs(r.Flex,{justifyContent:"space-between",alignItems:"center",width:"100%",children:[i.jsx(a.Heading4,e.__assign({},p)),"navigation"===g&&i.jsx(t.Icon,{as:n.ArrowForwardIcon,boxSize:6,p:0})]}),m]})}),(f||v)&&i.jsxs(r.CardFooter,{alignItems:"flex-start",children:[f&&i.jsx(s.Button,e.__assign({},f)),v&&i.jsx(d.Link,e.__assign({},v))]})]})]}))})),u=r.forwardRef((function(n,t){var o=n.heading,c=n.description,u=n.hasSteps,x=void 0!==u&&u,g=n.numberOfColumns,j=n.cards,_=n.link,h=n.button,p=n.gridGap,m=void 0===p?{base:6,lg:8,xl:10}:p,f=e.__rest(n,["heading","description","hasSteps","numberOfColumns","cards","link","button","gridGap"]);return i.jsxs(r.Stack,e.__assign({ref:t,spacing:6},f,{children:[o&&i.jsx(a.Heading2,e.__assign({},o)),c,j&&i.jsx(r.SimpleGrid,{columns:g,gap:m,children:j.map((function(n,r){return i.jsx(l,e.__assign({label:x?"Step: ".concat(r+1):void 0},n),"card-item-".concat(r))}))}),h&&i.jsx(s.Button,e.__assign({},h)),_&&i.jsx(d.Link,e.__assign({},_))]}))}));exports.Card=l,exports.CardStack=u;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_tslib.js"),s=require("react/jsx-runtime"),r=require("@chakra-ui/react"),i=r.forwardRef((function(i,a){return s.jsx(r.Heading,e.__assign({ref:a},i))})),a=r.forwardRef((function(r,a){return s.jsx(i,e.__assign({as:"h1",size:{base:"3xl",lg:"4xl"},ref:a},r))})),n=r.forwardRef((function(r,a){return s.jsx(i,e.__assign({as:"h2",size:{base:"2xl",lg:"3xl"},ref:a},r))})),t=r.forwardRef((function(r,a){return s.jsx(i,e.__assign({as:"h3",size:{base:"lg",lg:"xl"},ref:a},r))})),f=r.forwardRef((function(r,a){return s.jsx(i,e.__assign({as:"h4",size:{base:"md",lg:"lg"},fontFamily:"poppins.medium",ref:a},r))})),o=r.forwardRef((function(r,a){return s.jsx(i,e.__assign({as:"h5",size:{base:"sm",lg:"md"},fontFamily:"poppins.medium",ref:a},r))})),u=r.forwardRef((function(r,a){return s.jsx(i,e.__assign({as:"h6",size:{base:"xs",lg:"sm"},fontFamily:"poppins.medium",ref:a},r))}));exports.Heading=i,exports.Heading1=a,exports.Heading2=n,exports.Heading3=t,exports.Heading4=f,exports.Heading5=o,exports.Heading6=u;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),s=require("@chakra-ui/react"),a=s.forwardRef((function(a,i){return r.jsx(s.Heading,e.__assign({ref:i},a,{wordBreak:"break-word"}))})),i=s.forwardRef((function(s,i){return r.jsx(a,e.__assign({as:"h1",size:{base:"3xl",lg:"4xl"},ref:i},s))})),n=s.forwardRef((function(s,i){return r.jsx(a,e.__assign({as:"h2",size:{base:"2xl",lg:"3xl"},ref:i},s))})),t=s.forwardRef((function(s,i){return r.jsx(a,e.__assign({as:"h3",size:{base:"lg",lg:"xl"},ref:i},s))})),f=s.forwardRef((function(s,i){return r.jsx(a,e.__assign({as:"h4",size:{base:"md",lg:"lg"},fontFamily:"poppins.medium",ref:i},s))})),o=s.forwardRef((function(s,i){return r.jsx(a,e.__assign({as:"h5",size:{base:"sm",lg:"md"},fontFamily:"poppins.medium",ref:i},s))})),u=s.forwardRef((function(s,i){return r.jsx(a,e.__assign({as:"h6",size:{base:"xs",lg:"sm"},fontFamily:"poppins.medium",ref:i},s))}));exports.Heading=a,exports.Heading1=i,exports.Heading2=n,exports.Heading3=t,exports.Heading4=f,exports.Heading5=o,exports.Heading6=u;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("../../../../../_virtual/_tslib.js"),e=require("react/jsx-runtime"),a=require("@chakra-ui/react"),i=["src","width","height","alt","fill","sizes","quality","priority","placeholder","onLoadingComplete","onLoad","onError","loading","blurDataURL"],t=a.forwardRef((function(t,o){var s=a.chakra(a.Image,{shouldForwardProp:function(r){return i.includes(r)}});return e.jsx(s,r.__assign({ref:o},t))}));t.displayName="Image",exports.Image=t;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("../../../../../_virtual/_tslib.js"),e=require("react/jsx-runtime"),a=require("@chakra-ui/react"),i=["src","width","height","alt","fill","sizes","quality","priority","placeholder","style","onLoadingComplete","onLoad","onError","loading","blurDataURL"],t=a.forwardRef((function(t,o){var s=a.chakra(a.Image,{shouldForwardProp:function(r){return i.includes(r)}});return e.jsx(s,r.__assign({ref:o},t))}));t.displayName="Image",exports.Image=t;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),o=require("@chakra-ui/react"),t=o.forwardRef((function(t){return r.jsx(o.Popover,e.__assign({},t))}));Object.defineProperty(exports,"PopoverAnchor",{enumerable:!0,get:function(){return o.PopoverAnchor}}),Object.defineProperty(exports,"PopoverArrow",{enumerable:!0,get:function(){return o.PopoverArrow}}),Object.defineProperty(exports,"PopoverBody",{enumerable:!0,get:function(){return o.PopoverBody}}),Object.defineProperty(exports,"PopoverCloseButton",{enumerable:!0,get:function(){return o.PopoverCloseButton}}),Object.defineProperty(exports,"PopoverContent",{enumerable:!0,get:function(){return o.PopoverContent}}),Object.defineProperty(exports,"PopoverFooter",{enumerable:!0,get:function(){return o.PopoverFooter}}),Object.defineProperty(exports,"PopoverHeader",{enumerable:!0,get:function(){return o.PopoverHeader}}),Object.defineProperty(exports,"PopoverTrigger",{enumerable:!0,get:function(){return o.PopoverTrigger}}),exports.Popover=t;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),o=require("@chakra-ui/react");Object.defineProperty(exports,"PopoverAnchor",{enumerable:!0,get:function(){return o.PopoverAnchor}}),Object.defineProperty(exports,"PopoverArrow",{enumerable:!0,get:function(){return o.PopoverArrow}}),Object.defineProperty(exports,"PopoverBody",{enumerable:!0,get:function(){return o.PopoverBody}}),Object.defineProperty(exports,"PopoverCloseButton",{enumerable:!0,get:function(){return o.PopoverCloseButton}}),Object.defineProperty(exports,"PopoverContent",{enumerable:!0,get:function(){return o.PopoverContent}}),Object.defineProperty(exports,"PopoverFooter",{enumerable:!0,get:function(){return o.PopoverFooter}}),Object.defineProperty(exports,"PopoverHeader",{enumerable:!0,get:function(){return o.PopoverHeader}}),Object.defineProperty(exports,"PopoverTrigger",{enumerable:!0,get:function(){return o.PopoverTrigger}}),exports.Popover=function(t){return r.jsx(o.Popover,e.__assign({},t))};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{__rest as r,__assign as e}from"../../../../../_virtual/_tslib.js";import{jsx as a}from"react/jsx-runtime";import{ChevronRightIcon as i}from"@chakra-ui/icons";import{forwardRef as t,BreadcrumbLink as n,useBreakpointValue as l,BreadcrumbItem as c,useControllableState as o,Breadcrumb as d}from"@chakra-ui/react";export{BreadcrumbItem}from"@chakra-ui/react";import u from"react";var m=t((function(i,t){var l=i.children,c=i.variant,o=void 0===c?"breadcrumb-link":c,d=r(i,["children","variant"]);return a(n,e({"data-cta-variant":o,ref:t},d,{children:l}))})),f=t((function(t,n){var f=t.children,h=void 0===f?[]:f,b=r(t,["children"]),p=l({base:!1,xl:!0},{fallback:"xl"}),s=u.Children.toArray(h).filter((function(r){return u.isValidElement(r)&&r.type===c})),v=o({defaultValue:s.length>3}),k=v[0],x=v[1];return a(d,e({separator:a(i,{color:"linkColor",boxSize:"6","aria-hidden":"true"}),ref:n},b,{children:p||!k?s:[s[0],a(c,{children:a(m,{variant:"breadcrumb-ellipsis",onClick:function(r){r.preventDefault(),x(!1)},children:"..."})}),s[s.length-2],s[s.length-1]]}))}));export{f as Breadcrumb,m as BreadcrumbLink};
1
+ import{__rest as r,__assign as e}from"../../../../../_virtual/_tslib.js";import{jsx as a}from"react/jsx-runtime";import{ChevronRightIcon as i}from"@chakra-ui/icons";import{forwardRef as t,BreadcrumbLink as n,useBreakpointValue as l,BreadcrumbItem as c,useControllableState as o,Breadcrumb as d}from"@chakra-ui/react";export{BreadcrumbItem}from"@chakra-ui/react";import u from"react";var m=t((function(i,t){var l=i.children,c=i.variant,o=void 0===c?"breadcrumb-link":c,d=r(i,["children","variant"]);return a(n,e({"data-cta-variant":o,ref:t},d,{children:l}))})),f=t((function(t,n){var f=t.children,h=void 0===f?[]:f,b=r(t,["children"]),s=l({base:!1,xl:!0},{fallback:"xl"}),p=u.Children.toArray(h).filter((function(r){return u.isValidElement(r)&&r.type===c})),v=o({defaultValue:p.length>3}),k=v[0],x=v[1];return a(d,e({separator:a(i,{color:"linkColor",boxSize:"6","aria-hidden":"true"}),ref:n},b,{children:s||!k?p:[p[0],a(c,{children:a(m,{variant:"breadcrumb-ellipsis",onClick:function(r){r.preventDefault(),x(!1)},children:"..."})},"breadcrumb-ellipsis"),p[p.length-2],p[p.length-1]]}))}));export{f as Breadcrumb,m as BreadcrumbLink};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{__rest as i,__assign as n}from"../../../../../_virtual/_tslib.js";import{jsxs as r,jsx as t}from"react/jsx-runtime";import{ArrowForwardIcon as e}from"@chakra-ui/icons";import{forwardRef as a,Card as o,Stack as c,CardBody as d,Flex as s,CardFooter as l,SimpleGrid as m,AspectRatio as p}from"@chakra-ui/react";import{Button as h}from"../Button/index.js";import"../Flex/index.js";import{Heading4 as u,Heading2 as g}from"../Heading/index.js";import{Icon as f}from"../Icon/index.js";import{Image as x}from"../Image/index.js";import{Link as b}from"../Link/index.js";import{Text as v}from"../Text/index.js";var j=a((function(a,m){var g=a.variant,j=void 0===g?"unstyled":g,k=a.image,w=a.icon,C=a.label,y=a.heading,I=a.description,S=a.button,T=a.link,B=i(a,["variant","image","icon","label","heading","description","button","link"]);return r(o,n({ref:m,variant:j},B,{children:[k&&t((function(r){var e=r.as,a=r.src,o=r.alt,c=r.width,d=r.height,s=i(r,["as","src","alt","width","height"]);return t(p,n({ratio:1},s,{children:t(x,{as:e,src:a,alt:o,width:c,height:d})}))}),n({},k)),w&&t(f,{name:w.name}),r(c,{width:"100%",spacing:4,children:[t(d,{children:r(c,{spacing:2,children:[C&&t(v,{bgColor:"cardTextBackgroundColor",variant:"caption",fontFamily:"poppins.medium",color:"cardTextColor",width:"fit-content",py:1,px:3,children:C}),y&&r(s,{justifyContent:"space-between",alignItems:"center",width:"100%",children:[t(u,n({},y)),"navigation"===j&&t(f,{as:e,boxSize:6,p:0})]}),I]})}),(S||T)&&r(l,{alignItems:"flex-start",children:[S&&t(h,n({},S)),T&&t(b,n({},T))]})]})]}))})),k=a((function(e,a){var o=e.heading,d=e.description,s=e.hasSteps,l=void 0!==s&&s,p=e.numberOfColumns,u=e.cards,f=e.link,x=e.button,v=e.gridGap,k=void 0===v?{base:6,lg:8,xl:10}:v,w=i(e,["heading","description","hasSteps","numberOfColumns","cards","link","button","gridGap"]);return r(c,n({ref:a,spacing:6},w,{children:[o&&t(g,n({},o)),d,u&&t(m,{columns:p,gap:k,children:u.map((function(i,r){return t(j,n({label:l?"Step: ".concat(r+1):void 0},i),"card-item-".concat(r))}))}),x&&t(h,n({},x)),f&&t(b,n({},f))]}))}));export{j as Card,k as CardStack};
1
+ import{__rest as i,__assign as n}from"../../../../../_virtual/_tslib.js";import{jsxs as t,jsx as r}from"react/jsx-runtime";import{ArrowForwardIcon as e}from"@chakra-ui/icons";import{forwardRef as a,Card as o,Stack as c,CardBody as d,Flex as s,CardFooter as l,SimpleGrid as m,AspectRatio as p}from"@chakra-ui/react";import{Button as h}from"../Button/index.js";import"../Flex/index.js";import{Heading4 as u,Heading2 as g}from"../Heading/index.js";import{Icon as f}from"../Icon/index.js";import{Image as x}from"../Image/index.js";import{Link as b}from"../Link/index.js";import{Text as v}from"../Text/index.js";var j=a((function(a,m){var g=a.variant,j=void 0===g?"unstyled":g,k=a.image,w=a.icon,y=a.label,C=a.heading,I=a.description,S=a.button,T=a.link,B=i(a,["variant","image","icon","label","heading","description","button","link"]);return t(o,n({ref:m,variant:j},B,{children:[k&&r((function(t){var e=t.as,a=t.src,o=t.alt,c=t.width,d=t.height,s=t.style,l=i(t,["as","src","alt","width","height","style"]);return r(p,n({ratio:1},l,{children:r(x,{as:e,src:a,alt:o,width:c,height:d,style:s})}))}),n({},k)),w&&r(f,{name:w.name}),t(c,{width:"100%",spacing:4,children:[r(d,{children:t(c,{spacing:2,children:[y&&r(v,{bgColor:"cardTextBackgroundColor",variant:"caption",fontFamily:"poppins.medium",color:"cardTextColor",width:"fit-content",py:1,px:3,children:y}),C&&t(s,{justifyContent:"space-between",alignItems:"center",width:"100%",children:[r(u,n({},C)),"navigation"===j&&r(f,{as:e,boxSize:6,p:0})]}),I]})}),(S||T)&&t(l,{alignItems:"flex-start",children:[S&&r(h,n({},S)),T&&r(b,n({},T))]})]})]}))})),k=a((function(e,a){var o=e.heading,d=e.description,s=e.hasSteps,l=void 0!==s&&s,p=e.numberOfColumns,u=e.cards,f=e.link,x=e.button,v=e.gridGap,k=void 0===v?{base:6,lg:8,xl:10}:v,w=i(e,["heading","description","hasSteps","numberOfColumns","cards","link","button","gridGap"]);return t(c,n({ref:a,spacing:6},w,{children:[o&&r(g,n({},o)),d,u&&r(m,{columns:p,gap:k,children:u.map((function(i,t){return r(j,n({label:l?"Step: ".concat(t+1):void 0},i),"card-item-".concat(t))}))}),x&&r(h,n({},x)),f&&r(b,n({},f))]}))}));export{j as Card,k as CardStack};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"../../../../../_virtual/_tslib.js";import{jsx as r}from"react/jsx-runtime";import{forwardRef as i,Heading as n}from"@chakra-ui/react";var s=i((function(i,s){return r(n,e({ref:s},i))})),t=i((function(i,n){return r(s,e({as:"h1",size:{base:"3xl",lg:"4xl"},ref:n},i))})),a=i((function(i,n){return r(s,e({as:"h2",size:{base:"2xl",lg:"3xl"},ref:n},i))})),f=i((function(i,n){return r(s,e({as:"h3",size:{base:"lg",lg:"xl"},ref:n},i))})),m=i((function(i,n){return r(s,e({as:"h4",size:{base:"md",lg:"lg"},fontFamily:"poppins.medium",ref:n},i))})),o=i((function(i,n){return r(s,e({as:"h5",size:{base:"sm",lg:"md"},fontFamily:"poppins.medium",ref:n},i))})),u=i((function(i,n){return r(s,e({as:"h6",size:{base:"xs",lg:"sm"},fontFamily:"poppins.medium",ref:n},i))}));export{s as Heading,t as Heading1,a as Heading2,f as Heading3,m as Heading4,o as Heading5,u as Heading6};
1
+ import{__assign as r}from"../../../../../_virtual/_tslib.js";import{jsx as e}from"react/jsx-runtime";import{forwardRef as i,Heading as n}from"@chakra-ui/react";var s=i((function(i,s){return e(n,r({ref:s},i,{wordBreak:"break-word"}))})),t=i((function(i,n){return e(s,r({as:"h1",size:{base:"3xl",lg:"4xl"},ref:n},i))})),a=i((function(i,n){return e(s,r({as:"h2",size:{base:"2xl",lg:"3xl"},ref:n},i))})),o=i((function(i,n){return e(s,r({as:"h3",size:{base:"lg",lg:"xl"},ref:n},i))})),f=i((function(i,n){return e(s,r({as:"h4",size:{base:"md",lg:"lg"},fontFamily:"poppins.medium",ref:n},i))})),m=i((function(i,n){return e(s,r({as:"h5",size:{base:"sm",lg:"md"},fontFamily:"poppins.medium",ref:n},i))})),u=i((function(i,n){return e(s,r({as:"h6",size:{base:"xs",lg:"sm"},fontFamily:"poppins.medium",ref:n},i))}));export{s as Heading,t as Heading1,a as Heading2,o as Heading3,f as Heading4,m as Heading5,u as Heading6};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as r}from"../../../../../_virtual/_tslib.js";import{jsx as o}from"react/jsx-runtime";import{forwardRef as a,chakra as i,Image as t}from"@chakra-ui/react";var e=["src","width","height","alt","fill","sizes","quality","priority","placeholder","onLoadingComplete","onLoad","onError","loading","blurDataURL"],l=a((function(a,l){var n=i(t,{shouldForwardProp:function(r){return e.includes(r)}});return o(n,r({ref:l},a))}));l.displayName="Image";export{l as Image};
1
+ import{__assign as r}from"../../../../../_virtual/_tslib.js";import{jsx as o}from"react/jsx-runtime";import{forwardRef as a,chakra as t,Image as i}from"@chakra-ui/react";var e=["src","width","height","alt","fill","sizes","quality","priority","placeholder","style","onLoadingComplete","onLoad","onError","loading","blurDataURL"],l=a((function(a,l){var n=t(i,{shouldForwardProp:function(r){return e.includes(r)}});return o(n,r({ref:l},a))}));l.displayName="Image";export{l as Image};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as o}from"../../../../../_virtual/_tslib.js";import{jsx as r}from"react/jsx-runtime";import{forwardRef as e,Popover as t}from"@chakra-ui/react";export{PopoverAnchor,PopoverArrow,PopoverBody,PopoverCloseButton,PopoverContent,PopoverFooter,PopoverHeader,PopoverTrigger}from"@chakra-ui/react";var p=e((function(e){return r(t,o({},e))}));export{p as Popover};
1
+ import{__assign as o}from"../../../../../_virtual/_tslib.js";import{jsx as r}from"react/jsx-runtime";import{Popover as e}from"@chakra-ui/react";export{PopoverAnchor,PopoverArrow,PopoverBody,PopoverCloseButton,PopoverContent,PopoverFooter,PopoverHeader,PopoverTrigger}from"@chakra-ui/react";var t=function(t){return r(e,o({},t))};export{t as Popover};
2
2
  //# sourceMappingURL=index.js.map
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Card/index.tsx"],"names":[],"mappings":";AAGA,OAAO,EAKL,SAAS,IAAI,eAAe,EAE5B,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAU,WAAW,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,EAAsB,YAAY,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAQ,SAAS,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAS,UAAU,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAQ,SAAS,EAAE,MAAM,SAAS,CAAC;AAE1C,OAAO,EAAS,UAAU,EAAE,MAAM,UAAU,CAAC;AAG7C,KAAK,SAAS,GAAG,eAAe,GAAG;IACjC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,WAAW,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAC1B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,QAAA,MAAM,IAAI,iFAkER,CAAC;AAEH,KAAK,cAAc,GAAG,UAAU,GAAG;IACjC,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,WAAW,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IAC1C,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;CACnC,CAAC;AAEF,QAAA,MAAM,SAAS,sFAgCb,CAAC;AAEH,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Card/index.tsx"],"names":[],"mappings":";AAGA,OAAO,EAKL,SAAS,IAAI,eAAe,EAE5B,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAU,WAAW,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,EAAsB,YAAY,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAQ,SAAS,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAS,UAAU,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAQ,SAAS,EAAE,MAAM,SAAS,CAAC;AAE1C,OAAO,EAAS,UAAU,EAAE,MAAM,UAAU,CAAC;AAG7C,KAAK,SAAS,GAAG,eAAe,GAAG;IACjC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,WAAW,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAC1B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,QAAA,MAAM,IAAI,iFA2ER,CAAC;AAEH,KAAK,cAAc,GAAG,UAAU,GAAG;IACjC,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,WAAW,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IAC1C,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;CACnC,CAAC;AAEF,QAAA,MAAM,SAAS,sFAgCb,CAAC;AAEH,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Image/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,UAAU,IAAI,gBAAgB,EAC/B,MAAM,kBAAkB,CAAC;AAmB1B,KAAK,UAAU,GAAG,gBAAgB,CAAC;AAEnC,QAAA,MAAM,KAAK,wFAKT,CAAC;AAIH,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Image/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,UAAU,IAAI,gBAAgB,EAC/B,MAAM,kBAAkB,CAAC;AAoB1B,KAAK,UAAU,GAAG,gBAAgB,CAAC;AAEnC,QAAA,MAAM,KAAK,wFAKT,CAAC;AAIH,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import { PopoverAnchor, PopoverArrow, PopoverBody, PopoverCloseButton, PopoverContent, PopoverFooter, PopoverHeader, PopoverProps, PopoverTrigger } from "@chakra-ui/react";
2
- declare const Popover: import("@chakra-ui/system/dist/system.types").ComponentWithAs<"span", PopoverProps>;
2
+ declare const Popover: (props: PopoverProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export { Popover, PopoverAnchor, PopoverArrow, PopoverBody, PopoverCloseButton, PopoverContent, PopoverFooter, PopoverHeader, type PopoverProps, PopoverTrigger, };
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/PopOver/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,aAAa,EACb,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,aAAa,EACb,YAAY,EACZ,cAAc,EACf,MAAM,kBAAkB,CAAC;AAE1B,QAAA,MAAM,OAAO,qFAEX,CAAC;AAEH,OAAO,EACL,OAAO,EACP,aAAa,EACb,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,aAAa,EACb,KAAK,YAAY,EACjB,cAAc,GACf,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/PopOver/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,aAAa,EACb,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,aAAa,EACb,YAAY,EACZ,cAAc,EACf,MAAM,kBAAkB,CAAC;AAE1B,QAAA,MAAM,OAAO,UAAW,YAAY,4CAAiC,CAAC;AAEtE,OAAO,EACL,OAAO,EACP,aAAa,EACb,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,aAAa,EACb,KAAK,YAAY,EACjB,cAAc,GACf,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cruk/chakra-components",
3
- "version": "0.1.0-alpha.2",
3
+ "version": "0.1.0-alpha.3",
4
4
  "description": "Chakra UI based components for CRUK - Work In Progress",
5
5
  "main": "./dist/cjs/packages/components/src/index.js",
6
6
  "module": "./dist/esm/packages/components/src/index.js",
@@ -30,12 +30,14 @@
30
30
  "@chakra-ui/icons": "^2.1.0",
31
31
  "@chakra-ui/react": "^2.7.1",
32
32
  "@chakra-ui/storybook-addon": "^5.0.1",
33
+ "@rollup/plugin-url": "^8.0.2",
33
34
  "@storybook/addon-styling": "^1.0.0-next.2",
34
35
  "@storybook/jest": "^0.2.3",
35
36
  "@storybook/react": "^7.4.1",
36
37
  "@storybook/testing-library": "^0.0.14-next.2",
37
38
  "react": "^18.2.0",
38
- "react-dom": "^18.2.0"
39
+ "react-dom": "^18.2.0",
40
+ "rollup-plugin-copy": "^3.5.0"
39
41
  },
40
42
  "devDependencies": {
41
43
  "@babel/preset-env": "^7.22.20",
@@ -45,7 +47,7 @@
45
47
  "@rollup/plugin-babel": "^5.0.0",
46
48
  "@rollup/plugin-commonjs": "^25.0.0",
47
49
  "@rollup/plugin-node-resolve": "^15.1.0",
48
- "@storybook/addon-a11y": "^7.6.7",
50
+ "@storybook/addon-a11y": "^7.6.16",
49
51
  "@storybook/addon-designs": "^7.0.9",
50
52
  "@storybook/addon-essentials": "^7.1.1",
51
53
  "@storybook/addon-interactions": "^7.1.1",