@repobit/dex-system-design 3.0.2 → 3.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,13 @@
|
|
|
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
|
+
## [3.0.3](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@3.0.2...@repobit/dex-system-design@3.0.3) (2026-11-02)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **DEX-29329:** bd-picture's high-contrast edge reads prefers-contrast: more
|
|
11
|
+
|
|
12
|
+
|
|
6
13
|
## [3.0.2](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@3.0.1...@repobit/dex-system-design@3.0.2) (2026-10-30)
|
|
7
14
|
|
|
8
15
|
### Performance Improvements
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{css as e}from"lit";var t=e`@layer bd-components{.bd-picture,.bd-picture img{max-width:100%;height:auto;display:block}.bd-picture.fit-cover img{object-fit:cover}.bd-picture.fit-contain img{object-fit:contain}.bd-picture.fit-fill img{object-fit:fill}.bd-picture.fit-none img{object-fit:none}.bd-picture.fit-scale-down img{object-fit:scale-down}.bd-picture.radius-none img{border-radius:var(--radius-none)}.bd-picture.radius-sm img{border-radius:var(--shape-radius-sm)}.bd-picture.radius-md img{border-radius:var(--shape-radius-md)}.bd-picture.radius-lg img{border-radius:var(--shape-radius-lg)}.bd-picture.radius-xl img{border-radius:var(--shape-radius-xl)}.bd-picture.radius-2xl img{border-radius:var(--shape-radius-2xl)}.bd-picture.radius-3xl img{border-radius:var(--shape-radius-3xl)}.bd-picture.radius-full img{border-radius:var(--radius-full)}.bd-picture:not([loaded]){background-color:var(--color-surface-muted);min-height:100px;color:var(--color-text-muted);position:relative}.bd-picture:not([loaded]):before{content:var(--bd-img-loading-label,"Loading image");font-size:var(--typography-fontSize-sm);inset:var(--spacing-0);justify-content:center;align-items:center;display:flex;position:absolute}.bd-picture img{transition:opacity var(--transition-duration-slow) var(--transition-easing-smooth), transform var(--transition-duration-slow) var(--transition-easing-smooth)}.bd-picture img[loading=lazy]{opacity:0;transform:scale(.95)}.bd-picture img[loading=lazy][loaded]{opacity:1;transform:scale(1)}@media print{.bd-picture{break-inside:avoid}.bd-picture img{max-width:100%;height:auto}}@media (prefers-contrast:
|
|
1
|
+
import{css as e}from"lit";var t=e`@layer bd-components{.bd-picture,.bd-picture img{max-width:100%;height:auto;display:block}.bd-picture.fit-cover img{object-fit:cover}.bd-picture.fit-contain img{object-fit:contain}.bd-picture.fit-fill img{object-fit:fill}.bd-picture.fit-none img{object-fit:none}.bd-picture.fit-scale-down img{object-fit:scale-down}.bd-picture.radius-none img{border-radius:var(--radius-none)}.bd-picture.radius-sm img{border-radius:var(--shape-radius-sm)}.bd-picture.radius-md img{border-radius:var(--shape-radius-md)}.bd-picture.radius-lg img{border-radius:var(--shape-radius-lg)}.bd-picture.radius-xl img{border-radius:var(--shape-radius-xl)}.bd-picture.radius-2xl img{border-radius:var(--shape-radius-2xl)}.bd-picture.radius-3xl img{border-radius:var(--shape-radius-3xl)}.bd-picture.radius-full img{border-radius:var(--radius-full)}.bd-picture:not([loaded]){background-color:var(--color-surface-muted);min-height:100px;color:var(--color-text-muted);position:relative}.bd-picture:not([loaded]):before{content:var(--bd-img-loading-label,"Loading image");font-size:var(--typography-fontSize-sm);inset:var(--spacing-0);justify-content:center;align-items:center;display:flex;position:absolute}.bd-picture img{transition:opacity var(--transition-duration-slow) var(--transition-easing-smooth), transform var(--transition-duration-slow) var(--transition-easing-smooth)}.bd-picture img[loading=lazy]{opacity:0;transform:scale(.95)}.bd-picture img[loading=lazy][loaded]{opacity:1;transform:scale(1)}@media print{.bd-picture{break-inside:avoid}.bd-picture img{max-width:100%;height:auto}}@media (prefers-contrast:more){.bd-picture img{border:var(--border-width-1) solid currentColor}}@media (prefers-reduced-motion:reduce){.bd-picture img{transition:none}}}`;export{t as default};
|
|
2
2
|
//# sourceMappingURL=picture.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picture.css.js","names":["picture_css_default"],"sources":["../../../../src/components/picture/picture.css.ts"],"sourcesContent":["import { css } from \"lit\";\n\nexport default css`\n @layer bd-components {\n .bd-picture {\n display: block;\n max-width: 100%;\n height: auto;\n }\n\n .bd-picture img {\n display: block;\n max-width: 100%;\n height: auto;\n }\n\n /* Object Fit Classes */\n .bd-picture.fit-cover img {\n object-fit: cover;\n }\n\n .bd-picture.fit-contain img {\n object-fit: contain;\n }\n\n .bd-picture.fit-fill img {\n object-fit: fill;\n }\n\n .bd-picture.fit-none img {\n object-fit: none;\n }\n\n .bd-picture.fit-scale-down img {\n object-fit: scale-down;\n }\n\n /* Radius Classes */\n .bd-picture.radius-none img {\n border-radius: var(--radius-none);\n }\n\n .bd-picture.radius-sm img {\n border-radius: var(--shape-radius-sm);\n }\n\n .bd-picture.radius-md img {\n border-radius: var(--shape-radius-md);\n }\n\n .bd-picture.radius-lg img {\n border-radius: var(--shape-radius-lg);\n }\n\n .bd-picture.radius-xl img {\n border-radius: var(--shape-radius-xl);\n }\n\n .bd-picture.radius-2xl img {\n border-radius: var(--shape-radius-2xl);\n }\n\n .bd-picture.radius-3xl img {\n border-radius: var(--shape-radius-3xl);\n }\n\n .bd-picture.radius-full img {\n border-radius: var(--radius-full);\n }\n\n /* Gone from here, because nothing could reach them: responsive,\n aspect-16-9 / 4-3 / 1-1 and the hover-zoom and hover-lift effects had\n no prop that sets them -- fit is written as fit-*, so\n not even a misspelt fit could produce one. :focus-within ringed a\n <picture> holding nothing focusable. */\n\n /* Loading state.\n\n The label overlays the reserved box instead of sitting beside the image\n in it. This rule used to be display: flex with the ::before as a flex\n sibling of the <img>, so the placeholder's width came out as the label's\n width plus the image's -- measured, with each story served an image at\n its own declared size, the box was exactly 84px too wide every time:\n\n declared 200x150 -> placeholder 284x150 (Fit Variants)\n declared 180x180 -> placeholder 264x180 (Radius Variants)\n declared 300x200 -> placeholder 384x200 (Lazy vs Eager)\n\n 84px is the rendered width of \"Loading image\" at\n --typography-fontSize-sm. So the placeholder reserved a box the shape of\n its own sentence rather than the shape of the image about to arrive, and\n every image narrower than the label jumped left when it loaded: CLS\n 0.0188, 0.0370 and 0.0049 for those three stories. The two stories whose\n images fill the row measured 0.0000, because max-width: 100% pinned both\n states to the same width and hid the flaw.\n\n This was unreachable until the [loaded] flag in picture.ts started being\n set: with the reveal permanently stuck at opacity 0 the image never\n appeared, so nothing ever moved. Taking the label out of flow is what\n keeps that fix from trading an invisible image for a visible jump.\n\n position: absolute on the ::before leaves the <img> -- which carries the\n declared width and height attributes, and therefore an intrinsic box\n before any bytes arrive -- as the only thing sizing the placeholder. */\n .bd-picture:not([loaded]) {\n position: relative;\n background-color: var(--color-surface-muted);\n /* no token: the dimension scale stops at 64px */\n min-height: 100px;\n /* --color-text-muted, not --color-text-disabled. Loading is not disabled,\n and the difference is not academic: the disabled text role carries a\n contrast exemption -- WCAG 1.4.3 excuses disabled controls from the\n 4.5:1 minimum -- and this label claims that exemption without being\n entitled to it. It is a sentence a reader is meant to read while they\n wait.\n\n Measured on this ground: neutral-400 on neutral-100 is 2.51:1, which\n misses even the 3:1 floor for non-text. --color-text-muted is\n neutral-600 at 5.12:1 and is the role this package already uses for\n low-emphasis readable text -- caption and form help text both resolve\n to it.\n\n The ground stays --color-surface-muted. Loading is a state, muted is\n the state surface, and bd-skeleton -- the package's other loading\n affordance -- already sits on it. Only the ink was choosing by value.\n See \"Choosing a semantic role\" in the package README. */\n color: var(--color-text-muted);\n }\n\n /* A local property rather than a string in the stylesheet, so it can be\n translated. It keeps the --bd-img- name it always had, which is the one\n pages already set. */\n .bd-picture:not([loaded])::before {\n content: var(--bd-img-loading-label, \"Loading image\");\n /* no role: the pre-load placeholder -- a glyph/marker/placeholder box, not running\n prose. See list-item.css.ts's .bd-list-item-marker::before for the\n argument. */\n font-size: var(--typography-fontSize-sm);\n position: absolute;\n inset: var(--spacing-0);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n /* Smooth transitions */\n .bd-picture img {\n transition: opacity var(--transition-duration-slow) var(--transition-easing-smooth), transform var(--transition-duration-slow) var(--transition-easing-smooth);\n }\n\n .bd-picture img[loading=\"lazy\"] {\n opacity: 0;\n transform: scale(0.95);\n }\n\n .bd-picture img[loading=\"lazy\"][loaded] {\n opacity: 1;\n transform: scale(1);\n }\n\n /* No will-change. It stood here on every image, at rest as well as\n during the fade, which keeps a compositor layer per image for the life\n of the page to speed up one transition that runs once. The browser\n promotes an element for the length of a transition on its own. */\n\n /* Two @container queries used to sit here, for .mobile-full and\n .tablet-optimized. Neither could ever match: a container query needs an\n ancestor with container-type, and nothing in this component or around it\n declares one, so both rules were dead the day they were written. Nothing\n else in the package referenced .mobile-full or .tablet-optimized either,\n so the rules went and there was nothing else to remove.\n\n If this comes back, the wrapper needs container-type: inline-size and\n the 480px value needs to be on the breakpoint scale, which it was not. */\n\n /* Print styles */\n @media print {\n .bd-picture {\n break-inside: avoid;\n }\n \n .bd-picture img {\n max-width: 100%;\n height: auto;\n }\n }\n\n /*
|
|
1
|
+
{"version":3,"file":"picture.css.js","names":["picture_css_default"],"sources":["../../../../src/components/picture/picture.css.ts"],"sourcesContent":["import { css } from \"lit\";\n\nexport default css`\n @layer bd-components {\n .bd-picture {\n display: block;\n max-width: 100%;\n height: auto;\n }\n\n .bd-picture img {\n display: block;\n max-width: 100%;\n height: auto;\n }\n\n /* Object Fit Classes */\n .bd-picture.fit-cover img {\n object-fit: cover;\n }\n\n .bd-picture.fit-contain img {\n object-fit: contain;\n }\n\n .bd-picture.fit-fill img {\n object-fit: fill;\n }\n\n .bd-picture.fit-none img {\n object-fit: none;\n }\n\n .bd-picture.fit-scale-down img {\n object-fit: scale-down;\n }\n\n /* Radius Classes */\n .bd-picture.radius-none img {\n border-radius: var(--radius-none);\n }\n\n .bd-picture.radius-sm img {\n border-radius: var(--shape-radius-sm);\n }\n\n .bd-picture.radius-md img {\n border-radius: var(--shape-radius-md);\n }\n\n .bd-picture.radius-lg img {\n border-radius: var(--shape-radius-lg);\n }\n\n .bd-picture.radius-xl img {\n border-radius: var(--shape-radius-xl);\n }\n\n .bd-picture.radius-2xl img {\n border-radius: var(--shape-radius-2xl);\n }\n\n .bd-picture.radius-3xl img {\n border-radius: var(--shape-radius-3xl);\n }\n\n .bd-picture.radius-full img {\n border-radius: var(--radius-full);\n }\n\n /* Gone from here, because nothing could reach them: responsive,\n aspect-16-9 / 4-3 / 1-1 and the hover-zoom and hover-lift effects had\n no prop that sets them -- fit is written as fit-*, so\n not even a misspelt fit could produce one. :focus-within ringed a\n <picture> holding nothing focusable. */\n\n /* Loading state.\n\n The label overlays the reserved box instead of sitting beside the image\n in it. This rule used to be display: flex with the ::before as a flex\n sibling of the <img>, so the placeholder's width came out as the label's\n width plus the image's -- measured, with each story served an image at\n its own declared size, the box was exactly 84px too wide every time:\n\n declared 200x150 -> placeholder 284x150 (Fit Variants)\n declared 180x180 -> placeholder 264x180 (Radius Variants)\n declared 300x200 -> placeholder 384x200 (Lazy vs Eager)\n\n 84px is the rendered width of \"Loading image\" at\n --typography-fontSize-sm. So the placeholder reserved a box the shape of\n its own sentence rather than the shape of the image about to arrive, and\n every image narrower than the label jumped left when it loaded: CLS\n 0.0188, 0.0370 and 0.0049 for those three stories. The two stories whose\n images fill the row measured 0.0000, because max-width: 100% pinned both\n states to the same width and hid the flaw.\n\n This was unreachable until the [loaded] flag in picture.ts started being\n set: with the reveal permanently stuck at opacity 0 the image never\n appeared, so nothing ever moved. Taking the label out of flow is what\n keeps that fix from trading an invisible image for a visible jump.\n\n position: absolute on the ::before leaves the <img> -- which carries the\n declared width and height attributes, and therefore an intrinsic box\n before any bytes arrive -- as the only thing sizing the placeholder. */\n .bd-picture:not([loaded]) {\n position: relative;\n background-color: var(--color-surface-muted);\n /* no token: the dimension scale stops at 64px */\n min-height: 100px;\n /* --color-text-muted, not --color-text-disabled. Loading is not disabled,\n and the difference is not academic: the disabled text role carries a\n contrast exemption -- WCAG 1.4.3 excuses disabled controls from the\n 4.5:1 minimum -- and this label claims that exemption without being\n entitled to it. It is a sentence a reader is meant to read while they\n wait.\n\n Measured on this ground: neutral-400 on neutral-100 is 2.51:1, which\n misses even the 3:1 floor for non-text. --color-text-muted is\n neutral-600 at 5.12:1 and is the role this package already uses for\n low-emphasis readable text -- caption and form help text both resolve\n to it.\n\n The ground stays --color-surface-muted. Loading is a state, muted is\n the state surface, and bd-skeleton -- the package's other loading\n affordance -- already sits on it. Only the ink was choosing by value.\n See \"Choosing a semantic role\" in the package README. */\n color: var(--color-text-muted);\n }\n\n /* A local property rather than a string in the stylesheet, so it can be\n translated. It keeps the --bd-img- name it always had, which is the one\n pages already set. */\n .bd-picture:not([loaded])::before {\n content: var(--bd-img-loading-label, \"Loading image\");\n /* no role: the pre-load placeholder -- a glyph/marker/placeholder box, not running\n prose. See list-item.css.ts's .bd-list-item-marker::before for the\n argument. */\n font-size: var(--typography-fontSize-sm);\n position: absolute;\n inset: var(--spacing-0);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n /* Smooth transitions */\n .bd-picture img {\n transition: opacity var(--transition-duration-slow) var(--transition-easing-smooth), transform var(--transition-duration-slow) var(--transition-easing-smooth);\n }\n\n .bd-picture img[loading=\"lazy\"] {\n opacity: 0;\n transform: scale(0.95);\n }\n\n .bd-picture img[loading=\"lazy\"][loaded] {\n opacity: 1;\n transform: scale(1);\n }\n\n /* No will-change. It stood here on every image, at rest as well as\n during the fade, which keeps a compositor layer per image for the life\n of the page to speed up one transition that runs once. The browser\n promotes an element for the length of a transition on its own. */\n\n /* Two @container queries used to sit here, for .mobile-full and\n .tablet-optimized. Neither could ever match: a container query needs an\n ancestor with container-type, and nothing in this component or around it\n declares one, so both rules were dead the day they were written. Nothing\n else in the package referenced .mobile-full or .tablet-optimized either,\n so the rules went and there was nothing else to remove.\n\n If this comes back, the wrapper needs container-type: inline-size and\n the 480px value needs to be on the breakpoint scale, which it was not. */\n\n /* Print styles */\n @media print {\n .bd-picture {\n break-inside: avoid;\n }\n \n .bd-picture img {\n max-width: 100%;\n height: auto;\n }\n }\n\n /* A reader who asks for more contrast gets an edge round each image, so\n a picture on a ground of its own tone keeps its bounds. This read\n (prefers-contrast: high) until 3.0.2: high is not one of the feature's\n values, so no browser could evaluate the query and the edge never\n showed. __tests__/media-conditions.test.ts now fails a query like it. */\n @media (prefers-contrast: more) {\n .bd-picture img {\n border: var(--border-width-1) solid currentColor;\n }\n }\n\n /* Reduced motion support */\n @media (prefers-reduced-motion: reduce) {\n .bd-picture img {\n transition: none;\n }\n }\n\n /* No @media (prefers-color-scheme: dark) block. This was the one atom that\n themed itself in CSS, which is the thing CLAUDE.md says a component must\n never need to do — an atom changes appearance through tokens. The\n placeholder now reads --color-surface-muted and --color-text-muted, so\n whenever a dark theme redefines those on :root it follows without this\n component being touched. */\n }\n`;"],"mappings":"A,0BAEA,IAAAA,EAAe,CAAG,ysD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@repobit/dex-system-design",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.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",
|
|
@@ -410,8 +410,8 @@
|
|
|
410
410
|
"devDependencies": {
|
|
411
411
|
"@chromatic-com/storybook": "^5.6.0",
|
|
412
412
|
"@figma/code-connect": "^2.0.0",
|
|
413
|
-
"@repobit/dex-store": "1.6.
|
|
414
|
-
"@repobit/dex-store-elements": "2.1.
|
|
413
|
+
"@repobit/dex-store": "1.6.55",
|
|
414
|
+
"@repobit/dex-store-elements": "2.1.25",
|
|
415
415
|
"@storybook/addon-docs": "^10.6.5",
|
|
416
416
|
"@storybook/addon-vitest": "^10.6.5",
|
|
417
417
|
"@storybook/web-components-vite": "^10.6.5",
|
|
@@ -424,5 +424,5 @@
|
|
|
424
424
|
"volta": {
|
|
425
425
|
"node": "24.22.1"
|
|
426
426
|
},
|
|
427
|
-
"gitHead": "
|
|
427
|
+
"gitHead": "c43d4967db94d0b8ddb98305a0aa8ccedea3d729"
|
|
428
428
|
}
|