@thebase/ui 1.1.5 → 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.
@@ -306,3 +306,5 @@ See [Base Components](/examples/blocks.html#/docs/guide/owl-components) for how
306
306
  ```
307
307
 
308
308
  State is reflected through `b-att-state="open|closed"`. Events: `baseui:open`, `baseui:close`.
309
+
310
+ Below 992px the sidebar is an off-canvas drawer closed by navigation; the `Shell` and `Sidebar` CSS and `matchMedia` checks share this breakpoint.
@@ -14,10 +14,21 @@ import { Switch } from "@thebase/ui";
14
14
  </div>
15
15
  ```
16
16
 
17
+ ### Help tooltip (`useTip`)
18
+
19
+ ```base-ui
20
+ <div class="d-flex flex-column gap-3" style="max-width: 28rem">
21
+ <Switch supportingText="'Turns off all wireless radios'">Airplane Mode</Switch>
22
+ <Switch supportingText="'Turns off all wireless radios'" useTip="1">Airplane Mode</Switch>
23
+ </div>
24
+ ```
25
+
17
26
  | Component | Prop | Type | Notes |
18
27
  | --- | --- | --- | --- |
19
28
  | `Switch` | `checked` | `Boolean` | optional |
20
29
  | `Switch` | `disabled` | `Boolean` | optional |
30
+ | `Switch` | `supportingText` | `String` | optional helper text shown under the label |
31
+ | `Switch` | `useTip` | `Number` | `1` moves `supportingText` into a tooltip on a question-mark icon right after the label |
21
32
  | `Switch` | `className` | `String` | optional |
22
33
  | `Switch` | `onChange` | `Function` | optional |
23
34
 
@@ -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,7 +61,8 @@ 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 |
42
- | `Textarea` | `label`, `supportingText`, `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`. |
64
+ | `Textarea` | slots `start` / `end` / `footer` | slot | content drawn inside the box; `footer` sits along the bottom edge |
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`.
45
68
 
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.5`, 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.
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
 
@@ -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.5`, 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.
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.5`, or `@1` to take only non-breaking updates) instead of `@latest` for production.
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
 
@@ -55,7 +55,7 @@ Everything — the static `b-ui` runtime, the Owl framework, every Base componen
55
55
  </script>
56
56
  ```
57
57
 
58
- `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. For a self-hosted build, replace the CDN host with your own served path (e.g. `/dist/baseui.esm.js`). These snippets use `@latest` for readability; pin an exact version (e.g. `@1.1.5`, or `@1` to take only non-breaking updates) in production so a new release can't change what your page loads.
58
+ `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. For a self-hosted build, replace the CDN host with your own served path (e.g. `/dist/baseui.esm.js`). These snippets use `@latest` for readability; pin an exact version (e.g. `@1.1.6`, or `@1` to take only non-breaking updates) in production so a new release can't change what your page loads.
59
59
 
60
60
  No `@odoo/owl` import appears anywhere in that snippet — `@base/owl` is the only Owl entry point the Base UI components and consumer apps need. Because `@base/owl`, `@base/component`, and `@base/theme` all point at the exact same `dist/baseui.esm.js` URL, the browser fetches and evaluates it once and every key shares the same module instance — no separate classic `<script>` needs to load first to set up a shared global.
61
61
 
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.5`, or `@1` to take only non-breaking updates) instead of `@latest` for production. Npm/bundler consumers can import the same API from `@thebase/ui`.
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
 
@@ -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.5`, 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.
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.5`, or `@1` to take only non-breaking updates) instead of `@latest` for production.
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.5`, or `@1` to take only non-breaking updates) instead of `@latest` for production.
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.5` or `@thebase/ui@1`), never `@latest`.
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.5", // pin to match the importmap in index.html
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@thebase/ui",
3
- "version": "1.1.5",
3
+ "version": "1.1.7",
4
4
  "description": "CDN-installable Bootstrap 5 UI component library.",
5
5
  "type": "module",
6
6
  "main": "./dist/baseui.min.js",
@@ -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`, `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.