@vanelsas/baredom 1.4.0 → 2.0.1
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 +28 -1
- package/README.md +57 -5
- package/dist/base.js +212 -212
- package/dist/x-alert.js +16 -16
- 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 +15 -15
- package/dist/x-cancel-dialogue.js +16 -16
- package/dist/x-card.js +7 -7
- package/dist/x-chart.js +46 -46
- 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 +29 -29
- package/dist/x-container.js +6 -6
- package/dist/x-context-menu.js +20 -19
- package/dist/x-copy.js +23 -23
- package/dist/x-currency-field.js +21 -21
- package/dist/x-date-picker.js +36 -36
- package/dist/x-divider.js +12 -12
- 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 +9 -9
- package/dist/x-gaussian-blur.js +18 -18
- package/dist/x-grid.js +6 -6
- package/dist/x-kinetic-font.js +27 -27
- package/dist/x-kinetic-typography.js +37 -37
- package/dist/x-liquid-dock.js +37 -37
- package/dist/x-liquid-fill.js +42 -42
- package/dist/x-liquid-glass.js +38 -38
- package/dist/x-menu-item.js +10 -10
- package/dist/x-menu.js +11 -11
- package/dist/x-metaball-cursor.js +28 -28
- package/dist/x-modal.js +11 -11
- package/dist/x-morph-stack.js +39 -39
- package/dist/x-navbar.js +13 -13
- package/dist/x-neural-glow.js +31 -31
- package/dist/x-notification-center.js +9 -9
- package/dist/x-organic-divider.js +17 -17
- package/dist/x-organic-progress.js +38 -38
- package/dist/x-organic-shape.js +12 -12
- package/dist/x-pagination.js +16 -16
- package/dist/x-popover.js +14 -14
- package/dist/x-progress-circle.js +9 -9
- package/dist/x-progress.js +9 -9
- package/dist/x-radio.js +12 -12
- package/dist/x-ripple-effect.js +11 -11
- package/dist/x-scroll-parallax.js +17 -17
- package/dist/x-scroll-stack.js +18 -18
- package/dist/x-scroll-story.js +34 -35
- package/dist/x-scroll-timeline.js +46 -49
- package/dist/x-scroll.js +39 -39
- 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 +5 -5
- package/dist/x-slider.js +16 -16
- package/dist/x-soft-body.js +21 -20
- 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 +21 -21
- package/dist/x-table-row.js +10 -10
- package/dist/x-table.js +13 -13
- 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 +21 -21
- package/dist/x-timeline.js +9 -9
- package/dist/x-toast.js +23 -23
- package/dist/x-toaster.js +8 -8
- package/dist/x-typography.js +11 -10
- package/package.json +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,33 @@
|
|
|
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.1] - 2026-04-10
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Release pipeline: version references in build.clj, deps.edn, and pom.xml now match package.json (were stuck at 1.4.0/1.2.0, causing Clojars deploy to fail for 2.0.0)
|
|
10
|
+
- CI workflow: npm publish step now uses continue-on-error to avoid blocking Clojars deploy
|
|
11
|
+
|
|
12
|
+
## [2.0.0] - 2026-04-10
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- **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
|
|
17
|
+
- Theme preset picker on all 79 demo pages (desktop buttons + mobile dropdown, persists via localStorage)
|
|
18
|
+
- Theming section in README.md
|
|
19
|
+
- Theming guidelines in CLAUDE.md
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- 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
|
|
24
|
+
- Overlay components (modal, drawer, menu, popover, dropdown, toast, command-palette, context-menu, cancel-dialogue) use opaque `--x-color-bg` for backgrounds
|
|
25
|
+
- `demo-responsive.css` re-maps demo variables to theme tokens when inside `<x-theme>`
|
|
26
|
+
- Demo pages use theme-aware CSS variables instead of hardcoded colours
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
30
|
+
- x-liquid-dock: `.color` property returns `null` when no `color` attribute is set, allowing the CSS theme token to take effect (visual default unchanged)
|
|
4
31
|
|
|
5
32
|
## [1.4.0] - 2026-04-09
|
|
6
33
|
|
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
|
|
|
@@ -45,16 +53,58 @@ I first built the usual suspects for web components, a basis to create a UI. I t
|
|
|
45
53
|
|
|
46
54
|
**Tree-shakeable by design.** Each component is a separate ES module. Import only what you use; bundle tools eliminate the rest automatically.
|
|
47
55
|
|
|
48
|
-
**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.
|
|
49
57
|
|
|
50
58
|
**Light and dark mode included.** All components adapt automatically to `prefers-color-scheme`. No JavaScript required, no class toggling.
|
|
51
59
|
|
|
52
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.
|
|
53
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
|
+
|
|
54
64
|
**Open Shadow DOM.** Shadow roots are `mode: "open"` — inspectable in DevTools, styleable via `::part()`, and testable with standard DOM APIs.
|
|
55
65
|
|
|
56
66
|
---
|
|
57
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
|
+
|
|
58
108
|
## Installation
|
|
59
109
|
|
|
60
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).
|
|
@@ -66,13 +116,13 @@ BareDOM can be consumed three ways: as a **ClojureScript source dependency** (Cl
|
|
|
66
116
|
Add BareDOM to your `deps.edn`:
|
|
67
117
|
|
|
68
118
|
```clojure
|
|
69
|
-
{:deps {com.github.avanelsas/baredom {:mvn/version "
|
|
119
|
+
{:deps {com.github.avanelsas/baredom {:mvn/version "2.0.1"}}}
|
|
70
120
|
```
|
|
71
121
|
|
|
72
122
|
Or in your `shadow-cljs.edn` dependencies:
|
|
73
123
|
|
|
74
124
|
```clojure
|
|
75
|
-
:dependencies [[com.github.avanelsas/baredom "
|
|
125
|
+
:dependencies [[com.github.avanelsas/baredom "2.0.1"]]
|
|
76
126
|
```
|
|
77
127
|
|
|
78
128
|
Then require component namespaces directly and call their `init!` function once at startup:
|
|
@@ -129,7 +179,7 @@ Add the npm package to your `package.json`:
|
|
|
129
179
|
```json
|
|
130
180
|
{
|
|
131
181
|
"dependencies": {
|
|
132
|
-
"@vanelsas/baredom": "^
|
|
182
|
+
"@vanelsas/baredom": "^2.0.1"
|
|
133
183
|
}
|
|
134
184
|
}
|
|
135
185
|
```
|
|
@@ -384,6 +434,8 @@ Override CSS custom properties at any scope:
|
|
|
384
434
|
|
|
385
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.
|
|
386
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
|
+
|
|
387
439
|
---
|
|
388
440
|
|
|
389
441
|
## Browser Support
|