@repobit/dex-system-design 3.0.2 → 3.1.0
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 +24 -0
- package/README.md +35 -0
- package/dist/src/components/agent-endpoints/agent-endpoints.d.ts +1 -0
- package/dist/src/components/agent-endpoints/agent-endpoints.js +12 -12
- package/dist/src/components/agent-endpoints/agent-endpoints.js.map +1 -1
- package/dist/src/components/anchor/anchor-nav.d.ts +2 -1
- package/dist/src/components/anchor/anchor-nav.js +10 -10
- package/dist/src/components/anchor/anchor-nav.js.map +1 -1
- package/dist/src/components/audience-card/audience-card.d.ts +1 -0
- package/dist/src/components/audience-card/audience-card.js +7 -7
- package/dist/src/components/audience-card/audience-card.js.map +1 -1
- package/dist/src/components/awards/awards-flex.d.ts +3 -2
- package/dist/src/components/awards/awards-flex.js +16 -16
- package/dist/src/components/awards/awards-flex.js.map +1 -1
- package/dist/src/components/awards/awards-spotlight.d.ts +2 -1
- package/dist/src/components/awards/awards-spotlight.js +8 -8
- package/dist/src/components/awards/awards-spotlight.js.map +1 -1
- package/dist/src/components/awards/awards.d.ts +1 -1
- package/dist/src/components/bento-grid/bento-grid.d.ts +1 -0
- package/dist/src/components/bento-grid/bento-grid.js +10 -10
- package/dist/src/components/bento-grid/bento-grid.js.map +1 -1
- package/dist/src/components/bento-grid/bento-item.d.ts +1 -0
- package/dist/src/components/bento-grid/bento-item.js +9 -9
- package/dist/src/components/bento-grid/bento-item.js.map +1 -1
- package/dist/src/components/button/button.d.ts +1 -1
- package/dist/src/components/cards/card.d.ts +2 -2
- package/dist/src/components/cards/card.js +11 -11
- package/dist/src/components/cards/card.js.map +1 -1
- package/dist/src/components/carousel/carousel.d.ts +2 -2
- package/dist/src/components/carousel/carousel.js +6 -6
- package/dist/src/components/carousel/carousel.js.map +1 -1
- package/dist/src/components/comparison-panel/comparison-panel.d.ts +1 -0
- package/dist/src/components/comparison-panel/comparison-panel.js +12 -12
- package/dist/src/components/comparison-panel/comparison-panel.js.map +1 -1
- package/dist/src/components/compatibility-table/compatibility-table.d.ts +1 -0
- package/dist/src/components/compatibility-table/compatibility-table.js +14 -14
- package/dist/src/components/compatibility-table/compatibility-table.js.map +1 -1
- package/dist/src/components/cta-banner/cta-banner.d.ts +1 -0
- package/dist/src/components/cta-banner/cta-banner.js +8 -8
- package/dist/src/components/cta-banner/cta-banner.js.map +1 -1
- package/dist/src/components/header/header-code.d.ts +3 -2
- package/dist/src/components/header/header-code.js +13 -13
- package/dist/src/components/header/header-code.js.map +1 -1
- package/dist/src/components/heading/heading.d.ts +1 -1
- package/dist/src/components/heading/heading.js +5 -1
- package/dist/src/components/heading/heading.js.map +1 -1
- package/dist/src/components/hero/hero.d.ts +2 -1
- package/dist/src/components/hero/hero.js +8 -8
- package/dist/src/components/hero/hero.js.map +1 -1
- package/dist/src/components/install-options/install-options.d.ts +3 -2
- package/dist/src/components/install-options/install-options.js +17 -17
- package/dist/src/components/install-options/install-options.js.map +1 -1
- package/dist/src/components/link/link.d.ts +1 -1
- package/dist/src/components/list/list-item/list-item.d.ts +1 -1
- package/dist/src/components/logo-marquee/logo-marquee.d.ts +1 -0
- package/dist/src/components/logo-marquee/logo-marquee.js +5 -5
- package/dist/src/components/logo-marquee/logo-marquee.js.map +1 -1
- package/dist/src/components/motion-art/motion-art.js +1 -1
- package/dist/src/components/motion-art/motion-art.js.map +1 -1
- package/dist/src/components/overview/overview.d.ts +1 -0
- package/dist/src/components/overview/overview.js +7 -7
- package/dist/src/components/overview/overview.js.map +1 -1
- package/dist/src/components/page-switcher/page-switcher.d.ts +1 -0
- package/dist/src/components/page-switcher/page-switcher.js +5 -5
- package/dist/src/components/page-switcher/page-switcher.js.map +1 -1
- package/dist/src/components/pagination-dots/pagination-dots.d.ts +1 -1
- package/dist/src/components/partner-banner/partner-banner.d.ts +1 -0
- package/dist/src/components/partner-banner/partner-banner.js +6 -6
- package/dist/src/components/partner-banner/partner-banner.js.map +1 -1
- package/dist/src/components/picture/picture.css.js +1 -1
- package/dist/src/components/picture/picture.css.js.map +1 -1
- package/dist/src/components/post-card/post-card.d.ts +1 -0
- package/dist/src/components/post-card/post-card.js +5 -5
- package/dist/src/components/post-card/post-card.js.map +1 -1
- package/dist/src/components/process-steps/process-steps.d.ts +1 -0
- package/dist/src/components/process-steps/process-steps.js +7 -7
- package/dist/src/components/process-steps/process-steps.js.map +1 -1
- package/dist/src/components/quick-answer/quick-answer.d.ts +1 -0
- package/dist/src/components/quick-answer/quick-answer.js +7 -7
- package/dist/src/components/quick-answer/quick-answer.js.map +1 -1
- package/dist/src/components/review/review-grid.d.ts +1 -0
- package/dist/src/components/review/review-grid.js +3 -3
- package/dist/src/components/review/review-grid.js.map +1 -1
- package/dist/src/components/review/review.d.ts +1 -0
- package/dist/src/components/review/review.js +2 -2
- package/dist/src/components/review/review.js.map +1 -1
- package/dist/src/components/section-header/section-header.d.ts +1 -0
- package/dist/src/components/section-header/section-header.js +3 -3
- package/dist/src/components/section-header/section-header.js.map +1 -1
- package/dist/src/components/shared/controller.observer.d.ts +50 -0
- package/dist/src/components/shared/controller.observer.js +2 -0
- package/dist/src/components/shared/controller.observer.js.map +1 -0
- package/dist/src/components/spotlight-section/spotlight-section.d.ts +1 -0
- package/dist/src/components/spotlight-section/spotlight-section.js +7 -7
- package/dist/src/components/spotlight-section/spotlight-section.js.map +1 -1
- package/dist/src/components/stat/stat-highlight.d.ts +5 -5
- package/dist/src/components/stat/stat-highlight.js +2 -2
- package/dist/src/components/stat/stat-highlight.js.map +1 -1
- package/dist/src/components/stat/stat-tile.d.ts +1 -0
- package/dist/src/components/stat/stat-tile.js +5 -5
- package/dist/src/components/stat/stat-tile.js.map +1 -1
- package/dist/src/components/terminal/terminal-cursor.d.ts +1 -0
- package/dist/src/components/terminal/terminal-cursor.js +1 -1
- package/dist/src/components/terminal/terminal-cursor.js.map +1 -1
- package/dist/src/components/terminal/terminal-message.d.ts +4 -3
- package/dist/src/components/terminal/terminal-message.js +25 -25
- package/dist/src/components/terminal/terminal-message.js.map +1 -1
- package/dist/src/components/tooltip/tooltip.js +1 -1
- package/dist/src/components/tooltip/tooltip.js.map +1 -1
- package/dist/src/components/trust-panel/trust-panel.d.ts +1 -0
- package/dist/src/components/trust-panel/trust-panel.js +19 -19
- package/dist/src/components/trust-panel/trust-panel.js.map +1 -1
- package/dist/src/loader/create-loader.d.ts +13 -0
- package/dist/src/loader/create-loader.js +2 -0
- package/dist/src/loader/create-loader.js.map +1 -0
- package/dist/src/loader/loader.d.ts +44 -0
- package/dist/src/loader/loader.js +2 -0
- package/dist/src/loader/loader.js.map +1 -0
- package/dist/src/loader/registry.d.ts +2 -0
- package/dist/src/loader/registry.js +2 -0
- package/dist/src/loader/registry.js.map +1 -0
- package/dist/src/tokens/tokens.js +1 -1
- package/dist/src/tokens/tokens.js.map +1 -1
- package/package.json +14 -6
- package/schemas/component-manifest.json +1 -1
- package/dist/src/tokens/dark-derivation.d.ts +0 -70
- package/dist/src/tokens/dark-derivation.js +0 -2
- package/dist/src/tokens/dark-derivation.js.map +0 -1
- package/dist/src/tokens/dark-findings.d.ts +0 -59
- package/dist/src/tokens/dark-findings.js +0 -2
- package/dist/src/tokens/dark-findings.js.map +0 -1
- package/dist/src/tokens/story-chrome.d.ts +0 -72
- package/dist/src/tokens/story-chrome.js +0 -292
- package/dist/src/tokens/story-chrome.js.map +0 -1
- package/dist/src/tokens/token-map.d.ts +0 -114
- package/dist/src/tokens/token-map.js +0 -2
- package/dist/src/tokens/token-map.js.map +0 -1
- package/dist/src/tokens/token-purposes.d.ts +0 -63
- package/dist/src/tokens/token-purposes.js +0 -2
- package/dist/src/tokens/token-purposes.js.map +0 -1
- package/dist/src/tokens/type-ceiling-words.d.ts +0 -96
- package/dist/src/tokens/type-ceiling-words.js +0 -2
- package/dist/src/tokens/type-ceiling-words.js.map +0 -1
|
@@ -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"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{defineElement as e}from"../shared/define-element.js";import
|
|
1
|
+
import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import{isOneOf as n}from"../shared/prop-vocabulary.js";import"../icons/arrow-icon.js";import"../badge/badge.js";import{postCardCSS as r}from"./post-card.css.js";import{LitElement as i,nothing as a}from"lit";import{property as o}from"lit/decorators.js";import{html as s,literal as c}from"lit/static-html.js";var l=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],u={h1:c`h1`,h2:c`h2`,h3:c`h3`,h4:c`h4`,h5:c`h5`,h6:c`h6`},d=class extends i{constructor(...e){super(...e),this.href=``,this.heading=``,this.badge=``,this.image=``,this.imageAlt=``,this.readMore=`Read more`,this.as=`h3`}static{this.styles=[r]}willUpdate(e){e.has(`as`)&&!n(l,this.as)&&(this.as=`h3`)}_renderHeading(){let e=this.href?s`<a class="link" href="${this.href}">${this.heading}</a>`:this.heading,t=u[this.as];return s`<${t} class="heading">${e}</${t}>`}render(){return s`
|
|
2
2
|
<article class="card">
|
|
3
3
|
<div class="cover">
|
|
4
4
|
<slot name="image">
|
|
5
|
-
${this.image?
|
|
5
|
+
${this.image?s`<img src="${this.image}" alt="${this.imageAlt}" loading="lazy">`:a}
|
|
6
6
|
</slot>
|
|
7
|
-
${this.badge?
|
|
7
|
+
${this.badge?s`<bd-badge class="badge" tone="info" variant="shade" size="sm">${this.badge}</bd-badge>`:a}
|
|
8
8
|
</div>
|
|
9
9
|
<div class="body">
|
|
10
10
|
${this._renderHeading()}
|
|
11
|
-
${this.href?
|
|
11
|
+
${this.href?s`<span class="more" aria-hidden="true">${this.readMore}<bd-arrow-icon size="sm"></bd-arrow-icon></span>`:a}
|
|
12
12
|
</div>
|
|
13
13
|
</article>
|
|
14
|
-
`}};
|
|
14
|
+
`}};t([o({type:String})],d.prototype,`href`,void 0),t([o({type:String})],d.prototype,`heading`,void 0),t([o({type:String})],d.prototype,`badge`,void 0),t([o({type:String})],d.prototype,`image`,void 0),t([o({type:String,attribute:`image-alt`})],d.prototype,`imageAlt`,void 0),t([o({type:String,attribute:`read-more`})],d.prototype,`readMore`,void 0),t([o({type:String})],d.prototype,`as`,void 0),d=t([e(`bd-post-card`)],d);export{d as PostCard};
|
|
15
15
|
//# sourceMappingURL=post-card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-card.js","names":["_decorate","__decorate","html$1","HEADING_TAGS","TAGS","PostCard","LitElement","_args","
|
|
1
|
+
{"version":3,"file":"post-card.js","names":["_decorate","__decorate","html$1","HEADING_TAGS","TAGS","PostCard","LitElement","_args","postCardCSS","changed","isOneOf","text","tag","nothing","property","defineElement"],"sources":["../../../../src/components/post-card/post-card.ts"],"sourcesContent":["import { LitElement, nothing, type PropertyValues } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { html, literal } from \"lit/static-html.js\";\nimport { defineElement } from \"#shared/define-element.ts\";\nimport { isOneOf } from \"#shared/prop-vocabulary.ts\";\n// Installs the design tokens into document scope; see src/tokens/tokens.ts\nimport \"#tokens/tokens.ts\";\nimport \"#components/badge/badge.ts\";\nimport \"#components/icons/arrow-icon.ts\";\nimport { postCardCSS } from \"./post-card.css.ts\";\n\n/* Every level, as bd-audience-card, bd-partner-banner and\n bd-awards-spotlight take: the outline is the page's to compose. This took\n h2 to h5, and h1 or h6 rendered an h3 without a word. */\nconst HEADING_TAGS = [\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\"] as const;\ntype HeadingTag = typeof HEADING_TAGS[number];\nconst TAGS = {\n h1: literal`h1`, h2: literal`h2`, h3: literal`h3`, h4: literal`h4`, h5: literal`h5`, h6: literal`h6`\n} as const satisfies Record<HeadingTag, unknown>;\n\n/**\n * An article card for a feed of posts: a cover with a category badge laid\n * over it, the title and a \"Read more\" with an arrow. The homepage's Latest\n * insights; drawn in the foundation Figma file as Post card.\n *\n * One link per card. The title is the link and its box is stretched over the\n * whole card, so a click anywhere follows it; \"Read more\" is the visual cue\n * and is hidden from a screen reader, which would otherwise hear the same\n * destination twice per card, three cards a row.\n *\n * Not blog-related-articles, which lives in the blog sub-system outside the\n * token system and has no \"Read more\" and no row form. Between md and lg\n * the card is a row, the cover on the left.\n */\n@defineElement(\"bd-post-card\")\nexport class PostCard extends LitElement {\n static styles = [postCardCSS];\n\n @property({ type: String })\n href = \"\";\n @property({ type: String })\n heading = \"\";\n @property({ type: String })\n badge = \"\";\n @property({ type: String })\n image = \"\";\n // the cover illustrates the title beside it, so it is decorative by default\n @property({ type: String, attribute: \"image-alt\" })\n imageAlt = \"\";\n @property({ type: String, attribute: \"read-more\" })\n readMore = \"Read more\";\n @property({ type: String })\n as: HeadingTag = \"h3\";\n\n willUpdate(changed: PropertyValues<this>) {\n if (changed.has(\"as\") && !isOneOf(HEADING_TAGS, this.as)) this.as = \"h3\";\n }\n\n _renderHeading() {\n const text = this.href\n ? html`<a class=\"link\" href=\"${this.href}\">${this.heading}</a>`\n : this.heading;\n const tag = TAGS[this.as];\n return html`<${tag} class=\"heading\">${text}</${tag}>`;\n }\n\n render() {\n return html`\n <article class=\"card\">\n <div class=\"cover\">\n <slot name=\"image\">\n ${this.image ? html`<img src=\"${this.image}\" alt=\"${this.imageAlt}\" loading=\"lazy\">` : nothing}\n </slot>\n ${this.badge\n ? html`<bd-badge class=\"badge\" tone=\"info\" variant=\"shade\" size=\"sm\">${this.badge}</bd-badge>`\n : nothing}\n </div>\n <div class=\"body\">\n ${this._renderHeading()}\n ${this.href\n ? html`<span class=\"more\" aria-hidden=\"true\">${this.readMore}<bd-arrow-icon size=\"sm\"></bd-arrow-icon></span>`\n : nothing}\n </div>\n </article>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-post-card\": PostCard;\n }\n}\n"],"mappings":"A,wdAcA,IAAMG,EAAe,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,IAAI,EAElDC,EAAO,CACX,GAAI,CAAO,KAAM,GAAI,CAAO,KAAM,GAAI,CAAO,KAAM,GAAI,CAAO,KAAM,GAAI,CAAO,KAAM,GAAI,CAAO,IAClG,EAiBaC,EAAN,cAAuBC,CAAW,C,8BAIhC,KAAA,KAAA,GAEG,KAAA,QAAA,GAEF,KAAA,MAAA,GAEA,KAAA,MAAA,GAGG,KAAA,SAAA,GAEA,KAAA,SAAA,YAEM,KAAA,GAAA,I,QAhBD,KAAA,OAAA,CAACE,CAAW,C,CAkB5B,WAAW,EAA+B,CACpCC,EAAQ,IAAI,IAAI,GAAK,CAACC,EAAQP,EAAc,KAAK,EAAE,IAAG,KAAK,GAAK,KACtE,CAEA,gBAAiB,CACf,IAAMQ,EAAO,KAAK,KACd,CAAI,yBAAyB,KAAK,KAAK,IAAI,KAAK,QAAQ,MACxD,KAAK,QACHC,EAAMR,EAAK,KAAK,IACtB,MAAO,EAAI,IAAIQ,EAAI,mBAAmBD,EAAK,IAAIC,EAAI,EACrD,CAEA,QAAS,CACP,MAAO,EAAI;;;;cAID,KAAK,MAAQ,CAAI,aAAa,KAAK,MAAM,SAAS,KAAK,SAAS,mBAAqBC,EAAQ;;YAE/F,KAAK,MACH,CAAI,iEAAiE,KAAK,MAAM,aAChFA,EAAQ;;;YAGV,KAAK,eAAe,EAAE;YACtB,KAAK,KACH,CAAI,yCAAyC,KAAK,SAAS,kDAC3DA,EAAQ;;;KAIpB,CACF,EAhDGb,EAAA,CAAAc,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAT,EAAA,UAAA,OAAA,IAAA,EAAA,EAEzBL,EAAA,CAAAc,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAT,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzBL,EAAA,CAAAc,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAT,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBL,EAAA,CAAAc,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAT,EAAA,UAAA,QAAA,IAAA,EAAA,EAGzBL,EAAA,CAAAc,EAAS,CAAE,KAAM,OAAQ,UAAW,WAAY,CAAC,CAAA,EAAAT,EAAA,UAAA,WAAA,IAAA,EAAA,EAEjDL,EAAA,CAAAc,EAAS,CAAE,KAAM,OAAQ,UAAW,WAAY,CAAC,CAAA,EAAAT,EAAA,UAAA,WAAA,IAAA,EAAA,EAEjDL,EAAA,CAAAc,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAT,EAAA,UAAA,KAAA,IAAA,EAAA,EAjB3B,EAAAL,EAAA,CAAAe,EAAc,cAAc,CAAA,EAAAV,CAAA,E"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import{defineElement as e}from"../shared/define-element.js";import
|
|
1
|
+
import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import"../heading/heading.js";import"../paragraph/paragraph.js";import{ensembleCSS as n}from"../shared/ensemble.css.js";import"../icons/close-icon.js";import"../icons/globe-icon.js";import"../icons/guide-icon.js";import r from"./process-steps.css.js";import{LitElement as i,html as a,nothing as o}from"lit";import{property as s}from"lit/decorators.js";var c=class extends i{constructor(...e){super(...e),this.title=``,this.description=``,this.steps=[]}static{this.styles=[n,r]}_renderIcon(e){return e?typeof e==`string`?a`<img src="${e}" alt="" class="bd-processsteps-icon-img" />`:e:o}render(){return a`
|
|
2
2
|
<div class="bd-ensemble bd-processsteps-container">
|
|
3
|
-
${this.title?
|
|
3
|
+
${this.title?a`
|
|
4
4
|
<bd-h as="h2" color="inverse" class="bd-processsteps-title">
|
|
5
5
|
<slot name="title">${this.title}</slot>
|
|
6
6
|
</bd-h>
|
|
7
|
-
`:
|
|
7
|
+
`:o}
|
|
8
8
|
|
|
9
|
-
${this.description?
|
|
9
|
+
${this.description?a`
|
|
10
10
|
<bd-p variant="regular" class="bd-processsteps-description">
|
|
11
11
|
<slot name="description">${this.description}</slot>
|
|
12
12
|
</bd-p>
|
|
13
|
-
`:
|
|
13
|
+
`:o}
|
|
14
14
|
|
|
15
15
|
<div class="bd-processsteps-grid">
|
|
16
|
-
${this.steps.map(e=>
|
|
16
|
+
${this.steps.map(e=>a`
|
|
17
17
|
<div class="bd-processsteps-step">
|
|
18
18
|
<div class="bd-processsteps-divider"></div>
|
|
19
19
|
<div class="bd-processsteps-icon-wrap">${this._renderIcon(e.icon)}</div>
|
|
@@ -25,5 +25,5 @@ import{defineElement as e}from"../shared/define-element.js";import{tokens as t}f
|
|
|
25
25
|
|
|
26
26
|
<slot name="steps"></slot>
|
|
27
27
|
</div>
|
|
28
|
-
`}};
|
|
28
|
+
`}};t([s({type:String})],c.prototype,`title`,void 0),t([s({type:String})],c.prototype,`description`,void 0),t([s({type:Array})],c.prototype,`steps`,void 0),c=t([e(`bd-process-steps`)],c);
|
|
29
29
|
//# sourceMappingURL=process-steps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-steps.js","names":["processStepsCSS","_decorate","__decorate","process_steps_css_default","ProcessSteps","LitElement","_args","
|
|
1
|
+
{"version":3,"file":"process-steps.js","names":["processStepsCSS","_decorate","__decorate","process_steps_css_default","ProcessSteps","LitElement","_args","ensembleCSS","icon","nothing","step","property","defineElement"],"sources":["../../../../src/components/process-steps/process-steps.ts"],"sourcesContent":["import { LitElement, html, nothing, type TemplateResult } 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 \"#components/heading/heading.ts\";\nimport \"#components/icons/close-icon.ts\";\nimport \"#components/icons/globe-icon.ts\";\nimport \"#components/icons/guide-icon.ts\";\nimport \"#components/paragraph/paragraph.ts\";\nimport processStepsCSS from \"./process-steps.css.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\n\ninterface ProcessStep {\n icon? : TemplateResult | string;\n title : string;\n description: string;\n}\n\n@defineElement(\"bd-process-steps\")\nclass ProcessSteps extends LitElement {\n static styles = [ensembleCSS, processStepsCSS];\n\n @property({ type: String })\n title = \"\";\n @property({ type: String })\n description = \"\";\n @property({ type: Array })\n steps: ProcessStep[] = []; // [{ icon: TemplateResult|String, title: String, description: String }]\n\n _renderIcon(icon: ProcessStep[\"icon\"]) {\n if (!icon) return nothing;\n if (typeof icon === \"string\") {\n return html`<img src=\"${icon}\" alt=\"\" class=\"bd-processsteps-icon-img\" />`;\n }\n return icon;\n }\n\n /* color=\"inverse\" on both headings, because this module paints its own dark\n surface: process-steps.css.ts fills the section with\n linear-gradient(160deg, --color-neutral-800, #0b1626) and sets\n color: --color-text-inverse on the container.\n\n That container colour never reached the headings. bd-h sets its own colour\n inside its shadow root, so an inherited value cannot win: measured on the\n dark gradient, every bd-h rendered rgb(21, 23, 25) -- near-black ink on a\n near-black surface, about 1.0:1 -- while bd-p beside it correctly used\n --color-text-muted-inverse at rgb(166, 173, 180) and stayed readable. The\n section title and all three step titles were effectively invisible; it is\n visible in a screenshot and was measured to confirm it.\n\n bd-h already exposes the colour role, and footer-links-group does exactly\n this on the footer's dark surface, so this is the module selecting the\n right configuration for the surface it chose -- not a change to bd-h. */\n render() {\n return html`\n <div class=\"bd-ensemble bd-processsteps-container\">\n ${this.title\n ? html`\n <bd-h as=\"h2\" color=\"inverse\" class=\"bd-processsteps-title\">\n <slot name=\"title\">${this.title}</slot>\n </bd-h>\n `\n : nothing}\n\n ${this.description\n ? html`\n <bd-p variant=\"regular\" class=\"bd-processsteps-description\">\n <slot name=\"description\">${this.description}</slot>\n </bd-p>\n `\n : nothing}\n\n <div class=\"bd-processsteps-grid\">\n ${this.steps.map(\n (step) => html`\n <div class=\"bd-processsteps-step\">\n <div class=\"bd-processsteps-divider\"></div>\n <div class=\"bd-processsteps-icon-wrap\">${this._renderIcon(step.icon)}</div>\n <bd-h as=\"h4\" color=\"inverse\" class=\"bd-processsteps-step-title\">${step.title}</bd-h>\n <bd-p variant=\"regular\" class=\"bd-processsteps-step-description\">${step.description}</bd-p>\n </div>\n `\n )}\n </div>\n\n <slot name=\"steps\"></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-process-steps\": ProcessSteps;\n }\n}"],"mappings":"A,qgBAmBA,IACMI,EADN,cAC2BC,CAAW,C,8BAI5B,KAAA,MAAA,GAEM,KAAA,YAAA,GAES,KAAA,MAAA,CAAC,C,QAPR,KAAA,OAAA,CAACE,EAAaP,CAAe,C,CAS7C,YAAY,EAA2B,CAKrC,OAJKQ,EACD,OAAOA,GAAS,SACX,CAAI,aAAaA,EAAK,8CAExBA,EAJWC,CAKpB,CAkBA,QAAS,CACP,MAAO,EAAI;;UAEL,KAAK,MACH,CAAI;;qCAEqB,KAAK,MAAM;;cAGpCA,EAAQ;;UAEV,KAAK,YACH,CAAI;;2CAE2B,KAAK,YAAY;;cAGhDA,EAAQ;;;YAGR,KAAK,MAAM,IACV,GAAS,CAAI;;;yDAG+B,KAAK,YAAYC,EAAK,IAAI,EAAE;mFACFA,EAAK,MAAM;mFACXA,EAAK,YAAY;;aAG1F,EAAE;;;;;KAMV,CACF,EAnEGT,EAAA,CAAAU,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAP,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAU,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAP,EAAA,UAAA,cAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAU,EAAS,CAAE,KAAM,KAAM,CAAC,CAAA,EAAAP,EAAA,UAAA,QAAA,IAAA,EAAA,EAR1B,EAAAH,EAAA,CAAAW,EAAc,kBAAkB,CAAA,EAAAR,CAAA"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{defineElement as e}from"../shared/define-element.js";import
|
|
1
|
+
import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import"../paragraph/paragraph.js";import"../divider/divider-horizontal.js";import n from"./quick-answer.css.js";import{LitElement as r,html as i,nothing as a}from"lit";import{property as o}from"lit/decorators.js";var s=class extends r{constructor(...e){super(...e),this.label=`Quick answer`,this.text=``,this.items=[]}static{this.styles=[n]}render(){return i`
|
|
2
2
|
<div class="bd-quickanswer-container">
|
|
3
|
-
${this.label?
|
|
3
|
+
${this.label?i`
|
|
4
4
|
<bd-p variant="regular" font-weight="medium" class="bd-quickanswer-label">
|
|
5
5
|
<slot name="label">${this.label}</slot>
|
|
6
6
|
</bd-p>
|
|
7
|
-
`:
|
|
7
|
+
`:a}
|
|
8
8
|
|
|
9
9
|
<bd-p variant="large" class="bd-quickanswer-text">
|
|
10
10
|
<slot name="text">${this.text}</slot>
|
|
@@ -12,21 +12,21 @@ import{defineElement as e}from"../shared/define-element.js";import{tokens as t}f
|
|
|
12
12
|
|
|
13
13
|
<slot></slot>
|
|
14
14
|
|
|
15
|
-
${this.items&&this.items.length?
|
|
15
|
+
${this.items&&this.items.length?i`
|
|
16
16
|
<bd-divider-horizontal
|
|
17
17
|
class="bd-quickanswer-divider"
|
|
18
18
|
color="brand-subtle"
|
|
19
19
|
opacity="1"
|
|
20
20
|
></bd-divider-horizontal>
|
|
21
21
|
<div class="bd-quickanswer-meta">
|
|
22
|
-
${this.items.map(e=>
|
|
22
|
+
${this.items.map(e=>i`
|
|
23
23
|
<span class="bd-quickanswer-meta-item">
|
|
24
24
|
<span class="bd-quickanswer-meta-label">${e.label}</span>
|
|
25
25
|
<span class="bd-quickanswer-meta-value">${e.value}</span>
|
|
26
26
|
</span>
|
|
27
27
|
`)}
|
|
28
28
|
</div>
|
|
29
|
-
`:
|
|
29
|
+
`:a}
|
|
30
30
|
</div>
|
|
31
|
-
`}};
|
|
31
|
+
`}};t([o({type:String})],s.prototype,`label`,void 0),t([o({type:String})],s.prototype,`text`,void 0),t([o({type:Array})],s.prototype,`items`,void 0),s=t([e(`bd-quick-answer`)],s);
|
|
32
32
|
//# sourceMappingURL=quick-answer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quick-answer.js","names":["quickAnswerCSS","_decorate","__decorate","quick_answer_css_default","QuickAnswer","LitElement","_args","
|
|
1
|
+
{"version":3,"file":"quick-answer.js","names":["quickAnswerCSS","_decorate","__decorate","quick_answer_css_default","QuickAnswer","LitElement","_args","nothing","item","property","defineElement"],"sources":["../../../../src/components/quick-answer/quick-answer.ts"],"sourcesContent":["import { LitElement, html, nothing } 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 \"#components/paragraph/paragraph.ts\";\nimport quickAnswerCSS from \"./quick-answer.css.ts\";\nimport \"#components/divider/divider-horizontal.ts\";\n\ninterface QuickAnswerItem {\n label: string;\n value: string;\n}\n\n@defineElement(\"bd-quick-answer\")\nclass QuickAnswer extends LitElement {\n static styles = [quickAnswerCSS];\n\n @property({ type: String })\n label = \"Quick answer\";\n @property({ type: String })\n text = \"\";\n @property({ type: Array })\n items: QuickAnswerItem[] = []; // [{ label: String, value: String }]\n\n render() {\n return html`\n <div class=\"bd-quickanswer-container\">\n ${this.label\n ? html`\n <bd-p variant=\"regular\" font-weight=\"medium\" class=\"bd-quickanswer-label\">\n <slot name=\"label\">${this.label}</slot>\n </bd-p>\n `\n : nothing}\n\n <bd-p variant=\"large\" class=\"bd-quickanswer-text\">\n <slot name=\"text\">${this.text}</slot>\n </bd-p>\n\n <slot></slot>\n\n ${this.items && this.items.length\n ? html`\n <bd-divider-horizontal\n class=\"bd-quickanswer-divider\"\n color=\"brand-subtle\"\n opacity=\"1\"\n ></bd-divider-horizontal>\n <div class=\"bd-quickanswer-meta\">\n ${this.items.map(\n (item) => html`\n <span class=\"bd-quickanswer-meta-item\">\n <span class=\"bd-quickanswer-meta-label\">${item.label}</span>\n <span class=\"bd-quickanswer-meta-value\">${item.value}</span>\n </span>\n `\n )}\n </div>\n `\n : nothing}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-quick-answer\": QuickAnswer;\n }\n}"],"mappings":"A,0XAcA,IACMI,EADN,cAC0BC,CAAW,C,8BAI3B,KAAA,MAAA,eAED,KAAA,KAAA,GAEoB,KAAA,MAAA,CAAC,C,QAPZ,KAAA,OAAA,CAACL,CAAc,C,CAS/B,QAAS,CACP,MAAO,EAAI;;UAEL,KAAK,MACH,CAAI;;qCAEqB,KAAK,MAAM;;cAGpCO,EAAQ;;;8BAGU,KAAK,KAAK;;;;;UAK9B,KAAK,OAAS,KAAK,MAAM,OACvB,CAAI;;;;;;;kBAOE,KAAK,MAAM,IACV,GAAS,CAAI;;gEAEgCC,EAAK,MAAM;gEACXA,EAAK,MAAM;;mBAG3D,EAAE;;cAGND,EAAQ;;KAGlB,CACF,EA9CGN,EAAA,CAAAQ,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAL,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAQ,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAL,EAAA,UAAA,OAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAQ,EAAS,CAAE,KAAM,KAAM,CAAC,CAAA,EAAAL,EAAA,UAAA,QAAA,IAAA,EAAA,EAR1B,EAAAH,EAAA,CAAAS,EAAc,iBAAiB,CAAA,EAAAN,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{defineElement as e}from"../shared/define-element.js";import
|
|
1
|
+
import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import"../heading/heading.js";import{ensembleCSS as n}from"../shared/ensemble.css.js";import r from"./review-grid.css.js";import"./review.js";import{LitElement as i,html as a,nothing as o}from"lit";import{property as s,state as c}from"lit/decorators.js";var l=class extends i{constructor(...e){super(...e),this.title=``,this._columns=3}static{this.styles=[n,r]}get _items(){return[...this.children].filter(e=>e.tagName===`BD-REVIEW`)}_onSlotChange(){let e=this._items.length;this._columns=e<=0?1:Math.min(e,3)}render(){let e=this._columns===1;return a`
|
|
2
2
|
<div class="bd-ensemble">
|
|
3
|
-
${this.title?
|
|
3
|
+
${this.title?a`<bd-h as="h2" class="bd-reviewgrid-title"><slot name="title">${this.title}</slot></bd-h>`:o}
|
|
4
4
|
|
|
5
5
|
<div
|
|
6
6
|
class="bd-reviewgrid-grid ${e?`bd-reviewgrid-grid--single`:``}"
|
|
@@ -10,5 +10,5 @@ import{defineElement as e}from"../shared/define-element.js";import{tokens as t}f
|
|
|
10
10
|
<slot @slotchange=${this._onSlotChange}></slot>
|
|
11
11
|
</div>
|
|
12
12
|
</div>
|
|
13
|
-
`}};
|
|
13
|
+
`}};t([s({type:String})],l.prototype,`title`,void 0),t([c()],l.prototype,`_columns`,void 0),l=t([e(`bd-review-grid`)],l);
|
|
14
14
|
//# sourceMappingURL=review-grid.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-grid.js","names":["reviewGridCSS","_decorate","__decorate","review_grid_css_default","BdReviewGrid","LitElement","_args","
|
|
1
|
+
{"version":3,"file":"review-grid.js","names":["reviewGridCSS","_decorate","__decorate","review_grid_css_default","BdReviewGrid","LitElement","_args","ensembleCSS","el","count","singleCard","nothing","property","state","defineElement"],"sources":["../../../../src/components/review/review-grid.ts"],"sourcesContent":["import { LitElement, html, nothing } from \"lit\";\nimport { property, state } 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 \"#components/heading/heading.ts\";\nimport reviewGridCSS from \"./review-grid.css.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\nimport \"./review.ts\";\n\n\n@defineElement(\"bd-review-grid\")\nclass BdReviewGrid extends LitElement {\n static styles = [ensembleCSS, reviewGridCSS];\n\n @property({ type: String })\n title = \"\";\n @state()\n _columns = 3;\n\n get _items() {\n return [...this.children].filter((el) => el.tagName === \"BD-REVIEW\");\n }\n\n /* The grid is a list (role=\"list\" below), and each bd-review in it says it\n is one of its items itself (review.ts). */\n _onSlotChange() {\n const count = this._items.length;\n this._columns = count <= 0 ? 1 : Math.min(count, 3);\n }\n\n render() {\n const singleCard = this._columns === 1;\n\n return html`\n <div class=\"bd-ensemble\">\n ${this.title\n ? html`<bd-h as=\"h2\" class=\"bd-reviewgrid-title\"><slot name=\"title\">${this.title}</slot></bd-h>`\n : nothing}\n\n <div\n class=\"bd-reviewgrid-grid ${singleCard ? \"bd-reviewgrid-grid--single\" : \"\"}\"\n style=\"--bd-review-columns: ${this._columns};\"\n role=\"list\"\n >\n <slot @slotchange=${this._onSlotChange}></slot>\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-review-grid\": BdReviewGrid;\n }\n}"],"mappings":"A,maAWA,IACMI,EADN,cAC2BC,CAAW,C,8BAI5B,KAAA,MAAA,GAEG,KAAA,SAAA,C,QALK,KAAA,OAAA,CAACE,EAAaP,CAAa,C,CAO3C,IAAI,QAAS,CACX,MAAO,CAAC,GAAG,KAAK,QAAQ,CAAC,CAAC,OAAQ,GAAOQ,EAAG,UAAY,WAAW,CACrE,CAIA,eAAgB,CACd,IAAMC,EAAQ,KAAK,OAAO,OAC1B,KAAK,SAAWA,GAAS,EAAI,EAAI,KAAK,IAAIA,EAAO,CAAC,CACpD,CAEA,QAAS,CACP,IAAMC,EAAa,KAAK,WAAa,EAErC,MAAO,EAAI;;UAEL,KAAK,MACH,CAAI,gEAAgE,KAAK,MAAM,gBAC/EC,EAAQ;;;sCAGkBD,EAAa,6BAA+B,GAAG;wCAC7C,KAAK,SAAS;;;8BAGxB,KAAK,cAAc;;;KAI/C,CACF,EAnCGT,EAAA,CAAAW,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAR,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAY,EAAM,CAAA,EAAAT,EAAA,UAAA,WAAA,IAAA,EAAA,EANR,EAAAH,EAAA,CAAAa,EAAc,gBAAgB,CAAA,EAAAV,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{defineElement as e}from"../shared/define-element.js";import
|
|
1
|
+
import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import"../paragraph/paragraph.js";import"../icons/quote-icon.js";import n from"./review.css.js";import{LitElement as r,html as i}from"lit";import{property as a}from"lit/decorators.js";var o=class extends r{static{this.styles=[n]}constructor(){super(),this.variant=`tint`,this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this._internals.role=this.parentElement?.localName===`bd-review-grid`?`listitem`:null}render(){return i`
|
|
2
2
|
<div class="bd-review-card">
|
|
3
3
|
<bd-quote-icon class="bd-review-mark" size="xl"></bd-quote-icon>
|
|
4
4
|
|
|
@@ -11,5 +11,5 @@ import{defineElement as e}from"../shared/define-element.js";import{tokens as t}f
|
|
|
11
11
|
<span class="bd-review-date"><slot name="date"></slot></span>
|
|
12
12
|
</div>
|
|
13
13
|
</div>
|
|
14
|
-
`}};
|
|
14
|
+
`}};t([a({type:String,reflect:!0})],o.prototype,`variant`,void 0),o=t([e(`bd-review`)],o);
|
|
15
15
|
//# sourceMappingURL=review.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review.js","names":["reviewCSS","_decorate","__decorate","review_css_default","BdReview","LitElement","
|
|
1
|
+
{"version":3,"file":"review.js","names":["reviewCSS","_decorate","__decorate","review_css_default","BdReview","LitElement","property","defineElement"],"sources":["../../../../src/components/review/review.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 \"#components/icons/quote-icon.ts\";\nimport \"#components/paragraph/paragraph.ts\";\nimport reviewCSS from \"./review.css.ts\";\n\ntype Variant = \"tint\" | \"neutral\";\n\n/**\n * A single testimonial/review card. Everything is slotted rather than\n * passed as props, so callers can put arbitrary markup (a bd-p, a link,\n * bold text) in any of the three slots:\n *\n * <bd-review variant=\"tint\">\n * <span slot=\"quote\">If you're looking to buy a security suite...</span>\n * <span slot=\"source\">PCMag</span>\n * <span slot=\"date\">February 3, 2026</span>\n * </bd-review>\n *\n * `variant` is the only prop, since it's an appearance switch (background\n * colour), not content:\n * \"tint\" — the brand's lightest wash (--status-brand-surface), so it\n * follows the business line's brand\n * \"neutral\" — a container ground (--color-surface-container)\n */\n\n@defineElement(\"bd-review\")\nclass BdReview extends LitElement {\n static styles = [reviewCSS];\n\n @property({ type: String, reflect: true })\n variant: Variant = \"tint\"; // \"tint\" | \"neutral\"\n\n _internals: ElementInternals;\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n }\n\n /* In a bd-review-grid, a review is one item of the grid's list -- a list\n whose children are not list items is announced as an empty list, or not\n at all (axe: aria-required-children). The role is the element's own,\n through ElementInternals, as bd-breadcrumb-item's is: the grid used to\n write role=\"listitem\" onto the page's markup, where it stayed after the\n review left the list. A role the page writes on the element still wins,\n and outside a grid a review is no item of anything. */\n connectedCallback() {\n super.connectedCallback();\n this._internals.role = this.parentElement?.localName === \"bd-review-grid\" ? \"listitem\" : null;\n }\n\n render() {\n return html`\n <div class=\"bd-review-card\">\n <bd-quote-icon class=\"bd-review-mark\" size=\"xl\"></bd-quote-icon>\n\n <bd-p variant=\"regular\" class=\"bd-review-quote\">\n <slot name=\"quote\"></slot>\n </bd-p>\n\n <div class=\"bd-review-meta\">\n <bd-p variant=\"small\" font-weight=\"bold\" class=\"bd-review-source\"><slot name=\"source\"></slot></bd-p>\n <span class=\"bd-review-date\"><slot name=\"date\"></slot></span>\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-review\": BdReview;\n }\n}"],"mappings":"A,6VA6BA,IACMI,EADN,cACuBC,CAAW,C,OAChB,KAAA,OAAA,CAACL,CAAS,C,CAO1B,aAAc,CACZ,MAAM,EALW,KAAA,QAAA,OAMjB,KAAK,WAAa,KAAK,gBAAgB,CACzC,CASA,mBAAoB,CAClB,MAAM,kBAAkB,EACxB,KAAK,WAAW,KAAO,KAAK,eAAe,YAAc,iBAAmB,WAAa,IAC3F,CAEA,QAAS,CACP,MAAO,EAAI;;;;;;;;;;;;;KAcb,CACF,EAtCGC,EAAA,CAAAK,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,CAAA,EAAAF,EAAA,UAAA,UAAA,IAAA,EAAA,EAJ1C,EAAAH,EAAA,CAAAM,EAAc,WAAW,CAAA,EAAAH,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{defineElement as e}from"../shared/define-element.js";import
|
|
1
|
+
import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import"../heading/heading.js";import{resolveEnum as n}from"../shared/prop-vocabulary.js";import"../paragraph/paragraph.js";import{ensembleCSS as r}from"../shared/ensemble.css.js";import{sectionHeaderCSS as i}from"./section-header.css.js";import{LitElement as a,html as o,nothing as s}from"lit";import{property as c,state as l}from"lit/decorators.js";var u=[`stacked`,`split`,`centered`],d=class extends a{constructor(...e){super(...e),this.eyebrow=``,this.heading=``,this.lead=``,this.as=`h2`,this.layout=`stacked`,this._hasLead=!1}static{this.styles=[r,i]}willUpdate(e){e.has(`layout`)&&(this.layout=n(this.layout,{allowed:u,fallback:`stacked`}))}_onLeadSlot(e){this._hasLead=e.target.assignedNodes({flatten:!0}).some(e=>e.nodeType===Node.ELEMENT_NODE||e.textContent.trim())}render(){let e=this.lead||this._hasLead;return o`
|
|
2
2
|
<header class="bd-ensemble root">
|
|
3
|
-
${this.eyebrow?
|
|
3
|
+
${this.eyebrow?o`<bd-p variant="eyebrow" class="eyebrow"><span class="text">${this.eyebrow}</span></bd-p>`:s}
|
|
4
4
|
<div class="row">
|
|
5
5
|
<bd-h as="${this.as}" visual-level="h2" class="heading"><span class="text">${this.heading}</span></bd-h>
|
|
6
6
|
<div class="lead" ?hidden=${!e}>
|
|
@@ -8,5 +8,5 @@ import{defineElement as e}from"../shared/define-element.js";import{tokens as t}f
|
|
|
8
8
|
</div>
|
|
9
9
|
</div>
|
|
10
10
|
</header>
|
|
11
|
-
`}};
|
|
11
|
+
`}};t([c({type:String})],d.prototype,`eyebrow`,void 0),t([c({type:String})],d.prototype,`heading`,void 0),t([c({type:String})],d.prototype,`lead`,void 0),t([c({type:String})],d.prototype,`as`,void 0),t([c({type:String,reflect:!0})],d.prototype,`layout`,void 0),t([l()],d.prototype,`_hasLead`,void 0),d=t([e(`bd-section-header`)],d);export{d as SectionHeader};
|
|
12
12
|
//# sourceMappingURL=section-header.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"section-header.js","names":["_decorate","__decorate","LAYOUTS","SectionHeader","LitElement","_args","
|
|
1
|
+
{"version":3,"file":"section-header.js","names":["_decorate","__decorate","LAYOUTS","SectionHeader","LitElement","_args","ensembleCSS","sectionHeaderCSS","changed","resolveEnum","n","showLead","nothing","property","state","defineElement"],"sources":["../../../../src/components/section-header/section-header.ts"],"sourcesContent":["import { LitElement, html, nothing, type PropertyValues } from \"lit\";\nimport { property, state } 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 \"#components/heading/heading.ts\";\nimport \"#components/paragraph/paragraph.ts\";\nimport { resolveEnum } from \"#shared/prop-vocabulary.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\nimport { sectionHeaderCSS } from \"./section-header.css.ts\";\n\nconst LAYOUTS = [\"stacked\", \"split\", \"centered\"] as const;\n\ntype Layout = typeof LAYOUTS[number];\ntype HeadingTag = \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\n/**\n * The header that opens a page section: an eyebrow, the section's h2 and a\n * lead. The homepage opens five sections with it -- AI, Why trust, Proven,\n * Insights and the solution splitter -- where each module used to spell its\n * own (bd-overview, bd-bento-grid, bd-trust-panel). Drawn in the foundation\n * Figma file as Section header.\n *\n * layout=\"split\" puts the headline and lead side by side from lg; below lg,\n * and in \"stacked\", everything stacks. layout=\"centered\" centres the three on\n * a narrower measure. Leave eyebrow and lead out for a title-only header.\n *\n * The lead is an attribute for plain copy, or the `lead` slot when it carries\n * a link -- `<bd-link inline underline>`, since colour alone measures 2.91:1\n * against the body text and fails WCAG 1.4.1. Slotted copy takes the lead's\n * role from here, so the page writes words, not typography.\n */\n@defineElement(\"bd-section-header\")\nexport class SectionHeader extends LitElement {\n static styles = [ensembleCSS, sectionHeaderCSS];\n\n @property({ type: String })\n eyebrow = \"\";\n @property({ type: String })\n heading = \"\";\n @property({ type: String })\n lead = \"\";\n // a page section's title: the outline is the page's, so it can say otherwise\n @property({ type: String })\n as: HeadingTag = \"h2\";\n @property({ type: String, reflect: true })\n layout: Layout = \"stacked\";\n @state()\n _hasLead = false;\n\n willUpdate(changed: PropertyValues<this>) {\n if (changed.has(\"layout\")) {\n this.layout = resolveEnum(this.layout, { allowed: LAYOUTS, fallback: \"stacked\" });\n }\n }\n\n _onLeadSlot(e: Event) {\n this._hasLead = (e.target as HTMLSlotElement).assignedNodes({ flatten: true })\n .some(n => n.nodeType === Node.ELEMENT_NODE || n.textContent!.trim());\n }\n\n render() {\n const showLead = this.lead || this._hasLead;\n return html`\n <header class=\"bd-ensemble root\">\n ${this.eyebrow\n ? html`<bd-p variant=\"eyebrow\" class=\"eyebrow\"><span class=\"text\">${this.eyebrow}</span></bd-p>`\n : nothing}\n <div class=\"row\">\n <bd-h as=\"${this.as}\" visual-level=\"h2\" class=\"heading\"><span class=\"text\">${this.heading}</span></bd-h>\n <div class=\"lead\" ?hidden=${!showLead}>\n <slot name=\"lead\" @slotchange=${this._onLeadSlot}><span class=\"text\">${this.lead}</span></slot>\n </div>\n </div>\n </header>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-section-header\": SectionHeader;\n }\n}\n"],"mappings":"A,mgBAWA,IAAME,EAAU,CAAC,UAAW,QAAS,UAAU,EAsBlCC,EAAN,cAA4BC,CAAW,C,8BAIlC,KAAA,QAAA,GAEA,KAAA,QAAA,GAEH,KAAA,KAAA,GAGU,KAAA,GAAA,KAEA,KAAA,OAAA,UAEN,KAAA,SAAA,E,QAdK,KAAA,OAAA,CAACE,EAAaC,CAAgB,C,CAgB9C,WAAW,EAA+B,CACpCC,EAAQ,IAAI,QAAQ,IACtB,KAAK,OAASC,EAAY,KAAK,OAAQ,CAAE,QAASP,EAAS,SAAU,SAAU,CAAC,EAEpF,CAEA,YAAY,EAAU,CACpB,KAAK,SAAY,EAAE,OAA2B,cAAc,CAAE,QAAS,EAAK,CAAC,CAAC,CAC3E,KAAK,GAAKQ,EAAE,WAAa,KAAK,cAAgBA,EAAE,YAAa,KAAK,CAAC,CACxE,CAEA,QAAS,CACP,IAAMC,EAAW,KAAK,MAAQ,KAAK,SACnC,MAAO,EAAI;;UAEL,KAAK,QACH,CAAI,8DAA8D,KAAK,QAAQ,gBAC/EC,EAAQ;;sBAEE,KAAK,GAAG,yDAAyD,KAAK,QAAQ;sCAC9D,CAACD,EAAS;4CACJ,KAAK,YAAY,sBAAsB,KAAK,KAAK;;;;KAK3F,CACF,EAzCGX,EAAA,CAAAa,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAa,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,UAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAa,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,OAAA,IAAA,EAAA,EAGzBH,EAAA,CAAAa,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAV,EAAA,UAAA,KAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAa,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,CAAA,EAAAV,EAAA,UAAA,SAAA,IAAA,EAAA,EAExCH,EAAA,CAAAc,EAAM,CAAA,EAAAX,EAAA,UAAA,WAAA,IAAA,EAAA,EAfR,EAAAH,EAAA,CAAAe,EAAc,mBAAmB,CAAA,EAAAZ,CAAA,E"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { ReactiveController, ReactiveControllerHost } from "lit";
|
|
2
|
+
type Observer = ResizeObserver | IntersectionObserver | MutationObserver;
|
|
3
|
+
/**
|
|
4
|
+
* A Resize-, Intersection- or MutationObserver a component keeps for as long
|
|
5
|
+
* as it is connected.
|
|
6
|
+
*
|
|
7
|
+
* Every component that observed something wrote the same three steps by hand
|
|
8
|
+
* -- observe once the shadow root has rendered, disconnect on disconnect,
|
|
9
|
+
* observe again on reconnect -- and the third was the one that went missing.
|
|
10
|
+
* firstUpdated runs once in an element's life, so an observer started there
|
|
11
|
+
* and disconnected in disconnectedCallback was gone for good the first time
|
|
12
|
+
* the element moved: a page decorating a block, a framework reordering a
|
|
13
|
+
* list, replaceChildren. bd-carousel-section stopped counting its stops,
|
|
14
|
+
* bd-card-section stopped aligning its rows, bd-anchor-nav's indicator
|
|
15
|
+
* stopped following its links and bd-stat-highlight never rolled, showing
|
|
16
|
+
* zeros. tooltip, light-carousel and logo-marquee had each fixed it on their
|
|
17
|
+
* own. This is the steps once, as MediaQueryController is for a media query.
|
|
18
|
+
*
|
|
19
|
+
* The component builds the observer -- what a delivery means stays its own
|
|
20
|
+
* -- and says what to observe. `observe` is called with the observer on the
|
|
21
|
+
* first update, once the shadow root exists, and again on every reconnect;
|
|
22
|
+
* it may observe nothing when what it looks for is not rendered. A component
|
|
23
|
+
* that is done for good calls stop(): bd-stat-highlight, once its figure has
|
|
24
|
+
* rolled.
|
|
25
|
+
*
|
|
26
|
+
* new ObserverController(this,
|
|
27
|
+
* () => new ResizeObserver(() => this._measure()),
|
|
28
|
+
* observer => observer.observe(this._track));
|
|
29
|
+
*/
|
|
30
|
+
export declare class ObserverController<O extends Observer> implements ReactiveController {
|
|
31
|
+
private readonly _host;
|
|
32
|
+
private readonly _create;
|
|
33
|
+
private readonly _observe;
|
|
34
|
+
private _observer?;
|
|
35
|
+
private _attached;
|
|
36
|
+
private _stopped;
|
|
37
|
+
constructor(host: ReactiveControllerHost & {
|
|
38
|
+
hasUpdated: boolean;
|
|
39
|
+
}, create: () => O, observe: (observer: O) => void);
|
|
40
|
+
/** The observer, once it has been made. */
|
|
41
|
+
get observer(): O | undefined;
|
|
42
|
+
hostConnected(): void;
|
|
43
|
+
hostUpdated(): void;
|
|
44
|
+
hostDisconnected(): void;
|
|
45
|
+
/** Disconnects for good: no later connect observes again. */
|
|
46
|
+
stop(): void;
|
|
47
|
+
private _attach;
|
|
48
|
+
private _detach;
|
|
49
|
+
}
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=class{constructor(e,t,n){this._attached=!1,this._stopped=!1,this._host=e,this._create=t,this._observe=n,e.addController(this)}get observer(){return this._observer}hostConnected(){this._host.hasUpdated&&this._attach()}hostUpdated(){this._attach()}hostDisconnected(){this._detach()}stop(){this._stopped=!0,this._detach()}_attach(){this._attached||this._stopped||(this._observer??=this._create(),this._attached=!0,this._observe(this._observer))}_detach(){this._observer?.disconnect(),this._attached=!1}};export{e as ObserverController};
|
|
2
|
+
//# sourceMappingURL=controller.observer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controller.observer.js","names":["ObserverController","host","create","observe"],"sources":["../../../../src/components/shared/controller.observer.ts"],"sourcesContent":["import type { ReactiveController, ReactiveControllerHost } from 'lit';\n\ntype Observer = ResizeObserver | IntersectionObserver | MutationObserver;\n\n/**\n * A Resize-, Intersection- or MutationObserver a component keeps for as long\n * as it is connected.\n *\n * Every component that observed something wrote the same three steps by hand\n * -- observe once the shadow root has rendered, disconnect on disconnect,\n * observe again on reconnect -- and the third was the one that went missing.\n * firstUpdated runs once in an element's life, so an observer started there\n * and disconnected in disconnectedCallback was gone for good the first time\n * the element moved: a page decorating a block, a framework reordering a\n * list, replaceChildren. bd-carousel-section stopped counting its stops,\n * bd-card-section stopped aligning its rows, bd-anchor-nav's indicator\n * stopped following its links and bd-stat-highlight never rolled, showing\n * zeros. tooltip, light-carousel and logo-marquee had each fixed it on their\n * own. This is the steps once, as MediaQueryController is for a media query.\n *\n * The component builds the observer -- what a delivery means stays its own\n * -- and says what to observe. `observe` is called with the observer on the\n * first update, once the shadow root exists, and again on every reconnect;\n * it may observe nothing when what it looks for is not rendered. A component\n * that is done for good calls stop(): bd-stat-highlight, once its figure has\n * rolled.\n *\n * new ObserverController(this,\n * () => new ResizeObserver(() => this._measure()),\n * observer => observer.observe(this._track));\n */\nexport class ObserverController<O extends Observer> implements ReactiveController {\n private readonly _host : ReactiveControllerHost & { hasUpdated: boolean };\n private readonly _create : () => O;\n private readonly _observe: (observer: O) => void;\n private _observer? : O;\n private _attached = false;\n private _stopped = false;\n\n constructor(host: ReactiveControllerHost & { hasUpdated: boolean }, create: () => O, observe: (observer: O) => void) {\n this._host = host;\n this._create = create;\n this._observe = observe;\n host.addController(this);\n }\n\n /** The observer, once it has been made. */\n get observer() {\n return this._observer;\n }\n\n /* A reconnect: the shadow root is already there. A first connection waits\n for hostUpdated, because nothing is rendered yet. */\n hostConnected() {\n if (this._host.hasUpdated) this._attach();\n }\n\n /* Runs before the host's own firstUpdated, so `observe` finds what it looks\n for through the render root, not through a field firstUpdated sets. */\n hostUpdated() {\n this._attach();\n }\n\n hostDisconnected() {\n this._detach();\n }\n\n /** Disconnects for good: no later connect observes again. */\n stop() {\n this._stopped = true;\n this._detach();\n }\n\n private _attach() {\n if (this._attached || this._stopped) return;\n this._observer ??= this._create();\n this._attached = true;\n this._observe(this._observer);\n }\n\n private _detach() {\n this._observer?.disconnect();\n this._attached = false;\n }\n}\n"],"mappings":"AA+BA,IAAaA,EAAb,KAAkF,CAQhF,YAAY,EAAwD,EAAiB,EAAgC,CAHjG,KAAA,UAAA,GACD,KAAA,SAAA,GAGjB,KAAK,MAAQC,EACb,KAAK,QAAUC,EACf,KAAK,SAAWC,EAChBF,EAAK,cAAc,IAAI,CACzB,CAGA,IAAI,UAAW,CACb,OAAO,KAAK,SACd,CAIA,eAAgB,CACV,KAAK,MAAM,YAAY,KAAK,QAAQ,CAC1C,CAIA,aAAc,CACZ,KAAK,QAAQ,CACf,CAEA,kBAAmB,CACjB,KAAK,QAAQ,CACf,CAGA,MAAO,CACL,KAAK,SAAW,GAChB,KAAK,QAAQ,CACf,CAEA,SAAkB,CACZ,KAAK,WAAa,KAAK,WAC3B,KAAK,YAAc,KAAK,QAAQ,EAChC,KAAK,UAAY,GACjB,KAAK,SAAS,KAAK,SAAS,EAC9B,CAEA,SAAkB,CAChB,KAAK,WAAW,WAAW,EAC3B,KAAK,UAAY,EACnB,CACF,E"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{defineElement as e}from"../shared/define-element.js";import
|
|
1
|
+
import{defineElement as e}from"../shared/define-element.js";import"../../tokens/tokens.js";import t from"../../_bundled/oxc-project_runtime/helpers/esm/decorate.js";import"../heading/heading.js";import"../paragraph/paragraph.js";import{ensembleCSS as n}from"../shared/ensemble.css.js";import r from"./spotlight-section.css.js";import{LitElement as i,html as a,nothing as o}from"lit";import{property as s,state as c}from"lit/decorators.js";var l=class extends i{constructor(...e){super(...e),this.title=``,this.description=``,this._hasLeftIcon=!1,this._hasLeftButtons=!1,this._hasRightIcon=!1,this._hasRightButtons=!1}static{this.styles=[n,r]}_onSlotChange(e,t){let n=t.target.assignedNodes({flatten:!0}).length>0;this[e]!==n&&(this[e]=n)}render(){let e=this._hasLeftIcon;return a`
|
|
2
2
|
<div class="bd-ensemble">
|
|
3
3
|
<div class="bd-spotlightsection-container">
|
|
4
4
|
<div class="bd-spotlightsection-left">
|
|
@@ -6,11 +6,11 @@ import{defineElement as e}from"../shared/define-element.js";import{tokens as t}f
|
|
|
6
6
|
<slot name="left-icon" @slotchange=${e=>this._onSlotChange(`_hasLeftIcon`,e)}></slot>
|
|
7
7
|
</div>
|
|
8
8
|
|
|
9
|
-
${e?
|
|
9
|
+
${e?a`
|
|
10
10
|
<bd-p variant="large" color="on-brand" class="bd-spotlightsection-title bd-spotlightsection-title--small">
|
|
11
11
|
<slot name="title">${this.title}</slot>
|
|
12
12
|
</bd-p>
|
|
13
|
-
`:
|
|
13
|
+
`:a`
|
|
14
14
|
<bd-h as="h2" fontWeight="normal" class="bd-spotlightsection-title">
|
|
15
15
|
<slot name="title">${this.title}</slot>
|
|
16
16
|
</bd-h>
|
|
@@ -26,15 +26,15 @@ import{defineElement as e}from"../shared/define-element.js";import{tokens as t}f
|
|
|
26
26
|
<slot name="icon" @slotchange=${e=>this._onSlotChange(`_hasRightIcon`,e)}></slot>
|
|
27
27
|
</div>
|
|
28
28
|
|
|
29
|
-
${this.description?e?
|
|
29
|
+
${this.description?e?a`
|
|
30
30
|
<bd-h as="h2" fontWeight="normal" color="on-brand" class="bd-spotlightsection-description bd-spotlightsection-description--large">
|
|
31
31
|
<slot name="description">${this.description}</slot>
|
|
32
32
|
</bd-h>
|
|
33
|
-
`:
|
|
33
|
+
`:a`
|
|
34
34
|
<bd-p variant="large" color="on-brand" class="bd-spotlightsection-description">
|
|
35
35
|
<slot name="description">${this.description}</slot>
|
|
36
36
|
</bd-p>
|
|
37
|
-
`:
|
|
37
|
+
`:o}
|
|
38
38
|
|
|
39
39
|
<div class="bd-spotlightsection-buttons" ?hidden=${!this._hasRightButtons}>
|
|
40
40
|
<slot name="right-buttons" @slotchange=${e=>this._onSlotChange(`_hasRightButtons`,e)}></slot>
|
|
@@ -42,5 +42,5 @@ import{defineElement as e}from"../shared/define-element.js";import{tokens as t}f
|
|
|
42
42
|
</div>
|
|
43
43
|
</div>
|
|
44
44
|
</div>
|
|
45
|
-
`}};
|
|
45
|
+
`}};t([s({type:String})],l.prototype,`title`,void 0),t([s({type:String})],l.prototype,`description`,void 0),t([c()],l.prototype,`_hasLeftIcon`,void 0),t([c()],l.prototype,`_hasLeftButtons`,void 0),t([c()],l.prototype,`_hasRightIcon`,void 0),t([c()],l.prototype,`_hasRightButtons`,void 0),l=t([e(`bd-spotlight-section`)],l);
|
|
46
46
|
//# sourceMappingURL=spotlight-section.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spotlight-section.js","names":["spotlightSectionCSS","_decorate","__decorate","spotlight_section_css_default","BdSpotlightSection","LitElement","_args","
|
|
1
|
+
{"version":3,"file":"spotlight-section.js","names":["spotlightSectionCSS","_decorate","__decorate","spotlight_section_css_default","BdSpotlightSection","LitElement","_args","ensembleCSS","hasContent","event","stateKey","flipped","nothing","property","state","defineElement"],"sources":["../../../../src/components/spotlight-section/spotlight-section.ts"],"sourcesContent":["import { LitElement, html, nothing } from \"lit\";\nimport { property, state } 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 \"#components/heading/heading.ts\";\nimport \"#components/paragraph/paragraph.ts\";\nimport spotlightSectionCSS from \"./spotlight-section.css.ts\";\nimport { ensembleCSS } from \"#shared/ensemble.css.ts\";\n\n\ntype SlotState = \"_hasLeftIcon\" | \"_hasLeftButtons\" | \"_hasRightIcon\" | \"_hasRightButtons\";\n\n@defineElement(\"bd-spotlight-section\")\nclass BdSpotlightSection extends LitElement {\n static styles = [ensembleCSS, spotlightSectionCSS];\n\n @property({ type: String })\n title = \"\";\n @property({ type: String })\n description = \"\";\n @state()\n _hasLeftIcon = false;\n @state()\n _hasLeftButtons = false;\n @state()\n _hasRightIcon = false;\n @state()\n _hasRightButtons = false;\n\n\n _onSlotChange(stateKey: SlotState, event: Event) {\n const hasContent = (event.target as HTMLSlotElement).assignedNodes({ flatten: true }).length > 0;\n if (this[stateKey] !== hasContent) this[stateKey] = hasContent;\n }\n\n render() {\n\n const flipped = this._hasLeftIcon;\n\n return html`\n <div class=\"bd-ensemble\">\n <div class=\"bd-spotlightsection-container\">\n <div class=\"bd-spotlightsection-left\">\n <div class=\"bd-spotlightsection-icon\" ?hidden=${!this._hasLeftIcon}>\n <slot name=\"left-icon\" @slotchange=${(e: Event) => this._onSlotChange(\"_hasLeftIcon\", e)}></slot>\n </div>\n\n ${flipped\n ? html`\n <bd-p variant=\"large\" color=\"on-brand\" class=\"bd-spotlightsection-title bd-spotlightsection-title--small\">\n <slot name=\"title\">${this.title}</slot>\n </bd-p>\n `\n : html`\n <bd-h as=\"h2\" fontWeight=\"normal\" class=\"bd-spotlightsection-title\">\n <slot name=\"title\">${this.title}</slot>\n </bd-h>\n `}\n\n <div class=\"bd-spotlightsection-buttons\" ?hidden=${!this._hasLeftButtons}>\n <slot name=\"left-buttons\" @slotchange=${(e: Event) => this._onSlotChange(\"_hasLeftButtons\", e)}></slot>\n </div>\n </div>\n\n <div class=\"bd-spotlightsection-side\">\n <div class=\"bd-spotlightsection-icon\" ?hidden=${!this._hasRightIcon}>\n <slot name=\"icon\" @slotchange=${(e: Event) => this._onSlotChange(\"_hasRightIcon\", e)}></slot>\n </div>\n\n ${this.description\n ? flipped\n ? html`\n <bd-h as=\"h2\" fontWeight=\"normal\" color=\"on-brand\" class=\"bd-spotlightsection-description bd-spotlightsection-description--large\">\n <slot name=\"description\">${this.description}</slot>\n </bd-h>\n `\n : html`\n <bd-p variant=\"large\" color=\"on-brand\" class=\"bd-spotlightsection-description\">\n <slot name=\"description\">${this.description}</slot>\n </bd-p>\n `\n : nothing}\n\n <div class=\"bd-spotlightsection-buttons\" ?hidden=${!this._hasRightButtons}>\n <slot name=\"right-buttons\" @slotchange=${(e: Event) => this._onSlotChange(\"_hasRightButtons\", e)}></slot>\n </div>\n </div>\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bd-spotlight-section\": BdSpotlightSection;\n }\n}"],"mappings":"A,ubAaA,IACMI,EADN,cACiCC,CAAW,C,8BAIlC,KAAA,MAAA,GAEM,KAAA,YAAA,GAEC,KAAA,aAAA,GAEG,KAAA,gBAAA,GAEF,KAAA,cAAA,GAEG,KAAA,iBAAA,E,QAbH,KAAA,OAAA,CAACE,EAAaP,CAAmB,C,CAgBjD,cAAc,EAAqB,EAAc,CAC/C,IAAMQ,EAAcC,EAAM,OAA2B,cAAc,CAAE,QAAS,EAAK,CAAC,CAAC,CAAC,OAAS,EAC3F,KAAKC,KAAcF,IAAY,KAAKE,GAAYF,EACtD,CAEA,QAAS,CAEP,IAAMG,EAAU,KAAK,aAErB,MAAO,EAAI;;;;4DAI6C,CAAC,KAAK,aAAa;mDAC3B,GAAa,KAAK,cAAc,eAAgB,CAAC,EAAE;;;cAGzFA,EACE,CAAI;;yCAEqB,KAAK,MAAM;;kBAGpC,CAAI;;yCAEqB,KAAK,MAAM;;kBAElC;;+DAE6C,CAAC,KAAK,gBAAgB;sDAC9B,GAAa,KAAK,cAAc,kBAAmB,CAAC,EAAE;;;;;4DAKjD,CAAC,KAAK,cAAc;8CACjC,GAAa,KAAK,cAAc,gBAAiB,CAAC,EAAE;;;cAGrF,KAAK,YACHA,EACE,CAAI;;iDAE2B,KAAK,YAAY;;oBAGhD,CAAI;;iDAE2B,KAAK,YAAY;;oBAGlDC,EAAQ;;+DAEuC,CAAC,KAAK,iBAAiB;uDAC9B,GAAa,KAAK,cAAc,mBAAoB,CAAC,EAAE;;;;;KAM7G,CACF,EA3EGX,EAAA,CAAAY,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAT,EAAA,UAAA,QAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAY,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAT,EAAA,UAAA,cAAA,IAAA,EAAA,EAEzBH,EAAA,CAAAa,EAAM,CAAA,EAAAV,EAAA,UAAA,eAAA,IAAA,EAAA,EAENH,EAAA,CAAAa,EAAM,CAAA,EAAAV,EAAA,UAAA,kBAAA,IAAA,EAAA,EAENH,EAAA,CAAAa,EAAM,CAAA,EAAAV,EAAA,UAAA,gBAAA,IAAA,EAAA,EAENH,EAAA,CAAAa,EAAM,CAAA,EAAAV,EAAA,UAAA,mBAAA,IAAA,EAAA,EAdR,EAAAH,EAAA,CAAAc,EAAc,sBAAsB,CAAA,EAAAX,CAAA"}
|