@thebase/ui 1.1.6 → 1.1.7
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 +19 -0
- package/README.md +4 -4
- package/bin/create-baseui-app.mjs +3 -6
- package/dist/baseui.apidoc.esm.js +37 -29
- package/dist/baseui.apidoc.min.js +37 -29
- package/dist/baseui.esm.js +53 -37
- package/dist/baseui.min.css +1 -1
- package/dist/baseui.min.js +53 -37
- package/dist/baseui.registry.json +18 -29
- package/dist/baseui.templates.xml +62 -79
- package/docs/analytics.md +3 -3
- package/docs/blocks.md +1 -1
- package/docs/components/chart.md +2 -0
- package/docs/components/code-editor.md +77 -0
- package/docs/components/combobox.md +10 -0
- package/docs/components/date-picker.md +10 -0
- package/docs/components/empty.md +1 -1
- package/docs/components/field.md +8 -0
- package/docs/components/input.md +27 -1
- package/docs/components/kbd.md +3 -6
- package/docs/components/markdown.md +2 -0
- package/docs/components/message-scroller.md +3 -8
- package/docs/components/native-select.md +13 -0
- package/docs/components/navigation-menu.md +2 -0
- package/docs/components/select.md +16 -0
- package/docs/components/shell.md +2 -0
- package/docs/components/sidebar.md +2 -0
- package/docs/components/switch.md +11 -0
- package/docs/components/textarea.md +23 -0
- package/docs/icons.md +1 -1
- package/docs/installation.md +2 -2
- package/docs/theming.md +1 -1
- package/docs/usage-guide.md +5 -5
- package/package.json +1 -1
- package/docs/components/input-group.md +0 -68
|
@@ -27,6 +27,28 @@ import { Textarea } from "@thebase/ui";
|
|
|
27
27
|
</div>
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
+
### Footer slot
|
|
31
|
+
|
|
32
|
+
The `footer` slot draws a bar along the bottom edge inside the field (counter on the left, send button on the right). `start` and `end` work as on [Input](/examples/blocks.html#/docs/components/input).
|
|
33
|
+
|
|
34
|
+
```base-ui
|
|
35
|
+
<div style="max-width: 28rem" class="w-100 pt-3">
|
|
36
|
+
<Textarea label="'Message'" rows="3">
|
|
37
|
+
<t t-set-slot="footer"><span>0/280</span><Button size="'xs'">Send</Button></t>
|
|
38
|
+
</Textarea>
|
|
39
|
+
</div>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Help tooltip (`useTip`)
|
|
43
|
+
|
|
44
|
+
Set `useTip="1"` to move `supportingText` into a tooltip: a question-mark icon appears right after the label, in the same label box, and the text shows on hover or focus. Error text still shows under the field.
|
|
45
|
+
|
|
46
|
+
```base-ui
|
|
47
|
+
<div style="max-width: 28rem" class="w-100 pt-3">
|
|
48
|
+
<Textarea label="'Your message'" supportingText="'Copied to the support team'" useTip="1"/>
|
|
49
|
+
</div>
|
|
50
|
+
```
|
|
51
|
+
|
|
30
52
|
| Component | Prop | Type | Notes |
|
|
31
53
|
| --- | --- | --- | --- |
|
|
32
54
|
| `Textarea` | `value` | `String` | optional |
|
|
@@ -39,6 +61,7 @@ import { Textarea } from "@thebase/ui";
|
|
|
39
61
|
| `Textarea` | `id` | `String` | optional, e.g. for `Label`'s `for` |
|
|
40
62
|
| `Textarea` | `onInput` | `Function` | optional |
|
|
41
63
|
| `Textarea` | `onChange` | `Function` | optional |
|
|
64
|
+
| `Textarea` | slots `start` / `end` / `footer` | slot | content drawn inside the box; `footer` sits along the bottom edge |
|
|
42
65
|
| `Textarea` | `label`, `supportingText`, `useTip`, `errorText`, `maxLength`, `invalid`, `placeholder` | `String` / `Boolean` | Material-style outlined field, same behaviour as [Input](/examples/blocks.html#/docs/components/input): the label floats onto the border, `errorText` replaces `supportingText`. Also inherited from a parent `Field`. |
|
|
43
66
|
|
|
44
67
|
See [Base Components](/examples/blocks.html#/docs/guide/owl-components) for how to load `@base/owl` and `dist/baseui.templates.xml`.
|
package/docs/icons.md
CHANGED
|
@@ -22,7 +22,7 @@ Load the normal the Base UI assets. No separate icon script is required.
|
|
|
22
22
|
<script src="https://cdn.jsdelivr.net/npm/@thebase/ui@latest/dist/baseui.min.js" defer></script>
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
`https://unpkg.com/@thebase/ui@latest/dist/...` mirrors the same files as an alternative CDN if jsDelivr is unreachable. Pin an exact version (e.g. `@1.1.
|
|
25
|
+
`https://unpkg.com/@thebase/ui@latest/dist/...` mirrors the same files as an alternative CDN if jsDelivr is unreachable. Pin an exact version (e.g. `@1.1.7`, or `@1` to take only non-breaking updates) instead of `@latest` for production. `b-icon` also works with the [pure Base `Icon` component](components/icon.md) — the recommended API in an application; the classic script above is for pages using the static `b-ui` API.
|
|
26
26
|
|
|
27
27
|
The build publishes every Lucide SVG to `dist/icons/lucide/` and writes the generated icon manifest to `dist/icons/lucide.json`.
|
|
28
28
|
|
package/docs/installation.md
CHANGED
|
@@ -4,7 +4,7 @@ See the [Usage Guide](usage-guide.md) for the end-to-end integration path (choos
|
|
|
4
4
|
|
|
5
5
|
The Base UI is distributed as one CSS file and one JavaScript file for browser use. `dist/baseui.min.js` is fully self-contained: Bootstrap's JS bundle (Popper.js included) and the Owl runtime are embedded ahead of the Base UI's own code, in load order (Bootstrap, then Owl, then the Base UI) — nothing else needs to load first. Both install paths below load this same file; the Base component API is the recommended way to consume the Base UI in an application, with the base static markup (`b-ui`) API available as a lighter-weight alternative for non-Owl pages.
|
|
6
6
|
|
|
7
|
-
The snippets below use the `@latest` tag for readability. Pin an exact version instead (e.g. `@1.1.
|
|
7
|
+
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 — `@latest` can silently change what your page loads the moment a new version is published.
|
|
8
8
|
|
|
9
9
|
## Base component install (recommended)
|
|
10
10
|
|
|
@@ -43,7 +43,7 @@ For static HTML, a server-rendered page, or a Base HUB website page that has no
|
|
|
43
43
|
|
|
44
44
|
Bootstrap 5 is the bundled baseline CSS framework, and its JS bundle now drives the Base UI's interactive components directly.
|
|
45
45
|
|
|
46
|
-
`@thebase/ui` is published on npm, so [unpkg](https://unpkg.com/@thebase/ui@latest/) mirrors the same files as an alternative CDN (`https://unpkg.com/@thebase/ui@latest/dist/baseui.min.css` / `baseui.min.js`) if jsDelivr is unreachable in your environment. Pin an exact version (e.g. `@1.1.
|
|
46
|
+
`@thebase/ui` is published on npm, so [unpkg](https://unpkg.com/@thebase/ui@latest/) mirrors the same files as an alternative CDN (`https://unpkg.com/@thebase/ui@latest/dist/baseui.min.css` / `baseui.min.js`) if jsDelivr is unreachable in your environment. Pin an exact version (e.g. `@1.1.7`, or `@1` to take only non-breaking updates) instead of `@latest` for production.
|
|
47
47
|
|
|
48
48
|
For npm/self-hosted usage:
|
|
49
49
|
|
package/docs/theming.md
CHANGED
|
@@ -38,7 +38,7 @@ For a reusable theme toggle with persistence, URL override, button-label sync, a
|
|
|
38
38
|
</script>
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
`https://unpkg.com/@thebase/ui@latest/dist/baseui.esm.js` mirrors the same file as an alternative CDN if jsDelivr is unreachable. Pin an exact version (e.g. `@1.1.
|
|
41
|
+
`https://unpkg.com/@thebase/ui@latest/dist/baseui.esm.js` mirrors the same file as an alternative CDN if jsDelivr is unreachable. Pin an exact version (e.g. `@1.1.7`, or `@1` to take only non-breaking updates) instead of `@latest` for production. Npm/bundler consumers can import the same API from `@thebase/ui`.
|
|
42
42
|
|
|
43
43
|
For a ready-made icon button, use the Base UI component instead of wiring your own click handler:
|
|
44
44
|
|
package/docs/usage-guide.md
CHANGED
|
@@ -32,7 +32,7 @@ Save this as an `.html` file and open it — no build step, no server required.
|
|
|
32
32
|
</html>
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
`https://cdn.jsdelivr.net/npm/@thebase/ui@latest/dist/...` is the real jsDelivr URL for the published `@thebase/ui` npm package's `latest` tag, used here for a copy-paste-and-go quick start. Pin an exact version instead (e.g. `@1.1.
|
|
35
|
+
`https://cdn.jsdelivr.net/npm/@thebase/ui@latest/dist/...` is the real jsDelivr URL for the published `@thebase/ui` npm package's `latest` tag, used here for a copy-paste-and-go quick start. Pin an exact version instead (e.g. `@1.1.7`, or `@1` to take only non-breaking updates) for production, so a new release can't change what your page loads. See [Installation](installation.md) for jsDelivr/unpkg/npm/self-hosted paths.
|
|
36
36
|
|
|
37
37
|
The static bundle calls `thebase.mountAll()` automatically on `DOMContentLoaded`, so initial `[b-ui]` and `[b-icon]` markup mounts without an extra script. Call `thebase.mountAll(root)` yourself only after injecting new markup or when mounting a specific fragment. If the consumer is itself an application, use [step 2](#2-install-pure-owl-api--recommended) instead — that's the recommended path.
|
|
38
38
|
|
|
@@ -63,7 +63,7 @@ Both APIs come from the same package and the same CSS file, and can be mixed on
|
|
|
63
63
|
</script>
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
`https://unpkg.com/@thebase/ui@latest/dist/...` mirrors the same files as an alternative CDN if jsDelivr is unreachable — swap the host in each URL above. Pin an exact version (e.g. `@1.1.
|
|
66
|
+
`https://unpkg.com/@thebase/ui@latest/dist/...` mirrors the same files as an alternative CDN if jsDelivr is unreachable — swap the host in each URL above. Pin an exact version (e.g. `@1.1.7`, or `@1` to take only non-breaking updates) instead of `@latest` for production.
|
|
67
67
|
|
|
68
68
|
```html
|
|
69
69
|
<script type="module">
|
|
@@ -103,7 +103,7 @@ Two rules that account for most integration failures — see [Base Components](o
|
|
|
103
103
|
<script src="https://cdn.jsdelivr.net/npm/@thebase/ui@latest/dist/baseui.min.js" defer></script>
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
-
`https://unpkg.com/@thebase/ui@latest/dist/...` mirrors the same files as an alternative CDN if jsDelivr is unreachable. Pin an exact version (e.g. `@1.1.
|
|
106
|
+
`https://unpkg.com/@thebase/ui@latest/dist/...` mirrors the same files as an alternative CDN if jsDelivr is unreachable. Pin an exact version (e.g. `@1.1.7`, or `@1` to take only non-breaking updates) instead of `@latest` for production.
|
|
107
107
|
|
|
108
108
|
**Option B — npm (bundler-based apps: Vite, webpack, etc.):**
|
|
109
109
|
|
|
@@ -120,7 +120,7 @@ import "@thebase/ui"; // side-effect import: registers window.thebase and auto-m
|
|
|
120
120
|
|
|
121
121
|
Rule that applies to both options:
|
|
122
122
|
|
|
123
|
-
- Production pages must use a pinned version (e.g. `@thebase/ui@1.1.
|
|
123
|
+
- Production pages must use a pinned version (e.g. `@thebase/ui@1.1.7` or `@thebase/ui@1`), never `@latest`.
|
|
124
124
|
|
|
125
125
|
Mount markup:
|
|
126
126
|
|
|
@@ -219,7 +219,7 @@ export default {
|
|
|
219
219
|
},
|
|
220
220
|
serviceWorker: {
|
|
221
221
|
cacheName: "my-app-cache-v1",
|
|
222
|
-
cdnVersion: "1.1.
|
|
222
|
+
cdnVersion: "1.1.7", // pin to match the importmap in index.html
|
|
223
223
|
appFiles: ["/app.css", "/app.js", "/app.xml", "/favicon.svg", "/icons/icon-192.png", "/icons/icon-512.png"],
|
|
224
224
|
},
|
|
225
225
|
};
|
package/package.json
CHANGED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# Input Group
|
|
2
|
-
|
|
3
|
-
## Base component
|
|
4
|
-
|
|
5
|
-
```js
|
|
6
|
-
import {
|
|
7
|
-
InputGroup,
|
|
8
|
-
InputGroupAddon,
|
|
9
|
-
InputGroupButton,
|
|
10
|
-
InputGroupInput,
|
|
11
|
-
InputGroupText,
|
|
12
|
-
InputGroupTextarea,
|
|
13
|
-
} from "@thebase/ui";
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
```base-ui
|
|
17
|
-
<div class="d-flex flex-column gap-4 w-100" style="max-width: 28rem">
|
|
18
|
-
<InputGroup label="'Search'" supportingText="'Search the docs'">
|
|
19
|
-
<InputGroupInput/>
|
|
20
|
-
<InputGroupAddon align="'inline-end'">
|
|
21
|
-
<Icon name="'search'"/>
|
|
22
|
-
</InputGroupAddon>
|
|
23
|
-
</InputGroup>
|
|
24
|
-
|
|
25
|
-
<InputGroup label="'Website'">
|
|
26
|
-
<InputGroupInput placeholder="'https://'"/>
|
|
27
|
-
<InputGroupAddon align="'inline-end'">
|
|
28
|
-
<InputGroupButton>Search</InputGroupButton>
|
|
29
|
-
</InputGroupAddon>
|
|
30
|
-
</InputGroup>
|
|
31
|
-
|
|
32
|
-
<InputGroup label="'Message'">
|
|
33
|
-
<InputGroupTextarea rows="3"/>
|
|
34
|
-
<InputGroupAddon align="'block-end'">
|
|
35
|
-
<InputGroupText>0/280</InputGroupText>
|
|
36
|
-
<InputGroupButton variant="'default'" className="'ms-auto'">Send</InputGroupButton>
|
|
37
|
-
</InputGroupAddon>
|
|
38
|
-
</InputGroup>
|
|
39
|
-
</div>
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
| Component | Prop | Type | Notes |
|
|
43
|
-
| --- | --- | --- | --- |
|
|
44
|
-
| `InputGroup` | `className` | `String` | optional |
|
|
45
|
-
| `InputGroup` | `label`, `labelBackground`, `supportingText`, `useTip`, `errorText`, `invalid` | `String` / `Boolean` | Material-style outlined group, same label as [Input](/examples/blocks.html#/docs/components/input): the label floats onto the border once the control is focused or filled. Also inherited from a parent `Field`. |
|
|
46
|
-
| `InputGroupAddon` | `align` | `String` | `inline-start` (default), `inline-end`, `block-start`, `block-end` |
|
|
47
|
-
| `InputGroupButton` | `variant` | `String` | `default`, `destructive`, `outline`, `secondary`, `ghost` (default), `link` |
|
|
48
|
-
| `InputGroupButton` | `size` | `String` | `xs` (default), `icon-xs`, `sm`, `icon-sm` |
|
|
49
|
-
| `InputGroupText` | `className` | `String` | optional |
|
|
50
|
-
| `InputGroupInput` | `type`, `value`, `placeholder`, `disabled`, `readonly`, `invalid` | mixed | input control |
|
|
51
|
-
| `InputGroupTextarea` | `value`, `placeholder`, `rows`, `disabled`, `readonly`, `invalid`, `resize` | mixed | textarea control |
|
|
52
|
-
|
|
53
|
-
See [Base Components](/examples/blocks.html#/docs/guide/owl-components) for how to load `@base/owl` and `dist/baseui.templates.xml`.
|
|
54
|
-
|
|
55
|
-
## Static component
|
|
56
|
-
|
|
57
|
-
```base-ui
|
|
58
|
-
<div b-ui="input-group">
|
|
59
|
-
<div b-input-group-addon b-att-align="inline-start">
|
|
60
|
-
<span b-input-group-text>@</span>
|
|
61
|
-
</div>
|
|
62
|
-
<input b-ui="input" placeholder="username">
|
|
63
|
-
</div>
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
Use `b-att-align="inline-start|inline-end|block-start|block-end"` on `b-input-group-addon`.
|
|
67
|
-
Use `b-input-group-button` with `b-att-size="xs|icon-xs|sm|icon-sm"` and
|
|
68
|
-
`b-att-variant="default|destructive|outline|secondary|ghost|link"` for embedded actions.
|