@purpurds/promotion-card 6.12.2 → 6.12.4
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/dist/LICENSE.txt +6 -6
- package/dist/promotion-card.cjs.js +1 -1
- package/dist/promotion-card.cjs.js.map +1 -1
- package/dist/promotion-card.d.ts +0 -3
- package/dist/promotion-card.d.ts.map +1 -1
- package/dist/promotion-card.es.js +188 -186
- package/dist/promotion-card.es.js.map +1 -1
- package/package.json +11 -11
- package/src/promotion-card.tsx +1 -2
package/dist/LICENSE.txt
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
Name: @purpurds/badge
|
|
2
|
-
Version: 6.12.
|
|
2
|
+
Version: 6.12.3
|
|
3
3
|
License: AGPL-3.0-only
|
|
4
4
|
Private: false
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
Name: @purpurds/button
|
|
9
|
-
Version: 6.12.
|
|
9
|
+
Version: 6.12.3
|
|
10
10
|
License: AGPL-3.0-only
|
|
11
11
|
Private: false
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
Name: @purpurds/card
|
|
16
|
-
Version: 6.12.
|
|
16
|
+
Version: 6.12.3
|
|
17
17
|
License: AGPL-3.0-only
|
|
18
18
|
Private: false
|
|
19
19
|
|
|
20
20
|
---
|
|
21
21
|
|
|
22
22
|
Name: @purpurds/cta-link
|
|
23
|
-
Version: 6.12.
|
|
23
|
+
Version: 6.12.3
|
|
24
24
|
License: AGPL-3.0-only
|
|
25
25
|
Private: false
|
|
26
26
|
|
|
27
27
|
---
|
|
28
28
|
|
|
29
29
|
Name: @purpurds/heading
|
|
30
|
-
Version: 6.12.
|
|
30
|
+
Version: 6.12.3
|
|
31
31
|
License: AGPL-3.0-only
|
|
32
32
|
Private: false
|
|
33
33
|
|
|
34
34
|
---
|
|
35
35
|
|
|
36
36
|
Name: @purpurds/paragraph
|
|
37
|
-
Version: 6.12.
|
|
37
|
+
Version: 6.12.3
|
|
38
38
|
License: AGPL-3.0-only
|
|
39
39
|
Private: false
|
|
40
40
|
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
Copyright (c) 2018 Jed Watson.
|
|
43
43
|
Licensed under the MIT License (MIT), see
|
|
44
44
|
http://jedwatson.github.io/classnames
|
|
45
|
-
*/var zr;function sa(){return zr||(zr=1,function(e){(function(){var n={}.hasOwnProperty;function a(){for(var r="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(r=p(r,o(i)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return a.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var i in r)n.call(r,i)&&r[i]&&(t=p(t,i));return t}function p(r,t){return t?r?r+" "+t:r+t:r}e.exports?(a.default=a,e.exports=a):window.classNames=a})()}(qr)),qr.exports}var da=sa();const ca=la(da),H={"purpur-heading":"_purpur-heading_k9fhq_1","purpur-heading--hyphens":"_purpur-heading--hyphens_k9fhq_8","purpur-heading--negative":"_purpur-heading--negative_k9fhq_11","purpur-heading--subsection-100":"_purpur-heading--subsection-100_k9fhq_14","purpur-heading--title-100":"_purpur-heading--title-100_k9fhq_20","purpur-heading--title-200":"_purpur-heading--title-200_k9fhq_26","purpur-heading--title-300":"_purpur-heading--title-300_k9fhq_32","purpur-heading--title-400":"_purpur-heading--title-400_k9fhq_38","purpur-heading--title-500":"_purpur-heading--title-500_k9fhq_44","purpur-heading--title-600":"_purpur-heading--title-600_k9fhq_50","purpur-heading--title-700":"_purpur-heading--title-700_k9fhq_56","purpur-heading--display-25":"_purpur-heading--display-25_k9fhq_62","purpur-heading--display-50":"_purpur-heading--display-50_k9fhq_68","purpur-heading--display-100":"_purpur-heading--display-100_k9fhq_74","purpur-heading--display-200":"_purpur-heading--display-200_k9fhq_80"},_a={TITLE100:"title-100"},T="purpur-heading",ae=({children:e,className:n="",enableHyphenation:a=!1,negative:o=!1,tag:p,variant:r=_a.TITLE100,...t})=>{const i=p,l=ca([n,H[T],H[`${T}--${r}`],{[H[`${T}--hyphens`]]:a,[H[`${T}--negative`]]:o}]);return u.jsx(i,{className:l,...t,children:e})};ae.displayName="Heading";const fa={"purpur-card-heading":"_purpur-card-heading_j3j6u_1","purpur-card-heading__header":"_purpur-card-heading__header_j3j6u_6","purpur-card-heading__heading":"_purpur-card-heading__heading_j3j6u_11","purpur-card-heading__icon":"_purpur-card-heading__icon_j3j6u_14"},V=g.bind(fa),W="purpur-card-heading",ga=({["data-testid"]:e="purpur-card-heading",title:n,icon:a,children:o,titleTag:p="h2",enableHyphenation:r})=>u.jsxs("div",{className:V(W),"data-testid":e,children:[u.jsxs("div",{className:V(`${W}__header`),children:[a&&u.jsx("div",{className:V(`${W}__icon`),children:a}),u.jsx(ae,{tag:p,variant:"title-100",className:V(`${W}__heading`),enableHyphenation:r,children:n})]}),o]}),ha={"purpur-card-media":"_purpur-card-media_udc1o_1"},ma=g.bind(ha),va="purpur-card-media",ya=({["data-testid"]:e="purpur-card-media",className:n,children:a})=>u.jsx("div",{className:ma([va,n]),"data-testid":e,children:a}),xa={"purpur-card-media-layout":"_purpur-card-media-layout_1yfvb_1"},wa=g.bind(xa),ba="purpur-card-media-layout",$a=({["data-testid"]:e="purpur-card-media-layout",className:n,children:a})=>u.jsx("div",{className:wa([ba,n]),"data-testid":e,children:a}),ja={"purpur-card-overline":"_purpur-card-overline_192fe_1"},Sa=g.bind(ja),Ca="purpur-card-overline",ka=({["data-testid"]:e="purpur-card-overline",overline:n})=>n?u.jsx(pr,{className:Sa(Ca),"data-testid":e,children:n}):null,Oa={"purpur-card-root":"_purpur-card-root_eupww_1","purpur-card-root--primary":"_purpur-card-root--primary_eupww_7","purpur-card-root--secondary":"_purpur-card-root--secondary_eupww_10","purpur-card-root--full-height":"_purpur-card-root--full-height_eupww_13"},Aa={"purpur-card-trigger-item":"_purpur-card-trigger-item_1sp43_1","purpur-card-trigger-item--button":"_purpur-card-trigger-item--button_1sp43_6","purpur-card-trigger-item--disabled":"_purpur-card-trigger-item--disabled_1sp43_11"};function Ur(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function Na(...e){return n=>{let a=!1;const o=e.map(p=>{const r=Ur(p,n);return!a&&typeof r=="function"&&(a=!0),r});if(a)return()=>{for(let p=0;p<o.length;p++){const r=o[p];typeof r=="function"?r():Ur(e[p],null)}}}}var ne=d.forwardRef((e,n)=>{const{children:a,...o}=e,p=d.Children.toArray(a),r=p.find(Ba);if(r){const t=r.props.children,i=p.map(l=>l===r?d.Children.count(t)>1?d.Children.only(null):d.isValidElement(t)?t.props.children:null:l);return u.jsx(ir,{...o,ref:n,children:d.isValidElement(t)?d.cloneElement(t,void 0,i):null})}return u.jsx(ir,{...o,ref:n,children:a})});ne.displayName="Slot";var ir=d.forwardRef((e,n)=>{const{children:a,...o}=e;if(d.isValidElement(a)){const p=Ga(a),r=Ma(o,a.props);return a.type!==d.Fragment&&(r.ref=n?Na(n,p):p),d.cloneElement(a,r)}return d.Children.count(a)>1?d.Children.only(null):null});ir.displayName="SlotClone";var Fa=({children:e})=>u.jsx(u.Fragment,{children:e});function Ba(e){return d.isValidElement(e)&&e.type===Fa}function Ma(e,n){const a={...n};for(const o in n){const p=e[o],r=n[o];/^on[A-Z]/.test(o)?p&&r?a[o]=(...t)=>{r(...t),p(...t)}:p&&(a[o]=p):o==="style"?a[o]={...p,...r}:o==="className"&&(a[o]=[p,r].filter(Boolean).join(" "))}return{...e,...a}}function Ga(e){var n,a;let o=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,p=o&&"isReactWarning"in o&&o.isReactWarning;return p?e.ref:(o=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,p=o&&"isReactWarning"in o&&o.isReactWarning,p?e.props.ref:e.props.ref||e.ref)}var Za=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ea=Za.reduce((e,n)=>{const a=d.forwardRef((o,p)=>{const{asChild:r,...t}=o,i=r?ne:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(i,{...t,ref:p})});return a.displayName=`Primitive.${n}`,{...e,[n]:a}},{}),qa="VisuallyHidden",ie=d.forwardRef((e,n)=>u.jsx(Ea.span,{...e,ref:n,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));ie.displayName=qa;var za=ie;const Ir=({asChild:e,children:n,className:a="",["data-testid"]:o})=>u.jsx(za,{asChild:e,"data-testid":o,className:a,children:n}),Rr=g.bind(Aa),O="purpur-card-trigger-item",Ua=({["data-testid"]:e="purpur-card-trigger-item",disabled:n=!1,href:a,onClick:o,screenReaderText:p})=>{const r=i=>{n?i.preventDefault():o&&o()},t=`${O} ${n?`${O}--disabled`:""}`;return a?u.jsx("a",{"aria-disabled":n,className:`${Rr([O,{[`${O}--disabled`]:n}])} ${t}`,"data-testid":e,href:n?void 0:a,tabIndex:n?0:void 0,onClick:r,children:u.jsx(Ir,{children:p})}):u.jsx("button",{"aria-disabled":n,className:`${Rr([O,`${O}--button`,{[`${O}--disabled`]:n}])} ${t}`,"data-testid":e,type:"button",onClick:r,children:u.jsx(Ir,{children:p})})},Ia=g.bind(Oa),tr="purpur-card-root",oe=L.forwardRef(({["data-testid"]:e="purpur-card-root",children:n,className:a,disabled:o,fullHeight:p,href:r,onClick:t,screenReaderText:i,variant:l,...c},h)=>{const $=Ia([tr,a,{[`${tr}--${l}`]:l,[`${tr}--full-height`]:p}]);return u.jsxs("div",{className:$,"data-testid":e,ref:h,...c,children:[n,(t||r)&&i&&u.jsx(Ua,{disabled:o,href:r,onClick:t,screenReaderText:i})]})});oe.displayName="CardRoot";const ar=g.bind(rt),I="purpur-card",v=({children:e,className:n,...a})=>{const o=ar([I,n,{[`${I}--is-interactive`]:a.onClick||a.href,[`${I}--disabled`]:a.disabled}]);return u.jsx("div",{className:ar(`${I}__container`,{[`${I}__container--full-height`]:a.fullHeight}),children:u.jsx(oe,{className:ar(o),...a,children:e})})};v.Badge=kt;v.Content=Ft;v.ContentContainer=Gt;v.Cta=Dt;v.FeatureList=ua;v.Overline=ka;v.Heading=ga;v.Media=ya;v.MediaLayout=$a;v.displayName="Card";function Ra(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pr={exports:{}};/*!
|
|
45
|
+
*/var zr;function sa(){return zr||(zr=1,function(e){(function(){var n={}.hasOwnProperty;function a(){for(var r="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(r=p(r,o(i)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return a.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var i in r)n.call(r,i)&&r[i]&&(t=p(t,i));return t}function p(r,t){return t?r?r+" "+t:r+t:r}e.exports?(a.default=a,e.exports=a):window.classNames=a})()}(qr)),qr.exports}var da=sa();const ca=la(da),H={"purpur-heading":"_purpur-heading_k9fhq_1","purpur-heading--hyphens":"_purpur-heading--hyphens_k9fhq_8","purpur-heading--negative":"_purpur-heading--negative_k9fhq_11","purpur-heading--subsection-100":"_purpur-heading--subsection-100_k9fhq_14","purpur-heading--title-100":"_purpur-heading--title-100_k9fhq_20","purpur-heading--title-200":"_purpur-heading--title-200_k9fhq_26","purpur-heading--title-300":"_purpur-heading--title-300_k9fhq_32","purpur-heading--title-400":"_purpur-heading--title-400_k9fhq_38","purpur-heading--title-500":"_purpur-heading--title-500_k9fhq_44","purpur-heading--title-600":"_purpur-heading--title-600_k9fhq_50","purpur-heading--title-700":"_purpur-heading--title-700_k9fhq_56","purpur-heading--display-25":"_purpur-heading--display-25_k9fhq_62","purpur-heading--display-50":"_purpur-heading--display-50_k9fhq_68","purpur-heading--display-100":"_purpur-heading--display-100_k9fhq_74","purpur-heading--display-200":"_purpur-heading--display-200_k9fhq_80"},_a={TITLE100:"title-100"},T="purpur-heading",ae=({children:e,className:n="",enableHyphenation:a=!1,negative:o=!1,tag:p,variant:r=_a.TITLE100,...t})=>{const i=p,l=ca([n,H[T],H[`${T}--${r}`],{[H[`${T}--hyphens`]]:a,[H[`${T}--negative`]]:o}]);return u.jsx(i,{className:l,...t,children:e})};ae.displayName="Heading";const fa={"purpur-card-heading":"_purpur-card-heading_j3j6u_1","purpur-card-heading__header":"_purpur-card-heading__header_j3j6u_6","purpur-card-heading__heading":"_purpur-card-heading__heading_j3j6u_11","purpur-card-heading__icon":"_purpur-card-heading__icon_j3j6u_14"},V=g.bind(fa),W="purpur-card-heading",ga=({["data-testid"]:e="purpur-card-heading",title:n,icon:a,children:o,titleTag:p="h2",enableHyphenation:r})=>u.jsxs("div",{className:V(W),"data-testid":e,children:[u.jsxs("div",{className:V(`${W}__header`),children:[a&&u.jsx("div",{className:V(`${W}__icon`),children:a}),u.jsx(ae,{tag:p,variant:"title-100",className:V(`${W}__heading`),enableHyphenation:r,children:n})]}),o]}),ha={"purpur-card-media":"_purpur-card-media_udc1o_1"},ma=g.bind(ha),va="purpur-card-media",ya=({["data-testid"]:e="purpur-card-media",className:n,children:a,...o})=>u.jsx("div",{...o,className:ma([va,n]),"data-testid":e,children:a}),xa={"purpur-card-media-layout":"_purpur-card-media-layout_1yfvb_1"},wa=g.bind(xa),ba="purpur-card-media-layout",$a=({["data-testid"]:e="purpur-card-media-layout",className:n,children:a,...o})=>u.jsx("div",{...o,className:wa([ba,n]),"data-testid":e,children:a}),ja={"purpur-card-overline":"_purpur-card-overline_192fe_1"},Sa=g.bind(ja),Ca="purpur-card-overline",ka=({["data-testid"]:e="purpur-card-overline",overline:n})=>n?u.jsx(pr,{className:Sa(Ca),"data-testid":e,children:n}):null,Oa={"purpur-card-root":"_purpur-card-root_eupww_1","purpur-card-root--primary":"_purpur-card-root--primary_eupww_7","purpur-card-root--secondary":"_purpur-card-root--secondary_eupww_10","purpur-card-root--full-height":"_purpur-card-root--full-height_eupww_13"},Aa={"purpur-card-trigger-item":"_purpur-card-trigger-item_1sp43_1","purpur-card-trigger-item--button":"_purpur-card-trigger-item--button_1sp43_6","purpur-card-trigger-item--disabled":"_purpur-card-trigger-item--disabled_1sp43_11"};function Ur(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function Na(...e){return n=>{let a=!1;const o=e.map(p=>{const r=Ur(p,n);return!a&&typeof r=="function"&&(a=!0),r});if(a)return()=>{for(let p=0;p<o.length;p++){const r=o[p];typeof r=="function"?r():Ur(e[p],null)}}}}var ne=d.forwardRef((e,n)=>{const{children:a,...o}=e,p=d.Children.toArray(a),r=p.find(Ba);if(r){const t=r.props.children,i=p.map(l=>l===r?d.Children.count(t)>1?d.Children.only(null):d.isValidElement(t)?t.props.children:null:l);return u.jsx(ir,{...o,ref:n,children:d.isValidElement(t)?d.cloneElement(t,void 0,i):null})}return u.jsx(ir,{...o,ref:n,children:a})});ne.displayName="Slot";var ir=d.forwardRef((e,n)=>{const{children:a,...o}=e;if(d.isValidElement(a)){const p=Ga(a),r=Ma(o,a.props);return a.type!==d.Fragment&&(r.ref=n?Na(n,p):p),d.cloneElement(a,r)}return d.Children.count(a)>1?d.Children.only(null):null});ir.displayName="SlotClone";var Fa=({children:e})=>u.jsx(u.Fragment,{children:e});function Ba(e){return d.isValidElement(e)&&e.type===Fa}function Ma(e,n){const a={...n};for(const o in n){const p=e[o],r=n[o];/^on[A-Z]/.test(o)?p&&r?a[o]=(...t)=>{r(...t),p(...t)}:p&&(a[o]=p):o==="style"?a[o]={...p,...r}:o==="className"&&(a[o]=[p,r].filter(Boolean).join(" "))}return{...e,...a}}function Ga(e){var n,a;let o=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,p=o&&"isReactWarning"in o&&o.isReactWarning;return p?e.ref:(o=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,p=o&&"isReactWarning"in o&&o.isReactWarning,p?e.props.ref:e.props.ref||e.ref)}var Za=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ea=Za.reduce((e,n)=>{const a=d.forwardRef((o,p)=>{const{asChild:r,...t}=o,i=r?ne:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(i,{...t,ref:p})});return a.displayName=`Primitive.${n}`,{...e,[n]:a}},{}),qa="VisuallyHidden",ie=d.forwardRef((e,n)=>u.jsx(Ea.span,{...e,ref:n,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));ie.displayName=qa;var za=ie;const Ir=({asChild:e,children:n,className:a="",["data-testid"]:o})=>u.jsx(za,{asChild:e,"data-testid":o,className:a,children:n}),Rr=g.bind(Aa),O="purpur-card-trigger-item",Ua=({["data-testid"]:e="purpur-card-trigger-item",disabled:n=!1,href:a,onClick:o,screenReaderText:p})=>{const r=i=>{n?i.preventDefault():o&&o()},t=`${O} ${n?`${O}--disabled`:""}`;return a?u.jsx("a",{"aria-disabled":n,className:`${Rr([O,{[`${O}--disabled`]:n}])} ${t}`,"data-testid":e,href:n?void 0:a,tabIndex:n?0:void 0,onClick:r,children:u.jsx(Ir,{children:p})}):u.jsx("button",{"aria-disabled":n,className:`${Rr([O,`${O}--button`,{[`${O}--disabled`]:n}])} ${t}`,"data-testid":e,type:"button",onClick:r,children:u.jsx(Ir,{children:p})})},Ia=g.bind(Oa),tr="purpur-card-root",oe=L.forwardRef(({["data-testid"]:e="purpur-card-root",children:n,className:a,disabled:o,fullHeight:p,href:r,onClick:t,screenReaderText:i,variant:l,...c},h)=>{const $=Ia([tr,a,{[`${tr}--${l}`]:l,[`${tr}--full-height`]:p}]);return u.jsxs("div",{className:$,"data-testid":e,ref:h,...c,children:[n,(t||r)&&i&&u.jsx(Ua,{disabled:o,href:r,onClick:t,screenReaderText:i})]})});oe.displayName="CardRoot";const ar=g.bind(rt),I="purpur-card",v=({children:e,className:n,...a})=>{const o=ar([I,n,{[`${I}--is-interactive`]:a.onClick||a.href,[`${I}--disabled`]:a.disabled}]);return u.jsx("div",{className:ar(`${I}__container`,{[`${I}__container--full-height`]:a.fullHeight}),children:u.jsx(oe,{className:ar(o),...a,children:e})})};v.Badge=kt;v.Content=Ft;v.ContentContainer=Gt;v.Cta=Dt;v.FeatureList=ua;v.Overline=ka;v.Heading=ga;v.Media=ya;v.MediaLayout=$a;v.displayName="Card";function Ra(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pr={exports:{}};/*!
|
|
46
46
|
Copyright (c) 2018 Jed Watson.
|
|
47
47
|
Licensed under the MIT License (MIT), see
|
|
48
48
|
http://jedwatson.github.io/classnames
|