@repobit/dex-system-design 5.0.2 → 5.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
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.3](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@5.0.2...@repobit/dex-system-design@5.0.3) (2026-11-26)
7
+
8
+ ### Bug Fixes
9
+
10
+ * **DEX-1000:** cap pricing cards at 410px, add max-col-width to bd-grid
11
+ * **DEX-1000:** set the pricing card's price in heading/h2, add feature tooltips to the stories
12
+
13
+
6
14
  ## [5.0.2](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@5.0.1...@repobit/dex-system-design@5.0.2) (2026-11-26)
7
15
 
8
16
  **Note:** Version bump only for package @repobit/dex-system-design
@@ -1,2 +1,2 @@
1
- import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{display:block}.grid{--grid-cols-active:var(--grid-cols);--grid-gap-active:var(--grid-gap,var(--spacing-24));grid-template-columns:repeat(var(--grid-cols-active), 1fr);place-items:stretch start;gap:var(--grid-gap-active);display:grid}@media (width>=576px){.grid{--grid-cols-active:var(--grid-cols-sm);--grid-gap-active:var(--grid-gap-sm,var(--spacing-24))}}@media (width>=768px){.grid{--grid-cols-active:var(--grid-cols-md);--grid-gap-active:var(--grid-gap-md,var(--spacing-24))}}@media (width>=992px){.grid{--grid-cols-active:var(--grid-cols-lg);--grid-gap-active:var(--grid-gap-lg,var(--spacing-24))}}.grid.grid--fit{grid-template-columns:repeat(auto-fill, minmax(min(100%, max(var(--grid-min-col-width), (100% - var(--grid-cols-active) * var(--grid-gap-active)) / var(--grid-cols-active))), 1fr))}.grid--rows{row-gap:0;margin-block-end:calc(-1 * var(--grid-gap-active))}.grid--rows ::slotted(*){grid-template-rows:subgrid;grid-row:span var(--grid-item-rows);justify-self:stretch;margin-block-end:var(--grid-gap-active);display:grid}`;export{t as default};
1
+ import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{display:block}.grid{--grid-cols-active:var(--grid-cols);--grid-gap-active:var(--grid-gap,var(--spacing-24));grid-template-columns:repeat(var(--grid-cols-active), 1fr);place-items:stretch start;gap:var(--grid-gap-active);display:grid}@media (width>=576px){.grid{--grid-cols-active:var(--grid-cols-sm);--grid-gap-active:var(--grid-gap-sm,var(--spacing-24))}}@media (width>=768px){.grid{--grid-cols-active:var(--grid-cols-md);--grid-gap-active:var(--grid-gap-md,var(--spacing-24))}}@media (width>=992px){.grid{--grid-cols-active:var(--grid-cols-lg);--grid-gap-active:var(--grid-gap-lg,var(--spacing-24))}}.grid.grid--fit{grid-template-columns:repeat(auto-fill, minmax(min(100%, max(var(--grid-min-col-width), (100% - var(--grid-cols-active) * var(--grid-gap-active)) / var(--grid-cols-active))), 1fr))}.grid.grid--cap{grid-template-columns:repeat(var(--grid-cols-active), minmax(0, var(--grid-max-col-width)));justify-content:center}.grid--rows{row-gap:0;margin-block-end:calc(-1 * var(--grid-gap-active))}.grid--rows ::slotted(*){grid-template-rows:subgrid;grid-row:span var(--grid-item-rows);justify-self:stretch;margin-block-end:var(--grid-gap-active);display:grid}`;export{t as default};
2
2
  //# sourceMappingURL=grid.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"grid.css.js","names":["grid_css_default"],"sources":["../../../../src/components/grid/grid.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { above } from \"#shared/token-scales.ts\";\n\n/* The column steps follow the screen: cols, then cols-sm, cols-md and\n cols-lg from 576, 768 and 992 -- the sm, md and lg every other breakpoint\n in this package means. A grid's steps are a page's structure, and that is\n a question about the screen; it can answer differently at the same width\n in two places -- a 492 grid across a 600 screen and a 518 one beside the\n stat highlight at 1280 hold different layouts on the homepage.\n\n 2.6.0 stepped by the grid's own width instead, at the page column's widths\n (492, 656, 880). A grid as wide as the page stepped where it always had; a\n narrower one never reached its upper steps, so the homepage's stat tiles,\n two across beside the highlight since they were drawn, stacked one a row\n on every desktop, and bd-footer opted its grid out to keep its layout.\n Nothing that was measured gained from it, so the steps read the screen\n again.\n\n What reading its own width was for -- a 3-column step taken at a 992\n screen gave a 360 column 104px cells -- is min-col-width's: each step's\n count becomes the most columns there will be, and a column is never\n narrower than min-col-width, so a grid in a narrow column takes fewer,\n wider ones, wherever it is laid out. It asks the cells, which is the\n question a collection has, where the page's widths could only be answered\n by a grid as wide as the page. */\nexport default css`\n :host {\n display: block;\n }\n\n /* Each step below says only which columns and which gap apply; they are\n laid out here, once, so that min-col-width reads the same two. */\n .grid {\n display: grid;\n align-items: stretch;\n justify-items: start;\n --grid-cols-active: var(--grid-cols);\n --grid-gap-active: var(--grid-gap, var(--spacing-24));\n grid-template-columns: repeat(var(--grid-cols-active), 1fr);\n gap: var(--grid-gap-active);\n }\n\n /* The columns and the gap step together; a gap left unset carries the\n one below it up. */\n @media ${unsafeCSS(above('sm'))} {\n .grid {\n --grid-cols-active: var(--grid-cols-sm);\n --grid-gap-active: var(--grid-gap-sm, var(--spacing-24));\n }\n }\n\n @media ${unsafeCSS(above('md'))} {\n .grid {\n --grid-cols-active: var(--grid-cols-md);\n --grid-gap-active: var(--grid-gap-md, var(--spacing-24));\n }\n }\n\n @media ${unsafeCSS(above('lg'))} {\n .grid {\n --grid-cols-active: var(--grid-cols-lg);\n --grid-gap-active: var(--grid-gap-lg, var(--spacing-24));\n }\n }\n\n /* min-col-width: as many columns as fit at min-col-width, up to the\n step's count. auto-fill takes as many as fit; the second term of max()\n is what holds it to the count -- a column at least the grid less the\n count's gaps, over the count, leaves no room for one more, with a gap\n to spare so rounding cannot drop one either; and min(100%, ...) keeps\n one column inside a grid narrower than the floor. The columns then\n share what is left, as 1fr always has. */\n .grid.grid--fit {\n grid-template-columns: repeat(auto-fill, minmax(min(100%, max(\n var(--grid-min-col-width),\n (100% - var(--grid-cols-active) * var(--grid-gap-active)) / var(--grid-cols-active)\n )), 1fr));\n }\n\n /* item-rows: every item spans that many of the grid's rows as a subgrid,\n so its parts sit in rows it shares with the items beside it and line\n up across them, however each one's text wraps. The gap inside an item\n is the item's own row-gap.\n\n The track's row gap is 0 and the items are spaced by a margin under\n each one instead, the grid's gap, which the grid hands back under its\n last row: a subgrid's row-gap differing from its grid's is laid out by\n spreading the difference over the item's edges, so the gap between two\n items and the one inside each came out at neither value (40 and 8\n measured 46 and 14 in Chromium). bd-card's track does the same.\n\n A subgrid cannot be a size container -- containment makes it a grid of\n its own -- so an item laid out by its own width (container-type) does\n not line up here. A light-DOM item's own display or margin rule beats\n these, since the page's styles win over a shadow root's ::slotted(). */\n .grid--rows {\n row-gap: 0;\n margin-block-end: calc(-1 * var(--grid-gap-active));\n }\n\n /* The items fill their columns too: an item whose parts line up with\n its neighbours' is as wide as they are, where the grid's start would\n leave a card with short words narrower than its column. */\n .grid--rows ::slotted(*) {\n display: grid;\n grid-template-rows: subgrid;\n grid-row: span var(--grid-item-rows);\n justify-self: stretch;\n margin-block-end: var(--grid-gap-active);\n }\n`;\n"],"mappings":"A,4DAyBA,IAAAA,EAAe,CAAG,mhC"}
1
+ {"version":3,"file":"grid.css.js","names":["grid_css_default"],"sources":["../../../../src/components/grid/grid.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { above } from \"#shared/token-scales.ts\";\n\n/* The column steps follow the screen: cols, then cols-sm, cols-md and\n cols-lg from 576, 768 and 992 -- the sm, md and lg every other breakpoint\n in this package means. A grid's steps are a page's structure, and that is\n a question about the screen; it can answer differently at the same width\n in two places -- a 492 grid across a 600 screen and a 518 one beside the\n stat highlight at 1280 hold different layouts on the homepage.\n\n 2.6.0 stepped by the grid's own width instead, at the page column's widths\n (492, 656, 880). A grid as wide as the page stepped where it always had; a\n narrower one never reached its upper steps, so the homepage's stat tiles,\n two across beside the highlight since they were drawn, stacked one a row\n on every desktop, and bd-footer opted its grid out to keep its layout.\n Nothing that was measured gained from it, so the steps read the screen\n again.\n\n What reading its own width was for -- a 3-column step taken at a 992\n screen gave a 360 column 104px cells -- is min-col-width's: each step's\n count becomes the most columns there will be, and a column is never\n narrower than min-col-width, so a grid in a narrow column takes fewer,\n wider ones, wherever it is laid out. It asks the cells, which is the\n question a collection has, where the page's widths could only be answered\n by a grid as wide as the page. */\nexport default css`\n :host {\n display: block;\n }\n\n /* Each step below says only which columns and which gap apply; they are\n laid out here, once, so that min-col-width reads the same two. */\n .grid {\n display: grid;\n align-items: stretch;\n justify-items: start;\n --grid-cols-active: var(--grid-cols);\n --grid-gap-active: var(--grid-gap, var(--spacing-24));\n grid-template-columns: repeat(var(--grid-cols-active), 1fr);\n gap: var(--grid-gap-active);\n }\n\n /* The columns and the gap step together; a gap left unset carries the\n one below it up. */\n @media ${unsafeCSS(above('sm'))} {\n .grid {\n --grid-cols-active: var(--grid-cols-sm);\n --grid-gap-active: var(--grid-gap-sm, var(--spacing-24));\n }\n }\n\n @media ${unsafeCSS(above('md'))} {\n .grid {\n --grid-cols-active: var(--grid-cols-md);\n --grid-gap-active: var(--grid-gap-md, var(--spacing-24));\n }\n }\n\n @media ${unsafeCSS(above('lg'))} {\n .grid {\n --grid-cols-active: var(--grid-cols-lg);\n --grid-gap-active: var(--grid-gap-lg, var(--spacing-24));\n }\n }\n\n /* min-col-width: as many columns as fit at min-col-width, up to the\n step's count. auto-fill takes as many as fit; the second term of max()\n is what holds it to the count -- a column at least the grid less the\n count's gaps, over the count, leaves no room for one more, with a gap\n to spare so rounding cannot drop one either; and min(100%, ...) keeps\n one column inside a grid narrower than the floor. The columns then\n share what is left, as 1fr always has. */\n .grid.grid--fit {\n grid-template-columns: repeat(auto-fill, minmax(min(100%, max(\n var(--grid-min-col-width),\n (100% - var(--grid-cols-active) * var(--grid-gap-active)) / var(--grid-cols-active)\n )), 1fr));\n }\n\n /* max-col-width: the step's columns, none wider than max-col-width, and\n the row of them in the middle of the grid. Each column shares the\n grid's width as 1fr would until it reaches the cap, which is the\n minmax() whose floor is 0; where the columns are capped the space left\n goes either side of the row, not between its columns, so the gap stays\n the grid's gap. */\n .grid.grid--cap {\n grid-template-columns: repeat(var(--grid-cols-active), minmax(0, var(--grid-max-col-width)));\n justify-content: center;\n }\n\n /* item-rows: every item spans that many of the grid's rows as a subgrid,\n so its parts sit in rows it shares with the items beside it and line\n up across them, however each one's text wraps. The gap inside an item\n is the item's own row-gap.\n\n The track's row gap is 0 and the items are spaced by a margin under\n each one instead, the grid's gap, which the grid hands back under its\n last row: a subgrid's row-gap differing from its grid's is laid out by\n spreading the difference over the item's edges, so the gap between two\n items and the one inside each came out at neither value (40 and 8\n measured 46 and 14 in Chromium). bd-card's track does the same.\n\n A subgrid cannot be a size container -- containment makes it a grid of\n its own -- so an item laid out by its own width (container-type) does\n not line up here. A light-DOM item's own display or margin rule beats\n these, since the page's styles win over a shadow root's ::slotted(). */\n .grid--rows {\n row-gap: 0;\n margin-block-end: calc(-1 * var(--grid-gap-active));\n }\n\n /* The items fill their columns too: an item whose parts line up with\n its neighbours' is as wide as they are, where the grid's start would\n leave a card with short words narrower than its column. */\n .grid--rows ::slotted(*) {\n display: grid;\n grid-template-rows: subgrid;\n grid-row: span var(--grid-item-rows);\n justify-self: stretch;\n margin-block-end: var(--grid-gap-active);\n }\n`;\n"],"mappings":"A,4DAyBA,IAAAA,EAAe,CAAG,spC"}
@@ -17,6 +17,7 @@ declare class BdGrid extends LitElement {
17
17
  justify: Justify;
18
18
  padding: SpaceName;
19
19
  minColWidth: number;
20
+ maxColWidth: number;
20
21
  itemRows: number;
21
22
  render(): import("lit-html").TemplateResult<1>;
22
23
  }
@@ -1,6 +1,6 @@
1
- import{space as e}from"../shared/token-scales.js";import{defineElement as t}from"../shared/define-element.js";import"../../tokens/tokens.js";import n from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import r from"./grid.css.js";import{LitElement as i,html as a}from"lit";import{property as o}from"lit/decorators.js";var s=class extends i{constructor(...e){super(...e),this.cols=1,this.colsSm=1,this.colsMd=2,this.colsLg=3,this.gap=`md`,this.gapSm=``,this.gapMd=``,this.gapLg=``,this.align=`stretch`,this.justify=`start`,this.padding=`none`,this.minColWidth=0,this.itemRows=0}static{this.styles=[r]}render(){return a`
1
+ import{space as e}from"../shared/token-scales.js";import{defineElement as t}from"../shared/define-element.js";import"../../tokens/tokens.js";import n from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import r from"./grid.css.js";import{LitElement as i,html as a}from"lit";import{property as o}from"lit/decorators.js";var s=class extends i{constructor(...e){super(...e),this.cols=1,this.colsSm=1,this.colsMd=2,this.colsLg=3,this.gap=`md`,this.gapSm=``,this.gapMd=``,this.gapLg=``,this.align=`stretch`,this.justify=`start`,this.padding=`none`,this.minColWidth=0,this.maxColWidth=0,this.itemRows=0}static{this.styles=[r]}render(){return a`
2
2
  <div
3
- class="grid ${this.minColWidth>0?`grid--fit`:``} ${this.itemRows>0?`grid--rows`:``}"
3
+ class="grid ${this.minColWidth>0?`grid--fit`:``} ${this.maxColWidth>0?`grid--cap`:``} ${this.itemRows>0?`grid--rows`:``}"
4
4
  style="
5
5
  --grid-cols: ${this.cols};
6
6
  --grid-cols-sm: ${this.colsSm};
@@ -14,10 +14,11 @@ import{space as e}from"../shared/token-scales.js";import{defineElement as t}from
14
14
  justify-items: ${this.justify};
15
15
  padding: ${e(this.padding)};
16
16
  ${this.minColWidth>0?`--grid-min-col-width: ${this.minColWidth/16}rem;`:``}
17
+ ${this.maxColWidth>0?`--grid-max-col-width: ${this.maxColWidth/16}rem;`:``}
17
18
  ${this.itemRows>0?`--grid-item-rows: ${Math.round(this.itemRows)};`:``}
18
19
  "
19
20
  >
20
21
  <slot></slot>
21
22
  </div>
22
- `}};n([o({type:Number})],s.prototype,`cols`,void 0),n([o({type:Number,attribute:`cols-sm`})],s.prototype,`colsSm`,void 0),n([o({type:Number,attribute:`cols-md`})],s.prototype,`colsMd`,void 0),n([o({type:Number,attribute:`cols-lg`})],s.prototype,`colsLg`,void 0),n([o({type:String})],s.prototype,`gap`,void 0),n([o({type:String,attribute:`gap-sm`})],s.prototype,`gapSm`,void 0),n([o({type:String,attribute:`gap-md`})],s.prototype,`gapMd`,void 0),n([o({type:String,attribute:`gap-lg`})],s.prototype,`gapLg`,void 0),n([o({type:String})],s.prototype,`align`,void 0),n([o({type:String})],s.prototype,`justify`,void 0),n([o({type:String})],s.prototype,`padding`,void 0),n([o({type:Number,attribute:`min-col-width`})],s.prototype,`minColWidth`,void 0),n([o({type:Number,attribute:`item-rows`})],s.prototype,`itemRows`,void 0),s=n([t(`bd-grid`)],s);
23
+ `}};n([o({type:Number})],s.prototype,`cols`,void 0),n([o({type:Number,attribute:`cols-sm`})],s.prototype,`colsSm`,void 0),n([o({type:Number,attribute:`cols-md`})],s.prototype,`colsMd`,void 0),n([o({type:Number,attribute:`cols-lg`})],s.prototype,`colsLg`,void 0),n([o({type:String})],s.prototype,`gap`,void 0),n([o({type:String,attribute:`gap-sm`})],s.prototype,`gapSm`,void 0),n([o({type:String,attribute:`gap-md`})],s.prototype,`gapMd`,void 0),n([o({type:String,attribute:`gap-lg`})],s.prototype,`gapLg`,void 0),n([o({type:String})],s.prototype,`align`,void 0),n([o({type:String})],s.prototype,`justify`,void 0),n([o({type:String})],s.prototype,`padding`,void 0),n([o({type:Number,attribute:`min-col-width`})],s.prototype,`minColWidth`,void 0),n([o({type:Number,attribute:`max-col-width`})],s.prototype,`maxColWidth`,void 0),n([o({type:Number,attribute:`item-rows`})],s.prototype,`itemRows`,void 0),s=n([t(`bd-grid`)],s);
23
24
  //# sourceMappingURL=grid.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"grid.js","names":["gridCSS","_decorate","__decorate","grid_css_default","BdGrid","LitElement","_args","space","property","defineElement"],"sources":["../../../../src/components/grid/grid.ts"],"sourcesContent":["import { LitElement, html } from \"lit\";\nimport { property } from \"lit/decorators.js\";\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 gridCSS from \"#components/grid/grid.css.ts\";\nimport { space, type SpaceName } from \"#shared/token-scales.ts\";\n\ntype Align = \"start\" | \"center\" | \"end\" | \"stretch\";\ntype Justify = \"start\" | \"center\" | \"end\" | \"stretch\";\n\n@defineElement(\"bd-grid\")\nclass BdGrid extends LitElement {\n static styles = [gridCSS];\n\n /* The three responsive properties name their attribute, and that is the\n whole fix. Lit derives an observed attribute by LOWERCASING the property\n name -- not by dash-casing it -- so `colsSm` observed `colssm` and the\n `cols-sm` this component documents was not an attribute it had ever been\n listening for. observedAttributes read\n [\"cols\",\"colssm\",\"colsmd\",\"colslg\",\"gap\",\"align\",\"justify\",\"padding\"];\n `cols` worked because it is one word, which is why the failure looked like\n a responsive bug rather than a naming one.\n\n So every dash-cased column attribute in the package was inert and the\n properties kept their constructor defaults 1/1/2/3. Those defaults sit one\n step under the 2/3/4 the Responsive columns story asks for, which is why\n the rendered grid looked merely one breakpoint late instead of ignoring\n the markup entirely. Measured across five stories x six viewports, 25 of\n 66 readings rendered a column count nobody had asked for:\n\n Layout/Grid \"Single column\" cols-lg=\"1\" -> 3 columns at 992 and 1440\n Layout/Grid \"Gap scale\" cols-sm=\"3\" -> 1 column at 576-767\n Layout/Grid \"Alignment\" cols-sm=\"3\" -> 1 column at 576-767\n bd-footer quick links cols-lg=\"2\" -> 3 columns at 992 and 1440\n\n The last one is not a story: footer.ts writes cols-md/cols-lg in its own\n shadow root, so a shipped component's layout was running on the defaults\n too.\n\n Naming the attribute is what this package already does everywhere else --\n 94 explicit dash-cased mappings across 40 files, `heading-level`,\n `visual-level`, `max-columns`, `min-card-width` -- and it is what the\n component's own documentation promises: grid.stories.ts reads \"`cols`\n below 576, then `cols-sm`, `cols-md` at 768 and `cols-lg` at 992\", and its\n argTypes map colsSm to the control name \"cols-sm\". The code was the only\n part that disagreed.\n\n An explicit name replaces the lowercase one rather than adding to it, so\n `colssm` stops being observed. Nothing reads it: grepped for colssm,\n colsmd, colslg and fallbacksrc across src, schemas and docs -- zero\n occurrences outside these declarations. The responsive behaviour itself is\n untouched; the media queries in grid.css.ts and the 576/768/992 steps are\n the ones that were already there, and this adds no smartness to a layout\n primitive -- it only lets the primitive hear what it is told. */\n @property({ type: Number })\n cols = 1; // default cols\n @property({ type: Number, attribute: \"cols-sm\" })\n colsSm = 1; // optional cols on small screens\n @property({ type: Number, attribute: \"cols-md\" })\n colsMd = 2; // optional cols on medium\n @property({ type: Number, attribute: \"cols-lg\" })\n colsLg = 3; // optional cols on large\n @property({ type: String })\n gap: SpaceName = \"md\"; // e.g., 'sm', 'md'\n @property({ type: String, attribute: \"gap-sm\" })\n gapSm: SpaceName | \"\" = \"\"; // optional gap from sm; unset keeps the step below\n @property({ type: String, attribute: \"gap-md\" })\n gapMd: SpaceName | \"\" = \"\"; // optional gap from md\n @property({ type: String, attribute: \"gap-lg\" })\n gapLg: SpaceName | \"\" = \"\"; // optional gap from lg\n @property({ type: String })\n align: Align = \"stretch\"; // start, center, end, stretch\n @property({ type: String })\n justify: Justify = \"start\"; // start, center, end, stretch: justify-items takes no space-between\n @property({ type: String })\n padding: SpaceName = \"none\"; // e.g., 'none', 'sm', 'md', 'lg'\n /* The narrowest a column may be. Unset, each step's count is the\n columns there are; set, it is the most there will be, and the grid\n takes fewer, wider ones where that many would not fit (grid.css.ts).\n A number of px at the default text size, laid out in rem: a cell holds\n text, so its floor grows with the reader's text, as the gaps do. */\n @property({ type: Number, attribute: \"min-col-width\" })\n minColWidth = 0;\n /* Rows each item shares with the items beside it. Unset, an item is one\n cell and lays itself out; set, every item is a subgrid of that many of\n the grid's rows (grid.css.ts), so the parts of one item -- a link over\n its line, a card's title over its copy -- line up with the same parts of\n its neighbours however differently their text wraps. The item places its\n parts in those rows; one that leaves a row empty leaves it at the height\n its neighbours give it. */\n @property({ type: Number, attribute: \"item-rows\" })\n itemRows = 0;\n\n render() {\n return html`\n <div\n class=\"grid ${this.minColWidth > 0 ? \"grid--fit\" : \"\"} ${this.itemRows > 0 ? \"grid--rows\" : \"\"}\"\n style=\"\n --grid-cols: ${this.cols};\n --grid-cols-sm: ${this.colsSm};\n --grid-cols-md: ${this.colsMd};\n --grid-cols-lg: ${this.colsLg};\n ${space(this.gap) ? `--grid-gap: ${space(this.gap)};` : \"\"}\n --grid-gap-sm: ${space(this.gapSm) || \"var(--grid-gap)\"};\n --grid-gap-md: ${space(this.gapMd) || \"var(--grid-gap-sm)\"};\n --grid-gap-lg: ${space(this.gapLg) || \"var(--grid-gap-md)\"};\n align-items: ${this.align};\n justify-items: ${this.justify};\n padding: ${space(this.padding)};\n ${this.minColWidth > 0 ? `--grid-min-col-width: ${this.minColWidth / 16}rem;` : \"\"}\n ${this.itemRows > 0 ? `--grid-item-rows: ${Math.round(this.itemRows)};` : \"\"}\n \"\n >\n <slot></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-grid\": BdGrid;\n }\n}\n"],"mappings":"A,4UAWA,IACMI,EADN,cACqBC,CAAW,C,8BA4CvB,KAAA,KAAA,EAEE,KAAA,OAAA,EAEA,KAAA,OAAA,EAEA,KAAA,OAAA,EAEQ,KAAA,IAAA,KAEO,KAAA,MAAA,GAEA,KAAA,MAAA,GAEA,KAAA,MAAA,GAET,KAAA,MAAA,UAEI,KAAA,QAAA,QAEE,KAAA,QAAA,OAOP,KAAA,YAAA,EASH,KAAA,SAAA,C,QA/EK,KAAA,OAAA,CAACL,CAAO,C,CAiFxB,QAAS,CACP,MAAO,EAAI;;sBAEO,KAAK,YAAc,EAAI,YAAc,GAAG,GAAG,KAAK,SAAW,EAAI,aAAe,GAAG;;yBAE9E,KAAK,KAAK;4BACP,KAAK,OAAO;4BACZ,KAAK,OAAO;4BACZ,KAAK,OAAO;YAC5BO,EAAM,KAAK,GAAG,EAAI,eAAeA,EAAM,KAAK,GAAG,EAAE,GAAK,GAAG;2BAC1CA,EAAM,KAAK,KAAK,GAAK,kBAAkB;2BACvCA,EAAM,KAAK,KAAK,GAAK,qBAAqB;2BAC1CA,EAAM,KAAK,KAAK,GAAK,qBAAqB;yBAC5C,KAAK,MAAM;2BACT,KAAK,QAAQ;qBACnBA,EAAM,KAAK,OAAO,EAAE;YAC7B,KAAK,YAAc,EAAI,yBAAyB,KAAK,YAAc,GAAG,MAAQ,GAAG;YACjF,KAAK,SAAW,EAAI,qBAAqB,KAAK,MAAM,KAAK,QAAQ,EAAE,GAAK,GAAG;;;;;KAMrF,CACF,EA/DGN,EAAA,CAAAO,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAJ,EAAA,UAAA,OAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAO,EAAS,CAAE,KAAM,OAAQ,UAAW,SAAU,CAAC,CAAA,EAAAJ,EAAA,UAAA,SAAA,IAAA,EAAA,EAE/CH,EAAA,CAAAO,EAAS,CAAE,KAAM,OAAQ,UAAW,SAAU,CAAC,CAAA,EAAAJ,EAAA,UAAA,SAAA,IAAA,EAAA,EAE/CH,EAAA,CAAAO,EAAS,CAAE,KAAM,OAAQ,UAAW,SAAU,CAAC,CAAA,EAAAJ,EAAA,UAAA,SAAA,IAAA,EAAA,EAE/CH,EAAA,CAAAO,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAJ,EAAA,UAAA,MAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAO,EAAS,CAAE,KAAM,OAAQ,UAAW,QAAS,CAAC,CAAA,EAAAJ,EAAA,UAAA,QAAA,IAAA,EAAA,EAE9CH,EAAA,CAAAO,EAAS,CAAE,KAAM,OAAQ,UAAW,QAAS,CAAC,CAAA,EAAAJ,EAAA,UAAA,QAAA,IAAA,EAAA,EAE9CH,EAAA,CAAAO,EAAS,CAAE,KAAM,OAAQ,UAAW,QAAS,CAAC,CAAA,EAAAJ,EAAA,UAAA,QAAA,IAAA,EAAA,EAE9CH,EAAA,CAAAO,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAJ,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAO,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAJ,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAO,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAJ,EAAA,UAAA,UAAA,IAAA,EAAA,EAOzBH,EAAA,CAAAO,EAAS,CAAE,KAAM,OAAQ,UAAW,eAAgB,CAAC,CAAA,EAAAJ,EAAA,UAAA,cAAA,IAAA,EAAA,EASrDH,EAAA,CAAAO,EAAS,CAAE,KAAM,OAAQ,UAAW,WAAY,CAAC,CAAA,EAAAJ,EAAA,UAAA,WAAA,IAAA,EAAA,EAhFnD,EAAAH,EAAA,CAAAQ,EAAc,SAAS,CAAA,EAAAL,CAAA"}
1
+ {"version":3,"file":"grid.js","names":["gridCSS","_decorate","__decorate","grid_css_default","BdGrid","LitElement","_args","space","property","defineElement"],"sources":["../../../../src/components/grid/grid.ts"],"sourcesContent":["import { LitElement, html } from \"lit\";\nimport { property } from \"lit/decorators.js\";\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 gridCSS from \"#components/grid/grid.css.ts\";\nimport { space, type SpaceName } from \"#shared/token-scales.ts\";\n\ntype Align = \"start\" | \"center\" | \"end\" | \"stretch\";\ntype Justify = \"start\" | \"center\" | \"end\" | \"stretch\";\n\n@defineElement(\"bd-grid\")\nclass BdGrid extends LitElement {\n static styles = [gridCSS];\n\n /* The three responsive properties name their attribute, and that is the\n whole fix. Lit derives an observed attribute by LOWERCASING the property\n name -- not by dash-casing it -- so `colsSm` observed `colssm` and the\n `cols-sm` this component documents was not an attribute it had ever been\n listening for. observedAttributes read\n [\"cols\",\"colssm\",\"colsmd\",\"colslg\",\"gap\",\"align\",\"justify\",\"padding\"];\n `cols` worked because it is one word, which is why the failure looked like\n a responsive bug rather than a naming one.\n\n So every dash-cased column attribute in the package was inert and the\n properties kept their constructor defaults 1/1/2/3. Those defaults sit one\n step under the 2/3/4 the Responsive columns story asks for, which is why\n the rendered grid looked merely one breakpoint late instead of ignoring\n the markup entirely. Measured across five stories x six viewports, 25 of\n 66 readings rendered a column count nobody had asked for:\n\n Layout/Grid \"Single column\" cols-lg=\"1\" -> 3 columns at 992 and 1440\n Layout/Grid \"Gap scale\" cols-sm=\"3\" -> 1 column at 576-767\n Layout/Grid \"Alignment\" cols-sm=\"3\" -> 1 column at 576-767\n bd-footer quick links cols-lg=\"2\" -> 3 columns at 992 and 1440\n\n The last one is not a story: footer.ts writes cols-md/cols-lg in its own\n shadow root, so a shipped component's layout was running on the defaults\n too.\n\n Naming the attribute is what this package already does everywhere else --\n 94 explicit dash-cased mappings across 40 files, `heading-level`,\n `visual-level`, `max-columns`, `min-card-width` -- and it is what the\n component's own documentation promises: grid.stories.ts reads \"`cols`\n below 576, then `cols-sm`, `cols-md` at 768 and `cols-lg` at 992\", and its\n argTypes map colsSm to the control name \"cols-sm\". The code was the only\n part that disagreed.\n\n An explicit name replaces the lowercase one rather than adding to it, so\n `colssm` stops being observed. Nothing reads it: grepped for colssm,\n colsmd, colslg and fallbacksrc across src, schemas and docs -- zero\n occurrences outside these declarations. The responsive behaviour itself is\n untouched; the media queries in grid.css.ts and the 576/768/992 steps are\n the ones that were already there, and this adds no smartness to a layout\n primitive -- it only lets the primitive hear what it is told. */\n @property({ type: Number })\n cols = 1; // default cols\n @property({ type: Number, attribute: \"cols-sm\" })\n colsSm = 1; // optional cols on small screens\n @property({ type: Number, attribute: \"cols-md\" })\n colsMd = 2; // optional cols on medium\n @property({ type: Number, attribute: \"cols-lg\" })\n colsLg = 3; // optional cols on large\n @property({ type: String })\n gap: SpaceName = \"md\"; // e.g., 'sm', 'md'\n @property({ type: String, attribute: \"gap-sm\" })\n gapSm: SpaceName | \"\" = \"\"; // optional gap from sm; unset keeps the step below\n @property({ type: String, attribute: \"gap-md\" })\n gapMd: SpaceName | \"\" = \"\"; // optional gap from md\n @property({ type: String, attribute: \"gap-lg\" })\n gapLg: SpaceName | \"\" = \"\"; // optional gap from lg\n @property({ type: String })\n align: Align = \"stretch\"; // start, center, end, stretch\n @property({ type: String })\n justify: Justify = \"start\"; // start, center, end, stretch: justify-items takes no space-between\n @property({ type: String })\n padding: SpaceName = \"none\"; // e.g., 'none', 'sm', 'md', 'lg'\n /* The narrowest a column may be. Unset, each step's count is the\n columns there are; set, it is the most there will be, and the grid\n takes fewer, wider ones where that many would not fit (grid.css.ts).\n A number of px at the default text size, laid out in rem: a cell holds\n text, so its floor grows with the reader's text, as the gaps do. */\n @property({ type: Number, attribute: \"min-col-width\" })\n minColWidth = 0;\n /* The widest a column may be. Unset, the columns share the grid's width;\n set, none grows past it, and the row of columns sits in the middle of\n the grid (grid.css.ts) -- two pricing cards stay card-sized and side by\n side rather than each filling half the page. A number of px at the\n default text size, laid out in rem, as min-col-width is. */\n @property({ type: Number, attribute: \"max-col-width\" })\n maxColWidth = 0;\n /* Rows each item shares with the items beside it. Unset, an item is one\n cell and lays itself out; set, every item is a subgrid of that many of\n the grid's rows (grid.css.ts), so the parts of one item -- a link over\n its line, a card's title over its copy -- line up with the same parts of\n its neighbours however differently their text wraps. The item places its\n parts in those rows; one that leaves a row empty leaves it at the height\n its neighbours give it. */\n @property({ type: Number, attribute: \"item-rows\" })\n itemRows = 0;\n\n render() {\n return html`\n <div\n class=\"grid ${this.minColWidth > 0 ? \"grid--fit\" : \"\"} ${this.maxColWidth > 0 ? \"grid--cap\" : \"\"} ${this.itemRows > 0 ? \"grid--rows\" : \"\"}\"\n style=\"\n --grid-cols: ${this.cols};\n --grid-cols-sm: ${this.colsSm};\n --grid-cols-md: ${this.colsMd};\n --grid-cols-lg: ${this.colsLg};\n ${space(this.gap) ? `--grid-gap: ${space(this.gap)};` : \"\"}\n --grid-gap-sm: ${space(this.gapSm) || \"var(--grid-gap)\"};\n --grid-gap-md: ${space(this.gapMd) || \"var(--grid-gap-sm)\"};\n --grid-gap-lg: ${space(this.gapLg) || \"var(--grid-gap-md)\"};\n align-items: ${this.align};\n justify-items: ${this.justify};\n padding: ${space(this.padding)};\n ${this.minColWidth > 0 ? `--grid-min-col-width: ${this.minColWidth / 16}rem;` : \"\"}\n ${this.maxColWidth > 0 ? `--grid-max-col-width: ${this.maxColWidth / 16}rem;` : \"\"}\n ${this.itemRows > 0 ? `--grid-item-rows: ${Math.round(this.itemRows)};` : \"\"}\n \"\n >\n <slot></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-grid\": BdGrid;\n }\n}\n"],"mappings":"A,4UAWA,IACMI,EADN,cACqBC,CAAW,C,8BA4CvB,KAAA,KAAA,EAEE,KAAA,OAAA,EAEA,KAAA,OAAA,EAEA,KAAA,OAAA,EAEQ,KAAA,IAAA,KAEO,KAAA,MAAA,GAEA,KAAA,MAAA,GAEA,KAAA,MAAA,GAET,KAAA,MAAA,UAEI,KAAA,QAAA,QAEE,KAAA,QAAA,OAOP,KAAA,YAAA,EAOA,KAAA,YAAA,EASH,KAAA,SAAA,C,QAtFK,KAAA,OAAA,CAACL,CAAO,C,CAwFxB,QAAS,CACP,MAAO,EAAI;;sBAEO,KAAK,YAAc,EAAI,YAAc,GAAG,GAAG,KAAK,YAAc,EAAI,YAAc,GAAG,GAAG,KAAK,SAAW,EAAI,aAAe,GAAG;;yBAEzH,KAAK,KAAK;4BACP,KAAK,OAAO;4BACZ,KAAK,OAAO;4BACZ,KAAK,OAAO;YAC5BO,EAAM,KAAK,GAAG,EAAI,eAAeA,EAAM,KAAK,GAAG,EAAE,GAAK,GAAG;2BAC1CA,EAAM,KAAK,KAAK,GAAK,kBAAkB;2BACvCA,EAAM,KAAK,KAAK,GAAK,qBAAqB;2BAC1CA,EAAM,KAAK,KAAK,GAAK,qBAAqB;yBAC5C,KAAK,MAAM;2BACT,KAAK,QAAQ;qBACnBA,EAAM,KAAK,OAAO,EAAE;YAC7B,KAAK,YAAc,EAAI,yBAAyB,KAAK,YAAc,GAAG,MAAQ,GAAG;YACjF,KAAK,YAAc,EAAI,yBAAyB,KAAK,YAAc,GAAG,MAAQ,GAAG;YACjF,KAAK,SAAW,EAAI,qBAAqB,KAAK,MAAM,KAAK,QAAQ,EAAE,GAAK,GAAG;;;;;KAMrF,CACF,EAvEGN,EAAA,CAAAO,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAJ,EAAA,UAAA,OAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAO,EAAS,CAAE,KAAM,OAAQ,UAAW,SAAU,CAAC,CAAA,EAAAJ,EAAA,UAAA,SAAA,IAAA,EAAA,EAE/CH,EAAA,CAAAO,EAAS,CAAE,KAAM,OAAQ,UAAW,SAAU,CAAC,CAAA,EAAAJ,EAAA,UAAA,SAAA,IAAA,EAAA,EAE/CH,EAAA,CAAAO,EAAS,CAAE,KAAM,OAAQ,UAAW,SAAU,CAAC,CAAA,EAAAJ,EAAA,UAAA,SAAA,IAAA,EAAA,EAE/CH,EAAA,CAAAO,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAJ,EAAA,UAAA,MAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAO,EAAS,CAAE,KAAM,OAAQ,UAAW,QAAS,CAAC,CAAA,EAAAJ,EAAA,UAAA,QAAA,IAAA,EAAA,EAE9CH,EAAA,CAAAO,EAAS,CAAE,KAAM,OAAQ,UAAW,QAAS,CAAC,CAAA,EAAAJ,EAAA,UAAA,QAAA,IAAA,EAAA,EAE9CH,EAAA,CAAAO,EAAS,CAAE,KAAM,OAAQ,UAAW,QAAS,CAAC,CAAA,EAAAJ,EAAA,UAAA,QAAA,IAAA,EAAA,EAE9CH,EAAA,CAAAO,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAJ,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAO,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAJ,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAO,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAJ,EAAA,UAAA,UAAA,IAAA,EAAA,EAOzBH,EAAA,CAAAO,EAAS,CAAE,KAAM,OAAQ,UAAW,eAAgB,CAAC,CAAA,EAAAJ,EAAA,UAAA,cAAA,IAAA,EAAA,EAOrDH,EAAA,CAAAO,EAAS,CAAE,KAAM,OAAQ,UAAW,eAAgB,CAAC,CAAA,EAAAJ,EAAA,UAAA,cAAA,IAAA,EAAA,EASrDH,EAAA,CAAAO,EAAS,CAAE,KAAM,OAAQ,UAAW,WAAY,CAAC,CAAA,EAAAJ,EAAA,UAAA,WAAA,IAAA,EAAA,EAvFnD,EAAAH,EAAA,CAAAQ,EAAc,SAAS,CAAA,EAAAL,CAAA"}
@@ -1,2 +1,2 @@
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};
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{max-width:25.625rem}: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-size:var(--typography-heading-h2-fontSize);--bd-pricing-price-amount-font-weight:var(--typography-heading-h2-fontWeight);--bd-pricing-price-amount-line-height:var(--typography-heading-h2-lineHeight);--bd-pricing-price-amount-letter-spacing:var(--typography-heading-h2-letterSpacing);--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","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"}
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 /* As wide as its column, up to the card's measure: two cards in a row stay\n card-sized rather than each filling half the page. In a row of them,\n bd-grid's max-col-width=\"410\" caps the columns to match and keeps the\n row together in the middle. */\n :host {\n /* no token: the card's measure, 410px at the default text size (the\n live consumer pages' .prod_box max-width); no width on the scale is a\n card's. In rem, so it grows with the reader's text as the grid's\n max-col-width does. */\n max-width: 25.625rem;\n }\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 heading/h2 (36 from 992 down to 27 at 320, 700,\n 125%), the whole role. */\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 --bd-pricing-price-amount-font-size: var(--typography-heading-h2-fontSize);\n --bd-pricing-price-amount-font-weight: var(--typography-heading-h2-fontWeight);\n --bd-pricing-price-amount-line-height: var(--typography-heading-h2-lineHeight);\n --bd-pricing-price-amount-letter-spacing: var(--typography-heading-h2-letterSpacing);\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,2+JA4PLC,EAAU,CAAG,yhB"}
@@ -18,7 +18,7 @@ type Part = "banner" | "badge" | "title" | "description" | "price" | "actions" |
18
18
  * covers, the store's price, the Buy and Learn More buttons, the guarantee
19
19
  * under them, and, in the version that has them, the features it adds.
20
20
  *
21
- * <bd-grid cols="1" cols-md="2" cols-lg="4" gap="lg" gap-md="md" item-rows="8">
21
+ * <bd-grid cols="1" cols-md="2" cols-lg="4" gap="lg" gap-md="md" item-rows="8" max-col-width="410">
22
22
  * <bd-context ignore-events-parent>
23
23
  * <bd-product product-id="ps_i">
24
24
  * <bd-option devices="5" subscription="1" data-layer-event="info">
@@ -1 +1 @@
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
+ {"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\" max-col-width=\"410\">\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"../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};
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(--bd-pricing-price-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(--bd-pricing-price-amount-line-height,var(--typography-heading-h3-lineHeight));letter-spacing:var(--bd-pricing-price-amount-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.\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"}
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-size / -font-weight / -line-height /\n -letter-spacing the price's role (heading-h3)\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, unless the card sets another through the\n hooks. */\n .amount {\n margin: 0;\n font-size: var(--bd-pricing-price-amount-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(--bd-pricing-price-amount-line-height, var(--typography-heading-h3-lineHeight));\n letter-spacing: var(--bd-pricing-price-amount-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,47D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@repobit/dex-system-design",
3
- "version": "5.0.2",
3
+ "version": "5.0.3",
4
4
  "description": "Design system based on Web Components.",
5
5
  "author": "Iordache Matei Cezar <miordache@bitdefender.com>",
6
6
  "homepage": "https://github.com/bitdefender/dex-core#readme",
@@ -494,5 +494,5 @@
494
494
  "volta": {
495
495
  "node": "24.22.1"
496
496
  },
497
- "gitHead": "5f20bc7930465686d18149ebd2fdcdeb450e9d20"
497
+ "gitHead": "83bdc9cab34eaaa828a7d2397332a883aa2ae0c1"
498
498
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifestVersion": 1,
3
3
  "package": "@repobit/dex-system-design",
4
- "packageVersion": "5.0.2",
4
+ "packageVersion": "5.0.3",
5
5
  "generatedFrom": [
6
6
  "package.json exports",
7
7
  "Lit reactive properties (static properties or @property/@state)",
@@ -2059,6 +2059,13 @@
2059
2059
  "default": 0,
2060
2060
  "description": "The narrowest a column may be, in px at the default text size (laid out in rem, so it grows with the reader's text). Set, each step's cols is the most columns there will be, and the grid takes fewer where that many would not fit. Unset (0), cols is the count."
2061
2061
  },
2062
+ {
2063
+ "name": "maxColWidth",
2064
+ "type": "number",
2065
+ "attributeName": "max-col-width",
2066
+ "default": 0,
2067
+ "description": "The widest a column may be, in px at the default text size (laid out in rem). Set, no column grows past it and the row of columns sits in the middle of the grid, its gap unchanged: a row of two bd-pricing-cards with max-col-width=\"410\" stays card-sized. Unset (0), the columns share the grid's width."
2068
+ },
2062
2069
  {
2063
2070
  "name": "itemRows",
2064
2071
  "type": "number",
@@ -3534,7 +3541,7 @@
3534
3541
  ],
3535
3542
  "notes": [
3536
3543
  "A plan's pricing card: a <bd-badge slot=\"badge\" variant=\"brand\" size=\"lg\">, <bd-h slot=\"title\" as=\"h3\"> at heading-h5 in bold whatever its level (a word in <em> -- \"Ultimate Security <em>Plus</em>\" -- drawn upright in the brand's text ink), one <bd-p slot=\"description\"> per paragraph (what the plan covers, then its pitch), a <bd-pricing-price slot=\"price\">, the Buy Now <bd-button buy-link appearance=\"accent\" full-width> and Learn More <bd-button href appearance=\"ghost\" full-width> in actions, the guarantee in caption, and bd-pricing-feature-groups in the default slot, drawn in the card's scale.",
3537
- "Lay a row out in <bd-grid gap=\"lg\" gap-md=\"md\" item-rows=\"8\">, the cards 24 apart from md and 32 stacked below it, where the recommended card's tab overhangs the card above: each card is a subgrid of the grid's eight rows (badge, title, description, rule, price, actions, caption, features), so the parts line up across the row. Wrapped in <bd-context><bd-product product-id><bd-option devices subscription data-layer-event>, the wrappers draw no box in a bd-grid and the card is still the subgrid.",
3544
+ "Lay a row out in <bd-grid gap=\"lg\" gap-md=\"md\" item-rows=\"8\" max-col-width=\"410\">, the cards 24 apart from md and 32 stacked below it, where the recommended card's tab overhangs the card above: each card is a subgrid of the grid's eight rows (badge, title, description, rule, price, actions, caption, features), so the parts line up across the row. Wrapped in <bd-context><bd-product product-id><bd-option devices subscription data-layer-event>, the wrappers draw no box in a bd-grid and the card is still the subgrid.",
3538
3545
  "The version without features is the same card with nothing in caption and the default slot. Name each button with its label (\"Buy Now, {title}\", \"Learn More, {title}\").",
3539
3546
  "No part has a fallback, and each part's box is hidden while its slot is empty; the banner is drawn only with highlight."
3540
3547
  ]