@thebase/ui 1.1.6 → 1.2.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 +80 -1
- package/README.md +9 -5
- package/bin/create-baseui-app.mjs +31 -8
- package/dist/baseui.apidoc.esm.js +68 -60
- package/dist/baseui.apidoc.min.js +68 -60
- package/dist/baseui.esm.js +44 -47
- package/dist/baseui.icons.esm.js +1 -1
- package/dist/baseui.min.css +2 -2
- package/dist/baseui.min.js +62 -46
- package/dist/baseui.pwa.esm.js +71 -9
- package/dist/baseui.registry.json +26 -33
- package/dist/baseui.templates.xml +353 -370
- package/dist/baseui.vite.esm.js +116 -0
- package/dist/runtime/lazy/apidoc.logic.js +20 -0
- package/dist/runtime/milkdown/milkdown-editor.js +1 -1
- package/dist/runtime/milkdown/milkdown-text-editor.js +1 -1
- package/dist/themes/baseui-dark.css +80 -1
- package/dist/themes/baseui-dark.min.css +1 -0
- package/dist/themes/baseui-light.css +81 -1
- package/dist/themes/baseui-light.min.css +1 -0
- package/dist/types/pwa.d.ts +1 -45
- package/dist/types/vite.d.ts +4 -0
- package/docs/analytics.md +3 -3
- package/docs/base-ui-skill.md +54 -0
- package/docs/blocks.md +1 -1
- package/docs/components/accordion.md +4 -4
- package/docs/components/apidoc.md +1 -1
- package/docs/components/block-viewer.md +1 -1
- package/docs/components/breadcrumb.md +1 -1
- package/docs/components/button.md +1 -1
- package/docs/components/chart.md +2 -0
- package/docs/components/code-editor.md +77 -0
- package/docs/components/combobox.md +10 -0
- package/docs/components/data-table.md +2 -2
- package/docs/components/date-picker.md +10 -0
- package/docs/components/dialog.md +5 -5
- package/docs/components/empty.md +1 -1
- package/docs/components/field.md +8 -0
- package/docs/components/form.md +29 -29
- package/docs/components/input.md +28 -2
- package/docs/components/kbd.md +3 -6
- package/docs/components/markdown.md +3 -1
- package/docs/components/message-scroller.md +3 -8
- package/docs/components/native-select.md +13 -0
- package/docs/components/navigation-menu.md +2 -0
- package/docs/components/pwa.md +1 -1
- package/docs/components/select.md +16 -0
- package/docs/components/shell.md +4 -2
- package/docs/components/sidebar.md +18 -16
- package/docs/components/switch.md +11 -0
- package/docs/components/text-editor.md +1 -1
- package/docs/components/textarea.md +23 -0
- package/docs/components/theme-button.md +1 -1
- package/docs/components/toast.md +10 -10
- package/docs/components/typography.md +21 -2
- package/docs/icons.md +1 -1
- package/docs/installation.md +2 -2
- package/docs/owl-components.md +1 -1
- package/docs/runtime-api.md +2 -2
- package/docs/theming.md +33 -3
- package/docs/usage-guide.md +23 -6
- package/package.json +6 -1
- package/docs/components/input-group.md +0 -68
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,53 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
-
## [
|
|
5
|
+
## [v1.2.0] - 2026-10-29
|
|
6
|
+
|
|
7
|
+
### Breaking
|
|
8
|
+
- Component CSS classes renamed from the `bu-` prefix to `b-` (e.g. `bu-button` -> `b-button`, `bu-dialog-title` -> `b-dialog-title`), and the matching custom properties from `--bu-*` to `--b-*` (e.g. `--bu-badge-bg` -> `--b-badge-bg`, `--bu-code-*` -> `--b-code-*`). Update any app CSS, markup (`class="bu-..."`) or selectors that target the old names. Helper attributes (`b-ui`, `b-att-*`, `b-tab`, ...) are unchanged; `.b-x` class selectors never match `[b-x]` attributes. Applied with `scripts/rename-bu-prefix.mjs`.
|
|
9
|
+
|
|
10
|
+
### Changed (themes)
|
|
11
|
+
- New status colour tokens `--b-success`, `--b-warning`, `--b-info` (each with `-rgb` and `-foreground`) in both theme files, alongside the existing `--b-danger`; bridged to Bootstrap's `--bs-success|warning|info` (+ `-bg-subtle`, `-border-subtle`, `-text-emphasis`) so badges, alerts and Bootstrap helpers follow them, with `.btn-success|warning|info` restyled to match. The Theme tab can customise all four status colours.
|
|
12
|
+
- `src/styles/baseui.css` is removed. All Base UI styles and shared tokens (spacing/type/radius scales, shadows, `--bs-*` bridge, button variants, font) now live in `src/styles/base-extensions.css`; `base.min.css` stays stock Bootstrap 5. Colour tokens, `--base-radius` and `--b-overlay` are defined only in `src/themes/baseui-light.css` and `baseui-dark.css`, which users can download and edit. `dist/themes/baseui-*.css` are now readable copies; minified versions are `baseui-*.min.css` (also listed in the registry).
|
|
13
|
+
- `docs/theming.md` documents the new layout and how to build a custom theme.
|
|
14
|
+
|
|
15
|
+
### Fixed (contrast)
|
|
16
|
+
- `Switch`: the thumb was Bootstrap's fixed-colour SVG (25% black unchecked, white checked), nearly invisible in dark mode, and the pure Base `<Switch>` (no `b-ui` attribute) was not reached by any of the component's CSS. Styles now target `.b-switch`, and the thumb is drawn from theme tokens (`--b-muted-foreground` unchecked, `--b-primary-foreground` checked) with a visible track edge, focus ring uses `--b-ring`.
|
|
17
|
+
- Light `--b-muted-foreground` is `neutral-600` (was `neutral-500`, 4.35:1 on muted fills); light `--b-danger` is `red-700` (the old red was under 4.5:1 as text on its own tint). Status text (`alert-success|warning`, `badge` success/warning/info/danger, clipboard "copied") uses `-text-emphasis` tones that clear 4.5:1. Disabled pagination items (the "..." ellipsis) no longer drop to 55% opacity.
|
|
18
|
+
- Themes now set `--bs-body-bg-rgb`, `--bs-secondary-bg-rgb`, `--bs-tertiary-bg-rgb` and `--bs-emphasis-color-rgb`, so Bootstrap's `bg-body`, `bg-body-secondary`, `bg-body-tertiary` and `text-body-emphasis` follow the Base UI theme (and custom themes from the Theme tab) in light and dark.
|
|
19
|
+
- `Button` corner radius uses `--b-radius-md` (was a fixed 8px spacing value), so it follows `--base-radius` and the Theme tab radius setting; identical at the default radius. `Switch` is laid out as a two-column grid so the track, label and helper text align in the pure Base and static versions.
|
|
20
|
+
- Theme tab: colour selection buttons are 1.5rem.
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
- Theme tab in the examples app (`examples/index.html#/theme`): choose base colour, accent and radius, preview Base UI live in light/dark, then download `baseui-light.css` and `baseui-dark.css`.
|
|
24
|
+
- `@thebase/ui/vite`: `baseuiPwa()` Vite plugin. Scaffolded projects (`create`, `init`) now build as PWAs by default: each `vite build` emits `manifest.webmanifest`, `sw.js`, `sw-register.js`, `version.json` (bundle hash) and default icons, and open pages reload when a deploy changes the code.
|
|
25
|
+
- `@thebase/ui/pwa`: generated service workers poll `version.json` (activate, navigation, `check-version` message) and post `version-changed` after wiping caches; new `buildVersionJson` and `buildServiceWorkerRegister`; `cdnVersion` is now optional. `create-baseui-app pwa` also writes `sw-register.js` and `version.json`.
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
- Renamed `src/styles/bootstrap.min.css` (+ `.map`) to `base.min.css` and `bootstrap-extensions.css` to `base-extensions.css`; `scripts/build.mjs` now loads every `src/styles/base*.css` (vendored Bootstrap, extensions, then the rest alphabetically, e.g. `baseui.css`). `dist/baseui.min.css` is byte-identical.
|
|
29
|
+
- `Accordion`, `DropdownMenu` items, `Tabs` and `NavigationMenu` now also carry Bootstrap classes (`accordion*`, `dropdown-item`/`-header`/`-divider`, `nav`/`nav-link`) alongside their `b-*` classes, in both pure Base templates and static adapters; `b-*` class names and selectors are unchanged. `Toast` and `Carousel` already used Bootstrap classes.
|
|
30
|
+
- `Progress` now renders Bootstrap `.progress` / `.progress-bar` (plus `b-progress*`); its CSS only sets the value-driven fill width and `--bs-progress-height`.
|
|
31
|
+
- `base-extensions.css`: Bootstrap's own `.accordion`, `.dropdown-menu`, `.nav`/`.nav-tabs`/`.nav-pills`, `.navbar`, `.progress`, `.list-group`, `.toast`, `.input-group-text`, `.form-label`/`.form-text`/`.form-range`/feedback, `.placeholder`, `.btn-close`, carousel and `.img-thumbnail` are now restyled to the shadcn look via their `--bs-*` variables, so plain Bootstrap markup matches Base UI.
|
|
32
|
+
- `Badge` and `Alert` CSS now set their look through Bootstrap's own `--bs-badge-*` / `--bs-alert-*` variables (size, weight, padding, radius, colour, border) instead of redeclaring `padding`, `font-size`, `color` and `border-color` directly. Badge variants set `--bs-badge-color` plus the new `--b-badge-bg`/`--b-badge-border`. Class names, markup and rendered look are unchanged; `b-badge-*` and `b-alert-*` stay the public API.
|
|
33
|
+
|
|
34
|
+
## [v1.1.7] - 2026-10-18
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
- `CodeEditor` (pure Base): code box with line numbers, syntax colouring, Tab/Enter indent handling and a copy button, for the language named by the `codeLang` prop (go, c, cpp, java, javascript, typescript, python, rust, sql, json, yaml, css, html, lua, and more). Code can be loaded from a URL (`src`) or a local file (`upload`), with the language picked from the file extension. An **Edit/View** button toggles reading and editing mode (`readonly` sets the starting mode, `toggle="false"` hides the button). A **Format** button (and `Shift+Alt+F`) re-indents code per language (JSON is pretty-printed; bracket languages, Lua, HTML and XML re-indented). Syntax colouring follows `codeLang` (keywords, builtins, function calls, types, strings, numbers, comments, HTML/XML tags, attributes and entities, JSON/YAML keys, CSS properties and colours, annotations, `$variables`) with themeable `--bu-code-*` colours for light and dark. Built from `Badge`, `ClipboardButton`, `Kbd`, `Button`, `Alert` and `Spinner`; docs at `docs/components/code-editor.md` and a Blocks gallery demo (`examples/blocks/code-editor-demo.html`).
|
|
38
|
+
- `Input` accepts `start` and `end` slots, and `Textarea` accepts `start`, `end` and `footer` slots, for text, icons, `Kbd` and `Button` inside the field.
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
- `Shell` and `Sidebar` switch to the off-canvas mobile drawer below 992px (was 768px), so tablets get the drawer.
|
|
42
|
+
- `NavigationMenu` scrolls horizontally under 768px with an edge fade and no scrollbar.
|
|
43
|
+
- `Markdown` gives task-list checkboxes an accessible name and larger touch targets on coarse pointers.
|
|
44
|
+
- `useTip` tooltip icon now sits right after the label text (circle-question-mark) instead of floating at the field edge.
|
|
45
|
+
- Docs and examples: production pin examples now use `@1.1.7`; `qr-page` service-worker cache bumped to `2qr-cache-v14`.
|
|
46
|
+
|
|
47
|
+
### Fixed
|
|
48
|
+
- `Chart` bars no longer collapse to 2px lines: the plot has a definite height and each bar is positioned from the bottom of its column.
|
|
49
|
+
|
|
50
|
+
### Removed
|
|
51
|
+
- **Breaking:** `InputGroup`, `InputGroupAddon`, `InputGroupButton`, `InputGroupText`, `InputGroupInput` and `InputGroupTextarea`, the static `b-ui="input-group"` adapter, and the `input-group` docs page and demo. Migrate to `Input`/`Textarea` slots: `<Input label="'Search'"><t t-set-slot="end"><Button size="'xs'">Go</Button></t></Input>`; a textarea with a send bar becomes `<Textarea><t t-set-slot="footer">…</t></Textarea>`.
|
|
6
52
|
|
|
7
53
|
## [v1.1.6] - 2026-10-17
|
|
8
54
|
|
|
@@ -10,6 +56,9 @@ All notable changes to this project are documented in this file.
|
|
|
10
56
|
- `useTip` prop (`Number`, default `0`) on `Input`, `Textarea`, `NativeSelect`, `Combobox`, `DatePicker`, `Select`, `InputGroup` and `Field`: set to `1` to hide the helper text under the field and show it in a tooltip on an info icon instead. Error text always stays visible. See the matching pages under `docs/components/`.
|
|
11
57
|
|
|
12
58
|
### Changed
|
|
59
|
+
- Renamed `src/styles/bootstrap.min.css` (+ `.map`) to `base.min.css` and `bootstrap-extensions.css` to `base-extensions.css`; `scripts/build.mjs` now loads every `src/styles/base*.css` (vendored Bootstrap, extensions, then the rest alphabetically, e.g. `baseui.css`). `dist/baseui.min.css` is byte-identical.
|
|
60
|
+
- `Accordion`, `DropdownMenu` items, `Tabs` and `NavigationMenu` now also carry Bootstrap classes (`accordion*`, `dropdown-item`/`-header`/`-divider`, `nav`/`nav-link`) alongside their `bu-*` classes, in both pure Base templates and static adapters; `bu-*` class names and selectors are unchanged. `Toast` and `Carousel` already used Bootstrap classes.
|
|
61
|
+
- `Progress` now renders Bootstrap `.progress` / `.progress-bar` (plus `bu-progress*`); its CSS only sets the value-driven fill width and `--bs-progress-height`.
|
|
13
62
|
- Focus ring is unified across form controls: `Checkbox`, `Switch`, `RadioGroup`, `InputOTP`, `Select` and the outlined fields now use `--b-primary` as border plus a 1px `--b-primary` ring, matching `Input`.
|
|
14
63
|
- `Tabs`: trigger content is packed to the start (and to the end in right-to-left text).
|
|
15
64
|
- Docs and examples: production pin examples now use `@1.1.6`; `qr-page` service-worker cache bumped to `2qr-cache-v13`.
|
|
@@ -22,6 +71,9 @@ All notable changes to this project are documented in this file.
|
|
|
22
71
|
- `Field` accepts `label`, `description`, `error` and `invalid` and hands them to the control inside it.
|
|
23
72
|
|
|
24
73
|
### Changed
|
|
74
|
+
- Renamed `src/styles/bootstrap.min.css` (+ `.map`) to `base.min.css` and `bootstrap-extensions.css` to `base-extensions.css`; `scripts/build.mjs` now loads every `src/styles/base*.css` (vendored Bootstrap, extensions, then the rest alphabetically, e.g. `baseui.css`). `dist/baseui.min.css` is byte-identical.
|
|
75
|
+
- `Accordion`, `DropdownMenu` items, `Tabs` and `NavigationMenu` now also carry Bootstrap classes (`accordion*`, `dropdown-item`/`-header`/`-divider`, `nav`/`nav-link`) alongside their `bu-*` classes, in both pure Base templates and static adapters; `bu-*` class names and selectors are unchanged. `Toast` and `Carousel` already used Bootstrap classes.
|
|
76
|
+
- `Progress` now renders Bootstrap `.progress` / `.progress-bar` (plus `bu-progress*`); its CSS only sets the value-driven fill width and `--bs-progress-height`.
|
|
25
77
|
- `Field` no longer renders its own label and error text; the control inside draws them. Use `FieldLabel` / `FieldError` for checkbox-style fields.
|
|
26
78
|
- Docs and examples: blocks (`field`, `textarea`, `date-picker`, `input-group`, `select`, `combobox`, `native-select`, `hover-card`, `login-03/04`, `signup-03/04`) use the `label` props; production pin examples now use `@1.1.5`; `qr-page` builds its VietQR/QR payload from CDN modules instead of vendored copies.
|
|
27
79
|
- `package.json` description no longer mentions Owl.
|
|
@@ -31,6 +83,9 @@ All notable changes to this project are documented in this file.
|
|
|
31
83
|
Backfilled entry (1.1.4 shipped without release notes).
|
|
32
84
|
|
|
33
85
|
### Changed
|
|
86
|
+
- Renamed `src/styles/bootstrap.min.css` (+ `.map`) to `base.min.css` and `bootstrap-extensions.css` to `base-extensions.css`; `scripts/build.mjs` now loads every `src/styles/base*.css` (vendored Bootstrap, extensions, then the rest alphabetically, e.g. `baseui.css`). `dist/baseui.min.css` is byte-identical.
|
|
87
|
+
- `Accordion`, `DropdownMenu` items, `Tabs` and `NavigationMenu` now also carry Bootstrap classes (`accordion*`, `dropdown-item`/`-header`/`-divider`, `nav`/`nav-link`) alongside their `bu-*` classes, in both pure Base templates and static adapters; `bu-*` class names and selectors are unchanged. `Toast` and `Carousel` already used Bootstrap classes.
|
|
88
|
+
- `Progress` now renders Bootstrap `.progress` / `.progress-bar` (plus `bu-progress*`); its CSS only sets the value-driven fill width and `--bs-progress-height`.
|
|
34
89
|
- Tabs, Toast and style-prop rollout; internal `baseui` class prefix renamed to `bu`; docs and memory synced.
|
|
35
90
|
|
|
36
91
|
## [v1.1.3] - 2026-10-13
|
|
@@ -44,6 +99,9 @@ Backfilled entry (1.1.4 shipped without release notes).
|
|
|
44
99
|
- Build: ApiDoc's language logos are copied to `dist/apidoc/img/` and published (`dist/apidoc` added to `package.json` `files`).
|
|
45
100
|
|
|
46
101
|
### Changed
|
|
102
|
+
- Renamed `src/styles/bootstrap.min.css` (+ `.map`) to `base.min.css` and `bootstrap-extensions.css` to `base-extensions.css`; `scripts/build.mjs` now loads every `src/styles/base*.css` (vendored Bootstrap, extensions, then the rest alphabetically, e.g. `baseui.css`). `dist/baseui.min.css` is byte-identical.
|
|
103
|
+
- `Accordion`, `DropdownMenu` items, `Tabs` and `NavigationMenu` now also carry Bootstrap classes (`accordion*`, `dropdown-item`/`-header`/`-divider`, `nav`/`nav-link`) alongside their `bu-*` classes, in both pure Base templates and static adapters; `bu-*` class names and selectors are unchanged. `Toast` and `Carousel` already used Bootstrap classes.
|
|
104
|
+
- `Progress` now renders Bootstrap `.progress` / `.progress-bar` (plus `bu-progress*`); its CSS only sets the value-driven fill width and `--bs-progress-height`.
|
|
47
105
|
- PWA toolkit: the default precache list no longer includes `/favicon.svg`; it precaches the default icon files instead.
|
|
48
106
|
- `npm run dev` server: serves `.ico` as `image/x-icon` and `.mjs` as JavaScript.
|
|
49
107
|
- Docs and examples: production pin examples now use `@1.1.3`; component counts in `docs/owl-components.md` and `docs/registry.md` now say 74.
|
|
@@ -65,6 +123,9 @@ Backfilled entry (1.1.2 shipped without release notes).
|
|
|
65
123
|
- Examples: `examples/analytics/` contains a Base UI analytics dashboard plus runnable Go Fiber and FastAPI sample backends (in-memory store, `GET /api/stats`, `DEMO_SEED=1` demo data). The landing page has an Analytics section, and the docs nav lists the Analytics guide.
|
|
66
124
|
|
|
67
125
|
### Changed
|
|
126
|
+
- Renamed `src/styles/bootstrap.min.css` (+ `.map`) to `base.min.css` and `bootstrap-extensions.css` to `base-extensions.css`; `scripts/build.mjs` now loads every `src/styles/base*.css` (vendored Bootstrap, extensions, then the rest alphabetically, e.g. `baseui.css`). `dist/baseui.min.css` is byte-identical.
|
|
127
|
+
- `Accordion`, `DropdownMenu` items, `Tabs` and `NavigationMenu` now also carry Bootstrap classes (`accordion*`, `dropdown-item`/`-header`/`-divider`, `nav`/`nav-link`) alongside their `bu-*` classes, in both pure Base templates and static adapters; `bu-*` class names and selectors are unchanged. `Toast` and `Carousel` already used Bootstrap classes.
|
|
128
|
+
- `Progress` now renders Bootstrap `.progress` / `.progress-bar` (plus `bu-progress*`); its CSS only sets the value-driven fill width and `--bs-progress-height`.
|
|
68
129
|
- Docs and examples: production pin examples now use `@1.1.1`.
|
|
69
130
|
- `npm run dev` server: folder URLs serve their `index.html`, and `.go`/`.py`/`.mod` sources are served as text.
|
|
70
131
|
|
|
@@ -75,6 +136,9 @@ Backfilled entry (1.1.2 shipped without release notes).
|
|
|
75
136
|
- The browser global is now `window.thebase`, holding the same object as before (`version`, `register`, `component`, `mount`, `mountAll`, `destroy`, `theme`, `icons`). If a page script creates `window.thebase` before a Base UI bundle loads, the runtime adds its methods to that object instead of replacing it.
|
|
76
137
|
|
|
77
138
|
### Changed
|
|
139
|
+
- Renamed `src/styles/bootstrap.min.css` (+ `.map`) to `base.min.css` and `bootstrap-extensions.css` to `base-extensions.css`; `scripts/build.mjs` now loads every `src/styles/base*.css` (vendored Bootstrap, extensions, then the rest alphabetically, e.g. `baseui.css`). `dist/baseui.min.css` is byte-identical.
|
|
140
|
+
- `Accordion`, `DropdownMenu` items, `Tabs` and `NavigationMenu` now also carry Bootstrap classes (`accordion*`, `dropdown-item`/`-header`/`-divider`, `nav`/`nav-link`) alongside their `bu-*` classes, in both pure Base templates and static adapters; `bu-*` class names and selectors are unchanged. `Toast` and `Carousel` already used Bootstrap classes.
|
|
141
|
+
- `Progress` now renders Bootstrap `.progress` / `.progress-bar` (plus `bu-progress*`); its CSS only sets the value-driven fill width and `--bs-progress-height`.
|
|
78
142
|
- Docs: production pin examples now use `@1.1.0`. `docs/installation.md` and `docs/registry.md` list the analytics bundles and the `@thebase/ui/analytics` export.
|
|
79
143
|
|
|
80
144
|
### Deprecated
|
|
@@ -85,6 +149,9 @@ Backfilled entry (1.1.2 shipped without release notes).
|
|
|
85
149
|
First stable release. From here on the package follows [Semantic Versioning](https://semver.org/) — see the [Versioning policy](README.md#versioning-policy) for what counts as the public API and what each version bump means. No API changes versus v0.0.12 beyond the fixes below; upgrading from 0.0.12 needs no code changes.
|
|
86
150
|
|
|
87
151
|
### Changed
|
|
152
|
+
- Renamed `src/styles/bootstrap.min.css` (+ `.map`) to `base.min.css` and `bootstrap-extensions.css` to `base-extensions.css`; `scripts/build.mjs` now loads every `src/styles/base*.css` (vendored Bootstrap, extensions, then the rest alphabetically, e.g. `baseui.css`). `dist/baseui.min.css` is byte-identical.
|
|
153
|
+
- `Accordion`, `DropdownMenu` items, `Tabs` and `NavigationMenu` now also carry Bootstrap classes (`accordion*`, `dropdown-item`/`-header`/`-divider`, `nav`/`nav-link`) alongside their `bu-*` classes, in both pure Base templates and static adapters; `bu-*` class names and selectors are unchanged. `Toast` and `Carousel` already used Bootstrap classes.
|
|
154
|
+
- `Progress` now renders Bootstrap `.progress` / `.progress-bar` (plus `bu-progress*`); its CSS only sets the value-driven fill width and `--bs-progress-height`.
|
|
88
155
|
- Docs: production pin examples now use `@1.0.0`, or the `@1` major range to receive non-breaking updates. `docs/owl-components.md` documents the global component fallback below, and `docs/components/button.md` now lists `Button`'s `unstyled`, `attrs`, and `getRef` props.
|
|
89
156
|
- Internal: shared prop and overlay helpers replace per-component copies (`optional()`/`slotProps` prop declarations, controlled-open and Bootstrap Collapse hooks, one binder for the static dialog/sheet/drawer overlays, one checkbox/radio enhancer). Every Base component keeps exactly the same props, and every static adapter keeps the same attributes, events, and `element.BaseUI*` handles.
|
|
90
157
|
|
|
@@ -95,6 +162,9 @@ First stable release. From here on the package follows [Semantic Versioning](htt
|
|
|
95
162
|
## [v0.0.12] - 2026-09-13
|
|
96
163
|
|
|
97
164
|
### Changed
|
|
165
|
+
- Renamed `src/styles/bootstrap.min.css` (+ `.map`) to `base.min.css` and `bootstrap-extensions.css` to `base-extensions.css`; `scripts/build.mjs` now loads every `src/styles/base*.css` (vendored Bootstrap, extensions, then the rest alphabetically, e.g. `baseui.css`). `dist/baseui.min.css` is byte-identical.
|
|
166
|
+
- `Accordion`, `DropdownMenu` items, `Tabs` and `NavigationMenu` now also carry Bootstrap classes (`accordion*`, `dropdown-item`/`-header`/`-divider`, `nav`/`nav-link`) alongside their `bu-*` classes, in both pure Base templates and static adapters; `bu-*` class names and selectors are unchanged. `Toast` and `Carousel` already used Bootstrap classes.
|
|
167
|
+
- `Progress` now renders Bootstrap `.progress` / `.progress-bar` (plus `bu-progress*`); its CSS only sets the value-driven fill width and `--bs-progress-height`.
|
|
98
168
|
- **Breaking**: `Tabs` restyled to match [shadcn/base's Tabs](https://ui.shadcn.com/docs/components/base/tabs) — `TabsList` is now a segmented pill control on a muted background by default (new `variant="'line'"`/`b-att-variant="line"` opts into a transparent underline list instead), and `TabContent`/`b-panel` render as bare panels with no default `Card` border/background (that chrome is now opt-in via `className` on `TabsContainer` or the consumer's own wrapper). New `orientation` prop (`"horizontal"`/`"vertical"`) on the pure Base `Tabs` puts `TabsList` beside `TabsContainer` instead of above it.
|
|
99
169
|
- Internal: every pure Base component's raw `<button>` (dialog, sheet, pwa, attachment, carousel, collapsible, calendar, dropdown-menu, popover, data-table, accordion, tabs, alert, input-group, sidebar, clipboard-button, theme-button, shell, questionnaire, alert-dialog, drawer, select, toggle, toggle-group) now renders through the shared `Button` component instead of hand-written markup. `Button` gained `unstyled` (opt out of forced `btn`/variant classes for components with their own bespoke styling), `attrs` (pass-through object for one-off attributes with no first-class prop), and `getRef` (reports the mounted root element for callers that need direct DOM access) to support this. No public prop-level API changes for any consuming component.
|
|
100
170
|
|
|
@@ -108,6 +178,9 @@ First stable release. From here on the package follows [Semantic Versioning](htt
|
|
|
108
178
|
- Public `cn(...classNames)` and `mergeStyle(...)` helpers, exported from `@thebase/ui` (and `BaseUIBundle.cn`/`BaseUIBundle.mergeStyle`) for consumers building their own class lists or inline styles. Documented in `docs/runtime-api.md`.
|
|
109
179
|
|
|
110
180
|
### Changed
|
|
181
|
+
- Renamed `src/styles/bootstrap.min.css` (+ `.map`) to `base.min.css` and `bootstrap-extensions.css` to `base-extensions.css`; `scripts/build.mjs` now loads every `src/styles/base*.css` (vendored Bootstrap, extensions, then the rest alphabetically, e.g. `baseui.css`). `dist/baseui.min.css` is byte-identical.
|
|
182
|
+
- `Accordion`, `DropdownMenu` items, `Tabs` and `NavigationMenu` now also carry Bootstrap classes (`accordion*`, `dropdown-item`/`-header`/`-divider`, `nav`/`nav-link`) alongside their `bu-*` classes, in both pure Base templates and static adapters; `bu-*` class names and selectors are unchanged. `Toast` and `Carousel` already used Bootstrap classes.
|
|
183
|
+
- `Progress` now renders Bootstrap `.progress` / `.progress-bar` (plus `bu-progress*`); its CSS only sets the value-driven fill width and `--bs-progress-height`.
|
|
111
184
|
- **Breaking**: every CSS custom property has been renamed from the `--baseui-*` prefix to `--b-*` (e.g. `--baseui-primary` → `--b-primary`). Aligns the token prefix with the existing `--b1`/`--b2_5` spacing scale and `[b-ui]`/`b-att-*` attribute convention. `BaseUI.theme.set()` now writes/reads `--b-*` tokens; any consumer CSS that directly referenced `--baseui-*` must update to `--b-*`.
|
|
112
185
|
- **Breaking**: every component CSS class has been renamed from the `baseui-*` prefix to `bu-*` (e.g. `.baseui-alert` → `.bu-alert`), to shorten it and avoid colliding with third-party `b-*`-prefixed conventions (e.g. Buefy) while staying distinct from the `b-ui`/`b-att-*` attribute and `--b-*` token conventions. Any consumer markup, CSS, or pure Base `className` override referencing `.baseui-*` must update to `.bu-*`. The bare `.baseui` root/theme-scope class, file names, the `BaseUI` global, the `@thebase/ui` package name, and `storageKey="'baseui-theme'"` are untouched.
|
|
113
186
|
- Every component's class-name string-building now goes through the shared `cn()` helper instead of ad hoc `classes.push()/join(" ")` logic; the pure Base `Toast`'s close control now composes the real `Button` component instead of a raw `<button>`.
|
|
@@ -134,6 +207,9 @@ First stable release. From here on the package follows [Semantic Versioning](htt
|
|
|
134
207
|
- Collaboration now auto-enables when `provider` and `url` are both supplied, even without also setting `collaborative="true"` — `collaborative` explicitly `false`/unset with an incomplete provider/url pair still leaves the editor single-user.
|
|
135
208
|
|
|
136
209
|
### Changed
|
|
210
|
+
- Renamed `src/styles/bootstrap.min.css` (+ `.map`) to `base.min.css` and `bootstrap-extensions.css` to `base-extensions.css`; `scripts/build.mjs` now loads every `src/styles/base*.css` (vendored Bootstrap, extensions, then the rest alphabetically, e.g. `baseui.css`). `dist/baseui.min.css` is byte-identical.
|
|
211
|
+
- `Accordion`, `DropdownMenu` items, `Tabs` and `NavigationMenu` now also carry Bootstrap classes (`accordion*`, `dropdown-item`/`-header`/`-divider`, `nav`/`nav-link`) alongside their `bu-*` classes, in both pure Base templates and static adapters; `bu-*` class names and selectors are unchanged. `Toast` and `Carousel` already used Bootstrap classes.
|
|
212
|
+
- `Progress` now renders Bootstrap `.progress` / `.progress-bar` (plus `bu-progress*`); its CSS only sets the value-driven fill width and `--bs-progress-height`.
|
|
137
213
|
- `y-websocket` added as a runtime dependency, lazy-loaded only when `provider="websocket"` is actually selected, so `y-webrtc`-only consumers see no bundle-size change.
|
|
138
214
|
|
|
139
215
|
## [v0.0.6] - 2026-09-02
|
|
@@ -163,6 +239,9 @@ Initial documented release. The Base UI is a self-contained component library (O
|
|
|
163
239
|
- Published `docs/*.md` and `docs/components/` inside the npm package (`package.json` `files`), plus `CHANGELOG.md`, so integration docs and per-component reference pages are reachable straight from unpkg/jsDelivr without cloning the repo. `docs/v2/` (vendored general Owl framework reference) and `docs/component-authoring.md` stay repo-only and are excluded.
|
|
164
240
|
|
|
165
241
|
### Changed
|
|
242
|
+
- Renamed `src/styles/bootstrap.min.css` (+ `.map`) to `base.min.css` and `bootstrap-extensions.css` to `base-extensions.css`; `scripts/build.mjs` now loads every `src/styles/base*.css` (vendored Bootstrap, extensions, then the rest alphabetically, e.g. `baseui.css`). `dist/baseui.min.css` is byte-identical.
|
|
243
|
+
- `Accordion`, `DropdownMenu` items, `Tabs` and `NavigationMenu` now also carry Bootstrap classes (`accordion*`, `dropdown-item`/`-header`/`-divider`, `nav`/`nav-link`) alongside their `bu-*` classes, in both pure Base templates and static adapters; `bu-*` class names and selectors are unchanged. `Toast` and `Carousel` already used Bootstrap classes.
|
|
244
|
+
- `Progress` now renders Bootstrap `.progress` / `.progress-bar` (plus `bu-progress*`); its CSS only sets the value-driven fill width and `--bs-progress-height`.
|
|
166
245
|
- Consolidated the Base UI into a single self-contained bundle: vendored Bootstrap 5 and Owl under `src/runtime`, externalized Owl into `dist/owl.js` for lean CDN bundles, and deduped disclosure/modal logic.
|
|
167
246
|
- Rewrote the Markdown live-preview to mount real Base components instead of static templates.
|
|
168
247
|
- Renamed Tabs sub-components and reworked the example shell (unified sidebar/shell collapse trigger, `baseui-text-xs` utility).
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ The Base UI is a CDN-installable UI kit built with Bootstrap 5 styling and Owl f
|
|
|
4
4
|
|
|
5
5
|
Its strong points: **no build step** — every component runs straight from a CDN `<script>`/import map, nothing to compile; **modular component design** — each component is a self-contained unit you import or mark up individually, not a monolith; **vanilla JavaScript/TypeScript** — no framework lock-in, no JSX, no compiler-specific syntax to learn; and this combination makes it well suited to building **WYSIWYG website builders**, where components must mount, unmount, and re-render dynamically from user-driven markup or drag-and-drop edits rather than a fixed build-time component tree.
|
|
6
6
|
|
|
7
|
-
Both APIs load straight from a CDN — jsDelivr or unpkg — no build step, no self-hosting required. The snippets below use the `@latest` tag for readability; pin an exact version instead (e.g. `@1.
|
|
7
|
+
Both APIs load straight from a CDN — jsDelivr or unpkg — no build step, no self-hosting required. The snippets below use the `@latest` tag for readability; pin an exact version instead (e.g. `@1.2.0`, or `@1` to take only non-breaking updates) for any production page, since `@latest` can change what your page loads the moment a new version ships. Pure Base usage:
|
|
8
8
|
|
|
9
9
|
```html
|
|
10
10
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@thebase/ui@latest/dist/baseui.min.css">
|
|
@@ -83,15 +83,19 @@ See [Usage Guide §5b](docs/usage-guide.md) and the [PWA component](docs/compone
|
|
|
83
83
|
|
|
84
84
|
## Outlined fields
|
|
85
85
|
|
|
86
|
-
New in 1.1.5 (1.1.6 adds `useTip` to show helper text in an info-icon tooltip): `Input`, `Textarea`, `NativeSelect`, `Combobox`, `DatePicker
|
|
86
|
+
New in 1.1.5 (1.1.6 adds `useTip` to show helper text in an info-icon tooltip): `Input`, `Textarea`, `NativeSelect`, `Combobox`, `DatePicker` and `Select` share one Material-style outlined look (`label`, `supportingText`, `errorText`, `invalid`), and `Field` passes its `label`/`description`/`error` to the control inside. See [Field](docs/components/field.md) and [Input](docs/components/input.md).
|
|
87
87
|
|
|
88
88
|
## ApiDoc
|
|
89
89
|
|
|
90
90
|
New in 1.1.3: `ApiDoc` (`b-ui="apidoc"`) renders an OpenAPI 3 JSON file as browsable API docs — grouped sidebar, parameters, request bodies, responses, a Try It panel with code samples in 17 languages, and an Authorize dialog. See [ApiDoc](docs/components/apidoc.md), the `apidoc-01` block, and the live demo in [`examples/apidoc/`](examples/apidoc/).
|
|
91
91
|
|
|
92
|
+
## Theming
|
|
93
|
+
|
|
94
|
+
New in 1.2.0: colour tokens, `--base-radius` and `--b-overlay` live only in the downloadable `baseui-light.css` / `baseui-dark.css` themes (new `--b-success|warning|info` status tokens), and the **Theme** tab of the examples app (`examples/index.html#/theme`) builds a custom pair for you. **Breaking in 1.2.0:** the `bu-` class and `--bu-*` variable prefix is now `b-` (`bu-button` -> `b-button`); see the CHANGELOG migration note. See [Theming](docs/theming.md).
|
|
95
|
+
|
|
92
96
|
## Release notes
|
|
93
97
|
|
|
94
|
-
See [CHANGELOG.md](CHANGELOG.md) for the full version history. Current version: **1.
|
|
98
|
+
See [CHANGELOG.md](CHANGELOG.md) for the full version history. Current version: **1.2.0**.
|
|
95
99
|
|
|
96
100
|
## Versioning policy
|
|
97
101
|
|
|
@@ -99,7 +103,7 @@ From 1.0.0 on, the Base UI follows [Semantic Versioning](https://semver.org/). T
|
|
|
99
103
|
|
|
100
104
|
- Base component classes, their names, props, slots, and callback props exported from `@thebase/ui`.
|
|
101
105
|
- Static markup: `b-ui`/`b-icon` names, `b-att-*` attributes, and `baseui:*` events.
|
|
102
|
-
- CSS: `
|
|
106
|
+
- CSS: `b-*` class names and `--b-*` design tokens.
|
|
103
107
|
- Runtime exports (`BaseUI`, `Component`, `mount`, `xml`, `cn`, `mergeStyle`, theme helpers), including `Component`'s fallback to globally registered the Base UI components, and the published `dist/` file names and package `exports` paths.
|
|
104
108
|
|
|
105
109
|
What each release type means:
|
|
@@ -110,7 +114,7 @@ What each release type means:
|
|
|
110
114
|
|
|
111
115
|
Anything prefixed `_`, undocumented internals, and the `docs/`/`examples/` sources are not part of the public API. Neither are the source-level authoring helpers described in [Component Authoring](docs/component-authoring.md) (`optional()`, `slotProps`, the `open-state.js` hooks, `bindBootstrapOverlay()`): they aren't exported from the package and may change in any release. Deprecated APIs keep working until the next major and are flagged in the CHANGELOG first.
|
|
112
116
|
|
|
113
|
-
Pinning: use an exact version (`@1.
|
|
117
|
+
Pinning: use an exact version (`@1.2.0`) when you need byte-identical output, or the major range (`@1` on jsDelivr/unpkg, `^1.0.0` in npm) to receive fixes and features without breaking changes. Avoid `@latest` in production — it will move to the next major.
|
|
114
118
|
|
|
115
119
|
## Project Documents
|
|
116
120
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { copyFileSync, existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { spawnSync } from "node:child_process";
|
|
4
|
+
import { createHash } from "node:crypto";
|
|
4
5
|
import path from "node:path";
|
|
5
6
|
import { pathToFileURL } from "node:url";
|
|
6
7
|
|
|
@@ -54,9 +55,11 @@ function buildTemplateFiles(appName, baseuiVersion) {
|
|
|
54
55
|
) + "\n",
|
|
55
56
|
|
|
56
57
|
"vite.config.js": `import { defineConfig } from "vite";
|
|
58
|
+
import { baseuiPwa } from "@thebase/ui/vite";
|
|
57
59
|
|
|
58
60
|
export default defineConfig({
|
|
59
61
|
server: { open: true },
|
|
62
|
+
plugins: [baseuiPwa({ name: ${JSON.stringify(title)} })],
|
|
60
63
|
});
|
|
61
64
|
`,
|
|
62
65
|
|
|
@@ -206,6 +209,7 @@ function buildStarterFiles(appName, baseuiVersion) {
|
|
|
206
209
|
) + "\n",
|
|
207
210
|
|
|
208
211
|
"vite.config.js": `import { defineConfig } from "vite";
|
|
212
|
+
import { baseuiPwa } from "@thebase/ui/vite";
|
|
209
213
|
import { fileURLToPath } from "node:url";
|
|
210
214
|
|
|
211
215
|
/** Resolves a file in this config's own directory, Node-ESM-safe (no __dirname in ESM). */
|
|
@@ -213,6 +217,7 @@ const here = (file) => fileURLToPath(new URL(file, import.meta.url));
|
|
|
213
217
|
|
|
214
218
|
export default defineConfig({
|
|
215
219
|
server: { open: true },
|
|
220
|
+
plugins: [baseuiPwa({ name: ${JSON.stringify(title)} })],
|
|
216
221
|
build: {
|
|
217
222
|
rollupOptions: {
|
|
218
223
|
input: {
|
|
@@ -422,7 +427,7 @@ export class Signup extends Component {
|
|
|
422
427
|
"src/home/Home.js": `import { Component, useState } from "@thebase/ui";
|
|
423
428
|
import {
|
|
424
429
|
Breadcrumb, BreadcrumbItem, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator,
|
|
425
|
-
Button, Icon,
|
|
430
|
+
Button, Icon, Input, Separator,
|
|
426
431
|
Shell, ShellContent, ShellHeader, ShellMain, ShellNav, ShellSidebar, ShellSidebarHeader,
|
|
427
432
|
SidebarGroupCollapsible, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarTrigger,
|
|
428
433
|
} from "@thebase/ui";
|
|
@@ -433,7 +438,7 @@ export class Home extends Component {
|
|
|
433
438
|
static template = "app.Home";
|
|
434
439
|
static components = {
|
|
435
440
|
Breadcrumb, BreadcrumbItem, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator,
|
|
436
|
-
Button, Icon,
|
|
441
|
+
Button, Icon, Input, Separator,
|
|
437
442
|
Shell, ShellContent, ShellHeader, ShellMain, ShellNav, ShellSidebar, ShellSidebarHeader,
|
|
438
443
|
SidebarGroupCollapsible, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarTrigger,
|
|
439
444
|
};
|
|
@@ -456,10 +461,7 @@ export class Home extends Component {
|
|
|
456
461
|
</span>
|
|
457
462
|
</a>
|
|
458
463
|
</ShellSidebarHeader>
|
|
459
|
-
<
|
|
460
|
-
<InputGroupAddon><Icon name="'search'"/></InputGroupAddon>
|
|
461
|
-
<InputGroupInput type="'search'" placeholder="'Search...'"/>
|
|
462
|
-
</InputGroup>
|
|
464
|
+
<Input type="'search'" label="'Search'" leadingIcon="'search'"/>
|
|
463
465
|
<ShellNav className="'d-flex flex-column gap-2'">
|
|
464
466
|
<SidebarGroupCollapsible label="'Getting Started'" defaultOpen="true">
|
|
465
467
|
<SidebarMenu>
|
|
@@ -643,6 +645,13 @@ function cmdConvert(argv) {
|
|
|
643
645
|
written.forEach((f) => console.log(` create ${f}`));
|
|
644
646
|
skipped.forEach((f) => console.log(` skip ${f} (already exists)`));
|
|
645
647
|
|
|
648
|
+
if (skipped.includes("vite.config.js")) {
|
|
649
|
+
console.log(
|
|
650
|
+
'\nvite.config.js already existed — add `import { baseuiPwa } from "@thebase/ui/vite"` and ' +
|
|
651
|
+
"`plugins: [baseuiPwa({ name: \"My App\" })]` so every build emits the PWA files and auto-reloads on a new version.",
|
|
652
|
+
);
|
|
653
|
+
}
|
|
654
|
+
|
|
646
655
|
if (skipped.includes("index.html")) {
|
|
647
656
|
console.log(
|
|
648
657
|
"\nindex.html already existed and was left untouched — make sure it has a <div id=\"app\"></div> " +
|
|
@@ -672,17 +681,31 @@ async function cmdPwa(argv) {
|
|
|
672
681
|
}
|
|
673
682
|
|
|
674
683
|
const { manifest, serviceWorker } = (await import(pathToFileURL(configPath).href)).default;
|
|
675
|
-
const { buildManifest, buildServiceWorker, DEFAULT_ICON_FILES } = await import("../dist/baseui.pwa.esm.js");
|
|
684
|
+
const { buildManifest, buildServiceWorker, buildServiceWorkerRegister, buildVersionJson, DEFAULT_ICON_FILES } = await import("../dist/baseui.pwa.esm.js");
|
|
676
685
|
|
|
677
686
|
writeFileSync(
|
|
678
687
|
path.join(targetDir, "manifest.webmanifest"),
|
|
679
688
|
JSON.stringify(buildManifest(manifest), null, 2) + "\n",
|
|
680
689
|
);
|
|
681
690
|
writeFileSync(path.join(targetDir, "sw.js"), buildServiceWorker(serviceWorker));
|
|
691
|
+
writeFileSync(path.join(targetDir, "sw-register.js"), buildServiceWorkerRegister());
|
|
692
|
+
writeFileSync(path.join(targetDir, "version.json"), buildVersionJson(hashAppFiles(targetDir, serviceWorker.appFiles)));
|
|
682
693
|
|
|
683
694
|
copyDefaultIcons(path.join(targetDir, "icons"), DEFAULT_ICON_FILES);
|
|
684
695
|
|
|
685
|
-
console.log(`Wrote manifest.webmanifest
|
|
696
|
+
console.log(`Wrote manifest.webmanifest, sw.js, sw-register.js and version.json in ${targetDir}`);
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
/** Fingerprints the generated PWA files plus every listed app file found under the app folder, so
|
|
700
|
+
* version.json changes exactly when the shipped code does (re-run `pwa` at deploy time). */
|
|
701
|
+
function hashAppFiles(targetDir, appFiles = []) {
|
|
702
|
+
const hash = createHash("sha256");
|
|
703
|
+
const names = ["sw.js", "manifest.webmanifest", ...appFiles.map((file) => file.replace(/^\//, ""))];
|
|
704
|
+
for (const name of names.sort()) {
|
|
705
|
+
const file = path.join(targetDir, name);
|
|
706
|
+
if (existsSync(file)) hash.update(name).update(readFileSync(file));
|
|
707
|
+
}
|
|
708
|
+
return hash.digest("hex").slice(0, 12);
|
|
686
709
|
}
|
|
687
710
|
|
|
688
711
|
/** Gives a PWA the default the Base UI logo/favicon set, without replacing any icon the app already has. */
|