@winkintel/bootstrap-svelte 1.0.8 → 1.0.10
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/README.md +25 -19
- package/dist/Form/form-helper-text.svelte +3 -3
- package/dist/Form/form-helper-text.svelte.d.ts +3 -3
- package/dist/Form/form-input-label.svelte +2 -2
- package/dist/Form/form-input-label.svelte.d.ts +2 -2
- package/dist/Form/form-range-input.svelte +4 -4
- package/dist/Form/form-range-input.svelte.d.ts +4 -4
- package/dist/Modal/modal.svelte +4 -4
- package/dist/Modal/modal.svelte.d.ts +4 -4
- package/dist/Offcanvas/offcanvas.svelte +9 -9
- package/dist/Offcanvas/offcanvas.svelte.d.ts +9 -9
- package/package.json +8 -3
package/README.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Bootstrap Svelte
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@winkintel/bootstrap-svelte)
|
|
4
|
+
[](https://www.npmjs.com/package/@winkintel/bootstrap-svelte)
|
|
5
|
+
[](https://github.com/WinkIntel/bootstrap-svelte/actions/workflows/ci.yml)
|
|
6
|
+
[](https://github.com/WinkIntel/bootstrap-svelte/blob/main/LICENSE.md)
|
|
7
|
+
[](https://bootstrap-svelte.vercel.app/)
|
|
8
|
+
|
|
3
9
|
> Bootstrap 5 components for Svelte 5 with TypeScript support.
|
|
4
10
|
|
|
5
11
|
Bootstrap Svelte provides ready-to-use, type-safe Bootstrap components for Svelte 5 applications. It follows Bootstrap's design language and class conventions while exposing Svelte-native component APIs.
|
|
@@ -8,11 +14,21 @@ Use it when you want Bootstrap's familiar grid, utilities, and UI patterns in a
|
|
|
8
14
|
|
|
9
15
|
## Links
|
|
10
16
|
|
|
17
|
+
- Documentation: <https://bootstrap-svelte.vercel.app/>
|
|
11
18
|
- npm: [`@winkintel/bootstrap-svelte`](https://www.npmjs.com/package/@winkintel/bootstrap-svelte)
|
|
12
19
|
- Repository: [`WinkIntel/bootstrap-svelte`](https://github.com/WinkIntel/bootstrap-svelte)
|
|
13
20
|
- Bootstrap: <https://getbootstrap.com/>
|
|
14
21
|
- Svelte: <https://svelte.dev/>
|
|
15
22
|
|
|
23
|
+
## Machine-readable documentation
|
|
24
|
+
|
|
25
|
+
The showcase at <https://bootstrap-svelte.vercel.app> is published for AI agents and tools as well as people:
|
|
26
|
+
|
|
27
|
+
- `/llms.txt` indexes every page with one-line summaries ([llms.txt format](https://llmstxt.org)); `/llms-full.txt` bundles every page into one Markdown file.
|
|
28
|
+
- Every page is available as Markdown from its own URL with `Accept: text/markdown` (quality values are honored; the response carries `Vary: Accept` and a `Link` alternate header), or by appending `.md` to the path, for example `/components/button.md`.
|
|
29
|
+
- `/agents.md` explains when to use the library and how to integrate it; `/sitemap.xml` and `/robots.txt` serve crawlers.
|
|
30
|
+
- Paths that do not exist return a real HTTP 404 with a Markdown or HTML body that links back to the documentation index.
|
|
31
|
+
|
|
16
32
|
## Why this exists
|
|
17
33
|
|
|
18
34
|
Bootstrap is still a practical choice for many product, enterprise, and internal applications: it is familiar, well documented, stable, and easy for mixed frontend/backend teams to work with.
|
|
@@ -51,11 +67,7 @@ yarn add @winkintel/bootstrap-svelte bootstrap
|
|
|
51
67
|
|
|
52
68
|
### Peer dependency
|
|
53
69
|
|
|
54
|
-
This package requires Svelte 5
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
pnpm add svelte@^5.29.0
|
|
58
|
-
```
|
|
70
|
+
This package requires Svelte `^5.29.0` as a peer dependency. Keep Svelte installed in your application; do not replace the package/bootstrap install command with a Svelte install command.
|
|
59
71
|
|
|
60
72
|
## Bootstrap CSS
|
|
61
73
|
|
|
@@ -82,23 +94,19 @@ Or use Bootstrap SCSS from your app stylesheet/build pipeline:
|
|
|
82
94
|
let showModal = $state(false);
|
|
83
95
|
</script>
|
|
84
96
|
|
|
85
|
-
<Alert colorVariant="primary" isDismissible>
|
|
86
|
-
Welcome to Bootstrap Svelte!
|
|
87
|
-
</Alert>
|
|
97
|
+
<Alert colorVariant="primary" isDismissible>Welcome to Bootstrap Svelte!</Alert>
|
|
88
98
|
|
|
89
|
-
<Card>
|
|
99
|
+
<Card.Root>
|
|
90
100
|
<Card.Header>
|
|
91
101
|
<Card.Title>Getting Started</Card.Title>
|
|
92
102
|
</Card.Header>
|
|
93
103
|
<Card.Body>
|
|
94
104
|
<Card.Text>This is a card built with Bootstrap Svelte components.</Card.Text>
|
|
95
|
-
<Button colorVariant="primary" onclick={() => (showModal = true)}>
|
|
96
|
-
Open Modal
|
|
97
|
-
</Button>
|
|
105
|
+
<Button colorVariant="primary" onclick={() => (showModal = true)}>Open Modal</Button>
|
|
98
106
|
</Card.Body>
|
|
99
|
-
</Card>
|
|
107
|
+
</Card.Root>
|
|
100
108
|
|
|
101
|
-
<Modal isShown={showModal}>
|
|
109
|
+
<Modal.Root isShown={showModal}>
|
|
102
110
|
<Modal.Dialog>
|
|
103
111
|
<Modal.Content>
|
|
104
112
|
<Modal.Header>
|
|
@@ -106,13 +114,11 @@ Or use Bootstrap SCSS from your app stylesheet/build pipeline:
|
|
|
106
114
|
</Modal.Header>
|
|
107
115
|
<Modal.Body>Modal content goes here.</Modal.Body>
|
|
108
116
|
<Modal.Footer>
|
|
109
|
-
<Button colorVariant="secondary" onclick={() => (showModal = false)}>
|
|
110
|
-
Close
|
|
111
|
-
</Button>
|
|
117
|
+
<Button colorVariant="secondary" onclick={() => (showModal = false)}>Close</Button>
|
|
112
118
|
</Modal.Footer>
|
|
113
119
|
</Modal.Content>
|
|
114
120
|
</Modal.Dialog>
|
|
115
|
-
</Modal>
|
|
121
|
+
</Modal.Root>
|
|
116
122
|
```
|
|
117
123
|
|
|
118
124
|
## Available components
|
|
@@ -174,7 +180,7 @@ Interactive components are implemented as Svelte components rather than requirin
|
|
|
174
180
|
|
|
175
181
|
## Status and feedback
|
|
176
182
|
|
|
177
|
-
This package is published as `1.0.
|
|
183
|
+
This package is published as `1.0.10`, but feedback from Svelte developers is still very welcome. Useful feedback includes:
|
|
178
184
|
|
|
179
185
|
- Component API ergonomics
|
|
180
186
|
- Svelte 5 idioms and runes compatibility
|
|
@@ -13,12 +13,12 @@ Bootstrap-styled helper text component for providing additional information abou
|
|
|
13
13
|
<Form.TextInput id="emailInput" placeholder="Enter your email" aria-describedby="email-help" />
|
|
14
14
|
<Form.HelperText id="email-help">We'll never share your email with anyone else.</Form.HelperText>
|
|
15
15
|
|
|
16
|
-
// Inside
|
|
17
|
-
<Form.
|
|
16
|
+
// Inside an input group
|
|
17
|
+
<Form.InputGroup>
|
|
18
18
|
<Form.InputLabel for="passwordInput">Password</Form.InputLabel>
|
|
19
19
|
<Form.PasswordInput id="passwordInput" />
|
|
20
20
|
<Form.HelperText>Your password must be 8-20 characters long, contain letters and numbers, and must not contain spaces or emoji.</Form.HelperText>
|
|
21
|
-
</Form.
|
|
21
|
+
</Form.InputGroup>
|
|
22
22
|
```
|
|
23
23
|
### Props
|
|
24
24
|
- `class` (string): Optional. Additional CSS classes to apply to the helper text.
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
* <Form.TextInput id="emailInput" placeholder="Enter your email" aria-describedby="email-help" />
|
|
13
13
|
* <Form.HelperText id="email-help">We'll never share your email with anyone else.</Form.HelperText>
|
|
14
14
|
*
|
|
15
|
-
* // Inside
|
|
16
|
-
* <Form.
|
|
15
|
+
* // Inside an input group
|
|
16
|
+
* <Form.InputGroup>
|
|
17
17
|
* <Form.InputLabel for="passwordInput">Password</Form.InputLabel>
|
|
18
18
|
* <Form.PasswordInput id="passwordInput" />
|
|
19
19
|
* <Form.HelperText>Your password must be 8-20 characters long, contain letters and numbers, and must not contain spaces or emoji.</Form.HelperText>
|
|
20
|
-
* </Form.
|
|
20
|
+
* </Form.InputGroup>
|
|
21
21
|
* ```
|
|
22
22
|
* ### Props
|
|
23
23
|
* - `class` (string): Optional. Additional CSS classes to apply to the helper text.
|
|
@@ -6,11 +6,11 @@ Bootstrap-styled label component for form input elements.
|
|
|
6
6
|
@example
|
|
7
7
|
```svelte
|
|
8
8
|
// Standard label for input
|
|
9
|
-
<Form.
|
|
9
|
+
<Form.InputGroup>
|
|
10
10
|
<Form.InputLabel for="exampleInput">Email address</Form.InputLabel>
|
|
11
11
|
<Form.EmailInput id="exampleInput" placeholder="name@example.com" />
|
|
12
12
|
<Form.HelperText>We'll never share your email with anyone else.</Form.HelperText>
|
|
13
|
-
</Form.
|
|
13
|
+
</Form.InputGroup>
|
|
14
14
|
|
|
15
15
|
// Floating label (used with Form.Floating)
|
|
16
16
|
<Form.Floating>
|
|
@@ -6,11 +6,11 @@ import type { Form } from './index.js';
|
|
|
6
6
|
* @example
|
|
7
7
|
* ```svelte
|
|
8
8
|
* // Standard label for input
|
|
9
|
-
* <Form.
|
|
9
|
+
* <Form.InputGroup>
|
|
10
10
|
* <Form.InputLabel for="exampleInput">Email address</Form.InputLabel>
|
|
11
11
|
* <Form.EmailInput id="exampleInput" placeholder="name@example.com" />
|
|
12
12
|
* <Form.HelperText>We'll never share your email with anyone else.</Form.HelperText>
|
|
13
|
-
* </Form.
|
|
13
|
+
* </Form.InputGroup>
|
|
14
14
|
*
|
|
15
15
|
* // Floating label (used with Form.Floating)
|
|
16
16
|
* <Form.Floating>
|
|
@@ -16,19 +16,19 @@ Bootstrap-styled range slider input component for selecting a value within a ran
|
|
|
16
16
|
<Form.RangeInput disabled max="5" min="0" step="0.5" title="Set a number" value="1" />
|
|
17
17
|
|
|
18
18
|
// With label and current value display
|
|
19
|
-
<Form.
|
|
19
|
+
<Form.InputGroup>
|
|
20
20
|
<Form.InputLabel for="customRange">Example range</Form.InputLabel>
|
|
21
21
|
<Form.RangeInput id="customRange" max="10" min="0" />
|
|
22
|
-
</Form.
|
|
22
|
+
</Form.InputGroup>
|
|
23
23
|
|
|
24
24
|
// With steps and ticks
|
|
25
|
-
<Form.
|
|
25
|
+
<Form.InputGroup>
|
|
26
26
|
<Form.InputLabel for="stepRange">Range with steps</Form.InputLabel>
|
|
27
27
|
<Form.RangeInput id="stepRange" max="5" min="0" step="1" />
|
|
28
28
|
<div class="d-flex justify-content-between">
|
|
29
29
|
<span>0</span><span>1</span><span>2</span><span>3</span><span>4</span><span>5</span>
|
|
30
30
|
</div>
|
|
31
|
-
</Form.
|
|
31
|
+
</Form.InputGroup>
|
|
32
32
|
```
|
|
33
33
|
### Props
|
|
34
34
|
- `class` (string): Optional. Additional CSS classes to apply to the range input.
|
|
@@ -16,19 +16,19 @@ import type { Form } from './index.js';
|
|
|
16
16
|
* <Form.RangeInput disabled max="5" min="0" step="0.5" title="Set a number" value="1" />
|
|
17
17
|
*
|
|
18
18
|
* // With label and current value display
|
|
19
|
-
* <Form.
|
|
19
|
+
* <Form.InputGroup>
|
|
20
20
|
* <Form.InputLabel for="customRange">Example range</Form.InputLabel>
|
|
21
21
|
* <Form.RangeInput id="customRange" max="10" min="0" />
|
|
22
|
-
* </Form.
|
|
22
|
+
* </Form.InputGroup>
|
|
23
23
|
*
|
|
24
24
|
* // With steps and ticks
|
|
25
|
-
* <Form.
|
|
25
|
+
* <Form.InputGroup>
|
|
26
26
|
* <Form.InputLabel for="stepRange">Range with steps</Form.InputLabel>
|
|
27
27
|
* <Form.RangeInput id="stepRange" max="5" min="0" step="1" />
|
|
28
28
|
* <div class="d-flex justify-content-between">
|
|
29
29
|
* <span>0</span><span>1</span><span>2</span><span>3</span><span>4</span><span>5</span>
|
|
30
30
|
* </div>
|
|
31
|
-
* </Form.
|
|
31
|
+
* </Form.InputGroup>
|
|
32
32
|
* ```
|
|
33
33
|
* ### Props
|
|
34
34
|
* - `class` (string): Optional. Additional CSS classes to apply to the range input.
|
package/dist/Modal/modal.svelte
CHANGED
|
@@ -5,7 +5,7 @@ Add dialogs to your site for lightboxes, user notifications, or completely custo
|
|
|
5
5
|
|
|
6
6
|
@example
|
|
7
7
|
```svelte
|
|
8
|
-
<Modal isShown={true}>
|
|
8
|
+
<Modal.Root isShown={true}>
|
|
9
9
|
<Modal.Dialog>
|
|
10
10
|
<Modal.Content>
|
|
11
11
|
<Modal.Header>
|
|
@@ -19,17 +19,17 @@ Add dialogs to your site for lightboxes, user notifications, or completely custo
|
|
|
19
19
|
</Modal.Footer>
|
|
20
20
|
</Modal.Content>
|
|
21
21
|
</Modal.Dialog>
|
|
22
|
-
</Modal>
|
|
22
|
+
</Modal.Root>
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
#### Static backdrop
|
|
26
26
|
```svelte
|
|
27
|
-
<Modal useBackdrop="static">...</Modal>
|
|
27
|
+
<Modal.Root useBackdrop="static">...</Modal.Root>
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
#### Keyboard dismissible
|
|
31
31
|
```svelte
|
|
32
|
-
<Modal isKeyboardDismissible={true}>...</Modal>
|
|
32
|
+
<Modal.Root isKeyboardDismissible={true}>...</Modal.Root>
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
### Props
|
|
@@ -5,7 +5,7 @@ import type { Modal } from './index.js';
|
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```svelte
|
|
8
|
-
* <Modal isShown={true}>
|
|
8
|
+
* <Modal.Root isShown={true}>
|
|
9
9
|
* <Modal.Dialog>
|
|
10
10
|
* <Modal.Content>
|
|
11
11
|
* <Modal.Header>
|
|
@@ -19,17 +19,17 @@ import type { Modal } from './index.js';
|
|
|
19
19
|
* </Modal.Footer>
|
|
20
20
|
* </Modal.Content>
|
|
21
21
|
* </Modal.Dialog>
|
|
22
|
-
* </Modal>
|
|
22
|
+
* </Modal.Root>
|
|
23
23
|
* ```
|
|
24
24
|
*
|
|
25
25
|
* #### Static backdrop
|
|
26
26
|
* ```svelte
|
|
27
|
-
* <Modal useBackdrop="static">...</Modal>
|
|
27
|
+
* <Modal.Root useBackdrop="static">...</Modal.Root>
|
|
28
28
|
* ```
|
|
29
29
|
*
|
|
30
30
|
* #### Keyboard dismissible
|
|
31
31
|
* ```svelte
|
|
32
|
-
* <Modal isKeyboardDismissible={true}>...</Modal>
|
|
32
|
+
* <Modal.Root isKeyboardDismissible={true}>...</Modal.Root>
|
|
33
33
|
* ```
|
|
34
34
|
*
|
|
35
35
|
* ### Props
|
|
@@ -5,37 +5,37 @@ Build hidden sidebars into your project for navigation, shopping carts, and more
|
|
|
5
5
|
|
|
6
6
|
@example
|
|
7
7
|
```svelte
|
|
8
|
-
<Offcanvas placement="start"
|
|
8
|
+
<Offcanvas.Root placement="start" isShown={true}>
|
|
9
9
|
<Offcanvas.Header>
|
|
10
10
|
<Offcanvas.Title>Offcanvas Title</Offcanvas.Title>
|
|
11
11
|
</Offcanvas.Header>
|
|
12
12
|
<Offcanvas.Body>
|
|
13
13
|
Content for the offcanvas goes here. You can place just about any Bootstrap component or custom elements here.
|
|
14
14
|
</Offcanvas.Body>
|
|
15
|
-
</Offcanvas>
|
|
15
|
+
</Offcanvas.Root>
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
#### Placement options
|
|
19
19
|
```svelte
|
|
20
|
-
<Offcanvas placement="start">...</Offcanvas>
|
|
21
|
-
<Offcanvas placement="end">...</Offcanvas>
|
|
22
|
-
<Offcanvas placement="top">...</Offcanvas>
|
|
23
|
-
<Offcanvas placement="bottom">...</Offcanvas>
|
|
20
|
+
<Offcanvas.Root placement="start">...</Offcanvas.Root>
|
|
21
|
+
<Offcanvas.Root placement="end">...</Offcanvas.Root>
|
|
22
|
+
<Offcanvas.Root placement="top">...</Offcanvas.Root>
|
|
23
|
+
<Offcanvas.Root placement="bottom">...</Offcanvas.Root>
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
#### Body scrolling
|
|
27
27
|
```svelte
|
|
28
|
-
<Offcanvas
|
|
28
|
+
<Offcanvas.Root isBodyScrollable={true}>...</Offcanvas.Root>
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
#### Static backdrop
|
|
32
32
|
```svelte
|
|
33
|
-
<Offcanvas
|
|
33
|
+
<Offcanvas.Root useBackdrop="static">...</Offcanvas.Root>
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
#### Responsive offcanvas
|
|
37
37
|
```svelte
|
|
38
|
-
<Offcanvas
|
|
38
|
+
<Offcanvas.Root showOnBreakpoint="lg">...</Offcanvas.Root>
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
### Props
|
|
@@ -5,37 +5,37 @@ import type { Offcanvas } from './index.js';
|
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```svelte
|
|
8
|
-
* <Offcanvas placement="start"
|
|
8
|
+
* <Offcanvas.Root placement="start" isShown={true}>
|
|
9
9
|
* <Offcanvas.Header>
|
|
10
10
|
* <Offcanvas.Title>Offcanvas Title</Offcanvas.Title>
|
|
11
11
|
* </Offcanvas.Header>
|
|
12
12
|
* <Offcanvas.Body>
|
|
13
13
|
* Content for the offcanvas goes here. You can place just about any Bootstrap component or custom elements here.
|
|
14
14
|
* </Offcanvas.Body>
|
|
15
|
-
* </Offcanvas>
|
|
15
|
+
* </Offcanvas.Root>
|
|
16
16
|
* ```
|
|
17
17
|
*
|
|
18
18
|
* #### Placement options
|
|
19
19
|
* ```svelte
|
|
20
|
-
* <Offcanvas placement="start">...</Offcanvas>
|
|
21
|
-
* <Offcanvas placement="end">...</Offcanvas>
|
|
22
|
-
* <Offcanvas placement="top">...</Offcanvas>
|
|
23
|
-
* <Offcanvas placement="bottom">...</Offcanvas>
|
|
20
|
+
* <Offcanvas.Root placement="start">...</Offcanvas.Root>
|
|
21
|
+
* <Offcanvas.Root placement="end">...</Offcanvas.Root>
|
|
22
|
+
* <Offcanvas.Root placement="top">...</Offcanvas.Root>
|
|
23
|
+
* <Offcanvas.Root placement="bottom">...</Offcanvas.Root>
|
|
24
24
|
* ```
|
|
25
25
|
*
|
|
26
26
|
* #### Body scrolling
|
|
27
27
|
* ```svelte
|
|
28
|
-
* <Offcanvas
|
|
28
|
+
* <Offcanvas.Root isBodyScrollable={true}>...</Offcanvas.Root>
|
|
29
29
|
* ```
|
|
30
30
|
*
|
|
31
31
|
* #### Static backdrop
|
|
32
32
|
* ```svelte
|
|
33
|
-
* <Offcanvas
|
|
33
|
+
* <Offcanvas.Root useBackdrop="static">...</Offcanvas.Root>
|
|
34
34
|
* ```
|
|
35
35
|
*
|
|
36
36
|
* #### Responsive offcanvas
|
|
37
37
|
* ```svelte
|
|
38
|
-
* <Offcanvas
|
|
38
|
+
* <Offcanvas.Root showOnBreakpoint="lg">...</Offcanvas.Root>
|
|
39
39
|
* ```
|
|
40
40
|
*
|
|
41
41
|
* ### Props
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "Wink, Inc.",
|
|
3
3
|
"name": "@winkintel/bootstrap-svelte",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.10",
|
|
5
5
|
"description": "Bootstrap components for Svelte 5 with TypeScript support.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/WinkIntel/bootstrap-svelte.git"
|
|
10
10
|
},
|
|
11
|
-
"homepage": "https://
|
|
11
|
+
"homepage": "https://bootstrap-svelte.vercel.app/",
|
|
12
12
|
"bugs": {
|
|
13
13
|
"url": "https://github.com/WinkIntel/bootstrap-svelte/issues"
|
|
14
14
|
},
|
|
@@ -99,10 +99,15 @@
|
|
|
99
99
|
},
|
|
100
100
|
"keywords": [
|
|
101
101
|
"bootstrap",
|
|
102
|
+
"bootstrap5",
|
|
103
|
+
"bootstrap-5",
|
|
102
104
|
"components",
|
|
105
|
+
"component-library",
|
|
103
106
|
"svelte",
|
|
104
107
|
"svelte5",
|
|
108
|
+
"sveltekit",
|
|
105
109
|
"typescript",
|
|
106
|
-
"ui"
|
|
110
|
+
"ui",
|
|
111
|
+
"ui-library"
|
|
107
112
|
]
|
|
108
113
|
}
|