-
Notifications
You must be signed in to change notification settings - Fork 190
MWPW-175341: M@S Express card #4511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: stage
Are you sure you want to change the base?
Changes from all commits
6fc4301
9bdb47c
1908120
a1a0f0d
e201a9f
ad1f02b
ce1b354
57f2a49
3ff8b24
e643fbb
f0cbaaa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,5 +15,4 @@ tmp | |
libs/navigation/dist/ | ||
*.mdc | ||
/.cursor*/ | ||
.cursor\ 2/ | ||
/.cursor 2 | ||
CLAUDE.md |
Large diffs are not rendered by default.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
Large diffs are not rendered by default.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
export const CSS = ` | ||
:root { | ||
--consonant-merch-card-simplified-pricing-express-width: 294px; | ||
} | ||
|
||
merch-card[variant="simplified-pricing-express"] { | ||
min-width: var(--consonant-merch-card-simplified-pricing-express-width); | ||
background-color: var(--spectrum-gray-50); | ||
border-radius: 16px; | ||
} | ||
|
||
merch-card[variant="simplified-pricing-express"] [slot="body-s"] { | ||
font-size: var(--consonant-merch-card-body-s-font-size); | ||
line-height: var(--merch-card-simplified-pricing-express-body-s-line-height); | ||
} | ||
|
||
merch-card[variant="simplified-pricing-express"] [slot="cta"] { | ||
display: flex; | ||
flex-direction: row; | ||
gap: 8px; | ||
margin-top: auto; | ||
} | ||
|
||
merch-card[variant="simplified-pricing-express"] [slot="cta"] sp-button, | ||
merch-card[variant="simplified-pricing-express"] [slot="cta"] button { | ||
width: 100%; | ||
} | ||
|
||
merch-card[variant="simplified-pricing-express"] [slot="price"] { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 8px; | ||
} | ||
|
||
merch-card[variant="simplified-pricing-express"] [slot="price"] span[is="inline-price"] { | ||
font-size: var(--merch-card-simplified-pricing-express-price-font-size); | ||
font-weight: var(--merch-card-simplified-pricing-express-price-font-weight); | ||
line-height: var(--merch-card-simplified-pricing-express-price-line-height); | ||
} | ||
|
||
merch-card[variant="simplified-pricing-express"] [slot="price"] .price p { | ||
font-size: var(--merch-card-simplified-pricing-express-price-p-font-size); | ||
font-weight: var(--merch-card-simplified-pricing-express-price-p-font-weight); | ||
line-height: var(--merch-card-simplified-pricing-express-price-p-line-height); | ||
} | ||
|
||
merch-card[variant="simplified-pricing-express"] [slot="price"] .price .price-currency-symbol { | ||
font-size: var(--merch-card-simplified-pricing-express-price-currency-symbol-font-size); | ||
font-weight: var(--merch-card-simplified-pricing-express-price-currency-symbol-font-weight); | ||
line-height: var(--merch-card-simplified-pricing-express-price-currency-symbol-line-height); | ||
color: var(--spectrum-gray-700); | ||
} | ||
|
||
merch-card[variant="simplified-pricing-express"] [slot="cta"] sp-button[variant="accent"], | ||
merch-card[variant="simplified-pricing-express"] [slot="cta"] button.spectrum-Button--accent { | ||
background-color: var(--spectrum-indigo-900); | ||
} | ||
|
||
merch-card[variant="simplified-pricing-express"] [slot="footer"] sp-button[variant="accent"] { | ||
background-color: var(--spectrum-indigo-900); | ||
`; |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
import { html, css } from 'lit'; | ||
import { VariantLayout } from './variant-layout.js'; | ||
import { CSS } from './simplified-pricing-express.css.js'; | ||
|
||
export const SIMPLIFIED_PRICING_EXPRESS_AEM_FRAGMENT_MAPPING = { | ||
"mnemonics": { | ||
"size": "s" | ||
}, | ||
"title": { | ||
"tag": "h3", | ||
"slot": "heading-l", | ||
"maxCount": 250, | ||
"withSuffix": true | ||
}, | ||
"badge": { | ||
"tag": "div", | ||
"slot": "badge", | ||
|
||
}, | ||
"description": { | ||
"tag": "div", | ||
"slot": "body-s", | ||
"maxCount": 2000, | ||
"withSuffix": false | ||
}, | ||
"prices": { | ||
"tag": "p", | ||
"slot": "price" | ||
}, | ||
"ctas": { | ||
"slot": "cta", | ||
"size": "L" | ||
}, | ||
"borderColor": { | ||
"attribute": "border-color", | ||
"specialValues": { | ||
"gray": "--spectrum-gray-300", | ||
"blue": "--spectrum-blue-400" | ||
} | ||
} | ||
}; | ||
|
||
export class SimplifiedPricingExpress extends VariantLayout { | ||
getGlobalCSS() { | ||
return CSS; | ||
} | ||
|
||
get aemFragmentMapping() { | ||
return SIMPLIFIED_PRICING_EXPRESS_AEM_FRAGMENT_MAPPING; | ||
} | ||
|
||
renderLayout() { | ||
return html` | ||
<div class="header"> | ||
<slot name="heading-l"></slot> | ||
<slot name="badge"></slot> | ||
</div> | ||
<div class="description"> | ||
<slot name="body-s"></slot> | ||
</div> | ||
<div class="price"> | ||
<slot name="price"></slot> | ||
</div> | ||
<div class="cta"> | ||
<slot name="cta"></slot> | ||
</div> | ||
`; | ||
} | ||
|
||
static variantStyle = css` | ||
:host([variant='simplified-pricing-express']) { | ||
--merch-card-simplified-pricing-express-max-width: 246px; | ||
--merch-card-simplified-pricing-express-padding: 24px; | ||
--merch-card-simplified-pricing-express-min-height: 341px; | ||
--merch-card-simplified-pricing-express-price-font-size: 28px; | ||
--merch-card-simplified-pricing-express-price-font-weight: 900; | ||
--merch-card-simplified-pricing-express-price-line-height: 36.4px; | ||
--merch-card-simplified-pricing-express-price-currency-font-size: 22px; | ||
--merch-card-simplified-pricing-express-price-currency-font-weight: 700; | ||
--merch-card-simplified-pricing-express-price-currency-line-height: 28.6px; | ||
--merch-card-simplified-pricing-express-price-currency-symbol-font-size: 22px; | ||
--merch-card-simplified-pricing-express-price-currency-symbol-font-weight: 700; | ||
--merch-card-simplified-pricing-express-price-currency-symbol-line-height: 28.6px; | ||
--merch-card-simplified-pricing-express-body-s-line-height: 20.8px; | ||
--merch-card-simplified-pricing-express-price-p-font-size: 14px; | ||
--merch-card-simplified-pricing-express-price-p-font-weight: 400; | ||
--merch-card-simplified-pricing-express-price-p-line-height: 15.6px; | ||
max-width: var(--merch-card-simplified-pricing-express-max-width); | ||
min-height: var(--merch-card-simplified-pricing-express-min-height); | ||
background: var(--spectrum-gray-50); | ||
border: 1px solid var(--merch-card-custom-border-color, transparent); | ||
border-radius: 16px; | ||
display: flex; | ||
flex-direction: column; | ||
overflow: hidden; | ||
padding: var(--merch-card-simplified-pricing-express-padding); | ||
gap: 16px; | ||
box-sizing: border-box; | ||
position: relative; | ||
} | ||
|
||
:host([variant='simplified-pricing-express']) .header { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: flex-end; | ||
justify-content: space-between; | ||
gap: 8px; | ||
} | ||
|
||
:host([variant='simplified-pricing-express']) .badge { | ||
position: absolute; | ||
top: -10px; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
background: var(--spectrum-blue-400); | ||
color: white; | ||
padding: 4px 12px; | ||
border-radius: 6px; | ||
font-size: 16px; | ||
font-weight: 700; | ||
z-index: 1; | ||
} | ||
|
||
:host([variant='simplified-pricing-express']) .pricing-section { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 8px; | ||
} | ||
|
||
:host([variant='simplified-pricing-express']) .price-container { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: baseline; | ||
gap: 4px; | ||
} | ||
|
||
:host([variant='simplified-pricing-express']) .cta-section { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 12px; | ||
margin-top: auto; | ||
} | ||
|
||
:host([variant='simplified-pricing-express']) .cta { | ||
width: 100%; | ||
display: flex; | ||
flex-direction: row; | ||
gap: 8px; | ||
margin-top: auto; | ||
} | ||
|
||
:host([variant='simplified-pricing-express']) .cta ::slotted(*) { | ||
flex: 1; | ||
width: 100%; | ||
} | ||
|
||
:host([variant='simplified-pricing-express']) .footer-text { | ||
font-size: 12px; | ||
line-height: 1.4; | ||
color: var(--spectrum-gray-700); | ||
} | ||
`; | ||
} | ||
|
||
customElements.define('simplified-pricing-express-card', SimplifiedPricingExpress); |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File ignored because of a matching ignore pattern. Use "--no-ignore" to override.