@repobit/dex-system-design 0.25.12 → 1.0.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 +204 -0
- package/README.md +131 -8
- package/package.json +96 -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
package/src/blog/tokens.css
CHANGED
|
@@ -225,20 +225,19 @@
|
|
|
225
225
|
CORE DIMENSION TOKENS
|
|
226
226
|
================================ */
|
|
227
227
|
|
|
228
|
-
--dimension-
|
|
229
|
-
--dimension-
|
|
230
|
-
--dimension-
|
|
231
|
-
--dimension-
|
|
232
|
-
--dimension-
|
|
233
|
-
--dimension-
|
|
234
|
-
--dimension-
|
|
235
|
-
--dimension-
|
|
236
|
-
--dimension-
|
|
237
|
-
--dimension-
|
|
238
|
-
--dimension-
|
|
239
|
-
--dimension-
|
|
240
|
-
--dimension-
|
|
241
|
-
--dimension-64px: 64px;
|
|
228
|
+
--dimension-4: 4px;
|
|
229
|
+
--dimension-8: 8px;
|
|
230
|
+
--dimension-12: 12px;
|
|
231
|
+
--dimension-16: 16px;
|
|
232
|
+
--dimension-20: 20px;
|
|
233
|
+
--dimension-24: 24px;
|
|
234
|
+
--dimension-32: 32px;
|
|
235
|
+
--dimension-36: 36px;
|
|
236
|
+
--dimension-40: 40px;
|
|
237
|
+
--dimension-44: 44px;
|
|
238
|
+
--dimension-48: 48px;
|
|
239
|
+
--dimension-56: 56px;
|
|
240
|
+
--dimension-64: 64px;
|
|
242
241
|
|
|
243
242
|
/* ================================
|
|
244
243
|
CORE TRANSITION TOKENS
|
|
@@ -548,17 +547,17 @@
|
|
|
548
547
|
--form-label-required-color: var(--color-red-500);
|
|
549
548
|
--form-label-required-marginLeft: var(--spacing-1);
|
|
550
549
|
|
|
551
|
-
--form-input-small-height: var(--dimension-
|
|
550
|
+
--form-input-small-height: var(--dimension-36);
|
|
552
551
|
--form-input-small-fontSize: var(--typography-fontSize-sm);
|
|
553
552
|
--form-input-small-padding: var(--spacing-8) var(--spacing-12);
|
|
554
553
|
--form-input-small-borderRadius: var(--radius-sm);
|
|
555
554
|
|
|
556
|
-
--form-input-medium-height: var(--dimension-
|
|
555
|
+
--form-input-medium-height: var(--dimension-44);
|
|
557
556
|
--form-input-medium-fontSize: var(--typography-fontSize-base);
|
|
558
557
|
--form-input-medium-padding: var(--spacing-12) var(--spacing-16);
|
|
559
558
|
--form-input-medium-borderRadius: var(--radius-md);
|
|
560
559
|
|
|
561
|
-
--form-input-large-height: var(--dimension-
|
|
560
|
+
--form-input-large-height: var(--dimension-56);
|
|
562
561
|
--form-input-large-fontSize: var(--typography-fontSize-lg);
|
|
563
562
|
--form-input-large-padding: var(--spacing-16) var(--spacing-20);
|
|
564
563
|
--form-input-large-borderRadius: var(--radius-lg);
|
|
@@ -609,21 +608,21 @@
|
|
|
609
608
|
--button-size-small-padding-vertical: var(--spacing-2);
|
|
610
609
|
--button-size-small-padding-horizontal: var(--spacing-4);
|
|
611
610
|
--button-size-small-fontSize: var(--typography-fontSize-sm);
|
|
612
|
-
--button-size-small-height: var(--dimension-
|
|
611
|
+
--button-size-small-height: var(--dimension-36);
|
|
613
612
|
--button-size-small-borderRadius: var(--radius-sm);
|
|
614
613
|
--button-size-small-gap: var(--spacing-1);
|
|
615
614
|
|
|
616
615
|
--button-size-medium-padding-vertical: var(--spacing-12);
|
|
617
616
|
--button-size-medium-padding-horizontal: var(--spacing-20);
|
|
618
617
|
--button-size-medium-fontSize: var(--typography-fontSize-base);
|
|
619
|
-
--button-size-medium-height: var(--dimension-
|
|
618
|
+
--button-size-medium-height: var(--dimension-44);
|
|
620
619
|
--button-size-medium-borderRadius: var(--radius-md);
|
|
621
620
|
--button-size-medium-gap: var(--spacing-2);
|
|
622
621
|
|
|
623
622
|
--button-size-large-padding-vertical: var(--spacing-4);
|
|
624
623
|
--button-size-large-padding-horizontal: var(--spacing-6);
|
|
625
624
|
--button-size-large-fontSize: var(--typography-fontSize-lg);
|
|
626
|
-
--button-size-large-height: var(--dimension-
|
|
625
|
+
--button-size-large-height: var(--dimension-56);
|
|
627
626
|
--button-size-large-borderRadius: var(--radius-lg);
|
|
628
627
|
--button-size-large-gap: var(--spacing-2);
|
|
629
628
|
|
|
@@ -780,21 +779,21 @@
|
|
|
780
779
|
COMPONENT TOKENS - ICON
|
|
781
780
|
================================ */
|
|
782
781
|
|
|
783
|
-
--icon-xs-size: var(--dimension-
|
|
784
|
-
--icon-sm-size: var(--dimension-
|
|
785
|
-
--icon-md-size: var(--dimension-
|
|
786
|
-
--icon-lg-size: var(--dimension-
|
|
787
|
-
--icon-xl-size: var(--dimension-
|
|
788
|
-
--icon-2xl-size: var(--dimension-
|
|
789
|
-
--icon-3xl-size: var(--dimension-
|
|
782
|
+
--icon-xs-size: var(--dimension-12);
|
|
783
|
+
--icon-sm-size: var(--dimension-16);
|
|
784
|
+
--icon-md-size: var(--dimension-20);
|
|
785
|
+
--icon-lg-size: var(--dimension-24);
|
|
786
|
+
--icon-xl-size: var(--dimension-32);
|
|
787
|
+
--icon-2xl-size: var(--dimension-48);
|
|
788
|
+
--icon-3xl-size: var(--dimension-64);
|
|
790
789
|
|
|
791
|
-
--icon-button-small-size: var(--dimension-
|
|
792
|
-
--icon-button-medium-size: var(--dimension-
|
|
793
|
-
--icon-button-large-size: var(--dimension-
|
|
790
|
+
--icon-button-small-size: var(--dimension-16);
|
|
791
|
+
--icon-button-medium-size: var(--dimension-20);
|
|
792
|
+
--icon-button-large-size: var(--dimension-24);
|
|
794
793
|
|
|
795
|
-
--icon-form-small-size: var(--dimension-
|
|
796
|
-
--icon-form-medium-size: var(--dimension-
|
|
797
|
-
--icon-form-large-size: var(--dimension-
|
|
794
|
+
--icon-form-small-size: var(--dimension-16);
|
|
795
|
+
--icon-form-medium-size: var(--dimension-20);
|
|
796
|
+
--icon-form-large-size: var(--dimension-24);
|
|
798
797
|
|
|
799
798
|
--icon-default-color: var(--color-text-secondary);
|
|
800
799
|
--icon-hover-color: var(--color-neutral-700);
|
|
@@ -808,6 +807,7 @@
|
|
|
808
807
|
--icon-success-color: var(--color-green-500);
|
|
809
808
|
--icon-warning-color: var(--color-yellow-500);
|
|
810
809
|
--icon-error-color: var(--color-red-500);
|
|
810
|
+
|
|
811
811
|
/* ================================
|
|
812
812
|
BLOG — LAYOUT
|
|
813
813
|
================================ */
|
|
@@ -915,7 +915,7 @@
|
|
|
915
915
|
--blog-byline-fontSize: var(--typography-fontSize-sm);
|
|
916
916
|
--blog-byline-color: var(--color-text-secondary);
|
|
917
917
|
--blog-byline-gap: var(--spacing-12);
|
|
918
|
-
--blog-byline-avatar-size: var(--dimension-
|
|
918
|
+
--blog-byline-avatar-size: var(--dimension-40);
|
|
919
919
|
|
|
920
920
|
--blog-date-color: var(--color-text-muted);
|
|
921
921
|
--blog-reading-time-color: var(--color-text-muted);
|
|
@@ -940,7 +940,7 @@
|
|
|
940
940
|
--blog-tag-padding: var(--spacing-4) var(--spacing-8);
|
|
941
941
|
--blog-tag-fontSize: var(--typography-label-default-fontSize);
|
|
942
942
|
--blog-tag-fontWeight: var(--typography-label-default-fontWeight);
|
|
943
|
-
--blog-tag-lineHeight: var(--
|
|
943
|
+
--blog-tag-lineHeight: var(--typography-lineHeight-snug);
|
|
944
944
|
--blog-tag-borderRadius: var(--radius-full);
|
|
945
945
|
--blog-tag-border-width: var(--border-width-1);
|
|
946
946
|
--blog-tag-gap: var(--spacing-8);
|
|
@@ -1211,6 +1211,7 @@
|
|
|
1211
1211
|
--blog-newsletter-disclaimer-max-width: 28rem;
|
|
1212
1212
|
--blog-newsletter-spacing-top: var(--spacing-48);
|
|
1213
1213
|
--blog-newsletter-spacing-bottom: var(--spacing-32);
|
|
1214
|
+
|
|
1214
1215
|
/* ================================
|
|
1215
1216
|
LEGACY ALIASES (DEPRECATED)
|
|
1216
1217
|
Do not add new references — use core tokens instead.
|
|
@@ -1232,25 +1233,16 @@
|
|
|
1232
1233
|
--display-large-mobile: 2.75rem;
|
|
1233
1234
|
--display-xlarge-mobile: 3rem;
|
|
1234
1235
|
|
|
1235
|
-
--display-xlarge-line-height: 1.1;
|
|
1236
|
-
--display-medium-line-height: 1.15;
|
|
1237
|
-
--display-xlarge-mobile-line-height: 1.15;
|
|
1238
|
-
--display-medium-mobile-line-height: 1.2;
|
|
1239
|
-
|
|
1240
1236
|
/* Heading sizes (legacy names — map to current scale) */
|
|
1241
1237
|
--heading-xxsmall: var(--typography-fontSize-lg);
|
|
1242
1238
|
--heading-xsmall: var(--typography-fontSize-xl);
|
|
1243
1239
|
--heading-medium: 1.75rem;
|
|
1244
1240
|
--heading-xlarge: var(--typography-fontSize-4xl);
|
|
1245
1241
|
--heading-xxlarge: 2.5rem;
|
|
1246
|
-
--heading-xlarge-line-height: 1.2;
|
|
1247
|
-
--typography-heading-h4-fontSize-line-height: 1.3;
|
|
1248
1242
|
|
|
1249
1243
|
/* Body sizes (legacy names) */
|
|
1250
1244
|
--body-small: 0.8125rem;
|
|
1251
1245
|
--body-xlarge: var(--typography-fontSize-lg);
|
|
1252
|
-
--typography-body-regular-fontSize-line-height: var(--typography-lineHeight-normal);
|
|
1253
|
-
--typography-label-small-fontSize-line-height: 1.35;
|
|
1254
1246
|
|
|
1255
1247
|
/* Font family shorthand (legacy) */
|
|
1256
1248
|
--font-family-mono: var(--typography-fontFamily-mono);
|
|
@@ -1267,7 +1259,6 @@
|
|
|
1267
1259
|
--font-style-sans-normal: normal;
|
|
1268
1260
|
--font-style-sans-italic: italic;
|
|
1269
1261
|
}
|
|
1270
|
-
|
|
1271
1262
|
/* Load once globally — do not import into Lit shadow styles */
|
|
1272
1263
|
|
|
1273
1264
|
@font-face {
|
|
@@ -1509,4 +1500,3 @@
|
|
|
1509
1500
|
font-display: swap;
|
|
1510
1501
|
src: url("/assets/fonts/IBMPlexSansCondensed-SemiBoldItalic.woff2") format("woff2");
|
|
1511
1502
|
}
|
|
1512
|
-
|
|
@@ -2,14 +2,13 @@ import { css } from "lit";
|
|
|
2
2
|
|
|
3
3
|
export default css`
|
|
4
4
|
:host {
|
|
5
|
-
--bd-accesibility-focus: var(--color-blue-500);
|
|
6
5
|
display: block;
|
|
7
6
|
}
|
|
8
7
|
|
|
9
8
|
:host(bd-accordion-bg-item[data-variant="terms-of-use"]) {
|
|
10
9
|
background-color: transparent !important;
|
|
11
10
|
padding: 0;
|
|
12
|
-
border-radius:
|
|
11
|
+
border-radius: var(--radius-none);
|
|
13
12
|
}
|
|
14
13
|
|
|
15
14
|
:host(bd-accordion-bg-item) {
|
|
@@ -17,34 +16,34 @@ export default css`
|
|
|
17
16
|
margin-bottom: var(--spacing-16);
|
|
18
17
|
padding: 0 var(--spacing-16);
|
|
19
18
|
box-sizing: border-box;
|
|
20
|
-
background-color: var(--
|
|
19
|
+
background-color: var(--status-brand-surface);
|
|
21
20
|
border-radius: var(--radius-lg);
|
|
22
21
|
overflow: visible;
|
|
23
22
|
}
|
|
24
23
|
|
|
25
|
-
:host(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
24
|
+
/* The ring is accordion.css.js's :host([data-bd-acc-focus]), which this
|
|
25
|
+
element adopts, so there is one ring rule for the whole family and nothing
|
|
26
|
+
here that could give one variant a different colour -- the divergence P5G
|
|
27
|
+
found and P5G.1 closed stays closed by construction.
|
|
28
|
+
|
|
29
|
+
What this sheet adds is shape, not colour. The ring follows the item's own
|
|
30
|
+
corner: --radius-lg on the tinted FAQ item, which is right. The terms-of-use
|
|
31
|
+
and no-bg items are transparent boxes with --radius-none, so their ring
|
|
32
|
+
would be a hard rectangle, which Foundations/Focus says the ring should
|
|
33
|
+
not be on an element with no shape of its own. They take the focus radius
|
|
34
|
+
while focused. That changes no resting pixel -- these hosts paint no
|
|
35
|
+
background and no border -- and it is the same radius the trigger used to
|
|
36
|
+
take for the same reason. */
|
|
37
|
+
:host(bd-accordion-bg-item[data-variant="terms-of-use"][data-bd-acc-focus]),
|
|
38
|
+
:host(bd-accordion-bg-item[no-bg][data-bd-acc-focus]) {
|
|
39
|
+
border-radius: var(--focus-outline-radius);
|
|
37
40
|
}
|
|
38
41
|
|
|
39
|
-
// :host(bd-accordion-bg-item:last-of-type) {
|
|
40
|
-
// margin-bottom: 0;
|
|
41
|
-
// }
|
|
42
|
-
|
|
43
42
|
:host(bd-accordion-bg-item[no-bg]) {
|
|
44
43
|
margin-bottom: var(--spacing-16);
|
|
45
44
|
padding: 0;
|
|
46
45
|
background-color: transparent;
|
|
47
|
-
border-radius:
|
|
46
|
+
border-radius: var(--radius-none);
|
|
48
47
|
overflow: visible;
|
|
49
48
|
}
|
|
50
49
|
|
|
@@ -52,11 +51,6 @@ export default css`
|
|
|
52
51
|
margin-bottom: 0;
|
|
53
52
|
}
|
|
54
53
|
|
|
55
|
-
:host(bd-accordion-bg-item[no-bg][data-bd-acc-focus]) {
|
|
56
|
-
border-radius: var(--radius-sm);
|
|
57
|
-
box-shadow: var(--focus-outline-primary);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
54
|
/* bd-p in bd-accordion-bg — fara padding bottom */
|
|
61
55
|
::slotted(bd-p) {
|
|
62
56
|
padding-bottom: 0;
|
|
@@ -82,7 +76,7 @@ export default css`
|
|
|
82
76
|
}
|
|
83
77
|
.bd-accordion-bg-item {
|
|
84
78
|
margin-bottom: 0;
|
|
85
|
-
border-radius:
|
|
79
|
+
border-radius: var(--radius-none);
|
|
86
80
|
background-color: transparent;
|
|
87
81
|
overflow: visible;
|
|
88
82
|
transition: box-shadow var(--transition-duration-slow)
|
|
@@ -101,34 +95,37 @@ export default css`
|
|
|
101
95
|
border: none;
|
|
102
96
|
font: inherit;
|
|
103
97
|
text-align: left;
|
|
104
|
-
font-family: var(--typography-fontFamily
|
|
105
|
-
font-size: var(--typography-fontSize
|
|
106
|
-
font-weight: var(--typography-fontWeight
|
|
107
|
-
line-height:
|
|
98
|
+
font-family: var(--typography-control-label-xl-fontFamily);
|
|
99
|
+
font-size: var(--typography-control-label-xl-fontSize);
|
|
100
|
+
font-weight: var(--typography-control-label-xl-fontWeight);
|
|
101
|
+
line-height: var(--typography-control-label-xl-lineHeight);
|
|
108
102
|
background-color: transparent;
|
|
109
|
-
color: var(--color-
|
|
103
|
+
color: var(--color-text-primary);
|
|
110
104
|
transition: color var(--transition-duration-normal) var(--transition-easing-smooth);
|
|
111
105
|
}
|
|
112
106
|
|
|
113
107
|
.bd-accordion-bg-question[aria-expanded="true"] {
|
|
114
|
-
|
|
108
|
+
/* 18px/600 on the blue-50 item ground — below WCAG large (18.66px bold),
|
|
109
|
+
so it needs 4.5:1. blue-500 measured 4.20:1. */
|
|
110
|
+
color: var(--color-text-brand);
|
|
115
111
|
}
|
|
116
112
|
|
|
117
113
|
.bd-accordion-bg-question[aria-expanded="false"] {
|
|
118
|
-
color: var(--color-
|
|
114
|
+
color: var(--color-text-primary);
|
|
119
115
|
}
|
|
120
116
|
|
|
121
117
|
.bd-accordion-bg-question:hover {
|
|
122
|
-
color: var(--color-
|
|
118
|
+
color: var(--color-text-brand);
|
|
123
119
|
}
|
|
124
120
|
|
|
125
121
|
.bd-accordion-bg-question:hover .bd-accordion-bg-question-text {
|
|
126
122
|
text-decoration-line: none;
|
|
127
123
|
}
|
|
128
124
|
|
|
125
|
+
/* No ring on the trigger; see the note on .header:focus-visible in
|
|
126
|
+
accordion.css.js. The item draws it. */
|
|
129
127
|
.bd-accordion-bg-question:focus-visible {
|
|
130
128
|
outline: none;
|
|
131
|
-
box-shadow: none;
|
|
132
129
|
}
|
|
133
130
|
|
|
134
131
|
.bd-accordion-bg-header {
|
|
@@ -142,8 +139,6 @@ export default css`
|
|
|
142
139
|
}
|
|
143
140
|
|
|
144
141
|
.bd-accordion-bg-title {
|
|
145
|
-
font-family: var(--typography-fontFamily-sans);
|
|
146
|
-
font-weight: var(--typography-fontWeight-semibold);
|
|
147
142
|
margin-left: auto;
|
|
148
143
|
margin-right: auto;
|
|
149
144
|
text-align: center;
|
|
@@ -157,17 +152,25 @@ export default css`
|
|
|
157
152
|
display: flex;
|
|
158
153
|
align-items: center;
|
|
159
154
|
justify-content: center;
|
|
160
|
-
|
|
155
|
+
/* the box holds an icon, not text; none collapses the leading to the
|
|
156
|
+
glyph rather than reserving a text line around it */
|
|
157
|
+
line-height: var(--typography-lineHeight-none);
|
|
161
158
|
user-select: none;
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
}
|
|
159
|
+
/* Derived, like accordion.css.js's .toggle: half the difference between
|
|
160
|
+
the first line box and the glyph. The 1.3 that stood here was a literal
|
|
161
|
+
and it did not match this question's own leading -- the text is set at
|
|
162
|
+
control-label-xl, whose line-height is tight (1.25) -- so the glyph sat
|
|
163
|
+
below the optical centre of the type it is meant to align with. */
|
|
164
|
+
margin-top: calc(
|
|
165
|
+
(var(--typography-control-label-xl-lineHeight) * 1em - var(--icon-sm-size)) / 2
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* A ".bd-accordion-bg-icon img" rule stood here and could never match, for
|
|
170
|
+
the same reason as accordion.css.js's ".toggle img": the icon is
|
|
171
|
+
<bd-plus-icon> or <bd-minus-icon> with size and color as props, not an
|
|
172
|
+
<img> this stylesheet can reach. Those props carry --color-text-brand for
|
|
173
|
+
the reason accordion.css.js records at the same rule. */
|
|
171
174
|
|
|
172
175
|
.bd-accordion-bg-answer {
|
|
173
176
|
overflow: hidden;
|
|
@@ -177,10 +180,20 @@ export default css`
|
|
|
177
180
|
calc(var(--icon-sm-size) + var(--spacing-12));
|
|
178
181
|
background-color: transparent;
|
|
179
182
|
font-family: var(--typography-fontFamily-sans);
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
183
|
+
/* body-small: sm / normal / 1.5, which is what this already rendered on all
|
|
184
|
+
three axes. Only the axes this rule declares are adopted -- the role also
|
|
185
|
+
carries a family and a tracking, and importing those would change text
|
|
186
|
+
the rule never spoke for. */
|
|
187
|
+
font-size: var(--typography-body-small-fontSize);
|
|
188
|
+
font-weight: var(--typography-body-small-fontWeight);
|
|
189
|
+
line-height: var(--typography-body-small-lineHeight);
|
|
190
|
+
/* -primary, the default ink. This said -secondary from the day it was
|
|
191
|
+
written, and nothing ever argued for it: it arrived as a raw
|
|
192
|
+
--color-neutral-700 and the token migration only renamed the step to
|
|
193
|
+
whichever role carries that value. -secondary is for supporting copy
|
|
194
|
+
UNDER a title; an answer is the payload of the disclosure, which is body
|
|
195
|
+
copy, and every accordion panel already resolves to -primary. */
|
|
196
|
+
color: var(--color-text-primary);
|
|
184
197
|
transition: none;
|
|
185
198
|
}
|
|
186
199
|
|
|
@@ -200,9 +213,13 @@ export default css`
|
|
|
200
213
|
margin: var(--spacing-0);
|
|
201
214
|
}
|
|
202
215
|
|
|
203
|
-
.bd-accordion-bg-answer > div {
|
|
204
|
-
|
|
205
|
-
|
|
216
|
+
/* A ".bd-accordion-bg-answer > div { overflow: hidden }" rule stood here and
|
|
217
|
+
could never match, and its reason differs from the icon rules above. The
|
|
218
|
+
answer region contains a single <slot>, so its children in the SHADOW tree
|
|
219
|
+
are the slot, not the consumer's markup -- a child combinator never reaches
|
|
220
|
+
slotted content. ::slotted(div) would, and is deliberately not substituted:
|
|
221
|
+
nothing has been clipping here, so turning the clip on now is a behaviour
|
|
222
|
+
change to every accordion body, not a repair. */
|
|
206
223
|
|
|
207
224
|
/* FAQ container — padding 64px top/bottom */
|
|
208
225
|
.bd-accordion-bg-container {
|
|
@@ -220,11 +237,8 @@ export default css`
|
|
|
220
237
|
padding-bottom: 0;
|
|
221
238
|
}
|
|
222
239
|
|
|
223
|
-
/* Inner —
|
|
240
|
+
/* Inner — the page column, centred */
|
|
224
241
|
.bd-accordion-bg-inner {
|
|
225
|
-
max-width: 1290px;
|
|
226
|
-
margin-inline: auto;
|
|
227
|
-
padding-inline: var(--layout-ensemble-inline-padding, var(--spacing-24));
|
|
228
242
|
box-sizing: border-box;
|
|
229
243
|
}
|
|
230
244
|
|
|
@@ -253,4 +267,14 @@ export default css`
|
|
|
253
267
|
.bd-accordion-bg-item.no-bg .bd-accordion-bg-question:hover .bd-accordion-bg-question-text {
|
|
254
268
|
text-decoration-line: none;
|
|
255
269
|
}
|
|
256
|
-
|
|
270
|
+
|
|
271
|
+
/* A reader who asked for less motion was still getting the item shadow and the question colour. Twenty-three
|
|
272
|
+
of the thirty animated directories in this package honour the query; this
|
|
273
|
+
one did not. */
|
|
274
|
+
@media (prefers-reduced-motion: reduce) {
|
|
275
|
+
.bd-accordion-bg-item,
|
|
276
|
+
.bd-accordion-bg-question {
|
|
277
|
+
transition: none;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
`;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { LitElement, html } from "lit";
|
|
2
|
-
|
|
2
|
+
// Installs the design tokens into document scope; see src/tokens/tokens.js
|
|
3
|
+
import "../../tokens/tokens.js";
|
|
3
4
|
import "../heading/heading.js";
|
|
4
5
|
import "../icons/minus-icon.js";
|
|
5
6
|
import "../icons/plus-icon.js";
|
|
6
7
|
import "../paragraph/paragraph.js";
|
|
7
8
|
import accordionCSS from "./accordion-bg.css.js";
|
|
9
|
+
import { ensembleCSS } from "../shared/ensemble.css.js";
|
|
8
10
|
import { accordionItem, accordionSection } from "./accordion.css.js";
|
|
11
|
+
import { onTriggerKeydown } from "./accordion-keyboard.js";
|
|
9
12
|
|
|
10
13
|
class BdAccordionBg extends LitElement {
|
|
11
14
|
static properties = {
|
|
@@ -30,7 +33,7 @@ class BdAccordionBg extends LitElement {
|
|
|
30
33
|
this.guideHref = "#";
|
|
31
34
|
}
|
|
32
35
|
|
|
33
|
-
static styles = [
|
|
36
|
+
static styles = [ensembleCSS, accordionCSS, accordionSection];
|
|
34
37
|
|
|
35
38
|
connectedCallback() {
|
|
36
39
|
super.connectedCallback();
|
|
@@ -71,7 +74,7 @@ class BdAccordionBg extends LitElement {
|
|
|
71
74
|
_renderFaq() {
|
|
72
75
|
return html`
|
|
73
76
|
<div class="bd-accordion-bg-container ${this.noBg ? "no-bg" : ""} ${this.noPadding ? "no-padding" : ""}">
|
|
74
|
-
<div class="bd-accordion-bg-inner">
|
|
77
|
+
<div class="bd-ensemble bd-accordion-bg-inner">
|
|
75
78
|
<div class="bd-accordion-bg-header">
|
|
76
79
|
<bd-h as="h2" class="bd-accordion-bg-title">${this.title}</bd-h>
|
|
77
80
|
</div>
|
|
@@ -87,7 +90,7 @@ class BdAccordionBg extends LitElement {
|
|
|
87
90
|
<div class="bd-accordion-section-container">
|
|
88
91
|
<div class="bd-accordion-section-inner">
|
|
89
92
|
${this.title
|
|
90
|
-
? html`<bd-h as="h6" paddingBottom="
|
|
93
|
+
? html`<bd-h as="h6" paddingBottom="32" fontWeight="bold" class="section-title">${this.title}</bd-h>`
|
|
91
94
|
: ""}
|
|
92
95
|
<slot></slot>
|
|
93
96
|
<slot name="footer"></slot>
|
|
@@ -96,7 +99,7 @@ class BdAccordionBg extends LitElement {
|
|
|
96
99
|
<p class="user-guide-link">
|
|
97
100
|
<a href=${this.guideHref}>
|
|
98
101
|
${this.guideIcon
|
|
99
|
-
? html`<bd-plus-icon size="16" color="
|
|
102
|
+
? html`<bd-plus-icon size="16" color="var(--color-text-brand)"></bd-plus-icon>`
|
|
100
103
|
: ""}
|
|
101
104
|
${this.guideLabel}
|
|
102
105
|
</a>
|
|
@@ -136,7 +139,7 @@ class BdAccordionBgItem extends LitElement {
|
|
|
136
139
|
this._panelId = `acc-bg-p-${id}`;
|
|
137
140
|
}
|
|
138
141
|
|
|
139
|
-
static styles = [
|
|
142
|
+
static styles = [accordionCSS, accordionItem];
|
|
140
143
|
|
|
141
144
|
connectedCallback() {
|
|
142
145
|
super.connectedCallback();
|
|
@@ -169,6 +172,10 @@ class BdAccordionBgItem extends LitElement {
|
|
|
169
172
|
this.open = !this.open;
|
|
170
173
|
}
|
|
171
174
|
|
|
175
|
+
/* See the note on _onTriggerFocusIn in accordion.js: the trigger is the
|
|
176
|
+
focus target, the item draws the ring, and this attribute is how the host
|
|
177
|
+
learns the trigger is :focus-visible. Re-run on keydown for the reason
|
|
178
|
+
given there. */
|
|
172
179
|
_onTriggerFocusIn() {
|
|
173
180
|
const btn = this.renderRoot?.querySelector(".bd-accordion-bg-question, .header");
|
|
174
181
|
if (!btn) return;
|
|
@@ -185,6 +192,16 @@ class BdAccordionBgItem extends LitElement {
|
|
|
185
192
|
this.removeAttribute("data-bd-acc-focus");
|
|
186
193
|
}
|
|
187
194
|
|
|
195
|
+
_onTriggerKeydown(e) {
|
|
196
|
+
onTriggerKeydown(this, e);
|
|
197
|
+
this._onTriggerFocusIn();
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/** Move keyboard focus to this item's disclosure trigger. */
|
|
201
|
+
focusTrigger() {
|
|
202
|
+
this.renderRoot?.querySelector(".bd-accordion-bg-question, .header")?.focus();
|
|
203
|
+
}
|
|
204
|
+
|
|
188
205
|
_renderTerms() {
|
|
189
206
|
return html`
|
|
190
207
|
<button
|
|
@@ -195,11 +212,12 @@ class BdAccordionBgItem extends LitElement {
|
|
|
195
212
|
@click=${this.toggleItem}
|
|
196
213
|
@focusin=${this._onTriggerFocusIn}
|
|
197
214
|
@focusout=${this._onTriggerFocusOut}
|
|
215
|
+
@keydown=${this._onTriggerKeydown}
|
|
198
216
|
>
|
|
199
217
|
<span class="toggle" aria-hidden="true">
|
|
200
218
|
${this.open
|
|
201
|
-
? html`<bd-minus-icon size="16" color="
|
|
202
|
-
: html`<bd-plus-icon size="16" color="
|
|
219
|
+
? html`<bd-minus-icon size="16" color="var(--color-text-brand)"></bd-minus-icon>`
|
|
220
|
+
: html`<bd-plus-icon size="16" color="var(--color-text-brand)"></bd-plus-icon>`}
|
|
203
221
|
</span>
|
|
204
222
|
<span class="title">${this.title}</span>
|
|
205
223
|
</button>
|
|
@@ -221,11 +239,12 @@ class BdAccordionBgItem extends LitElement {
|
|
|
221
239
|
@click=${this.toggleItem}
|
|
222
240
|
@focusin=${this._onTriggerFocusIn}
|
|
223
241
|
@focusout=${this._onTriggerFocusOut}
|
|
242
|
+
@keydown=${this._onTriggerKeydown}
|
|
224
243
|
>
|
|
225
244
|
<span class="bd-accordion-bg-icon" aria-hidden="true">
|
|
226
245
|
${this.open
|
|
227
|
-
? html`<bd-minus-icon size="16" color="
|
|
228
|
-
: html`<bd-plus-icon size="16" color="
|
|
246
|
+
? html`<bd-minus-icon size="16" color="var(--color-text-brand)"></bd-minus-icon>`
|
|
247
|
+
: html`<bd-plus-icon size="16" color="var(--color-text-brand)"></bd-plus-icon>`}
|
|
229
248
|
</span>
|
|
230
249
|
<span class="bd-accordion-bg-question-text">${this.title}</span>
|
|
231
250
|
</button>
|