You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,7 +115,7 @@ Within the download you’ll find the following directories and files, logically
115
115
```
116
116
</details>
117
117
118
-
We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). [Source maps](https://web.dev/articles/source-maps) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Bundled JS files (`bootstrap.bundle.js` and minified `bootstrap.bundle.min.js`) include [Floating UI](https://floating-ui.com/). All CSS files work for both LTR and RTL layouts thanks to logical properties—simply set `dir="rtl"` on your HTML element.
118
+
We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). [Source maps](https://web.dev/articles/source-maps) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Bundled JS files (`bootstrap.bundle.js` and minified `bootstrap.bundle.min.js`) include [Floating UI](https://floating-ui.com/) and [Vanilla Calendar Pro](https://vanilla-calendar.pro/). All CSS files work for both LTR and RTL layouts thanks to logical properties—simply set `dir="rtl"` on your HTML element.
Copy file name to clipboardExpand all lines: site/src/content/docs/customize/optimize.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ If you’re not using a component, comment it out or delete it entirely. For exa
14
14
15
15
## Lean JavaScript
16
16
17
-
Bootstrap’s JavaScript includes every component in our primary dist files (`bootstrap.js` and `bootstrap.min.js`), and even our primary dependency (Floating UI) with our bundle files (`bootstrap.bundle.js` and `bootstrap.bundle.min.js`). While you’re customizing via Sass, be sure to remove related JavaScript.
17
+
Bootstrap’s JavaScript includes every component in our primary dist files (`bootstrap.js` and `bootstrap.min.js`), and even our primary dependencies (Floating UI and Vanilla Calendar Pro) with our bundle files (`bootstrap.bundle.js` and `bootstrap.bundle.min.js`). While you’re customizing via Sass, be sure to remove related JavaScript.
18
18
19
19
For instance, assuming you’re using your own JavaScript bundler like Webpack, Parcel, or Vite, you’d only import the JavaScript you plan on using. In the example below, we show how to just include our dialog JavaScript:
This way, you’re not including any JavaScript you don’t intend to use for components like buttons, carousels, and tooltips. If you’re importing dropdowns, tooltips or popovers, be sure to list the Floating UI dependency in your `package.json` file.
38
+
This way, you’re not including any JavaScript you don’t intend to use for components like buttons, carousels, and tooltips. If you’re importing dropdowns, tooltips or popovers, be sure to list the Floating UI dependency in your `package.json` file. If you’re using the datepicker, be sure to also list the Vanilla Calendar Pro dependency.
39
39
40
40
<Callout>
41
41
**Heads up!** Files in `bootstrap/js/dist` use the **default export**. To use them, do the following:
If you’re using our compiled JavaScript and prefer to include Floating UI separately, add Floating UI before our JS, via a CDN preferably.
86
+
If you’re using our compiled JavaScript and prefer to include Floating UI and Vanilla Calendar Pro separately, add them before our JS, via a CDN preferably.
@@ -130,7 +131,7 @@ You can also do the old fashioned thing and download Bootstrap manually. Choose
130
131
<BsTable>
131
132
| Type | Description | Link |
132
133
| --- | --- | --- |
133
-
| <strongclass="text-nowrap">Distribution files</strong> | Ready-to-use compiled and minified CSS and JavaScript files. Doesn't include documentation, source files, or dependencies like Floating UI. | <ahref="[[config:download.dist]]"class="btn-subtle theme-accent btn-sm">Download</a> |
134
+
| <strongclass="text-nowrap">Distribution files</strong> | Ready-to-use compiled and minified CSS and JavaScript files. Doesn't include documentation, source files, or dependencies like Floating UI and Vanilla Calendar Pro. | <ahref="[[config:download.dist]]"class="btn-subtle theme-accent btn-sm">Download</a> |
134
135
| <strongclass="text-nowrap">Source files</strong> | Sass, JavaScript, and documentation files for compiling with your own asset pipeline. Requires [Sass compiler]([[docsref:/guides/contribute#sass]]), [Autoprefixer](https://github.com/postcss/autoprefixer), and a JavaScript bundler like [Rollup](https://rollupjs.org/) or [Webpack](https://webpack.js.org/). | <ahref="[[config:download.source]]"class="btn-subtle theme-accent btn-sm">Download</a> |
Copy file name to clipboardExpand all lines: site/src/content/docs/getting-started/javascript.mdx
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,14 @@ toc: true
6
6
7
7
## JS components
8
8
9
-
Curious which components explicitly require our JavaScript and Floating UI?
9
+
Curious which components explicitly require our JavaScript and Floating UI or Vanilla Calendar Pro?
10
10
11
11
- Accordions for extending our Collapse plugin
12
12
- Alerts for dismissing
13
13
- Buttons for toggling states and checkbox/radio functionality
14
14
- Carousel for all slide behaviors, controls, and indicators
15
15
- Collapse for toggling visibility of content
16
+
- Datepicker for date selection (also requires [Vanilla Calendar Pro](https://vanilla-calendar.pro/))
16
17
- Dropdowns for displaying and positioning (also requires [Floating UI](https://floating-ui.com/))
17
18
- Modals for displaying, positioning, and scroll behavior
18
19
- Navbar for extending our Collapse and Offcanvas plugins to implement responsive behaviors
@@ -59,19 +60,21 @@ We provide a version of Bootstrap built as `ESM` (`bootstrap.esm.js` and `bootst
59
60
</script>
60
61
```
61
62
62
-
Compared to JS bundlers, using ESM in the browser requires you to use the full path and filename instead of the module name. [Read more about JS modules in the browser.](https://v8.dev/features/modules#specifiers) That’s why we use `'bootstrap.esm.min.js'` instead of `'bootstrap'` above. However, this is further complicated by our Floating UI dependency, which imports Floating UI into our JavaScript like so:
63
+
Compared to JS bundlers, using ESM in the browser requires you to use the full path and filename instead of the module name. [Read more about JS modules in the browser.](https://v8.dev/features/modules#specifiers) That’s why we use `'bootstrap.esm.min.js'` instead of `'bootstrap'` above. However, this is further complicated by our Floating UI and Vanilla Calendar Pro dependencies, which are imported into our JavaScript like so:
63
64
64
65
```js
65
66
import*asPopperfrom"@floating-ui/dom"
67
+
import { Calendar } from"vanilla-calendar-pro"
66
68
```
67
69
68
70
If you try this as-is, you’ll see an error in the console like the following:
69
71
70
72
```text
71
73
Uncaught TypeError: Failed to resolve module specifier "@floating-ui/dom". Relative references must start with either "/", "./", or "../".
74
+
Uncaught TypeError: Failed to resolve module specifier "vanilla-calendar-pro". Relative references must start with either "/", "./", or "../".
72
75
```
73
76
74
-
To fix this, you can use an `importmap` to resolve the arbitrary module names to complete paths. If your [targeted browsers](https://caniuse.com/?search=importmap) do not support `importmap`, you’ll need to use the [es-module-shims](https://github.com/guybedford/es-module-shims) project. Here’s how it works for Bootstrap and Floating UI:
77
+
To fix this, you can use an `importmap` to resolve the arbitrary module names to complete paths. If your [targeted browsers](https://caniuse.com/?search=importmap) do not support `importmap`, you’ll need to use the [es-module-shims](https://github.com/guybedford/es-module-shims) project. Here’s how it works for Bootstrap, Floating UI, and Vanilla Calendar Pro:
75
78
76
79
```html
77
80
<!doctype html>
@@ -91,6 +94,7 @@ To fix this, you can use an `importmap` to resolve the arbitrary module names to
@@ -108,7 +112,7 @@ To fix this, you can use an `importmap` to resolve the arbitrary module names to
108
112
109
113
Some plugins and CSS components depend on other plugins. If you include plugins individually, make sure to check for these dependencies in the docs.
110
114
111
-
Our dropdowns, popovers, and tooltips also depend on [Floating UI](https://floating-ui.com/).
115
+
Our dropdowns, popovers, and tooltips also depend on [Floating UI](https://floating-ui.com/). Our datepicker also depends on [Vanilla Calendar Pro](https://vanilla-calendar.pro/).
0 commit comments