@repobit/dex-system-design 0.24.4 → 0.24.6

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.
Files changed (72) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/package.json +4 -4
  3. package/src/components/accordion/accordion.css.js +40 -0
  4. package/src/components/accordion/accordion.js +31 -0
  5. package/src/components/accordion/accordion.stories.js +147 -4
  6. package/src/components/agent-endpoints/agent-endpoints.css.js +92 -0
  7. package/src/components/agent-endpoints/agent-endpoints.js +86 -0
  8. package/src/components/agent-endpoints/agent-endpoints.stories.js +148 -0
  9. package/src/components/ai-guardian-demo.stories.js +848 -0
  10. package/src/components/awards/awards-flex.css.js +169 -0
  11. package/src/components/awards/awards-flex.js +269 -0
  12. package/src/components/awards/awards-flex.stories.js +657 -0
  13. package/src/components/bento-grid/bento-grid.css.js +57 -0
  14. package/src/components/bento-grid/bento-grid.js +186 -0
  15. package/src/components/bento-grid/bento-grid.stories.js +440 -0
  16. package/src/components/bento-grid/bento-item.css.js +105 -0
  17. package/src/components/bento-grid/bento-item.js +57 -0
  18. package/src/components/button/button.css.js +26 -0
  19. package/src/components/button/button.js +8 -0
  20. package/src/components/button/button.stories.js +12 -0
  21. package/src/components/comparison-panel/comparison-panel.css.js +104 -0
  22. package/src/components/comparison-panel/comparison-panel.js +100 -0
  23. package/src/components/comparison-panel/comparison-panel.stories.js +223 -0
  24. package/src/components/compatibility-table/compatibility-table.css.js +243 -0
  25. package/src/components/compatibility-table/compatibility-table.js +123 -0
  26. package/src/components/compatibility-table/compatibility-table.stories.js +189 -0
  27. package/src/components/cta-banner/cta-banner.css.js +60 -0
  28. package/src/components/cta-banner/cta-banner.js +63 -0
  29. package/src/components/dropdown/dropdown.css.js +1 -1
  30. package/src/components/footer/footer.css.js +0 -1
  31. package/src/components/header/header-code.css.js +125 -0
  32. package/src/components/header/header-code.js +69 -0
  33. package/src/components/header/header-code.stories.js +226 -0
  34. package/src/components/heading/heading.css.js +3 -0
  35. package/src/components/icons/bd-ai-icon.js +27 -0
  36. package/src/components/icons/quote-icon.js +28 -0
  37. package/src/components/install-options/install-options.css.js +276 -0
  38. package/src/components/install-options/install-options.js +184 -0
  39. package/src/components/list/list-item/list-item.css.js +3 -3
  40. package/src/components/list/list-item/list-item.js +10 -4
  41. package/src/components/overview/overview.css.js +121 -0
  42. package/src/components/overview/overview.js +63 -0
  43. package/src/components/overview/overview.stories.js +193 -0
  44. package/src/components/page-switcher/page-switcher.css.js +100 -0
  45. package/src/components/page-switcher/page-switcher.js +42 -0
  46. package/src/components/paragraph/paragraph.css.js +1 -5
  47. package/src/components/paragraph/paragraph.js +7 -3
  48. package/src/components/process-steps/process-steps.css.js +95 -0
  49. package/src/components/process-steps/process-steps.js +72 -0
  50. package/src/components/process-steps/process-steps.stories.js +144 -0
  51. package/src/components/quick-answer/quick-answer.css.js +67 -0
  52. package/src/components/quick-answer/quick-answer.js +59 -0
  53. package/src/components/quick-answer/quick-answer.stories.js +160 -0
  54. package/src/components/review/review-grid.css.js +34 -0
  55. package/src/components/review/review-grid.js +63 -0
  56. package/src/components/review/review.css.js +50 -0
  57. package/src/components/review/review.js +58 -0
  58. package/src/components/review/review.stories.js +228 -0
  59. package/src/components/terminal/terminal-cursor.js +49 -0
  60. package/src/components/terminal/terminal-message.css.js +161 -0
  61. package/src/components/terminal/terminal-message.js +169 -0
  62. package/src/components/terminal/terminal-message.stories.js +321 -0
  63. package/src/components/trust-panel/trust-panel.css.js +167 -0
  64. package/src/components/trust-panel/trust-panel.js +116 -0
  65. package/src/components/trust-panel/trust-panel.stories.js +234 -0
  66. package/src/tokens/tokens.css +1 -1
  67. package/src/components/tabsComponent/tabsComponent.css.js +0 -267
  68. package/src/components/tabsComponent/tabsComponent.js +0 -193
  69. package/src/components/tabsComponent/tabsComponent.stories.js +0 -134
  70. package/src/components/tabsComponentFamily/tabsComponentFamily.css.js +0 -181
  71. package/src/components/tabsComponentFamily/tabsComponentFamily.js +0 -180
  72. package/src/components/tabsComponentFamily/tabsComponentFamily.stories.js +0 -319
@@ -1,134 +0,0 @@
1
- import { html } from 'lit';
2
- import './tabsComponent.js';
3
-
4
- export default {
5
- title : 'Components/TabsComponent',
6
- tags : ['autodocs'],
7
- parameters: {
8
- docs: {
9
- description: {
10
- component: `
11
- **TabsComponent** is a Lit component that renders a four-tab feature showcase with image, heading, description, and a "Find out more" link.
12
-
13
- ### Usage
14
- \`\`\`html
15
- <bd-tabs-component></bd-tabs-component>
16
- \`\`\`
17
-
18
- ### Tabs
19
- | Index | Title |
20
- |---|---|
21
- | 0 | Privacy Protection |
22
- | 1 | Identity Protection |
23
- | 2 | Device Protection |
24
- | 3 | Financial Insurance |
25
-
26
- ### Structure
27
- - A \`<bd-highlight>\` heading with subtitle
28
- - A row of tab buttons (icon + label), each with \`role="tab"\` and \`aria-selected\`
29
- - A card with left image (\`<picture>\` with WebP/PNG sources) and right content (heading + description + link)
30
-
31
- ### Behavior
32
- - Clicking a tab updates \`selectedTab\` and re-renders the card content
33
- - Image sources include width/format/optimize query params for responsive loading
34
- - Active tab has \`bd-selected\` class and \`aria-selected="true"\`
35
-
36
- ### Accessibility
37
- - Tab buttons have \`role="tab"\`, \`aria-selected\`, \`aria-controls\`, and \`id\` attributes
38
- - Content panel has \`aria-labelledby\` linked to the heading
39
- `
40
- }
41
- }
42
- },
43
- argTypes: {
44
- selectedTab: {
45
- control : { type: 'select' },
46
- options : [0, 1, 2, 3],
47
- description: 'Index of the initially selected tab (0–3)',
48
- table : { type: { summary: 'number' }, defaultValue: { summary: '0' }, category: 'State' }
49
- }
50
- }
51
- };
52
-
53
- // ─── Stories ───────────────────────────────────────────────────────────────
54
-
55
- export const Default = {
56
- name : 'Default (Tab 0 — Privacy Protection)',
57
- render : () => html`<bd-tabs-component></bd-tabs-component>`,
58
- parameters: { docs: { description: { story: 'Default state with the first tab (Privacy Protection) selected.' } } }
59
- };
60
-
61
- export const Tab1Selected = {
62
- name : 'Tab 1 — Identity Protection',
63
- render: () => {
64
- const el = document.createElement('bd-tabs-component');
65
- el.selectedTab = 1;
66
- return el;
67
- },
68
- parameters: { docs: { description: { story: 'Component initialized with the Identity Protection tab selected.' } } }
69
- };
70
-
71
- export const Tab2Selected = {
72
- name : 'Tab 2 — Device Protection',
73
- render: () => {
74
- const el = document.createElement('bd-tabs-component');
75
- el.selectedTab = 2;
76
- return el;
77
- },
78
- parameters: { docs: { description: { story: 'Component initialized with the Device Protection tab selected.' } } }
79
- };
80
-
81
- export const Tab3Selected = {
82
- name : 'Tab 3 — Financial Insurance',
83
- render: () => {
84
- const el = document.createElement('bd-tabs-component');
85
- el.selectedTab = 3;
86
- return el;
87
- },
88
- parameters: { docs: { description: { story: 'Component initialized with the Financial Insurance tab selected.' } } }
89
- };
90
-
91
- export const AllTabsOverview = {
92
- name : 'All Tabs Overview',
93
- render: () => html`
94
- <div style="display:flex; flex-direction:column; gap:64px;">
95
- <div>
96
- <p style="font-weight:600; margin-bottom:8px;">Tab 0 — Privacy Protection</p>
97
- <bd-tabs-component></bd-tabs-component>
98
- </div>
99
- </div>
100
- <p style="font-size:14px; margin-top:16px; color:#666;">
101
- Click the tab buttons above to switch between Privacy, Identity, Device, and Financial Insurance tabs.
102
- </p>
103
- `,
104
- parameters: { docs: { description: { story: 'Full interactive component. Click each tab to see the content switch between the four protection categories.' } } }
105
- };
106
-
107
- export const MobileView = {
108
- name : 'Mobile View (375px)',
109
- render : () => html`<bd-tabs-component></bd-tabs-component>`,
110
- parameters: {
111
- viewport: { defaultViewport: 'mobile1' },
112
- docs : { description: { story: 'Tabs component at 375px. Tests tab button layout, image sizing, and content reflow on small screens.' } }
113
- }
114
- };
115
-
116
- export const TabletView = {
117
- name : 'Tablet View (768px)',
118
- render : () => html`<bd-tabs-component></bd-tabs-component>`,
119
- parameters: {
120
- viewport: { defaultViewport: 'tablet' },
121
- docs : { description: { story: 'Tabs component at 768px tablet width.' } }
122
- }
123
- };
124
-
125
- export const Playground = {
126
- name : '🛝 Playground',
127
- args : { selectedTab: 0 },
128
- render: (args) => {
129
- const el = document.createElement('bd-tabs-component');
130
- el.selectedTab = args.selectedTab;
131
- return el;
132
- },
133
- parameters: { docs: { description: { story: 'Interactive playground. Use the Controls panel to select which tab is initially active (0–3).' } } }
134
- };
@@ -1,181 +0,0 @@
1
- import { css } from "lit";
2
-
3
- export default css`
4
- :host {
5
- --bd-accessibility-focus: var(--color-blue-500);
6
- display: block;
7
- font-family: var(--typography-fontFamily-sans);
8
- font-size: 100%;
9
- padding-top: var(--spacing-64);
10
- padding-bottom: var(--spacing-64);
11
- }
12
-
13
- bd-highlight {
14
- max-width: 660px;
15
- padding-top: var(--spacing-32);
16
- }
17
-
18
- .bd-tabs-component {
19
- display: flex;
20
- flex-direction: column;
21
- align-items: center;
22
- max-width: 990px;
23
- margin-inline: auto;
24
- padding-inline: var(--layout-ensemble-inline-padding, var(--spacing-24));
25
- box-sizing: border-box;
26
- }
27
-
28
- .bd-tabs-subtitle {
29
- font-size: var(--typography-body-regular-fontSize);
30
- max-width: 560px;
31
- text-align: center;
32
- margin-top: var(--spacing-32);
33
- margin-bottom: var(--spacing-32);
34
- }
35
-
36
- .bd-tabs-container {
37
- display: inline-flex;
38
- justify-content: center;
39
- flex-wrap: wrap;
40
- border-bottom: 1px solid var(--color-neutral-100);
41
- width: 100%;
42
- margin-bottom: var(--spacing-32);
43
- }
44
-
45
- .bd-tab-button {
46
- display: inline-flex;
47
- align-items: center;
48
- gap: var(--spacing-8);
49
- background: none;
50
- border: none;
51
- padding: var(--spacing-10) var(--spacing-32);
52
- cursor: pointer;
53
- color: var(--color-blue-500);
54
- position: relative;
55
- font-family: var(--typography-fontFamily-sans);
56
- font-size: var(--typography-body-large-fontSize);
57
- font-weight: var(--typography-fontWeight-semibold);
58
- transition: color var(--transition-duration-fast, 150ms) ease;
59
- }
60
-
61
- .bd-tab-button::after {
62
- content: "";
63
- height: 3px;
64
- background: var(--color-blue-500);
65
- position: absolute;
66
- left: 0;
67
- bottom: 0;
68
- width: 0;
69
- transition: width var(--transition-duration-slow, 300ms) ease;
70
- }
71
-
72
- .bd-tab-button.bd-selected::after {
73
- width: 100%;
74
- }
75
-
76
- .bd-tab-button.bd-selected {
77
- color: var(--color-neutral-900);
78
- }
79
-
80
- .bd-tab-button:focus-visible {
81
- outline: 2px solid var(--bd-accessibility-focus);
82
- outline-offset: 2px;
83
- border-radius: var(--radius-sm);
84
- }
85
-
86
- .bd-tab-icon {
87
- width: 28px;
88
- height: 28px;
89
- object-fit: contain;
90
- }
91
-
92
- .bd-tab-label {
93
- pointer-events: none;
94
- }
95
-
96
- .bd-panel-wrapper {
97
- width: 100%;
98
- box-sizing: border-box;
99
- }
100
-
101
- .bd-card-container {
102
- display: flex;
103
- align-items: center;
104
- gap: var(--spacing-64);
105
- width: 100%;
106
- animation: bd-fade-slide-right 350ms ease forwards;
107
- }
108
-
109
- .bd-left {
110
- flex: 1;
111
- display: flex;
112
- flex-direction: column;
113
- align-items: flex-start;
114
- gap: var(--spacing-24);
115
- }
116
-
117
- .bd-panel-content {
118
- display: flex;
119
- flex-direction: column;
120
- gap: var(--spacing-8);
121
- }
122
-
123
- .bd-right {
124
- flex: 1;
125
- display: flex;
126
- align-items: center;
127
- justify-content: center;
128
- }
129
-
130
- .bd-panel-image {
131
- width: 100%;
132
- max-width: 520px;
133
- height: auto;
134
- border-radius: var(--radius-lg, 16px);
135
- object-fit: cover;
136
- display: block;
137
- }
138
-
139
- @keyframes bd-fade-slide-right {
140
- from {
141
- opacity: 0;
142
- transform: translateX(24px);
143
- }
144
- to {
145
- opacity: 1;
146
- transform: translateX(0);
147
- }
148
- }
149
-
150
- @media (max-width: 992px) {
151
- .bd-card-container {
152
- flex-direction: column-reverse;
153
- gap: var(--spacing-32);
154
- }
155
-
156
- .bd-left {
157
- align-items: center;
158
- text-align: center;
159
- }
160
-
161
- .bd-panel-image {
162
- max-width: 100%;
163
- }
164
- }
165
-
166
- @media (max-width: 600px) {
167
- .bd-tabs-container {
168
- gap: var(--spacing-4);
169
- }
170
-
171
- .bd-tab-button {
172
- padding: var(--spacing-8) var(--spacing-12);
173
- font-size: var(--typography-fontSize-sm);
174
- }
175
-
176
- .bd-tab-icon {
177
- width: 20px;
178
- height: 20px;
179
- }
180
- }
181
- `;
@@ -1,180 +0,0 @@
1
- import { LitElement, html } from "lit";
2
- import { keyed } from "lit/directives/keyed.js";
3
- import { tokens } from "../../tokens/tokens.js";
4
- import "../button/button.js";
5
- import "../heading/heading.js";
6
- import "../highlight/highlight.js";
7
- import "../paragraph/paragraph.js";
8
- import tabsChildCSS from "./tabsComponentFamily.css.js";
9
-
10
- class BdTabContentPanelFamily extends HTMLElement {
11
- connectedCallback() {
12
- this.style.display = "none";
13
- }
14
- }
15
- customElements.define("bd-tab-content-panel-family", BdTabContentPanelFamily);
16
-
17
- class TabsComponentFamily extends LitElement {
18
- static properties = {
19
- title : { type: String },
20
- subtitle : { type: String },
21
- highlightText : { type: String, attribute: "highlight-text" },
22
- selectedTab : { type: Number, state: true },
23
- _panelMinHeight: { type: Number, state: true }
24
- };
25
-
26
- static styles = [tokens, tabsChildCSS];
27
-
28
- constructor() {
29
- super();
30
- this.title = "";
31
- this.subtitle = "";
32
- this.highlightText = "";
33
- this.selectedTab = 0;
34
- this._panelMinHeight = 0;
35
- }
36
-
37
- _getPanels() {
38
- return Array.from(this.querySelectorAll(":scope > bd-tab-content-panel-family"));
39
- }
40
-
41
- selectTab(index) {
42
- this.selectedTab = index;
43
- }
44
-
45
- async firstUpdated() {
46
- await this.updateComplete;
47
- await this._measureAllPanels();
48
- }
49
-
50
- async _measureAllPanels() {
51
- const panels = this._getPanels();
52
- const wrapper = this.renderRoot.querySelector(".bd-panel-wrapper");
53
- if (!wrapper || !panels.length) return;
54
-
55
- const originalTab = this.selectedTab;
56
- let maxHeight = 0;
57
-
58
- for (let i = 0; i < panels.length; i++) {
59
- this.selectedTab = i;
60
- await this.updateComplete;
61
- await new Promise(r => requestAnimationFrame(r));
62
- await new Promise(r => requestAnimationFrame(r));
63
-
64
- const h = wrapper.scrollHeight;
65
- if (h > maxHeight) maxHeight = h;
66
- }
67
-
68
- this.selectedTab = originalTab;
69
- await this.updateComplete;
70
- this._panelMinHeight = maxHeight;
71
- }
72
-
73
- _renderPanel(panel) {
74
- const headingEl = panel.querySelector("[slot='heading']");
75
- const contentEl = panel.querySelector("[slot='content']");
76
- const imageEl = panel.querySelector("[slot='image']");
77
- const ctaEl = panel.querySelector("[slot='cta']");
78
-
79
- const heading = panel.getAttribute("heading");
80
- const imageSrc = panel.getAttribute("image-src");
81
- const imageAlt = panel.getAttribute("image-alt") || "";
82
- const ctaLabel = panel.getAttribute("cta-label");
83
- const ctaHref = panel.getAttribute("cta-href") || "#";
84
- const ctaKind = panel.getAttribute("cta-kind") || "danger";
85
- const ctaSize = panel.getAttribute("cta-size") || "md";
86
-
87
- return html`
88
- <div class="bd-card-container">
89
-
90
- <div class="bd-left">
91
- ${headingEl
92
- ? headingEl.cloneNode(true)
93
- : heading
94
- ? html`<bd-h as="h3" color="var(--color-blue-600)">${heading}</bd-h>`
95
- : ""}
96
-
97
- ${contentEl
98
- ? html`<div class="bd-panel-content">${contentEl.cloneNode(true)}</div>`
99
- : ""}
100
-
101
- ${ctaEl
102
- ? ctaEl.cloneNode(true)
103
- : ctaLabel
104
- ? html`
105
- <bd-button-link
106
- href="${ctaHref}"
107
- kind="${ctaKind}"
108
- size="${ctaSize}"
109
- label="${ctaLabel}"
110
- strong="true"
111
- >
112
- ${ctaLabel}
113
- </bd-button-link>`
114
- : ""}
115
- </div>
116
-
117
- <div class="bd-right">
118
- ${imageEl
119
- ? imageEl.cloneNode(true)
120
- : imageSrc
121
- ? html`<img src="${imageSrc}" alt="${imageAlt}" class="bd-panel-image" loading="lazy" />`
122
- : ""}
123
- </div>
124
-
125
- </div>
126
- `;
127
- }
128
-
129
- render() {
130
- const panels = this._getPanels();
131
- const activePanel = panels[this.selectedTab];
132
-
133
- return html`
134
- <div class="bd-tabs-component">
135
-
136
- ${this.title
137
- ? html`<bd-highlight highlight-text="${this.highlightText}">${this.title}</bd-highlight>`
138
- : ""}
139
-
140
- ${this.subtitle
141
- ? html`<bd-p kind="regular" class="bd-tabs-subtitle">${this.subtitle}</bd-p>`
142
- : ""}
143
-
144
- <div class="bd-tabs-container" role="tablist">
145
- ${panels.map((panel, index) => {
146
- const icon = panel.getAttribute("icon");
147
- return html`
148
- <button
149
- role="tab"
150
- aria-selected="${this.selectedTab === index ? "true" : "false"}"
151
- aria-controls="tab-panel-${index}"
152
- id="tab-btn-${index}"
153
- class="bd-tab-button ${this.selectedTab === index ? "bd-selected" : ""}"
154
- @click=${() => this.selectTab(index)}
155
- >
156
- ${icon ? html`<img src="${icon}" alt="" class="bd-tab-icon" />` : ""}
157
- <span class="bd-tab-label">${panel.getAttribute("title")}</span>
158
- </button>
159
- `;
160
- })}
161
- </div>
162
-
163
- <div
164
- id="tab-panel-${this.selectedTab}"
165
- role="tabpanel"
166
- aria-labelledby="tab-btn-${this.selectedTab}"
167
- class="bd-panel-wrapper"
168
- style="${this._panelMinHeight ? `min-height: ${this._panelMinHeight}px;` : ""}"
169
- >
170
- ${activePanel
171
- ? keyed(this.selectedTab, this._renderPanel(activePanel))
172
- : ""}
173
- </div>
174
-
175
- </div>
176
- `;
177
- }
178
- }
179
-
180
- customElements.define("bd-tabs-component-family", TabsComponentFamily);