@repobit/dex-system-design 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/CHANGELOG.md +89 -0
  2. package/README.md +43 -12
  3. package/package.json +6 -4
  4. package/schemas/component-manifest.json +207 -49
  5. package/schemas/manifest-omissions.json +2 -0
  6. package/src/components/accordion/accordion.css.js +12 -1
  7. package/src/components/agent-endpoints/agent-endpoints.js +1 -1
  8. package/src/components/alert/alert.css.js +22 -1
  9. package/src/components/anchor/anchor-nav.css.js +6 -1
  10. package/src/components/annotation/annotation.css.js +6 -1
  11. package/src/components/architecture.stories.js +6 -4
  12. package/src/components/avatar/avatar.js +37 -11
  13. package/src/components/avatar/avatar.stories.js +10 -6
  14. package/src/components/awards/awards-flex.css.js +31 -129
  15. package/src/components/awards/awards-flex.js +66 -116
  16. package/src/components/awards/awards-flex.stories.js +8 -6
  17. package/src/components/back/back.css.js +6 -1
  18. package/src/components/back/back.js +24 -12
  19. package/src/components/back/back.stories.js +3 -3
  20. package/src/components/badge/badge.js +6 -3
  21. package/src/components/badge/badge.stories.js +13 -9
  22. package/src/components/bento-grid/bento-grid.js +1 -1
  23. package/src/components/blockquote/blockquote.css.js +12 -3
  24. package/src/components/blockquote/blockquote.js +12 -5
  25. package/src/components/blockquote/blockquote.stories.js +6 -4
  26. package/src/components/button/button.css.js +46 -25
  27. package/src/components/button/button.js +44 -43
  28. package/src/components/button/button.stories.js +2 -2
  29. package/src/components/caption/caption.css.js +10 -0
  30. package/src/components/caption/caption.stories.js +4 -4
  31. package/src/components/carousel/carousel.css.js +19 -116
  32. package/src/components/carousel/carousel.js +70 -74
  33. package/src/components/carousel/carousel.stories.js +9 -8
  34. package/src/components/checkbox/checkbox.css.js +6 -1
  35. package/src/components/code/code.css.js +6 -1
  36. package/src/components/code/code.js +48 -7
  37. package/src/components/code/code.stories.js +7 -4
  38. package/src/components/divider/divider-horizontal.js +11 -3
  39. package/src/components/divider/divider-vertical.js +12 -5
  40. package/src/components/divider/divider.css.js +4 -1
  41. package/src/components/divider/divider.stories.js +6 -6
  42. package/src/components/dropdown/dropdown.js +67 -13
  43. package/src/components/dropdown/dropdown.stories.js +15 -14
  44. package/src/components/fieldset/fieldset.stories.js +41 -16
  45. package/src/components/footer/footer-nav-menu.css.js +6 -1
  46. package/src/components/footer/footer.css.js +6 -1
  47. package/src/components/header/header-code.js +1 -1
  48. package/src/components/header/header.css.js +9 -4
  49. package/src/components/heading/heading.stories.js +64 -31
  50. package/src/components/highlight/highlight.js +74 -34
  51. package/src/components/highlight/highlight.stories.js +5 -4
  52. package/src/components/icons/icon-element.js +49 -6
  53. package/src/components/icons/icons.stories.js +7 -0
  54. package/src/components/image/image.css.js +9 -98
  55. package/src/components/image/image.js +7 -2
  56. package/src/components/input/custom-form.stories.js +14 -19
  57. package/src/components/input/input-clipboard.css.js +6 -1
  58. package/src/components/input/input-clipboard.js +56 -8
  59. package/src/components/input/input.js +19 -2
  60. package/src/components/label/label.js +87 -1
  61. package/src/components/label/label.stories.js +21 -12
  62. package/src/components/link/link.css.js +52 -3
  63. package/src/components/link/link.js +52 -17
  64. package/src/components/link/link.stories.js +114 -3
  65. package/src/components/list/list-item/list-item.css.js +4 -6
  66. package/src/components/list/list-item/list-item.js +53 -5
  67. package/src/components/list/list-item/list-item.stories.js +22 -0
  68. package/src/components/list/list.js +27 -0
  69. package/src/components/modal/modal.css.js +6 -1
  70. package/src/components/pagination-dots/pagination-dots.css.js +161 -0
  71. package/src/components/pagination-dots/pagination-dots.js +202 -0
  72. package/src/components/pagination-dots/pagination-dots.stories.js +171 -0
  73. package/src/components/paragraph/paragraph.css.js +37 -1
  74. package/src/components/paragraph/paragraph.js +19 -2
  75. package/src/components/paragraph/paragraph.stories.js +40 -6
  76. package/src/components/picture/picture.css.js +8 -67
  77. package/src/components/picture/picture.js +15 -8
  78. package/src/components/pricing-cards/pricing-card.css.js +12 -2
  79. package/src/components/pricing-cards/pricing-card.js +4 -4
  80. package/src/components/progress/progress.js +24 -4
  81. package/src/components/progress/progress.stories.js +8 -6
  82. package/src/components/radio/radio.css.js +6 -1
  83. package/src/components/radio/radio.js +48 -3
  84. package/src/components/radio/radio.stories.js +1 -1
  85. package/src/components/shared/form-field.css.js +30 -4
  86. package/src/components/shared/token-scales.js +16 -0
  87. package/src/components/spinner/spinner.css.js +31 -4
  88. package/src/components/spinner/spinner.js +26 -4
  89. package/src/components/spinner/spinner.stories.js +10 -7
  90. package/src/components/switch/switch.css.js +21 -3
  91. package/src/components/switch/switch.js +8 -1
  92. package/src/components/switch/switch.stories.js +2 -1
  93. package/src/components/tab-list/tab-list.css.js +6 -1
  94. package/src/components/terminal/terminal-cursor.js +11 -0
  95. package/src/components/terminal/terminal-message.js +1 -1
  96. package/src/components/termsOfUse/terms.css.js +6 -1
  97. package/src/components/textarea/textarea.stories.js +23 -0
  98. package/src/components/tooltip/tooltip.css.js +24 -1
  99. package/src/components/tooltip/tooltip.js +135 -5
  100. package/src/components/tooltip/tooltip.stories.js +20 -14
  101. package/src/components/trust-panel/trust-panel.js +2 -2
  102. package/src/components/video/video.js +38 -3
  103. package/src/components/video/video.stories.js +10 -5
  104. package/src/components/video-player/video-player.css.js +6 -1
  105. package/src/tokens/elevation.stories.js +2 -3
  106. package/src/tokens/focus.stories.js +81 -15
  107. package/src/tokens/motion.stories.js +0 -6
  108. package/src/tokens/tokens.css +174 -97
  109. package/src/tokens/tokens.js +174 -97
  110. package/src/tokens/vertical-rhythm.stories.js +1 -1
  111. package/src/stories/Button.js +0 -20
  112. package/src/stories/Button.stories.js +0 -46
  113. package/src/stories/Configure.mdx +0 -364
  114. package/src/stories/Header.js +0 -45
  115. package/src/stories/Header.stories.js +0 -24
  116. package/src/stories/Page.js +0 -62
  117. package/src/stories/Page.stories.js +0 -20
  118. package/src/stories/assets/accessibility.png +0 -0
  119. package/src/stories/assets/accessibility.svg +0 -1
  120. package/src/stories/assets/addon-library.png +0 -0
  121. package/src/stories/assets/assets.png +0 -0
  122. package/src/stories/assets/avif-test-image.avif +0 -0
  123. package/src/stories/assets/context.png +0 -0
  124. package/src/stories/assets/discord.svg +0 -1
  125. package/src/stories/assets/docs.png +0 -0
  126. package/src/stories/assets/figma-plugin.png +0 -0
  127. package/src/stories/assets/github.svg +0 -1
  128. package/src/stories/assets/share.png +0 -0
  129. package/src/stories/assets/styling.png +0 -0
  130. package/src/stories/assets/testing.png +0 -0
  131. package/src/stories/assets/theming.png +0 -0
  132. package/src/stories/assets/tutorials.svg +0 -1
  133. package/src/stories/assets/youtube.svg +0 -1
  134. package/src/stories/button.css +0 -30
  135. package/src/stories/header.css +0 -32
  136. package/src/stories/page.css +0 -68
package/CHANGELOG.md CHANGED
@@ -3,6 +3,95 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.0.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@1.0.1...@repobit/dex-system-design@2.0.0) (2026-10-15)
7
+
8
+ ### ⚠ BREAKING CHANGES
9
+
10
+ * **DEX-1014:** bd-custom-input-clipboard no longer dispatches a custom
11
+ "input" event with the string as detail. Listen for bd-input or
12
+ bd-change and read detail.value. Nothing in this repository listened for
13
+ the old event.
14
+
15
+ Co-Authored-By: Claude <noreply@anthropic.com>
16
+
17
+ ### Features
18
+
19
+ * **DEX-1014:** a dark-surface focus ring, because the white band merged into light controls
20
+ * **DEX-1014:** bd-button and bd-button-link take a description for their inner control
21
+ * **DEX-1014:** bd-custom-dropdown has a value and fires bd-input / bd-change
22
+ * **DEX-1014:** bd-link takes a description too, so a bd-link tooltip trigger is described
23
+ * **DEX-1014:** bd-link takes an arrow, because three components hand-drew a chevron instead
24
+ * **DEX-1014:** bd-p takes color and an eyebrow variant, so all five eyebrows read 500
25
+ * **DEX-1014:** bd-pagination-dots runs autoplay, with the progress in the current pill
26
+ * **DEX-1014:** bd-pagination-dots, an atom for the slide indicator only awards-flex could draw
27
+ * **DEX-1014:** bd-tooltip dismisses on Escape, the rest of WCAG 1.4.13
28
+ * **DEX-1014:** check:docs reads docs/README.md and checks Markdown links
29
+ * **DEX-1014:** the awards carousel shows one award per slide on a phone
30
+ * **DEX-1014:** the eyebrow steps down to 14px below lg, as the tablet and mobile frames draw it
31
+
32
+ ### Bug Fixes
33
+
34
+ * **DEX-1014:** a bd-code block is a group, not a landmark, and a tab stop only when it scrolls
35
+ * **DEX-1014:** a bd-link with no href is not a link to the top of the page
36
+ * **DEX-1014:** a bd-picture source with no type is used, not skipped as type="undefined"
37
+ * **DEX-1014:** a select's descenders no longer clip; fields give text their full line box
38
+ * **DEX-1014:** a standalone link takes its own role's weight, 500 rather than the inline 400
39
+ * **DEX-1014:** an input's focused prop means focused, not a ring on a field that is not
40
+ * **DEX-1014:** atom focus rings survive forced-colors mode, because box-shadow is not painted there
41
+ * **DEX-1014:** bd-alert's dismiss button has a 24px target, not a 16px one
42
+ * **DEX-1014:** bd-avatar falls back to initials on a broken image, and stays quiet without a name
43
+ * **DEX-1014:** bd-back with an href is a real link, not a button that sets location
44
+ * **DEX-1014:** bd-badge icons render at 16px, not the 32px they fell back to
45
+ * **DEX-1014:** bd-blockquote credits the quote from outside it, in a figcaption
46
+ * **DEX-1014:** bd-button focus is an offset outline, because code can leave the gap unpainted
47
+ * **DEX-1014:** bd-caption size="sm" takes the caption-small role whole, and the docs say what it is
48
+ * **DEX-1014:** bd-custom-dropdown announces invalid and its hint, not only draws them
49
+ * **DEX-1014:** bd-custom-dropdown renders an empty field, not nothing, on non-JSON options
50
+ * **DEX-1014:** bd-custom-input-clipboard announces invalid and its hint, not only draws them
51
+ * **DEX-1014:** bd-custom-input-clipboard fires bd-input / bd-change, like its siblings
52
+ * **DEX-1014:** bd-custom-input-clipboard gets its own export, ./input-clipboard
53
+ * **DEX-1014:** bd-divider-vertical's thickness is a border-width step, not a length written as given
54
+ * **DEX-1014:** bd-highlight keeps text after a repeated phrase, and adds no spaces round the mark
55
+ * **DEX-1014:** bd-highlight keeps the headline's markup when it marks the phrase
56
+ * **DEX-1014:** bd-label's for names and activates its control, as a native label's does
57
+ * **DEX-1014:** bd-li's color is a text role, not a string written into its style, closes [#f00](https://github.com/bitdefender/dex-core/issues/f00)
58
+ * **DEX-1014:** bd-list falls back to a styled value instead of carrying one nothing styles
59
+ * **DEX-1014:** bd-progress clamps the value it reports, not only the fill it draws
60
+ * **DEX-1014:** bd-progress clears a tone it does not style
61
+ * **DEX-1014:** bd-radio keeps one tab stop per group when another radio changes
62
+ * **DEX-1014:** bd-radio reflects name, so a radio named by property joins its group
63
+ * **DEX-1014:** bd-spinner announces its label, which an empty status region never did
64
+ * **DEX-1014:** bd-spinner keeps its arc under reduced motion and pulses the disc instead
65
+ * **DEX-1014:** bd-switch thumb stays on its track when the reader enlarges text
66
+ * **DEX-1014:** bd-switch's bd-change bubbles and is composed, like its siblings
67
+ * **DEX-1014:** bd-terminal-cursor holds still under prefers-reduced-motion
68
+ * **DEX-1014:** bd-toggle-radio's change event carries the name it declares
69
+ * **DEX-1014:** bd-tooltip describes its trigger, so a screen reader hears the tooltip
70
+ * **DEX-1014:** bd-tooltip re-places itself after it is moved in the DOM
71
+ * **DEX-1014:** bd-tooltip stays open while the pointer moves onto the bubble
72
+ * **DEX-1014:** bd-video reaches its player: captions, muted and controls="false" all work
73
+ * **DEX-1014:** component focus rings survive forced-colors mode too
74
+ * **DEX-1014:** custom-click bubbles and is composed, so a wrapper can hear it
75
+ * **DEX-1014:** dividers draw a role at full strength, and opacity is only what a caller asks for
76
+ * **DEX-1014:** eight Code Connect templates emit markup their element honours
77
+ * **DEX-1014:** icons leave their host's style attribute alone, so a page's colour survives
78
+ * **DEX-1014:** numbered bd-li items count 1, 2, 3 instead of all reading "1."
79
+ * **DEX-1014:** stacked static quote cards take their own height on a phone
80
+ * **DEX-1014:** surface="dark" buttons take the inverse ring, because blue vanished on a brand hero
81
+ * **DEX-1014:** the awards pause toggle keeps 3:1 on the tint, and two band rules are written down
82
+ * **DEX-1014:** the bd-contact-button manifest entry lists what the element has
83
+ * **DEX-1014:** the current pagination pill takes a 2px edge, drawn inside so the fill keeps 8px
84
+ * **DEX-1014:** the touch-target tokens read the dimension scale instead of px literals
85
+
86
+
87
+ ## [1.0.1](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@1.0.0...@repobit/dex-system-design@1.0.1) (2026-10-15)
88
+
89
+ **Note:** Version bump only for package @repobit/dex-system-design
90
+
91
+
92
+
93
+
94
+
6
95
  ## [1.0.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.26.0...@repobit/dex-system-design@1.0.0) (2026-10-14)
7
96
 
8
97
  ### ⚠ BREAKING CHANGES
package/README.md CHANGED
@@ -18,7 +18,7 @@ import '@repobit/dex-system-design/button';
18
18
  ```
19
19
 
20
20
  ```html
21
- <bd-button kind="primary" size="md">Buy now</bd-button>
21
+ <bd-button variant="primary" size="md">Buy now</bd-button>
22
22
  ```
23
23
 
24
24
  Each component is a separate entry point — see the `exports` map in
@@ -33,29 +33,43 @@ cascade layer. Importing any component installs them; nothing else is required.
33
33
  .thing {
34
34
  padding: var(--spacing-16);
35
35
  border-radius: var(--radius-md);
36
- color: var(--color-neutral-900);
36
+ color: var(--color-text-primary);
37
+ background: var(--color-surface-container);
37
38
  }
38
39
  ```
39
40
 
41
+ For colour, use the **semantic roles** — `--color-text-*`, `--color-surface-*`,
42
+ `--color-border-*`, `--status-*` — rather than the palette steps
43
+ (`--color-neutral-900`, `--color-blue-500`) behind them. A role names the job,
44
+ so it keeps its contrast when a theme or a single value changes; a palette
45
+ step is only today's value. `Foundations/Color/Responsibilities` and
46
+ `Foundations/Surfaces` list which role answers which question.
47
+
40
48
  ### Overriding a token
41
49
 
42
50
  Because the tokens sit in a cascade layer, and unlayered CSS beats any layer,
43
- your own stylesheet wins with no special syntax:
51
+ your own stylesheet wins with no special syntax. Override a role, not a
52
+ palette step:
44
53
 
45
54
  ```css
46
55
  :root {
47
- --color-blue-500: #0a58ca;
56
+ --color-text-brand: var(--color-blue-700);
48
57
  }
49
58
  ```
50
59
 
51
- Dark mode is the same mechanism:
60
+ Recolouring a palette step (`--color-blue-500: …`) changes every role built on
61
+ it at once, including ones whose contrast was measured against that exact
62
+ value, such as white text on a blue button.
63
+
64
+ **If your own CSS uses `@layer`**, declare the order first. The tokens' layer is
65
+ installed after your stylesheets, so it is declared last and an override
66
+ inside one of your layers silently loses to it:
52
67
 
53
68
  ```css
54
- @media (prefers-color-scheme: dark) {
55
- :root {
56
- --color-neutral-0: #111418;
57
- --color-neutral-900: #e8eaed;
58
- }
69
+ @layer bd-tokens, app; /* bd-tokens first, so app wins */
70
+
71
+ @layer app {
72
+ :root { --color-text-brand: var(--color-blue-700); }
59
73
  }
60
74
  ```
61
75
 
@@ -63,6 +77,16 @@ This works because a token is declared once, on the document, rather than on
63
77
  each component's `:host`. A `:host` declaration would beat an inherited value
64
78
  and make the token unoverridable.
65
79
 
80
+ ### Dark mode
81
+
82
+ No dark theme ships yet. **Do not build one by swapping palette steps** — for
83
+ example exchanging `--color-neutral-0` and `--color-neutral-900`. The roles
84
+ that sit on coloured fills do not flip with them. Measured with exactly that
85
+ swap: a primary button's label falls to 4.07:1, and 2.99:1 on hover; text on an
86
+ error fill to 3.39:1; brand text on the page to 2.99:1 — all under the 4.5:1
87
+ text minimum. A dark theme has to remap the semantic roles, and
88
+ `Foundations/Theming/Dark mode` is the study of how.
89
+
66
90
  You can also import the tokens directly if you need them without a component:
67
91
 
68
92
  ```js
@@ -83,8 +107,13 @@ npm run storybook
83
107
  ```
84
108
 
85
109
  `Foundations/` documents every primitive — colour, spacing, typography,
86
- fonts, grid, shape, elevation, focus, motion and dimension. Those pages read
87
- the loaded token CSS at render time, so they cannot drift from the tokens.
110
+ fonts, grid, shape, elevation, focus, motion and dimension. Their swatches and
111
+ values are read from the loaded token CSS at render time, so those cannot drift
112
+ from the tokens; the explanatory prose beside them can, and is checked only for
113
+ the files and references it cites.
114
+
115
+ The full set of rules for working in this package — and the reasoning behind
116
+ each — is in [`CLAUDE.md`](./CLAUDE.md).
88
117
 
89
118
  ## Page generation
90
119
 
@@ -129,6 +158,8 @@ foundation**. Everything is built and styled from them and from nothing else.
129
158
  | `npm run build:tokens` | regenerate the CSS token files from their JS sources |
130
159
  | `npm run build:tokens:check` | fail if a generated file is stale (CI) |
131
160
  | `npm run check:manifest` | verify the component manifest against the components |
161
+ | `npm run check:ds` | every design-system gate — run before finishing any change |
162
+ | `npm test` | `check:ds` plus the browser checks (needs Playwright's Chromium) |
132
163
 
133
164
  `src/tokens/tokens.js` is the source of truth for tokens; `tokens.css` is
134
165
  generated from it. Edit the JS and run `npm run build:tokens`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@repobit/dex-system-design",
3
- "version": "1.0.0",
3
+ "version": "2.0.0",
4
4
  "description": "Design system based on Web Components.",
5
5
  "author": "Iordache Matei Cezar <miordache@bitdefender.com>",
6
6
  "homepage": "https://github.com/bitdefender/dex-core#readme",
@@ -55,6 +55,7 @@
55
55
  "./marks": "./src/components/icons/marks.js",
56
56
  "./image": "./src/components/image/image.js",
57
57
  "./input": "./src/components/input/input.js",
58
+ "./input-clipboard": "./src/components/input/input-clipboard.js",
58
59
  "./label": "./src/components/label/label.js",
59
60
  "./light-carousel": "./src/components/light-carousel/light-carousel.js",
60
61
  "./link": "./src/components/link/link.js",
@@ -62,6 +63,7 @@
62
63
  "./list-item": "./src/components/list/list-item/list-item.js",
63
64
  "./modal": "./src/components/modal/modal.js",
64
65
  "./page-schema": "./schemas/page-schema.json",
66
+ "./pagination-dots": "./src/components/pagination-dots/pagination-dots.js",
65
67
  "./paragraph": "./src/components/paragraph/paragraph.js",
66
68
  "./picture": "./src/components/picture/picture.js",
67
69
  "./pricing-cards": "./src/components/pricing-cards/pricing-card.js",
@@ -158,8 +160,8 @@
158
160
  "url": "https://github.com/bitdefender/dex-core/issues"
159
161
  },
160
162
  "dependencies": {
161
- "@repobit/dex-store": "1.6.50",
162
- "@repobit/dex-store-elements": "2.1.20",
163
+ "@repobit/dex-store": "1.6.51",
164
+ "@repobit/dex-store-elements": "2.1.21",
163
165
  "lit": "^3.3.2"
164
166
  },
165
167
  "devDependencies": {
@@ -177,5 +179,5 @@
177
179
  "volta": {
178
180
  "node": "24.14.0"
179
181
  },
180
- "gitHead": "e9db0e1ce45d462ecca8b9c6e6d43e32447d3535"
182
+ "gitHead": "2d3b6d84d6e805628c3b6448429fb190beff3e78"
181
183
  }