@repobit/dex-system-design 2.5.1 → 2.7.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 +91 -0
- package/README.md +2 -1
- package/package.json +14 -27
- package/schemas/component-manifest.json +233 -33
- package/schemas/manifest-omissions.json +23 -0
- package/src/components/accordion/accordion-bg.css.js +39 -30
- package/src/components/accordion/accordion-bg.js +17 -28
- package/src/components/accordion/accordion-bg.stories.js +5 -0
- package/src/components/accordion/accordion-panel.js +24 -0
- package/src/components/accordion/accordion.css.js +105 -111
- package/src/components/accordion/accordion.js +23 -37
- package/src/components/accordion/accordion.stories.js +5 -1
- package/src/components/anchor/anchor-nav.css.js +131 -53
- package/src/components/anchor/anchor-nav.js +276 -201
- package/src/components/annotation/annotation.css.js +7 -4
- package/src/components/architecture.stories.js +8 -7
- package/src/components/audience-card/audience-card.css.js +30 -4
- package/src/components/audience-card/audience-card.js +8 -13
- package/src/components/awards/awards-flex.css.js +23 -6
- package/src/components/awards/awards-flex.js +21 -6
- package/src/components/awards/awards-spotlight.css.js +25 -5
- package/src/components/awards/awards-spotlight.js +19 -7
- package/src/components/awards/awards.css.js +20 -8
- package/src/components/awards/awards.js +30 -91
- package/src/components/awards/awards.stories.js +5 -5
- package/src/components/awards/scroll-slides.js +128 -0
- package/src/components/back/back.css.js +2 -0
- package/src/components/badge/badge.css.js +15 -0
- package/src/components/bento-grid/bento-grid.css.js +105 -11
- package/src/components/bento-grid/bento-grid.js +37 -124
- package/src/components/bento-grid/bento-grid.stories.js +3 -2
- package/src/components/bento-grid/bento-item.css.js +71 -32
- package/src/components/bento-grid/bento-item.js +1 -30
- package/src/components/blockquote/blockquote.css.js +2 -2
- package/src/components/breadcrumb/breadcrumb.css.js +10 -9
- package/src/components/breadcrumb/breadcrumb.js +35 -34
- package/src/components/button/button.css.js +42 -17
- package/src/components/button/button.js +84 -3
- package/src/components/button/button.stories.js +17 -0
- package/src/components/card-features/card-features.css.js +23 -2
- package/src/components/card-features/card-features.js +6 -48
- package/src/components/cards/card.css.js +43 -14
- package/src/components/cards/card.js +43 -177
- package/src/components/cards/card.stories.js +8 -10
- package/src/components/carousel/carousel.css.js +101 -70
- package/src/components/carousel/carousel.js +107 -71
- package/src/components/carousel/carousel.stories.js +18 -16
- package/src/components/checkbox/checkbox.css.js +26 -9
- package/src/components/checkbox/checkbox.js +73 -39
- package/src/components/checkbox/checkbox.stories.js +35 -18
- package/src/components/compare/compare.css.js +68 -10
- package/src/components/compare/compare.js +40 -103
- package/src/components/compare/compare.stories.js +1 -1
- package/src/components/compatibility-table/compatibility-table.css.js +70 -37
- package/src/components/compatibility-table/compatibility-table.js +47 -40
- package/src/components/compatibility-table/compatibility-table.stories.js +78 -1
- package/src/components/display/display.css.js +7 -0
- package/src/components/dropdown/dropdown.css.js +20 -3
- package/src/components/dropdown/dropdown.js +57 -21
- package/src/components/dropdown/dropdown.stories.js +31 -9
- package/src/components/features/features.css.js +56 -21
- package/src/components/features/features.js +7 -117
- package/src/components/fieldset/fieldset.stories.js +68 -0
- package/src/components/footer/footer-images.js +34 -0
- package/src/components/footer/footer-links-group.css.js +10 -10
- package/src/components/footer/footer-locale.js +47 -0
- package/src/components/footer/footer-lp.js +27 -114
- package/src/components/footer/footer-lp.stories.js +2 -2
- package/src/components/footer/footer-nav-menu.css.js +2 -2
- package/src/components/footer/footer-nav-menu.js +8 -3
- package/src/components/footer/footer.css.js +228 -197
- package/src/components/footer/footer.js +109 -187
- package/src/components/footer/footer.stories.js +14 -4
- package/src/components/grid/grid.css.js +56 -20
- package/src/components/grid/grid.js +20 -15
- package/src/components/grid/grid.stories.js +39 -11
- package/src/components/header/header-code.css.js +20 -11
- package/src/components/header/header-code.js +1 -1
- package/src/components/header/header.css.js +20 -14
- package/src/components/header/header.js +6 -7
- package/src/components/header/header.stories.js +29 -24
- package/src/components/heading/heading.css.js +11 -0
- package/src/components/hero/hero.js +10 -2
- package/src/components/highlight/highlight.css.js +30 -6
- package/src/components/icons/arrow-icon.js +4 -1
- package/src/components/icons/arrow-right-icon.js +5 -1
- package/src/components/icons/icon-element.js +18 -0
- package/src/components/image/image.js +29 -9
- package/src/components/image/image.stories.js +38 -2
- package/src/components/input/custom-form.stories.js +38 -7
- package/src/components/input/input-clipboard.css.js +15 -1
- package/src/components/input/input-clipboard.js +84 -21
- package/src/components/input/input.js +27 -7
- package/src/components/install-options/install-options.css.js +26 -6
- package/src/components/install-options/install-options.js +32 -8
- package/src/components/label/label.css.js +1 -1
- package/src/components/light-carousel/light-carousel.css.js +100 -48
- package/src/components/light-carousel/light-carousel.js +43 -5
- package/src/components/link/link.css.js +15 -15
- package/src/components/link/link.js +17 -1
- package/src/components/link/link.stories.js +20 -7
- package/src/components/list/list.css.js +3 -3
- package/src/components/logo-marquee/logo-marquee.css.js +12 -1
- package/src/components/logo-marquee/logo-marquee.js +33 -8
- package/src/components/logo-marquee/logo-marquee.stories.js +10 -4
- package/src/components/modal/modal.css.js +74 -40
- package/src/components/modal/modal.js +85 -74
- package/src/components/modal/modal.stories.js +27 -14
- package/src/components/motion-art/motion-art.js +67 -1
- package/src/components/page-switcher/page-switcher.css.js +27 -9
- package/src/components/page-switcher/page-switcher.js +11 -8
- package/src/components/partner-banner/partner-banner.css.js +2 -0
- package/src/components/picture/picture.css.js +4 -4
- package/src/components/picture/picture.js +13 -3
- package/src/components/picture/picture.stories.js +28 -2
- package/src/components/post-card/post-card.css.js +18 -3
- package/src/components/pricing-cards/adopt-styles.js +16 -0
- package/src/components/pricing-cards/new-pricing-card.js +2 -4
- package/src/components/pricing-cards/new-pricing-card.stories.js +20 -22
- package/src/components/pricing-cards/pricing-card-actions.css.js +8 -12
- package/src/components/pricing-cards/pricing-card-actions.js +26 -13
- package/src/components/pricing-cards/pricing-card-container.css.js +4 -3
- package/src/components/pricing-cards/pricing-card-container.js +10 -4
- package/src/components/pricing-cards/pricing-card-header.css.js +5 -4
- package/src/components/pricing-cards/pricing-card-header.js +18 -31
- package/src/components/pricing-cards/pricing-card-pricing.css.js +84 -61
- package/src/components/pricing-cards/pricing-card-pricing.js +38 -24
- package/src/components/pricing-cards/pricing-card-show-more.js +8 -3
- package/src/components/pricing-cards/pricing-card.css.js +75 -41
- package/src/components/pricing-cards/pricing-card.js +356 -308
- package/src/components/progress/progress.css.js +58 -13
- package/src/components/progress/progress.js +13 -10
- package/src/components/progress/progress.stories.js +9 -7
- package/src/components/radio/radio-group.css.js +42 -0
- package/src/components/radio/radio-group.js +89 -0
- package/src/components/radio/radio.css.js +63 -6
- package/src/components/radio/radio.js +173 -140
- package/src/components/radio/radio.stories.js +99 -44
- package/src/components/radio/toggle-radio.js +44 -0
- package/src/components/review/review-grid.css.js +5 -1
- package/src/components/review/review-grid.js +2 -0
- package/src/components/review/review.js +13 -0
- package/src/components/shared/announcer.js +37 -0
- package/src/components/shared/fill-width.css.js +29 -0
- package/src/components/shared/form-control.js +194 -0
- package/src/components/shared/form-field.css.js +31 -3
- package/src/components/shared/token-scales.js +75 -26
- package/src/components/spotlight-section/spotlight-section.js +2 -2
- package/src/components/stat/stat-highlight.js +1 -1
- package/src/components/stat/stat.css.js +18 -3
- package/src/components/switch/switch.css.js +58 -5
- package/src/components/switch/switch.js +53 -5
- package/src/components/switch/switch.stories.js +30 -8
- package/src/components/tab-list/tab-list.css.js +51 -13
- package/src/components/tab-list/tab-list.js +7 -2
- package/src/components/tab-list/tab-list.stories.js +2 -2
- package/src/components/tabs/tabs.css.js +18 -1
- package/src/components/tabs/tabs.js +119 -41
- package/src/components/terminal/terminal-message.css.js +6 -1
- package/src/components/termsOfUse/terms.css.js +4 -2
- package/src/components/textarea/textarea.js +22 -7
- package/src/components/textarea/textarea.stories.js +12 -9
- package/src/components/trust-panel/trust-panel.css.js +13 -3
- package/src/components/ultimate-security-demo.stories.js +5 -5
- package/src/components/video/video.css.js +5 -0
- package/src/components/video/video.js +5 -0
- package/src/components/video/video.stories.js +12 -0
- package/src/components/video-player/video-player.css.js +20 -8
- package/src/components/video-player/video-player.js +74 -20
- package/src/components/video-player/video-player.stories.js +17 -3
- package/src/tokens/brands.stories.js +1 -1
- package/src/tokens/themes/index.js +2 -2
- package/src/tokens/typography.stories.js +4 -3
- package/src/vendor/motion-art/README.md +4 -1
- package/src/components/footer/footer-lp.css.js +0 -159
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"bd-anchor-nav: component declares \"ctaLabel\" but the manifest omits it",
|
|
26
26
|
"bd-anchor-nav: component declares \"items\" but the manifest omits it",
|
|
27
27
|
"bd-anchor-nav: component declares \"maxWidth\" but the manifest omits it",
|
|
28
|
+
"bd-button-link: component declares \"type\" but the manifest omits it",
|
|
28
29
|
"bd-button: component declares \"buyLink\" but the manifest omits it",
|
|
29
30
|
"bd-button: component declares \"href\" but the manifest omits it",
|
|
30
31
|
"bd-button: component declares \"rel\" but the manifest omits it",
|
|
@@ -65,6 +66,7 @@
|
|
|
65
66
|
"bd-contact-button: component declares \"strong\" but the manifest omits it",
|
|
66
67
|
"bd-contact-button: component declares \"surface\" but the manifest omits it",
|
|
67
68
|
"bd-contact-button: component declares \"target\" but the manifest omits it",
|
|
69
|
+
"bd-contact-button: component declares \"type\" but the manifest omits it",
|
|
68
70
|
"bd-contact-button: component declares \"variant\" but the manifest omits it",
|
|
69
71
|
"bd-feature-col is registered by ./features but absent from the manifest",
|
|
70
72
|
"bd-features is registered by ./features but absent from the manifest",
|
|
@@ -78,6 +80,8 @@
|
|
|
78
80
|
"bd-pricing-container: component declares \"highlight\" but the manifest omits it",
|
|
79
81
|
"bd-pricing-container: component declares \"identity\" but the manifest omits it",
|
|
80
82
|
"bd-pricing-container: component declares \"identityExtended\" but the manifest omits it",
|
|
83
|
+
"bd-pricing-container: component declares \"learnMoreHref\" but the manifest omits it",
|
|
84
|
+
"bd-pricing-container: component declares \"panelId\" but the manifest omits it",
|
|
81
85
|
"bd-pricing-container: component declares \"parentalControl\" but the manifest omits it",
|
|
82
86
|
"bd-pricing-container: component declares \"privacy\" but the manifest omits it",
|
|
83
87
|
"bd-pricing-container: component declares \"productId\" but the manifest omits it",
|
|
@@ -112,64 +116,83 @@
|
|
|
112
116
|
"compare-card: component declares \"scoreLabel\" but the manifest omits it",
|
|
113
117
|
"compare-card: component declares \"subtitle\" but the manifest omits it",
|
|
114
118
|
"compare-card: component declares \"variant\" but the manifest omits it",
|
|
119
|
+
"pricing-card-family: component declares \"panelId\" but the manifest omits it",
|
|
115
120
|
"pricing-card-features: component declares \"currency\" but the manifest omits it",
|
|
116
121
|
"pricing-card-features: component declares \"highlight\" but the manifest omits it",
|
|
117
122
|
"pricing-card-features: component declares \"identity\" but the manifest omits it",
|
|
118
123
|
"pricing-card-features: component declares \"identityExtended\" but the manifest omits it",
|
|
124
|
+
"pricing-card-features: component declares \"learnMoreHref\" but the manifest omits it",
|
|
119
125
|
"pricing-card-features: component declares \"locale\" but the manifest omits it",
|
|
126
|
+
"pricing-card-features: component declares \"panelId\" but the manifest omits it",
|
|
120
127
|
"pricing-card-features: component declares \"parentalControl\" but the manifest omits it",
|
|
121
128
|
"pricing-card-features: component declares \"planType\" but the manifest omits it",
|
|
122
129
|
"pricing-card-features: component declares \"privacy\" but the manifest omits it",
|
|
123
130
|
"pricing-card-features: component declares \"productId\" but the manifest omits it",
|
|
131
|
+
"pricing-card-features: component declares \"termsHref\" but the manifest omits it",
|
|
124
132
|
"pricing-card-features: component declares \"title\" but the manifest omits it",
|
|
125
133
|
"pricing-card-identity-extended: component declares \"currency\" but the manifest omits it",
|
|
126
134
|
"pricing-card-identity-extended: component declares \"features\" but the manifest omits it",
|
|
127
135
|
"pricing-card-identity-extended: component declares \"highlight\" but the manifest omits it",
|
|
128
136
|
"pricing-card-identity-extended: component declares \"identityExtended\" but the manifest omits it",
|
|
137
|
+
"pricing-card-identity-extended: component declares \"learnMoreHref\" but the manifest omits it",
|
|
129
138
|
"pricing-card-identity-extended: component declares \"locale\" but the manifest omits it",
|
|
139
|
+
"pricing-card-identity-extended: component declares \"panelId\" but the manifest omits it",
|
|
130
140
|
"pricing-card-identity-extended: component declares \"parentalControl\" but the manifest omits it",
|
|
131
141
|
"pricing-card-identity-extended: component declares \"planType\" but the manifest omits it",
|
|
132
142
|
"pricing-card-identity-extended: component declares \"privacy\" but the manifest omits it",
|
|
133
143
|
"pricing-card-identity-extended: component declares \"productId\" but the manifest omits it",
|
|
144
|
+
"pricing-card-identity-extended: component declares \"termsHref\" but the manifest omits it",
|
|
134
145
|
"pricing-card-identity-extended: component declares \"title\" but the manifest omits it",
|
|
135
146
|
"pricing-card-identity: component declares \"currency\" but the manifest omits it",
|
|
136
147
|
"pricing-card-identity: component declares \"features\" but the manifest omits it",
|
|
137
148
|
"pricing-card-identity: component declares \"highlight\" but the manifest omits it",
|
|
138
149
|
"pricing-card-identity: component declares \"identityExtended\" but the manifest omits it",
|
|
150
|
+
"pricing-card-identity: component declares \"learnMoreHref\" but the manifest omits it",
|
|
139
151
|
"pricing-card-identity: component declares \"locale\" but the manifest omits it",
|
|
152
|
+
"pricing-card-identity: component declares \"panelId\" but the manifest omits it",
|
|
140
153
|
"pricing-card-identity: component declares \"parentalControl\" but the manifest omits it",
|
|
141
154
|
"pricing-card-identity: component declares \"planType\" but the manifest omits it",
|
|
142
155
|
"pricing-card-identity: component declares \"privacy\" but the manifest omits it",
|
|
143
156
|
"pricing-card-identity: component declares \"productId\" but the manifest omits it",
|
|
157
|
+
"pricing-card-identity: component declares \"termsHref\" but the manifest omits it",
|
|
144
158
|
"pricing-card-identity: component declares \"title\" but the manifest omits it",
|
|
145
159
|
"pricing-card-parental-control: component declares \"currency\" but the manifest omits it",
|
|
146
160
|
"pricing-card-parental-control: component declares \"features\" but the manifest omits it",
|
|
147
161
|
"pricing-card-parental-control: component declares \"highlight\" but the manifest omits it",
|
|
148
162
|
"pricing-card-parental-control: component declares \"identity\" but the manifest omits it",
|
|
149
163
|
"pricing-card-parental-control: component declares \"identityExtended\" but the manifest omits it",
|
|
164
|
+
"pricing-card-parental-control: component declares \"learnMoreHref\" but the manifest omits it",
|
|
150
165
|
"pricing-card-parental-control: component declares \"locale\" but the manifest omits it",
|
|
166
|
+
"pricing-card-parental-control: component declares \"panelId\" but the manifest omits it",
|
|
151
167
|
"pricing-card-parental-control: component declares \"planType\" but the manifest omits it",
|
|
152
168
|
"pricing-card-parental-control: component declares \"privacy\" but the manifest omits it",
|
|
153
169
|
"pricing-card-parental-control: component declares \"productId\" but the manifest omits it",
|
|
170
|
+
"pricing-card-parental-control: component declares \"termsHref\" but the manifest omits it",
|
|
154
171
|
"pricing-card-parental-control: component declares \"title\" but the manifest omits it",
|
|
155
172
|
"pricing-card-privacy: component declares \"currency\" but the manifest omits it",
|
|
156
173
|
"pricing-card-privacy: component declares \"features\" but the manifest omits it",
|
|
157
174
|
"pricing-card-privacy: component declares \"highlight\" but the manifest omits it",
|
|
158
175
|
"pricing-card-privacy: component declares \"identity\" but the manifest omits it",
|
|
159
176
|
"pricing-card-privacy: component declares \"identityExtended\" but the manifest omits it",
|
|
177
|
+
"pricing-card-privacy: component declares \"learnMoreHref\" but the manifest omits it",
|
|
160
178
|
"pricing-card-privacy: component declares \"locale\" but the manifest omits it",
|
|
179
|
+
"pricing-card-privacy: component declares \"panelId\" but the manifest omits it",
|
|
161
180
|
"pricing-card-privacy: component declares \"parentalControl\" but the manifest omits it",
|
|
162
181
|
"pricing-card-privacy: component declares \"planType\" but the manifest omits it",
|
|
163
182
|
"pricing-card-privacy: component declares \"productId\" but the manifest omits it",
|
|
183
|
+
"pricing-card-privacy: component declares \"termsHref\" but the manifest omits it",
|
|
164
184
|
"pricing-card-privacy: component declares \"title\" but the manifest omits it",
|
|
185
|
+
"pricing-card: component declares \"panelId\" but the manifest omits it",
|
|
165
186
|
"pricing-switch: component declares \"currency\" but the manifest omits it",
|
|
166
187
|
"pricing-switch: component declares \"features\" but the manifest omits it",
|
|
167
188
|
"pricing-switch: component declares \"highlight\" but the manifest omits it",
|
|
168
189
|
"pricing-switch: component declares \"identity\" but the manifest omits it",
|
|
169
190
|
"pricing-switch: component declares \"identityExtended\" but the manifest omits it",
|
|
191
|
+
"pricing-switch: component declares \"learnMoreHref\" but the manifest omits it",
|
|
170
192
|
"pricing-switch: component declares \"locale\" but the manifest omits it",
|
|
171
193
|
"pricing-switch: component declares \"parentalControl\" but the manifest omits it",
|
|
172
194
|
"pricing-switch: component declares \"privacy\" but the manifest omits it",
|
|
173
195
|
"pricing-switch: component declares \"productId\" but the manifest omits it",
|
|
196
|
+
"pricing-switch: component declares \"termsHref\" but the manifest omits it",
|
|
174
197
|
"pricing-switch: component declares \"title\" but the manifest omits it"
|
|
175
198
|
]
|
|
@@ -7,23 +7,24 @@ export default css`
|
|
|
7
7
|
|
|
8
8
|
:host(bd-accordion-bg-item[data-variant="terms-of-use"]) {
|
|
9
9
|
background-color: transparent !important;
|
|
10
|
-
padding: 0;
|
|
11
10
|
border-radius: var(--radius-none);
|
|
12
11
|
}
|
|
13
12
|
|
|
13
|
+
/* The inline padding is on the item's .disclosure, not here: the focus
|
|
14
|
+
ring is drawn on .disclosure (accordion.css.js), and it has to go round
|
|
15
|
+
the whole tinted card, not 16px inside it. */
|
|
14
16
|
:host(bd-accordion-bg-item) {
|
|
15
17
|
display: block;
|
|
16
18
|
margin-bottom: var(--spacing-16);
|
|
17
|
-
padding: 0 var(--spacing-16);
|
|
18
19
|
box-sizing: border-box;
|
|
19
20
|
background-color: var(--status-brand-surface);
|
|
20
21
|
border-radius: var(--shape-radius-lg);
|
|
21
22
|
overflow: visible;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
/* The ring is accordion.css.js's
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
/* The ring is accordion.css.js's .disclosure rule, which this element
|
|
26
|
+
adopts, so there is one ring rule for the whole family and nothing here
|
|
27
|
+
that could give one variant a different colour -- the divergence P5G
|
|
27
28
|
found and P5G.1 closed stays closed by construction.
|
|
28
29
|
|
|
29
30
|
What this sheet adds is shape, not colour. The ring follows the item's own
|
|
@@ -34,14 +35,23 @@ export default css`
|
|
|
34
35
|
while focused. That changes no resting pixel -- these hosts paint no
|
|
35
36
|
background and no border -- and it is the same radius the trigger used to
|
|
36
37
|
take for the same reason. */
|
|
37
|
-
:host(bd-accordion-bg-item[data-variant="terms-of-use"]
|
|
38
|
-
:host(bd-accordion-bg-item[no-bg]
|
|
38
|
+
:host(bd-accordion-bg-item[data-variant="terms-of-use"]) .disclosure:has(> .header:focus-visible),
|
|
39
|
+
:host(bd-accordion-bg-item[no-bg]) .disclosure:has(> .bd-accordion-bg-question:focus-visible) {
|
|
39
40
|
border-radius: var(--focus-outline-radius);
|
|
40
41
|
}
|
|
41
42
|
|
|
43
|
+
/* The tinted card's inset, which the host carried until the ring moved to
|
|
44
|
+
this element. The two transparent variants have none. */
|
|
45
|
+
.disclosure.bd-accordion-bg-item {
|
|
46
|
+
padding-inline: var(--spacing-16);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:host(bd-accordion-bg-item[no-bg]) .disclosure {
|
|
50
|
+
padding-inline: 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
42
53
|
:host(bd-accordion-bg-item[no-bg]) {
|
|
43
54
|
margin-bottom: var(--spacing-16);
|
|
44
|
-
padding: 0;
|
|
45
55
|
background-color: transparent;
|
|
46
56
|
border-radius: var(--radius-none);
|
|
47
57
|
overflow: visible;
|
|
@@ -71,16 +81,13 @@ export default css`
|
|
|
71
81
|
padding-top: var(--spacing-16);
|
|
72
82
|
font-style: italic;
|
|
73
83
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
84
|
+
/* No radius and no box-shadow transition of its own: this is the item's
|
|
85
|
+
.disclosure, and it takes the host's corner so the focus ring does, and
|
|
86
|
+
draws that ring at once, as the host did. */
|
|
77
87
|
.bd-accordion-bg-item {
|
|
78
88
|
margin-bottom: 0;
|
|
79
|
-
border-radius: var(--radius-none);
|
|
80
89
|
background-color: transparent;
|
|
81
90
|
overflow: visible;
|
|
82
|
-
transition: box-shadow var(--transition-duration-slow)
|
|
83
|
-
var(--transition-easing-smooth);
|
|
84
91
|
}
|
|
85
92
|
|
|
86
93
|
.bd-accordion-bg-question {
|
|
@@ -94,7 +101,7 @@ export default css`
|
|
|
94
101
|
margin: 0;
|
|
95
102
|
border: none;
|
|
96
103
|
font: inherit;
|
|
97
|
-
text-align:
|
|
104
|
+
text-align: start;
|
|
98
105
|
font-family: var(--typography-control-label-xl-fontFamily);
|
|
99
106
|
font-size: var(--typography-control-label-xl-fontSize);
|
|
100
107
|
font-weight: var(--typography-control-label-xl-fontWeight);
|
|
@@ -139,8 +146,7 @@ export default css`
|
|
|
139
146
|
}
|
|
140
147
|
|
|
141
148
|
.bd-accordion-bg-title {
|
|
142
|
-
margin-
|
|
143
|
-
margin-right: auto;
|
|
149
|
+
margin-inline: auto;
|
|
144
150
|
text-align: center;
|
|
145
151
|
}
|
|
146
152
|
|
|
@@ -155,6 +161,8 @@ export default css`
|
|
|
155
161
|
/* the box holds an icon, not text; none collapses the leading to the
|
|
156
162
|
glyph rather than reserving a text line around it */
|
|
157
163
|
line-height: var(--typography-lineHeight-none);
|
|
164
|
+
/* Safari reads only the prefixed property */
|
|
165
|
+
-webkit-user-select: none;
|
|
158
166
|
user-select: none;
|
|
159
167
|
/* Derived, like accordion.css.js's .toggle: half the difference between
|
|
160
168
|
the first line box and the glyph. The 1.3 that stood here was a literal
|
|
@@ -172,12 +180,17 @@ export default css`
|
|
|
172
180
|
<img> this stylesheet can reach. Those props carry --color-text-brand for
|
|
173
181
|
the reason accordion.css.js records at the same rule. */
|
|
174
182
|
|
|
183
|
+
/* A closed answer is [hidden]. The max-height: 0 / opacity: 0 that also
|
|
184
|
+
hid it, and the 5000px / 1 that undid them when open, were a collapse
|
|
185
|
+
animation transition: none had already switched off. */
|
|
186
|
+
/* Indented past the icon, on the inline start where the icon is: these
|
|
187
|
+
were four-value shorthands with the indent on the left, so on a
|
|
188
|
+
right-to-left page the answer sat under nothing, a toggle's width away
|
|
189
|
+
from the edge its question starts at. */
|
|
175
190
|
.bd-accordion-bg-answer {
|
|
176
191
|
overflow: hidden;
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
padding: var(--spacing-0) var(--spacing-0) var(--spacing-0)
|
|
180
|
-
calc(var(--icon-sm-size) + var(--spacing-12));
|
|
192
|
+
padding-block: var(--spacing-0);
|
|
193
|
+
padding-inline: calc(var(--icon-sm-size) + var(--spacing-12)) var(--spacing-0);
|
|
181
194
|
background-color: transparent;
|
|
182
195
|
font-family: var(--typography-fontFamily-sans);
|
|
183
196
|
/* body-small: sm / normal / 1.5, which is what this already rendered on all
|
|
@@ -194,19 +207,16 @@ export default css`
|
|
|
194
207
|
UNDER a title; an answer is the payload of the disclosure, which is body
|
|
195
208
|
copy, and every accordion panel already resolves to -primary. */
|
|
196
209
|
color: var(--color-text-primary);
|
|
197
|
-
transition: none;
|
|
198
210
|
}
|
|
199
211
|
|
|
200
|
-
.
|
|
212
|
+
/* plain hidden only; see the note at .content[hidden] in accordion.css.js */
|
|
213
|
+
.bd-accordion-bg-answer[hidden]:not([hidden="until-found" i]) {
|
|
201
214
|
display: none !important;
|
|
202
215
|
}
|
|
203
216
|
|
|
204
217
|
.bd-accordion-bg-item.open .bd-accordion-bg-answer {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
opacity: 1;
|
|
208
|
-
padding: var(--spacing-0) var(--spacing-0) var(--spacing-16)
|
|
209
|
-
calc(var(--icon-sm-size) + var(--spacing-12));
|
|
218
|
+
padding-block: var(--spacing-0) var(--spacing-16);
|
|
219
|
+
padding-inline: calc(var(--icon-sm-size) + var(--spacing-12)) var(--spacing-0);
|
|
210
220
|
}
|
|
211
221
|
|
|
212
222
|
::slotted(p) {
|
|
@@ -268,11 +278,10 @@ export default css`
|
|
|
268
278
|
text-decoration-line: none;
|
|
269
279
|
}
|
|
270
280
|
|
|
271
|
-
/* A reader who asked for less motion was still getting the
|
|
281
|
+
/* A reader who asked for less motion was still getting the question colour. Twenty-three
|
|
272
282
|
of the thirty animated directories in this package honour the query; this
|
|
273
283
|
one did not. */
|
|
274
284
|
@media (prefers-reduced-motion: reduce) {
|
|
275
|
-
.bd-accordion-bg-item,
|
|
276
285
|
.bd-accordion-bg-question {
|
|
277
286
|
transition: none;
|
|
278
287
|
}
|
|
@@ -9,6 +9,7 @@ import accordionCSS from "./accordion-bg.css.js";
|
|
|
9
9
|
import { ensembleCSS } from "../shared/ensemble.css.js";
|
|
10
10
|
import { accordionItem, accordionSection } from "./accordion.css.js";
|
|
11
11
|
import { onTriggerKeydown } from "./accordion-keyboard.js";
|
|
12
|
+
import { panelHidden } from "./accordion-panel.js";
|
|
12
13
|
|
|
13
14
|
class BdAccordionBg extends LitElement {
|
|
14
15
|
static properties = {
|
|
@@ -172,29 +173,13 @@ class BdAccordionBgItem extends LitElement {
|
|
|
172
173
|
this.open = !this.open;
|
|
173
174
|
}
|
|
174
175
|
|
|
175
|
-
/*
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
given there. */
|
|
179
|
-
_onTriggerFocusIn() {
|
|
180
|
-
const btn = this.renderRoot?.querySelector(".bd-accordion-bg-question, .header");
|
|
181
|
-
if (!btn) return;
|
|
182
|
-
requestAnimationFrame(() => {
|
|
183
|
-
requestAnimationFrame(() => {
|
|
184
|
-
if (btn.matches(":focus-visible")) {
|
|
185
|
-
this.setAttribute("data-bd-acc-focus", "");
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
_onTriggerFocusOut() {
|
|
192
|
-
this.removeAttribute("data-bd-acc-focus");
|
|
176
|
+
/* Find in page matched text in the closed panel; see accordion-panel.js. */
|
|
177
|
+
_onBeforeMatch() {
|
|
178
|
+
this.open = true;
|
|
193
179
|
}
|
|
194
180
|
|
|
195
181
|
_onTriggerKeydown(e) {
|
|
196
182
|
onTriggerKeydown(this, e);
|
|
197
|
-
this._onTriggerFocusIn();
|
|
198
183
|
}
|
|
199
184
|
|
|
200
185
|
/** Move keyboard focus to this item's disclosure trigger. */
|
|
@@ -202,16 +187,16 @@ class BdAccordionBgItem extends LitElement {
|
|
|
202
187
|
this.renderRoot?.querySelector(".bd-accordion-bg-question, .header")?.focus();
|
|
203
188
|
}
|
|
204
189
|
|
|
190
|
+
/* As in accordion.js, the trigger and its panel sit in one .disclosure,
|
|
191
|
+
the box the focus ring goes round. The default layout's item div is it. */
|
|
205
192
|
_renderTerms() {
|
|
206
|
-
return html
|
|
193
|
+
return html`<div class="disclosure">
|
|
207
194
|
<button
|
|
208
195
|
type="button"
|
|
209
196
|
class="header"
|
|
210
197
|
aria-expanded="${this.open}"
|
|
211
198
|
aria-controls="${this._panelId}"
|
|
212
199
|
@click=${this.toggleItem}
|
|
213
|
-
@focusin=${this._onTriggerFocusIn}
|
|
214
|
-
@focusout=${this._onTriggerFocusOut}
|
|
215
200
|
@keydown=${this._onTriggerKeydown}
|
|
216
201
|
>
|
|
217
202
|
<span class="toggle" aria-hidden="true">
|
|
@@ -221,15 +206,20 @@ class BdAccordionBgItem extends LitElement {
|
|
|
221
206
|
</span>
|
|
222
207
|
<span class="title">${this.title}</span>
|
|
223
208
|
</button>
|
|
224
|
-
<div
|
|
209
|
+
<div
|
|
210
|
+
id="${this._panelId}"
|
|
211
|
+
class="content"
|
|
212
|
+
hidden=${panelHidden(this.open)}
|
|
213
|
+
@beforematch=${this._onBeforeMatch}
|
|
214
|
+
>
|
|
225
215
|
<slot></slot>
|
|
226
216
|
</div>
|
|
227
|
-
|
|
217
|
+
</div>`;
|
|
228
218
|
}
|
|
229
219
|
|
|
230
220
|
_renderDefault() {
|
|
231
221
|
return html`
|
|
232
|
-
<div class="bd-accordion-bg-item ${this.open ? "open" : ""} ${this.noBg ? "no-bg" : ""}">
|
|
222
|
+
<div class="disclosure bd-accordion-bg-item ${this.open ? "open" : ""} ${this.noBg ? "no-bg" : ""}">
|
|
233
223
|
<button
|
|
234
224
|
type="button"
|
|
235
225
|
id="${this._headerId}"
|
|
@@ -237,8 +227,6 @@ class BdAccordionBgItem extends LitElement {
|
|
|
237
227
|
aria-expanded="${this.open}"
|
|
238
228
|
aria-controls="${this._panelId}"
|
|
239
229
|
@click=${this.toggleItem}
|
|
240
|
-
@focusin=${this._onTriggerFocusIn}
|
|
241
|
-
@focusout=${this._onTriggerFocusOut}
|
|
242
230
|
@keydown=${this._onTriggerKeydown}
|
|
243
231
|
>
|
|
244
232
|
<span class="bd-accordion-bg-icon" aria-hidden="true">
|
|
@@ -253,7 +241,8 @@ class BdAccordionBgItem extends LitElement {
|
|
|
253
241
|
class="bd-accordion-bg-answer"
|
|
254
242
|
role="region"
|
|
255
243
|
aria-labelledby="${this._headerId}"
|
|
256
|
-
|
|
244
|
+
hidden=${panelHidden(this.open)}
|
|
245
|
+
@beforematch=${this._onBeforeMatch}
|
|
257
246
|
>
|
|
258
247
|
<slot></slot>
|
|
259
248
|
</div>
|
|
@@ -62,6 +62,11 @@ Componenta urcă în DOM și detectează clasa părintelui:
|
|
|
62
62
|
| \`open\` | Boolean | \`false\` | Item deschis implicit |
|
|
63
63
|
| \`no-bg\` | Boolean | \`false\` | Elimină background-ul item-ului |
|
|
64
64
|
|
|
65
|
+
### Căutare în pagină
|
|
66
|
+
Un panou închis este \`hidden="until-found"\` acolo unde browserul îl suportă
|
|
67
|
+
(Chromium, Firefox 148+), deci căutarea în pagină îi găsește textul și deschide
|
|
68
|
+
item-ul; în rest este \`hidden\`, ca înainte.
|
|
69
|
+
|
|
65
70
|
### Slot \`footer\`
|
|
66
71
|
Ambele variante suportă un slot \`footer\` pentru text italic după toate item-urile:
|
|
67
72
|
\`\`\`html
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { nothing } from "lit";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* How a closed accordion panel is hidden, for both accordion families.
|
|
5
|
+
*
|
|
6
|
+
* A panel hidden with plain [hidden] is skipped by the browser's find in page
|
|
7
|
+
* and by a link to a text fragment, so Ctrl+F could not find anything an
|
|
8
|
+
* accordion was holding closed. hidden="until-found" keeps the panel's text
|
|
9
|
+
* searchable: on a match the browser fires beforematch on the panel, the item
|
|
10
|
+
* opens itself from that event (so aria-expanded, the icon and `open` follow),
|
|
11
|
+
* and the browser removes the attribute and scrolls to the match.
|
|
12
|
+
*
|
|
13
|
+
* It is Limited availability -- Chromium, and Firefox from 148; not Safari --
|
|
14
|
+
* so it is detected, and where it is missing the panel is plain hidden, as it
|
|
15
|
+
* always was (CLAUDE.md, Browser support).
|
|
16
|
+
*
|
|
17
|
+
* The panel keeps its box under until-found (the browser skips its contents,
|
|
18
|
+
* not the box), so a closed panel must have no block padding:
|
|
19
|
+
* accordion.css.js zeroes it.
|
|
20
|
+
*/
|
|
21
|
+
export const UNTIL_FOUND = "onbeforematch" in HTMLElement.prototype;
|
|
22
|
+
|
|
23
|
+
/** The panel's hidden attribute: absent while open. */
|
|
24
|
+
export const panelHidden = open => (open ? nothing : UNTIL_FOUND ? "until-found" : "");
|