@thebase/ui 1.1.3 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -18
- package/README.md +26 -22
- package/bin/create-baseui-app.mjs +7 -7
- package/dist/baseui.apidoc.esm.js +949 -0
- package/dist/baseui.apidoc.min.js +950 -0
- package/dist/baseui.esm.js +31 -31
- package/dist/baseui.min.css +1 -1
- package/dist/baseui.min.js +31 -31
- package/dist/baseui.registry.json +5 -5
- package/dist/baseui.templates.xml +60 -31
- package/dist/types/apidoc.d.ts +27 -0
- package/docs/analytics.md +5 -5
- package/docs/blocks.md +5 -5
- package/docs/components/accordion.md +3 -3
- package/docs/components/alert-dialog.md +2 -2
- package/docs/components/alert.md +2 -2
- package/docs/components/apidoc.md +17 -4
- package/docs/components/aspect-ratio.md +2 -2
- package/docs/components/attachment.md +3 -3
- package/docs/components/avatar.md +5 -5
- package/docs/components/badge.md +2 -2
- package/docs/components/block-viewer.md +4 -4
- package/docs/components/breadcrumb.md +3 -3
- package/docs/components/bubble.md +2 -2
- package/docs/components/button-group.md +2 -2
- package/docs/components/button.md +2 -2
- package/docs/components/calendar.md +5 -5
- package/docs/components/card.md +2 -2
- package/docs/components/carousel.md +5 -5
- package/docs/components/chart.md +5 -5
- package/docs/components/checkbox.md +2 -2
- package/docs/components/clipboard-button.md +2 -2
- package/docs/components/collapsible.md +2 -2
- package/docs/components/combobox.md +7 -6
- package/docs/components/command.md +5 -5
- package/docs/components/context-menu.md +5 -5
- package/docs/components/data-table.md +6 -6
- package/docs/components/date-picker.md +9 -8
- package/docs/components/dialog.md +4 -4
- package/docs/components/direction.md +2 -2
- package/docs/components/drawer.md +3 -3
- package/docs/components/dropdown-menu.md +3 -3
- package/docs/components/empty.md +3 -3
- package/docs/components/field.md +23 -17
- package/docs/components/form.md +3 -3
- package/docs/components/hover-card.md +5 -8
- package/docs/components/icon.md +3 -3
- package/docs/components/input-group.md +8 -7
- package/docs/components/input-otp.md +5 -5
- package/docs/components/input.md +6 -5
- package/docs/components/item.md +2 -2
- package/docs/components/kbd.md +2 -2
- package/docs/components/label.md +2 -2
- package/docs/components/markdown.md +3 -3
- package/docs/components/marker.md +2 -2
- package/docs/components/menubar.md +2 -2
- package/docs/components/message-scroller.md +5 -5
- package/docs/components/message.md +5 -5
- package/docs/components/native-select.md +4 -4
- package/docs/components/navigation-menu.md +3 -3
- package/docs/components/pagination.md +3 -3
- package/docs/components/popover.md +7 -7
- package/docs/components/progress.md +2 -2
- package/docs/components/pwa.md +2 -2
- package/docs/components/questionnaire.md +5 -5
- package/docs/components/radio-group.md +2 -2
- package/docs/components/resizable.md +5 -5
- package/docs/components/scroll-area.md +5 -5
- package/docs/components/select.md +6 -5
- package/docs/components/separator.md +2 -2
- package/docs/components/sheet.md +3 -3
- package/docs/components/shell.md +2 -2
- package/docs/components/sidebar.md +2 -2
- package/docs/components/skeleton.md +2 -2
- package/docs/components/slider.md +2 -2
- package/docs/components/spinner.md +3 -3
- package/docs/components/switch.md +2 -2
- package/docs/components/table.md +2 -2
- package/docs/components/tabs.md +4 -4
- package/docs/components/text-editor.md +2 -2
- package/docs/components/textarea.md +11 -15
- package/docs/components/theme-button.md +4 -4
- package/docs/components/toast.md +3 -3
- package/docs/components/toggle-group.md +5 -5
- package/docs/components/toggle.md +5 -5
- package/docs/components/tooltip.md +7 -7
- package/docs/components/typography.md +3 -3
- package/docs/icons.md +7 -7
- package/docs/installation.md +14 -13
- package/docs/owl-components.md +17 -17
- package/docs/registry.md +8 -8
- package/docs/runtime-api.md +3 -3
- package/docs/theming.md +5 -5
- package/docs/usage-guide.md +26 -26
- package/package.json +9 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,10 +4,29 @@ All notable changes to this project are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [v1.1.5] - 2026-10-17
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- Material outlined style is now shared by every input-like control: `Input`, `Textarea`, `NativeSelect`, `Combobox`, `DatePicker`, `Select` and `InputGroup` accept `label`, `supportingText`, `errorText`, `invalid` (and `leadingIcon`/`trailingIcon`/`maxLength` where they apply). The label rests inside and floats onto the border when focused or filled. Static `b-ui` adapters are unchanged. See the matching pages under `docs/components/`.
|
|
11
|
+
- `labelBackground` prop (any CSS colour) on every outlined control and on `Field`, to match the floating label's cut-out to the surrounding surface.
|
|
12
|
+
- `Field` accepts `label`, `description`, `error` and `invalid` and hands them to the control inside it.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
- `Field` no longer renders its own label and error text; the control inside draws them. Use `FieldLabel` / `FieldError` for checkbox-style fields.
|
|
16
|
+
- 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.
|
|
17
|
+
- `package.json` description no longer mentions Owl.
|
|
18
|
+
|
|
19
|
+
## [v1.1.4] - 2026-10-14
|
|
20
|
+
|
|
21
|
+
Backfilled entry (1.1.4 shipped without release notes).
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
- Tabs, Toast and style-prop rollout; internal `baseui` class prefix renamed to `bu`; docs and memory synced.
|
|
25
|
+
|
|
7
26
|
## [v1.1.3] - 2026-10-13
|
|
8
27
|
|
|
9
28
|
### Added
|
|
10
|
-
- `ApiDoc` component (`b-ui="apidoc"` / pure
|
|
29
|
+
- `ApiDoc` component (`b-ui="apidoc"` / pure Base `ApiDoc`): renders an OpenAPI 3 JSON document as browsable API documentation — grouped sidebar, per-operation parameters, request body, responses, callbacks, a Try It panel with request samples in 17 languages, and an Authorize dialog (API key, HTTP basic, bearer, OpenID Connect, OAuth2 flows). Props include `src`, `spec`, `serverUrl`, `theme`, `themeToggle`, `hash`, `operation`, `tryIt`, `authorize`, `languages`, `language`, `assetBase`, `oauthRedirectUri`, `height`; events `baseui:load`, `baseui:error`, `baseui:navigate`. Built from the Base UI's own `Button`, `Badge`, `Dialog`, `Tabs`, `Breadcrumb`, `Input`, `Textarea`, `NativeSelect` and `Checkbox`. See `docs/components/apidoc.md`.
|
|
11
30
|
- `apidoc-01` block (full-page API reference) and the `examples/apidoc/` demo with a Petstore spec.
|
|
12
31
|
- `Input`: Material-style outlined mode with `label`, `supportingText`, `errorText`, `leadingIcon`/`trailingIcon` and a `maxLength` counter (documented in `docs/components/input.md`).
|
|
13
32
|
- PWA toolkit: default logo and favicon set (`dist/pwa-icons/`: `favicon.ico`, 16/32 px favicons, `apple-touch-icon.png`, `icon-192.png`, `icon-512.png`). `create-baseui-app pwa` copies it into `<path>/icons/` without overwriting existing files, and the default manifest icons and precache list point at it. New optional `iconsBase` (manifest + service worker) and `manifestUrl` (service worker) config keys.
|
|
@@ -25,7 +44,7 @@ Backfilled entry (1.1.2 shipped without release notes).
|
|
|
25
44
|
|
|
26
45
|
### Added
|
|
27
46
|
- PWA toolkit: `@thebase/ui/pwa` (`dist/baseui.pwa.esm.js`, types in `dist/types/pwa.d.ts`) exports `buildManifest` and `buildServiceWorker`.
|
|
28
|
-
- `create-baseui-app` CLI: `create`, `init`, `convert` and `pwa` commands to scaffold a
|
|
47
|
+
- `create-baseui-app` CLI: `create`, `init`, `convert` and `pwa` commands to scaffold a Base UI project and generate `manifest.webmanifest` + `sw.js`. See `docs/usage-guide.md` §5b and `docs/components/pwa.md`.
|
|
29
48
|
- Examples: the landing page shows PWA install and visitor tracking (`examples/tracking.js`).
|
|
30
49
|
|
|
31
50
|
## [v1.1.1] - 2026-10-04
|
|
@@ -33,7 +52,7 @@ Backfilled entry (1.1.2 shipped without release notes).
|
|
|
33
52
|
### Added
|
|
34
53
|
- Analytics: `visitorContext()` export from `@thebase/ui/analytics` (and `window.thebase.analytics.visitorContext`). It returns the visitor's timezone (`tz`), browser language (`lang`) and a coarse screen bucket (`screen`: Mobile/Tablet/Laptop/Desktop). Pass it as `customProperties` to attach them to every event. Types are included as `BaseUIVisitorContext`. It's an additive export released as a patch by maintainer decision; nothing existing changed.
|
|
35
54
|
- Docs: `docs/analytics.md` covers receiving events on your own backend (payload reference, Go Fiber v3 and FastAPI receivers), a "Sample dashboard" section, and "Visitor context". README has an Analytics section.
|
|
36
|
-
- Examples: `examples/analytics/` contains a
|
|
55
|
+
- 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.
|
|
37
56
|
|
|
38
57
|
### Changed
|
|
39
58
|
- Docs and examples: production pin examples now use `@1.1.1`.
|
|
@@ -42,8 +61,8 @@ Backfilled entry (1.1.2 shipped without release notes).
|
|
|
42
61
|
## [v1.1.0] - 2026-10-04
|
|
43
62
|
|
|
44
63
|
### Added
|
|
45
|
-
- Optional, standalone analytics service: `@thebase/ui/analytics`. Use `dist/baseui.analytics.esm.js`, or the `<script>` build `dist/baseui.analytics.min.js`, which sets `window.thebase.analytics`. It is not part of the main bundles and needs no other
|
|
46
|
-
- 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
|
|
64
|
+
- Optional, standalone analytics service: `@thebase/ui/analytics`. Use `dist/baseui.analytics.esm.js`, or the `<script>` build `dist/baseui.analytics.min.js`, which sets `window.thebase.analytics`. It is not part of the main bundles and needs no other Base UI file. Start it with `init({ backendUrl })`: events go to `<backendUrl>/api/event` (change the path with `apiPath`), and `domain` defaults to `location.hostname`. Pass a full `endpoint` instead when routing through a proxy. A URL without a scheme throws instead of silently posting to your own site. It is a cookieless tracker ported from `@plausible-analytics/tracker` 0.4.6 and keeps that package's options and compact payload. It covers automatic and SPA pageviews, engagement (time on page and scroll depth), outbound links, file downloads, form submissions, `thebase-event-*` / `thebase-revenue-*` class tagging, the `localStorage.thebase_ignore` opt-out, `customProperties` and `transformRequest`. After `init()` the tracker is bound to `window.thebase.track`. Types are in `dist/types/analytics.d.ts`; see `docs/analytics.md`. The upstream MIT notice is in `LICENSE`.
|
|
65
|
+
- 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.
|
|
47
66
|
|
|
48
67
|
### Changed
|
|
49
68
|
- 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.
|
|
@@ -57,17 +76,17 @@ First stable release. From here on the package follows [Semantic Versioning](htt
|
|
|
57
76
|
|
|
58
77
|
### Changed
|
|
59
78
|
- 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.
|
|
60
|
-
- 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
|
|
79
|
+
- 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.
|
|
61
80
|
|
|
62
81
|
### Fixed
|
|
63
|
-
- Pure
|
|
82
|
+
- Pure Base: nested consumer components no longer crash with `Cannot find the definition of component "Icon"` (or `Button`, etc.) when their template uses a Base UI component missing from their own `static components`. `Component` from `@base/owl` now falls back to the globally registered the Base UI components for every component, not just the root passed to `mount()`. A component's own `static components` entries still take precedence.
|
|
64
83
|
- `Sidebar`: `SidebarMenu` now fills the remaining panel height and scrolls on its own when its items overflow, so a long nav list no longer pushes `SidebarFooter` off-screen.
|
|
65
84
|
|
|
66
85
|
## [v0.0.12] - 2026-09-13
|
|
67
86
|
|
|
68
87
|
### Changed
|
|
69
|
-
- **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
|
|
70
|
-
- Internal: every pure
|
|
88
|
+
- **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.
|
|
89
|
+
- 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.
|
|
71
90
|
|
|
72
91
|
### Added
|
|
73
92
|
- `Toast`: new optional `action` slot (`<t t-set-slot="action">...</t>`, e.g. an "Undo" `<Button/>`) renders grouped tight against the close button on the trailing edge, matching the shadcn/ui toast layout. The toast root and static `[b-ui="toast"]` markup are now a flex row: wrap message content in `.bu-toast-content` (grows to fill available width) and the action/close controls in `.bu-toast-actions` (grouped on the trailing edge) — see `docs/components/toast.md` for the updated static markup. `Shell`'s `toast.actionLabel` now renders through the new `action` slot instead of inline in the default slot.
|
|
@@ -80,8 +99,8 @@ First stable release. From here on the package follows [Semantic Versioning](htt
|
|
|
80
99
|
|
|
81
100
|
### Changed
|
|
82
101
|
- **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-*`.
|
|
83
|
-
- **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
|
|
84
|
-
- Every component's class-name string-building now goes through the shared `cn()` helper instead of ad hoc `classes.push()/join(" ")` logic; the pure
|
|
102
|
+
- **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.
|
|
103
|
+
- 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>`.
|
|
85
104
|
|
|
86
105
|
## [v0.0.10] - 2026-09-02
|
|
87
106
|
|
|
@@ -120,29 +139,29 @@ First stable release. From here on the package follows [Semantic Versioning](htt
|
|
|
120
139
|
|
|
121
140
|
## [v0.0.4] - 2026-09-01
|
|
122
141
|
|
|
123
|
-
Initial documented release.
|
|
142
|
+
Initial documented release. The Base UI is a self-contained component library (Owl v2 + Bootstrap 5 + GrapesJS page-builder tooling) with a shadcn-aligned component set, a live docs/examples app, and vendored runtime assets.
|
|
124
143
|
|
|
125
144
|
### Added
|
|
126
|
-
- Full
|
|
127
|
-
- Markdown component with live BaseUI/Mermaid previews, a copyable code pane with copy-to-clipboard toast, and a Template/
|
|
145
|
+
- Full the Base UI component set aligned with shadcn/ui coverage (Accordion, Alert, AlertDialog, Avatar, Badge, Breadcrumb, Button, Calendar, Card, Carousel, Chart, Checkbox, Collapsible, Combobox, Command, ContextMenu, DataTable, DatePicker, Dialog, Drawer, DropdownMenu, Empty, Field, Form, HoverCard, Input, InputGroup, InputOTP, Item, Kbd, Label, Marker, Menubar, NativeSelect, NavigationMenu, Pagination, Popover, Progress, RadioGroup, Resizable, ScrollArea, Select, Separator, Sheet, Shell, Sidebar, Skeleton, Slider, Spinner, Switch, Tabs, and more), plus Lucide icons and `b-*` component attributes.
|
|
146
|
+
- Markdown component with live BaseUI/Mermaid previews, a copyable code pane with copy-to-clipboard toast, and a Template/Base Component code toggle for every block demo.
|
|
128
147
|
- Collaborative Milkdown Markdown editor and a TextEditor component.
|
|
129
148
|
- Hash-routed examples/docs app unifying all component demos under one navigation shell, with a chart gallery and component previews embedded in docs.
|
|
130
149
|
- Mobile support: sidecar CSS/XML for Sidebar, Shell, DataTable, and Markdown, plus per-component demo blocks.
|
|
131
150
|
- QR page generator demo.
|
|
132
|
-
- `style` prop support across all
|
|
151
|
+
- `style` prop support across all Base components.
|
|
133
152
|
- PWA support and ClipboardButton component.
|
|
134
153
|
- 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.
|
|
135
154
|
|
|
136
155
|
### Changed
|
|
137
|
-
- Consolidated
|
|
138
|
-
- Rewrote the Markdown live-preview to mount real
|
|
156
|
+
- 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.
|
|
157
|
+
- Rewrote the Markdown live-preview to mount real Base components instead of static templates.
|
|
139
158
|
- Renamed Tabs sub-components and reworked the example shell (unified sidebar/shell collapse trigger, `baseui-text-xs` utility).
|
|
140
159
|
- Merged shell collapse trigger into the sidebar trigger.
|
|
141
160
|
- Renamed the published npm package from `@the-base/baseui` to `@thebase/ui`.
|
|
142
161
|
- Vendored Lucide icon sources into `src/icons/` (flat, git-tracked) instead of generating them only into the gitignored `dist/icons/lucide/` build output; the lucide loader module moved to `src/runtime/`.
|
|
143
162
|
- `dist/` and `package-lock.json` are now gitignored, since `dist/` is purely a build artifact.
|
|
144
163
|
- Consolidated duplicated class-name string-building logic (`DropdownMenu`, `Sidebar`, `Form`, `Field`) into a single shared `classNames()` helper in `prop-aliases.js`.
|
|
145
|
-
- Switched the QR page consumer demo to load
|
|
164
|
+
- Switched the QR page consumer demo to load the Base UI directly from `/dist/` instead of a vendored copy; bumped its service worker cache to `v4`.
|
|
146
165
|
- Rewrote `README.md`'s release notes to point at `CHANGELOG.md` instead of embedded version narrative; corrected the published component count; documented the CDN doc-access URLs and which docs are excluded from the package.
|
|
147
166
|
|
|
148
167
|
### Fixed
|
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# The Base UI
|
|
2
2
|
|
|
3
|
-
The Base UI is a CDN-installable UI kit built with Bootstrap 5 styling and Owl
|
|
3
|
+
The Base UI is a CDN-installable UI kit built with Bootstrap 5 styling and Owl framework enhanced behavior. The primary way to consume it is as **Base components** (`<Button/>`-style imports into your own application); the base static markup (`b-ui`) adapter is the alternative for plain static HTML, server-rendered pages, and Base HUB website pages that have no application of their own.
|
|
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
|
+
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.5`, 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">
|
|
@@ -39,26 +39,26 @@ Both APIs load straight from a CDN — jsDelivr or unpkg — no build step, no s
|
|
|
39
39
|
</script>
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
[unpkg](https://unpkg.com/@thebase/ui@latest/) mirrors the same files as an alternative CDN — swap any `cdn.jsdelivr.net/npm` URL above for `unpkg.com` (e.g. `https://unpkg.com/@thebase/ui@latest/dist/baseui.esm.js`) if jsDelivr is unreachable in your environment. See [
|
|
42
|
+
[unpkg](https://unpkg.com/@thebase/ui@latest/) mirrors the same files as an alternative CDN — swap any `cdn.jsdelivr.net/npm` URL above for `unpkg.com` (e.g. `https://unpkg.com/@thebase/ui@latest/dist/baseui.esm.js`) if jsDelivr is unreachable in your environment. See [Base Components](docs/owl-components.md) for the full API, npm/bundler usage, and mixing with the static adapter.
|
|
43
43
|
|
|
44
|
-
If you have no
|
|
44
|
+
If you have no application, use the base static markup (`b-ui`) adapter instead — one stylesheet and one script tag, no import map:
|
|
45
45
|
|
|
46
46
|
```html
|
|
47
47
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@thebase/ui@latest/dist/baseui.min.css">
|
|
48
48
|
<script src="https://cdn.jsdelivr.net/npm/@thebase/ui@latest/dist/baseui.min.js" defer></script>
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
`dist/baseui.min.js`/`baseui.esm.js` are fully self-contained and back both APIs above: Bootstrap's JS bundle, the Owl runtime, every
|
|
51
|
+
`dist/baseui.min.js`/`baseui.esm.js` are fully self-contained and back both APIs above: Bootstrap's JS bundle, the Owl runtime, every Base component class, and the theme helper are all embedded in load order (Bootstrap, then Owl, then the Base UI) — one file, nothing else to load first. There is no separate `baseui.owl.*`/`baseui.components.esm.js`/`baseui.theme.esm.js`. (`dist/bootstrap.bundle.min.js` still ships standalone, unmodified, for a project that wants vendored Bootstrap JS on its own — the Base UI itself never needs it loaded separately.)
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
The Base UI exposes every component (74 in the current registry) as a real Owl component class — see [Base Components](docs/owl-components.md) for the complete API, npm/bundler usage, and mixing with the static adapter.
|
|
54
54
|
|
|
55
55
|
For app-level theme controls, import `createThemeController`/`BaseUITheme` as `@base/theme` in browser import maps (pointing at the same `dist/baseui.esm.js`) or straight from `@thebase/ui` in npm/bundler apps, to create persisted light/dark toggles like the documentation pages use.
|
|
56
56
|
|
|
57
|
-
Every component ships both APIs from `src/components/<name>/`: the static `b-ui` adapter (`<name>.js`, using `b-att-*` attributes and `baseui:*` events) and a
|
|
57
|
+
Every component ships both APIs from `src/components/<name>/`: the static `b-ui` adapter (`<name>.js`, using `b-att-*` attributes and `baseui:*` events) and a Base component class (`<name>.component.js`, exported from `@thebase/ui/components`). A few components' pure Base treatment is intentionally lighter or reshaped versus their static markup-driven adapter — most notably `chart` (a slotted container; static Chart.js bootstrapping stays a `b-ui`-only concern) and the data-driven `data-table`/`combobox`/`command`/`calendar` (props-driven instead of slot/markup-driven). See each component's doc page under `docs/components/` for specifics.
|
|
58
58
|
|
|
59
59
|
## Analytics
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
The Base UI also ships an optional, cookieless web-analytics service (from 1.1.0). It is a standalone bundle — not part of `dist/baseui.min.js`/`baseui.esm.js`, with no Owl, Bootstrap, or component runtime dependency (~5.6 KB minified) — so you can load it with or without the rest of the Base UI. Nothing is collected until the page calls `init()`:
|
|
62
62
|
|
|
63
63
|
```html
|
|
64
64
|
<script type="module">
|
|
@@ -68,11 +68,11 @@ BaseUI also ships an optional, cookieless web-analytics service (from 1.1.0). It
|
|
|
68
68
|
</script>
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
From npm, use `import { init, track } from "@thebase/ui/analytics"`; for a classic `<script>` tag, `dist/baseui.analytics.min.js` sets `window.thebase.analytics`. It covers automatic and SPA pageviews, engagement (time on page and scroll depth), outbound links, file downloads, form submissions, and `thebase-event-*` class tagging. See [Analytics](docs/analytics.md) for every option, the payload format, opt-out, and sample Go Fiber / FastAPI backends. [`examples/analytics/`](examples/analytics/) holds a ready-to-run
|
|
71
|
+
From npm, use `import { init, track } from "@thebase/ui/analytics"`; for a classic `<script>` tag, `dist/baseui.analytics.min.js` sets `window.thebase.analytics`. It covers automatic and SPA pageviews, engagement (time on page and scroll depth), outbound links, file downloads, form submissions, and `thebase-event-*` class tagging. See [Analytics](docs/analytics.md) for every option, the payload format, opt-out, and sample Go Fiber / FastAPI backends. [`examples/analytics/`](examples/analytics/) holds a ready-to-run the Base UI dashboard for the collected data.
|
|
72
72
|
|
|
73
73
|
## PWA toolkit and CLI
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
The Base UI can scaffold and ship installable apps (from 1.1.2). The `create-baseui-app` CLI creates a static-importmap or Vite project (`create`, `init`, `convert`) and generates `manifest.webmanifest`, `sw.js` and a default icon set (`pwa`, icons from 1.1.3); the same generators are exported from `@thebase/ui/pwa` as `buildManifest` / `buildServiceWorker`.
|
|
76
76
|
|
|
77
77
|
```sh
|
|
78
78
|
npx create-baseui-app create my-app
|
|
@@ -81,22 +81,26 @@ npx create-baseui-app pwa . --config baseui.pwa.config.js
|
|
|
81
81
|
|
|
82
82
|
See [Usage Guide §5b](docs/usage-guide.md) and the [PWA component](docs/components/pwa.md). The examples site itself is an installable PWA (`examples/pwa/`).
|
|
83
83
|
|
|
84
|
+
## Outlined fields
|
|
85
|
+
|
|
86
|
+
New in 1.1.5: `Input`, `Textarea`, `NativeSelect`, `Combobox`, `DatePicker`, `Select` and `InputGroup` 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
|
+
|
|
84
88
|
## ApiDoc
|
|
85
89
|
|
|
86
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/).
|
|
87
91
|
|
|
88
92
|
## Release notes
|
|
89
93
|
|
|
90
|
-
See [CHANGELOG.md](CHANGELOG.md) for the full version history. Current version: **1.1.
|
|
94
|
+
See [CHANGELOG.md](CHANGELOG.md) for the full version history. Current version: **1.1.5**.
|
|
91
95
|
|
|
92
96
|
## Versioning policy
|
|
93
97
|
|
|
94
|
-
From 1.0.0 on,
|
|
98
|
+
From 1.0.0 on, the Base UI follows [Semantic Versioning](https://semver.org/). The public API covered by this promise is:
|
|
95
99
|
|
|
96
|
-
-
|
|
100
|
+
- Base component classes, their names, props, slots, and callback props exported from `@thebase/ui`.
|
|
97
101
|
- Static markup: `b-ui`/`b-icon` names, `b-att-*` attributes, and `baseui:*` events.
|
|
98
102
|
- CSS: `bu-*` class names and `--b-*` design tokens.
|
|
99
|
-
- Runtime exports (`BaseUI`, `Component`, `mount`, `xml`, `cn`, `mergeStyle`, theme helpers), including `Component`'s fallback to globally registered
|
|
103
|
+
- 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.
|
|
100
104
|
|
|
101
105
|
What each release type means:
|
|
102
106
|
|
|
@@ -106,13 +110,13 @@ What each release type means:
|
|
|
106
110
|
|
|
107
111
|
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.
|
|
108
112
|
|
|
109
|
-
Pinning: use an exact version (`@1.1.
|
|
113
|
+
Pinning: use an exact version (`@1.1.5`) 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.
|
|
110
114
|
|
|
111
115
|
## Project Documents
|
|
112
116
|
|
|
113
117
|
Use these documents as the canonical project map:
|
|
114
118
|
|
|
115
|
-
- [Usage Guide](docs/usage-guide.md) is the single entry point for integrating
|
|
119
|
+
- [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.
|
|
116
120
|
- [Installation](docs/installation.md) covers CDN, npm, self-hosted usage, icon assets, pinned versions, and release guardrails.
|
|
117
121
|
- [Analytics](docs/analytics.md) documents the optional, standalone cookieless analytics service (`@thebase/ui/analytics`).
|
|
118
122
|
- [Runtime API](docs/runtime-api.md) documents the `window.thebase` global, mounting lifecycle, theming API, and destroy behavior.
|
|
@@ -120,10 +124,10 @@ Use these documents as the canonical project map:
|
|
|
120
124
|
- [Theming](docs/theming.md) describes `b-theme`, runtime theme overrides, shadcn-aligned tokens, Bootstrap variable mapping, and shared example theme persistence.
|
|
121
125
|
- [Built-in Icons](docs/icons.md) covers the Lucide icon library, `b-icon` markup, accessibility rules, self-hosted icon paths, and JavaScript helpers.
|
|
122
126
|
- [Component Authoring](docs/component-authoring.md) defines the `src/components/<name>/` source contract, component registration rules, event naming, cleanup requirements, and CSS scoping policy. Repo-only — not published to npm (see below).
|
|
123
|
-
- [
|
|
127
|
+
- [Base Components](docs/owl-components.md) covers the Base component API (`@thebase/ui` + `dist/baseui.templates.xml`), what to load, and common mistakes.
|
|
124
128
|
- [Blocks](docs/blocks.md) documents copyable static shadcn-style blocks, source stylesheet ownership under `examples/blocks/`, gallery/viewer URLs, and block icon rules.
|
|
125
129
|
- [Component Reference](docs/components/button.md) starts the per-component documentation set in `docs/components/`; each component page includes usage, attributes, events, accessibility notes, and test guidance where relevant.
|
|
126
|
-
- [Frontend Implementation Plan](.agents/planning/2026-08-11-frontend-baseui-bootstrap-owl-implementation-plan.md) records the completed
|
|
130
|
+
- [Frontend Implementation Plan](.agents/planning/2026-08-11-frontend-baseui-bootstrap-owl-implementation-plan.md) records the completed the Base UI 1.0.0 delivery checklist and earlier decisions for engineering context.
|
|
127
131
|
- [Historical Product Plan](.agents/knowledge/baseUI/2026-08-11-baseui-bootstrap-owl-plan.md) preserves the original Bootstrap 5 + Owl product brief; use current `docs/` and registry files when they disagree with older planning assumptions.
|
|
128
132
|
|
|
129
133
|
The links above work as-is when browsing this repo. `docs/*.md` and `docs/components/` also ship inside the published npm package (see `files` in `package.json`), so the same docs are reachable straight from a CDN without cloning the repo — no HTML rendering, just the raw Markdown source:
|
|
@@ -134,7 +138,7 @@ https://unpkg.com/@thebase/ui@latest/docs/components/button.md
|
|
|
134
138
|
https://cdn.jsdelivr.net/npm/@thebase/ui@latest/docs/usage-guide.md
|
|
135
139
|
```
|
|
136
140
|
|
|
137
|
-
Drop the version (`@thebase/ui/docs/...`) to always resolve to latest, or pin a version the way the rest of this README recommends pinning `dist/` assets. `docs/v2/` (the vendored general Owl framework reference) and `docs/component-authoring.md` (
|
|
141
|
+
Drop the version (`@thebase/ui/docs/...`) to always resolve to latest, or pin a version the way the rest of this README recommends pinning `dist/` assets. `docs/v2/` (the vendored general Owl framework reference) and `docs/component-authoring.md` (the Base UI's own component-authoring contract) are intentionally **not** published — they're development-time references for working inside this repo, not something a consumer needs to use the library.
|
|
138
142
|
|
|
139
143
|
## Development
|
|
140
144
|
|
|
@@ -146,9 +150,9 @@ npm run dev
|
|
|
146
150
|
|
|
147
151
|
Open `examples/index.html` through the dev server to test the browser build. Standalone demos: `examples/apidoc/` (ApiDoc with a Petstore spec), `examples/analytics/` (dashboard + Go/FastAPI backends), and `momo_demo/` (static `b-ui` business-admin page).
|
|
148
152
|
|
|
149
|
-
`examples/index.html` is the single
|
|
153
|
+
`examples/index.html` is the single application shell for docs, the component gallery, the block gallery, icons, and the chart catalog, all reachable through one `main-nav` and hash routes (`#/docs`, `#/components`, `#/blocks`, `#/icons`, `#/chart`). Old bookmarked URLs like `/docs` and `/blocks` redirect to their hash-route equivalent. Each block has a shadcn-style Preview/Code/responsive viewer plus its source stylesheet colocated in `examples/blocks/`. `examples/charts/index.html` mirrors the current shadcn chart catalog with interactive the Base UI examples for area, bar, line, pie, radar, radial, and tooltip charts, and is embedded inline at `#/chart`.
|
|
150
154
|
|
|
151
|
-
|
|
155
|
+
The Base UI includes the full Lucide SVG icon set as a built-in icon library. Use `<span b-icon="search"></span>` in HTML, or `thebase.icons.lucide.url("search")` from JavaScript. Builds publish all SVGs to `dist/icons/lucide/` and an index at `dist/icons/lucide.json`.
|
|
152
156
|
|
|
153
157
|
## Package Scripts
|
|
154
158
|
|
|
@@ -160,6 +164,6 @@ BaseUI includes the full Lucide SVG icon set as a built-in icon library. Use `<s
|
|
|
160
164
|
|
|
161
165
|
## Distribution
|
|
162
166
|
|
|
163
|
-
The npm package publishes the built `dist/` artifacts plus package metadata. The browser build bundles Bootstrap CSS, and `dist/baseui.min.js`/`baseui.esm.js` embed Bootstrap's JS bundle, the Owl runtime, every
|
|
167
|
+
The npm package publishes the built `dist/` artifacts plus package metadata. The browser build bundles Bootstrap CSS, and `dist/baseui.min.js`/`baseui.esm.js` embed Bootstrap's JS bundle, the Owl runtime, every Base component class, and the theme helper directly (Bootstrap then Owl then the Base UI, in that load order) — consumers install the Base UI with one stylesheet and one script tag for either API. Bootstrap's JS drives every component that has a Bootstrap JS equivalent (modal, dropdown, collapse, tab, toast, carousel, tooltip, popover, alert); the Base UI's `.behavior.js`/`runtime/*.js` helpers wrap Bootstrap's JS API instead of reimplementing it, for both the static and pure Base APIs. `dist/bootstrap.bundle.min.js` also ships standalone (unmodified) and `dist/baseui.icons.esm.js` stays a separate, deliberate exception (2000+ generated icon components would blow the main bundle's size budget), as do the ApiDoc language logos (`dist/apidoc/img/`, loaded on demand) and the opt-in analytics service (`dist/baseui.analytics.esm.js`/`.min.js`, so pages that don't track pay nothing for it) — everything else is one file. Every shipped CSS/JS artifact is minified — there are no unminified twins to keep in sync.
|
|
164
168
|
|
|
165
169
|
The published tarball also carries `docs/*.md` and `docs/components/` (see the "Project Documents" section above), `README.md`, `CHANGELOG.md`, and `LICENSE` — `docs/v2/` and `docs/component-authoring.md` are deliberately excluded from `package.json`'s `files` list since they're development-time-only references for working inside this repo.
|
|
@@ -26,7 +26,7 @@ function toTitle(appName) {
|
|
|
26
26
|
.join(" ");
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
/** Builds the fixed set of Vite +
|
|
29
|
+
/** Builds the fixed set of Vite + the Base UI scaffold files for a project named `appName`. */
|
|
30
30
|
function buildTemplateFiles(appName, baseuiVersion) {
|
|
31
31
|
const title = toTitle(appName);
|
|
32
32
|
|
|
@@ -136,7 +136,7 @@ export class App extends Component {
|
|
|
136
136
|
|
|
137
137
|
"README.md": `# ${title}
|
|
138
138
|
|
|
139
|
-
Scaffolded with \`@thebase/ui\`'s CLI (Vite + BaseUI, pure
|
|
139
|
+
Scaffolded with \`@thebase/ui\`'s CLI (Vite + BaseUI, pure Base API).
|
|
140
140
|
|
|
141
141
|
\`\`\`sh
|
|
142
142
|
npm install
|
|
@@ -176,7 +176,7 @@ await mountPage(${componentName}, pageTemplates);
|
|
|
176
176
|
`;
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
/** Builds a 4-page Vite +
|
|
179
|
+
/** Builds a 4-page Vite + the Base UI starter (landing, login, signup, an authenticated home shell) for a
|
|
180
180
|
* project named `appName` — each page is its own Owl root mounted by its own HTML entry, composed
|
|
181
181
|
* from the same blocks as `examples/blocks/login-03.html`, `signup-03.html` and `sidebar-02.html`. */
|
|
182
182
|
function buildStarterFiles(appName, baseuiVersion) {
|
|
@@ -280,7 +280,7 @@ export class Landing extends Component {
|
|
|
280
280
|
<section class="container py-5 text-center">
|
|
281
281
|
<h1 class="display-5 fw-bold mb-3">Build faster with ${title}</h1>
|
|
282
282
|
<p class="lead text-muted mx-auto mb-4" style="max-width: 40rem">
|
|
283
|
-
A starter scaffold wired up with BaseUI —
|
|
283
|
+
A starter scaffold wired up with BaseUI — Base components, Bootstrap styling, and the pages you need to ship day one.
|
|
284
284
|
</p>
|
|
285
285
|
<div class="d-flex justify-content-center gap-3">
|
|
286
286
|
<Button icon="'rocket'" onClick="() => window.location.assign('/signup.html')">Get started</Button>
|
|
@@ -304,7 +304,7 @@ export class Landing extends Component {
|
|
|
304
304
|
</div>
|
|
305
305
|
<div class="col-12 col-md-4">
|
|
306
306
|
<Card className="'h-100'">
|
|
307
|
-
<CardHeader className="'d-flex align-items-center gap-2'"><Icon name="'component'"/><CardTitle>
|
|
307
|
+
<CardHeader className="'d-flex align-items-center gap-2'"><Icon name="'component'"/><CardTitle>Base components</CardTitle></CardHeader>
|
|
308
308
|
<CardBody>Every page composes real BaseUI components — swap or extend without fighting the markup.</CardBody>
|
|
309
309
|
</Card>
|
|
310
310
|
</div>
|
|
@@ -497,7 +497,7 @@ export class Home extends Component {
|
|
|
497
497
|
|
|
498
498
|
"README.md": `# ${title}
|
|
499
499
|
|
|
500
|
-
Scaffolded with \`@thebase/ui\`'s CLI (\`create-baseui-app init\`): Vite + BaseUI, pure
|
|
500
|
+
Scaffolded with \`@thebase/ui\`'s CLI (\`create-baseui-app init\`): Vite + BaseUI, pure Base API, 4 pages.
|
|
501
501
|
|
|
502
502
|
- \`/\` — landing page (header, hero, features, footer)
|
|
503
503
|
- \`/login.html\` — login (redirects to \`/home.html\` on submit)
|
|
@@ -685,7 +685,7 @@ async function cmdPwa(argv) {
|
|
|
685
685
|
console.log(`Wrote manifest.webmanifest and sw.js in ${targetDir}`);
|
|
686
686
|
}
|
|
687
687
|
|
|
688
|
-
/** Gives a PWA the default
|
|
688
|
+
/** Gives a PWA the default the Base UI logo/favicon set, without replacing any icon the app already has. */
|
|
689
689
|
function copyDefaultIcons(iconsDir, files) {
|
|
690
690
|
mkdirSync(iconsDir, { recursive: true });
|
|
691
691
|
const source = new URL("../dist/pwa-icons/", import.meta.url);
|