@vanelsas/baredom 1.3.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.
- package/CHANGELOG.md +37 -1
- package/README.md +60 -6
- package/dist/base.js +397 -373
- package/dist/x-alert.js +19 -19
- package/dist/x-avatar-group.js +11 -11
- package/dist/x-avatar.js +16 -16
- package/dist/x-badge.js +11 -11
- package/dist/x-bento-grid.js +5 -5
- package/dist/x-bento-item.js +4 -4
- package/dist/x-breadcrumbs.js +14 -14
- package/dist/x-button.js +16 -16
- package/dist/x-cancel-dialogue.js +17 -17
- package/dist/x-card.js +7 -7
- package/dist/x-chart.js +47 -47
- package/dist/x-checkbox.js +11 -11
- package/dist/x-chip.js +9 -9
- package/dist/x-collapse.js +11 -11
- package/dist/x-command-palette.js +31 -31
- package/dist/x-container.js +6 -6
- package/dist/x-context-menu.js +20 -19
- package/dist/x-copy.js +24 -24
- package/dist/x-currency-field.js +22 -22
- package/dist/x-date-picker.js +41 -41
- package/dist/x-divider.js +13 -13
- package/dist/x-drawer.js +11 -11
- package/dist/x-dropdown.js +10 -10
- package/dist/x-fieldset.js +6 -6
- package/dist/x-file-download.js +7 -7
- package/dist/x-form-field.js +16 -16
- package/dist/x-form.js +10 -10
- package/dist/x-gaussian-blur.js +18 -18
- package/dist/x-grid.js +6 -6
- package/dist/x-kinetic-font.js +29 -0
- package/dist/x-kinetic-typography.js +39 -61
- package/dist/x-liquid-dock.js +40 -0
- package/dist/x-liquid-fill.js +45 -0
- package/dist/x-liquid-glass.js +48 -0
- package/dist/x-menu-item.js +10 -10
- package/dist/x-menu.js +12 -12
- package/dist/x-metaball-cursor.js +28 -27
- package/dist/x-modal.js +12 -12
- package/dist/x-morph-stack.js +41 -0
- package/dist/x-navbar.js +13 -13
- package/dist/x-neural-glow.js +34 -34
- package/dist/x-notification-center.js +9 -10
- package/dist/x-organic-divider.js +19 -19
- package/dist/x-organic-progress.js +38 -38
- package/dist/x-organic-shape.js +14 -14
- package/dist/x-pagination.js +16 -16
- package/dist/x-popover.js +14 -14
- package/dist/x-progress-circle.js +10 -10
- package/dist/x-progress.js +11 -11
- package/dist/x-radio.js +12 -12
- package/dist/x-ripple-effect.js +12 -13
- package/dist/x-scroll-parallax.js +19 -19
- package/dist/x-scroll-stack.js +18 -18
- package/dist/x-scroll-story.js +36 -37
- package/dist/x-scroll-timeline.js +47 -50
- package/dist/x-scroll.js +41 -41
- package/dist/x-search-field.js +15 -15
- package/dist/x-select.js +10 -10
- package/dist/x-sidebar.js +17 -17
- package/dist/x-skeleton.js +6 -6
- package/dist/x-slider.js +16 -16
- package/dist/x-soft-body.js +23 -0
- package/dist/x-spacer.js +5 -5
- package/dist/x-spinner.js +6 -6
- package/dist/x-splash.js +14 -14
- package/dist/x-stat.js +11 -11
- package/dist/x-stepper.js +16 -16
- package/dist/x-switch.js +11 -11
- package/dist/x-tab.js +8 -8
- package/dist/x-table-cell.js +23 -23
- package/dist/x-table-row.js +10 -10
- package/dist/x-table.js +16 -16
- package/dist/x-tabs.js +11 -11
- package/dist/x-text-area.js +18 -18
- package/dist/x-theme.js +25 -0
- package/dist/x-timeline-item.js +24 -24
- package/dist/x-timeline.js +9 -9
- package/dist/x-toast.js +25 -25
- package/dist/x-toaster.js +8 -8
- package/dist/x-typography.js +11 -10
- package/package.json +30 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,42 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
All notable changes to
|
|
3
|
+
All notable changes to BareDOM will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## [2.0.0] - 2026-04-10
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **x-theme** — Centralised theming component with 33 design tokens, 8 built-in presets (default, ocean, forest, sunset, neo-brutalist, aurora, mono-ai, warm-mineral), and `registerPreset()` JS API for custom themes with partial preset merging
|
|
10
|
+
- Theme preset picker on all 79 demo pages (desktop buttons + mobile dropdown, persists via localStorage)
|
|
11
|
+
- Theming section in README.md
|
|
12
|
+
- Theming guidelines in CLAUDE.md
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- All 80 components now consume x-theme design tokens via `var(--x-token, fallback)` pattern — fully backwards compatible, components render identically without an `<x-theme>` wrapper
|
|
17
|
+
- Overlay components (modal, drawer, menu, popover, dropdown, toast, command-palette, context-menu, cancel-dialogue) use opaque `--x-color-bg` for backgrounds
|
|
18
|
+
- `demo-responsive.css` re-maps demo variables to theme tokens when inside `<x-theme>`
|
|
19
|
+
- Demo pages use theme-aware CSS variables instead of hardcoded colours
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- x-liquid-dock: `.color` property returns `null` when no `color` attribute is set, allowing the CSS theme token to take effect (visual default unchanged)
|
|
24
|
+
|
|
25
|
+
## [1.4.0] - 2026-04-09
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
|
|
29
|
+
Six new components:
|
|
30
|
+
|
|
31
|
+
- **Effects** — x-liquid-glass, x-soft-body, x-liquid-dock, x-liquid-fill
|
|
32
|
+
- **Typography** — x-kinetic-font
|
|
33
|
+
- **Layout** — x-morph-stack (with variant presets and multi-element goo merge demo)
|
|
34
|
+
|
|
35
|
+
### Changed
|
|
36
|
+
|
|
37
|
+
- Demo index: style family filtering
|
|
38
|
+
- Demo index components sorted alphabetically
|
|
39
|
+
- README updates
|
|
4
40
|
|
|
5
41
|
## [1.3.0] - 2026-04-07
|
|
6
42
|
|
package/README.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# BareDOM
|
|
2
2
|
|
|
3
|
+
<p align="center">
|
|
4
|
+
<picture>
|
|
5
|
+
<source media="(prefers-color-scheme: dark)" srcset="public/assets/baredom_darkmode.svg">
|
|
6
|
+
<source media="(prefers-color-scheme: light)" srcset="public/assets/baredom_lightmode.svg">
|
|
7
|
+
<img alt="Project Logo" src="public/assets/baredom_lightmode.svg" width="200">
|
|
8
|
+
</picture>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
3
11
|
**Native web components. Zero runtime. No framework required.**
|
|
4
12
|
|
|
5
13
|
[](https://www.npmjs.com/package/@vanelsas/baredom)
|
|
@@ -11,7 +19,7 @@
|
|
|
11
19
|
|
|
12
20
|
## What is BareDOM?
|
|
13
21
|
|
|
14
|
-
BareDOM is a library of
|
|
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.
|
|
15
23
|
|
|
16
24
|
The core rendering model is deliberately simple:
|
|
17
25
|
|
|
@@ -25,7 +33,7 @@ BareDOM is authored in ClojureScript and compiled to optimised, minified ES modu
|
|
|
25
33
|
|
|
26
34
|
BareDOM has been created using Claude Code. The CLAUDE.md file is added to the repository for your convenience.
|
|
27
35
|
|
|
28
|
-
All web components
|
|
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/)
|
|
29
37
|
|
|
30
38
|
---
|
|
31
39
|
|
|
@@ -35,6 +43,8 @@ Like most Clojure/ClojureScript developers starting out with UIs, I went through
|
|
|
35
43
|
|
|
36
44
|
I started looking for a different approach and discovered Web Components. I built a few, but didn't have the spare time to develop a comprehensive set that could be used in any project. Then AI arrived. While experimenting with Claude Code, I realised that 1 + 1 could be 3. That is how BareDOM, my first open-source project, was born.
|
|
37
45
|
|
|
46
|
+
I first built the usual suspects for web components, a basis to create a UI. I then thought about trying something more exciting, with animations, shapes, colours, and a whole range of web components that deal with morphing, kinetics and organic styles were born. I hope it brings you joy when using them in your web application!
|
|
47
|
+
|
|
38
48
|
# Why web components?
|
|
39
49
|
|
|
40
50
|
**Works in any stack.** Because components are native HTML elements, they work wherever HTML works — vanilla JavaScript, React, Vue, Svelte, Angular, server-rendered HTML, or a static page. No adapter layer, no wrapper library.
|
|
@@ -43,16 +53,58 @@ I started looking for a different approach and discovered Web Components. I buil
|
|
|
43
53
|
|
|
44
54
|
**Tree-shakeable by design.** Each component is a separate ES module. Import only what you use; bundle tools eliminate the rest automatically.
|
|
45
55
|
|
|
46
|
-
**Full theming with CSS custom properties.** Every visual detail — colours, spacing, radius, shadows, typography — is exposed as a `--x-<component>-<property>` CSS custom property. Override at any scope: globally, per-page, per-instance.
|
|
56
|
+
**Full theming with CSS custom properties.** Every visual detail — colours, spacing, radius, shadows, typography — is exposed as a `--x-<component>-<property>` CSS custom property. Override at any scope: globally, per-page, per-instance. Use [`<x-theme>`](./docs/x-theme.md) for centralised theming with built-in presets.
|
|
47
57
|
|
|
48
58
|
**Light and dark mode included.** All components adapt automatically to `prefers-color-scheme`. No JavaScript required, no class toggling.
|
|
49
59
|
|
|
50
60
|
**Accessibility built in.** ARIA roles, live regions, keyboard navigation, focus management, and `prefers-reduced-motion` support are part of the component, not an afterthought. You do not need to layer accessibility on top.
|
|
51
61
|
|
|
62
|
+
**Mobile-ready.** All components are tested on viewports from 320px up. Overlay panels cap their width to avoid overflow. Touch targets meet the 44px minimum on coarse-pointer devices. Pointer events are used throughout for unified mouse and touch input.
|
|
63
|
+
|
|
52
64
|
**Open Shadow DOM.** Shadow roots are `mode: "open"` — inspectable in DevTools, styleable via `::part()`, and testable with standard DOM APIs.
|
|
53
65
|
|
|
54
66
|
---
|
|
55
67
|
|
|
68
|
+
## Theming
|
|
69
|
+
|
|
70
|
+
Wrap any subtree in `<x-theme>` to apply a consistent palette across all components:
|
|
71
|
+
|
|
72
|
+
```html
|
|
73
|
+
<x-theme preset="ocean">
|
|
74
|
+
<x-button>Themed button</x-button>
|
|
75
|
+
<x-alert type="info" text="Themed alert"></x-alert>
|
|
76
|
+
</x-theme>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Ships with **8 built-in presets**: `default`, `ocean`, `forest`, `sunset`, `neo-brutalist`, `aurora`, `mono-ai`, `warm-mineral`. All presets include both light and dark mode values that work with `prefers-color-scheme`.
|
|
80
|
+
|
|
81
|
+
For custom themes, register your own preset via JavaScript:
|
|
82
|
+
|
|
83
|
+
```js
|
|
84
|
+
import { registerPreset } from '@vanelsas/baredom/x-theme';
|
|
85
|
+
|
|
86
|
+
registerPreset('acme', {
|
|
87
|
+
light: { '--x-color-primary': '#e11d48', '--x-color-surface': '#fff' },
|
|
88
|
+
dark: { '--x-color-primary': '#fb7185', '--x-color-surface': '#1a1a2e' }
|
|
89
|
+
});
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
```html
|
|
93
|
+
<x-theme preset="acme">...</x-theme>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Or override individual tokens via CSS:
|
|
97
|
+
|
|
98
|
+
```html
|
|
99
|
+
<x-theme preset="default" style="--x-color-primary: #e11d48;">
|
|
100
|
+
...
|
|
101
|
+
</x-theme>
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
See [docs/x-theme.md](./docs/x-theme.md) for the full token list, preset details, and API reference.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
56
108
|
## Installation
|
|
57
109
|
|
|
58
110
|
> **Using JavaScript?** See the [JavaScript Developer Guide](./docs/javascript-guide.md) for npm/ESM setup, event handling, theming, and framework integration examples (React, Vue, Svelte).
|
|
@@ -64,13 +116,13 @@ BareDOM can be consumed three ways: as a **ClojureScript source dependency** (Cl
|
|
|
64
116
|
Add BareDOM to your `deps.edn`:
|
|
65
117
|
|
|
66
118
|
```clojure
|
|
67
|
-
{:deps {com.github.avanelsas/baredom {:mvn/version "
|
|
119
|
+
{:deps {com.github.avanelsas/baredom {:mvn/version "2.0.0"}}}
|
|
68
120
|
```
|
|
69
121
|
|
|
70
122
|
Or in your `shadow-cljs.edn` dependencies:
|
|
71
123
|
|
|
72
124
|
```clojure
|
|
73
|
-
:dependencies [[com.github.avanelsas/baredom "
|
|
125
|
+
:dependencies [[com.github.avanelsas/baredom "2.0.0"]]
|
|
74
126
|
```
|
|
75
127
|
|
|
76
128
|
Then require component namespaces directly and call their `init!` function once at startup:
|
|
@@ -127,7 +179,7 @@ Add the npm package to your `package.json`:
|
|
|
127
179
|
```json
|
|
128
180
|
{
|
|
129
181
|
"dependencies": {
|
|
130
|
-
"@vanelsas/baredom": "^
|
|
182
|
+
"@vanelsas/baredom": "^2.0.0"
|
|
131
183
|
}
|
|
132
184
|
}
|
|
133
185
|
```
|
|
@@ -382,6 +434,8 @@ Override CSS custom properties at any scope:
|
|
|
382
434
|
|
|
383
435
|
**Predictable theming.** CSS custom properties follow a single naming convention: `--x-<component>-<property>`. Tokens are set on `:host` and cascade normally. You override them the same way you override any CSS property.
|
|
384
436
|
|
|
437
|
+
**Mobile-first.** Components use `dvh` viewport units, `calc(100vw - ...)` width caps, and `@media (pointer:coarse)` rules for touch-friendly sizing. No component overflows on a 320px screen.
|
|
438
|
+
|
|
385
439
|
---
|
|
386
440
|
|
|
387
441
|
## Browser Support
|