@vanelsas/baredom 2.0.1 → 2.1.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 (87) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +26 -7
  3. package/dist/base.js +405 -403
  4. package/dist/x-alert.js +19 -19
  5. package/dist/x-avatar-group.js +11 -11
  6. package/dist/x-avatar.js +15 -15
  7. package/dist/x-badge.js +11 -11
  8. package/dist/x-bento-grid.js +5 -5
  9. package/dist/x-bento-item.js +4 -4
  10. package/dist/x-breadcrumbs.js +14 -14
  11. package/dist/x-button.js +16 -16
  12. package/dist/x-cancel-dialogue.js +17 -17
  13. package/dist/x-card.js +7 -7
  14. package/dist/x-carousel.js +35 -0
  15. package/dist/x-chart.js +48 -48
  16. package/dist/x-checkbox.js +11 -11
  17. package/dist/x-chip.js +9 -9
  18. package/dist/x-collapse.js +11 -11
  19. package/dist/x-color-picker.js +46 -0
  20. package/dist/x-command-palette.js +27 -32
  21. package/dist/x-container.js +6 -6
  22. package/dist/x-context-menu.js +20 -20
  23. package/dist/x-copy.js +23 -23
  24. package/dist/x-currency-field.js +23 -23
  25. package/dist/x-date-picker.js +42 -42
  26. package/dist/x-divider.js +10 -13
  27. package/dist/x-drawer.js +12 -12
  28. package/dist/x-dropdown.js +10 -10
  29. package/dist/x-fieldset.js +6 -6
  30. package/dist/x-file-download.js +7 -7
  31. package/dist/x-form-field.js +16 -16
  32. package/dist/x-form.js +10 -10
  33. package/dist/x-gaussian-blur.js +18 -18
  34. package/dist/x-grid.js +6 -6
  35. package/dist/x-kinetic-font.js +29 -28
  36. package/dist/x-kinetic-typography.js +39 -39
  37. package/dist/x-liquid-dock.js +39 -39
  38. package/dist/x-liquid-fill.js +45 -44
  39. package/dist/x-liquid-glass.js +47 -47
  40. package/dist/x-menu-item.js +10 -10
  41. package/dist/x-menu.js +11 -12
  42. package/dist/x-metaball-cursor.js +27 -28
  43. package/dist/x-modal.js +13 -13
  44. package/dist/x-morph-stack.js +39 -39
  45. package/dist/x-navbar.js +13 -13
  46. package/dist/x-neural-glow.js +34 -34
  47. package/dist/x-notification-center.js +10 -9
  48. package/dist/x-organic-divider.js +19 -19
  49. package/dist/x-organic-progress.js +38 -38
  50. package/dist/x-organic-shape.js +14 -14
  51. package/dist/x-pagination.js +16 -16
  52. package/dist/x-particle-button.js +53 -0
  53. package/dist/x-popover.js +15 -15
  54. package/dist/x-progress-circle.js +11 -11
  55. package/dist/x-progress.js +11 -11
  56. package/dist/x-radio.js +11 -11
  57. package/dist/x-ripple-effect.js +12 -12
  58. package/dist/x-scroll-parallax.js +19 -19
  59. package/dist/x-scroll-stack.js +19 -19
  60. package/dist/x-scroll-story.js +36 -36
  61. package/dist/x-scroll-timeline.js +47 -47
  62. package/dist/x-scroll.js +42 -42
  63. package/dist/x-search-field.js +15 -15
  64. package/dist/x-select.js +11 -11
  65. package/dist/x-sidebar.js +17 -17
  66. package/dist/x-skeleton.js +6 -6
  67. package/dist/x-slider.js +16 -16
  68. package/dist/x-soft-body.js +22 -22
  69. package/dist/x-spacer.js +5 -5
  70. package/dist/x-spinner.js +5 -5
  71. package/dist/x-splash.js +13 -13
  72. package/dist/x-stat.js +11 -11
  73. package/dist/x-stepper.js +16 -16
  74. package/dist/x-switch.js +10 -10
  75. package/dist/x-tab.js +8 -8
  76. package/dist/x-table-cell.js +24 -24
  77. package/dist/x-table-row.js +10 -10
  78. package/dist/x-table.js +16 -16
  79. package/dist/x-tabs.js +11 -11
  80. package/dist/x-text-area.js +19 -19
  81. package/dist/x-theme.js +25 -24
  82. package/dist/x-timeline-item.js +24 -24
  83. package/dist/x-timeline.js +9 -9
  84. package/dist/x-toast.js +25 -25
  85. package/dist/x-toaster.js +8 -8
  86. package/dist/x-typography.js +11 -11
  87. package/package.json +14 -2
package/CHANGELOG.md CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  All notable changes to BareDOM will be documented in this file.
4
4
 
5
+ ## [2.1.0] - 2026-04-13
6
+
7
+ ### Added
8
+
9
+ - **x-carousel** — Themeable, accessible carousel with swipe/drag navigation, arrow buttons, dot indicators, autoplay, keyboard interaction, slide/fade transitions, and horizontal/vertical orientation
10
+ - **x-color-picker** — Color picker with 2D saturation/brightness area, hue strip, optional alpha channel, preset swatches, eyedropper support, and clipboard copy; supports inline and popover display modes
11
+ - **x-particle-button** — Button that emits and reabsorbs visual fragments on interaction, combining a premium base, pointer-tracked specular highlight, and a canvas particle system (modes: subtle, spark, ember, disperse)
12
+ - x-theme: design tokens expanded from 33 to 50 (adds z-index, opacity, and additional colour/spacing/shape tokens for overlay stacking and disabled states)
13
+ - Shared DOM and model utilities (`baredom.utils.dom`, `baredom.utils.model`) so components no longer reimplement attribute parsing, instance-field access, and security sanitisers
14
+ - CI quality checks and bundle-size documentation
15
+
16
+ ### Changed
17
+
18
+ - `public/index.html` component gallery now consumes x-theme design tokens
19
+
20
+ ### Fixed
21
+
22
+ - CSS injection and XSS vulnerabilities in input sanitization
23
+ - x-liquid-fill: `disabled` attribute now correctly suspends animation and interaction
24
+ - x-divider: pattern rendering regression
25
+ - Mobile viewport units (`100dvh` / `100%`) applied where `100vh` / `100vw` were causing overflow
26
+ - Missing demo page for audit-flagged component
27
+ - Flaky async test timeouts
28
+ - Closure Advanced Compilation safety regression (bab76f9)
29
+
5
30
  ## [2.0.1] - 2026-04-10
6
31
 
7
32
  ### Fixed
package/README.md CHANGED
@@ -19,7 +19,7 @@
19
19
 
20
20
  ## What is BareDOM?
21
21
 
22
- BareDOM is a library of 80 UI components built entirely on web standards — Custom Elements v1, Shadow DOM, and ES modules. There is no framework runtime, no virtual DOM, and no JavaScript framework peer dependency. Every component is a native HTML element that you register once and use anywhere.
22
+ BareDOM is a library of UI components built entirely on web standards — Custom Elements v1, Shadow DOM, and ES modules. There is no framework runtime, no virtual DOM, and no JavaScript framework peer dependency. Every component is a native HTML element that you register once and use anywhere.
23
23
 
24
24
  The core rendering model is deliberately simple:
25
25
 
@@ -33,7 +33,7 @@ BareDOM is authored in ClojureScript and compiled to optimised, minified ES modu
33
33
 
34
34
  BareDOM has been created using Claude Code. The CLAUDE.md file is added to the repository for your convenience.
35
35
 
36
- All web components, including new, modern, and exciting ones such as x-morph-stack, x-liquid-fill, x-liquid-glass, x=soft-body, x-ripple-effect, x-scroll-parallax, x-scroll-story, x-scroll-timeline, x-kinetic-font, x-kinetic-typography, x-organic-shape, x-gaussian-blur, x-neural-glow, x-metaball-cursor, and x-organic-progress, can be seen [here](https://avanelsas.github.io/baredom/)
36
+ All web components, including new, modern, and exciting ones such as x-morph-stack, x-liquid-fill, x-liquid-glass, x=soft-body, x-ripple-effect, x-scroll-parallax, x-scroll-story, x-scroll-timeline, x-kinetic-font, x-kinetic-typography, x-organic-shape, x-gaussian-blur, x-neural-glow, x-metaball-cursor, x-organic-progress, and x-particle-button, can be seen [here](https://avanelsas.github.io/baredom/)
37
37
 
38
38
  ---
39
39
 
@@ -116,13 +116,13 @@ BareDOM can be consumed three ways: as a **ClojureScript source dependency** (Cl
116
116
  Add BareDOM to your `deps.edn`:
117
117
 
118
118
  ```clojure
119
- {:deps {com.github.avanelsas/baredom {:mvn/version "2.0.1"}}}
119
+ {:deps {com.github.avanelsas/baredom {:mvn/version "2.1.0"}}}
120
120
  ```
121
121
 
122
122
  Or in your `shadow-cljs.edn` dependencies:
123
123
 
124
124
  ```clojure
125
- :dependencies [[com.github.avanelsas/baredom "2.0.1"]]
125
+ :dependencies [[com.github.avanelsas/baredom "2.1.0"]]
126
126
  ```
127
127
 
128
128
  Then require component namespaces directly and call their `init!` function once at startup:
@@ -179,7 +179,7 @@ Add the npm package to your `package.json`:
179
179
  ```json
180
180
  {
181
181
  "dependencies": {
182
- "@vanelsas/baredom": "^2.0.1"
182
+ "@vanelsas/baredom": "^2.1.0"
183
183
  }
184
184
  }
185
185
  ```
@@ -334,12 +334,13 @@ Override CSS custom properties at any scope:
334
334
 
335
335
  ## Components
336
336
 
337
- ### Form (16)
337
+ ### Form (17)
338
338
 
339
339
  | Tag | Description |
340
340
  |-----|-------------|
341
341
  | [`<x-button>`](./docs/x-button.md) | Action control. Variants: `primary`, `secondary`, `tertiary`, `ghost`, `danger`. Sizes: `sm`, `md`, `lg`. States: `disabled`, `loading`, `pressed`. Icon slots. |
342
342
  | [`<x-checkbox>`](./docs/x-checkbox.md) | Boolean input. Reflects `checked` and `indeterminate` states to attributes. |
343
+ | [`<x-color-picker>`](./docs/x-color-picker.md) | Colour picker with 2D saturation/brightness area, hue strip, optional alpha, preset swatches, eyedropper, and clipboard copy. Inline or popover mode. |
343
344
  | [`<x-copy>`](./docs/x-copy.md) | Copy-to-clipboard utility button with success feedback. |
344
345
  | [`<x-currency-field>`](./docs/x-currency-field.md) | Formatted currency input with locale-aware masking. |
345
346
  | [`<x-date-picker>`](./docs/x-date-picker.md) | Calendar-based date selection with keyboard navigation. |
@@ -394,12 +395,13 @@ Override CSS custom properties at any scope:
394
395
  | [`<x-grid>`](./docs/x-grid.md) | CSS Grid layout component with responsive column configuration. |
395
396
  | [`<x-spacer>`](./docs/x-spacer.md) | Flexible spacing element for flexbox and grid layouts. |
396
397
 
397
- ### Data (9)
398
+ ### Data (10)
398
399
 
399
400
  | Tag | Description |
400
401
  |-----|-------------|
401
402
  | [`<x-avatar>`](./docs/x-avatar.md) | User photo or initials display. Shape, size, and status dot variants. |
402
403
  | [`<x-avatar-group>`](./docs/x-avatar-group.md) | Overlapping avatar stack for representing multiple users. |
404
+ | [`<x-carousel>`](./docs/x-carousel.md) | Accessible carousel with swipe/drag, arrows, dot indicators, autoplay, slide/fade transitions, and horizontal/vertical orientation. |
403
405
  | [`<x-chart>`](./docs/x-chart.md) | Data visualisation component for common chart types. |
404
406
  | [`<x-stat>`](./docs/x-stat.md) | KPI / metric card with value, label, trend, and icon slots. |
405
407
  | [`<x-table>`](./docs/x-table.md) | Data grid using CSS subgrid. Supports sorting, single/multi-select, striping, and accessible captions. |
@@ -438,6 +440,23 @@ Override CSS custom properties at any scope:
438
440
 
439
441
  ---
440
442
 
443
+ ## Bundle Size
444
+
445
+ BareDOM compiles to lightweight ES modules. Sizes below are gzipped:
446
+
447
+ | Module | Gzipped |
448
+ |--------|---------|
449
+ | `base.js` (shared runtime) | ~35 KB |
450
+ | Median component | ~3 KB |
451
+ | Smallest (`x-spacer`) | ~1 KB |
452
+ | Largest (`x-chart`) | ~9 KB |
453
+
454
+ Each component loads `base.js` once plus its own module. A typical page using 5-10 components weighs **40-65 KB** gzipped total.
455
+
456
+ > **ESM only.** BareDOM ships ES modules exclusively — there is no CommonJS or UMD build. This works natively in all modern browsers and with any bundler that supports ESM (webpack 5+, Vite, esbuild, Rollup, Parcel). If you need server-side rendering, pre-render the HTML and hydrate with component registration on the client.
457
+
458
+ ---
459
+
441
460
  ## Browser Support
442
461
 
443
462
  BareDOM targets browsers that support Custom Elements v1 and Shadow DOM v1 natively: