@repobit/dex-system-design 4.3.1 → 4.3.2
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,22 @@
|
|
|
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
|
+
## [4.3.2](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@4.3.1...@repobit/dex-system-design@4.3.2) (2026-11-20)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **DEX-29643:** add getRequestedCampaign method to oneProductStore for campaign handling
|
|
11
|
+
* **DEX-29643:** reorder imports and remove unnecessary display property from icon slot
|
|
12
|
+
* **DEX-29643:** reorder imports in card.css.ts for consistency
|
|
13
|
+
* **DEX-29643:** reorder imports in card.css.ts for consistency
|
|
14
|
+
* **DEX-29643:** reorder imports in product-hero.test.ts for consistency
|
|
15
|
+
* **DEX-29643:** revert import order in card.css.ts
|
|
16
|
+
* **DEX-29643:** stop forcing display flex on the card's slo
|
|
17
|
+
* **DEX-29643:** stop forcing display flex on the card's slo
|
|
18
|
+
* **DEX-29643:** stop forcing display flex on the card's slotted bd-img icon
|
|
19
|
+
* **DEX-29643:** stop forcing display flex on the card's slotted bd-img icon
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [4.3.1](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@4.3.0...@repobit/dex-system-design@4.3.1) (2026-11-18)
|
|
7
23
|
|
|
8
24
|
**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{--_icon-width:var(--icon-2xl-size);--_icon-height:var(--icon-2xl-size);display:block}:host([hidden]){display:none}.card{box-sizing:border-box;text-align:start;background:var(--bd-card-bg,var(--color-surface-container));border:var(--bd-card-border,none);border-radius:var(--card-radius);width:100%;min-width:0;height:100%;padding:var(--card-padding);font-family:var(--typography-fontFamily-sans);flex-direction:column;align-items:flex-start;display:flex;position:relative}:host([background=tint]) .card{background:var(--status-brand-surface)}.card [hidden]{display:none}.media{padding-bottom:var(--spacing-16);display:flex}::slotted([slot=media]){max-width:100%;height:var(--icon-3xl-size);flex:none}::slotted(bd-img[slot=media]){--bd-img-height:var(--icon-3xl-size)}.icon{padding-bottom:var(--spacing-8);flex-direction:column;align-items:flex-start;display:flex}::slotted([slot=icon]){box-sizing:border-box;width:var(--_icon-width);height:var(--_icon-height);flex:none}::slotted(bd-icon[slot=icon]){--bd-icon-size:var(--_icon-width);padding-block:calc((var(--_icon-height) - var(--_icon-width)) / 2);justify-content:center}::slotted(bd-img[slot=icon]){flex-direction:column;justify-content:center
|
|
1
|
+
import"../shared/token-scales.js";import{css as e}from"lit";var t=e`:host{--_icon-width:var(--icon-2xl-size);--_icon-height:var(--icon-2xl-size);display:block}:host([hidden]){display:none}.card{box-sizing:border-box;text-align:start;background:var(--bd-card-bg,var(--color-surface-container));border:var(--bd-card-border,none);border-radius:var(--card-radius);width:100%;min-width:0;height:100%;padding:var(--card-padding);font-family:var(--typography-fontFamily-sans);flex-direction:column;align-items:flex-start;display:flex;position:relative}:host([background=tint]) .card{background:var(--status-brand-surface)}.card [hidden]{display:none}.media{padding-bottom:var(--spacing-16);display:flex}::slotted([slot=media]){max-width:100%;height:var(--icon-3xl-size);flex:none}::slotted(bd-img[slot=media]){--bd-img-height:var(--icon-3xl-size)}.icon{padding-bottom:var(--spacing-8);flex-direction:column;align-items:flex-start;display:flex}::slotted([slot=icon]){box-sizing:border-box;width:var(--_icon-width);height:var(--_icon-height);flex:none}::slotted(bd-icon[slot=icon]){--bd-icon-size:var(--_icon-width);padding-block:calc((var(--_icon-height) - var(--_icon-width)) / 2);justify-content:center}::slotted(bd-img[slot=icon]){flex-direction:column;justify-content:center}::slotted(bd-img[slot=icon][fit=contain]){--bd-img-height:100%}::slotted(bd-mark[slot=icon]){justify-content:center;align-items:center;display:flex}.heading{gap:var(--spacing-4);width:100%;margin-bottom:var(--spacing-8);flex-direction:column;display:flex}.title-row{align-items:center;gap:var(--spacing-8);display:flex}.title{min-width:0}.badge{flex:none;display:flex}::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);margin:0}::slotted([slot=description]){--bd-paragraph-font-size:var(--typography-body-small-fontSize);--bd-paragraph-font-weight:var(--typography-body-small-fontWeight);--bd-paragraph-line-height:var(--typography-body-small-lineHeight);--bd-paragraph-letter-spacing:var(--typography-body-small-letterSpacing);--bd-heading-color:var(--color-text-muted);--bd-paragraph-color:var(--color-text-muted);--bd-paragraph-margin-bottom:0}.content{flex-direction:column;flex:1;width:100%;display:flex}::slotted(bd-p:last-child){--bd-paragraph-margin-bottom:0}.actions{align-items:flex-start;gap:var(--spacing-8);width:100%;margin-top:var(--spacing-16);padding-top:var(--spacing-8);flex-wrap:wrap;display:flex}.actions-start{justify-content:flex-start}.actions-center{justify-content:center}.actions-end{justify-content:flex-end}.centred{text-align:center;align-items:center}.centred .icon{align-items:center;width:100%}.centred .media{justify-content:center;width:100%}.centred .title-row{justify-content:center}.centred .content{align-items:center}:host([appearance=outline]){--_icon-width:65px;--_icon-height:75px}:host([appearance=outline]) .card{border:var(--border-width-2) solid var(--color-border-brand);border-radius:var(--shape-radius-2xl);padding:var(--spacing-40)}:host([appearance=outline]) .heading{margin-top:var(--spacing-64)}:host([appearance=outline]) ::slotted(bd-h[slot=title]),:host([appearance=outline]) ::slotted(bd-display[slot=title]){--bd-heading-color:var(--color-text-brand);--bd-paragraph-color:var(--color-text-brand)}:host([appearance=outline]) ::slotted([slot=description]),:host([appearance=outline]) .content ::slotted(*){--bd-paragraph-color:var(--color-text-secondary);text-align:center}:host([appearance=feature]),:host([appearance=inline]){--_icon-width:var(--icon-xl-size);--_icon-height:var(--icon-xl-size)}:host([appearance=feature]) .icon{padding-bottom:var(--spacing-16)}@media (width>=768px){:host([appearance=feature]) .card{grid-template-columns:auto minmax(0,1fr);align-content:start;align-items:start;display:grid}:host([appearance=feature]) .icon{grid-area:1/1/span 3;margin-inline-end:var(--spacing-16);padding-bottom:0}:host([appearance=feature]) .heading,:host([appearance=feature]) .content,:host([appearance=feature]) .actions{grid-column:2}}:host([appearance=inline]) .card{grid-template-columns:auto minmax(0,1fr);align-content:start;align-items:start;display:grid}:host([appearance=inline]) .icon{bottom:var(--spacing-6);grid-column:1;align-self:center;margin-inline-end:var(--spacing-8);padding-bottom:0;position:relative}:host([appearance=inline]) .heading{grid-column:2;align-self:center;margin-bottom:0}:host([appearance=inline]) .title-row{gap:var(--spacing-4)}:host([appearance=inline]) .title{padding-block:var(--spacing-10)}:host([appearance=inline]) .content,:host([appearance=inline]) .actions{grid-column:1/-1}@media (width<768px){:host([appearance=inline]) .card{padding:var(--card-padding-compact)}}:host([appearance=media]) .card{background:var(--color-surface-media);--bd-heading-color:var(--color-text-on-media);--bd-paragraph-color:var(--color-text-on-media);overflow:hidden}:host([appearance=media]) .media{padding:0;position:absolute;inset:0}:host([appearance=media]) .icon,:host([appearance=media]) .heading,:host([appearance=media]) .content,:host([appearance=media]) .actions{position:relative}:host([appearance=media]) .card:before{content:"";flex:none;grid-row:1;padding-block-start:66.6667%}:host([appearance=media]) .media:after{content:"";background:linear-gradient(to bottom, transparent, var(--color-surface-media));position:absolute;inset:0}:host([appearance=media]) ::slotted([slot=media]){width:100%;max-width:none;height:100%}:host([appearance=media]) ::slotted(bd-img[slot=media]){--bd-img-height:auto;--bd-img-min-width:100%;grid-template:minmax(0,1fr)/minmax(0,1fr);place-items:stretch stretch;display:grid}:host([appearance=media]) ::slotted(bd-h[slot=title]),:host([appearance=media]) ::slotted(bd-display[slot=title]){--bd-heading-font-size:var(--typography-heading-h3-fontSize);--bd-heading-font-weight:var(--typography-heading-h3-fontWeight);--bd-heading-line-height:var(--typography-heading-h3-lineHeight);--bd-heading-letter-spacing:var(--typography-heading-h3-letterSpacing);--bd-heading-font-family:var(--typography-heading-h3-fontFamily)}:host([appearance=media]) ::slotted([slot=description]),:host([appearance=media]) .content ::slotted(*){--bd-paragraph-font-size:var(--typography-body-large-fontSize);--bd-paragraph-font-weight:var(--typography-body-large-fontWeight);--bd-paragraph-line-height:var(--typography-body-large-lineHeight);--bd-paragraph-letter-spacing:var(--typography-body-large-letterSpacing);--bd-paragraph-color:var(--color-text-on-media)}:host([appearance=media]) .heading{margin-bottom:var(--spacing-16)}:host([appearance=media]) .content{flex:none}@media (width<768px){:host([appearance=media]) .card{padding:var(--card-padding-compact)}}@media (width>=768px){.in-grid{grid-template-rows:subgrid;grid-row:1/-1;align-content:start;align-items:start;row-gap:0;display:grid}.in-grid .media,.in-grid .icon{grid-row:1}.in-grid .heading{grid-row:2}.in-grid .content{grid-template-rows:subgrid;grid-row:3/-2;align-items:start;row-gap:0;display:grid}.in-grid.centred .content{justify-items:center}.in-grid .actions{grid-row:-2}:host([appearance=feature]) .in-grid .icon{grid-row:1/-1}:host([appearance=inline]) .in-grid .icon,:host([appearance=inline]) .in-grid .heading{grid-row:1/span 2}:host([appearance=media]) .in-grid .media{grid-row:auto}}`;export{t as default};
|
|
2
2
|
//# sourceMappingURL=card.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.css.js","names":["card_css_default"],"sources":["../../../../src/components/card/card.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { above, below, bodyRole, headingRole, ink } from \"#shared/token-scales.ts\";\n\n/* bd-card's five arrangements. fill and outline are bd-card-item's looks,\n feature is bd-card-features-item's and inline bd-light-carousel-item's\n standard one, each carried over from the stylesheet that drew it and\n measured against that render. */\nexport default css`\n /* The icon's frame, which each appearance sizes below: 48 square on fill,\n the step bd-card-item drew. */\n :host {\n display: block;\n --_icon-width: var(--icon-2xl-size);\n --_icon-height: var(--icon-2xl-size);\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .card {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n min-width: 0;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n text-align: start;\n /* The container ground, or what a tinted bd-card-grid hands its cards:\n the default ground and an edge (CLAUDE.md, A card's ground and its\n edge). */\n background: var(--bd-card-bg, var(--color-surface-container));\n border: var(--bd-card-border, none);\n border-radius: var(--card-radius);\n padding: var(--card-padding);\n font-family: var(--typography-fontFamily-sans);\n }\n\n :host([background=\"tint\"]) .card {\n background: var(--status-brand-surface);\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 /* === MEDIA ===\n A picture the card draws whole, before the icon. Off the media\n appearance it heads the card at the outline icon frame's height and its\n own width, the cards-with-img column's partner logo (DEX-29440): the\n bd-img's own <img> takes the height through --bd-img-height and its\n width follows the logo's proportions, so no logo is cropped. A card\n heads with a picture or an icon: in a bd-card-grid both take the first\n row. */\n .media {\n display: flex;\n padding-bottom: var(--spacing-16);\n }\n\n ::slotted([slot=\"media\"]) {\n flex: none;\n max-width: 100%;\n height: var(--icon-3xl-size);\n }\n\n ::slotted(bd-img[slot=\"media\"]) {\n --bd-img-height: var(--icon-3xl-size);\n }\n\n /* === ICON ===\n The page writes the atom and the card sizes it, on the slotted element\n itself: 3.x cloned the icon into its shadow root and wrote a size on the\n clone. A bd-icon draws its svg at its own height, so the frame's width is\n the icon's size and the padding centres it in a taller frame; a bd-img\n stretches its image to the frame's width and centres it; a bd-mark keeps\n the size its drawing declares, centred in the frame. */\n .icon {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding-bottom: var(--spacing-8);\n }\n\n ::slotted([slot=\"icon\"]) {\n box-sizing: border-box;\n flex: none;\n width: var(--_icon-width);\n height: var(--_icon-height);\n }\n\n ::slotted(bd-icon[slot=\"icon\"]) {\n --bd-icon-size: var(--_icon-width);\n justify-content: center;\n padding-block: calc((var(--_icon-height) - var(--_icon-width)) / 2);\n }\n\n ::slotted(bd-img[slot=\"icon\"]) {\n display: flex;\n flex-direction: column;\n justify-content: center;\n }\n\n /* An icon written fit=\"contain\" is drawn whole inside the frame, whatever\n its proportions: its <img> takes the frame's height through\n --bd-img-height as well as its width, and the fit keeps the drawing's\n shape -- the website's shield icons, 65 by 72 and 64 square, all inside\n 48 (DEX-29440). Without it the image keeps the frame's width alone. */\n ::slotted(bd-img[slot=\"icon\"][fit=\"contain\"]) {\n --bd-img-height: 100%;\n }\n\n ::slotted(bd-mark[slot=\"icon\"]) {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n /* === TITLE, BADGE, DESCRIPTION ===\n The badge sits beside the title in every appearance, and the description\n under both. */\n .heading {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-4);\n width: 100%;\n margin-bottom: var(--spacing-8);\n }\n\n .title-row {\n display: flex;\n align-items: center;\n gap: var(--spacing-8);\n }\n\n .title {\n min-width: 0;\n }\n\n .badge {\n display: flex;\n flex: none;\n }\n\n /* The card's title: the h5 role in bold, as all three 3.x cards drew it\n (visual-level=\"h5\" font-weight=\"bold\"), at every 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, which 3.x's font-weight=\"bold\" asked for;\n no heading role carries the h5 size at that weight. */\n --bd-heading-font-weight: var(--typography-fontWeight-bold);\n margin: 0;\n }\n\n /* bd-card-item's subtitle: body-small in muted ink, with no flow margin. */\n ::slotted([slot=\"description\"]) {\n ${unsafeCSS(bodyRole(\"body-small\"))}\n ${unsafeCSS(ink(\"muted\"))}\n --bd-paragraph-margin-bottom: 0;\n }\n\n /* === CONTENT AND ACTIONS === */\n .content {\n flex: 1;\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n\n /* The card's own padding ends it; a closing paragraph's flow margin would\n add 16px inside that padding. Paragraphs before it keep theirs. */\n ::slotted(bd-p:last-child) {\n --bd-paragraph-margin-bottom: 0;\n }\n\n .actions {\n display: flex;\n flex-wrap: wrap;\n align-items: flex-start;\n gap: var(--spacing-8);\n width: 100%;\n margin-top: var(--spacing-16);\n padding-top: var(--spacing-8);\n }\n\n .actions-start {\n justify-content: flex-start;\n }\n\n .actions-center {\n justify-content: center;\n }\n\n .actions-end {\n justify-content: flex-end;\n }\n\n /* === CENTRED: align=\"center\", and every outline card === */\n .centred {\n align-items: center;\n text-align: center;\n }\n\n .centred .icon {\n align-items: center;\n width: 100%;\n }\n\n .centred .media {\n justify-content: center;\n width: 100%;\n }\n\n .centred .title-row {\n justify-content: center;\n }\n\n .centred .content {\n align-items: center;\n }\n\n /* === OUTLINE: a brand edge, a wider inset and a taller icon, centred ===\n The title takes the brand ink and the copy the secondary one. 3.x wrote\n the title's colour on the bd-h host, which paints its own ink, so its\n outline titles rendered in the primary ink; the hook is what reaches it. */\n :host([appearance=\"outline\"]) {\n /* no token: the outline icon frame's width, which 3.x wrote in script; the dimension scale stops at 64 */\n --_icon-width: 65px;\n /* no token: the outline icon frame's height, as above */\n --_icon-height: 75px;\n }\n\n :host([appearance=\"outline\"]) .card {\n border: var(--border-width-2) solid var(--color-border-brand);\n border-radius: var(--shape-radius-2xl);\n padding: var(--spacing-40);\n }\n\n :host([appearance=\"outline\"]) .heading {\n margin-top: var(--spacing-64);\n }\n\n :host([appearance=\"outline\"]) ::slotted(bd-h[slot=\"title\"]),\n :host([appearance=\"outline\"]) ::slotted(bd-display[slot=\"title\"]) {\n ${unsafeCSS(ink(\"primary\"))}\n }\n\n :host([appearance=\"outline\"]) ::slotted([slot=\"description\"]),\n :host([appearance=\"outline\"]) .content ::slotted(*) {\n --bd-paragraph-color: var(--color-text-secondary);\n text-align: center;\n }\n\n /* === FEATURE: the icon in a column beside everything else ===\n bd-card-features-item's row: a 32 icon, 16 from the title, the badge 8\n beside it. Below md the icon stacks over the title, 16 above it. */\n :host([appearance=\"feature\"]),\n :host([appearance=\"inline\"]) {\n --_icon-width: var(--icon-xl-size);\n --_icon-height: var(--icon-xl-size);\n }\n\n :host([appearance=\"feature\"]) .icon {\n padding-bottom: var(--spacing-16);\n }\n\n @media ${unsafeCSS(above(\"md\"))} {\n :host([appearance=\"feature\"]) .card {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr);\n align-items: start;\n align-content: start;\n }\n\n :host([appearance=\"feature\"]) .icon {\n grid-column: 1;\n grid-row: 1 / span 3;\n padding-bottom: 0;\n margin-inline-end: var(--spacing-16);\n }\n\n :host([appearance=\"feature\"]) .heading,\n :host([appearance=\"feature\"]) .content,\n :host([appearance=\"feature\"]) .actions {\n grid-column: 2;\n }\n }\n\n /* === INLINE: the icon in one row with the title and the badge ===\n bd-light-carousel-item's standard header: a 32 icon 8 from the title,\n centred on it and raised 6, the badge 4 beside the title, and 10 above\n and below the title. The copy runs the card's full width under the row,\n and the card takes the compact inset below md, as that item did. */\n :host([appearance=\"inline\"]) .card {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr);\n align-items: start;\n align-content: start;\n }\n\n :host([appearance=\"inline\"]) .icon {\n grid-column: 1;\n align-self: center;\n position: relative;\n bottom: var(--spacing-6);\n padding-bottom: 0;\n margin-inline-end: var(--spacing-8);\n }\n\n :host([appearance=\"inline\"]) .heading {\n grid-column: 2;\n align-self: center;\n margin-bottom: 0;\n }\n\n :host([appearance=\"inline\"]) .title-row {\n gap: var(--spacing-4);\n }\n\n :host([appearance=\"inline\"]) .title {\n padding-block: var(--spacing-10);\n }\n\n :host([appearance=\"inline\"]) .content,\n :host([appearance=\"inline\"]) .actions {\n grid-column: 1 / -1;\n }\n\n @media ${unsafeCSS(below(\"md\"))} {\n :host([appearance=\"inline\"]) .card {\n padding: var(--card-padding-compact);\n }\n }\n\n /* === MEDIA: the parts over the picture, which fills the card ===\n The website's text-over-image columns (DEX-29440): the picture is the\n card's ground and the parts stand at its foot on a scrim that runs from\n clear at the top to the media frame's ground behind the words, so their\n on-media ink holds its contrast whatever the picture. The picture shows\n two thirds of the card's width above the words, which in a bd-card-grid\n keep the grid's rows, so the titles and the copy start on one line\n across the row, as the website's cards do; it draws no edge: the\n picture is its edge. Its title is the h3 role, a headline over the\n picture rather than an item's label, and the copy body-large, as the\n website's card drew them (32/600 and 18). */\n :host([appearance=\"media\"]) .card {\n overflow: hidden;\n background: var(--color-surface-media);\n --bd-heading-color: var(--color-text-on-media);\n --bd-paragraph-color: var(--color-text-on-media);\n }\n\n :host([appearance=\"media\"]) .media {\n position: absolute;\n inset: 0;\n padding: 0;\n }\n\n /* positioned after the picture, so they paint over it in source order */\n :host([appearance=\"media\"]) .icon,\n :host([appearance=\"media\"]) .heading,\n :host([appearance=\"media\"]) .content,\n :host([appearance=\"media\"]) .actions {\n position: relative;\n }\n\n /* the picture's share above the words, in the first row, where an icon\n would be: in a grid the words then keep the rows below it */\n :host([appearance=\"media\"]) .card::before {\n content: \"\";\n flex: none;\n grid-row: 1;\n /* A padding percentage is of the card's width, so this is two thirds of\n it without making the host a size container, whose containment would\n take the card out of the grid's subgrid rows.\n no token: the picture shown above the words, two thirds of the card's width, as the website's text-over-image card drew it (273 of 409) */\n padding-block-start: calc(100% * 2 / 3);\n }\n\n :host([appearance=\"media\"]) .media::after {\n content: \"\";\n position: absolute;\n inset: 0;\n background: linear-gradient(to bottom, transparent, var(--color-surface-media));\n }\n\n :host([appearance=\"media\"]) ::slotted([slot=\"media\"]) {\n width: 100%;\n max-width: none;\n height: 100%;\n }\n\n /* bd-img's own <img> sizes itself from its image, so the cover stretches\n it both ways as a grid item, and its fit (cover by default) keeps the\n picture's proportions (post-card.css.ts) */\n :host([appearance=\"media\"]) ::slotted(bd-img[slot=\"media\"]) {\n --bd-img-height: auto;\n /* the picture's width attribute would hold it at its own width in a\n card wider than that; it fills the card at any width */\n --bd-img-min-width: 100%;\n display: grid;\n grid-template: minmax(0, 1fr) / minmax(0, 1fr);\n align-items: stretch;\n justify-items: stretch;\n }\n\n :host([appearance=\"media\"]) ::slotted(bd-h[slot=\"title\"]),\n :host([appearance=\"media\"]) ::slotted(bd-display[slot=\"title\"]) {\n ${unsafeCSS(headingRole(\"heading-h3\"))}\n }\n\n :host([appearance=\"media\"]) ::slotted([slot=\"description\"]),\n :host([appearance=\"media\"]) .content ::slotted(*) {\n ${unsafeCSS(bodyRole(\"body-large\"))}\n --bd-paragraph-color: var(--color-text-on-media);\n }\n\n /* A bigger title takes the bigger gap: at the heading-h3 role it stands\n 16 over the copy, the section title to content distance\n (Foundations/Spacing/Rhythm), where the h5 card title keeps the item\n distance, 8. */\n :host([appearance=\"media\"]) .heading {\n margin-bottom: var(--spacing-16);\n }\n\n /* the copy keeps its height at the foot */\n :host([appearance=\"media\"]) .content {\n flex: none;\n }\n\n @media ${unsafeCSS(below(\"md\"))} {\n :host([appearance=\"media\"]) .card {\n padding: var(--card-padding-compact);\n }\n }\n\n /* === ALIGNED ROWS: a card in a bd-card-grid, or a bd-grid with\n item-rows, from md ===\n The grid makes this host a subgrid spanning its rows -- icon, title, one\n row per content node, actions (card-grid.css.ts, grid.css.ts) -- and\n the card's box\n spans them too, so every part starts on one line across a row of cards\n however the text above it wraps. Row gaps stay 0 and the spacing inside\n the card is the parts' own. A feature card's icon spans every row of its\n own column; an inline card's icon and title share the first two. */\n @media ${unsafeCSS(above(\"md\"))} {\n .in-grid {\n display: grid;\n grid-template-rows: subgrid;\n grid-row: 1 / -1;\n row-gap: 0;\n align-items: start;\n align-content: start;\n }\n\n .in-grid .media,\n .in-grid .icon {\n grid-row: 1;\n }\n\n .in-grid .heading {\n grid-row: 2;\n }\n\n .in-grid .content {\n display: grid;\n grid-template-rows: subgrid;\n /* every row between the title's and the actions': the content rows\n bd-card-grid counts, or the ones a bd-grid's item-rows leaves */\n grid-row: 3 / -2;\n row-gap: 0;\n align-items: start;\n }\n\n .in-grid.centred .content {\n justify-items: center;\n }\n\n .in-grid .actions {\n grid-row: -2;\n }\n\n :host([appearance=\"feature\"]) .in-grid .icon {\n grid-row: 1 / -1;\n }\n\n :host([appearance=\"inline\"]) .in-grid .icon,\n :host([appearance=\"inline\"]) .in-grid .heading {\n grid-row: 1 / span 2;\n }\n\n /* A media card's picture is positioned over the whole card: placed in\n a row, it would take that row's area for its box and leave the card's\n top inset bare. */\n :host([appearance=\"media\"]) .in-grid .media {\n grid-row: auto;\n }\n }\n`;\n"],"mappings":"A,4DAOA,IAAAA,EAAe,CAAG,m2O"}
|
|
1
|
+
{"version":3,"file":"card.css.js","names":["card_css_default"],"sources":["../../../../src/components/card/card.css.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\nimport { above, below, bodyRole, headingRole, ink } from \"#shared/token-scales.ts\";\n\n/* bd-card's five arrangements. fill and outline are bd-card-item's looks,\n feature is bd-card-features-item's and inline bd-light-carousel-item's\n standard one, each carried over from the stylesheet that drew it and\n measured against that render. */\nexport default css`\n /* The icon's frame, which each appearance sizes below: 48 square on fill,\n the step bd-card-item drew. */\n :host {\n display: block;\n --_icon-width: var(--icon-2xl-size);\n --_icon-height: var(--icon-2xl-size);\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .card {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n min-width: 0;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n text-align: start;\n /* The container ground, or what a tinted bd-card-grid hands its cards:\n the default ground and an edge (CLAUDE.md, A card's ground and its\n edge). */\n background: var(--bd-card-bg, var(--color-surface-container));\n border: var(--bd-card-border, none);\n border-radius: var(--card-radius);\n padding: var(--card-padding);\n font-family: var(--typography-fontFamily-sans);\n }\n\n :host([background=\"tint\"]) .card {\n background: var(--status-brand-surface);\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 /* === MEDIA ===\n A picture the card draws whole, before the icon. Off the media\n appearance it heads the card at the outline icon frame's height and its\n own width, the cards-with-img column's partner logo (DEX-29440): the\n bd-img's own <img> takes the height through --bd-img-height and its\n width follows the logo's proportions, so no logo is cropped. A card\n heads with a picture or an icon: in a bd-card-grid both take the first\n row. */\n .media {\n display: flex;\n padding-bottom: var(--spacing-16);\n }\n\n ::slotted([slot=\"media\"]) {\n flex: none;\n max-width: 100%;\n height: var(--icon-3xl-size);\n }\n\n ::slotted(bd-img[slot=\"media\"]) {\n --bd-img-height: var(--icon-3xl-size);\n }\n\n /* === ICON ===\n The page writes the atom and the card sizes it, on the slotted element\n itself: 3.x cloned the icon into its shadow root and wrote a size on the\n clone. A bd-icon draws its svg at its own height, so the frame's width is\n the icon's size and the padding centres it in a taller frame; a bd-img\n stretches its image to the frame's width and centres it; a bd-mark keeps\n the size its drawing declares, centred in the frame. */\n .icon {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding-bottom: var(--spacing-8);\n }\n\n ::slotted([slot=\"icon\"]) {\n box-sizing: border-box;\n flex: none;\n width: var(--_icon-width);\n height: var(--_icon-height);\n }\n\n ::slotted(bd-icon[slot=\"icon\"]) {\n --bd-icon-size: var(--_icon-width);\n justify-content: center;\n padding-block: calc((var(--_icon-height) - var(--_icon-width)) / 2);\n }\n\n ::slotted(bd-img[slot=\"icon\"]) {\n flex-direction: column;\n justify-content: center;\n }\n\n /* An icon written fit=\"contain\" is drawn whole inside the frame, whatever\n its proportions: its <img> takes the frame's height through\n --bd-img-height as well as its width, and the fit keeps the drawing's\n shape -- the website's shield icons, 65 by 72 and 64 square, all inside\n 48 (DEX-29440). Without it the image keeps the frame's width alone. */\n ::slotted(bd-img[slot=\"icon\"][fit=\"contain\"]) {\n --bd-img-height: 100%;\n }\n\n ::slotted(bd-mark[slot=\"icon\"]) {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n /* === TITLE, BADGE, DESCRIPTION ===\n The badge sits beside the title in every appearance, and the description\n under both. */\n .heading {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-4);\n width: 100%;\n margin-bottom: var(--spacing-8);\n }\n\n .title-row {\n display: flex;\n align-items: center;\n gap: var(--spacing-8);\n }\n\n .title {\n min-width: 0;\n }\n\n .badge {\n display: flex;\n flex: none;\n }\n\n /* The card's title: the h5 role in bold, as all three 3.x cards drew it\n (visual-level=\"h5\" font-weight=\"bold\"), at every 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, which 3.x's font-weight=\"bold\" asked for;\n no heading role carries the h5 size at that weight. */\n --bd-heading-font-weight: var(--typography-fontWeight-bold);\n margin: 0;\n }\n\n /* bd-card-item's subtitle: body-small in muted ink, with no flow margin. */\n ::slotted([slot=\"description\"]) {\n ${unsafeCSS(bodyRole(\"body-small\"))}\n ${unsafeCSS(ink(\"muted\"))}\n --bd-paragraph-margin-bottom: 0;\n }\n\n /* === CONTENT AND ACTIONS === */\n .content {\n flex: 1;\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n\n /* The card's own padding ends it; a closing paragraph's flow margin would\n add 16px inside that padding. Paragraphs before it keep theirs. */\n ::slotted(bd-p:last-child) {\n --bd-paragraph-margin-bottom: 0;\n }\n\n .actions {\n display: flex;\n flex-wrap: wrap;\n align-items: flex-start;\n gap: var(--spacing-8);\n width: 100%;\n margin-top: var(--spacing-16);\n padding-top: var(--spacing-8);\n }\n\n .actions-start {\n justify-content: flex-start;\n }\n\n .actions-center {\n justify-content: center;\n }\n\n .actions-end {\n justify-content: flex-end;\n }\n\n /* === CENTRED: align=\"center\", and every outline card === */\n .centred {\n align-items: center;\n text-align: center;\n }\n\n .centred .icon {\n align-items: center;\n width: 100%;\n }\n\n .centred .media {\n justify-content: center;\n width: 100%;\n }\n\n .centred .title-row {\n justify-content: center;\n }\n\n .centred .content {\n align-items: center;\n }\n\n /* === OUTLINE: a brand edge, a wider inset and a taller icon, centred ===\n The title takes the brand ink and the copy the secondary one. 3.x wrote\n the title's colour on the bd-h host, which paints its own ink, so its\n outline titles rendered in the primary ink; the hook is what reaches it. */\n :host([appearance=\"outline\"]) {\n /* no token: the outline icon frame's width, which 3.x wrote in script; the dimension scale stops at 64 */\n --_icon-width: 65px;\n /* no token: the outline icon frame's height, as above */\n --_icon-height: 75px;\n }\n\n :host([appearance=\"outline\"]) .card {\n border: var(--border-width-2) solid var(--color-border-brand);\n border-radius: var(--shape-radius-2xl);\n padding: var(--spacing-40);\n }\n\n :host([appearance=\"outline\"]) .heading {\n margin-top: var(--spacing-64);\n }\n\n :host([appearance=\"outline\"]) ::slotted(bd-h[slot=\"title\"]),\n :host([appearance=\"outline\"]) ::slotted(bd-display[slot=\"title\"]) {\n ${unsafeCSS(ink(\"primary\"))}\n }\n\n :host([appearance=\"outline\"]) ::slotted([slot=\"description\"]),\n :host([appearance=\"outline\"]) .content ::slotted(*) {\n --bd-paragraph-color: var(--color-text-secondary);\n text-align: center;\n }\n\n /* === FEATURE: the icon in a column beside everything else ===\n bd-card-features-item's row: a 32 icon, 16 from the title, the badge 8\n beside it. Below md the icon stacks over the title, 16 above it. */\n :host([appearance=\"feature\"]),\n :host([appearance=\"inline\"]) {\n --_icon-width: var(--icon-xl-size);\n --_icon-height: var(--icon-xl-size);\n }\n\n :host([appearance=\"feature\"]) .icon {\n padding-bottom: var(--spacing-16);\n }\n\n @media ${unsafeCSS(above(\"md\"))} {\n :host([appearance=\"feature\"]) .card {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr);\n align-items: start;\n align-content: start;\n }\n\n :host([appearance=\"feature\"]) .icon {\n grid-column: 1;\n grid-row: 1 / span 3;\n padding-bottom: 0;\n margin-inline-end: var(--spacing-16);\n }\n\n :host([appearance=\"feature\"]) .heading,\n :host([appearance=\"feature\"]) .content,\n :host([appearance=\"feature\"]) .actions {\n grid-column: 2;\n }\n }\n\n /* === INLINE: the icon in one row with the title and the badge ===\n bd-light-carousel-item's standard header: a 32 icon 8 from the title,\n centred on it and raised 6, the badge 4 beside the title, and 10 above\n and below the title. The copy runs the card's full width under the row,\n and the card takes the compact inset below md, as that item did. */\n :host([appearance=\"inline\"]) .card {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr);\n align-items: start;\n align-content: start;\n }\n\n :host([appearance=\"inline\"]) .icon {\n grid-column: 1;\n align-self: center;\n position: relative;\n bottom: var(--spacing-6);\n padding-bottom: 0;\n margin-inline-end: var(--spacing-8);\n }\n\n :host([appearance=\"inline\"]) .heading {\n grid-column: 2;\n align-self: center;\n margin-bottom: 0;\n }\n\n :host([appearance=\"inline\"]) .title-row {\n gap: var(--spacing-4);\n }\n\n :host([appearance=\"inline\"]) .title {\n padding-block: var(--spacing-10);\n }\n\n :host([appearance=\"inline\"]) .content,\n :host([appearance=\"inline\"]) .actions {\n grid-column: 1 / -1;\n }\n\n @media ${unsafeCSS(below(\"md\"))} {\n :host([appearance=\"inline\"]) .card {\n padding: var(--card-padding-compact);\n }\n }\n\n /* === MEDIA: the parts over the picture, which fills the card ===\n The website's text-over-image columns (DEX-29440): the picture is the\n card's ground and the parts stand at its foot on a scrim that runs from\n clear at the top to the media frame's ground behind the words, so their\n on-media ink holds its contrast whatever the picture. The picture shows\n two thirds of the card's width above the words, which in a bd-card-grid\n keep the grid's rows, so the titles and the copy start on one line\n across the row, as the website's cards do; it draws no edge: the\n picture is its edge. Its title is the h3 role, a headline over the\n picture rather than an item's label, and the copy body-large, as the\n website's card drew them (32/600 and 18). */\n :host([appearance=\"media\"]) .card {\n overflow: hidden;\n background: var(--color-surface-media);\n --bd-heading-color: var(--color-text-on-media);\n --bd-paragraph-color: var(--color-text-on-media);\n }\n\n :host([appearance=\"media\"]) .media {\n position: absolute;\n inset: 0;\n padding: 0;\n }\n\n /* positioned after the picture, so they paint over it in source order */\n :host([appearance=\"media\"]) .icon,\n :host([appearance=\"media\"]) .heading,\n :host([appearance=\"media\"]) .content,\n :host([appearance=\"media\"]) .actions {\n position: relative;\n }\n\n /* the picture's share above the words, in the first row, where an icon\n would be: in a grid the words then keep the rows below it */\n :host([appearance=\"media\"]) .card::before {\n content: \"\";\n flex: none;\n grid-row: 1;\n /* A padding percentage is of the card's width, so this is two thirds of\n it without making the host a size container, whose containment would\n take the card out of the grid's subgrid rows.\n no token: the picture shown above the words, two thirds of the card's width, as the website's text-over-image card drew it (273 of 409) */\n padding-block-start: calc(100% * 2 / 3);\n }\n\n :host([appearance=\"media\"]) .media::after {\n content: \"\";\n position: absolute;\n inset: 0;\n background: linear-gradient(to bottom, transparent, var(--color-surface-media));\n }\n\n :host([appearance=\"media\"]) ::slotted([slot=\"media\"]) {\n width: 100%;\n max-width: none;\n height: 100%;\n }\n\n /* bd-img's own <img> sizes itself from its image, so the cover stretches\n it both ways as a grid item, and its fit (cover by default) keeps the\n picture's proportions (post-card.css.ts) */\n :host([appearance=\"media\"]) ::slotted(bd-img[slot=\"media\"]) {\n --bd-img-height: auto;\n /* the picture's width attribute would hold it at its own width in a\n card wider than that; it fills the card at any width */\n --bd-img-min-width: 100%;\n display: grid;\n grid-template: minmax(0, 1fr) / minmax(0, 1fr);\n align-items: stretch;\n justify-items: stretch;\n }\n\n :host([appearance=\"media\"]) ::slotted(bd-h[slot=\"title\"]),\n :host([appearance=\"media\"]) ::slotted(bd-display[slot=\"title\"]) {\n ${unsafeCSS(headingRole(\"heading-h3\"))}\n }\n\n :host([appearance=\"media\"]) ::slotted([slot=\"description\"]),\n :host([appearance=\"media\"]) .content ::slotted(*) {\n ${unsafeCSS(bodyRole(\"body-large\"))}\n --bd-paragraph-color: var(--color-text-on-media);\n }\n\n /* A bigger title takes the bigger gap: at the heading-h3 role it stands\n 16 over the copy, the section title to content distance\n (Foundations/Spacing/Rhythm), where the h5 card title keeps the item\n distance, 8. */\n :host([appearance=\"media\"]) .heading {\n margin-bottom: var(--spacing-16);\n }\n\n /* the copy keeps its height at the foot */\n :host([appearance=\"media\"]) .content {\n flex: none;\n }\n\n @media ${unsafeCSS(below(\"md\"))} {\n :host([appearance=\"media\"]) .card {\n padding: var(--card-padding-compact);\n }\n }\n\n /* === ALIGNED ROWS: a card in a bd-card-grid, or a bd-grid with\n item-rows, from md ===\n The grid makes this host a subgrid spanning its rows -- icon, title, one\n row per content node, actions (card-grid.css.ts, grid.css.ts) -- and\n the card's box\n spans them too, so every part starts on one line across a row of cards\n however the text above it wraps. Row gaps stay 0 and the spacing inside\n the card is the parts' own. A feature card's icon spans every row of its\n own column; an inline card's icon and title share the first two. */\n @media ${unsafeCSS(above(\"md\"))} {\n .in-grid {\n display: grid;\n grid-template-rows: subgrid;\n grid-row: 1 / -1;\n row-gap: 0;\n align-items: start;\n align-content: start;\n }\n\n .in-grid .media,\n .in-grid .icon {\n grid-row: 1;\n }\n\n .in-grid .heading {\n grid-row: 2;\n }\n\n .in-grid .content {\n display: grid;\n grid-template-rows: subgrid;\n /* every row between the title's and the actions': the content rows\n bd-card-grid counts, or the ones a bd-grid's item-rows leaves */\n grid-row: 3 / -2;\n row-gap: 0;\n align-items: start;\n }\n\n .in-grid.centred .content {\n justify-items: center;\n }\n\n .in-grid .actions {\n grid-row: -2;\n }\n\n :host([appearance=\"feature\"]) .in-grid .icon {\n grid-row: 1 / -1;\n }\n\n :host([appearance=\"inline\"]) .in-grid .icon,\n :host([appearance=\"inline\"]) .in-grid .heading {\n grid-row: 1 / span 2;\n }\n\n /* A media card's picture is positioned over the whole card: placed in\n a row, it would take that row's area for its box and leave the card's\n top inset bare. */\n :host([appearance=\"media\"]) .in-grid .media {\n grid-row: auto;\n }\n }\n`;\n"],"mappings":"A,4DAOA,IAAAA,EAAe,CAAG,s1O"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@repobit/dex-system-design",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.2",
|
|
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",
|
|
@@ -490,5 +490,5 @@
|
|
|
490
490
|
"volta": {
|
|
491
491
|
"node": "24.22.1"
|
|
492
492
|
},
|
|
493
|
-
"gitHead": "
|
|
493
|
+
"gitHead": "f338601384c6a030cc143c7ec1c5cfea9e09a7cc"
|
|
494
494
|
}
|