@repobit/dex-system-design 0.25.12 → 0.26.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 +187 -0
- package/README.md +131 -8
- package/package.json +95 -13
- package/schemas/component-manifest.json +3294 -405
- package/schemas/manifest-omissions.json +173 -0
- package/src/blog/src/breakpoints.js +6 -6
- package/src/blog/src/content/blog-atoms-showcase.js +1 -1
- package/src/blog/src/content/blog-page-layout.js +2 -2
- package/src/blog/src/lib/article-toc.js +7 -7
- package/src/blog/src/shell/blog-shell.js +1 -1
- package/src/blog/src/tokens/blog.js +2 -2
- package/src/blog/src/tokens/core.js +34 -35
- package/src/blog/src/tokens/legacy.js +0 -9
- package/src/blog/tokens/blog.js +2 -2
- package/src/blog/tokens/core.js +34 -35
- package/src/blog/tokens/legacy.js +0 -9
- package/src/blog/tokens.css +36 -46
- package/src/components/accordion/accordion-bg.css.js +83 -59
- package/src/components/accordion/accordion-bg.js +29 -10
- package/src/components/accordion/accordion-bg.stories.js +67 -67
- package/src/components/accordion/accordion-keyboard.js +80 -0
- package/src/components/accordion/accordion.css.js +142 -80
- package/src/components/accordion/accordion.js +37 -10
- package/src/components/accordion/accordion.stories.js +7 -7
- package/src/components/agent-endpoints/agent-endpoints.css.js +36 -39
- package/src/components/agent-endpoints/agent-endpoints.js +30 -20
- package/src/components/agent-endpoints/agent-endpoints.stories.js +1 -1
- package/src/components/ai-guardian-demo.stories.js +91 -91
- package/src/components/alert/alert.css.js +198 -0
- package/src/components/alert/alert.js +103 -0
- package/src/components/alert/alert.stories.js +206 -0
- package/src/components/anchor/anchor-nav.css.js +213 -101
- package/src/components/anchor/anchor-nav.js +26 -40
- package/src/components/anchor/anchor.stories.js +22 -12
- package/src/components/annotation/annotation.css.js +58 -0
- package/src/components/annotation/annotation.js +67 -0
- package/src/components/annotation/annotation.stories.js +63 -0
- package/src/components/architecture.stories.js +285 -0
- package/src/components/atoms.stories.js +342 -0
- package/src/components/avatar/avatar.css.js +67 -0
- package/src/components/avatar/avatar.js +42 -0
- package/src/components/avatar/avatar.stories.js +95 -0
- package/src/components/awards/awards-flex.css.js +209 -23
- package/src/components/awards/awards-flex.js +66 -7
- package/src/components/awards/awards-flex.stories.js +1 -1
- package/src/components/awards/{awards-light.stories.js → awards-summary.stories.js} +54 -64
- package/src/components/awards/awards.css.js +116 -58
- package/src/components/awards/awards.js +102 -28
- package/src/components/awards/awards.stories.js +1 -1
- package/src/components/back/back.css.js +51 -22
- package/src/components/back/back.js +28 -7
- package/src/components/back/back.stories.js +9 -3
- package/src/components/badge/badge.css.js +158 -46
- package/src/components/badge/badge.js +62 -74
- package/src/components/badge/badge.stories.js +176 -248
- package/src/components/bento-grid/bento-grid.css.js +21 -16
- package/src/components/bento-grid/bento-grid.js +16 -4
- package/src/components/bento-grid/bento-grid.stories.js +19 -18
- package/src/components/bento-grid/bento-item.css.js +52 -28
- package/src/components/bento-grid/bento-item.js +2 -2
- package/src/components/blockquote/blockquote.css.js +47 -0
- package/src/components/blockquote/blockquote.js +29 -0
- package/src/components/blockquote/blockquote.stories.js +62 -0
- package/src/components/breadcrumb/breadcrumb.css.js +92 -22
- package/src/components/breadcrumb/breadcrumb.js +56 -11
- package/src/components/button/button.css.js +531 -161
- package/src/components/button/button.js +206 -214
- package/src/components/button/button.stories.js +322 -174
- package/src/components/caption/caption.css.js +21 -0
- package/src/components/caption/caption.js +31 -0
- package/src/components/caption/caption.stories.js +62 -0
- package/src/components/card-features/card-features.css.js +14 -22
- package/src/components/card-features/card-features.js +68 -9
- package/src/components/card-features/card-features.stories.js +11 -11
- package/src/components/cards/card.css.js +60 -81
- package/src/components/cards/card.js +56 -25
- package/src/components/cards/card.stories.js +39 -39
- package/src/components/carousel/carousel.css.js +93 -99
- package/src/components/carousel/carousel.js +32 -4
- package/src/components/checkbox/checkbox.css.js +111 -93
- package/src/components/checkbox/checkbox.js +64 -90
- package/src/components/checkbox/checkbox.stories.js +96 -29
- package/src/components/code/code.css.js +70 -0
- package/src/components/code/code.js +40 -0
- package/src/components/code/code.stories.js +73 -0
- package/src/components/compare/compare.css.js +179 -43
- package/src/components/compare/compare.js +52 -25
- package/src/components/compare/compare.stories.js +61 -4
- package/src/components/comparison-panel/comparison-panel.css.js +38 -51
- package/src/components/comparison-panel/comparison-panel.js +5 -4
- package/src/components/comparison-panel/comparison-panel.stories.js +1 -1
- package/src/components/compatibility-table/compatibility-table.css.js +180 -80
- package/src/components/compatibility-table/compatibility-table.js +37 -9
- package/src/components/control-alignment.stories.js +393 -0
- package/src/components/cta-banner/cta-banner.css.js +41 -13
- package/src/components/cta-banner/cta-banner.js +6 -5
- package/src/components/cta-banner/cta-banner.stories.js +43 -98
- package/src/components/display/display.css.js +25 -1
- package/src/components/display/display.js +46 -13
- package/src/components/display/display.stories.js +270 -40
- package/src/components/divider/divider-horizontal.js +21 -5
- package/src/components/divider/divider-vertical.js +15 -7
- package/src/components/divider/divider.css.js +2 -2
- package/src/components/divider/divider.stories.js +38 -34
- package/src/components/dropdown/dropdown.css.js +93 -126
- package/src/components/dropdown/dropdown.js +114 -34
- package/src/components/dropdown/dropdown.stories.js +56 -24
- package/src/components/features/features.css.js +24 -11
- package/src/components/features/features.js +7 -3
- package/src/components/features/features.stories.js +37 -37
- package/src/components/features-tab/features-tab.css.js +19 -8
- package/src/components/features-tab/features-tab.js +6 -5
- package/src/components/features-tab/features-tab.stories.js +23 -23
- package/src/components/fieldset/fieldset.css.js +30 -0
- package/src/components/fieldset/fieldset.js +28 -0
- package/src/components/fieldset/fieldset.stories.js +84 -0
- package/src/components/footer/footer-links-group.css.js +10 -14
- package/src/components/footer/footer-links-group.js +4 -3
- package/src/components/footer/footer-lp.css.js +59 -30
- package/src/components/footer/footer-lp.js +17 -12
- package/src/components/footer/footer-lp.stories.js +63 -75
- package/src/components/footer/footer-nav-menu.css.js +26 -4
- package/src/components/footer/footer-nav-menu.js +3 -2
- package/src/components/footer/footer.css.js +146 -264
- package/src/components/footer/footer.js +176 -106
- package/src/components/footer/footer.stories.js +9 -9
- package/src/components/footer/localeMap.js +1 -1
- package/src/components/grid/grid.css.js +1 -1
- package/src/components/grid/grid.js +49 -7
- package/src/components/grid/grid.stories.js +111 -0
- package/src/components/header/header-code.css.js +61 -51
- package/src/components/header/header-code.js +28 -14
- package/src/components/header/header-code.stories.js +5 -5
- package/src/components/header/header.css.js +655 -176
- package/src/components/header/header.js +269 -36
- package/src/components/header/header.stories.js +841 -18
- package/src/components/heading/heading.css.js +14 -17
- package/src/components/heading/heading.js +48 -33
- package/src/components/heading/heading.stories.js +27 -25
- package/src/components/help-text/help-text.css.js +21 -0
- package/src/components/help-text/help-text.js +25 -0
- package/src/components/help-text/help-text.stories.js +66 -0
- package/src/components/highlight/highlight.css.js +86 -64
- package/src/components/highlight/highlight.js +18 -27
- package/src/components/highlight/highlight.stories.js +14 -3
- package/src/components/icons/analysis-icon.js +6 -16
- package/src/components/icons/arrow-down-icon.js +6 -19
- package/src/components/icons/arrow-icon.js +44 -0
- package/src/components/icons/arrow-right-icon.js +30 -23
- package/src/components/icons/arrow-up-icon.js +19 -18
- package/src/components/icons/bd-ai-icon.js +1 -1
- package/src/components/icons/brand-marks.stories.js +279 -0
- package/src/components/icons/brand-signature-icon.js +42 -0
- package/src/components/icons/check-icon.js +27 -0
- package/src/components/icons/circle-info-icon.js +33 -0
- package/src/components/icons/close-icon.js +6 -18
- package/src/components/icons/family-icon.js +8 -20
- package/src/components/icons/globe-icon.js +6 -18
- package/src/components/icons/guide-icon.js +6 -18
- package/src/components/icons/icon-element.js +99 -0
- package/src/components/icons/icons.js +36 -0
- package/src/components/icons/icons.stories.js +184 -52
- package/src/components/icons/individual-icon.js +6 -18
- package/src/components/icons/laurel-icon.js +9 -19
- package/src/components/icons/machine-learning-icon.js +6 -17
- package/src/components/icons/marks.js +41 -0
- package/src/components/icons/minus-icon.js +7 -21
- package/src/components/icons/missing-icon.js +52 -0
- package/src/components/icons/plus-icon.js +7 -21
- package/src/components/icons/quote-icon.js +19 -19
- package/src/components/image/image.css.js +72 -25
- package/src/components/image/image.js +11 -6
- package/src/components/image/image.stories.js +2 -2
- package/src/components/input/custom-form.stories.js +214 -62
- package/src/components/input/input-clipboard.css.js +51 -144
- package/src/components/input/input-clipboard.js +31 -15
- package/src/components/input/input.css.js +8 -146
- package/src/components/input/input.js +93 -38
- package/src/components/install-options/install-options.css.js +84 -77
- package/src/components/install-options/install-options.js +33 -30
- package/src/components/install-options/install-options.stories.js +3 -3
- package/src/components/label/label.css.js +35 -0
- package/src/components/label/label.js +38 -0
- package/src/components/label/label.stories.js +82 -0
- package/src/components/light-carousel/light-carousel.css.js +111 -63
- package/src/components/light-carousel/light-carousel.js +85 -11
- package/src/components/light-carousel/light-carousel.stories.js +126 -82
- package/src/components/link/link.css.js +150 -99
- package/src/components/link/link.js +86 -11
- package/src/components/link/link.stories.js +124 -30
- package/src/components/list/list-item/list-item.css.js +74 -22
- package/src/components/list/list-item/list-item.js +32 -10
- package/src/components/list/list-item/list-item.stories.js +23 -23
- package/src/components/list/list.css.js +8 -2
- package/src/components/list/list.js +3 -2
- package/src/components/list/list.stories.js +222 -0
- package/src/components/modal/modal.css.js +114 -24
- package/src/components/modal/modal.js +83 -7
- package/src/components/modal/modal.stories.js +9 -9
- package/src/components/overview/overview.css.js +19 -14
- package/src/components/overview/overview.js +6 -5
- package/src/components/overview/overview.stories.js +10 -10
- package/src/components/page-switcher/page-switcher.css.js +97 -40
- package/src/components/page-switcher/page-switcher.js +28 -5
- package/src/components/page-switcher/page-switcher.stories.js +95 -0
- package/src/components/paragraph/paragraph.css.js +15 -10
- package/src/components/paragraph/paragraph.js +41 -44
- package/src/components/paragraph/paragraph.stories.js +56 -21
- package/src/components/picture/picture.css.js +103 -44
- package/src/components/picture/picture.js +100 -30
- package/src/components/picture/picture.stories.js +1 -1
- package/src/components/pricing-cards/new-pricing-card.js +3 -3
- package/src/components/pricing-cards/new-pricing.css.js +24 -15
- package/src/components/pricing-cards/pricing-card-actions.css.js +1 -1
- package/src/components/pricing-cards/pricing-card-actions.js +3 -4
- package/src/components/pricing-cards/pricing-card-container.css.js +3 -3
- package/src/components/pricing-cards/pricing-card-container.js +3 -2
- package/src/components/pricing-cards/pricing-card-header.css.js +10 -8
- package/src/components/pricing-cards/pricing-card-header.js +6 -7
- package/src/components/pricing-cards/pricing-card-pricing.css.js +16 -9
- package/src/components/pricing-cards/pricing-card-pricing.js +8 -6
- package/src/components/pricing-cards/pricing-card-show-more.css.js +11 -3
- package/src/components/pricing-cards/pricing-card-show-more.js +8 -3
- package/src/components/pricing-cards/pricing-card.css.js +244 -190
- package/src/components/pricing-cards/pricing-card.js +54 -70
- package/src/components/pricing-cards/pricing-feature-item.css.js +25 -8
- package/src/components/pricing-cards/pricing-feature-item.js +8 -3
- package/src/components/process-steps/process-steps.css.js +26 -14
- package/src/components/process-steps/process-steps.js +23 -6
- package/src/components/process-steps/process-steps.stories.js +1 -1
- package/src/components/progress/progress.css.js +80 -0
- package/src/components/progress/progress.js +42 -0
- package/src/components/progress/progress.stories.js +79 -0
- package/src/components/quick-answer/quick-answer.css.js +75 -13
- package/src/components/quick-answer/quick-answer.js +8 -3
- package/src/components/radio/radio.css.js +92 -128
- package/src/components/radio/radio.js +106 -127
- package/src/components/radio/radio.stories.js +54 -19
- package/src/components/review/review-grid.css.js +5 -6
- package/src/components/review/review-grid.js +14 -11
- package/src/components/review/review.css.js +11 -6
- package/src/components/review/review.js +3 -8
- package/src/components/shared/ensemble.css.js +93 -0
- package/src/components/shared/form-field.css.js +206 -0
- package/src/components/shared/prop-vocabulary.js +48 -0
- package/src/components/shared/token-scales.js +306 -0
- package/src/components/skeleton/skeleton.css.js +34 -0
- package/src/components/skeleton/skeleton.js +32 -0
- package/src/components/skeleton/skeleton.stories.js +70 -0
- package/src/components/spinner/spinner.css.js +62 -0
- package/src/components/spinner/spinner.js +38 -0
- package/src/components/spinner/spinner.stories.js +92 -0
- package/src/components/spotlight-section/spotlight-section.css.js +14 -13
- package/src/components/spotlight-section/spotlight-section.js +42 -39
- package/src/components/switch/switch.css.js +103 -0
- package/src/components/switch/switch.js +44 -0
- package/src/components/switch/switch.stories.js +86 -0
- package/src/components/tab-list/content-switcher.stories.js +189 -0
- package/src/components/tab-list/tab-list.css.js +250 -0
- package/src/components/tab-list/tab-list.js +184 -0
- package/src/components/tab-list/tab-list.stories.js +221 -0
- package/src/components/tabs/tabs.css.js +14 -123
- package/src/components/tabs/tabs.js +16 -19
- package/src/components/tabs/tabs.stories.js +95 -95
- package/src/components/tag/tag.css.js +54 -0
- package/src/components/tag/tag.js +32 -0
- package/src/components/tag/tag.stories.js +126 -0
- package/src/components/terminal/terminal-message.css.js +164 -60
- package/src/components/terminal/terminal-message.js +5 -5
- package/src/components/terminal/terminal-message.stories.js +70 -1
- package/src/components/termsOfUse/terms.css.js +25 -20
- package/src/components/termsOfUse/terms.js +13 -9
- package/src/components/termsOfUse/terms.stories.js +1 -1
- package/src/components/textarea/textarea.css.js +51 -0
- package/src/components/textarea/textarea.js +136 -0
- package/src/components/textarea/textarea.stories.js +191 -0
- package/src/components/tooltip/tooltip.css.js +75 -0
- package/src/components/tooltip/tooltip.js +156 -0
- package/src/components/tooltip/tooltip.stories.js +161 -0
- package/src/components/trust-panel/trust-panel.css.js +85 -33
- package/src/components/trust-panel/trust-panel.js +18 -10
- package/src/components/trust-panel/trust-panel.stories.js +1 -1
- package/src/components/ultimate-security-demo.stories.js +431 -0
- package/src/components/video/video.css.js +17 -0
- package/src/components/video/video.js +40 -0
- package/src/components/video/video.stories.js +106 -0
- package/src/components/video-player/video-player.css.js +67 -11
- package/src/components/video-player/video-player.js +35 -4
- package/src/components/video-player/video-player.stories.js +1 -1
- package/src/components/visual-alignment.stories.js +411 -0
- package/src/components/visually-hidden/visually-hidden.css.js +24 -0
- package/src/components/visually-hidden/visually-hidden.js +16 -0
- package/src/components/visually-hidden/visually-hidden.stories.js +56 -0
- package/src/stories/Button.stories.js +17 -17
- package/src/stories/Header.stories.js +10 -10
- package/src/stories/Page.js +1 -1
- package/src/stories/Page.stories.js +6 -6
- package/src/tokens/borders.stories.js +339 -0
- package/src/tokens/color-responsibilities.stories.js +227 -0
- package/src/tokens/dark-derivation.js +309 -0
- package/src/tokens/dark-findings.js +197 -0
- package/src/tokens/dark-mode.stories.js +207 -0
- package/src/tokens/dimension.stories.js +251 -0
- package/src/tokens/elevation.stories.js +143 -0
- package/src/tokens/focus.stories.js +276 -0
- package/src/tokens/fonts.css +20 -20
- package/src/tokens/fonts.stories.js +354 -374
- package/src/tokens/layout.css +25 -11
- package/src/tokens/motion.stories.js +231 -0
- package/src/tokens/shape.stories.js +272 -0
- package/src/tokens/spacing-rhythm.stories.js +359 -0
- package/src/tokens/spacing.stories.js +208 -703
- package/src/tokens/story-chrome.js +503 -0
- package/src/tokens/surfaces.stories.js +224 -0
- package/src/tokens/text-on-surface.stories.js +164 -0
- package/src/tokens/token-map.js +220 -0
- package/src/tokens/token-map.stories.js +257 -0
- package/src/tokens/token-purposes.js +266 -0
- package/src/tokens/tokens-grid.stories.js +388 -900
- package/src/tokens/tokens.css +1633 -1045
- package/src/tokens/tokens.js +1130 -492
- package/src/tokens/tokens.stories.js +137 -47
- package/src/tokens/type-ceiling-words.js +299 -0
- package/src/tokens/typography.stories.js +1003 -965
- package/src/tokens/vertical-rhythm.stories.js +224 -0
- package/src/components/awards/awards-icon.js +0 -56
- package/src/components/awards/awards-light.js +0 -240
- package/src/components/banner/banner.js +0 -60
- package/src/components/banner/banner.stories.js +0 -51
- package/src/components/button/icons.js +0 -24
- package/src/components/input/index.js +0 -0
- package/src/components/light-carousel/light-carousel-simple.css.js +0 -183
- package/src/components/light-carousel/light-carousel-simple.js +0 -74
- package/src/tokens/colors.js +0 -121
- package/src/tokens/typography.css.js +0 -207
- package/src/tokens/typography.js +0 -0
|
@@ -1,302 +1,230 @@
|
|
|
1
1
|
import { html } from 'lit';
|
|
2
2
|
import './badge.js';
|
|
3
3
|
|
|
4
|
+
const TONES = ['default', 'primary', 'success', 'warning', 'error', 'info'];
|
|
5
|
+
const SIZES = ['sm', 'md', 'lg'];
|
|
6
|
+
const VARIANTS = ['shade', 'fill'];
|
|
7
|
+
|
|
8
|
+
/* flex-wrap, because a row of chips is wider than a phone. Measured at 320:
|
|
9
|
+
Tones pushed the page 156px wide, Count 22px and With icon 4px, and the
|
|
10
|
+
badges themselves were correct -- inline-flex with white-space: nowrap, which
|
|
11
|
+
is what a chip label should do. The overflow was this container refusing to
|
|
12
|
+
wrap, so it is fixed here rather than in the component. */
|
|
13
|
+
const row = (label, cells) => html`
|
|
14
|
+
<div style="display:flex;flex-wrap:wrap;align-items:center;gap:var(--spacing-16);margin-bottom:var(--spacing-12)">
|
|
15
|
+
<code style="min-width:7ch;font-size:var(--typography-fontSize-xs);color:var(--color-neutral-600)">${label}</code>
|
|
16
|
+
${cells}
|
|
17
|
+
</div>
|
|
18
|
+
`;
|
|
19
|
+
|
|
4
20
|
export default {
|
|
5
|
-
title : '
|
|
21
|
+
title : 'Atoms/Badge',
|
|
6
22
|
tags : ['autodocs'],
|
|
7
23
|
parameters: {
|
|
8
24
|
docs: {
|
|
9
25
|
description: {
|
|
10
26
|
component: `
|
|
11
|
-
**BdBadge**
|
|
27
|
+
**BdBadge** renders a pill that labels or counts something. It has four
|
|
28
|
+
independent axes — \`mode\`, \`size\`, \`tone\` and \`variant\` — which together
|
|
29
|
+
cover the full \`ds-badge\` set.
|
|
30
|
+
|
|
31
|
+
Every value comes from \`src/tokens/tokens.js\`. Nothing is hardcoded and
|
|
32
|
+
nothing was copied out of the design tool as a literal: each measurement was
|
|
33
|
+
matched to the token that already carries it.
|
|
12
34
|
|
|
13
35
|
### Usage
|
|
14
36
|
\`\`\`html
|
|
15
|
-
<bd-badge
|
|
16
|
-
<bd-badge
|
|
17
|
-
<bd-badge
|
|
37
|
+
<bd-badge tone="success" variant="shade">Save 44%</bd-badge>
|
|
38
|
+
<bd-badge tone="primary" variant="fill" size="sm">New</bd-badge>
|
|
39
|
+
<bd-badge mode="count" tone="error" variant="fill">3</bd-badge>
|
|
40
|
+
<bd-badge mode="dot" tone="warning" variant="fill"></bd-badge>
|
|
41
|
+
<bd-badge tone="primary" variant="fill" icon="family">Family Pack</bd-badge>
|
|
18
42
|
\`\`\`
|
|
19
43
|
|
|
20
44
|
### Props
|
|
21
45
|
| Prop | Values | Default |
|
|
22
46
|
|---|---|---|
|
|
23
|
-
| \`
|
|
24
|
-
| \`variant\` | Any string class name | \`''\` |
|
|
47
|
+
| \`mode\` | \`text\`, \`dot\`, \`count\` | \`text\` |
|
|
25
48
|
| \`size\` | \`sm\`, \`md\`, \`lg\` | \`md\` |
|
|
26
|
-
| \`
|
|
49
|
+
| \`tone\` | \`default\`, \`primary\`, \`success\`, \`warning\`, \`error\`, \`info\` | \`default\` |
|
|
50
|
+
| \`variant\` | \`shade\`, \`fill\` | \`shade\` |
|
|
27
51
|
| \`icon\` | \`individual\`, \`family\`, \`''\` | \`''\` |
|
|
52
|
+
| \`label\` | any string — accessible name for \`mode="dot"\` | tone name |
|
|
53
|
+
|
|
54
|
+
### Tokens
|
|
55
|
+
| | token |
|
|
56
|
+
|---|---|
|
|
57
|
+
| radius | \`--radius-full\` |
|
|
58
|
+
| weight | \`--typography-fontWeight-medium\` |
|
|
59
|
+
| line-height | \`--typography-lineHeight-tight\` |
|
|
60
|
+
| type, sm / md / lg | \`--typography-fontSize-xxs\` / \`-xs\` / \`-sm\` |
|
|
61
|
+
| padding, sm & md | \`--spacing-4\` \`--spacing-8\` |
|
|
62
|
+
| padding, lg | \`--spacing-8\` \`--spacing-12\` |
|
|
63
|
+
| dot | \`--spacing-8\` |
|
|
64
|
+
| icon gap | \`--spacing-4\` |
|
|
28
65
|
|
|
29
66
|
### Notes
|
|
30
|
-
- \`
|
|
31
|
-
|
|
32
|
-
- \`
|
|
33
|
-
|
|
67
|
+
- \`size\` has no effect in \`mode="dot"\` — the design keeps the dot at one
|
|
68
|
+
size across all three, so that is reproduced rather than invented around.
|
|
69
|
+
- \`variant\` has no effect in \`mode="dot"\` either. A dot has no text, so
|
|
70
|
+
there is no foreground/background pair for shade and fill to describe — the
|
|
71
|
+
colour *is* the content, and it has to carry itself on the page. WCAG 1.4.11
|
|
72
|
+
asks 3:1 of a graphical object whose colour conveys meaning, and the tint a
|
|
73
|
+
shade badge sits on measures 1.08 to 1.33, so each tone uses a saturated
|
|
74
|
+
step instead: success is \`green-700\` and warning \`yellow-700\`, the
|
|
75
|
+
lightest steps in those families that clear 3:1 while still reading as
|
|
76
|
+
green and yellow.
|
|
77
|
+
- \`success\` deviates from the design in both variants, and both are
|
|
78
|
+
deliberate. In \`shade\` it uses \`green-800\` on \`green-100\` (5.93:1) where
|
|
79
|
+
the design specifies \`green-700\`, which measures 4.17:1 and fails WCAG
|
|
80
|
+
1.4.3. In \`fill\` it is a \`green-700\` background with a white label, where
|
|
81
|
+
the design specifies \`green-500\` with a dark one — \`green-700\` is the
|
|
82
|
+
lightest green that carries white text at 4.5:1, measuring 4.75 against
|
|
83
|
+
\`green-600\`'s 3.20. Both should be reflected back into the design file.
|
|
84
|
+
- \`mode="count"\` sets \`font-variant-numeric: tabular-nums\`, so a counter
|
|
85
|
+
does not change width as it counts — "12" and "99" measure the same.
|
|
86
|
+
- \`variant="bd-light-blue"\` and \`variant="bd-light-green"\` still work; they
|
|
87
|
+
map onto \`primary\`/\`fill\` and \`success\`/\`shade\` respectively.
|
|
88
|
+
- \`icon\` uses \`currentColor\`, so it follows the tone with nothing to sync.
|
|
34
89
|
`
|
|
35
90
|
}
|
|
36
91
|
}
|
|
37
92
|
},
|
|
38
93
|
argTypes: {
|
|
39
|
-
|
|
40
|
-
control : '
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
defaultValue: { summary: '#026DFF' },
|
|
45
|
-
category : 'Appearance'
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
variant: {
|
|
49
|
-
control : 'text',
|
|
50
|
-
description: 'Additional CSS class applied to the inner `<span>` for custom variants.',
|
|
51
|
-
table : {
|
|
52
|
-
type : { summary: 'string' },
|
|
53
|
-
defaultValue: { summary: '' },
|
|
54
|
-
category : 'Appearance'
|
|
55
|
-
}
|
|
94
|
+
mode: {
|
|
95
|
+
control : { type: 'inline-radio' },
|
|
96
|
+
options : ['text', 'dot', 'count'],
|
|
97
|
+
description: 'What the badge carries: slotted text, a bare dot, or a numeral.',
|
|
98
|
+
table : { type: { summary: 'string' }, defaultValue: { summary: 'text' }, category: 'Structure' }
|
|
56
99
|
},
|
|
57
100
|
size: {
|
|
58
|
-
control : { type: '
|
|
59
|
-
options :
|
|
60
|
-
description: '
|
|
61
|
-
table : {
|
|
62
|
-
type : { summary: "'sm' | 'md' | 'lg'" },
|
|
63
|
-
defaultValue: { summary: 'md' },
|
|
64
|
-
category : 'Size'
|
|
65
|
-
}
|
|
101
|
+
control : { type: 'inline-radio' },
|
|
102
|
+
options : SIZES,
|
|
103
|
+
description: 'Type size and padding. No effect when `mode="dot"`.',
|
|
104
|
+
table : { type: { summary: 'string' }, defaultValue: { summary: 'md' }, category: 'Structure' }
|
|
66
105
|
},
|
|
67
|
-
|
|
106
|
+
tone: {
|
|
68
107
|
control : { type: 'select' },
|
|
69
|
-
options :
|
|
70
|
-
description: '
|
|
71
|
-
table : {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
108
|
+
options : TONES,
|
|
109
|
+
description: 'Semantic colour pairing.',
|
|
110
|
+
table : { type: { summary: 'string' }, defaultValue: { summary: 'default' }, category: 'Appearance' }
|
|
111
|
+
},
|
|
112
|
+
variant: {
|
|
113
|
+
control : { type: 'inline-radio' },
|
|
114
|
+
options : VARIANTS,
|
|
115
|
+
description: '`shade` tints the background and keeps dark text; `fill` saturates it.',
|
|
116
|
+
table : { type: { summary: 'string' }, defaultValue: { summary: 'shade' }, category: 'Appearance' }
|
|
76
117
|
},
|
|
77
118
|
icon: {
|
|
78
|
-
control : { type: '
|
|
119
|
+
control : { type: 'inline-radio' },
|
|
79
120
|
options : ['', 'individual', 'family'],
|
|
80
|
-
description: '
|
|
81
|
-
table : {
|
|
82
|
-
type : { summary: "'individual' | 'family' | ''" },
|
|
83
|
-
defaultValue: { summary: '' },
|
|
84
|
-
category : 'Icon'
|
|
85
|
-
}
|
|
121
|
+
description: 'Optional leading icon. Inherits the tone via `currentColor`.',
|
|
122
|
+
table : { type: { summary: 'string' }, defaultValue: { summary: '' }, category: 'Appearance' }
|
|
86
123
|
},
|
|
87
124
|
label: {
|
|
88
125
|
control : 'text',
|
|
89
|
-
description: '
|
|
90
|
-
table : {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
const render = (args) => html`
|
|
100
|
-
<bd-badge
|
|
101
|
-
color="${args.color}"
|
|
102
|
-
variant="${args.variant}"
|
|
103
|
-
size="${args.size}"
|
|
104
|
-
fontsize="${args.fontsize}"
|
|
105
|
-
icon="${args.icon}"
|
|
106
|
-
>${args.label}</bd-badge>
|
|
107
|
-
`;
|
|
108
|
-
|
|
109
|
-
const defaultArgs = {
|
|
110
|
-
color : '#026DFF',
|
|
111
|
-
variant : '',
|
|
112
|
-
size : 'md',
|
|
113
|
-
fontsize: '14',
|
|
114
|
-
icon : '',
|
|
115
|
-
label : 'Badge'
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
// ─── Size Stories ──────────────────────────────────────────────────────────
|
|
119
|
-
|
|
120
|
-
export const SizeSmall = {
|
|
121
|
-
name : 'Size — Small (sm)',
|
|
122
|
-
render : () => html`<bd-badge size="sm">Small Badge</bd-badge>`,
|
|
123
|
-
parameters: {
|
|
124
|
-
docs: {
|
|
125
|
-
description: {
|
|
126
|
-
story: 'Small badge with compact padding and smallest border-radius.'
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
export const SizeMedium = {
|
|
133
|
-
name : 'Size — Medium (md)',
|
|
134
|
-
render : () => html`<bd-badge size="md">Medium Badge</bd-badge>`,
|
|
135
|
-
parameters: {
|
|
136
|
-
docs: {
|
|
137
|
-
description: {
|
|
138
|
-
story: 'Default medium size badge.'
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
export const SizeLarge = {
|
|
145
|
-
name : 'Size — Large (lg)',
|
|
146
|
-
render : () => html`<bd-badge size="lg">Large Badge</bd-badge>`,
|
|
147
|
-
parameters: {
|
|
148
|
-
docs: {
|
|
149
|
-
description: {
|
|
150
|
-
story: 'Large badge with more padding and a larger border-radius.'
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
export const AllSizes = {
|
|
157
|
-
name : 'All Sizes',
|
|
158
|
-
render: () => html`
|
|
159
|
-
<div style="display: flex; align-items: center; gap: 12px; flex-wrap: wrap;">
|
|
160
|
-
<bd-badge size="sm">Small</bd-badge>
|
|
161
|
-
<bd-badge size="md">Medium</bd-badge>
|
|
162
|
-
<bd-badge size="lg">Large</bd-badge>
|
|
163
|
-
</div>
|
|
164
|
-
`,
|
|
165
|
-
parameters: {
|
|
166
|
-
docs: {
|
|
167
|
-
description: {
|
|
168
|
-
story: 'All three sizes rendered side by side for visual comparison.'
|
|
169
|
-
}
|
|
126
|
+
description: 'Accessible name used when `mode="dot"`. Falls back to the tone name.',
|
|
127
|
+
table : { type: { summary: 'string' }, defaultValue: { summary: '' }, category: 'Content' }
|
|
128
|
+
},
|
|
129
|
+
text: {
|
|
130
|
+
control : 'text',
|
|
131
|
+
description: 'Slotted content.',
|
|
132
|
+
table : { category: 'Content' }
|
|
170
133
|
}
|
|
171
|
-
}
|
|
134
|
+
},
|
|
135
|
+
args: {
|
|
136
|
+
mode : 'text',
|
|
137
|
+
size : 'md',
|
|
138
|
+
tone : 'default',
|
|
139
|
+
variant: 'shade',
|
|
140
|
+
icon : '',
|
|
141
|
+
label : '',
|
|
142
|
+
text : 'Badge'
|
|
143
|
+
},
|
|
144
|
+
render: ({ mode, size, tone, variant, icon, label, text }) => html`
|
|
145
|
+
<bd-badge mode="${mode}" size="${size}" tone="${tone}" variant="${variant}" icon="${icon}" label="${label}">${text}</bd-badge>
|
|
146
|
+
`
|
|
172
147
|
};
|
|
173
148
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
render : () => html`<bd-badge color="#026DFF">Default</bd-badge>`,
|
|
179
|
-
parameters: {
|
|
180
|
-
docs: {
|
|
181
|
-
description: { story: 'Default blue badge using the `#026DFF` color.' }
|
|
182
|
-
}
|
|
149
|
+
export const Playground = {
|
|
150
|
+
args: {
|
|
151
|
+
size : "lg",
|
|
152
|
+
label: "40% OFF"
|
|
183
153
|
}
|
|
184
154
|
};
|
|
185
155
|
|
|
186
|
-
export const
|
|
187
|
-
|
|
188
|
-
render: () => html`
|
|
189
|
-
|
|
190
|
-
<
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
parameters: {
|
|
199
|
-
docs: {
|
|
200
|
-
description: {
|
|
201
|
-
story: 'Multiple badges with different `color` values applied via the `--badge-bg` CSS variable.'
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
156
|
+
export const Tones = {
|
|
157
|
+
parameters: { docs: { description: { story: 'Every tone in both variants.' } } },
|
|
158
|
+
render : () => html`
|
|
159
|
+
${VARIANTS.map(variant => html`
|
|
160
|
+
<p style="font:var(--typography-fontWeight-semibold) var(--typography-fontSize-sm)/1.4 var(--typography-fontFamily-sans);margin:var(--spacing-24) 0 var(--spacing-12)">
|
|
161
|
+
variant="${variant}"
|
|
162
|
+
</p>
|
|
163
|
+
${row(variant, TONES.map(tone => html`
|
|
164
|
+
<bd-badge tone="${tone}" variant="${variant}">${tone}</bd-badge>
|
|
165
|
+
`))}
|
|
166
|
+
`)}
|
|
167
|
+
`
|
|
205
168
|
};
|
|
206
169
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
</div>
|
|
217
|
-
`,
|
|
218
|
-
parameters: {
|
|
219
|
-
docs: {
|
|
220
|
-
description: {
|
|
221
|
-
story: 'All three `fontsize` values rendered. Font size overrides the default derived from `size`.'
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
}
|
|
170
|
+
export const Sizes = {
|
|
171
|
+
parameters: { docs: { description: { story: 'The three sizes, in both variants.' } } },
|
|
172
|
+
render : () => html`
|
|
173
|
+
${VARIANTS.map(variant => html`
|
|
174
|
+
${row(variant, SIZES.map(size => html`
|
|
175
|
+
<bd-badge size="${size}" tone="primary" variant="${variant}">${size}</bd-badge>
|
|
176
|
+
`))}
|
|
177
|
+
`)}
|
|
178
|
+
`
|
|
225
179
|
};
|
|
226
180
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
}
|
|
238
|
-
}
|
|
181
|
+
export const Counts = {
|
|
182
|
+
name : 'Count',
|
|
183
|
+
parameters: { docs: { description: { story: 'Tabular numerals and a min-width keep a counter stable as it changes.' } } },
|
|
184
|
+
render : () => html`
|
|
185
|
+
${SIZES.map(size => html`
|
|
186
|
+
${row(size, ['1', '9', '12', '99', '999'].map(n => html`
|
|
187
|
+
<bd-badge mode="count" size="${size}" tone="error" variant="fill">${n}</bd-badge>
|
|
188
|
+
`))}
|
|
189
|
+
`)}
|
|
190
|
+
`
|
|
239
191
|
};
|
|
240
192
|
|
|
241
|
-
export const
|
|
242
|
-
name : '
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
193
|
+
export const Dots = {
|
|
194
|
+
name : 'Dot',
|
|
195
|
+
parameters: { docs: { description: { story: 'A dot in every tone. Neither `size` nor `variant` affects a dot — both rows below are identical by design, because a dot has no foreground/background pair and needs a colour that carries 3:1 on the page.' } } },
|
|
196
|
+
render : () => html`
|
|
197
|
+
${row('any tone', TONES.map(tone => html`
|
|
198
|
+
<bd-badge mode="dot" tone="${tone}" label="${tone}"></bd-badge>
|
|
199
|
+
`))}
|
|
200
|
+
${row('+ fill', TONES.map(tone => html`
|
|
201
|
+
<bd-badge mode="dot" tone="${tone}" variant="fill" label="${tone}"></bd-badge>
|
|
202
|
+
`))}
|
|
203
|
+
`
|
|
251
204
|
};
|
|
252
205
|
|
|
253
|
-
export const
|
|
254
|
-
name
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
206
|
+
export const WithIcon = {
|
|
207
|
+
name : 'With icon',
|
|
208
|
+
parameters: { docs: { description: { story: 'The icon takes its colour from the tone via `currentColor`.' } } },
|
|
209
|
+
render : () => html`
|
|
210
|
+
${row('shade', html`
|
|
258
211
|
<bd-badge icon="individual">Individual</bd-badge>
|
|
259
|
-
<bd-badge icon="family">Family</bd-badge>
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
}
|
|
212
|
+
<bd-badge tone="success" icon="family">Family Pack</bd-badge>
|
|
213
|
+
`)}
|
|
214
|
+
${row('fill', html`
|
|
215
|
+
<bd-badge variant="fill" tone="primary" icon="individual">Individual</bd-badge>
|
|
216
|
+
<bd-badge variant="fill" tone="success" icon="family">Family Pack</bd-badge>
|
|
217
|
+
`)}
|
|
218
|
+
`
|
|
269
219
|
};
|
|
270
220
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
<bd-badge
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
</div>
|
|
281
|
-
`,
|
|
282
|
-
parameters: {
|
|
283
|
-
docs: {
|
|
284
|
-
description: {
|
|
285
|
-
story: 'Three badges combining different sizes, colors, icons, and font sizes for a real-world usage example.'
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
}
|
|
221
|
+
export const Legacy = {
|
|
222
|
+
name : 'Legacy variants',
|
|
223
|
+
parameters: { docs: { description: { story: 'Pre-`ds-badge` markup still renders, mapped onto the new axes.' } } },
|
|
224
|
+
render : () => html`
|
|
225
|
+
${row('mapped', html`
|
|
226
|
+
<bd-badge variant="bd-light-blue">bd-light-blue</bd-badge>
|
|
227
|
+
<bd-badge variant="bd-light-green">bd-light-green</bd-badge>
|
|
228
|
+
`)}
|
|
229
|
+
`
|
|
289
230
|
};
|
|
290
|
-
|
|
291
|
-
export const Playground = {
|
|
292
|
-
name : '🛝 Playground',
|
|
293
|
-
args : { ...defaultArgs },
|
|
294
|
-
render,
|
|
295
|
-
parameters: {
|
|
296
|
-
docs: {
|
|
297
|
-
description: {
|
|
298
|
-
story: 'Fully interactive. Use Controls to adjust color, size, fontsize, icon, variant, and slotted label in real time.'
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
};
|
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
2
|
|
|
3
3
|
export default css`
|
|
4
|
-
|
|
4
|
+
:host {
|
|
5
5
|
display: block;
|
|
6
6
|
width: 100%;
|
|
7
7
|
box-sizing: border-box;
|
|
8
|
-
max-width: 1290px;
|
|
9
|
-
margin-inline: auto;
|
|
10
8
|
}
|
|
11
9
|
|
|
12
|
-
/* === BACKGROUND VARIANT — section-level tint
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
:host([background="tint"]) {
|
|
16
|
-
background-color: var(--
|
|
17
|
-
border-radius: var(--radius-2xl
|
|
18
|
-
padding: var(--spacing-40
|
|
10
|
+
/* === BACKGROUND VARIANT — section-level tint on the column (header +
|
|
11
|
+
track), not per-card, so the panel lands on the page edges every other
|
|
12
|
+
section uses. === */
|
|
13
|
+
:host([background="tint"]) .bd-ensemble {
|
|
14
|
+
background-color: var(--status-brand-surface);
|
|
15
|
+
border-radius: var(--radius-2xl);
|
|
16
|
+
padding-block: var(--spacing-40);
|
|
19
17
|
}
|
|
20
18
|
|
|
21
19
|
/* === HEADER (eyebrow / title / description) === */
|
|
@@ -31,28 +29,35 @@ export default css`
|
|
|
31
29
|
.bd-bentogrid-eyebrow {
|
|
32
30
|
display: block;
|
|
33
31
|
margin: 0;
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
/* The brand text role, not the brand primitive. This is a visible change and
|
|
33
|
+
not a refactor: the role is blue-600, so the eyebrow darkens and its
|
|
34
|
+
contrast on white goes 4.53:1 -> 6.18:1. blue-500 is the step CLAUDE.md
|
|
35
|
+
says is not for text, and no text role exists at blue-500's value -- the
|
|
36
|
+
roles sitting there are surface, border, action and indicator. */
|
|
37
|
+
color: var(--color-text-brand);
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
.bd-bentogrid-title {
|
|
39
41
|
display: block;
|
|
40
42
|
margin: 0;
|
|
41
|
-
color: var(--color-neutral-1000);
|
|
42
|
-
line-height: var(--typography-lineHeight-tight, 1.1);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.bd-bentogrid-description {
|
|
46
46
|
display: block;
|
|
47
47
|
margin: 0;
|
|
48
|
-
color: var(--color-
|
|
48
|
+
color: var(--color-text-muted);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
/* === GRID === */
|
|
52
52
|
.bd-bentogrid-track {
|
|
53
53
|
display: grid;
|
|
54
54
|
grid-template-columns: repeat(var(--bd-bento-total-units, 24), minmax(0, 1fr));
|
|
55
|
-
|
|
55
|
+
/* The fallback names the step rather than repeating its value: --spacing-24
|
|
56
|
+
IS 24px at the default root size, but in rem, so it grows when the reader
|
|
57
|
+
enlarges their text and 24px does not. Identical at 16px root, which is
|
|
58
|
+
why nothing looked wrong and no rule could see it -- the declaration
|
|
59
|
+
reads a legitimate var(). */
|
|
60
|
+
gap: var(--bd-bento-gap, var(--spacing-24));
|
|
56
61
|
width: 100%;
|
|
57
62
|
}
|
|
58
63
|
|
|
@@ -3,6 +3,7 @@ import { tokens } from "../../tokens/tokens.js";
|
|
|
3
3
|
import "../heading/heading.js";
|
|
4
4
|
import "../paragraph/paragraph.js";
|
|
5
5
|
import bentoGridCSS from "./bento-grid.css.js";
|
|
6
|
+
import { ensembleCSS } from "../shared/ensemble.css.js";
|
|
6
7
|
import "./bento-item.js";
|
|
7
8
|
|
|
8
9
|
const BREAKPOINT_WIDTHS = { xl: 1280, lg: 960, md: 640 };
|
|
@@ -78,7 +79,7 @@ class BentoGrid extends LitElement {
|
|
|
78
79
|
_gap : { state: true }
|
|
79
80
|
};
|
|
80
81
|
|
|
81
|
-
static styles = [tokens, bentoGridCSS];
|
|
82
|
+
static styles = [tokens, ensembleCSS, bentoGridCSS];
|
|
82
83
|
|
|
83
84
|
constructor() {
|
|
84
85
|
super();
|
|
@@ -191,10 +192,19 @@ class BentoGrid extends LitElement {
|
|
|
191
192
|
this.style.setProperty("--bd-bento-gap", `${gap}px`);
|
|
192
193
|
|
|
193
194
|
if (columns <= 1) {
|
|
194
|
-
|
|
195
|
+
/* Collapse the subdivision, not just the spans. A 24-unit track carries
|
|
196
|
+
23 internal gaps, so its own minimum width is 23 * gap -- 368px at the
|
|
197
|
+
small gap -- whatever the viewport is: measured, the grid overflowed
|
|
198
|
+
320px by 64px and 375px by 9px for that reason alone. In one column
|
|
199
|
+
the units buy nothing, because every item spans the whole row either
|
|
200
|
+
way, so the track becomes a single column and the floor goes with it. */
|
|
201
|
+
this.style.setProperty("--bd-bento-total-units", "1");
|
|
202
|
+
this._items.forEach((item) => item.style.setProperty("--bd-bento-span", "1"));
|
|
195
203
|
return;
|
|
196
204
|
}
|
|
197
205
|
|
|
206
|
+
this.style.setProperty("--bd-bento-total-units", String(TOTAL_UNITS));
|
|
207
|
+
|
|
198
208
|
this._applyWeights();
|
|
199
209
|
}
|
|
200
210
|
|
|
@@ -204,12 +214,13 @@ class BentoGrid extends LitElement {
|
|
|
204
214
|
|
|
205
215
|
render() {
|
|
206
216
|
return html`
|
|
217
|
+
<div class="bd-ensemble">
|
|
207
218
|
${this.eyebrow || this.title || this.description
|
|
208
219
|
? html`
|
|
209
220
|
<div class="bd-bentogrid-header">
|
|
210
221
|
${this.eyebrow
|
|
211
222
|
? html`
|
|
212
|
-
<bd-p
|
|
223
|
+
<bd-p variant="regular" class="bd-bentogrid-eyebrow">
|
|
213
224
|
<slot name="eyebrow">${this.eyebrow}</slot>
|
|
214
225
|
</bd-p>
|
|
215
226
|
`
|
|
@@ -225,7 +236,7 @@ class BentoGrid extends LitElement {
|
|
|
225
236
|
|
|
226
237
|
${this.description
|
|
227
238
|
? html`
|
|
228
|
-
<bd-p
|
|
239
|
+
<bd-p variant="regular" class="bd-bentogrid-description">
|
|
229
240
|
<slot name="description">${this.description}</slot>
|
|
230
241
|
</bd-p>
|
|
231
242
|
`
|
|
@@ -237,6 +248,7 @@ class BentoGrid extends LitElement {
|
|
|
237
248
|
<div class="bd-bentogrid-track" role="list">
|
|
238
249
|
<slot @slotchange=${this._onSlotChange}></slot>
|
|
239
250
|
</div>
|
|
251
|
+
</div>
|
|
240
252
|
`;
|
|
241
253
|
}
|
|
242
254
|
}
|