@thebase/ui 0.0.10 → 0.0.12
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 +20 -0
- package/README.md +3 -3
- package/dist/baseui.esm.js +24 -24
- package/dist/baseui.icons.esm.js +1 -1
- package/dist/baseui.min.css +1 -1
- package/dist/baseui.min.js +24 -24
- package/dist/baseui.registry.json +10 -9
- package/dist/baseui.templates.xml +460 -478
- 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 +1 -1
- package/dist/themes/baseui-light.css +1 -1
- package/docs/components/accordion.md +4 -4
- package/docs/components/avatar.md +1 -1
- package/docs/components/block-viewer.md +1 -1
- package/docs/components/breadcrumb.md +1 -1
- package/docs/components/calendar.md +1 -1
- package/docs/components/carousel.md +1 -1
- package/docs/components/chart.md +3 -3
- package/docs/components/combobox.md +1 -1
- package/docs/components/command.md +1 -1
- package/docs/components/context-menu.md +1 -1
- package/docs/components/data-table.md +3 -3
- package/docs/components/date-picker.md +1 -1
- package/docs/components/dialog.md +5 -5
- package/docs/components/form.md +29 -29
- package/docs/components/input-otp.md +1 -1
- package/docs/components/input.md +1 -1
- package/docs/components/markdown.md +1 -1
- package/docs/components/message-scroller.md +1 -1
- package/docs/components/message.md +1 -1
- package/docs/components/popover.md +1 -1
- package/docs/components/pwa.md +1 -1
- package/docs/components/questionnaire.md +1 -1
- package/docs/components/resizable.md +1 -1
- package/docs/components/scroll-area.md +1 -1
- package/docs/components/shell.md +2 -2
- package/docs/components/sidebar.md +15 -15
- package/docs/components/tabs.md +34 -1
- package/docs/components/text-editor.md +1 -1
- package/docs/components/theme-button.md +2 -2
- package/docs/components/toast.md +37 -7
- package/docs/components/toggle-group.md +1 -1
- package/docs/components/toggle.md +1 -1
- package/docs/components/tooltip.md +1 -1
- package/docs/runtime-api.md +26 -0
- package/docs/theming.md +3 -3
- package/package.json +1 -1
|
@@ -237,16 +237,16 @@ See [Pure Owl Components](/examples/blocks.html#/docs/guide/owl-components) for
|
|
|
237
237
|
## Static component
|
|
238
238
|
|
|
239
239
|
```base-ui
|
|
240
|
-
<div class="
|
|
240
|
+
<div class="bu-sidebar-demo-frame">
|
|
241
241
|
<aside b-ui="sidebar" b-att-state="open">
|
|
242
242
|
<div b-sidebar-header>
|
|
243
|
-
<a href="#" class="
|
|
244
|
-
<span class="
|
|
245
|
-
<span class="
|
|
246
|
-
<span class="
|
|
247
|
-
<span class="
|
|
243
|
+
<a href="#" class="bu-sidebar-demo-brand">
|
|
244
|
+
<span class="bu-sidebar-demo-brand-mark"><span b-icon="gallery-vertical-end"></span></span>
|
|
245
|
+
<span class="bu-sidebar-demo-meta">
|
|
246
|
+
<span class="bu-sidebar-demo-title">Acme Inc</span>
|
|
247
|
+
<span class="bu-sidebar-demo-email">Enterprise</span>
|
|
248
248
|
</span>
|
|
249
|
-
<span class="
|
|
249
|
+
<span class="bu-sidebar-demo-chevrons" b-icon="chevrons-up-down"></span>
|
|
250
250
|
</a>
|
|
251
251
|
</div>
|
|
252
252
|
|
|
@@ -285,18 +285,18 @@ See [Pure Owl Components](/examples/blocks.html#/docs/guide/owl-components) for
|
|
|
285
285
|
</div>
|
|
286
286
|
|
|
287
287
|
<div b-sidebar-footer>
|
|
288
|
-
<a href="#" class="
|
|
289
|
-
<span b-ui="avatar" class="
|
|
290
|
-
<span class="
|
|
291
|
-
<span class="
|
|
292
|
-
<span class="
|
|
288
|
+
<a href="#" class="bu-sidebar-demo-user">
|
|
289
|
+
<span b-ui="avatar" class="bu-sidebar-demo-avatar">SC</span>
|
|
290
|
+
<span class="bu-sidebar-demo-meta">
|
|
291
|
+
<span class="bu-sidebar-demo-title">shadcn</span>
|
|
292
|
+
<span class="bu-sidebar-demo-email">m@example.com</span>
|
|
293
293
|
</span>
|
|
294
|
-
<span class="
|
|
294
|
+
<span class="bu-sidebar-demo-chevrons" b-icon="chevrons-up-down"></span>
|
|
295
295
|
</a>
|
|
296
296
|
</div>
|
|
297
297
|
</aside>
|
|
298
|
-
<main class="
|
|
299
|
-
<button class="
|
|
298
|
+
<main class="bu-sidebar-demo-main">
|
|
299
|
+
<button class="bu-sidebar-trigger" type="button" aria-label="Toggle Sidebar">
|
|
300
300
|
<span b-icon="panel-left"></span>
|
|
301
301
|
</button>
|
|
302
302
|
</main>
|
package/docs/components/tabs.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Tabs
|
|
2
2
|
|
|
3
|
+
Matches [shadcn/base's Tabs](https://ui.shadcn.com/docs/components/base/tabs): `TabsList` renders
|
|
4
|
+
as a segmented pill control on a muted background by default, or a transparent underline list via
|
|
5
|
+
`variant="'line'"`. `TabContent`/`b-panel` render as bare panels with no default border or
|
|
6
|
+
background — a bordered/padded look is opt-in via `className` on `TabsContainer` (or the
|
|
7
|
+
consumer's own wrapper), not baked into every panel.
|
|
8
|
+
|
|
3
9
|
## Pure Owl component
|
|
4
10
|
|
|
5
11
|
```js
|
|
@@ -21,16 +27,38 @@ import { Tabs, TabContent, TabsContainer, TabsList, TabTrigger } from "@thebase/
|
|
|
21
27
|
</div>
|
|
22
28
|
```
|
|
23
29
|
|
|
30
|
+
The `"line"` variant swaps the segmented pill for a transparent, underline-driven list:
|
|
31
|
+
|
|
32
|
+
```base-ui
|
|
33
|
+
<div style="max-width: 25rem" class="w-100">
|
|
34
|
+
<Tabs defaultValue="'overview'">
|
|
35
|
+
<TabsList variant="'line'">
|
|
36
|
+
<TabTrigger value="'overview'">Overview</TabTrigger>
|
|
37
|
+
<TabTrigger value="'analytics'">Analytics</TabTrigger>
|
|
38
|
+
</TabsList>
|
|
39
|
+
<TabsContainer>
|
|
40
|
+
<TabContent value="'overview'">View your dashboard metrics.</TabContent>
|
|
41
|
+
<TabContent value="'analytics'">Detailed analytics and insights.</TabContent>
|
|
42
|
+
</TabsContainer>
|
|
43
|
+
</Tabs>
|
|
44
|
+
</div>
|
|
45
|
+
```
|
|
46
|
+
|
|
24
47
|
| Component | Prop | Type | Notes |
|
|
25
48
|
| --- | --- | --- | --- |
|
|
26
49
|
| `Tabs` | `value` | `String` | controlled active value |
|
|
27
50
|
| `Tabs` | `defaultValue` | `String` | initial value when uncontrolled |
|
|
51
|
+
| `Tabs` | `orientation` | `String` | `"horizontal"` (default) or `"vertical"` — puts `TabsList` beside `TabsContainer` instead of above it |
|
|
28
52
|
| `Tabs` | `onChange` | `Function` | called with the newly selected value |
|
|
53
|
+
| `TabsList` | `variant` | `String` | `"default"` (segmented pill, muted background) or `"line"` (transparent, underline indicator) |
|
|
29
54
|
| `TabTrigger` | `value` | `String` | required, matches a `TabContent value` |
|
|
30
55
|
| `TabTrigger` | `disabled` | `Boolean` | |
|
|
31
56
|
| `TabContent` | `value` | `String` | required |
|
|
32
57
|
|
|
33
|
-
ArrowLeft/ArrowRight move focus and selection between
|
|
58
|
+
ArrowLeft/ArrowRight (or ArrowUp/ArrowDown when vertical) move focus and selection between
|
|
59
|
+
`TabTrigger`s, same as the static API — each trigger's own live `bootstrap.Tab` instance handles
|
|
60
|
+
this natively. See [Pure Owl Components](/examples/blocks.html#/docs/guide/owl-components) for how
|
|
61
|
+
to load `@base/owl` and `dist/baseui.templates.xml`.
|
|
34
62
|
|
|
35
63
|
Each `TabTrigger` (`b-tab` button / pure Owl `TabTrigger`'s own root) is driven by a live `bootstrap.Tab` instance: it always carries `role="tab"` plus a `data-bs-target="#<id>"` pointing at its linked pane, and Bootstrap itself manages the pane's `tab-pane fade`/`show`/`active` classes and the trigger's `active`/`aria-selected`/`tabindex` across switches — don't rely on node removal to detect the active panel; every `TabContent`/`b-panel` stays mounted permanently (`role="tabpanel"`, `tab-pane fade` + `show active` on the initially active one).
|
|
36
64
|
|
|
@@ -45,6 +73,11 @@ Each `TabTrigger` (`b-tab` button / pure Owl `TabTrigger`'s own root) is driven
|
|
|
45
73
|
</div>
|
|
46
74
|
```
|
|
47
75
|
|
|
76
|
+
Add `b-att-variant="line"` on the `[b-ui="tabs"]` host for the transparent underline look instead
|
|
77
|
+
of the default segmented pill. `orientation` is a pure-Owl-only prop — the static markup lays
|
|
78
|
+
`[b-tab]`/`[b-panel]` flat as siblings with no `TabsList`/`TabsContainer`-equivalent grouping
|
|
79
|
+
wrapper to flip into a row/column pair.
|
|
80
|
+
|
|
48
81
|
Events: `baseui:change` with `{ value }`.
|
|
49
82
|
|
|
50
83
|
Keyboard: Left and Right arrows move between tabs.
|
|
@@ -86,7 +86,7 @@ Or the same session hosted on an external websocket backend instead of peer-to-p
|
|
|
86
86
|
- `b-att-placeholder` / `placeholder` — empty-editor hint text.
|
|
87
87
|
- `b-att-collaborative` / `collaborative` — set to `"true"` to connect through Yjs; off by default.
|
|
88
88
|
- `b-att-provider` / `provider` — collaboration transport: `"webrtc"` (default, peer-to-peer) or `"websocket"` (connects to an external y-websocket-compatible backend).
|
|
89
|
-
- `b-att-room` / `room` — document/room name for collaborative sessions (defaults to `
|
|
89
|
+
- `b-att-room` / `room` — document/room name for collaborative sessions (defaults to `bu-text-editor`); shared across peers for y-webrtc, or used as the document name on the y-websocket backend.
|
|
90
90
|
- `b-att-url` / `url` — y-websocket server URL (e.g. `wss://your-backend.example.com/mkdn`), required when `provider` is `"websocket"`. Ignored for `"webrtc"`.
|
|
91
91
|
- `b-att-password` / `password` — optional y-webrtc room password. Ignored for `"websocket"`.
|
|
92
92
|
- `b-att-signaling` / `signaling` — comma-separated signaling URLs for the static API, or an array prop for Owl. y-webrtc only.
|
|
@@ -13,7 +13,7 @@ import { ThemeButton } from "@thebase/ui";
|
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
```base-ui
|
|
16
|
-
<ThemeButton variant="'outline'" storageKey="'
|
|
16
|
+
<ThemeButton variant="'outline'" storageKey="'bu-theme'"/>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
| Component | Prop | Type | Notes |
|
|
@@ -50,7 +50,7 @@ Theme changes dispatch `baseui:theme-change` on `document` with `{ theme }` in `
|
|
|
50
50
|
|
|
51
51
|
## CSS variables
|
|
52
52
|
|
|
53
|
-
The component inherits Button and Icon tokens, including `--
|
|
53
|
+
The component inherits Button and Icon tokens, including `--b-radius-lg`, `--b-primary`, `--b-border`, and `--b-icon-size`.
|
|
54
54
|
|
|
55
55
|
## Accessibility behavior
|
|
56
56
|
|
package/docs/components/toast.md
CHANGED
|
@@ -16,28 +16,37 @@ import { Toast } from "@thebase/ui";
|
|
|
16
16
|
<span class="fw-medium">Event created</span>
|
|
17
17
|
<span class="text-body-secondary small">Sunday, December 3 at 9:00 AM</span>
|
|
18
18
|
</div>
|
|
19
|
+
<t t-set-slot="action">
|
|
20
|
+
<Button variant="'outline'" size="'sm'" onClick="() => state.open = false">Undo</Button>
|
|
21
|
+
</t>
|
|
19
22
|
</Toast>
|
|
20
23
|
</div>
|
|
21
24
|
```
|
|
22
25
|
|
|
23
|
-
The toast stays hidden until `open`/`state` becomes truthy (never shows on mount) and auto-hides after `delay` ms once shown.
|
|
26
|
+
The toast stays hidden until `open`/`state` becomes truthy (never shows on mount) and auto-hides after `delay` ms once shown. The default slot (title/description) sits on the leading edge and grows to fill the available width; the optional `action` slot renders grouped tight against the close button on the trailing edge.
|
|
24
27
|
|
|
25
28
|
| Component | Prop | Type | Notes |
|
|
26
29
|
| --- | --- | --- | --- |
|
|
27
30
|
| `Toast` | `open` | `Boolean` | optional, default `false` — never shown until set to `true` |
|
|
28
31
|
| `Toast` | `variant` | `String` | optional |
|
|
29
32
|
| `Toast` | `delay` | `Number` | optional, default `3000` — auto-hides after this many ms; pass `0` to disable auto-hide |
|
|
33
|
+
| `Toast` | `position` | `String` | optional — `"top-left"`, `"top-right"`, `"bottom-left"`, or `"bottom-right"`; fixes the toast to that screen corner. Omit to render inline where placed |
|
|
30
34
|
| `Toast` | `className` | `String` | optional |
|
|
31
35
|
| `Toast` | `onOpenChange` | `Function` | optional |
|
|
36
|
+
| `Toast` | `action` slot | — | optional — e.g. a `<Button/>`, rendered grouped next to the close button (`<t t-set-slot="action">...</t>`) |
|
|
32
37
|
|
|
33
38
|
See [Pure Owl Components](/examples/blocks.html#/docs/guide/owl-components) for how to load `@base/owl` and `dist/baseui.templates.xml`.
|
|
34
39
|
|
|
35
40
|
## Static component
|
|
36
41
|
|
|
42
|
+
The toast root is a flex row: wrap message content in `.bu-toast-content` (grows to fill the width) and any action button plus the close button in `.bu-toast-actions` (grouped tight on the trailing edge).
|
|
43
|
+
|
|
37
44
|
```base-ui
|
|
38
45
|
<div b-ui="toast">
|
|
39
|
-
<
|
|
40
|
-
|
|
46
|
+
<div class="bu-toast-content">Saved successfully.</div>
|
|
47
|
+
<div class="bu-toast-actions">
|
|
48
|
+
<button b-toast-close type="button">Close</button>
|
|
49
|
+
</div>
|
|
41
50
|
</div>
|
|
42
51
|
```
|
|
43
52
|
|
|
@@ -45,14 +54,35 @@ The toast stays hidden until shown — omit `b-att-state="open"` and call `.show
|
|
|
45
54
|
|
|
46
55
|
```base-ui
|
|
47
56
|
<div class="d-flex flex-column align-items-center gap-3">
|
|
48
|
-
<button type="button" class="btn
|
|
57
|
+
<button type="button" class="btn bu-button btn-outline-secondary" onclick="document.getElementById('demo-toast').BaseUIToast.show()">Show Toast</button>
|
|
49
58
|
<div id="demo-toast" b-ui="toast" b-att-delay="3000">
|
|
50
|
-
<
|
|
51
|
-
|
|
59
|
+
<div class="bu-toast-content">
|
|
60
|
+
<div class="fw-medium">Event created</div>
|
|
61
|
+
<div class="text-body-secondary small">Sunday, December 3 at 9:00 AM</div>
|
|
62
|
+
</div>
|
|
63
|
+
<div class="bu-toast-actions">
|
|
64
|
+
<button type="button" class="btn bu-button btn-outline-secondary btn-sm">Undo</button>
|
|
65
|
+
<button b-toast-close type="button">Close</button>
|
|
66
|
+
</div>
|
|
52
67
|
</div>
|
|
53
68
|
</div>
|
|
54
69
|
```
|
|
55
70
|
|
|
56
71
|
Programmatic API: after mount, call `element.BaseUIToast.show()` or `element.BaseUIToast.hide()`. Events: `baseui:open`, `baseui:close`.
|
|
57
72
|
|
|
58
|
-
Toasts are backed by `bootstrap.Toast`: the root receives Bootstrap's `toast fade` classes, and visibility is driven by Bootstrap's own `show`/`showing` classes (not `hidden`). The close button(s) carry `data-bs-dismiss="toast"` in addition to the `b-toast-close`/`
|
|
73
|
+
Toasts are backed by `bootstrap.Toast`: the root receives Bootstrap's `toast fade` classes, and visibility is driven by Bootstrap's own `show`/`showing` classes (not `hidden`). The close button(s) carry `data-bs-dismiss="toast"` in addition to the `b-toast-close`/`bu-toast-close` selector, so Bootstrap's own delegated dismiss handler drives them.
|
|
74
|
+
|
|
75
|
+
### Screen-corner placement
|
|
76
|
+
|
|
77
|
+
Set `b-att-position` to `top-left`, `top-right`, `bottom-left`, or `bottom-right` to fix the toast to that corner of the viewport. The toast element itself gets the Bootstrap `toast-container position-fixed p-3 pe-auto` classes plus the matching edge utility classes (`top-0`/`bottom-0` + `start-0`/`end-0`) merged in — no wrapper element. Omit the attribute to leave the toast inline in the document flow (the previous, default behavior):
|
|
78
|
+
|
|
79
|
+
```base-ui
|
|
80
|
+
<div id="corner-toast" b-ui="toast" b-att-position="bottom-right" b-att-delay="3000">
|
|
81
|
+
<div class="bu-toast-content">Saved successfully.</div>
|
|
82
|
+
<div class="bu-toast-actions">
|
|
83
|
+
<button b-toast-close type="button">Close</button>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
The pure Owl `Toast` component takes the same values via its `position` prop.
|
|
@@ -62,7 +62,7 @@ Interactive components emit documented `baseui:*` events from their root element
|
|
|
62
62
|
|
|
63
63
|
## CSS variables
|
|
64
64
|
|
|
65
|
-
The component inherits BaseUI semantic tokens such as `--
|
|
65
|
+
The component inherits BaseUI semantic tokens such as `--b-surface`, `--b-border`, `--b-primary`, and `--b-radius`.
|
|
66
66
|
|
|
67
67
|
## Accessibility behavior
|
|
68
68
|
|
|
@@ -63,7 +63,7 @@ Interactive components emit documented `baseui:*` events from their root element
|
|
|
63
63
|
|
|
64
64
|
## CSS variables
|
|
65
65
|
|
|
66
|
-
The component inherits BaseUI semantic tokens such as `--
|
|
66
|
+
The component inherits BaseUI semantic tokens such as `--b-surface`, `--b-border`, `--b-primary`, and `--b-radius`.
|
|
67
67
|
|
|
68
68
|
## Accessibility behavior
|
|
69
69
|
|
|
@@ -58,7 +58,7 @@ Interactive components emit documented `baseui:*` events from their root element
|
|
|
58
58
|
|
|
59
59
|
## CSS variables
|
|
60
60
|
|
|
61
|
-
The component inherits BaseUI semantic tokens such as `--
|
|
61
|
+
The component inherits BaseUI semantic tokens such as `--b-surface`, `--b-border`, `--b-primary`, and `--b-radius`. The popup itself is styled by Bootstrap's own bundled `.tooltip`/`.tooltip-arrow`/`.tooltip-inner` CSS (loaded via `dist/baseui.min.css`), not BaseUI's own classes.
|
|
62
62
|
|
|
63
63
|
## Accessibility behavior
|
|
64
64
|
|
package/docs/runtime-api.md
CHANGED
|
@@ -26,3 +26,29 @@ Mounted components dispatch lifecycle events on their root element:
|
|
|
26
26
|
`BaseUI.theme.set(...)` is the low-level setter. For persisted light/dark toggles, button-label synchronization, URL `?theme=` overrides, and iframe preview sync, import `createThemeController` from `@base/theme` in browser import maps or `@thebase/ui` in npm/bundler apps.
|
|
27
27
|
|
|
28
28
|
`BaseUI.mountAll()` is for static `b-ui`/`b-att-*` markers and `b-icon` markers only. It does not register Owl component tags (`<Button/>`, `<Card/>`, ...) and does not know about `@thebase/ui` or `dist/baseui.templates.xml`. To use pure Owl components, import their classes, fetch the templates XML, and list those classes in your own component's `static components`; see [Pure Owl Components](owl-components.md).
|
|
29
|
+
|
|
30
|
+
## `cn()` class-name helper
|
|
31
|
+
|
|
32
|
+
`cn(...classNames)` joins strings, arrays, and falsy values into one space-separated class string, flattening nested arrays and skipping anything falsy:
|
|
33
|
+
|
|
34
|
+
```js
|
|
35
|
+
import { cn } from "@thebase/ui";
|
|
36
|
+
|
|
37
|
+
cn("btn", isActive && "active", ["bu-button", className]);
|
|
38
|
+
// "btn active bu-button my-class" (when isActive is truthy and className is "my-class")
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
It's a standalone named export — `import { cn } from "@thebase/ui"` in npm/bundler apps, or `BaseUIBundle.cn` in the browser IIFE global — not a method on `BaseUI` itself. Use it to build your own components' class lists on top of BaseUI's conventions.
|
|
42
|
+
|
|
43
|
+
## `mergeStyle()` inline-style helper
|
|
44
|
+
|
|
45
|
+
`mergeStyle(...styles)` combines a component's own computed inline style with a caller-supplied `style` (string or object) into one `;`-joined declaration string, dropping empty/nullish entries. Object keys may be camelCase (converted to kebab-case); later entries win on conflicting properties since they're appended last:
|
|
46
|
+
|
|
47
|
+
```js
|
|
48
|
+
import { mergeStyle } from "@thebase/ui";
|
|
49
|
+
|
|
50
|
+
mergeStyle("--b-progress-value:50%", { color: "red" }, "opacity:0.5;");
|
|
51
|
+
// "--b-progress-value:50%;color:red;opacity:0.5"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
It's a standalone named export — `import { mergeStyle } from "@thebase/ui"` in npm/bundler apps, or `BaseUIBundle.mergeStyle` in the browser IIFE global. Unlike `cn()`, which joins class names with a space, `mergeStyle()` joins CSS declarations with `;` — the two are not interchangeable.
|
package/docs/theming.md
CHANGED
|
@@ -13,7 +13,7 @@ BaseUI.theme.set("dark");
|
|
|
13
13
|
BaseUI.theme.set({ primary: "#0057d8", radius: "0.5rem" });
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
BaseUI maps semantic tokens such as `--
|
|
16
|
+
BaseUI maps semantic tokens such as `--b-background`, `--b-primary`, `--b-border`, and `--b-radius` into Bootstrap 5 variables. Radius tokens are sourced from the shorter public alias family `--base-radius`, `--base-radius-sm`, `--base-radius-md`, `--base-radius-lg`, `--base-radius-xl`, `--base-radius-2xl`, `--base-radius-3xl`, `--base-radius-4xl`, and `--base-radius-full`, then mirrored to `--b-radius*` for component CSS.
|
|
17
17
|
|
|
18
18
|
For a reusable theme toggle with persistence, URL override, button-label sync, and iframe preview sync, import the theme helper:
|
|
19
19
|
|
|
@@ -50,6 +50,6 @@ The documentation and example pages use the same theme infrastructure. Owl examp
|
|
|
50
50
|
|
|
51
51
|
## Design tokens
|
|
52
52
|
|
|
53
|
-
The default light/dark palettes and radius follow the current [shadcn/ui](https://ui.shadcn.com) Base UI neutral theme: black/neutral primary on white in light mode, neutral-900/50 foreground-background inversion in dark mode, neutral `--
|
|
53
|
+
The default light/dark palettes and radius follow the current [shadcn/ui](https://ui.shadcn.com) Base UI neutral theme: black/neutral primary on white in light mode, neutral-900/50 foreground-background inversion in dark mode, neutral `--b-secondary`/`--b-muted`/`--b-accent` surfaces, `--base-radius: var(--radius, 0.625rem)`, and a derived radius scale (`--base-radius-sm|md|lg|xl`, mirrored as `--b-radius-sm|md|lg|xl`) and shadow scale (`--b-shadow-sm|md|lg`) for consistent elevation across popovers, menus, dialogs, and toasts. BaseUI reads an existing upstream `--radius` value when present, but it does not redefine `--radius` back to `--b-radius`; that one-way bridge avoids CSS custom-property cycles. `--b-card`/`--b-popover` alias `--b-surface` for shadcn-token-name parity.
|
|
54
54
|
|
|
55
|
-
Because BaseUI ships Bootstrap's stock precompiled CSS, most `.btn-*`/badge colors are not driven by `--bs-*` variables directly — `src/styles/baseui.css` re-points the `.btn-primary`/`.btn-secondary`/`.btn-danger`/`.btn-outline-secondary`/`.btn-light` variants at BaseUI tokens so `BaseUI.theme.set(...)` overrides actually render. Badges use their own `
|
|
55
|
+
Because BaseUI ships Bootstrap's stock precompiled CSS, most `.btn-*`/badge colors are not driven by `--bs-*` variables directly — `src/styles/baseui.css` re-points the `.btn-primary`/`.btn-secondary`/`.btn-danger`/`.btn-outline-secondary`/`.btn-light` variants at BaseUI tokens so `BaseUI.theme.set(...)` overrides actually render. Badges use their own `bu-badge-*` classes (`src/components/badge/badge.css`) instead of Bootstrap's `text-bg-*`, which hardcode non-overridable colors.
|