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

Commit c3fe8c7

Browse files
committed
Update docs
1 parent 2e20dbc commit c3fe8c7

File tree

9 files changed

+242
-143
lines changed

9 files changed

+242
-143
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ All notable changes to `laravel-form-components` will be documented in this file
1616
- **Breaking Change:** Move styles into `resources/css` directory, which will require a different directory and file to import into stylesheets
1717
- **Breaking Change:** Change `textField` prop on `customSelect` to `labelField`
1818
- **Breaking Change:** Change defaults of `valueField` and `labelField` on custom select component to `id` and `name`, respectively
19+
- **Breaking Change:** Rename `min` and `max` props on custom select to `minSelected` and `maxSelected`, respectively
20+
- **Breaking Change:** Require a flat array of options on custom select, even if they contain "opt groups"
21+
- **Breaking Change:** Remove `wire-listeners` from custom select
1922
- Add various new props to custom select component
2023
- Change default styling of custom select component
2124
- Add Laravel 9.* compatibility

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88

99
Laravel form components provides common form components to help build forms faster using Tailwind CSS. Supports validation, old form values, and wire:model.
1010

11-
**Notice:** Laravel Form Components v7 is currently not in a stable release and shouldn't be used in a production environment. It is not advised to upgrade to it until
12-
a stable release has been made.
13-
1411
## Installation
1512

1613
You can install the package via composer:

docs/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: v6
2+
title: v7
33
slogan: A set of Blade components for TailwindCSS forms.
44
githubUrl: https://github.com/rawilk/laravel-form-components
55
branch: main

docs/advanced-usage/customizing-css.md

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sort: 1
66
If you want to change the look of the Laravel Form Components to match the style of your own app, you have multiple options.
77

88
## Option 1: Use Your Own Tailwind CSS Configuration
9-
Instead of importing/linking the pre-built `dist/styles.css` from the package, you can import the `src/styles.css` and run every `@apply` rule through your own `tailwind.config.js`.
9+
You can import the `index.css` and run every `@apply` rule through your own `tailwind.config.js`.
1010

1111
```css
1212
/* app.css */
@@ -15,33 +15,17 @@ Instead of importing/linking the pre-built `dist/styles.css` from the package, y
1515
@tailwind components;
1616
@tailwind utilities;
1717

18-
@import '../../vendor/rawilk/laravel-form-components/resources/js/laravel-form-components-styles/src/styles.css';
18+
@import '../../vendor/rawilk/laravel-form-components/resources/css/index.css';
1919

2020
/* override our styles here */
2121
```
2222

2323
> {note} If you choose this option, make sure you have the [required variants](#required-variants) included in your `tailwind.config.js` configuration.
2424
25-
## Option 2: Override Only Portions In Your CSS
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.
25+
You may also import only the stylesheets you need instead of everything in the index.css file. Most components have their own stylesheets (i.e. `input.css` for input elements).
2726

28-
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:
29-
30-
```css
31-
/* app.css */
32-
...
33-
34-
@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';
37-
38-
.form-text {
39-
@apply rounded-none;
40-
}
41-
```
42-
43-
## Option 3: Copy the CSS To Your Own Project
44-
If you want full-control, you can always copy the `src/styles.css` to your own project and go wild. In this example, we renamed the file to `custom/laravel-form-components.css`.
27+
## Option 2: Copy the CSS To Your Own Project
28+
If you want full-control, you can always copy the each of the stylesheets from `resources/css` to your own project and go wild. In this example, we renamed the file to `custom/laravel-form-components.css`.
4529
Beware: you will have to manually keep this CSS in sync with changes in future package updates:
4630

4731
```css
@@ -154,8 +138,6 @@ in a `/* purgecss start ignore */`:
154138

155139
```css
156140
/* purgecss start ignore */
157-
@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';
141+
@import '../../vendor/rawilk/laravel-form-components/resources/css/index.css';
160142
/* purgecss end ignore */
161143
```

docs/installation.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,11 @@ You have a couple options for how you can use the UI components' CSS, depending
7979

8080
### Using Laravel Mix or Webpack with CSS-Loader
8181

82-
You can import the built CSS in your own CSS files using `@import '../../vendor/rawilk/laravel-form-components/resources/js/laravel-form-components-styles/dist/styles.css';`.
82+
You can import the CSS files into your own stylesheets using `@import '../../vendor/rawilk/laravel-form-components/resources/css/index.css';'`.
8383
This is assuming your stylesheet is located in the `./resources/css/` directory of your project.
8484

85-
### Directly in Blade/HTML
86-
87-
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') }}">`.
85+
This will import all the package's styles into your project, however you are free to import only the stylesheets you need as well. They are all located
86+
in the same directory as the `index.css` stylesheet.
8887

8988
If you would like to customize the CSS we provide, head over to [the section on Customizing CSS](/docs/laravel-form-components/{version}/advanced-usage/customizing-css).
9089

docs/requirements.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sort: 2
66
## General Requirements
77

88
- PHP **8.0** or greater
9-
- Laravel **8.56** or greater
9+
- Laravel **8.70** or greater
1010
- TailwindUI for styling
1111
- Alpine.js
1212
- Popper.js (when using components like custom-select)
@@ -15,6 +15,7 @@ sort: 2
1515
## Version Matrix
1616

1717
| Laravel | Minimum Version | Maximum Version |
18-
| ---------- | --------------- | --------------- |
18+
| ---------- | --------------- |-----------------|
1919
| 8.0 - 8.55 | 1.0.0 | 5.1.0 |
20-
| 8.56 | 6.0.0 | |
20+
| 8.56 | 6.0.0 | 6.0.2 |
21+
| 8.70 | 7.0.0 | |

0 commit comments

Comments
 (0)