@repobit/dex-system-design 4.5.0 → 5.0.1
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/CHANGELOG.md +28 -0
- package/dist/src/components/icons/arrow-back.d.ts +1 -0
- package/dist/src/components/icons/arrow-back.js +6 -0
- package/dist/src/components/icons/arrow-back.js.map +1 -0
- package/dist/src/components/icons/icons.d.ts +1 -0
- package/dist/src/components/icons/icons.js +1 -1
- package/dist/src/components/pricing-card/pricing-card.css.d.ts +1 -0
- package/dist/src/components/pricing-card/pricing-card.css.js +1 -1
- package/dist/src/components/pricing-card/pricing-card.css.js.map +1 -1
- package/dist/src/components/pricing-card/pricing-card.d.ts +65 -49
- package/dist/src/components/pricing-card/pricing-card.js +7 -9
- package/dist/src/components/pricing-card/pricing-card.js.map +1 -1
- package/dist/src/components/pricing-card/pricing-feature-group.css.js +1 -1
- package/dist/src/components/pricing-card/pricing-feature-group.css.js.map +1 -1
- package/dist/src/components/pricing-card/pricing-feature-group.d.ts +7 -1
- package/dist/src/components/pricing-card/pricing-feature-group.js +5 -2
- package/dist/src/components/pricing-card/pricing-feature-group.js.map +1 -1
- package/dist/src/components/pricing-card/pricing-feature.css.js +1 -1
- package/dist/src/components/pricing-card/pricing-feature.css.js.map +1 -1
- package/dist/src/components/pricing-card/pricing-price.css.js +1 -1
- package/dist/src/components/pricing-card/pricing-price.css.js.map +1 -1
- package/dist/src/components/pricing-card/pricing-price.d.ts +31 -2
- package/dist/src/components/pricing-card/pricing-price.js +3 -3
- package/dist/src/components/pricing-card/pricing-price.js.map +1 -1
- package/dist/src/components/shared/prop-vocabulary.js +1 -1
- package/dist/src/components/shared/prop-vocabulary.js.map +1 -1
- package/dist/src/loader/registry.js +1 -1
- package/dist/src/loader/registry.js.map +1 -1
- package/package.json +2 -2
- package/schemas/component-manifest.json +98 -97
- package/schemas/figma-component-map.json +5 -10
- package/dist/src/components/pricing-card/pricing-group.css.d.ts +0 -3
- package/dist/src/components/pricing-card/pricing-group.css.js +0 -2
- package/dist/src/components/pricing-card/pricing-group.css.js.map +0 -1
- package/dist/src/components/pricing-card/pricing-group.d.ts +0 -48
- package/dist/src/components/pricing-card/pricing-group.js +0 -6
- package/dist/src/components/pricing-card/pricing-group.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,34 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [5.0.1](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@5.0.0...@repobit/dex-system-design@5.0.1) (2026-11-26)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **DEX-1000:** align bd-pricing-card with the Figma card, add two- and three-card stories
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## [5.0.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@4.5.0...@repobit/dex-system-design@5.0.0) (2026-11-25)
|
|
14
|
+
|
|
15
|
+
### ⚠ BREAKING CHANGES
|
|
16
|
+
|
|
17
|
+
* **DEX-1000:** bd-pricing-card is replaced by the new card, with its own
|
|
18
|
+
markup (bd-p descriptions, a caption slot, a bd-pricing-price size="lg").
|
|
19
|
+
bd-pricing-group is removed: lay cards out in
|
|
20
|
+
<bd-grid cols="1" cols-md="2" cols-lg="3" item-rows="8">. The v4 codemod and
|
|
21
|
+
the migration guide now write a bd-grid for 3.x's pricing-cards-container.
|
|
22
|
+
|
|
23
|
+
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* **DEX-1000:** replace bd-pricing-card with the Figma pricing card
|
|
28
|
+
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
|
|
31
|
+
* **DEX-1000:** regenerate the figma map and the element-api baseline as CI does
|
|
32
|
+
|
|
33
|
+
|
|
6
34
|
## [4.5.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@4.4.0...@repobit/dex-system-design@4.5.0) (2026-11-25)
|
|
7
35
|
|
|
8
36
|
### Features
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./icon.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{registerIcon as e}from"./registry.js";import"./icon.js";e(`arrow-back`,`
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none">
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.518 11.2501L9.0673 14.7993L7.2995 16.5671L0.7325 10L7.2995 3.43298L9.0673 5.20075L5.518 8.75006L18.125 8.75006V11.2501L5.518 11.2501Z" fill="currentColor"/>
|
|
4
|
+
</svg>
|
|
5
|
+
`,{size:`sm`,mirror:!0});
|
|
6
|
+
//# sourceMappingURL=arrow-back.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrow-back.js","names":["registerIcon"],"sources":["../../../../src/components/icons/arrow-back.ts"],"sourcesContent":["// icons/arrow-back.ts\nimport { registerIcon } from \"./registry.ts\";\nimport \"./icon.ts\";\n\n/**\n * The arrow pointing back: against the way the line reads.\n *\n * bd-pricing-card draws it before a feature list's heading --\n * \"Everything from Total Security and:\" -- pointing at the plan before, the\n * one whose features the list builds on.\n *\n * ARTWORK. `arrow` (Eclipse `arrow right fill`) mirrored across its 20-unit\n * box, every x read as 20 - x, so the two are one drawing facing two ways\n * and agree on weight, head and box. It is not a chevron: arrow-up,\n * arrow-down and arrow-right are (arrow.ts says why the names mislead).\n *\n * Back, so it mirrors, as `arrow` does: right to left, back points right.\n */\nregisterIcon(\"arrow-back\", `\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M5.518 11.2501L9.0673 14.7993L7.2995 16.5671L0.7325 10L7.2995 3.43298L9.0673 5.20075L5.518 8.75006L18.125 8.75006V11.2501L5.518 11.2501Z\" fill=\"currentColor\"/>\n </svg>\n`, { size: 'sm', mirror: true });\n"],"mappings":"A,+DAkBAA,EAAa,aAAc;;;;EAIxB,CAAE,KAAM,KAAM,OAAQ,EAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./icon.js";import"./arrow.js";import"./family.js";import"./individual.js";import"./check.js";import"./close.js";import"./arrow-down.js";import"./arrow-up.js";import"./minus.js";import"./plus.js";import"./arrow-right.js";import"./quote.js";import"./envelope.js";import"./laurel.js";import"./circle-info.js";import"./globe.js";import"./pause.js";import"./play.js";import"./analysis.js";import"./brand-signature.js";import"./clipboard.js";import"./enterprise.js";import"./guide.js";import"./home.js";import"./machine-learning.js";import"./small-business.js";
|
|
1
|
+
import"./icon.js";import"./arrow.js";import"./family.js";import"./individual.js";import"./check.js";import"./close.js";import"./arrow-down.js";import"./arrow-up.js";import"./minus.js";import"./plus.js";import"./arrow-right.js";import"./quote.js";import"./envelope.js";import"./laurel.js";import"./circle-info.js";import"./globe.js";import"./pause.js";import"./play.js";import"./analysis.js";import"./arrow-back.js";import"./brand-signature.js";import"./clipboard.js";import"./enterprise.js";import"./guide.js";import"./home.js";import"./machine-learning.js";import"./small-business.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{
|
|
1
|
+
import"../shared/token-scales.js";import"../shared/fill-width.css.js";import{css as e}from"lit";var t=e`:host{font-family:var(--typography-fontFamily-sans);grid-template-rows:repeat(7,auto) 1fr;width:100%;display:grid}@supports (width:-moz-available){:host{width:-moz-available}}@supports (width:-webkit-fill-available){:host{width:-webkit-fill-available}}@supports (width:stretch){:host{width:-webkit-fill-available;width:-moz-available;width:stretch}}:host([hidden]){display:none}.card{grid-row:1/-1;grid-template-rows:subgrid;box-sizing:border-box;background:var(--color-surface-default);border:var(--border-width-1) solid var(--color-border-container);border-radius:var(--card-radius);padding:var(--card-padding-compact);text-align:start;--bd-ensemble-max-width:none;--bd-ensemble-inline-padding:0;grid-template-columns:minmax(0,1fr);row-gap:0;display:grid;position:relative}:host([highlight]) .card{border:var(--border-width-2) solid var(--color-border-brand)}.card [hidden]{display:none}.banner{padding:var(--spacing-4) var(--spacing-16);background:var(--status-brand-fill);color:var(--status-brand-on-fill);white-space:nowrap;font-size:var(--typography-body-small-fontSize);font-weight:var(--typography-fontWeight-bold);line-height:var(--typography-body-small-lineHeight);letter-spacing:var(--typography-body-small-letterSpacing);font-family:var(--typography-body-small-fontFamily);z-index:var(--z-base);border-start-start-radius:var(--shape-radius-md);border-start-end-radius:var(--shape-radius-md);position:absolute;bottom:100%;left:50%;transform:translate(-50%)}.badge{align-items:flex-start;gap:var(--spacing-8);margin-bottom:var(--spacing-16);flex-wrap:wrap;grid-row:1;display:flex}.title{margin-bottom:var(--spacing-8);grid-row:2}::slotted(bd-h[slot=title]),::slotted(bd-display[slot=title]){--bd-heading-font-size:var(--typography-heading-h5-fontSize);--bd-heading-font-weight:var(--typography-fontWeight-bold);--bd-heading-line-height:var(--typography-heading-h5-lineHeight);--bd-heading-letter-spacing:var(--typography-heading-h5-letterSpacing);--bd-heading-font-family:var(--typography-heading-h5-fontFamily);--bd-heading-color:var(--color-text-primary);margin:0}.description{gap:var(--spacing-16);font-size:var(--typography-body-regular-fontSize);font-weight:var(--typography-body-regular-fontWeight);line-height:var(--typography-body-regular-lineHeight);letter-spacing:var(--typography-body-regular-letterSpacing);font-family:var(--typography-body-regular-fontFamily);color:var(--color-text-primary);flex-direction:column;grid-row:3;display:flex}::slotted(bd-p[slot=description]){--bd-paragraph-font-size:var(--typography-body-regular-fontSize);--bd-paragraph-font-weight:var(--typography-body-regular-fontWeight);--bd-paragraph-line-height:var(--typography-body-regular-lineHeight);--bd-paragraph-letter-spacing:var(--typography-body-regular-letterSpacing);--bd-heading-color:var(--color-text-primary);--bd-paragraph-color:var(--color-text-primary);--bd-paragraph-margin-bottom:0}.rule{margin-block:var(--spacing-24);grid-row:4}.price{margin-bottom:var(--spacing-24);--bd-pricing-price-full-font-size:var(--typography-label-large-fontSize);--bd-pricing-price-full-font-weight:var(--typography-label-large-fontWeight);--bd-pricing-price-full-line-height:var(--typography-label-large-lineHeight);--bd-pricing-price-full-letter-spacing:var(--typography-label-large-letterSpacing);--bd-pricing-price-amount-font-weight:var(--typography-fontWeight-bold);--bd-pricing-price-reference-gap:0;--bd-pricing-price-reference-direction-narrow:row;--bd-pricing-price-reference-spacing-narrow:var(--spacing-8);--bd-pricing-price-caption-gap:0;--bd-pricing-price-caption-max-width:none;grid-row:5}.actions{gap:var(--spacing-8);flex-direction:column;grid-row:6;display:flex}.caption{margin-top:var(--spacing-8);font-size:var(--typography-caption-default-fontSize);font-weight:var(--typography-caption-default-fontWeight);line-height:var(--typography-caption-default-lineHeight);letter-spacing:var(--typography-caption-default-letterSpacing);font-family:var(--typography-caption-default-fontFamily);color:var(--color-text-primary);grid-row:7}.features{gap:var(--spacing-24);margin-top:var(--spacing-24);--bd-pricing-feature-group-inset:0;--bd-pricing-feature-group-title-gap:var(--spacing-8);--bd-pricing-feature-group-list-gap:var(--spacing-8);--bd-pricing-feature-group-title-font-size:var(--typography-heading-h6-fontSize);--bd-pricing-feature-group-title-font-weight:var(--typography-fontWeight-bold);--bd-pricing-feature-group-title-line-height:var(--typography-heading-h6-lineHeight);--bd-pricing-feature-row-gap:var(--spacing-12);--bd-pricing-feature-name-gap:0;--bd-pricing-feature-font-size:var(--typography-body-small-fontSize);--bd-pricing-feature-font-weight:var(--typography-body-small-fontWeight);--bd-pricing-feature-line-height:var(--typography-body-small-lineHeight);flex-direction:column;grid-row:8;display:flex}`,n=e`bd-pricing-card>:is(bd-h,bd-display)[slot=title] em{color:var(--color-text-brand);font-style:normal}:where(bd-grid[item-rows]) :is(bd-context,bd-product,bd-option):has(bd-pricing-card):not(bd-pricing-card *):not(bd-grid>*),:where(bd-grid[item-rows]) :is(bd-context,bd-product,bd-option)>bd-pricing-card{grid-row:1/-1;grid-template-rows:subgrid;grid-template-columns:minmax(0,1fr);row-gap:0;display:grid}:where(bd-grid:not([item-rows])) :is(bd-context,bd-product,bd-option):has(bd-pricing-card):not(bd-pricing-card *){display:contents}`;export{t as default,n as pageCSS};
|
|
2
2
|
//# sourceMappingURL=pricing-card.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pricing-card.css.js","names":["pricing_card_css_default"],"sources":["../../../../src/components/pricing-card/pricing-card.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { below, headingRole } from \"#shared/token-scales.ts\";\n\n/* bd-pricing-card: 3.x v1's card (pricing-card.css.ts's .card,\n .highlight-banner, .card-header, .actions), the look that shipped. Its\n price zone is bd-pricing-price's, its features bd-pricing-feature-group's\n and bd-pricing-feature's, and the band under it bd-pricing-group's. */\nexport default css`\n /* As wide as its column, up to 3.x's card: .card's 360 measure, its 32\n inset either side and its edge. */\n :host {\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: 100%;\n /* no token: 3.x's card measure, .card's max-width: 360px plus its\n --card-padding either side and its edge; no width on the scale is a\n card's */\n max-width: 426px;\n font-family: var(--typography-fontFamily-sans);\n }\n\n :host([hidden]) {\n display: none;\n }\n\n /* White, with the border/container edge: the second clause of CLAUDE.md's\n ground-and-edge rule, for a card on the tint bd-pricing-group draws.\n As tall as its row. A page column met inside the card -- a billing\n bd-tab-group in the price slot -- draws none: the card is not a\n section. */\n .card {\n position: relative;\n flex: 1 1 auto;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n background: var(--color-surface-default);\n border: var(--border-width-1) solid var(--color-border-container);\n border-radius: var(--card-radius);\n padding: var(--card-padding);\n text-align: start;\n --bd-ensemble-max-width: none;\n --bd-ensemble-inline-padding: 0;\n }\n\n /* The highlighted plan's edge. */\n :host([highlight]) .card {\n /* The banner's green, so the edge is the banner's own fill role: no\n BORDER role carries it -- --status-success-border is a hairline four\n steps lighter, which a dark page turns dark. The fill is the same\n green-700 in both themes, as the banner is. */\n border: var(--border-width-2) solid var(--status-success-fill);\n }\n\n /* Each part's box is hidden while its slot is empty; the attribute's\n selector outweighs the display a box sets below. */\n .card [hidden] {\n display: none;\n }\n\n /* The highlighted card's ribbon, over its top edge: the success fill and\n its ink (bd-badge's fill pair), 85% of the card wide, centred, the top\n corners rounded. 3.x's -30px, on the scale. It is a label, not a\n heading, set in the heading-h6 role as bd-product-hero sets its kicker\n in heading-h4: 16 at 320 to 18 from 992. */\n .banner {\n position: absolute;\n top: calc(-1 * var(--spacing-28));\n left: 50%;\n transform: translateX(-50%);\n width: 85%;\n padding: var(--spacing-16) var(--spacing-8);\n background: var(--status-success-fill);\n color: var(--status-success-on-fill);\n border-start-start-radius: var(--shape-radius-2xl);\n border-start-end-radius: var(--shape-radius-2xl);\n text-align: center;\n font-size: var(--typography-heading-h6-fontSize);\n font-weight: var(--typography-heading-h6-fontWeight);\n line-height: var(--typography-heading-h6-lineHeight);\n letter-spacing: var(--typography-heading-h6-letterSpacing);\n font-family: var(--typography-heading-h6-fontFamily);\n z-index: var(--z-base);\n }\n\n .header {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n\n /* The plan's name: 3.x's h4, the heading-h4 role, at the level the page\n picks. */\n ::slotted(bd-h[slot=\"title\"]),\n ::slotted(bd-display[slot=\"title\"]) {\n ${unsafeCSS(headingRole(\"heading-h4\"))}\n margin: 0;\n }\n\n .badges {\n display: flex;\n flex-wrap: wrap;\n gap: var(--spacing-8);\n }\n\n /* What the plan covers (\"1 account & 5 devices\"): 3.x's bd-p small, 8\n under the badge, in primary ink. */\n .description {\n margin-top: var(--spacing-8);\n font-size: var(--typography-body-small-fontSize);\n font-weight: var(--typography-body-small-fontWeight);\n line-height: var(--typography-body-small-lineHeight);\n letter-spacing: var(--typography-body-small-letterSpacing);\n font-family: var(--typography-body-small-fontFamily);\n color: var(--color-text-primary);\n }\n\n /* 16 under the header, where 3.x's line under the description stood after\n its paragraph's margin. */\n .header + .rule {\n margin-top: var(--spacing-16);\n }\n\n /* 3.x's .pricing: 16 above the price zone, and 32 below it -- its own 16\n and the 16 its small print's paragraph carried. */\n .price {\n margin-block: var(--spacing-16) var(--spacing-32);\n }\n\n /* The buttons, stacked and as wide as the card, 12 apart (8 below md), 20\n above the rule over the features. */\n .actions {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-12);\n margin-bottom: var(--spacing-20);\n }\n\n @media ${unsafeCSS(below(\"md\"))} {\n .banner {\n padding: var(--spacing-8);\n }\n\n .actions {\n gap: var(--spacing-8);\n }\n }\n`;\n"],"mappings":"A,4DAOA,IAAAA,EAAe,CAAG,w0E"}
|
|
1
|
+
{"version":3,"file":"pricing-card.css.js","names":["pricing_card_css_default","pageCSS"],"sources":["../../../../src/components/pricing-card/pricing-card.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { bodyRole, headingRole, ink } from \"#shared/token-scales.ts\";\nimport { hostFillsWidth } from \"#shared/fill-width.css.ts\";\n\n/* bd-pricing-card: the pricing card's second version. Its price zone is\n bd-pricing-price's and its features bd-pricing-feature-group's and\n bd-pricing-feature's, set in this card's scale through their hooks; the\n row it lines up in is bd-grid's, with item-rows=\"8\".\n\n EIGHT ROWS, ONE PER PART: badge, title, description, the rule, price,\n actions, caption, features. The host is a grid of its own eight, and the\n card a subgrid of them; in a bd-grid with item-rows=\"8\" the host is in turn\n a subgrid of the grid's rows (grid.css.ts), so the parts of a row of cards\n line up however differently each one's words wrap. Each part names its\n row, so a part a card leaves out leaves its row empty rather than pulling\n the parts under it up a row. The parts are spaced by margins rather than\n the row gap, so an empty row in one card takes no room of its own. */\nexport default css`\n /* bd-grid places its items at start, so the host asks for its column's\n whole width rather than its content's (shared/fill-width.css.ts). The\n last row, the features, takes what the row of cards leaves. */\n :host {\n display: grid;\n grid-template-rows: repeat(7, auto) 1fr;\n font-family: var(--typography-fontFamily-sans);\n }\n\n ${hostFillsWidth()}\n\n :host([hidden]) {\n display: none;\n }\n\n /* White with the border/container edge: the cards of a row are a\n comparison set, which the tonal step alone does not sharpen (CLAUDE.md,\n A card's ground and its edge), on the page and on a tint alike. The card\n corner and the compact inset. A page column met inside the card -- a\n billing bd-tab-group in the price slot -- draws none. */\n .card {\n position: relative;\n display: grid;\n grid-row: 1 / -1;\n grid-template-rows: subgrid;\n grid-template-columns: minmax(0, 1fr);\n row-gap: 0;\n box-sizing: border-box;\n background: var(--color-surface-default);\n border: var(--border-width-1) solid var(--color-border-container);\n border-radius: var(--card-radius);\n padding: var(--card-padding-compact);\n text-align: start;\n --bd-ensemble-max-width: none;\n --bd-ensemble-inline-padding: 0;\n }\n\n /* The recommended plan's edge: Figma's border-width/2 in border/brand, the\n card's own border, as the design draws it. It is one step heavier than\n its neighbours' edge, so its content sits that step further in; the rows\n the cards share as a subgrid still start on one line. */\n :host([highlight]) .card {\n border: var(--border-width-2) solid var(--color-border-brand);\n }\n\n /* Each part's box is hidden while its slot is empty; the attribute's\n selector outweighs the display a box sets below. */\n .card [hidden] {\n display: none;\n }\n\n /* The recommended plan's tab, standing on the card's top edge, centred:\n the brand fill and its ink, its top corners rounded: Figma's\n Recommended ribbon, 4/16 padding at radius/md, its words 14/700/145%. Out of the rows -- absolutely placed -- so a highlighted card's\n parts sit where its neighbours' do. */\n .banner {\n position: absolute;\n bottom: 100%;\n left: 50%;\n transform: translateX(-50%);\n padding: var(--spacing-4) var(--spacing-16);\n background: var(--status-brand-fill);\n color: var(--status-brand-on-fill);\n border-start-start-radius: var(--shape-radius-md);\n border-start-end-radius: var(--shape-radius-md);\n white-space: nowrap;\n font-size: var(--typography-body-small-fontSize);\n /* no role: the body-small role at 700, as Figma's ribbon sets it (IBM\n Plex Sans Bold, font-size/sm, 145%); no role carries 14px at that\n weight. */\n font-weight: var(--typography-fontWeight-bold);\n line-height: var(--typography-body-small-lineHeight);\n letter-spacing: var(--typography-body-small-letterSpacing);\n font-family: var(--typography-body-small-fontFamily);\n z-index: var(--z-base);\n }\n\n /* The plan's badge (\"Device Protection\"), 16 over the title. */\n .badge {\n grid-row: 1;\n display: flex;\n flex-wrap: wrap;\n align-items: flex-start;\n gap: var(--spacing-8);\n margin-bottom: var(--spacing-16);\n }\n\n /* The plan's name, 8 over what it covers. */\n .title {\n grid-row: 2;\n margin-bottom: var(--spacing-8);\n }\n\n /* The heading-h5 role in bold, at the level the page picks. */\n ::slotted(bd-h[slot=\"title\"]),\n ::slotted(bd-display[slot=\"title\"]) {\n ${unsafeCSS(headingRole(\"heading-h5\"))}\n /* no role: the h5 role at 700, the plan's name as the design draws it;\n no heading role carries the h5 size at that weight (bd-card's title\n is the same pair). */\n --bd-heading-font-weight: var(--typography-fontWeight-bold);\n --bd-heading-color: var(--color-text-primary);\n margin: 0;\n }\n\n /* What the plan covers -- its accounts and devices, then the line on what\n it protects -- one bd-p per paragraph, 16 apart, at body-regular in\n primary ink, Figma's body/regular, set through bd-p's hooks with no flow\n margin: the gap is the spacing here. A <strong> the page writes is its\n own: Figma sets the pitch's first word at 700. The box sets the same\n role, so words slotted bare read alike. */\n .description {\n grid-row: 3;\n display: flex;\n flex-direction: column;\n gap: var(--spacing-16);\n font-size: var(--typography-body-regular-fontSize);\n font-weight: var(--typography-body-regular-fontWeight);\n line-height: var(--typography-body-regular-lineHeight);\n letter-spacing: var(--typography-body-regular-letterSpacing);\n font-family: var(--typography-body-regular-fontFamily);\n color: var(--color-text-primary);\n }\n\n ::slotted(bd-p[slot=\"description\"]) {\n ${unsafeCSS(bodyRole(\"body-regular\"))}\n ${unsafeCSS(ink(\"strong\"))}\n --bd-paragraph-margin-bottom: 0;\n }\n\n /* The rule between what the plan is and what it costs, 24 either side:\n Figma's card is an auto layout with spacing/24 between its children, and\n the rule is one of them. Its row is the one every card's rule shares, so\n the prices start on one line. */\n .rule {\n grid-row: 4;\n margin-block: var(--spacing-24);\n }\n\n /* The price zone in Figma's type, through bd-pricing-price's hooks: the\n struck price is price/was, the label-large role (16, medium, 150%),\n and the price is bold. */\n .price {\n grid-row: 5;\n margin-bottom: var(--spacing-24);\n --bd-pricing-price-full-font-size: var(--typography-label-large-fontSize);\n --bd-pricing-price-full-font-weight: var(--typography-label-large-fontWeight);\n --bd-pricing-price-full-line-height: var(--typography-label-large-lineHeight);\n --bd-pricing-price-full-letter-spacing: var(--typography-label-large-letterSpacing);\n /* no role: the heading-h3 price at 700, bold as Figma draws it; no role\n carries the h3 size at that weight. */\n --bd-pricing-price-amount-font-weight: var(--typography-fontWeight-bold);\n /* The struck price and the discount sit on one line at every width, as\n Figma draws them on a phone too, with nothing under them but the\n price's own leading: the zone's default 16 under each, and its\n stacking below md, spread the zone out on a phone. */\n --bd-pricing-price-reference-gap: 0;\n --bd-pricing-price-reference-direction-narrow: row;\n --bd-pricing-price-reference-spacing-narrow: var(--spacing-8);\n /* The small print sits right under the price, on the price's leading,\n as wide as the card: Figma's terms text fills the column. */\n --bd-pricing-price-caption-gap: 0;\n --bd-pricing-price-caption-max-width: none;\n }\n\n /* The buttons, stacked and as wide as the card, 8 apart. */\n .actions {\n grid-row: 6;\n display: flex;\n flex-direction: column;\n gap: var(--spacing-8);\n }\n\n /* The guarantee under the buttons, in the caption role. */\n .caption {\n grid-row: 7;\n margin-top: var(--spacing-8);\n font-size: var(--typography-caption-default-fontSize);\n font-weight: var(--typography-caption-default-fontWeight);\n line-height: var(--typography-caption-default-lineHeight);\n letter-spacing: var(--typography-caption-default-letterSpacing);\n font-family: var(--typography-caption-default-fontFamily);\n color: var(--color-text-primary);\n }\n\n /* The features, 24 under the buttons, in the card's scale: each list's\n heading at heading-h6 in bold, 8 over its first feature and no inset of\n its own, the features at body-small 12 apart. The hooks inherit through\n the slot into bd-pricing-feature-group's and bd-pricing-feature's shadow\n roots; a list 24 under the one before it. */\n .features {\n grid-row: 8;\n display: flex;\n flex-direction: column;\n gap: var(--spacing-24);\n margin-top: var(--spacing-24);\n --bd-pricing-feature-group-inset: 0;\n --bd-pricing-feature-group-title-gap: var(--spacing-8);\n --bd-pricing-feature-group-list-gap: var(--spacing-8);\n --bd-pricing-feature-group-title-font-size: var(--typography-heading-h6-fontSize);\n /* no role: the h6 role at 700, \"Includes:\" as the design draws it; no\n heading role carries the h6 size at that weight. */\n --bd-pricing-feature-group-title-font-weight: var(--typography-fontWeight-bold);\n --bd-pricing-feature-group-title-line-height: var(--typography-heading-h6-lineHeight);\n --bd-pricing-feature-row-gap: var(--spacing-12);\n --bd-pricing-feature-name-gap: 0;\n --bd-pricing-feature-font-size: var(--typography-body-small-fontSize);\n --bd-pricing-feature-font-weight: var(--typography-body-small-fontWeight);\n --bd-pricing-feature-line-height: var(--typography-body-small-lineHeight);\n }\n`;\n\n/* Adopted into the tree the card sits in (adoptStyles, in connectedCallback).\n\n bd-context, bd-product and bd-option set no display of their own: each is\n an inline box with a slot in it, and a card inside them would be the block\n inside an inline, never the grid's item. Only the wrappers around a card\n are touched, none inside one.\n\n IN A bd-grid WITH item-rows the wrapper the grid slots is its item, and\n bd-grid's own ::slotted() rule makes it the subgrid of the grid's rows,\n spaced as any item is; the wrappers inside it and the card are each a\n subgrid of the one around them, spanning all its rows. So the card's parts\n sit in the grid's rows through the chain, and nothing here reads the\n grid's private properties. The wrapper the grid slots is left to that\n rule: a document rule beats a shadow root's ::slotted(), so this one must\n not match it.\n\n IN ANY OTHER bd-grid the wrappers draw no box, and the card is the item.\n\n THE NAME'S ACCENT. A word the page writes in <em> inside the title --\n \"Ultimate Security <em>Plus</em>\" -- is drawn upright in the brand's text\n ink, Figma's text/brand. It is the page's markup, so it is styled where the\n page's markup is, in this document-scope sheet: no rule in the card's or\n bd-h's shadow root reaches a word inside a slotted heading. Nothing is\n parsed out of the words; 3.x found and coloured \"Plus\" itself, and v4\n leaves which word to the page. */\nexport const pageCSS = css`\n bd-pricing-card > :is(bd-h, bd-display)[slot=\"title\"] em {\n font-style: normal;\n color: var(--color-text-brand);\n }\n\n :where(bd-grid[item-rows]) :is(bd-context, bd-product, bd-option):has(bd-pricing-card):not(bd-pricing-card *):not(bd-grid > *),\n :where(bd-grid[item-rows]) :is(bd-context, bd-product, bd-option) > bd-pricing-card {\n display: grid;\n grid-row: 1 / -1;\n grid-template-rows: subgrid;\n grid-template-columns: minmax(0, 1fr);\n row-gap: 0;\n }\n\n :where(bd-grid:not([item-rows])) :is(bd-context, bd-product, bd-option):has(bd-pricing-card):not(bd-pricing-card *) {\n display: contents;\n }\n`;\n"],"mappings":"A,gGAiBA,IAAAA,EAAe,CAAG,+tJA8OLC,EAAU,CAAG,yhB"}
|
|
@@ -2,74 +2,90 @@ import { LitElement } from "lit";
|
|
|
2
2
|
import { SlotController } from "../shared/controller.slot.js";
|
|
3
3
|
import "../../tokens/tokens.js";
|
|
4
4
|
import "./pricing-price.js";
|
|
5
|
-
import "./pricing-group.js";
|
|
6
5
|
import "./pricing-feature-group.js";
|
|
7
6
|
import "./pricing-feature.js";
|
|
8
|
-
import "../accordion/accordion-item.js";
|
|
9
7
|
import "../badge/badge.js";
|
|
10
8
|
import "../button/button.js";
|
|
11
9
|
import "../divider/divider.js";
|
|
10
|
+
import "../grid/grid.js";
|
|
12
11
|
import "../h/h.js";
|
|
12
|
+
import "../icons/arrow-back.js";
|
|
13
13
|
import "../link/link.js";
|
|
14
14
|
import "../p/p.js";
|
|
15
|
-
type Part = "banner" | "
|
|
15
|
+
type Part = "banner" | "badge" | "title" | "description" | "price" | "actions" | "caption" | "";
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
* covers, the store's price, the Buy and Learn More buttons,
|
|
17
|
+
* The pricing card's second version: a plan's badge, its name and what it
|
|
18
|
+
* covers, the store's price, the Buy and Learn More buttons, the guarantee
|
|
19
|
+
* under them, and, in the version that has them, the features it adds.
|
|
19
20
|
*
|
|
20
|
-
* <bd-
|
|
21
|
-
* <bd-
|
|
22
|
-
* <bd-
|
|
23
|
-
* <
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
21
|
+
* <bd-grid cols="1" cols-md="2" cols-lg="4" gap="lg" gap-md="md" item-rows="8">
|
|
22
|
+
* <bd-context ignore-events-parent>
|
|
23
|
+
* <bd-product product-id="ps_i">
|
|
24
|
+
* <bd-option devices="5" subscription="1" data-layer-event="info">
|
|
25
|
+
* <bd-pricing-card highlight>
|
|
26
|
+
* <span slot="banner">Recommended</span>
|
|
27
|
+
* <bd-badge slot="badge" variant="brand" size="lg">Scam Protection</bd-badge>
|
|
28
|
+
* <bd-h slot="title" as="h3">Bitdefender<br>Premium Security</bd-h>
|
|
29
|
+
* <bd-p slot="description">1 Account, 5 devices</bd-p>
|
|
30
|
+
* <bd-p slot="description"><strong>Complete</strong> device protection …</bd-p>
|
|
31
|
+
* <bd-pricing-price slot="price" size="lg">…</bd-pricing-price>
|
|
32
|
+
* <bd-button slot="actions" buy-link appearance="accent" full-width label="Buy Now, Bitdefender Premium Security">Buy Now</bd-button>
|
|
33
|
+
* <bd-button slot="actions" href="/premium-security" appearance="ghost" full-width label="Learn more about Bitdefender Premium Security">Learn More</bd-button>
|
|
34
|
+
* <span slot="caption">30 days money back guarantee.</span>
|
|
35
|
+
* <bd-pricing-feature-group>…</bd-pricing-feature-group>
|
|
36
|
+
* </bd-pricing-card>
|
|
37
|
+
* </bd-option>
|
|
38
|
+
* </bd-product>
|
|
39
|
+
* </bd-context>
|
|
40
|
+
* …
|
|
41
|
+
* </bd-grid>
|
|
34
42
|
*
|
|
35
|
-
* It
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* when highlighted.
|
|
43
|
+
* It replaced the first v4 card (3.x's v1, a column of boxes on a brand band
|
|
44
|
+
* bd-pricing-group drew) in place, under the same tag: its parts are laid out
|
|
45
|
+
* as rows a row of cards shares. It kept everything else: the same price
|
|
46
|
+
* zone, the same feature lists with their disclosures, the same store wiring,
|
|
47
|
+
* the same buttons.
|
|
41
48
|
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* them.
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* the page's bd-product's and bd-option's.
|
|
49
|
+
* EIGHT ROWS, SHARED. The card is a grid of eight rows -- badge, title,
|
|
50
|
+
* description, the rule, price, actions, caption, features -- and its frame a
|
|
51
|
+
* subgrid of them. In a `bd-grid item-rows="8"` the card is in turn a subgrid
|
|
52
|
+
* of the grid's rows (grid.css.ts), so every card's title, rule, price and
|
|
53
|
+
* buttons start on one line across the row however differently the cards'
|
|
54
|
+
* names and descriptions wrap. Each part is placed in its own row, so a part
|
|
55
|
+
* a card leaves out leaves its row at the height the other cards give it,
|
|
56
|
+
* and the rest still line up. The card is no size container, for the same
|
|
57
|
+
* reason bd-audience-card is not: containment makes a grid its own.
|
|
52
58
|
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
59
|
+
* THE STORE'S NODES ARE THE PAGE'S, as in bd-pricing-card: the price zone's
|
|
60
|
+
* data-store-* nodes and the bd-button buy-link are slotted page markup,
|
|
61
|
+
* inside the bd-context, bd-product and bd-option the page wraps the card in,
|
|
62
|
+
* and nothing store-bound renders in this shadow root. Those wrappers set no
|
|
63
|
+
* display, and between a bd-grid and its card the outermost is the grid's
|
|
64
|
+
* item rather than the card; so the card adopts a sheet into the tree it
|
|
65
|
+
* sits in (pageCSS) under which each wrapper inside that item, and
|
|
66
|
+
* the card, is a subgrid of the one around it. The card's parts then sit in
|
|
67
|
+
* the grid's rows whichever way the page wrote it.
|
|
62
68
|
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
69
|
+
* The title is drawn at heading-h5 in bold at the level the page picks, a
|
|
70
|
+
* word the page writes in <em> in it -- "Ultimate Security <em>Plus</em>" --
|
|
71
|
+
* upright in the brand's text ink (pageCSS); the
|
|
72
|
+
* description at body-regular, the caption in the caption role, and the features in the
|
|
73
|
+
* card's scale through bd-pricing-feature-group's and bd-pricing-feature's
|
|
74
|
+
* hooks. The price zone is the page's bd-pricing-price at its default
|
|
75
|
+
* `appearance="card"`, whose discount is the success shade, drawn in Figma's
|
|
76
|
+
* type through its hooks: the struck price at label-large, the price bold.
|
|
77
|
+
* No part has a
|
|
78
|
+
* fallback; each part's box is hidden while its slot is empty, the banner is
|
|
79
|
+
* drawn only with `highlight`, and the features take their room only when
|
|
80
|
+
* the page writes them -- the version without the green checks is the same
|
|
81
|
+
* card with nothing in its default slot.
|
|
67
82
|
*/
|
|
68
83
|
export declare class BdPricingCard extends LitElement {
|
|
69
84
|
static styles: import("lit").CSSResult[];
|
|
70
|
-
/** The
|
|
85
|
+
/** The recommended plan: a brand edge, and the `banner` drawn as a tab over the card's top edge. Reflected. */
|
|
71
86
|
highlight: boolean;
|
|
72
87
|
_slots: SlotController<Part>;
|
|
88
|
+
connectedCallback(): void;
|
|
73
89
|
render(): import("lit-html").TemplateResult<1>;
|
|
74
90
|
}
|
|
75
91
|
declare global {
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import"../p/p.js";import{SlotController as n}from"../shared/controller.slot.js";import"../h/h.js";import"../link/link.js";import"../badge/badge.js";import"../
|
|
1
|
+
import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import"../p/p.js";import{SlotController as n}from"../shared/controller.slot.js";import"../h/h.js";import"../link/link.js";import"../badge/badge.js";import"../button/button.js";import{adoptStyles as r}from"../shared/adopt-styles.js";import"../divider/divider.js";import"../grid/grid.js";import"../icons/arrow-back.js";import i,{pageCSS as a}from"./pricing-card.css.js";import"./pricing-price.js";import"./pricing-feature.js";import"./pricing-feature-group.js";import{LitElement as o,html as s}from"lit";import{property as c}from"lit/decorators.js";var l=class extends o{constructor(...e){super(...e),this.highlight=!1,this._slots=new n(this,{slots:[`banner`,`badge`,`title`,`description`,`price`,`actions`,`caption`,``]})}static{this.styles=[i]}connectedCallback(){super.connectedCallback(),r(this,`bd-pricing-card`,a)}render(){let e=e=>this._slots.has(e);return s`
|
|
2
2
|
<div class="card">
|
|
3
3
|
<div class="banner" ?hidden=${!this.highlight||!e(`banner`)}><slot name="banner"></slot></div>
|
|
4
|
-
<div class="
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
</div>
|
|
9
|
-
<bd-divider class="rule" orientation="horizontal" color="subtle" opacity="0.25"></bd-divider>
|
|
4
|
+
<div class="badge" ?hidden=${!e(`badge`)}><slot name="badge"></slot></div>
|
|
5
|
+
<div class="title" ?hidden=${!e(`title`)}><slot name="title"></slot></div>
|
|
6
|
+
<div class="description" ?hidden=${!e(`description`)}><slot name="description"></slot></div>
|
|
7
|
+
<bd-divider class="rule" orientation="horizontal" color="subtle"></bd-divider>
|
|
10
8
|
<div class="price" ?hidden=${!e(`price`)}><slot name="price"></slot></div>
|
|
11
9
|
<div class="actions" ?hidden=${!e(`actions`)}><slot name="actions"></slot></div>
|
|
12
|
-
<
|
|
10
|
+
<div class="caption" ?hidden=${!e(`caption`)}><slot name="caption"></slot></div>
|
|
13
11
|
<div class="features" ?hidden=${!e(``)}><slot></slot></div>
|
|
14
12
|
</div>
|
|
15
|
-
`}};t([
|
|
13
|
+
`}};t([c({type:Boolean,reflect:!0,attribute:`highlight`})],l.prototype,`highlight`,void 0),l=t([e(`bd-pricing-card`)],l);export{l as BdPricingCard};
|
|
16
14
|
//# sourceMappingURL=pricing-card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pricing-card.js","names":["pricingCardCSS","_decorate","__decorate","pricing_card_css_default","BdPricingCard","LitElement","_args","SlotController","has","part","property","defineElement"],"sources":["../../../../src/components/pricing-card/pricing-card.ts"],"sourcesContent":["import { LitElement, html } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { SlotController } from \"#shared/controller.slot.ts\";\nimport { defineElement } from \"#shared/define-element.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\n/*
|
|
1
|
+
{"version":3,"file":"pricing-card.js","names":["pricingCardCSS","_decorate","__decorate","pricing_card_css_default","BdPricingCard","LitElement","_args","SlotController","adoptStyles","pageCSS","has","part","property","defineElement"],"sources":["../../../../src/components/pricing-card/pricing-card.ts"],"sourcesContent":["import { LitElement, html } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { adoptStyles } from \"#shared/adopt-styles.ts\";\nimport { SlotController } from \"#shared/controller.slot.ts\";\nimport { defineElement } from \"#shared/define-element.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\n/* The family's parts the page writes into the card: the price zone and the\n feature lists, the same elements bd-pricing-card takes. */\nimport \"./pricing-price.ts\";\nimport \"./pricing-feature-group.ts\";\nimport \"./pricing-feature.ts\";\n/* The atoms the page writes into the slots -- the plan's badge, the title,\n the Buy and Learn More buttons, the back arrow before a list's heading --\n and the rule the card draws; and bd-grid, the row the cards line up in. A\n page importing only this module gets everything it writes. */\nimport \"#components/badge/badge.ts\";\nimport \"#components/button/button.ts\";\nimport \"#components/divider/divider.ts\";\nimport \"#components/grid/grid.ts\";\nimport \"#components/h/h.ts\";\nimport \"#components/icons/arrow-back.ts\";\nimport \"#components/link/link.ts\";\nimport \"#components/p/p.ts\";\nimport pricingCardCSS, { pageCSS } from \"./pricing-card.css.ts\";\n\ntype Part = \"banner\" | \"badge\" | \"title\" | \"description\" | \"price\" | \"actions\" | \"caption\" | \"\";\n\n/**\n * The pricing card's second version: a plan's badge, its name and what it\n * covers, the store's price, the Buy and Learn More buttons, the guarantee\n * under them, and, in the version that has them, the features it adds.\n *\n * <bd-grid cols=\"1\" cols-md=\"2\" cols-lg=\"4\" gap=\"lg\" gap-md=\"md\" item-rows=\"8\">\n * <bd-context ignore-events-parent>\n * <bd-product product-id=\"ps_i\">\n * <bd-option devices=\"5\" subscription=\"1\" data-layer-event=\"info\">\n * <bd-pricing-card highlight>\n * <span slot=\"banner\">Recommended</span>\n * <bd-badge slot=\"badge\" variant=\"brand\" size=\"lg\">Scam Protection</bd-badge>\n * <bd-h slot=\"title\" as=\"h3\">Bitdefender<br>Premium Security</bd-h>\n * <bd-p slot=\"description\">1 Account, 5 devices</bd-p>\n * <bd-p slot=\"description\"><strong>Complete</strong> device protection …</bd-p>\n * <bd-pricing-price slot=\"price\" size=\"lg\">…</bd-pricing-price>\n * <bd-button slot=\"actions\" buy-link appearance=\"accent\" full-width label=\"Buy Now, Bitdefender Premium Security\">Buy Now</bd-button>\n * <bd-button slot=\"actions\" href=\"/premium-security\" appearance=\"ghost\" full-width label=\"Learn more about Bitdefender Premium Security\">Learn More</bd-button>\n * <span slot=\"caption\">30 days money back guarantee.</span>\n * <bd-pricing-feature-group>…</bd-pricing-feature-group>\n * </bd-pricing-card>\n * </bd-option>\n * </bd-product>\n * </bd-context>\n * …\n * </bd-grid>\n *\n * It replaced the first v4 card (3.x's v1, a column of boxes on a brand band\n * bd-pricing-group drew) in place, under the same tag: its parts are laid out\n * as rows a row of cards shares. It kept everything else: the same price\n * zone, the same feature lists with their disclosures, the same store wiring,\n * the same buttons.\n *\n * EIGHT ROWS, SHARED. The card is a grid of eight rows -- badge, title,\n * description, the rule, price, actions, caption, features -- and its frame a\n * subgrid of them. In a `bd-grid item-rows=\"8\"` the card is in turn a subgrid\n * of the grid's rows (grid.css.ts), so every card's title, rule, price and\n * buttons start on one line across the row however differently the cards'\n * names and descriptions wrap. Each part is placed in its own row, so a part\n * a card leaves out leaves its row at the height the other cards give it,\n * and the rest still line up. The card is no size container, for the same\n * reason bd-audience-card is not: containment makes a grid its own.\n *\n * THE STORE'S NODES ARE THE PAGE'S, as in bd-pricing-card: the price zone's\n * data-store-* nodes and the bd-button buy-link are slotted page markup,\n * inside the bd-context, bd-product and bd-option the page wraps the card in,\n * and nothing store-bound renders in this shadow root. Those wrappers set no\n * display, and between a bd-grid and its card the outermost is the grid's\n * item rather than the card; so the card adopts a sheet into the tree it\n * sits in (pageCSS) under which each wrapper inside that item, and\n * the card, is a subgrid of the one around it. The card's parts then sit in\n * the grid's rows whichever way the page wrote it.\n *\n * The title is drawn at heading-h5 in bold at the level the page picks, a\n * word the page writes in <em> in it -- \"Ultimate Security <em>Plus</em>\" --\n * upright in the brand's text ink (pageCSS); the\n * description at body-regular, the caption in the caption role, and the features in the\n * card's scale through bd-pricing-feature-group's and bd-pricing-feature's\n * hooks. The price zone is the page's bd-pricing-price at its default\n * `appearance=\"card\"`, whose discount is the success shade, drawn in Figma's\n * type through its hooks: the struck price at label-large, the price bold.\n * No part has a\n * fallback; each part's box is hidden while its slot is empty, the banner is\n * drawn only with `highlight`, and the features take their room only when\n * the page writes them -- the version without the green checks is the same\n * card with nothing in its default slot.\n */\n@defineElement(\"bd-pricing-card\")\nexport class BdPricingCard extends LitElement {\n static styles = [pricingCardCSS];\n\n /** The recommended plan: a brand edge, and the `banner` drawn as a tab over the card's top edge. Reflected. */\n @property({ type: Boolean, reflect: true, attribute: \"highlight\" })\n highlight = false;\n\n _slots = new SlotController<Part>(this, {\n slots: [\"banner\", \"badge\", \"title\", \"description\", \"price\", \"actions\", \"caption\", \"\"]\n });\n\n connectedCallback() {\n super.connectedCallback();\n adoptStyles(this, \"bd-pricing-card\", pageCSS);\n }\n\n render() {\n const has = (part: Part) => this._slots.has(part);\n return html`\n <div class=\"card\">\n <div class=\"banner\" ?hidden=${!this.highlight || !has(\"banner\")}><slot name=\"banner\"></slot></div>\n <div class=\"badge\" ?hidden=${!has(\"badge\")}><slot name=\"badge\"></slot></div>\n <div class=\"title\" ?hidden=${!has(\"title\")}><slot name=\"title\"></slot></div>\n <div class=\"description\" ?hidden=${!has(\"description\")}><slot name=\"description\"></slot></div>\n <bd-divider class=\"rule\" orientation=\"horizontal\" color=\"subtle\"></bd-divider>\n <div class=\"price\" ?hidden=${!has(\"price\")}><slot name=\"price\"></slot></div>\n <div class=\"actions\" ?hidden=${!has(\"actions\")}><slot name=\"actions\"></slot></div>\n <div class=\"caption\" ?hidden=${!has(\"caption\")}><slot name=\"caption\"></slot></div>\n <div class=\"features\" ?hidden=${!has(\"\")}><slot></slot></div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-pricing-card\": BdPricingCard;\n }\n}\n"],"mappings":"A,wsBAgGO,IAAMI,EAAN,cAA4BC,CAAW,C,8BAKhC,KAAA,UAAA,GAEH,KAAA,OAAA,IAAIE,EAAqB,KAAM,CACtC,MAAO,CAAC,SAAU,QAAS,QAAS,cAAe,QAAS,UAAW,UAAW,EAAE,CACtF,CAAC,C,QARe,KAAA,OAAA,CAACP,CAAc,C,CAU/B,mBAAoB,CAClB,MAAM,kBAAkB,EACxBQ,EAAY,KAAM,kBAAmBC,CAAO,CAC9C,CAEA,QAAS,CACP,IAAMC,EAAO,GAAe,KAAK,OAAO,IAAIC,CAAI,EAChD,MAAO,EAAI;;sCAEuB,CAAC,KAAK,WAAa,CAACD,EAAI,QAAQ,EAAE;qCACnC,CAACA,EAAI,OAAO,EAAE;qCACd,CAACA,EAAI,OAAO,EAAE;2CACR,CAACA,EAAI,aAAa,EAAE;;qCAE1B,CAACA,EAAI,OAAO,EAAE;uCACZ,CAACA,EAAI,SAAS,EAAE;uCAChB,CAACA,EAAI,SAAS,EAAE;wCACf,CAACA,EAAI,EAAE,EAAE;;KAG/C,CACF,EA5BGT,EAAA,CAAAW,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,WAAY,CAAC,CAAA,EAAAR,EAAA,UAAA,YAAA,IAAA,EAAA,EALnE,EAAAH,EAAA,CAAAY,EAAc,iBAAiB,CAAA,EAAAT,CAAA,E"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{css as e}from"lit";var t=e`:host{display:block}:host([hidden]){display:none}.group{padding:var(--bd-pricing-feature-group-inset,var(--spacing-10))}.title[hidden],.icon[hidden]{display:none}.title{align-items:flex-start;gap:var(--spacing-8);padding-bottom:var(--bd-pricing-feature-group-title-gap,var(--spacing-16));text-align:start;display:flex}::slotted(bd-h[slot=title]),::slotted(bd-display[slot=title]){--bd-heading-font-size:var(--bd-pricing-feature-group-title-font-size,var(--typography-heading-h4-fontSize));--bd-heading-font-weight:var(--bd-pricing-feature-group-title-font-weight,var(--typography-heading-h4-fontWeight));--bd-heading-line-height:var(--bd-pricing-feature-group-title-line-height,var(--typography-heading-h4-lineHeight));--bd-heading-letter-spacing:var(--typography-heading-h4-letterSpacing);--bd-heading-font-family:var(--typography-heading-h4-fontFamily);margin:0}.icon{height:calc(var(--bd-pricing-feature-group-title-font-size,var(--typography-heading-h4-fontSize)) * var(--bd-pricing-feature-group-title-line-height,var(--typography-heading-h4-lineHeight)));color:var(--color-text-brand);flex-shrink:0;align-items:center;display:inline-flex}.list{padding-top:var(--bd-pricing-feature-group-list-gap,var(--spacing-16));text-align:start}`;export{t as default};
|
|
2
2
|
//# sourceMappingURL=pricing-feature-group.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pricing-feature-group.css.js","names":["pricing_feature_group_css_default"],"sources":["../../../../src/components/pricing-card/pricing-feature-group.css.ts"],"sourcesContent":["import { css
|
|
1
|
+
{"version":3,"file":"pricing-feature-group.css.js","names":["pricing_feature_group_css_default"],"sources":["../../../../src/components/pricing-card/pricing-feature-group.css.ts"],"sourcesContent":["import { css } from \"lit\";\n\n/* bd-pricing-feature-group: 3.x v1's .features block, its heading and its\n list (pricing-card.css.ts), which each of the five feature lists drew in\n its own shadow root.\n\n THE HOOKS. A card that sets its features in its own scale --\n bd-pricing-card, whose lists sit under a guarantee line in a 14px card --\n sets these on the box around its default slot, and they inherit through\n the slot into this shadow root. Unset, each falls back to 3.x v1's value:\n\n --bd-pricing-feature-group-inset the group's padding (10)\n --bd-pricing-feature-group-title-gap under the heading (16)\n --bd-pricing-feature-group-list-gap above the first feature (16)\n --bd-pricing-feature-group-title-font-size / -font-weight / -line-height\n the heading's role (heading-h4)\n\n The heading's tracking and face stay heading-h4's: every heading role\n shares them. */\nexport default css`\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n /* 3.x's .features inset. */\n .group {\n padding: var(--bd-pricing-feature-group-inset, var(--spacing-10));\n }\n\n .title[hidden],\n .icon[hidden] {\n display: none;\n }\n\n /* 3.x's .text-left: the heading start-aligned with 15 under it, 16 now,\n the step on the scale. The icon, when the page gives one, sits before\n the heading on its first line. */\n .title {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-8);\n padding-bottom: var(--bd-pricing-feature-group-title-gap, var(--spacing-16));\n text-align: start;\n }\n\n /* The heading: 3.x's h4, the heading-h4 role, at whatever level the page\n picks, unless the card it is in sets the hooks. */\n ::slotted(bd-h[slot=\"title\"]),\n ::slotted(bd-display[slot=\"title\"]) {\n --bd-heading-font-size: var(--bd-pricing-feature-group-title-font-size, var(--typography-heading-h4-fontSize));\n --bd-heading-font-weight: var(--bd-pricing-feature-group-title-font-weight, var(--typography-heading-h4-fontWeight));\n --bd-heading-line-height: var(--bd-pricing-feature-group-title-line-height, var(--typography-heading-h4-lineHeight));\n --bd-heading-letter-spacing: var(--typography-heading-h4-letterSpacing);\n --bd-heading-font-family: var(--typography-heading-h4-fontFamily);\n margin: 0;\n }\n\n /* The icon before the heading (\"Everything from Total Security and:\"\n points back at the plan before), in the brand's text ink and centred on\n the heading's first line: the box is one line of the heading tall. */\n .icon {\n flex-shrink: 0;\n display: inline-flex;\n align-items: center;\n height: calc(var(--bd-pricing-feature-group-title-font-size, var(--typography-heading-h4-fontSize)) * var(--bd-pricing-feature-group-title-line-height, var(--typography-heading-h4-lineHeight)));\n color: var(--color-text-brand);\n }\n\n /* 3.x's .features ul: 16 above the first row, no indent. */\n .list {\n padding-top: var(--bd-pricing-feature-group-list-gap, var(--spacing-16));\n text-align: start;\n }\n`;\n"],"mappings":"A,0BAmBA,IAAAA,EAAe,CAAG,ytC"}
|
|
@@ -3,7 +3,7 @@ import { SlotController } from "../shared/controller.slot.js";
|
|
|
3
3
|
import "../../tokens/tokens.js";
|
|
4
4
|
import "./pricing-feature.js";
|
|
5
5
|
import "../h/h.js";
|
|
6
|
-
type Part = "" | "title";
|
|
6
|
+
type Part = "" | "title" | "icon";
|
|
7
7
|
/**
|
|
8
8
|
* A titled list of a pricing card's features.
|
|
9
9
|
*
|
|
@@ -27,6 +27,12 @@ type Part = "" | "title";
|
|
|
27
27
|
* -- one list of five, centred beside four start-aligned ones -- so every
|
|
28
28
|
* group draws the same heading now, and there is no attribute for it.
|
|
29
29
|
*
|
|
30
|
+
* An `icon` the page slots -- a bd-icon -- sits before the heading, in the
|
|
31
|
+
* brand's text ink: the back arrow before "Everything from Total Security
|
|
32
|
+
* and:" in bd-pricing-card, pointing at the plan the list builds on. It
|
|
33
|
+
* is drawn only with a title, and it is the page's, so it is named or
|
|
34
|
+
* hidden as the page wrote it; a bd-icon with no label is hidden.
|
|
35
|
+
*
|
|
30
36
|
* ONE DESCRIPTION OPEN AT A TIME. A feature that opens its description sends
|
|
31
37
|
* bd-show; the group closes the others among its own features, as 3.x's
|
|
32
38
|
* FeatureTips kept one open per list.
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import{SlotController as n}from"../shared/controller.slot.js";import"../h/h.js";import"./pricing-feature.js";import r from"./pricing-feature-group.css.js";import{LitElement as i,html as a,nothing as o}from"lit";var s=class extends i{static{this.styles=[r]}constructor(){super(),this._slots=new n(this,{slots:[`title`,``]}),this._onShow=e=>{let t=e.target;if(t.localName===`bd-pricing-feature`&&t.parentElement===this)for(let e of this.children)e!==t&&e.localName===`bd-pricing-feature`&&e._close()},this.addEventListener(`bd-show`,this._onShow)}render(){let e=this._slots.has(`title`);return a`
|
|
1
|
+
import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import{SlotController as n}from"../shared/controller.slot.js";import"../h/h.js";import"./pricing-feature.js";import r from"./pricing-feature-group.css.js";import{LitElement as i,html as a,nothing as o}from"lit";var s=class extends i{static{this.styles=[r]}constructor(){super(),this._slots=new n(this,{slots:[`title`,`icon`,``]}),this._onShow=e=>{let t=e.target;if(t.localName===`bd-pricing-feature`&&t.parentElement===this)for(let e of this.children)e!==t&&e.localName===`bd-pricing-feature`&&e._close()},this.addEventListener(`bd-show`,this._onShow)}render(){let e=this._slots.has(`title`);return a`
|
|
2
2
|
<div class="group">
|
|
3
|
-
<div class="title"
|
|
3
|
+
<div class="title" ?hidden=${!e}>
|
|
4
|
+
<span class="icon" ?hidden=${!this._slots.has(`icon`)}><slot name="icon"></slot></span>
|
|
5
|
+
<div id="title"><slot name="title"></slot></div>
|
|
6
|
+
</div>
|
|
4
7
|
<div class="list" role="list" aria-labelledby=${e?`title`:o}><slot></slot></div>
|
|
5
8
|
</div>
|
|
6
9
|
`}};s=t([e(`bd-pricing-feature-group`)],s);export{s as BdPricingFeatureGroup};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pricing-feature-group.js","names":["featureGroupCSS","_decorate","__decorate","pricing_feature_group_css_default","BdPricingFeatureGroup","LitElement","SlotController","opened","event","feature","hasTitle","nothing","defineElement"],"sources":["../../../../src/components/pricing-card/pricing-feature-group.ts"],"sourcesContent":["import { LitElement, html, nothing } from \"lit\";\nimport { SlotController } from \"#shared/controller.slot.ts\";\nimport { defineElement } from \"#shared/define-element.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\nimport \"./pricing-feature.ts\";\nimport type { BdPricingFeature } from \"./pricing-feature.ts\";\n/* The atom the page writes into the title slot. */\nimport \"#components/h/h.ts\";\nimport featureGroupCSS from \"./pricing-feature-group.css.ts\";\n\ntype Part = \"\" | \"title\";\n\n/**\n * A titled list of a pricing card's features.\n *\n * <bd-pricing-feature-group>\n * <bd-h slot=\"title\" as=\"h5\">Privacy</bd-h>\n * <bd-pricing-feature>Password Manager <bd-badge slot=\"badge\" …>1x</bd-badge> …</bd-pricing-feature>\n * <bd-pricing-feature>…</bd-pricing-feature>\n * </bd-pricing-feature-group>\n *\n * It replaces 3.x's five feature lists -- pricing-card-features, -privacy,\n * -identity, -identity-extended and -parental-control -- which were one\n * list drawn five times, each with its English heading and its items built\n * in. The heading is the page's bd-h now, drawn at 3.x's h4 size (the\n * heading-h4 role) at whatever level the page picks, and the items are\n * bd-pricing-feature children. The 22 features and the five headings 3.x\n * shipped are in the stories.\n *\n * 3.x's Privacy list was the one that looked different: it gave its heading\n * no class, so the heading took the card's centred text and lost the 15px\n * under it the other four had. Measured, that was a slip rather than a look\n * -- one list of five, centred beside four start-aligned ones -- so every\n * group draws the same heading now, and there is no attribute for it.\n *\n * ONE DESCRIPTION OPEN AT A TIME. A feature that opens its description sends\n * bd-show; the group closes the others among its own features, as 3.x's\n * FeatureTips kept one open per list.\n *\n * The features are a list, named by the title while there is one: the box\n * around the slot is role=\"list\" and each bd-pricing-feature a list item\n * through ElementInternals, as 3.x's ul and li were.\n */\n@defineElement(\"bd-pricing-feature-group\")\nexport class BdPricingFeatureGroup extends LitElement {\n static styles = [featureGroupCSS];\n\n _slots = new SlotController<Part>(this, { slots: [\"title\", \"\"] });\n\n constructor() {\n super();\n this.addEventListener(\"bd-show\", this._onShow);\n }\n\n /* One of this group's features opened its description: the others close. */\n private readonly _onShow = (event: Event) => {\n const opened = event.target as Element;\n if (opened.localName !== \"bd-pricing-feature\" || opened.parentElement !== this) return;\n for (const feature of this.children) {\n if (feature !== opened && feature.localName === \"bd-pricing-feature\") (feature as BdPricingFeature)._close();\n }\n };\n\n render() {\n const hasTitle = this._slots.has(\"title\");\n return html`\n <div class=\"group\">\n <div class=\"title\"
|
|
1
|
+
{"version":3,"file":"pricing-feature-group.js","names":["featureGroupCSS","_decorate","__decorate","pricing_feature_group_css_default","BdPricingFeatureGroup","LitElement","SlotController","opened","event","feature","hasTitle","nothing","defineElement"],"sources":["../../../../src/components/pricing-card/pricing-feature-group.ts"],"sourcesContent":["import { LitElement, html, nothing } from \"lit\";\nimport { SlotController } from \"#shared/controller.slot.ts\";\nimport { defineElement } from \"#shared/define-element.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\nimport \"./pricing-feature.ts\";\nimport type { BdPricingFeature } from \"./pricing-feature.ts\";\n/* The atom the page writes into the title slot. */\nimport \"#components/h/h.ts\";\nimport featureGroupCSS from \"./pricing-feature-group.css.ts\";\n\ntype Part = \"\" | \"title\" | \"icon\";\n\n/**\n * A titled list of a pricing card's features.\n *\n * <bd-pricing-feature-group>\n * <bd-h slot=\"title\" as=\"h5\">Privacy</bd-h>\n * <bd-pricing-feature>Password Manager <bd-badge slot=\"badge\" …>1x</bd-badge> …</bd-pricing-feature>\n * <bd-pricing-feature>…</bd-pricing-feature>\n * </bd-pricing-feature-group>\n *\n * It replaces 3.x's five feature lists -- pricing-card-features, -privacy,\n * -identity, -identity-extended and -parental-control -- which were one\n * list drawn five times, each with its English heading and its items built\n * in. The heading is the page's bd-h now, drawn at 3.x's h4 size (the\n * heading-h4 role) at whatever level the page picks, and the items are\n * bd-pricing-feature children. The 22 features and the five headings 3.x\n * shipped are in the stories.\n *\n * 3.x's Privacy list was the one that looked different: it gave its heading\n * no class, so the heading took the card's centred text and lost the 15px\n * under it the other four had. Measured, that was a slip rather than a look\n * -- one list of five, centred beside four start-aligned ones -- so every\n * group draws the same heading now, and there is no attribute for it.\n *\n * An `icon` the page slots -- a bd-icon -- sits before the heading, in the\n * brand's text ink: the back arrow before \"Everything from Total Security\n * and:\" in bd-pricing-card, pointing at the plan the list builds on. It\n * is drawn only with a title, and it is the page's, so it is named or\n * hidden as the page wrote it; a bd-icon with no label is hidden.\n *\n * ONE DESCRIPTION OPEN AT A TIME. A feature that opens its description sends\n * bd-show; the group closes the others among its own features, as 3.x's\n * FeatureTips kept one open per list.\n *\n * The features are a list, named by the title while there is one: the box\n * around the slot is role=\"list\" and each bd-pricing-feature a list item\n * through ElementInternals, as 3.x's ul and li were.\n */\n@defineElement(\"bd-pricing-feature-group\")\nexport class BdPricingFeatureGroup extends LitElement {\n static styles = [featureGroupCSS];\n\n _slots = new SlotController<Part>(this, { slots: [\"title\", \"icon\", \"\"] });\n\n constructor() {\n super();\n this.addEventListener(\"bd-show\", this._onShow);\n }\n\n /* One of this group's features opened its description: the others close. */\n private readonly _onShow = (event: Event) => {\n const opened = event.target as Element;\n if (opened.localName !== \"bd-pricing-feature\" || opened.parentElement !== this) return;\n for (const feature of this.children) {\n if (feature !== opened && feature.localName === \"bd-pricing-feature\") (feature as BdPricingFeature)._close();\n }\n };\n\n render() {\n const hasTitle = this._slots.has(\"title\");\n return html`\n <div class=\"group\">\n <div class=\"title\" ?hidden=${!hasTitle}>\n <span class=\"icon\" ?hidden=${!this._slots.has(\"icon\")}><slot name=\"icon\"></slot></span>\n <div id=\"title\"><slot name=\"title\"></slot></div>\n </div>\n <div class=\"list\" role=\"list\" aria-labelledby=${hasTitle ? \"title\" : nothing}><slot></slot></div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-pricing-feature-group\": BdPricingFeatureGroup;\n }\n}\n"],"mappings":"A,wXAmDO,IAAMI,EAAN,cAAoCC,CAAW,C,OACpC,KAAA,OAAA,CAACL,CAAe,C,CAIhC,aAAc,CACZ,MAAM,EAHC,KAAA,OAAA,IAAIM,EAAqB,KAAM,CAAE,MAAO,CAAC,QAAS,OAAQ,EAAE,CAAE,CAAC,EAQ5C,KAAA,QAAA,GAAiB,CAC3C,IAAMC,EAASC,EAAM,OACrB,GAAID,EAAO,YAAc,sBAAwBA,EAAO,gBAAkB,KAC1E,IAAK,IAAME,KAAW,KAAK,SACrBA,IAAYF,GAAUE,EAAQ,YAAc,sBAAsBA,EAA8B,OAAO,CAE/G,EAVE,KAAK,iBAAiB,UAAW,KAAK,OAAO,CAC/C,CAWA,QAAS,CACP,IAAMC,EAAW,KAAK,OAAO,IAAI,OAAO,EACxC,MAAO,EAAI;;qCAEsB,CAACA,EAAS;uCACR,CAAC,KAAK,OAAO,IAAI,MAAM,EAAE;;;wDAGRA,EAAW,QAAUC,EAAQ;;KAGnF,CACF,EAhCC,EAAAV,EAAA,CAAAW,EAAc,0BAA0B,CAAA,EAAAR,CAAA,E"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{css as e}from"lit";var t=e`:host{font-family:var(--typography-fontFamily-sans);display:block}:host([hidden]),[hidden]{display:none}.row{align-items:flex-start;gap:var(--spacing-8);margin-bottom:var(--spacing-10);display:flex;position:relative}.check{color:var(--status-success-accent);flex-shrink:0;margin-block-start:var(--
|
|
1
|
+
import{css as e}from"lit";var t=e`:host{font-family:var(--typography-fontFamily-sans);display:block}:host([hidden]),[hidden]{display:none}.row{align-items:flex-start;gap:var(--spacing-8);margin-bottom:var(--bd-pricing-feature-row-gap,var(--spacing-10));display:flex;position:relative}.check{color:var(--status-success-accent);flex-shrink:0;margin-block-start:calc((var(--bd-pricing-feature-font-size,var(--typography-body-regular-fontSize)) * var(--bd-pricing-feature-line-height,var(--typography-body-regular-lineHeight)) - var(--icon-sm-size)) / 2);margin-inline-end:var(--spacing-8)}.name{min-width:0;margin-bottom:var(--bd-pricing-feature-name-gap,var(--spacing-16));font-size:var(--bd-pricing-feature-font-size,var(--typography-body-regular-fontSize));font-weight:var(--bd-pricing-feature-font-weight,var(--typography-body-regular-fontWeight));line-height:var(--bd-pricing-feature-line-height,var(--typography-body-regular-lineHeight));letter-spacing:var(--typography-body-regular-letterSpacing);font-family:var(--typography-body-regular-fontFamily);color:var(--color-text-primary)}.badge{flex-shrink:0}.toggle{font:inherit;letter-spacing:inherit;color:inherit;text-align:inherit;cursor:pointer;border-radius:var(--focus-outline-radius);outline:var(--border-width-2) solid transparent;background:0 0;border:0;margin:0;padding:0}.toggle:focus-visible{outline-offset:var(--focus-outline-offset);box-shadow:var(--focus-outline-primary)}.toggle:after{content:"";position:absolute;inset:0}.description{bottom:calc(100% + var(--spacing-8));box-sizing:border-box;max-width:274px;padding:var(--spacing-8) var(--spacing-12);background-color:var(--color-surface-container);border:var(--border-width-1) solid var(--color-border-subtle);border-radius:var(--shape-radius-sm);box-shadow:var(--shadow-md);font-size:var(--typography-body-small-fontSize);font-weight:var(--typography-body-small-fontWeight);line-height:var(--typography-body-small-lineHeight);letter-spacing:var(--typography-body-small-letterSpacing);font-family:var(--typography-body-small-fontFamily);color:var(--color-text-primary);z-index:var(--z-tooltip);display:none;position:absolute;inset-inline-start:0}.description:after{content:"";bottom:calc(-1 * var(--border-width-8));border-inline:var(--border-width-8) solid transparent;border-top:var(--border-width-8) solid var(--color-border-subtle);position:absolute;inset-inline-start:calc(20% - var(--border-width-8))}.description.open{display:block}@media (hover:hover){.row:hover .description:not([hidden]){display:block}}`;export{t as default};
|
|
2
2
|
//# sourceMappingURL=pricing-feature.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pricing-feature.css.js","names":["pricing_feature_css_default"],"sources":["../../../../src/components/pricing-card/pricing-feature.css.ts"],"sourcesContent":["import { css } from \"lit\";\n\n/* bd-pricing-feature: 3.x v1's feature row (pricing-card.css.ts's\n .feature-item and .tooltip), which the five feature lists drew in their\n shadow roots. v2's pricing-feature-item drew a 12px row of its own; the\n v1 row is the one that shipped. */\nexport default css`\n :host {\n display: block;\n font-family: var(--typography-fontFamily-sans);\n }\n\n :host([hidden]) {\n display: none;\n }\n\n [hidden] {\n display: none;\n }\n\n /* The row: the check, the name and the badge on one line, 10 apart from\n the next row. The 16 under the name is the bottom margin 3.x's name\n paragraph carried inside the row (a bd-p in a flex row keeps its\n margin), so rows stand 26 apart as they did. Position relative: the\n description is drawn over the row above it. */\n .row {\n position: relative;\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-8);\n margin-bottom: var(--spacing-10);\n }\n\n /* The check, centred on the name's first line: a 16 icon on a 24 line.\n 3.x centred its 16px PNG on the whole row, the name's 16 bottom margin\n included, which put it 8 below a one-line name's middle. The green is\n the success accent v2's check already took: a mark, green on white at\n 4.75:1. */\n .check {\n flex-shrink: 0;\n margin-block-start: var(--
|
|
1
|
+
{"version":3,"file":"pricing-feature.css.js","names":["pricing_feature_css_default"],"sources":["../../../../src/components/pricing-card/pricing-feature.css.ts"],"sourcesContent":["import { css } from \"lit\";\n\n/* bd-pricing-feature: 3.x v1's feature row (pricing-card.css.ts's\n .feature-item and .tooltip), which the five feature lists drew in their\n shadow roots. v2's pricing-feature-item drew a 12px row of its own; the\n v1 row is the one that shipped.\n\n THE HOOKS, as bd-pricing-feature-group has them: a card that sets its\n features in its own scale sets these around its default slot, and they\n inherit into this shadow root. Unset, each is 3.x v1's:\n\n --bd-pricing-feature-row-gap under each row (10)\n --bd-pricing-feature-name-gap under the name, inside the row (16)\n --bd-pricing-feature-font-size / -font-weight / -line-height\n the name's role (body-regular)\n\n The check is centred on the name's first line from the same hooks, so it\n follows whichever role the name is in. */\nexport default css`\n :host {\n display: block;\n font-family: var(--typography-fontFamily-sans);\n }\n\n :host([hidden]) {\n display: none;\n }\n\n [hidden] {\n display: none;\n }\n\n /* The row: the check, the name and the badge on one line, 10 apart from\n the next row. The 16 under the name is the bottom margin 3.x's name\n paragraph carried inside the row (a bd-p in a flex row keeps its\n margin), so rows stand 26 apart as they did. Position relative: the\n description is drawn over the row above it. */\n .row {\n position: relative;\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-8);\n margin-bottom: var(--bd-pricing-feature-row-gap, var(--spacing-10));\n }\n\n /* The check, centred on the name's first line: a 16 icon on a 24 line,\n half of the line less the icon above it, read from the name's role.\n 3.x centred its 16px PNG on the whole row, the name's 16 bottom margin\n included, which put it 8 below a one-line name's middle. The green is\n the success accent v2's check already took: a mark, green on white at\n 4.75:1. */\n .check {\n flex-shrink: 0;\n margin-block-start: calc((var(--bd-pricing-feature-font-size, var(--typography-body-regular-fontSize)) * var(--bd-pricing-feature-line-height, var(--typography-body-regular-lineHeight)) - var(--icon-sm-size)) / 2);\n margin-inline-end: var(--spacing-8);\n color: var(--status-success-accent);\n }\n\n /* The name, at body-regular in primary ink, as 3.x's bd-p regular drew it. */\n .name {\n min-width: 0;\n margin-bottom: var(--bd-pricing-feature-name-gap, var(--spacing-16));\n font-size: var(--bd-pricing-feature-font-size, var(--typography-body-regular-fontSize));\n font-weight: var(--bd-pricing-feature-font-weight, var(--typography-body-regular-fontWeight));\n line-height: var(--bd-pricing-feature-line-height, var(--typography-body-regular-lineHeight));\n letter-spacing: var(--typography-body-regular-letterSpacing);\n font-family: var(--typography-body-regular-fontFamily);\n color: var(--color-text-primary);\n }\n\n .badge {\n flex-shrink: 0;\n }\n\n /* The name as the button that opens its description: it reads as the text\n it is, and draws the one focus ring. */\n .toggle {\n margin: 0;\n padding: 0;\n border: 0;\n background: none;\n font: inherit;\n letter-spacing: inherit;\n color: inherit;\n text-align: inherit;\n cursor: pointer;\n border-radius: var(--focus-outline-radius);\n outline: var(--border-width-2) solid transparent;\n }\n\n .toggle:focus-visible {\n /* the one focus ring -- see Design Tokens/Focus. Forced-colors mode does\n not paint box-shadow; it paints the transparent outline above, in a\n system colour, on the ring's outer band. */\n outline-offset: var(--focus-outline-offset);\n box-shadow: var(--focus-outline-primary);\n }\n\n /* The whole row is the button's target, as the whole row was the hover's. */\n .toggle::after {\n content: \"\";\n position: absolute;\n inset: 0;\n }\n\n /* The description, over the row above it, its arrow ending on the row's\n top edge. 3.x's tooltip: the container ground, a subtle hairline, the\n small radius, and the body-small role its bd-p drew in primary ink. */\n .description {\n display: none;\n position: absolute;\n bottom: calc(100% + var(--spacing-8));\n inset-inline-start: 0;\n box-sizing: border-box;\n /* no token: 3.x's tooltip measure (250 plus its inset), narrower than any\n width on the scale; the row caps it below that */\n max-width: 274px;\n padding: var(--spacing-8) var(--spacing-12);\n background-color: var(--color-surface-container);\n border: var(--border-width-1) solid var(--color-border-subtle);\n border-radius: var(--shape-radius-sm);\n box-shadow: var(--shadow-md);\n font-size: var(--typography-body-small-fontSize);\n font-weight: var(--typography-body-small-fontWeight);\n line-height: var(--typography-body-small-lineHeight);\n letter-spacing: var(--typography-body-small-letterSpacing);\n font-family: var(--typography-body-small-fontFamily);\n color: var(--color-text-primary);\n /* A tooltip is the role, not a number: it clears the cards it overhangs,\n the highlight banner included. */\n z-index: var(--z-tooltip);\n }\n\n .description::after {\n content: \"\";\n position: absolute;\n bottom: calc(-1 * var(--border-width-8));\n /* centred on 20% from the start: half the arrow's width is one of the\n two borders that draw it, which a translate could not flip */\n inset-inline-start: calc(20% - var(--border-width-8));\n /* an 8px triangle drawn by three borders, 3.x's --spacing-8 spelled as\n the border widths they are */\n border-inline: var(--border-width-8) solid transparent;\n /* the arrow, the same role as the box: they are one shape */\n border-top: var(--border-width-8) solid var(--color-border-subtle);\n }\n\n /* Open from the button, and previewed on hover where there is a hover. A\n touch screen's emulated hover sticks after a tap, so without the query\n the tap that closes the description would leave it showing. */\n .description.open {\n display: block;\n }\n\n @media (hover: hover) {\n .row:hover .description:not([hidden]) {\n display: block;\n }\n }\n`;\n"],"mappings":"A,0BAkBA,IAAAA,EAAe,CAAG,s8E"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{font-family:var(--typography-fontFamily-sans);text-align:start;display:block}:host([hidden]){display:none}.zone{flex-direction:column;align-items:flex-start;display:flex}.reference{align-items:center;gap:var(--spacing-8);display:inline-flex}.full,.discount{display:contents}::slotted([slot=full]),::slotted([slot=discount]){margin-bottom:var(--spacing-16)}.full{font-size:var(--typography-body-small-fontSize);font-weight:var(--typography-body-small-fontWeight);line-height:var(--typography-body-small-lineHeight);letter-spacing:var(--typography-body-small-letterSpacing);font-family:var(--typography-body-small-fontFamily);color:var(--color-text-primary)}.amount{font-size:var(--typography-heading-h3-fontSize);font-weight:var(--typography-heading-h3-fontWeight);line-height:var(--typography-heading-h3-lineHeight);letter-spacing:var(--typography-heading-h3-letterSpacing);font-family:var(--typography-heading-h3-fontFamily);color:var(--color-text-primary);margin:0}.caption{margin-top:var(--spacing-16);max-width:80
|
|
1
|
+
import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{font-family:var(--typography-fontFamily-sans);text-align:start;display:block}:host([hidden]){display:none}.zone{flex-direction:column;align-items:flex-start;display:flex}.reference{align-items:center;gap:var(--spacing-8);display:inline-flex}.full,.discount{display:contents}::slotted([slot=full]),::slotted([slot=discount]){margin-bottom:var(--bd-pricing-price-reference-gap,var(--spacing-16))}.full{font-size:var(--bd-pricing-price-full-font-size,var(--typography-body-small-fontSize));font-weight:var(--bd-pricing-price-full-font-weight,var(--typography-body-small-fontWeight));line-height:var(--bd-pricing-price-full-line-height,var(--typography-body-small-lineHeight));letter-spacing:var(--bd-pricing-price-full-letter-spacing,var(--typography-body-small-letterSpacing));font-family:var(--typography-body-small-fontFamily);color:var(--color-text-primary)}.amount{font-size:var(--typography-heading-h3-fontSize);font-weight:var(--bd-pricing-price-amount-font-weight,var(--typography-heading-h3-fontWeight));line-height:var(--typography-heading-h3-lineHeight);letter-spacing:var(--typography-heading-h3-letterSpacing);font-family:var(--typography-heading-h3-fontFamily);color:var(--color-text-primary);margin:0}.caption{margin-top:var(--bd-pricing-price-caption-gap,var(--spacing-16));max-width:var(--bd-pricing-price-caption-max-width,80%);font-size:var(--typography-body-small-fontSize);font-weight:var(--typography-body-small-fontWeight);line-height:var(--typography-body-small-lineHeight);letter-spacing:var(--typography-body-small-letterSpacing);font-family:var(--typography-body-small-fontFamily);color:var(--color-text-primary)}.zone [hidden]{display:none}@media (width<768px){.reference{flex-direction:var(--bd-pricing-price-reference-direction-narrow,column);gap:var(--bd-pricing-price-reference-spacing-narrow,var(--spacing-4))}}`;export{t as default};
|
|
2
2
|
//# sourceMappingURL=pricing-price.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pricing-price.css.js","names":["pricing_price_css_default"],"sources":["../../../../src/components/pricing-card/pricing-price.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { below } from \"#shared/token-scales.ts\";\n\n/* bd-pricing-price: 3.x v1's price zone (pricing-card.css.ts's .pricing,\n .pricing-info, .original-price, .price and .terms), at its type roles. */\nexport default css`\n :host {\n display: block;\n font-family: var(--typography-fontFamily-sans);\n text-align: start;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .zone {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n\n /* The full price and the discount, side by side and centred on each other\n as 3.x's .pricing-info row was; stacked below md, 4 apart. The wrappers\n draw no box, so the page's nodes are the row's items: the store hides a\n node with display: none, and a row whose nodes are both hidden takes no\n room. */\n .reference {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-8);\n }\n\n .full,\n .discount {\n display: contents;\n }\n\n /* The 16 under the row was the bottom margin of the bd-p 3.x wrapped each\n node in; it is the nodes' own here, so it goes with them when the store\n hides them. */\n ::slotted([slot=\"full\"]),\n ::slotted([slot=\"discount\"]) {\n margin-bottom: var(--spacing-16);\n }\n\n /* The struck full price: 3.x's bd-p small, body-small in primary ink. The\n page's <s> draws the strike. */\n .full {\n font-size: var(--typography-body-small-fontSize);\n font-weight: var(--typography-body-small-fontWeight);\n line-height: var(--typography-body-small-lineHeight);\n letter-spacing: var(--typography-body-small-letterSpacing);\n font-family: var(--typography-body-small-fontFamily);\n color: var(--color-text-primary);\n }\n\n /* The price and its unit, one line in the heading-h3 role, as 3.x's\n .price paragraph read it. */\n .amount {\n margin: 0;\n font-size: var(--typography-heading-h3-fontSize);\n font-weight: var(--typography-heading-h3-fontWeight);\n line-height: var(--typography-heading-h3-lineHeight);\n letter-spacing: var(--typography-heading-h3-letterSpacing);\n font-family: var(--typography-heading-h3-fontFamily);\n color: var(--color-text-primary);\n }\n\n /* The small print: 3.x's bd-p small, 15 under the price (16, the step on\n the scale) and four-fifths of the card wide. */\n .caption {\n margin-top: var(--spacing-16);\n max-width: 80
|
|
1
|
+
{"version":3,"file":"pricing-price.css.js","names":["pricing_price_css_default"],"sources":["../../../../src/components/pricing-card/pricing-price.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { below } from \"#shared/token-scales.ts\";\n\n/* bd-pricing-price: 3.x v1's price zone (pricing-card.css.ts's .pricing,\n .pricing-info, .original-price, .price and .terms), at its type roles.\n\n THE HOOKS, as bd-pricing-feature-group has them: a card that sets its\n price in its own type -- bd-pricing-card, whose struck price is Figma's\n price/was and whose price is bold -- sets these around its price slot,\n and they inherit into this shadow root. Unset, each is 3.x v1's:\n\n --bd-pricing-price-full-font-size / -font-weight / -line-height /\n -letter-spacing the struck full price's role (body-small)\n --bd-pricing-price-amount-font-weight\n the price's weight (heading-h3's, 600)\n --bd-pricing-price-reference-gap\n under the full price and the discount (16)\n --bd-pricing-price-reference-direction-narrow\n the row below md: column, stacked as 3.x's,\n or row, side by side as at every width\n --bd-pricing-price-reference-spacing-narrow\n between them below md (4)\n --bd-pricing-price-caption-gap above the small print (16)\n --bd-pricing-price-caption-max-width\n the small print's measure (80%) */\nexport default css`\n :host {\n display: block;\n font-family: var(--typography-fontFamily-sans);\n text-align: start;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .zone {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n\n /* The full price and the discount, side by side and centred on each other\n as 3.x's .pricing-info row was; stacked below md, 4 apart. The wrappers\n draw no box, so the page's nodes are the row's items: the store hides a\n node with display: none, and a row whose nodes are both hidden takes no\n room. */\n .reference {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-8);\n }\n\n .full,\n .discount {\n display: contents;\n }\n\n /* The 16 under the row was the bottom margin of the bd-p 3.x wrapped each\n node in; it is the nodes' own here, so it goes with them when the store\n hides them. */\n ::slotted([slot=\"full\"]),\n ::slotted([slot=\"discount\"]) {\n margin-bottom: var(--bd-pricing-price-reference-gap, var(--spacing-16));\n }\n\n /* The struck full price: 3.x's bd-p small, body-small in primary ink. The\n page's <s> draws the strike. */\n .full {\n font-size: var(--bd-pricing-price-full-font-size, var(--typography-body-small-fontSize));\n font-weight: var(--bd-pricing-price-full-font-weight, var(--typography-body-small-fontWeight));\n line-height: var(--bd-pricing-price-full-line-height, var(--typography-body-small-lineHeight));\n letter-spacing: var(--bd-pricing-price-full-letter-spacing, var(--typography-body-small-letterSpacing));\n font-family: var(--typography-body-small-fontFamily);\n color: var(--color-text-primary);\n }\n\n /* The price and its unit, one line in the heading-h3 role, as 3.x's\n .price paragraph read it. */\n .amount {\n margin: 0;\n font-size: var(--typography-heading-h3-fontSize);\n font-weight: var(--bd-pricing-price-amount-font-weight, var(--typography-heading-h3-fontWeight));\n line-height: var(--typography-heading-h3-lineHeight);\n letter-spacing: var(--typography-heading-h3-letterSpacing);\n font-family: var(--typography-heading-h3-fontFamily);\n color: var(--color-text-primary);\n }\n\n /* The small print: 3.x's bd-p small, 15 under the price (16, the step on\n the scale) and four-fifths of the card wide. */\n .caption {\n margin-top: var(--bd-pricing-price-caption-gap, var(--spacing-16));\n max-width: var(--bd-pricing-price-caption-max-width, 80%);\n font-size: var(--typography-body-small-fontSize);\n font-weight: var(--typography-body-small-fontWeight);\n line-height: var(--typography-body-small-lineHeight);\n letter-spacing: var(--typography-body-small-letterSpacing);\n font-family: var(--typography-body-small-fontFamily);\n color: var(--color-text-primary);\n }\n\n /* A part's box is hidden while its slot is empty; this outweighs the\n display each box sets above. */\n .zone [hidden] {\n display: none;\n }\n\n @media ${unsafeCSS(below(\"md\"))} {\n .reference {\n flex-direction: var(--bd-pricing-price-reference-direction-narrow, column);\n gap: var(--bd-pricing-price-reference-spacing-narrow, var(--spacing-4));\n }\n }\n`;\n"],"mappings":"A,4DAyBA,IAAAA,EAAe,CAAG,0zD"}
|