@repobit/dex-system-design 0.25.11 → 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 +195 -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,19 +1,39 @@
|
|
|
1
1
|
import { LitElement, html, nothing } from "lit";
|
|
2
|
-
|
|
2
|
+
// Installs the design tokens into document scope; see src/tokens/tokens.js
|
|
3
|
+
import "../../tokens/tokens.js";
|
|
3
4
|
import pictureCSS from "./picture.css.js";
|
|
4
5
|
|
|
6
|
+
// the radius steps picture.css.js implements — the full --radius-* scale
|
|
7
|
+
const RADIUS_STEPS = ['none', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', 'full'];
|
|
8
|
+
|
|
5
9
|
export class BdPicture extends LitElement {
|
|
6
10
|
static properties = {
|
|
7
11
|
sources : { type: Array },
|
|
8
12
|
alt : { type: String },
|
|
9
|
-
|
|
13
|
+
/* `fallback-src`, because that is the attribute this component documents
|
|
14
|
+
and the only spelling anything writes. Lit lowercases a property name to
|
|
15
|
+
get its observed attribute instead of dash-casing it, so `fallbackSrc`
|
|
16
|
+
was listening for `fallbacksrc` while every story and the usage example
|
|
17
|
+
in picture.stories.js wrote `fallback-src`. The attribute was inert, the
|
|
18
|
+
property stayed at its "" default, and the fallback <img> rendered with
|
|
19
|
+
src="".
|
|
20
|
+
|
|
21
|
+
That is the whole image on this component: measured across the six
|
|
22
|
+
Atoms/Picture stories, all 14 instances had naturalWidth 0, and the 12
|
|
23
|
+
with an empty `sources` array had currentSrc="" -- no candidate to
|
|
24
|
+
request at all, so a story called "No Sources (fallback only)" showed
|
|
25
|
+
nothing but an empty box. Isolated from the network with a data: URI:
|
|
26
|
+
setAttribute('fallback-src') left it 0x0, while setAttribute
|
|
27
|
+
('fallbacksrc') and the property both loaded the image. (The two stories
|
|
28
|
+
that do have a currentSrc get it from a <source>, and their 0x0 is this
|
|
29
|
+
sandbox having no route to the placeholder host -- not this defect.) */
|
|
30
|
+
fallbackSrc : { type: String, attribute: "fallback-src" },
|
|
10
31
|
width : { type: Number },
|
|
11
32
|
height : { type: Number },
|
|
12
33
|
loading : { type: String },
|
|
13
34
|
fit : { type: String },
|
|
14
35
|
radius : { type: String },
|
|
15
|
-
referrerPolicy: { type: String, attribute: "referrer-policy" }
|
|
16
|
-
_loaded : { state: true }
|
|
36
|
+
referrerPolicy: { type: String, attribute: "referrer-policy" }
|
|
17
37
|
};
|
|
18
38
|
|
|
19
39
|
constructor() {
|
|
@@ -27,35 +47,17 @@ export class BdPicture extends LitElement {
|
|
|
27
47
|
this.fit = "cover";
|
|
28
48
|
this.radius = "none";
|
|
29
49
|
this.referrerPolicy = "";
|
|
30
|
-
this._loaded = false;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
_onImgLoad() {
|
|
34
|
-
this._loaded = true;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
_onImgError() {
|
|
38
|
-
this._loaded = true;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
updated(changedProperties) {
|
|
42
|
-
super.updated(changedProperties);
|
|
43
|
-
if (this._loaded) return;
|
|
44
|
-
const img = this.renderRoot?.querySelector("img");
|
|
45
|
-
if (img && img.complete && img.naturalWidth > 0) {
|
|
46
|
-
this._loaded = true;
|
|
47
|
-
}
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
render() {
|
|
51
53
|
const classes = [
|
|
52
54
|
'bd-picture',
|
|
53
55
|
`fit-${this.fit}`,
|
|
54
|
-
`radius-${this.radius}`
|
|
56
|
+
`radius-${RADIUS_STEPS.includes(this.radius) ? this.radius : 'none'}`
|
|
55
57
|
].filter(Boolean).join(' ');
|
|
56
58
|
|
|
57
59
|
return html`
|
|
58
|
-
<picture class="${classes}"
|
|
60
|
+
<picture class="${classes}">
|
|
59
61
|
${this.sources.map(source => html`
|
|
60
62
|
<source
|
|
61
63
|
type="${source.type}"
|
|
@@ -68,18 +70,86 @@ export class BdPicture extends LitElement {
|
|
|
68
70
|
loading="${this.loading}"
|
|
69
71
|
alt="${this.alt}"
|
|
70
72
|
src="${this.fallbackSrc}"
|
|
71
|
-
width="${this.width}"
|
|
72
|
-
height="${this.height}"
|
|
73
|
+
width="${this.width ?? nothing}"
|
|
74
|
+
height="${this.height ?? nothing}"
|
|
73
75
|
referrerpolicy="${this.referrerPolicy || nothing}"
|
|
74
|
-
|
|
75
|
-
@
|
|
76
|
-
@error=${this._onImgError}
|
|
76
|
+
@load="${this._onLoad}"
|
|
77
|
+
@error="${this._onError}"
|
|
77
78
|
>
|
|
78
79
|
</picture>
|
|
79
80
|
`;
|
|
80
81
|
}
|
|
81
82
|
|
|
82
|
-
|
|
83
|
+
/* The stylesheet has always been written around a `loaded` attribute --
|
|
84
|
+
`.bd-picture:not([loaded])` paints the grey placeholder and its "Loading
|
|
85
|
+
image" label, and `img[loading="lazy"][loaded]` is what returns a lazy
|
|
86
|
+
image from opacity 0 to opacity 1 -- and nothing in this package ever set
|
|
87
|
+
it. `loaded` appeared in exactly three places, all three of them those
|
|
88
|
+
selectors. So the reveal had no trigger:
|
|
89
|
+
|
|
90
|
+
loading="lazy" (the default) -> opacity 0, scale(0.95), forever
|
|
91
|
+
every instance -> placeholder background and label on
|
|
92
|
+
top of the image, permanently
|
|
93
|
+
|
|
94
|
+
Measured on a served 800x450 PNG: the img reached naturalWidth 800 --
|
|
95
|
+
fully decoded -- with computed opacity 0 in 7 of the 8 instances across
|
|
96
|
+
four stories. The eighth is the one story that passes loading="eager",
|
|
97
|
+
which has no opacity rule and so was the only visible image in the
|
|
98
|
+
component; it still carried the placeholder behind it.
|
|
99
|
+
|
|
100
|
+
That is also why fixing the `fallback-src` attribute above is not on its
|
|
101
|
+
own enough to see anything: it gives the img a src and the src decodes,
|
|
102
|
+
and a default-configured bd-picture then renders a fully loaded image at
|
|
103
|
+
opacity 0. The two defects had to be fixed together or neither is visible.
|
|
104
|
+
|
|
105
|
+
bd-img is the shape this follows. It keys its placeholder on
|
|
106
|
+
`:not([src])` -- a fact the element already knows -- and never hides the
|
|
107
|
+
image at all, which is why bd-img has no equivalent bug. The minimal
|
|
108
|
+
change here is to make this component tell the truth it already asks CSS
|
|
109
|
+
about, rather than to restyle it: the fade on load is a deliberate
|
|
110
|
+
nicety, and it is kept.
|
|
111
|
+
|
|
112
|
+
`complete` is checked once on first update because a cached or
|
|
113
|
+
already-decoded image can finish before the listener is attached, in
|
|
114
|
+
which case no load event is coming -- the same "the state may already be
|
|
115
|
+
true before anything is watching for it" case as the tooltip's first
|
|
116
|
+
placement pass. naturalWidth guards it, because `complete` is also true
|
|
117
|
+
for an image that failed. */
|
|
118
|
+
firstUpdated() {
|
|
119
|
+
const img = this.renderRoot?.querySelector('img');
|
|
120
|
+
if (img?.complete && img.naturalWidth > 0) this._markLoaded(img);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* A new source means the old image is no longer what is on screen, so the
|
|
124
|
+
flag goes back down and the placeholder returns until the new one
|
|
125
|
+
decodes. Without this a changed fallbackSrc would keep showing the
|
|
126
|
+
previous image's revealed state while the new bytes were still in
|
|
127
|
+
flight. */
|
|
128
|
+
updated(changed) {
|
|
129
|
+
if (!changed.has('fallbackSrc') && !changed.has('sources')) return;
|
|
130
|
+
const img = this.renderRoot?.querySelector('img');
|
|
131
|
+
if (!img) return;
|
|
132
|
+
if (img.complete && img.naturalWidth > 0) return this._markLoaded(img);
|
|
133
|
+
img.removeAttribute('loaded');
|
|
134
|
+
this.renderRoot?.querySelector('picture')?.removeAttribute('loaded');
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
_onLoad(e) {
|
|
138
|
+
this._markLoaded(e.currentTarget);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* Deliberately does not set the flag: a broken image is exactly the case
|
|
142
|
+
the placeholder is for, so it stays up and says so. */
|
|
143
|
+
_onError() {}
|
|
144
|
+
|
|
145
|
+
/* Both elements, because the two selectors ask different questions: the
|
|
146
|
+
<picture> owns the placeholder and the <img> owns the reveal. */
|
|
147
|
+
_markLoaded(img) {
|
|
148
|
+
img.setAttribute('loaded', '');
|
|
149
|
+
this.renderRoot?.querySelector('picture')?.setAttribute('loaded', '');
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
static styles = [pictureCSS];
|
|
83
153
|
}
|
|
84
154
|
|
|
85
155
|
customElements.define("bd-picture", BdPicture);
|
|
@@ -1,7 +1,8 @@
|
|
|
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 "../badge/badge.js";
|
|
4
|
-
import newPricingCSS from "../pricing-cards/new-pricing.css";
|
|
5
|
+
import newPricingCSS from "../pricing-cards/new-pricing.css.js";
|
|
5
6
|
|
|
6
7
|
class PricingCard extends LitElement {
|
|
7
8
|
static properties = {
|
|
@@ -23,7 +24,6 @@ class PricingCard extends LitElement {
|
|
|
23
24
|
render() {
|
|
24
25
|
return html`
|
|
25
26
|
<style>
|
|
26
|
-
${tokens}
|
|
27
27
|
${newPricingCSS}
|
|
28
28
|
</style>
|
|
29
29
|
|
|
@@ -1,21 +1,30 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
2
|
|
|
3
3
|
export default css`
|
|
4
|
-
:host {
|
|
5
|
-
--background-card-grey: var(--color-neutral-25);
|
|
6
|
-
--border-card-grey: var(--color-neutral-50);
|
|
7
|
-
}
|
|
8
4
|
|
|
9
5
|
.card {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
background:
|
|
14
|
-
border
|
|
6
|
+
border-radius: var(--card-radius);
|
|
7
|
+
padding: var(--card-padding);
|
|
8
|
+
/* The white above this was dead: the grey overrode it in the same rule. */
|
|
9
|
+
background: var(--color-surface-container);
|
|
10
|
+
/* border/container, not the private --border-card-grey alias, which
|
|
11
|
+
pointed at --color-neutral-50 and measured 1.07:1 against this card's
|
|
12
|
+
own ground. 1px was a literal too.
|
|
13
|
+
|
|
14
|
+
This card keeps surface/container rather than inverting like
|
|
15
|
+
pricing-card.css.js: new-pricing-card has no wrapper of its own to
|
|
16
|
+
carry a band -- its container is pricing-card-container -- so going
|
|
17
|
+
white here without one would put a white card on a white page. The
|
|
18
|
+
edge is the half that is safe on its own, and it triples the delta to
|
|
19
|
+
1.233:1. */
|
|
20
|
+
border: var(--border-width-1) solid var(--color-border-container);
|
|
15
21
|
}
|
|
16
22
|
|
|
17
23
|
.highlight {
|
|
18
|
-
|
|
24
|
+
/* no role: no BORDER role carries green-700 -- --status-success-border is
|
|
25
|
+
green-200, four steps lighter. The fill and accent steps do carry it,
|
|
26
|
+
and both are the wrong category for an edge. */
|
|
27
|
+
border: 2px solid var(--color-green-700);
|
|
19
28
|
}
|
|
20
29
|
|
|
21
30
|
.highlight-wrapper {
|
|
@@ -34,13 +43,13 @@ export default css`
|
|
|
34
43
|
top: 1rem;
|
|
35
44
|
left: 50%;
|
|
36
45
|
transform: translate(-50%, -50%);
|
|
37
|
-
background-color:
|
|
38
|
-
color:
|
|
46
|
+
background-color: var(--status-success-fill);
|
|
47
|
+
color: var(--color-text-inverse);
|
|
39
48
|
font-weight: bold;
|
|
40
49
|
font-size: var(--typography-body-regular-fontSize);
|
|
41
50
|
text-align: center;
|
|
42
|
-
border-radius:
|
|
43
|
-
z-index:
|
|
51
|
+
border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
|
|
52
|
+
z-index: var(--z-raised);
|
|
44
53
|
height: 48px;
|
|
45
54
|
width: 85%;
|
|
46
55
|
max-width: 360px;
|
|
@@ -60,7 +69,7 @@ export default css`
|
|
|
60
69
|
|
|
61
70
|
.hr-line {
|
|
62
71
|
border: none;
|
|
63
|
-
border-top: 1px solid
|
|
72
|
+
border-top: 1px solid var(--color-border-subtle);
|
|
64
73
|
margin: 1.5rem 0;
|
|
65
74
|
}
|
|
66
75
|
`;
|
|
@@ -1,5 +1,6 @@
|
|
|
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 "../button/button.js";
|
|
4
5
|
import newPricingActionsCSS from "../pricing-cards/pricing-card-actions.css.js";
|
|
5
6
|
|
|
@@ -26,7 +27,6 @@ class PricingCardActions extends LitElement {
|
|
|
26
27
|
render() {
|
|
27
28
|
return html`
|
|
28
29
|
<style>
|
|
29
|
-
${tokens}
|
|
30
30
|
${newPricingActionsCSS}
|
|
31
31
|
</style>
|
|
32
32
|
|
|
@@ -41,10 +41,9 @@ class PricingCardActions extends LitElement {
|
|
|
41
41
|
<div class="actions">
|
|
42
42
|
<bd-button-link
|
|
43
43
|
label="Buy now"
|
|
44
|
-
|
|
44
|
+
variant="accent"
|
|
45
45
|
size="md"
|
|
46
46
|
fullwidth
|
|
47
|
-
strong
|
|
48
47
|
buyLink
|
|
49
48
|
>
|
|
50
49
|
Buy Now
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
1
|
+
import { css, unsafeCSS } from "lit";
|
|
2
|
+
import { below } from "../shared/token-scales.js";
|
|
2
3
|
|
|
3
4
|
export default css`
|
|
4
5
|
:host {
|
|
5
|
-
// display: block;
|
|
6
6
|
padding: 0px 240px;
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -33,7 +33,7 @@ export default css`
|
|
|
33
33
|
flex: 1 1 calc(25% - 1rem);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
@media (
|
|
36
|
+
@media ${unsafeCSS(below('md'))} {
|
|
37
37
|
::slotted(new-pricing-card) {
|
|
38
38
|
flex: 1 1 100%;
|
|
39
39
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
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 newCardsContainerPricingCSS from "../pricing-cards/pricing-card-container.css.js";
|
|
4
5
|
|
|
5
6
|
export class PricingCardsContainer extends LitElement {
|
|
@@ -26,6 +27,6 @@ export class PricingCardsContainer extends LitElement {
|
|
|
26
27
|
`;
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
|
-
PricingCardsContainer.styles = [
|
|
30
|
+
PricingCardsContainer.styles = [newCardsContainerPricingCSS];
|
|
30
31
|
|
|
31
32
|
customElements.define("pricing-cards-container", PricingCardsContainer);
|
|
@@ -12,22 +12,21 @@ export default css`
|
|
|
12
12
|
.card-title {
|
|
13
13
|
font-size: var(--typography-heading-h4-fontSize);
|
|
14
14
|
font-family: var(--typography-fontFamily-sans);
|
|
15
|
-
font-weight: var(--typography-fontWeight-bold);
|
|
16
15
|
margin: 0;
|
|
17
16
|
text-align: left;
|
|
18
|
-
color:
|
|
17
|
+
color: var(--color-text-primary);
|
|
19
18
|
}
|
|
20
19
|
|
|
21
20
|
.card-title-brand {
|
|
22
21
|
display: inline;
|
|
23
22
|
font-family: var(--typography-fontFamily-sans);
|
|
24
23
|
font-weight: var(--typography-fontWeight-bold);
|
|
25
|
-
color:
|
|
24
|
+
color: var(--color-text-primary);
|
|
26
25
|
}
|
|
27
26
|
|
|
28
27
|
/* Stil pentru cuvântul "Plus" evidențiat */
|
|
29
28
|
.plus-text {
|
|
30
|
-
color: var(--color-
|
|
29
|
+
color: var(--color-text-brand);
|
|
31
30
|
font-weight: var(--typography-fontWeight-bold);
|
|
32
31
|
font-family: var(--typography-fontFamily-sans);
|
|
33
32
|
}
|
|
@@ -37,9 +36,12 @@ export default css`
|
|
|
37
36
|
align-items: center;
|
|
38
37
|
gap: 0.25rem;
|
|
39
38
|
font-weight: bold;
|
|
40
|
-
|
|
39
|
+
/* The brand tint as a badge ground. bd-badge's brand variant is this exact
|
|
40
|
+
pair (badge.css.js:71-72) and tokens.js names the step for the job:
|
|
41
|
+
-surface is the light tint. Value-identical at #f0f7ff. */
|
|
42
|
+
background: var(--status-brand-surface);
|
|
41
43
|
padding: 0.25rem 0.5rem;
|
|
42
|
-
border-radius:
|
|
44
|
+
border-radius: var(--radius-sm);
|
|
43
45
|
margin: 0.5rem 0;
|
|
44
46
|
font-size: 0.875rem;
|
|
45
47
|
}
|
|
@@ -52,7 +54,7 @@ export default css`
|
|
|
52
54
|
font-size: var(--typography-body-regular-fontSize);
|
|
53
55
|
text-align: left;
|
|
54
56
|
font-family: var(--typography-fontFamily-sans);
|
|
55
|
-
color:
|
|
57
|
+
color: var(--color-text-primary);
|
|
56
58
|
margin: 0;
|
|
57
59
|
margin-bottom: var(--spacing-16);
|
|
58
60
|
margin-top: -8px;
|
|
@@ -60,7 +62,7 @@ export default css`
|
|
|
60
62
|
|
|
61
63
|
.hr-line {
|
|
62
64
|
border: none;
|
|
63
|
-
border-top: 1px solid
|
|
65
|
+
border-top: 1px solid var(--color-border-subtle);
|
|
64
66
|
margin: 1rem 0;
|
|
65
67
|
}
|
|
66
68
|
|
|
@@ -1,6 +1,8 @@
|
|
|
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 "../badge/badge.js";
|
|
5
|
+
import "../divider/divider-horizontal.js";
|
|
4
6
|
import "../heading/heading.js";
|
|
5
7
|
import "../paragraph/paragraph.js";
|
|
6
8
|
import newHeaderPricingCSS from "../pricing-cards/pricing-card-header.css.js";
|
|
@@ -25,9 +27,6 @@ class PricingCardHeader extends LitElement {
|
|
|
25
27
|
const plusIndex = title.toLowerCase().indexOf("plus");
|
|
26
28
|
|
|
27
29
|
if (plusIndex === -1) {
|
|
28
|
-
const [brand, ...rest] = title.split(" ");
|
|
29
|
-
const restOfTitle = rest.join(" ");
|
|
30
|
-
|
|
31
30
|
return html`
|
|
32
31
|
<bd-h as="h4" class="card-title">
|
|
33
32
|
<template shadowrootmode="open">
|
|
@@ -66,17 +65,17 @@ class PricingCardHeader extends LitElement {
|
|
|
66
65
|
${this.parsedBadges.length
|
|
67
66
|
? html`
|
|
68
67
|
<div class="badge-wrapper multiple">
|
|
69
|
-
${this.parsedBadges.map((b) => html`<bd-badge>${b}</bd-badge>`)}
|
|
68
|
+
${this.parsedBadges.map((b) => html`<bd-badge tone="primary" variant="fill">${b}</bd-badge>`)}
|
|
70
69
|
</div>
|
|
71
70
|
`
|
|
72
71
|
: ""}
|
|
73
|
-
<bd-p
|
|
72
|
+
<bd-p variant="small" class="badge-subtitle">${this.subtitle}</bd-p>
|
|
74
73
|
<bd-divider-horizontal></bd-divider-horizontal>
|
|
75
74
|
</div>
|
|
76
75
|
`;
|
|
77
76
|
}
|
|
78
77
|
}
|
|
79
78
|
|
|
80
|
-
PricingCardHeader.styles = [
|
|
79
|
+
PricingCardHeader.styles = [newHeaderPricingCSS];
|
|
81
80
|
|
|
82
81
|
customElements.define("pricing-card-header", PricingCardHeader);
|
|
@@ -15,35 +15,42 @@ export default css`
|
|
|
15
15
|
.original-price {
|
|
16
16
|
text-decoration: line-through;
|
|
17
17
|
font-family: var(--typography-fontFamily-sans);
|
|
18
|
-
color:
|
|
18
|
+
color: var(--color-text-primary);
|
|
19
19
|
font-size: var(--typography-body-regular-fontSize);
|
|
20
20
|
margin: 0;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.discount {
|
|
24
|
-
color:
|
|
24
|
+
color: var(--color-text-success);
|
|
25
25
|
font-weight: bold;
|
|
26
|
-
|
|
26
|
+
/* -surface-strong is the step tokens.js calls "the heavier tint, badge
|
|
27
|
+
shade", and this pill's ink is already --color-text-success, which is
|
|
28
|
+
the same green-800 --status-success-text resolves to. So the pair now
|
|
29
|
+
matches bd-badge's success variant exactly (badge.css.js:78-79) and
|
|
30
|
+
measures the 5.93:1 that file records. Value-identical at #d1fadc. */
|
|
31
|
+
background: var(--status-success-surface-strong);
|
|
27
32
|
font-size: var(--typography-body-regular-fontSize);
|
|
28
33
|
padding: 5px;
|
|
29
|
-
border-radius:
|
|
34
|
+
border-radius: var(--radius-full);
|
|
30
35
|
font-family: var(--typography-fontFamily-sans);
|
|
31
36
|
margin: 0;
|
|
32
37
|
}
|
|
33
38
|
|
|
34
39
|
.price {
|
|
35
|
-
|
|
36
|
-
|
|
40
|
+
/* no token: 40px is not on the type scale — 4xl is 36 and 5xl is 48 —
|
|
41
|
+
and this was reading --heading-xxlarge, a legacy pixel size deleted with the
|
|
42
|
+
rest of that family. Adding the step is its own decision. */
|
|
43
|
+
font-size: 40px;
|
|
37
44
|
text-align: left;
|
|
38
45
|
font-family: var(--typography-fontFamily-sans);
|
|
39
|
-
color:
|
|
46
|
+
color: var(--color-text-primary);
|
|
40
47
|
margin: 0;
|
|
41
48
|
}
|
|
42
49
|
|
|
43
50
|
.terms {
|
|
44
51
|
font-family: var(--typography-fontFamily-sans);
|
|
45
52
|
font-size: var(--typography-label-small-fontSize);
|
|
46
|
-
color:
|
|
53
|
+
color: var(--color-text-primary);
|
|
47
54
|
text-align: left;
|
|
48
55
|
margin: 0;
|
|
49
56
|
margin-top: var(--spacing-8);
|
|
@@ -53,7 +60,7 @@ export default css`
|
|
|
53
60
|
.terms a {
|
|
54
61
|
font-family: var(--typography-fontFamily-sans);
|
|
55
62
|
font-size: var(--typography-label-small-fontSize);
|
|
56
|
-
color:
|
|
63
|
+
color: var(--color-text-primary);
|
|
57
64
|
text-decoration: underline;
|
|
58
65
|
}
|
|
59
66
|
.toggle-group {
|
|
@@ -1,8 +1,11 @@
|
|
|
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 "../badge/badge.js";
|
|
4
5
|
import "../heading/heading.js";
|
|
5
6
|
import "../paragraph/paragraph.js";
|
|
7
|
+
import "../link/link.js";
|
|
8
|
+
import "../radio/radio.js";
|
|
6
9
|
import newPricingPricingCSS from "../pricing-cards/pricing-card-pricing.css.js";
|
|
7
10
|
|
|
8
11
|
class PricingCardPricing extends LitElement {
|
|
@@ -33,7 +36,6 @@ class PricingCardPricing extends LitElement {
|
|
|
33
36
|
|
|
34
37
|
return html`
|
|
35
38
|
<style>
|
|
36
|
-
${tokens}
|
|
37
39
|
${newPricingPricingCSS}
|
|
38
40
|
</style>
|
|
39
41
|
|
|
@@ -63,11 +65,11 @@ class PricingCardPricing extends LitElement {
|
|
|
63
65
|
</div>
|
|
64
66
|
|
|
65
67
|
<div class="pricing-info" data-store-hide="!it.option.price.discounted">
|
|
66
|
-
<bd-p
|
|
68
|
+
<bd-p variant="small" class="original-price">
|
|
67
69
|
<s data-store-render data-store-price="full"></s>
|
|
68
70
|
</bd-p>
|
|
69
71
|
|
|
70
|
-
<bd-badge variant="
|
|
72
|
+
<bd-badge tone="success" variant="shade">
|
|
71
73
|
Save <span data-store-render data-store-discount="percentage"></span>
|
|
72
74
|
</bd-badge>
|
|
73
75
|
</div>
|
|
@@ -76,9 +78,9 @@ class PricingCardPricing extends LitElement {
|
|
|
76
78
|
<span data-store-render data-store-price="discounted||full"></span>/month
|
|
77
79
|
</bd-h>
|
|
78
80
|
|
|
79
|
-
<bd-p
|
|
81
|
+
<bd-p variant="small" class="terms">
|
|
80
82
|
First year price. Plus applicable sales tax. See
|
|
81
|
-
<bd-link href="#" target="_blank" font-size="
|
|
83
|
+
<bd-link href="#" target="_blank" font-size="sm" color="strong" underline>
|
|
82
84
|
terms of use
|
|
83
85
|
</bd-link>
|
|
84
86
|
</bd-p>
|
|
@@ -2,12 +2,20 @@ import { css } from "lit";
|
|
|
2
2
|
|
|
3
3
|
export default css`
|
|
4
4
|
.show-more-toggle {
|
|
5
|
-
|
|
5
|
+
/* flex, not block, because the + and - are icon atoms now rather than
|
|
6
|
+
characters in the label. A glyph sat on the text baseline and was
|
|
7
|
+
centred by text-align; an atom is an inline-flex box of its own, so the
|
|
8
|
+
button aligns it against the label instead. gap replaces the space that
|
|
9
|
+
used to be part of the string. */
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
gap: var(--spacing-8);
|
|
6
14
|
background: none;
|
|
7
15
|
border: none;
|
|
8
|
-
color: var(--color-
|
|
16
|
+
color: var(--color-text-brand);
|
|
9
17
|
cursor: pointer;
|
|
10
|
-
font-size: var(--
|
|
18
|
+
font-size: var(--typography-fontSize-lg);
|
|
11
19
|
text-align: center;
|
|
12
20
|
margin: 1rem auto;
|
|
13
21
|
font-family: var(--typography-fontFamily-sans);
|
|
@@ -1,6 +1,9 @@
|
|
|
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 newShowMorePricingCSS from "../pricing-cards/pricing-card-show-more.css.js";
|
|
5
|
+
import "../icons/plus-icon.js";
|
|
6
|
+
import "../icons/minus-icon.js";
|
|
4
7
|
|
|
5
8
|
class PricingCardShowMore extends LitElement {
|
|
6
9
|
static properties = {
|
|
@@ -20,7 +23,9 @@ class PricingCardShowMore extends LitElement {
|
|
|
20
23
|
render() {
|
|
21
24
|
return html`
|
|
22
25
|
<button @click="${this.toggleFeatures}" class="show-more-toggle">
|
|
23
|
-
${this.expanded
|
|
26
|
+
${this.expanded
|
|
27
|
+
? html`<bd-minus-icon aria-hidden="true"></bd-minus-icon>Hide features`
|
|
28
|
+
: html`<bd-plus-icon aria-hidden="true"></bd-plus-icon>Show more features`}
|
|
24
29
|
</button>
|
|
25
30
|
${this.expanded
|
|
26
31
|
? html`<div class="feature-items"><slot></slot></div>`
|
|
@@ -28,6 +33,6 @@ class PricingCardShowMore extends LitElement {
|
|
|
28
33
|
`;
|
|
29
34
|
}
|
|
30
35
|
}
|
|
31
|
-
PricingCardShowMore.styles = [
|
|
36
|
+
PricingCardShowMore.styles = [newShowMorePricingCSS];
|
|
32
37
|
|
|
33
38
|
customElements.define('pricing-card-show-more', PricingCardShowMore);
|