Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit 4228bf8

Browse files
committed
update dev deps
1 parent e2c7fbc commit 4228bf8

18 files changed

+2699
-2048
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
All notable changes to `laravel-form-components` will be documented in this file
44

5+
## 5.0.0 - 2021-06-23
6+
### Added
7+
- Add Alpine.js v3 support
8+
9+
### Removed
10+
- Remove Alpine.js v2 support
11+
12+
### Updated
13+
- Update tailwind version to `2.2.2` in `laravel-form-components-styles` sub-package
14+
- Remove `postcss` in favor of tailwind cli in `laravel-form-components-styles` sub-package
15+
- Update dev dependencies
16+
517
## 4.0.8 - 2021-06-01
618
### Fixed
719
- Fix issue with date picker not always showing the currently selected date when opened

dist/form-components.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/form-components.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/advanced-usage/customizing-css.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Instead of importing/linking the pre-built `dist/styles.css` from the package, y
2323
> {note} If you choose this option, make sure you have the [required variants](#required-variants) included in your `tailwind.config.js` configuration.
2424
2525
## Option 2: Override Only Portions In Your CSS
26-
If you only want to tinker with certain apsects of the components but like to keep the CSS in sync with future package updates, nothing stops you from overriding only certain CSS rules with your own tweaks. Most DOM elements have their own custom class names.
26+
If you only want to tinker with certain aspects of the components but like to keep the CSS in sync with future package updates, nothing stops you from overriding only certain CSS rules with your own tweaks. Most DOM elements have their own custom class names.
2727

2828
Let's say your inputs aren't rounded, and you want to remove the border radius from them. To do that, you can write your own CSS for this class:
2929

@@ -32,6 +32,8 @@ Let's say your inputs aren't rounded, and you want to remove the border radius f
3232
...
3333

3434
@import '../../vendor/rawilk/laravel-form-components/resources/js/laravel-form-components-styles/dist/styles.css';
35+
/* or */
36+
@import '../../vendor/rawilk/laravel-form-components/resources/js/laravel-form-components-styles/dist/styles.min.css';
3537

3638
.form-text {
3739
@apply rounded-none;
@@ -153,5 +155,7 @@ in a `/* purgecss start ignore */`:
153155
```css
154156
/* purgecss start ignore */
155157
@import '../../vendor/rawilk/laravel-form-components/resources/js/laravel-form-components-styles/dist/styles.css';
158+
/* or */
159+
@import '../../vendor/rawilk/laravel-form-components/resources/js/laravel-form-components-styles/dist/styles.min.css';
156160
/* purgecss end ignore */
157161
```

docs/files/filepond.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Before using this component, we recommend familiarizing yourself with the FilePo
1010

1111
## Installation
1212

13-
While the `file-pond` component works out-of-the-box when you've [set the directive](/docs/laravel-form-components/v4/installation#directives),
13+
While the `file-pond` component works out-of-the-box when you've [set the directive](/docs/laravel-form-components/v5/installation#directives),
1414
we recommend that you install and compile the JavaScript libraries before you deploy to production:
1515

1616
- [Alpine.js](https://github.com/alpinejs/alpine) `^2.8`

docs/inputs/date-picker.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,4 @@ For more information on the callbacks available, please consult [the events api]
133133
Like the other inputs, the date picker can also have leading and trailing addons, however by default you cannot add them.
134134
To add leading addons, you must disable the toggle icon, and for trailing addons, you must set `clearable` to `false`.
135135

136-
See the [input documentation](/docs/laravel-form-components/v4/inputs/input#addons) for more information.
136+
See the [input documentation](/docs/laravel-form-components/v5/inputs/input#addons) for more information.

docs/inputs/email.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ The most basic usage of the component is like this:
2020
By default an `email` type will be set for the input field as well as an `id` that allows it to be
2121
easily referenced by a `label` element.
2222

23-
Besides this, the email element behaves exactly the same as the [input component](/docs/laravel-form-components/v4/inputs/input).
23+
Besides this, the email element behaves exactly the same as the [input component](/docs/laravel-form-components/v5/inputs/input).

docs/inputs/input.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ When there are errors for a field, the `aria-invalid` and `aria-describedby` att
5959
```
6060

6161
The actual error message won't be rendered from the input component itself, but it can be automatically rendered for you
62-
by wrapping the `<x-input />` component inside of a `<x-form-group />` component. Please refer to the [form-group documentation](/docs/laravel-form-components/v4/form/form-group#error-handling) for more information.
62+
by wrapping the `<x-input />` component inside of a `<x-form-group />` component. Please refer to the [form-group documentation](/docs/laravel-form-components/v5/form/form-group#error-handling) for more information.
6363

6464
The `aria-describedby` attribute takes the `name` attribute and appends `-error` to it, which will be the id given to the error message rendered by the `<x-form-group />` component. If you already have `aria-describedby` set on the input, the attribute
6565
value will be merged with the error attribute value.

docs/inputs/password.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ Like the other inputs, the password input can also have leading addons, but sinc
7171
includes a password toggle as a trailing icon addon, you are not able to add a trailing addon
7272
to the password input. If you need a trailing addon, you should use the input component instead.
7373

74-
See the [input documentation](/docs/laravel-form-components/v4/inputs/input#addons) for more information.
74+
See the [input documentation](/docs/laravel-form-components/v5/inputs/input#addons) for more information.

docs/inputs/switch-toggle.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ for more info.
1212

1313
## Installation
1414

15-
While the `switch-toggle` component works out-of-the-box when you've [set the directive](/docs/laravel-form-components/v4/installation#directives),
15+
While the `switch-toggle` component works out-of-the-box when you've [set the directive](/docs/laravel-form-components/v5/installation#directives),
1616
we recommend that you install and compile the JavaScript libraries before you deploy to production:
1717

1818
- [Alpine.js](https://github.com/alpinejs/alpine) `^2.8`

docs/inputs/textarea.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ If you are using livewire, the textarea will allow livewire to set the value ins
4444

4545
## Reference
4646

47-
Since the textarea component extends the [input component](/docs/laravel-form-components/v4/inputs/input), you are able
47+
Since the textarea component extends the [input component](/docs/laravel-form-components/v5/inputs/input), you are able
4848
to do a lot of the same things you can with the input element, such as error handling and addons.

docs/installation.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ This is assuming your stylesheet is located in the `./resources/css/` directory
8686

8787
You could copy the built CSS from `vendor/rawilk/laravel-components/resources/js/laravel-form-components-styles/dist/styles.css` into your public folder, and then use a `link` tag in your blade/html to get it: `<link rel="stylesheet" href="{{ asset('css/laravel-form-components.css') }}">`.
8888

89-
If you would like to customize the CSS we provide, head over to [the section on Customizing CSS](/docs/laravel-form-components/v4/advanced-usage/customizing-css).
89+
If you would like to customize the CSS we provide, head over to [the section on Customizing CSS](/docs/laravel-form-components/v5/advanced-usage/customizing-css).
9090

91-
> {tip} If you are using Purge CSS or Tailwind's JIT compiler, you should check out the section on [Purge CSS](/docs/laravel-form-components/v4/advanced-usage/customizing-css#purge-csstailwind-jit)
91+
> {tip} If you are using Purge CSS or Tailwind's JIT compiler, you should check out the section on [Purge CSS](/docs/laravel-form-components/v5/advanced-usage/customizing-css#purge-csstailwind-jit)
9292
> to prevent styles from being lost in production or at compile time.
9393
9494
## Components
@@ -104,7 +104,7 @@ and/or view of your own.
104104

105105
## Component JavaScript
106106

107-
Some components, such as the [custom select component](/docs/laravel-form-components/v4/selects/custom-select), require custom
107+
Some components, such as the [custom select component](/docs/laravel-form-components/v5/selects/custom-select), require custom
108108
JavaScript to run. The JavaScript is extracted to an external file since it is pretty substantial and should be minified. If
109109
you are using any components that depend on this JavaScript, be sure you are pulling the scripts in through either the
110110
`@fcJavaScript` or `@fcScripts` blade directives in your layout file. See [directives](#directives) for more information.
@@ -122,14 +122,17 @@ npm install -D alpinejs @popperjs/core filepond flatpickr
122122
In your JavaScript, add the following lines to pull each of the external dependencies you previously installed in:
123123

124124
```js
125-
import "alpinejs";
125+
import Alpine from "alpinejs";
126126
import flatpickr from "flatpickr";
127127
import * as FilePond from "filepond";
128128
import { createPopper } from "@popperjs/core";
129129

130130
window.flatpickr = flatpickr;
131131
window.FilePond = FilePond;
132132
window.createPopper = createPopper;
133+
window.Alpine = Alpine;
134+
135+
Alpine.start();
133136
```
134137

135138
### Dependency Styling

docs/selects/custom-select.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ In production, we recommend you install and compile the JavaScript libraries bef
1818
- [Alpine.js](https://github.com/alpinejs/alpine) `^2.8`
1919
- [Popper.js](https://popper.js.org/) `^2.9.1`
2020

21-
> {tip} See the [JavaScript Dependencies section](/docs/laravel-form-components/v4/installation#javascript-dependencies) for more information on installing them.
21+
> {tip} See the [JavaScript Dependencies section](/docs/laravel-form-components/v5/installation#javascript-dependencies) for more information on installing them.
2222
2323
## Basic Usage
2424

@@ -234,4 +234,4 @@ the select menu now. In addition to positioning the menu when opened, Popper.js
234234
## Addons
235235

236236
The custom select component supports leading addons, but since there are already elements appended to the end
237-
of the button trigger, trailing addons are not supported. For more information on addons, see [the input documentation](/docs/laravel-form-components/v4/inputs/input#addons).
237+
of the button trigger, trailing addons are not supported. For more information on addons, see [the input documentation](/docs/laravel-form-components/v5/inputs/input#addons).

docs/selects/select.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,5 @@ You can easily create a multiple select by setting `multiple` to `true`:
8282

8383
## Reference
8484

85-
Since the select component extends the [input component](/docs/laravel-form-components/v4/inputs/input), you are able
85+
Since the select component extends the [input component](/docs/laravel-form-components/v5/inputs/input), you are able
8686
to do a lot of the same things you can with the input element, such as error handling and addons.

docs/selects/timezone-select.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ By default, the timezone select uses the native select input, so you will explic
4949
the custom-select component any time you render the timezone select component.
5050

5151
> {note} If you want to render it as a custom-select, you need to ensure you have followed the
52-
[installation steps](/docs/laravel-form-components/v4/selects/custom-select#installation) for the `custom-select` component.
52+
[installation steps](/docs/laravel-form-components/v5/selects/custom-select#installation) for the `custom-select` component.

docs/upgrade.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,31 @@ title: Upgrade
33
sort: 4
44
---
55

6+
## Upgrading from v4 to v5
7+
8+
### Alpine upgrade
9+
The biggest breaking change in version 5 is changing support from alpine.js v2 to v3. This should require only minimal effort however in terms of updating the package.
10+
Based on the [upgrade guide](https://alpinejs.dev/upgrade-guide) from Alpine.js, here is what you should need to do if you are importing Alpine from NPM:
11+
12+
```js
13+
import Alpine from 'alpinejs';
14+
15+
window.Alpine = Alpine;
16+
17+
Alpine.start();
18+
```
19+
20+
This won't affect you if you are using the CDN scripts from the [configuration](https://github.com/rawilk/laravel-form-components/blob/master/config/form-components.php).
21+
22+
### Additional stylesheet option
23+
If you choose to import the compiled styles for this package into your own stylesheets, you can now import a minified stylesheet instead if you want to:
24+
25+
```css
26+
@import '../../vendor/rawilk/laravel-form-components/resources/js/laravel-form-components-styles/dist/styles.min.css';
27+
```
28+
29+
See [customizing css](/docs/laravel-form-components/v5/advanced-usage/customizing-css#option-2-override-only-portions-in-your-css) for more information.
30+
631
## Upgrading from v3 to v4
732

833
Version 4 introduced some breaking changes, which are outlined below:
@@ -15,13 +40,13 @@ Another major change with the styling is laravel-form-components now uses a sing
1540

1641
In addition, we have stopped using the `primary` and `danger` variant names in favor of `blue` and `red` respectively. Be sure to update your tailwind config and stylesheets accordingly.
1742

18-
For more info on styling, please see [the Customizing CSS section](/docs/laravel-form-components/v4/advanced-usage/customizing-css).
43+
For more info on styling, please see [the Customizing CSS section](/docs/laravel-form-components/v5/advanced-usage/customizing-css).
1944

2045
### Added Dependencies
2146

2247
Some components, such as the `custom-select` component, have a dependency on `Popper.js` now for positioning the menu. This will require you to ensure that dependency is installed in your project. If you customized the package's configuration file, you should make sure you pull in any updates to the configuration as well.
2348

24-
See [the custom select docs](/docs/laravel-form-components/v4/selects/custom-select#installation) for more information.
49+
See [the custom select docs](/docs/laravel-form-components/v5/selects/custom-select#installation) for more information.
2550

2651
### Custom Select
2752

0 commit comments

Comments
 (0)