@thebase/ui 1.1.7 → 1.2.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.
Files changed (56) hide show
  1. package/CHANGELOG.md +70 -1
  2. package/README.md +22 -4
  3. package/bin/create-baseui-app.mjs +28 -2
  4. package/dist/baseui.apidoc.esm.js +64 -64
  5. package/dist/baseui.apidoc.min.js +64 -64
  6. package/dist/baseui.esm.js +42 -61
  7. package/dist/baseui.i18n.esm.js +2 -0
  8. package/dist/baseui.i18n.min.js +2 -0
  9. package/dist/baseui.icons.esm.js +1 -1
  10. package/dist/baseui.min.css +2 -2
  11. package/dist/baseui.min.js +61 -61
  12. package/dist/baseui.pwa.esm.js +71 -9
  13. package/dist/baseui.registry.json +13 -9
  14. package/dist/baseui.templates.xml +311 -311
  15. package/dist/baseui.vite.esm.js +116 -0
  16. package/dist/runtime/lazy/apidoc.logic.js +20 -0
  17. package/dist/runtime/milkdown/milkdown-editor.js +1 -1
  18. package/dist/runtime/milkdown/milkdown-text-editor.js +1 -1
  19. package/dist/themes/baseui-dark.css +80 -1
  20. package/dist/themes/baseui-dark.min.css +1 -0
  21. package/dist/themes/baseui-light.css +81 -1
  22. package/dist/themes/baseui-light.min.css +1 -0
  23. package/dist/types/i18n.d.ts +25 -0
  24. package/dist/types/index.d.ts +2 -0
  25. package/dist/types/pwa.d.ts +1 -45
  26. package/dist/types/vite.d.ts +4 -0
  27. package/docs/analytics.md +3 -3
  28. package/docs/base-ui-skill.md +54 -0
  29. package/docs/blocks.md +1 -1
  30. package/docs/components/accordion.md +4 -4
  31. package/docs/components/apidoc.md +1 -1
  32. package/docs/components/block-viewer.md +1 -1
  33. package/docs/components/breadcrumb.md +1 -1
  34. package/docs/components/button.md +1 -1
  35. package/docs/components/code-editor.md +1 -1
  36. package/docs/components/data-table.md +2 -2
  37. package/docs/components/dialog.md +5 -5
  38. package/docs/components/form.md +29 -29
  39. package/docs/components/input.md +1 -1
  40. package/docs/components/markdown.md +1 -1
  41. package/docs/components/pwa.md +1 -1
  42. package/docs/components/shell.md +2 -2
  43. package/docs/components/sidebar.md +16 -16
  44. package/docs/components/text-editor.md +1 -1
  45. package/docs/components/theme-button.md +1 -1
  46. package/docs/components/toast.md +10 -10
  47. package/docs/components/typography.md +21 -2
  48. package/docs/i18n.md +119 -0
  49. package/docs/icons.md +1 -1
  50. package/docs/installation.md +3 -2
  51. package/docs/owl-components.md +1 -1
  52. package/docs/registry.md +1 -0
  53. package/docs/runtime-api.md +5 -3
  54. package/docs/theming.md +33 -3
  55. package/docs/usage-guide.md +23 -6
  56. package/package.json +13 -1
package/CHANGELOG.md CHANGED
@@ -2,7 +2,43 @@
2
2
 
3
3
  All notable changes to this project are documented in this file.
4
4
 
5
- ## [Unreleased]
5
+ ## [v1.2.1] - 2026-10-30
6
+
7
+ ### Added
8
+ - Optional standalone i18n service (`@thebase/ui/i18n`, `dist/baseui.i18n.esm.js` / `.min.js`, `window.thebase.i18n`), extracted from `emvhub/i18n.js` and configurable through `init({ languages, defaultLanguage, storageKey, queryParam, catalogDir })`. See `docs/i18n.md`. `emvhub/i18n.js` is now a thin adapter that calls `init()` and re-exports it.
9
+ - `docs/i18n.md` (install, quick start, `.po` catalogs, language detection order, API) and the runnable example in `examples/i18n/`; `test/i18n.test.js` covers the service. The `./i18n` export and `dist/baseui.i18n.*` files are listed in `package.json` `files`/`exports`.
10
+
11
+ ### Changed
12
+ - Version pins in README, docs, emvhub, qr-page, momo_demo and the skill references moved to `@1.2.1`. No breaking changes; existing `emvhub/i18n.js` imports keep working.
13
+
14
+ ## [v1.2.0] - 2026-10-29
15
+
16
+ ### Breaking
17
+ - 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`.
18
+
19
+ ### Changed (themes)
20
+ - 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.
21
+ - `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).
22
+ - `docs/theming.md` documents the new layout and how to build a custom theme.
23
+
24
+ ### Fixed (contrast)
25
+ - `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`.
26
+ - 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.
27
+ - 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.
28
+ - `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.
29
+ - Theme tab: colour selection buttons are 1.5rem.
30
+
31
+ ### Added
32
+ - 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`.
33
+ - `@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.
34
+ - `@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`.
35
+
36
+ ### Changed
37
+ - 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.
38
+ - `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.
39
+ - `Progress` now renders Bootstrap `.progress` / `.progress-bar` (plus `b-progress*`); its CSS only sets the value-driven fill width and `--bs-progress-height`.
40
+ - `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.
41
+ - `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.
6
42
 
7
43
  ## [v1.1.7] - 2026-10-18
8
44
 
@@ -29,6 +65,9 @@ All notable changes to this project are documented in this file.
29
65
  - `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/`.
30
66
 
31
67
  ### Changed
68
+ - 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.
69
+ - `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.
70
+ - `Progress` now renders Bootstrap `.progress` / `.progress-bar` (plus `bu-progress*`); its CSS only sets the value-driven fill width and `--bs-progress-height`.
32
71
  - 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`.
33
72
  - `Tabs`: trigger content is packed to the start (and to the end in right-to-left text).
34
73
  - Docs and examples: production pin examples now use `@1.1.6`; `qr-page` service-worker cache bumped to `2qr-cache-v13`.
@@ -41,6 +80,9 @@ All notable changes to this project are documented in this file.
41
80
  - `Field` accepts `label`, `description`, `error` and `invalid` and hands them to the control inside it.
42
81
 
43
82
  ### Changed
83
+ - 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.
84
+ - `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.
85
+ - `Progress` now renders Bootstrap `.progress` / `.progress-bar` (plus `bu-progress*`); its CSS only sets the value-driven fill width and `--bs-progress-height`.
44
86
  - `Field` no longer renders its own label and error text; the control inside draws them. Use `FieldLabel` / `FieldError` for checkbox-style fields.
45
87
  - 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.
46
88
  - `package.json` description no longer mentions Owl.
@@ -50,6 +92,9 @@ All notable changes to this project are documented in this file.
50
92
  Backfilled entry (1.1.4 shipped without release notes).
51
93
 
52
94
  ### Changed
95
+ - 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.
96
+ - `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.
97
+ - `Progress` now renders Bootstrap `.progress` / `.progress-bar` (plus `bu-progress*`); its CSS only sets the value-driven fill width and `--bs-progress-height`.
53
98
  - Tabs, Toast and style-prop rollout; internal `baseui` class prefix renamed to `bu`; docs and memory synced.
54
99
 
55
100
  ## [v1.1.3] - 2026-10-13
@@ -63,6 +108,9 @@ Backfilled entry (1.1.4 shipped without release notes).
63
108
  - Build: ApiDoc's language logos are copied to `dist/apidoc/img/` and published (`dist/apidoc` added to `package.json` `files`).
64
109
 
65
110
  ### Changed
111
+ - 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.
112
+ - `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.
113
+ - `Progress` now renders Bootstrap `.progress` / `.progress-bar` (plus `bu-progress*`); its CSS only sets the value-driven fill width and `--bs-progress-height`.
66
114
  - PWA toolkit: the default precache list no longer includes `/favicon.svg`; it precaches the default icon files instead.
67
115
  - `npm run dev` server: serves `.ico` as `image/x-icon` and `.mjs` as JavaScript.
68
116
  - 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.
@@ -84,6 +132,9 @@ Backfilled entry (1.1.2 shipped without release notes).
84
132
  - 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.
85
133
 
86
134
  ### Changed
135
+ - 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.
136
+ - `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.
137
+ - `Progress` now renders Bootstrap `.progress` / `.progress-bar` (plus `bu-progress*`); its CSS only sets the value-driven fill width and `--bs-progress-height`.
87
138
  - Docs and examples: production pin examples now use `@1.1.1`.
88
139
  - `npm run dev` server: folder URLs serve their `index.html`, and `.go`/`.py`/`.mod` sources are served as text.
89
140
 
@@ -94,6 +145,9 @@ Backfilled entry (1.1.2 shipped without release notes).
94
145
  - 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.
95
146
 
96
147
  ### Changed
148
+ - 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.
149
+ - `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.
150
+ - `Progress` now renders Bootstrap `.progress` / `.progress-bar` (plus `bu-progress*`); its CSS only sets the value-driven fill width and `--bs-progress-height`.
97
151
  - 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.
98
152
 
99
153
  ### Deprecated
@@ -104,6 +158,9 @@ Backfilled entry (1.1.2 shipped without release notes).
104
158
  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.
105
159
 
106
160
  ### Changed
161
+ - 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.
162
+ - `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.
163
+ - `Progress` now renders Bootstrap `.progress` / `.progress-bar` (plus `bu-progress*`); its CSS only sets the value-driven fill width and `--bs-progress-height`.
107
164
  - 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.
108
165
  - 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.
109
166
 
@@ -114,6 +171,9 @@ First stable release. From here on the package follows [Semantic Versioning](htt
114
171
  ## [v0.0.12] - 2026-09-13
115
172
 
116
173
  ### Changed
174
+ - 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.
175
+ - `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.
176
+ - `Progress` now renders Bootstrap `.progress` / `.progress-bar` (plus `bu-progress*`); its CSS only sets the value-driven fill width and `--bs-progress-height`.
117
177
  - **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.
118
178
  - 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.
119
179
 
@@ -127,6 +187,9 @@ First stable release. From here on the package follows [Semantic Versioning](htt
127
187
  - 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`.
128
188
 
129
189
  ### Changed
190
+ - 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.
191
+ - `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.
192
+ - `Progress` now renders Bootstrap `.progress` / `.progress-bar` (plus `bu-progress*`); its CSS only sets the value-driven fill width and `--bs-progress-height`.
130
193
  - **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-*`.
131
194
  - **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.
132
195
  - 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>`.
@@ -153,6 +216,9 @@ First stable release. From here on the package follows [Semantic Versioning](htt
153
216
  - 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.
154
217
 
155
218
  ### Changed
219
+ - 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.
220
+ - `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.
221
+ - `Progress` now renders Bootstrap `.progress` / `.progress-bar` (plus `bu-progress*`); its CSS only sets the value-driven fill width and `--bs-progress-height`.
156
222
  - `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.
157
223
 
158
224
  ## [v0.0.6] - 2026-09-02
@@ -182,6 +248,9 @@ Initial documented release. The Base UI is a self-contained component library (O
182
248
  - 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.
183
249
 
184
250
  ### Changed
251
+ - 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.
252
+ - `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.
253
+ - `Progress` now renders Bootstrap `.progress` / `.progress-bar` (plus `bu-progress*`); its CSS only sets the value-driven fill width and `--bs-progress-height`.
185
254
  - 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.
186
255
  - Rewrote the Markdown live-preview to mount real Base components instead of static templates.
187
256
  - 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.1.7`, 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:
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.1`, 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">
@@ -89,9 +89,26 @@ New in 1.1.5 (1.1.6 adds `useTip` to show helper text in an info-icon tooltip):
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
+ ## Internationalization
93
+
94
+ New in 1.2.1: an optional, standalone i18n service (gettext-style `.po` catalogs, no Owl or Bootstrap). It is not part of the main bundles.
95
+
96
+ ```js
97
+ import { init, t, loadCatalog } from "https://cdn.jsdelivr.net/npm/@thebase/ui@1.2.1/dist/baseui.i18n.esm.js";
98
+ init({ languages: [{ code: "en", label: "English" }, { code: "vi", label: "Tiếng Việt" }] });
99
+ await loadCatalog(import.meta.url); // fetches ./i18n/vi.po when Vietnamese is picked
100
+ console.log(t("Hello {name}", { name: "An" }));
101
+ ```
102
+
103
+ From npm use `@thebase/ui/i18n`; for a `<script>` tag, `dist/baseui.i18n.min.js` sets `window.thebase.i18n`. See [i18n](docs/i18n.md) and the runnable example in [`examples/i18n/`](examples/i18n/).
104
+
105
+ ## Theming
106
+
107
+ 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).
108
+
92
109
  ## Release notes
93
110
 
94
- See [CHANGELOG.md](CHANGELOG.md) for the full version history. Current version: **1.1.7**.
111
+ See [CHANGELOG.md](CHANGELOG.md) for the full version history. Current version: **1.2.1**.
95
112
 
96
113
  ## Versioning policy
97
114
 
@@ -99,7 +116,7 @@ From 1.0.0 on, the Base UI follows [Semantic Versioning](https://semver.org/). T
99
116
 
100
117
  - Base component classes, their names, props, slots, and callback props exported from `@thebase/ui`.
101
118
  - Static markup: `b-ui`/`b-icon` names, `b-att-*` attributes, and `baseui:*` events.
102
- - CSS: `bu-*` class names and `--b-*` design tokens.
119
+ - CSS: `b-*` class names and `--b-*` design tokens.
103
120
  - 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
121
 
105
122
  What each release type means:
@@ -110,7 +127,7 @@ What each release type means:
110
127
 
111
128
  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
129
 
113
- Pinning: use an exact version (`@1.1.7`) 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.
130
+ Pinning: use an exact version (`@1.2.1`) 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
131
 
115
132
  ## Project Documents
116
133
 
@@ -119,6 +136,7 @@ Use these documents as the canonical project map:
119
136
  - [Usage Guide](docs/usage-guide.md) is the single entry point for integrating the Base UI into a consumer project — start here, then follow its links into the reference docs below.
120
137
  - [Installation](docs/installation.md) covers CDN, npm, self-hosted usage, icon assets, pinned versions, and release guardrails.
121
138
  - [Analytics](docs/analytics.md) documents the optional, standalone cookieless analytics service (`@thebase/ui/analytics`).
139
+ - [i18n](docs/i18n.md) documents the optional, standalone translation service (`@thebase/ui/i18n`): `.po` catalogs, language detection, and the `init`/`t`/`loadCatalog` API.
122
140
  - [Runtime API](docs/runtime-api.md) documents the `window.thebase` global, mounting lifecycle, theming API, and destroy behavior.
123
141
  - [Registry](docs/registry.md) explains `dist/baseui.registry.json`, build files, block metadata, component metadata, and integrity hashes.
124
142
  - [Theming](docs/theming.md) describes `b-theme`, runtime theme overrides, shadcn-aligned tokens, Bootstrap variable mapping, and shared example theme persistence.
@@ -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: {
@@ -640,6 +645,13 @@ function cmdConvert(argv) {
640
645
  written.forEach((f) => console.log(` create ${f}`));
641
646
  skipped.forEach((f) => console.log(` skip ${f} (already exists)`));
642
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
+
643
655
  if (skipped.includes("index.html")) {
644
656
  console.log(
645
657
  "\nindex.html already existed and was left untouched — make sure it has a <div id=\"app\"></div> " +
@@ -669,17 +681,31 @@ async function cmdPwa(argv) {
669
681
  }
670
682
 
671
683
  const { manifest, serviceWorker } = (await import(pathToFileURL(configPath).href)).default;
672
- 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");
673
685
 
674
686
  writeFileSync(
675
687
  path.join(targetDir, "manifest.webmanifest"),
676
688
  JSON.stringify(buildManifest(manifest), null, 2) + "\n",
677
689
  );
678
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)));
679
693
 
680
694
  copyDefaultIcons(path.join(targetDir, "icons"), DEFAULT_ICON_FILES);
681
695
 
682
- console.log(`Wrote manifest.webmanifest and sw.js in ${targetDir}`);
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);
683
709
  }
684
710
 
685
711
  /** Gives a PWA the default the Base UI logo/favicon set, without replacing any icon the app already has. */